[SVN] r585 - in /branches/cyrus23: ./ cyrus-imapd-2.3-2.3.7/
cyrus-imapd-2.3-2.3.7/CVS/ cyrus-imapd-2.3-2.3.7/autom4te.cache/
cyrus-imapd-2.3-2.3.7/cmulocal/ cyrus-imapd-2.3-2.3.7/cmulocal/CVS/
cyrus-imapd-2.3-2.3.7/contrib/ cyrus-imapd-2.3-2.3.7/contrib/CVS/
cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/
cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/
cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/
cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/
cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/
cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/
cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/
cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/
cyrus-imapd-2.3-2.3.7/contrib/notify_unix/
cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/
cyrus-imapd-2.3-2.3.7/debian/ cyrus-imapd-2.3-2.3.7/debian/examples/
cyrus-imapd-2.3-2.3.7/debian/patches/ cyrus-imapd-2.3-2.3.7/debian/po/
cyrus-imapd-2.3-2.3.7/depot/ cyrus-imapd-2.3-2.3.7/depot/CVS/
cyrus-imapd-2.3-2.3.7/doc/ cyrus-imapd-2.3-2.3.7/doc/CVS/
cyrus-imapd-2.3-2.3.7/doc/internal/ cyrus-imapd-2.3-2.3.7/doc/internal/CVS/
cyrus-imapd-2.3-2.3.7/doc/man/ cyrus-imapd-2.3-2.3.7/doc/text/
cyrus-imapd-2.3-2.3.7/doc/text/CVS/ cyrus-imapd-2.3-2.3.7/et/
cyrus-imapd-2.3-2.3.7/et/CVS/ cyrus-imapd-2.3-2.3.7/imap/
cyrus-imapd-2.3-2.3.7/imap/CVS/ cyrus-imapd-2.3-2.3.7/imtest/
cyrus-imapd-2.3-2.3.7/imtest/CVS/ cyrus-imapd-2.3-2.3.7/installsieve/
cyrus-imapd-2.3-2.3.7/installsieve/CVS/ cyrus-imapd-2.3-2.3.7/lib/
cyrus-imapd-2.3-2.3.7/lib/CVS/ cyrus-imapd-2.3-2.3.7/lib/charset/
cyrus-imapd-2.3-2.3.7/lib/charset/CVS/ cyrus-imapd-2.3-2.3.7/lib/test/
cyrus-imapd-2.3-2.3.7/lib/test/CVS/ cyrus-imapd-2.3-2.3.7/makedepend/
cyrus-imapd-2.3-2.3.7/makedepend/CVS/ cyrus-imapd-2.3-2.3.7/man/
cyrus-imapd-2.3-2.3.7/man/CVS/ cyrus-imapd-2.3-2.3.7/master/
cyrus-imapd-2.3-2.3.7/master/CVS/ cyrus-imapd-2.3-2.3.7/master/conf/
cyrus-imapd-2.3-2.3.7/master/conf/CVS/ cyrus-imapd-2.3-2.3.7/netnews/
cyrus-imapd-2.3-2.3.7/netnews/CVS/ cyrus-imapd-2.3-2.3.7/notifyd/
cyrus-imapd-2.3-2.3.7/notifyd/CVS/ cyrus-imapd-2.3-2.3.7/perl/
cyrus-imapd-2.3-2.3.7/perl/CVS/ cyrus-imapd-2.3-2.3.7/perl/imap/
cyrus-imapd-2.3-2.3.7/perl/imap/CVS/ cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/
cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/
cyrus-imapd-2.3-2.3.7/perl/imap/examples/
cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/
cyrus-imapd-2.3-2.3.7/perl/imap/t/ cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/
cyrus-imapd-2.3-2.3.7/perl/sieve/ cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/
cyrus-imapd-2.3-2.3.7/perl/sieve/lib/
cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/
cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/
cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/
cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/
cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/
cyrus-imapd-2.3-2.3.7/ptclient/ cyrus-imapd-2.3-2.3.7/ptclient/CVS/
cyrus-imapd-2.3-2.3.7/sieve/ cyrus-imapd-2.3-2.3.7/sieve/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/ cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/action/
cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/
cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/
cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/
cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/
cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/
cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/test/
cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/
cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/
cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/
cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/
cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/
cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/
cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/
cyrus-imapd-2.3-2.3.7/snmp/ cyrus-imapd-2.3-2.3.7/snmp/CVS/
cyrus-imapd-2.3-2.3.7/syslog/ cyrus-imapd-2.3-2.3.7/syslog/CVS/
cyrus-imapd-2.3-2.3.7/timsieved/ cyrus-imapd-2.3-2.3.7/timsieved/CVS/
cyrus-imapd-2.3-2.3.7/tools/ cyrus-imapd-2.3-2.3.7/tools/CVS/
debian at incase.de
debian at incase.de
Sat Aug 26 00:00:41 UTC 2006
Author: astronut
Date: Sat Aug 26 02:00:13 2006
New Revision: 585
URL: https://mail.incase.de/viewcvs?rev=585&root=cyrus22&view=rev
Log:
Import first-draft 2.3 package (thanks to Farzad FARID <farzy at farzy.org>)
Added:
branches/cyrus23/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/COPYRIGHT
branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/README.andrew
branches/cyrus23/cyrus-imapd-2.3-2.3.7/SMakefile
branches/cyrus23/cyrus-imapd-2.3-2.3.7/aclocal.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.0
branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/requests
branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.0
branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/COPYING
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/README.andrew
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/afs.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/agentx.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/arx.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ax_path_bdb.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/berkdb.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/bsd_sockets.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-attribute.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-fpic.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/clamav.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err_link.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/common.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/cyrus.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/db.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs2.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/heimdal.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/init_automake.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ipv6.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kafs.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v4.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v5.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libXau.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libcyrus.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libloguse.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libnet.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libpcap.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/librestrict.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libssl.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libtoolhack.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libwrap.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/mips-abi.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nadine.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nana.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openldap.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openssl.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/pthreads.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl2.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/tcl.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/telnet.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ucdsnmp.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/util.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/zephyr.m4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.guess
branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.h.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.sub
branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/add-cyrus-user
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/index.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrus.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrusrc
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/run (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/deliver-notify-zephyr.patch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/drac_auth.patch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/fud-client.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/mupdate-test.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/net-server-prefork-0.01.tgz (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/notify
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/simple_notify.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/sql_notify.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/sieve-spamasssassin
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.txt
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.database
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.debug
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.simpleinstall
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.exim
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.postfix
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.sendmail
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/TODO.Debian
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/UPGRADE.Debian
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/arbitronsort.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/changelog
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/compat
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/control
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/copyright
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-16x16.xpm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-32x32.xpm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrdump.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.README.Debian
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.dirs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.linda
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.lintian
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.manpages
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.menu
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.README.Debian
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.dirs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.manpages
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.NEWS
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.contrib
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.default
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.init
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus23.cron.daily
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.dirs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.docs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.linda
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.links
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.lintian
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.manpages
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postinst
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postrm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.preinst
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.prerm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.templates
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-db-types.upgrading_from_1.5.txt
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.dirs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.links
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.doc-base
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.docs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.links
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.dirs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.links
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.manpages
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.links
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.dirs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.links
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.manpages
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.dirs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.links
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.manpages
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.links
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.manpages
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/deletable.files
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README.imapcreate.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/editsieve
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/imapcreate.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/mboxtocyrus
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/syncldap2cyrus.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/executable.files
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/get-backtrace.gdb
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imap.pam
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imapd.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.lintian
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.manpages
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/license.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/lmtp.pam
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.ignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.violations.ignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/mupdate.pam
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/nntp.pam
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0001-upstream-fix-segfault.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0002-allow_invalid_id_acl_removal.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0003-upstream_disallow_userprobes.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0004-upstream-fetchnews-timezone-dst-fix.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0005-upstream-fix-ctl_mboxlist-dump-undump.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0006-upstream-free-backend-fix.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0007-upstream-remove-undump-size-limit.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0008-upstream-better-message-track-logging.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0010-upstream-fix-libRSAglue-linkage.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0011-upstream-allow-compile-with-krb5-1.4.3.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0012-upstream-sasl-2.2.22-comapatibility-fix.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0013-upstream-allow-report-above-4GB-mboxsize.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0014-upstream-fix-locks-during-reconstruction.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0015-upstream-fix-logic-error-in-imapoptions.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0016-upstream-fix-typos.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0017-upstream-no-body-empty-string-instead-of-null.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0090-fix-casts.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/00list
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/01-fix_Makefile.in.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/02-add_mkinstalldirs.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/03-fix_docs.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/04-add_autogen.sh.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/05-fix_programnames.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/06-disable_runpath.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/07-update_aclocal_and_configure.in.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/08-clean_socket_closes.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/09-kerberos-ipv4-ipv6-kludge-removal.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/10-fix_potential_overflows.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/11-fix_syslog_prefix.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/12-fix_timeout_handling.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/13-master_process_handling.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/14-xmalloc.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/16-fix_mib.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/17-fix_tail_syntax_in_xversion.h.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/19-fix_tls_ssl.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/21-fix_config-parsing.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/25-update_install-sh.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/30-update_perlcalling.sh.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/35-masssievec_remove_unused_variable.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/40-rehash_fix_pathes.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/45-kolab2-annotations.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/61-64bit-quota.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/65-sieveshell-enhancements.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/70-allow-larger-buffers.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/72-faster-isdigit.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/75-update-imapd.conf-documentation.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/99-update-autoconf.dpatch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/POTFILES.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/cs.po
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/de.po
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/fr.po
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/it.po
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/ja.po
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/nl.po
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/pt_BR.po
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/templates.pot
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/pop.pam
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/rules (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/sieve.pam
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/source.lintian-overrides
branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/watch
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/depot.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.imap
branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.ptclient
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/Makefile.dist
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/altnamespace.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/anoncvs.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/bugs.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/changes.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/cyrusv2.mc
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/faq.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/feedback.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/index.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-admin-mb.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-auth.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-compile.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-configure.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-murder.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-netnews.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-perf.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-prereq.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-replication.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-sieve.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-snmpmon.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-testing.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-upgrade.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-virtdomains.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/bytecode
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/database-formats.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/hacking
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/internationalization.html (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/locking
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/mailbox-format.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/master-state-machine.fig
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot-events
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_examples
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_protocol
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/specials
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/uuid
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/var_directory_structure
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/mailing-list.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/arbitron.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/chk_cyrus.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_cyrusdb.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_deliver.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_mboxlist.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cvt_cyrusdb.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyr_expire.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyradm.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyrus.conf.5.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/deliver.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fetchnews.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fud.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/idled.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.conf.5.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imclient.3.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imtest.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/installsieve.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ipurge.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/krb.equiv.5.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtpd.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtptest.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/make_md5.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/master.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbexamine.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbpath.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mupdatetest.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntpd.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntptest.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/notifyd.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3d.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3test.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/quota.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/reconstruct.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/rmnews.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sieveshell.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sivtest.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smmapd.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smtptest.1.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/squatter.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_client.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_reset.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_server.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/syncnews.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/timsieved.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/tls_prune.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/unexpunge.8.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.fig
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.png (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.fig
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.png (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/notes.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/os.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/overview.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/questions.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/readme.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve-protocol.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/specs.html
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/Makefile
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/altnamespace
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/anoncvs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/bugs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/changes
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/faq
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/feedback
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/htmlstrip.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/index
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-admin-mb
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-auth
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-compile
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-configure
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-murder
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-netnews
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-perf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-prereq
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-replication
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-sieve
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-snmpmon
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-testing
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-upgrade
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-virtdomains
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/mailing-list
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/man
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/notes
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/os
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/overview
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/questions
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/readme
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve-protocol
branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/specs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.3
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.texinfo
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.sh (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/config_script (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_message.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_table.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_c.awk
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_h.awk
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_name.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/init_et.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/internal.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/mit-sipb-copyright.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test1.et
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test2.et
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test_et.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/texinfo.tex
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.dist
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/arbitron.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/chk_cyrus.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cli_fatal.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_cyrusdb.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_deliver.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_mboxlist.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cvt_cyrusdb.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyr_expire.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyrdump.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/deliver.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/delivered_prune.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fetchnews.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fud.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.et
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapparse.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ipurge.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.snmp
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/make_md5.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbexamine.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbpath.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-slave.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.et
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_fake.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_pthread.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.et
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntpd.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pop3d.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proc.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.snmp
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota_db.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/reconstruct.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslserver.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_bigdb.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_db.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_local.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/setproctitle.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smmapd.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_build.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squatter.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_client.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_reset.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_server.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/syncnews.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls_prune.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/unexpunge.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/xversion.sh (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/imtest.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/install-sh (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/codes.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/exitcodes.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/installscript.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.dist
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl_afs.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb5.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_unix.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/big5.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/gb2312.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-jp.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-kr.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-1.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-15.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-2.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-3.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-4.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-5.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-6.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-7.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-8.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-9.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/koi8-r.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unidata2.txt
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unifix.txt
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/us-ascii.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1252.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1256.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/chartable.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_berkeley.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_flat.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_quotalegacy.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_skiplist.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/exitcodes.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/ftruncate.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gai.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getaddrinfo.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getdtablesize.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getnameinfo.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_gmtime.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_tm.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hmac-md5.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapoptions
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_fcntl.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_flock.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_nommap.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_shared.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_stupidshared.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5global.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/memmove.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkchartable.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_fcntl.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_ioctl.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strcasecmp.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strerror.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/sysexits.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/Makefile
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.INPUT
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.OUTPUT
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.INPUT
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.OUTPUT
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.INPUT
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.OUTPUT
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/imapurl.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/pool.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/rnddb.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/run (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob2.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cpp.ed
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cppsetup.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/def.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/include.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/install-sh (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/main.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/mkdepend.man
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/parse.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/pr.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.dist
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/arbitron.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/chk_cyrus.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_cyrusdb.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_deliver.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_mboxlist.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cvt_cyrusdb.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyr_expire.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyrus.conf.5
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/deliver.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fetchnews.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fud.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/idled.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.conf.5
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imclient.3
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imtest.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/installsieve.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ipurge.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/krb.equiv.5
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtpd.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtptest.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/make_md5.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/master.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbexamine.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbpath.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mupdatetest.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntpd.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntptest.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/notifyd.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3d.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3test.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/quota.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/reconstruct.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/rmnews.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sieveshell.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sivtest.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smmapd.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smtptest.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/squatter.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_client.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_reset.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_server.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/syncnews.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/timsieved.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/tls_prune.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/unexpunge.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CYRUS-MASTER.mib
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-backend.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-frontend.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/normal.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/prefork.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/small.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service-thread.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/inn.diffs (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/macros.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/remotepurge.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/exitcodes.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifytest.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/version.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Changes
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.pm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.xs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Admin.pm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/IMSP.pm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Shell.pm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/MANIFEST
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Makefile.PL
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyradm.sh
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyrperl.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/auditmbox.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapcollate.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapdu.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/test-imsp.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/01-imclient.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/02-admin.t
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/typemap
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/xsutil.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/codes.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/exitcodes.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/MANIFEST
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/Makefile.PL
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.pm
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.xs
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/typemap
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/installsieve.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/sieveshell.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/afskrb.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ldap.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptdump.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptexpire.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptextract.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test2.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/AUTHORS
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/COPYING
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/ChangeLog
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.dist
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/NEWS
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.l
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.y
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_dump.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_emit.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_eval.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_generate.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bytecode.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.l
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.y
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.et
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_interface.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sievec.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieved.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/test.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-discard
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-keep
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-redirect
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-discard
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-keep
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-redirect
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.key
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.s
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-fileinto
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag3
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag5
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-mark
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-reject
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-unmark
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-vacation
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-fileinto
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag3
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag4
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag5
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-mark
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-reject
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-unmark
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-vacation
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.key
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.s
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-address
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-header
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-address
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-header
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.key
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.s
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries.Log
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-areg
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-asub
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-envelope
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-hreg
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value2
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-areg
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-asub
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-count
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-envelope
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-hreg
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-value
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.key
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.s
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/snmpgen (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/README
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.1
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.3
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.conf
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.8
branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/.cvsignore
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/Makefile.in
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/TODO
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/codes.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/exitcodes.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.h
branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/timsieved.c
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Entries
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Repository
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Root
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Tag
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/arbitronsort.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2header (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2man (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/convert-sieve.pl
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/dohash (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/masssievec (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/migrate-metadata (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mkimap (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mknewsgroups (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mupdate-loadgen.pl (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/not-mkdep (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/rehash (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/translatesieve (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/undohash (with props)
branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/upgradesieve (with props)
branches/cyrus23/cyrus-imapd-2.3_2.3.7-1~pr1.diff.gz (with props)
branches/cyrus23/cyrus-imapd-2.3_2.3.7-1~pr1.dsc
branches/cyrus23/cyrus-imapd-2.3_2.3.7.orig.tar.gz (with props)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9 @@
+autom4te*.cache
+Makefile
+aclocal.m4
+config.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/COPYRIGHT
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/COPYRIGHT?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/COPYRIGHT (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/COPYRIGHT Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+$Id: COPYRIGHT,v 1.7 2000/10/12 20:45:21 wcw Exp $
+
+ALL versions of the Cyrus IMAP server are now covered by the following copyright:
+
+ * Copyright (c) 1994-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+If you find this software useful and valuable in your work, we would
+welcome any support you can offer toward continuing this work.
+
+We gratefully accept contributions, whether intellectual or monetary.
+Intellectual contributions in the form of code or constructive
+collaboration can be directed to cyrus-bugs+ at andrew.cmu.edu (even if
+it is not a bug).
+
+If you wish to provide financial support to the Cyrus Project, send a
+check payable to "Carnegie Mellon University" to
+
+ Project Cyrus
+ Computing Services
+ Carnegie Mellon University
+ 5000 Forbes Ave
+ Pittsburgh, PA 15213
+ USA
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+/.cvsignore/1.2/Fri Oct 4 14:09:26 2002//Tcyrus-release-2-3-7
+/COPYRIGHT/1.7/Thu Oct 12 20:45:21 2000//Tcyrus-release-2-3-7
+/Makefile.in/1.67.2.14/Mon Jul 10 13:46:19 2006//Tcyrus-release-2-3-7
+/README/1.13/Wed Oct 22 18:50:01 2003//Tcyrus-release-2-3-7
+/README.andrew/1.32.8.2/Mon Jun 19 19:06:43 2006//Tcyrus-release-2-3-7
+/SMakefile/1.92.2.2/Wed Jun 2 19:58:27 2004//Tcyrus-release-2-3-7
+/config.guess/1.1/Tue Apr 25 04:42:12 2000//Tcyrus-release-2-3-7
+/config.sub/1.1/Tue Apr 25 04:42:12 2000//Tcyrus-release-2-3-7
+/configure.in/1.268.2.23/Tue Apr 12 20:05:20 2005//Tcyrus-release-2-3-7
+/install-sh/1.1/Fri Feb 10 19:26:06 1995//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,37 @@
+A D/IMAP-Cyrus////
+A D/SIEVE////
+A D/SIEVE-Cyrus////
+A D/amssync////
+A D/cmulocal-old////
+A D/contrib////
+A D/cyradm////
+A D/depot////
+A D/doc////
+A D/et////
+A D/imap////
+A D/imtest////
+A D/installsieve////
+A D/lib////
+A D/makedepend////
+A D/man////
+A D/master////
+A D/netnews////
+A D/notifyd////
+A D/perl////
+A D/ptclient////
+A D/pwcheck////
+A D/snmp////
+A D/syslog////
+A D/timsieved////
+A D/tools////
+A D/cmulocal////
+A D/sieve////
+A D/acap////
+R D/acap////
+R D/pwcheck////
+R D/cyradm////
+R D/cmulocal-old////
+R D/amssync////
+R D/SIEVE-Cyrus////
+R D/SIEVE////
+R D/IMAP-Cyrus////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,167 @@
+#
+# @configure_input@
+#
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+SUBDIRS = man @PRE_SUBDIRS@ lib @SIEVE_SUBDIRS@ @SERVER_SUBDIRS@ \
+ imtest @SNMP_SUBDIRS@ @EXTRA_SUBDIRS@
+DISTSUBDIRS = doc
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+INSTALL = @INSTALL@
+
+SHELL = /bin/sh
+ at SET_MAKE@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+
+mandir = @mandir@
+
+YACC = @YACC@
+LEX = @LEX@
+COMPILE_ET = @COMPILE_ET@
+
+VERSION = 2.3.7
+
+all::
+ @for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" all "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \
+ done
+
+dist:: distcvs
+ @echo "creating configure"
+ @cd dist/cyrus-imapd-$(VERSION) ; sh SMakefile
+ @for d in $(SUBDIRS) $(DISTSUBDIRS); \
+ do \
+ (cd dist/cyrus-imapd-$(VERSION)/$$d; \
+ if [ -f Makefile.dist ]; then \
+ echo "### Making" dist "in" `pwd`; \
+ $(MAKE) $(MFLAGS) YACC='$(YACC)' LEX='$(LEX)' \
+ COMPILE_ET='$(COMPILE_ET)' -f Makefile.dist dist ; \
+ fi) || exit 1; \
+ done
+ @echo "creating tarfile"
+ @cd dist ; tar cf - cyrus-imapd-$(VERSION) | \
+ gzip -9 > ../cyrus-imapd-$(VERSION).tar.gz
+ rm -f distcvs
+ rm -rf dist
+
+distcvs:
+ if [ \! -d dist ]; then mkdir dist ; fi
+ @echo "checking out the distribution"
+ @cd dist ; cvs -Q -d :pserver:anoncvs at cvs.andrew.cmu.edu:/cvs \
+ co -r cyrus-imapd-2_3 -d cyrus-imapd-$(VERSION) cyrus
+ touch distcvs
+
+install::
+ $(srcdir)/install-sh -d ${DESTDIR}$(exec_prefix)/bin
+ $(srcdir)/install-sh -d ${DESTDIR}$(exec_prefix)/lib
+ $(srcdir)/install-sh -d ${DESTDIR}$(prefix)/include/cyrus
+ $(srcdir)/install-sh -d ${DESTDIR}$(mandir)/man1
+ $(srcdir)/install-sh -d ${DESTDIR}$(mandir)/man3
+ $(srcdir)/install-sh -d ${DESTDIR}$(mandir)/man5
+ $(srcdir)/install-sh -d ${DESTDIR}$(mandir)/man8
+ @for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" install "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) install) || exit 1; \
+ done
+
+clean::
+ @-for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" clean "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) clean ; \
+ echo "### Done with" `pwd`); \
+ done
+
+distclean::
+ @-for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" clean "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) distclean ; \
+ echo "### Done with" `pwd`); \
+ done
+ rm -f Makefile Makefile.bak \
+ config.status config.log config.cache config.h
+
+depend::
+ @for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" depend "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) depend) || exit 1; \
+ done
+
+Makefile: Makefile.in config.status
+ $(SHELL) config.status
+config.status: configure
+ $(SHELL) config.status --recheck
+configure: configure.in
+ cd $(srcdir); rm -f config.cache; autoconf
+
+checkdepend::
+
+depend::
+ echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
+ echo 'w' >>eddep
+ cp Makefile Makefile.bak
+ ed -s Makefile < eddep
+ rm eddep
+ echo '' >> Makefile
+ echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
+ echo '# see make depend above' >> Makefile
+
+# DO NOT DELETE THIS LINE -- make depend uses it
+
+# The following rule ensures that "make depend" gets run at least
+# once before a "make all". The "depend" rule above removes
+# this rule from the Makefile the first time the "make depend"
+# has been run after the Makefile is generated by Configure
+
+checkdepend:: depend
+
+# IF YOU PUT STUFF HERE IT WILL GO AWAY
+# see make depend above
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,32 @@
+$Id: README,v 1.13 2003/10/22 18:50:01 rjs3 Exp $
+
+This is the Carnegie Mellon University Cyrus IMAP Server.
+
+This distribution is what we are running on our production servers.
+
+The 2.2, 2.1 and 2.0 releases contains many new features over 1.6.
+
+No further development work will progress on 1.6 so we encourage you
+to work with the Cyrus 2.2 code wherever possible. Version 1.6
+has known security vulnerabilities, and is not supported.
+
+If you continue to install this software PLEASE be sure to read the
+documentation (located in the doc/ subdirectory). Many common questions
+can be answered just by carefully following the documentation.
+Please also refer to http://bugzilla.andrew.cmu.edu for any outstanding bugs.
+
+Note that CMU only provides a source distribution. If you run into
+problems with any binary distribution, please contact the source of
+the binary distribution.
+
+----------------------------------------------------------------------
+* For the real README file, please see doc/readme.html.
+
+* To install the software, please read doc/install.html (but please
+ read doc/readme.html first!).
+
+* To obtain updates to this software, visit the web page
+ http://asg.web.cmu.edu/cyrus
+ or ftp directly from
+ ftp://ftp.andrew.cmu.edu/pub/cyrus-mail
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/README.andrew
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/README.andrew?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/README.andrew (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/README.andrew Sat Aug 26 02:00:13 2006
@@ -1,0 +1,137 @@
+#!/bin/sh
+
+#
+# This is internal documentation for Computing Services at
+# Carnegie Mellon University.
+#
+# Please refer to doc/readme.html for the 'real' README.
+#
+#
+
+smake -d init mf checkdepend all install
+
+exit 0
+
+"configure" is no longer in the repository because it's built from
+"configure.in", and it's really annoying to keep checking it in only
+to realize that you don't understand the changes because they're all
+autoconf spew.
+
+to build configure:
+ sh SMakefile
+
+to build:
+ smake init all
+
+then, as admin (suid binaries on AFS)
+ smake -d install
+
+If you get the error 'can not find sources', make sure imap/imap.c is mode a+r.
+
+----
+To make a release:
+- make sure the version number is correct (Makefile.in, imap/version.h)
+- add upgrade notes to doc/install-upgrade.html
+- add changes to doc/changes.html
+- commit to repository
+- make dist
+
+- tag the CVS repository with cyrus-release-Major-Minor-Revision
+
+- announce to:
+ info-cyrus
+ comp.mail.imap
+ cyrus-announce
+ freshmeat.net
+
+- update cyrusimap.web.cmu.edu links to new version
+
+---
+to bring up a new Andrew Cyrus server:
+
+package.protos for:
+a) backend server
+
+%define cyrus21
+%define sasl2
+
+%define is_imap
+%define is_backend
+%define is_saslauthd
+%define usesvxfs
+
+%define multiple_lun
+
+%define hasuser.permits
+F /etc/user.permits
+%define hasroot.permits
+F /etc/root.permits
+
+%include /afs/andrew.cmu.edu/wsadmin/cyrus2/src/cyrus.proto
+
+b) frontend server
+
+%define cyrus21
+%define sasl2
+
+%define uses_readwrite
+
+%define wsadmin /afs/.andrew.cmu.edu/wsadmin
+
+%define is_imap
+%define is_saslauthd
+%define is_frontend
+
+%include /afs/andrew.cmu.edu/wsadmin/cyrus2/src/cyrus.proto
+
+c) smtp server
+???? - Larry?
+
+----
+
+Repackage, Reboot, (and redepot/repackage again)
+
+- Key the machine (imap, lmtp, smtp, pop, and put them in /imap/conf/srvtab)
+ - remove the rcmd (and smtp?) key from /imap/conf/srvtab
+- frontends also need mupdate key
+- create k5 keys:
+/usr/local/etc/ktutil srv2key
+chgrp cyrus /etc/krb5.keytab
+chmod g+r /etc/krb5.keytab
+- Generate an SSL key for the machine and install to /imap/conf/server.pem
+ (preferrably signed correctly)
+
+Something like:
+mail-fe3:sun4x_58:/imap/conf# openssl req -new -x509 -nodes -out /imap/conf/serv
+er.pem -keyout /imap/conf/server.pem
+Using configuration from /usr/local/lib/openssl/openssl.cnf
+Generating a 1024 bit RSA private key
+............++++++
+..........++++++
+writing new private key to '/imap/conf/server.pem'
+-----
+You are about to be asked to enter information that will be incorporated
+into your certificate request.
+What you are about to enter is what is called a Distinguished Name or a DN.
+There are quite a few fields but you can leave some blank
+For some fields there will be a default value,
+If you enter '.', the field will be left blank.
+-----
+Country Name (2 letter code) [AU]:US
+State or Province Name (full name) [Some-State]:Pennsylvania
+Locality Name (eg, city) []:Pittsburgh
+Organization Name (eg, company) [Internet Widgits Pty Ltd]:Carnegie Mellon University
+Organizational Unit Name (eg, section) []:Andrew Systems Group
+Common Name (eg, YOUR name) []:mail-fe3.andrew.cmu.edu
+Email Address []:advisor at andrew.cmu.edu
+
+- is it a backend? run tools/mkimap (as cyrus!)
+
+----------------------------------------------------------------------
+
+To use Insure++
+ . uncomment appropriate lines from SMakefile
+ . copy psrc to /.psrc
+ . make sure environment variables HOME and (maybe) USER
+ are properly set
+ . mkdir /tmp/insure; chmod 777 /tmp/insure
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/SMakefile
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/SMakefile?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/SMakefile (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/SMakefile Sat Aug 26 02:00:13 2006
@@ -1,0 +1,125 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# This file is specific to Carnegie Mellon University's
+# software build process
+#
+# $Id: SMakefile,v 1.92.2.2 2004/06/02 19:58:27 ken3 Exp $
+#
+
+NEW_AUTOTOOLS=yes
+export NEW_AUTOTOOLS
+
+if test ! -x configure; then
+# -nt deeply upsets normal sh.
+# -o configure.in -nt configure
+# -o acconfig.h -nt configure -o SMakefile -nt configure; then
+ echo aclocal -I cmulocal
+ aclocal -I cmulocal
+ echo autoheader
+ autoheader
+ echo autoconf
+ autoconf
+fi
+
+MAKE=gmake
+
+if [ -r /.hostname ]; then
+ # probably an andrew machine
+ VER=`smake -D | sed 's;^.*\/;;'`
+else
+ # anonymous cvs?
+ VER="anoncvs"
+fi
+LOCALDEFS="-DEXTRA_IDENT=\\\"$VER\\\""
+
+# PERL CONFIGURATION
+PERL_MM_OPT="INSTALLPRIVLIB=${DESTDIR}/usr/local/lib/perl5 INSTALLARCHLIB=${DESTDIR}/usr/local/lib/perl5/5.6.1 INSTALLSITELIB=${DESTDIR}/usr/local/lib/perl5/site_perl/5.6.1 INSTALLSITEARCH=${DESTDIR}/usr/local/lib/perl5/site_perl/5.6.1 INSTALLBIN=${DESTDIR}/usr/local/bin INSTALLSCRIPT=${DESTDIR}/usr/local/bin INSTALLMAN1DIR=${DESTDIR}/usr/local/man/man1 INSTALLMAN3DIR=${DESTDIR}/usr/local/man/man3"
+export PERL_MM_OPT
+# end perl configuration
+
+# Let's just assume we are using gcc...
+if test "${WASH_CYRUS_INSURE}" = "t"; then
+ CC="insure"
+ CFLAGS="-g"
+else
+ CC="gcc"
+ CFLAGS="${CFLAGS} -O3 -g -Wall -W"
+fi
+
+if test "${WASH_CYRUS_DEBUG}" = "t"; then
+ CC="gcc"
+ CFLAGS="-g"
+ LDFLAGS="${LDFLAGS}"
+ DEBUG="--enable-debug"
+fi
+
+case `uname` in
+ Linux)
+ LDFLAGS="${LDFLAGS}"
+ LIBS="-lnsl" # for libwrap
+ ;;
+ SunOS)
+ LDFLAGS="${LDFLAGS} -L/usr/local/lib -Wl,-R,/usr/local/lib"
+ LIBS="-lkstat -ldoor"
+ ;;
+ *)
+ CC=cc
+ ;;
+esac
+
+
+# settings; we have to disable these on some platforms
+DEBUG=""
+WITHAUTH="--with-auth=pts --enable-krb5afspts --without-krbdes"
+SSL_CONFIG="--with-openssl=/usr/local/lib"
+
+# the defaults are good enough for us
+DB_CONFIG=""
+
+# the following is for staticly linking SASL only
+SASL_CONFIG="--with-staticsasl=/usr/local --with-gssapi=/usr/local"
+KRB_CONFIG="--enable-statickrb --with-krb=/usr/local"
+FEATURE_CONFIG="--enable-murder --enable-cmulocal"
+EXT_PACKAGE_CONFIG="--with-inn=/usr/news --with-ucdsnmp=/usr/local"
+
+MFCOMMAND="./configure $WITHAUTH $KRB_CONFIG $DB_CONFIG --enable-experiment --with-cyrus-group=staff $FEATURE_CONFIG $EXT_PACKAGE_CONFIG $SASL_CONFIG $DEBUG"
+
+export CFLAGS CC VER LNCOMMAND LOCALDEFS LDFLAGS
+export LIBS
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/aclocal.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/aclocal.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/aclocal.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/aclocal.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,23 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_include([cmulocal/berkdb.m4])
+m4_include([cmulocal/bsd_sockets.m4])
+m4_include([cmulocal/c-attribute.m4])
+m4_include([cmulocal/c-fpic.m4])
+m4_include([cmulocal/common.m4])
+m4_include([cmulocal/cyrus.m4])
+m4_include([cmulocal/ipv6.m4])
+m4_include([cmulocal/libwrap.m4])
+m4_include([cmulocal/sasl2.m4])
+m4_include([cmulocal/ucdsnmp.m4])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.0
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.0?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.0 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.0 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,19309 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.59.
+@%:@
+@%:@ Copyright (C) 2003 Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="imap/imapd.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAKEDEPEND cyrus_prefix service_path cyrus_user cyrus_group CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP AWK LIB@&t at OBJS LIB_SOCKET IPV6_OBJS PRE_SUBDIRS EXTRA_SUBDIRS DEPLIBS LOCALDEFS BDB_INC BDB_LIB CYRUSDB_OBJS SIEVE_OBJS SIEVE_LIBS SIEVE_CPPFLAGS YACC LEX LEXLIB LEX_OUTPUT_ROOT SIEVE_SUBDIRS WITH_NONBLOCK WITH_GMTOFF WITH_MAP WITH_LOCK cyrus_sigveclib AFS_LIBS AFS_LDFLAGS LDAP_CPPFLAGS LDAP_LDFLAGS LDAP_LIBS SERVER_SUBDIRS OPENSSL_INC OPENSSL_LIB ZEPHYR_LIBS ZEPHYR_CPPFLAGS IMAP_PROGS COMPILE_ET COM_ERR_LIBS COM_ERR_LDFLAGS COM_ERR_CPPFLAGS LIB_CRYPT GSSAPI_LIBS GSSAPIBASE_LIBS LIB_DYN_SASL DYNSASLFLAGS LIB_SASL SASLFLAGS PERL PERL_CCCDLFLAGS MD5OBJ SNMP_SUBDIRS CMU_LIB_SUBDIR LIB_WRAP SNMP_CONFIG LIB_UCDSNMP LIB_RT IMAP_COM_ERR_LIBS IMAP_LIBS PERL_SUBDIRS PERL_DEPSUBDIRS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-sieve disable Sieve support
+ --enable-krb5afspts compile afskrb PTS module with krb5 support
+ --disable-server disable compiling servers
+ --enable-statickrb link Kerberos statically
+ --enable-idled enable IMAP idled support
+ --enable-nntp enable NNTP support
+ --enable-murder enable IMAP Murder support
+ --enable-replication enable replication support (experimental)
+ --enable-cmulocal enable CMU-specific local support
+ --enable-oldsievename enable the use of 'imap' as the sieve service name
+ --enable-listext enable IMAP List extensions
+ --enable-netscapehack enable Netscape hack for the menu option
+ in Communicator to Administrate Mail
+ --enable-gssapi=<DIR> enable GSSAPI authentication [yes]
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-extraident=STRING use STRING as extra version information
+
+ --with-cyrus-prefix=DIR use DIR as cyrus server install directory
+ --with-service-path=DIR use DIR as service install directory
+ --with-cyrus-user=USERID use USERID cyrus userid
+ --with-cyrus-group=GROUPID use GROUPID cyrus group
+ --with-bdb=DIR use Berkeley DB (in DIR) [yes]
+ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR
+ --with-bdb-incdir=DIR Berkeley DB include files are in DIR
+ --with-lock=METHOD force use of METHOD for locking (flock or fcntl)
+ --with-afs=PATH use AFS libraries from PATH
+ --with-ldap=DIR use LDAP (in DIR) (experimental) /usr/local
+ --with-krb=PATH use Kerberos from PATH
+ --with-krbimpl=\kth|mit\ assume Kerberos 4 from KTH or MIT
+ --with-krbdes use Kerberos DES implementation [yes]
+ --with-openssl=PATH use OpenSSL from PATH
+ --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
+ for systems without /dev/urandom
+ --with-zephyr=PATH enable Zephyr notification (installed on PATH)
+ --with-pidfile=PATH pidfile in PATH (/var/run/cyrus-master.pid)
+ --with-com_err=PATH use com_err from path -- includes in PATH/include,
+ libs in PATH/lib, and compile_et in PATH/bin
+ --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6)
+ --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
+ choose specific GSSAPI implementation [[auto]]
+ --with-sasl=DIR Compile with libsasl2 in <DIR>
+ --with-staticsasl=DIR Compile with staticly linked libsasl2 in <DIR>
+ --with-perl=PERL use PERL for perl
+ --with-lib-subdir=DIR Find libraries in DIR instead of lib
+ --with-libwrap=DIR use libwrap (rooted in DIR) yes
+ --with-snmp=DIR use ucd|net snmp (rooted in DIR) yes
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+@%:@@%:@ ------------- @%:@@%:@
+@%:@@%:@ Output files. @%:@@%:@
+@%:@@%:@ ------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h"
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+
+# Check whether --with-extraident or --without-extraident was given.
+if test "${with_extraident+set}" = set; then
+ withval="$with_extraident"
+
+cat >>confdefs.h <<_ACEOF
+@%:@define EXTRA_IDENT "$withval"
+_ACEOF
+
+fi;
+
+# Extract the first word of "makedepend", so it can be a program name with args.
+set dummy makedepend; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEDEPEND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKEDEPEND"; then
+ ac_cv_prog_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MAKEDEPEND="makedepend"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_MAKEDEPEND" && ac_cv_prog_MAKEDEPEND="`cd ${srcdir};pwd`/tools/not-mkdep"
+fi
+fi
+MAKEDEPEND=$ac_cv_prog_MAKEDEPEND
+if test -n "$MAKEDEPEND"; then
+ echo "$as_me:$LINENO: result: $MAKEDEPEND" >&5
+echo "${ECHO_T}$MAKEDEPEND" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "$MAKEDEPEND" != "makedepend"; then
+ { echo "$as_me:$LINENO: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&5
+echo "$as_me: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&2;}
+fi
+
+
+# Check whether --with-login or --without-login was given.
+if test "${with_login+set}" = set; then
+ withval="$with_login"
+ { { echo "$as_me:$LINENO: error: --with-login is no longer supported.
+Configure SASL appropriately instead." >&5
+echo "$as_me: error: --with-login is no longer supported.
+Configure SASL appropriately instead." >&2;}
+ { (exit 1); exit 1; }; }
+fi;
+
+
+# Check whether --with-cyrus-prefix or --without-cyrus-prefix was given.
+if test "${with_cyrus_prefix+set}" = set; then
+ withval="$with_cyrus_prefix"
+ cyrus_prefix="$withval"
+else
+ cyrus_prefix="/usr/cyrus"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define CYRUS_PATH "$cyrus_prefix"
+_ACEOF
+
+
+# Check whether --with-service-path or --without-service-path was given.
+if test "${with_service_path+set}" = set; then
+ withval="$with_service_path"
+ service_path="$withval"
+else
+ service_path="$cyrus_prefix/bin"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SERVICE_PATH "$service_path"
+_ACEOF
+
+
+# Check whether --with-cyrus-user or --without-cyrus-user was given.
+if test "${with_cyrus_user+set}" = set; then
+ withval="$with_cyrus_user"
+ cyrus_user="$withval"
+else
+ cyrus_user="cyrus"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define CYRUS_USER "$cyrus_user"
+_ACEOF
+
+
+# Check whether --with-cyrus-group or --without-cyrus-group was given.
+if test "${with_cyrus_group+set}" = set; then
+ withval="$with_cyrus_group"
+ cyrus_group="$withval"
+else
+ cyrus_group="mail"
+fi;
+
+
+if test $sysconfdir = '${prefix}/etc'; then
+ sysconfdir="/etc"
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SYSCONFDIR "$sysconfdir"
+_ACEOF
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $@%:@ != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+@%:@ifndef __cplusplus
+ choke me
+@%:@endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+@%:@include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+
+echo "$as_me:$LINENO: checking for AIX" >&5
+echo $ECHO_N "checking for AIX... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef _AIX
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+@%:@define _ALL_SOURCE 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest*
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for long file names" >&5
+echo $ECHO_N "checking for long file names... $ECHO_C" >&6
+if test "${ac_cv_sys_long_file_names+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+# . the current directory, where building will happen
+# $prefix/lib where we will be installing things
+# $exec_prefix/lib likewise
+# eval it to expand exec_prefix.
+# $TMPDIR if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+# /tmp where it might want to write temporary files
+# /var/tmp likewise
+# /usr/tmp likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+ ac_tmpdirs=$TMPDIR
+else
+ ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+ test -d $ac_dir || continue
+ test -w $ac_dir || continue # It is less confusing to not echo anything here.
+ ac_xdir=$ac_dir/cf$$
+ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
+ ac_tf1=$ac_xdir/conftest9012345
+ ac_tf2=$ac_xdir/conftest9012346
+ (echo 1 >$ac_tf1) 2>/dev/null
+ (echo 2 >$ac_tf2) 2>/dev/null
+ ac_val=`cat $ac_tf1 2>/dev/null`
+ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+ ac_cv_sys_long_file_names=no
+ rm -rf $ac_xdir 2>/dev/null
+ break
+ fi
+ rm -rf $ac_xdir 2>/dev/null
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
+if test $ac_cv_sys_long_file_names = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LONG_FILE_NAMES 1
+_ACEOF
+
+fi
+
+if test $ac_cv_sys_long_file_names = no; then
+ { { echo "$as_me:$LINENO: error: The Cyrus IMAPD requires support for long file names" >&5
+echo "$as_me: error: The Cyrus IMAPD requires support for long file names" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+echo "$as_me:$LINENO: checking for long long int" >&5
+echo $ECHO_N "checking for long long int... $ECHO_C" >&6
+if test "${ac_cv_type_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long long int *) 0)
+ return 0;
+if (sizeof (long long int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long_long_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_long_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
+
+echo "$as_me:$LINENO: checking size of long long int" >&5
+echo $ECHO_N "checking size of long long int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long_long_int" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_long_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long long int)); }
+unsigned long ulongval () { return (long) (sizeof (long long int)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long long int))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long long int))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long long int))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long_long_int=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long_long_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for unsigned long long int" >&5
+echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((unsigned long long int *) 0)
+ return 0;
+if (sizeof (unsigned long long int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
+
+echo "$as_me:$LINENO: checking size of unsigned long long int" >&5
+echo $ECHO_N "checking size of unsigned long long int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_unsigned_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_unsigned_long_long_int" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_unsigned_long_long_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (unsigned long long int)); }
+unsigned long ulongval () { return (long) (sizeof (unsigned long long int)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (unsigned long long int))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (unsigned long long int))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (unsigned long long int))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_unsigned_long_long_int=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_unsigned_long_long_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long_int" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int
+_ACEOF
+
+
+if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \
+ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LONG_LONG_INT
+_ACEOF
+
+ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+fi
+
+
+echo "$as_me:$LINENO: checking for __attribute__" >&5
+echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6
+if test "${ac_cv___attribute__+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+
+int
+main ()
+{
+
+static void foo(void) __attribute__ ((noreturn));
+
+static void
+foo(void)
+{
+ exit(1);
+}
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv___attribute__=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv___attribute__=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$ac_cv___attribute__" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE___ATTRIBUTE__ 1
+_ACEOF
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
+echo "${ECHO_T}$ac_cv___attribute__" >&6
+
+
+echo "$as_me:$LINENO: checking if compiler supports -fPIC" >&5
+echo $ECHO_N "checking if compiler supports -fPIC... $ECHO_C" >&6
+if test "${ac_cv_fpic+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+save_CFLAGS=$CFLAGS
+CFLAGS="${CFLAGS} -fPIC"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+
+int
+main ()
+{
+
+static void
+foo(void)
+{
+ exit(1);
+}
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_fpic=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_fpic=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS=$save_CFLAGS
+
+fi
+
+if test "$ac_cv_fpic" = "yes"; then
+ FPIC_CFLAGS="-fPIC"
+else
+ FPIC_CFLAGS=""
+fi
+echo "$as_me:$LINENO: result: $ac_cv_fpic" >&5
+echo "${ECHO_T}$ac_cv_fpic" >&6
+
+
+
+ # CMU GUESS RUNPATH SWITCH
+ echo "$as_me:$LINENO: checking for runpath switch" >&5
+echo $ECHO_N "checking for runpath switch... $ECHO_C" >&6
+if test "${andrew_runpath_switch+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # first, try -R
+ SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-R /usr/lib"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ andrew_runpath_switch="-R"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ LDFLAGS="-Wl,-rpath,/usr/lib"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ andrew_runpath_switch="-Wl,-rpath,"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+andrew_runpath_switch="none"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="${SAVE_LDFLAGS}"
+
+fi
+echo "$as_me:$LINENO: result: $andrew_runpath_switch" >&5
+echo "${ECHO_T}$andrew_runpath_switch" >&6
+
+
+
+
+
+for ac_header in unistd.h sys/select.h sys/param.h stdarg.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+for ac_func in memmove strcasecmp ftruncate strerror
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case $LIB@&t at OBJS in
+ "$ac_func.$ac_objext" | \
+ *" $ac_func.$ac_objext" | \
+ "$ac_func.$ac_objext "* | \
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIB@&t at OBJS="$LIB@&t at OBJS $ac_func.$ac_objext" ;;
+esac
+
+fi
+done
+
+
+
+
+for ac_func in strlcat strlcpy
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+else
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+fi
+
+
+
+ save_LIBS="$LIBS"
+ LIB_SOCKET=""
+ echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+if test $ac_cv_func_connect = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ LIB_SOCKET="-lnsl $LIB_SOCKET"
+fi
+
+ echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+int
+main ()
+{
+connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
+if test $ac_cv_lib_socket_connect = yes; then
+ LIB_SOCKET="-lsocket $LIB_SOCKET"
+fi
+
+
+fi
+
+ LIBS="$LIB_SOCKET $save_LIBS"
+ echo "$as_me:$LINENO: checking for res_search" >&5
+echo $ECHO_N "checking for res_search... $ECHO_C" >&6
+if test "${ac_cv_func_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define res_search innocuous_res_search
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char res_search (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef res_search
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_res_search) || defined (__stub___res_search)
+choke me
+#else
+char (*f) () = res_search;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != res_search;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
+echo "${ECHO_T}$ac_cv_func_res_search" >&6
+if test $ac_cv_func_res_search = yes; then
+ :
+else
+ LIBS="-lresolv $LIB_SOCKET $save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#ifdef HAVE_ARPA_NAMESER_COMPAT_H
+#include <arpa/nameser_compat.h>
+#endif
+#include <resolv.h>
+int
+main ()
+{
+
+const char host[12]="openafs.org";
+u_char ans[1024];
+res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
+return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ LIB_SOCKET="-lresolv $LIB_SOCKET"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ LIBS="$LIB_SOCKET $save_LIBS"
+
+
+for ac_func in dn_expand dns_lookup
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$save_LIBS"
+
+
+LIBS="$LIBS ${LIB_SOCKET}"
+
+cyrus_cv_getaddrinfo=yes
+
+echo "$as_me:$LINENO: checking for getaddrinfo" >&5
+echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
+if test "${ac_cv_func_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define getaddrinfo innocuous_getaddrinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getaddrinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef getaddrinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
+choke me
+#else
+char (*f) () = getaddrinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getaddrinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
+if test $ac_cv_func_getaddrinfo = yes; then
+ ac_cv_lib_socket_getaddrinfo=no
+ ac_cv_lib_inet6_getaddrinfo=no
+
+else
+ echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
+echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6
+if test $ac_cv_lib_socket_getaddrinfo = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getaddrinfo=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getaddrinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
+echo $ECHO_N "checking for getaddrinfo in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_getaddrinfo" >&6
+if test $ac_cv_lib_inet6_getaddrinfo = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_getaddrinfo=no
+if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
+ -o $ac_cv_lib_inet6_getaddrinfo = yes
+then
+ ipv6_cv_getaddrinfo=yes
+fi
+if test $ipv6_cv_getaddrinfo = no; then
+ if test getaddrinfo = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}getaddrinfo... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}getaddrinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}getaddrinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}getaddrinfo) || defined (__stub___${ipv6_cv_pfx}getaddrinfo)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}getaddrinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}getaddrinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_getaddrinfo=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_getaddrinfo = yes; then
+
+echo "$as_me:$LINENO: checking for gai_strerror" >&5
+echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6
+if test "${ac_cv_func_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define gai_strerror to an innocuous variant, in case <limits.h> declares gai_strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define gai_strerror innocuous_gai_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gai_strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gai_strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gai_strerror) || defined (__stub___gai_strerror)
+choke me
+#else
+char (*f) () = gai_strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gai_strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_func_gai_strerror" >&6
+if test $ac_cv_func_gai_strerror = yes; then
+ ac_cv_lib_socket_gai_strerror=no
+ ac_cv_lib_inet6_gai_strerror=no
+
+else
+ echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
+echo $ECHO_N "checking for gai_strerror in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+int
+main ()
+{
+gai_strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_gai_strerror" >&6
+if test $ac_cv_lib_socket_gai_strerror = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_gai_strerror=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_gai_strerror=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
+echo $ECHO_N "checking for gai_strerror in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+int
+main ()
+{
+gai_strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_gai_strerror" >&6
+if test $ac_cv_lib_inet6_gai_strerror = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_gai_strerror=no
+if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \
+ -o $ac_cv_lib_inet6_gai_strerror = yes
+then
+ ipv6_cv_gai_strerror=yes
+fi
+if test $ipv6_cv_gai_strerror = no; then
+ if test gai_strerror = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}gai_strerror... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}gai_strerror to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}gai_strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}gai_strerror innocuous_${ipv6_cv_pfx}gai_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}gai_strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}gai_strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}gai_strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}gai_strerror) || defined (__stub___${ipv6_cv_pfx}gai_strerror)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}gai_strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}gai_strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_gai_strerror=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_gai_strerror = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+
+else
+ cyrus_cv_getaddrinfo=no
+fi
+else
+ cyrus_cv_getaddrinfo=no
+fi
+
+if test $cyrus_cv_getaddrinfo = no; then
+ IPV6_OBJS="getaddrinfo.o"
+fi
+
+cyrus_cv_getnameinfo=yes
+
+echo "$as_me:$LINENO: checking for getnameinfo" >&5
+echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6
+if test "${ac_cv_func_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define getnameinfo innocuous_getnameinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getnameinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef getnameinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo)
+choke me
+#else
+char (*f) () = getnameinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getnameinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6
+if test $ac_cv_func_getnameinfo = yes; then
+ ac_cv_lib_socket_getnameinfo=no
+ ac_cv_lib_inet6_getnameinfo=no
+
+else
+ echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
+echo $ECHO_N "checking for getnameinfo in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+int
+main ()
+{
+getnameinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_getnameinfo" >&6
+if test $ac_cv_lib_socket_getnameinfo = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getnameinfo=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getnameinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
+echo $ECHO_N "checking for getnameinfo in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+int
+main ()
+{
+getnameinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_getnameinfo" >&6
+if test $ac_cv_lib_inet6_getnameinfo = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_getnameinfo=no
+if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
+ -o $ac_cv_lib_inet6_getnameinfo = yes
+then
+ ipv6_cv_getnameinfo=yes
+fi
+if test $ipv6_cv_getnameinfo = no; then
+ if test getnameinfo = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}getnameinfo... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}getnameinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}getnameinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}getnameinfo) || defined (__stub___${ipv6_cv_pfx}getnameinfo)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}getnameinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}getnameinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_getnameinfo=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_getnameinfo = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETNAMEINFO
+_ACEOF
+
+else
+ cyrus_cv_getnameinfo=no
+fi
+
+if test $cyrus_cv_getnameinfo = no; then
+ IPV6_OBJS="$IPV6_OBJS getnameinfo.o"
+fi
+
+
+echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
+echo $ECHO_N "checking whether you have ss_family in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ipv6_cv_ss_family+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+struct sockaddr_storage ss; int i = ss.ss_family;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ipv6_cv_ss_family=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ipv6_cv_ss_family=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if test $ipv6_cv_ss_family = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SS_FAMILY
+_ACEOF
+
+else
+ :
+fi
+echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
+echo "${ECHO_T}$ipv6_cv_ss_family" >&6
+
+echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
+echo $ECHO_N "checking whether you have sa_len in struct sockaddr... $ECHO_C" >&6
+if test "${ipv6_cv_sa_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+struct sockaddr sa; int i = sa.sa_len;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ipv6_cv_sa_len=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ipv6_cv_sa_len=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if test $ipv6_cv_sa_len = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SOCKADDR_SA_LEN
+_ACEOF
+
+else
+ :
+fi
+echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
+echo "${ECHO_T}$ipv6_cv_sa_len" >&6
+
+
+
+
+for ac_header in sys/time.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm *tp; tp->tm_sec;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_struct_tm=time.h
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
+if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_tm_tm_zone=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_tm_tm_zone=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_tm_tm_zone=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6
+if test "${ac_cv_var_tzname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <time.h>
+#ifndef tzname /* For SGI. */
+extern char *tzname[]; /* RS6000 and others reject char **tzname. */
+#endif
+
+int
+main ()
+{
+atoi(*tzname);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_var_tzname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_tzname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+echo "${ECHO_T}$ac_cv_var_tzname" >&6
+ if test $ac_cv_var_tzname = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TZNAME 1
+_ACEOF
+
+ fi
+fi
+
+
+
+
+
+
+
+
+for ac_func in vprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+echo "$as_me:$LINENO: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
+if test "${ac_cv_func__doprnt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char _doprnt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+char (*f) () = _doprnt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != _doprnt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func__doprnt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func__doprnt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+if test $ac_cv_func__doprnt = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+
+
+CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o"
+
+
+
+# Check whether --with-bdb or --without-bdb was given.
+if test "${with_bdb+set}" = set; then
+ withval="$with_bdb"
+ with_bdb=$withval
+else
+ with_bdb="yes"
+fi;
+
+
+# Check whether --with-dbdir or --without-dbdir was given.
+if test "${with_dbdir+set}" = set; then
+ withval="$with_dbdir"
+ with_bdb=$withval
+fi;
+
+case "$with_bdb" in
+ no)
+ use_berkeley="no"
+ ;;
+ yes)
+ use_berkeley="yes"
+ with_bdb_lib=none
+ with_bdb_inc=none
+ ;;
+
+ *)
+ use_berkeley="yes"
+ with_bdb_lib="$with_bdb/lib"
+ with_bdb_inc="$with_bdb/include"
+ ;;
+esac
+
+if test "$use_berkeley" != "no"; then
+
+
+# Check whether --with-bdb-libdir or --without-bdb-libdir was given.
+if test "${with_bdb_libdir+set}" = set; then
+ withval="$with_bdb_libdir"
+ with_bdb_lib=$withval
+else
+ test "${with_bdb_lib+set}" = set || with_bdb_lib=none
+fi;
+
+# Check whether --with-bdb-incdir or --without-bdb-incdir was given.
+if test "${with_bdb_incdir+set}" = set; then
+ withval="$with_bdb_incdir"
+ with_bdb_inc=$withval
+else
+ test "${with_bdb_inc+set}" = set || with_bdb_inc=none
+fi;
+
+
+
+
+ cmu_save_CPPFLAGS=$CPPFLAGS
+
+ if test -d $with_bdb_inc; then
+ CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
+ BDB_INCADD="-I$with_bdb_inc"
+ else
+ BDB_INCADD=""
+ fi
+
+ if test "${ac_cv_header_db_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6
+if test "${ac_cv_header_db_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+echo "${ECHO_T}$ac_cv_header_db_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking db.h usability" >&5
+echo $ECHO_N "checking db.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <db.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking db.h presence" >&5
+echo $ECHO_N "checking db.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <db.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6
+if test "${ac_cv_header_db_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_db_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+echo "${ECHO_T}$ac_cv_header_db_h" >&6
+
+fi
+if test $ac_cv_header_db_h = yes; then
+
+ BDB_SAVE_LDFLAGS=$LDFLAGS
+
+ if test -d $with_bdb_lib; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_runpath_switch$with_bdb_lib"
+ fi
+
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
+ else
+ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_runpath_switch$with_bdb_lib"
+ fi
+
+ else
+ BDB_LIBADD=""
+ fi
+
+ saved_LIBS=$LIBS
+ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <db.h>
+int
+main ()
+{
+db_create(NULL, NULL, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+dblib="no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$dblib" = "berkeley"; then break; fi
+ done
+ if test "$dblib" = "no"; then
+ LIBS="$saved_LIBS -ldb"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <db.h>
+int
+main ()
+{
+db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+dblib="no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ LIBS=$saved_LIBS
+
+ LDFLAGS=$BDB_SAVE_LDFLAGS
+
+else
+ dblib="no"
+fi
+
+
+
+ CPPFLAGS=$cmu_save_CPPFLAGS
+
+
+ if test "$dblib" = "no"; then
+ { { echo "$as_me:$LINENO: error: Berkeley DB 3.x or later was not found. You may need to
+ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&5
+echo "$as_me: error: Berkeley DB 3.x or later was not found. You may need to
+ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$with_bdb_lib" != "none"; then
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L$with_bdb_lib $andrew_runpath_switch$with_bdb_lib ${LDFLAGS}"
+ fi
+
+ fi
+
+ BDB_INC=${BDB_INCADD}
+ BDB_LIB=${BDB_LIBADD}
+
+
+
+ LIBS="${LIBS} ${BDB_LIBADD}"
+ CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
+
+ CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o"
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_BDB
+_ACEOF
+
+fi
+
+
+
+
+SIEVE_SUBDIRS=""
+sievedir="sieve"
+# Check whether --enable-sieve or --disable-sieve was given.
+if test "${enable_sieve+set}" = set; then
+ enableval="$enable_sieve"
+ if test "$enableval" = no; then
+ sievedir="no"
+ fi
+fi;
+
+if test "$sievedir" != "no"; then
+ SIEVE_OBJS="lmtp_sieve.o smtpclient.o"
+
+ SIEVE_LIBS="../${sievedir}/libsieve.a"
+
+ SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir"
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define USE_SIEVE
+_ACEOF
+
+
+ for ac_prog in 'bison -y' byacc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_YACC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+ for ac_prog in flex lex
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LEX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+ echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+if test -z "$LEXLIB"
+then
+ echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_fl_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_yywrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+if test $ac_cv_lib_fl_yywrap = yes; then
+ LEXLIB="-lfl"
+else
+ echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+if test "${ac_cv_lib_l_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ll $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_l_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_l_yywrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+if test $ac_cv_lib_l_yywrap = yes; then
+ LEXLIB="-ll"
+fi
+
+fi
+
+fi
+
+if test "x$LEX" != "x:"; then
+ echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_root+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+cat >conftest.l <<_ACEOF
+%%
+%%
+_ACEOF
+{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+ (eval $LEX conftest.l) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+rm -f conftest.l
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS=$LIBS
+LIBS="$LIBS $LEXLIB"
+cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_lex_yytext_pointer=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define YYTEXT_POINTER 1
+_ACEOF
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for main in -lfl" >&5
+echo $ECHO_N "checking for main in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_fl_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_main" >&6
+if test $ac_cv_lib_fl_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBFL 1
+_ACEOF
+
+ LIBS="-lfl $LIBS"
+
+fi
+
+
+ echo "$as_me:$LINENO: checking for library containing regcomp" >&5
+echo $ECHO_N "checking for library containing regcomp... $ECHO_C" >&6
+if test "${ac_cv_search_regcomp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_regcomp=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char regcomp ();
+int
+main ()
+{
+regcomp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_regcomp="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_regcomp" = no; then
+ for ac_lib in rx regex; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char regcomp ();
+int
+main ()
+{
+regcomp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_regcomp="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_regcomp" >&5
+echo "${ECHO_T}$ac_cv_search_regcomp" >&6
+if test "$ac_cv_search_regcomp" != no; then
+ test "$ac_cv_search_regcomp" = "none required" || LIBS="$ac_cv_search_regcomp $LIBS"
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define ENABLE_REGEX
+_ACEOF
+
+ if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for rxposix.h" >&5
+echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6
+if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
+echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking rxposix.h usability" >&5
+echo $ECHO_N "checking rxposix.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <rxposix.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking rxposix.h presence" >&5
+echo $ECHO_N "checking rxposix.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <rxposix.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: rxposix.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: rxposix.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: rxposix.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: rxposix.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: rxposix.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: rxposix.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for rxposix.h" >&5
+echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6
+if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_rxposix_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
+echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6
+
+fi
+if test $ac_cv_header_rxposix_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_RX
+_ACEOF
+
+fi
+
+
+fi
+
+
+
+ SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile"
+fi
+
+
+
+echo "$as_me:$LINENO: checking for strerror" >&5
+echo $ECHO_N "checking for strerror... $ECHO_C" >&6
+if test "${ac_cv_func_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define strerror innocuous_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_strerror) || defined (__stub___strerror)
+choke me
+#else
+char (*f) () = strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
+echo "${ECHO_T}$ac_cv_func_strerror" >&6
+if test $ac_cv_func_strerror = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAS_STRERROR
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define NEED_SYS_ERRLIST
+_ACEOF
+
+fi
+
+
+
+for ac_header in sys/resource.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in setrlimit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in getrlimit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+for ac_func in daemon setsid
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in shutdown
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/socket.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "socklen_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SOCKLEN_T
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/socket.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sockaddr_storage" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STRUCT_SOCKADDR_STORAGE
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/resource.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "rlim_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_RLIM_T
+_ACEOF
+
+fi
+rm -f conftest*
+
+
+spt_type=""
+echo "$as_me:$LINENO: checking for setproctitle" >&5
+echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
+if test "${ac_cv_func_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define setproctitle innocuous_setproctitle
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setproctitle (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef setproctitle
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setproctitle ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setproctitle) || defined (__stub___setproctitle)
+choke me
+#else
+char (*f) () = setproctitle;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setproctitle;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
+echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
+if test $ac_cv_func_setproctitle = yes; then
+ spt_type=SPT_BUILTIN
+fi
+
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
+echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
+if test "${ac_cv_lib_util_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setproctitle ();
+int
+main ()
+{
+setproctitle ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_util_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_util_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
+echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
+if test $ac_cv_lib_util_setproctitle = yes; then
+ spt_type=SPT_BUILTIN
+ LIBS="${LIBS} -lutil"
+fi
+
+fi
+if test "$spt_type" = ""; then
+ if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
+echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/pstat.h usability" >&5
+echo $ECHO_N "checking sys/pstat.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sys/pstat.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/pstat.h presence" >&5
+echo $ECHO_N "checking sys/pstat.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sys/pstat.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/pstat.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/pstat.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/pstat.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
+echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_pstat_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6
+
+fi
+if test $ac_cv_header_sys_pstat_h = yes; then
+ spt_type=SPT_PSTAT
+fi
+
+
+fi
+if test "$spt_type" = ""; then
+ if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
+echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/sysnews.h usability" >&5
+echo $ECHO_N "checking sys/sysnews.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sys/sysnews.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/sysnews.h presence" >&5
+echo $ECHO_N "checking sys/sysnews.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sys/sysnews.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/sysnews.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/sysnews.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
+echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_sysnews_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6
+
+fi
+if test $ac_cv_header_sys_sysnews_h = yes; then
+ spt_type=SPT_SYSMIPS
+fi
+
+
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
+echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_psstrings+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <machine/vmparam.h>
+#include <sys/exec.h>
+#ifndef PS_STRINGS
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_psstrings=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_psstrings=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_psstrings = yes; then
+ spt_type=SPT_PSSTRINGS
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_psstrings" >&5
+echo "${ECHO_T}$cyrus_cv_sys_psstrings" >&6
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for SCO" >&5
+echo $ECHO_N "checking for SCO... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_sco+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifndef _SCO_unix_
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_sco=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_sco=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_sco = yes; then
+ spt_type=SPT_SCO
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_sco" >&5
+echo "${ECHO_T}$cyrus_cv_sys_sco" >&6
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for setproctitle usability" >&5
+echo $ECHO_N "checking for setproctitle usability... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if defined(DGUX) || defined(_SEQUENT_) || defined(apollo)
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_setproctitle = no; then
+ spt_type=SPT_NONE
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_setproctitle" >&5
+echo "${ECHO_T}$cyrus_cv_sys_setproctitle" >&6
+fi
+if test "$spt_type" != ""; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SPT_TYPE $spt_type
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking nonblocking method" >&5
+echo $ECHO_N "checking nonblocking method... $ECHO_C" >&6
+if test "${cyrus_cv_sys_nonblock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/file.h>
+#include <fcntl.h>
+#ifndef FNDELAY
+#define FNDELAY O_NDELAY
+#endif
+int
+main ()
+{
+fcntl(0, F_GETFL, 0)&FNDELAY
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_sys_nonblock=fcntl
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cyrus_cv_sys_nonblock=ioctl
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+WITH_NONBLOCK=$cyrus_cv_sys_nonblock
+
+echo "$as_me:$LINENO: result: $WITH_NONBLOCK" >&5
+echo "${ECHO_T}$WITH_NONBLOCK" >&6
+
+echo "$as_me:$LINENO: checking timezone GMT offset method" >&5
+echo $ECHO_N "checking timezone GMT offset method... $ECHO_C" >&6
+if test "${cyrus_cv_struct_sys_gmtoff+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <time.h>
+int
+main ()
+{
+struct tm tm;
+tm.tm_gmtoff = 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_struct_sys_gmtoff=tm
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cyrus_cv_struct_sys_gmtoff=gmtime
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff
+
+echo "$as_me:$LINENO: result: $WITH_GMTOFF" >&5
+echo "${ECHO_T}$WITH_GMTOFF" >&6
+echo "$as_me:$LINENO: checking for shared mmap" >&5
+echo $ECHO_N "checking for shared mmap... $ECHO_C" >&6
+if test "${cyrus_cv_func_mmap_shared+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ cyrus_cv_func_mmap_shared=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+main() {
+char *base;
+int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
+if (fd == -1) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+, fd, 0L);
+if (base == (caddr_t)-1) exit(1);
+if (strncmp(base, "test", 4) != 0) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+if (strncmp(base+4, "test", 4) != 0) exit(1);
+exit(0);}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_func_mmap_shared=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cyrus_cv_func_mmap_shared=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_shared" >&5
+echo "${ECHO_T}$cyrus_cv_func_mmap_shared" >&6
+if test $cyrus_cv_func_mmap_shared = yes; then
+ WITH_MAP="shared"
+else
+echo "$as_me:$LINENO: checking for stupid shared mmap" >&5
+echo $ECHO_N "checking for stupid shared mmap... $ECHO_C" >&6
+if test "${cyrus_cv_func_mmap_stupidshared+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ cyrus_cv_func_mmap_stupidshared=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+main() {
+char *base;
+int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
+if (fd == -1) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+, fd, 0L);
+if (base == (caddr_t)-1) exit(1);
+if (strncmp(base, "test", 4) != 0) exit(1);
+lseek(fd, 0L, 0);
+if (write(fd, "xyzz", 4) != 4) exit(1);
+fsync(fd);
+if (strncmp(base, "xyzz", 4) != 0) exit(1);
+exit(0);}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_func_mmap_stupidshared=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cyrus_cv_func_mmap_stupidshared=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_stupidshared" >&5
+echo "${ECHO_T}$cyrus_cv_func_mmap_stupidshared" >&6
+if test $cyrus_cv_func_mmap_stupidshared = yes; then
+ WITH_MAP="stupidshared"
+else
+ { echo "$as_me:$LINENO: WARNING: *** This system does not have a working mmap()" >&5
+echo "$as_me: WARNING: *** This system does not have a working mmap()" >&2;}
+ { echo "$as_me:$LINENO: WARNING: *** Expect a considerable performance penalty" >&5
+echo "$as_me: WARNING: *** Expect a considerable performance penalty" >&2;}
+ WITH_MAP=nommap
+fi
+fi
+
+
+
+# Check whether --with-lock or --without-lock was given.
+if test "${with_lock+set}" = set; then
+ withval="$with_lock"
+ WITH_LOCK="$withval"
+else
+
+ echo "$as_me:$LINENO: checking for fcntl" >&5
+echo $ECHO_N "checking for fcntl... $ECHO_C" >&6
+if test "${ac_cv_func_fcntl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define fcntl to an innocuous variant, in case <limits.h> declares fcntl.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define fcntl innocuous_fcntl
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char fcntl (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef fcntl
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fcntl ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_fcntl) || defined (__stub___fcntl)
+choke me
+#else
+char (*f) () = fcntl;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != fcntl;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fcntl=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_fcntl=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fcntl" >&5
+echo "${ECHO_T}$ac_cv_func_fcntl" >&6
+if test $ac_cv_func_fcntl = yes; then
+ WITH_LOCK="fcntl"
+else
+
+ echo "$as_me:$LINENO: checking for flock" >&5
+echo $ECHO_N "checking for flock... $ECHO_C" >&6
+if test "${ac_cv_func_flock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define flock to an innocuous variant, in case <limits.h> declares flock.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define flock innocuous_flock
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char flock (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef flock
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char flock ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_flock) || defined (__stub___flock)
+choke me
+#else
+char (*f) () = flock;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != flock;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_flock=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_flock=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_flock" >&5
+echo "${ECHO_T}$ac_cv_func_flock" >&6
+if test $ac_cv_func_flock = yes; then
+ WITH_LOCK="flock"
+else
+
+ { { echo "$as_me:$LINENO: error: unable to detect locking method" >&5
+echo "$as_me: error: unable to detect locking method" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
+
+fi;
+
+
+
+LIB_RT=""
+echo "$as_me:$LINENO: checking for fdatasync" >&5
+echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
+if test "${ac_cv_func_fdatasync+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define fdatasync to an innocuous variant, in case <limits.h> declares fdatasync.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define fdatasync innocuous_fdatasync
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char fdatasync (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef fdatasync
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fdatasync ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_fdatasync) || defined (__stub___fdatasync)
+choke me
+#else
+char (*f) () = fdatasync;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != fdatasync;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fdatasync=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_fdatasync=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fdatasync" >&5
+echo "${ECHO_T}$ac_cv_func_fdatasync" >&6
+if test $ac_cv_func_fdatasync = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_FDATASYNC
+_ACEOF
+
+else
+
+ echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
+echo $ECHO_N "checking for fdatasync in -lrt... $ECHO_C" >&6
+if test "${ac_cv_lib_rt_fdatasync+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fdatasync ();
+int
+main ()
+{
+fdatasync ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rt_fdatasync=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rt_fdatasync=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_fdatasync" >&6
+if test $ac_cv_lib_rt_fdatasync = yes; then
+
+ LIB_RT="-lrt"
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_FDATASYNC
+_ACEOF
+
+
+fi
+
+
+fi
+
+
+cant_find_sigvec=no
+if test "${cyrus_sigveclib+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ echo "$as_me:$LINENO: checking for sigvec" >&5
+echo $ECHO_N "checking for sigvec... $ECHO_C" >&6
+if test "${ac_cv_func_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define sigvec to an innocuous variant, in case <limits.h> declares sigvec.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define sigvec innocuous_sigvec
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sigvec (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef sigvec
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_sigvec) || defined (__stub___sigvec)
+choke me
+#else
+char (*f) () = sigvec;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sigvec;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sigvec" >&5
+echo "${ECHO_T}$ac_cv_func_sigvec" >&6
+if test $ac_cv_func_sigvec = yes; then
+
+ cyrus_sigveclib=""
+
+else
+
+ echo "$as_me:$LINENO: checking for sigvec in -lBSD" >&5
+echo $ECHO_N "checking for sigvec in -lBSD... $ECHO_C" >&6
+if test "${ac_cv_lib_BSD_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lBSD $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+int
+main ()
+{
+sigvec ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_BSD_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_BSD_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_sigvec" >&5
+echo "${ECHO_T}$ac_cv_lib_BSD_sigvec" >&6
+if test $ac_cv_lib_BSD_sigvec = yes; then
+ cyrus_sigveclib="-lBSD"
+else
+
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
+ echo "$as_me:$LINENO: checking for sigvec in -lucb" >&5
+echo $ECHO_N "checking for sigvec in -lucb... $ECHO_C" >&6
+if test "${ac_cv_lib_ucb_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lucb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+int
+main ()
+{
+sigvec ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ucb_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ucb_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_sigvec" >&5
+echo "${ECHO_T}$ac_cv_lib_ucb_sigvec" >&6
+if test $ac_cv_lib_ucb_sigvec = yes; then
+
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"
+else
+ cant_find_sigvec=yes
+fi
+
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+
+
+fi
+
+
+fi
+
+
+
+# ok, we still look for this stuff because of checking groups, but
+# all authentication goes through SASL
+
+
+# Check whether --with-afs or --without-afs was given.
+if test "${with_afs+set}" = set; then
+ withval="$with_afs"
+ with_afs="${withval}"
+else
+ with_afs="no"
+fi;
+
+
+# Check whether --with-ldap or --without-ldap was given.
+if test "${with_ldap+set}" = set; then
+ withval="$with_ldap"
+ with_ldap="${withval}"
+else
+ with_ldap="no"
+fi;
+
+# Check whether --enable-krb5afspts or --disable-krb5afspts was given.
+if test "${enable_krb5afspts+set}" = set; then
+ enableval="$enable_krb5afspts"
+ SASL_GSSAPI_LIBS_SET="yes"
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define AFSPTS_USE_KRB5
+_ACEOF
+
+fi;
+
+if test "x$with_afs" != "xno"; then
+ if test ! -d $with_afs; then
+ $with_afs=/usr/local
+ fi
+ CFLAGS="${CFLAGS} -I${with_afs}/include"
+ AFS_LIBS="${with_afs}/lib/afs/libkauth.a ${with_afs}/lib/afs/libprot.a ${with_afs}/lib/afs/libauth.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/librxkad.a ${with_afs}/lib/librx.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/libubik.a ${with_afs}/lib/liblwp.a ${with_afs}/lib/afs/util.a"
+ if test -f ${with_afs}/lib/afs/libaudit.a; then
+ AFS_LIBS="$AFS_LIBS ${with_afs}/lib/afs/libaudit.a"
+ fi
+ if test -f /usr/ucblib/libucb.a; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS}"
+ else
+ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS} $andrew_runpath_switch/usr/ucblib"
+ fi
+
+ AFS_LIBS="$AFS_LIBS -lc -lucb"
+ fi
+
+ if test "${cyrus_afs_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ SAVE_LIBS="$LIBS"
+ LIBS="${with_afs}/lib/liblwp.a"
+ echo "$as_me:$LINENO: checking if AFS libraries need sigvec" >&5
+echo $ECHO_N "checking if AFS libraries need sigvec... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+IOMGR_Initialize();
+int
+main ()
+{
+IOMGR_Initialize()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ cyrus_afs_sigvec="no"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cyrus_afs_sigvec="yes"
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test "$cyrus_afs_sigvec" = yes; then
+ if test "$cant_find_sigvec" = yes; then
+ { echo "$as_me:$LINENO: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&5
+echo "$as_me: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&2;}
+ else
+ AFS_LIBS="${AFS_LIBS} $cyrus_sigveclib"
+
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_AFSKRB
+_ACEOF
+
+ fi
+ else
+ AFS_LIBS="${AFS_LIBS}"
+
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_AFSKRB
+_ACEOF
+
+ fi
+ LIBS="$SAVE_LIBS"
+fi
+
+LDAP_CPPFLAGS=""
+LDAP_LDFLAGS=""
+LDAP_LIBS=""
+
+if test "x$with_ldap" != "xno"; then
+ if test ! -d $with_ldap; then
+ $with_ldap=/usr/local
+ fi
+
+ LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
+ LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib"
+ LDAP_LIBS=""
+
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS=$LDAP_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+ echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ldap_initialize ();
+int
+main ()
+{
+ldap_initialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_ldap_initialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ldap_ldap_initialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
+if test $ac_cv_lib_ldap_ldap_initialize = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LDAP
+_ACEOF
+
+
+
+
+ LDAP_LIBS="-lldap -llber"
+fi
+
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+ echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ldap_initialize ();
+int
+main ()
+{
+ldap_initialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_ldap_initialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ldap_ldap_initialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
+if test $ac_cv_lib_ldap_ldap_initialize = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LDAP
+_ACEOF
+
+
+
+
+ LDAP_LIBS="-lldap -llber"
+fi
+
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+fi
+
+if test "x$with_afs" != "xno" -o "x$with_ldap" != "xno"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile"
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_PTS
+_ACEOF
+
+fi
+
+
+
+SERVER_SUBDIRS="master imap"
+# Check whether --enable-server or --disable-server was given.
+if test "${enable_server+set}" = set; then
+ enableval="$enable_server"
+ if test "$enableval" = no; then
+ SERVER_SUBDIRS=""
+ fi
+fi;
+
+# We always output a server makefile (just because we can)
+
+
+# Check whether --with-krb or --without-krb was given.
+if test "${with_krb+set}" = set; then
+ withval="$with_krb"
+ with_krb="$withval"
+else
+ with_krb="no"
+fi;
+
+
+# Check whether --with-krbimpl or --without-krbimpl was given.
+if test "${with_krbimpl+set}" = set; then
+ withval="$with_krbimpl"
+ with_krbimpl="$withval"
+else
+ with_krbimpl="kth"
+fi;
+
+# Check whether --enable-statickrb or --disable-statickrb was given.
+if test "${enable_statickrb+set}" = set; then
+ enableval="$enable_statickrb"
+ with_statickrb="yes"
+else
+ with_statickrb="no"
+fi;
+
+
+
+echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBRESOLV 1
+_ACEOF
+
+ LIBS="-lresolv $LIBS"
+
+fi
+
+
+if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then
+ { { echo "$as_me:$LINENO: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&5
+echo "$as_me: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test "$with_krb" != "no"; then
+
+# Check whether --with-krbdes or --without-krbdes was given.
+if test "${with_krbdes+set}" = set; then
+ withval="$with_krbdes"
+ with_krbdes="$withval"
+else
+ with_krbdes="yes"
+fi;
+if test "$with_krbdes" = "yes"; then
+ echo "$as_me:$LINENO: checking for des_ecb_encrypt in -ldes" >&5
+echo $ECHO_N "checking for des_ecb_encrypt in -ldes... $ECHO_C" >&6
+if test "${ac_cv_lib_des_des_ecb_encrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char des_ecb_encrypt ();
+int
+main ()
+{
+des_ecb_encrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_des_des_ecb_encrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_des_des_ecb_encrypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_ecb_encrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_des_des_ecb_encrypt" >&6
+if test $ac_cv_lib_des_des_ecb_encrypt = yes; then
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$with_krb/lib/libdes.a"
+ else
+ KRB_LIBS="-ldes"
+ fi
+else
+ { { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
+echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+fi
+
+if test -d ${with_krb}; then
+ echo "$as_me:$LINENO: checking for Kerberos includes" >&5
+echo $ECHO_N "checking for Kerberos includes... $ECHO_C" >&6
+if test "${cyrus_krbinclude+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ for krbhloc in include/kerberosIV include
+ do
+ if test -f ${with_krb}/${krbhloc}/krb.h ; then
+ cyrus_krbinclude=${with_krb}/${krbhloc}
+ break
+ fi
+ done
+
+fi
+echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
+echo "${ECHO_T}$cyrus_krbinclude" >&6
+
+ if test -n "${cyrus_krbinclude}"; then
+ CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
+ fi
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L${with_krb}/lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L${with_krb}/lib $andrew_runpath_switch${with_krb}/lib ${LDFLAGS}"
+ fi
+
+fi
+
+if test "$with_krbimpl" != "kth"; then
+ KRBLIB="krb4"
+else
+ KRBLIB="krb"
+fi
+
+if test "$with_des" != no; then
+ if test "${ac_cv_header_krb_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking krb.h usability" >&5
+echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <krb.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking krb.h presence" >&5
+echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <krb.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_krb_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb_h" >&6
+
+fi
+if test $ac_cv_header_krb_h = yes; then
+ as_ac_Lib=`echo "ac_cv_lib_${KRBLIB}''_krb_mk_priv" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for krb_mk_priv in -l${KRBLIB}" >&5
+echo $ECHO_N "checking for krb_mk_priv in -l${KRBLIB}... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l${KRBLIB} $KRB_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb_mk_priv ();
+int
+main ()
+{
+krb_mk_priv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
+ else
+ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
+ fi
+else
+ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
+echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
+fi
+
+else
+ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
+echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
+fi
+
+
+else
+ { echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
+echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
+ krb4=no
+fi
+
+if test "${krb4}" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_KRB
+_ACEOF
+
+fi
+
+LIBS="$KRB_LIBS $LIBS"
+
+SASL_GSSAPI_LIBS_SET="yes"
+
+
+IMAP_PROGS=""
+
+# Check whether --with-openssl or --without-openssl was given.
+if test "${with_openssl+set}" = set; then
+ withval="$with_openssl"
+ with_openssl="${withval}"
+fi;
+
+OPENSSL_INC=
+OPENSSL_LIB=
+case "$with_openssl" in
+ no) with_openssl="no";;
+ ""|yes)
+ LIB_RSAREF=""
+ echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
+echo $ECHO_N "checking for RSAPublicEncrypt in -lrsaref... $ECHO_C" >&6
+if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrsaref $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char RSAPublicEncrypt ();
+int
+main ()
+{
+RSAPublicEncrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rsaref_RSAPublicEncrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rsaref_RSAPublicEncrypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6
+if test $ac_cv_lib_rsaref_RSAPublicEncrypt = yes; then
+ LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
+else
+ cmu_have_rsaref=no
+fi
+
+
+ with_openssl="yes"
+ echo "$as_me:$LINENO: checking for BIO_accept in -lcrypto" >&5
+echo $ECHO_N "checking for BIO_accept in -lcrypto... $ECHO_C" >&6
+if test "${ac_cv_lib_crypto_BIO_accept+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIB_RSAREF $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char BIO_accept ();
+int
+main ()
+{
+BIO_accept ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypto_BIO_accept=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypto_BIO_accept=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_BIO_accept" >&5
+echo "${ECHO_T}$ac_cv_lib_crypto_BIO_accept" >&6
+if test $ac_cv_lib_crypto_BIO_accept = yes; then
+ LIBS="-lcrypto $LIB_RSAREF ${LIBS}"
+else
+ with_openssl="no"
+fi
+
+ echo "$as_me:$LINENO: checking for SSL_CTX_new in -lssl" >&5
+echo $ECHO_N "checking for SSL_CTX_new in -lssl... $ECHO_C" >&6
+if test "${ac_cv_lib_ssl_SSL_CTX_new+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl -lcrypto $LIB_RSAREF $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char SSL_CTX_new ();
+int
+main ()
+{
+SSL_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ssl_SSL_CTX_new=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ssl_SSL_CTX_new=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_SSL_CTX_new" >&6
+if test $ac_cv_lib_ssl_SSL_CTX_new = yes; then
+ LIBS="-lssl ${LIBS}"
+else
+ with_openssl="no"
+fi
+
+
+ ;;
+ *) OPENSSL_INC="-I${with_openssl}/include"
+ OPENSSL_LIBPATH="${with_openssl}/lib"
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH}"
+ CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}"
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L${OPENSSL_LIBPATH} ${LDFLAGS}"
+ else
+ LDFLAGS="-L${OPENSSL_LIBPATH} $andrew_runpath_switch${OPENSSL_LIBPATH} ${LDFLAGS}"
+ fi
+
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB}"
+ else
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB} $andrew_runpath_switch${OPENSSL_LIBPATH}"
+ fi
+
+ LIBS="${LIBS} -lssl -lcrypto";;
+esac
+
+echo "$as_me:$LINENO: checking for openssl" >&5
+echo $ECHO_N "checking for openssl... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $with_openssl" >&5
+echo "${ECHO_T}$with_openssl" >&6
+
+if test "$with_openssl" != "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SSL
+_ACEOF
+
+ IMAP_PROGS="$IMAP_PROGS tls_prune"
+ if test "${krb4}" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define OPENSSL_ENABLE_OLD_DES_SUPPORT
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define OPENSSL_DES_LIBDES_COMPATIBILITY
+_ACEOF
+
+ fi
+fi
+
+
+
+
+# Check whether --with-egd-socket or --without-egd-socket was given.
+if test "${with_egd_socket+set}" = set; then
+ withval="$with_egd_socket"
+ EGD_SOCKET="$withval"
+
+fi;
+if test -n "$EGD_SOCKET" ; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define EGD_SOCKET "$EGD_SOCKET"
+_ACEOF
+
+fi
+
+
+# Check whether --with-zephyr or --without-zephyr was given.
+if test "${with_zephyr+set}" = set; then
+ withval="$with_zephyr"
+ with_zephyr="${withval}"
+fi;
+if test -z "$with_zephyr"; then
+ if test -f /usr/local/lib/libzephyr.a; then
+ with_zephyr="/usr/local"
+ elif test -f /usr/lib/libzephyr.a; then
+ with_zephyr="/usr"
+ fi
+fi
+ZEPHYR_LIBS=""
+ZEPHYR_CPPFLAGS=""
+case "$with_zephyr" in
+ no) true;;
+ ""|yes) echo "$as_me:$LINENO: checking for ZInitialize in -lzephyr" >&5
+echo $ECHO_N "checking for ZInitialize in -lzephyr... $ECHO_C" >&6
+if test "${ac_cv_lib_zephyr_ZInitialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lzephyr $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ZInitialize ();
+int
+main ()
+{
+ZInitialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_zephyr_ZInitialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_zephyr_ZInitialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitialize" >&5
+echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitialize" >&6
+if test $ac_cv_lib_zephyr_ZInitialize = yes; then
+ ZEPHYR_LIBS="-lzephyr"
+else
+ with_zephyr="no"
+fi
+;;
+ *) if test -d ${with_zephyr}/include/zephyr; then
+ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include/zephyr"
+ else
+ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include"
+ fi
+ ZEPHYR_LIBS="-lzephyr";;
+esac
+
+
+if test "$with_zephyr" != "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ZEPHYR
+_ACEOF
+
+fi
+
+
+# Check whether --with-pidfile or --without-pidfile was given.
+if test "${with_pidfile+set}" = set; then
+ withval="$with_pidfile"
+ MASTERPIDFILE="$withval"
+else
+ MASTERPIDFILE="/var/run/cyrus-master.pid"
+fi;
+MASTERPIDFILE="\"$MASTERPIDFILE\""
+
+cat >>confdefs.h <<_ACEOF
+@%:@define MASTER_PIDFILE $MASTERPIDFILE
+_ACEOF
+
+
+# Check whether --enable-idled or --disable-idled was given.
+if test "${enable_idled+set}" = set; then
+ enableval="$enable_idled"
+ if test "$enable_val" != no; then
+ IMAP_PROGS="$IMAP_PROGS idled"
+ fi
+fi;
+
+ENABLE_NNTP=no
+# Check whether --enable-nntp or --disable-nntp was given.
+if test "${enable_nntp+set}" = set; then
+ enableval="$enable_nntp"
+ ENABLE_NNTP=$enableval
+ if test "$ENABLE_NNTP" != no; then
+ IMAP_PROGS="$IMAP_PROGS nntpd fetchnews"
+ fi
+fi;
+
+ENABLE_MURDER=no
+# Check whether --enable-murder or --disable-murder was given.
+if test "${enable_murder+set}" = set; then
+ enableval="$enable_murder"
+ ENABLE_MURDER=$enableval
+fi;
+
+if test "$ENABLE_MURDER" != no; then
+ IMAP_PROGS="$IMAP_PROGS mupdate"
+ # for master/slave auto-selection
+
+for ac_header in sys/sockio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+fi
+
+ENABLE_REPLICATION=no
+# Check whether --enable-replication or --disable-replication was given.
+if test "${enable_replication+set}" = set; then
+ enableval="$enable_replication"
+ ENABLE_REPLICATION=$enableval
+ if test "$ENABLE_REPLICATION" != no; then
+ IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset make_md5"
+ fi
+fi;
+
+
+
+
+# Check whether --with-com_err or --without-com_err was given.
+if test "${with_com_err+set}" = set; then
+ withval="$with_com_err"
+
+fi;
+if test -z "$with_com_err"; then
+ # no value supplied
+ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
+echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
+if test "${ac_cv_lib_com_err_com_err+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcom_err $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char com_err ();
+int
+main ()
+{
+com_err ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_com_err_com_err=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_com_err_com_err=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
+echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
+if test $ac_cv_lib_com_err_com_err = yes; then
+
+ # com_err is already in library path
+ # guess we're okay
+ # can use system com_err
+ with_com_err=""
+ if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for et/com_err.h" >&5
+echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking et/com_err.h usability" >&5
+echo $ECHO_N "checking et/com_err.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <et/com_err.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking et/com_err.h presence" >&5
+echo $ECHO_N "checking et/com_err.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <et/com_err.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: et/com_err.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: et/com_err.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: et/com_err.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: et/com_err.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for et/com_err.h" >&5
+echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_et_com_err_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6
+
+fi
+if test $ac_cv_header_et_com_err_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ET_COM_ERR_H
+_ACEOF
+
+else
+ if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for com_err.h" >&5
+echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking com_err.h usability" >&5
+echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <com_err.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking com_err.h presence" >&5
+echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <com_err.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: com_err.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: com_err.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: com_err.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for com_err.h" >&5
+echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_com_err_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+
+fi
+if test $ac_cv_header_com_err_h = yes; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: cannot locate com_err.h" >&5
+echo "$as_me: error: cannot locate com_err.h" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+fi
+
+
+ # Extract the first word of "compile_et", so it can be a program name with args.
+set dummy compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+else
+
+ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
+ with_com_err="/usr/local"
+ # Extract the first word of "/usr/local/bin/compile_et", so it can be a program name with args.
+set dummy /usr/local/bin/compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
+ with_com_err="/usr"
+ # Extract the first word of "/usr/bin/compile_et", so it can be a program name with args.
+set dummy /usr/bin/compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ else
+ # use ours
+ with_com_err=yes
+ fi
+
+fi
+
+
+ if test "${with_com_err}" = "no"; then
+ { echo "$as_me:$LINENO: WARNING: com_err is required; included version will be used." >&5
+echo "$as_me: WARNING: com_err is required; included version will be used." >&2;}
+ with_com_err="yes"
+ fi
+ if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then
+ { echo "$as_me:$LINENO: WARNING: Parts of com_err distribuion were found, but not compile_et." >&5
+echo "$as_me: WARNING: Parts of com_err distribuion were found, but not compile_et." >&2;}
+ { echo "$as_me:$LINENO: WARNING: Will build com_err from included sources." >&5
+echo "$as_me: WARNING: Will build com_err from included sources." >&2;}
+ with_com_err="yes" # build it ourselves
+ fi
+fi
+
+case "$with_com_err" in
+ # built-in et
+ yes) # use the com_err we're gonna build
+ COM_ERR_LIBS="../et/libcom_err.a"
+ COMPILE_ET="../et/compile_et"
+ COM_ERR_LDFLAGS=""
+ COM_ERR_CPPFLAGS="-I\${top_srcdir}/et"
+ PRE_SUBDIRS="et ${PRE_SUBDIRS}"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} et/Makefile"
+ ;;
+ "") # no problem, we already have it in the paths
+ # we do nothing to pick it up
+ COM_ERR_LIBS="-lcom_err" # hope it's not shared
+ # we already set COMPILE_ET, or we didn't get here
+ COM_ERR_LDFLAGS=""
+ COM_ERR_CPPFLAGS=""
+ ;;
+ *) # use whatever they told us, or whatever we found
+ COMPILE_ET="${with_com_err}/bin/compile_et"
+ COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a"
+ COM_ERR_CPPFLAGS="-I${with_com_err}/include"
+ # Ever get the feeling people hide this stuff on purpose?
+ if test -d "${with_com_err}/include/et" ; then
+ COM_ERR_CPPFLAGS="-I${with_com_err}/include/et"
+ fi
+ COMPILE_ET="${with_com_err}/bin/compile_et"
+esac
+
+
+
+
+
+echo "$as_me:$LINENO: checking for modern syslog" >&5
+echo $ECHO_N "checking for modern syslog... $ECHO_C" >&6
+if test "${cyrus_cv_lib_syslog+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <syslog.h>
+#ifndef LOG_LOCAL6
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_lib_syslog=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_lib_syslog=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+if test $cyrus_cv_lib_syslog = no; then
+ PRE_SUBDIRS="${PRE_SUBDIRS} syslog"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile"
+ DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a"
+ CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog"
+fi
+echo "$as_me:$LINENO: result: $cyrus_cv_lib_syslog" >&5
+echo "${ECHO_T}$cyrus_cv_lib_syslog" >&6
+
+echo "$as_me:$LINENO: checking which syslog facility to use" >&5
+echo $ECHO_N "checking which syslog facility to use... $ECHO_C" >&6
+SYSLOG_FACILITY=LOG_LOCAL6
+
+# Check whether --with-syslogfacility or --without-syslogfacility was given.
+if test "${with_syslogfacility+set}" = set; then
+ withval="$with_syslogfacility"
+ if test "$withval" != "yes" -a "$withval" != "no" ; then
+ SYSLOG_FACILITY=LOG_$withval
+ fi;
+fi;
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SYSLOG_FACILITY $SYSLOG_FACILITY
+_ACEOF
+
+echo "$as_me:$LINENO: result: $SYSLOG_FACILITY" >&5
+echo "${ECHO_T}$SYSLOG_FACILITY" >&6
+
+
+for ac_func in getdtablesize
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case $LIB@&t at OBJS in
+ "$ac_func.$ac_objext" | \
+ *" $ac_func.$ac_objext" | \
+ "$ac_func.$ac_objext "* | \
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIB@&t at OBJS="$LIB@&t at OBJS $ac_func.$ac_objext" ;;
+esac
+
+fi
+done
+
+
+# Check whether --enable-cmulocal or --disable-cmulocal was given.
+if test "${enable_cmulocal+set}" = set; then
+ enableval="$enable_cmulocal"
+ if test "$enableval" = yes; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile"
+ fi
+fi;
+
+echo "$as_me:$LINENO: checking to use old sieve service name" >&5
+echo $ECHO_N "checking to use old sieve service name... $ECHO_C" >&6
+# Check whether --enable-oldsievename or --disable-oldsievename was given.
+if test "${enable_oldsievename+set}" = set; then
+ enableval="$enable_oldsievename"
+ if test "$enableval" = yes; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define OLD_SIEVE_SERVICE_NAME
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
+
+# Check whether --enable-listext or --disable-listext was given.
+if test "${enable_listext+set}" = set; then
+ enableval="$enable_listext"
+ if test "$enableval" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define ENABLE_LISTEXT
+_ACEOF
+
+ fi
+fi;
+
+# Check whether --enable-netscapehack or --disable-netscapehack was given.
+if test "${enable_netscapehack+set}" = set; then
+ enableval="$enable_netscapehack"
+ if test "$enableval" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define ENABLE_X_NETSCAPE_HACK
+_ACEOF
+
+ fi
+fi;
+
+echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ :
+else
+
+echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for crypt" >&5
+echo $ECHO_N "checking for crypt... $ECHO_C" >&6
+if test "${ac_cv_func_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define crypt innocuous_crypt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char crypt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef crypt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_crypt) || defined (__stub___crypt)
+choke me
+#else
+char (*f) () = crypt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != crypt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_crypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
+echo "${ECHO_T}$ac_cv_func_crypt" >&6
+if test $ac_cv_func_crypt = yes; then
+ cmu_have_crypt=yes
+else
+ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+int
+main ()
+{
+crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypt_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypt_crypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
+ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
+else
+ cmu_have_crypt=no
+fi
+
+fi
+
+
+
+
+
+# Check whether --enable-gssapi or --disable-gssapi was given.
+if test "${enable_gssapi+set}" = set; then
+ enableval="$enable_gssapi"
+ gssapi=$enableval
+else
+ gssapi=yes
+fi;
+
+# Check whether --with-gss_impl or --without-gss_impl was given.
+if test "${with_gss_impl+set}" = set; then
+ withval="$with_gss_impl"
+ gss_impl=$withval
+else
+ gss_impl=auto
+fi;
+
+if test "$gssapi" != no; then
+ platform=
+ case "${host}" in
+ *-*-linux*)
+ platform=__linux
+ ;;
+ *-*-hpux*)
+ platform=__hpux
+ ;;
+ *-*-irix*)
+ platform=__irix
+ ;;
+ *-*-solaris2*)
+# When should we use __sunos?
+ platform=__solaris
+ ;;
+ *-*-aix*)
+###_AIX
+ platform=__aix
+ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
+echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
+ if test "$gss_impl" = "cybersafe"; then
+ { { echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
+echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ ;;
+ esac
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+
+ if test -d ${gssapi}; then
+ CPPFLAGS="$CPPFLAGS -I$gssapi/include"
+# We want to keep -I in our CPPFLAGS, but only if we succeed
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+### I am not sure how useful is this (and whether this is required at all
+### especially when we have to provide two -L flags for new CyberSafe
+ LDFLAGS="$LDFLAGS -L$gssapi/lib"
+
+ if test -n "$platform"; then
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+ fi
+ fi
+ fi
+ if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for gssapi.h" >&5
+echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking gssapi.h usability" >&5
+echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <gssapi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking gssapi.h presence" >&5
+echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <gssapi.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for gssapi.h" >&5
+echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_gssapi_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
+
+fi
+if test $ac_cv_header_gssapi_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSSAPI_H
+_ACEOF
+
+else
+ if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
+echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
+echo $ECHO_N "checking gssapi/gssapi.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <gssapi/gssapi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
+echo $ECHO_N "checking gssapi/gssapi.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <gssapi/gssapi.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
+echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
+
+fi
+if test $ac_cv_header_gssapi_gssapi_h = yes; then
+ :
+else
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
+fi
+
+
+fi
+
+
+
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+fi
+
+if test "$gssapi" != no; then
+ # We need to find out which gssapi implementation we are
+ # using. Supported alternatives are: MIT Kerberos 5,
+ # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
+ # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
+ # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
+ #
+ # The choice is reflected in GSSAPIBASE_LIBS
+
+
+echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBRESOLV 1
+_ACEOF
+
+ LIBS="-lresolv $LIBS"
+
+fi
+
+ if test -d ${gssapi}; then
+ gssapi_dir="${gssapi}/lib"
+ GSSAPIBASE_LIBS="-L$gssapi_dir"
+ GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
+ else
+ # FIXME: This is only used for building cyrus, and then only as
+ # a real hack. it needs to be fixed.
+ gssapi_dir="/usr/local/lib"
+ fi
+
+ # Check a full link against the Heimdal libraries.
+ # If this fails, check a full link against the MIT libraries.
+ # If this fails, check a full link against the CyberSafe libraries.
+ # If this fails, check a full link against the Solaris 8 and up libgss.
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgssapi... $ECHO_C" >&6
+if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gssapi_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gssapi_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gssapi_gss_unwrap" >&6
+if test $ac_cv_lib_gssapi_gss_unwrap = yes; then
+ gss_impl="heimdal"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
+ # check for libkrb5support first
+ echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
+echo $ECHO_N "checking for krb5int_getspecific in -lkrb5support... $ECHO_C" >&6
+if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb5int_getspecific ();
+int
+main ()
+{
+krb5int_getspecific ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_krb5support_krb5int_getspecific=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_krb5support_krb5int_getspecific=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
+echo "${ECHO_T}$ac_cv_lib_krb5support_krb5int_getspecific" >&6
+if test $ac_cv_lib_krb5support_krb5int_getspecific = yes; then
+ K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
+fi
+
+
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgssapi_krb5... $ECHO_C" >&6
+if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gssapi_krb5_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gssapi_krb5_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6
+if test $ac_cv_lib_gssapi_krb5_gss_unwrap = yes; then
+ gss_impl="mit"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ # For Cybersafe one has to set a platform define in order to make compilation work
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+ cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
+# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
+ if test -d "${gssapi}/appsec-rt/lib"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
+ fi
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+
+ gss_failed=0
+
+# Check for CyberSafe with two libraries first, than fall back to a single
+# library (older CyberSafe)
+
+ unset ac_cv_lib_gss_csf_gss_acq_user
+ echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
+echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char csf_gss_acq_user ();
+int
+main ()
+{
+csf_gss_acq_user ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_csf_gss_acq_user=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_csf_gss_acq_user=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6
+if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
+ gss_impl="cybersafe03"
+else
+ unset ac_cv_lib_gss_csf_gss_acq_user;
+ echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
+echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char csf_gss_acq_user ();
+int
+main ()
+{
+csf_gss_acq_user ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_csf_gss_acq_user=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_csf_gss_acq_user=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6
+if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
+ gss_impl="cybersafe"
+else
+ gss_failed=1
+fi
+
+fi
+
+
+ if test "$gss_failed" = "1"; then
+# Restore variables
+ GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+ if test "$gss_impl" != "auto"; then
+ gss_impl="failed"
+ fi
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss -lgss $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_gss_unwrap" >&6
+if test $ac_cv_lib_gss_gss_unwrap = yes; then
+ gss_impl="seam"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "mit"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
+ elif test "$gss_impl" = "heimdal"; then
+ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
+ elif test "$gss_impl" = "cybersafe03"; then
+# Version of CyberSafe with two libraries
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "seam"; then
+ GSSAPIBASE_LIBS=-lgss
+ # there is no static libgss on Solaris 8 and up
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "failed"; then
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
+ else
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
+ fi
+fi
+
+#
+# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
+# in gssapi\rfckrb5.h
+#
+if test "$gssapi" != "no"; then
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_HOSTBASED_SERVICE
+ hostbased_service_gss_nt_yes
+ #endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+else
+ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
+echo "$as_me: WARNING: Cybersafe define not found" >&2;}
+fi
+rm -f conftest*
+
+
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+fi
+rm -f conftest*
+
+ fi
+
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_USER_NAME
+ user_name_yes_gss_nt
+ #endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+else
+ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
+echo "$as_me: WARNING: Cybersafe define not found" >&2;}
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+fi
+rm -f conftest*
+
+ fi
+fi
+
+GSSAPI_LIBS=""
+echo "$as_me:$LINENO: checking GSSAPI" >&5
+echo $ECHO_N "checking GSSAPI... $ECHO_C" >&6
+if test "$gssapi" != no; then
+ echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
+echo "${ECHO_T}with implementation ${gss_impl}" >&6
+ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
+fi
+
+ SASL_MECHS="$SASL_MECHS libgssapiv2.la"
+ SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
+ SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
+
+ cmu_save_LIBS="$LIBS"
+ LIBS="$LIBS $GSSAPIBASE_LIBS"
+
+for ac_func in gsskrb5_register_acceptor_identity
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$cmu_save_LIBS"
+else
+ echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6
+fi
+
+
+
+
+
+
+# Check whether --with-sasl or --without-sasl was given.
+if test "${with_sasl+set}" = set; then
+ withval="$with_sasl"
+ with_sasl="$withval"
+else
+ with_sasl="yes"
+fi;
+
+
+# Check whether --with-staticsasl or --without-staticsasl was given.
+if test "${with_staticsasl+set}" = set; then
+ withval="$with_staticsasl"
+ with_staticsasl="$withval";
+ if test $with_staticsasl != "no"; then
+ using_static_sasl="static"
+ fi
+else
+ with_staticsasl="no"; using_static_sasl="no"
+fi;
+
+SASLFLAGS=""
+LIB_SASL=""
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+cmu_saved_LDFLAGS=$LDFLAGS
+cmu_saved_LIBS=$LIBS
+
+if test ${with_staticsasl} != "no"; then
+ if test -d ${with_staticsasl}; then
+ if test -d ${with_staticsasl}/lib64 ; then
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib64
+ else
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ fi
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ ac_cv_sasl_where_inc=${with_staticsasl}/include
+
+ SASLFLAGS="-I$ac_cv_sasl_where_inc"
+ LIB_SASL="-L$ac_cv_sasl_where_lib"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+ else
+ with_staticsasl="/usr"
+ fi
+
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
+echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sasl/sasl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
+echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sasl/sasl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_sasl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+
+fi
+if test $ac_cv_header_sasl_sasl_h = yes; then
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
+echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sasl/saslutil.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
+echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sasl/saslutil.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+
+fi
+if test $ac_cv_header_sasl_saslutil_h = yes; then
+ for i42 in lib64 lib; do
+ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
+ ac_cv_found_sasl=yes
+ echo "$as_me:$LINENO: checking for static libsasl" >&5
+echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6
+ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
+ fi
+ done
+ if test ! "$ac_cv_found_sasl" = "yes"; then
+ echo "$as_me:$LINENO: checking for static libsasl" >&5
+echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6
+ { { echo "$as_me:$LINENO: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&5
+echo "$as_me: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+
+fi
+
+
+
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
+
+ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
+ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
+ else
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
+ fi
+fi
+
+if test -d ${with_sasl}; then
+ ac_cv_sasl_where_lib=${with_sasl}/lib
+ ac_cv_sasl_where_inc=${with_sasl}/include
+
+ DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
+ if test "$ac_cv_sasl_where_lib" != ""; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL}"
+ else
+ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
+ fi
+
+ fi
+ LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+fi
+
+# be sure to check for a SASLv2 specific function
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
+echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sasl/sasl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
+echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sasl/sasl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_sasl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+
+fi
+if test $ac_cv_header_sasl_sasl_h = yes; then
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
+echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sasl/saslutil.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
+echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sasl/saslutil.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+
+fi
+if test $ac_cv_header_sasl_saslutil_h = yes; then
+ echo "$as_me:$LINENO: checking for prop_get in -lsasl2" >&5
+echo $ECHO_N "checking for prop_get in -lsasl2... $ECHO_C" >&6
+if test "${ac_cv_lib_sasl2_prop_get+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsasl2 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char prop_get ();
+int
+main ()
+{
+prop_get ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sasl2_prop_get=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sasl2_prop_get=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_prop_get" >&5
+echo "${ECHO_T}$ac_cv_lib_sasl2_prop_get" >&6
+if test $ac_cv_lib_sasl2_prop_get = yes; then
+ ac_cv_found_sasl=yes
+else
+ ac_cv_found_sasl=no
+fi
+
+else
+ ac_cv_found_sasl=no
+fi
+
+
+else
+ ac_cv_found_sasl=no
+fi
+
+
+
+if test "$ac_cv_found_sasl" = "yes"; then
+ if test "$ac_cv_sasl_where_lib" != ""; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL}"
+ else
+ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
+ fi
+
+ fi
+ DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
+ if test "$using_static_sasl" != "static"; then
+ LIB_SASL=$DYNLIB_SASL
+ SASLFLAGS=$DYNSASLFLAGS
+ fi
+else
+ DYNLIB_SASL=""
+ DYNSASLFLAGS=""
+ using_static_sasl="staticonly"
+fi
+
+if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
+fi
+
+LIBS="$cmu_saved_LIBS"
+LDFLAGS="$cmu_saved_LDFLAGS"
+CPPFLAGS="$cmu_saved_CPPFLAGS"
+
+
+
+
+
+
+
+if test "$ac_cv_found_sasl" != "yes"; then
+ { { echo "$as_me:$LINENO: error: Cannot continue without libsasl2.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&5
+echo "$as_me: error: Cannot continue without libsasl2.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $SASLFLAGS"
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sasl/sasl.h>
+
+#ifndef SASL_VERSION_MAJOR
+#error SASL_VERSION_MAJOR not defined
+#endif
+#ifndef SASL_VERSION_MINOR
+#error SASL_VERSION_MINOR not defined
+#endif
+#ifndef SASL_VERSION_STEP
+#error SASL_VERSION_STEP not defined
+#endif
+
+#if SASL_VERSION_MAJOR < 2 || SASL_VERSION_MINOR < 1 || SASL_VERSION_STEP < 7
+#error SASL version is less than 2.1.7
+#endif
+
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { { echo "$as_me:$LINENO: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&5
+echo "$as_me: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_ext
+
+CPPFLAGS=$cmu_saved_CPPFLAGS
+
+
+
+cmu_saved_LDFLAGS=$LDFLAGS
+
+LDFLAGS="$LDFLAGS $LIB_SASL"
+
+echo "$as_me:$LINENO: checking for sasl_checkapop in -lsasl2" >&5
+echo $ECHO_N "checking for sasl_checkapop in -lsasl2... $ECHO_C" >&6
+if test "${ac_cv_lib_sasl2_sasl_checkapop+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsasl2 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sasl_checkapop ();
+int
+main ()
+{
+sasl_checkapop ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sasl2_sasl_checkapop=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sasl2_sasl_checkapop=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_checkapop" >&5
+echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_checkapop" >&6
+if test $ac_cv_lib_sasl2_sasl_checkapop = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_APOP
+_ACEOF
+
+else
+ { { echo "$as_me:$LINENO: error: libsasl2 without working sasl_checkapop. Cannot continue." >&5
+echo "$as_me: error: libsasl2 without working sasl_checkapop. Cannot continue." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+LDFLAGS=$cmu_saved_LDFLAGS
+
+
+
+# Check whether --with-perl or --without-perl was given.
+if test "${with_perl+set}" = set; then
+ withval="$with_perl"
+ with_perl="$withval"
+else
+ with_perl="perl"
+fi;
+
+if test "${with_perl}" = yes; then
+ with_perl="perl"
+fi
+if test "${with_perl}" != no; then
+ if test ${using_static_sasl} = "staticonly"; then
+ { echo "$as_me:$LINENO: WARNING: Cannot compile perl utilities using static libsasl" >&5
+echo "$as_me: WARNING: Cannot compile perl utilities using static libsasl" >&2;}
+ with_perl="no"
+ else
+ for ac_prog in ${with_perl} perl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PERL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$PERL"; then
+ ac_cv_prog_PERL="$PERL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PERL="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+PERL=$ac_cv_prog_PERL
+if test -n "$PERL"; then
+ echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$PERL" && break
+done
+test -n "$PERL" || PERL="with_perl=notfound"
+
+ fi
+fi
+if test "$with_perl" = "notfound"; then
+ { echo "$as_me:$LINENO: WARNING: Perl not found: Administrative tools won't be available" >&5
+echo "$as_me: WARNING: Perl not found: Administrative tools won't be available" >&2;}
+elif test "${with_perl}" != "no"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl"
+ PERL_SUBDIRS="imap"
+ PERL="${with_perl}"
+ PERL_CCCDLFLAGS="$cccdlflags"
+
+fi
+
+if test "$sievedir" != "no"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile"
+
+ PERL_SUBDIRS="${PERL_SUBDIRS} sieve"
+ PERL_DEPSUBDIRS="sieve"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile"
+else
+ PERL_DEPSUBDIRS="none"
+fi
+
+echo "$as_me:$LINENO: checking for MD5Init" >&5
+echo $ECHO_N "checking for MD5Init... $ECHO_C" >&6
+if test "${ac_cv_func_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define MD5Init to an innocuous variant, in case <limits.h> declares MD5Init.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define MD5Init innocuous_MD5Init
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char MD5Init (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef MD5Init
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char MD5Init ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_MD5Init) || defined (__stub___MD5Init)
+choke me
+#else
+char (*f) () = MD5Init;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != MD5Init;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_MD5Init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_MD5Init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_MD5Init" >&5
+echo "${ECHO_T}$ac_cv_func_MD5Init" >&6
+if test $ac_cv_func_MD5Init = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for MD5Init in -lmd" >&5
+echo $ECHO_N "checking for MD5Init in -lmd... $ECHO_C" >&6
+if test "${ac_cv_lib_md_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char MD5Init ();
+int
+main ()
+{
+MD5Init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_md_MD5Init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_md_MD5Init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Init" >&5
+echo "${ECHO_T}$ac_cv_lib_md_MD5Init" >&6
+if test $ac_cv_lib_md_MD5Init = yes; then
+ LIBS="${LIBS} -lmd"
+else
+ MD5OBJ="md5.o"
+fi
+
+fi
+
+
+
+SNMP_SUBDIRS=""
+
+
+
+# Check whether --with-lib-subdir or --without-lib-subdir was given.
+if test "${with_lib_subdir+set}" = set; then
+ withval="$with_lib_subdir"
+
+fi;
+echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
+echo $ECHO_N "checking what directory libraries are found in... $ECHO_C" >&6
+if test "${ac_cv_cmu_lib_subdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
+test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
+if test "X$with_lib_subdir" = "X" ; then
+ ac_cv_cmu_lib_subdir=lib
+ if test $ac_cv_sizeof_long -eq 4 ; then
+ test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
+ fi
+ if test $ac_cv_sizeof_long -eq 8 ; then
+ test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
+ fi
+else
+ ac_cv_cmu_lib_subdir=$with_lib_subdir
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
+echo "${ECHO_T}$ac_cv_cmu_lib_subdir" >&6
+CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
+
+
+
+
+
+
+# Check whether --with-libwrap or --without-libwrap was given.
+if test "${with_libwrap+set}" = set; then
+ withval="$with_libwrap"
+ with_libwrap=$withval
+else
+ with_libwrap=yes
+fi;
+ if test "$with_libwrap" != no; then
+ if test -d "$with_libwrap"; then
+ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
+ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ echo "$as_me:$LINENO: checking for request_init in -lwrap" >&5
+echo $ECHO_N "checking for request_init in -lwrap... $ECHO_C" >&6
+if test "${ac_cv_lib_wrap_request_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwrap ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char request_init ();
+int
+main ()
+{
+request_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_wrap_request_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_wrap_request_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_request_init" >&5
+echo "${ECHO_T}$ac_cv_lib_wrap_request_init" >&6
+if test $ac_cv_lib_wrap_request_init = yes; then
+
+ if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for tcpd.h" >&5
+echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
+if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
+echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking tcpd.h usability" >&5
+echo $ECHO_N "checking tcpd.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <tcpd.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking tcpd.h presence" >&5
+echo $ECHO_N "checking tcpd.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <tcpd.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: tcpd.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: tcpd.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: tcpd.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: tcpd.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: tcpd.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: tcpd.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for tcpd.h" >&5
+echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
+if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_tcpd_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
+echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
+
+fi
+if test $ac_cv_header_tcpd_h = yes; then
+ :
+else
+ with_libwrap=no
+fi
+
+
+else
+ with_libwrap=no
+fi
+
+ LIBS="$cmu_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: checking libwrap support" >&5
+echo $ECHO_N "checking libwrap support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $with_libwrap" >&5
+echo "${ECHO_T}$with_libwrap" >&6
+ LIB_WRAP=""
+ if test "$with_libwrap" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LIBWRAP
+_ACEOF
+
+ LIB_WRAP="-lwrap"
+ echo "$as_me:$LINENO: checking for yp_get_default_domain in -lnsl" >&5
+echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yp_get_default_domain ();
+int
+main ()
+{
+yp_get_default_domain ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_yp_get_default_domain=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_yp_get_default_domain=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6
+if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then
+ LIB_WRAP="${LIB_WRAP} -lnsl"
+fi
+
+ fi
+
+
+
+
+
+
+# Check whether --with-snmp or --without-snmp was given.
+if test "${with_snmp+set}" = set; then
+ withval="$with_snmp"
+ with_snmp=$withval
+else
+ with_snmp=yes
+fi;
+
+
+# Check whether --with-ucdsnmp or --without-ucdsnmp was given.
+if test "${with_ucdsnmp+set}" = set; then
+ withval="$with_ucdsnmp"
+ with_snmp=$withval
+fi;
+
+if test "$with_snmp" != "no"; then
+
+ if test "$with_snmp" = "yes"; then
+ # Extract the first word of "net-snmp-config", so it can be a program name with args.
+set dummy net-snmp-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_SNMP_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $SNMP_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="/usr/local/bin:$PATH"
+for as_dir in $as_dummy
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG
+
+if test -n "$SNMP_CONFIG"; then
+ echo "$as_me:$LINENO: result: $SNMP_CONFIG" >&5
+echo "${ECHO_T}$SNMP_CONFIG" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ else
+ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
+ fi
+
+ if test -x "$SNMP_CONFIG"; then
+ echo "$as_me:$LINENO: checking NET SNMP libraries" >&5
+echo $ECHO_N "checking NET SNMP libraries... $ECHO_C" >&6
+
+ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
+ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
+
+ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
+ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
+ LIB_UCDSNMP=$SNMP_LIBS
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_NETSNMP 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: WARNING: Could not find the required paths. Please check your net-snmp installation." >&5
+echo "$as_me: WARNING: Could not find the required paths. Please check your net-snmp installation." >&2;}
+ fi
+ else
+ if test "$with_snmp" != no; then
+ if test -d "$with_snmp"; then
+ CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
+ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ echo "$as_me:$LINENO: checking for sprint_objid in -lsnmp" >&5
+echo $ECHO_N "checking for sprint_objid in -lsnmp... $ECHO_C" >&6
+if test "${ac_cv_lib_snmp_sprint_objid+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsnmp ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sprint_objid ();
+int
+main ()
+{
+sprint_objid ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_snmp_sprint_objid=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_snmp_sprint_objid=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_sprint_objid" >&5
+echo "${ECHO_T}$ac_cv_lib_snmp_sprint_objid" >&6
+if test $ac_cv_lib_snmp_sprint_objid = yes; then
+
+ if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
+echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking ucd-snmp/version.h usability" >&5
+echo $ECHO_N "checking ucd-snmp/version.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <ucd-snmp/version.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking ucd-snmp/version.h presence" >&5
+echo $ECHO_N "checking ucd-snmp/version.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <ucd-snmp/version.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
+echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_ucd_snmp_version_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6
+
+fi
+if test $ac_cv_header_ucd_snmp_version_h = yes; then
+ :
+else
+ with_snmp=no
+fi
+
+
+else
+ with_snmp=no
+fi
+
+ LIBS="$cmu_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: checking UCD SNMP libraries" >&5
+echo $ECHO_N "checking UCD SNMP libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $with_snmp" >&5
+echo "${ECHO_T}$with_snmp" >&6
+ LIB_UCDSNMP=""
+ if test "$with_snmp" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_UCDSNMP 1
+_ACEOF
+
+ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
+ echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpm" >&5
+echo $ECHO_N "checking for rpmdbOpen in -lrpm... $ECHO_C" >&6
+if test "${ac_cv_lib_rpm_rpmdbOpen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrpm -lpopt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char rpmdbOpen ();
+int
+main ()
+{
+rpmdbOpen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rpm_rpmdbOpen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rpm_rpmdbOpen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbOpen" >&5
+echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbOpen" >&6
+if test $ac_cv_lib_rpm_rpmdbOpen = yes; then
+ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"
+fi
+
+ fi
+
+ fi
+fi
+
+
+
+# Figure out what directories we're linking against.
+# Lots of fun for the whole family.
+# This probably chokes on anything with spaces in it.
+# All we want is the list of -L directories, and -L may or may not be
+# followed by a space.
+isdir=no
+libpath=""
+#echo "debug ldflags: << ${ldflags} >>"
+#echo "debug default_ldflags: << ${default_ldflags} >>"
+for flag in ${ldflags} ${default_ldflags}; do
+ case $flag in
+ -L)
+ # it's a split -L option, we'll mark the next option as a dir.
+ isdir=yes
+ ;;
+
+ -L*)
+ # attached -L option: split off the directory
+ larg=`echo $flag | sed -e 's:-L\(..*\):\1:'`
+ libpath="${libpath} ${larg}"
+ ;;
+
+ *)
+ if test $isdir = yes ; then
+ libpath="${libpath} ${flag}"
+ isdir=no
+ fi
+ esac
+done
+
+IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
+IMAP_LIBS="${LIB_SASL} ${LIBS}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t at OBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIB@&t at OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+ "master/Makefile" ) CONFIG_FILES="$CONFIG_FILES master/Makefile" ;;
+ "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+ "imap/Makefile" ) CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;;
+ "imtest/Makefile" ) CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;;
+ "netnews/Makefile" ) CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;;
+ "perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;;
+ "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at MAKEDEPEND@,$MAKEDEPEND,;t t
+s, at cyrus_prefix@,$cyrus_prefix,;t t
+s, at service_path@,$service_path,;t t
+s, at cyrus_user@,$cyrus_user,;t t
+s, at cyrus_group@,$cyrus_group,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CPP@,$CPP,;t t
+s, at EGREP@,$EGREP,;t t
+s, at AWK@,$AWK,;t t
+s, at LIB@&t at OBJS@,$LIB@&t at OBJS,;t t
+s, at LIB_SOCKET@,$LIB_SOCKET,;t t
+s, at IPV6_OBJS@,$IPV6_OBJS,;t t
+s, at PRE_SUBDIRS@,$PRE_SUBDIRS,;t t
+s, at EXTRA_SUBDIRS@,$EXTRA_SUBDIRS,;t t
+s, at DEPLIBS@,$DEPLIBS,;t t
+s, at LOCALDEFS@,$LOCALDEFS,;t t
+s, at BDB_INC@,$BDB_INC,;t t
+s, at BDB_LIB@,$BDB_LIB,;t t
+s, at CYRUSDB_OBJS@,$CYRUSDB_OBJS,;t t
+s, at SIEVE_OBJS@,$SIEVE_OBJS,;t t
+s, at SIEVE_LIBS@,$SIEVE_LIBS,;t t
+s, at SIEVE_CPPFLAGS@,$SIEVE_CPPFLAGS,;t t
+s, at YACC@,$YACC,;t t
+s, at LEX@,$LEX,;t t
+s, at LEXLIB@,$LEXLIB,;t t
+s, at LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+s, at SIEVE_SUBDIRS@,$SIEVE_SUBDIRS,;t t
+s, at WITH_NONBLOCK@,$WITH_NONBLOCK,;t t
+s, at WITH_GMTOFF@,$WITH_GMTOFF,;t t
+s, at WITH_MAP@,$WITH_MAP,;t t
+s, at WITH_LOCK@,$WITH_LOCK,;t t
+s, at cyrus_sigveclib@,$cyrus_sigveclib,;t t
+s, at AFS_LIBS@,$AFS_LIBS,;t t
+s, at AFS_LDFLAGS@,$AFS_LDFLAGS,;t t
+s, at LDAP_CPPFLAGS@,$LDAP_CPPFLAGS,;t t
+s, at LDAP_LDFLAGS@,$LDAP_LDFLAGS,;t t
+s, at LDAP_LIBS@,$LDAP_LIBS,;t t
+s, at SERVER_SUBDIRS@,$SERVER_SUBDIRS,;t t
+s, at OPENSSL_INC@,$OPENSSL_INC,;t t
+s, at OPENSSL_LIB@,$OPENSSL_LIB,;t t
+s, at ZEPHYR_LIBS@,$ZEPHYR_LIBS,;t t
+s, at ZEPHYR_CPPFLAGS@,$ZEPHYR_CPPFLAGS,;t t
+s, at IMAP_PROGS@,$IMAP_PROGS,;t t
+s, at COMPILE_ET@,$COMPILE_ET,;t t
+s, at COM_ERR_LIBS@,$COM_ERR_LIBS,;t t
+s, at COM_ERR_LDFLAGS@,$COM_ERR_LDFLAGS,;t t
+s, at COM_ERR_CPPFLAGS@,$COM_ERR_CPPFLAGS,;t t
+s, at LIB_CRYPT@,$LIB_CRYPT,;t t
+s, at GSSAPI_LIBS@,$GSSAPI_LIBS,;t t
+s, at GSSAPIBASE_LIBS@,$GSSAPIBASE_LIBS,;t t
+s, at LIB_DYN_SASL@,$LIB_DYN_SASL,;t t
+s, at DYNSASLFLAGS@,$DYNSASLFLAGS,;t t
+s, at LIB_SASL@,$LIB_SASL,;t t
+s, at SASLFLAGS@,$SASLFLAGS,;t t
+s, at PERL@,$PERL,;t t
+s, at PERL_CCCDLFLAGS@,$PERL_CCCDLFLAGS,;t t
+s, at MD5OBJ@,$MD5OBJ,;t t
+s, at SNMP_SUBDIRS@,$SNMP_SUBDIRS,;t t
+s, at CMU_LIB_SUBDIR@,$CMU_LIB_SUBDIR,;t t
+s, at LIB_WRAP@,$LIB_WRAP,;t t
+s, at SNMP_CONFIG@,$SNMP_CONFIG,;t t
+s, at LIB_UCDSNMP@,$LIB_UCDSNMP,;t t
+s, at LIB_RT@,$LIB_RT,;t t
+s, at IMAP_COM_ERR_LIBS@,$IMAP_COM_ERR_LIBS,;t t
+s, at IMAP_LIBS@,$IMAP_LIBS,;t t
+s, at PERL_SUBDIRS@,$PERL_SUBDIRS,;t t
+s, at PERL_DEPSUBDIRS@,$PERL_DEPSUBDIRS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/output.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,19309 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.59.
+@%:@
+@%:@ Copyright (C) 2003 Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="imap/imapd.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAKEDEPEND cyrus_prefix service_path cyrus_user cyrus_group CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP AWK LIB@&t at OBJS LIB_SOCKET IPV6_OBJS PRE_SUBDIRS EXTRA_SUBDIRS DEPLIBS LOCALDEFS BDB_INC BDB_LIB CYRUSDB_OBJS SIEVE_OBJS SIEVE_LIBS SIEVE_CPPFLAGS YACC LEX LEXLIB LEX_OUTPUT_ROOT SIEVE_SUBDIRS WITH_NONBLOCK WITH_GMTOFF WITH_MAP WITH_LOCK cyrus_sigveclib AFS_LIBS AFS_LDFLAGS LDAP_CPPFLAGS LDAP_LDFLAGS LDAP_LIBS SERVER_SUBDIRS OPENSSL_INC OPENSSL_LIB ZEPHYR_LIBS ZEPHYR_CPPFLAGS IMAP_PROGS COMPILE_ET COM_ERR_LIBS COM_ERR_LDFLAGS COM_ERR_CPPFLAGS LIB_CRYPT GSSAPI_LIBS GSSAPIBASE_LIBS LIB_DYN_SASL DYNSASLFLAGS LIB_SASL SASLFLAGS PERL PERL_CCCDLFLAGS MD5OBJ SNMP_SUBDIRS CMU_LIB_SUBDIR LIB_WRAP SNMP_CONFIG LIB_UCDSNMP LIB_RT IMAP_COM_ERR_LIBS IMAP_LIBS PERL_SUBDIRS PERL_DEPSUBDIRS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-sieve disable Sieve support
+ --enable-krb5afspts compile afskrb PTS module with krb5 support
+ --disable-server disable compiling servers
+ --enable-statickrb link Kerberos statically
+ --enable-idled enable IMAP idled support
+ --enable-nntp enable NNTP support
+ --enable-murder enable IMAP Murder support
+ --enable-replication enable replication support (experimental)
+ --enable-cmulocal enable CMU-specific local support
+ --enable-oldsievename enable the use of 'imap' as the sieve service name
+ --enable-listext enable IMAP List extensions
+ --enable-netscapehack enable Netscape hack for the menu option
+ in Communicator to Administrate Mail
+ --enable-gssapi=<DIR> enable GSSAPI authentication [yes]
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-extraident=STRING use STRING as extra version information
+
+ --with-cyrus-prefix=DIR use DIR as cyrus server install directory
+ --with-service-path=DIR use DIR as service install directory
+ --with-cyrus-user=USERID use USERID cyrus userid
+ --with-cyrus-group=GROUPID use GROUPID cyrus group
+ --with-bdb=DIR use Berkeley DB (in DIR) [yes]
+ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR
+ --with-bdb-incdir=DIR Berkeley DB include files are in DIR
+ --with-lock=METHOD force use of METHOD for locking (flock or fcntl)
+ --with-afs=PATH use AFS libraries from PATH
+ --with-ldap=DIR use LDAP (in DIR) (experimental) /usr/local
+ --with-krb=PATH use Kerberos from PATH
+ --with-krbimpl=\kth|mit\ assume Kerberos 4 from KTH or MIT
+ --with-krbdes use Kerberos DES implementation [yes]
+ --with-openssl=PATH use OpenSSL from PATH
+ --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
+ for systems without /dev/urandom
+ --with-zephyr=PATH enable Zephyr notification (installed on PATH)
+ --with-pidfile=PATH pidfile in PATH (/var/run/cyrus-master.pid)
+ --with-com_err=PATH use com_err from path -- includes in PATH/include,
+ libs in PATH/lib, and compile_et in PATH/bin
+ --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6)
+ --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
+ choose specific GSSAPI implementation [[auto]]
+ --with-sasl=DIR Compile with libsasl2 in <DIR>
+ --with-staticsasl=DIR Compile with staticly linked libsasl2 in <DIR>
+ --with-perl=PERL use PERL for perl
+ --with-lib-subdir=DIR Find libraries in DIR instead of lib
+ --with-libwrap=DIR use libwrap (rooted in DIR) yes
+ --with-snmp=DIR use ucd|net snmp (rooted in DIR) yes
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+@%:@@%:@ ------------- @%:@@%:@
+@%:@@%:@ Output files. @%:@@%:@
+@%:@@%:@ ------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h"
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+
+# Check whether --with-extraident or --without-extraident was given.
+if test "${with_extraident+set}" = set; then
+ withval="$with_extraident"
+
+cat >>confdefs.h <<_ACEOF
+@%:@define EXTRA_IDENT "$withval"
+_ACEOF
+
+fi;
+
+# Extract the first word of "makedepend", so it can be a program name with args.
+set dummy makedepend; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEDEPEND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKEDEPEND"; then
+ ac_cv_prog_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MAKEDEPEND="makedepend"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_MAKEDEPEND" && ac_cv_prog_MAKEDEPEND="`cd ${srcdir};pwd`/tools/not-mkdep"
+fi
+fi
+MAKEDEPEND=$ac_cv_prog_MAKEDEPEND
+if test -n "$MAKEDEPEND"; then
+ echo "$as_me:$LINENO: result: $MAKEDEPEND" >&5
+echo "${ECHO_T}$MAKEDEPEND" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "$MAKEDEPEND" != "makedepend"; then
+ { echo "$as_me:$LINENO: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&5
+echo "$as_me: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&2;}
+fi
+
+
+# Check whether --with-login or --without-login was given.
+if test "${with_login+set}" = set; then
+ withval="$with_login"
+ { { echo "$as_me:$LINENO: error: --with-login is no longer supported.
+Configure SASL appropriately instead." >&5
+echo "$as_me: error: --with-login is no longer supported.
+Configure SASL appropriately instead." >&2;}
+ { (exit 1); exit 1; }; }
+fi;
+
+
+# Check whether --with-cyrus-prefix or --without-cyrus-prefix was given.
+if test "${with_cyrus_prefix+set}" = set; then
+ withval="$with_cyrus_prefix"
+ cyrus_prefix="$withval"
+else
+ cyrus_prefix="/usr/cyrus"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define CYRUS_PATH "$cyrus_prefix"
+_ACEOF
+
+
+# Check whether --with-service-path or --without-service-path was given.
+if test "${with_service_path+set}" = set; then
+ withval="$with_service_path"
+ service_path="$withval"
+else
+ service_path="$cyrus_prefix/bin"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SERVICE_PATH "$service_path"
+_ACEOF
+
+
+# Check whether --with-cyrus-user or --without-cyrus-user was given.
+if test "${with_cyrus_user+set}" = set; then
+ withval="$with_cyrus_user"
+ cyrus_user="$withval"
+else
+ cyrus_user="cyrus"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define CYRUS_USER "$cyrus_user"
+_ACEOF
+
+
+# Check whether --with-cyrus-group or --without-cyrus-group was given.
+if test "${with_cyrus_group+set}" = set; then
+ withval="$with_cyrus_group"
+ cyrus_group="$withval"
+else
+ cyrus_group="mail"
+fi;
+
+
+if test $sysconfdir = '${prefix}/etc'; then
+ sysconfdir="/etc"
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SYSCONFDIR "$sysconfdir"
+_ACEOF
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $@%:@ != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+@%:@ifndef __cplusplus
+ choke me
+@%:@endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+@%:@include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+
+echo "$as_me:$LINENO: checking for AIX" >&5
+echo $ECHO_N "checking for AIX... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef _AIX
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+@%:@define _ALL_SOURCE 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest*
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for long file names" >&5
+echo $ECHO_N "checking for long file names... $ECHO_C" >&6
+if test "${ac_cv_sys_long_file_names+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+# . the current directory, where building will happen
+# $prefix/lib where we will be installing things
+# $exec_prefix/lib likewise
+# eval it to expand exec_prefix.
+# $TMPDIR if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+# /tmp where it might want to write temporary files
+# /var/tmp likewise
+# /usr/tmp likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+ ac_tmpdirs=$TMPDIR
+else
+ ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+ test -d $ac_dir || continue
+ test -w $ac_dir || continue # It is less confusing to not echo anything here.
+ ac_xdir=$ac_dir/cf$$
+ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
+ ac_tf1=$ac_xdir/conftest9012345
+ ac_tf2=$ac_xdir/conftest9012346
+ (echo 1 >$ac_tf1) 2>/dev/null
+ (echo 2 >$ac_tf2) 2>/dev/null
+ ac_val=`cat $ac_tf1 2>/dev/null`
+ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+ ac_cv_sys_long_file_names=no
+ rm -rf $ac_xdir 2>/dev/null
+ break
+ fi
+ rm -rf $ac_xdir 2>/dev/null
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
+if test $ac_cv_sys_long_file_names = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LONG_FILE_NAMES 1
+_ACEOF
+
+fi
+
+if test $ac_cv_sys_long_file_names = no; then
+ { { echo "$as_me:$LINENO: error: The Cyrus IMAPD requires support for long file names" >&5
+echo "$as_me: error: The Cyrus IMAPD requires support for long file names" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+echo "$as_me:$LINENO: checking for long long int" >&5
+echo $ECHO_N "checking for long long int... $ECHO_C" >&6
+if test "${ac_cv_type_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long long int *) 0)
+ return 0;
+if (sizeof (long long int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long_long_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_long_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
+
+echo "$as_me:$LINENO: checking size of long long int" >&5
+echo $ECHO_N "checking size of long long int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long_long_int" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_long_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long long int)); }
+unsigned long ulongval () { return (long) (sizeof (long long int)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long long int))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long long int))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long long int))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long_long_int=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long_long_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for unsigned long long int" >&5
+echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((unsigned long long int *) 0)
+ return 0;
+if (sizeof (unsigned long long int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
+
+echo "$as_me:$LINENO: checking size of unsigned long long int" >&5
+echo $ECHO_N "checking size of unsigned long long int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_unsigned_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_unsigned_long_long_int" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (unsigned long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_unsigned_long_long_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (unsigned long long int)); }
+unsigned long ulongval () { return (long) (sizeof (unsigned long long int)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (unsigned long long int))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (unsigned long long int))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (unsigned long long int))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_unsigned_long_long_int=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_unsigned_long_long_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long_int" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int
+_ACEOF
+
+
+if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \
+ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LONG_LONG_INT
+_ACEOF
+
+ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+fi
+
+
+echo "$as_me:$LINENO: checking for __attribute__" >&5
+echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6
+if test "${ac_cv___attribute__+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+
+int
+main ()
+{
+
+static void foo(void) __attribute__ ((noreturn));
+
+static void
+foo(void)
+{
+ exit(1);
+}
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv___attribute__=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv___attribute__=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$ac_cv___attribute__" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE___ATTRIBUTE__ 1
+_ACEOF
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
+echo "${ECHO_T}$ac_cv___attribute__" >&6
+
+
+echo "$as_me:$LINENO: checking if compiler supports -fPIC" >&5
+echo $ECHO_N "checking if compiler supports -fPIC... $ECHO_C" >&6
+if test "${ac_cv_fpic+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+save_CFLAGS=$CFLAGS
+CFLAGS="${CFLAGS} -fPIC"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+
+int
+main ()
+{
+
+static void
+foo(void)
+{
+ exit(1);
+}
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_fpic=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_fpic=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS=$save_CFLAGS
+
+fi
+
+if test "$ac_cv_fpic" = "yes"; then
+ FPIC_CFLAGS="-fPIC"
+else
+ FPIC_CFLAGS=""
+fi
+echo "$as_me:$LINENO: result: $ac_cv_fpic" >&5
+echo "${ECHO_T}$ac_cv_fpic" >&6
+
+
+
+ # CMU GUESS RUNPATH SWITCH
+ echo "$as_me:$LINENO: checking for runpath switch" >&5
+echo $ECHO_N "checking for runpath switch... $ECHO_C" >&6
+if test "${andrew_runpath_switch+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # first, try -R
+ SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-R /usr/lib"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ andrew_runpath_switch="-R"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ LDFLAGS="-Wl,-rpath,/usr/lib"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ andrew_runpath_switch="-Wl,-rpath,"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+andrew_runpath_switch="none"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="${SAVE_LDFLAGS}"
+
+fi
+echo "$as_me:$LINENO: result: $andrew_runpath_switch" >&5
+echo "${ECHO_T}$andrew_runpath_switch" >&6
+
+
+
+
+
+for ac_header in unistd.h sys/select.h sys/param.h stdarg.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+for ac_func in memmove strcasecmp ftruncate strerror
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case $LIB@&t at OBJS in
+ "$ac_func.$ac_objext" | \
+ *" $ac_func.$ac_objext" | \
+ "$ac_func.$ac_objext "* | \
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIB@&t at OBJS="$LIB@&t at OBJS $ac_func.$ac_objext" ;;
+esac
+
+fi
+done
+
+
+
+
+for ac_func in strlcat strlcpy
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+else
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+fi
+
+
+
+ save_LIBS="$LIBS"
+ LIB_SOCKET=""
+ echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+if test $ac_cv_func_connect = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ LIB_SOCKET="-lnsl $LIB_SOCKET"
+fi
+
+ echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+int
+main ()
+{
+connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
+if test $ac_cv_lib_socket_connect = yes; then
+ LIB_SOCKET="-lsocket $LIB_SOCKET"
+fi
+
+
+fi
+
+ LIBS="$LIB_SOCKET $save_LIBS"
+ echo "$as_me:$LINENO: checking for res_search" >&5
+echo $ECHO_N "checking for res_search... $ECHO_C" >&6
+if test "${ac_cv_func_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define res_search innocuous_res_search
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char res_search (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef res_search
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_res_search) || defined (__stub___res_search)
+choke me
+#else
+char (*f) () = res_search;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != res_search;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
+echo "${ECHO_T}$ac_cv_func_res_search" >&6
+if test $ac_cv_func_res_search = yes; then
+ :
+else
+ LIBS="-lresolv $LIB_SOCKET $save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#ifdef HAVE_ARPA_NAMESER_COMPAT_H
+#include <arpa/nameser_compat.h>
+#endif
+#include <resolv.h>
+int
+main ()
+{
+
+const char host[12]="openafs.org";
+u_char ans[1024];
+res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
+return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ LIB_SOCKET="-lresolv $LIB_SOCKET"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ LIBS="$LIB_SOCKET $save_LIBS"
+
+
+for ac_func in dn_expand dns_lookup
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$save_LIBS"
+
+
+LIBS="$LIBS ${LIB_SOCKET}"
+
+cyrus_cv_getaddrinfo=yes
+
+echo "$as_me:$LINENO: checking for getaddrinfo" >&5
+echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
+if test "${ac_cv_func_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define getaddrinfo innocuous_getaddrinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getaddrinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef getaddrinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
+choke me
+#else
+char (*f) () = getaddrinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getaddrinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
+if test $ac_cv_func_getaddrinfo = yes; then
+ ac_cv_lib_socket_getaddrinfo=no
+ ac_cv_lib_inet6_getaddrinfo=no
+
+else
+ echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
+echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6
+if test $ac_cv_lib_socket_getaddrinfo = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getaddrinfo=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getaddrinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
+echo $ECHO_N "checking for getaddrinfo in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_getaddrinfo" >&6
+if test $ac_cv_lib_inet6_getaddrinfo = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_getaddrinfo=no
+if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
+ -o $ac_cv_lib_inet6_getaddrinfo = yes
+then
+ ipv6_cv_getaddrinfo=yes
+fi
+if test $ipv6_cv_getaddrinfo = no; then
+ if test getaddrinfo = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}getaddrinfo... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}getaddrinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}getaddrinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}getaddrinfo) || defined (__stub___${ipv6_cv_pfx}getaddrinfo)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}getaddrinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}getaddrinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_getaddrinfo=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_getaddrinfo = yes; then
+
+echo "$as_me:$LINENO: checking for gai_strerror" >&5
+echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6
+if test "${ac_cv_func_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define gai_strerror to an innocuous variant, in case <limits.h> declares gai_strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define gai_strerror innocuous_gai_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gai_strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gai_strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gai_strerror) || defined (__stub___gai_strerror)
+choke me
+#else
+char (*f) () = gai_strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gai_strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_func_gai_strerror" >&6
+if test $ac_cv_func_gai_strerror = yes; then
+ ac_cv_lib_socket_gai_strerror=no
+ ac_cv_lib_inet6_gai_strerror=no
+
+else
+ echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
+echo $ECHO_N "checking for gai_strerror in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+int
+main ()
+{
+gai_strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_gai_strerror" >&6
+if test $ac_cv_lib_socket_gai_strerror = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_gai_strerror=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_gai_strerror=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
+echo $ECHO_N "checking for gai_strerror in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+int
+main ()
+{
+gai_strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_gai_strerror" >&6
+if test $ac_cv_lib_inet6_gai_strerror = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_gai_strerror=no
+if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \
+ -o $ac_cv_lib_inet6_gai_strerror = yes
+then
+ ipv6_cv_gai_strerror=yes
+fi
+if test $ipv6_cv_gai_strerror = no; then
+ if test gai_strerror = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}gai_strerror... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}gai_strerror to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}gai_strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}gai_strerror innocuous_${ipv6_cv_pfx}gai_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}gai_strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}gai_strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}gai_strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}gai_strerror) || defined (__stub___${ipv6_cv_pfx}gai_strerror)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}gai_strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}gai_strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_gai_strerror=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_gai_strerror = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+
+else
+ cyrus_cv_getaddrinfo=no
+fi
+else
+ cyrus_cv_getaddrinfo=no
+fi
+
+if test $cyrus_cv_getaddrinfo = no; then
+ IPV6_OBJS="getaddrinfo.o"
+fi
+
+cyrus_cv_getnameinfo=yes
+
+echo "$as_me:$LINENO: checking for getnameinfo" >&5
+echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6
+if test "${ac_cv_func_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define getnameinfo innocuous_getnameinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getnameinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef getnameinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo)
+choke me
+#else
+char (*f) () = getnameinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getnameinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6
+if test $ac_cv_func_getnameinfo = yes; then
+ ac_cv_lib_socket_getnameinfo=no
+ ac_cv_lib_inet6_getnameinfo=no
+
+else
+ echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
+echo $ECHO_N "checking for getnameinfo in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+int
+main ()
+{
+getnameinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_getnameinfo" >&6
+if test $ac_cv_lib_socket_getnameinfo = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getnameinfo=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getnameinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
+echo $ECHO_N "checking for getnameinfo in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+int
+main ()
+{
+getnameinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_getnameinfo" >&6
+if test $ac_cv_lib_inet6_getnameinfo = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_getnameinfo=no
+if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
+ -o $ac_cv_lib_inet6_getnameinfo = yes
+then
+ ipv6_cv_getnameinfo=yes
+fi
+if test $ipv6_cv_getnameinfo = no; then
+ if test getnameinfo = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}getnameinfo... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}getnameinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}getnameinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}getnameinfo) || defined (__stub___${ipv6_cv_pfx}getnameinfo)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}getnameinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}getnameinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_getnameinfo=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_getnameinfo = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETNAMEINFO
+_ACEOF
+
+else
+ cyrus_cv_getnameinfo=no
+fi
+
+if test $cyrus_cv_getnameinfo = no; then
+ IPV6_OBJS="$IPV6_OBJS getnameinfo.o"
+fi
+
+
+echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
+echo $ECHO_N "checking whether you have ss_family in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ipv6_cv_ss_family+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+struct sockaddr_storage ss; int i = ss.ss_family;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ipv6_cv_ss_family=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ipv6_cv_ss_family=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if test $ipv6_cv_ss_family = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SS_FAMILY
+_ACEOF
+
+else
+ :
+fi
+echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
+echo "${ECHO_T}$ipv6_cv_ss_family" >&6
+
+echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
+echo $ECHO_N "checking whether you have sa_len in struct sockaddr... $ECHO_C" >&6
+if test "${ipv6_cv_sa_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+struct sockaddr sa; int i = sa.sa_len;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ipv6_cv_sa_len=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ipv6_cv_sa_len=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if test $ipv6_cv_sa_len = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SOCKADDR_SA_LEN
+_ACEOF
+
+else
+ :
+fi
+echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
+echo "${ECHO_T}$ipv6_cv_sa_len" >&6
+
+
+
+
+for ac_header in sys/time.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm *tp; tp->tm_sec;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_struct_tm=time.h
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
+if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_tm_tm_zone=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_tm_tm_zone=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_tm_tm_zone=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6
+if test "${ac_cv_var_tzname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <time.h>
+#ifndef tzname /* For SGI. */
+extern char *tzname[]; /* RS6000 and others reject char **tzname. */
+#endif
+
+int
+main ()
+{
+atoi(*tzname);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_var_tzname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_tzname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+echo "${ECHO_T}$ac_cv_var_tzname" >&6
+ if test $ac_cv_var_tzname = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TZNAME 1
+_ACEOF
+
+ fi
+fi
+
+
+
+
+
+
+
+
+for ac_func in vprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+echo "$as_me:$LINENO: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
+if test "${ac_cv_func__doprnt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char _doprnt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+char (*f) () = _doprnt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != _doprnt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func__doprnt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func__doprnt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+if test $ac_cv_func__doprnt = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+
+
+CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o"
+
+
+
+# Check whether --with-bdb or --without-bdb was given.
+if test "${with_bdb+set}" = set; then
+ withval="$with_bdb"
+ with_bdb=$withval
+else
+ with_bdb="yes"
+fi;
+
+
+# Check whether --with-dbdir or --without-dbdir was given.
+if test "${with_dbdir+set}" = set; then
+ withval="$with_dbdir"
+ with_bdb=$withval
+fi;
+
+case "$with_bdb" in
+ no)
+ use_berkeley="no"
+ ;;
+ yes)
+ use_berkeley="yes"
+ with_bdb_lib=none
+ with_bdb_inc=none
+ ;;
+
+ *)
+ use_berkeley="yes"
+ with_bdb_lib="$with_bdb/lib"
+ with_bdb_inc="$with_bdb/include"
+ ;;
+esac
+
+if test "$use_berkeley" != "no"; then
+
+
+# Check whether --with-bdb-libdir or --without-bdb-libdir was given.
+if test "${with_bdb_libdir+set}" = set; then
+ withval="$with_bdb_libdir"
+ with_bdb_lib=$withval
+else
+ test "${with_bdb_lib+set}" = set || with_bdb_lib=none
+fi;
+
+# Check whether --with-bdb-incdir or --without-bdb-incdir was given.
+if test "${with_bdb_incdir+set}" = set; then
+ withval="$with_bdb_incdir"
+ with_bdb_inc=$withval
+else
+ test "${with_bdb_inc+set}" = set || with_bdb_inc=none
+fi;
+
+
+
+
+ cmu_save_CPPFLAGS=$CPPFLAGS
+
+ if test -d $with_bdb_inc; then
+ CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
+ BDB_INCADD="-I$with_bdb_inc"
+ else
+ BDB_INCADD=""
+ fi
+
+ if test "${ac_cv_header_db_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6
+if test "${ac_cv_header_db_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+echo "${ECHO_T}$ac_cv_header_db_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking db.h usability" >&5
+echo $ECHO_N "checking db.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <db.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking db.h presence" >&5
+echo $ECHO_N "checking db.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <db.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6
+if test "${ac_cv_header_db_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_db_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+echo "${ECHO_T}$ac_cv_header_db_h" >&6
+
+fi
+if test $ac_cv_header_db_h = yes; then
+
+ BDB_SAVE_LDFLAGS=$LDFLAGS
+
+ if test -d $with_bdb_lib; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_runpath_switch$with_bdb_lib"
+ fi
+
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
+ else
+ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_runpath_switch$with_bdb_lib"
+ fi
+
+ else
+ BDB_LIBADD=""
+ fi
+
+ saved_LIBS=$LIBS
+ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <db.h>
+int
+main ()
+{
+db_create(NULL, NULL, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+dblib="no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$dblib" = "berkeley"; then break; fi
+ done
+ if test "$dblib" = "no"; then
+ LIBS="$saved_LIBS -ldb"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <db.h>
+int
+main ()
+{
+db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+dblib="no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ LIBS=$saved_LIBS
+
+ LDFLAGS=$BDB_SAVE_LDFLAGS
+
+else
+ dblib="no"
+fi
+
+
+
+ CPPFLAGS=$cmu_save_CPPFLAGS
+
+
+ if test "$dblib" = "no"; then
+ { { echo "$as_me:$LINENO: error: Berkeley DB 3.x or later was not found. You may need to
+ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&5
+echo "$as_me: error: Berkeley DB 3.x or later was not found. You may need to
+ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$with_bdb_lib" != "none"; then
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L$with_bdb_lib $andrew_runpath_switch$with_bdb_lib ${LDFLAGS}"
+ fi
+
+ fi
+
+ BDB_INC=${BDB_INCADD}
+ BDB_LIB=${BDB_LIBADD}
+
+
+
+ LIBS="${LIBS} ${BDB_LIBADD}"
+ CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
+
+ CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o"
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_BDB
+_ACEOF
+
+fi
+
+
+
+
+SIEVE_SUBDIRS=""
+sievedir="sieve"
+# Check whether --enable-sieve or --disable-sieve was given.
+if test "${enable_sieve+set}" = set; then
+ enableval="$enable_sieve"
+ if test "$enableval" = no; then
+ sievedir="no"
+ fi
+fi;
+
+if test "$sievedir" != "no"; then
+ SIEVE_OBJS="lmtp_sieve.o smtpclient.o"
+
+ SIEVE_LIBS="../${sievedir}/libsieve.a"
+
+ SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir"
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define USE_SIEVE
+_ACEOF
+
+
+ for ac_prog in 'bison -y' byacc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_YACC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+ for ac_prog in flex lex
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LEX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+ echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+if test -z "$LEXLIB"
+then
+ echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_fl_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_yywrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+if test $ac_cv_lib_fl_yywrap = yes; then
+ LEXLIB="-lfl"
+else
+ echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+if test "${ac_cv_lib_l_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ll $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_l_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_l_yywrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+if test $ac_cv_lib_l_yywrap = yes; then
+ LEXLIB="-ll"
+fi
+
+fi
+
+fi
+
+if test "x$LEX" != "x:"; then
+ echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_root+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+cat >conftest.l <<_ACEOF
+%%
+%%
+_ACEOF
+{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+ (eval $LEX conftest.l) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+rm -f conftest.l
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS=$LIBS
+LIBS="$LIBS $LEXLIB"
+cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_lex_yytext_pointer=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define YYTEXT_POINTER 1
+_ACEOF
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for main in -lfl" >&5
+echo $ECHO_N "checking for main in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_fl_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_main" >&6
+if test $ac_cv_lib_fl_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBFL 1
+_ACEOF
+
+ LIBS="-lfl $LIBS"
+
+fi
+
+
+ echo "$as_me:$LINENO: checking for library containing regcomp" >&5
+echo $ECHO_N "checking for library containing regcomp... $ECHO_C" >&6
+if test "${ac_cv_search_regcomp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_regcomp=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char regcomp ();
+int
+main ()
+{
+regcomp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_regcomp="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_regcomp" = no; then
+ for ac_lib in rx regex; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char regcomp ();
+int
+main ()
+{
+regcomp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_regcomp="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_regcomp" >&5
+echo "${ECHO_T}$ac_cv_search_regcomp" >&6
+if test "$ac_cv_search_regcomp" != no; then
+ test "$ac_cv_search_regcomp" = "none required" || LIBS="$ac_cv_search_regcomp $LIBS"
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define ENABLE_REGEX
+_ACEOF
+
+ if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for rxposix.h" >&5
+echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6
+if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
+echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking rxposix.h usability" >&5
+echo $ECHO_N "checking rxposix.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <rxposix.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking rxposix.h presence" >&5
+echo $ECHO_N "checking rxposix.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <rxposix.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: rxposix.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: rxposix.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: rxposix.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: rxposix.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: rxposix.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: rxposix.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for rxposix.h" >&5
+echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6
+if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_rxposix_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
+echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6
+
+fi
+if test $ac_cv_header_rxposix_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_RX
+_ACEOF
+
+fi
+
+
+fi
+
+
+
+ SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile"
+fi
+
+
+
+echo "$as_me:$LINENO: checking for strerror" >&5
+echo $ECHO_N "checking for strerror... $ECHO_C" >&6
+if test "${ac_cv_func_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define strerror innocuous_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_strerror) || defined (__stub___strerror)
+choke me
+#else
+char (*f) () = strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
+echo "${ECHO_T}$ac_cv_func_strerror" >&6
+if test $ac_cv_func_strerror = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAS_STRERROR
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define NEED_SYS_ERRLIST
+_ACEOF
+
+fi
+
+
+
+for ac_header in sys/resource.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in setrlimit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in getrlimit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+for ac_func in daemon setsid
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in shutdown
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/socket.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "socklen_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SOCKLEN_T
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/socket.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sockaddr_storage" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STRUCT_SOCKADDR_STORAGE
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/resource.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "rlim_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_RLIM_T
+_ACEOF
+
+fi
+rm -f conftest*
+
+
+spt_type=""
+echo "$as_me:$LINENO: checking for setproctitle" >&5
+echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
+if test "${ac_cv_func_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define setproctitle innocuous_setproctitle
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setproctitle (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef setproctitle
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setproctitle ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setproctitle) || defined (__stub___setproctitle)
+choke me
+#else
+char (*f) () = setproctitle;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setproctitle;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
+echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
+if test $ac_cv_func_setproctitle = yes; then
+ spt_type=SPT_BUILTIN
+fi
+
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
+echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
+if test "${ac_cv_lib_util_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setproctitle ();
+int
+main ()
+{
+setproctitle ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_util_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_util_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
+echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
+if test $ac_cv_lib_util_setproctitle = yes; then
+ spt_type=SPT_BUILTIN
+ LIBS="${LIBS} -lutil"
+fi
+
+fi
+if test "$spt_type" = ""; then
+ if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
+echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/pstat.h usability" >&5
+echo $ECHO_N "checking sys/pstat.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sys/pstat.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/pstat.h presence" >&5
+echo $ECHO_N "checking sys/pstat.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sys/pstat.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/pstat.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/pstat.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/pstat.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
+echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_pstat_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6
+
+fi
+if test $ac_cv_header_sys_pstat_h = yes; then
+ spt_type=SPT_PSTAT
+fi
+
+
+fi
+if test "$spt_type" = ""; then
+ if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
+echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/sysnews.h usability" >&5
+echo $ECHO_N "checking sys/sysnews.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sys/sysnews.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/sysnews.h presence" >&5
+echo $ECHO_N "checking sys/sysnews.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sys/sysnews.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/sysnews.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/sysnews.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
+echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_sysnews_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6
+
+fi
+if test $ac_cv_header_sys_sysnews_h = yes; then
+ spt_type=SPT_SYSMIPS
+fi
+
+
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
+echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_psstrings+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <machine/vmparam.h>
+#include <sys/exec.h>
+#ifndef PS_STRINGS
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_psstrings=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_psstrings=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_psstrings = yes; then
+ spt_type=SPT_PSSTRINGS
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_psstrings" >&5
+echo "${ECHO_T}$cyrus_cv_sys_psstrings" >&6
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for SCO" >&5
+echo $ECHO_N "checking for SCO... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_sco+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifndef _SCO_unix_
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_sco=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_sco=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_sco = yes; then
+ spt_type=SPT_SCO
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_sco" >&5
+echo "${ECHO_T}$cyrus_cv_sys_sco" >&6
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for setproctitle usability" >&5
+echo $ECHO_N "checking for setproctitle usability... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if defined(DGUX) || defined(_SEQUENT_) || defined(apollo)
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_setproctitle = no; then
+ spt_type=SPT_NONE
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_setproctitle" >&5
+echo "${ECHO_T}$cyrus_cv_sys_setproctitle" >&6
+fi
+if test "$spt_type" != ""; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SPT_TYPE $spt_type
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking nonblocking method" >&5
+echo $ECHO_N "checking nonblocking method... $ECHO_C" >&6
+if test "${cyrus_cv_sys_nonblock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/file.h>
+#include <fcntl.h>
+#ifndef FNDELAY
+#define FNDELAY O_NDELAY
+#endif
+int
+main ()
+{
+fcntl(0, F_GETFL, 0)&FNDELAY
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_sys_nonblock=fcntl
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cyrus_cv_sys_nonblock=ioctl
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+WITH_NONBLOCK=$cyrus_cv_sys_nonblock
+
+echo "$as_me:$LINENO: result: $WITH_NONBLOCK" >&5
+echo "${ECHO_T}$WITH_NONBLOCK" >&6
+
+echo "$as_me:$LINENO: checking timezone GMT offset method" >&5
+echo $ECHO_N "checking timezone GMT offset method... $ECHO_C" >&6
+if test "${cyrus_cv_struct_sys_gmtoff+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <time.h>
+int
+main ()
+{
+struct tm tm;
+tm.tm_gmtoff = 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_struct_sys_gmtoff=tm
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cyrus_cv_struct_sys_gmtoff=gmtime
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff
+
+echo "$as_me:$LINENO: result: $WITH_GMTOFF" >&5
+echo "${ECHO_T}$WITH_GMTOFF" >&6
+echo "$as_me:$LINENO: checking for shared mmap" >&5
+echo $ECHO_N "checking for shared mmap... $ECHO_C" >&6
+if test "${cyrus_cv_func_mmap_shared+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ cyrus_cv_func_mmap_shared=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+main() {
+char *base;
+int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
+if (fd == -1) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+, fd, 0L);
+if (base == (caddr_t)-1) exit(1);
+if (strncmp(base, "test", 4) != 0) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+if (strncmp(base+4, "test", 4) != 0) exit(1);
+exit(0);}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_func_mmap_shared=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cyrus_cv_func_mmap_shared=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_shared" >&5
+echo "${ECHO_T}$cyrus_cv_func_mmap_shared" >&6
+if test $cyrus_cv_func_mmap_shared = yes; then
+ WITH_MAP="shared"
+else
+echo "$as_me:$LINENO: checking for stupid shared mmap" >&5
+echo $ECHO_N "checking for stupid shared mmap... $ECHO_C" >&6
+if test "${cyrus_cv_func_mmap_stupidshared+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ cyrus_cv_func_mmap_stupidshared=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+main() {
+char *base;
+int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
+if (fd == -1) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+, fd, 0L);
+if (base == (caddr_t)-1) exit(1);
+if (strncmp(base, "test", 4) != 0) exit(1);
+lseek(fd, 0L, 0);
+if (write(fd, "xyzz", 4) != 4) exit(1);
+fsync(fd);
+if (strncmp(base, "xyzz", 4) != 0) exit(1);
+exit(0);}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_func_mmap_stupidshared=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cyrus_cv_func_mmap_stupidshared=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_stupidshared" >&5
+echo "${ECHO_T}$cyrus_cv_func_mmap_stupidshared" >&6
+if test $cyrus_cv_func_mmap_stupidshared = yes; then
+ WITH_MAP="stupidshared"
+else
+ { echo "$as_me:$LINENO: WARNING: *** This system does not have a working mmap()" >&5
+echo "$as_me: WARNING: *** This system does not have a working mmap()" >&2;}
+ { echo "$as_me:$LINENO: WARNING: *** Expect a considerable performance penalty" >&5
+echo "$as_me: WARNING: *** Expect a considerable performance penalty" >&2;}
+ WITH_MAP=nommap
+fi
+fi
+
+
+
+# Check whether --with-lock or --without-lock was given.
+if test "${with_lock+set}" = set; then
+ withval="$with_lock"
+ WITH_LOCK="$withval"
+else
+
+ echo "$as_me:$LINENO: checking for fcntl" >&5
+echo $ECHO_N "checking for fcntl... $ECHO_C" >&6
+if test "${ac_cv_func_fcntl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define fcntl to an innocuous variant, in case <limits.h> declares fcntl.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define fcntl innocuous_fcntl
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char fcntl (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef fcntl
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fcntl ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_fcntl) || defined (__stub___fcntl)
+choke me
+#else
+char (*f) () = fcntl;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != fcntl;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fcntl=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_fcntl=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fcntl" >&5
+echo "${ECHO_T}$ac_cv_func_fcntl" >&6
+if test $ac_cv_func_fcntl = yes; then
+ WITH_LOCK="fcntl"
+else
+
+ echo "$as_me:$LINENO: checking for flock" >&5
+echo $ECHO_N "checking for flock... $ECHO_C" >&6
+if test "${ac_cv_func_flock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define flock to an innocuous variant, in case <limits.h> declares flock.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define flock innocuous_flock
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char flock (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef flock
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char flock ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_flock) || defined (__stub___flock)
+choke me
+#else
+char (*f) () = flock;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != flock;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_flock=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_flock=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_flock" >&5
+echo "${ECHO_T}$ac_cv_func_flock" >&6
+if test $ac_cv_func_flock = yes; then
+ WITH_LOCK="flock"
+else
+
+ { { echo "$as_me:$LINENO: error: unable to detect locking method" >&5
+echo "$as_me: error: unable to detect locking method" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
+
+fi;
+
+
+
+LIB_RT=""
+echo "$as_me:$LINENO: checking for fdatasync" >&5
+echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
+if test "${ac_cv_func_fdatasync+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define fdatasync to an innocuous variant, in case <limits.h> declares fdatasync.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define fdatasync innocuous_fdatasync
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char fdatasync (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef fdatasync
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fdatasync ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_fdatasync) || defined (__stub___fdatasync)
+choke me
+#else
+char (*f) () = fdatasync;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != fdatasync;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fdatasync=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_fdatasync=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fdatasync" >&5
+echo "${ECHO_T}$ac_cv_func_fdatasync" >&6
+if test $ac_cv_func_fdatasync = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_FDATASYNC
+_ACEOF
+
+else
+
+ echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
+echo $ECHO_N "checking for fdatasync in -lrt... $ECHO_C" >&6
+if test "${ac_cv_lib_rt_fdatasync+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fdatasync ();
+int
+main ()
+{
+fdatasync ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rt_fdatasync=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rt_fdatasync=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_fdatasync" >&6
+if test $ac_cv_lib_rt_fdatasync = yes; then
+
+ LIB_RT="-lrt"
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_FDATASYNC
+_ACEOF
+
+
+fi
+
+
+fi
+
+
+cant_find_sigvec=no
+if test "${cyrus_sigveclib+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ echo "$as_me:$LINENO: checking for sigvec" >&5
+echo $ECHO_N "checking for sigvec... $ECHO_C" >&6
+if test "${ac_cv_func_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define sigvec to an innocuous variant, in case <limits.h> declares sigvec.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define sigvec innocuous_sigvec
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sigvec (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef sigvec
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_sigvec) || defined (__stub___sigvec)
+choke me
+#else
+char (*f) () = sigvec;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sigvec;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sigvec" >&5
+echo "${ECHO_T}$ac_cv_func_sigvec" >&6
+if test $ac_cv_func_sigvec = yes; then
+
+ cyrus_sigveclib=""
+
+else
+
+ echo "$as_me:$LINENO: checking for sigvec in -lBSD" >&5
+echo $ECHO_N "checking for sigvec in -lBSD... $ECHO_C" >&6
+if test "${ac_cv_lib_BSD_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lBSD $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+int
+main ()
+{
+sigvec ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_BSD_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_BSD_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_sigvec" >&5
+echo "${ECHO_T}$ac_cv_lib_BSD_sigvec" >&6
+if test $ac_cv_lib_BSD_sigvec = yes; then
+ cyrus_sigveclib="-lBSD"
+else
+
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
+ echo "$as_me:$LINENO: checking for sigvec in -lucb" >&5
+echo $ECHO_N "checking for sigvec in -lucb... $ECHO_C" >&6
+if test "${ac_cv_lib_ucb_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lucb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+int
+main ()
+{
+sigvec ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ucb_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ucb_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_sigvec" >&5
+echo "${ECHO_T}$ac_cv_lib_ucb_sigvec" >&6
+if test $ac_cv_lib_ucb_sigvec = yes; then
+
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"
+else
+ cant_find_sigvec=yes
+fi
+
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+
+
+fi
+
+
+fi
+
+
+
+# ok, we still look for this stuff because of checking groups, but
+# all authentication goes through SASL
+
+
+# Check whether --with-afs or --without-afs was given.
+if test "${with_afs+set}" = set; then
+ withval="$with_afs"
+ with_afs="${withval}"
+else
+ with_afs="no"
+fi;
+
+
+# Check whether --with-ldap or --without-ldap was given.
+if test "${with_ldap+set}" = set; then
+ withval="$with_ldap"
+ with_ldap="${withval}"
+else
+ with_ldap="no"
+fi;
+
+# Check whether --enable-krb5afspts or --disable-krb5afspts was given.
+if test "${enable_krb5afspts+set}" = set; then
+ enableval="$enable_krb5afspts"
+ SASL_GSSAPI_LIBS_SET="yes"
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define AFSPTS_USE_KRB5
+_ACEOF
+
+fi;
+
+if test "x$with_afs" != "xno"; then
+ if test ! -d $with_afs; then
+ $with_afs=/usr/local
+ fi
+ CFLAGS="${CFLAGS} -I${with_afs}/include"
+ AFS_LIBS="${with_afs}/lib/afs/libkauth.a ${with_afs}/lib/afs/libprot.a ${with_afs}/lib/afs/libauth.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/librxkad.a ${with_afs}/lib/librx.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/libubik.a ${with_afs}/lib/liblwp.a ${with_afs}/lib/afs/util.a"
+ if test -f ${with_afs}/lib/afs/libaudit.a; then
+ AFS_LIBS="$AFS_LIBS ${with_afs}/lib/afs/libaudit.a"
+ fi
+ if test -f /usr/ucblib/libucb.a; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS}"
+ else
+ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS} $andrew_runpath_switch/usr/ucblib"
+ fi
+
+ AFS_LIBS="$AFS_LIBS -lc -lucb"
+ fi
+
+ if test "${cyrus_afs_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ SAVE_LIBS="$LIBS"
+ LIBS="${with_afs}/lib/liblwp.a"
+ echo "$as_me:$LINENO: checking if AFS libraries need sigvec" >&5
+echo $ECHO_N "checking if AFS libraries need sigvec... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+IOMGR_Initialize();
+int
+main ()
+{
+IOMGR_Initialize()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ cyrus_afs_sigvec="no"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cyrus_afs_sigvec="yes"
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test "$cyrus_afs_sigvec" = yes; then
+ if test "$cant_find_sigvec" = yes; then
+ { echo "$as_me:$LINENO: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&5
+echo "$as_me: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&2;}
+ else
+ AFS_LIBS="${AFS_LIBS} $cyrus_sigveclib"
+
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_AFSKRB
+_ACEOF
+
+ fi
+ else
+ AFS_LIBS="${AFS_LIBS}"
+
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_AFSKRB
+_ACEOF
+
+ fi
+ LIBS="$SAVE_LIBS"
+fi
+
+LDAP_CPPFLAGS=""
+LDAP_LDFLAGS=""
+LDAP_LIBS=""
+
+if test "x$with_ldap" != "xno"; then
+ if test ! -d $with_ldap; then
+ $with_ldap=/usr/local
+ fi
+
+ LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
+ LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib"
+ LDAP_LIBS=""
+
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS=$LDAP_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+ echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ldap_initialize ();
+int
+main ()
+{
+ldap_initialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_ldap_initialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ldap_ldap_initialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
+if test $ac_cv_lib_ldap_ldap_initialize = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LDAP
+_ACEOF
+
+
+
+
+ LDAP_LIBS="-lldap -llber"
+fi
+
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+ echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ldap_initialize ();
+int
+main ()
+{
+ldap_initialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_ldap_initialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ldap_ldap_initialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
+if test $ac_cv_lib_ldap_ldap_initialize = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LDAP
+_ACEOF
+
+
+
+
+ LDAP_LIBS="-lldap -llber"
+fi
+
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+fi
+
+if test "x$with_afs" != "xno" -o "x$with_ldap" != "xno"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile"
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_PTS
+_ACEOF
+
+fi
+
+
+
+SERVER_SUBDIRS="master imap"
+# Check whether --enable-server or --disable-server was given.
+if test "${enable_server+set}" = set; then
+ enableval="$enable_server"
+ if test "$enableval" = no; then
+ SERVER_SUBDIRS=""
+ fi
+fi;
+
+# We always output a server makefile (just because we can)
+
+
+# Check whether --with-krb or --without-krb was given.
+if test "${with_krb+set}" = set; then
+ withval="$with_krb"
+ with_krb="$withval"
+else
+ with_krb="no"
+fi;
+
+
+# Check whether --with-krbimpl or --without-krbimpl was given.
+if test "${with_krbimpl+set}" = set; then
+ withval="$with_krbimpl"
+ with_krbimpl="$withval"
+else
+ with_krbimpl="kth"
+fi;
+
+# Check whether --enable-statickrb or --disable-statickrb was given.
+if test "${enable_statickrb+set}" = set; then
+ enableval="$enable_statickrb"
+ with_statickrb="yes"
+else
+ with_statickrb="no"
+fi;
+
+
+
+echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBRESOLV 1
+_ACEOF
+
+ LIBS="-lresolv $LIBS"
+
+fi
+
+
+if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then
+ { { echo "$as_me:$LINENO: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&5
+echo "$as_me: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test "$with_krb" != "no"; then
+
+# Check whether --with-krbdes or --without-krbdes was given.
+if test "${with_krbdes+set}" = set; then
+ withval="$with_krbdes"
+ with_krbdes="$withval"
+else
+ with_krbdes="yes"
+fi;
+if test "$with_krbdes" = "yes"; then
+ echo "$as_me:$LINENO: checking for des_ecb_encrypt in -ldes" >&5
+echo $ECHO_N "checking for des_ecb_encrypt in -ldes... $ECHO_C" >&6
+if test "${ac_cv_lib_des_des_ecb_encrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char des_ecb_encrypt ();
+int
+main ()
+{
+des_ecb_encrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_des_des_ecb_encrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_des_des_ecb_encrypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_ecb_encrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_des_des_ecb_encrypt" >&6
+if test $ac_cv_lib_des_des_ecb_encrypt = yes; then
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$with_krb/lib/libdes.a"
+ else
+ KRB_LIBS="-ldes"
+ fi
+else
+ { { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
+echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+fi
+
+if test -d ${with_krb}; then
+ echo "$as_me:$LINENO: checking for Kerberos includes" >&5
+echo $ECHO_N "checking for Kerberos includes... $ECHO_C" >&6
+if test "${cyrus_krbinclude+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ for krbhloc in include/kerberosIV include
+ do
+ if test -f ${with_krb}/${krbhloc}/krb.h ; then
+ cyrus_krbinclude=${with_krb}/${krbhloc}
+ break
+ fi
+ done
+
+fi
+echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
+echo "${ECHO_T}$cyrus_krbinclude" >&6
+
+ if test -n "${cyrus_krbinclude}"; then
+ CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
+ fi
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L${with_krb}/lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L${with_krb}/lib $andrew_runpath_switch${with_krb}/lib ${LDFLAGS}"
+ fi
+
+fi
+
+if test "$with_krbimpl" != "kth"; then
+ KRBLIB="krb4"
+else
+ KRBLIB="krb"
+fi
+
+if test "$with_des" != no; then
+ if test "${ac_cv_header_krb_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking krb.h usability" >&5
+echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <krb.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking krb.h presence" >&5
+echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <krb.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_krb_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb_h" >&6
+
+fi
+if test $ac_cv_header_krb_h = yes; then
+ as_ac_Lib=`echo "ac_cv_lib_${KRBLIB}''_krb_mk_priv" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for krb_mk_priv in -l${KRBLIB}" >&5
+echo $ECHO_N "checking for krb_mk_priv in -l${KRBLIB}... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l${KRBLIB} $KRB_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb_mk_priv ();
+int
+main ()
+{
+krb_mk_priv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
+ else
+ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
+ fi
+else
+ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
+echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
+fi
+
+else
+ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
+echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
+fi
+
+
+else
+ { echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
+echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
+ krb4=no
+fi
+
+if test "${krb4}" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_KRB
+_ACEOF
+
+fi
+
+LIBS="$KRB_LIBS $LIBS"
+
+SASL_GSSAPI_LIBS_SET="yes"
+
+
+IMAP_PROGS=""
+
+# Check whether --with-openssl or --without-openssl was given.
+if test "${with_openssl+set}" = set; then
+ withval="$with_openssl"
+ with_openssl="${withval}"
+fi;
+
+OPENSSL_INC=
+OPENSSL_LIB=
+case "$with_openssl" in
+ no) with_openssl="no";;
+ ""|yes)
+ LIB_RSAREF=""
+ echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
+echo $ECHO_N "checking for RSAPublicEncrypt in -lrsaref... $ECHO_C" >&6
+if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrsaref $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char RSAPublicEncrypt ();
+int
+main ()
+{
+RSAPublicEncrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rsaref_RSAPublicEncrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rsaref_RSAPublicEncrypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6
+if test $ac_cv_lib_rsaref_RSAPublicEncrypt = yes; then
+ LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
+else
+ cmu_have_rsaref=no
+fi
+
+
+ with_openssl="yes"
+ echo "$as_me:$LINENO: checking for BIO_accept in -lcrypto" >&5
+echo $ECHO_N "checking for BIO_accept in -lcrypto... $ECHO_C" >&6
+if test "${ac_cv_lib_crypto_BIO_accept+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIB_RSAREF $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char BIO_accept ();
+int
+main ()
+{
+BIO_accept ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypto_BIO_accept=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypto_BIO_accept=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_BIO_accept" >&5
+echo "${ECHO_T}$ac_cv_lib_crypto_BIO_accept" >&6
+if test $ac_cv_lib_crypto_BIO_accept = yes; then
+ LIBS="-lcrypto $LIB_RSAREF ${LIBS}"
+else
+ with_openssl="no"
+fi
+
+ echo "$as_me:$LINENO: checking for SSL_CTX_new in -lssl" >&5
+echo $ECHO_N "checking for SSL_CTX_new in -lssl... $ECHO_C" >&6
+if test "${ac_cv_lib_ssl_SSL_CTX_new+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl -lcrypto $LIB_RSAREF $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char SSL_CTX_new ();
+int
+main ()
+{
+SSL_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ssl_SSL_CTX_new=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ssl_SSL_CTX_new=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_SSL_CTX_new" >&6
+if test $ac_cv_lib_ssl_SSL_CTX_new = yes; then
+ LIBS="-lssl ${LIBS}"
+else
+ with_openssl="no"
+fi
+
+
+ ;;
+ *) OPENSSL_INC="-I${with_openssl}/include"
+ OPENSSL_LIBPATH="${with_openssl}/lib"
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH}"
+ CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}"
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L${OPENSSL_LIBPATH} ${LDFLAGS}"
+ else
+ LDFLAGS="-L${OPENSSL_LIBPATH} $andrew_runpath_switch${OPENSSL_LIBPATH} ${LDFLAGS}"
+ fi
+
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB}"
+ else
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB} $andrew_runpath_switch${OPENSSL_LIBPATH}"
+ fi
+
+ LIBS="${LIBS} -lssl -lcrypto";;
+esac
+
+echo "$as_me:$LINENO: checking for openssl" >&5
+echo $ECHO_N "checking for openssl... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $with_openssl" >&5
+echo "${ECHO_T}$with_openssl" >&6
+
+if test "$with_openssl" != "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SSL
+_ACEOF
+
+ IMAP_PROGS="$IMAP_PROGS tls_prune"
+ if test "${krb4}" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define OPENSSL_ENABLE_OLD_DES_SUPPORT
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define OPENSSL_DES_LIBDES_COMPATIBILITY
+_ACEOF
+
+ fi
+fi
+
+
+
+
+# Check whether --with-egd-socket or --without-egd-socket was given.
+if test "${with_egd_socket+set}" = set; then
+ withval="$with_egd_socket"
+ EGD_SOCKET="$withval"
+
+fi;
+if test -n "$EGD_SOCKET" ; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define EGD_SOCKET "$EGD_SOCKET"
+_ACEOF
+
+fi
+
+
+# Check whether --with-zephyr or --without-zephyr was given.
+if test "${with_zephyr+set}" = set; then
+ withval="$with_zephyr"
+ with_zephyr="${withval}"
+fi;
+if test -z "$with_zephyr"; then
+ if test -f /usr/local/lib/libzephyr.a; then
+ with_zephyr="/usr/local"
+ elif test -f /usr/lib/libzephyr.a; then
+ with_zephyr="/usr"
+ fi
+fi
+ZEPHYR_LIBS=""
+ZEPHYR_CPPFLAGS=""
+case "$with_zephyr" in
+ no) true;;
+ ""|yes) echo "$as_me:$LINENO: checking for ZInitialize in -lzephyr" >&5
+echo $ECHO_N "checking for ZInitialize in -lzephyr... $ECHO_C" >&6
+if test "${ac_cv_lib_zephyr_ZInitialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lzephyr $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ZInitialize ();
+int
+main ()
+{
+ZInitialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_zephyr_ZInitialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_zephyr_ZInitialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitialize" >&5
+echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitialize" >&6
+if test $ac_cv_lib_zephyr_ZInitialize = yes; then
+ ZEPHYR_LIBS="-lzephyr"
+else
+ with_zephyr="no"
+fi
+;;
+ *) if test -d ${with_zephyr}/include/zephyr; then
+ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include/zephyr"
+ else
+ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include"
+ fi
+ ZEPHYR_LIBS="-lzephyr";;
+esac
+
+
+if test "$with_zephyr" != "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ZEPHYR
+_ACEOF
+
+fi
+
+
+# Check whether --with-pidfile or --without-pidfile was given.
+if test "${with_pidfile+set}" = set; then
+ withval="$with_pidfile"
+ MASTERPIDFILE="$withval"
+else
+ MASTERPIDFILE="/var/run/cyrus-master.pid"
+fi;
+MASTERPIDFILE="\"$MASTERPIDFILE\""
+
+cat >>confdefs.h <<_ACEOF
+@%:@define MASTER_PIDFILE $MASTERPIDFILE
+_ACEOF
+
+
+# Check whether --enable-idled or --disable-idled was given.
+if test "${enable_idled+set}" = set; then
+ enableval="$enable_idled"
+ if test "$enable_val" != no; then
+ IMAP_PROGS="$IMAP_PROGS idled"
+ fi
+fi;
+
+ENABLE_NNTP=no
+# Check whether --enable-nntp or --disable-nntp was given.
+if test "${enable_nntp+set}" = set; then
+ enableval="$enable_nntp"
+ ENABLE_NNTP=$enableval
+ if test "$ENABLE_NNTP" != no; then
+ IMAP_PROGS="$IMAP_PROGS nntpd fetchnews"
+ fi
+fi;
+
+ENABLE_MURDER=no
+# Check whether --enable-murder or --disable-murder was given.
+if test "${enable_murder+set}" = set; then
+ enableval="$enable_murder"
+ ENABLE_MURDER=$enableval
+fi;
+
+if test "$ENABLE_MURDER" != no; then
+ IMAP_PROGS="$IMAP_PROGS mupdate"
+ # for master/slave auto-selection
+
+for ac_header in sys/sockio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+fi
+
+ENABLE_REPLICATION=no
+# Check whether --enable-replication or --disable-replication was given.
+if test "${enable_replication+set}" = set; then
+ enableval="$enable_replication"
+ ENABLE_REPLICATION=$enableval
+ if test "$ENABLE_REPLICATION" != no; then
+ IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset make_md5"
+ fi
+fi;
+
+
+
+
+# Check whether --with-com_err or --without-com_err was given.
+if test "${with_com_err+set}" = set; then
+ withval="$with_com_err"
+
+fi;
+if test -z "$with_com_err"; then
+ # no value supplied
+ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
+echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
+if test "${ac_cv_lib_com_err_com_err+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcom_err $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char com_err ();
+int
+main ()
+{
+com_err ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_com_err_com_err=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_com_err_com_err=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
+echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
+if test $ac_cv_lib_com_err_com_err = yes; then
+
+ # com_err is already in library path
+ # guess we're okay
+ # can use system com_err
+ with_com_err=""
+ if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for et/com_err.h" >&5
+echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking et/com_err.h usability" >&5
+echo $ECHO_N "checking et/com_err.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <et/com_err.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking et/com_err.h presence" >&5
+echo $ECHO_N "checking et/com_err.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <et/com_err.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: et/com_err.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: et/com_err.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: et/com_err.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: et/com_err.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for et/com_err.h" >&5
+echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_et_com_err_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6
+
+fi
+if test $ac_cv_header_et_com_err_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ET_COM_ERR_H
+_ACEOF
+
+else
+ if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for com_err.h" >&5
+echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking com_err.h usability" >&5
+echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <com_err.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking com_err.h presence" >&5
+echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <com_err.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: com_err.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: com_err.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: com_err.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for com_err.h" >&5
+echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_com_err_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+
+fi
+if test $ac_cv_header_com_err_h = yes; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: cannot locate com_err.h" >&5
+echo "$as_me: error: cannot locate com_err.h" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+fi
+
+
+ # Extract the first word of "compile_et", so it can be a program name with args.
+set dummy compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+else
+
+ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
+ with_com_err="/usr/local"
+ # Extract the first word of "/usr/local/bin/compile_et", so it can be a program name with args.
+set dummy /usr/local/bin/compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
+ with_com_err="/usr"
+ # Extract the first word of "/usr/bin/compile_et", so it can be a program name with args.
+set dummy /usr/bin/compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ else
+ # use ours
+ with_com_err=yes
+ fi
+
+fi
+
+
+ if test "${with_com_err}" = "no"; then
+ { echo "$as_me:$LINENO: WARNING: com_err is required; included version will be used." >&5
+echo "$as_me: WARNING: com_err is required; included version will be used." >&2;}
+ with_com_err="yes"
+ fi
+ if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then
+ { echo "$as_me:$LINENO: WARNING: Parts of com_err distribuion were found, but not compile_et." >&5
+echo "$as_me: WARNING: Parts of com_err distribuion were found, but not compile_et." >&2;}
+ { echo "$as_me:$LINENO: WARNING: Will build com_err from included sources." >&5
+echo "$as_me: WARNING: Will build com_err from included sources." >&2;}
+ with_com_err="yes" # build it ourselves
+ fi
+fi
+
+case "$with_com_err" in
+ # built-in et
+ yes) # use the com_err we're gonna build
+ COM_ERR_LIBS="../et/libcom_err.a"
+ COMPILE_ET="../et/compile_et"
+ COM_ERR_LDFLAGS=""
+ COM_ERR_CPPFLAGS="-I\${top_srcdir}/et"
+ PRE_SUBDIRS="et ${PRE_SUBDIRS}"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} et/Makefile"
+ ;;
+ "") # no problem, we already have it in the paths
+ # we do nothing to pick it up
+ COM_ERR_LIBS="-lcom_err" # hope it's not shared
+ # we already set COMPILE_ET, or we didn't get here
+ COM_ERR_LDFLAGS=""
+ COM_ERR_CPPFLAGS=""
+ ;;
+ *) # use whatever they told us, or whatever we found
+ COMPILE_ET="${with_com_err}/bin/compile_et"
+ COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a"
+ COM_ERR_CPPFLAGS="-I${with_com_err}/include"
+ # Ever get the feeling people hide this stuff on purpose?
+ if test -d "${with_com_err}/include/et" ; then
+ COM_ERR_CPPFLAGS="-I${with_com_err}/include/et"
+ fi
+ COMPILE_ET="${with_com_err}/bin/compile_et"
+esac
+
+
+
+
+
+echo "$as_me:$LINENO: checking for modern syslog" >&5
+echo $ECHO_N "checking for modern syslog... $ECHO_C" >&6
+if test "${cyrus_cv_lib_syslog+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <syslog.h>
+#ifndef LOG_LOCAL6
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_lib_syslog=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_lib_syslog=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+if test $cyrus_cv_lib_syslog = no; then
+ PRE_SUBDIRS="${PRE_SUBDIRS} syslog"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile"
+ DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a"
+ CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog"
+fi
+echo "$as_me:$LINENO: result: $cyrus_cv_lib_syslog" >&5
+echo "${ECHO_T}$cyrus_cv_lib_syslog" >&6
+
+echo "$as_me:$LINENO: checking which syslog facility to use" >&5
+echo $ECHO_N "checking which syslog facility to use... $ECHO_C" >&6
+SYSLOG_FACILITY=LOG_LOCAL6
+
+# Check whether --with-syslogfacility or --without-syslogfacility was given.
+if test "${with_syslogfacility+set}" = set; then
+ withval="$with_syslogfacility"
+ if test "$withval" != "yes" -a "$withval" != "no" ; then
+ SYSLOG_FACILITY=LOG_$withval
+ fi;
+fi;
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SYSLOG_FACILITY $SYSLOG_FACILITY
+_ACEOF
+
+echo "$as_me:$LINENO: result: $SYSLOG_FACILITY" >&5
+echo "${ECHO_T}$SYSLOG_FACILITY" >&6
+
+
+for ac_func in getdtablesize
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case $LIB@&t at OBJS in
+ "$ac_func.$ac_objext" | \
+ *" $ac_func.$ac_objext" | \
+ "$ac_func.$ac_objext "* | \
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIB@&t at OBJS="$LIB@&t at OBJS $ac_func.$ac_objext" ;;
+esac
+
+fi
+done
+
+
+# Check whether --enable-cmulocal or --disable-cmulocal was given.
+if test "${enable_cmulocal+set}" = set; then
+ enableval="$enable_cmulocal"
+ if test "$enableval" = yes; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile"
+ fi
+fi;
+
+echo "$as_me:$LINENO: checking to use old sieve service name" >&5
+echo $ECHO_N "checking to use old sieve service name... $ECHO_C" >&6
+# Check whether --enable-oldsievename or --disable-oldsievename was given.
+if test "${enable_oldsievename+set}" = set; then
+ enableval="$enable_oldsievename"
+ if test "$enableval" = yes; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define OLD_SIEVE_SERVICE_NAME
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
+
+# Check whether --enable-listext or --disable-listext was given.
+if test "${enable_listext+set}" = set; then
+ enableval="$enable_listext"
+ if test "$enableval" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define ENABLE_LISTEXT
+_ACEOF
+
+ fi
+fi;
+
+# Check whether --enable-netscapehack or --disable-netscapehack was given.
+if test "${enable_netscapehack+set}" = set; then
+ enableval="$enable_netscapehack"
+ if test "$enableval" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define ENABLE_X_NETSCAPE_HACK
+_ACEOF
+
+ fi
+fi;
+
+echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ :
+else
+
+echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for crypt" >&5
+echo $ECHO_N "checking for crypt... $ECHO_C" >&6
+if test "${ac_cv_func_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define crypt innocuous_crypt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char crypt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef crypt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_crypt) || defined (__stub___crypt)
+choke me
+#else
+char (*f) () = crypt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != crypt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_crypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
+echo "${ECHO_T}$ac_cv_func_crypt" >&6
+if test $ac_cv_func_crypt = yes; then
+ cmu_have_crypt=yes
+else
+ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+int
+main ()
+{
+crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypt_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypt_crypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
+ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
+else
+ cmu_have_crypt=no
+fi
+
+fi
+
+
+
+
+
+# Check whether --enable-gssapi or --disable-gssapi was given.
+if test "${enable_gssapi+set}" = set; then
+ enableval="$enable_gssapi"
+ gssapi=$enableval
+else
+ gssapi=yes
+fi;
+
+# Check whether --with-gss_impl or --without-gss_impl was given.
+if test "${with_gss_impl+set}" = set; then
+ withval="$with_gss_impl"
+ gss_impl=$withval
+else
+ gss_impl=auto
+fi;
+
+if test "$gssapi" != no; then
+ platform=
+ case "${host}" in
+ *-*-linux*)
+ platform=__linux
+ ;;
+ *-*-hpux*)
+ platform=__hpux
+ ;;
+ *-*-irix*)
+ platform=__irix
+ ;;
+ *-*-solaris2*)
+# When should we use __sunos?
+ platform=__solaris
+ ;;
+ *-*-aix*)
+###_AIX
+ platform=__aix
+ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
+echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
+ if test "$gss_impl" = "cybersafe"; then
+ { { echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
+echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ ;;
+ esac
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+
+ if test -d ${gssapi}; then
+ CPPFLAGS="$CPPFLAGS -I$gssapi/include"
+# We want to keep -I in our CPPFLAGS, but only if we succeed
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+### I am not sure how useful is this (and whether this is required at all
+### especially when we have to provide two -L flags for new CyberSafe
+ LDFLAGS="$LDFLAGS -L$gssapi/lib"
+
+ if test -n "$platform"; then
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+ fi
+ fi
+ fi
+ if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for gssapi.h" >&5
+echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking gssapi.h usability" >&5
+echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <gssapi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking gssapi.h presence" >&5
+echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <gssapi.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for gssapi.h" >&5
+echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_gssapi_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
+
+fi
+if test $ac_cv_header_gssapi_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSSAPI_H
+_ACEOF
+
+else
+ if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
+echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
+echo $ECHO_N "checking gssapi/gssapi.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <gssapi/gssapi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
+echo $ECHO_N "checking gssapi/gssapi.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <gssapi/gssapi.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
+echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
+
+fi
+if test $ac_cv_header_gssapi_gssapi_h = yes; then
+ :
+else
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
+fi
+
+
+fi
+
+
+
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+fi
+
+if test "$gssapi" != no; then
+ # We need to find out which gssapi implementation we are
+ # using. Supported alternatives are: MIT Kerberos 5,
+ # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
+ # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
+ # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
+ #
+ # The choice is reflected in GSSAPIBASE_LIBS
+
+
+echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBRESOLV 1
+_ACEOF
+
+ LIBS="-lresolv $LIBS"
+
+fi
+
+ if test -d ${gssapi}; then
+ gssapi_dir="${gssapi}/lib"
+ GSSAPIBASE_LIBS="-L$gssapi_dir"
+ GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
+ else
+ # FIXME: This is only used for building cyrus, and then only as
+ # a real hack. it needs to be fixed.
+ gssapi_dir="/usr/local/lib"
+ fi
+
+ # Check a full link against the Heimdal libraries.
+ # If this fails, check a full link against the MIT libraries.
+ # If this fails, check a full link against the CyberSafe libraries.
+ # If this fails, check a full link against the Solaris 8 and up libgss.
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgssapi... $ECHO_C" >&6
+if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gssapi_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gssapi_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gssapi_gss_unwrap" >&6
+if test $ac_cv_lib_gssapi_gss_unwrap = yes; then
+ gss_impl="heimdal"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
+ # check for libkrb5support first
+ echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
+echo $ECHO_N "checking for krb5int_getspecific in -lkrb5support... $ECHO_C" >&6
+if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb5int_getspecific ();
+int
+main ()
+{
+krb5int_getspecific ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_krb5support_krb5int_getspecific=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_krb5support_krb5int_getspecific=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
+echo "${ECHO_T}$ac_cv_lib_krb5support_krb5int_getspecific" >&6
+if test $ac_cv_lib_krb5support_krb5int_getspecific = yes; then
+ K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
+fi
+
+
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgssapi_krb5... $ECHO_C" >&6
+if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gssapi_krb5_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gssapi_krb5_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6
+if test $ac_cv_lib_gssapi_krb5_gss_unwrap = yes; then
+ gss_impl="mit"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ # For Cybersafe one has to set a platform define in order to make compilation work
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+ cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
+# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
+ if test -d "${gssapi}/appsec-rt/lib"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
+ fi
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+
+ gss_failed=0
+
+# Check for CyberSafe with two libraries first, than fall back to a single
+# library (older CyberSafe)
+
+ unset ac_cv_lib_gss_csf_gss_acq_user
+ echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
+echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char csf_gss_acq_user ();
+int
+main ()
+{
+csf_gss_acq_user ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_csf_gss_acq_user=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_csf_gss_acq_user=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6
+if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
+ gss_impl="cybersafe03"
+else
+ unset ac_cv_lib_gss_csf_gss_acq_user;
+ echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
+echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char csf_gss_acq_user ();
+int
+main ()
+{
+csf_gss_acq_user ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_csf_gss_acq_user=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_csf_gss_acq_user=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6
+if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
+ gss_impl="cybersafe"
+else
+ gss_failed=1
+fi
+
+fi
+
+
+ if test "$gss_failed" = "1"; then
+# Restore variables
+ GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+ if test "$gss_impl" != "auto"; then
+ gss_impl="failed"
+ fi
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss -lgss $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_gss_unwrap" >&6
+if test $ac_cv_lib_gss_gss_unwrap = yes; then
+ gss_impl="seam"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "mit"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
+ elif test "$gss_impl" = "heimdal"; then
+ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
+ elif test "$gss_impl" = "cybersafe03"; then
+# Version of CyberSafe with two libraries
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "seam"; then
+ GSSAPIBASE_LIBS=-lgss
+ # there is no static libgss on Solaris 8 and up
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "failed"; then
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
+ else
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
+ fi
+fi
+
+#
+# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
+# in gssapi\rfckrb5.h
+#
+if test "$gssapi" != "no"; then
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_HOSTBASED_SERVICE
+ hostbased_service_gss_nt_yes
+ #endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+else
+ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
+echo "$as_me: WARNING: Cybersafe define not found" >&2;}
+fi
+rm -f conftest*
+
+
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+fi
+rm -f conftest*
+
+ fi
+
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_USER_NAME
+ user_name_yes_gss_nt
+ #endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+else
+ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
+echo "$as_me: WARNING: Cybersafe define not found" >&2;}
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+fi
+rm -f conftest*
+
+ fi
+fi
+
+GSSAPI_LIBS=""
+echo "$as_me:$LINENO: checking GSSAPI" >&5
+echo $ECHO_N "checking GSSAPI... $ECHO_C" >&6
+if test "$gssapi" != no; then
+ echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
+echo "${ECHO_T}with implementation ${gss_impl}" >&6
+ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
+fi
+
+ SASL_MECHS="$SASL_MECHS libgssapiv2.la"
+ SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
+ SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
+
+ cmu_save_LIBS="$LIBS"
+ LIBS="$LIBS $GSSAPIBASE_LIBS"
+
+for ac_func in gsskrb5_register_acceptor_identity
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$cmu_save_LIBS"
+else
+ echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6
+fi
+
+
+
+
+
+
+# Check whether --with-sasl or --without-sasl was given.
+if test "${with_sasl+set}" = set; then
+ withval="$with_sasl"
+ with_sasl="$withval"
+else
+ with_sasl="yes"
+fi;
+
+
+# Check whether --with-staticsasl or --without-staticsasl was given.
+if test "${with_staticsasl+set}" = set; then
+ withval="$with_staticsasl"
+ with_staticsasl="$withval";
+ if test $with_staticsasl != "no"; then
+ using_static_sasl="static"
+ fi
+else
+ with_staticsasl="no"; using_static_sasl="no"
+fi;
+
+SASLFLAGS=""
+LIB_SASL=""
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+cmu_saved_LDFLAGS=$LDFLAGS
+cmu_saved_LIBS=$LIBS
+
+if test ${with_staticsasl} != "no"; then
+ if test -d ${with_staticsasl}; then
+ if test -d ${with_staticsasl}/lib64 ; then
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib64
+ else
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ fi
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ ac_cv_sasl_where_inc=${with_staticsasl}/include
+
+ SASLFLAGS="-I$ac_cv_sasl_where_inc"
+ LIB_SASL="-L$ac_cv_sasl_where_lib"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+ else
+ with_staticsasl="/usr"
+ fi
+
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
+echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sasl/sasl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
+echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sasl/sasl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_sasl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+
+fi
+if test $ac_cv_header_sasl_sasl_h = yes; then
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
+echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sasl/saslutil.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
+echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sasl/saslutil.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+
+fi
+if test $ac_cv_header_sasl_saslutil_h = yes; then
+ for i42 in lib64 lib; do
+ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
+ ac_cv_found_sasl=yes
+ echo "$as_me:$LINENO: checking for static libsasl" >&5
+echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6
+ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
+ fi
+ done
+ if test ! "$ac_cv_found_sasl" = "yes"; then
+ echo "$as_me:$LINENO: checking for static libsasl" >&5
+echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6
+ { { echo "$as_me:$LINENO: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&5
+echo "$as_me: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+
+fi
+
+
+
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
+
+ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
+ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
+ else
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
+ fi
+fi
+
+if test -d ${with_sasl}; then
+ ac_cv_sasl_where_lib=${with_sasl}/lib
+ ac_cv_sasl_where_inc=${with_sasl}/include
+
+ DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
+ if test "$ac_cv_sasl_where_lib" != ""; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL}"
+ else
+ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
+ fi
+
+ fi
+ LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+fi
+
+# be sure to check for a SASLv2 specific function
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
+echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sasl/sasl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
+echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sasl/sasl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_sasl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+
+fi
+if test $ac_cv_header_sasl_sasl_h = yes; then
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
+echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <sasl/saslutil.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
+echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <sasl/saslutil.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+
+fi
+if test $ac_cv_header_sasl_saslutil_h = yes; then
+ echo "$as_me:$LINENO: checking for prop_get in -lsasl2" >&5
+echo $ECHO_N "checking for prop_get in -lsasl2... $ECHO_C" >&6
+if test "${ac_cv_lib_sasl2_prop_get+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsasl2 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char prop_get ();
+int
+main ()
+{
+prop_get ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sasl2_prop_get=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sasl2_prop_get=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_prop_get" >&5
+echo "${ECHO_T}$ac_cv_lib_sasl2_prop_get" >&6
+if test $ac_cv_lib_sasl2_prop_get = yes; then
+ ac_cv_found_sasl=yes
+else
+ ac_cv_found_sasl=no
+fi
+
+else
+ ac_cv_found_sasl=no
+fi
+
+
+else
+ ac_cv_found_sasl=no
+fi
+
+
+
+if test "$ac_cv_found_sasl" = "yes"; then
+ if test "$ac_cv_sasl_where_lib" != ""; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL}"
+ else
+ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
+ fi
+
+ fi
+ DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
+ if test "$using_static_sasl" != "static"; then
+ LIB_SASL=$DYNLIB_SASL
+ SASLFLAGS=$DYNSASLFLAGS
+ fi
+else
+ DYNLIB_SASL=""
+ DYNSASLFLAGS=""
+ using_static_sasl="staticonly"
+fi
+
+if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
+fi
+
+LIBS="$cmu_saved_LIBS"
+LDFLAGS="$cmu_saved_LDFLAGS"
+CPPFLAGS="$cmu_saved_CPPFLAGS"
+
+
+
+
+
+
+
+if test "$ac_cv_found_sasl" != "yes"; then
+ { { echo "$as_me:$LINENO: error: Cannot continue without libsasl2.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&5
+echo "$as_me: error: Cannot continue without libsasl2.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $SASLFLAGS"
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sasl/sasl.h>
+
+#ifndef SASL_VERSION_MAJOR
+#error SASL_VERSION_MAJOR not defined
+#endif
+#ifndef SASL_VERSION_MINOR
+#error SASL_VERSION_MINOR not defined
+#endif
+#ifndef SASL_VERSION_STEP
+#error SASL_VERSION_STEP not defined
+#endif
+
+#if SASL_VERSION_MAJOR < 2 || SASL_VERSION_MINOR < 1 || SASL_VERSION_STEP < 7
+#error SASL version is less than 2.1.7
+#endif
+
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { { echo "$as_me:$LINENO: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&5
+echo "$as_me: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_ext
+
+CPPFLAGS=$cmu_saved_CPPFLAGS
+
+
+
+cmu_saved_LDFLAGS=$LDFLAGS
+
+LDFLAGS="$LDFLAGS $LIB_SASL"
+
+echo "$as_me:$LINENO: checking for sasl_checkapop in -lsasl2" >&5
+echo $ECHO_N "checking for sasl_checkapop in -lsasl2... $ECHO_C" >&6
+if test "${ac_cv_lib_sasl2_sasl_checkapop+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsasl2 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sasl_checkapop ();
+int
+main ()
+{
+sasl_checkapop ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sasl2_sasl_checkapop=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sasl2_sasl_checkapop=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_checkapop" >&5
+echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_checkapop" >&6
+if test $ac_cv_lib_sasl2_sasl_checkapop = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_APOP
+_ACEOF
+
+else
+ { { echo "$as_me:$LINENO: error: libsasl2 without working sasl_checkapop. Cannot continue." >&5
+echo "$as_me: error: libsasl2 without working sasl_checkapop. Cannot continue." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+LDFLAGS=$cmu_saved_LDFLAGS
+
+
+
+# Check whether --with-perl or --without-perl was given.
+if test "${with_perl+set}" = set; then
+ withval="$with_perl"
+ with_perl="$withval"
+else
+ with_perl="perl"
+fi;
+
+if test "${with_perl}" = yes; then
+ with_perl="perl"
+fi
+if test "${with_perl}" != no; then
+ if test ${using_static_sasl} = "staticonly"; then
+ { echo "$as_me:$LINENO: WARNING: Cannot compile perl utilities using static libsasl" >&5
+echo "$as_me: WARNING: Cannot compile perl utilities using static libsasl" >&2;}
+ with_perl="no"
+ else
+ for ac_prog in ${with_perl} perl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PERL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$PERL"; then
+ ac_cv_prog_PERL="$PERL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PERL="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+PERL=$ac_cv_prog_PERL
+if test -n "$PERL"; then
+ echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$PERL" && break
+done
+test -n "$PERL" || PERL="with_perl=notfound"
+
+ fi
+fi
+if test "$with_perl" = "notfound"; then
+ { echo "$as_me:$LINENO: WARNING: Perl not found: Administrative tools won't be available" >&5
+echo "$as_me: WARNING: Perl not found: Administrative tools won't be available" >&2;}
+elif test "${with_perl}" != "no"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl"
+ PERL_SUBDIRS="imap"
+ PERL="${with_perl}"
+ PERL_CCCDLFLAGS="$cccdlflags"
+
+fi
+
+if test "$sievedir" != "no"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile"
+
+ PERL_SUBDIRS="${PERL_SUBDIRS} sieve"
+ PERL_DEPSUBDIRS="sieve"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile"
+else
+ PERL_DEPSUBDIRS="none"
+fi
+
+echo "$as_me:$LINENO: checking for MD5Init" >&5
+echo $ECHO_N "checking for MD5Init... $ECHO_C" >&6
+if test "${ac_cv_func_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define MD5Init to an innocuous variant, in case <limits.h> declares MD5Init.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define MD5Init innocuous_MD5Init
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char MD5Init (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef MD5Init
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char MD5Init ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_MD5Init) || defined (__stub___MD5Init)
+choke me
+#else
+char (*f) () = MD5Init;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != MD5Init;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_MD5Init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_MD5Init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_MD5Init" >&5
+echo "${ECHO_T}$ac_cv_func_MD5Init" >&6
+if test $ac_cv_func_MD5Init = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for MD5Init in -lmd" >&5
+echo $ECHO_N "checking for MD5Init in -lmd... $ECHO_C" >&6
+if test "${ac_cv_lib_md_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char MD5Init ();
+int
+main ()
+{
+MD5Init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_md_MD5Init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_md_MD5Init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Init" >&5
+echo "${ECHO_T}$ac_cv_lib_md_MD5Init" >&6
+if test $ac_cv_lib_md_MD5Init = yes; then
+ LIBS="${LIBS} -lmd"
+else
+ MD5OBJ="md5.o"
+fi
+
+fi
+
+
+
+SNMP_SUBDIRS=""
+
+
+
+# Check whether --with-lib-subdir or --without-lib-subdir was given.
+if test "${with_lib_subdir+set}" = set; then
+ withval="$with_lib_subdir"
+
+fi;
+echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
+echo $ECHO_N "checking what directory libraries are found in... $ECHO_C" >&6
+if test "${ac_cv_cmu_lib_subdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
+test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
+if test "X$with_lib_subdir" = "X" ; then
+ ac_cv_cmu_lib_subdir=lib
+ if test $ac_cv_sizeof_long -eq 4 ; then
+ test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
+ fi
+ if test $ac_cv_sizeof_long -eq 8 ; then
+ test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
+ fi
+else
+ ac_cv_cmu_lib_subdir=$with_lib_subdir
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
+echo "${ECHO_T}$ac_cv_cmu_lib_subdir" >&6
+CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
+
+
+
+
+
+
+# Check whether --with-libwrap or --without-libwrap was given.
+if test "${with_libwrap+set}" = set; then
+ withval="$with_libwrap"
+ with_libwrap=$withval
+else
+ with_libwrap=yes
+fi;
+ if test "$with_libwrap" != no; then
+ if test -d "$with_libwrap"; then
+ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
+ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ echo "$as_me:$LINENO: checking for request_init in -lwrap" >&5
+echo $ECHO_N "checking for request_init in -lwrap... $ECHO_C" >&6
+if test "${ac_cv_lib_wrap_request_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwrap ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char request_init ();
+int
+main ()
+{
+request_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_wrap_request_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_wrap_request_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_request_init" >&5
+echo "${ECHO_T}$ac_cv_lib_wrap_request_init" >&6
+if test $ac_cv_lib_wrap_request_init = yes; then
+
+ if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for tcpd.h" >&5
+echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
+if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
+echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking tcpd.h usability" >&5
+echo $ECHO_N "checking tcpd.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <tcpd.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking tcpd.h presence" >&5
+echo $ECHO_N "checking tcpd.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <tcpd.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: tcpd.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: tcpd.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: tcpd.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: tcpd.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: tcpd.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: tcpd.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for tcpd.h" >&5
+echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
+if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_tcpd_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
+echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
+
+fi
+if test $ac_cv_header_tcpd_h = yes; then
+ :
+else
+ with_libwrap=no
+fi
+
+
+else
+ with_libwrap=no
+fi
+
+ LIBS="$cmu_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: checking libwrap support" >&5
+echo $ECHO_N "checking libwrap support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $with_libwrap" >&5
+echo "${ECHO_T}$with_libwrap" >&6
+ LIB_WRAP=""
+ if test "$with_libwrap" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LIBWRAP
+_ACEOF
+
+ LIB_WRAP="-lwrap"
+ echo "$as_me:$LINENO: checking for yp_get_default_domain in -lnsl" >&5
+echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yp_get_default_domain ();
+int
+main ()
+{
+yp_get_default_domain ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_yp_get_default_domain=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_yp_get_default_domain=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6
+if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then
+ LIB_WRAP="${LIB_WRAP} -lnsl"
+fi
+
+ fi
+
+
+
+
+
+
+# Check whether --with-snmp or --without-snmp was given.
+if test "${with_snmp+set}" = set; then
+ withval="$with_snmp"
+ with_snmp=$withval
+else
+ with_snmp=yes
+fi;
+
+
+# Check whether --with-ucdsnmp or --without-ucdsnmp was given.
+if test "${with_ucdsnmp+set}" = set; then
+ withval="$with_ucdsnmp"
+ with_snmp=$withval
+fi;
+
+if test "$with_snmp" != "no"; then
+
+ if test "$with_snmp" = "yes"; then
+ # Extract the first word of "net-snmp-config", so it can be a program name with args.
+set dummy net-snmp-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_SNMP_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $SNMP_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="/usr/local/bin:$PATH"
+for as_dir in $as_dummy
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG
+
+if test -n "$SNMP_CONFIG"; then
+ echo "$as_me:$LINENO: result: $SNMP_CONFIG" >&5
+echo "${ECHO_T}$SNMP_CONFIG" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ else
+ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
+ fi
+
+ if test -x "$SNMP_CONFIG"; then
+ echo "$as_me:$LINENO: checking NET SNMP libraries" >&5
+echo $ECHO_N "checking NET SNMP libraries... $ECHO_C" >&6
+
+ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
+ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
+
+ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
+ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
+ LIB_UCDSNMP=$SNMP_LIBS
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_NETSNMP 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: WARNING: Could not find the required paths. Please check your net-snmp installation." >&5
+echo "$as_me: WARNING: Could not find the required paths. Please check your net-snmp installation." >&2;}
+ fi
+ else
+ if test "$with_snmp" != no; then
+ if test -d "$with_snmp"; then
+ CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
+ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ echo "$as_me:$LINENO: checking for sprint_objid in -lsnmp" >&5
+echo $ECHO_N "checking for sprint_objid in -lsnmp... $ECHO_C" >&6
+if test "${ac_cv_lib_snmp_sprint_objid+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsnmp ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sprint_objid ();
+int
+main ()
+{
+sprint_objid ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_snmp_sprint_objid=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_snmp_sprint_objid=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_sprint_objid" >&5
+echo "${ECHO_T}$ac_cv_lib_snmp_sprint_objid" >&6
+if test $ac_cv_lib_snmp_sprint_objid = yes; then
+
+ if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
+echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking ucd-snmp/version.h usability" >&5
+echo $ECHO_N "checking ucd-snmp/version.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <ucd-snmp/version.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking ucd-snmp/version.h presence" >&5
+echo $ECHO_N "checking ucd-snmp/version.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <ucd-snmp/version.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to the AC_PACKAGE_NAME lists. @%:@@%:@
+@%:@@%:@ ------------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
+echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_ucd_snmp_version_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6
+
+fi
+if test $ac_cv_header_ucd_snmp_version_h = yes; then
+ :
+else
+ with_snmp=no
+fi
+
+
+else
+ with_snmp=no
+fi
+
+ LIBS="$cmu_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: checking UCD SNMP libraries" >&5
+echo $ECHO_N "checking UCD SNMP libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $with_snmp" >&5
+echo "${ECHO_T}$with_snmp" >&6
+ LIB_UCDSNMP=""
+ if test "$with_snmp" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_UCDSNMP 1
+_ACEOF
+
+ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
+ echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpm" >&5
+echo $ECHO_N "checking for rpmdbOpen in -lrpm... $ECHO_C" >&6
+if test "${ac_cv_lib_rpm_rpmdbOpen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrpm -lpopt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char rpmdbOpen ();
+int
+main ()
+{
+rpmdbOpen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rpm_rpmdbOpen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rpm_rpmdbOpen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbOpen" >&5
+echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbOpen" >&6
+if test $ac_cv_lib_rpm_rpmdbOpen = yes; then
+ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"
+fi
+
+ fi
+
+ fi
+fi
+
+
+
+# Figure out what directories we're linking against.
+# Lots of fun for the whole family.
+# This probably chokes on anything with spaces in it.
+# All we want is the list of -L directories, and -L may or may not be
+# followed by a space.
+isdir=no
+libpath=""
+#echo "debug ldflags: << ${ldflags} >>"
+#echo "debug default_ldflags: << ${default_ldflags} >>"
+for flag in ${ldflags} ${default_ldflags}; do
+ case $flag in
+ -L)
+ # it's a split -L option, we'll mark the next option as a dir.
+ isdir=yes
+ ;;
+
+ -L*)
+ # attached -L option: split off the directory
+ larg=`echo $flag | sed -e 's:-L\(..*\):\1:'`
+ libpath="${libpath} ${larg}"
+ ;;
+
+ *)
+ if test $isdir = yes ; then
+ libpath="${libpath} ${flag}"
+ isdir=no
+ fi
+ esac
+done
+
+IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
+IMAP_LIBS="${LIB_SASL} ${LIBS}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t at OBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIB@&t at OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+ "master/Makefile" ) CONFIG_FILES="$CONFIG_FILES master/Makefile" ;;
+ "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+ "imap/Makefile" ) CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;;
+ "imtest/Makefile" ) CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;;
+ "netnews/Makefile" ) CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;;
+ "perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;;
+ "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at MAKEDEPEND@,$MAKEDEPEND,;t t
+s, at cyrus_prefix@,$cyrus_prefix,;t t
+s, at service_path@,$service_path,;t t
+s, at cyrus_user@,$cyrus_user,;t t
+s, at cyrus_group@,$cyrus_group,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CPP@,$CPP,;t t
+s, at EGREP@,$EGREP,;t t
+s, at AWK@,$AWK,;t t
+s, at LIB@&t at OBJS@,$LIB@&t at OBJS,;t t
+s, at LIB_SOCKET@,$LIB_SOCKET,;t t
+s, at IPV6_OBJS@,$IPV6_OBJS,;t t
+s, at PRE_SUBDIRS@,$PRE_SUBDIRS,;t t
+s, at EXTRA_SUBDIRS@,$EXTRA_SUBDIRS,;t t
+s, at DEPLIBS@,$DEPLIBS,;t t
+s, at LOCALDEFS@,$LOCALDEFS,;t t
+s, at BDB_INC@,$BDB_INC,;t t
+s, at BDB_LIB@,$BDB_LIB,;t t
+s, at CYRUSDB_OBJS@,$CYRUSDB_OBJS,;t t
+s, at SIEVE_OBJS@,$SIEVE_OBJS,;t t
+s, at SIEVE_LIBS@,$SIEVE_LIBS,;t t
+s, at SIEVE_CPPFLAGS@,$SIEVE_CPPFLAGS,;t t
+s, at YACC@,$YACC,;t t
+s, at LEX@,$LEX,;t t
+s, at LEXLIB@,$LEXLIB,;t t
+s, at LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+s, at SIEVE_SUBDIRS@,$SIEVE_SUBDIRS,;t t
+s, at WITH_NONBLOCK@,$WITH_NONBLOCK,;t t
+s, at WITH_GMTOFF@,$WITH_GMTOFF,;t t
+s, at WITH_MAP@,$WITH_MAP,;t t
+s, at WITH_LOCK@,$WITH_LOCK,;t t
+s, at cyrus_sigveclib@,$cyrus_sigveclib,;t t
+s, at AFS_LIBS@,$AFS_LIBS,;t t
+s, at AFS_LDFLAGS@,$AFS_LDFLAGS,;t t
+s, at LDAP_CPPFLAGS@,$LDAP_CPPFLAGS,;t t
+s, at LDAP_LDFLAGS@,$LDAP_LDFLAGS,;t t
+s, at LDAP_LIBS@,$LDAP_LIBS,;t t
+s, at SERVER_SUBDIRS@,$SERVER_SUBDIRS,;t t
+s, at OPENSSL_INC@,$OPENSSL_INC,;t t
+s, at OPENSSL_LIB@,$OPENSSL_LIB,;t t
+s, at ZEPHYR_LIBS@,$ZEPHYR_LIBS,;t t
+s, at ZEPHYR_CPPFLAGS@,$ZEPHYR_CPPFLAGS,;t t
+s, at IMAP_PROGS@,$IMAP_PROGS,;t t
+s, at COMPILE_ET@,$COMPILE_ET,;t t
+s, at COM_ERR_LIBS@,$COM_ERR_LIBS,;t t
+s, at COM_ERR_LDFLAGS@,$COM_ERR_LDFLAGS,;t t
+s, at COM_ERR_CPPFLAGS@,$COM_ERR_CPPFLAGS,;t t
+s, at LIB_CRYPT@,$LIB_CRYPT,;t t
+s, at GSSAPI_LIBS@,$GSSAPI_LIBS,;t t
+s, at GSSAPIBASE_LIBS@,$GSSAPIBASE_LIBS,;t t
+s, at LIB_DYN_SASL@,$LIB_DYN_SASL,;t t
+s, at DYNSASLFLAGS@,$DYNSASLFLAGS,;t t
+s, at LIB_SASL@,$LIB_SASL,;t t
+s, at SASLFLAGS@,$SASLFLAGS,;t t
+s, at PERL@,$PERL,;t t
+s, at PERL_CCCDLFLAGS@,$PERL_CCCDLFLAGS,;t t
+s, at MD5OBJ@,$MD5OBJ,;t t
+s, at SNMP_SUBDIRS@,$SNMP_SUBDIRS,;t t
+s, at CMU_LIB_SUBDIR@,$CMU_LIB_SUBDIR,;t t
+s, at LIB_WRAP@,$LIB_WRAP,;t t
+s, at SNMP_CONFIG@,$SNMP_CONFIG,;t t
+s, at LIB_UCDSNMP@,$LIB_UCDSNMP,;t t
+s, at LIB_RT@,$LIB_RT,;t t
+s, at IMAP_COM_ERR_LIBS@,$IMAP_COM_ERR_LIBS,;t t
+s, at IMAP_LIBS@,$IMAP_LIBS,;t t
+s, at PERL_SUBDIRS@,$PERL_SUBDIRS,;t t
+s, at PERL_DEPSUBDIRS@,$PERL_DEPSUBDIRS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/requests
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/requests?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/requests (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/requests Sat Aug 26 02:00:13 2006
@@ -1,0 +1,291 @@
+# This file was generated.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+ at request = (
+ bless( [
+ '0',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ 'cmulocal/afs.m4',
+ 'cmulocal/berkdb.m4',
+ 'cmulocal/bsd_sockets.m4',
+ 'cmulocal/c-attribute.m4',
+ 'cmulocal/c-fpic.m4',
+ 'cmulocal/common.m4',
+ 'cmulocal/cyrus.m4',
+ 'cmulocal/ipv6.m4',
+ 'cmulocal/kerberos_v4.m4',
+ 'cmulocal/libssl.m4',
+ 'cmulocal/libwrap.m4',
+ 'cmulocal/sasl2.m4',
+ 'cmulocal/ucdsnmp.m4',
+ 'configure.in'
+ ],
+ {
+ 'CMU_USE_DB' => 1,
+ 'AC_TYPE_OFF_T' => 1,
+ 'AC_C_VOLATILE' => 1,
+ 'AC_FUNC_CLOSEDIR_VOID' => 1,
+ 'CMU_DB_LIB_WHERE' => 1,
+ 'AC_REPLACE_FNMATCH' => 1,
+ 'AC_DEFUN' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_FUNC_STAT' => 1,
+ 'AC_FUNC_WAIT3' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AC_STRUCT_TM' => 1,
+ 'AC_FUNC_LSTAT' => 1,
+ 'AC_FUNC_STRTOD' => 1,
+ 'AC_CHECK_HEADERS' => 1,
+ 'CMU_LIBSSL_LIB_WHERE1' => 1,
+ 'AC_FUNC_STRNLEN' => 1,
+ 'AC_PROG_CXX' => 1,
+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+ 'CMU_KRB4_32_DEFN' => 1,
+ 'AC_PROG_AWK' => 1,
+ '_m4_warn' => 1,
+ 'CMU_LIBSSL_LIB_WHERE' => 1,
+ 'AC_HEADER_MAJOR' => 1,
+ 'CYRUS_BERKELEY_DB_CHK_LIB' => 1,
+ 'CMU_SASL2_REQUIRE_VER' => 1,
+ 'CMU_KRB_INC_WHERE' => 1,
+ 'AC_PROG_GCC_TRADITIONAL' => 1,
+ 'IPv6_CHECK_FUNC' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AC_STRUCT_ST_BLOCKS' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'AC_PROG_MAKE_SET' => 1,
+ 'sinclude' => 1,
+ 'AC_FUNC_STRERROR_R' => 1,
+ 'CMU_GUESS_RUNPATH_SWITCH' => 1,
+ 'AC_FUNC_FORK' => 1,
+ 'AC_DECL_SYS_SIGLIST' => 1,
+ 'CMU_KRB_INC_WHERE1' => 1,
+ 'AC_FUNC_VPRINTF' => 1,
+ 'AU_DEFUN' => 1,
+ 'CYRUS_BERKELEY_DB_OPTS' => 1,
+ 'IPv6_CHECK_SOCKLEN_T' => 1,
+ 'AC_INIT' => 1,
+ 'AC_STRUCT_TIMEZONE' => 1,
+ 'CMU_AFS' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_FUNC_ALLOCA' => 1,
+ 'IPv6_CHECK_SA_LEN' => 1,
+ 'CMU_LIBSSL' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AC_PROG_RANLIB' => 1,
+ 'CMU_UCDSNMP' => 1,
+ 'AC_FUNC_SETPGRP' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AC_FUNC_MMAP' => 1,
+ 'AC_TYPE_SIZE_T' => 1,
+ 'IPv6_CHECK_SS_FAMILY' => 1,
+ 'AC_CHECK_TYPES' => 1,
+ 'AC_CHECK_MEMBERS' => 1,
+ 'AC_DEFUN_ONCE' => 1,
+ 'AC_FUNC_UTIME_NULL' => 1,
+ 'AC_FUNC_SELECT_ARGTYPES' => 1,
+ 'CMU_AFS_WHERE' => 1,
+ 'AC_HEADER_STAT' => 1,
+ 'AC_FUNC_STRFTIME' => 1,
+ 'CMU_LIBSSL_INC_WHERE1' => 1,
+ 'AC_C_INLINE' => 1,
+ 'CMU_C___ATTRIBUTE__' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'include' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_FUNC_OBSTACK' => 1,
+ 'CMU_KRB_LIB_WHERE1' => 1,
+ 'AC_CHECK_LIB' => 1,
+ 'AC_FUNC_MALLOC' => 1,
+ 'CMU_TEST_INCPATH' => 1,
+ 'AC_FUNC_GETGROUPS' => 1,
+ 'CMU_ADD_LIBPATH' => 1,
+ 'AC_FUNC_GETLOADAVG' => 1,
+ 'AC_FUNC_FSEEKO' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'CMU_CHECK_HEADER_NOCACHE' => 1,
+ 'SASL_GSSAPI_CHK' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_FUNC_MKTIME' => 1,
+ 'CYRUS_BERKELEY_DB_CHK' => 1,
+ 'AC_HEADER_SYS_WAIT' => 1,
+ 'AC_PROG_LN_S' => 1,
+ 'AC_FUNC_MEMCMP' => 1,
+ 'm4_include' => 1,
+ 'AC_HEADER_DIRENT' => 1,
+ 'CMU_KRB_RD_REQ_PROTO' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'CMU_FIND_LIB_SUBDIR' => 1,
+ 'AC_HEADER_TIME' => 1,
+ 'CMU_SOCKETS' => 1,
+ 'AC_FUNC_GETMNTENT' => 1,
+ 'AC_TYPE_MODE_T' => 1,
+ 'm4_sinclude' => 1,
+ 'CMU_ADD_LIBPATH_TO' => 1,
+ 'AC_PATH_X' => 1,
+ 'CMU_DB3_LIB_WHERE1' => 1,
+ 'CMU_AFS_LIB_WHERE1' => 1,
+ 'CMU_SASL2_REQUIRED' => 1,
+ 'AC_HEADER_STDC' => 1,
+ 'CMU_TEST_LIBPATH' => 1,
+ 'CMU_AFS_INC_WHERE1' => 1,
+ 'AC_FUNC_ERROR_AT_LINE' => 1,
+ 'CMU_LIBSSL_INC_WHERE' => 1,
+ 'AC_FUNC_MBRTOWC' => 1,
+ 'AC_TYPE_SIGNAL' => 1,
+ 'SASL2_CRYPT_CHK' => 1,
+ 'AC_TYPE_UID_T' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'CMU_KRB_SET_KEY_PROTO' => 1,
+ 'AC_PROG_CC' => 1,
+ 'AC_FUNC_STRCOLL' => 1,
+ 'AC_PROG_YACC' => 1,
+ 'AC_FUNC_CHOWN' => 1,
+ 'AC_FUNC_GETPGRP' => 1,
+ 'CMU_DB_INC_WHERE' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'CMU_DB4_LIB_WHERE1' => 1,
+ 'SASL_SET_GSSAPI_LIBS' => 1,
+ 'AC_FUNC_REALLOC' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'CMU_KRB_LIB_WHERE' => 1,
+ 'CMU_KRB_SENDAUTH_PROTO' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'CMU_SASL2' => 1,
+ 'CMU_DB_INC_WHERE1' => 1,
+ 'AC_PROG_CPP' => 1,
+ 'AC_C_CONST' => 1,
+ 'AC_PROG_LEX' => 1,
+ 'AC_TYPE_PID_T' => 1,
+ 'CMU_LIBWRAP' => 1,
+ 'AC_FUNC_SETVBUF_REVERSED' => 1,
+ 'AC_PROG_INSTALL' => 1,
+ 'CMU_SASL2_CHECKAPOP_REQUIRED' => 1,
+ 'CMU_C_FPIC' => 1,
+ 'AH_OUTPUT' => 1,
+ 'CMU_KRB4' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AC_CHECK_FUNCS' => 1,
+ 'CMU_NEEDS_AFS' => 1
+ }
+ ], 'Autom4te::Request' ),
+ bless( [
+ '1',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ 'aclocal.m4',
+ 'configure.in'
+ ],
+ {
+ 'm4_pattern_forbid' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'AC_C_VOLATILE' => 1,
+ 'AC_TYPE_OFF_T' => 1,
+ 'AC_FUNC_CLOSEDIR_VOID' => 1,
+ 'AC_REPLACE_FNMATCH' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_FUNC_STAT' => 1,
+ 'AC_FUNC_WAIT3' => 1,
+ 'AC_HEADER_TIME' => 1,
+ 'AC_FUNC_LSTAT' => 1,
+ 'AC_STRUCT_TM' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AC_FUNC_GETMNTENT' => 1,
+ 'AC_TYPE_MODE_T' => 1,
+ 'AC_FUNC_STRTOD' => 1,
+ 'AC_CHECK_HEADERS' => 1,
+ 'AC_FUNC_STRNLEN' => 1,
+ 'm4_sinclude' => 1,
+ 'AC_PROG_CXX' => 1,
+ 'AC_PATH_X' => 1,
+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+ 'AC_PROG_AWK' => 1,
+ '_m4_warn' => 1,
+ 'AC_HEADER_STDC' => 1,
+ 'AC_HEADER_MAJOR' => 1,
+ 'AC_FUNC_ERROR_AT_LINE' => 1,
+ 'AC_PROG_GCC_TRADITIONAL' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AC_FUNC_MBRTOWC' => 1,
+ 'AC_STRUCT_ST_BLOCKS' => 1,
+ 'AC_TYPE_SIGNAL' => 1,
+ 'AC_TYPE_UID_T' => 1,
+ 'AC_PROG_MAKE_SET' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'm4_pattern_allow' => 1,
+ 'sinclude' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'AC_FUNC_STRERROR_R' => 1,
+ 'AC_PROG_CC' => 1,
+ 'AC_FUNC_FORK' => 1,
+ 'AC_DECL_SYS_SIGLIST' => 1,
+ 'AC_FUNC_STRCOLL' => 1,
+ 'AC_FUNC_VPRINTF' => 1,
+ 'AC_PROG_YACC' => 1,
+ 'AC_INIT' => 1,
+ 'AC_STRUCT_TIMEZONE' => 1,
+ 'AC_FUNC_CHOWN' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_FUNC_ALLOCA' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AC_FUNC_GETPGRP' => 1,
+ 'AC_PROG_RANLIB' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_FUNC_SETPGRP' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AC_FUNC_MMAP' => 1,
+ 'AC_FUNC_REALLOC' => 1,
+ 'AC_TYPE_SIZE_T' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'AC_CHECK_TYPES' => 1,
+ 'AC_CHECK_MEMBERS' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'AC_FUNC_UTIME_NULL' => 1,
+ 'AC_FUNC_SELECT_ARGTYPES' => 1,
+ 'AC_HEADER_STAT' => 1,
+ 'AC_FUNC_STRFTIME' => 1,
+ 'AC_PROG_CPP' => 1,
+ 'AC_C_INLINE' => 1,
+ 'AC_PROG_LEX' => 1,
+ 'AC_C_CONST' => 1,
+ 'AC_TYPE_PID_T' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'include' => 1,
+ 'AC_FUNC_SETVBUF_REVERSED' => 1,
+ 'AC_PROG_INSTALL' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_FUNC_OBSTACK' => 1,
+ 'AC_CHECK_LIB' => 1,
+ 'AC_FUNC_MALLOC' => 1,
+ 'AC_FUNC_GETGROUPS' => 1,
+ 'AC_FUNC_GETLOADAVG' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_FUNC_FSEEKO' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AC_FUNC_MKTIME' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AC_HEADER_SYS_WAIT' => 1,
+ 'AC_PROG_LN_S' => 1,
+ 'AC_FUNC_MEMCMP' => 1,
+ 'm4_include' => 1,
+ 'AC_HEADER_DIRENT' => 1,
+ 'AC_CHECK_FUNCS' => 1
+ }
+ ], 'Autom4te::Request' )
+ );
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.0
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.0?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.0 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.0 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2955 @@
+m4trace:cmulocal/afs.m4:19: -1- AC_DEFUN([CMU_AFS_INC_WHERE1], [
+cmu_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$cmu_save_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <afs/param.h>],
+[#ifndef SYS_NAME
+choke me
+#endif
+int foo;],
+ac_cv_found_afs_inc=yes,
+ac_cv_found_afs_inc=no)
+CPPFLAGS=$cmu_save_CPPFLAGS
+])
+m4trace:cmulocal/afs.m4:31: -1- AC_DEFUN([CMU_AFS_LIB_WHERE1], [
+save_LIBS="$LIBS"
+save_LDFLAGS="$LDFLAGS"
+
+LIBS="-lauth $1/afs/util.a $LIB_SOCKET $LIBS"
+LDFLAGS="-L$1 -L$1/afs $LDFLAGS"
+dnl suppress caching
+AC_TRY_LINK([],[afsconf_Open();], ac_cv_found_afs_lib=yes, ac_cv_found_afs_lib=no)
+LIBS="$save_LIBS"
+LDFLAGS="$save_LDFLAGS"
+])
+m4trace:cmulocal/afs.m4:54: -1- AC_DEFUN([CMU_AFS_WHERE], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+ for i in $1; do
+ AC_MSG_CHECKING(for AFS in $i)
+ CMU_AFS_INC_WHERE1("$i/include")
+ ac_cv_found_lwp_inc=$ac_cv_found_afs_inc
+ CMU_TEST_INCPATH($i/include, lwp)
+ ac_cv_found_afs_inc=$ac_cv_found_lwp_inc
+ if test "$ac_cv_found_afs_inc" = "yes"; then
+ CMU_AFS_LIB_WHERE1("$i/$CMU_LIB_SUBDIR")
+ if test "$ac_cv_found_afs_lib" = "yes"; then
+ ac_cv_afs_where=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+m4trace:cmulocal/afs.m4:308: -1- AC_DEFUN([CMU_AFS], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_LIBSSL])
+AC_ARG_WITH(AFS,
+ [ --with-afs=PREFIX Compile with AFS support],
+ [if test "X$with_AFS" = "X"; then
+ with_AFS=yes
+ fi])
+
+ if test "X$with_AFS" != "X"; then
+ ac_cv_afs_where=$with_AFS
+ fi
+ if test "X$ac_cv_afs_where" = "X"; then
+ CMU_AFS_WHERE(/usr/afsws /usr/local /usr/athena /Library/OpenAFS/Tools)
+ fi
+
+ AC_MSG_CHECKING(whether to include AFS)
+ if test "X$ac_cv_afs_where" = "Xno" -o "X$ac_cv_afs_where" = "X"; then
+ ac_cv_found_afs=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_afs=yes
+ AC_MSG_RESULT(yes)
+ AFS_INC_DIR="$ac_cv_afs_where/include"
+ AFS_LIB_DIR="$ac_cv_afs_where/$CMU_LIB_SUBDIR"
+ AFS_TOP_DIR="$ac_cv_afs_where"
+ AFS_INC_FLAGS="-I${AFS_INC_DIR}"
+ AFS_LIB_FLAGS="-L${AFS_LIB_DIR} -L${AFS_LIB_DIR}/afs"
+ cmu_save_LIBS="$LIBS"
+ cmu_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS ${AFS_INC_FLAGS}"
+ cmu_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$cmu_save_LDFLAGS ${AFS_LIB_FLAGS}"
+
+ AC_CHECK_HEADERS(afs/stds.h)
+
+ AC_MSG_CHECKING([if libdes is needed])
+ AC_TRY_LINK([],[des_quad_cksum();],AFS_DES_LIB="",AFS_DES_LIB="maybe")
+ if test "X$AFS_DES_LIB" != "X"; then
+ LIBS="$cmu_save_LIBS -ldes"
+ AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="yes")
+ if test "X$AFS_DES_LIB" = "Xyes"; then
+ AC_MSG_RESULT([yes])
+ AFS_LIBDES="-ldes"
+ AFS_LIBDESA="${AFS_LIB_DIR}/libdes.a"
+ else
+ LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],AFS_DES_LIB="libcrypto")
+ if test "X$AFS_DES_LIB" = "Xlibcrypto"; then
+ AC_MSG_RESULT([libcrypto])
+ AFS_LIBDES="$LIBSSL_LIB_FLAGS"
+ AFS_LIBDESA="$LIBSSL_LIB_FLAGS"
+ else
+ LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],AFS_DES_LIB="libcrypto+descompat")
+ if test "X$AFS_DES_LIB" = "Xlibcrypto+descompat"; then
+ AC_MSG_RESULT([libcrypto+descompat])
+ AFS_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ AFS_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Could not use -ldes])
+ fi
+ fi
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+
+ AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
+ AFS_KTC_LIBS_STATIC="${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
+ AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
+ AFS_RX_LIBS="-lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
+ AFS_KTC_LIBS="-lauth ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcom_err ${AFS_LIB_DIR}/afs/util.a"
+
+ LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
+ AC_CHECK_FUNC(des_pcbc_init)
+ if test "X$ac_cv_func_des_pcbc_init" != "Xyes"; then
+ AC_CHECK_LIB(descompat, des_pcbc_init, AFS_DESCOMPAT_LIB="-ldescompat")
+ if test "X$AFS_DESCOMPAT_LIB" != "X" ; then
+ AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_DESCOMPAT_LIB"
+ AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_DESCOMPAT_LIB"
+ AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_DESCOMPAT_LIB"
+ AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_DESCOMPAT_LIB"
+ else
+
+ AC_MSG_CHECKING([if rxkad needs des_pcbc_init])
+ AC_TRY_LINK(,[tkt_DecodeTicket();],RXKAD_PROBLEM=no,RXKAD_PROBLEM=maybe)
+ if test "$RXKAD_PROBLEM" = "maybe"; then
+ AC_TRY_LINK([int des_pcbc_init() { return 0;}],
+ [tkt_DecodeTicket();],RXKAD_PROBLEM=yes,RXKAD_PROBLEM=error)
+ if test "$RXKAD_PROBLEM" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_MSG_ERROR([cannot use rxkad])
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Unknown error testing rxkad])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ fi
+
+ LIBS="$cmu_save_LIBS"
+ AC_CHECK_FUNC(flock)
+ LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
+ if test "X$ac_cv_func_flock" != "Xyes"; then
+ AC_MSG_CHECKING([if AFS needs flock])
+ AC_TRY_LINK([#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif
+#include <ubik.h>
+#include <afs/cellconfig.h>
+#include <afs/auth.h>
+#include <afs/volser.h>
+struct ubik_client * cstruct;
+int sigvec() {return 0;}
+extern int UV_SetSecurity();],
+ [vsu_ClientInit(1,"","",0,
+ &cstruct,UV_SetSecurity)],
+ AFS_FLOCK=no,AFS_FLOCK=yes)
+ if test $AFS_FLOCK = "no"; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ LDFLAGS="$LDFLAGS -L/usr/ucblib"
+ AC_CHECK_LIB(ucb, flock,:, [AC_CHECK_LIB(BSD, flock)])
+ fi
+ fi
+ LIBS="$cmu_save_LIBS"
+ AC_CHECK_FUNC(sigvec)
+ LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
+ if test "X$ac_cv_func_sigvec" != "Xyes"; then
+ AC_MSG_CHECKING([if AFS needs sigvec])
+ AC_TRY_LINK([#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif
+#include <ubik.h>
+#include <afs/cellconfig.h>
+#include <afs/auth.h>
+#include <afs/volser.h>
+struct ubik_client * cstruct;
+int flock() {return 0;}
+extern int UV_SetSecurity();],
+ [vsu_ClientInit(1,"","",0,
+ &cstruct,UV_SetSecurity)],
+ AFS_SIGVEC=no,AFS_SIGVEC=yes)
+ if test $AFS_SIGVEC = "no"; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ LDFLAGS="$LDFLAGS -L/usr/ucblib"
+ AC_CHECK_LIB(ucb, sigvec,:,[AC_CHECK_LIB(BSD, sigvec)])
+ fi
+ fi
+ if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
+ AFS_LIB_FLAGS="${AFS_LIB_FLAGS} -L/usr/ucblib -R/usr/ucblib"
+ fi
+ if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
+ AFS_BSD_LIB="-lucb"
+ elif test "$ac_cv_lib_BSD_flock" = "yes" -o "$ac_cv_lib_BSD_sigvec" = "yes"; then
+ AFS_BSD_LIB="-lBSD"
+ fi
+ if test "X$AFS_BSD_LIB" != "X" ; then
+ AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_BSD_LIB"
+ AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_BSD_LIB"
+ AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
+ AFS_RX_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
+ AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_BSD_LIB"
+ fi
+
+ AC_MSG_CHECKING([if libaudit is needed])
+ AFS_LIBAUDIT=""
+ LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
+ AC_TRY_LINK([#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif
+#include <afs/cellconfig.h>
+#include <afs/auth.h>],
+ [afsconf_SuperUser();],AFS_AUDIT_LIB="",AFS_AUDIT_LIB="maybe")
+ if test "X$AFS_AUDIT_LIB" != "X"; then
+ LIBS="$cmu_save_LIBS -lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB $LIB_SOCKET"
+ AC_TRY_LINK([#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif
+#include <afs/cellconfig.h>
+#include <afs/auth.h>],
+ [afsconf_SuperUser();],AFS_AUDIT_LIB="yes")
+ if test "X$AFS_AUDIT_LIB" = "Xyes"; then
+ AC_MSG_RESULT([yes])
+ AFS_LIBAUDIT="-laudit"
+ AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libaudit.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
+ AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
+ AFS_RX_LIBS="-lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Could not use -lauth while testing for -laudit])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ AC_CHECK_FUNCS(VL_ProbeServer)
+ AC_MSG_CHECKING([if new-style afs_ integer types are defined])
+ AC_CACHE_VAL(ac_cv_afs_int32,
+dnl The next few lines contain a quoted argument to egrep
+dnl It is critical that there be no leading or trailing whitespace
+dnl or newlines
+[AC_EGREP_CPP(dnl
+changequote(<<,>>)dnl
+<<(^|[^a-zA-Z_0-9])afs_int32[^a-zA-Z_0-9]>>dnl
+changequote([,]), [#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif],
+ac_cv_afs_int32=yes, ac_cv_afs_int32=no)])
+ AC_MSG_RESULT($ac_cv_afs_int32)
+ if test $ac_cv_afs_int32 = yes ; then
+ AC_DEFINE(HAVE_AFS_INT32,, [AFS provides new "unambiguous" type names])
+ else
+ AC_DEFINE(afs_int16, int16, [it's a type definition])
+ AC_DEFINE(afs_int32, int32, [it's a type definition])
+ AC_DEFINE(afs_uint16, u_int16, [it's a type definition])
+ AC_DEFINE(afs_uint32, u_int32, [it's a type definition])
+ fi
+
+ CPPFLAGS="${cmu_save_CPPFLAGS}"
+ LDFLAGS="${cmu_save_LDFLAGS}"
+ LIBS="${cmu_save_LIBS}"
+ AC_DEFINE(AFS_ENV,, [Use AFS. (find what needs this and nuke it)])
+ AC_DEFINE(AFS,, [Use AFS. (find what needs this and nuke it)])
+ AC_SUBST(AFS_CLIENT_LIBS_STATIC)
+ AC_SUBST(AFS_KTC_LIBS_STATIC)
+ AC_SUBST(AFS_CLIENT_LIBS)
+ AC_SUBST(AFS_RX_LIBS)
+ AC_SUBST(AFS_KTC_LIBS)
+ AC_SUBST(AFS_INC_FLAGS)
+ AC_SUBST(AFS_LIB_FLAGS)
+ AC_SUBST(AFS_TOP_DIR)
+ AC_SUBST(AFS_LIBAUDIT)
+ AC_SUBST(AFS_LIBDES)
+ AC_SUBST(AFS_LIBDESA)
+ fi
+ ])
+m4trace:cmulocal/afs.m4:314: -1- AC_DEFUN([CMU_NEEDS_AFS], [AC_REQUIRE([CMU_AFS])
+if test "$ac_cv_found_afs" != "yes"; then
+ AC_ERROR([Cannot continue without AFS])
+fi])
+m4trace:cmulocal/berkdb.m4:13: -1- AC_DEFUN([CMU_DB_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <db.h>],
+[DB *db;
+db_create(&db, NULL, 0);
+db->open(db, "foo.db", NULL, DB_UNKNOWN, DB_RDONLY, 0644);],
+ac_cv_found_db_inc=yes,
+ac_cv_found_db_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+m4trace:cmulocal/berkdb.m4:28: -1- AC_DEFUN([CMU_DB_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for db headers in $i)
+ CMU_DB_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, db)
+ if test "$ac_cv_found_db_inc" = "yes"; then
+ ac_cv_db_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+m4trace:cmulocal/berkdb.m4:44: -1- AC_DEFUN([CMU_DB3_LIB_WHERE1], [
+AC_REQUIRE([CMU_AFS])
+AC_REQUIRE([CMU_KRB4])
+saved_LIBS=$LIBS
+ LIBS="$saved_LIBS -L$1 -ldb-3"
+AC_TRY_LINK([#include <db.h>],
+[db_env_create(NULL, 0);],
+[ac_cv_found_db_3_lib=yes],
+ac_cv_found_db_3_lib=no)
+LIBS=$saved_LIBS
+])
+m4trace:cmulocal/berkdb.m4:55: -1- AC_DEFUN([CMU_DB4_LIB_WHERE1], [
+AC_REQUIRE([CMU_AFS])
+AC_REQUIRE([CMU_KRB4])
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -ldb-4"
+AC_TRY_LINK([#include <db.h>],
+[db_env_create(NULL, 0);],
+[ac_cv_found_db_4_lib=yes],
+ac_cv_found_db_4_lib=no)
+LIBS=$saved_LIBS
+])
+m4trace:cmulocal/berkdb.m4:77: -1- AC_DEFUN([CMU_DB_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for db libraries in $i)
+if test "$enable_db4" = "yes"; then
+ CMU_DB4_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, [db-4])
+ ac_cv_found_db_lib=$ac_cv_found_db_4_lib
+else
+ CMU_DB3_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, [db-3])
+ ac_cv_found_db_lib=$ac_cv_found_db_3_lib
+fi
+ if test "$ac_cv_found_db_lib" = "yes" ; then
+ ac_cv_db_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+m4trace:cmulocal/berkdb.m4:178: -1- AC_DEFUN([CMU_USE_DB], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(db,
+ [ --with-db=PREFIX Compile with db support],
+ [if test "X$with_db" = "X"; then
+ with_db=yes
+ fi])
+AC_ARG_WITH(db-lib,
+ [ --with-db-lib=dir use db libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-db-lib])
+ fi])
+AC_ARG_WITH(db-include,
+ [ --with-db-include=dir use db headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-db-include])
+ fi])
+AC_ARG_ENABLE(db4,
+ [ --enable-db4 use db 4.x libraries])
+
+ if test "X$with_db" != "X"; then
+ if test "$with_db" != "yes"; then
+ ac_cv_db_where_lib=$with_db/$CMU_LIB_SUBDIR
+ ac_cv_db_where_inc=$with_db/include
+ fi
+ fi
+
+ if test "X$with_db_lib" != "X"; then
+ ac_cv_db_where_lib=$with_db_lib
+ fi
+ if test "X$ac_cv_db_where_lib" = "X"; then
+ CMU_DB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_db_include" != "X"; then
+ ac_cv_db_where_inc=$with_db_include
+ fi
+ if test "X$ac_cv_db_where_inc" = "X"; then
+ CMU_DB_INC_WHERE(/usr/athena/include /usr/local/include)
+ fi
+
+ AC_MSG_CHECKING(whether to include db)
+ if test "X$ac_cv_db_where_lib" = "X" -o "X$ac_cv_db_where_inc" = "X"; then
+ ac_cv_found_db=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_db=yes
+ AC_MSG_RESULT(yes)
+ DB_INC_DIR=$ac_cv_db_where_inc
+ DB_LIB_DIR=$ac_cv_db_where_lib
+ DB_INC_FLAGS="-I${DB_INC_DIR}"
+ if test "$enable_db4" = "yes"; then
+ DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-4"
+ else
+ DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-3"
+ fi
+ dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
+ dnl Allow makefile substitutions....
+ AC_SUBST(DB_INC_FLAGS)
+ AC_SUBST(DB_LIB_FLAGS)
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${DB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${DB_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${DB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${DB_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${DB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${DB_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${DB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${DB_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${DB_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+m4trace:cmulocal/berkdb.m4:235: -1- AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB], [
+ BDB_SAVE_LDFLAGS=$LDFLAGS
+
+ if test -d $with_bdb_lib; then
+ CMU_ADD_LIBPATH_TO($with_bdb_lib, LDFLAGS)
+ CMU_ADD_LIBPATH_TO($with_bdb_lib, BDB_LIBADD)
+ else
+ BDB_LIBADD=""
+ fi
+
+ saved_LIBS=$LIBS
+ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+ AC_TRY_LINK([#include <db.h>],
+ [db_create(NULL, NULL, 0);],
+ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db,
+ dblib="no")
+ if test "$dblib" = "berkeley"; then break; fi
+ done
+ if test "$dblib" = "no"; then
+ LIBS="$saved_LIBS -ldb"
+ AC_TRY_LINK([#include <db.h>],
+ [db_open(NULL, 0, 0, 0, NULL, NULL, NULL);],
+ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db,
+ dblib="no")
+ fi
+ LIBS=$saved_LIBS
+
+ LDFLAGS=$BDB_SAVE_LDFLAGS
+])
+m4trace:cmulocal/berkdb.m4:247: -1- AC_DEFUN([CYRUS_BERKELEY_DB_OPTS], [
+AC_ARG_WITH(bdb-libdir,
+ [ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR],
+ with_bdb_lib=$withval,
+ [ test "${with_bdb_lib+set}" = set || with_bdb_lib=none])
+AC_ARG_WITH(bdb-incdir,
+ [ --with-bdb-incdir=DIR Berkeley DB include files are in DIR],
+ with_bdb_inc=$withval,
+ [ test "${with_bdb_inc+set}" = set || with_bdb_inc=none ])
+])
+m4trace:cmulocal/berkdb.m4:269: -1- AC_DEFUN([CYRUS_BERKELEY_DB_CHK], [
+ AC_REQUIRE([CYRUS_BERKELEY_DB_OPTS])
+
+ cmu_save_CPPFLAGS=$CPPFLAGS
+
+ if test -d $with_bdb_inc; then
+ CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
+ BDB_INCADD="-I$with_bdb_inc"
+ else
+ BDB_INCADD=""
+ fi
+
+ dnl Note that FreeBSD puts it in a wierd place
+ dnl (but they should use with-bdb-incdir)
+ AC_CHECK_HEADER(db.h,
+ [CYRUS_BERKELEY_DB_CHK_LIB()],
+ dblib="no")
+
+ CPPFLAGS=$cmu_save_CPPFLAGS
+])
+m4trace:cmulocal/bsd_sockets.m4:39: -1- AC_DEFUN([CMU_SOCKETS], [
+ save_LIBS="$LIBS"
+ LIB_SOCKET=""
+ AC_CHECK_FUNC(connect, :,
+ AC_CHECK_LIB(nsl, gethostbyname,
+ LIB_SOCKET="-lnsl $LIB_SOCKET")
+ AC_CHECK_LIB(socket, connect,
+ LIB_SOCKET="-lsocket $LIB_SOCKET")
+ )
+ LIBS="$LIB_SOCKET $save_LIBS"
+ AC_CHECK_FUNC(res_search, :,
+ LIBS="-lresolv $LIB_SOCKET $save_LIBS"
+ AC_TRY_LINK([[
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#ifdef HAVE_ARPA_NAMESER_COMPAT_H
+#include <arpa/nameser_compat.h>
+#endif
+#include <resolv.h>]],[[
+const char host[12]="openafs.org";
+u_char ans[1024];
+res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
+return 0;
+]], LIB_SOCKET="-lresolv $LIB_SOCKET")
+ )
+ LIBS="$LIB_SOCKET $save_LIBS"
+ AC_CHECK_FUNCS(dn_expand dns_lookup)
+ LIBS="$save_LIBS"
+ AC_SUBST(LIB_SOCKET)
+ ])
+m4trace:cmulocal/c-attribute.m4:30: -1- AC_DEFUN([CMU_C___ATTRIBUTE__], [
+AC_MSG_CHECKING(for __attribute__)
+AC_CACHE_VAL(ac_cv___attribute__, [
+AC_TRY_COMPILE([
+#include <stdlib.h>
+],
+[
+static void foo(void) __attribute__ ((noreturn));
+
+static void
+foo(void)
+{
+ exit(1);
+}
+],
+ac_cv___attribute__=yes,
+ac_cv___attribute__=no)])
+if test "$ac_cv___attribute__" = "yes"; then
+ AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
+fi
+AC_MSG_RESULT($ac_cv___attribute__)
+])
+m4trace:cmulocal/c-fpic.m4:34: -1- AC_DEFUN([CMU_C_FPIC], [
+AC_MSG_CHECKING(if compiler supports -fPIC)
+AC_CACHE_VAL(ac_cv_fpic, [
+save_CFLAGS=$CFLAGS
+CFLAGS="${CFLAGS} -fPIC"
+AC_TRY_COMPILE([
+#include <stdlib.h>
+],
+[
+static void
+foo(void)
+{
+ exit(1);
+}
+],
+ac_cv_fpic=yes,
+ac_cv_fpic=no)
+CFLAGS=$save_CFLAGS
+])
+if test "$ac_cv_fpic" = "yes"; then
+ FPIC_CFLAGS="-fPIC"
+else
+ FPIC_CFLAGS=""
+fi
+AC_MSG_RESULT($ac_cv_fpic)
+])
+m4trace:cmulocal/common.m4:12: -1- AC_DEFUN([CMU_TEST_LIBPATH], [
+changequote(<<, >>)
+define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>))
+changequote([, ])
+if test "$CMU_AC_CV_FOUND" = "yes"; then
+ if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl" -a \! -r "$1/lib$2.dylib"; then
+ CMU_AC_CV_FOUND=no
+ fi
+fi
+])
+m4trace:cmulocal/common.m4:23: -1- AC_DEFUN([CMU_TEST_INCPATH], [
+changequote(<<, >>)
+define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_inc, [ *], [_p]))
+changequote([, ])
+if test "$CMU_AC_CV_FOUND" = "yes"; then
+ if test \! -r "$1/$2.h"; then
+ CMU_AC_CV_FOUND=no
+ fi
+fi
+])
+m4trace:cmulocal/common.m4:40: -1- AC_DEFUN([CMU_CHECK_HEADER_NOCACHE], [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
+ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING([for $1])
+AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
+ eval "ac_cv_header_$ac_safe=no")
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no)
+ifelse([$3], , , [$3
+])dnl
+fi
+])
+m4trace:cmulocal/common.m4:61: -1- AC_DEFUN([CMU_FIND_LIB_SUBDIR], [dnl
+AC_ARG_WITH([lib-subdir], AC_HELP_STRING([--with-lib-subdir=DIR],[Find libraries in DIR instead of lib]))
+AC_CHECK_SIZEOF(long)
+AC_CACHE_CHECK([what directory libraries are found in], [ac_cv_cmu_lib_subdir],
+[test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
+test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
+if test "X$with_lib_subdir" = "X" ; then
+ ac_cv_cmu_lib_subdir=lib
+ if test $ac_cv_sizeof_long -eq 4 ; then
+ test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
+ fi
+ if test $ac_cv_sizeof_long -eq 8 ; then
+ test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
+ fi
+else
+ ac_cv_cmu_lib_subdir=$with_lib_subdir
+fi])
+AC_SUBST(CMU_LIB_SUBDIR, $ac_cv_cmu_lib_subdir)
+])
+m4trace:cmulocal/cyrus.m4:19: -1- AC_DEFUN([CMU_ADD_LIBPATH], [
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L$1 ${LDFLAGS}"
+ else
+ LDFLAGS="-L$1 $andrew_runpath_switch$1 ${LDFLAGS}"
+ fi
+])
+m4trace:cmulocal/cyrus.m4:30: -1- AC_DEFUN([CMU_ADD_LIBPATH_TO], [
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ $2="-L$1 ${$2}"
+ else
+ $2="-L$1 ${$2} $andrew_runpath_switch$1"
+ fi
+])
+m4trace:cmulocal/cyrus.m4:45: -1- AC_DEFUN([CMU_GUESS_RUNPATH_SWITCH], [
+ # CMU GUESS RUNPATH SWITCH
+ AC_CACHE_CHECK(for runpath switch, andrew_runpath_switch, [
+ # first, try -R
+ SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-R /usr/lib"
+ AC_TRY_LINK([],[],[andrew_runpath_switch="-R"], [
+ LDFLAGS="-Wl,-rpath,/usr/lib"
+ AC_TRY_LINK([],[],[andrew_runpath_switch="-Wl,-rpath,"],
+ [andrew_runpath_switch="none"])
+ ])
+ LDFLAGS="${SAVE_LDFLAGS}"
+ ])])
+m4trace:cmulocal/ipv6.m4:62: -1- AC_DEFUN([IPv6_CHECK_FUNC], [
+AC_CHECK_FUNC($1, [dnl
+ ac_cv_lib_socket_$1=no
+ ac_cv_lib_inet6_$1=no
+], [dnl
+ AC_CHECK_LIB(socket, $1, [dnl
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_$1=no
+ ], [dnl
+ AC_MSG_CHECKING([whether your system has IPv6 directory])
+ AC_CACHE_VAL(ipv6_cv_dir, [dnl
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done])dnl
+ AC_MSG_RESULT($ipv6_cv_dir)
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_$1=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ AC_CHECK_LIB(inet6, $1, [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi],)dnl
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi])dnl
+])dnl
+ipv6_cv_$1=no
+if test $ac_cv_func_$1 = yes -o $ac_cv_lib_socket_$1 = yes \
+ -o $ac_cv_lib_inet6_$1 = yes
+then
+ ipv6_cv_$1=yes
+fi
+if test $ipv6_cv_$1 = no; then
+ if test $1 = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ AC_EGREP_HEADER(${ipv6_cv_pfx}$1, netdb.h,
+ [AC_CHECK_FUNC(${ipv6_cv_pfx}$1)])
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}$1 = Xyes; then
+ AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?])
+ ipv6_cv_$1=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_$1 = yes; then
+ ifelse([$2], , :, [$2])
+else
+ ifelse([$3], , :, [$3])
+fi])
+m4trace:cmulocal/ipv6.m4:78: -1- AC_DEFUN([IPv6_CHECK_SS_FAMILY], [
+AC_MSG_CHECKING([whether you have ss_family in struct sockaddr_storage])
+AC_CACHE_VAL(ipv6_cv_ss_family, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>],
+ [struct sockaddr_storage ss; int i = ss.ss_family;],
+ [ipv6_cv_ss_family=yes], [ipv6_cv_ss_family=no])])dnl
+if test $ipv6_cv_ss_family = yes; then
+ ifelse([$1], , AC_DEFINE(HAVE_SS_FAMILY,[],[Is there an ss_family in sockaddr_storage?]), [$1])
+else
+ ifelse([$2], , :, [$2])
+fi
+AC_MSG_RESULT($ipv6_cv_ss_family)])
+m4trace:cmulocal/ipv6.m4:94: -1- AC_DEFUN([IPv6_CHECK_SA_LEN], [
+AC_MSG_CHECKING([whether you have sa_len in struct sockaddr])
+AC_CACHE_VAL(ipv6_cv_sa_len, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>],
+ [struct sockaddr sa; int i = sa.sa_len;],
+ [ipv6_cv_sa_len=yes], [ipv6_cv_sa_len=no])])dnl
+if test $ipv6_cv_sa_len = yes; then
+ ifelse([$1], , AC_DEFINE(HAVE_SOCKADDR_SA_LEN,[],[Does sockaddr have an sa_len?]), [$1])
+else
+ ifelse([$2], , :, [$2])
+fi
+AC_MSG_RESULT($ipv6_cv_sa_len)])
+m4trace:cmulocal/ipv6.m4:110: -1- AC_DEFUN([IPv6_CHECK_SOCKLEN_T], [
+AC_MSG_CHECKING(for socklen_t)
+AC_CACHE_VAL(ipv6_cv_socklen_t, [dnl
+AC_TRY_LINK([#include <sys/types.h>
+#include <sys/socket.h>],
+ [socklen_t len = 0;],
+ [ipv6_cv_socklen_t=yes], [ipv6_cv_socklen_t=no])])dnl
+if test $ipv6_cv_socklen_t = yes; then
+ ifelse([$1], , AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?]), [$1])
+else
+ ifelse([$2], , :, [$2])
+fi
+AC_MSG_RESULT($ipv6_cv_socklen_t)])
+m4trace:cmulocal/kerberos_v4.m4:23: -1- AC_DEFUN([CMU_KRB_SENDAUTH_PROTO], [
+AC_MSG_CHECKING(for krb_sendauth prototype)
+AC_TRY_COMPILE(
+[#include <krb.h>
+int krb_sendauth (long options, int fd, KTEXT ktext, char *service,
+ char *inst, char *realm, u_long checksum,
+ MSG_DAT *msg_data, CREDENTIALS *cred,
+ Key_schedule schedule, struct sockaddr_in *laddr,
+ struct sockaddr_in *faddr, char *version);],
+[int foo = krb_sendauth(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); ],
+ac_cv_krb_sendauth_proto=no,
+ac_cv_krb_sendauth_proto=yes)
+AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
+if test "$ac_cv_krb_sendauth_proto" = yes; then
+ AC_DEFINE(HAVE_KRB_SENDAUTH_PROTO)dnl
+fi
+AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
+])
+m4trace:cmulocal/kerberos_v4.m4:42: -1- AC_DEFUN([CMU_KRB_SET_KEY_PROTO], [
+AC_MSG_CHECKING(for krb_set_key prototype)
+AC_CACHE_VAL(ac_cv_krb_set_key_proto, [
+cmu_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
+AC_TRY_COMPILE(
+[#include <krb.h>
+int krb_set_key(char *key, int cvt);],
+[int foo = krb_set_key(0, 0);],
+ac_cv_krb_set_key_proto=no,
+ac_cv_krb_set_key_proto=yes)
+])
+CPPFLAGS="${cmu_save_CPPFLAGS}"
+if test "$ac_cv_krb_set_key_proto" = yes; then
+ AC_DEFINE(HAVE_KRB_SET_KEY_PROTO)dnl
+fi
+AC_MSG_RESULT($ac_cv_krb_set_key_proto)
+])
+m4trace:cmulocal/kerberos_v4.m4:61: -1- AC_DEFUN([CMU_KRB4_32_DEFN], [
+AC_MSG_CHECKING(for KRB4_32 definition)
+AC_CACHE_VAL(ac_cv_krb4_32_defn, [
+cmu_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
+AC_TRY_COMPILE(
+[#include <krb.h>
+],
+[KRB4_32 foo = 1;],
+ac_cv_krb4_32_defn=yes,
+ac_cv_krb4_32_defn=no)
+])
+CPPFLAGS="${cmu_save_CPPFLAGS}"
+if test "$ac_cv_krb4_32_defn" = yes; then
+ AC_DEFINE(HAVE_KRB4_32_DEFINE)dnl
+fi
+AC_MSG_RESULT($ac_cv_krb4_32_defn)
+])
+m4trace:cmulocal/kerberos_v4.m4:81: -1- AC_DEFUN([CMU_KRB_RD_REQ_PROTO], [
+AC_MSG_CHECKING(for krb_rd_req prototype)
+AC_CACHE_VAL(ac_cv_krb_rd_req_proto, [
+cmu_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
+AC_TRY_COMPILE(
+[#include <krb.h>
+int krb_rd_req(KTEXT authent, char *service, char *instance,
+unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn);],
+[int foo = krb_rd_req(0,0,0,0,0,0);],
+ac_cv_krb_rd_req_proto=no,
+ac_cv_krb_rd_req_proto=yes)
+])
+CPPFLAGS="${cmu_save_CPPFLAGS}"
+if test "$ac_cv_krb_rd_req_proto" = yes; then
+ AC_DEFINE(HAVE_KRB_RD_REQ_PROTO)dnl
+fi
+AC_MSG_RESULT($ac_cv_krb_rd_req_proto)
+])
+m4trace:cmulocal/kerberos_v4.m4:98: -1- AC_DEFUN([CMU_KRB_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <krb.h>],
+[struct ktext foo;],
+ac_cv_found_krb_inc=yes,
+ac_cv_found_krb_inc=no)
+if test "$ac_cv_found_krb_inc" = "no"; then
+ CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV"
+ AC_TRY_COMPILE([#include <krb.h>],
+ [struct ktext foo;],
+ [ac_cv_found_krb_inc=yes],
+ ac_cv_found_krb_inc=no)
+fi
+CPPFLAGS=$saved_CPPFLAGS
+])
+m4trace:cmulocal/kerberos_v4.m4:113: -1- AC_DEFUN([CMU_KRB_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for kerberos headers in $i)
+ CMU_KRB_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, krb)
+ if test "$ac_cv_found_krb_inc" = "yes"; then
+ ac_cv_krb_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+m4trace:cmulocal/kerberos_v4.m4:127: -1- AC_DEFUN([CMU_KRB_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lkrb ${KRB_LIBDES}"
+AC_TRY_LINK(,
+[dest_tkt();],
+[ac_cv_found_krb_lib=yes],
+ac_cv_found_krb_lib=no)
+LIBS=$saved_LIBS
+])
+m4trace:cmulocal/kerberos_v4.m4:143: -1- AC_DEFUN([CMU_KRB_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for kerberos libraries in $i)
+ CMU_KRB_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, krb)
+ if test "$ac_cv_found_krb_lib" = "yes" ; then
+ ac_cv_krb_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+m4trace:cmulocal/kerberos_v4.m4:284: -1- AC_DEFUN([CMU_KRB4], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_LIBSSL])
+AC_ARG_WITH(krb4,
+ [ --with-krb4=PREFIX Compile with Kerberos 4 support],
+ [if test "X$with_krb4" = "X"; then
+ with_krb4=yes
+ fi])
+AC_ARG_WITH(krb4-lib,
+ [ --with-krb4-lib=dir use kerberos 4 libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-krb4-lib])
+ fi])
+AC_ARG_WITH(krb4-include,
+ [ --with-krb4-include=dir use kerberos 4 headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-krb4-include])
+ fi])
+
+ if test "X$with_krb4" != "X"; then
+ if test "$with_krb4" != "yes" -a "$with_krb4" != "no"; then
+ ac_cv_krb_where_lib=$with_krb4/$CMU_LIB_SUBDIR
+ ac_cv_krb_where_inc=$with_krb4/include
+ fi
+ fi
+
+ if test "$with_krb4" != "no"; then
+ if test "X$with_krb4_lib" != "X"; then
+ ac_cv_krb_where_lib=$with_krb4_lib
+ fi
+ if test "X$with_krb4_include" != "X"; then
+ ac_cv_krb_where_inc=$with_krb4_include
+ fi
+ if test "X$ac_cv_krb_where_inc" = "X"; then
+ CMU_KRB_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos)
+ fi
+
+ AC_MSG_CHECKING([if libdes is needed])
+ AC_TRY_LINK([],[des_quad_cksum();],KRB_DES_LIB="",KRB_DES_LIB="maybe")
+ if test "X$KRB_DES_LIB" != "X"; then
+ LIBS="$cmu_save_LIBS -ldes"
+ AC_TRY_LINK([], [des_quad_cksum();],KRB_DES_LIB="yes")
+ if test "X$KRB_DES_LIB" = "Xyes"; then
+ AC_MSG_RESULT([yes])
+ KRB_LIBDES="-ldes"
+ KRB_LIBDESA='$(KRB_LIB_DIR)/libdes.a'
+ else
+ LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],KRB_DES_LIB="libcrypto")
+ if test "X$KRB_DES_LIB" = "Xlibcrypto"; then
+ AC_MSG_RESULT([libcrypto])
+ KRB_LIBDES="$LIBSSL_LIB_FLAGS"
+ KRB_LIBDESA="$LIBSSL_LIB_FLAGS"
+ else
+ LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],KRB_DES_LIB="libcrypto+descompat")
+ if test "X$KRB_DES_LIB" = "Xlibcrypto+descompat"; then
+ AC_MSG_RESULT([libcrypto+descompat])
+ KRB_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ KRB_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Could not use -ldes])
+ fi
+ fi
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+ if test "X$ac_cv_krb_where_lib" = "X"; then
+ CMU_KRB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
+ fi
+ fi
+ LIBS="${cmu_save_LIBS}"
+
+
+ AC_MSG_CHECKING([whether to include kerberos 4])
+ if test "X$ac_cv_krb_where_lib" = "X" -o "X$ac_cv_krb_where_inc" = "X"; then
+ ac_cv_found_krb=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_krb=yes
+ AC_MSG_RESULT(yes)
+ KRB_INC_DIR=$ac_cv_krb_where_inc
+ KRB_LIB_DIR=$ac_cv_krb_where_lib
+ KRB_INC_FLAGS="-I${KRB_INC_DIR}"
+ KRB_LIB_FLAGS="-L${KRB_LIB_DIR} -lkrb ${KRB_LIBDES}"
+ LIBS="${cmu_save_LIBS} ${KRB_LIB_FLAGS}"
+ AC_CHECK_LIB(resolv, dns_lookup, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lresolv",,"${KRB_LIB_FLAGS}")
+ AC_CHECK_LIB(crypt, crypt, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lcrypt",,"${KRB_LIB_FLAGS}")
+ LIBS="${LIBS} ${KRB_LIB_FLAGS}"
+ AC_CHECK_FUNCS(krb_get_int krb_life_to_time)
+ AC_SUBST(KRB_INC_FLAGS)
+ AC_SUBST(KRB_LIB_FLAGS)
+ LIBS="${cmu_save_LIBS}"
+ AC_DEFINE(HAVE_KRB4,,[Kerberos V4 is present])dnl zephyr uses this
+ AC_DEFINE(KERBEROS,,[Use kerberos 4. find out what needs this symbol])
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${KRB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${KRB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${KRB_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+m4trace:cmulocal/libssl.m4:13: -1- AC_DEFUN([CMU_LIBSSL_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+CMU_CHECK_HEADER_NOCACHE(openssl/ssl.h,
+ac_cv_found_libssl_inc=yes,
+ac_cv_found_libssl_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+m4trace:cmulocal/libssl.m4:28: -1- AC_DEFUN([CMU_LIBSSL_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libssl headers in $i)
+ CMU_LIBSSL_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, ssl)
+ if test "$ac_cv_found_libssl_inc" = "yes"; then
+ ac_cv_libssl_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+m4trace:cmulocal/libssl.m4:38: -1- AC_DEFUN([CMU_LIBSSL_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lssl -lcrypto $LIB_SOCKET"
+AC_TRY_LINK(,
+[SSL_write();],
+[ac_cv_found_ssl_lib=yes],
+ac_cv_found_ssl_lib=no)
+LIBS=$saved_LIBS
+])
+m4trace:cmulocal/libssl.m4:54: -1- AC_DEFUN([CMU_LIBSSL_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libssl libraries in $i)
+ CMU_LIBSSL_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, ssl)
+ if test "$ac_cv_found_ssl_lib" = "yes" ; then
+ ac_cv_libssl_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+m4trace:cmulocal/libssl.m4:152: -1- AC_DEFUN([CMU_LIBSSL], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_ARG_WITH(libssl,
+ [ --with-libssl=PREFIX Compile with Libssl support],
+ [if test "X$with_libssl" = "X"; then
+ with_libssl=yes
+ fi])
+AC_ARG_WITH(libssl-lib,
+ [ --with-libssl-lib=dir use libssl libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libssl-lib])
+ fi])
+AC_ARG_WITH(libssl-include,
+ [ --with-libssl-include=dir use libssl headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libssl-include])
+ fi])
+
+ if test "X$with_libssl" != "X"; then
+ if test "$with_libssl" != "yes" -a "$with_libssl" != no; then
+ ac_cv_libssl_where_lib=$with_libssl/$CMU_LIB_SUBDIR
+ ac_cv_libssl_where_inc=$with_libssl/include
+ fi
+ fi
+
+ if test "$with_libssl" != "no"; then
+ if test "X$with_libssl_lib" != "X"; then
+ ac_cv_libssl_where_lib=$with_libssl_lib
+ fi
+ if test "X$ac_cv_libssl_where_lib" = "X"; then
+ CMU_LIBSSL_LIB_WHERE(/usr/local/$CMU_LIB_SUBDIR/openssl /usr/$CMU_LIB_SUBDIR/openssl /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_libssl_include" != "X"; then
+ ac_cv_libssl_where_inc=$with_libssl_include
+ fi
+ if test "X$ac_cv_libssl_where_inc" = "X"; then
+ CMU_LIBSSL_INC_WHERE(/usr/local/include /usr/include)
+ fi
+ fi
+
+ AC_MSG_CHECKING(whether to include libssl)
+ if test "X$ac_cv_libssl_where_lib" = "X" -a "X$ac_cv_libssl_where_inc" = "X"; then
+ ac_cv_found_libssl=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_libssl=yes
+ AC_MSG_RESULT(yes)
+ LIBSSL_INC_DIR=$ac_cv_libssl_where_inc
+ LIBSSL_LIB_DIR=$ac_cv_libssl_where_lib
+ LIBSSL_INC_FLAGS="-I${LIBSSL_INC_DIR}"
+ LIBSSL_LIB_FLAGS="-L${LIBSSL_LIB_DIR} -lssl -lcrypto"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${LIBSSL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${LIBSSL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${LIBSSL_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ AC_SUBST(LIBSSL_INC_DIR)
+ AC_SUBST(LIBSSL_LIB_DIR)
+ AC_SUBST(LIBSSL_INC_FLAGS)
+ AC_SUBST(LIBSSL_LIB_FLAGS)
+ ])
+m4trace:cmulocal/libwrap.m4:30: -1- AC_DEFUN([CMU_LIBWRAP], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+ AC_REQUIRE([CMU_SOCKETS])
+ AC_ARG_WITH(libwrap,
+ [ --with-libwrap=DIR use libwrap (rooted in DIR) [yes] ],
+ with_libwrap=$withval, with_libwrap=yes)
+ if test "$with_libwrap" != no; then
+ if test -d "$with_libwrap"; then
+ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
+ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ AC_CHECK_LIB(wrap, request_init, [
+ AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)],
+ with_libwrap=no, ${LIB_SOCKET})
+ LIBS="$cmu_save_LIBS"
+ fi
+ AC_MSG_CHECKING(libwrap support)
+ AC_MSG_RESULT($with_libwrap)
+ LIB_WRAP=""
+ if test "$with_libwrap" != no; then
+ AC_DEFINE(HAVE_LIBWRAP,[],[Do we have TCP wrappers?])
+ LIB_WRAP="-lwrap"
+ AC_CHECK_LIB(nsl, yp_get_default_domain, LIB_WRAP="${LIB_WRAP} -lnsl")
+ fi
+ AC_SUBST(LIB_WRAP)
+])
+m4trace:cmulocal/sasl2.m4:267: -1- AC_DEFUN([SASL_GSSAPI_CHK], [AC_REQUIRE([SASL2_CRYPT_CHK])
+AC_REQUIRE([CMU_SOCKETS])
+AC_ARG_ENABLE([gssapi],
+ [AC_HELP_STRING([--enable-gssapi=<DIR>],
+ [enable GSSAPI authentication [yes]])],
+ [gssapi=$enableval],
+ [gssapi=yes])
+AC_ARG_WITH([gss_impl],
+ [AC_HELP_STRING([--with-gss_impl={heimdal|mit|cybersafe|seam|auto}],
+ [choose specific GSSAPI implementation [[auto]]])],
+ [gss_impl=$withval],
+ [gss_impl=auto])
+
+if test "$gssapi" != no; then
+ platform=
+ case "${host}" in
+ *-*-linux*)
+ platform=__linux
+ ;;
+ *-*-hpux*)
+ platform=__hpux
+ ;;
+ *-*-irix*)
+ platform=__irix
+ ;;
+ *-*-solaris2*)
+# When should we use __sunos?
+ platform=__solaris
+ ;;
+ *-*-aix*)
+###_AIX
+ platform=__aix
+ ;;
+ *)
+ AC_WARN([The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script])
+ if test "$gss_impl" = "cybersafe"; then
+ AC_ERROR([CyberSafe was forced, cannot continue as platform is not supported])
+ fi
+ ;;
+ esac
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+
+ if test -d ${gssapi}; then
+ CPPFLAGS="$CPPFLAGS -I$gssapi/include"
+# We want to keep -I in our CPPFLAGS, but only if we succeed
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+### I am not sure how useful is this (and whether this is required at all
+### especially when we have to provide two -L flags for new CyberSafe
+ LDFLAGS="$LDFLAGS -L$gssapi/lib"
+
+ if test -n "$platform"; then
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+ fi
+ fi
+ fi
+ AC_CHECK_HEADER([gssapi.h],
+ [AC_DEFINE(HAVE_GSSAPI_H,,
+ [Define if you have the gssapi.h header file])],
+ [AC_CHECK_HEADER([gssapi/gssapi.h],,
+ [AC_WARN([Disabling GSSAPI - no include files found]); gssapi=no])])
+
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+fi
+
+if test "$gssapi" != no; then
+ # We need to find out which gssapi implementation we are
+ # using. Supported alternatives are: MIT Kerberos 5,
+ # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
+ # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
+ # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
+ #
+ # The choice is reflected in GSSAPIBASE_LIBS
+
+ AC_CHECK_LIB(resolv,res_search)
+ if test -d ${gssapi}; then
+ gssapi_dir="${gssapi}/lib"
+ GSSAPIBASE_LIBS="-L$gssapi_dir"
+ GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
+ else
+ # FIXME: This is only used for building cyrus, and then only as
+ # a real hack. it needs to be fixed.
+ gssapi_dir="/usr/local/lib"
+ fi
+
+ # Check a full link against the Heimdal libraries.
+ # If this fails, check a full link against the MIT libraries.
+ # If this fails, check a full link against the CyberSafe libraries.
+ # If this fails, check a full link against the Solaris 8 and up libgss.
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
+ gss_failed=0
+ AC_CHECK_LIB(gssapi,gss_unwrap,gss_impl="heimdal",gss_failed=1,
+ ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET})
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
+ # check for libkrb5support first
+ AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET})
+
+ gss_failed=0
+ AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1,
+ ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET})
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ # For Cybersafe one has to set a platform define in order to make compilation work
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+ cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
+# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
+ if test -d "${gssapi}/appsec-rt/lib"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
+ fi
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+
+ gss_failed=0
+
+# Check for CyberSafe with two libraries first, than fall back to a single
+# library (older CyberSafe)
+
+ unset ac_cv_lib_gss_csf_gss_acq_user
+ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe03",
+ [unset ac_cv_lib_gss_csf_gss_acq_user;
+ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
+ gss_failed=1,$GSSAPIBASE_LIBS -lgss)],
+ [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
+
+ if test "$gss_failed" = "1"; then
+# Restore variables
+ GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+ if test "$gss_impl" != "auto"; then
+ gss_impl="failed"
+ fi
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
+ gss_failed=0
+ AC_CHECK_LIB(gss,gss_unwrap,gss_impl="seam",gss_failed=1,-lgss)
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "mit"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
+ elif test "$gss_impl" = "heimdal"; then
+ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
+ elif test "$gss_impl" = "cybersafe03"; then
+# Version of CyberSafe with two libraries
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "seam"; then
+ GSSAPIBASE_LIBS=-lgss
+ # there is no static libgss on Solaris 8 and up
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "failed"; then
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ AC_WARN([Disabling GSSAPI - specified library not found])
+ else
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ AC_WARN([Disabling GSSAPI - no library])
+ fi
+fi
+
+#
+# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
+# in gssapi\rfckrb5.h
+#
+if test "$gssapi" != "no"; then
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ AC_EGREP_CPP(hostbased_service_gss_nt_yes,
+ [#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_HOSTBASED_SERVICE
+ hostbased_service_gss_nt_yes
+ #endif],
+ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])],
+ [AC_WARN([Cybersafe define not found])])
+
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h,
+ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])])
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h,
+ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])])
+ fi
+
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ AC_EGREP_CPP(user_name_yes_gss_nt,
+ [#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_USER_NAME
+ user_name_yes_gss_nt
+ #endif],
+ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])],
+ [AC_WARN([Cybersafe define not found])])
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi.h,
+ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])])
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi/gssapi.h,
+ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])])
+ fi
+fi
+
+GSSAPI_LIBS=""
+AC_MSG_CHECKING([GSSAPI])
+if test "$gssapi" != no; then
+ AC_MSG_RESULT([with implementation ${gss_impl}])
+ AC_CHECK_LIB(resolv,res_search,GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv")
+ SASL_MECHS="$SASL_MECHS libgssapiv2.la"
+ SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
+ SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
+
+ cmu_save_LIBS="$LIBS"
+ LIBS="$LIBS $GSSAPIBASE_LIBS"
+ AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
+ LIBS="$cmu_save_LIBS"
+else
+ AC_MSG_RESULT([disabled])
+fi
+AC_SUBST(GSSAPI_LIBS)
+AC_SUBST(GSSAPIBASE_LIBS)
+])
+m4trace:cmulocal/sasl2.m4:274: -1- AC_DEFUN([SASL_SET_GSSAPI_LIBS], [SASL_GSSAPI_LIBS_SET="yes"
+])
+m4trace:cmulocal/sasl2.m4:403: -1- AC_DEFUN([CMU_SASL2], [AC_REQUIRE([SASL_GSSAPI_CHK])
+
+AC_ARG_WITH(sasl,
+ [AC_HELP_STRING([--with-sasl=DIR],[Compile with libsasl2 in <DIR>])],
+ with_sasl="$withval",
+ with_sasl="yes")
+
+AC_ARG_WITH(staticsasl,
+ [AC_HELP_STRING([--with-staticsasl=DIR],
+ [Compile with staticly linked libsasl2 in <DIR>])],
+ [with_staticsasl="$withval";
+ if test $with_staticsasl != "no"; then
+ using_static_sasl="static"
+ fi],
+ [with_staticsasl="no"; using_static_sasl="no"])
+
+SASLFLAGS=""
+LIB_SASL=""
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+cmu_saved_LDFLAGS=$LDFLAGS
+cmu_saved_LIBS=$LIBS
+
+if test ${with_staticsasl} != "no"; then
+ if test -d ${with_staticsasl}; then
+ if test -d ${with_staticsasl}/lib64 ; then
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib64
+ else
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ fi
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ ac_cv_sasl_where_inc=${with_staticsasl}/include
+
+ SASLFLAGS="-I$ac_cv_sasl_where_inc"
+ LIB_SASL="-L$ac_cv_sasl_where_lib"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+ else
+ with_staticsasl="/usr"
+ fi
+
+ AC_CHECK_HEADER(sasl/sasl.h,
+ [AC_CHECK_HEADER(sasl/saslutil.h,
+ [for i42 in lib64 lib; do
+ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
+ ac_cv_found_sasl=yes
+ AC_MSG_CHECKING([for static libsasl])
+ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
+ fi
+ done
+ if test ! "$ac_cv_found_sasl" = "yes"; then
+ AC_MSG_CHECKING([for static libsasl])
+ AC_ERROR([Could not find ${with_staticsasl}/lib*/libsasl2.a])
+ fi])])
+
+ AC_MSG_RESULT([found])
+
+ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
+ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
+ else
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
+ fi
+fi
+
+if test -d ${with_sasl}; then
+ ac_cv_sasl_where_lib=${with_sasl}/lib
+ ac_cv_sasl_where_inc=${with_sasl}/include
+
+ DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
+ if test "$ac_cv_sasl_where_lib" != ""; then
+ CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, LIB_DYN_SASL)
+ fi
+ LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+fi
+
+# be sure to check for a SASLv2 specific function
+AC_CHECK_HEADER(sasl/sasl.h,
+ [AC_CHECK_HEADER(sasl/saslutil.h,
+ [AC_CHECK_LIB(sasl2, prop_get,
+ ac_cv_found_sasl=yes,
+ ac_cv_found_sasl=no)],
+ ac_cv_found_sasl=no)],
+ ac_cv_found_sasl=no)
+
+if test "$ac_cv_found_sasl" = "yes"; then
+ if test "$ac_cv_sasl_where_lib" != ""; then
+ CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, DYNLIB_SASL)
+ fi
+ DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
+ if test "$using_static_sasl" != "static"; then
+ LIB_SASL=$DYNLIB_SASL
+ SASLFLAGS=$DYNSASLFLAGS
+ fi
+else
+ DYNLIB_SASL=""
+ DYNSASLFLAGS=""
+ using_static_sasl="staticonly"
+fi
+
+if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
+fi
+
+LIBS="$cmu_saved_LIBS"
+LDFLAGS="$cmu_saved_LDFLAGS"
+CPPFLAGS="$cmu_saved_CPPFLAGS"
+
+AC_SUBST(LIB_DYN_SASL)
+AC_SUBST(DYNSASLFLAGS)
+AC_SUBST(LIB_SASL)
+AC_SUBST(SASLFLAGS)
+])
+m4trace:cmulocal/sasl2.m4:413: -1- AC_DEFUN([CMU_SASL2_REQUIRED], [AC_REQUIRE([CMU_SASL2])
+if test "$ac_cv_found_sasl" != "yes"; then
+ AC_ERROR([Cannot continue without libsasl2.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
+fi])
+m4trace:cmulocal/sasl2.m4:444: -1- AC_DEFUN([CMU_SASL2_REQUIRE_VER], [AC_REQUIRE([CMU_SASL2_REQUIRED])
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $SASLFLAGS"
+
+AC_TRY_CPP([
+#include <sasl/sasl.h>
+
+#ifndef SASL_VERSION_MAJOR
+#error SASL_VERSION_MAJOR not defined
+#endif
+#ifndef SASL_VERSION_MINOR
+#error SASL_VERSION_MINOR not defined
+#endif
+#ifndef SASL_VERSION_STEP
+#error SASL_VERSION_STEP not defined
+#endif
+
+#if SASL_VERSION_MAJOR < $1 || SASL_VERSION_MINOR < $2 || SASL_VERSION_STEP < $3
+#error SASL version is less than $1.$2.$3
+#endif
+],,
+ [AC_ERROR([Incorrect SASL headers found. This package requires SASL $1.$2.$3 or newer.])])
+
+CPPFLAGS=$cmu_saved_CPPFLAGS
+])
+m4trace:cmulocal/sasl2.m4:461: -1- AC_DEFUN([CMU_SASL2_CHECKAPOP_REQUIRED], [AC_REQUIRE([CMU_SASL2_REQUIRED])
+
+cmu_saved_LDFLAGS=$LDFLAGS
+
+LDFLAGS="$LDFLAGS $LIB_SASL"
+
+AC_CHECK_LIB(sasl2, sasl_checkapop,
+ [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])],
+ [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
+
+LDFLAGS=$cmu_saved_LDFLAGS
+])
+m4trace:cmulocal/sasl2.m4:472: -1- AC_DEFUN([SASL2_CRYPT_CHK], [AC_CHECK_FUNC(crypt, cmu_have_crypt=yes,
+ [AC_CHECK_LIB(crypt, crypt,
+ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes,
+ cmu_have_crypt=no)])
+AC_SUBST(LIB_CRYPT)
+])
+m4trace:cmulocal/ucdsnmp.m4:71: -1- AC_DEFUN([CMU_UCDSNMP], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+ AC_REQUIRE([CMU_SOCKETS])
+ AC_ARG_WITH(snmp,
+ [ --with-snmp=DIR use ucd|net snmp (rooted in DIR) [yes] ],
+ with_snmp=$withval, with_snmp=yes)
+
+ dnl
+ dnl Maintain backwards compatibility with old --with-ucdsnmp option
+ dnl
+ AC_ARG_WITH(ucdsnmp,, with_snmp=$withval,)
+
+if test "$with_snmp" != "no"; then
+
+ dnl
+ dnl Try net-snmp first
+ dnl
+ if test "$with_snmp" = "yes"; then
+ AC_PATH_PROG(SNMP_CONFIG,net-snmp-config,,[/usr/local/bin:$PATH])
+ else
+ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
+ fi
+
+ if test -x "$SNMP_CONFIG"; then
+ AC_MSG_CHECKING(NET SNMP libraries)
+
+ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
+ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
+
+ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
+ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
+ LIB_UCDSNMP=$SNMP_LIBS
+ AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
+ AC_SUBST(LIB_UCDSNMP)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([Could not find the required paths. Please check your net-snmp installation.])
+ fi
+ else
+ dnl
+ dnl Try ucd-snmp if net-snmp test failed
+ dnl
+ if test "$with_snmp" != no; then
+ if test -d "$with_snmp"; then
+ CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
+ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ AC_CHECK_LIB(snmp, sprint_objid, [
+ AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)],
+ with_snmp=no, ${LIB_SOCKET})
+ LIBS="$cmu_save_LIBS"
+ fi
+ AC_MSG_CHECKING(UCD SNMP libraries)
+ AC_MSG_RESULT($with_snmp)
+ LIB_UCDSNMP=""
+ if test "$with_snmp" != no; then
+ AC_DEFINE(HAVE_UCDSNMP,1,[Do we have UCD-SNMP support?])
+ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
+ AC_CHECK_LIB(rpm, rpmdbOpen,
+ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt",,-lpopt)
+ fi
+ AC_SUBST(LIB_UCDSNMP)
+ fi
+fi
+
+])
+m4trace:configure.in:49: -1- AC_INIT([imap/imapd.c])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.in:49: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.in:49: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.in:49: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.in:49: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.in:49: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.in:49: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.in:49: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.in:49: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.in:49: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.in:49: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.in:49: -1- AC_SUBST([datadir], ['${prefix}/share'])
+m4trace:configure.in:49: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.in:49: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.in:49: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.in:49: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.in:49: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.in:49: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.in:49: -1- AC_SUBST([infodir], ['${prefix}/info'])
+m4trace:configure.in:49: -1- AC_SUBST([mandir], ['${prefix}/man'])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.in:49: -1- AC_SUBST([build_alias])
+m4trace:configure.in:49: -1- AC_SUBST([host_alias])
+m4trace:configure.in:49: -1- AC_SUBST([target_alias])
+m4trace:configure.in:49: -1- AC_SUBST([DEFS])
+m4trace:configure.in:49: -1- AC_SUBST([ECHO_C])
+m4trace:configure.in:49: -1- AC_SUBST([ECHO_N])
+m4trace:configure.in:49: -1- AC_SUBST([ECHO_T])
+m4trace:configure.in:49: -1- AC_SUBST([LIBS])
+m4trace:configure.in:51: -1- AC_CONFIG_HEADERS([config.h])
+m4trace:configure.in:52: -1- AC_CANONICAL_HOST
+m4trace:configure.in:52: -1- AC_SUBST([build], [$ac_cv_build])
+m4trace:configure.in:52: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.in:52: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.in:52: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.in:52: -1- AC_SUBST([host], [$ac_cv_host])
+m4trace:configure.in:52: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.in:52: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.in:52: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.in:56: -1- AC_DEFINE_TRACE_LITERAL([EXTRA_IDENT])
+m4trace:configure.in:56: -1- AH_OUTPUT([EXTRA_IDENT], [/* Extra version information for imap/version.h */
+#undef EXTRA_IDENT])
+m4trace:configure.in:58: -1- AC_SUBST([MAKEDEPEND])
+m4trace:configure.in:64: -2- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+configure.in:64: the top level])
+m4trace:configure.in:68: -1- AC_SUBST([cyrus_prefix])
+m4trace:configure.in:69: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_PATH])
+m4trace:configure.in:69: -1- AH_OUTPUT([CYRUS_PATH], [/* Where will we be installed? */
+#undef CYRUS_PATH])
+m4trace:configure.in:72: -1- AC_SUBST([service_path])
+m4trace:configure.in:73: -1- AC_DEFINE_TRACE_LITERAL([SERVICE_PATH])
+m4trace:configure.in:73: -1- AH_OUTPUT([SERVICE_PATH], [/* Directiory to use for service binaries */
+#undef SERVICE_PATH])
+m4trace:configure.in:76: -1- AC_SUBST([cyrus_user])
+m4trace:configure.in:77: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_USER])
+m4trace:configure.in:77: -1- AH_OUTPUT([CYRUS_USER], [/* What user will we run as? */
+#undef CYRUS_USER])
+m4trace:configure.in:80: -1- AC_SUBST([cyrus_group])
+m4trace:configure.in:87: -1- AC_DEFINE_TRACE_LITERAL([SYSCONFDIR])
+m4trace:configure.in:87: -1- AH_OUTPUT([SYSCONFDIR], [/* Config File Location */
+#undef SYSCONFDIR])
+m4trace:configure.in:89: -1- AC_PROG_CC
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([CFLAGS])
+m4trace:configure.in:89: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.in:89: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.in:89: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
+m4trace:configure.in:89: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
+m4trace:configure.in:90: -1- AC_PROG_RANLIB
+m4trace:configure.in:90: -1- AC_SUBST([RANLIB])
+m4trace:configure.in:90: -1- AC_SUBST([ac_ct_RANLIB])
+m4trace:configure.in:91: -1- AC_PROG_MAKE_SET
+m4trace:configure.in:91: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.in:92: -1- AC_PROG_INSTALL
+m4trace:configure.in:92: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.in:92: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.in:92: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.in:93: -1- AH_OUTPUT([_ALL_SOURCE], [/* Define to 1 if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+@%:@ifndef _ALL_SOURCE
+@%:@ undef _ALL_SOURCE
+@%:@endif])
+m4trace:configure.in:93: -1- AC_PROG_CPP
+m4trace:configure.in:93: -1- AC_SUBST([CPP])
+m4trace:configure.in:93: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:93: -1- AC_SUBST([CPP])
+m4trace:configure.in:93: -1- AC_SUBST([EGREP])
+m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_ALL_SOURCE])
+m4trace:configure.in:95: -1- AC_PROG_AWK
+m4trace:configure.in:95: -1- AC_SUBST([AWK])
+m4trace:configure.in:96: -1- AC_C_CONST
+m4trace:configure.in:96: -1- AC_DEFINE_TRACE_LITERAL([const])
+m4trace:configure.in:96: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
+#undef const])
+m4trace:configure.in:97: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_FILE_NAMES])
+m4trace:configure.in:97: -1- AH_OUTPUT([HAVE_LONG_FILE_NAMES], [/* Define to 1 if you support file names longer than 14 characters. */
+#undef HAVE_LONG_FILE_NAMES])
+m4trace:configure.in:101: -1- AC_C_INLINE
+m4trace:configure.in:101: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
+ calls it, or to nothing if \'inline\' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif])
+m4trace:configure.in:103: -1- AC_HEADER_STDC
+m4trace:configure.in:103: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
+m4trace:configure.in:103: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS])
+m4trace:configure.in:103: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H])
+m4trace:configure.in:103: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from...
+configure.in:103: the top level])
+m4trace:configure.in:103: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
+m4trace:configure.in:103: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of a `long\', as computed by sizeof. */
+#undef SIZEOF_LONG])
+m4trace:configure.in:106: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from...
+configure.in:106: the top level])
+m4trace:configure.in:106: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG_INT])
+m4trace:configure.in:106: -1- AH_OUTPUT([SIZEOF_LONG_LONG_INT], [/* The size of a `long long int\', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG_INT])
+m4trace:configure.in:107: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from...
+configure.in:107: the top level])
+m4trace:configure.in:107: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.in:107: -1- AH_OUTPUT([SIZEOF_UNSIGNED_LONG_LONG_INT], [/* The size of a `unsigned long long int\', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.in:110: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG_INT])
+m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_LONG_LONG_INT], [/* Does the compiler support long long int? */
+#undef HAVE_LONG_LONG_INT])
+m4trace:configure.in:111: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
+m4trace:configure.in:111: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN])
+m4trace:configure.in:114: -1- CMU_C___ATTRIBUTE__
+m4trace:configure.in:114: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+cmulocal/c-attribute.m4:30: CMU_C___ATTRIBUTE__ is expanded from...
+configure.in:114: the top level])
+m4trace:configure.in:114: -1- AC_DEFINE_TRACE_LITERAL([HAVE___ATTRIBUTE__])
+m4trace:configure.in:114: -1- AH_OUTPUT([HAVE___ATTRIBUTE__], [/* define if your compiler has __attribute__ */
+#undef HAVE___ATTRIBUTE__])
+m4trace:configure.in:115: -1- CMU_C_FPIC
+m4trace:configure.in:115: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+cmulocal/c-fpic.m4:34: CMU_C_FPIC is expanded from...
+configure.in:115: the top level])
+m4trace:configure.in:118: -1- CMU_GUESS_RUNPATH_SWITCH
+m4trace:configure.in:118: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+cmulocal/cyrus.m4:45: CMU_GUESS_RUNPATH_SWITCH is expanded from...
+configure.in:118: the top level])
+m4trace:configure.in:118: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+autoconf/general.m4:2215: AC_LINK_IFELSE is expanded from...
+autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+cmulocal/cyrus.m4:45: CMU_GUESS_RUNPATH_SWITCH is expanded from...
+configure.in:118: the top level])
+m4trace:configure.in:120: -1- AC_CHECK_HEADERS([unistd.h sys/select.h sys/param.h stdarg.h])
+m4trace:configure.in:120: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H])
+m4trace:configure.in:120: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H])
+m4trace:configure.in:120: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H])
+m4trace:configure.in:120: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H])
+m4trace:configure.in:121: -1- AC_LIBSOURCE([memmove.c])
+m4trace:configure.in:121: -1- AC_LIBSOURCE([strcasecmp.c])
+m4trace:configure.in:121: -1- AC_LIBSOURCE([ftruncate.c])
+m4trace:configure.in:121: -1- AC_LIBSOURCE([strerror.c])
+m4trace:configure.in:121: -1- AC_CHECK_FUNCS([memmove strcasecmp ftruncate strerror], [], [_AC_LIBOBJ($ac_func)])
+m4trace:configure.in:121: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */
+#undef HAVE_MEMMOVE])
+m4trace:configure.in:121: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */
+#undef HAVE_STRCASECMP])
+m4trace:configure.in:121: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* Define to 1 if you have the `ftruncate\' function. */
+#undef HAVE_FTRUNCATE])
+m4trace:configure.in:121: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
+#undef HAVE_STRERROR])
+m4trace:configure.in:121: -1- AC_SUBST([LIB@&t at OBJS])
+m4trace:configure.in:122: -1- AC_CHECK_FUNCS([strlcat strlcpy])
+m4trace:configure.in:122: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the `strlcat\' function. */
+#undef HAVE_STRLCAT])
+m4trace:configure.in:122: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the `strlcpy\' function. */
+#undef HAVE_STRLCPY])
+m4trace:configure.in:123: -1- AC_HEADER_DIRENT
+m4trace:configure.in:123: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR\'.
+ */
+#undef HAVE_DIRENT_H])
+m4trace:configure.in:123: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR\'.
+ */
+#undef HAVE_SYS_NDIR_H])
+m4trace:configure.in:123: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR\'.
+ */
+#undef HAVE_SYS_DIR_H])
+m4trace:configure.in:123: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR\'. */
+#undef HAVE_NDIR_H])
+m4trace:configure.in:126: -1- CMU_SOCKETS
+m4trace:configure.in:126: -2- AC_CHECK_LIB([nsl], [gethostbyname], [LIB_SOCKET="-lnsl $LIB_SOCKET"])
+m4trace:configure.in:126: -2- AC_CHECK_LIB([socket], [connect], [LIB_SOCKET="-lsocket $LIB_SOCKET"])
+m4trace:configure.in:126: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+cmulocal/bsd_sockets.m4:39: CMU_SOCKETS is expanded from...
+configure.in:126: the top level])
+m4trace:configure.in:126: -1- AC_CHECK_FUNCS([dn_expand dns_lookup])
+m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_DN_EXPAND], [/* Define to 1 if you have the `dn_expand\' function. */
+#undef HAVE_DN_EXPAND])
+m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_DNS_LOOKUP], [/* Define to 1 if you have the `dns_lookup\' function. */
+#undef HAVE_DNS_LOOKUP])
+m4trace:configure.in:126: -1- AC_SUBST([LIB_SOCKET])
+m4trace:configure.in:133: -1- IPv6_CHECK_FUNC([getaddrinfo], [IPv6_CHECK_FUNC(gai_strerror,
+ AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?]),
+ cyrus_cv_getaddrinfo=no)], [cyrus_cv_getaddrinfo=no])
+m4trace:configure.in:133: -1- AC_CHECK_LIB([socket], [getaddrinfo], [dnl
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getaddrinfo=no
+ ], [dnl
+ AC_MSG_CHECKING([whether your system has IPv6 directory])
+ AC_CACHE_VAL(ipv6_cv_dir, [dnl
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done])dnl
+ AC_MSG_RESULT($ipv6_cv_dir)
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getaddrinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ AC_CHECK_LIB(inet6, getaddrinfo, [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi],)dnl
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi])
+m4trace:configure.in:133: -1- AC_CHECK_LIB([inet6], [getaddrinfo], [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi], [])
+m4trace:configure.in:133: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.in:133: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.in:133: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.in:133: -2- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.in:133: -1- IPv6_CHECK_FUNC([gai_strerror], [
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETADDRINFO
+_ACEOF
+], [cyrus_cv_getaddrinfo=no])
+m4trace:configure.in:133: -1- AC_CHECK_LIB([socket], [gai_strerror], [dnl
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_gai_strerror=no
+ ], [dnl
+ AC_MSG_CHECKING([whether your system has IPv6 directory])
+ AC_CACHE_VAL(ipv6_cv_dir, [dnl
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done])dnl
+ AC_MSG_RESULT($ipv6_cv_dir)
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_gai_strerror=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ AC_CHECK_LIB(inet6, gai_strerror, [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi],)dnl
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi])
+m4trace:configure.in:133: -1- AC_CHECK_LIB([inet6], [gai_strerror], [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi], [])
+m4trace:configure.in:133: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.in:133: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.in:141: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETNAMEINFO])
+m4trace:configure.in:141: -2- AH_OUTPUT([HAVE_GETNAMEINFO], [/* Do we have a getnameinfo? */
+#undef HAVE_GETNAMEINFO])
+m4trace:configure.in:142: -1- IPv6_CHECK_FUNC([getnameinfo], [
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETNAMEINFO
+_ACEOF
+], [cyrus_cv_getnameinfo=no])
+m4trace:configure.in:142: -1- AC_CHECK_LIB([socket], [getnameinfo], [dnl
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getnameinfo=no
+ ], [dnl
+ AC_MSG_CHECKING([whether your system has IPv6 directory])
+ AC_CACHE_VAL(ipv6_cv_dir, [dnl
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done])dnl
+ AC_MSG_RESULT($ipv6_cv_dir)
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getnameinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ AC_CHECK_LIB(inet6, getnameinfo, [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi],)dnl
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi])
+m4trace:configure.in:142: -1- AC_CHECK_LIB([inet6], [getnameinfo], [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi], [])
+m4trace:configure.in:142: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.in:142: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.in:148: -1- IPv6_CHECK_SS_FAMILY([])
+m4trace:configure.in:148: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+cmulocal/ipv6.m4:78: IPv6_CHECK_SS_FAMILY is expanded from...
+configure.in:148: the top level])
+m4trace:configure.in:148: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SS_FAMILY])
+m4trace:configure.in:148: -2- AH_OUTPUT([HAVE_SS_FAMILY], [/* Is there an ss_family in sockaddr_storage? */
+#undef HAVE_SS_FAMILY])
+m4trace:configure.in:149: -1- IPv6_CHECK_SA_LEN([])
+m4trace:configure.in:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+cmulocal/ipv6.m4:94: IPv6_CHECK_SA_LEN is expanded from...
+configure.in:149: the top level])
+m4trace:configure.in:149: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKADDR_SA_LEN])
+m4trace:configure.in:149: -2- AH_OUTPUT([HAVE_SOCKADDR_SA_LEN], [/* Does sockaddr have an sa_len? */
+#undef HAVE_SOCKADDR_SA_LEN])
+m4trace:configure.in:151: -1- AC_SUBST([IPV6_OBJS])
+m4trace:configure.in:154: -1- AC_CHECK_HEADERS([sys/time.h])
+m4trace:configure.in:154: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H])
+m4trace:configure.in:155: -1- AC_HEADER_TIME
+m4trace:configure.in:155: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
+m4trace:configure.in:155: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME])
+m4trace:configure.in:156: -1- AC_STRUCT_TM
+m4trace:configure.in:156: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
+m4trace:configure.in:156: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares `struct tm\'. */
+#undef TM_IN_SYS_TIME])
+m4trace:configure.in:157: -1- AC_STRUCT_TIMEZONE
+m4trace:configure.in:157: -1- AC_CHECK_MEMBERS([struct tm.tm_zone], [], [], [#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+])
+m4trace:configure.in:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TM_TM_ZONE])
+m4trace:configure.in:157: -1- AH_OUTPUT([HAVE_STRUCT_TM_TM_ZONE], [/* Define to 1 if `tm_zone\' is member of `struct tm\'. */
+#undef HAVE_STRUCT_TM_TM_ZONE])
+m4trace:configure.in:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_ZONE])
+m4trace:configure.in:157: -1- AH_OUTPUT([HAVE_TM_ZONE], [/* Define to 1 if your `struct tm\' has `tm_zone\'. Deprecated, use
+ `HAVE_STRUCT_TM_TM_ZONE\' instead. */
+#undef HAVE_TM_ZONE])
+m4trace:configure.in:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZNAME])
+m4trace:configure.in:157: -1- AH_OUTPUT([HAVE_TZNAME], [/* Define to 1 if you don\'t have `tm_zone\' but do have the external array
+ `tzname\'. */
+#undef HAVE_TZNAME])
+m4trace:configure.in:159: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:160: -1- AC_SUBST([PRE_SUBDIRS])
+m4trace:configure.in:161: -1- AC_SUBST([EXTRA_SUBDIRS])
+m4trace:configure.in:162: -1- AC_SUBST([DEPLIBS])
+m4trace:configure.in:163: -1- AC_SUBST([LOCALDEFS])
+m4trace:configure.in:164: -1- AC_FUNC_VPRINTF
+m4trace:configure.in:164: -1- AC_CHECK_FUNCS([vprintf], [
+AC_CHECK_FUNC(_doprnt,
+ [AC_DEFINE(HAVE_DOPRNT, 1,
+ [Define to 1 if you don't have `vprintf' but do have
+ `_doprnt.'])])])
+m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_VPRINTF], [/* Define to 1 if you have the `vprintf\' function. */
+#undef HAVE_VPRINTF])
+m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOPRNT])
+m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_DOPRNT], [/* Define to 1 if you don\'t have `vprintf\' but do have `_doprnt.\' */
+#undef HAVE_DOPRNT])
+m4trace:configure.in:197: -1- CYRUS_BERKELEY_DB_CHK([])
+m4trace:configure.in:197: -1- CYRUS_BERKELEY_DB_OPTS
+m4trace:configure.in:197: -1- CYRUS_BERKELEY_DB_CHK_LIB([])
+m4trace:configure.in:197: -1- CMU_ADD_LIBPATH_TO([$with_bdb_lib], [LDFLAGS])
+m4trace:configure.in:197: -1- CMU_ADD_LIBPATH_TO([$with_bdb_lib], [BDB_LIBADD])
+m4trace:configure.in:197: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+cmulocal/berkdb.m4:235: CYRUS_BERKELEY_DB_CHK_LIB is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+cmulocal/berkdb.m4:269: CYRUS_BERKELEY_DB_CHK is expanded from...
+configure.in:197: the top level])
+m4trace:configure.in:197: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+cmulocal/berkdb.m4:235: CYRUS_BERKELEY_DB_CHK_LIB is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+cmulocal/berkdb.m4:269: CYRUS_BERKELEY_DB_CHK is expanded from...
+configure.in:197: the top level])
+m4trace:configure.in:201: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+configure.in:201: the top level])
+m4trace:configure.in:205: -1- CMU_ADD_LIBPATH([$with_bdb_lib])
+m4trace:configure.in:210: -1- AC_SUBST([BDB_INC])
+m4trace:configure.in:211: -1- AC_SUBST([BDB_LIB])
+m4trace:configure.in:217: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BDB])
+m4trace:configure.in:217: -1- AH_OUTPUT([HAVE_BDB], [/* Build in Berkeley DB support? */
+#undef HAVE_BDB])
+m4trace:configure.in:222: -1- AC_SUBST([CYRUSDB_OBJS])
+m4trace:configure.in:234: -1- AC_SUBST([SIEVE_OBJS])
+m4trace:configure.in:236: -1- AC_SUBST([SIEVE_LIBS])
+m4trace:configure.in:238: -1- AC_SUBST([SIEVE_CPPFLAGS])
+m4trace:configure.in:239: -1- AC_DEFINE_TRACE_LITERAL([USE_SIEVE])
+m4trace:configure.in:239: -1- AH_OUTPUT([USE_SIEVE], [/* Build in Sieve support? */
+#undef USE_SIEVE])
+m4trace:configure.in:242: -1- AC_PROG_YACC
+m4trace:configure.in:242: -1- AC_SUBST([YACC])
+m4trace:configure.in:243: -1- AC_PROG_LEX
+m4trace:configure.in:243: -1- AC_SUBST([LEX])
+m4trace:configure.in:243: -1- AC_CHECK_LIB([fl], [yywrap], [LEXLIB="-lfl"], [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")])
+m4trace:configure.in:243: -1- AC_CHECK_LIB([l], [yywrap], [LEXLIB="-ll"])
+m4trace:configure.in:243: -1- AC_SUBST([LEXLIB])
+m4trace:configure.in:243: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])
+m4trace:configure.in:243: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER])
+m4trace:configure.in:243: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a
+ `char[]\'. */
+#undef YYTEXT_POINTER])
+m4trace:configure.in:244: -1- AC_CHECK_LIB([fl], [main])
+m4trace:configure.in:244: -1- AH_OUTPUT([HAVE_LIBFL], [/* Define to 1 if you have the `fl\' library (-lfl). */
+#undef HAVE_LIBFL])
+m4trace:configure.in:244: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBFL])
+m4trace:configure.in:248: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_REGEX])
+m4trace:configure.in:248: -1- AH_OUTPUT([ENABLE_REGEX], [/* Do we have a decent regex library? */
+#undef ENABLE_REGEX])
+m4trace:configure.in:248: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RX])
+m4trace:configure.in:248: -2- AH_OUTPUT([HAVE_RX], [/* Do we have rxposix.h? */
+#undef HAVE_RX])
+m4trace:configure.in:255: -1- AC_SUBST([SIEVE_SUBDIRS])
+m4trace:configure.in:258: -2- AC_DEFINE_TRACE_LITERAL([HAS_STRERROR])
+m4trace:configure.in:258: -2- AH_OUTPUT([HAS_STRERROR], [/* Do we have strerror()? */
+#undef HAS_STRERROR])
+m4trace:configure.in:259: -2- AC_DEFINE_TRACE_LITERAL([NEED_SYS_ERRLIST])
+m4trace:configure.in:259: -2- AH_OUTPUT([NEED_SYS_ERRLIST], [/* Do we have a sys_errlist? */
+#undef NEED_SYS_ERRLIST])
+m4trace:configure.in:259: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete.
+You should run autoupdate.], [autoconf/functions.m4:111: AC_FUNC_CHECK is expanded from...
+configure.in:259: the top level])
+m4trace:configure.in:262: -1- AC_CHECK_HEADERS([sys/resource.h])
+m4trace:configure.in:262: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H])
+m4trace:configure.in:263: -1- AC_CHECK_FUNCS([setrlimit])
+m4trace:configure.in:263: -1- AH_OUTPUT([HAVE_SETRLIMIT], [/* Define to 1 if you have the `setrlimit\' function. */
+#undef HAVE_SETRLIMIT])
+m4trace:configure.in:264: -1- AC_CHECK_FUNCS([getrlimit])
+m4trace:configure.in:264: -1- AH_OUTPUT([HAVE_GETRLIMIT], [/* Define to 1 if you have the `getrlimit\' function. */
+#undef HAVE_GETRLIMIT])
+m4trace:configure.in:267: -1- AC_CHECK_FUNCS([daemon setsid])
+m4trace:configure.in:267: -1- AH_OUTPUT([HAVE_DAEMON], [/* Define to 1 if you have the `daemon\' function. */
+#undef HAVE_DAEMON])
+m4trace:configure.in:267: -1- AH_OUTPUT([HAVE_SETSID], [/* Define to 1 if you have the `setsid\' function. */
+#undef HAVE_SETSID])
+m4trace:configure.in:270: -1- AC_CHECK_FUNCS([shutdown])
+m4trace:configure.in:270: -1- AH_OUTPUT([HAVE_SHUTDOWN], [/* Define to 1 if you have the `shutdown\' function. */
+#undef HAVE_SHUTDOWN])
+m4trace:configure.in:272: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKLEN_T])
+m4trace:configure.in:272: -2- AH_OUTPUT([HAVE_SOCKLEN_T], [/* Do we have a socklen_t? */
+#undef HAVE_SOCKLEN_T])
+m4trace:configure.in:274: -2- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE])
+m4trace:configure.in:274: -2- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE], [/* Do we have a sockaddr_storage? */
+#undef HAVE_STRUCT_SOCKADDR_STORAGE])
+m4trace:configure.in:275: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RLIM_T])
+m4trace:configure.in:275: -2- AH_OUTPUT([HAVE_RLIM_T], [/* Do we have an rlim_t? */
+#undef HAVE_RLIM_T])
+m4trace:configure.in:283: -1- AC_CHECK_LIB([util], [setproctitle], [spt_type=SPT_BUILTIN
+ LIBS="${LIBS} -lutil"])
+m4trace:configure.in:298: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+configure.in:298: the top level])
+m4trace:configure.in:309: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+configure.in:309: the top level])
+m4trace:configure.in:320: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+configure.in:320: the top level])
+m4trace:configure.in:327: -1- AC_DEFINE_TRACE_LITERAL([SPT_TYPE])
+m4trace:configure.in:327: -1- AH_OUTPUT([SPT_TYPE], [/* Do we already have setproctitle? */
+#undef SPT_TYPE])
+m4trace:configure.in:337: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+configure.in:337: the top level])
+m4trace:configure.in:339: -1- AC_SUBST([WITH_NONBLOCK])
+m4trace:configure.in:346: -2- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+configure.in:346: the top level])
+m4trace:configure.in:348: -1- AC_SUBST([WITH_GMTOFF])
+m4trace:configure.in:376: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2289: AC_TRY_RUN is expanded from...
+configure.in:376: the top level])
+m4trace:configure.in:408: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2289: AC_TRY_RUN is expanded from...
+configure.in:408: the top level])
+m4trace:configure.in:419: -1- AC_SUBST([WITH_MAP])
+m4trace:configure.in:428: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+autoconf/functions.m4:74: AC_CHECK_FUNC is expanded from...
+autoconf/functions.m4:74: AC_CHECK_FUNC is expanded from...
+autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
+configure.in:428: the top level])
+m4trace:configure.in:430: -1- AC_SUBST([WITH_LOCK])
+m4trace:configure.in:434: -2- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC])
+m4trace:configure.in:434: -2- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */
+#undef HAVE_FDATASYNC])
+m4trace:configure.in:439: -1- AC_CHECK_LIB([rt], [fdatasync], [
+ LIB_RT="-lrt"
+ AC_DEFINE(HAVE_FDATASYNC,[],[Do we have fdatasync()?])
+ ])
+m4trace:configure.in:439: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC])
+m4trace:configure.in:439: -1- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */
+#undef HAVE_FDATASYNC])
+m4trace:configure.in:460: -1- AC_CHECK_LIB([BSD], [sigvec], [cyrus_sigveclib="-lBSD"], [
+ dnl not hp flavor
+ SAVE_LDFLAGS="$LDFLAGS"
+ dnl solaris flavor
+ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
+ AC_CHECK_LIB(ucb, sigvec, [
+ dnl more solaris flavor
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"],
+ [ cant_find_sigvec=yes ])
+ LDFLAGS="$SAVE_LDFLAGS"])
+m4trace:configure.in:460: -1- AC_CHECK_LIB([ucb], [sigvec], [
+ dnl more solaris flavor
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"], [ cant_find_sigvec=yes ])
+m4trace:configure.in:461: -1- AC_SUBST([cyrus_sigveclib])
+m4trace:configure.in:475: -1- SASL_SET_GSSAPI_LIBS
+m4trace:configure.in:475: -1- AC_DEFINE_TRACE_LITERAL([AFSPTS_USE_KRB5])
+m4trace:configure.in:475: -1- AH_OUTPUT([AFSPTS_USE_KRB5], [/* Should the AFS PTS plugin use krb5? */
+#undef AFSPTS_USE_KRB5])
+m4trace:configure.in:487: -1- CMU_ADD_LIBPATH_TO([/usr/ucblib], [AFS_LDFLAGS])
+m4trace:configure.in:508: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+configure.in:508: the top level])
+m4trace:configure.in:514: -1- AC_SUBST([AFS_LIBS])
+m4trace:configure.in:515: -1- AC_SUBST([AFS_LDFLAGS])
+m4trace:configure.in:516: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB])
+m4trace:configure.in:516: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */
+#undef HAVE_AFSKRB])
+m4trace:configure.in:520: -1- AC_SUBST([AFS_LIBS])
+m4trace:configure.in:521: -1- AC_SUBST([AFS_LDFLAGS])
+m4trace:configure.in:522: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB])
+m4trace:configure.in:522: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */
+#undef HAVE_AFSKRB])
+m4trace:configure.in:550: -1- AC_CHECK_LIB([ldap], [ldap_initialize], [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
+ AC_SUBST(LDAP_CPPFLAGS)
+ AC_SUBST(LDAP_LDFLAGS)
+ AC_SUBST(LDAP_LIBS)
+ LDAP_LIBS="-lldap -llber" ], [], [-llber])
+m4trace:configure.in:550: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP])
+m4trace:configure.in:550: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */
+#undef HAVE_LDAP])
+m4trace:configure.in:550: -1- AC_SUBST([LDAP_CPPFLAGS])
+m4trace:configure.in:550: -1- AC_SUBST([LDAP_LDFLAGS])
+m4trace:configure.in:550: -1- AC_SUBST([LDAP_LIBS])
+m4trace:configure.in:560: -1- AC_CHECK_LIB([ldap], [ldap_initialize], [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
+ AC_SUBST(LDAP_CPPFLAGS)
+ AC_SUBST(LDAP_LDFLAGS)
+ AC_SUBST(LDAP_LIBS)
+ LDAP_LIBS="-lldap -llber" ], [], [-llber])
+m4trace:configure.in:560: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP])
+m4trace:configure.in:560: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */
+#undef HAVE_LDAP])
+m4trace:configure.in:560: -1- AC_SUBST([LDAP_CPPFLAGS])
+m4trace:configure.in:560: -1- AC_SUBST([LDAP_LDFLAGS])
+m4trace:configure.in:560: -1- AC_SUBST([LDAP_LIBS])
+m4trace:configure.in:570: -1- AC_DEFINE_TRACE_LITERAL([WITH_PTS])
+m4trace:configure.in:570: -1- AH_OUTPUT([WITH_PTS], [/* Build in PTS support? */
+#undef WITH_PTS])
+m4trace:configure.in:581: -1- AC_SUBST([SERVER_SUBDIRS])
+m4trace:configure.in:599: -1- AC_CHECK_LIB([resolv], [res_search])
+m4trace:configure.in:599: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
+#undef HAVE_LIBRESOLV])
+m4trace:configure.in:599: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
+m4trace:configure.in:616: -1- AC_CHECK_LIB([des], [des_ecb_encrypt], [if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$with_krb/lib/libdes.a"
+ else
+ KRB_LIBS="-ldes"
+ fi], [{ { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
+echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
+ { (exit 1); exit 1; }; }])
+m4trace:configure.in:636: -1- CMU_ADD_LIBPATH([${with_krb}/lib])
+m4trace:configure.in:653: -3- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+configure.in:653: the top level])
+m4trace:configure.in:654: -2- AC_CHECK_LIB([${KRBLIB}], [krb_mk_priv], [if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
+ else
+ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
+ fi], [{ echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
+echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no], [$KRB_LIBS])
+m4trace:configure.in:655: -2- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+configure.in:655: the top level])
+m4trace:configure.in:657: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+configure.in:657: the top level])
+m4trace:configure.in:662: -1- AC_DEFINE_TRACE_LITERAL([HAVE_KRB])
+m4trace:configure.in:662: -1- AH_OUTPUT([HAVE_KRB], [/* Support for Kerberos? */
+#undef HAVE_KRB])
+m4trace:configure.in:667: -1- SASL_SET_GSSAPI_LIBS
+m4trace:configure.in:686: -1- AC_CHECK_LIB([rsaref], [RSAPublicEncrypt], [LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes], [cmu_have_rsaref=no])
+m4trace:configure.in:691: -1- AC_CHECK_LIB([crypto], [BIO_accept], [LIBS="-lcrypto $LIB_RSAREF ${LIBS}"], [with_openssl="no"], [$LIB_RSAREF])
+m4trace:configure.in:693: -1- AC_CHECK_LIB([ssl], [SSL_CTX_new], [LIBS="-lssl ${LIBS}"], [with_openssl="no"], [-lcrypto $LIB_RSAREF])
+m4trace:configure.in:700: -1- CMU_ADD_LIBPATH([${OPENSSL_LIBPATH}])
+m4trace:configure.in:701: -1- CMU_ADD_LIBPATH_TO([${OPENSSL_LIBPATH}], [OPENSSL_LIB])
+m4trace:configure.in:709: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSL])
+m4trace:configure.in:709: -1- AH_OUTPUT([HAVE_SSL], [/* Build with SSL support? */
+#undef HAVE_SSL])
+m4trace:configure.in:712: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_ENABLE_OLD_DES_SUPPORT])
+m4trace:configure.in:712: -1- AH_OUTPUT([OPENSSL_ENABLE_OLD_DES_SUPPORT], [/* Configure OpenSSL to provide legacy des apis */
+#undef OPENSSL_ENABLE_OLD_DES_SUPPORT])
+m4trace:configure.in:713: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_DES_LIBDES_COMPATIBILITY])
+m4trace:configure.in:713: -1- AH_OUTPUT([OPENSSL_DES_LIBDES_COMPATIBILITY], [/* Configure OpenSSL to provide krb4-compatible legacy des apis */
+#undef OPENSSL_DES_LIBDES_COMPATIBILITY])
+m4trace:configure.in:716: -1- AC_SUBST([OPENSSL_INC])
+m4trace:configure.in:717: -1- AC_SUBST([OPENSSL_LIB])
+m4trace:configure.in:728: -1- AC_DEFINE_TRACE_LITERAL([EGD_SOCKET])
+m4trace:configure.in:728: -1- AH_OUTPUT([EGD_SOCKET], [/* Alternative to /dev/urandom? */
+#undef EGD_SOCKET])
+m4trace:configure.in:748: -1- AC_CHECK_LIB([zephyr], [ZInitialize], [ZEPHYR_LIBS="-lzephyr"], [with_zephyr="no"], [])
+m4trace:configure.in:756: -1- AC_SUBST([ZEPHYR_LIBS])
+m4trace:configure.in:757: -1- AC_SUBST([ZEPHYR_CPPFLAGS])
+m4trace:configure.in:759: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ZEPHYR])
+m4trace:configure.in:759: -1- AH_OUTPUT([HAVE_ZEPHYR], [/* Build with Zephyr support? */
+#undef HAVE_ZEPHYR])
+m4trace:configure.in:769: -1- AC_DEFINE_TRACE_LITERAL([MASTER_PIDFILE])
+m4trace:configure.in:769: -1- AH_OUTPUT([MASTER_PIDFILE], [/* Name of the pidfile for master */
+#undef MASTER_PIDFILE])
+m4trace:configure.in:802: -1- AC_CHECK_HEADERS([sys/sockio.h])
+m4trace:configure.in:802: -1- AH_OUTPUT([HAVE_SYS_SOCKIO_H], [/* Define to 1 if you have the <sys/sockio.h> header file. */
+#undef HAVE_SYS_SOCKIO_H])
+m4trace:configure.in:816: -1- AC_SUBST([IMAP_PROGS])
+m4trace:configure.in:848: -1- AC_CHECK_LIB([com_err], [com_err], [
+ # com_err is already in library path
+ # guess we're okay
+ # can use system com_err
+ with_com_err=""
+ AC_CHECK_HEADER(et/com_err.h,
+ [AC_DEFINE(HAVE_ET_COM_ERR_H,[],[We need et/com_err.h])],
+ [AC_CHECK_HEADER(com_err.h,[],[AC_ERROR([cannot locate com_err.h])])])
+ AC_PATH_PROG(COMPILE_ET, compile_et, [no compile et])
+ ], [
+ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
+ with_com_err="/usr/local"
+ AC_PATH_PROG(COMPILE_ET, /usr/local/bin/compile_et, [no compile et])
+ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
+ with_com_err="/usr"
+ AC_PATH_PROG(COMPILE_ET, /usr/bin/compile_et, [no compile et])
+ else
+ # use ours
+ with_com_err=yes
+ fi
+ ])
+m4trace:configure.in:848: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ET_COM_ERR_H])
+m4trace:configure.in:848: -1- AH_OUTPUT([HAVE_ET_COM_ERR_H], [/* We need et/com_err.h */
+#undef HAVE_ET_COM_ERR_H])
+m4trace:configure.in:848: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+autoconf/libs.m4:134: AC_CHECK_LIB is expanded from...
+configure.in:848: the top level])
+m4trace:configure.in:848: -1- AC_SUBST([COMPILE_ET], [$ac_cv_path_COMPILE_ET])
+m4trace:configure.in:848: -1- AC_SUBST([COMPILE_ET], [$ac_cv_path_COMPILE_ET])
+m4trace:configure.in:848: -1- AC_SUBST([COMPILE_ET], [$ac_cv_path_COMPILE_ET])
+m4trace:configure.in:889: -1- AC_SUBST([COMPILE_ET])
+m4trace:configure.in:890: -1- AC_SUBST([COM_ERR_LIBS])
+m4trace:configure.in:891: -1- AC_SUBST([COM_ERR_LDFLAGS])
+m4trace:configure.in:892: -1- AC_SUBST([COM_ERR_CPPFLAGS])
+m4trace:configure.in:898: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+configure.in:898: the top level])
+m4trace:configure.in:913: -1- AC_DEFINE_TRACE_LITERAL([SYSLOG_FACILITY])
+m4trace:configure.in:913: -1- AH_OUTPUT([SYSLOG_FACILITY], [/* Syslog facility to use. */
+#undef SYSLOG_FACILITY])
+m4trace:configure.in:917: -1- AC_LIBSOURCE([getdtablesize.c])
+m4trace:configure.in:917: -1- AC_CHECK_FUNCS([getdtablesize], [], [_AC_LIBOBJ($ac_func)])
+m4trace:configure.in:917: -1- AH_OUTPUT([HAVE_GETDTABLESIZE], [/* Define to 1 if you have the `getdtablesize\' function. */
+#undef HAVE_GETDTABLESIZE])
+m4trace:configure.in:917: -1- AC_SUBST([LIB@&t at OBJS])
+m4trace:configure.in:930: -2- AC_DEFINE_TRACE_LITERAL([OLD_SIEVE_SERVICE_NAME])
+m4trace:configure.in:930: -2- AH_OUTPUT([OLD_SIEVE_SERVICE_NAME], [/* Use "imap" as sieve service name? */
+#undef OLD_SIEVE_SERVICE_NAME])
+m4trace:configure.in:939: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_LISTEXT])
+m4trace:configure.in:939: -2- AH_OUTPUT([ENABLE_LISTEXT], [/* Enable the LISTEXT extension? */
+#undef ENABLE_LISTEXT])
+m4trace:configure.in:946: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_X_NETSCAPE_HACK])
+m4trace:configure.in:946: -2- AH_OUTPUT([ENABLE_X_NETSCAPE_HACK], [/* Enable Netscape Menu Option Hack? */
+#undef ENABLE_X_NETSCAPE_HACK])
+m4trace:configure.in:949: -1- AC_CHECK_LIB([dl], [dlopen])
+m4trace:configure.in:949: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the `dl\' library (-ldl). */
+#undef HAVE_LIBDL])
+m4trace:configure.in:949: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
+m4trace:configure.in:950: -1- CMU_SASL2_REQUIRE_VER([2], [1], [7])
+m4trace:configure.in:950: -1- CMU_SASL2_REQUIRED
+m4trace:configure.in:950: -1- CMU_SASL2
+m4trace:configure.in:950: -1- SASL_GSSAPI_CHK
+m4trace:configure.in:950: -1- SASL2_CRYPT_CHK
+m4trace:configure.in:950: -1- AC_CHECK_LIB([crypt], [crypt], [LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes], [cmu_have_crypt=no])
+m4trace:configure.in:950: -1- AC_SUBST([LIB_CRYPT])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSSAPI_H])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSSAPI_H], [/* Define if you have the gssapi.h header file */
+#undef HAVE_GSSAPI_H])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([resolv], [res_search])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
+#undef HAVE_LIBRESOLV])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gssapi], [gss_unwrap], [gss_impl="heimdal"], [gss_failed=1], [${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET}])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([krb5support], [krb5int_getspecific], [K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a], [], [${LIB_SOCKET}])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gssapi_krb5], [gss_unwrap], [gss_impl="mit"], [gss_failed=1], [${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gss], [csf_gss_acq_user], [gss_impl="cybersafe03"], [unset ac_cv_lib_gss_csf_gss_acq_user;
+ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
+ gss_failed=1,$GSSAPIBASE_LIBS -lgss)], [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gss], [csf_gss_acq_user], [gss_impl="cybersafe"], [gss_failed=1], [$GSSAPIBASE_LIBS -lgss])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gss], [gss_unwrap], [gss_impl="seam"], [gss_failed=1], [-lgss])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+autoconf/general.m4:2129: AC_EGREP_CPP is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
+#undef HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+autoconf/general.m4:2129: AC_EGREP_CPP is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
+#undef HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
+#undef HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([resolv], [res_search], [GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"])
+m4trace:configure.in:950: -1- AC_CHECK_FUNCS([gsskrb5_register_acceptor_identity])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY], [/* Define to 1 if you have the `gsskrb5_register_acceptor_identity\' function.
+ */
+#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY])
+m4trace:configure.in:950: -1- AC_SUBST([GSSAPI_LIBS])
+m4trace:configure.in:950: -1- AC_SUBST([GSSAPIBASE_LIBS])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- CMU_ADD_LIBPATH_TO([$ac_cv_sasl_where_lib], [LIB_DYN_SASL])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([sasl2], [prop_get], [ac_cv_found_sasl=yes], [ac_cv_found_sasl=no])
+m4trace:configure.in:950: -1- CMU_ADD_LIBPATH_TO([$ac_cv_sasl_where_lib], [DYNLIB_SASL])
+m4trace:configure.in:950: -1- AC_SUBST([LIB_DYN_SASL])
+m4trace:configure.in:950: -1- AC_SUBST([DYNSASLFLAGS])
+m4trace:configure.in:950: -1- AC_SUBST([LIB_SASL])
+m4trace:configure.in:950: -1- AC_SUBST([SASLFLAGS])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+autoconf/general.m4:2087: _AC_PREPROC_IFELSE is expanded from...
+autoconf/general.m4:2097: AC_PREPROC_IFELSE is expanded from...
+autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:951: -1- CMU_SASL2_CHECKAPOP_REQUIRED
+m4trace:configure.in:951: -1- AC_CHECK_LIB([sasl2], [sasl_checkapop], [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])], [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
+m4trace:configure.in:951: -1- AC_DEFINE_TRACE_LITERAL([HAVE_APOP])
+m4trace:configure.in:951: -1- AH_OUTPUT([HAVE_APOP], [/* Does SASL support APOP? */
+#undef HAVE_APOP])
+m4trace:configure.in:964: -1- AC_SUBST([PERL])
+m4trace:configure.in:980: -1- AC_SUBST([PERL_CCCDLFLAGS])
+m4trace:configure.in:998: -2- AC_CHECK_LIB([md], [MD5Init], [LIBS="${LIBS} -lmd"], [MD5OBJ="md5.o"])
+m4trace:configure.in:998: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete.
+You should run autoupdate.], [autoconf/functions.m4:111: AC_FUNC_CHECK is expanded from...
+configure.in:998: the top level])
+m4trace:configure.in:999: -1- AC_SUBST([MD5OBJ])
+m4trace:configure.in:1004: -1- AC_SUBST([SNMP_SUBDIRS])
+m4trace:configure.in:1006: -1- CMU_LIBWRAP
+m4trace:configure.in:1006: -1- CMU_FIND_LIB_SUBDIR
+m4trace:configure.in:1006: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+cmulocal/common.m4:61: CMU_FIND_LIB_SUBDIR is expanded from...
+configure.in:1006: CMU_FIND_LIB_SUBDIR is required by...
+cmulocal/libwrap.m4:30: CMU_LIBWRAP is expanded from...
+configure.in:1006: the top level])
+m4trace:configure.in:1006: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from...
+cmulocal/common.m4:61: CMU_FIND_LIB_SUBDIR is expanded from...
+configure.in:1006: CMU_FIND_LIB_SUBDIR is required by...
+cmulocal/libwrap.m4:30: CMU_LIBWRAP is expanded from...
+configure.in:1006: the top level])
+m4trace:configure.in:1006: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
+m4trace:configure.in:1006: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of a `long\', as computed by sizeof. */
+#undef SIZEOF_LONG])
+m4trace:configure.in:1006: -1- AC_SUBST([CMU_LIB_SUBDIR], [$ac_cv_cmu_lib_subdir])
+m4trace:configure.in:1006: -1- AC_CHECK_LIB([wrap], [request_init], [
+ AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)], [with_libwrap=no], [${LIB_SOCKET}])
+m4trace:configure.in:1006: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBWRAP])
+m4trace:configure.in:1006: -1- AH_OUTPUT([HAVE_LIBWRAP], [/* Do we have TCP wrappers? */
+#undef HAVE_LIBWRAP])
+m4trace:configure.in:1006: -1- AC_CHECK_LIB([nsl], [yp_get_default_domain], [LIB_WRAP="${LIB_WRAP} -lnsl"])
+m4trace:configure.in:1006: -1- AC_SUBST([LIB_WRAP])
+m4trace:configure.in:1007: -1- CMU_UCDSNMP
+m4trace:configure.in:1007: -1- AC_SUBST([SNMP_CONFIG], [$ac_cv_path_SNMP_CONFIG])
+m4trace:configure.in:1007: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETSNMP])
+m4trace:configure.in:1007: -1- AH_OUTPUT([HAVE_NETSNMP], [/* Do we have Net-SNMP support? */
+#undef HAVE_NETSNMP])
+m4trace:configure.in:1007: -1- AC_SUBST([LIB_UCDSNMP])
+m4trace:configure.in:1007: -1- AC_CHECK_LIB([snmp], [sprint_objid], [
+ AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)], [with_snmp=no], [${LIB_SOCKET}])
+m4trace:configure.in:1007: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UCDSNMP])
+m4trace:configure.in:1007: -1- AH_OUTPUT([HAVE_UCDSNMP], [/* Do we have UCD-SNMP support? */
+#undef HAVE_UCDSNMP])
+m4trace:configure.in:1007: -1- AC_CHECK_LIB([rpm], [rpmdbOpen], [LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"], [], [-lpopt])
+m4trace:configure.in:1007: -1- AC_SUBST([LIB_UCDSNMP])
+m4trace:configure.in:1042: -1- AC_SUBST([LIB_RT])
+m4trace:configure.in:1043: -1- AC_SUBST([IMAP_COM_ERR_LIBS])
+m4trace:configure.in:1044: -1- AC_SUBST([IMAP_LIBS])
+m4trace:configure.in:1052: -1- AC_SUBST([PERL_SUBDIRS])
+m4trace:configure.in:1053: -1- AC_SUBST([PERL_DEPSUBDIRS])
+m4trace:configure.in:1054: -1- AC_SUBST([PERL])
+m4trace:configure.in:1100: -1- AH_OUTPUT([00001], [
+/* $Id: configure.in,v 1.268.2.23 2005/04/12 20:05:20 shadow Exp $ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _CYRUS_IMAPD_CONFIG_H_
+#define _CYRUS_IMAPD_CONFIG_H_
+])
+m4trace:configure.in:1245: -1- AH_OUTPUT([zzzz2], [
+/* time.h */
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+/* com_err.h, as needed */
+#ifndef IN_COM_ERR
+#ifdef HAVE_ET_COM_ERR_H
+#include <et/com_err.h>
+#else
+#include <com_err.h>
+#endif /* HAVE_ET_COM_ERR_H */
+#endif /* IN_COM_ERR */
+
+/* This allows us to work even when we don\'t have an fdatasync */
+#ifndef HAVE_FDATASYNC
+#define fdatasync(fd) fsync(fd)
+#endif
+
+/* A similar setup for not having O_DSYNC */
+#include <fcntl.h>
+
+#ifndef O_DSYNC
+# ifdef O_SYNC
+# define O_DSYNC O_SYNC /* POSIX */
+# else
+# define O_DSYNC O_FSYNC /* BSD */
+# endif
+#endif
+
+#ifndef HAVE___ATTRIBUTE__
+/* Can\'t use attributes... */
+#define __attribute__(foo)
+#endif
+
+#ifndef HAVE_SOCKLEN_T
+typedef unsigned int socklen_t;
+#endif
+
+#ifndef HAVE_RLIM_T
+typedef int rlim_t;
+#endif
+
+/* some potentially memory saving tradeoffs,
+ preconfigured in memory-saving mode */
+
+/* save the cmdlines for the ID command */
+#undef ID_SAVE_CMDLINE
+
+/* IPv6 things */
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
+#define _SS_MAXSIZE 128 /* Implementation specific max size */
+#define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
+
+struct sockaddr_storage {
+ struct sockaddr ss_sa;
+ char __ss_pad2[_SS_PADSIZE];
+};
+# define ss_family ss_sa.sa_family
+# define HAVE_SS_FAMILY
+#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
+
+#ifndef HAVE_SS_FAMILY
+#define ss_family __ss_family
+#endif
+
+#ifndef AF_INET6
+/* Define it to something that should never appear */
+#define AF_INET6 AF_MAX
+#endif
+
+#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
+#include "gai.h"
+#endif
+
+/* End IPv6 things */
+
+#ifdef OLD_SIEVE_SERVICE_NAME
+#define SIEVE_SERVICE_NAME "imap"
+#else
+#define SIEVE_SERVICE_NAME "sieve"
+#endif
+
+/* filenames */
+#define FNAME_DBDIR "/db"
+#define FNAME_USERDIR "/user/"
+#define FNAME_DOMAINDIR "/domain/"
+#define FNAME_LOGDIR "/log/"
+#define FNAME_PTSDB "/ptclient/ptscache.db"
+#define CONFIG_FILENAME (SYSCONFDIR "/imapd.conf")
+#define DEFAULT_MASTER_CONFIG_FILENAME (SYSCONFDIR "/cyrus.conf")
+
+#ifndef HAVE_SHUTDOWN
+#define shutdown(fd, mode) 0
+#endif
+
+/* compile time options; think carefully before modifying */
+enum {
+ /* should we send an UNAVAILABLE message to master when
+ * a service is exiting (master is already going to be
+ * informed of the exit by the SIGCHLD signal anyway) ? */
+ MESSAGE_MASTER_ON_EXIT = 0,
+
+ /* should a hierarchical rename stop on error? */
+ RENAME_STOP_ON_ERROR = 1,
+
+ /* should we call fsync() to maybe help with softupdates? (it should) */
+ APPEND_ULTRA_PARANOID = 1,
+
+ /* should we log extra information at the DEBUG level for DB stuff?
+ * 0 -> nothing; 1 -> some; higher -> even more */
+ CONFIG_DB_VERBOSE = 1,
+
+ /* log timing information to LOG_DEBUG */
+ CONFIG_TIMING_VERBOSE = 0,
+
+ /* should we be pedantic about namespace or sleezy? */
+ SLEEZY_NAMESPACE = 1,
+
+ /* should we do a fast TLS session shutdown? */
+ TLS_FAST_SHUTDOWN = 1,
+
+ /* should we use the SQUAT engine to accelerate SEARCH? */
+ SQUAT_ENGINE = 1,
+
+ /* should we have long LMTP error messages? */
+ LMTP_LONG_ERROR_MSGS = 1
+};
+
+#endif /* _CYRUS_IMAPD_CONFIG_H_ */
+])
+m4trace:configure.in:1248: -1- AC_CONFIG_FILES([man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile])
+m4trace:configure.in:1248: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.in:1248: -1- AC_SUBST([LIB@&t at OBJS], [$ac_libobjs])
+m4trace:configure.in:1248: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/autom4te.cache/traces.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1201 @@
+m4trace:aclocal.m4:14: -1- m4_include([cmulocal/berkdb.m4])
+m4trace:aclocal.m4:15: -1- m4_include([cmulocal/bsd_sockets.m4])
+m4trace:aclocal.m4:16: -1- m4_include([cmulocal/c-attribute.m4])
+m4trace:aclocal.m4:17: -1- m4_include([cmulocal/c-fpic.m4])
+m4trace:aclocal.m4:18: -1- m4_include([cmulocal/common.m4])
+m4trace:aclocal.m4:19: -1- m4_include([cmulocal/cyrus.m4])
+m4trace:aclocal.m4:20: -1- m4_include([cmulocal/ipv6.m4])
+m4trace:aclocal.m4:21: -1- m4_include([cmulocal/libwrap.m4])
+m4trace:aclocal.m4:22: -1- m4_include([cmulocal/sasl2.m4])
+m4trace:aclocal.m4:23: -1- m4_include([cmulocal/ucdsnmp.m4])
+m4trace:configure.in:49: -1- AC_INIT([imap/imapd.c])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.in:49: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.in:49: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.in:49: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.in:49: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.in:49: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
+m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.in:49: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.in:49: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.in:49: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.in:49: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.in:49: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.in:49: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.in:49: -1- AC_SUBST([datadir], ['${prefix}/share'])
+m4trace:configure.in:49: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.in:49: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.in:49: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.in:49: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.in:49: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.in:49: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.in:49: -1- AC_SUBST([infodir], ['${prefix}/info'])
+m4trace:configure.in:49: -1- AC_SUBST([mandir], ['${prefix}/man'])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.in:49: -1- AC_SUBST([build_alias])
+m4trace:configure.in:49: -1- AC_SUBST([host_alias])
+m4trace:configure.in:49: -1- AC_SUBST([target_alias])
+m4trace:configure.in:49: -1- AC_SUBST([DEFS])
+m4trace:configure.in:49: -1- AC_SUBST([ECHO_C])
+m4trace:configure.in:49: -1- AC_SUBST([ECHO_N])
+m4trace:configure.in:49: -1- AC_SUBST([ECHO_T])
+m4trace:configure.in:49: -1- AC_SUBST([LIBS])
+m4trace:configure.in:51: -1- AC_CONFIG_HEADERS([config.h])
+m4trace:configure.in:52: -1- AC_CANONICAL_HOST
+m4trace:configure.in:52: -1- AC_SUBST([build], [$ac_cv_build])
+m4trace:configure.in:52: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.in:52: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.in:52: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.in:52: -1- AC_SUBST([host], [$ac_cv_host])
+m4trace:configure.in:52: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.in:52: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.in:52: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.in:56: -1- AC_DEFINE_TRACE_LITERAL([EXTRA_IDENT])
+m4trace:configure.in:56: -1- AH_OUTPUT([EXTRA_IDENT], [/* Extra version information for imap/version.h */
+#undef EXTRA_IDENT])
+m4trace:configure.in:58: -1- AC_SUBST([MAKEDEPEND])
+m4trace:configure.in:64: -2- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+configure.in:64: the top level])
+m4trace:configure.in:68: -1- AC_SUBST([cyrus_prefix])
+m4trace:configure.in:69: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_PATH])
+m4trace:configure.in:69: -1- AH_OUTPUT([CYRUS_PATH], [/* Where will we be installed? */
+#undef CYRUS_PATH])
+m4trace:configure.in:72: -1- AC_SUBST([service_path])
+m4trace:configure.in:73: -1- AC_DEFINE_TRACE_LITERAL([SERVICE_PATH])
+m4trace:configure.in:73: -1- AH_OUTPUT([SERVICE_PATH], [/* Directiory to use for service binaries */
+#undef SERVICE_PATH])
+m4trace:configure.in:76: -1- AC_SUBST([cyrus_user])
+m4trace:configure.in:77: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_USER])
+m4trace:configure.in:77: -1- AH_OUTPUT([CYRUS_USER], [/* What user will we run as? */
+#undef CYRUS_USER])
+m4trace:configure.in:80: -1- AC_SUBST([cyrus_group])
+m4trace:configure.in:87: -1- AC_DEFINE_TRACE_LITERAL([SYSCONFDIR])
+m4trace:configure.in:87: -1- AH_OUTPUT([SYSCONFDIR], [/* Config File Location */
+#undef SYSCONFDIR])
+m4trace:configure.in:89: -1- AC_PROG_CC
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([CFLAGS])
+m4trace:configure.in:89: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.in:89: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([CC])
+m4trace:configure.in:89: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.in:89: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
+m4trace:configure.in:89: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
+m4trace:configure.in:90: -1- AC_PROG_RANLIB
+m4trace:configure.in:90: -1- AC_SUBST([RANLIB])
+m4trace:configure.in:90: -1- AC_SUBST([ac_ct_RANLIB])
+m4trace:configure.in:91: -1- AC_PROG_MAKE_SET
+m4trace:configure.in:91: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.in:92: -1- AC_PROG_INSTALL
+m4trace:configure.in:92: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.in:92: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.in:92: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.in:93: -1- AH_OUTPUT([_ALL_SOURCE], [/* Define to 1 if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+@%:@ifndef _ALL_SOURCE
+@%:@ undef _ALL_SOURCE
+@%:@endif])
+m4trace:configure.in:93: -1- AC_PROG_CPP
+m4trace:configure.in:93: -1- AC_SUBST([CPP])
+m4trace:configure.in:93: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:93: -1- AC_SUBST([CPP])
+m4trace:configure.in:93: -1- AC_SUBST([EGREP])
+m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_ALL_SOURCE])
+m4trace:configure.in:95: -1- AC_PROG_AWK
+m4trace:configure.in:95: -1- AC_SUBST([AWK])
+m4trace:configure.in:96: -1- AC_C_CONST
+m4trace:configure.in:96: -1- AC_DEFINE_TRACE_LITERAL([const])
+m4trace:configure.in:96: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
+#undef const])
+m4trace:configure.in:97: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_FILE_NAMES])
+m4trace:configure.in:97: -1- AH_OUTPUT([HAVE_LONG_FILE_NAMES], [/* Define to 1 if you support file names longer than 14 characters. */
+#undef HAVE_LONG_FILE_NAMES])
+m4trace:configure.in:101: -1- AC_C_INLINE
+m4trace:configure.in:101: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
+ calls it, or to nothing if \'inline\' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif])
+m4trace:configure.in:103: -1- AC_HEADER_STDC
+m4trace:configure.in:103: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
+m4trace:configure.in:103: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS])
+m4trace:configure.in:103: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H])
+m4trace:configure.in:103: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H])
+m4trace:configure.in:103: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from...
+configure.in:103: the top level])
+m4trace:configure.in:103: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
+m4trace:configure.in:103: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of a `long\', as computed by sizeof. */
+#undef SIZEOF_LONG])
+m4trace:configure.in:106: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from...
+configure.in:106: the top level])
+m4trace:configure.in:106: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG_INT])
+m4trace:configure.in:106: -1- AH_OUTPUT([SIZEOF_LONG_LONG_INT], [/* The size of a `long long int\', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG_INT])
+m4trace:configure.in:107: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from...
+configure.in:107: the top level])
+m4trace:configure.in:107: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.in:107: -1- AH_OUTPUT([SIZEOF_UNSIGNED_LONG_LONG_INT], [/* The size of a `unsigned long long int\', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.in:110: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG_INT])
+m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_LONG_LONG_INT], [/* Does the compiler support long long int? */
+#undef HAVE_LONG_LONG_INT])
+m4trace:configure.in:111: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
+m4trace:configure.in:111: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN])
+m4trace:configure.in:114: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+cmulocal/c-attribute.m4:30: CMU_C___ATTRIBUTE__ is expanded from...
+configure.in:114: the top level])
+m4trace:configure.in:114: -1- AC_DEFINE_TRACE_LITERAL([HAVE___ATTRIBUTE__])
+m4trace:configure.in:114: -1- AH_OUTPUT([HAVE___ATTRIBUTE__], [/* define if your compiler has __attribute__ */
+#undef HAVE___ATTRIBUTE__])
+m4trace:configure.in:115: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+cmulocal/c-fpic.m4:34: CMU_C_FPIC is expanded from...
+configure.in:115: the top level])
+m4trace:configure.in:118: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+cmulocal/cyrus.m4:45: CMU_GUESS_RUNPATH_SWITCH is expanded from...
+configure.in:118: the top level])
+m4trace:configure.in:118: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+autoconf/general.m4:2215: AC_LINK_IFELSE is expanded from...
+autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+cmulocal/cyrus.m4:45: CMU_GUESS_RUNPATH_SWITCH is expanded from...
+configure.in:118: the top level])
+m4trace:configure.in:120: -1- AC_CHECK_HEADERS([unistd.h sys/select.h sys/param.h stdarg.h])
+m4trace:configure.in:120: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H])
+m4trace:configure.in:120: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H])
+m4trace:configure.in:120: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H])
+m4trace:configure.in:120: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H])
+m4trace:configure.in:121: -1- AC_LIBSOURCE([memmove.c])
+m4trace:configure.in:121: -1- AC_LIBSOURCE([strcasecmp.c])
+m4trace:configure.in:121: -1- AC_LIBSOURCE([ftruncate.c])
+m4trace:configure.in:121: -1- AC_LIBSOURCE([strerror.c])
+m4trace:configure.in:121: -1- AC_CHECK_FUNCS([memmove strcasecmp ftruncate strerror], [], [_AC_LIBOBJ($ac_func)])
+m4trace:configure.in:121: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */
+#undef HAVE_MEMMOVE])
+m4trace:configure.in:121: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */
+#undef HAVE_STRCASECMP])
+m4trace:configure.in:121: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* Define to 1 if you have the `ftruncate\' function. */
+#undef HAVE_FTRUNCATE])
+m4trace:configure.in:121: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
+#undef HAVE_STRERROR])
+m4trace:configure.in:121: -1- AC_SUBST([LIB@&t at OBJS])
+m4trace:configure.in:122: -1- AC_CHECK_FUNCS([strlcat strlcpy])
+m4trace:configure.in:122: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the `strlcat\' function. */
+#undef HAVE_STRLCAT])
+m4trace:configure.in:122: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the `strlcpy\' function. */
+#undef HAVE_STRLCPY])
+m4trace:configure.in:123: -1- AC_HEADER_DIRENT
+m4trace:configure.in:123: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR\'.
+ */
+#undef HAVE_DIRENT_H])
+m4trace:configure.in:123: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR\'.
+ */
+#undef HAVE_SYS_NDIR_H])
+m4trace:configure.in:123: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR\'.
+ */
+#undef HAVE_SYS_DIR_H])
+m4trace:configure.in:123: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR\'. */
+#undef HAVE_NDIR_H])
+m4trace:configure.in:126: -2- AC_CHECK_LIB([nsl], [gethostbyname], [LIB_SOCKET="-lnsl $LIB_SOCKET"])
+m4trace:configure.in:126: -2- AC_CHECK_LIB([socket], [connect], [LIB_SOCKET="-lsocket $LIB_SOCKET"])
+m4trace:configure.in:126: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+cmulocal/bsd_sockets.m4:39: CMU_SOCKETS is expanded from...
+configure.in:126: the top level])
+m4trace:configure.in:126: -1- AC_CHECK_FUNCS([dn_expand dns_lookup])
+m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_DN_EXPAND], [/* Define to 1 if you have the `dn_expand\' function. */
+#undef HAVE_DN_EXPAND])
+m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_DNS_LOOKUP], [/* Define to 1 if you have the `dns_lookup\' function. */
+#undef HAVE_DNS_LOOKUP])
+m4trace:configure.in:126: -1- AC_SUBST([LIB_SOCKET])
+m4trace:configure.in:133: -1- AC_CHECK_LIB([socket], [getaddrinfo], [dnl
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getaddrinfo=no
+ ], [dnl
+ AC_MSG_CHECKING([whether your system has IPv6 directory])
+ AC_CACHE_VAL(ipv6_cv_dir, [dnl
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done])dnl
+ AC_MSG_RESULT($ipv6_cv_dir)
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getaddrinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ AC_CHECK_LIB(inet6, getaddrinfo, [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi],)dnl
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi])
+m4trace:configure.in:133: -1- AC_CHECK_LIB([inet6], [getaddrinfo], [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi], [])
+m4trace:configure.in:133: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.in:133: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.in:133: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.in:133: -2- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.in:133: -1- AC_CHECK_LIB([socket], [gai_strerror], [dnl
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_gai_strerror=no
+ ], [dnl
+ AC_MSG_CHECKING([whether your system has IPv6 directory])
+ AC_CACHE_VAL(ipv6_cv_dir, [dnl
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done])dnl
+ AC_MSG_RESULT($ipv6_cv_dir)
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_gai_strerror=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ AC_CHECK_LIB(inet6, gai_strerror, [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi],)dnl
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi])
+m4trace:configure.in:133: -1- AC_CHECK_LIB([inet6], [gai_strerror], [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi], [])
+m4trace:configure.in:133: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.in:133: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.in:141: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETNAMEINFO])
+m4trace:configure.in:141: -2- AH_OUTPUT([HAVE_GETNAMEINFO], [/* Do we have a getnameinfo? */
+#undef HAVE_GETNAMEINFO])
+m4trace:configure.in:142: -1- AC_CHECK_LIB([socket], [getnameinfo], [dnl
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getnameinfo=no
+ ], [dnl
+ AC_MSG_CHECKING([whether your system has IPv6 directory])
+ AC_CACHE_VAL(ipv6_cv_dir, [dnl
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done])dnl
+ AC_MSG_RESULT($ipv6_cv_dir)
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getnameinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ AC_CHECK_LIB(inet6, getnameinfo, [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi],)dnl
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi])
+m4trace:configure.in:142: -1- AC_CHECK_LIB([inet6], [getnameinfo], [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi], [])
+m4trace:configure.in:142: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.in:142: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.in:148: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+cmulocal/ipv6.m4:78: IPv6_CHECK_SS_FAMILY is expanded from...
+configure.in:148: the top level])
+m4trace:configure.in:148: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SS_FAMILY])
+m4trace:configure.in:148: -2- AH_OUTPUT([HAVE_SS_FAMILY], [/* Is there an ss_family in sockaddr_storage? */
+#undef HAVE_SS_FAMILY])
+m4trace:configure.in:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+cmulocal/ipv6.m4:94: IPv6_CHECK_SA_LEN is expanded from...
+configure.in:149: the top level])
+m4trace:configure.in:149: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKADDR_SA_LEN])
+m4trace:configure.in:149: -2- AH_OUTPUT([HAVE_SOCKADDR_SA_LEN], [/* Does sockaddr have an sa_len? */
+#undef HAVE_SOCKADDR_SA_LEN])
+m4trace:configure.in:151: -1- AC_SUBST([IPV6_OBJS])
+m4trace:configure.in:154: -1- AC_CHECK_HEADERS([sys/time.h])
+m4trace:configure.in:154: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H])
+m4trace:configure.in:155: -1- AC_HEADER_TIME
+m4trace:configure.in:155: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
+m4trace:configure.in:155: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME])
+m4trace:configure.in:156: -1- AC_STRUCT_TM
+m4trace:configure.in:156: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
+m4trace:configure.in:156: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares `struct tm\'. */
+#undef TM_IN_SYS_TIME])
+m4trace:configure.in:157: -1- AC_STRUCT_TIMEZONE
+m4trace:configure.in:157: -1- AC_CHECK_MEMBERS([struct tm.tm_zone], [], [], [#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+])
+m4trace:configure.in:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TM_TM_ZONE])
+m4trace:configure.in:157: -1- AH_OUTPUT([HAVE_STRUCT_TM_TM_ZONE], [/* Define to 1 if `tm_zone\' is member of `struct tm\'. */
+#undef HAVE_STRUCT_TM_TM_ZONE])
+m4trace:configure.in:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_ZONE])
+m4trace:configure.in:157: -1- AH_OUTPUT([HAVE_TM_ZONE], [/* Define to 1 if your `struct tm\' has `tm_zone\'. Deprecated, use
+ `HAVE_STRUCT_TM_TM_ZONE\' instead. */
+#undef HAVE_TM_ZONE])
+m4trace:configure.in:157: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZNAME])
+m4trace:configure.in:157: -1- AH_OUTPUT([HAVE_TZNAME], [/* Define to 1 if you don\'t have `tm_zone\' but do have the external array
+ `tzname\'. */
+#undef HAVE_TZNAME])
+m4trace:configure.in:159: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:160: -1- AC_SUBST([PRE_SUBDIRS])
+m4trace:configure.in:161: -1- AC_SUBST([EXTRA_SUBDIRS])
+m4trace:configure.in:162: -1- AC_SUBST([DEPLIBS])
+m4trace:configure.in:163: -1- AC_SUBST([LOCALDEFS])
+m4trace:configure.in:164: -1- AC_FUNC_VPRINTF
+m4trace:configure.in:164: -1- AC_CHECK_FUNCS([vprintf], [
+AC_CHECK_FUNC(_doprnt,
+ [AC_DEFINE(HAVE_DOPRNT, 1,
+ [Define to 1 if you don't have `vprintf' but do have
+ `_doprnt.'])])])
+m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_VPRINTF], [/* Define to 1 if you have the `vprintf\' function. */
+#undef HAVE_VPRINTF])
+m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOPRNT])
+m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_DOPRNT], [/* Define to 1 if you don\'t have `vprintf\' but do have `_doprnt.\' */
+#undef HAVE_DOPRNT])
+m4trace:configure.in:197: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+cmulocal/berkdb.m4:235: CYRUS_BERKELEY_DB_CHK_LIB is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+cmulocal/berkdb.m4:269: CYRUS_BERKELEY_DB_CHK is expanded from...
+configure.in:197: the top level])
+m4trace:configure.in:197: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+cmulocal/berkdb.m4:235: CYRUS_BERKELEY_DB_CHK_LIB is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+cmulocal/berkdb.m4:269: CYRUS_BERKELEY_DB_CHK is expanded from...
+configure.in:197: the top level])
+m4trace:configure.in:201: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+configure.in:201: the top level])
+m4trace:configure.in:210: -1- AC_SUBST([BDB_INC])
+m4trace:configure.in:211: -1- AC_SUBST([BDB_LIB])
+m4trace:configure.in:217: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BDB])
+m4trace:configure.in:217: -1- AH_OUTPUT([HAVE_BDB], [/* Build in Berkeley DB support? */
+#undef HAVE_BDB])
+m4trace:configure.in:222: -1- AC_SUBST([CYRUSDB_OBJS])
+m4trace:configure.in:234: -1- AC_SUBST([SIEVE_OBJS])
+m4trace:configure.in:236: -1- AC_SUBST([SIEVE_LIBS])
+m4trace:configure.in:238: -1- AC_SUBST([SIEVE_CPPFLAGS])
+m4trace:configure.in:239: -1- AC_DEFINE_TRACE_LITERAL([USE_SIEVE])
+m4trace:configure.in:239: -1- AH_OUTPUT([USE_SIEVE], [/* Build in Sieve support? */
+#undef USE_SIEVE])
+m4trace:configure.in:242: -1- AC_PROG_YACC
+m4trace:configure.in:242: -1- AC_SUBST([YACC])
+m4trace:configure.in:243: -1- AC_PROG_LEX
+m4trace:configure.in:243: -1- AC_SUBST([LEX])
+m4trace:configure.in:243: -1- AC_CHECK_LIB([fl], [yywrap], [LEXLIB="-lfl"], [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")])
+m4trace:configure.in:243: -1- AC_CHECK_LIB([l], [yywrap], [LEXLIB="-ll"])
+m4trace:configure.in:243: -1- AC_SUBST([LEXLIB])
+m4trace:configure.in:243: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])
+m4trace:configure.in:243: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER])
+m4trace:configure.in:243: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a
+ `char[]\'. */
+#undef YYTEXT_POINTER])
+m4trace:configure.in:244: -1- AC_CHECK_LIB([fl], [main])
+m4trace:configure.in:244: -1- AH_OUTPUT([HAVE_LIBFL], [/* Define to 1 if you have the `fl\' library (-lfl). */
+#undef HAVE_LIBFL])
+m4trace:configure.in:244: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBFL])
+m4trace:configure.in:248: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_REGEX])
+m4trace:configure.in:248: -1- AH_OUTPUT([ENABLE_REGEX], [/* Do we have a decent regex library? */
+#undef ENABLE_REGEX])
+m4trace:configure.in:248: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RX])
+m4trace:configure.in:248: -2- AH_OUTPUT([HAVE_RX], [/* Do we have rxposix.h? */
+#undef HAVE_RX])
+m4trace:configure.in:255: -1- AC_SUBST([SIEVE_SUBDIRS])
+m4trace:configure.in:258: -2- AC_DEFINE_TRACE_LITERAL([HAS_STRERROR])
+m4trace:configure.in:258: -2- AH_OUTPUT([HAS_STRERROR], [/* Do we have strerror()? */
+#undef HAS_STRERROR])
+m4trace:configure.in:259: -2- AC_DEFINE_TRACE_LITERAL([NEED_SYS_ERRLIST])
+m4trace:configure.in:259: -2- AH_OUTPUT([NEED_SYS_ERRLIST], [/* Do we have a sys_errlist? */
+#undef NEED_SYS_ERRLIST])
+m4trace:configure.in:259: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete.
+You should run autoupdate.], [autoconf/functions.m4:111: AC_FUNC_CHECK is expanded from...
+configure.in:259: the top level])
+m4trace:configure.in:262: -1- AC_CHECK_HEADERS([sys/resource.h])
+m4trace:configure.in:262: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H])
+m4trace:configure.in:263: -1- AC_CHECK_FUNCS([setrlimit])
+m4trace:configure.in:263: -1- AH_OUTPUT([HAVE_SETRLIMIT], [/* Define to 1 if you have the `setrlimit\' function. */
+#undef HAVE_SETRLIMIT])
+m4trace:configure.in:264: -1- AC_CHECK_FUNCS([getrlimit])
+m4trace:configure.in:264: -1- AH_OUTPUT([HAVE_GETRLIMIT], [/* Define to 1 if you have the `getrlimit\' function. */
+#undef HAVE_GETRLIMIT])
+m4trace:configure.in:267: -1- AC_CHECK_FUNCS([daemon setsid])
+m4trace:configure.in:267: -1- AH_OUTPUT([HAVE_DAEMON], [/* Define to 1 if you have the `daemon\' function. */
+#undef HAVE_DAEMON])
+m4trace:configure.in:267: -1- AH_OUTPUT([HAVE_SETSID], [/* Define to 1 if you have the `setsid\' function. */
+#undef HAVE_SETSID])
+m4trace:configure.in:270: -1- AC_CHECK_FUNCS([shutdown])
+m4trace:configure.in:270: -1- AH_OUTPUT([HAVE_SHUTDOWN], [/* Define to 1 if you have the `shutdown\' function. */
+#undef HAVE_SHUTDOWN])
+m4trace:configure.in:272: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKLEN_T])
+m4trace:configure.in:272: -2- AH_OUTPUT([HAVE_SOCKLEN_T], [/* Do we have a socklen_t? */
+#undef HAVE_SOCKLEN_T])
+m4trace:configure.in:274: -2- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE])
+m4trace:configure.in:274: -2- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE], [/* Do we have a sockaddr_storage? */
+#undef HAVE_STRUCT_SOCKADDR_STORAGE])
+m4trace:configure.in:275: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RLIM_T])
+m4trace:configure.in:275: -2- AH_OUTPUT([HAVE_RLIM_T], [/* Do we have an rlim_t? */
+#undef HAVE_RLIM_T])
+m4trace:configure.in:283: -1- AC_CHECK_LIB([util], [setproctitle], [spt_type=SPT_BUILTIN
+ LIBS="${LIBS} -lutil"])
+m4trace:configure.in:298: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+configure.in:298: the top level])
+m4trace:configure.in:309: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+configure.in:309: the top level])
+m4trace:configure.in:320: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+configure.in:320: the top level])
+m4trace:configure.in:327: -1- AC_DEFINE_TRACE_LITERAL([SPT_TYPE])
+m4trace:configure.in:327: -1- AH_OUTPUT([SPT_TYPE], [/* Do we already have setproctitle? */
+#undef SPT_TYPE])
+m4trace:configure.in:337: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+configure.in:337: the top level])
+m4trace:configure.in:339: -1- AC_SUBST([WITH_NONBLOCK])
+m4trace:configure.in:346: -2- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
+configure.in:346: the top level])
+m4trace:configure.in:348: -1- AC_SUBST([WITH_GMTOFF])
+m4trace:configure.in:376: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2289: AC_TRY_RUN is expanded from...
+configure.in:376: the top level])
+m4trace:configure.in:408: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2289: AC_TRY_RUN is expanded from...
+configure.in:408: the top level])
+m4trace:configure.in:419: -1- AC_SUBST([WITH_MAP])
+m4trace:configure.in:428: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+autoconf/functions.m4:74: AC_CHECK_FUNC is expanded from...
+autoconf/functions.m4:74: AC_CHECK_FUNC is expanded from...
+autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
+configure.in:428: the top level])
+m4trace:configure.in:430: -1- AC_SUBST([WITH_LOCK])
+m4trace:configure.in:434: -2- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC])
+m4trace:configure.in:434: -2- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */
+#undef HAVE_FDATASYNC])
+m4trace:configure.in:439: -1- AC_CHECK_LIB([rt], [fdatasync], [
+ LIB_RT="-lrt"
+ AC_DEFINE(HAVE_FDATASYNC,[],[Do we have fdatasync()?])
+ ])
+m4trace:configure.in:439: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC])
+m4trace:configure.in:439: -1- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */
+#undef HAVE_FDATASYNC])
+m4trace:configure.in:460: -1- AC_CHECK_LIB([BSD], [sigvec], [cyrus_sigveclib="-lBSD"], [
+ dnl not hp flavor
+ SAVE_LDFLAGS="$LDFLAGS"
+ dnl solaris flavor
+ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
+ AC_CHECK_LIB(ucb, sigvec, [
+ dnl more solaris flavor
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"],
+ [ cant_find_sigvec=yes ])
+ LDFLAGS="$SAVE_LDFLAGS"])
+m4trace:configure.in:460: -1- AC_CHECK_LIB([ucb], [sigvec], [
+ dnl more solaris flavor
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"], [ cant_find_sigvec=yes ])
+m4trace:configure.in:461: -1- AC_SUBST([cyrus_sigveclib])
+m4trace:configure.in:475: -1- AC_DEFINE_TRACE_LITERAL([AFSPTS_USE_KRB5])
+m4trace:configure.in:475: -1- AH_OUTPUT([AFSPTS_USE_KRB5], [/* Should the AFS PTS plugin use krb5? */
+#undef AFSPTS_USE_KRB5])
+m4trace:configure.in:508: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+configure.in:508: the top level])
+m4trace:configure.in:514: -1- AC_SUBST([AFS_LIBS])
+m4trace:configure.in:515: -1- AC_SUBST([AFS_LDFLAGS])
+m4trace:configure.in:516: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB])
+m4trace:configure.in:516: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */
+#undef HAVE_AFSKRB])
+m4trace:configure.in:520: -1- AC_SUBST([AFS_LIBS])
+m4trace:configure.in:521: -1- AC_SUBST([AFS_LDFLAGS])
+m4trace:configure.in:522: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB])
+m4trace:configure.in:522: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */
+#undef HAVE_AFSKRB])
+m4trace:configure.in:550: -1- AC_CHECK_LIB([ldap], [ldap_initialize], [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
+ AC_SUBST(LDAP_CPPFLAGS)
+ AC_SUBST(LDAP_LDFLAGS)
+ AC_SUBST(LDAP_LIBS)
+ LDAP_LIBS="-lldap -llber" ], [], [-llber])
+m4trace:configure.in:550: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP])
+m4trace:configure.in:550: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */
+#undef HAVE_LDAP])
+m4trace:configure.in:550: -1- AC_SUBST([LDAP_CPPFLAGS])
+m4trace:configure.in:550: -1- AC_SUBST([LDAP_LDFLAGS])
+m4trace:configure.in:550: -1- AC_SUBST([LDAP_LIBS])
+m4trace:configure.in:560: -1- AC_CHECK_LIB([ldap], [ldap_initialize], [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
+ AC_SUBST(LDAP_CPPFLAGS)
+ AC_SUBST(LDAP_LDFLAGS)
+ AC_SUBST(LDAP_LIBS)
+ LDAP_LIBS="-lldap -llber" ], [], [-llber])
+m4trace:configure.in:560: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP])
+m4trace:configure.in:560: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */
+#undef HAVE_LDAP])
+m4trace:configure.in:560: -1- AC_SUBST([LDAP_CPPFLAGS])
+m4trace:configure.in:560: -1- AC_SUBST([LDAP_LDFLAGS])
+m4trace:configure.in:560: -1- AC_SUBST([LDAP_LIBS])
+m4trace:configure.in:570: -1- AC_DEFINE_TRACE_LITERAL([WITH_PTS])
+m4trace:configure.in:570: -1- AH_OUTPUT([WITH_PTS], [/* Build in PTS support? */
+#undef WITH_PTS])
+m4trace:configure.in:581: -1- AC_SUBST([SERVER_SUBDIRS])
+m4trace:configure.in:599: -1- AC_CHECK_LIB([resolv], [res_search])
+m4trace:configure.in:599: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
+#undef HAVE_LIBRESOLV])
+m4trace:configure.in:599: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
+m4trace:configure.in:616: -1- AC_CHECK_LIB([des], [des_ecb_encrypt], [if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$with_krb/lib/libdes.a"
+ else
+ KRB_LIBS="-ldes"
+ fi], [{ { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
+echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
+ { (exit 1); exit 1; }; }])
+m4trace:configure.in:653: -3- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+configure.in:653: the top level])
+m4trace:configure.in:654: -2- AC_CHECK_LIB([${KRBLIB}], [krb_mk_priv], [if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
+ else
+ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
+ fi], [{ echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
+echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no], [$KRB_LIBS])
+m4trace:configure.in:655: -2- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+configure.in:655: the top level])
+m4trace:configure.in:657: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+configure.in:657: the top level])
+m4trace:configure.in:662: -1- AC_DEFINE_TRACE_LITERAL([HAVE_KRB])
+m4trace:configure.in:662: -1- AH_OUTPUT([HAVE_KRB], [/* Support for Kerberos? */
+#undef HAVE_KRB])
+m4trace:configure.in:686: -1- AC_CHECK_LIB([rsaref], [RSAPublicEncrypt], [LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes], [cmu_have_rsaref=no])
+m4trace:configure.in:691: -1- AC_CHECK_LIB([crypto], [BIO_accept], [LIBS="-lcrypto $LIB_RSAREF ${LIBS}"], [with_openssl="no"], [$LIB_RSAREF])
+m4trace:configure.in:693: -1- AC_CHECK_LIB([ssl], [SSL_CTX_new], [LIBS="-lssl ${LIBS}"], [with_openssl="no"], [-lcrypto $LIB_RSAREF])
+m4trace:configure.in:709: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSL])
+m4trace:configure.in:709: -1- AH_OUTPUT([HAVE_SSL], [/* Build with SSL support? */
+#undef HAVE_SSL])
+m4trace:configure.in:712: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_ENABLE_OLD_DES_SUPPORT])
+m4trace:configure.in:712: -1- AH_OUTPUT([OPENSSL_ENABLE_OLD_DES_SUPPORT], [/* Configure OpenSSL to provide legacy des apis */
+#undef OPENSSL_ENABLE_OLD_DES_SUPPORT])
+m4trace:configure.in:713: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_DES_LIBDES_COMPATIBILITY])
+m4trace:configure.in:713: -1- AH_OUTPUT([OPENSSL_DES_LIBDES_COMPATIBILITY], [/* Configure OpenSSL to provide krb4-compatible legacy des apis */
+#undef OPENSSL_DES_LIBDES_COMPATIBILITY])
+m4trace:configure.in:716: -1- AC_SUBST([OPENSSL_INC])
+m4trace:configure.in:717: -1- AC_SUBST([OPENSSL_LIB])
+m4trace:configure.in:728: -1- AC_DEFINE_TRACE_LITERAL([EGD_SOCKET])
+m4trace:configure.in:728: -1- AH_OUTPUT([EGD_SOCKET], [/* Alternative to /dev/urandom? */
+#undef EGD_SOCKET])
+m4trace:configure.in:748: -1- AC_CHECK_LIB([zephyr], [ZInitialize], [ZEPHYR_LIBS="-lzephyr"], [with_zephyr="no"], [])
+m4trace:configure.in:756: -1- AC_SUBST([ZEPHYR_LIBS])
+m4trace:configure.in:757: -1- AC_SUBST([ZEPHYR_CPPFLAGS])
+m4trace:configure.in:759: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ZEPHYR])
+m4trace:configure.in:759: -1- AH_OUTPUT([HAVE_ZEPHYR], [/* Build with Zephyr support? */
+#undef HAVE_ZEPHYR])
+m4trace:configure.in:769: -1- AC_DEFINE_TRACE_LITERAL([MASTER_PIDFILE])
+m4trace:configure.in:769: -1- AH_OUTPUT([MASTER_PIDFILE], [/* Name of the pidfile for master */
+#undef MASTER_PIDFILE])
+m4trace:configure.in:802: -1- AC_CHECK_HEADERS([sys/sockio.h])
+m4trace:configure.in:802: -1- AH_OUTPUT([HAVE_SYS_SOCKIO_H], [/* Define to 1 if you have the <sys/sockio.h> header file. */
+#undef HAVE_SYS_SOCKIO_H])
+m4trace:configure.in:816: -1- AC_SUBST([IMAP_PROGS])
+m4trace:configure.in:848: -1- AC_CHECK_LIB([com_err], [com_err], [
+ # com_err is already in library path
+ # guess we're okay
+ # can use system com_err
+ with_com_err=""
+ AC_CHECK_HEADER(et/com_err.h,
+ [AC_DEFINE(HAVE_ET_COM_ERR_H,[],[We need et/com_err.h])],
+ [AC_CHECK_HEADER(com_err.h,[],[AC_ERROR([cannot locate com_err.h])])])
+ AC_PATH_PROG(COMPILE_ET, compile_et, [no compile et])
+ ], [
+ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
+ with_com_err="/usr/local"
+ AC_PATH_PROG(COMPILE_ET, /usr/local/bin/compile_et, [no compile et])
+ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
+ with_com_err="/usr"
+ AC_PATH_PROG(COMPILE_ET, /usr/bin/compile_et, [no compile et])
+ else
+ # use ours
+ with_com_err=yes
+ fi
+ ])
+m4trace:configure.in:848: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ET_COM_ERR_H])
+m4trace:configure.in:848: -1- AH_OUTPUT([HAVE_ET_COM_ERR_H], [/* We need et/com_err.h */
+#undef HAVE_ET_COM_ERR_H])
+m4trace:configure.in:848: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+autoconf/libs.m4:134: AC_CHECK_LIB is expanded from...
+configure.in:848: the top level])
+m4trace:configure.in:848: -1- AC_SUBST([COMPILE_ET], [$ac_cv_path_COMPILE_ET])
+m4trace:configure.in:848: -1- AC_SUBST([COMPILE_ET], [$ac_cv_path_COMPILE_ET])
+m4trace:configure.in:848: -1- AC_SUBST([COMPILE_ET], [$ac_cv_path_COMPILE_ET])
+m4trace:configure.in:889: -1- AC_SUBST([COMPILE_ET])
+m4trace:configure.in:890: -1- AC_SUBST([COM_ERR_LIBS])
+m4trace:configure.in:891: -1- AC_SUBST([COM_ERR_LDFLAGS])
+m4trace:configure.in:892: -1- AC_SUBST([COM_ERR_CPPFLAGS])
+m4trace:configure.in:898: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+configure.in:898: the top level])
+m4trace:configure.in:913: -1- AC_DEFINE_TRACE_LITERAL([SYSLOG_FACILITY])
+m4trace:configure.in:913: -1- AH_OUTPUT([SYSLOG_FACILITY], [/* Syslog facility to use. */
+#undef SYSLOG_FACILITY])
+m4trace:configure.in:917: -1- AC_LIBSOURCE([getdtablesize.c])
+m4trace:configure.in:917: -1- AC_CHECK_FUNCS([getdtablesize], [], [_AC_LIBOBJ($ac_func)])
+m4trace:configure.in:917: -1- AH_OUTPUT([HAVE_GETDTABLESIZE], [/* Define to 1 if you have the `getdtablesize\' function. */
+#undef HAVE_GETDTABLESIZE])
+m4trace:configure.in:917: -1- AC_SUBST([LIB@&t at OBJS])
+m4trace:configure.in:930: -2- AC_DEFINE_TRACE_LITERAL([OLD_SIEVE_SERVICE_NAME])
+m4trace:configure.in:930: -2- AH_OUTPUT([OLD_SIEVE_SERVICE_NAME], [/* Use "imap" as sieve service name? */
+#undef OLD_SIEVE_SERVICE_NAME])
+m4trace:configure.in:939: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_LISTEXT])
+m4trace:configure.in:939: -2- AH_OUTPUT([ENABLE_LISTEXT], [/* Enable the LISTEXT extension? */
+#undef ENABLE_LISTEXT])
+m4trace:configure.in:946: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_X_NETSCAPE_HACK])
+m4trace:configure.in:946: -2- AH_OUTPUT([ENABLE_X_NETSCAPE_HACK], [/* Enable Netscape Menu Option Hack? */
+#undef ENABLE_X_NETSCAPE_HACK])
+m4trace:configure.in:949: -1- AC_CHECK_LIB([dl], [dlopen])
+m4trace:configure.in:949: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the `dl\' library (-ldl). */
+#undef HAVE_LIBDL])
+m4trace:configure.in:949: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([crypt], [crypt], [LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes], [cmu_have_crypt=no])
+m4trace:configure.in:950: -1- AC_SUBST([LIB_CRYPT])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSSAPI_H])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSSAPI_H], [/* Define if you have the gssapi.h header file */
+#undef HAVE_GSSAPI_H])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([resolv], [res_search])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
+#undef HAVE_LIBRESOLV])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gssapi], [gss_unwrap], [gss_impl="heimdal"], [gss_failed=1], [${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET}])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([krb5support], [krb5int_getspecific], [K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a], [], [${LIB_SOCKET}])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gssapi_krb5], [gss_unwrap], [gss_impl="mit"], [gss_failed=1], [${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gss], [csf_gss_acq_user], [gss_impl="cybersafe03"], [unset ac_cv_lib_gss_csf_gss_acq_user;
+ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
+ gss_failed=1,$GSSAPIBASE_LIBS -lgss)], [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gss], [csf_gss_acq_user], [gss_impl="cybersafe"], [gss_failed=1], [$GSSAPIBASE_LIBS -lgss])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([gss], [gss_unwrap], [gss_impl="seam"], [gss_failed=1], [-lgss])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+autoconf/general.m4:2129: AC_EGREP_CPP is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
+#undef HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
+autoconf/general.m4:2129: AC_EGREP_CPP is expanded from...
+cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
+configure.in:950: SASL_GSSAPI_CHK is required by...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
+#undef HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
+#undef HAVE_GSS_C_NT_USER_NAME])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([resolv], [res_search], [GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"])
+m4trace:configure.in:950: -1- AC_CHECK_FUNCS([gsskrb5_register_acceptor_identity])
+m4trace:configure.in:950: -1- AH_OUTPUT([HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY], [/* Define to 1 if you have the `gsskrb5_register_acceptor_identity\' function.
+ */
+#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY])
+m4trace:configure.in:950: -1- AC_SUBST([GSSAPI_LIBS])
+m4trace:configure.in:950: -1- AC_SUBST([GSSAPIBASE_LIBS])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+autoconf/headers.m4:91: AC_CHECK_HEADER is expanded from...
+cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
+configure.in:950: CMU_SASL2 is required by...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- AC_CHECK_LIB([sasl2], [prop_get], [ac_cv_found_sasl=yes], [ac_cv_found_sasl=no])
+m4trace:configure.in:950: -1- AC_SUBST([LIB_DYN_SASL])
+m4trace:configure.in:950: -1- AC_SUBST([DYNSASLFLAGS])
+m4trace:configure.in:950: -1- AC_SUBST([LIB_SASL])
+m4trace:configure.in:950: -1- AC_SUBST([SASLFLAGS])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
+configure.in:950: CMU_SASL2_REQUIRED is required by...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:950: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
+You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
+autoconf/general.m4:2087: _AC_PREPROC_IFELSE is expanded from...
+autoconf/general.m4:2097: AC_PREPROC_IFELSE is expanded from...
+autoconf/general.m4:2107: AC_TRY_CPP is expanded from...
+cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
+configure.in:950: the top level])
+m4trace:configure.in:951: -1- AC_CHECK_LIB([sasl2], [sasl_checkapop], [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])], [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
+m4trace:configure.in:951: -1- AC_DEFINE_TRACE_LITERAL([HAVE_APOP])
+m4trace:configure.in:951: -1- AH_OUTPUT([HAVE_APOP], [/* Does SASL support APOP? */
+#undef HAVE_APOP])
+m4trace:configure.in:964: -1- AC_SUBST([PERL])
+m4trace:configure.in:980: -1- AC_SUBST([PERL_CCCDLFLAGS])
+m4trace:configure.in:998: -2- AC_CHECK_LIB([md], [MD5Init], [LIBS="${LIBS} -lmd"], [MD5OBJ="md5.o"])
+m4trace:configure.in:998: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete.
+You should run autoupdate.], [autoconf/functions.m4:111: AC_FUNC_CHECK is expanded from...
+configure.in:998: the top level])
+m4trace:configure.in:999: -1- AC_SUBST([MD5OBJ])
+m4trace:configure.in:1004: -1- AC_SUBST([SNMP_SUBDIRS])
+m4trace:configure.in:1006: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+cmulocal/common.m4:61: CMU_FIND_LIB_SUBDIR is expanded from...
+configure.in:1006: CMU_FIND_LIB_SUBDIR is required by...
+cmulocal/libwrap.m4:30: CMU_LIBWRAP is expanded from...
+configure.in:1006: the top level])
+m4trace:configure.in:1006: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2281: AC_RUN_IFELSE is expanded from...
+autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
+autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
+autoconf/types.m4:405: AC_CHECK_SIZEOF is expanded from...
+cmulocal/common.m4:61: CMU_FIND_LIB_SUBDIR is expanded from...
+configure.in:1006: CMU_FIND_LIB_SUBDIR is required by...
+cmulocal/libwrap.m4:30: CMU_LIBWRAP is expanded from...
+configure.in:1006: the top level])
+m4trace:configure.in:1006: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
+m4trace:configure.in:1006: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of a `long\', as computed by sizeof. */
+#undef SIZEOF_LONG])
+m4trace:configure.in:1006: -1- AC_SUBST([CMU_LIB_SUBDIR], [$ac_cv_cmu_lib_subdir])
+m4trace:configure.in:1006: -1- AC_CHECK_LIB([wrap], [request_init], [
+ AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)], [with_libwrap=no], [${LIB_SOCKET}])
+m4trace:configure.in:1006: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBWRAP])
+m4trace:configure.in:1006: -1- AH_OUTPUT([HAVE_LIBWRAP], [/* Do we have TCP wrappers? */
+#undef HAVE_LIBWRAP])
+m4trace:configure.in:1006: -1- AC_CHECK_LIB([nsl], [yp_get_default_domain], [LIB_WRAP="${LIB_WRAP} -lnsl"])
+m4trace:configure.in:1006: -1- AC_SUBST([LIB_WRAP])
+m4trace:configure.in:1007: -1- AC_SUBST([SNMP_CONFIG], [$ac_cv_path_SNMP_CONFIG])
+m4trace:configure.in:1007: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETSNMP])
+m4trace:configure.in:1007: -1- AH_OUTPUT([HAVE_NETSNMP], [/* Do we have Net-SNMP support? */
+#undef HAVE_NETSNMP])
+m4trace:configure.in:1007: -1- AC_SUBST([LIB_UCDSNMP])
+m4trace:configure.in:1007: -1- AC_CHECK_LIB([snmp], [sprint_objid], [
+ AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)], [with_snmp=no], [${LIB_SOCKET}])
+m4trace:configure.in:1007: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UCDSNMP])
+m4trace:configure.in:1007: -1- AH_OUTPUT([HAVE_UCDSNMP], [/* Do we have UCD-SNMP support? */
+#undef HAVE_UCDSNMP])
+m4trace:configure.in:1007: -1- AC_CHECK_LIB([rpm], [rpmdbOpen], [LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"], [], [-lpopt])
+m4trace:configure.in:1007: -1- AC_SUBST([LIB_UCDSNMP])
+m4trace:configure.in:1042: -1- AC_SUBST([LIB_RT])
+m4trace:configure.in:1043: -1- AC_SUBST([IMAP_COM_ERR_LIBS])
+m4trace:configure.in:1044: -1- AC_SUBST([IMAP_LIBS])
+m4trace:configure.in:1052: -1- AC_SUBST([PERL_SUBDIRS])
+m4trace:configure.in:1053: -1- AC_SUBST([PERL_DEPSUBDIRS])
+m4trace:configure.in:1054: -1- AC_SUBST([PERL])
+m4trace:configure.in:1100: -1- AH_OUTPUT([00001], [
+/* $Id: configure.in,v 1.268.2.23 2005/04/12 20:05:20 shadow Exp $ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _CYRUS_IMAPD_CONFIG_H_
+#define _CYRUS_IMAPD_CONFIG_H_
+])
+m4trace:configure.in:1245: -1- AH_OUTPUT([zzzz2], [
+/* time.h */
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+/* com_err.h, as needed */
+#ifndef IN_COM_ERR
+#ifdef HAVE_ET_COM_ERR_H
+#include <et/com_err.h>
+#else
+#include <com_err.h>
+#endif /* HAVE_ET_COM_ERR_H */
+#endif /* IN_COM_ERR */
+
+/* This allows us to work even when we don\'t have an fdatasync */
+#ifndef HAVE_FDATASYNC
+#define fdatasync(fd) fsync(fd)
+#endif
+
+/* A similar setup for not having O_DSYNC */
+#include <fcntl.h>
+
+#ifndef O_DSYNC
+# ifdef O_SYNC
+# define O_DSYNC O_SYNC /* POSIX */
+# else
+# define O_DSYNC O_FSYNC /* BSD */
+# endif
+#endif
+
+#ifndef HAVE___ATTRIBUTE__
+/* Can\'t use attributes... */
+#define __attribute__(foo)
+#endif
+
+#ifndef HAVE_SOCKLEN_T
+typedef unsigned int socklen_t;
+#endif
+
+#ifndef HAVE_RLIM_T
+typedef int rlim_t;
+#endif
+
+/* some potentially memory saving tradeoffs,
+ preconfigured in memory-saving mode */
+
+/* save the cmdlines for the ID command */
+#undef ID_SAVE_CMDLINE
+
+/* IPv6 things */
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
+#define _SS_MAXSIZE 128 /* Implementation specific max size */
+#define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
+
+struct sockaddr_storage {
+ struct sockaddr ss_sa;
+ char __ss_pad2[_SS_PADSIZE];
+};
+# define ss_family ss_sa.sa_family
+# define HAVE_SS_FAMILY
+#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
+
+#ifndef HAVE_SS_FAMILY
+#define ss_family __ss_family
+#endif
+
+#ifndef AF_INET6
+/* Define it to something that should never appear */
+#define AF_INET6 AF_MAX
+#endif
+
+#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
+#include "gai.h"
+#endif
+
+/* End IPv6 things */
+
+#ifdef OLD_SIEVE_SERVICE_NAME
+#define SIEVE_SERVICE_NAME "imap"
+#else
+#define SIEVE_SERVICE_NAME "sieve"
+#endif
+
+/* filenames */
+#define FNAME_DBDIR "/db"
+#define FNAME_USERDIR "/user/"
+#define FNAME_DOMAINDIR "/domain/"
+#define FNAME_LOGDIR "/log/"
+#define FNAME_PTSDB "/ptclient/ptscache.db"
+#define CONFIG_FILENAME (SYSCONFDIR "/imapd.conf")
+#define DEFAULT_MASTER_CONFIG_FILENAME (SYSCONFDIR "/cyrus.conf")
+
+#ifndef HAVE_SHUTDOWN
+#define shutdown(fd, mode) 0
+#endif
+
+/* compile time options; think carefully before modifying */
+enum {
+ /* should we send an UNAVAILABLE message to master when
+ * a service is exiting (master is already going to be
+ * informed of the exit by the SIGCHLD signal anyway) ? */
+ MESSAGE_MASTER_ON_EXIT = 0,
+
+ /* should a hierarchical rename stop on error? */
+ RENAME_STOP_ON_ERROR = 1,
+
+ /* should we call fsync() to maybe help with softupdates? (it should) */
+ APPEND_ULTRA_PARANOID = 1,
+
+ /* should we log extra information at the DEBUG level for DB stuff?
+ * 0 -> nothing; 1 -> some; higher -> even more */
+ CONFIG_DB_VERBOSE = 1,
+
+ /* log timing information to LOG_DEBUG */
+ CONFIG_TIMING_VERBOSE = 0,
+
+ /* should we be pedantic about namespace or sleezy? */
+ SLEEZY_NAMESPACE = 1,
+
+ /* should we do a fast TLS session shutdown? */
+ TLS_FAST_SHUTDOWN = 1,
+
+ /* should we use the SQUAT engine to accelerate SEARCH? */
+ SQUAT_ENGINE = 1,
+
+ /* should we have long LMTP error messages? */
+ LMTP_LONG_ERROR_MSGS = 1
+};
+
+#endif /* _CYRUS_IMAPD_CONFIG_H_ */
+])
+m4trace:configure.in:1248: -1- AC_CONFIG_FILES([man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile])
+m4trace:configure.in:1248: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.in:1248: -1- AC_SUBST([LIB@&t at OBJS], [$ac_libobjs])
+m4trace:configure.in:1248: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/COPYING
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/COPYING?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/COPYING (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/COPYING Sat Aug 26 02:00:13 2006
@@ -1,0 +1,20 @@
+ Copyright 1998 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon University
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL,
+INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,48 @@
+/COPYING/1.1/Fri Oct 2 21:35:59 1998//Tcyrus-release-2-3-7
+/README.andrew/1.10.30.1/Thu Feb 19 01:42:44 2004//Tcyrus-release-2-3-7
+/afs.m4/1.26.4.3/Tue May 23 13:27:14 2006//Tcyrus-release-2-3-7
+/agentx.m4/1.5/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/arx.m4/1.5.4.1/Tue May 23 13:27:14 2006//Tcyrus-release-2-3-7
+/ax_path_bdb.m4/1.1.2.1/Tue May 23 13:27:14 2006//Tcyrus-release-2-3-7
+/berkdb.m4/1.12.4.7/Tue May 23 13:27:15 2006//Tcyrus-release-2-3-7
+/bsd_sockets.m4/1.9.4.1/Tue May 23 13:27:15 2006//Tcyrus-release-2-3-7
+/c-attribute.m4/1.3/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/c-fpic.m4/1.2/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/clamav.m4/1.2.2.1/Tue May 23 13:27:15 2006//Tcyrus-release-2-3-7
+/com_err.m4/1.6/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/com_err_link.m4/1.7.4.1/Tue May 23 13:27:15 2006//Tcyrus-release-2-3-7
+/common.m4/1.11.4.1/Tue May 23 13:27:16 2006//Tcyrus-release-2-3-7
+/cyrus.m4/1.4/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/db.m4/1.1.24.2/Tue May 23 13:27:16 2006//Tcyrus-release-2-3-7
+/find-func-no-libs.m4/1.2/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/find-func-no-libs2.m4/1.2/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/find-func.m4/1.2/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/heimdal.m4/1.7.4.2/Tue May 23 13:27:16 2006//Tcyrus-release-2-3-7
+/init_automake.m4/1.4/Wed Oct 8 20:35:24 2003//Tcyrus-release-2-3-7
+/ipv6.m4/1.5.4.1/Fri Dec 19 18:33:23 2003//Tcyrus-release-2-3-7
+/kafs.m4/1.6.4.1/Tue May 23 13:27:16 2006//Tcyrus-release-2-3-7
+/kerberos_v4.m4/1.26.4.2/Tue May 23 13:27:17 2006//Tcyrus-release-2-3-7
+/kerberos_v5.m4/1.7.4.2/Tue May 23 13:27:17 2006//Tcyrus-release-2-3-7
+/libXau.m4/1.4.4.1/Tue May 23 13:27:17 2006//Tcyrus-release-2-3-7
+/libcyrus.m4/1.19.4.1/Tue May 23 13:27:17 2006//Tcyrus-release-2-3-7
+/libloguse.m4/1.5.4.1/Tue May 23 13:27:18 2006//Tcyrus-release-2-3-7
+/libnet.m4/1.7.4.1/Tue May 23 13:27:18 2006//Tcyrus-release-2-3-7
+/libpcap.m4/1.8.4.1/Tue May 23 13:27:18 2006//Tcyrus-release-2-3-7
+/librestrict.m4/1.4.4.1/Tue May 23 13:27:18 2006//Tcyrus-release-2-3-7
+/libssl.m4/1.9.4.1/Tue May 23 13:27:18 2006//Tcyrus-release-2-3-7
+/libtoolhack.m4/1.4/Wed Oct 8 20:35:25 2003//Tcyrus-release-2-3-7
+/libwrap.m4/1.9.2.1/Tue May 23 13:27:19 2006//Tcyrus-release-2-3-7
+/mips-abi.m4/1.5/Wed Oct 8 20:35:25 2003//Tcyrus-release-2-3-7
+/nadine.m4/1.6/Wed Oct 8 20:35:25 2003//Tcyrus-release-2-3-7
+/nana.m4/1.5/Wed Oct 8 20:35:25 2003//Tcyrus-release-2-3-7
+/openldap.m4/1.2.2.1/Tue May 23 13:27:19 2006//Tcyrus-release-2-3-7
+/openssl.m4/1.8.4.2/Tue May 23 13:27:19 2006//Tcyrus-release-2-3-7
+/pthreads.m4/1.11/Wed Oct 8 20:35:25 2003//Tcyrus-release-2-3-7
+/sasl.m4/1.22.4.1/Tue May 23 13:27:19 2006//Tcyrus-release-2-3-7
+/sasl2.m4/1.36.2.6/Tue May 23 13:27:20 2006//Tcyrus-release-2-3-7
+/tcl.m4/1.4/Wed Oct 8 20:35:25 2003//Tcyrus-release-2-3-7
+/telnet.m4/1.12.4.1/Tue May 23 13:27:20 2006//Tcyrus-release-2-3-7
+/ucdsnmp.m4/1.8.2.2/Tue May 23 13:27:20 2006//Tcyrus-release-2-3-7
+/util.m4/1.10/Wed Oct 8 20:35:26 2003//Tcyrus-release-2-3-7
+/zephyr.m4/1.1.2.2/Tue May 23 13:27:21 2006//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cmulocal
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/README.andrew
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/README.andrew?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/README.andrew (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/README.andrew Sat Aug 26 02:00:13 2006
@@ -1,0 +1,71 @@
+This is a collection of autoconf macros which've been written by
+various people at CMU. To use it, use "aclocal -I cmulocal" (after
+the first time, automake should automatically use the -I cmulocal, if
+you've called CMU_INIT_AUTOMAKE in configure.in).
+
+CMU_INIT_AUTOMAKE
+ If you use automake, you should call this after AM_INIT_AUTOMAKE.
+ It adds "-I cmulocal" to the aclocal command line, so that when
+ automake runs aclocal, aclocal'll continue to pick up these macros.
+
+CMU_ADD_LIBPATH
+ Add -L(arg), and possibly -R(arg) (or whatever the runpath is) to
+ LDFLAGS.
+
+CMU_ADD_LIBPATH_TO
+ Likewise to above, except adds it to the specified variable (arg 2).
+
+CMU_GUESS_RUNPATH_SWITCH
+ Attempts to guess what the runpath switch is (-R or whatever).
+
+CMU_COMERR
+ Requires that com_err exist in the collection (at CMU, do this by
+ running "cvs checkout com_err", and adding com_err to DIST_SUBDIRS
+ in your Makefile.am).
+
+ It sets the output variable COMPILE_ET to the compile_et program to
+ use, and adds the appropriate paths to LDFLAGS and CPPFLAGS.
+
+ It does *not* add -lcom_err to LIBS (this would cause later library
+ checks to fail if com_err needs to be built), so Makefiles need to
+ explicitly add -lcom_err (which, after all, should always exist as
+ long as the com_err compile doesn't blow up). Makefiles should do
+ this by using LIB_COMERR, which will substitute to the appropriate
+ magic to use to grab the library. (This may involve a libtool archive;
+ you should be using libtool to link your program if you distribute
+ libraries with it that the program may link against).
+
+ Note that com_err will only be compiled if the configure script
+ can't find compile_et or libcom_err; if the system already has them,
+ the configure script will use the system installation (although, due
+ to some autoconf wonkiness, com_err will still be configured; it just
+ won't show up in the @subdirs@ expansion).
+
+CMU_NANA
+ Adds --with-nana, set by default; if set, attempts to link against
+ libnana. If not set, or if libnana is unavailable, or if we're not
+ using gcc, it defines WITHOUT_NANA.
+
+CMU_PROG_LIBTOOL
+ Just like AM_PROG_LIBTOOL, except it performs a couple little hacks
+ to make sure that things don't break on picky vendor compilers
+ which whine about empty translation units. [DEPRECATED - DO NOT USE]
+
+CMU_PTHREADS
+ This attempts to link against libpthread (failing if it can't be found),
+ and attempts to do any system-specific setup required for thread
+ support (for example, most things want _REENTRANT to be defined,
+ but Solaris wants _POSIX_PTHREAD_SEMANTICS and __EXTENSIONS__, IRIX
+ wants to see _SGI_REENTRANT_FUNCTIONS, etc).
+
+CMU_SASL
+ This tries to find a SASL library, and calls AC_SUBST on LIB_SASL
+ if it finds one, or tells the user to go ftp it if it doesn't exist.
+
+ Provides --with-sasldir.
+
+CMU_KRB4
+ This attempts to find Kerberos 4 libraries and set up CFLAGS and LIBS
+ appropriately. It also updates and substitutes RPATH for shared library
+ stuff.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/afs.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/afs.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/afs.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/afs.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,314 @@
+dnl afs.m4--AFS libraries, includes, and dependencies
+dnl $Id: afs.m4,v 1.26.4.3 2006/05/23 13:27:14 murch Exp $
+dnl Chaskiel Grundman
+dnl based on kerberos_v4.m4
+dnl Derrick Brashear
+dnl from KTH krb and Arla
+
+AC_DEFUN([CMU_AFS_INC_WHERE1], [
+cmu_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$cmu_save_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <afs/param.h>],
+[#ifndef SYS_NAME
+choke me
+#endif
+int foo;],
+ac_cv_found_afs_inc=yes,
+ac_cv_found_afs_inc=no)
+CPPFLAGS=$cmu_save_CPPFLAGS
+])
+
+AC_DEFUN([CMU_AFS_LIB_WHERE1], [
+save_LIBS="$LIBS"
+save_LDFLAGS="$LDFLAGS"
+
+LIBS="-lauth $1/afs/util.a $LIB_SOCKET $LIBS"
+LDFLAGS="-L$1 -L$1/afs $LDFLAGS"
+dnl suppress caching
+AC_TRY_LINK([],[afsconf_Open();], ac_cv_found_afs_lib=yes, ac_cv_found_afs_lib=no)
+LIBS="$save_LIBS"
+LDFLAGS="$save_LDFLAGS"
+])
+
+AC_DEFUN([CMU_AFS_WHERE], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+ for i in $1; do
+ AC_MSG_CHECKING(for AFS in $i)
+ CMU_AFS_INC_WHERE1("$i/include")
+ ac_cv_found_lwp_inc=$ac_cv_found_afs_inc
+ CMU_TEST_INCPATH($i/include, lwp)
+ ac_cv_found_afs_inc=$ac_cv_found_lwp_inc
+ if test "$ac_cv_found_afs_inc" = "yes"; then
+ CMU_AFS_LIB_WHERE1("$i/$CMU_LIB_SUBDIR")
+ if test "$ac_cv_found_afs_lib" = "yes"; then
+ ac_cv_afs_where=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_AFS], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_LIBSSL])
+AC_ARG_WITH(AFS,
+ [ --with-afs=PREFIX Compile with AFS support],
+ [if test "X$with_AFS" = "X"; then
+ with_AFS=yes
+ fi])
+
+ if test "X$with_AFS" != "X"; then
+ ac_cv_afs_where=$with_AFS
+ fi
+ if test "X$ac_cv_afs_where" = "X"; then
+ CMU_AFS_WHERE(/usr/afsws /usr/local /usr/athena /Library/OpenAFS/Tools)
+ fi
+
+ AC_MSG_CHECKING(whether to include AFS)
+ if test "X$ac_cv_afs_where" = "Xno" -o "X$ac_cv_afs_where" = "X"; then
+ ac_cv_found_afs=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_afs=yes
+ AC_MSG_RESULT(yes)
+ AFS_INC_DIR="$ac_cv_afs_where/include"
+ AFS_LIB_DIR="$ac_cv_afs_where/$CMU_LIB_SUBDIR"
+ AFS_TOP_DIR="$ac_cv_afs_where"
+ AFS_INC_FLAGS="-I${AFS_INC_DIR}"
+ AFS_LIB_FLAGS="-L${AFS_LIB_DIR} -L${AFS_LIB_DIR}/afs"
+ cmu_save_LIBS="$LIBS"
+ cmu_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS ${AFS_INC_FLAGS}"
+ cmu_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$cmu_save_LDFLAGS ${AFS_LIB_FLAGS}"
+
+ AC_CHECK_HEADERS(afs/stds.h)
+
+ AC_MSG_CHECKING([if libdes is needed])
+ AC_TRY_LINK([],[des_quad_cksum();],AFS_DES_LIB="",AFS_DES_LIB="maybe")
+ if test "X$AFS_DES_LIB" != "X"; then
+ LIBS="$cmu_save_LIBS -ldes"
+ AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="yes")
+ if test "X$AFS_DES_LIB" = "Xyes"; then
+ AC_MSG_RESULT([yes])
+ AFS_LIBDES="-ldes"
+ AFS_LIBDESA="${AFS_LIB_DIR}/libdes.a"
+ else
+ LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],AFS_DES_LIB="libcrypto")
+ if test "X$AFS_DES_LIB" = "Xlibcrypto"; then
+ AC_MSG_RESULT([libcrypto])
+ AFS_LIBDES="$LIBSSL_LIB_FLAGS"
+ AFS_LIBDESA="$LIBSSL_LIB_FLAGS"
+ else
+ LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],AFS_DES_LIB="libcrypto+descompat")
+ if test "X$AFS_DES_LIB" = "Xlibcrypto+descompat"; then
+ AC_MSG_RESULT([libcrypto+descompat])
+ AFS_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ AFS_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Could not use -ldes])
+ fi
+ fi
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+
+ AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
+ AFS_KTC_LIBS_STATIC="${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
+ AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
+ AFS_RX_LIBS="-lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
+ AFS_KTC_LIBS="-lauth ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcom_err ${AFS_LIB_DIR}/afs/util.a"
+
+ LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
+ AC_CHECK_FUNC(des_pcbc_init)
+ if test "X$ac_cv_func_des_pcbc_init" != "Xyes"; then
+ AC_CHECK_LIB(descompat, des_pcbc_init, AFS_DESCOMPAT_LIB="-ldescompat")
+ if test "X$AFS_DESCOMPAT_LIB" != "X" ; then
+ AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_DESCOMPAT_LIB"
+ AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_DESCOMPAT_LIB"
+ AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_DESCOMPAT_LIB"
+ AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_DESCOMPAT_LIB"
+ else
+
+ AC_MSG_CHECKING([if rxkad needs des_pcbc_init])
+ AC_TRY_LINK(,[tkt_DecodeTicket();],RXKAD_PROBLEM=no,RXKAD_PROBLEM=maybe)
+ if test "$RXKAD_PROBLEM" = "maybe"; then
+ AC_TRY_LINK([int des_pcbc_init() { return 0;}],
+ [tkt_DecodeTicket();],RXKAD_PROBLEM=yes,RXKAD_PROBLEM=error)
+ if test "$RXKAD_PROBLEM" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_MSG_ERROR([cannot use rxkad])
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Unknown error testing rxkad])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ fi
+
+ LIBS="$cmu_save_LIBS"
+ AC_CHECK_FUNC(flock)
+ LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
+ if test "X$ac_cv_func_flock" != "Xyes"; then
+ AC_MSG_CHECKING([if AFS needs flock])
+ AC_TRY_LINK([#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif
+#include <ubik.h>
+#include <afs/cellconfig.h>
+#include <afs/auth.h>
+#include <afs/volser.h>
+struct ubik_client * cstruct;
+int sigvec() {return 0;}
+extern int UV_SetSecurity();],
+ [vsu_ClientInit(1,"","",0,
+ &cstruct,UV_SetSecurity)],
+ AFS_FLOCK=no,AFS_FLOCK=yes)
+ if test $AFS_FLOCK = "no"; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ LDFLAGS="$LDFLAGS -L/usr/ucblib"
+ AC_CHECK_LIB(ucb, flock,:, [AC_CHECK_LIB(BSD, flock)])
+ fi
+ fi
+ LIBS="$cmu_save_LIBS"
+ AC_CHECK_FUNC(sigvec)
+ LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
+ if test "X$ac_cv_func_sigvec" != "Xyes"; then
+ AC_MSG_CHECKING([if AFS needs sigvec])
+ AC_TRY_LINK([#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif
+#include <ubik.h>
+#include <afs/cellconfig.h>
+#include <afs/auth.h>
+#include <afs/volser.h>
+struct ubik_client * cstruct;
+int flock() {return 0;}
+extern int UV_SetSecurity();],
+ [vsu_ClientInit(1,"","",0,
+ &cstruct,UV_SetSecurity)],
+ AFS_SIGVEC=no,AFS_SIGVEC=yes)
+ if test $AFS_SIGVEC = "no"; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ LDFLAGS="$LDFLAGS -L/usr/ucblib"
+ AC_CHECK_LIB(ucb, sigvec,:,[AC_CHECK_LIB(BSD, sigvec)])
+ fi
+ fi
+ if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
+ AFS_LIB_FLAGS="${AFS_LIB_FLAGS} -L/usr/ucblib -R/usr/ucblib"
+ fi
+ if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
+ AFS_BSD_LIB="-lucb"
+ elif test "$ac_cv_lib_BSD_flock" = "yes" -o "$ac_cv_lib_BSD_sigvec" = "yes"; then
+ AFS_BSD_LIB="-lBSD"
+ fi
+ if test "X$AFS_BSD_LIB" != "X" ; then
+ AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_BSD_LIB"
+ AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_BSD_LIB"
+ AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
+ AFS_RX_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
+ AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_BSD_LIB"
+ fi
+
+ AC_MSG_CHECKING([if libaudit is needed])
+ AFS_LIBAUDIT=""
+ LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
+ AC_TRY_LINK([#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif
+#include <afs/cellconfig.h>
+#include <afs/auth.h>],
+ [afsconf_SuperUser();],AFS_AUDIT_LIB="",AFS_AUDIT_LIB="maybe")
+ if test "X$AFS_AUDIT_LIB" != "X"; then
+ LIBS="$cmu_save_LIBS -lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB $LIB_SOCKET"
+ AC_TRY_LINK([#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif
+#include <afs/cellconfig.h>
+#include <afs/auth.h>],
+ [afsconf_SuperUser();],AFS_AUDIT_LIB="yes")
+ if test "X$AFS_AUDIT_LIB" = "Xyes"; then
+ AC_MSG_RESULT([yes])
+ AFS_LIBAUDIT="-laudit"
+ AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libaudit.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
+ AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
+ AFS_RX_LIBS="-lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Could not use -lauth while testing for -laudit])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ AC_CHECK_FUNCS(VL_ProbeServer)
+ AC_MSG_CHECKING([if new-style afs_ integer types are defined])
+ AC_CACHE_VAL(ac_cv_afs_int32,
+dnl The next few lines contain a quoted argument to egrep
+dnl It is critical that there be no leading or trailing whitespace
+dnl or newlines
+[AC_EGREP_CPP(dnl
+changequote(<<,>>)dnl
+<<(^|[^a-zA-Z_0-9])afs_int32[^a-zA-Z_0-9]>>dnl
+changequote([,]), [#include <afs/param.h>
+#ifdef HAVE_AFS_STDS_H
+#include <afs/stds.h>
+#endif],
+ac_cv_afs_int32=yes, ac_cv_afs_int32=no)])
+ AC_MSG_RESULT($ac_cv_afs_int32)
+ if test $ac_cv_afs_int32 = yes ; then
+ AC_DEFINE(HAVE_AFS_INT32,, [AFS provides new "unambiguous" type names])
+ else
+ AC_DEFINE(afs_int16, int16, [it's a type definition])
+ AC_DEFINE(afs_int32, int32, [it's a type definition])
+ AC_DEFINE(afs_uint16, u_int16, [it's a type definition])
+ AC_DEFINE(afs_uint32, u_int32, [it's a type definition])
+ fi
+
+ CPPFLAGS="${cmu_save_CPPFLAGS}"
+ LDFLAGS="${cmu_save_LDFLAGS}"
+ LIBS="${cmu_save_LIBS}"
+ AC_DEFINE(AFS_ENV,, [Use AFS. (find what needs this and nuke it)])
+ AC_DEFINE(AFS,, [Use AFS. (find what needs this and nuke it)])
+ AC_SUBST(AFS_CLIENT_LIBS_STATIC)
+ AC_SUBST(AFS_KTC_LIBS_STATIC)
+ AC_SUBST(AFS_CLIENT_LIBS)
+ AC_SUBST(AFS_RX_LIBS)
+ AC_SUBST(AFS_KTC_LIBS)
+ AC_SUBST(AFS_INC_FLAGS)
+ AC_SUBST(AFS_LIB_FLAGS)
+ AC_SUBST(AFS_TOP_DIR)
+ AC_SUBST(AFS_LIBAUDIT)
+ AC_SUBST(AFS_LIBDES)
+ AC_SUBST(AFS_LIBDESA)
+ fi
+ ])
+
+AC_DEFUN([CMU_NEEDS_AFS],
+[AC_REQUIRE([CMU_AFS])
+if test "$ac_cv_found_afs" != "yes"; then
+ AC_ERROR([Cannot continue without AFS])
+fi])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/agentx.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/agentx.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/agentx.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/agentx.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,46 @@
+dnl agentx.m4--detect agentx libraries
+dnl copied from x-unixrc
+dnl Tim Martin
+dnl $Id: agentx.m4,v 1.5 2003/10/08 20:35:24 rjs3 Exp $
+
+AC_DEFUN([CMU_AGENTX], [
+
+ dnl
+ dnl CMU AgentX
+ dnl
+ AC_MSG_CHECKING([for AgentX])
+ AC_ARG_WITH(agentx, [ --with-agentx CMU AgentX libraries located in (val)], AGENTX_DIR="$withval", AGENTX_DIR=no)
+
+ found_agentx="no"
+
+ if test "${AGENTX_DIR}" != "no" &&
+ test -f $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a &&
+ test -f $AGENTX_DIR/include/agentx.h; then
+ AGENTX_DIR="$AGENTX_DIR"
+ found_agentx="yes"
+ elif test -d /usr/local &&
+ test -f /usr/local/lib${ABILIBDIR}/libagentx.a &&
+ test -f /usr/local/include/agentx.h; then
+ AGENTX_DIR="/usr/local"
+ found_agentx="yes"
+
+ elif test -d /usr/ng &&
+ test -f /usr/ng/lib${ABILIBDIR}/libagentx.a &&
+ test -f /usr/ng/include/agentx.h; then
+ AGENTX_DIR="/usr/ng"
+ found_agentx="yes"
+ fi
+
+ if test "$found_agentx" = "no"; then
+ AC_MSG_WARN([Could not locate AgentX Libraries! http://www.net.cmu.edu/groups/netdev/agentx/])
+ else
+ LIB_AGENTX="-L$AGENTX_DIR/lib${ABILIBDIR} -lagentx"
+ AC_SUBST(LIB_AGENTX)
+ AGENTXFLAGS="-I$AGENTX_DIR/include"
+ AC_SUBST(AGENTXFLAGS)
+ AC_MSG_RESULT([found $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a])
+ fi
+
+
+
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/arx.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/arx.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/arx.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/arx.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,155 @@
+dnl $Id: arx.m4,v 1.5.4.1 2006/05/23 13:27:14 murch Exp $
+
+AC_DEFUN([CMU_ARX_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <arx.h>],
+[arx_context *foo;],
+ac_cv_found_arx_inc=yes,
+ac_cv_found_arx_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_ARX_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for arx headers in $i)
+ CMU_ARX_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, arx)
+ if test "$ac_cv_found_arx_inc" = "yes"; then
+ ac_cv_arx_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+#
+# Test for lib files
+#
+
+AC_DEFUN([CMU_ARX_LIB_WHERE1], [
+AC_REQUIRE([CMU_AFS])
+AC_REQUIRE([CMU_KRB4])
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -larx $AFS_LIB_FLAGS $AFS_CLIENT_LIBS $KRB_LIB_FLAGS $LIB_SOCKET"
+AC_TRY_LINK(,
+[arx_Init();],
+[ac_cv_found_arx_lib=yes],
+ac_cv_found_arx_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_ARX_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for arx libraries in $i)
+ CMU_ARX_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, arx)
+ if test "$ac_cv_found_arx_lib" = "yes" ; then
+ ac_cv_arx_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_USE_ARX], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(arx,
+ [ --with-arx=PREFIX Compile with arx support],
+ [if test "X$with_arx" = "X"; then
+ with_arx=yes
+ fi])
+AC_ARG_WITH(arx-lib,
+ [ --with-arx-lib=dir use arx libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-arx-lib])
+ fi])
+AC_ARG_WITH(arx-include,
+ [ --with-arx-include=dir use arx headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-arx-include])
+ fi])
+
+ if test "X$with_arx" != "X"; then
+ if test "$with_arx" != "yes"; then
+ ac_cv_arx_where_lib=$with_arx/${CMU_LIB_SUBDIR}
+ ac_cv_arx_where_inc=$with_arx/include
+ fi
+ fi
+
+ if test "X$with_arx_lib" != "X"; then
+ ac_cv_arx_where_lib=$with_arx_lib
+ fi
+ if test "X$ac_cv_arx_where_lib" = "X"; then
+ CMU_ARX_LIB_WHERE(/usr/athena/${CMU_LIB_SUBDIR} /usr/local/${CMU_LIB_SUBDIR} /usr/${CMU_LIB_SUBDIR})
+ fi
+
+ if test "X$with_arx_include" != "X"; then
+ ac_cv_arx_where_inc=$with_arx_include
+ fi
+ if test "X$ac_cv_arx_where_inc" = "X"; then
+ CMU_ARX_INC_WHERE(/usr/athena/include /usr/local/include)
+ fi
+
+ AC_MSG_CHECKING(whether to include arx)
+ if test "X$ac_cv_arx_where_lib" = "X" -o "X$ac_cv_arx_where_inc" = "X"; then
+ ac_cv_found_arx=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_arx=yes
+ AC_MSG_RESULT(yes)
+ ARX_INC_DIR=$ac_cv_arx_where_inc
+ ARX_LIB_DIR=$ac_cv_arx_where_lib
+ ARX_INC_FLAGS="-I${ARX_INC_DIR}"
+ ARX_LIB_FLAGS="-L${ARX_LIB_DIR} -larx"
+ ARX_LD_FLAGS="-L${ARX_LIB_DIR}"
+ dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
+ dnl Allow makefile substitutions....
+ AC_SUBST(ARX_INC_FLAGS)
+ AC_SUBST(ARX_LIB_FLAGS)
+ AC_SUBST(ARX_LD_FLAGS)
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${ARX_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${ARX_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${ARX_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${ARX_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${ARX_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${ARX_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${ARX_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${ARX_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${ARX_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ax_path_bdb.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ax_path_bdb.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ax_path_bdb.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ax_path_bdb.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,566 @@
+dnl @synopsis AX_PATH_BDB([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl
+dnl This macro finds the latest version of Berkeley DB on the system,
+dnl and ensures that the header file and library versions match. If
+dnl MINIMUM-VERSION is specified, it will ensure that the library
+dnl found is at least that version.
+dnl
+dnl It determines the name of the library as well as the path to the
+dnl header file and library. It will check both the default environment
+dnl as well as the default Berkeley DB install location. When found, it
+dnl sets BDB_LIBS, BDB_CPPFLAGS, and BDB_LDFLAGS to the necessary values
+dnl to add to LIBS, CPPFLAGS, and LDFLAGS, as well as setting BDB_VERSION
+dnl to the version found. HAVE_DB_H is defined also.
+dnl
+dnl The option --with-bdb-dir=DIR can be used to specify a specific
+dnl Berkeley DB installation to use.
+dnl
+dnl An example of it's use is:
+dnl AX_PATH_BDB([3],[
+dnl LIBS="$BDB_LIBS $LIBS"
+dnl LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
+dnl CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
+dnl ])
+dnl which will locate the latest version of Berkeley DB on the system,
+dnl and ensure that it is version 3.0 or higher.
+dnl
+dnl Details: This macro does not use either AC_CHECK_HEADERS or
+dnl AC_CHECK_LIB because, first, the functions inside the library are
+dnl sometimes renamed to contain a version code that is only available
+dnl from the db.h on the system, and second, because it is common to
+dnl have multiple db.h and libdb files on a system it is important to
+dnl make sure the ones being used correspond to the same version.
+dnl Additionally, there are many different possible names for libdb
+dnl when installed by an OS distribution, and these need to be checked
+dnl if db.h does not correspond to libdb.
+dnl
+dnl When cross compiling, only header versions are verified since it
+dnl would be difficult to check the library version. Additionally
+dnl the default Berkeley DB installation locations /usr/local/BerkeleyDB*
+dnl are not searched for higher versions of the library.
+dnl
+dnl The format for the list of library names to search came from the
+dnl Cyrus IMAP distribution, although they are generated dynamically
+dnl here, and only for the version found in db.h.
+dnl
+dnl The macro AX_COMPARE_VERSION is required to use this macro, and
+dnl should be available from the Autoconf Macro Archive.
+dnl
+dnl The author would like to acknowledge the generous and valuable feedback
+dnl from Guido Draheim, without which this macro would be far less robust,
+dnl and have poor and inconsistent cross compilation support.
+dnl
+dnl @version $Id: ax_path_bdb.m4,v 1.1.2.1 2006/05/23 13:27:14 murch Exp $
+dnl @author Tim Toolan <toolan at ele.uri.edu>
+dnl
+
+dnl #########################################################################
+AC_DEFUN([AX_PATH_BDB], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_ok=no
+
+ # Add --with-bdb-dir option to configure.
+ AC_ARG_WITH([bdb-dir],
+ [AC_HELP_STRING([--with-bdb-dir=DIR],
+ [Berkeley DB installation directory])])
+
+ # Check if --with-bdb-dir was specified.
+ if test "x$with_bdb_dir" = "x" ; then
+ # No option specified, so just search the system.
+ AX_PATH_BDB_NO_OPTIONS([$1], [HIGHEST], [
+ ax_path_bdb_ok=yes
+ ])
+ else
+ # Set --with-bdb-dir option.
+ ax_path_bdb_INC="$with_bdb_dir/include"
+ ax_path_bdb_LIB="$with_bdb_dir/lib"
+
+ dnl # Save previous environment, and modify with new stuff.
+ ax_path_bdb_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS"
+
+ ax_path_bdb_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS"
+
+ # Check for specific header file db.h
+ AC_MSG_CHECKING([db.h presence in $ax_path_bdb_INC])
+ if test -f "$ax_path_bdb_INC/db.h" ; then
+ AC_MSG_RESULT([yes])
+ # Check for library
+ AX_PATH_BDB_NO_OPTIONS([$1], [ENVONLY], [
+ ax_path_bdb_ok=yes
+ BDB_CPPFLAGS="-I$ax_path_bdb_INC"
+ BDB_LDFLAGS="-L$ax_path_bdb_LIB"
+ ])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_NOTICE([no usable Berkeley DB not found])
+ fi
+
+ dnl # Restore the environment.
+ CPPFLAGS="$ax_path_bdb_save_CPPFLAGS"
+ LDFLAGS="$ax_path_bdb_save_LDFLAGS"
+
+ fi
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_ok" = "yes" ; then
+ m4_ifvaln([$2],[$2],[:])dnl
+ m4_ifvaln([$3],[else $3])dnl
+ fi
+
+]) dnl AX_PATH_BDB
+
+dnl #########################################################################
+dnl Check for berkeley DB of at least MINIMUM-VERSION on system.
+dnl
+dnl The OPTION argument determines how the checks occur, and can be one of:
+dnl
+dnl HIGHEST - Check both the environment and the default installation
+dnl directories for Berkeley DB and choose the version that
+dnl is highest. (default)
+dnl ENVFIRST - Check the environment first, and if no satisfactory
+dnl library is found there check the default installation
+dnl directories for Berkeley DB which is /usr/local/BerkeleyDB*
+dnl ENVONLY - Check the current environment only.
+dnl
+dnl Requires AX_PATH_BDB_PATH_GET_VERSION, AX_PATH_BDB_PATH_FIND_HIGHEST,
+dnl AX_PATH_BDB_ENV_CONFIRM_LIB, AX_PATH_BDB_ENV_GET_VERSION, and
+dnl AX_COMPARE_VERSION macros.
+dnl
+dnl Result: sets ax_path_bdb_no_options_ok to yes or no
+dnl sets BDB_LIBS, BDB_CPPFLAGS, BDB_LDFLAGS, BDB_VERSION
+dnl
+dnl AX_PATH_BDB_NO_OPTIONS([MINIMUM-VERSION], [OPTION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_NO_OPTIONS], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_no_options_ok=no
+
+ # Values to add to environment to use Berkeley DB.
+ BDB_VERSION=''
+ BDB_LIBS=''
+ BDB_CPPFLAGS=''
+ BDB_LDFLAGS=''
+
+ # Check cross compilation here.
+ if test "x$cross_compiling" = "xyes" ; then
+ # If cross compiling, can't use AC_RUN_IFELSE so do these tests.
+ # The AC_PREPROC_IFELSE confirms that db.h is preprocessable,
+ # and extracts the version number from it.
+ AC_MSG_CHECKING([for db.h])
+
+ AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_no_options_HEADER_VERSION])dnl
+ HEADER_VERSION=''
+ AC_PREPROC_IFELSE([
+ AC_LANG_SOURCE([[
+#include <db.h>
+AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH
+ ]])
+ ],[
+ # Extract version from preprocessor output.
+ HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \
+ | grep AX_PATH_BDB_STUFF | sed 's/[[^0-9,]]//g;s/,/./g;1q'`
+ ],[])
+
+ if test "x$HEADER_VERSION" = "x" ; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([$HEADER_VERSION])
+
+ # Check that version is high enough.
+ AX_COMPARE_VERSION([$HEADER_VERSION],[ge],[$1],[
+ # get major and minor version numbers
+ AS_VAR_PUSHDEF([MAJ],[ax_path_bdb_no_options_MAJOR])dnl
+ MAJ=`echo $HEADER_VERSION | sed 's,\..*,,'`
+ AS_VAR_PUSHDEF([MIN],[ax_path_bdb_no_options_MINOR])dnl
+ MIN=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
+
+ dnl # Save LIBS.
+ ax_path_bdb_no_options_save_LIBS="$LIBS"
+
+ # Check that we can link with the library.
+ AC_SEARCH_LIBS([db_version],
+ [db db-$MAJ.$MIN db$MAJ.$MIN db$MAJ$MIN db-$MAJ db$MAJ],[
+ # Sucessfully found library.
+ ax_path_bdb_no_options_ok=yes
+ BDB_VERSION=$HEADER_VERSION
+
+ # Extract library from LIBS
+ ax_path_bdb_no_options_LEN=` \
+ echo "x$ax_path_bdb_no_options_save_LIBS" \
+ | awk '{print(length)}'`
+ BDB_LIBS=`echo "x$LIBS " \
+ | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"`
+ ],[])
+
+ dnl # Restore LIBS
+ LIBS="$ax_path_bdb_no_options_save_LIBS"
+
+ AS_VAR_POPDEF([MAJ])dnl
+ AS_VAR_POPDEF([MIN])dnl
+ ])
+ fi
+
+ AS_VAR_POPDEF([HEADER_VERSION])dnl
+ else
+ # Not cross compiling.
+ # Check version of Berkeley DB in the current environment.
+ AX_PATH_BDB_ENV_GET_VERSION([
+ AX_COMPARE_VERSION([$ax_path_bdb_env_get_version_VERSION],[ge],[$1],[
+ # Found acceptable version in current environment.
+ ax_path_bdb_no_options_ok=yes
+ BDB_VERSION="$ax_path_bdb_env_get_version_VERSION"
+ BDB_LIBS="$ax_path_bdb_env_get_version_LIBS"
+ ])
+ ])
+
+ # Determine if we need to search /usr/local/BerkeleyDB*
+ ax_path_bdb_no_options_DONE=no
+ if test "x$2" = "xENVONLY" ; then
+ ax_path_bdb_no_options_DONE=yes
+ elif test "x$2" = "xENVFIRST" ; then
+ ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok
+ fi
+
+ if test "$ax_path_bdb_no_options_DONE" = "no" ; then
+ # Check for highest in /usr/local/BerkeleyDB*
+ AX_PATH_BDB_PATH_FIND_HIGHEST([
+ if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+ # If we already have an acceptable version use this if higher.
+ AX_COMPARE_VERSION(
+ [$ax_path_bdb_path_find_highest_VERSION],[gt],[$BDB_VERSION])
+ else
+ # Since we didn't have an acceptable version check if this one is.
+ AX_COMPARE_VERSION(
+ [$ax_path_bdb_path_find_highest_VERSION],[ge],[$1])
+ fi
+ ])
+
+ dnl # If result from _AX_COMPARE_VERSION is true we want this version.
+ if test "$ax_compare_version" = "true" ; then
+ ax_path_bdb_no_options_ok=yes
+ BDB_LIBS="-ldb"
+ BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include"
+ BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib"
+ BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION"
+ fi
+ fi
+ fi
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+ AC_MSG_NOTICE([using Berkeley DB version $BDB_VERSION])
+ AC_DEFINE([HAVE_DB_H],[1],
+ [Define to 1 if you have the <db.h> header file.])
+ m4_ifvaln([$3],[$3])dnl
+ else
+ AC_MSG_NOTICE([no Berkeley DB version $1 or higher found])
+ m4_ifvaln([$4],[$4])dnl
+ fi
+]) dnl AX_PATH_BDB_NO_OPTIONS
+
+dnl #########################################################################
+dnl Check the default installation directory for Berkeley DB which is
+dnl of the form /usr/local/BerkeleyDB* for the highest version.
+dnl
+dnl Result: sets ax_path_bdb_path_find_highest_ok to yes or no,
+dnl sets ax_path_bdb_path_find_highest_VERSION to version,
+dnl sets ax_path_bdb_path_find_highest_DIR to directory.
+dnl
+dnl AX_PATH_BDB_PATH_FIND_HIGHEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_PATH_FIND_HIGHEST], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_path_find_highest_ok=no
+
+ AS_VAR_PUSHDEF([VERSION],[ax_path_bdb_path_find_highest_VERSION])dnl
+ VERSION=''
+
+ ax_path_bdb_path_find_highest_DIR=''
+
+ # find highest verison in default install directory for Berkeley DB
+ AS_VAR_PUSHDEF([CURDIR],[ax_path_bdb_path_find_highest_CURDIR])dnl
+ AS_VAR_PUSHDEF([CUR_VERSION],[ax_path_bdb_path_get_version_VERSION])dnl
+
+ for CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null`
+ do
+ AX_PATH_BDB_PATH_GET_VERSION([$CURDIR],[
+ AX_COMPARE_VERSION([$CUR_VERSION],[gt],[$VERSION],[
+ ax_path_bdb_path_find_highest_ok=yes
+ ax_path_bdb_path_find_highest_DIR="$CURDIR"
+ VERSION="$CUR_VERSION"
+ ])
+ ])
+ done
+
+ AS_VAR_POPDEF([VERSION])dnl
+ AS_VAR_POPDEF([CUR_VERSION])dnl
+ AS_VAR_POPDEF([CURDIR])dnl
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+
+]) dnl AX_PATH_BDB_PATH_FIND_HIGHEST
+
+dnl #########################################################################
+dnl Checks for Berkeley DB in specified directory's lib and include
+dnl subdirectories.
+dnl
+dnl Result: sets ax_path_bdb_path_get_version_ok to yes or no,
+dnl sets ax_path_bdb_path_get_version_VERSION to version.
+dnl
+dnl AX_PATH_BDB_PATH_GET_VERSION(BDB-DIR, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_PATH_GET_VERSION], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_path_get_version_ok=no
+
+ # Indicate status of checking for Berkeley DB header.
+ AC_MSG_CHECKING([in $1/include for db.h])
+ ax_path_bdb_path_get_version_got_header=no
+ test -f "$1/include/db.h" && ax_path_bdb_path_get_version_got_header=yes
+ AC_MSG_RESULT([$ax_path_bdb_path_get_version_got_header])
+
+ # Indicate status of checking for Berkeley DB library.
+ AC_MSG_CHECKING([in $1/lib for library -ldb])
+
+ ax_path_bdb_path_get_version_VERSION=''
+
+ if test -d "$1/include" && test -d "$1/lib" &&
+ test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then
+ dnl # save and modify environment
+ ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$1/include $CPPFLAGS"
+
+ ax_path_bdb_path_get_version_save_LIBS="$LIBS"
+ LIBS="$LIBS -ldb"
+
+ ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L$1/lib $LDFLAGS"
+
+ # Compile and run a program that compares the version defined in
+ # the header file with a version defined in the library function
+ # db_version.
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ int major,minor,patch;
+ db_version(&major,&minor,&patch);
+ if (argc > 1)
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+ if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+ DB_VERSION_PATCH == patch)
+ return 0;
+ else
+ return 1;
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by adding argument.
+ ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x`
+ ax_path_bdb_path_get_version_ok=yes
+ ],[],[])
+
+ dnl # restore environment
+ CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS"
+ LIBS="$ax_path_bdb_path_get_version_save_LIBS"
+ LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS"
+ fi
+
+ dnl # Finally, execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then
+ AC_MSG_RESULT([$ax_path_bdb_path_get_version_VERSION])
+ m4_ifvaln([$2],[$2])dnl
+ else
+ AC_MSG_RESULT([no])
+ m4_ifvaln([$3],[$3])dnl
+ fi
+]) dnl AX_PATH_BDB_PATH_GET_VERSION
+
+#############################################################################
+dnl Checks if version of library and header match specified version.
+dnl Only meant to be used by AX_PATH_BDB_ENV_GET_VERSION macro.
+dnl
+dnl Requires AX_COMPARE_VERSION macro.
+dnl
+dnl Result: sets ax_path_bdb_env_confirm_lib_ok to yes or no.
+dnl
+dnl AX_PATH_BDB_ENV_CONFIRM_LIB(VERSION, [LIBNAME])
+AC_DEFUN([AX_PATH_BDB_ENV_CONFIRM_LIB], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_env_confirm_lib_ok=no
+
+ dnl # save and modify environment to link with library LIBNAME
+ ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+ LIBS="$LIBS $2"
+
+ # Compile and run a program that compares the version defined in
+ # the header file with a version defined in the library function
+ # db_version.
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ int major,minor,patch;
+ db_version(&major,&minor,&patch);
+ if (argc > 1)
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+ if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+ DB_VERSION_PATCH == patch)
+ return 0;
+ else
+ return 1;
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by giving an argument,
+ # which will tell the program to print the output.
+ ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+ # If the versions all match up, indicate success.
+ AX_COMPARE_VERSION([$ax_path_bdb_env_confirm_lib_VERSION],[eq],[$1],[
+ ax_path_bdb_env_confirm_lib_ok=yes
+ ])
+ ],[],[])
+
+ dnl # restore environment
+ LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+]) dnl AX_PATH_BDB_ENV_CONFIRM_LIB
+
+#############################################################################
+dnl Finds the version and library name for Berkeley DB in the
+dnl current environment. Tries many different names for library.
+dnl
+dnl Requires AX_PATH_BDB_ENV_CONFIRM_LIB macro.
+dnl
+dnl Result: set ax_path_bdb_env_get_version_ok to yes or no,
+dnl set ax_path_bdb_env_get_version_VERSION to the version found,
+dnl and ax_path_bdb_env_get_version_LIBNAME to the library name.
+dnl
+dnl AX_PATH_BDB_ENV_GET_VERSION([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_ENV_GET_VERSION], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_env_get_version_ok=no
+
+ ax_path_bdb_env_get_version_VERSION=''
+ ax_path_bdb_env_get_version_LIBS=''
+
+ AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_env_get_version_HEADER_VERSION])dnl
+ AS_VAR_PUSHDEF([TEST_LIBNAME],[ax_path_bdb_env_get_version_TEST_LIBNAME])dnl
+
+ # Indicate status of checking for Berkeley DB library.
+ AC_MSG_CHECKING([for db.h])
+
+ # Compile and run a program that determines the Berkeley DB version
+ # in the header file db.h.
+ HEADER_VERSION=''
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ if (argc > 1)
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+ return 0;
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by adding an argument.
+ HEADER_VERSION=`./conftest$ac_exeext x`
+ AC_MSG_RESULT([$HEADER_VERSION])
+ ],[AC_MSG_RESULT([no])],[AC_MSG_RESULT([no])])
+
+ # Have header version, so try to find corresponding library.
+ # Looks for library names in the order:
+ # nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX
+ # and stops when it finds the first one that matches the version
+ # of the header file.
+ if test "x$HEADER_VERSION" != "x" ; then
+ AC_MSG_CHECKING([for library containing Berkeley DB $HEADER_VERSION])
+
+ AS_VAR_PUSHDEF([MAJOR],[ax_path_bdb_env_get_version_MAJOR])dnl
+ AS_VAR_PUSHDEF([MINOR],[ax_path_bdb_env_get_version_MINOR])dnl
+
+ # get major and minor version numbers
+ MAJOR=`echo $HEADER_VERSION | sed 's,\..*,,'`
+ MINOR=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
+
+ # see if it is already specified in LIBS
+ TEST_LIBNAME=''
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db"
+ TEST_LIBNAME='-ldb'
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db-X.Y"
+ TEST_LIBNAME="-ldb-${MAJOR}.$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbX.Y"
+ TEST_LIBNAME="-ldb${MAJOR}.$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbXY"
+ TEST_LIBNAME="-ldb$MAJOR$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db-X"
+ TEST_LIBNAME="-ldb-$MAJOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbX"
+ TEST_LIBNAME="-ldb$MAJOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ dnl # Found a valid library.
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+ if test "x$TEST_LIBNAME" = "x" ; then
+ AC_MSG_RESULT([none required])
+ else
+ AC_MSG_RESULT([$TEST_LIBNAME])
+ fi
+ ax_path_bdb_env_get_version_VERSION="$HEADER_VERSION"
+ ax_path_bdb_env_get_version_LIBS="$TEST_LIBNAME"
+ ax_path_bdb_env_get_version_ok=yes
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ AS_VAR_POPDEF([MAJOR])dnl
+ AS_VAR_POPDEF([MINOR])dnl
+ fi
+
+ AS_VAR_POPDEF([HEADER_VERSION])dnl
+ AS_VAR_POPDEF([TEST_LIBNAME])dnl
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+
+]) dnl BDB_ENV_GET_VERSION
+
+#############################################################################
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/berkdb.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/berkdb.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/berkdb.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/berkdb.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,269 @@
+dnl $Id: berkdb.m4,v 1.12.4.7 2006/05/23 13:27:15 murch Exp $
+
+AC_DEFUN([CMU_DB_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <db.h>],
+[DB *db;
+db_create(&db, NULL, 0);
+db->open(db, "foo.db", NULL, DB_UNKNOWN, DB_RDONLY, 0644);],
+ac_cv_found_db_inc=yes,
+ac_cv_found_db_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_DB_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for db headers in $i)
+ CMU_DB_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, db)
+ if test "$ac_cv_found_db_inc" = "yes"; then
+ ac_cv_db_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+#
+# Test for lib files
+#
+
+AC_DEFUN([CMU_DB3_LIB_WHERE1], [
+AC_REQUIRE([CMU_AFS])
+AC_REQUIRE([CMU_KRB4])
+saved_LIBS=$LIBS
+ LIBS="$saved_LIBS -L$1 -ldb-3"
+AC_TRY_LINK([#include <db.h>],
+[db_env_create(NULL, 0);],
+[ac_cv_found_db_3_lib=yes],
+ac_cv_found_db_3_lib=no)
+LIBS=$saved_LIBS
+])
+AC_DEFUN([CMU_DB4_LIB_WHERE1], [
+AC_REQUIRE([CMU_AFS])
+AC_REQUIRE([CMU_KRB4])
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -ldb-4"
+AC_TRY_LINK([#include <db.h>],
+[db_env_create(NULL, 0);],
+[ac_cv_found_db_4_lib=yes],
+ac_cv_found_db_4_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_DB_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for db libraries in $i)
+if test "$enable_db4" = "yes"; then
+ CMU_DB4_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, [db-4])
+ ac_cv_found_db_lib=$ac_cv_found_db_4_lib
+else
+ CMU_DB3_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, [db-3])
+ ac_cv_found_db_lib=$ac_cv_found_db_3_lib
+fi
+ if test "$ac_cv_found_db_lib" = "yes" ; then
+ ac_cv_db_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_USE_DB], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(db,
+ [ --with-db=PREFIX Compile with db support],
+ [if test "X$with_db" = "X"; then
+ with_db=yes
+ fi])
+AC_ARG_WITH(db-lib,
+ [ --with-db-lib=dir use db libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-db-lib])
+ fi])
+AC_ARG_WITH(db-include,
+ [ --with-db-include=dir use db headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-db-include])
+ fi])
+AC_ARG_ENABLE(db4,
+ [ --enable-db4 use db 4.x libraries])
+
+ if test "X$with_db" != "X"; then
+ if test "$with_db" != "yes"; then
+ ac_cv_db_where_lib=$with_db/$CMU_LIB_SUBDIR
+ ac_cv_db_where_inc=$with_db/include
+ fi
+ fi
+
+ if test "X$with_db_lib" != "X"; then
+ ac_cv_db_where_lib=$with_db_lib
+ fi
+ if test "X$ac_cv_db_where_lib" = "X"; then
+ CMU_DB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_db_include" != "X"; then
+ ac_cv_db_where_inc=$with_db_include
+ fi
+ if test "X$ac_cv_db_where_inc" = "X"; then
+ CMU_DB_INC_WHERE(/usr/athena/include /usr/local/include)
+ fi
+
+ AC_MSG_CHECKING(whether to include db)
+ if test "X$ac_cv_db_where_lib" = "X" -o "X$ac_cv_db_where_inc" = "X"; then
+ ac_cv_found_db=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_db=yes
+ AC_MSG_RESULT(yes)
+ DB_INC_DIR=$ac_cv_db_where_inc
+ DB_LIB_DIR=$ac_cv_db_where_lib
+ DB_INC_FLAGS="-I${DB_INC_DIR}"
+ if test "$enable_db4" = "yes"; then
+ DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-4"
+ else
+ DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-3"
+ fi
+ dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
+ dnl Allow makefile substitutions....
+ AC_SUBST(DB_INC_FLAGS)
+ AC_SUBST(DB_LIB_FLAGS)
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${DB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${DB_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${DB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${DB_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${DB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${DB_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${DB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${DB_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${DB_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
+
+
+dnl ---- CUT HERE ---
+
+dnl These are the Cyrus Berkeley DB macros. In an ideal world these would be
+dnl identical to the above.
+
+dnl They are here so that they can be shared between Cyrus IMAPd
+dnl and Cyrus SASL with relative ease.
+
+dnl The big difference between this and the ones above is that we don't assume
+dnl that we know the name of the library, and we try a lot of permutations
+dnl instead. We also assume that DB4 is acceptable.
+
+dnl When we're done, there will be a BDB_LIBADD and a BDB_INCADD which should
+dnl be used when necessary. We should probably be smarter about our RPATH
+dnl handling.
+
+dnl Call these with BERKELEY_DB_CHK.
+
+dnl We will also set $dblib to "berkeley" if we are successful, "no" otherwise.
+
+dnl this is unbelievably painful due to confusion over what db-3 should be
+dnl named and where the db-3 header file is located. arg.
+AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB],
+[
+ BDB_SAVE_LDFLAGS=$LDFLAGS
+
+ if test -d $with_bdb_lib; then
+ CMU_ADD_LIBPATH_TO($with_bdb_lib, LDFLAGS)
+ CMU_ADD_LIBPATH_TO($with_bdb_lib, BDB_LIBADD)
+ else
+ BDB_LIBADD=""
+ fi
+
+ saved_LIBS=$LIBS
+ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+ AC_TRY_LINK([#include <db.h>],
+ [db_create(NULL, NULL, 0);],
+ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db,
+ dblib="no")
+ if test "$dblib" = "berkeley"; then break; fi
+ done
+ if test "$dblib" = "no"; then
+ LIBS="$saved_LIBS -ldb"
+ AC_TRY_LINK([#include <db.h>],
+ [db_open(NULL, 0, 0, 0, NULL, NULL, NULL);],
+ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db,
+ dblib="no")
+ fi
+ LIBS=$saved_LIBS
+
+ LDFLAGS=$BDB_SAVE_LDFLAGS
+])
+
+AC_DEFUN([CYRUS_BERKELEY_DB_OPTS],
+[
+AC_ARG_WITH(bdb-libdir,
+ [ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR],
+ with_bdb_lib=$withval,
+ [ test "${with_bdb_lib+set}" = set || with_bdb_lib=none])
+AC_ARG_WITH(bdb-incdir,
+ [ --with-bdb-incdir=DIR Berkeley DB include files are in DIR],
+ with_bdb_inc=$withval,
+ [ test "${with_bdb_inc+set}" = set || with_bdb_inc=none ])
+])
+
+AC_DEFUN([CYRUS_BERKELEY_DB_CHK],
+[
+ AC_REQUIRE([CYRUS_BERKELEY_DB_OPTS])
+
+ cmu_save_CPPFLAGS=$CPPFLAGS
+
+ if test -d $with_bdb_inc; then
+ CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
+ BDB_INCADD="-I$with_bdb_inc"
+ else
+ BDB_INCADD=""
+ fi
+
+ dnl Note that FreeBSD puts it in a wierd place
+ dnl (but they should use with-bdb-incdir)
+ AC_CHECK_HEADER(db.h,
+ [CYRUS_BERKELEY_DB_CHK_LIB()],
+ dblib="no")
+
+ CPPFLAGS=$cmu_save_CPPFLAGS
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/bsd_sockets.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/bsd_sockets.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/bsd_sockets.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/bsd_sockets.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,39 @@
+dnl bsd_sockets.m4--which socket libraries do we need?
+dnl Derrick Brashear
+dnl from Zephyr
+dnl $Id: bsd_sockets.m4,v 1.9.4.1 2006/05/23 13:27:15 murch Exp $
+
+dnl Hacked on by Rob Earhart to not just toss stuff in LIBS
+dnl It now puts everything required for sockets into LIB_SOCKET
+
+AC_DEFUN([CMU_SOCKETS], [
+ save_LIBS="$LIBS"
+ LIB_SOCKET=""
+ AC_CHECK_FUNC(connect, :,
+ AC_CHECK_LIB(nsl, gethostbyname,
+ LIB_SOCKET="-lnsl $LIB_SOCKET")
+ AC_CHECK_LIB(socket, connect,
+ LIB_SOCKET="-lsocket $LIB_SOCKET")
+ )
+ LIBS="$LIB_SOCKET $save_LIBS"
+ AC_CHECK_FUNC(res_search, :,
+ LIBS="-lresolv $LIB_SOCKET $save_LIBS"
+ AC_TRY_LINK([[
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#ifdef HAVE_ARPA_NAMESER_COMPAT_H
+#include <arpa/nameser_compat.h>
+#endif
+#include <resolv.h>]],[[
+const char host[12]="openafs.org";
+u_char ans[1024];
+res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
+return 0;
+]], LIB_SOCKET="-lresolv $LIB_SOCKET")
+ )
+ LIBS="$LIB_SOCKET $save_LIBS"
+ AC_CHECK_FUNCS(dn_expand dns_lookup)
+ LIBS="$save_LIBS"
+ AC_SUBST(LIB_SOCKET)
+ ])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-attribute.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-attribute.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-attribute.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-attribute.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,31 @@
+dnl
+dnl $Id: c-attribute.m4,v 1.3 2003/10/08 20:35:24 rjs3 Exp $
+dnl
+
+dnl
+dnl Test for __attribute__
+dnl
+
+AC_DEFUN([CMU_C___ATTRIBUTE__], [
+AC_MSG_CHECKING(for __attribute__)
+AC_CACHE_VAL(ac_cv___attribute__, [
+AC_TRY_COMPILE([
+#include <stdlib.h>
+],
+[
+static void foo(void) __attribute__ ((noreturn));
+
+static void
+foo(void)
+{
+ exit(1);
+}
+],
+ac_cv___attribute__=yes,
+ac_cv___attribute__=no)])
+if test "$ac_cv___attribute__" = "yes"; then
+ AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
+fi
+AC_MSG_RESULT($ac_cv___attribute__)
+])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-fpic.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-fpic.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-fpic.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/c-fpic.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,35 @@
+dnl
+dnl $Id: c-fpic.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
+dnl
+
+dnl
+dnl Test for -fPIC
+dnl
+
+AC_DEFUN([CMU_C_FPIC], [
+AC_MSG_CHECKING(if compiler supports -fPIC)
+AC_CACHE_VAL(ac_cv_fpic, [
+save_CFLAGS=$CFLAGS
+CFLAGS="${CFLAGS} -fPIC"
+AC_TRY_COMPILE([
+#include <stdlib.h>
+],
+[
+static void
+foo(void)
+{
+ exit(1);
+}
+],
+ac_cv_fpic=yes,
+ac_cv_fpic=no)
+CFLAGS=$save_CFLAGS
+])
+if test "$ac_cv_fpic" = "yes"; then
+ FPIC_CFLAGS="-fPIC"
+else
+ FPIC_CFLAGS=""
+fi
+AC_MSG_RESULT($ac_cv_fpic)
+])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/clamav.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/clamav.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/clamav.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/clamav.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,35 @@
+dnl
+dnl macros for configure.in to detect clamav library
+dnl $Id: clamav.m4,v 1.2.2.1 2006/05/23 13:27:15 murch Exp $
+dnl
+
+AC_DEFUN([CMU_CLAMAV], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(clamav,[ --with-clamav=PATH use ClamAV - PATH to clamav-config (yes)],
+ with_clamav=$withval, with_clamav=yes)
+ have_clamav=no
+ if test "$with_clamav" != no; then
+
+ if test -d $with_clamav; then
+ clamav_path=${with_clamav}:${with_clamav}/bin
+ else
+ clamav_path=/usr/local/bin:/usr/bin:$PATH
+ fi
+ AC_PATH_PROG(CLAMAV_CONFIG,clamav-config,,[$clamav_path])
+
+ if test -x "$CLAMAV_CONFIG"; then
+ LIB_CLAMAV="`$CLAMAV_CONFIG --libs` -lclamav"
+ CFLAGS_CLAMAV=`$CLAMAV_CONFIG --cflags`
+
+ if test -n "$LIB_CLAMAV"; then
+ have_clamav=yes
+ test -n "$CFLAGS_CLAMAV" && CPPFLAGS="$CPPFLAGS $CFLAGS_CLAMAV"
+ AC_DEFINE(HAVE_CLAMAV,[],[Do we have ClamAV?])
+ AC_SUBST(LIB_CLAMAV)
+ fi
+ fi
+ fi
+
+ AC_MSG_CHECKING(ClamAV support)
+ AC_MSG_RESULT($have_clamav)
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,28 @@
+dnl com_err.m4--com_err detection macro
+dnl Rob Earhart
+dnl $Id: com_err.m4,v 1.6 2003/10/08 20:35:24 rjs3 Exp $
+
+AC_DEFUN([CMU_COMERR], [
+ cmu_need_compile_et=no
+ AC_CHECK_PROGS(COMPILE_ET, compile_et, no)
+ if test "$COMPILE_ET" = no; then
+ COMPILE_ET="\$(top_builddir)/com_err/compile_et"
+ cmu_need_to_compile_com_err=yes
+ fi
+ AC_CHECK_HEADER(com_err.h,,CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/com_err")
+ cmu_save_LIBS="$LIBS"
+ AC_CHECK_LIB(com_err, com_err,
+ LIB_COMERR="-lcom_err",
+ LDFLAGS="$LDFLAGS -L`pwd`/com_err"
+ LIB_COMERR="\$(top_builddir)/com_err/libcom_err.la"
+ cmu_need_to_compile_com_err=yes)
+ AC_SUBST(LIB_COMERR)
+ LIBS="$cmu_save_LIBS"
+ AC_MSG_CHECKING(whether we need to compile com_err)
+ if test "$cmu_need_to_compile_com_err" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_CONFIG_SUBDIRS(com_err)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ ])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err_link.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err_link.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err_link.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/com_err_link.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,157 @@
+dnl damnit, i don't want to figure out if I need to build an integral com_err
+dnl library with the collection, I just want to know where it's installed,
+dnl so don't bitch, Rob...
+dnl Derrick Brashear
+dnl $Id: com_err_link.m4,v 1.7.4.1 2006/05/23 13:27:15 murch Exp $
+
+
+AC_DEFUN([CMU_COMERR_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <com_err.h>],
+[int foo;],
+ac_cv_found_com_err_inc=yes,
+ac_cv_found_com_err_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_COMERR_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for com_err headers in $i)
+ CMU_COMERR_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, com_err)
+ if test "$ac_cv_found_com_err_inc" = "yes"; then
+ ac_cv_comerr_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+#
+# Test for lib files
+#
+
+AC_DEFUN([CMU_COMERR_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lcom_err"
+AC_TRY_LINK(,
+[com_err();],
+[ac_cv_found_com_err_lib=yes],
+ac_cv_found_com_err_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_COMERR_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for com_err libraries in $i)
+ CMU_COMERR_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, com_err)
+ if test "$ac_cv_found_com_err_lib" = "yes" ; then
+ ac_cv_comerr_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_USE_COMERR], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(comerr,
+ [ --with-comerr=PREFIX Compile with com_err support],
+ [if test "X$with_comerr" = "X"; then
+ with_comerr=yes
+ fi])
+AC_ARG_WITH(comerr-lib,
+ [ --with-comerr-lib=dir use com_err libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-comerr-lib])
+ fi])
+AC_ARG_WITH(comerr-include,
+ [ --with-comerr-include=dir use com_err headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-comerr-include])
+ fi])
+
+ if test "X$with_comerr" != "X"; then
+ if test "$with_comerr" != "yes"; then
+ ac_cv_comerr_where_lib=$with_comerr/$CMU_LIB_SUBDIR
+ ac_cv_comerr_where_inc=$with_comerr/include
+ fi
+ fi
+
+ if test "X$with_comerr_lib" != "X"; then
+ ac_cv_comerr_where_lib=$with_comerr_lib
+ fi
+ if test "X$ac_cv_comerr_where_lib" = "X"; then
+ CMU_COMERR_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_comerr_include" != "X"; then
+ ac_cv_comerr_where_inc=$with_comerr_include
+ fi
+ if test "X$ac_cv_comerr_where_inc" = "X"; then
+ CMU_COMERR_INC_WHERE(/usr/athena/include /usr/local/include)
+ fi
+
+ AC_MSG_CHECKING(whether to include com_err)
+ if test "X$ac_cv_comerr_where_lib" = "X" -a "X$ac_cv_comerr_where_inc" = "X"; then
+ ac_cv_found_com_err=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_com_err=yes
+ AC_MSG_RESULT(yes)
+ COMERR_INC_DIR=$ac_cv_comerr_where_inc
+ COMERR_LIB_DIR=$ac_cv_comerr_where_lib
+ test "$COMERR_INC_DIR" && COMERR_INC_FLAGS="-I${COMERR_INC_DIR}"
+ COMERR_LIB_FLAGS="-lcom_err"
+ test "$COMERR_LIB_DIR" && COMERR_LIB_FLAGS="-L${COMERR_LIB_DIR} -lcom_err"
+ dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
+ dnl Allow makefile substitutions....
+ AC_SUBST(COMERR_INC_FLAGS)
+ AC_SUBST(COMERR_LIB_FLAGS)
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${COMERR_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${COMERR_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${COMERR_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${COMERR_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${COMERR_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${COMERR_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${COMERR_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${COMERR_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${COMERR_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/common.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/common.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/common.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/common.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,61 @@
+dnl $Id: common.m4,v 1.11.4.1 2006/05/23 13:27:16 murch Exp $
+
+AC_DEFUN([CMU_TEST_LIBPATH], [
+changequote(<<, >>)
+define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>))
+changequote([, ])
+if test "$CMU_AC_CV_FOUND" = "yes"; then
+ if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl" -a \! -r "$1/lib$2.dylib"; then
+ CMU_AC_CV_FOUND=no
+ fi
+fi
+])
+
+AC_DEFUN([CMU_TEST_INCPATH], [
+changequote(<<, >>)
+define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_inc, [ *], [_p]))
+changequote([, ])
+if test "$CMU_AC_CV_FOUND" = "yes"; then
+ if test \! -r "$1/$2.h"; then
+ CMU_AC_CV_FOUND=no
+ fi
+fi
+])
+
+dnl CMU_CHECK_HEADER_NOCACHE(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+AC_DEFUN([CMU_CHECK_HEADER_NOCACHE],
+[dnl Do the transliteration at runtime so arg 1 can be a shell variable.
+ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING([for $1])
+AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
+ eval "ac_cv_header_$ac_safe=no")
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no)
+ifelse([$3], , , [$3
+])dnl
+fi
+])
+
+AC_DEFUN([CMU_FIND_LIB_SUBDIR],
+[dnl
+AC_ARG_WITH([lib-subdir], AC_HELP_STRING([--with-lib-subdir=DIR],[Find libraries in DIR instead of lib]))
+AC_CHECK_SIZEOF(long)
+AC_CACHE_CHECK([what directory libraries are found in], [ac_cv_cmu_lib_subdir],
+[test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
+test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
+if test "X$with_lib_subdir" = "X" ; then
+ ac_cv_cmu_lib_subdir=lib
+ if test $ac_cv_sizeof_long -eq 4 ; then
+ test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
+ fi
+ if test $ac_cv_sizeof_long -eq 8 ; then
+ test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
+ fi
+else
+ ac_cv_cmu_lib_subdir=$with_lib_subdir
+fi])
+AC_SUBST(CMU_LIB_SUBDIR, $ac_cv_cmu_lib_subdir)
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/cyrus.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/cyrus.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/cyrus.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/cyrus.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,45 @@
+dnl
+dnl Additional macros for configure.in packaged up for easier theft.
+dnl $Id: cyrus.m4,v 1.4 2003/10/08 20:35:24 rjs3 Exp $
+dnl tjs at andrew.cmu.edu 6-may-1998
+dnl
+
+dnl It would be good if ANDREW_ADD_LIBPATH could detect if something was
+dnl already there and not redundantly add it if it is.
+
+dnl add -L(arg), and possibly (runpath switch)(arg), to LDFLAGS
+dnl (so the runpath for shared libraries is set).
+AC_DEFUN([CMU_ADD_LIBPATH], [
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L$1 ${LDFLAGS}"
+ else
+ LDFLAGS="-L$1 $andrew_runpath_switch$1 ${LDFLAGS}"
+ fi
+])
+
+dnl add -L(1st arg), and possibly (runpath switch)(1st arg), to (2nd arg)
+dnl (so the runpath for shared libraries is set).
+AC_DEFUN([CMU_ADD_LIBPATH_TO], [
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ $2="-L$1 ${$2}"
+ else
+ $2="-L$1 ${$2} $andrew_runpath_switch$1"
+ fi
+])
+
+dnl runpath initialization
+AC_DEFUN([CMU_GUESS_RUNPATH_SWITCH], [
+ # CMU GUESS RUNPATH SWITCH
+ AC_CACHE_CHECK(for runpath switch, andrew_runpath_switch, [
+ # first, try -R
+ SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-R /usr/lib"
+ AC_TRY_LINK([],[],[andrew_runpath_switch="-R"], [
+ LDFLAGS="-Wl,-rpath,/usr/lib"
+ AC_TRY_LINK([],[],[andrew_runpath_switch="-Wl,-rpath,"],
+ [andrew_runpath_switch="none"])
+ ])
+ LDFLAGS="${SAVE_LDFLAGS}"
+ ])])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/db.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/db.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/db.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/db.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,46 @@
+dnl $Id: db.m4,v 1.1.24.2 2006/05/23 13:27:16 murch Exp $
+dnl
+dnl tests for various db libraries
+dnl
+AC_DEFUN([rk_DB],[berkeley_db=db
+AC_ARG_WITH(berkeley-db,
+[ --without-berkeley-db if you don't want berkeley db],[
+if test "$withval" = no; then
+ berkeley_db=""
+fi
+])
+if test "$berkeley_db"; then
+ AC_CHECK_HEADERS([ \
+ db.h \
+ db_185.h \
+ ])
+fi
+
+AC_FIND_FUNC_NO_LIBS2(dbopen, $berkeley_db, [
+#include <stdio.h>
+#if defined(HAVE_DB_185_H)
+#include <db_185.h>
+#elif defined(HAVE_DB_H)
+#include <db.h>
+#endif
+],[NULL, 0, 0, 0, NULL])
+
+AC_FIND_FUNC_NO_LIBS(dbm_firstkey, $berkeley_db gdbm ndbm)
+AC_FIND_FUNC_NO_LIBS2(db_create, $berkeley_db, [
+#include <stdio.h>
+#if defined(HAVE_DB_H)
+#include <db.h>
+#endif
+],[NULL, NULL, 0])
+
+
+DBLIB="$LIB_dbopen"
+if test "$LIB_dbopen" != "$LIB_db_create"; then
+ DBLIB="$DBLIB $LIB_db_create"
+fi
+if test "$LIB_dbopen" != "$LIB_dbm_firstkey"; then
+ DBLIB="$DBLIB $LIB_dbm_firstkey"
+fi
+AC_SUBST(DBLIB)dnl
+
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9 @@
+dnl $Id: find-func-no-libs.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
+dnl
+dnl
+dnl Look for function in any of the specified libraries
+dnl
+
+dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args)
+AC_DEFUN([AC_FIND_FUNC_NO_LIBS], [
+AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs2.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs2.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs2.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func-no-libs2.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,61 @@
+dnl $Id: find-func-no-libs2.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
+dnl
+dnl
+dnl Look for function in any of the specified libraries
+dnl
+
+dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
+AC_DEFUN([AC_FIND_FUNC_NO_LIBS2], [
+
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(ac_cv_funclib_$1,
+[
+if eval "test \"\$ac_cv_func_$1\" != yes" ; then
+ ac_save_LIBS="$LIBS"
+ for ac_lib in $2; do
+ if test -n "$ac_lib"; then
+ ac_lib="-l$ac_lib"
+ else
+ ac_lib=""
+ fi
+ LIBS="$6 $ac_lib $5 $ac_save_LIBS"
+ AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
+ done
+ eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
+ LIBS="$ac_save_LIBS"
+fi
+])
+
+eval "ac_res=\$ac_cv_funclib_$1"
+
+if false; then
+ AC_CHECK_FUNCS($1)
+dnl AC_CHECK_LIBS($2, foo)
+fi
+# $1
+ac_tr_func=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ac_tr_lib=HAVE_LIB_`echo $ac_res |sed 's/-l//' | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+eval "LIB_$1=$ac_res"
+
+case "$ac_res" in
+ yes)
+ eval "ac_cv_func_$1=yes"
+ eval "LIB_$1="
+ AC_DEFINE_UNQUOTED($ac_tr_func)
+ AC_MSG_RESULT([yes])
+ ;;
+ no)
+ eval "ac_cv_func_$1=no"
+ eval "LIB_$1="
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ eval "ac_cv_func_$1=yes"
+ eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
+ AC_DEFINE_UNQUOTED($ac_tr_func)
+ AC_DEFINE_UNQUOTED($ac_tr_lib)
+ AC_MSG_RESULT([yes, in $ac_res])
+ ;;
+esac
+AC_SUBST(LIB_$1)
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/find-func.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9 @@
+dnl $Id: find-func.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
+dnl
+dnl AC_FIND_FUNC(func, libraries, includes, arguments)
+AC_DEFUN([AC_FIND_FUNC], [
+AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
+if test -n "$LIB_$1"; then
+ LIBS="$LIB_$1 $LIBS"
+fi
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/heimdal.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/heimdal.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/heimdal.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/heimdal.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,197 @@
+dnl kerberos_v5.m4--Kerberos 5 libraries and includes
+dnl Derrick Brashear
+dnl from KTH krb and Arla
+dnl $Id: heimdal.m4,v 1.7.4.2 2006/05/23 13:27:16 murch Exp $
+
+AC_DEFUN([CMU_LIBHEIMDAL_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <krb5.h>],
+[krb5_keyblock foo;],
+ac_cv_found_libheimdal_inc=yes,
+ac_cv_found_libheimdal_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_LIBHEIMDAL_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for heimdal headers in $i)
+ CMU_LIBHEIMDAL_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, krb5)
+ if test "$ac_cv_found_libheimdal_inc" = "yes"; then
+ ac_cv_libheimdal_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+#
+# Test for kerberos lib files
+#
+
+AC_DEFUN([CMU_LIBHEIMDAL_LIB_WHERE1], [
+AC_REQUIRE([CMU_SOCKETS])
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lkadm5clnt -lkrb5 -lasn1 -lkadm5clnt -lroken $LIB_SOCKET"
+AC_TRY_LINK(,
+[krb5_get_in_tkt();],
+[ac_cv_found_libheimdal_lib=yes],
+ac_cv_found_libheimdal_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_LIBHEIMDAL_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for heimdal libraries in $i)
+ CMU_LIBHEIMDAL_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, krb5)
+ if test "$ac_cv_found_libheimdal_lib" = "yes" ; then
+ ac_cv_libheimdal_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LIBHEIMDAL_LIBDES], [
+ AC_REQUIRE([CMU_LIBSSL])
+ cmu_save_LIBS=$LIBS
+ AC_MSG_CHECKING([if libdes is needed])
+ AC_TRY_LINK([],[des_quad_cksum();],HEIM_DES_LIB="",HEIM_DES_LIB="maybe")
+ if test "X$HEIM_DES_LIB" != "X"; then
+ LIBS="$cmu_save_LIBS -L$1 -ldes"
+ AC_TRY_LINK([], [des_quad_cksum();],HEIM_DES_LIB="yes")
+ if test "X$HEIM_DES_LIB" = "Xyes"; then
+ AC_MSG_RESULT([yes])
+ HEIM_LIBDES="-ldes"
+ HEIM_LIBDESA="$1/libdes.a"
+ else
+ LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],HEIM_DES_LIB="libcrypto")
+ if test "X$HEIM_DES_LIB" = "Xlibcrypto"; then
+ AC_MSG_RESULT([libcrypto])
+ HEIM_LIBDES="$LIBSSL_LIB_FLAGS"
+ HEIM_LIBDESA="$LIBSSL_LIB_FLAGS"
+ else
+ LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],HEIM_DES_LIB="libcrypto+descompat")
+ if test "X$HEIM_DES_LIB" = "Xlibcrypto+descompat"; then
+ AC_MSG_RESULT([libcrypto+descompat])
+ HEIM_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ HEIM_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Could not use -ldes])
+ fi
+ fi
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+])
+
+AC_DEFUN([CMU_LIBHEIMDAL], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_USE_COMERR])
+AC_ARG_WITH(LIBHEIMDAL,
+ [ --with-libheimdal=PREFIX Compile with Heimdal support],
+ [if test "X$with_libheimdal" = "X"; then
+ with_libheimdal=yes
+ fi])
+AC_ARG_WITH(libheimdal-lib,
+ [ --with-libheimdal-lib=dir use heimdal libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libheimdal-lib])
+ fi])
+AC_ARG_WITH(libheimdal-include,
+ [ --with-libheimdal-include=dir use heimdal headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libheimdal-include])
+ fi])
+
+ if test "X$with_libheimdal" != "X"; then
+ if test "$with_libheimdal" != "yes" -a "$with_libheimdal" != "no"; then
+ ac_cv_libheimdal_where_lib=$with_libheimdal/$CMU_LIB_SUBDIR
+ ac_cv_libheimdal_where_inc=$with_libheimdal/include
+ fi
+ fi
+
+ if test "$with_libheimdal" != "no"; then
+ if test "X$with_libheimdal_lib" != "X"; then
+ ac_cv_libheimdal_where_lib=$with_libheimdal_lib
+ fi
+ if test "X$ac_cv_libheimdal_where_lib" = "X"; then
+ CMU_LIBHEIMDAL_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/heimdal/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_libheimdal_include" != "X"; then
+ ac_cv_libheimdal_where_inc=$with_libheimdal_include
+ fi
+ if test "X$ac_cv_libheimdal_where_inc" = "X"; then
+ CMU_LIBHEIMDAL_INC_WHERE(/usr/athena/include /usr/heimdal/include /usr/local/include)
+ fi
+ fi
+
+ AC_MSG_CHECKING(whether to include heimdal)
+ if test "X$ac_cv_libheimdal_where_lib" = "X" -a "X$ac_cv_libheimdal_where_inc" = "X"; then
+ ac_cv_found_libheimdal=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_libheimdal=yes
+ AC_MSG_RESULT(yes)
+ LIBHEIMDAL_INC_DIR=$ac_cv_libheimdal_where_inc
+ LIBHEIMDAL_LIB_DIR=$ac_cv_libheimdal_where_lib
+ CMU_LIBHEIMDAL_LIBDES($LIBHEIMDAL_LIB_DIR)
+ LIBHEIMDAL_INC_FLAGS="-I${LIBHEIMDAL_INC_DIR}"
+ LIBHEIMDAL_LIB_FLAGS="-L${LIBHEIMDAL_LIB_DIR} -lkadm5clnt -lkrb5 -lasn1 ${HEIM_LIBDES} -lroken $LIB_SOCKET"
+ AC_SUBST(LIBHEIMDAL_INC_FLAGS)
+ AC_SUBST(LIBHEIMDAL_LIB_FLAGS)
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBHEIMDAL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${LIBHEIMDAL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBHEIMDAL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${LIBHEIMDAL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${LIBHEIMDAL_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/init_automake.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/init_automake.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/init_automake.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/init_automake.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,8 @@
+dnl init_automake.m4--cmulocal automake setup macro
+dnl Rob Earhart
+dnl $Id: init_automake.m4,v 1.4 2003/10/08 20:35:24 rjs3 Exp $
+
+AC_DEFUN([CMU_INIT_AUTOMAKE], [
+ AC_REQUIRE([AM_INIT_AUTOMAKE])
+ ACLOCAL="$ACLOCAL -I \$(top_srcdir)/cmulocal"
+ ])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ipv6.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ipv6.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ipv6.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ipv6.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,111 @@
+dnl See whether we can use IPv6 related functions
+dnl contributed by Hajimu UMEMOTO
+
+AC_DEFUN([IPv6_CHECK_FUNC], [
+AC_CHECK_FUNC($1, [dnl
+ ac_cv_lib_socket_$1=no
+ ac_cv_lib_inet6_$1=no
+], [dnl
+ AC_CHECK_LIB(socket, $1, [dnl
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_$1=no
+ ], [dnl
+ AC_MSG_CHECKING([whether your system has IPv6 directory])
+ AC_CACHE_VAL(ipv6_cv_dir, [dnl
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done])dnl
+ AC_MSG_RESULT($ipv6_cv_dir)
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_$1=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ AC_CHECK_LIB(inet6, $1, [dnl
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi],)dnl
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi])dnl
+])dnl
+ipv6_cv_$1=no
+if test $ac_cv_func_$1 = yes -o $ac_cv_lib_socket_$1 = yes \
+ -o $ac_cv_lib_inet6_$1 = yes
+then
+ ipv6_cv_$1=yes
+fi
+if test $ipv6_cv_$1 = no; then
+ if test $1 = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ AC_EGREP_HEADER(${ipv6_cv_pfx}$1, netdb.h,
+ [AC_CHECK_FUNC(${ipv6_cv_pfx}$1)])
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}$1 = Xyes; then
+ AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?])
+ ipv6_cv_$1=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_$1 = yes; then
+ ifelse([$2], , :, [$2])
+else
+ ifelse([$3], , :, [$3])
+fi])
+
+
+dnl See whether we have ss_family in sockaddr_storage
+AC_DEFUN([IPv6_CHECK_SS_FAMILY], [
+AC_MSG_CHECKING([whether you have ss_family in struct sockaddr_storage])
+AC_CACHE_VAL(ipv6_cv_ss_family, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>],
+ [struct sockaddr_storage ss; int i = ss.ss_family;],
+ [ipv6_cv_ss_family=yes], [ipv6_cv_ss_family=no])])dnl
+if test $ipv6_cv_ss_family = yes; then
+ ifelse([$1], , AC_DEFINE(HAVE_SS_FAMILY,[],[Is there an ss_family in sockaddr_storage?]), [$1])
+else
+ ifelse([$2], , :, [$2])
+fi
+AC_MSG_RESULT($ipv6_cv_ss_family)])
+
+
+dnl whether you have sa_len in struct sockaddr
+AC_DEFUN([IPv6_CHECK_SA_LEN], [
+AC_MSG_CHECKING([whether you have sa_len in struct sockaddr])
+AC_CACHE_VAL(ipv6_cv_sa_len, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>],
+ [struct sockaddr sa; int i = sa.sa_len;],
+ [ipv6_cv_sa_len=yes], [ipv6_cv_sa_len=no])])dnl
+if test $ipv6_cv_sa_len = yes; then
+ ifelse([$1], , AC_DEFINE(HAVE_SOCKADDR_SA_LEN,[],[Does sockaddr have an sa_len?]), [$1])
+else
+ ifelse([$2], , :, [$2])
+fi
+AC_MSG_RESULT($ipv6_cv_sa_len)])
+
+
+dnl See whether sys/socket.h has socklen_t
+AC_DEFUN([IPv6_CHECK_SOCKLEN_T], [
+AC_MSG_CHECKING(for socklen_t)
+AC_CACHE_VAL(ipv6_cv_socklen_t, [dnl
+AC_TRY_LINK([#include <sys/types.h>
+#include <sys/socket.h>],
+ [socklen_t len = 0;],
+ [ipv6_cv_socklen_t=yes], [ipv6_cv_socklen_t=no])])dnl
+if test $ipv6_cv_socklen_t = yes; then
+ ifelse([$1], , AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?]), [$1])
+else
+ ifelse([$2], , :, [$2])
+fi
+AC_MSG_RESULT($ipv6_cv_socklen_t)])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kafs.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kafs.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kafs.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kafs.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,167 @@
+dnl kerberos_v4.m4--Kafs libraries and includes
+dnl Derrick Brashear
+dnl from KTH kafs and Arla
+dnl $Id: kafs.m4,v 1.6.4.1 2006/05/23 13:27:16 murch Exp $
+
+AC_DEFUN([CMU_KAFS_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([
+#include <krb.h>
+#include <sys/ioctl.h>
+#include <kafs.h>
+],
+[struct ClearToken foo;],
+ac_cv_found_kafs_inc=yes,
+ac_cv_found_kafs_inc=no)
+if test "$ac_cv_found_kafs_inc" = "no"; then
+ CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV"
+ AC_TRY_COMPILE([
+#include <krb.h>
+#include <sys/ioctl.h>
+#include <kafs.h>
+],
+ [struct ClearToken foo;],
+ [ac_cv_found_kafs_inc=yes],
+ ac_cv_found_kafs_inc=no)
+fi
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_KAFS_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for kafs headers in $i)
+ CMU_KAFS_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, kafs)
+ if test "$ac_cv_found_kafs_inc" = "yes"; then
+ ac_cv_kafs_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_KAFS_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lkafs $KRB_LIB_FLAGS $KRB5_LIB_FLAGS"
+AC_TRY_LINK(,
+[krb_afslog();],
+[ac_cv_found_kafs_lib=yes],
+ac_cv_found_kafs_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_KAFS_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for kafs libraries in $i)
+ CMU_KAFS_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, kafs)
+ if test "$ac_cv_found_kafs_lib" = "yes" ; then
+ ac_cv_kafs_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_KAFS], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_KRB4])
+AC_REQUIRE([CMU_KRB5])
+AC_ARG_WITH(kafs,
+ [ --with-kafs=PREFIX Compile with Kafs support],
+ [if test "X$with_kafs" = "X"; then
+ with_kafs=yes
+ fi])
+AC_ARG_WITH(kafs-lib,
+ [ --with-kafs-lib=dir use kafs libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-kafs-lib])
+ fi])
+AC_ARG_WITH(kafs-include,
+ [ --with-kafs-include=dir use kafs headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-kafs-include])
+ fi])
+
+ if test "X$with_kafs" != "X"; then
+ if test "$with_kafs" != "yes" -a "$with_kafs" != no; then
+ ac_cv_kafs_where_lib=$with_kafs/$CMU_LIB_SUBDIR
+ ac_cv_kafs_where_inc=$with_kafs/include
+ fi
+ fi
+
+ if test "$with_kafs" != "no"; then
+ if test "X$with_kafs_lib" != "X"; then
+ ac_cv_kafs_where_lib=$with_kafs_lib
+ fi
+ if test "X$ac_cv_kafs_where_lib" = "X"; then
+ CMU_KAFS_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_kafs_include" != "X"; then
+ ac_cv_kafs_where_inc=$with_kafs_include
+ fi
+ if test "X$ac_cv_kafs_where_inc" = "X"; then
+ CMU_KAFS_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos)
+ fi
+ fi
+
+ AC_MSG_CHECKING(whether to include kafs)
+ if test "X$ac_cv_kafs_where_lib" = "X" -a "X$ac_cv_kafs_where_inc" = "X"; then
+ ac_cv_found_kafs=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_kafs=yes
+ AC_MSG_RESULT(yes)
+ KAFS_INC_DIR=$ac_cv_kafs_where_inc
+ KAFS_LIB_DIR=$ac_cv_kafs_where_lib
+ KAFS_INC_FLAGS="-I${KAFS_INC_DIR}"
+ KAFS_LIB_FLAGS="-L${KAFS_LIB_DIR} -lkafs"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${KAFS_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KAFS_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${KAFS_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KAFS_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${KAFS_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KAFS_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${KAFS_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KAFS_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${KAFS_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v4.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v4.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v4.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v4.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,285 @@
+dnl kerberos_v4.m4--Kerberos 4 libraries and includes
+dnl Derrick Brashear
+dnl from KTH krb and Arla
+dnl $Id: kerberos_v4.m4,v 1.26.4.2 2006/05/23 13:27:17 murch Exp $
+
+AC_DEFUN([CMU_KRB_SENDAUTH_PROTO], [
+AC_MSG_CHECKING(for krb_sendauth prototype)
+AC_TRY_COMPILE(
+[#include <krb.h>
+int krb_sendauth (long options, int fd, KTEXT ktext, char *service,
+ char *inst, char *realm, u_long checksum,
+ MSG_DAT *msg_data, CREDENTIALS *cred,
+ Key_schedule schedule, struct sockaddr_in *laddr,
+ struct sockaddr_in *faddr, char *version);],
+[int foo = krb_sendauth(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); ],
+ac_cv_krb_sendauth_proto=no,
+ac_cv_krb_sendauth_proto=yes)
+AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
+if test "$ac_cv_krb_sendauth_proto" = yes; then
+ AC_DEFINE(HAVE_KRB_SENDAUTH_PROTO)dnl
+fi
+AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
+])
+
+AC_DEFUN([CMU_KRB_SET_KEY_PROTO], [
+AC_MSG_CHECKING(for krb_set_key prototype)
+AC_CACHE_VAL(ac_cv_krb_set_key_proto, [
+cmu_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
+AC_TRY_COMPILE(
+[#include <krb.h>
+int krb_set_key(char *key, int cvt);],
+[int foo = krb_set_key(0, 0);],
+ac_cv_krb_set_key_proto=no,
+ac_cv_krb_set_key_proto=yes)
+])
+CPPFLAGS="${cmu_save_CPPFLAGS}"
+if test "$ac_cv_krb_set_key_proto" = yes; then
+ AC_DEFINE(HAVE_KRB_SET_KEY_PROTO)dnl
+fi
+AC_MSG_RESULT($ac_cv_krb_set_key_proto)
+])
+
+AC_DEFUN([CMU_KRB4_32_DEFN], [
+AC_MSG_CHECKING(for KRB4_32 definition)
+AC_CACHE_VAL(ac_cv_krb4_32_defn, [
+cmu_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
+AC_TRY_COMPILE(
+[#include <krb.h>
+],
+[KRB4_32 foo = 1;],
+ac_cv_krb4_32_defn=yes,
+ac_cv_krb4_32_defn=no)
+])
+CPPFLAGS="${cmu_save_CPPFLAGS}"
+if test "$ac_cv_krb4_32_defn" = yes; then
+ AC_DEFINE(HAVE_KRB4_32_DEFINE)dnl
+fi
+AC_MSG_RESULT($ac_cv_krb4_32_defn)
+])
+
+AC_DEFUN([CMU_KRB_RD_REQ_PROTO], [
+AC_MSG_CHECKING(for krb_rd_req prototype)
+AC_CACHE_VAL(ac_cv_krb_rd_req_proto, [
+cmu_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
+AC_TRY_COMPILE(
+[#include <krb.h>
+int krb_rd_req(KTEXT authent, char *service, char *instance,
+unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn);],
+[int foo = krb_rd_req(0,0,0,0,0,0);],
+ac_cv_krb_rd_req_proto=no,
+ac_cv_krb_rd_req_proto=yes)
+])
+CPPFLAGS="${cmu_save_CPPFLAGS}"
+if test "$ac_cv_krb_rd_req_proto" = yes; then
+ AC_DEFINE(HAVE_KRB_RD_REQ_PROTO)dnl
+fi
+AC_MSG_RESULT($ac_cv_krb_rd_req_proto)
+])
+
+AC_DEFUN([CMU_KRB_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <krb.h>],
+[struct ktext foo;],
+ac_cv_found_krb_inc=yes,
+ac_cv_found_krb_inc=no)
+if test "$ac_cv_found_krb_inc" = "no"; then
+ CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV"
+ AC_TRY_COMPILE([#include <krb.h>],
+ [struct ktext foo;],
+ [ac_cv_found_krb_inc=yes],
+ ac_cv_found_krb_inc=no)
+fi
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_KRB_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for kerberos headers in $i)
+ CMU_KRB_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, krb)
+ if test "$ac_cv_found_krb_inc" = "yes"; then
+ ac_cv_krb_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+#
+# Test for kerberos lib files
+#
+
+AC_DEFUN([CMU_KRB_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lkrb ${KRB_LIBDES}"
+AC_TRY_LINK(,
+[dest_tkt();],
+[ac_cv_found_krb_lib=yes],
+ac_cv_found_krb_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_KRB_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for kerberos libraries in $i)
+ CMU_KRB_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, krb)
+ if test "$ac_cv_found_krb_lib" = "yes" ; then
+ ac_cv_krb_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_KRB4], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_LIBSSL])
+AC_ARG_WITH(krb4,
+ [ --with-krb4=PREFIX Compile with Kerberos 4 support],
+ [if test "X$with_krb4" = "X"; then
+ with_krb4=yes
+ fi])
+AC_ARG_WITH(krb4-lib,
+ [ --with-krb4-lib=dir use kerberos 4 libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-krb4-lib])
+ fi])
+AC_ARG_WITH(krb4-include,
+ [ --with-krb4-include=dir use kerberos 4 headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-krb4-include])
+ fi])
+
+ if test "X$with_krb4" != "X"; then
+ if test "$with_krb4" != "yes" -a "$with_krb4" != "no"; then
+ ac_cv_krb_where_lib=$with_krb4/$CMU_LIB_SUBDIR
+ ac_cv_krb_where_inc=$with_krb4/include
+ fi
+ fi
+
+ if test "$with_krb4" != "no"; then
+ if test "X$with_krb4_lib" != "X"; then
+ ac_cv_krb_where_lib=$with_krb4_lib
+ fi
+ if test "X$with_krb4_include" != "X"; then
+ ac_cv_krb_where_inc=$with_krb4_include
+ fi
+ if test "X$ac_cv_krb_where_inc" = "X"; then
+ CMU_KRB_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos)
+ fi
+
+ AC_MSG_CHECKING([if libdes is needed])
+ AC_TRY_LINK([],[des_quad_cksum();],KRB_DES_LIB="",KRB_DES_LIB="maybe")
+ if test "X$KRB_DES_LIB" != "X"; then
+ LIBS="$cmu_save_LIBS -ldes"
+ AC_TRY_LINK([], [des_quad_cksum();],KRB_DES_LIB="yes")
+ if test "X$KRB_DES_LIB" = "Xyes"; then
+ AC_MSG_RESULT([yes])
+ KRB_LIBDES="-ldes"
+ KRB_LIBDESA='$(KRB_LIB_DIR)/libdes.a'
+ else
+ LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],KRB_DES_LIB="libcrypto")
+ if test "X$KRB_DES_LIB" = "Xlibcrypto"; then
+ AC_MSG_RESULT([libcrypto])
+ KRB_LIBDES="$LIBSSL_LIB_FLAGS"
+ KRB_LIBDESA="$LIBSSL_LIB_FLAGS"
+ else
+ LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ AC_TRY_LINK([],
+ [des_quad_cksum();],KRB_DES_LIB="libcrypto+descompat")
+ if test "X$KRB_DES_LIB" = "Xlibcrypto+descompat"; then
+ AC_MSG_RESULT([libcrypto+descompat])
+ KRB_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ KRB_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
+ else
+ AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([Could not use -ldes])
+ fi
+ fi
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+ if test "X$ac_cv_krb_where_lib" = "X"; then
+ CMU_KRB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
+ fi
+ fi
+ LIBS="${cmu_save_LIBS}"
+
+
+ AC_MSG_CHECKING([whether to include kerberos 4])
+ if test "X$ac_cv_krb_where_lib" = "X" -o "X$ac_cv_krb_where_inc" = "X"; then
+ ac_cv_found_krb=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_krb=yes
+ AC_MSG_RESULT(yes)
+ KRB_INC_DIR=$ac_cv_krb_where_inc
+ KRB_LIB_DIR=$ac_cv_krb_where_lib
+ KRB_INC_FLAGS="-I${KRB_INC_DIR}"
+ KRB_LIB_FLAGS="-L${KRB_LIB_DIR} -lkrb ${KRB_LIBDES}"
+ LIBS="${cmu_save_LIBS} ${KRB_LIB_FLAGS}"
+ AC_CHECK_LIB(resolv, dns_lookup, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lresolv",,"${KRB_LIB_FLAGS}")
+ AC_CHECK_LIB(crypt, crypt, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lcrypt",,"${KRB_LIB_FLAGS}")
+ LIBS="${LIBS} ${KRB_LIB_FLAGS}"
+ AC_CHECK_FUNCS(krb_get_int krb_life_to_time)
+ AC_SUBST(KRB_INC_FLAGS)
+ AC_SUBST(KRB_LIB_FLAGS)
+ LIBS="${cmu_save_LIBS}"
+ AC_DEFINE(HAVE_KRB4,,[Kerberos V4 is present])dnl zephyr uses this
+ AC_DEFINE(KERBEROS,,[Use kerberos 4. find out what needs this symbol])
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${KRB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${KRB_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${KRB_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v5.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v5.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v5.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/kerberos_v5.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,185 @@
+dnl kerberos_v5.m4--Kerberos 5 libraries and includes
+dnl Derrick Brashear
+dnl from KTH krb and Arla
+dnl $Id: kerberos_v5.m4,v 1.7.4.2 2006/05/23 13:27:17 murch Exp $
+
+AC_DEFUN([CMU_KRB5_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([#include <krb5.h>],
+[krb5_keyblock foo;],
+ac_cv_found_krb5_inc=yes,
+ac_cv_found_krb5_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_KRB5_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for krb5 headers in $i)
+ CMU_KRB5_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, krb5)
+ if test "$ac_cv_found_krb5_inc" = "yes"; then
+ ac_cv_krb5_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+#
+# Test for kerberos lib files
+#
+
+AC_DEFUN([CMU_KRB5_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lkrb5 -lk5crypto"
+AC_TRY_LINK(,
+[krb5_get_in_tkt();],
+[ac_cv_found_krb5_lib=yes],
+ac_cv_found_krb5_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_KRB5_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for krb5 libraries in $i)
+ CMU_KRB5_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, krb5)
+ if test "$ac_cv_found_krb5_lib" = "yes" ; then
+ ac_cv_krb5_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_KRB5], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_USE_COMERR])
+AC_ARG_WITH(krb5,
+ [ --with-krb5=PREFIX Compile with Kerberos 5 support],
+ [if test "X$with_krb5" = "X"; then
+ with_krb5=yes
+ fi])
+AC_ARG_WITH(krb5-lib,
+ [ --with-krb5-lib=dir use kerberos 5 libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-krb5-lib])
+ fi])
+AC_ARG_WITH(krb5-include,
+ [ --with-krb5-include=dir use kerberos 5 headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-krb5-include])
+ fi])
+AC_ARG_WITH(krb5-impl,
+ [ --with-krb5-impl=heimdal use heimdal kerberos 5 libraries
+ --with-krb5-impl=mit use MIT kerberos 5 libraries],
+ [if test "$withval" != "heimdal" -a "$withval" != "mit"; then
+ AC_MSG_ERROR([Invalid argument for --with-krb5-impl])
+ fi])
+
+ if test "X$with_krb5" != "X"; then
+ if test "$with_krb5" != "yes" -a "$with_krb5" != "no"; then
+ ac_cv_krb5_where_lib=$with_krb5/$CMU_LIB_SUBDIR
+ ac_cv_krb5_where_inc=$with_krb5/include
+ ac_cv_krb5_impl=mit
+ fi
+ fi
+
+ if test "$with_krb5" != "no"; then
+ if test "X$with_krb5_lib" != "X"; then
+ ac_cv_krb5_where_lib=$with_krb5_lib
+ ac_cv_krb5_impl=mit
+ fi
+ if test "X$with_krb5_impl" != "X"; then
+ ac_cv_krb5_impl=$with_krb5_impl
+ fi
+ if test "X$ac_cv_krb5_where_lib" = "X" -a "X$with_krb5_impl" != "Xheimdal"; then
+ CMU_KRB5_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ if test "X$ac_cv_krb5_where_lib" != "X"; then
+ ac_cv_krb5_impl=mit
+ fi
+ fi
+ if test "X$ac_cv_krb5_where_lib" = "X" -a "X$with_krb5_impl" != "Xmit"; then
+ CMU_LIBHEIMDAL_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/heimdal/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ if test "X$ac_cv_libheimdal_where_lib" != "X"; then
+ ac_cv_krb5_where_lib=$ac_cv_libheimdal_where_lib
+ ac_cv_krb5_impl=heimdal
+ fi
+ fi
+
+ if test "X$with_krb5_include" != "X"; then
+ ac_cv_krb5_where_inc=$with_krb5_include
+ fi
+ if test "X$ac_cv_krb5_where_inc" = "X"; then
+ CMU_KRB5_INC_WHERE(/usr/athena/include /usr/include/kerberos /usr/local/include /usr/include)
+ fi
+ fi
+
+ AC_MSG_CHECKING(whether to include kerberos 5)
+ if test "X$ac_cv_krb5_where_lib" = "X" -o "X$ac_cv_krb5_where_inc" = "X"; then
+ ac_cv_found_krb5=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_krb5=yes
+ AC_MSG_RESULT(yes)
+ KRB5_INC_DIR=$ac_cv_krb5_where_inc
+ KRB5_LIB_DIR=$ac_cv_krb5_where_lib
+ if test "X$ac_cv_krb5_impl" != "Xheimdal"; then
+ KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkrb5 -lk5crypto"
+ else
+ CMU_LIBHEIMDAL_LIBDES($KRB5_LIB_DIR)
+ KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkadm5clnt -lkrb5 -lasn1 ${HEIM_LIBDES} -lroken $LIB_SOCKET"
+ AC_DEFINE(HEIMDAL,,[we found heimdal krb5 and not MIT krb5])
+ fi
+ KRB5_INC_FLAGS="-I${KRB5_INC_DIR}"
+ AC_SUBST(KRB5_INC_FLAGS)
+ AC_SUBST(KRB5_LIB_FLAGS)
+ AC_DEFINE(HAVE_KRB5,,[Kerberos V5 is present])dnl zephyr uses this
+ AC_DEFINE(KRB5,,[Use Kerberos 5. (maybe find what needs this and nuke it)])
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${KRB5_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB5_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${KRB5_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB5_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${KRB5_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB5_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${KRB5_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${KRB5_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${KRB5_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libXau.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libXau.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libXau.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libXau.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,147 @@
+dnl $Id: libXau.m4,v 1.4.4.1 2006/05/23 13:27:17 murch Exp $
+
+AC_DEFUN([CMU_XAU_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE([
+#include <X11/Xauth.h>
+],
+[Xauth foo;],
+ac_cv_found_Xau_inc=yes,
+ac_cv_found_Xau_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_XAU_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for Xau headers in $i)
+ CMU_XAU_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, X11/Xauth)
+ if test "$ac_cv_found_Xau_inc" = "yes"; then
+ ac_cv_Xau_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_XAU_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lXau $LIB_SOCKET"
+AC_TRY_LINK(,
+[XauDisposeAuth();],
+[ac_cv_found_Xau_lib=yes],
+ac_cv_found_Xau_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_XAU_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for Xau libraries in $i)
+ CMU_XAU_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, Xau)
+ if test "$ac_cv_found_Xau_lib" = "yes" ; then
+ ac_cv_Xau_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_XAU], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_ARG_WITH(Xau,
+ [ --with-Xau=PREFIX Compile with Xau support],
+ [if test "X$with_Xau" = "X"; then
+ with_Xau=yes
+ fi])
+AC_ARG_WITH(Xau-lib,
+ [ --with-Xau-lib=dir use Xau libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-Xau-lib])
+ fi])
+AC_ARG_WITH(Xau-include,
+ [ --with-Xau-include=dir use Xau headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-Xau-include])
+ fi])
+
+ if test "X$with_Xau" != "X"; then
+ if test "$with_Xau" != "yes"; then
+ ac_cv_Xau_where_lib=$with_Xau/$CMU_LIB_SUBDIR
+ ac_cv_Xau_where_inc=$with_Xau/include
+ fi
+ fi
+
+ if test "X$with_Xau_lib" != "X"; then
+ ac_cv_Xau_where_lib=$with_Xau_lib
+ fi
+ if test "X$ac_cv_Xau_where_lib" = "X"; then
+ CMU_XAU_LIB_WHERE(/usr/X11R6/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/openwin/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_Xau_include" != "X"; then
+ ac_cv_Xau_where_inc=$with_Xau_include
+ fi
+ if test "X$ac_cv_Xau_where_inc" = "X"; then
+ CMU_XAU_INC_WHERE(/usr/X11R6/include /usr/local/include /usr/openwin/include)
+ fi
+
+ AC_MSG_CHECKING(whether to include Xau)
+ if test "X$ac_cv_Xau_where_lib" = "X" -a "X$ac_cv_Xau_where_inc" = "X"; then
+ ac_cv_found_Xau=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_Xau=yes
+ AC_MSG_RESULT(yes)
+ XAU_INC_DIR=$ac_cv_Xau_where_inc
+ XAU_LIB_DIR=$ac_cv_Xau_where_lib
+ XAU_INC_FLAGS="-I${XAU_INC_DIR}"
+ XAU_LIB_FLAGS="-L${XAU_LIB_DIR} -lXau"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${XAU_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${XAU_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${XAU_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${XAU_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${XAU_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${XAU_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${XAU_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${XAU_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${XAU_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libcyrus.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libcyrus.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libcyrus.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libcyrus.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,155 @@
+dnl libcyrus.m4--Cyrus libraries and includes
+dnl Derrick Brashear
+dnl from KTH kafs and Arla
+dnl $Id: libcyrus.m4,v 1.19.4.1 2006/05/23 13:27:17 murch Exp $
+
+AC_DEFUN([CMU_LIBCYRUS_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1 $SASLFLAGS"
+CMU_CHECK_HEADER_NOCACHE(cyrus/imclient.h,
+ac_cv_found_cyrus_inc=yes,
+ac_cv_found_cyrus_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_LIBCYRUS_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libcyrus headers in $i)
+ CMU_LIBCYRUS_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, imclient)
+ if test "$ac_cv_found_cyrus_inc" = "yes"; then
+ ac_cv_cyrus_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LIBCYRUS_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lcyrus ${LIB_SASL} ${LIBSSL_LIB_FLAGS} ${LIB_SOCKET}"
+AC_TRY_LINK([void fatal(){}],
+[imclient_authenticate();],
+[ac_cv_found_cyrus_lib=yes],
+ac_cv_found_cyrus_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_LIBCYRUS_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libcyrus libraries in $i)
+ CMU_LIBCYRUS_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, cyrus)
+ if test "$ac_cv_found_cyrus_lib" = "yes" ; then
+ ac_cv_cyrus_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LIBCYRUS], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_SASL2])
+AC_REQUIRE([CMU_LIBSSL])
+AC_ARG_WITH(libcyrus,
+ [ --with-libcyrus=PREFIX Compile with Libcyrus support],
+ [if test "X$with_libcyrus" = "X"; then
+ with_libcyrus=yes
+ fi])
+AC_ARG_WITH(libcyrus-lib,
+ [ --with-libcyrus-lib=dir use libcyrus libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libcyrus-lib])
+ fi])
+AC_ARG_WITH(libcyrus-include,
+ [ --with-libcyrus-include=dir use libcyrus headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libcyrus-include])
+ fi])
+
+ if test "X$with_libcyrus" != "X"; then
+ if test "$with_libcyrus" != "yes" -a "$with_libcyrus" != no; then
+ ac_cv_cyrus_where_lib=$with_libcyrus/$CMU_LIB_SUBDIR
+ ac_cv_cyrus_where_inc=$with_libcyrus/include
+ fi
+ fi
+
+ if test "$with_libcyrus" != "no"; then
+ if test "X$with_libcyrus_lib" != "X"; then
+ ac_cv_cyrus_where_lib=$with_libcyrus_lib
+ fi
+ if test "X$ac_cv_cyrus_where_lib" = "X"; then
+ CMU_LIBCYRUS_LIB_WHERE(/usr/cyrus/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_libcyrus_include" != "X"; then
+ ac_cv_cyrus_where_inc=$with_libcyrus_include
+ fi
+ if test "X$ac_cv_cyrus_where_inc" = "X"; then
+ CMU_LIBCYRUS_INC_WHERE(/usr/cyrus/include /usr/local/include /usr/local/include/cyrus /usr/include/cyrus)
+ fi
+ fi
+
+ AC_MSG_CHECKING(whether to include libcyrus)
+ if test "X$ac_cv_cyrus_where_lib" = "X" -o "X$ac_cv_cyrus_where_inc" = "X"; then
+ ac_cv_found_cyrus=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_cyrus=yes
+ AC_MSG_RESULT(yes)
+ LIBCYRUS_INC_DIR=$ac_cv_cyrus_where_inc
+ LIBCYRUS_LIB_DIR=$ac_cv_cyrus_where_lib
+ LIBCYRUS_INC_FLAGS="-I${LIBCYRUS_INC_DIR}"
+ LIBCYRUS_LIB_FLAGS="-L${LIBCYRUS_LIB_DIR} -lcyrus"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBCYRUS_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${LIBCYRUS_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBCYRUS_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${LIBCYRUS_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${LIBCYRUS_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ AC_SUBST(LIBCYRUS_INC_DIR)
+ AC_SUBST(LIBCYRUS_LIB_DIR)
+ AC_SUBST(LIBCYRUS_INC_FLAGS)
+ AC_SUBST(LIBCYRUS_LIB_FLAGS)
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libloguse.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libloguse.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libloguse.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libloguse.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,103 @@
+dnl libloguse.m4--LOGUSE libraries and includes
+dnl Derrick Brashear
+dnl from KTH krb and Arla
+dnl $Id: libloguse.m4,v 1.5.4.1 2006/05/23 13:27:18 murch Exp $
+
+AC_DEFUN([CMU_LOGUSE_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lloguse"
+AC_TRY_LINK(,
+[loguse("","","");],
+[ac_cv_found_loguse_lib=yes],
+ac_cv_found_loguse_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_LOGUSE_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for loguse library in $i)
+ CMU_LOGUSE_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, loguse)
+ if test "$ac_cv_found_loguse_lib" = "yes" ; then
+ ac_cv_loguse_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(no found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LOGUSE], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_ARG_WITH(loguse,
+ [ --with-loguse=PREFIX Compile with LOGUSE support],
+ [if test "X$with_loguse" = "X"; then
+ with_loguse=yes
+ fi])
+
+ if test "X$with_loguse" != "X"; then
+ if test "$with_loguse" != "yes"; then
+ ac_cv_loguse_where_lib=$with_loguse/$CMU_LIB_SUBDIR
+ fi
+ fi
+
+ if test "X$with_loguse_lib" != "X"; then
+ ac_cv_loguse_where_lib=$with_loguse_lib
+ fi
+ if test "X$ac_cv_loguse_where_lib" = "X"; then
+ CMU_LOGUSE_LIB_WHERE(/usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ fi
+
+ AC_MSG_CHECKING(whether to include loguse)
+ if test "X$ac_cv_loguse_where_lib" = "X"; then
+ ac_cv_found_loguse=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_loguse=yes
+ AC_DEFINE(HAVE_LOGUSE,, [Use libloguse])
+ AC_MSG_RESULT(yes)
+ LOGUSE_LIB_DIR=$ac_cv_loguse_where_lib
+ LOGUSE_LIB_FLAGS="-L${LOGUSE_LIB_DIR} -lloguse"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LOGUSE_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${LOGUSE_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LOGUSE_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${LOGUSE_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${LOGUSE_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libnet.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libnet.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libnet.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libnet.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,192 @@
+dnl libnet.m4--libnet and includes
+dnl Derrick Brashear
+dnl from KTH krb and Arla
+dnl $Id: libnet.m4,v 1.7.4.1 2006/05/23 13:27:18 murch Exp $
+
+AC_DEFUN([CMU_LIBNET_CFG_WHERE1], [
+ac_cv_found_libnet_bin=no
+if test -f "$1/libnet-config" ; then
+ ac_cv_found_libnet_cfg=yes
+fi
+])
+
+AC_DEFUN([CMU_LIBNET_CFG_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libnet config in $i)
+ CMU_LIBNET_CFG_WHERE1($i)
+ if test "$ac_cv_found_libnet_cfg" = "yes"; then
+ ac_cv_libnet_where_cfg=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LIBNET_INC_WHERE1], [
+ac_cv_found_libnet_inc=no
+if test -f "$1/libnet.h" ; then
+ ac_cv_found_libnet_inc=yes
+fi
+])
+
+AC_DEFUN([CMU_LIBNET_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libnet header in $i)
+ CMU_LIBNET_INC_WHERE1($i)
+ if test "$ac_cv_found_libnet_inc" = "yes"; then
+ ac_cv_libnet_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LIBNET_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lnet"
+AC_TRY_LINK(,
+[open_link_interface("","");],
+[ac_cv_found_libnet_lib=yes],
+AC_TRY_LINK(,
+[libnet_open_link_interface("","");],
+[
+CMU_LIBNET_CFLAGS_ADD="-DNEW_LIBNET_INTERFACE"
+ac_cv_found_libnet_lib=yes
+],
+ac_cv_found_libnet_lib=no)
+)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_LIBNET_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libnet library in $i)
+ CMU_LIBNET_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, net)
+ if test "$ac_cv_found_libnet_lib" = "yes" ; then
+ ac_cv_libnet_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LIBNET], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(libnet,
+ [ --with-libnet=PREFIX Compile with LIBNET support],
+ [if test "X$with_libnet" = "X"; then
+ with_libnet=yes
+ fi])
+AC_ARG_WITH(libnet-config,
+ [ --with-libnet-config=dir use libnet config program in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libnet-config])
+ fi])
+AC_ARG_WITH(libnet-lib,
+ [ --with-libnet-lib=dir use libnet libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libnet-lib])
+ fi])
+AC_ARG_WITH(libnet-include,
+ [ --with-libnet-include=dir use libnet headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libnet-include])
+ fi])
+
+ if test "X$with_libnet" != "X"; then
+ if test "$with_libnet" != "yes"; then
+ if test -f "$with_libnet/libnet-config"; then
+ ac_cv_libnet_where_cfg=$with_libnet
+ else
+ ac_cv_libnet_where_cfg=$with_libnet/bin
+ fi
+ ac_cv_libnet_where_lib=$with_libnet/$CMU_LIB_SUBDIR
+ ac_cv_libnet_where_inc=$with_libnet/include
+ fi
+ fi
+
+ if test "X$with_libnet_cfg" != "X"; then
+ ac_cv_libnet_where_cfg=$with_libnet_cfg
+ fi
+ if test "X$ac_cv_libnet_where_cfg" = "X"; then
+ CMU_LIBNET_CFG_WHERE(/usr/ng/bin /usr/bin /usr/local/bin)
+ fi
+
+ if test "X$with_libnet_lib" != "X"; then
+ ac_cv_libnet_where_lib=$with_libnet_lib
+ fi
+ if test "X$ac_cv_libnet_where_lib" = "X"; then
+ CMU_LIBNET_LIB_WHERE(/usr/ng/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_libnet_include" != "X"; then
+ ac_cv_libnet_where_inc=$with_libnet_include
+ fi
+ if test "X$ac_cv_libnet_where_inc" = "X"; then
+ CMU_LIBNET_INC_WHERE(/usr/ng/include /usr/include /usr/local/include)
+ fi
+
+ AC_MSG_CHECKING(whether to include libnet)
+ if test "X$ac_cv_libnet_where_lib" = "X" -o "X$ac_cv_libnet_where_inc" = "X" -o "X$ac_cv_libnet_where_cfg" = "X"; then
+ ac_cv_found_libnet=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_libnet=yes
+ AC_MSG_RESULT(yes)
+ LIBNET_CONFIG=$ac_cv_libnet_where_cfg/libnet-config
+ LIBNET_INC_DIR=$ac_cv_libnet_where_inc
+ LIBNET_LIB_DIR=$ac_cv_libnet_where_lib
+
+ LIBNET_CFLAGS="`$LIBNET_CONFIG --cflags` ${CMU_LIBNET_CFLAGS_ADD}"
+ LIBNET_DEF_FLAGS="`$LIBNET_CONFIG --defines`"
+ LIBNET_INC_FLAGS="-I${LIBNET_INC_DIR}"
+ LIBNET_LIB_FLAGS="-L${LIBNET_LIB_DIR} `${LIBNET_CONFIG} --libs`"
+
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBNET_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBNET_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${LIBNET_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBNET_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBNET_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBNET_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${LIBNET_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBNET_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${LIBNET_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libpcap.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libpcap.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libpcap.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libpcap.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,142 @@
+dnl libpcap.m4--PCAP libraries and includes
+dnl Derrick Brashear
+dnl from KTH krb and Arla
+dnl $Id: libpcap.m4,v 1.8.4.1 2006/05/23 13:27:18 murch Exp $
+
+AC_DEFUN([CMU_PCAP_INC_WHERE1], [
+ac_cv_found_pcap_inc=no
+if test -f "$1/pcap.h" ; then
+ ac_cv_found_pcap_inc=yes
+fi
+])
+
+AC_DEFUN([CMU_PCAP_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for pcap header in $i)
+ CMU_PCAP_INC_WHERE1($i)
+ if test "$ac_cv_found_pcap_inc" = "yes"; then
+ ac_cv_pcap_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(no found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_PCAP_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lpcap"
+AC_TRY_LINK(,
+[pcap_lookupdev("");],
+[ac_cv_found_pcap_lib=yes],
+ac_cv_found_pcap_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_PCAP_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for pcap library in $i)
+ CMU_PCAP_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, pcap)
+ if test "$ac_cv_found_pcap_lib" = "yes" ; then
+ ac_cv_pcap_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(no found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_PCAP], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(pcap,
+ [ --with-pcap=PREFIX Compile with PCAP support],
+ [if test "X$with_pcap" = "X"; then
+ with_pcap=yes
+ fi])
+AC_ARG_WITH(pcap-lib,
+ [ --with-pcap-lib=dir use pcap libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-pcap-lib])
+ fi])
+AC_ARG_WITH(pcap-include,
+ [ --with-pcap-include=dir use pcap headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-pcap-include])
+ fi])
+
+ if test "X$with_pcap" != "X"; then
+ if test "$with_pcap" != "yes"; then
+ ac_cv_pcap_where_lib=$with_pcap/$CMU_LIB_SUBDIR
+ ac_cv_pcap_where_inc=$with_pcap/include
+ fi
+ fi
+
+ if test "X$with_pcap_lib" != "X"; then
+ ac_cv_pcap_where_lib=$with_pcap_lib
+ fi
+ if test "X$ac_cv_pcap_where_lib" = "X"; then
+ CMU_PCAP_LIB_WHERE(/usr/ng/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_pcap_include" != "X"; then
+ ac_cv_pcap_where_inc=$with_pcap_include
+ fi
+ if test "X$ac_cv_pcap_where_inc" = "X"; then
+ CMU_PCAP_INC_WHERE(/usr/ng/include /usr/include /usr/local/include)
+ fi
+
+ AC_MSG_CHECKING(whether to include pcap)
+ if test "X$ac_cv_pcap_where_lib" = "X" -a "X$ac_cv_pcap_where_inc" = "X"; then
+ ac_cv_found_pcap=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_pcap=yes
+ AC_MSG_RESULT(yes)
+ PCAP_INC_DIR=$ac_cv_pcap_where_inc
+ PCAP_LIB_DIR=$ac_cv_pcap_where_lib
+ PCAP_INC_FLAGS="-I${PCAP_INC_DIR}"
+ PCAP_LIB_FLAGS="-L${PCAP_LIB_DIR} -lpcap"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${PCAP_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${PCAP_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${PCAP_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${PCAP_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${PCAP_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${PCAP_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${PCAP_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${PCAP_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${PCAP_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/librestrict.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/librestrict.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/librestrict.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/librestrict.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,102 @@
+dnl librestrict.m4--restrict libraries and includes
+dnl Derrick Brashear
+dnl from KTH krb and Arla
+dnl $Id: librestrict.m4,v 1.4.4.1 2006/05/23 13:27:18 murch Exp $
+
+AC_DEFUN([CMU_RESTRICT_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lrestrict"
+AC_TRY_LINK(,
+[ConsoleInUse();],
+[ac_cv_found_restrict_lib=yes],
+ac_cv_found_restrict_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_RESTRICT_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for restrict library in $i)
+ CMU_RESTRICT_LIB_WHERE1($i)
+ CMU_TEST_LIBPATH($i, restrict)
+ if test "$ac_cv_found_restrict_lib" = "yes" ; then
+ ac_cv_restrict_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(no found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_RESTRICT], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(restrict,
+ [ --with-restrict=PREFIX Compile with RESTRICT support],
+ [if test "X$with_restrict" = "X"; then
+ with_restrict=yes
+ fi])
+
+ if test "X$with_restrict" != "X"; then
+ if test "$with_restrict" != "yes"; then
+ ac_cv_restrict_where_lib=$with_restrict/$CMU_LIB_SUBDIR
+ fi
+ fi
+
+ if test "X$with_restrict_lib" != "X"; then
+ ac_cv_restrict_where_lib=$with_restrict_lib
+ fi
+ if test "X$ac_cv_restrict_where_lib" = "X"; then
+ CMU_RESTRICT_LIB_WHERE(/usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
+ fi
+
+ AC_MSG_CHECKING(whether to include restrict)
+ if test "X$ac_cv_restrict_where_lib" = "X"; then
+ ac_cv_found_restrict=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_restrict=yes
+ AC_DEFINE(HAVE_RESTRICT,, [Use librestrict])
+ AC_MSG_RESULT(yes)
+ RESTRICT_LIB_DIR=$ac_cv_restrict_where_lib
+ RESTRICT_LIB_FLAGS="-L${RESTRICT_LIB_DIR} -lrestrict"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${RESTRICT_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${RESTRICT_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${RESTRICT_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${RESTRICT_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${RESTRICT_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libssl.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libssl.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libssl.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libssl.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,153 @@
+dnl libssl.m4--Ssl libraries and includes
+dnl Derrick Brashear
+dnl from KTH kafs and Arla
+dnl $Id: libssl.m4,v 1.9.4.1 2006/05/23 13:27:18 murch Exp $
+
+AC_DEFUN([CMU_LIBSSL_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+CMU_CHECK_HEADER_NOCACHE(openssl/ssl.h,
+ac_cv_found_libssl_inc=yes,
+ac_cv_found_libssl_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_LIBSSL_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libssl headers in $i)
+ CMU_LIBSSL_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, ssl)
+ if test "$ac_cv_found_libssl_inc" = "yes"; then
+ ac_cv_libssl_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LIBSSL_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lssl -lcrypto $LIB_SOCKET"
+AC_TRY_LINK(,
+[SSL_write();],
+[ac_cv_found_ssl_lib=yes],
+ac_cv_found_ssl_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_LIBSSL_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for libssl libraries in $i)
+ CMU_LIBSSL_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, ssl)
+ if test "$ac_cv_found_ssl_lib" = "yes" ; then
+ ac_cv_libssl_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_LIBSSL], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_ARG_WITH(libssl,
+ [ --with-libssl=PREFIX Compile with Libssl support],
+ [if test "X$with_libssl" = "X"; then
+ with_libssl=yes
+ fi])
+AC_ARG_WITH(libssl-lib,
+ [ --with-libssl-lib=dir use libssl libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libssl-lib])
+ fi])
+AC_ARG_WITH(libssl-include,
+ [ --with-libssl-include=dir use libssl headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-libssl-include])
+ fi])
+
+ if test "X$with_libssl" != "X"; then
+ if test "$with_libssl" != "yes" -a "$with_libssl" != no; then
+ ac_cv_libssl_where_lib=$with_libssl/$CMU_LIB_SUBDIR
+ ac_cv_libssl_where_inc=$with_libssl/include
+ fi
+ fi
+
+ if test "$with_libssl" != "no"; then
+ if test "X$with_libssl_lib" != "X"; then
+ ac_cv_libssl_where_lib=$with_libssl_lib
+ fi
+ if test "X$ac_cv_libssl_where_lib" = "X"; then
+ CMU_LIBSSL_LIB_WHERE(/usr/local/$CMU_LIB_SUBDIR/openssl /usr/$CMU_LIB_SUBDIR/openssl /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_libssl_include" != "X"; then
+ ac_cv_libssl_where_inc=$with_libssl_include
+ fi
+ if test "X$ac_cv_libssl_where_inc" = "X"; then
+ CMU_LIBSSL_INC_WHERE(/usr/local/include /usr/include)
+ fi
+ fi
+
+ AC_MSG_CHECKING(whether to include libssl)
+ if test "X$ac_cv_libssl_where_lib" = "X" -a "X$ac_cv_libssl_where_inc" = "X"; then
+ ac_cv_found_libssl=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_libssl=yes
+ AC_MSG_RESULT(yes)
+ LIBSSL_INC_DIR=$ac_cv_libssl_where_inc
+ LIBSSL_LIB_DIR=$ac_cv_libssl_where_lib
+ LIBSSL_INC_FLAGS="-I${LIBSSL_INC_DIR}"
+ LIBSSL_LIB_FLAGS="-L${LIBSSL_LIB_DIR} -lssl -lcrypto"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${LIBSSL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${LIBSSL_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${LIBSSL_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ AC_SUBST(LIBSSL_INC_DIR)
+ AC_SUBST(LIBSSL_LIB_DIR)
+ AC_SUBST(LIBSSL_INC_FLAGS)
+ AC_SUBST(LIBSSL_LIB_FLAGS)
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libtoolhack.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libtoolhack.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libtoolhack.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libtoolhack.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,33 @@
+dnl libtoolhack.m4--hack to make libtool behave better
+dnl Rob Earhart
+dnl $Id: libtoolhack.m4,v 1.4 2003/10/08 20:35:25 rjs3 Exp $
+
+dnl Libtool tries to compile an empty file to see whether it can build
+dnl shared libraries, and treats *any* warning as a problem.
+dnl Solaris's and HP's cc complains about the empty file. So we hack
+dnl the CFLAGS to make cc not complain.
+
+AC_DEFUN([CMU_PROG_LIBTOOL], [
+AC_REQUIRE([AC_PROG_CC])
+if test "$ac_cv_prog_gcc" = no; then
+ case "$host_os" in
+ solaris2*)
+ save_cflags="${CFLAGS}"
+ CFLAGS="-erroff=E_EMPTY_TRANSLATION_UNIT ${CFLAGS}"
+ ;;
+ hpux*)
+ save_cflags="${CFLAGS}"
+ CFLAGS="-w"
+ ;;
+ esac
+fi
+
+AC_PROG_LIBTOOL
+
+if test "$ac_cv_prog_gcc" = no; then
+ case "$host_os" in
+ solaris2*|hpux*)
+ CFLAGS="${save_cflags}"
+ esac
+fi
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libwrap.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libwrap.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libwrap.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/libwrap.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,30 @@
+dnl libwrap.m4 --- do we have libwrap, the access control library?
+dnl $Id: libwrap.m4,v 1.9.2.1 2006/05/23 13:27:19 murch Exp $
+
+AC_DEFUN([CMU_LIBWRAP], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+ AC_REQUIRE([CMU_SOCKETS])
+ AC_ARG_WITH(libwrap,
+ [ --with-libwrap=DIR use libwrap (rooted in DIR) [yes] ],
+ with_libwrap=$withval, with_libwrap=yes)
+ if test "$with_libwrap" != no; then
+ if test -d "$with_libwrap"; then
+ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
+ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ AC_CHECK_LIB(wrap, request_init, [
+ AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)],
+ with_libwrap=no, ${LIB_SOCKET})
+ LIBS="$cmu_save_LIBS"
+ fi
+ AC_MSG_CHECKING(libwrap support)
+ AC_MSG_RESULT($with_libwrap)
+ LIB_WRAP=""
+ if test "$with_libwrap" != no; then
+ AC_DEFINE(HAVE_LIBWRAP,[],[Do we have TCP wrappers?])
+ LIB_WRAP="-lwrap"
+ AC_CHECK_LIB(nsl, yp_get_default_domain, LIB_WRAP="${LIB_WRAP} -lnsl")
+ fi
+ AC_SUBST(LIB_WRAP)
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/mips-abi.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/mips-abi.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/mips-abi.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/mips-abi.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,93 @@
+dnl mips-abi.m4--Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext
+dnl to some value
+dnl Derrick Brashear
+dnl from KTH krb (from CMU)
+dnl $Id: mips-abi.m4,v 1.5 2003/10/08 20:35:25 rjs3 Exp $
+
+AC_DEFUN([AC_MIPS_ABI], [
+AC_ARG_WITH(mips_abi,
+[ --with-mips-abi=abi ABI to use for IRIX (32, n32, or 64)])
+
+case "$host_os" in
+irix*)
+with_mips_abi="${with_mips_abi:-yes}"
+if test -n "$GCC"; then
+
+# GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select
+# which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs.
+#
+# Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old
+# GCC and revert back to O32. The same goes if O32 is asked for - old
+# GCCs doesn't like the -mabi option, and new GCCs can't output O32.
+#
+# Don't you just love *all* the different SGI ABIs?
+
+case "${with_mips_abi}" in
+ 32|o32) abi='-mabi=32'; abilibdirext='' ;;
+ n32|yes) abi='-mabi=n32'; abilibdirext='32' ;;
+ 64) abi='-mabi=64'; abilibdirext='64' ;;
+ no) abi=''; abilibdirext='';;
+ *) AC_ERROR("Invalid ABI specified") ;;
+esac
+if test -n "$abi" ; then
+ac_foo=krb_cv_gcc_`echo $abi | tr =- __`
+dnl
+dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to
+dnl AC_MSG_RESULT
+dnl
+AC_MSG_CHECKING([if $CC supports the $abi option])
+AC_CACHE_VAL($ac_foo, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $abi"
+AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no)
+CFLAGS="$save_CFLAGS"
+])
+ac_res=`eval echo \\\$$ac_foo`
+AC_MSG_RESULT($ac_res)
+if test $ac_res = no; then
+# Try to figure out why that failed...
+case $abi in
+ -mabi=32)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -mabi=n32"
+ AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no)
+ CLAGS="$save_CFLAGS"
+ if test $ac_res = yes; then
+ # New GCC
+ AC_ERROR([$CC does not support the $with_mips_abi ABI])
+ fi
+ # Old GCC
+ abi=''
+ abilibdirext=''
+ ;;
+ -mabi=n32|-mabi=64)
+ if test $with_mips_abi = yes; then
+ # Old GCC, default to O32
+ abi=''
+ abilibdirext=''
+ else
+ # Some broken GCC
+ AC_ERROR([$CC does not support the $with_mips_abi ABI])
+ fi
+ ;;
+esac
+fi #if test $ac_res = no; then
+fi #if test -n "$abi" ; then
+else
+case "${with_mips_abi}" in
+ 32|o32) abi='-32'; abilibdirext='' ;;
+ n32|yes) abi='-n32'; abilibdirext='32' ;;
+ 64) abi='-64'; abilibdirext='64' ;;
+ no) abi=''; abilibdirext='';;
+ *) AC_ERROR("Invalid ABI specified") ;;
+esac
+fi #if test -n "$GCC"; then
+;;
+esac
+
+dnl And then we munge variables to make things work
+CFLAGS="${CFLAGS} $abi"
+libdir=`echo $libdir | sed 's,/*$,$abilibdirext,'`
+LDFLAGS=`echo $LDFLAGS | sed -e "s,/lib$,/lib$abilibdirext," -e "s,\\\(/lib[^a-zA-Z]\\\),\\\1$abilibdirext,g"`
+
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nadine.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nadine.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nadine.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nadine.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,164 @@
+dnl nadine.m4--The nadine event library
+dnl Derrick Brashear
+dnl from KTH kafs and Arla
+dnl $Id: nadine.m4,v 1.6 2003/10/08 20:35:25 rjs3 Exp $
+
+AC_DEFUN([CMU_NADINE_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+CMU_CHECK_HEADER_NOCACHE(libevent/libevent.h,
+ac_cv_found_event_inc=yes,
+ac_cv_found_event_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_NADINE_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for nadine headers in $i)
+ CMU_NADINE_INC_WHERE1($i)
+dnl CMU_TEST_INCPATH($i, ssl)
+dnl CMU_TEST_INCPATH isn't very versatile
+ if test "$ac_cv_found_event_inc" = "yes"; then
+ if test \! -f $i/libevent/libevent.h ; then
+ ac_cv_found_event_inc=no
+ fi
+ fi
+ if test "$ac_cv_found_event_inc" = "yes"; then
+ ac_cv_event_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_NADINE_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -levent"
+AC_TRY_LINK(,
+[libevent_Initialize();],
+[ac_cv_found_event_lib=yes],
+ac_cv_found_event_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_NADINE_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for event libraries in $i)
+ CMU_NADINE_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, event)
+ if test "$ac_cv_found_event_lib" = "yes" ; then
+ ac_cv_event_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_NADINE], [
+AC_REQUIRE([CMU_SOCKETS])
+AC_ARG_WITH(nadine,
+ [ --with-nadine=PREFIX Compile with nadine libevent support],
+ [if test "X$with_nadine" = "X"; then
+ with_nadine=yes
+ fi])
+AC_ARG_WITH(nadine-lib,
+ [ --with-nadine-lib=dir use nadine libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-nadine-lib])
+ fi])
+AC_ARG_WITH(nadine-include,
+ [ --with-nadine-include=dir use nadine headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-nadine-include])
+ fi])
+
+ if test "$with_ucdsnmp" = "no" ; then
+ AC_MSG_WARN([Nadine requires UCD SNMP. Disabling Nadine support])
+ with_nadine=no
+ with_nadine_lib=no
+ with_nadine_include=no
+ fi
+ if test "X$with_nadine" != "X"; then
+ if test "$with_nadine" != "yes" -a "$with_nadine" != no; then
+ ac_cv_event_where_lib=$with_nadine/lib
+ ac_cv_event_where_inc=$with_nadine/include
+ fi
+ fi
+
+ if test "$with_nadine" != "no"; then
+ if test "X$with_nadine_lib" != "X"; then
+ ac_cv_event_where_lib=$with_nadine_lib
+ fi
+ if test "X$ac_cv_event_where_lib" = "X"; then
+ CMU_NADINE_LIB_WHERE(/usr/local/lib /usr/ng/lib /usr/lib)
+ fi
+
+ if test "X$with_nadine_include" != "X"; then
+ ac_cv_event_where_inc=$with_nadine_include
+ fi
+ if test "X$ac_cv_event_where_inc" = "X"; then
+ CMU_NADINE_INC_WHERE(/usr/local/include /usr/ng/include /usr/include)
+ fi
+ fi
+
+ AC_MSG_CHECKING(whether to include nadine)
+ if test "X$ac_cv_event_where_lib" = "X" -a "X$ac_cv_event_where_inc" = "X"; then
+ ac_cv_found_event=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_event=yes
+ AC_MSG_RESULT(yes)
+ NADINE_INC_DIR=$ac_cv_event_where_inc
+ NADINE_LIB_DIR=$ac_cv_event_where_lib
+ NADINE_INC_FLAGS="-I${NADINE_INC_DIR}"
+ NADINE_LIB_FLAGS="-L${NADINE_LIB_DIR} -levent"
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${NADINE_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${NADINE_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${NADINE_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${NADINE_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${NADINE_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${NADINE_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${NADINE_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${NADINE_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${NADINE_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ AC_SUBST(NADINE_INC_DIR)
+ AC_SUBST(NADINE_LIB_DIR)
+ AC_SUBST(NADINE_INC_FLAGS)
+ AC_SUBST(NADINE_LIB_FLAGS)
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nana.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nana.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nana.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/nana.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,27 @@
+dnl nana.m4--nana macro
+dnl Rob Earhart
+dnl $Id: nana.m4,v 1.5 2003/10/08 20:35:25 rjs3 Exp $
+
+AC_DEFUN([CMU_NANA], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_ARG_WITH(nana, [[ --with-nana use NANA [yes] ]],,with_nana=yes)
+ if test "$GCC" != yes; then
+ with_nana=no
+ elif test "$with_nana" = yes; then
+ AC_CHECK_PROGS(NANA, nana, :)
+ if test "$NANA" = ":"; then
+ with_nana=no
+ else
+ AC_CHECK_HEADER(nana.h,
+ AC_CHECK_LIB(nana, nana_error,,with_nana=no),
+ with_nana=no)
+ fi
+ else
+ with_nana=no
+ fi
+ AC_MSG_CHECKING([whether to use NANA])
+ AC_MSG_RESULT($with_nana)
+ if test "$with_nana" != yes; then
+ AC_DEFINE(WITHOUT_NANA)
+ fi
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openldap.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openldap.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openldap.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openldap.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,36 @@
+dnl
+dnl macros for configure.in to detect openldap
+dnl $Id: openldap.m4,v 1.2.2.1 2006/05/23 13:27:19 murch Exp $
+dnl
+
+dnl
+dnl Check for OpenLDAP version compatility
+AC_DEFUN([CMU_OPENLDAP_API],
+[AC_CACHE_CHECK([OpenLDAP api], [cmu_cv_openldap_api],[
+ AC_EGREP_CPP(__openldap_api,[
+#include <ldap.h>
+
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+char *__openldap_api = LDAP_API_FEATURE_X_OPENLDAP;
+#endif
+], [cmu_cv_openldap_api=yes], [cmu_cv_openldap_api=no])])
+])
+
+dnl
+dnl Check for OpenLDAP version compatility
+AC_DEFUN([CMU_OPENLDAP_COMPAT],
+[AC_CACHE_CHECK([OpenLDAP version], [cmu_cv_openldap_compat],[
+ AC_EGREP_CPP(__openldap_compat,[
+#include <ldap.h>
+
+/* Require 2.1.27+ and 2.2.6+ */
+#if LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 1 && LDAP_VENDOR_VERSION_PATCH > 26
+char *__openldap_compat = "2.1.27 or better okay";
+#elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 2 && LDAP_VENDOR_VERSION_PATCH > 5
+char *__openldap_compat = "2.2.6 or better okay";
+#elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR > 2
+char *__openldap_compat = "2.3 or better okay"
+#endif
+], [cmu_cv_openldap_compat=yes], [cmu_cv_openldap_compat=no])])
+])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openssl.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openssl.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openssl.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/openssl.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,47 @@
+dnl
+dnl macros for configure.in to detect openssl
+dnl $Id: openssl.m4,v 1.8.4.2 2006/05/23 13:27:19 murch Exp $
+dnl
+
+AC_DEFUN([CMU_HAVE_OPENSSL], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(openssl,[ --with-openssl=PATH use OpenSSL from PATH],
+ with_openssl=$withval, with_openssl="yes")
+
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+
+ if test -d $with_openssl; then
+ CPPFLAGS="${CPPFLAGS} -I${with_openssl}/include"
+ CMU_ADD_LIBPATH(${with_openssl}/$CMU_LIB_SUBDIR)
+ fi
+
+case "$with_openssl" in
+ no)
+ with_openssl="no";;
+ *)
+ dnl if openssl has been compiled with the rsaref2 libraries,
+ dnl we need to include the rsaref libraries in the crypto check
+ LIB_RSAREF=""
+ AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
+ cmu_have_rsaref=yes;
+ [AC_CHECK_LIB(RSAglue, RSAPublicEncrypt,
+ LIB_RSAREF="-lRSAglue -lrsaref",
+ LIB_RSAREF="-lrsaref")],
+ cmu_have_rsaref=no)
+
+ AC_CHECK_HEADER(openssl/evp.h, [
+ AC_CHECK_LIB(crypto, EVP_DigestInit,
+ with_openssl="yes",
+ with_openssl="no", $LIB_RSAREF)],
+ with_openssl=no)
+ ;;
+esac
+
+ if test "$with_openssl" != "no"; then
+ AC_DEFINE(HAVE_OPENSSL,[],[Do we have OpenSSL?])
+ else
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ fi
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/pthreads.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/pthreads.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/pthreads.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/pthreads.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,23 @@
+dnl pthreads.m4--pthreads setup macro
+dnl Rob Earhart
+dnl $Id: pthreads.m4,v 1.11 2003/10/08 20:35:25 rjs3 Exp $
+
+AC_DEFUN([CMU_PTHREADS], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ cmu_save_LIBS="$LIBS"
+ AC_CHECK_LIB(pthread, pthread_create,LIB_PTHREAD="-lpthread",
+ AC_CHECK_LIB(c_r, pthread_create,LIB_PTHREAD="-lc_r",
+ AC_ERROR([Can't compile without pthreads])))
+ LIBS="$cmu_save_LIBS"
+ AC_SUBST(LIB_PTHREAD)
+ AC_DEFINE(_REENTRANT)
+ case "$host_os" in
+ solaris2*)
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+ AC_DEFINE(__EXTENSIONS__)
+ ;;
+ irix6*)
+ AC_DEFINE(_SGI_REENTRANT_FUNCTIONS)
+ ;;
+ esac
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,94 @@
+dnl sasl.m4--sasl libraries and includes
+dnl Derrick Brashear
+dnl from KTH sasl and Arla
+dnl $Id: sasl.m4,v 1.22.4.1 2006/05/23 13:27:19 murch Exp $
+
+AC_DEFUN([CMU_SASL_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+CMU_CHECK_HEADER_NOCACHE(sasl.h,
+ac_cv_found_sasl_inc=yes,
+ac_cv_found_sasl_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_SASL_INC_WHERE], [
+ for i in $1; do
+ CMU_SASL_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, sasl)
+ if test "$ac_cv_found_sasl_inc" = "yes"; then
+ ac_cv_sasl_where_inc=$i
+ break
+ fi
+ done
+])
+
+AC_DEFUN([CMU_SASL_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lsasl"
+AC_TRY_LINK(,
+[sasl_getprop();],
+[ac_cv_found_sasl_lib=yes],
+ac_cv_found_sasl_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_SASL_LIB_WHERE], [
+ for i in $1; do
+ CMU_SASL_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, sasl)
+ if test "$ac_cv_found_sasl_lib" = "yes" ; then
+ ac_cv_sasl_where_lib=$i
+ break
+ fi
+ done
+])
+
+AC_DEFUN([CMU_SASL], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_ARG_WITH(sasl,
+ [ --with-sasl=DIR Compile with libsasl in <DIR>],
+ with_sasl="$withval",
+ with_sasl="yes")
+
+ SASLFLAGS=""
+ LIB_SASL=""
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+ cmu_saved_LDFLAGS=$LDFLAGS
+ cmu_saved_LIBS=$LIBS
+ if test -d ${with_sasl}; then
+ ac_cv_sasl_where_lib=${with_sasl}/$CMU_LIB_SUBDIR
+ ac_cv_sasl_where_inc=${with_sasl}/include
+
+ SASLFLAGS="-I$ac_cv_sasl_where_inc"
+ LIB_SASL="-L$ac_cv_sasl_where_lib"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+ fi
+
+ AC_CHECK_HEADER(sasl.h,
+ AC_CHECK_LIB(sasl, sasl_getprop,
+ ac_cv_found_sasl=yes,
+ ac_cv_found_sasl=no), ac_cv_found_sasl=no)
+
+ LIBS="$cmu_saved_LIBS"
+ LDFLAGS="$cmu_saved_LDFLAGS"
+ CPPFLAGS="$cmu_saved_CPPFLAGS"
+ if test "$ac_cv_found_sasl" = yes; then
+ LIB_SASL="$LIB_SASL -lsasl"
+ else
+ LIB_SASL=""
+ SASLFLAGS=""
+ fi
+ AC_SUBST(LIB_SASL)
+ AC_SUBST(SASLFLAGS)
+ ])
+
+AC_DEFUN([CMU_SASL_REQUIRED],
+[AC_REQUIRE([CMU_SASL])
+if test "$ac_cv_found_sasl" != "yes"; then
+ AC_ERROR([Cannot continue without libsasl.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
+fi])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl2.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl2.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl2.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/sasl2.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,472 @@
+# sasl2.m4--sasl2 libraries and includes
+# Rob Siemborski
+# $Id: sasl2.m4,v 1.36.2.6 2006/05/23 13:27:20 murch Exp $
+
+# SASL2_CRYPT_CHK
+# ---------------
+AC_DEFUN([SASL_GSSAPI_CHK],
+[AC_REQUIRE([SASL2_CRYPT_CHK])
+AC_REQUIRE([CMU_SOCKETS])
+AC_ARG_ENABLE([gssapi],
+ [AC_HELP_STRING([--enable-gssapi=<DIR>],
+ [enable GSSAPI authentication [yes]])],
+ [gssapi=$enableval],
+ [gssapi=yes])
+AC_ARG_WITH([gss_impl],
+ [AC_HELP_STRING([--with-gss_impl={heimdal|mit|cybersafe|seam|auto}],
+ [choose specific GSSAPI implementation [[auto]]])],
+ [gss_impl=$withval],
+ [gss_impl=auto])
+
+if test "$gssapi" != no; then
+ platform=
+ case "${host}" in
+ *-*-linux*)
+ platform=__linux
+ ;;
+ *-*-hpux*)
+ platform=__hpux
+ ;;
+ *-*-irix*)
+ platform=__irix
+ ;;
+ *-*-solaris2*)
+# When should we use __sunos?
+ platform=__solaris
+ ;;
+ *-*-aix*)
+###_AIX
+ platform=__aix
+ ;;
+ *)
+ AC_WARN([The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script])
+ if test "$gss_impl" = "cybersafe"; then
+ AC_ERROR([CyberSafe was forced, cannot continue as platform is not supported])
+ fi
+ ;;
+ esac
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+
+ if test -d ${gssapi}; then
+ CPPFLAGS="$CPPFLAGS -I$gssapi/include"
+# We want to keep -I in our CPPFLAGS, but only if we succeed
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+### I am not sure how useful is this (and whether this is required at all
+### especially when we have to provide two -L flags for new CyberSafe
+ LDFLAGS="$LDFLAGS -L$gssapi/lib"
+
+ if test -n "$platform"; then
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+ fi
+ fi
+ fi
+ AC_CHECK_HEADER([gssapi.h],
+ [AC_DEFINE(HAVE_GSSAPI_H,,
+ [Define if you have the gssapi.h header file])],
+ [AC_CHECK_HEADER([gssapi/gssapi.h],,
+ [AC_WARN([Disabling GSSAPI - no include files found]); gssapi=no])])
+
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+fi
+
+if test "$gssapi" != no; then
+ # We need to find out which gssapi implementation we are
+ # using. Supported alternatives are: MIT Kerberos 5,
+ # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
+ # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
+ # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
+ #
+ # The choice is reflected in GSSAPIBASE_LIBS
+
+ AC_CHECK_LIB(resolv,res_search)
+ if test -d ${gssapi}; then
+ gssapi_dir="${gssapi}/lib"
+ GSSAPIBASE_LIBS="-L$gssapi_dir"
+ GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
+ else
+ # FIXME: This is only used for building cyrus, and then only as
+ # a real hack. it needs to be fixed.
+ gssapi_dir="/usr/local/lib"
+ fi
+
+ # Check a full link against the Heimdal libraries.
+ # If this fails, check a full link against the MIT libraries.
+ # If this fails, check a full link against the CyberSafe libraries.
+ # If this fails, check a full link against the Solaris 8 and up libgss.
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
+ gss_failed=0
+ AC_CHECK_LIB(gssapi,gss_unwrap,gss_impl="heimdal",gss_failed=1,
+ ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET})
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
+ # check for libkrb5support first
+ AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET})
+
+ gss_failed=0
+ AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1,
+ ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET})
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ # For Cybersafe one has to set a platform define in order to make compilation work
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+ cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
+# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
+ if test -d "${gssapi}/appsec-rt/lib"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
+ fi
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+
+ gss_failed=0
+
+# Check for CyberSafe with two libraries first, than fall back to a single
+# library (older CyberSafe)
+
+ unset ac_cv_lib_gss_csf_gss_acq_user
+ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe03",
+ [unset ac_cv_lib_gss_csf_gss_acq_user;
+ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
+ gss_failed=1,$GSSAPIBASE_LIBS -lgss)],
+ [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
+
+ if test "$gss_failed" = "1"; then
+# Restore variables
+ GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+ if test "$gss_impl" != "auto"; then
+ gss_impl="failed"
+ fi
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
+ gss_failed=0
+ AC_CHECK_LIB(gss,gss_unwrap,gss_impl="seam",gss_failed=1,-lgss)
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "mit"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
+ elif test "$gss_impl" = "heimdal"; then
+ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
+ elif test "$gss_impl" = "cybersafe03"; then
+# Version of CyberSafe with two libraries
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "seam"; then
+ GSSAPIBASE_LIBS=-lgss
+ # there is no static libgss on Solaris 8 and up
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "failed"; then
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ AC_WARN([Disabling GSSAPI - specified library not found])
+ else
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ AC_WARN([Disabling GSSAPI - no library])
+ fi
+fi
+
+#
+# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
+# in gssapi\rfckrb5.h
+#
+if test "$gssapi" != "no"; then
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ AC_EGREP_CPP(hostbased_service_gss_nt_yes,
+ [#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_HOSTBASED_SERVICE
+ hostbased_service_gss_nt_yes
+ #endif],
+ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])],
+ [AC_WARN([Cybersafe define not found])])
+
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h,
+ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])])
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h,
+ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])])
+ fi
+
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ AC_EGREP_CPP(user_name_yes_gss_nt,
+ [#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_USER_NAME
+ user_name_yes_gss_nt
+ #endif],
+ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])],
+ [AC_WARN([Cybersafe define not found])])
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi.h,
+ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])])
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi/gssapi.h,
+ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
+ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])])
+ fi
+fi
+
+GSSAPI_LIBS=""
+AC_MSG_CHECKING([GSSAPI])
+if test "$gssapi" != no; then
+ AC_MSG_RESULT([with implementation ${gss_impl}])
+ AC_CHECK_LIB(resolv,res_search,GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv")
+ SASL_MECHS="$SASL_MECHS libgssapiv2.la"
+ SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
+ SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
+
+ cmu_save_LIBS="$LIBS"
+ LIBS="$LIBS $GSSAPIBASE_LIBS"
+ AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
+ LIBS="$cmu_save_LIBS"
+else
+ AC_MSG_RESULT([disabled])
+fi
+AC_SUBST(GSSAPI_LIBS)
+AC_SUBST(GSSAPIBASE_LIBS)
+])# SASL_GSSAPI_CHK
+
+
+# SASL_SET_GSSAPI_LIBS
+# --------------------
+AC_DEFUN([SASL_SET_GSSAPI_LIBS],
+[SASL_GSSAPI_LIBS_SET="yes"
+])
+
+
+# CMU_SASL2
+# ---------
+# What we want to do here is setup LIB_SASL with what one would
+# generally want to have (e.g. if static is requested, make it that,
+# otherwise make it dynamic.
+#
+# We also want to create LIB_DYN_SASL and DYNSASLFLAGS.
+#
+# Also sets using_static_sasl to "no" "static" or "staticonly"
+#
+AC_DEFUN([CMU_SASL2],
+[AC_REQUIRE([SASL_GSSAPI_CHK])
+
+AC_ARG_WITH(sasl,
+ [AC_HELP_STRING([--with-sasl=DIR],[Compile with libsasl2 in <DIR>])],
+ with_sasl="$withval",
+ with_sasl="yes")
+
+AC_ARG_WITH(staticsasl,
+ [AC_HELP_STRING([--with-staticsasl=DIR],
+ [Compile with staticly linked libsasl2 in <DIR>])],
+ [with_staticsasl="$withval";
+ if test $with_staticsasl != "no"; then
+ using_static_sasl="static"
+ fi],
+ [with_staticsasl="no"; using_static_sasl="no"])
+
+SASLFLAGS=""
+LIB_SASL=""
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+cmu_saved_LDFLAGS=$LDFLAGS
+cmu_saved_LIBS=$LIBS
+
+if test ${with_staticsasl} != "no"; then
+ if test -d ${with_staticsasl}; then
+ if test -d ${with_staticsasl}/lib64 ; then
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib64
+ else
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ fi
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ ac_cv_sasl_where_inc=${with_staticsasl}/include
+
+ SASLFLAGS="-I$ac_cv_sasl_where_inc"
+ LIB_SASL="-L$ac_cv_sasl_where_lib"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+ else
+ with_staticsasl="/usr"
+ fi
+
+ AC_CHECK_HEADER(sasl/sasl.h,
+ [AC_CHECK_HEADER(sasl/saslutil.h,
+ [for i42 in lib64 lib; do
+ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
+ ac_cv_found_sasl=yes
+ AC_MSG_CHECKING([for static libsasl])
+ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
+ fi
+ done
+ if test ! "$ac_cv_found_sasl" = "yes"; then
+ AC_MSG_CHECKING([for static libsasl])
+ AC_ERROR([Could not find ${with_staticsasl}/lib*/libsasl2.a])
+ fi])])
+
+ AC_MSG_RESULT([found])
+
+ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
+ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
+ else
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
+ fi
+fi
+
+if test -d ${with_sasl}; then
+ ac_cv_sasl_where_lib=${with_sasl}/lib
+ ac_cv_sasl_where_inc=${with_sasl}/include
+
+ DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
+ if test "$ac_cv_sasl_where_lib" != ""; then
+ CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, LIB_DYN_SASL)
+ fi
+ LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+fi
+
+# be sure to check for a SASLv2 specific function
+AC_CHECK_HEADER(sasl/sasl.h,
+ [AC_CHECK_HEADER(sasl/saslutil.h,
+ [AC_CHECK_LIB(sasl2, prop_get,
+ ac_cv_found_sasl=yes,
+ ac_cv_found_sasl=no)],
+ ac_cv_found_sasl=no)],
+ ac_cv_found_sasl=no)
+
+if test "$ac_cv_found_sasl" = "yes"; then
+ if test "$ac_cv_sasl_where_lib" != ""; then
+ CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, DYNLIB_SASL)
+ fi
+ DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
+ if test "$using_static_sasl" != "static"; then
+ LIB_SASL=$DYNLIB_SASL
+ SASLFLAGS=$DYNSASLFLAGS
+ fi
+else
+ DYNLIB_SASL=""
+ DYNSASLFLAGS=""
+ using_static_sasl="staticonly"
+fi
+
+if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
+fi
+
+LIBS="$cmu_saved_LIBS"
+LDFLAGS="$cmu_saved_LDFLAGS"
+CPPFLAGS="$cmu_saved_CPPFLAGS"
+
+AC_SUBST(LIB_DYN_SASL)
+AC_SUBST(DYNSASLFLAGS)
+AC_SUBST(LIB_SASL)
+AC_SUBST(SASLFLAGS)
+])# CMU_SASL2
+
+
+# CMU_SASL2_REQUIRED
+# ------------------
+AC_DEFUN([CMU_SASL2_REQUIRED],
+[AC_REQUIRE([CMU_SASL2])
+if test "$ac_cv_found_sasl" != "yes"; then
+ AC_ERROR([Cannot continue without libsasl2.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
+fi])
+
+
+# CMU_SASL2_REQUIRE_VER
+# ---------------------
+AC_DEFUN([CMU_SASL2_REQUIRE_VER],
+[AC_REQUIRE([CMU_SASL2_REQUIRED])
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $SASLFLAGS"
+
+AC_TRY_CPP([
+#include <sasl/sasl.h>
+
+#ifndef SASL_VERSION_MAJOR
+#error SASL_VERSION_MAJOR not defined
+#endif
+#ifndef SASL_VERSION_MINOR
+#error SASL_VERSION_MINOR not defined
+#endif
+#ifndef SASL_VERSION_STEP
+#error SASL_VERSION_STEP not defined
+#endif
+
+#if SASL_VERSION_MAJOR < $1 || SASL_VERSION_MINOR < $2 || SASL_VERSION_STEP < $3
+#error SASL version is less than $1.$2.$3
+#endif
+],,
+ [AC_ERROR([Incorrect SASL headers found. This package requires SASL $1.$2.$3 or newer.])])
+
+CPPFLAGS=$cmu_saved_CPPFLAGS
+])# CMU_SASL2_REQUIRE_VER
+
+
+# CMU_SASL2_CHECKAPOP_REQUIRED
+# ----------------------------
+AC_DEFUN([CMU_SASL2_CHECKAPOP_REQUIRED],
+[AC_REQUIRE([CMU_SASL2_REQUIRED])
+
+cmu_saved_LDFLAGS=$LDFLAGS
+
+LDFLAGS="$LDFLAGS $LIB_SASL"
+
+AC_CHECK_LIB(sasl2, sasl_checkapop,
+ [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])],
+ [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
+
+LDFLAGS=$cmu_saved_LDFLAGS
+])# CMU_SASL2_CHECKAPOP_REQUIRED
+
+
+# SASL2_CRYPT_CHK
+# ---------------
+AC_DEFUN([SASL2_CRYPT_CHK],
+[AC_CHECK_FUNC(crypt, cmu_have_crypt=yes,
+ [AC_CHECK_LIB(crypt, crypt,
+ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes,
+ cmu_have_crypt=no)])
+AC_SUBST(LIB_CRYPT)
+])# SASL2_CRYPT_CHK
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/tcl.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/tcl.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/tcl.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/tcl.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,160 @@
+dnl FIRST PASS AFTER STEALING THIS FROM CYRUS!
+dnl USE AT YOUR OWN PERIL!
+dnl I MEAN IT!
+dnl
+dnl tcl.m4: an autoconf Tcl locator
+dnl $Id: tcl.m4,v 1.4 2003/10/08 20:35:25 rjs3 Exp $
+dnl
+dnl This is rob's Tcl macro, fixed by tjs. It may need occasional tweaking,
+dnl but until the next impediment to compilation, it's fill-in-the-blank,
+dnl and it should be able to do reasonable things with user input.
+dnl
+dnl This will probably just work on Andrew systems, but given the variety
+dnl and apparent creativity of people who compile Tcl elsewhere, I don't know
+dnl what it will do. I have yet to see an autoconf Tcl test that users were
+dnl happy with.
+dnl
+dnl BUGS
+dnl The command-line arguments are overcomplicated.
+dnl There are doubtlessly others...
+
+dnl To use this macro, just do CMU_TCL. It outputs
+dnl TCL_LIBS, TCL_CPPFLAGS, and TCL_DEFS and SUBSTs them.
+dnl If successful, these have stuff in them. If not, they're empty.
+dnl If not successful, with_tcl has the value "no".
+
+AC_DEFUN([CMU_TCL], [
+# --- BEGIN CMU_TCL ---
+dnl To link against Tcl, configure does several things to make my life
+dnl "easier".
+dnl
+dnl * maybe ask the user where they think Tcl lives, and try to find it
+dnl * maybe ask the user what "tclsh" is called this week (i.e., "tclsh8.0")
+dnl * run tclsh, ask it for a path, then run that path through sed
+dnl * sanity check its result (many installs are a little broken)
+dnl * try to figure out where Tcl is based on this result
+dnl * try to guess where the Tcl include files are
+dnl
+dnl Notes from previous incarnations:
+dnl > XXX MUST CHECK FOR TCL BEFORE KERBEROS V4 XXX
+dnl > This is because some genius at MIT named one of the Kerberos v4
+dnl > library functions log(). This of course conflicts with the
+dnl > logarithm function in the standard math library, used by Tcl.
+dnl
+dnl > Checking for Tcl first puts -lm before -lkrb on the library list.
+dnl
+
+dnl Check for some information from the user on what the world looks like
+AC_ARG_WITH(tclconfig,[ --with-tclconfig=PATH use tclConfig.sh from PATH
+ (configure gets Tcl configuration from here)],
+ dnl trim tclConfig.sh off the end so we can add it back on later.
+ TclLibBase=`echo ${withval} | sed s/tclConfig.sh\$//`)
+AC_ARG_WITH(tcl, [ --with-tcl=PATH use Tcl from PATH],
+ TclLibBase="${withval}/lib")
+AC_ARG_WITH(tclsh, [ --with-tclsh=TCLSH use TCLSH as the tclsh program
+ (let configure find Tcl using this program)],
+ TCLSH="${withval}")
+
+if test "$TCLSH" = "no" -o "$with_tclconfig" = "no" ; then
+ AC_MSG_WARN([Tcl disabled because tclsh or tclconfig specified as "no"])
+ with_tcl=no
+fi
+
+if test "$with_tcl" != "no"; then
+ if test \! -z "$with_tclconfig" -a \! -d "$with_tclconfig" ; then
+ AC_MSG_ERROR([--with-tclconfig requires a directory argument.])
+ fi
+
+ if test \! -z "$TCLSH" -a \! -x "$TCLSH" ; then
+ AC_MSG_ERROR([--with-tclsh must specify an executable file.])
+ fi
+
+ if test -z "$TclLibBase"; then # do we already know?
+ # No? Run tclsh and ask it where it lives.
+
+ # Do we know where a tclsh lives?
+ if test -z "$TCLSH"; then
+ # Try and find tclsh. Any tclsh.
+ # If a new version of tcl comes out and unfortunately adds another
+ # filename, it should be safe to add it (to the front of the line --
+ # somef vendors have older, badly installed tclshs that we want to avoid
+ # if we can)
+ AC_PATH_PROGS(TCLSH, [tclsh8.1 tclsh8.0 tclsh], "unknown")
+ fi
+
+ # Do we know where to get a tclsh?
+ if test "${TCLSH}" != "unknown"; then
+ AC_MSG_CHECKING([where Tcl says it lives])
+ TclLibBase=`echo puts \\\$tcl_library | ${TCLSH} | sed -e 's,[^/]*$,,'`
+ AC_MSG_RESULT($TclLibBase)
+ fi
+ fi
+
+ if test -z "$TclLibBase" ; then
+ AC_MSG_RESULT([can't find tclsh])
+ AC_MSG_WARN([can't find Tcl installtion; use of Tcl disabled.])
+ with_tcl=no
+ else
+ AC_MSG_CHECKING([for tclConfig.sh])
+ # Check a list of places where the tclConfig.sh file might be.
+ for tcldir in "${TclLibBase}" \
+ "${TclLibBase}/.." \
+ "${TclLibBase}"`echo ${TCLSH} | sed s/sh//` ; do
+ if test -f "${tcldir}/tclConfig.sh"; then
+ TclLibBase="${tcldir}"
+ break
+ fi
+ done
+
+ if test -z "${TclLibBase}" ; then
+ AC_MSG_RESULT("unknown")
+ AC_MSG_WARN([can't find Tcl configuration; use of Tcl disabled.])
+ with_tcl=no
+ else
+ AC_MSG_RESULT(${TclLibBase}/)
+ fi
+
+ if test "${with_tcl}" != no ; then
+ AC_MSG_CHECKING([Tcl configuration on what Tcl needs to compile])
+ . ${TclLibBase}/tclConfig.sh
+ AC_MSG_RESULT(ok)
+ dnl no TK stuff for us.
+ dnl . ${TclLibBase}/tkConfig.sh
+ fi
+
+ if test "${with_tcl}" != no ; then
+ dnl Now, hunt for the Tcl include files, since we don't strictly
+ dnl know where they are; some folks put them (properly) in the
+ dnl default include path, or maybe in /usr/local; the *BSD folks
+ dnl put them in other places.
+ AC_MSG_CHECKING([where Tcl includes are])
+ for tclinclude in "${TCL_PREFIX}/include/tcl${TCL_VERSION}" \
+ "${TCL_PREFIX}/include/tcl" \
+ "${TCL_PREFIX}/include" ; do
+ if test -r "${tclinclude}/tcl.h" ; then
+ TCL_CPPFLAGS="-I${tclinclude}"
+ break
+ fi
+ done
+ if test -z "${TCL_CPPFLAGS}" ; then
+ AC_MSG_WARN(can't find Tcl includes; use of Tcl disabled.)
+ with_tcl=no
+ fi
+ AC_MSG_RESULT(${TCL_CPPFLAGS})
+ fi
+
+ # Finally, pick up the Tcl configuration if we haven't found an
+ # excuse not to.
+ if test "${with_tcl}" != no; then
+ dnl TCL_LIBS="${TK_LIB_SPEC} ${TK_XLIBSW} ${TCL_LD_SEARCH_FLAGS} ${TCL_LIB_SPEC}"
+ TCL_LIBS="${TCL_LD_SEARCH_FLAGS} ${TCL_LIB_SPEC} ${TCL_LIBS}"
+ fi
+ fi
+fi
+
+AC_SUBST(TCL_DEFS)
+AC_SUBST(TCL_LIBS)
+AC_SUBST(TCL_CPPFLAGS)
+
+# --- END CMU_TCL ---
+]) dnl CMU_TCL
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/telnet.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/telnet.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/telnet.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/telnet.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,180 @@
+dnl telnet.m4--telnet special macros
+dnl Derrick Brashear
+dnl $Id: telnet.m4,v 1.12.4.1 2006/05/23 13:27:20 murch Exp $
+
+AC_DEFUN([CMU_TELNET_WHICH_TERM], [
+AC_CHECK_LIB(termlib, setupterm, [
+AC_DEFINE(HAVE_SETUPTERM,, [Define to 1 if you have the `setupterm' function.])
+AC_CHECK_LIB(c, setupterm, TCLIB="/usr/ccs/lib/libtermlib.a",TCLIB="-ltermlib","/usr/ccs/lib/libtermlib.a")
+], TCLIB="-ltermcap")
+])
+
+AC_DEFUN([CMU_TELNET_CC_T],
+[
+AC_MSG_CHECKING(for cc_t definition)
+AC_CACHE_VAL(cmu_cv_cc_t_definition, [
+AC_TRY_COMPILE(
+[
+#ifdef HAVE_SYS_TERMIOS_H
+#include <sys/termios.h>
+#else
+#ifdef HAVE_SYS_TERMIO_H
+#include <sys/termio.h>
+#endif
+#endif
+],
+[cc_t ffoo;],
+cmu_cv_cc_t_definition=yes,
+cmu_cv_cc_t_definition=no)
+])
+if test "$cmu_cv_cc_t_definition" = "no"; then
+ AC_DEFINE(NO_CC_T,, [The type `cc_t' is not available])
+fi
+AC_MSG_RESULT($cmu_cv_cc_t_definition)
+])
+
+AC_DEFUN([CMU_STREAMS], [
+if test "$ac_cv_header_sys_stropts_h" = "yes" -o "$ac_cv_header_stropts_h" = "yes"; then
+ AC_DEFINE(HAVE_STREAMS,, [STREAMS are available])dnl
+fi
+])
+
+AC_DEFUN([CMU_TERMIO_MODEL], [
+if test "$ac_cv_header_sys_termio_h" = "yes" -o "$ac_cv_header_sys_termios_h" = "yes"; then
+ AC_DEFINE(USE_TERMIO,, [Use termios for tty configuration])dnl
+ if test "$ac_cv_header_sys_termios_h" = "no"; then
+ AC_DEFINE(SYSV_TERMIO,, [Use SysV termios])dnl
+ fi
+fi
+])
+
+AC_DEFUN([CMU_TELNET_DES_STRING_TO_KEY_PROTO], [
+AC_MSG_CHECKING(for des_string_to_key prototype)
+AC_CACHE_VAL(cmu_cv_des_string_to_key_proto, [
+AC_TRY_COMPILE(
+[#include <des.h>
+typedef unsigned char Block[8];
+int des_string_to_key(char *, Block);],
+[int foo = des_string_to_key(NULL, NULL);],
+cmu_cv_des_string_to_key_proto=no,
+cmu_cv_des_string_to_key_proto=yes)
+])
+if test "$cmu_cv_des_string_to_key_proto" = yes; then
+ AC_DEFINE(HAVE_DES_STRING_TO_KEY_PROTO,, [define to 1 if `des_string_to_key' has a prototype])dnl
+fi
+AC_MSG_RESULT($cmu_cv_des_string_to_key_proto)
+])
+
+AC_DEFUN([CMU_TELNET_DES_KEY_SCHED_PROTO], [
+AC_MSG_CHECKING(for des_key_sched prototype)
+AC_CACHE_VAL(cmu_cv_des_key_sched_proto, [
+AC_TRY_COMPILE(
+[
+#include <des.h>
+char des_key_sched(int foo, int bar);
+],
+[des_key_sched(NULL, NULL);],
+cmu_cv_des_key_sched_proto=no,
+cmu_cv_des_key_sched_proto=yes)
+])
+if test "$cmu_cv_des_key_sched_proto" = yes; then
+ AC_DEFINE(HAVE_DES_KEY_SCHED_PROTO,, [define to 1 if `des_key_sched' has a prototype])dnl
+fi
+AC_MSG_RESULT($cmu_cv_des_key_sched_proto)
+])
+
+AC_DEFUN([CMU_TELNET_DES_SET_RANDOM_GENERATOR_SEED_PROTO], [
+AC_MSG_CHECKING(for des_set_random_generator_seed prototype)
+AC_CACHE_VAL(cmu_cv_des_set_random_generator_seed_proto, [
+AC_TRY_COMPILE(
+[
+#include <des.h>
+char des_set_random_generator_seed(int foo, int bar);
+],
+[des_set_random_generator_seed(NULL, NULL);],
+cmu_cv_des_set_random_generator_seed_proto=no,
+cmu_cv_des_set_random_generator_seed_proto=yes)
+])
+if test "$cmu_cv_des_set_random_generator_seed_proto" = yes; then
+ AC_DEFINE(HAVE_DES_SET_RANDOM_GENERATOR_SEED_PROTO,, [define to 1 if `des_set_random_generator_seed' has a prototype])dnl
+fi
+AC_MSG_RESULT($cmu_cv_des_set_random_generator_seed_proto)
+])
+
+AC_DEFUN([CMU_TELNET_DES_NEW_RANDOM_KEY_PROTO], [
+AC_MSG_CHECKING(for des_new_random_key prototype)
+AC_CACHE_VAL(cmu_cv_des_new_random_key_proto, [
+AC_TRY_COMPILE(
+[
+#include <des.h>
+char des_new_random_key(int foo, int bar);
+],
+[des_new_random_key(NULL, NULL);],
+cmu_cv_des_new_random_key_proto=no,
+cmu_cv_des_new_random_key_proto=yes)
+])
+if test "$cmu_cv_des_new_random_key_proto" = yes; then
+ AC_DEFINE(HAVE_DES_NEW_RANDOM_KEY_PROTO,, [define to 1 if `des_new_random_key' has a prototype])dnl
+fi
+AC_MSG_RESULT($cmu_cv_des_new_random_key_proto)
+])
+
+AC_DEFUN([CMU_TELNET_DES_ECB_ENCRYPT_PROTO], [
+AC_MSG_CHECKING(for des_ecb_encrypt prototype)
+AC_CACHE_VAL(cmu_cv_des_ecb_encrypt_proto, [
+AC_TRY_COMPILE(
+[#include <des.h>
+typedef unsigned char Block[8];
+typedef struct { Block _; } Schedule[16];
+void des_ecb_encrypt(Block, Block, Schedule, int);],
+[int foo = des_ecb_encrypt(NULL, NULL, NULL, 0);],
+cmu_cv_des_ecb_encrypt_proto=no,
+cmu_cv_des_ecb_encrypt_proto=yes)
+])
+if test "$cmu_cv_des_ecb_encrypt_proto" = yes; then
+ AC_DEFINE(HAVE_DES_ECB_ENCRYPT_PROTO,, [define to 1 if `des_ecb_encrypt' has a prototype])dnl
+fi
+AC_MSG_RESULT($cmu_cv_des_ecb_encrypt_proto)
+])
+
+AC_DEFUN([CMU_TELNET_GETTYTAB], [
+ if test -f "/etc/gettytab"; then
+ AC_CHECK_FUNCS(getent getstr)
+ if test "X$ac_cv_func_getent" != "Xyes"; then
+ AC_DEFINE(HAVE_GETTYTAB,, [gettytab support is present])
+ if test "X$ac_cv_func_getstr" = "Xyes"; then
+ CFLAGS="$CFLAGS -Dgetstr=ggetstr"
+ fi
+ fi
+ else
+ AC_CHECK_FUNCS(cgetent)
+ fi
+ ])
+
+AC_DEFUN([CMU_TELNET_ISSUE], [
+ if test -f "/etc/issue.net"; then
+ AC_DEFINE(ISSUE_FILE, "/etc/issue.net", [path of issue file to use])
+ else
+ if test -f "/etc/issue"; then
+ AC_DEFINE(ISSUE_FILE, "/etc/issue", [path of issue file to use])
+ fi
+ fi
+ ])
+
+AC_DEFUN([CMU_TELNET_PTYDIR], [
+
+ if test -d /dev/pts -o -d /dev/pty; then
+ case "${host}" in
+ *-*-irix*)
+ ;;
+ *-*-linux*)
+ AC_DEFINE(PTYDIR,, [Has /dev/ptX and pty allocation funcs])
+ ;;
+ *)
+ AC_DEFINE(PTYDIR,, [Has /dev/ptX and pty allocation funcs])
+ AC_DEFINE(STREAMSPTY,, [ptys are streams devices])
+ ;;
+ esac
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ucdsnmp.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ucdsnmp.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ucdsnmp.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/ucdsnmp.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,71 @@
+dnl look for the (ucd|net)snmp libraries
+dnl $Id: ucdsnmp.m4,v 1.8.2.2 2006/05/23 13:27:20 murch Exp $
+
+AC_DEFUN([CMU_UCDSNMP], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+ AC_REQUIRE([CMU_SOCKETS])
+ AC_ARG_WITH(snmp,
+ [ --with-snmp=DIR use ucd|net snmp (rooted in DIR) [yes] ],
+ with_snmp=$withval, with_snmp=yes)
+
+ dnl
+ dnl Maintain backwards compatibility with old --with-ucdsnmp option
+ dnl
+ AC_ARG_WITH(ucdsnmp,, with_snmp=$withval,)
+
+if test "$with_snmp" != "no"; then
+
+ dnl
+ dnl Try net-snmp first
+ dnl
+ if test "$with_snmp" = "yes"; then
+ AC_PATH_PROG(SNMP_CONFIG,net-snmp-config,,[/usr/local/bin:$PATH])
+ else
+ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
+ fi
+
+ if test -x "$SNMP_CONFIG"; then
+ AC_MSG_CHECKING(NET SNMP libraries)
+
+ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
+ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
+
+ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
+ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
+ LIB_UCDSNMP=$SNMP_LIBS
+ AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
+ AC_SUBST(LIB_UCDSNMP)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([Could not find the required paths. Please check your net-snmp installation.])
+ fi
+ else
+ dnl
+ dnl Try ucd-snmp if net-snmp test failed
+ dnl
+ if test "$with_snmp" != no; then
+ if test -d "$with_snmp"; then
+ CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
+ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ AC_CHECK_LIB(snmp, sprint_objid, [
+ AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)],
+ with_snmp=no, ${LIB_SOCKET})
+ LIBS="$cmu_save_LIBS"
+ fi
+ AC_MSG_CHECKING(UCD SNMP libraries)
+ AC_MSG_RESULT($with_snmp)
+ LIB_UCDSNMP=""
+ if test "$with_snmp" != no; then
+ AC_DEFINE(HAVE_UCDSNMP,1,[Do we have UCD-SNMP support?])
+ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
+ AC_CHECK_LIB(rpm, rpmdbOpen,
+ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt",,-lpopt)
+ fi
+ AC_SUBST(LIB_UCDSNMP)
+ fi
+fi
+
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/util.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/util.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/util.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/util.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+dnl util.m4--robutil macro
+dnl Rob Earhart
+dnl $Id: util.m4,v 1.10 2003/10/08 20:35:26 rjs3 Exp $
+
+dnl robutil is a collection of stuff I (Rob Earhart) have found useful
+dnl to have around when writing code; it's the stuff I wind up rewriting
+dnl every time I start a project. This does the autoconf setup
+dnl necessary for it.
+
+dnl This is a helper macro, here because there're times when I
+dnl want to know if a type exists or not, but don't want to define
+dnl it to something else (the way AC_CHECK_TYPE does).
+
+AC_DEFUN([CMU_CHECK_TYPE_EXISTS], [
+changequote(<<, >>)
+define(<<CMU_TYPE_NAME>>, translit(CMU_HAVE_$1, [a-z *], [A-Z_P]))
+define(<<CMU_CV_NAME>>, translit(cmu_cv_type_$1, [ *], [_p]))
+changequote([, ])
+ AC_REQUIRE([AC_HEADER_STDC])
+ AC_MSG_CHECKING(for $1)
+ AC_CACHE_VAL(CMU_CV_NAME, [
+ AC_EGREP_CPP([$1[[^a-zA-Z_0-9]]], [
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+], CMU_CV_NAME=yes, CMU_CV_NAME=no)])
+ AC_MSG_RESULT($CMU_CV_NAME)
+ if test $CMU_CV_NAME = yes; then
+ AC_DEFINE(CMU_TYPE_NAME)
+ fi
+])
+
+AC_DEFUN([CMU_UTIL], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AM_PROG_CC_STDC])
+ AC_REQUIRE([AC_PROG_RANLIB])
+ AC_REQUIRE([CMU_NANA])
+ AC_REQUIRE([CMU_COMERR])
+ AC_REQUIRE([AC_HEADER_STDC])
+ AC_REQUIRE([AC_TYPE_MODE_T])
+ AC_REQUIRE([AC_C_CONST])
+ AC_CHECK_HEADERS(sys/sysmacros.h)
+ AC_CHECK_HEADER(inttypes.h, AC_DEFINE(HAVE_INTTYPES_H),
+ CMU_CHECK_TYPE_EXISTS(int8_t)
+ CMU_CHECK_TYPE_EXISTS(uint8_t)
+ CMU_CHECK_TYPE_EXISTS(u_int8_t)
+ CMU_CHECK_TYPE_EXISTS(int16_t)
+ CMU_CHECK_TYPE_EXISTS(uint16_t)
+ CMU_CHECK_TYPE_EXISTS(u_int16_t)
+ CMU_CHECK_TYPE_EXISTS(int32_t)
+ CMU_CHECK_TYPE_EXISTS(uint32_t)
+ CMU_CHECK_TYPE_EXISTS(u_int32_t)
+ )
+ dnl I'm not sure why autoconf gets so annoyed when these
+ dnl are embedded as part of the inttypes check, but, whatever,
+ dnl this works.
+ if test "$ac_cv_header_inttypes_h" = no; then
+ AC_CHECK_SIZEOF(short)
+ AC_CHECK_SIZEOF(int)
+ AC_CHECK_SIZEOF(long)
+ fi
+
+ AC_CHECK_TYPE(ssize_t, signed)
+ THREADED_UTIL_OBJECTS=""
+ AC_SUBST(THREADED_UTIL_OBJECTS)
+])
+
+AC_DEFUN([CMU_THREAD_UTIL], [
+ AC_REQUIRE([CMU_UTIL])
+ THREADED_UTIL_OBJECTS="refcache.o rselock.o"
+])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/zephyr.m4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/zephyr.m4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/zephyr.m4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/cmulocal/zephyr.m4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,155 @@
+dnl zephyr.m4--Zephyr libraries and includes
+dnl based on kafs.m4, by
+dnl Derrick Brashear
+dnl from KTH kafs and Arla
+dnl $Id: zephyr.m4,v 1.1.2.2 2006/05/23 13:27:21 murch Exp $
+
+AC_DEFUN([CMU_ZEPHYR_INC_WHERE1], [
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$saved_CPPFLAGS -I$1"
+AC_TRY_COMPILE(
+[#include <zephyr/zephyr.h>],
+[ZNotice_t foo;],
+ac_cv_found_zephyr_inc=yes,
+ac_cv_found_zephyr_inc=no)
+CPPFLAGS=$saved_CPPFLAGS
+])
+
+AC_DEFUN([CMU_ZEPHYR_INC_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for zephyr headers in $i)
+ CMU_ZEPHYR_INC_WHERE1($i)
+ CMU_TEST_INCPATH($i, zephyr/zephyr)
+ if test "$ac_cv_found_zephyr_inc" = "yes"; then
+ ac_cv_zephyr_where_inc=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_ZEPHYR_LIB_WHERE1], [
+saved_LIBS=$LIBS
+LIBS="$saved_LIBS -L$1 -lzephyr $KRB_LIB_FLAGS"
+AC_TRY_LINK(,
+[ZInitialize();],
+[ac_cv_found_zephyr_lib=yes],
+ac_cv_found_zephyr_lib=no)
+LIBS=$saved_LIBS
+])
+
+AC_DEFUN([CMU_ZEPHYR_LIB_WHERE], [
+ for i in $1; do
+ AC_MSG_CHECKING(for zephyr libraries in $i)
+ CMU_ZEPHYR_LIB_WHERE1($i)
+ dnl deal with false positives from implicit link paths
+ CMU_TEST_LIBPATH($i, zephyr)
+ if test "$ac_cv_found_zephyr_lib" = "yes" ; then
+ ac_cv_zephyr_where_lib=$i
+ AC_MSG_RESULT(found)
+ break
+ else
+ AC_MSG_RESULT(not found)
+ fi
+ done
+])
+
+AC_DEFUN([CMU_ZEPHYR], [
+AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
+AC_REQUIRE([CMU_SOCKETS])
+AC_REQUIRE([CMU_KRB4])
+AC_ARG_WITH(zephyr,
+ [ --with-zephyr=PREFIX Compile with Zephyr support],
+ [if test "X$with_zephyr" = "X"; then
+ with_zephyr=yes
+ fi])
+AC_ARG_WITH(zephyr-lib,
+ [ --with-zephyr-lib=dir use zephyr libraries in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-zephyr-lib])
+ fi])
+AC_ARG_WITH(zephyr-include,
+ [ --with-zephyr-include=dir use zephyr headers in dir],
+ [if test "$withval" = "yes" -o "$withval" = "no"; then
+ AC_MSG_ERROR([No argument for --with-zephyr-include])
+ fi])
+
+ if test "X$with_zephyr" != "X"; then
+ if test "$with_zephyr" != "yes" -a "$with_zephyr" != no; then
+ ac_cv_zephyr_where_lib=$with_zephyr/$CMU_LIB_SUBDIR
+ ac_cv_zephyr_where_inc=$with_zephyr/include
+ fi
+ fi
+
+ if test "$with_zephyr" != "no"; then
+ if test "X$with_zephyr_lib" != "X"; then
+ ac_cv_zephyr_where_lib=$with_zephyr_lib
+ fi
+ if test "X$ac_cv_zephyr_where_lib" = "X"; then
+ CMU_ZEPHYR_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
+ fi
+
+ if test "X$with_zephyr_include" != "X"; then
+ ac_cv_zephyr_where_inc=$with_zephyr_include
+ fi
+ if test "X$ac_cv_zephyr_where_inc" = "X"; then
+ CMU_ZEPHYR_INC_WHERE(/usr/athena/include /usr/local/include /usr/include)
+ fi
+ fi
+
+ AC_MSG_CHECKING(whether to include zephyr)
+ if test "X$ac_cv_zephyr_where_lib" = "X" -a "X$ac_cv_zephyr_where_inc" = "X"; then
+ ac_cv_found_zephyr=no
+ AC_MSG_RESULT(no)
+ else
+ ac_cv_found_zephyr=yes
+ AC_MSG_RESULT(yes)
+ ZEPHYR_INC_DIR=$ac_cv_zephyr_where_inc
+ ZEPHYR_LIB_DIR=$ac_cv_zephyr_where_lib
+ ZEPHYR_INC_FLAGS="-I${ZEPHYR_INC_DIR}"
+ ZEPHYR_LIB_FLAGS="-L${ZEPHYR_LIB_DIR} -lzephyr"
+ AC_SUBST(ZEPHYT_INC_FLAGS)
+ AC_SUBST(ZEPHYR_LIB_FLAGS)
+ if test "X$RPATH" = "X"; then
+ RPATH=""
+ fi
+ case "${host}" in
+ *-*-linux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${ZEPHYR_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
+ fi
+ ;;
+ *-*-hpux*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,+b${ZEPHYR_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
+ fi
+ ;;
+ *-*-irix*)
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-rpath,${ZEPHYR_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
+ fi
+ ;;
+ *-*-solaris2*)
+ if test "$ac_cv_prog_gcc" = yes; then
+ if test "X$RPATH" = "X"; then
+ RPATH="-Wl,-R${ZEPHYR_LIB_DIR}"
+ else
+ RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
+ fi
+ else
+ RPATH="${RPATH} -R${ZEPHYR_LIB_DIR}"
+ fi
+ ;;
+ esac
+ AC_SUBST(RPATH)
+ fi
+ ])
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.guess
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.guess?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.guess (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.guess Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1121 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner at cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <autoconf-patches at gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+ if test x"$HOST_CC" != x; then
+ CC_FOR_BUILD="$HOST_CC"
+ else
+ if test x"$CC" != x; then
+ CC_FOR_BUILD="$CC"
+ else
+ CC_FOR_BUILD=cc
+ fi
+ fi
+fi
+
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <<EOF >$dummy.s
+ .globl main
+ .ent main
+main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ arm32:NetBSD:*:*)
+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ SR2?01:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:NetBSD:*:*)
+ echo powerpc-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i?86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:4)
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=4.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ sed 's/^ //' << EOF >$dummy.c
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
+ esac
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i?86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ F300:UNIX_System_V:*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:Linux:*:*)
+
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_help_string=`cd /; ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ *ia64)
+ echo "${UNAME_MACHINE}-unknown-linux"
+ exit 0
+ ;;
+ i?86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0
+ ;;
+ i?86coff)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0
+ ;;
+ sparclinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ armlinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32arm*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ armelf_linux*)
+ echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ exit 0
+ ;;
+ m68klinux)
+ echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+ exit 0
+ ;;
+ elf32ppc)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unkown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0
+ ;;
+ esac
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ sed 's/^ //' <<EOF >$dummy.s
+ .globl main
+ .ent main
+ main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i?86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i?86:*:5:7*)
+ # Fixed at (any) Pentium or better
+ UNAME_MACHINE=i586
+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ i?86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel at ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes at openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf at swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:*:6*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-qnx-qnx${UNAME_VERSION}
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.h.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.h.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.h.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.h.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,519 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+
+
+/* $Id: configure.in,v 1.268.2.23 2005/04/12 20:05:20 shadow Exp $ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _CYRUS_IMAPD_CONFIG_H_
+#define _CYRUS_IMAPD_CONFIG_H_
+
+
+/* Should the AFS PTS plugin use krb5? */
+#undef AFSPTS_USE_KRB5
+
+/* Where will we be installed? */
+#undef CYRUS_PATH
+
+/* What user will we run as? */
+#undef CYRUS_USER
+
+/* Alternative to /dev/urandom? */
+#undef EGD_SOCKET
+
+/* Enable the LISTEXT extension? */
+#undef ENABLE_LISTEXT
+
+/* Do we have a decent regex library? */
+#undef ENABLE_REGEX
+
+/* Enable Netscape Menu Option Hack? */
+#undef ENABLE_X_NETSCAPE_HACK
+
+/* Extra version information for imap/version.h */
+#undef EXTRA_IDENT
+
+/* Do we have strerror()? */
+#undef HAS_STRERROR
+
+/* Should we build afskrb pts module? */
+#undef HAVE_AFSKRB
+
+/* Does SASL support APOP? */
+#undef HAVE_APOP
+
+/* Build in Berkeley DB support? */
+#undef HAVE_BDB
+
+/* Define to 1 if you have the `daemon' function. */
+#undef HAVE_DAEMON
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dns_lookup' function. */
+#undef HAVE_DNS_LOOKUP
+
+/* Define to 1 if you have the `dn_expand' function. */
+#undef HAVE_DN_EXPAND
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* We need et/com_err.h */
+#undef HAVE_ET_COM_ERR_H
+
+/* Do we have fdatasync()? */
+#undef HAVE_FDATASYNC
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Do we have a getaddrinfo? */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `getdtablesize' function. */
+#undef HAVE_GETDTABLESIZE
+
+/* Do we have a getnameinfo? */
+#undef HAVE_GETNAMEINFO
+
+/* Define to 1 if you have the `getrlimit' function. */
+#undef HAVE_GETRLIMIT
+
+/* Define if you have the gssapi.h header file */
+#undef HAVE_GSSAPI_H
+
+/* Define to 1 if you have the `gsskrb5_register_acceptor_identity' function.
+ */
+#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
+
+/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
+
+/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
+#undef HAVE_GSS_C_NT_USER_NAME
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Support for Kerberos? */
+#undef HAVE_KRB
+
+/* Should we build ldap pts module? */
+#undef HAVE_LDAP
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+#undef HAVE_LIBDL
+
+/* Define to 1 if you have the `fl' library (-lfl). */
+#undef HAVE_LIBFL
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+#undef HAVE_LIBRESOLV
+
+/* Do we have TCP wrappers? */
+#undef HAVE_LIBWRAP
+
+/* Define to 1 if you support file names longer than 14 characters. */
+#undef HAVE_LONG_FILE_NAMES
+
+/* Does the compiler support long long int? */
+#undef HAVE_LONG_LONG_INT
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Do we have Net-SNMP support? */
+#undef HAVE_NETSNMP
+
+/* Do we have an rlim_t? */
+#undef HAVE_RLIM_T
+
+/* Do we have rxposix.h? */
+#undef HAVE_RX
+
+/* Define to 1 if you have the `setrlimit' function. */
+#undef HAVE_SETRLIMIT
+
+/* Define to 1 if you have the `setsid' function. */
+#undef HAVE_SETSID
+
+/* Define to 1 if you have the `shutdown' function. */
+#undef HAVE_SHUTDOWN
+
+/* Does sockaddr have an sa_len? */
+#undef HAVE_SOCKADDR_SA_LEN
+
+/* Do we have a socklen_t? */
+#undef HAVE_SOCKLEN_T
+
+/* Build with SSL support? */
+#undef HAVE_SSL
+
+/* Is there an ss_family in sockaddr_storage? */
+#undef HAVE_SS_FAMILY
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strlcat' function. */
+#undef HAVE_STRLCAT
+
+/* Define to 1 if you have the `strlcpy' function. */
+#undef HAVE_STRLCPY
+
+/* Do we have a sockaddr_storage? */
+#undef HAVE_STRUCT_SOCKADDR_STORAGE
+
+/* Define to 1 if `tm_zone' is member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_ZONE
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+#undef HAVE_SYS_SOCKIO_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+ `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#undef HAVE_TM_ZONE
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+ `tzname'. */
+#undef HAVE_TZNAME
+
+/* Do we have UCD-SNMP support? */
+#undef HAVE_UCDSNMP
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Build with Zephyr support? */
+#undef HAVE_ZEPHYR
+
+/* define if your compiler has __attribute__ */
+#undef HAVE___ATTRIBUTE__
+
+/* Name of the pidfile for master */
+#undef MASTER_PIDFILE
+
+/* Do we have a sys_errlist? */
+#undef NEED_SYS_ERRLIST
+
+/* Use "imap" as sieve service name? */
+#undef OLD_SIEVE_SERVICE_NAME
+
+/* Configure OpenSSL to provide krb4-compatible legacy des apis */
+#undef OPENSSL_DES_LIBDES_COMPATIBILITY
+
+/* Configure OpenSSL to provide legacy des apis */
+#undef OPENSSL_ENABLE_OLD_DES_SUPPORT
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Directiory to use for service binaries */
+#undef SERVICE_PATH
+
+/* The size of a `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of a `long long int', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG_INT
+
+/* The size of a `unsigned long long int', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG_INT
+
+/* Do we already have setproctitle? */
+#undef SPT_TYPE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Config File Location */
+#undef SYSCONFDIR
+
+/* Syslog facility to use. */
+#undef SYSLOG_FACILITY
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Build in Sieve support? */
+#undef USE_SIEVE
+
+/* Build in PTS support? */
+#undef WITH_PTS
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#undef YYTEXT_POINTER
+
+/* Define to 1 if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+
+/* time.h */
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+/* com_err.h, as needed */
+#ifndef IN_COM_ERR
+#ifdef HAVE_ET_COM_ERR_H
+#include <et/com_err.h>
+#else
+#include <com_err.h>
+#endif /* HAVE_ET_COM_ERR_H */
+#endif /* IN_COM_ERR */
+
+/* This allows us to work even when we don't have an fdatasync */
+#ifndef HAVE_FDATASYNC
+#define fdatasync(fd) fsync(fd)
+#endif
+
+/* A similar setup for not having O_DSYNC */
+#include <fcntl.h>
+
+#ifndef O_DSYNC
+# ifdef O_SYNC
+# define O_DSYNC O_SYNC /* POSIX */
+# else
+# define O_DSYNC O_FSYNC /* BSD */
+# endif
+#endif
+
+#ifndef HAVE___ATTRIBUTE__
+/* Can't use attributes... */
+#define __attribute__(foo)
+#endif
+
+#ifndef HAVE_SOCKLEN_T
+typedef unsigned int socklen_t;
+#endif
+
+#ifndef HAVE_RLIM_T
+typedef int rlim_t;
+#endif
+
+/* some potentially memory saving tradeoffs,
+ preconfigured in memory-saving mode */
+
+/* save the cmdlines for the ID command */
+#undef ID_SAVE_CMDLINE
+
+/* IPv6 things */
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
+#define _SS_MAXSIZE 128 /* Implementation specific max size */
+#define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
+
+struct sockaddr_storage {
+ struct sockaddr ss_sa;
+ char __ss_pad2[_SS_PADSIZE];
+};
+# define ss_family ss_sa.sa_family
+# define HAVE_SS_FAMILY
+#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
+
+#ifndef HAVE_SS_FAMILY
+#define ss_family __ss_family
+#endif
+
+#ifndef AF_INET6
+/* Define it to something that should never appear */
+#define AF_INET6 AF_MAX
+#endif
+
+#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
+#include "gai.h"
+#endif
+
+/* End IPv6 things */
+
+#ifdef OLD_SIEVE_SERVICE_NAME
+#define SIEVE_SERVICE_NAME "imap"
+#else
+#define SIEVE_SERVICE_NAME "sieve"
+#endif
+
+/* filenames */
+#define FNAME_DBDIR "/db"
+#define FNAME_USERDIR "/user/"
+#define FNAME_DOMAINDIR "/domain/"
+#define FNAME_LOGDIR "/log/"
+#define FNAME_PTSDB "/ptclient/ptscache.db"
+#define CONFIG_FILENAME (SYSCONFDIR "/imapd.conf")
+#define DEFAULT_MASTER_CONFIG_FILENAME (SYSCONFDIR "/cyrus.conf")
+
+#ifndef HAVE_SHUTDOWN
+#define shutdown(fd, mode) 0
+#endif
+
+/* compile time options; think carefully before modifying */
+enum {
+ /* should we send an UNAVAILABLE message to master when
+ * a service is exiting (master is already going to be
+ * informed of the exit by the SIGCHLD signal anyway) ? */
+ MESSAGE_MASTER_ON_EXIT = 0,
+
+ /* should a hierarchical rename stop on error? */
+ RENAME_STOP_ON_ERROR = 1,
+
+ /* should we call fsync() to maybe help with softupdates? (it should) */
+ APPEND_ULTRA_PARANOID = 1,
+
+ /* should we log extra information at the DEBUG level for DB stuff?
+ * 0 -> nothing; 1 -> some; higher -> even more */
+ CONFIG_DB_VERBOSE = 1,
+
+ /* log timing information to LOG_DEBUG */
+ CONFIG_TIMING_VERBOSE = 0,
+
+ /* should we be pedantic about namespace or sleezy? */
+ SLEEZY_NAMESPACE = 1,
+
+ /* should we do a fast TLS session shutdown? */
+ TLS_FAST_SHUTDOWN = 1,
+
+ /* should we use the SQUAT engine to accelerate SEARCH? */
+ SQUAT_ENGINE = 1,
+
+ /* should we have long LMTP error messages? */
+ LMTP_LONG_ERROR_MSGS = 1
+};
+
+#endif /* _CYRUS_IMAPD_CONFIG_H_ */
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.sub
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.sub?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.sub (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/config.sub Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1232 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+ echo Configuration name missing. 1>&2
+ echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+ echo "or $0 ALIAS" 1>&2
+ echo where ALIAS is a recognized configuration type. 1>&2
+ exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+ *local*)
+ echo $1
+ exit 0
+ ;;
+ *)
+ ;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ linux-gnu*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ | 580 | i960 | h8300 \
+ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+ | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
+ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
+ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+ | mips64vr5000 | miprs64vr5000el | mcore \
+ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+ | thumb | d10v | fr30)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i[34567]86)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ # FIXME: clean up the formatting here.
+ vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+ | xmp-* | ymp-* \
+ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+ | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
+ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+ | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+ | mipstx39-* | mipstx39el-* | mcore-* \
+ | f301-* | armv*-* | t3e-* \
+ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-cbm
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-cbm
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-cbm
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
+ ;;
+ [ctj]90-cray)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i[34567]86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i[34567]86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i[34567]86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i[34567]86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ i386-go32 | go32)
+ basic_machine=i386-unknown
+ os=-go32
+ ;;
+ i386-mingw32 | mingw32)
+ basic_machine=i386-unknown
+ os=-mingw32
+ ;;
+ i386-qnx | qnx)
+ basic_machine=i386-qnx
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ msdos)
+ basic_machine=i386-unknown
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexen)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexen-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=rs6000-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=t3e-cray
+ os=-unicos
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xmp)
+ basic_machine=xmp-cray
+ os=-unicos
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sparc | sparcv9)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -qnx)
+ os=-qnx4
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -*MiNT)
+ os=-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f301-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -*MiNT)
+ vendor=atari
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure Sat Aug 26 02:00:13 2006
@@ -1,0 +1,19309 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="imap/imapd.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAKEDEPEND cyrus_prefix service_path cyrus_user cyrus_group CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP AWK LIBOBJS LIB_SOCKET IPV6_OBJS PRE_SUBDIRS EXTRA_SUBDIRS DEPLIBS LOCALDEFS BDB_INC BDB_LIB CYRUSDB_OBJS SIEVE_OBJS SIEVE_LIBS SIEVE_CPPFLAGS YACC LEX LEXLIB LEX_OUTPUT_ROOT SIEVE_SUBDIRS WITH_NONBLOCK WITH_GMTOFF WITH_MAP WITH_LOCK cyrus_sigveclib AFS_LIBS AFS_LDFLAGS LDAP_CPPFLAGS LDAP_LDFLAGS LDAP_LIBS SERVER_SUBDIRS OPENSSL_INC OPENSSL_LIB ZEPHYR_LIBS ZEPHYR_CPPFLAGS IMAP_PROGS COMPILE_ET COM_ERR_LIBS COM_ERR_LDFLAGS COM_ERR_CPPFLAGS LIB_CRYPT GSSAPI_LIBS GSSAPIBASE_LIBS LIB_DYN_SASL DYNSASLFLAGS LIB_SASL SASLFLAGS PERL PERL_CCCDLFLAGS MD5OBJ SNMP_SUBDIRS CMU_LIB_SUBDIR LIB_WRAP SNMP_CONFIG LIB_UCDSNMP LIB_RT IMAP_COM_ERR_LIBS IMAP_LIBS PERL_SUBDIRS PERL_DEPSUBDIRS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-sieve disable Sieve support
+ --enable-krb5afspts compile afskrb PTS module with krb5 support
+ --disable-server disable compiling servers
+ --enable-statickrb link Kerberos statically
+ --enable-idled enable IMAP idled support
+ --enable-nntp enable NNTP support
+ --enable-murder enable IMAP Murder support
+ --enable-replication enable replication support (experimental)
+ --enable-cmulocal enable CMU-specific local support
+ --enable-oldsievename enable the use of 'imap' as the sieve service name
+ --enable-listext enable IMAP List extensions
+ --enable-netscapehack enable Netscape hack for the menu option
+ in Communicator to Administrate Mail
+ --enable-gssapi=<DIR> enable GSSAPI authentication [yes]
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-extraident=STRING use STRING as extra version information
+
+ --with-cyrus-prefix=DIR use DIR as cyrus server install directory
+ --with-service-path=DIR use DIR as service install directory
+ --with-cyrus-user=USERID use USERID cyrus userid
+ --with-cyrus-group=GROUPID use GROUPID cyrus group
+ --with-bdb=DIR use Berkeley DB (in DIR) [yes]
+ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR
+ --with-bdb-incdir=DIR Berkeley DB include files are in DIR
+ --with-lock=METHOD force use of METHOD for locking (flock or fcntl)
+ --with-afs=PATH use AFS libraries from PATH
+ --with-ldap=DIR use LDAP (in DIR) (experimental) /usr/local
+ --with-krb=PATH use Kerberos from PATH
+ --with-krbimpl=\kth|mit\ assume Kerberos 4 from KTH or MIT
+ --with-krbdes use Kerberos DES implementation [yes]
+ --with-openssl=PATH use OpenSSL from PATH
+ --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
+ for systems without /dev/urandom
+ --with-zephyr=PATH enable Zephyr notification (installed on PATH)
+ --with-pidfile=PATH pidfile in PATH (/var/run/cyrus-master.pid)
+ --with-com_err=PATH use com_err from path -- includes in PATH/include,
+ libs in PATH/lib, and compile_et in PATH/bin
+ --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6)
+ --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
+ choose specific GSSAPI implementation [[auto]]
+ --with-sasl=DIR Compile with libsasl2 in <DIR>
+ --with-staticsasl=DIR Compile with staticly linked libsasl2 in <DIR>
+ --with-perl=PERL use PERL for perl
+ --with-lib-subdir=DIR Find libraries in DIR instead of lib
+ --with-libwrap=DIR use libwrap (rooted in DIR) yes
+ --with-snmp=DIR use ucd|net snmp (rooted in DIR) yes
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h"
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+
+# Check whether --with-extraident or --without-extraident was given.
+if test "${with_extraident+set}" = set; then
+ withval="$with_extraident"
+
+cat >>confdefs.h <<_ACEOF
+#define EXTRA_IDENT "$withval"
+_ACEOF
+
+fi;
+
+# Extract the first word of "makedepend", so it can be a program name with args.
+set dummy makedepend; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEDEPEND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKEDEPEND"; then
+ ac_cv_prog_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MAKEDEPEND="makedepend"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_MAKEDEPEND" && ac_cv_prog_MAKEDEPEND="`cd ${srcdir};pwd`/tools/not-mkdep"
+fi
+fi
+MAKEDEPEND=$ac_cv_prog_MAKEDEPEND
+if test -n "$MAKEDEPEND"; then
+ echo "$as_me:$LINENO: result: $MAKEDEPEND" >&5
+echo "${ECHO_T}$MAKEDEPEND" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "$MAKEDEPEND" != "makedepend"; then
+ { echo "$as_me:$LINENO: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&5
+echo "$as_me: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&2;}
+fi
+
+
+# Check whether --with-login or --without-login was given.
+if test "${with_login+set}" = set; then
+ withval="$with_login"
+ { { echo "$as_me:$LINENO: error: --with-login is no longer supported.
+Configure SASL appropriately instead." >&5
+echo "$as_me: error: --with-login is no longer supported.
+Configure SASL appropriately instead." >&2;}
+ { (exit 1); exit 1; }; }
+fi;
+
+
+# Check whether --with-cyrus-prefix or --without-cyrus-prefix was given.
+if test "${with_cyrus_prefix+set}" = set; then
+ withval="$with_cyrus_prefix"
+ cyrus_prefix="$withval"
+else
+ cyrus_prefix="/usr/cyrus"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+#define CYRUS_PATH "$cyrus_prefix"
+_ACEOF
+
+
+# Check whether --with-service-path or --without-service-path was given.
+if test "${with_service_path+set}" = set; then
+ withval="$with_service_path"
+ service_path="$withval"
+else
+ service_path="$cyrus_prefix/bin"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+#define SERVICE_PATH "$service_path"
+_ACEOF
+
+
+# Check whether --with-cyrus-user or --without-cyrus-user was given.
+if test "${with_cyrus_user+set}" = set; then
+ withval="$with_cyrus_user"
+ cyrus_user="$withval"
+else
+ cyrus_user="cyrus"
+fi;
+
+
+cat >>confdefs.h <<_ACEOF
+#define CYRUS_USER "$cyrus_user"
+_ACEOF
+
+
+# Check whether --with-cyrus-group or --without-cyrus-group was given.
+if test "${with_cyrus_group+set}" = set; then
+ withval="$with_cyrus_group"
+ cyrus_group="$withval"
+else
+ cyrus_group="mail"
+fi;
+
+
+if test $sysconfdir = '${prefix}/etc'; then
+ sysconfdir="/etc"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define SYSCONFDIR "$sysconfdir"
+_ACEOF
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+
+echo "$as_me:$LINENO: checking for AIX" >&5
+echo $ECHO_N "checking for AIX... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef _AIX
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+#define _ALL_SOURCE 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest*
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for long file names" >&5
+echo $ECHO_N "checking for long file names... $ECHO_C" >&6
+if test "${ac_cv_sys_long_file_names+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+# . the current directory, where building will happen
+# $prefix/lib where we will be installing things
+# $exec_prefix/lib likewise
+# eval it to expand exec_prefix.
+# $TMPDIR if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+# /tmp where it might want to write temporary files
+# /var/tmp likewise
+# /usr/tmp likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+ ac_tmpdirs=$TMPDIR
+else
+ ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+ test -d $ac_dir || continue
+ test -w $ac_dir || continue # It is less confusing to not echo anything here.
+ ac_xdir=$ac_dir/cf$$
+ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
+ ac_tf1=$ac_xdir/conftest9012345
+ ac_tf2=$ac_xdir/conftest9012346
+ (echo 1 >$ac_tf1) 2>/dev/null
+ (echo 2 >$ac_tf2) 2>/dev/null
+ ac_val=`cat $ac_tf1 2>/dev/null`
+ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+ ac_cv_sys_long_file_names=no
+ rm -rf $ac_xdir 2>/dev/null
+ break
+ fi
+ rm -rf $ac_xdir 2>/dev/null
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
+if test $ac_cv_sys_long_file_names = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_FILE_NAMES 1
+_ACEOF
+
+fi
+
+if test $ac_cv_sys_long_file_names = no; then
+ { { echo "$as_me:$LINENO: error: The Cyrus IMAPD requires support for long file names" >&5
+echo "$as_me: error: The Cyrus IMAPD requires support for long file names" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+echo "$as_me:$LINENO: checking for long long int" >&5
+echo $ECHO_N "checking for long long int... $ECHO_C" >&6
+if test "${ac_cv_type_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long long int *) 0)
+ return 0;
+if (sizeof (long long int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long_long_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_long_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
+
+echo "$as_me:$LINENO: checking size of long long int" >&5
+echo $ECHO_N "checking size of long long int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long_long_int" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long int))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long int))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long int))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_long_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long long int)); }
+unsigned long ulongval () { return (long) (sizeof (long long int)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long long int))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long long int))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long long int))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long_long_int=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long_long_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for unsigned long long int" >&5
+echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((unsigned long long int *) 0)
+ return 0;
+if (sizeof (unsigned long long int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
+
+echo "$as_me:$LINENO: checking size of unsigned long long int" >&5
+echo $ECHO_N "checking size of unsigned long long int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_unsigned_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_unsigned_long_long_int" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_unsigned_long_long_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (unsigned long long int)); }
+unsigned long ulongval () { return (long) (sizeof (unsigned long long int)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (unsigned long long int))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (unsigned long long int))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (unsigned long long int))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_unsigned_long_long_int=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (unsigned long long int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_unsigned_long_long_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long_int" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int
+_ACEOF
+
+
+if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \
+ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_LONG_INT
+_ACEOF
+
+ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+fi
+
+
+echo "$as_me:$LINENO: checking for __attribute__" >&5
+echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6
+if test "${ac_cv___attribute__+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+
+int
+main ()
+{
+
+static void foo(void) __attribute__ ((noreturn));
+
+static void
+foo(void)
+{
+ exit(1);
+}
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv___attribute__=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv___attribute__=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$ac_cv___attribute__" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___ATTRIBUTE__ 1
+_ACEOF
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
+echo "${ECHO_T}$ac_cv___attribute__" >&6
+
+
+echo "$as_me:$LINENO: checking if compiler supports -fPIC" >&5
+echo $ECHO_N "checking if compiler supports -fPIC... $ECHO_C" >&6
+if test "${ac_cv_fpic+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+save_CFLAGS=$CFLAGS
+CFLAGS="${CFLAGS} -fPIC"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+
+int
+main ()
+{
+
+static void
+foo(void)
+{
+ exit(1);
+}
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_fpic=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_fpic=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS=$save_CFLAGS
+
+fi
+
+if test "$ac_cv_fpic" = "yes"; then
+ FPIC_CFLAGS="-fPIC"
+else
+ FPIC_CFLAGS=""
+fi
+echo "$as_me:$LINENO: result: $ac_cv_fpic" >&5
+echo "${ECHO_T}$ac_cv_fpic" >&6
+
+
+
+ # CMU GUESS RUNPATH SWITCH
+ echo "$as_me:$LINENO: checking for runpath switch" >&5
+echo $ECHO_N "checking for runpath switch... $ECHO_C" >&6
+if test "${andrew_runpath_switch+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # first, try -R
+ SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-R /usr/lib"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ andrew_runpath_switch="-R"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ LDFLAGS="-Wl,-rpath,/usr/lib"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ andrew_runpath_switch="-Wl,-rpath,"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+andrew_runpath_switch="none"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="${SAVE_LDFLAGS}"
+
+fi
+echo "$as_me:$LINENO: result: $andrew_runpath_switch" >&5
+echo "${ECHO_T}$andrew_runpath_switch" >&6
+
+
+
+
+
+for ac_header in unistd.h sys/select.h sys/param.h stdarg.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+for ac_func in memmove strcasecmp ftruncate strerror
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case $LIBOBJS in
+ "$ac_func.$ac_objext" | \
+ *" $ac_func.$ac_objext" | \
+ "$ac_func.$ac_objext "* | \
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
+esac
+
+fi
+done
+
+
+
+
+for ac_func in strlcat strlcpy
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+else
+ echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+fi
+
+
+
+ save_LIBS="$LIBS"
+ LIB_SOCKET=""
+ echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+if test $ac_cv_func_connect = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ LIB_SOCKET="-lnsl $LIB_SOCKET"
+fi
+
+ echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+int
+main ()
+{
+connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
+if test $ac_cv_lib_socket_connect = yes; then
+ LIB_SOCKET="-lsocket $LIB_SOCKET"
+fi
+
+
+fi
+
+ LIBS="$LIB_SOCKET $save_LIBS"
+ echo "$as_me:$LINENO: checking for res_search" >&5
+echo $ECHO_N "checking for res_search... $ECHO_C" >&6
+if test "${ac_cv_func_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define res_search innocuous_res_search
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char res_search (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef res_search
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_res_search) || defined (__stub___res_search)
+choke me
+#else
+char (*f) () = res_search;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != res_search;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
+echo "${ECHO_T}$ac_cv_func_res_search" >&6
+if test $ac_cv_func_res_search = yes; then
+ :
+else
+ LIBS="-lresolv $LIB_SOCKET $save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#ifdef HAVE_ARPA_NAMESER_COMPAT_H
+#include <arpa/nameser_compat.h>
+#endif
+#include <resolv.h>
+int
+main ()
+{
+
+const char host[12]="openafs.org";
+u_char ans[1024];
+res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
+return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ LIB_SOCKET="-lresolv $LIB_SOCKET"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ LIBS="$LIB_SOCKET $save_LIBS"
+
+
+for ac_func in dn_expand dns_lookup
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$save_LIBS"
+
+
+LIBS="$LIBS ${LIB_SOCKET}"
+
+cyrus_cv_getaddrinfo=yes
+
+echo "$as_me:$LINENO: checking for getaddrinfo" >&5
+echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
+if test "${ac_cv_func_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define getaddrinfo innocuous_getaddrinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getaddrinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef getaddrinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
+choke me
+#else
+char (*f) () = getaddrinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getaddrinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
+if test $ac_cv_func_getaddrinfo = yes; then
+ ac_cv_lib_socket_getaddrinfo=no
+ ac_cv_lib_inet6_getaddrinfo=no
+
+else
+ echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
+echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6
+if test $ac_cv_lib_socket_getaddrinfo = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getaddrinfo=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getaddrinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
+echo $ECHO_N "checking for getaddrinfo in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_getaddrinfo" >&6
+if test $ac_cv_lib_inet6_getaddrinfo = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_getaddrinfo=no
+if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
+ -o $ac_cv_lib_inet6_getaddrinfo = yes
+then
+ ipv6_cv_getaddrinfo=yes
+fi
+if test $ipv6_cv_getaddrinfo = no; then
+ if test getaddrinfo = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}getaddrinfo... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}getaddrinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}getaddrinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}getaddrinfo) || defined (__stub___${ipv6_cv_pfx}getaddrinfo)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}getaddrinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}getaddrinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_getaddrinfo=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_getaddrinfo = yes; then
+
+echo "$as_me:$LINENO: checking for gai_strerror" >&5
+echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6
+if test "${ac_cv_func_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define gai_strerror to an innocuous variant, in case <limits.h> declares gai_strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define gai_strerror innocuous_gai_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gai_strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gai_strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gai_strerror) || defined (__stub___gai_strerror)
+choke me
+#else
+char (*f) () = gai_strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gai_strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_func_gai_strerror" >&6
+if test $ac_cv_func_gai_strerror = yes; then
+ ac_cv_lib_socket_gai_strerror=no
+ ac_cv_lib_inet6_gai_strerror=no
+
+else
+ echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
+echo $ECHO_N "checking for gai_strerror in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+int
+main ()
+{
+gai_strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_gai_strerror" >&6
+if test $ac_cv_lib_socket_gai_strerror = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_gai_strerror=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_gai_strerror=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
+echo $ECHO_N "checking for gai_strerror in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gai_strerror ();
+int
+main ()
+{
+gai_strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_gai_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_gai_strerror" >&6
+if test $ac_cv_lib_inet6_gai_strerror = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_gai_strerror=no
+if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \
+ -o $ac_cv_lib_inet6_gai_strerror = yes
+then
+ ipv6_cv_gai_strerror=yes
+fi
+if test $ipv6_cv_gai_strerror = no; then
+ if test gai_strerror = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}gai_strerror... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}gai_strerror to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}gai_strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}gai_strerror innocuous_${ipv6_cv_pfx}gai_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}gai_strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}gai_strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}gai_strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}gai_strerror) || defined (__stub___${ipv6_cv_pfx}gai_strerror)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}gai_strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}gai_strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_gai_strerror=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_gai_strerror = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETADDRINFO
+_ACEOF
+
+else
+ cyrus_cv_getaddrinfo=no
+fi
+else
+ cyrus_cv_getaddrinfo=no
+fi
+
+if test $cyrus_cv_getaddrinfo = no; then
+ IPV6_OBJS="getaddrinfo.o"
+fi
+
+cyrus_cv_getnameinfo=yes
+
+echo "$as_me:$LINENO: checking for getnameinfo" >&5
+echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6
+if test "${ac_cv_func_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define getnameinfo innocuous_getnameinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getnameinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef getnameinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo)
+choke me
+#else
+char (*f) () = getnameinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getnameinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6
+if test $ac_cv_func_getnameinfo = yes; then
+ ac_cv_lib_socket_getnameinfo=no
+ ac_cv_lib_inet6_getnameinfo=no
+
+else
+ echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
+echo $ECHO_N "checking for getnameinfo in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+int
+main ()
+{
+getnameinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_getnameinfo" >&6
+if test $ac_cv_lib_socket_getnameinfo = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getnameinfo=no
+
+else
+ echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+ break
+ fi
+ done
+fi
+ echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+echo "${ECHO_T}$ipv6_cv_dir" >&6
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getnameinfo=no
+ else
+ if test x$ipv6_libinet6 = x; then
+ ipv6_libinet6=no
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+ echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
+echo $ECHO_N "checking for getnameinfo in -linet6... $ECHO_C" >&6
+if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet6 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+int
+main ()
+{
+getnameinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet6_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet6_getnameinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_lib_inet6_getnameinfo" >&6
+if test $ac_cv_lib_inet6_getnameinfo = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+ LIBS="$LIBS -linet6"
+ fi
+fi
+ if test $ipv6_libinet6 = no; then
+ LDFLAGS="$SAVELDFLAGS"
+ fi
+ fi
+fi
+
+fi
+ipv6_cv_getnameinfo=no
+if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
+ -o $ac_cv_lib_inet6_getnameinfo = yes
+then
+ ipv6_cv_getnameinfo=yes
+fi
+if test $ipv6_cv_getnameinfo = no; then
+ if test getnameinfo = getaddrinfo; then
+ for ipv6_cv_pfx in o n; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
+echo $ECHO_N "checking for ${ipv6_cv_pfx}getnameinfo... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef ${ipv6_cv_pfx}getnameinfo
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ${ipv6_cv_pfx}getnameinfo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_${ipv6_cv_pfx}getnameinfo) || defined (__stub___${ipv6_cv_pfx}getnameinfo)
+choke me
+#else
+char (*f) () = ${ipv6_cv_pfx}getnameinfo;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != ${ipv6_cv_pfx}getnameinfo;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+
+fi
+rm -f conftest*
+
+ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETADDRINFO
+_ACEOF
+
+ ipv6_cv_getnameinfo=yes
+ break
+ fi
+ done
+ fi
+fi
+if test $ipv6_cv_getnameinfo = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETNAMEINFO
+_ACEOF
+
+else
+ cyrus_cv_getnameinfo=no
+fi
+
+if test $cyrus_cv_getnameinfo = no; then
+ IPV6_OBJS="$IPV6_OBJS getnameinfo.o"
+fi
+
+
+echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
+echo $ECHO_N "checking whether you have ss_family in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ipv6_cv_ss_family+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+struct sockaddr_storage ss; int i = ss.ss_family;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ipv6_cv_ss_family=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ipv6_cv_ss_family=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if test $ipv6_cv_ss_family = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SS_FAMILY
+_ACEOF
+
+else
+ :
+fi
+echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
+echo "${ECHO_T}$ipv6_cv_ss_family" >&6
+
+echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
+echo $ECHO_N "checking whether you have sa_len in struct sockaddr... $ECHO_C" >&6
+if test "${ipv6_cv_sa_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+struct sockaddr sa; int i = sa.sa_len;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ipv6_cv_sa_len=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ipv6_cv_sa_len=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if test $ipv6_cv_sa_len = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SOCKADDR_SA_LEN
+_ACEOF
+
+else
+ :
+fi
+echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
+echo "${ECHO_T}$ipv6_cv_sa_len" >&6
+
+
+
+
+for ac_header in sys/time.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm *tp; tp->tm_sec;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_struct_tm=time.h
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
+if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_tm_tm_zone=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_tm_tm_zone=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_tm_tm_zone=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6
+if test "${ac_cv_var_tzname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <time.h>
+#ifndef tzname /* For SGI. */
+extern char *tzname[]; /* RS6000 and others reject char **tzname. */
+#endif
+
+int
+main ()
+{
+atoi(*tzname);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_var_tzname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_tzname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+echo "${ECHO_T}$ac_cv_var_tzname" >&6
+ if test $ac_cv_var_tzname = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TZNAME 1
+_ACEOF
+
+ fi
+fi
+
+
+
+
+
+
+
+
+for ac_func in vprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+echo "$as_me:$LINENO: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
+if test "${ac_cv_func__doprnt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char _doprnt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+char (*f) () = _doprnt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != _doprnt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func__doprnt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func__doprnt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+if test $ac_cv_func__doprnt = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+
+
+CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o"
+
+
+
+# Check whether --with-bdb or --without-bdb was given.
+if test "${with_bdb+set}" = set; then
+ withval="$with_bdb"
+ with_bdb=$withval
+else
+ with_bdb="yes"
+fi;
+
+
+# Check whether --with-dbdir or --without-dbdir was given.
+if test "${with_dbdir+set}" = set; then
+ withval="$with_dbdir"
+ with_bdb=$withval
+fi;
+
+case "$with_bdb" in
+ no)
+ use_berkeley="no"
+ ;;
+ yes)
+ use_berkeley="yes"
+ with_bdb_lib=none
+ with_bdb_inc=none
+ ;;
+
+ *)
+ use_berkeley="yes"
+ with_bdb_lib="$with_bdb/lib"
+ with_bdb_inc="$with_bdb/include"
+ ;;
+esac
+
+if test "$use_berkeley" != "no"; then
+
+
+# Check whether --with-bdb-libdir or --without-bdb-libdir was given.
+if test "${with_bdb_libdir+set}" = set; then
+ withval="$with_bdb_libdir"
+ with_bdb_lib=$withval
+else
+ test "${with_bdb_lib+set}" = set || with_bdb_lib=none
+fi;
+
+# Check whether --with-bdb-incdir or --without-bdb-incdir was given.
+if test "${with_bdb_incdir+set}" = set; then
+ withval="$with_bdb_incdir"
+ with_bdb_inc=$withval
+else
+ test "${with_bdb_inc+set}" = set || with_bdb_inc=none
+fi;
+
+
+
+
+ cmu_save_CPPFLAGS=$CPPFLAGS
+
+ if test -d $with_bdb_inc; then
+ CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
+ BDB_INCADD="-I$with_bdb_inc"
+ else
+ BDB_INCADD=""
+ fi
+
+ if test "${ac_cv_header_db_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6
+if test "${ac_cv_header_db_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+echo "${ECHO_T}$ac_cv_header_db_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking db.h usability" >&5
+echo $ECHO_N "checking db.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <db.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking db.h presence" >&5
+echo $ECHO_N "checking db.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <db.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6
+if test "${ac_cv_header_db_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_db_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+echo "${ECHO_T}$ac_cv_header_db_h" >&6
+
+fi
+if test $ac_cv_header_db_h = yes; then
+
+ BDB_SAVE_LDFLAGS=$LDFLAGS
+
+ if test -d $with_bdb_lib; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_runpath_switch$with_bdb_lib"
+ fi
+
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
+ else
+ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_runpath_switch$with_bdb_lib"
+ fi
+
+ else
+ BDB_LIBADD=""
+ fi
+
+ saved_LIBS=$LIBS
+ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <db.h>
+int
+main ()
+{
+db_create(NULL, NULL, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+dblib="no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$dblib" = "berkeley"; then break; fi
+ done
+ if test "$dblib" = "no"; then
+ LIBS="$saved_LIBS -ldb"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <db.h>
+int
+main ()
+{
+db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+dblib="no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ LIBS=$saved_LIBS
+
+ LDFLAGS=$BDB_SAVE_LDFLAGS
+
+else
+ dblib="no"
+fi
+
+
+
+ CPPFLAGS=$cmu_save_CPPFLAGS
+
+
+ if test "$dblib" = "no"; then
+ { { echo "$as_me:$LINENO: error: Berkeley DB 3.x or later was not found. You may need to
+ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&5
+echo "$as_me: error: Berkeley DB 3.x or later was not found. You may need to
+ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$with_bdb_lib" != "none"; then
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L$with_bdb_lib $andrew_runpath_switch$with_bdb_lib ${LDFLAGS}"
+ fi
+
+ fi
+
+ BDB_INC=${BDB_INCADD}
+ BDB_LIB=${BDB_LIBADD}
+
+
+
+ LIBS="${LIBS} ${BDB_LIBADD}"
+ CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
+
+ CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDB
+_ACEOF
+
+fi
+
+
+
+
+SIEVE_SUBDIRS=""
+sievedir="sieve"
+# Check whether --enable-sieve or --disable-sieve was given.
+if test "${enable_sieve+set}" = set; then
+ enableval="$enable_sieve"
+ if test "$enableval" = no; then
+ sievedir="no"
+ fi
+fi;
+
+if test "$sievedir" != "no"; then
+ SIEVE_OBJS="lmtp_sieve.o smtpclient.o"
+
+ SIEVE_LIBS="../${sievedir}/libsieve.a"
+
+ SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_SIEVE
+_ACEOF
+
+
+ for ac_prog in 'bison -y' byacc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_YACC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+ for ac_prog in flex lex
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LEX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+ echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+if test -z "$LEXLIB"
+then
+ echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_fl_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_yywrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+if test $ac_cv_lib_fl_yywrap = yes; then
+ LEXLIB="-lfl"
+else
+ echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+if test "${ac_cv_lib_l_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ll $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_l_yywrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_l_yywrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+if test $ac_cv_lib_l_yywrap = yes; then
+ LEXLIB="-ll"
+fi
+
+fi
+
+fi
+
+if test "x$LEX" != "x:"; then
+ echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_root+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+cat >conftest.l <<_ACEOF
+%%
+%%
+_ACEOF
+{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+ (eval $LEX conftest.l) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+rm -f conftest.l
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS=$LIBS
+LIBS="$LIBS $LEXLIB"
+cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_lex_yytext_pointer=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define YYTEXT_POINTER 1
+_ACEOF
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for main in -lfl" >&5
+echo $ECHO_N "checking for main in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_fl_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_main" >&6
+if test $ac_cv_lib_fl_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBFL 1
+_ACEOF
+
+ LIBS="-lfl $LIBS"
+
+fi
+
+
+ echo "$as_me:$LINENO: checking for library containing regcomp" >&5
+echo $ECHO_N "checking for library containing regcomp... $ECHO_C" >&6
+if test "${ac_cv_search_regcomp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_regcomp=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char regcomp ();
+int
+main ()
+{
+regcomp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_regcomp="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_regcomp" = no; then
+ for ac_lib in rx regex; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char regcomp ();
+int
+main ()
+{
+regcomp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_regcomp="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_regcomp" >&5
+echo "${ECHO_T}$ac_cv_search_regcomp" >&6
+if test "$ac_cv_search_regcomp" != no; then
+ test "$ac_cv_search_regcomp" = "none required" || LIBS="$ac_cv_search_regcomp $LIBS"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_REGEX
+_ACEOF
+
+ if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for rxposix.h" >&5
+echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6
+if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
+echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking rxposix.h usability" >&5
+echo $ECHO_N "checking rxposix.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <rxposix.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking rxposix.h presence" >&5
+echo $ECHO_N "checking rxposix.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <rxposix.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: rxposix.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: rxposix.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: rxposix.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: rxposix.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: rxposix.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: rxposix.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for rxposix.h" >&5
+echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6
+if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_rxposix_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
+echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6
+
+fi
+if test $ac_cv_header_rxposix_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RX
+_ACEOF
+
+fi
+
+
+fi
+
+
+
+ SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile"
+fi
+
+
+
+echo "$as_me:$LINENO: checking for strerror" >&5
+echo $ECHO_N "checking for strerror... $ECHO_C" >&6
+if test "${ac_cv_func_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define strerror innocuous_strerror
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char strerror (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef strerror
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_strerror) || defined (__stub___strerror)
+choke me
+#else
+char (*f) () = strerror;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != strerror;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
+echo "${ECHO_T}$ac_cv_func_strerror" >&6
+if test $ac_cv_func_strerror = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAS_STRERROR
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_SYS_ERRLIST
+_ACEOF
+
+fi
+
+
+
+for ac_header in sys/resource.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in setrlimit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in getrlimit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+for ac_func in daemon setsid
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in shutdown
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/socket.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "socklen_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SOCKLEN_T
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/socket.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sockaddr_storage" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_SOCKADDR_STORAGE
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/resource.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "rlim_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RLIM_T
+_ACEOF
+
+fi
+rm -f conftest*
+
+
+spt_type=""
+echo "$as_me:$LINENO: checking for setproctitle" >&5
+echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
+if test "${ac_cv_func_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define setproctitle innocuous_setproctitle
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setproctitle (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef setproctitle
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setproctitle ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setproctitle) || defined (__stub___setproctitle)
+choke me
+#else
+char (*f) () = setproctitle;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setproctitle;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
+echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
+if test $ac_cv_func_setproctitle = yes; then
+ spt_type=SPT_BUILTIN
+fi
+
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
+echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
+if test "${ac_cv_lib_util_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setproctitle ();
+int
+main ()
+{
+setproctitle ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_util_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_util_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
+echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
+if test $ac_cv_lib_util_setproctitle = yes; then
+ spt_type=SPT_BUILTIN
+ LIBS="${LIBS} -lutil"
+fi
+
+fi
+if test "$spt_type" = ""; then
+ if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
+echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/pstat.h usability" >&5
+echo $ECHO_N "checking sys/pstat.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/pstat.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/pstat.h presence" >&5
+echo $ECHO_N "checking sys/pstat.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/pstat.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/pstat.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/pstat.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/pstat.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
+echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_pstat_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6
+
+fi
+if test $ac_cv_header_sys_pstat_h = yes; then
+ spt_type=SPT_PSTAT
+fi
+
+
+fi
+if test "$spt_type" = ""; then
+ if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
+echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/sysnews.h usability" >&5
+echo $ECHO_N "checking sys/sysnews.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/sysnews.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/sysnews.h presence" >&5
+echo $ECHO_N "checking sys/sysnews.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/sysnews.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/sysnews.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/sysnews.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
+echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_sysnews_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6
+
+fi
+if test $ac_cv_header_sys_sysnews_h = yes; then
+ spt_type=SPT_SYSMIPS
+fi
+
+
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
+echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_psstrings+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <machine/vmparam.h>
+#include <sys/exec.h>
+#ifndef PS_STRINGS
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_psstrings=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_psstrings=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_psstrings = yes; then
+ spt_type=SPT_PSSTRINGS
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_psstrings" >&5
+echo "${ECHO_T}$cyrus_cv_sys_psstrings" >&6
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for SCO" >&5
+echo $ECHO_N "checking for SCO... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_sco+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifndef _SCO_unix_
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_sco=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_sco=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_sco = yes; then
+ spt_type=SPT_SCO
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_sco" >&5
+echo "${ECHO_T}$cyrus_cv_sys_sco" >&6
+fi
+if test "$spt_type" = ""; then
+ echo "$as_me:$LINENO: checking for setproctitle usability" >&5
+echo $ECHO_N "checking for setproctitle usability... $ECHO_C" >&6
+ if test "${cyrus_cv_sys_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if defined(DGUX) || defined(_SEQUENT_) || defined(apollo)
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_sys_setproctitle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_sys_setproctitle=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+ if test $cyrus_cv_sys_setproctitle = no; then
+ spt_type=SPT_NONE
+ fi
+ echo "$as_me:$LINENO: result: $cyrus_cv_sys_setproctitle" >&5
+echo "${ECHO_T}$cyrus_cv_sys_setproctitle" >&6
+fi
+if test "$spt_type" != ""; then
+
+cat >>confdefs.h <<_ACEOF
+#define SPT_TYPE $spt_type
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking nonblocking method" >&5
+echo $ECHO_N "checking nonblocking method... $ECHO_C" >&6
+if test "${cyrus_cv_sys_nonblock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/file.h>
+#include <fcntl.h>
+#ifndef FNDELAY
+#define FNDELAY O_NDELAY
+#endif
+int
+main ()
+{
+fcntl(0, F_GETFL, 0)&FNDELAY
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_sys_nonblock=fcntl
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cyrus_cv_sys_nonblock=ioctl
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+WITH_NONBLOCK=$cyrus_cv_sys_nonblock
+
+echo "$as_me:$LINENO: result: $WITH_NONBLOCK" >&5
+echo "${ECHO_T}$WITH_NONBLOCK" >&6
+
+echo "$as_me:$LINENO: checking timezone GMT offset method" >&5
+echo $ECHO_N "checking timezone GMT offset method... $ECHO_C" >&6
+if test "${cyrus_cv_struct_sys_gmtoff+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <time.h>
+int
+main ()
+{
+struct tm tm;
+tm.tm_gmtoff = 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_struct_sys_gmtoff=tm
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cyrus_cv_struct_sys_gmtoff=gmtime
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff
+
+echo "$as_me:$LINENO: result: $WITH_GMTOFF" >&5
+echo "${ECHO_T}$WITH_GMTOFF" >&6
+echo "$as_me:$LINENO: checking for shared mmap" >&5
+echo $ECHO_N "checking for shared mmap... $ECHO_C" >&6
+if test "${cyrus_cv_func_mmap_shared+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ cyrus_cv_func_mmap_shared=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+main() {
+char *base;
+int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
+if (fd == -1) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+, fd, 0L);
+if (base == (caddr_t)-1) exit(1);
+if (strncmp(base, "test", 4) != 0) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+if (strncmp(base+4, "test", 4) != 0) exit(1);
+exit(0);}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_func_mmap_shared=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cyrus_cv_func_mmap_shared=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_shared" >&5
+echo "${ECHO_T}$cyrus_cv_func_mmap_shared" >&6
+if test $cyrus_cv_func_mmap_shared = yes; then
+ WITH_MAP="shared"
+else
+echo "$as_me:$LINENO: checking for stupid shared mmap" >&5
+echo $ECHO_N "checking for stupid shared mmap... $ECHO_C" >&6
+if test "${cyrus_cv_func_mmap_stupidshared+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ cyrus_cv_func_mmap_stupidshared=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+main() {
+char *base;
+int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
+if (fd == -1) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+, fd, 0L);
+if (base == (caddr_t)-1) exit(1);
+if (strncmp(base, "test", 4) != 0) exit(1);
+lseek(fd, 0L, 0);
+if (write(fd, "xyzz", 4) != 4) exit(1);
+fsync(fd);
+if (strncmp(base, "xyzz", 4) != 0) exit(1);
+exit(0);}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cyrus_cv_func_mmap_stupidshared=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cyrus_cv_func_mmap_stupidshared=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_stupidshared" >&5
+echo "${ECHO_T}$cyrus_cv_func_mmap_stupidshared" >&6
+if test $cyrus_cv_func_mmap_stupidshared = yes; then
+ WITH_MAP="stupidshared"
+else
+ { echo "$as_me:$LINENO: WARNING: *** This system does not have a working mmap()" >&5
+echo "$as_me: WARNING: *** This system does not have a working mmap()" >&2;}
+ { echo "$as_me:$LINENO: WARNING: *** Expect a considerable performance penalty" >&5
+echo "$as_me: WARNING: *** Expect a considerable performance penalty" >&2;}
+ WITH_MAP=nommap
+fi
+fi
+
+
+
+# Check whether --with-lock or --without-lock was given.
+if test "${with_lock+set}" = set; then
+ withval="$with_lock"
+ WITH_LOCK="$withval"
+else
+
+ echo "$as_me:$LINENO: checking for fcntl" >&5
+echo $ECHO_N "checking for fcntl... $ECHO_C" >&6
+if test "${ac_cv_func_fcntl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define fcntl to an innocuous variant, in case <limits.h> declares fcntl.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define fcntl innocuous_fcntl
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char fcntl (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef fcntl
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fcntl ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_fcntl) || defined (__stub___fcntl)
+choke me
+#else
+char (*f) () = fcntl;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != fcntl;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fcntl=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_fcntl=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fcntl" >&5
+echo "${ECHO_T}$ac_cv_func_fcntl" >&6
+if test $ac_cv_func_fcntl = yes; then
+ WITH_LOCK="fcntl"
+else
+
+ echo "$as_me:$LINENO: checking for flock" >&5
+echo $ECHO_N "checking for flock... $ECHO_C" >&6
+if test "${ac_cv_func_flock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define flock to an innocuous variant, in case <limits.h> declares flock.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define flock innocuous_flock
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char flock (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef flock
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char flock ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_flock) || defined (__stub___flock)
+choke me
+#else
+char (*f) () = flock;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != flock;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_flock=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_flock=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_flock" >&5
+echo "${ECHO_T}$ac_cv_func_flock" >&6
+if test $ac_cv_func_flock = yes; then
+ WITH_LOCK="flock"
+else
+
+ { { echo "$as_me:$LINENO: error: unable to detect locking method" >&5
+echo "$as_me: error: unable to detect locking method" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
+
+fi;
+
+
+
+LIB_RT=""
+echo "$as_me:$LINENO: checking for fdatasync" >&5
+echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
+if test "${ac_cv_func_fdatasync+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define fdatasync to an innocuous variant, in case <limits.h> declares fdatasync.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define fdatasync innocuous_fdatasync
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char fdatasync (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef fdatasync
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fdatasync ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_fdatasync) || defined (__stub___fdatasync)
+choke me
+#else
+char (*f) () = fdatasync;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != fdatasync;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fdatasync=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_fdatasync=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fdatasync" >&5
+echo "${ECHO_T}$ac_cv_func_fdatasync" >&6
+if test $ac_cv_func_fdatasync = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FDATASYNC
+_ACEOF
+
+else
+
+ echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
+echo $ECHO_N "checking for fdatasync in -lrt... $ECHO_C" >&6
+if test "${ac_cv_lib_rt_fdatasync+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char fdatasync ();
+int
+main ()
+{
+fdatasync ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rt_fdatasync=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rt_fdatasync=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_fdatasync" >&6
+if test $ac_cv_lib_rt_fdatasync = yes; then
+
+ LIB_RT="-lrt"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FDATASYNC
+_ACEOF
+
+
+fi
+
+
+fi
+
+
+cant_find_sigvec=no
+if test "${cyrus_sigveclib+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ echo "$as_me:$LINENO: checking for sigvec" >&5
+echo $ECHO_N "checking for sigvec... $ECHO_C" >&6
+if test "${ac_cv_func_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define sigvec to an innocuous variant, in case <limits.h> declares sigvec.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define sigvec innocuous_sigvec
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sigvec (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef sigvec
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_sigvec) || defined (__stub___sigvec)
+choke me
+#else
+char (*f) () = sigvec;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sigvec;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sigvec" >&5
+echo "${ECHO_T}$ac_cv_func_sigvec" >&6
+if test $ac_cv_func_sigvec = yes; then
+
+ cyrus_sigveclib=""
+
+else
+
+ echo "$as_me:$LINENO: checking for sigvec in -lBSD" >&5
+echo $ECHO_N "checking for sigvec in -lBSD... $ECHO_C" >&6
+if test "${ac_cv_lib_BSD_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lBSD $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+int
+main ()
+{
+sigvec ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_BSD_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_BSD_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_sigvec" >&5
+echo "${ECHO_T}$ac_cv_lib_BSD_sigvec" >&6
+if test $ac_cv_lib_BSD_sigvec = yes; then
+ cyrus_sigveclib="-lBSD"
+else
+
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
+ echo "$as_me:$LINENO: checking for sigvec in -lucb" >&5
+echo $ECHO_N "checking for sigvec in -lucb... $ECHO_C" >&6
+if test "${ac_cv_lib_ucb_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lucb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sigvec ();
+int
+main ()
+{
+sigvec ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ucb_sigvec=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ucb_sigvec=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_sigvec" >&5
+echo "${ECHO_T}$ac_cv_lib_ucb_sigvec" >&6
+if test $ac_cv_lib_ucb_sigvec = yes; then
+
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"
+else
+ cant_find_sigvec=yes
+fi
+
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+
+
+fi
+
+
+fi
+
+
+
+# ok, we still look for this stuff because of checking groups, but
+# all authentication goes through SASL
+
+
+# Check whether --with-afs or --without-afs was given.
+if test "${with_afs+set}" = set; then
+ withval="$with_afs"
+ with_afs="${withval}"
+else
+ with_afs="no"
+fi;
+
+
+# Check whether --with-ldap or --without-ldap was given.
+if test "${with_ldap+set}" = set; then
+ withval="$with_ldap"
+ with_ldap="${withval}"
+else
+ with_ldap="no"
+fi;
+
+# Check whether --enable-krb5afspts or --disable-krb5afspts was given.
+if test "${enable_krb5afspts+set}" = set; then
+ enableval="$enable_krb5afspts"
+ SASL_GSSAPI_LIBS_SET="yes"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define AFSPTS_USE_KRB5
+_ACEOF
+
+fi;
+
+if test "x$with_afs" != "xno"; then
+ if test ! -d $with_afs; then
+ $with_afs=/usr/local
+ fi
+ CFLAGS="${CFLAGS} -I${with_afs}/include"
+ AFS_LIBS="${with_afs}/lib/afs/libkauth.a ${with_afs}/lib/afs/libprot.a ${with_afs}/lib/afs/libauth.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/librxkad.a ${with_afs}/lib/librx.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/libubik.a ${with_afs}/lib/liblwp.a ${with_afs}/lib/afs/util.a"
+ if test -f ${with_afs}/lib/afs/libaudit.a; then
+ AFS_LIBS="$AFS_LIBS ${with_afs}/lib/afs/libaudit.a"
+ fi
+ if test -f /usr/ucblib/libucb.a; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS}"
+ else
+ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS} $andrew_runpath_switch/usr/ucblib"
+ fi
+
+ AFS_LIBS="$AFS_LIBS -lc -lucb"
+ fi
+
+ if test "${cyrus_afs_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ SAVE_LIBS="$LIBS"
+ LIBS="${with_afs}/lib/liblwp.a"
+ echo "$as_me:$LINENO: checking if AFS libraries need sigvec" >&5
+echo $ECHO_N "checking if AFS libraries need sigvec... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+IOMGR_Initialize();
+int
+main ()
+{
+IOMGR_Initialize()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ cyrus_afs_sigvec="no"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cyrus_afs_sigvec="yes"
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+ if test "$cyrus_afs_sigvec" = yes; then
+ if test "$cant_find_sigvec" = yes; then
+ { echo "$as_me:$LINENO: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&5
+echo "$as_me: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&2;}
+ else
+ AFS_LIBS="${AFS_LIBS} $cyrus_sigveclib"
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AFSKRB
+_ACEOF
+
+ fi
+ else
+ AFS_LIBS="${AFS_LIBS}"
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AFSKRB
+_ACEOF
+
+ fi
+ LIBS="$SAVE_LIBS"
+fi
+
+LDAP_CPPFLAGS=""
+LDAP_LDFLAGS=""
+LDAP_LIBS=""
+
+if test "x$with_ldap" != "xno"; then
+ if test ! -d $with_ldap; then
+ $with_ldap=/usr/local
+ fi
+
+ LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
+ LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib"
+ LDAP_LIBS=""
+
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS=$LDAP_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+ echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ldap_initialize ();
+int
+main ()
+{
+ldap_initialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_ldap_initialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ldap_ldap_initialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
+if test $ac_cv_lib_ldap_ldap_initialize = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LDAP
+_ACEOF
+
+
+
+
+ LDAP_LIBS="-lldap -llber"
+fi
+
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+ echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ldap_initialize ();
+int
+main ()
+{
+ldap_initialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_ldap_initialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ldap_ldap_initialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
+if test $ac_cv_lib_ldap_ldap_initialize = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LDAP
+_ACEOF
+
+
+
+
+ LDAP_LIBS="-lldap -llber"
+fi
+
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+fi
+
+if test "x$with_afs" != "xno" -o "x$with_ldap" != "xno"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_PTS
+_ACEOF
+
+fi
+
+
+
+SERVER_SUBDIRS="master imap"
+# Check whether --enable-server or --disable-server was given.
+if test "${enable_server+set}" = set; then
+ enableval="$enable_server"
+ if test "$enableval" = no; then
+ SERVER_SUBDIRS=""
+ fi
+fi;
+
+# We always output a server makefile (just because we can)
+
+
+# Check whether --with-krb or --without-krb was given.
+if test "${with_krb+set}" = set; then
+ withval="$with_krb"
+ with_krb="$withval"
+else
+ with_krb="no"
+fi;
+
+
+# Check whether --with-krbimpl or --without-krbimpl was given.
+if test "${with_krbimpl+set}" = set; then
+ withval="$with_krbimpl"
+ with_krbimpl="$withval"
+else
+ with_krbimpl="kth"
+fi;
+
+# Check whether --enable-statickrb or --disable-statickrb was given.
+if test "${enable_statickrb+set}" = set; then
+ enableval="$enable_statickrb"
+ with_statickrb="yes"
+else
+ with_statickrb="no"
+fi;
+
+
+
+echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRESOLV 1
+_ACEOF
+
+ LIBS="-lresolv $LIBS"
+
+fi
+
+
+if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then
+ { { echo "$as_me:$LINENO: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&5
+echo "$as_me: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test "$with_krb" != "no"; then
+
+# Check whether --with-krbdes or --without-krbdes was given.
+if test "${with_krbdes+set}" = set; then
+ withval="$with_krbdes"
+ with_krbdes="$withval"
+else
+ with_krbdes="yes"
+fi;
+if test "$with_krbdes" = "yes"; then
+ echo "$as_me:$LINENO: checking for des_ecb_encrypt in -ldes" >&5
+echo $ECHO_N "checking for des_ecb_encrypt in -ldes... $ECHO_C" >&6
+if test "${ac_cv_lib_des_des_ecb_encrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char des_ecb_encrypt ();
+int
+main ()
+{
+des_ecb_encrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_des_des_ecb_encrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_des_des_ecb_encrypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_ecb_encrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_des_des_ecb_encrypt" >&6
+if test $ac_cv_lib_des_des_ecb_encrypt = yes; then
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$with_krb/lib/libdes.a"
+ else
+ KRB_LIBS="-ldes"
+ fi
+else
+ { { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
+echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+fi
+
+if test -d ${with_krb}; then
+ echo "$as_me:$LINENO: checking for Kerberos includes" >&5
+echo $ECHO_N "checking for Kerberos includes... $ECHO_C" >&6
+if test "${cyrus_krbinclude+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ for krbhloc in include/kerberosIV include
+ do
+ if test -f ${with_krb}/${krbhloc}/krb.h ; then
+ cyrus_krbinclude=${with_krb}/${krbhloc}
+ break
+ fi
+ done
+
+fi
+echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
+echo "${ECHO_T}$cyrus_krbinclude" >&6
+
+ if test -n "${cyrus_krbinclude}"; then
+ CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
+ fi
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L${with_krb}/lib ${LDFLAGS}"
+ else
+ LDFLAGS="-L${with_krb}/lib $andrew_runpath_switch${with_krb}/lib ${LDFLAGS}"
+ fi
+
+fi
+
+if test "$with_krbimpl" != "kth"; then
+ KRBLIB="krb4"
+else
+ KRBLIB="krb"
+fi
+
+if test "$with_des" != no; then
+ if test "${ac_cv_header_krb_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking krb.h usability" >&5
+echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <krb.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking krb.h presence" >&5
+echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <krb.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_krb_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb_h" >&6
+
+fi
+if test $ac_cv_header_krb_h = yes; then
+ as_ac_Lib=`echo "ac_cv_lib_${KRBLIB}''_krb_mk_priv" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for krb_mk_priv in -l${KRBLIB}" >&5
+echo $ECHO_N "checking for krb_mk_priv in -l${KRBLIB}... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l${KRBLIB} $KRB_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb_mk_priv ();
+int
+main ()
+{
+krb_mk_priv ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
+ else
+ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
+ fi
+else
+ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
+echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
+fi
+
+else
+ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
+echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
+fi
+
+
+else
+ { echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
+echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
+ krb4=no
+fi
+
+if test "${krb4}" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KRB
+_ACEOF
+
+fi
+
+LIBS="$KRB_LIBS $LIBS"
+
+SASL_GSSAPI_LIBS_SET="yes"
+
+
+IMAP_PROGS=""
+
+# Check whether --with-openssl or --without-openssl was given.
+if test "${with_openssl+set}" = set; then
+ withval="$with_openssl"
+ with_openssl="${withval}"
+fi;
+
+OPENSSL_INC=
+OPENSSL_LIB=
+case "$with_openssl" in
+ no) with_openssl="no";;
+ ""|yes)
+ LIB_RSAREF=""
+ echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
+echo $ECHO_N "checking for RSAPublicEncrypt in -lrsaref... $ECHO_C" >&6
+if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrsaref $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char RSAPublicEncrypt ();
+int
+main ()
+{
+RSAPublicEncrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rsaref_RSAPublicEncrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rsaref_RSAPublicEncrypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6
+if test $ac_cv_lib_rsaref_RSAPublicEncrypt = yes; then
+ LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
+else
+ cmu_have_rsaref=no
+fi
+
+
+ with_openssl="yes"
+ echo "$as_me:$LINENO: checking for BIO_accept in -lcrypto" >&5
+echo $ECHO_N "checking for BIO_accept in -lcrypto... $ECHO_C" >&6
+if test "${ac_cv_lib_crypto_BIO_accept+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto $LIB_RSAREF $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char BIO_accept ();
+int
+main ()
+{
+BIO_accept ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypto_BIO_accept=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypto_BIO_accept=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_BIO_accept" >&5
+echo "${ECHO_T}$ac_cv_lib_crypto_BIO_accept" >&6
+if test $ac_cv_lib_crypto_BIO_accept = yes; then
+ LIBS="-lcrypto $LIB_RSAREF ${LIBS}"
+else
+ with_openssl="no"
+fi
+
+ echo "$as_me:$LINENO: checking for SSL_CTX_new in -lssl" >&5
+echo $ECHO_N "checking for SSL_CTX_new in -lssl... $ECHO_C" >&6
+if test "${ac_cv_lib_ssl_SSL_CTX_new+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl -lcrypto $LIB_RSAREF $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char SSL_CTX_new ();
+int
+main ()
+{
+SSL_CTX_new ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ssl_SSL_CTX_new=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ssl_SSL_CTX_new=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_SSL_CTX_new" >&6
+if test $ac_cv_lib_ssl_SSL_CTX_new = yes; then
+ LIBS="-lssl ${LIBS}"
+else
+ with_openssl="no"
+fi
+
+
+ ;;
+ *) OPENSSL_INC="-I${with_openssl}/include"
+ OPENSSL_LIBPATH="${with_openssl}/lib"
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH}"
+ CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}"
+
+ # this is CMU ADD LIBPATH
+ if test "$andrew_runpath_switch" = "none" ; then
+ LDFLAGS="-L${OPENSSL_LIBPATH} ${LDFLAGS}"
+ else
+ LDFLAGS="-L${OPENSSL_LIBPATH} $andrew_runpath_switch${OPENSSL_LIBPATH} ${LDFLAGS}"
+ fi
+
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB}"
+ else
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB} $andrew_runpath_switch${OPENSSL_LIBPATH}"
+ fi
+
+ LIBS="${LIBS} -lssl -lcrypto";;
+esac
+
+echo "$as_me:$LINENO: checking for openssl" >&5
+echo $ECHO_N "checking for openssl... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $with_openssl" >&5
+echo "${ECHO_T}$with_openssl" >&6
+
+if test "$with_openssl" != "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSL
+_ACEOF
+
+ IMAP_PROGS="$IMAP_PROGS tls_prune"
+ if test "${krb4}" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define OPENSSL_ENABLE_OLD_DES_SUPPORT
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define OPENSSL_DES_LIBDES_COMPATIBILITY
+_ACEOF
+
+ fi
+fi
+
+
+
+
+# Check whether --with-egd-socket or --without-egd-socket was given.
+if test "${with_egd_socket+set}" = set; then
+ withval="$with_egd_socket"
+ EGD_SOCKET="$withval"
+
+fi;
+if test -n "$EGD_SOCKET" ; then
+
+cat >>confdefs.h <<_ACEOF
+#define EGD_SOCKET "$EGD_SOCKET"
+_ACEOF
+
+fi
+
+
+# Check whether --with-zephyr or --without-zephyr was given.
+if test "${with_zephyr+set}" = set; then
+ withval="$with_zephyr"
+ with_zephyr="${withval}"
+fi;
+if test -z "$with_zephyr"; then
+ if test -f /usr/local/lib/libzephyr.a; then
+ with_zephyr="/usr/local"
+ elif test -f /usr/lib/libzephyr.a; then
+ with_zephyr="/usr"
+ fi
+fi
+ZEPHYR_LIBS=""
+ZEPHYR_CPPFLAGS=""
+case "$with_zephyr" in
+ no) true;;
+ ""|yes) echo "$as_me:$LINENO: checking for ZInitialize in -lzephyr" >&5
+echo $ECHO_N "checking for ZInitialize in -lzephyr... $ECHO_C" >&6
+if test "${ac_cv_lib_zephyr_ZInitialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lzephyr $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ZInitialize ();
+int
+main ()
+{
+ZInitialize ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_zephyr_ZInitialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_zephyr_ZInitialize=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitialize" >&5
+echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitialize" >&6
+if test $ac_cv_lib_zephyr_ZInitialize = yes; then
+ ZEPHYR_LIBS="-lzephyr"
+else
+ with_zephyr="no"
+fi
+;;
+ *) if test -d ${with_zephyr}/include/zephyr; then
+ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include/zephyr"
+ else
+ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include"
+ fi
+ ZEPHYR_LIBS="-lzephyr";;
+esac
+
+
+if test "$with_zephyr" != "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZEPHYR
+_ACEOF
+
+fi
+
+
+# Check whether --with-pidfile or --without-pidfile was given.
+if test "${with_pidfile+set}" = set; then
+ withval="$with_pidfile"
+ MASTERPIDFILE="$withval"
+else
+ MASTERPIDFILE="/var/run/cyrus-master.pid"
+fi;
+MASTERPIDFILE="\"$MASTERPIDFILE\""
+
+cat >>confdefs.h <<_ACEOF
+#define MASTER_PIDFILE $MASTERPIDFILE
+_ACEOF
+
+
+# Check whether --enable-idled or --disable-idled was given.
+if test "${enable_idled+set}" = set; then
+ enableval="$enable_idled"
+ if test "$enable_val" != no; then
+ IMAP_PROGS="$IMAP_PROGS idled"
+ fi
+fi;
+
+ENABLE_NNTP=no
+# Check whether --enable-nntp or --disable-nntp was given.
+if test "${enable_nntp+set}" = set; then
+ enableval="$enable_nntp"
+ ENABLE_NNTP=$enableval
+ if test "$ENABLE_NNTP" != no; then
+ IMAP_PROGS="$IMAP_PROGS nntpd fetchnews"
+ fi
+fi;
+
+ENABLE_MURDER=no
+# Check whether --enable-murder or --disable-murder was given.
+if test "${enable_murder+set}" = set; then
+ enableval="$enable_murder"
+ ENABLE_MURDER=$enableval
+fi;
+
+if test "$ENABLE_MURDER" != no; then
+ IMAP_PROGS="$IMAP_PROGS mupdate"
+ # for master/slave auto-selection
+
+for ac_header in sys/sockio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+fi
+
+ENABLE_REPLICATION=no
+# Check whether --enable-replication or --disable-replication was given.
+if test "${enable_replication+set}" = set; then
+ enableval="$enable_replication"
+ ENABLE_REPLICATION=$enableval
+ if test "$ENABLE_REPLICATION" != no; then
+ IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset make_md5"
+ fi
+fi;
+
+
+
+
+# Check whether --with-com_err or --without-com_err was given.
+if test "${with_com_err+set}" = set; then
+ withval="$with_com_err"
+
+fi;
+if test -z "$with_com_err"; then
+ # no value supplied
+ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
+echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
+if test "${ac_cv_lib_com_err_com_err+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcom_err $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char com_err ();
+int
+main ()
+{
+com_err ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_com_err_com_err=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_com_err_com_err=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
+echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
+if test $ac_cv_lib_com_err_com_err = yes; then
+
+ # com_err is already in library path
+ # guess we're okay
+ # can use system com_err
+ with_com_err=""
+ if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for et/com_err.h" >&5
+echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking et/com_err.h usability" >&5
+echo $ECHO_N "checking et/com_err.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <et/com_err.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking et/com_err.h presence" >&5
+echo $ECHO_N "checking et/com_err.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <et/com_err.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: et/com_err.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: et/com_err.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: et/com_err.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: et/com_err.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for et/com_err.h" >&5
+echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_et_com_err_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6
+
+fi
+if test $ac_cv_header_et_com_err_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ET_COM_ERR_H
+_ACEOF
+
+else
+ if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for com_err.h" >&5
+echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking com_err.h usability" >&5
+echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <com_err.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking com_err.h presence" >&5
+echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <com_err.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: com_err.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: com_err.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: com_err.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for com_err.h" >&5
+echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_com_err_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+
+fi
+if test $ac_cv_header_com_err_h = yes; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: cannot locate com_err.h" >&5
+echo "$as_me: error: cannot locate com_err.h" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+fi
+
+
+ # Extract the first word of "compile_et", so it can be a program name with args.
+set dummy compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+else
+
+ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
+ with_com_err="/usr/local"
+ # Extract the first word of "/usr/local/bin/compile_et", so it can be a program name with args.
+set dummy /usr/local/bin/compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
+ with_com_err="/usr"
+ # Extract the first word of "/usr/bin/compile_et", so it can be a program name with args.
+set dummy /usr/bin/compile_et; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $COMPILE_ET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+esac
+fi
+COMPILE_ET=$ac_cv_path_COMPILE_ET
+
+if test -n "$COMPILE_ET"; then
+ echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+echo "${ECHO_T}$COMPILE_ET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ else
+ # use ours
+ with_com_err=yes
+ fi
+
+fi
+
+
+ if test "${with_com_err}" = "no"; then
+ { echo "$as_me:$LINENO: WARNING: com_err is required; included version will be used." >&5
+echo "$as_me: WARNING: com_err is required; included version will be used." >&2;}
+ with_com_err="yes"
+ fi
+ if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then
+ { echo "$as_me:$LINENO: WARNING: Parts of com_err distribuion were found, but not compile_et." >&5
+echo "$as_me: WARNING: Parts of com_err distribuion were found, but not compile_et." >&2;}
+ { echo "$as_me:$LINENO: WARNING: Will build com_err from included sources." >&5
+echo "$as_me: WARNING: Will build com_err from included sources." >&2;}
+ with_com_err="yes" # build it ourselves
+ fi
+fi
+
+case "$with_com_err" in
+ # built-in et
+ yes) # use the com_err we're gonna build
+ COM_ERR_LIBS="../et/libcom_err.a"
+ COMPILE_ET="../et/compile_et"
+ COM_ERR_LDFLAGS=""
+ COM_ERR_CPPFLAGS="-I\${top_srcdir}/et"
+ PRE_SUBDIRS="et ${PRE_SUBDIRS}"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} et/Makefile"
+ ;;
+ "") # no problem, we already have it in the paths
+ # we do nothing to pick it up
+ COM_ERR_LIBS="-lcom_err" # hope it's not shared
+ # we already set COMPILE_ET, or we didn't get here
+ COM_ERR_LDFLAGS=""
+ COM_ERR_CPPFLAGS=""
+ ;;
+ *) # use whatever they told us, or whatever we found
+ COMPILE_ET="${with_com_err}/bin/compile_et"
+ COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a"
+ COM_ERR_CPPFLAGS="-I${with_com_err}/include"
+ # Ever get the feeling people hide this stuff on purpose?
+ if test -d "${with_com_err}/include/et" ; then
+ COM_ERR_CPPFLAGS="-I${with_com_err}/include/et"
+ fi
+ COMPILE_ET="${with_com_err}/bin/compile_et"
+esac
+
+
+
+
+
+echo "$as_me:$LINENO: checking for modern syslog" >&5
+echo $ECHO_N "checking for modern syslog... $ECHO_C" >&6
+if test "${cyrus_cv_lib_syslog+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <syslog.h>
+#ifndef LOG_LOCAL6
+#include </nonexistent>
+#endif
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cyrus_cv_lib_syslog=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cyrus_cv_lib_syslog=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+
+if test $cyrus_cv_lib_syslog = no; then
+ PRE_SUBDIRS="${PRE_SUBDIRS} syslog"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile"
+ DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a"
+ CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog"
+fi
+echo "$as_me:$LINENO: result: $cyrus_cv_lib_syslog" >&5
+echo "${ECHO_T}$cyrus_cv_lib_syslog" >&6
+
+echo "$as_me:$LINENO: checking which syslog facility to use" >&5
+echo $ECHO_N "checking which syslog facility to use... $ECHO_C" >&6
+SYSLOG_FACILITY=LOG_LOCAL6
+
+# Check whether --with-syslogfacility or --without-syslogfacility was given.
+if test "${with_syslogfacility+set}" = set; then
+ withval="$with_syslogfacility"
+ if test "$withval" != "yes" -a "$withval" != "no" ; then
+ SYSLOG_FACILITY=LOG_$withval
+ fi;
+fi;
+
+cat >>confdefs.h <<_ACEOF
+#define SYSLOG_FACILITY $SYSLOG_FACILITY
+_ACEOF
+
+echo "$as_me:$LINENO: result: $SYSLOG_FACILITY" >&5
+echo "${ECHO_T}$SYSLOG_FACILITY" >&6
+
+
+for ac_func in getdtablesize
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case $LIBOBJS in
+ "$ac_func.$ac_objext" | \
+ *" $ac_func.$ac_objext" | \
+ "$ac_func.$ac_objext "* | \
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
+esac
+
+fi
+done
+
+
+# Check whether --enable-cmulocal or --disable-cmulocal was given.
+if test "${enable_cmulocal+set}" = set; then
+ enableval="$enable_cmulocal"
+ if test "$enableval" = yes; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile"
+ fi
+fi;
+
+echo "$as_me:$LINENO: checking to use old sieve service name" >&5
+echo $ECHO_N "checking to use old sieve service name... $ECHO_C" >&6
+# Check whether --enable-oldsievename or --disable-oldsievename was given.
+if test "${enable_oldsievename+set}" = set; then
+ enableval="$enable_oldsievename"
+ if test "$enableval" = yes; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define OLD_SIEVE_SERVICE_NAME
+_ACEOF
+
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
+
+# Check whether --enable-listext or --disable-listext was given.
+if test "${enable_listext+set}" = set; then
+ enableval="$enable_listext"
+ if test "$enableval" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_LISTEXT
+_ACEOF
+
+ fi
+fi;
+
+# Check whether --enable-netscapehack or --disable-netscapehack was given.
+if test "${enable_netscapehack+set}" = set; then
+ enableval="$enable_netscapehack"
+ if test "$enableval" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_X_NETSCAPE_HACK
+_ACEOF
+
+ fi
+fi;
+
+echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ :
+else
+
+echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for crypt" >&5
+echo $ECHO_N "checking for crypt... $ECHO_C" >&6
+if test "${ac_cv_func_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define crypt innocuous_crypt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char crypt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef crypt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_crypt) || defined (__stub___crypt)
+choke me
+#else
+char (*f) () = crypt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != crypt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_crypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
+echo "${ECHO_T}$ac_cv_func_crypt" >&6
+if test $ac_cv_func_crypt = yes; then
+ cmu_have_crypt=yes
+else
+ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+int
+main ()
+{
+crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypt_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypt_crypt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
+ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
+else
+ cmu_have_crypt=no
+fi
+
+fi
+
+
+
+
+
+# Check whether --enable-gssapi or --disable-gssapi was given.
+if test "${enable_gssapi+set}" = set; then
+ enableval="$enable_gssapi"
+ gssapi=$enableval
+else
+ gssapi=yes
+fi;
+
+# Check whether --with-gss_impl or --without-gss_impl was given.
+if test "${with_gss_impl+set}" = set; then
+ withval="$with_gss_impl"
+ gss_impl=$withval
+else
+ gss_impl=auto
+fi;
+
+if test "$gssapi" != no; then
+ platform=
+ case "${host}" in
+ *-*-linux*)
+ platform=__linux
+ ;;
+ *-*-hpux*)
+ platform=__hpux
+ ;;
+ *-*-irix*)
+ platform=__irix
+ ;;
+ *-*-solaris2*)
+# When should we use __sunos?
+ platform=__solaris
+ ;;
+ *-*-aix*)
+###_AIX
+ platform=__aix
+ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
+echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
+ if test "$gss_impl" = "cybersafe"; then
+ { { echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
+echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ ;;
+ esac
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+
+ if test -d ${gssapi}; then
+ CPPFLAGS="$CPPFLAGS -I$gssapi/include"
+# We want to keep -I in our CPPFLAGS, but only if we succeed
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+### I am not sure how useful is this (and whether this is required at all
+### especially when we have to provide two -L flags for new CyberSafe
+ LDFLAGS="$LDFLAGS -L$gssapi/lib"
+
+ if test -n "$platform"; then
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+ fi
+ fi
+ fi
+ if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for gssapi.h" >&5
+echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking gssapi.h usability" >&5
+echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <gssapi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking gssapi.h presence" >&5
+echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for gssapi.h" >&5
+echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_gssapi_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
+
+fi
+if test $ac_cv_header_gssapi_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSSAPI_H
+_ACEOF
+
+else
+ if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
+echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
+echo $ECHO_N "checking gssapi/gssapi.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <gssapi/gssapi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
+echo $ECHO_N "checking gssapi/gssapi.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
+echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
+
+fi
+if test $ac_cv_header_gssapi_gssapi_h = yes; then
+ :
+else
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
+fi
+
+
+fi
+
+
+
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+fi
+
+if test "$gssapi" != no; then
+ # We need to find out which gssapi implementation we are
+ # using. Supported alternatives are: MIT Kerberos 5,
+ # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
+ # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
+ # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
+ #
+ # The choice is reflected in GSSAPIBASE_LIBS
+
+
+echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRESOLV 1
+_ACEOF
+
+ LIBS="-lresolv $LIBS"
+
+fi
+
+ if test -d ${gssapi}; then
+ gssapi_dir="${gssapi}/lib"
+ GSSAPIBASE_LIBS="-L$gssapi_dir"
+ GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
+ else
+ # FIXME: This is only used for building cyrus, and then only as
+ # a real hack. it needs to be fixed.
+ gssapi_dir="/usr/local/lib"
+ fi
+
+ # Check a full link against the Heimdal libraries.
+ # If this fails, check a full link against the MIT libraries.
+ # If this fails, check a full link against the CyberSafe libraries.
+ # If this fails, check a full link against the Solaris 8 and up libgss.
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgssapi... $ECHO_C" >&6
+if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gssapi_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gssapi_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gssapi_gss_unwrap" >&6
+if test $ac_cv_lib_gssapi_gss_unwrap = yes; then
+ gss_impl="heimdal"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
+ # check for libkrb5support first
+ echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
+echo $ECHO_N "checking for krb5int_getspecific in -lkrb5support... $ECHO_C" >&6
+if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb5int_getspecific ();
+int
+main ()
+{
+krb5int_getspecific ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_krb5support_krb5int_getspecific=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_krb5support_krb5int_getspecific=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
+echo "${ECHO_T}$ac_cv_lib_krb5support_krb5int_getspecific" >&6
+if test $ac_cv_lib_krb5support_krb5int_getspecific = yes; then
+ K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
+fi
+
+
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgssapi_krb5... $ECHO_C" >&6
+if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gssapi_krb5_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gssapi_krb5_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6
+if test $ac_cv_lib_gssapi_krb5_gss_unwrap = yes; then
+ gss_impl="mit"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ # For Cybersafe one has to set a platform define in order to make compilation work
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
+
+ cmu_saved_CPPFLAGS=$CPPFLAGS
+ cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
+# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
+ if test -d "${gssapi}/appsec-rt/lib"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
+ fi
+ CPPFLAGS="$CPPFLAGS -D$platform"
+ if test -d "${gssapi}/appsec-sdk/include"; then
+ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
+ fi
+
+ gss_failed=0
+
+# Check for CyberSafe with two libraries first, than fall back to a single
+# library (older CyberSafe)
+
+ unset ac_cv_lib_gss_csf_gss_acq_user
+ echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
+echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char csf_gss_acq_user ();
+int
+main ()
+{
+csf_gss_acq_user ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_csf_gss_acq_user=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_csf_gss_acq_user=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6
+if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
+ gss_impl="cybersafe03"
+else
+ unset ac_cv_lib_gss_csf_gss_acq_user;
+ echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
+echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char csf_gss_acq_user ();
+int
+main ()
+{
+csf_gss_acq_user ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_csf_gss_acq_user=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_csf_gss_acq_user=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6
+if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
+ gss_impl="cybersafe"
+else
+ gss_failed=1
+fi
+
+fi
+
+
+ if test "$gss_failed" = "1"; then
+# Restore variables
+ GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+
+ if test "$gss_impl" != "auto"; then
+ gss_impl="failed"
+ fi
+ fi
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
+ gss_failed=0
+ echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
+echo $ECHO_N "checking for gss_unwrap in -lgss... $ECHO_C" >&6
+if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgss -lgss $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_unwrap ();
+int
+main ()
+{
+gss_unwrap ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gss_gss_unwrap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_gss_gss_unwrap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
+echo "${ECHO_T}$ac_cv_lib_gss_gss_unwrap" >&6
+if test $ac_cv_lib_gss_gss_unwrap = yes; then
+ gss_impl="seam"
+else
+ gss_failed=1
+fi
+
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+ fi
+
+ if test "$gss_impl" = "mit"; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
+ elif test "$gss_impl" = "heimdal"; then
+ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
+ elif test "$gss_impl" = "cybersafe03"; then
+# Version of CyberSafe with two libraries
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "cybersafe"; then
+ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
+ # there is no static libgss for CyberSafe
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "seam"; then
+ GSSAPIBASE_LIBS=-lgss
+ # there is no static libgss on Solaris 8 and up
+ GSSAPIBASE_STATIC_LIBS=none
+ elif test "$gss_impl" = "failed"; then
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
+ else
+ gssapi="no"
+ GSSAPIBASE_LIBS=
+ GSSAPIBASE_STATIC_LIBS=
+ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
+echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
+ fi
+fi
+
+#
+# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
+# in gssapi\rfckrb5.h
+#
+if test "$gssapi" != "no"; then
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_HOSTBASED_SERVICE
+ hostbased_service_gss_nt_yes
+ #endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+else
+ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
+echo "$as_me: WARNING: Cybersafe define not found" >&2;}
+fi
+rm -f conftest*
+
+
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSS_C_NT_HOSTBASED_SERVICE
+_ACEOF
+
+fi
+rm -f conftest*
+
+ fi
+
+ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+ #ifdef GSS_C_NT_USER_NAME
+ user_name_yes_gss_nt
+ #endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+else
+ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
+echo "$as_me: WARNING: Cybersafe define not found" >&2;}
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_h" = "yes"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+fi
+rm -f conftest*
+
+ elif test "$ac_cv_header_gssapi_gssapi_h"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSS_C_NT_USER_NAME
+_ACEOF
+
+fi
+rm -f conftest*
+
+ fi
+fi
+
+GSSAPI_LIBS=""
+echo "$as_me:$LINENO: checking GSSAPI" >&5
+echo $ECHO_N "checking GSSAPI... $ECHO_C" >&6
+if test "$gssapi" != no; then
+ echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
+echo "${ECHO_T}with implementation ${gss_impl}" >&6
+ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
+fi
+
+ SASL_MECHS="$SASL_MECHS libgssapiv2.la"
+ SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
+ SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
+
+ cmu_save_LIBS="$LIBS"
+ LIBS="$LIBS $GSSAPIBASE_LIBS"
+
+for ac_func in gsskrb5_register_acceptor_identity
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$cmu_save_LIBS"
+else
+ echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6
+fi
+
+
+
+
+
+
+# Check whether --with-sasl or --without-sasl was given.
+if test "${with_sasl+set}" = set; then
+ withval="$with_sasl"
+ with_sasl="$withval"
+else
+ with_sasl="yes"
+fi;
+
+
+# Check whether --with-staticsasl or --without-staticsasl was given.
+if test "${with_staticsasl+set}" = set; then
+ withval="$with_staticsasl"
+ with_staticsasl="$withval";
+ if test $with_staticsasl != "no"; then
+ using_static_sasl="static"
+ fi
+else
+ with_staticsasl="no"; using_static_sasl="no"
+fi;
+
+SASLFLAGS=""
+LIB_SASL=""
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+cmu_saved_LDFLAGS=$LDFLAGS
+cmu_saved_LIBS=$LIBS
+
+if test ${with_staticsasl} != "no"; then
+ if test -d ${with_staticsasl}; then
+ if test -d ${with_staticsasl}/lib64 ; then
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib64
+ else
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ fi
+ ac_cv_sasl_where_lib=${with_staticsasl}/lib
+ ac_cv_sasl_where_inc=${with_staticsasl}/include
+
+ SASLFLAGS="-I$ac_cv_sasl_where_inc"
+ LIB_SASL="-L$ac_cv_sasl_where_lib"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+ else
+ with_staticsasl="/usr"
+ fi
+
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
+echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sasl/sasl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
+echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sasl/sasl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_sasl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+
+fi
+if test $ac_cv_header_sasl_sasl_h = yes; then
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
+echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sasl/saslutil.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
+echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sasl/saslutil.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+
+fi
+if test $ac_cv_header_sasl_saslutil_h = yes; then
+ for i42 in lib64 lib; do
+ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
+ ac_cv_found_sasl=yes
+ echo "$as_me:$LINENO: checking for static libsasl" >&5
+echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6
+ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
+ fi
+ done
+ if test ! "$ac_cv_found_sasl" = "yes"; then
+ echo "$as_me:$LINENO: checking for static libsasl" >&5
+echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6
+ { { echo "$as_me:$LINENO: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&5
+echo "$as_me: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+
+fi
+
+
+
+ echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
+
+ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
+ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
+ else
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
+ fi
+fi
+
+if test -d ${with_sasl}; then
+ ac_cv_sasl_where_lib=${with_sasl}/lib
+ ac_cv_sasl_where_inc=${with_sasl}/include
+
+ DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
+ if test "$ac_cv_sasl_where_lib" != ""; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL}"
+ else
+ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
+ fi
+
+ fi
+ LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
+ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
+ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
+fi
+
+# be sure to check for a SASLv2 specific function
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
+echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sasl/sasl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
+echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sasl/sasl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_sasl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
+
+fi
+if test $ac_cv_header_sasl_sasl_h = yes; then
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
+echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sasl/saslutil.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
+echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sasl/saslutil.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
+if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
+
+fi
+if test $ac_cv_header_sasl_saslutil_h = yes; then
+ echo "$as_me:$LINENO: checking for prop_get in -lsasl2" >&5
+echo $ECHO_N "checking for prop_get in -lsasl2... $ECHO_C" >&6
+if test "${ac_cv_lib_sasl2_prop_get+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsasl2 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char prop_get ();
+int
+main ()
+{
+prop_get ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sasl2_prop_get=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sasl2_prop_get=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_prop_get" >&5
+echo "${ECHO_T}$ac_cv_lib_sasl2_prop_get" >&6
+if test $ac_cv_lib_sasl2_prop_get = yes; then
+ ac_cv_found_sasl=yes
+else
+ ac_cv_found_sasl=no
+fi
+
+else
+ ac_cv_found_sasl=no
+fi
+
+
+else
+ ac_cv_found_sasl=no
+fi
+
+
+
+if test "$ac_cv_found_sasl" = "yes"; then
+ if test "$ac_cv_sasl_where_lib" != ""; then
+
+ # this is CMU ADD LIBPATH TO
+ if test "$andrew_runpath_switch" = "none" ; then
+ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL}"
+ else
+ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
+ fi
+
+ fi
+ DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
+ if test "$using_static_sasl" != "static"; then
+ LIB_SASL=$DYNLIB_SASL
+ SASLFLAGS=$DYNSASLFLAGS
+ fi
+else
+ DYNLIB_SASL=""
+ DYNSASLFLAGS=""
+ using_static_sasl="staticonly"
+fi
+
+if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
+ SASL_GSSAPI_LIBS_SET=""
+ cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
+fi
+
+LIBS="$cmu_saved_LIBS"
+LDFLAGS="$cmu_saved_LDFLAGS"
+CPPFLAGS="$cmu_saved_CPPFLAGS"
+
+
+
+
+
+
+
+if test "$ac_cv_found_sasl" != "yes"; then
+ { { echo "$as_me:$LINENO: error: Cannot continue without libsasl2.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&5
+echo "$as_me: error: Cannot continue without libsasl2.
+Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+cmu_saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $SASLFLAGS"
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sasl/sasl.h>
+
+#ifndef SASL_VERSION_MAJOR
+#error SASL_VERSION_MAJOR not defined
+#endif
+#ifndef SASL_VERSION_MINOR
+#error SASL_VERSION_MINOR not defined
+#endif
+#ifndef SASL_VERSION_STEP
+#error SASL_VERSION_STEP not defined
+#endif
+
+#if SASL_VERSION_MAJOR < 2 || SASL_VERSION_MINOR < 1 || SASL_VERSION_STEP < 7
+#error SASL version is less than 2.1.7
+#endif
+
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { { echo "$as_me:$LINENO: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&5
+echo "$as_me: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_ext
+
+CPPFLAGS=$cmu_saved_CPPFLAGS
+
+
+
+cmu_saved_LDFLAGS=$LDFLAGS
+
+LDFLAGS="$LDFLAGS $LIB_SASL"
+
+echo "$as_me:$LINENO: checking for sasl_checkapop in -lsasl2" >&5
+echo $ECHO_N "checking for sasl_checkapop in -lsasl2... $ECHO_C" >&6
+if test "${ac_cv_lib_sasl2_sasl_checkapop+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsasl2 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sasl_checkapop ();
+int
+main ()
+{
+sasl_checkapop ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sasl2_sasl_checkapop=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sasl2_sasl_checkapop=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_checkapop" >&5
+echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_checkapop" >&6
+if test $ac_cv_lib_sasl2_sasl_checkapop = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_APOP
+_ACEOF
+
+else
+ { { echo "$as_me:$LINENO: error: libsasl2 without working sasl_checkapop. Cannot continue." >&5
+echo "$as_me: error: libsasl2 without working sasl_checkapop. Cannot continue." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+LDFLAGS=$cmu_saved_LDFLAGS
+
+
+
+# Check whether --with-perl or --without-perl was given.
+if test "${with_perl+set}" = set; then
+ withval="$with_perl"
+ with_perl="$withval"
+else
+ with_perl="perl"
+fi;
+
+if test "${with_perl}" = yes; then
+ with_perl="perl"
+fi
+if test "${with_perl}" != no; then
+ if test ${using_static_sasl} = "staticonly"; then
+ { echo "$as_me:$LINENO: WARNING: Cannot compile perl utilities using static libsasl" >&5
+echo "$as_me: WARNING: Cannot compile perl utilities using static libsasl" >&2;}
+ with_perl="no"
+ else
+ for ac_prog in ${with_perl} perl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PERL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$PERL"; then
+ ac_cv_prog_PERL="$PERL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PERL="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+PERL=$ac_cv_prog_PERL
+if test -n "$PERL"; then
+ echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$PERL" && break
+done
+test -n "$PERL" || PERL="with_perl=notfound"
+
+ fi
+fi
+if test "$with_perl" = "notfound"; then
+ { echo "$as_me:$LINENO: WARNING: Perl not found: Administrative tools won't be available" >&5
+echo "$as_me: WARNING: Perl not found: Administrative tools won't be available" >&2;}
+elif test "${with_perl}" != "no"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl"
+ PERL_SUBDIRS="imap"
+ PERL="${with_perl}"
+ PERL_CCCDLFLAGS="$cccdlflags"
+
+fi
+
+if test "$sievedir" != "no"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile"
+
+ PERL_SUBDIRS="${PERL_SUBDIRS} sieve"
+ PERL_DEPSUBDIRS="sieve"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile"
+else
+ PERL_DEPSUBDIRS="none"
+fi
+
+echo "$as_me:$LINENO: checking for MD5Init" >&5
+echo $ECHO_N "checking for MD5Init... $ECHO_C" >&6
+if test "${ac_cv_func_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define MD5Init to an innocuous variant, in case <limits.h> declares MD5Init.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define MD5Init innocuous_MD5Init
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char MD5Init (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef MD5Init
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char MD5Init ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_MD5Init) || defined (__stub___MD5Init)
+choke me
+#else
+char (*f) () = MD5Init;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != MD5Init;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_MD5Init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_MD5Init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_MD5Init" >&5
+echo "${ECHO_T}$ac_cv_func_MD5Init" >&6
+if test $ac_cv_func_MD5Init = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for MD5Init in -lmd" >&5
+echo $ECHO_N "checking for MD5Init in -lmd... $ECHO_C" >&6
+if test "${ac_cv_lib_md_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char MD5Init ();
+int
+main ()
+{
+MD5Init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_md_MD5Init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_md_MD5Init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Init" >&5
+echo "${ECHO_T}$ac_cv_lib_md_MD5Init" >&6
+if test $ac_cv_lib_md_MD5Init = yes; then
+ LIBS="${LIBS} -lmd"
+else
+ MD5OBJ="md5.o"
+fi
+
+fi
+
+
+
+SNMP_SUBDIRS=""
+
+
+
+# Check whether --with-lib-subdir or --without-lib-subdir was given.
+if test "${with_lib_subdir+set}" = set; then
+ withval="$with_lib_subdir"
+
+fi;
+echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
+echo $ECHO_N "checking what directory libraries are found in... $ECHO_C" >&6
+if test "${ac_cv_cmu_lib_subdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
+test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
+if test "X$with_lib_subdir" = "X" ; then
+ ac_cv_cmu_lib_subdir=lib
+ if test $ac_cv_sizeof_long -eq 4 ; then
+ test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
+ fi
+ if test $ac_cv_sizeof_long -eq 8 ; then
+ test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
+ fi
+else
+ ac_cv_cmu_lib_subdir=$with_lib_subdir
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
+echo "${ECHO_T}$ac_cv_cmu_lib_subdir" >&6
+CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
+
+
+
+
+
+
+# Check whether --with-libwrap or --without-libwrap was given.
+if test "${with_libwrap+set}" = set; then
+ withval="$with_libwrap"
+ with_libwrap=$withval
+else
+ with_libwrap=yes
+fi;
+ if test "$with_libwrap" != no; then
+ if test -d "$with_libwrap"; then
+ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
+ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ echo "$as_me:$LINENO: checking for request_init in -lwrap" >&5
+echo $ECHO_N "checking for request_init in -lwrap... $ECHO_C" >&6
+if test "${ac_cv_lib_wrap_request_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwrap ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char request_init ();
+int
+main ()
+{
+request_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_wrap_request_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_wrap_request_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_request_init" >&5
+echo "${ECHO_T}$ac_cv_lib_wrap_request_init" >&6
+if test $ac_cv_lib_wrap_request_init = yes; then
+
+ if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for tcpd.h" >&5
+echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
+if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
+echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking tcpd.h usability" >&5
+echo $ECHO_N "checking tcpd.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <tcpd.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking tcpd.h presence" >&5
+echo $ECHO_N "checking tcpd.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <tcpd.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: tcpd.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: tcpd.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: tcpd.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: tcpd.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: tcpd.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: tcpd.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for tcpd.h" >&5
+echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
+if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_tcpd_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
+echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
+
+fi
+if test $ac_cv_header_tcpd_h = yes; then
+ :
+else
+ with_libwrap=no
+fi
+
+
+else
+ with_libwrap=no
+fi
+
+ LIBS="$cmu_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: checking libwrap support" >&5
+echo $ECHO_N "checking libwrap support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $with_libwrap" >&5
+echo "${ECHO_T}$with_libwrap" >&6
+ LIB_WRAP=""
+ if test "$with_libwrap" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBWRAP
+_ACEOF
+
+ LIB_WRAP="-lwrap"
+ echo "$as_me:$LINENO: checking for yp_get_default_domain in -lnsl" >&5
+echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yp_get_default_domain ();
+int
+main ()
+{
+yp_get_default_domain ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_yp_get_default_domain=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_yp_get_default_domain=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6
+if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then
+ LIB_WRAP="${LIB_WRAP} -lnsl"
+fi
+
+ fi
+
+
+
+
+
+
+# Check whether --with-snmp or --without-snmp was given.
+if test "${with_snmp+set}" = set; then
+ withval="$with_snmp"
+ with_snmp=$withval
+else
+ with_snmp=yes
+fi;
+
+
+# Check whether --with-ucdsnmp or --without-ucdsnmp was given.
+if test "${with_ucdsnmp+set}" = set; then
+ withval="$with_ucdsnmp"
+ with_snmp=$withval
+fi;
+
+if test "$with_snmp" != "no"; then
+
+ if test "$with_snmp" = "yes"; then
+ # Extract the first word of "net-snmp-config", so it can be a program name with args.
+set dummy net-snmp-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_SNMP_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $SNMP_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="/usr/local/bin:$PATH"
+for as_dir in $as_dummy
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG
+
+if test -n "$SNMP_CONFIG"; then
+ echo "$as_me:$LINENO: result: $SNMP_CONFIG" >&5
+echo "${ECHO_T}$SNMP_CONFIG" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ else
+ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
+ fi
+
+ if test -x "$SNMP_CONFIG"; then
+ echo "$as_me:$LINENO: checking NET SNMP libraries" >&5
+echo $ECHO_N "checking NET SNMP libraries... $ECHO_C" >&6
+
+ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
+ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
+
+ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
+ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
+ LIB_UCDSNMP=$SNMP_LIBS
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NETSNMP 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: WARNING: Could not find the required paths. Please check your net-snmp installation." >&5
+echo "$as_me: WARNING: Could not find the required paths. Please check your net-snmp installation." >&2;}
+ fi
+ else
+ if test "$with_snmp" != no; then
+ if test -d "$with_snmp"; then
+ CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
+ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+ echo "$as_me:$LINENO: checking for sprint_objid in -lsnmp" >&5
+echo $ECHO_N "checking for sprint_objid in -lsnmp... $ECHO_C" >&6
+if test "${ac_cv_lib_snmp_sprint_objid+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsnmp ${LIB_SOCKET} $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sprint_objid ();
+int
+main ()
+{
+sprint_objid ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_snmp_sprint_objid=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_snmp_sprint_objid=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_sprint_objid" >&5
+echo "${ECHO_T}$ac_cv_lib_snmp_sprint_objid" >&6
+if test $ac_cv_lib_snmp_sprint_objid = yes; then
+
+ if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
+echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking ucd-snmp/version.h usability" >&5
+echo $ECHO_N "checking ucd-snmp/version.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <ucd-snmp/version.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking ucd-snmp/version.h presence" >&5
+echo $ECHO_N "checking ucd-snmp/version.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ucd-snmp/version.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
+echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_ucd_snmp_version_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6
+
+fi
+if test $ac_cv_header_ucd_snmp_version_h = yes; then
+ :
+else
+ with_snmp=no
+fi
+
+
+else
+ with_snmp=no
+fi
+
+ LIBS="$cmu_save_LIBS"
+ fi
+ echo "$as_me:$LINENO: checking UCD SNMP libraries" >&5
+echo $ECHO_N "checking UCD SNMP libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $with_snmp" >&5
+echo "${ECHO_T}$with_snmp" >&6
+ LIB_UCDSNMP=""
+ if test "$with_snmp" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UCDSNMP 1
+_ACEOF
+
+ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
+ echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpm" >&5
+echo $ECHO_N "checking for rpmdbOpen in -lrpm... $ECHO_C" >&6
+if test "${ac_cv_lib_rpm_rpmdbOpen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrpm -lpopt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char rpmdbOpen ();
+int
+main ()
+{
+rpmdbOpen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_rpm_rpmdbOpen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rpm_rpmdbOpen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbOpen" >&5
+echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbOpen" >&6
+if test $ac_cv_lib_rpm_rpmdbOpen = yes; then
+ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"
+fi
+
+ fi
+
+ fi
+fi
+
+
+
+# Figure out what directories we're linking against.
+# Lots of fun for the whole family.
+# This probably chokes on anything with spaces in it.
+# All we want is the list of -L directories, and -L may or may not be
+# followed by a space.
+isdir=no
+libpath=""
+#echo "debug ldflags: << ${ldflags} >>"
+#echo "debug default_ldflags: << ${default_ldflags} >>"
+for flag in ${ldflags} ${default_ldflags}; do
+ case $flag in
+ -L)
+ # it's a split -L option, we'll mark the next option as a dir.
+ isdir=yes
+ ;;
+
+ -L*)
+ # attached -L option: split off the directory
+ larg=`echo $flag | sed -e 's:-L\(..*\):\1:'`
+ libpath="${libpath} ${larg}"
+ ;;
+
+ *)
+ if test $isdir = yes ; then
+ libpath="${libpath} ${flag}"
+ isdir=no
+ fi
+ esac
+done
+
+IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
+IMAP_LIBS="${LIB_SASL} ${LIBS}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+ "master/Makefile" ) CONFIG_FILES="$CONFIG_FILES master/Makefile" ;;
+ "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+ "imap/Makefile" ) CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;;
+ "imtest/Makefile" ) CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;;
+ "netnews/Makefile" ) CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;;
+ "perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;;
+ "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at MAKEDEPEND@,$MAKEDEPEND,;t t
+s, at cyrus_prefix@,$cyrus_prefix,;t t
+s, at service_path@,$service_path,;t t
+s, at cyrus_user@,$cyrus_user,;t t
+s, at cyrus_group@,$cyrus_group,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CPP@,$CPP,;t t
+s, at EGREP@,$EGREP,;t t
+s, at AWK@,$AWK,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LIB_SOCKET@,$LIB_SOCKET,;t t
+s, at IPV6_OBJS@,$IPV6_OBJS,;t t
+s, at PRE_SUBDIRS@,$PRE_SUBDIRS,;t t
+s, at EXTRA_SUBDIRS@,$EXTRA_SUBDIRS,;t t
+s, at DEPLIBS@,$DEPLIBS,;t t
+s, at LOCALDEFS@,$LOCALDEFS,;t t
+s, at BDB_INC@,$BDB_INC,;t t
+s, at BDB_LIB@,$BDB_LIB,;t t
+s, at CYRUSDB_OBJS@,$CYRUSDB_OBJS,;t t
+s, at SIEVE_OBJS@,$SIEVE_OBJS,;t t
+s, at SIEVE_LIBS@,$SIEVE_LIBS,;t t
+s, at SIEVE_CPPFLAGS@,$SIEVE_CPPFLAGS,;t t
+s, at YACC@,$YACC,;t t
+s, at LEX@,$LEX,;t t
+s, at LEXLIB@,$LEXLIB,;t t
+s, at LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+s, at SIEVE_SUBDIRS@,$SIEVE_SUBDIRS,;t t
+s, at WITH_NONBLOCK@,$WITH_NONBLOCK,;t t
+s, at WITH_GMTOFF@,$WITH_GMTOFF,;t t
+s, at WITH_MAP@,$WITH_MAP,;t t
+s, at WITH_LOCK@,$WITH_LOCK,;t t
+s, at cyrus_sigveclib@,$cyrus_sigveclib,;t t
+s, at AFS_LIBS@,$AFS_LIBS,;t t
+s, at AFS_LDFLAGS@,$AFS_LDFLAGS,;t t
+s, at LDAP_CPPFLAGS@,$LDAP_CPPFLAGS,;t t
+s, at LDAP_LDFLAGS@,$LDAP_LDFLAGS,;t t
+s, at LDAP_LIBS@,$LDAP_LIBS,;t t
+s, at SERVER_SUBDIRS@,$SERVER_SUBDIRS,;t t
+s, at OPENSSL_INC@,$OPENSSL_INC,;t t
+s, at OPENSSL_LIB@,$OPENSSL_LIB,;t t
+s, at ZEPHYR_LIBS@,$ZEPHYR_LIBS,;t t
+s, at ZEPHYR_CPPFLAGS@,$ZEPHYR_CPPFLAGS,;t t
+s, at IMAP_PROGS@,$IMAP_PROGS,;t t
+s, at COMPILE_ET@,$COMPILE_ET,;t t
+s, at COM_ERR_LIBS@,$COM_ERR_LIBS,;t t
+s, at COM_ERR_LDFLAGS@,$COM_ERR_LDFLAGS,;t t
+s, at COM_ERR_CPPFLAGS@,$COM_ERR_CPPFLAGS,;t t
+s, at LIB_CRYPT@,$LIB_CRYPT,;t t
+s, at GSSAPI_LIBS@,$GSSAPI_LIBS,;t t
+s, at GSSAPIBASE_LIBS@,$GSSAPIBASE_LIBS,;t t
+s, at LIB_DYN_SASL@,$LIB_DYN_SASL,;t t
+s, at DYNSASLFLAGS@,$DYNSASLFLAGS,;t t
+s, at LIB_SASL@,$LIB_SASL,;t t
+s, at SASLFLAGS@,$SASLFLAGS,;t t
+s, at PERL@,$PERL,;t t
+s, at PERL_CCCDLFLAGS@,$PERL_CCCDLFLAGS,;t t
+s, at MD5OBJ@,$MD5OBJ,;t t
+s, at SNMP_SUBDIRS@,$SNMP_SUBDIRS,;t t
+s, at CMU_LIB_SUBDIR@,$CMU_LIB_SUBDIR,;t t
+s, at LIB_WRAP@,$LIB_WRAP,;t t
+s, at SNMP_CONFIG@,$SNMP_CONFIG,;t t
+s, at LIB_UCDSNMP@,$LIB_UCDSNMP,;t t
+s, at LIB_RT@,$LIB_RT,;t t
+s, at IMAP_COM_ERR_LIBS@,$IMAP_COM_ERR_LIBS,;t t
+s, at IMAP_LIBS@,$IMAP_LIBS,;t t
+s, at PERL_SUBDIRS@,$PERL_SUBDIRS,;t t
+s, at PERL_DEPSUBDIRS@,$PERL_DEPSUBDIRS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/configure.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1248 @@
+dnl Process this file with autoconf to produce a configure script.
+
+dnl
+dnl Copyright (c) 1998-2000 Carnegie Mellon University. All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions
+dnl are met:
+dnl
+dnl 1. Redistributions of source code must retain the above copyright
+dnl notice, this list of conditions and the following disclaimer.
+dnl
+dnl 2. Redistributions in binary form must reproduce the above copyright
+dnl notice, this list of conditions and the following disclaimer in
+dnl the documentation and/or other materials provided with the
+dnl distribution.
+dnl
+dnl 3. The name "Carnegie Mellon University" must not be used to
+dnl endorse or promote products derived from this software without
+dnl prior written permission. For permission or any other legal
+dnl details, please contact
+dnl Office of Technology Transfer
+dnl Carnegie Mellon University
+dnl 5000 Forbes Avenue
+dnl Pittsburgh, PA 15213-3890
+dnl (412) 268-4387, fax: (412) 268-7395
+dnl tech-transfer at andrew.cmu.edu
+dnl
+dnl 4. Redistributions of any form whatsoever must retain the following
+dnl acknowledgment:
+dnl \"This product includes software developed by Computing Services
+dnl at Carnegie Mellon University (http://www.cmu.edu/computing/).\"
+dnl
+dnl CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+dnl THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+dnl AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+dnl FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+dnl AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+dnl OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl
+
+dnl
+dnl configure.in for the Cyrus imapd
+dnl $Id: configure.in,v 1.268.2.23 2005/04/12 20:05:20 shadow Exp $
+dnl
+
+
+AC_INIT(imap/imapd.c)
+AC_PREREQ([2.54])
+AC_CONFIG_HEADER(config.h)
+AC_CANONICAL_HOST
+
+dnl Useful hook for distributions
+AC_ARG_WITH(extraident,[ --with-extraident=STRING use STRING as extra version information],
+ [AC_DEFINE_UNQUOTED(EXTRA_IDENT,"$withval", [Extra version information for imap/version.h])])
+
+AC_CHECK_PROG(MAKEDEPEND,makedepend,makedepend,[`cd ${srcdir};pwd`/tools/not-mkdep])
+if test "$MAKEDEPEND" != "makedepend"; then
+ AC_MSG_WARN([Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory.])
+fi
+
+AC_ARG_WITH(login,,AC_ERROR([--with-login is no longer supported.
+Configure SASL appropriately instead.]))
+
+AC_ARG_WITH(cyrus-prefix,[ --with-cyrus-prefix=DIR use DIR as cyrus server install directory],
+ cyrus_prefix="$withval",cyrus_prefix="/usr/cyrus")
+AC_SUBST(cyrus_prefix)
+AC_DEFINE_UNQUOTED(CYRUS_PATH,"$cyrus_prefix",[Where will we be installed?])
+AC_ARG_WITH(service-path,[ --with-service-path=DIR use DIR as service install directory],
+ service_path="$withval",service_path="$cyrus_prefix/bin")
+AC_SUBST(service_path)
+AC_DEFINE_UNQUOTED(SERVICE_PATH,"$service_path",[Directiory to use for service binaries])
+AC_ARG_WITH(cyrus-user,[ --with-cyrus-user=USERID use USERID cyrus userid],
+ cyrus_user="$withval",cyrus_user="cyrus")
+AC_SUBST(cyrus_user)
+AC_DEFINE_UNQUOTED(CYRUS_USER, "$cyrus_user",[What user will we run as?])
+AC_ARG_WITH(cyrus-group,[ --with-cyrus-group=GROUPID use GROUPID cyrus group],
+ cyrus_group="$withval",cyrus_group="mail")
+AC_SUBST(cyrus_group)
+
+dnl allow users to override $sysconfdir, but retain old default (/etc)
+dnl if not specified
+if test $sysconfdir = '${prefix}/etc'; then
+ sysconfdir="/etc"
+fi
+AC_DEFINE_UNQUOTED(SYSCONFDIR,"$sysconfdir",[Config File Location])
+
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+AC_AIX
+AC_ISC_POSIX
+AC_PROG_AWK
+AC_C_CONST
+AC_SYS_LONG_FILE_NAMES
+if test $ac_cv_sys_long_file_names = no; then
+ AC_MSG_ERROR(The Cyrus IMAPD requires support for long file names)
+fi
+AC_C_INLINE
+
+AC_CHECK_SIZEOF(long)
+
+dnl Check if `long long int' is available
+AC_CHECK_SIZEOF(long long int)
+AC_CHECK_SIZEOF(unsigned long long int)
+if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \
+ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then
+ AC_DEFINE(HAVE_LONG_LONG_INT,[],[Does the compiler support long long int?])
+ AC_C_BIGENDIAN
+fi
+
+CMU_C___ATTRIBUTE__
+CMU_C_FPIC
+
+dnl check for -R, etc. switch
+CMU_GUESS_RUNPATH_SWITCH
+
+AC_CHECK_HEADERS(unistd.h sys/select.h sys/param.h stdarg.h)
+AC_REPLACE_FUNCS(memmove strcasecmp ftruncate strerror)
+AC_CHECK_FUNCS(strlcat strlcpy)
+AC_HEADER_DIRENT
+
+dnl do this before Berkeley DB/IPv6 detection
+CMU_SOCKETS
+LIBS="$LIBS ${LIB_SOCKET}"
+
+dnl check for IPv6 functions (fall back to sasl's if we don't have them)
+cyrus_cv_getaddrinfo=yes
+IPv6_CHECK_FUNC(getaddrinfo, [IPv6_CHECK_FUNC(gai_strerror,
+ AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?]),
+ cyrus_cv_getaddrinfo=no)], cyrus_cv_getaddrinfo=no)
+
+if test $cyrus_cv_getaddrinfo = no; then
+ IPV6_OBJS="getaddrinfo.o"
+fi
+
+cyrus_cv_getnameinfo=yes
+IPv6_CHECK_FUNC(getnameinfo,
+ AC_DEFINE(HAVE_GETNAMEINFO,[],[Do we have a getnameinfo?]),
+ cyrus_cv_getnameinfo=no)
+
+if test $cyrus_cv_getnameinfo = no; then
+ IPV6_OBJS="$IPV6_OBJS getnameinfo.o"
+fi
+
+IPv6_CHECK_SS_FAMILY()
+IPv6_CHECK_SA_LEN()
+
+AC_SUBST(IPV6_OBJS)
+
+dnl this is to check for time things
+AC_CHECK_HEADERS(sys/time.h)
+AC_HEADER_TIME
+AC_STRUCT_TM
+AC_STRUCT_TIMEZONE
+
+AC_SUBST(CPPFLAGS)
+AC_SUBST(PRE_SUBDIRS)
+AC_SUBST(EXTRA_SUBDIRS)
+AC_SUBST(DEPLIBS)
+AC_SUBST(LOCALDEFS)
+AC_FUNC_VPRINTF
+
+dnl function for doing each of the database backends
+dnl parameters: backend name, variable to set, withval
+
+CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o"
+
+dnl Berkeley DB Detection
+
+AC_ARG_WITH(bdb, [ --with-bdb=DIR use Berkeley DB (in DIR) [[yes]] ],
+ with_bdb=$withval, with_bdb="yes")
+
+dnl support old-style
+AC_ARG_WITH(dbdir,, with_bdb=$withval)
+
+case "$with_bdb" in
+ no)
+ use_berkeley="no"
+ ;;
+ yes)
+ use_berkeley="yes"
+ with_bdb_lib=none
+ with_bdb_inc=none
+ ;;
+
+ *)
+ use_berkeley="yes"
+ with_bdb_lib="$with_bdb/lib"
+ with_bdb_inc="$with_bdb/include"
+ ;;
+esac
+
+if test "$use_berkeley" != "no"; then
+ CYRUS_BERKELEY_DB_CHK()
+
+ if test "$dblib" = "no"; then
+ AC_ERROR([Berkeley DB 3.x or later was not found. You may need to
+ supply the --with-bdb-libdir or --with-bdb-incdir configure options.])
+ fi
+
+ if test "$with_bdb_lib" != "none"; then
+ CMU_ADD_LIBPATH($with_bdb_lib)
+ fi
+
+ BDB_INC=${BDB_INCADD}
+ BDB_LIB=${BDB_LIBADD}
+ AC_SUBST(BDB_INC)
+ AC_SUBST(BDB_LIB)
+
+ LIBS="${LIBS} ${BDB_LIBADD}"
+ CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
+
+ CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o"
+ AC_DEFINE(HAVE_BDB,[],[Build in Berkeley DB support?])
+fi
+
+dnl End Berkeley DB Detection
+
+AC_SUBST(CYRUSDB_OBJS)
+
+SIEVE_SUBDIRS=""
+sievedir="sieve"
+AC_ARG_ENABLE(sieve,
+ [ --disable-sieve disable Sieve support],
+ if test "$enableval" = no; then
+ sievedir="no"
+ fi)
+
+if test "$sievedir" != "no"; then
+ SIEVE_OBJS="lmtp_sieve.o smtpclient.o"
+ AC_SUBST(SIEVE_OBJS)
+ SIEVE_LIBS="../${sievedir}/libsieve.a"
+ AC_SUBST(SIEVE_LIBS)
+ SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir"
+ AC_SUBST(SIEVE_CPPFLAGS)
+ AC_DEFINE(USE_SIEVE,[],[Build in Sieve support?])
+
+ dnl Sieve configure stuff
+ AC_PROG_YACC
+ AC_PROG_LEX
+ AC_CHECK_LIB(fl,main)
+
+ AC_SEARCH_LIBS(regcomp, rx regex, [
+ AC_DEFINE(ENABLE_REGEX,[],[Do we have a decent regex library?])
+ AC_CHECK_HEADER(rxposix.h, AC_DEFINE(HAVE_RX,[],[Do we have rxposix.h?]))])
+
+
+ SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile"
+fi
+
+AC_SUBST(SIEVE_SUBDIRS)
+
+dnl for et routines
+AC_FUNC_CHECK(strerror,AC_DEFINE(HAS_STRERROR,[],[Do we have strerror()?]),
+ AC_DEFINE(NEED_SYS_ERRLIST,[],[Do we have a sys_errlist?]))
+
+dnl for master fd limits
+AC_CHECK_HEADERS(sys/resource.h)
+AC_CHECK_FUNCS(setrlimit)
+AC_CHECK_FUNCS(getrlimit)
+
+dnl for detaching terminal
+AC_CHECK_FUNCS(daemon setsid)
+
+dnl for turning off sockets
+AC_CHECK_FUNCS(shutdown)
+
+AC_EGREP_HEADER(socklen_t, sys/socket.h, AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?]))
+AC_EGREP_HEADER(sockaddr_storage, sys/socket.h,
+ AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,[],[Do we have a sockaddr_storage?]))
+AC_EGREP_HEADER(rlim_t, sys/resource.h, AC_DEFINE(HAVE_RLIM_T,[],[Do we have an rlim_t?]))
+
+dnl Bunch of setproctitle stuff
+spt_type=""
+AC_CHECK_FUNC(setproctitle,spt_type=SPT_BUILTIN)
+if test "$spt_type" = ""; then
+ dnl BSD/OS and FreeBSD put it in -lutil
+ AC_CHECK_LIB(util,setproctitle,spt_type=SPT_BUILTIN
+ LIBS="${LIBS} -lutil")
+fi
+if test "$spt_type" = ""; then
+ AC_CHECK_HEADER(sys/pstat.h,spt_type=SPT_PSTAT)
+fi
+if test "$spt_type" = ""; then
+ AC_CHECK_HEADER(sys/sysnews.h,spt_type=SPT_SYSMIPS)
+fi
+if test "$spt_type" = ""; then
+ AC_MSG_CHECKING(for PS_STRINGS)
+ AC_CACHE_VAL(cyrus_cv_sys_psstrings, AC_TRY_CPP([
+#include <machine/vmparam.h>
+#include <sys/exec.h>
+#ifndef PS_STRINGS
+#include </nonexistent>
+#endif],cyrus_cv_sys_psstrings=yes,cyrus_cv_sys_psstrings=no))
+ if test $cyrus_cv_sys_psstrings = yes; then
+ spt_type=SPT_PSSTRINGS
+ fi
+ AC_MSG_RESULT($cyrus_cv_sys_psstrings)
+fi
+if test "$spt_type" = ""; then
+ AC_MSG_CHECKING(for SCO)
+ AC_CACHE_VAL(cyrus_cv_sys_sco, AC_TRY_CPP([
+#ifndef _SCO_unix_
+#include </nonexistent>
+#endif],cyrus_cv_sys_sco=yes,cyrus_cv_sys_sco=no))
+ if test $cyrus_cv_sys_sco = yes; then
+ spt_type=SPT_SCO
+ fi
+ AC_MSG_RESULT($cyrus_cv_sys_sco)
+fi
+if test "$spt_type" = ""; then
+ AC_MSG_CHECKING(for setproctitle usability)
+ AC_CACHE_VAL(cyrus_cv_sys_setproctitle, AC_TRY_CPP([
+#if defined(DGUX) || defined(_SEQUENT_) || defined(apollo)
+#include </nonexistent>
+#endif],cyrus_cv_sys_setproctitle=yes,cyrus_cv_sys_setproctitle=no))
+ if test $cyrus_cv_sys_setproctitle = no; then
+ spt_type=SPT_NONE
+ fi
+ AC_MSG_RESULT($cyrus_cv_sys_setproctitle)
+fi
+if test "$spt_type" != ""; then
+ AC_DEFINE_UNQUOTED(SPT_TYPE,$spt_type,[Do we already have setproctitle?])
+fi
+
+AC_MSG_CHECKING(nonblocking method)
+AC_CACHE_VAL(cyrus_cv_sys_nonblock,AC_TRY_LINK([#include <sys/types.h>
+#include <sys/file.h>
+#include <fcntl.h>
+#ifndef FNDELAY
+#define FNDELAY O_NDELAY
+#endif],[fcntl(0, F_GETFL, 0)&FNDELAY],
+cyrus_cv_sys_nonblock=fcntl,cyrus_cv_sys_nonblock=ioctl))
+WITH_NONBLOCK=$cyrus_cv_sys_nonblock
+AC_SUBST(WITH_NONBLOCK)
+AC_MSG_RESULT($WITH_NONBLOCK)
+
+AC_MSG_CHECKING(timezone GMT offset method)
+AC_CACHE_VAL(cyrus_cv_struct_sys_gmtoff,AC_TRY_COMPILE([
+#include <time.h>],[struct tm tm;
+tm.tm_gmtoff = 0;
+],cyrus_cv_struct_sys_gmtoff=tm,cyrus_cv_struct_sys_gmtoff=gmtime))
+WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff
+AC_SUBST(WITH_GMTOFF)
+AC_MSG_RESULT($WITH_GMTOFF)
+AC_MSG_CHECKING(for shared mmap)
+AC_CACHE_VAL(cyrus_cv_func_mmap_shared,AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+main() {
+char *base;
+int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
+if (fd == -1) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+, fd, 0L);
+if (base == (caddr_t)-1) exit(1);
+if (strncmp(base, "test", 4) != 0) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+if (strncmp(base+4, "test", 4) != 0) exit(1);
+exit(0);}
+],cyrus_cv_func_mmap_shared=yes,cyrus_cv_func_mmap_shared=no,
+cyrus_cv_func_mmap_shared=no))
+AC_MSG_RESULT($cyrus_cv_func_mmap_shared)
+if test $cyrus_cv_func_mmap_shared = yes; then
+ WITH_MAP="shared"
+else
+AC_MSG_CHECKING(for stupid shared mmap)
+AC_CACHE_VAL(cyrus_cv_func_mmap_stupidshared,AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+main() {
+char *base;
+int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
+if (fd == -1) exit(1);
+if (write(fd, "test", 4) != 4) exit(1);
+fsync(fd);
+base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+, fd, 0L);
+if (base == (caddr_t)-1) exit(1);
+if (strncmp(base, "test", 4) != 0) exit(1);
+lseek(fd, 0L, 0);
+if (write(fd, "xyzz", 4) != 4) exit(1);
+fsync(fd);
+if (strncmp(base, "xyzz", 4) != 0) exit(1);
+exit(0);}
+],cyrus_cv_func_mmap_stupidshared=yes,cyrus_cv_func_mmap_stupidshared=no,
+cyrus_cv_func_mmap_stupidshared=no))
+AC_MSG_RESULT($cyrus_cv_func_mmap_stupidshared)
+if test $cyrus_cv_func_mmap_stupidshared = yes; then
+ WITH_MAP="stupidshared"
+else
+ AC_MSG_WARN([*** This system does not have a working mmap()])
+ AC_MSG_WARN(*** Expect a considerable performance penalty)
+ WITH_MAP=nommap
+fi
+fi
+
+AC_SUBST(WITH_MAP)
+AC_ARG_WITH(lock,
+ [ --with-lock=METHOD force use of METHOD for locking (flock or fcntl)],
+ WITH_LOCK="$withval", [
+ AC_CHECK_FUNC(fcntl,WITH_LOCK="fcntl",[
+ AC_CHECK_FUNC(flock,WITH_LOCK="flock",[
+ AC_ERROR(unable to detect locking method)
+ ])
+ ])
+ ])
+
+AC_SUBST(WITH_LOCK)
+
+dnl check for fdatasync (used by cyrusdb_skiplist)
+LIB_RT=""
+AC_CHECK_FUNC(fdatasync, AC_DEFINE(HAVE_FDATASYNC,[],[Do we have fdatasync()?]), [
+ AC_CHECK_LIB(rt, fdatasync, [
+ LIB_RT="-lrt"
+ AC_DEFINE(HAVE_FDATASYNC,[],[Do we have fdatasync()?])
+ ])
+])
+
+dnl for makedepend and AFS.
+cant_find_sigvec=no
+AC_CACHE_VAL(cyrus_sigveclib,[
+ dnl bsd classic flavor
+ AC_CHECK_FUNC(sigvec, [
+ cyrus_sigveclib=""
+ ], [
+ dnl hp flavor
+ AC_CHECK_LIB(BSD, sigvec, cyrus_sigveclib="-lBSD", [
+ dnl not hp flavor
+ SAVE_LDFLAGS="$LDFLAGS"
+ dnl solaris flavor
+ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
+ AC_CHECK_LIB(ucb, sigvec, [
+ dnl more solaris flavor
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"],
+ [ cant_find_sigvec=yes ])
+ LDFLAGS="$SAVE_LDFLAGS"])
+ ])
+])
+AC_SUBST(cyrus_sigveclib)
+
+# ok, we still look for this stuff because of checking groups, but
+# all authentication goes through SASL
+
+AC_ARG_WITH(afs,[ --with-afs=PATH use AFS libraries from PATH],
+ with_afs="${withval}", with_afs="no")
+
+AC_ARG_WITH(ldap, [ --with-ldap=DIR use LDAP (in DIR) (experimental) [/usr/local] ],
+ with_ldap="${withval}", with_ldap="no")
+
+dnl select mode of afspts
+AC_ARG_ENABLE(krb5afspts,[ --enable-krb5afspts compile afskrb PTS module with krb5 support],
+ [SASL_SET_GSSAPI_LIBS
+ AC_DEFINE(AFSPTS_USE_KRB5,[],[Should the AFS PTS plugin use krb5?])])
+
+if test "x$with_afs" != "xno"; then
+ if test ! -d $with_afs; then
+ $with_afs=/usr/local
+ fi
+ CFLAGS="${CFLAGS} -I${with_afs}/include"
+ AFS_LIBS="${with_afs}/lib/afs/libkauth.a ${with_afs}/lib/afs/libprot.a ${with_afs}/lib/afs/libauth.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/librxkad.a ${with_afs}/lib/librx.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/libubik.a ${with_afs}/lib/liblwp.a ${with_afs}/lib/afs/util.a"
+ if test -f ${with_afs}/lib/afs/libaudit.a; then
+ AFS_LIBS="$AFS_LIBS ${with_afs}/lib/afs/libaudit.a"
+ fi
+ if test -f /usr/ucblib/libucb.a; then
+ CMU_ADD_LIBPATH_TO(/usr/ucblib, AFS_LDFLAGS)
+ AFS_LIBS="$AFS_LIBS -lc -lucb"
+ fi
+
+ AC_CACHE_VAL(cyrus_afs_sigvec,[
+ SAVE_LIBS="$LIBS"
+ LIBS="${with_afs}/lib/liblwp.a"
+ AC_MSG_CHECKING(if AFS libraries need sigvec)
+ dnl Does AFS need sigvec? We have to link against lwp and see
+ dnl if IOMGR_Initialize wants it
+ AC_TRY_LINK([IOMGR_Initialize();],
+ [IOMGR_Initialize()],
+ [
+ dnl it linked; don't need it
+ AC_MSG_RESULT(no)
+ cyrus_afs_sigvec="no"
+ ], [
+ dnl didn't link; pick up sigvec
+ AC_MSG_RESULT(yes)
+ cyrus_afs_sigvec="yes"
+ ])
+ ])
+ if test "$cyrus_afs_sigvec" = yes; then
+ if test "$cant_find_sigvec" = yes; then
+ AC_MSG_WARN([Can't find a sigvec for AFS libraries which seem to need one.])
+ else
+ AFS_LIBS="${AFS_LIBS} $cyrus_sigveclib"
+ AC_SUBST(AFS_LIBS)
+ AC_SUBST(AFS_LDFLAGS)
+ AC_DEFINE(HAVE_AFSKRB,[],[Should we build afskrb pts module?])
+ fi
+ else
+ AFS_LIBS="${AFS_LIBS}"
+ AC_SUBST(AFS_LIBS)
+ AC_SUBST(AFS_LDFLAGS)
+ AC_DEFINE(HAVE_AFSKRB,[],[Should we build afskrb pts module?])
+ fi
+ LIBS="$SAVE_LIBS"
+fi
+
+LDAP_CPPFLAGS=""
+LDAP_LDFLAGS=""
+LDAP_LIBS=""
+
+if test "x$with_ldap" != "xno"; then
+ if test ! -d $with_ldap; then
+ $with_ldap=/usr/local
+ fi
+
+ LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
+ LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib"
+ LDAP_LIBS=""
+
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS=$LDAP_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+ AC_CHECK_LIB(ldap, ldap_initialize,
+ [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
+ AC_SUBST(LDAP_CPPFLAGS)
+ AC_SUBST(LDAP_LDFLAGS)
+ AC_SUBST(LDAP_LIBS)
+ LDAP_LIBS="-lldap -llber" ],,-llber)
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+ AC_CHECK_LIB(ldap, ldap_initialize,
+ [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
+ AC_SUBST(LDAP_CPPFLAGS)
+ AC_SUBST(LDAP_LDFLAGS)
+ AC_SUBST(LDAP_LIBS)
+ LDAP_LIBS="-lldap -llber" ],,-llber)
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+fi
+
+if test "x$with_afs" != "xno" -o "x$with_ldap" != "xno"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile"
+
+ AC_DEFINE(WITH_PTS,[],[Build in PTS support?])
+fi
+
+
+
+SERVER_SUBDIRS="master imap"
+AC_ARG_ENABLE(server,
+ [ --disable-server disable compiling servers],
+ if test "$enableval" = no; then
+ SERVER_SUBDIRS=""
+ fi)
+AC_SUBST(SERVER_SUBDIRS)
+# We always output a server makefile (just because we can)
+
+dnl this is the new simple check for kerberos; since the person had to
+dnl compile SASL, we might as well use the same checks.
+AC_ARG_WITH(krb,[ --with-krb=PATH use Kerberos from PATH],
+ with_krb="$withval", with_krb="no")
+
+AC_ARG_WITH(krbimpl,[ --with-krbimpl=\[kth|mit\] assume Kerberos 4 from KTH or MIT],
+ with_krbimpl="$withval", with_krbimpl="kth")
+
+AC_ARG_ENABLE(statickrb,
+ [ --enable-statickrb link Kerberos statically],
+ with_statickrb="yes", with_statickrb="no")
+
+dnl In order to compile kerberos4, we need libkrb and libdes.
+
+dnl we might need -lresolv for kerberos
+AC_CHECK_LIB(resolv,res_search)
+
+if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then
+ AC_MSG_ERROR([--enable-statickrb specified but --with-krb did not specify a valid directory])
+fi
+
+if test "$with_krb" != "no"; then
+dnl Do we need DES for kerberos?
+AC_ARG_WITH(krbdes,[ --with-krbdes use Kerberos DES implementation [[yes]]],
+ with_krbdes="$withval", with_krbdes="yes")
+if test "$with_krbdes" = "yes"; then
+ AC_CHECK_LIB(des,des_ecb_encrypt,
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$with_krb/lib/libdes.a"
+ else
+ KRB_LIBS="-ldes"
+ fi,
+ AC_MSG_ERROR([The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix.]))
+fi
+fi
+
+dnl if we were ambitious, we'd look more aggressively for the
+dnl krb4 install
+if test -d ${with_krb}; then
+ AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [
+ for krbhloc in include/kerberosIV include
+ do
+ if test -f ${with_krb}/${krbhloc}/krb.h ; then
+ cyrus_krbinclude=${with_krb}/${krbhloc}
+ break
+ fi
+ done
+ ])
+
+ if test -n "${cyrus_krbinclude}"; then
+ CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
+ fi
+ CMU_ADD_LIBPATH(${with_krb}/lib)
+fi
+
+if test "$with_krbimpl" != "kth"; then
+ KRBLIB="krb4"
+else
+ KRBLIB="krb"
+fi
+
+if test "$with_des" != no; then
+ AC_CHECK_HEADER(krb.h,
+ AC_CHECK_LIB(${KRBLIB}, krb_mk_priv,
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
+ else
+ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
+ fi,
+ AC_WARN(No Kerberos V4 found); krb4=no,
+ $KRB_LIBS),
+ AC_WARN(No Kerberos V4 found); krb4=no)
+else
+ AC_WARN(No DES library found for Kerberos V4 support)
+ krb4=no
+fi
+
+if test "${krb4}" != no; then
+ AC_DEFINE(HAVE_KRB,[],[Support for Kerberos?])
+fi
+
+LIBS="$KRB_LIBS $LIBS"
+
+SASL_SET_GSSAPI_LIBS
+
+dnl
+dnl Test for OpenSSL
+dnl
+IMAP_PROGS=""
+AC_ARG_WITH(openssl,[ --with-openssl=PATH use OpenSSL from PATH],
+ with_openssl="${withval}")
+
+OPENSSL_INC=
+OPENSSL_LIB=
+case "$with_openssl" in
+ no) with_openssl="no";;
+ ""|yes)
+ dnl if openssl has been compiled with the rsaref2 libraries,
+ dnl we need to include the rsaref libraries in the crypto check
+ LIB_RSAREF=""
+ AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
+ LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes,
+ cmu_have_rsaref=no)
+
+ with_openssl="yes"
+ AC_CHECK_LIB(crypto,BIO_accept,
+ LIBS="-lcrypto $LIB_RSAREF ${LIBS}",
+ with_openssl="no", $LIB_RSAREF)
+ AC_CHECK_LIB(ssl, SSL_CTX_new, LIBS="-lssl ${LIBS}",
+ with_openssl="no", -lcrypto $LIB_RSAREF)
+
+ ;;
+ *) OPENSSL_INC="-I${with_openssl}/include"
+ OPENSSL_LIBPATH="${with_openssl}/lib"
+ OPENSSL_LIB="-L${OPENSSL_LIBPATH}"
+ CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}"
+ CMU_ADD_LIBPATH(${OPENSSL_LIBPATH})
+ CMU_ADD_LIBPATH_TO(${OPENSSL_LIBPATH}, OPENSSL_LIB)
+ LIBS="${LIBS} -lssl -lcrypto";;
+esac
+
+AC_MSG_CHECKING(for openssl)
+AC_MSG_RESULT($with_openssl)
+
+if test "$with_openssl" != "no"; then
+ AC_DEFINE(HAVE_SSL,[],[Build with SSL support?])
+ IMAP_PROGS="$IMAP_PROGS tls_prune"
+ if test "${krb4}" != no; then
+ AC_DEFINE(OPENSSL_ENABLE_OLD_DES_SUPPORT,[],[Configure OpenSSL to provide legacy des apis])
+ AC_DEFINE(OPENSSL_DES_LIBDES_COMPATIBILITY,[],[Configure OpenSSL to provide krb4-compatible legacy des apis])
+ fi
+fi
+AC_SUBST(OPENSSL_INC)
+AC_SUBST(OPENSSL_LIB)
+
+dnl
+dnl Allow for setting EGD socket file on systems without /dev/*random.
+dnl
+AC_ARG_WITH(egd-socket,
+ [ --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
+ for systems without /dev/urandom],
+ [ EGD_SOCKET="$withval" ]
+ )
+if test -n "$EGD_SOCKET" ; then
+ AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET", [Alternative to /dev/urandom?])
+fi
+
+dnl
+dnl Test for Zephyr
+dnl
+AC_ARG_WITH(zephyr,[ --with-zephyr[=PATH] enable Zephyr notification (installed on PATH)],
+ with_zephyr="${withval}")
+if test -z "$with_zephyr"; then
+ if test -f /usr/local/lib/libzephyr.a; then
+ with_zephyr="/usr/local"
+ elif test -f /usr/lib/libzephyr.a; then
+ with_zephyr="/usr"
+ fi
+fi
+ZEPHYR_LIBS=""
+ZEPHYR_CPPFLAGS=""
+case "$with_zephyr" in
+ no) true;;
+ ""|yes) AC_CHECK_LIB(zephyr,ZInitialize,ZEPHYR_LIBS="-lzephyr",
+ with_zephyr="no",);;
+ *) if test -d ${with_zephyr}/include/zephyr; then
+ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include/zephyr"
+ else
+ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include"
+ fi
+ ZEPHYR_LIBS="-lzephyr";;
+esac
+AC_SUBST(ZEPHYR_LIBS)
+AC_SUBST(ZEPHYR_CPPFLAGS)
+if test "$with_zephyr" != "no"; then
+ AC_DEFINE(HAVE_ZEPHYR,[],[Build with Zephyr support?])
+fi
+
+dnl
+dnl Set pidfile location
+dnl
+AC_ARG_WITH(pidfile,[ --with-pidfile[=PATH] pidfile in PATH (/var/run/cyrus-master.pid)],
+ [MASTERPIDFILE="$withval"],
+ [MASTERPIDFILE="/var/run/cyrus-master.pid"])
+MASTERPIDFILE="\"$MASTERPIDFILE\""
+AC_DEFINE_UNQUOTED(MASTER_PIDFILE, $MASTERPIDFILE,[Name of the pidfile for master])
+
+dnl
+dnl see if we're compiling with IMAP idled support
+dnl
+AC_ARG_ENABLE(idled,
+ [ --enable-idled enable IMAP idled support],
+ if test "$enable_val" != no; then
+ IMAP_PROGS="$IMAP_PROGS idled"
+ fi)
+
+dnl
+dnl see if we're compiling with NNTP support
+dnl
+ENABLE_NNTP=no
+AC_ARG_ENABLE(nntp,
+ [ --enable-nntp enable NNTP support],
+ ENABLE_NNTP=$enableval
+ if test "$ENABLE_NNTP" != no; then
+ IMAP_PROGS="$IMAP_PROGS nntpd fetchnews"
+ fi)
+
+dnl
+dnl see if we're compiling the Murder support programs
+dnl
+ENABLE_MURDER=no
+AC_ARG_ENABLE(murder,
+ [ --enable-murder enable IMAP Murder support],
+ ENABLE_MURDER=$enableval)
+
+if test "$ENABLE_MURDER" != no; then
+ IMAP_PROGS="$IMAP_PROGS mupdate"
+ # for master/slave auto-selection
+ AC_CHECK_HEADERS(sys/sockio.h)
+fi
+
+dnl
+dnl see if we're compiling replication support programs
+dnl
+ENABLE_REPLICATION=no
+AC_ARG_ENABLE(replication,
+ [ --enable-replication enable replication support (experimental)],
+ ENABLE_REPLICATION=$enableval
+ if test "$ENABLE_REPLICATION" != no; then
+ IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset make_md5"
+ fi)
+
+AC_SUBST(IMAP_PROGS)
+
+dnl
+dnl Try and find a system version of com_err.
+dnl If we see something that looks a little wacky, ignore it (there are many
+dnl deficient installs of com_err, unfortunately, which leave out compile_et)
+dnl
+AC_ARG_WITH(com_err,
+[ --with-com_err=PATH use com_err from path -- includes in PATH/include,
+ libs in PATH/lib, and compile_et in PATH/bin])
+if test -z "$with_com_err"; then
+ # no value supplied
+ AC_CHECK_LIB(com_err, com_err, [
+ # com_err is already in library path
+ # guess we're okay
+ # can use system com_err
+ with_com_err=""
+ AC_CHECK_HEADER(et/com_err.h,
+ [AC_DEFINE(HAVE_ET_COM_ERR_H,[],[We need et/com_err.h])],
+ [AC_CHECK_HEADER(com_err.h,[],[AC_ERROR([cannot locate com_err.h])])])
+ AC_PATH_PROG(COMPILE_ET, compile_et, [no compile et])
+ ], [
+ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
+ with_com_err="/usr/local"
+ AC_PATH_PROG(COMPILE_ET, /usr/local/bin/compile_et, [no compile et])
+ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
+ with_com_err="/usr"
+ AC_PATH_PROG(COMPILE_ET, /usr/bin/compile_et, [no compile et])
+ else
+ # use ours
+ with_com_err=yes
+ fi
+ ])
+
+ if test "${with_com_err}" = "no"; then
+ AC_MSG_WARN([com_err is required; included version will be used.])
+ with_com_err="yes"
+ fi
+ if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then
+ AC_MSG_WARN([Parts of com_err distribuion were found, but not compile_et.])
+ AC_MSG_WARN([Will build com_err from included sources.])
+ with_com_err="yes" # build it ourselves
+ fi
+fi
+
+case "$with_com_err" in
+ # built-in et
+ yes) # use the com_err we're gonna build
+ COM_ERR_LIBS="../et/libcom_err.a"
+ COMPILE_ET="../et/compile_et"
+ COM_ERR_LDFLAGS=""
+ COM_ERR_CPPFLAGS="-I\${top_srcdir}/et"
+ PRE_SUBDIRS="et ${PRE_SUBDIRS}"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} et/Makefile"
+ ;;
+ "") # no problem, we already have it in the paths
+ # we do nothing to pick it up
+ COM_ERR_LIBS="-lcom_err" # hope it's not shared
+ # we already set COMPILE_ET, or we didn't get here
+ COM_ERR_LDFLAGS=""
+ COM_ERR_CPPFLAGS=""
+ ;;
+ *) # use whatever they told us, or whatever we found
+ COMPILE_ET="${with_com_err}/bin/compile_et"
+ COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a"
+ COM_ERR_CPPFLAGS="-I${with_com_err}/include"
+ # Ever get the feeling people hide this stuff on purpose?
+ if test -d "${with_com_err}/include/et" ; then
+ COM_ERR_CPPFLAGS="-I${with_com_err}/include/et"
+ fi
+dnl CMU_ADD_LIBPATH_TO(${with_com_err}/lib, COM_ERR_LDFLAGS)
+ COMPILE_ET="${with_com_err}/bin/compile_et"
+esac
+AC_SUBST(COMPILE_ET)
+AC_SUBST(COM_ERR_LIBS)
+AC_SUBST(COM_ERR_LDFLAGS)
+AC_SUBST(COM_ERR_CPPFLAGS)
+
+AC_MSG_CHECKING(for modern syslog)
+AC_CACHE_VAL(cyrus_cv_lib_syslog, AC_TRY_CPP([#include <syslog.h>
+#ifndef LOG_LOCAL6
+#include </nonexistent>
+#endif],cyrus_cv_lib_syslog=yes,cyrus_cv_lib_syslog=no))
+if test $cyrus_cv_lib_syslog = no; then
+ PRE_SUBDIRS="${PRE_SUBDIRS} syslog"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile"
+ DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a"
+ CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog"
+fi
+AC_MSG_RESULT($cyrus_cv_lib_syslog)
+
+AC_MSG_CHECKING(which syslog facility to use)
+SYSLOG_FACILITY=LOG_LOCAL6
+AC_ARG_WITH(syslogfacility,[ --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6)],
+ [ if test "$withval" != "yes" -a "$withval" != "no" ; then
+ SYSLOG_FACILITY=LOG_$withval
+ fi; ])
+AC_DEFINE_UNQUOTED(SYSLOG_FACILITY, $SYSLOG_FACILITY, [Syslog facility to use.])
+AC_MSG_RESULT($SYSLOG_FACILITY)
+
+dnl Have to check getdtabalesize after adding ossup, as some ossups define it
+AC_REPLACE_FUNCS(getdtablesize)
+AC_ARG_ENABLE(cmulocal,
+ [ --enable-cmulocal enable CMU-specific local support],
+ if test "$enableval" = yes; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile"
+ fi)
+
+AC_MSG_CHECKING(to use old sieve service name)
+AC_ARG_ENABLE(oldsievename,
+ [ --enable-oldsievename enable the use of 'imap' as the sieve service name],
+ if test "$enableval" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(OLD_SIEVE_SERVICE_NAME,[],[Use "imap" as sieve service name?])
+ else
+ AC_MSG_RESULT(no)
+ fi,
+ AC_MSG_RESULT(no))
+
+AC_ARG_ENABLE(listext,
+ [ --enable-listext enable IMAP List extensions],
+ if test "$enableval" = yes; then
+ AC_DEFINE(ENABLE_LISTEXT,[],[Enable the LISTEXT extension?])
+ fi)
+
+AC_ARG_ENABLE(netscapehack,
+ [ --enable-netscapehack enable Netscape hack for the menu option
+ in Communicator to Administrate Mail],
+ if test "$enableval" = yes; then
+ AC_DEFINE(ENABLE_X_NETSCAPE_HACK,[],[Enable Netscape Menu Option Hack?])
+ fi)
+
+AC_CHECK_FUNC(dlopen,,[AC_CHECK_LIB(dl, dlopen)])
+CMU_SASL2_REQUIRE_VER(2,1,7)
+CMU_SASL2_CHECKAPOP_REQUIRED
+
+AC_ARG_WITH(perl, [ --with-perl=PERL use PERL for perl],
+ with_perl="$withval", with_perl="perl")
+
+if test "${with_perl}" = yes; then
+ with_perl="perl"
+fi
+if test "${with_perl}" != no; then
+ if test ${using_static_sasl} = "staticonly"; then
+ AC_MSG_WARN([Cannot compile perl utilities using static libsasl])
+ with_perl="no"
+ else
+ AC_CHECK_PROGS(PERL, ${with_perl} perl, with_perl=notfound)
+ fi
+fi
+if test "$with_perl" = "notfound"; then
+ AC_MSG_WARN(Perl not found: Administrative tools won't be available)
+elif test "${with_perl}" != "no"; then
+dnl compile perl stuff
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl"
+dnl and compile perl/cyradm
+ PERL_SUBDIRS="imap"
+ PERL="${with_perl}"
+dnl add perl cccdlflags when building libraries -- this ensures that the
+dnl libraries will be compiled as PIC if perl requires PIC objects
+dnl -- this is needed on NetBSD, but seems to cause problems on atleast Solaris --
+dnl eval `${PERL} -V:cccdlflags`
+ PERL_CCCDLFLAGS="$cccdlflags"
+ AC_SUBST(PERL_CCCDLFLAGS)
+fi
+
+dnl for timsieved
+if test "$sievedir" != "no"; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile"
+
+ PERL_SUBDIRS="${PERL_SUBDIRS} sieve"
+ PERL_DEPSUBDIRS="sieve"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile"
+else
+ PERL_DEPSUBDIRS="none"
+fi
+
+dnl Check for MD5 functions
+AC_FUNC_CHECK(MD5Init,,
+ AC_CHECK_LIB(md, MD5Init, LIBS="${LIBS} -lmd",
+ MD5OBJ="md5.o"))
+AC_SUBST(MD5OBJ)
+
+dnl snmp
+dnl (agentx was depricated, but SNMP_SUBDIRS is conveinent as a placeholder)
+SNMP_SUBDIRS=""
+AC_SUBST(SNMP_SUBDIRS)
+
+CMU_LIBWRAP
+CMU_UCDSNMP
+
+# Figure out what directories we're linking against.
+# Lots of fun for the whole family.
+# This probably chokes on anything with spaces in it.
+# All we want is the list of -L directories, and -L may or may not be
+# followed by a space.
+isdir=no
+libpath=""
+#echo "debug ldflags: << ${ldflags} >>"
+#echo "debug default_ldflags: << ${default_ldflags} >>"
+for flag in ${ldflags} ${default_ldflags}; do
+ case $flag in
+ -L)
+ # it's a split -L option, we'll mark the next option as a dir.
+ isdir=yes
+ ;;
+
+ -L*)
+ # attached -L option: split off the directory
+ larg=`echo $flag | sed -e 's:-L\(..*\):\1:'`
+ libpath="${libpath} ${larg}"
+ ;;
+
+ *)
+ if test $isdir = yes ; then
+ libpath="${libpath} ${flag}"
+ isdir=no
+ fi
+ esac
+done
+
+IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
+IMAP_LIBS="${LIB_SASL} ${LIBS}"
+
+AC_SUBST(LIB_RT)
+AC_SUBST(IMAP_COM_ERR_LIBS)
+AC_SUBST(IMAP_LIBS)
+
+dnl AC_OUTPUT_COMMANDS([
+dnl if test "$with_perl" != "no"; then
+dnl (cd perl/sieve/managesieve; $perl Makefile.PL PREFIX=$prefix)
+dnl (cd perl/imap; $perl Makefile.PL PREFIX=$prefix)
+dnl fi
+dnl ], perl=$PERL; with_perl=$with_perl; prefix=$prefix; SASL_LIB="$LIB_SASL"; SASL_INC="$SASLFLAGS"; export SASL_LIB SASL_INC)
+AC_SUBST(PERL_SUBDIRS)
+AC_SUBST(PERL_DEPSUBDIRS)
+AC_SUBST(PERL)
+
+AH_TOP([
+/* $Id: configure.in,v 1.268.2.23 2005/04/12 20:05:20 shadow Exp $ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _CYRUS_IMAPD_CONFIG_H_
+#define _CYRUS_IMAPD_CONFIG_H_
+])
+
+AH_BOTTOM([
+/* time.h */
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+/* com_err.h, as needed */
+#ifndef IN_COM_ERR
+#ifdef HAVE_ET_COM_ERR_H
+#include <et/com_err.h>
+#else
+#include <com_err.h>
+#endif /* HAVE_ET_COM_ERR_H */
+#endif /* IN_COM_ERR */
+
+/* This allows us to work even when we don't have an fdatasync */
+#ifndef HAVE_FDATASYNC
+#define fdatasync(fd) fsync(fd)
+#endif
+
+/* A similar setup for not having O_DSYNC */
+#include <fcntl.h>
+
+#ifndef O_DSYNC
+# ifdef O_SYNC
+# define O_DSYNC O_SYNC /* POSIX */
+# else
+# define O_DSYNC O_FSYNC /* BSD */
+# endif
+#endif
+
+#ifndef HAVE___ATTRIBUTE__
+/* Can't use attributes... */
+#define __attribute__(foo)
+#endif
+
+#ifndef HAVE_SOCKLEN_T
+typedef unsigned int socklen_t;
+#endif
+
+#ifndef HAVE_RLIM_T
+typedef int rlim_t;
+#endif
+
+/* some potentially memory saving tradeoffs,
+ preconfigured in memory-saving mode */
+
+/* save the cmdlines for the ID command */
+#undef ID_SAVE_CMDLINE
+
+/* IPv6 things */
+#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
+#define _SS_MAXSIZE 128 /* Implementation specific max size */
+#define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
+
+struct sockaddr_storage {
+ struct sockaddr ss_sa;
+ char __ss_pad2[_SS_PADSIZE];
+};
+# define ss_family ss_sa.sa_family
+# define HAVE_SS_FAMILY
+#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
+
+#ifndef HAVE_SS_FAMILY
+#define ss_family __ss_family
+#endif
+
+#ifndef AF_INET6
+/* Define it to something that should never appear */
+#define AF_INET6 AF_MAX
+#endif
+
+#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
+#include "gai.h"
+#endif
+
+/* End IPv6 things */
+
+#ifdef OLD_SIEVE_SERVICE_NAME
+#define SIEVE_SERVICE_NAME "imap"
+#else
+#define SIEVE_SERVICE_NAME "sieve"
+#endif
+
+/* filenames */
+#define FNAME_DBDIR "/db"
+#define FNAME_USERDIR "/user/"
+#define FNAME_DOMAINDIR "/domain/"
+#define FNAME_LOGDIR "/log/"
+#define FNAME_PTSDB "/ptclient/ptscache.db"
+#define CONFIG_FILENAME (SYSCONFDIR "/imapd.conf")
+#define DEFAULT_MASTER_CONFIG_FILENAME (SYSCONFDIR "/cyrus.conf")
+
+#ifndef HAVE_SHUTDOWN
+#define shutdown(fd, mode) 0
+#endif
+
+/* compile time options; think carefully before modifying */
+enum {
+ /* should we send an UNAVAILABLE message to master when
+ * a service is exiting (master is already going to be
+ * informed of the exit by the SIGCHLD signal anyway) ? */
+ MESSAGE_MASTER_ON_EXIT = 0,
+
+ /* should a hierarchical rename stop on error? */
+ RENAME_STOP_ON_ERROR = 1,
+
+ /* should we call fsync() to maybe help with softupdates? (it should) */
+ APPEND_ULTRA_PARANOID = 1,
+
+ /* should we log extra information at the DEBUG level for DB stuff?
+ * 0 -> nothing; 1 -> some; higher -> even more */
+ CONFIG_DB_VERBOSE = 1,
+
+ /* log timing information to LOG_DEBUG */
+ CONFIG_TIMING_VERBOSE = 0,
+
+ /* should we be pedantic about namespace or sleezy? */
+ SLEEZY_NAMESPACE = 1,
+
+ /* should we do a fast TLS session shutdown? */
+ TLS_FAST_SHUTDOWN = 1,
+
+ /* should we use the SQUAT engine to accelerate SEARCH? */
+ SQUAT_ENGINE = 1,
+
+ /* should we have long LMTP error messages? */
+ LMTP_LONG_ERROR_MSGS = 1
+};
+
+#endif /* _CYRUS_IMAPD_CONFIG_H_ */
+])
+
+dnl make sure that Makefile is the last thing output
+AC_OUTPUT(man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+/README/1.3/Sat May 25 19:57:43 2002//Tcyrus-release-2-3-7
+/add-cyrus-user/1.1/Fri Jun 27 13:56:00 2003//Tcyrus-release-2-3-7
+/deliver-notify-zephyr.patch/1.2/Sat May 25 19:57:43 2002//Tcyrus-release-2-3-7
+/drac_auth.patch/1.17.2.7/Tue May 23 13:49:38 2006//Tcyrus-release-2-3-7
+/fud-client.c/1.5/Thu Feb 13 20:15:18 2003//Tcyrus-release-2-3-7
+/mupdate-test.pl/1.1.2.1/Fri Dec 19 18:33:25 2003//Tcyrus-release-2-3-7
+/sieve-spamasssassin/1.1/Thu May 9 22:00:46 2002//Tcyrus-release-2-3-7
+/squatrunner.pl/1.1/Thu Dec 19 21:56:03 2002//Tcyrus-release-2-3-7
+/squatrunner.txt/1.1/Thu Dec 19 21:56:03 2002//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+A D/cyrus-graphtools.1.0////
+A D/notify_unix////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/contrib
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,14 @@
+$Id: README,v 1.3 2002/05/25 19:57:43 leg Exp $
+
+This directory contains various patches to the distribution that were
+either couldn't be wedged into the configure script due to system
+dependancies or weren't worth getting into the configure script (laziness
+plays a large part here). They are "not supported" by us, meaning that we
+didn't try them, don't use them for whatever reasons, or were too lazy to
+do a real integration at this point in time.
+
+Bugs can still be sent to cyrus-bugs at andrew.cmu.edu. Patches are even
+better.
+
+If you wish to submit a patch, please submit either unified or context
+diffs; plain diffs are hard to apply if the source has changed.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/add-cyrus-user
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/add-cyrus-user?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/add-cyrus-user (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/add-cyrus-user Sat Aug 26 02:00:13 2006
@@ -1,0 +1,357 @@
+#!/usr/bin/perl
+
+#---------------------------------------------------------------------
+# This script was designed to ease adding Cyrus-IMAP users for
+# a very specific kind of configuration: Postfix+Cyrus, where
+#
+# mailbox_transport = default (mailbox delivery),
+# fallback_transport = cyrus
+#
+# in such a configuration, an IMAP-user without a local account
+# will requires no additional Postfix configuration, but an
+# IMAP-user who is also a local user requires that a user-specific
+# line be added to the transports file to force the use of the
+# 'cyrus' transport. The Postfix-specific configuration can be
+# suppressed with the "-no_mta_cfg" flag.
+#
+# In order for the script to be able to edit the two Postfix config
+# files correctly, the files must have 'tag-lines' in them which
+# the script uses to orient itself when inserting the new lines.
+# The tag-lines are:
+#
+# /etc/postfix/transport:
+# "# add-cyrus-user tag (don't remove this line)"
+#
+# /etc/postfix/virtual:
+# "# Cyrus IMAP users (do not remove this line)"
+#
+# Without these tag-lines the script will fail.
+#
+# This script assumes the use of 'sasldb2' authentication.
+#
+# USAGE:
+#
+# add-cyrus-user -u <IMAP-username> -p <IMAP-password [options]
+#
+# options are:
+# -q[uota] set quota for mailbox (in KB)
+# -part[ition] specify a partition (default = "default")
+# -no_mta_cfg do not perform Postfix-specific steps
+#
+# yes, I know, specifying the password on the command-line is
+# insecure. The script will prompt you for the cyrus username
+# and password if you do not specify them on the command line.
+#
+# AUTHOR
+#
+# Robert Urban <urban at tru64.org>
+#
+#---------------------------------------------------------------------
+
+use Cyrus::IMAP::Admin;
+use FileHandle;
+use File::Basename;
+use Fcntl ':flock'; # import LOCK_* constants
+
+my $DEBUG = 0;
+my $VERBOSE = 1;
+my $mta_cfg = 1;
+
+my $TRANSPORT_FILE = '/etc/postfix/transport';
+my $VIRTUAL_FILE = '/etc/postfix/virtual';
+
+my $user = '';
+my $pass = '';
+my $quota = '';
+my $partition = 'default';
+
+#--------------------------------------------------------------------
+# parse arguments
+#--------------------------------------------------------------------
+while ($_ = shift) {
+ if (/^-h/) {
+ usage();
+ exit;
+ } elsif (/^-u(ser)?$/) {
+ $user = shift;
+ } elsif (/^-p(ass)?$/) {
+ $pass = shift;
+ } elsif (/^-part(ition)?/) {
+ $partition = shift;
+ } elsif (/^-q(uota)?/) {
+ $quota = shift;
+ if ($quota =~ /^(\d+)m/i) {
+ $quota *= 1024;
+ }
+ } elsif (/^-no_mta_cfg/) {
+ $mta_cfg = 0;
+ } else {
+ print "unknown param [$_]\n\n";
+ usage();
+ exit;
+ }
+}
+
+#--------------------------------------------------------------------
+# main(), if you like
+#--------------------------------------------------------------------
+
+if (!$user) {
+ $user = query('Enter new Cyrus user');
+}
+
+if (!$pass) {
+ $pass = query('Enter password for new Cyrus user', 1);
+}
+
+if ($DEBUG) {
+ print "USERNAME: $user, PASSWORD: $pass\n";
+ print "PARTITION = [$partition]\n";
+ print "QUOTA = [$quota]\n";
+ print "MTA_CFG = [$mta_cfg]\n";
+}
+
+$unix_user = (getpwnam($user)) ? 1 : 0;
+$VERBOSE && print "$user is".($unix_user ? '' : ' NOT')." a unix user\n";
+
+$client = Cyrus::IMAP::Admin->new('localhost');
+defined($client) || die "failed to get Admin obj.";
+
+#--------------------------------------------------------------------
+# authenticate administrator
+#--------------------------------------------------------------------
+while (1) {
+ $cp = getCyrusPassword();
+ $ret = $client->authenticate(
+ User => 'cyrus',
+ Password => $cp,
+ );
+ if ($ret) { last; }
+ print "Cyrus password incorrect.\n";
+}
+
+#--------------------------------------------------------------------
+# create IMAP mailbox
+#--------------------------------------------------------------------
+
+$mbox = "user.$user";
+
+$VERBOSE && print "adding CYRUS user [$mbox]\n";
+if (!$DEBUG) {
+ if (!$client->create($mbox, $partition)) {
+ die "failed to create mailbox [$mbox]";
+ }
+
+ #----------------------------------------------------------------
+ # give user "cyrus" all permissions on mailbox
+ #----------------------------------------------------------------
+ if (!$client->setacl($mbox, cyrus => 'all')) {
+ die "failed to give cyrus user permissions for [$mbox]";
+ }
+}
+
+#--------------------------------------------------------------------
+# set quota for mailbox
+#--------------------------------------------------------------------
+if ($quota && !$DEBUG) {
+ $VERBOSE && print "setting quota for [$mbox] to $quota\n";
+ if (!$client->setquota($mbox, STORAGE => $quota)) {
+ #die "failed to set quota for [$mbox]";
+ # does not necessarily need to be fatal
+ print "failed to set quota for [$mbox]\n";
+ }
+}
+
+#--------------------------------------------------------------------
+# create SASL entry
+#--------------------------------------------------------------------
+setSaslPassword($user, $pass);
+
+#--------------------------------------------------------------------
+# the following code is Postfix-specific
+#--------------------------------------------------------------------
+if ($unix_user && $mta_cfg) {
+ addTransportLine($user);
+ addVirtualLine($user);
+ $VERBOSE && print "generating new postfix maps\n";
+ myExec("postmap $TRANSPORT_FILE");
+ myExec("postmap $VIRTUAL_FILE");
+}
+
+exit;
+
+sub usage
+{
+ print <<_EOF_;
+usage: $0 -u NEWUSER -p NEWPASSWORD [options]
+ options:
+ -q[uota] <quota> quota for mailbox in KB, or MB, if suffixed with 'm'
+ -part[ition] <part> partition on which to create mailbox. none = 'default'
+ -no_mta_cfg do not perform MTA-specific steps (Postfix)
+
+ If "-u USER" or "-p PASS" is not specified on command line, script
+ will prompt for it/them.
+_EOF_
+
+}
+
+sub query
+{
+ my $prompt = shift;
+ my $echo_off = shift;
+
+ print "${prompt}? ";
+ my $ans;
+ do {
+ if ($echo_off) { system("stty -echo"); }
+ chomp($ans = <STDIN>);
+ if ($echo_off) { system("stty echo"); }
+ if (!$ans) { print "you must enter something here\n"; }
+ } while(!length($ans));
+
+ $ans;
+}
+
+sub setSaslPassword
+{
+ my ($user, $pass) = @_;
+
+ my $fh = FileHandle->new;
+
+ open($fh, "|saslpasswd2 -p $user") || die "popen to saslpasswd2 failed";
+ print $fh "$pass\n";
+ close($fh);
+}
+
+sub getCyrusPassword
+{
+ print "Please Enter Cyrus administration password: ";
+ system('stty -echo');
+ my $p;
+ chomp($p = <STDIN>);
+ system('stty echo');
+ print "\n";
+
+ $p;
+}
+
+sub addTransportLine
+{
+ my $user = shift;
+
+ my $line = "${user}\@y42.org\tcyrus:";
+
+ editFile($TRANSPORT_FILE, 'add-cyrus-user', $line);
+}
+
+sub addVirtualLine
+{
+ my $user = shift;
+
+ my $line = "${user}\t${user}\@y42.org";
+
+ editFile($VIRTUAL_FILE, 'Cyrus IMAP users', $line);
+}
+
+#-----------------------------------------------------------------
+# editFile()
+#
+# in order to work with flock(), the contents must be kept in
+# memory and written back to input file.
+#-----------------------------------------------------------------
+sub editFile
+{
+ my ($file, $tag, $line) = @_;
+
+ my (@contents);
+
+ $VERBOSE && print "editing [$file]\n";
+
+ my $dn = dirname($file);
+ my $bn = basename($file);
+
+ my $fh = FileHandle->new("+<$file");
+ defined($fh) || die "open $file for reading";
+ lockFile($fh);
+
+ my $state = 'looking';
+ while(<$fh>) {
+ if ($state eq 'found') {
+ if (/^\s*#/) {
+ push(@contents, $_);
+ next;
+ }
+ push(@contents, "$line\n");
+ push(@contents, $_);
+ $state = 'copyrest';
+ } elsif ($state eq 'looking') {
+ push(@contents, $_);
+ if (/$tag/) {
+ $state = 'found';
+ }
+ } else {
+ # state = copyrest
+ push(@contents, $_);
+ }
+ }
+
+ if ($state eq 'looking') {
+ die "tag [$tag] not found in file [$file]";
+ }
+
+ if ($DEBUG) {
+ unlockFile($fh);
+ return;
+ }
+
+ # rewind file-pointer
+ seek($fh, 0, 0) || die "seek";
+ truncate($fh, 0) || die "truncate";
+
+ # write new contents
+ foreach (@contents) {
+ print $fh $_;
+ }
+
+ unlockFile($fh);
+ $fh->close;
+}
+
+sub myRename
+{
+ my ($old, $new) = @_;
+
+ ($VERBOSE > 1) && print "rename: $old --> $new\n";
+ $DEBUG && return;
+
+ if (!rename($old, $new)) {
+ die "rename of $old to $new failed";
+ }
+}
+
+sub myExec
+{
+ my $cmd = shift;
+
+ ($VERBOSE > 1) && print "CMD: $cmd\n";
+
+ $DEBUG && return;
+
+ return !system($cmd);
+}
+
+sub unlockFile
+{
+ my $fh = shift;
+
+ $DEBUG && print "unlocking file\n";
+ flock($fh, LOCK_UN) || die "flock lock_un ($!)";
+}
+
+sub lockFile
+{
+ my $fh = shift;
+
+ $DEBUG && print "locking file\n";
+ flock($fh, LOCK_EX) || die "flock lock_ex ($!)";
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+/README/1.4/Mon Nov 19 23:18:21 2001//Tcyrus-release-2-3-7
+D/cgi-bin////
+D/html////
+D/script////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/contrib/cyrus-graphtools.1.0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,69 @@
+cyrus-graphtools v1.0
+Alison Greenwald <alison at andrew.cmu.edu>
+
+Please send all comments/questions/bugs to cyrus-bugs at andrew.cmu.edu.
+
+--------
+
+This archive contains the scripts necessary for collecting data from
+CMU cyrus server with UCD SNMP support. It contains:
+
+script/cyrus.pl - script for retrieving data from the server and
+ dumping it into an rrdtool database
+script/cyrusrc - configuration options for rrdtool database
+script/run - a shell script to automatically run cyrus.pl every
+ 4 minutes. Due to rrdtool eccentricities, a cron
+ job that runs every 5 minutes is not sufficient.
+
+cgi-bin/cyrus_master.pl - a cgi script that determines what rrdtool
+ are available and provides links to them
+cgi-bin/graph_cyrus_db.pl - a cgi script that graphs the rrdtool db
+ passed to it
+
+html/index.html - sample html script that links to
+ cyrus_master.pl and graph_cyrus_db-sum.pl
+
+--------
+
+cyrus-graphtools requires that you have rrdtool version 1.0.28 or
+better installed. It may work with other 1.0+ versions, but I have
+not tested it. It is available here:
+http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/pub
+
+
+Also required is net-snmp 4.2 (formerly ucd-snmp), however this is
+required for the cyrus snmp functionality as well. It is available at
+http://net-snmp.sourceforge.net/
+
+or maybe
+http://sourceforge.net/project/showfiles.php?group_id=12694
+
+-------
+
+Data collection:
+
+For data collection you must create a program directory and a data
+directory. The scripts assume /data/prog/cyrus and /data/cyrus,
+respectively. This can be changed by editing script/cyrusrc.
+
+Move the contents of script/ to your data directory and run "run" and
+your data is being collected.
+
+-------
+
+Web Display:
+
+Web graphing also assumes that data is in /data/cyrus, so if this is
+different, edit $DDIR in all three cgi scripts.
+
+In addition, it assumes that apache document root is /usr/www/tree and
+there is a directory called current/tainted that the "nobody" user (or
+whatever uid httpd runs as) can write to. $picdir and $hpicdir store
+the internal and external names for these directories.
+
+Copy the cgi-bin's into your cgi-bin directory and the html into your
+html directory and you should be ready to go.
+
+-------
+
+Please send any comments or suggestions to cyrus-bugs at andrew.cmu.edu.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+/cyrus_master.pl/1.1/Sun Jan 28 22:42:01 2001//Tcyrus-release-2-3-7
+/graph_cyrus_db-sum.pl/1.1/Sun Jan 28 22:42:01 2001//Tcyrus-release-2-3-7
+/graph_cyrus_db.pl/1.1/Sun Jan 28 22:42:01 2001//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/contrib/cyrus-graphtools.1.0/cgi-bin
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,57 @@
+#!/usr/local/bin/perl5
+
+#
+# Created by Alison Greenwald <alison at andrew.cmu.edu> 21 Sep 2000
+#
+#
+
+#use strict;
+use CGI qw(:standard escapeHTML);
+use Time::Local;
+
+$DDIR="/data/cyrus";
+$GRAPH="/cgi-bin/graph_cyrus_db.pl";
+
+$q= new CGI;
+print $q->header();
+
+print("<html><head><title>Cyrus Stats</title></head>");
+print("<body>");
+
+opendir(DH, $DDIR) or die "Could not find data";
+ at files = readdir(DH);
+closedir(DH);
+
+%hash=();
+$n=0;
+foreach (@files){
+ $server = "";
+ $ds = "";
+ $n++;
+ ($server, $end) = split /\:/, $_, 2;
+ ($ds,$throwaway) = split /\./,$end,2;
+# print("$server $ds $throwaway<br>");
+ if($ds ne "" && $ds ne ${$hash{"$server"}}[-1]){
+ #this if statement checks to see if $server is the same as the last
+ #element in the array specified by this hash
+ push @{$hash{"$server"}}, "$ds";
+ }
+}
+
+print("<table>\n");
+
+foreach $key( sort %hash){
+ if($hash{$key}){
+ print("<h2>$key</h2><ul>\n");
+ }
+ foreach $service (@{$hash{$key}}){
+ print("<li><a href=\"$GRAPH?server=$key&service=$service\">$service</a>\n");
+ }
+ print("</ul>\n");
+}
+
+print("</table>\n");
+
+print("</body></html>");
+
+#print head(), start_html("blah"), end-html();
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,83 @@
+#!/usr/local/bin/perl5
+
+#
+# Created by Alison Greenwald 21 Sep 2000
+#
+#
+
+#use strict;
+use CGI qw(:standard escapeHTML);
+use Time::Local;
+use RRDs;
+
+$DDIR="/data/cyrus";
+$GRAPH="/cgi-bin/graph_cyrus_db.pl";
+$picdir="/usr/www/tree/current/tainted";
+$hpicdir="/current/tainted";
+
+$q= new CGI;
+print $q->header();
+
+print("<html><head><title>Cyrus Stats</title></head>");
+print("<body>");
+
+opendir(DH, $DDIR) or die "Could not find data";
+ at files = readdir(DH);
+closedir(DH);
+
+%hash=();
+$n=0;
+foreach (@files){
+ $server = "";
+ $ds = "";
+ $n++;
+ ($server, $end) = split /\:/, $_, 2;
+ ($ds,$throwaway) = split /\./,$end,2;
+ if($ds ne ""){
+ push @{$hash{"$ds"}}, "$server";
+ }
+}
+
+print("<table>\n");
+
+foreach $service( sort %hash){
+ if(!$hash{$service}){
+ next;
+ }
+ print("<h2>$service</h2><ul>\n");
+ $cdef.="CDEF:sum=0";
+ print("on ");
+ foreach $server(@{$hash{$service}}){
+ print("<b>$server</b> ");
+ ($name, @throwaway)=split /\./, $server;
+ push(@args1,"DEF:$name=$DDIR/$server\\\:$service.rrd:current:MAX,");
+ push(@args2,"DEF:$name=$DDIR/$server\\\:$service.rrd:total:MAX,");
+ $cdef.=",$name,+";
+ }
+ chomp(@args1, @args2);
+ RRDs::graph("$picdir/$service-1.gif", at args1,"$cdef",
+ "AREA:sum#FF0000");
+# RRDs::graph("$picdir/$service-1.gif",
+# "DEF:mail1=$DDIR/mail1.andrew.cmu.edu\\\:$service.rrd:current:MAX",
+# "DEF:mail2=$DDIR/mail2.andrew.cmu.edu\\\:$service.rrd:current:MAX",
+# "CDEF:sum=mail1,mail2,+",
+# "AREA:sum#FF0000");
+
+ $error1=RRDs::error;
+ RRDs::graph("$picdir/$service-2.gif", @args2,
+ $cdef, "CDEF:throw=sum,10000,GT","CDEF:med=throw,0,sum,IF",
+ "CDEF:msum=med,300,* ", "AREA:msum#FF0000");
+ $error2=RRDs::error;
+ print("<br><img src=\"$hpicdir/$service-1.gif\">");
+ print("<img src=\"$hpicdir/$service-2.gif\">");
+ if ($error1) {print $error1}
+ if ($error2) {print $error2}
+ @args1=(); @args2=(); $cdef=(); $error1=(); $error2=();
+ print("</ul>\n");
+}
+
+print("</table>\n");
+
+print("</body></html>");
+
+#print head(), start_html("blah"), end-html();
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,71 @@
+#!/usr/local/bin/perl5
+
+#
+# Created by Alison Greenwald <alison at andrew.cmu.edu> 21 Sep 2000
+#
+
+use Time::Local;
+use CGI qw(:standard escapeHTML);
+use RRDs;
+srand(timelocal(localtime));
+
+%periods = ( "daily" => 86400,
+ "weekly" => 604800,
+ "monthly" => 2419200,
+ "yearly" => 31536000,
+);
+
+
+$DDIR="/data/cyrus";
+$SERVER=param("server");
+$SERVICE=param("service");
+$FNAME="$SERVER-$SERVICE";
+$picdir="/usr/www/tree/current/tainted";
+$hpicdir="/current/tainted";
+
+$etime=timelocal((localtime)[0,1,2,3,4,5]);
+
+$RNDNUM = rand()*1024;
+$TITLEC="$FNAME in use";
+$TITLET="$FNAME connections";
+
+
+$q= new CGI;
+print $q->header();
+
+print("<html><head><title>Graphs</title></head>");
+print("<body>");
+print("<h1>$SERVICE usage on $SERVER</h1>\n");
+
+foreach $period (sort {$periods{$a} <=> $periods{$b}}keys %periods){
+ $sttime = $etime - $periods{$period};
+ $DPICNAME="$FNAME-$period-$RNDNUM.gif";
+
+ RRDs::graph("$picdir/cur-$DPICNAME","-t $TITLEC",
+ "-s $sttime","-e $etime","-l 0",
+ "DEF:a=$DDIR/$SERVER\\\:$SERVICE.rrd:current:MAX",
+ "AREA:a#0000FF","COMMENT:Maximum\:","GPRINT:a:MAX:%lf",
+ "COMMENT:Minimum\:","GPRINT:a:MIN:%lf");
+ $ERROR=RRDs::error;
+ print $ERROR if $ERROR;
+ $RRDARGD.=" CDEF:throw=b,5000,GT ";
+ $RRDARGD.=" CDEF:med=throw,0,b,IF ";
+ $RRDARGD.=" CDEF:a=med,300,\*,FLOOR ";
+
+ RRDs::graph("$picdir/tot-$DPICNAME","-t $TITLET", "-s $sttime","-e $etime",
+ "DEF:a=$DDIR/$SERVER\\\:$SERVICE.rrd:total:MAX",
+ "CDEF:throw=a,5000,GT","CDEF:med=throw,0,a,IF",
+ "CDEF:b=med,300,*,FLOOR", "AREA:b#0000FF","COMMENT:Maximum\:",
+ "GPRINT:b:MAX:%lf", "COMMENT:Minimum\:","GPRINT:b:MIN:%lf");
+ $ERROR=RRDs::error;
+ print $ERROR if $ERROR;
+
+ print("<hr><h2>$period</h2>");
+ print("<br><h3>Current</h3><img src=\"$hpicdir/cur-$DPICNAME\">");
+ print("<br><h3>Total</h3><img src=\"$hpicdir/tot-$DPICNAME\">");
+
+}
+
+print("</body></html>");
+
+
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+/index.html/1.1/Sun Jan 28 22:42:01 2001//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/contrib/cyrus-graphtools.1.0/html
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/index.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/index.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/index.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/html/index.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+<head><title>Andrew System Graphs</title></head>
+<body bgcolor=#ffffff><html>
+
+<h2> This is a sample html page for the cyrus graphs <h2>
+<p><h2>Cyrus Data</h2>
+<a href="/cgi-bin/cyrus_master.pl">All services by server</a><br>
+<a href="/cgi-bin/graph_cyrus_db-sum.pl">Aggreagate graphs for all servers by service</a>
+
+</html>
+</body>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+/cyrus.pl/1.1/Sun Jan 28 22:43:02 2001//Tcyrus-release-2-3-7
+/cyrusrc/1.1/Sun Jan 28 22:43:02 2001//Tcyrus-release-2-3-7
+/run/1.1/Sun Jan 28 22:43:02 2001//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/contrib/cyrus-graphtools.1.0/script
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrus.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrus.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrus.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrus.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,115 @@
+#!/usr/local/bin/perl5
+
+################################################################################
+## This will read information from the cyrus MIB for all devices specified
+## in cyrusrc
+##
+## Copyright 2001 by Carnegie Mellon University
+##
+## All Rights Reserved
+##
+## Permission to use, copy, modify, and distribute this software and its
+## documentation for any purpose and without fee is hereby granted,
+## provided that the above copyright notice appear in all copies and that
+## both that copyright notice and this permission notice appear in
+## supporting documentation, and that the name of CMU not be
+## used in advertising or publicity pertaining to distribution of the
+## software without specific, written prior permission.
+##
+## CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+## CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+## ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+## WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+## SOFTWARE.
+##
+## Author: Alison Greenwald <alison at andrew.cmu.edu>
+## $Id: cyrus.pl,v 1.1 2001/01/28 22:43:02 wcw Exp $
+##
+################################################################################
+#
+
+
+use RRDs;
+use SNMP 1.8;
+
+do "/data/prog/cyrus/cyrusrc";
+get_data();
+
+sub get_data{
+ foreach $hname (keys %HOSTS){
+ $MAX = 0;
+ %walk=snmp_walk($hname, $HOSTS{$hname}, $MASTER);
+ foreach $OID (sort keys %walk){
+ @O = split /\./, $OID;
+ $RVAL=$walk{$OID};
+ chomp $RVAL;
+ if($O[-1] > $MAX){
+ $MAX = $O[-1];
+ }
+ $STUFF{"$O[$#O-1]-$O[$#O]"} = $RVAL;
+ } #foreach oid
+
+ for($i=1; $i<=$MAX; $i++){
+ $blah[0]=$STUFF{"3-$i"};
+ $blah[1]=$STUFF{"2-$i"};
+ $blah[2]=$STUFF{"1-$i"};
+ print "$hname:$blah[0]: $blah[2], $blah[1]\n";
+ populate_dbs();
+ } #for
+ } #foreach hname
+} #sub
+
+sub populate_dbs{
+ if(open(DB, "< $DPTH/$hname:$blah[0].rrd")){
+ close(DB);
+ } else {
+ print("Making $DPTH/$hname:$blah[0]:daily.rrd\n");
+ RRDs::create("$DPTH/$hname:$blah[0].rrd","-s 1",
+ "DS:current:GAUGE:300:U:U",
+ "DS:total:COUNTER:300:U:U",
+ "RRA:MAX:0.5:300:4320",
+ "RRA:MAX:0.5:1800:336",
+ "RRA:MAX:0.5:14400:168",
+ "RRA:MAX:0.5:86400:364");
+ $ERROR=RRDs::error;
+ print $ERROR if $ERROR;
+ }
+
+ RRDs::update("$DPTH/$hname:$blah[0].rrd", "N:$blah[1]:$blah[2]");
+
+}#find_dbs
+
+sub snmp_walk{
+ my ($server, $comm, $rootoid) = @_;
+ my %walk=();
+ my $sess = new SNMP::Session ( DestHost => $server,
+ Community => $comm,
+ UseNumeric => 1,
+ UseLongNames => 1
+ );
+
+ my @orig=split /\./, $rootoid; # original oid for comparison
+
+ my $var = new SNMP::Varbind(["$rootoid"]);
+ my $val = $sess->getnext($var);
+ my $name = $var->[$SNMP::Varbind::tag_f];
+ $name .= ".$var->[$SNMP::Varbind::iid_f]" if $var->[$SNMP::Varbind::iid_f];
+ my @current=split /\./, $name;
+
+ while (!$sess->{ErrorStr} && $orig[$#orig] eq $current[$#orig]
+ && $#current > $#orig){
+ my $value=$var->[$SNMP::Varbind::val_f];
+
+ $walk{"$name"} = $value;
+ $val = $sess->getnext($var);
+ $name=$var->[$SNMP::Varbind::tag_f];
+ $name .= ".$var->[$SNMP::Varbind::iid_f]" if $var->[$SNMP::Varbind::iid_f];
+ @current=split /\./, $name;
+ } #while
+
+ print("$sess->{ErrorStr}\n") if $sess->{ErrorStr};
+ return(%walk);
+
+}
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrus.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrusrc
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrusrc?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrusrc (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/cyrusrc Sat Aug 26 02:00:13 2006
@@ -1,0 +1,13 @@
+$MASTER=".1.3.6.1.4.1.3.6.1.2.1"; #snmp root for data
+$RRD="/usr/local/bin/rrdtool"; #rrdtool program
+$DPTH="/data/cyrus"; #data root
+$PROG_PATH="/data/prog/cyrus"; #program root
+%HOSTS=("mail-fe2.andrew.cmu.edu" => "public",
+ "mail-fe3.andrew.cmu.edu" => "public",
+ "mail-fe4.andrew.cmu.edu" => "public",
+ "mail1.andrew.cmu.edu" => "public",
+ "mail2.andrew.cmu.edu" => "public",
+ "mail3.andrew.cmu.edu" => "public",
+ "mail4.andrew.cmu.edu" => "public",
+); #host => read-community string
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/run
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/run?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/run (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/run Sat Aug 26 02:00:13 2006
@@ -1,0 +1,7 @@
+#!/usr/contributed/bin/bash
+
+while [ 1 ]; do
+/data/prog/cyrus/cyrus.pl 2&>/dev/null
+sleep 240
+done
+
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/cyrus-graphtools.1.0/script/run
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/deliver-notify-zephyr.patch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/deliver-notify-zephyr.patch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/deliver-notify-zephyr.patch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/deliver-notify-zephyr.patch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,96 @@
+$Id: deliver-notify-zephyr.patch,v 1.2 2002/05/25 19:57:43 leg Exp $
+
+This is a patch to deliver to make zephyr notifications more verbose.
+Naturally it requires zephyr. It sends zephyrs to everyone on the acl.
+
+Please note that if you're at a large site (like us) your zephyr servers
+will have problems with this patch due to the constant zephyrgrams going
+out.
+
+I have lost the name of the author for this patch; my apologies to this
+person.
+
+*** deliver.c.orig Wed Jun 11 12:43:44 1997
+--- deliver.c Wed Jun 11 15:08:41 1997
+***************
+*** 597,603 ****
+ else if (notifyptr &&
+ (!strncasecmp(buf, "from:", 5) ||
+ !strncasecmp(buf, "subject:", 8) ||
+! !strncasecmp(buf, "to:", 3))) {
+ if (!*notifyptr) *notifyptr = xstrdup(buf);
+ else {
+ *notifyptr =
+--- 597,604 ----
+ else if (notifyptr &&
+ (!strncasecmp(buf, "from:", 5) ||
+ !strncasecmp(buf, "subject:", 8) ||
+! !strncasecmp(buf, "to:", 3) ||
+! !strncasecmp(buf, "cc:", 3))) {
+ if (!*notifyptr) *notifyptr = xstrdup(buf);
+ else {
+ *notifyptr =
+***************
+*** 682,687 ****
+--- 683,689 ----
+ {
+ int r;
+ struct mailbox mailbox;
++ char *mbxacl=(char *)0;
+ char namebuf[MAX_MAILBOX_PATH];
+ char notifybuf[MAX_MAILBOX_PATH];
+ char *submailbox = 0;
+***************
+*** 740,755 ****
+ prot_rewind(msg);
+ r = append_fromstream(&mailbox, msg, size, time(0), flag, nflags,
+ user);
+ mailbox_close(&mailbox);
+ }
+
+ if (!r && user) {
+! strcpy(notifybuf, "INBOX");
+! if (submailbox) {
+! strcat(notifybuf, ".");
+! strcat(notifybuf, submailbox);
+ }
+! notify(user, notifybuf, notifyheader ? notifyheader : "");
+ }
+
+ if (!r && dupelim && id) markdelivered(id, user ? namebuf : mailboxname);
+--- 742,776 ----
+ prot_rewind(msg);
+ r = append_fromstream(&mailbox, msg, size, time(0), flag, nflags,
+ user);
++ mbxacl=strdup(mailbox.acl);
+ mailbox_close(&mailbox);
+ }
+
+ if (!r && user) {
+! struct auth_state *auth_anyone;
+! char *anyone="anyone";
+! char *pseudouser;
+! int amr;
+!
+! anyone=auth_canonifyid(anyone);
+! auth_anyone=auth_newstate(anyone,(char*)0);
+!
+! amr=acl_myrights(auth_anyone,mbxacl);
+! if (amr & ACL_READ) {
+! strcpy(notifybuf, user);
+! pseudouser=strdup("");
+! } else {
+! strcpy(notifybuf, "INBOX");
+! if (submailbox) {
+! strcat(notifybuf, ".");
+! strcat(notifybuf, submailbox);
+! }
+! pseudouser=strdup(user);
+ }
+! notify(pseudouser, notifybuf, notifyheader ? notifyheader : "");
+! auth_freestate(auth_anyone);
+! free(pseudouser);
+! free(mbxacl);
+ }
+
+ if (!r && dupelim && id) markdelivered(id, user ? namebuf : mailboxname);
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/drac_auth.patch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/drac_auth.patch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/drac_auth.patch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/drac_auth.patch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,378 @@
+$Id: drac_auth.patch,v 1.17.2.7 2006/05/23 13:49:38 murch Exp $
+
+Patch to add support for Dynamic Relay Authorization Control
+
+For more information about DRAC, see:
+ http://mail.cc.umanitoba.ca/drac/index.html
+
+
+Installation
+------------
+
+1. Apply this patch in the toplevel directory using the following command:
+
+ # patch -p0 < contrib/drac_auth.patch
+
+2. Cleanup any previous builds:
+
+ # make distclean
+
+3a. If you DO NOT have 'smake' and 'autoconf' installed on your system, goto
+ step 3b.
+
+ Perform the following to reconfigure your build:
+
+ # rm configure
+ # sh SMakefile
+ # ./configure ... --with-drac=<location of libdrac>
+
+ NOTE: you can find your original configure command in config.status
+
+ Proceed to step 4.
+
+3b. Edit imap/Makefile and modify the following three variables:
+
+ DEFS = ... -DDRAC_AUTH
+ LIBS = ... -ldrac
+ LDFLAGS = ... -L<location of libdrac>
+
+4. Build and install the software:
+
+ # make
+ # make install
+
+5. If dracd is not running on the same system as Cyrus (localhost),
+ use the 'drachost' option in imapd.conf(5) to specify the hostname of
+ the dracd server.
+
+6. Installation is complete!
+
+
+Operation
+---------
+
+The behavior of DRAC is controlled by the value of the 'dracinterval' option
+in imapd.conf(5). If 'dracinterval' is 0 (zero), DRAC support is disabled.
+Otherwise, DRAC support is enabled and has the following behavior:
+
+pop3d: Whenever a client opens a user's INBOX, drac_auth() is called.
+
+imapd: Once a client is logged in (via LOGIN or AUTHENTICATE),
+ drac_send() will be called once every 'dracinterval' minutes.
+
+
+
+
+
+Index: configure.in
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/configure.in,v
+retrieving revision 1.268.2.23
+diff -u -r1.268.2.23 configure.in
+--- configure.in 12 Apr 2005 20:05:20 -0000 1.268.2.23
++++ configure.in 23 May 2006 13:42:06 -0000
+@@ -1003,6 +1003,19 @@
+ SNMP_SUBDIRS=""
+ AC_SUBST(SNMP_SUBDIRS)
+
++dnl
++dnl Test for DRAC
++dnl
++DRACLIBS=
++AC_ARG_WITH(drac, [ --with-drac=DIR use DRAC library in <DIR> [no] ],
++ if test -d "$withval"; then
++ LDFLAGS="$LDFLAGS -L${withval}"
++ AC_CHECK_LIB(drac, dracauth,
++ AC_DEFINE(DRAC_AUTH,[],[Build DRAC support?])
++ DRACLIBS="-ldrac")
++ fi)
++AC_SUBST(DRACLIBS)
++
+ CMU_LIBWRAP
+ CMU_UCDSNMP
+
+Index: imap/Makefile.in
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/imap/Makefile.in,v
+retrieving revision 1.175.2.20
+diff -u -r1.175.2.20 Makefile.in
+--- imap/Makefile.in 15 Mar 2006 18:56:29 -0000 1.175.2.20
++++ imap/Makefile.in 23 May 2006 13:42:08 -0000
+@@ -66,6 +66,7 @@
+ SIEVE_LIBS = @SIEVE_LIBS@
+ IMAP_COM_ERR_LIBS = @IMAP_COM_ERR_LIBS@
+ LIB_WRAP = @LIB_WRAP@
++DRAC_LIBS = @DRACLIBS@
+ LIBS = $(IMAP_LIBS) $(IMAP_COM_ERR_LIBS)
+ DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+@@ -202,17 +203,17 @@
+ imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o imapd \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o \
+- libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
++ libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+ imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o imapd.pure \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \
+- $(DEPLIBS) $(LIBS) $(LIB_WRAP)
++ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+ imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(QUANTIFY) $(QUANTOPT) $(CC) $(LDFLAGS) -o imapd.quant \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \
+- $(DEPLIBS) $(LIBS) $(LIB_WRAP)
++ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) $(DRAC_LIBS)
+
+ mupdate: mupdate.o mupdate-slave.o mupdate-client.o mutex_pthread.o tls.o \
+ libimap.a $(DEPLIBS)
+@@ -230,7 +231,7 @@
+ pop3d: pop3d.o proxy.o backend.o tls.o mutex_fake.o libimap.a \
+ $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o pop3d pop3d.o proxy.o backend.o tls.o $(SERVICE) \
+- mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
++ mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+ nntpd: nntpd.o proxy.o backend.o index.o smtpclient.o spool.o tls.o \
+ mutex_fake.o nntp_err.o libimap.a $(DEPLIBS) $(SERVICE)
+Index: imap/imapd.c
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/imap/imapd.c,v
+retrieving revision 1.443.2.81
+diff -u -r1.443.2.81 imapd.c
+--- imap/imapd.c 22 May 2006 20:37:14 -0000 1.443.2.81
++++ imap/imapd.c 23 May 2006 13:42:08 -0000
+@@ -176,6 +176,18 @@
+ 1, 1, &imapd_authstate, &imapd_userisadmin, &imapd_userisproxyadmin
+ };
+
++#ifdef DRAC_AUTH
++static struct {
++ int interval; /* dracd "ping" interval; 0 = disabled */
++ unsigned long clientaddr;
++ struct prot_waitevent *event;
++} drac;
++
++extern int dracconn(char *server, char **errmsg);
++extern int dracsend(unsigned long userip, char **errmsg);
++extern int dracdisc(char **errmsg);
++#endif /* DRAC_AUTH */
++
+ /* current sub-user state */
+ static struct mailbox mboxstruct;
+ static struct mailbox *imapd_mailbox;
+@@ -646,6 +658,23 @@
+ /* setup for sending IMAP IDLE notifications */
+ idle_enabled();
+
++#ifdef DRAC_AUTH
++ /* setup for sending DRAC "pings" */
++ drac.event = NULL;
++ drac.interval = config_getint(IMAPOPT_DRACINTERVAL);
++ if (drac.interval < 0) drac.interval = 0;
++ if (drac.interval) {
++ char *err;
++
++ if (dracconn((char*) config_getstring(IMAPOPT_DRACHOST), &err) != 0) {
++ /* disable DRAC */
++ drac.interval = 0;
++ syslog(LOG_ERR, "dracconn: %s", err);
++ syslog(LOG_ERR, "DRAC notifications disabled");
++ }
++ }
++#endif /* DRAC_AUTH */
++
+ /* create connection to the SNMP listener, if available. */
+ snmp_connect(); /* ignore return code */
+ snmp_set_str(SERVER_NAME_VERSION,CYRUS_VERSION);
+@@ -750,6 +779,15 @@
+ imapd_haveaddr = 1;
+ }
+ }
++
++#ifdef DRAC_AUTH
++ if (((struct sockaddr *)&imapd_remoteaddr)->sa_family == AF_INET)
++ drac.clientaddr = ((struct sockaddr_in *)&imapd_remoteaddr)->sin_addr.s_addr;
++ else
++ drac.clientaddr = 0;
++ } else {
++ drac.clientaddr = 0;
++#endif /* DRAC_AUTH */
+ }
+
+ /* create the SASL connection */
+@@ -792,6 +830,11 @@
+ prot_flush(imapd_out);
+ snmp_increment(ACTIVE_CONNECTIONS, -1);
+
++#ifdef DRAC_AUTH
++ if (drac.event) prot_removewaitevent(imapd_in, drac.event);
++ drac.event = NULL;
++#endif /* DRAC_AUTH */
++
+ /* cleanup */
+ imapd_reset();
+
+@@ -885,6 +928,10 @@
+
+ cyrus_done();
+
++#ifdef DRAC_AUTH
++ if (drac.interval) (void) dracdisc((char **)NULL);
++#endif /* DRAC_AUTH */
++
+ exit(code);
+ }
+
+@@ -945,6 +992,35 @@
+ }
+ }
+
++#ifdef DRAC_AUTH
++/*
++ * Ping dracd every 'drac.interval' minutes
++ * to let it know that we are still connected
++ */
++struct prot_waitevent *drac_ping(struct protstream *s,
++ struct prot_waitevent *ev, void *rock)
++{
++ char *err;
++ static int nfailure = 0;
++
++ if (dracsend(drac.clientaddr, &err) != 0) {
++ syslog(LOG_ERR, "dracsend: %s", err);
++ if (++nfailure >= 3) {
++ /* can't contact dracd for 3 consecutive tries - disable DRAC */
++ prot_removewaitevent(s, ev);
++ drac.event = NULL;
++ syslog(LOG_ERR, "DRAC notifications disabled");
++ return NULL;
++ }
++ }
++ else
++ nfailure = 0;
++
++ ev->mark = time(NULL) + (drac.interval * 60);
++ return ev;
++}
++#endif /* DRAC_AUTH */
++
+ /*
+ * Top-level command loop parsing
+ */
+@@ -2052,6 +2128,11 @@
+ capa_response(CAPA_PREAUTH|CAPA_POSTAUTH);
+ prot_printf(imapd_out, "] %s\r\n", reply);
+
++#ifdef DRAC_AUTH
++ if (drac.interval && drac.clientaddr)
++ drac.event = prot_addwaitevent(imapd_in, 0 /* now */, drac_ping, NULL);
++#endif /* DRAC_AUTH */
++
+ /* Create telemetry log */
+ imapd_logfd = telemetry_log(imapd_userid, imapd_in, imapd_out, 0);
+
+@@ -2208,6 +2289,11 @@
+
+ prot_setsasl(imapd_in, imapd_saslconn);
+ prot_setsasl(imapd_out, imapd_saslconn);
++
++#ifdef DRAC_AUTH
++ if (drac.interval && drac.clientaddr)
++ drac.event = prot_addwaitevent(imapd_in, 0 /* now */, drac_ping, NULL);
++#endif /* DRAC_AUTH */
+
+ /* Create telemetry log */
+ imapd_logfd = telemetry_log(imapd_userid, imapd_in, imapd_out, 0);
+Index: imap/pop3d.c
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/imap/pop3d.c,v
+retrieving revision 1.144.2.42
+diff -u -r1.144.2.42 pop3d.c
+--- imap/pop3d.c 22 May 2006 19:38:32 -0000 1.144.2.42
++++ imap/pop3d.c 23 May 2006 13:42:08 -0000
+@@ -103,6 +103,10 @@
+ extern int opterr;
+
+
++#ifdef DRAC_AUTH
++static int drac_enabled;
++extern int dracauth(char *server, unsigned long userip, char **errmsg);
++#endif /* DRAC_AUTH */
+
+ #ifdef HAVE_SSL
+ static SSL *tls_conn;
+@@ -513,6 +517,10 @@
+ prot_settimeout(popd_in, timeout*60);
+ prot_setflushonread(popd_in, popd_out);
+
++#ifdef DRAC_AUTH
++ drac_enabled = (config_getint(IMAPOPT_DRACINTERVAL) > 0);
++#endif /* DRAC_AUTH */
++
+ if (kflag) kpop();
+
+ /* we were connected on pop3s port so we should do
+@@ -1648,6 +1656,21 @@
+ popd_mailbox = &mboxstruct;
+ proc_register("pop3d", popd_clienthost, popd_userid,
+ popd_mailbox->name);
++
++#ifdef DRAC_AUTH
++ if (drac_enabled &&
++ ((struct sockaddr *)&popd_remoteaddr)->sa_family == AF_INET) {
++ char *err;
++
++ if (dracauth((char*) config_getstring(IMAPOPT_DRACHOST),
++ ((struct sockaddr_in *)&popd_remoteaddr)->sin_addr.s_addr, &err) != 0) {
++ /* disable DRAC */
++ drac_enabled = 0;
++ syslog(LOG_ERR, "dracauth: %s", err);
++ syslog(LOG_ERR, "DRAC notifications disabled");
++ }
++ }
++#endif /* DRAC_AUTH */
+ }
+
+ /* Create telemetry log */
+Index: imap/version.c
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/imap/version.c,v
+retrieving revision 1.14.2.5
+diff -u -r1.14.2.5 version.c
+--- imap/version.c 16 Feb 2005 21:06:19 -0000 1.14.2.5
++++ imap/version.c 23 May 2006 13:42:08 -0000
+@@ -151,6 +151,10 @@
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; %s", SIEVE_VERSION);
+ #endif
++#ifdef DRAC_AUTH
++ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
++ "; DRAC");
++#endif
+ #ifdef HAVE_LIBWRAP
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; TCP Wrappers");
+Index: lib/imapoptions
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/lib/imapoptions,v
+retrieving revision 1.2.2.44
+diff -u -r1.2.2.44 imapoptions
+--- lib/imapoptions 30 Mar 2006 16:06:46 -0000 1.2.2.44
++++ lib/imapoptions 23 May 2006 13:42:08 -0000
+@@ -198,6 +198,14 @@
+ grant the user the ability to delete a mailbox. If a user has this
+ right, they will automatically be given the new 'x' right. */
+
++{ "dracinterval", 5, INT }
++/* If nonzero, enables the use of DRAC (Dynamic Relay Authorization
++ Control) by the pop3d and imapd daemons. Also sets the interval
++ (in minutes) between re-authorization requests made by imapd. */
++
++{ "drachost", "localhost", STRING }
++/* Hostname of the RPC dracd server. */
++
+ { "duplicate_db", "berkeley-nosync", STRINGLIST("berkeley", "berkeley-nosync", "berkeley-hash", "berkeley-hash-nosync", "skiplist")}
+ /* The cyrusdb backend to use for the duplicate delivery suppression
+ and sieve. */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/fud-client.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/fud-client.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/fud-client.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/fud-client.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,159 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: fud-client.c,v 1.5 2003/02/13 20:15:18 rjs3 Exp $ */
+
+/* This is an example client for the experimental fud service.
+ For this to work, the mailbox must have the local ACL bit 0 enabled
+ for user 'anonymous' ('anyone' will also work)
+ For example, from cyradm: 'sam <mailbox> anonymous 0'
+*/
+
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <netinet/in.h>
+#include <signal.h>
+#include <netdb.h>
+#include <unistd.h>
+#include <sysexits.h>
+#include <stdio.h>
+
+extern int optind;
+extern char *optarg;
+
+void
+usage()
+{
+ fprintf(stderr,"usage: fud-client [-p port] host user mailbox\n");
+ exit(EX_USAGE);
+}
+
+void
+timeout(signo)
+int signo;
+{
+ fprintf(stderr,"fud-client: request timed out.\n");
+ exit(EX_UNAVAILABLE);
+}
+
+int
+main(argc, argv)
+int argc;
+char **argv;
+{
+ int soc,x,rc;
+ struct sockaddr_in sin,sfrom;
+ struct hostent *hp;
+ fd_set fset;
+ char buf[512];
+ time_t lread, lappend;
+ int numrecent;
+ char username[16];
+ char mbox[512];
+ char time[35];
+ int port = 4201;
+ char ch,*hname;
+
+
+ while ((ch = getopt(argc,argv,"p:")) != -1) {
+ switch(ch) {
+ case 'p':
+ port = atoi(optarg);
+ break;
+ case '?':
+ usage();
+ }
+ }
+ argc -= optind;
+ argv += optind;
+
+
+ if(!*argv)
+ usage();
+ hname = *argv;
+ argv++;
+ if(!*argv)
+ usage();
+ strcpy(username,*argv);
+ argv++;
+ if(!*argv)
+ usage();
+ strcpy(mbox,*argv);
+
+ soc = socket(PF_INET,SOCK_DGRAM,0);
+
+ hp = gethostbyname(hname);
+ if(hp == (struct hostent*) 0) {
+ fprintf(stderr,"%s doesn't appear to be a valid hostname.\n",hname);
+ exit(EX_NOHOST);
+ }
+ memcpy(&sin.sin_addr.s_addr,hp->h_addr,hp->h_length);
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(port);
+
+ sprintf(buf,"%s|%s",username,mbox);
+ sendto(soc,buf,strlen(buf),0,(struct sockaddr *)&sin,sizeof(sin));
+
+ signal(SIGALRM,timeout);
+ alarm(5);
+ x = sizeof(sfrom);
+ rc = recvfrom(soc,buf,512,0,(struct sockaddr *)&sfrom,&x);
+ alarm(0);
+ buf[rc] = '\0';
+ switch(buf[0]) {
+ case 'U':
+ printf("Server did not recognize mailbox %s\n",mbox);
+ exit(EX_UNAVAILABLE);
+ case 'P':
+ printf("Permission denied attempting get mailbox info for %s\n",mbox);
+ exit(EX_NOPERM);
+ default:
+ sscanf(buf,"%[^|]|%[^|]|%d|%d|%d", username, mbox, &numrecent, &lread, &lappend);
+ printf("user: %s\nmbox: %s\nNumber of Recent %d\n", username, mbox, numrecent);
+ strcpy(time,ctime(&lread));
+ printf("Last read: %s", time);
+ strcpy(time,ctime(&lappend));
+ printf("Last arrived: %s", time);
+ }
+ return(0);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/mupdate-test.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/mupdate-test.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/mupdate-test.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/mupdate-test.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,31 @@
+#!/usr/local/bin/perl
+
+# Create a workload against a murder frontend
+# that will give the MUPDATE server a workout.
+#
+# Interesting things to add:
+#
+# - Try against more than one host to ensure the right thing happens
+# between hosts.
+# - Actually check result codes!!!
+
+$|++;
+
+$host = $ARGV[0] || "sourcefour";
+
+open OUT, "|imtest $host" || die "no imtest";
+print OUT "a SELECT INBOX\n";
+
+for($i=0; $i < 1000; $i++) {
+ print OUT "b$i CREATE INBOX.foo\n";
+ print OUT "c$i SETACL INBOX.foo rjs3.admin lrswipcda\n";
+ print OUT "d$i RENAME INBOX.foo INBOX.bar\n";
+ print OUT "e$i SETACL INBOX.bar rjs3.admin \"\"\n";
+ print OUT "f$i DELETE INBOX.bar\n";
+
+ sleep 1 unless($i % 20);
+}
+
+print OUT "g LOGOUT\n";
+
+close(OUT);
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/mupdate-test.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+/README/1.1/Sat Jun 23 01:01:48 2001//Tcyrus-release-2-3-7
+/net-server-prefork-0.01.tgz/1.1/Sat Jun 23 01:01:48 2001//Tcyrus-release-2-3-7
+/notify/1.1/Sat Jun 23 01:01:48 2001//Tcyrus-release-2-3-7
+/simple_notify.pl/1.1/Sat Jun 23 01:01:49 2001//Tcyrus-release-2-3-7
+/sql_notify.pl/1.1/Sat Jun 23 01:01:49 2001//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/contrib/notify_unix
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,17 @@
+This directory contains two simple examples of UNIX notification daemons
+written in Perl. Both daemons require installing the
+Net::Server::Prefork module, located in this directory.
+
+The Perl script 'simple_notify.pl' simply logs mail notifications--it
+shows the simplest possible handler.
+
+The Perl script 'mysql_notify.pl' also logs the notification, but in
+addition it looks up the username in a DB table in order to get additional
+information about the user. This could be used, for example, to get a
+user's instant messaging address from a database in order to send a
+notification message. 'mysql_notify.pl' requires a file /etc/notify
+that contains three lines: the DSN, username, and password to connect
+to the database.
+
+The shell script 'notify' is a sample init.d script for
+starting/stopping the perl daemon.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/net-server-prefork-0.01.tgz
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/net-server-prefork-0.01.tgz?rev=585&root=cyrus22&view=auto
==============================================================================
Binary file - no diff available.
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/net-server-prefork-0.01.tgz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/notify
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/notify?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/notify (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/notify Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+#!/bin/sh
+# description: Start/stop notify.pl (Cyrus Unix sockets notification handler)
+
+case "$1" in
+'start')
+ /usr/bin/notify.pl
+ ;;
+'stop')
+ kill -INT `cat /tmp/notify_unix.pid`
+ ;;
+*)
+ echo "Usage: $0 { start | stop }"
+ ;;
+esac
+exit 0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/simple_notify.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/simple_notify.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/simple_notify.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/simple_notify.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,36 @@
+use IO::Socket;
+use Data::Dumper;
+use Net::Server::Prefork;
+use Unix::Syslog qw(:macros :subs);
+use strict;
+
+sub log_connection {
+ my $sock = shift;
+
+ my $Class = $sock->getline();
+ my $Instance = $sock->getline();
+ my $User = $sock->getline();
+ my $Mailbox = $sock->getline();
+ my $Message = join("\n",$sock->getlines());
+
+ syslog LOG_ERR, "Notifying Class $Class Instance $Instance User $User MB $Mailbox Message $Message";
+
+ $sock->close;
+}
+
+Unix::Syslog::openlog('notify_unix', LOG_PID | LOG_CONS, LOG_DAEMON);
+
+my $Server = Net::Server::Prefork->new;
+$Server->set_path('/var/imap/');
+$Server->set_pid_name('notify_unix.pid');
+$Server->set_socket_name('socket/notify');
+$Server->set_log_name("notify_unix");
+$Server->set_num_prefork(2);
+
+$Server->set_user(scalar getpwnam('cyrus'));
+$Server->set_group(scalar getgrnam('mail'));
+
+$Server->set_on_connect(\&log_connection);
+
+$Server->start();
+
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/simple_notify.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/sql_notify.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/sql_notify.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/sql_notify.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/sql_notify.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,122 @@
+# <P>The script <TT>mysql_notify.pl</TT> also logs the notification, but in addition
+# it looks up the username in a DB table in order to get additional information
+# about the user. This could be used, for example, to get a user's instant messaging
+# address from a database in order to send a notification message.
+# <TT>mysql_notify.pl</TT> requires a file <TT>/etc/notify</TT> that contains
+# three lines: the DSN, username, and password to connect to the database.
+
+use IO::Socket;
+use DBI;
+use Data::Dumper;
+use Net::Server::Prefork;
+use Unix::Syslog qw(:macros :subs);
+use strict;
+
+# A file containing the DSN, root username, and password for the root username
+use constant CONFIGFILE=>'/etc/notify_unix';
+
+# The table to look up the user's notification address in
+use constant USERS_TABLE => 'Users';
+# The field name in the table that contains the user's email user id
+# (must be unique.)
+use constant USER_FLD => 'UserName';
+# The field name in the table that contains the user's notification address
+use constant NOTIFY_FLD => 'NotifyAddr';
+
+#------------------------------------------------------------
+# Grab login params from command line
+open (CONFIG, '<'.CONFIGFILE) || die 'Failed to open config file '.CONFIGFILE;
+chomp (my ($D_DSN, $D_LOGIN, $D_PASSWORD) = <CONFIG>);
+close CONFIG;
+
+my ($dbh,$sth) = undef;
+
+Unix::Syslog::openlog('notify_unix', LOG_PID | LOG_CONS, LOG_DAEMON);
+
+my $Server = Net::Server::Prefork->new;
+$Server->set_path('/var/imap/');
+$Server->set_pid_name('notify_unix.pid');
+$Server->set_socket_name('socket/notify');
+$Server->set_log_name("notify_unix");
+$Server->set_num_prefork(5);
+
+$Server->set_user(scalar getpwnam('cyrus'));
+$Server->set_group(scalar getgrnam('mail'));
+
+$Server->set_on_connect(\&sql_notify);
+
+$Server->start();
+$sth->finish() if $sth;
+$dbh->disconnect if $dbh;
+
+sub db_connect {
+ # Create connection to database.
+ # This doesn't do anything if already connected.
+ if (!$dbh || $DBI::errstr || !$dbh->{Active}) {
+ Unix::Syslog::syslog LOG_INFO, "Connecting to database", 0;
+ $sth->finish() if $sth;
+ $dbh->disconnect() if $dbh;
+ $dbh = undef; # Some drivers (e.g. DBD::Sybase) need this
+ $dbh = DBI->connect ($D_DSN, $D_LOGIN, $D_PASSWORD)
+ || syslog LOG_ERR, 'Failed to connect to database';
+ # Create statement handle
+ if ($dbh) {
+ $sth = $dbh->prepare(
+ 'SELECT ' .NOTIFY_FLD. ' FROM ' . USERS_TABLE . ' WHERE ' .USER_FLD. '=?'
+ ) || syslog LOG_ERR, 'Failed to create statement handle';
+ }
+ }
+ # If anything didn't work, wait a while and try again
+ if ($DBI::errstr) {
+ Unix::Syslog::syslog LOG_ERR, "No DB connection--reconnecting", 0;
+ sleep 10;
+ # Avoids recursion with a 'goto' (I think)--avoid filling up stack space
+ goto &db_connect;
+ }
+}
+
+#------------------------------------------------------------
+# Get the password corresponding with this user
+sub get_rows {
+ my $username=$_[0];
+ my @rows=undef;
+ db_connect();
+ # Try and exec the query. If we can't, we've probably lost our DB connection...
+ while (!$sth->execute($username)) {
+ # ... so wait a while and get it back.
+ sleep 10;
+ db_connect();
+ }
+ if (defined $DBI::errstr) {
+ Unix::Syslog::syslog LOG_ERR, $DBI::errstr;
+ return ();
+ }
+ @rows=$sth->fetchrow_array;
+ return @rows;
+}
+
+sub sql_notify {
+ my $sock = shift;
+
+ my $Class = $sock->getline();
+ my $Instance = $sock->getline();
+ my $User = $sock->getline();
+ my $Mailbox = $sock->getline();
+ my $Message = join("\n",$sock->getlines());
+ # Hmmm... there seems to be a trailling space we have to remove...
+ $User =~ s/\s$//;
+
+ my @rows = get_rows($User);
+ $#rows<1 ||
+ syslog LOG_ERR, "Non-unique rows for user $User";
+ my $row = $rows[0];
+ # Do the notification, if we successfully looked up the user in the DB
+ if ($row) {
+ ##############################
+ ### TODO: Do notification here
+ ##############################
+ syslog LOG_ERR, "Notification for $User with $row";
+ }
+
+ $sock->close;
+}
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/notify_unix/sql_notify.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/sieve-spamasssassin
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/sieve-spamasssassin?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/sieve-spamasssassin (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/sieve-spamasssassin Sat Aug 26 02:00:13 2006
@@ -1,0 +1,462 @@
+From bob at nas.com Thu May 9 18:00:16 2002
+Date: Thu, 25 Apr 2002 11:01:11 -0700
+From: Bob Finch <bob at nas.com>
+To: info-cyrus at lists.andrew.cmu.edu
+Subject: "spam" sieve extension
+
+I've gotten a handful of requests for the "spam" sieve extension I
+mentioned yesterday. The diffs aren't too big, so I'll post them to
+the list.
+
+The diffs add a test to sieve that passes the message to SpamAssassin.
+If SpamAssassin scores the messages as spam, the test fails, otherwise
+the test succeeds. Here's a simple sieve script using the spam
+extension:
+
+ require [ "spam", "fileinto" ];
+ if spam {
+ fileinto "spamfolder";
+ }
+
+The diffs are based on cyrus-imapd-2.1.3 -- I haven't tried them with
+other versions. You'll also need to install SpamAssassin (see
+http://www.spamassassin.org/) and have spamd running. I'm currently
+running SpamAssassin 2.11. I've been running it for about a month on
+several mailboxes that typically get about 500 messages a day.
+
+The extension adds three new imapd.conf parameters:
+
+ max_size: 256000
+ The spam test will always return false for messages larger than
+ max_size. Messages larger than max_size will not be passed to
+ spamd.
+
+ spam_spamd_host: 127.0.0.1
+ The IP addresses or hostname of the spamd server.
+
+ spam_spamd_port: 783
+ The port number of the spamd server.
+
+When sieve evaluates the spam test, it calls a callback in
+imap/lmptd.c that opens a connection to spamd. It then sends a CHECK
+command writes the message to spamd. It parses the response from
+spamd and returns the result of the test to sieve.
+
+Things on my to-do list:
+
+ * Add a configure option and ifdefs to conditionally include the
+ spam extension
+
+ * Provide a way for users to get more information about how
+ SpamAssassin scores messages. This will require help from spamd,
+ since it currently just returns the score and threshold.
+
+ * Documentation
+
+-- Bob
+
+
+diff -cr cyrus-imapd-2.1.3-orig/imap/lmtpd.c cyrus-imapd-2.1.3/imap/lmtpd.c
+*** cyrus-imapd-2.1.3-orig/imap/lmtpd.c Thu Mar 7 09:55:28 2002
+--- cyrus-imapd-2.1.3/imap/lmtpd.c Thu Apr 18 21:14:10 2002
+***************
+*** 111,116 ****
+--- 111,124 ----
+
+ char *authuser; /* user who submitted message */
+ struct auth_state *authstate;
++
++ /* spam stuff */
++
++ /* This is in script_data, but the spam callback can't get to it */
++ /* so we put a copy here */
++ char *username; /* Username of mailbox */
++ int spam_result_valid; /* != 0 iff spam result is valid */
++ int spam_result; /* != iff message is spam */
+ } mydata_t;
+
+ /* data per script */
+***************
+*** 910,915 ****
+--- 918,1087 ----
+ static char *markflags[] = { "\\flagged" };
+ static sieve_imapflags_t mark = { markflags, 1 };
+
++ /* spam support */
++
++ static int
++ getline (int s, char *buf, int len)
++ {
++ char *bp = buf;
++ int ret = 1;
++ char ch;
++
++ while ((ret = read (s, &ch, 1)) == 1 && ch != '\n') {
++ if (len > 0) {
++ *bp++ = ch;
++ len--;
++ }
++ }
++ if (len > 0)
++ *bp = '\0';
++ return (buf != bp);
++ }
++
++
++ static int
++ full_write (int s, char *buf, int len)
++ {
++ int total;
++ int ret;
++
++ for (total = 0; total < len; total += ret) {
++ ret = write (s, buf + total, len - total);
++ if (ret < 0)
++ return 0;
++ }
++ return total == len;
++ }
++
++
++ static int
++ read_response (int s, int *result)
++ {
++ char is_spam[6];
++ char buf[1024];
++ int major;
++ int minor;
++ int response;
++ int score;
++ int threshold;
++
++ if (! getline (s, buf, sizeof (buf))) {
++ syslog (LOG_ERR, "read_response: response getline failed");
++ return SIEVE_FAIL;
++ }
++ if (sscanf (buf, "SPAMD/%d.%d %d %*s", &major, &minor, &response) != 3) {
++ syslog (LOG_ERR, "read_response: response sscanf failed, buf: %s",
++ buf);
++ return SIEVE_FAIL;
++ }
++ if (major < 1 || (major == 1 && minor < 1)) {
++ syslog (LOG_ERR, "read_response: bad spamd version: %d.%d",
++ major, minor);
++ return SIEVE_FAIL;
++ }
++ if (! getline (s, buf, sizeof (buf))) {
++ syslog (LOG_ERR, "read_response: header getline failed");
++ return SIEVE_FAIL;
++ }
++ if (sscanf (buf, "Spam: %5s ; %d / %d", is_spam, &score, &threshold) != 3) {
++ syslog (LOG_ERR, "read_response: header sscanf failed, buf: %s",
++ buf);
++ return SIEVE_FAIL;
++ }
++
++ *result = ! strcmp(is_spam, "True");
++ return SIEVE_OK;
++ }
++
++
++ int spam (void *mc, int *is_spam)
++ {
++ mydata_t *d = (mydata_t *) mc;
++ message_data_t *m = d->m;
++ int s;
++ struct sockaddr_in addr;
++ struct hostent *host;
++ char header[128];
++ int max_size = config_getint ("spam_max_size", 250 * 1024);
++ const char *hostname = config_getstring ("spam_spamd_host", "127.0.0.1");
++ int port = config_getint ("spam_spamd_port", 783);
++ char *msg_buf;
++ int ret;
++
++ /* Assume message isn't spam if it is larger than max_size */
++ if (m->size > max_size) {
++ syslog (LOG_INFO, "spam: skipping message bigger than %d", max_size);
++ return SIEVE_FAIL;
++ }
++
++ memset (&addr, 0, sizeof(addr));
++ addr.sin_family = AF_INET;
++ addr.sin_port = htons(port);
++
++ if ((host = gethostbyname (hostname)) == NULL) {
++ syslog (LOG_ERR, "spam: gethostbyname failed");
++ return SIEVE_FAIL;
++ }
++ memcpy (&addr.sin_addr, host->h_addr, sizeof (addr.sin_addr));
++
++ if((s = socket (PF_INET, SOCK_STREAM, 0)) < 0) {
++ syslog (LOG_ERR, "spam: socket failed");
++ return SIEVE_FAIL;
++ }
++
++ if (connect (s, (const struct sockaddr *) &addr, sizeof (addr)) < 0) {
++ syslog (LOG_ERR, "spam: connect failed");
++ close (s);
++ return SIEVE_FAIL;
++ }
++
++ if ((msg_buf = malloc (m->size)) == NULL) {
++ syslog (LOG_ERR, "spam: malloc(%d) failed", m->size);
++ close (s);
++ return SIEVE_FAIL;
++ }
++ rewind (m->f);
++ if (fread (msg_buf, 1, m->size, m->f) != m->size || ferror (m->f)) {
++ syslog (LOG_ERR, "spam: read message failed");
++ free (msg_buf);
++ close (s);
++ return SIEVE_FAIL;
++ }
++
++ if (d->username) {
++ snprintf (header, sizeof (header),
++ "CHECK SPAMC/1.2\r\nUser: %s\r\nContent-length: %d\r\n\r\n",
++ d->username, m->size);
++ }
++ else {
++ snprintf (header, sizeof (header),
++ "CHECK SPAMC/1.2\r\nContent-length: %d\r\n\r\n", m->size);
++ }
++ if (! full_write (s, header, strlen (header))) {
++ syslog (LOG_ERR, "spam: write header failed");
++ free (msg_buf);
++ close (s);
++ return SIEVE_FAIL;
++ }
++ if (! full_write (s, msg_buf, m->size)) {
++ syslog (LOG_ERR, "spam: write message failed");
++ free (msg_buf);
++ close (s);
++ return SIEVE_FAIL;
++ }
++
++ shutdown (s, SHUT_WR);
++ ret = read_response (s, is_spam);
++ shutdown (s, SHUT_RD);
++
++ free (msg_buf);
++ close (s);
++
++ syslog(LOG_DEBUG, "spam result: %d\n", ret);
++ return ret;
++ }
++
++
+ int sieve_parse_error_handler(int lineno, const char *msg, void *ic, void *sc)
+ {
+ script_data_t *sd = (script_data_t *) sc;
+***************
+*** 999,1004 ****
+--- 1171,1182 ----
+ fatal("sieve_register_vacation()", EC_SOFTWARE);
+ }
+
++ res = sieve_register_spam(sieve_interp, &spam);
++ if (res != SIEVE_OK) {
++ syslog(LOG_ERR, "sieve_register_spam() returns %d\n", res);
++ fatal("sieve_register_spam()", EC_SOFTWARE);
++ }
++
+ res = sieve_register_parse_error(sieve_interp, &sieve_parse_error_handler);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_parse_error() returns %d\n", res);
+***************
+*** 1148,1154 ****
+ mydata.notifyheader = generate_notify(msgdata);
+ mydata.authuser = authuser;
+ mydata.authstate = authstate;
+!
+ /* loop through each recipient, attempting delivery for each */
+ for (n = 0; n < nrcpts; n++) {
+ char *rcpt = xstrdup(msg_getrcpt(msgdata, n));
+--- 1326,1335 ----
+ mydata.notifyheader = generate_notify(msgdata);
+ mydata.authuser = authuser;
+ mydata.authstate = authstate;
+! mydata.username = NULL;
+! mydata.spam_result = 0;
+! mydata.spam_result_valid = 0;
+!
+ /* loop through each recipient, attempting delivery for each */
+ for (n = 0; n < nrcpts; n++) {
+ char *rcpt = xstrdup(msg_getrcpt(msgdata, n));
+***************
+*** 1187,1192 ****
+--- 1368,1376 ----
+ sdata->username = rcpt;
+ sdata->mailboxname = plus;
+ sdata->authstate = auth_newstate(rcpt, (char *)0);
++
++ /* Make a copy of mailbox username for spam stuff */
++ mydata.username = sdata->username;
+
+ /* slap the mailboxname back on so we hash the envelope & id
+ when we figure out whether or not to keep the message */
+diff -cr cyrus-imapd-2.1.3-orig/sieve/interp.c cyrus-imapd-2.1.3/sieve/interp.c
+*** cyrus-imapd-2.1.3-orig/sieve/interp.c Tue Oct 2 14:08:13 2001
+--- cyrus-imapd-2.1.3/sieve/interp.c Sun Mar 24 11:39:14 2002
+***************
+*** 154,159 ****
+--- 154,166 ----
+ return SIEVE_OK;
+ }
+
++ int sieve_register_spam(sieve_interp_t *interp, sieve_spam *f)
++ {
++ interp->spam = f;
++
++ return SIEVE_OK;
++ }
++
+ /* add the callbacks for messages. again, undefined if used after
+ sieve_script_parse */
+ int sieve_register_size(sieve_interp_t *interp, sieve_get_size *f)
+diff -cr cyrus-imapd-2.1.3-orig/sieve/interp.h cyrus-imapd-2.1.3/sieve/interp.h
+*** cyrus-imapd-2.1.3-orig/sieve/interp.h Mon Feb 21 23:56:40 2000
+--- cyrus-imapd-2.1.3/sieve/interp.h Sun Mar 24 11:40:53 2002
+***************
+*** 35,40 ****
+--- 35,41 ----
+ sieve_callback *redirect, *discard, *reject, *fileinto, *keep;
+ sieve_callback *notify;
+ sieve_vacation_t *vacation;
++ sieve_spam *spam;
+
+ sieve_get_size *getsize;
+ sieve_get_header *getheader;
+diff -cr cyrus-imapd-2.1.3-orig/sieve/script.c cyrus-imapd-2.1.3/sieve/script.c
+*** cyrus-imapd-2.1.3-orig/sieve/script.c Wed Feb 27 13:05:13 2002
+--- cyrus-imapd-2.1.3/sieve/script.c Thu Apr 18 21:02:51 2002
+***************
+*** 102,107 ****
+--- 102,114 ----
+ return 1;
+ } else if (!strcmp("comparator-i;ascii-casemap", req)) {
+ return 1;
++ } else if (!strcmp("spam",req)) {
++ if (s->interp.spam) {
++ s->support.spam = 1;
++ return 1;
++ } else {
++ return 0;
++ }
+ }
+ return 0;
+ }
+***************
+*** 361,366 ****
+--- 368,381 ----
+ res = (sz < t->u.sz.n);
+ }
+ break;
++ }
++ case SPAM:
++ {
++ int is_spam;
++
++ if (i->spam == NULL || i->spam (m, &is_spam) != SIEVE_OK)
++ break;
++ res = is_spam;
+ }
+ }
+
+diff -cr cyrus-imapd-2.1.3-orig/sieve/script.h cyrus-imapd-2.1.3/sieve/script.h
+*** cyrus-imapd-2.1.3-orig/sieve/script.h Wed Feb 9 16:39:14 2000
+--- cyrus-imapd-2.1.3/sieve/script.h Sun Mar 24 11:39:13 2002
+***************
+*** 45,50 ****
+--- 45,51 ----
+ int notify : 1;
+ int regex : 1;
+ int subaddress: 1;
++ int spam : 1;
+ } support;
+
+ void *script_context;
+diff -cr cyrus-imapd-2.1.3-orig/sieve/sieve-lex.l cyrus-imapd-2.1.3/sieve/sieve-lex.l
+*** cyrus-imapd-2.1.3-orig/sieve/sieve-lex.l Tue Feb 19 10:09:46 2002
+--- cyrus-imapd-2.1.3/sieve/sieve-lex.l Sat Mar 23 18:43:22 2002
+***************
+*** 90,95 ****
+--- 90,96 ----
+ <INITIAL>header return HEADER;
+ <INITIAL>not return NOT;
+ <INITIAL>size return SIZE;
++ <INITIAL>spam return SPAM;
+ <INITIAL>reject return REJCT;
+ <INITIAL>fileinto return FILEINTO;
+ <INITIAL>redirect return REDIRECT;
+diff -cr cyrus-imapd-2.1.3-orig/sieve/sieve.y cyrus-imapd-2.1.3/sieve/sieve.y
+*** cyrus-imapd-2.1.3-orig/sieve/sieve.y Tue Mar 5 08:15:01 2002
+--- cyrus-imapd-2.1.3/sieve/sieve.y Sun Mar 24 11:36:18 2002
+***************
+*** 141,146 ****
+--- 141,147 ----
+ %token SETFLAG ADDFLAG REMOVEFLAG MARK UNMARK
+ %token NOTIFY DENOTIFY
+ %token ANYOF ALLOF EXISTS SFALSE STRUE HEADER NOT SIZE ADDRESS ENVELOPE
++ %token SPAM
+ %token COMPARATOR IS CONTAINS MATCHES REGEX OVER UNDER
+ %token ALL LOCALPART DOMAIN USER DETAIL
+ %token DAYS ADDRESSES SUBJECT MIME
+***************
+*** 398,403 ****
+--- 399,409 ----
+ | NOT test { $$ = new_test(NOT); $$->u.t = $2; }
+ | SIZE sizetag NUMBER { $$ = new_test(SIZE); $$->u.sz.t = $2;
+ $$->u.sz.n = $3; }
++ | SPAM { if (!parse_script->support.spam) {
++ yyerror("spam not required");
++ YYERROR;
++ }
++ $$ = new_test(SPAM); }
+ | error { $$ = NULL; }
+ ;
+
+diff -cr cyrus-imapd-2.1.3-orig/sieve/sieve_interface.h cyrus-imapd-2.1.3/sieve/sieve_interface.h
+*** cyrus-imapd-2.1.3-orig/sieve/sieve_interface.h Tue Feb 19 10:09:46 2002
+--- cyrus-imapd-2.1.3/sieve/sieve_interface.h Sun Mar 24 19:46:44 2002
+***************
+*** 50,55 ****
+--- 50,57 ----
+ typedef int sieve_get_envelope(void *message_context,
+ const char *field,
+ const char ***contents);
++ typedef int sieve_spam(void *message_context, int *is_spam);
++
+
+ typedef struct sieve_vacation {
+ int min_response; /* 0 -> defaults to 3 */
+***************
+*** 121,126 ****
+--- 123,129 ----
+ int sieve_register_vacation(sieve_interp_t *interp, sieve_vacation_t *v);
+ int sieve_register_imapflags(sieve_interp_t *interp, sieve_imapflags_t *mark);
+ int sieve_register_notify(sieve_interp_t *interp, sieve_callback *f);
++ int sieve_register_spam(sieve_interp_t *interp, sieve_spam *f);
+
+ /* add the callbacks for messages. again, undefined if used after
+ sieve_script_parse */
+diff -cr cyrus-imapd-2.1.3-orig/timsieved/scripttest.c cyrus-imapd-2.1.3/timsieved/scripttest.c
+*** cyrus-imapd-2.1.3-orig/timsieved/scripttest.c Sun Dec 17 20:53:43 2000
+--- cyrus-imapd-2.1.3/timsieved/scripttest.c Sun Mar 24 13:12:06 2002
+***************
+*** 171,176 ****
+--- 171,182 ----
+ return TIMSIEVE_FAIL;
+ }
+
++ res = sieve_register_spam(i, (sieve_spam *) &foo);
++ if (res != SIEVE_OK) {
++ syslog (LOG_ERR, "sieve_register_spam() returns %d\n", res);
++ return TIMSIEVE_FAIL;
++ }
++
+ res = sieve_register_parse_error(i, &mysieve_error);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_parse_error() returns %d\n", res);
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,101 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my $mboxlist = "/var/lib/imap/mboxlist.txt";
+my $squatlist = "/var/lib/imap/squatlist.txt";
+my $tempfile = "/var/lib/imap/squatlist.tmp";
+my $stopfile = "/var/lib/imap/squat.stop";
+my $adminstopfile = "/var/lib/imap/squat.adminstop";
+my $squatlist_lines = 0;
+my $mboxlist_lines = 0;
+my $line_number = 0;
+my $rest = 0;
+my $current = "";
+my $current_box = "";
+my $first_iteration = 1;
+
+my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
+
+die "$0 administratively stopped" if -e $adminstopfile;
+
+if (-e $stopfile) {
+ unlink $stopfile or die "Couldn't unlink $stopfile\n";
+ # die "$0: STOPPING";
+}
+
+die "$0: Intervention required - temp file exists" if -e $tempfile;
+
+system ("/usr/libexec/cyrus/ctl_mboxlist -d | /bin/cut -f1 > $mboxlist");
+die "$0: Mailbox list doesn't seem OK" unless -r $mboxlist && -s $mboxlist;
+
+sub count_lines ($) {
+
+ my $count = 0;
+
+ open (TEMP, shift(@_)) or die "$!";
+ while (<TEMP>) {
+ $count++;
+ }
+ close TEMP;
+
+ return $count;
+}
+
+
+if (-e $squatlist) {
+ $squatlist_lines = count_lines($squatlist);
+ # print "SQ: $squatlist_lines\n";
+ $mboxlist_lines = count_lines($mboxlist);
+ # print "MB: $mboxlist_lines\n";
+ if ($squatlist_lines < $mboxlist_lines) {
+ system ("/bin/cat $mboxlist >> $squatlist");
+ }
+}
+else {
+ system ("/bin/cp $mboxlist $squatlist");
+}
+
+system ("/bin/cp $squatlist $tempfile");
+
+$squatlist_lines = count_lines($squatlist); # aktueller Wert!
+# print "SQ: $squatlist_lines\n";
+
+open (SQUAT, $squatlist) or die "$!";
+
+while (<SQUAT>) {
+ if (-e $stopfile) {
+ close SQUAT;
+ ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
+ printf "Ende mit $current am $mday.$mon. um %.2d:%.2d\n", $hour, $min;
+ open (CMD, "/bin/grep -n $current $squatlist|/bin/cut -d: -f1|") or die "$!";
+ $line_number = <CMD>;
+ chomp $line_number;
+ # print "Line: $line_number\n";
+ close CMD;
+ $rest = $squatlist_lines - $line_number;
+ # print "Rest: $rest\n";
+ system ("/usr/bin/tail -$rest $squatlist > $tempfile");
+ system ("/bin/mv $tempfile $squatlist");
+ unlink $stopfile or die "Couldn't unlink $stopfile";
+ exit 0;
+ }
+ chomp;
+ if ($first_iteration) {
+ printf "Beginne mit $_ am $mday.$mon. um %.2d:%.2d\n", $hour, $min;
+ $first_iteration = 0;
+ }
+ $current_box = $_;
+ $current_box =~ tr/\./\//;
+ system ("/usr/libexec/cyrus/squatter $current_box");
+ # print "Current: $current_box\n";
+ $current = $_;
+ # sleep 1;
+}
+
+close SQUAT;
+unlink $tempfile or die "Couldn't unlink $tempfile";
+unlink $squatlist or die "Couldn't unlink $squatlist";
+exit 0;
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.txt
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.txt?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.txt (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/contrib/squatrunner.txt Sat Aug 26 02:00:13 2006
@@ -1,0 +1,31 @@
+Date: Fri, 08 Nov 2002 15:46:42 +0100
+From: Sebastian Hagedorn <Hagedorn at uni-koeln.de>
+To: info-cyrus at lists.andrew.cmu.edu
+Subject: Re: Squatter streamlining patch
+
+--On Thursday, November 07, 2002 21:35:34 -0700 Mark Derbyshire
+<mark at taom.com> wrote:
+
+> while the SQUAT feature is great, it takes a few hours for squatter to
+> grind through the mailboxes.
+
+The included patch sounds interesting, but I guess I'll wait until it is
+incorporated into the standard distribution.
+
+Anyway, we have come up with a different idea regarding squatter. I am
+attaching a Perl script we are using in lieu of an entry in
+/etc/cyrus.conf. It is invoked and halted by the following crontab entry
+for the cyrus user:
+
+0 0-23/4 * * * /usr/libexec/cyrus/squatrunner.pl >>
+/var/lib/imap/squatter.log 2>&1
+0 1-23/4 * * * /bin/touch /var/lib/imap/squat.stop > /dev/null 2>&1
+
+It's been working very nicely for us, allowing us to start and stop
+squatter whenever we want without having to start at the beginning.
+
+Cheers, Sebastian Hagedorn
+--
+Sebastian Hagedorn M.A. - RZKR-R1 (Flachbau), Zi. 18, Robert-Koch-Str. 10
+Zentrum für angewandte Informatik - Universitätsweiter Service RRZK
+Universität zu Köln / Cologne University - Tel. +49-221-478-5587
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian Sat Aug 26 02:00:13 2006
@@ -1,0 +1,333 @@
+Cyrus IMAP for Debian
+$Id: README.Debian 544 2006-08-08 16:37:26Z sven $
+---------------------
+
+ "All systems administrators have their horror stories. For me, it was
+ setting up a HP Color Bubblejet under Linux using ghostscript before
+ linuxprinting.org was alive. Well that was a piece of cake compared
+ to what I am about to describe in this document."
+ -- "Hosting email for virtual domains using Postfix and Cyrus"
+ Haim Dimermanas, 2001-08-01
+
+ "I warned you to read all the documentation first, didn't I?"
+ -- Henrique M. Holschuh, 2002-10-01
+
+IMPORTANT: Cyrus is a closed-box email system. Your system will access your
+email through LMTP, IMAP and POP3 *only*. No direct file access to the email
+store is supposed to take place.
+
+For more information, please consult http://asg.web.cmu.edu/cyrus/imapd/ and
+http://asg.web.cmu.edu/twiki/bin/view/Cyrus/WebHome (Cyrus WiKi). There is
+also Cyrus-HOWTO (Cyrus-IMAP.txt) available as part of the LDP HOWTO
+collection. Upgrade hints are in UPGRADE.Debian.gz Outdated documentation
+will cause you much grief, so beware of that when hunting anywhere else than
+the Cyrus mailinglist for information.
+
+Backports of the latest packages for Debian Stable are available from
+http://www.backports.org
+
+WARNING: For one to get Cyrus IMAPd to work correctly, one must first get the
+SASL layer to work correctly. This is far from trivial, so if you don't manage
+at first, don't go around filling bugs against Cyrus IMAPd before you make damn
+sure it is not a SASL configuration error. Read the hint list later on this
+file as well. Start by reading README.Debian.simpleinstall.
+
+The Debian packaging of Cyrus has a few quirks which are important to know
+about:
+
+1. Renaming of some Cyrus IMAP utilities
+
+ The quota, reconstruct, master and deliver utilities have been renamed to
+ cyrquota, cyrreconstruct, cyrmaster and cyrdeliver, following the template
+ set by upstream with "cyradm". This was done because both Cyrus Debian
+ maintainers found the original names to be too generic and likely to cause
+ namespace collisions later.
+
+ Since documentation may refer to these utilities using their original
+ name, you must be aware of this fact. Also, installsieve is deprecated
+ and not included in the Debian package; use sieveshell instead.
+
+2. Relocation of many Cyrus IMAP files
+
+ The default Cyrus install scatters files all over the place. The Debian
+ package installs only a few files in /usr/bin (cyradm, sieveshell).
+ IMAP/email administrator utilities are installed in /usr/sbin (such as
+ cyrreconstruct). Programs that must be run by cyrmaster are installed in
+ /usr/lib/cyrus (such as imapd and pop3d). Sockets go into
+ /var/run/cyrus/socket, per FHS 2.2. Sieve files go in /var/spool/sieve, but
+ an /etc/sieve compatibility symlink is also installed just in case.
+
+ The imapd.conf and cyrus.conf configuration files are in /etc. The PAM
+ policy files are in /etc/pam.d.
+
+ Feel free to use dpkg-statoverride to change the permission of
+ /var/run/cyrus/socket, the cyrus packages will not override your
+ configuration if dpkg-statoverride is used. In fact, you will most likely
+ have to do so for postfix to deliver to Cyrus, for example.
+
+3. Cyrus Murder, the Cyrus IMAPd/POP3 aggregator is available.
+
+ However, you will have to configure it yourself. No pre-packaged
+ configuration of Murder is available at this time... The documentation is
+ all there, and the Cyrus packages will happily preserve your Cyrus Murder
+ configuration. You do not have to install the cyrus-imapd-2.3 or
+ cyrus-pop3d-2.3 packages in hosts that only need the proxy daemons running,
+ but do note that the /etc/pam.d/imap and /etc/pam.d/pop files are in those
+ packages (and they are needed by the proxies), so you will have to create
+ the files manually.
+
+ One important note: MUPDATE doesn't support TLS, so you won't be able to
+ use plaintext authentication methods. The easiest thing to do is to put
+ an entry for your mupdate user in sasldb2 and use DIGEST-MD5.
+
+4. Configurable idled support.
+
+ Cyrus IMAPd supports three options of using IDLE in IMAP sessions. The first
+ option is not to support IDLE at all. The second is to use internal polling
+ in the IMAP daemon. The third option is to use an external daemon, idled.
+ Upstream only supports configuration of this during compilation, Debian
+ however includes a patch which makes this runtime-configurable. Please
+ set the 'idlemethod' imapd.conf option according to your needs and enable
+ idled in cyrus.conf if you want to use it.
+
+General notes and hints:
+------------------------
+
+ o *** ALWAYS READ /usr/share/doc/cyrus-common-2.3/NEWS.Debian *** after
+ you upgrade the package. This, and every other NEWS.Debian can automatically
+ be shown to you before the upgrade, see the apt-listchanges package for more
+ information.
+
+ o QUOTAS ARE LIMITIED TO 2GB on some platforms.
+ Be careful to not set quotas over that ammount if your platform doesn't
+ support the C datatype "long long". Things will break in very bad ways.
+ Yes, it is a big glitch, and no, there are no easy workarounds.
+ see https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=1212
+ This has been fixed for the upcoming Cyrus 2.3.
+
+ o Either turn off logging of the DEBUG level, or don't complain about cyrus
+ verbosity on the logs. Don't ever ask in the mailing lists about messages
+ logged in the DEBUG level before reading the source code.
+
+ o Watch out for your /dev/random bitbucket! SASL may use it, and if it
+ empties, it will hang the processes wrapped up by SASL. This means
+ just about every Cyrus service (lmtp, imap, pop3, sieve)... Disable
+ APOP in /etc/imapd.conf if you don't need it, as it is a serious draw
+ on randomness resources.
+
+ o One extremely important point to notice is that saslauthd works ONLY
+ with plaintext. APOP, CRAM-MD5, OTP, DIGEST-MD5 and any other "auxprop"
+ SASL mech will *not* work through saslauthd. This can and will cause
+ serious issues in Cyrus murder environments.
+
+ o When using ext3, Cyrus really wants data=journal. However, up to
+ kernel 2.4.20 there are dangerous bugs in that option, so you're better
+ off not using that. xfs is faster and better for Cyrus, anyway.
+ Please note that sarge was shipped with 2.4.27, and etch will not ship
+ any 2.4 kernels anymore."
+
+ 2.4 kernels are NOT shipped with Debian Etch.
+
+ o nscd users: nscd is highly incompatible with ldap, and somewhat buggy
+ otherwise. If you use nscd and Cyrus segfaults on you, try restarting
+ nscd, or disabling it.
+
+ o "The Debian libldap2 and cyrus-imapd packages are both compiled using the
+ SASL library. If you use cyrus-imapd together with libnss-ldap, or
+ saslauthd together with libpam-ldap, the resulting double calls to SASL
+ library functions can trigger a double-free bug which may cause the calling
+ process to crash. To avoid such a crash, you must recompile the libldap2
+ package --without-cyrus-sasl." -- http://bugs.debian.org/145766 [!@#$%!!!
+ I didn't expect SASL 2.1 to still have this annoying problem]
+
+ o The lmtp service (allocated in Debian Woody to port 2003, and non-existent
+ on Debian Sarge and Etch) is non-standard. It has no port officially
+ allocated anywhere; it is usually run bound to the localhost interface,
+ unless one needs it for clustering and high-availability scenarios. If you
+ need it elsewhere, by all means move it -- you only need to edit
+ /etc/services, or change the port for the lmtp service in /etc/cyrus.conf.
+
+ o The lmtp service will only allow Cyrus lmtp administrators to authenticate.
+ Set them in /etc/imapd.conf.
+
+ o Cyrus can now use two different namespaces (the standard one, where all
+ subfolders are children of INBOX, and one where they are all in the same
+ hierarchical level).
+
+ See /usr/share/doc/cyrus-doc-2.3/html/altnamespace.html for details. If
+ you deal with a large population of winboze users, this option can save
+ you some headaches.
+
+ o One can also chose between netnews-style notation for folders
+ (INBOX.subfolder), where the "." character is reserved to separate folders;
+ or UNIX-style notation (INBOX/subfolder), where dots are allowed in names,
+ and the slash separate folders (the "^" character is reserved in this
+ mode).
+
+ See /usr/share/doc/cyrus-common-2.3/html/altnamespace.html for details.
+
+ o When using SASL, do keep in mind that cyrus runs under user cyrus, and not
+ root. It cannot read shadow files (unless you add the user cyrus to group
+ shadow), or perform any root-only operations directly. You need to use the
+ saslauthd (or, if available, auxpropd) mechanism to authenticate against
+ root-only data. And that also means user cyrus must be able to talk to the
+ unix socket saslauthd uses (which is controlled by SASL, not Cyrus IMAPd).
+
+ o Any of the SASL configure options can be inserted in imapd.conf, just
+ prefix it with "sasl_" (e.g.: sasl_mech_list: PLAIN). The list of SASL
+ options is in /usr/share/doc/libsasl2/options.html.
+
+ o The services are tcp-wrapped. Their hosts.allow/hosts.deny id is the
+ service name in /etc/cyrus.conf. See hosts_access(5).
+
+ o The PAM service names for use with SASL (via saslauthd) are:
+ "imap", "sieve", "lmtp", "pop", "mupdate".
+
+ o You need to specify your admin users in /etc/imapd.conf before you can
+ add mailboxes, or deliver through authenticated lmtp. Do NOT use root.
+ We suggest user cyrus, which is already used by the system for all
+ things Cyrus IMAPd... but it need not be an existing user. As long as
+ SASL will authenticate against it, it will work.
+
+ o Do NOT read your admin user's email via IMAP (see the FAQ for details).
+
+ o Don't export your mail store over NFS or AFS (read the FAQ for more info).
+ You have been warned. You really want a journaled (as in journaling for the
+ metadata), local filesystem for the store. Failing that, you need
+ something with very strict and correct lock semantics, and full mmap
+ support.
+
+ o Ext2 is slow on very large directories (right now), and sync metadata
+ writes enabled are a huge performance hit. If you need high IO throughput
+ from Cyrus, you will need to use ext3, reiserfs, xfs or something similar.
+
+ o You may want to enable/disable synchronous metadata writes to your mail
+ store dirs (check /usr/share/doc/cyrus-doc-2.3/html/install.html for more
+ info, in package cyrus-docs-2.3). The cyrus-makedirs script tries to do the
+ right thing for ext2 and ext3 filesystems. Failure to correctly update the
+ metadata in the right order can completely screw up your Cyrus store on a
+ power-loss or another disk failure.
+
+ o Try mounting the store and cyrus database filesystems with noatime for
+ performance gains. Load-balance the store using multiple partitions on
+ different physical devices for even better performance gains.
+
+ o Cyrus IMAPd should be fed mail through LMTP. If at all possible, use
+ the Unix socket for that -- it automatically authenticates as user
+ postman and that will help wonders. cyrdeliver can also be used to
+ inject mail, but it will simply open an LMTP socket to cyrus and
+ deliver through that -- this is much slower than using LMTP directly.
+ The UNIX socket is in /var/run/cyrus/socket/lmtp. Use dpkg-statoverride
+ if you need to change the permissions of the socket directory.
+
+ o You can use /usr/sbin/cyrus-makedirs to generate the needed directories
+ for cyrus partitions. It is run automatically by the package postinst,
+ and it knows to parse the /etc/imapd.conf file to verify if hash
+ subdirectories are needed or not. It cannot detect what kind of hashing
+ should be used yet. If you recompile the package with full hashing,
+ change it.
+
+ o Refer to cyrus-utils.sourceforge.net and the info-cyrus mailinglist
+ for mailbox/imap to cyrus conversion scripts.
+
+ o If you don't have pop3 or something else enabled by default in cyrus.conf,
+ installed, disable it. Otherwise, Cyrus master will log warnings that the
+ service could not be started.
+
+ o If you want to run something that is not in /usr/lib/cyrus/bin in
+ cyrus.conf, just use the full path in cyrus.conf (e.g.:
+ cmd="/usr/sbin/squatter").
+
+ o Sieveshell is really lacking on auth capabilities, and timsieved is quite
+ strict on what auth capabilities it offers. So, pay attention to
+ sasl_minimum_layer, and see bug #151925 for more details
+ (http://bugs.debian.org/151925). Also, make sure you have the correct set
+ of SASL2 modules installed in in your system.
+
+ o uw-mailutils has some nice utilities to migrate mail stores from/to imap
+ servers. You might find it quite useful to migrate a site to Cyrus.
+
+Known bugs
+----------
+
+ Please see
+http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=src&data=cyrus-imapd-2.3&
+archive=no&version=
+ for a list of any known bugs.
+
+
+SNMP logging
+------------
+
+cyrmaster is an agentx SNMP subagent, and it can interface to a agentx SNMP
+master. It will export data at OID .1.3.6.1.4.1.3.6.1 (cyrusMasterMIB).
+
+The ucd-snmp daemon (package snmpd) is NOT configured to work
+as agentx master agent by default -- you have to do that manually,
+by adding "master agentx" to the /etc/snmp/snmpd.conf file.
+
+cyrmaster will register with the snmp agentx master when it is started,
+so if the snmp master is restarted after cyrmaster, it will not forward
+the snmp requests to cyrmaster anymore. Check your system for any cron
+scripts that might be restarting the snmp process if that happens.
+
+See /usr/share/snmp/mib/CYRUS-MASTER-MIB.txt for more details.
+
+
+Backing up for rainy days
+------------------------
+
+Cyrus automatically checkpoints and backups some of its databases, using the
+ctl_cyrusdb(8) utility (EVENTS in /etc/cyrus.conf). It is supposed to be also
+capable of recovering automatically from these backups, and to attempt to do so
+at startup. However, ctl_cyrusdb -r is NOT FULLY IMPLEMENTED YET... you are on
+your own to recover from corrupt databases.
+
+This recovery can be done using the db3 utilities, and even by smart usage of
+cvt_cyrusdb(8) and ctl_mboxlist(8). The automatic backups are useful, too,
+even if they are not restored automatically.
+
+The database backups are stored at /var/lib/cyrus/db.backup*, you may want to
+copy the files there to backup media in a cronjob, or something like that. You
+can kill the TLS cache database, as long as Cyrus is stopped when you do it.
+Loss of the delivery database is not very bad, it just means some users might
+get duplicated messages.
+
+Cyrus does NOT backup the mail store automatically. To backup the mail store
+partitions, you must stop Cyrus and dump the entire partition to your backup
+media. The MH-like structure of the Cyrus store do make them suitable for
+incremental backups. Hot-backups of the store can be made, but you risk losing
+some non-critical metadata when the restore is done.
+
+You can backup all Cyrus non-text databases to a flat text file format using the
+cvt_cyrusdb utility (and recover back from the flat text file format), but you
+should stop Cyrus first.
+
+If you ever need to recover the mail store from backup, you should run
+cyrreconstruct(8) to rebuild the mailbox indexes.
+
+A daily maintenance cronjob uses ctl_mboxlist(8) to dump the mailboxes database
+to /var/backup. That backup copy can be used as a last-resort copy if the hot
+backups become corrupted somehow.
+
+
+Debian source package quirks
+----------------------------
+
+Patching is done using dpatch. Patches from upstream CVS are marked as such.
+
+
+THANKS
+------
+
+Thanks go to the CMU crew for producing Cyrus IMAPd in the first place;
+Michael-John Turner <mj at debian.org> for maintaining the v1.5 branch and setting
+the groundstones for the v2.1 package; David Parker <david at neongoat.com> and
+David D. Kilzer <ddkilzer at theracingworld.com> for their huge help in getting
+the v2.1 packages out-of-the-door, and the upgrade from v1.5 guide; Fabian
+Fagerholm <fabbe at paniq.net> for stress testing the daemons, and useful
+feedback; Gilles Bouthenot <gilles.bouthenot at fcomte.iufm.fr> for good
+feedback; and Henrique de Moraes Holschuh for maintaining the 2.1 branch.
+
+ -- The Debian Cyrus Team <pkg-cyrus-imapd-debian-devel at lists.alioth.debian.org>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.database
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.database?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.database (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.database Sat Aug 26 02:00:13 2006
@@ -1,0 +1,132 @@
+Cyrus IMAP for Debian: Database backend conversion
+$Id: README.Debian.database 521 2006-07-29 03:39:05Z astronut $
+--------------------------------------------------
+
+ "All systems administrators have their horror stories. For me, it was
+ setting up a HP Color Bubblejet under Linux using ghostscript before
+ linuxprinting.org was alive. Well that was a piece of cake compared
+ to what I am about to describe in this document."
+ -- "Hosting email for virtual domains using Postfix and Cyrus"
+ Haim Dimermanas, 2001-08-01
+
+ "I warned you to read all the documentation first, didn't I?"
+ -- Henrique M. Holschuh, 2002-10-01
+
+For more information, please consult http://asg.web.cmu.edu/cyrus/imapd/.
+There is also Cyrus-HOWTO (Cyrus-IMAP.txt) available as part of the LDP HOWTO
+collection. Upgrade hints are in UPGRADE.Debian. Outdated documentation will
+cause you much grief, so beware of that when hunting anywhere else than the
+Cyrus mailinglist for information.
+
+
+Database backends
+-----------------
+
+Cyrus can be compiled to use different types of database backends for each of
+its databases. The package will warn you if you try to start Cyrus and the
+database backends seem to have changed since the last active version.
+
+After converting all the mail stores and /var/lib/cyrus to use the proper
+database backends using cvt_cyrusdb(8), remove
+/usr/lib/cyrus/cyrus-db-types.active and run "dpkg-reconfigure cyrus-common-2.3"
+once to reset the error trigger, and start cyrmaster.
+
+If cvt-cyrusdb locks up just at the beginning of the conversion, your databases
+might be locked. Unlock them (i.e. REALLY stop Cyrus if it is still running,
+use the db* utilities (from the older Berkeley DB version) to clean any stray
+locks, or try a reboot).
+
+IMPORTANT: If you changed the type of any of the databases through imapd.conf,
+ cyrus-db-types.txt isn't updated to match those. Be sure to cross-check
+ imapd.conf if you did that.
+
+
+Step-by-step conversion guide:
+
+1. Stop the Cyrus system
+ /etc/init.d/cyrus2.3 stop
+
+2. Find out which databases to convert:
+ diff -u /usr/lib/cyrus/cyrus-db-types.active \
+ /usr/lib/cyrus/cyrus-db-types.txt
+
+ The databases are these in the default install:
+ DUPLICATE /var/lib/cyrus/deliver.db
+ MBOX /var/lib/cyrus/mailboxes.db
+ TLS /var/lib/cyrus/tls_sessions.db
+
+ Don't bother upgrading the TLS database, just delete it: the information
+ there is not reused when you stop Cyrus.
+
+ If the BerkeleyDB version is what was changed, you need to use the
+ Berkeley DB upgrade utility in all db* databases. See the manpages for
+ db*_upgrade. Note that you need to use the db*_upgrade utility with the
+ same version as given on the DBENGINE line of cyrus-db-types.txt.
+ You should look for lines with 'berkeley' or 'berkeley_nosync' on
+ the right side. You can safely ignore lines with 'flat', 'skiplist' or
+ 'quotalegacy'.
+
+ The SUBS and SEEN databases are different: there are many of them (one
+ for every mail folder of every user for SEEN; one for every user for
+ SUBS) and you need to convert every single one of them.
+
+ SUBS /var/lib/cyrus/...../*.subs
+ SEEN /var/lib/cyrus/...../*.seen
+
+ SUBS contains the subscribed folders, and SEEN contains the seen state
+ of every mail in a folder.
+
+ Types db3_nosync and db3 are the same for database conversion matters.
+
+2.1 Converting from DB* to SKIPLIST
+
+ As user cyrus, do the following:
+
+ cd /
+ /usr/sbin/cvt_cyrusdb <fullpath to database> db3 \
+ /var/lib/cyrus/temp.db flat
+ rm -f <fullpath to database>
+ /usr/sbin/cvt_cyrusdb /var/lib/cyrus/temp.db flat \
+ <fullpath to database> skiplist
+ chown cyrus:mail <fullpath to database>
+ rm -f /var/lib/cyrus/temp.db
+
+2.2 Converting from FLAT to SKIPLIST
+
+ As user cyrus, do the following:
+
+ cd /
+ mv <fullpath to database> <fullpath to database>.old
+ /usr/sbin/cvt_cyrusdb <fullpath to database>.old flat \
+ <fullpath to database> skiplist
+ chown cyrus:mail <fullpath to database>
+ rm -f <fullpath to database>.old
+
+2.3 SUBS and SEEN databases
+
+ I suggest using a small shell script and using "find" to mass-convert
+ the SEEN databases:
+ find /var/lib/cyrus -type f -name '*.seen' -exec myshellscript {} \;
+
+ The "find" command above gives you the name of the database as "$1"
+ inside your shell script.
+
+3. Reset the database backend change system
+ rm /usr/lib/cyrus/cyrus-db-types.active
+ dpkg-reconfigure cyrus-common-2.3
+
+4. Start Cyrus, if not started by step 3
+ /etc/init.d/cyrus2.3 start
+
+WHY THERE IS NO AUTOMATED UPGRADE SCRIPT: Because I dislike people who do not
+read docs, and one Debian user asked me exactly the wrong thing (about
+cyrus21-imapd) while I was in the middle of writing said script AND I am quite
+short on time lately: it is much faster to write a doc than to write and test
+the script. So, now everyone will need to read the docs to get Cyrus working
+again. I am not holding back the skiplist change for that script anymore.
+
+Maybe someday I will finish the upgrade script. Maybe someone else will write
+one (I will certainly include it in the package, if it is good enough). Don't
+hold your breath, though.
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.debug
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.debug?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.debug (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.debug Sat Aug 26 02:00:13 2006
@@ -1,0 +1,122 @@
+Cyrus IMAP for Debian, debugging procedures
+$Id: README.Debian.debug 521 2006-07-29 03:39:05Z astronut $
+-------------------------------------------
+
+For more information, please consult http://asg.web.cmu.edu/cyrus/imapd/.
+
+Cyrus has various levels of debugging aid, which can and should be used to
+offer more information about any problems you are facing with Cyrus.
+
+First, edit /etc/default/cyrus2.3, and set CYRUS_VERBOSE to a number higher
+than zero. The higher the number, more debug information is provided. Numbers
+above 30 will cause Cyrus services to pause for 15s before executing (so that
+you can do something to it, such as attach strace or a debugger to the
+process).
+
+You can, and should use strace and ltrace to gather more information about what
+was happening to Cyrus when it malfunctioned. straces are useful when
+networking or signal problems appear to be the issue, and ltraces can give
+hints on what the problem might be.
+
+If a Cyrus service is crashing and cyrmaster logs that the service is being
+killed by a signal, please use the debugging hooks to provide a back-trace
+using gdb (see below). Back-traces are extremely useful when locating where
+Cyrus is dying, and why.
+
+Debugging information is sent to syslogd, using the DEBUG priority, facilities
+MAIL and DAEMON.
+
+You can also try to set MALLOC_CHECK_=2 in the environment, so that malloc()
+will cause Cyrus to dump core if it detects any sort of corruption.
+
+
+Telemetry logs
+--------------
+
+Cyrus will happily log all communications between the Cyrus store closed-box and
+the outside world. These logs are sometimes vital to understand exactly what
+is happening and to reproduce bugs.
+
+To enable telemetry logging, create a directory under /var/lib/cyrus/log with
+the same name as the username for which you want the communication sessions to
+be logged. Cyrus will log all imap, pop3, sieve and lmtp talks authenticated
+as that user (including proxied connections). Make sure the directory is owned
+by user cyrus.
+
+IMPORTANT:
+Watch out for sensitive information such as passwords when you submit the
+telemetry logs to a public bug-tracking system or mailinglist.
+
+
+Recompiling Cyrus with debugging information
+--------------------------------------------
+
+In order to produce useful back-traces, or to interactively debug Cyrus,
+you must rebuild the package with debugging information. It is quite
+easy to do so:
+
+1. Install all source dependencies to build the package (needs root):
+ apt-get install build-essential fakeroot
+ apt-get build-dep cyrus-imapd-2.3
+
+2. Download and rebuild Cyrus with debug information:
+ apt-get source cyrus-imapd-2.3
+ cd cyrus-imapd-2.3*
+ DEB_BUILD_OPTIONS=debug,noopt,nostrip dpkg-buildpackage -uc -us -rfakeroot
+
+3. Install the Cyrus packages with debug information (needs root):
+ cd ..
+ dpkg -i *deb (or something like that)
+
+Now Cyrus should be working fine, using binaries with full debug information
+for gdb. For interactive debugging, you may want to make sure there are no
+optimizations, in which case you should use "DEB_BUILD_OPTIONS=noopt,nostrip
+dpkg-buildpackage -uc -us -rfakeroot".
+
+Warning: the next time a new version of cyrus is released, apt will download
+the non-debugging version of the Cyrus debs, and install them over the debugging
+packages.
+
+To install the non-debugging, optimized version of Cyrus over the debugging
+one, issue "apt-get --reinstall install (package)" commands for all the Cyrus
+packages you want replaced.
+
+
+Attaching debuggers to Cyrus, and getting traces
+------------------------------------------------
+
+You can tell Cyrus services to run a debugging command just before they
+start doing real work. This can be used to run strace, ltrace and gdb
+or ddd (for interactive debugging and back-tracing) quite easily.
+
+Set the shell command to be run in /etc/imapd.conf, option debug_command.
+Then, add the command line switch "-D" to the Cyrus services you want to
+run the debug_command in /etc/cyrus.conf, and restart cyrmaster using
+/etc/init.d/cyrus2.3 restart.
+
+The debugging command must be given as a single line in the configuration file.
+
+To get a back-trace using gdb:
+debug_command: /usr/bin/gdb -batch -cd=/tmp -x /usr/lib/cyrus/getbacktrace.gdb /usr/lib/cyrus/bin/%s %d >/tmp/gdb-backtrace.cyrus.%1$s.%2$d <&- 2>&1 &
+
+The above will produce a back-trace of every service run with -D that segfaults
+in the files /tmp/gdb-backtrace.cyrus.*; /usr/lib/cyrus/getbacktrace.gdb
+simply has the sequence of commands for gdb: c (to continue running the
+service), bt (to get the back-trace if the program didn't exit normally), quit
+(to quit gdb).
+
+For strace, you can use:
+debug_command: /usr/bin/strace -tt -o /tmp/strace.cyrus.%s.%d -p %2$d <&- 2>&1 &
+
+Which will produce straces in /tmp/strace.cyrus.*
+
+For ltrace, you can use:
+debug_command: /usr/bin/ltrace -tt -n 2 -o /tmp/ltrace.cyrus.%s.%d -p %2$d <&- 2>&1 &
+
+Which will produce ltraces in /tmp/ltrace.cyrus.*
+
+Be warned that sensitive information such as passwords may be disclosed in the
+strace and ltrace output, so mangle them before sending such traces to public
+bug-tracking systems or mailing lists.
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.simpleinstall
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.simpleinstall?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.simpleinstall (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.Debian.simpleinstall Sat Aug 26 02:00:13 2006
@@ -1,0 +1,173 @@
+Cyrus IMAP for Debian, Simple Install Guide
+$Id: README.Debian.simpleinstall 229 2005-12-08 23:26:29Z astronut $
+-------------------------------------------
+
+ "All systems administrators have their horror stories. For me, it was
+ setting up a HP Color Bubblejet under Linux using ghostscript before
+ linuxprinting.org was alive. Well that was a piece of cake compared
+ to what I am about to describe in this document."
+ -- "Hosting email for virtual domains using Postfix and Cyrus"
+ Haim Dimermanas, 2001-08-01
+
+ "I warned you to read all the documentation first, didn't I?"
+ -- Henrique M. Holschuh, 2002-10-01
+
+
+This document describes how to get Cyrus running with a simple configuration
+that you can then tweak to your real needs.
+
+READ README.Debian AS WELL. I MEAN IT! Cyrus is easy, all the trouble is
+in SASL, and even that becomes easy after you understand how SASL works.
+
+IMPORTANT: Cyrus is a closed-box email system. Your system will access your
+email through LMTP, IMAP and POP3 *only*. No direct file access to the email
+store is supposed to take place.
+
+
+To setup Cyrus so that you can administer it (i.e. create users),
+and get email inside it for those users:
+
+ 1. Make sure libsasl2-modules, libsasl2 and sasl2-bin are installed
+
+ 2. Make sure /etc/sasldb2 is readable by group sasl. Pay attention
+ to overrides (dpkg-statoverride)!
+
+ 3. Make sure user cyrus belongs to group sasl (cyrus-common-2.3's install
+ tries to do this automatically for you).
+
+ 4. Edit /etc/cyrus.conf, and make sure the services you need are
+ enabled. These are most probably "imap", "pop3", "lmtpunix".
+
+ 5. Edit /etc/imapd.conf, and make sure you have some admin users
+ listed in the entry "admins:". I suggest using "cyrus" as your
+ admin.
+
+ I also suggest enabling plain text logins, and setting
+ sasl_minimum_layer: 0
+
+ If you have unixhierarchysep enabled in imapd.conf, change all
+ "." in mailbox names mentioned on this document to "/", since Cyrus
+ will use "/" as the hierarchy separator instead of the default ".".
+ I suggest you just leave unixhierarchysep set to false for now.
+
+ 6. Restart Cyrus (/etc/init.d/cyrus2.3 restart)
+
+ 7. Use saslpasswd2 -c to create an account for your admin:
+ saslpasswd2 -c cyrus
+
+ 8. Use sasldblistusers2 to make sure step 7 worked fine.
+
+ 9. Add other users to SASL likewise (saslpasswd2 -c).
+
+10. Log in cyrus as the administrator, and create the mailboxes:
+ cyradm --user cyrus localhost
+ cm user.bob
+ cm user.anna
+ cm user.clark...
+ ^D
+
+ (notice that there is an "user." in front of the mailbox name!)
+ You must use "user/bob", "user/anna" instead if you have the
+ unixhierarchysep option enabled in imapd.conf.
+
+ For this to work, you obviously need the cyrus-admin-2.3 package
+ installed.
+
+11. Try to login as a normal user, using imtest or a IMAP/POP3 client.
+ If you have trouble with mutt and CRAM-MD5 or DIGEST-MD5, edit
+ /etc/imapd.conf, and look for sasl_mech_list. Set it to:
+ sasl_mech_list: plain cram-md5
+ (this will disable digest-md5, which causes trouble with mutt).
+
+12. Setup your MTA to deliver email inside Cyrus. Basically that can
+ be done (easily) by:
+
+ a) running /usr/sbin/cyrdeliver (SLOW)
+ You need the lmtpunix service enabled in /etc/cyrus.conf for this
+ to work.
+ b) delivering using LMTP to /var/run/cyrus/socket/lmtp
+ You need the lmtpunix service enabled in /etc/cyrus.conf for this
+ to work.
+
+ Just make sure (and use dpkg-statoverride to do that) that your
+ MTA can get to /var/run/cyrus/socket/lmtp. It works just like any
+ file in a Unix system.
+
+ Cyrus REQUIRES a valid RFC2822 message, and will refuse messages with
+ bad headers (such as that From foobar header, notice the missing ':'),
+ embedded NULLs or any other crap.
+
+
+That's it. See /usr/share/doc/cyrus-common-2.3/README.{postfix,exim,sendmail}
+for help on how to setup your MTA to correctly deliver to Cyrus.
+
+
+LDAP SETUP
+----------
+
+First, do the steps above and verify that your system is working fine.
+
+SASL is perfectly capable of trying various authentication methods one after
+another. We will change our Cyrus setup for SASL to use a LDAP server lookup
+through saslauthd.
+
+1. Create the configuration for saslauthd to know what it must do:
+
+ Write the following file to /etc/saslauthd.conf:
+----CUTHERE----
+ldap_servers: ldap://127.0.0.1/
+ldap_version: 3
+ldap_timeout: 10
+ldap_time_limit: 10
+ldap_cache_ttl: 30
+ldap_cache_mem: 32768
+ldap_scope: sub
+ldap_search_base: ou=mail,o=mydomain
+ldap_auth_method: bind
+ldap_filter: maildrop=%u
+----CUTHERE----
+ And of course, edit it to fit your LDAP setup.
+
+2. Now, configure saslauthd to use LDAP mode and our config file:
+
+ Modify /etc/default/saslauthd so that it reads:
+ MECHANISMS="ldap"
+ PARAMS="-O /etc/saslauthd.conf"
+
+ (MECHANISMS can be a space-separated list of authentication
+ mechanisms. If you wanted saslauthd to try LDAP, then PAM, you
+ could use MECHANISMS="ldap pam")
+
+3. Start saslauthd
+
+ /etc/init.d/saslauthd restart
+
+4. Make sure Cyrus will be able to talk to saslauthd
+
+ Set the following options in /etc/imapd.conf:
+ sasl_mech_list: PLAIN
+ allowapop: no
+ allowplaintext: yes
+ sasl_minimum_layer: 0
+ sasl_pwcheck_method: saslauthd
+
+ And restart Cyrus. You'd better understand that the above allows
+ plaintext logins over the network. There is a LDAP SASL auxprop
+ plugin being worked on that might fix this issue. As it stands
+ right now, you're better off by only accepting IMAPS (secure IMAP)
+ connections.
+
+ (sasl_pwcheck_method is a space separated list of SASL methods to
+ try. If you want to have some local users in /etc/sasldb2, for
+ example, you could have "sasl_pwcheck_method: auxprop saslauthd"
+ and also "sasl_auxprop_plugin: sasldb")
+
+ One *extremely* important point to notice is that saslauthd works
+ ONLY with plaintext. APOP, CRAM-MD5, OTP, DIGEST-MD5 and any other
+ "auxprop" SASL mech will *not* work through saslauthd.
+
+5. That's it. There is a LDAP auxprop module in the works which can deal
+ with APOP, CRAM-MD5, OTP, DIGEST-MD5 and so on, look for it in the SASL
+ docs and openldap's contrib stuff.
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.exim
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.exim?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.exim (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.exim Sat Aug 26 02:00:13 2006
@@ -1,0 +1,66 @@
+Setting up Cyrus IMAPd for Exim
+$Id: README.exim 5 2005-03-12 23:19:45Z sven $
+===========================================================
+
+This is very incomplete information, if you are an exim user, please send
+in a more complete document.
+
+
+General configuration hints (configuration examples assume you are using
+the Debian Exim4 configuration scheme and paths are relative to
+/etc/exim4):
+
+1. Use Exim version 4. Exim version 3 just doesn't cut it in the lmtp
+ area, which is very important for performance when dealing with Cyrus
+ IMAPd.
+
+2. Use the LMTP transport to deliver using a unix socket (fastest), or
+ the SMTP transport in LMTP mode to deliver over a TCP/IP socket.
+
+ For local delivery over a unix socket, add a file into conf.d/transports
+ with the following:
+
+ cyrus_delivery:
+ driver = lmtp
+ socket = /var/run/cyrus/socket/lmtp
+ batch_max = 20
+ user = mail
+
+ (set batch_max to whatever is best for your setup, and make sure you
+ allow enough Cyrus lmtp processes to serve that many lmtp connections)
+
+ If that doesn't work, I suggest you create a group for lmtp delivery,
+ add whichever user exim is running as to it, and use dpkg-statoverride
+ to make /var/run/cyrus/socket/lmtp writeable by that group.
+
+ To then deliver to Cyrus, you will need to comment check_local_user in
+ conf.d/router/900_exim4-config_local_user, and change the LOCAL_DELIVERY
+ macro in conf.d/main/01_exim4-config_listmacrosdefs to
+ LOCAL_DELIVERY=cyrus_delivery.
+
+ If you still want to deliver some messages to a mail spool then create
+ conf.d/router/899_exim4-config_copy_to_mbox and put this in it, changing
+ the local_parts as necessary:
+
+ copy_to_mbox:
+ debug_print = "R: copy_to_mbox for $local_part@$domain"
+ driver = accept
+ unseen
+ local_parts = postmaster
+ transport = mail_spool
+
+ This will deliver postmaster mail to both cyrus and
+ /var/mail/postmaster. You can comment the unseen option to have it only
+ deliver once to the mail_spool. If you don't set check_local_user or
+ the user option the spool files will be owned by mail.
+
+3. Kill any NULs (ASCII 0x00) inside the message, if you don't want Cyrus
+ to bounce such malformed crap. Calling "tr -d '\000'" as a filter might
+ do the trick.
+
+4. Sieve often needs to set -f option on /usr/sbin/sendmail when doing
+ redirects. Exim allows only trusted_users to do this. It is recommended
+ that you make sure "cyrus" is in the list of trusted_users in
+ conf.d/main/02_exim4-config_options:
+ trusted_users = uucp:cyrus
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.postfix
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.postfix?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.postfix (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.postfix Sat Aug 26 02:00:13 2006
@@ -1,0 +1,147 @@
+Setting up Cyrus IMAPd for Postfix (Debian)
+$Id: README.postfix 521 2006-07-29 03:39:05Z astronut $
+===========================================================
+
+Cyrus works wonderfully well with Postfix, both in single-system stores (where
+Postfix runs in the same host as Cyrus IMAPd), and remote mail stores (where
+Cyrus IMAPd is in a different host than Postfix).
+
+Delivery to Cyrus should _always_ be done through direct LMTP from Postfix. It
+is far simpler and faster to do such delivery using Unix sockets, but Unix
+sockets are only an option for single-system stores. Cyrdeliver is just a
+stdio-to-LMTP proxy, and it slows down mail delivery greatly.
+
+Cyrus requires LMTP deliveries to be authenticated. It assumes that any
+deliveries done through an Unix socket are trustable, and pre-authenticates
+them as if coming from the "postman" (fictitious) user (but you _can_
+re-authenticate them as another lmtp admin user, if you wish).
+
+Deliveries done through TCP sockets are not limited to the same host, unlike
+the Unix socket ones, and can therefore be used in remote mail stores.
+However, Cyrus requires that the LMTP session be authenticated using one of the
+SASL mechs available to Cyrus (you can switch this off by giving a "-a"
+parameter to lmtpd in cyrus.conf, but that is unsafe since anyone can bypass
+any user authentication controls you might have on mail delivery, that way).
+
+TCP-socket LMTP sessions should be authenticated as one of the Cyrus LMTP
+admins, normal Cyrus users are not enough. This requires Postfix with SASL
+support.
+
+
+Setting up Postfix for LMTP delivery to Cyrus
+=============================================
+
+Just set up a transport (either using a transport map, or the default_transport
+configuration directive of Postfix). Do not use cyrdeliver.
+
+I suggest that the lmtp transport be duplicated and renamed to cyrus if you
+use it to talk to anything else (such as amavisd-new, or amavis-ng). That
+way, LMTP connection caching to the Cyrus store gets optimized, and you can
+use the lmtp-named LMTP transport for something else.
+
+WARNING: Postfix 2.0 does not downcase the recipient in LMTP deliveries, so if
+your users require it, you will have to set lmtp_downcase_rcpt: yes in
+imapd.conf.
+
+
+Unix sockets:
+-------------
+
+For Unix sockets, the Postfix transport is specified as
+"lmtp:unix:/var/run/cyrus/socket/lmtp", (we are using the default Cyrus unix
+socket location as an example, you can change it in /etc/cyrus.conf and
+/etc/imapd.conf).
+
+You need a Cyrus lmtpd service listening on that socket, of course, so make
+sure something like:
+
+lmtpunix cmd="lmtpd" listen="/var/run/cyrus/socket/lmtp"
+
+is in the SERVICES section of the /etc/cyrus.conf file. You also need to make
+sure both Cyrus and Postfix can talk through that socket. Unix sockets work
+just like files, so that translates to making sure both the user "cyrus" and
+the user Postfix is using for LMTP delivery can both read and write to that
+file.
+
+WARNING: Since Cyrus pre-auths anything coming through the Unix socket, anyone
+who can write to it will be able to inject email into Cyrus directly.
+
+Use dpkg-statoverride to make sure your configuration for the socket
+permissions will not be overwritten by the Cyrus packages. Do remember that
+Postfix usually runs the LMTP transport as user "postfix" (configurable in
+/etc/postfix/master.cf). Also, do not run the postfix lmtp transport chrooted
+if the socket is not inside the chroot.
+
+1. Create a lmtp group:
+ # addgroup lmtp
+
+2. Put user postfix in that group:
+ # adduser postfix lmtp
+
+3. Fix the socket directory permissions:
+ # dpkg-statoverride --force --update --add \
+ cyrus lmtp 750 /var/run/cyrus/socket
+
+4. Restart Postfix and Cyrus IMAPd
+ # /etc/init.d/postfix restart
+ # /etc/init.d/cyrus2.3 restart
+
+
+TCP sockets:
+------------
+
+TCP sockets are easier on the Cyrus side, and more complicated on the Postfix
+side. For Cyrus, it is enough to have an "lmtpd" service listening on the
+desired IP interface (or in all of them, if you leave the interface unspecified
+as in the example below), that means something like this in /etc/cyrus.conf
+SERVICES area:
+
+lmtp cmd="lmtpd" listen="lmtp"
+
+(do note that you MUST have an lmtp entry in /etc/services for this to work.
+This can be any available port, for historical reasons, 2003 is most often used).
+
+Also, remember that Cyrus observes tcpwrapper permissions (/etc/hosts.allow and
+/etc/hosts.deny), make sure they're set up correctly or Cyrus might refuse the
+connections.
+
+To configure Postfix' lmtp transport to authenticate using SASL, do the
+following:
+Note: On Sarge systems, you will also need the postfix-tls package for SASL
+support. On etch and above, the support is included in the postfix package.
+
+1. Configure the lmtp transport SASL layer:
+ (add to /etc/postfix/main.cf):
+ lmtp_sasl_auth_enable = yes
+ lmtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
+ lmtp_sasl_security_options =
+ lmtp_destination_concurrency_limit = 100
+ lmtp_destination_recipient_limit = 0
+
+ The *_limit values should match whatever you configured as limits in
+ Cyrus. The above configuration will allow plain text logins.
+
+ Create the password map /etc/postfix/sasl_passwd to tell postfix
+ of a Cyrus LMTP administrator user and password to use.
+
+ e.g.:
+ echo "mycyrusspool.my.domain.org postman:foobar" >sasl_passwd
+ postmap sasl_passwd
+
+2. Configure Cyrus to accept that user as a lmtp administrator
+ (add to /etc/imapd.conf)
+ lmtp_admins: postman
+
+3. Tell postfix to use the lmtp transport to deliver email using
+ transport maps or something else. I suggest making a copy of the
+ postfix lmtp transport in master.cf, renaming it to "cyrus", and
+ using that.
+
+4. Note that to use the new feature of virtual domains in Cyrus v2.3,
+ you need to tell postfix to use the lmtp transport as the
+ virtual_transport. If you also want "local" mail recipients, i.e.
+ those that are addressed to hosts listed in mydestination, to
+ be delivered to Cyrus v2.3, you also need to use lmtp as the
+ mailbox_transport.
+
+ That's it!
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.sendmail
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.sendmail?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.sendmail (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/README.sendmail Sat Aug 26 02:00:13 2006
@@ -1,0 +1,69 @@
+Setting up Cyrus IMAPd for Sendmail (Debian)
+$Id: README.sendmail 308 2006-03-07 20:02:36Z sven $
+===========================================================
+
+[This is user-contributed, unverified information]
+
+First, do *not* use the old cyrus*.m4 macros, they won't work well. The one
+you can use is cyrusv2.m4. There are many methods of connecting Cyrus to
+sendmail, and replacing the local mailer with Cyrus lmtpd is just one of
+them.
+
+Andrzej Filip <anfi at priv.onet.pl> says:
+http://anfi.homeunix.net/sendmail/localNalias.html
+ Cyrus Aliases
+ It allows to use user at CYRUS redirections in virtusertable,
+ aliases and .forward file e.g. I use the following ~anfi/.forward:
+ anfi at CYRUS
+
+http://anfi.homeunix.net/sendmail/localtab.html
+ Local Table
+
+http://anfi.homeunix.net/sendmail/rtcyrus2.html
+ Real Time Cyrus Integration
+ It allows sendmail to check presence of cyrus mailbox in real time,
+ sendmail rejects message to non existing cyrus mailboxes in reply to
+ "RCPT TO:"
+
+
+I am not sure how well these will work with sieve. The one report I have
+for Cyrus + sendmail with working sieve is:
+
+"cyrus/sieve vacation seems to work only if you integrate cyrus via
+cyrusv2.m4 into sendmail (8.12.3-4)."
+
+Sample sendmail.mc that seems to work:
+--------
+[...]
+dnl define BIND_OPTS',`-DNSRCH -DEFNAMES')dnl
+define(`confLOCAL_MAILER', `cyrusv2')dnl
+MAILER(`local')dnl
+MAILER(`smtp')dnl
+MAILER(`cyrusv2')dnl
+dnl MODIFY_MAILER_FLAGS(`cyrus',`+w')dnl
+
+LOCAL_RULE_0
+Rbb + $+ < @ $=w . > $#cyrusbb $: $1
+[...]
+--------
+
+Here's a sieve test script you can try. Change it as needed for your
+site:
+
+require "fileinto";
+require "vacation";
+require "envelope";
+
+if header :contains "subject" "vactest" {
+ vacation :days 7 :addresses ["me at home.de"] "vactest!";
+}
+
+
+Pierre Gambarotto <pierre.gambarotto at enseeiht.fr> says:
+The minimum in order to make it work with sendmail is:
+
+define(`confLOCAL_MAILER', `cyrusv2')
+define(`CYRUSV2_MAILER_ARGS',`FILE /var/run/cyrus/socket/lmtp')
+MAILER(`cyrusv2')
+
+The CYRUSV2_MAILER_ARGS is the key.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/TODO.Debian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/TODO.Debian?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/TODO.Debian (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/TODO.Debian Sat Aug 26 02:00:13 2006
@@ -1,0 +1,67 @@
+Todo list
+---------
+
+$Id: TODO.Debian 521 2006-07-29 03:39:05Z astronut $
+
+CONFIRMED TODO FOR 2.2:
+o Cyrus 2.1 has alarm() lock breaking on lib/lock_fcntl(). This has
+ not been ported to 2.2 yet. And it should not be ported until
+ #358742 is fixed. Note that if the user has to *kill* imapd to
+ unstick the lock, the issue is not in the alarm() code.
+
+
+EXTRA HIGH
+o master leaks memory when a service path is not null
+
+HIGH
+o Update copyright to my new template
+o Shout loudly if anything in .stage needs cleaning up
+o VERIFY SASL LEAKING CRAP TO prot_stream
+ [info-cyrus Re: Log messages going into imap/pop stream]
+o Revise rehash, it is busted...
+o Write nice shell wrapper for chk_cyrus and suggest a event to run it
+o Clean up script, that finds all crap over one day old in .stage
+ and delete it (after logging a warning). Add it as event.
+
+o https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=1735
+
+MEDIUM
+o Verify kerberos build is still OK [gssapi]
+o Add switch to enable do-not-add-return-path-if-it-is-already-there to
+ deliver and LMTP input:
+ - Return-path: Override (default: drop old return-paths, add ours)
+ add (add if there isn't one in there already)
+ note that no return-path is NOT an option ;-)
+ Obs: - lmtpengine uses msg->return_path to know wether it got a mail from!
+ - dropping old return-paths is non-trivial
+o Fulldir-hash detection using the same mech as db-backend
+o auth_ldap, and runtime-selection of auth backends. Add kerberos backend
+ and kerberos support while at it, as well. [ cyrus 2.2 only ]
+
+LOW
+o Verify alpha build logs, and fix the warnings
+o Better logcheck.ignore
+o verify section of libcyrus-*-perl, as well as the manpages'
+o Fix bogosity on perl manpages .TH
+o netsaint example of full monitoring (imap, pop, lmtp, master via snmp)
+o cyrus2-admin.menu
+o find and package snmp loggers for cyrus (as examples)
+o automated database backend conversion?
+o sanitize usernames and folders to lowercase, no spaces or ill. chars
+ [does this make any sense? shouldn't that be done by user name canon.?]
+
+WON'T DO
+o cyrus2-{pop3d,imapd} should deal with cyrus.conf
+ - not needed; cyrus deals gracefully with missing binaries
+o Debconf configuration
+ - too troublesome; lusers are not welcome to using cyrus
+ without reading docs anyway, and it is all SASL's fault.
+
+BACKBURNER IDEAS
+o master
+ - capabilities, so as to be able to bind to ports <1024
+ - jailing at user level (and what of shared mbx?)
+ - Better handling of fucked up children that refuse to start?
+ + requires 5th forked state in master
+o i18n (GNU gettext, with kerberos guard for logs, messages;
+ sanity-enforced txt files for return messages)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/UPGRADE.Debian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/UPGRADE.Debian?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/UPGRADE.Debian (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/UPGRADE.Debian Sat Aug 26 02:00:13 2006
@@ -1,0 +1,197 @@
+For more information, see README.Debian[.gz] in /usr/share/doc/cyrus-common-2.3/
+and the web page below, part of the cyrus-utils project at SourceForge:
+
+ http://cyrus-utils.sourceforge.net/faq
+
+Upgrading from 2.2.12 or 2.2.13 versions prior to 2.2.13-5
+==========================================================
+
+In 2.2.13-5, a bug in debian/rules regarding the generation of
+cyrus-db-types.txt was fixed. As a result, the cyrus2.2 init script
+might complain about a database types mismatch. If this happens,
+please make sure that you are really upgrading from a Debian package
+of cyrus-imapd version 2.2 (either the old experimental cyrus22-imapd
+or the newer cyrus-imapd-2.2 packages). If you do, please remove
+/usr/lib/cyrus/cyrus-db-types.active and run
+dpkg-reconfigure cyrus-common-2.2
+
+Upgrading from cyrus 2.1
+========================
+
+If you upgrade from cyrus 2.1, all you need to do is to upgrade the
+database files from the old database backend to the new one. If you use
+sieve-scripts, you will also need to use sievec on them. The information
+how to do upgrade your database files is contained in the upgrade
+information from cyrus v1.5 below and in more detail in
+/usr/share/doc/cyrus-common-2.3/README.Debian.database.
+
+Please note that the 2.1 packages in Debian use a different format
+from upstream, thus the upgrade is easier.
+
+Upgrading sieve scripts
+-----------------------
+
+Cyrus IMAPD 2.3 uses bytecode for sieve scripts. This means that you need to
+compile all existing sieve scripts so that they will work with cyrus 2.3. There
+is a small tool in /usr/lib/cyrus/upgrade, called masssievec which will
+automatically compile all installed scripts when called correctly. Please
+refer to the script's usage information for details.
+The command line you will probably want to use is (as user cyrus):
+/usr/lib/cyrus/upgrade/masssievec /usr/lib/cyrus/bin/sievec /etc/imapd.conf
+
+Upgrading from cyrus 1.5.x
+==========================
+
+Upgrading cyrus-imapd to cyrus-imapd-2.3 on Debian
+(thanks to David D. Kilzer <ddkilzer at theracingworld.com> for this document)
+-----------------------------------------------
+
+This document describes the procedure for upgrading from the old cyrus-imapd
+(v1.5.x) package to the new cyrus-imapd-2.3 (v2.3) package. While this is a
+manual process, it is very straightforward.
+
+The procedure for converting a v1.6 cyrus store to v2.3 is not explained here,
+but the tools to convert the sieve scripts are in /usr/lib/cyrus/upgrade.
+
+Your SASL installation may require further conversion steps, as Cyrus v2.3 uses
+SASL v2, while Cyrus v1.5 used SASL v1.5. /usr/share/doc/libsasl2 has more
+information on SASL v2. Do pay attention to your SASL v2 installation, such
+as permissions and such. When in doubt, read the README.simpleinstall
+document, as it describes an initial SASLv2 setup.
+
+NOTE: If you've already installed the cyrus 2.3 packages, skip to step 5.
+
+ 1. Become the "root" user on your local system.
+
+ $ /bin/su -
+ #
+
+ 2. Look for any running cyrus daemons using the ps(1) command. Use
+ kill(1) to stop any processes that are found.
+
+ # /etc/init.d/pwcheck stop
+ # ps auwwx | grep cyr
+ # ps auwwx | grep pop3d
+ # ps auwwx | grep imapd
+ # ps auwwx | grep nntpd
+
+ 3. Remove the old cyrus packages.
+
+ ######################################################################
+ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ ######################################################################
+
+ Some versions of the cyrus-imapd packages, with versions 1.5.19-9.10
+ up to 1.5.19-20 (shipped in Debian Sarge 3.1r1) will entirely erase
+ the mail spool when purged with no questions asked.
+
+ You must NOT purge these packages before moving /var/lib/cyrus and
+ /var/spool/cyrus to somewhere safe. Failure to do so will cause data
+ loss.
+
+ # mv /var/lib/cyrus /var/lib/old-cyrus
+ # mv /var/spool/cyrus /var/spool/old-cyrus
+
+ The cyrus-imapd packages in Woody (1.5.19-9.2) are safe, as well as
+ the fixed cyrus-imapd packages 1.5.19-20.1 which should make it to
+ Debian Sarge 3.1r2.
+
+ ######################################################################
+
+ # apt-get --purge remove cyrus-common cyrus-admin cyrus-imapd cyrus-pop3d \
+ cyrus-nntpd [BUT SEE THE ABOVE WARNING FIRST!!!]
+
+ or use dselect/aptitude/synaptic/your favorite deb management tool.
+
+ IMPORTANT: You must answer "n" to this question: "Do you want me to
+ remove the Cyrus mail and news spool (y/n) [n] ?"
+
+ NOTE: You could also copy -a the /var/spool/cyrus and /var/lib/cyrus
+ folders somewhere else, just in case.
+
+ 4. Install the new cyrus-imapd-2.3 packages. Make sure no user will try
+ to connect to imapd/pop3d and that no MTA will try to deliver to lmtpd
+ until you do step 5.
+
+ cyrus-common-2.3 [required]
+ cyrus-admin-2.3 [required]
+ cyrus-imapd-2.3 [optional; must have one of imapd or pop3d]
+ cyrus-pop3d-2.3 [optional; must have one of imapd or pop3d]
+ libcyrus-imap-perl23 [required]
+
+ # apt-get install PACKAGE-NAME [PACKAGE_NAME ...]
+
+ or use dselect.
+
+ 5. Stop the cyrmaster process.
+
+ # /etc/init.d/cyrus2.3 stop
+
+ 5a. Make sure Cyrus won't start until the upgrade process is over.
+
+ # cp -f /usr/lib/cyrus/upgrade/cyrus-db-types.upgrading_from_1.5.txt \
+ /usr/lib/cyrus/cyrus-db-types.active
+
+ 6. Change to the "cyrus" user.
+
+ # /bin/su - cyrus
+ $
+
+ 7. Run the rehash program.
+
+ $ /usr/lib/cyrus/upgrade/rehash basic
+
+ 8. Run ctl_mboxlist to update the "mailboxes" file.
+
+ $ cd /var/lib/cyrus
+ $ /usr/sbin/ctl_mboxlist -u < mailboxes
+
+ 9. Run the cyrreconstruct program from the /var/spool/cyrus directory
+ to reconstruct the mailboxes.
+
+ $ cd /var/spool/cyrus
+ $ /usr/sbin/cyrreconstruct -r user.*
+
+ (you may need to cyrreconstruct other mailboxes, if you have any
+ system mailboxes or shared mailboxes not in the user hierarchy)
+
+10. Exit the "cyrus" user, back to "root".
+
+ $ exit
+ #
+
+11. Upgrade all of the db2 files used by Cyrus from to db4.2.
+
+ # find /var/lib/cyrus -name \*.db -print -exec /usr/bin/db4.2_upgrade {} \;
+
+12. Convert the state databases to those used by new Cyrus 2.3
+
+ Read /usr/share/doc/cyrus-common-2.3/README.Debian.database, and follow
+ whatever steps you need to change the backends from db3 to skiplist.
+
+ This step needs some work, if you can send your experiences with it
+ to hmh at debian.org, I will update this document accordingly.
+
+**** The upgrade of Cyrus' stores are now complete ****
+
+You may want to remove any left-over empty directories from the old version,
+and re-run /usr/sbin/cyrus-makedirs just in case you got one of them wrong.
+
+Now, you need to reconfigure the new Cyrus imapd to adequate it to your system
+and SASL requirements. The Cyrus config files are /etc/imapd.conf,
+/etc/cyrus.conf and /etc/default/cyrus2.3.
+
+Depending on your SASL configuration, you may also need to modify
+/etc/pam.d/{imap,pop,sieve,lmtp} and other SASL configuration files.
+
+Do not forget to edit /etc/imapd.conf to e.g. set the "admins: cyrus" line (if
+you use "cyrus" as the name for the administrator).
+
+NOTES about DRAC authentication
+===============================
+
+DRAC has been disabled in cyrus-imapd-2.3, it caused quite some trouble and
+wasn't used by many. You can however build your own version by editing 00list
+in debian/patches and adding 20-drac_auth.dpatch to it at the proper place
+(i.e. right before the patch numbered 21) and building cyrus-imapd-2.3 with
+dpkg-buildpackage or a similar tool.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/arbitronsort.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/arbitronsort.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/arbitronsort.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/arbitronsort.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+.TH ARBITRONSORT "8" "Project Cyrus" "CMU"
+.SH NAME
+arbitronsort \- sorts arbitron(8) output
+.SH SYNOPSIS
+.B
+arbitronsort
+.SH DESCRIPTION
+.PP
+This tool takes the output of arbitron (run without the -o option)
+on stdin and prints out first a ranking of mailboxes by number of
+people who selected the mailbox, and then a ranking of mailbox by
+number of subscribers.
+.SH SEE ALSO
+.PP
+\fBarbitron(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/changelog
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/changelog?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/changelog (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/changelog Sat Aug 26 02:00:13 2006
@@ -1,0 +1,348 @@
+cyrus-imapd-2.3 (2.3.7-1~pr1) UNRELEASED-experimental; urgency=low
+
+ * New upstream series release
+
+ [ Farzad FARID ]
+ * IDLE handling has changed, remove Debian patches
+ * Removed unnecessary or hard to update Debian patches
+ - TODO list them here
+ * Update dpatches when necessary
+ * Added new cyrus-replication-2.3 package
+ * Conflict/replace *-2.2 packages.
+ * Replace the call to 'ctl_deliver' with 'cyr_expire' in the EVENTS section
+ of cyrus.conf. The previous usage is now deprecated.
+ * Missing space between '!' and function in init script.
+
+ -- Farzad FARID <ffarid at pragmatic-source.com> Fri, 11 Aug 2006 12:43:23 +0200
+
+cyrus-imapd-2.2 (2.2.13-6) unstable; urgency=low
+
+ * Fix a problem in cyrus-common-2.2 preinst
+
+ -- Sven Mueller <sven at debian.org> Thu, 10 Aug 2006 03:58:58 +0200
+
+cyrus-imapd-2.2 (2.2.13-5) unstable; urgency=low
+
+ * The "Need to clean the Windows" release
+
+ [ Benjamin Seidenberg ]
+ * Update the following documentation:
+ - README.Debian
+ - README.Debian.database
+ - README.Debian.postfix
+ - README.Debian.
+ (Closes: #378520, #369882)
+ * Bump debian policy to version 3.7.2 (No changes required)
+ * Move cyr_expire to /usr/sbin as this is used in cyrus.conf.
+ Thanks to Alexander Turic <alexander at turcic.com>. (Closes: #380595)
+ * Rename cron script to cyrus22 since dots aren't allowed
+ (Closes: #382069)
+
+ [ Sven Mueller ]
+ * Remove outdated entry about netnews removal from README.Debian
+ (Closes: #378519)
+ * Add --no-create-home to adduser arguments in cyrus-common2.2's
+ postinst script. (Closes: #378518)
+ * Modify debian/rules to once again create a meaningful
+ cyrus-db-types.txt file (Closes: #366957)
+ * Improve imapd.conf documentation to show how service specific options can
+ be given. Also update packaged imapd.conf to reflect 2.2 syntax and
+ behaviour. (Closes: #379881)
+ * Use ssl-cert and reference system-wide ssl certificates in imapd.conf,
+ leaving the service specific ssl certs as-is.
+ * Update imapd.conf documentation to clarify behaviour of allowplaintext in
+ combination with sasl_mech_list.
+ * Sync with 2.2 CVS tree from upstream, including a few documentation fixes
+ and a fix returning empty strings for empty message parts instead of NULL
+ * Use configurable idle patch from OndÃ
~Yej Surý
+ * Add some more options to /etc/default/cyrus2.2 and use them in the init
+ script, including a generic OPTIONS variable to allow setting of any
+ commandline option for cyrmaster. (Closes: #382061)
+ * Add logic in cyrus-common-2.2 preinst/postrm scripts to rename the
+ cron.daily script. Supplements change by Benjamin Seidenberg, closing
+ #382069.
+
+ -- Sven Mueller <sven at debian.org> Thu, 10 Aug 2006 03:17:27 +0200
+
+cyrus-imapd-2.2 (2.2.13-4) unstable; urgency=low
+
+ [ Benjamin Seidenberg ]
+ * Switch from dh_movefiles (deprecated) to dh_install
+
+ [ Sven Mueller ]
+ * Integrate 4 upstream CVS updates/fixes:
+ - Upstream fix: only free() the backend struct if we allocated it
+ (don't free cached connections)
+ - remove limit on the size of mailbox files that can be received by UNDUMP
+ (write file directly to disk rather than reading the literal into
+ memory)
+ - better logging to facilitate message tracking (Wes Craig
+ <wes at umich.edu>)
+ - remove redundant check for wildcards in mailbox names (Wes Craig
+ <wes at umich.edu>)
+ * Move expiry from ctl_deliver to cyr_expire as suggested by upstreams
+ upgrade information.
+ * Add upstream patch to fix a small issue with linking and libRSAglue
+ * Add upstream patch to compile with MIT krb5 1.4.3 (Philip Guenther
+ <guenther at sendmail.com>)
+ * Add upstream patch to allow reporting of mailbox sizes above 4GB
+ * Add upstream patch to fix a documentation error in imapoptions
+ * Add patch to fix some compiler warnings about casts from pointer to
+ integer of different size
+ * Change the init script to actuall print some information when called with
+ the "status" argument
+ * Add upstream typo fixes of the day. See 0016-upstream-fix-typos for
+ reference to upstream CVS
+
+ [ Benjamin Seidenberg ]
+ * Fix typos in UPGRADE.Debian (Closes: #368675)
+ * Fix link in doc/html/readme.html (Closes: #368676)
+ * Add upstream patch to fix POP locking when reconstructing
+
+ -- Sven Mueller <sven at debian.org> Wed, 28 Jun 2006 22:21:51 +0200
+
+cyrus-imapd-2.2 (2.2.13-3) unstable; urgency=high
+
+ [ Sven Mueller ]
+ * [Security] Add upstream patch to disallow user probes
+ * Add upstream patch to fix dump/undump of remote mailboxes (ctl_mboxlist)
+ * Add upstream patch to allow ACL removal for invalid IDs
+ * Add upstream patch to properly handle timezones and DST in fetchnews
+ * Urgency=high for both security fix and patch to dump/undump bug which
+ makes package unusuable in many supported setups
+
+ [ Benjamin Seidenberg ]
+ * Add build dependency on libkvm-dev for kfreebsd (Closes: #366113)
+
+ -- Sven Mueller <debian at incase.de> Fri, 5 May 2006 18:01:41 +0200
+
+cyrus-imapd-2.2 (2.2.13-2) unstable; urgency=low
+
+ [ Sven Mueller ]
+ * Apply fix from upstream CVS to imap/backend.c (Closes: #365629)
+
+ -- Sven Mueller <debian at incase.de> Tue, 2 May 2006 22:14:03 +0200
+
+cyrus-imapd-2.2 (2.2.13-1) unstable; urgency=low
+
+ [ Sven Mueller ]
+ * Switch to new upstream release (2.2.13)
+ * Fix spelling mistake in debian/control (Closes: #363329)
+ * Fix logcheck rule (Closes: #364835)
+
+ -- Sven Mueller <debian at incase.de> Sat, 29 Apr 2006 22:31:42 +0200
+
+cyrus-imapd-2.2 (2.2.12-5) unstable; urgency=low
+
+ [ Sven Mueller ]
+ * Add example entries for squatter to cyrus.conf (Closes: #355303)
+ * Fix URLs in README.sendmail (Closes: #355771)
+ * Remove STDERR redirection from cyrus-common-2.2 postinst call to adduser
+
+ [ Benjamin Seidenberg ]
+ * Default to lmtp_downcase_rcpt: yes for compliance with RFC 2821
+ (Closes: #357040)
+
+ -- Sven Mueller <debian at incase.de> Fri, 31 Mar 2006 20:11:54 +0200
+
+cyrus-imapd-2.2 (2.2.12-4) unstable; urgency=low
+
+ [ Benjamin Seidenberg ]
+ * Change maintainer to mailing list
+ * Remove multiple provides: lines in cyrus-nntpd-2.2 (Closes: #352240)
+ * Add lintian override for CVS dirs in source tarball, we need to hit
+ upstream with a cluebat for this.
+ * Move all Build-Depends-Indep dependencies to Build-Depends because of the
+ way debian/rules invokes this target, they are not installed, fixes FTBFS.
+ (Closes: #352775, #352779)
+
+ [ Sven Mueller ]
+ * Disable DRAC authentication
+ * Fix reference in debian/po/POTFILES.in (Closes: #352948)
+
+ [ OndÅej Surý ]
+ * Upload to unstable.
+
+ -- OndÅej Surý <ondrej at debian.org> Wed, 15 Feb 2006 22:42:35 +0100
+
+cyrus-imapd-2.2 (2.2.12-3) unstable; urgency=low
+
+ [ Sven Mueller ]
+ * Add a script which helps downloading, editing and re-uploading
+ sieve scripts
+ * Add a patch to fix db_err callback prototype when building against
+ Berkeley DB 4.3 or newer
+
+ [ Henrique de Moraes Holschuh ]
+ * UPGRADE.Debian: warn of dangerous problem in cyrus-imapd from sarge,
+ which would cause data loss when UPGRADE.Debian instructions were
+ followed.
+
+ [ Benjamin Seidenberg ]
+ * Changed debian/control so that the doc package is in section doc to match
+ ftpmaster override.
+
+ [ OndÅej Surý ]
+ * Updated and renamed logcheck rules.
+ * Upload to unstable.
+
+ -- OndÅej Surý <ondrej at debian.org> Mon, 13 Feb 2006 14:16:44 +0100
+
+cyrus-imapd-2.2 (2.2.12-2) experimental; urgency=low
+
+ [ Henrique de Moraes Holschuh ]
+ * Modify the Debian default TLS cipher list to use only secure ciphers
+ suitable for imap/pop/smtp/lmtp TLS, and add an explanation
+
+ [ Benjamin Seidenberg ]
+ * Rewrote descriptions to all refer to cyrus-common-2.2
+ * Changed all package names in all required files within /debian to reflect
+ the new naming scheme
+ * Deleted two files in /usr/lib/cyrus in the purge target of postrm so that
+ this folder is deleted correctly
+ * Changed policy version to 3.6.2
+ * Added upstream patchset 6662:
+ imap/spool.c:1.7->1.8: don't catch our own NULL (off by one error)
+ (Closes: #342314)
+
+ [ Sven Mueller ]
+ * Add a small sed call to debian rules to work around libsnmp[59]-dev
+ problem which causes an unneccesary "-lsensors" in master/Makefile,
+ resulting in an unnessary build dependency on libsensors-dev.
+ Proper fix has to go into netsmp packages, also we need to properly use
+ Debian's libtool. (Closes: #341580)
+ * Add czech translation (thanks to Martin Sin and the debian-l10n-czech
+ team) with a spelling correction from Ondrej Surý.
+ * Adjust kolab2 annotation patch according to patch from Steffen Joeris
+ (Closes: #347527)
+ * Apply patch fixing some error messages in Shell.pm (Closes: #347658)
+
+ [ OndÅej Surý ]
+ * Upload to experimental.
+
+ -- OndÅej Surý <ondrej at debian.org> Fri, 13 Jan 2006 11:52:58 +0100
+
+cyrus22-imapd (2.2.12-1) experimental; urgency=low
+
+ [ Benjamin Seidenberg ]
+ * Revised to build against pristine upstream sources.
+ [ Sven Mueller ]
+ * Fixed a discrepancy between documentation and actual behaviour of the
+ "dracinterval" imapd.conf option. Documentation always said the default
+ would be 0, while the default was actually 5.
+ [ Henrique de Moraes Holschuh ]
+ * Change build-dependency from libsnmp4.2-dev (ucd snmp) to libsnmp9-dev |
+ libsnmp5-dev (netsnmp), so that it works right in sid/etch and sarge
+ * Upload to experimental
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org> Tue, 29 Nov 2005 02:10:21 -0200
+
+cyrus22-imapd (2.2.12-0.9) unstable; urgency=low
+
+ [ Sven Mueller ]
+ * Add patch to be compatible with BerkeleyDB 4.3
+ * Add patch to fix TLS/SSL shutdown in timsieved
+
+ -- Sven Mueller <debian at incase.de> Mon, 14 Nov 2005 14:56:20 +0100
+
+cyrus22-imapd (2.2.12-0.8) unstable; urgency=low
+
+ [ Sven Mueller ]
+ * Fix a problem in the init scripts new status check, found by Benjamin
+ Seidenberg.
+
+ -- Sven Mueller <debian at incase.de> Sun, 13 Nov 2005 20:14:05 +0100
+
+cyrus22-imapd (2.2.12-0.7) unstable; urgency=low
+
+ [ Sven Mueller ]
+ * Switch most deletions of autogenerated files to use debian/deletable.files
+ * Switch all remaining patches to dpatch so that the .diff.gz should now be
+ clean except for the files in debian/.
+
+ -- Sven Mueller <debian at incase.de> Thu, 10 Nov 2005 16:06:09 +0100
+
+cyrus22-imapd (2.2.12-0.6) unstable; urgency=low
+
+ [ Sven Mueller ]
+ * Added kolab2 annotation patch as proposed by Christoper Sacca
+ * Added a small patch to lower the minimum pop3 timeout to 1 minute.
+ The default is still at 10 minutes. I also added some documentation to make
+ it clear to admins that it is _not_ recommended to lower the value to less
+ than 10 minutes (because that is what the standard says it should be at).
+ I needed this change for use at my workplace though. The patch is disabled
+ by default.
+ * Patched init script to support everything LSB 3.0 asks for, including the
+ "right" return codes, as far as we can.
+ * Add patch to enhance sieveshell a bit:
+ - Add --execfile parameter to read commands from a file
+ - Add --password parameter to pass the users parameter on the commandline
+ - Add code to return with a non-zero exit code if the last command
+ executed failed for some reason.
+
+ [ OndÅej Surý ]
+ * Add 64bit quota dpatch.
+ * Rerun autoconf and add result as dpatch.
+
+ -- Sven Mueller <debian at incase.de> Fri, 23 Sep 2005 18:55:57 +0200
+
+cyrus22-imapd (2.2.12-0.5) unstable; urgency=low
+
+ * Update upgrading information
+ * Include masssievec in cyrus22-common
+ * Applied patch from Raphaël 'SurcouF' Bordet <surcouf at debianfr.net> to add
+ nntp support again.
+ * Eliminate an unused variable from tools/masssievec to get rid of perl
+ warning.
+ * Update Recommends and Suggests for cyrus22-common as suggested by HMH
+ * Move several patches from patching the source directly to patching through
+ the use of dpatch
+
+ -- Sven Mueller <debian at incase.de> Tue, 24 May 2005 23:13:18 +0200
+
+cyrus22-imapd (2.2.12-0.4) unstable; urgency=low
+
+ * Fix usage message in deliver.c to reflect Debian naming of (cyr)deliver,
+ (cyr)quota and (cyr)reconstruct
+ * Document the defaultdomain setting a bit better (hopefully)
+ * fix deletion of debian/cyrus-hardwired-config.txt during cleanup
+ * build both arch-dependend and arch-independend parts when debian/rules is
+ called for the build target
+ * Add Sven Mueller to the list of uploaders
+
+ -- Sven Mueller <debian at incase.de> Fri, 29 Apr 2005 00:14:04 +0200
+
+cyrus22-imapd (2.2.12-0.3) unstable; urgency=low
+
+ * Add a README which contains the configure options used to
+ compile the package. The README is auto-generated by debian/rules
+ * cyrus22-clients needs to conflict with cyrus21-clients
+ * cyrus22-common needs to conflict with cyrus21-common
+ * Add a guess of what the problem might be to the set_cert_stuff failure
+ message
+ * Update a few Replaces:, Provides: and Conflicts: lines in debian/control
+
+ -- Sven Mueller <debian at incase.de> Thu, 24 Mar 2005 12:26:27 +0100
+
+cyrus22-imapd (2.2.12-0.2) unstable; urgency=low
+
+ * Fix some more perl executable paths
+ * clean up debian directory a bit
+ * install sievec with cyrus22-common
+ * install mbexamine with cyrus22-common
+ * install smmapd with cyrus22-common
+ * install cyr_expire with cyrus22-common
+ * install installsieve with cyrus22-admin
+
+ -- Sven Mueller <debian at incase.de> Tue, 22 Mar 2005 14:48:33 +0100
+
+cyrus22-imapd (2.2.12-0.1) unstable; urgency=low
+
+ * Initial revision of cyrus22-imapd package
+ - debian packaging taken from cyrus21-imapd_2.1.18-1
+ * Add/fix imapd.conf info regarding virtual domains
+ * Add DRAC support (i.e. apply DRAC patch from /contrib)
+ * Add syncldap2cyrus.pl script from #260833 (a cyrus21 bug)
+
+ -- Sven Mueller <debian at incase.de> Fri, 18 Mar 2005 13:34:09 +0100
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/compat
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/compat?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/compat (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/compat Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+4
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/control
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/control?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/control (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/control Sat Aug 26 02:00:13 2006
@@ -1,0 +1,191 @@
+Source: cyrus-imapd-2.3
+Section: mail
+Priority: extra
+Maintainer: Debian Cyrus Team <pkg-cyrus-imapd-debian-devel at lists.alioth.debian.org>
+Uploaders: Henrique de Moraes Holschuh <hmh at debian.org>, Sven Mueller <sven at debian.org>, Benjamin Seidenberg <astronut at dlgeek.net>, OndÅej Surý <ondrej at debian.org>
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 4.1.68), tcl8.3-dev, libwrap0-dev, libpam0g-dev, libdb4.2-dev (>= 4.2.52), libssl-dev, libzephyr-dev, libsasl2-dev (>= 2.1.9), comerr-dev, drac-dev (>= 1.11-7), libsnmp9-dev | libsnmp5-dev, perl (>= 5.6.0-16), xutils, flex, bison, autotools-dev, po-debconf, dpatch, transfig, gs, groff, libkvm-dev [kfreebsd-i386], libkvm-dev [kfreebsd-amd64]
+
+Package: cyrus-common-2.3
+Architecture: any
+Section: mail
+Depends: postfix | mail-transport-agent, adduser (>= 3.34), dpkg (>> 1.9.0), netbase (>= 4.07), gawk, ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}
+Recommends: cyrus-imapd-2.3 | cyrus-pop3d-2.3 | cyrus-murder-2.3 | cyrus-nntpd-2.3 | cyrus-admin-2.3
+Suggests: cyrus-clients-2.3, cyrus-admin-2.3, cyrus-imapd-2.3, cyrus-pop3d-2.3, cyrus-murder-2.3, cyrus-replication-2.3, cyrus-nntpd-2.3, cyrus-doc-2.3, sasl2-bin, apt-listchanges (>= 2.35)
+Conflicts: suidmanager (<< 0.50), cyrus-common, cyrus21-common, cyrus22-common, cyrus-common-2.2
+Replaces: cyrus21-common, cyrus22-common, cyrus-common-2.2
+Provides: cyrus21-common, cyrus22-common, cyrus-common-2.2
+Description: Cyrus mail system (common files)
+ Cyrus is a fully-featured IMAP daemon, with a number of features not
+ found in other IMAP implementations, including:
+ o Designed to handle massive quantities of mail
+ o No need for users to have login accounts
+ o Virtual domain support
+ o Support for POP3 in addition to IMAP
+ o Sieve server-side email filtering
+ o Servers don't run as root
+ o Easy support for mail quotas
+ o SSL support, including secure IMAP
+ o DRAC support for pop/imap-before-smtp
+ o IPv6 support
+ o NNTP support
+ For more information, see http://asg.web.cmu.edu/cyrus/.
+ .
+ Note: Cyrus doesn't support reading from and storing mail in your
+ standard mail spool - it stores mail in a separate directory in its
+ own MH-like format.
+ .
+ This package contains the common files needed by the other Cyrus
+ components. The cyrus-imapd-2.2 and/or cyrus-pop3d-2.2 packages are needed
+ to enable IMAP and POP3 support respectively. cyrus-murder-2.2 can be
+ used to enable IMAP, POP3 and LMTP proxying. cyrus-replication-2.3
+ can be used to provide server replication between two imap servers.
+ .
+ Homepage: http://cyrusimap.web.cmu.edu/
+
+Package: cyrus-doc-2.3
+Architecture: all
+Section: doc
+Provides: cyrus21-doc, cyrus22-doc, cyrus-doc-2.2
+Replaces: cyrus21-doc, cyrus22-doc, cyrus-doc-2.2
+Conflicts: cyrus21-doc, cyrus22-doc, cyrus-doc-2.2
+Description: Cyrus mail system (documentation files)
+ This package contains the documentation for the Cyrus IMAPd suite.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+Package: cyrus-imapd-2.3
+Architecture: any
+Section: mail
+Depends: cyrus-common-2.3 (= ${Source-Version}), ${shlibs:Depends}
+Provides: imap-server, cyrus21-imapd, cyrus22-imapd, cyrus-imapd-2.2
+Conflicts: imap-server, cyrus21-imapd, cyrus22-imapd, cyrus-imapd-2.2
+Replaces: cyrus21-imapd, cyrus22-imapd, cyrus-imapd-2.2
+Description: Cyrus mail system (IMAP support)
+ This package contains the IMAP (Internet Mail Access Protocol) portion
+ of the Cyrus IMAPd suite.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+
+Package: cyrus-pop3d-2.3
+Architecture: any
+Section: mail
+Depends: cyrus-common-2.3 (= ${Source-Version}), ${shlibs:Depends}
+Provides: cyrus21-pop3d, cyrus22-pop3d, pop3-server, cyrus-pop3d-2.2
+Conflicts: cyrus21-pop3d, cyrus22-pop3d, pop3-server, cyrus-pop3d-2.2
+Replaces: cyrus21-pop3d, cyrus22-pop3d, cyrus-pop3d-2.2
+Description: Cyrus mail system (POP3 support)
+ This package contains the POP3 (Post Office Protocol) portion of the Cyrus
+ IMAPd suite.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+Package: cyrus-admin-2.3
+Architecture: all
+Section: mail
+Depends: libcyrus-imap-perl23 (>= ${Source-Version})
+Suggests: sasl2-bin
+Conflicts: cyrus-admin, cyrus21-admin, cyrus22-admin, cyrus-admin-2.2
+Replaces: cyrus21-admin, cyrus22-admin, cyrus-admin-2.2
+Provides: cyrus21-admin, cyrus22-admin, cyrus-admin-2.2
+Description: Cyrus mail system (administration tools)
+ This package provides the administrative tools for the Cyrus IMAPd suite.
+ It contains the cyradm tool which can be used to administer
+ both local and remote Cyrus mail systems. It also contains sieveshell
+ and its deprecated cousin installsieve, which can be used to manage
+ sieve scripts.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+Package: cyrus-murder-2.3
+Section: mail
+Architecture: any
+Depends: cyrus-common-2.3 (= ${Source-Version}), ${shlibs:Depends}
+Recommends: cyrus-imapd-2.3 (= ${Source-Version}), cyrus-pop3d-2.3 (= ${Source-Version})
+Conflicts: cyrus21-murder, cyrus22-murder, cyrus-murder-2.2
+Replaces: cyrus21-murder, cyrus22-murder, cyrus-murder-2.2
+Provides: cyrus21-murder, cyrus22-murder, cyrus-murder-2.2
+Description: Cyrus mail system (proxies and aggregator)
+ This package contains the Cyrus IMAPd suite murder aggregator system,
+ i.e. IMAP, POP3 and LMTP proxies, and the mupdate mailbox master daemon.
+ It allows for cluster setups where there are many backend Cyrus spools and
+ frontend proxy servers.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+
+Package: cyrus-replication-2.3
+Section: mail
+Architecture: any
+Depends: cyrus-common-2.3 (= ${Source-Version}), cyrus-imapd-2.3 (= ${Source-Version}) | cyrus-pop3d-2.3 (= ${Source-Version}), ${shlibs:Depends}
+Description: Cyrus mail system (replication)
+ This package contains the Cyrus IMAPd suite replication system.
+ It allows the replication of the mail spool between two imap or pop servers.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+
+Package: cyrus-nntpd-2.3
+Architecture: any
+Section: mail
+Depends: cyrus-common-2.3 (= ${Source-Version}), ${shlibs:Depends}
+Conflicts: news-transport-system, cyrus-nntpd-2.2
+Replaces: cyrus21-nntpd, cyrus22-nntpd, cyrus-nntpd-2.2
+Provides: news-transport-system, cyrus21-nntpd, cyrus22-nntpd, cyrus-nntpd-2.2
+Description: Cyrus mail system (NNTP support)
+ This package contains the NNTP (Network News Transfer Protocol) portion of
+ the Cyrus IMAPd suite.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+Package: cyrus-clients-2.3
+Architecture: any
+Section: mail
+Depends: ${shlibs:Depends}
+Conflicts: cyrus21-clients, cyrus22-clients, cyrus-clients-2.2
+Provides: cyrus21-clients, cyrus22-clients, cyrus-clients-2.2
+Replaces: cyrus21-clients, cyrus22-clients, cyrus-clients-2.2
+Description: Cyrus mail system (test clients)
+ This package contains client tools to test the Cyrus IMAPd suite.
+ It contains the mupdatetest, sivtest, smtptest, lmtptest,
+ imtest and pop3test tools which can be used to interactively talk to
+ a mupdate, sieve, smtp, lmtp, imap or pop3 server.
+ The clients are fully SASL-enabled for authentication.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+
+Package: cyrus-dev-2.3
+Architecture: any
+Section: devel
+Depends: libcyrus-imap-perl23 (>= ${Source-Version}), cyrus-common-2.3 (= ${Source-Version}), libsasl2-dev (>= 2.1.9)
+Conflicts: cyrus-dev, cyrus21-dev, cyrus22-dev, cyrus-dev-2.2, libdb3-dev (<< 3.2.9-15), libdb2-dev (<< 2.7.7.0-6), libdb4.2-dev (<<4.2.52)
+Replaces: cyrus21-dev, cyrus22-dev, cyrus-dev-2.2
+Provides: cyrus21-dev, cyrus22-dev, cyrus-dev-2.2
+Description: Cyrus mail system (developer files)
+ This package contains header files and the static library needed
+ to develop IMAP applications that interface with the Cyrus IMAPd suite.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
+
+Package: libcyrus-imap-perl23
+Architecture: any
+Depends: ${perl:Depends}, ${shlibs:Depends}
+Provides: libcyrus-imap-perl, libcyrus-imap-perl21, libcyrus-imap-perl22
+Conflicts: libcyrus-imap-perl, libcyrus-imap-perl21, libcyrus-imap-perl22
+Replaces: libcyrus-imap-perl21, libcyrus-imap-perl22
+Section: perl
+Description: Interface to Cyrus imap client imclient library
+ The Cyrus::IMAP module provides an interface to the Cyrus imclient
+ library. These are primarily useful for implementing cyradm operations
+ within a Perl script; there are easier ways to implement general client
+ operations, although they may be more limited in terms of authentication
+ options when talking to a Cyrus imapd.
+ .
+ The modules that compose Cyrus::SIEVE are also included, but they are
+ undocumented upstream.
+ .
+ For more information, please see the cyrus-common-2.3 package.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/copyright
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/copyright?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/copyright (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/copyright Sat Aug 26 02:00:13 2006
@@ -1,0 +1,81 @@
+$Id: copyright 491 2006-06-19 18:22:42Z astronut $
+
+This package was debianized by Henrique de Moraes Holschuh <hmh at debian.org> on
+Wed Sep 12 09:35:30 BRT 2001, based on previous work by Michael-John Turner
+<mj at debian.org> and David Parker <david at neongoat.com>.
+
+The version 2.3 of Cyrus IMAPd has been packaged by
+Farzad FARID <ffarid at pragmatic-source.com> for Karavel.
+
+The Debian packaging of Cyrus IMAPd v2.2 is:
+ Copyright (c) 2002-2004 by Henrique de Moraes Holschuh <hmh at debian.org>,
+ Sven Mueller <debian at incase.de>,
+ Benjamin Seidenberg <astronut at dlgeek.net>
+ and distributed in the same license as the upstream source it applies to.
+
+The debian packages are maintained in a subversion repository at:
+ https://mail.incase.de/svn/cyrus22/
+
+Upstream sources are at: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.
+
+Upstream Author: Carnegie Mellon University <cyrus-bugs+ at andrew.cmu.edu>
+Upstream bugs: http://bugzilla.andrew.cmu.edu/
+
+Patches:
+The Debian version of Cyrus IMAP is heavily patched to adequate it to Debian,
+and sometimes to add functionality. All such patches are submitted upstream to
+CMU, for proper inclusion in Cyrus -- but not all of them will be accepted, of
+course. See README.Debian for more details. Also, many patches from the
+current CVS release of Cyrus IMAPd are folded in Debian updates; these are
+identified by "patchset" numbers, created by the cvsps utility.
+
+The IPv6 patch by Hajimu UMEMOTO <ume at mahoroba.org> has been applied.
+
+CMU release tarballs are often repacked minus the CVS/ directories to avoid
+problems in my build system.
+
+Copyright:
+ALL versions of the Cyrus IMAP server are now covered by the
+following copyright notice:
+
+ * Copyright (c) 1994-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+For more information, see http://asg.web.cmu.edu/cyrus/imapd/license.html
+(local copy stored in /usr/share/doc/cyrus2-common/license.html)
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-16x16.xpm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-16x16.xpm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-16x16.xpm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-16x16.xpm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,45 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 23 1",
+" c Gray0",
+". c #191919",
+"X c Gray20",
+"o c #00007f",
+"O c #007f00",
+"+ c #007f7f",
+"@ c #7f0000",
+"# c #7f007f",
+"$ c #7f7f00",
+"% c #4c4c4c",
+"& c #666667",
+"* c Gray50",
+"= c Blue",
+"- c Green",
+"; c Cyan",
+": c Red",
+"> c Magenta",
+", c Yellow",
+"< c Gray60",
+"1 c #b2b2b2",
+"2 c Gray80",
+"3 c Gray90",
+"4 c Gray100",
+/* pixels */
+"22111;1212211111",
+"211221213<121221",
+"2111212232<11122",
+"121121221<231<11",
+"2112232<34334112",
+"1112222243213212",
+";2221<11*&<<*<<1",
+"1221233323232231",
+"2233223333332&1<",
+"2213123333233*1*",
+"123312121222233*",
+"1233212<<213223<",
+"12331<1<<11<123*",
+"123333322222223*",
+"123223322222323*",
+"2<&%%%X%%%%X%%X%"
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-32x32.xpm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-32x32.xpm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-32x32.xpm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyradm-32x32.xpm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,61 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 23 1",
+" c Gray0",
+". c #191919",
+"X c Gray20",
+"o c #00007f",
+"O c #007f00",
+"+ c #007f7f",
+"@ c #7f0000",
+"# c #7f007f",
+"$ c #7f7f00",
+"% c #4c4c4c",
+"& c #666667",
+"* c Gray50",
+"= c Blue",
+"- c Green",
+"; c Cyan",
+": c Red",
+"> c Magenta",
+", c Yellow",
+"< c Gray60",
+"1 c #b2b2b2",
+"2 c Gray80",
+"3 c Gray90",
+"4 c Gray100",
+/* pixels */
+"222111112;2112121222111112112121",
+"121112;2112211223+11212111121111",
+"221112222112111333+221121221112;",
+"2112111211222133333&12222;212222",
+"11111112212122333323$221+2121211",
+"212121112122333%3 332&41%1111121",
+";212112;22132233211%44443&112211",
+"2211222222233.3112344444442112;2",
+"11111211133321114444441444%22121",
+"1212222133311 444444*%4444%22212",
+"211112233111444444:4334%444%2111",
+";11222331 433223* 2332%322231112",
+"222213&&11&*&&%#%%# %&#% #%&221",
+"12233343434444434444344444443311",
+"113&2&&&3333333333333332222333+2",
+"2133333333333333332333232X**23%o",
+"22344333333333232233222221#*24.%",
+"124#&34#�:.#24.%",
+"223333333333333333322332332224.%",
+"214333333323333323322222322224.X",
+"11333333 &23X&2&&3223223222234.X",
+"123334433333333333222232223234.%",
+"12333333&2X12X& &13X2322322134.%",
+"123333333233333332333222222224.X",
+"21333332&&&1&X2 3&&3X&&X222234.X",
+"213333333333323222222222222134.%",
+"123333333333332223322322222134.X",
+"113333233233232332232222322324.X",
+"223334434434444444434434444444.%",
+"12 . . .X",
+"2112%%%%o%%X%%o%X%%%o%X%X%oXXo%%",
+"11121222122212122122122122222222"
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrdump.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrdump.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrdump.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrdump.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.24.
+.TH CYRDUMP "8" "Project Cyrus" "CMU"
+.SH NAME
+cyrdump \- dump mailboxes to stdout
+.SH SYNOPSIS
+.B
+cyrdump [-C <configfile>] [-v] [mboxpattern ...]
+.SH DESCRIPTION
+.PP
+A tool for dumping IMAP mailboxes on a server.
+.TP
+\fB\-C <configfile>\fR
+Specify an alternate configuration file ( is used by default)
+.TP
+\fB\-v\fR
+Increase program verbosity.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.README.Debian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.README.Debian?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.README.Debian (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.README.Debian Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9 @@
+Cyrus IMAP for Debian, admin utilities
+$Id: cyrus-admin-2.3.README.Debian 229 2005-12-08 23:26:29Z astronut $
+---------------------
+
+Refer to the cyrus-doc-2.3 package for more information. There is a lot
+of it, and it will save you hours (or days) of frustating bug-hunting if
+you read them first.
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.dirs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.dirs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.dirs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.dirs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+usr/bin
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+usr/bin/cyradm
+usr/bin/sieveshell
+usr/bin/installsieve
+usr/share/icons/*
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.linda
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.linda?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.linda (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.linda Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+Tag: interp-minus-n-fails
+Data: usr/bin/cyradm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.lintian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.lintian?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.lintian (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.lintian Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+cyrus-admin-2.3: shell-script-fails-syntax-check ./usr/bin/cyradm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.manpages
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.manpages?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.manpages (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.manpages Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+man/sieveshell.1
+perl/imap/blib/man1/cyradm.1p
+debian/tmp/usr/share/man/man1/installsieve.1
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.menu
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.menu?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.menu (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-admin-2.3.menu Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+?package(cyrus-admin-2.3):needs="text" section="Apps/System/Admin"\
+ hints="Mail,Admin,Cyrus"\
+ title="Cyrus 2.3 cyradm (cyrus at localhost)"\
+ longtitle="Administer local Cyrus IMAPd 2.3 accounts as user cyrus"\
+ icon="/usr/share/icons/cyradm.xpm"\
+ command="/usr/bin/cyradm --user cyrus localhost"
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.README.Debian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.README.Debian?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.README.Debian (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.README.Debian Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9 @@
+Cyrus IMAP for Debian, generic SASL-enabled protocol clients
+$Id: cyrus-clients-2.2.README.Debian 229 2005-12-08 23:26:29Z astronut $
+---------------------
+
+Refer to the cyrus-doc-2.2 package for more information. There is a lot
+of it, and it will save you hours (or days) of frustating bug-hunting if
+you read them first.
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.dirs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.dirs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.dirs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.dirs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+usr/bin
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.manpages
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.manpages?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.manpages (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-clients-2.3.manpages Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+man/*test.1
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.NEWS
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.NEWS?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.NEWS (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.NEWS Sat Aug 26 02:00:13 2006
@@ -1,0 +1,86 @@
+cyrus22-imapd (2.2.12-1) unstable; urgency=low
+
+ cyrus now supports realms by default and is therefor suitable for virtual
+ domains much better than it was before. However, this might break upgrades
+ from v2.1 installations, especially when the hostname might change during
+ operation (for example in hot-standby high-Availability setups).
+
+ This is the first cyrus22 package
+
+ -- Sven Mueller <debian at incase.de> Sun, 13 Feb 2005 00:49:12 -0100
+
+cyrus21-imapd (2.1.16-1) unstable; urgency=low
+
+ ipurge behaviour is now that of the patch accepted upstream. It uses the
+ date: header by default, and it can use the internal date of the message as
+ an alternative.
+
+ Cyrus 2.1 is officially in maintenance mode now, and the Debian packages will
+ follow suit. I will switch development efforts to the Cyrus 2.2 package, and
+ update 2.1 only to fix bugs, and apply anything that shows up on CVS.
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org> Sun, 23 Nov 2003 11:59:12 -0200
+
+cyrus21-imapd (2.1.15-8) unstable; urgency=low
+
+ ipurge has been patched in a way that changes its default behaviour. Now, it
+ uses the internal date of the message (i.e. when it entered the mail store,
+ be it through lmtp or imap append) instead of the Date: header for date
+ comparasions.
+
+ The old behaviour is still available, refer to the ipurge manpage for more
+ information.
+
+ These changes have not been accepted upstream yet, so I don't promise they
+ will stay around forever.
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org> Tue, 21 Oct 2003 13:18:30 -0200
+
+cyrus21-imapd (2.1.15-1) unstable; urgency=low
+
+ Cyrus has a big bug regarding EOL markers for /usr/sbin/sendmail. It sends
+ CRLF-terminated lines to the /usr/sbin/sendmail wrapper (or to whatever you
+ configure for sendmail: in /etc/imapd.conf), when it should be sending
+ LF-terminated lines only.
+
+ Postfix and sendmail are fine with CRLF EOLs. Exim 4 can be configured
+ to strip the CRs off all the time in its configuration file.
+
+ I am writing a patch to allow one to configure parameters for sendmail, but
+ while it is not ready and accepted upstream, users of Exim 3 should set
+ their sendmail: in imapd.conf to a shell wrapper that calls
+ /usr/sbin/sendmail -dropcr "$@" or something to that extent.
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org> Tue, 19 Aug 2003 07:40:40 -0300
+
+cyrus21-imapd (2.1.14-1) unstable; urgency=low
+
+ Initial instance of NEWS.Debian support. This file will be used to note all
+ changes the local admin must do to a Cyrus system when upgrading.
+
+ Upgrading checklist for recent 2.1.x packages:
+
+ 1. timsieved was corrected to behave properly in the altnamespace
+ configuration. However, this means that it was previously looking for
+ sieve scripts in "user.name" format instead of the (correct) "user^name"
+ format. A sample script to do this (which should be run in the top level
+ of the sieve directories) is in /usr/lib/cyrus/upgrade/convert-sieve.pl.
+ Note that this is only needed if you are running with altnamespace turned
+ on.
+
+ 2. We are now more forgiving of MIME boundry headers generated by earlier
+ versions of eudora by default (you can switch to the more strict checks
+ that used to be the default using the rfc2046_strict imapd.conf(5)
+ option.
+
+ However, if you have messages already in the mailstore that you want to
+ fix you will need to reconstruct the affected mailboxes to regenerate
+ the cached bodystructure data to take this into account. Nothing needs
+ to be done for new messages to be treated in this way.
+
+
+ Upgrading checklist for old Cyrus 1.5 or 1.6:
+
+ Read /usr/share/doc/cyrus21-common/UPGRADE.Debian.gz
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org> Fri, 4 Jul 2003 10:10:53 -0300
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.contrib
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.contrib?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.contrib (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.contrib Sat Aug 26 02:00:13 2006
@@ -1,0 +1,7 @@
+contrib/cyrus-graphtools.1.0
+contrib/fud-client.c
+contrib/README
+contrib/sieve-spamasssassin
+contrib/squatrunner.pl
+contrib/squatrunner.txt
+contrib/add-cyrus-user
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.default
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.default?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.default (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.default Sat Aug 26 02:00:13 2006
@@ -1,0 +1,40 @@
+# Defaults for Cyrus IMAPd 2.3 scripts
+# $Id: cyrus-common-2.3.cyrus2.3.default 543 2006-08-08 16:36:00Z sven $
+# sourced by /etc/init.d/cyrus2.3, /usr/sbin/cyrus-makedirs
+# installed at /etc/default/cyrus2.3 by the maintainer scripts
+#
+
+#
+# This is a POSIX shell fragment
+#
+
+# Set this to 1 or higher to enable debugging on cyrmaster
+#CYRUS_VERBOSE=1
+
+# Socket listen queue backlog size
+# See listen(2). Default is 32, you may want to increase
+# this number if you have a very high connection rate
+#LISTENQUEUE=32
+
+# Wether cyrus-makedirs should optimize filesystems
+# or not. Switch it off if you are going to do your
+# own optimizations. Set to 1 to enable, 0 to disable
+#CYRUSOPTFILESYS=1
+
+# The default Cyrus IMAP config file that the scripts should
+# use. You better know what you're doing if you change this
+#CONF=/etc/imapd.conf
+
+# The default cyrus master config file that the scripts shoud
+# use. You better know what you're doing if you change this.
+#MASTERCONF=/etc/cyrus.conf
+
+# Check spool condition with chk_cyrus on daily cronjob
+# Set to 1 to enable, default is disabled
+#CHKCYRUS=0
+
+# Set the path to the PID file
+#PIDFILE=/var/run/cyrmaster.pid
+
+# Set other Options here.
+OPTIONS=""
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.init
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.init?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.init (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus2.3.init Sat Aug 26 02:00:13 2006
@@ -1,0 +1,245 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides: cyrus-common-2.3
+# Required-Start: $syslog $network
+# Required-Stop: $syslog $network
+# Default-Start: 2 3 4 5
+# Default-Stop: S 0 1 6
+# Short-Description: common init system for cyrus 2.3 IMAP/POP3 daemons.
+# Description: common init system the for cyrus 2.3 IMAP/POP3 daemons.
+# starts the central cyrus 2.3 master process, which can
+# then start various services depending on configuration.
+# Typically starts IMAP and POP3 daemons, but might also
+# start an NNTP daemon and various helper daemons for
+# distributed mail/news storage systems (high-performance
+# and/or high-reliability setups).
+### END INIT INFO
+#
+# Copyright 2001-2005 by Henrique de Moraes Holschuh <hmh at debian.org>
+# Various modifications done by Sven Mueller <debian at incase.de>
+# Distributed under the GPL version 2
+#
+# $Id: cyrus-common-2.3.cyrus2.3.init 543 2006-08-08 16:36:00Z sven $
+
+# Make sure we get sane results on borked locales
+LC_ALL=C
+export LC_ALL
+
+# Overridable defaults
+unset CYRUS_VERBOSE
+unset LISTENQUEUE
+unset CONF
+unset MASTERCONF
+[ -r /etc/default/cyrus2.3 ] && . /etc/default/cyrus2.3
+
+[ "x${CYRUS_VERBOSE}" != "x" ] && export CYRUS_VERBOSE
+# Make sure the master process is daemonized
+OPTIONS="${OPTIONS} -d"
+[ "x${CONF}" != "x" ] && OPTIONS="-C ${CONF} ${OPTIONS}"
+[ "x${MASTERCONF}" != "x" ] && OPTIONS="-M ${MASTERCONF} ${OPTIONS}"
+[ "x${LISTENQUEUE}" != "x" ] && OPTIONS="-l ${LISTENQUEUE} ${OPTIONS}"
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DAEMON=/usr/sbin/cyrmaster
+NAME=cyrmaster
+[ "x${PIDFILE}" = "x" ] && PIDFILE="/var/run/${NAME}.pid"
+DESC="Cyrus IMAPd"
+
+test -x ${DAEMON} || exit 0
+
+set -e
+
+START="--start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} --name ${NAME} -- ${OPTIONS}"
+
+verifydb() {
+ while read -r DBKEY DBVALUE ; do
+ match=`sort -u < $1 | gawk "/^${DBKEY}[[:blank:]]/ { print \\$2 }"`
+ [ "x${match}" != "x${DBVALUE}" ] && return 0
+ done
+ return 1
+}
+
+createdir() {
+# $1 = user
+# $2 = group
+# $3 = permissions (octal)
+# $4 = path to directory
+ [ -d "$4" ] || mkdir -p "$4"
+ chown -c -h "$1:$2" "$4"
+ chmod -c "$3" "$4"
+}
+
+missingstatoverride () {
+ echo "$0: You are missing a dpkg-statoverride on $1. Add it." >&2
+ exit 1
+}
+
+fixdirs () {
+ dir=`dpkg-statoverride --list /var/run/cyrus` \
+ || missingstatoverride /var/run/cyrus
+ [ -z "$dir" ] \
+ || createdir $dir
+ dir=`dpkg-statoverride --list /var/run/cyrus/socket` \
+ || missingstatoverride /var/run/cyrus/socket
+ [ -z "$dir" ] \
+ || createdir $dir
+}
+
+check_status () {
+ if [ "$1" = "verbose" ]; then
+ PRINTIT=echo
+ else
+ PRINTIT=true
+ fi
+ if [ ! -f ${PIDFILE} ]; then
+ # using [c] in the grep avoids catching the grep
+ # process itself
+ if ps auxww | grep -qE 'usr/sbin/[c]yrmaster' ; then
+ # Damn, PID file doesn't exist, but cyrmaster process
+ # exists. Though strictly speaking, we should not
+ # do this, reconstruct the PID file here.
+ pidof /usr/sbin/cyrmaster > /dev/null 2>&1 \
+ && pidof /usr/sbin/cyrmaster > ${PIDFILE}
+ ${PRINTIT} "cyrmaster running with PID `cat ${PIDFILE}`"
+ return 0
+ fi
+ fi
+ if [ -s ${PIDFILE} ] && kill -0 `cat ${PIDFILE}` > /dev/null 2>&1; then
+ ${PRINTIT} "cyrmaster running with PID `cat ${PIDFILE}`"
+ return 0
+ else
+ # the PID file might simply not match the cyrmaster process.
+ if pidof /usr/sbin/cyrmaster > /dev/null 2>&1 ; then
+ # go ahead and fix it
+ pidof /usr/sbin/cyrmaster > ${PIDFILE}
+ ${PRINTIT} "cyrmaster running with PID `cat ${PIDFILE}`"
+ return 0
+ else
+ # no process and/or no PID file, return failure
+ ${PRINTIT} "cyrmaster not running with"
+ return 1
+ fi
+ fi
+ # this point should never be reached, return unknown status if it
+ # is anyway
+ return 4
+}
+
+case "$1" in
+ start)
+ # Verify if there are old Cyrus 1.5 spools that were not upgraded
+ [ -f /var/lib/cyrus/mailboxes -a -d /var/lib/cyrus/deliverdb -a \
+ -d /var/spool/cyrus/mail/user -a ! -d /var/spool/cyrus/mail/stage. ] && {
+ echo "$0: It appears that you still have an version 1.5 spool" 1>&2
+ echo "$0: that needs to be upgraded. Please refer to the guide" 1>&2
+ echo "$0: at /usr/share/doc/cyrus-common-2.3/UPGRADE.Debian" 1>&2
+ echo
+ echo "$0: Cyrmaster not started."
+ exit 6
+ }
+ # Verify consistency of database backends
+ [ -f /usr/lib/cyrus/cyrus-db-types.active ] && {
+ # is it safe to start cyrmaster? compare "key value" pairs
+ # from the (old) active database types file with the new one
+ ( sort -u /usr/lib/cyrus/cyrus-db-types.active \
+ | grep DBENGINE \
+ | verifydb /usr/lib/cyrus/cyrus-db-types.txt \
+ ) && {
+ echo "$0: Database backends mismatch! You must manually" 1>&2
+ echo "$0: verify and update the Cyrus databases to the" 1>&2
+ echo "$0: new backends." 1>&2
+ echo "$0: Please refer to /usr/share/doc/cyrus-common-2.3/README.Debian" 1>&2
+ echo "$0: for instructions." 1>&2
+ echo
+ echo "$0: Cyrmaster not started."
+ exit 6
+ }
+ }
+ echo -n "Starting ${DESC}: "
+ fixdirs
+ if check_status ; then
+ echo "${DAEMON} already running."
+ exit 0
+ fi
+ if start-stop-daemon ${START} >/dev/null 2>&1 ; then
+ echo "$NAME."
+ else
+ if ! check_status ; then
+ echo "(failed)."
+ exit 1
+ fi
+ fi
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ if start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
+ --name ${NAME} --quiet --startas $DAEMON >/dev/null 2>&1 ; then
+ echo "$NAME."
+ rm -f ${PIDFILE}
+ exit 0
+ else
+ # process running?
+ if check_status; then
+ # Yes, report failure.
+ echo "(failed)."
+ exit 1
+ else
+ # No, return as if stopped a running process
+ # successfully.
+ echo "."
+ rm -f ${PIDFILE}
+ exit 0
+ fi
+ fi
+ ;;
+ reload|force-reload)
+ echo "Reloading $DESC configuration files."
+ if start-stop-daemon --stop --signal 1 --quiet \
+ --name ${NAME} --pidfile /var/run/$NAME.pid >/dev/null 2>&1 ; then
+ exit 0
+ else
+ exit 1
+ fi
+ ;;
+ restart)
+ $0 stop && {
+ echo -n "Waiting for complete shutdown..."
+ i=5
+ while [ $i -gt 0 ] ; do
+ # exit look when server is not running
+ check_status || break
+ sleep 2s
+ i=$(($i - 1))
+ echo -n "."
+ done
+ [ $i -eq 0 ] && {
+ echo
+ echo "fatal: incomplete shutdown detected, aborting."
+ exit 1
+ }
+ echo
+ }
+ exec $0 start
+ ;;
+ status)
+ check_status verbose
+ exit $?
+ ;;
+ try-restart)
+ check_status
+ if [ "$?" -eq 0 ]; then
+ exec $0 restart
+ else
+ # LSB says to return 0 in try-restart if the service is
+ # not running.
+ exit 0
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus23.cron.daily
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus23.cron.daily?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus23.cron.daily (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.cyrus23.cron.daily Sat Aug 26 02:00:13 2006
@@ -1,0 +1,67 @@
+#!/bin/sh
+# Cyrus IMAPd daily maintenance script
+# Copyright (c) 2002,2003 by Henrique M. Holschuh
+# $Id: cyrus-common-2.3.cyrus23.cron.daily 549 2006-08-08 20:07:56Z astronut $
+# Distributed under the terms of the GNU General Public License version 2
+#
+# This script:
+# 1. Backups the mailbox database to the portable text format,
+# and compresses the result. This backup can be used to restore
+# the Cyrus mailbox database using ctl_mboxlist (after uncompressing
+# the backup file).
+#
+# 2. Cleans up any leftover crap in .stage directories.
+#
+# 3. Runs chk_cyrus and outputs warning messages (so that cron
+# sends them to the administrator) if any problems are detected.
+
+set -e
+
+# Make sure we get sane behaviour in broken locales
+LC_ALL=C
+export LC_ALL
+
+bak=/var/backups
+bakfile=${bak}/cyrus-mboxlist.txt.gz
+CONF=/etc/imapd.conf
+CHKCYRUS=0
+[ -r /etc/default/cyrus2.3 ] && . /etc/default/cyrus2.3
+umask 022
+
+# 1. backup mailbox database
+[ -x /usr/sbin/ctl_mboxlist ] && {
+ [ -d $bak ] || ( mkdir -p $bak ; chmod 600 $bak )
+ [ -f $bakfile ] && mv ${bakfile} ${bakfile}.bak
+# su "--command=/usr/sbin/ctl_mboxlist -d" - cyrus | ...
+ start-stop-daemon --start --exec /usr/sbin/ctl_mboxlist --quiet --chuid cyrus -- -d | gzip -9 >${bakfile}
+}
+
+# 2. clean up all leftover .stage directories in all spools listed in
+# the default config file
+[ $CHKCYRUS -ne 0 ] && {
+ [ -r "$CONF" ] || {
+ echo $0: unable to read configuration file $CONF. Aborting...
+ exit 1
+ }
+ partitions=$(sed --silent -e "/^[[:blank:]]*partition-[[:alnum:]]\+:/ { \
+ s#^[[:blank:]]*partition-[[:alnum:]]\+:[[:blank:]]*## \
+ p
+ } " < "$CONF" | sort | uniq | xargs)
+ for i in $partitions ; do
+ find "$i" -name '.stage' -type d -print0 | \
+ xargs --null -n 1 -r -i'{1}' \
+ find {1} -type f -ctime +1 -exec rm -f {} \;
+ done
+}
+
+# 3. runs chk_cyrus
+[ -x /usr/sbin/chk_cyrus ] && {
+ tmpfile=$(mktemp -t cyrus-daily-cronjob.XXXXXXXXXX)
+ trap 'rm -f "${tmpfile}"' 0
+# su "--command=/usr/sbin/chk_cyrus" - cyrus | ...
+ start-stop-daemon --start --exec /usr/sbin/chk_cyrus --quiet --chuid cyrus >"${tmpfile}" 2>&1 || cat "${tmpfile}" 1>&2
+ rm -f "${tmpfile}"
+ trap '' 0
+}
+
+exit 0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.dirs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.dirs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.dirs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.dirs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,12 @@
+etc/pam.d
+etc/default
+etc/logcheck/ignore.d.server
+etc/logcheck/violations.ignore.d
+usr/sbin
+usr/lib/cyrus
+usr/lib/cyrus/upgrade
+usr/share/snmp/mibs
+var/lib/cyrus
+var/spool/cyrus
+var/spool/sieve
+var/run/cyrus/socket
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.docs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.docs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.docs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.docs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+debian/UPGRADE.Debian
+debian/README.*
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,21 @@
+etc/*conf
+etc/pam.d/lmtp
+etc/pam.d/sieve
+usr/sbin/cyr*
+usr/sbin/ctl_*
+usr/sbin/cvt_*
+usr/sbin/chk_*
+usr/sbin/ipurge
+usr/sbin/tls_prune
+usr/sbin/mbpath
+usr/sbin/arbitron*
+usr/sbin/unexpunge
+usr/lib/cyrus/bin/lmtpd
+usr/lib/cyrus/bin/timsieved
+usr/lib/cyrus/bin/sievec
+usr/lib/cyrus/bin/mbexamine
+usr/lib/cyrus/bin/smmapd
+usr/lib/cyrus/bin/notifyd
+usr/lib/cyrus/bin/fud
+usr/lib/cyrus/get-backtrace.gdb
+usr/share/snmp
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.linda
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.linda?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.linda (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.linda Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+Tag: postinst-db-input
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.links
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.links?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.links (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.links Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+var/spool/sieve etc/sieve
+usr/sbin/cyrreconstruct usr/lib/cyrus/bin/reconstruct
+usr/sbin/cyrquota usr/lib/cyrus/bin/quota
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.lintian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.lintian?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.lintian (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.lintian Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+cyrus-common-2.2: no-debconf-config
+cyrus-common-2.2: postinst-uses-db-input
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.manpages
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.manpages?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.manpages (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.manpages Sat Aug 26 02:00:13 2006
@@ -1,0 +1,24 @@
+debian/tmp/usr/share/man/man5/cyrus.conf.5
+debian/tmp/usr/share/man/man5/imapd.conf.5
+debian/tmp/usr/share/man/man8/cyrus-makedirs.8
+debian/tmp/usr/share/man/man8/cyrdump.8
+debian/tmp/usr/share/man/man8/mbpath.8
+debian/tmp/usr/share/man/man8/arbitron.8
+debian/tmp/usr/share/man/man8/arbitronsort.8
+debian/tmp/usr/share/man/man8/timsieved.8
+debian/tmp/usr/share/man/man8/notifyd.8
+debian/tmp/usr/share/man/man8/lmtpd.8
+debian/tmp/usr/share/man/man8/ctl_*.8
+debian/tmp/usr/share/man/man8/cvt_*.8
+debian/tmp/usr/share/man/man8/chk_*.8
+debian/tmp/usr/share/man/man8/fud.8
+debian/tmp/usr/share/man/man8/ipurge.8
+debian/tmp/usr/share/man/man8/tls_prune.8
+debian/tmp/usr/share/man/man8/cyrdeliver.8
+debian/tmp/usr/share/man/man8/cyrmaster.8
+debian/tmp/usr/share/man/man8/cyrreconstruct.8
+debian/tmp/usr/share/man/man8/cyrquota.8
+debian/tmp/usr/share/man/man8/mbexamine.8
+debian/tmp/usr/share/man/man8/smmapd.8
+debian/tmp/usr/share/man/man8/cyr_expire.8
+debian/tmp/usr/share/man/man8/unexpunge.8
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postinst
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postinst?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postinst (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postinst Sat Aug 26 02:00:13 2006
@@ -1,0 +1,156 @@
+#! /bin/sh
+# postinst script for cyrus-common-2.3
+# Copyright (c) 2002 by Henrique de Moraes Holschuh
+# Distributed under the GNU General Public License version 2
+# $Id: cyrus-common-2.3.postinst 503 2006-07-18 15:30:27Z sven $
+#
+# see: dh_installdeb(1)
+
+# debconf hook
+. /usr/share/debconf/confmodule
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+export PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+verifydb() {
+ while read -r DBKEY DBVALUE ; do
+ match=`LC_ALL=C gawk "/^${DBKEY}[[:blank:]]/ { print \\$2 }" < $1`
+ [ "x${match}" != "x${DBVALUE}" ] && return 0
+ done
+ return 1
+}
+
+verifydbkey() {
+ while read -r DBKEY DBVALUE ; do
+ if [ "${DBKEY}" = "$2" ] ; then
+ match=`LC_ALL=C gawk "/^${DBKEY}[[:blank:]]/ { print \\$2 }" < $1`
+ [ "x${match}" != "x${DBVALUE}" ] && return 0
+ fi
+ done
+ return 1
+}
+
+case "$1" in
+ configure)
+ # Add the cyrus user (requires adduser >= 3.34)
+ echo "Creating/updating cyrus user account..."
+ adduser --quiet --system --ingroup mail --home /var/spool/cyrus \
+ --shell /bin/sh --no-create-home --disabled-password \
+ --gecos "Cyrus Mailsystem User" cyrus >/dev/null || {
+ if getent passwd | grep -s -q -E '^cyrus:'; then
+ echo "Non-system user cyrus found. I will not overwrite a non-system" >&2
+ echo "user. Remove the user and reinstall cyrus-common-2.3." >&2
+ exit 1
+ fi
+ # unknown adduser error, simply exit
+ exit 1
+ }
+
+ # Force correct owner and modes
+ dpkg-statoverride --list /var/lib/cyrus 2>&1 >/dev/null ||
+ dpkg-statoverride --update --add cyrus mail 750 /var/lib/cyrus
+ dpkg-statoverride --list /var/spool/cyrus 2>&1 >/dev/null ||
+ dpkg-statoverride --update --add cyrus mail 755 /var/spool/cyrus
+ dpkg-statoverride --list /var/spool/sieve 2>&1 >/dev/null ||
+ dpkg-statoverride --update --add cyrus mail 755 /var/spool/sieve
+ dpkg-statoverride --list /var/run/cyrus 2>&1 >/dev/null ||
+ dpkg-statoverride --update --add cyrus mail 755 /var/run/cyrus
+ dpkg-statoverride --list /var/run/cyrus/socket 2>&1 >/dev/null ||
+ dpkg-statoverride --update --add cyrus mail 750 \
+ /var/run/cyrus/socket
+
+ # Add user cyrus to group SASL, if such group exists
+ adduser cyrus sasl || true
+
+ # Convert the spool to the proper mode, if needed (autodetects
+ # only Debian's default spool, this codepath is meant for package
+ # upgrades only)
+ # DISABLED, since rehash seems busted
+ #[ -d /var/spool/cyrus/mail/A ] && {
+ # echo Converting spools to basic hash scheme...
+ # #su - cyrus -c "/usr/lib/cyrus/upgrade/rehash basic"
+ # start-stop-daemon --start --exec /usr/lib/cyrus/upgrade/rehash --chuid cyrus:mail --verbose -- basic
+ #}
+
+ # Parse imapd.conf and generate all required directories...
+ # also kill any left over squatter indexes
+ /usr/sbin/cyrus-makedirs --cleansquat
+
+ # Deal with database type information
+ if [ -f /usr/lib/cyrus/cyrus-db-types.active ] ; then
+ # is it safe to start cyrmaster? compare "key value" pairs
+ # from the (old) active database types file with the new one
+ if verifydb /usr/lib/cyrus/cyrus-db-types.txt \
+ < /usr/lib/cyrus/cyrus-db-types.active ; then
+ db_input high cyrus-common-2.3/warnbackendchange || true
+ db_go || true
+ else
+ cp -p /usr/lib/cyrus/cyrus-db-types.txt /usr/lib/cyrus/cyrus-db-types.active
+ db_fset cyrus-common-2.3/warnbackendchange seen false || true
+ fi
+ else
+ [ -f /usr/lib/cyrus/cyrus-db-types.txt ] && \
+ cp -p /usr/lib/cyrus/cyrus-db-types.txt /usr/lib/cyrus/cyrus-db-types.active
+ db_fset cyrus-common-2.3/warnbackendchange seen false || true
+ fi
+
+ # Deal with hardwired config changes
+ if [ -f /usr/lib/cyrus/cyrus-hardwired-config.active ] ; then
+ # do we need to do something about a spool hash type change
+ # if verifydbkey /usr/lib/cyrus/cyrus-hardwired-config.txt USE_DIR_FULL \
+ # < /usr/lib/cyrus/cyrus-hardwired-config.active ; then
+ # ... (do hash conversion)...
+ # fi
+ cp -p /usr/lib/cyrus/cyrus-hardwired-config.txt \
+ /usr/lib/cyrus/cyrus-hardwired-config.active
+ else
+ [ -f /usr/lib/cyrus/cyrus-hardwired-config.txt ] && \
+ cp -p /usr/lib/cyrus/cyrus-hardwired-config.txt \
+ /usr/lib/cyrus/cyrus-hardwired-config.active
+ fi
+
+ # No leaking of debconf file handles to the initscript stuff
+ db_stop
+
+ # Register initscript, and start it (it is ok if start fails)
+ [ -x /etc/init.d/cyrus2.3 ] && {
+ update-rc.d cyrus2.3 defaults >/dev/null
+ invoke-rc.d cyrus2.3 start || true
+ }
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+db_stop
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postrm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postrm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postrm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.postrm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,78 @@
+#! /bin/sh
+# postrm script for cyrus-common-2.3
+# Copyright (c) 2002 by Henrique de Moraes Holschuh
+# Distributed under the GNU General Public License version 2
+# $Id: cyrus-common-2.3.postrm 551 2006-08-08 22:50:11Z sven $
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# debconf hook
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter> <new-version>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+ remove)
+ ;;
+ purge)
+ for i in /var/lib/cyrus /var/spool/sieve \
+ /var/spool/cyrus \
+ /var/run/cyrus /var/run/cyrus/socket ; do
+ dpkg-statoverride --remove $i || true
+ done
+ rm -rf /var/run/cyrus || true
+ rm /usr/lib/cyrus/cyrus-db-types.active || true
+ rm usr/lib/cyrus/cyrus-hardwired-config.active || true
+
+ # Should we remove our precious data?
+ db_title "Cyrus IMAPd 2.3" || true
+ db_fset cyrus-common-2.3/removespools seen false || true
+ db_input high cyrus-common-2.3/removespools || true
+ db_go || true
+
+ db_get cyrus-common-2.3/removespools
+ [ "${RET}" = "true" ] && {
+ for i in /var/spool/cyrus /var/lib/cyrus \
+ /var/spool/sieve /etc/sieve ; do
+ find "$i" -type f -exec rm -f '{}' \; || true
+ find "$i" -type d -depth -not -name 'lost+found' -exec rmdir '{}' \; || true
+ done
+ # Remove database type information
+ rm -f /usr/lib/cyrus/cyrus-*.active
+ }
+
+ update-rc.d cyrus2.3 remove >/dev/null
+ ;;
+
+ upgrade|failed-upgrade|disappear)
+ ;;
+ abort-upgrade)
+ # old version was in "configuration files only" state,
+ # installation of new package failed before or after unpack
+ ;;
+ abort-install)
+ # old version was fully installed, but upgrade failed
+ ;;
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.preinst
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.preinst?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.preinst (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.preinst Sat Aug 26 02:00:13 2006
@@ -1,0 +1,42 @@
+#! /bin/sh
+# preinst script for cyrus-common-2.3
+# Copyright (c) 2006 by Sven Mueller
+# Distributed under the GNU General Public License version 2
+# $Id: cyrus-common-2.3.preinst 557 2006-08-10 02:38:26Z sven $
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# debconf hook
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# <new-preinst> upgrade <old-version>
+# <new-preinst> install <old-version>
+# <old-preinst> abort-upgrade <new-version>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+ upgrade)
+ # old version was fully installed
+ ;;
+ install)
+ # old version was in "configuration files only" state
+ ;;
+ abort-upgrade)
+ # upgrade failed after unpack - error unwind is tried
+ # however, if it works, new-postrm is also called with abort-upgrade
+ ;;
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.prerm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.prerm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.prerm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.prerm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,43 @@
+#! /bin/sh
+# prerm script for cyrus-common-2.3
+# Copyright (c) 2002 by Henrique de Moraes Holschuh
+# Distributed under the GNU General Public License version 2
+# $Id: cyrus-common-2.3.prerm 229 2005-12-08 23:26:29Z astronut $
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ # Call initscript, if it is there to stop the daemon
+ invoke-rc.d cyrus2.3 stop || true
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.templates
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.templates?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.templates (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-common-2.3.templates Sat Aug 26 02:00:13 2006
@@ -1,0 +1,25 @@
+Template: cyrus-common-2.3/warnbackendchange
+Type: note
+_Description: Database backends have changed!
+ Comparation between /usr/lib/cyrus/cyrus-db-types.txt and
+ /usr/lib/cyrus/cyrus-db-types.active shows that database backends for
+ Cyrus IMAPd have been changed.
+ .
+ This means that those databases for which the database backends changed
+ might need to be converted manually to the new format, using the
+ cvt_cyrusdb(8) utility.
+ .
+ Please refer to /usr/share/doc/cyrus-common-2.3/README.Debian.database
+ for more information. Do not start cyrmaster until you have converted
+ the databases to the new format.
+
+Template: cyrus-common-2.3/removespools
+Type: boolean
+Default: false
+_Description: Remove the Cyrus spools, and user sieve scripts?
+ Should I remove the Cyrus mail and news spools, as well as the user's
+ sieve scripts, when the package is purged ?
+ .
+ This question only applies to the default spools and sieve script
+ directories in /var. If you modified their location in imapd.conf, the
+ new locations will not be removed; just the old ones in /var.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-db-types.upgrading_from_1.5.txt
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-db-types.upgrading_from_1.5.txt?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-db-types.upgrading_from_1.5.txt (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-db-types.upgrading_from_1.5.txt Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+DBENGINE BerkeleyDB3.2
+DUPLICATE db3_nosync
+MBOX db3
+SEEN db3
+SUBS flat
+TLS db3_nosync
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.dirs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.dirs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.dirs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.dirs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+usr/include/cyrus
+usr/lib
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+usr/lib/*.a
+usr/include/cyrus/*
+usr/share/man/man3/imclient*
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.links
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.links?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.links (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-dev-2.3.links Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+usr/share/doc/cyrus-common-2.3 usr/share/doc/cyrus-dev-2.3
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.doc-base
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.doc-base?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.doc-base (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.doc-base Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+Document: cyrus2.3-manual
+Title: CMU Cyrus 2.3 Manual
+Author: Carnegie Mellon University
+Abstract: This manual describes how to configure and administer
+ the Cyrus POP/IMAP mail system, version 2.3
+Section: mail
+
+Format: HTML
+Index: /usr/share/doc/cyrus-doc-2.3/html/index.html
+Files: /usr/share/doc/cyrus-doc-2.3/html/*.html
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.docs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.docs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.docs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.docs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+debian/UPGRADE.Debian
+debian/README.*
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.links
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.links?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.links (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-doc-2.3.links Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+usr/share/doc/cyrus-doc-2.3 usr/share/doc/cyrus-common-2.3/docs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.dirs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.dirs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.dirs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.dirs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+usr/sbin
+usr/lib/cyrus
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+etc/pam.d/imap
+usr/lib/cyrus/bin/imapd
+usr/lib/cyrus/bin/idled
+usr/sbin/squatter
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.links
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.links?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.links (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.links Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+usr/share/doc/cyrus-common-2.3 usr/share/doc/cyrus-imapd-2.3
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.manpages
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.manpages?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.manpages (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-imapd-2.3.manpages Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+debian/tmp/usr/share/man/man8/idled.8
+debian/tmp/usr/share/man/man8/imapd.8
+debian/tmp/usr/share/man/man8/squatter.8
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,146 @@
+#!/bin/sh -e
+#
+# cyrus-makedirs - Parses a Cyrus imap.d configuration file, and creates
+# the correct directory trees for all partitions
+#
+# Copyright 2001,2002 by Henrique de Moraes Holschuh <hmh at debian.org.
+# Released under the terms of the GNU General Public License (GPL) version 2
+#
+# $Id: cyrus-makedirs 229 2005-12-08 23:26:29Z astronut $
+
+# See lib/util.c, dir_hash_c for Cyrus' directory hashing
+# for the new hash style
+#HASHDIRS="A B C D E F G H I J K L M N O P Q R S T U V W"
+# for the old hash style
+HASHDIRS="a b c d e f g h i j k l m n o p q r s t u v w x y z"
+
+# Sane locale, please
+LC_ALL=C
+export LC_ALL
+
+CYRUSOPTFILESYS=1
+CONF=/etc/imapd.conf
+[ -r /etc/default/cyrus2.3 ] && . /etc/default/cyrus2.3
+
+getconf () {
+ confvalue=`sed --silent -e "/^[[:blank:]]*$1:/ { \
+ s#^[[:blank:]]*$1:[[:blank:]]*## \
+ p
+ }" < "$CONF" | head -1`
+ result=${confvalue:-$2}
+}
+
+killsquat=0
+[ "$1" = "--cleansquat" ] && {
+ killsquat=1
+ shift
+}
+
+
+CONF="${1:-$CONF}"
+[ -r "$CONF" ] || {
+ echo $0: unable to read configuration file $CONF. Aborting...
+ exit 1
+}
+
+getconf configdirectory /var/lib/cyrus
+confdir="$result"
+[ -d "$confdir" ] || {
+ echo $0: $confdir is not an directory. Aborting...
+ exit 2
+}
+
+getconf sievedir /etc/sieve
+sievedir="$result"
+
+getconf sieveusehomedir 0
+case "$result" in
+ 1|t|true|yes|on) nosievedir=1
+ ;;
+ *) nosievedir=0
+ ;;
+esac
+
+getconf hashimapspool 0
+case "$result" in
+ 1|t|true|yes|on) hashspool=1
+ ;;
+ *) hashspool=0
+ ;;
+esac
+
+# Partitions list
+partitions=`sed --silent -e "/^[[:blank:]]*partition-[[:alnum:]]\+:/ { \
+ s#^[[:blank:]]*partition-[[:alnum:]]\+:[[:blank:]]*## \
+ p
+ } " < "$CONF" | sort | uniq | xargs`
+
+# First, fix up the entire confdir subtree
+echo "Creating cyrus control directories in ${confdir}..."
+[ -d "$confdir" ] || mkdir -p "$confdir"
+chmod 750 "$confdir"
+for i in db proc socket log msg user quota; do
+ [ -d "$confdir/$i" ] || mkdir -p "$confdir/$i"
+ chmod 700 "$confdir/$i"
+done
+chmod 750 $confdir/socket
+for i in user quota ; do
+ for j in $HASHDIRS ; do
+ [ -d "$confdir/$i/$j" ] || mkdir "$confdir/$i/$j"
+ done
+done
+chown -R cyrus:mail "$confdir"
+
+# Now, create the spool partitions
+for i in $partitions ; do
+ echo "Creating partition spool $i..."
+ [ -d "$i" ] || mkdir -p "$i"
+ chmod 750 "$i"
+ [ $hashspool -eq 1 ] && {
+ for j in $HASHDIRS ; do
+ [ -d "$i/$j" ] || mkdir "$i/$j"
+ done
+ }
+ [ -d "$i/stage." ] || mkdir "$i/stage."
+ chown -R cyrus:mail "$i"
+ # and kill any squatter indexes
+ [ $killsquat -ne 0 ] && find "$i" -name 'cyrus.squat' -type f -exec rm -f "{}" \;
+done
+
+# And the sieve directory structure
+[ $nosievedir -eq 0 ] && {
+ [ -d "$sievedir" ] || mkdir "$sievedir"
+ chmod 755 "$sievedir"
+ for j in $HASHDIRS ; do
+ [ -d "$sievedir/$j" ] || mkdir "$sievedir/$j"
+ chmod 755 "$sievedir/$j"
+ done
+ chown -R cyrus:mail "$sievedir"
+}
+
+[ "x${CYRUSOPTFILESYS}" != "x1" ] && exit 0
+#
+# Fix attributes for every partition
+#
+# ext2: Don't use ext2 for Cyrus spools. But if you must, enable Sync writes
+# ext3: Journal data too, since that improves access time a LOT
+# (maybe in the future, there's a bug in 2.4.18 ext3 w/ +j)
+#
+echo "Trying to optimize Cyrus partitions, edit /etc/default/cyrus2.3 to disable..."
+partsys="${confdir} ${partitions}"
+filesys=`df -P -T ${partsys} | sed -e "1 d" -e "s/ \+/ /g" | cut -d " " -f 2 | xargs`
+for i in ${filesys} ; do
+ case ${i} in
+ ext2)
+ echo "Setting attributes to +S for ${partsys%% *}..."
+ find "${partsys%% *}" -type d -exec chattr +S "{}" \;
+ ;;
+ ext3)
+ echo "Setting attributes to -S -j for ${partsys%% *}..."
+ find "${partsys%% *}" -type d -exec chattr -S -j "{}" \;
+ ;;
+ esac
+ partsys="${partsys#* }"
+done
+
+exit 0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-makedirs.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,49 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" $Id: cyrus-makedirs.8 229 2005-12-08 23:26:29Z astronut $
+.\"
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH CYRUS-MAKEDIRS 8 "2002-12-08"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+cyrus-makedirs \- Sets up the Cyrus IMAPd system directories (spools)
+.SH SYNOPSIS
+.B cyrus-makedirs
+.RI [ configfile ]
+.br
+.SH DESCRIPTION
+This manual page documents briefly the
+.B cyrus-makedirs
+command.
+Cyrus-makedirs is the Debian version of Cyrus upstream's mkimap program.
+.PP
+You
+.B should
+call /usr/sbin/cyrus-makedirs when you change any imapd.conf(5) options
+that create or rename Cyrus mail stores/spools/partitions. It will be called
+automatically on package upgrades.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
+.\" respectively.
+.SH OPTIONS
+You can optionally tell cyrus-makedirs the Cyrus imapd.conf config file
+to use. /etc/imapd.conf is assumed, if no parameters are given.
+.SH SEE ALSO
+.BR imapd.conf(5),
+.BR /etc/default/cyrus2.3
+.SH AUTHOR
+This manual page was written by Henrique de Moraes Holschuh <hmh at debian.org>,
+for the Debian GNU/Linux system (but may be used by others).
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+etc/pam.d/mupdate
+usr/lib/cyrus/bin/*proxyd
+usr/lib/cyrus/bin/mupdate*
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.links
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.links?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.links (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-murder-2.3.links Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+usr/share/doc/cyrus-common-2.3 usr/share/doc/cyrus-murder-2.3
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.dirs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.dirs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.dirs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.dirs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+usr/sbin
+usr/lib/cyrus
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+etc/pam.d/nntp
+usr/lib/cyrus/bin/fetchnews
+usr/lib/cyrus/bin/nntpd
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.links
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.links?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.links (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.links Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+usr/share/doc/cyrus-common-2.3 usr/share/doc/cyrus-nntpd-2.3
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.manpages
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.manpages?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.manpages (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-nntpd-2.3.manpages Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+man/fetchnews.8
+man/nntpd.8
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.dirs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.dirs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.dirs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.dirs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+usr/lib/cyrus
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+etc/pam.d/pop
+usr/sbin/pop3*
+usr/lib/cyrus/bin/pop3d
+usr/share/man/man8/pop3d*
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.links
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.links?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.links (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.links Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+usr/share/doc/cyrus-common-2.3 usr/share/doc/cyrus-pop3d-2.3
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.manpages
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.manpages?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.manpages (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-pop3d-2.3.manpages Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+man/pop3d.8
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+usr/sbin/make_md5
+usr/sbin/sync_client
+usr/sbin/sync_reset
+usr/lib/cyrus/bin/sync_server
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.links
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.links?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.links (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.links Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+usr/share/doc/cyrus-common-2.3 usr/share/doc/cyrus-replication-2.3
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.manpages
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.manpages?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.manpages (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus-replication-2.3.manpages Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+debian/tmp/usr/share/man/man8/sync_client.8
+debian/tmp/usr/share/man/man8/sync_server.8
+debian/tmp/usr/share/man/man8/sync_reset.8
+debian/tmp/usr/share/man/man8/make_md5.8
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/cyrus.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,90 @@
+# Debian defaults for Cyrus IMAP server/cluster implementation
+# see cyrus.conf(5) for more information
+#
+# All the tcp services are tcpd-wrapped. see hosts_access(5)
+# $Id: cyrus.conf 528 2006-07-31 03:22:25Z astronut $
+
+START {
+ # do not delete this entry!
+ recover cmd="/usr/sbin/ctl_cyrusdb -r"
+
+ # this is only necessary if using idled for IMAP IDLE
+ # this is NOT to be enabled right now in Debian builds
+ #idled cmd="idled"
+
+ # this is useful on backend nodes of a Murder cluster
+ # it causes the backend to syncronize its mailbox list with
+ # the mupdate master upon startup
+ #mupdatepush cmd="/usr/sbin/ctl_mboxlist -m"
+
+ # this is recommended if using duplicate delivery suppression
+ delprune cmd="/usr/sbin/cyr_expire -E 3"
+ # this is recommended if caching TLS sessions
+ tlsprune cmd="/usr/sbin/tls_prune"
+}
+
+# UNIX sockets start with a slash and are absolute paths
+# you can use a maxchild=# to limit the maximum number of forks of a service
+# you can use babysit=true and maxforkrate=# to keep tight tabs on the service
+# most services also accept -U (limit number of reuses) and -T (timeout)
+SERVICES {
+ # --- Normal cyrus spool, or Murder backends ---
+ # add or remove based on preferences
+ imap cmd="imapd -U 30" listen="imap" prefork=0 maxchild=100
+ #imaps cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100
+ pop3 cmd="pop3d -U 30" listen="pop3" prefork=0 maxchild=50
+ #pop3s cmd="pop3d -s -U 30" listen="pop3s" prefork=0 maxchild=50
+ nntp cmd="nntpd -U 30" listen="nntp" prefork=0 maxchild=100
+ #nntps cmd="nntpd -s -U 30" listen="nntps" prefork=0 maxchild=100
+
+ # At least one form of LMTP is required for delivery
+ # (you must keep the Unix socket name in sync with imap.conf)
+ #lmtp cmd="lmtpd" listen="localhost:lmtp" prefork=0 maxchild=20
+ lmtpunix cmd="lmtpd" listen="/var/run/cyrus/socket/lmtp" prefork=0 maxchild=20
+ # ----------------------------------------------
+
+ # useful if you need to give users remote access to sieve
+ # by default, we limit this to localhost in Debian
+ sieve cmd="timsieved" listen="localhost:sieve" prefork=0 maxchild=100
+
+ # this one is needed for the notification services
+ notify cmd="notifyd" listen="/var/run/cyrus/socket/notify" proto="udp" prefork=1
+
+ # --- Murder frontends -------------------------
+ # enable these and disable the matching services above,
+ # except for sieve (which deals automatically with Murder)
+
+ # mupdate database service - must prefork at least 1
+ # (mupdate slaves)
+ #mupdate cmd="mupdate" listen=3905 prefork=1
+ # (mupdate master, only one in the entire cluster)
+ #mupdate cmd="mupdate -m" listen=3905 prefork=1
+
+ # proxies that will connect to the backends
+ #imap cmd="proxyd" listen="imap" prefork=0 maxchild=100
+ #imaps cmd="proxyd -s" listen="imaps" prefork=0 maxchild=100
+ #pop3 cmd="pop3proxyd" listen="pop3" prefork=0 maxchild=50
+ #pop3s cmd="pop3proxyd -s" listen="pop3s" prefork=0 maxchild=50
+ #lmtp cmd="lmtpproxyd" listen="lmtp" prefork=1 maxchild=20
+ # ----------------------------------------------
+}
+
+EVENTS {
+ # this is required
+ checkpoint cmd="/usr/sbin/ctl_cyrusdb -c" period=30
+
+ # this is only necessary if using duplicate delivery suppression
+ delprune cmd="/usr/sbin/cyr_expire -E 3" at=0401
+
+ # this is only necessary if caching TLS sessions
+ tlsprune cmd="/usr/sbin/tls_prune" at=0401
+
+ # indexing of mailboxs for server side fulltext searches
+
+ # reindex changed mailboxes (fulltext) approximately every other hour
+ #squatter_1 cmd="/usr/bin/nice -n 19 /usr/sbin/squatter -s" period=120
+
+ # reindex all mailboxes (fulltext) daily
+ #squatter_a cmd="/usr/sbin/squatter" at=0517
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/deletable.files
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/deletable.files?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/deletable.files (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/deletable.files Sat Aug 26 02:00:13 2006
@@ -1,0 +1,100 @@
+config.guess
+config.sub
+doc/man/arbitron.8.html
+doc/man/chk_cyrus.8.html
+doc/man/ctl_cyrusdb.8.html
+doc/man/ctl_deliver.8.html
+doc/man/ctl_mboxlist.8.html
+doc/man/cvt_cyrusdb.8.html
+doc/man/cyr_expire.8.html
+doc/man/cyradm.1.html
+doc/man/cyrus.conf.5.html
+doc/man/deliver.8.html
+doc/man/fetchnews.8.html
+doc/man/fud.8.html
+doc/man/idled.8.html
+doc/man/imapd.8.html
+doc/man/imapd.conf.5.html
+doc/man/imclient.3.html
+doc/man/imtest.1.html
+doc/man/installsieve.1.html
+doc/man/ipurge.8.html
+doc/man/krb.equiv.5.html
+doc/man/lmtpd.8.html
+doc/man/lmtptest.1.html
+doc/man/master.8.html
+doc/man/mbexamine.8.html
+doc/man/mbpath.8.html
+doc/man/mupdatetest.1.html
+doc/man/nntpd.8.html
+doc/man/nntptest.1.html
+doc/man/notifyd.8.html
+doc/man/pop3d.8.html
+doc/man/pop3test.1.html
+doc/man/quota.8.html
+doc/man/reconstruct.8.html
+doc/man/rmnews.8.html
+doc/man/sieveshell.1.html
+doc/man/sivtest.1.html
+doc/man/smmapd.8.html
+doc/man/smtptest.1.html
+doc/man/squatter.8.html
+doc/man/syncnews.8.html
+doc/man/timsieved.8.html
+doc/man/tls_prune.8.html
+doc/man/w
+doc/murder.png
+doc/netnews.png
+doc/text/altnamespace
+doc/text/anoncvs
+doc/text/bugs
+doc/text/changes
+doc/text/faq
+doc/text/feedback
+doc/text/index
+doc/text/install
+doc/text/install-admin-mb
+doc/text/install-auth
+doc/text/install-compile
+doc/text/install-configure
+doc/text/install-murder
+doc/text/install-netnews
+doc/text/install-perf
+doc/text/install-prereq
+doc/text/install-sieve
+doc/text/install-snmpmon
+doc/text/install-testing
+doc/text/install-upgrade
+doc/text/install-virtdomains
+doc/text/mailing-list
+doc/text/man
+doc/text/notes
+doc/text/os
+doc/text/overview
+doc/text/questions
+doc/text/readme
+doc/text/sieve
+doc/text/sieve-protocol
+doc/text/specs
+imap/imap_err.c
+imap/imap_err.h
+imap/lmtpstats.c
+imap/lmtpstats.h
+imap/mupdate_err.c
+imap/mupdate_err.h
+imap/nntp_err.c
+imap/nntp_err.h
+imap/pushstats.c
+imap/pushstats.h
+lib/imapopts.c
+lib/imapopts.h
+man/imapd.conf.5
+man/sieveshell.1
+sieve/addr-lex.c
+sieve/addr.c
+sieve/addr.h
+sieve/sieve-lex.c
+sieve/sieve.c
+sieve/sieve.h
+sieve/sieve_err.c
+sieve/sieve_err.h
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,14 @@
+This directory contains some sample files that may be of use with Cyrus.
+
+mboxtocyrus A script to import mbox format mailboxes into Cyrus
+ (by Michael-John Turner <mj at debian.org>
+
+syncldap2cyrus.pl retrieves a list of usernames from an LDAP server and
+ then tries to create a user mailbox in Cyrus, and then
+ any secondary mailboxes under that. The idea is that
+ you could run this via cron or manually every time you
+ add a user to your LDAP server, and they would then
+ have a Cyrus mailbox. This script also has a report
+ mode that shows you any users in LDAP that do not have
+ a Cyrus mailbox, and vice versa.
+ (by Stuart Young (aka Cef) <cef at optus.net>)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README.imapcreate.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README.imapcreate.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README.imapcreate.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/README.imapcreate.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,23 @@
+Launching the script without any parameters will show a short help. It
+should be pretty self-explanatory.
+
+Here are some examples on how the script could be invoked:
+
+- this will read the file list.txt, and create the mailboxes listed in it
+ with a 50MB quota:
+
+ cat list.txt | ./imapcreate.pl -u cyradm -p 'cyrpass' -q 50M mail.example.com
+
+- this will create a mailbox for john, using the Unix Hierarchy separator,
+ no quota, in verbose mode:
+
+ ./imapcreate.pl -u cyradm -m john -s -v mail.example.com
+
+ the output would look like this:
+
+ Creating user.john on default
+
+This script is far from being perfect, but it works great for me. feel free
+to e-mail me about it, to report bugs, to send patches etc:
+
+clement.hermann at free.fr
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/editsieve
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/editsieve?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/editsieve (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/editsieve Sat Aug 26 02:00:13 2006
@@ -1,0 +1,252 @@
+#!/bin/bash
+#
+# This script is copyright 2006 Sven Mueller <cyrus at incase.de>
+# Released under the terms of the GNU General public license
+# (GPL) version 2
+# Before distributing changed versions of the script, please ask
+# the original author to include your changes into the original
+# distribution files. Thanks.
+#
+umask 077
+
+# generic defaults
+
+DEFAULTDOMAIN=incase.de
+DEFAULTHOST=localhost
+DEFAULTCONFDIR="${HOME}/.editsieve"
+
+# report usage help
+function usage () {
+ echo "Usage: $0 -h"
+ echo " $0 --help"
+ echo " $0 [-c <confdir>] [-n <scriptname>] [-d <domain>|--domain <domain>] "
+ echo " [-p <password>] [-s <server>] <user>"
+ echo "Parameters:"
+ echo " -h|--help : Display this help"
+ echo " -c <dir> | --confdir <dir> : Directory to store configuration and other"
+ echo " data in (like the user's sieve script)."
+ echo " The directory will be created if necessary."
+ echo " Default: ${DEFAULTCONFDIR}"
+ echo " -d <domain>|--domain <domain> : Specify domain for the user."
+ echo " Default: ${DEFAULTDOMAIN}"
+ echo " -n <script>|--name <script> : Use <script> as the name of the script to"
+ if [ "$SCRIPTNAME" ]; then
+ echo " handle. Default: ${SCRIPTNAME}"
+ else
+ echo " handle. Default: <user>_<domain>"
+ fi
+ echo " -s <host> | --server <host> : Use <host> as the host to connect to."
+ echo " Default: ${DEFAULTHOST}"
+ echo " -p <pwd> | --password <pwd> : Deprecated: Define password to pass to"
+ echo " sieveshell (also on commandline). Using this"
+ echo " option might be convenient, but it is a"
+ echo " security risk. Default: Let sieveshell ask"
+ echo " <user> : User for which to edit the"
+ echo " sieve script. If specified as"
+ echo " user at do.main, use do.main as "
+ echo " the users domain."
+ echo "Note that a conflict between the domain specified with the"
+ echo "--domain parameter and a user specified in @do.main notation"
+ echo "will cause this script to abort."
+ echo
+}
+
+# Set initial values
+
+USER=""
+CONFDIR="${DEFAULTCONFDIR}"
+HOST="${DEFAULTHOST}"
+
+while [ $# -gt 0 ]; do
+ case "${1}" in
+ -d|--domain)
+ DOMAIN="${2}"
+ shift
+ shift
+ ;;
+ -c|--confdir)
+ CONFDIR="${2}"
+ shift
+ shift
+ ;;
+ -n|--script|--name)
+ SCRIPTNAME="${2}"
+ shift
+ shift
+ ;;
+ -p|--pass*)
+ PASSWORD="-p ${2}"
+ echo "WARNING: Passing passwords on the commandline is a potential security hazard."
+ shift
+ shift
+ ;;
+ -s|--server|--host)
+ HOST="$2"
+ shift
+ shift
+ ;;
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ *)
+ # If USER had already been set, reaching this point
+ # means a second user was named. If so: report an error
+ # and show usage help.
+ if [ "${USER}" != "" ]; then
+ usage
+ echo ""
+ echo "ERROR: Multiple users specified" >&2
+ exit 1
+ fi
+ USER=$1
+ shift
+ ;;
+ esac
+done
+
+# check wether a username had been specified
+if [ "${USER}" = "" ]; then
+ echo "ERROR: No user specified" >&2
+ usage
+ exit 1
+fi
+
+# If we can't create files inside ${CONFDIR}, try to create a directory named ${CONFDIR}
+if ! touch "${CONFDIR}"/testfile; then
+ if [ -e "${CONFDIR}" ]; then
+ echo "ERROR: ${CONFDIR} exists, but is no directory or link to a directory"
+ exit 1
+ fi
+ if ! mkdir "${CONFDIR}" ; then
+ echo "ERROR: ${CONFDIR} doesn't exist and can't be created"
+ exit 1
+ fi
+else
+ rm -f "${CONFDIR}/testfile"
+fi
+
+# check wether the domain had been specified
+if [ "${DOMAIN}" = "" ]; then
+ # if the user was specified as user at domain, use the domainpart from there
+ if echo "${USER}" | grep -q "@" ; then
+ DOMAIN=`echo "${USER}" | sed -e 's/.*@//'`
+ USER=`echo "${USER}" | sed -e 's/@.*//'`
+ else
+ # if no domain was specified and the username didn't include the domain,
+ # use the default domain.
+ DOMAIN="${DEFAULTDOMAIN}"
+ fi
+else
+ # DOMAIN had been specified. Check for username in user at domain form
+ if echo "${USER}" | grep -q "@" ; then
+ # Yes, user was specified as user at domain
+ UDOMAIN=`echo "${USER}" | sed -e 's/.*@//'`
+ USER=`echo "${USER}" | sed -e 's/@.*//'`
+ # check wether the domain specified using the --domain switch
+ # conflicts with the one given using the user at domain notation
+ if [ "${UDOMAIN}" != "${DOMAIN}" ]; then
+ # yes they conflict: Abort with suitable error message
+ echo "ERROR: Domain part specified in username but conflicts with"\
+ "domain specified in -d parameter" >&2
+ exit 1
+ fi
+ fi
+fi
+
+# Set SCRIPTNAME to ${USER}_${DOMAIN} if not already set
+SCRIPTNAME="${SCRIPTNAME:-${USER}_${DOMAIN}}"
+
+echo "Trying to fetch script for ${USER}@${DOMAIN} from ${HOST}"
+if sieveshell -a "${USER}@${DOMAIN}" -u "${USER}@${DOMAIN}" \
+ ${PASSWOIRD} -e "get ${SCRIPTNAME} ${CONFDIR}/${SCRIPTNAME}" ${HOST}
+then
+ # fetch was successfull, keep a copy for later
+ cp -f "${CONFDIR}/${SCRIPTNAME}" "${CONFDIR}/${SCRIPTNAME}.orig"
+else
+ # an error occured while downloading.
+ echo WARNING: Unable to download script >&2
+ if [ ! -f "${CONFDIR}/${SCRIPTNAME}" ]; then
+ # there is no pre-existing script in $CONFDIR,
+ # create a default script
+ echo starting with a default script. >&2
+ # <<-EOF is like <<EOF except that it removes
+ # as much whitespace from the beginning of lines
+ # as there is in the first line
+ cat > "${CONFDIR}/${SCRIPTNAME}" <<-EOF
+ # Mail rules for ${USER}@${DOMAIN}
+ #
+ # load fileinto extension
+ require ["fileinto"];
+ #
+ # file spam into special folder
+ if header :contains "X-Spam-Flag" "YES"
+ {
+ fileinto "INBOX.Z_SPAM.suspected";
+ stop;
+ }
+ #
+ EOF
+ echo -n "" > "${CONFDIR}/${SCRIPTNAME}.orig"
+ else
+ echo "${CONFDIR}/${SCRIPTNAME}.orig exists, using it." >&2
+ fi
+fi
+SYNTAXOK=0
+# if $EDITOR is non-empty, use that to call the editor.
+# otherwise, use vi
+EDITOR="${EDITOR:-vi}"
+while [ "$SYNTAXOK" = "0" ]; do
+ "${EDITOR}" "${CONFDIR}/${SCRIPTNAME}"
+ echo "trying to compile rules file"
+ if /usr/lib/cyrus/bin/sievec -C /etc/imapd.conf "${CONFDIR}/${SCRIPTNAME}" "${CONFDIR}/${SCRIPTNAME}.bc" ; then
+ # all fine, sievec was able to compile the script, syntax is thus OK
+ rm "${CONFDIR}/${SCRIPTNAME}.bc"
+ SYNTAXOK=1
+ else
+ # There was some error compiling the script, askü user what to do
+ echo "ERROR: Compiling the script failed."
+ echo "Press 'e'+return (or just return) to edit the file again,"
+ echo "Press 's'+return for a shell (returns to editor after shell exits)"
+ echo "Predd 'a'+return or CTRL-C to abort."
+ echo "Press 'i'+return to ignore"
+ VALID=0
+ while [ "$VALID" = "0" ]; do
+ read a || exit 1
+ if [ "$a" = "i" ] || [ "$a" = "I" ]; then
+ # asume sievec had no problem
+ VALID=1
+ SYNTAXOK=1
+ elif [ "$a" = "s" ] || [ "$a" = "S" ]; then
+ VALID=1
+ echo "The edited file can be found in ${CONFDIR}/${SCRIPTNAME}"
+ echo "After the shell terminates, you will be returned to the editor"
+ bash
+ elif [ "$a" = "a" ] || [ "$a" = "A" ]; then
+ exit 1
+ elif [ "$a" = "e" ] || [ "$a" = "E" ] || [ "$a" = "" ]; then
+ VALID=1
+ else
+ echo "INVALID CHOICE, try again."
+ fi
+ done
+ fi
+done
+echo "copying file ${SCRIPTNAME} to ${SCRIPTNAME}.edited"
+cp "${CONFDIR}/${SCRIPTNAME}" "${CONFDIR}/${SCRIPTNAME}.edited"
+# check wether the file changed at all. If not, we can skip uploading
+echo trying diff
+if diff -q "${CONFDIR}/${SCRIPTNAME}.orig" "${CONFDIR}/${SCRIPTNAME}"; then
+ echo "Sieve rules unchanged, no upload needed."
+else
+ echo "Sieve rules changed, uploading and activating new file."
+ echo "${USER}@${DOMAIN}"
+ if sieveshell -a "${USER}@${DOMAIN}" -u "${USER}@${DOMAIN}" -e "put ${CONFDIR}/${SCRIPTNAME}
+activate ${SCRIPTNAME}" ${HOST} ; then
+ rm -f "${CONFDIR}/${SCRIPTNAME}.edited" ; echo "Upload OK"
+ else
+ echo "Upload failed! Leaving edited file in ${SCRIPTNAME}.edited"
+ fi
+ rm "${CONFDIR}/${SCRIPTNAME}.orig"
+fi
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/imapcreate.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/imapcreate.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/imapcreate.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/imapcreate.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,167 @@
+#!/usr/bin/perl -w
+#
+# imapcreate: create IMAP mailboxes with quotas
+# Reads user names from standard input.
+# originally found on http://cyrus-utils.sourceforge.net
+# © 2001 Garry Mills
+#
+# enhanced by Clément "nodens" Hermann <clement.hermann at free.fr>
+#
+# I'd like to consider this as GPL'd (cf www.gnu.org), but won't add any
+# copyright without the original author's consent.
+# last modification : 2004/11/23
+# Changes :
+# 2005/03/31 - Finally found out the original author's name.
+# 2004/11/23 - removed LOGIN as a default mech, now use cyrus' default
+# - Added --auth option to specify mech
+#
+# TODO : fix STDIN collision when reading password AND mailboxes name from STDIN
+#
+use Getopt::Long;
+use Cyrus::IMAP::Admin;
+use strict;
+
+# CLI options
+my ($debug,$user,$pass,$quota, at part,$useunixhierarchy, at mailboxes,$delete,$cyrus,$authmech);
+
+sub usage {
+ print "imapcreate - create IMAP mailboxes with quotas\n";
+ print " usage:\n";
+ print " imapcreate [-d] [-u user] [--auth mechanism] [-p pass] [-m mailbox1[,mailbox2][,mailbox<n>]] [-q quota] [-t partition:list]\n";
+ print " [-s] [-v] <server>\n";
+ print "\n";
+ print "if -s is set, we'll use the unix hierarchy separator (see imapd.conf(1))\n";
+ print "if -d is set, we'll delete mailboxes instead of creating them\n";
+ print "You can use M or ,m to specify quotas. e.g. 10M. By default,\n";
+ print "the quota is expressed in Kbytes.\n";
+ print "If no password is submitted with -p, we'll prompt for one.\n";
+ print "if no mailbox name is specified with -m, read user names from standard input\n";
+ print "if -v is set, we'll run in debug mode, and print information on stdout\n";
+ print "\n";
+ print "The default mechanism is used for authentication. If you need another\nmechanism, (try LOGIN), use --auth <mechanism> option\n";
+ print "\n";
+ print " example: \n";
+ print " imapcreate -u cyradm -m foo,bar,joe -q 50000 -t p1:p2 mail.testing.umanitoba.ca\n";
+ print "\n";
+ exit 0;
+}
+
+# Create a mailbox... usage : &CreateMailBox(user,partition[,quota]).
+# You have to be authentified already. We use "$cyrus" as the connection name.
+# partition can be 'default'
+sub CreateMailBox {
+ my $mbuser = $_[0];
+ my $mbpart = $_[1];
+ my $mbquota = $_[2];
+
+ print "Creating $mbuser on $mbpart\n" if $debug;
+ if ($mbpart eq 'default') {
+ $cyrus->createmailbox($mbuser);
+ }
+ else {
+ $cyrus->createmailbox($mbuser, $mbpart);
+ }
+ warn $cyrus->error if $cyrus->error;
+
+ # Set the quota
+ if ($mbquota) {
+ print "Setting quota for $mbuser to $mbquota\n" if $debug;
+ $cyrus->setquota($mbuser, 'STORAGE', $mbquota);
+ warn $cyrus->error if $cyrus->error;
+ }
+}
+
+# Delete a mailbox. Usage: $DeleteMailBox($user)
+# Assuming we use $user as the admin.
+sub DeleteMailBox {
+ my $mbuser = $_[0];
+ my $delacl = "c";
+
+ print "Deleting $mbuser\n" if $debug;
+ $cyrus->setaclmailbox($mbuser, $user, $delacl);
+ $cyrus->deletemailbox($mbuser);
+ warn $cyrus->error if $cyrus->error;
+}
+
+GetOptions( "d|delete" => \$delete,
+ "u|user=s" => \$user,
+ "auth=s" => \$authmech,
+ "p|pass=s" => \$pass,
+ "m|mailboxes=s" => \@mailboxes,
+ "q|quota=s" => \$quota,
+ "s|UnixHierarchy" => \$useunixhierarchy,
+ "t|part=s" => \@part,
+ "v|verbose" => \$debug );
+
+ at part = split(/:/, join(':', @part));
+push @part, 'default' unless @part;
+my $pn = 0;
+ at mailboxes = split(/,/, join(',', @mailboxes));
+
+my $server = shift(@ARGV) if (@ARGV);
+usage unless $server;
+
+# quotas formatting:
+if ($quota) {
+ if ($quota =~ /^(\d+)([mk]?)$/i) {
+ my $numb = $1;
+ my $letter = $2;
+ if ($letter =~ /^m$/i) {
+ $quota = $numb * 1024;
+ print "debug: quota=$quota\n" if $debug;
+ } elsif ($letter =~ /^k$/i) {
+ $quota = $numb;
+ print "debug: quota=$quota\n" if $debug;
+ } else {
+ die "malformed quota: $quota (must be at least one digit eventually followed by m, M, k or K\n";
+# $quota = $numb;
+# print "debug: quota=$quota\n" if $debug;
+ }
+ } else {
+ die "malformed quota: $quota (must be at least one digit eventually followed by m, M, k or K\n";
+ }
+}
+
+# Authenticate
+$cyrus = Cyrus::IMAP::Admin->new($server);
+
+if ($authmech) {
+ $cyrus->authenticate(-mechanism => $authmech,
+ -user => $user,
+ -password => $pass);
+} else {
+ $cyrus->authenticate(
+ -user => $user,
+ -password => $pass);
+}
+die $cyrus->error if $cyrus->error;
+
+# if there isn't any mailbox defined yet, get them from standard input
+if (! (defined $mailboxes[0])) {
+ # For all users
+ while (<>) {
+ chomp;
+ my $mbox = $_;
+ push @mailboxes, $mbox;
+ }
+}
+
+# create/delete mailboxes for each user
+foreach my $mailbox (@mailboxes) {
+ if ($useunixhierarchy) {
+ $mailbox = 'user/' . $mailbox;
+ } else {
+ $mailbox = 'user.' . $mailbox;
+ }
+
+ if ($delete) {
+ &DeleteMailBox($mailbox)
+ } else {
+ # Select the partition
+ my $pt = $part[$pn];
+ $pn += 1;
+ $pn = 0 unless $pn < @part;
+ &CreateMailBox($mailbox,$pt,$quota)
+ }
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/mboxtocyrus
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/mboxtocyrus?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/mboxtocyrus (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/mboxtocyrus Sat Aug 26 02:00:13 2006
@@ -1,0 +1,69 @@
+#!/bin/sh
+#
+# Script to import mbox-format mailboxes to Cyrus folders
+# Requires formail (from procmail)
+#
+# Note: As this runs cyrdeliver directly, you'll need to be
+# a member of the mail group for it to work.
+#
+# Note2: Make sure the user 'postman' is listed as an lmtp_admin
+# that is allowed to proxy.
+#
+# Use this script at your own risk! I'm not responsible if
+# it trashes your mail system :)
+#
+# By Michael-John Turner <mj at debian.org>
+#
+# Changelog:
+# Fri Dec 1 21:19:19 SAST 2000
+# - Incorporate some modifications from Tomas Pospisek <tpo at spin.ch>
+#
+
+USER=$1
+MAILBOX=$2
+CYRUSFOLDER=$3
+CYRDELIVER=/usr/sbin/cyrdeliver
+FORMAIL=/usr/bin/formail
+
+if ! [ -x "$FORMAIL" ]; then
+ echo ""
+ echo "formail (from procmail) is required to run this script"
+ echo ""
+ exit 1
+fi
+
+
+# This assumes id prints group names within parentheses
+if ! `id | grep -q "(mail)"`; then
+ echo ""
+ echo "You must be a member of the mail group to run this script"
+ echo ""
+ exit 1
+fi
+
+
+if [ "$USER" = "" ]; then
+ echo ""
+ echo "syntax: $0 user [mbox] [cyrus folder]"
+ echo ""
+ echo "If no mbox is specified, the user and mbox name are taken to be the same"
+ echo "If no cyrus folder is specified, the INBOX is used"
+ echo ""
+ exit 2
+fi
+
+
+
+if [ "$MAILBOX" == "" ]; then
+ MAILBOX=$USER
+fi
+
+if [ "$CYRUSFOLDER" == "" ]; then
+ echo "Adding mailbox '$MAILBOX' to Cyrus INBOX of user '$USER'..."
+ $FORMAIL -I "From " < $MAILBOX -s $CYRDELIVER $USER
+ else
+ echo "Adding mailbox '$MAILBOX' to Cyrus folder '$CYRUSFOLDER' of user '$USER'..."
+ $FORMAIL -I "From " < $MAILBOX -s $CYRDELIVER -a postman -m $CYRUSFOLDER $USER
+fi
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/syncldap2cyrus.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/syncldap2cyrus.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/syncldap2cyrus.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/examples/syncldap2cyrus.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,324 @@
+#!/usr/bin/perl -w
+use strict;
+use vars qw($opt_a $opt_f $opt_n $opt_r);
+use Getopt::Std;
+use Net::LDAP;
+use Cyrus::IMAP::Admin;
+
+# Requires: Getopt::Std, Net::LDAP, Cyrus::IMAP::Admin
+# Debian pkgs: libnet-ldap-perl, libcyrus-imap-perl21
+
+# Script Title : syncldap2cyrus.pl
+# Written By : Stuart Young (aka Cef) <cef at optus.net>
+# Last Modified: Mon Mar 14 23:59:14 UTC 2005
+# Description:
+# syncldap2cyrus.pl retrieves a list of usernames from an LDAP server
+# and then tries to create a user mailbox in Cyrus, and then any
+# secondary mailboxes under that. The idea is that you could run this
+# via cron or manually every time you add a user to your LDAP server,
+# and they would then have a Cyrus mailbox. This script also has a
+# report mode that shows you any users in LDAP that do not have a
+# Cyrus mailbox, and vice versa.
+
+# Notes:
+# This script is FREE. There is no support. If it breaks, you get to
+# keep all the pieces.
+# Please do not complain about the quality or style of this script,
+# or you will be ignored.
+# If you want to add SSL/TLS and/or inbuilt SASL support, go for it!
+# Yes I know it will use a lot of memory if there are lots of users
+# and/or mailboxes. Live with it, or rewrite it - your call.
+
+sub Usage ()
+{
+ return <<END;
+usage: syncldap2cyrus.pl [-a|-f|-n|-r]
+
+ -a : Add all users from LDAP to Cyrus
+ -f : Force creation of mailboxes even if they have errors (implies -a)
+ -n : Do not add users to Cyrus, just display (implies -a)
+ -r : Report on differences between LDAP and Cyrus only (implies -n)
+END
+}
+
+# No options, give a Usage message
+(scalar(@ARGV)) or
+ die Usage();
+
+getopts('afnr');
+
+# Get options
+my $addcyrus = 1;
+my $forcecreate = 0;
+my $report = 0;
+my $go = 0;
+
+if (defined($opt_a))
+{
+ $go = 1;
+}
+if (defined($opt_f))
+{
+ $go = 1;
+ $forcecreate = 1;
+}
+if (defined($opt_n))
+{
+ $go = 1;
+ $addcyrus = 0;
+}
+if (defined($opt_r))
+{
+ $go = 1;
+ $report = 1;
+ $addcyrus = 0;
+}
+
+# No regognised options, give a usage message
+if ($go == 0)
+{
+ die Usage();
+}
+
+# Settings - should come from config file(s) at some point
+
+# Debug mode, normally 0
+my $debug = 0;
+# Cyrus Host to connect to
+my $cyrus_host = 'localhost';
+# Cyrus admin user & password
+my $cyrus_admin = 'cyrus';
+my $cyrus_pass = 'secret';
+# Cyrus Unix Seperator - allow .'s in names (unixhierarchysep in cyrus)
+my $cyrus_unix_sep = 0;
+# LDAP server uri
+my $ldap_uri = 'ldap://localhost/';
+# LDAP bind domain & password
+my $ldap_bind_domain = 'cn=Manager, dc=example, dc=com';
+my $ldap_bind_pass = 'secret';
+# LDAP search base
+my $ldap_search_base = 'ou=People, dc=example, dc=com';
+# LDAP search scope
+my $ldap_search_scope = 'sub';
+# LDAP user attribute to return.
+my $ldap_user_attr = 'uid';
+# LDAP search query. Where possible, use $ldap_attr here to avoid
+# problems when changing the query
+my $ldap_search_query = "($ldap_user_attr=*)";
+# List of mailboxes to create for each user
+my @mboxlist = ('Trash', 'Sent', 'Spam', 'Drafts');
+
+# General vars
+my $count = 0;
+my $realuser = '';
+my $done = 0;
+
+# Connect to LDAP and bind
+my $ldap = Net::LDAP->new($ldap_uri) or
+ die "Can't connect to LDAP server at " . $ldap_uri;
+my $mesg = $ldap->bind ($ldap_bind_domain, password => $ldap_bind_pass);
+
+$mesg = $ldap->search ( base => $ldap_search_base,
+ scope => $ldap_search_scope,
+ filter => $ldap_search_query,
+ attr => $ldap_user_attr );
+
+$mesg->code && die "LDAP error: " . $mesg->error;
+
+# Connect to Cyrus via IMAP
+my $client = 0;
+my $rc = 0;
+my $sepchar = '.';
+
+$client = Cyrus::IMAP::Admin->new("$cyrus_host");
+if ($debug == 1)
+{
+ print "Connecting to Cyrus using user: ". $cyrus_admin. "\n";
+}
+$rc = $client->authenticate(-user => $cyrus_admin, -password => $cyrus_pass) or
+ die "Can't authenticate to Cyrus on $cyrus_host as user: ". $cyrus_admin. "\n";
+if ($cyrus_unix_sep == 1)
+{
+ $sepchar = '/';
+}
+my $prefix = "user".$sepchar;
+
+# Populate the LDAP user list - Very messy but works
+my $ldaprawdata = '';
+my $ldapfieldattr = '';
+my $ldapfielddata = '';
+my $ldaphref = $mesg->as_struct;
+my @ldapuserlist = ();
+foreach (keys %$ldaphref)
+{
+ $ldaprawdata = $$ldaphref{$_};
+ my @ldapsortattr = sort keys %$ldaprawdata;
+ foreach $ldapfieldattr (@ldapsortattr)
+ {
+ next if ( $ldapfieldattr =~ /;binary$/ );
+ my $ldapfielddata = @$ldaprawdata{$ldapfieldattr};
+ if ($debug == 1)
+ {
+ print "$ldapfieldattr = @$ldapfielddata\n";
+ }
+ if ( $ldapfieldattr eq $ldap_user_attr )
+ {
+ $ldapuserlist[$count] = "@$ldapfielddata";
+ }
+ }
+ $count += 1;
+}
+
+my $maildata = '';
+my @mailboxes = $client->list('%', $prefix);
+my @cyrusmboxes = ();
+if ($debug == 1)
+{
+ print "\nThere are ". at ldapuserlist," LDAP users\n";
+ print "\nThere are ". at mailboxes," Cyrus mailboxes\n";
+}
+
+$count = 0;
+
+# Populate the Cyrus mailbox list
+foreach $maildata (@mailboxes)
+{
+ # Note: Element 0 = full mailbox name/path
+ if ($addcyrus == 0 && $report == 0)
+ {
+ print "Cyrus: @{$maildata}[0]\n";
+ }
+ # Remove the Cyrus user part
+ $cyrusmboxes[$count] = substr(@{$maildata}[0],length($prefix),length(@{$maildata}[0]));
+ $count += 1;
+}
+
+my $item = '';
+my %seen = ();
+my @answer = ();
+
+if ($report == 1)
+{
+ $item = '';
+ %seen = ();
+ @answer = ();
+ $count = 0;
+ # Which users are in Cyrus but not in LDAP?
+ @seen{@ldapuserlist} = ();
+ foreach $item (@cyrusmboxes)
+ {
+ push (@answer, $item) unless exists $seen{$item};
+ }
+ foreach $item (@answer)
+ {
+ print "In Cyrus but not LDAP: ". $item ."\n";
+ $count += 1;
+ }
+
+ $item = '';
+ %seen = ();
+ @answer = ();
+ # Which mailboxes are in LDAP, but not in Cyrus?
+ @seen{@cyrusmboxes} = ();
+ foreach $item (@ldapuserlist)
+ {
+ push (@answer, $item) unless exists $seen{$item};
+ }
+ foreach $item (@answer)
+ {
+ print "In LDAP but not Cyrus: ". $item ."\n";
+ $count += 1;
+ }
+ if ($count == 0 && $debug == 1)
+ {
+ print "No differences.\n";
+ }
+}
+else
+{
+ # Iterate over the LDAP user list
+ $count = 0;
+ foreach $realuser (@ldapuserlist)
+ {
+ if ($addcyrus == 0)
+ {
+ # Display matching ldap record
+ print "LDAP : $realuser\n";
+ }
+ elsif ($addcyrus == 1)
+ {
+ $done = 0;
+ # We check if the Cyrus mailbox exists first, and if not, create it
+ # We ALWAYS check each individual user mailbox too, in case the list
+ # in the var @mailboxes gets updated
+ if ($client->list("$prefix$realuser") && $forcecreate == 0)
+ {
+ if ($debug == 1)
+ {
+ print "Mailbox already exists for $realuser\n";
+ }
+ }
+ elsif ($client->create("$prefix$realuser"))
+ {
+ $done += 1;
+ if ($client->setacl("$prefix$realuser", ${cyrus_admin} => "cd"))
+ {
+ if ($debug == 1)
+ {
+ print "Admin permissions set on $prefix$realuser\n"
+ }
+ }
+ else
+ {
+ print STDERR "Couldn't set $cyrus_admin\'s ACL on mailbox $prefix$realuser\: " . $client->error . "\n";
+ if ($forcecreate == 0)
+ {
+ exit 1;
+ }
+ }
+ }
+ else
+ {
+ print STDERR "Couldn't create mailbox $prefix$realuser\: " . $client->error . "\n";
+ if ($forcecreate == 0)
+ {
+ exit 1;
+ }
+ }
+ foreach my $mailbox ( @mboxlist )
+ {
+ if ($client->list("$prefix$realuser$sepchar$mailbox"))
+ {
+ if ($debug)
+ {
+ print "Mailbox $mailbox already exists for $realuser\n";
+ }
+ }
+ elsif ($client->create("$prefix$realuser$sepchar" . ${mailbox}))
+ {
+ $done += 1;
+ }
+ else
+ {
+ print STDERR "Couldn't create mailbox $prefix$realuser$sepchar" . ${mailbox}.": " . $client->error . "\n";
+ if ($forcecreate == 0)
+ {
+ exit 1;
+ }
+ }
+ }
+ if ($done > 0)
+ {
+ print "User $realuser\'s mailboxes created successfully\n";
+ $count += 1;
+ }
+ }
+ }
+ if ($count > 0)
+ {
+ print "Created $count user mailboxes\n";
+ }
+}
+
+$mesg = $ldap->unbind;
+exit 0;
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/executable.files
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/executable.files?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/executable.files (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/executable.files Sat Aug 26 02:00:13 2006
@@ -1,0 +1,42 @@
+./autogen.sh
+./configure
+./contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl
+./contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl
+./contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl
+./contrib/cyrus-graphtools.1.0/script/cyrus.pl
+./contrib/cyrus-graphtools.1.0/script/run
+./contrib/mupdate-test.pl
+./contrib/notify_unix/simple_notify.pl
+./contrib/notify_unix/sql_notify.pl
+./debian/cyrus-makedirs
+./debian/cyrus-common-2.3.cyrus2.3.init
+./debian/cyrus-common-2.3.postinst
+./debian/cyrus-common-2.3.postrm
+./debian/cyrus-common-2.3.prerm
+./debian/examples/mboxtocyrus
+./debian/rules
+./doc/internal/internationalization.html
+./et/compile_et.sh
+./et/config_script
+./imap/xversion.sh
+./install-sh
+./lib/test/run
+./makedepend/configure
+./makedepend/install-sh
+./mkinstalldirs
+./netnews/inn.diffs
+./perl/imap/examples/test-imsp.pl
+./snmp/snmpgen
+./tools/arbitronsort.pl
+./tools/config2header
+./tools/config2man
+./tools/dohash
+./tools/masssievec
+./tools/mkimap
+./tools/mknewsgroups
+./tools/mupdate-loadgen.pl
+./tools/not-mkdep
+./tools/rehash
+./tools/translatesieve
+./tools/undohash
+./tools/upgradesieve
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/get-backtrace.gdb
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/get-backtrace.gdb?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/get-backtrace.gdb (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/get-backtrace.gdb Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+c
+bt
+quit
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imap.pam
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imap.pam?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imap.pam (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imap.pam Sat Aug 26 02:00:13 2006
@@ -1,0 +1,14 @@
+# PAM configuration file for Cyrus IMAP service
+# $Id: imap.pam 5 2005-03-12 23:19:45Z sven $
+#
+# If you want to use Cyrus in a setup where users don't have
+# accounts on the local machine, you'll need to make sure
+# you use something like pam_permit for account checking.
+#
+# Remember that SASL (and therefore Cyrus) accesses PAM
+# modules through saslauthd, and that SASL can only deal with
+# plaintext passwords if PAM is used.
+#
+
+ at include common-auth
+ at include common-account
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imapd.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imapd.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imapd.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/imapd.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,319 @@
+# Debian Cyrus imapd.conf
+# $Id: imapd.conf 544 2006-08-08 16:37:26Z sven $
+# See imapd.conf(5) for more information and more options
+
+# Configuration directory
+configdirectory: /var/lib/cyrus
+
+# Which partition to use for default mailboxes
+defaultpartition: default
+partition-default: /var/spool/cyrus/mail
+
+# News setup
+partition-news: /var/spool/cyrus/news
+newsspool: /var/spool/news
+
+# Alternate namespace
+# If enabled, activate the alternate namespace as documented in
+# /usr/share/doc/cyrus-doc-2.3/html/altnamespace.html, where an user's
+# subfolders are in the same level as the INBOX
+# See also userprefix and sharedprefix on imapd.conf(5)
+altnamespace: no
+
+# UNIX Hierarchy Convention
+# Set to yes, and cyrus will accept dots in names, and use the forward
+# slash "/" to delimit levels of the hierarchy. This is done by converting
+# internally all dots to "^", and all "/" to dots. So the "rabbit.holes"
+# mailbox of user "helmer.fudd" is stored in "user.elmer^fud.rabbit^holes"
+unixhierarchysep: no
+
+# Rejecting illegal characters in headers
+# Headers of RFC2882 messages must not have characters with the 8th bit
+# set. However, too many badly-written MUAs generate this, including most
+# spamware. Enable this to reject such messages.
+#reject8bit: yes
+
+# Munging illegal characters in headers
+# Headers of RFC2882 messages must not have characters with the 8th bit
+# set. However, too many badly-written MUAs generate this, including most
+# spamware. If you kept reject8bit disabled, you can choose to leave the
+# crappage untouched by disabling this (if you don't care that IMAP SEARCH
+# won't work right anymore.
+#munge8bit: no
+
+# Forcing recipient user to lowercase
+# Cyrus 2.3 is case-sensitive. If all your mail users are in lowercase, it is
+# probably a very good idea to set lmtp_downcase_rcpt to true. This is set by
+# default, per RFC2821. This was not set by default in debian versions up to
+# and including 2.2.12-4.
+lmtp_downcase_rcpt: yes
+
+# Uncomment the following and add the space-separated users who
+# have admin rights for all services.
+#admins: cyrus
+
+# Space-separated list of users that have lmtp "admin" status (i.e. that
+# can deliver email through TCP/IP lmtp). If specified, this parameter
+# overrides the "admins" parameter above
+#lmtp_admins: postman
+
+# Space-separated list of users that have mupdate "admin" status, in
+# addition to those in the admins: entry above. Note that mupdate slaves and
+# backends in a Murder cluster need to autenticate against the mupdate master
+# as admin users.
+#mupdate_admins: mupdateman
+
+# Space-separated list of users that have imapd "admin" status, in
+# addition to those in the admins: entry above
+#imap_admins: cyrus
+
+# Space-separated list of users that have sieve "admin" status, in
+# addition to those in the admins: entry above
+#sieve_admins: cyrus
+
+# List of users and groups that are allowed to proxy for other users,
+# seperated by spaces. Any user listed in this will be allowed to login
+# for any other user. Like "admins:" above, you can have imap_proxyservers
+# and sieve_proxyservers.
+#proxyservers: cyrus
+
+# No anonymous logins
+allowanonymouslogin: no
+
+# Minimum time between POP mail fetches in minutes
+popminpoll: 1
+
+# If nonzero, normal users may create their own IMAP accounts by creating
+# the mailbox INBOX. The user's quota is set to the value if it is positive,
+# otherwise the user has unlimited quota.
+autocreatequota: 0
+
+# umask used by Cyrus programs
+umask: 077
+
+# Sendmail binary location
+# DUE TO A BUG, Cyrus sends CRLF EOLs to this program. This breaks Exim 3.
+# For now, to work around the bug, set this to a wrapper that calls
+# /usr/sbin/sendmail -dropcr instead if you use Exim 3.
+#sendmail: /usr/sbin/sendmail
+
+# If enabled, cyrdeliver will look for Sieve scripts in user's home
+# directories: ~user/.sieve.
+sieveusehomedir: false
+
+# If sieveusehomedir is false, this directory is searched for Sieve scripts.
+sievedir: /var/spool/sieve
+
+# notifyd(8) method to use for "MAIL" notifications. If not set, "MAIL"
+# notifications are disabled. Valid methods are: null, log, zephyr
+#mailnotifier: zephyr
+
+# notifyd(8) method to use for "SIEVE" notifications. If not set, "SIEVE"
+# notifications are disabled. This method is only used when no method is
+# specified in the script. Valid methods are null, log, zephyr, mailto
+#sievenotifier: zephyr
+
+# DRAC (pop-before-smtp, imap-before-smtp) support
+# Set dracinterval to the time in minutes to call DRAC while a user is
+# connected to the imap/pop services. Set to 0 to disable DRAC (default)
+# Set drachost to the host where the rpc drac service is running
+#dracinterval: 0
+#drachost: localhost
+
+# If enabled, the partitions will also be hashed, in addition to the hashing
+# done on configuration directories. This is recommended if one partition has a
+# very bushy mailbox tree.
+hashimapspool: true
+
+# Allow plaintext logins by default (SASL PLAIN)
+allowplaintext: yes
+
+# Force PLAIN/LOGIN authentication only
+# (you need to uncomment this if you are not using an auxprop-based SASL
+# mechanism. saslauthd users, that means you!). And pay attention to
+# sasl_minimum_layer and allowapop below, too.
+#sasl_mech_list: PLAIN
+
+# Allow use of the POP3 APOP authentication command.
+# Note that this command requires that the plaintext passwords are
+# available in a SASL auxprop backend (eg. sasldb), and that the system
+# can provide enough entropy (eg. from /dev/urandom) to create a challenge
+# in the banner.
+#allowapop: no
+
+# The minimum SSF that the server will allow a client to negotiate. A
+# value of 1 requires integrity protection; any higher value requires some
+# amount of encryption.
+#sasl_minimum_layer: 0
+
+# The maximum SSF that the server will allow a client to negotiate. A
+# value of 1 requires integrity protection; any higher value requires some
+# amount of encryption.
+#sasl_maximum_layer: 256
+
+# List of remote realms whose users may log in using cross-realm
+# authentications. Seperate each realm name by a space. A cross-realm
+# identity is considered any identity returned by SASL with an "@" in it.
+# NOTE: To support multiple virtual domains on the same interface/IP,
+# you need to list them all as loginreals. If you don't list them here,
+# (most of) your users probably won't be able to log in.
+#loginrealms: example.com
+
+# Enable virtual domain support. If enabled, the user's domain will
+# be determined by splitting a fully qualified userid at the last '@'
+# or '%' symbol. If the userid is unqualified, and the virtdomains
+# option is set to "on", then the domain will be determined by doing
+# a reverse lookup on the IP address of the incoming network
+# interface, otherwise the user is assumed to be in the default
+# domain (if set).
+#virtdomains: userid
+
+# The default domain for virtual domain support
+# If the domain of a user can't be taken from its login and it can't
+# be determined by doing a reverse lookup on the interface IP, this
+# domain is used.
+#defaultdomain:
+
+#
+# SASL library options (these are handled directly by the SASL libraries,
+# refer to SASL documentation for an up-to-date list of these)
+#
+
+# The mechanism(s) used by the server to verify plaintext passwords. Possible
+# values are "saslauthd", "auxprop", "pwcheck" and "alwaystrue". They
+# are tried in order, you can specify more than one, separated by spaces.
+#
+# Do note that, since sasl will be run as user cyrus, you may have a lot of
+# trouble to set this up right.
+sasl_pwcheck_method: auxprop
+
+# What auxpropd plugins to load, if using sasl_pwcheck_method: auxprop
+# by default, all plugins are tried (which is probably NOT what you want).
+#sasl_auxprop_plugin: sasldb
+
+# If enabled, the SASL library will automatically create authentication secrets
+# when given a plaintext password. Refer to SASL documentation
+sasl_auto_transition: no
+
+#
+# SSL/TLS Options
+#
+
+# File containing the global certificate used for ALL services (imap, pop3,
+# lmtp, sieve)
+#tls_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
+
+# File containing the private key belonging to the global server certificate.
+#tls_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
+
+# File containing the certificate used for imap. If not specified, the global
+# certificate is used. A value of "disabled" will disable SSL/TLS for imap.
+#imap_tls_cert_file: /etc/ssl/certs/cyrus-imap.pem
+
+# File containing the private key belonging to the imap-specific server
+# certificate. If not specified, the global private key is used. A value of
+# "disabled" will disable SSL/TLS for imap.
+#imap_tls_key_file: /etc/ssl/private/cyrus-imap.key
+
+# File containing the certificate used for pop3. If not specified, the global
+# certificate is used. A value of "disabled" will disable SSL/TLS for pop3.
+#pop3_tls_cert_file: /etc/ssl/certs/cyrus-pop3.pem
+
+# File containing the private key belonging to the pop3-specific server
+# certificate. If not specified, the global private key is used. A value of
+# "disabled" will disable SSL/TLS for pop3.
+#pop3_tls_key_file: /etc/ssl/private/cyrus-pop3.key
+
+# File containing the certificate used for lmtp. If not specified, the global
+# certificate is used. A value of "disabled" will disable SSL/TLS for lmtp.
+#lmtp_tls_cert_file: /etc/ssl/certs/cyrus-lmtp.pem
+
+# File containing the private key belonging to the lmtp-specific server
+# certificate. If not specified, the global private key is used. A value of
+# "disabled" will disable SSL/TLS for lmtp.
+#lmtp_tls_key_file: /etc/ssl/private/cyrus-lmtp.key
+
+# File containing the certificate used for sieve. If not specified, the global
+# certificate is used. A value of "disabled" will disable SSL/TLS for sieve.
+#sieve_tls_cert_file: /etc/ssl/certs/cyrus-sieve.pem
+
+# File containing the private key belonging to the sieve-specific server
+# certificate. If not specified, the global private key is used. A value of
+# "disabled" will disable SSL/TLS for sieve.
+#sieve_tls_key_file: /etc/ssl/private/cyrus-sieve.key
+
+# File containing one or more Certificate Authority (CA) certificates.
+#tls_ca_file: /etc/ssl/certs/cyrus-imapd-ca.pem
+
+# Path to directory with certificates of CAs.
+tls_ca_path: /etc/ssl/certs
+
+# The length of time (in minutes) that a TLS session will be cached for later
+# reuse. The maximum value is 1440 (24 hours), the default. A value of 0 will
+# disable session caching.
+tls_session_timeout: 1440
+
+# The list of SSL/TLS ciphers to allow, in decreasing order of precedence.
+# The format of the string is described in ciphers(1). The Debian default
+# selects TLSv1 high-security ciphers only, and removes all anonymous ciphers
+# from the list (because they provide no defense against man-in-the-middle
+# attacks). It also orders the list so that stronger ciphers come first.
+tls_cipher_list: TLSv1+HIGH:!aNULL:@STRENGTH
+
+# Require a client certificate for ALL services (imap, pop3, lmtp, sieve).
+#tls_require_cert: false
+
+# Require a client certificate for imap ONLY.
+#imap_tls_require_cert: false
+
+# Require a client certificate for pop3 ONLY.
+#pop3_tls_require_cert: false
+
+# Require a client certificate for lmtp ONLY.
+#lmtp_tls_require_cert: false
+
+# Require a client certificate for sieve ONLY.
+#sieve_tls_require_cert: false
+
+#
+# Cyrus Murder cluster configuration
+#
+# Set the following options to the values needed for this server to
+# autenticate against the mupdate master server:
+# mupdate_server
+# mupdate_port
+# mupdate_username
+# mupdate_authname
+# mupdate_realm
+# mupdate_password
+# mupdate_retry_delay
+
+##
+## KEEP THESE IN SYNC WITH cyrus.conf
+##
+# Unix domain socket that lmtpd listens on.
+lmtpsocket: /var/run/cyrus/socket/lmtp
+
+# Unix domain socket that idled listens on.
+idlesocket: /var/run/cyrus/socket/idle
+
+# Unix domain socket that the new mail notification daemon listens on.
+notifysocket: /var/run/cyrus/socket/notify
+
+# Syslog prefix. Defaults to cyrus (so logging is done as cyrus/imap etc.)
+syslog_prefix: cyrus
+
+##
+## DEBUGGING
+##
+# Debugging hook. See /usr/share/doc/cyrus-common-2.3/README.Debian.debug
+# Keep the hook disabled when it is not in use
+#
+# gdb Back-traces
+#debug_command: /usr/bin/gdb -batch -cd=/tmp -x /usr/lib/cyrus/get-backtrace.gdb /usr/lib/cyrus/bin/%s %d >/tmp/gdb-backtrace.cyrus.%1$s.%2$d <&- 2>&1 &
+#
+# system-call traces
+#debug_command: /usr/bin/strace -tt -o /tmp/strace.cyrus.%s.%d -p %2$d <&- 2>&1 &
+#
+# library traces
+#debug_command: /usr/bin/ltrace -tt -n 2 -o /tmp/ltrace.cyrus.%s.%d -p %2$d <&- 2>&1 &
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+usr/lib/perl*
+usr/share/perl*
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.lintian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.lintian?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.lintian (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.lintian Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+libcyrus-imap-perl23: package-installs-nonbinary-perl-in-usr-lib-perl5
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.manpages
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.manpages?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.manpages (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/libcyrus-imap-perl23.manpages Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+perl/imap/blib/man3/Cyrus::IMAP.3pm
+perl/imap/blib/man3/Cyrus::IMAP::Admin.3pm
+perl/imap/blib/man3/Cyrus::IMAP::IMSP.3pm
+perl/imap/blib/man3/Cyrus::IMAP::Shell.3pm
+perl/sieve/managesieve/blib/man3/Cyrus::SIEVE::managesieve.3pm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/license.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/license.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/license.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/license.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,161 @@
+
+
+<! $Id: license.html 5 2005-03-12 23:19:45Z sven $ >
+<HTML>
+<TITLE>
+Cyrus IMAP Licensing
+</TITLE>
+
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<P><MAP NAME="masthead">
+ <AREA SHAPE="rect" COORDS="0,0,125,22" HREF="http://www.cmu.edu/computing/">
+ <AREA SHAPE="rect" COORDS="429,2,539,27" HREF="http://www.cmu.edu/">
+</MAP><IMG SRC="/images/masthead.jpg" ALT="Masthead"
+ALIGN="BOTTOM" NATURALSIZEFLAG="3" ISMAP BORDER="0" USEMAP="#masthead"><BR>
+<TABLE WIDTH="575" BORDER="0" CELLSPACING="0" CELLPADDING="0">
+<TR>
+<TD WIDTH="50%" VALIGN="TOP"><B><BIG><FONT FACE="geneva,
+ arial,helvetica, times" SIZE=+3>
+Cyrus IMAP Licensing
+</FONT></BIG></B><BR>
+<IMG SRC="/images/w.jpg" WIDTH="270" HEIGHT="1" ALIGN="BOTTOM" NATURALSIZEFLAG=
+"0"></TD>
+<TD WIDTH="50%" VALIGN="TOP" ALIGN="RIGHT">
+<FONT FACE="geneva, arial, helvetica, times" SIZE=-2>
+<A HREF="/">
+ASG Home</a></FONT>
+
+<FONT FACE="geneva, arial, helvetica, times" SIZE=-2>
+<A HREF="/whatsnew.html">
+What's New</a></FONT>
+
+<FONT FACE="geneva, arial, helvetica, times" SIZE=-2>
+<A HREF="/jobs.html">
+Jobs</a></FONT>
+
+<FONT FACE="geneva, arial, helvetica, times" SIZE=-2>
+<A HREF="/search.html">
+Search</a></FONT>
+
+<FONT FACE="geneva, arial, helvetica, times" SIZE=-2>
+<A HREF="mailto:andrew2-webmaster+ at andrew.cmu.edu">
+Contact Us</a></FONT> <BR>
+
+
+<FONT FACE="geneva, arial, helvetica, times" SIZE=-1>
+<A HREF="/cyrus/download">
+<b>Download Software</b></a></FONT>
+
+<FONT FACE="geneva, arial, helvetica, times" SIZE=-1>
+<A HREF="/cyrus/mailing-list.html">
+<b>Mailing lists</b></a></FONT>
+
+<FONT FACE="geneva, arial, helvetica, times" SIZE=-1>
+<A HREF="/cyrus">
+Project Cyrus Home</a></FONT>
+<br>
+
+
+
+<br>
+<IMG SRC="/images/w.jpg" WIDTH="250" HEIGHT="1" ALIGN="BOTTOM"
+NATURALSIZEFLAG= "0"></TD></TR>
+ </TABLE>
+<p>
+
+
+Please direct technical questions or issues to <tt><a
+href="mailto:cyrus-bugs+ at andrew.cmu.edu">cyrus-bugs at andrew.cmu.edu</a></tt>.
+<br>
+Please direct any licensing issues to <tt><a
+ href="mailto:tech-transfer+ at andrew.cmu.edu">tech-transfer at andrew.cmu.edu</a></tt>.
+<hr>
+
+<b>ALL</b> versions of the Cyrus IMAP server are now covered by the
+following copyright message. However, please note that in
+ distributions before 2.0, there may still be files that have the old
+ copyright text.
+
+<blockquote>
+<xmp>
+ * Copyright (c) 1994-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+</xmp>
+</blockquote>
+
+<p>
+If you find this software useful and valuable in your work, we welcome
+any support you can offer toward continuing this work.
+
+<p>We gratefully accept contributions, whether intellectual or
+monetary. Intellectual contributions in the form of code or
+constructive collaboration can be directed to <a
+href="mailto:cyrus-bugs+ at andrew.cmu.edu"><tt>cyrus-bugs+ at andrew.cmu.edu</tt></a>
+(even if it is not a bug).
+
+<p>If you wish to provide financial support to the Cyrus Project, send a
+check payable to <b>Carnegie Mellon University</b> to
+
+<blockquote>
+<xmp>
+ Project Cyrus
+ Computing Services
+ Carnegie Mellon University
+ 5000 Forbes Ave
+ Pittsburgh, PA 15213
+ USA
+</xmp>
+</blockquote>
+<hr>
+<p>
+Please direct technical questions or issues to <tt><a
+href="mailto:cyrus-bugs+ at andrew.cmu.edu">cyrus-bugs at andrew.cmu.edu</a></tt>.
+<br>
+Please direct any licensing issues to <tt><a
+ href="mailto:tech-transfer+ at andrew.cmu.edu">tech-transfer at andrew.cmu.edu</a></tt>.
+
+<p>
+ <hr>
+ <address><! (c) 1999 Carnegie Mellon University. All Rights Reserved.</address>
+<font size="-2">
+Last Updated: Thursday, 12-Oct-2000 16:38:41 EDT
+</font>
+ </body>
+</html>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/lmtp.pam
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/lmtp.pam?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/lmtp.pam (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/lmtp.pam Sat Aug 26 02:00:13 2006
@@ -1,0 +1,14 @@
+# PAM configuration file for Cyrus LMTP service
+# $Id: lmtp.pam 5 2005-03-12 23:19:45Z sven $
+#
+# If you want to use Cyrus in a setup where users don't have
+# accounts on the local machine, you'll need to make sure
+# you use something like pam_permit for account checking.
+#
+# Remember that SASL (and therefore Cyrus) accesses PAM
+# modules through saslauthd, and that SASL can only deal with
+# plaintext passwords if PAM is used.
+#
+
+ at include common-auth
+ at include common-account
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.ignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.ignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.ignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.ignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,54 @@
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +skiplist: recovered
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +skiplist: checkpointed
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +duplicate_prune: pruning
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +duplicate_prune: purged
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +executed
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +accepted connection
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +telling master
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +mydelete:
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +(bad)?login:
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +starttls: [[:alnum:]]+ with cipher
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +(\[[a-z0-9]+\] )?STARTTLS( negotiation)? failed:
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +DIGEST-MD5 server step
+cyrus/ctl_cyrusdb\[[0-9]+\]: +(done +)?recovering cyrus databases
+cyrus/ctl_cyrusdb\[[0-9]+\]: +archiving
+cyrus/ctl_cyrusdb\[[0-9]+\]: +checkpointing
+cyrus/ctl_cyrusdb\[[0-9]+\]: +done checkpointing
+cyrus/ctl_deliver\[[0-9]+\]: +duplicate_prune: pruning back
+cyrus/ctl_deliver\[[0-9]+\]: +duplicate_prune: purged
+cyrus/tls_prune\[[0-9]+\]: +(tls_prune: )?purged
+cyrus/master\[[0-9]+\]: +ready for work
+cyrus/master\[[0-9]+\]: +about to exec
+cyrus/master\[[0-9]+\]: +process started
+cyrus/master\[[0-9]+\]: +process [0-9]+ exited, status 0$
+cyrus/master\[[0-9]+\]: +service [a-zA-Z0-9]+ now has [0-9]+ workers
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +pop3s failed:
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +lmtp connection preauth'd as postman
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +dupelim: eliminated duplicate message to
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +duplicate_check:
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +duplicate_mark:
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +mystore: committing txn
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +mystore: starting txn
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +sieve parse error
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +sieve: discarded
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +abort_txn: aborting txn
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +delete: starting txn
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +open: user .* opened
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +mycommit: committing txn
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +myfetch: reusing txn
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +myfetch: starting txn
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +mystore: reusing txn
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +seen_db: user .* opened
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +Connection reset by peer, closing connection
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +SQUAT failed
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +SQUAT returned [0-9]+ messages
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +idle for too long, closing connection
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +annotatemore_store
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +created stage directory
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +imaps TLS negotiation failed
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +synchronizing mailbox
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +mailbox list synchronization
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +unready for connections
+cyrus/squatter\[[0-9]+\]: +(done )?(indexing|skipping) mailbox
+cyrus/notifyd\[[0-9]+\]: do_notify using method
+cyrus/lmtpunix\[[0-9]+\]: +IOERROR: fstating sieve script [/a-zA-Z^]+/defaultbc: No such file or directory
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.violations.ignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.violations.ignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.violations.ignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/logcheck.violations.ignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+cyrus/lmtpunix\[[0-9]+\]: +IOERROR: fstating sieve script [/a-zA-Z^]+/defaultbc: No such file or directory
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +(\[[a-z0-9]+\] )?STARTTLS( negotiation)? failed:
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +pop3s failed:
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +SQUAT failed
+cyrus/[a-zA-Z0-9_]+\[[0-9]+\]: +imaps TLS negotiation failed
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/mupdate.pam
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/mupdate.pam?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/mupdate.pam (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/mupdate.pam Sat Aug 26 02:00:13 2006
@@ -1,0 +1,14 @@
+# PAM configuration file for Cyrus Murder mupdate service
+# $Id: mupdate.pam 5 2005-03-12 23:19:45Z sven $
+#
+# If you want to use Cyrus in a setup where users don't have
+# accounts on the local machine, you'll need to make sure
+# you use something like pam_permit for account checking.
+#
+# Remember that SASL (and therefore Cyrus) accesses PAM
+# modules through saslauthd, and that SASL can only deal with
+# plaintext passwords if PAM is used.
+#
+
+ at include common-auth
+ at include common-account
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/nntp.pam
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/nntp.pam?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/nntp.pam (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/nntp.pam Sat Aug 26 02:00:13 2006
@@ -1,0 +1,13 @@
+# PAM configuration file for Cyrus NNTP service
+#
+# If you want to use Cyrus in a setup where users don't have
+# accounts on the local machine, you'll need to make sure
+# you use something like pam_permit for account checking.
+#
+# Remember that SASL (and therefore Cyrus) accesses PAM
+# modules through saslauthd, and that SASL can only deal with
+# plaintext passwords if PAM is used.
+#
+
+ at include common-auth
+ at include common-account
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0001-upstream-fix-segfault.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0001-upstream-fix-segfault.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0001-upstream-fix-segfault.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0001-upstream-fix-segfault.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0001-upstream-fix-segfault.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix for imap/backend.c, upstream CVS edition 1.40
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/backend.c /tmp/dpep.NeVG3m/cyrus-imapd-2.2.13/imap/backend.c
+--- cyrus-imapd-2.2.13/imap/backend.c 2006-04-22 17:18:39.000000000 +0200
++++ /tmp/dpep.NeVG3m/cyrus-imapd-2.2.13/imap/backend.c 2006-05-02 22:08:32.024194651 +0200
+@@ -271,7 +271,7 @@
+ /* need to (re)establish connection to server or create one */
+ int sock = -1;
+ int r;
+- int err = 0;
++ int err = -1;
+ struct addrinfo hints, *res0 = NULL, *res1 = NULL, *res;
+ struct sockaddr_un sunsock;
+ char buf[2048], *mechlist = NULL;
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0002-allow_invalid_id_acl_removal.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0002-allow_invalid_id_acl_removal.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0002-allow_invalid_id_acl_removal.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0002-allow_invalid_id_acl_removal.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,51 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fileHfCUIw.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/lib/acl_afs.c /tmp/dpep.4TxSCg/cyrus-imapd-2.2.13/lib/acl_afs.c
+--- cyrus-imapd-2.2.13/lib/acl_afs.c 2005-03-12 23:09:22.000000000 +0100
++++ /tmp/dpep.4TxSCg/cyrus-imapd-2.2.13/lib/acl_afs.c 2006-05-03 15:27:47.049193574 +0200
+@@ -114,6 +114,7 @@
+ cyrus_acl_canonproc_t *canonproc;
+ void *canonrock;
+ {
++ const char *canonid;
+ char *newidentifier = 0;
+ char *newacl;
+ char *thisid, *nextid;
+@@ -122,9 +123,14 @@
+
+ /* Convert 'identifier' into canonical form */
+ if (*identifier == '-') {
+- char *canonid = auth_canonifyid(identifier+1, 0);
++ canonid = auth_canonifyid(identifier+1, 0);
+ if (!canonid) {
+- return -1;
++ if (access != 0L) {
++ return -1;
++ } else {
++ /* trying to delete invalid/non-existent identifier */
++ canonid = identifier+1;
++ }
+ }
+ newidentifier = xmalloc(strlen(canonid)+2);
+ newidentifier[0] = '-';
+@@ -135,9 +141,13 @@
+ }
+ }
+ else {
+- identifier = auth_canonifyid(identifier, 0);
+- if (!identifier) {
++ canonid = auth_canonifyid(identifier, 0);
++ if (canonid) {
++ identifier = canonid;
++ } else if (access != 0L) {
+ return -1;
++ } else {
++ /* trying to delete invalid/non-existent identifier */
+ }
+ if (canonproc) {
+ access = canonproc(canonrock, identifier, access);
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0003-upstream_disallow_userprobes.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0003-upstream_disallow_userprobes.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0003-upstream_disallow_userprobes.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0003-upstream_disallow_userprobes.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,205 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## filetu535I.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/imapd.c /tmp/dpep.556KMT/cyrus-imapd-2.2.13/imap/imapd.c
+--- cyrus-imapd-2.2.13/imap/imapd.c 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.556KMT/cyrus-imapd-2.2.13/imap/imapd.c 2006-05-03 16:02:02.685827405 +0200
+@@ -1785,6 +1785,9 @@
+
+ sleep(3);
+
++ /* Don't allow user probing */
++ if (r == SASL_NOUSER) r = SASL_BADAUTH;
++
+ if ((reply = sasl_errstring(r, NULL, NULL)) != NULL) {
+ prot_printf(imapd_out, "%s NO Login failed: %s\r\n", tag, reply);
+ } else {
+@@ -1898,8 +1901,6 @@
+ break;
+ default:
+ /* failed authentication */
+- errorstring = sasl_errstring(sasl_result, NULL, NULL);
+-
+ syslog(LOG_NOTICE, "badlogin: %s %s [%s]",
+ imapd_clienthost, authtype, sasl_errdetail(imapd_saslconn));
+
+@@ -1908,6 +1909,10 @@
+ VARIABLE_LISTEND);
+ sleep(3);
+
++ /* Don't allow user probing */
++ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
++
++ errorstring = sasl_errstring(sasl_result, NULL, NULL);
+ if (errorstring) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, errorstring);
+ } else {
+diff -urNad cyrus-imapd-2.2.13/imap/nntpd.c /tmp/dpep.556KMT/cyrus-imapd-2.2.13/imap/nntpd.c
+--- cyrus-imapd-2.2.13/imap/nntpd.c 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.556KMT/cyrus-imapd-2.2.13/imap/nntpd.c 2006-05-03 16:02:02.678828066 +0200
+@@ -2140,13 +2140,16 @@
+ default:
+ code = 481;
+ }
+- errorstring = sasl_errstring(sasl_result, NULL, NULL);
+
+ syslog(LOG_NOTICE, "badlogin: %s %s [%s]",
+ nntp_clienthost, mech, sasl_errdetail(nntp_saslconn));
+
+ sleep(3);
+
++ /* Don't allow user probing */
++ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
++
++ errorstring = sasl_errstring(sasl_result, NULL, NULL);
+ if (errorstring) {
+ prot_printf(nntp_out, "%d %s\r\n", code, errorstring);
+ } else {
+diff -urNad cyrus-imapd-2.2.13/imap/pop3d.c /tmp/dpep.556KMT/cyrus-imapd-2.2.13/imap/pop3d.c
+--- cyrus-imapd-2.2.13/imap/pop3d.c 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.556KMT/cyrus-imapd-2.2.13/imap/pop3d.c 2006-05-03 16:02:02.679827971 +0200
+@@ -1027,15 +1027,18 @@
+ /* failed authentication */
+ if (sasl_result != SASL_OK)
+ {
++ syslog(LOG_NOTICE, "badlogin: %s APOP (%s) %s",
++ popd_clienthost, popd_apop_chal,
++ sasl_errdetail(popd_saslconn));
++
+ sleep(3);
+
++ /* Don't allow user probing */
++ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
++
+ prot_printf(popd_out, "-ERR [AUTH] authenticating: %s\r\n",
+ sasl_errstring(sasl_result, NULL, NULL));
+
+- syslog(LOG_NOTICE, "badlogin: %s APOP (%s) %s",
+- popd_clienthost, popd_apop_chal,
+- sasl_errdetail(popd_saslconn));
+-
+ return;
+ }
+
+@@ -1292,11 +1295,6 @@
+ break;
+ default:
+ /* failed authentication */
+- sleep(3);
+-
+- prot_printf(popd_out, "-ERR [AUTH] authenticating: %s\r\n",
+- sasl_errstring(sasl_result, NULL, NULL));
+-
+ if (authtype) {
+ syslog(LOG_NOTICE, "badlogin: %s %s %s",
+ popd_clienthost, authtype,
+@@ -1305,6 +1303,14 @@
+ syslog(LOG_NOTICE, "badlogin: %s %s",
+ popd_clienthost, authtype);
+ }
++
++ sleep(3);
++
++ /* Don't allow user probing */
++ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
++
++ prot_printf(popd_out, "-ERR [AUTH] authenticating: %s\r\n",
++ sasl_errstring(sasl_result, NULL, NULL));
+ }
+
+ reset_saslconn(&popd_saslconn);
+diff -urNad cyrus-imapd-2.2.13/imap/proxyd.c /tmp/dpep.556KMT/cyrus-imapd-2.2.13/imap/proxyd.c
+--- cyrus-imapd-2.2.13/imap/proxyd.c 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.556KMT/cyrus-imapd-2.2.13/imap/proxyd.c 2006-05-03 16:02:02.681827782 +0200
+@@ -2106,7 +2106,7 @@
+ char c;
+ struct buf passwdbuf;
+ char *passwd;
+- char *reply = 0;
++ const char *reply = 0;
+ int r;
+
+ if (proxyd_userid) {
+@@ -2180,17 +2180,19 @@
+ strlen(canon_user),
+ passwd,
+ strlen(passwd)))!=SASL_OK) {
+- const char *errorstring = sasl_errstring(r, NULL, NULL);
+- if (reply) {
+- syslog(LOG_NOTICE, "badlogin: %s plaintext %s %s",
+- proxyd_clienthost, canon_user, reply);
+- }
++ syslog(LOG_NOTICE, "badlogin: %s plaintext %s %s",
++ proxyd_clienthost, canon_user, sasl_errdetail(proxyd_saslconn));
++
+ /* Apply penalty only if not under layer */
+ if (proxyd_starttls_done == 0)
+ sleep(3);
+- if (errorstring) {
++
++ /* Don't allow user probing */
++ if (r == SASL_NOUSER) r = SASL_BADAUTH;
++
++ if ((reply = sasl_errstring(r, NULL, NULL)) != NULL) {
+ prot_printf(proxyd_out, "%s NO Login failed: %s\r\n",
+- tag, errorstring);
++ tag, reply);
+ } else {
+ prot_printf(proxyd_out, "%s NO Login failed.", tag);
+ }
+@@ -2276,8 +2278,6 @@
+ break;
+ default:
+ /* failed authentication */
+- errorstring = sasl_errstring(sasl_result, NULL, NULL);
+-
+ syslog(LOG_NOTICE, "badlogin: %s %s [%s]",
+ proxyd_clienthost, authtype, sasl_errdetail(proxyd_saslconn));
+
+@@ -2286,6 +2286,10 @@
+ VARIABLE_LISTEND);
+ sleep(3);
+
++ /* Don't allow user probing */
++ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
++
++ errorstring = sasl_errstring(sasl_result, NULL, NULL);
+ if (errorstring) {
+ prot_printf(proxyd_out, "%s NO %s\r\n", tag, errorstring);
+ } else {
+@@ -4253,13 +4257,13 @@
+ proxyd_userid, mailboxname);
+ if (!r) r = mlookup(mailboxname, &server, NULL, NULL);
+
+- if(proxyd_userisadmin) {
++ if(!r && proxyd_userisadmin) {
+ /* If they are an admin, they won't retain that privledge if we
+ * proxy for them, so we need to refer them -- even if they haven't
+ * told us they're able to handle it. */
+ proxyd_refer(tag, server, name);
+- } else {
+- if (!r) s = proxyd_findserver(server);
++ } else if (!r) {
++ s = proxyd_findserver(server);
+
+ if (s) {
+ prot_printf(s->out, "%s Getquotaroot {%d+}\r\n%s\r\n",
+@@ -4268,11 +4272,10 @@
+ } else {
+ r = IMAP_SERVER_UNAVAILABLE;
+ }
++ }
+
+- if (r) {
+- prot_printf(proxyd_out, "%s NO %s\r\n", tag, error_message(r));
+- return;
+- }
++ if (r) {
++ prot_printf(proxyd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ }
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0004-upstream-fetchnews-timezone-dst-fix.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0004-upstream-fetchnews-timezone-dst-fix.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0004-upstream-fetchnews-timezone-dst-fix.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0004-upstream-fetchnews-timezone-dst-fix.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fileQDLDMd.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/fetchnews.c /tmp/dpep.KgQkoe/cyrus-imapd-2.2.13/imap/fetchnews.c
+--- cyrus-imapd-2.2.13/imap/fetchnews.c 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.KgQkoe/cyrus-imapd-2.2.13/imap/fetchnews.c 2006-05-03 16:07:42.020785607 +0200
+@@ -60,6 +60,7 @@
+ #include "cyrusdb.h"
+ #include "exitcodes.h"
+ #include "global.h"
++#include "gmtoff.h"
+ #include "lock.h"
+ #include "prot.h"
+ #include "xmalloc.h"
+@@ -388,6 +389,7 @@
+ &ctime.tm_hour, &ctime.tm_min, &ctime.tm_sec);
+ ctime.tm_year -= 1900;
+ ctime.tm_mon--;
++ ctime.tm_isdst = -1;
+
+ /* read the previous timestamp */
+ if (!sfile[0]) {
+@@ -417,6 +419,7 @@
+ /* ask for new articles */
+ if (stamp) stamp -= 180; /* adjust back 3 minutes */
+ ptime = gmtime(&stamp);
++ ptime->tm_isdst = -1;
+ strftime(buf, sizeof(buf), datefmt, ptime);
+ prot_printf(pout, "NEWNEWS %s %s GMT\r\n", wildmat, buf);
+
+@@ -433,7 +436,7 @@
+ We can't change this, otherwise we'd be incompatible
+ with an old localtime timestamp.
+ */
+- stamp -= timezone;
++ stamp += gmtoff_of(&ctime, stamp);
+ }
+
+ if (!newnews) {
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0005-upstream-fix-ctl_mboxlist-dump-undump.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0005-upstream-fix-ctl_mboxlist-dump-undump.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0005-upstream-fix-ctl_mboxlist-dump-undump.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0005-upstream-fix-ctl_mboxlist-dump-undump.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,91 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fileVnqQpc.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/doc/changes.html /tmp/dpep.C9eSTj/cyrus-imapd-2.2.13/doc/changes.html
+--- cyrus-imapd-2.2.13/doc/changes.html 2006-05-03 17:19:51.000000000 +0200
++++ /tmp/dpep.C9eSTj/cyrus-imapd-2.2.13/doc/changes.html 2006-05-03 17:26:24.115155499 +0200
+@@ -8,6 +8,12 @@
+ </head>
+ <body>
+
++<h1>Changes to the Cyrus IMAP Server since 2.2.13</h1>
++<ul>
++<li><tt>ctl_mboxlist</tt> now dumps/undumps the mailbox type flags,
++making it useful for remote mailboxes.</li>
++</ul>
++
+ <h1>Changes to the Cyrus IMAP Server since 2.2.12</h1>
+ <ul>
+ <li>Allow sieve scripts to be run on shared mailboxes (via <tt>sieve</tt>
+diff -urNad cyrus-imapd-2.2.13/imap/ctl_mboxlist.c /tmp/dpep.C9eSTj/cyrus-imapd-2.2.13/imap/ctl_mboxlist.c
+--- cyrus-imapd-2.2.13/imap/ctl_mboxlist.c 2006-05-03 17:19:51.000000000 +0200
++++ /tmp/dpep.C9eSTj/cyrus-imapd-2.2.13/imap/ctl_mboxlist.c 2006-05-03 17:26:24.129154183 +0200
+@@ -187,7 +187,7 @@
+ switch (d->op) {
+ case DUMP:
+ if(!d->partition || !strcmp(d->partition, part)) {
+- printf("%s\t%s\t%s\n", name, part, acl);
++ printf("%s\t%d %s\t%s\n", name, mbtype, part, acl);
+ if(d->purge) {
+ config_mboxlist_db->delete(mbdb, key, keylen, &(d->tid), 0);
+ }
+@@ -490,7 +490,7 @@
+ while (fgets(buf, sizeof(buf), stdin)) {
+ char *name, *partition, *acl;
+ char *p;
+- int tries = 0;
++ int mbtype = 0, tries = 0;
+
+ line++;
+
+@@ -501,6 +501,12 @@
+ continue;
+ }
+ *p++ = '\0';
++ if (isdigit((int) *p)) {
++ /* new style dump */
++ mbtype = strtol(p, &p, 10);
++ /* skip trailing space */
++ if (*p == ' ') p++;
++ }
+ partition = p;
+ for (; *p && *p != '\t'; p++) ;
+ if (!*p) {
+@@ -523,7 +529,7 @@
+ }
+
+ key = name; keylen = strlen(key);
+- data = mboxlist_makeentry(0, partition, acl); datalen = strlen(data);
++ data = mboxlist_makeentry(mbtype, partition, acl); datalen = strlen(data);
+
+ tries = 0;
+ retry:
+diff -urNad cyrus-imapd-2.2.13/man/ctl_mboxlist.8 /tmp/dpep.C9eSTj/cyrus-imapd-2.2.13/man/ctl_mboxlist.8
+--- cyrus-imapd-2.2.13/man/ctl_mboxlist.8 2006-05-03 17:19:51.000000000 +0200
++++ /tmp/dpep.C9eSTj/cyrus-imapd-2.2.13/man/ctl_mboxlist.8 2006-05-03 17:26:24.125154559 +0200
+@@ -104,7 +104,9 @@
+ .TP
+ .B \-d
+ Dump the contents of the database to standard output in a portable
+-flat-text format.
++flat-text format. NOTE: In Cyrus versions 2.2.13 and earlier, the dump
++format did not include the mailbox type flags, breaking remote
++mailboxes (frontends, mupdate master) when undumped.
+ .TP
+ .B \-x
+ When performing a dump, remove the mailboxes dumped from the mailbox list
+@@ -115,7 +117,9 @@
+ .TP
+ .B \-u
+ Load the contents of the database from standard input. The input MUST
+-be in the format output using the \fB\-d\fR option.
++be in the format output using the \fB\-d\fR option. NOTE: Both the
++old and new formats can be loaded, but the old format will break
++remote mailboxes.
+ .TP
+ .B \-m
+ For backend servers in the Cyrus Murder, synchronize the local mailbox list
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0006-upstream-free-backend-fix.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0006-upstream-free-backend-fix.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0006-upstream-free-backend-fix.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0006-upstream-free-backend-fix.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,93 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0006-upstream-free-backend-fix.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream fix: only free() the backend struct if we allocated it
+## DP: (don't free cached connections)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/backend.c /tmp/dpep.78gN6M/cyrus-imapd-2.2.13/imap/backend.c
+--- cyrus-imapd-2.2.13/imap/backend.c 2006-05-12 12:01:09.000000000 +0200
++++ /tmp/dpep.78gN6M/cyrus-imapd-2.2.13/imap/backend.c 2006-05-12 12:14:12.909137753 +0200
+@@ -39,7 +39,7 @@
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+-/* $Id: backend.c,v 1.39 2006/02/07 20:57:27 murch Exp $ */
++/* $Id: backend.c,v 1.41 2006/05/11 18:05:29 murch Exp $ */
+
+ #include <config.h>
+
+@@ -264,7 +264,7 @@
+ }
+ }
+
+-struct backend *backend_connect(struct backend *ret, const char *server,
++struct backend *backend_connect(struct backend *ret_backend, const char *server,
+ struct protocol_t *prot, const char *userid,
+ const char **auth_status)
+ {
+@@ -276,13 +276,16 @@
+ struct sockaddr_un sunsock;
+ char buf[2048], *mechlist = NULL;
+ struct sigaction action;
++ struct backend *ret;
+
+- if (!ret) {
++ if (!ret_backend) {
+ ret = xmalloc(sizeof(struct backend));
+ memset(ret, 0, sizeof(struct backend));
+ strlcpy(ret->hostname, server, sizeof(ret->hostname));
+ ret->timeout = NULL;
+ }
++ else
++ ret = ret_backend;
+
+ if (server[0] == '/') { /* unix socket */
+ res0 = &hints;
+@@ -312,7 +315,7 @@
+ if (err) {
+ syslog(LOG_ERR, "getaddrinfo(%s) failed: %s",
+ server, gai_strerror(err));
+- free(ret);
++ if (!ret_backend) free(ret);
+ return NULL;
+ }
+ /* Get addrinfo struct for local interface. */
+@@ -363,7 +366,7 @@
+ if (res0 != &hints)
+ freeaddrinfo(res0);
+ syslog(LOG_ERR, "connect(%s) failed: %m", server);
+- free(ret);
++ if (!ret_backend) free(ret);
+ return NULL;
+ }
+ memcpy(&ret->addr, res->ai_addr, res->ai_addrlen);
+@@ -381,7 +384,7 @@
+ syslog(LOG_ERR,
+ "backend_connect(): couldn't read initial greeting: %s",
+ ret->in->error ? ret->in->error : "(null)");
+- free(ret);
++ if (!ret_backend) free(ret);
+ close(sock);
+ return NULL;
+ }
+@@ -396,14 +399,16 @@
+ if ((r = backend_authenticate(ret, prot, &mechlist, userid, auth_status))) {
+ syslog(LOG_ERR, "couldn't authenticate to backend server: %s",
+ sasl_errstring(r, NULL, NULL));
+- free(ret);
++ if (!ret_backend) free(ret);
+ close(sock);
+ ret = NULL;
+ }
+ }
+
+ if (mechlist) free(mechlist);
+-
++
++ if (!ret_backend) ret_backend = ret;
++
+ return ret;
+ }
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0007-upstream-remove-undump-size-limit.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0007-upstream-remove-undump-size-limit.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0007-upstream-remove-undump-size-limit.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0007-upstream-remove-undump-size-limit.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,128 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0007-upstream-remove-undump-size-limit by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: remove limit on the size of mailbox files that can be received by UNDUMP
+## DP: (write file directly to disk rather than reading the literal into memory)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/mbdump.c /tmp/dpep.ttpH40/cyrus-imapd-2.2.13/imap/mbdump.c
+--- cyrus-imapd-2.2.13/imap/mbdump.c 2006-05-12 12:15:44.000000000 +0200
++++ /tmp/dpep.ttpH40/cyrus-imapd-2.2.13/imap/mbdump.c 2006-05-12 12:17:32.871354378 +0200
+@@ -1,5 +1,5 @@
+ /* mbdump.c -- Mailbox dump routines
+- * $Id: mbdump.c,v 1.30 2004/05/22 03:45:51 rjs3 Exp $
++ * $Id: mbdump.c,v 1.31 2006/05/11 17:43:18 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -585,6 +585,10 @@
+ while(1) {
+ char fnamebuf[MAX_MAILBOX_PATH + 1024];
+ char *seen_file = NULL;
++ int isnowait, sawdigit;
++ unsigned long size;
++ unsigned long cutoff = ULONG_MAX / 10;
++ unsigned digit, cutlim = ULONG_MAX % 10;
+
+ c = getastring(pin, pout, &file);
+ if(c != ' ') {
+@@ -676,13 +680,43 @@
+
+ continue;
+ }
+-
+- c = getbastring(pin, pout, &data);
+- if(c != ' ' && c != ')') {
++
++ /* read size of literal */
++ c = prot_getc(pin);
++ if (c != '{') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
++ size = isnowait = sawdigit = 0;
++ while ((c = prot_getc(pin)) != EOF && isdigit(c)) {
++ sawdigit = 1;
++ digit = c - '0';
++ /* check for overflow */
++ if (size > cutoff || (size == cutoff && digit > cutlim)) {
++ fatal("literal too big", EC_IOERR);
++ }
++ size = size*10 + digit;
++ }
++ if (c == '+') {
++ isnowait++;
++ c = prot_getc(pin);
++ }
++ if (c == '}') {
++ c = prot_getc(pin);
++ if (c == '\r') c = prot_getc(pin);
++ }
++ if (!sawdigit || c != '\n') {
++ r = IMAP_PROTOCOL_ERROR;
++ goto done;
++ }
++
++ if (!isnowait) {
++ /* Tell client to send the message */
++ prot_printf(pout, "+ go ahead\r\n");
++ prot_flush(pout);
++ }
++
+ if(userid && !strcmp(file.s, "SUBS")) {
+ /* overwriting this outright is absolutely what we want to do */
+ char *s = mboxlist_hash_usersubs(userid);
+@@ -742,7 +776,7 @@
+ if(strncmp(file.s, "cyrus.", 6)) {
+ /* it doesn't match cyrus.*, so its a message file.
+ * charge it against the quota */
+- quotaused += data.len;
++ quotaused += size;
+ }
+ }
+
+@@ -760,10 +794,24 @@
+ goto done;
+ }
+
+- if(write(curfile,data.s,data.len) == -1) {
+- syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
+- r = IMAP_IOERROR;
+- goto done;
++ /* write data to file */
++ while (size) {
++ char buf[4096+1];
++ int n = prot_read(pin, buf, size > 4096 ? 4096 : size);
++ if (!n) {
++ syslog(LOG_ERR,
++ "IOERROR: reading message: unexpected end of file");
++ r = IMAP_IOERROR;
++ goto done;
++ }
++
++ size -= n;
++
++ if (write(curfile, buf, n) != n) {
++ syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
++ r = IMAP_IOERROR;
++ goto done;
++ }
+ }
+
+ close(curfile);
+@@ -777,7 +825,12 @@
+ unlink(fnamebuf);
+ }
+
+- if(c == ')') break;
++ c = prot_getc(pin);
++ if (c == ')') break;
++ if (c != ' ') {
++ r = IMAP_PROTOCOL_ERROR;
++ goto done;
++ }
+ }
+
+ if(!r && quotaused) {
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0008-upstream-better-message-track-logging.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0008-upstream-better-message-track-logging.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0008-upstream-better-message-track-logging.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0008-upstream-better-message-track-logging.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,114 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0008-upstream-better-message-track-logging by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: better logging to facilitate message tracking (Wes Craig <wes at umich.edu>)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/lmtp_sieve.c /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/lmtp_sieve.c
+--- cyrus-imapd-2.2.13/imap/lmtp_sieve.c 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/lmtp_sieve.c 2006-05-12 12:17:52.579503152 +0200
+@@ -1,6 +1,6 @@
+ /* lmtp_sieve.c -- Sieve implementation for lmtpd
+ *
+- * $Id: lmtp_sieve.c,v 1.11 2005/11/21 16:26:16 murch Exp $
++ * $Id: lmtp_sieve.c,v 1.12 2006/05/10 16:27:17 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -327,6 +327,8 @@
+ sievedb, strlen(sievedb), time(NULL), 0);
+
+ snmp_increment(SIEVE_REDIRECT, 1);
++ syslog(LOG_INFO, "sieve redirected: %s to: %s",
++ m->id ? m->id : "<nomsgid>", rc->addr);
+ return SIEVE_OK;
+ } else {
+ if (res == -1) {
+@@ -349,17 +351,8 @@
+ snmp_increment(SIEVE_DISCARD, 1);
+
+ /* ok, we won't file it, but log it */
+- if (md->id && strlen(md->id) < 80) {
+- char pretty[160];
+-
+- beautify_copy(pretty, md->id);
+- syslog(LOG_INFO, "sieve: discarded message to %s id %s",
+- sd->username, pretty);
+- }
+- else {
+- syslog(LOG_INFO, "sieve: discarded message to %s",
+- sd->username);
+- }
++ syslog(LOG_INFO, "sieve discarded: %s",
++ md->id ? md->id : "<nomsgid>");
+
+ return SIEVE_OK;
+ }
+@@ -383,7 +376,7 @@
+
+ if (strlen(md->return_path) == 0) {
+ syslog(LOG_INFO, "sieve: discarded reject to <> for %s id %s",
+- sd->username, md->id);
++ sd->username, md->id ? md->id : "<nomsgid>");
+ return SIEVE_OK;
+ }
+
+@@ -393,6 +386,8 @@
+ origreceip, sd->username,
+ rc->msg, md->data)) == 0) {
+ snmp_increment(SIEVE_REJECT, 1);
++ syslog(LOG_INFO, "sieve rejected: %s to: %s",
++ md->id ? md->id : "<nomsgid>", md->return_path);
+ return SIEVE_OK;
+ } else {
+ if (res == -1) {
+diff -urNad cyrus-imapd-2.2.13/imap/lmtpd.c /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/lmtpd.c
+--- cyrus-imapd-2.2.13/imap/lmtpd.c 2006-05-06 10:34:48.000000000 +0200
++++ /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/lmtpd.c 2006-05-12 12:17:52.578503246 +0200
+@@ -1,6 +1,6 @@
+ /* lmtpd.c -- Program to deliver mail to a mailbox
+ *
+- * $Id: lmtpd.c,v 1.143 2006/01/20 20:29:33 jeaton Exp $
++ * $Id: lmtpd.c,v 1.144 2006/05/10 16:27:17 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -321,6 +321,7 @@
+ strlen(mailboxname), now, uid);
+
+ append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
++ syslog(LOG_INFO, "Delivered: %s to mailbox: %s", id, mailboxname);
+ }
+ }
+
+diff -urNad cyrus-imapd-2.2.13/imap/mailbox.c /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/mailbox.c
+--- cyrus-imapd-2.2.13/imap/mailbox.c 2006-05-06 10:34:48.000000000 +0200
++++ /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/mailbox.c 2006-05-12 12:17:52.581502964 +0200
+@@ -1,5 +1,5 @@
+ /* mailbox.c -- Mailbox manipulation routines
+- * $Id: mailbox.c,v 1.159 2005/04/07 00:25:52 shadow Exp $
++ * $Id: mailbox.c,v 1.160 2006/05/10 16:27:18 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -1931,6 +1931,11 @@
+ }
+ }
+
++ if (numdeleted > 0) {
++ syslog(LOG_NOTICE, "Expunged %d messages from %s",
++ numdeleted, mailbox->name);
++ }
++
+ free(buf);
+ if (deleted) free(deleted);
+
+@@ -2187,6 +2192,7 @@
+ *tail = '\0';
+ } while (rmdir(buf) == 0 && (tail = strrchr(buf, '/')));
+
++ syslog(LOG_NOTICE, "Deleted mailbox %s", mailbox->name);
+ mailbox_close(mailbox);
+ return 0;
+ }
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,56 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0009-upstream-remove-redundant-wildcard-check by Sven Mueller
+## <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: remove redundant check for wildcards in mailbox names
+## DP: (Wes Craig <wes at umich.edu>)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/imapd.c /tmp/dpep.3mRazZ/cyrus-imapd-2.2.13/imap/imapd.c
+--- cyrus-imapd-2.2.13/imap/imapd.c 2006-05-12 12:18:02.000000000 +0200
++++ /tmp/dpep.3mRazZ/cyrus-imapd-2.2.13/imap/imapd.c 2006-05-12 12:18:43.442725508 +0200
+@@ -38,7 +38,7 @@
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+-/* $Id: imapd.c,v 1.498 2006/01/13 22:06:28 murch Exp $ */
++/* $Id: imapd.c,v 1.500 2006/05/10 15:41:44 murch Exp $ */
+
+ #include <config.h>
+
+@@ -3952,11 +3952,6 @@
+ }
+ }
+
+- /* verify that the mailbox doesn't have a wildcard in it */
+- for (p = oldmailboxname; !r && *p; p++) {
+- if (*p == '*' || *p == '%') r = IMAP_MAILBOX_BADNAME;
+- }
+-
+ /* attempt to rename the base mailbox */
+ if (!r) {
+ r = mboxlist_renamemailbox(oldmailboxname, newmailboxname, partition,
+diff -urNad cyrus-imapd-2.2.13/imap/mboxlist.c /tmp/dpep.3mRazZ/cyrus-imapd-2.2.13/imap/mboxlist.c
+--- cyrus-imapd-2.2.13/imap/mboxlist.c 2006-05-06 10:34:48.000000000 +0200
++++ /tmp/dpep.3mRazZ/cyrus-imapd-2.2.13/imap/mboxlist.c 2006-05-12 12:18:12.192660857 +0200
+@@ -40,7 +40,7 @@
+ *
+ */
+ /*
+- * $Id: mboxlist.c,v 1.241 2005/11/22 18:20:51 murch Exp $
++ * $Id: mboxlist.c,v 1.242 2006/05/10 15:41:52 murch Exp $
+ */
+
+ #include <config.h>
+@@ -476,10 +476,6 @@
+ free(acl);
+ return IMAP_PERMISSION_DENIED;
+ }
+- /* disallow wildcards in userids with inboxes. */
+- if (strchr(mbox, '*') || strchr(mbox, '%') || strchr(mbox, '?')) {
+- return IMAP_MAILBOX_BADNAME;
+- }
+
+ /*
+ * Users by default have all access to their personal mailbox(es),
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0010-upstream-fix-libRSAglue-linkage.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0010-upstream-fix-libRSAglue-linkage.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0010-upstream-fix-libRSAglue-linkage.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0010-upstream-fix-libRSAglue-linkage.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0010-upstream-fix-libRSAglue-linkage by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: check if we need libRSAglue before linking it
+## DP: Upstream committer: murch
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/cmulocal/openssl.m4 /tmp/dpep.JZkfga/cyrus-imapd-2.2.13/cmulocal/openssl.m4
+--- cyrus-imapd-2.2.13/cmulocal/openssl.m4 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.JZkfga/cyrus-imapd-2.2.13/cmulocal/openssl.m4 2006-05-17 21:06:43.162414202 +0200
+@@ -1,6 +1,6 @@
+ dnl
+ dnl macros for configure.in to detect openssl
+-dnl $Id: openssl.m4,v 1.10 2005/04/26 19:14:08 shadow Exp $
++dnl $Id: openssl.m4,v 1.11 2006/05/17 18:30:19 murch Exp $
+ dnl
+
+ AC_DEFUN([CMU_HAVE_OPENSSL], [
+@@ -24,8 +24,11 @@
+ dnl we need to include the rsaref libraries in the crypto check
+ LIB_RSAREF=""
+ AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
+- LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes,
+- cmu_have_rsaref=no)
++ cmu_have_rsaref=yes;
++ [AC_CHECK_LIB(RSAglue, RSAPublicEncrypt,
++ LIB_RSAREF="-lRSAglue -lrsaref",
++ LIB_RSAREF="-lrsaref")],
++ cmu_have_rsaref=no)
+
+ AC_CHECK_HEADER(openssl/evp.h, [
+ AC_CHECK_LIB(crypto, EVP_DigestInit,
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0011-upstream-allow-compile-with-krb5-1.4.3.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0011-upstream-allow-compile-with-krb5-1.4.3.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0011-upstream-allow-compile-with-krb5-1.4.3.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0011-upstream-allow-compile-with-krb5-1.4.3.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0011-upstream-allow-compile-with-krb5-1.4.3 by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: patch to compile with MIT krb5 1.4.3 (Philip Guenther <guenther at sendmail.com>)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/cmulocal/sasl2.m4 /tmp/dpep.YFbKHG/cyrus-imapd-2.2.13/cmulocal/sasl2.m4
+--- cyrus-imapd-2.2.13/cmulocal/sasl2.m4 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.YFbKHG/cyrus-imapd-2.2.13/cmulocal/sasl2.m4 2006-05-19 15:18:35.458325180 +0200
+@@ -1,6 +1,6 @@
+ # sasl2.m4--sasl2 libraries and includes
+ # Rob Siemborski
+-# $Id: sasl2.m4,v 1.51 2005/05/07 04:15:17 shadow Exp $
++# $Id: sasl2.m4,v 1.52 2006/05/18 19:25:00 murch Exp $
+
+ # SASL2_CRYPT_CHK
+ # ---------------
+@@ -110,9 +110,12 @@
+ fi
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
++ # check for libkrb5support first
++ AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET})
++
+ gss_failed=0
+ AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1,
+- ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${LIB_SOCKET})
++ ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET})
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+@@ -164,8 +167,8 @@
+ fi
+
+ if test "$gss_impl" = "mit"; then
+- GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
+- GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
++ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
+ elif test "$gss_impl" = "heimdal"; then
+ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0012-upstream-sasl-2.2.22-comapatibility-fix.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0012-upstream-sasl-2.2.22-comapatibility-fix.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0012-upstream-sasl-2.2.22-comapatibility-fix.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0012-upstream-sasl-2.2.22-comapatibility-fix.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,32 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0012-upstream-sasl-2.2.22-comapatibility-fix.dpatch by Benjamin Seidenberg <astronut at dlgeek.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream compatibility fix for SASL 2.1.22
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13~/imtest/imtest.c cyrus-imapd-2.2.13/imtest/imtest.c
+--- cyrus-imapd-2.2.13~/imtest/imtest.c 2006-05-05 21:04:25.000000000 -0400
++++ cyrus-imapd-2.2.13/imtest/imtest.c 2006-05-25 17:49:37.000000000 -0400
+@@ -1,7 +1,7 @@
+ /* imtest.c -- IMAP/POP3/NNTP/LMTP/SMTP/MUPDATE/MANAGESIEVE test client
+ * Ken Murchison (multi-protocol implementation)
+ * Tim Martin (SASL implementation)
+- * $Id: imtest.c,v 1.107 2006/01/20 20:31:23 jeaton Exp $
++ * $Id: imtest.c,v 1.108 2006/05/25 15:23:07 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+@@ -886,6 +886,12 @@
+ }
+
+ if (*str != '\r') {
++ /* trim CRLF */
++ char *p = str + strlen(str) - 1;
++ if (p >= str && *p == '\n') *p-- = '\0';
++ if (p >= str && *p == '\r') *p-- = '\0';
++
++ /* alloc space for decoded response */
+ len = strlen(str) + 1;
+ *line = malloc(len);
+ if ((*line) == NULL) {
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0013-upstream-allow-report-above-4GB-mboxsize.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0013-upstream-allow-report-above-4GB-mboxsize.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0013-upstream-allow-report-above-4GB-mboxsize.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0013-upstream-allow-report-above-4GB-mboxsize.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0012-upstream-allow-report-above-4GB-mboxsize by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream patch to allow reporting of mailbox sizes above 4GB
+
+ at DPATCH@
+diff -urNad --exclude=CVS --exclude=.svn ./imap/annotate.c /tmp/dpep-work.Lq66kS/cyrus-imapd-2.2.13/imap/annotate.c
+--- ./imap/annotate.c 2006-04-25 17:28:58.000000000 +0200
++++ /tmp/dpep-work.Lq66kS/cyrus-imapd-2.2.13/imap/annotate.c 2006-06-08 13:46:52.018338460 +0200
+@@ -703,7 +703,13 @@
+ struct mailbox mailbox;
+ struct index_record record;
+ int r = 0, msg;
++#ifdef HAVE_LONG_LONG_INT
++ unsigned long long totsize = 0;
++# define SIZE_FMT "%llu"
++#else
+ unsigned long totsize = 0;
++# define SIZE_FMT "%lu"
++#endif
+ char value[21];
+ struct annotation_data attrib;
+
+@@ -735,7 +741,7 @@
+
+ mailbox_close(&mailbox);
+
+- if (r || snprintf(value, sizeof(value), "%lu", totsize) == -1)
++ if (r || snprintf(value, sizeof(value), SIZE_FMT, totsize) == -1)
+ return;
+
+ memset(&attrib, 0, sizeof(attrib));
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0014-upstream-fix-locks-during-reconstruction.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0014-upstream-fix-locks-during-reconstruction.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0014-upstream-fix-locks-during-reconstruction.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0014-upstream-fix-locks-during-reconstruction.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,55 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0014-upstream-fix-locks-during-reconstruction.dpatch by Benjamin Seidenberg <astronut at dlgeek.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream: don't lock/unlock_pop when reconstructing
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/mailbox.c /tmp/dpep.ifqqjz/cyrus-imapd-2.2.13/imap/mailbox.c
+--- cyrus-imapd-2.2.13/imap/mailbox.c 2006-06-08 12:59:59.000000000 +0200
++++ /tmp/dpep.ifqqjz/cyrus-imapd-2.2.13/imap/mailbox.c 2006-06-08 13:00:01.083767966 +0200
+@@ -1,5 +1,5 @@
+ /* mailbox.c -- Mailbox manipulation routines
+- * $Id: mailbox.c,v 1.160 2006/05/10 16:27:18 murch Exp $
++ * $Id: mailbox.c,v 1.161 2006/06/02 18:56:52 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -1391,11 +1391,14 @@
+ return r;
+ }
+
+- r = mailbox_lock_pop(mailbox);
+- if (r) {
+- mailbox_unlock_index(mailbox);
+- mailbox_unlock_header(mailbox);
+- return r;
++ if (!mailbox_doing_reconstruct) {
++ /* If we're reconstructing, we don't open the existing cache file */
++ r = mailbox_lock_pop(mailbox);
++ if (r) {
++ mailbox_unlock_index(mailbox);
++ mailbox_unlock_header(mailbox);
++ return r;
++ }
+ }
+
+ strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf));
+@@ -1499,7 +1502,7 @@
+ goto fail;
+ }
+
+- mailbox_unlock_pop(mailbox);
++ if (!mailbox_doing_reconstruct) mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ fclose(newindex);
+@@ -1507,7 +1510,7 @@
+ return 0;
+
+ fail:
+- mailbox_unlock_pop(mailbox);
++ if (!mailbox_doing_reconstruct) mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0015-upstream-fix-logic-error-in-imapoptions.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0015-upstream-fix-logic-error-in-imapoptions.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0015-upstream-fix-logic-error-in-imapoptions.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0015-upstream-fix-logic-error-in-imapoptions.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fileDNZ3cU.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/lib/imapoptions /tmp/dpep.CwO4OZ/cyrus-imapd-2.2.13/lib/imapoptions
+--- cyrus-imapd-2.2.13/lib/imapoptions 2006-06-04 21:47:19.000000000 +0200
++++ /tmp/dpep.CwO4OZ/cyrus-imapd-2.2.13/lib/imapoptions 2006-06-06 17:51:14.392340472 +0200
+@@ -42,7 +42,7 @@
+ .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ .\"
+-.\" $Id: imapoptions,v 1.36 2006/03/30 15:49:58 murch Exp $
++.\" $Id: imapoptions,v 1.37 2006/06/05 23:31:22 murch Exp $
+ .SH NAME
+ imapd.conf \- IMAP configuration file
+ .SH DESCRIPTION
+@@ -801,7 +801,7 @@
+ /* The cyrusdb backend to use for the subscriptions list. */
+
+ { "syslog_prefix", NULL, STRING }
+-/* String to be appended to the process name in syslog entries. */
++/* String to be prepended to the process name in syslog entries. */
+
+ { "temp_path", "/tmp", STRING }
+ /* The pathname to store temporary files in */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0016-upstream-fix-typos.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0016-upstream-fix-typos.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0016-upstream-fix-typos.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0016-upstream-fix-typos.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,65 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## upstream-fix-typos by Sven Mueller <sven at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: See https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/man/reconstruct.8.diff?r1=1.19&r2=1.20
+## DP: And https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/man/chk_cyrus.8.diff?r1=1.3&r2=1.4
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/man/chk_cyrus.8 /tmp/dpep.IOS55O/cyrus-imapd-2.2.13/man/chk_cyrus.8
+--- cyrus-imapd-2.2.13/man/chk_cyrus.8 2006-08-06 20:04:29.000000000 +0200
++++ /tmp/dpep.IOS55O/cyrus-imapd-2.2.13/man/chk_cyrus.8 2006-08-06 20:08:15.026586061 +0200
+@@ -40,7 +40,7 @@
+ .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ .\"
+ .SH NAME
+-chk_cyrus \- perform a consistancy check of the cyrus mailstore
++chk_cyrus \- perform a consistency check of the cyrus mailstore
+ .SH SYNOPSIS
+ .B chk_cyrus
+ [
+@@ -57,7 +57,7 @@
+ ]
+ .SH DESCRIPTION
+ .I Chk_cyrus
+-is used to perform a consistancy check on the cyrus datastore, and output
++is used to perform a consistency check on the cyrus datastore, and output
+ a list of files/directories that are expected to exist, but do not.
+ Status messagess are output to stderr, the list of files/directories is
+ output to stdout. This list can be passed to a backup program to aid a
+@@ -73,10 +73,10 @@
+ Read configuration options from \fIconfig-file\fR.
+ .TP
+ .BI \-P " partition"
+-Run the consistancy check for only the given partition.
++Run the consistency check for only the given partition.
+ May not be specified with -M.
+ .BI \-M " mailbox"
+-Run the consistancy check for only the given mailbox.
++Run the consistency check for only the given mailbox.
+ May not be specified with -P.
+ .SH FILES
+ .TP
+diff -urNad cyrus-imapd-2.2.13/man/reconstruct.8 /tmp/dpep.IOS55O/cyrus-imapd-2.2.13/man/reconstruct.8
+--- cyrus-imapd-2.2.13/man/reconstruct.8 2006-08-06 20:04:29.000000000 +0200
++++ /tmp/dpep.IOS55O/cyrus-imapd-2.2.13/man/reconstruct.8 2006-08-06 20:10:35.754646314 +0200
+@@ -39,7 +39,7 @@
+ .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ .\"
+-.\" $Id: reconstruct.8,v 1.19 2004/10/13 18:07:49 shadow Exp $
++.\" $Id: reconstruct.8,v 1.20 2006/06/19 13:01:19 murch Exp $
+ .SH NAME
+ reconstruct \- reconstruct mailboxes
+ .SH SYNOPSIS
+@@ -118,8 +118,8 @@
+ .B \-x
+ When processing a mailbox which is not in the mailbox list (e.g. via
+ the -p or -f options), do not import the metadata from the mailbox,
+-instead create it anew (this specifically affects atleast the mailbox's seen
+-stat unique identifier, user flags, and ACL).
++instead create it anew (this specifically affects at least the mailbox's seen
++state unique identifier, user flags, and ACL).
+ .TP
+ .B \-r
+ Recursively reconstruct all sub-mailboxes of the mailboxes or mailbox
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0017-upstream-no-body-empty-string-instead-of-null.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0017-upstream-no-body-empty-string-instead-of-null.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0017-upstream-no-body-empty-string-instead-of-null.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0017-upstream-no-body-empty-string-instead-of-null.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0017-upstream-no-body-empty-string-instead-of-null by murch at andrew.cmu.edu
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: return an empty string for empty body parts instead of NULL
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/lib/charset.c /tmp/dpep.RuEsfH/cyrus-imapd-2.2.13/lib/charset.c
+--- cyrus-imapd-2.2.13/lib/charset.c 2005-03-12 23:09:22.000000000 +0100
++++ /tmp/dpep.RuEsfH/cyrus-imapd-2.2.13/lib/charset.c 2006-08-06 19:55:36.020854674 +0200
+@@ -39,7 +39,7 @@
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+ /*
+- * $Id: charset.c,v 1.44 2003/10/22 18:50:12 rjs3 Exp $
++ * $Id: charset.c,v 1.45 2006/06/14 12:44:05 murch Exp $
+ */
+ #include <config.h>
+ #include <ctype.h>
+@@ -861,24 +861,22 @@
+ return (char *) msg_base;
+
+ case ENCODING_QP:
+- if (alloced < len)
+- *retval = xrealloc(*retval, len);
+- *outlen = charset_readqp(&state, *retval, len);
+- return (*outlen ? *retval : NULL);
++ state.rawproc = charset_readqp;
++ break;
+
+ case ENCODING_BASE64:
+- if (alloced < len)
+- *retval = xrealloc(*retval, len);
+- *outlen = charset_readbase64(&state, *retval, len);
+- return (*outlen ? *retval : NULL);
++ state.rawproc = charset_readbase64;
++ break;
+
+ default:
+ /* Don't know encoding--nothing can match */
+ return NULL;
+ }
+
+- /* should never get here */
+- return NULL;
++ if (alloced < len+1) *retval = xrealloc(*retval, len+1);
++ *outlen = (*state.rawproc)(&state, *retval, len);
++ (*retval)[*outlen] = '\0';
++ return *retval;
+ }
+
+ /*
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0018-upstream-ntohl-instead-of-htonl.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0018-upstream-ntohl-instead-of-htonl by murch at andrew.cmu.edu
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: use ntohl() instead of htonl() in mailbox_read_index_record()
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/mailbox.c /tmp/dpep.20jd7v/cyrus-imapd-2.2.13/imap/mailbox.c
+--- cyrus-imapd-2.2.13/imap/mailbox.c 2006-08-06 20:03:02.000000000 +0200
++++ /tmp/dpep.20jd7v/cyrus-imapd-2.2.13/imap/mailbox.c 2006-08-06 20:03:13.168502599 +0200
+@@ -1,5 +1,5 @@
+ /* mailbox.c -- Mailbox manipulation routines
+- * $Id: mailbox.c,v 1.161 2006/06/02 18:56:52 murch Exp $
++ * $Id: mailbox.c,v 1.162 2006/08/04 14:40:54 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+@@ -884,20 +884,20 @@
+
+ buf = (unsigned char*) mailbox->index_base + offset;
+
+- record->uid = htonl(*((bit32 *)(buf+OFFSET_UID)));
+- record->internaldate = htonl(*((bit32 *)(buf+OFFSET_INTERNALDATE)));
+- record->sentdate = htonl(*((bit32 *)(buf+OFFSET_SENTDATE)));
+- record->size = htonl(*((bit32 *)(buf+OFFSET_SIZE)));
+- record->header_size = htonl(*((bit32 *)(buf+OFFSET_HEADER_SIZE)));
+- record->content_offset = htonl(*((bit32 *)(buf+OFFSET_CONTENT_OFFSET)));
+- record->cache_offset = htonl(*((bit32 *)(buf+OFFSET_CACHE_OFFSET)));
+- record->last_updated = htonl(*((bit32 *)(buf+OFFSET_LAST_UPDATED)));
+- record->system_flags = htonl(*((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)));
++ record->uid = ntohl(*((bit32 *)(buf+OFFSET_UID)));
++ record->internaldate = ntohl(*((bit32 *)(buf+OFFSET_INTERNALDATE)));
++ record->sentdate = ntohl(*((bit32 *)(buf+OFFSET_SENTDATE)));
++ record->size = ntohl(*((bit32 *)(buf+OFFSET_SIZE)));
++ record->header_size = ntohl(*((bit32 *)(buf+OFFSET_HEADER_SIZE)));
++ record->content_offset = ntohl(*((bit32 *)(buf+OFFSET_CONTENT_OFFSET)));
++ record->cache_offset = ntohl(*((bit32 *)(buf+OFFSET_CACHE_OFFSET)));
++ record->last_updated = ntohl(*((bit32 *)(buf+OFFSET_LAST_UPDATED)));
++ record->system_flags = ntohl(*((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)));
+ for (n = 0; n < MAX_USER_FLAGS/32; n++) {
+- record->user_flags[n] = htonl(*((bit32 *)(buf+OFFSET_USER_FLAGS+4*n)));
++ record->user_flags[n] = ntohl(*((bit32 *)(buf+OFFSET_USER_FLAGS+4*n)));
+ }
+- record->content_lines = htonl(*((bit32 *)(buf+OFFSET_CONTENT_LINES)));
+- record->cache_version = htonl(*((bit32 *)(buf+OFFSET_CACHE_VERSION)));
++ record->content_lines = ntohl(*((bit32 *)(buf+OFFSET_CONTENT_LINES)));
++ record->cache_version = ntohl(*((bit32 *)(buf+OFFSET_CACHE_VERSION)));
+ return 0;
+ }
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0090-fix-casts.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0090-fix-casts.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0090-fix-casts.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/0090-fix-casts.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,123 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0090-fix-casts.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix compile-time warnings about casts from pointer to integer
+## DP: of different size.
+
+ at DPATCH@
+diff -urNad --exclude=CVS --exclude=.svn ./imap/squat_build.c /tmp/dpep-work.MJclMQ/cyrus-imapd-2.2.13/imap/squat_build.c
+--- ./imap/squat_build.c 2006-04-25 17:28:58.000000000 +0200
++++ /tmp/dpep-work.MJclMQ/cyrus-imapd-2.2.13/imap/squat_build.c 2006-06-08 14:33:06.966146056 +0200
+@@ -479,7 +479,7 @@
+ for (i = 0; i < VECTOR_SIZE(t->entries); i++) {
+ SquatWordTableEntry* e = &(t->entries[i]);
+
+- if (e->leaf_presence != NULL && ((int)e->leaf_presence & 1) == 0) {
++ if (e->leaf_presence != NULL && ((int)e->leaf_presence_singleton & 1) == 0) {
+ free(e->leaf_presence);
+ }
+ }
+@@ -568,7 +568,7 @@
+
+ if (word_entry == NULL) {
+ /* We are in "per document" mode. */
+- if (((int)e->leaf_presence & 1) != 0) {
++ if (((int)e->leaf_presence_singleton & 1) != 0) {
+ /* We currently have a singleton here. */
+ int oldch = e->leaf_presence_singleton >> 1;
+
+@@ -787,7 +787,7 @@
+
+ word[0] = (char)i;
+
+- if (((int)e->leaf_presence & 1) != 0) {
++ if (((int)e->leaf_presence_singleton & 1) != 0) {
+ /* Got a singleton at this branch point. Just output the single word. */
+ word[1] = (char)(e->leaf_presence_singleton >> 1);
+ e->leaf_presence = NULL; /* clear the leaf out */
+diff -urNad --exclude=CVS --exclude=.svn ./imap/tls.c /tmp/dpep-work.MJclMQ/cyrus-imapd-2.2.13/imap/tls.c
+--- ./imap/tls.c 2006-04-25 17:28:58.000000000 +0200
++++ /tmp/dpep-work.MJclMQ/cyrus-imapd-2.2.13/imap/tls.c 2006-06-08 14:28:13.259629963 +0200
+@@ -717,14 +717,22 @@
+ return (ret);
+
+ if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) {
+- printf("read from %08X [%08lX] (%d bytes => %ld (0x%X))",
+- (unsigned int) bio, (long unsigned int) argp,
++#if __WORDSIZE == 64
++ printf("read from %016zX [%016zX] (%d bytes => %ld (0x%X))",
++#else
++ printf("read from %08zX [%08zX] (%d bytes => %ld (0x%X))",
++#endif
++ (size_t) bio, (size_t) argp,
+ argi, ret, (unsigned int) ret);
+ tls_dump(argp, (int) ret);
+ return (ret);
+ } else if (cmd == (BIO_CB_WRITE | BIO_CB_RETURN)) {
+- printf("write to %08X [%08lX] (%d bytes => %ld (0x%X))",
+- (unsigned int) bio, (long unsigned int)argp,
++#if __WORDSIZE == 64
++ printf("write to %016zX [%016zX] (%d bytes => %ld (0x%X))",
++#else
++ printf("write to %08zX [%08zX] (%d bytes => %ld (0x%X))",
++#endif
++ (size_t) bio, (size_t)argp,
+ argi, ret, (unsigned int) ret);
+ tls_dump(argp, (int) ret);
+ }
+diff -urNad --exclude=CVS --exclude=.svn ./master/master.c /tmp/dpep-work.MJclMQ/cyrus-imapd-2.2.13/master/master.c
+--- ./master/master.c 2006-04-25 17:28:58.000000000 +0200
++++ /tmp/dpep-work.MJclMQ/cyrus-imapd-2.2.13/master/master.c 2006-06-08 14:28:13.259629963 +0200
+@@ -1304,7 +1304,6 @@
+
+ void add_service(const char *name, struct entry *e, void *rock)
+ {
+- int ignore_err = (int) rock;
+ char *cmd = xstrdup(masterconf_getstring(e, "cmd", ""));
+ int prefork = masterconf_getint(e, "prefork", 0);
+ int babysit = masterconf_getswitch(e, "babysit", 0);
+@@ -1324,7 +1323,7 @@
+ snprintf(buf, sizeof(buf),
+ "unable to find command or port for service '%s'", name);
+
+- if (ignore_err) {
++ if (rock != NULL) {
+ syslog(LOG_WARNING, "WARNING: %s -- ignored", buf);
+ return;
+ }
+@@ -1340,7 +1339,7 @@
+ /* must have empty/same service name, listen and proto */
+ if ((!Services[i].name || !strcmp(Services[i].name, name)) &&
+ (!Services[i].listen || !strcmp(Services[i].listen, listen)) &&
+- (!Services[i].proto || !strcmp(Services[i].proto, proto)))
++ ((Services[i].proto==NULL) || !strcmp(Services[i].proto, proto)))
+ break;
+ }
+
+@@ -1349,7 +1348,7 @@
+ char buf[256];
+ snprintf(buf, sizeof(buf), "multiple entries for service '%s'", name);
+
+- if (ignore_err) {
++ if (rock != NULL) {
+ syslog(LOG_WARNING, "WARNING: %s -- ignored", buf);
+ return;
+ }
+@@ -1438,7 +1437,6 @@
+
+ void add_event(const char *name, struct entry *e, void *rock)
+ {
+- int ignore_err = (int) rock;
+ char *cmd = xstrdup(masterconf_getstring(e, "cmd", ""));
+ int period = 60 * masterconf_getint(e, "period", 0);
+ int at = masterconf_getint(e, "at", -1), hour, min;
+@@ -1450,7 +1448,7 @@
+ snprintf(buf, sizeof(buf),
+ "unable to find command or port for event '%s'", name);
+
+- if (ignore_err) {
++ if (rock != NULL) {
+ syslog(LOG_WARNING, "WARNING: %s -- ignored", buf);
+ return;
+ }
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/00list
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/00list?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/00list (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/00list Sat Aug 26 02:00:13 2006
@@ -1,0 +1,27 @@
+01-fix_Makefile.in.dpatch
+02-add_mkinstalldirs.dpatch
+03-fix_docs.dpatch
+04-add_autogen.sh.dpatch
+05-fix_programnames.dpatch
+06-disable_runpath.dpatch
+07-update_aclocal_and_configure.in.dpatch
+08-clean_socket_closes.dpatch
+09-kerberos-ipv4-ipv6-kludge-removal.dpatch
+10-fix_potential_overflows.dpatch
+11-fix_syslog_prefix.dpatch
+12-fix_timeout_handling.dpatch
+13-master_process_handling.dpatch
+14-xmalloc.dpatch
+16-fix_mib.dpatch
+17-fix_tail_syntax_in_xversion.h.dpatch
+19-fix_tls_ssl.dpatch
+21-fix_config-parsing.dpatch
+25-update_install-sh.dpatch
+30-update_perlcalling.sh.dpatch
+35-masssievec_remove_unused_variable.dpatch
+40-rehash_fix_pathes.dpatch
+65-sieveshell-enhancements.dpatch
+70-allow-larger-buffers.dpatch
+72-faster-isdigit.dpatch
+75-update-imapd.conf-documentation.dpatch
+99-update-autoconf.dpatch
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/01-fix_Makefile.in.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/01-fix_Makefile.in.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/01-fix_Makefile.in.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/01-fix_Makefile.in.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,162 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01-fix_Makefile.in.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix all Makefile.in files as necessary
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/Makefile.in cyrus-imapd-2.3-2.3.7/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/Makefile.in 2006-07-10 15:46:19.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -41,7 +41,7 @@
+ #
+
+ SUBDIRS = man @PRE_SUBDIRS@ lib @SIEVE_SUBDIRS@ @SERVER_SUBDIRS@ \
+- imtest @SNMP_SUBDIRS@ @EXTRA_SUBDIRS@
++ imtest perl @SNMP_SUBDIRS@ @EXTRA_SUBDIRS@
+ DISTSUBDIRS = doc
+
+ srcdir = @srcdir@
+diff -urNad cyrus-imapd-2.3-2.3.7~/imap/Makefile.in cyrus-imapd-2.3-2.3.7/imap/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/imap/Makefile.in 2006-03-15 19:56:29.000000000 +0100
++++ cyrus-imapd-2.3-2.3.7/imap/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -69,7 +69,7 @@
+ LIBS = $(IMAP_LIBS) $(IMAP_COM_ERR_LIBS)
+ DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+-CFLAGS = @CFLAGS@
++CFLAGS = @CFLAGS@ @WARNERROR@
+ LDFLAGS = @LDFLAGS@ @COM_ERR_LDFLAGS@
+
+ SHELL = /bin/sh
+diff -urNad cyrus-imapd-2.3-2.3.7~/installsieve/Makefile.in cyrus-imapd-2.3-2.3.7/installsieve/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/installsieve/Makefile.in 2003-10-22 20:50:11.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/installsieve/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -48,7 +48,7 @@
+
+ DEFS = @DEFS@
+ CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/../lib @CPPFLAGS@ @SASLFLAGS@
+-CFLAGS = @CFLAGS@
++CFLAGS = @CFLAGS@ @WARNERROR@
+ LDFLAGS = @LDFLAGS@
+
+ INSTALL = @INSTALL@
+diff -urNad cyrus-imapd-2.3-2.3.7~/lib/Makefile.in cyrus-imapd-2.3-2.3.7/lib/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/lib/Makefile.in 2006-03-17 18:29:40.000000000 +0100
++++ cyrus-imapd-2.3-2.3.7/lib/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -62,7 +62,7 @@
+ LIBS = @LIBS@
+
+ MAKEDEPEND_CFLAGS = @CFLAGS@
+-CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@
++CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@ @WARNERROR@ -fPIC
+ LDFLAGS = @LDFLAGS@
+
+ SHELL = /bin/sh
+diff -urNad cyrus-imapd-2.3-2.3.7~/master/Makefile.in cyrus-imapd-2.3-2.3.7/master/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/master/Makefile.in 2005-02-21 20:25:56.000000000 +0100
++++ cyrus-imapd-2.3-2.3.7/master/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -57,7 +57,7 @@
+ CPPFLAGS = -I.. -I$(srcdir)/../lib -I$(srcdir)/../imap @CPPFLAGS@ @COM_ERR_CPPFLAGS@
+ DEPLIBS = @DEPLIBS@
+
+-CFLAGS = @CFLAGS@
++CFLAGS = @CFLAGS@ @WARNERROR@
+ LDFLAGS = @LDFLAGS@ @COM_ERR_LDFLAGS@
+ LIBS = ../lib/libcyrus_min.a @LIB_UCDSNMP@ @LIBS@ @COM_ERR_LIBS@
+
+diff -urNad cyrus-imapd-2.3-2.3.7~/notifyd/Makefile.in cyrus-imapd-2.3-2.3.7/notifyd/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/notifyd/Makefile.in 2004-05-31 20:22:59.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/notifyd/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -54,7 +54,7 @@
+
+ DEFS = @DEFS@ @LOCALDEFS@
+ CPPFLAGS = -I.. -I$(srcdir)/../sieve -I$(srcdir)/../imap -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+-CFLAGS = @CFLAGS@
++CFLAGS = @CFLAGS@ @WARNERROR@
+ LDFLAGS = @LDFLAGS@
+
+ prefix = @prefix@
+diff -urNad cyrus-imapd-2.3-2.3.7~/perl/Makefile.in cyrus-imapd-2.3-2.3.7/perl/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/perl/Makefile.in 2003-10-22 20:50:17.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/perl/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -82,9 +82,9 @@
+ BDB_LIB="$(BDB_LIB)" BDB_INC="$(BDB_INC)" \
+ OPENSSL_LIB="$(OPENSSL_LIB)" OPENSSL_INC="$(OPENSSL_INC)" \
+ SASL_LIB="$(SASL_LIB)" SASL_INC="$(SASL_INC)" CC="$(CC)" \
+- $(PERL) Makefile.PL PREFIX=$(prefix); \
++ $(PERL) Makefile.PL INSTALLDIRS=vendor; \
+ fi; \
+- $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \
++ $(MAKE) $(MFLAGS) LD_RUN_PATH= DESTDIR=$(DESTDIR) all) || exit 1; \
+ done
+
+ install::
+diff -urNad cyrus-imapd-2.3-2.3.7~/perl/sieve/Makefile.in cyrus-imapd-2.3-2.3.7/perl/sieve/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/perl/sieve/Makefile.in 2003-10-22 20:50:24.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/perl/sieve/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -84,9 +84,9 @@
+ BDB_LIB="$(BDB_LIB)" BDB_INC="$(BDB_INC)" \
+ OPENSSL_LIB="$(OPENSSL_LIB)" OPENSSL_INC="$(OPENSSL_INC)" \
+ SASL_LIB="$(SASL_LIB)" SASL_INC="$(SASL_INC)" CC="$(CC)" \
+- $(PERL) Makefile.PL PREFIX=$(prefix); \
++ $(PERL) Makefile.PL INSTALLDIRS=vendor; \
+ fi; \
+- $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \
++ $(MAKE) $(MFLAGS) LD_RUN_PATH= DESTDIR=$(DESTDIR) all) || exit 1; \
+ done
+
+ install::
+diff -urNad cyrus-imapd-2.3-2.3.7~/perl/sieve/lib/Makefile.in cyrus-imapd-2.3-2.3.7/perl/sieve/lib/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/perl/sieve/lib/Makefile.in 2004-05-31 20:23:00.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/perl/sieve/lib/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -57,7 +57,7 @@
+ DEPLIBS = ../../../lib/libcyrus.a ../../../lib/libcyrus_min.a @DEPLIBS@
+
+ MAKEDEPEND_CFLAGS = @CFLAGS@
+-CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@
++CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@ -fPIC
+ LDFLAGS = @LDFLAGS@
+
+ SHELL = /bin/sh
+diff -urNad cyrus-imapd-2.3-2.3.7~/sieve/Makefile.in cyrus-imapd-2.3-2.3.7/sieve/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/sieve/Makefile.in 2005-02-21 20:25:59.000000000 +0100
++++ cyrus-imapd-2.3-2.3.7/sieve/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -40,7 +40,7 @@
+ DEFS = @DEFS@ @LOCALDEFS@
+ CPPFLAGS = -I.. -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+ MAKEDEPEND_CFLAGS = @CFLAGS@
+-CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@
++CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@ -fPIC
+ LDFLAGS = @LDFLAGS@
+
+ MAKEDEPEND = @MAKEDEPEND@
+@@ -51,6 +51,7 @@
+ LIBS = libsieve.a $(IMAP_LIBS) $(IMAP_COM_ERR_LIBS)
+ DEPLIBS=../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
++BINARIES = sievec sieved
+ BUILT_SOURCES = addr.c addr.h addr-lex.c \
+ sieve.c sieve.h sieve-lex.c \
+ sieve_err.h sieve_err.c
+@@ -115,7 +116,7 @@
+ $(COMPILE_ET) $(srcdir)/sieve_err.et
+
+ clean:
+- rm -f test *~ *.o *.a Makefile.bak makedepend.log
++ rm -f test *~ *.o *.a Makefile.bak makedepend.log $(BINARIES)
+
+ distclean: clean
+ rm -f Makefile
+diff -urNad cyrus-imapd-2.3-2.3.7~/timsieved/Makefile.in cyrus-imapd-2.3-2.3.7/timsieved/Makefile.in
+--- cyrus-imapd-2.3-2.3.7~/timsieved/Makefile.in 2006-06-27 17:58:43.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/timsieved/Makefile.in 2006-08-14 16:18:21.000000000 +0200
+@@ -54,7 +54,7 @@
+
+ DEFS = @DEFS@ @LOCALDEFS@
+ CPPFLAGS = -I.. -I$(srcdir)/../sieve -I$(srcdir)/../imap -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+-CFLAGS = @CFLAGS@
++CFLAGS = @CFLAGS@ @WARNERROR@
+ LDFLAGS = @LDFLAGS@
+
+ prefix = @prefix@
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/02-add_mkinstalldirs.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/02-add_mkinstalldirs.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/02-add_mkinstalldirs.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/02-add_mkinstalldirs.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,161 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02-add_mkinstalldirs.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add mkinstalldirs
+
+ at DPATCH@
+diff -urNad complete.dpatch/mkinstalldirs /tmp/dpep.rSX3y1/complete.dpatch/mkinstalldirs
+--- complete.dpatch/mkinstalldirs 1970-01-01 01:00:00.000000000 +0100
++++ /tmp/dpep.rSX3y1/complete.dpatch/mkinstalldirs 2005-11-10 16:36:11.547841465 +0100
+@@ -0,0 +1,150 @@
++#! /bin/sh
++# mkinstalldirs --- make directory hierarchy
++
++scriptversion=2005-02-02.21
++
++# Original author: Noah Friedman <friedman at prep.ai.mit.edu>
++# Created: 1993-05-16
++# Public domain.
++#
++# This file is maintained in Automake, please report
++# bugs to <bug-automake at gnu.org> or send patches to
++# <automake-patches at gnu.org>.
++
++errstatus=0
++dirmode=""
++
++usage="\
++Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
++
++Create each directory DIR (with mode MODE, if specified), including all
++leading file name components.
++
++Report bugs to <bug-automake at gnu.org>."
++
++# process command line arguments
++while test $# -gt 0 ; do
++ case $1 in
++ -h | --help | --h*) # -h for help
++ echo "$usage"
++ exit $?
++ ;;
++ -m) # -m PERM arg
++ shift
++ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
++ dirmode=$1
++ shift
++ ;;
++ --version)
++ echo "$0 $scriptversion"
++ exit $?
++ ;;
++ --) # stop option processing
++ shift
++ break
++ ;;
++ -*) # unknown option
++ echo "$usage" 1>&2
++ exit 1
++ ;;
++ *) # first non-opt arg
++ break
++ ;;
++ esac
++done
++
++for file
++do
++ if test -d "$file"; then
++ shift
++ else
++ break
++ fi
++done
++
++case $# in
++ 0) exit 0 ;;
++esac
++
++# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
++# mkdir -p a/c at the same time, both will detect that a is missing,
++# one will create a, then the other will try to create a and die with
++# a "File exists" error. This is a problem when calling mkinstalldirs
++# from a parallel make. We use --version in the probe to restrict
++# ourselves to GNU mkdir, which is thread-safe.
++case $dirmode in
++ '')
++ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
++ echo "mkdir -p -- $*"
++ exec mkdir -p -- "$@"
++ else
++ # On NextStep and OpenStep, the `mkdir' command does not
++ # recognize any option. It will interpret all options as
++ # directories to create, and then abort because `.' already
++ # exists.
++ test -d ./-p && rmdir ./-p
++ test -d ./--version && rmdir ./--version
++ fi
++ ;;
++ *)
++ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
++ test ! -d ./--version; then
++ echo "mkdir -m $dirmode -p -- $*"
++ exec mkdir -m "$dirmode" -p -- "$@"
++ else
++ # Clean up after NextStep and OpenStep mkdir.
++ for d in ./-m ./-p ./--version "./$dirmode";
++ do
++ test -d $d && rmdir $d
++ done
++ fi
++ ;;
++esac
++
++for file
++do
++ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
++ shift
++
++ pathcomp=
++ for d
++ do
++ pathcomp="$pathcomp$d"
++ case $pathcomp in
++ -*) pathcomp=./$pathcomp ;;
++ esac
++
++ if test ! -d "$pathcomp"; then
++ echo "mkdir $pathcomp"
++
++ mkdir "$pathcomp" || lasterr=$?
++
++ if test ! -d "$pathcomp"; then
++ errstatus=$lasterr
++ else
++ if test ! -z "$dirmode"; then
++ echo "chmod $dirmode $pathcomp"
++ lasterr=""
++ chmod "$dirmode" "$pathcomp" || lasterr=$?
++
++ if test ! -z "$lasterr"; then
++ errstatus=$lasterr
++ fi
++ fi
++ fi
++ fi
++
++ pathcomp="$pathcomp/"
++ done
++done
++
++exit $errstatus
++
++# Local Variables:
++# mode: shell-script
++# sh-indentation: 2
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "scriptversion="
++# time-stamp-format: "%:y-%02m-%02d.%02H"
++# time-stamp-end: "$"
++# End:
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/03-fix_docs.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/03-fix_docs.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/03-fix_docs.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/03-fix_docs.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,61 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+_# 03-fix_docs.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FAQ and virtual domains installation docs
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/doc/faq.html cyrus-imapd-2.3-2.3.7/doc/faq.html
+--- cyrus-imapd-2.3-2.3.7~/doc/faq.html 2004-03-24 20:52:58.000000000 +0100
++++ cyrus-imapd-2.3-2.3.7/doc/faq.html 2006-08-14 16:21:43.000000000 +0200
+@@ -111,7 +111,7 @@
+ </pre>
+
+ <p>Make sure that <tt>saslauthd</tt> is running and that the cyrus
+-user can access the unix domain socket (defaults to <tt>/var/run/mux</tt>).
++user can access the unix domain socket (defaults to <tt>/var/run/saslauthd/mux</tt>).
+
+ </dd>
+
+diff -urNad cyrus-imapd-2.3-2.3.7~/doc/install-virtdomains.html cyrus-imapd-2.3-2.3.7/doc/install-virtdomains.html
+--- cyrus-imapd-2.3-2.3.7~/doc/install-virtdomains.html 2004-01-15 21:24:25.000000000 +0100
++++ cyrus-imapd-2.3-2.3.7/doc/install-virtdomains.html 2006-08-14 16:21:43.000000000 +0200
+@@ -99,6 +99,10 @@
+ to the <tt>defaultdomain</tt>. See <a href=#admins>Administrators</a>
+ below for further discussion.
+
++<p><b>Note:</b> Users in the <tt>defaultdomain</tt> must <i>not</i>
++log in using the <tt>user at domain</tt> cross-realm login syntax. The
++<tt>user at domain</tt> type specification only works for them in LMTP.
++
+ <p>Here is a sample <tt>imapd.conf</tt> with a minimal set of configuration
+ options.</p>
+
+diff -urNad cyrus-imapd-2.3-2.3.7~/lib/imapoptions cyrus-imapd-2.3-2.3.7/lib/imapoptions
+--- cyrus-imapd-2.3-2.3.7~/lib/imapoptions 2006-06-27 17:58:42.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/lib/imapoptions 2006-08-14 16:21:43.000000000 +0200
+@@ -187,7 +187,11 @@
+ mailbox that does not have a parent mailbox. */
+
+ { "defaultdomain", NULL, STRING }
+-/* The default domain for virtual domain support */
++/* The default domain for virtual domain support. Note that this domain
++ is stripped from the email-address transmitted using LMTP, but it
++ is not stripped from usernames at login-time. For imapd/pop3d,
++ "user" and "user at defaultdomain" specify two different users.
++ Please check install-virtdomains.html for details. */
+
+ { "defaultpartition", "default", STRING }
+ /* The partition name used by default for new mailboxes. */
+@@ -472,7 +476,10 @@
+ /* The list of remote realms whose users may authenticate using cross-realm
+ authentication identifiers. Separate each realm name by a space. (A
+ cross-realm identity is considered any identity returned by SASL
+- with an "@" in it.). */
++ with an "@" in it.) Note that to support multiple virtual domains
++ on the same interface/IP, you need to list them all as loginreals.
++ If you don't list them here, your users probably won't be able to
++ log in. */
+
+ { "loginuseacl", 0, SWITCH }
+ /* If enabled, any authentication identity which has \fBa\fR rights on a
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/04-add_autogen.sh.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/04-add_autogen.sh.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/04-add_autogen.sh.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/04-add_autogen.sh.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,88 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04-add_autogen.sh.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add autogen.sh
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.12/autogen.sh /tmp/dpep.Ck5bWN/cyrus-imapd-2.2.12/autogen.sh
+--- cyrus-imapd-2.2.12/autogen.sh 1970-01-01 01:00:00.000000000 +0100
++++ /tmp/dpep.Ck5bWN/cyrus-imapd-2.2.12/autogen.sh 2005-11-11 19:47:43.571058024 +0100
+@@ -0,0 +1,77 @@
++#!/bin/sh
++#
++# autogen.sh glue for CMU Cyrus IMAP
++# $Id: autogen.sh,v 1.16 2004/09/12 15:30:23 hmh Exp $
++#
++# Requires: automake 1.9, autoconf 2.57, dpkg-dev
++set -e
++
++# Refresh GNU autotools toolchain.
++echo Running GNU autotools toolchain...
++AUTOMAKEDIR=/usr/share/automake-1.9
++[ -n "$AUTOMAKEDIR" ] &&
++ for i in config.guess config.sub install-sh mkinstalldirs ; do
++ test -r ${AUTOMAKEDIR}/${i} && {
++ rm -f ${i} || true
++ cp ${AUTOMAKEDIR}/${i} .
++ }
++ chmod 755 ${i}
++ done
++
++aclocal-1.9 -I cmulocal
++autoheader
++#automake --verbose --foreign --add-missing
++autoconf
++
++# For the Debian build
++test -d debian && {
++ # Kill executable list first
++ #rm -f debian/executable.files
++
++ # Make sure our executable and removable lists won't be screwed up
++ #debclean && echo Cleaned buildtree just in case...
++
++ # refresh list of executable scripts, to avoid possible breakage if
++ # upstream tarball does not include the file or if it is mispackaged
++ # for whatever reason.
++ #echo Generating list of executable files...
++ #rm -f debian/executable.files
++ #find -type f -perm +111 ! -name '.*' -print | sort > debian/executable.files
++
++ # even in Debian builds, copy them in, don't link them
++ rm -f config.sub config.guess
++ cp /usr/share/misc/config.sub .
++ cp /usr/share/misc/config.guess .
++
++ # Remove any files in upstream tarball that we don't have in the Debian
++ # package (because diff cannot remove files)
++ # THIS CRAP IS NOT EMBEDDED SPACE-SAFE!
++ version=`dpkg-parsechangelog | awk '/Version:/ { print $2 }' | sed -e 's/-[^-]\+$//'`
++ source=`dpkg-parsechangelog | awk '/Source:/ { print $2 }' | tr -d ' '`
++ #if test -r ../${source}_${version}.orig.tar.gz ; then
++ # echo Generating list of files that should be removed...
++ # rm -f debian/deletable.files
++ # touch debian/deletable.files.new
++ # mkdir debian/tmp
++ # cd debian/tmp
++ # tar -zxf ../../../${source}_${version}.orig.tar.gz
++ # # et/ we handle directly
++ # rm -fr */et/
++ # cd ../..
++ # for i in `find debian/tmp/ -type f ! -name '.*' -print | xargs` ; do
++ # if test -r ${i} ; then
++ # filename=`echo "${i}" | sed -e 's#.*debian/tmp/[^/]+/##'`
++ # test -r "${filename}" || echo "${filename}" >>debian/deletable.files.new
++ # fi
++ # done
++ # sort < debian/deletable.files.new > debian/deletable.files \
++ # && rm debian/deletable.files.new
++ # rm -fr debian/tmp
++ #else
++ # echo Emptying list of files that should be deleted...
++ # rm -f debian/deletable.files
++ # touch debian/deletable.files
++ #fi
++}
++
++exit 0
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/05-fix_programnames.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/05-fix_programnames.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/05-fix_programnames.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/05-fix_programnames.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,526 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05-fix_programnames_in_manpages.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix some minor things in manpages, fix program names in manpages and
+## DP: program sources
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3.7~/imap/deliver.c cyrus-imapd-2.3.7/imap/deliver.c
+--- cyrus-imapd-2.3.7~/imap/deliver.c 2005-05-04 21:26:16.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/deliver.c 2006-08-11 11:50:41.000000000 +0200
+@@ -98,7 +98,7 @@
+ static void usage()
+ {
+ fprintf(stderr,
+- "421-4.3.0 usage: deliver [-C <alt_config> ] [-m mailbox]"
++ "421-4.3.0 usage: cyrdeliver [-C <alt_config> ] [-m mailbox]"
+ " [-a auth] [-r return_path] [-l] [-D]\r\n");
+ fprintf(stderr, "421 4.3.0 %s\n", CYRUS_VERSION);
+ exit(EC_USAGE);
+diff -urNad cyrus-imapd-2.3.7~/imap/quota.c cyrus-imapd-2.3.7/imap/quota.c
+--- cyrus-imapd-2.3.7~/imap/quota.c 2005-05-27 18:49:44.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/quota.c 2006-08-11 11:50:41.000000000 +0200
+@@ -208,7 +208,7 @@
+ void usage(void)
+ {
+ fprintf(stderr,
+- "usage: quota [-C <alt_config>] [-d <domain>] [-f] [prefix]...\n");
++ "usage: cyrquota [-C <alt_config>] [-d <domain>] [-f] [prefix]...\n");
+ exit(EC_USAGE);
+ }
+
+diff -urNad cyrus-imapd-2.3.7~/imap/reconstruct.c cyrus-imapd-2.3.7/imap/reconstruct.c
+--- cyrus-imapd-2.3.7~/imap/reconstruct.c 2006-06-02 18:41:57.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/reconstruct.c 2006-08-11 11:50:41.000000000 +0200
+@@ -352,8 +352,8 @@
+ void usage(void)
+ {
+ fprintf(stderr,
+- "usage: reconstruct [-C <alt_config>] [-p partition] [-rfx] mailbox...\n");
+- fprintf(stderr, " reconstruct [-C <alt_config>] -m\n");
++ "usage: cyrreconstruct [-C <alt_config>] [-p partition] [-rfx] mailbox...\n");
++ fprintf(stderr, " cyrreconstruct [-C <alt_config>] -m\n");
+ exit(EC_USAGE);
+ }
+
+diff -urNad cyrus-imapd-2.3.7~/man/chk_cyrus.8 cyrus-imapd-2.3.7/man/chk_cyrus.8
+--- cyrus-imapd-2.3.7~/man/chk_cyrus.8 2006-06-19 15:05:02.000000000 +0200
++++ cyrus-imapd-2.3.7/man/chk_cyrus.8 2006-08-11 11:50:41.000000000 +0200
+@@ -83,4 +83,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/ctl_cyrusdb.8 cyrus-imapd-2.3.7/man/ctl_cyrusdb.8
+--- cyrus-imapd-2.3.7~/man/ctl_cyrusdb.8 2003-08-10 01:43:14.000000000 +0200
++++ cyrus-imapd-2.3.7/man/ctl_cyrusdb.8 2006-08-11 11:50:41.000000000 +0200
+@@ -94,4 +94,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/ctl_deliver.8 cyrus-imapd-2.3.7/man/ctl_deliver.8
+--- cyrus-imapd-2.3.7~/man/ctl_deliver.8 2003-10-22 20:50:13.000000000 +0200
++++ cyrus-imapd-2.3.7/man/ctl_deliver.8 2006-08-11 11:50:41.000000000 +0200
+@@ -78,4 +78,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/ctl_mboxlist.8 cyrus-imapd-2.3.7/man/ctl_mboxlist.8
+--- cyrus-imapd-2.3.7~/man/ctl_mboxlist.8 2006-04-06 17:42:11.000000000 +0200
++++ cyrus-imapd-2.3.7/man/ctl_mboxlist.8 2006-08-11 11:50:41.000000000 +0200
+@@ -142,4 +142,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/cyr_expire.8 cyrus-imapd-2.3.7/man/cyr_expire.8
+--- cyrus-imapd-2.3.7~/man/cyr_expire.8 2004-04-03 20:44:55.000000000 +0200
++++ cyrus-imapd-2.3.7/man/cyr_expire.8 2006-08-11 11:50:41.000000000 +0200
+@@ -101,4 +101,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/cyrus.conf.5 cyrus-imapd-2.3.7/man/cyrus.conf.5
+--- cyrus-imapd-2.3.7~/man/cyrus.conf.5 2005-04-24 22:20:26.000000000 +0200
++++ cyrus-imapd-2.3.7/man/cyrus.conf.5 2006-08-11 11:50:41.000000000 +0200
+@@ -44,9 +44,9 @@
+ cyrus.conf \- Cyrus configuration file
+ .SH DESCRIPTION
+ \fB/etc/cyrus.conf\fR
+-is the configuration file for the Cyrus \fBmaster\fR process. It
++is the configuration file for the Cyrus \fBcyrmaster\fR process. It
+ defines the startup procedures, services and events to be spawned by
+-\fBmaster\fR.
++\fBcyrmaster\fR.
+ .PP
+ The \fB/etc/cyrus.conf\fR file consists of a series of entries divided
+ into sections of the form
+@@ -105,7 +105,7 @@
+ \fR[ \fIhost\fR \fB: \fR] \fIport\fR
+ .br
+ .sp
+-where \fIpath\fR is the explicit path to a UNIX socket, \fIhost\fR is
++where \fIpath\fR is the explicit (absolute) path to a UNIX socket, \fIhost\fR is
+ either the hostname or bracket-enclosed IP address of a network
+ interface, and \fIport\fR is either a port number or service name (as listed
+ in \fB/etc/services\fR).
+@@ -182,6 +182,6 @@
+ still have separate access control rules.
+ .SH SEE ALSO
+ .PP
+-\fBmaster(8)\fR, \fBimapd(8)\fR, \fBpop3d(8)\fR, \fBlmtpd(8)\fR,
++\fBcyrmaster(8)\fR, \fBimapd(8)\fR, \fBpop3d(8)\fR, \fBlmtpd(8)\fR,
+ \fBtimsieved(8)\fR, \fBidled(8)\fR, \fBnotifyd(8)\fR, \fBctl_cyrusdb(8)\fR,
+ \fBctl_deliver(8)\fR, \fBtls_prune(8)\fR, \fBhosts_access(5)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/deliver.8 cyrus-imapd-2.3.7/man/deliver.8
+--- cyrus-imapd-2.3.7~/man/deliver.8 2006-05-26 18:27:21.000000000 +0200
++++ cyrus-imapd-2.3.7/man/deliver.8 2006-08-11 11:50:41.000000000 +0200
+@@ -1,5 +1,5 @@
+ .\" -*- nroff -*-
+-.TH DELIVER 8 "Project Cyrus" CMU
++.TH CYRDELIVER 8 "Project Cyrus" CMU
+ .\"
+ .\" Copyright (c) 1998-2000 Carnegie Mellon University. All rights reserved.
+ .\"
+@@ -41,9 +41,9 @@
+ .\"
+ .\" $Id: deliver.8,v 1.17.8.2 2006/05/26 16:27:21 murch Exp $
+ .SH NAME
+-deliver \- deliver mail to an IMAP mailbox
++cyrdeliver \- deliver mail to an IMAP mailbox
+ .SH SYNOPSIS
+-.B deliver
++.B cyrdeliver
+ [
+ .B \-C
+ .I config-file
+@@ -76,7 +76,7 @@
+ .I userid
+ ]...
+ .br
+-.B deliver
++.B cyrdeliver
+ [
+ .B \-C
+ .I config-file
+diff -urNad cyrus-imapd-2.3.7~/man/fud.8 cyrus-imapd-2.3.7/man/fud.8
+--- cyrus-imapd-2.3.7~/man/fud.8 2003-10-22 20:50:13.000000000 +0200
++++ cyrus-imapd-2.3.7/man/fud.8 2006-08-11 11:50:41.000000000 +0200
+@@ -61,7 +61,7 @@
+ ]
+ .SH DESCRIPTION
+ .B FUD
+-is a long lived datagram daemon started from master that provides
++is a long lived datagram daemon started from cyrmaster that provides
+ information about when a user last
+ read their mail, when mail last arrived in a user's mailbox, and how
+ many messages are recent for that user.
+diff -urNad cyrus-imapd-2.3.7~/man/idled.8 cyrus-imapd-2.3.7/man/idled.8
+--- cyrus-imapd-2.3.7~/man/idled.8 2003-08-10 01:43:14.000000000 +0200
++++ cyrus-imapd-2.3.7/man/idled.8 2006-08-11 11:50:41.000000000 +0200
+@@ -56,7 +56,7 @@
+ to report the changes to the client.
+ .I Idled
+ is usually started from
+-.I master.
++.I cyrmaster.
+ .PP
+ .I Idled
+ reads its configuration options out of the
+@@ -75,4 +75,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/imapd.8 cyrus-imapd-2.3.7/man/imapd.8
+--- cyrus-imapd-2.3.7~/man/imapd.8 2002-10-03 21:02:41.000000000 +0200
++++ cyrus-imapd-2.3.7/man/imapd.8 2006-08-11 11:50:41.000000000 +0200
+@@ -72,7 +72,7 @@
+ is an IMAP4rev1 server.
+ It accepts commands on its standard input and responds on its standard output.
+ It MUST be invoked by
+-.IR master (8)
++.IR cyrmaster (8)
+ with those descriptors attached to a remote client connection.
+ .PP
+ .I Imapd
+@@ -148,4 +148,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/lmtpd.8 cyrus-imapd-2.3.7/man/lmtpd.8
+--- cyrus-imapd-2.3.7~/man/lmtpd.8 2002-10-03 21:02:41.000000000 +0200
++++ cyrus-imapd-2.3.7/man/lmtpd.8 2006-08-11 11:50:41.000000000 +0200
+@@ -68,7 +68,7 @@
+ is an LMTP server used to deliver mail to the IMAP mailstore.
+ It accepts commands on its standard input and responds on its standard output.
+ It MUST be invoked by
+-.IR master (8)
++.IR cyrmaster (8)
+ with those descriptors attached to a remote client connection.
+ .PP
+ .I Lmtpd
+@@ -101,4 +101,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/master.8 cyrus-imapd-2.3.7/man/master.8
+--- cyrus-imapd-2.3.7~/man/master.8 2004-12-17 19:15:18.000000000 +0100
++++ cyrus-imapd-2.3.7/man/master.8 2006-08-11 11:50:41.000000000 +0200
+@@ -1,5 +1,5 @@
+ .\" -*- nroff -*-
+-.TH MASTER 8 "Project Cyrus" CMU
++.TH CYRMASTER 8 "Project Cyrus" CMU
+ .\"
+ .\" Copyright (c) 1996-2000 Carnegie Mellon University. All rights reserved.
+ .\"
+@@ -41,9 +41,9 @@
+ .\"
+ .\" $Id: master.8,v 1.10.2.3 2004/12/17 18:15:18 ken3 Exp $
+ .SH NAME
+-master \- master Cyrus process
++cyrmaster \- master Cyrus process
+ .SH SYNOPSIS
+-.B master
++.B cyrmaster
+ [
+ .B \-C
+ .I alternate imapd.conf
+@@ -79,7 +79,7 @@
+ .I snmp agentx socket
+ ]
+ .SH DESCRIPTION
+-.I Master
++.I cyrmaster
+ is the process that controls all of the Cyrus processes. This process
+ is responsible for creating all imapd, pop3d, lmtpd and sieved child
+ processes. This process also initializes the Berkeley DB code and
+@@ -92,12 +92,12 @@
+ .SH OPTIONS
+ .TP
+ .BI \-C " alternate imapd.conf"
+-Specifies an alternate imapd.conf for use by master (note that this will
+-not affect any sub-processes spawned by master, you should specify those
++Specifies an alternate imapd.conf for use by cyrmaster (note that this will
++not affect any sub-processes spawned by cyrmaster, you should specify those
+ specifically in the respective entries in cyrus.conf).
+ .TP
+ .BI \-M " alternate cyrus.conf"
+-Specifies an alternate cyrus.conf for use by master.
++Specifies an alternate cyrus.conf for use by cyrmaster.
+ .TP
+ .BI \-l " listen queue backlog"
+ Increase the listen queue backlog. By default, the listen queue is set
+@@ -113,7 +113,7 @@
+ .BI \-p " pidfile"
+ Use
+ .I pidfile
+-as the pidfile. If not specified, defaults to /var/run/cyrus-master.pid
++as the pidfile. If not specified, defaults to /var/run/cyrmaster.pid
+ .TP
+ .BI \-P " snmp agentx ping interval"
+ Sets the amount on time in seconds the subagent will try and reconnect to the
+@@ -132,12 +132,12 @@
+ Requires net-snmp 5.0 or higher.
+ .SH CONFIGURATION
+ Upon execution,
+-.I master
++.I cyrmaster
+ reads its configuration information out of the
+ .IR cyrus.conf (5)
+ file.
+ .PP
+-.I Master
++.I cyrmaster
+ rereads its configuration file when it receives a hangup signal,
+ SIGHUP. Services and events may be added, deleted or modified when the
+ configuration file is reread. Any active services removed from the
+@@ -146,9 +146,18 @@
+ The environment variable \fBCYRUS_VERBOSE\fR can be set to log additional
+ debugging information. Setting the value to 1 results in base level logging.
+ Setting it higher results in more log messages being generated.
++.SH BUGS
++Services do not always go away silently when removed through a SIGHUP. If
++there are workers of the removed service still running, messages to syslog
++about broken pipes and accept() failures are to be expected.
++.PP
++The in-memory list of services is not cleaned up ever, so a cyrmaster daemon
++that has been sent an extremely high amount of SIGHUP signals to
++add/remove/modify services will lose performance eventually. Restarting
++cyrmaster fixes this.
+ .SH FILES
+ .TP
+-.B /etc/cyrus.conf, /etc/imapd.conf, /var/run/cyrus-master.pid
++.B /etc/cyrus.conf, /etc/imapd.conf, /var/run/cyrmaster.pid
+ .SH SEE ALSO
+ .PP
+ \fBcyrus.conf(5)\fR, \fBimapd.conf(5)\fR, \fBimapd(8)\fR,
+diff -urNad cyrus-imapd-2.3.7~/man/nntpd.8 cyrus-imapd-2.3.7/man/nntpd.8
+--- cyrus-imapd-2.3.7~/man/nntpd.8 2006-05-26 17:50:11.000000000 +0200
++++ cyrus-imapd-2.3.7/man/nntpd.8 2006-08-11 11:50:41.000000000 +0200
+@@ -78,7 +78,7 @@
+ is a NNTP server.
+ It accepts commands on its standard input and responds on its standard output.
+ It MUST invoked by
+-.IR master (8)
++.IR cyrmaster (8)
+ with those descriptors attached to a remote client connection.
+ .PP
+ .I Nntpd
+@@ -153,4 +153,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/notifyd.8 cyrus-imapd-2.3.7/man/notifyd.8
+--- cyrus-imapd-2.3.7~/man/notifyd.8 2003-08-10 01:43:14.000000000 +0200
++++ cyrus-imapd-2.3.7/man/notifyd.8 2006-08-11 11:50:41.000000000 +0200
+@@ -62,7 +62,7 @@
+ ]
+ .SH DESCRIPTION
+ .B Notifyd
+-is a daemon started from master(8) that handles notification requests on
++is a daemon started from cyrmaster(8) that handles notification requests on
+ behalf of lmtpd(8).
+ .B Notifyd
+ accepts the request and performs the notification using the method
+@@ -122,4 +122,4 @@
+ Cyrus Master process configuration file.
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBcyrus.conf\fR, \fBmaster(8)\fR, \fBlmtpd(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrus.conf\fR, \fBcyrmaster(8)\fR, \fBlmtpd(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/pop3d.8 cyrus-imapd-2.3.7/man/pop3d.8
+--- cyrus-imapd-2.3.7~/man/pop3d.8 2006-05-26 17:50:12.000000000 +0200
++++ cyrus-imapd-2.3.7/man/pop3d.8 2006-08-11 11:50:41.000000000 +0200
+@@ -75,7 +75,7 @@
+ is a POP3 server.
+ It accepts commands on its standard input and responds on its standard output.
+ It MUST invoked by
+-.IR master (8)
++.IR cyrmaster (8)
+ with those descriptors attached to a remote client connection.
+ .PP
+ .I Pop3d
+@@ -132,4 +132,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/quota.8 cyrus-imapd-2.3.7/man/quota.8
+--- cyrus-imapd-2.3.7~/man/quota.8 2003-10-22 20:50:13.000000000 +0200
++++ cyrus-imapd-2.3.7/man/quota.8 2006-08-11 11:50:41.000000000 +0200
+@@ -1,5 +1,5 @@
+ .\" -*- nroff -*-
+-.TH QUOTA 8 "Project Cyrus" CMU
++.TH CYRQUOTA 8 "Project Cyrus" CMU
+ .\"
+ .\" Copyright (c) 1998-2000 Carnegie Mellon University. All rights reserved.
+ .\"
+@@ -41,9 +41,9 @@
+ .\"
+ .\" $Id: quota.8,v 1.11 2003/10/22 18:50:13 rjs3 Exp $
+ .SH NAME
+-quota \- report and optionally fix quota usage
++cyrquota \- report and optionally fix quota usage
+ .SH SYNOPSIS
+-.B quota
++.B cyrquota
+ [
+ .B \-C
+ .I config-file
+@@ -59,12 +59,12 @@
+ .IR mailbox-prefix ...
+ ]
+ .SH DESCRIPTION
+-.I Quota
++.I cyrquota
+ generates a report listing quota roots, giving their limits and usage.
+ If the
+ .I \-f
+ option is given,
+-.I quota
++.I cyrquota
+ first fixes any inconsistencies in the quota subsystem, such as
+ mailboxes with the wrong quota root or quota roots with the wrong
+ quota usage reported.
+@@ -79,14 +79,14 @@
+ prefixes.
+ .PP
+ Running
+-.I quota
++.I cyrquota
+ with both the
+ .I \-f
+ option and
+ .I mailbox-prefix
+ arguments is not recommended.
+ .PP
+-.I Quota
++.I cyrquota
+ reads its configuration options out of the
+ .IR imapd.conf (5)
+ file unless specified otherwise by \fB-C\fR.
+diff -urNad cyrus-imapd-2.3.7~/man/reconstruct.8 cyrus-imapd-2.3.7/man/reconstruct.8
+--- cyrus-imapd-2.3.7~/man/reconstruct.8 2006-06-19 14:59:37.000000000 +0200
++++ cyrus-imapd-2.3.7/man/reconstruct.8 2006-08-11 11:50:41.000000000 +0200
+@@ -1,5 +1,5 @@
+ .\" -*- nroff -*-
+-.TH RECONSTRUCT 8 "Project Cyrus" CMU
++.TH CYRRECONSTRUCT 8 "Project Cyrus" CMU
+ .\"
+ .\" Copyright (c) 1998-2000 Carnegie Mellon University. All rights reserved.
+ .\"
+@@ -41,9 +41,9 @@
+ .\"
+ .\" $Id: reconstruct.8,v 1.18.2.2 2006/06/19 12:59:37 murch Exp $
+ .SH NAME
+-reconstruct \- reconstruct mailboxes
++cyrreconstruct \- reconstruct mailboxes
+ .SH SYNOPSIS
+-.B reconstruct
++.B cyrreconstruct
+ [
+ .B \-C
+ .I config-file
+@@ -63,14 +63,14 @@
+ ]
+ .IR mailbox ...
+ .br
+-.B reconstruct
++.B cyrreconstruct
+ [
+ .B \-C
+ .I config-file
+ ]
+ .B \-m
+ .SH DESCRIPTION
+-.I Reconstruct
++.I cyrreconstruct
+ rebuilds one or more IMAP mailboxes. When invoked with the
+ .B \-m
+ switch, it rebuilds the master
+@@ -78,17 +78,17 @@
+ almost any sort of data corruption.
+ .PP
+ If
+-.I Reconstruct
++.I cyrreconstruct
+ can find existing header and index files, it attempts to preserve any
+ data in them that is not derivable from the message files themselves.
+ The state
+-.I reconstruct
++.I cyrreconstruct
+ attempts to preserve includes the flag names, flag state, and
+ internaldate.
+-.I Reconstruct
++.I cyrreconstruct
+ derives all other information from the message files.
+ .PP
+-.I Reconstruct
++.I cyrreconstruct
+ reads its configuration options out of the
+ .IR imapd.conf (5)
+ file unless specified otherwise by \fB-C\fR. Any mailbox directory
+@@ -96,12 +96,12 @@
+ .I partition-news
+ configuration option is assumed to be in news format.
+ .PP
+-.I Reconstruct
++.I cyrreconstruct
+ does not adjust the quota usage recorded in any quota
+ root files. After running
+-.IR reconstruct ,
++.IR cyrreconstruct ,
+ it is advisable to run
+-.IR quota (8)
++.IR cyrquota (8)
+ with the
+ .I \-f
+ switch in order to fix the quota root files.
+diff -urNad cyrus-imapd-2.3.7~/man/smmapd.8 cyrus-imapd-2.3.7/man/smmapd.8
+--- cyrus-imapd-2.3.7~/man/smmapd.8 2003-12-19 19:33:46.000000000 +0100
++++ cyrus-imapd-2.3.7/man/smmapd.8 2006-08-11 11:50:41.000000000 +0200
+@@ -67,7 +67,7 @@
+ It accepts commands on its standard input and responds on its standard
+ output.
+ It MUST be invoked by
+-.IR master (8)
++.IR cyrmaster (8)
+ with those descriptors attached to a remote client connection.
+ .PP
+ .B SMMAPD
+diff -urNad cyrus-imapd-2.3.7~/man/timsieved.8 cyrus-imapd-2.3.7/man/timsieved.8
+--- cyrus-imapd-2.3.7~/man/timsieved.8 2004-07-16 16:37:41.000000000 +0200
++++ cyrus-imapd-2.3.7/man/timsieved.8 2006-08-11 11:50:41.000000000 +0200
+@@ -73,4 +73,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
+diff -urNad cyrus-imapd-2.3.7~/man/tls_prune.8 cyrus-imapd-2.3.7/man/tls_prune.8
+--- cyrus-imapd-2.3.7~/man/tls_prune.8 2003-08-10 01:43:15.000000000 +0200
++++ cyrus-imapd-2.3.7/man/tls_prune.8 2006-08-11 11:50:41.000000000 +0200
+@@ -67,4 +67,4 @@
+ .B /etc/imapd.conf
+ .SH SEE ALSO
+ .PP
+-\fBimapd.conf(5)\fR, \fBmaster(8)\fR
++\fBimapd.conf(5)\fR, \fBcyrmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/06-disable_runpath.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/06-disable_runpath.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/06-disable_runpath.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/06-disable_runpath.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,38 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06-disable_runpath.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: disable runpath
+
+ at DPATCH@
+diff -urNad complete.dpatch/cmulocal/cyrus.m4 /tmp/dpep.1tmcI8/complete.dpatch/cmulocal/cyrus.m4
+--- complete.dpatch/cmulocal/cyrus.m4 2003-10-08 22:35:24.000000000 +0200
++++ /tmp/dpep.1tmcI8/complete.dpatch/cmulocal/cyrus.m4 2005-11-10 18:33:44.832750394 +0100
+@@ -3,6 +3,7 @@
+ dnl $Id: cyrus.m4,v 1.4 2003/10/08 20:35:24 rjs3 Exp $
+ dnl tjs at andrew.cmu.edu 6-may-1998
+ dnl
++dnl Debian fix (hmh at debian.org): We don't want runpath set in Debian
+
+ dnl It would be good if ANDREW_ADD_LIBPATH could detect if something was
+ dnl already there and not redundantly add it if it is.
+@@ -30,16 +31,8 @@
+ ])
+
+ dnl runpath initialization
++dnl (disabled by hmh at debian.org
+ AC_DEFUN([CMU_GUESS_RUNPATH_SWITCH], [
+ # CMU GUESS RUNPATH SWITCH
+- AC_CACHE_CHECK(for runpath switch, andrew_runpath_switch, [
+- # first, try -R
+- SAVE_LDFLAGS="${LDFLAGS}"
+- LDFLAGS="-R /usr/lib"
+- AC_TRY_LINK([],[],[andrew_runpath_switch="-R"], [
+- LDFLAGS="-Wl,-rpath,/usr/lib"
+- AC_TRY_LINK([],[],[andrew_runpath_switch="-Wl,-rpath,"],
+- [andrew_runpath_switch="none"])
+- ])
+- LDFLAGS="${SAVE_LDFLAGS}"
+- ])])
++ andrew_runpath_switch="none"
++])
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/07-update_aclocal_and_configure.in.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/07-update_aclocal_and_configure.in.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/07-update_aclocal_and_configure.in.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/07-update_aclocal_and_configure.in.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07-update_aclocal.m4.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: update aclocal.m4 and configure.in
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/configure.in cyrus-imapd-2.3-2.3.7/configure.in
+--- cyrus-imapd-2.3-2.3.7~/configure.in 2006-08-11 18:05:06.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/configure.in 2006-08-14 16:21:57.000000000 +0200
+@@ -51,6 +51,11 @@
+ AC_CONFIG_HEADER(config.h)
+ AC_CANONICAL_HOST
+
++dnl Useful for maintainer mode stuff
++WARNERROR=-W
++AC_ARG_ENABLE(warnings-are-errors,[ --enable-warnings-are-errors add -Werror to most gcc calls], [ if test "$enableval" != "no" ; then WARNERROR=-Werror ; fi ])
++AC_SUBST(WARNERROR)
++
+ dnl Useful hook for distributions
+ AC_ARG_WITH(extraident,[ --with-extraident=STRING use STRING as extra version information],
+ [AC_DEFINE_UNQUOTED(EXTRA_IDENT,"$withval", [Extra version information for imap/version.h])])
+@@ -94,10 +99,12 @@
+ AC_ISC_POSIX
+ AC_PROG_AWK
+ AC_C_CONST
+-AC_SYS_LONG_FILE_NAMES
+-if test $ac_cv_sys_long_file_names = no; then
+- AC_MSG_ERROR(The Cyrus IMAPD requires support for long file names)
+-fi
++dnl fakeroot sometimes fails this test
++dnl and Debian always supports long filenames anyway
++dnl AC_SYS_LONG_FILE_NAMES
++dnl if test $ac_cv_sys_long_file_names = no; then
++dnl AC_MSG_ERROR(The Cyrus IMAPD requires support for long file names)
++dnl fi
+ AC_C_INLINE
+
+ AC_CHECK_SIZEOF(long)
+@@ -1238,7 +1245,11 @@
+ SQUAT_ENGINE = 1,
+
+ /* should we have long LMTP error messages? */
+- LMTP_LONG_ERROR_MSGS = 1
++ LMTP_LONG_ERROR_MSGS = 1,
++
++ /* default time to wait, in seconds, before giving up
++ * trying to lock something */
++ LOCK_GIVEUP_TIMER_DEFAULT = 100
+ };
+
+ #endif /* _CYRUS_IMAPD_CONFIG_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/08-clean_socket_closes.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/08-clean_socket_closes.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/08-clean_socket_closes.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/08-clean_socket_closes.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,77 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 08-clean_socket_closes.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Cleanly close sockets
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3.7~/imap/backend.c cyrus-imapd-2.3.7/imap/backend.c
+--- cyrus-imapd-2.3.7~/imap/backend.c 2006-06-27 17:58:42.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/backend.c 2006-08-11 11:53:31.000000000 +0200
+@@ -409,6 +409,7 @@
+ syslog(LOG_ERR, "couldn't authenticate to backend server: %s",
+ sasl_errstring(r, NULL, NULL));
+ if (!ret_backend) free(ret);
++ shutdown(sock, SHUT_RDWR);
+ close(sock);
+ ret = NULL;
+ }
+diff -urNad cyrus-imapd-2.3.7~/imap/fud.c cyrus-imapd-2.3.7/imap/fud.c
+--- cyrus-imapd-2.3.7~/imap/fud.c 2005-04-13 17:43:36.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/fud.c 2006-08-11 11:53:31.000000000 +0200
+@@ -158,6 +158,15 @@
+ mboxlist_done();
+ closelog();
+ cyrus_done();
++
++ /* be nice to remote */
++ shutdown(0, SHUT_RD);
++ shutdown(1, SHUT_RD);
++ shutdown(2, SHUT_RD);
++ close(0);
++ close(1);
++ close(2);
++
+ exit(code);
+ }
+
+diff -urNad cyrus-imapd-2.3.7~/imap/imapd.c cyrus-imapd-2.3.7/imap/imapd.c
+--- cyrus-imapd-2.3.7~/imap/imapd.c 2006-07-03 15:22:41.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/imapd.c 2006-08-11 11:53:31.000000000 +0200
+@@ -882,6 +882,10 @@
+ #ifdef HAVE_SSL
+ tls_shutdown_serverengine();
+ #endif
++ /* shutdown socket nicely */
++ cyrus_close_sock(0);
++ cyrus_close_sock(1);
++ cyrus_close_sock(2);
+
+ cyrus_done();
+
+diff -urNad cyrus-imapd-2.3.7~/imap/lmtpd.c cyrus-imapd-2.3.7/imap/lmtpd.c
+--- cyrus-imapd-2.3.7~/imap/lmtpd.c 2006-05-23 15:09:36.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/lmtpd.c 2006-08-11 11:53:31.000000000 +0200
+@@ -934,6 +934,9 @@
+
+ cyrus_done();
+
++ /* shutdown socket nicely */
++ cyrus_reset_stdio();
++
+ exit(code);
+ }
+
+diff -urNad cyrus-imapd-2.3.7~/imap/pop3d.c cyrus-imapd-2.3.7/imap/pop3d.c
+--- cyrus-imapd-2.3.7~/imap/pop3d.c 2006-05-26 17:50:09.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/pop3d.c 2006-08-11 11:53:31.000000000 +0200
+@@ -608,6 +608,9 @@
+ #endif
+
+ cyrus_done();
++ cyrus_close_sock(0);
++ cyrus_close_sock(1);
++ cyrus_close_sock(2);
+
+ exit(code);
+ }
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/09-kerberos-ipv4-ipv6-kludge-removal.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/09-kerberos-ipv4-ipv6-kludge-removal.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/09-kerberos-ipv4-ipv6-kludge-removal.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/09-kerberos-ipv4-ipv6-kludge-removal.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,53 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 09-kerberos-ipv4-ipv6-kludge-removal.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove a kludge which turned IPv4 addresses in IPv6 address space back
+## DP: into real IPv4 addresses.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/imap/pop3d.c cyrus-imapd-2.3-2.3.7/imap/pop3d.c
+--- cyrus-imapd-2.3-2.3.7~/imap/pop3d.c 2006-08-14 16:22:12.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/imap/pop3d.c 2006-08-14 16:22:12.000000000 +0200
+@@ -634,41 +634,6 @@
+ }
+
+ #ifdef HAVE_KRB
+-/* translate IPv4 mapped IPv6 address to IPv4 address */
+-#ifdef IN6_IS_ADDR_V4MAPPED
+-static void sockaddr_unmapped(struct sockaddr *sa, socklen_t *len)
+-{
+- struct sockaddr_in6 *sin6;
+- struct sockaddr_in *sin4;
+- uint32_t addr;
+- int port;
+-
+- if (sa->sa_family != AF_INET6)
+- return;
+- sin6 = (struct sockaddr_in6 *)sa;
+- if (!IN6_IS_ADDR_V4MAPPED((&sin6->sin6_addr)))
+- return;
+- sin4 = (struct sockaddr_in *)sa;
+- addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
+- port = sin6->sin6_port;
+- memset(sin4, 0, sizeof(struct sockaddr_in));
+- sin4->sin_addr.s_addr = addr;
+- sin4->sin_port = port;
+- sin4->sin_family = AF_INET;
+-#ifdef HAVE_SOCKADDR_SA_LEN
+- sin4->sin_len = sizeof(struct sockaddr_in);
+-#endif
+- *len = sizeof(struct sockaddr_in);
+-}
+-#else
+-static void sockaddr_unmapped(struct sockaddr *sa __attribute__((unused)),
+- socklen_t *len __attribute__((unused)))
+-{
+- return;
+-}
+-#endif
+-
+-
+ /*
+ * MIT's kludge of a kpop protocol
+ * Client does a krb_sendauth() first thing
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/10-fix_potential_overflows.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/10-fix_potential_overflows.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/10-fix_potential_overflows.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/10-fix_potential_overflows.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,168 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10-fix_potential_overflows.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix potential buffer overflows
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3.7~/imap/ctl_mboxlist.c cyrus-imapd-2.3.7/imap/ctl_mboxlist.c
+--- cyrus-imapd-2.3.7~/imap/ctl_mboxlist.c 2006-04-06 17:42:10.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/ctl_mboxlist.c 2006-08-11 11:54:55.000000000 +0200
+@@ -480,7 +480,7 @@
+ int r = 0;
+ char buf[16384];
+ int line = 0;
+- char last_commit[MAX_MAILBOX_NAME];
++ char last_commit[MAX_MAILBOX_NAME+1];
+ char *key=NULL, *data=NULL;
+ int keylen, datalen;
+ int untilCommit = PER_COMMIT;
+diff -urNad cyrus-imapd-2.3.7~/imap/fud.c cyrus-imapd-2.3.7/imap/fud.c
+--- cyrus-imapd-2.3.7~/imap/fud.c 2006-08-11 11:54:55.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/fud.c 2006-08-11 11:54:55.000000000 +0200
+@@ -119,9 +119,9 @@
+
+ while(1) {
+ /* For safety */
+- memset(username,'\0',MAXLOGNAME + MAXDOMNAME);
+- memset(mbox,'\0',MAX_MAILBOX_NAME+1);
+- memset(buf, '\0', MAXLOGNAME + MAX_MAILBOX_NAME + 1);
++ memset(username,'\0', sizeof(username));
++ memset(mbox,'\0', sizeof(mbox));
++ memset(buf, '\0', sizeof(buf));
+
+ if (signals_poll() == SIGHUP) {
+ /* caught a SIGHUP, return */
+diff -urNad cyrus-imapd-2.3.7~/imap/global.c cyrus-imapd-2.3.7/imap/global.c
+--- cyrus-imapd-2.3.7~/imap/global.c 2005-12-13 20:35:50.000000000 +0100
++++ cyrus-imapd-2.3.7/imap/global.c 2006-08-11 11:54:55.000000000 +0200
+@@ -473,7 +473,7 @@
+ {
+ struct namespace namespace;
+ char *acl;
+- char bufuser[MAX_MAILBOX_NAME], inboxname[MAX_MAILBOX_NAME];
++ char bufuser[MAX_MAILBOX_NAME+1], inboxname[MAX_MAILBOX_NAME+1];
+ int r;
+
+ /* Set namespace */
+diff -urNad cyrus-imapd-2.3.7~/imap/index.c cyrus-imapd-2.3.7/imap/index.c
+--- cyrus-imapd-2.3.7~/imap/index.c 2006-07-05 21:51:30.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/index.c 2006-08-11 11:54:55.000000000 +0200
+@@ -3664,9 +3664,17 @@
+ cur->from = get_localpart_addr(from + CACHE_ITEM_SIZE_SKIP);
+ break;
+ case SORT_SUBJECT:
+- cur->xsubj = index_extract_subject(subj + CACHE_ITEM_SIZE_SKIP,
+- CACHE_ITEM_LEN(subj),
+- &cur->is_refwd);
++ {
++ int len = CACHE_ITEM_LEN(subj);
++ char *t = xmalloc(len+1);
++
++ memcpy(t, subj + CACHE_ITEM_SIZE_SKIP, len);
++ t[len] = '\0';
++
++ cur->xsubj = index_extract_subject(t, len, &cur->is_refwd);
++
++ free(t);
++ }
+ cur->xsubj_hash = strhash(cur->xsubj);
+ break;
+ case SORT_TO:
+diff -urNad cyrus-imapd-2.3.7~/imap/mboxlist.h cyrus-imapd-2.3.7/imap/mboxlist.h
+--- cyrus-imapd-2.3.7~/imap/mboxlist.h 2005-02-21 20:25:40.000000000 +0100
++++ cyrus-imapd-2.3.7/imap/mboxlist.h 2006-08-11 11:54:55.000000000 +0200
+@@ -73,7 +73,7 @@
+
+ /* each mailbox has the following data */
+ struct mbox_entry {
+- char name[MAX_MAILBOX_NAME];
++ char name[MAX_MAILBOX_NAME+1];
+ int mbtype;
+ char partition[MAX_PARTITION_LEN];
+ /* holds remote machine for REMOTE mailboxes */
+diff -urNad cyrus-imapd-2.3.7~/imap/message.c cyrus-imapd-2.3.7/imap/message.c
+--- cyrus-imapd-2.3.7~/imap/message.c 2006-05-26 18:27:18.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/message.c 2006-08-11 11:54:55.000000000 +0200
+@@ -1015,7 +1015,7 @@
+ /* Save header value */
+ len = hdrend - hdr;
+ message_ibuf_ensure(ibuf, len+2);
+- strncpy(ibuf->end, hdr, len);
++ strncpy(ibuf->end, hdr, len+1);
+ ibuf->end += len;
+ *(ibuf->end)++ = '\r';
+ *(ibuf->end)++ = '\n';
+diff -urNad cyrus-imapd-2.3.7~/imap/mupdate.h cyrus-imapd-2.3.7/imap/mupdate.h
+--- cyrus-imapd-2.3.7~/imap/mupdate.h 2006-03-15 19:56:32.000000000 +0100
++++ cyrus-imapd-2.3.7/imap/mupdate.h 2006-08-11 11:54:55.000000000 +0200
+@@ -68,8 +68,8 @@
+ struct buf tag, cmd, arg1, arg2, arg3;
+
+ /* For client side mupdate_find calls */
+- char mailbox_buf[MAX_MAILBOX_NAME];
+- char server_buf[MAX_MAILBOX_NAME];
++ char mailbox_buf[MAX_MAILBOX_NAME+1];
++ char server_buf[MAX_MAILBOX_NAME+1];
+ char *acl_buf;
+ size_t acl_buf_len;
+ struct mupdate_mailboxdata mailboxdata_buf;
+diff -urNad cyrus-imapd-2.3.7~/imtest/imtest.c cyrus-imapd-2.3.7/imtest/imtest.c
+--- cyrus-imapd-2.3.7~/imtest/imtest.c 2006-05-25 17:21:49.000000000 +0200
++++ cyrus-imapd-2.3.7/imtest/imtest.c 2006-08-11 11:54:55.000000000 +0200
+@@ -1230,7 +1230,7 @@
+
+ /* can't have this and a file for input */
+ sunsock.sun_family = AF_UNIX;
+- strcpy(sunsock.sun_path, output_socket);
++ strlcpy(sunsock.sun_path, output_socket, sizeof(sunsock.sun_path));
+ unlink(output_socket);
+
+ listen_sock = socket(AF_UNIX, SOCK_STREAM, 0);
+diff -urNad cyrus-imapd-2.3.7~/master/master.c cyrus-imapd-2.3.7/master/master.c
+--- cyrus-imapd-2.3.7~/master/master.c 2005-04-06 22:37:00.000000000 +0200
++++ cyrus-imapd-2.3.7/master/master.c 2006-08-11 11:54:55.000000000 +0200
+@@ -225,13 +225,17 @@
+ return result;
+ }
+
+-void get_prog(char *path, unsigned size, char *const *cmd)
++void get_prog(char *path, unsigned int size, char *const *cmd)
+ {
+ if (cmd[0][0] == '/') {
+ /* master lacks strlcpy, due to no libcyrus */
+ snprintf(path, size, "%s", cmd[0]);
++ path[size-1] = '\0';
++ }
++ else {
++ snprintf(path, size, "%s/%s", SERVICE_PATH, cmd[0]);
++ path[size-1] = '\0';
+ }
+- else snprintf(path, size, "%s/%s", SERVICE_PATH, cmd[0]);
+ }
+
+ void get_statsock(int filedes[2])
+diff -urNad cyrus-imapd-2.3.7~/master/masterconf.c cyrus-imapd-2.3.7/master/masterconf.c
+--- cyrus-imapd-2.3.7~/master/masterconf.c 2003-12-19 19:33:47.000000000 +0100
++++ cyrus-imapd-2.3.7/master/masterconf.c 2006-08-11 11:54:55.000000000 +0200
+@@ -133,7 +133,7 @@
+ } else {
+ /* one word */
+ for (i = 0; i < 255; i++) {
+- if (isspace((int) *p)) break;
++ if ((!*p) || (isspace((int) *p))) break;
+ v[i] = *p++;
+ }
+ }
+diff -urNad cyrus-imapd-2.3.7~/notifyd/notifyd.c cyrus-imapd-2.3.7/notifyd/notifyd.c
+--- cyrus-imapd-2.3.7~/notifyd/notifyd.c 2005-04-13 17:43:36.000000000 +0200
++++ cyrus-imapd-2.3.7/notifyd/notifyd.c 2006-08-11 11:54:55.000000000 +0200
+@@ -143,7 +143,7 @@
+ if (cp) nopt = strtol(cp, NULL, 10);
+ if (nopt < 0 || errno == ERANGE) cp = NULL;
+
+- if (cp && nopt &&
++ if (cp && (nopt > 0) &&
+ !(options = (char**) xrealloc(options, nopt * sizeof(char*)))) {
+ fatal("xmalloc(): can't allocate options", EC_OSERR);
+ }
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/11-fix_syslog_prefix.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/11-fix_syslog_prefix.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/11-fix_syslog_prefix.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/11-fix_syslog_prefix.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,68 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 11-fix_syslog_prefix.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make sure all programs log (to syslog) with "cyrus/<program>" as the
+## DP: log prefix.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/imap/global.c cyrus-imapd-2.3-2.3.7/imap/global.c
+--- cyrus-imapd-2.3-2.3.7~/imap/global.c 2006-08-14 16:22:23.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/imap/global.c 2006-08-14 16:22:23.000000000 +0200
+@@ -93,6 +93,9 @@
+ struct cyrusdb_backend *config_tlscache_db;
+ struct cyrusdb_backend *config_ptscache_db;
+
++/* syslog prefix tag */
++static char syslog_prefix[20];
++
+ /* Called before a cyrus application starts (but after command line parameters
+ * are read) */
+ int cyrus_init(const char *alt_config, const char *ident, unsigned flags)
+@@ -120,7 +123,9 @@
+
+ /* xxx we lose here since we can't have the prefix until we load the
+ * config file */
+- openlog(config_ident, LOG_PID, SYSLOG_FACILITY);
++ strncpy(syslog_prefix, "cyrus/", sizeof(syslog_prefix));
++ strncat(syslog_prefix, ident, sizeof(syslog_prefix) - 7);
++ openlog(syslog_prefix, LOG_PID, SYSLOG_FACILITY);
+
+ /* Load configuration file. This will set config_dir when it finds it */
+ config_read(alt_config);
+diff -urNad cyrus-imapd-2.3-2.3.7~/ptclient/ptexpire.c cyrus-imapd-2.3-2.3.7/ptclient/ptexpire.c
+--- cyrus-imapd-2.3-2.3.7~/ptclient/ptexpire.c 2004-05-31 20:23:01.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/ptclient/ptexpire.c 2006-08-14 16:22:23.000000000 +0200
+@@ -114,7 +114,7 @@
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+- openlog("ptexpire", LOG_PID, SYSLOG_FACILITY);
++ openlog("cyrus/ptexpire", LOG_PID, SYSLOG_FACILITY);
+
+ while ((opt = getopt(argc, argv, "C:E:")) != EOF) {
+ switch (opt) {
+diff -urNad cyrus-imapd-2.3-2.3.7~/ptclient/test.c cyrus-imapd-2.3-2.3.7/ptclient/test.c
+--- cyrus-imapd-2.3-2.3.7~/ptclient/test.c 2003-10-22 20:50:29.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/ptclient/test.c 2006-08-14 16:22:23.000000000 +0200
+@@ -57,7 +57,7 @@
+ cacheid=cache;
+ } else
+ cacheid=NULL;
+- openlog("pttest", LOG_PID, SYSLOG_FACILITY);
++ openlog("cyrus/pttest", LOG_PID, SYSLOG_FACILITY);
+
+ if (!auth_setid(argv[1],cacheid))
+ printf ("Auth_memberof(%s,%s) is %d\n", argv[1], argv[2],
+diff -urNad cyrus-imapd-2.3-2.3.7~/ptclient/test2.c cyrus-imapd-2.3-2.3.7/ptclient/test2.c
+--- cyrus-imapd-2.3-2.3.7~/ptclient/test2.c 2003-10-22 20:50:29.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/ptclient/test2.c 2006-08-14 16:22:23.000000000 +0200
+@@ -46,7 +46,7 @@
+
+ int main(void) {
+ char cacheid[16]="4224423";
+- openlog("testr", LOG_PID, SYSLOG_FACILITY);
++ openlog("cyrus/testr", LOG_PID, SYSLOG_FACILITY);
+
+ if (!auth_setid("cg2v at club.cc.cmu.edu",cacheid))
+ printf ("Auth_memberof(cg2v,cg2v:me) is %d\n",
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/12-fix_timeout_handling.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/12-fix_timeout_handling.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/12-fix_timeout_handling.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/12-fix_timeout_handling.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,457 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12-fix_timeout_handling.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fixes timeout handling
+
+ at DPATCH@
+diff -urNad complete.dpatch/imap/signals.c /tmp/dpep.9pxAsS/complete.dpatch/imap/signals.c
+--- complete.dpatch/imap/signals.c 2005-02-14 17:26:50.000000000 +0100
++++ /tmp/dpep.9pxAsS/complete.dpatch/imap/signals.c 2005-11-11 14:10:07.056723830 +0100
+@@ -50,7 +50,7 @@
+ #include "xmalloc.h"
+ #include "exitcodes.h"
+
+-static int gotsignal = 0;
++static volatile int gotsignal = 0;
+
+ static void sighandler(int sig)
+ {
+diff -urNad complete.dpatch/lib/lock.h /tmp/dpep.9pxAsS/complete.dpatch/lib/lock.h
+--- complete.dpatch/lib/lock.h 2003-02-13 21:15:40.000000000 +0100
++++ /tmp/dpep.9pxAsS/complete.dpatch/lib/lock.h 2005-11-11 14:10:07.056723830 +0100
+@@ -53,6 +53,8 @@
+
+ #include <sys/stat.h>
+
++extern int lock_wait_time;
++
+ extern const char *lock_method_desc;
+
+ extern int lock_reopen P((int fd, const char *filename,
+diff -urNad complete.dpatch/lib/lock_fcntl.c /tmp/dpep.9pxAsS/complete.dpatch/lib/lock_fcntl.c
+--- complete.dpatch/lib/lock_fcntl.c 2003-02-13 21:15:40.000000000 +0100
++++ /tmp/dpep.9pxAsS/complete.dpatch/lib/lock_fcntl.c 2005-11-11 14:10:07.057723732 +0100
+@@ -47,11 +47,43 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <syslog.h>
++#include <signal.h>
+
+ #include "lock.h"
+
+ const char *lock_method_desc = "fcntl";
+
++int lock_wait_time = LOCK_GIVEUP_TIMER_DEFAULT;
++
++/* Signal handling. We REQUIRE SYSV abort-syscall behaviour */
++
++static volatile int lock_gotsigalrm = 0;
++void lock_sigalrm_handler(int sig __attribute__((unused)))
++{
++ lock_gotsigalrm = 1;
++}
++
++static int setsigalrm(int enable)
++{
++ struct sigaction action;
++
++ sigemptyset(&action.sa_mask);
++ action.sa_flags = SA_RESETHAND;
++
++ if(enable) {
++ action.sa_handler = lock_sigalrm_handler;
++ } else {
++ action.sa_handler = SIG_IGN;
++ }
++ if (sigaction(SIGALRM, &action, NULL) < 0) {
++ syslog(LOG_ERR, "installing SIGALRM handler: sigaction: %m");
++ return -1;
++ }
++ lock_gotsigalrm = 0;
++ return 0;
++}
++
+ /*
+ * Block until we obtain an exclusive lock on the file descriptor 'fd',
+ * opened for reading and writing on the file named 'filename'. If
+@@ -65,12 +97,10 @@
+ * 'failaction' is provided, it is filled in with a pointer to a fixed
+ * string naming the action that failed.
+ *
++ * We use POSIX semanthics and alarm() to avoid deadlocks
++ *
+ */
+-int lock_reopen(fd, filename, sbuf, failaction)
+-int fd;
+-const char *filename;
+-struct stat *sbuf;
+-const char **failaction;
++int lock_reopen (int fd, const char *filename, struct stat *sbuf, const char **failaction)
+ {
+ int r;
+ struct flock fl;
+@@ -79,6 +109,8 @@
+
+ if (!sbuf) sbuf = &sbufspare;
+
++ setsigalrm(1);
++ alarm(lock_wait_time);
+ for (;;) {
+ fl.l_type= F_WRLCK;
+ fl.l_whence = SEEK_SET;
+@@ -86,8 +118,10 @@
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
+ if (r == -1) {
+- if (errno == EINTR) continue;
+- if (failaction) *failaction = "locking";
++ if (errno == EINTR && !lock_gotsigalrm) continue;
++ if (failaction) *failaction = "locking";
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
+
+@@ -100,10 +134,16 @@
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
+
+- if (sbuf->st_ino == sbuffile.st_ino) return 0;
++ if (sbuf->st_ino == sbuffile.st_ino) {
++ alarm(0);
++ setsigalrm(0);
++ return 0;
++ }
+
+ newfd = open(filename, O_RDWR);
+ if (newfd == -1) {
+@@ -113,11 +153,15 @@
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
+ dup2(newfd, fd);
+ close(newfd);
+ }
++ alarm(0);
++ setsigalrm(0);
+ }
+
+ /*
+@@ -125,22 +169,32 @@
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+-int lock_blocking(fd)
+-int fd;
++int lock_blocking(int fd)
+ {
+ int r;
+ struct flock fl;
+
++ setsigalrm(1);
++ alarm(lock_wait_time);
+ for (;;) {
+ fl.l_type= F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
+- if (r != -1) return 0;
+- if (errno == EINTR) continue;
++ if (r != -1) {
++ alarm(0);
++ setsigalrm(0);
++ return 0;
++ }
++ if (errno == EINTR && !lock_gotsigalrm) continue;
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
++ alarm(0);
++ setsigalrm(0);
++ return 0;
+ }
+
+ /*
+@@ -148,22 +202,32 @@
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+-int lock_shared(fd)
+-int fd;
++int lock_shared(int fd)
+ {
+ int r;
+ struct flock fl;
+
++ setsigalrm(1);
++ alarm(lock_wait_time);
+ for (;;) {
+ fl.l_type= F_RDLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
+- if (r != -1) return 0;
+- if (errno == EINTR) continue;
++ if (r != -1) {
++ alarm(0);
++ setsigalrm(0);
++ return 0;
++ }
++ if (errno == EINTR && !lock_gotsigalrm) continue;
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
++ alarm(0);
++ setsigalrm(0);
++ return 0;
+ }
+
+ /*
+@@ -171,8 +235,7 @@
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+-int lock_nonblocking(fd)
+-int fd;
++int lock_nonblocking(int fd)
+ {
+ int r;
+ struct flock fl;
+@@ -187,10 +250,13 @@
+ if (errno == EINTR) continue;
+ return -1;
+ }
++ return 0;
+ }
+
+ /*
+- * Release any lock on 'fd'. Always returns success.
++ * Release any lock on 'fd'
++ * Returns 0 for success, -1 for failure, with errno set to an
++ * appropriate error code.
+ */
+ int lock_unlock(int fd)
+ {
+@@ -209,5 +275,6 @@
+ /* xxx help! */
+ return -1;
+ }
++ return 0;
+ }
+
+diff -urNad complete.dpatch/lib/lock_flock.c /tmp/dpep.9pxAsS/complete.dpatch/lib/lock_flock.c
+--- complete.dpatch/lib/lock_flock.c 2003-02-13 21:15:41.000000000 +0100
++++ /tmp/dpep.9pxAsS/complete.dpatch/lib/lock_flock.c 2005-11-11 14:10:07.057723732 +0100
+@@ -46,6 +46,8 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <syslog.h>
++#include <signal.h>
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+@@ -54,6 +56,36 @@
+
+ const char *lock_method_desc = "flock";
+
++int lock_wait_time = LOCK_GIVEUP_TIMER_DEFAULT;
++
++/* Signal handling. We REQUIRE SYSV abort-syscall behaviour */
++
++static volatile int lock_gotsigalrm = 0;
++void lock_sigalrm_handler(int sig __attribute__((unused)))
++{
++ lock_gotsigalrm = 1;
++}
++
++static int setsigalrm(int enable)
++{
++ struct sigaction action;
++
++ sigemptyset(&action.sa_mask);
++ action.sa_flags = SA_RESETHAND;
++
++ if(enable) {
++ action.sa_handler = lock_sigalrm_handler;
++ } else {
++ action.sa_handler = SIG_IGN;
++ }
++ if (sigaction(SIGALRM, &action, NULL) < 0) {
++ syslog(LOG_ERR, "installing SIGALRM handler: sigaction: %m");
++ return -1;
++ }
++ lock_gotsigalrm = 0;
++ return 0;
++}
++
+ /*
+ * Block until we obtain an exclusive lock on the file descriptor 'fd',
+ * opened for reading and writing on the file named 'filename'. If
+@@ -67,12 +99,10 @@
+ * 'failaction' is provided, it is filled in with a pointer to a fixed
+ * string naming the action that failed.
+ *
++ * We use POSIX semanthics and alarm() to avoid deadlocks
++ *
+ */
+-int lock_reopen(fd, filename, sbuf, failaction)
+-int fd;
+-const char *filename;
+-struct stat *sbuf;
+-const char **failaction;
++int lock_reopen(int fd, const char *filename, struct stat *sbuf, const char **failaction)
+ {
+ int r;
+ struct stat sbuffile, sbufspare;
+@@ -80,11 +110,15 @@
+
+ if (!sbuf) sbuf = &sbufspare;
+
++ setsigalrm(1);
++ alarm(lock_wait_time);
+ for (;;) {
+ r = flock(fd, LOCK_EX);
+ if (r == -1) {
+- if (errno == EINTR) continue;
++ if (errno == EINTR && !lock_gotsigalrm) continue;
+ if (failaction) *failaction = "locking";
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
+
+@@ -93,20 +127,32 @@
+ if (r == -1) {
+ if (failaction) *failaction = "stating";
+ flock(fd, LOCK_UN);
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
+
+- if (sbuf->st_ino == sbuffile.st_ino) return 0;
++ if (sbuf->st_ino == sbuffile.st_ino) {
++ alarm(0);
++ setsigalrm(0);
++ return 0;
++ }
++
+
+ newfd = open(filename, O_RDWR);
+ if (newfd == -1) {
+ if (failaction) *failaction = "opening";
+ flock(fd, LOCK_UN);
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
+ dup2(newfd, fd);
+ close(newfd);
+ }
++ alarm(0);
++ setsigalrm(0);
++ return 0;
+ }
+
+ /*
+@@ -114,17 +160,27 @@
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+-int lock_blocking(fd)
+-int fd;
++int lock_blocking(int fd)
+ {
+ int r;
+
++ setsigalrm(1);
++ alarm(lock_wait_time);
+ for (;;) {
+ r = flock(fd, LOCK_EX);
+- if (r != -1) return 0;
+- if (errno == EINTR) continue;
++ if (r != -1) {
++ alarm(0);
++ setsigalrm(0);
++ return 0;
++ }
++ if (errno == EINTR && !lock_gotsigalrm) continue;
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
++ alarm(0);
++ setsigalrm(0);
++ return 0;
+ }
+
+ /*
+@@ -132,17 +188,27 @@
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+-int lock_shared(fd)
+-int fd;
++int lock_shared(int fd)
+ {
+ int r;
+
++ setsigalrm(1);
++ alarm(lock_wait_time);
+ for (;;) {
+ r = flock(fd, LOCK_SH);
+- if (r != -1) return 0;
+- if (errno == EINTR) continue;
++ if (r != -1) {
++ alarm(0);
++ setsigalrm(0);
++ return 0;
++ }
++ if (errno == EINTR && !lock_gotsigalrm) continue;
++ alarm(0);
++ setsigalrm(0);
+ return -1;
+ }
++ alarm(0);
++ setsigalrm(0);
++ return 0;
+ }
+
+ /*
+@@ -164,7 +230,9 @@
+ }
+
+ /*
+- * Release any lock on 'fd'. Always returns success.
++ * Release any lock on 'fd'.
++ * Returns 0 for success, -1 for failure, with errno set to an
++ * appropriate error code.
+ */
+ int lock_unlock(int fd)
+ {
+@@ -174,8 +242,8 @@
+ r = flock(fd, LOCK_UN);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+- /* xxx help! */
+ return -1;
+ }
++ return 0;
+ }
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/13-master_process_handling.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/13-master_process_handling.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/13-master_process_handling.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/13-master_process_handling.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,245 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13-master_process_handling.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fixes process (child) handling in master process
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/master/master.c cyrus-imapd-2.3-2.3.7/master/master.c
+--- cyrus-imapd-2.3-2.3.7~/master/master.c 2006-08-14 16:22:33.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/master/master.c 2006-08-14 16:22:34.000000000 +0200
+@@ -165,6 +165,8 @@
+ static struct centry *ctable[child_table_size];
+ static struct centry *cfreelist;
+
++static int child_mourning_time = 2; /* Time in seconds to remember child
++ after processing SIGCHLD */
+ static int janitor_frequency = 1; /* Janitor sweeps per second */
+ static int janitor_position; /* Entry to begin at in next sweep */
+ static struct timeval janitor_mark; /* Last time janitor did a sweep */
+@@ -189,9 +191,9 @@
+ int become_cyrus(void)
+ {
+ struct passwd *p;
+- int newuid, newgid;
++ uid_t newuid, newgid;
+ int result;
+- static int uid = 0;
++ static uid_t uid = 0;
+
+ if (uid) return setuid(uid);
+
+@@ -943,7 +945,7 @@
+ }
+ }
+ c->service_state = SERVICE_STATE_DEAD;
+- c->janitor_deadline = time(NULL) + 2;
++ c->janitor_deadline = time(NULL) + child_mourning_time;
+ } else {
+ /* weird. Are we multithreaded now? we don't know this child */
+ syslog(LOG_WARNING,
+@@ -952,7 +954,7 @@
+ c = get_centry();
+ c->pid = pid;
+ c->service_state = SERVICE_STATE_DEAD;
+- c->janitor_deadline = time(NULL) + 2;
++ c->janitor_deadline = time(NULL) + child_mourning_time;
+ c->si = SERVICE_NONE;
+ c->next = ctable[pid % child_table_size];
+ ctable[pid % child_table_size] = c;
+@@ -1107,6 +1109,36 @@
+ }
+ }
+
++/*
++ * Receives a message from a service.
++ *
++ * Returns zero if all goes well
++ * 1 if no msg available
++ * 2 if bad message received (incorrectly sized)
++ * -1 on error (errno set)
++ */
++int read_msg(int fd, struct notify_message *msg)
++{
++ ssize_t r;
++ size_t off = 0;
++ int s = sizeof(struct notify_message);
++
++ while (s > 0) {
++ do
++ r = read(fd, msg + off, s);
++ while ((r == -1) && (errno == EINTR));
++ if (r <= 0) break;
++ s -= r;
++ off += r;
++ }
++ if ( ((r == 0) && (off == 0)) ||
++ ((r == -1) && (errno == EAGAIN)) )
++ return 1;
++ if (r == -1) return -1;
++ if (s != 0) return 2;
++ return 0;
++}
++
+ void process_msg(const int si, struct notify_message *msg)
+ {
+ struct centry *c;
+@@ -1421,8 +1453,9 @@
+ snprintf(buf, sizeof(buf),
+ "cannot find executable for service '%s'", name);
+
+- /* if it is not, we're misconfigured, die. */
+- fatal(buf, EX_CONFIG);
++ /* if it is not, we just skip it */
++ syslog(LOG_WARNING, "WARNING: %s -- ignored", buf);
++ return;
+ }
+
+ Services[i].maxforkrate = maxforkrate;
+@@ -1435,7 +1468,7 @@
+ Services[i].desired_workers = prefork;
+ Services[i].babysit = babysit;
+ Services[i].max_workers = atoi(max);
+- if (Services[i].max_workers == -1) {
++ if (Services[i].max_workers < 0) {
+ Services[i].max_workers = INT_MAX;
+ }
+ } else {
+@@ -1443,6 +1476,7 @@
+ if (prefork > 1) prefork = 1;
+ Services[i].desired_workers = prefork;
+ Services[i].max_workers = 1;
++ Services[i].babysit = 0;
+ }
+ free(max);
+
+@@ -1483,7 +1517,7 @@
+ if (!strcmp(cmd,"")) {
+ char buf[256];
+ snprintf(buf, sizeof(buf),
+- "unable to find command or port for event '%s'", name);
++ "unable to find command for event '%s'", name);
+
+ if (ignore_err) {
+ syslog(LOG_WARNING, "WARNING: %s -- ignored", buf);
+@@ -1537,7 +1571,7 @@
+
+ rl.rlim_cur = x;
+ rl.rlim_max = x;
+- if (setrlimit(RLIMIT_NUMFDS, &rl) < 0) {
++ if (setrlimit(RLIMIT_NUMFDS, &rl) < 0 && x != RLIM_INFINITY) {
+ syslog(LOG_ERR, "setrlimit: Unable to set file descriptors limit to %ld: %m", x);
+
+ #ifdef HAVE_GETRLIMIT
+@@ -1552,11 +1586,9 @@
+ }
+
+
+- if (verbose > 1) {
+- r = getrlimit(RLIMIT_NUMFDS, &rl);
+- syslog(LOG_DEBUG, "set maximum file descriptors to %ld/%ld", rl.rlim_cur,
+- rl.rlim_max);
+- }
++ if (verbose > 1 && getrlimit(RLIMIT_NUMFDS, &rl) >=0)
++ syslog(LOG_DEBUG, "set maximum file descriptors to %ld/%ld",
++ rl.rlim_cur, rl.rlim_max);
+ #else
+ }
+ #endif /* HAVE_GETRLIMIT */
+@@ -1575,7 +1607,10 @@
+
+ /* disable all services -
+ they will be re-enabled if they appear in config file */
+- for (i = 0; i < nservices; i++) Services[i].exec = NULL;
++ for (i = 0; i < nservices; i++) {
++ if (Services[i].exec) free((void*)Services[i].exec);
++ Services[i].exec = NULL;
++ }
+
+ /* read services */
+ masterconf_getsection("SERVICES", &add_service, (void*) 1);
+@@ -1590,13 +1625,18 @@
+ Services[i].stat[0], Services[i].stat[1]);
+
+ /* Only free the service info on the primary */
+- if(Services[i].associate == 0) {
++ if (Services[i].associate == 0) {
++ free(Services[i].name);
+ free(Services[i].listen);
+ free(Services[i].proto);
+ }
++ Services[i].name = NULL;
+ Services[i].listen = NULL;
+ Services[i].proto = NULL;
+ Services[i].desired_workers = 0;
++ Services[i].nforks = 0;
++ Services[i].nactive = 0;
++ Services[i].nconnections = 0;
+
+ /* send SIGHUP to all children */
+ for (j = 0 ; j < child_table_size ; j++ ) {
+@@ -1679,9 +1719,9 @@
+ p = getenv("CYRUS_VERBOSE");
+ if (p) verbose = atoi(p) + 1;
+ #ifdef HAVE_NETSNMP
+- while ((opt = getopt(argc, argv, "C:M:p:l:Ddj:P:x:")) != EOF) {
++ while ((opt = getopt(argc, argv, "C:M:p:l:DdjJ:P:x:")) != EOF) {
+ #else
+- while ((opt = getopt(argc, argv, "C:M:p:l:Ddj:")) != EOF) {
++ while ((opt = getopt(argc, argv, "C:M:p:l:DdjJ:")) != EOF) {
+ #endif
+ switch (opt) {
+ case 'C': /* alt imapd.conf file */
+@@ -1714,8 +1754,15 @@
+ /* Janitor frequency */
+ janitor_frequency = atoi(optarg);
+ if(janitor_frequency < 1)
+- fatal("The janitor period must be at least 1 second", EX_CONFIG);
++ fatal("The janitor frequency must be at least once per second", EX_CONFIG);
+ break;
++ case 'J':
++ /* Janitor delay before cleanup of a child */
++ child_mourning_time = atoi(optarg);
++ if(child_mourning_time < 1)
++ fatal("The janitor's mourning time interval must be at least 1 second",
++ EX_CONFIG);
++ break;
+ #ifdef HAVE_NETSNMP
+ case 'P': /* snmp AgentXPingInterval */
+ agentxpinginterval = atoi(optarg);
+@@ -2098,13 +2145,19 @@
+ int j;
+
+ if (FD_ISSET(x, &rfds)) {
+- r = read(x, &msg, sizeof(msg));
+- if (r != sizeof(msg)) {
+- syslog(LOG_ERR, "got incorrectly sized response from child: %x", i);
++ while ((r = read_msg(x, &msg)) == 0)
++ process_msg(i, &msg);
++
++ if (r == 2) {
++ syslog(LOG_ERR,
++ "got incorrectly sized response from child: %x", i);
++ continue;
++ }
++ if (r < 0) {
++ syslog(LOG_ERR,
++ "error while receiving message from child %x: %m", i);
+ continue;
+ }
+-
+- process_msg(i, &msg);
+ }
+
+ if (Services[i].exec &&
+diff -urNad cyrus-imapd-2.3-2.3.7~/master/master.h cyrus-imapd-2.3-2.3.7/master/master.h
+--- cyrus-imapd-2.3-2.3.7~/master/master.h 2005-04-06 22:37:01.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/master/master.h 2006-08-14 16:22:34.000000000 +0200
+@@ -46,6 +46,7 @@
+ extern struct service *Services;
+ extern int allocservices;
+ extern int nservices;
++void sighandler_setup(void);
+
+ /*
+ * Description of multiple address family support from
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/14-xmalloc.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/14-xmalloc.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/14-xmalloc.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/14-xmalloc.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 14-xmalloc.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix xmalloc usage
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/lib/map_stupidshared.c cyrus-imapd-2.3-2.3.7/lib/map_stupidshared.c
+--- cyrus-imapd-2.3-2.3.7~/lib/map_stupidshared.c 2003-10-22 20:50:12.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/lib/map_stupidshared.c 2006-08-14 16:22:44.000000000 +0200
+@@ -52,6 +52,7 @@
+ #include <sys/stat.h>
+ #include <syslog.h>
+
++#include "xmalloc.h"
+ #include "map.h"
+ #include "exitcodes.h"
+
+diff -urNad cyrus-imapd-2.3-2.3.7~/lib/xmalloc.h cyrus-imapd-2.3-2.3.7/lib/xmalloc.h
+--- cyrus-imapd-2.3-2.3.7~/lib/xmalloc.h 2006-03-17 18:29:41.000000000 +0100
++++ cyrus-imapd-2.3-2.3.7/lib/xmalloc.h 2006-08-14 16:22:44.000000000 +0200
+@@ -57,7 +57,7 @@
+
+ /* Functions using xmalloc.h must provide a function called fatal() conforming
+ to the following: */
+-extern void fatal(const char *fatal_message, int fatal_code);
+-/* __attribute__ ((noreturn));*/
++extern void fatal(const char *fatal_message, int fatal_code)
++ __attribute__ ((noreturn));
+
+ #endif /* INCLUDED_XMALLOC_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/16-fix_mib.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/16-fix_mib.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/16-fix_mib.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/16-fix_mib.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 16-fix_mib.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix MIB file for cyrus
+
+ at DPATCH@
+diff -urNad complete.dpatch/master/CYRUS-MASTER.mib /tmp/dpep.McEbU0/complete.dpatch/master/CYRUS-MASTER.mib
+--- complete.dpatch/master/CYRUS-MASTER.mib 2001-08-14 18:11:26.000000000 +0200
++++ /tmp/dpep.McEbU0/complete.dpatch/master/CYRUS-MASTER.mib 2005-11-10 17:11:15.237608454 +0100
+@@ -1,12 +1,15 @@
+ CYRUS-MASTER-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+- MODULE-IDENTITY, OBJECT-TYPE, Counter32
++ MODULE-IDENTITY, OBJECT-TYPE, Counter32, enterprises
+ FROM SNMPv2-SMI
+ DisplayString
+- FROM SNMPv2-TC
+- cmuCyrus
+- FROM CMU-MIB;
++ FROM SNMPv2-TC;
++-- cmuCyrus
++-- FROM CMU-MIB;
++
++cmuMIB OBJECT IDENTIFIER ::= { enterprises 3 }
++cmuCyrus OBJECT IDENTIFIER ::= { cmuMIB 6 }
+
+ cyrusMasterMIB MODULE-IDENTITY
+ LAST-UPDATED "0010312300Z" -- 2000 Oct 31
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/17-fix_tail_syntax_in_xversion.h.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/17-fix_tail_syntax_in_xversion.h.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/17-fix_tail_syntax_in_xversion.h.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/17-fix_tail_syntax_in_xversion.h.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 17-fix_tail_syntax_in_xversion.h.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix tail syntax in xversion.h (use "tail -n 1" instead of "tail -1")
+
+ at DPATCH@
+diff -urNad complete.dpatch/imap/xversion.sh /tmp/dpep.gLdzBq/complete.dpatch/imap/xversion.sh
+--- complete.dpatch/imap/xversion.sh 2003-10-22 20:03:00.000000000 +0200
++++ /tmp/dpep.gLdzBq/complete.dpatch/imap/xversion.sh 2005-11-10 17:14:52.208238481 +0100
+@@ -22,4 +22,4 @@
+ match ($0, pattern) {
+ printf "\"%s\"\n", substr($0, RSTART, RLENGTH)
+ }' pattern="$DATEPAT $TIMEPAT" | \
+- sort | tail -1 >> xversion.h
++ sort | tail -n 1 >> xversion.h
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/19-fix_tls_ssl.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/19-fix_tls_ssl.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/19-fix_tls_ssl.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/19-fix_tls_ssl.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,78 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 19-fix_tls_errormessage.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make TLS/SSL error message more informative
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/imap/tls.c cyrus-imapd-2.3-2.3.7/imap/tls.c
+--- cyrus-imapd-2.3-2.3.7~/imap/tls.c 2005-10-28 16:51:18.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/imap/tls.c 2006-08-14 16:22:55.000000000 +0200
+@@ -166,7 +166,7 @@
+ * tim - this seems to just be giving logging messages
+ */
+
+-static void apps_ssl_info_callback(SSL * s, int where, int ret)
++static void apps_ssl_info_callback(const SSL * s, int where, int ret)
+ {
+ char *str;
+ int w;
+@@ -678,7 +678,7 @@
+ s_key_file = config_getstring(IMAPOPT_TLS_KEY_FILE);
+
+ if (!set_cert_stuff(s_ctx, s_cert_file, s_key_file)) {
+- syslog(LOG_ERR,"TLS server engine: cannot load cert/key data");
++ syslog(LOG_ERR,"TLS server engine: cannot load cert/key data, may be a cert/key mismatch?");
+ return (-1);
+ }
+ SSL_CTX_set_tmp_rsa_callback(s_ctx, tmp_rsa_cb);
+@@ -1097,7 +1097,7 @@
+
+ if (c_cert_file || c_key_file) {
+ if (!set_cert_stuff(c_ctx, c_cert_file, c_key_file)) {
+- syslog(LOG_ERR,"TLS client engine: cannot load cert/key data");
++ syslog(LOG_ERR,"TLS client engine: cannot load cert/key data, may be a cert/key mismatch?");
+ return (-1);
+ }
+ }
+diff -urNad cyrus-imapd-2.3-2.3.7~/imtest/imtest.c cyrus-imapd-2.3-2.3.7/imtest/imtest.c
+--- cyrus-imapd-2.3-2.3.7~/imtest/imtest.c 2006-08-14 16:22:55.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/imtest/imtest.c 2006-08-14 16:22:55.000000000 +0200
+@@ -63,6 +63,7 @@
+
+ #include <limits.h>
+ #include <unistd.h>
++#include <ctype.h>
+
+ #include <netinet/in.h>
+ #include <sys/un.h>
+@@ -417,7 +418,7 @@
+ * tim - this seems to just be giving logging messages
+ */
+
+-static void apps_ssl_info_callback(SSL * s, int where, int ret)
++static void apps_ssl_info_callback(const SSL * s, int where, int ret)
+ {
+ char *str;
+ int w;
+@@ -530,7 +531,7 @@
+
+ if (c_cert_file || c_key_file)
+ if (!set_cert_stuff(tls_ctx, c_cert_file, c_key_file)) {
+- printf("TLS engine: cannot load cert/key data\n");
++ printf("TLS engine: cannot load cert/key data, maybe a cert/key mismatch?\n");
+ return IMTEST_FAIL;
+ }
+ SSL_CTX_set_tmp_rsa_callback(tls_ctx, tmp_rsa_cb);
+diff -urNad cyrus-imapd-2.3-2.3.7~/lib/imclient.c cyrus-imapd-2.3-2.3.7/lib/imclient.c
+--- cyrus-imapd-2.3-2.3.7~/lib/imclient.c 2005-10-28 16:51:22.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/lib/imclient.c 2006-08-14 16:22:55.000000000 +0200
+@@ -1733,7 +1733,7 @@
+
+ if (c_cert_file || c_key_file)
+ if (!set_cert_stuff(imclient->tls_ctx, c_cert_file, c_key_file)) {
+- printf("[ TLS engine: cannot load cert/key data ]\n");
++ printf("[ TLS engine: cannot load cert/key data, might be a cert/key mismatch]\n");
+ return -1;
+ }
+ SSL_CTX_set_tmp_rsa_callback(imclient->tls_ctx, tmp_rsa_cb);
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/21-fix_config-parsing.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/21-fix_config-parsing.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/21-fix_config-parsing.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/21-fix_config-parsing.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,37 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 21-fix_config-parsing.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix parsing of master.conf
+
+ at DPATCH@
+diff -urNad complete.dpatch/master/masterconf.c /tmp/dpep.CfovCR/complete.dpatch/master/masterconf.c
+--- complete.dpatch/master/masterconf.c 2005-11-11 15:25:37.000000000 +0100
++++ /tmp/dpep.CfovCR/complete.dpatch/master/masterconf.c 2005-11-11 15:27:02.084797577 +0100
+@@ -150,8 +150,13 @@
+ const char *val = masterconf_getstring(e, key, NULL);
+
+ if (!val) return def;
+- if (!isdigit((int) *val) &&
+- (*val != '-' || !isdigit((int) val[1]))) return def;
++ if (!isdigit((int) *val) &&
++ (*val != '-' || !isdigit((int) val[1]))) {
++ syslog(LOG_DEBUG, "value '%s' for '%s' does not look like a number.",
++ val, key);
++ return def;
++ }
++
+ return atoi(val);
+ }
+
+@@ -169,6 +174,10 @@
+ (val[0] == 'o' && val[1] == 'n') || val[0] == 't') {
+ return 1;
+ }
++
++ syslog(LOG_DEBUG, "cannot interpret value '%s' for key '%s'. use y/n.",
++ val, key);
++
+ return def;
+ }
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/25-update_install-sh.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/25-update_install-sh.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/25-update_install-sh.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/25-update_install-sh.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,530 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 25_update_install.sh.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: update install-sh to a more recent version
+
+ at DPATCH@
+diff -urN cyrus-imapd-2.2.12/install-sh cyrus-imapd-2.2.12~/install-sh
+--- cyrus-imapd-2.2.12/install-sh 2005-08-30 14:42:29.000000000 +0200
++++ cyrus-imapd-2.2.12~/install-sh 2005-08-30 14:36:59.000000000 +0200
+@@ -1,23 +1,52 @@
+ #!/bin/sh
+-#
+ # install - install a program, script, or datafile
+-# This comes from X11R5.
++
++scriptversion=2005-02-02.21
++
++# This originates from X11R5 (mit/util/scripts/install.sh), which was
++# later released in X11R6 (xc/config/util/install.sh) with the
++# following copyright and license.
++#
++# Copyright (C) 1994 X Consortium
++#
++# Permission is hereby granted, free of charge, to any person obtaining a copy
++# of this software and associated documentation files (the "Software"), to
++# deal in the Software without restriction, including without limitation the
++# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++# sell copies of the Software, and to permit persons to whom the Software is
++# furnished to do so, subject to the following conditions:
++#
++# The above copyright notice and this permission notice shall be included in
++# all copies or substantial portions of the Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
++# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
++# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#
++# Except as contained in this notice, the name of the X Consortium shall not
++# be used in advertising or otherwise to promote the sale, use or other deal-
++# ings in this Software without prior written authorization from the X Consor-
++# tium.
++#
++#
++# FSF changes to this file are in the public domain.
+ #
+ # Calling this script install-sh is preferred over install.sh, to prevent
+ # `make' implicit rules from creating a file called install from it
+ # when there is no Makefile.
+ #
+ # This script is compatible with the BSD install script, but was written
+-# from scratch.
+-#
+-
++# from scratch. It can only install one file at a time, a restriction
++# shared with many OS's install programs.
+
+ # set DOITPROG to echo to test this script
+
+ # Don't use :- since 4.3BSD and earlier shells don't like it.
+ doit="${DOITPROG-}"
+
+-
+ # put in absolute paths if you don't have them in your path; or use env. vars.
+
+ mvprog="${MVPROG-mv}"
+@@ -29,210 +58,266 @@
+ rmprog="${RMPROG-rm}"
+ mkdirprog="${MKDIRPROG-mkdir}"
+
+-tranformbasename=""
+-transform_arg=""
+-instcmd="$mvprog"
+ chmodcmd="$chmodprog 0755"
+-chowncmd=""
+-chgrpcmd=""
+-stripcmd=""
++chowncmd=
++chgrpcmd=
++stripcmd=
+ rmcmd="$rmprog -f"
+ mvcmd="$mvprog"
+-src=""
+-dst=""
+-dir_arg=""
+-
+-while [ x"$1" != x ]; do
+- case $1 in
+- -c) instcmd="$cpprog"
+- shift
+- continue;;
+-
+- -d) dir_arg=true
+- shift
+- continue;;
+-
+- -m) chmodcmd="$chmodprog $2"
+- shift
+- shift
+- continue;;
+-
+- -o) chowncmd="$chownprog $2"
+- shift
+- shift
+- continue;;
+-
+- -g) chgrpcmd="$chgrpprog $2"
+- shift
+- shift
+- continue;;
+-
+- -s) stripcmd="$stripprog"
+- shift
+- continue;;
+-
+- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+- shift
+- continue;;
+-
+- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+- shift
+- continue;;
+-
+- *) if [ x"$src" = x ]
+- then
+- src=$1
+- else
+- # this colon is to work around a 386BSD /bin/sh bug
+- :
+- dst=$1
+- fi
+- shift
+- continue;;
+- esac
+-done
+-
+-if [ x"$src" = x ]
+-then
+- echo "install: no input file specified"
+- exit 1
+-else
+- true
+-fi
+-
+-if [ x"$dir_arg" != x ]; then
+- dst=$src
+- src=""
+-
+- if [ -d $dst ]; then
+- instcmd=:
+- else
+- instcmd=mkdir
+- fi
+-else
+-
+-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+-# might cause directories to be created, which would be especially bad
+-# if $src (and thus $dsttmp) contains '*'.
+-
+- if [ -f $src -o -d $src ]
+- then
+- true
+- else
+- echo "install: $src does not exist"
+- exit 1
+- fi
+-
+- if [ x"$dst" = x ]
+- then
+- echo "install: no destination specified"
+- exit 1
+- else
+- true
+- fi
+-
+-# If destination is a directory, append the input filename; if your system
+-# does not like double slashes in filenames, you may need to add some logic
+-
+- if [ -d $dst ]
+- then
+- dst="$dst"/`basename $src`
+- else
+- true
+- fi
+-fi
+-
+-## this sed command emulates the dirname command
+-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+-
+-# Make sure that the destination directory exists.
+-# this part is taken from Noah Friedman's mkinstalldirs script
+-
+-# Skip lots of stat calls in the usual case.
+-if [ ! -d "$dstdir" ]; then
+-defaultIFS='
+-'
+-IFS="${IFS-${defaultIFS}}"
+-
+-oIFS="${IFS}"
+-# Some sh's can't handle IFS=/ for some reason.
+-IFS='%'
+-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+-IFS="${oIFS}"
++src=
++dst=
++dir_arg=
++dstarg=
++no_target_directory=
++
++usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
++ or: $0 [OPTION]... SRCFILES... DIRECTORY
++ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
++ or: $0 [OPTION]... -d DIRECTORIES...
++
++In the 1st form, copy SRCFILE to DSTFILE.
++In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
++In the 4th, create DIRECTORIES.
++
++Options:
++-c (ignored)
++-d create directories instead of installing files.
++-g GROUP $chgrpprog installed files to GROUP.
++-m MODE $chmodprog installed files to MODE.
++-o USER $chownprog installed files to USER.
++-s $stripprog installed files.
++-t DIRECTORY install into DIRECTORY.
++-T report an error if DSTFILE is a directory.
++--help display this help and exit.
++--version display version info and exit.
++
++Environment variables override the default commands:
++ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
++"
++
++while test -n "$1"; do
++ case $1 in
++ -c) shift
++ continue;;
++
++ -d) dir_arg=true
++ shift
++ continue;;
++
++ -g) chgrpcmd="$chgrpprog $2"
++ shift
++ shift
++ continue;;
++
++ --help) echo "$usage"; exit $?;;
++
++ -m) chmodcmd="$chmodprog $2"
++ shift
++ shift
++ continue;;
++
++ -o) chowncmd="$chownprog $2"
++ shift
++ shift
++ continue;;
++
++ -s) stripcmd=$stripprog
++ shift
++ continue;;
+
+-pathcomp=''
++ -t) dstarg=$2
++ shift
++ shift
++ continue;;
+
+-while [ $# -ne 0 ] ; do
+- pathcomp="${pathcomp}${1}"
++ -T) no_target_directory=true
+ shift
++ continue;;
+
+- if [ ! -d "${pathcomp}" ] ;
+- then
+- $mkdirprog "${pathcomp}"
+- else
+- true
+- fi
++ --version) echo "$0 $scriptversion"; exit $?;;
+
+- pathcomp="${pathcomp}/"
++ *) # When -d is used, all remaining arguments are directories to create.
++ # When -t is used, the destination is already specified.
++ test -n "$dir_arg$dstarg" && break
++ # Otherwise, the last argument is the destination. Remove it from $@.
++ for arg
++ do
++ if test -n "$dstarg"; then
++ # $@ is not empty: it contains at least $arg.
++ set fnord "$@" "$dstarg"
++ shift # fnord
++ fi
++ shift # arg
++ dstarg=$arg
++ done
++ break;;
++ esac
+ done
+-fi
+-
+-if [ x"$dir_arg" != x ]
+-then
+- $doit $instcmd $dst &&
+-
+- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+-else
+-
+-# If we're going to rename the final executable, determine the name now.
+-
+- if [ x"$transformarg" = x ]
+- then
+- dstfile=`basename $dst`
+- else
+- dstfile=`basename $dst $transformbasename |
+- sed $transformarg`$transformbasename
+- fi
+-
+-# don't allow the sed command to completely eliminate the filename
+-
+- if [ x"$dstfile" = x ]
+- then
+- dstfile=`basename $dst`
+- else
+- true
+- fi
+-
+-# Make a temp file name in the proper directory.
+-
+- dsttmp=$dstdir/#inst.$$#
+
+-# Move or copy the file name to the temp name
+-
+- $doit $instcmd $src $dsttmp &&
+-
+- trap "rm -f ${dsttmp}" 0 &&
+-
+-# and set any options; do chmod last to preserve setuid bits
+-
+-# If any of these fail, we abort the whole thing. If we want to
+-# ignore errors from any of these, just make sure not to ignore
+-# errors from the above "$doit $instcmd $src $dsttmp" command.
+-
+- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+-
+-# Now rename the file to the real destination.
+-
+- $doit $rmcmd -f $dstdir/$dstfile &&
+- $doit $mvcmd $dsttmp $dstdir/$dstfile
++if test -z "$1"; then
++ if test -z "$dir_arg"; then
++ echo "$0: no input file specified." >&2
++ exit 1
++ fi
++ # It's OK to call `install-sh -d' without argument.
++ # This can happen when creating conditional directories.
++ exit 0
++fi
+
+-fi &&
++for src
++do
++ # Protect names starting with `-'.
++ case $src in
++ -*) src=./$src ;;
++ esac
++
++ if test -n "$dir_arg"; then
++ dst=$src
++ src=
++
++ if test -d "$dst"; then
++ mkdircmd=:
++ chmodcmd=
++ else
++ mkdircmd=$mkdirprog
++ fi
++ else
++ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
++ # might cause directories to be created, which would be especially bad
++ # if $src (and thus $dsttmp) contains '*'.
++ if test ! -f "$src" && test ! -d "$src"; then
++ echo "$0: $src does not exist." >&2
++ exit 1
++ fi
++
++ if test -z "$dstarg"; then
++ echo "$0: no destination specified." >&2
++ exit 1
++ fi
++
++ dst=$dstarg
++ # Protect names starting with `-'.
++ case $dst in
++ -*) dst=./$dst ;;
++ esac
+
++ # If destination is a directory, append the input filename; won't work
++ # if double slashes aren't ignored.
++ if test -d "$dst"; then
++ if test -n "$no_target_directory"; then
++ echo "$0: $dstarg: Is a directory" >&2
++ exit 1
++ fi
++ dst=$dst/`basename "$src"`
++ fi
++ fi
++
++ # This sed command emulates the dirname command.
++ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
++
++ # Make sure that the destination directory exists.
++
++ # Skip lots of stat calls in the usual case.
++ if test ! -d "$dstdir"; then
++ defaultIFS='
++ '
++ IFS="${IFS-$defaultIFS}"
++
++ oIFS=$IFS
++ # Some sh's can't handle IFS=/ for some reason.
++ IFS='%'
++ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
++ shift
++ IFS=$oIFS
++
++ pathcomp=
++
++ while test $# -ne 0 ; do
++ pathcomp=$pathcomp$1
++ shift
++ if test ! -d "$pathcomp"; then
++ $mkdirprog "$pathcomp"
++ # mkdir can fail with a `File exist' error in case several
++ # install-sh are creating the directory concurrently. This
++ # is OK.
++ test -d "$pathcomp" || exit
++ fi
++ pathcomp=$pathcomp/
++ done
++ fi
++
++ if test -n "$dir_arg"; then
++ $doit $mkdircmd "$dst" \
++ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
++ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
++ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
++ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
++
++ else
++ dstfile=`basename "$dst"`
++
++ # Make a couple of temp file names in the proper directory.
++ dsttmp=$dstdir/_inst.$$_
++ rmtmp=$dstdir/_rm.$$_
++
++ # Trap to clean up those temp files at exit.
++ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
++ trap '(exit $?); exit' 1 2 13 15
++
++ # Copy the file name to the temp name.
++ $doit $cpprog "$src" "$dsttmp" &&
++
++ # and set any options; do chmod last to preserve setuid bits.
++ #
++ # If any of these fail, we abort the whole thing. If we want to
++ # ignore errors from any of these, just make sure not to ignore
++ # errors from the above "$doit $cpprog $src $dsttmp" command.
++ #
++ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
++ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
++ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
++ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
++
++ # Now rename the file to the real destination.
++ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
++ || {
++ # The rename failed, perhaps because mv can't rename something else
++ # to itself, or perhaps because mv is so ancient that it does not
++ # support -f.
++
++ # Now remove or move aside any old file at destination location.
++ # We try this two ways since rm can't unlink itself on some
++ # systems and the destination file might be busy for other
++ # reasons. In this case, the final cleanup might fail but the new
++ # file should still install successfully.
++ {
++ if test -f "$dstdir/$dstfile"; then
++ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
++ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
++ || {
++ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
++ (exit 1); exit 1
++ }
++ else
++ :
++ fi
++ } &&
++
++ # Now rename the file to the real destination.
++ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
++ }
++ }
++ fi || { (exit 1); exit 1; }
++done
+
+-exit 0
++# The final little trick to "correctly" pass the exit status to the exit trap.
++{
++ (exit 0); exit 0
++}
++
++# Local variables:
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "scriptversion="
++# time-stamp-format: "%:y-%02m-%02d.%02H"
++# time-stamp-end: "$"
++# End:
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/30-update_perlcalling.sh.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/30-update_perlcalling.sh.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/30-update_perlcalling.sh.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/30-update_perlcalling.sh.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,491 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30_update_perlcalling.sh.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: updates calling of the perl interpreter to what we expect in Debian.
+## DP: More precisely: Call /usr/bin/perl directly instead of using some
+## DP: shell magic to locate perl and run it.
+## DP: NOTE: only some script use the "-w" or even the "-T" flag for perl.
+## DP: This should be the default actually.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3.7~/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl cyrus-imapd-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl
+--- cyrus-imapd-2.3.7~/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl 2001-01-28 23:42:01.000000000 +0100
++++ cyrus-imapd-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/cyrus_master.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl5
++#!/usr/bin/perl
+
+ #
+ # Created by Alison Greenwald <alison at andrew.cmu.edu> 21 Sep 2000
+diff -urNad cyrus-imapd-2.3.7~/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl cyrus-imapd-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl
+--- cyrus-imapd-2.3.7~/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl 2001-01-28 23:42:01.000000000 +0100
++++ cyrus-imapd-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db-sum.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl5
++#!/usr/bin/perl
+
+ #
+ # Created by Alison Greenwald 21 Sep 2000
+diff -urNad cyrus-imapd-2.3.7~/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl cyrus-imapd-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl
+--- cyrus-imapd-2.3.7~/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl 2001-01-28 23:42:01.000000000 +0100
++++ cyrus-imapd-2.3.7/contrib/cyrus-graphtools.1.0/cgi-bin/graph_cyrus_db.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl5
++#!/usr/bin/perl
+
+ #
+ # Created by Alison Greenwald <alison at andrew.cmu.edu> 21 Sep 2000
+diff -urNad cyrus-imapd-2.3.7~/contrib/mupdate-test.pl cyrus-imapd-2.3.7/contrib/mupdate-test.pl
+--- cyrus-imapd-2.3.7~/contrib/mupdate-test.pl 2003-12-19 19:33:25.000000000 +0100
++++ cyrus-imapd-2.3.7/contrib/mupdate-test.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # Create a workload against a murder frontend
+ # that will give the MUPDATE server a workout.
+diff -urNad cyrus-imapd-2.3.7~/perl/imap/examples/auditmbox.pl cyrus-imapd-2.3.7/perl/imap/examples/auditmbox.pl
+--- cyrus-imapd-2.3.7~/perl/imap/examples/auditmbox.pl 2003-12-19 19:33:52.000000000 +0100
++++ cyrus-imapd-2.3.7/perl/imap/examples/auditmbox.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl -w
++#!/usr/bin/perl -w
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+diff -urNad cyrus-imapd-2.3.7~/perl/imap/examples/imapcollate.pl cyrus-imapd-2.3.7/perl/imap/examples/imapcollate.pl
+--- cyrus-imapd-2.3.7~/perl/imap/examples/imapcollate.pl 2002-05-25 21:57:50.000000000 +0200
++++ cyrus-imapd-2.3.7/perl/imap/examples/imapcollate.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl -w
++#!/usr/bin/perl -w
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+diff -urNad cyrus-imapd-2.3.7~/perl/imap/examples/imapdu.pl cyrus-imapd-2.3.7/perl/imap/examples/imapdu.pl
+--- cyrus-imapd-2.3.7~/perl/imap/examples/imapdu.pl 2001-11-30 20:30:45.000000000 +0100
++++ cyrus-imapd-2.3.7/perl/imap/examples/imapdu.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/perl -w
++#!/usr/bin/perl -w
+ #
+ # $Id: imapdu.pl,v 1.8 2001/11/30 19:30:45 leg Exp $
+ #
+diff -urNad cyrus-imapd-2.3.7~/perl/imap/examples/test-imsp.pl cyrus-imapd-2.3.7/perl/imap/examples/test-imsp.pl
+--- cyrus-imapd-2.3.7~/perl/imap/examples/test-imsp.pl 2002-05-25 21:57:50.000000000 +0200
++++ cyrus-imapd-2.3.7/perl/imap/examples/test-imsp.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl -w
+
+ # test-imsp.pl
+ #
+diff -urNad cyrus-imapd-2.3.7~/perl/sieve/scripts/installsieve.pl cyrus-imapd-2.3.7/perl/sieve/scripts/installsieve.pl
+--- cyrus-imapd-2.3.7~/perl/sieve/scripts/installsieve.pl 2002-05-25 21:57:52.000000000 +0200
++++ cyrus-imapd-2.3.7/perl/sieve/scripts/installsieve.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,6 +1,4 @@
+-#! /bin/sh
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
++#!/usr/bin/perl -w
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+diff -urNad cyrus-imapd-2.3.7~/perl/sieve/scripts/sieveshell.pl cyrus-imapd-2.3.7/perl/sieve/scripts/sieveshell.pl
+--- cyrus-imapd-2.3.7~/perl/sieve/scripts/sieveshell.pl 2004-01-15 21:24:44.000000000 +0100
++++ cyrus-imapd-2.3.7/perl/sieve/scripts/sieveshell.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,6 +1,4 @@
+-#! /bin/sh
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
++#!/usr/bin/perl -w
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+diff -urNad cyrus-imapd-2.3.7~/snmp/snmpgen cyrus-imapd-2.3.7/snmp/snmpgen
+--- cyrus-imapd-2.3.7~/snmp/snmpgen 2005-04-11 08:09:27.000000000 +0200
++++ cyrus-imapd-2.3.7/snmp/snmpgen 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/perl -w
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+@@ -38,25 +38,8 @@
+ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
+ # $Id: snmpgen,v 1.15.4.3 2005/04/11 06:09:27 shadow Exp $
+
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-w", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ #Tim Martin
+diff -urNad cyrus-imapd-2.3.7~/tools/arbitronsort.pl cyrus-imapd-2.3.7/tools/arbitronsort.pl
+--- cyrus-imapd-2.3.7~/tools/arbitronsort.pl 2003-08-04 19:13:24.000000000 +0200
++++ cyrus-imapd-2.3.7/tools/arbitronsort.pl 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ #
+ # This script takes the output of arbitron (run without the -o option)
+diff -urNad cyrus-imapd-2.3.7~/tools/config2header cyrus-imapd-2.3.7/tools/config2header
+--- cyrus-imapd-2.3.7~/tools/config2header 2005-04-13 17:43:33.000000000 +0200
++++ cyrus-imapd-2.3.7/tools/config2header 2006-08-11 12:09:17.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/perl -w
+ # $Id: config2header,v 1.2.2.12 2005/04/13 15:43:33 shadow Exp $
+ #
+ # Copyright (c) 2001 Carnegie Mellon University. All rights reserved.
+@@ -39,24 +39,6 @@
+ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
+-
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ use strict;
+diff -urNad cyrus-imapd-2.3.7~/tools/config2man cyrus-imapd-2.3.7/tools/config2man
+--- cyrus-imapd-2.3.7~/tools/config2man 2003-12-19 19:33:58.000000000 +0100
++++ cyrus-imapd-2.3.7/tools/config2man 2006-08-11 12:09:33.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/perl -w
+ # $Id: config2man,v 1.2.2.1 2003/12/19 18:33:58 ken3 Exp $
+ #
+ # Copyright (c) 2001 Carnegie Mellon University. All rights reserved.
+@@ -39,24 +39,6 @@
+ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
+-
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ use strict;
+diff -urNad cyrus-imapd-2.3.7~/tools/dohash cyrus-imapd-2.3.7/tools/dohash
+--- cyrus-imapd-2.3.7~/tools/dohash 2005-12-01 23:30:21.000000000 +0100
++++ cyrus-imapd-2.3.7/tools/dohash 2006-08-11 12:09:59.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/perl -w
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+@@ -38,27 +38,8 @@
+ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
+-# script to upgrade from versions of imapd previous to 1.6.2
+-# make sure you run it as the cyrus user
+ # $Id: dohash,v 1.10.18.1 2005/12/01 22:30:21 murch Exp $
+
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ $| = 1;
+diff -urNad cyrus-imapd-2.3.7~/tools/masssievec cyrus-imapd-2.3.7/tools/masssievec
+--- cyrus-imapd-2.3.7~/tools/masssievec 2005-12-01 23:30:21.000000000 +0100
++++ cyrus-imapd-2.3.7/tools/masssievec 2006-08-11 12:10:34.000000000 +0200
+@@ -1,4 +1,6 @@
+-#!/bin/sh
++#!/usr/bin/perl -w
++#
++# Script for mass compilation of sieve scripts.
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+@@ -38,28 +40,11 @@
+ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
+ #
+ # Script for mass compilation of sieve scripts.
+ #
+ # $Id: masssievec,v 1.2.2.3 2005/12/01 22:30:21 murch Exp $
+
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ $| = 1;
+diff -urNad cyrus-imapd-2.3.7~/tools/mkimap cyrus-imapd-2.3.7/tools/mkimap
+--- cyrus-imapd-2.3.7~/tools/mkimap 2005-12-01 23:30:22.000000000 +0100
++++ cyrus-imapd-2.3.7/tools/mkimap 2006-08-11 12:10:49.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/perl
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+@@ -38,25 +38,8 @@
+ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
+ # $Id: mkimap,v 1.15.2.4 2005/12/01 22:30:22 murch Exp $
+
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ sub read_conf {
+diff -urNad cyrus-imapd-2.3.7~/tools/mknewsgroups cyrus-imapd-2.3.7/tools/mknewsgroups
+--- cyrus-imapd-2.3.7~/tools/mknewsgroups 2003-10-22 20:03:47.000000000 +0200
++++ cyrus-imapd-2.3.7/tools/mknewsgroups 2006-08-11 12:08:28.000000000 +0200
+@@ -1,5 +1,8 @@
+-#!/bin/sh
++#!/usr/bin/perl -w
+ #
++# Create newsgroups on imap server
++# Based on the make_fromactive.pl script by Tim Martin
++#
+ # Copyright (c) 2003 Carnegie Mellon University. All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without
+@@ -38,29 +41,6 @@
+ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
+-#
+-# Create newsgroups on imap server
+-# Based on the make_fromactive.pl script by Tim Martin
+-#
+-# $Id: mknewsgroups,v 1.2 2003/10/22 18:03:47 rjs3 Exp $
+-
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ use Getopt::Long;
+diff -urNad cyrus-imapd-2.3.7~/tools/rehash cyrus-imapd-2.3.7/tools/rehash
+--- cyrus-imapd-2.3.7~/tools/rehash 2005-12-01 23:30:22.000000000 +0100
++++ cyrus-imapd-2.3.7/tools/rehash 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,8 @@
+-#!/bin/sh
++#!/usr/bin/perl
++# script to upgrade from simple hashing scheme to full hashing scheme
++# make sure you run it as the cyrus user
++#
++# Written by Gary Mills <mills at cc.UManitoba.CA>
+ #
+ # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
+ #
+@@ -38,8 +42,6 @@
+ # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
+ # script to upgrade from simple hashing scheme to full hashing scheme
+ # make sure you run it as the cyrus user
+ #
+@@ -47,21 +49,6 @@
+ #
+ # $Id: rehash,v 1.7.2.1 2005/12/01 22:30:22 murch Exp $
+
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ $| = 1;
+diff -urNad cyrus-imapd-2.3.7~/tools/translatesieve cyrus-imapd-2.3.7/tools/translatesieve
+--- cyrus-imapd-2.3.7~/tools/translatesieve 2005-12-01 23:30:22.000000000 +0100
++++ cyrus-imapd-2.3.7/tools/translatesieve 2006-08-11 12:08:28.000000000 +0200
+@@ -1,6 +1,4 @@
+-#!/bin/sh
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
++#!/usr/bin/perl
+ # script to translate sieve scripts to use unixhierarchysep and/or altnamespace
+ # make sure you run it as the cyrus user
+ #!/usr/bin/perl
+@@ -45,21 +43,6 @@
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ $| = 1;
+diff -urNad cyrus-imapd-2.3.7~/tools/undohash cyrus-imapd-2.3.7/tools/undohash
+--- cyrus-imapd-2.3.7~/tools/undohash 2005-12-01 23:30:23.000000000 +0100
++++ cyrus-imapd-2.3.7/tools/undohash 2006-08-11 12:08:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++#!/usr/bin/perl -w
+ # script to downgrade from cyrus imapd 1.6.2+ to earlier.
+ # do NOT run this script while imapd's are running
+ # $Id: undohash,v 1.7.8.1 2005/12/01 22:30:23 murch Exp $
+diff -urNad cyrus-imapd-2.3.7~/tools/upgradesieve cyrus-imapd-2.3.7/tools/upgradesieve
+--- cyrus-imapd-2.3.7~/tools/upgradesieve 2005-12-01 23:30:23.000000000 +0100
++++ cyrus-imapd-2.3.7/tools/upgradesieve 2006-08-11 12:08:28.000000000 +0200
+@@ -1,6 +1,4 @@
+-#!/bin/sh
+-exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+-#!perl -w
++#!/usr/bin/perl -w
+ # script to upgrade sievedir from imapd 1.6.13
+ # make sure you run it as the cyrus user
+ #!/usr/bin/perl
+@@ -45,21 +43,6 @@
+ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #
+
+-if ($] !~ /^5\..*/) {
+- # uh-oh. this isn't perl 5.
+- foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+- exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+- }
+- # we failed. bail.
+- die "Your perl is too old; I need perl 5.\n";
+-}
+-
+-# load the real script. this is isolated in an 'eval' so perl4 won't
+-# choke on the perl5-isms.
+-eval join("\n", <DATA>);
+-if ($@) { die "$@"; }
+-
+-__END__
+ require 5;
+
+ $| = 1;
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/35-masssievec_remove_unused_variable.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/35-masssievec_remove_unused_variable.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/35-masssievec_remove_unused_variable.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/35-masssievec_remove_unused_variable.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 35_masssievec_remove_unused_variable.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove the $nosievedir variable which is set once but never used.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.12/tools/masssievec /tmp/dpep.jwVgoT/cyrus-imapd-2.2.12/tools/masssievec
+--- cyrus-imapd-2.2.12/tools/masssievec 2005-05-24 22:52:49.000000000 +0200
++++ /tmp/dpep.jwVgoT/cyrus-imapd-2.2.12/tools/masssievec 2005-05-24 22:53:24.124865338 +0200
+@@ -86,7 +86,6 @@
+ push @configs, $1;
+ }
+ if (/^sieveusehomedir:\s+(1|t|yes|on)/) {
+- $nosievedir = 1;
+ print "you are storing sieve scripts in user's home directories, this script cannot deal with that\n";
+ exit;
+ }
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/40-rehash_fix_pathes.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/40-rehash_fix_pathes.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/40-rehash_fix_pathes.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/40-rehash_fix_pathes.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,36 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 40_rehash_fix_pathes.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix paths in tools/rehash
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.12/tools/rehash /tmp/dpep.cNgMuy/cyrus-imapd-2.2.12/tools/rehash
+--- cyrus-imapd-2.2.12/tools/rehash 2005-05-24 22:56:53.000000000 +0200
++++ /tmp/dpep.cNgMuy/cyrus-imapd-2.2.12/tools/rehash 2005-05-24 22:57:53.429121575 +0200
+@@ -170,7 +170,7 @@
+ $imapdconf = shift || "/etc/imapd.conf";
+
+ $yn = "y";
+-$sievedir = "/usr/sieve";
++$sievedir = "/var/spool/sieve";
+ $nosievedir = 0;
+ $hashispool = 0;
+ $virtdomains = 0;
+@@ -181,7 +181,7 @@
+ read_conf($conf);
+ }
+
+-if (! $confdir) { $confdir = "/var/imap"; }
++if (! $confdir) { $confdir = "/var/lib/cyrus"; }
+
+ if ($interactive) {
+ print "upgrade $confdir? ";
+@@ -555,6 +555,7 @@
+ or die "couldn't rename .$i/$s/$t to $s/$t";
+ }
+ closedir MV;
++ rmdir ".$i/$s" or die "could not remove .$i/$s"
+ }
+ closedir SUB;
+ rmdir ".$i" or die "could not remove .$i";
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/45-kolab2-annotations.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/45-kolab2-annotations.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/45-kolab2-annotations.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/45-kolab2-annotations.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,151 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 45-kolab2-annotations.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add kolab2 compatible annotation functionality
+
+ at DPATCH@
+diff -urNad cyrus22-imapd-2.2.12/imap/annotate.c /tmp/dpep.AQbIR0/cyrus22-imapd-2.2.12/imap/annotate.c
+--- cyrus22-imapd-2.2.12/imap/annotate.c 2005-03-12 23:09:22.000000000 +0100
++++ /tmp/dpep.AQbIR0/cyrus22-imapd-2.2.12/imap/annotate.c 2005-06-30 13:15:22.121300304 +0200
+@@ -1667,6 +1667,11 @@
+ { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
+ };
+
++const struct annotate_st_entry vendor_entry =
++ { NULL, ATTRIB_TYPE_STRING, BACKEND_ONLY,
++ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV,
++ ACL_ADMIN, annotation_set_todb, NULL };
++
+ int annotatemore_store(char *mailbox,
+ struct entryattlist *l,
+ struct namespace *namespace,
+@@ -1679,6 +1684,7 @@
+ struct attvaluelist *av;
+ struct storedata sdata;
+ const struct annotate_st_entry *entries;
++ struct annotate_st_entry * working_entry;
+ time_t now = time(0);
+
+ memset(&sdata, 0, sizeof(struct storedata));
+@@ -1700,37 +1706,55 @@
+ while (e) {
+ int entrycount, attribs;
+ struct annotate_st_entry_list *nentry = NULL;
++ struct annotate_st_entry *ientry = NULL;
+
+ /* See if we support this entry */
++ working_entry = NULL;
+ for (entrycount = 0;
+ entries[entrycount].name;
+ entrycount++) {
+ if (!strcmp(e->entry, entries[entrycount].name)) {
++ working_entry = &(entries[entrycount]);
+ break;
+ }
+ }
+- if (!entries[entrycount].name) {
+- /* unknown annotation */
+- return IMAP_PERMISSION_DENIED;
++ if (working_entry==NULL) {
++ /* test for generic vendor annotation */
++ if ((strncmp("/vendor/", e->entry, strlen("/vendor/"))==0) &&
++ (strlen(e->entry)>strlen("/vendor/"))) {
++ working_entry = &(vendor_entry);
++ }
++ else {
++ /* unknown annotation */
++ return IMAP_PERMISSION_DENIED;
++ }
+ }
+
+ /* Add this entry to our list only if it
+ applies to our particular server type */
+- if (entries[entrycount].proxytype == PROXY_AND_BACKEND
++ if (working_entry->proxytype == PROXY_AND_BACKEND
+ || (proxy_store_func &&
+- entries[entrycount].proxytype == PROXY_ONLY)
++ working_entry->proxytype == PROXY_ONLY)
+ || (!proxy_store_func &&
+- entries[entrycount].proxytype == BACKEND_ONLY)) {
++ working_entry->proxytype == BACKEND_ONLY)) {
++ ientry = xzmalloc(sizeof(struct annotate_st_entry));
++ ientry->name = e->entry;
++ ientry->type = working_entry->type;
++ ientry->proxytype = working_entry->proxytype;
++ ientry->attribs = working_entry->attribs;
++ ientry->acl = working_entry->acl;
++ ientry->set = working_entry->set;
++ ientry->rock = working_entry->rock;
+ nentry = xzmalloc(sizeof(struct annotate_st_entry_list));
+ nentry->next = sdata.entry_list;
+- nentry->entry = &(entries[entrycount]);
++ nentry->entry = ientry;
+ nentry->shared.modifiedsince = now;
+ nentry->priv.modifiedsince = now;
+ sdata.entry_list = nentry;
+ }
+
+ /* See if we are allowed to set the given attributes. */
+- attribs = entries[entrycount].attribs;
++ attribs = working_entry->attribs;
+ av = e->attvalues;
+ while (av) {
+ const char *value;
+@@ -1740,7 +1764,7 @@
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+- entries[entrycount].type);
++ working_entry->type);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+@@ -1766,7 +1790,7 @@
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+- entries[entrycount].type);
++ working_entry->type);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+@@ -1868,6 +1892,12 @@
+ /* Free the entry list */
+ while (sdata.entry_list) {
+ struct annotate_st_entry_list *freeme = sdata.entry_list;
++ if (freeme != NULL){
++ struct annotate_st_entry *freeme2 = freeme->entry;
++ if (freeme2 != NULL) {
++ free( freeme2 );
++ }
++ }
+ sdata.entry_list = sdata.entry_list->next;
+ free(freeme);
+ }
+diff -urNad cyrus22-imapd-2.2.12/perl/imap/IMAP/Admin.pm /tmp/dpep.AQbIR0/cyrus22-imapd-2.2.12/perl/imap/IMAP/Admin.pm
+--- cyrus22-imapd-2.2.12/perl/imap/IMAP/Admin.pm 2005-03-12 23:09:22.000000000 +0100
++++ /tmp/dpep.AQbIR0/cyrus22-imapd-2.2.12/perl/imap/IMAP/Admin.pm 2005-06-30 13:16:29.270725801 +0200
+@@ -784,15 +784,19 @@
+ "news2mail" => "/vendor/cmu/cyrus-imapd/news2mail",
+ "expire" => "/vendor/cmu/cyrus-imapd/expire",
+ "sieve" => "/vendor/cmu/cyrus-imapd/sieve",
+- "squat" => "/vendor/cmu/cyrus-imapd/squat" );
++ "squat" => "/vendor/cmu/cyrus-imapd/squat",
++ "folder-type" => "/vendor/kolab/folder-type",
++ "h-share-uid" => "/vendor/kolab/h-share-uid" );
+
+ if(!$self->{support_annotatemore}) {
+ $self->{error} = "Remote does not support ANNOTATEMORE.";
+ return undef;
+ }
+
+- if(!exists($values{$entry})) {
+- $self->{error} = "Unknown parameter $entry";
++ if(exists($values{$entry})) {
++ $entry = $values{$entry};
++ } else {
++ $self->{error} = "Unknown parameter $entry" unless substr($entry,0,1) eq "/";
+ }
+
+ $entry = $values{$entry};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/61-64bit-quota.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/61-64bit-quota.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/61-64bit-quota.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/61-64bit-quota.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,669 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 60-64bit-quota.dpatch by Ondrej Sury <ondrej at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add support for 64-bit quotas
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2/configure.in /tmp/dpep.9eBPYl/cyrus-imapd-2.2/configure.in
+--- cyrus-imapd-2.2/configure.in 2006-03-31 22:23:11.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/configure.in 2006-03-31 22:23:20.307966043 +0200
+@@ -107,6 +107,15 @@
+ dnl fi
+ AC_C_INLINE
+
++dnl Check if `long long int' is available
++AC_CHECK_SIZEOF(long long int)
++AC_CHECK_SIZEOF(unsigned long long int)
++if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \
++ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then
++ AC_DEFINE(HAVE_LONG_LONG_INT,[],[Does the compiler support long long int?])
++ AC_C_BIGENDIAN
++fi
++
+ CMU_C___ATTRIBUTE__
+ CMU_C_FPIC
+
+diff -urNad cyrus-imapd-2.2/imap/append.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/append.c
+--- cyrus-imapd-2.2/imap/append.c 2006-03-31 20:11:45.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/append.c 2006-03-31 22:23:20.308965945 +0200
+@@ -140,7 +140,7 @@
+ if (!r) {
+ if (m.quota.limit >= 0 && quotacheck >= 0 &&
+ m.quota.used + quotacheck >
+- ((unsigned) m.quota.limit * QUOTA_UNITS)) {
++ ((uquota_t) m.quota.limit * QUOTA_UNITS)) {
+ r = IMAP_QUOTA_EXCEEDED;
+ }
+ }
+@@ -208,7 +208,7 @@
+ if (!r) {
+ if (as->m.quota.limit >= 0 && quotacheck >= 0 &&
+ as->m.quota.used + quotacheck >
+- ((unsigned) as->m.quota.limit * QUOTA_UNITS)) {
++ ((uquota_t) as->m.quota.limit * QUOTA_UNITS)) {
+ quota_abort(&as->tid);
+ mailbox_close(&as->m);
+ r = IMAP_QUOTA_EXCEEDED;
+diff -urNad cyrus-imapd-2.2/imap/imapd.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/imapd.c
+--- cyrus-imapd-2.2/imap/imapd.c 2006-03-31 22:23:12.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/imapd.c 2006-03-31 22:23:20.311965650 +0200
+@@ -2659,10 +2659,10 @@
+ */
+ int warnsize = config_getint(IMAPOPT_QUOTAWARNKB);
+ if (warnsize <= 0 || warnsize >= imapd_mailbox->quota.limit ||
+- (int)((imapd_mailbox->quota.limit * QUOTA_UNITS) -
+- imapd_mailbox->quota.used) < (warnsize * QUOTA_UNITS)) {
++ ((uquota_t) (imapd_mailbox->quota.limit - warnsize)) * QUOTA_UNITS <
++ imapd_mailbox->quota.used) {
+ usage = ((double) imapd_mailbox->quota.used * 100.0) / (double)
+- (imapd_mailbox->quota.limit * QUOTA_UNITS);
++ ((uquota_t) imapd_mailbox->quota.limit * QUOTA_UNITS);
+ if (usage >= 100.0) {
+ prot_printf(imapd_out, "* NO [ALERT] %s\r\n",
+ error_message(IMAP_NO_OVERQUOTA));
+@@ -4660,7 +4660,7 @@
+ printastring(name);
+ prot_printf(imapd_out, " (");
+ if (quota.limit >= 0) {
+- prot_printf(imapd_out, "STORAGE %lu %d",
++ prot_printf(imapd_out, "STORAGE " UQUOTA_T_FMT " %d",
+ quota.used/QUOTA_UNITS, quota.limit);
+ }
+ prot_printf(imapd_out, ")\r\n");
+@@ -4722,7 +4722,7 @@
+ printastring(mailboxname);
+ prot_printf(imapd_out, " (");
+ if (mailbox.quota.limit >= 0) {
+- prot_printf(imapd_out, "STORAGE %lu %d",
++ prot_printf(imapd_out, "STORAGE " UQUOTA_T_FMT " %d",
+ mailbox.quota.used/QUOTA_UNITS,
+ mailbox.quota.limit);
+ }
+diff -urNad cyrus-imapd-2.2/imap/mailbox.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mailbox.c
+--- cyrus-imapd-2.2/imap/mailbox.c 2006-03-31 20:11:45.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mailbox.c 2006-03-31 22:23:20.313965453 +0200
+@@ -84,6 +84,7 @@
+ #include "seen.h"
+ #include "util.h"
+ #include "xmalloc.h"
++#include "byteorder64.h"
+
+ static int mailbox_doing_reconstruct = 0;
+ #define zeromailbox(m) { memset(&m, 0, sizeof(struct mailbox)); \
+@@ -788,6 +789,13 @@
+ mailbox->last_uid =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_LAST_UID)));
+
++#ifdef HAVE_LONG_LONG_INT
++ if (mailbox->minor_version > 5) {
++ /* newer versions may use 64bit quotas now */
++ mailbox->quota_mailbox_used =
++ ntohll(*((bit64 *)(mailbox->index_base+OFFSET_QUOTA_MAILBOX_USED64)));
++ } else
++#endif
+ mailbox->quota_mailbox_used =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_QUOTA_MAILBOX_USED-quota_upgrade_offset)));
+
+@@ -1183,9 +1191,18 @@
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(mailbox->exists);
+ *((bit32 *)(buf+OFFSET_LAST_APPENDDATE)) = htonl(mailbox->last_appenddate);
+ *((bit32 *)(buf+OFFSET_LAST_UID)) = htonl(mailbox->last_uid);
+- *((bit32 *)(buf+OFFSET_QUOTA_RESERVED_FIELD)) = htonl(0); /* RESERVED */
++
++ /* quotas may be 64bit now */
++#ifdef HAVE_LONG_LONG_INT
++ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) =
++ htonll(mailbox->quota_mailbox_used);
++#else
++ /* zero the unused 32bits */
++ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0)
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) =
+ htonl(mailbox->quota_mailbox_used);
++#endif
++
+ *((bit32 *)(buf+OFFSET_POP3_LAST_LOGIN)) = htonl(mailbox->pop3_last_login);
+ *((bit32 *)(buf+OFFSET_UIDVALIDITY)) = htonl(mailbox->uidvalidity);
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(mailbox->deleted);
+@@ -1430,9 +1447,18 @@
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(mailbox->exists);
+ *((bit32 *)(buf+OFFSET_LAST_APPENDDATE)) = htonl(mailbox->last_appenddate);
+ *((bit32 *)(buf+OFFSET_LAST_UID)) = htonl(mailbox->last_uid);
+- /* OFFSET_QUOTA_RESERVED_FIELD left as zero */
++
++ /* newer versions may use 64bit quotas */
++#ifdef HAVE_LONG_LONG_INT
++ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) =
++ htonll(mailbox->quota_mailbox_used);
++#else
++ /* zero the unused 32bits */
++ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) =
+ htonl(mailbox->quota_mailbox_used);
++#endif
++
+ *((bit32 *)(buf+OFFSET_POP3_LAST_LOGIN)) = htonl(mailbox->pop3_last_login);
+ *((bit32 *)(buf+OFFSET_UIDVALIDITY)) = htonl(mailbox->uidvalidity);
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(mailbox->deleted);
+@@ -1608,7 +1634,8 @@
+ size_t fnamebuf_len;
+ FILE *newindex = NULL, *newcache = NULL;
+ unsigned long *deleted;
+- unsigned numdeleted = 0, quotadeleted = 0;
++ unsigned numdeleted = 0;
++ uquota_t quotadeleted = 0;
+ unsigned numansweredflag = 0;
+ unsigned numdeletedflag = 0;
+ unsigned numflaggedflag = 0;
+@@ -1835,8 +1862,13 @@
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(newflagged);
+
+ /* Fix up quota_mailbox_used */
++#ifdef HAVE_LONG_LONG_INT
++ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) =
++ htonll(ntohll(*((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)))-quotadeleted);
++#else
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) =
+ htonl(ntohl(*((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)))-quotadeleted);
++#endif
+ /* Fix up start offset if necessary */
+ if (mailbox->start_offset < INDEX_HEADER_SIZE) {
+ *((bit32 *)(buf+OFFSET_START_OFFSET)) = htonl(INDEX_HEADER_SIZE);
+@@ -1868,7 +1900,7 @@
+ if (!r) quota_commit(&tid);
+ else {
+ syslog(LOG_ERR,
+- "LOSTQUOTA: unable to record free of %u bytes in quota %s",
++ "LOSTQUOTA: unable to record free of " UQUOTA_T_FMT " bytes in quota %s",
+ quotadeleted, mailbox->quota.root);
+ }
+ }
+@@ -2138,7 +2170,7 @@
+ r = quota_write(&mailbox->quota, &tid);
+ if (r) {
+ syslog(LOG_ERR,
+- "LOSTQUOTA: unable to record free of %lu bytes in quota %s",
++ "LOSTQUOTA: unable to record free of " UQUOTA_T_FMT " bytes in quota %s",
+ mailbox->quota_mailbox_used, mailbox->quota.root);
+ }
+ else
+@@ -2256,7 +2288,7 @@
+ strcmp(oldmailbox->quota.root, newmailbox->quota.root) != 0) {
+ if (!r && newmailbox->quota.limit >= 0 &&
+ newmailbox->quota.used + oldmailbox->quota_mailbox_used >
+- ((unsigned) newmailbox->quota.limit * QUOTA_UNITS)) {
++ ((uquota_t) newmailbox->quota.limit * QUOTA_UNITS)) {
+ r = IMAP_QUOTA_EXCEEDED;
+ }
+ }
+@@ -2470,7 +2502,7 @@
+ strcmp(oldmailbox.quota.root, newmailbox.quota.root) != 0) {
+ if (!r && newmailbox.quota.limit >= 0 &&
+ newmailbox.quota.used + oldmailbox.quota_mailbox_used >
+- ((unsigned) newmailbox.quota.limit * QUOTA_UNITS)) {
++ ((uquota_t) newmailbox.quota.limit * QUOTA_UNITS)) {
+ r = IMAP_QUOTA_EXCEEDED;
+ }
+ }
+@@ -2623,7 +2655,7 @@
+ else if (r2 == IMAP_QUOTAROOT_NONEXISTENT) r2 = 0;
+ if (r2) {
+ syslog(LOG_ERR,
+- "LOSTQUOTA: unable to record use of %lu bytes in quota %s",
++ "LOSTQUOTA: unable to record use of " UQUOTA_T_FMT " bytes in quota %s",
+ newmailbox.quota_mailbox_used, newmailbox.quota.root);
+ }
+ }
+diff -urNad cyrus-imapd-2.2/imap/mailbox.h /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mailbox.h
+--- cyrus-imapd-2.2/imap/mailbox.h 2006-03-31 18:52:05.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mailbox.h 2006-03-31 22:23:20.313965453 +0200
+@@ -45,6 +45,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <limits.h>
++#include <config.h>
+
+ #include "auth.h"
+ #include "quota.h"
+@@ -61,6 +62,10 @@
+ #error dont know what to use for bit32
+ #endif
+
++#ifdef HAVE_LONG_LONG_INT
++typedef unsigned long long int bit64;
++#endif
++
+ #define MAX_MAILBOX_NAME 490
+ #define MAX_MAILBOX_PATH 4096
+
+@@ -126,7 +131,7 @@
+ unsigned long exists;
+ time_t last_appenddate;
+ unsigned long last_uid;
+- unsigned long quota_mailbox_used;
++ uquota_t quota_mailbox_used;
+ unsigned long pop3_last_login;
+ unsigned long uidvalidity;
+
+@@ -168,8 +173,8 @@
+ #define OFFSET_EXISTS 20
+ #define OFFSET_LAST_APPENDDATE 24
+ #define OFFSET_LAST_UID 28
+-#define OFFSET_QUOTA_RESERVED_FIELD 32 /* Reserved for 64bit quotas */
+-#define OFFSET_QUOTA_MAILBOX_USED 36
++#define OFFSET_QUOTA_MAILBOX_USED64 32 /* offset for 64bit quotas */
++#define OFFSET_QUOTA_MAILBOX_USED 36 /* offset for 32bit quotas */
+ #define OFFSET_POP3_LAST_LOGIN 40
+ #define OFFSET_UIDVALIDITY 44
+ #define OFFSET_DELETED 48 /* added for ACAP */
+diff -urNad cyrus-imapd-2.2/imap/mbdump.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mbdump.c
+--- cyrus-imapd-2.2/imap/mbdump.c 2006-03-31 22:23:12.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mbdump.c 2006-03-31 22:23:20.314965354 +0200
+@@ -507,7 +507,7 @@
+ {
+ struct buf file, data;
+ char c;
+- int quotaused = 0;
++ uquota_t quotaused = 0;
+ int r = 0;
+ int curfile = -1;
+ const char *userid = NULL;
+diff -urNad cyrus-imapd-2.2/imap/mbexamine.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mbexamine.c
+--- cyrus-imapd-2.2/imap/mbexamine.c 2006-03-31 18:52:05.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mbexamine.c 2006-03-31 22:23:20.314965354 +0200
+@@ -266,7 +266,7 @@
+ printf(" Minor Version: %d\n", mailbox.minor_version);
+ printf(" Header Size: %ld bytes Record Size: %ld bytes\n",
+ mailbox.start_offset, mailbox.record_size);
+- printf(" Number of Messages: %lu Mailbox Size: %lu bytes\n",
++ printf(" Number of Messages: %lu Mailbox Size: " UQUOTA_T_FMT " bytes\n",
+ mailbox.exists, mailbox.quota_mailbox_used);
+ printf(" Last Append Date: (%ld) %s", mailbox.last_appenddate,
+ ctime(&mailbox.last_appenddate));
+diff -urNad cyrus-imapd-2.2/imap/mboxlist.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mboxlist.c
+--- cyrus-imapd-2.2/imap/mboxlist.c 2006-03-31 20:11:45.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/mboxlist.c 2006-03-31 22:23:20.316965158 +0200
+@@ -2540,7 +2540,7 @@
+ r = quota_write(&mailbox.quota, tid);
+ if (r) {
+ syslog(LOG_ERR,
+- "LOSTQUOTA: unable to record free of %lu bytes in quota %s",
++ "LOSTQUOTA: unable to record free of " UQUOTA_T_FMT " bytes in quota %s",
+ mailbox.quota_mailbox_used, mailbox.quota.root);
+ }
+ free(mailbox.quota.root);
+diff -urNad cyrus-imapd-2.2/imap/quota.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/quota.c
+--- cyrus-imapd-2.2/imap/quota.c 2006-03-31 22:23:11.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/quota.c 2006-03-31 22:23:20.316965158 +0200
+@@ -107,7 +107,7 @@
+ struct quota quota;
+ int refcount;
+ int deleted;
+- unsigned long newused;
++ uquota_t newused;
+ };
+
+ /* forward declarations */
+@@ -473,7 +473,7 @@
+ (*count)++;
+ }
+ if (quota[thisquota].quota.used != quota[thisquota].newused) {
+- printf("%s: usage was %lu, now %lu\n", quota[thisquota].quota.root,
++ printf("%s: usage was " UQUOTA_T_FMT ", now " UQUOTA_T_FMT "\n", quota[thisquota].quota.root,
+ quota[thisquota].quota.used, quota[thisquota].newused);
+ quota[thisquota].quota.used = quota[thisquota].newused;
+ r = quota_write("a[thisquota].quota, tid);
+@@ -539,12 +539,12 @@
+ int i;
+ char buf[MAX_MAILBOX_PATH+1];
+
+- printf(" Quota %% Used Used Root\n");
++ printf(" Quota %% Used Used Root\n");
+
+ for (i = 0; i < quota_num; i++) {
+ if (quota[i].deleted) continue;
+ if (quota[i].quota.limit > 0) {
+- printf(" %7d %7ld", quota[i].quota.limit,
++ printf(" %7d " QUOTA_REPORT_FMT , quota[i].quota.limit,
+ ((quota[i].quota.used / QUOTA_UNITS) * 100) / quota[i].quota.limit);
+ }
+ else if (quota[i].quota.limit == 0) {
+@@ -557,6 +557,6 @@
+ (*quota_namespace.mboxname_toexternal)("a_namespace,
+ quota[i].quota.root,
+ "cyrus", buf);
+- printf(" %7ld %s\n", quota[i].quota.used / QUOTA_UNITS, buf);
++ printf(" " QUOTA_REPORT_FMT " %s\n", quota[i].quota.used / QUOTA_UNITS, buf);
+ }
+ }
+diff -urNad cyrus-imapd-2.2/imap/quota.h /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/quota.h
+--- cyrus-imapd-2.2/imap/quota.h 2006-03-31 18:52:05.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/quota.h 2006-03-31 22:23:20.317965059 +0200
+@@ -45,18 +45,37 @@
+ #define INCLUDED_QUOTA_H
+
+ #include "cyrusdb.h"
++#include <config.h>
+
+ #define FNAME_QUOTADB "/quotas.db"
+
+ #define QUOTA_UNITS (1024)
+
++/* Define the proper quota type, it should either be a
++ * long or a long long int depending upon what the
++ * the compiler supports.
++ */
++#ifdef HAVE_LONG_LONG_INT
++typedef unsigned long long int uquota_t;
++typedef long long int quota_t;
++#define UQUOTA_T_FMT "%llu"
++#define QUOTA_T_FMT "%lld"
++#define QUOTA_REPORT_FMT "%8llu"
++#else
++typedef unsigned long uquota_t;
++typedef long quota_t;
++#define UQUOTA_T_FMT "%lu"
++#define QUOTA_T_FMT "%ld"
++#define QUOTA_REPORT_FMT "%8lu"
++#endif
++
+ extern struct db *qdb;
+
+ struct quota {
+ char *root;
+
+ /* Information in quota entry */
+- unsigned long used;
++ uquota_t used;
+ int limit; /* in QUOTA_UNITS */
+ };
+
+diff -urNad cyrus-imapd-2.2/imap/quota_db.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/quota_db.c
+--- cyrus-imapd-2.2/imap/quota_db.c 2006-03-31 18:52:05.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/quota_db.c 2006-03-31 22:23:20.317965059 +0200
+@@ -89,7 +89,7 @@
+
+ switch (r) {
+ case CYRUSDB_OK:
+- sscanf(data, "%lu %d", "a->used, "a->limit);
++ sscanf(data, UQUOTA_T_FMT " %d", "a->used, "a->limit);
+ break;
+
+ case CYRUSDB_AGAIN:
+@@ -151,7 +151,7 @@
+ if (!qrlen) return IMAP_QUOTAROOT_NONEXISTENT;
+
+ len = snprintf(buf, sizeof(buf) - 1,
+- "%lu %d", quota->used, quota->limit);
++ UQUOTA_T_FMT " %d", quota->used, quota->limit);
+ r = QDB->store(qdb, quota->root, qrlen, buf, len, tid);
+
+ switch (r) {
+diff -urNad cyrus-imapd-2.2/imap/reconstruct.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/reconstruct.c
+--- cyrus-imapd-2.2/imap/reconstruct.c 2006-03-31 22:23:11.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/imap/reconstruct.c 2006-03-31 22:23:20.318964961 +0200
+@@ -93,6 +93,7 @@
+ #include "retry.h"
+ #include "convert_code.h"
+ #include "util.h"
++#include "byteorder64.h"
+
+ extern int optind;
+ extern char *optarg;
+@@ -434,7 +435,7 @@
+ char *list_acl, *list_part;
+ int list_type;
+
+- unsigned long new_quota = 0;
++ uquota_t new_quota = 0;
+
+ struct index_record message_index, old_index;
+ static struct index_record zero_index;
+@@ -690,7 +691,14 @@
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(new_exists);
+ *((bit32 *)(buf+OFFSET_LAST_APPENDDATE)) = htonl(mailbox.last_appenddate);
+ *((bit32 *)(buf+OFFSET_LAST_UID)) = htonl(mailbox.last_uid);
+- *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) = htonl(new_quota);
++
++ /* quotas may be 64bit now */
++#ifdef HAVE_LONG_LONG_INT
++ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonll(new_quota);
++#else
++ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED32)) = htonl(new_quota);
++#endif
++
+ *((bit32 *)(buf+OFFSET_POP3_LAST_LOGIN)) = htonl(mailbox.pop3_last_login);
+ *((bit32 *)(buf+OFFSET_UIDVALIDITY)) = htonl(mailbox.uidvalidity);
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(new_deleted);
+diff -urNad cyrus-imapd-2.2/lib/Makefile.in /tmp/dpep.9eBPYl/cyrus-imapd-2.2/lib/Makefile.in
+--- cyrus-imapd-2.2/lib/Makefile.in 2006-03-31 22:23:11.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/lib/Makefile.in 2006-03-31 22:23:20.318964961 +0200
+@@ -85,7 +85,7 @@
+ $(srcdir)/lsort.h $(srcdir)/stristr.h \
+ $(srcdir)/util.h $(srcdir)/xstrlcpy.h $(srcdir)/xstrlcat.h $(srcdir)/xmalloc.h $(srcdir)/imapurl.h \
+ $(srcdir)/cyrusdb.h $(srcdir)/iptostring.h $(srcdir)/rfc822date.h \
+- $(srcdir)/libcyr_cfg.h
++ $(srcdir)/libcyr_cfg.h $(srcdir)/byteorder64.h
+
+ LIBCYR_OBJS = acl.o bsearch.o charset.o glob.o retry.o util.o \
+ libcyr_cfg.o mkgmtime.o prot.o parseaddr.o imclient.o imparse.o \
+@@ -93,7 +93,7 @@
+ chartable.o imapurl.o nonblock_ at WITH_NONBLOCK@.o lock_ at WITH_LOCK@.o \
+ gmtoff_ at WITH_GMTOFF@.o map_ at WITH_MAP@.o $(ACL) $(AUTH) \
+ @LIBOBJS@ @CYRUSDB_OBJS@ \
+- iptostring.o xstrlcpy.o xstrlcat.o xmalloc.o wildmat.o
++ iptostring.o xstrlcpy.o xstrlcat.o xmalloc.o wildmat.o byteorder64.o
+
+ LIBCYRM_HDRS = $(srcdir)/hash.h $(srcdir)/mpool.h $(srcdir)/xstrlcpy.h $(srcdir)/xstrlcat.h $(srcdir)/xmalloc.h \
+ $(srcdir)/strhash.o $(srcdir)/libconfig.h \
+diff -urNad cyrus-imapd-2.2/lib/byteorder64.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/lib/byteorder64.c
+--- cyrus-imapd-2.2/lib/byteorder64.c 1970-01-01 01:00:00.000000000 +0100
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/lib/byteorder64.c 2006-03-31 22:23:20.318964961 +0200
+@@ -0,0 +1,95 @@
++/* byteorder64.c -- convert 64-bit values between host and network byte order
++ *
++ * Copyright (c) 2004 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
++ * endorse or promote products derived from this software without
++ * prior written permission. For permission or any other legal
++ * details, please contact
++ * Office of Technology Transfer
++ * Carnegie Mellon University
++ * 5000 Forbes Avenue
++ * Pittsburgh, PA 15213-3890
++ * (412) 268-4387, fax: (412) 268-7395
++ * tech-transfer at andrew.cmu.edu
++ *
++ * 4. Redistributions of any form whatsoever must retain the following
++ * acknowledgment:
++ * "This product includes software developed by Computing Services
++ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
++ *
++ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
++ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
++ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
++ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ *
++ * $Id: byteorder64.c,v 1.1.2.1 2004/08/09 18:51:21 ken3 Exp $
++ */
++
++#include <config.h>
++
++#if defined(HAVE_LONG_LONG_INT) && !defined(WORDS_BIGENDIAN)
++
++#include <netinet/in.h>
++
++/* Structure used to swap the bytes in a 64-bit unsigned long long. */
++union byteswap_64_u {
++ unsigned long long a;
++ uint32_t b[2];
++};
++
++/* Function to byteswap 64bit unsigned integers on
++ * little endian machines to big endian network order.
++ * On big endian machines this will be a null macro.
++ * The macro htonll() is defined in byteorder64.h,
++ * and if needed refers to _htonll() here.
++ */
++unsigned long long _htonll(unsigned long long x)
++{
++ union byteswap_64_u u1;
++ union byteswap_64_u u2;
++
++ u1.a = x;
++
++ u2.b[0] = htonl(u1.b[1]);
++ u2.b[1] = htonl(u1.b[0]);
++
++ return u2.a;
++}
++
++
++/* Function to byteswap big endian 64bit unsigned integers
++ * back to little endian host order on little endian machines.
++ * As above, on big endian machines this will be a null macro.
++ * The macro ntohll() is defined in byteorder64.h, and if needed,
++ * refers to _ntohll() here.
++ */
++unsigned long long _ntohll(unsigned long long x)
++{
++ union byteswap_64_u u1;
++ union byteswap_64_u u2;
++
++ u1.a = x;
++
++ u2.b[1] = ntohl(u1.b[0]);
++ u2.b[0] = ntohl(u1.b[1]);
++
++ return u2.a;
++}
++
++#endif /* defined(HAVE_LONG_LONG_INT) && !defined(WORDS_BIGENDIAN) */
+diff -urNad cyrus-imapd-2.2/lib/byteorder64.h /tmp/dpep.9eBPYl/cyrus-imapd-2.2/lib/byteorder64.h
+--- cyrus-imapd-2.2/lib/byteorder64.h 1970-01-01 01:00:00.000000000 +0100
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/lib/byteorder64.h 2006-03-31 22:23:20.319964862 +0200
+@@ -0,0 +1,65 @@
++/* byteorder64.h -- convert 64-bit values between host and network byte order
++ *
++ * Copyright (c) 2004 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
++ * endorse or promote products derived from this software without
++ * prior written permission. For permission or any other legal
++ * details, please contact
++ * Office of Technology Transfer
++ * Carnegie Mellon University
++ * 5000 Forbes Avenue
++ * Pittsburgh, PA 15213-3890
++ * (412) 268-4387, fax: (412) 268-7395
++ * tech-transfer at andrew.cmu.edu
++ *
++ * 4. Redistributions of any form whatsoever must retain the following
++ * acknowledgment:
++ * "This product includes software developed by Computing Services
++ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
++ *
++ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
++ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
++ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
++ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ *
++ * $Id: byteorder64.h,v 1.1.2.2 2004/08/16 11:44:34 ken3 Exp $
++ */
++
++#ifndef _BYTEORDER64_H
++#define _BYTEORDER64_H
++
++#include <config.h>
++
++#ifdef HAVE_LONG_LONG_INT
++
++/* 64-bit host/network byte-order swap macros */
++#ifdef WORDS_BIGENDIAN
++#define htonll(x) (x)
++#define ntohll(x) (x)
++#else
++#define htonll(x) _htonll(x)
++#define ntohll(x) _ntohll(x)
++
++/* little-endian 64-bit host/network byte-order swap functions */
++extern unsigned long long _htonll(unsigned long long);
++extern unsigned long long _ntohll(unsigned long long);
++
++#endif /* WORDS_BIGENDIAN */
++#endif /* HAVE_LONG_LONG_INT */
++#endif /* _BYTEORDER64_H */
+diff -urNad cyrus-imapd-2.2/lib/prot.c /tmp/dpep.9eBPYl/cyrus-imapd-2.2/lib/prot.c
+--- cyrus-imapd-2.2/lib/prot.c 2006-03-31 18:52:04.000000000 +0200
++++ /tmp/dpep.9eBPYl/cyrus-imapd-2.2/lib/prot.c 2006-03-31 22:23:20.319964862 +0200
+@@ -871,6 +871,11 @@
+ char buf[30];
+ va_start(pvar, fmt);
+
++#ifdef HAVE_LONG_LONG_INT
++ long long int ll;
++ unsigned long long int ull;
++#endif
++
+ assert(s->write);
+
+ while ((percent = strchr(fmt, '%')) != 0) {
+@@ -894,6 +899,27 @@
+ prot_write(s, buf, strlen(buf));
+ break;
+
++#ifdef HAVE_LONG_LONG_INT
++ case 'l':
++ switch (*++percent) {
++ case 'd':
++ ll = va_arg(pvar, long long int);
++ snprintf(buf, sizeof(buf), "%lld", ll);
++ prot_write(s, buf, strlen(buf));
++ break;
++
++ case 'u':
++ ull = va_arg(pvar, unsigned long long int);
++ snprintf(buf, sizeof(buf), "%llu", ull);
++ prot_write(s, buf, strlen(buf));
++ break;
++
++ default:
++ abort();
++ }
++ break;
++#endif
++
+ default:
+ abort();
+ }
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/65-sieveshell-enhancements.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/65-sieveshell-enhancements.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/65-sieveshell-enhancements.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/65-sieveshell-enhancements.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,258 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 65-sieveshell-enhancements.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Adds some enhancements to sieveshell and fixes some paths.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3.7~/perl/imap/IMAP/Shell.pm cyrus-imapd-2.3.7/perl/imap/IMAP/Shell.pm
+--- cyrus-imapd-2.3.7~/perl/imap/IMAP/Shell.pm 2006-03-31 21:22:35.000000000 +0200
++++ cyrus-imapd-2.3.7/perl/imap/IMAP/Shell.pm 2006-08-11 12:29:13.000000000 +0200
+@@ -126,7 +126,7 @@
+ [\&_sc_info, '[mailbox]',
+ 'display mailbox/server metadata'],
+ mboxcfg =>
+- [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat] value',
++ [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value',
+ 'configure mailbox'],
+ mboxconfig => 'mboxcfg',
+ reconstruct =>
+@@ -438,7 +438,7 @@
+ sub shell {
+ my ($server, $port, $authz, $auth, $systemrc, $userrc, $dorc, $mech, $pw,
+ $tlskey, $notls) =
+- ('', 143, undef, $ENV{USER} || $ENV{LOGNAME}, '/usr/local/etc/cyradmrc.pl',
++ ('', 143, undef, $ENV{USER} || $ENV{LOGNAME}, '/etc/cyradmrc.pl',
+ "$ENV{HOME}/.cyradmrc.pl", 1, undef, undef, undef, undef);
+ GetOptions('user|u=s' => \$auth,
+ 'authz|z=s' => \$authz,
+@@ -471,7 +471,7 @@
+ $cyradm->authenticate(-authz => $authz, -user => $auth,
+ -mechanism => $mech, -password => $pw,
+ -tlskey => $tlskey, -notls => $notls)
+- or die "cyradm: cannot authenticate to server with $mech as $auth\n";
++ or die "cyradm: cannot authenticate to server" . (defined($mech)?" with $mech":"") . " as $auth\n";
+ }
+ my $fstk = [*STDIN, *STDOUT, *STDERR];
+ if ($dorc && $systemrc ne '' && -f $systemrc) {
+@@ -1424,7 +1424,7 @@
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+- die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat] value\n";
++ die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value\n";
+ }
+ else {
+ push(@nargv, $opt);
+@@ -1433,7 +1433,7 @@
+ }
+ push(@nargv, @argv);
+ if (@nargv < 2) {
+- die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat] value\n";
++ die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "mboxconfig: no connection to server\n";
+diff -urNad cyrus-imapd-2.3.7~/perl/sieve/lib/request.c cyrus-imapd-2.3.7/perl/sieve/lib/request.c
+--- cyrus-imapd-2.3.7~/perl/sieve/lib/request.c 2003-02-13 21:15:53.000000000 +0100
++++ cyrus-imapd-2.3.7/perl/sieve/lib/request.c 2006-08-11 12:15:13.000000000 +0200
+@@ -560,7 +560,6 @@
+ char **refer_to, char **errstrp)
+ {
+ int res;
+- mystring_t *str=NULL;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+ int ret = 0;
+diff -urNad cyrus-imapd-2.3.7~/perl/sieve/scripts/sieveshell.pl cyrus-imapd-2.3.7/perl/sieve/scripts/sieveshell.pl
+--- cyrus-imapd-2.3.7~/perl/sieve/scripts/sieveshell.pl 2006-08-11 12:15:13.000000000 +0200
++++ cyrus-imapd-2.3.7/perl/sieve/scripts/sieveshell.pl 2006-08-11 12:15:13.000000000 +0200
+@@ -60,7 +60,9 @@
+ my $username = $ENV{USER};
+ my $authname = $ENV{USER};
+ my $realm = "";
++my $password;
+ my $ex = "";
++my $exfile = "";
+ my $help = 0;
+ my $man = 0;
+ my $ret;
+@@ -68,7 +70,9 @@
+ GetOptions("a|authname:s" => \$authname,
+ "u|username:s" => \$username,
+ "r|realm:s" => \$realm,
++ "p|password:s" => \$password,
+ "e|exec:s" => \$ex,
++ "f|execfile:s" => \$exfile,
+ "help|?" => \$help,
+ man => \$man) or pod2usage(2);
+ pod2usage(1) if $help;
+@@ -83,20 +87,24 @@
+ my $filehandle;
+ my $interactive;
+
+-if (! $ex eq "") {
+- $filehandle = tempfile();
+-
+- if (!$filehandle) { die "unable to open tmp file: $?"; }
+-
+- print $filehandle $ex;
+- seek $filehandle, 0, 0; # rewind file
++if (! $exfile eq "") {
++ open(FILEH,"<$exfile") || die "unable to open file: $?";
++ $filehandle = *FILEH;
+ $interactive = 0;
+ } else {
+- $filehandle = *STDIN;
+- $interactive = 1;
+-}
++ if (! $ex eq "") {
++ $filehandle = tempfile();
+
++ if (!$filehandle) { die "unable to open tmp file: $?"; }
+
++ print $filehandle $ex;
++ seek $filehandle, 0, 0; # rewind file
++ $interactive = 0;
++ } else {
++ $filehandle = *STDIN;
++ $interactive = 1;
++ }
++}
+
+ sub list_cb {
+
+@@ -121,6 +129,8 @@
+ return $authname;
+ } elsif (($type eq "realm") && (defined $realm)) {
+ return $realm;
++ } elsif (($type eq "password") && (defined $password)) {
++ return $password;
+ }
+
+ my $ostty;
+@@ -171,6 +181,8 @@
+
+ my $term = Term::ReadLine->new("sieveshell");
+
++my $exitcode = 0;
++
+ $term->ornaments(0);
+
+ while(defined($_ = ($interactive ? $term->readline('> ') : <$filehandle>))){
+@@ -197,6 +209,9 @@
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "upload failed: $errstr\n";
++ $exitcode = 1;
++ } else {
++ $exitcode = 0;
+ }
+ } elsif (($words[0] eq "list") ||
+ ($words[0] eq "l") ||
+@@ -206,6 +221,9 @@
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "list failed: $errstr\n";
++ $exitcode = 1;
++ } else {
++ $exitcode = 0;
+ }
+ } elsif (($words[0] eq "activate") ||
+ ($words[0] eq "a")) {
+@@ -218,6 +236,9 @@
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "activate failed: $errstr\n";
++ $exitcode = 1;
++ } else {
++ $exitcode = 0;
+ }
+ } elsif (($words[0] eq "deactivate") ||
+ ($words[0] eq "da")) {
+@@ -230,6 +251,9 @@
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "deactivate failed: $errstr\n";
++ $exitcode = 1;
++ } else {
++ $exitcode = 0;
+ }
+ } elsif (($words[0] eq "delete") ||
+ ($words[0] eq "d")) {
+@@ -242,6 +266,9 @@
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "delete failed: $errstr\n";
++ $exitcode = 1;
++ } else {
++ $exitcode = 0;
+ }
+ } elsif (($words[0] eq "get") ||
+ ($words[0] eq "g")) {
+@@ -255,25 +282,32 @@
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "get failed: $errstr\n";
++ $exitcode = 1;
+ } else {
+ if ($words[2]) {
+ open (OUTPUT,">$words[2]") || die "Unable to open $words[2]";
+ print OUTPUT $str;
+ close(OUTPUT);
++ $exitcode = 0;
+ } else {
+ print $str;
++ $exitcode = 0;
+ }
+ }
+ } elsif (($words[0] eq "quit") || ($words[0] eq "q")) {
+ sieve_logout($obj);
+- exit 0;
++ exit $exitcode;
+ } elsif (($words[0] eq "help") || ($words[0] eq "?")) {
+ show_help();
++ $exitcode = 0;
+ } else {
+ print "Invalid command: $words[0]\n";
++ $exitcode = 1;
+ }
+ }
+
++exit $exitcode;
++
+ __END__
+
+ =head1 NAME
+@@ -283,7 +317,8 @@
+ =head1 SYNOPSIS
+
+ sieveshell [B<--user>=I<user>] [B<--authname>=I<authname>]
+-[B<--realm>=I<realm>] [B<--exec>=I<script>] I<server>[B<:>I<port>]
++[B<--realm>=I<realm>] [B<--password>=I<password>]
++[B<--exec>=I<script>] [B<--execfile>=I<file>] I<server>[B<:>I<port>]
+
+ sieveshell B<--help>
+
+@@ -327,11 +362,21 @@
+
+ The realm to attempt authentication in.
+
++=item B<-p> I<password>, B<--password>=I<password>
++
++The password to use when authenticating to server. Note that this
++parameter can be seen in the process list. B<Use with caution!>
++
+ =item B<-e> I<script>, B<--exec>=I<script>
+
+ Instead of working interactively, run commands from I<script>, and
+ exit when done.
+
++=item B<-f> I<file>, B<--execfile>=I<file>
++
++Instead of working interactively, run commands from file I<file> and
++exit when done.
++
+ =back
+
+ =head1 REFERENCES
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/70-allow-larger-buffers.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/70-allow-larger-buffers.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/70-allow-larger-buffers.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/70-allow-larger-buffers.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## allow-larger-buffers-dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch to allow larger buffers (especially for list of UIDs).
+## DP: Patch taken and "backported" to 2.2 from:
+## DP: http://cyrus.brong.fastmail.fm/patches/cyrus-longwords-2.3.3.diff
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/imapparse.c /tmp/dpep.n4kRMv/cyrus-imapd-2.2.13/imap/imapparse.c
+--- cyrus-imapd-2.2.13/imap/imapparse.c 2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.n4kRMv/cyrus-imapd-2.2.13/imap/imapparse.c 2006-05-24 14:33:42.733793569 +0200
+@@ -52,8 +52,8 @@
+ #include "exitcodes.h"
+
+ enum {
+- MAXQUOTED = 32768,
+- MAXWORD = 32768,
++ MAXQUOTED = 131072,
++ MAXWORD = 131072,
+ MAXLITERAL = INT_MAX / 20
+ };
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/72-faster-isdigit.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/72-faster-isdigit.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/72-faster-isdigit.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/72-faster-isdigit.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,145 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 72-faster-isdigit.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use a smaller (but less intelligent) isdigit() implementation,
+## DP: a simple range-check. Patch backported from:
+## DP: http://cyrus.brong.fastmail.fm/patches/cyrus-isdigit-2.3.3.diff
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3-2.3.7~/imap/index.c cyrus-imapd-2.3-2.3.7/imap/index.c
+--- cyrus-imapd-2.3-2.3.7~/imap/index.c 2006-08-14 16:23:07.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/imap/index.c 2006-08-14 16:23:07.000000000 +0200
+@@ -516,8 +516,8 @@
+ */
+ old = seenuids;
+ new = newseenuids;
+- while (isdigit((int) *old)) oldnext = oldnext * 10 + *old++ - '0';
+- while (isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
++ while (cyrus_isdigit((int) *old)) oldnext = oldnext * 10 + *old++ - '0';
++ while (cyrus_isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
+
+ for (msgno = 1; msgno <= imapd_exists; msgno++) {
+ uid = UID(msgno);
+@@ -531,7 +531,7 @@
+ oldnext = 0;
+ if (!*old) oldnext = mailbox->last_uid+1;
+ else old++;
+- while (isdigit((int) *old)) {
++ while (cyrus_isdigit((int) *old)) {
+ oldnext = oldnext * 10 + *old++ - '0';
+ }
+ oldnext += oldseen;
+@@ -550,7 +550,7 @@
+ neweof++;
+ }
+ else new++;
+- while (isdigit((int) *new)) {
++ while (cyrus_isdigit((int) *new)) {
+ newnext = newnext * 10 + *new++ - '0';
+ }
+ newnext += newseen;
+@@ -682,7 +682,7 @@
+ neweof++;
+ }
+ else new++;
+- while (isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
++ while (cyrus_isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
+ newnext += newseen;
+ }
+ }
+@@ -700,7 +700,7 @@
+ /* There's a ":M" after the ",N". Parse/include that too. */
+ new++;
+ newnext = 0;
+- while (isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
++ while (cyrus_isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
+ }
+ uid = newnext;
+ newseen++; /* Forget we parsed ",N" */
+@@ -1683,7 +1683,7 @@
+ }
+
+ for (;;) {
+- if (isdigit((int) *sequence)) {
++ if (cyrus_isdigit((int) *sequence)) {
+ start = start*10 + *sequence - '0';
+ }
+ else if (*sequence == '*') {
+@@ -1692,7 +1692,7 @@
+ else if (*sequence == ':') {
+ end = 0;
+ sequence++;
+- while (isdigit((int) *sequence)) {
++ while (cyrus_isdigit((int) *sequence)) {
+ end = end*10 + *sequence++ - '0';
+ }
+ if (*sequence == '*') {
+@@ -1750,7 +1750,7 @@
+ unsigned i, start = 0, end;
+
+ for (;;) {
+- if (isdigit((int) *sequence)) {
++ if (cyrus_isdigit((int) *sequence)) {
+ start = start*10 + *sequence - '0';
+ }
+ else if (*sequence == '*') {
+@@ -1760,7 +1760,7 @@
+ else if (*sequence == ':') {
+ end = 0;
+ sequence++;
+- while (isdigit((int) *sequence)) {
++ while (cyrus_isdigit((int) *sequence)) {
+ end = end*10 + *sequence++ - '0';
+ }
+ if (*sequence == '*') {
+@@ -1885,7 +1885,7 @@
+ while (*p != ']' && *p != 'M') {
+ /* Generate the actual part number */
+ skip = 0;
+- while (isdigit((int) *p)) {
++ while (cyrus_isdigit((int) *p)) {
+ skip = skip * 10 + *p++ - '0';
+ /* xxx overflow */
+ }
+@@ -2014,7 +2014,7 @@
+
+ while (*p != 'H') {
+ skip = 0;
+- while (isdigit((int) *p)) {
++ while (cyrus_isdigit((int) *p)) {
+ skip = skip * 10 + *p++ - '0';
+ /* xxx overflow */
+ }
+@@ -3751,7 +3751,7 @@
+ case '{': /* literal */
+ c++; /* skip open brace */
+ len = 0; /* determine length of literal */
+- while (isdigit((int) *c)) {
++ while (cyrus_isdigit((int) *c)) {
+ len = len*10 + *c - '0';
+ c++;
+ }
+@@ -3905,7 +3905,7 @@
+ break;
+ /* if we have a digit, and we're still
+ counting, keep building the count */
+- } else if (isdigit((int) *x) && count != -1) {
++ } else if (cyrus_isdigit((int) *x) && count != -1) {
+ count = count * 10 + *x - '0';
+ if (count < 0) { /* overflow */
+ count = -1; /* abort counting */
+diff -urNad cyrus-imapd-2.3-2.3.7~/lib/util.h cyrus-imapd-2.3-2.3.7/lib/util.h
+--- cyrus-imapd-2.3-2.3.7~/lib/util.h 2004-09-10 15:51:12.000000000 +0200
++++ cyrus-imapd-2.3-2.3.7/lib/util.h 2006-08-14 16:23:07.000000000 +0200
+@@ -107,4 +107,10 @@
+ */
+ extern int cyrus_mkdir(const char *path, mode_t mode);
+
++/* Some systems have very inefficient implementations of isdigit,
++ * and we use it in a lot of inner loops
++ */
++
++#define cyrus_isdigit(x) ((x) >= '0' && (x) <= '9')
++
+ #endif /* INCLUDED_UTIL_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/75-update-imapd.conf-documentation.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/75-update-imapd.conf-documentation.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/75-update-imapd.conf-documentation.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/75-update-imapd.conf-documentation.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fileV0WscV.dpatch by Sven Mueller <sven at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3.7~/lib/imapoptions cyrus-imapd-2.3.7/lib/imapoptions
+--- cyrus-imapd-2.3.7~/lib/imapoptions 2006-08-11 12:31:09.000000000 +0200
++++ cyrus-imapd-2.3.7/lib/imapoptions 2006-08-11 12:31:10.000000000 +0200
+@@ -69,7 +69,10 @@
+ \fB/etc/imapd.conf\fR file, and show each option's default value.
+ Some options have no default value, these are listed with
+ ``<no default>''. Some options default to the empty string, these
+-are listed with ``<none>''.
++are listed with ``<none>''. It is also possible to override options by
++specifying them as <service_id>_<optionname>. One example is ``lmtp_admins'',
++which overrides ``admins'' just for the lmtp service. The <service_id> is the
++one you specified in the \fB/etc/cyrus.conf\fR file.
+ */
+
+ # OPTIONS
+@@ -122,7 +125,17 @@
+ enabled when absolutely necessary. */
+
+ { "allowplaintext", 1, SWITCH }
+-/* Allow the use of cleartext passwords on the wire. */
++/* Allow the use of cleartext passwords on the wire.
++.PP
++ To disallow the use of plaintext passwords for authentication, you can
++ set ``allowplaintext: no'' in imapd.conf. This will still allow PLAIN
++ under TLS, but IMAP LOGIN commands will now fail.
++.PP
++ If you only list plaintext authentication mechanisms in ``sasl_mech_list''
++ and set ``allowplaintext: no'', only users on encrypted sessions (TLS or
++ SSL) will be able to authenticate. On the other hand, if you list no
++ plaintext authentication options in ``sasl_mech_list'',
++ ``allowplaintext: yes'' would have no effect. */
+
+ { "allowusermoves", 0, SWITCH }
+ /* Allow moving user accounts (with associated meta-data) via RENAME
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/99-update-autoconf.dpatch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/99-update-autoconf.dpatch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/99-update-autoconf.dpatch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/patches/99-update-autoconf.dpatch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73899 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 99-update-autoconf.dpatch by Ondrej Sury <ondrej at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Update configure and config.h.in according to changes in other patches
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.3.7~/autom4te.cache/output.0 cyrus-imapd-2.3.7/autom4te.cache/output.0
+--- cyrus-imapd-2.3.7~/autom4te.cache/output.0 1970-01-01 01:00:00.000000000 +0100
++++ cyrus-imapd-2.3.7/autom4te.cache/output.0 2006-08-11 17:29:39.000000000 +0200
+@@ -0,0 +1,21635 @@
++@%:@! /bin/sh
++@%:@ Guess values for system-dependent variables and create Makefiles.
++@%:@ Generated by GNU Autoconf 2.60.
++@%:@
++@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++@%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++@%:@ This configure script is free software; the Free Software Foundation
++@%:@ gives unlimited permission to copy, distribute and modify it.
++## --------------------- ##
++## M4sh Initialization. ##
++## --------------------- ##
++
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++
++# PATH needs CR
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
++# Support unset when possible.
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++as_nl='
++'
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ { (exit 1); exit 1; }
++fi
++
++# Work around bugs in pre-3.0 UWIN ksh.
++for as_var in ENV MAIL MAILPATH
++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++done
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++ fi
++done
++
++# Required to use basename.
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
++ as_basename=basename
++else
++ as_basename=false
++fi
++
++
++# Name of the executable.
++as_me=`$as_basename -- "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++
++# CDPATH.
++$as_unset CDPATH
++
++
++if test "x$CONFIG_SHELL" = x; then
++ if (eval ":") 2>/dev/null; then
++ as_have_required=yes
++else
++ as_have_required=no
++fi
++
++ if test $as_have_required = yes && (eval ":
++(as_func_return () {
++ (exit \$1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test \$exitcode = 0) || { (exit 1); exit 1; }
++
++(
++ as_lineno_1=\$LINENO
++ as_lineno_2=\$LINENO
++ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
++ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
++") 2> /dev/null; then
++ :
++else
++ as_candidate_shells=
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ case $as_dir in
++ /*)
++ for as_base in sh bash ksh sh5; do
++ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
++ done;;
++ esac
++done
++IFS=$as_save_IFS
++
++
++ for as_shell in $as_candidate_shells $SHELL; do
++ # Try only shells that exist, to save several forks.
++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
++ { ("$as_shell") 2> /dev/null <<\_ASEOF
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++:
++_ASEOF
++}; then
++ CONFIG_SHELL=$as_shell
++ as_have_required=yes
++ if { "$as_shell" 2> /dev/null <<\_ASEOF
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++:
++(as_func_return () {
++ (exit $1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = "$1" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test $exitcode = 0) || { (exit 1); exit 1; }
++
++(
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
++
++_ASEOF
++}; then
++ break
++fi
++
++fi
++
++ done
++
++ if test "x$CONFIG_SHELL" != x; then
++ for as_var in BASH_ENV ENV
++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++ done
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
++fi
++
++
++ if test $as_have_required = no; then
++ echo This script requires a shell more modern than all the
++ echo shells that I found on your system. Please install a
++ echo modern shell, or manually run the script under such a
++ echo shell if you do have one.
++ { (exit 1); exit 1; }
++fi
++
++
++fi
++
++fi
++
++
++
++(eval "as_func_return () {
++ (exit \$1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test \$exitcode = 0") || {
++ echo No shell found that supports shell functions.
++ echo Please tell autoconf at gnu.org about your system,
++ echo including any error possibly output before this
++ echo message
++}
++
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
++
++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
++ # uniformly replaced by the line number. The first 'sed' inserts a
++ # line-number line after each line using $LINENO; the second 'sed'
++ # does the real work. The second script uses 'N' to pair each
++ # line-number line with the line containing $LINENO, and appends
++ # trailing '-' during substitution so that $LINENO is not a special
++ # case at line end.
++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
++ # scripts with optimization help from Paolo Bonzini. Blame Lee
++ # E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
++ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
++ N
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
++ t loop
++ s/-\n.*//
++ ' >$as_me.lineno &&
++ chmod +x "$as_me.lineno" ||
++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
++ { (exit 1); exit 1; }; }
++
++ # Don't try to exec as it changes $[0], causing all sort of problems
++ # (the dirname of $[0] is not the place where we might find the
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
++ # Exit status is that of the last command.
++ exit
++}
++
++
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in
++-n*)
++ case `echo 'x\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ *) ECHO_C='\c';;
++ esac;;
++*)
++ ECHO_N='-n';;
++esac
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir
++fi
++echo >conf$$.file
++if ln -s conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++ as_ln_s='cp -p'
++elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++else
++ as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
++
++if mkdir -p . 2>/dev/null; then
++ as_mkdir_p=:
++else
++ test -d ./-p && rmdir ./-p
++ as_mkdir_p=false
++fi
++
++# Find out whether ``test -x'' works. Don't use a zero-byte file, as
++# systems may use methods other than mode bits to determine executability.
++cat >conf$$.file <<_ASEOF
++#! /bin/sh
++exit 0
++_ASEOF
++chmod +x conf$$.file
++if test -x conf$$.file >/dev/null 2>&1; then
++ as_executable_p="test -x"
++else
++ as_executable_p=:
++fi
++rm -f conf$$.file
++
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
++
++# Sed expression to map a string onto a valid variable name.
++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
++
++
++
++exec 7<&0 </dev/null 6>&1
++
++# Name of the host.
++# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# so uname gets run too.
++ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
++
++#
++# Initializations.
++#
++ac_default_prefix=/usr/local
++ac_clean_files=
++ac_config_libobj_dir=.
++LIB@&t at OBJS=
++cross_compiling=no
++subdirs=
++MFLAGS=
++MAKEFLAGS=
++SHELL=${CONFIG_SHELL-/bin/sh}
++
++# Identity of this package.
++PACKAGE_NAME=
++PACKAGE_TARNAME=
++PACKAGE_VERSION=
++PACKAGE_STRING=
++PACKAGE_BUGREPORT=
++
++ac_unique_file="imap/imapd.c"
++# Factoring default headers for most tests.
++ac_includes_default="\
++#include <stdio.h>
++#if HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++#if HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++#if STDC_HEADERS
++# include <stdlib.h>
++# include <stddef.h>
++#else
++# if HAVE_STDLIB_H
++# include <stdlib.h>
++# endif
++#endif
++#if HAVE_STRING_H
++# if !STDC_HEADERS && HAVE_MEMORY_H
++# include <memory.h>
++# endif
++# include <string.h>
++#endif
++#if HAVE_STRINGS_H
++# include <strings.h>
++#endif
++#if HAVE_INTTYPES_H
++# include <inttypes.h>
++#endif
++#if HAVE_STDINT_H
++# include <stdint.h>
++#endif
++#if HAVE_UNISTD_H
++# include <unistd.h>
++#endif"
++
++ac_subst_vars='SHELL
++PATH_SEPARATOR
++PACKAGE_NAME
++PACKAGE_TARNAME
++PACKAGE_VERSION
++PACKAGE_STRING
++PACKAGE_BUGREPORT
++exec_prefix
++prefix
++program_transform_name
++bindir
++sbindir
++libexecdir
++datarootdir
++datadir
++sysconfdir
++sharedstatedir
++localstatedir
++includedir
++oldincludedir
++docdir
++infodir
++htmldir
++dvidir
++pdfdir
++psdir
++libdir
++localedir
++mandir
++DEFS
++ECHO_C
++ECHO_N
++ECHO_T
++LIBS
++build_alias
++host_alias
++target_alias
++build
++build_cpu
++build_vendor
++build_os
++host
++host_cpu
++host_vendor
++host_os
++WARNERROR
++MAKEDEPEND
++cyrus_prefix
++service_path
++cyrus_user
++cyrus_group
++CC
++CFLAGS
++LDFLAGS
++CPPFLAGS
++ac_ct_CC
++EXEEXT
++OBJEXT
++RANLIB
++SET_MAKE
++INSTALL_PROGRAM
++INSTALL_SCRIPT
++INSTALL_DATA
++CPP
++GREP
++EGREP
++AWK
++LIB@&t at OBJS
++LIB_SOCKET
++IPV6_OBJS
++PRE_SUBDIRS
++EXTRA_SUBDIRS
++DEPLIBS
++LOCALDEFS
++BDB_INC
++BDB_LIB
++CYRUSDB_OBJS
++SIEVE_OBJS
++SIEVE_LIBS
++SIEVE_CPPFLAGS
++YACC
++YFLAGS
++LEX
++LEXLIB
++LEX_OUTPUT_ROOT
++SIEVE_SUBDIRS
++WITH_NONBLOCK
++WITH_GMTOFF
++WITH_MAP
++WITH_LOCK
++cyrus_sigveclib
++AFS_LIBS
++AFS_LDFLAGS
++LDAP_CPPFLAGS
++LDAP_LDFLAGS
++LDAP_LIBS
++SERVER_SUBDIRS
++OPENSSL_INC
++OPENSSL_LIB
++ZEPHYR_LIBS
++ZEPHYR_CPPFLAGS
++IMAP_PROGS
++COMPILE_ET
++COM_ERR_LIBS
++COM_ERR_LDFLAGS
++COM_ERR_CPPFLAGS
++LIB_CRYPT
++GSSAPI_LIBS
++GSSAPIBASE_LIBS
++LIB_DYN_SASL
++DYNSASLFLAGS
++LIB_SASL
++SASLFLAGS
++PERL
++PERL_CCCDLFLAGS
++MD5OBJ
++SNMP_SUBDIRS
++CMU_LIB_SUBDIR
++LIB_WRAP
++SNMP_CONFIG
++LIB_UCDSNMP
++LIB_RT
++IMAP_COM_ERR_LIBS
++IMAP_LIBS
++PERL_SUBDIRS
++PERL_DEPSUBDIRS
++LTLIBOBJS'
++ac_subst_files=''
++ ac_precious_vars='build_alias
++host_alias
++target_alias
++CC
++CFLAGS
++LDFLAGS
++CPPFLAGS
++CPP
++YACC
++YFLAGS'
++
++
++# Initialize some variables set by options.
++ac_init_help=
++ac_init_version=false
++# The variables have the same names as the options, with
++# dashes changed to underlines.
++cache_file=/dev/null
++exec_prefix=NONE
++no_create=
++no_recursion=
++prefix=NONE
++program_prefix=NONE
++program_suffix=NONE
++program_transform_name=s,x,x,
++silent=
++site=
++srcdir=
++verbose=
++x_includes=NONE
++x_libraries=NONE
++
++# Installation directory options.
++# These are left unexpanded so users can "make install exec_prefix=/foo"
++# and all the variables that are supposed to be based on exec_prefix
++# by default will actually change.
++# Use braces instead of parens because sh, perl, etc. also accept them.
++# (The list follows the same order as the GNU Coding Standards.)
++bindir='${exec_prefix}/bin'
++sbindir='${exec_prefix}/sbin'
++libexecdir='${exec_prefix}/libexec'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
++sysconfdir='${prefix}/etc'
++sharedstatedir='${prefix}/com'
++localstatedir='${prefix}/var'
++includedir='${prefix}/include'
++oldincludedir='/usr/include'
++docdir='${datarootdir}/doc/${PACKAGE}'
++infodir='${datarootdir}/info'
++htmldir='${docdir}'
++dvidir='${docdir}'
++pdfdir='${docdir}'
++psdir='${docdir}'
++libdir='${exec_prefix}/lib'
++localedir='${datarootdir}/locale'
++mandir='${datarootdir}/man'
++
++ac_prev=
++ac_dashdash=
++for ac_option
++do
++ # If the previous option needs an argument, assign it.
++ if test -n "$ac_prev"; then
++ eval $ac_prev=\$ac_option
++ ac_prev=
++ continue
++ fi
++
++ case $ac_option in
++ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++ *) ac_optarg=yes ;;
++ esac
++
++ # Accept the important Cygnus configure options, so we can diagnose typos.
++
++ case $ac_dashdash$ac_option in
++ --)
++ ac_dashdash=yes ;;
++
++ -bindir | --bindir | --bindi | --bind | --bin | --bi)
++ ac_prev=bindir ;;
++ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
++ bindir=$ac_optarg ;;
++
++ -build | --build | --buil | --bui | --bu)
++ ac_prev=build_alias ;;
++ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
++ build_alias=$ac_optarg ;;
++
++ -cache-file | --cache-file | --cache-fil | --cache-fi \
++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
++ ac_prev=cache_file ;;
++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
++ cache_file=$ac_optarg ;;
++
++ --config-cache | -C)
++ cache_file=config.cache ;;
++
++ -datadir | --datadir | --datadi | --datad)
++ ac_prev=datadir ;;
++ -datadir=* | --datadir=* | --datadi=* | --datad=*)
++ datadir=$ac_optarg ;;
++
++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
++ | --dataroo | --dataro | --datar)
++ ac_prev=datarootdir ;;
++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
++ datarootdir=$ac_optarg ;;
++
++ -disable-* | --disable-*)
++ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
++ { (exit 1); exit 1; }; }
++ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++ eval enable_$ac_feature=no ;;
++
++ -docdir | --docdir | --docdi | --doc | --do)
++ ac_prev=docdir ;;
++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
++ docdir=$ac_optarg ;;
++
++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
++ ac_prev=dvidir ;;
++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
++ dvidir=$ac_optarg ;;
++
++ -enable-* | --enable-*)
++ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
++ { (exit 1); exit 1; }; }
++ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++ eval enable_$ac_feature=\$ac_optarg ;;
++
++ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
++ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
++ | --exec | --exe | --ex)
++ ac_prev=exec_prefix ;;
++ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
++ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
++ | --exec=* | --exe=* | --ex=*)
++ exec_prefix=$ac_optarg ;;
++
++ -gas | --gas | --ga | --g)
++ # Obsolete; use --with-gas.
++ with_gas=yes ;;
++
++ -help | --help | --hel | --he | -h)
++ ac_init_help=long ;;
++ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
++ ac_init_help=recursive ;;
++ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
++ ac_init_help=short ;;
++
++ -host | --host | --hos | --ho)
++ ac_prev=host_alias ;;
++ -host=* | --host=* | --hos=* | --ho=*)
++ host_alias=$ac_optarg ;;
++
++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
++ ac_prev=htmldir ;;
++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
++ | --ht=*)
++ htmldir=$ac_optarg ;;
++
++ -includedir | --includedir | --includedi | --included | --include \
++ | --includ | --inclu | --incl | --inc)
++ ac_prev=includedir ;;
++ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
++ | --includ=* | --inclu=* | --incl=* | --inc=*)
++ includedir=$ac_optarg ;;
++
++ -infodir | --infodir | --infodi | --infod | --info | --inf)
++ ac_prev=infodir ;;
++ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
++ infodir=$ac_optarg ;;
++
++ -libdir | --libdir | --libdi | --libd)
++ ac_prev=libdir ;;
++ -libdir=* | --libdir=* | --libdi=* | --libd=*)
++ libdir=$ac_optarg ;;
++
++ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
++ | --libexe | --libex | --libe)
++ ac_prev=libexecdir ;;
++ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
++ | --libexe=* | --libex=* | --libe=*)
++ libexecdir=$ac_optarg ;;
++
++ -localedir | --localedir | --localedi | --localed | --locale)
++ ac_prev=localedir ;;
++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
++ localedir=$ac_optarg ;;
++
++ -localstatedir | --localstatedir | --localstatedi | --localstated \
++ | --localstate | --localstat | --localsta | --localst | --locals)
++ ac_prev=localstatedir ;;
++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
++ localstatedir=$ac_optarg ;;
++
++ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
++ ac_prev=mandir ;;
++ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
++ mandir=$ac_optarg ;;
++
++ -nfp | --nfp | --nf)
++ # Obsolete; use --without-fp.
++ with_fp=no ;;
++
++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
++ | --no-cr | --no-c | -n)
++ no_create=yes ;;
++
++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
++ no_recursion=yes ;;
++
++ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
++ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
++ | --oldin | --oldi | --old | --ol | --o)
++ ac_prev=oldincludedir ;;
++ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
++ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
++ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
++ oldincludedir=$ac_optarg ;;
++
++ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
++ ac_prev=prefix ;;
++ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
++ prefix=$ac_optarg ;;
++
++ -program-prefix | --program-prefix | --program-prefi | --program-pref \
++ | --program-pre | --program-pr | --program-p)
++ ac_prev=program_prefix ;;
++ -program-prefix=* | --program-prefix=* | --program-prefi=* \
++ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
++ program_prefix=$ac_optarg ;;
++
++ -program-suffix | --program-suffix | --program-suffi | --program-suff \
++ | --program-suf | --program-su | --program-s)
++ ac_prev=program_suffix ;;
++ -program-suffix=* | --program-suffix=* | --program-suffi=* \
++ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
++ program_suffix=$ac_optarg ;;
++
++ -program-transform-name | --program-transform-name \
++ | --program-transform-nam | --program-transform-na \
++ | --program-transform-n | --program-transform- \
++ | --program-transform | --program-transfor \
++ | --program-transfo | --program-transf \
++ | --program-trans | --program-tran \
++ | --progr-tra | --program-tr | --program-t)
++ ac_prev=program_transform_name ;;
++ -program-transform-name=* | --program-transform-name=* \
++ | --program-transform-nam=* | --program-transform-na=* \
++ | --program-transform-n=* | --program-transform-=* \
++ | --program-transform=* | --program-transfor=* \
++ | --program-transfo=* | --program-transf=* \
++ | --program-trans=* | --program-tran=* \
++ | --progr-tra=* | --program-tr=* | --program-t=*)
++ program_transform_name=$ac_optarg ;;
++
++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
++ ac_prev=pdfdir ;;
++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
++ pdfdir=$ac_optarg ;;
++
++ -psdir | --psdir | --psdi | --psd | --ps)
++ ac_prev=psdir ;;
++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
++ psdir=$ac_optarg ;;
++
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil)
++ silent=yes ;;
++
++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
++ ac_prev=sbindir ;;
++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
++ | --sbi=* | --sb=*)
++ sbindir=$ac_optarg ;;
++
++ -sharedstatedir | --sharedstatedir | --sharedstatedi \
++ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
++ | --sharedst | --shareds | --shared | --share | --shar \
++ | --sha | --sh)
++ ac_prev=sharedstatedir ;;
++ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
++ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
++ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
++ | --sha=* | --sh=*)
++ sharedstatedir=$ac_optarg ;;
++
++ -site | --site | --sit)
++ ac_prev=site ;;
++ -site=* | --site=* | --sit=*)
++ site=$ac_optarg ;;
++
++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
++ ac_prev=srcdir ;;
++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
++ srcdir=$ac_optarg ;;
++
++ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
++ | --syscon | --sysco | --sysc | --sys | --sy)
++ ac_prev=sysconfdir ;;
++ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
++ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
++ sysconfdir=$ac_optarg ;;
++
++ -target | --target | --targe | --targ | --tar | --ta | --t)
++ ac_prev=target_alias ;;
++ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
++ target_alias=$ac_optarg ;;
++
++ -v | -verbose | --verbose | --verbos | --verbo | --verb)
++ verbose=yes ;;
++
++ -version | --version | --versio | --versi | --vers | -V)
++ ac_init_version=: ;;
++
++ -with-* | --with-*)
++ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid package name: $ac_package" >&2
++ { (exit 1); exit 1; }; }
++ ac_package=`echo $ac_package| sed 's/-/_/g'`
++ eval with_$ac_package=\$ac_optarg ;;
++
++ -without-* | --without-*)
++ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid package name: $ac_package" >&2
++ { (exit 1); exit 1; }; }
++ ac_package=`echo $ac_package | sed 's/-/_/g'`
++ eval with_$ac_package=no ;;
++
++ --x)
++ # Obsolete; use --with-x.
++ with_x=yes ;;
++
++ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
++ | --x-incl | --x-inc | --x-in | --x-i)
++ ac_prev=x_includes ;;
++ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
++ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
++ x_includes=$ac_optarg ;;
++
++ -x-libraries | --x-libraries | --x-librarie | --x-librari \
++ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
++ ac_prev=x_libraries ;;
++ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
++ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
++ x_libraries=$ac_optarg ;;
++
++ -*) { echo "$as_me: error: unrecognized option: $ac_option
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; }
++ ;;
++
++ *=*)
++ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
++ { (exit 1); exit 1; }; }
++ eval $ac_envvar=\$ac_optarg
++ export $ac_envvar ;;
++
++ *)
++ # FIXME: should be removed in autoconf 3.0.
++ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
++ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
++ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
++ ;;
++
++ esac
++done
++
++if test -n "$ac_prev"; then
++ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
++ { echo "$as_me: error: missing argument to $ac_option" >&2
++ { (exit 1); exit 1; }; }
++fi
++
++# Be sure to have absolute directory names.
++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
++ datadir sysconfdir sharedstatedir localstatedir includedir \
++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
++ libdir localedir mandir
++do
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ [\\/$]* | ?:[\\/]* ) continue;;
++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
++ esac
++ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
++ { (exit 1); exit 1; }; }
++done
++
++# There might be people who depend on the old broken behavior: `$host'
++# used to hold the argument of --host etc.
++# FIXME: To remove some day.
++build=$build_alias
++host=$host_alias
++target=$target_alias
++
++# FIXME: To remove some day.
++if test "x$host_alias" != x; then
++ if test "x$build_alias" = x; then
++ cross_compiling=maybe
++ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
++ If a cross compiler is detected then cross compile mode will be used." >&2
++ elif test "x$build_alias" != "x$host_alias"; then
++ cross_compiling=yes
++ fi
++fi
++
++ac_tool_prefix=
++test -n "$host_alias" && ac_tool_prefix=$host_alias-
++
++test "$silent" = yes && exec 6>/dev/null
++
++
++ac_pwd=`pwd` && test -n "$ac_pwd" &&
++ac_ls_di=`ls -di .` &&
++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
++ { echo "$as_me: error: Working directory cannot be determined" >&2
++ { (exit 1); exit 1; }; }
++test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
++ { echo "$as_me: error: pwd does not report name of working directory" >&2
++ { (exit 1); exit 1; }; }
++
++
++# Find the source files, if location was not specified.
++if test -z "$srcdir"; then
++ ac_srcdir_defaulted=yes
++ # Try the directory containing this script, then the parent directory.
++ ac_confdir=`$as_dirname -- "$0" ||
++$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$0" : 'X\(//\)[^/]' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++echo X"$0" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ srcdir=$ac_confdir
++ if test ! -r "$srcdir/$ac_unique_file"; then
++ srcdir=..
++ fi
++else
++ ac_srcdir_defaulted=no
++fi
++if test ! -r "$srcdir/$ac_unique_file"; then
++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
++ { (exit 1); exit 1; }; }
++fi
++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
++ac_abs_confdir=`(
++ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
++ { (exit 1); exit 1; }; }
++ pwd)`
++# When building in place, set srcdir=.
++if test "$ac_abs_confdir" = "$ac_pwd"; then
++ srcdir=.
++fi
++# Remove unnecessary trailing slashes from srcdir.
++# Double slashes in file names in object file debugging info
++# mess up M-x gdb in Emacs.
++case $srcdir in
++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
++esac
++for ac_var in $ac_precious_vars; do
++ eval ac_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_env_${ac_var}_value=\$${ac_var}
++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_cv_env_${ac_var}_value=\$${ac_var}
++done
++
++#
++# Report the --help message.
++#
++if test "$ac_init_help" = "long"; then
++ # Omit some internal or obsolete options to make the list less imposing.
++ # This message is too long to be a string in the A/UX 3.1 sh.
++ cat <<_ACEOF
++\`configure' configures this package to adapt to many kinds of systems.
++
++Usage: $0 [OPTION]... [VAR=VALUE]...
++
++To assign environment variables (e.g., CC, CFLAGS...), specify them as
++VAR=VALUE. See below for descriptions of some of the useful variables.
++
++Defaults for the options are specified in brackets.
++
++Configuration:
++ -h, --help display this help and exit
++ --help=short display options specific to this package
++ --help=recursive display the short help of all the included packages
++ -V, --version display version information and exit
++ -q, --quiet, --silent do not print \`checking...' messages
++ --cache-file=FILE cache test results in FILE [disabled]
++ -C, --config-cache alias for \`--cache-file=config.cache'
++ -n, --no-create do not create output files
++ --srcdir=DIR find the sources in DIR [configure dir or \`..']
++
++Installation directories:
++ --prefix=PREFIX install architecture-independent files in PREFIX
++ [$ac_default_prefix]
++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
++ [PREFIX]
++
++By default, \`make install' will install all the files in
++\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
++an installation prefix other than \`$ac_default_prefix' using \`--prefix',
++for instance \`--prefix=\$HOME'.
++
++For better control, use the options below.
++
++Fine tuning of the installation directories:
++ --bindir=DIR user executables [EPREFIX/bin]
++ --sbindir=DIR system admin executables [EPREFIX/sbin]
++ --libexecdir=DIR program executables [EPREFIX/libexec]
++ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
++ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
++ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
++ --libdir=DIR object code libraries [EPREFIX/lib]
++ --includedir=DIR C header files [PREFIX/include]
++ --oldincludedir=DIR C header files for non-gcc [/usr/include]
++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
++ --infodir=DIR info documentation [DATAROOTDIR/info]
++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
++ --mandir=DIR man documentation [DATAROOTDIR/man]
++ --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@
++ --htmldir=DIR html documentation [DOCDIR]
++ --dvidir=DIR dvi documentation [DOCDIR]
++ --pdfdir=DIR pdf documentation [DOCDIR]
++ --psdir=DIR ps documentation [DOCDIR]
++_ACEOF
++
++ cat <<\_ACEOF
++
++System types:
++ --build=BUILD configure for building on BUILD [guessed]
++ --host=HOST cross-compile to build programs to run on HOST [BUILD]
++_ACEOF
++fi
++
++if test -n "$ac_init_help"; then
++
++ cat <<\_ACEOF
++
++Optional Features:
++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
++ --enable-warnings-are-errors add -Werror to most gcc calls
++ --disable-sieve disable Sieve support
++ --enable-krb5afspts compile afskrb PTS module with krb5 support
++ --disable-server disable compiling servers
++ --enable-statickrb link Kerberos statically
++ --enable-idled enable IMAP idled support
++ --enable-nntp enable NNTP support
++ --enable-murder enable IMAP Murder support
++ --enable-replication enable replication support (experimental)
++ --enable-cmulocal enable CMU-specific local support
++ --enable-oldsievename enable the use of 'imap' as the sieve service name
++ --enable-listext enable IMAP List extensions
++ --enable-netscapehack enable Netscape hack for the menu option
++ in Communicator to Administrate Mail
++ --enable-gssapi=<DIR> enable GSSAPI authentication [yes]
++
++Optional Packages:
++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
++ --with-extraident=STRING use STRING as extra version information
++
++ --with-cyrus-prefix=DIR use DIR as cyrus server install directory
++ --with-service-path=DIR use DIR as service install directory
++ --with-cyrus-user=USERID use USERID cyrus userid
++ --with-cyrus-group=GROUPID use GROUPID cyrus group
++ --with-bdb=DIR use Berkeley DB (in DIR) [yes]
++ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR
++ --with-bdb-incdir=DIR Berkeley DB include files are in DIR
++ --with-lock=METHOD force use of METHOD for locking (flock or fcntl)
++ --with-afs=PATH use AFS libraries from PATH
++ --with-ldap=DIR use LDAP (in DIR) (experimental) /usr/local
++ --with-krb=PATH use Kerberos from PATH
++ --with-krbimpl=\kth|mit\ assume Kerberos 4 from KTH or MIT
++ --with-krbdes use Kerberos DES implementation [yes]
++ --with-openssl=PATH use OpenSSL from PATH
++ --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
++ for systems without /dev/urandom
++ --with-zephyr=PATH enable Zephyr notification (installed on PATH)
++ --with-pidfile=PATH pidfile in PATH (/var/run/cyrus-master.pid)
++ --with-com_err=PATH use com_err from path -- includes in PATH/include,
++ libs in PATH/lib, and compile_et in PATH/bin
++ --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6)
++ --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
++ choose specific GSSAPI implementation [[auto]]
++ --with-sasl=DIR Compile with libsasl2 in <DIR>
++ --with-staticsasl=DIR Compile with staticly linked libsasl2 in <DIR>
++ --with-perl=PERL use PERL for perl
++ --with-lib-subdir=DIR Find libraries in DIR instead of lib
++ --with-libwrap=DIR use libwrap (rooted in DIR) yes
++ --with-snmp=DIR use ucd|net snmp (rooted in DIR) yes
++
++Some influential environment variables:
++ CC C compiler command
++ CFLAGS C compiler flags
++ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
++ nonstandard directory <lib dir>
++ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
++ you have headers in a nonstandard directory <include dir>
++ CPP C preprocessor
++ YACC The `Yet Another C Compiler' implementation to use. Defaults to
++ the first program found out of: `bison -y', `byacc', `yacc'.
++ YFLAGS The list of arguments that will be passed by default to $YACC.
++ This script will default YFLAGS to the empty string to avoid a
++ default value of `-d' given by some make applications.
++
++Use these variables to override the choices made by `configure' or to help
++it to find libraries and programs with nonstandard names/locations.
++
++_ACEOF
++ac_status=$?
++fi
++
++if test "$ac_init_help" = "recursive"; then
++ # If there are subdirs, report their specific --help.
++ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
++ test -d "$ac_dir" || continue
++ ac_builddir=.
++
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
++
++case $srcdir in
++ .) # We are building in place.
++ ac_srcdir=.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
++esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
++
++ cd "$ac_dir" || { ac_status=$?; continue; }
++ # Check for guested configure.
++ if test -f "$ac_srcdir/configure.gnu"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
++ elif test -f "$ac_srcdir/configure"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure" --help=recursive
++ else
++ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
++ fi || ac_status=$?
++ cd "$ac_pwd" || { ac_status=$?; break; }
++ done
++fi
++
++test -n "$ac_init_help" && exit $ac_status
++if $ac_init_version; then
++ cat <<\_ACEOF
++configure
++generated by GNU Autoconf 2.60
++
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++This configure script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it.
++_ACEOF
++ exit
++fi
++cat >config.log <<_ACEOF
++This file contains any messages produced by compilers while
++running configure, to aid debugging if configure makes a mistake.
++
++It was created by $as_me, which was
++generated by GNU Autoconf 2.60. Invocation command line was
++
++ $ $0 $@
++
++_ACEOF
++exec 5>>config.log
++{
++cat <<_ASUNAME
++@%:@@%:@ --------- @%:@@%:@
++@%:@@%:@ Platform. @%:@@%:@
++@%:@@%:@ --------- @%:@@%:@
++
++hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
++uname -m = `(uname -m) 2>/dev/null || echo unknown`
++uname -r = `(uname -r) 2>/dev/null || echo unknown`
++uname -s = `(uname -s) 2>/dev/null || echo unknown`
++uname -v = `(uname -v) 2>/dev/null || echo unknown`
++
++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
++/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
++
++/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
++/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
++/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
++
++_ASUNAME
++
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ echo "PATH: $as_dir"
++done
++IFS=$as_save_IFS
++
++} >&5
++
++cat >&5 <<_ACEOF
++
++
++@%:@@%:@ ----------- @%:@@%:@
++@%:@@%:@ Core tests. @%:@@%:@
++@%:@@%:@ ----------- @%:@@%:@
++
++_ACEOF
++
++
++# Keep a trace of the command line.
++# Strip out --no-create and --no-recursion so they do not pile up.
++# Strip out --silent because we don't want to record it for future runs.
++# Also quote any args containing shell meta-characters.
++# Make two passes to allow for proper duplicate-argument suppression.
++ac_configure_args=
++ac_configure_args0=
++ac_configure_args1=
++ac_must_keep_next=false
++for ac_pass in 1 2
++do
++ for ac_arg
++ do
++ case $ac_arg in
++ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil)
++ continue ;;
++ *\'*)
++ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++ esac
++ case $ac_pass in
++ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
++ 2)
++ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
++ if test $ac_must_keep_next = true; then
++ ac_must_keep_next=false # Got value, back to normal.
++ else
++ case $ac_arg in
++ *=* | --config-cache | -C | -disable-* | --disable-* \
++ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
++ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
++ | -with-* | --with-* | -without-* | --without-* | --x)
++ case "$ac_configure_args0 " in
++ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
++ esac
++ ;;
++ -* ) ac_must_keep_next=true ;;
++ esac
++ fi
++ ac_configure_args="$ac_configure_args '$ac_arg'"
++ ;;
++ esac
++ done
++done
++$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
++$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
++
++# When interrupted or exit'd, cleanup temporary files, and complete
++# config.log. We remove comments because anyway the quotes in there
++# would cause problems or look ugly.
++# WARNING: Use '\'' to represent an apostrophe within the trap.
++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
++trap 'exit_status=$?
++ # Save into config.log some information that might help in debugging.
++ {
++ echo
++
++ cat <<\_ASBOX
++@%:@@%:@ ---------------- @%:@@%:@
++@%:@@%:@ Cache variables. @%:@@%:@
++@%:@@%:@ ---------------- @%:@@%:@
++_ASBOX
++ echo
++ # The following way of writing the cache mishandles newlines in values,
++(
++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ *) $as_unset $ac_var ;;
++ esac ;;
++ esac
++ done
++ (set) 2>&1 |
++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
++ sed -n \
++ "s/'\''/'\''\\\\'\'''\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
++ ;; #(
++ *)
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++ ;;
++ esac |
++ sort
++)
++ echo
++
++ cat <<\_ASBOX
++@%:@@%:@ ----------------- @%:@@%:@
++@%:@@%:@ Output variables. @%:@@%:@
++@%:@@%:@ ----------------- @%:@@%:@
++_ASBOX
++ echo
++ for ac_var in $ac_subst_vars
++ do
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ echo "$ac_var='\''$ac_val'\''"
++ done | sort
++ echo
++
++ if test -n "$ac_subst_files"; then
++ cat <<\_ASBOX
++@%:@@%:@ ------------------- @%:@@%:@
++@%:@@%:@ File substitutions. @%:@@%:@
++@%:@@%:@ ------------------- @%:@@%:@
++_ASBOX
++ echo
++ for ac_var in $ac_subst_files
++ do
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ echo "$ac_var='\''$ac_val'\''"
++ done | sort
++ echo
++ fi
++
++ if test -s confdefs.h; then
++ cat <<\_ASBOX
++@%:@@%:@ ----------- @%:@@%:@
++@%:@@%:@ confdefs.h. @%:@@%:@
++@%:@@%:@ ----------- @%:@@%:@
++_ASBOX
++ echo
++ cat confdefs.h
++ echo
++ fi
++ test "$ac_signal" != 0 &&
++ echo "$as_me: caught signal $ac_signal"
++ echo "$as_me: exit $exit_status"
++ } >&5
++ rm -f core *.core core.conftest.* &&
++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
++ exit $exit_status
++' 0
++for ac_signal in 1 2 13 15; do
++ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
++done
++ac_signal=0
++
++# confdefs.h avoids OS command line length limits that DEFS can exceed.
++rm -f -r conftest* confdefs.h
++
++# Predefined preprocessor variables.
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_NAME "$PACKAGE_NAME"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_STRING "$PACKAGE_STRING"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
++_ACEOF
++
++
++# Let the site file select an alternate cache file if it wants to.
++# Prefer explicitly selected file to automatically selected ones.
++if test -n "$CONFIG_SITE"; then
++ set x "$CONFIG_SITE"
++elif test "x$prefix" != xNONE; then
++ set x "$prefix/share/config.site" "$prefix/etc/config.site"
++else
++ set x "$ac_default_prefix/share/config.site" \
++ "$ac_default_prefix/etc/config.site"
++fi
++shift
++for ac_site_file
++do
++ if test -r "$ac_site_file"; then
++ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
++echo "$as_me: loading site script $ac_site_file" >&6;}
++ sed 's/^/| /' "$ac_site_file" >&5
++ . "$ac_site_file"
++ fi
++done
++
++if test -r "$cache_file"; then
++ # Some versions of bash will fail to source /dev/null (special
++ # files actually), so we avoid doing that.
++ if test -f "$cache_file"; then
++ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
++echo "$as_me: loading cache $cache_file" >&6;}
++ case $cache_file in
++ [\\/]* | ?:[\\/]* ) . "$cache_file";;
++ *) . "./$cache_file";;
++ esac
++ fi
++else
++ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
++echo "$as_me: creating cache $cache_file" >&6;}
++ >$cache_file
++fi
++
++# Check that the precious variables saved in the cache have kept the same
++# value.
++ac_cache_corrupted=false
++for ac_var in $ac_precious_vars; do
++ eval ac_old_set=\$ac_cv_env_${ac_var}_set
++ eval ac_new_set=\$ac_env_${ac_var}_set
++ eval ac_old_val=\$ac_cv_env_${ac_var}_value
++ eval ac_new_val=\$ac_env_${ac_var}_value
++ case $ac_old_set,$ac_new_set in
++ set,)
++ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
++ ac_cache_corrupted=: ;;
++ ,set)
++ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
++echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
++ ac_cache_corrupted=: ;;
++ ,);;
++ *)
++ if test "x$ac_old_val" != "x$ac_new_val"; then
++ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
++echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
++ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
++echo "$as_me: former value: $ac_old_val" >&2;}
++ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
++echo "$as_me: current value: $ac_new_val" >&2;}
++ ac_cache_corrupted=:
++ fi;;
++ esac
++ # Pass precious variables to config.status.
++ if test "$ac_new_set" = set; then
++ case $ac_new_val in
++ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
++ *) ac_arg=$ac_var=$ac_new_val ;;
++ esac
++ case " $ac_configure_args " in
++ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
++ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
++ esac
++ fi
++done
++if $ac_cache_corrupted; then
++ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
++echo "$as_me: error: changes in the environment can compromise the build" >&2;}
++ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
++echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++
++ac_config_headers="$ac_config_headers config.h"
++
++ac_aux_dir=
++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
++ if test -f "$ac_dir/install-sh"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install-sh -c"
++ break
++ elif test -f "$ac_dir/install.sh"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install.sh -c"
++ break
++ elif test -f "$ac_dir/shtool"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/shtool install -c"
++ break
++ fi
++done
++if test -z "$ac_aux_dir"; then
++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
++echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++# These three variables are undocumented and unsupported,
++# and are intended to be withdrawn in a future Autoconf release.
++# They can cause serious problems if a builder's source tree is in a directory
++# whose full name contains unusual characters.
++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
++
++
++# Make sure we can run config.sub.
++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
++ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
++echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
++ { (exit 1); exit 1; }; }
++
++{ echo "$as_me:$LINENO: checking build system type" >&5
++echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
++if test "${ac_cv_build+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_build_alias=$build_alias
++test "x$ac_build_alias" = x &&
++ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
++test "x$ac_build_alias" = x &&
++ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
++echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
++ { (exit 1); exit 1; }; }
++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
++ { (exit 1); exit 1; }; }
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
++echo "${ECHO_T}$ac_cv_build" >&6; }
++case $ac_cv_build in
++*-*-*) ;;
++*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
++echo "$as_me: error: invalid value of canonical build" >&2;}
++ { (exit 1); exit 1; }; };;
++esac
++build=$ac_cv_build
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_build
++shift
++build_cpu=$1
++build_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++build_os=$*
++IFS=$ac_save_IFS
++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
++
++
++{ echo "$as_me:$LINENO: checking host system type" >&5
++echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
++if test "${ac_cv_host+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "x$host_alias" = x; then
++ ac_cv_host=$ac_cv_build
++else
++ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
++echo "${ECHO_T}$ac_cv_host" >&6; }
++case $ac_cv_host in
++*-*-*) ;;
++*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
++echo "$as_me: error: invalid value of canonical host" >&2;}
++ { (exit 1); exit 1; }; };;
++esac
++host=$ac_cv_host
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_host
++shift
++host_cpu=$1
++host_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++host_os=$*
++IFS=$ac_save_IFS
++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
++
++
++
++WARNERROR=-W
++# Check whether --enable-warnings-are-errors was given.
++if test "${enable_warnings_are_errors+set}" = set; then
++ enableval=$enable_warnings_are_errors; if test "$enableval" != "no" ; then WARNERROR=-Werror ; fi
++fi
++
++
++
++
++# Check whether --with-extraident was given.
++if test "${with_extraident+set}" = set; then
++ withval=$with_extraident;
++cat >>confdefs.h <<_ACEOF
++@%:@define EXTRA_IDENT "$withval"
++_ACEOF
++
++fi
++
++
++# Extract the first word of "makedepend", so it can be a program name with args.
++set dummy makedepend; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_MAKEDEPEND+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$MAKEDEPEND"; then
++ ac_cv_prog_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_MAKEDEPEND="makedepend"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_prog_MAKEDEPEND" && ac_cv_prog_MAKEDEPEND="`cd ${srcdir};pwd`/tools/not-mkdep"
++fi
++fi
++MAKEDEPEND=$ac_cv_prog_MAKEDEPEND
++if test -n "$MAKEDEPEND"; then
++ { echo "$as_me:$LINENO: result: $MAKEDEPEND" >&5
++echo "${ECHO_T}$MAKEDEPEND" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++if test "$MAKEDEPEND" != "makedepend"; then
++ { echo "$as_me:$LINENO: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&5
++echo "$as_me: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&2;}
++fi
++
++
++# Check whether --with-login was given.
++if test "${with_login+set}" = set; then
++ withval=$with_login; { { echo "$as_me:$LINENO: error: --with-login is no longer supported.
++Configure SASL appropriately instead." >&5
++echo "$as_me: error: --with-login is no longer supported.
++Configure SASL appropriately instead." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++
++# Check whether --with-cyrus-prefix was given.
++if test "${with_cyrus_prefix+set}" = set; then
++ withval=$with_cyrus_prefix; cyrus_prefix="$withval"
++else
++ cyrus_prefix="/usr/cyrus"
++fi
++
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define CYRUS_PATH "$cyrus_prefix"
++_ACEOF
++
++
++# Check whether --with-service-path was given.
++if test "${with_service_path+set}" = set; then
++ withval=$with_service_path; service_path="$withval"
++else
++ service_path="$cyrus_prefix/bin"
++fi
++
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define SERVICE_PATH "$service_path"
++_ACEOF
++
++
++# Check whether --with-cyrus-user was given.
++if test "${with_cyrus_user+set}" = set; then
++ withval=$with_cyrus_user; cyrus_user="$withval"
++else
++ cyrus_user="cyrus"
++fi
++
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define CYRUS_USER "$cyrus_user"
++_ACEOF
++
++
++# Check whether --with-cyrus-group was given.
++if test "${with_cyrus_group+set}" = set; then
++ withval=$with_cyrus_group; cyrus_group="$withval"
++else
++ cyrus_group="mail"
++fi
++
++
++
++if test $sysconfdir = '${prefix}/etc'; then
++ sysconfdir="/etc"
++fi
++
++cat >>confdefs.h <<_ACEOF
++@%:@define SYSCONFDIR "$sysconfdir"
++_ACEOF
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}gcc; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_CC="${ac_tool_prefix}gcc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_CC"; then
++ ac_ct_CC=$CC
++ # Extract the first word of "gcc", so it can be a program name with args.
++set dummy gcc; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_CC"; then
++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_CC="gcc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++ if test "x$ac_ct_CC" = x; then
++ CC=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ CC=$ac_ct_CC
++ fi
++else
++ CC="$ac_cv_prog_CC"
++fi
++
++if test -z "$CC"; then
++ if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}cc; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_CC="${ac_tool_prefix}cc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ fi
++fi
++if test -z "$CC"; then
++ # Extract the first word of "cc", so it can be a program name with args.
++set dummy cc; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++ ac_prog_rejected=no
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
++ ac_prog_rejected=yes
++ continue
++ fi
++ ac_cv_prog_CC="cc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++if test $ac_prog_rejected = yes; then
++ # We found a bogon in the path, so make sure we never use it.
++ set dummy $ac_cv_prog_CC
++ shift
++ if test $@%:@ != 0; then
++ # We chose a different compiler from the bogus one.
++ # However, it has the same basename, so the bogon will be chosen
++ # first if we set CC to just the basename; use the full file name.
++ shift
++ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
++ fi
++fi
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++fi
++if test -z "$CC"; then
++ if test -n "$ac_tool_prefix"; then
++ for ac_prog in cl.exe
++ do
++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$CC" && break
++ done
++fi
++if test -z "$CC"; then
++ ac_ct_CC=$CC
++ for ac_prog in cl.exe
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_CC"; then
++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_CC="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$ac_ct_CC" && break
++done
++
++ if test "x$ac_ct_CC" = x; then
++ CC=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ CC=$ac_ct_CC
++ fi
++fi
++
++fi
++
++
++test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
++See \`config.log' for more details." >&5
++echo "$as_me: error: no acceptable C compiler found in \$PATH
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++
++# Provide some information about the compiler.
++echo "$as_me:$LINENO: checking for C compiler version" >&5
++ac_compiler=`set X $ac_compile; echo $2`
++{ (ac_try="$ac_compiler --version >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler --version >&5") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++{ (ac_try="$ac_compiler -v >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler -v >&5") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++{ (ac_try="$ac_compiler -V >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler -V >&5") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files a.out a.exe b.out"
++# Try to create an executable without -o first, disregard a.out.
++# It will help us diagnose broken compilers, and finding out an intuition
++# of exeext.
++{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
++echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
++ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
++#
++# List of possible output files, starting from the most likely.
++# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
++# only as a last resort. b.out is created by i960 compilers.
++ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
++#
++# The IRIX 6 linker writes into existing files which may not be
++# executable, retaining their permissions. Remove them first so a
++# subsequent execution test works.
++ac_rmfiles=
++for ac_file in $ac_files
++do
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
++ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
++ esac
++done
++rm -f $ac_rmfiles
++
++if { (ac_try="$ac_link_default"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link_default") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
++# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
++# in a Makefile. We should not override ac_cv_exeext if it was cached,
++# so that the user can short-circuit this test for compilers unknown to
++# Autoconf.
++for ac_file in $ac_files
++do
++ test -f "$ac_file" || continue
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
++ ;;
++ [ab].out )
++ # We found the default executable, but exeext='' is most
++ # certainly right.
++ break;;
++ *.* )
++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
++ then :; else
++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ fi
++ # We set ac_cv_exeext here because the later test for it is not
++ # safe: cross compilers may not add the suffix if given an `-o'
++ # argument, so we may need to know it at that point already.
++ # Even if this section looks crufty: it has the advantage of
++ # actually working.
++ break;;
++ * )
++ break;;
++ esac
++done
++test "$ac_cv_exeext" = no && ac_cv_exeext=
++
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
++See \`config.log' for more details." >&5
++echo "$as_me: error: C compiler cannot create executables
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++
++ac_exeext=$ac_cv_exeext
++{ echo "$as_me:$LINENO: result: $ac_file" >&5
++echo "${ECHO_T}$ac_file" >&6; }
++
++# Check that the compiler produces executables we can run. If not, either
++# the compiler is broken, or we cross compile.
++{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
++# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
++# If not cross compiling, check that we can run a simple program.
++if test "$cross_compiling" != yes; then
++ if { ac_try='./$ac_file'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cross_compiling=no
++ else
++ if test "$cross_compiling" = maybe; then
++ cross_compiling=yes
++ else
++ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
++If you meant to cross compile, use \`--host'.
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot run C compiled programs.
++If you meant to cross compile, use \`--host'.
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++ fi
++fi
++{ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++
++rm -f a.out a.exe conftest$ac_cv_exeext b.out
++ac_clean_files=$ac_clean_files_save
++# Check that the compiler produces executables we can run. If not, either
++# the compiler is broken, or we cross compile.
++{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
++echo "${ECHO_T}$cross_compiling" >&6; }
++
++{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ # If both `conftest.exe' and `conftest' are `present' (well, observable)
++# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
++# work properly (i.e., refer to `conftest.exe'), while it won't with
++# `rm'.
++for ac_file in conftest.exe conftest conftest.*; do
++ test -f "$ac_file" || continue
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
++ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ break;;
++ * ) break;;
++ esac
++done
++else
++ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++rm -f conftest$ac_cv_exeext
++{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
++echo "${ECHO_T}$ac_cv_exeext" >&6; }
++
++rm -f conftest.$ac_ext
++EXEEXT=$ac_cv_exeext
++ac_exeext=$EXEEXT
++{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
++echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
++if test "${ac_cv_objext+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.o conftest.obj
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ for ac_file in conftest.o conftest.obj conftest.*; do
++ test -f "$ac_file" || continue;
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
++ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
++ break;;
++ esac
++done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute suffix of object files: cannot compile
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++rm -f conftest.$ac_cv_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
++echo "${ECHO_T}$ac_cv_objext" >&6; }
++OBJEXT=$ac_cv_objext
++ac_objext=$OBJEXT
++{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
++if test "${ac_cv_c_compiler_gnu+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++#ifndef __GNUC__
++ choke me
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_compiler_gnu=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_compiler_gnu=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ac_cv_c_compiler_gnu=$ac_compiler_gnu
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
++GCC=`test $ac_compiler_gnu = yes && echo yes`
++ac_test_CFLAGS=${CFLAGS+set}
++ac_save_CFLAGS=$CFLAGS
++{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
++if test "${ac_cv_prog_cc_g+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_save_c_werror_flag=$ac_c_werror_flag
++ ac_c_werror_flag=yes
++ ac_cv_prog_cc_g=no
++ CFLAGS="-g"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_g=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ CFLAGS=""
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_c_werror_flag=$ac_save_c_werror_flag
++ CFLAGS="-g"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_g=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_c_werror_flag=$ac_save_c_werror_flag
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
++if test "$ac_test_CFLAGS" = set; then
++ CFLAGS=$ac_save_CFLAGS
++elif test $ac_cv_prog_cc_g = yes; then
++ if test "$GCC" = yes; then
++ CFLAGS="-g -O2"
++ else
++ CFLAGS="-g"
++ fi
++else
++ if test "$GCC" = yes; then
++ CFLAGS="-O2"
++ else
++ CFLAGS=
++ fi
++fi
++{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
++echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
++if test "${ac_cv_prog_cc_c89+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_prog_cc_c89=no
++ac_save_CC=$CC
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdarg.h>
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
++struct buf { int x; };
++FILE * (*rcsopen) (struct buf *, struct stat *, int);
++static char *e (p, i)
++ char **p;
++ int i;
++{
++ return p[i];
++}
++static char *f (char * (*g) (char **, int), char **p, ...)
++{
++ char *s;
++ va_list v;
++ va_start (v,p);
++ s = g (p, va_arg (v,int));
++ va_end (v);
++ return s;
++}
++
++/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
++ function prototypes and stuff, but not '\xHH' hex character constants.
++ These don't provoke an error unfortunately, instead are silently treated
++ as 'x'. The following induces an error, until -std is added to get
++ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
++ array size at least. It's necessary to write '\x00'==0 to get something
++ that's true only with -std. */
++int osf4_cc_array ['\x00' == 0 ? 1 : -1];
++
++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
++ inside strings and character constants. */
++#define FOO(x) 'x'
++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
++
++int test (int i, double x);
++struct s1 {int (*f) (int a);};
++struct s2 {int (*f) (double a);};
++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
++int argc;
++char **argv;
++int
++main ()
++{
++return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
++ ;
++ return 0;
++}
++_ACEOF
++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
++ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++do
++ CC="$ac_save_CC $ac_arg"
++ rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_c89=$ac_arg
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext
++ test "x$ac_cv_prog_cc_c89" != "xno" && break
++done
++rm -f conftest.$ac_ext
++CC=$ac_save_CC
++
++fi
++# AC_CACHE_VAL
++case "x$ac_cv_prog_cc_c89" in
++ x)
++ { echo "$as_me:$LINENO: result: none needed" >&5
++echo "${ECHO_T}none needed" >&6; } ;;
++ xno)
++ { echo "$as_me:$LINENO: result: unsupported" >&5
++echo "${ECHO_T}unsupported" >&6; } ;;
++ *)
++ CC="$CC $ac_cv_prog_cc_c89"
++ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
++esac
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
++set dummy ${ac_tool_prefix}ranlib; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_RANLIB+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$RANLIB"; then
++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++RANLIB=$ac_cv_prog_RANLIB
++if test -n "$RANLIB"; then
++ { echo "$as_me:$LINENO: result: $RANLIB" >&5
++echo "${ECHO_T}$RANLIB" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_RANLIB"; then
++ ac_ct_RANLIB=$RANLIB
++ # Extract the first word of "ranlib", so it can be a program name with args.
++set dummy ranlib; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_RANLIB"; then
++ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_RANLIB="ranlib"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
++if test -n "$ac_ct_RANLIB"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
++echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++ if test "x$ac_ct_RANLIB" = x; then
++ RANLIB=":"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ RANLIB=$ac_ct_RANLIB
++ fi
++else
++ RANLIB="$ac_cv_prog_RANLIB"
++fi
++
++{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
++set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.make <<\_ACEOF
++SHELL = /bin/sh
++all:
++ @echo '@@@%%%=$(MAKE)=@@@%%%'
++_ACEOF
++# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
++case `${MAKE-make} -f conftest.make 2>/dev/null` in
++ *@@@%%%=?*=@@@%%%*)
++ eval ac_cv_prog_make_${ac_make}_set=yes;;
++ *)
++ eval ac_cv_prog_make_${ac_make}_set=no;;
++esac
++rm -f conftest.make
++fi
++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++ SET_MAKE=
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++ SET_MAKE="MAKE=${MAKE-make}"
++fi
++
++# Find a good install program. We prefer a C program (faster),
++# so one script is as good as another. But avoid the broken or
++# incompatible versions:
++# SysV /etc/install, /usr/sbin/install
++# SunOS /usr/etc/install
++# IRIX /sbin/install
++# AIX /bin/install
++# AmigaOS /C/install, which installs bootblocks on floppy discs
++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
++# AFS /usr/afsws/bin/install, which mishandles nonexistent args
++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
++# OS/2's system install, which has a completely different semantic
++# ./install, which can be erroneously created by make from ./install.sh.
++{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
++if test -z "$INSTALL"; then
++if test "${ac_cv_path_install+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ # Account for people who put trailing slashes in PATH elements.
++case $as_dir/ in
++ ./ | .// | /cC/* | \
++ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
++ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
++ /usr/ucb/* ) ;;
++ *)
++ # OSF1 and SCO ODT 3.0 have their own names for install.
++ # Don't use installbsd from OSF since it installs stuff as root
++ # by default.
++ for ac_prog in ginstall scoinst install; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
++ if test $ac_prog = install &&
++ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++ # AIX install. It has an incompatible calling convention.
++ :
++ elif test $ac_prog = install &&
++ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++ # program-specific install script used by HP pwplus--don't use.
++ :
++ else
++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++ break 3
++ fi
++ fi
++ done
++ done
++ ;;
++esac
++done
++IFS=$as_save_IFS
++
++
++fi
++ if test "${ac_cv_path_install+set}" = set; then
++ INSTALL=$ac_cv_path_install
++ else
++ # As a last resort, use the slow shell script. Don't cache a
++ # value for INSTALL within a source directory, because that will
++ # break other packages using the cache if that directory is
++ # removed, or if the value is a relative name.
++ INSTALL=$ac_install_sh
++ fi
++fi
++{ echo "$as_me:$LINENO: result: $INSTALL" >&5
++echo "${ECHO_T}$INSTALL" >&6; }
++
++# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
++# It thinks the first close brace ends the variable substitution.
++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
++
++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
++
++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
++# On Suns, sometimes $CPP names a directory.
++if test -n "$CPP" && test -d "$CPP"; then
++ CPP=
++fi
++if test -z "$CPP"; then
++ if test "${ac_cv_prog_CPP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # Double quotes because CPP needs to be expanded
++ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
++ do
++ ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++ # Use a header file that comes with gcc, so configuring glibc
++ # with a fresh cross-compiler works.
++ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ # <limits.h> exists even on freestanding compilers.
++ # On the NeXT, cc -E runs the code through the compiler's parser,
++ # not just through cpp. "Syntax error" is here to catch this case.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@ifdef __STDC__
++@%:@ include <limits.h>
++@%:@else
++@%:@ include <assert.h>
++@%:@endif
++ Syntax error
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Broken: fails on valid input.
++continue
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++ # OK, works on sane cases. Now check whether nonexistent headers
++ # can be detected and how.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <ac_nonexistent.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ # Broken: success on invalid input.
++continue
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Passes both tests.
++ac_preproc_ok=:
++break
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then
++ break
++fi
++
++ done
++ ac_cv_prog_CPP=$CPP
++
++fi
++ CPP=$ac_cv_prog_CPP
++else
++ ac_cv_prog_CPP=$CPP
++fi
++{ echo "$as_me:$LINENO: result: $CPP" >&5
++echo "${ECHO_T}$CPP" >&6; }
++ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++ # Use a header file that comes with gcc, so configuring glibc
++ # with a fresh cross-compiler works.
++ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ # <limits.h> exists even on freestanding compilers.
++ # On the NeXT, cc -E runs the code through the compiler's parser,
++ # not just through cpp. "Syntax error" is here to catch this case.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@ifdef __STDC__
++@%:@ include <limits.h>
++@%:@else
++@%:@ include <assert.h>
++@%:@endif
++ Syntax error
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Broken: fails on valid input.
++continue
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++ # OK, works on sane cases. Now check whether nonexistent headers
++ # can be detected and how.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <ac_nonexistent.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ # Broken: success on invalid input.
++continue
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Passes both tests.
++ac_preproc_ok=:
++break
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then
++ :
++else
++ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." >&5
++echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
++echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
++if test "${ac_cv_path_GREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # Extract the first word of "grep ggrep" to use in msg output
++if test -z "$GREP"; then
++set dummy grep ggrep; ac_prog_name=$2
++if test "${ac_cv_path_GREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_path_GREP_found=false
++# Loop through the user's path and test for each of PROGNAME-LIST
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in grep ggrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
++ # Check for GNU ac_path_GREP and select it if it is found.
++ # Check for GNU $ac_path_GREP
++case `"$ac_path_GREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
++*)
++ ac_count=0
++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ echo 'GREP' >> "conftest.nl"
++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ ac_count=`expr $ac_count + 1`
++ if test $ac_count -gt ${ac_path_GREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_GREP="$ac_path_GREP"
++ ac_path_GREP_max=$ac_count
++ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++
++ $ac_path_GREP_found && break 3
++ done
++done
++
++done
++IFS=$as_save_IFS
++
++
++fi
++
++GREP="$ac_cv_path_GREP"
++if test -z "$GREP"; then
++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++else
++ ac_cv_path_GREP=$GREP
++fi
++
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
++echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
++ GREP="$ac_cv_path_GREP"
++
++
++{ echo "$as_me:$LINENO: checking for egrep" >&5
++echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
++if test "${ac_cv_path_EGREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
++ then ac_cv_path_EGREP="$GREP -E"
++ else
++ # Extract the first word of "egrep" to use in msg output
++if test -z "$EGREP"; then
++set dummy egrep; ac_prog_name=$2
++if test "${ac_cv_path_EGREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_path_EGREP_found=false
++# Loop through the user's path and test for each of PROGNAME-LIST
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in egrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
++ # Check for GNU ac_path_EGREP and select it if it is found.
++ # Check for GNU $ac_path_EGREP
++case `"$ac_path_EGREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
++*)
++ ac_count=0
++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ echo 'EGREP' >> "conftest.nl"
++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ ac_count=`expr $ac_count + 1`
++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_EGREP="$ac_path_EGREP"
++ ac_path_EGREP_max=$ac_count
++ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++
++ $ac_path_EGREP_found && break 3
++ done
++done
++
++done
++IFS=$as_save_IFS
++
++
++fi
++
++EGREP="$ac_cv_path_EGREP"
++if test -z "$EGREP"; then
++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++else
++ ac_cv_path_EGREP=$EGREP
++fi
++
++
++ fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
++echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
++ EGREP="$ac_cv_path_EGREP"
++
++
++
++{ echo "$as_me:$LINENO: checking for AIX" >&5
++echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#ifdef _AIX
++ yes
++#endif
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "yes" >/dev/null 2>&1; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++cat >>confdefs.h <<\_ACEOF
++@%:@define _ALL_SOURCE 1
++_ACEOF
++
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++rm -f conftest*
++
++
++
++ { echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
++echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6; }
++if test "${ac_cv_lib_cposix_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcposix $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char strerror ();
++int
++main ()
++{
++return strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_cposix_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_cposix_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6; }
++if test $ac_cv_lib_cposix_strerror = yes; then
++ LIBS="$LIBS -lcposix"
++fi
++
++
++
++for ac_prog in gawk mawk nawk awk
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_AWK+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$AWK"; then
++ ac_cv_prog_AWK="$AWK" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_AWK="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++ { echo "$as_me:$LINENO: result: $AWK" >&5
++echo "${ECHO_T}$AWK" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$AWK" && break
++done
++
++{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
++echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
++if test "${ac_cv_c_const+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++/* FIXME: Include the comments suggested by Paul. */
++#ifndef __cplusplus
++ /* Ultrix mips cc rejects this. */
++ typedef int charset[2];
++ const charset x;
++ /* SunOS 4.1.1 cc rejects this. */
++ char const *const *ccp;
++ char **p;
++ /* NEC SVR4.0.2 mips cc rejects this. */
++ struct point {int x, y;};
++ static struct point const zero = {0,0};
++ /* AIX XL C 1.02.0.0 rejects this.
++ It does not let you subtract one const X* pointer from another in
++ an arm of an if-expression whose if-part is not a constant
++ expression */
++ const char *g = "string";
++ ccp = &g + (g ? g-g : 0);
++ /* HPUX 7.0 cc rejects these. */
++ ++ccp;
++ p = (char**) ccp;
++ ccp = (char const *const *) p;
++ { /* SCO 3.2v4 cc rejects this. */
++ char *t;
++ char const *s = 0 ? (char *) 0 : (char const *) 0;
++
++ *t++ = 0;
++ if (s) return 0;
++ }
++ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
++ int x[] = {25, 17};
++ const int *foo = &x[0];
++ ++foo;
++ }
++ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
++ typedef const int *iptr;
++ iptr p = 0;
++ ++p;
++ }
++ { /* AIX XL C 1.02.0.0 rejects this saying
++ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
++ struct s { int j; const int *ap[3]; };
++ struct s *b; b->j = 5;
++ }
++ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
++ const int foo = 10;
++ if (!foo) return 0;
++ }
++ return !x[0] && !zero.x;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_const=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_c_const=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
++echo "${ECHO_T}$ac_cv_c_const" >&6; }
++if test $ac_cv_c_const = no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define const
++_ACEOF
++
++fi
++
++{ echo "$as_me:$LINENO: checking for inline" >&5
++echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
++if test "${ac_cv_c_inline+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_c_inline=no
++for ac_kw in inline __inline__ __inline; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#ifndef __cplusplus
++typedef int foo_t;
++static $ac_kw foo_t static_foo () {return 0; }
++$ac_kw foo_t foo () {return 0; }
++#endif
++
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_inline=$ac_kw
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ test "$ac_cv_c_inline" != no && break
++done
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
++echo "${ECHO_T}$ac_cv_c_inline" >&6; }
++
++
++case $ac_cv_c_inline in
++ inline | yes) ;;
++ *)
++ case $ac_cv_c_inline in
++ no) ac_val=;;
++ *) ac_val=$ac_cv_c_inline;;
++ esac
++ cat >>confdefs.h <<_ACEOF
++#ifndef __cplusplus
++#define inline $ac_val
++#endif
++_ACEOF
++ ;;
++esac
++
++
++{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
++if test "${ac_cv_header_stdc+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdlib.h>
++#include <stdarg.h>
++#include <string.h>
++#include <float.h>
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_header_stdc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_header_stdc=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++if test $ac_cv_header_stdc = yes; then
++ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <string.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "memchr" >/dev/null 2>&1; then
++ :
++else
++ ac_cv_header_stdc=no
++fi
++rm -f conftest*
++
++fi
++
++if test $ac_cv_header_stdc = yes; then
++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdlib.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "free" >/dev/null 2>&1; then
++ :
++else
++ ac_cv_header_stdc=no
++fi
++rm -f conftest*
++
++fi
++
++if test $ac_cv_header_stdc = yes; then
++ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
++ if test "$cross_compiling" = yes; then
++ :
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <ctype.h>
++#include <stdlib.h>
++#if ((' ' & 0x0FF) == 0x020)
++# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
++#else
++# define ISLOWER(c) \
++ (('a' <= (c) && (c) <= 'i') \
++ || ('j' <= (c) && (c) <= 'r') \
++ || ('s' <= (c) && (c) <= 'z'))
++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
++#endif
++
++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
++int
++main ()
++{
++ int i;
++ for (i = 0; i < 256; i++)
++ if (XOR (islower (i), ISLOWER (i))
++ || toupper (i) != TOUPPER (i))
++ return 2;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ :
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_header_stdc=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
++echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
++if test $ac_cv_header_stdc = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define STDC_HEADERS 1
++_ACEOF
++
++fi
++
++# On IRIX 5.3, sys/types and inttypes.h are conflicting.
++
++
++
++
++
++
++
++
++
++for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
++ inttypes.h stdint.h unistd.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_Header=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_Header=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++{ echo "$as_me:$LINENO: checking for long" >&5
++echo $ECHO_N "checking for long... $ECHO_C" >&6; }
++if test "${ac_cv_type_long+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++typedef long ac__type_new_;
++int
++main ()
++{
++if ((ac__type_new_ *) 0)
++ return 0;
++if (sizeof (ac__type_new_))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_long=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_type_long=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
++echo "${ECHO_T}$ac_cv_type_long" >&6; }
++
++{ echo "$as_me:$LINENO: checking size of long" >&5
++echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
++if test "${ac_cv_sizeof_long+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$ac_cv_type_long" = yes; then
++ # The cast to long int works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ if test "$cross_compiling" = yes; then
++ # Depending upon the size, compute the lo and hi bounds.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=0 ac_mid=0
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo= ac_hi=
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr '(' $ac_mid ')' + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in
++?*) ac_cv_sizeof_long=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; } ;;
++esac
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
++@%:@include <stdio.h>
++@%:@include <stdlib.h>
++int
++main ()
++{
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
++ {
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%lu\n", i);
++ }
++ return ferror (f) || fclose (f) != 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sizeof_long=`cat conftest.val`
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.val
++else
++ ac_cv_sizeof_long=0
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
++cat >>confdefs.h <<_ACEOF
++@%:@define SIZEOF_LONG $ac_cv_sizeof_long
++_ACEOF
++
++
++
++{ echo "$as_me:$LINENO: checking for long long int" >&5
++echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
++if test "${ac_cv_type_long_long_int+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++typedef long long int ac__type_new_;
++int
++main ()
++{
++if ((ac__type_new_ *) 0)
++ return 0;
++if (sizeof (ac__type_new_))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_long_long_int=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_type_long_long_int=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
++
++{ echo "$as_me:$LINENO: checking size of long long int" >&5
++echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; }
++if test "${ac_cv_sizeof_long_long_int+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$ac_cv_type_long_long_int" = yes; then
++ # The cast to long int works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ if test "$cross_compiling" = yes; then
++ # Depending upon the size, compute the lo and hi bounds.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=0 ac_mid=0
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo= ac_hi=
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr '(' $ac_mid ')' + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in
++?*) ac_cv_sizeof_long_long_int=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long long int)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; } ;;
++esac
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
++@%:@include <stdio.h>
++@%:@include <stdlib.h>
++int
++main ()
++{
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
++ {
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%lu\n", i);
++ }
++ return ferror (f) || fclose (f) != 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sizeof_long_long_int=`cat conftest.val`
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long long int)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.val
++else
++ ac_cv_sizeof_long_long_int=0
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; }
++cat >>confdefs.h <<_ACEOF
++@%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
++_ACEOF
++
++
++{ echo "$as_me:$LINENO: checking for unsigned long long int" >&5
++echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; }
++if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++typedef unsigned long long int ac__type_new_;
++int
++main ()
++{
++if ((ac__type_new_ *) 0)
++ return 0;
++if (sizeof (ac__type_new_))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_unsigned_long_long_int=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_type_unsigned_long_long_int=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; }
++
++{ echo "$as_me:$LINENO: checking size of unsigned long long int" >&5
++echo $ECHO_N "checking size of unsigned long long int... $ECHO_C" >&6; }
++if test "${ac_cv_sizeof_unsigned_long_long_int+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$ac_cv_type_unsigned_long_long_int" = yes; then
++ # The cast to long int works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ if test "$cross_compiling" = yes; then
++ # Depending upon the size, compute the lo and hi bounds.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=0 ac_mid=0
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo= ac_hi=
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr '(' $ac_mid ')' + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in
++?*) ac_cv_sizeof_unsigned_long_long_int=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (unsigned long long int)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; } ;;
++esac
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
++@%:@include <stdio.h>
++@%:@include <stdlib.h>
++int
++main ()
++{
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
++ {
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%lu\n", i);
++ }
++ return ferror (f) || fclose (f) != 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sizeof_unsigned_long_long_int=`cat conftest.val`
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (unsigned long long int)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.val
++else
++ ac_cv_sizeof_unsigned_long_long_int=0
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long_int" >&6; }
++cat >>confdefs.h <<_ACEOF
++@%:@define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int
++_ACEOF
++
++
++if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \
++ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_LONG_LONG_INT
++_ACEOF
++
++ { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
++echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
++if test "${ac_cv_c_bigendian+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # See if sys/param.h defines the BYTE_ORDER macro.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/param.h>
++
++int
++main ()
++{
++#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
++ bogus endian macros
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ # It does; now see whether it defined to BIG_ENDIAN or not.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/param.h>
++
++int
++main ()
++{
++#if BYTE_ORDER != BIG_ENDIAN
++ not big endian
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_bigendian=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_c_bigendian=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # It does not; compile a test program.
++if test "$cross_compiling" = yes; then
++ # try to guess the endianness by grepping values into an object file
++ ac_cv_c_bigendian=unknown
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
++short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
++void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
++short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
++short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
++void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
++int
++main ()
++{
++ _ascii (); _ebcdic ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
++ ac_cv_c_bigendian=yes
++fi
++if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
++ if test "$ac_cv_c_bigendian" = unknown; then
++ ac_cv_c_bigendian=no
++ else
++ # finding both strings is unlikely to happen, but who knows?
++ ac_cv_c_bigendian=unknown
++ fi
++fi
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++
++ /* Are we little or big endian? From Harbison&Steele. */
++ union
++ {
++ long int l;
++ char c[sizeof (long int)];
++ } u;
++ u.l = 1;
++ return u.c[sizeof (long int) - 1] == 1;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_bigendian=no
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_c_bigendian=yes
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
++echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
++case $ac_cv_c_bigendian in
++ yes)
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define WORDS_BIGENDIAN 1
++_ACEOF
++ ;;
++ no)
++ ;;
++ *)
++ { { echo "$as_me:$LINENO: error: unknown endianness
++presetting ac_cv_c_bigendian=no (or yes) will help" >&5
++echo "$as_me: error: unknown endianness
++presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
++ { (exit 1); exit 1; }; } ;;
++esac
++
++fi
++
++
++{ echo "$as_me:$LINENO: checking for __attribute__" >&5
++echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6; }
++if test "${ac_cv___attribute__+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <stdlib.h>
++
++int
++main ()
++{
++
++static void foo(void) __attribute__ ((noreturn));
++
++static void
++foo(void)
++{
++ exit(1);
++}
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv___attribute__=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv___attribute__=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++if test "$ac_cv___attribute__" = "yes"; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE___ATTRIBUTE__ 1
++_ACEOF
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
++echo "${ECHO_T}$ac_cv___attribute__" >&6; }
++
++
++{ echo "$as_me:$LINENO: checking if compiler supports -fPIC" >&5
++echo $ECHO_N "checking if compiler supports -fPIC... $ECHO_C" >&6; }
++if test "${ac_cv_fpic+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++save_CFLAGS=$CFLAGS
++CFLAGS="${CFLAGS} -fPIC"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <stdlib.h>
++
++int
++main ()
++{
++
++static void
++foo(void)
++{
++ exit(1);
++}
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_fpic=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_fpic=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++CFLAGS=$save_CFLAGS
++
++fi
++
++if test "$ac_cv_fpic" = "yes"; then
++ FPIC_CFLAGS="-fPIC"
++else
++ FPIC_CFLAGS=""
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_fpic" >&5
++echo "${ECHO_T}$ac_cv_fpic" >&6; }
++
++
++
++ # CMU GUESS RUNPATH SWITCH
++ andrew_runpath_switch="none"
++
++
++
++
++
++
++for ac_header in unistd.h sys/select.h sys/param.h stdarg.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++
++
++
++for ac_func in memmove strcasecmp ftruncate strerror
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++else
++ case " $LIB@&t at OBJS " in
++ *" $ac_func.$ac_objext "* ) ;;
++ *) LIB@&t at OBJS="$LIB@&t at OBJS $ac_func.$ac_objext"
++ ;;
++esac
++
++fi
++done
++
++
++
++
++for ac_func in strlcat strlcpy
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++
++
++
++ac_header_dirent=no
++for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
++ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
++echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <$ac_hdr>
++
++int
++main ()
++{
++if ((DIR *) 0)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_Header=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_Header=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
++_ACEOF
++
++ac_header_dirent=$ac_hdr; break
++fi
++
++done
++# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
++if test $ac_header_dirent = dirent.h; then
++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
++if test "${ac_cv_search_opendir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char opendir ();
++int
++main ()
++{
++return opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' dir; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir=$ac_res
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_opendir+set}" = set; then
++ break
++fi
++done
++if test "${ac_cv_search_opendir+set}" = set; then
++ :
++else
++ ac_cv_search_opendir=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++fi
++
++else
++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
++if test "${ac_cv_search_opendir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char opendir ();
++int
++main ()
++{
++return opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' x; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir=$ac_res
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_opendir+set}" = set; then
++ break
++fi
++done
++if test "${ac_cv_search_opendir+set}" = set; then
++ :
++else
++ ac_cv_search_opendir=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++fi
++
++fi
++
++
++
++ save_LIBS="$LIBS"
++ LIB_SOCKET=""
++ { echo "$as_me:$LINENO: checking for connect" >&5
++echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
++if test "${ac_cv_func_connect+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define connect to an innocuous variant, in case <limits.h> declares connect.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define connect innocuous_connect
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char connect (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef connect
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char connect ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_connect || defined __stub___connect
++choke me
++#endif
++
++int
++main ()
++{
++return connect ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_connect=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_connect=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
++echo "${ECHO_T}$ac_cv_func_connect" >&6; }
++if test $ac_cv_func_connect = yes; then
++ :
++else
++ { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
++echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lnsl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gethostbyname ();
++int
++main ()
++{
++return gethostbyname ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_nsl_gethostbyname=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_nsl_gethostbyname=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
++echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
++if test $ac_cv_lib_nsl_gethostbyname = yes; then
++ LIB_SOCKET="-lnsl $LIB_SOCKET"
++fi
++
++ { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
++echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
++if test "${ac_cv_lib_socket_connect+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char connect ();
++int
++main ()
++{
++return connect ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_socket_connect=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_socket_connect=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
++if test $ac_cv_lib_socket_connect = yes; then
++ LIB_SOCKET="-lsocket $LIB_SOCKET"
++fi
++
++
++fi
++
++ LIBS="$LIB_SOCKET $save_LIBS"
++ { echo "$as_me:$LINENO: checking for res_search" >&5
++echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
++if test "${ac_cv_func_res_search+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define res_search innocuous_res_search
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char res_search (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef res_search
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char res_search ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_res_search || defined __stub___res_search
++choke me
++#endif
++
++int
++main ()
++{
++return res_search ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_res_search=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_res_search=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
++echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
++if test $ac_cv_func_res_search = yes; then
++ :
++else
++ LIBS="-lresolv $LIB_SOCKET $save_LIBS"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
++#ifdef HAVE_ARPA_NAMESER_COMPAT_H
++#include <arpa/nameser_compat.h>
++#endif
++#include <resolv.h>
++int
++main ()
++{
++
++const char host[12]="openafs.org";
++u_char ans[1024];
++res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
++return 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ LIB_SOCKET="-lresolv $LIB_SOCKET"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++
++fi
++
++ LIBS="$LIB_SOCKET $save_LIBS"
++
++
++for ac_func in dn_expand dns_lookup
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++ LIBS="$save_LIBS"
++
++
++LIBS="$LIBS ${LIB_SOCKET}"
++
++cyrus_cv_getaddrinfo=yes
++
++{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
++echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
++if test "${ac_cv_func_getaddrinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define getaddrinfo innocuous_getaddrinfo
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char getaddrinfo (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef getaddrinfo
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getaddrinfo ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_getaddrinfo || defined __stub___getaddrinfo
++choke me
++#endif
++
++int
++main ()
++{
++return getaddrinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_getaddrinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_getaddrinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; }
++if test $ac_cv_func_getaddrinfo = yes; then
++ ac_cv_lib_socket_getaddrinfo=no
++ ac_cv_lib_inet6_getaddrinfo=no
++
++else
++ { echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
++echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6; }
++if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getaddrinfo ();
++int
++main ()
++{
++return getaddrinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_socket_getaddrinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_socket_getaddrinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6; }
++if test $ac_cv_lib_socket_getaddrinfo = yes; then
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_getaddrinfo=no
++
++else
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
++ if test "${ipv6_cv_dir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done
++fi
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_getaddrinfo=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ { echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
++echo $ECHO_N "checking for getaddrinfo in -linet6... $ECHO_C" >&6; }
++if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-linet6 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getaddrinfo ();
++int
++main ()
++{
++return getaddrinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_inet6_getaddrinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_inet6_getaddrinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_getaddrinfo" >&6; }
++if test $ac_cv_lib_inet6_getaddrinfo = yes; then
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi
++fi
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi
++fi
++
++fi
++ipv6_cv_getaddrinfo=no
++if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
++ -o $ac_cv_lib_inet6_getaddrinfo = yes
++then
++ ipv6_cv_getaddrinfo=yes
++fi
++if test $ipv6_cv_getaddrinfo = no; then
++ if test getaddrinfo = getaddrinfo; then
++ for ipv6_cv_pfx in o n; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <netdb.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
++ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}getaddrinfo... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef ${ipv6_cv_pfx}getaddrinfo
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ${ipv6_cv_pfx}getaddrinfo ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_${ipv6_cv_pfx}getaddrinfo || defined __stub___${ipv6_cv_pfx}getaddrinfo
++choke me
++#endif
++
++int
++main ()
++{
++return ${ipv6_cv_pfx}getaddrinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++rm -f conftest*
++
++ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++
++ ipv6_cv_getaddrinfo=yes
++ break
++ fi
++ done
++ fi
++fi
++if test $ipv6_cv_getaddrinfo = yes; then
++
++{ echo "$as_me:$LINENO: checking for gai_strerror" >&5
++echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6; }
++if test "${ac_cv_func_gai_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define gai_strerror to an innocuous variant, in case <limits.h> declares gai_strerror.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define gai_strerror innocuous_gai_strerror
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char gai_strerror (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef gai_strerror
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gai_strerror ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_gai_strerror || defined __stub___gai_strerror
++choke me
++#endif
++
++int
++main ()
++{
++return gai_strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_gai_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_gai_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_func_gai_strerror" >&6; }
++if test $ac_cv_func_gai_strerror = yes; then
++ ac_cv_lib_socket_gai_strerror=no
++ ac_cv_lib_inet6_gai_strerror=no
++
++else
++ { echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
++echo $ECHO_N "checking for gai_strerror in -lsocket... $ECHO_C" >&6; }
++if test "${ac_cv_lib_socket_gai_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gai_strerror ();
++int
++main ()
++{
++return gai_strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_socket_gai_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_socket_gai_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_gai_strerror" >&6; }
++if test $ac_cv_lib_socket_gai_strerror = yes; then
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_gai_strerror=no
++
++else
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
++ if test "${ipv6_cv_dir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done
++fi
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_gai_strerror=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ { echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
++echo $ECHO_N "checking for gai_strerror in -linet6... $ECHO_C" >&6; }
++if test "${ac_cv_lib_inet6_gai_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-linet6 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gai_strerror ();
++int
++main ()
++{
++return gai_strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_inet6_gai_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_inet6_gai_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_gai_strerror" >&6; }
++if test $ac_cv_lib_inet6_gai_strerror = yes; then
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi
++fi
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi
++fi
++
++fi
++ipv6_cv_gai_strerror=no
++if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \
++ -o $ac_cv_lib_inet6_gai_strerror = yes
++then
++ ipv6_cv_gai_strerror=yes
++fi
++if test $ipv6_cv_gai_strerror = no; then
++ if test gai_strerror = getaddrinfo; then
++ for ipv6_cv_pfx in o n; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <netdb.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then
++ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}gai_strerror... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define ${ipv6_cv_pfx}gai_strerror to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}gai_strerror.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define ${ipv6_cv_pfx}gai_strerror innocuous_${ipv6_cv_pfx}gai_strerror
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char ${ipv6_cv_pfx}gai_strerror (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef ${ipv6_cv_pfx}gai_strerror
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ${ipv6_cv_pfx}gai_strerror ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_${ipv6_cv_pfx}gai_strerror || defined __stub___${ipv6_cv_pfx}gai_strerror
++choke me
++#endif
++
++int
++main ()
++{
++return ${ipv6_cv_pfx}gai_strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++rm -f conftest*
++
++ if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++
++ ipv6_cv_gai_strerror=yes
++ break
++ fi
++ done
++ fi
++fi
++if test $ipv6_cv_gai_strerror = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++
++else
++ cyrus_cv_getaddrinfo=no
++fi
++else
++ cyrus_cv_getaddrinfo=no
++fi
++
++if test $cyrus_cv_getaddrinfo = no; then
++ IPV6_OBJS="getaddrinfo.o"
++fi
++
++cyrus_cv_getnameinfo=yes
++
++{ echo "$as_me:$LINENO: checking for getnameinfo" >&5
++echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6; }
++if test "${ac_cv_func_getnameinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define getnameinfo innocuous_getnameinfo
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char getnameinfo (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef getnameinfo
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getnameinfo ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_getnameinfo || defined __stub___getnameinfo
++choke me
++#endif
++
++int
++main ()
++{
++return getnameinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_getnameinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_getnameinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6; }
++if test $ac_cv_func_getnameinfo = yes; then
++ ac_cv_lib_socket_getnameinfo=no
++ ac_cv_lib_inet6_getnameinfo=no
++
++else
++ { echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
++echo $ECHO_N "checking for getnameinfo in -lsocket... $ECHO_C" >&6; }
++if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getnameinfo ();
++int
++main ()
++{
++return getnameinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_socket_getnameinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_socket_getnameinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_getnameinfo" >&6; }
++if test $ac_cv_lib_socket_getnameinfo = yes; then
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_getnameinfo=no
++
++else
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
++ if test "${ipv6_cv_dir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done
++fi
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_getnameinfo=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ { echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
++echo $ECHO_N "checking for getnameinfo in -linet6... $ECHO_C" >&6; }
++if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-linet6 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getnameinfo ();
++int
++main ()
++{
++return getnameinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_inet6_getnameinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_inet6_getnameinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_getnameinfo" >&6; }
++if test $ac_cv_lib_inet6_getnameinfo = yes; then
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi
++fi
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi
++fi
++
++fi
++ipv6_cv_getnameinfo=no
++if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
++ -o $ac_cv_lib_inet6_getnameinfo = yes
++then
++ ipv6_cv_getnameinfo=yes
++fi
++if test $ipv6_cv_getnameinfo = no; then
++ if test getnameinfo = getaddrinfo; then
++ for ipv6_cv_pfx in o n; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <netdb.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
++ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}getnameinfo... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef ${ipv6_cv_pfx}getnameinfo
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ${ipv6_cv_pfx}getnameinfo ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_${ipv6_cv_pfx}getnameinfo || defined __stub___${ipv6_cv_pfx}getnameinfo
++choke me
++#endif
++
++int
++main ()
++{
++return ${ipv6_cv_pfx}getnameinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++rm -f conftest*
++
++ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++
++ ipv6_cv_getnameinfo=yes
++ break
++ fi
++ done
++ fi
++fi
++if test $ipv6_cv_getnameinfo = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETNAMEINFO
++_ACEOF
++
++else
++ cyrus_cv_getnameinfo=no
++fi
++
++if test $cyrus_cv_getnameinfo = no; then
++ IPV6_OBJS="$IPV6_OBJS getnameinfo.o"
++fi
++
++
++{ echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
++echo $ECHO_N "checking whether you have ss_family in struct sockaddr_storage... $ECHO_C" >&6; }
++if test "${ipv6_cv_ss_family+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/socket.h>
++int
++main ()
++{
++struct sockaddr_storage ss; int i = ss.ss_family;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ipv6_cv_ss_family=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ipv6_cv_ss_family=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++if test $ipv6_cv_ss_family = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_SS_FAMILY
++_ACEOF
++
++else
++ :
++fi
++{ echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
++echo "${ECHO_T}$ipv6_cv_ss_family" >&6; }
++
++{ echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
++echo $ECHO_N "checking whether you have sa_len in struct sockaddr... $ECHO_C" >&6; }
++if test "${ipv6_cv_sa_len+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/socket.h>
++int
++main ()
++{
++struct sockaddr sa; int i = sa.sa_len;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ipv6_cv_sa_len=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ipv6_cv_sa_len=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++if test $ipv6_cv_sa_len = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_SOCKADDR_SA_LEN
++_ACEOF
++
++else
++ :
++fi
++{ echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
++echo "${ECHO_T}$ipv6_cv_sa_len" >&6; }
++
++
++
++
++for ac_header in sys/time.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
++echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
++if test "${ac_cv_header_time+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/time.h>
++#include <time.h>
++
++int
++main ()
++{
++if ((struct tm *) 0)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_header_time=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_header_time=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
++echo "${ECHO_T}$ac_cv_header_time" >&6; }
++if test $ac_cv_header_time = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define TIME_WITH_SYS_TIME 1
++_ACEOF
++
++fi
++
++{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
++echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
++if test "${ac_cv_struct_tm+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <time.h>
++
++int
++main ()
++{
++struct tm *tp; tp->tm_sec;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_struct_tm=time.h
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_struct_tm=sys/time.h
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
++echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
++if test $ac_cv_struct_tm = sys/time.h; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define TM_IN_SYS_TIME 1
++_ACEOF
++
++fi
++
++{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
++echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
++if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <$ac_cv_struct_tm>
++
++
++int
++main ()
++{
++static struct tm ac_aggr;
++if (ac_aggr.tm_zone)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_member_struct_tm_tm_zone=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <$ac_cv_struct_tm>
++
++
++int
++main ()
++{
++static struct tm ac_aggr;
++if (sizeof ac_aggr.tm_zone)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_member_struct_tm_tm_zone=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_member_struct_tm_tm_zone=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
++echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
++if test $ac_cv_member_struct_tm_tm_zone = yes; then
++
++cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_STRUCT_TM_TM_ZONE 1
++_ACEOF
++
++
++fi
++
++if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_TM_ZONE 1
++_ACEOF
++
++else
++ { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
++echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
++if test "${ac_cv_have_decl_tzname+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <time.h>
++
++int
++main ()
++{
++#ifndef tzname
++ char *p = (char *) tzname;
++ return !p;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_tzname=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_have_decl_tzname=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
++echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
++if test $ac_cv_have_decl_tzname = yes; then
++
++cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_DECL_TZNAME 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_DECL_TZNAME 0
++_ACEOF
++
++
++fi
++
++
++ { echo "$as_me:$LINENO: checking for tzname" >&5
++echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
++if test "${ac_cv_var_tzname+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <time.h>
++#if !HAVE_DECL_TZNAME
++extern char *tzname[];
++#endif
++
++int
++main ()
++{
++return tzname[0][0];
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_var_tzname=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_var_tzname=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
++echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
++ if test $ac_cv_var_tzname = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_TZNAME 1
++_ACEOF
++
++ fi
++fi
++
++
++
++
++
++
++
++
++for ac_func in vprintf
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++{ echo "$as_me:$LINENO: checking for _doprnt" >&5
++echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; }
++if test "${ac_cv_func__doprnt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define _doprnt innocuous__doprnt
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char _doprnt (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef _doprnt
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char _doprnt ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub__doprnt || defined __stub____doprnt
++choke me
++#endif
++
++int
++main ()
++{
++return _doprnt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func__doprnt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func__doprnt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
++echo "${ECHO_T}$ac_cv_func__doprnt" >&6; }
++if test $ac_cv_func__doprnt = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_DOPRNT 1
++_ACEOF
++
++fi
++
++fi
++done
++
++
++
++
++CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o"
++
++
++
++# Check whether --with-bdb was given.
++if test "${with_bdb+set}" = set; then
++ withval=$with_bdb; with_bdb=$withval
++else
++ with_bdb="yes"
++fi
++
++
++
++# Check whether --with-dbdir was given.
++if test "${with_dbdir+set}" = set; then
++ withval=$with_dbdir; with_bdb=$withval
++fi
++
++
++case "$with_bdb" in
++ no)
++ use_berkeley="no"
++ ;;
++ yes)
++ use_berkeley="yes"
++ with_bdb_lib=none
++ with_bdb_inc=none
++ ;;
++
++ *)
++ use_berkeley="yes"
++ with_bdb_lib="$with_bdb/lib"
++ with_bdb_inc="$with_bdb/include"
++ ;;
++esac
++
++if test "$use_berkeley" != "no"; then
++
++
++# Check whether --with-bdb-libdir was given.
++if test "${with_bdb_libdir+set}" = set; then
++ withval=$with_bdb_libdir; with_bdb_lib=$withval
++else
++ test "${with_bdb_lib+set}" = set || with_bdb_lib=none
++fi
++
++
++# Check whether --with-bdb-incdir was given.
++if test "${with_bdb_incdir+set}" = set; then
++ withval=$with_bdb_incdir; with_bdb_inc=$withval
++else
++ test "${with_bdb_inc+set}" = set || with_bdb_inc=none
++fi
++
++
++
++
++
++ cmu_save_CPPFLAGS=$CPPFLAGS
++
++ if test -d $with_bdb_inc; then
++ CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
++ BDB_INCADD="-I$with_bdb_inc"
++ else
++ BDB_INCADD=""
++ fi
++
++ if test "${ac_cv_header_db_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for db.h" >&5
++echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_db_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
++echo "${ECHO_T}$ac_cv_header_db_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking db.h usability" >&5
++echo $ECHO_N "checking db.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <db.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking db.h presence" >&5
++echo $ECHO_N "checking db.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <db.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for db.h" >&5
++echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_db_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_db_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
++echo "${ECHO_T}$ac_cv_header_db_h" >&6; }
++
++fi
++if test $ac_cv_header_db_h = yes; then
++
++ BDB_SAVE_LDFLAGS=$LDFLAGS
++
++ if test -d $with_bdb_lib; then
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
++ else
++ LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_runpath_switch$with_bdb_lib"
++ fi
++
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
++ else
++ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_runpath_switch$with_bdb_lib"
++ fi
++
++ else
++ BDB_LIBADD=""
++ fi
++
++ saved_LIBS=$LIBS
++ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
++ do
++ LIBS="$saved_LIBS -l$dbname"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <db.h>
++int
++main ()
++{
++db_create(NULL, NULL, 0);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ dblib="no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++ if test "$dblib" = "berkeley"; then break; fi
++ done
++ if test "$dblib" = "no"; then
++ LIBS="$saved_LIBS -ldb"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <db.h>
++int
++main ()
++{
++db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ dblib="no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++ fi
++ LIBS=$saved_LIBS
++
++ LDFLAGS=$BDB_SAVE_LDFLAGS
++
++else
++ dblib="no"
++fi
++
++
++
++ CPPFLAGS=$cmu_save_CPPFLAGS
++
++
++ if test "$dblib" = "no"; then
++ { { echo "$as_me:$LINENO: error: Berkeley DB 3.x or later was not found. You may need to
++ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&5
++echo "$as_me: error: Berkeley DB 3.x or later was not found. You may need to
++ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++
++ if test "$with_bdb_lib" != "none"; then
++
++ # this is CMU ADD LIBPATH
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
++ else
++ LDFLAGS="-L$with_bdb_lib $andrew_runpath_switch$with_bdb_lib ${LDFLAGS}"
++ fi
++
++ fi
++
++ BDB_INC=${BDB_INCADD}
++ BDB_LIB=${BDB_LIBADD}
++
++
++
++ LIBS="${LIBS} ${BDB_LIBADD}"
++ CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
++
++ CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o"
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_BDB
++_ACEOF
++
++fi
++
++
++
++
++SIEVE_SUBDIRS=""
++sievedir="sieve"
++# Check whether --enable-sieve was given.
++if test "${enable_sieve+set}" = set; then
++ enableval=$enable_sieve; if test "$enableval" = no; then
++ sievedir="no"
++ fi
++fi
++
++
++if test "$sievedir" != "no"; then
++ SIEVE_OBJS="lmtp_sieve.o smtpclient.o"
++
++ SIEVE_LIBS="../${sievedir}/libsieve.a"
++
++ SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir"
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define USE_SIEVE
++_ACEOF
++
++
++ for ac_prog in 'bison -y' byacc
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_YACC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$YACC"; then
++ ac_cv_prog_YACC="$YACC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_YACC="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++YACC=$ac_cv_prog_YACC
++if test -n "$YACC"; then
++ { echo "$as_me:$LINENO: result: $YACC" >&5
++echo "${ECHO_T}$YACC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$YACC" && break
++done
++test -n "$YACC" || YACC="yacc"
++
++ for ac_prog in flex lex
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_LEX+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$LEX"; then
++ ac_cv_prog_LEX="$LEX" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_LEX="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++LEX=$ac_cv_prog_LEX
++if test -n "$LEX"; then
++ { echo "$as_me:$LINENO: result: $LEX" >&5
++echo "${ECHO_T}$LEX" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$LEX" && break
++done
++test -n "$LEX" || LEX=":"
++
++if test -z "$LEXLIB"
++then
++ { echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
++echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_fl_yywrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lfl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char yywrap ();
++int
++main ()
++{
++return yywrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_fl_yywrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_fl_yywrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
++echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6; }
++if test $ac_cv_lib_fl_yywrap = yes; then
++ LEXLIB="-lfl"
++else
++ { echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
++echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6; }
++if test "${ac_cv_lib_l_yywrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ll $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char yywrap ();
++int
++main ()
++{
++return yywrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_l_yywrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_l_yywrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
++echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6; }
++if test $ac_cv_lib_l_yywrap = yes; then
++ LEXLIB="-ll"
++fi
++
++fi
++
++fi
++
++if test "x$LEX" != "x:"; then
++ { echo "$as_me:$LINENO: checking lex output file root" >&5
++echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
++if test "${ac_cv_prog_lex_root+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # The minimal lex program is just a single line: %%. But some broken lexes
++# (Solaris, I think it was) want two %% lines, so accommodate them.
++cat >conftest.l <<_ACEOF
++%%
++%%
++_ACEOF
++{ (ac_try="$LEX conftest.l"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$LEX conftest.l") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++if test -f lex.yy.c; then
++ ac_cv_prog_lex_root=lex.yy
++elif test -f lexyy.c; then
++ ac_cv_prog_lex_root=lexyy
++else
++ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
++echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
++echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
++rm -f conftest.l
++LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
++
++{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
++echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; }
++if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # POSIX says lex can declare yytext either as a pointer or an array; the
++# default is implementation-dependent. Figure out which it is, since
++# not all implementations provide the %pointer and %array declarations.
++ac_cv_prog_lex_yytext_pointer=no
++echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
++ac_save_LIBS=$LIBS
++LIBS="$LIBS $LEXLIB"
++cat >conftest.$ac_ext <<_ACEOF
++`cat $LEX_OUTPUT_ROOT.c`
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_lex_yytext_pointer=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_save_LIBS
++rm -f "${LEX_OUTPUT_ROOT}.c"
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
++echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; }
++if test $ac_cv_prog_lex_yytext_pointer = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define YYTEXT_POINTER 1
++_ACEOF
++
++fi
++
++fi
++
++{ echo "$as_me:$LINENO: checking for main in -lfl" >&5
++echo $ECHO_N "checking for main in -lfl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_fl_main+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lfl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++
++int
++main ()
++{
++return main ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_fl_main=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_fl_main=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_main" >&5
++echo "${ECHO_T}$ac_cv_lib_fl_main" >&6; }
++if test $ac_cv_lib_fl_main = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_LIBFL 1
++_ACEOF
++
++ LIBS="-lfl $LIBS"
++
++fi
++
++
++ { echo "$as_me:$LINENO: checking for library containing regcomp" >&5
++echo $ECHO_N "checking for library containing regcomp... $ECHO_C" >&6; }
++if test "${ac_cv_search_regcomp+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char regcomp ();
++int
++main ()
++{
++return regcomp ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' rx regex; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_regcomp=$ac_res
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_regcomp+set}" = set; then
++ break
++fi
++done
++if test "${ac_cv_search_regcomp+set}" = set; then
++ :
++else
++ ac_cv_search_regcomp=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_search_regcomp" >&5
++echo "${ECHO_T}$ac_cv_search_regcomp" >&6; }
++ac_res=$ac_cv_search_regcomp
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define ENABLE_REGEX
++_ACEOF
++
++ if test "${ac_cv_header_rxposix_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for rxposix.h" >&5
++echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_rxposix_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
++echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking rxposix.h usability" >&5
++echo $ECHO_N "checking rxposix.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <rxposix.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking rxposix.h presence" >&5
++echo $ECHO_N "checking rxposix.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <rxposix.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: rxposix.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: rxposix.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: rxposix.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: rxposix.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: rxposix.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: rxposix.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for rxposix.h" >&5
++echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_rxposix_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_rxposix_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
++echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6; }
++
++fi
++if test $ac_cv_header_rxposix_h = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_RX
++_ACEOF
++
++fi
++
++
++fi
++
++
++
++ SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile"
++fi
++
++
++
++{ echo "$as_me:$LINENO: checking for strerror" >&5
++echo $ECHO_N "checking for strerror... $ECHO_C" >&6; }
++if test "${ac_cv_func_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define strerror innocuous_strerror
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char strerror (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef strerror
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char strerror ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_strerror || defined __stub___strerror
++choke me
++#endif
++
++int
++main ()
++{
++return strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
++echo "${ECHO_T}$ac_cv_func_strerror" >&6; }
++if test $ac_cv_func_strerror = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAS_STRERROR
++_ACEOF
++
++else
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define NEED_SYS_ERRLIST
++_ACEOF
++
++fi
++
++
++
++for ac_header in sys/resource.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++for ac_func in setrlimit
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++for ac_func in getrlimit
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++
++for ac_func in daemon setsid
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++for ac_func in shutdown
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/socket.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "socklen_t" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_SOCKLEN_T
++_ACEOF
++
++fi
++rm -f conftest*
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/socket.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "sockaddr_storage" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_STRUCT_SOCKADDR_STORAGE
++_ACEOF
++
++fi
++rm -f conftest*
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/resource.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "rlim_t" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_RLIM_T
++_ACEOF
++
++fi
++rm -f conftest*
++
++
++spt_type=""
++{ echo "$as_me:$LINENO: checking for setproctitle" >&5
++echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6; }
++if test "${ac_cv_func_setproctitle+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define setproctitle innocuous_setproctitle
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char setproctitle (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef setproctitle
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char setproctitle ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_setproctitle || defined __stub___setproctitle
++choke me
++#endif
++
++int
++main ()
++{
++return setproctitle ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_setproctitle=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_setproctitle=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
++echo "${ECHO_T}$ac_cv_func_setproctitle" >&6; }
++if test $ac_cv_func_setproctitle = yes; then
++ spt_type=SPT_BUILTIN
++fi
++
++if test "$spt_type" = ""; then
++ { echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
++echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6; }
++if test "${ac_cv_lib_util_setproctitle+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lutil $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char setproctitle ();
++int
++main ()
++{
++return setproctitle ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_util_setproctitle=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_util_setproctitle=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
++echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6; }
++if test $ac_cv_lib_util_setproctitle = yes; then
++ spt_type=SPT_BUILTIN
++ LIBS="${LIBS} -lutil"
++fi
++
++fi
++if test "$spt_type" = ""; then
++ if test "${ac_cv_header_sys_pstat_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
++echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sys_pstat_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sys/pstat.h usability" >&5
++echo $ECHO_N "checking sys/pstat.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sys/pstat.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sys/pstat.h presence" >&5
++echo $ECHO_N "checking sys/pstat.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sys/pstat.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sys/pstat.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sys/pstat.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sys/pstat.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
++echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sys_pstat_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sys_pstat_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6; }
++
++fi
++if test $ac_cv_header_sys_pstat_h = yes; then
++ spt_type=SPT_PSTAT
++fi
++
++
++fi
++if test "$spt_type" = ""; then
++ if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
++echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sys/sysnews.h usability" >&5
++echo $ECHO_N "checking sys/sysnews.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sys/sysnews.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sys/sysnews.h presence" >&5
++echo $ECHO_N "checking sys/sysnews.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sys/sysnews.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sys/sysnews.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sys/sysnews.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
++echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sys_sysnews_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6; }
++
++fi
++if test $ac_cv_header_sys_sysnews_h = yes; then
++ spt_type=SPT_SYSMIPS
++fi
++
++
++fi
++if test "$spt_type" = ""; then
++ { echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
++echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6; }
++ if test "${cyrus_cv_sys_psstrings+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <machine/vmparam.h>
++#include <sys/exec.h>
++#ifndef PS_STRINGS
++#include </nonexistent>
++#endif
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ cyrus_cv_sys_psstrings=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_sys_psstrings=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++fi
++
++ if test $cyrus_cv_sys_psstrings = yes; then
++ spt_type=SPT_PSSTRINGS
++ fi
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_psstrings" >&5
++echo "${ECHO_T}$cyrus_cv_sys_psstrings" >&6; }
++fi
++if test "$spt_type" = ""; then
++ { echo "$as_me:$LINENO: checking for SCO" >&5
++echo $ECHO_N "checking for SCO... $ECHO_C" >&6; }
++ if test "${cyrus_cv_sys_sco+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#ifndef _SCO_unix_
++#include </nonexistent>
++#endif
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ cyrus_cv_sys_sco=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_sys_sco=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++fi
++
++ if test $cyrus_cv_sys_sco = yes; then
++ spt_type=SPT_SCO
++ fi
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_sco" >&5
++echo "${ECHO_T}$cyrus_cv_sys_sco" >&6; }
++fi
++if test "$spt_type" = ""; then
++ { echo "$as_me:$LINENO: checking for setproctitle usability" >&5
++echo $ECHO_N "checking for setproctitle usability... $ECHO_C" >&6; }
++ if test "${cyrus_cv_sys_setproctitle+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#if defined(DGUX) || defined(_SEQUENT_) || defined(apollo)
++#include </nonexistent>
++#endif
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ cyrus_cv_sys_setproctitle=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_sys_setproctitle=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++fi
++
++ if test $cyrus_cv_sys_setproctitle = no; then
++ spt_type=SPT_NONE
++ fi
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_setproctitle" >&5
++echo "${ECHO_T}$cyrus_cv_sys_setproctitle" >&6; }
++fi
++if test "$spt_type" != ""; then
++
++cat >>confdefs.h <<_ACEOF
++@%:@define SPT_TYPE $spt_type
++_ACEOF
++
++fi
++
++{ echo "$as_me:$LINENO: checking nonblocking method" >&5
++echo $ECHO_N "checking nonblocking method... $ECHO_C" >&6; }
++if test "${cyrus_cv_sys_nonblock+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/file.h>
++#include <fcntl.h>
++#ifndef FNDELAY
++#define FNDELAY O_NDELAY
++#endif
++int
++main ()
++{
++fcntl(0, F_GETFL, 0)&FNDELAY
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cyrus_cv_sys_nonblock=fcntl
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_sys_nonblock=ioctl
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++
++WITH_NONBLOCK=$cyrus_cv_sys_nonblock
++
++{ echo "$as_me:$LINENO: result: $WITH_NONBLOCK" >&5
++echo "${ECHO_T}$WITH_NONBLOCK" >&6; }
++
++{ echo "$as_me:$LINENO: checking timezone GMT offset method" >&5
++echo $ECHO_N "checking timezone GMT offset method... $ECHO_C" >&6; }
++if test "${cyrus_cv_struct_sys_gmtoff+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <time.h>
++int
++main ()
++{
++struct tm tm;
++tm.tm_gmtoff = 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cyrus_cv_struct_sys_gmtoff=tm
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_struct_sys_gmtoff=gmtime
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff
++
++{ echo "$as_me:$LINENO: result: $WITH_GMTOFF" >&5
++echo "${ECHO_T}$WITH_GMTOFF" >&6; }
++{ echo "$as_me:$LINENO: checking for shared mmap" >&5
++echo $ECHO_N "checking for shared mmap... $ECHO_C" >&6; }
++if test "${cyrus_cv_func_mmap_shared+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$cross_compiling" = yes; then
++ cyrus_cv_func_mmap_shared=no
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#include <sys/mman.h>
++#include <fcntl.h>
++main() {
++char *base;
++int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
++if (fd == -1) exit(1);
++if (write(fd, "test", 4) != 4) exit(1);
++fsync(fd);
++base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED
++#ifdef MAP_FILE
++| MAP_FILE
++#endif
++#ifdef MAP_VARIABLE
++| MAP_VARIABLE
++#endif
++, fd, 0L);
++if (base == (caddr_t)-1) exit(1);
++if (strncmp(base, "test", 4) != 0) exit(1);
++if (write(fd, "test", 4) != 4) exit(1);
++fsync(fd);
++if (strncmp(base+4, "test", 4) != 0) exit(1);
++exit(0);}
++
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cyrus_cv_func_mmap_shared=yes
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++cyrus_cv_func_mmap_shared=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++
++{ echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_shared" >&5
++echo "${ECHO_T}$cyrus_cv_func_mmap_shared" >&6; }
++if test $cyrus_cv_func_mmap_shared = yes; then
++ WITH_MAP="shared"
++else
++{ echo "$as_me:$LINENO: checking for stupid shared mmap" >&5
++echo $ECHO_N "checking for stupid shared mmap... $ECHO_C" >&6; }
++if test "${cyrus_cv_func_mmap_stupidshared+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$cross_compiling" = yes; then
++ cyrus_cv_func_mmap_stupidshared=no
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#include <sys/mman.h>
++#include <fcntl.h>
++main() {
++char *base;
++int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
++if (fd == -1) exit(1);
++if (write(fd, "test", 4) != 4) exit(1);
++fsync(fd);
++base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED
++#ifdef MAP_FILE
++| MAP_FILE
++#endif
++#ifdef MAP_VARIABLE
++| MAP_VARIABLE
++#endif
++, fd, 0L);
++if (base == (caddr_t)-1) exit(1);
++if (strncmp(base, "test", 4) != 0) exit(1);
++lseek(fd, 0L, 0);
++if (write(fd, "xyzz", 4) != 4) exit(1);
++fsync(fd);
++if (strncmp(base, "xyzz", 4) != 0) exit(1);
++exit(0);}
++
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cyrus_cv_func_mmap_stupidshared=yes
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++cyrus_cv_func_mmap_stupidshared=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++
++{ echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_stupidshared" >&5
++echo "${ECHO_T}$cyrus_cv_func_mmap_stupidshared" >&6; }
++if test $cyrus_cv_func_mmap_stupidshared = yes; then
++ WITH_MAP="stupidshared"
++else
++ { echo "$as_me:$LINENO: WARNING: *** This system does not have a working mmap()" >&5
++echo "$as_me: WARNING: *** This system does not have a working mmap()" >&2;}
++ { echo "$as_me:$LINENO: WARNING: *** Expect a considerable performance penalty" >&5
++echo "$as_me: WARNING: *** Expect a considerable performance penalty" >&2;}
++ WITH_MAP=nommap
++fi
++fi
++
++
++
++# Check whether --with-lock was given.
++if test "${with_lock+set}" = set; then
++ withval=$with_lock; WITH_LOCK="$withval"
++else
++
++ { echo "$as_me:$LINENO: checking for fcntl" >&5
++echo $ECHO_N "checking for fcntl... $ECHO_C" >&6; }
++if test "${ac_cv_func_fcntl+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define fcntl to an innocuous variant, in case <limits.h> declares fcntl.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define fcntl innocuous_fcntl
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char fcntl (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef fcntl
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char fcntl ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_fcntl || defined __stub___fcntl
++choke me
++#endif
++
++int
++main ()
++{
++return fcntl ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_fcntl=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_fcntl=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_fcntl" >&5
++echo "${ECHO_T}$ac_cv_func_fcntl" >&6; }
++if test $ac_cv_func_fcntl = yes; then
++ WITH_LOCK="fcntl"
++else
++
++ { echo "$as_me:$LINENO: checking for flock" >&5
++echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
++if test "${ac_cv_func_flock+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define flock to an innocuous variant, in case <limits.h> declares flock.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define flock innocuous_flock
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char flock (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef flock
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char flock ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_flock || defined __stub___flock
++choke me
++#endif
++
++int
++main ()
++{
++return flock ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_flock=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_flock=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_flock" >&5
++echo "${ECHO_T}$ac_cv_func_flock" >&6; }
++if test $ac_cv_func_flock = yes; then
++ WITH_LOCK="flock"
++else
++
++ { { echo "$as_me:$LINENO: error: unable to detect locking method" >&5
++echo "$as_me: error: unable to detect locking method" >&2;}
++ { (exit 1); exit 1; }; }
++
++fi
++
++
++fi
++
++
++fi
++
++
++
++
++LIB_RT=""
++{ echo "$as_me:$LINENO: checking for fdatasync" >&5
++echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
++if test "${ac_cv_func_fdatasync+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define fdatasync to an innocuous variant, in case <limits.h> declares fdatasync.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define fdatasync innocuous_fdatasync
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char fdatasync (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef fdatasync
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char fdatasync ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_fdatasync || defined __stub___fdatasync
++choke me
++#endif
++
++int
++main ()
++{
++return fdatasync ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_fdatasync=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_fdatasync=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_fdatasync" >&5
++echo "${ECHO_T}$ac_cv_func_fdatasync" >&6; }
++if test $ac_cv_func_fdatasync = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_FDATASYNC
++_ACEOF
++
++else
++
++ { echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
++echo $ECHO_N "checking for fdatasync in -lrt... $ECHO_C" >&6; }
++if test "${ac_cv_lib_rt_fdatasync+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrt $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char fdatasync ();
++int
++main ()
++{
++return fdatasync ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_rt_fdatasync=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_rt_fdatasync=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
++echo "${ECHO_T}$ac_cv_lib_rt_fdatasync" >&6; }
++if test $ac_cv_lib_rt_fdatasync = yes; then
++
++ LIB_RT="-lrt"
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_FDATASYNC
++_ACEOF
++
++
++fi
++
++
++fi
++
++
++cant_find_sigvec=no
++if test "${cyrus_sigveclib+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ { echo "$as_me:$LINENO: checking for sigvec" >&5
++echo $ECHO_N "checking for sigvec... $ECHO_C" >&6; }
++if test "${ac_cv_func_sigvec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define sigvec to an innocuous variant, in case <limits.h> declares sigvec.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define sigvec innocuous_sigvec
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char sigvec (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef sigvec
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sigvec ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_sigvec || defined __stub___sigvec
++choke me
++#endif
++
++int
++main ()
++{
++return sigvec ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_sigvec=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_sigvec=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_sigvec" >&5
++echo "${ECHO_T}$ac_cv_func_sigvec" >&6; }
++if test $ac_cv_func_sigvec = yes; then
++
++ cyrus_sigveclib=""
++
++else
++
++ { echo "$as_me:$LINENO: checking for sigvec in -lBSD" >&5
++echo $ECHO_N "checking for sigvec in -lBSD... $ECHO_C" >&6; }
++if test "${ac_cv_lib_BSD_sigvec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lBSD $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sigvec ();
++int
++main ()
++{
++return sigvec ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_BSD_sigvec=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_BSD_sigvec=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_sigvec" >&5
++echo "${ECHO_T}$ac_cv_lib_BSD_sigvec" >&6; }
++if test $ac_cv_lib_BSD_sigvec = yes; then
++ cyrus_sigveclib="-lBSD"
++else
++
++ SAVE_LDFLAGS="$LDFLAGS"
++ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
++ { echo "$as_me:$LINENO: checking for sigvec in -lucb" >&5
++echo $ECHO_N "checking for sigvec in -lucb... $ECHO_C" >&6; }
++if test "${ac_cv_lib_ucb_sigvec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lucb $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sigvec ();
++int
++main ()
++{
++return sigvec ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ucb_sigvec=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_ucb_sigvec=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_sigvec" >&5
++echo "${ECHO_T}$ac_cv_lib_ucb_sigvec" >&6; }
++if test $ac_cv_lib_ucb_sigvec = yes; then
++
++ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"
++else
++ cant_find_sigvec=yes
++fi
++
++ LDFLAGS="$SAVE_LDFLAGS"
++fi
++
++
++fi
++
++
++fi
++
++
++
++# ok, we still look for this stuff because of checking groups, but
++# all authentication goes through SASL
++
++
++# Check whether --with-afs was given.
++if test "${with_afs+set}" = set; then
++ withval=$with_afs; with_afs="${withval}"
++else
++ with_afs="no"
++fi
++
++
++
++# Check whether --with-ldap was given.
++if test "${with_ldap+set}" = set; then
++ withval=$with_ldap; with_ldap="${withval}"
++else
++ with_ldap="no"
++fi
++
++
++# Check whether --enable-krb5afspts was given.
++if test "${enable_krb5afspts+set}" = set; then
++ enableval=$enable_krb5afspts; SASL_GSSAPI_LIBS_SET="yes"
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define AFSPTS_USE_KRB5
++_ACEOF
++
++fi
++
++
++if test "x$with_afs" != "xno"; then
++ if test ! -d $with_afs; then
++ $with_afs=/usr/local
++ fi
++ CFLAGS="${CFLAGS} -I${with_afs}/include"
++ AFS_LIBS="${with_afs}/lib/afs/libkauth.a ${with_afs}/lib/afs/libprot.a ${with_afs}/lib/afs/libauth.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/librxkad.a ${with_afs}/lib/librx.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/libubik.a ${with_afs}/lib/liblwp.a ${with_afs}/lib/afs/util.a"
++ if test -f ${with_afs}/lib/afs/libaudit.a; then
++ AFS_LIBS="$AFS_LIBS ${with_afs}/lib/afs/libaudit.a"
++ fi
++ if test -f /usr/ucblib/libucb.a; then
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS}"
++ else
++ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS} $andrew_runpath_switch/usr/ucblib"
++ fi
++
++ AFS_LIBS="$AFS_LIBS -lc -lucb"
++ fi
++
++ if test "${cyrus_afs_sigvec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ SAVE_LIBS="$LIBS"
++ LIBS="${with_afs}/lib/liblwp.a"
++ { echo "$as_me:$LINENO: checking if AFS libraries need sigvec" >&5
++echo $ECHO_N "checking if AFS libraries need sigvec... $ECHO_C" >&6; }
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++IOMGR_Initialize();
++int
++main ()
++{
++IOMGR_Initialize()
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++ cyrus_afs_sigvec="no"
++
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++ cyrus_afs_sigvec="yes"
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++
++fi
++
++ if test "$cyrus_afs_sigvec" = yes; then
++ if test "$cant_find_sigvec" = yes; then
++ { echo "$as_me:$LINENO: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&5
++echo "$as_me: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&2;}
++ else
++ AFS_LIBS="${AFS_LIBS} $cyrus_sigveclib"
++
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_AFSKRB
++_ACEOF
++
++ fi
++ else
++ AFS_LIBS="${AFS_LIBS}"
++
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_AFSKRB
++_ACEOF
++
++ fi
++ LIBS="$SAVE_LIBS"
++fi
++
++LDAP_CPPFLAGS=""
++LDAP_LDFLAGS=""
++LDAP_LIBS=""
++
++if test "x$with_ldap" != "xno"; then
++ if test ! -d $with_ldap; then
++ $with_ldap=/usr/local
++ fi
++
++ LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
++ LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib"
++ LDAP_LIBS=""
++
++ save_CPPFLAGS=$CPPFLAGS
++ save_LDFLAGS=$LDFLAGS
++ CPPFLAGS=$LDAP_CPPFLAGS
++ LDFLAGS=$LDAP_LDFLAGS
++
++ { echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
++echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6; }
++if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lldap -llber $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ldap_initialize ();
++int
++main ()
++{
++return ldap_initialize ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ldap_ldap_initialize=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_ldap_ldap_initialize=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
++echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6; }
++if test $ac_cv_lib_ldap_ldap_initialize = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_LDAP
++_ACEOF
++
++
++
++
++ LDAP_LIBS="-lldap -llber"
++fi
++
++
++ CPPFLAGS=$save_CPPFLAGS
++ LDFLAGS=$LDAP_LDFLAGS
++
++ { echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
++echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6; }
++if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lldap -llber $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ldap_initialize ();
++int
++main ()
++{
++return ldap_initialize ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ldap_ldap_initialize=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_ldap_ldap_initialize=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
++echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6; }
++if test $ac_cv_lib_ldap_ldap_initialize = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_LDAP
++_ACEOF
++
++
++
++
++ LDAP_LIBS="-lldap -llber"
++fi
++
++
++ CPPFLAGS=$save_CPPFLAGS
++ LDFLAGS=$save_LDFLAGS
++fi
++
++if test "x$with_afs" != "xno" -o "x$with_ldap" != "xno"; then
++ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile"
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define WITH_PTS
++_ACEOF
++
++fi
++
++
++
++SERVER_SUBDIRS="master imap"
++# Check whether --enable-server was given.
++if test "${enable_server+set}" = set; then
++ enableval=$enable_server; if test "$enableval" = no; then
++ SERVER_SUBDIRS=""
++ fi
++fi
++
++
++# We always output a server makefile (just because we can)
++
++
++# Check whether --with-krb was given.
++if test "${with_krb+set}" = set; then
++ withval=$with_krb; with_krb="$withval"
++else
++ with_krb="no"
++fi
++
++
++
++# Check whether --with-krbimpl was given.
++if test "${with_krbimpl+set}" = set; then
++ withval=$with_krbimpl; with_krbimpl="$withval"
++else
++ with_krbimpl="kth"
++fi
++
++
++# Check whether --enable-statickrb was given.
++if test "${enable_statickrb+set}" = set; then
++ enableval=$enable_statickrb; with_statickrb="yes"
++else
++ with_statickrb="no"
++fi
++
++
++
++
++{ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
++if test "${ac_cv_lib_resolv_res_search+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char res_search ();
++int
++main ()
++{
++return res_search ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_resolv_res_search=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_resolv_res_search=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
++if test $ac_cv_lib_resolv_res_search = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_LIBRESOLV 1
++_ACEOF
++
++ LIBS="-lresolv $LIBS"
++
++fi
++
++
++if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then
++ { { echo "$as_me:$LINENO: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&5
++echo "$as_me: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++if test "$with_krb" != "no"; then
++
++# Check whether --with-krbdes was given.
++if test "${with_krbdes+set}" = set; then
++ withval=$with_krbdes; with_krbdes="$withval"
++else
++ with_krbdes="yes"
++fi
++
++if test "$with_krbdes" = "yes"; then
++ { echo "$as_me:$LINENO: checking for des_ecb_encrypt in -ldes" >&5
++echo $ECHO_N "checking for des_ecb_encrypt in -ldes... $ECHO_C" >&6; }
++if test "${ac_cv_lib_des_des_ecb_encrypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldes $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char des_ecb_encrypt ();
++int
++main ()
++{
++return des_ecb_encrypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_des_des_ecb_encrypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_des_des_ecb_encrypt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_ecb_encrypt" >&5
++echo "${ECHO_T}$ac_cv_lib_des_des_ecb_encrypt" >&6; }
++if test $ac_cv_lib_des_des_ecb_encrypt = yes; then
++ if test "$with_statickrb" = "yes"; then
++ KRB_LIBS="$with_krb/lib/libdes.a"
++ else
++ KRB_LIBS="-ldes"
++ fi
++else
++ { { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
++echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++fi
++fi
++
++if test -d ${with_krb}; then
++ { echo "$as_me:$LINENO: checking for Kerberos includes" >&5
++echo $ECHO_N "checking for Kerberos includes... $ECHO_C" >&6; }
++if test "${cyrus_krbinclude+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ for krbhloc in include/kerberosIV include
++ do
++ if test -f ${with_krb}/${krbhloc}/krb.h ; then
++ cyrus_krbinclude=${with_krb}/${krbhloc}
++ break
++ fi
++ done
++
++fi
++{ echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
++echo "${ECHO_T}$cyrus_krbinclude" >&6; }
++
++ if test -n "${cyrus_krbinclude}"; then
++ CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
++ fi
++
++ # this is CMU ADD LIBPATH
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L${with_krb}/lib ${LDFLAGS}"
++ else
++ LDFLAGS="-L${with_krb}/lib $andrew_runpath_switch${with_krb}/lib ${LDFLAGS}"
++ fi
++
++fi
++
++if test "$with_krbimpl" != "kth"; then
++ KRBLIB="krb4"
++else
++ KRBLIB="krb"
++fi
++
++if test "$with_des" != no; then
++ if test "${ac_cv_header_krb_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for krb.h" >&5
++echo $ECHO_N "checking for krb.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_krb_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
++echo "${ECHO_T}$ac_cv_header_krb_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking krb.h usability" >&5
++echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <krb.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking krb.h presence" >&5
++echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <krb.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for krb.h" >&5
++echo $ECHO_N "checking for krb.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_krb_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_krb_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
++echo "${ECHO_T}$ac_cv_header_krb_h" >&6; }
++
++fi
++if test $ac_cv_header_krb_h = yes; then
++ as_ac_Lib=`echo "ac_cv_lib_${KRBLIB}''_krb_mk_priv" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for krb_mk_priv in -l${KRBLIB}" >&5
++echo $ECHO_N "checking for krb_mk_priv in -l${KRBLIB}... $ECHO_C" >&6; }
++if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-l${KRBLIB} $KRB_LIBS $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char krb_mk_priv ();
++int
++main ()
++{
++return krb_mk_priv ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_Lib=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_Lib=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++ac_res=`eval echo '${'$as_ac_Lib'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++ if test "$with_statickrb" = "yes"; then
++ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
++ else
++ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
++ fi
++else
++ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
++echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
++fi
++
++else
++ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
++echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
++fi
++
++
++else
++ { echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
++echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
++ krb4=no
++fi
++
++if test "${krb4}" != no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_KRB
++_ACEOF
++
++fi
++
++LIBS="$KRB_LIBS $LIBS"
++
++SASL_GSSAPI_LIBS_SET="yes"
++
++
++IMAP_PROGS=""
++
++# Check whether --with-openssl was given.
++if test "${with_openssl+set}" = set; then
++ withval=$with_openssl; with_openssl="${withval}"
++fi
++
++
++OPENSSL_INC=
++OPENSSL_LIB=
++case "$with_openssl" in
++ no) with_openssl="no";;
++ ""|yes)
++ LIB_RSAREF=""
++ { echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
++echo $ECHO_N "checking for RSAPublicEncrypt in -lrsaref... $ECHO_C" >&6; }
++if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrsaref $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char RSAPublicEncrypt ();
++int
++main ()
++{
++return RSAPublicEncrypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_rsaref_RSAPublicEncrypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_rsaref_RSAPublicEncrypt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
++echo "${ECHO_T}$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
++if test $ac_cv_lib_rsaref_RSAPublicEncrypt = yes; then
++ LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
++else
++ cmu_have_rsaref=no
++fi
++
++
++ with_openssl="yes"
++ { echo "$as_me:$LINENO: checking for BIO_accept in -lcrypto" >&5
++echo $ECHO_N "checking for BIO_accept in -lcrypto... $ECHO_C" >&6; }
++if test "${ac_cv_lib_crypto_BIO_accept+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypto $LIB_RSAREF $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char BIO_accept ();
++int
++main ()
++{
++return BIO_accept ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_crypto_BIO_accept=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_crypto_BIO_accept=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_BIO_accept" >&5
++echo "${ECHO_T}$ac_cv_lib_crypto_BIO_accept" >&6; }
++if test $ac_cv_lib_crypto_BIO_accept = yes; then
++ LIBS="-lcrypto $LIB_RSAREF ${LIBS}"
++else
++ with_openssl="no"
++fi
++
++ { echo "$as_me:$LINENO: checking for SSL_CTX_new in -lssl" >&5
++echo $ECHO_N "checking for SSL_CTX_new in -lssl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_ssl_SSL_CTX_new+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lssl -lcrypto $LIB_RSAREF $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char SSL_CTX_new ();
++int
++main ()
++{
++return SSL_CTX_new ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ssl_SSL_CTX_new=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_ssl_SSL_CTX_new=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5
++echo "${ECHO_T}$ac_cv_lib_ssl_SSL_CTX_new" >&6; }
++if test $ac_cv_lib_ssl_SSL_CTX_new = yes; then
++ LIBS="-lssl ${LIBS}"
++else
++ with_openssl="no"
++fi
++
++
++ ;;
++ *) OPENSSL_INC="-I${with_openssl}/include"
++ OPENSSL_LIBPATH="${with_openssl}/lib"
++ OPENSSL_LIB="-L${OPENSSL_LIBPATH}"
++ CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}"
++
++ # this is CMU ADD LIBPATH
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L${OPENSSL_LIBPATH} ${LDFLAGS}"
++ else
++ LDFLAGS="-L${OPENSSL_LIBPATH} $andrew_runpath_switch${OPENSSL_LIBPATH} ${LDFLAGS}"
++ fi
++
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB}"
++ else
++ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB} $andrew_runpath_switch${OPENSSL_LIBPATH}"
++ fi
++
++ LIBS="${LIBS} -lssl -lcrypto";;
++esac
++
++{ echo "$as_me:$LINENO: checking for openssl" >&5
++echo $ECHO_N "checking for openssl... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: result: $with_openssl" >&5
++echo "${ECHO_T}$with_openssl" >&6; }
++
++if test "$with_openssl" != "no"; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_SSL
++_ACEOF
++
++ IMAP_PROGS="$IMAP_PROGS tls_prune"
++ if test "${krb4}" != no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define OPENSSL_ENABLE_OLD_DES_SUPPORT
++_ACEOF
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define OPENSSL_DES_LIBDES_COMPATIBILITY
++_ACEOF
++
++ fi
++fi
++
++
++
++
++# Check whether --with-egd-socket was given.
++if test "${with_egd_socket+set}" = set; then
++ withval=$with_egd_socket; EGD_SOCKET="$withval"
++
++fi
++
++if test -n "$EGD_SOCKET" ; then
++
++cat >>confdefs.h <<_ACEOF
++@%:@define EGD_SOCKET "$EGD_SOCKET"
++_ACEOF
++
++fi
++
++
++# Check whether --with-zephyr was given.
++if test "${with_zephyr+set}" = set; then
++ withval=$with_zephyr; with_zephyr="${withval}"
++fi
++
++if test -z "$with_zephyr"; then
++ if test -f /usr/local/lib/libzephyr.a; then
++ with_zephyr="/usr/local"
++ elif test -f /usr/lib/libzephyr.a; then
++ with_zephyr="/usr"
++ fi
++fi
++ZEPHYR_LIBS=""
++ZEPHYR_CPPFLAGS=""
++case "$with_zephyr" in
++ no) true;;
++ ""|yes) { echo "$as_me:$LINENO: checking for ZInitialize in -lzephyr" >&5
++echo $ECHO_N "checking for ZInitialize in -lzephyr... $ECHO_C" >&6; }
++if test "${ac_cv_lib_zephyr_ZInitialize+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lzephyr $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ZInitialize ();
++int
++main ()
++{
++return ZInitialize ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_zephyr_ZInitialize=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_zephyr_ZInitialize=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitialize" >&5
++echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitialize" >&6; }
++if test $ac_cv_lib_zephyr_ZInitialize = yes; then
++ ZEPHYR_LIBS="-lzephyr"
++else
++ with_zephyr="no"
++fi
++;;
++ *) if test -d ${with_zephyr}/include/zephyr; then
++ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include/zephyr"
++ else
++ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include"
++ fi
++ ZEPHYR_LIBS="-lzephyr";;
++esac
++
++
++if test "$with_zephyr" != "no"; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_ZEPHYR
++_ACEOF
++
++fi
++
++
++# Check whether --with-pidfile was given.
++if test "${with_pidfile+set}" = set; then
++ withval=$with_pidfile; MASTERPIDFILE="$withval"
++else
++ MASTERPIDFILE="/var/run/cyrus-master.pid"
++fi
++
++MASTERPIDFILE="\"$MASTERPIDFILE\""
++
++cat >>confdefs.h <<_ACEOF
++@%:@define MASTER_PIDFILE $MASTERPIDFILE
++_ACEOF
++
++
++# Check whether --enable-idled was given.
++if test "${enable_idled+set}" = set; then
++ enableval=$enable_idled; if test "$enable_val" != no; then
++ IMAP_PROGS="$IMAP_PROGS idled"
++ fi
++fi
++
++
++ENABLE_NNTP=no
++# Check whether --enable-nntp was given.
++if test "${enable_nntp+set}" = set; then
++ enableval=$enable_nntp; ENABLE_NNTP=$enableval
++ if test "$ENABLE_NNTP" != no; then
++ IMAP_PROGS="$IMAP_PROGS nntpd fetchnews"
++ fi
++fi
++
++
++ENABLE_MURDER=no
++# Check whether --enable-murder was given.
++if test "${enable_murder+set}" = set; then
++ enableval=$enable_murder; ENABLE_MURDER=$enableval
++fi
++
++
++if test "$ENABLE_MURDER" != no; then
++ IMAP_PROGS="$IMAP_PROGS mupdate"
++ # for master/slave auto-selection
++
++for ac_header in sys/sockio.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++fi
++
++ENABLE_REPLICATION=no
++# Check whether --enable-replication was given.
++if test "${enable_replication+set}" = set; then
++ enableval=$enable_replication; ENABLE_REPLICATION=$enableval
++ if test "$ENABLE_REPLICATION" != no; then
++ IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset make_md5"
++ fi
++fi
++
++
++
++
++
++# Check whether --with-com_err was given.
++if test "${with_com_err+set}" = set; then
++ withval=$with_com_err;
++fi
++
++if test -z "$with_com_err"; then
++ # no value supplied
++ { echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
++echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
++if test "${ac_cv_lib_com_err_com_err+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcom_err $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char com_err ();
++int
++main ()
++{
++return com_err ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_com_err_com_err=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_com_err_com_err=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
++echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
++if test $ac_cv_lib_com_err_com_err = yes; then
++
++ # com_err is already in library path
++ # guess we're okay
++ # can use system com_err
++ with_com_err=""
++ if test "${ac_cv_header_et_com_err_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for et/com_err.h" >&5
++echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_et_com_err_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking et/com_err.h usability" >&5
++echo $ECHO_N "checking et/com_err.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <et/com_err.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking et/com_err.h presence" >&5
++echo $ECHO_N "checking et/com_err.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <et/com_err.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: et/com_err.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: et/com_err.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: et/com_err.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: et/com_err.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for et/com_err.h" >&5
++echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_et_com_err_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_et_com_err_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6; }
++
++fi
++if test $ac_cv_header_et_com_err_h = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_ET_COM_ERR_H
++_ACEOF
++
++else
++ if test "${ac_cv_header_com_err_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for com_err.h" >&5
++echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_com_err_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_com_err_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking com_err.h usability" >&5
++echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <com_err.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking com_err.h presence" >&5
++echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <com_err.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: com_err.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: com_err.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: com_err.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for com_err.h" >&5
++echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_com_err_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_com_err_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_com_err_h" >&6; }
++
++fi
++if test $ac_cv_header_com_err_h = yes; then
++ :
++else
++ { { echo "$as_me:$LINENO: error: cannot locate com_err.h" >&5
++echo "$as_me: error: cannot locate com_err.h" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++fi
++
++
++ # Extract the first word of "compile_et", so it can be a program name with args.
++set dummy compile_et; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_path_COMPILE_ET+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ case $COMPILE_ET in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
++ ;;
++esac
++fi
++COMPILE_ET=$ac_cv_path_COMPILE_ET
++if test -n "$COMPILE_ET"; then
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++
++else
++
++ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
++ with_com_err="/usr/local"
++ # Extract the first word of "/usr/local/bin/compile_et", so it can be a program name with args.
++set dummy /usr/local/bin/compile_et; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_path_COMPILE_ET+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ case $COMPILE_ET in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
++ ;;
++esac
++fi
++COMPILE_ET=$ac_cv_path_COMPILE_ET
++if test -n "$COMPILE_ET"; then
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
++ with_com_err="/usr"
++ # Extract the first word of "/usr/bin/compile_et", so it can be a program name with args.
++set dummy /usr/bin/compile_et; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_path_COMPILE_ET+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ case $COMPILE_ET in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
++ ;;
++esac
++fi
++COMPILE_ET=$ac_cv_path_COMPILE_ET
++if test -n "$COMPILE_ET"; then
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ else
++ # use ours
++ with_com_err=yes
++ fi
++
++fi
++
++
++ if test "${with_com_err}" = "no"; then
++ { echo "$as_me:$LINENO: WARNING: com_err is required; included version will be used." >&5
++echo "$as_me: WARNING: com_err is required; included version will be used." >&2;}
++ with_com_err="yes"
++ fi
++ if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then
++ { echo "$as_me:$LINENO: WARNING: Parts of com_err distribuion were found, but not compile_et." >&5
++echo "$as_me: WARNING: Parts of com_err distribuion were found, but not compile_et." >&2;}
++ { echo "$as_me:$LINENO: WARNING: Will build com_err from included sources." >&5
++echo "$as_me: WARNING: Will build com_err from included sources." >&2;}
++ with_com_err="yes" # build it ourselves
++ fi
++fi
++
++case "$with_com_err" in
++ # built-in et
++ yes) # use the com_err we're gonna build
++ COM_ERR_LIBS="../et/libcom_err.a"
++ COMPILE_ET="../et/compile_et"
++ COM_ERR_LDFLAGS=""
++ COM_ERR_CPPFLAGS="-I\${top_srcdir}/et"
++ PRE_SUBDIRS="et ${PRE_SUBDIRS}"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} et/Makefile"
++ ;;
++ "") # no problem, we already have it in the paths
++ # we do nothing to pick it up
++ COM_ERR_LIBS="-lcom_err" # hope it's not shared
++ # we already set COMPILE_ET, or we didn't get here
++ COM_ERR_LDFLAGS=""
++ COM_ERR_CPPFLAGS=""
++ ;;
++ *) # use whatever they told us, or whatever we found
++ COMPILE_ET="${with_com_err}/bin/compile_et"
++ COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a"
++ COM_ERR_CPPFLAGS="-I${with_com_err}/include"
++ # Ever get the feeling people hide this stuff on purpose?
++ if test -d "${with_com_err}/include/et" ; then
++ COM_ERR_CPPFLAGS="-I${with_com_err}/include/et"
++ fi
++ COMPILE_ET="${with_com_err}/bin/compile_et"
++esac
++
++
++
++
++
++{ echo "$as_me:$LINENO: checking for modern syslog" >&5
++echo $ECHO_N "checking for modern syslog... $ECHO_C" >&6; }
++if test "${cyrus_cv_lib_syslog+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <syslog.h>
++#ifndef LOG_LOCAL6
++#include </nonexistent>
++#endif
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ cyrus_cv_lib_syslog=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_lib_syslog=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++fi
++
++if test $cyrus_cv_lib_syslog = no; then
++ PRE_SUBDIRS="${PRE_SUBDIRS} syslog"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile"
++ DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a"
++ CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog"
++fi
++{ echo "$as_me:$LINENO: result: $cyrus_cv_lib_syslog" >&5
++echo "${ECHO_T}$cyrus_cv_lib_syslog" >&6; }
++
++{ echo "$as_me:$LINENO: checking which syslog facility to use" >&5
++echo $ECHO_N "checking which syslog facility to use... $ECHO_C" >&6; }
++SYSLOG_FACILITY=LOG_LOCAL6
++
++# Check whether --with-syslogfacility was given.
++if test "${with_syslogfacility+set}" = set; then
++ withval=$with_syslogfacility; if test "$withval" != "yes" -a "$withval" != "no" ; then
++ SYSLOG_FACILITY=LOG_$withval
++ fi;
++fi
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define SYSLOG_FACILITY $SYSLOG_FACILITY
++_ACEOF
++
++{ echo "$as_me:$LINENO: result: $SYSLOG_FACILITY" >&5
++echo "${ECHO_T}$SYSLOG_FACILITY" >&6; }
++
++
++for ac_func in getdtablesize
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++else
++ case " $LIB@&t at OBJS " in
++ *" $ac_func.$ac_objext "* ) ;;
++ *) LIB@&t at OBJS="$LIB@&t at OBJS $ac_func.$ac_objext"
++ ;;
++esac
++
++fi
++done
++
++
++# Check whether --enable-cmulocal was given.
++if test "${enable_cmulocal+set}" = set; then
++ enableval=$enable_cmulocal; if test "$enableval" = yes; then
++ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile"
++ fi
++fi
++
++
++{ echo "$as_me:$LINENO: checking to use old sieve service name" >&5
++echo $ECHO_N "checking to use old sieve service name... $ECHO_C" >&6; }
++# Check whether --enable-oldsievename was given.
++if test "${enable_oldsievename+set}" = set; then
++ enableval=$enable_oldsievename; if test "$enableval" = yes; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define OLD_SIEVE_SERVICE_NAME
++_ACEOF
++
++ else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++ fi
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++# Check whether --enable-listext was given.
++if test "${enable_listext+set}" = set; then
++ enableval=$enable_listext; if test "$enableval" = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define ENABLE_LISTEXT
++_ACEOF
++
++ fi
++fi
++
++
++# Check whether --enable-netscapehack was given.
++if test "${enable_netscapehack+set}" = set; then
++ enableval=$enable_netscapehack; if test "$enableval" = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define ENABLE_X_NETSCAPE_HACK
++_ACEOF
++
++ fi
++fi
++
++
++{ echo "$as_me:$LINENO: checking for dlopen" >&5
++echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
++if test "${ac_cv_func_dlopen+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define dlopen innocuous_dlopen
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char dlopen (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef dlopen
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dlopen ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_dlopen || defined __stub___dlopen
++choke me
++#endif
++
++int
++main ()
++{
++return dlopen ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_dlopen=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_dlopen=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
++echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
++if test $ac_cv_func_dlopen = yes; then
++ :
++else
++
++{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
++echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_dl_dlopen+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dlopen ();
++int
++main ()
++{
++return dlopen ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_dl_dlopen=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_dl_dlopen=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
++echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
++if test $ac_cv_lib_dl_dlopen = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_LIBDL 1
++_ACEOF
++
++ LIBS="-ldl $LIBS"
++
++fi
++
++fi
++
++{ echo "$as_me:$LINENO: checking for crypt" >&5
++echo $ECHO_N "checking for crypt... $ECHO_C" >&6; }
++if test "${ac_cv_func_crypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define crypt innocuous_crypt
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char crypt (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef crypt
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char crypt ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_crypt || defined __stub___crypt
++choke me
++#endif
++
++int
++main ()
++{
++return crypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_crypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_crypt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
++echo "${ECHO_T}$ac_cv_func_crypt" >&6; }
++if test $ac_cv_func_crypt = yes; then
++ cmu_have_crypt=yes
++else
++ { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
++echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
++if test "${ac_cv_lib_crypt_crypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypt $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char crypt ();
++int
++main ()
++{
++return crypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_crypt_crypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_crypt_crypt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
++echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
++if test $ac_cv_lib_crypt_crypt = yes; then
++ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
++else
++ cmu_have_crypt=no
++fi
++
++fi
++
++
++
++
++
++# Check whether --enable-gssapi was given.
++if test "${enable_gssapi+set}" = set; then
++ enableval=$enable_gssapi; gssapi=$enableval
++else
++ gssapi=yes
++fi
++
++
++# Check whether --with-gss_impl was given.
++if test "${with_gss_impl+set}" = set; then
++ withval=$with_gss_impl; gss_impl=$withval
++else
++ gss_impl=auto
++fi
++
++
++if test "$gssapi" != no; then
++ platform=
++ case "${host}" in
++ *-*-linux*)
++ platform=__linux
++ ;;
++ *-*-hpux*)
++ platform=__hpux
++ ;;
++ *-*-irix*)
++ platform=__irix
++ ;;
++ *-*-solaris2*)
++# When should we use __sunos?
++ platform=__solaris
++ ;;
++ *-*-aix*)
++###_AIX
++ platform=__aix
++ ;;
++ *)
++ { echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
++echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
++ if test "$gss_impl" = "cybersafe"; then
++ { { echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
++echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++ ;;
++ esac
++
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++
++ if test -d ${gssapi}; then
++ CPPFLAGS="$CPPFLAGS -I$gssapi/include"
++# We want to keep -I in our CPPFLAGS, but only if we succeed
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++### I am not sure how useful is this (and whether this is required at all
++### especially when we have to provide two -L flags for new CyberSafe
++ LDFLAGS="$LDFLAGS -L$gssapi/lib"
++
++ if test -n "$platform"; then
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
++ CPPFLAGS="$CPPFLAGS -D$platform"
++ if test -d "${gssapi}/appsec-sdk/include"; then
++ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
++ fi
++ fi
++ fi
++ fi
++ if test "${ac_cv_header_gssapi_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for gssapi.h" >&5
++echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_gssapi_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking gssapi.h usability" >&5
++echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <gssapi.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking gssapi.h presence" >&5
++echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <gssapi.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for gssapi.h" >&5
++echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_gssapi_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_gssapi_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
++
++fi
++if test $ac_cv_header_gssapi_h = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSSAPI_H
++_ACEOF
++
++else
++ if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
++echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
++echo $ECHO_N "checking gssapi/gssapi.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <gssapi/gssapi.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
++echo $ECHO_N "checking gssapi/gssapi.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <gssapi/gssapi.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
++echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6; }
++
++fi
++if test $ac_cv_header_gssapi_gssapi_h = yes; then
++ :
++else
++ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
++echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
++fi
++
++
++fi
++
++
++
++ CPPFLAGS=$cmu_saved_CPPFLAGS
++
++fi
++
++if test "$gssapi" != no; then
++ # We need to find out which gssapi implementation we are
++ # using. Supported alternatives are: MIT Kerberos 5,
++ # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
++ # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
++ # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
++ #
++ # The choice is reflected in GSSAPIBASE_LIBS
++
++
++{ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
++if test "${ac_cv_lib_resolv_res_search+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char res_search ();
++int
++main ()
++{
++return res_search ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_resolv_res_search=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_resolv_res_search=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
++if test $ac_cv_lib_resolv_res_search = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_LIBRESOLV 1
++_ACEOF
++
++ LIBS="-lresolv $LIBS"
++
++fi
++
++ if test -d ${gssapi}; then
++ gssapi_dir="${gssapi}/lib"
++ GSSAPIBASE_LIBS="-L$gssapi_dir"
++ GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
++ else
++ # FIXME: This is only used for building cyrus, and then only as
++ # a real hack. it needs to be fixed.
++ gssapi_dir="/usr/local/lib"
++ fi
++
++ # Check a full link against the Heimdal libraries.
++ # If this fails, check a full link against the MIT libraries.
++ # If this fails, check a full link against the CyberSafe libraries.
++ # If this fails, check a full link against the Solaris 8 and up libgss.
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
++ gss_failed=0
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgssapi... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gss_unwrap ();
++int
++main ()
++{
++return gss_unwrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gssapi_gss_unwrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gssapi_gss_unwrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gssapi_gss_unwrap" >&6; }
++if test $ac_cv_lib_gssapi_gss_unwrap = yes; then
++ gss_impl="heimdal"
++else
++ gss_failed=1
++fi
++
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
++ # check for libkrb5support first
++ { echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
++echo $ECHO_N "checking for krb5int_getspecific in -lkrb5support... $ECHO_C" >&6; }
++if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char krb5int_getspecific ();
++int
++main ()
++{
++return krb5int_getspecific ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_krb5support_krb5int_getspecific=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_krb5support_krb5int_getspecific=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
++echo "${ECHO_T}$ac_cv_lib_krb5support_krb5int_getspecific" >&6; }
++if test $ac_cv_lib_krb5support_krb5int_getspecific = yes; then
++ K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
++fi
++
++
++ gss_failed=0
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgssapi_krb5... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gss_unwrap ();
++int
++main ()
++{
++return gss_unwrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gssapi_krb5_gss_unwrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gssapi_krb5_gss_unwrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; }
++if test $ac_cv_lib_gssapi_krb5_gss_unwrap = yes; then
++ gss_impl="mit"
++else
++ gss_failed=1
++fi
++
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ # For Cybersafe one has to set a platform define in order to make compilation work
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
++
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++ cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
++# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
++ if test -d "${gssapi}/appsec-rt/lib"; then
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
++ fi
++ CPPFLAGS="$CPPFLAGS -D$platform"
++ if test -d "${gssapi}/appsec-sdk/include"; then
++ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
++ fi
++
++ gss_failed=0
++
++# Check for CyberSafe with two libraries first, than fall back to a single
++# library (older CyberSafe)
++
++ unset ac_cv_lib_gss_csf_gss_acq_user
++ { echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
++echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char csf_gss_acq_user ();
++int
++main ()
++{
++return csf_gss_acq_user ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gss_csf_gss_acq_user=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gss_csf_gss_acq_user=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
++if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
++ gss_impl="cybersafe03"
++else
++ unset ac_cv_lib_gss_csf_gss_acq_user;
++ { echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
++echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char csf_gss_acq_user ();
++int
++main ()
++{
++return csf_gss_acq_user ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gss_csf_gss_acq_user=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gss_csf_gss_acq_user=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
++if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
++ gss_impl="cybersafe"
++else
++ gss_failed=1
++fi
++
++fi
++
++
++ if test "$gss_failed" = "1"; then
++# Restore variables
++ GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
++ CPPFLAGS=$cmu_saved_CPPFLAGS
++
++ if test "$gss_impl" != "auto"; then
++ gss_impl="failed"
++ fi
++ fi
++ fi
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
++ gss_failed=0
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgss... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgss -lgss $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gss_unwrap ();
++int
++main ()
++{
++return gss_unwrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gss_gss_unwrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gss_gss_unwrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_gss_unwrap" >&6; }
++if test $ac_cv_lib_gss_gss_unwrap = yes; then
++ gss_impl="seam"
++else
++ gss_failed=1
++fi
++
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ if test "$gss_impl" = "mit"; then
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
++ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
++ elif test "$gss_impl" = "heimdal"; then
++ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
++ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
++ elif test "$gss_impl" = "cybersafe03"; then
++# Version of CyberSafe with two libraries
++ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
++ # there is no static libgss for CyberSafe
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "cybersafe"; then
++ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
++ # there is no static libgss for CyberSafe
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "seam"; then
++ GSSAPIBASE_LIBS=-lgss
++ # there is no static libgss on Solaris 8 and up
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "failed"; then
++ gssapi="no"
++ GSSAPIBASE_LIBS=
++ GSSAPIBASE_STATIC_LIBS=
++ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
++echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
++ else
++ gssapi="no"
++ GSSAPIBASE_LIBS=
++ GSSAPIBASE_STATIC_LIBS=
++ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
++echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
++ fi
++fi
++
++#
++# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
++# in gssapi\rfckrb5.h
++#
++if test "$gssapi" != "no"; then
++ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi/gssapi.h>
++ #ifdef GSS_C_NT_HOSTBASED_SERVICE
++ hostbased_service_gss_nt_yes
++ #endif
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
++_ACEOF
++
++else
++ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
++echo "$as_me: WARNING: Cybersafe define not found" >&2;}
++fi
++rm -f conftest*
++
++
++ elif test "$ac_cv_header_gssapi_h" = "yes"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
++_ACEOF
++
++fi
++rm -f conftest*
++
++ elif test "$ac_cv_header_gssapi_gssapi_h"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi/gssapi.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
++_ACEOF
++
++fi
++rm -f conftest*
++
++ fi
++
++ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi/gssapi.h>
++ #ifdef GSS_C_NT_USER_NAME
++ user_name_yes_gss_nt
++ #endif
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_USER_NAME
++_ACEOF
++
++else
++ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
++echo "$as_me: WARNING: Cybersafe define not found" >&2;}
++fi
++rm -f conftest*
++
++ elif test "$ac_cv_header_gssapi_h" = "yes"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_USER_NAME
++_ACEOF
++
++fi
++rm -f conftest*
++
++ elif test "$ac_cv_header_gssapi_gssapi_h"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi/gssapi.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_USER_NAME
++_ACEOF
++
++fi
++rm -f conftest*
++
++ fi
++fi
++
++GSSAPI_LIBS=""
++{ echo "$as_me:$LINENO: checking GSSAPI" >&5
++echo $ECHO_N "checking GSSAPI... $ECHO_C" >&6; }
++if test "$gssapi" != no; then
++ { echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
++echo "${ECHO_T}with implementation ${gss_impl}" >&6; }
++ { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
++if test "${ac_cv_lib_resolv_res_search+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char res_search ();
++int
++main ()
++{
++return res_search ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_resolv_res_search=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_resolv_res_search=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
++if test $ac_cv_lib_resolv_res_search = yes; then
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
++fi
++
++ SASL_MECHS="$SASL_MECHS libgssapiv2.la"
++ SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
++ SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
++
++ cmu_save_LIBS="$LIBS"
++ LIBS="$LIBS $GSSAPIBASE_LIBS"
++
++for ac_func in gsskrb5_register_acceptor_identity
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++ LIBS="$cmu_save_LIBS"
++else
++ { echo "$as_me:$LINENO: result: disabled" >&5
++echo "${ECHO_T}disabled" >&6; }
++fi
++
++
++
++
++
++
++# Check whether --with-sasl was given.
++if test "${with_sasl+set}" = set; then
++ withval=$with_sasl; with_sasl="$withval"
++else
++ with_sasl="yes"
++fi
++
++
++
++# Check whether --with-staticsasl was given.
++if test "${with_staticsasl+set}" = set; then
++ withval=$with_staticsasl; with_staticsasl="$withval";
++ if test $with_staticsasl != "no"; then
++ using_static_sasl="static"
++ fi
++else
++ with_staticsasl="no"; using_static_sasl="no"
++fi
++
++
++SASLFLAGS=""
++LIB_SASL=""
++
++cmu_saved_CPPFLAGS=$CPPFLAGS
++cmu_saved_LDFLAGS=$LDFLAGS
++cmu_saved_LIBS=$LIBS
++
++if test ${with_staticsasl} != "no"; then
++ if test -d ${with_staticsasl}; then
++ if test -d ${with_staticsasl}/lib64 ; then
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib64
++ else
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib
++ fi
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib
++ ac_cv_sasl_where_inc=${with_staticsasl}/include
++
++ SASLFLAGS="-I$ac_cv_sasl_where_inc"
++ LIB_SASL="-L$ac_cv_sasl_where_lib"
++ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
++ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
++ else
++ with_staticsasl="/usr"
++ fi
++
++ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
++echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sasl/sasl.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
++echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sasl/sasl.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sasl_sasl_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
++
++fi
++if test $ac_cv_header_sasl_sasl_h = yes; then
++ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
++echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sasl/saslutil.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
++echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sasl/saslutil.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
++
++fi
++if test $ac_cv_header_sasl_saslutil_h = yes; then
++ for i42 in lib64 lib; do
++ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
++ ac_cv_found_sasl=yes
++ { echo "$as_me:$LINENO: checking for static libsasl" >&5
++echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6; }
++ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
++ fi
++ done
++ if test ! "$ac_cv_found_sasl" = "yes"; then
++ { echo "$as_me:$LINENO: checking for static libsasl" >&5
++echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6; }
++ { { echo "$as_me:$LINENO: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&5
++echo "$as_me: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++fi
++
++
++fi
++
++
++
++ { echo "$as_me:$LINENO: result: found" >&5
++echo "${ECHO_T}found" >&6; }
++
++ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
++ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
++ else
++ SASL_GSSAPI_LIBS_SET=""
++ cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
++ fi
++fi
++
++if test -d ${with_sasl}; then
++ ac_cv_sasl_where_lib=${with_sasl}/lib
++ ac_cv_sasl_where_inc=${with_sasl}/include
++
++ DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
++ if test "$ac_cv_sasl_where_lib" != ""; then
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL}"
++ else
++ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
++ fi
++
++ fi
++ LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
++ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
++ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
++fi
++
++# be sure to check for a SASLv2 specific function
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
++echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sasl/sasl.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
++echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sasl/sasl.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sasl_sasl_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
++
++fi
++if test $ac_cv_header_sasl_sasl_h = yes; then
++ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
++echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sasl/saslutil.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
++echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sasl/saslutil.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
++
++fi
++if test $ac_cv_header_sasl_saslutil_h = yes; then
++ { echo "$as_me:$LINENO: checking for prop_get in -lsasl2" >&5
++echo $ECHO_N "checking for prop_get in -lsasl2... $ECHO_C" >&6; }
++if test "${ac_cv_lib_sasl2_prop_get+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsasl2 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char prop_get ();
++int
++main ()
++{
++return prop_get ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_sasl2_prop_get=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_sasl2_prop_get=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_prop_get" >&5
++echo "${ECHO_T}$ac_cv_lib_sasl2_prop_get" >&6; }
++if test $ac_cv_lib_sasl2_prop_get = yes; then
++ ac_cv_found_sasl=yes
++else
++ ac_cv_found_sasl=no
++fi
++
++else
++ ac_cv_found_sasl=no
++fi
++
++
++else
++ ac_cv_found_sasl=no
++fi
++
++
++
++if test "$ac_cv_found_sasl" = "yes"; then
++ if test "$ac_cv_sasl_where_lib" != ""; then
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL}"
++ else
++ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
++ fi
++
++ fi
++ DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
++ if test "$using_static_sasl" != "static"; then
++ LIB_SASL=$DYNLIB_SASL
++ SASLFLAGS=$DYNSASLFLAGS
++ fi
++else
++ DYNLIB_SASL=""
++ DYNSASLFLAGS=""
++ using_static_sasl="staticonly"
++fi
++
++if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
++ SASL_GSSAPI_LIBS_SET=""
++ cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
++fi
++
++LIBS="$cmu_saved_LIBS"
++LDFLAGS="$cmu_saved_LDFLAGS"
++CPPFLAGS="$cmu_saved_CPPFLAGS"
++
++
++
++
++
++
++
++if test "$ac_cv_found_sasl" != "yes"; then
++ { { echo "$as_me:$LINENO: error: Cannot continue without libsasl2.
++Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&5
++echo "$as_me: error: Cannot continue without libsasl2.
++Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++cmu_saved_CPPFLAGS=$CPPFLAGS
++CPPFLAGS="$CPPFLAGS $SASLFLAGS"
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sasl/sasl.h>
++
++#ifndef SASL_VERSION_MAJOR
++#error SASL_VERSION_MAJOR not defined
++#endif
++#ifndef SASL_VERSION_MINOR
++#error SASL_VERSION_MINOR not defined
++#endif
++#ifndef SASL_VERSION_STEP
++#error SASL_VERSION_STEP not defined
++#endif
++
++#if SASL_VERSION_MAJOR < 2 || SASL_VERSION_MINOR < 1 || SASL_VERSION_STEP < 7
++#error SASL version is less than 2.1.7
++#endif
++
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ { { echo "$as_me:$LINENO: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&5
++echo "$as_me: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++CPPFLAGS=$cmu_saved_CPPFLAGS
++
++
++
++cmu_saved_LDFLAGS=$LDFLAGS
++
++LDFLAGS="$LDFLAGS $LIB_SASL"
++
++{ echo "$as_me:$LINENO: checking for sasl_checkapop in -lsasl2" >&5
++echo $ECHO_N "checking for sasl_checkapop in -lsasl2... $ECHO_C" >&6; }
++if test "${ac_cv_lib_sasl2_sasl_checkapop+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsasl2 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sasl_checkapop ();
++int
++main ()
++{
++return sasl_checkapop ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_sasl2_sasl_checkapop=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_sasl2_sasl_checkapop=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_checkapop" >&5
++echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_checkapop" >&6; }
++if test $ac_cv_lib_sasl2_sasl_checkapop = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_APOP
++_ACEOF
++
++else
++ { { echo "$as_me:$LINENO: error: libsasl2 without working sasl_checkapop. Cannot continue." >&5
++echo "$as_me: error: libsasl2 without working sasl_checkapop. Cannot continue." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++LDFLAGS=$cmu_saved_LDFLAGS
++
++
++
++# Check whether --with-perl was given.
++if test "${with_perl+set}" = set; then
++ withval=$with_perl; with_perl="$withval"
++else
++ with_perl="perl"
++fi
++
++
++if test "${with_perl}" = yes; then
++ with_perl="perl"
++fi
++if test "${with_perl}" != no; then
++ if test ${using_static_sasl} = "staticonly"; then
++ { echo "$as_me:$LINENO: WARNING: Cannot compile perl utilities using static libsasl" >&5
++echo "$as_me: WARNING: Cannot compile perl utilities using static libsasl" >&2;}
++ with_perl="no"
++ else
++ for ac_prog in ${with_perl} perl
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_PERL+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$PERL"; then
++ ac_cv_prog_PERL="$PERL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_PERL="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++PERL=$ac_cv_prog_PERL
++if test -n "$PERL"; then
++ { echo "$as_me:$LINENO: result: $PERL" >&5
++echo "${ECHO_T}$PERL" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$PERL" && break
++done
++test -n "$PERL" || PERL="with_perl=notfound"
++
++ fi
++fi
++if test "$with_perl" = "notfound"; then
++ { echo "$as_me:$LINENO: WARNING: Perl not found: Administrative tools won't be available" >&5
++echo "$as_me: WARNING: Perl not found: Administrative tools won't be available" >&2;}
++elif test "${with_perl}" != "no"; then
++ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl"
++ PERL_SUBDIRS="imap"
++ PERL="${with_perl}"
++ PERL_CCCDLFLAGS="$cccdlflags"
++
++fi
++
++if test "$sievedir" != "no"; then
++ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile"
++
++ PERL_SUBDIRS="${PERL_SUBDIRS} sieve"
++ PERL_DEPSUBDIRS="sieve"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile"
++else
++ PERL_DEPSUBDIRS="none"
++fi
++
++{ echo "$as_me:$LINENO: checking for MD5Init" >&5
++echo $ECHO_N "checking for MD5Init... $ECHO_C" >&6; }
++if test "${ac_cv_func_MD5Init+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define MD5Init to an innocuous variant, in case <limits.h> declares MD5Init.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define MD5Init innocuous_MD5Init
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char MD5Init (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef MD5Init
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char MD5Init ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_MD5Init || defined __stub___MD5Init
++choke me
++#endif
++
++int
++main ()
++{
++return MD5Init ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_MD5Init=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_MD5Init=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_MD5Init" >&5
++echo "${ECHO_T}$ac_cv_func_MD5Init" >&6; }
++if test $ac_cv_func_MD5Init = yes; then
++ :
++else
++ { echo "$as_me:$LINENO: checking for MD5Init in -lmd" >&5
++echo $ECHO_N "checking for MD5Init in -lmd... $ECHO_C" >&6; }
++if test "${ac_cv_lib_md_MD5Init+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lmd $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char MD5Init ();
++int
++main ()
++{
++return MD5Init ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_md_MD5Init=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_md_MD5Init=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Init" >&5
++echo "${ECHO_T}$ac_cv_lib_md_MD5Init" >&6; }
++if test $ac_cv_lib_md_MD5Init = yes; then
++ LIBS="${LIBS} -lmd"
++else
++ MD5OBJ="md5.o"
++fi
++
++fi
++
++
++
++SNMP_SUBDIRS=""
++
++
++
++# Check whether --with-lib-subdir was given.
++if test "${with_lib_subdir+set}" = set; then
++ withval=$with_lib_subdir;
++fi
++
++{ echo "$as_me:$LINENO: checking for long" >&5
++echo $ECHO_N "checking for long... $ECHO_C" >&6; }
++if test "${ac_cv_type_long+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++typedef long ac__type_new_;
++int
++main ()
++{
++if ((ac__type_new_ *) 0)
++ return 0;
++if (sizeof (ac__type_new_))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_long=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_type_long=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
++echo "${ECHO_T}$ac_cv_type_long" >&6; }
++
++{ echo "$as_me:$LINENO: checking size of long" >&5
++echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
++if test "${ac_cv_sizeof_long+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$ac_cv_type_long" = yes; then
++ # The cast to long int works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ if test "$cross_compiling" = yes; then
++ # Depending upon the size, compute the lo and hi bounds.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=0 ac_mid=0
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo= ac_hi=
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr '(' $ac_mid ')' + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in
++?*) ac_cv_sizeof_long=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; } ;;
++esac
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
++@%:@include <stdio.h>
++@%:@include <stdlib.h>
++int
++main ()
++{
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
++ {
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%lu\n", i);
++ }
++ return ferror (f) || fclose (f) != 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sizeof_long=`cat conftest.val`
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.val
++else
++ ac_cv_sizeof_long=0
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
++cat >>confdefs.h <<_ACEOF
++@%:@define SIZEOF_LONG $ac_cv_sizeof_long
++_ACEOF
++
++
++{ echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
++echo $ECHO_N "checking what directory libraries are found in... $ECHO_C" >&6; }
++if test "${ac_cv_cmu_lib_subdir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
++test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
++if test "X$with_lib_subdir" = "X" ; then
++ ac_cv_cmu_lib_subdir=lib
++ if test $ac_cv_sizeof_long -eq 4 ; then
++ test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
++ fi
++ if test $ac_cv_sizeof_long -eq 8 ; then
++ test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
++ fi
++else
++ ac_cv_cmu_lib_subdir=$with_lib_subdir
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
++echo "${ECHO_T}$ac_cv_cmu_lib_subdir" >&6; }
++CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
++
++
++
++
++
++
++# Check whether --with-libwrap was given.
++if test "${with_libwrap+set}" = set; then
++ withval=$with_libwrap; with_libwrap=$withval
++else
++ with_libwrap=yes
++fi
++
++ if test "$with_libwrap" != no; then
++ if test -d "$with_libwrap"; then
++ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
++ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
++ fi
++ cmu_save_LIBS="$LIBS"
++ { echo "$as_me:$LINENO: checking for request_init in -lwrap" >&5
++echo $ECHO_N "checking for request_init in -lwrap... $ECHO_C" >&6; }
++if test "${ac_cv_lib_wrap_request_init+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lwrap ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char request_init ();
++int
++main ()
++{
++return request_init ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_wrap_request_init=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_wrap_request_init=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_request_init" >&5
++echo "${ECHO_T}$ac_cv_lib_wrap_request_init" >&6; }
++if test $ac_cv_lib_wrap_request_init = yes; then
++
++ if test "${ac_cv_header_tcpd_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for tcpd.h" >&5
++echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_tcpd_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
++echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking tcpd.h usability" >&5
++echo $ECHO_N "checking tcpd.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <tcpd.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking tcpd.h presence" >&5
++echo $ECHO_N "checking tcpd.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <tcpd.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: tcpd.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: tcpd.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: tcpd.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: tcpd.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: tcpd.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: tcpd.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for tcpd.h" >&5
++echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_tcpd_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_tcpd_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
++echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6; }
++
++fi
++if test $ac_cv_header_tcpd_h = yes; then
++ :
++else
++ with_libwrap=no
++fi
++
++
++else
++ with_libwrap=no
++fi
++
++ LIBS="$cmu_save_LIBS"
++ fi
++ { echo "$as_me:$LINENO: checking libwrap support" >&5
++echo $ECHO_N "checking libwrap support... $ECHO_C" >&6; }
++ { echo "$as_me:$LINENO: result: $with_libwrap" >&5
++echo "${ECHO_T}$with_libwrap" >&6; }
++ LIB_WRAP=""
++ if test "$with_libwrap" != no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_LIBWRAP
++_ACEOF
++
++ LIB_WRAP="-lwrap"
++ { echo "$as_me:$LINENO: checking for yp_get_default_domain in -lnsl" >&5
++echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lnsl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char yp_get_default_domain ();
++int
++main ()
++{
++return yp_get_default_domain ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_nsl_yp_get_default_domain=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_nsl_yp_get_default_domain=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
++echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6; }
++if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then
++ LIB_WRAP="${LIB_WRAP} -lnsl"
++fi
++
++ fi
++
++
++
++
++
++
++# Check whether --with-snmp was given.
++if test "${with_snmp+set}" = set; then
++ withval=$with_snmp; with_snmp=$withval
++else
++ with_snmp=yes
++fi
++
++
++
++# Check whether --with-ucdsnmp was given.
++if test "${with_ucdsnmp+set}" = set; then
++ withval=$with_ucdsnmp; with_snmp=$withval
++fi
++
++
++if test "$with_snmp" != "no"; then
++
++ if test "$with_snmp" = "yes"; then
++ # Extract the first word of "net-snmp-config", so it can be a program name with args.
++set dummy net-snmp-config; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_path_SNMP_CONFIG+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ case $SNMP_CONFIG in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++as_dummy="/usr/local/bin:$PATH"
++for as_dir in $as_dummy
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_path_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++fi
++SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG
++if test -n "$SNMP_CONFIG"; then
++ { echo "$as_me:$LINENO: result: $SNMP_CONFIG" >&5
++echo "${ECHO_T}$SNMP_CONFIG" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ else
++ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
++ fi
++
++ if test -x "$SNMP_CONFIG"; then
++ { echo "$as_me:$LINENO: checking NET SNMP libraries" >&5
++echo $ECHO_N "checking NET SNMP libraries... $ECHO_C" >&6; }
++
++ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
++ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
++
++ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
++ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
++ LIB_UCDSNMP=$SNMP_LIBS
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_NETSNMP 1
++_ACEOF
++
++
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++ else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++ { echo "$as_me:$LINENO: WARNING: Could not find the required paths. Please check your net-snmp installation." >&5
++echo "$as_me: WARNING: Could not find the required paths. Please check your net-snmp installation." >&2;}
++ fi
++ else
++ if test "$with_snmp" != no; then
++ if test -d "$with_snmp"; then
++ CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
++ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
++ fi
++ cmu_save_LIBS="$LIBS"
++ { echo "$as_me:$LINENO: checking for sprint_objid in -lsnmp" >&5
++echo $ECHO_N "checking for sprint_objid in -lsnmp... $ECHO_C" >&6; }
++if test "${ac_cv_lib_snmp_sprint_objid+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsnmp ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sprint_objid ();
++int
++main ()
++{
++return sprint_objid ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_snmp_sprint_objid=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_snmp_sprint_objid=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_sprint_objid" >&5
++echo "${ECHO_T}$ac_cv_lib_snmp_sprint_objid" >&6; }
++if test $ac_cv_lib_snmp_sprint_objid = yes; then
++
++ if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
++echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
++echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking ucd-snmp/version.h usability" >&5
++echo $ECHO_N "checking ucd-snmp/version.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <ucd-snmp/version.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking ucd-snmp/version.h presence" >&5
++echo $ECHO_N "checking ucd-snmp/version.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <ucd-snmp/version.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
++echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_ucd_snmp_version_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
++echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6; }
++
++fi
++if test $ac_cv_header_ucd_snmp_version_h = yes; then
++ :
++else
++ with_snmp=no
++fi
++
++
++else
++ with_snmp=no
++fi
++
++ LIBS="$cmu_save_LIBS"
++ fi
++ { echo "$as_me:$LINENO: checking UCD SNMP libraries" >&5
++echo $ECHO_N "checking UCD SNMP libraries... $ECHO_C" >&6; }
++ { echo "$as_me:$LINENO: result: $with_snmp" >&5
++echo "${ECHO_T}$with_snmp" >&6; }
++ LIB_UCDSNMP=""
++ if test "$with_snmp" != no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_UCDSNMP 1
++_ACEOF
++
++ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
++ { echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpm" >&5
++echo $ECHO_N "checking for rpmdbOpen in -lrpm... $ECHO_C" >&6; }
++if test "${ac_cv_lib_rpm_rpmdbOpen+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrpm -lpopt $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char rpmdbOpen ();
++int
++main ()
++{
++return rpmdbOpen ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_rpm_rpmdbOpen=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_rpm_rpmdbOpen=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbOpen" >&5
++echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbOpen" >&6; }
++if test $ac_cv_lib_rpm_rpmdbOpen = yes; then
++ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"
++fi
++
++ fi
++
++ fi
++fi
++
++
++
++# Figure out what directories we're linking against.
++# Lots of fun for the whole family.
++# This probably chokes on anything with spaces in it.
++# All we want is the list of -L directories, and -L may or may not be
++# followed by a space.
++isdir=no
++libpath=""
++#echo "debug ldflags: << ${ldflags} >>"
++#echo "debug default_ldflags: << ${default_ldflags} >>"
++for flag in ${ldflags} ${default_ldflags}; do
++ case $flag in
++ -L)
++ # it's a split -L option, we'll mark the next option as a dir.
++ isdir=yes
++ ;;
++
++ -L*)
++ # attached -L option: split off the directory
++ larg=`echo $flag | sed -e 's:-L\(..*\):\1:'`
++ libpath="${libpath} ${larg}"
++ ;;
++
++ *)
++ if test $isdir = yes ; then
++ libpath="${libpath} ${flag}"
++ isdir=no
++ fi
++ esac
++done
++
++IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
++IMAP_LIBS="${LIB_SASL} ${LIBS}"
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
++
++cat >confcache <<\_ACEOF
++# This file is a shell script that caches the results of configure
++# tests run on this system so they can be shared between configure
++# scripts and configure runs, see configure's option --config-cache.
++# It is not useful on other systems. If it contains results you don't
++# want to keep, you may remove or edit it.
++#
++# config.status only pays attention to the cache file if you give it
++# the --recheck option to rerun configure.
++#
++# `ac_cv_env_foo' variables (set or unset) will be overridden when
++# loading this file, other *unset* `ac_cv_foo' will be assigned the
++# following values.
++
++_ACEOF
++
++# The following way of writing the cache mishandles newlines in values,
++# but we know of no workaround that is simple, portable, and efficient.
++# So, we kill variables containing newlines.
++# Ultrix sh set writes to stderr and can't be redirected directly,
++# and sets the high bit in the cache file unless we assign to the vars.
++(
++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ *) $as_unset $ac_var ;;
++ esac ;;
++ esac
++ done
++
++ (set) 2>&1 |
++ case $as_nl`(ac_space=' '; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
++ # `set' does not quote correctly, so add quotes (double-quote
++ # substitution turns \\\\ into \\, and sed turns \\ into \).
++ sed -n \
++ "s/'/'\\\\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++ ;; #(
++ *)
++ # `set' quotes correctly as required by POSIX, so do not add quotes.
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++ ;;
++ esac |
++ sort
++) |
++ sed '
++ /^ac_cv_env_/b end
++ t clear
++ :clear
++ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++ t end
++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++ :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++ if test -w "$cache_file"; then
++ test "x$cache_file" != "x/dev/null" &&
++ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
++echo "$as_me: updating cache $cache_file" >&6;}
++ cat confcache >$cache_file
++ else
++ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
++echo "$as_me: not updating unwritable cache $cache_file" >&6;}
++ fi
++fi
++rm -f confcache
++
++test "x$prefix" = xNONE && prefix=$ac_default_prefix
++# Let make expand exec_prefix.
++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
++
++DEFS=-DHAVE_CONFIG_H
++
++ac_libobjs=
++ac_ltlibobjs=
++for ac_i in : $LIB@&t at OBJS; do test "x$ac_i" = x: && continue
++ # 1. Remove the extension, and $U if already installed.
++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
++ ac_i=`echo "$ac_i" | sed "$ac_script"`
++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
++ # will be set to the directory where LIBOBJS objects are built.
++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
++done
++LIB@&t at OBJS=$ac_libobjs
++
++LTLIBOBJS=$ac_ltlibobjs
++
++
++
++: ${CONFIG_STATUS=./config.status}
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files $CONFIG_STATUS"
++{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
++echo "$as_me: creating $CONFIG_STATUS" >&6;}
++cat >$CONFIG_STATUS <<_ACEOF
++#! $SHELL
++# Generated by $as_me.
++# Run this file to recreate the current configuration.
++# Compiler output produced by configure, useful for debugging
++# configure, is in config.log if it exists.
++
++debug=false
++ac_cs_recheck=false
++ac_cs_silent=false
++SHELL=\${CONFIG_SHELL-$SHELL}
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++## --------------------- ##
++## M4sh Initialization. ##
++## --------------------- ##
++
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++
++# PATH needs CR
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
++# Support unset when possible.
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++as_nl='
++'
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ { (exit 1); exit 1; }
++fi
++
++# Work around bugs in pre-3.0 UWIN ksh.
++for as_var in ENV MAIL MAILPATH
++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++done
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++ fi
++done
++
++# Required to use basename.
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
++ as_basename=basename
++else
++ as_basename=false
++fi
++
++
++# Name of the executable.
++as_me=`$as_basename -- "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++
++# CDPATH.
++$as_unset CDPATH
++
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
++
++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
++ # uniformly replaced by the line number. The first 'sed' inserts a
++ # line-number line after each line using $LINENO; the second 'sed'
++ # does the real work. The second script uses 'N' to pair each
++ # line-number line with the line containing $LINENO, and appends
++ # trailing '-' during substitution so that $LINENO is not a special
++ # case at line end.
++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
++ # scripts with optimization help from Paolo Bonzini. Blame Lee
++ # E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
++ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
++ N
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
++ t loop
++ s/-\n.*//
++ ' >$as_me.lineno &&
++ chmod +x "$as_me.lineno" ||
++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
++ { (exit 1); exit 1; }; }
++
++ # Don't try to exec as it changes $[0], causing all sort of problems
++ # (the dirname of $[0] is not the place where we might find the
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
++ # Exit status is that of the last command.
++ exit
++}
++
++
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in
++-n*)
++ case `echo 'x\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ *) ECHO_C='\c';;
++ esac;;
++*)
++ ECHO_N='-n';;
++esac
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir
++fi
++echo >conf$$.file
++if ln -s conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++ as_ln_s='cp -p'
++elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++else
++ as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
++
++if mkdir -p . 2>/dev/null; then
++ as_mkdir_p=:
++else
++ test -d ./-p && rmdir ./-p
++ as_mkdir_p=false
++fi
++
++# Find out whether ``test -x'' works. Don't use a zero-byte file, as
++# systems may use methods other than mode bits to determine executability.
++cat >conf$$.file <<_ASEOF
++#! /bin/sh
++exit 0
++_ASEOF
++chmod +x conf$$.file
++if test -x conf$$.file >/dev/null 2>&1; then
++ as_executable_p="test -x"
++else
++ as_executable_p=:
++fi
++rm -f conf$$.file
++
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
++
++# Sed expression to map a string onto a valid variable name.
++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
++
++
++exec 6>&1
++
++# Save the log message, to keep $[0] and so on meaningful, and to
++# report actual input values of CONFIG_FILES etc. instead of their
++# values after options handling.
++ac_log="
++This file was extended by $as_me, which was
++generated by GNU Autoconf 2.60. Invocation command line was
++
++ CONFIG_FILES = $CONFIG_FILES
++ CONFIG_HEADERS = $CONFIG_HEADERS
++ CONFIG_LINKS = $CONFIG_LINKS
++ CONFIG_COMMANDS = $CONFIG_COMMANDS
++ $ $0 $@
++
++on `(hostname || uname -n) 2>/dev/null | sed 1q`
++"
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<_ACEOF
++# Files that config.status was made for.
++config_files="$ac_config_files"
++config_headers="$ac_config_headers"
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++ac_cs_usage="\
++\`$as_me' instantiates files from templates according to the
++current configuration.
++
++Usage: $0 [OPTIONS] [FILE]...
++
++ -h, --help print this help, then exit
++ -V, --version print version number, then exit
++ -q, --quiet do not print progress messages
++ -d, --debug don't remove temporary files
++ --recheck update $as_me by reconfiguring in the same conditions
++ --file=FILE[:TEMPLATE]
++ instantiate the configuration file FILE
++ --header=FILE[:TEMPLATE]
++ instantiate the configuration header FILE
++
++Configuration files:
++$config_files
++
++Configuration headers:
++$config_headers
++
++Report bugs to <bug-autoconf at gnu.org>."
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++ac_cs_version="\\
++config.status
++configured by $0, generated by GNU Autoconf 2.60,
++ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
++
++Copyright (C) 2006 Free Software Foundation, Inc.
++This config.status script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it."
++
++ac_pwd='$ac_pwd'
++srcdir='$srcdir'
++INSTALL='$INSTALL'
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++# If no file are specified by the user, then we need to provide default
++# value. By we need to know if files were specified by the user.
++ac_need_defaults=:
++while test $# != 0
++do
++ case $1 in
++ --*=*)
++ ac_option=`expr "X$1" : 'X\([^=]*\)='`
++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
++ ac_shift=:
++ ;;
++ *)
++ ac_option=$1
++ ac_optarg=$2
++ ac_shift=shift
++ ;;
++ esac
++
++ case $ac_option in
++ # Handling of the options.
++ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++ ac_cs_recheck=: ;;
++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
++ echo "$ac_cs_version"; exit ;;
++ --debug | --debu | --deb | --de | --d | -d )
++ debug=: ;;
++ --file | --fil | --fi | --f )
++ $ac_shift
++ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
++ ac_need_defaults=false;;
++ --header | --heade | --head | --hea )
++ $ac_shift
++ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
++ ac_need_defaults=false;;
++ --he | --h)
++ # Conflict between --help and --header
++ { echo "$as_me: error: ambiguous option: $1
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; };;
++ --help | --hel | -h )
++ echo "$ac_cs_usage"; exit ;;
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil | --si | --s)
++ ac_cs_silent=: ;;
++
++ # This is an error.
++ -*) { echo "$as_me: error: unrecognized option: $1
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; } ;;
++
++ *) ac_config_targets="$ac_config_targets $1"
++ ac_need_defaults=false ;;
++
++ esac
++ shift
++done
++
++ac_configure_extra_args=
++
++if $ac_cs_silent; then
++ exec 6>/dev/null
++ ac_configure_extra_args="$ac_configure_extra_args --silent"
++fi
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++if \$ac_cs_recheck; then
++ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
++ CONFIG_SHELL=$SHELL
++ export CONFIG_SHELL
++ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++fi
++
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++exec 5>>config.log
++{
++ echo
++ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
++@%:@@%:@ Running $as_me. @%:@@%:@
++_ASBOX
++ echo "$ac_log"
++} >&5
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++
++# Handling of arguments.
++for ac_config_target in $ac_config_targets
++do
++ case $ac_config_target in
++ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
++ "master/Makefile") CONFIG_FILES="$CONFIG_FILES master/Makefile" ;;
++ "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
++ "imap/Makefile") CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;;
++ "imtest/Makefile") CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;;
++ "netnews/Makefile") CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;;
++ "perl/Makefile") CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;;
++ "$EXTRA_OUTPUT") CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++
++ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
++echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
++ { (exit 1); exit 1; }; };;
++ esac
++done
++
++
++# If the user did not use the arguments to specify the items to instantiate,
++# then the envvar interface is used. Set only those that are not.
++# We use the long form for the default assignment because of an extremely
++# bizarre bug on SunOS 4.1.3.
++if $ac_need_defaults; then
++ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
++ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
++fi
++
++# Have a temporary directory for convenience. Make it in the build tree
++# simply because there is no reason against having it here, and in addition,
++# creating and moving files from /tmp can sometimes cause problems.
++# Hook for its removal unless debugging.
++# Note that there is a small window in which the directory will not be cleaned:
++# after its creation but before its name has been assigned to `$tmp'.
++$debug ||
++{
++ tmp=
++ trap 'exit_status=$?
++ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
++' 0
++ trap '{ (exit 1); exit 1; }' 1 2 13 15
++}
++# Create a (secure) tmp directory for tmp files.
++
++{
++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
++ test -n "$tmp" && test -d "$tmp"
++} ||
++{
++ tmp=./conf$$-$RANDOM
++ (umask 077 && mkdir "$tmp")
++} ||
++{
++ echo "$me: cannot create a temporary directory in ." >&2
++ { (exit 1); exit 1; }
++}
++
++#
++# Set up the sed scripts for CONFIG_FILES section.
++#
++
++# No need to generate the scripts if there are no CONFIG_FILES.
++# This happens for instance when ./config.status config.h
++if test -n "$CONFIG_FILES"; then
++
++_ACEOF
++
++
++
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ cat >conf$$subs.sed <<_ACEOF
++SHELL!$SHELL$ac_delim
++PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
++PACKAGE_NAME!$PACKAGE_NAME$ac_delim
++PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
++PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
++PACKAGE_STRING!$PACKAGE_STRING$ac_delim
++PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
++exec_prefix!$exec_prefix$ac_delim
++prefix!$prefix$ac_delim
++program_transform_name!$program_transform_name$ac_delim
++bindir!$bindir$ac_delim
++sbindir!$sbindir$ac_delim
++libexecdir!$libexecdir$ac_delim
++datarootdir!$datarootdir$ac_delim
++datadir!$datadir$ac_delim
++sysconfdir!$sysconfdir$ac_delim
++sharedstatedir!$sharedstatedir$ac_delim
++localstatedir!$localstatedir$ac_delim
++includedir!$includedir$ac_delim
++oldincludedir!$oldincludedir$ac_delim
++docdir!$docdir$ac_delim
++infodir!$infodir$ac_delim
++htmldir!$htmldir$ac_delim
++dvidir!$dvidir$ac_delim
++pdfdir!$pdfdir$ac_delim
++psdir!$psdir$ac_delim
++libdir!$libdir$ac_delim
++localedir!$localedir$ac_delim
++mandir!$mandir$ac_delim
++DEFS!$DEFS$ac_delim
++ECHO_C!$ECHO_C$ac_delim
++ECHO_N!$ECHO_N$ac_delim
++ECHO_T!$ECHO_T$ac_delim
++LIBS!$LIBS$ac_delim
++build_alias!$build_alias$ac_delim
++host_alias!$host_alias$ac_delim
++target_alias!$target_alias$ac_delim
++build!$build$ac_delim
++build_cpu!$build_cpu$ac_delim
++build_vendor!$build_vendor$ac_delim
++build_os!$build_os$ac_delim
++host!$host$ac_delim
++host_cpu!$host_cpu$ac_delim
++host_vendor!$host_vendor$ac_delim
++host_os!$host_os$ac_delim
++WARNERROR!$WARNERROR$ac_delim
++MAKEDEPEND!$MAKEDEPEND$ac_delim
++cyrus_prefix!$cyrus_prefix$ac_delim
++service_path!$service_path$ac_delim
++cyrus_user!$cyrus_user$ac_delim
++cyrus_group!$cyrus_group$ac_delim
++CC!$CC$ac_delim
++CFLAGS!$CFLAGS$ac_delim
++LDFLAGS!$LDFLAGS$ac_delim
++CPPFLAGS!$CPPFLAGS$ac_delim
++ac_ct_CC!$ac_ct_CC$ac_delim
++EXEEXT!$EXEEXT$ac_delim
++OBJEXT!$OBJEXT$ac_delim
++RANLIB!$RANLIB$ac_delim
++SET_MAKE!$SET_MAKE$ac_delim
++INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
++INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
++INSTALL_DATA!$INSTALL_DATA$ac_delim
++CPP!$CPP$ac_delim
++GREP!$GREP$ac_delim
++EGREP!$EGREP$ac_delim
++AWK!$AWK$ac_delim
++LIB@&t at OBJS!$LIB@&t at OBJS$ac_delim
++LIB_SOCKET!$LIB_SOCKET$ac_delim
++IPV6_OBJS!$IPV6_OBJS$ac_delim
++PRE_SUBDIRS!$PRE_SUBDIRS$ac_delim
++EXTRA_SUBDIRS!$EXTRA_SUBDIRS$ac_delim
++DEPLIBS!$DEPLIBS$ac_delim
++LOCALDEFS!$LOCALDEFS$ac_delim
++BDB_INC!$BDB_INC$ac_delim
++BDB_LIB!$BDB_LIB$ac_delim
++CYRUSDB_OBJS!$CYRUSDB_OBJS$ac_delim
++SIEVE_OBJS!$SIEVE_OBJS$ac_delim
++SIEVE_LIBS!$SIEVE_LIBS$ac_delim
++SIEVE_CPPFLAGS!$SIEVE_CPPFLAGS$ac_delim
++YACC!$YACC$ac_delim
++YFLAGS!$YFLAGS$ac_delim
++LEX!$LEX$ac_delim
++LEXLIB!$LEXLIB$ac_delim
++LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim
++SIEVE_SUBDIRS!$SIEVE_SUBDIRS$ac_delim
++WITH_NONBLOCK!$WITH_NONBLOCK$ac_delim
++WITH_GMTOFF!$WITH_GMTOFF$ac_delim
++WITH_MAP!$WITH_MAP$ac_delim
++WITH_LOCK!$WITH_LOCK$ac_delim
++cyrus_sigveclib!$cyrus_sigveclib$ac_delim
++AFS_LIBS!$AFS_LIBS$ac_delim
++AFS_LDFLAGS!$AFS_LDFLAGS$ac_delim
++LDAP_CPPFLAGS!$LDAP_CPPFLAGS$ac_delim
++LDAP_LDFLAGS!$LDAP_LDFLAGS$ac_delim
++LDAP_LIBS!$LDAP_LIBS$ac_delim
++SERVER_SUBDIRS!$SERVER_SUBDIRS$ac_delim
++_ACEOF
++
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
++ break
++ elif $ac_last_try; then
++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
++ { (exit 1); exit 1; }; }
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++ fi
++done
++
++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
++if test -n "$ac_eof"; then
++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
++ ac_eof=`expr $ac_eof + 1`
++fi
++
++cat >>$CONFIG_STATUS <<_ACEOF
++cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
++_ACEOF
++sed '
++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
++s/^/s,@/; s/!/@,|#_!!_#|/
++:n
++t n
++s/'"$ac_delim"'$/,g/; t
++s/$/\\/; p
++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
++' >>$CONFIG_STATUS <conf$$subs.sed
++rm -f conf$$subs.sed
++cat >>$CONFIG_STATUS <<_ACEOF
++CEOF$ac_eof
++_ACEOF
++
++
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ cat >conf$$subs.sed <<_ACEOF
++OPENSSL_INC!$OPENSSL_INC$ac_delim
++OPENSSL_LIB!$OPENSSL_LIB$ac_delim
++ZEPHYR_LIBS!$ZEPHYR_LIBS$ac_delim
++ZEPHYR_CPPFLAGS!$ZEPHYR_CPPFLAGS$ac_delim
++IMAP_PROGS!$IMAP_PROGS$ac_delim
++COMPILE_ET!$COMPILE_ET$ac_delim
++COM_ERR_LIBS!$COM_ERR_LIBS$ac_delim
++COM_ERR_LDFLAGS!$COM_ERR_LDFLAGS$ac_delim
++COM_ERR_CPPFLAGS!$COM_ERR_CPPFLAGS$ac_delim
++LIB_CRYPT!$LIB_CRYPT$ac_delim
++GSSAPI_LIBS!$GSSAPI_LIBS$ac_delim
++GSSAPIBASE_LIBS!$GSSAPIBASE_LIBS$ac_delim
++LIB_DYN_SASL!$LIB_DYN_SASL$ac_delim
++DYNSASLFLAGS!$DYNSASLFLAGS$ac_delim
++LIB_SASL!$LIB_SASL$ac_delim
++SASLFLAGS!$SASLFLAGS$ac_delim
++PERL!$PERL$ac_delim
++PERL_CCCDLFLAGS!$PERL_CCCDLFLAGS$ac_delim
++MD5OBJ!$MD5OBJ$ac_delim
++SNMP_SUBDIRS!$SNMP_SUBDIRS$ac_delim
++CMU_LIB_SUBDIR!$CMU_LIB_SUBDIR$ac_delim
++LIB_WRAP!$LIB_WRAP$ac_delim
++SNMP_CONFIG!$SNMP_CONFIG$ac_delim
++LIB_UCDSNMP!$LIB_UCDSNMP$ac_delim
++LIB_RT!$LIB_RT$ac_delim
++IMAP_COM_ERR_LIBS!$IMAP_COM_ERR_LIBS$ac_delim
++IMAP_LIBS!$IMAP_LIBS$ac_delim
++PERL_SUBDIRS!$PERL_SUBDIRS$ac_delim
++PERL_DEPSUBDIRS!$PERL_DEPSUBDIRS$ac_delim
++LTLIBOBJS!$LTLIBOBJS$ac_delim
++_ACEOF
++
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
++ break
++ elif $ac_last_try; then
++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
++ { (exit 1); exit 1; }; }
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++ fi
++done
++
++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
++if test -n "$ac_eof"; then
++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
++ ac_eof=`expr $ac_eof + 1`
++fi
++
++cat >>$CONFIG_STATUS <<_ACEOF
++cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
++_ACEOF
++sed '
++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
++s/^/s,@/; s/!/@,|#_!!_#|/
++:n
++t n
++s/'"$ac_delim"'$/,g/; t
++s/$/\\/; p
++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
++' >>$CONFIG_STATUS <conf$$subs.sed
++rm -f conf$$subs.sed
++cat >>$CONFIG_STATUS <<_ACEOF
++:end
++s/|#_!!_#|//g
++CEOF$ac_eof
++_ACEOF
++
++
++# VPATH may cause trouble with some makes, so we remove $(srcdir),
++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# trailing colons and then remove the whole line if VPATH becomes empty
++# (actually we leave an empty line to preserve line numbers).
++if test "x$srcdir" = x.; then
++ ac_vpsub='/^[ ]*VPATH[ ]*=/{
++s/:*\$(srcdir):*/:/
++s/:*\${srcdir}:*/:/
++s/:*@srcdir@:*/:/
++s/^\([^=]*=[ ]*\):*/\1/
++s/:*$//
++s/^[^=]*=[ ]*$//
++}'
++fi
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++fi # test -n "$CONFIG_FILES"
++
++
++for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
++do
++ case $ac_tag in
++ :[FHLC]) ac_mode=$ac_tag; continue;;
++ esac
++ case $ac_mode$ac_tag in
++ :[FHL]*:*);;
++ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
++echo "$as_me: error: Invalid tag $ac_tag." >&2;}
++ { (exit 1); exit 1; }; };;
++ :[FH]-) ac_tag=-:-;;
++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
++ esac
++ ac_save_IFS=$IFS
++ IFS=:
++ set x $ac_tag
++ IFS=$ac_save_IFS
++ shift
++ ac_file=$1
++ shift
++
++ case $ac_mode in
++ :L) ac_source=$1;;
++ :[FH])
++ ac_file_inputs=
++ for ac_f
++ do
++ case $ac_f in
++ -) ac_f="$tmp/stdin";;
++ *) # Look for the file first in the build tree, then in the source tree
++ # (if the path is not absolute). The absolute path cannot be DOS-style,
++ # because $ac_f cannot contain `:'.
++ test -f "$ac_f" ||
++ case $ac_f in
++ [\\/$]*) false;;
++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
++ esac ||
++ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
++echo "$as_me: error: cannot find input file: $ac_f" >&2;}
++ { (exit 1); exit 1; }; };;
++ esac
++ ac_file_inputs="$ac_file_inputs $ac_f"
++ done
++
++ # Let's still pretend it is `configure' which instantiates (i.e., don't
++ # use $as_me), people would be surprised to read:
++ # /* config.h. Generated by config.status. */
++ configure_input="Generated from "`IFS=:
++ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
++ if test x"$ac_file" != x-; then
++ configure_input="$ac_file. $configure_input"
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ fi
++
++ case $ac_tag in
++ *:-:* | *:-) cat >"$tmp/stdin";;
++ esac
++ ;;
++ esac
++
++ ac_dir=`$as_dirname -- "$ac_file" ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$ac_file" : 'X\(//\)[^/]' \| \
++ X"$ac_file" : 'X\(//\)$' \| \
++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
++echo X"$ac_file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ { as_dir="$ac_dir"
++ case $as_dir in #(
++ -*) as_dir=./$as_dir;;
++ esac
++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
++ as_dirs=
++ while :; do
++ case $as_dir in #(
++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
++ *) as_qdir=$as_dir;;
++ esac
++ as_dirs="'$as_qdir' $as_dirs"
++ as_dir=`$as_dirname -- "$as_dir" ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
++echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ test -d "$as_dir" && break
++ done
++ test -z "$as_dirs" || eval "mkdir $as_dirs"
++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
++echo "$as_me: error: cannot create directory $as_dir" >&2;}
++ { (exit 1); exit 1; }; }; }
++ ac_builddir=.
++
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
++
++case $srcdir in
++ .) # We are building in place.
++ ac_srcdir=.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
++esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
++
++
++ case $ac_mode in
++ :F)
++ #
++ # CONFIG_FILE
++ #
++
++ case $INSTALL in
++ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
++ esac
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++# If the template does not know about datarootdir, expand it.
++# FIXME: This hack should be removed a few years after 2.60.
++ac_datarootdir_hack=; ac_datarootdir_seen=
++
++case `sed -n '/datarootdir/ {
++ p
++ q
++}
++/@datadir@/p
++/@docdir@/p
++/@infodir@/p
++/@localedir@/p
++/@mandir@/p
++' $ac_file_inputs` in
++*datarootdir*) ac_datarootdir_seen=yes;;
++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
++ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
++echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++ ac_datarootdir_hack='
++ s&@datadir@&$datadir&g
++ s&@docdir@&$docdir&g
++ s&@infodir@&$infodir&g
++ s&@localedir@&$localedir&g
++ s&@mandir@&$mandir&g
++ s&\\\${datarootdir}&$datarootdir&g' ;;
++esac
++_ACEOF
++
++# Neutralize VPATH when `$srcdir' = `.'.
++# Shell code in configure.ac might set extrasub.
++# FIXME: do we really want to maintain this feature?
++cat >>$CONFIG_STATUS <<_ACEOF
++ sed "$ac_vpsub
++$extrasub
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++:t
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
++s&@configure_input@&$configure_input&;t t
++s&@top_builddir@&$ac_top_builddir_sub&;t t
++s&@srcdir@&$ac_srcdir&;t t
++s&@abs_srcdir@&$ac_abs_srcdir&;t t
++s&@top_srcdir@&$ac_top_srcdir&;t t
++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
++s&@builddir@&$ac_builddir&;t t
++s&@abs_builddir@&$ac_abs_builddir&;t t
++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
++s&@INSTALL@&$ac_INSTALL&;t t
++$ac_datarootdir_hack
++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
++
++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
++ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
++ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined." >&5
++echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined." >&2;}
++
++ rm -f "$tmp/stdin"
++ case $ac_file in
++ -) cat "$tmp/out"; rm -f "$tmp/out";;
++ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
++ esac
++ ;;
++ :H)
++ #
++ # CONFIG_HEADER
++ #
++_ACEOF
++
++# Transform confdefs.h into a sed script `conftest.defines', that
++# substitutes the proper values into config.h.in to produce config.h.
++rm -f conftest.defines conftest.tail
++# First, append a space to every undef/define line, to ease matching.
++echo 's/$/ /' >conftest.defines
++# Then, protect against being on the right side of a sed subst, or in
++# an unquoted here document, in config.status. If some macros were
++# called several times there might be several #defines for the same
++# symbol, which is useless. But do not sort them, since the last
++# AC_DEFINE must be honored.
++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
++# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
++# NAME is the cpp macro being defined, VALUE is the value it is being given.
++# PARAMS is the parameter list in the macro definition--in most cases, it's
++# just an empty string.
++ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
++ac_dB='\\)[ (].*,\\1define\\2'
++ac_dC=' '
++ac_dD=' ,'
++
++uniq confdefs.h |
++ sed -n '
++ t rset
++ :rset
++ s/^[ ]*#[ ]*define[ ][ ]*//
++ t ok
++ d
++ :ok
++ s/[\\&,]/\\&/g
++ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
++ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
++ ' >>conftest.defines
++
++# Remove the space that was appended to ease matching.
++# Then replace #undef with comments. This is necessary, for
++# example, in the case of _POSIX_SOURCE, which is predefined and required
++# on some systems where configure will not decide to define it.
++# (The regexp can be short, since the line contains either #define or #undef.)
++echo 's/ $//
++s,^[ #]*u.*,/* & */,' >>conftest.defines
++
++# Break up conftest.defines:
++ac_max_sed_lines=50
++
++# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
++# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
++# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
++# et cetera.
++ac_in='$ac_file_inputs'
++ac_out='"$tmp/out1"'
++ac_nxt='"$tmp/out2"'
++
++while :
++do
++ # Write a here document:
++ cat >>$CONFIG_STATUS <<_ACEOF
++ # First, check the format of the line:
++ cat >"\$tmp/defines.sed" <<\\CEOF
++/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
++/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
++b
++:def
++_ACEOF
++ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
++ echo 'CEOF
++ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
++ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
++ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
++ grep . conftest.tail >/dev/null || break
++ rm -f conftest.defines
++ mv conftest.tail conftest.defines
++done
++rm -f conftest.defines conftest.tail
++
++echo "ac_result=$ac_in" >>$CONFIG_STATUS
++cat >>$CONFIG_STATUS <<\_ACEOF
++ if test x"$ac_file" != x-; then
++ echo "/* $configure_input */" >"$tmp/config.h"
++ cat "$ac_result" >>"$tmp/config.h"
++ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
++ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
++echo "$as_me: $ac_file is unchanged" >&6;}
++ else
++ rm -f $ac_file
++ mv "$tmp/config.h" $ac_file
++ fi
++ else
++ echo "/* $configure_input */"
++ cat "$ac_result"
++ fi
++ rm -f "$tmp/out12"
++ ;;
++
++
++ esac
++
++done # for ac_tag
++
++
++{ (exit 0); exit 0; }
++_ACEOF
++chmod +x $CONFIG_STATUS
++ac_clean_files=$ac_clean_files_save
++
++
++# configure is writing to config.log, and then calls config.status.
++# config.status does its own redirection, appending to config.log.
++# Unfortunately, on DOS this fails, as config.log is still kept open
++# by configure, so config.status won't be able to write to it; its
++# output is simply discarded. So we exec the FD to /dev/null,
++# effectively closing config.log, so it can be properly (re)opened and
++# appended to by config.status. When coming back to configure, we
++# need to make the FD available again.
++if test "$no_create" != yes; then
++ ac_cs_success=:
++ ac_config_status_args=
++ test "$silent" = yes &&
++ ac_config_status_args="$ac_config_status_args --quiet"
++ exec 5>/dev/null
++ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
++ exec 5>>config.log
++ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
++ # would make configure fail if this is the last instruction.
++ $ac_cs_success || { (exit 1); exit 1; }
++fi
++
+diff -urNad cyrus-imapd-2.3.7~/autom4te.cache/output.1 cyrus-imapd-2.3.7/autom4te.cache/output.1
+--- cyrus-imapd-2.3.7~/autom4te.cache/output.1 1970-01-01 01:00:00.000000000 +0100
++++ cyrus-imapd-2.3.7/autom4te.cache/output.1 2006-08-11 17:29:39.000000000 +0200
+@@ -0,0 +1,21650 @@
++@%:@! /bin/sh
++@%:@ Guess values for system-dependent variables and create Makefiles.
++@%:@ Generated by GNU Autoconf 2.60.
++@%:@
++@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++@%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++@%:@ This configure script is free software; the Free Software Foundation
++@%:@ gives unlimited permission to copy, distribute and modify it.
++## --------------------- ##
++## M4sh Initialization. ##
++## --------------------- ##
++
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++
++# PATH needs CR
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
++# Support unset when possible.
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++as_nl='
++'
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ { (exit 1); exit 1; }
++fi
++
++# Work around bugs in pre-3.0 UWIN ksh.
++for as_var in ENV MAIL MAILPATH
++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++done
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++ fi
++done
++
++# Required to use basename.
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
++ as_basename=basename
++else
++ as_basename=false
++fi
++
++
++# Name of the executable.
++as_me=`$as_basename -- "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++
++# CDPATH.
++$as_unset CDPATH
++
++
++if test "x$CONFIG_SHELL" = x; then
++ if (eval ":") 2>/dev/null; then
++ as_have_required=yes
++else
++ as_have_required=no
++fi
++
++ if test $as_have_required = yes && (eval ":
++(as_func_return () {
++ (exit \$1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test \$exitcode = 0) || { (exit 1); exit 1; }
++
++(
++ as_lineno_1=\$LINENO
++ as_lineno_2=\$LINENO
++ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
++ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
++") 2> /dev/null; then
++ :
++else
++ as_candidate_shells=
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ case $as_dir in
++ /*)
++ for as_base in sh bash ksh sh5; do
++ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
++ done;;
++ esac
++done
++IFS=$as_save_IFS
++
++
++ for as_shell in $as_candidate_shells $SHELL; do
++ # Try only shells that exist, to save several forks.
++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
++ { ("$as_shell") 2> /dev/null <<\_ASEOF
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++:
++_ASEOF
++}; then
++ CONFIG_SHELL=$as_shell
++ as_have_required=yes
++ if { "$as_shell" 2> /dev/null <<\_ASEOF
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++:
++(as_func_return () {
++ (exit $1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = "$1" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test $exitcode = 0) || { (exit 1); exit 1; }
++
++(
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
++
++_ASEOF
++}; then
++ break
++fi
++
++fi
++
++ done
++
++ if test "x$CONFIG_SHELL" != x; then
++ for as_var in BASH_ENV ENV
++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++ done
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
++fi
++
++
++ if test $as_have_required = no; then
++ echo This script requires a shell more modern than all the
++ echo shells that I found on your system. Please install a
++ echo modern shell, or manually run the script under such a
++ echo shell if you do have one.
++ { (exit 1); exit 1; }
++fi
++
++
++fi
++
++fi
++
++
++
++(eval "as_func_return () {
++ (exit \$1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test \$exitcode = 0") || {
++ echo No shell found that supports shell functions.
++ echo Please tell autoconf at gnu.org about your system,
++ echo including any error possibly output before this
++ echo message
++}
++
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
++
++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
++ # uniformly replaced by the line number. The first 'sed' inserts a
++ # line-number line after each line using $LINENO; the second 'sed'
++ # does the real work. The second script uses 'N' to pair each
++ # line-number line with the line containing $LINENO, and appends
++ # trailing '-' during substitution so that $LINENO is not a special
++ # case at line end.
++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
++ # scripts with optimization help from Paolo Bonzini. Blame Lee
++ # E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
++ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
++ N
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
++ t loop
++ s/-\n.*//
++ ' >$as_me.lineno &&
++ chmod +x "$as_me.lineno" ||
++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
++ { (exit 1); exit 1; }; }
++
++ # Don't try to exec as it changes $[0], causing all sort of problems
++ # (the dirname of $[0] is not the place where we might find the
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
++ # Exit status is that of the last command.
++ exit
++}
++
++
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in
++-n*)
++ case `echo 'x\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ *) ECHO_C='\c';;
++ esac;;
++*)
++ ECHO_N='-n';;
++esac
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir
++fi
++echo >conf$$.file
++if ln -s conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++ as_ln_s='cp -p'
++elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++else
++ as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
++
++if mkdir -p . 2>/dev/null; then
++ as_mkdir_p=:
++else
++ test -d ./-p && rmdir ./-p
++ as_mkdir_p=false
++fi
++
++# Find out whether ``test -x'' works. Don't use a zero-byte file, as
++# systems may use methods other than mode bits to determine executability.
++cat >conf$$.file <<_ASEOF
++#! /bin/sh
++exit 0
++_ASEOF
++chmod +x conf$$.file
++if test -x conf$$.file >/dev/null 2>&1; then
++ as_executable_p="test -x"
++else
++ as_executable_p=:
++fi
++rm -f conf$$.file
++
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
++
++# Sed expression to map a string onto a valid variable name.
++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
++
++
++
++exec 7<&0 </dev/null 6>&1
++
++# Name of the host.
++# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# so uname gets run too.
++ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
++
++#
++# Initializations.
++#
++ac_default_prefix=/usr/local
++ac_clean_files=
++ac_config_libobj_dir=.
++LIB@&t at OBJS=
++cross_compiling=no
++subdirs=
++MFLAGS=
++MAKEFLAGS=
++SHELL=${CONFIG_SHELL-/bin/sh}
++
++# Identity of this package.
++PACKAGE_NAME=
++PACKAGE_TARNAME=
++PACKAGE_VERSION=
++PACKAGE_STRING=
++PACKAGE_BUGREPORT=
++
++ac_unique_file="imap/imapd.c"
++# Factoring default headers for most tests.
++ac_includes_default="\
++#include <stdio.h>
++#if HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++#if HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++#if STDC_HEADERS
++# include <stdlib.h>
++# include <stddef.h>
++#else
++# if HAVE_STDLIB_H
++# include <stdlib.h>
++# endif
++#endif
++#if HAVE_STRING_H
++# if !STDC_HEADERS && HAVE_MEMORY_H
++# include <memory.h>
++# endif
++# include <string.h>
++#endif
++#if HAVE_STRINGS_H
++# include <strings.h>
++#endif
++#if HAVE_INTTYPES_H
++# include <inttypes.h>
++#endif
++#if HAVE_STDINT_H
++# include <stdint.h>
++#endif
++#if HAVE_UNISTD_H
++# include <unistd.h>
++#endif"
++
++ac_subst_vars='SHELL
++PATH_SEPARATOR
++PACKAGE_NAME
++PACKAGE_TARNAME
++PACKAGE_VERSION
++PACKAGE_STRING
++PACKAGE_BUGREPORT
++exec_prefix
++prefix
++program_transform_name
++bindir
++sbindir
++libexecdir
++datarootdir
++datadir
++sysconfdir
++sharedstatedir
++localstatedir
++includedir
++oldincludedir
++docdir
++infodir
++htmldir
++dvidir
++pdfdir
++psdir
++libdir
++localedir
++mandir
++DEFS
++ECHO_C
++ECHO_N
++ECHO_T
++LIBS
++build_alias
++host_alias
++target_alias
++build
++build_cpu
++build_vendor
++build_os
++host
++host_cpu
++host_vendor
++host_os
++WARNERROR
++MAKEDEPEND
++cyrus_prefix
++service_path
++cyrus_user
++cyrus_group
++CC
++CFLAGS
++LDFLAGS
++CPPFLAGS
++ac_ct_CC
++EXEEXT
++OBJEXT
++RANLIB
++SET_MAKE
++INSTALL_PROGRAM
++INSTALL_SCRIPT
++INSTALL_DATA
++CPP
++GREP
++EGREP
++AWK
++LIB@&t at OBJS
++LIB_SOCKET
++IPV6_OBJS
++PRE_SUBDIRS
++EXTRA_SUBDIRS
++DEPLIBS
++LOCALDEFS
++BDB_INC
++BDB_LIB
++CYRUSDB_OBJS
++SIEVE_OBJS
++SIEVE_LIBS
++SIEVE_CPPFLAGS
++YACC
++YFLAGS
++LEX
++LEXLIB
++LEX_OUTPUT_ROOT
++SIEVE_SUBDIRS
++WITH_NONBLOCK
++WITH_GMTOFF
++WITH_MAP
++WITH_LOCK
++cyrus_sigveclib
++AFS_LIBS
++AFS_LDFLAGS
++LDAP_CPPFLAGS
++LDAP_LDFLAGS
++LDAP_LIBS
++SERVER_SUBDIRS
++OPENSSL_INC
++OPENSSL_LIB
++ZEPHYR_LIBS
++ZEPHYR_CPPFLAGS
++IMAP_PROGS
++COMPILE_ET
++COM_ERR_LIBS
++COM_ERR_LDFLAGS
++COM_ERR_CPPFLAGS
++LIB_CRYPT
++GSSAPI_LIBS
++GSSAPIBASE_LIBS
++LIB_DYN_SASL
++DYNSASLFLAGS
++LIB_SASL
++SASLFLAGS
++PERL
++PERL_CCCDLFLAGS
++MD5OBJ
++SNMP_SUBDIRS
++CMU_LIB_SUBDIR
++LIB_WRAP
++SNMP_CONFIG
++LIB_UCDSNMP
++LIB_RT
++IMAP_COM_ERR_LIBS
++IMAP_LIBS
++PERL_SUBDIRS
++PERL_DEPSUBDIRS
++LTLIBOBJS'
++ac_subst_files=''
++ ac_precious_vars='build_alias
++host_alias
++target_alias
++CC
++CFLAGS
++LDFLAGS
++CPPFLAGS
++CPP
++YACC
++YFLAGS'
++
++
++# Initialize some variables set by options.
++ac_init_help=
++ac_init_version=false
++# The variables have the same names as the options, with
++# dashes changed to underlines.
++cache_file=/dev/null
++exec_prefix=NONE
++no_create=
++no_recursion=
++prefix=NONE
++program_prefix=NONE
++program_suffix=NONE
++program_transform_name=s,x,x,
++silent=
++site=
++srcdir=
++verbose=
++x_includes=NONE
++x_libraries=NONE
++
++# Installation directory options.
++# These are left unexpanded so users can "make install exec_prefix=/foo"
++# and all the variables that are supposed to be based on exec_prefix
++# by default will actually change.
++# Use braces instead of parens because sh, perl, etc. also accept them.
++# (The list follows the same order as the GNU Coding Standards.)
++bindir='${exec_prefix}/bin'
++sbindir='${exec_prefix}/sbin'
++libexecdir='${exec_prefix}/libexec'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
++sysconfdir='${prefix}/etc'
++sharedstatedir='${prefix}/com'
++localstatedir='${prefix}/var'
++includedir='${prefix}/include'
++oldincludedir='/usr/include'
++docdir='${datarootdir}/doc/${PACKAGE}'
++infodir='${datarootdir}/info'
++htmldir='${docdir}'
++dvidir='${docdir}'
++pdfdir='${docdir}'
++psdir='${docdir}'
++libdir='${exec_prefix}/lib'
++localedir='${datarootdir}/locale'
++mandir='${datarootdir}/man'
++
++ac_prev=
++ac_dashdash=
++for ac_option
++do
++ # If the previous option needs an argument, assign it.
++ if test -n "$ac_prev"; then
++ eval $ac_prev=\$ac_option
++ ac_prev=
++ continue
++ fi
++
++ case $ac_option in
++ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++ *) ac_optarg=yes ;;
++ esac
++
++ # Accept the important Cygnus configure options, so we can diagnose typos.
++
++ case $ac_dashdash$ac_option in
++ --)
++ ac_dashdash=yes ;;
++
++ -bindir | --bindir | --bindi | --bind | --bin | --bi)
++ ac_prev=bindir ;;
++ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
++ bindir=$ac_optarg ;;
++
++ -build | --build | --buil | --bui | --bu)
++ ac_prev=build_alias ;;
++ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
++ build_alias=$ac_optarg ;;
++
++ -cache-file | --cache-file | --cache-fil | --cache-fi \
++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
++ ac_prev=cache_file ;;
++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
++ cache_file=$ac_optarg ;;
++
++ --config-cache | -C)
++ cache_file=config.cache ;;
++
++ -datadir | --datadir | --datadi | --datad)
++ ac_prev=datadir ;;
++ -datadir=* | --datadir=* | --datadi=* | --datad=*)
++ datadir=$ac_optarg ;;
++
++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
++ | --dataroo | --dataro | --datar)
++ ac_prev=datarootdir ;;
++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
++ datarootdir=$ac_optarg ;;
++
++ -disable-* | --disable-*)
++ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
++ { (exit 1); exit 1; }; }
++ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++ eval enable_$ac_feature=no ;;
++
++ -docdir | --docdir | --docdi | --doc | --do)
++ ac_prev=docdir ;;
++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
++ docdir=$ac_optarg ;;
++
++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
++ ac_prev=dvidir ;;
++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
++ dvidir=$ac_optarg ;;
++
++ -enable-* | --enable-*)
++ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
++ { (exit 1); exit 1; }; }
++ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++ eval enable_$ac_feature=\$ac_optarg ;;
++
++ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
++ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
++ | --exec | --exe | --ex)
++ ac_prev=exec_prefix ;;
++ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
++ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
++ | --exec=* | --exe=* | --ex=*)
++ exec_prefix=$ac_optarg ;;
++
++ -gas | --gas | --ga | --g)
++ # Obsolete; use --with-gas.
++ with_gas=yes ;;
++
++ -help | --help | --hel | --he | -h)
++ ac_init_help=long ;;
++ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
++ ac_init_help=recursive ;;
++ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
++ ac_init_help=short ;;
++
++ -host | --host | --hos | --ho)
++ ac_prev=host_alias ;;
++ -host=* | --host=* | --hos=* | --ho=*)
++ host_alias=$ac_optarg ;;
++
++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
++ ac_prev=htmldir ;;
++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
++ | --ht=*)
++ htmldir=$ac_optarg ;;
++
++ -includedir | --includedir | --includedi | --included | --include \
++ | --includ | --inclu | --incl | --inc)
++ ac_prev=includedir ;;
++ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
++ | --includ=* | --inclu=* | --incl=* | --inc=*)
++ includedir=$ac_optarg ;;
++
++ -infodir | --infodir | --infodi | --infod | --info | --inf)
++ ac_prev=infodir ;;
++ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
++ infodir=$ac_optarg ;;
++
++ -libdir | --libdir | --libdi | --libd)
++ ac_prev=libdir ;;
++ -libdir=* | --libdir=* | --libdi=* | --libd=*)
++ libdir=$ac_optarg ;;
++
++ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
++ | --libexe | --libex | --libe)
++ ac_prev=libexecdir ;;
++ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
++ | --libexe=* | --libex=* | --libe=*)
++ libexecdir=$ac_optarg ;;
++
++ -localedir | --localedir | --localedi | --localed | --locale)
++ ac_prev=localedir ;;
++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
++ localedir=$ac_optarg ;;
++
++ -localstatedir | --localstatedir | --localstatedi | --localstated \
++ | --localstate | --localstat | --localsta | --localst | --locals)
++ ac_prev=localstatedir ;;
++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
++ localstatedir=$ac_optarg ;;
++
++ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
++ ac_prev=mandir ;;
++ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
++ mandir=$ac_optarg ;;
++
++ -nfp | --nfp | --nf)
++ # Obsolete; use --without-fp.
++ with_fp=no ;;
++
++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
++ | --no-cr | --no-c | -n)
++ no_create=yes ;;
++
++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
++ no_recursion=yes ;;
++
++ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
++ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
++ | --oldin | --oldi | --old | --ol | --o)
++ ac_prev=oldincludedir ;;
++ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
++ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
++ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
++ oldincludedir=$ac_optarg ;;
++
++ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
++ ac_prev=prefix ;;
++ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
++ prefix=$ac_optarg ;;
++
++ -program-prefix | --program-prefix | --program-prefi | --program-pref \
++ | --program-pre | --program-pr | --program-p)
++ ac_prev=program_prefix ;;
++ -program-prefix=* | --program-prefix=* | --program-prefi=* \
++ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
++ program_prefix=$ac_optarg ;;
++
++ -program-suffix | --program-suffix | --program-suffi | --program-suff \
++ | --program-suf | --program-su | --program-s)
++ ac_prev=program_suffix ;;
++ -program-suffix=* | --program-suffix=* | --program-suffi=* \
++ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
++ program_suffix=$ac_optarg ;;
++
++ -program-transform-name | --program-transform-name \
++ | --program-transform-nam | --program-transform-na \
++ | --program-transform-n | --program-transform- \
++ | --program-transform | --program-transfor \
++ | --program-transfo | --program-transf \
++ | --program-trans | --program-tran \
++ | --progr-tra | --program-tr | --program-t)
++ ac_prev=program_transform_name ;;
++ -program-transform-name=* | --program-transform-name=* \
++ | --program-transform-nam=* | --program-transform-na=* \
++ | --program-transform-n=* | --program-transform-=* \
++ | --program-transform=* | --program-transfor=* \
++ | --program-transfo=* | --program-transf=* \
++ | --program-trans=* | --program-tran=* \
++ | --progr-tra=* | --program-tr=* | --program-t=*)
++ program_transform_name=$ac_optarg ;;
++
++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
++ ac_prev=pdfdir ;;
++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
++ pdfdir=$ac_optarg ;;
++
++ -psdir | --psdir | --psdi | --psd | --ps)
++ ac_prev=psdir ;;
++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
++ psdir=$ac_optarg ;;
++
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil)
++ silent=yes ;;
++
++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
++ ac_prev=sbindir ;;
++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
++ | --sbi=* | --sb=*)
++ sbindir=$ac_optarg ;;
++
++ -sharedstatedir | --sharedstatedir | --sharedstatedi \
++ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
++ | --sharedst | --shareds | --shared | --share | --shar \
++ | --sha | --sh)
++ ac_prev=sharedstatedir ;;
++ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
++ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
++ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
++ | --sha=* | --sh=*)
++ sharedstatedir=$ac_optarg ;;
++
++ -site | --site | --sit)
++ ac_prev=site ;;
++ -site=* | --site=* | --sit=*)
++ site=$ac_optarg ;;
++
++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
++ ac_prev=srcdir ;;
++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
++ srcdir=$ac_optarg ;;
++
++ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
++ | --syscon | --sysco | --sysc | --sys | --sy)
++ ac_prev=sysconfdir ;;
++ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
++ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
++ sysconfdir=$ac_optarg ;;
++
++ -target | --target | --targe | --targ | --tar | --ta | --t)
++ ac_prev=target_alias ;;
++ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
++ target_alias=$ac_optarg ;;
++
++ -v | -verbose | --verbose | --verbos | --verbo | --verb)
++ verbose=yes ;;
++
++ -version | --version | --versio | --versi | --vers | -V)
++ ac_init_version=: ;;
++
++ -with-* | --with-*)
++ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid package name: $ac_package" >&2
++ { (exit 1); exit 1; }; }
++ ac_package=`echo $ac_package| sed 's/-/_/g'`
++ eval with_$ac_package=\$ac_optarg ;;
++
++ -without-* | --without-*)
++ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid package name: $ac_package" >&2
++ { (exit 1); exit 1; }; }
++ ac_package=`echo $ac_package | sed 's/-/_/g'`
++ eval with_$ac_package=no ;;
++
++ --x)
++ # Obsolete; use --with-x.
++ with_x=yes ;;
++
++ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
++ | --x-incl | --x-inc | --x-in | --x-i)
++ ac_prev=x_includes ;;
++ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
++ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
++ x_includes=$ac_optarg ;;
++
++ -x-libraries | --x-libraries | --x-librarie | --x-librari \
++ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
++ ac_prev=x_libraries ;;
++ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
++ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
++ x_libraries=$ac_optarg ;;
++
++ -*) { echo "$as_me: error: unrecognized option: $ac_option
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; }
++ ;;
++
++ *=*)
++ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
++ { (exit 1); exit 1; }; }
++ eval $ac_envvar=\$ac_optarg
++ export $ac_envvar ;;
++
++ *)
++ # FIXME: should be removed in autoconf 3.0.
++ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
++ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
++ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
++ ;;
++
++ esac
++done
++
++if test -n "$ac_prev"; then
++ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
++ { echo "$as_me: error: missing argument to $ac_option" >&2
++ { (exit 1); exit 1; }; }
++fi
++
++# Be sure to have absolute directory names.
++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
++ datadir sysconfdir sharedstatedir localstatedir includedir \
++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
++ libdir localedir mandir
++do
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ [\\/$]* | ?:[\\/]* ) continue;;
++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
++ esac
++ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
++ { (exit 1); exit 1; }; }
++done
++
++# There might be people who depend on the old broken behavior: `$host'
++# used to hold the argument of --host etc.
++# FIXME: To remove some day.
++build=$build_alias
++host=$host_alias
++target=$target_alias
++
++# FIXME: To remove some day.
++if test "x$host_alias" != x; then
++ if test "x$build_alias" = x; then
++ cross_compiling=maybe
++ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
++ If a cross compiler is detected then cross compile mode will be used." >&2
++ elif test "x$build_alias" != "x$host_alias"; then
++ cross_compiling=yes
++ fi
++fi
++
++ac_tool_prefix=
++test -n "$host_alias" && ac_tool_prefix=$host_alias-
++
++test "$silent" = yes && exec 6>/dev/null
++
++
++ac_pwd=`pwd` && test -n "$ac_pwd" &&
++ac_ls_di=`ls -di .` &&
++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
++ { echo "$as_me: error: Working directory cannot be determined" >&2
++ { (exit 1); exit 1; }; }
++test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
++ { echo "$as_me: error: pwd does not report name of working directory" >&2
++ { (exit 1); exit 1; }; }
++
++
++# Find the source files, if location was not specified.
++if test -z "$srcdir"; then
++ ac_srcdir_defaulted=yes
++ # Try the directory containing this script, then the parent directory.
++ ac_confdir=`$as_dirname -- "$0" ||
++$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$0" : 'X\(//\)[^/]' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++echo X"$0" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ srcdir=$ac_confdir
++ if test ! -r "$srcdir/$ac_unique_file"; then
++ srcdir=..
++ fi
++else
++ ac_srcdir_defaulted=no
++fi
++if test ! -r "$srcdir/$ac_unique_file"; then
++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
++ { (exit 1); exit 1; }; }
++fi
++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
++ac_abs_confdir=`(
++ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
++ { (exit 1); exit 1; }; }
++ pwd)`
++# When building in place, set srcdir=.
++if test "$ac_abs_confdir" = "$ac_pwd"; then
++ srcdir=.
++fi
++# Remove unnecessary trailing slashes from srcdir.
++# Double slashes in file names in object file debugging info
++# mess up M-x gdb in Emacs.
++case $srcdir in
++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
++esac
++for ac_var in $ac_precious_vars; do
++ eval ac_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_env_${ac_var}_value=\$${ac_var}
++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_cv_env_${ac_var}_value=\$${ac_var}
++done
++
++#
++# Report the --help message.
++#
++if test "$ac_init_help" = "long"; then
++ # Omit some internal or obsolete options to make the list less imposing.
++ # This message is too long to be a string in the A/UX 3.1 sh.
++ cat <<_ACEOF
++\`configure' configures this package to adapt to many kinds of systems.
++
++Usage: $0 [OPTION]... [VAR=VALUE]...
++
++To assign environment variables (e.g., CC, CFLAGS...), specify them as
++VAR=VALUE. See below for descriptions of some of the useful variables.
++
++Defaults for the options are specified in brackets.
++
++Configuration:
++ -h, --help display this help and exit
++ --help=short display options specific to this package
++ --help=recursive display the short help of all the included packages
++ -V, --version display version information and exit
++ -q, --quiet, --silent do not print \`checking...' messages
++ --cache-file=FILE cache test results in FILE [disabled]
++ -C, --config-cache alias for \`--cache-file=config.cache'
++ -n, --no-create do not create output files
++ --srcdir=DIR find the sources in DIR [configure dir or \`..']
++
++Installation directories:
++ --prefix=PREFIX install architecture-independent files in PREFIX
++ [$ac_default_prefix]
++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
++ [PREFIX]
++
++By default, \`make install' will install all the files in
++\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
++an installation prefix other than \`$ac_default_prefix' using \`--prefix',
++for instance \`--prefix=\$HOME'.
++
++For better control, use the options below.
++
++Fine tuning of the installation directories:
++ --bindir=DIR user executables [EPREFIX/bin]
++ --sbindir=DIR system admin executables [EPREFIX/sbin]
++ --libexecdir=DIR program executables [EPREFIX/libexec]
++ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
++ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
++ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
++ --libdir=DIR object code libraries [EPREFIX/lib]
++ --includedir=DIR C header files [PREFIX/include]
++ --oldincludedir=DIR C header files for non-gcc [/usr/include]
++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
++ --infodir=DIR info documentation [DATAROOTDIR/info]
++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
++ --mandir=DIR man documentation [DATAROOTDIR/man]
++ --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@
++ --htmldir=DIR html documentation [DOCDIR]
++ --dvidir=DIR dvi documentation [DOCDIR]
++ --pdfdir=DIR pdf documentation [DOCDIR]
++ --psdir=DIR ps documentation [DOCDIR]
++_ACEOF
++
++ cat <<\_ACEOF
++
++System types:
++ --build=BUILD configure for building on BUILD [guessed]
++ --host=HOST cross-compile to build programs to run on HOST [BUILD]
++_ACEOF
++fi
++
++if test -n "$ac_init_help"; then
++
++ cat <<\_ACEOF
++
++Optional Features:
++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
++ --enable-warnings-are-errors add -Werror to most gcc calls
++ --disable-sieve disable Sieve support
++ --enable-krb5afspts compile afskrb PTS module with krb5 support
++ --disable-server disable compiling servers
++ --enable-statickrb link Kerberos statically
++ --enable-idled enable IMAP idled support
++ --enable-nntp enable NNTP support
++ --enable-murder enable IMAP Murder support
++ --enable-replication enable replication support (experimental)
++ --enable-cmulocal enable CMU-specific local support
++ --enable-oldsievename enable the use of 'imap' as the sieve service name
++ --enable-listext enable IMAP List extensions
++ --enable-netscapehack enable Netscape hack for the menu option
++ in Communicator to Administrate Mail
++ --enable-gssapi=<DIR> enable GSSAPI authentication [yes]
++
++Optional Packages:
++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
++ --with-extraident=STRING use STRING as extra version information
++
++ --with-cyrus-prefix=DIR use DIR as cyrus server install directory
++ --with-service-path=DIR use DIR as service install directory
++ --with-cyrus-user=USERID use USERID cyrus userid
++ --with-cyrus-group=GROUPID use GROUPID cyrus group
++ --with-bdb=DIR use Berkeley DB (in DIR) [yes]
++ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR
++ --with-bdb-incdir=DIR Berkeley DB include files are in DIR
++ --with-lock=METHOD force use of METHOD for locking (flock or fcntl)
++ --with-afs=PATH use AFS libraries from PATH
++ --with-ldap=DIR use LDAP (in DIR) (experimental) /usr/local
++ --with-krb=PATH use Kerberos from PATH
++ --with-krbimpl=\kth|mit\ assume Kerberos 4 from KTH or MIT
++ --with-krbdes use Kerberos DES implementation [yes]
++ --with-openssl=PATH use OpenSSL from PATH
++ --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
++ for systems without /dev/urandom
++ --with-zephyr=PATH enable Zephyr notification (installed on PATH)
++ --with-pidfile=PATH pidfile in PATH (/var/run/cyrus-master.pid)
++ --with-com_err=PATH use com_err from path -- includes in PATH/include,
++ libs in PATH/lib, and compile_et in PATH/bin
++ --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6)
++ --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
++ choose specific GSSAPI implementation [[auto]]
++ --with-sasl=DIR Compile with libsasl2 in <DIR>
++ --with-staticsasl=DIR Compile with staticly linked libsasl2 in <DIR>
++ --with-perl=PERL use PERL for perl
++ --with-lib-subdir=DIR Find libraries in DIR instead of lib
++ --with-libwrap=DIR use libwrap (rooted in DIR) yes
++ --with-snmp=DIR use ucd|net snmp (rooted in DIR) yes
++
++Some influential environment variables:
++ CC C compiler command
++ CFLAGS C compiler flags
++ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
++ nonstandard directory <lib dir>
++ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
++ you have headers in a nonstandard directory <include dir>
++ CPP C preprocessor
++ YACC The `Yet Another C Compiler' implementation to use. Defaults to
++ the first program found out of: `bison -y', `byacc', `yacc'.
++ YFLAGS The list of arguments that will be passed by default to $YACC.
++ This script will default YFLAGS to the empty string to avoid a
++ default value of `-d' given by some make applications.
++
++Use these variables to override the choices made by `configure' or to help
++it to find libraries and programs with nonstandard names/locations.
++
++_ACEOF
++ac_status=$?
++fi
++
++if test "$ac_init_help" = "recursive"; then
++ # If there are subdirs, report their specific --help.
++ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
++ test -d "$ac_dir" || continue
++ ac_builddir=.
++
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
++
++case $srcdir in
++ .) # We are building in place.
++ ac_srcdir=.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
++esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
++
++ cd "$ac_dir" || { ac_status=$?; continue; }
++ # Check for guested configure.
++ if test -f "$ac_srcdir/configure.gnu"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
++ elif test -f "$ac_srcdir/configure"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure" --help=recursive
++ else
++ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
++ fi || ac_status=$?
++ cd "$ac_pwd" || { ac_status=$?; break; }
++ done
++fi
++
++test -n "$ac_init_help" && exit $ac_status
++if $ac_init_version; then
++ cat <<\_ACEOF
++configure
++generated by GNU Autoconf 2.60
++
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++This configure script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it.
++_ACEOF
++ exit
++fi
++cat >config.log <<_ACEOF
++This file contains any messages produced by compilers while
++running configure, to aid debugging if configure makes a mistake.
++
++It was created by $as_me, which was
++generated by GNU Autoconf 2.60. Invocation command line was
++
++ $ $0 $@
++
++_ACEOF
++exec 5>>config.log
++{
++cat <<_ASUNAME
++@%:@@%:@ --------- @%:@@%:@
++@%:@@%:@ Platform. @%:@@%:@
++@%:@@%:@ --------- @%:@@%:@
++
++hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
++uname -m = `(uname -m) 2>/dev/null || echo unknown`
++uname -r = `(uname -r) 2>/dev/null || echo unknown`
++uname -s = `(uname -s) 2>/dev/null || echo unknown`
++uname -v = `(uname -v) 2>/dev/null || echo unknown`
++
++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
++/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
++
++/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
++/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
++/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
++
++_ASUNAME
++
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ echo "PATH: $as_dir"
++done
++IFS=$as_save_IFS
++
++} >&5
++
++cat >&5 <<_ACEOF
++
++
++@%:@@%:@ ----------- @%:@@%:@
++@%:@@%:@ Core tests. @%:@@%:@
++@%:@@%:@ ----------- @%:@@%:@
++
++_ACEOF
++
++
++# Keep a trace of the command line.
++# Strip out --no-create and --no-recursion so they do not pile up.
++# Strip out --silent because we don't want to record it for future runs.
++# Also quote any args containing shell meta-characters.
++# Make two passes to allow for proper duplicate-argument suppression.
++ac_configure_args=
++ac_configure_args0=
++ac_configure_args1=
++ac_must_keep_next=false
++for ac_pass in 1 2
++do
++ for ac_arg
++ do
++ case $ac_arg in
++ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil)
++ continue ;;
++ *\'*)
++ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++ esac
++ case $ac_pass in
++ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
++ 2)
++ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
++ if test $ac_must_keep_next = true; then
++ ac_must_keep_next=false # Got value, back to normal.
++ else
++ case $ac_arg in
++ *=* | --config-cache | -C | -disable-* | --disable-* \
++ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
++ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
++ | -with-* | --with-* | -without-* | --without-* | --x)
++ case "$ac_configure_args0 " in
++ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
++ esac
++ ;;
++ -* ) ac_must_keep_next=true ;;
++ esac
++ fi
++ ac_configure_args="$ac_configure_args '$ac_arg'"
++ ;;
++ esac
++ done
++done
++$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
++$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
++
++# When interrupted or exit'd, cleanup temporary files, and complete
++# config.log. We remove comments because anyway the quotes in there
++# would cause problems or look ugly.
++# WARNING: Use '\'' to represent an apostrophe within the trap.
++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
++trap 'exit_status=$?
++ # Save into config.log some information that might help in debugging.
++ {
++ echo
++
++ cat <<\_ASBOX
++@%:@@%:@ ---------------- @%:@@%:@
++@%:@@%:@ Cache variables. @%:@@%:@
++@%:@@%:@ ---------------- @%:@@%:@
++_ASBOX
++ echo
++ # The following way of writing the cache mishandles newlines in values,
++(
++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ *) $as_unset $ac_var ;;
++ esac ;;
++ esac
++ done
++ (set) 2>&1 |
++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
++ sed -n \
++ "s/'\''/'\''\\\\'\'''\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
++ ;; #(
++ *)
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++ ;;
++ esac |
++ sort
++)
++ echo
++
++ cat <<\_ASBOX
++@%:@@%:@ ----------------- @%:@@%:@
++@%:@@%:@ Output variables. @%:@@%:@
++@%:@@%:@ ----------------- @%:@@%:@
++_ASBOX
++ echo
++ for ac_var in $ac_subst_vars
++ do
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ echo "$ac_var='\''$ac_val'\''"
++ done | sort
++ echo
++
++ if test -n "$ac_subst_files"; then
++ cat <<\_ASBOX
++@%:@@%:@ ------------------- @%:@@%:@
++@%:@@%:@ File substitutions. @%:@@%:@
++@%:@@%:@ ------------------- @%:@@%:@
++_ASBOX
++ echo
++ for ac_var in $ac_subst_files
++ do
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ echo "$ac_var='\''$ac_val'\''"
++ done | sort
++ echo
++ fi
++
++ if test -s confdefs.h; then
++ cat <<\_ASBOX
++@%:@@%:@ ----------- @%:@@%:@
++@%:@@%:@ confdefs.h. @%:@@%:@
++@%:@@%:@ ----------- @%:@@%:@
++_ASBOX
++ echo
++ cat confdefs.h
++ echo
++ fi
++ test "$ac_signal" != 0 &&
++ echo "$as_me: caught signal $ac_signal"
++ echo "$as_me: exit $exit_status"
++ } >&5
++ rm -f core *.core core.conftest.* &&
++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
++ exit $exit_status
++' 0
++for ac_signal in 1 2 13 15; do
++ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
++done
++ac_signal=0
++
++# confdefs.h avoids OS command line length limits that DEFS can exceed.
++rm -f -r conftest* confdefs.h
++
++# Predefined preprocessor variables.
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_NAME "$PACKAGE_NAME"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_STRING "$PACKAGE_STRING"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
++_ACEOF
++
++
++# Let the site file select an alternate cache file if it wants to.
++# Prefer explicitly selected file to automatically selected ones.
++if test -n "$CONFIG_SITE"; then
++ set x "$CONFIG_SITE"
++elif test "x$prefix" != xNONE; then
++ set x "$prefix/share/config.site" "$prefix/etc/config.site"
++else
++ set x "$ac_default_prefix/share/config.site" \
++ "$ac_default_prefix/etc/config.site"
++fi
++shift
++for ac_site_file
++do
++ if test -r "$ac_site_file"; then
++ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
++echo "$as_me: loading site script $ac_site_file" >&6;}
++ sed 's/^/| /' "$ac_site_file" >&5
++ . "$ac_site_file"
++ fi
++done
++
++if test -r "$cache_file"; then
++ # Some versions of bash will fail to source /dev/null (special
++ # files actually), so we avoid doing that.
++ if test -f "$cache_file"; then
++ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
++echo "$as_me: loading cache $cache_file" >&6;}
++ case $cache_file in
++ [\\/]* | ?:[\\/]* ) . "$cache_file";;
++ *) . "./$cache_file";;
++ esac
++ fi
++else
++ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
++echo "$as_me: creating cache $cache_file" >&6;}
++ >$cache_file
++fi
++
++# Check that the precious variables saved in the cache have kept the same
++# value.
++ac_cache_corrupted=false
++for ac_var in $ac_precious_vars; do
++ eval ac_old_set=\$ac_cv_env_${ac_var}_set
++ eval ac_new_set=\$ac_env_${ac_var}_set
++ eval ac_old_val=\$ac_cv_env_${ac_var}_value
++ eval ac_new_val=\$ac_env_${ac_var}_value
++ case $ac_old_set,$ac_new_set in
++ set,)
++ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
++ ac_cache_corrupted=: ;;
++ ,set)
++ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
++echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
++ ac_cache_corrupted=: ;;
++ ,);;
++ *)
++ if test "x$ac_old_val" != "x$ac_new_val"; then
++ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
++echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
++ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
++echo "$as_me: former value: $ac_old_val" >&2;}
++ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
++echo "$as_me: current value: $ac_new_val" >&2;}
++ ac_cache_corrupted=:
++ fi;;
++ esac
++ # Pass precious variables to config.status.
++ if test "$ac_new_set" = set; then
++ case $ac_new_val in
++ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
++ *) ac_arg=$ac_var=$ac_new_val ;;
++ esac
++ case " $ac_configure_args " in
++ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
++ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
++ esac
++ fi
++done
++if $ac_cache_corrupted; then
++ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
++echo "$as_me: error: changes in the environment can compromise the build" >&2;}
++ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
++echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++
++ac_config_headers="$ac_config_headers config.h"
++
++ac_aux_dir=
++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
++ if test -f "$ac_dir/install-sh"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install-sh -c"
++ break
++ elif test -f "$ac_dir/install.sh"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install.sh -c"
++ break
++ elif test -f "$ac_dir/shtool"; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/shtool install -c"
++ break
++ fi
++done
++if test -z "$ac_aux_dir"; then
++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
++echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++# These three variables are undocumented and unsupported,
++# and are intended to be withdrawn in a future Autoconf release.
++# They can cause serious problems if a builder's source tree is in a directory
++# whose full name contains unusual characters.
++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
++
++
++# Make sure we can run config.sub.
++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
++ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
++echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
++ { (exit 1); exit 1; }; }
++
++{ echo "$as_me:$LINENO: checking build system type" >&5
++echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
++if test "${ac_cv_build+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_build_alias=$build_alias
++test "x$ac_build_alias" = x &&
++ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
++test "x$ac_build_alias" = x &&
++ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
++echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
++ { (exit 1); exit 1; }; }
++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
++ { (exit 1); exit 1; }; }
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
++echo "${ECHO_T}$ac_cv_build" >&6; }
++case $ac_cv_build in
++*-*-*) ;;
++*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
++echo "$as_me: error: invalid value of canonical build" >&2;}
++ { (exit 1); exit 1; }; };;
++esac
++build=$ac_cv_build
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_build
++shift
++build_cpu=$1
++build_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++build_os=$*
++IFS=$ac_save_IFS
++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
++
++
++{ echo "$as_me:$LINENO: checking host system type" >&5
++echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
++if test "${ac_cv_host+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "x$host_alias" = x; then
++ ac_cv_host=$ac_cv_build
++else
++ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
++echo "${ECHO_T}$ac_cv_host" >&6; }
++case $ac_cv_host in
++*-*-*) ;;
++*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
++echo "$as_me: error: invalid value of canonical host" >&2;}
++ { (exit 1); exit 1; }; };;
++esac
++host=$ac_cv_host
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_host
++shift
++host_cpu=$1
++host_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++host_os=$*
++IFS=$ac_save_IFS
++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
++
++
++
++WARNERROR=-W
++# Check whether --enable-warnings-are-errors was given.
++if test "${enable_warnings_are_errors+set}" = set; then
++ enableval=$enable_warnings_are_errors; if test "$enableval" != "no" ; then WARNERROR=-Werror ; fi
++fi
++
++
++
++
++# Check whether --with-extraident was given.
++if test "${with_extraident+set}" = set; then
++ withval=$with_extraident;
++cat >>confdefs.h <<_ACEOF
++@%:@define EXTRA_IDENT "$withval"
++_ACEOF
++
++fi
++
++
++# Extract the first word of "makedepend", so it can be a program name with args.
++set dummy makedepend; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_MAKEDEPEND+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$MAKEDEPEND"; then
++ ac_cv_prog_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_MAKEDEPEND="makedepend"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_prog_MAKEDEPEND" && ac_cv_prog_MAKEDEPEND="`cd ${srcdir};pwd`/tools/not-mkdep"
++fi
++fi
++MAKEDEPEND=$ac_cv_prog_MAKEDEPEND
++if test -n "$MAKEDEPEND"; then
++ { echo "$as_me:$LINENO: result: $MAKEDEPEND" >&5
++echo "${ECHO_T}$MAKEDEPEND" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++if test "$MAKEDEPEND" != "makedepend"; then
++ { echo "$as_me:$LINENO: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&5
++echo "$as_me: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&2;}
++fi
++
++
++# Check whether --with-login was given.
++if test "${with_login+set}" = set; then
++ withval=$with_login; { { echo "$as_me:$LINENO: error: --with-login is no longer supported.
++Configure SASL appropriately instead." >&5
++echo "$as_me: error: --with-login is no longer supported.
++Configure SASL appropriately instead." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++
++# Check whether --with-cyrus-prefix was given.
++if test "${with_cyrus_prefix+set}" = set; then
++ withval=$with_cyrus_prefix; cyrus_prefix="$withval"
++else
++ cyrus_prefix="/usr/cyrus"
++fi
++
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define CYRUS_PATH "$cyrus_prefix"
++_ACEOF
++
++
++# Check whether --with-service-path was given.
++if test "${with_service_path+set}" = set; then
++ withval=$with_service_path; service_path="$withval"
++else
++ service_path="$cyrus_prefix/bin"
++fi
++
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define SERVICE_PATH "$service_path"
++_ACEOF
++
++
++# Check whether --with-cyrus-user was given.
++if test "${with_cyrus_user+set}" = set; then
++ withval=$with_cyrus_user; cyrus_user="$withval"
++else
++ cyrus_user="cyrus"
++fi
++
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define CYRUS_USER "$cyrus_user"
++_ACEOF
++
++
++# Check whether --with-cyrus-group was given.
++if test "${with_cyrus_group+set}" = set; then
++ withval=$with_cyrus_group; cyrus_group="$withval"
++else
++ cyrus_group="mail"
++fi
++
++
++
++if test $sysconfdir = '${prefix}/etc'; then
++ sysconfdir="/etc"
++fi
++
++cat >>confdefs.h <<_ACEOF
++@%:@define SYSCONFDIR "$sysconfdir"
++_ACEOF
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}gcc; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_CC="${ac_tool_prefix}gcc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_CC"; then
++ ac_ct_CC=$CC
++ # Extract the first word of "gcc", so it can be a program name with args.
++set dummy gcc; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_CC"; then
++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_CC="gcc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++ if test "x$ac_ct_CC" = x; then
++ CC=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ CC=$ac_ct_CC
++ fi
++else
++ CC="$ac_cv_prog_CC"
++fi
++
++if test -z "$CC"; then
++ if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}cc; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_CC="${ac_tool_prefix}cc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ fi
++fi
++if test -z "$CC"; then
++ # Extract the first word of "cc", so it can be a program name with args.
++set dummy cc; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++ ac_prog_rejected=no
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
++ ac_prog_rejected=yes
++ continue
++ fi
++ ac_cv_prog_CC="cc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++if test $ac_prog_rejected = yes; then
++ # We found a bogon in the path, so make sure we never use it.
++ set dummy $ac_cv_prog_CC
++ shift
++ if test $@%:@ != 0; then
++ # We chose a different compiler from the bogus one.
++ # However, it has the same basename, so the bogon will be chosen
++ # first if we set CC to just the basename; use the full file name.
++ shift
++ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
++ fi
++fi
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++fi
++if test -z "$CC"; then
++ if test -n "$ac_tool_prefix"; then
++ for ac_prog in cl.exe
++ do
++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$CC" && break
++ done
++fi
++if test -z "$CC"; then
++ ac_ct_CC=$CC
++ for ac_prog in cl.exe
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_CC"; then
++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_CC="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$ac_ct_CC" && break
++done
++
++ if test "x$ac_ct_CC" = x; then
++ CC=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ CC=$ac_ct_CC
++ fi
++fi
++
++fi
++
++
++test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
++See \`config.log' for more details." >&5
++echo "$as_me: error: no acceptable C compiler found in \$PATH
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++
++# Provide some information about the compiler.
++echo "$as_me:$LINENO: checking for C compiler version" >&5
++ac_compiler=`set X $ac_compile; echo $2`
++{ (ac_try="$ac_compiler --version >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler --version >&5") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++{ (ac_try="$ac_compiler -v >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler -v >&5") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++{ (ac_try="$ac_compiler -V >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler -V >&5") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files a.out a.exe b.out"
++# Try to create an executable without -o first, disregard a.out.
++# It will help us diagnose broken compilers, and finding out an intuition
++# of exeext.
++{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
++echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
++ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
++#
++# List of possible output files, starting from the most likely.
++# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
++# only as a last resort. b.out is created by i960 compilers.
++ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
++#
++# The IRIX 6 linker writes into existing files which may not be
++# executable, retaining their permissions. Remove them first so a
++# subsequent execution test works.
++ac_rmfiles=
++for ac_file in $ac_files
++do
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
++ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
++ esac
++done
++rm -f $ac_rmfiles
++
++if { (ac_try="$ac_link_default"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link_default") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
++# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
++# in a Makefile. We should not override ac_cv_exeext if it was cached,
++# so that the user can short-circuit this test for compilers unknown to
++# Autoconf.
++for ac_file in $ac_files
++do
++ test -f "$ac_file" || continue
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
++ ;;
++ [ab].out )
++ # We found the default executable, but exeext='' is most
++ # certainly right.
++ break;;
++ *.* )
++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
++ then :; else
++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ fi
++ # We set ac_cv_exeext here because the later test for it is not
++ # safe: cross compilers may not add the suffix if given an `-o'
++ # argument, so we may need to know it at that point already.
++ # Even if this section looks crufty: it has the advantage of
++ # actually working.
++ break;;
++ * )
++ break;;
++ esac
++done
++test "$ac_cv_exeext" = no && ac_cv_exeext=
++
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
++See \`config.log' for more details." >&5
++echo "$as_me: error: C compiler cannot create executables
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++
++ac_exeext=$ac_cv_exeext
++{ echo "$as_me:$LINENO: result: $ac_file" >&5
++echo "${ECHO_T}$ac_file" >&6; }
++
++# Check that the compiler produces executables we can run. If not, either
++# the compiler is broken, or we cross compile.
++{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
++# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
++# If not cross compiling, check that we can run a simple program.
++if test "$cross_compiling" != yes; then
++ if { ac_try='./$ac_file'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cross_compiling=no
++ else
++ if test "$cross_compiling" = maybe; then
++ cross_compiling=yes
++ else
++ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
++If you meant to cross compile, use \`--host'.
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot run C compiled programs.
++If you meant to cross compile, use \`--host'.
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++ fi
++fi
++{ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++
++rm -f a.out a.exe conftest$ac_cv_exeext b.out
++ac_clean_files=$ac_clean_files_save
++# Check that the compiler produces executables we can run. If not, either
++# the compiler is broken, or we cross compile.
++{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
++echo "${ECHO_T}$cross_compiling" >&6; }
++
++{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ # If both `conftest.exe' and `conftest' are `present' (well, observable)
++# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
++# work properly (i.e., refer to `conftest.exe'), while it won't with
++# `rm'.
++for ac_file in conftest.exe conftest conftest.*; do
++ test -f "$ac_file" || continue
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
++ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ break;;
++ * ) break;;
++ esac
++done
++else
++ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++rm -f conftest$ac_cv_exeext
++{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
++echo "${ECHO_T}$ac_cv_exeext" >&6; }
++
++rm -f conftest.$ac_ext
++EXEEXT=$ac_cv_exeext
++ac_exeext=$EXEEXT
++{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
++echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
++if test "${ac_cv_objext+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.o conftest.obj
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ for ac_file in conftest.o conftest.obj conftest.*; do
++ test -f "$ac_file" || continue;
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
++ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
++ break;;
++ esac
++done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute suffix of object files: cannot compile
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++rm -f conftest.$ac_cv_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
++echo "${ECHO_T}$ac_cv_objext" >&6; }
++OBJEXT=$ac_cv_objext
++ac_objext=$OBJEXT
++{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
++if test "${ac_cv_c_compiler_gnu+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++#ifndef __GNUC__
++ choke me
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_compiler_gnu=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_compiler_gnu=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ac_cv_c_compiler_gnu=$ac_compiler_gnu
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
++GCC=`test $ac_compiler_gnu = yes && echo yes`
++ac_test_CFLAGS=${CFLAGS+set}
++ac_save_CFLAGS=$CFLAGS
++{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
++if test "${ac_cv_prog_cc_g+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_save_c_werror_flag=$ac_c_werror_flag
++ ac_c_werror_flag=yes
++ ac_cv_prog_cc_g=no
++ CFLAGS="-g"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_g=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ CFLAGS=""
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_c_werror_flag=$ac_save_c_werror_flag
++ CFLAGS="-g"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_g=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_c_werror_flag=$ac_save_c_werror_flag
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
++if test "$ac_test_CFLAGS" = set; then
++ CFLAGS=$ac_save_CFLAGS
++elif test $ac_cv_prog_cc_g = yes; then
++ if test "$GCC" = yes; then
++ CFLAGS="-g -O2"
++ else
++ CFLAGS="-g"
++ fi
++else
++ if test "$GCC" = yes; then
++ CFLAGS="-O2"
++ else
++ CFLAGS=
++ fi
++fi
++{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
++echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
++if test "${ac_cv_prog_cc_c89+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_prog_cc_c89=no
++ac_save_CC=$CC
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdarg.h>
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
++struct buf { int x; };
++FILE * (*rcsopen) (struct buf *, struct stat *, int);
++static char *e (p, i)
++ char **p;
++ int i;
++{
++ return p[i];
++}
++static char *f (char * (*g) (char **, int), char **p, ...)
++{
++ char *s;
++ va_list v;
++ va_start (v,p);
++ s = g (p, va_arg (v,int));
++ va_end (v);
++ return s;
++}
++
++/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
++ function prototypes and stuff, but not '\xHH' hex character constants.
++ These don't provoke an error unfortunately, instead are silently treated
++ as 'x'. The following induces an error, until -std is added to get
++ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
++ array size at least. It's necessary to write '\x00'==0 to get something
++ that's true only with -std. */
++int osf4_cc_array ['\x00' == 0 ? 1 : -1];
++
++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
++ inside strings and character constants. */
++#define FOO(x) 'x'
++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
++
++int test (int i, double x);
++struct s1 {int (*f) (int a);};
++struct s2 {int (*f) (double a);};
++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
++int argc;
++char **argv;
++int
++main ()
++{
++return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
++ ;
++ return 0;
++}
++_ACEOF
++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
++ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++do
++ CC="$ac_save_CC $ac_arg"
++ rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_c89=$ac_arg
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext
++ test "x$ac_cv_prog_cc_c89" != "xno" && break
++done
++rm -f conftest.$ac_ext
++CC=$ac_save_CC
++
++fi
++# AC_CACHE_VAL
++case "x$ac_cv_prog_cc_c89" in
++ x)
++ { echo "$as_me:$LINENO: result: none needed" >&5
++echo "${ECHO_T}none needed" >&6; } ;;
++ xno)
++ { echo "$as_me:$LINENO: result: unsupported" >&5
++echo "${ECHO_T}unsupported" >&6; } ;;
++ *)
++ CC="$CC $ac_cv_prog_cc_c89"
++ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
++esac
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
++set dummy ${ac_tool_prefix}ranlib; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_RANLIB+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$RANLIB"; then
++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++RANLIB=$ac_cv_prog_RANLIB
++if test -n "$RANLIB"; then
++ { echo "$as_me:$LINENO: result: $RANLIB" >&5
++echo "${ECHO_T}$RANLIB" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_RANLIB"; then
++ ac_ct_RANLIB=$RANLIB
++ # Extract the first word of "ranlib", so it can be a program name with args.
++set dummy ranlib; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_RANLIB"; then
++ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_RANLIB="ranlib"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
++if test -n "$ac_ct_RANLIB"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
++echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++ if test "x$ac_ct_RANLIB" = x; then
++ RANLIB=":"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ RANLIB=$ac_ct_RANLIB
++ fi
++else
++ RANLIB="$ac_cv_prog_RANLIB"
++fi
++
++{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
++set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.make <<\_ACEOF
++SHELL = /bin/sh
++all:
++ @echo '@@@%%%=$(MAKE)=@@@%%%'
++_ACEOF
++# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
++case `${MAKE-make} -f conftest.make 2>/dev/null` in
++ *@@@%%%=?*=@@@%%%*)
++ eval ac_cv_prog_make_${ac_make}_set=yes;;
++ *)
++ eval ac_cv_prog_make_${ac_make}_set=no;;
++esac
++rm -f conftest.make
++fi
++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++ SET_MAKE=
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++ SET_MAKE="MAKE=${MAKE-make}"
++fi
++
++# Find a good install program. We prefer a C program (faster),
++# so one script is as good as another. But avoid the broken or
++# incompatible versions:
++# SysV /etc/install, /usr/sbin/install
++# SunOS /usr/etc/install
++# IRIX /sbin/install
++# AIX /bin/install
++# AmigaOS /C/install, which installs bootblocks on floppy discs
++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
++# AFS /usr/afsws/bin/install, which mishandles nonexistent args
++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
++# OS/2's system install, which has a completely different semantic
++# ./install, which can be erroneously created by make from ./install.sh.
++{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
++if test -z "$INSTALL"; then
++if test "${ac_cv_path_install+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ # Account for people who put trailing slashes in PATH elements.
++case $as_dir/ in
++ ./ | .// | /cC/* | \
++ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
++ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
++ /usr/ucb/* ) ;;
++ *)
++ # OSF1 and SCO ODT 3.0 have their own names for install.
++ # Don't use installbsd from OSF since it installs stuff as root
++ # by default.
++ for ac_prog in ginstall scoinst install; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
++ if test $ac_prog = install &&
++ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++ # AIX install. It has an incompatible calling convention.
++ :
++ elif test $ac_prog = install &&
++ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++ # program-specific install script used by HP pwplus--don't use.
++ :
++ else
++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++ break 3
++ fi
++ fi
++ done
++ done
++ ;;
++esac
++done
++IFS=$as_save_IFS
++
++
++fi
++ if test "${ac_cv_path_install+set}" = set; then
++ INSTALL=$ac_cv_path_install
++ else
++ # As a last resort, use the slow shell script. Don't cache a
++ # value for INSTALL within a source directory, because that will
++ # break other packages using the cache if that directory is
++ # removed, or if the value is a relative name.
++ INSTALL=$ac_install_sh
++ fi
++fi
++{ echo "$as_me:$LINENO: result: $INSTALL" >&5
++echo "${ECHO_T}$INSTALL" >&6; }
++
++# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
++# It thinks the first close brace ends the variable substitution.
++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
++
++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
++
++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
++# On Suns, sometimes $CPP names a directory.
++if test -n "$CPP" && test -d "$CPP"; then
++ CPP=
++fi
++if test -z "$CPP"; then
++ if test "${ac_cv_prog_CPP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # Double quotes because CPP needs to be expanded
++ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
++ do
++ ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++ # Use a header file that comes with gcc, so configuring glibc
++ # with a fresh cross-compiler works.
++ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ # <limits.h> exists even on freestanding compilers.
++ # On the NeXT, cc -E runs the code through the compiler's parser,
++ # not just through cpp. "Syntax error" is here to catch this case.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@ifdef __STDC__
++@%:@ include <limits.h>
++@%:@else
++@%:@ include <assert.h>
++@%:@endif
++ Syntax error
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Broken: fails on valid input.
++continue
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++ # OK, works on sane cases. Now check whether nonexistent headers
++ # can be detected and how.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <ac_nonexistent.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ # Broken: success on invalid input.
++continue
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Passes both tests.
++ac_preproc_ok=:
++break
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then
++ break
++fi
++
++ done
++ ac_cv_prog_CPP=$CPP
++
++fi
++ CPP=$ac_cv_prog_CPP
++else
++ ac_cv_prog_CPP=$CPP
++fi
++{ echo "$as_me:$LINENO: result: $CPP" >&5
++echo "${ECHO_T}$CPP" >&6; }
++ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++ # Use a header file that comes with gcc, so configuring glibc
++ # with a fresh cross-compiler works.
++ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ # <limits.h> exists even on freestanding compilers.
++ # On the NeXT, cc -E runs the code through the compiler's parser,
++ # not just through cpp. "Syntax error" is here to catch this case.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@ifdef __STDC__
++@%:@ include <limits.h>
++@%:@else
++@%:@ include <assert.h>
++@%:@endif
++ Syntax error
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Broken: fails on valid input.
++continue
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++ # OK, works on sane cases. Now check whether nonexistent headers
++ # can be detected and how.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <ac_nonexistent.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ # Broken: success on invalid input.
++continue
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Passes both tests.
++ac_preproc_ok=:
++break
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then
++ :
++else
++ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." >&5
++echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
++echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
++if test "${ac_cv_path_GREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # Extract the first word of "grep ggrep" to use in msg output
++if test -z "$GREP"; then
++set dummy grep ggrep; ac_prog_name=$2
++if test "${ac_cv_path_GREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_path_GREP_found=false
++# Loop through the user's path and test for each of PROGNAME-LIST
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in grep ggrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
++ # Check for GNU ac_path_GREP and select it if it is found.
++ # Check for GNU $ac_path_GREP
++case `"$ac_path_GREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
++*)
++ ac_count=0
++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ echo 'GREP' >> "conftest.nl"
++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ ac_count=`expr $ac_count + 1`
++ if test $ac_count -gt ${ac_path_GREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_GREP="$ac_path_GREP"
++ ac_path_GREP_max=$ac_count
++ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++
++ $ac_path_GREP_found && break 3
++ done
++done
++
++done
++IFS=$as_save_IFS
++
++
++fi
++
++GREP="$ac_cv_path_GREP"
++if test -z "$GREP"; then
++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++else
++ ac_cv_path_GREP=$GREP
++fi
++
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
++echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
++ GREP="$ac_cv_path_GREP"
++
++
++{ echo "$as_me:$LINENO: checking for egrep" >&5
++echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
++if test "${ac_cv_path_EGREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
++ then ac_cv_path_EGREP="$GREP -E"
++ else
++ # Extract the first word of "egrep" to use in msg output
++if test -z "$EGREP"; then
++set dummy egrep; ac_prog_name=$2
++if test "${ac_cv_path_EGREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_path_EGREP_found=false
++# Loop through the user's path and test for each of PROGNAME-LIST
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in egrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
++ # Check for GNU ac_path_EGREP and select it if it is found.
++ # Check for GNU $ac_path_EGREP
++case `"$ac_path_EGREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
++*)
++ ac_count=0
++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ echo 'EGREP' >> "conftest.nl"
++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ ac_count=`expr $ac_count + 1`
++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_EGREP="$ac_path_EGREP"
++ ac_path_EGREP_max=$ac_count
++ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++
++ $ac_path_EGREP_found && break 3
++ done
++done
++
++done
++IFS=$as_save_IFS
++
++
++fi
++
++EGREP="$ac_cv_path_EGREP"
++if test -z "$EGREP"; then
++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++else
++ ac_cv_path_EGREP=$EGREP
++fi
++
++
++ fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
++echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
++ EGREP="$ac_cv_path_EGREP"
++
++
++
++{ echo "$as_me:$LINENO: checking for AIX" >&5
++echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#ifdef _AIX
++ yes
++#endif
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "yes" >/dev/null 2>&1; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++cat >>confdefs.h <<\_ACEOF
++@%:@define _ALL_SOURCE 1
++_ACEOF
++
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++rm -f conftest*
++
++
++{ echo "$as_me:$LINENO: checking for library containing strerror" >&5
++echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
++if test "${ac_cv_search_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char strerror ();
++int
++main ()
++{
++return strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' cposix; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_strerror=$ac_res
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_strerror+set}" = set; then
++ break
++fi
++done
++if test "${ac_cv_search_strerror+set}" = set; then
++ :
++else
++ ac_cv_search_strerror=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
++echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
++ac_res=$ac_cv_search_strerror
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++fi
++
++for ac_prog in gawk mawk nawk awk
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_AWK+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$AWK"; then
++ ac_cv_prog_AWK="$AWK" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_AWK="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++ { echo "$as_me:$LINENO: result: $AWK" >&5
++echo "${ECHO_T}$AWK" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$AWK" && break
++done
++
++{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
++echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
++if test "${ac_cv_c_const+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++/* FIXME: Include the comments suggested by Paul. */
++#ifndef __cplusplus
++ /* Ultrix mips cc rejects this. */
++ typedef int charset[2];
++ const charset x;
++ /* SunOS 4.1.1 cc rejects this. */
++ char const *const *ccp;
++ char **p;
++ /* NEC SVR4.0.2 mips cc rejects this. */
++ struct point {int x, y;};
++ static struct point const zero = {0,0};
++ /* AIX XL C 1.02.0.0 rejects this.
++ It does not let you subtract one const X* pointer from another in
++ an arm of an if-expression whose if-part is not a constant
++ expression */
++ const char *g = "string";
++ ccp = &g + (g ? g-g : 0);
++ /* HPUX 7.0 cc rejects these. */
++ ++ccp;
++ p = (char**) ccp;
++ ccp = (char const *const *) p;
++ { /* SCO 3.2v4 cc rejects this. */
++ char *t;
++ char const *s = 0 ? (char *) 0 : (char const *) 0;
++
++ *t++ = 0;
++ if (s) return 0;
++ }
++ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
++ int x[] = {25, 17};
++ const int *foo = &x[0];
++ ++foo;
++ }
++ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
++ typedef const int *iptr;
++ iptr p = 0;
++ ++p;
++ }
++ { /* AIX XL C 1.02.0.0 rejects this saying
++ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
++ struct s { int j; const int *ap[3]; };
++ struct s *b; b->j = 5;
++ }
++ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
++ const int foo = 10;
++ if (!foo) return 0;
++ }
++ return !x[0] && !zero.x;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_const=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_c_const=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
++echo "${ECHO_T}$ac_cv_c_const" >&6; }
++if test $ac_cv_c_const = no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define const
++_ACEOF
++
++fi
++
++{ echo "$as_me:$LINENO: checking for inline" >&5
++echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
++if test "${ac_cv_c_inline+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_c_inline=no
++for ac_kw in inline __inline__ __inline; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#ifndef __cplusplus
++typedef int foo_t;
++static $ac_kw foo_t static_foo () {return 0; }
++$ac_kw foo_t foo () {return 0; }
++#endif
++
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_inline=$ac_kw
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ test "$ac_cv_c_inline" != no && break
++done
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
++echo "${ECHO_T}$ac_cv_c_inline" >&6; }
++
++
++case $ac_cv_c_inline in
++ inline | yes) ;;
++ *)
++ case $ac_cv_c_inline in
++ no) ac_val=;;
++ *) ac_val=$ac_cv_c_inline;;
++ esac
++ cat >>confdefs.h <<_ACEOF
++#ifndef __cplusplus
++#define inline $ac_val
++#endif
++_ACEOF
++ ;;
++esac
++
++
++{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
++if test "${ac_cv_header_stdc+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdlib.h>
++#include <stdarg.h>
++#include <string.h>
++#include <float.h>
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_header_stdc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_header_stdc=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++if test $ac_cv_header_stdc = yes; then
++ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <string.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "memchr" >/dev/null 2>&1; then
++ :
++else
++ ac_cv_header_stdc=no
++fi
++rm -f conftest*
++
++fi
++
++if test $ac_cv_header_stdc = yes; then
++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdlib.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "free" >/dev/null 2>&1; then
++ :
++else
++ ac_cv_header_stdc=no
++fi
++rm -f conftest*
++
++fi
++
++if test $ac_cv_header_stdc = yes; then
++ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
++ if test "$cross_compiling" = yes; then
++ :
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <ctype.h>
++#include <stdlib.h>
++#if ((' ' & 0x0FF) == 0x020)
++# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
++#else
++# define ISLOWER(c) \
++ (('a' <= (c) && (c) <= 'i') \
++ || ('j' <= (c) && (c) <= 'r') \
++ || ('s' <= (c) && (c) <= 'z'))
++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
++#endif
++
++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
++int
++main ()
++{
++ int i;
++ for (i = 0; i < 256; i++)
++ if (XOR (islower (i), ISLOWER (i))
++ || toupper (i) != TOUPPER (i))
++ return 2;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ :
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_header_stdc=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
++echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
++if test $ac_cv_header_stdc = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define STDC_HEADERS 1
++_ACEOF
++
++fi
++
++# On IRIX 5.3, sys/types and inttypes.h are conflicting.
++
++
++
++
++
++
++
++
++
++for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
++ inttypes.h stdint.h unistd.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_Header=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_Header=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++{ echo "$as_me:$LINENO: checking for long" >&5
++echo $ECHO_N "checking for long... $ECHO_C" >&6; }
++if test "${ac_cv_type_long+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++typedef long ac__type_new_;
++int
++main ()
++{
++if ((ac__type_new_ *) 0)
++ return 0;
++if (sizeof (ac__type_new_))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_long=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_type_long=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
++echo "${ECHO_T}$ac_cv_type_long" >&6; }
++
++{ echo "$as_me:$LINENO: checking size of long" >&5
++echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
++if test "${ac_cv_sizeof_long+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$ac_cv_type_long" = yes; then
++ # The cast to long int works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ if test "$cross_compiling" = yes; then
++ # Depending upon the size, compute the lo and hi bounds.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=0 ac_mid=0
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo= ac_hi=
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr '(' $ac_mid ')' + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in
++?*) ac_cv_sizeof_long=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; } ;;
++esac
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
++@%:@include <stdio.h>
++@%:@include <stdlib.h>
++int
++main ()
++{
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
++ {
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%lu\n", i);
++ }
++ return ferror (f) || fclose (f) != 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sizeof_long=`cat conftest.val`
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.val
++else
++ ac_cv_sizeof_long=0
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
++cat >>confdefs.h <<_ACEOF
++@%:@define SIZEOF_LONG $ac_cv_sizeof_long
++_ACEOF
++
++
++
++{ echo "$as_me:$LINENO: checking for long long int" >&5
++echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
++if test "${ac_cv_type_long_long_int+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++typedef long long int ac__type_new_;
++int
++main ()
++{
++if ((ac__type_new_ *) 0)
++ return 0;
++if (sizeof (ac__type_new_))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_long_long_int=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_type_long_long_int=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
++
++{ echo "$as_me:$LINENO: checking size of long long int" >&5
++echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; }
++if test "${ac_cv_sizeof_long_long_int+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$ac_cv_type_long_long_int" = yes; then
++ # The cast to long int works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ if test "$cross_compiling" = yes; then
++ # Depending upon the size, compute the lo and hi bounds.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=0 ac_mid=0
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo= ac_hi=
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr '(' $ac_mid ')' + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in
++?*) ac_cv_sizeof_long_long_int=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long long int)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; } ;;
++esac
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long long int ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
++@%:@include <stdio.h>
++@%:@include <stdlib.h>
++int
++main ()
++{
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
++ {
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%lu\n", i);
++ }
++ return ferror (f) || fclose (f) != 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sizeof_long_long_int=`cat conftest.val`
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long long int)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.val
++else
++ ac_cv_sizeof_long_long_int=0
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; }
++cat >>confdefs.h <<_ACEOF
++@%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
++_ACEOF
++
++
++{ echo "$as_me:$LINENO: checking for unsigned long long int" >&5
++echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; }
++if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++typedef unsigned long long int ac__type_new_;
++int
++main ()
++{
++if ((ac__type_new_ *) 0)
++ return 0;
++if (sizeof (ac__type_new_))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_unsigned_long_long_int=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_type_unsigned_long_long_int=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; }
++
++{ echo "$as_me:$LINENO: checking size of unsigned long long int" >&5
++echo $ECHO_N "checking size of unsigned long long int... $ECHO_C" >&6; }
++if test "${ac_cv_sizeof_unsigned_long_long_int+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$ac_cv_type_unsigned_long_long_int" = yes; then
++ # The cast to long int works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ if test "$cross_compiling" = yes; then
++ # Depending upon the size, compute the lo and hi bounds.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=0 ac_mid=0
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo= ac_hi=
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr '(' $ac_mid ')' + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in
++?*) ac_cv_sizeof_unsigned_long_long_int=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (unsigned long long int)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; } ;;
++esac
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
++@%:@include <stdio.h>
++@%:@include <stdlib.h>
++int
++main ()
++{
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
++ {
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%lu\n", i);
++ }
++ return ferror (f) || fclose (f) != 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sizeof_unsigned_long_long_int=`cat conftest.val`
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (unsigned long long int)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.val
++else
++ ac_cv_sizeof_unsigned_long_long_int=0
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long_int" >&6; }
++cat >>confdefs.h <<_ACEOF
++@%:@define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int
++_ACEOF
++
++
++if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \
++ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_LONG_LONG_INT
++_ACEOF
++
++ { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
++echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
++if test "${ac_cv_c_bigendian+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # See if sys/param.h defines the BYTE_ORDER macro.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/param.h>
++
++int
++main ()
++{
++#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
++ bogus endian macros
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ # It does; now see whether it defined to BIG_ENDIAN or not.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/param.h>
++
++int
++main ()
++{
++#if BYTE_ORDER != BIG_ENDIAN
++ not big endian
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_bigendian=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_c_bigendian=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # It does not; compile a test program.
++if test "$cross_compiling" = yes; then
++ # try to guess the endianness by grepping values into an object file
++ ac_cv_c_bigendian=unknown
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
++short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
++void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
++short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
++short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
++void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
++int
++main ()
++{
++ _ascii (); _ebcdic ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
++ ac_cv_c_bigendian=yes
++fi
++if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
++ if test "$ac_cv_c_bigendian" = unknown; then
++ ac_cv_c_bigendian=no
++ else
++ # finding both strings is unlikely to happen, but who knows?
++ ac_cv_c_bigendian=unknown
++ fi
++fi
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++
++ /* Are we little or big endian? From Harbison&Steele. */
++ union
++ {
++ long int l;
++ char c[sizeof (long int)];
++ } u;
++ u.l = 1;
++ return u.c[sizeof (long int) - 1] == 1;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_bigendian=no
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_c_bigendian=yes
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
++echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
++case $ac_cv_c_bigendian in
++ yes)
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define WORDS_BIGENDIAN 1
++_ACEOF
++ ;;
++ no)
++ ;;
++ *)
++ { { echo "$as_me:$LINENO: error: unknown endianness
++presetting ac_cv_c_bigendian=no (or yes) will help" >&5
++echo "$as_me: error: unknown endianness
++presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
++ { (exit 1); exit 1; }; } ;;
++esac
++
++fi
++
++
++{ echo "$as_me:$LINENO: checking for __attribute__" >&5
++echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6; }
++if test "${ac_cv___attribute__+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <stdlib.h>
++
++int
++main ()
++{
++
++static void foo(void) __attribute__ ((noreturn));
++
++static void
++foo(void)
++{
++ exit(1);
++}
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv___attribute__=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv___attribute__=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++if test "$ac_cv___attribute__" = "yes"; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE___ATTRIBUTE__ 1
++_ACEOF
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
++echo "${ECHO_T}$ac_cv___attribute__" >&6; }
++
++
++{ echo "$as_me:$LINENO: checking if compiler supports -fPIC" >&5
++echo $ECHO_N "checking if compiler supports -fPIC... $ECHO_C" >&6; }
++if test "${ac_cv_fpic+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++save_CFLAGS=$CFLAGS
++CFLAGS="${CFLAGS} -fPIC"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <stdlib.h>
++
++int
++main ()
++{
++
++static void
++foo(void)
++{
++ exit(1);
++}
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_fpic=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_fpic=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++CFLAGS=$save_CFLAGS
++
++fi
++
++if test "$ac_cv_fpic" = "yes"; then
++ FPIC_CFLAGS="-fPIC"
++else
++ FPIC_CFLAGS=""
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_fpic" >&5
++echo "${ECHO_T}$ac_cv_fpic" >&6; }
++
++
++
++ # CMU GUESS RUNPATH SWITCH
++ andrew_runpath_switch="none"
++
++
++
++
++
++
++for ac_header in unistd.h sys/select.h sys/param.h stdarg.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++
++
++
++for ac_func in memmove strcasecmp ftruncate strerror
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++else
++ case " $LIB@&t at OBJS " in
++ *" $ac_func.$ac_objext "* ) ;;
++ *) LIB@&t at OBJS="$LIB@&t at OBJS $ac_func.$ac_objext"
++ ;;
++esac
++
++fi
++done
++
++
++
++
++for ac_func in strlcat strlcpy
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++
++
++
++ac_header_dirent=no
++for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
++ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
++echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <$ac_hdr>
++
++int
++main ()
++{
++if ((DIR *) 0)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_Header=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_Header=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
++_ACEOF
++
++ac_header_dirent=$ac_hdr; break
++fi
++
++done
++# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
++if test $ac_header_dirent = dirent.h; then
++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
++if test "${ac_cv_search_opendir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char opendir ();
++int
++main ()
++{
++return opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' dir; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir=$ac_res
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_opendir+set}" = set; then
++ break
++fi
++done
++if test "${ac_cv_search_opendir+set}" = set; then
++ :
++else
++ ac_cv_search_opendir=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++fi
++
++else
++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
++if test "${ac_cv_search_opendir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char opendir ();
++int
++main ()
++{
++return opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' x; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir=$ac_res
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_opendir+set}" = set; then
++ break
++fi
++done
++if test "${ac_cv_search_opendir+set}" = set; then
++ :
++else
++ ac_cv_search_opendir=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++fi
++
++fi
++
++
++
++ save_LIBS="$LIBS"
++ LIB_SOCKET=""
++ { echo "$as_me:$LINENO: checking for connect" >&5
++echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
++if test "${ac_cv_func_connect+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define connect to an innocuous variant, in case <limits.h> declares connect.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define connect innocuous_connect
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char connect (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef connect
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char connect ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_connect || defined __stub___connect
++choke me
++#endif
++
++int
++main ()
++{
++return connect ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_connect=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_connect=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
++echo "${ECHO_T}$ac_cv_func_connect" >&6; }
++if test $ac_cv_func_connect = yes; then
++ :
++else
++ { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
++echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lnsl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gethostbyname ();
++int
++main ()
++{
++return gethostbyname ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_nsl_gethostbyname=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_nsl_gethostbyname=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
++echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
++if test $ac_cv_lib_nsl_gethostbyname = yes; then
++ LIB_SOCKET="-lnsl $LIB_SOCKET"
++fi
++
++ { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
++echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
++if test "${ac_cv_lib_socket_connect+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char connect ();
++int
++main ()
++{
++return connect ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_socket_connect=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_socket_connect=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
++if test $ac_cv_lib_socket_connect = yes; then
++ LIB_SOCKET="-lsocket $LIB_SOCKET"
++fi
++
++
++fi
++
++ LIBS="$LIB_SOCKET $save_LIBS"
++ { echo "$as_me:$LINENO: checking for res_search" >&5
++echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
++if test "${ac_cv_func_res_search+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define res_search innocuous_res_search
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char res_search (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef res_search
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char res_search ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_res_search || defined __stub___res_search
++choke me
++#endif
++
++int
++main ()
++{
++return res_search ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_res_search=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_res_search=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
++echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
++if test $ac_cv_func_res_search = yes; then
++ :
++else
++ LIBS="-lresolv $LIB_SOCKET $save_LIBS"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
++#ifdef HAVE_ARPA_NAMESER_COMPAT_H
++#include <arpa/nameser_compat.h>
++#endif
++#include <resolv.h>
++int
++main ()
++{
++
++const char host[12]="openafs.org";
++u_char ans[1024];
++res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
++return 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ LIB_SOCKET="-lresolv $LIB_SOCKET"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++
++fi
++
++ LIBS="$LIB_SOCKET $save_LIBS"
++
++
++for ac_func in dn_expand dns_lookup
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++ LIBS="$save_LIBS"
++
++
++LIBS="$LIBS ${LIB_SOCKET}"
++
++cyrus_cv_getaddrinfo=yes
++
++{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
++echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
++if test "${ac_cv_func_getaddrinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define getaddrinfo innocuous_getaddrinfo
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char getaddrinfo (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef getaddrinfo
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getaddrinfo ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_getaddrinfo || defined __stub___getaddrinfo
++choke me
++#endif
++
++int
++main ()
++{
++return getaddrinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_getaddrinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_getaddrinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; }
++if test $ac_cv_func_getaddrinfo = yes; then
++ ac_cv_lib_socket_getaddrinfo=no
++ ac_cv_lib_inet6_getaddrinfo=no
++
++else
++ { echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
++echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6; }
++if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getaddrinfo ();
++int
++main ()
++{
++return getaddrinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_socket_getaddrinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_socket_getaddrinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6; }
++if test $ac_cv_lib_socket_getaddrinfo = yes; then
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_getaddrinfo=no
++
++else
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
++ if test "${ipv6_cv_dir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done
++fi
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_getaddrinfo=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ { echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
++echo $ECHO_N "checking for getaddrinfo in -linet6... $ECHO_C" >&6; }
++if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-linet6 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getaddrinfo ();
++int
++main ()
++{
++return getaddrinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_inet6_getaddrinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_inet6_getaddrinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_getaddrinfo" >&6; }
++if test $ac_cv_lib_inet6_getaddrinfo = yes; then
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi
++fi
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi
++fi
++
++fi
++ipv6_cv_getaddrinfo=no
++if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
++ -o $ac_cv_lib_inet6_getaddrinfo = yes
++then
++ ipv6_cv_getaddrinfo=yes
++fi
++if test $ipv6_cv_getaddrinfo = no; then
++ if test getaddrinfo = getaddrinfo; then
++ for ipv6_cv_pfx in o n; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <netdb.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
++ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}getaddrinfo... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef ${ipv6_cv_pfx}getaddrinfo
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ${ipv6_cv_pfx}getaddrinfo ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_${ipv6_cv_pfx}getaddrinfo || defined __stub___${ipv6_cv_pfx}getaddrinfo
++choke me
++#endif
++
++int
++main ()
++{
++return ${ipv6_cv_pfx}getaddrinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++rm -f conftest*
++
++ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++
++ ipv6_cv_getaddrinfo=yes
++ break
++ fi
++ done
++ fi
++fi
++if test $ipv6_cv_getaddrinfo = yes; then
++
++{ echo "$as_me:$LINENO: checking for gai_strerror" >&5
++echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6; }
++if test "${ac_cv_func_gai_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define gai_strerror to an innocuous variant, in case <limits.h> declares gai_strerror.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define gai_strerror innocuous_gai_strerror
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char gai_strerror (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef gai_strerror
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gai_strerror ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_gai_strerror || defined __stub___gai_strerror
++choke me
++#endif
++
++int
++main ()
++{
++return gai_strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_gai_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_gai_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_func_gai_strerror" >&6; }
++if test $ac_cv_func_gai_strerror = yes; then
++ ac_cv_lib_socket_gai_strerror=no
++ ac_cv_lib_inet6_gai_strerror=no
++
++else
++ { echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
++echo $ECHO_N "checking for gai_strerror in -lsocket... $ECHO_C" >&6; }
++if test "${ac_cv_lib_socket_gai_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gai_strerror ();
++int
++main ()
++{
++return gai_strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_socket_gai_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_socket_gai_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_gai_strerror" >&6; }
++if test $ac_cv_lib_socket_gai_strerror = yes; then
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_gai_strerror=no
++
++else
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
++ if test "${ipv6_cv_dir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done
++fi
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_gai_strerror=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ { echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
++echo $ECHO_N "checking for gai_strerror in -linet6... $ECHO_C" >&6; }
++if test "${ac_cv_lib_inet6_gai_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-linet6 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gai_strerror ();
++int
++main ()
++{
++return gai_strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_inet6_gai_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_inet6_gai_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_gai_strerror" >&6; }
++if test $ac_cv_lib_inet6_gai_strerror = yes; then
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi
++fi
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi
++fi
++
++fi
++ipv6_cv_gai_strerror=no
++if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \
++ -o $ac_cv_lib_inet6_gai_strerror = yes
++then
++ ipv6_cv_gai_strerror=yes
++fi
++if test $ipv6_cv_gai_strerror = no; then
++ if test gai_strerror = getaddrinfo; then
++ for ipv6_cv_pfx in o n; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <netdb.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then
++ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}gai_strerror... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define ${ipv6_cv_pfx}gai_strerror to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}gai_strerror.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define ${ipv6_cv_pfx}gai_strerror innocuous_${ipv6_cv_pfx}gai_strerror
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char ${ipv6_cv_pfx}gai_strerror (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef ${ipv6_cv_pfx}gai_strerror
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ${ipv6_cv_pfx}gai_strerror ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_${ipv6_cv_pfx}gai_strerror || defined __stub___${ipv6_cv_pfx}gai_strerror
++choke me
++#endif
++
++int
++main ()
++{
++return ${ipv6_cv_pfx}gai_strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++rm -f conftest*
++
++ if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++
++ ipv6_cv_gai_strerror=yes
++ break
++ fi
++ done
++ fi
++fi
++if test $ipv6_cv_gai_strerror = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++
++else
++ cyrus_cv_getaddrinfo=no
++fi
++else
++ cyrus_cv_getaddrinfo=no
++fi
++
++if test $cyrus_cv_getaddrinfo = no; then
++ IPV6_OBJS="getaddrinfo.o"
++fi
++
++cyrus_cv_getnameinfo=yes
++
++{ echo "$as_me:$LINENO: checking for getnameinfo" >&5
++echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6; }
++if test "${ac_cv_func_getnameinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define getnameinfo innocuous_getnameinfo
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char getnameinfo (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef getnameinfo
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getnameinfo ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_getnameinfo || defined __stub___getnameinfo
++choke me
++#endif
++
++int
++main ()
++{
++return getnameinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_getnameinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_getnameinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6; }
++if test $ac_cv_func_getnameinfo = yes; then
++ ac_cv_lib_socket_getnameinfo=no
++ ac_cv_lib_inet6_getnameinfo=no
++
++else
++ { echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
++echo $ECHO_N "checking for getnameinfo in -lsocket... $ECHO_C" >&6; }
++if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getnameinfo ();
++int
++main ()
++{
++return getnameinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_socket_getnameinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_socket_getnameinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_getnameinfo" >&6; }
++if test $ac_cv_lib_socket_getnameinfo = yes; then
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_getnameinfo=no
++
++else
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
++ if test "${ipv6_cv_dir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done
++fi
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_getnameinfo=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ { echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
++echo $ECHO_N "checking for getnameinfo in -linet6... $ECHO_C" >&6; }
++if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-linet6 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char getnameinfo ();
++int
++main ()
++{
++return getnameinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_inet6_getnameinfo=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_inet6_getnameinfo=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_getnameinfo" >&6; }
++if test $ac_cv_lib_inet6_getnameinfo = yes; then
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi
++fi
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi
++fi
++
++fi
++ipv6_cv_getnameinfo=no
++if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
++ -o $ac_cv_lib_inet6_getnameinfo = yes
++then
++ ipv6_cv_getnameinfo=yes
++fi
++if test $ipv6_cv_getnameinfo = no; then
++ if test getnameinfo = getaddrinfo; then
++ for ipv6_cv_pfx in o n; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <netdb.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
++ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}getnameinfo... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef ${ipv6_cv_pfx}getnameinfo
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ${ipv6_cv_pfx}getnameinfo ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_${ipv6_cv_pfx}getnameinfo || defined __stub___${ipv6_cv_pfx}getnameinfo
++choke me
++#endif
++
++int
++main ()
++{
++return ${ipv6_cv_pfx}getnameinfo ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++rm -f conftest*
++
++ if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++
++ ipv6_cv_getnameinfo=yes
++ break
++ fi
++ done
++ fi
++fi
++if test $ipv6_cv_getnameinfo = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETNAMEINFO
++_ACEOF
++
++else
++ cyrus_cv_getnameinfo=no
++fi
++
++if test $cyrus_cv_getnameinfo = no; then
++ IPV6_OBJS="$IPV6_OBJS getnameinfo.o"
++fi
++
++
++{ echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
++echo $ECHO_N "checking whether you have ss_family in struct sockaddr_storage... $ECHO_C" >&6; }
++if test "${ipv6_cv_ss_family+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/socket.h>
++int
++main ()
++{
++struct sockaddr_storage ss; int i = ss.ss_family;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ipv6_cv_ss_family=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ipv6_cv_ss_family=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++if test $ipv6_cv_ss_family = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_SS_FAMILY
++_ACEOF
++
++else
++ :
++fi
++{ echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
++echo "${ECHO_T}$ipv6_cv_ss_family" >&6; }
++
++{ echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
++echo $ECHO_N "checking whether you have sa_len in struct sockaddr... $ECHO_C" >&6; }
++if test "${ipv6_cv_sa_len+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/socket.h>
++int
++main ()
++{
++struct sockaddr sa; int i = sa.sa_len;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ipv6_cv_sa_len=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ipv6_cv_sa_len=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++if test $ipv6_cv_sa_len = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_SOCKADDR_SA_LEN
++_ACEOF
++
++else
++ :
++fi
++{ echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
++echo "${ECHO_T}$ipv6_cv_sa_len" >&6; }
++
++
++
++
++for ac_header in sys/time.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
++echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
++if test "${ac_cv_header_time+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/time.h>
++#include <time.h>
++
++int
++main ()
++{
++if ((struct tm *) 0)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_header_time=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_header_time=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
++echo "${ECHO_T}$ac_cv_header_time" >&6; }
++if test $ac_cv_header_time = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define TIME_WITH_SYS_TIME 1
++_ACEOF
++
++fi
++
++{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
++echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
++if test "${ac_cv_struct_tm+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <time.h>
++
++int
++main ()
++{
++struct tm *tp; tp->tm_sec;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_struct_tm=time.h
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_struct_tm=sys/time.h
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
++echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
++if test $ac_cv_struct_tm = sys/time.h; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define TM_IN_SYS_TIME 1
++_ACEOF
++
++fi
++
++{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
++echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
++if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <$ac_cv_struct_tm>
++
++
++int
++main ()
++{
++static struct tm ac_aggr;
++if (ac_aggr.tm_zone)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_member_struct_tm_tm_zone=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <$ac_cv_struct_tm>
++
++
++int
++main ()
++{
++static struct tm ac_aggr;
++if (sizeof ac_aggr.tm_zone)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_member_struct_tm_tm_zone=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_member_struct_tm_tm_zone=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
++echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
++if test $ac_cv_member_struct_tm_tm_zone = yes; then
++
++cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_STRUCT_TM_TM_ZONE 1
++_ACEOF
++
++
++fi
++
++if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_TM_ZONE 1
++_ACEOF
++
++else
++ { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
++echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
++if test "${ac_cv_have_decl_tzname+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <time.h>
++
++int
++main ()
++{
++#ifndef tzname
++ char *p = (char *) tzname;
++ return !p;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_tzname=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_have_decl_tzname=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
++echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
++if test $ac_cv_have_decl_tzname = yes; then
++
++cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_DECL_TZNAME 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_DECL_TZNAME 0
++_ACEOF
++
++
++fi
++
++
++ { echo "$as_me:$LINENO: checking for tzname" >&5
++echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
++if test "${ac_cv_var_tzname+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <time.h>
++#if !HAVE_DECL_TZNAME
++extern char *tzname[];
++#endif
++
++int
++main ()
++{
++return tzname[0][0];
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_var_tzname=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_var_tzname=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
++echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
++ if test $ac_cv_var_tzname = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_TZNAME 1
++_ACEOF
++
++ fi
++fi
++
++
++
++
++
++
++
++
++for ac_func in vprintf
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++{ echo "$as_me:$LINENO: checking for _doprnt" >&5
++echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; }
++if test "${ac_cv_func__doprnt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define _doprnt innocuous__doprnt
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char _doprnt (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef _doprnt
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char _doprnt ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub__doprnt || defined __stub____doprnt
++choke me
++#endif
++
++int
++main ()
++{
++return _doprnt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func__doprnt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func__doprnt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
++echo "${ECHO_T}$ac_cv_func__doprnt" >&6; }
++if test $ac_cv_func__doprnt = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_DOPRNT 1
++_ACEOF
++
++fi
++
++fi
++done
++
++
++
++
++CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o"
++
++
++
++# Check whether --with-bdb was given.
++if test "${with_bdb+set}" = set; then
++ withval=$with_bdb; with_bdb=$withval
++else
++ with_bdb="yes"
++fi
++
++
++
++# Check whether --with-dbdir was given.
++if test "${with_dbdir+set}" = set; then
++ withval=$with_dbdir; with_bdb=$withval
++fi
++
++
++case "$with_bdb" in
++ no)
++ use_berkeley="no"
++ ;;
++ yes)
++ use_berkeley="yes"
++ with_bdb_lib=none
++ with_bdb_inc=none
++ ;;
++
++ *)
++ use_berkeley="yes"
++ with_bdb_lib="$with_bdb/lib"
++ with_bdb_inc="$with_bdb/include"
++ ;;
++esac
++
++if test "$use_berkeley" != "no"; then
++
++
++# Check whether --with-bdb-libdir was given.
++if test "${with_bdb_libdir+set}" = set; then
++ withval=$with_bdb_libdir; with_bdb_lib=$withval
++else
++ test "${with_bdb_lib+set}" = set || with_bdb_lib=none
++fi
++
++
++# Check whether --with-bdb-incdir was given.
++if test "${with_bdb_incdir+set}" = set; then
++ withval=$with_bdb_incdir; with_bdb_inc=$withval
++else
++ test "${with_bdb_inc+set}" = set || with_bdb_inc=none
++fi
++
++
++
++
++
++ cmu_save_CPPFLAGS=$CPPFLAGS
++
++ if test -d $with_bdb_inc; then
++ CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
++ BDB_INCADD="-I$with_bdb_inc"
++ else
++ BDB_INCADD=""
++ fi
++
++ if test "${ac_cv_header_db_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for db.h" >&5
++echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_db_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
++echo "${ECHO_T}$ac_cv_header_db_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking db.h usability" >&5
++echo $ECHO_N "checking db.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <db.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking db.h presence" >&5
++echo $ECHO_N "checking db.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <db.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for db.h" >&5
++echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_db_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_db_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
++echo "${ECHO_T}$ac_cv_header_db_h" >&6; }
++
++fi
++if test $ac_cv_header_db_h = yes; then
++
++ BDB_SAVE_LDFLAGS=$LDFLAGS
++
++ if test -d $with_bdb_lib; then
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
++ else
++ LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_runpath_switch$with_bdb_lib"
++ fi
++
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
++ else
++ BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_runpath_switch$with_bdb_lib"
++ fi
++
++ else
++ BDB_LIBADD=""
++ fi
++
++ saved_LIBS=$LIBS
++ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
++ do
++ LIBS="$saved_LIBS -l$dbname"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <db.h>
++int
++main ()
++{
++db_create(NULL, NULL, 0);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ dblib="no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++ if test "$dblib" = "berkeley"; then break; fi
++ done
++ if test "$dblib" = "no"; then
++ LIBS="$saved_LIBS -ldb"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <db.h>
++int
++main ()
++{
++db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ dblib="no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++ fi
++ LIBS=$saved_LIBS
++
++ LDFLAGS=$BDB_SAVE_LDFLAGS
++
++else
++ dblib="no"
++fi
++
++
++
++ CPPFLAGS=$cmu_save_CPPFLAGS
++
++
++ if test "$dblib" = "no"; then
++ { { echo "$as_me:$LINENO: error: Berkeley DB 3.x or later was not found. You may need to
++ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&5
++echo "$as_me: error: Berkeley DB 3.x or later was not found. You may need to
++ supply the --with-bdb-libdir or --with-bdb-incdir configure options." >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++
++ if test "$with_bdb_lib" != "none"; then
++
++ # this is CMU ADD LIBPATH
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
++ else
++ LDFLAGS="-L$with_bdb_lib $andrew_runpath_switch$with_bdb_lib ${LDFLAGS}"
++ fi
++
++ fi
++
++ BDB_INC=${BDB_INCADD}
++ BDB_LIB=${BDB_LIBADD}
++
++
++
++ LIBS="${LIBS} ${BDB_LIBADD}"
++ CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
++
++ CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o"
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_BDB
++_ACEOF
++
++fi
++
++
++
++
++SIEVE_SUBDIRS=""
++sievedir="sieve"
++# Check whether --enable-sieve was given.
++if test "${enable_sieve+set}" = set; then
++ enableval=$enable_sieve; if test "$enableval" = no; then
++ sievedir="no"
++ fi
++fi
++
++
++if test "$sievedir" != "no"; then
++ SIEVE_OBJS="lmtp_sieve.o smtpclient.o"
++
++ SIEVE_LIBS="../${sievedir}/libsieve.a"
++
++ SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir"
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define USE_SIEVE
++_ACEOF
++
++
++ for ac_prog in 'bison -y' byacc
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_YACC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$YACC"; then
++ ac_cv_prog_YACC="$YACC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_YACC="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++YACC=$ac_cv_prog_YACC
++if test -n "$YACC"; then
++ { echo "$as_me:$LINENO: result: $YACC" >&5
++echo "${ECHO_T}$YACC" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$YACC" && break
++done
++test -n "$YACC" || YACC="yacc"
++
++ for ac_prog in flex lex
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_LEX+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$LEX"; then
++ ac_cv_prog_LEX="$LEX" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_LEX="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++LEX=$ac_cv_prog_LEX
++if test -n "$LEX"; then
++ { echo "$as_me:$LINENO: result: $LEX" >&5
++echo "${ECHO_T}$LEX" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$LEX" && break
++done
++test -n "$LEX" || LEX=":"
++
++if test -z "$LEXLIB"
++then
++ { echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
++echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_fl_yywrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lfl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char yywrap ();
++int
++main ()
++{
++return yywrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_fl_yywrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_fl_yywrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
++echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6; }
++if test $ac_cv_lib_fl_yywrap = yes; then
++ LEXLIB="-lfl"
++else
++ { echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
++echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6; }
++if test "${ac_cv_lib_l_yywrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ll $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char yywrap ();
++int
++main ()
++{
++return yywrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_l_yywrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_l_yywrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
++echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6; }
++if test $ac_cv_lib_l_yywrap = yes; then
++ LEXLIB="-ll"
++fi
++
++fi
++
++fi
++
++if test "x$LEX" != "x:"; then
++ { echo "$as_me:$LINENO: checking lex output file root" >&5
++echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
++if test "${ac_cv_prog_lex_root+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # The minimal lex program is just a single line: %%. But some broken lexes
++# (Solaris, I think it was) want two %% lines, so accommodate them.
++cat >conftest.l <<_ACEOF
++%%
++%%
++_ACEOF
++{ (ac_try="$LEX conftest.l"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$LEX conftest.l") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++if test -f lex.yy.c; then
++ ac_cv_prog_lex_root=lex.yy
++elif test -f lexyy.c; then
++ ac_cv_prog_lex_root=lexyy
++else
++ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
++echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
++echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
++rm -f conftest.l
++LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
++
++{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
++echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; }
++if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ # POSIX says lex can declare yytext either as a pointer or an array; the
++# default is implementation-dependent. Figure out which it is, since
++# not all implementations provide the %pointer and %array declarations.
++ac_cv_prog_lex_yytext_pointer=no
++echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
++ac_save_LIBS=$LIBS
++LIBS="$LIBS $LEXLIB"
++cat >conftest.$ac_ext <<_ACEOF
++`cat $LEX_OUTPUT_ROOT.c`
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_lex_yytext_pointer=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_save_LIBS
++rm -f "${LEX_OUTPUT_ROOT}.c"
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
++echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; }
++if test $ac_cv_prog_lex_yytext_pointer = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define YYTEXT_POINTER 1
++_ACEOF
++
++fi
++
++fi
++
++{ echo "$as_me:$LINENO: checking for main in -lfl" >&5
++echo $ECHO_N "checking for main in -lfl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_fl_main+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lfl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++
++int
++main ()
++{
++return main ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_fl_main=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_fl_main=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_main" >&5
++echo "${ECHO_T}$ac_cv_lib_fl_main" >&6; }
++if test $ac_cv_lib_fl_main = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_LIBFL 1
++_ACEOF
++
++ LIBS="-lfl $LIBS"
++
++fi
++
++
++ { echo "$as_me:$LINENO: checking for library containing regcomp" >&5
++echo $ECHO_N "checking for library containing regcomp... $ECHO_C" >&6; }
++if test "${ac_cv_search_regcomp+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char regcomp ();
++int
++main ()
++{
++return regcomp ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' rx regex; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_regcomp=$ac_res
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_regcomp+set}" = set; then
++ break
++fi
++done
++if test "${ac_cv_search_regcomp+set}" = set; then
++ :
++else
++ ac_cv_search_regcomp=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_search_regcomp" >&5
++echo "${ECHO_T}$ac_cv_search_regcomp" >&6; }
++ac_res=$ac_cv_search_regcomp
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define ENABLE_REGEX
++_ACEOF
++
++ if test "${ac_cv_header_rxposix_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for rxposix.h" >&5
++echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_rxposix_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
++echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking rxposix.h usability" >&5
++echo $ECHO_N "checking rxposix.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <rxposix.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking rxposix.h presence" >&5
++echo $ECHO_N "checking rxposix.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <rxposix.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: rxposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: rxposix.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: rxposix.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: rxposix.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: rxposix.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: rxposix.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: rxposix.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: rxposix.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: rxposix.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for rxposix.h" >&5
++echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_rxposix_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_rxposix_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
++echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6; }
++
++fi
++if test $ac_cv_header_rxposix_h = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_RX
++_ACEOF
++
++fi
++
++
++fi
++
++
++
++ SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile"
++fi
++
++
++
++{ echo "$as_me:$LINENO: checking for strerror" >&5
++echo $ECHO_N "checking for strerror... $ECHO_C" >&6; }
++if test "${ac_cv_func_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define strerror innocuous_strerror
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char strerror (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef strerror
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char strerror ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_strerror || defined __stub___strerror
++choke me
++#endif
++
++int
++main ()
++{
++return strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_strerror=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
++echo "${ECHO_T}$ac_cv_func_strerror" >&6; }
++if test $ac_cv_func_strerror = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAS_STRERROR
++_ACEOF
++
++else
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define NEED_SYS_ERRLIST
++_ACEOF
++
++fi
++
++
++
++for ac_header in sys/resource.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++for ac_func in setrlimit
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++for ac_func in getrlimit
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++
++for ac_func in daemon setsid
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++for ac_func in shutdown
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/socket.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "socklen_t" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_SOCKLEN_T
++_ACEOF
++
++fi
++rm -f conftest*
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/socket.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "sockaddr_storage" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_STRUCT_SOCKADDR_STORAGE
++_ACEOF
++
++fi
++rm -f conftest*
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/resource.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "rlim_t" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_RLIM_T
++_ACEOF
++
++fi
++rm -f conftest*
++
++
++spt_type=""
++{ echo "$as_me:$LINENO: checking for setproctitle" >&5
++echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6; }
++if test "${ac_cv_func_setproctitle+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define setproctitle innocuous_setproctitle
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char setproctitle (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef setproctitle
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char setproctitle ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_setproctitle || defined __stub___setproctitle
++choke me
++#endif
++
++int
++main ()
++{
++return setproctitle ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_setproctitle=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_setproctitle=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
++echo "${ECHO_T}$ac_cv_func_setproctitle" >&6; }
++if test $ac_cv_func_setproctitle = yes; then
++ spt_type=SPT_BUILTIN
++fi
++
++if test "$spt_type" = ""; then
++ { echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
++echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6; }
++if test "${ac_cv_lib_util_setproctitle+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lutil $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char setproctitle ();
++int
++main ()
++{
++return setproctitle ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_util_setproctitle=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_util_setproctitle=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
++echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6; }
++if test $ac_cv_lib_util_setproctitle = yes; then
++ spt_type=SPT_BUILTIN
++ LIBS="${LIBS} -lutil"
++fi
++
++fi
++if test "$spt_type" = ""; then
++ if test "${ac_cv_header_sys_pstat_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
++echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sys_pstat_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sys/pstat.h usability" >&5
++echo $ECHO_N "checking sys/pstat.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sys/pstat.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sys/pstat.h presence" >&5
++echo $ECHO_N "checking sys/pstat.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sys/pstat.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sys/pstat.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sys/pstat.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sys/pstat.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sys/pstat.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sys/pstat.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sys/pstat.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
++echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sys_pstat_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sys_pstat_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6; }
++
++fi
++if test $ac_cv_header_sys_pstat_h = yes; then
++ spt_type=SPT_PSTAT
++fi
++
++
++fi
++if test "$spt_type" = ""; then
++ if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
++echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sys/sysnews.h usability" >&5
++echo $ECHO_N "checking sys/sysnews.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sys/sysnews.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sys/sysnews.h presence" >&5
++echo $ECHO_N "checking sys/sysnews.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sys/sysnews.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sys/sysnews.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sys/sysnews.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sys/sysnews.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sys/sysnews.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sys/sysnews.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sys/sysnews.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
++echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sys_sysnews_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6; }
++
++fi
++if test $ac_cv_header_sys_sysnews_h = yes; then
++ spt_type=SPT_SYSMIPS
++fi
++
++
++fi
++if test "$spt_type" = ""; then
++ { echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
++echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6; }
++ if test "${cyrus_cv_sys_psstrings+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <machine/vmparam.h>
++#include <sys/exec.h>
++#ifndef PS_STRINGS
++#include </nonexistent>
++#endif
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ cyrus_cv_sys_psstrings=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_sys_psstrings=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++fi
++
++ if test $cyrus_cv_sys_psstrings = yes; then
++ spt_type=SPT_PSSTRINGS
++ fi
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_psstrings" >&5
++echo "${ECHO_T}$cyrus_cv_sys_psstrings" >&6; }
++fi
++if test "$spt_type" = ""; then
++ { echo "$as_me:$LINENO: checking for SCO" >&5
++echo $ECHO_N "checking for SCO... $ECHO_C" >&6; }
++ if test "${cyrus_cv_sys_sco+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#ifndef _SCO_unix_
++#include </nonexistent>
++#endif
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ cyrus_cv_sys_sco=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_sys_sco=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++fi
++
++ if test $cyrus_cv_sys_sco = yes; then
++ spt_type=SPT_SCO
++ fi
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_sco" >&5
++echo "${ECHO_T}$cyrus_cv_sys_sco" >&6; }
++fi
++if test "$spt_type" = ""; then
++ { echo "$as_me:$LINENO: checking for setproctitle usability" >&5
++echo $ECHO_N "checking for setproctitle usability... $ECHO_C" >&6; }
++ if test "${cyrus_cv_sys_setproctitle+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#if defined(DGUX) || defined(_SEQUENT_) || defined(apollo)
++#include </nonexistent>
++#endif
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ cyrus_cv_sys_setproctitle=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_sys_setproctitle=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++fi
++
++ if test $cyrus_cv_sys_setproctitle = no; then
++ spt_type=SPT_NONE
++ fi
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_setproctitle" >&5
++echo "${ECHO_T}$cyrus_cv_sys_setproctitle" >&6; }
++fi
++if test "$spt_type" != ""; then
++
++cat >>confdefs.h <<_ACEOF
++@%:@define SPT_TYPE $spt_type
++_ACEOF
++
++fi
++
++{ echo "$as_me:$LINENO: checking nonblocking method" >&5
++echo $ECHO_N "checking nonblocking method... $ECHO_C" >&6; }
++if test "${cyrus_cv_sys_nonblock+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/file.h>
++#include <fcntl.h>
++#ifndef FNDELAY
++#define FNDELAY O_NDELAY
++#endif
++int
++main ()
++{
++fcntl(0, F_GETFL, 0)&FNDELAY
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cyrus_cv_sys_nonblock=fcntl
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_sys_nonblock=ioctl
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++
++WITH_NONBLOCK=$cyrus_cv_sys_nonblock
++
++{ echo "$as_me:$LINENO: result: $WITH_NONBLOCK" >&5
++echo "${ECHO_T}$WITH_NONBLOCK" >&6; }
++
++{ echo "$as_me:$LINENO: checking timezone GMT offset method" >&5
++echo $ECHO_N "checking timezone GMT offset method... $ECHO_C" >&6; }
++if test "${cyrus_cv_struct_sys_gmtoff+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <time.h>
++int
++main ()
++{
++struct tm tm;
++tm.tm_gmtoff = 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cyrus_cv_struct_sys_gmtoff=tm
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_struct_sys_gmtoff=gmtime
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff
++
++{ echo "$as_me:$LINENO: result: $WITH_GMTOFF" >&5
++echo "${ECHO_T}$WITH_GMTOFF" >&6; }
++{ echo "$as_me:$LINENO: checking for shared mmap" >&5
++echo $ECHO_N "checking for shared mmap... $ECHO_C" >&6; }
++if test "${cyrus_cv_func_mmap_shared+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$cross_compiling" = yes; then
++ cyrus_cv_func_mmap_shared=no
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#include <sys/mman.h>
++#include <fcntl.h>
++main() {
++char *base;
++int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
++if (fd == -1) exit(1);
++if (write(fd, "test", 4) != 4) exit(1);
++fsync(fd);
++base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED
++#ifdef MAP_FILE
++| MAP_FILE
++#endif
++#ifdef MAP_VARIABLE
++| MAP_VARIABLE
++#endif
++, fd, 0L);
++if (base == (caddr_t)-1) exit(1);
++if (strncmp(base, "test", 4) != 0) exit(1);
++if (write(fd, "test", 4) != 4) exit(1);
++fsync(fd);
++if (strncmp(base+4, "test", 4) != 0) exit(1);
++exit(0);}
++
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cyrus_cv_func_mmap_shared=yes
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++cyrus_cv_func_mmap_shared=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++
++{ echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_shared" >&5
++echo "${ECHO_T}$cyrus_cv_func_mmap_shared" >&6; }
++if test $cyrus_cv_func_mmap_shared = yes; then
++ WITH_MAP="shared"
++else
++{ echo "$as_me:$LINENO: checking for stupid shared mmap" >&5
++echo $ECHO_N "checking for stupid shared mmap... $ECHO_C" >&6; }
++if test "${cyrus_cv_func_mmap_stupidshared+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$cross_compiling" = yes; then
++ cyrus_cv_func_mmap_stupidshared=no
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#include <sys/mman.h>
++#include <fcntl.h>
++main() {
++char *base;
++int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
++if (fd == -1) exit(1);
++if (write(fd, "test", 4) != 4) exit(1);
++fsync(fd);
++base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED
++#ifdef MAP_FILE
++| MAP_FILE
++#endif
++#ifdef MAP_VARIABLE
++| MAP_VARIABLE
++#endif
++, fd, 0L);
++if (base == (caddr_t)-1) exit(1);
++if (strncmp(base, "test", 4) != 0) exit(1);
++lseek(fd, 0L, 0);
++if (write(fd, "xyzz", 4) != 4) exit(1);
++fsync(fd);
++if (strncmp(base, "xyzz", 4) != 0) exit(1);
++exit(0);}
++
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cyrus_cv_func_mmap_stupidshared=yes
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++cyrus_cv_func_mmap_stupidshared=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++
++{ echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_stupidshared" >&5
++echo "${ECHO_T}$cyrus_cv_func_mmap_stupidshared" >&6; }
++if test $cyrus_cv_func_mmap_stupidshared = yes; then
++ WITH_MAP="stupidshared"
++else
++ { echo "$as_me:$LINENO: WARNING: *** This system does not have a working mmap()" >&5
++echo "$as_me: WARNING: *** This system does not have a working mmap()" >&2;}
++ { echo "$as_me:$LINENO: WARNING: *** Expect a considerable performance penalty" >&5
++echo "$as_me: WARNING: *** Expect a considerable performance penalty" >&2;}
++ WITH_MAP=nommap
++fi
++fi
++
++
++
++# Check whether --with-lock was given.
++if test "${with_lock+set}" = set; then
++ withval=$with_lock; WITH_LOCK="$withval"
++else
++
++ { echo "$as_me:$LINENO: checking for fcntl" >&5
++echo $ECHO_N "checking for fcntl... $ECHO_C" >&6; }
++if test "${ac_cv_func_fcntl+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define fcntl to an innocuous variant, in case <limits.h> declares fcntl.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define fcntl innocuous_fcntl
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char fcntl (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef fcntl
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char fcntl ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_fcntl || defined __stub___fcntl
++choke me
++#endif
++
++int
++main ()
++{
++return fcntl ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_fcntl=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_fcntl=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_fcntl" >&5
++echo "${ECHO_T}$ac_cv_func_fcntl" >&6; }
++if test $ac_cv_func_fcntl = yes; then
++ WITH_LOCK="fcntl"
++else
++
++ { echo "$as_me:$LINENO: checking for flock" >&5
++echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
++if test "${ac_cv_func_flock+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define flock to an innocuous variant, in case <limits.h> declares flock.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define flock innocuous_flock
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char flock (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef flock
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char flock ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_flock || defined __stub___flock
++choke me
++#endif
++
++int
++main ()
++{
++return flock ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_flock=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_flock=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_flock" >&5
++echo "${ECHO_T}$ac_cv_func_flock" >&6; }
++if test $ac_cv_func_flock = yes; then
++ WITH_LOCK="flock"
++else
++
++ { { echo "$as_me:$LINENO: error: unable to detect locking method" >&5
++echo "$as_me: error: unable to detect locking method" >&2;}
++ { (exit 1); exit 1; }; }
++
++fi
++
++
++fi
++
++
++fi
++
++
++
++
++LIB_RT=""
++{ echo "$as_me:$LINENO: checking for fdatasync" >&5
++echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
++if test "${ac_cv_func_fdatasync+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define fdatasync to an innocuous variant, in case <limits.h> declares fdatasync.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define fdatasync innocuous_fdatasync
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char fdatasync (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef fdatasync
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char fdatasync ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_fdatasync || defined __stub___fdatasync
++choke me
++#endif
++
++int
++main ()
++{
++return fdatasync ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_fdatasync=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_fdatasync=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_fdatasync" >&5
++echo "${ECHO_T}$ac_cv_func_fdatasync" >&6; }
++if test $ac_cv_func_fdatasync = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_FDATASYNC
++_ACEOF
++
++else
++
++ { echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
++echo $ECHO_N "checking for fdatasync in -lrt... $ECHO_C" >&6; }
++if test "${ac_cv_lib_rt_fdatasync+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrt $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char fdatasync ();
++int
++main ()
++{
++return fdatasync ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_rt_fdatasync=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_rt_fdatasync=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
++echo "${ECHO_T}$ac_cv_lib_rt_fdatasync" >&6; }
++if test $ac_cv_lib_rt_fdatasync = yes; then
++
++ LIB_RT="-lrt"
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_FDATASYNC
++_ACEOF
++
++
++fi
++
++
++fi
++
++
++cant_find_sigvec=no
++if test "${cyrus_sigveclib+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ { echo "$as_me:$LINENO: checking for sigvec" >&5
++echo $ECHO_N "checking for sigvec... $ECHO_C" >&6; }
++if test "${ac_cv_func_sigvec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define sigvec to an innocuous variant, in case <limits.h> declares sigvec.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define sigvec innocuous_sigvec
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char sigvec (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef sigvec
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sigvec ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_sigvec || defined __stub___sigvec
++choke me
++#endif
++
++int
++main ()
++{
++return sigvec ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_sigvec=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_sigvec=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_sigvec" >&5
++echo "${ECHO_T}$ac_cv_func_sigvec" >&6; }
++if test $ac_cv_func_sigvec = yes; then
++
++ cyrus_sigveclib=""
++
++else
++
++ { echo "$as_me:$LINENO: checking for sigvec in -lBSD" >&5
++echo $ECHO_N "checking for sigvec in -lBSD... $ECHO_C" >&6; }
++if test "${ac_cv_lib_BSD_sigvec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lBSD $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sigvec ();
++int
++main ()
++{
++return sigvec ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_BSD_sigvec=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_BSD_sigvec=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_sigvec" >&5
++echo "${ECHO_T}$ac_cv_lib_BSD_sigvec" >&6; }
++if test $ac_cv_lib_BSD_sigvec = yes; then
++ cyrus_sigveclib="-lBSD"
++else
++
++ SAVE_LDFLAGS="$LDFLAGS"
++ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
++ { echo "$as_me:$LINENO: checking for sigvec in -lucb" >&5
++echo $ECHO_N "checking for sigvec in -lucb... $ECHO_C" >&6; }
++if test "${ac_cv_lib_ucb_sigvec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lucb $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sigvec ();
++int
++main ()
++{
++return sigvec ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ucb_sigvec=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_ucb_sigvec=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_sigvec" >&5
++echo "${ECHO_T}$ac_cv_lib_ucb_sigvec" >&6; }
++if test $ac_cv_lib_ucb_sigvec = yes; then
++
++ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"
++else
++ cant_find_sigvec=yes
++fi
++
++ LDFLAGS="$SAVE_LDFLAGS"
++fi
++
++
++fi
++
++
++fi
++
++
++
++# ok, we still look for this stuff because of checking groups, but
++# all authentication goes through SASL
++
++
++# Check whether --with-afs was given.
++if test "${with_afs+set}" = set; then
++ withval=$with_afs; with_afs="${withval}"
++else
++ with_afs="no"
++fi
++
++
++
++# Check whether --with-ldap was given.
++if test "${with_ldap+set}" = set; then
++ withval=$with_ldap; with_ldap="${withval}"
++else
++ with_ldap="no"
++fi
++
++
++# Check whether --enable-krb5afspts was given.
++if test "${enable_krb5afspts+set}" = set; then
++ enableval=$enable_krb5afspts; SASL_GSSAPI_LIBS_SET="yes"
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define AFSPTS_USE_KRB5
++_ACEOF
++
++fi
++
++
++if test "x$with_afs" != "xno"; then
++ if test ! -d $with_afs; then
++ $with_afs=/usr/local
++ fi
++ CFLAGS="${CFLAGS} -I${with_afs}/include"
++ AFS_LIBS="${with_afs}/lib/afs/libkauth.a ${with_afs}/lib/afs/libprot.a ${with_afs}/lib/afs/libauth.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/librxkad.a ${with_afs}/lib/librx.a ${with_afs}/lib/afs/libsys.a ${with_afs}/lib/libubik.a ${with_afs}/lib/liblwp.a ${with_afs}/lib/afs/util.a"
++ if test -f ${with_afs}/lib/afs/libaudit.a; then
++ AFS_LIBS="$AFS_LIBS ${with_afs}/lib/afs/libaudit.a"
++ fi
++ if test -f /usr/ucblib/libucb.a; then
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS}"
++ else
++ AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS} $andrew_runpath_switch/usr/ucblib"
++ fi
++
++ AFS_LIBS="$AFS_LIBS -lc -lucb"
++ fi
++
++ if test "${cyrus_afs_sigvec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ SAVE_LIBS="$LIBS"
++ LIBS="${with_afs}/lib/liblwp.a"
++ { echo "$as_me:$LINENO: checking if AFS libraries need sigvec" >&5
++echo $ECHO_N "checking if AFS libraries need sigvec... $ECHO_C" >&6; }
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++IOMGR_Initialize();
++int
++main ()
++{
++IOMGR_Initialize()
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++ cyrus_afs_sigvec="no"
++
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++ cyrus_afs_sigvec="yes"
++
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++
++fi
++
++ if test "$cyrus_afs_sigvec" = yes; then
++ if test "$cant_find_sigvec" = yes; then
++ { echo "$as_me:$LINENO: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&5
++echo "$as_me: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&2;}
++ else
++ AFS_LIBS="${AFS_LIBS} $cyrus_sigveclib"
++
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_AFSKRB
++_ACEOF
++
++ fi
++ else
++ AFS_LIBS="${AFS_LIBS}"
++
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_AFSKRB
++_ACEOF
++
++ fi
++ LIBS="$SAVE_LIBS"
++fi
++
++LDAP_CPPFLAGS=""
++LDAP_LDFLAGS=""
++LDAP_LIBS=""
++
++if test "x$with_ldap" != "xno"; then
++ if test ! -d $with_ldap; then
++ $with_ldap=/usr/local
++ fi
++
++ LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
++ LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib"
++ LDAP_LIBS=""
++
++ save_CPPFLAGS=$CPPFLAGS
++ save_LDFLAGS=$LDFLAGS
++ CPPFLAGS=$LDAP_CPPFLAGS
++ LDFLAGS=$LDAP_LDFLAGS
++
++ { echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
++echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6; }
++if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lldap -llber $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ldap_initialize ();
++int
++main ()
++{
++return ldap_initialize ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ldap_ldap_initialize=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_ldap_ldap_initialize=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
++echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6; }
++if test $ac_cv_lib_ldap_ldap_initialize = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_LDAP
++_ACEOF
++
++
++
++
++ LDAP_LIBS="-lldap -llber"
++fi
++
++
++ CPPFLAGS=$save_CPPFLAGS
++ LDFLAGS=$LDAP_LDFLAGS
++
++ { echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
++echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6; }
++if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lldap -llber $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ldap_initialize ();
++int
++main ()
++{
++return ldap_initialize ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ldap_ldap_initialize=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_ldap_ldap_initialize=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
++echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6; }
++if test $ac_cv_lib_ldap_ldap_initialize = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_LDAP
++_ACEOF
++
++
++
++
++ LDAP_LIBS="-lldap -llber"
++fi
++
++
++ CPPFLAGS=$save_CPPFLAGS
++ LDFLAGS=$save_LDFLAGS
++fi
++
++if test "x$with_afs" != "xno" -o "x$with_ldap" != "xno"; then
++ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile"
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define WITH_PTS
++_ACEOF
++
++fi
++
++
++
++SERVER_SUBDIRS="master imap"
++# Check whether --enable-server was given.
++if test "${enable_server+set}" = set; then
++ enableval=$enable_server; if test "$enableval" = no; then
++ SERVER_SUBDIRS=""
++ fi
++fi
++
++
++# We always output a server makefile (just because we can)
++
++
++# Check whether --with-krb was given.
++if test "${with_krb+set}" = set; then
++ withval=$with_krb; with_krb="$withval"
++else
++ with_krb="no"
++fi
++
++
++
++# Check whether --with-krbimpl was given.
++if test "${with_krbimpl+set}" = set; then
++ withval=$with_krbimpl; with_krbimpl="$withval"
++else
++ with_krbimpl="kth"
++fi
++
++
++# Check whether --enable-statickrb was given.
++if test "${enable_statickrb+set}" = set; then
++ enableval=$enable_statickrb; with_statickrb="yes"
++else
++ with_statickrb="no"
++fi
++
++
++
++
++{ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
++if test "${ac_cv_lib_resolv_res_search+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char res_search ();
++int
++main ()
++{
++return res_search ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_resolv_res_search=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_resolv_res_search=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
++if test $ac_cv_lib_resolv_res_search = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_LIBRESOLV 1
++_ACEOF
++
++ LIBS="-lresolv $LIBS"
++
++fi
++
++
++if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then
++ { { echo "$as_me:$LINENO: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&5
++echo "$as_me: error: --enable-statickrb specified but --with-krb did not specify a valid directory" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++if test "$with_krb" != "no"; then
++
++# Check whether --with-krbdes was given.
++if test "${with_krbdes+set}" = set; then
++ withval=$with_krbdes; with_krbdes="$withval"
++else
++ with_krbdes="yes"
++fi
++
++if test "$with_krbdes" = "yes"; then
++ { echo "$as_me:$LINENO: checking for des_ecb_encrypt in -ldes" >&5
++echo $ECHO_N "checking for des_ecb_encrypt in -ldes... $ECHO_C" >&6; }
++if test "${ac_cv_lib_des_des_ecb_encrypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldes $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char des_ecb_encrypt ();
++int
++main ()
++{
++return des_ecb_encrypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_des_des_ecb_encrypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_des_des_ecb_encrypt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_ecb_encrypt" >&5
++echo "${ECHO_T}$ac_cv_lib_des_des_ecb_encrypt" >&6; }
++if test $ac_cv_lib_des_des_ecb_encrypt = yes; then
++ if test "$with_statickrb" = "yes"; then
++ KRB_LIBS="$with_krb/lib/libdes.a"
++ else
++ KRB_LIBS="-ldes"
++ fi
++else
++ { { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
++echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++fi
++fi
++
++if test -d ${with_krb}; then
++ { echo "$as_me:$LINENO: checking for Kerberos includes" >&5
++echo $ECHO_N "checking for Kerberos includes... $ECHO_C" >&6; }
++if test "${cyrus_krbinclude+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ for krbhloc in include/kerberosIV include
++ do
++ if test -f ${with_krb}/${krbhloc}/krb.h ; then
++ cyrus_krbinclude=${with_krb}/${krbhloc}
++ break
++ fi
++ done
++
++fi
++{ echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
++echo "${ECHO_T}$cyrus_krbinclude" >&6; }
++
++ if test -n "${cyrus_krbinclude}"; then
++ CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
++ fi
++
++ # this is CMU ADD LIBPATH
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L${with_krb}/lib ${LDFLAGS}"
++ else
++ LDFLAGS="-L${with_krb}/lib $andrew_runpath_switch${with_krb}/lib ${LDFLAGS}"
++ fi
++
++fi
++
++if test "$with_krbimpl" != "kth"; then
++ KRBLIB="krb4"
++else
++ KRBLIB="krb"
++fi
++
++if test "$with_des" != no; then
++ if test "${ac_cv_header_krb_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for krb.h" >&5
++echo $ECHO_N "checking for krb.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_krb_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
++echo "${ECHO_T}$ac_cv_header_krb_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking krb.h usability" >&5
++echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <krb.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking krb.h presence" >&5
++echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <krb.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for krb.h" >&5
++echo $ECHO_N "checking for krb.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_krb_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_krb_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
++echo "${ECHO_T}$ac_cv_header_krb_h" >&6; }
++
++fi
++if test $ac_cv_header_krb_h = yes; then
++ as_ac_Lib=`echo "ac_cv_lib_${KRBLIB}''_krb_mk_priv" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for krb_mk_priv in -l${KRBLIB}" >&5
++echo $ECHO_N "checking for krb_mk_priv in -l${KRBLIB}... $ECHO_C" >&6; }
++if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-l${KRBLIB} $KRB_LIBS $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char krb_mk_priv ();
++int
++main ()
++{
++return krb_mk_priv ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_Lib=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_Lib=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++ac_res=`eval echo '${'$as_ac_Lib'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++ if test "$with_statickrb" = "yes"; then
++ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
++ else
++ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
++ fi
++else
++ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
++echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
++fi
++
++else
++ { echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
++echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no
++fi
++
++
++else
++ { echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
++echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
++ krb4=no
++fi
++
++if test "${krb4}" != no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_KRB
++_ACEOF
++
++fi
++
++LIBS="$KRB_LIBS $LIBS"
++
++SASL_GSSAPI_LIBS_SET="yes"
++
++
++IMAP_PROGS=""
++
++# Check whether --with-openssl was given.
++if test "${with_openssl+set}" = set; then
++ withval=$with_openssl; with_openssl="${withval}"
++fi
++
++
++OPENSSL_INC=
++OPENSSL_LIB=
++case "$with_openssl" in
++ no) with_openssl="no";;
++ ""|yes)
++ LIB_RSAREF=""
++ { echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
++echo $ECHO_N "checking for RSAPublicEncrypt in -lrsaref... $ECHO_C" >&6; }
++if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrsaref $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char RSAPublicEncrypt ();
++int
++main ()
++{
++return RSAPublicEncrypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_rsaref_RSAPublicEncrypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_rsaref_RSAPublicEncrypt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
++echo "${ECHO_T}$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
++if test $ac_cv_lib_rsaref_RSAPublicEncrypt = yes; then
++ LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
++else
++ cmu_have_rsaref=no
++fi
++
++
++ with_openssl="yes"
++ { echo "$as_me:$LINENO: checking for BIO_accept in -lcrypto" >&5
++echo $ECHO_N "checking for BIO_accept in -lcrypto... $ECHO_C" >&6; }
++if test "${ac_cv_lib_crypto_BIO_accept+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypto $LIB_RSAREF $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char BIO_accept ();
++int
++main ()
++{
++return BIO_accept ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_crypto_BIO_accept=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_crypto_BIO_accept=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_BIO_accept" >&5
++echo "${ECHO_T}$ac_cv_lib_crypto_BIO_accept" >&6; }
++if test $ac_cv_lib_crypto_BIO_accept = yes; then
++ LIBS="-lcrypto $LIB_RSAREF ${LIBS}"
++else
++ with_openssl="no"
++fi
++
++ { echo "$as_me:$LINENO: checking for SSL_CTX_new in -lssl" >&5
++echo $ECHO_N "checking for SSL_CTX_new in -lssl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_ssl_SSL_CTX_new+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lssl -lcrypto $LIB_RSAREF $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char SSL_CTX_new ();
++int
++main ()
++{
++return SSL_CTX_new ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_ssl_SSL_CTX_new=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_ssl_SSL_CTX_new=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5
++echo "${ECHO_T}$ac_cv_lib_ssl_SSL_CTX_new" >&6; }
++if test $ac_cv_lib_ssl_SSL_CTX_new = yes; then
++ LIBS="-lssl ${LIBS}"
++else
++ with_openssl="no"
++fi
++
++
++ ;;
++ *) OPENSSL_INC="-I${with_openssl}/include"
++ OPENSSL_LIBPATH="${with_openssl}/lib"
++ OPENSSL_LIB="-L${OPENSSL_LIBPATH}"
++ CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}"
++
++ # this is CMU ADD LIBPATH
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L${OPENSSL_LIBPATH} ${LDFLAGS}"
++ else
++ LDFLAGS="-L${OPENSSL_LIBPATH} $andrew_runpath_switch${OPENSSL_LIBPATH} ${LDFLAGS}"
++ fi
++
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB}"
++ else
++ OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB} $andrew_runpath_switch${OPENSSL_LIBPATH}"
++ fi
++
++ LIBS="${LIBS} -lssl -lcrypto";;
++esac
++
++{ echo "$as_me:$LINENO: checking for openssl" >&5
++echo $ECHO_N "checking for openssl... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: result: $with_openssl" >&5
++echo "${ECHO_T}$with_openssl" >&6; }
++
++if test "$with_openssl" != "no"; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_SSL
++_ACEOF
++
++ IMAP_PROGS="$IMAP_PROGS tls_prune"
++ if test "${krb4}" != no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define OPENSSL_ENABLE_OLD_DES_SUPPORT
++_ACEOF
++
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define OPENSSL_DES_LIBDES_COMPATIBILITY
++_ACEOF
++
++ fi
++fi
++
++
++
++
++# Check whether --with-egd-socket was given.
++if test "${with_egd_socket+set}" = set; then
++ withval=$with_egd_socket; EGD_SOCKET="$withval"
++
++fi
++
++if test -n "$EGD_SOCKET" ; then
++
++cat >>confdefs.h <<_ACEOF
++@%:@define EGD_SOCKET "$EGD_SOCKET"
++_ACEOF
++
++fi
++
++
++# Check whether --with-zephyr was given.
++if test "${with_zephyr+set}" = set; then
++ withval=$with_zephyr; with_zephyr="${withval}"
++fi
++
++if test -z "$with_zephyr"; then
++ if test -f /usr/local/lib/libzephyr.a; then
++ with_zephyr="/usr/local"
++ elif test -f /usr/lib/libzephyr.a; then
++ with_zephyr="/usr"
++ fi
++fi
++ZEPHYR_LIBS=""
++ZEPHYR_CPPFLAGS=""
++case "$with_zephyr" in
++ no) true;;
++ ""|yes) { echo "$as_me:$LINENO: checking for ZInitialize in -lzephyr" >&5
++echo $ECHO_N "checking for ZInitialize in -lzephyr... $ECHO_C" >&6; }
++if test "${ac_cv_lib_zephyr_ZInitialize+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lzephyr $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char ZInitialize ();
++int
++main ()
++{
++return ZInitialize ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_zephyr_ZInitialize=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_zephyr_ZInitialize=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitialize" >&5
++echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitialize" >&6; }
++if test $ac_cv_lib_zephyr_ZInitialize = yes; then
++ ZEPHYR_LIBS="-lzephyr"
++else
++ with_zephyr="no"
++fi
++;;
++ *) if test -d ${with_zephyr}/include/zephyr; then
++ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include/zephyr"
++ else
++ ZEPHYR_CPPFLAGS="-I${with_zephyr}/include"
++ fi
++ ZEPHYR_LIBS="-lzephyr";;
++esac
++
++
++if test "$with_zephyr" != "no"; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_ZEPHYR
++_ACEOF
++
++fi
++
++
++# Check whether --with-pidfile was given.
++if test "${with_pidfile+set}" = set; then
++ withval=$with_pidfile; MASTERPIDFILE="$withval"
++else
++ MASTERPIDFILE="/var/run/cyrus-master.pid"
++fi
++
++MASTERPIDFILE="\"$MASTERPIDFILE\""
++
++cat >>confdefs.h <<_ACEOF
++@%:@define MASTER_PIDFILE $MASTERPIDFILE
++_ACEOF
++
++
++# Check whether --enable-idled was given.
++if test "${enable_idled+set}" = set; then
++ enableval=$enable_idled; if test "$enable_val" != no; then
++ IMAP_PROGS="$IMAP_PROGS idled"
++ fi
++fi
++
++
++ENABLE_NNTP=no
++# Check whether --enable-nntp was given.
++if test "${enable_nntp+set}" = set; then
++ enableval=$enable_nntp; ENABLE_NNTP=$enableval
++ if test "$ENABLE_NNTP" != no; then
++ IMAP_PROGS="$IMAP_PROGS nntpd fetchnews"
++ fi
++fi
++
++
++ENABLE_MURDER=no
++# Check whether --enable-murder was given.
++if test "${enable_murder+set}" = set; then
++ enableval=$enable_murder; ENABLE_MURDER=$enableval
++fi
++
++
++if test "$ENABLE_MURDER" != no; then
++ IMAP_PROGS="$IMAP_PROGS mupdate"
++ # for master/slave auto-selection
++
++for ac_header in sys/sockio.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++fi
++
++ENABLE_REPLICATION=no
++# Check whether --enable-replication was given.
++if test "${enable_replication+set}" = set; then
++ enableval=$enable_replication; ENABLE_REPLICATION=$enableval
++ if test "$ENABLE_REPLICATION" != no; then
++ IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset make_md5"
++ fi
++fi
++
++
++
++
++
++# Check whether --with-com_err was given.
++if test "${with_com_err+set}" = set; then
++ withval=$with_com_err;
++fi
++
++if test -z "$with_com_err"; then
++ # no value supplied
++ { echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
++echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
++if test "${ac_cv_lib_com_err_com_err+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcom_err $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char com_err ();
++int
++main ()
++{
++return com_err ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_com_err_com_err=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_com_err_com_err=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
++echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
++if test $ac_cv_lib_com_err_com_err = yes; then
++
++ # com_err is already in library path
++ # guess we're okay
++ # can use system com_err
++ with_com_err=""
++ if test "${ac_cv_header_et_com_err_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for et/com_err.h" >&5
++echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_et_com_err_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking et/com_err.h usability" >&5
++echo $ECHO_N "checking et/com_err.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <et/com_err.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking et/com_err.h presence" >&5
++echo $ECHO_N "checking et/com_err.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <et/com_err.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: et/com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: et/com_err.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: et/com_err.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: et/com_err.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: et/com_err.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: et/com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for et/com_err.h" >&5
++echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_et_com_err_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_et_com_err_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6; }
++
++fi
++if test $ac_cv_header_et_com_err_h = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_ET_COM_ERR_H
++_ACEOF
++
++else
++ if test "${ac_cv_header_com_err_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for com_err.h" >&5
++echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_com_err_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_com_err_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking com_err.h usability" >&5
++echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <com_err.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking com_err.h presence" >&5
++echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <com_err.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: com_err.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: com_err.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: com_err.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: com_err.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: com_err.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for com_err.h" >&5
++echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_com_err_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_com_err_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_com_err_h" >&6; }
++
++fi
++if test $ac_cv_header_com_err_h = yes; then
++ :
++else
++ { { echo "$as_me:$LINENO: error: cannot locate com_err.h" >&5
++echo "$as_me: error: cannot locate com_err.h" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++fi
++
++
++ # Extract the first word of "compile_et", so it can be a program name with args.
++set dummy compile_et; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_path_COMPILE_ET+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ case $COMPILE_ET in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
++ ;;
++esac
++fi
++COMPILE_ET=$ac_cv_path_COMPILE_ET
++if test -n "$COMPILE_ET"; then
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++
++else
++
++ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
++ with_com_err="/usr/local"
++ # Extract the first word of "/usr/local/bin/compile_et", so it can be a program name with args.
++set dummy /usr/local/bin/compile_et; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_path_COMPILE_ET+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ case $COMPILE_ET in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
++ ;;
++esac
++fi
++COMPILE_ET=$ac_cv_path_COMPILE_ET
++if test -n "$COMPILE_ET"; then
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
++ with_com_err="/usr"
++ # Extract the first word of "/usr/bin/compile_et", so it can be a program name with args.
++set dummy /usr/bin/compile_et; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_path_COMPILE_ET+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ case $COMPILE_ET in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
++ ;;
++esac
++fi
++COMPILE_ET=$ac_cv_path_COMPILE_ET
++if test -n "$COMPILE_ET"; then
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ else
++ # use ours
++ with_com_err=yes
++ fi
++
++fi
++
++
++ if test "${with_com_err}" = "no"; then
++ { echo "$as_me:$LINENO: WARNING: com_err is required; included version will be used." >&5
++echo "$as_me: WARNING: com_err is required; included version will be used." >&2;}
++ with_com_err="yes"
++ fi
++ if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then
++ { echo "$as_me:$LINENO: WARNING: Parts of com_err distribuion were found, but not compile_et." >&5
++echo "$as_me: WARNING: Parts of com_err distribuion were found, but not compile_et." >&2;}
++ { echo "$as_me:$LINENO: WARNING: Will build com_err from included sources." >&5
++echo "$as_me: WARNING: Will build com_err from included sources." >&2;}
++ with_com_err="yes" # build it ourselves
++ fi
++fi
++
++case "$with_com_err" in
++ # built-in et
++ yes) # use the com_err we're gonna build
++ COM_ERR_LIBS="../et/libcom_err.a"
++ COMPILE_ET="../et/compile_et"
++ COM_ERR_LDFLAGS=""
++ COM_ERR_CPPFLAGS="-I\${top_srcdir}/et"
++ PRE_SUBDIRS="et ${PRE_SUBDIRS}"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} et/Makefile"
++ ;;
++ "") # no problem, we already have it in the paths
++ # we do nothing to pick it up
++ COM_ERR_LIBS="-lcom_err" # hope it's not shared
++ # we already set COMPILE_ET, or we didn't get here
++ COM_ERR_LDFLAGS=""
++ COM_ERR_CPPFLAGS=""
++ ;;
++ *) # use whatever they told us, or whatever we found
++ COMPILE_ET="${with_com_err}/bin/compile_et"
++ COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a"
++ COM_ERR_CPPFLAGS="-I${with_com_err}/include"
++ # Ever get the feeling people hide this stuff on purpose?
++ if test -d "${with_com_err}/include/et" ; then
++ COM_ERR_CPPFLAGS="-I${with_com_err}/include/et"
++ fi
++ COMPILE_ET="${with_com_err}/bin/compile_et"
++esac
++
++
++
++
++
++{ echo "$as_me:$LINENO: checking for modern syslog" >&5
++echo $ECHO_N "checking for modern syslog... $ECHO_C" >&6; }
++if test "${cyrus_cv_lib_syslog+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <syslog.h>
++#ifndef LOG_LOCAL6
++#include </nonexistent>
++#endif
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ cyrus_cv_lib_syslog=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cyrus_cv_lib_syslog=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++fi
++
++if test $cyrus_cv_lib_syslog = no; then
++ PRE_SUBDIRS="${PRE_SUBDIRS} syslog"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile"
++ DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a"
++ CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog"
++fi
++{ echo "$as_me:$LINENO: result: $cyrus_cv_lib_syslog" >&5
++echo "${ECHO_T}$cyrus_cv_lib_syslog" >&6; }
++
++{ echo "$as_me:$LINENO: checking which syslog facility to use" >&5
++echo $ECHO_N "checking which syslog facility to use... $ECHO_C" >&6; }
++SYSLOG_FACILITY=LOG_LOCAL6
++
++# Check whether --with-syslogfacility was given.
++if test "${with_syslogfacility+set}" = set; then
++ withval=$with_syslogfacility; if test "$withval" != "yes" -a "$withval" != "no" ; then
++ SYSLOG_FACILITY=LOG_$withval
++ fi;
++fi
++
++
++cat >>confdefs.h <<_ACEOF
++@%:@define SYSLOG_FACILITY $SYSLOG_FACILITY
++_ACEOF
++
++{ echo "$as_me:$LINENO: result: $SYSLOG_FACILITY" >&5
++echo "${ECHO_T}$SYSLOG_FACILITY" >&6; }
++
++
++for ac_func in getdtablesize
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++else
++ case " $LIB@&t at OBJS " in
++ *" $ac_func.$ac_objext "* ) ;;
++ *) LIB@&t at OBJS="$LIB@&t at OBJS $ac_func.$ac_objext"
++ ;;
++esac
++
++fi
++done
++
++
++# Check whether --enable-cmulocal was given.
++if test "${enable_cmulocal+set}" = set; then
++ enableval=$enable_cmulocal; if test "$enableval" = yes; then
++ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile"
++ fi
++fi
++
++
++{ echo "$as_me:$LINENO: checking to use old sieve service name" >&5
++echo $ECHO_N "checking to use old sieve service name... $ECHO_C" >&6; }
++# Check whether --enable-oldsievename was given.
++if test "${enable_oldsievename+set}" = set; then
++ enableval=$enable_oldsievename; if test "$enableval" = yes; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define OLD_SIEVE_SERVICE_NAME
++_ACEOF
++
++ else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++ fi
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++# Check whether --enable-listext was given.
++if test "${enable_listext+set}" = set; then
++ enableval=$enable_listext; if test "$enableval" = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define ENABLE_LISTEXT
++_ACEOF
++
++ fi
++fi
++
++
++# Check whether --enable-netscapehack was given.
++if test "${enable_netscapehack+set}" = set; then
++ enableval=$enable_netscapehack; if test "$enableval" = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define ENABLE_X_NETSCAPE_HACK
++_ACEOF
++
++ fi
++fi
++
++
++{ echo "$as_me:$LINENO: checking for dlopen" >&5
++echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
++if test "${ac_cv_func_dlopen+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define dlopen innocuous_dlopen
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char dlopen (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef dlopen
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dlopen ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_dlopen || defined __stub___dlopen
++choke me
++#endif
++
++int
++main ()
++{
++return dlopen ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_dlopen=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_dlopen=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
++echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
++if test $ac_cv_func_dlopen = yes; then
++ :
++else
++
++{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
++echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_dl_dlopen+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ldl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char dlopen ();
++int
++main ()
++{
++return dlopen ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_dl_dlopen=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_dl_dlopen=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
++echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
++if test $ac_cv_lib_dl_dlopen = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_LIBDL 1
++_ACEOF
++
++ LIBS="-ldl $LIBS"
++
++fi
++
++fi
++
++{ echo "$as_me:$LINENO: checking for crypt" >&5
++echo $ECHO_N "checking for crypt... $ECHO_C" >&6; }
++if test "${ac_cv_func_crypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define crypt innocuous_crypt
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char crypt (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef crypt
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char crypt ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_crypt || defined __stub___crypt
++choke me
++#endif
++
++int
++main ()
++{
++return crypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_crypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_crypt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
++echo "${ECHO_T}$ac_cv_func_crypt" >&6; }
++if test $ac_cv_func_crypt = yes; then
++ cmu_have_crypt=yes
++else
++ { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
++echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
++if test "${ac_cv_lib_crypt_crypt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypt $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char crypt ();
++int
++main ()
++{
++return crypt ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_crypt_crypt=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_crypt_crypt=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
++echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
++if test $ac_cv_lib_crypt_crypt = yes; then
++ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
++else
++ cmu_have_crypt=no
++fi
++
++fi
++
++
++
++
++
++# Check whether --enable-gssapi was given.
++if test "${enable_gssapi+set}" = set; then
++ enableval=$enable_gssapi; gssapi=$enableval
++else
++ gssapi=yes
++fi
++
++
++# Check whether --with-gss_impl was given.
++if test "${with_gss_impl+set}" = set; then
++ withval=$with_gss_impl; gss_impl=$withval
++else
++ gss_impl=auto
++fi
++
++
++if test "$gssapi" != no; then
++ platform=
++ case "${host}" in
++ *-*-linux*)
++ platform=__linux
++ ;;
++ *-*-hpux*)
++ platform=__hpux
++ ;;
++ *-*-irix*)
++ platform=__irix
++ ;;
++ *-*-solaris2*)
++# When should we use __sunos?
++ platform=__solaris
++ ;;
++ *-*-aix*)
++###_AIX
++ platform=__aix
++ ;;
++ *)
++ { echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
++echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
++ if test "$gss_impl" = "cybersafe"; then
++ { { echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
++echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++ ;;
++ esac
++
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++
++ if test -d ${gssapi}; then
++ CPPFLAGS="$CPPFLAGS -I$gssapi/include"
++# We want to keep -I in our CPPFLAGS, but only if we succeed
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++### I am not sure how useful is this (and whether this is required at all
++### especially when we have to provide two -L flags for new CyberSafe
++ LDFLAGS="$LDFLAGS -L$gssapi/lib"
++
++ if test -n "$platform"; then
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
++ CPPFLAGS="$CPPFLAGS -D$platform"
++ if test -d "${gssapi}/appsec-sdk/include"; then
++ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
++ fi
++ fi
++ fi
++ fi
++ if test "${ac_cv_header_gssapi_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for gssapi.h" >&5
++echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_gssapi_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking gssapi.h usability" >&5
++echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <gssapi.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking gssapi.h presence" >&5
++echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <gssapi.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for gssapi.h" >&5
++echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_gssapi_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_gssapi_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
++
++fi
++if test $ac_cv_header_gssapi_h = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSSAPI_H
++_ACEOF
++
++else
++ if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
++echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
++echo $ECHO_N "checking gssapi/gssapi.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <gssapi/gssapi.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
++echo $ECHO_N "checking gssapi/gssapi.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <gssapi/gssapi.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
++echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6; }
++
++fi
++if test $ac_cv_header_gssapi_gssapi_h = yes; then
++ :
++else
++ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
++echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
++fi
++
++
++fi
++
++
++
++ CPPFLAGS=$cmu_saved_CPPFLAGS
++
++fi
++
++if test "$gssapi" != no; then
++ # We need to find out which gssapi implementation we are
++ # using. Supported alternatives are: MIT Kerberos 5,
++ # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
++ # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
++ # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
++ #
++ # The choice is reflected in GSSAPIBASE_LIBS
++
++
++{ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
++if test "${ac_cv_lib_resolv_res_search+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char res_search ();
++int
++main ()
++{
++return res_search ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_resolv_res_search=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_resolv_res_search=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
++if test $ac_cv_lib_resolv_res_search = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define HAVE_LIBRESOLV 1
++_ACEOF
++
++ LIBS="-lresolv $LIBS"
++
++fi
++
++ if test -d ${gssapi}; then
++ gssapi_dir="${gssapi}/lib"
++ GSSAPIBASE_LIBS="-L$gssapi_dir"
++ GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
++ else
++ # FIXME: This is only used for building cyrus, and then only as
++ # a real hack. it needs to be fixed.
++ gssapi_dir="/usr/local/lib"
++ fi
++
++ # Check a full link against the Heimdal libraries.
++ # If this fails, check a full link against the MIT libraries.
++ # If this fails, check a full link against the CyberSafe libraries.
++ # If this fails, check a full link against the Solaris 8 and up libgss.
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
++ gss_failed=0
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgssapi... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gss_unwrap ();
++int
++main ()
++{
++return gss_unwrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gssapi_gss_unwrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gssapi_gss_unwrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gssapi_gss_unwrap" >&6; }
++if test $ac_cv_lib_gssapi_gss_unwrap = yes; then
++ gss_impl="heimdal"
++else
++ gss_failed=1
++fi
++
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
++ # check for libkrb5support first
++ { echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
++echo $ECHO_N "checking for krb5int_getspecific in -lkrb5support... $ECHO_C" >&6; }
++if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char krb5int_getspecific ();
++int
++main ()
++{
++return krb5int_getspecific ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_krb5support_krb5int_getspecific=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_krb5support_krb5int_getspecific=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
++echo "${ECHO_T}$ac_cv_lib_krb5support_krb5int_getspecific" >&6; }
++if test $ac_cv_lib_krb5support_krb5int_getspecific = yes; then
++ K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
++fi
++
++
++ gss_failed=0
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgssapi_krb5... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gss_unwrap ();
++int
++main ()
++{
++return gss_unwrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gssapi_krb5_gss_unwrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gssapi_krb5_gss_unwrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; }
++if test $ac_cv_lib_gssapi_krb5_gss_unwrap = yes; then
++ gss_impl="mit"
++else
++ gss_failed=1
++fi
++
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ # For Cybersafe one has to set a platform define in order to make compilation work
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
++
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++ cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
++# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
++ if test -d "${gssapi}/appsec-rt/lib"; then
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
++ fi
++ CPPFLAGS="$CPPFLAGS -D$platform"
++ if test -d "${gssapi}/appsec-sdk/include"; then
++ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
++ fi
++
++ gss_failed=0
++
++# Check for CyberSafe with two libraries first, than fall back to a single
++# library (older CyberSafe)
++
++ unset ac_cv_lib_gss_csf_gss_acq_user
++ { echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
++echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char csf_gss_acq_user ();
++int
++main ()
++{
++return csf_gss_acq_user ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gss_csf_gss_acq_user=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gss_csf_gss_acq_user=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
++if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
++ gss_impl="cybersafe03"
++else
++ unset ac_cv_lib_gss_csf_gss_acq_user;
++ { echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
++echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char csf_gss_acq_user ();
++int
++main ()
++{
++return csf_gss_acq_user ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gss_csf_gss_acq_user=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gss_csf_gss_acq_user=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
++if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
++ gss_impl="cybersafe"
++else
++ gss_failed=1
++fi
++
++fi
++
++
++ if test "$gss_failed" = "1"; then
++# Restore variables
++ GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
++ CPPFLAGS=$cmu_saved_CPPFLAGS
++
++ if test "$gss_impl" != "auto"; then
++ gss_impl="failed"
++ fi
++ fi
++ fi
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
++ gss_failed=0
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgss... $ECHO_C" >&6; }
++if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lgss -lgss $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char gss_unwrap ();
++int
++main ()
++{
++return gss_unwrap ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_gss_gss_unwrap=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_gss_gss_unwrap=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_gss_unwrap" >&6; }
++if test $ac_cv_lib_gss_gss_unwrap = yes; then
++ gss_impl="seam"
++else
++ gss_failed=1
++fi
++
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ if test "$gss_impl" = "mit"; then
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
++ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
++ elif test "$gss_impl" = "heimdal"; then
++ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
++ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
++ elif test "$gss_impl" = "cybersafe03"; then
++# Version of CyberSafe with two libraries
++ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
++ # there is no static libgss for CyberSafe
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "cybersafe"; then
++ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
++ # there is no static libgss for CyberSafe
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "seam"; then
++ GSSAPIBASE_LIBS=-lgss
++ # there is no static libgss on Solaris 8 and up
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "failed"; then
++ gssapi="no"
++ GSSAPIBASE_LIBS=
++ GSSAPIBASE_STATIC_LIBS=
++ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
++echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
++ else
++ gssapi="no"
++ GSSAPIBASE_LIBS=
++ GSSAPIBASE_STATIC_LIBS=
++ { echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
++echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
++ fi
++fi
++
++#
++# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
++# in gssapi\rfckrb5.h
++#
++if test "$gssapi" != "no"; then
++ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi/gssapi.h>
++ #ifdef GSS_C_NT_HOSTBASED_SERVICE
++ hostbased_service_gss_nt_yes
++ #endif
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
++_ACEOF
++
++else
++ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
++echo "$as_me: WARNING: Cybersafe define not found" >&2;}
++fi
++rm -f conftest*
++
++
++ elif test "$ac_cv_header_gssapi_h" = "yes"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
++_ACEOF
++
++fi
++rm -f conftest*
++
++ elif test "$ac_cv_header_gssapi_gssapi_h"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi/gssapi.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE
++_ACEOF
++
++fi
++rm -f conftest*
++
++ fi
++
++ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi/gssapi.h>
++ #ifdef GSS_C_NT_USER_NAME
++ user_name_yes_gss_nt
++ #endif
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_USER_NAME
++_ACEOF
++
++else
++ { echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
++echo "$as_me: WARNING: Cybersafe define not found" >&2;}
++fi
++rm -f conftest*
++
++ elif test "$ac_cv_header_gssapi_h" = "yes"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_USER_NAME
++_ACEOF
++
++fi
++rm -f conftest*
++
++ elif test "$ac_cv_header_gssapi_gssapi_h"; then
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <gssapi/gssapi.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GSS_C_NT_USER_NAME
++_ACEOF
++
++fi
++rm -f conftest*
++
++ fi
++fi
++
++GSSAPI_LIBS=""
++{ echo "$as_me:$LINENO: checking GSSAPI" >&5
++echo $ECHO_N "checking GSSAPI... $ECHO_C" >&6; }
++if test "$gssapi" != no; then
++ { echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
++echo "${ECHO_T}with implementation ${gss_impl}" >&6; }
++ { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
++if test "${ac_cv_lib_resolv_res_search+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lresolv $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char res_search ();
++int
++main ()
++{
++return res_search ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_resolv_res_search=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_resolv_res_search=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
++if test $ac_cv_lib_resolv_res_search = yes; then
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
++fi
++
++ SASL_MECHS="$SASL_MECHS libgssapiv2.la"
++ SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
++ SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
++
++ cmu_save_LIBS="$LIBS"
++ LIBS="$LIBS $GSSAPIBASE_LIBS"
++
++for ac_func in gsskrb5_register_acceptor_identity
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_$ac_func || defined __stub___$ac_func
++choke me
++#endif
++
++int
++main ()
++{
++return $ac_func ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ eval "$as_ac_var=no"
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++ LIBS="$cmu_save_LIBS"
++else
++ { echo "$as_me:$LINENO: result: disabled" >&5
++echo "${ECHO_T}disabled" >&6; }
++fi
++
++
++
++
++
++
++# Check whether --with-sasl was given.
++if test "${with_sasl+set}" = set; then
++ withval=$with_sasl; with_sasl="$withval"
++else
++ with_sasl="yes"
++fi
++
++
++
++# Check whether --with-staticsasl was given.
++if test "${with_staticsasl+set}" = set; then
++ withval=$with_staticsasl; with_staticsasl="$withval";
++ if test $with_staticsasl != "no"; then
++ using_static_sasl="static"
++ fi
++else
++ with_staticsasl="no"; using_static_sasl="no"
++fi
++
++
++SASLFLAGS=""
++LIB_SASL=""
++
++cmu_saved_CPPFLAGS=$CPPFLAGS
++cmu_saved_LDFLAGS=$LDFLAGS
++cmu_saved_LIBS=$LIBS
++
++if test ${with_staticsasl} != "no"; then
++ if test -d ${with_staticsasl}; then
++ if test -d ${with_staticsasl}/lib64 ; then
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib64
++ else
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib
++ fi
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib
++ ac_cv_sasl_where_inc=${with_staticsasl}/include
++
++ SASLFLAGS="-I$ac_cv_sasl_where_inc"
++ LIB_SASL="-L$ac_cv_sasl_where_lib"
++ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
++ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
++ else
++ with_staticsasl="/usr"
++ fi
++
++ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
++echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sasl/sasl.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
++echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sasl/sasl.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sasl_sasl_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
++
++fi
++if test $ac_cv_header_sasl_sasl_h = yes; then
++ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
++echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sasl/saslutil.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
++echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sasl/saslutil.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
++
++fi
++if test $ac_cv_header_sasl_saslutil_h = yes; then
++ for i42 in lib64 lib; do
++ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
++ ac_cv_found_sasl=yes
++ { echo "$as_me:$LINENO: checking for static libsasl" >&5
++echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6; }
++ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
++ fi
++ done
++ if test ! "$ac_cv_found_sasl" = "yes"; then
++ { echo "$as_me:$LINENO: checking for static libsasl" >&5
++echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6; }
++ { { echo "$as_me:$LINENO: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&5
++echo "$as_me: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++fi
++
++
++fi
++
++
++
++ { echo "$as_me:$LINENO: result: found" >&5
++echo "${ECHO_T}found" >&6; }
++
++ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
++ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
++ else
++ SASL_GSSAPI_LIBS_SET=""
++ cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
++ fi
++fi
++
++if test -d ${with_sasl}; then
++ ac_cv_sasl_where_lib=${with_sasl}/lib
++ ac_cv_sasl_where_inc=${with_sasl}/include
++
++ DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
++ if test "$ac_cv_sasl_where_lib" != ""; then
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL}"
++ else
++ LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
++ fi
++
++ fi
++ LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
++ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
++ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
++fi
++
++# be sure to check for a SASLv2 specific function
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
++echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sasl/sasl.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
++echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sasl/sasl.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sasl/sasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sasl/sasl.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sasl/sasl.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sasl/sasl.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sasl/sasl.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sasl/sasl.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sasl_sasl_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
++
++fi
++if test $ac_cv_header_sasl_sasl_h = yes; then
++ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
++echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <sasl/saslutil.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
++echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <sasl/saslutil.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
++
++fi
++if test $ac_cv_header_sasl_saslutil_h = yes; then
++ { echo "$as_me:$LINENO: checking for prop_get in -lsasl2" >&5
++echo $ECHO_N "checking for prop_get in -lsasl2... $ECHO_C" >&6; }
++if test "${ac_cv_lib_sasl2_prop_get+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsasl2 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char prop_get ();
++int
++main ()
++{
++return prop_get ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_sasl2_prop_get=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_sasl2_prop_get=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_prop_get" >&5
++echo "${ECHO_T}$ac_cv_lib_sasl2_prop_get" >&6; }
++if test $ac_cv_lib_sasl2_prop_get = yes; then
++ ac_cv_found_sasl=yes
++else
++ ac_cv_found_sasl=no
++fi
++
++else
++ ac_cv_found_sasl=no
++fi
++
++
++else
++ ac_cv_found_sasl=no
++fi
++
++
++
++if test "$ac_cv_found_sasl" = "yes"; then
++ if test "$ac_cv_sasl_where_lib" != ""; then
++
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL}"
++ else
++ DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL} $andrew_runpath_switch$ac_cv_sasl_where_lib"
++ fi
++
++ fi
++ DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
++ if test "$using_static_sasl" != "static"; then
++ LIB_SASL=$DYNLIB_SASL
++ SASLFLAGS=$DYNSASLFLAGS
++ fi
++else
++ DYNLIB_SASL=""
++ DYNSASLFLAGS=""
++ using_static_sasl="staticonly"
++fi
++
++if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
++ SASL_GSSAPI_LIBS_SET=""
++ cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
++fi
++
++LIBS="$cmu_saved_LIBS"
++LDFLAGS="$cmu_saved_LDFLAGS"
++CPPFLAGS="$cmu_saved_CPPFLAGS"
++
++
++
++
++
++
++
++if test "$ac_cv_found_sasl" != "yes"; then
++ { { echo "$as_me:$LINENO: error: Cannot continue without libsasl2.
++Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&5
++echo "$as_me: error: Cannot continue without libsasl2.
++Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++cmu_saved_CPPFLAGS=$CPPFLAGS
++CPPFLAGS="$CPPFLAGS $SASLFLAGS"
++
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sasl/sasl.h>
++
++#ifndef SASL_VERSION_MAJOR
++#error SASL_VERSION_MAJOR not defined
++#endif
++#ifndef SASL_VERSION_MINOR
++#error SASL_VERSION_MINOR not defined
++#endif
++#ifndef SASL_VERSION_STEP
++#error SASL_VERSION_STEP not defined
++#endif
++
++#if SASL_VERSION_MAJOR < 2 || SASL_VERSION_MINOR < 1 || SASL_VERSION_STEP < 7
++#error SASL version is less than 2.1.7
++#endif
++
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ { { echo "$as_me:$LINENO: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&5
++echo "$as_me: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++rm -f conftest.err conftest.$ac_ext
++
++CPPFLAGS=$cmu_saved_CPPFLAGS
++
++
++
++cmu_saved_LDFLAGS=$LDFLAGS
++
++LDFLAGS="$LDFLAGS $LIB_SASL"
++
++{ echo "$as_me:$LINENO: checking for sasl_checkapop in -lsasl2" >&5
++echo $ECHO_N "checking for sasl_checkapop in -lsasl2... $ECHO_C" >&6; }
++if test "${ac_cv_lib_sasl2_sasl_checkapop+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsasl2 $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sasl_checkapop ();
++int
++main ()
++{
++return sasl_checkapop ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_sasl2_sasl_checkapop=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_sasl2_sasl_checkapop=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_checkapop" >&5
++echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_checkapop" >&6; }
++if test $ac_cv_lib_sasl2_sasl_checkapop = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_APOP
++_ACEOF
++
++else
++ { { echo "$as_me:$LINENO: error: libsasl2 without working sasl_checkapop. Cannot continue." >&5
++echo "$as_me: error: libsasl2 without working sasl_checkapop. Cannot continue." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++
++LDFLAGS=$cmu_saved_LDFLAGS
++
++
++
++# Check whether --with-perl was given.
++if test "${with_perl+set}" = set; then
++ withval=$with_perl; with_perl="$withval"
++else
++ with_perl="perl"
++fi
++
++
++if test "${with_perl}" = yes; then
++ with_perl="perl"
++fi
++if test "${with_perl}" != no; then
++ if test ${using_static_sasl} = "staticonly"; then
++ { echo "$as_me:$LINENO: WARNING: Cannot compile perl utilities using static libsasl" >&5
++echo "$as_me: WARNING: Cannot compile perl utilities using static libsasl" >&2;}
++ with_perl="no"
++ else
++ for ac_prog in ${with_perl} perl
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_PERL+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$PERL"; then
++ ac_cv_prog_PERL="$PERL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_PERL="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++PERL=$ac_cv_prog_PERL
++if test -n "$PERL"; then
++ { echo "$as_me:$LINENO: result: $PERL" >&5
++echo "${ECHO_T}$PERL" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ test -n "$PERL" && break
++done
++test -n "$PERL" || PERL="with_perl=notfound"
++
++ fi
++fi
++if test "$with_perl" = "notfound"; then
++ { echo "$as_me:$LINENO: WARNING: Perl not found: Administrative tools won't be available" >&5
++echo "$as_me: WARNING: Perl not found: Administrative tools won't be available" >&2;}
++elif test "${with_perl}" != "no"; then
++ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl"
++ PERL_SUBDIRS="imap"
++ PERL="${with_perl}"
++ PERL_CCCDLFLAGS="$cccdlflags"
++
++fi
++
++if test "$sievedir" != "no"; then
++ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile"
++
++ PERL_SUBDIRS="${PERL_SUBDIRS} sieve"
++ PERL_DEPSUBDIRS="sieve"
++ EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile"
++else
++ PERL_DEPSUBDIRS="none"
++fi
++
++{ echo "$as_me:$LINENO: checking for MD5Init" >&5
++echo $ECHO_N "checking for MD5Init... $ECHO_C" >&6; }
++if test "${ac_cv_func_MD5Init+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define MD5Init to an innocuous variant, in case <limits.h> declares MD5Init.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define MD5Init innocuous_MD5Init
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char MD5Init (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef MD5Init
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char MD5Init ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined __stub_MD5Init || defined __stub___MD5Init
++choke me
++#endif
++
++int
++main ()
++{
++return MD5Init ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_MD5Init=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_func_MD5Init=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_func_MD5Init" >&5
++echo "${ECHO_T}$ac_cv_func_MD5Init" >&6; }
++if test $ac_cv_func_MD5Init = yes; then
++ :
++else
++ { echo "$as_me:$LINENO: checking for MD5Init in -lmd" >&5
++echo $ECHO_N "checking for MD5Init in -lmd... $ECHO_C" >&6; }
++if test "${ac_cv_lib_md_MD5Init+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lmd $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char MD5Init ();
++int
++main ()
++{
++return MD5Init ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_md_MD5Init=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_md_MD5Init=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Init" >&5
++echo "${ECHO_T}$ac_cv_lib_md_MD5Init" >&6; }
++if test $ac_cv_lib_md_MD5Init = yes; then
++ LIBS="${LIBS} -lmd"
++else
++ MD5OBJ="md5.o"
++fi
++
++fi
++
++
++
++SNMP_SUBDIRS=""
++
++
++
++# Check whether --with-lib-subdir was given.
++if test "${with_lib_subdir+set}" = set; then
++ withval=$with_lib_subdir;
++fi
++
++{ echo "$as_me:$LINENO: checking for long" >&5
++echo $ECHO_N "checking for long... $ECHO_C" >&6; }
++if test "${ac_cv_type_long+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++typedef long ac__type_new_;
++int
++main ()
++{
++if ((ac__type_new_ *) 0)
++ return 0;
++if (sizeof (ac__type_new_))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_long=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_type_long=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
++echo "${ECHO_T}$ac_cv_type_long" >&6; }
++
++{ echo "$as_me:$LINENO: checking size of long" >&5
++echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
++if test "${ac_cv_sizeof_long+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$ac_cv_type_long" = yes; then
++ # The cast to long int works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ if test "$cross_compiling" = yes; then
++ # Depending upon the size, compute the lo and hi bounds.
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=0 ac_mid=0
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=-1 ac_mid=-1
++ while :; do
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_lo=$ac_mid; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo= ac_hi=
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++# Binary search between lo and hi bounds.
++while test "x$ac_lo" != "x$ac_hi"; do
++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++int
++main ()
++{
++static int test_array @<:@1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)@:>@;
++test_array @<:@0@:>@ = 0
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_hi=$ac_mid
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_lo=`expr '(' $ac_mid ')' + 1`
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++done
++case $ac_lo in
++?*) ac_cv_sizeof_long=$ac_lo;;
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; } ;;
++esac
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ typedef long ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
++@%:@include <stdio.h>
++@%:@include <stdlib.h>
++int
++main ()
++{
++
++ FILE *f = fopen ("conftest.val", "w");
++ if (! f)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
++ {
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%ld\n", i);
++ }
++ else
++ {
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
++ fprintf (f, "%lu\n", i);
++ }
++ return ferror (f) || fclose (f) != 0;
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sizeof_long=`cat conftest.val`
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute sizeof (long)
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f conftest.val
++else
++ ac_cv_sizeof_long=0
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
++cat >>confdefs.h <<_ACEOF
++@%:@define SIZEOF_LONG $ac_cv_sizeof_long
++_ACEOF
++
++
++{ echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
++echo $ECHO_N "checking what directory libraries are found in... $ECHO_C" >&6; }
++if test "${ac_cv_cmu_lib_subdir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
++test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
++if test "X$with_lib_subdir" = "X" ; then
++ ac_cv_cmu_lib_subdir=lib
++ if test $ac_cv_sizeof_long -eq 4 ; then
++ test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
++ fi
++ if test $ac_cv_sizeof_long -eq 8 ; then
++ test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
++ fi
++else
++ ac_cv_cmu_lib_subdir=$with_lib_subdir
++fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
++echo "${ECHO_T}$ac_cv_cmu_lib_subdir" >&6; }
++CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
++
++
++
++
++
++
++# Check whether --with-libwrap was given.
++if test "${with_libwrap+set}" = set; then
++ withval=$with_libwrap; with_libwrap=$withval
++else
++ with_libwrap=yes
++fi
++
++ if test "$with_libwrap" != no; then
++ if test -d "$with_libwrap"; then
++ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
++ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
++ fi
++ cmu_save_LIBS="$LIBS"
++ { echo "$as_me:$LINENO: checking for request_init in -lwrap" >&5
++echo $ECHO_N "checking for request_init in -lwrap... $ECHO_C" >&6; }
++if test "${ac_cv_lib_wrap_request_init+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lwrap ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char request_init ();
++int
++main ()
++{
++return request_init ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_wrap_request_init=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_wrap_request_init=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_request_init" >&5
++echo "${ECHO_T}$ac_cv_lib_wrap_request_init" >&6; }
++if test $ac_cv_lib_wrap_request_init = yes; then
++
++ if test "${ac_cv_header_tcpd_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for tcpd.h" >&5
++echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_tcpd_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
++echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking tcpd.h usability" >&5
++echo $ECHO_N "checking tcpd.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <tcpd.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking tcpd.h presence" >&5
++echo $ECHO_N "checking tcpd.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <tcpd.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: tcpd.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: tcpd.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: tcpd.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: tcpd.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: tcpd.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: tcpd.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: tcpd.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for tcpd.h" >&5
++echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_tcpd_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_tcpd_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
++echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6; }
++
++fi
++if test $ac_cv_header_tcpd_h = yes; then
++ :
++else
++ with_libwrap=no
++fi
++
++
++else
++ with_libwrap=no
++fi
++
++ LIBS="$cmu_save_LIBS"
++ fi
++ { echo "$as_me:$LINENO: checking libwrap support" >&5
++echo $ECHO_N "checking libwrap support... $ECHO_C" >&6; }
++ { echo "$as_me:$LINENO: result: $with_libwrap" >&5
++echo "${ECHO_T}$with_libwrap" >&6; }
++ LIB_WRAP=""
++ if test "$with_libwrap" != no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_LIBWRAP
++_ACEOF
++
++ LIB_WRAP="-lwrap"
++ { echo "$as_me:$LINENO: checking for yp_get_default_domain in -lnsl" >&5
++echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6; }
++if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lnsl $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char yp_get_default_domain ();
++int
++main ()
++{
++return yp_get_default_domain ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_nsl_yp_get_default_domain=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_nsl_yp_get_default_domain=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
++echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6; }
++if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then
++ LIB_WRAP="${LIB_WRAP} -lnsl"
++fi
++
++ fi
++
++
++
++
++
++
++# Check whether --with-snmp was given.
++if test "${with_snmp+set}" = set; then
++ withval=$with_snmp; with_snmp=$withval
++else
++ with_snmp=yes
++fi
++
++
++
++# Check whether --with-ucdsnmp was given.
++if test "${with_ucdsnmp+set}" = set; then
++ withval=$with_ucdsnmp; with_snmp=$withval
++fi
++
++
++if test "$with_snmp" != "no"; then
++
++ if test "$with_snmp" = "yes"; then
++ # Extract the first word of "net-snmp-config", so it can be a program name with args.
++set dummy net-snmp-config; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_path_SNMP_CONFIG+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ case $SNMP_CONFIG in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++as_dummy="/usr/local/bin:$PATH"
++for as_dir in $as_dummy
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_path_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++fi
++SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG
++if test -n "$SNMP_CONFIG"; then
++ { echo "$as_me:$LINENO: result: $SNMP_CONFIG" >&5
++echo "${ECHO_T}$SNMP_CONFIG" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++ else
++ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
++ fi
++
++ if test -x "$SNMP_CONFIG"; then
++ { echo "$as_me:$LINENO: checking NET SNMP libraries" >&5
++echo $ECHO_N "checking NET SNMP libraries... $ECHO_C" >&6; }
++
++ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
++ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
++
++ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
++ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
++ LIB_UCDSNMP=$SNMP_LIBS
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_NETSNMP 1
++_ACEOF
++
++
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
++ else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++ { echo "$as_me:$LINENO: WARNING: Could not find the required paths. Please check your net-snmp installation." >&5
++echo "$as_me: WARNING: Could not find the required paths. Please check your net-snmp installation." >&2;}
++ fi
++ else
++ if test "$with_snmp" != no; then
++ if test -d "$with_snmp"; then
++ CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
++ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
++ fi
++ cmu_save_LIBS="$LIBS"
++ { echo "$as_me:$LINENO: checking for sprint_objid in -lsnmp" >&5
++echo $ECHO_N "checking for sprint_objid in -lsnmp... $ECHO_C" >&6; }
++if test "${ac_cv_lib_snmp_sprint_objid+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsnmp ${LIB_SOCKET} $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char sprint_objid ();
++int
++main ()
++{
++return sprint_objid ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_snmp_sprint_objid=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_snmp_sprint_objid=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_sprint_objid" >&5
++echo "${ECHO_T}$ac_cv_lib_snmp_sprint_objid" >&6; }
++if test $ac_cv_lib_snmp_sprint_objid = yes; then
++
++ if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
++ { echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
++echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
++echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6; }
++else
++ # Is the header compilable?
++{ echo "$as_me:$LINENO: checking ucd-snmp/version.h usability" >&5
++echo $ECHO_N "checking ucd-snmp/version.h usability... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++@%:@include <ucd-snmp/version.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ echo "$as_me:$LINENO: checking ucd-snmp/version.h presence" >&5
++echo $ECHO_N "checking ucd-snmp/version.h presence... $ECHO_C" >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++@%:@include <ucd-snmp/version.h>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&2;}
++
++ ;;
++esac
++{ echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
++echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_ucd_snmp_version_h=$ac_header_preproc
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
++echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6; }
++
++fi
++if test $ac_cv_header_ucd_snmp_version_h = yes; then
++ :
++else
++ with_snmp=no
++fi
++
++
++else
++ with_snmp=no
++fi
++
++ LIBS="$cmu_save_LIBS"
++ fi
++ { echo "$as_me:$LINENO: checking UCD SNMP libraries" >&5
++echo $ECHO_N "checking UCD SNMP libraries... $ECHO_C" >&6; }
++ { echo "$as_me:$LINENO: result: $with_snmp" >&5
++echo "${ECHO_T}$with_snmp" >&6; }
++ LIB_UCDSNMP=""
++ if test "$with_snmp" != no; then
++
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_UCDSNMP 1
++_ACEOF
++
++ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
++ { echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpm" >&5
++echo $ECHO_N "checking for rpmdbOpen in -lrpm... $ECHO_C" >&6; }
++if test "${ac_cv_lib_rpm_rpmdbOpen+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrpm -lpopt $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char rpmdbOpen ();
++int
++main ()
++{
++return rpmdbOpen ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_rpm_rpmdbOpen=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_lib_rpm_rpmdbOpen=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbOpen" >&5
++echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbOpen" >&6; }
++if test $ac_cv_lib_rpm_rpmdbOpen = yes; then
++ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"
++fi
++
++ fi
++
++ fi
++fi
++
++
++
++# Figure out what directories we're linking against.
++# Lots of fun for the whole family.
++# This probably chokes on anything with spaces in it.
++# All we want is the list of -L directories, and -L may or may not be
++# followed by a space.
++isdir=no
++libpath=""
++#echo "debug ldflags: << ${ldflags} >>"
++#echo "debug default_ldflags: << ${default_ldflags} >>"
++for flag in ${ldflags} ${default_ldflags}; do
++ case $flag in
++ -L)
++ # it's a split -L option, we'll mark the next option as a dir.
++ isdir=yes
++ ;;
++
++ -L*)
++ # attached -L option: split off the directory
++ larg=`echo $flag | sed -e 's:-L\(..*\):\1:'`
++ libpath="${libpath} ${larg}"
++ ;;
++
++ *)
++ if test $isdir = yes ; then
++ libpath="${libpath} ${flag}"
++ isdir=no
++ fi
++ esac
++done
++
++IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
++IMAP_LIBS="${LIB_SASL} ${LIBS}"
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
++
++cat >confcache <<\_ACEOF
++# This file is a shell script that caches the results of configure
++# tests run on this system so they can be shared between configure
++# scripts and configure runs, see configure's option --config-cache.
++# It is not useful on other systems. If it contains results you don't
++# want to keep, you may remove or edit it.
++#
++# config.status only pays attention to the cache file if you give it
++# the --recheck option to rerun configure.
++#
++# `ac_cv_env_foo' variables (set or unset) will be overridden when
++# loading this file, other *unset* `ac_cv_foo' will be assigned the
++# following values.
++
++_ACEOF
++
++# The following way of writing the cache mishandles newlines in values,
++# but we know of no workaround that is simple, portable, and efficient.
++# So, we kill variables containing newlines.
++# Ultrix sh set writes to stderr and can't be redirected directly,
++# and sets the high bit in the cache file unless we assign to the vars.
++(
++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ *) $as_unset $ac_var ;;
++ esac ;;
++ esac
++ done
++
++ (set) 2>&1 |
++ case $as_nl`(ac_space=' '; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
++ # `set' does not quote correctly, so add quotes (double-quote
++ # substitution turns \\\\ into \\, and sed turns \\ into \).
++ sed -n \
++ "s/'/'\\\\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++ ;; #(
++ *)
++ # `set' quotes correctly as required by POSIX, so do not add quotes.
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++ ;;
++ esac |
++ sort
++) |
++ sed '
++ /^ac_cv_env_/b end
++ t clear
++ :clear
++ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++ t end
++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++ :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++ if test -w "$cache_file"; then
++ test "x$cache_file" != "x/dev/null" &&
++ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
++echo "$as_me: updating cache $cache_file" >&6;}
++ cat confcache >$cache_file
++ else
++ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
++echo "$as_me: not updating unwritable cache $cache_file" >&6;}
++ fi
++fi
++rm -f confcache
++
++test "x$prefix" = xNONE && prefix=$ac_default_prefix
++# Let make expand exec_prefix.
++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
++
++DEFS=-DHAVE_CONFIG_H
++
++ac_libobjs=
++ac_ltlibobjs=
++for ac_i in : $LIB@&t at OBJS; do test "x$ac_i" = x: && continue
++ # 1. Remove the extension, and $U if already installed.
++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
++ ac_i=`echo "$ac_i" | sed "$ac_script"`
++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
++ # will be set to the directory where LIBOBJS objects are built.
++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
++done
++LIB@&t at OBJS=$ac_libobjs
++
++LTLIBOBJS=$ac_ltlibobjs
++
++
++
++: ${CONFIG_STATUS=./config.status}
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files $CONFIG_STATUS"
++{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
++echo "$as_me: creating $CONFIG_STATUS" >&6;}
++cat >$CONFIG_STATUS <<_ACEOF
++#! $SHELL
++# Generated by $as_me.
++# Run this file to recreate the current configuration.
++# Compiler output produced by configure, useful for debugging
++# configure, is in config.log if it exists.
++
++debug=false
++ac_cs_recheck=false
++ac_cs_silent=false
++SHELL=\${CONFIG_SHELL-$SHELL}
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++## --------------------- ##
++## M4sh Initialization. ##
++## --------------------- ##
++
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++
++# PATH needs CR
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
++# Support unset when possible.
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++as_nl='
++'
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ { (exit 1); exit 1; }
++fi
++
++# Work around bugs in pre-3.0 UWIN ksh.
++for as_var in ENV MAIL MAILPATH
++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++done
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++ fi
++done
++
++# Required to use basename.
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
++ as_basename=basename
++else
++ as_basename=false
++fi
++
++
++# Name of the executable.
++as_me=`$as_basename -- "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++
++# CDPATH.
++$as_unset CDPATH
++
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
++
++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
++ # uniformly replaced by the line number. The first 'sed' inserts a
++ # line-number line after each line using $LINENO; the second 'sed'
++ # does the real work. The second script uses 'N' to pair each
++ # line-number line with the line containing $LINENO, and appends
++ # trailing '-' during substitution so that $LINENO is not a special
++ # case at line end.
++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
++ # scripts with optimization help from Paolo Bonzini. Blame Lee
++ # E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
++ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
++ N
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
++ t loop
++ s/-\n.*//
++ ' >$as_me.lineno &&
++ chmod +x "$as_me.lineno" ||
++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
++ { (exit 1); exit 1; }; }
++
++ # Don't try to exec as it changes $[0], causing all sort of problems
++ # (the dirname of $[0] is not the place where we might find the
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
++ # Exit status is that of the last command.
++ exit
++}
++
++
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in
++-n*)
++ case `echo 'x\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ *) ECHO_C='\c';;
++ esac;;
++*)
++ ECHO_N='-n';;
++esac
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir
++fi
++echo >conf$$.file
++if ln -s conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++ as_ln_s='cp -p'
++elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++else
++ as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
++
++if mkdir -p . 2>/dev/null; then
++ as_mkdir_p=:
++else
++ test -d ./-p && rmdir ./-p
++ as_mkdir_p=false
++fi
++
++# Find out whether ``test -x'' works. Don't use a zero-byte file, as
++# systems may use methods other than mode bits to determine executability.
++cat >conf$$.file <<_ASEOF
++#! /bin/sh
++exit 0
++_ASEOF
++chmod +x conf$$.file
++if test -x conf$$.file >/dev/null 2>&1; then
++ as_executable_p="test -x"
++else
++ as_executable_p=:
++fi
++rm -f conf$$.file
++
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
++
++# Sed expression to map a string onto a valid variable name.
++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
++
++
++exec 6>&1
++
++# Save the log message, to keep $[0] and so on meaningful, and to
++# report actual input values of CONFIG_FILES etc. instead of their
++# values after options handling.
++ac_log="
++This file was extended by $as_me, which was
++generated by GNU Autoconf 2.60. Invocation command line was
++
++ CONFIG_FILES = $CONFIG_FILES
++ CONFIG_HEADERS = $CONFIG_HEADERS
++ CONFIG_LINKS = $CONFIG_LINKS
++ CONFIG_COMMANDS = $CONFIG_COMMANDS
++ $ $0 $@
++
++on `(hostname || uname -n) 2>/dev/null | sed 1q`
++"
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<_ACEOF
++# Files that config.status was made for.
++config_files="$ac_config_files"
++config_headers="$ac_config_headers"
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++ac_cs_usage="\
++\`$as_me' instantiates files from templates according to the
++current configuration.
++
++Usage: $0 [OPTIONS] [FILE]...
++
++ -h, --help print this help, then exit
++ -V, --version print version number, then exit
++ -q, --quiet do not print progress messages
++ -d, --debug don't remove temporary files
++ --recheck update $as_me by reconfiguring in the same conditions
++ --file=FILE[:TEMPLATE]
++ instantiate the configuration file FILE
++ --header=FILE[:TEMPLATE]
++ instantiate the configuration header FILE
++
++Configuration files:
++$config_files
++
++Configuration headers:
++$config_headers
++
++Report bugs to <bug-autoconf at gnu.org>."
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++ac_cs_version="\\
++config.status
++configured by $0, generated by GNU Autoconf 2.60,
++ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
++
++Copyright (C) 2006 Free Software Foundation, Inc.
++This config.status script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it."
++
++ac_pwd='$ac_pwd'
++srcdir='$srcdir'
++INSTALL='$INSTALL'
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++# If no file are specified by the user, then we need to provide default
++# value. By we need to know if files were specified by the user.
++ac_need_defaults=:
++while test $# != 0
++do
++ case $1 in
++ --*=*)
++ ac_option=`expr "X$1" : 'X\([^=]*\)='`
++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
++ ac_shift=:
++ ;;
++ *)
++ ac_option=$1
++ ac_optarg=$2
++ ac_shift=shift
++ ;;
++ esac
++
++ case $ac_option in
++ # Handling of the options.
++ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++ ac_cs_recheck=: ;;
++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
++ echo "$ac_cs_version"; exit ;;
++ --debug | --debu | --deb | --de | --d | -d )
++ debug=: ;;
++ --file | --fil | --fi | --f )
++ $ac_shift
++ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
++ ac_need_defaults=false;;
++ --header | --heade | --head | --hea )
++ $ac_shift
++ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
++ ac_need_defaults=false;;
++ --he | --h)
++ # Conflict between --help and --header
++ { echo "$as_me: error: ambiguous option: $1
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; };;
++ --help | --hel | -h )
++ echo "$ac_cs_usage"; exit ;;
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil | --si | --s)
++ ac_cs_silent=: ;;
++
++ # This is an error.
++ -*) { echo "$as_me: error: unrecognized option: $1
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; } ;;
++
++ *) ac_config_targets="$ac_config_targets $1"
++ ac_need_defaults=false ;;
++
++ esac
++ shift
++done
++
++ac_configure_extra_args=
++
++if $ac_cs_silent; then
++ exec 6>/dev/null
++ ac_configure_extra_args="$ac_configure_extra_args --silent"
++fi
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++if \$ac_cs_recheck; then
++ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
++ CONFIG_SHELL=$SHELL
++ export CONFIG_SHELL
++ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++fi
++
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++exec 5>>config.log
++{
++ echo
++ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
++@%:@@%:@ Running $as_me. @%:@@%:@
++_ASBOX
++ echo "$ac_log"
++} >&5
++
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++
++# Handling of arguments.
++for ac_config_target in $ac_config_targets
++do
++ case $ac_config_target in
++ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
++ "master/Makefile") CONFIG_FILES="$CONFIG_FILES master/Makefile" ;;
++ "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
++ "imap/Makefile") CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;;
++ "imtest/Makefile") CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;;
++ "netnews/Makefile") CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;;
++ "perl/Makefile") CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;;
++ "$EXTRA_OUTPUT") CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++
++ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
++echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
++ { (exit 1); exit 1; }; };;
++ esac
++done
++
++
++# If the user did not use the arguments to specify the items to instantiate,
++# then the envvar interface is used. Set only those that are not.
++# We use the long form for the default assignment because of an extremely
++# bizarre bug on SunOS 4.1.3.
++if $ac_need_defaults; then
++ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
++ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
++fi
++
++# Have a temporary directory for convenience. Make it in the build tree
++# simply because there is no reason against having it here, and in addition,
++# creating and moving files from /tmp can sometimes cause problems.
++# Hook for its removal unless debugging.
++# Note that there is a small window in which the directory will not be cleaned:
++# after its creation but before its name has been assigned to `$tmp'.
++$debug ||
++{
++ tmp=
++ trap 'exit_status=$?
++ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
++' 0
++ trap '{ (exit 1); exit 1; }' 1 2 13 15
++}
++# Create a (secure) tmp directory for tmp files.
++
++{
++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
++ test -n "$tmp" && test -d "$tmp"
++} ||
++{
++ tmp=./conf$$-$RANDOM
++ (umask 077 && mkdir "$tmp")
++} ||
++{
++ echo "$me: cannot create a temporary directory in ." >&2
++ { (exit 1); exit 1; }
++}
++
++#
++# Set up the sed scripts for CONFIG_FILES section.
++#
++
++# No need to generate the scripts if there are no CONFIG_FILES.
++# This happens for instance when ./config.status config.h
++if test -n "$CONFIG_FILES"; then
++
++_ACEOF
++
++
++
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ cat >conf$$subs.sed <<_ACEOF
++SHELL!$SHELL$ac_delim
++PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
++PACKAGE_NAME!$PACKAGE_NAME$ac_delim
++PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
++PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
++PACKAGE_STRING!$PACKAGE_STRING$ac_delim
++PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
++exec_prefix!$exec_prefix$ac_delim
++prefix!$prefix$ac_delim
++program_transform_name!$program_transform_name$ac_delim
++bindir!$bindir$ac_delim
++sbindir!$sbindir$ac_delim
++libexecdir!$libexecdir$ac_delim
++datarootdir!$datarootdir$ac_delim
++datadir!$datadir$ac_delim
++sysconfdir!$sysconfdir$ac_delim
++sharedstatedir!$sharedstatedir$ac_delim
++localstatedir!$localstatedir$ac_delim
++includedir!$includedir$ac_delim
++oldincludedir!$oldincludedir$ac_delim
++docdir!$docdir$ac_delim
++infodir!$infodir$ac_delim
++htmldir!$htmldir$ac_delim
++dvidir!$dvidir$ac_delim
++pdfdir!$pdfdir$ac_delim
++psdir!$psdir$ac_delim
++libdir!$libdir$ac_delim
++localedir!$localedir$ac_delim
++mandir!$mandir$ac_delim
++DEFS!$DEFS$ac_delim
++ECHO_C!$ECHO_C$ac_delim
++ECHO_N!$ECHO_N$ac_delim
++ECHO_T!$ECHO_T$ac_delim
++LIBS!$LIBS$ac_delim
++build_alias!$build_alias$ac_delim
++host_alias!$host_alias$ac_delim
++target_alias!$target_alias$ac_delim
++build!$build$ac_delim
++build_cpu!$build_cpu$ac_delim
++build_vendor!$build_vendor$ac_delim
++build_os!$build_os$ac_delim
++host!$host$ac_delim
++host_cpu!$host_cpu$ac_delim
++host_vendor!$host_vendor$ac_delim
++host_os!$host_os$ac_delim
++WARNERROR!$WARNERROR$ac_delim
++MAKEDEPEND!$MAKEDEPEND$ac_delim
++cyrus_prefix!$cyrus_prefix$ac_delim
++service_path!$service_path$ac_delim
++cyrus_user!$cyrus_user$ac_delim
++cyrus_group!$cyrus_group$ac_delim
++CC!$CC$ac_delim
++CFLAGS!$CFLAGS$ac_delim
++LDFLAGS!$LDFLAGS$ac_delim
++CPPFLAGS!$CPPFLAGS$ac_delim
++ac_ct_CC!$ac_ct_CC$ac_delim
++EXEEXT!$EXEEXT$ac_delim
++OBJEXT!$OBJEXT$ac_delim
++RANLIB!$RANLIB$ac_delim
++SET_MAKE!$SET_MAKE$ac_delim
++INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
++INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
++INSTALL_DATA!$INSTALL_DATA$ac_delim
++CPP!$CPP$ac_delim
++GREP!$GREP$ac_delim
++EGREP!$EGREP$ac_delim
++AWK!$AWK$ac_delim
++LIB@&t at OBJS!$LIB@&t at OBJS$ac_delim
++LIB_SOCKET!$LIB_SOCKET$ac_delim
++IPV6_OBJS!$IPV6_OBJS$ac_delim
++PRE_SUBDIRS!$PRE_SUBDIRS$ac_delim
++EXTRA_SUBDIRS!$EXTRA_SUBDIRS$ac_delim
++DEPLIBS!$DEPLIBS$ac_delim
++LOCALDEFS!$LOCALDEFS$ac_delim
++BDB_INC!$BDB_INC$ac_delim
++BDB_LIB!$BDB_LIB$ac_delim
++CYRUSDB_OBJS!$CYRUSDB_OBJS$ac_delim
++SIEVE_OBJS!$SIEVE_OBJS$ac_delim
++SIEVE_LIBS!$SIEVE_LIBS$ac_delim
++SIEVE_CPPFLAGS!$SIEVE_CPPFLAGS$ac_delim
++YACC!$YACC$ac_delim
++YFLAGS!$YFLAGS$ac_delim
++LEX!$LEX$ac_delim
++LEXLIB!$LEXLIB$ac_delim
++LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim
++SIEVE_SUBDIRS!$SIEVE_SUBDIRS$ac_delim
++WITH_NONBLOCK!$WITH_NONBLOCK$ac_delim
++WITH_GMTOFF!$WITH_GMTOFF$ac_delim
++WITH_MAP!$WITH_MAP$ac_delim
++WITH_LOCK!$WITH_LOCK$ac_delim
++cyrus_sigveclib!$cyrus_sigveclib$ac_delim
++AFS_LIBS!$AFS_LIBS$ac_delim
++AFS_LDFLAGS!$AFS_LDFLAGS$ac_delim
++LDAP_CPPFLAGS!$LDAP_CPPFLAGS$ac_delim
++LDAP_LDFLAGS!$LDAP_LDFLAGS$ac_delim
++LDAP_LIBS!$LDAP_LIBS$ac_delim
++SERVER_SUBDIRS!$SERVER_SUBDIRS$ac_delim
++_ACEOF
++
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
++ break
++ elif $ac_last_try; then
++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
++ { (exit 1); exit 1; }; }
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++ fi
++done
++
++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
++if test -n "$ac_eof"; then
++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
++ ac_eof=`expr $ac_eof + 1`
++fi
++
++cat >>$CONFIG_STATUS <<_ACEOF
++cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
++_ACEOF
++sed '
++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
++s/^/s,@/; s/!/@,|#_!!_#|/
++:n
++t n
++s/'"$ac_delim"'$/,g/; t
++s/$/\\/; p
++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
++' >>$CONFIG_STATUS <conf$$subs.sed
++rm -f conf$$subs.sed
++cat >>$CONFIG_STATUS <<_ACEOF
++CEOF$ac_eof
++_ACEOF
++
++
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ cat >conf$$subs.sed <<_ACEOF
++OPENSSL_INC!$OPENSSL_INC$ac_delim
++OPENSSL_LIB!$OPENSSL_LIB$ac_delim
++ZEPHYR_LIBS!$ZEPHYR_LIBS$ac_delim
++ZEPHYR_CPPFLAGS!$ZEPHYR_CPPFLAGS$ac_delim
++IMAP_PROGS!$IMAP_PROGS$ac_delim
++COMPILE_ET!$COMPILE_ET$ac_delim
++COM_ERR_LIBS!$COM_ERR_LIBS$ac_delim
++COM_ERR_LDFLAGS!$COM_ERR_LDFLAGS$ac_delim
++COM_ERR_CPPFLAGS!$COM_ERR_CPPFLAGS$ac_delim
++LIB_CRYPT!$LIB_CRYPT$ac_delim
++GSSAPI_LIBS!$GSSAPI_LIBS$ac_delim
++GSSAPIBASE_LIBS!$GSSAPIBASE_LIBS$ac_delim
++LIB_DYN_SASL!$LIB_DYN_SASL$ac_delim
++DYNSASLFLAGS!$DYNSASLFLAGS$ac_delim
++LIB_SASL!$LIB_SASL$ac_delim
++SASLFLAGS!$SASLFLAGS$ac_delim
++PERL!$PERL$ac_delim
++PERL_CCCDLFLAGS!$PERL_CCCDLFLAGS$ac_delim
++MD5OBJ!$MD5OBJ$ac_delim
++SNMP_SUBDIRS!$SNMP_SUBDIRS$ac_delim
++CMU_LIB_SUBDIR!$CMU_LIB_SUBDIR$ac_delim
++LIB_WRAP!$LIB_WRAP$ac_delim
++SNMP_CONFIG!$SNMP_CONFIG$ac_delim
++LIB_UCDSNMP!$LIB_UCDSNMP$ac_delim
++LIB_RT!$LIB_RT$ac_delim
++IMAP_COM_ERR_LIBS!$IMAP_COM_ERR_LIBS$ac_delim
++IMAP_LIBS!$IMAP_LIBS$ac_delim
++PERL_SUBDIRS!$PERL_SUBDIRS$ac_delim
++PERL_DEPSUBDIRS!$PERL_DEPSUBDIRS$ac_delim
++LTLIBOBJS!$LTLIBOBJS$ac_delim
++_ACEOF
++
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
++ break
++ elif $ac_last_try; then
++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
++ { (exit 1); exit 1; }; }
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++ fi
++done
++
++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
++if test -n "$ac_eof"; then
++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
++ ac_eof=`expr $ac_eof + 1`
++fi
++
++cat >>$CONFIG_STATUS <<_ACEOF
++cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
++_ACEOF
++sed '
++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
++s/^/s,@/; s/!/@,|#_!!_#|/
++:n
++t n
++s/'"$ac_delim"'$/,g/; t
++s/$/\\/; p
++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
++' >>$CONFIG_STATUS <conf$$subs.sed
++rm -f conf$$subs.sed
++cat >>$CONFIG_STATUS <<_ACEOF
++:end
++s/|#_!!_#|//g
++CEOF$ac_eof
++_ACEOF
++
++
++# VPATH may cause trouble with some makes, so we remove $(srcdir),
++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# trailing colons and then remove the whole line if VPATH becomes empty
++# (actually we leave an empty line to preserve line numbers).
++if test "x$srcdir" = x.; then
++ ac_vpsub='/^[ ]*VPATH[ ]*=/{
++s/:*\$(srcdir):*/:/
++s/:*\${srcdir}:*/:/
++s/:*@srcdir@:*/:/
++s/^\([^=]*=[ ]*\):*/\1/
++s/:*$//
++s/^[^=]*=[ ]*$//
++}'
++fi
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++fi # test -n "$CONFIG_FILES"
++
++
++for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
++do
++ case $ac_tag in
++ :[FHLC]) ac_mode=$ac_tag; continue;;
++ esac
++ case $ac_mode$ac_tag in
++ :[FHL]*:*);;
++ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
++echo "$as_me: error: Invalid tag $ac_tag." >&2;}
++ { (exit 1); exit 1; }; };;
++ :[FH]-) ac_tag=-:-;;
++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
++ esac
++ ac_save_IFS=$IFS
++ IFS=:
++ set x $ac_tag
++ IFS=$ac_save_IFS
++ shift
++ ac_file=$1
++ shift
++
++ case $ac_mode in
++ :L) ac_source=$1;;
++ :[FH])
++ ac_file_inputs=
++ for ac_f
++ do
++ case $ac_f in
++ -) ac_f="$tmp/stdin";;
++ *) # Look for the file first in the build tree, then in the source tree
++ # (if the path is not absolute). The absolute path cannot be DOS-style,
++ # because $ac_f cannot contain `:'.
++ test -f "$ac_f" ||
++ case $ac_f in
++ [\\/$]*) false;;
++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
++ esac ||
++ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
++echo "$as_me: error: cannot find input file: $ac_f" >&2;}
++ { (exit 1); exit 1; }; };;
++ esac
++ ac_file_inputs="$ac_file_inputs $ac_f"
++ done
++
++ # Let's still pretend it is `configure' which instantiates (i.e., don't
++ # use $as_me), people would be surprised to read:
++ # /* config.h. Generated by config.status. */
++ configure_input="Generated from "`IFS=:
++ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
++ if test x"$ac_file" != x-; then
++ configure_input="$ac_file. $configure_input"
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ fi
++
++ case $ac_tag in
++ *:-:* | *:-) cat >"$tmp/stdin";;
++ esac
++ ;;
++ esac
++
++ ac_dir=`$as_dirname -- "$ac_file" ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$ac_file" : 'X\(//\)[^/]' \| \
++ X"$ac_file" : 'X\(//\)$' \| \
++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
++echo X"$ac_file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ { as_dir="$ac_dir"
++ case $as_dir in #(
++ -*) as_dir=./$as_dir;;
++ esac
++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
++ as_dirs=
++ while :; do
++ case $as_dir in #(
++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
++ *) as_qdir=$as_dir;;
++ esac
++ as_dirs="'$as_qdir' $as_dirs"
++ as_dir=`$as_dirname -- "$as_dir" ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
++echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ test -d "$as_dir" && break
++ done
++ test -z "$as_dirs" || eval "mkdir $as_dirs"
++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
++echo "$as_me: error: cannot create directory $as_dir" >&2;}
++ { (exit 1); exit 1; }; }; }
++ ac_builddir=.
++
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
++
++case $srcdir in
++ .) # We are building in place.
++ ac_srcdir=.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
++esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
++
++
++ case $ac_mode in
++ :F)
++ #
++ # CONFIG_FILE
++ #
++
++ case $INSTALL in
++ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
++ esac
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++# If the template does not know about datarootdir, expand it.
++# FIXME: This hack should be removed a few years after 2.60.
++ac_datarootdir_hack=; ac_datarootdir_seen=
++
++case `sed -n '/datarootdir/ {
++ p
++ q
++}
++/@datadir@/p
++/@docdir@/p
++/@infodir@/p
++/@localedir@/p
++/@mandir@/p
++' $ac_file_inputs` in
++*datarootdir*) ac_datarootdir_seen=yes;;
++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
++ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
++echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++ ac_datarootdir_hack='
++ s&@datadir@&$datadir&g
++ s&@docdir@&$docdir&g
++ s&@infodir@&$infodir&g
++ s&@localedir@&$localedir&g
++ s&@mandir@&$mandir&g
++ s&\\\${datarootdir}&$datarootdir&g' ;;
++esac
++_ACEOF
++
++# Neutralize VPATH when `$srcdir' = `.'.
++# Shell code in configure.ac might set extrasub.
++# FIXME: do we really want to maintain this feature?
++cat >>$CONFIG_STATUS <<_ACEOF
++ sed "$ac_vpsub
++$extrasub
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++:t
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
++s&@configure_input@&$configure_input&;t t
++s&@top_builddir@&$ac_top_builddir_sub&;t t
++s&@srcdir@&$ac_srcdir&;t t
++s&@abs_srcdir@&$ac_abs_srcdir&;t t
++s&@top_srcdir@&$ac_top_srcdir&;t t
++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
++s&@builddir@&$ac_builddir&;t t
++s&@abs_builddir@&$ac_abs_builddir&;t t
++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
++s&@INSTALL@&$ac_INSTALL&;t t
++$ac_datarootdir_hack
++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
++
++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
++ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
++ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined." >&5
++echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined." >&2;}
++
++ rm -f "$tmp/stdin"
++ case $ac_file in
++ -) cat "$tmp/out"; rm -f "$tmp/out";;
++ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
++ esac
++ ;;
++ :H)
++ #
++ # CONFIG_HEADER
++ #
++_ACEOF
++
++# Transform confdefs.h into a sed script `conftest.defines', that
++# substitutes the proper values into config.h.in to produce config.h.
++rm -f conftest.defines conftest.tail
++# First, append a space to every undef/define line, to ease matching.
++echo 's/$/ /' >conftest.defines
++# Then, protect against being on the right side of a sed subst, or in
++# an unquoted here document, in config.status. If some macros were
++# called several times there might be several #defines for the same
++# symbol, which is useless. But do not sort them, since the last
++# AC_DEFINE must be honored.
++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
++# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
++# NAME is the cpp macro being defined, VALUE is the value it is being given.
++# PARAMS is the parameter list in the macro definition--in most cases, it's
++# just an empty string.
++ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
++ac_dB='\\)[ (].*,\\1define\\2'
++ac_dC=' '
++ac_dD=' ,'
++
++uniq confdefs.h |
++ sed -n '
++ t rset
++ :rset
++ s/^[ ]*#[ ]*define[ ][ ]*//
++ t ok
++ d
++ :ok
++ s/[\\&,]/\\&/g
++ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
++ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
++ ' >>conftest.defines
++
++# Remove the space that was appended to ease matching.
++# Then replace #undef with comments. This is necessary, for
++# example, in the case of _POSIX_SOURCE, which is predefined and required
++# on some systems where configure will not decide to define it.
++# (The regexp can be short, since the line contains either #define or #undef.)
++echo 's/ $//
++s,^[ #]*u.*,/* & */,' >>conftest.defines
++
++# Break up conftest.defines:
++ac_max_sed_lines=50
++
++# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
++# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
++# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
++# et cetera.
++ac_in='$ac_file_inputs'
++ac_out='"$tmp/out1"'
++ac_nxt='"$tmp/out2"'
++
++while :
++do
++ # Write a here document:
++ cat >>$CONFIG_STATUS <<_ACEOF
++ # First, check the format of the line:
++ cat >"\$tmp/defines.sed" <<\\CEOF
++/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
++/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
++b
++:def
++_ACEOF
++ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
++ echo 'CEOF
++ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
++ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
++ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
++ grep . conftest.tail >/dev/null || break
++ rm -f conftest.defines
++ mv conftest.tail conftest.defines
++done
++rm -f conftest.defines conftest.tail
++
++echo "ac_result=$ac_in" >>$CONFIG_STATUS
++cat >>$CONFIG_STATUS <<\_ACEOF
++ if test x"$ac_file" != x-; then
++ echo "/* $configure_input */" >"$tmp/config.h"
++ cat "$ac_result" >>"$tmp/config.h"
++ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
++ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
++echo "$as_me: $ac_file is unchanged" >&6;}
++ else
++ rm -f $ac_file
++ mv "$tmp/config.h" $ac_file
++ fi
++ else
++ echo "/* $configure_input */"
++ cat "$ac_result"
++ fi
++ rm -f "$tmp/out12"
++ ;;
++
++
++ esac
++
++done # for ac_tag
++
++
++{ (exit 0); exit 0; }
++_ACEOF
++chmod +x $CONFIG_STATUS
++ac_clean_files=$ac_clean_files_save
++
++
++# configure is writing to config.log, and then calls config.status.
++# config.status does its own redirection, appending to config.log.
++# Unfortunately, on DOS this fails, as config.log is still kept open
++# by configure, so config.status won't be able to write to it; its
++# output is simply discarded. So we exec the FD to /dev/null,
++# effectively closing config.log, so it can be properly (re)opened and
++# appended to by config.status. When coming back to configure, we
++# need to make the FD available again.
++if test "$no_create" != yes; then
++ ac_cs_success=:
++ ac_config_status_args=
++ test "$silent" = yes &&
++ ac_config_status_args="$ac_config_status_args --quiet"
++ exec 5>/dev/null
++ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
++ exec 5>>config.log
++ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
++ # would make configure fail if this is the last instruction.
++ $ac_cs_success || { (exit 1); exit 1; }
++fi
++
+diff -urNad cyrus-imapd-2.3.7~/autom4te.cache/requests cyrus-imapd-2.3.7/autom4te.cache/requests
+--- cyrus-imapd-2.3.7~/autom4te.cache/requests 1970-01-01 01:00:00.000000000 +0100
++++ cyrus-imapd-2.3.7/autom4te.cache/requests 2006-08-11 17:29:39.000000000 +0200
+@@ -0,0 +1,321 @@
++# This file was generated by Autom4te Mon Jul 10 17:33:12 PDT 2006.
++# It contains the lists of macros which have been traced.
++# It can be safely removed.
++
++ at request = (
++ bless( [
++ '0',
++ 1,
++ [
++ '/usr/share/autoconf'
++ ],
++ [
++ '/usr/share/autoconf/autoconf/autoconf.m4f',
++ '/usr/share/aclocal/isc-posix.m4',
++ 'cmulocal/afs.m4',
++ 'cmulocal/berkdb.m4',
++ 'cmulocal/bsd_sockets.m4',
++ 'cmulocal/c-attribute.m4',
++ 'cmulocal/c-fpic.m4',
++ 'cmulocal/common.m4',
++ 'cmulocal/cyrus.m4',
++ 'cmulocal/ipv6.m4',
++ 'cmulocal/kerberos_v4.m4',
++ 'cmulocal/libssl.m4',
++ 'cmulocal/libwrap.m4',
++ 'cmulocal/sasl2.m4',
++ 'cmulocal/ucdsnmp.m4',
++ 'configure.in'
++ ],
++ {
++ 'CMU_USE_DB' => 1,
++ 'AC_TYPE_OFF_T' => 1,
++ 'AC_C_VOLATILE' => 1,
++ 'AC_FUNC_CLOSEDIR_VOID' => 1,
++ 'CMU_DB_LIB_WHERE' => 1,
++ 'AC_REPLACE_FNMATCH' => 1,
++ 'AC_DEFUN' => 1,
++ 'AC_PROG_LIBTOOL' => 1,
++ 'AC_FUNC_STAT' => 1,
++ 'AC_FUNC_WAIT3' => 1,
++ 'AM_AUTOMAKE_VERSION' => 1,
++ 'AC_STRUCT_TM' => 1,
++ 'AC_FUNC_LSTAT' => 1,
++ 'AC_FUNC_STRTOD' => 1,
++ 'AC_CHECK_HEADERS' => 1,
++ 'CMU_LIBSSL_LIB_WHERE1' => 1,
++ 'AC_FUNC_STRNLEN' => 1,
++ 'AC_PROG_CXX' => 1,
++ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
++ 'CMU_KRB4_32_DEFN' => 1,
++ 'AC_PROG_AWK' => 1,
++ '_m4_warn' => 1,
++ 'CMU_LIBSSL_LIB_WHERE' => 1,
++ 'AC_HEADER_MAJOR' => 1,
++ 'CYRUS_BERKELEY_DB_CHK_LIB' => 1,
++ 'CMU_SASL2_REQUIRE_VER' => 1,
++ 'CMU_KRB_INC_WHERE' => 1,
++ 'AC_PROG_GCC_TRADITIONAL' => 1,
++ 'IPv6_CHECK_FUNC' => 1,
++ 'AC_LIBSOURCE' => 1,
++ 'AC_STRUCT_ST_BLOCKS' => 1,
++ 'AM_PROG_FC_C_O' => 1,
++ '_AM_SUBST_NOTMAKE' => 1,
++ 'AC_CONFIG_AUX_DIR' => 1,
++ 'AC_PROG_MAKE_SET' => 1,
++ 'sinclude' => 1,
++ 'AC_FUNC_STRERROR_R' => 1,
++ 'CMU_GUESS_RUNPATH_SWITCH' => 1,
++ 'AC_FUNC_FORK' => 1,
++ 'AC_DECL_SYS_SIGLIST' => 1,
++ 'CMU_KRB_INC_WHERE1' => 1,
++ 'AC_FUNC_VPRINTF' => 1,
++ 'AU_DEFUN' => 1,
++ 'CYRUS_BERKELEY_DB_OPTS' => 1,
++ 'IPv6_CHECK_SOCKLEN_T' => 1,
++ 'AC_INIT' => 1,
++ 'AC_STRUCT_TIMEZONE' => 1,
++ 'CMU_AFS' => 1,
++ 'AC_SUBST' => 1,
++ 'AC_FUNC_ALLOCA' => 1,
++ 'IPv6_CHECK_SA_LEN' => 1,
++ 'CMU_LIBSSL' => 1,
++ 'AC_CANONICAL_HOST' => 1,
++ 'AC_PROG_RANLIB' => 1,
++ 'CMU_UCDSNMP' => 1,
++ 'AC_FUNC_SETPGRP' => 1,
++ 'AC_CONFIG_SUBDIRS' => 1,
++ 'AC_FUNC_MMAP' => 1,
++ 'AC_TYPE_SIZE_T' => 1,
++ 'IPv6_CHECK_SS_FAMILY' => 1,
++ 'AC_CHECK_TYPES' => 1,
++ 'LT_SUPPORTED_TAG' => 1,
++ 'AC_CHECK_MEMBERS' => 1,
++ 'AC_DEFUN_ONCE' => 1,
++ 'AC_FUNC_UTIME_NULL' => 1,
++ 'AC_FUNC_SELECT_ARGTYPES' => 1,
++ 'CMU_AFS_WHERE' => 1,
++ 'AC_HEADER_STAT' => 1,
++ 'AC_FUNC_STRFTIME' => 1,
++ 'CMU_LIBSSL_INC_WHERE1' => 1,
++ 'AC_C_INLINE' => 1,
++ 'CMU_C___ATTRIBUTE__' => 1,
++ 'AC_CONFIG_FILES' => 1,
++ 'include' => 1,
++ 'AM_GNU_GETTEXT' => 1,
++ 'AC_FUNC_OBSTACK' => 1,
++ 'CMU_KRB_LIB_WHERE1' => 1,
++ 'AC_CHECK_LIB' => 1,
++ 'AC_FUNC_MALLOC' => 1,
++ 'CMU_TEST_INCPATH' => 1,
++ 'AC_FUNC_GETGROUPS' => 1,
++ 'CMU_ADD_LIBPATH' => 1,
++ 'AC_FC_FREEFORM' => 1,
++ 'AC_FUNC_GETLOADAVG' => 1,
++ 'AC_FUNC_FSEEKO' => 1,
++ 'AM_PROG_CC_C_O' => 1,
++ 'CMU_CHECK_HEADER_NOCACHE' => 1,
++ 'SASL_GSSAPI_CHK' => 1,
++ 'AM_CONDITIONAL' => 1,
++ 'AC_FUNC_MKTIME' => 1,
++ 'CYRUS_BERKELEY_DB_CHK' => 1,
++ 'AC_HEADER_SYS_WAIT' => 1,
++ 'AC_PROG_LN_S' => 1,
++ 'AC_FUNC_MEMCMP' => 1,
++ 'm4_include' => 1,
++ 'AC_HEADER_DIRENT' => 1,
++ '_LT_AC_TAGCONFIG' => 1,
++ 'AM_PROG_F77_C_O' => 1,
++ 'CMU_KRB_RD_REQ_PROTO' => 1,
++ 'm4_pattern_forbid' => 1,
++ 'AC_CANONICAL_TARGET' => 1,
++ 'AC_CONFIG_LIBOBJ_DIR' => 1,
++ 'CMU_FIND_LIB_SUBDIR' => 1,
++ 'AC_HEADER_TIME' => 1,
++ 'CMU_SOCKETS' => 1,
++ 'AC_FUNC_GETMNTENT' => 1,
++ 'AC_TYPE_MODE_T' => 1,
++ 'LT_CONFIG_LTDL_DIR' => 1,
++ 'm4_sinclude' => 1,
++ 'CMU_ADD_LIBPATH_TO' => 1,
++ 'AC_PATH_X' => 1,
++ 'CMU_DB3_LIB_WHERE1' => 1,
++ 'CMU_AFS_LIB_WHERE1' => 1,
++ 'CMU_SASL2_REQUIRED' => 1,
++ 'AC_HEADER_STDC' => 1,
++ 'AM_PROG_CXX_C_O' => 1,
++ 'CMU_TEST_LIBPATH' => 1,
++ 'LT_INIT' => 1,
++ 'CMU_AFS_INC_WHERE1' => 1,
++ 'AC_FUNC_ERROR_AT_LINE' => 1,
++ 'CMU_LIBSSL_INC_WHERE' => 1,
++ 'AC_FUNC_MBRTOWC' => 1,
++ 'AC_CANONICAL_BUILD' => 1,
++ 'AC_TYPE_SIGNAL' => 1,
++ 'SASL2_CRYPT_CHK' => 1,
++ 'AC_TYPE_UID_T' => 1,
++ 'm4_pattern_allow' => 1,
++ 'AC_DEFINE_TRACE_LITERAL' => 1,
++ 'CMU_KRB_SET_KEY_PROTO' => 1,
++ 'AC_PROG_CC' => 1,
++ 'AC_FUNC_STRCOLL' => 1,
++ 'AC_PROG_YACC' => 1,
++ 'AC_SUBST_TRACE' => 1,
++ 'AC_FUNC_CHOWN' => 1,
++ 'AC_FC_SRCEXT' => 1,
++ 'AC_FUNC_GETPGRP' => 1,
++ 'CMU_DB_INC_WHERE' => 1,
++ 'AM_INIT_AUTOMAKE' => 1,
++ 'CMU_DB4_LIB_WHERE1' => 1,
++ 'SASL_SET_GSSAPI_LIBS' => 1,
++ 'AC_FUNC_REALLOC' => 1,
++ 'AC_REQUIRE_AUX_FILE' => 1,
++ 'AC_CONFIG_LINKS' => 1,
++ 'CMU_KRB_LIB_WHERE' => 1,
++ 'CMU_KRB_SENDAUTH_PROTO' => 1,
++ 'AM_MAINTAINER_MODE' => 1,
++ 'CMU_SASL2' => 1,
++ 'CMU_DB_INC_WHERE1' => 1,
++ 'AC_PROG_CPP' => 1,
++ 'AC_C_CONST' => 1,
++ 'AC_PROG_LEX' => 1,
++ 'AC_TYPE_PID_T' => 1,
++ 'CMU_LIBWRAP' => 1,
++ 'AC_FUNC_SETVBUF_REVERSED' => 1,
++ 'AC_PROG_INSTALL' => 1,
++ 'CMU_SASL2_CHECKAPOP_REQUIRED' => 1,
++ 'CMU_C_FPIC' => 1,
++ 'AH_OUTPUT' => 1,
++ 'CMU_KRB4' => 1,
++ 'AC_ISC_POSIX' => 1,
++ 'AC_CANONICAL_SYSTEM' => 1,
++ 'AC_CONFIG_HEADERS' => 1,
++ 'AC_CHECK_FUNCS' => 1,
++ 'CMU_NEEDS_AFS' => 1
++ }
++ ], 'Autom4te::Request' ),
++ bless( [
++ '1',
++ 1,
++ [
++ '/usr/share/autoconf'
++ ],
++ [
++ '/usr/share/autoconf/autoconf/autoconf.m4f',
++ 'aclocal.m4',
++ 'configure.in'
++ ],
++ {
++ 'AM_PROG_F77_C_O' => 1,
++ '_LT_AC_TAGCONFIG' => 1,
++ 'm4_pattern_forbid' => 1,
++ 'AC_CANONICAL_TARGET' => 1,
++ 'AC_CONFIG_LIBOBJ_DIR' => 1,
++ 'AC_C_VOLATILE' => 1,
++ 'AC_TYPE_OFF_T' => 1,
++ 'AC_FUNC_CLOSEDIR_VOID' => 1,
++ 'AC_REPLACE_FNMATCH' => 1,
++ 'AC_PROG_LIBTOOL' => 1,
++ 'AC_FUNC_STAT' => 1,
++ 'AC_FUNC_WAIT3' => 1,
++ 'AC_HEADER_TIME' => 1,
++ 'AC_FUNC_LSTAT' => 1,
++ 'AC_STRUCT_TM' => 1,
++ 'AM_AUTOMAKE_VERSION' => 1,
++ 'AC_FUNC_GETMNTENT' => 1,
++ 'AC_TYPE_MODE_T' => 1,
++ 'AC_CHECK_HEADERS' => 1,
++ 'AC_FUNC_STRTOD' => 1,
++ 'LT_CONFIG_LTDL_DIR' => 1,
++ 'AC_FUNC_STRNLEN' => 1,
++ 'm4_sinclude' => 1,
++ 'AC_PROG_CXX' => 1,
++ 'AC_PATH_X' => 1,
++ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
++ 'AC_PROG_AWK' => 1,
++ '_m4_warn' => 1,
++ 'AC_HEADER_STDC' => 1,
++ 'AC_HEADER_MAJOR' => 1,
++ 'AM_PROG_CXX_C_O' => 1,
++ 'LT_INIT' => 1,
++ 'AC_FUNC_ERROR_AT_LINE' => 1,
++ 'AC_PROG_GCC_TRADITIONAL' => 1,
++ 'AC_LIBSOURCE' => 1,
++ 'AC_FUNC_MBRTOWC' => 1,
++ 'AC_STRUCT_ST_BLOCKS' => 1,
++ 'AC_TYPE_SIGNAL' => 1,
++ 'AC_CANONICAL_BUILD' => 1,
++ 'AM_PROG_FC_C_O' => 1,
++ 'AC_TYPE_UID_T' => 1,
++ 'AC_PROG_MAKE_SET' => 1,
++ 'AC_CONFIG_AUX_DIR' => 1,
++ '_AM_SUBST_NOTMAKE' => 1,
++ 'm4_pattern_allow' => 1,
++ 'sinclude' => 1,
++ 'AC_DEFINE_TRACE_LITERAL' => 1,
++ 'AC_FUNC_STRERROR_R' => 1,
++ 'AC_PROG_CC' => 1,
++ 'AC_FUNC_FORK' => 1,
++ 'AC_DECL_SYS_SIGLIST' => 1,
++ 'AC_FUNC_STRCOLL' => 1,
++ 'AC_FUNC_VPRINTF' => 1,
++ 'AC_PROG_YACC' => 1,
++ 'AC_SUBST_TRACE' => 1,
++ 'AC_INIT' => 1,
++ 'AC_STRUCT_TIMEZONE' => 1,
++ 'AC_FUNC_CHOWN' => 1,
++ 'AC_SUBST' => 1,
++ 'AC_FUNC_ALLOCA' => 1,
++ 'AC_FC_SRCEXT' => 1,
++ 'AC_CANONICAL_HOST' => 1,
++ 'AC_FUNC_GETPGRP' => 1,
++ 'AC_PROG_RANLIB' => 1,
++ 'AC_FUNC_SETPGRP' => 1,
++ 'AM_INIT_AUTOMAKE' => 1,
++ 'AC_CONFIG_SUBDIRS' => 1,
++ 'AC_FUNC_MMAP' => 1,
++ 'AC_FUNC_REALLOC' => 1,
++ 'AC_TYPE_SIZE_T' => 1,
++ 'AC_CHECK_TYPES' => 1,
++ 'AC_CONFIG_LINKS' => 1,
++ 'AC_REQUIRE_AUX_FILE' => 1,
++ 'LT_SUPPORTED_TAG' => 1,
++ 'AC_CHECK_MEMBERS' => 1,
++ 'AM_MAINTAINER_MODE' => 1,
++ 'AC_FUNC_UTIME_NULL' => 1,
++ 'AC_FUNC_SELECT_ARGTYPES' => 1,
++ 'AC_HEADER_STAT' => 1,
++ 'AC_FUNC_STRFTIME' => 1,
++ 'AC_PROG_CPP' => 1,
++ 'AC_C_INLINE' => 1,
++ 'AC_PROG_LEX' => 1,
++ 'AC_C_CONST' => 1,
++ 'AC_TYPE_PID_T' => 1,
++ 'AC_CONFIG_FILES' => 1,
++ 'include' => 1,
++ 'AC_FUNC_SETVBUF_REVERSED' => 1,
++ 'AC_PROG_INSTALL' => 1,
++ 'AM_GNU_GETTEXT' => 1,
++ 'AC_FUNC_OBSTACK' => 1,
++ 'AC_CHECK_LIB' => 1,
++ 'AC_FUNC_MALLOC' => 1,
++ 'AC_FUNC_GETGROUPS' => 1,
++ 'AC_FUNC_GETLOADAVG' => 1,
++ 'AC_FC_FREEFORM' => 1,
++ 'AH_OUTPUT' => 1,
++ 'AC_FUNC_FSEEKO' => 1,
++ 'AM_PROG_CC_C_O' => 1,
++ 'AC_FUNC_MKTIME' => 1,
++ 'AC_CANONICAL_SYSTEM' => 1,
++ 'AM_CONDITIONAL' => 1,
++ 'AC_CONFIG_HEADERS' => 1,
++ 'AC_HEADER_SYS_WAIT' => 1,
++ 'AC_PROG_LN_S' => 1,
++ 'AC_FUNC_MEMCMP' => 1,
++ 'm4_include' => 1,
++ 'AC_HEADER_DIRENT' => 1,
++ 'AC_CHECK_FUNCS' => 1
++ }
++ ], 'Autom4te::Request' )
++ );
++
+diff -urNad cyrus-imapd-2.3.7~/autom4te.cache/traces.0 cyrus-imapd-2.3.7/autom4te.cache/traces.0
+--- cyrus-imapd-2.3.7~/autom4te.cache/traces.0 1970-01-01 01:00:00.000000000 +0100
++++ cyrus-imapd-2.3.7/autom4te.cache/traces.0 2006-08-11 17:29:39.000000000 +0200
+@@ -0,0 +1,3310 @@
++m4trace:/usr/share/aclocal/isc-posix.m4:24: -1- AC_DEFUN([AC_ISC_POSIX], [
++ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
++ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
++
++])
++m4trace:cmulocal/afs.m4:19: -1- AC_DEFUN([CMU_AFS_INC_WHERE1], [
++cmu_save_CPPFLAGS=$CPPFLAGS
++CPPFLAGS="$cmu_save_CPPFLAGS -I$1"
++AC_TRY_COMPILE([#include <afs/param.h>],
++[#ifndef SYS_NAME
++choke me
++#endif
++int foo;],
++ac_cv_found_afs_inc=yes,
++ac_cv_found_afs_inc=no)
++CPPFLAGS=$cmu_save_CPPFLAGS
++])
++m4trace:cmulocal/afs.m4:31: -1- AC_DEFUN([CMU_AFS_LIB_WHERE1], [
++save_LIBS="$LIBS"
++save_LDFLAGS="$LDFLAGS"
++
++LIBS="-lauth $1/afs/util.a $LIB_SOCKET $LIBS"
++LDFLAGS="-L$1 -L$1/afs $LDFLAGS"
++dnl suppress caching
++AC_TRY_LINK([],[afsconf_Open();], ac_cv_found_afs_lib=yes, ac_cv_found_afs_lib=no)
++LIBS="$save_LIBS"
++LDFLAGS="$save_LDFLAGS"
++])
++m4trace:cmulocal/afs.m4:54: -1- AC_DEFUN([CMU_AFS_WHERE], [
++AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
++ for i in $1; do
++ AC_MSG_CHECKING(for AFS in $i)
++ CMU_AFS_INC_WHERE1("$i/include")
++ ac_cv_found_lwp_inc=$ac_cv_found_afs_inc
++ CMU_TEST_INCPATH($i/include, lwp)
++ ac_cv_found_afs_inc=$ac_cv_found_lwp_inc
++ if test "$ac_cv_found_afs_inc" = "yes"; then
++ CMU_AFS_LIB_WHERE1("$i/$CMU_LIB_SUBDIR")
++ if test "$ac_cv_found_afs_lib" = "yes"; then
++ ac_cv_afs_where=$i
++ AC_MSG_RESULT(found)
++ break
++ else
++ AC_MSG_RESULT(not found)
++ fi
++ else
++ AC_MSG_RESULT(not found)
++ fi
++ done
++])
++m4trace:cmulocal/afs.m4:308: -1- AC_DEFUN([CMU_AFS], [
++AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
++AC_REQUIRE([CMU_SOCKETS])
++AC_REQUIRE([CMU_LIBSSL])
++AC_ARG_WITH(AFS,
++ [ --with-afs=PREFIX Compile with AFS support],
++ [if test "X$with_AFS" = "X"; then
++ with_AFS=yes
++ fi])
++
++ if test "X$with_AFS" != "X"; then
++ ac_cv_afs_where=$with_AFS
++ fi
++ if test "X$ac_cv_afs_where" = "X"; then
++ CMU_AFS_WHERE(/usr/afsws /usr/local /usr/athena /Library/OpenAFS/Tools)
++ fi
++
++ AC_MSG_CHECKING(whether to include AFS)
++ if test "X$ac_cv_afs_where" = "Xno" -o "X$ac_cv_afs_where" = "X"; then
++ ac_cv_found_afs=no
++ AC_MSG_RESULT(no)
++ else
++ ac_cv_found_afs=yes
++ AC_MSG_RESULT(yes)
++ AFS_INC_DIR="$ac_cv_afs_where/include"
++ AFS_LIB_DIR="$ac_cv_afs_where/$CMU_LIB_SUBDIR"
++ AFS_TOP_DIR="$ac_cv_afs_where"
++ AFS_INC_FLAGS="-I${AFS_INC_DIR}"
++ AFS_LIB_FLAGS="-L${AFS_LIB_DIR} -L${AFS_LIB_DIR}/afs"
++ cmu_save_LIBS="$LIBS"
++ cmu_save_CPPFLAGS="$CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS ${AFS_INC_FLAGS}"
++ cmu_save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$cmu_save_LDFLAGS ${AFS_LIB_FLAGS}"
++
++ AC_CHECK_HEADERS(afs/stds.h)
++
++ AC_MSG_CHECKING([if libdes is needed])
++ AC_TRY_LINK([],[des_quad_cksum();],AFS_DES_LIB="",AFS_DES_LIB="maybe")
++ if test "X$AFS_DES_LIB" != "X"; then
++ LIBS="$cmu_save_LIBS -ldes"
++ AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="yes")
++ if test "X$AFS_DES_LIB" = "Xyes"; then
++ AC_MSG_RESULT([yes])
++ AFS_LIBDES="-ldes"
++ AFS_LIBDESA="${AFS_LIB_DIR}/libdes.a"
++ else
++ LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
++ AC_TRY_LINK([],
++ [des_quad_cksum();],AFS_DES_LIB="libcrypto")
++ if test "X$AFS_DES_LIB" = "Xlibcrypto"; then
++ AC_MSG_RESULT([libcrypto])
++ AFS_LIBDES="$LIBSSL_LIB_FLAGS"
++ AFS_LIBDESA="$LIBSSL_LIB_FLAGS"
++ else
++ LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
++ AC_TRY_LINK([],
++ [des_quad_cksum();],AFS_DES_LIB="libcrypto+descompat")
++ if test "X$AFS_DES_LIB" = "Xlibcrypto+descompat"; then
++ AC_MSG_RESULT([libcrypto+descompat])
++ AFS_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
++ AFS_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
++ else
++ AC_MSG_RESULT([unknown])
++ AC_MSG_ERROR([Could not use -ldes])
++ fi
++ fi
++ fi
++ else
++ AC_MSG_RESULT([no])
++ fi
++
++
++ AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
++ AFS_KTC_LIBS_STATIC="${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
++ AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
++ AFS_RX_LIBS="-lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
++ AFS_KTC_LIBS="-lauth ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcom_err ${AFS_LIB_DIR}/afs/util.a"
++
++ LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
++ AC_CHECK_FUNC(des_pcbc_init)
++ if test "X$ac_cv_func_des_pcbc_init" != "Xyes"; then
++ AC_CHECK_LIB(descompat, des_pcbc_init, AFS_DESCOMPAT_LIB="-ldescompat")
++ if test "X$AFS_DESCOMPAT_LIB" != "X" ; then
++ AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_DESCOMPAT_LIB"
++ AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_DESCOMPAT_LIB"
++ AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_DESCOMPAT_LIB"
++ AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_DESCOMPAT_LIB"
++ else
++
++ AC_MSG_CHECKING([if rxkad needs des_pcbc_init])
++ AC_TRY_LINK(,[tkt_DecodeTicket();],RXKAD_PROBLEM=no,RXKAD_PROBLEM=maybe)
++ if test "$RXKAD_PROBLEM" = "maybe"; then
++ AC_TRY_LINK([int des_pcbc_init() { return 0;}],
++ [tkt_DecodeTicket();],RXKAD_PROBLEM=yes,RXKAD_PROBLEM=error)
++ if test "$RXKAD_PROBLEM" = "yes"; then
++ AC_MSG_RESULT([yes])
++ AC_MSG_ERROR([cannot use rxkad])
++ else
++ AC_MSG_RESULT([unknown])
++ AC_MSG_ERROR([Unknown error testing rxkad])
++ fi
++ else
++ AC_MSG_RESULT([no])
++ fi
++ fi
++ fi
++
++ LIBS="$cmu_save_LIBS"
++ AC_CHECK_FUNC(flock)
++ LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
++ if test "X$ac_cv_func_flock" != "Xyes"; then
++ AC_MSG_CHECKING([if AFS needs flock])
++ AC_TRY_LINK([#include <afs/param.h>
++#ifdef HAVE_AFS_STDS_H
++#include <afs/stds.h>
++#endif
++#include <ubik.h>
++#include <afs/cellconfig.h>
++#include <afs/auth.h>
++#include <afs/volser.h>
++struct ubik_client * cstruct;
++int sigvec() {return 0;}
++extern int UV_SetSecurity();],
++ [vsu_ClientInit(1,"","",0,
++ &cstruct,UV_SetSecurity)],
++ AFS_FLOCK=no,AFS_FLOCK=yes)
++ if test $AFS_FLOCK = "no"; then
++ AC_MSG_RESULT([no])
++ else
++ AC_MSG_RESULT([yes])
++ LDFLAGS="$LDFLAGS -L/usr/ucblib"
++ AC_CHECK_LIB(ucb, flock,:, [AC_CHECK_LIB(BSD, flock)])
++ fi
++ fi
++ LIBS="$cmu_save_LIBS"
++ AC_CHECK_FUNC(sigvec)
++ LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
++ if test "X$ac_cv_func_sigvec" != "Xyes"; then
++ AC_MSG_CHECKING([if AFS needs sigvec])
++ AC_TRY_LINK([#include <afs/param.h>
++#ifdef HAVE_AFS_STDS_H
++#include <afs/stds.h>
++#endif
++#include <ubik.h>
++#include <afs/cellconfig.h>
++#include <afs/auth.h>
++#include <afs/volser.h>
++struct ubik_client * cstruct;
++int flock() {return 0;}
++extern int UV_SetSecurity();],
++ [vsu_ClientInit(1,"","",0,
++ &cstruct,UV_SetSecurity)],
++ AFS_SIGVEC=no,AFS_SIGVEC=yes)
++ if test $AFS_SIGVEC = "no"; then
++ AC_MSG_RESULT([no])
++ else
++ AC_MSG_RESULT([yes])
++ LDFLAGS="$LDFLAGS -L/usr/ucblib"
++ AC_CHECK_LIB(ucb, sigvec,:,[AC_CHECK_LIB(BSD, sigvec)])
++ fi
++ fi
++ if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
++ AFS_LIB_FLAGS="${AFS_LIB_FLAGS} -L/usr/ucblib -R/usr/ucblib"
++ fi
++ if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
++ AFS_BSD_LIB="-lucb"
++ elif test "$ac_cv_lib_BSD_flock" = "yes" -o "$ac_cv_lib_BSD_sigvec" = "yes"; then
++ AFS_BSD_LIB="-lBSD"
++ fi
++ if test "X$AFS_BSD_LIB" != "X" ; then
++ AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_BSD_LIB"
++ AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_BSD_LIB"
++ AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
++ AFS_RX_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
++ AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_BSD_LIB"
++ fi
++
++ AC_MSG_CHECKING([if libaudit is needed])
++ AFS_LIBAUDIT=""
++ LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
++ AC_TRY_LINK([#include <afs/param.h>
++#ifdef HAVE_AFS_STDS_H
++#include <afs/stds.h>
++#endif
++#include <afs/cellconfig.h>
++#include <afs/auth.h>],
++ [afsconf_SuperUser();],AFS_AUDIT_LIB="",AFS_AUDIT_LIB="maybe")
++ if test "X$AFS_AUDIT_LIB" != "X"; then
++ LIBS="$cmu_save_LIBS -lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB $LIB_SOCKET"
++ AC_TRY_LINK([#include <afs/param.h>
++#ifdef HAVE_AFS_STDS_H
++#include <afs/stds.h>
++#endif
++#include <afs/cellconfig.h>
++#include <afs/auth.h>],
++ [afsconf_SuperUser();],AFS_AUDIT_LIB="yes")
++ if test "X$AFS_AUDIT_LIB" = "Xyes"; then
++ AC_MSG_RESULT([yes])
++ AFS_LIBAUDIT="-laudit"
++ AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libaudit.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
++ AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
++ AFS_RX_LIBS="-lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
++ else
++ AC_MSG_RESULT([unknown])
++ AC_MSG_ERROR([Could not use -lauth while testing for -laudit])
++ fi
++ else
++ AC_MSG_RESULT([no])
++ fi
++
++ AC_CHECK_FUNCS(VL_ProbeServer)
++ AC_MSG_CHECKING([if new-style afs_ integer types are defined])
++ AC_CACHE_VAL(ac_cv_afs_int32,
++dnl The next few lines contain a quoted argument to egrep
++dnl It is critical that there be no leading or trailing whitespace
++dnl or newlines
++[AC_EGREP_CPP(dnl
++changequote(<<,>>)dnl
++<<(^|[^a-zA-Z_0-9])afs_int32[^a-zA-Z_0-9]>>dnl
++changequote([,]), [#include <afs/param.h>
++#ifdef HAVE_AFS_STDS_H
++#include <afs/stds.h>
++#endif],
++ac_cv_afs_int32=yes, ac_cv_afs_int32=no)])
++ AC_MSG_RESULT($ac_cv_afs_int32)
++ if test $ac_cv_afs_int32 = yes ; then
++ AC_DEFINE(HAVE_AFS_INT32,, [AFS provides new "unambiguous" type names])
++ else
++ AC_DEFINE(afs_int16, int16, [it's a type definition])
++ AC_DEFINE(afs_int32, int32, [it's a type definition])
++ AC_DEFINE(afs_uint16, u_int16, [it's a type definition])
++ AC_DEFINE(afs_uint32, u_int32, [it's a type definition])
++ fi
++
++ CPPFLAGS="${cmu_save_CPPFLAGS}"
++ LDFLAGS="${cmu_save_LDFLAGS}"
++ LIBS="${cmu_save_LIBS}"
++ AC_DEFINE(AFS_ENV,, [Use AFS. (find what needs this and nuke it)])
++ AC_DEFINE(AFS,, [Use AFS. (find what needs this and nuke it)])
++ AC_SUBST(AFS_CLIENT_LIBS_STATIC)
++ AC_SUBST(AFS_KTC_LIBS_STATIC)
++ AC_SUBST(AFS_CLIENT_LIBS)
++ AC_SUBST(AFS_RX_LIBS)
++ AC_SUBST(AFS_KTC_LIBS)
++ AC_SUBST(AFS_INC_FLAGS)
++ AC_SUBST(AFS_LIB_FLAGS)
++ AC_SUBST(AFS_TOP_DIR)
++ AC_SUBST(AFS_LIBAUDIT)
++ AC_SUBST(AFS_LIBDES)
++ AC_SUBST(AFS_LIBDESA)
++ fi
++ ])
++m4trace:cmulocal/afs.m4:314: -1- AC_DEFUN([CMU_NEEDS_AFS], [AC_REQUIRE([CMU_AFS])
++if test "$ac_cv_found_afs" != "yes"; then
++ AC_ERROR([Cannot continue without AFS])
++fi])
++m4trace:cmulocal/berkdb.m4:13: -1- AC_DEFUN([CMU_DB_INC_WHERE1], [
++saved_CPPFLAGS=$CPPFLAGS
++CPPFLAGS="$saved_CPPFLAGS -I$1"
++AC_TRY_COMPILE([#include <db.h>],
++[DB *db;
++db_create(&db, NULL, 0);
++db->open(db, "foo.db", NULL, DB_UNKNOWN, DB_RDONLY, 0644);],
++ac_cv_found_db_inc=yes,
++ac_cv_found_db_inc=no)
++CPPFLAGS=$saved_CPPFLAGS
++])
++m4trace:cmulocal/berkdb.m4:28: -1- AC_DEFUN([CMU_DB_INC_WHERE], [
++ for i in $1; do
++ AC_MSG_CHECKING(for db headers in $i)
++ CMU_DB_INC_WHERE1($i)
++ CMU_TEST_INCPATH($i, db)
++ if test "$ac_cv_found_db_inc" = "yes"; then
++ ac_cv_db_where_inc=$i
++ AC_MSG_RESULT(found)
++ break
++ else
++ AC_MSG_RESULT(not found)
++ fi
++ done
++])
++m4trace:cmulocal/berkdb.m4:44: -1- AC_DEFUN([CMU_DB3_LIB_WHERE1], [
++AC_REQUIRE([CMU_AFS])
++AC_REQUIRE([CMU_KRB4])
++saved_LIBS=$LIBS
++ LIBS="$saved_LIBS -L$1 -ldb-3"
++AC_TRY_LINK([#include <db.h>],
++[db_env_create(NULL, 0);],
++[ac_cv_found_db_3_lib=yes],
++ac_cv_found_db_3_lib=no)
++LIBS=$saved_LIBS
++])
++m4trace:cmulocal/berkdb.m4:55: -1- AC_DEFUN([CMU_DB4_LIB_WHERE1], [
++AC_REQUIRE([CMU_AFS])
++AC_REQUIRE([CMU_KRB4])
++saved_LIBS=$LIBS
++LIBS="$saved_LIBS -L$1 -ldb-4"
++AC_TRY_LINK([#include <db.h>],
++[db_env_create(NULL, 0);],
++[ac_cv_found_db_4_lib=yes],
++ac_cv_found_db_4_lib=no)
++LIBS=$saved_LIBS
++])
++m4trace:cmulocal/berkdb.m4:77: -1- AC_DEFUN([CMU_DB_LIB_WHERE], [
++ for i in $1; do
++ AC_MSG_CHECKING(for db libraries in $i)
++if test "$enable_db4" = "yes"; then
++ CMU_DB4_LIB_WHERE1($i)
++ CMU_TEST_LIBPATH($i, [db-4])
++ ac_cv_found_db_lib=$ac_cv_found_db_4_lib
++else
++ CMU_DB3_LIB_WHERE1($i)
++ CMU_TEST_LIBPATH($i, [db-3])
++ ac_cv_found_db_lib=$ac_cv_found_db_3_lib
++fi
++ if test "$ac_cv_found_db_lib" = "yes" ; then
++ ac_cv_db_where_lib=$i
++ AC_MSG_RESULT(found)
++ break
++ else
++ AC_MSG_RESULT(not found)
++ fi
++ done
++])
++m4trace:cmulocal/berkdb.m4:178: -1- AC_DEFUN([CMU_USE_DB], [
++AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
++AC_ARG_WITH(db,
++ [ --with-db=PREFIX Compile with db support],
++ [if test "X$with_db" = "X"; then
++ with_db=yes
++ fi])
++AC_ARG_WITH(db-lib,
++ [ --with-db-lib=dir use db libraries in dir],
++ [if test "$withval" = "yes" -o "$withval" = "no"; then
++ AC_MSG_ERROR([No argument for --with-db-lib])
++ fi])
++AC_ARG_WITH(db-include,
++ [ --with-db-include=dir use db headers in dir],
++ [if test "$withval" = "yes" -o "$withval" = "no"; then
++ AC_MSG_ERROR([No argument for --with-db-include])
++ fi])
++AC_ARG_ENABLE(db4,
++ [ --enable-db4 use db 4.x libraries])
++
++ if test "X$with_db" != "X"; then
++ if test "$with_db" != "yes"; then
++ ac_cv_db_where_lib=$with_db/$CMU_LIB_SUBDIR
++ ac_cv_db_where_inc=$with_db/include
++ fi
++ fi
++
++ if test "X$with_db_lib" != "X"; then
++ ac_cv_db_where_lib=$with_db_lib
++ fi
++ if test "X$ac_cv_db_where_lib" = "X"; then
++ CMU_DB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
++ fi
++
++ if test "X$with_db_include" != "X"; then
++ ac_cv_db_where_inc=$with_db_include
++ fi
++ if test "X$ac_cv_db_where_inc" = "X"; then
++ CMU_DB_INC_WHERE(/usr/athena/include /usr/local/include)
++ fi
++
++ AC_MSG_CHECKING(whether to include db)
++ if test "X$ac_cv_db_where_lib" = "X" -o "X$ac_cv_db_where_inc" = "X"; then
++ ac_cv_found_db=no
++ AC_MSG_RESULT(no)
++ else
++ ac_cv_found_db=yes
++ AC_MSG_RESULT(yes)
++ DB_INC_DIR=$ac_cv_db_where_inc
++ DB_LIB_DIR=$ac_cv_db_where_lib
++ DB_INC_FLAGS="-I${DB_INC_DIR}"
++ if test "$enable_db4" = "yes"; then
++ DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-4"
++ else
++ DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-3"
++ fi
++ dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
++ dnl Allow makefile substitutions....
++ AC_SUBST(DB_INC_FLAGS)
++ AC_SUBST(DB_LIB_FLAGS)
++ if test "X$RPATH" = "X"; then
++ RPATH=""
++ fi
++ case "${host}" in
++ *-*-linux*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-rpath,${DB_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${DB_LIB_DIR}"
++ fi
++ ;;
++ *-*-hpux*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,+b${DB_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${DB_LIB_DIR}"
++ fi
++ ;;
++ *-*-irix*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-rpath,${DB_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${DB_LIB_DIR}"
++ fi
++ ;;
++ *-*-solaris2*)
++ if test "$ac_cv_prog_gcc" = yes; then
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-R${DB_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${DB_LIB_DIR}"
++ fi
++ else
++ RPATH="${RPATH} -R${DB_LIB_DIR}"
++ fi
++ ;;
++ esac
++ AC_SUBST(RPATH)
++ fi
++ ])
++m4trace:cmulocal/berkdb.m4:235: -1- AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB], [
++ BDB_SAVE_LDFLAGS=$LDFLAGS
++
++ if test -d $with_bdb_lib; then
++ CMU_ADD_LIBPATH_TO($with_bdb_lib, LDFLAGS)
++ CMU_ADD_LIBPATH_TO($with_bdb_lib, BDB_LIBADD)
++ else
++ BDB_LIBADD=""
++ fi
++
++ saved_LIBS=$LIBS
++ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
++ do
++ LIBS="$saved_LIBS -l$dbname"
++ AC_TRY_LINK([#include <db.h>],
++ [db_create(NULL, NULL, 0);],
++ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db,
++ dblib="no")
++ if test "$dblib" = "berkeley"; then break; fi
++ done
++ if test "$dblib" = "no"; then
++ LIBS="$saved_LIBS -ldb"
++ AC_TRY_LINK([#include <db.h>],
++ [db_open(NULL, 0, 0, 0, NULL, NULL, NULL);],
++ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db,
++ dblib="no")
++ fi
++ LIBS=$saved_LIBS
++
++ LDFLAGS=$BDB_SAVE_LDFLAGS
++])
++m4trace:cmulocal/berkdb.m4:247: -1- AC_DEFUN([CYRUS_BERKELEY_DB_OPTS], [
++AC_ARG_WITH(bdb-libdir,
++ [ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR],
++ with_bdb_lib=$withval,
++ [ test "${with_bdb_lib+set}" = set || with_bdb_lib=none])
++AC_ARG_WITH(bdb-incdir,
++ [ --with-bdb-incdir=DIR Berkeley DB include files are in DIR],
++ with_bdb_inc=$withval,
++ [ test "${with_bdb_inc+set}" = set || with_bdb_inc=none ])
++])
++m4trace:cmulocal/berkdb.m4:269: -1- AC_DEFUN([CYRUS_BERKELEY_DB_CHK], [
++ AC_REQUIRE([CYRUS_BERKELEY_DB_OPTS])
++
++ cmu_save_CPPFLAGS=$CPPFLAGS
++
++ if test -d $with_bdb_inc; then
++ CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
++ BDB_INCADD="-I$with_bdb_inc"
++ else
++ BDB_INCADD=""
++ fi
++
++ dnl Note that FreeBSD puts it in a wierd place
++ dnl (but they should use with-bdb-incdir)
++ AC_CHECK_HEADER(db.h,
++ [CYRUS_BERKELEY_DB_CHK_LIB()],
++ dblib="no")
++
++ CPPFLAGS=$cmu_save_CPPFLAGS
++])
++m4trace:cmulocal/bsd_sockets.m4:39: -1- AC_DEFUN([CMU_SOCKETS], [
++ save_LIBS="$LIBS"
++ LIB_SOCKET=""
++ AC_CHECK_FUNC(connect, :,
++ AC_CHECK_LIB(nsl, gethostbyname,
++ LIB_SOCKET="-lnsl $LIB_SOCKET")
++ AC_CHECK_LIB(socket, connect,
++ LIB_SOCKET="-lsocket $LIB_SOCKET")
++ )
++ LIBS="$LIB_SOCKET $save_LIBS"
++ AC_CHECK_FUNC(res_search, :,
++ LIBS="-lresolv $LIB_SOCKET $save_LIBS"
++ AC_TRY_LINK([[
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
++#ifdef HAVE_ARPA_NAMESER_COMPAT_H
++#include <arpa/nameser_compat.h>
++#endif
++#include <resolv.h>]],[[
++const char host[12]="openafs.org";
++u_char ans[1024];
++res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
++return 0;
++]], LIB_SOCKET="-lresolv $LIB_SOCKET")
++ )
++ LIBS="$LIB_SOCKET $save_LIBS"
++ AC_CHECK_FUNCS(dn_expand dns_lookup)
++ LIBS="$save_LIBS"
++ AC_SUBST(LIB_SOCKET)
++ ])
++m4trace:cmulocal/c-attribute.m4:30: -1- AC_DEFUN([CMU_C___ATTRIBUTE__], [
++AC_MSG_CHECKING(for __attribute__)
++AC_CACHE_VAL(ac_cv___attribute__, [
++AC_TRY_COMPILE([
++#include <stdlib.h>
++],
++[
++static void foo(void) __attribute__ ((noreturn));
++
++static void
++foo(void)
++{
++ exit(1);
++}
++],
++ac_cv___attribute__=yes,
++ac_cv___attribute__=no)])
++if test "$ac_cv___attribute__" = "yes"; then
++ AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
++fi
++AC_MSG_RESULT($ac_cv___attribute__)
++])
++m4trace:cmulocal/c-fpic.m4:34: -1- AC_DEFUN([CMU_C_FPIC], [
++AC_MSG_CHECKING(if compiler supports -fPIC)
++AC_CACHE_VAL(ac_cv_fpic, [
++save_CFLAGS=$CFLAGS
++CFLAGS="${CFLAGS} -fPIC"
++AC_TRY_COMPILE([
++#include <stdlib.h>
++],
++[
++static void
++foo(void)
++{
++ exit(1);
++}
++],
++ac_cv_fpic=yes,
++ac_cv_fpic=no)
++CFLAGS=$save_CFLAGS
++])
++if test "$ac_cv_fpic" = "yes"; then
++ FPIC_CFLAGS="-fPIC"
++else
++ FPIC_CFLAGS=""
++fi
++AC_MSG_RESULT($ac_cv_fpic)
++])
++m4trace:cmulocal/common.m4:12: -1- AC_DEFUN([CMU_TEST_LIBPATH], [
++changequote(<<, >>)
++define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>))
++changequote([, ])
++if test "$CMU_AC_CV_FOUND" = "yes"; then
++ if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl" -a \! -r "$1/lib$2.dylib"; then
++ CMU_AC_CV_FOUND=no
++ fi
++fi
++])
++m4trace:cmulocal/common.m4:23: -1- AC_DEFUN([CMU_TEST_INCPATH], [
++changequote(<<, >>)
++define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_inc, [ *], [_p]))
++changequote([, ])
++if test "$CMU_AC_CV_FOUND" = "yes"; then
++ if test \! -r "$1/$2.h"; then
++ CMU_AC_CV_FOUND=no
++ fi
++fi
++])
++m4trace:cmulocal/common.m4:40: -1- AC_DEFUN([CMU_CHECK_HEADER_NOCACHE], [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
++ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
++AC_MSG_CHECKING([for $1])
++AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
++ eval "ac_cv_header_$ac_safe=no")
++if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
++ AC_MSG_RESULT(yes)
++ ifelse([$2], , :, [$2])
++else
++ AC_MSG_RESULT(no)
++ifelse([$3], , , [$3
++])dnl
++fi
++])
++m4trace:cmulocal/common.m4:61: -1- AC_DEFUN([CMU_FIND_LIB_SUBDIR], [dnl
++AC_ARG_WITH([lib-subdir], AC_HELP_STRING([--with-lib-subdir=DIR],[Find libraries in DIR instead of lib]))
++AC_CHECK_SIZEOF(long)
++AC_CACHE_CHECK([what directory libraries are found in], [ac_cv_cmu_lib_subdir],
++[test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
++test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
++if test "X$with_lib_subdir" = "X" ; then
++ ac_cv_cmu_lib_subdir=lib
++ if test $ac_cv_sizeof_long -eq 4 ; then
++ test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
++ fi
++ if test $ac_cv_sizeof_long -eq 8 ; then
++ test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
++ fi
++else
++ ac_cv_cmu_lib_subdir=$with_lib_subdir
++fi])
++AC_SUBST(CMU_LIB_SUBDIR, $ac_cv_cmu_lib_subdir)
++])
++m4trace:cmulocal/cyrus.m4:20: -1- AC_DEFUN([CMU_ADD_LIBPATH], [
++ # this is CMU ADD LIBPATH
++ if test "$andrew_runpath_switch" = "none" ; then
++ LDFLAGS="-L$1 ${LDFLAGS}"
++ else
++ LDFLAGS="-L$1 $andrew_runpath_switch$1 ${LDFLAGS}"
++ fi
++])
++m4trace:cmulocal/cyrus.m4:31: -1- AC_DEFUN([CMU_ADD_LIBPATH_TO], [
++ # this is CMU ADD LIBPATH TO
++ if test "$andrew_runpath_switch" = "none" ; then
++ $2="-L$1 ${$2}"
++ else
++ $2="-L$1 ${$2} $andrew_runpath_switch$1"
++ fi
++])
++m4trace:cmulocal/cyrus.m4:38: -1- AC_DEFUN([CMU_GUESS_RUNPATH_SWITCH], [
++ # CMU GUESS RUNPATH SWITCH
++ andrew_runpath_switch="none"
++])
++m4trace:cmulocal/ipv6.m4:62: -1- AC_DEFUN([IPv6_CHECK_FUNC], [
++AC_CHECK_FUNC($1, [dnl
++ ac_cv_lib_socket_$1=no
++ ac_cv_lib_inet6_$1=no
++], [dnl
++ AC_CHECK_LIB(socket, $1, [dnl
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_$1=no
++ ], [dnl
++ AC_MSG_CHECKING([whether your system has IPv6 directory])
++ AC_CACHE_VAL(ipv6_cv_dir, [dnl
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done])dnl
++ AC_MSG_RESULT($ipv6_cv_dir)
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_$1=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ AC_CHECK_LIB(inet6, $1, [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi],)dnl
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi])dnl
++])dnl
++ipv6_cv_$1=no
++if test $ac_cv_func_$1 = yes -o $ac_cv_lib_socket_$1 = yes \
++ -o $ac_cv_lib_inet6_$1 = yes
++then
++ ipv6_cv_$1=yes
++fi
++if test $ipv6_cv_$1 = no; then
++ if test $1 = getaddrinfo; then
++ for ipv6_cv_pfx in o n; do
++ AC_EGREP_HEADER(${ipv6_cv_pfx}$1, netdb.h,
++ [AC_CHECK_FUNC(${ipv6_cv_pfx}$1)])
++ if eval test X\$ac_cv_func_${ipv6_cv_pfx}$1 = Xyes; then
++ AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?])
++ ipv6_cv_$1=yes
++ break
++ fi
++ done
++ fi
++fi
++if test $ipv6_cv_$1 = yes; then
++ ifelse([$2], , :, [$2])
++else
++ ifelse([$3], , :, [$3])
++fi])
++m4trace:cmulocal/ipv6.m4:78: -1- AC_DEFUN([IPv6_CHECK_SS_FAMILY], [
++AC_MSG_CHECKING([whether you have ss_family in struct sockaddr_storage])
++AC_CACHE_VAL(ipv6_cv_ss_family, [dnl
++AC_TRY_COMPILE([#include <sys/types.h>
++#include <sys/socket.h>],
++ [struct sockaddr_storage ss; int i = ss.ss_family;],
++ [ipv6_cv_ss_family=yes], [ipv6_cv_ss_family=no])])dnl
++if test $ipv6_cv_ss_family = yes; then
++ ifelse([$1], , AC_DEFINE(HAVE_SS_FAMILY,[],[Is there an ss_family in sockaddr_storage?]), [$1])
++else
++ ifelse([$2], , :, [$2])
++fi
++AC_MSG_RESULT($ipv6_cv_ss_family)])
++m4trace:cmulocal/ipv6.m4:94: -1- AC_DEFUN([IPv6_CHECK_SA_LEN], [
++AC_MSG_CHECKING([whether you have sa_len in struct sockaddr])
++AC_CACHE_VAL(ipv6_cv_sa_len, [dnl
++AC_TRY_COMPILE([#include <sys/types.h>
++#include <sys/socket.h>],
++ [struct sockaddr sa; int i = sa.sa_len;],
++ [ipv6_cv_sa_len=yes], [ipv6_cv_sa_len=no])])dnl
++if test $ipv6_cv_sa_len = yes; then
++ ifelse([$1], , AC_DEFINE(HAVE_SOCKADDR_SA_LEN,[],[Does sockaddr have an sa_len?]), [$1])
++else
++ ifelse([$2], , :, [$2])
++fi
++AC_MSG_RESULT($ipv6_cv_sa_len)])
++m4trace:cmulocal/ipv6.m4:110: -1- AC_DEFUN([IPv6_CHECK_SOCKLEN_T], [
++AC_MSG_CHECKING(for socklen_t)
++AC_CACHE_VAL(ipv6_cv_socklen_t, [dnl
++AC_TRY_LINK([#include <sys/types.h>
++#include <sys/socket.h>],
++ [socklen_t len = 0;],
++ [ipv6_cv_socklen_t=yes], [ipv6_cv_socklen_t=no])])dnl
++if test $ipv6_cv_socklen_t = yes; then
++ ifelse([$1], , AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?]), [$1])
++else
++ ifelse([$2], , :, [$2])
++fi
++AC_MSG_RESULT($ipv6_cv_socklen_t)])
++m4trace:cmulocal/kerberos_v4.m4:23: -1- AC_DEFUN([CMU_KRB_SENDAUTH_PROTO], [
++AC_MSG_CHECKING(for krb_sendauth prototype)
++AC_TRY_COMPILE(
++[#include <krb.h>
++int krb_sendauth (long options, int fd, KTEXT ktext, char *service,
++ char *inst, char *realm, u_long checksum,
++ MSG_DAT *msg_data, CREDENTIALS *cred,
++ Key_schedule schedule, struct sockaddr_in *laddr,
++ struct sockaddr_in *faddr, char *version);],
++[int foo = krb_sendauth(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); ],
++ac_cv_krb_sendauth_proto=no,
++ac_cv_krb_sendauth_proto=yes)
++AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
++if test "$ac_cv_krb_sendauth_proto" = yes; then
++ AC_DEFINE(HAVE_KRB_SENDAUTH_PROTO)dnl
++fi
++AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
++])
++m4trace:cmulocal/kerberos_v4.m4:42: -1- AC_DEFUN([CMU_KRB_SET_KEY_PROTO], [
++AC_MSG_CHECKING(for krb_set_key prototype)
++AC_CACHE_VAL(ac_cv_krb_set_key_proto, [
++cmu_save_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
++AC_TRY_COMPILE(
++[#include <krb.h>
++int krb_set_key(char *key, int cvt);],
++[int foo = krb_set_key(0, 0);],
++ac_cv_krb_set_key_proto=no,
++ac_cv_krb_set_key_proto=yes)
++])
++CPPFLAGS="${cmu_save_CPPFLAGS}"
++if test "$ac_cv_krb_set_key_proto" = yes; then
++ AC_DEFINE(HAVE_KRB_SET_KEY_PROTO)dnl
++fi
++AC_MSG_RESULT($ac_cv_krb_set_key_proto)
++])
++m4trace:cmulocal/kerberos_v4.m4:61: -1- AC_DEFUN([CMU_KRB4_32_DEFN], [
++AC_MSG_CHECKING(for KRB4_32 definition)
++AC_CACHE_VAL(ac_cv_krb4_32_defn, [
++cmu_save_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
++AC_TRY_COMPILE(
++[#include <krb.h>
++],
++[KRB4_32 foo = 1;],
++ac_cv_krb4_32_defn=yes,
++ac_cv_krb4_32_defn=no)
++])
++CPPFLAGS="${cmu_save_CPPFLAGS}"
++if test "$ac_cv_krb4_32_defn" = yes; then
++ AC_DEFINE(HAVE_KRB4_32_DEFINE)dnl
++fi
++AC_MSG_RESULT($ac_cv_krb4_32_defn)
++])
++m4trace:cmulocal/kerberos_v4.m4:81: -1- AC_DEFUN([CMU_KRB_RD_REQ_PROTO], [
++AC_MSG_CHECKING(for krb_rd_req prototype)
++AC_CACHE_VAL(ac_cv_krb_rd_req_proto, [
++cmu_save_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
++AC_TRY_COMPILE(
++[#include <krb.h>
++int krb_rd_req(KTEXT authent, char *service, char *instance,
++unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn);],
++[int foo = krb_rd_req(0,0,0,0,0,0);],
++ac_cv_krb_rd_req_proto=no,
++ac_cv_krb_rd_req_proto=yes)
++])
++CPPFLAGS="${cmu_save_CPPFLAGS}"
++if test "$ac_cv_krb_rd_req_proto" = yes; then
++ AC_DEFINE(HAVE_KRB_RD_REQ_PROTO)dnl
++fi
++AC_MSG_RESULT($ac_cv_krb_rd_req_proto)
++])
++m4trace:cmulocal/kerberos_v4.m4:98: -1- AC_DEFUN([CMU_KRB_INC_WHERE1], [
++saved_CPPFLAGS=$CPPFLAGS
++CPPFLAGS="$saved_CPPFLAGS -I$1"
++AC_TRY_COMPILE([#include <krb.h>],
++[struct ktext foo;],
++ac_cv_found_krb_inc=yes,
++ac_cv_found_krb_inc=no)
++if test "$ac_cv_found_krb_inc" = "no"; then
++ CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV"
++ AC_TRY_COMPILE([#include <krb.h>],
++ [struct ktext foo;],
++ [ac_cv_found_krb_inc=yes],
++ ac_cv_found_krb_inc=no)
++fi
++CPPFLAGS=$saved_CPPFLAGS
++])
++m4trace:cmulocal/kerberos_v4.m4:113: -1- AC_DEFUN([CMU_KRB_INC_WHERE], [
++ for i in $1; do
++ AC_MSG_CHECKING(for kerberos headers in $i)
++ CMU_KRB_INC_WHERE1($i)
++ CMU_TEST_INCPATH($i, krb)
++ if test "$ac_cv_found_krb_inc" = "yes"; then
++ ac_cv_krb_where_inc=$i
++ AC_MSG_RESULT(found)
++ break
++ else
++ AC_MSG_RESULT(not found)
++ fi
++ done
++])
++m4trace:cmulocal/kerberos_v4.m4:127: -1- AC_DEFUN([CMU_KRB_LIB_WHERE1], [
++saved_LIBS=$LIBS
++LIBS="$saved_LIBS -L$1 -lkrb ${KRB_LIBDES}"
++AC_TRY_LINK(,
++[dest_tkt();],
++[ac_cv_found_krb_lib=yes],
++ac_cv_found_krb_lib=no)
++LIBS=$saved_LIBS
++])
++m4trace:cmulocal/kerberos_v4.m4:143: -1- AC_DEFUN([CMU_KRB_LIB_WHERE], [
++ for i in $1; do
++ AC_MSG_CHECKING(for kerberos libraries in $i)
++ CMU_KRB_LIB_WHERE1($i)
++ dnl deal with false positives from implicit link paths
++ CMU_TEST_LIBPATH($i, krb)
++ if test "$ac_cv_found_krb_lib" = "yes" ; then
++ ac_cv_krb_where_lib=$i
++ AC_MSG_RESULT(found)
++ break
++ else
++ AC_MSG_RESULT(not found)
++ fi
++ done
++])
++m4trace:cmulocal/kerberos_v4.m4:284: -1- AC_DEFUN([CMU_KRB4], [
++AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
++AC_REQUIRE([CMU_SOCKETS])
++AC_REQUIRE([CMU_LIBSSL])
++AC_ARG_WITH(krb4,
++ [ --with-krb4=PREFIX Compile with Kerberos 4 support],
++ [if test "X$with_krb4" = "X"; then
++ with_krb4=yes
++ fi])
++AC_ARG_WITH(krb4-lib,
++ [ --with-krb4-lib=dir use kerberos 4 libraries in dir],
++ [if test "$withval" = "yes" -o "$withval" = "no"; then
++ AC_MSG_ERROR([No argument for --with-krb4-lib])
++ fi])
++AC_ARG_WITH(krb4-include,
++ [ --with-krb4-include=dir use kerberos 4 headers in dir],
++ [if test "$withval" = "yes" -o "$withval" = "no"; then
++ AC_MSG_ERROR([No argument for --with-krb4-include])
++ fi])
++
++ if test "X$with_krb4" != "X"; then
++ if test "$with_krb4" != "yes" -a "$with_krb4" != "no"; then
++ ac_cv_krb_where_lib=$with_krb4/$CMU_LIB_SUBDIR
++ ac_cv_krb_where_inc=$with_krb4/include
++ fi
++ fi
++
++ if test "$with_krb4" != "no"; then
++ if test "X$with_krb4_lib" != "X"; then
++ ac_cv_krb_where_lib=$with_krb4_lib
++ fi
++ if test "X$with_krb4_include" != "X"; then
++ ac_cv_krb_where_inc=$with_krb4_include
++ fi
++ if test "X$ac_cv_krb_where_inc" = "X"; then
++ CMU_KRB_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos)
++ fi
++
++ AC_MSG_CHECKING([if libdes is needed])
++ AC_TRY_LINK([],[des_quad_cksum();],KRB_DES_LIB="",KRB_DES_LIB="maybe")
++ if test "X$KRB_DES_LIB" != "X"; then
++ LIBS="$cmu_save_LIBS -ldes"
++ AC_TRY_LINK([], [des_quad_cksum();],KRB_DES_LIB="yes")
++ if test "X$KRB_DES_LIB" = "Xyes"; then
++ AC_MSG_RESULT([yes])
++ KRB_LIBDES="-ldes"
++ KRB_LIBDESA='$(KRB_LIB_DIR)/libdes.a'
++ else
++ LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
++ AC_TRY_LINK([],
++ [des_quad_cksum();],KRB_DES_LIB="libcrypto")
++ if test "X$KRB_DES_LIB" = "Xlibcrypto"; then
++ AC_MSG_RESULT([libcrypto])
++ KRB_LIBDES="$LIBSSL_LIB_FLAGS"
++ KRB_LIBDESA="$LIBSSL_LIB_FLAGS"
++ else
++ LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
++ AC_TRY_LINK([],
++ [des_quad_cksum();],KRB_DES_LIB="libcrypto+descompat")
++ if test "X$KRB_DES_LIB" = "Xlibcrypto+descompat"; then
++ AC_MSG_RESULT([libcrypto+descompat])
++ KRB_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
++ KRB_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
++ else
++ AC_MSG_RESULT([unknown])
++ AC_MSG_ERROR([Could not use -ldes])
++ fi
++ fi
++ fi
++ else
++ AC_MSG_RESULT([no])
++ fi
++ if test "X$ac_cv_krb_where_lib" = "X"; then
++ CMU_KRB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
++ fi
++ fi
++ LIBS="${cmu_save_LIBS}"
++
++
++ AC_MSG_CHECKING([whether to include kerberos 4])
++ if test "X$ac_cv_krb_where_lib" = "X" -o "X$ac_cv_krb_where_inc" = "X"; then
++ ac_cv_found_krb=no
++ AC_MSG_RESULT(no)
++ else
++ ac_cv_found_krb=yes
++ AC_MSG_RESULT(yes)
++ KRB_INC_DIR=$ac_cv_krb_where_inc
++ KRB_LIB_DIR=$ac_cv_krb_where_lib
++ KRB_INC_FLAGS="-I${KRB_INC_DIR}"
++ KRB_LIB_FLAGS="-L${KRB_LIB_DIR} -lkrb ${KRB_LIBDES}"
++ LIBS="${cmu_save_LIBS} ${KRB_LIB_FLAGS}"
++ AC_CHECK_LIB(resolv, dns_lookup, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lresolv",,"${KRB_LIB_FLAGS}")
++ AC_CHECK_LIB(crypt, crypt, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lcrypt",,"${KRB_LIB_FLAGS}")
++ LIBS="${LIBS} ${KRB_LIB_FLAGS}"
++ AC_CHECK_FUNCS(krb_get_int krb_life_to_time)
++ AC_SUBST(KRB_INC_FLAGS)
++ AC_SUBST(KRB_LIB_FLAGS)
++ LIBS="${cmu_save_LIBS}"
++ AC_DEFINE(HAVE_KRB4,,[Kerberos V4 is present])dnl zephyr uses this
++ AC_DEFINE(KERBEROS,,[Use kerberos 4. find out what needs this symbol])
++ if test "X$RPATH" = "X"; then
++ RPATH=""
++ fi
++ case "${host}" in
++ *-*-linux*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${KRB_LIB_DIR}"
++ fi
++ ;;
++ *-*-hpux*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,+b${KRB_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${KRB_LIB_DIR}"
++ fi
++ ;;
++ *-*-irix*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${KRB_LIB_DIR}"
++ fi
++ ;;
++ *-*-solaris2*)
++ if test "$ac_cv_prog_gcc" = yes; then
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-R${KRB_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${KRB_LIB_DIR}"
++ fi
++ else
++ RPATH="${RPATH} -R${KRB_LIB_DIR}"
++ fi
++ ;;
++ esac
++ AC_SUBST(RPATH)
++ fi
++ ])
++m4trace:cmulocal/libssl.m4:13: -1- AC_DEFUN([CMU_LIBSSL_INC_WHERE1], [
++saved_CPPFLAGS=$CPPFLAGS
++CPPFLAGS="$saved_CPPFLAGS -I$1"
++CMU_CHECK_HEADER_NOCACHE(openssl/ssl.h,
++ac_cv_found_libssl_inc=yes,
++ac_cv_found_libssl_inc=no)
++CPPFLAGS=$saved_CPPFLAGS
++])
++m4trace:cmulocal/libssl.m4:28: -1- AC_DEFUN([CMU_LIBSSL_INC_WHERE], [
++ for i in $1; do
++ AC_MSG_CHECKING(for libssl headers in $i)
++ CMU_LIBSSL_INC_WHERE1($i)
++ CMU_TEST_INCPATH($i, ssl)
++ if test "$ac_cv_found_libssl_inc" = "yes"; then
++ ac_cv_libssl_where_inc=$i
++ AC_MSG_RESULT(found)
++ break
++ else
++ AC_MSG_RESULT(not found)
++ fi
++ done
++])
++m4trace:cmulocal/libssl.m4:38: -1- AC_DEFUN([CMU_LIBSSL_LIB_WHERE1], [
++saved_LIBS=$LIBS
++LIBS="$saved_LIBS -L$1 -lssl -lcrypto $LIB_SOCKET"
++AC_TRY_LINK(,
++[SSL_write();],
++[ac_cv_found_ssl_lib=yes],
++ac_cv_found_ssl_lib=no)
++LIBS=$saved_LIBS
++])
++m4trace:cmulocal/libssl.m4:54: -1- AC_DEFUN([CMU_LIBSSL_LIB_WHERE], [
++ for i in $1; do
++ AC_MSG_CHECKING(for libssl libraries in $i)
++ CMU_LIBSSL_LIB_WHERE1($i)
++ dnl deal with false positives from implicit link paths
++ CMU_TEST_LIBPATH($i, ssl)
++ if test "$ac_cv_found_ssl_lib" = "yes" ; then
++ ac_cv_libssl_where_lib=$i
++ AC_MSG_RESULT(found)
++ break
++ else
++ AC_MSG_RESULT(not found)
++ fi
++ done
++])
++m4trace:cmulocal/libssl.m4:152: -1- AC_DEFUN([CMU_LIBSSL], [
++AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
++AC_REQUIRE([CMU_SOCKETS])
++AC_ARG_WITH(libssl,
++ [ --with-libssl=PREFIX Compile with Libssl support],
++ [if test "X$with_libssl" = "X"; then
++ with_libssl=yes
++ fi])
++AC_ARG_WITH(libssl-lib,
++ [ --with-libssl-lib=dir use libssl libraries in dir],
++ [if test "$withval" = "yes" -o "$withval" = "no"; then
++ AC_MSG_ERROR([No argument for --with-libssl-lib])
++ fi])
++AC_ARG_WITH(libssl-include,
++ [ --with-libssl-include=dir use libssl headers in dir],
++ [if test "$withval" = "yes" -o "$withval" = "no"; then
++ AC_MSG_ERROR([No argument for --with-libssl-include])
++ fi])
++
++ if test "X$with_libssl" != "X"; then
++ if test "$with_libssl" != "yes" -a "$with_libssl" != no; then
++ ac_cv_libssl_where_lib=$with_libssl/$CMU_LIB_SUBDIR
++ ac_cv_libssl_where_inc=$with_libssl/include
++ fi
++ fi
++
++ if test "$with_libssl" != "no"; then
++ if test "X$with_libssl_lib" != "X"; then
++ ac_cv_libssl_where_lib=$with_libssl_lib
++ fi
++ if test "X$ac_cv_libssl_where_lib" = "X"; then
++ CMU_LIBSSL_LIB_WHERE(/usr/local/$CMU_LIB_SUBDIR/openssl /usr/$CMU_LIB_SUBDIR/openssl /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
++ fi
++
++ if test "X$with_libssl_include" != "X"; then
++ ac_cv_libssl_where_inc=$with_libssl_include
++ fi
++ if test "X$ac_cv_libssl_where_inc" = "X"; then
++ CMU_LIBSSL_INC_WHERE(/usr/local/include /usr/include)
++ fi
++ fi
++
++ AC_MSG_CHECKING(whether to include libssl)
++ if test "X$ac_cv_libssl_where_lib" = "X" -a "X$ac_cv_libssl_where_inc" = "X"; then
++ ac_cv_found_libssl=no
++ AC_MSG_RESULT(no)
++ else
++ ac_cv_found_libssl=yes
++ AC_MSG_RESULT(yes)
++ LIBSSL_INC_DIR=$ac_cv_libssl_where_inc
++ LIBSSL_LIB_DIR=$ac_cv_libssl_where_lib
++ LIBSSL_INC_FLAGS="-I${LIBSSL_INC_DIR}"
++ LIBSSL_LIB_FLAGS="-L${LIBSSL_LIB_DIR} -lssl -lcrypto"
++ if test "X$RPATH" = "X"; then
++ RPATH=""
++ fi
++ case "${host}" in
++ *-*-linux*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
++ fi
++ ;;
++ *-*-hpux*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,+b${LIBSSL_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
++ fi
++ ;;
++ *-*-irix*)
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
++ fi
++ ;;
++ *-*-solaris2*)
++ if test "$ac_cv_prog_gcc" = yes; then
++ if test "X$RPATH" = "X"; then
++ RPATH="-Wl,-R${LIBSSL_LIB_DIR}"
++ else
++ RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
++ fi
++ else
++ RPATH="${RPATH} -R${LIBSSL_LIB_DIR}"
++ fi
++ ;;
++ esac
++ AC_SUBST(RPATH)
++ fi
++ AC_SUBST(LIBSSL_INC_DIR)
++ AC_SUBST(LIBSSL_LIB_DIR)
++ AC_SUBST(LIBSSL_INC_FLAGS)
++ AC_SUBST(LIBSSL_LIB_FLAGS)
++ ])
++m4trace:cmulocal/libwrap.m4:30: -1- AC_DEFUN([CMU_LIBWRAP], [
++AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
++ AC_REQUIRE([CMU_SOCKETS])
++ AC_ARG_WITH(libwrap,
++ [ --with-libwrap=DIR use libwrap (rooted in DIR) [yes] ],
++ with_libwrap=$withval, with_libwrap=yes)
++ if test "$with_libwrap" != no; then
++ if test -d "$with_libwrap"; then
++ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
++ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
++ fi
++ cmu_save_LIBS="$LIBS"
++ AC_CHECK_LIB(wrap, request_init, [
++ AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)],
++ with_libwrap=no, ${LIB_SOCKET})
++ LIBS="$cmu_save_LIBS"
++ fi
++ AC_MSG_CHECKING(libwrap support)
++ AC_MSG_RESULT($with_libwrap)
++ LIB_WRAP=""
++ if test "$with_libwrap" != no; then
++ AC_DEFINE(HAVE_LIBWRAP,[],[Do we have TCP wrappers?])
++ LIB_WRAP="-lwrap"
++ AC_CHECK_LIB(nsl, yp_get_default_domain, LIB_WRAP="${LIB_WRAP} -lnsl")
++ fi
++ AC_SUBST(LIB_WRAP)
++])
++m4trace:cmulocal/sasl2.m4:267: -1- AC_DEFUN([SASL_GSSAPI_CHK], [AC_REQUIRE([SASL2_CRYPT_CHK])
++AC_REQUIRE([CMU_SOCKETS])
++AC_ARG_ENABLE([gssapi],
++ [AC_HELP_STRING([--enable-gssapi=<DIR>],
++ [enable GSSAPI authentication [yes]])],
++ [gssapi=$enableval],
++ [gssapi=yes])
++AC_ARG_WITH([gss_impl],
++ [AC_HELP_STRING([--with-gss_impl={heimdal|mit|cybersafe|seam|auto}],
++ [choose specific GSSAPI implementation [[auto]]])],
++ [gss_impl=$withval],
++ [gss_impl=auto])
++
++if test "$gssapi" != no; then
++ platform=
++ case "${host}" in
++ *-*-linux*)
++ platform=__linux
++ ;;
++ *-*-hpux*)
++ platform=__hpux
++ ;;
++ *-*-irix*)
++ platform=__irix
++ ;;
++ *-*-solaris2*)
++# When should we use __sunos?
++ platform=__solaris
++ ;;
++ *-*-aix*)
++###_AIX
++ platform=__aix
++ ;;
++ *)
++ AC_WARN([The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script])
++ if test "$gss_impl" = "cybersafe"; then
++ AC_ERROR([CyberSafe was forced, cannot continue as platform is not supported])
++ fi
++ ;;
++ esac
++
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++
++ if test -d ${gssapi}; then
++ CPPFLAGS="$CPPFLAGS -I$gssapi/include"
++# We want to keep -I in our CPPFLAGS, but only if we succeed
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++### I am not sure how useful is this (and whether this is required at all
++### especially when we have to provide two -L flags for new CyberSafe
++ LDFLAGS="$LDFLAGS -L$gssapi/lib"
++
++ if test -n "$platform"; then
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
++ CPPFLAGS="$CPPFLAGS -D$platform"
++ if test -d "${gssapi}/appsec-sdk/include"; then
++ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
++ fi
++ fi
++ fi
++ fi
++ AC_CHECK_HEADER([gssapi.h],
++ [AC_DEFINE(HAVE_GSSAPI_H,,
++ [Define if you have the gssapi.h header file])],
++ [AC_CHECK_HEADER([gssapi/gssapi.h],,
++ [AC_WARN([Disabling GSSAPI - no include files found]); gssapi=no])])
++
++ CPPFLAGS=$cmu_saved_CPPFLAGS
++
++fi
++
++if test "$gssapi" != no; then
++ # We need to find out which gssapi implementation we are
++ # using. Supported alternatives are: MIT Kerberos 5,
++ # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
++ # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
++ # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
++ #
++ # The choice is reflected in GSSAPIBASE_LIBS
++
++ AC_CHECK_LIB(resolv,res_search)
++ if test -d ${gssapi}; then
++ gssapi_dir="${gssapi}/lib"
++ GSSAPIBASE_LIBS="-L$gssapi_dir"
++ GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
++ else
++ # FIXME: This is only used for building cyrus, and then only as
++ # a real hack. it needs to be fixed.
++ gssapi_dir="/usr/local/lib"
++ fi
++
++ # Check a full link against the Heimdal libraries.
++ # If this fails, check a full link against the MIT libraries.
++ # If this fails, check a full link against the CyberSafe libraries.
++ # If this fails, check a full link against the Solaris 8 and up libgss.
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
++ gss_failed=0
++ AC_CHECK_LIB(gssapi,gss_unwrap,gss_impl="heimdal",gss_failed=1,
++ ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET})
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
++ # check for libkrb5support first
++ AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET})
++
++ gss_failed=0
++ AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1,
++ ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET})
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ # For Cybersafe one has to set a platform define in order to make compilation work
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
++
++ cmu_saved_CPPFLAGS=$CPPFLAGS
++ cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
++# FIXME - Note that the libraries are in .../lib64 for 64bit kernels
++ if test -d "${gssapi}/appsec-rt/lib"; then
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
++ fi
++ CPPFLAGS="$CPPFLAGS -D$platform"
++ if test -d "${gssapi}/appsec-sdk/include"; then
++ CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
++ fi
++
++ gss_failed=0
++
++# Check for CyberSafe with two libraries first, than fall back to a single
++# library (older CyberSafe)
++
++ unset ac_cv_lib_gss_csf_gss_acq_user
++ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe03",
++ [unset ac_cv_lib_gss_csf_gss_acq_user;
++ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
++ gss_failed=1,$GSSAPIBASE_LIBS -lgss)],
++ [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
++
++ if test "$gss_failed" = "1"; then
++# Restore variables
++ GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
++ CPPFLAGS=$cmu_saved_CPPFLAGS
++
++ if test "$gss_impl" != "auto"; then
++ gss_impl="failed"
++ fi
++ fi
++ fi
++
++ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
++ gss_failed=0
++ AC_CHECK_LIB(gss,gss_unwrap,gss_impl="seam",gss_failed=1,-lgss)
++ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
++ gss_impl="failed"
++ fi
++ fi
++
++ if test "$gss_impl" = "mit"; then
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
++ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
++ elif test "$gss_impl" = "heimdal"; then
++ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
++ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
++ elif test "$gss_impl" = "cybersafe03"; then
++# Version of CyberSafe with two libraries
++ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
++ # there is no static libgss for CyberSafe
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "cybersafe"; then
++ CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
++ # there is no static libgss for CyberSafe
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "seam"; then
++ GSSAPIBASE_LIBS=-lgss
++ # there is no static libgss on Solaris 8 and up
++ GSSAPIBASE_STATIC_LIBS=none
++ elif test "$gss_impl" = "failed"; then
++ gssapi="no"
++ GSSAPIBASE_LIBS=
++ GSSAPIBASE_STATIC_LIBS=
++ AC_WARN([Disabling GSSAPI - specified library not found])
++ else
++ gssapi="no"
++ GSSAPIBASE_LIBS=
++ GSSAPIBASE_STATIC_LIBS=
++ AC_WARN([Disabling GSSAPI - no library])
++ fi
++fi
++
++#
++# Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
++# in gssapi\rfckrb5.h
++#
++if test "$gssapi" != "no"; then
++ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
++ AC_EGREP_CPP(hostbased_service_gss_nt_yes,
++ [#include <gssapi/gssapi.h>
++ #ifdef GSS_C_NT_HOSTBASED_SERVICE
++ hostbased_service_gss_nt_yes
++ #endif],
++ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
++ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])],
++ [AC_WARN([Cybersafe define not found])])
++
++ elif test "$ac_cv_header_gssapi_h" = "yes"; then
++ AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h,
++ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
++ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])])
++ elif test "$ac_cv_header_gssapi_gssapi_h"; then
++ AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h,
++ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
++ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])])
++ fi
++
++ if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
++ AC_EGREP_CPP(user_name_yes_gss_nt,
++ [#include <gssapi/gssapi.h>
++ #ifdef GSS_C_NT_USER_NAME
++ user_name_yes_gss_nt
++ #endif],
++ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
++ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])],
++ [AC_WARN([Cybersafe define not found])])
++ elif test "$ac_cv_header_gssapi_h" = "yes"; then
++ AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi.h,
++ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
++ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])])
++ elif test "$ac_cv_header_gssapi_gssapi_h"; then
++ AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi/gssapi.h,
++ [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
++ [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])])
++ fi
++fi
++
++GSSAPI_LIBS=""
++AC_MSG_CHECKING([GSSAPI])
++if test "$gssapi" != no; then
++ AC_MSG_RESULT([with implementation ${gss_impl}])
++ AC_CHECK_LIB(resolv,res_search,GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv")
++ SASL_MECHS="$SASL_MECHS libgssapiv2.la"
++ SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
++ SASL_STATIC_SRCS="$SASL_STATIC_SRCS ../plugins/gssapi.c"
++
++ cmu_save_LIBS="$LIBS"
++ LIBS="$LIBS $GSSAPIBASE_LIBS"
++ AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
++ LIBS="$cmu_save_LIBS"
++else
++ AC_MSG_RESULT([disabled])
++fi
++AC_SUBST(GSSAPI_LIBS)
++AC_SUBST(GSSAPIBASE_LIBS)
++])
++m4trace:cmulocal/sasl2.m4:274: -1- AC_DEFUN([SASL_SET_GSSAPI_LIBS], [SASL_GSSAPI_LIBS_SET="yes"
++])
++m4trace:cmulocal/sasl2.m4:403: -1- AC_DEFUN([CMU_SASL2], [AC_REQUIRE([SASL_GSSAPI_CHK])
++
++AC_ARG_WITH(sasl,
++ [AC_HELP_STRING([--with-sasl=DIR],[Compile with libsasl2 in <DIR>])],
++ with_sasl="$withval",
++ with_sasl="yes")
++
++AC_ARG_WITH(staticsasl,
++ [AC_HELP_STRING([--with-staticsasl=DIR],
++ [Compile with staticly linked libsasl2 in <DIR>])],
++ [with_staticsasl="$withval";
++ if test $with_staticsasl != "no"; then
++ using_static_sasl="static"
++ fi],
++ [with_staticsasl="no"; using_static_sasl="no"])
++
++SASLFLAGS=""
++LIB_SASL=""
++
++cmu_saved_CPPFLAGS=$CPPFLAGS
++cmu_saved_LDFLAGS=$LDFLAGS
++cmu_saved_LIBS=$LIBS
++
++if test ${with_staticsasl} != "no"; then
++ if test -d ${with_staticsasl}; then
++ if test -d ${with_staticsasl}/lib64 ; then
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib64
++ else
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib
++ fi
++ ac_cv_sasl_where_lib=${with_staticsasl}/lib
++ ac_cv_sasl_where_inc=${with_staticsasl}/include
++
++ SASLFLAGS="-I$ac_cv_sasl_where_inc"
++ LIB_SASL="-L$ac_cv_sasl_where_lib"
++ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
++ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
++ else
++ with_staticsasl="/usr"
++ fi
++
++ AC_CHECK_HEADER(sasl/sasl.h,
++ [AC_CHECK_HEADER(sasl/saslutil.h,
++ [for i42 in lib64 lib; do
++ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
++ ac_cv_found_sasl=yes
++ AC_MSG_CHECKING([for static libsasl])
++ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
++ fi
++ done
++ if test ! "$ac_cv_found_sasl" = "yes"; then
++ AC_MSG_CHECKING([for static libsasl])
++ AC_ERROR([Could not find ${with_staticsasl}/lib*/libsasl2.a])
++ fi])])
++
++ AC_MSG_RESULT([found])
++
++ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
++ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
++ else
++ SASL_GSSAPI_LIBS_SET=""
++ cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
++ fi
++fi
++
++if test -d ${with_sasl}; then
++ ac_cv_sasl_where_lib=${with_sasl}/lib
++ ac_cv_sasl_where_inc=${with_sasl}/include
++
++ DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
++ if test "$ac_cv_sasl_where_lib" != ""; then
++ CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, LIB_DYN_SASL)
++ fi
++ LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
++ CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
++ LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
++fi
++
++# be sure to check for a SASLv2 specific function
++AC_CHECK_HEADER(sasl/sasl.h,
++ [AC_CHECK_HEADER(sasl/saslutil.h,
++ [AC_CHECK_LIB(sasl2, prop_get,
++ ac_cv_found_sasl=yes,
++ ac_cv_found_sasl=no)],
++ ac_cv_found_sasl=no)],
++ ac_cv_found_sasl=no)
++
++if test "$ac_cv_found_sasl" = "yes"; then
++ if test "$ac_cv_sasl_where_lib" != ""; then
++ CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, DYNLIB_SASL)
++ fi
++ DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
++ if test "$using_static_sasl" != "static"; then
++ LIB_SASL=$DYNLIB_SASL
++ SASLFLAGS=$DYNSASLFLAGS
++ fi
++else
++ DYNLIB_SASL=""
++ DYNSASLFLAGS=""
++ using_static_sasl="staticonly"
++fi
++
++if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
++ SASL_GSSAPI_LIBS_SET=""
++ cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
++fi
++
++LIBS="$cmu_saved_LIBS"
++LDFLAGS="$cmu_saved_LDFLAGS"
++CPPFLAGS="$cmu_saved_CPPFLAGS"
++
++AC_SUBST(LIB_DYN_SASL)
++AC_SUBST(DYNSASLFLAGS)
++AC_SUBST(LIB_SASL)
++AC_SUBST(SASLFLAGS)
++])
++m4trace:cmulocal/sasl2.m4:413: -1- AC_DEFUN([CMU_SASL2_REQUIRED], [AC_REQUIRE([CMU_SASL2])
++if test "$ac_cv_found_sasl" != "yes"; then
++ AC_ERROR([Cannot continue without libsasl2.
++Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
++fi])
++m4trace:cmulocal/sasl2.m4:444: -1- AC_DEFUN([CMU_SASL2_REQUIRE_VER], [AC_REQUIRE([CMU_SASL2_REQUIRED])
++
++cmu_saved_CPPFLAGS=$CPPFLAGS
++CPPFLAGS="$CPPFLAGS $SASLFLAGS"
++
++AC_TRY_CPP([
++#include <sasl/sasl.h>
++
++#ifndef SASL_VERSION_MAJOR
++#error SASL_VERSION_MAJOR not defined
++#endif
++#ifndef SASL_VERSION_MINOR
++#error SASL_VERSION_MINOR not defined
++#endif
++#ifndef SASL_VERSION_STEP
++#error SASL_VERSION_STEP not defined
++#endif
++
++#if SASL_VERSION_MAJOR < $1 || SASL_VERSION_MINOR < $2 || SASL_VERSION_STEP < $3
++#error SASL version is less than $1.$2.$3
++#endif
++],,
++ [AC_ERROR([Incorrect SASL headers found. This package requires SASL $1.$2.$3 or newer.])])
++
++CPPFLAGS=$cmu_saved_CPPFLAGS
++])
++m4trace:cmulocal/sasl2.m4:461: -1- AC_DEFUN([CMU_SASL2_CHECKAPOP_REQUIRED], [AC_REQUIRE([CMU_SASL2_REQUIRED])
++
++cmu_saved_LDFLAGS=$LDFLAGS
++
++LDFLAGS="$LDFLAGS $LIB_SASL"
++
++AC_CHECK_LIB(sasl2, sasl_checkapop,
++ [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])],
++ [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
++
++LDFLAGS=$cmu_saved_LDFLAGS
++])
++m4trace:cmulocal/sasl2.m4:472: -1- AC_DEFUN([SASL2_CRYPT_CHK], [AC_CHECK_FUNC(crypt, cmu_have_crypt=yes,
++ [AC_CHECK_LIB(crypt, crypt,
++ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes,
++ cmu_have_crypt=no)])
++AC_SUBST(LIB_CRYPT)
++])
++m4trace:cmulocal/ucdsnmp.m4:71: -1- AC_DEFUN([CMU_UCDSNMP], [
++AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
++ AC_REQUIRE([CMU_SOCKETS])
++ AC_ARG_WITH(snmp,
++ [ --with-snmp=DIR use ucd|net snmp (rooted in DIR) [yes] ],
++ with_snmp=$withval, with_snmp=yes)
++
++ dnl
++ dnl Maintain backwards compatibility with old --with-ucdsnmp option
++ dnl
++ AC_ARG_WITH(ucdsnmp,, with_snmp=$withval,)
++
++if test "$with_snmp" != "no"; then
++
++ dnl
++ dnl Try net-snmp first
++ dnl
++ if test "$with_snmp" = "yes"; then
++ AC_PATH_PROG(SNMP_CONFIG,net-snmp-config,,[/usr/local/bin:$PATH])
++ else
++ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
++ fi
++
++ if test -x "$SNMP_CONFIG"; then
++ AC_MSG_CHECKING(NET SNMP libraries)
++
++ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
++ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
++
++ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
++ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
++ LIB_UCDSNMP=$SNMP_LIBS
++ AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
++ AC_SUBST(LIB_UCDSNMP)
++ AC_MSG_RESULT(yes)
++ else
++ AC_MSG_RESULT(no)
++ AC_MSG_WARN([Could not find the required paths. Please check your net-snmp installation.])
++ fi
++ else
++ dnl
++ dnl Try ucd-snmp if net-snmp test failed
++ dnl
++ if test "$with_snmp" != no; then
++ if test -d "$with_snmp"; then
++ CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
++ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
++ fi
++ cmu_save_LIBS="$LIBS"
++ AC_CHECK_LIB(snmp, sprint_objid, [
++ AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)],
++ with_snmp=no, ${LIB_SOCKET})
++ LIBS="$cmu_save_LIBS"
++ fi
++ AC_MSG_CHECKING(UCD SNMP libraries)
++ AC_MSG_RESULT($with_snmp)
++ LIB_UCDSNMP=""
++ if test "$with_snmp" != no; then
++ AC_DEFINE(HAVE_UCDSNMP,1,[Do we have UCD-SNMP support?])
++ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
++ AC_CHECK_LIB(rpm, rpmdbOpen,
++ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt",,-lpopt)
++ fi
++ AC_SUBST(LIB_UCDSNMP)
++ fi
++fi
++
++])
++m4trace:configure.in:49: -1- AC_INIT([imap/imapd.c])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^_?A[CHUM]_])
++m4trace:configure.in:49: -1- m4_pattern_forbid([_AC_])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
++m4trace:configure.in:49: -1- m4_pattern_allow([^AS_FLAGS$])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^_?m4_])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^dnl$])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^_?AS_])
++m4trace:configure.in:49: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([SHELL])
++m4trace:configure.in:49: -1- m4_pattern_allow([^SHELL$])
++m4trace:configure.in:49: -1- AC_SUBST([PATH_SEPARATOR])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PATH_SEPARATOR$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_NAME])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_NAME$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_VERSION$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_STRING])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_STRING$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
++m4trace:configure.in:49: -1- AC_SUBST([exec_prefix], [NONE])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([exec_prefix])
++m4trace:configure.in:49: -1- m4_pattern_allow([^exec_prefix$])
++m4trace:configure.in:49: -1- AC_SUBST([prefix], [NONE])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([prefix])
++m4trace:configure.in:49: -1- m4_pattern_allow([^prefix$])
++m4trace:configure.in:49: -1- AC_SUBST([program_transform_name], [s,x,x,])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([program_transform_name])
++m4trace:configure.in:49: -1- m4_pattern_allow([^program_transform_name$])
++m4trace:configure.in:49: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([bindir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^bindir$])
++m4trace:configure.in:49: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([sbindir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^sbindir$])
++m4trace:configure.in:49: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([libexecdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^libexecdir$])
++m4trace:configure.in:49: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([datarootdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^datarootdir$])
++m4trace:configure.in:49: -1- AC_SUBST([datadir], ['${datarootdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([datadir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^datadir$])
++m4trace:configure.in:49: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([sysconfdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^sysconfdir$])
++m4trace:configure.in:49: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([sharedstatedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^sharedstatedir$])
++m4trace:configure.in:49: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([localstatedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^localstatedir$])
++m4trace:configure.in:49: -1- AC_SUBST([includedir], ['${prefix}/include'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([includedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^includedir$])
++m4trace:configure.in:49: -1- AC_SUBST([oldincludedir], ['/usr/include'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([oldincludedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^oldincludedir$])
++m4trace:configure.in:49: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
++ ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
++ ['${datarootdir}/doc/${PACKAGE}'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([docdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^docdir$])
++m4trace:configure.in:49: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([infodir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^infodir$])
++m4trace:configure.in:49: -1- AC_SUBST([htmldir], ['${docdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([htmldir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^htmldir$])
++m4trace:configure.in:49: -1- AC_SUBST([dvidir], ['${docdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([dvidir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^dvidir$])
++m4trace:configure.in:49: -1- AC_SUBST([pdfdir], ['${docdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([pdfdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^pdfdir$])
++m4trace:configure.in:49: -1- AC_SUBST([psdir], ['${docdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([psdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^psdir$])
++m4trace:configure.in:49: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([libdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^libdir$])
++m4trace:configure.in:49: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([localedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^localedir$])
++m4trace:configure.in:49: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([mandir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^mandir$])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_NAME$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
++#undef PACKAGE_NAME])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_VERSION$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
++#undef PACKAGE_VERSION])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_STRING$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT])
++m4trace:configure.in:49: -1- AC_SUBST([DEFS])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([DEFS])
++m4trace:configure.in:49: -1- m4_pattern_allow([^DEFS$])
++m4trace:configure.in:49: -1- AC_SUBST([ECHO_C])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_C])
++m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_C$])
++m4trace:configure.in:49: -1- AC_SUBST([ECHO_N])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_N])
++m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_N$])
++m4trace:configure.in:49: -1- AC_SUBST([ECHO_T])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_T])
++m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_T$])
++m4trace:configure.in:49: -1- AC_SUBST([LIBS])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([LIBS])
++m4trace:configure.in:49: -1- m4_pattern_allow([^LIBS$])
++m4trace:configure.in:49: -1- AC_SUBST([build_alias])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([build_alias])
++m4trace:configure.in:49: -1- m4_pattern_allow([^build_alias$])
++m4trace:configure.in:49: -1- AC_SUBST([host_alias])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([host_alias])
++m4trace:configure.in:49: -1- m4_pattern_allow([^host_alias$])
++m4trace:configure.in:49: -1- AC_SUBST([target_alias])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([target_alias])
++m4trace:configure.in:49: -1- m4_pattern_allow([^target_alias$])
++m4trace:configure.in:51: -1- AC_CONFIG_HEADERS([config.h])
++m4trace:configure.in:52: -1- AC_CANONICAL_HOST
++m4trace:configure.in:52: -1- AC_CANONICAL_BUILD
++m4trace:configure.in:52: -1- AC_REQUIRE_AUX_FILE([config.sub])
++m4trace:configure.in:52: -1- AC_REQUIRE_AUX_FILE([config.guess])
++m4trace:configure.in:52: -1- AC_SUBST([build], [$ac_cv_build])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([build])
++m4trace:configure.in:52: -1- m4_pattern_allow([^build$])
++m4trace:configure.in:52: -1- AC_SUBST([build_cpu], [$[1]])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_cpu])
++m4trace:configure.in:52: -1- m4_pattern_allow([^build_cpu$])
++m4trace:configure.in:52: -1- AC_SUBST([build_vendor], [$[2]])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_vendor])
++m4trace:configure.in:52: -1- m4_pattern_allow([^build_vendor$])
++m4trace:configure.in:52: -1- AC_SUBST([build_os])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_os])
++m4trace:configure.in:52: -1- m4_pattern_allow([^build_os$])
++m4trace:configure.in:52: -1- AC_SUBST([host], [$ac_cv_host])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([host])
++m4trace:configure.in:52: -1- m4_pattern_allow([^host$])
++m4trace:configure.in:52: -1- AC_SUBST([host_cpu], [$[1]])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_cpu])
++m4trace:configure.in:52: -1- m4_pattern_allow([^host_cpu$])
++m4trace:configure.in:52: -1- AC_SUBST([host_vendor], [$[2]])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_vendor])
++m4trace:configure.in:52: -1- m4_pattern_allow([^host_vendor$])
++m4trace:configure.in:52: -1- AC_SUBST([host_os])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_os])
++m4trace:configure.in:52: -1- m4_pattern_allow([^host_os$])
++m4trace:configure.in:57: -1- AC_SUBST([WARNERROR])
++m4trace:configure.in:57: -1- AC_SUBST_TRACE([WARNERROR])
++m4trace:configure.in:57: -1- m4_pattern_allow([^WARNERROR$])
++m4trace:configure.in:61: -1- AC_DEFINE_TRACE_LITERAL([EXTRA_IDENT])
++m4trace:configure.in:61: -1- m4_pattern_allow([^EXTRA_IDENT$])
++m4trace:configure.in:61: -1- AH_OUTPUT([EXTRA_IDENT], [/* Extra version information for imap/version.h */
++#undef EXTRA_IDENT])
++m4trace:configure.in:63: -1- AC_SUBST([MAKEDEPEND])
++m4trace:configure.in:63: -1- AC_SUBST_TRACE([MAKEDEPEND])
++m4trace:configure.in:63: -1- m4_pattern_allow([^MAKEDEPEND$])
++m4trace:configure.in:69: -2- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++configure.in:69: the top level])
++m4trace:configure.in:73: -1- AC_SUBST([cyrus_prefix])
++m4trace:configure.in:73: -1- AC_SUBST_TRACE([cyrus_prefix])
++m4trace:configure.in:73: -1- m4_pattern_allow([^cyrus_prefix$])
++m4trace:configure.in:74: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_PATH])
++m4trace:configure.in:74: -1- m4_pattern_allow([^CYRUS_PATH$])
++m4trace:configure.in:74: -1- AH_OUTPUT([CYRUS_PATH], [/* Where will we be installed? */
++#undef CYRUS_PATH])
++m4trace:configure.in:77: -1- AC_SUBST([service_path])
++m4trace:configure.in:77: -1- AC_SUBST_TRACE([service_path])
++m4trace:configure.in:77: -1- m4_pattern_allow([^service_path$])
++m4trace:configure.in:78: -1- AC_DEFINE_TRACE_LITERAL([SERVICE_PATH])
++m4trace:configure.in:78: -1- m4_pattern_allow([^SERVICE_PATH$])
++m4trace:configure.in:78: -1- AH_OUTPUT([SERVICE_PATH], [/* Directiory to use for service binaries */
++#undef SERVICE_PATH])
++m4trace:configure.in:81: -1- AC_SUBST([cyrus_user])
++m4trace:configure.in:81: -1- AC_SUBST_TRACE([cyrus_user])
++m4trace:configure.in:81: -1- m4_pattern_allow([^cyrus_user$])
++m4trace:configure.in:82: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_USER])
++m4trace:configure.in:82: -1- m4_pattern_allow([^CYRUS_USER$])
++m4trace:configure.in:82: -1- AH_OUTPUT([CYRUS_USER], [/* What user will we run as? */
++#undef CYRUS_USER])
++m4trace:configure.in:85: -1- AC_SUBST([cyrus_group])
++m4trace:configure.in:85: -1- AC_SUBST_TRACE([cyrus_group])
++m4trace:configure.in:85: -1- m4_pattern_allow([^cyrus_group$])
++m4trace:configure.in:92: -1- AC_DEFINE_TRACE_LITERAL([SYSCONFDIR])
++m4trace:configure.in:92: -1- m4_pattern_allow([^SYSCONFDIR$])
++m4trace:configure.in:92: -1- AH_OUTPUT([SYSCONFDIR], [/* Config File Location */
++#undef SYSCONFDIR])
++m4trace:configure.in:94: -1- AC_PROG_CC
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([CFLAGS])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CFLAGS])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CFLAGS$])
++m4trace:configure.in:94: -1- AC_SUBST([LDFLAGS])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([LDFLAGS])
++m4trace:configure.in:94: -1- m4_pattern_allow([^LDFLAGS$])
++m4trace:configure.in:94: -1- AC_SUBST([CPPFLAGS])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CPPFLAGS])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CPPFLAGS$])
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([ac_ct_CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([ac_ct_CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^ac_ct_CC$])
++m4trace:configure.in:94: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([EXEEXT])
++m4trace:configure.in:94: -1- m4_pattern_allow([^EXEEXT$])
++m4trace:configure.in:94: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([OBJEXT])
++m4trace:configure.in:94: -1- m4_pattern_allow([^OBJEXT$])
++m4trace:configure.in:95: -1- AC_PROG_RANLIB
++m4trace:configure.in:95: -1- AC_SUBST([RANLIB])
++m4trace:configure.in:95: -1- AC_SUBST_TRACE([RANLIB])
++m4trace:configure.in:95: -1- m4_pattern_allow([^RANLIB$])
++m4trace:configure.in:96: -1- AC_PROG_MAKE_SET
++m4trace:configure.in:96: -1- AC_SUBST([SET_MAKE])
++m4trace:configure.in:96: -1- AC_SUBST_TRACE([SET_MAKE])
++m4trace:configure.in:96: -1- m4_pattern_allow([^SET_MAKE$])
++m4trace:configure.in:97: -1- AC_PROG_INSTALL
++m4trace:configure.in:97: -1- AC_REQUIRE_AUX_FILE([install-sh])
++m4trace:configure.in:97: -1- AC_SUBST([INSTALL_PROGRAM])
++m4trace:configure.in:97: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
++m4trace:configure.in:97: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
++m4trace:configure.in:97: -1- AC_SUBST([INSTALL_SCRIPT])
++m4trace:configure.in:97: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
++m4trace:configure.in:97: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
++m4trace:configure.in:97: -1- AC_SUBST([INSTALL_DATA])
++m4trace:configure.in:97: -1- AC_SUBST_TRACE([INSTALL_DATA])
++m4trace:configure.in:97: -1- m4_pattern_allow([^INSTALL_DATA$])
++m4trace:configure.in:98: -1- AH_OUTPUT([_ALL_SOURCE], [/* Define to 1 if on AIX 3.
++ System headers sometimes define this.
++ We just want to avoid a redefinition error message. */
++@%:@ifndef _ALL_SOURCE
++@%:@ undef _ALL_SOURCE
++@%:@endif])
++m4trace:configure.in:98: -1- AC_PROG_CPP
++m4trace:configure.in:98: -1- AC_SUBST([CPP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([CPP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^CPP$])
++m4trace:configure.in:98: -1- AC_SUBST([CPPFLAGS])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([CPPFLAGS])
++m4trace:configure.in:98: -1- m4_pattern_allow([^CPPFLAGS$])
++m4trace:configure.in:98: -1- AC_SUBST([CPP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([CPP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^CPP$])
++m4trace:configure.in:98: -1- AC_SUBST([GREP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([GREP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^GREP$])
++m4trace:configure.in:98: -1- AC_SUBST([GREP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([GREP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^GREP$])
++m4trace:configure.in:98: -1- AC_SUBST([EGREP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([EGREP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^EGREP$])
++m4trace:configure.in:98: -1- AC_SUBST([EGREP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([EGREP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^EGREP$])
++m4trace:configure.in:98: -1- AC_DEFINE_TRACE_LITERAL([_ALL_SOURCE])
++m4trace:configure.in:98: -1- m4_pattern_allow([^_ALL_SOURCE$])
++m4trace:configure.in:99: -1- AC_CHECK_LIB([cposix], [strerror], [LIBS="$LIBS -lcposix"])
++m4trace:configure.in:100: -1- AC_PROG_AWK
++m4trace:configure.in:100: -1- AC_SUBST([AWK])
++m4trace:configure.in:100: -1- AC_SUBST_TRACE([AWK])
++m4trace:configure.in:100: -1- m4_pattern_allow([^AWK$])
++m4trace:configure.in:101: -1- AC_C_CONST
++m4trace:configure.in:101: -1- AC_DEFINE_TRACE_LITERAL([const])
++m4trace:configure.in:101: -1- m4_pattern_allow([^const$])
++m4trace:configure.in:101: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
++#undef const])
++m4trace:configure.in:108: -1- AC_C_INLINE
++m4trace:configure.in:108: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
++ calls it, or to nothing if \'inline\' is not supported under any name. */
++#ifndef __cplusplus
++#undef inline
++#endif])
++m4trace:configure.in:110: -1- AC_HEADER_STDC
++m4trace:configure.in:110: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
++m4trace:configure.in:110: -1- m4_pattern_allow([^STDC_HEADERS$])
++m4trace:configure.in:110: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
++#undef STDC_HEADERS])
++m4trace:configure.in:110: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
++ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
++#undef HAVE_SYS_TYPES_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
++#undef HAVE_SYS_STAT_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
++#undef HAVE_STDLIB_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
++#undef HAVE_STRING_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
++#undef HAVE_MEMORY_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
++#undef HAVE_STRINGS_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
++#undef HAVE_INTTYPES_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
++#undef HAVE_STDINT_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
++#undef HAVE_UNISTD_H])
++m4trace:configure.in:110: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
++m4trace:configure.in:110: -1- m4_pattern_allow([^SIZEOF_LONG$])
++m4trace:configure.in:110: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */
++#undef SIZEOF_LONG])
++m4trace:configure.in:113: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG_INT])
++m4trace:configure.in:113: -1- m4_pattern_allow([^SIZEOF_LONG_LONG_INT$])
++m4trace:configure.in:113: -1- AH_OUTPUT([SIZEOF_LONG_LONG_INT], [/* The size of `long long int\', as computed by sizeof. */
++#undef SIZEOF_LONG_LONG_INT])
++m4trace:configure.in:114: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_LONG_LONG_INT])
++m4trace:configure.in:114: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG_LONG_INT$])
++m4trace:configure.in:114: -1- AH_OUTPUT([SIZEOF_UNSIGNED_LONG_LONG_INT], [/* The size of `unsigned long long int\', as computed by sizeof. */
++#undef SIZEOF_UNSIGNED_LONG_LONG_INT])
++m4trace:configure.in:117: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG_INT])
++m4trace:configure.in:117: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$])
++m4trace:configure.in:117: -1- AH_OUTPUT([HAVE_LONG_LONG_INT], [/* Does the compiler support long long int? */
++#undef HAVE_LONG_LONG_INT])
++m4trace:configure.in:118: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
++m4trace:configure.in:118: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
++m4trace:configure.in:118: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte
++ first (like Motorola and SPARC, unlike Intel and VAX). */
++#undef WORDS_BIGENDIAN])
++m4trace:configure.in:121: -1- CMU_C___ATTRIBUTE__
++m4trace:configure.in:121: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++cmulocal/c-attribute.m4:30: CMU_C___ATTRIBUTE__ is expanded from...
++configure.in:121: the top level])
++m4trace:configure.in:121: -1- AC_DEFINE_TRACE_LITERAL([HAVE___ATTRIBUTE__])
++m4trace:configure.in:121: -1- m4_pattern_allow([^HAVE___ATTRIBUTE__$])
++m4trace:configure.in:121: -1- AH_OUTPUT([HAVE___ATTRIBUTE__], [/* define if your compiler has __attribute__ */
++#undef HAVE___ATTRIBUTE__])
++m4trace:configure.in:122: -1- CMU_C_FPIC
++m4trace:configure.in:122: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++cmulocal/c-fpic.m4:34: CMU_C_FPIC is expanded from...
++configure.in:122: the top level])
++m4trace:configure.in:125: -1- CMU_GUESS_RUNPATH_SWITCH
++m4trace:configure.in:127: -1- AC_CHECK_HEADERS([unistd.h sys/select.h sys/param.h stdarg.h])
++m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
++#undef HAVE_UNISTD_H])
++m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
++#undef HAVE_SYS_SELECT_H])
++m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
++#undef HAVE_SYS_PARAM_H])
++m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the <stdarg.h> header file. */
++#undef HAVE_STDARG_H])
++m4trace:configure.in:128: -1- AC_LIBSOURCE([memmove.c])
++m4trace:configure.in:128: -1- AC_LIBSOURCE([strcasecmp.c])
++m4trace:configure.in:128: -1- AC_LIBSOURCE([ftruncate.c])
++m4trace:configure.in:128: -1- AC_LIBSOURCE([strerror.c])
++m4trace:configure.in:128: -1- AC_CHECK_FUNCS([memmove strcasecmp ftruncate strerror], [], [_AC_LIBOBJ($ac_func)])
++m4trace:configure.in:128: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */
++#undef HAVE_MEMMOVE])
++m4trace:configure.in:128: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */
++#undef HAVE_STRCASECMP])
++m4trace:configure.in:128: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* Define to 1 if you have the `ftruncate\' function. */
++#undef HAVE_FTRUNCATE])
++m4trace:configure.in:128: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
++#undef HAVE_STRERROR])
++m4trace:configure.in:128: -1- AC_SUBST([LIB@&t at OBJS], ["$LIB@&t at OBJS $ac_func.$ac_objext"])
++m4trace:configure.in:128: -1- AC_SUBST_TRACE([LIB@&t at OBJS])
++m4trace:configure.in:128: -1- m4_pattern_allow([^LIB@&t at OBJS$])
++m4trace:configure.in:129: -1- AC_CHECK_FUNCS([strlcat strlcpy])
++m4trace:configure.in:129: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the `strlcat\' function. */
++#undef HAVE_STRLCAT])
++m4trace:configure.in:129: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the `strlcpy\' function. */
++#undef HAVE_STRLCPY])
++m4trace:configure.in:130: -1- AC_HEADER_DIRENT
++m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR\'.
++ */
++#undef HAVE_DIRENT_H])
++m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR\'.
++ */
++#undef HAVE_SYS_NDIR_H])
++m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR\'.
++ */
++#undef HAVE_SYS_DIR_H])
++m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR\'. */
++#undef HAVE_NDIR_H])
++m4trace:configure.in:133: -1- CMU_SOCKETS
++m4trace:configure.in:133: -2- AC_CHECK_LIB([nsl], [gethostbyname], [LIB_SOCKET="-lnsl $LIB_SOCKET"])
++m4trace:configure.in:133: -2- AC_CHECK_LIB([socket], [connect], [LIB_SOCKET="-lsocket $LIB_SOCKET"])
++m4trace:configure.in:133: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++cmulocal/bsd_sockets.m4:39: CMU_SOCKETS is expanded from...
++configure.in:133: the top level])
++m4trace:configure.in:133: -1- AC_CHECK_FUNCS([dn_expand dns_lookup])
++m4trace:configure.in:133: -1- AH_OUTPUT([HAVE_DN_EXPAND], [/* Define to 1 if you have the `dn_expand\' function. */
++#undef HAVE_DN_EXPAND])
++m4trace:configure.in:133: -1- AH_OUTPUT([HAVE_DNS_LOOKUP], [/* Define to 1 if you have the `dns_lookup\' function. */
++#undef HAVE_DNS_LOOKUP])
++m4trace:configure.in:133: -1- AC_SUBST([LIB_SOCKET])
++m4trace:configure.in:133: -1- AC_SUBST_TRACE([LIB_SOCKET])
++m4trace:configure.in:133: -1- m4_pattern_allow([^LIB_SOCKET$])
++m4trace:configure.in:140: -1- IPv6_CHECK_FUNC([getaddrinfo], [IPv6_CHECK_FUNC(gai_strerror,
++ AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?]),
++ cyrus_cv_getaddrinfo=no)], [cyrus_cv_getaddrinfo=no])
++m4trace:configure.in:140: -1- AC_CHECK_LIB([socket], [getaddrinfo], [dnl
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_getaddrinfo=no
++ ], [dnl
++ AC_MSG_CHECKING([whether your system has IPv6 directory])
++ AC_CACHE_VAL(ipv6_cv_dir, [dnl
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done])dnl
++ AC_MSG_RESULT($ipv6_cv_dir)
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_getaddrinfo=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ AC_CHECK_LIB(inet6, getaddrinfo, [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi],)dnl
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi])
++m4trace:configure.in:140: -1- AC_CHECK_LIB([inet6], [getaddrinfo], [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi], [])
++m4trace:configure.in:140: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
++m4trace:configure.in:140: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
++m4trace:configure.in:140: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
++#undef HAVE_GETADDRINFO])
++m4trace:configure.in:140: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
++m4trace:configure.in:140: -2- m4_pattern_allow([^HAVE_GETADDRINFO$])
++m4trace:configure.in:140: -2- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
++#undef HAVE_GETADDRINFO])
++m4trace:configure.in:140: -1- IPv6_CHECK_FUNC([gai_strerror], [
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETADDRINFO
++_ACEOF
++], [cyrus_cv_getaddrinfo=no])
++m4trace:configure.in:140: -1- AC_CHECK_LIB([socket], [gai_strerror], [dnl
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_gai_strerror=no
++ ], [dnl
++ AC_MSG_CHECKING([whether your system has IPv6 directory])
++ AC_CACHE_VAL(ipv6_cv_dir, [dnl
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done])dnl
++ AC_MSG_RESULT($ipv6_cv_dir)
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_gai_strerror=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ AC_CHECK_LIB(inet6, gai_strerror, [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi],)dnl
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi])
++m4trace:configure.in:140: -1- AC_CHECK_LIB([inet6], [gai_strerror], [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi], [])
++m4trace:configure.in:140: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
++m4trace:configure.in:140: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
++m4trace:configure.in:140: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
++#undef HAVE_GETADDRINFO])
++m4trace:configure.in:148: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETNAMEINFO])
++m4trace:configure.in:148: -2- m4_pattern_allow([^HAVE_GETNAMEINFO$])
++m4trace:configure.in:148: -2- AH_OUTPUT([HAVE_GETNAMEINFO], [/* Do we have a getnameinfo? */
++#undef HAVE_GETNAMEINFO])
++m4trace:configure.in:149: -1- IPv6_CHECK_FUNC([getnameinfo], [
++cat >>confdefs.h <<\_ACEOF
++@%:@define HAVE_GETNAMEINFO
++_ACEOF
++], [cyrus_cv_getnameinfo=no])
++m4trace:configure.in:149: -1- AC_CHECK_LIB([socket], [getnameinfo], [dnl
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_getnameinfo=no
++ ], [dnl
++ AC_MSG_CHECKING([whether your system has IPv6 directory])
++ AC_CACHE_VAL(ipv6_cv_dir, [dnl
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done])dnl
++ AC_MSG_RESULT($ipv6_cv_dir)
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_getnameinfo=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ AC_CHECK_LIB(inet6, getnameinfo, [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi],)dnl
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi])
++m4trace:configure.in:149: -1- AC_CHECK_LIB([inet6], [getnameinfo], [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi], [])
++m4trace:configure.in:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
++m4trace:configure.in:149: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
++m4trace:configure.in:149: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
++#undef HAVE_GETADDRINFO])
++m4trace:configure.in:155: -1- IPv6_CHECK_SS_FAMILY([])
++m4trace:configure.in:155: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++cmulocal/ipv6.m4:78: IPv6_CHECK_SS_FAMILY is expanded from...
++configure.in:155: the top level])
++m4trace:configure.in:155: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SS_FAMILY])
++m4trace:configure.in:155: -2- m4_pattern_allow([^HAVE_SS_FAMILY$])
++m4trace:configure.in:155: -2- AH_OUTPUT([HAVE_SS_FAMILY], [/* Is there an ss_family in sockaddr_storage? */
++#undef HAVE_SS_FAMILY])
++m4trace:configure.in:156: -1- IPv6_CHECK_SA_LEN([])
++m4trace:configure.in:156: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++cmulocal/ipv6.m4:94: IPv6_CHECK_SA_LEN is expanded from...
++configure.in:156: the top level])
++m4trace:configure.in:156: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKADDR_SA_LEN])
++m4trace:configure.in:156: -2- m4_pattern_allow([^HAVE_SOCKADDR_SA_LEN$])
++m4trace:configure.in:156: -2- AH_OUTPUT([HAVE_SOCKADDR_SA_LEN], [/* Does sockaddr have an sa_len? */
++#undef HAVE_SOCKADDR_SA_LEN])
++m4trace:configure.in:158: -1- AC_SUBST([IPV6_OBJS])
++m4trace:configure.in:158: -1- AC_SUBST_TRACE([IPV6_OBJS])
++m4trace:configure.in:158: -1- m4_pattern_allow([^IPV6_OBJS$])
++m4trace:configure.in:161: -1- AC_CHECK_HEADERS([sys/time.h])
++m4trace:configure.in:161: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
++#undef HAVE_SYS_TIME_H])
++m4trace:configure.in:162: -1- AC_HEADER_TIME
++m4trace:configure.in:162: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
++m4trace:configure.in:162: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$])
++m4trace:configure.in:162: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#undef TIME_WITH_SYS_TIME])
++m4trace:configure.in:163: -1- AC_STRUCT_TM
++m4trace:configure.in:163: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
++m4trace:configure.in:163: -1- m4_pattern_allow([^TM_IN_SYS_TIME$])
++m4trace:configure.in:163: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares `struct tm\'. */
++#undef TM_IN_SYS_TIME])
++m4trace:configure.in:164: -1- AC_STRUCT_TIMEZONE
++m4trace:configure.in:164: -1- AC_CHECK_MEMBERS([struct tm.tm_zone], [], [], [#include <sys/types.h>
++#include <$ac_cv_struct_tm>
++])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TM_TM_ZONE])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_STRUCT_TM_TM_ZONE$])
++m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_STRUCT_TM_TM_ZONE], [/* Define to 1 if `tm_zone\' is member of `struct tm\'. */
++#undef HAVE_STRUCT_TM_TM_ZONE])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_ZONE])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_TM_ZONE$])
++m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_TM_ZONE], [/* Define to 1 if your `struct tm\' has `tm_zone\'. Deprecated, use
++ `HAVE_STRUCT_TM_TM_ZONE\' instead. */
++#undef HAVE_TM_ZONE])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_TZNAME])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_DECL_TZNAME$])
++m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_DECL_TZNAME], [/* Define to 1 if you have the declaration of `tzname\', and to 0 if you don\'t.
++ */
++#undef HAVE_DECL_TZNAME])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_TZNAME])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_DECL_TZNAME$])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZNAME])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_TZNAME$])
++m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_TZNAME], [/* Define to 1 if you don\'t have `tm_zone\' but do have the external array
++ `tzname\'. */
++#undef HAVE_TZNAME])
++m4trace:configure.in:166: -1- AC_SUBST([CPPFLAGS])
++m4trace:configure.in:166: -1- AC_SUBST_TRACE([CPPFLAGS])
++m4trace:configure.in:166: -1- m4_pattern_allow([^CPPFLAGS$])
++m4trace:configure.in:167: -1- AC_SUBST([PRE_SUBDIRS])
++m4trace:configure.in:167: -1- AC_SUBST_TRACE([PRE_SUBDIRS])
++m4trace:configure.in:167: -1- m4_pattern_allow([^PRE_SUBDIRS$])
++m4trace:configure.in:168: -1- AC_SUBST([EXTRA_SUBDIRS])
++m4trace:configure.in:168: -1- AC_SUBST_TRACE([EXTRA_SUBDIRS])
++m4trace:configure.in:168: -1- m4_pattern_allow([^EXTRA_SUBDIRS$])
++m4trace:configure.in:169: -1- AC_SUBST([DEPLIBS])
++m4trace:configure.in:169: -1- AC_SUBST_TRACE([DEPLIBS])
++m4trace:configure.in:169: -1- m4_pattern_allow([^DEPLIBS$])
++m4trace:configure.in:170: -1- AC_SUBST([LOCALDEFS])
++m4trace:configure.in:170: -1- AC_SUBST_TRACE([LOCALDEFS])
++m4trace:configure.in:170: -1- m4_pattern_allow([^LOCALDEFS$])
++m4trace:configure.in:171: -1- AC_FUNC_VPRINTF
++m4trace:configure.in:171: -1- AC_CHECK_FUNCS([vprintf], [
++AC_CHECK_FUNC(_doprnt,
++ [AC_DEFINE(HAVE_DOPRNT, 1,
++ [Define to 1 if you don't have `vprintf' but do have
++ `_doprnt.'])])])
++m4trace:configure.in:171: -1- AH_OUTPUT([HAVE_VPRINTF], [/* Define to 1 if you have the `vprintf\' function. */
++#undef HAVE_VPRINTF])
++m4trace:configure.in:171: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOPRNT])
++m4trace:configure.in:171: -1- m4_pattern_allow([^HAVE_DOPRNT$])
++m4trace:configure.in:171: -1- AH_OUTPUT([HAVE_DOPRNT], [/* Define to 1 if you don\'t have `vprintf\' but do have `_doprnt.\' */
++#undef HAVE_DOPRNT])
++m4trace:configure.in:204: -1- CYRUS_BERKELEY_DB_CHK([])
++m4trace:configure.in:204: -1- CYRUS_BERKELEY_DB_OPTS
++m4trace:configure.in:204: -1- CYRUS_BERKELEY_DB_CHK_LIB([])
++m4trace:configure.in:204: -1- CMU_ADD_LIBPATH_TO([$with_bdb_lib], [LDFLAGS])
++m4trace:configure.in:204: -1- CMU_ADD_LIBPATH_TO([$with_bdb_lib], [BDB_LIBADD])
++m4trace:configure.in:204: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++cmulocal/berkdb.m4:235: CYRUS_BERKELEY_DB_CHK_LIB is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++cmulocal/berkdb.m4:269: CYRUS_BERKELEY_DB_CHK is expanded from...
++configure.in:204: the top level])
++m4trace:configure.in:204: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++cmulocal/berkdb.m4:235: CYRUS_BERKELEY_DB_CHK_LIB is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++cmulocal/berkdb.m4:269: CYRUS_BERKELEY_DB_CHK is expanded from...
++configure.in:204: the top level])
++m4trace:configure.in:208: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++configure.in:208: the top level])
++m4trace:configure.in:212: -1- CMU_ADD_LIBPATH([$with_bdb_lib])
++m4trace:configure.in:217: -1- AC_SUBST([BDB_INC])
++m4trace:configure.in:217: -1- AC_SUBST_TRACE([BDB_INC])
++m4trace:configure.in:217: -1- m4_pattern_allow([^BDB_INC$])
++m4trace:configure.in:218: -1- AC_SUBST([BDB_LIB])
++m4trace:configure.in:218: -1- AC_SUBST_TRACE([BDB_LIB])
++m4trace:configure.in:218: -1- m4_pattern_allow([^BDB_LIB$])
++m4trace:configure.in:224: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BDB])
++m4trace:configure.in:224: -1- m4_pattern_allow([^HAVE_BDB$])
++m4trace:configure.in:224: -1- AH_OUTPUT([HAVE_BDB], [/* Build in Berkeley DB support? */
++#undef HAVE_BDB])
++m4trace:configure.in:229: -1- AC_SUBST([CYRUSDB_OBJS])
++m4trace:configure.in:229: -1- AC_SUBST_TRACE([CYRUSDB_OBJS])
++m4trace:configure.in:229: -1- m4_pattern_allow([^CYRUSDB_OBJS$])
++m4trace:configure.in:241: -1- AC_SUBST([SIEVE_OBJS])
++m4trace:configure.in:241: -1- AC_SUBST_TRACE([SIEVE_OBJS])
++m4trace:configure.in:241: -1- m4_pattern_allow([^SIEVE_OBJS$])
++m4trace:configure.in:243: -1- AC_SUBST([SIEVE_LIBS])
++m4trace:configure.in:243: -1- AC_SUBST_TRACE([SIEVE_LIBS])
++m4trace:configure.in:243: -1- m4_pattern_allow([^SIEVE_LIBS$])
++m4trace:configure.in:245: -1- AC_SUBST([SIEVE_CPPFLAGS])
++m4trace:configure.in:245: -1- AC_SUBST_TRACE([SIEVE_CPPFLAGS])
++m4trace:configure.in:245: -1- m4_pattern_allow([^SIEVE_CPPFLAGS$])
++m4trace:configure.in:246: -1- AC_DEFINE_TRACE_LITERAL([USE_SIEVE])
++m4trace:configure.in:246: -1- m4_pattern_allow([^USE_SIEVE$])
++m4trace:configure.in:246: -1- AH_OUTPUT([USE_SIEVE], [/* Build in Sieve support? */
++#undef USE_SIEVE])
++m4trace:configure.in:249: -1- AC_PROG_YACC
++m4trace:configure.in:249: -1- AC_SUBST([YACC])
++m4trace:configure.in:249: -1- AC_SUBST_TRACE([YACC])
++m4trace:configure.in:249: -1- m4_pattern_allow([^YACC$])
++m4trace:configure.in:249: -1- AC_SUBST([YACC])
++m4trace:configure.in:249: -1- AC_SUBST_TRACE([YACC])
++m4trace:configure.in:249: -1- m4_pattern_allow([^YACC$])
++m4trace:configure.in:249: -1- AC_SUBST([YFLAGS])
++m4trace:configure.in:249: -1- AC_SUBST_TRACE([YFLAGS])
++m4trace:configure.in:249: -1- m4_pattern_allow([^YFLAGS$])
++m4trace:configure.in:250: -1- AC_PROG_LEX
++m4trace:configure.in:250: -1- AC_SUBST([LEX])
++m4trace:configure.in:250: -1- AC_SUBST_TRACE([LEX])
++m4trace:configure.in:250: -1- m4_pattern_allow([^LEX$])
++m4trace:configure.in:250: -1- AC_CHECK_LIB([fl], [yywrap], [LEXLIB="-lfl"], [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")])
++m4trace:configure.in:250: -1- AC_CHECK_LIB([l], [yywrap], [LEXLIB="-ll"])
++m4trace:configure.in:250: -1- AC_SUBST([LEXLIB])
++m4trace:configure.in:250: -1- AC_SUBST_TRACE([LEXLIB])
++m4trace:configure.in:250: -1- m4_pattern_allow([^LEXLIB$])
++m4trace:configure.in:250: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])
++m4trace:configure.in:250: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT])
++m4trace:configure.in:250: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$])
++m4trace:configure.in:250: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER])
++m4trace:configure.in:250: -1- m4_pattern_allow([^YYTEXT_POINTER$])
++m4trace:configure.in:250: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a
++ `char[]\'. */
++#undef YYTEXT_POINTER])
++m4trace:configure.in:251: -1- AC_CHECK_LIB([fl], [main])
++m4trace:configure.in:251: -1- AH_OUTPUT([HAVE_LIBFL], [/* Define to 1 if you have the `fl\' library (-lfl). */
++#undef HAVE_LIBFL])
++m4trace:configure.in:251: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBFL])
++m4trace:configure.in:251: -1- m4_pattern_allow([^HAVE_LIBFL$])
++m4trace:configure.in:255: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_REGEX])
++m4trace:configure.in:255: -1- m4_pattern_allow([^ENABLE_REGEX$])
++m4trace:configure.in:255: -1- AH_OUTPUT([ENABLE_REGEX], [/* Do we have a decent regex library? */
++#undef ENABLE_REGEX])
++m4trace:configure.in:255: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RX])
++m4trace:configure.in:255: -2- m4_pattern_allow([^HAVE_RX$])
++m4trace:configure.in:255: -2- AH_OUTPUT([HAVE_RX], [/* Do we have rxposix.h? */
++#undef HAVE_RX])
++m4trace:configure.in:262: -1- AC_SUBST([SIEVE_SUBDIRS])
++m4trace:configure.in:262: -1- AC_SUBST_TRACE([SIEVE_SUBDIRS])
++m4trace:configure.in:262: -1- m4_pattern_allow([^SIEVE_SUBDIRS$])
++m4trace:configure.in:265: -2- AC_DEFINE_TRACE_LITERAL([HAS_STRERROR])
++m4trace:configure.in:265: -2- m4_pattern_allow([^HAS_STRERROR$])
++m4trace:configure.in:265: -2- AH_OUTPUT([HAS_STRERROR], [/* Do we have strerror()? */
++#undef HAS_STRERROR])
++m4trace:configure.in:266: -2- AC_DEFINE_TRACE_LITERAL([NEED_SYS_ERRLIST])
++m4trace:configure.in:266: -2- m4_pattern_allow([^NEED_SYS_ERRLIST$])
++m4trace:configure.in:266: -2- AH_OUTPUT([NEED_SYS_ERRLIST], [/* Do we have a sys_errlist? */
++#undef NEED_SYS_ERRLIST])
++m4trace:configure.in:266: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete.
++You should run autoupdate.], [autoconf/functions.m4:138: AC_FUNC_CHECK is expanded from...
++configure.in:266: the top level])
++m4trace:configure.in:269: -1- AC_CHECK_HEADERS([sys/resource.h])
++m4trace:configure.in:269: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the <sys/resource.h> header file. */
++#undef HAVE_SYS_RESOURCE_H])
++m4trace:configure.in:270: -1- AC_CHECK_FUNCS([setrlimit])
++m4trace:configure.in:270: -1- AH_OUTPUT([HAVE_SETRLIMIT], [/* Define to 1 if you have the `setrlimit\' function. */
++#undef HAVE_SETRLIMIT])
++m4trace:configure.in:271: -1- AC_CHECK_FUNCS([getrlimit])
++m4trace:configure.in:271: -1- AH_OUTPUT([HAVE_GETRLIMIT], [/* Define to 1 if you have the `getrlimit\' function. */
++#undef HAVE_GETRLIMIT])
++m4trace:configure.in:274: -1- AC_CHECK_FUNCS([daemon setsid])
++m4trace:configure.in:274: -1- AH_OUTPUT([HAVE_DAEMON], [/* Define to 1 if you have the `daemon\' function. */
++#undef HAVE_DAEMON])
++m4trace:configure.in:274: -1- AH_OUTPUT([HAVE_SETSID], [/* Define to 1 if you have the `setsid\' function. */
++#undef HAVE_SETSID])
++m4trace:configure.in:277: -1- AC_CHECK_FUNCS([shutdown])
++m4trace:configure.in:277: -1- AH_OUTPUT([HAVE_SHUTDOWN], [/* Define to 1 if you have the `shutdown\' function. */
++#undef HAVE_SHUTDOWN])
++m4trace:configure.in:279: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKLEN_T])
++m4trace:configure.in:279: -2- m4_pattern_allow([^HAVE_SOCKLEN_T$])
++m4trace:configure.in:279: -2- AH_OUTPUT([HAVE_SOCKLEN_T], [/* Do we have a socklen_t? */
++#undef HAVE_SOCKLEN_T])
++m4trace:configure.in:281: -2- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE])
++m4trace:configure.in:281: -2- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE$])
++m4trace:configure.in:281: -2- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE], [/* Do we have a sockaddr_storage? */
++#undef HAVE_STRUCT_SOCKADDR_STORAGE])
++m4trace:configure.in:282: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RLIM_T])
++m4trace:configure.in:282: -2- m4_pattern_allow([^HAVE_RLIM_T$])
++m4trace:configure.in:282: -2- AH_OUTPUT([HAVE_RLIM_T], [/* Do we have an rlim_t? */
++#undef HAVE_RLIM_T])
++m4trace:configure.in:290: -1- AC_CHECK_LIB([util], [setproctitle], [spt_type=SPT_BUILTIN
++ LIBS="${LIBS} -lutil"])
++m4trace:configure.in:305: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++configure.in:305: the top level])
++m4trace:configure.in:316: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++configure.in:316: the top level])
++m4trace:configure.in:327: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++configure.in:327: the top level])
++m4trace:configure.in:334: -1- AC_DEFINE_TRACE_LITERAL([SPT_TYPE])
++m4trace:configure.in:334: -1- m4_pattern_allow([^SPT_TYPE$])
++m4trace:configure.in:334: -1- AH_OUTPUT([SPT_TYPE], [/* Do we already have setproctitle? */
++#undef SPT_TYPE])
++m4trace:configure.in:344: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++configure.in:344: the top level])
++m4trace:configure.in:346: -1- AC_SUBST([WITH_NONBLOCK])
++m4trace:configure.in:346: -1- AC_SUBST_TRACE([WITH_NONBLOCK])
++m4trace:configure.in:346: -1- m4_pattern_allow([^WITH_NONBLOCK$])
++m4trace:configure.in:353: -2- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++configure.in:353: the top level])
++m4trace:configure.in:355: -1- AC_SUBST([WITH_GMTOFF])
++m4trace:configure.in:355: -1- AC_SUBST_TRACE([WITH_GMTOFF])
++m4trace:configure.in:355: -1- m4_pattern_allow([^WITH_GMTOFF$])
++m4trace:configure.in:383: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2490: AC_TRY_RUN is expanded from...
++configure.in:383: the top level])
++m4trace:configure.in:415: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2490: AC_TRY_RUN is expanded from...
++configure.in:415: the top level])
++m4trace:configure.in:426: -1- AC_SUBST([WITH_MAP])
++m4trace:configure.in:426: -1- AC_SUBST_TRACE([WITH_MAP])
++m4trace:configure.in:426: -1- m4_pattern_allow([^WITH_MAP$])
++m4trace:configure.in:435: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/functions.m4:75: AC_CHECK_FUNC is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/functions.m4:75: AC_CHECK_FUNC is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1400: AC_ARG_WITH is expanded from...
++configure.in:435: the top level])
++m4trace:configure.in:437: -1- AC_SUBST([WITH_LOCK])
++m4trace:configure.in:437: -1- AC_SUBST_TRACE([WITH_LOCK])
++m4trace:configure.in:437: -1- m4_pattern_allow([^WITH_LOCK$])
++m4trace:configure.in:441: -2- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC])
++m4trace:configure.in:441: -2- m4_pattern_allow([^HAVE_FDATASYNC$])
++m4trace:configure.in:441: -2- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */
++#undef HAVE_FDATASYNC])
++m4trace:configure.in:446: -1- AC_CHECK_LIB([rt], [fdatasync], [
++ LIB_RT="-lrt"
++ AC_DEFINE(HAVE_FDATASYNC,[],[Do we have fdatasync()?])
++ ])
++m4trace:configure.in:446: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC])
++m4trace:configure.in:446: -1- m4_pattern_allow([^HAVE_FDATASYNC$])
++m4trace:configure.in:446: -1- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */
++#undef HAVE_FDATASYNC])
++m4trace:configure.in:467: -1- AC_CHECK_LIB([BSD], [sigvec], [cyrus_sigveclib="-lBSD"], [
++ dnl not hp flavor
++ SAVE_LDFLAGS="$LDFLAGS"
++ dnl solaris flavor
++ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
++ AC_CHECK_LIB(ucb, sigvec, [
++ dnl more solaris flavor
++ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"],
++ [ cant_find_sigvec=yes ])
++ LDFLAGS="$SAVE_LDFLAGS"])
++m4trace:configure.in:467: -1- AC_CHECK_LIB([ucb], [sigvec], [
++ dnl more solaris flavor
++ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"], [ cant_find_sigvec=yes ])
++m4trace:configure.in:468: -1- AC_SUBST([cyrus_sigveclib])
++m4trace:configure.in:468: -1- AC_SUBST_TRACE([cyrus_sigveclib])
++m4trace:configure.in:468: -1- m4_pattern_allow([^cyrus_sigveclib$])
++m4trace:configure.in:482: -1- SASL_SET_GSSAPI_LIBS
++m4trace:configure.in:482: -1- AC_DEFINE_TRACE_LITERAL([AFSPTS_USE_KRB5])
++m4trace:configure.in:482: -1- m4_pattern_allow([^AFSPTS_USE_KRB5$])
++m4trace:configure.in:482: -1- AH_OUTPUT([AFSPTS_USE_KRB5], [/* Should the AFS PTS plugin use krb5? */
++#undef AFSPTS_USE_KRB5])
++m4trace:configure.in:494: -1- CMU_ADD_LIBPATH_TO([/usr/ucblib], [AFS_LDFLAGS])
++m4trace:configure.in:515: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++configure.in:515: the top level])
++m4trace:configure.in:521: -1- AC_SUBST([AFS_LIBS])
++m4trace:configure.in:521: -1- AC_SUBST_TRACE([AFS_LIBS])
++m4trace:configure.in:521: -1- m4_pattern_allow([^AFS_LIBS$])
++m4trace:configure.in:522: -1- AC_SUBST([AFS_LDFLAGS])
++m4trace:configure.in:522: -1- AC_SUBST_TRACE([AFS_LDFLAGS])
++m4trace:configure.in:522: -1- m4_pattern_allow([^AFS_LDFLAGS$])
++m4trace:configure.in:523: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB])
++m4trace:configure.in:523: -1- m4_pattern_allow([^HAVE_AFSKRB$])
++m4trace:configure.in:523: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */
++#undef HAVE_AFSKRB])
++m4trace:configure.in:527: -1- AC_SUBST([AFS_LIBS])
++m4trace:configure.in:527: -1- AC_SUBST_TRACE([AFS_LIBS])
++m4trace:configure.in:527: -1- m4_pattern_allow([^AFS_LIBS$])
++m4trace:configure.in:528: -1- AC_SUBST([AFS_LDFLAGS])
++m4trace:configure.in:528: -1- AC_SUBST_TRACE([AFS_LDFLAGS])
++m4trace:configure.in:528: -1- m4_pattern_allow([^AFS_LDFLAGS$])
++m4trace:configure.in:529: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB])
++m4trace:configure.in:529: -1- m4_pattern_allow([^HAVE_AFSKRB$])
++m4trace:configure.in:529: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */
++#undef HAVE_AFSKRB])
++m4trace:configure.in:557: -1- AC_CHECK_LIB([ldap], [ldap_initialize], [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
++ AC_SUBST(LDAP_CPPFLAGS)
++ AC_SUBST(LDAP_LDFLAGS)
++ AC_SUBST(LDAP_LIBS)
++ LDAP_LIBS="-lldap -llber" ], [], [-llber])
++m4trace:configure.in:557: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP])
++m4trace:configure.in:557: -1- m4_pattern_allow([^HAVE_LDAP$])
++m4trace:configure.in:557: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */
++#undef HAVE_LDAP])
++m4trace:configure.in:557: -1- AC_SUBST([LDAP_CPPFLAGS])
++m4trace:configure.in:557: -1- AC_SUBST_TRACE([LDAP_CPPFLAGS])
++m4trace:configure.in:557: -1- m4_pattern_allow([^LDAP_CPPFLAGS$])
++m4trace:configure.in:557: -1- AC_SUBST([LDAP_LDFLAGS])
++m4trace:configure.in:557: -1- AC_SUBST_TRACE([LDAP_LDFLAGS])
++m4trace:configure.in:557: -1- m4_pattern_allow([^LDAP_LDFLAGS$])
++m4trace:configure.in:557: -1- AC_SUBST([LDAP_LIBS])
++m4trace:configure.in:557: -1- AC_SUBST_TRACE([LDAP_LIBS])
++m4trace:configure.in:557: -1- m4_pattern_allow([^LDAP_LIBS$])
++m4trace:configure.in:567: -1- AC_CHECK_LIB([ldap], [ldap_initialize], [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
++ AC_SUBST(LDAP_CPPFLAGS)
++ AC_SUBST(LDAP_LDFLAGS)
++ AC_SUBST(LDAP_LIBS)
++ LDAP_LIBS="-lldap -llber" ], [], [-llber])
++m4trace:configure.in:567: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP])
++m4trace:configure.in:567: -1- m4_pattern_allow([^HAVE_LDAP$])
++m4trace:configure.in:567: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */
++#undef HAVE_LDAP])
++m4trace:configure.in:567: -1- AC_SUBST([LDAP_CPPFLAGS])
++m4trace:configure.in:567: -1- AC_SUBST_TRACE([LDAP_CPPFLAGS])
++m4trace:configure.in:567: -1- m4_pattern_allow([^LDAP_CPPFLAGS$])
++m4trace:configure.in:567: -1- AC_SUBST([LDAP_LDFLAGS])
++m4trace:configure.in:567: -1- AC_SUBST_TRACE([LDAP_LDFLAGS])
++m4trace:configure.in:567: -1- m4_pattern_allow([^LDAP_LDFLAGS$])
++m4trace:configure.in:567: -1- AC_SUBST([LDAP_LIBS])
++m4trace:configure.in:567: -1- AC_SUBST_TRACE([LDAP_LIBS])
++m4trace:configure.in:567: -1- m4_pattern_allow([^LDAP_LIBS$])
++m4trace:configure.in:577: -1- AC_DEFINE_TRACE_LITERAL([WITH_PTS])
++m4trace:configure.in:577: -1- m4_pattern_allow([^WITH_PTS$])
++m4trace:configure.in:577: -1- AH_OUTPUT([WITH_PTS], [/* Build in PTS support? */
++#undef WITH_PTS])
++m4trace:configure.in:588: -1- AC_SUBST([SERVER_SUBDIRS])
++m4trace:configure.in:588: -1- AC_SUBST_TRACE([SERVER_SUBDIRS])
++m4trace:configure.in:588: -1- m4_pattern_allow([^SERVER_SUBDIRS$])
++m4trace:configure.in:606: -1- AC_CHECK_LIB([resolv], [res_search])
++m4trace:configure.in:606: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
++#undef HAVE_LIBRESOLV])
++m4trace:configure.in:606: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
++m4trace:configure.in:606: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
++m4trace:configure.in:623: -1- AC_CHECK_LIB([des], [des_ecb_encrypt], [if test "$with_statickrb" = "yes"; then
++ KRB_LIBS="$with_krb/lib/libdes.a"
++ else
++ KRB_LIBS="-ldes"
++ fi], [{ { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
++echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
++ { (exit 1); exit 1; }; }])
++m4trace:configure.in:643: -1- CMU_ADD_LIBPATH([${with_krb}/lib])
++m4trace:configure.in:660: -3- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++configure.in:660: the top level])
++m4trace:configure.in:661: -2- AC_CHECK_LIB([${KRBLIB}], [krb_mk_priv], [if test "$with_statickrb" = "yes"; then
++ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
++ else
++ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
++ fi], [{ echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
++echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no], [$KRB_LIBS])
++m4trace:configure.in:662: -2- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++configure.in:662: the top level])
++m4trace:configure.in:664: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++configure.in:664: the top level])
++m4trace:configure.in:669: -1- AC_DEFINE_TRACE_LITERAL([HAVE_KRB])
++m4trace:configure.in:669: -1- m4_pattern_allow([^HAVE_KRB$])
++m4trace:configure.in:669: -1- AH_OUTPUT([HAVE_KRB], [/* Support for Kerberos? */
++#undef HAVE_KRB])
++m4trace:configure.in:674: -1- SASL_SET_GSSAPI_LIBS
++m4trace:configure.in:693: -1- AC_CHECK_LIB([rsaref], [RSAPublicEncrypt], [LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes], [cmu_have_rsaref=no])
++m4trace:configure.in:698: -1- AC_CHECK_LIB([crypto], [BIO_accept], [LIBS="-lcrypto $LIB_RSAREF ${LIBS}"], [with_openssl="no"], [$LIB_RSAREF])
++m4trace:configure.in:700: -1- AC_CHECK_LIB([ssl], [SSL_CTX_new], [LIBS="-lssl ${LIBS}"], [with_openssl="no"], [-lcrypto $LIB_RSAREF])
++m4trace:configure.in:707: -1- CMU_ADD_LIBPATH([${OPENSSL_LIBPATH}])
++m4trace:configure.in:708: -1- CMU_ADD_LIBPATH_TO([${OPENSSL_LIBPATH}], [OPENSSL_LIB])
++m4trace:configure.in:716: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSL])
++m4trace:configure.in:716: -1- m4_pattern_allow([^HAVE_SSL$])
++m4trace:configure.in:716: -1- AH_OUTPUT([HAVE_SSL], [/* Build with SSL support? */
++#undef HAVE_SSL])
++m4trace:configure.in:719: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_ENABLE_OLD_DES_SUPPORT])
++m4trace:configure.in:719: -1- m4_pattern_allow([^OPENSSL_ENABLE_OLD_DES_SUPPORT$])
++m4trace:configure.in:719: -1- AH_OUTPUT([OPENSSL_ENABLE_OLD_DES_SUPPORT], [/* Configure OpenSSL to provide legacy des apis */
++#undef OPENSSL_ENABLE_OLD_DES_SUPPORT])
++m4trace:configure.in:720: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_DES_LIBDES_COMPATIBILITY])
++m4trace:configure.in:720: -1- m4_pattern_allow([^OPENSSL_DES_LIBDES_COMPATIBILITY$])
++m4trace:configure.in:720: -1- AH_OUTPUT([OPENSSL_DES_LIBDES_COMPATIBILITY], [/* Configure OpenSSL to provide krb4-compatible legacy des apis */
++#undef OPENSSL_DES_LIBDES_COMPATIBILITY])
++m4trace:configure.in:723: -1- AC_SUBST([OPENSSL_INC])
++m4trace:configure.in:723: -1- AC_SUBST_TRACE([OPENSSL_INC])
++m4trace:configure.in:723: -1- m4_pattern_allow([^OPENSSL_INC$])
++m4trace:configure.in:724: -1- AC_SUBST([OPENSSL_LIB])
++m4trace:configure.in:724: -1- AC_SUBST_TRACE([OPENSSL_LIB])
++m4trace:configure.in:724: -1- m4_pattern_allow([^OPENSSL_LIB$])
++m4trace:configure.in:735: -1- AC_DEFINE_TRACE_LITERAL([EGD_SOCKET])
++m4trace:configure.in:735: -1- m4_pattern_allow([^EGD_SOCKET$])
++m4trace:configure.in:735: -1- AH_OUTPUT([EGD_SOCKET], [/* Alternative to /dev/urandom? */
++#undef EGD_SOCKET])
++m4trace:configure.in:755: -1- AC_CHECK_LIB([zephyr], [ZInitialize], [ZEPHYR_LIBS="-lzephyr"], [with_zephyr="no"], [])
++m4trace:configure.in:763: -1- AC_SUBST([ZEPHYR_LIBS])
++m4trace:configure.in:763: -1- AC_SUBST_TRACE([ZEPHYR_LIBS])
++m4trace:configure.in:763: -1- m4_pattern_allow([^ZEPHYR_LIBS$])
++m4trace:configure.in:764: -1- AC_SUBST([ZEPHYR_CPPFLAGS])
++m4trace:configure.in:764: -1- AC_SUBST_TRACE([ZEPHYR_CPPFLAGS])
++m4trace:configure.in:764: -1- m4_pattern_allow([^ZEPHYR_CPPFLAGS$])
++m4trace:configure.in:766: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ZEPHYR])
++m4trace:configure.in:766: -1- m4_pattern_allow([^HAVE_ZEPHYR$])
++m4trace:configure.in:766: -1- AH_OUTPUT([HAVE_ZEPHYR], [/* Build with Zephyr support? */
++#undef HAVE_ZEPHYR])
++m4trace:configure.in:776: -1- AC_DEFINE_TRACE_LITERAL([MASTER_PIDFILE])
++m4trace:configure.in:776: -1- m4_pattern_allow([^MASTER_PIDFILE$])
++m4trace:configure.in:776: -1- AH_OUTPUT([MASTER_PIDFILE], [/* Name of the pidfile for master */
++#undef MASTER_PIDFILE])
++m4trace:configure.in:809: -1- AC_CHECK_HEADERS([sys/sockio.h])
++m4trace:configure.in:809: -1- AH_OUTPUT([HAVE_SYS_SOCKIO_H], [/* Define to 1 if you have the <sys/sockio.h> header file. */
++#undef HAVE_SYS_SOCKIO_H])
++m4trace:configure.in:823: -1- AC_SUBST([IMAP_PROGS])
++m4trace:configure.in:823: -1- AC_SUBST_TRACE([IMAP_PROGS])
++m4trace:configure.in:823: -1- m4_pattern_allow([^IMAP_PROGS$])
++m4trace:configure.in:855: -1- AC_CHECK_LIB([com_err], [com_err], [
++ # com_err is already in library path
++ # guess we're okay
++ # can use system com_err
++ with_com_err=""
++ AC_CHECK_HEADER(et/com_err.h,
++ [AC_DEFINE(HAVE_ET_COM_ERR_H,[],[We need et/com_err.h])],
++ [AC_CHECK_HEADER(com_err.h,[],[AC_ERROR([cannot locate com_err.h])])])
++ AC_PATH_PROG(COMPILE_ET, compile_et, [no compile et])
++ ], [
++ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
++ with_com_err="/usr/local"
++ AC_PATH_PROG(COMPILE_ET, /usr/local/bin/compile_et, [no compile et])
++ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
++ with_com_err="/usr"
++ AC_PATH_PROG(COMPILE_ET, /usr/bin/compile_et, [no compile et])
++ else
++ # use ours
++ with_com_err=yes
++ fi
++ ])
++m4trace:configure.in:855: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ET_COM_ERR_H])
++m4trace:configure.in:855: -1- m4_pattern_allow([^HAVE_ET_COM_ERR_H$])
++m4trace:configure.in:855: -1- AH_OUTPUT([HAVE_ET_COM_ERR_H], [/* We need et/com_err.h */
++#undef HAVE_ET_COM_ERR_H])
++m4trace:configure.in:855: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/libs.m4:139: AC_CHECK_LIB is expanded from...
++configure.in:855: the top level])
++m4trace:configure.in:855: -1- AC_SUBST([COMPILE_ET])
++m4trace:configure.in:855: -1- AC_SUBST_TRACE([COMPILE_ET])
++m4trace:configure.in:855: -1- m4_pattern_allow([^COMPILE_ET$])
++m4trace:configure.in:855: -1- AC_SUBST([COMPILE_ET])
++m4trace:configure.in:855: -1- AC_SUBST_TRACE([COMPILE_ET])
++m4trace:configure.in:855: -1- m4_pattern_allow([^COMPILE_ET$])
++m4trace:configure.in:855: -1- AC_SUBST([COMPILE_ET])
++m4trace:configure.in:855: -1- AC_SUBST_TRACE([COMPILE_ET])
++m4trace:configure.in:855: -1- m4_pattern_allow([^COMPILE_ET$])
++m4trace:configure.in:896: -1- AC_SUBST([COMPILE_ET])
++m4trace:configure.in:896: -1- AC_SUBST_TRACE([COMPILE_ET])
++m4trace:configure.in:896: -1- m4_pattern_allow([^COMPILE_ET$])
++m4trace:configure.in:897: -1- AC_SUBST([COM_ERR_LIBS])
++m4trace:configure.in:897: -1- AC_SUBST_TRACE([COM_ERR_LIBS])
++m4trace:configure.in:897: -1- m4_pattern_allow([^COM_ERR_LIBS$])
++m4trace:configure.in:898: -1- AC_SUBST([COM_ERR_LDFLAGS])
++m4trace:configure.in:898: -1- AC_SUBST_TRACE([COM_ERR_LDFLAGS])
++m4trace:configure.in:898: -1- m4_pattern_allow([^COM_ERR_LDFLAGS$])
++m4trace:configure.in:899: -1- AC_SUBST([COM_ERR_CPPFLAGS])
++m4trace:configure.in:899: -1- AC_SUBST_TRACE([COM_ERR_CPPFLAGS])
++m4trace:configure.in:899: -1- m4_pattern_allow([^COM_ERR_CPPFLAGS$])
++m4trace:configure.in:905: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++configure.in:905: the top level])
++m4trace:configure.in:920: -1- AC_DEFINE_TRACE_LITERAL([SYSLOG_FACILITY])
++m4trace:configure.in:920: -1- m4_pattern_allow([^SYSLOG_FACILITY$])
++m4trace:configure.in:920: -1- AH_OUTPUT([SYSLOG_FACILITY], [/* Syslog facility to use. */
++#undef SYSLOG_FACILITY])
++m4trace:configure.in:924: -1- AC_LIBSOURCE([getdtablesize.c])
++m4trace:configure.in:924: -1- AC_CHECK_FUNCS([getdtablesize], [], [_AC_LIBOBJ($ac_func)])
++m4trace:configure.in:924: -1- AH_OUTPUT([HAVE_GETDTABLESIZE], [/* Define to 1 if you have the `getdtablesize\' function. */
++#undef HAVE_GETDTABLESIZE])
++m4trace:configure.in:924: -1- AC_SUBST([LIB@&t at OBJS], ["$LIB@&t at OBJS $ac_func.$ac_objext"])
++m4trace:configure.in:924: -1- AC_SUBST_TRACE([LIB@&t at OBJS])
++m4trace:configure.in:924: -1- m4_pattern_allow([^LIB@&t at OBJS$])
++m4trace:configure.in:937: -2- AC_DEFINE_TRACE_LITERAL([OLD_SIEVE_SERVICE_NAME])
++m4trace:configure.in:937: -2- m4_pattern_allow([^OLD_SIEVE_SERVICE_NAME$])
++m4trace:configure.in:937: -2- AH_OUTPUT([OLD_SIEVE_SERVICE_NAME], [/* Use "imap" as sieve service name? */
++#undef OLD_SIEVE_SERVICE_NAME])
++m4trace:configure.in:946: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_LISTEXT])
++m4trace:configure.in:946: -2- m4_pattern_allow([^ENABLE_LISTEXT$])
++m4trace:configure.in:946: -2- AH_OUTPUT([ENABLE_LISTEXT], [/* Enable the LISTEXT extension? */
++#undef ENABLE_LISTEXT])
++m4trace:configure.in:953: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_X_NETSCAPE_HACK])
++m4trace:configure.in:953: -2- m4_pattern_allow([^ENABLE_X_NETSCAPE_HACK$])
++m4trace:configure.in:953: -2- AH_OUTPUT([ENABLE_X_NETSCAPE_HACK], [/* Enable Netscape Menu Option Hack? */
++#undef ENABLE_X_NETSCAPE_HACK])
++m4trace:configure.in:956: -1- AC_CHECK_LIB([dl], [dlopen])
++m4trace:configure.in:956: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the `dl\' library (-ldl). */
++#undef HAVE_LIBDL])
++m4trace:configure.in:956: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
++m4trace:configure.in:956: -1- m4_pattern_allow([^HAVE_LIBDL$])
++m4trace:configure.in:957: -1- CMU_SASL2_REQUIRE_VER([2], [1], [7])
++m4trace:configure.in:957: -1- CMU_SASL2_REQUIRED
++m4trace:configure.in:957: -1- CMU_SASL2
++m4trace:configure.in:957: -1- SASL_GSSAPI_CHK
++m4trace:configure.in:957: -1- SASL2_CRYPT_CHK
++m4trace:configure.in:957: -1- AC_CHECK_LIB([crypt], [crypt], [LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes], [cmu_have_crypt=no])
++m4trace:configure.in:957: -1- AC_SUBST([LIB_CRYPT])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([LIB_CRYPT])
++m4trace:configure.in:957: -1- m4_pattern_allow([^LIB_CRYPT$])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++autoconf/general.m4:1382: AC_ARG_ENABLE is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++autoconf/general.m4:1400: AC_ARG_WITH is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSSAPI_H])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSSAPI_H$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSSAPI_H], [/* Define if you have the gssapi.h header file */
++#undef HAVE_GSSAPI_H])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([resolv], [res_search])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
++#undef HAVE_LIBRESOLV])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gssapi], [gss_unwrap], [gss_impl="heimdal"], [gss_failed=1], [${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET}])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([krb5support], [krb5int_getspecific], [K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a], [], [${LIB_SOCKET}])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gssapi_krb5], [gss_unwrap], [gss_impl="mit"], [gss_failed=1], [${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gss], [csf_gss_acq_user], [gss_impl="cybersafe03"], [unset ac_cv_lib_gss_csf_gss_acq_user;
++ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
++ gss_failed=1,$GSSAPIBASE_LIBS -lgss)], [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gss], [csf_gss_acq_user], [gss_impl="cybersafe"], [gss_failed=1], [$GSSAPIBASE_LIBS -lgss])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gss], [gss_unwrap], [gss_impl="seam"], [gss_failed=1], [-lgss])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
++#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:2334: AC_EGREP_CPP is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
++#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
++#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
++#undef HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:2334: AC_EGREP_CPP is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
++#undef HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
++#undef HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([resolv], [res_search], [GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"])
++m4trace:configure.in:957: -1- AC_CHECK_FUNCS([gsskrb5_register_acceptor_identity])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY], [/* Define to 1 if you have the `gsskrb5_register_acceptor_identity\' function.
++ */
++#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY])
++m4trace:configure.in:957: -1- AC_SUBST([GSSAPI_LIBS])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([GSSAPI_LIBS])
++m4trace:configure.in:957: -1- m4_pattern_allow([^GSSAPI_LIBS$])
++m4trace:configure.in:957: -1- AC_SUBST([GSSAPIBASE_LIBS])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([GSSAPIBASE_LIBS])
++m4trace:configure.in:957: -1- m4_pattern_allow([^GSSAPIBASE_LIBS$])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++autoconf/general.m4:1400: AC_ARG_WITH is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++autoconf/general.m4:1400: AC_ARG_WITH is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- CMU_ADD_LIBPATH_TO([$ac_cv_sasl_where_lib], [LIB_DYN_SASL])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([sasl2], [prop_get], [ac_cv_found_sasl=yes], [ac_cv_found_sasl=no])
++m4trace:configure.in:957: -1- CMU_ADD_LIBPATH_TO([$ac_cv_sasl_where_lib], [DYNLIB_SASL])
++m4trace:configure.in:957: -1- AC_SUBST([LIB_DYN_SASL])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([LIB_DYN_SASL])
++m4trace:configure.in:957: -1- m4_pattern_allow([^LIB_DYN_SASL$])
++m4trace:configure.in:957: -1- AC_SUBST([DYNSASLFLAGS])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([DYNSASLFLAGS])
++m4trace:configure.in:957: -1- m4_pattern_allow([^DYNSASLFLAGS$])
++m4trace:configure.in:957: -1- AC_SUBST([LIB_SASL])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([LIB_SASL])
++m4trace:configure.in:957: -1- m4_pattern_allow([^LIB_SASL$])
++m4trace:configure.in:957: -1- AC_SUBST([SASLFLAGS])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([SASLFLAGS])
++m4trace:configure.in:957: -1- m4_pattern_allow([^SASLFLAGS$])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:2294: _AC_PREPROC_IFELSE is expanded from...
++autoconf/general.m4:2304: AC_PREPROC_IFELSE is expanded from...
++autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:958: -1- CMU_SASL2_CHECKAPOP_REQUIRED
++m4trace:configure.in:958: -1- AC_CHECK_LIB([sasl2], [sasl_checkapop], [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])], [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
++m4trace:configure.in:958: -1- AC_DEFINE_TRACE_LITERAL([HAVE_APOP])
++m4trace:configure.in:958: -1- m4_pattern_allow([^HAVE_APOP$])
++m4trace:configure.in:958: -1- AH_OUTPUT([HAVE_APOP], [/* Does SASL support APOP? */
++#undef HAVE_APOP])
++m4trace:configure.in:971: -1- AC_SUBST([PERL])
++m4trace:configure.in:971: -1- AC_SUBST_TRACE([PERL])
++m4trace:configure.in:971: -1- m4_pattern_allow([^PERL$])
++m4trace:configure.in:987: -1- AC_SUBST([PERL_CCCDLFLAGS])
++m4trace:configure.in:987: -1- AC_SUBST_TRACE([PERL_CCCDLFLAGS])
++m4trace:configure.in:987: -1- m4_pattern_allow([^PERL_CCCDLFLAGS$])
++m4trace:configure.in:1005: -2- AC_CHECK_LIB([md], [MD5Init], [LIBS="${LIBS} -lmd"], [MD5OBJ="md5.o"])
++m4trace:configure.in:1005: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete.
++You should run autoupdate.], [autoconf/functions.m4:138: AC_FUNC_CHECK is expanded from...
++configure.in:1005: the top level])
++m4trace:configure.in:1006: -1- AC_SUBST([MD5OBJ])
++m4trace:configure.in:1006: -1- AC_SUBST_TRACE([MD5OBJ])
++m4trace:configure.in:1006: -1- m4_pattern_allow([^MD5OBJ$])
++m4trace:configure.in:1011: -1- AC_SUBST([SNMP_SUBDIRS])
++m4trace:configure.in:1011: -1- AC_SUBST_TRACE([SNMP_SUBDIRS])
++m4trace:configure.in:1011: -1- m4_pattern_allow([^SNMP_SUBDIRS$])
++m4trace:configure.in:1013: -1- CMU_LIBWRAP
++m4trace:configure.in:1013: -1- CMU_FIND_LIB_SUBDIR
++m4trace:configure.in:1013: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++cmulocal/common.m4:61: CMU_FIND_LIB_SUBDIR is expanded from...
++cmulocal/libwrap.m4:30: CMU_LIBWRAP is expanded from...
++configure.in:1013: the top level])
++m4trace:configure.in:1013: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
++m4trace:configure.in:1013: -1- m4_pattern_allow([^SIZEOF_LONG$])
++m4trace:configure.in:1013: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */
++#undef SIZEOF_LONG])
++m4trace:configure.in:1013: -1- AC_SUBST([CMU_LIB_SUBDIR], [$ac_cv_cmu_lib_subdir])
++m4trace:configure.in:1013: -1- AC_SUBST_TRACE([CMU_LIB_SUBDIR])
++m4trace:configure.in:1013: -1- m4_pattern_allow([^CMU_LIB_SUBDIR$])
++m4trace:configure.in:1013: -1- AC_CHECK_LIB([wrap], [request_init], [
++ AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)], [with_libwrap=no], [${LIB_SOCKET}])
++m4trace:configure.in:1013: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBWRAP])
++m4trace:configure.in:1013: -1- m4_pattern_allow([^HAVE_LIBWRAP$])
++m4trace:configure.in:1013: -1- AH_OUTPUT([HAVE_LIBWRAP], [/* Do we have TCP wrappers? */
++#undef HAVE_LIBWRAP])
++m4trace:configure.in:1013: -1- AC_CHECK_LIB([nsl], [yp_get_default_domain], [LIB_WRAP="${LIB_WRAP} -lnsl"])
++m4trace:configure.in:1013: -1- AC_SUBST([LIB_WRAP])
++m4trace:configure.in:1013: -1- AC_SUBST_TRACE([LIB_WRAP])
++m4trace:configure.in:1013: -1- m4_pattern_allow([^LIB_WRAP$])
++m4trace:configure.in:1014: -1- CMU_UCDSNMP
++m4trace:configure.in:1014: -1- AC_SUBST([SNMP_CONFIG])
++m4trace:configure.in:1014: -1- AC_SUBST_TRACE([SNMP_CONFIG])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^SNMP_CONFIG$])
++m4trace:configure.in:1014: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETSNMP])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^HAVE_NETSNMP$])
++m4trace:configure.in:1014: -1- AH_OUTPUT([HAVE_NETSNMP], [/* Do we have Net-SNMP support? */
++#undef HAVE_NETSNMP])
++m4trace:configure.in:1014: -1- AC_SUBST([LIB_UCDSNMP])
++m4trace:configure.in:1014: -1- AC_SUBST_TRACE([LIB_UCDSNMP])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^LIB_UCDSNMP$])
++m4trace:configure.in:1014: -1- AC_CHECK_LIB([snmp], [sprint_objid], [
++ AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)], [with_snmp=no], [${LIB_SOCKET}])
++m4trace:configure.in:1014: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UCDSNMP])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^HAVE_UCDSNMP$])
++m4trace:configure.in:1014: -1- AH_OUTPUT([HAVE_UCDSNMP], [/* Do we have UCD-SNMP support? */
++#undef HAVE_UCDSNMP])
++m4trace:configure.in:1014: -1- AC_CHECK_LIB([rpm], [rpmdbOpen], [LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"], [], [-lpopt])
++m4trace:configure.in:1014: -1- AC_SUBST([LIB_UCDSNMP])
++m4trace:configure.in:1014: -1- AC_SUBST_TRACE([LIB_UCDSNMP])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^LIB_UCDSNMP$])
++m4trace:configure.in:1049: -1- AC_SUBST([LIB_RT])
++m4trace:configure.in:1049: -1- AC_SUBST_TRACE([LIB_RT])
++m4trace:configure.in:1049: -1- m4_pattern_allow([^LIB_RT$])
++m4trace:configure.in:1050: -1- AC_SUBST([IMAP_COM_ERR_LIBS])
++m4trace:configure.in:1050: -1- AC_SUBST_TRACE([IMAP_COM_ERR_LIBS])
++m4trace:configure.in:1050: -1- m4_pattern_allow([^IMAP_COM_ERR_LIBS$])
++m4trace:configure.in:1051: -1- AC_SUBST([IMAP_LIBS])
++m4trace:configure.in:1051: -1- AC_SUBST_TRACE([IMAP_LIBS])
++m4trace:configure.in:1051: -1- m4_pattern_allow([^IMAP_LIBS$])
++m4trace:configure.in:1059: -1- AC_SUBST([PERL_SUBDIRS])
++m4trace:configure.in:1059: -1- AC_SUBST_TRACE([PERL_SUBDIRS])
++m4trace:configure.in:1059: -1- m4_pattern_allow([^PERL_SUBDIRS$])
++m4trace:configure.in:1060: -1- AC_SUBST([PERL_DEPSUBDIRS])
++m4trace:configure.in:1060: -1- AC_SUBST_TRACE([PERL_DEPSUBDIRS])
++m4trace:configure.in:1060: -1- m4_pattern_allow([^PERL_DEPSUBDIRS$])
++m4trace:configure.in:1061: -1- AC_SUBST([PERL])
++m4trace:configure.in:1061: -1- AC_SUBST_TRACE([PERL])
++m4trace:configure.in:1061: -1- m4_pattern_allow([^PERL$])
++m4trace:configure.in:1107: -1- AH_OUTPUT([00001], [
++/* $Id: configure.in,v 1.268.2.23 2005/04/12 20:05:20 shadow Exp $ */
++/*
++ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
++ * endorse or promote products derived from this software without
++ * prior written permission. For permission or any other legal
++ * details, please contact
++ * Office of Technology Transfer
++ * Carnegie Mellon University
++ * 5000 Forbes Avenue
++ * Pittsburgh, PA 15213-3890
++ * (412) 268-4387, fax: (412) 268-7395
++ * tech-transfer at andrew.cmu.edu
++ *
++ * 4. Redistributions of any form whatsoever must retain the following
++ * acknowledgment:
++ * "This product includes software developed by Computing Services
++ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
++ *
++ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
++ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
++ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
++ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#ifndef _CYRUS_IMAPD_CONFIG_H_
++#define _CYRUS_IMAPD_CONFIG_H_
++])
++m4trace:configure.in:1256: -1- AH_OUTPUT([zzzz2], [
++/* time.h */
++#if TIME_WITH_SYS_TIME
++# include <sys/time.h>
++# include <time.h>
++#else
++# if HAVE_SYS_TIME_H
++# include <sys/time.h>
++# else
++# include <time.h>
++# endif
++#endif
++
++/* com_err.h, as needed */
++#ifndef IN_COM_ERR
++#ifdef HAVE_ET_COM_ERR_H
++#include <et/com_err.h>
++#else
++#include <com_err.h>
++#endif /* HAVE_ET_COM_ERR_H */
++#endif /* IN_COM_ERR */
++
++/* This allows us to work even when we don\'t have an fdatasync */
++#ifndef HAVE_FDATASYNC
++#define fdatasync(fd) fsync(fd)
++#endif
++
++/* A similar setup for not having O_DSYNC */
++#include <fcntl.h>
++
++#ifndef O_DSYNC
++# ifdef O_SYNC
++# define O_DSYNC O_SYNC /* POSIX */
++# else
++# define O_DSYNC O_FSYNC /* BSD */
++# endif
++#endif
++
++#ifndef HAVE___ATTRIBUTE__
++/* Can\'t use attributes... */
++#define __attribute__(foo)
++#endif
++
++#ifndef HAVE_SOCKLEN_T
++typedef unsigned int socklen_t;
++#endif
++
++#ifndef HAVE_RLIM_T
++typedef int rlim_t;
++#endif
++
++/* some potentially memory saving tradeoffs,
++ preconfigured in memory-saving mode */
++
++/* save the cmdlines for the ID command */
++#undef ID_SAVE_CMDLINE
++
++/* IPv6 things */
++#include <netdb.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++
++#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
++#define _SS_MAXSIZE 128 /* Implementation specific max size */
++#define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
++
++struct sockaddr_storage {
++ struct sockaddr ss_sa;
++ char __ss_pad2[_SS_PADSIZE];
++};
++# define ss_family ss_sa.sa_family
++# define HAVE_SS_FAMILY
++#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
++
++#ifndef HAVE_SS_FAMILY
++#define ss_family __ss_family
++#endif
++
++#ifndef AF_INET6
++/* Define it to something that should never appear */
++#define AF_INET6 AF_MAX
++#endif
++
++#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
++#include "gai.h"
++#endif
++
++/* End IPv6 things */
++
++#ifdef OLD_SIEVE_SERVICE_NAME
++#define SIEVE_SERVICE_NAME "imap"
++#else
++#define SIEVE_SERVICE_NAME "sieve"
++#endif
++
++/* filenames */
++#define FNAME_DBDIR "/db"
++#define FNAME_USERDIR "/user/"
++#define FNAME_DOMAINDIR "/domain/"
++#define FNAME_LOGDIR "/log/"
++#define FNAME_PTSDB "/ptclient/ptscache.db"
++#define CONFIG_FILENAME (SYSCONFDIR "/imapd.conf")
++#define DEFAULT_MASTER_CONFIG_FILENAME (SYSCONFDIR "/cyrus.conf")
++
++#ifndef HAVE_SHUTDOWN
++#define shutdown(fd, mode) 0
++#endif
++
++/* compile time options; think carefully before modifying */
++enum {
++ /* should we send an UNAVAILABLE message to master when
++ * a service is exiting (master is already going to be
++ * informed of the exit by the SIGCHLD signal anyway) ? */
++ MESSAGE_MASTER_ON_EXIT = 0,
++
++ /* should a hierarchical rename stop on error? */
++ RENAME_STOP_ON_ERROR = 1,
++
++ /* should we call fsync() to maybe help with softupdates? (it should) */
++ APPEND_ULTRA_PARANOID = 1,
++
++ /* should we log extra information at the DEBUG level for DB stuff?
++ * 0 -> nothing; 1 -> some; higher -> even more */
++ CONFIG_DB_VERBOSE = 1,
++
++ /* log timing information to LOG_DEBUG */
++ CONFIG_TIMING_VERBOSE = 0,
++
++ /* should we be pedantic about namespace or sleezy? */
++ SLEEZY_NAMESPACE = 1,
++
++ /* should we do a fast TLS session shutdown? */
++ TLS_FAST_SHUTDOWN = 1,
++
++ /* should we use the SQUAT engine to accelerate SEARCH? */
++ SQUAT_ENGINE = 1,
++
++ /* should we have long LMTP error messages? */
++ LMTP_LONG_ERROR_MSGS = 1,
++
++ /* default time to wait, in seconds, before giving up
++ * trying to lock something */
++ LOCK_GIVEUP_TIMER_DEFAULT = 100
++};
++
++#endif /* _CYRUS_IMAPD_CONFIG_H_ */
++])
++m4trace:configure.in:1259: -1- AC_CONFIG_FILES([man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile])
++m4trace:configure.in:1259: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
++You should run autoupdate.], [])
++m4trace:configure.in:1259: -1- AC_SUBST([LIB@&t at OBJS], [$ac_libobjs])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([LIB@&t at OBJS])
++m4trace:configure.in:1259: -1- m4_pattern_allow([^LIB@&t at OBJS$])
++m4trace:configure.in:1259: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([LTLIBOBJS])
++m4trace:configure.in:1259: -1- m4_pattern_allow([^LTLIBOBJS$])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([top_builddir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([srcdir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([abs_srcdir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([top_srcdir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([abs_top_srcdir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([builddir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([abs_builddir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([abs_top_builddir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([INSTALL])
+diff -urNad cyrus-imapd-2.3.7~/autom4te.cache/traces.1 cyrus-imapd-2.3.7/autom4te.cache/traces.1
+--- cyrus-imapd-2.3.7~/autom4te.cache/traces.1 1970-01-01 01:00:00.000000000 +0100
++++ cyrus-imapd-2.3.7/autom4te.cache/traces.1 2006-08-11 17:29:39.000000000 +0200
+@@ -0,0 +1,1559 @@
++m4trace:aclocal.m4:14: -1- m4_include([cmulocal/berkdb.m4])
++m4trace:aclocal.m4:15: -1- m4_include([cmulocal/bsd_sockets.m4])
++m4trace:aclocal.m4:16: -1- m4_include([cmulocal/c-attribute.m4])
++m4trace:aclocal.m4:17: -1- m4_include([cmulocal/c-fpic.m4])
++m4trace:aclocal.m4:18: -1- m4_include([cmulocal/common.m4])
++m4trace:aclocal.m4:19: -1- m4_include([cmulocal/cyrus.m4])
++m4trace:aclocal.m4:20: -1- m4_include([cmulocal/ipv6.m4])
++m4trace:aclocal.m4:21: -1- m4_include([cmulocal/libwrap.m4])
++m4trace:aclocal.m4:22: -1- m4_include([cmulocal/sasl2.m4])
++m4trace:aclocal.m4:23: -1- m4_include([cmulocal/ucdsnmp.m4])
++m4trace:configure.in:49: -1- AC_INIT([imap/imapd.c])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^_?A[CHUM]_])
++m4trace:configure.in:49: -1- m4_pattern_forbid([_AC_])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
++m4trace:configure.in:49: -1- m4_pattern_allow([^AS_FLAGS$])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^_?m4_])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^dnl$])
++m4trace:configure.in:49: -1- m4_pattern_forbid([^_?AS_])
++m4trace:configure.in:49: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([SHELL])
++m4trace:configure.in:49: -1- m4_pattern_allow([^SHELL$])
++m4trace:configure.in:49: -1- AC_SUBST([PATH_SEPARATOR])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PATH_SEPARATOR$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_NAME])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_NAME$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_VERSION$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_STRING])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_STRING$])
++m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
++m4trace:configure.in:49: -1- AC_SUBST([exec_prefix], [NONE])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([exec_prefix])
++m4trace:configure.in:49: -1- m4_pattern_allow([^exec_prefix$])
++m4trace:configure.in:49: -1- AC_SUBST([prefix], [NONE])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([prefix])
++m4trace:configure.in:49: -1- m4_pattern_allow([^prefix$])
++m4trace:configure.in:49: -1- AC_SUBST([program_transform_name], [s,x,x,])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([program_transform_name])
++m4trace:configure.in:49: -1- m4_pattern_allow([^program_transform_name$])
++m4trace:configure.in:49: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([bindir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^bindir$])
++m4trace:configure.in:49: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([sbindir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^sbindir$])
++m4trace:configure.in:49: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([libexecdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^libexecdir$])
++m4trace:configure.in:49: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([datarootdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^datarootdir$])
++m4trace:configure.in:49: -1- AC_SUBST([datadir], ['${datarootdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([datadir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^datadir$])
++m4trace:configure.in:49: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([sysconfdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^sysconfdir$])
++m4trace:configure.in:49: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([sharedstatedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^sharedstatedir$])
++m4trace:configure.in:49: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([localstatedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^localstatedir$])
++m4trace:configure.in:49: -1- AC_SUBST([includedir], ['${prefix}/include'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([includedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^includedir$])
++m4trace:configure.in:49: -1- AC_SUBST([oldincludedir], ['/usr/include'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([oldincludedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^oldincludedir$])
++m4trace:configure.in:49: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
++ ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
++ ['${datarootdir}/doc/${PACKAGE}'])])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([docdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^docdir$])
++m4trace:configure.in:49: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([infodir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^infodir$])
++m4trace:configure.in:49: -1- AC_SUBST([htmldir], ['${docdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([htmldir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^htmldir$])
++m4trace:configure.in:49: -1- AC_SUBST([dvidir], ['${docdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([dvidir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^dvidir$])
++m4trace:configure.in:49: -1- AC_SUBST([pdfdir], ['${docdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([pdfdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^pdfdir$])
++m4trace:configure.in:49: -1- AC_SUBST([psdir], ['${docdir}'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([psdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^psdir$])
++m4trace:configure.in:49: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([libdir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^libdir$])
++m4trace:configure.in:49: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([localedir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^localedir$])
++m4trace:configure.in:49: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([mandir])
++m4trace:configure.in:49: -1- m4_pattern_allow([^mandir$])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_NAME$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
++#undef PACKAGE_NAME])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_VERSION$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
++#undef PACKAGE_VERSION])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_STRING$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING])
++m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
++m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
++m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT])
++m4trace:configure.in:49: -1- AC_SUBST([DEFS])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([DEFS])
++m4trace:configure.in:49: -1- m4_pattern_allow([^DEFS$])
++m4trace:configure.in:49: -1- AC_SUBST([ECHO_C])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_C])
++m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_C$])
++m4trace:configure.in:49: -1- AC_SUBST([ECHO_N])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_N])
++m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_N$])
++m4trace:configure.in:49: -1- AC_SUBST([ECHO_T])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_T])
++m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_T$])
++m4trace:configure.in:49: -1- AC_SUBST([LIBS])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([LIBS])
++m4trace:configure.in:49: -1- m4_pattern_allow([^LIBS$])
++m4trace:configure.in:49: -1- AC_SUBST([build_alias])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([build_alias])
++m4trace:configure.in:49: -1- m4_pattern_allow([^build_alias$])
++m4trace:configure.in:49: -1- AC_SUBST([host_alias])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([host_alias])
++m4trace:configure.in:49: -1- m4_pattern_allow([^host_alias$])
++m4trace:configure.in:49: -1- AC_SUBST([target_alias])
++m4trace:configure.in:49: -1- AC_SUBST_TRACE([target_alias])
++m4trace:configure.in:49: -1- m4_pattern_allow([^target_alias$])
++m4trace:configure.in:51: -1- AC_CONFIG_HEADERS([config.h])
++m4trace:configure.in:52: -1- AC_CANONICAL_HOST
++m4trace:configure.in:52: -1- AC_CANONICAL_BUILD
++m4trace:configure.in:52: -1- AC_REQUIRE_AUX_FILE([config.sub])
++m4trace:configure.in:52: -1- AC_REQUIRE_AUX_FILE([config.guess])
++m4trace:configure.in:52: -1- AC_SUBST([build], [$ac_cv_build])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([build])
++m4trace:configure.in:52: -1- m4_pattern_allow([^build$])
++m4trace:configure.in:52: -1- AC_SUBST([build_cpu], [$[1]])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_cpu])
++m4trace:configure.in:52: -1- m4_pattern_allow([^build_cpu$])
++m4trace:configure.in:52: -1- AC_SUBST([build_vendor], [$[2]])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_vendor])
++m4trace:configure.in:52: -1- m4_pattern_allow([^build_vendor$])
++m4trace:configure.in:52: -1- AC_SUBST([build_os])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_os])
++m4trace:configure.in:52: -1- m4_pattern_allow([^build_os$])
++m4trace:configure.in:52: -1- AC_SUBST([host], [$ac_cv_host])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([host])
++m4trace:configure.in:52: -1- m4_pattern_allow([^host$])
++m4trace:configure.in:52: -1- AC_SUBST([host_cpu], [$[1]])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_cpu])
++m4trace:configure.in:52: -1- m4_pattern_allow([^host_cpu$])
++m4trace:configure.in:52: -1- AC_SUBST([host_vendor], [$[2]])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_vendor])
++m4trace:configure.in:52: -1- m4_pattern_allow([^host_vendor$])
++m4trace:configure.in:52: -1- AC_SUBST([host_os])
++m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_os])
++m4trace:configure.in:52: -1- m4_pattern_allow([^host_os$])
++m4trace:configure.in:57: -1- AC_SUBST([WARNERROR])
++m4trace:configure.in:57: -1- AC_SUBST_TRACE([WARNERROR])
++m4trace:configure.in:57: -1- m4_pattern_allow([^WARNERROR$])
++m4trace:configure.in:61: -1- AC_DEFINE_TRACE_LITERAL([EXTRA_IDENT])
++m4trace:configure.in:61: -1- m4_pattern_allow([^EXTRA_IDENT$])
++m4trace:configure.in:61: -1- AH_OUTPUT([EXTRA_IDENT], [/* Extra version information for imap/version.h */
++#undef EXTRA_IDENT])
++m4trace:configure.in:63: -1- AC_SUBST([MAKEDEPEND])
++m4trace:configure.in:63: -1- AC_SUBST_TRACE([MAKEDEPEND])
++m4trace:configure.in:63: -1- m4_pattern_allow([^MAKEDEPEND$])
++m4trace:configure.in:69: -2- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++configure.in:69: the top level])
++m4trace:configure.in:73: -1- AC_SUBST([cyrus_prefix])
++m4trace:configure.in:73: -1- AC_SUBST_TRACE([cyrus_prefix])
++m4trace:configure.in:73: -1- m4_pattern_allow([^cyrus_prefix$])
++m4trace:configure.in:74: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_PATH])
++m4trace:configure.in:74: -1- m4_pattern_allow([^CYRUS_PATH$])
++m4trace:configure.in:74: -1- AH_OUTPUT([CYRUS_PATH], [/* Where will we be installed? */
++#undef CYRUS_PATH])
++m4trace:configure.in:77: -1- AC_SUBST([service_path])
++m4trace:configure.in:77: -1- AC_SUBST_TRACE([service_path])
++m4trace:configure.in:77: -1- m4_pattern_allow([^service_path$])
++m4trace:configure.in:78: -1- AC_DEFINE_TRACE_LITERAL([SERVICE_PATH])
++m4trace:configure.in:78: -1- m4_pattern_allow([^SERVICE_PATH$])
++m4trace:configure.in:78: -1- AH_OUTPUT([SERVICE_PATH], [/* Directiory to use for service binaries */
++#undef SERVICE_PATH])
++m4trace:configure.in:81: -1- AC_SUBST([cyrus_user])
++m4trace:configure.in:81: -1- AC_SUBST_TRACE([cyrus_user])
++m4trace:configure.in:81: -1- m4_pattern_allow([^cyrus_user$])
++m4trace:configure.in:82: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_USER])
++m4trace:configure.in:82: -1- m4_pattern_allow([^CYRUS_USER$])
++m4trace:configure.in:82: -1- AH_OUTPUT([CYRUS_USER], [/* What user will we run as? */
++#undef CYRUS_USER])
++m4trace:configure.in:85: -1- AC_SUBST([cyrus_group])
++m4trace:configure.in:85: -1- AC_SUBST_TRACE([cyrus_group])
++m4trace:configure.in:85: -1- m4_pattern_allow([^cyrus_group$])
++m4trace:configure.in:92: -1- AC_DEFINE_TRACE_LITERAL([SYSCONFDIR])
++m4trace:configure.in:92: -1- m4_pattern_allow([^SYSCONFDIR$])
++m4trace:configure.in:92: -1- AH_OUTPUT([SYSCONFDIR], [/* Config File Location */
++#undef SYSCONFDIR])
++m4trace:configure.in:94: -1- AC_PROG_CC
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([CFLAGS])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CFLAGS])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CFLAGS$])
++m4trace:configure.in:94: -1- AC_SUBST([LDFLAGS])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([LDFLAGS])
++m4trace:configure.in:94: -1- m4_pattern_allow([^LDFLAGS$])
++m4trace:configure.in:94: -1- AC_SUBST([CPPFLAGS])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CPPFLAGS])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CPPFLAGS$])
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^CC$])
++m4trace:configure.in:94: -1- AC_SUBST([ac_ct_CC])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([ac_ct_CC])
++m4trace:configure.in:94: -1- m4_pattern_allow([^ac_ct_CC$])
++m4trace:configure.in:94: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([EXEEXT])
++m4trace:configure.in:94: -1- m4_pattern_allow([^EXEEXT$])
++m4trace:configure.in:94: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
++m4trace:configure.in:94: -1- AC_SUBST_TRACE([OBJEXT])
++m4trace:configure.in:94: -1- m4_pattern_allow([^OBJEXT$])
++m4trace:configure.in:95: -1- AC_PROG_RANLIB
++m4trace:configure.in:95: -1- AC_SUBST([RANLIB])
++m4trace:configure.in:95: -1- AC_SUBST_TRACE([RANLIB])
++m4trace:configure.in:95: -1- m4_pattern_allow([^RANLIB$])
++m4trace:configure.in:96: -1- AC_PROG_MAKE_SET
++m4trace:configure.in:96: -1- AC_SUBST([SET_MAKE])
++m4trace:configure.in:96: -1- AC_SUBST_TRACE([SET_MAKE])
++m4trace:configure.in:96: -1- m4_pattern_allow([^SET_MAKE$])
++m4trace:configure.in:97: -1- AC_PROG_INSTALL
++m4trace:configure.in:97: -1- AC_REQUIRE_AUX_FILE([install-sh])
++m4trace:configure.in:97: -1- AC_SUBST([INSTALL_PROGRAM])
++m4trace:configure.in:97: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
++m4trace:configure.in:97: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
++m4trace:configure.in:97: -1- AC_SUBST([INSTALL_SCRIPT])
++m4trace:configure.in:97: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
++m4trace:configure.in:97: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
++m4trace:configure.in:97: -1- AC_SUBST([INSTALL_DATA])
++m4trace:configure.in:97: -1- AC_SUBST_TRACE([INSTALL_DATA])
++m4trace:configure.in:97: -1- m4_pattern_allow([^INSTALL_DATA$])
++m4trace:configure.in:98: -1- AH_OUTPUT([_ALL_SOURCE], [/* Define to 1 if on AIX 3.
++ System headers sometimes define this.
++ We just want to avoid a redefinition error message. */
++@%:@ifndef _ALL_SOURCE
++@%:@ undef _ALL_SOURCE
++@%:@endif])
++m4trace:configure.in:98: -1- AC_PROG_CPP
++m4trace:configure.in:98: -1- AC_SUBST([CPP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([CPP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^CPP$])
++m4trace:configure.in:98: -1- AC_SUBST([CPPFLAGS])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([CPPFLAGS])
++m4trace:configure.in:98: -1- m4_pattern_allow([^CPPFLAGS$])
++m4trace:configure.in:98: -1- AC_SUBST([CPP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([CPP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^CPP$])
++m4trace:configure.in:98: -1- AC_SUBST([GREP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([GREP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^GREP$])
++m4trace:configure.in:98: -1- AC_SUBST([GREP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([GREP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^GREP$])
++m4trace:configure.in:98: -1- AC_SUBST([EGREP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([EGREP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^EGREP$])
++m4trace:configure.in:98: -1- AC_SUBST([EGREP])
++m4trace:configure.in:98: -1- AC_SUBST_TRACE([EGREP])
++m4trace:configure.in:98: -1- m4_pattern_allow([^EGREP$])
++m4trace:configure.in:98: -1- AC_DEFINE_TRACE_LITERAL([_ALL_SOURCE])
++m4trace:configure.in:98: -1- m4_pattern_allow([^_ALL_SOURCE$])
++m4trace:configure.in:100: -1- AC_PROG_AWK
++m4trace:configure.in:100: -1- AC_SUBST([AWK])
++m4trace:configure.in:100: -1- AC_SUBST_TRACE([AWK])
++m4trace:configure.in:100: -1- m4_pattern_allow([^AWK$])
++m4trace:configure.in:101: -1- AC_C_CONST
++m4trace:configure.in:101: -1- AC_DEFINE_TRACE_LITERAL([const])
++m4trace:configure.in:101: -1- m4_pattern_allow([^const$])
++m4trace:configure.in:101: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
++#undef const])
++m4trace:configure.in:108: -1- AC_C_INLINE
++m4trace:configure.in:108: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
++ calls it, or to nothing if \'inline\' is not supported under any name. */
++#ifndef __cplusplus
++#undef inline
++#endif])
++m4trace:configure.in:110: -1- AC_HEADER_STDC
++m4trace:configure.in:110: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
++m4trace:configure.in:110: -1- m4_pattern_allow([^STDC_HEADERS$])
++m4trace:configure.in:110: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
++#undef STDC_HEADERS])
++m4trace:configure.in:110: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
++ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
++#undef HAVE_SYS_TYPES_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
++#undef HAVE_SYS_STAT_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
++#undef HAVE_STDLIB_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
++#undef HAVE_STRING_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
++#undef HAVE_MEMORY_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
++#undef HAVE_STRINGS_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
++#undef HAVE_INTTYPES_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
++#undef HAVE_STDINT_H])
++m4trace:configure.in:110: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
++#undef HAVE_UNISTD_H])
++m4trace:configure.in:110: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
++m4trace:configure.in:110: -1- m4_pattern_allow([^SIZEOF_LONG$])
++m4trace:configure.in:110: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */
++#undef SIZEOF_LONG])
++m4trace:configure.in:113: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG_INT])
++m4trace:configure.in:113: -1- m4_pattern_allow([^SIZEOF_LONG_LONG_INT$])
++m4trace:configure.in:113: -1- AH_OUTPUT([SIZEOF_LONG_LONG_INT], [/* The size of `long long int\', as computed by sizeof. */
++#undef SIZEOF_LONG_LONG_INT])
++m4trace:configure.in:114: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_LONG_LONG_INT])
++m4trace:configure.in:114: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG_LONG_INT$])
++m4trace:configure.in:114: -1- AH_OUTPUT([SIZEOF_UNSIGNED_LONG_LONG_INT], [/* The size of `unsigned long long int\', as computed by sizeof. */
++#undef SIZEOF_UNSIGNED_LONG_LONG_INT])
++m4trace:configure.in:117: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG_INT])
++m4trace:configure.in:117: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$])
++m4trace:configure.in:117: -1- AH_OUTPUT([HAVE_LONG_LONG_INT], [/* Does the compiler support long long int? */
++#undef HAVE_LONG_LONG_INT])
++m4trace:configure.in:118: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
++m4trace:configure.in:118: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
++m4trace:configure.in:118: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte
++ first (like Motorola and SPARC, unlike Intel and VAX). */
++#undef WORDS_BIGENDIAN])
++m4trace:configure.in:121: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++cmulocal/c-attribute.m4:30: CMU_C___ATTRIBUTE__ is expanded from...
++configure.in:121: the top level])
++m4trace:configure.in:121: -1- AC_DEFINE_TRACE_LITERAL([HAVE___ATTRIBUTE__])
++m4trace:configure.in:121: -1- m4_pattern_allow([^HAVE___ATTRIBUTE__$])
++m4trace:configure.in:121: -1- AH_OUTPUT([HAVE___ATTRIBUTE__], [/* define if your compiler has __attribute__ */
++#undef HAVE___ATTRIBUTE__])
++m4trace:configure.in:122: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++cmulocal/c-fpic.m4:34: CMU_C_FPIC is expanded from...
++configure.in:122: the top level])
++m4trace:configure.in:127: -1- AC_CHECK_HEADERS([unistd.h sys/select.h sys/param.h stdarg.h])
++m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
++#undef HAVE_UNISTD_H])
++m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
++#undef HAVE_SYS_SELECT_H])
++m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
++#undef HAVE_SYS_PARAM_H])
++m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the <stdarg.h> header file. */
++#undef HAVE_STDARG_H])
++m4trace:configure.in:128: -1- AC_LIBSOURCE([memmove.c])
++m4trace:configure.in:128: -1- AC_LIBSOURCE([strcasecmp.c])
++m4trace:configure.in:128: -1- AC_LIBSOURCE([ftruncate.c])
++m4trace:configure.in:128: -1- AC_LIBSOURCE([strerror.c])
++m4trace:configure.in:128: -1- AC_CHECK_FUNCS([memmove strcasecmp ftruncate strerror], [], [_AC_LIBOBJ($ac_func)])
++m4trace:configure.in:128: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */
++#undef HAVE_MEMMOVE])
++m4trace:configure.in:128: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */
++#undef HAVE_STRCASECMP])
++m4trace:configure.in:128: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* Define to 1 if you have the `ftruncate\' function. */
++#undef HAVE_FTRUNCATE])
++m4trace:configure.in:128: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
++#undef HAVE_STRERROR])
++m4trace:configure.in:128: -1- AC_SUBST([LIB@&t at OBJS], ["$LIB@&t at OBJS $ac_func.$ac_objext"])
++m4trace:configure.in:128: -1- AC_SUBST_TRACE([LIB@&t at OBJS])
++m4trace:configure.in:128: -1- m4_pattern_allow([^LIB@&t at OBJS$])
++m4trace:configure.in:129: -1- AC_CHECK_FUNCS([strlcat strlcpy])
++m4trace:configure.in:129: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the `strlcat\' function. */
++#undef HAVE_STRLCAT])
++m4trace:configure.in:129: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the `strlcpy\' function. */
++#undef HAVE_STRLCPY])
++m4trace:configure.in:130: -1- AC_HEADER_DIRENT
++m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR\'.
++ */
++#undef HAVE_DIRENT_H])
++m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR\'.
++ */
++#undef HAVE_SYS_NDIR_H])
++m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR\'.
++ */
++#undef HAVE_SYS_DIR_H])
++m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR\'. */
++#undef HAVE_NDIR_H])
++m4trace:configure.in:133: -2- AC_CHECK_LIB([nsl], [gethostbyname], [LIB_SOCKET="-lnsl $LIB_SOCKET"])
++m4trace:configure.in:133: -2- AC_CHECK_LIB([socket], [connect], [LIB_SOCKET="-lsocket $LIB_SOCKET"])
++m4trace:configure.in:133: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++cmulocal/bsd_sockets.m4:39: CMU_SOCKETS is expanded from...
++configure.in:133: the top level])
++m4trace:configure.in:133: -1- AC_CHECK_FUNCS([dn_expand dns_lookup])
++m4trace:configure.in:133: -1- AH_OUTPUT([HAVE_DN_EXPAND], [/* Define to 1 if you have the `dn_expand\' function. */
++#undef HAVE_DN_EXPAND])
++m4trace:configure.in:133: -1- AH_OUTPUT([HAVE_DNS_LOOKUP], [/* Define to 1 if you have the `dns_lookup\' function. */
++#undef HAVE_DNS_LOOKUP])
++m4trace:configure.in:133: -1- AC_SUBST([LIB_SOCKET])
++m4trace:configure.in:133: -1- AC_SUBST_TRACE([LIB_SOCKET])
++m4trace:configure.in:133: -1- m4_pattern_allow([^LIB_SOCKET$])
++m4trace:configure.in:140: -1- AC_CHECK_LIB([socket], [getaddrinfo], [dnl
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_getaddrinfo=no
++ ], [dnl
++ AC_MSG_CHECKING([whether your system has IPv6 directory])
++ AC_CACHE_VAL(ipv6_cv_dir, [dnl
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done])dnl
++ AC_MSG_RESULT($ipv6_cv_dir)
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_getaddrinfo=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ AC_CHECK_LIB(inet6, getaddrinfo, [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi],)dnl
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi])
++m4trace:configure.in:140: -1- AC_CHECK_LIB([inet6], [getaddrinfo], [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi], [])
++m4trace:configure.in:140: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
++m4trace:configure.in:140: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
++m4trace:configure.in:140: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
++#undef HAVE_GETADDRINFO])
++m4trace:configure.in:140: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
++m4trace:configure.in:140: -2- m4_pattern_allow([^HAVE_GETADDRINFO$])
++m4trace:configure.in:140: -2- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
++#undef HAVE_GETADDRINFO])
++m4trace:configure.in:140: -1- AC_CHECK_LIB([socket], [gai_strerror], [dnl
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_gai_strerror=no
++ ], [dnl
++ AC_MSG_CHECKING([whether your system has IPv6 directory])
++ AC_CACHE_VAL(ipv6_cv_dir, [dnl
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done])dnl
++ AC_MSG_RESULT($ipv6_cv_dir)
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_gai_strerror=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ AC_CHECK_LIB(inet6, gai_strerror, [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi],)dnl
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi])
++m4trace:configure.in:140: -1- AC_CHECK_LIB([inet6], [gai_strerror], [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi], [])
++m4trace:configure.in:140: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
++m4trace:configure.in:140: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
++m4trace:configure.in:140: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
++#undef HAVE_GETADDRINFO])
++m4trace:configure.in:148: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETNAMEINFO])
++m4trace:configure.in:148: -2- m4_pattern_allow([^HAVE_GETNAMEINFO$])
++m4trace:configure.in:148: -2- AH_OUTPUT([HAVE_GETNAMEINFO], [/* Do we have a getnameinfo? */
++#undef HAVE_GETNAMEINFO])
++m4trace:configure.in:149: -1- AC_CHECK_LIB([socket], [getnameinfo], [dnl
++ LIBS="$LIBS -lsocket"
++ ac_cv_lib_inet6_getnameinfo=no
++ ], [dnl
++ AC_MSG_CHECKING([whether your system has IPv6 directory])
++ AC_CACHE_VAL(ipv6_cv_dir, [dnl
++ for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
++ if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
++ break
++ fi
++ done])dnl
++ AC_MSG_RESULT($ipv6_cv_dir)
++ if test $ipv6_cv_dir = no; then
++ ac_cv_lib_inet6_getnameinfo=no
++ else
++ if test x$ipv6_libinet6 = x; then
++ ipv6_libinet6=no
++ SAVELDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
++ fi
++ AC_CHECK_LIB(inet6, getnameinfo, [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi],)dnl
++ if test $ipv6_libinet6 = no; then
++ LDFLAGS="$SAVELDFLAGS"
++ fi
++ fi])
++m4trace:configure.in:149: -1- AC_CHECK_LIB([inet6], [getnameinfo], [dnl
++ if test $ipv6_libinet6 = no; then
++ ipv6_libinet6=yes
++ LIBS="$LIBS -linet6"
++ fi], [])
++m4trace:configure.in:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
++m4trace:configure.in:149: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
++m4trace:configure.in:149: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */
++#undef HAVE_GETADDRINFO])
++m4trace:configure.in:155: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++cmulocal/ipv6.m4:78: IPv6_CHECK_SS_FAMILY is expanded from...
++configure.in:155: the top level])
++m4trace:configure.in:155: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SS_FAMILY])
++m4trace:configure.in:155: -2- m4_pattern_allow([^HAVE_SS_FAMILY$])
++m4trace:configure.in:155: -2- AH_OUTPUT([HAVE_SS_FAMILY], [/* Is there an ss_family in sockaddr_storage? */
++#undef HAVE_SS_FAMILY])
++m4trace:configure.in:156: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++cmulocal/ipv6.m4:94: IPv6_CHECK_SA_LEN is expanded from...
++configure.in:156: the top level])
++m4trace:configure.in:156: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKADDR_SA_LEN])
++m4trace:configure.in:156: -2- m4_pattern_allow([^HAVE_SOCKADDR_SA_LEN$])
++m4trace:configure.in:156: -2- AH_OUTPUT([HAVE_SOCKADDR_SA_LEN], [/* Does sockaddr have an sa_len? */
++#undef HAVE_SOCKADDR_SA_LEN])
++m4trace:configure.in:158: -1- AC_SUBST([IPV6_OBJS])
++m4trace:configure.in:158: -1- AC_SUBST_TRACE([IPV6_OBJS])
++m4trace:configure.in:158: -1- m4_pattern_allow([^IPV6_OBJS$])
++m4trace:configure.in:161: -1- AC_CHECK_HEADERS([sys/time.h])
++m4trace:configure.in:161: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
++#undef HAVE_SYS_TIME_H])
++m4trace:configure.in:162: -1- AC_HEADER_TIME
++m4trace:configure.in:162: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME])
++m4trace:configure.in:162: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$])
++m4trace:configure.in:162: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#undef TIME_WITH_SYS_TIME])
++m4trace:configure.in:163: -1- AC_STRUCT_TM
++m4trace:configure.in:163: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
++m4trace:configure.in:163: -1- m4_pattern_allow([^TM_IN_SYS_TIME$])
++m4trace:configure.in:163: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares `struct tm\'. */
++#undef TM_IN_SYS_TIME])
++m4trace:configure.in:164: -1- AC_STRUCT_TIMEZONE
++m4trace:configure.in:164: -1- AC_CHECK_MEMBERS([struct tm.tm_zone], [], [], [#include <sys/types.h>
++#include <$ac_cv_struct_tm>
++])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TM_TM_ZONE])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_STRUCT_TM_TM_ZONE$])
++m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_STRUCT_TM_TM_ZONE], [/* Define to 1 if `tm_zone\' is member of `struct tm\'. */
++#undef HAVE_STRUCT_TM_TM_ZONE])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_ZONE])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_TM_ZONE$])
++m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_TM_ZONE], [/* Define to 1 if your `struct tm\' has `tm_zone\'. Deprecated, use
++ `HAVE_STRUCT_TM_TM_ZONE\' instead. */
++#undef HAVE_TM_ZONE])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_TZNAME])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_DECL_TZNAME$])
++m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_DECL_TZNAME], [/* Define to 1 if you have the declaration of `tzname\', and to 0 if you don\'t.
++ */
++#undef HAVE_DECL_TZNAME])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_TZNAME])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_DECL_TZNAME$])
++m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZNAME])
++m4trace:configure.in:164: -1- m4_pattern_allow([^HAVE_TZNAME$])
++m4trace:configure.in:164: -1- AH_OUTPUT([HAVE_TZNAME], [/* Define to 1 if you don\'t have `tm_zone\' but do have the external array
++ `tzname\'. */
++#undef HAVE_TZNAME])
++m4trace:configure.in:166: -1- AC_SUBST([CPPFLAGS])
++m4trace:configure.in:166: -1- AC_SUBST_TRACE([CPPFLAGS])
++m4trace:configure.in:166: -1- m4_pattern_allow([^CPPFLAGS$])
++m4trace:configure.in:167: -1- AC_SUBST([PRE_SUBDIRS])
++m4trace:configure.in:167: -1- AC_SUBST_TRACE([PRE_SUBDIRS])
++m4trace:configure.in:167: -1- m4_pattern_allow([^PRE_SUBDIRS$])
++m4trace:configure.in:168: -1- AC_SUBST([EXTRA_SUBDIRS])
++m4trace:configure.in:168: -1- AC_SUBST_TRACE([EXTRA_SUBDIRS])
++m4trace:configure.in:168: -1- m4_pattern_allow([^EXTRA_SUBDIRS$])
++m4trace:configure.in:169: -1- AC_SUBST([DEPLIBS])
++m4trace:configure.in:169: -1- AC_SUBST_TRACE([DEPLIBS])
++m4trace:configure.in:169: -1- m4_pattern_allow([^DEPLIBS$])
++m4trace:configure.in:170: -1- AC_SUBST([LOCALDEFS])
++m4trace:configure.in:170: -1- AC_SUBST_TRACE([LOCALDEFS])
++m4trace:configure.in:170: -1- m4_pattern_allow([^LOCALDEFS$])
++m4trace:configure.in:171: -1- AC_FUNC_VPRINTF
++m4trace:configure.in:171: -1- AC_CHECK_FUNCS([vprintf], [
++AC_CHECK_FUNC(_doprnt,
++ [AC_DEFINE(HAVE_DOPRNT, 1,
++ [Define to 1 if you don't have `vprintf' but do have
++ `_doprnt.'])])])
++m4trace:configure.in:171: -1- AH_OUTPUT([HAVE_VPRINTF], [/* Define to 1 if you have the `vprintf\' function. */
++#undef HAVE_VPRINTF])
++m4trace:configure.in:171: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOPRNT])
++m4trace:configure.in:171: -1- m4_pattern_allow([^HAVE_DOPRNT$])
++m4trace:configure.in:171: -1- AH_OUTPUT([HAVE_DOPRNT], [/* Define to 1 if you don\'t have `vprintf\' but do have `_doprnt.\' */
++#undef HAVE_DOPRNT])
++m4trace:configure.in:204: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++cmulocal/berkdb.m4:235: CYRUS_BERKELEY_DB_CHK_LIB is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++cmulocal/berkdb.m4:269: CYRUS_BERKELEY_DB_CHK is expanded from...
++configure.in:204: the top level])
++m4trace:configure.in:204: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++cmulocal/berkdb.m4:235: CYRUS_BERKELEY_DB_CHK_LIB is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++cmulocal/berkdb.m4:269: CYRUS_BERKELEY_DB_CHK is expanded from...
++configure.in:204: the top level])
++m4trace:configure.in:208: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++configure.in:208: the top level])
++m4trace:configure.in:217: -1- AC_SUBST([BDB_INC])
++m4trace:configure.in:217: -1- AC_SUBST_TRACE([BDB_INC])
++m4trace:configure.in:217: -1- m4_pattern_allow([^BDB_INC$])
++m4trace:configure.in:218: -1- AC_SUBST([BDB_LIB])
++m4trace:configure.in:218: -1- AC_SUBST_TRACE([BDB_LIB])
++m4trace:configure.in:218: -1- m4_pattern_allow([^BDB_LIB$])
++m4trace:configure.in:224: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BDB])
++m4trace:configure.in:224: -1- m4_pattern_allow([^HAVE_BDB$])
++m4trace:configure.in:224: -1- AH_OUTPUT([HAVE_BDB], [/* Build in Berkeley DB support? */
++#undef HAVE_BDB])
++m4trace:configure.in:229: -1- AC_SUBST([CYRUSDB_OBJS])
++m4trace:configure.in:229: -1- AC_SUBST_TRACE([CYRUSDB_OBJS])
++m4trace:configure.in:229: -1- m4_pattern_allow([^CYRUSDB_OBJS$])
++m4trace:configure.in:241: -1- AC_SUBST([SIEVE_OBJS])
++m4trace:configure.in:241: -1- AC_SUBST_TRACE([SIEVE_OBJS])
++m4trace:configure.in:241: -1- m4_pattern_allow([^SIEVE_OBJS$])
++m4trace:configure.in:243: -1- AC_SUBST([SIEVE_LIBS])
++m4trace:configure.in:243: -1- AC_SUBST_TRACE([SIEVE_LIBS])
++m4trace:configure.in:243: -1- m4_pattern_allow([^SIEVE_LIBS$])
++m4trace:configure.in:245: -1- AC_SUBST([SIEVE_CPPFLAGS])
++m4trace:configure.in:245: -1- AC_SUBST_TRACE([SIEVE_CPPFLAGS])
++m4trace:configure.in:245: -1- m4_pattern_allow([^SIEVE_CPPFLAGS$])
++m4trace:configure.in:246: -1- AC_DEFINE_TRACE_LITERAL([USE_SIEVE])
++m4trace:configure.in:246: -1- m4_pattern_allow([^USE_SIEVE$])
++m4trace:configure.in:246: -1- AH_OUTPUT([USE_SIEVE], [/* Build in Sieve support? */
++#undef USE_SIEVE])
++m4trace:configure.in:249: -1- AC_PROG_YACC
++m4trace:configure.in:249: -1- AC_SUBST([YACC])
++m4trace:configure.in:249: -1- AC_SUBST_TRACE([YACC])
++m4trace:configure.in:249: -1- m4_pattern_allow([^YACC$])
++m4trace:configure.in:249: -1- AC_SUBST([YACC])
++m4trace:configure.in:249: -1- AC_SUBST_TRACE([YACC])
++m4trace:configure.in:249: -1- m4_pattern_allow([^YACC$])
++m4trace:configure.in:249: -1- AC_SUBST([YFLAGS])
++m4trace:configure.in:249: -1- AC_SUBST_TRACE([YFLAGS])
++m4trace:configure.in:249: -1- m4_pattern_allow([^YFLAGS$])
++m4trace:configure.in:250: -1- AC_PROG_LEX
++m4trace:configure.in:250: -1- AC_SUBST([LEX])
++m4trace:configure.in:250: -1- AC_SUBST_TRACE([LEX])
++m4trace:configure.in:250: -1- m4_pattern_allow([^LEX$])
++m4trace:configure.in:250: -1- AC_CHECK_LIB([fl], [yywrap], [LEXLIB="-lfl"], [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")])
++m4trace:configure.in:250: -1- AC_CHECK_LIB([l], [yywrap], [LEXLIB="-ll"])
++m4trace:configure.in:250: -1- AC_SUBST([LEXLIB])
++m4trace:configure.in:250: -1- AC_SUBST_TRACE([LEXLIB])
++m4trace:configure.in:250: -1- m4_pattern_allow([^LEXLIB$])
++m4trace:configure.in:250: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])
++m4trace:configure.in:250: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT])
++m4trace:configure.in:250: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$])
++m4trace:configure.in:250: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER])
++m4trace:configure.in:250: -1- m4_pattern_allow([^YYTEXT_POINTER$])
++m4trace:configure.in:250: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a
++ `char[]\'. */
++#undef YYTEXT_POINTER])
++m4trace:configure.in:251: -1- AC_CHECK_LIB([fl], [main])
++m4trace:configure.in:251: -1- AH_OUTPUT([HAVE_LIBFL], [/* Define to 1 if you have the `fl\' library (-lfl). */
++#undef HAVE_LIBFL])
++m4trace:configure.in:251: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBFL])
++m4trace:configure.in:251: -1- m4_pattern_allow([^HAVE_LIBFL$])
++m4trace:configure.in:255: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_REGEX])
++m4trace:configure.in:255: -1- m4_pattern_allow([^ENABLE_REGEX$])
++m4trace:configure.in:255: -1- AH_OUTPUT([ENABLE_REGEX], [/* Do we have a decent regex library? */
++#undef ENABLE_REGEX])
++m4trace:configure.in:255: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RX])
++m4trace:configure.in:255: -2- m4_pattern_allow([^HAVE_RX$])
++m4trace:configure.in:255: -2- AH_OUTPUT([HAVE_RX], [/* Do we have rxposix.h? */
++#undef HAVE_RX])
++m4trace:configure.in:262: -1- AC_SUBST([SIEVE_SUBDIRS])
++m4trace:configure.in:262: -1- AC_SUBST_TRACE([SIEVE_SUBDIRS])
++m4trace:configure.in:262: -1- m4_pattern_allow([^SIEVE_SUBDIRS$])
++m4trace:configure.in:265: -2- AC_DEFINE_TRACE_LITERAL([HAS_STRERROR])
++m4trace:configure.in:265: -2- m4_pattern_allow([^HAS_STRERROR$])
++m4trace:configure.in:265: -2- AH_OUTPUT([HAS_STRERROR], [/* Do we have strerror()? */
++#undef HAS_STRERROR])
++m4trace:configure.in:266: -2- AC_DEFINE_TRACE_LITERAL([NEED_SYS_ERRLIST])
++m4trace:configure.in:266: -2- m4_pattern_allow([^NEED_SYS_ERRLIST$])
++m4trace:configure.in:266: -2- AH_OUTPUT([NEED_SYS_ERRLIST], [/* Do we have a sys_errlist? */
++#undef NEED_SYS_ERRLIST])
++m4trace:configure.in:266: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete.
++You should run autoupdate.], [autoconf/functions.m4:138: AC_FUNC_CHECK is expanded from...
++configure.in:266: the top level])
++m4trace:configure.in:269: -1- AC_CHECK_HEADERS([sys/resource.h])
++m4trace:configure.in:269: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the <sys/resource.h> header file. */
++#undef HAVE_SYS_RESOURCE_H])
++m4trace:configure.in:270: -1- AC_CHECK_FUNCS([setrlimit])
++m4trace:configure.in:270: -1- AH_OUTPUT([HAVE_SETRLIMIT], [/* Define to 1 if you have the `setrlimit\' function. */
++#undef HAVE_SETRLIMIT])
++m4trace:configure.in:271: -1- AC_CHECK_FUNCS([getrlimit])
++m4trace:configure.in:271: -1- AH_OUTPUT([HAVE_GETRLIMIT], [/* Define to 1 if you have the `getrlimit\' function. */
++#undef HAVE_GETRLIMIT])
++m4trace:configure.in:274: -1- AC_CHECK_FUNCS([daemon setsid])
++m4trace:configure.in:274: -1- AH_OUTPUT([HAVE_DAEMON], [/* Define to 1 if you have the `daemon\' function. */
++#undef HAVE_DAEMON])
++m4trace:configure.in:274: -1- AH_OUTPUT([HAVE_SETSID], [/* Define to 1 if you have the `setsid\' function. */
++#undef HAVE_SETSID])
++m4trace:configure.in:277: -1- AC_CHECK_FUNCS([shutdown])
++m4trace:configure.in:277: -1- AH_OUTPUT([HAVE_SHUTDOWN], [/* Define to 1 if you have the `shutdown\' function. */
++#undef HAVE_SHUTDOWN])
++m4trace:configure.in:279: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKLEN_T])
++m4trace:configure.in:279: -2- m4_pattern_allow([^HAVE_SOCKLEN_T$])
++m4trace:configure.in:279: -2- AH_OUTPUT([HAVE_SOCKLEN_T], [/* Do we have a socklen_t? */
++#undef HAVE_SOCKLEN_T])
++m4trace:configure.in:281: -2- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE])
++m4trace:configure.in:281: -2- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE$])
++m4trace:configure.in:281: -2- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE], [/* Do we have a sockaddr_storage? */
++#undef HAVE_STRUCT_SOCKADDR_STORAGE])
++m4trace:configure.in:282: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RLIM_T])
++m4trace:configure.in:282: -2- m4_pattern_allow([^HAVE_RLIM_T$])
++m4trace:configure.in:282: -2- AH_OUTPUT([HAVE_RLIM_T], [/* Do we have an rlim_t? */
++#undef HAVE_RLIM_T])
++m4trace:configure.in:290: -1- AC_CHECK_LIB([util], [setproctitle], [spt_type=SPT_BUILTIN
++ LIBS="${LIBS} -lutil"])
++m4trace:configure.in:305: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++configure.in:305: the top level])
++m4trace:configure.in:316: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++configure.in:316: the top level])
++m4trace:configure.in:327: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++configure.in:327: the top level])
++m4trace:configure.in:334: -1- AC_DEFINE_TRACE_LITERAL([SPT_TYPE])
++m4trace:configure.in:334: -1- m4_pattern_allow([^SPT_TYPE$])
++m4trace:configure.in:334: -1- AH_OUTPUT([SPT_TYPE], [/* Do we already have setproctitle? */
++#undef SPT_TYPE])
++m4trace:configure.in:344: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++configure.in:344: the top level])
++m4trace:configure.in:346: -1- AC_SUBST([WITH_NONBLOCK])
++m4trace:configure.in:346: -1- AC_SUBST_TRACE([WITH_NONBLOCK])
++m4trace:configure.in:346: -1- m4_pattern_allow([^WITH_NONBLOCK$])
++m4trace:configure.in:353: -2- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2384: AC_TRY_COMPILE is expanded from...
++configure.in:353: the top level])
++m4trace:configure.in:355: -1- AC_SUBST([WITH_GMTOFF])
++m4trace:configure.in:355: -1- AC_SUBST_TRACE([WITH_GMTOFF])
++m4trace:configure.in:355: -1- m4_pattern_allow([^WITH_GMTOFF$])
++m4trace:configure.in:383: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2490: AC_TRY_RUN is expanded from...
++configure.in:383: the top level])
++m4trace:configure.in:415: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2490: AC_TRY_RUN is expanded from...
++configure.in:415: the top level])
++m4trace:configure.in:426: -1- AC_SUBST([WITH_MAP])
++m4trace:configure.in:426: -1- AC_SUBST_TRACE([WITH_MAP])
++m4trace:configure.in:426: -1- m4_pattern_allow([^WITH_MAP$])
++m4trace:configure.in:435: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/functions.m4:75: AC_CHECK_FUNC is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/functions.m4:75: AC_CHECK_FUNC is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1400: AC_ARG_WITH is expanded from...
++configure.in:435: the top level])
++m4trace:configure.in:437: -1- AC_SUBST([WITH_LOCK])
++m4trace:configure.in:437: -1- AC_SUBST_TRACE([WITH_LOCK])
++m4trace:configure.in:437: -1- m4_pattern_allow([^WITH_LOCK$])
++m4trace:configure.in:441: -2- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC])
++m4trace:configure.in:441: -2- m4_pattern_allow([^HAVE_FDATASYNC$])
++m4trace:configure.in:441: -2- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */
++#undef HAVE_FDATASYNC])
++m4trace:configure.in:446: -1- AC_CHECK_LIB([rt], [fdatasync], [
++ LIB_RT="-lrt"
++ AC_DEFINE(HAVE_FDATASYNC,[],[Do we have fdatasync()?])
++ ])
++m4trace:configure.in:446: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC])
++m4trace:configure.in:446: -1- m4_pattern_allow([^HAVE_FDATASYNC$])
++m4trace:configure.in:446: -1- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */
++#undef HAVE_FDATASYNC])
++m4trace:configure.in:467: -1- AC_CHECK_LIB([BSD], [sigvec], [cyrus_sigveclib="-lBSD"], [
++ dnl not hp flavor
++ SAVE_LDFLAGS="$LDFLAGS"
++ dnl solaris flavor
++ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
++ AC_CHECK_LIB(ucb, sigvec, [
++ dnl more solaris flavor
++ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"],
++ [ cant_find_sigvec=yes ])
++ LDFLAGS="$SAVE_LDFLAGS"])
++m4trace:configure.in:467: -1- AC_CHECK_LIB([ucb], [sigvec], [
++ dnl more solaris flavor
++ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"], [ cant_find_sigvec=yes ])
++m4trace:configure.in:468: -1- AC_SUBST([cyrus_sigveclib])
++m4trace:configure.in:468: -1- AC_SUBST_TRACE([cyrus_sigveclib])
++m4trace:configure.in:468: -1- m4_pattern_allow([^cyrus_sigveclib$])
++m4trace:configure.in:482: -1- AC_DEFINE_TRACE_LITERAL([AFSPTS_USE_KRB5])
++m4trace:configure.in:482: -1- m4_pattern_allow([^AFSPTS_USE_KRB5$])
++m4trace:configure.in:482: -1- AH_OUTPUT([AFSPTS_USE_KRB5], [/* Should the AFS PTS plugin use krb5? */
++#undef AFSPTS_USE_KRB5])
++m4trace:configure.in:515: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2426: AC_TRY_LINK is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:1922: AC_CACHE_VAL is expanded from...
++configure.in:515: the top level])
++m4trace:configure.in:521: -1- AC_SUBST([AFS_LIBS])
++m4trace:configure.in:521: -1- AC_SUBST_TRACE([AFS_LIBS])
++m4trace:configure.in:521: -1- m4_pattern_allow([^AFS_LIBS$])
++m4trace:configure.in:522: -1- AC_SUBST([AFS_LDFLAGS])
++m4trace:configure.in:522: -1- AC_SUBST_TRACE([AFS_LDFLAGS])
++m4trace:configure.in:522: -1- m4_pattern_allow([^AFS_LDFLAGS$])
++m4trace:configure.in:523: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB])
++m4trace:configure.in:523: -1- m4_pattern_allow([^HAVE_AFSKRB$])
++m4trace:configure.in:523: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */
++#undef HAVE_AFSKRB])
++m4trace:configure.in:527: -1- AC_SUBST([AFS_LIBS])
++m4trace:configure.in:527: -1- AC_SUBST_TRACE([AFS_LIBS])
++m4trace:configure.in:527: -1- m4_pattern_allow([^AFS_LIBS$])
++m4trace:configure.in:528: -1- AC_SUBST([AFS_LDFLAGS])
++m4trace:configure.in:528: -1- AC_SUBST_TRACE([AFS_LDFLAGS])
++m4trace:configure.in:528: -1- m4_pattern_allow([^AFS_LDFLAGS$])
++m4trace:configure.in:529: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB])
++m4trace:configure.in:529: -1- m4_pattern_allow([^HAVE_AFSKRB$])
++m4trace:configure.in:529: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */
++#undef HAVE_AFSKRB])
++m4trace:configure.in:557: -1- AC_CHECK_LIB([ldap], [ldap_initialize], [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
++ AC_SUBST(LDAP_CPPFLAGS)
++ AC_SUBST(LDAP_LDFLAGS)
++ AC_SUBST(LDAP_LIBS)
++ LDAP_LIBS="-lldap -llber" ], [], [-llber])
++m4trace:configure.in:557: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP])
++m4trace:configure.in:557: -1- m4_pattern_allow([^HAVE_LDAP$])
++m4trace:configure.in:557: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */
++#undef HAVE_LDAP])
++m4trace:configure.in:557: -1- AC_SUBST([LDAP_CPPFLAGS])
++m4trace:configure.in:557: -1- AC_SUBST_TRACE([LDAP_CPPFLAGS])
++m4trace:configure.in:557: -1- m4_pattern_allow([^LDAP_CPPFLAGS$])
++m4trace:configure.in:557: -1- AC_SUBST([LDAP_LDFLAGS])
++m4trace:configure.in:557: -1- AC_SUBST_TRACE([LDAP_LDFLAGS])
++m4trace:configure.in:557: -1- m4_pattern_allow([^LDAP_LDFLAGS$])
++m4trace:configure.in:557: -1- AC_SUBST([LDAP_LIBS])
++m4trace:configure.in:557: -1- AC_SUBST_TRACE([LDAP_LIBS])
++m4trace:configure.in:557: -1- m4_pattern_allow([^LDAP_LIBS$])
++m4trace:configure.in:567: -1- AC_CHECK_LIB([ldap], [ldap_initialize], [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?])
++ AC_SUBST(LDAP_CPPFLAGS)
++ AC_SUBST(LDAP_LDFLAGS)
++ AC_SUBST(LDAP_LIBS)
++ LDAP_LIBS="-lldap -llber" ], [], [-llber])
++m4trace:configure.in:567: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP])
++m4trace:configure.in:567: -1- m4_pattern_allow([^HAVE_LDAP$])
++m4trace:configure.in:567: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */
++#undef HAVE_LDAP])
++m4trace:configure.in:567: -1- AC_SUBST([LDAP_CPPFLAGS])
++m4trace:configure.in:567: -1- AC_SUBST_TRACE([LDAP_CPPFLAGS])
++m4trace:configure.in:567: -1- m4_pattern_allow([^LDAP_CPPFLAGS$])
++m4trace:configure.in:567: -1- AC_SUBST([LDAP_LDFLAGS])
++m4trace:configure.in:567: -1- AC_SUBST_TRACE([LDAP_LDFLAGS])
++m4trace:configure.in:567: -1- m4_pattern_allow([^LDAP_LDFLAGS$])
++m4trace:configure.in:567: -1- AC_SUBST([LDAP_LIBS])
++m4trace:configure.in:567: -1- AC_SUBST_TRACE([LDAP_LIBS])
++m4trace:configure.in:567: -1- m4_pattern_allow([^LDAP_LIBS$])
++m4trace:configure.in:577: -1- AC_DEFINE_TRACE_LITERAL([WITH_PTS])
++m4trace:configure.in:577: -1- m4_pattern_allow([^WITH_PTS$])
++m4trace:configure.in:577: -1- AH_OUTPUT([WITH_PTS], [/* Build in PTS support? */
++#undef WITH_PTS])
++m4trace:configure.in:588: -1- AC_SUBST([SERVER_SUBDIRS])
++m4trace:configure.in:588: -1- AC_SUBST_TRACE([SERVER_SUBDIRS])
++m4trace:configure.in:588: -1- m4_pattern_allow([^SERVER_SUBDIRS$])
++m4trace:configure.in:606: -1- AC_CHECK_LIB([resolv], [res_search])
++m4trace:configure.in:606: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
++#undef HAVE_LIBRESOLV])
++m4trace:configure.in:606: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
++m4trace:configure.in:606: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
++m4trace:configure.in:623: -1- AC_CHECK_LIB([des], [des_ecb_encrypt], [if test "$with_statickrb" = "yes"; then
++ KRB_LIBS="$with_krb/lib/libdes.a"
++ else
++ KRB_LIBS="-ldes"
++ fi], [{ { echo "$as_me:$LINENO: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&5
++echo "$as_me: error: The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." >&2;}
++ { (exit 1); exit 1; }; }])
++m4trace:configure.in:660: -3- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++configure.in:660: the top level])
++m4trace:configure.in:661: -2- AC_CHECK_LIB([${KRBLIB}], [krb_mk_priv], [if test "$with_statickrb" = "yes"; then
++ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
++ else
++ KRB_LIBS="$KRB_LIBS -l${KRBLIB}"
++ fi], [{ echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
++echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no], [$KRB_LIBS])
++m4trace:configure.in:662: -2- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++configure.in:662: the top level])
++m4trace:configure.in:664: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++configure.in:664: the top level])
++m4trace:configure.in:669: -1- AC_DEFINE_TRACE_LITERAL([HAVE_KRB])
++m4trace:configure.in:669: -1- m4_pattern_allow([^HAVE_KRB$])
++m4trace:configure.in:669: -1- AH_OUTPUT([HAVE_KRB], [/* Support for Kerberos? */
++#undef HAVE_KRB])
++m4trace:configure.in:693: -1- AC_CHECK_LIB([rsaref], [RSAPublicEncrypt], [LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes], [cmu_have_rsaref=no])
++m4trace:configure.in:698: -1- AC_CHECK_LIB([crypto], [BIO_accept], [LIBS="-lcrypto $LIB_RSAREF ${LIBS}"], [with_openssl="no"], [$LIB_RSAREF])
++m4trace:configure.in:700: -1- AC_CHECK_LIB([ssl], [SSL_CTX_new], [LIBS="-lssl ${LIBS}"], [with_openssl="no"], [-lcrypto $LIB_RSAREF])
++m4trace:configure.in:716: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSL])
++m4trace:configure.in:716: -1- m4_pattern_allow([^HAVE_SSL$])
++m4trace:configure.in:716: -1- AH_OUTPUT([HAVE_SSL], [/* Build with SSL support? */
++#undef HAVE_SSL])
++m4trace:configure.in:719: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_ENABLE_OLD_DES_SUPPORT])
++m4trace:configure.in:719: -1- m4_pattern_allow([^OPENSSL_ENABLE_OLD_DES_SUPPORT$])
++m4trace:configure.in:719: -1- AH_OUTPUT([OPENSSL_ENABLE_OLD_DES_SUPPORT], [/* Configure OpenSSL to provide legacy des apis */
++#undef OPENSSL_ENABLE_OLD_DES_SUPPORT])
++m4trace:configure.in:720: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_DES_LIBDES_COMPATIBILITY])
++m4trace:configure.in:720: -1- m4_pattern_allow([^OPENSSL_DES_LIBDES_COMPATIBILITY$])
++m4trace:configure.in:720: -1- AH_OUTPUT([OPENSSL_DES_LIBDES_COMPATIBILITY], [/* Configure OpenSSL to provide krb4-compatible legacy des apis */
++#undef OPENSSL_DES_LIBDES_COMPATIBILITY])
++m4trace:configure.in:723: -1- AC_SUBST([OPENSSL_INC])
++m4trace:configure.in:723: -1- AC_SUBST_TRACE([OPENSSL_INC])
++m4trace:configure.in:723: -1- m4_pattern_allow([^OPENSSL_INC$])
++m4trace:configure.in:724: -1- AC_SUBST([OPENSSL_LIB])
++m4trace:configure.in:724: -1- AC_SUBST_TRACE([OPENSSL_LIB])
++m4trace:configure.in:724: -1- m4_pattern_allow([^OPENSSL_LIB$])
++m4trace:configure.in:735: -1- AC_DEFINE_TRACE_LITERAL([EGD_SOCKET])
++m4trace:configure.in:735: -1- m4_pattern_allow([^EGD_SOCKET$])
++m4trace:configure.in:735: -1- AH_OUTPUT([EGD_SOCKET], [/* Alternative to /dev/urandom? */
++#undef EGD_SOCKET])
++m4trace:configure.in:755: -1- AC_CHECK_LIB([zephyr], [ZInitialize], [ZEPHYR_LIBS="-lzephyr"], [with_zephyr="no"], [])
++m4trace:configure.in:763: -1- AC_SUBST([ZEPHYR_LIBS])
++m4trace:configure.in:763: -1- AC_SUBST_TRACE([ZEPHYR_LIBS])
++m4trace:configure.in:763: -1- m4_pattern_allow([^ZEPHYR_LIBS$])
++m4trace:configure.in:764: -1- AC_SUBST([ZEPHYR_CPPFLAGS])
++m4trace:configure.in:764: -1- AC_SUBST_TRACE([ZEPHYR_CPPFLAGS])
++m4trace:configure.in:764: -1- m4_pattern_allow([^ZEPHYR_CPPFLAGS$])
++m4trace:configure.in:766: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ZEPHYR])
++m4trace:configure.in:766: -1- m4_pattern_allow([^HAVE_ZEPHYR$])
++m4trace:configure.in:766: -1- AH_OUTPUT([HAVE_ZEPHYR], [/* Build with Zephyr support? */
++#undef HAVE_ZEPHYR])
++m4trace:configure.in:776: -1- AC_DEFINE_TRACE_LITERAL([MASTER_PIDFILE])
++m4trace:configure.in:776: -1- m4_pattern_allow([^MASTER_PIDFILE$])
++m4trace:configure.in:776: -1- AH_OUTPUT([MASTER_PIDFILE], [/* Name of the pidfile for master */
++#undef MASTER_PIDFILE])
++m4trace:configure.in:809: -1- AC_CHECK_HEADERS([sys/sockio.h])
++m4trace:configure.in:809: -1- AH_OUTPUT([HAVE_SYS_SOCKIO_H], [/* Define to 1 if you have the <sys/sockio.h> header file. */
++#undef HAVE_SYS_SOCKIO_H])
++m4trace:configure.in:823: -1- AC_SUBST([IMAP_PROGS])
++m4trace:configure.in:823: -1- AC_SUBST_TRACE([IMAP_PROGS])
++m4trace:configure.in:823: -1- m4_pattern_allow([^IMAP_PROGS$])
++m4trace:configure.in:855: -1- AC_CHECK_LIB([com_err], [com_err], [
++ # com_err is already in library path
++ # guess we're okay
++ # can use system com_err
++ with_com_err=""
++ AC_CHECK_HEADER(et/com_err.h,
++ [AC_DEFINE(HAVE_ET_COM_ERR_H,[],[We need et/com_err.h])],
++ [AC_CHECK_HEADER(com_err.h,[],[AC_ERROR([cannot locate com_err.h])])])
++ AC_PATH_PROG(COMPILE_ET, compile_et, [no compile et])
++ ], [
++ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
++ with_com_err="/usr/local"
++ AC_PATH_PROG(COMPILE_ET, /usr/local/bin/compile_et, [no compile et])
++ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
++ with_com_err="/usr"
++ AC_PATH_PROG(COMPILE_ET, /usr/bin/compile_et, [no compile et])
++ else
++ # use ours
++ with_com_err=yes
++ fi
++ ])
++m4trace:configure.in:855: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ET_COM_ERR_H])
++m4trace:configure.in:855: -1- m4_pattern_allow([^HAVE_ET_COM_ERR_H$])
++m4trace:configure.in:855: -1- AH_OUTPUT([HAVE_ET_COM_ERR_H], [/* We need et/com_err.h */
++#undef HAVE_ET_COM_ERR_H])
++m4trace:configure.in:855: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/libs.m4:139: AC_CHECK_LIB is expanded from...
++configure.in:855: the top level])
++m4trace:configure.in:855: -1- AC_SUBST([COMPILE_ET])
++m4trace:configure.in:855: -1- AC_SUBST_TRACE([COMPILE_ET])
++m4trace:configure.in:855: -1- m4_pattern_allow([^COMPILE_ET$])
++m4trace:configure.in:855: -1- AC_SUBST([COMPILE_ET])
++m4trace:configure.in:855: -1- AC_SUBST_TRACE([COMPILE_ET])
++m4trace:configure.in:855: -1- m4_pattern_allow([^COMPILE_ET$])
++m4trace:configure.in:855: -1- AC_SUBST([COMPILE_ET])
++m4trace:configure.in:855: -1- AC_SUBST_TRACE([COMPILE_ET])
++m4trace:configure.in:855: -1- m4_pattern_allow([^COMPILE_ET$])
++m4trace:configure.in:896: -1- AC_SUBST([COMPILE_ET])
++m4trace:configure.in:896: -1- AC_SUBST_TRACE([COMPILE_ET])
++m4trace:configure.in:896: -1- m4_pattern_allow([^COMPILE_ET$])
++m4trace:configure.in:897: -1- AC_SUBST([COM_ERR_LIBS])
++m4trace:configure.in:897: -1- AC_SUBST_TRACE([COM_ERR_LIBS])
++m4trace:configure.in:897: -1- m4_pattern_allow([^COM_ERR_LIBS$])
++m4trace:configure.in:898: -1- AC_SUBST([COM_ERR_LDFLAGS])
++m4trace:configure.in:898: -1- AC_SUBST_TRACE([COM_ERR_LDFLAGS])
++m4trace:configure.in:898: -1- m4_pattern_allow([^COM_ERR_LDFLAGS$])
++m4trace:configure.in:899: -1- AC_SUBST([COM_ERR_CPPFLAGS])
++m4trace:configure.in:899: -1- AC_SUBST_TRACE([COM_ERR_CPPFLAGS])
++m4trace:configure.in:899: -1- m4_pattern_allow([^COM_ERR_CPPFLAGS$])
++m4trace:configure.in:905: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++configure.in:905: the top level])
++m4trace:configure.in:920: -1- AC_DEFINE_TRACE_LITERAL([SYSLOG_FACILITY])
++m4trace:configure.in:920: -1- m4_pattern_allow([^SYSLOG_FACILITY$])
++m4trace:configure.in:920: -1- AH_OUTPUT([SYSLOG_FACILITY], [/* Syslog facility to use. */
++#undef SYSLOG_FACILITY])
++m4trace:configure.in:924: -1- AC_LIBSOURCE([getdtablesize.c])
++m4trace:configure.in:924: -1- AC_CHECK_FUNCS([getdtablesize], [], [_AC_LIBOBJ($ac_func)])
++m4trace:configure.in:924: -1- AH_OUTPUT([HAVE_GETDTABLESIZE], [/* Define to 1 if you have the `getdtablesize\' function. */
++#undef HAVE_GETDTABLESIZE])
++m4trace:configure.in:924: -1- AC_SUBST([LIB@&t at OBJS], ["$LIB@&t at OBJS $ac_func.$ac_objext"])
++m4trace:configure.in:924: -1- AC_SUBST_TRACE([LIB@&t at OBJS])
++m4trace:configure.in:924: -1- m4_pattern_allow([^LIB@&t at OBJS$])
++m4trace:configure.in:937: -2- AC_DEFINE_TRACE_LITERAL([OLD_SIEVE_SERVICE_NAME])
++m4trace:configure.in:937: -2- m4_pattern_allow([^OLD_SIEVE_SERVICE_NAME$])
++m4trace:configure.in:937: -2- AH_OUTPUT([OLD_SIEVE_SERVICE_NAME], [/* Use "imap" as sieve service name? */
++#undef OLD_SIEVE_SERVICE_NAME])
++m4trace:configure.in:946: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_LISTEXT])
++m4trace:configure.in:946: -2- m4_pattern_allow([^ENABLE_LISTEXT$])
++m4trace:configure.in:946: -2- AH_OUTPUT([ENABLE_LISTEXT], [/* Enable the LISTEXT extension? */
++#undef ENABLE_LISTEXT])
++m4trace:configure.in:953: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_X_NETSCAPE_HACK])
++m4trace:configure.in:953: -2- m4_pattern_allow([^ENABLE_X_NETSCAPE_HACK$])
++m4trace:configure.in:953: -2- AH_OUTPUT([ENABLE_X_NETSCAPE_HACK], [/* Enable Netscape Menu Option Hack? */
++#undef ENABLE_X_NETSCAPE_HACK])
++m4trace:configure.in:956: -1- AC_CHECK_LIB([dl], [dlopen])
++m4trace:configure.in:956: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the `dl\' library (-ldl). */
++#undef HAVE_LIBDL])
++m4trace:configure.in:956: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
++m4trace:configure.in:956: -1- m4_pattern_allow([^HAVE_LIBDL$])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([crypt], [crypt], [LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes], [cmu_have_crypt=no])
++m4trace:configure.in:957: -1- AC_SUBST([LIB_CRYPT])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([LIB_CRYPT])
++m4trace:configure.in:957: -1- m4_pattern_allow([^LIB_CRYPT$])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++autoconf/general.m4:1382: AC_ARG_ENABLE is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++autoconf/general.m4:1400: AC_ARG_WITH is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSSAPI_H])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSSAPI_H$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSSAPI_H], [/* Define if you have the gssapi.h header file */
++#undef HAVE_GSSAPI_H])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([resolv], [res_search])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
++#undef HAVE_LIBRESOLV])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_LIBRESOLV$])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gssapi], [gss_unwrap], [gss_impl="heimdal"], [gss_failed=1], [${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET}])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([krb5support], [krb5int_getspecific], [K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a], [], [${LIB_SOCKET}])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gssapi_krb5], [gss_unwrap], [gss_impl="mit"], [gss_failed=1], [${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gss], [csf_gss_acq_user], [gss_impl="cybersafe03"], [unset ac_cv_lib_gss_csf_gss_acq_user;
++ AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
++ gss_failed=1,$GSSAPIBASE_LIBS -lgss)], [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gss], [csf_gss_acq_user], [gss_impl="cybersafe"], [gss_failed=1], [$GSSAPIBASE_LIBS -lgss])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([gss], [gss_unwrap], [gss_impl="seam"], [gss_failed=1], [-lgss])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
++#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:2334: AC_EGREP_CPP is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
++#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */
++#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
++#undef HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:54: AC_WARN is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:2334: AC_EGREP_CPP is expanded from...
++cmulocal/sasl2.m4:267: SASL_GSSAPI_CHK is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
++#undef HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */
++#undef HAVE_GSS_C_NT_USER_NAME])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([resolv], [res_search], [GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"])
++m4trace:configure.in:957: -1- AC_CHECK_FUNCS([gsskrb5_register_acceptor_identity])
++m4trace:configure.in:957: -1- AH_OUTPUT([HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY], [/* Define to 1 if you have the `gsskrb5_register_acceptor_identity\' function.
++ */
++#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY])
++m4trace:configure.in:957: -1- AC_SUBST([GSSAPI_LIBS])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([GSSAPI_LIBS])
++m4trace:configure.in:957: -1- m4_pattern_allow([^GSSAPI_LIBS$])
++m4trace:configure.in:957: -1- AC_SUBST([GSSAPIBASE_LIBS])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([GSSAPIBASE_LIBS])
++m4trace:configure.in:957: -1- m4_pattern_allow([^GSSAPIBASE_LIBS$])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++autoconf/general.m4:1400: AC_ARG_WITH is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++autoconf/general.m4:1400: AC_ARG_WITH is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from...
++cmulocal/sasl2.m4:403: CMU_SASL2 is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- AC_CHECK_LIB([sasl2], [prop_get], [ac_cv_found_sasl=yes], [ac_cv_found_sasl=no])
++m4trace:configure.in:957: -1- AC_SUBST([LIB_DYN_SASL])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([LIB_DYN_SASL])
++m4trace:configure.in:957: -1- m4_pattern_allow([^LIB_DYN_SASL$])
++m4trace:configure.in:957: -1- AC_SUBST([DYNSASLFLAGS])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([DYNSASLFLAGS])
++m4trace:configure.in:957: -1- m4_pattern_allow([^DYNSASLFLAGS$])
++m4trace:configure.in:957: -1- AC_SUBST([LIB_SASL])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([LIB_SASL])
++m4trace:configure.in:957: -1- m4_pattern_allow([^LIB_SASL$])
++m4trace:configure.in:957: -1- AC_SUBST([SASLFLAGS])
++m4trace:configure.in:957: -1- AC_SUBST_TRACE([SASLFLAGS])
++m4trace:configure.in:957: -1- m4_pattern_allow([^SASLFLAGS$])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++cmulocal/sasl2.m4:413: CMU_SASL2_REQUIRED is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:957: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete.
++You should run autoupdate.], [autoconf/oldnames.m4:55: AC_ERROR is expanded from...
++../../lib/m4sugar/m4sh.m4:519: AS_IF is expanded from...
++autoconf/general.m4:2294: _AC_PREPROC_IFELSE is expanded from...
++autoconf/general.m4:2304: AC_PREPROC_IFELSE is expanded from...
++autoconf/general.m4:2314: AC_TRY_CPP is expanded from...
++cmulocal/sasl2.m4:444: CMU_SASL2_REQUIRE_VER is expanded from...
++configure.in:957: the top level])
++m4trace:configure.in:958: -1- AC_CHECK_LIB([sasl2], [sasl_checkapop], [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])], [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
++m4trace:configure.in:958: -1- AC_DEFINE_TRACE_LITERAL([HAVE_APOP])
++m4trace:configure.in:958: -1- m4_pattern_allow([^HAVE_APOP$])
++m4trace:configure.in:958: -1- AH_OUTPUT([HAVE_APOP], [/* Does SASL support APOP? */
++#undef HAVE_APOP])
++m4trace:configure.in:971: -1- AC_SUBST([PERL])
++m4trace:configure.in:971: -1- AC_SUBST_TRACE([PERL])
++m4trace:configure.in:971: -1- m4_pattern_allow([^PERL$])
++m4trace:configure.in:987: -1- AC_SUBST([PERL_CCCDLFLAGS])
++m4trace:configure.in:987: -1- AC_SUBST_TRACE([PERL_CCCDLFLAGS])
++m4trace:configure.in:987: -1- m4_pattern_allow([^PERL_CCCDLFLAGS$])
++m4trace:configure.in:1005: -2- AC_CHECK_LIB([md], [MD5Init], [LIBS="${LIBS} -lmd"], [MD5OBJ="md5.o"])
++m4trace:configure.in:1005: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete.
++You should run autoupdate.], [autoconf/functions.m4:138: AC_FUNC_CHECK is expanded from...
++configure.in:1005: the top level])
++m4trace:configure.in:1006: -1- AC_SUBST([MD5OBJ])
++m4trace:configure.in:1006: -1- AC_SUBST_TRACE([MD5OBJ])
++m4trace:configure.in:1006: -1- m4_pattern_allow([^MD5OBJ$])
++m4trace:configure.in:1011: -1- AC_SUBST([SNMP_SUBDIRS])
++m4trace:configure.in:1011: -1- AC_SUBST_TRACE([SNMP_SUBDIRS])
++m4trace:configure.in:1011: -1- m4_pattern_allow([^SNMP_SUBDIRS$])
++m4trace:configure.in:1013: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
++You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from...
++cmulocal/common.m4:61: CMU_FIND_LIB_SUBDIR is expanded from...
++cmulocal/libwrap.m4:30: CMU_LIBWRAP is expanded from...
++configure.in:1013: the top level])
++m4trace:configure.in:1013: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG])
++m4trace:configure.in:1013: -1- m4_pattern_allow([^SIZEOF_LONG$])
++m4trace:configure.in:1013: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */
++#undef SIZEOF_LONG])
++m4trace:configure.in:1013: -1- AC_SUBST([CMU_LIB_SUBDIR], [$ac_cv_cmu_lib_subdir])
++m4trace:configure.in:1013: -1- AC_SUBST_TRACE([CMU_LIB_SUBDIR])
++m4trace:configure.in:1013: -1- m4_pattern_allow([^CMU_LIB_SUBDIR$])
++m4trace:configure.in:1013: -1- AC_CHECK_LIB([wrap], [request_init], [
++ AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)], [with_libwrap=no], [${LIB_SOCKET}])
++m4trace:configure.in:1013: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBWRAP])
++m4trace:configure.in:1013: -1- m4_pattern_allow([^HAVE_LIBWRAP$])
++m4trace:configure.in:1013: -1- AH_OUTPUT([HAVE_LIBWRAP], [/* Do we have TCP wrappers? */
++#undef HAVE_LIBWRAP])
++m4trace:configure.in:1013: -1- AC_CHECK_LIB([nsl], [yp_get_default_domain], [LIB_WRAP="${LIB_WRAP} -lnsl"])
++m4trace:configure.in:1013: -1- AC_SUBST([LIB_WRAP])
++m4trace:configure.in:1013: -1- AC_SUBST_TRACE([LIB_WRAP])
++m4trace:configure.in:1013: -1- m4_pattern_allow([^LIB_WRAP$])
++m4trace:configure.in:1014: -1- AC_SUBST([SNMP_CONFIG])
++m4trace:configure.in:1014: -1- AC_SUBST_TRACE([SNMP_CONFIG])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^SNMP_CONFIG$])
++m4trace:configure.in:1014: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETSNMP])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^HAVE_NETSNMP$])
++m4trace:configure.in:1014: -1- AH_OUTPUT([HAVE_NETSNMP], [/* Do we have Net-SNMP support? */
++#undef HAVE_NETSNMP])
++m4trace:configure.in:1014: -1- AC_SUBST([LIB_UCDSNMP])
++m4trace:configure.in:1014: -1- AC_SUBST_TRACE([LIB_UCDSNMP])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^LIB_UCDSNMP$])
++m4trace:configure.in:1014: -1- AC_CHECK_LIB([snmp], [sprint_objid], [
++ AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)], [with_snmp=no], [${LIB_SOCKET}])
++m4trace:configure.in:1014: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UCDSNMP])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^HAVE_UCDSNMP$])
++m4trace:configure.in:1014: -1- AH_OUTPUT([HAVE_UCDSNMP], [/* Do we have UCD-SNMP support? */
++#undef HAVE_UCDSNMP])
++m4trace:configure.in:1014: -1- AC_CHECK_LIB([rpm], [rpmdbOpen], [LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"], [], [-lpopt])
++m4trace:configure.in:1014: -1- AC_SUBST([LIB_UCDSNMP])
++m4trace:configure.in:1014: -1- AC_SUBST_TRACE([LIB_UCDSNMP])
++m4trace:configure.in:1014: -1- m4_pattern_allow([^LIB_UCDSNMP$])
++m4trace:configure.in:1049: -1- AC_SUBST([LIB_RT])
++m4trace:configure.in:1049: -1- AC_SUBST_TRACE([LIB_RT])
++m4trace:configure.in:1049: -1- m4_pattern_allow([^LIB_RT$])
++m4trace:configure.in:1050: -1- AC_SUBST([IMAP_COM_ERR_LIBS])
++m4trace:configure.in:1050: -1- AC_SUBST_TRACE([IMAP_COM_ERR_LIBS])
++m4trace:configure.in:1050: -1- m4_pattern_allow([^IMAP_COM_ERR_LIBS$])
++m4trace:configure.in:1051: -1- AC_SUBST([IMAP_LIBS])
++m4trace:configure.in:1051: -1- AC_SUBST_TRACE([IMAP_LIBS])
++m4trace:configure.in:1051: -1- m4_pattern_allow([^IMAP_LIBS$])
++m4trace:configure.in:1059: -1- AC_SUBST([PERL_SUBDIRS])
++m4trace:configure.in:1059: -1- AC_SUBST_TRACE([PERL_SUBDIRS])
++m4trace:configure.in:1059: -1- m4_pattern_allow([^PERL_SUBDIRS$])
++m4trace:configure.in:1060: -1- AC_SUBST([PERL_DEPSUBDIRS])
++m4trace:configure.in:1060: -1- AC_SUBST_TRACE([PERL_DEPSUBDIRS])
++m4trace:configure.in:1060: -1- m4_pattern_allow([^PERL_DEPSUBDIRS$])
++m4trace:configure.in:1061: -1- AC_SUBST([PERL])
++m4trace:configure.in:1061: -1- AC_SUBST_TRACE([PERL])
++m4trace:configure.in:1061: -1- m4_pattern_allow([^PERL$])
++m4trace:configure.in:1107: -1- AH_OUTPUT([00001], [
++/* $Id: configure.in,v 1.268.2.23 2005/04/12 20:05:20 shadow Exp $ */
++/*
++ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
++ * endorse or promote products derived from this software without
++ * prior written permission. For permission or any other legal
++ * details, please contact
++ * Office of Technology Transfer
++ * Carnegie Mellon University
++ * 5000 Forbes Avenue
++ * Pittsburgh, PA 15213-3890
++ * (412) 268-4387, fax: (412) 268-7395
++ * tech-transfer at andrew.cmu.edu
++ *
++ * 4. Redistributions of any form whatsoever must retain the following
++ * acknowledgment:
++ * "This product includes software developed by Computing Services
++ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
++ *
++ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
++ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
++ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
++ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
++ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
++ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#ifndef _CYRUS_IMAPD_CONFIG_H_
++#define _CYRUS_IMAPD_CONFIG_H_
++])
++m4trace:configure.in:1256: -1- AH_OUTPUT([zzzz2], [
++/* time.h */
++#if TIME_WITH_SYS_TIME
++# include <sys/time.h>
++# include <time.h>
++#else
++# if HAVE_SYS_TIME_H
++# include <sys/time.h>
++# else
++# include <time.h>
++# endif
++#endif
++
++/* com_err.h, as needed */
++#ifndef IN_COM_ERR
++#ifdef HAVE_ET_COM_ERR_H
++#include <et/com_err.h>
++#else
++#include <com_err.h>
++#endif /* HAVE_ET_COM_ERR_H */
++#endif /* IN_COM_ERR */
++
++/* This allows us to work even when we don\'t have an fdatasync */
++#ifndef HAVE_FDATASYNC
++#define fdatasync(fd) fsync(fd)
++#endif
++
++/* A similar setup for not having O_DSYNC */
++#include <fcntl.h>
++
++#ifndef O_DSYNC
++# ifdef O_SYNC
++# define O_DSYNC O_SYNC /* POSIX */
++# else
++# define O_DSYNC O_FSYNC /* BSD */
++# endif
++#endif
++
++#ifndef HAVE___ATTRIBUTE__
++/* Can\'t use attributes... */
++#define __attribute__(foo)
++#endif
++
++#ifndef HAVE_SOCKLEN_T
++typedef unsigned int socklen_t;
++#endif
++
++#ifndef HAVE_RLIM_T
++typedef int rlim_t;
++#endif
++
++/* some potentially memory saving tradeoffs,
++ preconfigured in memory-saving mode */
++
++/* save the cmdlines for the ID command */
++#undef ID_SAVE_CMDLINE
++
++/* IPv6 things */
++#include <netdb.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++
++#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
++#define _SS_MAXSIZE 128 /* Implementation specific max size */
++#define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
++
++struct sockaddr_storage {
++ struct sockaddr ss_sa;
++ char __ss_pad2[_SS_PADSIZE];
++};
++# define ss_family ss_sa.sa_family
++# define HAVE_SS_FAMILY
++#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
++
++#ifndef HAVE_SS_FAMILY
++#define ss_family __ss_family
++#endif
++
++#ifndef AF_INET6
++/* Define it to something that should never appear */
++#define AF_INET6 AF_MAX
++#endif
++
++#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
++#include "gai.h"
++#endif
++
++/* End IPv6 things */
++
++#ifdef OLD_SIEVE_SERVICE_NAME
++#define SIEVE_SERVICE_NAME "imap"
++#else
++#define SIEVE_SERVICE_NAME "sieve"
++#endif
++
++/* filenames */
++#define FNAME_DBDIR "/db"
++#define FNAME_USERDIR "/user/"
++#define FNAME_DOMAINDIR "/domain/"
++#define FNAME_LOGDIR "/log/"
++#define FNAME_PTSDB "/ptclient/ptscache.db"
++#define CONFIG_FILENAME (SYSCONFDIR "/imapd.conf")
++#define DEFAULT_MASTER_CONFIG_FILENAME (SYSCONFDIR "/cyrus.conf")
++
++#ifndef HAVE_SHUTDOWN
++#define shutdown(fd, mode) 0
++#endif
++
++/* compile time options; think carefully before modifying */
++enum {
++ /* should we send an UNAVAILABLE message to master when
++ * a service is exiting (master is already going to be
++ * informed of the exit by the SIGCHLD signal anyway) ? */
++ MESSAGE_MASTER_ON_EXIT = 0,
++
++ /* should a hierarchical rename stop on error? */
++ RENAME_STOP_ON_ERROR = 1,
++
++ /* should we call fsync() to maybe help with softupdates? (it should) */
++ APPEND_ULTRA_PARANOID = 1,
++
++ /* should we log extra information at the DEBUG level for DB stuff?
++ * 0 -> nothing; 1 -> some; higher -> even more */
++ CONFIG_DB_VERBOSE = 1,
++
++ /* log timing information to LOG_DEBUG */
++ CONFIG_TIMING_VERBOSE = 0,
++
++ /* should we be pedantic about namespace or sleezy? */
++ SLEEZY_NAMESPACE = 1,
++
++ /* should we do a fast TLS session shutdown? */
++ TLS_FAST_SHUTDOWN = 1,
++
++ /* should we use the SQUAT engine to accelerate SEARCH? */
++ SQUAT_ENGINE = 1,
++
++ /* should we have long LMTP error messages? */
++ LMTP_LONG_ERROR_MSGS = 1,
++
++ /* default time to wait, in seconds, before giving up
++ * trying to lock something */
++ LOCK_GIVEUP_TIMER_DEFAULT = 100
++};
++
++#endif /* _CYRUS_IMAPD_CONFIG_H_ */
++])
++m4trace:configure.in:1259: -1- AC_CONFIG_FILES([man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile])
++m4trace:configure.in:1259: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
++You should run autoupdate.], [])
++m4trace:configure.in:1259: -1- AC_SUBST([LIB@&t at OBJS], [$ac_libobjs])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([LIB@&t at OBJS])
++m4trace:configure.in:1259: -1- m4_pattern_allow([^LIB@&t at OBJS$])
++m4trace:configure.in:1259: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([LTLIBOBJS])
++m4trace:configure.in:1259: -1- m4_pattern_allow([^LTLIBOBJS$])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([top_builddir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([srcdir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([abs_srcdir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([top_srcdir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([abs_top_srcdir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([builddir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([abs_builddir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([abs_top_builddir])
++m4trace:configure.in:1259: -1- AC_SUBST_TRACE([INSTALL])
+diff -urNad cyrus-imapd-2.3.7~/config.guess cyrus-imapd-2.3.7/config.guess
+--- cyrus-imapd-2.3.7~/config.guess 1970-01-01 01:00:00.000000000 +0100
++++ cyrus-imapd-2.3.7/config.guess 2006-08-11 17:29:39.000000000 +0200
+@@ -0,0 +1,1497 @@
++#! /bin/sh
++# Attempt to guess a canonical system name.
++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
++# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++
++timestamp='2006-02-23'
++
++# This file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, USA.
++#
++# As a special exception to the GNU General Public License, if you
++# distribute this file as part of a program that contains a
++# configuration script generated by Autoconf, you may include it under
++# the same distribution terms that you use for the rest of that program.
++
++
++# Originally written by Per Bothner <per at bothner.com>.
++# Please send patches to <config-patches at gnu.org>. Submit a context
++# diff and a properly formatted ChangeLog entry.
++#
++# This script attempts to guess a canonical system name similar to
++# config.sub. If it succeeds, it prints the system name on stdout, and
++# exits with 0. Otherwise, it exits with 1.
++#
++# The plan is that this can be called by configure scripts if you
++# don't specify an explicit build system type.
++
++me=`echo "$0" | sed -e 's,.*/,,'`
++
++usage="\
++Usage: $0 [OPTION]
++
++Output the configuration name of the system \`$me' is run on.
++
++Operation modes:
++ -h, --help print this help, then exit
++ -t, --time-stamp print date of last modification, then exit
++ -v, --version print version number, then exit
++
++Report bugs and patches to <config-patches at gnu.org>."
++
++version="\
++GNU config.guess ($timestamp)
++
++Originally written by Per Bothner.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
++Free Software Foundation, Inc.
++
++This is free software; see the source for copying conditions. There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
++
++help="
++Try \`$me --help' for more information."
++
++# Parse command line
++while test $# -gt 0 ; do
++ case $1 in
++ --time-stamp | --time* | -t )
++ echo "$timestamp" ; exit ;;
++ --version | -v )
++ echo "$version" ; exit ;;
++ --help | --h* | -h )
++ echo "$usage"; exit ;;
++ -- ) # Stop option processing
++ shift; break ;;
++ - ) # Use stdin as input.
++ break ;;
++ -* )
++ echo "$me: invalid option $1$help" >&2
++ exit 1 ;;
++ * )
++ break ;;
++ esac
++done
++
++if test $# != 0; then
++ echo "$me: too many arguments$help" >&2
++ exit 1
++fi
++
++trap 'exit 1' 1 2 15
++
++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
++# compiler to aid in system detection is discouraged as it requires
++# temporary files to be created and, as you can see below, it is a
++# headache to deal with in a portable fashion.
++
++# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
++# use `HOST_CC' if defined, but it is deprecated.
++
++# Portable tmp directory creation inspired by the Autoconf team.
++
++set_cc_for_build='
++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
++: ${TMPDIR=/tmp} ;
++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
++dummy=$tmp/dummy ;
++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
++case $CC_FOR_BUILD,$HOST_CC,$CC in
++ ,,) echo "int x;" > $dummy.c ;
++ for c in cc gcc c89 c99 ; do
++ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
++ CC_FOR_BUILD="$c"; break ;
++ fi ;
++ done ;
++ if test x"$CC_FOR_BUILD" = x ; then
++ CC_FOR_BUILD=no_compiler_found ;
++ fi
++ ;;
++ ,,*) CC_FOR_BUILD=$CC ;;
++ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
++esac ; set_cc_for_build= ;'
++
++# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
++# (ghazi at noc.rutgers.edu 1994-08-24)
++if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
++ PATH=$PATH:/.attbin ; export PATH
++fi
++
++UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
++UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
++UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
++UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
++
++# Note: order is significant - the case branches are not exclusive.
++
++case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
++ *:NetBSD:*:*)
++ # NetBSD (nbsd) targets should (where applicable) match one or
++ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
++ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
++ # switched to ELF, *-*-netbsd* would select the old
++ # object file format. This provides both forward
++ # compatibility and a consistent mechanism for selecting the
++ # object file format.
++ #
++ # Note: NetBSD doesn't particularly care about the vendor
++ # portion of the name. We always set it to "unknown".
++ sysctl="sysctl -n hw.machine_arch"
++ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
++ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
++ case "${UNAME_MACHINE_ARCH}" in
++ armeb) machine=armeb-unknown ;;
++ arm*) machine=arm-unknown ;;
++ sh3el) machine=shl-unknown ;;
++ sh3eb) machine=sh-unknown ;;
++ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
++ esac
++ # The Operating System including object format, if it has switched
++ # to ELF recently, or will in the future.
++ case "${UNAME_MACHINE_ARCH}" in
++ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
++ eval $set_cc_for_build
++ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
++ | grep __ELF__ >/dev/null
++ then
++ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
++ # Return netbsd for either. FIX?
++ os=netbsd
++ else
++ os=netbsdelf
++ fi
++ ;;
++ *)
++ os=netbsd
++ ;;
++ esac
++ # The OS release
++ # Debian GNU/NetBSD machines have a different userland, and
++ # thus, need a distinct triplet. However, they do not need
++ # kernel version information, so it can be replaced with a
++ # suitable tag, in the style of linux-gnu.
++ case "${UNAME_VERSION}" in
++ Debian*)
++ release='-gnu'
++ ;;
++ *)
++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
++ ;;
++ esac
++ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
++ # contains redundant information, the shorter form:
++ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
++ echo "${machine}-${os}${release}"
++ exit ;;
++ *:OpenBSD:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
++ exit ;;
++ *:ekkoBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
++ exit ;;
++ *:SolidBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
++ exit ;;
++ macppc:MirBSD:*:*)
++ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
++ exit ;;
++ *:MirBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
++ exit ;;
++ alpha:OSF1:*:*)
++ case $UNAME_RELEASE in
++ *4.0)
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
++ ;;
++ *5.*)
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++ ;;
++ esac
++ # According to Compaq, /usr/sbin/psrinfo has been available on
++ # OSF/1 and Tru64 systems produced since 1995. I hope that
++ # covers most systems running today. This code pipes the CPU
++ # types through head -n 1, so we only detect the type of CPU 0.
++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
++ case "$ALPHA_CPU_TYPE" in
++ "EV4 (21064)")
++ UNAME_MACHINE="alpha" ;;
++ "EV4.5 (21064)")
++ UNAME_MACHINE="alpha" ;;
++ "LCA4 (21066/21068)")
++ UNAME_MACHINE="alpha" ;;
++ "EV5 (21164)")
++ UNAME_MACHINE="alphaev5" ;;
++ "EV5.6 (21164A)")
++ UNAME_MACHINE="alphaev56" ;;
++ "EV5.6 (21164PC)")
++ UNAME_MACHINE="alphapca56" ;;
++ "EV5.7 (21164PC)")
++ UNAME_MACHINE="alphapca57" ;;
++ "EV6 (21264)")
++ UNAME_MACHINE="alphaev6" ;;
++ "EV6.7 (21264A)")
++ UNAME_MACHINE="alphaev67" ;;
++ "EV6.8CB (21264C)")
++ UNAME_MACHINE="alphaev68" ;;
++ "EV6.8AL (21264B)")
++ UNAME_MACHINE="alphaev68" ;;
++ "EV6.8CX (21264D)")
++ UNAME_MACHINE="alphaev68" ;;
++ "EV6.9A (21264/EV69A)")
++ UNAME_MACHINE="alphaev69" ;;
++ "EV7 (21364)")
++ UNAME_MACHINE="alphaev7" ;;
++ "EV7.9 (21364A)")
++ UNAME_MACHINE="alphaev79" ;;
++ esac
++ # A Pn.n version is a patched version.
++ # A Vn.n version is a released version.
++ # A Tn.n version is a released field test version.
++ # A Xn.n version is an unreleased experimental baselevel.
++ # 1.2 uses "1.2" for uname -r.
++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
++ exit ;;
++ Alpha\ *:Windows_NT*:*)
++ # How do we know it's Interix rather than the generic POSIX subsystem?
++ # Should we change UNAME_MACHINE based on the output of uname instead
++ # of the specific Alpha model?
++ echo alpha-pc-interix
++ exit ;;
++ 21064:Windows_NT:50:3)
++ echo alpha-dec-winnt3.5
++ exit ;;
++ Amiga*:UNIX_System_V:4.0:*)
++ echo m68k-unknown-sysv4
++ exit ;;
++ *:[Aa]miga[Oo][Ss]:*:*)
++ echo ${UNAME_MACHINE}-unknown-amigaos
++ exit ;;
++ *:[Mm]orph[Oo][Ss]:*:*)
++ echo ${UNAME_MACHINE}-unknown-morphos
++ exit ;;
++ *:OS/390:*:*)
++ echo i370-ibm-openedition
++ exit ;;
++ *:z/VM:*:*)
++ echo s390-ibm-zvmoe
++ exit ;;
++ *:OS400:*:*)
++ echo powerpc-ibm-os400
++ exit ;;
++ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
++ echo arm-acorn-riscix${UNAME_RELEASE}
++ exit ;;
++ arm:riscos:*:*|arm:RISCOS:*:*)
++ echo arm-unknown-riscos
++ exit ;;
++ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
++ echo hppa1.1-hitachi-hiuxmpp
++ exit ;;
++ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
++ # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
++ if test "`(/bin/universe) 2>/dev/null`" = att ; then
++ echo pyramid-pyramid-sysv3
++ else
++ echo pyramid-pyramid-bsd
++ fi
++ exit ;;
++ NILE*:*:*:dcosx)
++ echo pyramid-pyramid-svr4
++ exit ;;
++ DRS?6000:unix:4.0:6*)
++ echo sparc-icl-nx6
++ exit ;;
++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
++ case `/usr/bin/uname -p` in
++ sparc) echo sparc-icl-nx7; exit ;;
++ esac ;;
++ sun4H:SunOS:5.*:*)
++ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
++ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ i86pc:SunOS:5.*:*)
++ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ sun4*:SunOS:6*:*)
++ # According to config.sub, this is the proper way to canonicalize
++ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
++ # it's likely to be more like Solaris than SunOS4.
++ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ sun4*:SunOS:*:*)
++ case "`/usr/bin/arch -k`" in
++ Series*|S4*)
++ UNAME_RELEASE=`uname -v`
++ ;;
++ esac
++ # Japanese Language versions have a version number like `4.1.3-JL'.
++ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
++ exit ;;
++ sun3*:SunOS:*:*)
++ echo m68k-sun-sunos${UNAME_RELEASE}
++ exit ;;
++ sun*:*:4.2BSD:*)
++ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
++ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
++ case "`/bin/arch`" in
++ sun3)
++ echo m68k-sun-sunos${UNAME_RELEASE}
++ ;;
++ sun4)
++ echo sparc-sun-sunos${UNAME_RELEASE}
++ ;;
++ esac
++ exit ;;
++ aushp:SunOS:*:*)
++ echo sparc-auspex-sunos${UNAME_RELEASE}
++ exit ;;
++ # The situation for MiNT is a little confusing. The machine name
++ # can be virtually everything (everything which is not
++ # "atarist" or "atariste" at least should have a processor
++ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
++ # to the lowercase version "mint" (or "freemint"). Finally
++ # the system name "TOS" denotes a system which is actually not
++ # MiNT. But MiNT is downward compatible to TOS, so this should
++ # be no problem.
++ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
++ echo m68k-atari-mint${UNAME_RELEASE}
++ exit ;;
++ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
++ echo m68k-atari-mint${UNAME_RELEASE}
++ exit ;;
++ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
++ echo m68k-atari-mint${UNAME_RELEASE}
++ exit ;;
++ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
++ echo m68k-milan-mint${UNAME_RELEASE}
++ exit ;;
++ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
++ echo m68k-hades-mint${UNAME_RELEASE}
++ exit ;;
++ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
++ echo m68k-unknown-mint${UNAME_RELEASE}
++ exit ;;
++ m68k:machten:*:*)
++ echo m68k-apple-machten${UNAME_RELEASE}
++ exit ;;
++ powerpc:machten:*:*)
++ echo powerpc-apple-machten${UNAME_RELEASE}
++ exit ;;
++ RISC*:Mach:*:*)
++ echo mips-dec-mach_bsd4.3
++ exit ;;
++ RISC*:ULTRIX:*:*)
++ echo mips-dec-ultrix${UNAME_RELEASE}
++ exit ;;
++ VAX*:ULTRIX*:*:*)
++ echo vax-dec-ultrix${UNAME_RELEASE}
++ exit ;;
++ 2020:CLIX:*:* | 2430:CLIX:*:*)
++ echo clipper-intergraph-clix${UNAME_RELEASE}
++ exit ;;
++ mips:*:*:UMIPS | mips:*:*:RISCos)
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++#ifdef __cplusplus
++#include <stdio.h> /* for printf() prototype */
++ int main (int argc, char *argv[]) {
++#else
++ int main (argc, argv) int argc; char *argv[]; {
++#endif
++ #if defined (host_mips) && defined (MIPSEB)
++ #if defined (SYSTYPE_SYSV)
++ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
++ #endif
++ #if defined (SYSTYPE_SVR4)
++ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
++ #endif
++ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
++ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
++ #endif
++ #endif
++ exit (-1);
++ }
++EOF
++ $CC_FOR_BUILD -o $dummy $dummy.c &&
++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
++ SYSTEM_NAME=`$dummy $dummyarg` &&
++ { echo "$SYSTEM_NAME"; exit; }
++ echo mips-mips-riscos${UNAME_RELEASE}
++ exit ;;
++ Motorola:PowerMAX_OS:*:*)
++ echo powerpc-motorola-powermax
++ exit ;;
++ Motorola:*:4.3:PL8-*)
++ echo powerpc-harris-powermax
++ exit ;;
++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
++ echo powerpc-harris-powermax
++ exit ;;
++ Night_Hawk:Power_UNIX:*:*)
++ echo powerpc-harris-powerunix
++ exit ;;
++ m88k:CX/UX:7*:*)
++ echo m88k-harris-cxux7
++ exit ;;
++ m88k:*:4*:R4*)
++ echo m88k-motorola-sysv4
++ exit ;;
++ m88k:*:3*:R3*)
++ echo m88k-motorola-sysv3
++ exit ;;
++ AViiON:dgux:*:*)
++ # DG/UX returns AViiON for all architectures
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
++ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
++ then
++ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
++ [ ${TARGET_BINARY_INTERFACE}x = x ]
++ then
++ echo m88k-dg-dgux${UNAME_RELEASE}
++ else
++ echo m88k-dg-dguxbcs${UNAME_RELEASE}
++ fi
++ else
++ echo i586-dg-dgux${UNAME_RELEASE}
++ fi
++ exit ;;
++ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
++ echo m88k-dolphin-sysv3
++ exit ;;
++ M88*:*:R3*:*)
++ # Delta 88k system running SVR3
++ echo m88k-motorola-sysv3
++ exit ;;
++ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
++ echo m88k-tektronix-sysv3
++ exit ;;
++ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
++ echo m68k-tektronix-bsd
++ exit ;;
++ *:IRIX*:*:*)
++ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
++ exit ;;
++ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
++ i*86:AIX:*:*)
++ echo i386-ibm-aix
++ exit ;;
++ ia64:AIX:*:*)
++ if [ -x /usr/bin/oslevel ] ; then
++ IBM_REV=`/usr/bin/oslevel`
++ else
++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++ fi
++ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
++ exit ;;
++ *:AIX:2:3)
++ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #include <sys/systemcfg.h>
++
++ main()
++ {
++ if (!__power_pc())
++ exit(1);
++ puts("powerpc-ibm-aix3.2.5");
++ exit(0);
++ }
++EOF
++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
++ then
++ echo "$SYSTEM_NAME"
++ else
++ echo rs6000-ibm-aix3.2.5
++ fi
++ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
++ echo rs6000-ibm-aix3.2.4
++ else
++ echo rs6000-ibm-aix3.2
++ fi
++ exit ;;
++ *:AIX:*:[45])
++ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
++ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
++ IBM_ARCH=rs6000
++ else
++ IBM_ARCH=powerpc
++ fi
++ if [ -x /usr/bin/oslevel ] ; then
++ IBM_REV=`/usr/bin/oslevel`
++ else
++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++ fi
++ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
++ exit ;;
++ *:AIX:*:*)
++ echo rs6000-ibm-aix
++ exit ;;
++ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
++ echo romp-ibm-bsd4.4
++ exit ;;
++ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
++ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
++ exit ;; # report: romp-ibm BSD 4.3
++ *:BOSX:*:*)
++ echo rs6000-bull-bosx
++ exit ;;
++ DPX/2?00:B.O.S.:*:*)
++ echo m68k-bull-sysv3
++ exit ;;
++ 9000/[34]??:4.3bsd:1.*:*)
++ echo m68k-hp-bsd
++ exit ;;
++ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
++ echo m68k-hp-bsd4.4
++ exit ;;
++ 9000/[34678]??:HP-UX:*:*)
++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
++ case "${UNAME_MACHINE}" in
++ 9000/31? ) HP_ARCH=m68000 ;;
++ 9000/[34]?? ) HP_ARCH=m68k ;;
++ 9000/[678][0-9][0-9])
++ if [ -x /usr/bin/getconf ]; then
++ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
++ case "${sc_cpu_version}" in
++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
++ 532) # CPU_PA_RISC2_0
++ case "${sc_kernel_bits}" in
++ 32) HP_ARCH="hppa2.0n" ;;
++ 64) HP_ARCH="hppa2.0w" ;;
++ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
++ esac ;;
++ esac
++ fi
++ if [ "${HP_ARCH}" = "" ]; then
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++
++ #define _HPUX_SOURCE
++ #include <stdlib.h>
++ #include <unistd.h>
++
++ int main ()
++ {
++ #if defined(_SC_KERNEL_BITS)
++ long bits = sysconf(_SC_KERNEL_BITS);
++ #endif
++ long cpu = sysconf (_SC_CPU_VERSION);
++
++ switch (cpu)
++ {
++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
++ case CPU_PA_RISC2_0:
++ #if defined(_SC_KERNEL_BITS)
++ switch (bits)
++ {
++ case 64: puts ("hppa2.0w"); break;
++ case 32: puts ("hppa2.0n"); break;
++ default: puts ("hppa2.0"); break;
++ } break;
++ #else /* !defined(_SC_KERNEL_BITS) */
++ puts ("hppa2.0"); break;
++ #endif
++ default: puts ("hppa1.0"); break;
++ }
++ exit (0);
++ }
++EOF
++ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
++ test -z "$HP_ARCH" && HP_ARCH=hppa
++ fi ;;
++ esac
++ if [ ${HP_ARCH} = "hppa2.0w" ]
++ then
++ eval $set_cc_for_build
++
++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
++ # generating 64-bit code. GNU and HP use different nomenclature:
++ #
++ # $ CC_FOR_BUILD=cc ./config.guess
++ # => hppa2.0w-hp-hpux11.23
++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
++ # => hppa64-hp-hpux11.23
++
++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
++ grep __LP64__ >/dev/null
++ then
++ HP_ARCH="hppa2.0w"
++ else
++ HP_ARCH="hppa64"
++ fi
++ fi
++ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
++ exit ;;
++ ia64:HP-UX:*:*)
++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
++ echo ia64-hp-hpux${HPUX_REV}
++ exit ;;
++ 3050*:HI-UX:*:*)
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #include <unistd.h>
++ int
++ main ()
++ {
++ long cpu = sysconf (_SC_CPU_VERSION);
++ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
++ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
++ results, however. */
++ if (CPU_IS_PA_RISC (cpu))
++ {
++ switch (cpu)
++ {
++ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
++ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
++ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
++ default: puts ("hppa-hitachi-hiuxwe2"); break;
++ }
++ }
++ else if (CPU_IS_HP_MC68K (cpu))
++ puts ("m68k-hitachi-hiuxwe2");
++ else puts ("unknown-hitachi-hiuxwe2");
++ exit (0);
++ }
++EOF
++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
++ { echo "$SYSTEM_NAME"; exit; }
++ echo unknown-hitachi-hiuxwe2
++ exit ;;
++ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
++ echo hppa1.1-hp-bsd
++ exit ;;
++ 9000/8??:4.3bsd:*:*)
++ echo hppa1.0-hp-bsd
++ exit ;;
++ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
++ echo hppa1.0-hp-mpeix
++ exit ;;
++ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
++ echo hppa1.1-hp-osf
++ exit ;;
++ hp8??:OSF1:*:*)
++ echo hppa1.0-hp-osf
++ exit ;;
++ i*86:OSF1:*:*)
++ if [ -x /usr/sbin/sysversion ] ; then
++ echo ${UNAME_MACHINE}-unknown-osf1mk
++ else
++ echo ${UNAME_MACHINE}-unknown-osf1
++ fi
++ exit ;;
++ parisc*:Lites*:*:*)
++ echo hppa1.1-hp-lites
++ exit ;;
++ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
++ echo c1-convex-bsd
++ exit ;;
++ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
++ if getsysinfo -f scalar_acc
++ then echo c32-convex-bsd
++ else echo c2-convex-bsd
++ fi
++ exit ;;
++ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
++ echo c34-convex-bsd
++ exit ;;
++ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
++ echo c38-convex-bsd
++ exit ;;
++ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
++ echo c4-convex-bsd
++ exit ;;
++ CRAY*Y-MP:*:*:*)
++ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ CRAY*[A-Z]90:*:*:*)
++ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
++ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
++ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
++ -e 's/\.[^.]*$/.X/'
++ exit ;;
++ CRAY*TS:*:*:*)
++ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ CRAY*T3E:*:*:*)
++ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ CRAY*SV1:*:*:*)
++ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ *:UNICOS/mp:*:*)
++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
++ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit ;;
++ 5000:UNIX_System_V:4.*:*)
++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit ;;
++ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
++ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
++ exit ;;
++ sparc*:BSD/OS:*:*)
++ echo sparc-unknown-bsdi${UNAME_RELEASE}
++ exit ;;
++ *:BSD/OS:*:*)
++ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
++ exit ;;
++ *:FreeBSD:*:*)
++ case ${UNAME_MACHINE} in
++ pc98)
++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ *)
++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ esac
++ exit ;;
++ i*:CYGWIN*:*)
++ echo ${UNAME_MACHINE}-pc-cygwin
++ exit ;;
++ i*:MINGW*:*)
++ echo ${UNAME_MACHINE}-pc-mingw32
++ exit ;;
++ i*:MSYS_NT-*:*:*)
++ echo ${UNAME_MACHINE}-pc-mingw32
++ exit ;;
++ i*:windows32*:*)
++ # uname -m includes "-pc" on this system.
++ echo ${UNAME_MACHINE}-mingw32
++ exit ;;
++ i*:PW*:*)
++ echo ${UNAME_MACHINE}-pc-pw32
++ exit ;;
++ x86:Interix*:[345]*)
++ echo i586-pc-interix${UNAME_RELEASE}
++ exit ;;
++ EM64T:Interix*:[345]*)
++ echo x86_64-unknown-interix${UNAME_RELEASE}
++ exit ;;
++ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
++ echo i${UNAME_MACHINE}-pc-mks
++ exit ;;
++ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
++ # How do we know it's Interix rather than the generic POSIX subsystem?
++ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
++ # UNAME_MACHINE based on the output of uname instead of i386?
++ echo i586-pc-interix
++ exit ;;
++ i*:UWIN*:*)
++ echo ${UNAME_MACHINE}-pc-uwin
++ exit ;;
++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
++ echo x86_64-unknown-cygwin
++ exit ;;
++ p*:CYGWIN*:*)
++ echo powerpcle-unknown-cygwin
++ exit ;;
++ prep*:SunOS:5.*:*)
++ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ *:GNU:*:*)
++ # the GNU system
++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
++ exit ;;
++ *:GNU/*:*:*)
++ # other systems with GNU libc and userland
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++ exit ;;
++ i*86:Minix:*:*)
++ echo ${UNAME_MACHINE}-pc-minix
++ exit ;;
++ arm*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ cris:Linux:*:*)
++ echo cris-axis-linux-gnu
++ exit ;;
++ crisv32:Linux:*:*)
++ echo crisv32-axis-linux-gnu
++ exit ;;
++ frv:Linux:*:*)
++ echo frv-unknown-linux-gnu
++ exit ;;
++ ia64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ m32r*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ m68*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ mips:Linux:*:*)
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #undef CPU
++ #undef mips
++ #undef mipsel
++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
++ CPU=mipsel
++ #else
++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
++ CPU=mips
++ #else
++ CPU=
++ #endif
++ #endif
++EOF
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^CPU/{
++ s: ::g
++ p
++ }'`"
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ ;;
++ mips64:Linux:*:*)
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #undef CPU
++ #undef mips64
++ #undef mips64el
++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
++ CPU=mips64el
++ #else
++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
++ CPU=mips64
++ #else
++ CPU=
++ #endif
++ #endif
++EOF
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^CPU/{
++ s: ::g
++ p
++ }'`"
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ ;;
++ or32:Linux:*:*)
++ echo or32-unknown-linux-gnu
++ exit ;;
++ ppc:Linux:*:*)
++ echo powerpc-unknown-linux-gnu
++ exit ;;
++ ppc64:Linux:*:*)
++ echo powerpc64-unknown-linux-gnu
++ exit ;;
++ alpha:Linux:*:*)
++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
++ EV5) UNAME_MACHINE=alphaev5 ;;
++ EV56) UNAME_MACHINE=alphaev56 ;;
++ PCA56) UNAME_MACHINE=alphapca56 ;;
++ PCA57) UNAME_MACHINE=alphapca56 ;;
++ EV6) UNAME_MACHINE=alphaev6 ;;
++ EV67) UNAME_MACHINE=alphaev67 ;;
++ EV68*) UNAME_MACHINE=alphaev68 ;;
++ esac
++ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ exit ;;
++ parisc:Linux:*:* | hppa:Linux:*:*)
++ # Look for CPU level
++ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
++ PA7*) echo hppa1.1-unknown-linux-gnu ;;
++ PA8*) echo hppa2.0-unknown-linux-gnu ;;
++ *) echo hppa-unknown-linux-gnu ;;
++ esac
++ exit ;;
++ parisc64:Linux:*:* | hppa64:Linux:*:*)
++ echo hppa64-unknown-linux-gnu
++ exit ;;
++ s390:Linux:*:* | s390x:Linux:*:*)
++ echo ${UNAME_MACHINE}-ibm-linux
++ exit ;;
++ sh64*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ sh*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ sparc:Linux:*:* | sparc64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ vax:Linux:*:*)
++ echo ${UNAME_MACHINE}-dec-linux-gnu
++ exit ;;
++ x86_64:Linux:*:*)
++ echo x86_64-unknown-linux-gnu
++ exit ;;
++ i*86:Linux:*:*)
++ # The BFD linker knows what the default object file format is, so
++ # first see if it will tell us. cd to the root directory to prevent
++ # problems with other programs or directories called `ld' in the path.
++ # Set LC_ALL=C to ensure ld outputs messages in English.
++ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
++ | sed -ne '/supported targets:/!d
++ s/[ ][ ]*/ /g
++ s/.*supported targets: *//
++ s/ .*//
++ p'`
++ case "$ld_supported_targets" in
++ elf32-i386)
++ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
++ ;;
++ a.out-i386-linux)
++ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
++ exit ;;
++ coff-i386)
++ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
++ exit ;;
++ "")
++ # Either a pre-BFD a.out linker (linux-gnuoldld) or
++ # one that does not give us useful --help.
++ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
++ exit ;;
++ esac
++ # Determine whether the default compiler is a.out or elf
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #include <features.h>
++ #ifdef __ELF__
++ # ifdef __GLIBC__
++ # if __GLIBC__ >= 2
++ LIBC=gnu
++ # else
++ LIBC=gnulibc1
++ # endif
++ # else
++ LIBC=gnulibc1
++ # endif
++ #else
++ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
++ LIBC=gnu
++ #else
++ LIBC=gnuaout
++ #endif
++ #endif
++ #ifdef __dietlibc__
++ LIBC=dietlibc
++ #endif
++EOF
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^LIBC/{
++ s: ::g
++ p
++ }'`"
++ test x"${LIBC}" != x && {
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++ exit
++ }
++ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
++ ;;
++ i*86:DYNIX/ptx:4*:*)
++ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
++ # earlier versions are messed up and put the nodename in both
++ # sysname and nodename.
++ echo i386-sequent-sysv4
++ exit ;;
++ i*86:UNIX_SV:4.2MP:2.*)
++ # Unixware is an offshoot of SVR4, but it has its own version
++ # number series starting with 2...
++ # I am not positive that other SVR4 systems won't match this,
++ # I just have to hope. -- rms.
++ # Use sysv4.2uw... so that sysv4* matches it.
++ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
++ exit ;;
++ i*86:OS/2:*:*)
++ # If we were able to find `uname', then EMX Unix compatibility
++ # is probably installed.
++ echo ${UNAME_MACHINE}-pc-os2-emx
++ exit ;;
++ i*86:XTS-300:*:STOP)
++ echo ${UNAME_MACHINE}-unknown-stop
++ exit ;;
++ i*86:atheos:*:*)
++ echo ${UNAME_MACHINE}-unknown-atheos
++ exit ;;
++ i*86:syllable:*:*)
++ echo ${UNAME_MACHINE}-pc-syllable
++ exit ;;
++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
++ echo i386-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ i*86:*DOS:*:*)
++ echo ${UNAME_MACHINE}-pc-msdosdjgpp
++ exit ;;
++ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
++ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
++ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
++ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
++ else
++ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
++ fi
++ exit ;;
++ i*86:*:5:[678]*)
++ # UnixWare 7.x, OpenUNIX and OpenServer 6.
++ case `/bin/uname -X | grep "^Machine"` in
++ *486*) UNAME_MACHINE=i486 ;;
++ *Pentium) UNAME_MACHINE=i586 ;;
++ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
++ esac
++ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
++ exit ;;
++ i*86:*:3.2:*)
++ if test -f /usr/options/cb.name; then
++ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
++ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
++ elif /bin/uname -X 2>/dev/null >/dev/null ; then
++ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
++ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
++ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
++ && UNAME_MACHINE=i586
++ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
++ && UNAME_MACHINE=i686
++ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
++ && UNAME_MACHINE=i686
++ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
++ else
++ echo ${UNAME_MACHINE}-pc-sysv32
++ fi
++ exit ;;
++ pc:*:*:*)
++ # Left here for compatibility:
++ # uname -m prints for DJGPP always 'pc', but it prints nothing about
++ # the processor, so we play safe by assuming i386.
++ echo i386-pc-msdosdjgpp
++ exit ;;
++ Intel:Mach:3*:*)
++ echo i386-pc-mach3
++ exit ;;
++ paragon:*:*:*)
++ echo i860-intel-osf1
++ exit ;;
++ i860:*:4.*:*) # i860-SVR4
++ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
++ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
++ else # Add other i860-SVR4 vendors below as they are discovered.
++ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
++ fi
++ exit ;;
++ mini*:CTIX:SYS*5:*)
++ # "miniframe"
++ echo m68010-convergent-sysv
++ exit ;;
++ mc68k:UNIX:SYSTEM5:3.51m)
++ echo m68k-convergent-sysv
++ exit ;;
++ M680?0:D-NIX:5.3:*)
++ echo m68k-diab-dnix
++ exit ;;
++ M68*:*:R3V[5678]*:*)
++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
++ OS_REL=''
++ test -r /etc/.relid \
++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
++ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4; exit; } ;;
++ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
++ echo m68k-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ mc68030:UNIX_System_V:4.*:*)
++ echo m68k-atari-sysv4
++ exit ;;
++ TSUNAMI:LynxOS:2.*:*)
++ echo sparc-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ rs6000:LynxOS:2.*:*)
++ echo rs6000-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
++ echo powerpc-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ SM[BE]S:UNIX_SV:*:*)
++ echo mips-dde-sysv${UNAME_RELEASE}
++ exit ;;
++ RM*:ReliantUNIX-*:*:*)
++ echo mips-sni-sysv4
++ exit ;;
++ RM*:SINIX-*:*:*)
++ echo mips-sni-sysv4
++ exit ;;
++ *:SINIX-*:*:*)
++ if uname -p 2>/dev/null >/dev/null ; then
++ UNAME_MACHINE=`(uname -p) 2>/dev/null`
++ echo ${UNAME_MACHINE}-sni-sysv4
++ else
++ echo ns32k-sni-sysv
++ fi
++ exit ;;
++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++ # says <Richard.M.Bartel at ccMail.Census.GOV>
++ echo i586-unisys-sysv4
++ exit ;;
++ *:UNIX_System_V:4*:FTX*)
++ # From Gerald Hewes <hewes at openmarket.com>.
++ # How about differentiating between stratus architectures? -djm
++ echo hppa1.1-stratus-sysv4
++ exit ;;
++ *:*:*:FTX*)
++ # From seanf at swdc.stratus.com.
++ echo i860-stratus-sysv4
++ exit ;;
++ i*86:VOS:*:*)
++ # From Paul.Green at stratus.com.
++ echo ${UNAME_MACHINE}-stratus-vos
++ exit ;;
++ *:VOS:*:*)
++ # From Paul.Green at stratus.com.
++ echo hppa1.1-stratus-vos
++ exit ;;
++ mc68*:A/UX:*:*)
++ echo m68k-apple-aux${UNAME_RELEASE}
++ exit ;;
++ news*:NEWS-OS:6*:*)
++ echo mips-sony-newsos6
++ exit ;;
++ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
++ if [ -d /usr/nec ]; then
++ echo mips-nec-sysv${UNAME_RELEASE}
++ else
++ echo mips-unknown-sysv${UNAME_RELEASE}
++ fi
++ exit ;;
++ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
++ echo powerpc-be-beos
++ exit ;;
++ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
++ echo powerpc-apple-beos
++ exit ;;
++ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
++ echo i586-pc-beos
++ exit ;;
++ SX-4:SUPER-UX:*:*)
++ echo sx4-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-5:SUPER-UX:*:*)
++ echo sx5-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-6:SUPER-UX:*:*)
++ echo sx6-nec-superux${UNAME_RELEASE}
++ exit ;;
++ Power*:Rhapsody:*:*)
++ echo powerpc-apple-rhapsody${UNAME_RELEASE}
++ exit ;;
++ *:Rhapsody:*:*)
++ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
++ exit ;;
++ *:Darwin:*:*)
++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
++ case $UNAME_PROCESSOR in
++ unknown) UNAME_PROCESSOR=powerpc ;;
++ esac
++ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
++ exit ;;
++ *:procnto*:*:* | *:QNX:[0123456789]*:*)
++ UNAME_PROCESSOR=`uname -p`
++ if test "$UNAME_PROCESSOR" = "x86"; then
++ UNAME_PROCESSOR=i386
++ UNAME_MACHINE=pc
++ fi
++ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
++ exit ;;
++ *:QNX:*:4*)
++ echo i386-pc-qnx
++ exit ;;
++ NSE-?:NONSTOP_KERNEL:*:*)
++ echo nse-tandem-nsk${UNAME_RELEASE}
++ exit ;;
++ NSR-?:NONSTOP_KERNEL:*:*)
++ echo nsr-tandem-nsk${UNAME_RELEASE}
++ exit ;;
++ *:NonStop-UX:*:*)
++ echo mips-compaq-nonstopux
++ exit ;;
++ BS2000:POSIX*:*:*)
++ echo bs2000-siemens-sysv
++ exit ;;
++ DS/*:UNIX_System_V:*:*)
++ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
++ exit ;;
++ *:Plan9:*:*)
++ # "uname -m" is not consistent, so use $cputype instead. 386
++ # is converted to i386 for consistency with other x86
++ # operating systems.
++ if test "$cputype" = "386"; then
++ UNAME_MACHINE=i386
++ else
++ UNAME_MACHINE="$cputype"
++ fi
++ echo ${UNAME_MACHINE}-unknown-plan9
++ exit ;;
++ *:TOPS-10:*:*)
++ echo pdp10-unknown-tops10
++ exit ;;
++ *:TENEX:*:*)
++ echo pdp10-unknown-tenex
++ exit ;;
++ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
++ echo pdp10-dec-tops20
++ exit ;;
++ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
++ echo pdp10-xkl-tops20
++ exit ;;
++ *:TOPS-20:*:*)
++ echo pdp10-unknown-tops20
++ exit ;;
++ *:ITS:*:*)
++ echo pdp10-unknown-its
++ exit ;;
++ SEI:*:*:SEIUX)
++ echo mips-sei-seiux${UNAME_RELEASE}
++ exit ;;
++ *:DragonFly:*:*)
++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
++ exit ;;
++ *:*VMS:*:*)
++ UNAME_MACHINE=`(uname -p) 2>/dev/null`
++ case "${UNAME_MACHINE}" in
++ A*) echo alpha-dec-vms ; exit ;;
++ I*) echo ia64-dec-vms ; exit ;;
++ V*) echo vax-dec-vms ; exit ;;
++ esac ;;
++ *:XENIX:*:SysV)
++ echo i386-pc-xenix
++ exit ;;
++ i*86:skyos:*:*)
++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
++ exit ;;
++ i*86:rdos:*:*)
++ echo ${UNAME_MACHINE}-pc-rdos
++ exit ;;
++esac
++
++#echo '(No uname command or uname output not recognized.)' 1>&2
++#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
++
++eval $set_cc_for_build
++cat >$dummy.c <<EOF
++#ifdef _SEQUENT_
++# include <sys/types.h>
++# include <sys/utsname.h>
++#endif
++main ()
++{
++#if defined (sony)
++#if defined (MIPSEB)
++ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
++ I don't know.... */
++ printf ("mips-sony-bsd\n"); exit (0);
++#else
++#include <sys/param.h>
++ printf ("m68k-sony-newsos%s\n",
++#ifdef NEWSOS4
++ "4"
++#else
++ ""
++#endif
++ ); exit (0);
++#endif
++#endif
++
++#if defined (__arm) && defined (__acorn) && defined (__unix)
++ printf ("arm-acorn-riscix\n"); exit (0);
++#endif
++
++#if defined (hp300) && !defined (hpux)
++ printf ("m68k-hp-bsd\n"); exit (0);
++#endif
++
++#if defined (NeXT)
++#if !defined (__ARCHITECTURE__)
++#define __ARCHITECTURE__ "m68k"
++#endif
++ int version;
++ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
++ if (version < 4)
++ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
++ else
++ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
++ exit (0);
++#endif
++
++#if defined (MULTIMAX) || defined (n16)
++#if defined (UMAXV)
++ printf ("ns32k-encore-sysv\n"); exit (0);
++#else
++#if defined (CMU)
++ printf ("ns32k-encore-mach\n"); exit (0);
++#else
++ printf ("ns32k-encore-bsd\n"); exit (0);
++#endif
++#endif
++#endif
++
++#if defined (__386BSD__)
++ printf ("i386-pc-bsd\n"); exit (0);
++#endif
++
++#if defined (sequent)
++#if defined (i386)
++ printf ("i386-sequent-dynix\n"); exit (0);
++#endif
++#if defined (ns32000)
++ printf ("ns32k-sequent-dynix\n"); exit (0);
++#endif
++#endif
++
++#if defined (_SEQUENT_)
++ struct utsname un;
++
++ uname(&un);
++
++ if (strncmp(un.version, "V2", 2) == 0) {
++ printf ("i386-sequent-ptx2\n"); exit (0);
++ }
++ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
++ printf ("i386-sequent-ptx1\n"); exit (0);
++ }
++ printf ("i386-sequent-ptx\n"); exit (0);
++
++#endif
++
++#if defined (vax)
++# if !defined (ultrix)
++# include <sys/param.h>
++# if defined (BSD)
++# if BSD == 43
++ printf ("vax-dec-bsd4.3\n"); exit (0);
++# else
++# if BSD == 199006
++ printf ("vax-dec-bsd4.3reno\n"); exit (0);
++# else
++ printf ("vax-dec-bsd\n"); exit (0);
++# endif
++# endif
++# else
++ printf ("vax-dec-bsd\n"); exit (0);
++# endif
++# else
++ printf ("vax-dec-ultrix\n"); exit (0);
++# endif
++#endif
++
++#if defined (alliant) && defined (i860)
++ printf ("i860-alliant-bsd\n"); exit (0);
++#endif
++
++ exit (1);
++}
++EOF
++
++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
++ { echo "$SYSTEM_NAME"; exit; }
++
++# Apollos put the system type in the environment.
++
++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
++
++# Convex versions that predate uname can use getsysinfo(1)
++
++if [ -x /usr/convex/getsysinfo ]
++then
++ case `getsysinfo -f cpu_type` in
++ c1*)
++ echo c1-convex-bsd
++ exit ;;
++ c2*)
++ if getsysinfo -f scalar_acc
++ then echo c32-convex-bsd
++ else echo c2-convex-bsd
++ fi
++ exit ;;
++ c34*)
++ echo c34-convex-bsd
++ exit ;;
++ c38*)
++ echo c38-convex-bsd
++ exit ;;
++ c4*)
++ echo c4-convex-bsd
++ exit ;;
++ esac
++fi
++
++cat >&2 <<EOF
++$0: unable to guess system type
++
++This script, last modified $timestamp, has failed to recognize
++the operating system you are using. It is advised that you
++download the most up to date version of the config scripts from
++
++ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
++and
++ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
++
++If the version you run ($0) is already up to date, please
++send the following data and any information you think might be
++pertinent to <config-patches at gnu.org> in order to provide the needed
++information to handle your system.
++
++config.guess timestamp = $timestamp
++
++uname -m = `(uname -m) 2>/dev/null || echo unknown`
++uname -r = `(uname -r) 2>/dev/null || echo unknown`
++uname -s = `(uname -s) 2>/dev/null || echo unknown`
++uname -v = `(uname -v) 2>/dev/null || echo unknown`
++
++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
++/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
++
++hostinfo = `(hostinfo) 2>/dev/null`
++/bin/universe = `(/bin/universe) 2>/dev/null`
++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
++/bin/arch = `(/bin/arch) 2>/dev/null`
++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
++
++UNAME_MACHINE = ${UNAME_MACHINE}
++UNAME_RELEASE = ${UNAME_RELEASE}
++UNAME_SYSTEM = ${UNAME_SYSTEM}
++UNAME_VERSION = ${UNAME_VERSION}
++EOF
++
++exit 1
++
++# Local variables:
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "timestamp='"
++# time-stamp-format: "%:y-%02m-%02d"
++# time-stamp-end: "'"
++# End:
+diff -urNad cyrus-imapd-2.3.7~/config.h.in cyrus-imapd-2.3.7/config.h.in
+--- cyrus-imapd-2.3.7~/config.h.in 2006-07-10 16:31:51.000000000 +0200
++++ cyrus-imapd-2.3.7/config.h.in 2006-08-11 17:29:39.000000000 +0200
+@@ -85,6 +85,10 @@
+ /* Define to 1 if you have the `daemon' function. */
+ #undef HAVE_DAEMON
+
++/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
++ */
++#undef HAVE_DECL_TZNAME
++
+ /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+ #undef HAVE_DIRENT_H
+@@ -153,9 +157,6 @@
+ /* Do we have TCP wrappers? */
+ #undef HAVE_LIBWRAP
+
+-/* Define to 1 if you support file names longer than 14 characters. */
+-#undef HAVE_LONG_FILE_NAMES
+-
+ /* Does the compiler support long long int? */
+ #undef HAVE_LONG_LONG_INT
+
+@@ -316,13 +317,13 @@
+ /* Directiory to use for service binaries */
+ #undef SERVICE_PATH
+
+-/* The size of a `long', as computed by sizeof. */
++/* The size of `long', as computed by sizeof. */
+ #undef SIZEOF_LONG
+
+-/* The size of a `long long int', as computed by sizeof. */
++/* The size of `long long int', as computed by sizeof. */
+ #undef SIZEOF_LONG_LONG_INT
+
+-/* The size of a `unsigned long long int', as computed by sizeof. */
++/* The size of `unsigned long long int', as computed by sizeof. */
+ #undef SIZEOF_UNSIGNED_LONG_LONG_INT
+
+ /* Do we already have setproctitle? */
+@@ -512,7 +513,11 @@
+ SQUAT_ENGINE = 1,
+
+ /* should we have long LMTP error messages? */
+- LMTP_LONG_ERROR_MSGS = 1
++ LMTP_LONG_ERROR_MSGS = 1,
++
++ /* default time to wait, in seconds, before giving up
++ * trying to lock something */
++ LOCK_GIVEUP_TIMER_DEFAULT = 100
+ };
+
+ #endif /* _CYRUS_IMAPD_CONFIG_H_ */
+diff -urNad cyrus-imapd-2.3.7~/config.sub cyrus-imapd-2.3.7/config.sub
+--- cyrus-imapd-2.3.7~/config.sub 1970-01-01 01:00:00.000000000 +0100
++++ cyrus-imapd-2.3.7/config.sub 2006-08-11 17:29:39.000000000 +0200
+@@ -0,0 +1,1608 @@
++#! /bin/sh
++# Configuration validation subroutine script.
++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
++# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++
++timestamp='2006-02-23'
++
++# This file is (in principle) common to ALL GNU software.
++# The presence of a machine in this file suggests that SOME GNU software
++# can handle that machine. It does not imply ALL GNU software can.
++#
++# This file is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, USA.
++#
++# As a special exception to the GNU General Public License, if you
++# distribute this file as part of a program that contains a
++# configuration script generated by Autoconf, you may include it under
++# the same distribution terms that you use for the rest of that program.
++
++
++# Please send patches to <config-patches at gnu.org>. Submit a context
++# diff and a properly formatted ChangeLog entry.
++#
++# Configuration subroutine to validate and canonicalize a configuration type.
++# Supply the specified configuration type as an argument.
++# If it is invalid, we print an error message on stderr and exit with code 1.
++# Otherwise, we print the canonical config type on stdout and succeed.
++
++# This file is supposed to be the same for all GNU packages
++# and recognize all the CPU types, system types and aliases
++# that are meaningful with *any* GNU software.
++# Each package is responsible for reporting which valid configurations
++# it does not support. The user should be able to distinguish
++# a failure to support a valid configuration from a meaningless
++# configuration.
++
++# The goal of this file is to map all the various variations of a given
++# machine specification into a single specification in the form:
++# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
++# or in some cases, the newer four-part form:
++# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
++# It is wrong to echo any other type of specification.
++
++me=`echo "$0" | sed -e 's,.*/,,'`
++
++usage="\
++Usage: $0 [OPTION] CPU-MFR-OPSYS
++ $0 [OPTION] ALIAS
++
++Canonicalize a configuration name.
++
++Operation modes:
++ -h, --help print this help, then exit
++ -t, --time-stamp print date of last modification, then exit
++ -v, --version print version number, then exit
++
++Report bugs and patches to <config-patches at gnu.org>."
++
++version="\
++GNU config.sub ($timestamp)
++
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
++Free Software Foundation, Inc.
++
++This is free software; see the source for copying conditions. There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
++
++help="
++Try \`$me --help' for more information."
++
++# Parse command line
++while test $# -gt 0 ; do
++ case $1 in
++ --time-stamp | --time* | -t )
++ echo "$timestamp" ; exit ;;
++ --version | -v )
++ echo "$version" ; exit ;;
++ --help | --h* | -h )
++ echo "$usage"; exit ;;
++ -- ) # Stop option processing
++ shift; break ;;
++ - ) # Use stdin as input.
++ break ;;
++ -* )
++ echo "$me: invalid option $1$help"
++ exit 1 ;;
++
++ *local*)
++ # First pass through any local machine types.
++ echo $1
++ exit ;;
++
++ * )
++ break ;;
++ esac
++done
++
++case $# in
++ 0) echo "$me: missing argument$help" >&2
++ exit 1;;
++ 1) ;;
++ *) echo "$me: too many arguments$help" >&2
++ exit 1;;
++esac
++
++# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
++# Here we must recognize all the valid KERNEL-OS combinations.
++maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
++case $maybe_os in
++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++ storm-chaos* | os2-emx* | rtmk-nova*)
++ os=-$maybe_os
++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
++ ;;
++ *)
++ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
++ if [ $basic_machine != $1 ]
++ then os=`echo $1 | sed 's/.*-/-/'`
++ else os=; fi
++ ;;
++esac
++
++### Let's recognize common machines as not being operating systems so
++### that things like config.sub decstation-3100 work. We also
++### recognize some manufacturers as not being operating systems, so we
++### can provide default operating systems below.
++case $os in
++ -sun*os*)
++ # Prevent following clause from handling this invalid input.
++ ;;
++ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
++ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
++ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
++ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
++ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
++ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
++ -apple | -axis | -knuth | -cray)
++ os=
++ basic_machine=$1
++ ;;
++ -sim | -cisco | -oki | -wec | -winbond)
++ os=
++ basic_machine=$1
++ ;;
++ -scout)
++ ;;
++ -wrs)
++ os=-vxworks
++ basic_machine=$1
++ ;;
++ -chorusos*)
++ os=-chorusos
++ basic_machine=$1
++ ;;
++ -chorusrdb)
++ os=-chorusrdb
++ basic_machine=$1
++ ;;
++ -hiux*)
++ os=-hiuxwe2
++ ;;
++ -sco6)
++ os=-sco5v6
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -sco5)
++ os=-sco3.2v5
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -sco4)
++ os=-sco3.2v4
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -sco3.2.[4-9]*)
++ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -sco3.2v[4-9]*)
++ # Don't forget version if it is 3.2v4 or newer.
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -sco5v6*)
++ # Don't forget version if it is 3.2v4 or newer.
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -sco*)
++ os=-sco3.2v2
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -udk*)
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -isc)
++ os=-isc2.2
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -clix*)
++ basic_machine=clipper-intergraph
++ ;;
++ -isc*)
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
++ -lynx*)
++ os=-lynxos
++ ;;
++ -ptx*)
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
++ ;;
++ -windowsnt*)
++ os=`echo $os | sed -e 's/windowsnt/winnt/'`
++ ;;
++ -psos*)
++ os=-psos
++ ;;
++ -mint | -mint[0-9]*)
++ basic_machine=m68k-atari
++ os=-mint
++ ;;
++esac
++
++# Decode aliases for certain CPU-COMPANY combinations.
++case $basic_machine in
++ # Recognize the basic CPU types without company name.
++ # Some are omitted here because they have special meanings below.
++ 1750a | 580 \
++ | a29k \
++ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
++ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
++ | am33_2.0 \
++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
++ | bfin \
++ | c4x | clipper \
++ | d10v | d30v | dlx | dsp16xx \
++ | fr30 | frv \
++ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
++ | i370 | i860 | i960 | ia64 \
++ | ip2k | iq2000 \
++ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
++ | mips | mipsbe | mipseb | mipsel | mipsle \
++ | mips16 \
++ | mips64 | mips64el \
++ | mips64vr | mips64vrel \
++ | mips64orion | mips64orionel \
++ | mips64vr4100 | mips64vr4100el \
++ | mips64vr4300 | mips64vr4300el \
++ | mips64vr5000 | mips64vr5000el \
++ | mips64vr5900 | mips64vr5900el \
++ | mipsisa32 | mipsisa32el \
++ | mipsisa32r2 | mipsisa32r2el \
++ | mipsisa64 | mipsisa64el \
++ | mipsisa64r2 | mipsisa64r2el \
++ | mipsisa64sb1 | mipsisa64sb1el \
++ | mipsisa64sr71k | mipsisa64sr71kel \
++ | mipstx39 | mipstx39el \
++ | mn10200 | mn10300 \
++ | mt \
++ | msp430 \
++ | nios | nios2 \
++ | ns16k | ns32k \
++ | or32 \
++ | pdp10 | pdp11 | pj | pjl \
++ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
++ | pyramid \
++ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
++ | sh64 | sh64le \
++ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
++ | sparcv8 | sparcv9 | sparcv9b \
++ | strongarm \
++ | tahoe | thumb | tic4x | tic80 | tron \
++ | v850 | v850e \
++ | we32k \
++ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
++ | z8k)
++ basic_machine=$basic_machine-unknown
++ ;;
++ m32c)
++ basic_machine=$basic_machine-unknown
++ ;;
++ m6811 | m68hc11 | m6812 | m68hc12)
++ # Motorola 68HC11/12.
++ basic_machine=$basic_machine-unknown
++ os=-none
++ ;;
++ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
++ ;;
++ ms1)
++ basic_machine=mt-unknown
++ ;;
++
++ # We use `pc' rather than `unknown'
++ # because (1) that's what they normally are, and
++ # (2) the word "unknown" tends to confuse beginning users.
++ i*86 | x86_64)
++ basic_machine=$basic_machine-pc
++ ;;
++ # Object if more than one company name word.
++ *-*-*)
++ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
++ exit 1
++ ;;
++ # Recognize the basic CPU types with company name.
++ 580-* \
++ | a29k-* \
++ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
++ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
++ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
++ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
++ | avr-* \
++ | bfin-* | bs2000-* \
++ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
++ | clipper-* | craynv-* | cydra-* \
++ | d10v-* | d30v-* | dlx-* \
++ | elxsi-* \
++ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
++ | h8300-* | h8500-* \
++ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
++ | i*86-* | i860-* | i960-* | ia64-* \
++ | ip2k-* | iq2000-* \
++ | m32r-* | m32rle-* \
++ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
++ | m88110-* | m88k-* | maxq-* | mcore-* \
++ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
++ | mips16-* \
++ | mips64-* | mips64el-* \
++ | mips64vr-* | mips64vrel-* \
++ | mips64orion-* | mips64orionel-* \
++ | mips64vr4100-* | mips64vr4100el-* \
++ | mips64vr4300-* | mips64vr4300el-* \
++ | mips64vr5000-* | mips64vr5000el-* \
++ | mips64vr5900-* | mips64vr5900el-* \
++ | mipsisa32-* | mipsisa32el-* \
++ | mipsisa32r2-* | mipsisa32r2el-* \
++ | mipsisa64-* | mipsisa64el-* \
++ | mipsisa64r2-* | mipsisa64r2el-* \
++ | mipsisa64sb1-* | mipsisa64sb1el-* \
++ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
++ | mipstx39-* | mipstx39el-* \
++ | mmix-* \
++ | mt-* \
++ | msp430-* \
++ | nios-* | nios2-* \
++ | none-* | np1-* | ns16k-* | ns32k-* \
++ | orion-* \
++ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
++ | pyramid-* \
++ | romp-* | rs6000-* \
++ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
++ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
++ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
++ | sparclite-* \
++ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++ | tahoe-* | thumb-* \
++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++ | tron-* \
++ | v850-* | v850e-* | vax-* \
++ | we32k-* \
++ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
++ | xstormy16-* | xtensa-* \
++ | ymp-* \
++ | z8k-*)
++ ;;
++ m32c-*)
++ ;;
++ # Recognize the various machine names and aliases which stand
++ # for a CPU type and a company and sometimes even an OS.
++ 386bsd)
++ basic_machine=i386-unknown
++ os=-bsd
++ ;;
++ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
++ basic_machine=m68000-att
++ ;;
++ 3b*)
++ basic_machine=we32k-att
++ ;;
++ a29khif)
++ basic_machine=a29k-amd
++ os=-udi
++ ;;
++ abacus)
++ basic_machine=abacus-unknown
++ ;;
++ adobe68k)
++ basic_machine=m68010-adobe
++ os=-scout
++ ;;
++ alliant | fx80)
++ basic_machine=fx80-alliant
++ ;;
++ altos | altos3068)
++ basic_machine=m68k-altos
++ ;;
++ am29k)
++ basic_machine=a29k-none
++ os=-bsd
++ ;;
++ amd64)
++ basic_machine=x86_64-pc
++ ;;
++ amd64-*)
++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ amdahl)
++ basic_machine=580-amdahl
++ os=-sysv
++ ;;
++ amiga | amiga-*)
++ basic_machine=m68k-unknown
++ ;;
++ amigaos | amigados)
++ basic_machine=m68k-unknown
++ os=-amigaos
++ ;;
++ amigaunix | amix)
++ basic_machine=m68k-unknown
++ os=-sysv4
++ ;;
++ apollo68)
++ basic_machine=m68k-apollo
++ os=-sysv
++ ;;
++ apollo68bsd)
++ basic_machine=m68k-apollo
++ os=-bsd
++ ;;
++ aux)
++ basic_machine=m68k-apple
++ os=-aux
++ ;;
++ balance)
++ basic_machine=ns32k-sequent
++ os=-dynix
++ ;;
++ c90)
++ basic_machine=c90-cray
++ os=-unicos
++ ;;
++ convex-c1)
++ basic_machine=c1-convex
++ os=-bsd
++ ;;
++ convex-c2)
++ basic_machine=c2-convex
++ os=-bsd
++ ;;
++ convex-c32)
++ basic_machine=c32-convex
++ os=-bsd
++ ;;
++ convex-c34)
++ basic_machine=c34-convex
++ os=-bsd
++ ;;
++ convex-c38)
++ basic_machine=c38-convex
++ os=-bsd
++ ;;
++ cray | j90)
++ basic_machine=j90-cray
++ os=-unicos
++ ;;
++ craynv)
++ basic_machine=craynv-cray
++ os=-unicosmp
++ ;;
++ cr16c)
++ basic_machine=cr16c-unknown
++ os=-elf
++ ;;
++ crds | unos)
++ basic_machine=m68k-crds
++ ;;
++ crisv32 | crisv32-* | etraxfs*)
++ basic_machine=crisv32-axis
++ ;;
++ cris | cris-* | etrax*)
++ basic_machine=cris-axis
++ ;;
++ crx)
++ basic_machine=crx-unknown
++ os=-elf
++ ;;
++ da30 | da30-*)
++ basic_machine=m68k-da30
++ ;;
++ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
++ basic_machine=mips-dec
++ ;;
++ decsystem10* | dec10*)
++ basic_machine=pdp10-dec
++ os=-tops10
++ ;;
++ decsystem20* | dec20*)
++ basic_machine=pdp10-dec
++ os=-tops20
++ ;;
++ delta | 3300 | motorola-3300 | motorola-delta \
++ | 3300-motorola | delta-motorola)
++ basic_machine=m68k-motorola
++ ;;
++ delta88)
++ basic_machine=m88k-motorola
++ os=-sysv3
++ ;;
++ djgpp)
++ basic_machine=i586-pc
++ os=-msdosdjgpp
++ ;;
++ dpx20 | dpx20-*)
++ basic_machine=rs6000-bull
++ os=-bosx
++ ;;
++ dpx2* | dpx2*-bull)
++ basic_machine=m68k-bull
++ os=-sysv3
++ ;;
++ ebmon29k)
++ basic_machine=a29k-amd
++ os=-ebmon
++ ;;
++ elxsi)
++ basic_machine=elxsi-elxsi
++ os=-bsd
++ ;;
++ encore | umax | mmax)
++ basic_machine=ns32k-encore
++ ;;
++ es1800 | OSE68k | ose68k | ose | OSE)
++ basic_machine=m68k-ericsson
++ os=-ose
++ ;;
++ fx2800)
++ basic_machine=i860-alliant
++ ;;
++ genix)
++ basic_machine=ns32k-ns
++ ;;
++ gmicro)
++ basic_machine=tron-gmicro
++ os=-sysv
++ ;;
++ go32)
++ basic_machine=i386-pc
++ os=-go32
++ ;;
++ h3050r* | hiux*)
++ basic_machine=hppa1.1-hitachi
++ os=-hiuxwe2
++ ;;
++ h8300hms)
++ basic_machine=h8300-hitachi
++ os=-hms
++ ;;
++ h8300xray)
++ basic_machine=h8300-hitachi
++ os=-xray
++ ;;
++ h8500hms)
++ basic_machine=h8500-hitachi
++ os=-hms
++ ;;
++ harris)
++ basic_machine=m88k-harris
++ os=-sysv3
++ ;;
++ hp300-*)
++ basic_machine=m68k-hp
++ ;;
++ hp300bsd)
++ basic_machine=m68k-hp
++ os=-bsd
++ ;;
++ hp300hpux)
++ basic_machine=m68k-hp
++ os=-hpux
++ ;;
++ hp3k9[0-9][0-9] | hp9[0-9][0-9])
++ basic_machine=hppa1.0-hp
++ ;;
++ hp9k2[0-9][0-9] | hp9k31[0-9])
++ basic_machine=m68000-hp
++ ;;
++ hp9k3[2-9][0-9])
++ basic_machine=m68k-hp
++ ;;
++ hp9k6[0-9][0-9] | hp6[0-9][0-9])
++ basic_machine=hppa1.0-hp
++ ;;
++ hp9k7[0-79][0-9] | hp7[0-79][0-9])
++ basic_machine=hppa1.1-hp
++ ;;
++ hp9k78[0-9] | hp78[0-9])
++ # FIXME: really hppa2.0-hp
++ basic_machine=hppa1.1-hp
++ ;;
++ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
++ # FIXME: really hppa2.0-hp
++ basic_machine=hppa1.1-hp
++ ;;
++ hp9k8[0-9][13679] | hp8[0-9][13679])
++ basic_machine=hppa1.1-hp
++ ;;
++ hp9k8[0-9][0-9] | hp8[0-9][0-9])
++ basic_machine=hppa1.0-hp
++ ;;
++ hppa-next)
++ os=-nextstep3
++ ;;
++ hppaosf)
++ basic_machine=hppa1.1-hp
++ os=-osf
++ ;;
++ hppro)
++ basic_machine=hppa1.1-hp
++ os=-proelf
++ ;;
++ i370-ibm* | ibm*)
++ basic_machine=i370-ibm
++ ;;
++# I'm not sure what "Sysv32" means. Should this be sysv3.2?
++ i*86v32)
++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
++ os=-sysv32
++ ;;
++ i*86v4*)
++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
++ os=-sysv4
++ ;;
++ i*86v)
++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
++ os=-sysv
++ ;;
++ i*86sol2)
++ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
++ os=-solaris2
++ ;;
++ i386mach)
++ basic_machine=i386-mach
++ os=-mach
++ ;;
++ i386-vsta | vsta)
++ basic_machine=i386-unknown
++ os=-vsta
++ ;;
++ iris | iris4d)
++ basic_machine=mips-sgi
++ case $os in
++ -irix*)
++ ;;
++ *)
++ os=-irix4
++ ;;
++ esac
++ ;;
++ isi68 | isi)
++ basic_machine=m68k-isi
++ os=-sysv
++ ;;
++ m88k-omron*)
++ basic_machine=m88k-omron
++ ;;
++ magnum | m3230)
++ basic_machine=mips-mips
++ os=-sysv
++ ;;
++ merlin)
++ basic_machine=ns32k-utek
++ os=-sysv
++ ;;
++ mingw32)
++ basic_machine=i386-pc
++ os=-mingw32
++ ;;
++ miniframe)
++ basic_machine=m68000-convergent
++ ;;
++ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
++ basic_machine=m68k-atari
++ os=-mint
++ ;;
++ mips3*-*)
++ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
++ ;;
++ mips3*)
++ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
++ ;;
++ monitor)
++ basic_machine=m68k-rom68k
++ os=-coff
++ ;;
++ morphos)
++ basic_machine=powerpc-unknown
++ os=-morphos
++ ;;
++ msdos)
++ basic_machine=i386-pc
++ os=-msdos
++ ;;
++ ms1-*)
++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
++ ;;
++ mvs)
++ basic_machine=i370-ibm
++ os=-mvs
++ ;;
++ ncr3000)
++ basic_machine=i486-ncr
++ os=-sysv4
++ ;;
++ netbsd386)
++ basic_machine=i386-unknown
++ os=-netbsd
++ ;;
++ netwinder)
++ basic_machine=armv4l-rebel
++ os=-linux
++ ;;
++ news | news700 | news800 | news900)
++ basic_machine=m68k-sony
++ os=-newsos
++ ;;
++ news1000)
++ basic_machine=m68030-sony
++ os=-newsos
++ ;;
++ news-3600 | risc-news)
++ basic_machine=mips-sony
++ os=-newsos
++ ;;
++ necv70)
++ basic_machine=v70-nec
++ os=-sysv
++ ;;
++ next | m*-next )
++ basic_machine=m68k-next
++ case $os in
++ -nextstep* )
++ ;;
++ -ns2*)
++ os=-nextstep2
++ ;;
++ *)
++ os=-nextstep3
++ ;;
++ esac
++ ;;
++ nh3000)
++ basic_machine=m68k-harris
++ os=-cxux
++ ;;
++ nh[45]000)
++ basic_machine=m88k-harris
++ os=-cxux
++ ;;
++ nindy960)
++ basic_machine=i960-intel
++ os=-nindy
++ ;;
++ mon960)
++ basic_machine=i960-intel
++ os=-mon960
++ ;;
++ nonstopux)
++ basic_machine=mips-compaq
++ os=-nonstopux
++ ;;
++ np1)
++ basic_machine=np1-gould
++ ;;
++ nsr-tandem)
++ basic_machine=nsr-tandem
++ ;;
++ op50n-* | op60c-*)
++ basic_machine=hppa1.1-oki
++ os=-proelf
++ ;;
++ openrisc | openrisc-*)
++ basic_machine=or32-unknown
++ ;;
++ os400)
++ basic_machine=powerpc-ibm
++ os=-os400
++ ;;
++ OSE68000 | ose68000)
++ basic_machine=m68000-ericsson
++ os=-ose
++ ;;
++ os68k)
++ basic_machine=m68k-none
++ os=-os68k
++ ;;
++ pa-hitachi)
++ basic_machine=hppa1.1-hitachi
++ os=-hiuxwe2
++ ;;
++ paragon)
++ basic_machine=i860-intel
++ os=-osf
++ ;;
++ pbd)
++ basic_machine=sparc-tti
++ ;;
++ pbb)
++ basic_machine=m68k-tti
++ ;;
++ pc532 | pc532-*)
++ basic_machine=ns32k-pc532
++ ;;
++ pc98)
++ basic_machine=i386-pc
++ ;;
++ pc98-*)
++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ pentium | p5 | k5 | k6 | nexgen | viac3)
++ basic_machine=i586-pc
++ ;;
++ pentiumpro | p6 | 6x86 | athlon | athlon_*)
++ basic_machine=i686-pc
++ ;;
++ pentiumii | pentium2 | pentiumiii | pentium3)
++ basic_machine=i686-pc
++ ;;
++ pentium4)
++ basic_machine=i786-pc
++ ;;
++ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
++ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ pentiumpro-* | p6-* | 6x86-* | athlon-*)
++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ pentium4-*)
++ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ pn)
++ basic_machine=pn-gould
++ ;;
++ power) basic_machine=power-ibm
++ ;;
++ ppc) basic_machine=powerpc-unknown
++ ;;
++ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ ppcle | powerpclittle | ppc-le | powerpc-little)
++ basic_machine=powerpcle-unknown
++ ;;
++ ppcle-* | powerpclittle-*)
++ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ ppc64) basic_machine=powerpc64-unknown
++ ;;
++ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
++ basic_machine=powerpc64le-unknown
++ ;;
++ ppc64le-* | powerpc64little-*)
++ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ ps2)
++ basic_machine=i386-ibm
++ ;;
++ pw32)
++ basic_machine=i586-unknown
++ os=-pw32
++ ;;
++ rdos)
++ basic_machine=i386-pc
++ os=-rdos
++ ;;
++ rom68k)
++ basic_machine=m68k-rom68k
++ os=-coff
++ ;;
++ rm[46]00)
++ basic_machine=mips-siemens
++ ;;
++ rtpc | rtpc-*)
++ basic_machine=romp-ibm
++ ;;
++ s390 | s390-*)
++ basic_machine=s390-ibm
++ ;;
++ s390x | s390x-*)
++ basic_machine=s390x-ibm
++ ;;
++ sa29200)
++ basic_machine=a29k-amd
++ os=-udi
++ ;;
++ sb1)
++ basic_machine=mipsisa64sb1-unknown
++ ;;
++ sb1el)
++ basic_machine=mipsisa64sb1el-unknown
++ ;;
++ sei)
++ basic_machine=mips-sei
++ os=-seiux
++ ;;
++ sequent)
++ basic_machine=i386-sequent
++ ;;
++ sh)
++ basic_machine=sh-hitachi
++ os=-hms
++ ;;
++ sh64)
++ basic_machine=sh64-unknown
++ ;;
++ sparclite-wrs | simso-wrs)
++ basic_machine=sparclite-wrs
++ os=-vxworks
++ ;;
++ sps7)
++ basic_machine=m68k-bull
++ os=-sysv2
++ ;;
++ spur)
++ basic_machine=spur-unknown
++ ;;
++ st2000)
++ basic_machine=m68k-tandem
++ ;;
++ stratus)
++ basic_machine=i860-stratus
++ os=-sysv4
++ ;;
++ sun2)
++ basic_machine=m68000-sun
++ ;;
++ sun2os3)
++ basic_machine=m68000-sun
++ os=-sunos3
++ ;;
++ sun2os4)
++ basic_machine=m68000-sun
++ os=-sunos4
++ ;;
++ sun3os3)
++ basic_machine=m68k-sun
++ os=-sunos3
++ ;;
++ sun3os4)
++ basic_machine=m68k-sun
++ os=-sunos4
++ ;;
++ sun4os3)
++ basic_machine=sparc-sun
++ os=-sunos3
++ ;;
++ sun4os4)
++ basic_machine=sparc-sun
++ os=-sunos4
++ ;;
++ sun4sol2)
++ basic_machine=sparc-sun
++ os=-solaris2
++ ;;
++ sun3 | sun3-*)
++ basic_machine=m68k-sun
++ ;;
++ sun4)
++ basic_machine=sparc-sun
++ ;;
++ sun386 | sun386i | roadrunner)
++ basic_machine=i386-sun
++ ;;
++ sv1)
++ basic_machine=sv1-cray
++ os=-unicos
++ ;;
++ symmetry)
++ basic_machine=i386-sequent
++ os=-dynix
++ ;;
++ t3e)
++ basic_machine=alphaev5-cray
++ os=-unicos
++ ;;
++ t90)
++ basic_machine=t90-cray
++ os=-unicos
++ ;;
++ tic54x | c54x*)
++ basic_machine=tic54x-unknown
++ os=-coff
++ ;;
++ tic55x | c55x*)
++ basic_machine=tic55x-unknown
++ os=-coff
++ ;;
++ tic6x | c6x*)
++ basic_machine=tic6x-unknown
++ os=-coff
++ ;;
++ tx39)
++ basic_machine=mipstx39-unknown
++ ;;
++ tx39el)
++ basic_machine=mipstx39el-unknown
++ ;;
++ toad1)
++ basic_machine=pdp10-xkl
++ os=-tops20
++ ;;
++ tower | tower-32)
++ basic_machine=m68k-ncr
++ ;;
++ tpf)
++ basic_machine=s390x-ibm
++ os=-tpf
++ ;;
++ udi29k)
++ basic_machine=a29k-amd
++ os=-udi
++ ;;
++ ultra3)
++ basic_machine=a29k-nyu
++ os=-sym1
++ ;;
++ v810 | necv810)
++ basic_machine=v810-nec
++ os=-none
++ ;;
++ vaxv)
++ basic_machine=vax-dec
++ os=-sysv
++ ;;
++ vms)
++ basic_machine=vax-dec
++ os=-vms
++ ;;
++ vpp*|vx|vx-*)
++ basic_machine=f301-fujitsu
++ ;;
++ vxworks960)
++ basic_machine=i960-wrs
++ os=-vxworks
++ ;;
++ vxworks68)
++ basic_machine=m68k-wrs
++ os=-vxworks
++ ;;
++ vxworks29k)
++ basic_machine=a29k-wrs
++ os=-vxworks
++ ;;
++ w65*)
++ basic_machine=w65-wdc
++ os=-none
++ ;;
++ w89k-*)
++ basic_machine=hppa1.1-winbond
++ os=-proelf
++ ;;
++ xbox)
++ basic_machine=i686-pc
++ os=-mingw32
++ ;;
++ xps | xps100)
++ basic_machine=xps100-honeywell
++ ;;
++ ymp)
++ basic_machine=ymp-cray
++ os=-unicos
++ ;;
++ z8k-*-coff)
++ basic_machine=z8k-unknown
++ os=-sim
++ ;;
++ none)
++ basic_machine=none-none
++ os=-none
++ ;;
++
++# Here we handle the default manufacturer of certain CPU types. It is in
++# some cases the only manufacturer, in others, it is the most popular.
++ w89k)
++ basic_machine=hppa1.1-winbond
++ ;;
++ op50n)
++ basic_machine=hppa1.1-oki
++ ;;
++ op60c)
++ basic_machine=hppa1.1-oki
++ ;;
++ romp)
++ basic_machine=romp-ibm
++ ;;
++ mmix)
++ basic_machine=mmix-knuth
++ ;;
++ rs6000)
++ basic_machine=rs6000-ibm
++ ;;
++ vax)
++ basic_machine=vax-dec
++ ;;
++ pdp10)
++ # there are many clones, so DEC is not a safe bet
++ basic_machine=pdp10-unknown
++ ;;
++ pdp11)
++ basic_machine=pdp11-dec
++ ;;
++ we32k)
++ basic_machine=we32k-att
++ ;;
++ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
++ basic_machine=sh-unknown
++ ;;
++ sparc | sparcv8 | sparcv9 | sparcv9b)
++ basic_machine=sparc-sun
++ ;;
++ cydra)
++ basic_machine=cydra-cydrome
++ ;;
++ orion)
++ basic_machine=orion-highlevel
++ ;;
++ orion105)
++ basic_machine=clipper-highlevel
++ ;;
++ mac | mpw | mac-mpw)
++ basic_machine=m68k-apple
++ ;;
++ pmac | pmac-mpw)
++ basic_machine=powerpc-apple
++ ;;
++ *-unknown)
++ # Make sure to match an already-canonicalized machine name.
++ ;;
++ *)
++ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
++ exit 1
++ ;;
++esac
++
++# Here we canonicalize certain aliases for manufacturers.
++case $basic_machine in
++ *-digital*)
++ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
++ ;;
++ *-commodore*)
++ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
++ ;;
++ *)
++ ;;
++esac
++
++# Decode manufacturer-specific aliases for certain operating systems.
++
++if [ x"$os" != x"" ]
++then
++case $os in
++ # First match some system type aliases
++ # that might get confused with valid system types.
++ # -solaris* is a basic system type, with this one exception.
++ -solaris1 | -solaris1.*)
++ os=`echo $os | sed -e 's|solaris1|sunos4|'`
++ ;;
++ -solaris)
++ os=-solaris2
++ ;;
++ -svr4*)
++ os=-sysv4
++ ;;
++ -unixware*)
++ os=-sysv4.2uw
++ ;;
++ -gnu/linux*)
++ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
++ ;;
++ # First accept the basic system types.
++ # The portable systems comes first.
++ # Each alternative MUST END IN A *, to match a version number.
++ # -sysv* is not here because it comes later, after sysvr4.
++ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
++ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
++ | -aos* \
++ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
++ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
++ | -openbsd* | -solidbsd* \
++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
++ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
++ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
++ | -chorusos* | -chorusrdb* \
++ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++ | -uxpv* | -beos* | -mpeix* | -udk* \
++ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
++ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
++ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
++ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
++ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
++ | -skyos* | -haiku* | -rdos*)
++ # Remember, each alternative MUST END IN *, to match a version number.
++ ;;
++ -qnx*)
++ case $basic_machine in
++ x86-* | i*86-*)
++ ;;
++ *)
++ os=-nto$os
++ ;;
++ esac
++ ;;
++ -nto-qnx*)
++ ;;
++ -nto*)
++ os=`echo $os | sed -e 's|nto|nto-qnx|'`
++ ;;
++ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
++ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
++ ;;
++ -mac*)
++ os=`echo $os | sed -e 's|mac|macos|'`
++ ;;
++ -linux-dietlibc)
++ os=-linux-dietlibc
++ ;;
++ -linux*)
++ os=`echo $os | sed -e 's|linux|linux-gnu|'`
++ ;;
++ -sunos5*)
++ os=`echo $os | sed -e 's|sunos5|solaris2|'`
++ ;;
++ -sunos6*)
++ os=`echo $os | sed -e 's|sunos6|solaris3|'`
++ ;;
++ -opened*)
++ os=-openedition
++ ;;
++ -os400*)
++ os=-os400
++ ;;
++ -wince*)
++ os=-wince
++ ;;
++ -osfrose*)
++ os=-osfrose
++ ;;
++ -osf*)
++ os=-osf
++ ;;
++ -utek*)
++ os=-bsd
++ ;;
++ -dynix*)
++ os=-bsd
++ ;;
++ -acis*)
++ os=-aos
++ ;;
++ -atheos*)
++ os=-atheos
++ ;;
++ -syllable*)
++ os=-syllable
++ ;;
++ -386bsd)
++ os=-bsd
++ ;;
++ -ctix* | -uts*)
++ os=-sysv
++ ;;
++ -nova*)
++ os=-rtmk-nova
++ ;;
++ -ns2 )
++ os=-nextstep2
++ ;;
++ -nsk*)
++ os=-nsk
++ ;;
++ # Preserve the version number of sinix5.
++ -sinix5.*)
++ os=`echo $os | sed -e 's|sinix|sysv|'`
++ ;;
++ -sinix*)
++ os=-sysv4
++ ;;
++ -tpf*)
++ os=-tpf
++ ;;
++ -triton*)
++ os=-sysv3
++ ;;
++ -oss*)
++ os=-sysv3
++ ;;
++ -svr4)
++ os=-sysv4
++ ;;
++ -svr3)
++ os=-sysv3
++ ;;
++ -sysvr4)
++ os=-sysv4
++ ;;
++ # This must come after -sysvr4.
++ -sysv*)
++ ;;
++ -ose*)
++ os=-ose
++ ;;
++ -es1800*)
++ os=-ose
++ ;;
++ -xenix)
++ os=-xenix
++ ;;
++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
++ os=-mint
++ ;;
++ -aros*)
++ os=-aros
++ ;;
++ -kaos*)
++ os=-kaos
++ ;;
++ -zvmoe)
++ os=-zvmoe
++ ;;
++ -none)
++ ;;
++ *)
++ # Get rid of the `-' at the beginning of $os.
++ os=`echo $os | sed 's/[^-]*-//'`
++ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
++ exit 1
++ ;;
++esac
++else
++
++# Here we handle the default operating systems that come with various machines.
++# The value should be what the vendor currently ships out the door with their
++# machine or put another way, the most popular os provided with the machine.
++
++# Note that if you're going to try to match "-MANUFACTURER" here (say,
++# "-sun"), then you have to tell the case statement up towards the top
++# that MANUFACTURER isn't an operating system. Otherwise, code above
++# will signal an error saying that MANUFACTURER isn't an operating
++# system, and we'll never get to this point.
++
++case $basic_machine in
++ *-acorn)
++ os=-riscix1.2
++ ;;
++ arm*-rebel)
++ os=-linux
++ ;;
++ arm*-semi)
++ os=-aout
++ ;;
++ c4x-* | tic4x-*)
++ os=-coff
++ ;;
++ # This must come before the *-dec entry.
++ pdp10-*)
++ os=-tops20
++ ;;
++ pdp11-*)
++ os=-none
++ ;;
++ *-dec | vax-*)
++ os=-ultrix4.2
++ ;;
++ m68*-apollo)
++ os=-domain
++ ;;
++ i386-sun)
++ os=-sunos4.0.2
++ ;;
++ m68000-sun)
++ os=-sunos3
++ # This also exists in the configure program, but was not the
++ # default.
++ # os=-sunos4
++ ;;
++ m68*-cisco)
++ os=-aout
++ ;;
++ mips*-cisco)
++ os=-elf
++ ;;
++ mips*-*)
++ os=-elf
++ ;;
++ or32-*)
++ os=-coff
++ ;;
++ *-tti) # must be before sparc entry or we get the wrong os.
++ os=-sysv3
++ ;;
++ sparc-* | *-sun)
++ os=-sunos4.1.1
++ ;;
++ *-be)
++ os=-beos
++ ;;
++ *-haiku)
++ os=-haiku
++ ;;
++ *-ibm)
++ os=-aix
++ ;;
++ *-knuth)
++ os=-mmixware
++ ;;
++ *-wec)
++ os=-proelf
++ ;;
++ *-winbond)
++ os=-proelf
++ ;;
++ *-oki)
++ os=-proelf
++ ;;
++ *-hp)
++ os=-hpux
++ ;;
++ *-hitachi)
++ os=-hiux
++ ;;
++ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
++ os=-sysv
++ ;;
++ *-cbm)
++ os=-amigaos
++ ;;
++ *-dg)
++ os=-dgux
++ ;;
++ *-dolphin)
++ os=-sysv3
++ ;;
++ m68k-ccur)
++ os=-rtu
++ ;;
++ m88k-omron*)
++ os=-luna
++ ;;
++ *-next )
++ os=-nextstep
++ ;;
++ *-sequent)
++ os=-ptx
++ ;;
++ *-crds)
++ os=-unos
++ ;;
++ *-ns)
++ os=-genix
++ ;;
++ i370-*)
++ os=-mvs
++ ;;
++ *-next)
++ os=-nextstep3
++ ;;
++ *-gould)
++ os=-sysv
++ ;;
++ *-highlevel)
++ os=-bsd
++ ;;
++ *-encore)
++ os=-bsd
++ ;;
++ *-sgi)
++ os=-irix
++ ;;
++ *-siemens)
++ os=-sysv4
++ ;;
++ *-masscomp)
++ os=-rtu
++ ;;
++ f30[01]-fujitsu | f700-fujitsu)
++ os=-uxpv
++ ;;
++ *-rom68k)
++ os=-coff
++ ;;
++ *-*bug)
++ os=-coff
++ ;;
++ *-apple)
++ os=-macos
++ ;;
++ *-atari*)
++ os=-mint
++ ;;
++ *)
++ os=-none
++ ;;
++esac
++fi
++
++# Here we handle the case where we know the os, and the CPU type, but not the
++# manufacturer. We pick the logical manufacturer.
++vendor=unknown
++case $basic_machine in
++ *-unknown)
++ case $os in
++ -riscix*)
++ vendor=acorn
++ ;;
++ -sunos*)
++ vendor=sun
++ ;;
++ -aix*)
++ vendor=ibm
++ ;;
++ -beos*)
++ vendor=be
++ ;;
++ -hpux*)
++ vendor=hp
++ ;;
++ -mpeix*)
++ vendor=hp
++ ;;
++ -hiux*)
++ vendor=hitachi
++ ;;
++ -unos*)
++ vendor=crds
++ ;;
++ -dgux*)
++ vendor=dg
++ ;;
++ -luna*)
++ vendor=omron
++ ;;
++ -genix*)
++ vendor=ns
++ ;;
++ -mvs* | -opened*)
++ vendor=ibm
++ ;;
++ -os400*)
++ vendor=ibm
++ ;;
++ -ptx*)
++ vendor=sequent
++ ;;
++ -tpf*)
++ vendor=ibm
++ ;;
++ -vxsim* | -vxworks* | -windiss*)
++ vendor=wrs
++ ;;
++ -aux*)
++ vendor=apple
++ ;;
++ -hms*)
++ vendor=hitachi
++ ;;
++ -mpw* | -macos*)
++ vendor=apple
++ ;;
++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
++ vendor=atari
++ ;;
++ -vos*)
++ vendor=stratus
++ ;;
++ esac
++ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
++ ;;
++esac
++
++echo $basic_machine$os
++exit
++
++# Local variables:
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "timestamp='"
++# time-stamp-format: "%:y-%02m-%02d"
++# time-stamp-end: "'"
++# End:
+diff -urNad cyrus-imapd-2.3.7~/configure cyrus-imapd-2.3.7/configure
+--- cyrus-imapd-2.3.7~/configure 2006-07-10 16:31:52.000000000 +0200
++++ cyrus-imapd-2.3.7/configure 2006-08-11 17:29:39.000000000 +0200
+@@ -1,8 +1,9 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.59.
++# Generated by GNU Autoconf 2.60.
+ #
+-# Copyright (C) 2003 Free Software Foundation, Inc.
++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+ ## --------------------- ##
+@@ -16,11 +17,35 @@
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+- set -o posix
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
+ DUALCASE=1; export DUALCASE # for MKS sh
+
++
++# PATH needs CR
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
+ # Support unset when possible.
+ if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+@@ -29,8 +54,43 @@
+ fi
+
+
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++as_nl='
++'
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ { (exit 1); exit 1; }
++fi
++
+ # Work around bugs in pre-3.0 UWIN ksh.
+-$as_unset ENV MAIL MAILPATH
++for as_var in ENV MAIL MAILPATH
++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++done
+ PS1='$ '
+ PS2='> '
+ PS4='+ '
+@@ -44,18 +104,19 @@
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+- $as_unset $as_var
++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+ done
+
+ # Required to use basename.
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+ else
+ as_basename=false
+@@ -63,157 +124,386 @@
+
+
+ # Name of the executable.
+-as_me=`$as_basename "$0" ||
++as_me=`$as_basename -- "$0" ||
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+- X"$0" : 'X\(/\)$' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X/"$0" |
+- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+- /^X\/\(\/\/\)$/{ s//\1/; q; }
+- /^X\/\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+
++# CDPATH.
++$as_unset CDPATH
+
+-# PATH needs CR, and LINENO needs CR and PATH.
+-# Avoid depending upon Character Ranges.
+-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+-as_cr_digits='0123456789'
+-as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+-# The user is always right.
+-if test "${PATH_SEPARATOR+set}" != set; then
+- echo "#! /bin/sh" >conf$$.sh
+- echo "exit 0" >>conf$$.sh
+- chmod +x conf$$.sh
+- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+- PATH_SEPARATOR=';'
+- else
+- PATH_SEPARATOR=:
+- fi
+- rm -f conf$$.sh
++if test "x$CONFIG_SHELL" = x; then
++ if (eval ":") 2>/dev/null; then
++ as_have_required=yes
++else
++ as_have_required=no
+ fi
+
++ if test $as_have_required = yes && (eval ":
++(as_func_return () {
++ (exit \$1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
+
+- as_lineno_1=$LINENO
+- as_lineno_2=$LINENO
+- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+- test "x$as_lineno_1" != "x$as_lineno_2" &&
+- test "x$as_lineno_3" = "x$as_lineno_2" || {
+- # Find who we are. Look in the path if we contain no path at all
+- # relative or not.
+- case $0 in
+- *[\\/]* ) as_myself=$0 ;;
+- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+-done
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
+
+- ;;
+- esac
+- # We did not find ourselves, most probably we were run as `sh COMMAND'
+- # in which case we are not to be found in the path.
+- if test "x$as_myself" = x; then
+- as_myself=$0
+- fi
+- if test ! -f "$as_myself"; then
+- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+- { (exit 1); exit 1; }; }
+- fi
+- case $CONFIG_SHELL in
+- '')
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test \$exitcode = 0) || { (exit 1); exit 1; }
++
++(
++ as_lineno_1=\$LINENO
++ as_lineno_2=\$LINENO
++ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
++ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
++") 2> /dev/null; then
++ :
++else
++ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+- for as_base in sh bash ksh sh5; do
+- case $as_dir in
++ case $as_dir in
+ /*)
+- if ("$as_dir/$as_base" -c '
++ for as_base in sh bash ksh sh5; do
++ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
++ done;;
++ esac
++done
++IFS=$as_save_IFS
++
++
++ for as_shell in $as_candidate_shells $SHELL; do
++ # Try only shells that exist, to save several forks.
++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
++ { ("$as_shell") 2> /dev/null <<\_ASEOF
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++:
++_ASEOF
++}; then
++ CONFIG_SHELL=$as_shell
++ as_have_required=yes
++ if { "$as_shell" 2> /dev/null <<\_ASEOF
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
++
++:
++(as_func_return () {
++ (exit $1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = "$1" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test $exitcode = 0) || { (exit 1); exit 1; }
++
++(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+- CONFIG_SHELL=$as_dir/$as_base
+- export CONFIG_SHELL
+- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+- fi;;
+- esac
+- done
+-done
+-;;
+- esac
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
++
++_ASEOF
++}; then
++ break
++fi
++
++fi
++
++ done
++
++ if test "x$CONFIG_SHELL" != x; then
++ for as_var in BASH_ENV ENV
++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++ done
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
++fi
++
++
++ if test $as_have_required = no; then
++ echo This script requires a shell more modern than all the
++ echo shells that I found on your system. Please install a
++ echo modern shell, or manually run the script under such a
++ echo shell if you do have one.
++ { (exit 1); exit 1; }
++fi
++
++
++fi
++
++fi
++
++
++
++(eval "as_func_return () {
++ (exit \$1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test \$exitcode = 0") || {
++ echo No shell found that supports shell functions.
++ echo Please tell autoconf at gnu.org about your system,
++ echo including any error possibly output before this
++ echo message
++}
++
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+- # line-number line before each line; the second 'sed' does the real
+- # work. The second script uses 'N' to pair each line-number line
+- # with the numbered line, and appends trailing '-' during
+- # substitution so that $LINENO is not a special case at line end.
++ # line-number line after each line using $LINENO; the second 'sed'
++ # does the real work. The second script uses 'N' to pair each
++ # line-number line with the line containing $LINENO, and appends
++ # trailing '-' during substitution so that $LINENO is not a special
++ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+- sed '=' <$as_myself |
++ # scripts with optimization help from Paolo Bonzini. Blame Lee
++ # E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
+ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
+ N
+- s,$,-,
+- : loop
+- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+- s,-$,,
+- s,^['$as_cr_digits']*\n,,
++ s/-\n.*//
+ ' >$as_me.lineno &&
+- chmod +x $as_me.lineno ||
++ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+- # original and so on. Autoconf is especially sensible to this).
+- . ./$as_me.lineno
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+ }
+
+
+-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+- *c*,-n*) ECHO_N= ECHO_C='
+-' ECHO_T=' ' ;;
+- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in
++-n*)
++ case `echo 'x\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ *) ECHO_C='\c';;
++ esac;;
++*)
++ ECHO_N='-n';;
+ esac
+
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+ rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir
++fi
+ echo >conf$$.file
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+- # We could just check for DJGPP; but this test a) works b) is more generic
+- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+- if test -f conf$$.exe; then
+- # Don't use ln at all; we don't have any links
++ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+- else
+- as_ln_s='ln -s'
+- fi
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+-rm -f conf$$ conf$$.exe conf$$.file
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
+
+ if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+@@ -222,7 +512,19 @@
+ as_mkdir_p=false
+ fi
+
+-as_executable_p="test -f"
++# Find out whether ``test -x'' works. Don't use a zero-byte file, as
++# systems may use methods other than mode bits to determine executability.
++cat >conf$$.file <<_ASEOF
++#! /bin/sh
++exit 0
++_ASEOF
++chmod +x conf$$.file
++if test -x conf$$.file >/dev/null 2>&1; then
++ as_executable_p="test -x"
++else
++ as_executable_p=:
++fi
++rm -f conf$$.file
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -231,39 +533,27 @@
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+-# IFS
+-# We need space, tab and new line, in precisely that order.
+-as_nl='
+-'
+-IFS=" $as_nl"
+-
+-# CDPATH.
+-$as_unset CDPATH
+
++exec 7<&0 </dev/null 6>&1
+
+ # Name of the host.
+ # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+ # so uname gets run too.
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+-exec 6>&1
+-
+ #
+ # Initializations.
+ #
+ ac_default_prefix=/usr/local
++ac_clean_files=
+ ac_config_libobj_dir=.
++LIBOBJS=
+ cross_compiling=no
+ subdirs=
+ MFLAGS=
+ MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
+
+-# Maximum number of lines to put in a shell here document.
+-# This variable seems obsolete. It should probably be removed, and
+-# only ac_max_sed_lines should be used.
+-: ${ac_max_here_lines=38}
+-
+ # Identity of this package.
+ PACKAGE_NAME=
+ PACKAGE_TARNAME=
+@@ -300,17 +590,153 @@
+ #endif
+ #if HAVE_INTTYPES_H
+ # include <inttypes.h>
+-#else
+-# if HAVE_STDINT_H
+-# include <stdint.h>
+-# endif
++#endif
++#if HAVE_STDINT_H
++# include <stdint.h>
+ #endif
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAKEDEPEND cyrus_prefix service_path cyrus_user cyrus_group CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP AWK LIBOBJS LIB_SOCKET IPV6_OBJS PRE_SUBDIRS EXTRA_SUBDIRS DEPLIBS LOCALDEFS BDB_INC BDB_LIB CYRUSDB_OBJS SIEVE_OBJS SIEVE_LIBS SIEVE_CPPFLAGS YACC LEX LEXLIB LEX_OUTPUT_ROOT SIEVE_SUBDIRS WITH_NONBLOCK WITH_GMTOFF WITH_MAP WITH_LOCK cyrus_sigveclib AFS_LIBS AFS_LDFLAGS LDAP_CPPFLAGS LDAP_LDFLAGS LDAP_LIBS SERVER_SUBDIRS OPENSSL_INC OPENSSL_LIB ZEPHYR_LIBS ZEPHYR_CPPFLAGS IMAP_PROGS COMPILE_ET COM_ERR_LIBS COM_ERR_LDFLAGS COM_ERR_CPPFLAGS LIB_CRYPT GSSAPI_LIBS GSSAPIBASE_LIBS LIB_DYN_SASL DYNSASLFLAGS LIB_SASL SASLFLAGS PERL PERL_CCCDLFLAGS MD5OBJ SNMP_SUBDIRS CMU_LIB_SUBDIR LIB_WRAP SNMP_CONFIG LIB_UCDSNMP LIB_RT IMAP_COM_ERR_LIBS IMAP_LIBS PERL_SUBDIRS PERL_DEPSUBDIRS LTLIBOBJS'
++ac_subst_vars='SHELL
++PATH_SEPARATOR
++PACKAGE_NAME
++PACKAGE_TARNAME
++PACKAGE_VERSION
++PACKAGE_STRING
++PACKAGE_BUGREPORT
++exec_prefix
++prefix
++program_transform_name
++bindir
++sbindir
++libexecdir
++datarootdir
++datadir
++sysconfdir
++sharedstatedir
++localstatedir
++includedir
++oldincludedir
++docdir
++infodir
++htmldir
++dvidir
++pdfdir
++psdir
++libdir
++localedir
++mandir
++DEFS
++ECHO_C
++ECHO_N
++ECHO_T
++LIBS
++build_alias
++host_alias
++target_alias
++build
++build_cpu
++build_vendor
++build_os
++host
++host_cpu
++host_vendor
++host_os
++WARNERROR
++MAKEDEPEND
++cyrus_prefix
++service_path
++cyrus_user
++cyrus_group
++CC
++CFLAGS
++LDFLAGS
++CPPFLAGS
++ac_ct_CC
++EXEEXT
++OBJEXT
++RANLIB
++SET_MAKE
++INSTALL_PROGRAM
++INSTALL_SCRIPT
++INSTALL_DATA
++CPP
++GREP
++EGREP
++AWK
++LIBOBJS
++LIB_SOCKET
++IPV6_OBJS
++PRE_SUBDIRS
++EXTRA_SUBDIRS
++DEPLIBS
++LOCALDEFS
++BDB_INC
++BDB_LIB
++CYRUSDB_OBJS
++SIEVE_OBJS
++SIEVE_LIBS
++SIEVE_CPPFLAGS
++YACC
++YFLAGS
++LEX
++LEXLIB
++LEX_OUTPUT_ROOT
++SIEVE_SUBDIRS
++WITH_NONBLOCK
++WITH_GMTOFF
++WITH_MAP
++WITH_LOCK
++cyrus_sigveclib
++AFS_LIBS
++AFS_LDFLAGS
++LDAP_CPPFLAGS
++LDAP_LDFLAGS
++LDAP_LIBS
++SERVER_SUBDIRS
++OPENSSL_INC
++OPENSSL_LIB
++ZEPHYR_LIBS
++ZEPHYR_CPPFLAGS
++IMAP_PROGS
++COMPILE_ET
++COM_ERR_LIBS
++COM_ERR_LDFLAGS
++COM_ERR_CPPFLAGS
++LIB_CRYPT
++GSSAPI_LIBS
++GSSAPIBASE_LIBS
++LIB_DYN_SASL
++DYNSASLFLAGS
++LIB_SASL
++SASLFLAGS
++PERL
++PERL_CCCDLFLAGS
++MD5OBJ
++SNMP_SUBDIRS
++CMU_LIB_SUBDIR
++LIB_WRAP
++SNMP_CONFIG
++LIB_UCDSNMP
++LIB_RT
++IMAP_COM_ERR_LIBS
++IMAP_LIBS
++PERL_SUBDIRS
++PERL_DEPSUBDIRS
++LTLIBOBJS'
+ ac_subst_files=''
++ ac_precious_vars='build_alias
++host_alias
++target_alias
++CC
++CFLAGS
++LDFLAGS
++CPPFLAGS
++CPP
++YACC
++YFLAGS'
++
+
+ # Initialize some variables set by options.
+ ac_init_help=
+@@ -337,34 +763,48 @@
+ # and all the variables that are supposed to be based on exec_prefix
+ # by default will actually change.
+ # Use braces instead of parens because sh, perl, etc. also accept them.
++# (The list follows the same order as the GNU Coding Standards.)
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
+-datadir='${prefix}/share'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+-libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++docdir='${datarootdir}/doc/${PACKAGE}'
++infodir='${datarootdir}/info'
++htmldir='${docdir}'
++dvidir='${docdir}'
++pdfdir='${docdir}'
++psdir='${docdir}'
++libdir='${exec_prefix}/lib'
++localedir='${datarootdir}/locale'
++mandir='${datarootdir}/man'
+
+ ac_prev=
++ac_dashdash=
+ for ac_option
+ do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+- eval "$ac_prev=\$ac_option"
++ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
++ case $ac_option in
++ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++ *) ac_optarg=yes ;;
++ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+- case $ac_option in
++ case $ac_dashdash$ac_option in
++ --)
++ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+@@ -386,12 +826,18 @@
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
++ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+- | --da=*)
++ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
++ | --dataroo | --dataro | --datar)
++ ac_prev=datarootdir ;;
++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
++ datarootdir=$ac_optarg ;;
++
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+@@ -399,7 +845,17 @@
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+- eval "enable_$ac_feature=no" ;;
++ eval enable_$ac_feature=no ;;
++
++ -docdir | --docdir | --docdi | --doc | --do)
++ ac_prev=docdir ;;
++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
++ docdir=$ac_optarg ;;
++
++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
++ ac_prev=dvidir ;;
++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
++ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+@@ -408,11 +864,7 @@
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+- case $ac_option in
+- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+- *) ac_optarg=yes ;;
+- esac
+- eval "enable_$ac_feature='$ac_optarg'" ;;
++ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+@@ -439,6 +891,12 @@
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
++ ac_prev=htmldir ;;
++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
++ | --ht=*)
++ htmldir=$ac_optarg ;;
++
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+@@ -463,13 +921,16 @@
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
++ -localedir | --localedir | --localedi | --localed | --locale)
++ ac_prev=localedir ;;
++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
++ localedir=$ac_optarg ;;
++
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+- | --localstate | --localstat | --localsta | --localst \
+- | --locals | --local | --loca | --loc | --lo)
++ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+@@ -534,6 +995,16 @@
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
++ ac_prev=pdfdir ;;
++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
++ pdfdir=$ac_optarg ;;
++
++ -psdir | --psdir | --psdi | --psd | --ps)
++ ac_prev=psdir ;;
++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
++ psdir=$ac_optarg ;;
++
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+@@ -590,11 +1061,7 @@
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+- case $ac_option in
+- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+- *) ac_optarg=yes ;;
+- esac
+- eval "with_$ac_package='$ac_optarg'" ;;
++ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+@@ -603,7 +1070,7 @@
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+- eval "with_$ac_package=no" ;;
++ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+@@ -634,8 +1101,7 @@
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+- eval "$ac_envvar='$ac_optarg'"
++ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+@@ -655,27 +1121,19 @@
+ { (exit 1); exit 1; }; }
+ fi
+
+-# Be sure to have absolute paths.
+-for ac_var in exec_prefix prefix
+-do
+- eval ac_val=$`echo $ac_var`
+- case $ac_val in
+- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+- { (exit 1); exit 1; }; };;
+- esac
+-done
+-
+-# Be sure to have absolute paths.
+-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+- localstatedir libdir includedir oldincludedir infodir mandir
++# Be sure to have absolute directory names.
++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
++ datadir sysconfdir sharedstatedir localstatedir includedir \
++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
++ libdir localedir mandir
+ do
+- eval ac_val=$`echo $ac_var`
++ eval ac_val=\$$ac_var
+ case $ac_val in
+- [\\/$]* | ?:[\\/]* ) ;;
+- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+- { (exit 1); exit 1; }; };;
++ [\\/$]* | ?:[\\/]* ) continue;;
++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
++ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
++ { (exit 1); exit 1; }; }
+ done
+
+ # There might be people who depend on the old broken behavior: `$host'
+@@ -702,74 +1160,76 @@
+ test "$silent" = yes && exec 6>/dev/null
+
+
++ac_pwd=`pwd` && test -n "$ac_pwd" &&
++ac_ls_di=`ls -di .` &&
++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
++ { echo "$as_me: error: Working directory cannot be determined" >&2
++ { (exit 1); exit 1; }; }
++test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
++ { echo "$as_me: error: pwd does not report name of working directory" >&2
++ { (exit 1); exit 1; }; }
++
++
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+- # Try the directory containing this script, then its parent.
+- ac_confdir=`(dirname "$0") 2>/dev/null ||
++ # Try the directory containing this script, then the parent directory.
++ ac_confdir=`$as_dirname -- "$0" ||
+ $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+- X"$0" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$0" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+ srcdir=$ac_confdir
+- if test ! -r $srcdir/$ac_unique_file; then
++ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+ else
+ ac_srcdir_defaulted=no
+ fi
+-if test ! -r $srcdir/$ac_unique_file; then
+- if test "$ac_srcdir_defaulted" = yes; then
+- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+- { (exit 1); exit 1; }; }
+- else
+- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
++if test ! -r "$srcdir/$ac_unique_file"; then
++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+- fi
+ fi
+-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
++ac_abs_confdir=`(
++ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+-ac_env_build_alias_set=${build_alias+set}
+-ac_env_build_alias_value=$build_alias
+-ac_cv_env_build_alias_set=${build_alias+set}
+-ac_cv_env_build_alias_value=$build_alias
+-ac_env_host_alias_set=${host_alias+set}
+-ac_env_host_alias_value=$host_alias
+-ac_cv_env_host_alias_set=${host_alias+set}
+-ac_cv_env_host_alias_value=$host_alias
+-ac_env_target_alias_set=${target_alias+set}
+-ac_env_target_alias_value=$target_alias
+-ac_cv_env_target_alias_set=${target_alias+set}
+-ac_cv_env_target_alias_value=$target_alias
+-ac_env_CC_set=${CC+set}
+-ac_env_CC_value=$CC
+-ac_cv_env_CC_set=${CC+set}
+-ac_cv_env_CC_value=$CC
+-ac_env_CFLAGS_set=${CFLAGS+set}
+-ac_env_CFLAGS_value=$CFLAGS
+-ac_cv_env_CFLAGS_set=${CFLAGS+set}
+-ac_cv_env_CFLAGS_value=$CFLAGS
+-ac_env_LDFLAGS_set=${LDFLAGS+set}
+-ac_env_LDFLAGS_value=$LDFLAGS
+-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+-ac_cv_env_LDFLAGS_value=$LDFLAGS
+-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+-ac_env_CPPFLAGS_value=$CPPFLAGS
+-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+-ac_env_CPP_set=${CPP+set}
+-ac_env_CPP_value=$CPP
+-ac_cv_env_CPP_set=${CPP+set}
+-ac_cv_env_CPP_value=$CPP
++ pwd)`
++# When building in place, set srcdir=.
++if test "$ac_abs_confdir" = "$ac_pwd"; then
++ srcdir=.
++fi
++# Remove unnecessary trailing slashes from srcdir.
++# Double slashes in file names in object file debugging info
++# mess up M-x gdb in Emacs.
++case $srcdir in
++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
++esac
++for ac_var in $ac_precious_vars; do
++ eval ac_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_env_${ac_var}_value=\$${ac_var}
++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_cv_env_${ac_var}_value=\$${ac_var}
++done
+
+ #
+ # Report the --help message.
+@@ -798,9 +1258,6 @@
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+-_ACEOF
+-
+- cat <<_ACEOF
+ Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+@@ -818,15 +1275,22 @@
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+- --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+- --infodir=DIR info documentation [PREFIX/info]
+- --mandir=DIR man documentation [PREFIX/man]
++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
++ --infodir=DIR info documentation [DATAROOTDIR/info]
++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
++ --mandir=DIR man documentation [DATAROOTDIR/man]
++ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
++ --htmldir=DIR html documentation [DOCDIR]
++ --dvidir=DIR dvi documentation [DOCDIR]
++ --pdfdir=DIR pdf documentation [DOCDIR]
++ --psdir=DIR ps documentation [DOCDIR]
+ _ACEOF
+
+ cat <<\_ACEOF
+@@ -844,6 +1308,7 @@
+ Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
++ --enable-warnings-are-errors add -Werror to most gcc calls
+ --disable-sieve disable Sieve support
+ --enable-krb5afspts compile afskrb PTS module with krb5 support
+ --disable-server disable compiling servers
+@@ -899,126 +1364,99 @@
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+- headers in a nonstandard directory <include dir>
++ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
++ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
++ YACC The `Yet Another C Compiler' implementation to use. Defaults to
++ the first program found out of: `bison -y', `byacc', `yacc'.
++ YFLAGS The list of arguments that will be passed by default to $YACC.
++ This script will default YFLAGS to the empty string to avoid a
++ default value of `-d' given by some make applications.
+
+ Use these variables to override the choices made by `configure' or to help
+ it to find libraries and programs with nonstandard names/locations.
+
+ _ACEOF
++ac_status=$?
+ fi
+
+ if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+- ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+- test -d $ac_dir || continue
++ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+-if test "$ac_dir" != .; then
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+- # A "../" for each directory in $ac_dir_suffix.
+- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+-else
+- ac_dir_suffix= ac_top_builddir=
+-fi
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
+
+ case $srcdir in
+- .) # No --srcdir option. We are building in place.
++ .) # We are building in place.
+ ac_srcdir=.
+- if test -z "$ac_top_builddir"; then
+- ac_top_srcdir=.
+- else
+- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+- fi ;;
+- [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+- ac_top_srcdir=$srcdir ;;
+- *) # Relative path.
+- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+-esac
+-
+-# Do not use `cd foo && pwd` to compute absolute paths, because
+-# the directories may not exist.
+-case `pwd` in
+-.) ac_abs_builddir="$ac_dir";;
+-*)
+- case "$ac_dir" in
+- .) ac_abs_builddir=`pwd`;;
+- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+- *) ac_abs_builddir=`pwd`/"$ac_dir";;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_builddir=${ac_top_builddir}.;;
+-*)
+- case ${ac_top_builddir}. in
+- .) ac_abs_top_builddir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_srcdir=$ac_srcdir;;
+-*)
+- case $ac_srcdir in
+- .) ac_abs_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_srcdir=$ac_top_srcdir;;
+-*)
+- case $ac_top_srcdir in
+- .) ac_abs_top_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+- esac;;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+- cd $ac_dir
+- # Check for guested configure; otherwise get Cygnus style configure.
+- if test -f $ac_srcdir/configure.gnu; then
+- echo
+- $SHELL $ac_srcdir/configure.gnu --help=recursive
+- elif test -f $ac_srcdir/configure; then
+- echo
+- $SHELL $ac_srcdir/configure --help=recursive
+- elif test -f $ac_srcdir/configure.ac ||
+- test -f $ac_srcdir/configure.in; then
+- echo
+- $ac_configure --help
++ cd "$ac_dir" || { ac_status=$?; continue; }
++ # Check for guested configure.
++ if test -f "$ac_srcdir/configure.gnu"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
++ elif test -f "$ac_srcdir/configure"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+- fi
+- cd $ac_popdir
++ fi || ac_status=$?
++ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+ fi
+
+-test -n "$ac_init_help" && exit 0
++test -n "$ac_init_help" && exit $ac_status
+ if $ac_init_version; then
+ cat <<\_ACEOF
++configure
++generated by GNU Autoconf 2.60
+
+-Copyright (C) 2003 Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+- exit 0
++ exit
+ fi
+-exec 5>config.log
+-cat >&5 <<_ACEOF
++cat >config.log <<_ACEOF
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by $as_me, which was
+-generated by GNU Autoconf 2.59. Invocation command line was
++generated by GNU Autoconf 2.60. Invocation command line was
+
+ $ $0 $@
+
+ _ACEOF
++exec 5>>config.log
+ {
+ cat <<_ASUNAME
+ ## --------- ##
+@@ -1037,7 +1475,7 @@
+ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+ /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+ /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+ /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+ /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+ /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+@@ -1051,6 +1489,7 @@
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+ done
++IFS=$as_save_IFS
+
+ } >&5
+
+@@ -1072,7 +1511,6 @@
+ ac_configure_args=
+ ac_configure_args0=
+ ac_configure_args1=
+-ac_sep=
+ ac_must_keep_next=false
+ for ac_pass in 1 2
+ do
+@@ -1083,7 +1521,7 @@
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
++ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+@@ -1105,9 +1543,7 @@
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+- # Get rid of the leading space.
+- ac_sep=" "
++ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+@@ -1118,8 +1554,8 @@
+ # When interrupted or exit'd, cleanup temporary files, and complete
+ # config.log. We remove comments because anyway the quotes in there
+ # would cause problems or look ugly.
+-# WARNING: Be sure not to use single quotes in there, as some shells,
+-# such as our DU 5.0 friend, will then `close' the trap.
++# WARNING: Use '\'' to represent an apostrophe within the trap.
++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+ trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+@@ -1132,20 +1568,34 @@
+ _ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+-{
++(
++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ *) $as_unset $ac_var ;;
++ esac ;;
++ esac
++ done
+ (set) 2>&1 |
+- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+- *ac_space=\ *)
++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
+ sed -n \
+- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+- ;;
++ "s/'\''/'\''\\\\'\'''\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
++ ;; #(
+ *)
+- sed -n \
+- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+- esac;
+-}
++ esac |
++ sort
++)
+ echo
+
+ cat <<\_ASBOX
+@@ -1156,22 +1606,28 @@
+ echo
+ for ac_var in $ac_subst_vars
+ do
+- eval ac_val=$`echo $ac_var`
+- echo "$ac_var='"'"'$ac_val'"'"'"
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+-## ------------- ##
+-## Output files. ##
+-## ------------- ##
++## ------------------- ##
++## File substitutions. ##
++## ------------------- ##
+ _ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+- eval ac_val=$`echo $ac_var`
+- echo "$ac_var='"'"'$ac_val'"'"'"
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+@@ -1183,26 +1639,24 @@
+ ## ----------- ##
+ _ASBOX
+ echo
+- sed "/^$/d" confdefs.h | sort
++ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+- rm -f core *.core &&
+- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
++ rm -f core *.core core.conftest.* &&
++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+- ' 0
++' 0
+ for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+ done
+ ac_signal=0
+
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+-rm -rf conftest* confdefs.h
+-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+-echo >confdefs.h
++rm -f -r conftest* confdefs.h
+
+ # Predefined preprocessor variables.
+
+@@ -1233,14 +1687,17 @@
+
+ # Let the site file select an alternate cache file if it wants to.
+ # Prefer explicitly selected file to automatically selected ones.
+-if test -z "$CONFIG_SITE"; then
+- if test "x$prefix" != xNONE; then
+- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+- else
+- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+- fi
++if test -n "$CONFIG_SITE"; then
++ set x "$CONFIG_SITE"
++elif test "x$prefix" != xNONE; then
++ set x "$prefix/share/config.site" "$prefix/etc/config.site"
++else
++ set x "$ac_default_prefix/share/config.site" \
++ "$ac_default_prefix/etc/config.site"
+ fi
+-for ac_site_file in $CONFIG_SITE; do
++shift
++for ac_site_file
++do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+ echo "$as_me: loading site script $ac_site_file" >&6;}
+@@ -1256,8 +1713,8 @@
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+ echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+- [\\/]* | ?:[\\/]* ) . $cache_file;;
+- *) . ./$cache_file;;
++ [\\/]* | ?:[\\/]* ) . "$cache_file";;
++ *) . "./$cache_file";;
+ esac
+ fi
+ else
+@@ -1269,12 +1726,11 @@
+ # Check that the precious variables saved in the cache have kept the same
+ # value.
+ ac_cache_corrupted=false
+-for ac_var in `(set) 2>&1 |
+- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
++for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+- eval ac_new_val="\$ac_env_${ac_var}_value"
++ eval ac_old_val=\$ac_cv_env_${ac_var}_value
++ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+@@ -1299,8 +1755,7 @@
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
++ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+@@ -1317,12 +1772,6 @@
+ { (exit 1); exit 1; }; }
+ fi
+
+-ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-
+
+
+
+@@ -1339,106 +1788,154 @@
+
+
+
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+- ac_config_headers="$ac_config_headers config.h"
++ac_config_headers="$ac_config_headers config.h"
+
+ ac_aux_dir=
+-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+- if test -f $ac_dir/install-sh; then
++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
++ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+- elif test -f $ac_dir/install.sh; then
++ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+- elif test -f $ac_dir/shtool; then
++ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+ done
+ if test -z "$ac_aux_dir"; then
+- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
++echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
++
++# These three variables are undocumented and unsupported,
++# and are intended to be withdrawn in a future Autoconf release.
++# They can cause serious problems if a builder's source tree is in a directory
++# whose full name contains unusual characters.
++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
++
+
+ # Make sure we can run config.sub.
+-$ac_config_sub sun4 >/dev/null 2>&1 ||
+- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
++ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
++echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+-echo "$as_me:$LINENO: checking build system type" >&5
+-echo $ECHO_N "checking build system type... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking build system type" >&5
++echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+ if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_cv_build_alias=$build_alias
+-test -z "$ac_cv_build_alias" &&
+- ac_cv_build_alias=`$ac_config_guess`
+-test -z "$ac_cv_build_alias" &&
++ ac_build_alias=$build_alias
++test "x$ac_build_alias" = x &&
++ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
++test "x$ac_build_alias" = x &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+ echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+-echo "${ECHO_T}$ac_cv_build" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
++echo "${ECHO_T}$ac_cv_build" >&6; }
++case $ac_cv_build in
++*-*-*) ;;
++*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
++echo "$as_me: error: invalid value of canonical build" >&2;}
++ { (exit 1); exit 1; }; };;
++esac
+ build=$ac_cv_build
+-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_build
++shift
++build_cpu=$1
++build_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++build_os=$*
++IFS=$ac_save_IFS
++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+-echo "$as_me:$LINENO: checking host system type" >&5
+-echo $ECHO_N "checking host system type... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking host system type" >&5
++echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+ if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_cv_host_alias=$host_alias
+-test -z "$ac_cv_host_alias" &&
+- ac_cv_host_alias=$ac_cv_build_alias
+-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
++ if test "x$host_alias" = x; then
++ ac_cv_host=$ac_cv_build
++else
++ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
++fi
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+-echo "${ECHO_T}$ac_cv_host" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
++echo "${ECHO_T}$ac_cv_host" >&6; }
++case $ac_cv_host in
++*-*-*) ;;
++*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
++echo "$as_me: error: invalid value of canonical host" >&2;}
++ { (exit 1); exit 1; }; };;
++esac
+ host=$ac_cv_host
+-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_host
++shift
++host_cpu=$1
++host_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++host_os=$*
++IFS=$ac_save_IFS
++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
++WARNERROR=-W
++# Check whether --enable-warnings-are-errors was given.
++if test "${enable_warnings_are_errors+set}" = set; then
++ enableval=$enable_warnings_are_errors; if test "$enableval" != "no" ; then WARNERROR=-Werror ; fi
++fi
++
++
+
+-# Check whether --with-extraident or --without-extraident was given.
+-if test "${with_extraident+set}" = set; then
+- withval="$with_extraident"
+
++# Check whether --with-extraident was given.
++if test "${with_extraident+set}" = set; then
++ withval=$with_extraident;
+ cat >>confdefs.h <<_ACEOF
+ #define EXTRA_IDENT "$withval"
+ _ACEOF
+
+-fi;
++fi
++
+
+ # Extract the first word of "makedepend", so it can be a program name with args.
+ set dummy makedepend; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_MAKEDEPEND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1451,50 +1948,52 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_MAKEDEPEND="makedepend"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_MAKEDEPEND" && ac_cv_prog_MAKEDEPEND="`cd ${srcdir};pwd`/tools/not-mkdep"
+ fi
+ fi
+ MAKEDEPEND=$ac_cv_prog_MAKEDEPEND
+ if test -n "$MAKEDEPEND"; then
+- echo "$as_me:$LINENO: result: $MAKEDEPEND" >&5
+-echo "${ECHO_T}$MAKEDEPEND" >&6
++ { echo "$as_me:$LINENO: result: $MAKEDEPEND" >&5
++echo "${ECHO_T}$MAKEDEPEND" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ if test "$MAKEDEPEND" != "makedepend"; then
+ { echo "$as_me:$LINENO: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&5
+ echo "$as_me: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&2;}
+ fi
+
+
+-# Check whether --with-login or --without-login was given.
++# Check whether --with-login was given.
+ if test "${with_login+set}" = set; then
+- withval="$with_login"
+- { { echo "$as_me:$LINENO: error: --with-login is no longer supported.
++ withval=$with_login; { { echo "$as_me:$LINENO: error: --with-login is no longer supported.
+ Configure SASL appropriately instead." >&5
+ echo "$as_me: error: --with-login is no longer supported.
+ Configure SASL appropriately instead." >&2;}
+ { (exit 1); exit 1; }; }
+-fi;
++fi
+
+
+-# Check whether --with-cyrus-prefix or --without-cyrus-prefix was given.
++
++# Check whether --with-cyrus-prefix was given.
+ if test "${with_cyrus_prefix+set}" = set; then
+- withval="$with_cyrus_prefix"
+- cyrus_prefix="$withval"
++ withval=$with_cyrus_prefix; cyrus_prefix="$withval"
+ else
+ cyrus_prefix="/usr/cyrus"
+-fi;
++fi
++
+
+
+ cat >>confdefs.h <<_ACEOF
+@@ -1502,13 +2001,13 @@
+ _ACEOF
+
+
+-# Check whether --with-service-path or --without-service-path was given.
++# Check whether --with-service-path was given.
+ if test "${with_service_path+set}" = set; then
+- withval="$with_service_path"
+- service_path="$withval"
++ withval=$with_service_path; service_path="$withval"
+ else
+ service_path="$cyrus_prefix/bin"
+-fi;
++fi
++
+
+
+ cat >>confdefs.h <<_ACEOF
+@@ -1516,13 +2015,13 @@
+ _ACEOF
+
+
+-# Check whether --with-cyrus-user or --without-cyrus-user was given.
++# Check whether --with-cyrus-user was given.
+ if test "${with_cyrus_user+set}" = set; then
+- withval="$with_cyrus_user"
+- cyrus_user="$withval"
++ withval=$with_cyrus_user; cyrus_user="$withval"
+ else
+ cyrus_user="cyrus"
+-fi;
++fi
++
+
+
+ cat >>confdefs.h <<_ACEOF
+@@ -1530,13 +2029,13 @@
+ _ACEOF
+
+
+-# Check whether --with-cyrus-group or --without-cyrus-group was given.
++# Check whether --with-cyrus-group was given.
+ if test "${with_cyrus_group+set}" = set; then
+- withval="$with_cyrus_group"
+- cyrus_group="$withval"
++ withval=$with_cyrus_group; cyrus_group="$withval"
+ else
+ cyrus_group="mail"
+-fi;
++fi
++
+
+
+ if test $sysconfdir = '${prefix}/etc'; then
+@@ -1556,8 +2055,8 @@
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}gcc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1570,32 +2069,34 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ fi
+ if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1608,36 +2109,51 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
+- CC=$ac_ct_CC
++ if test "x$ac_ct_CC" = x; then
++ CC=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ CC=$ac_ct_CC
++ fi
+ else
+ CC="$ac_cv_prog_CC"
+ fi
+
+ if test -z "$CC"; then
+- if test -n "$ac_tool_prefix"; then
+- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
++ if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}cc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1650,74 +2166,34 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-fi
+-if test -z "$ac_cv_prog_CC"; then
+- ac_ct_CC=$CC
+- # Extract the first word of "cc", so it can be a program name with args.
+-set dummy cc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- if test -n "$ac_ct_CC"; then
+- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+-else
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_prog_ac_ct_CC="cc"
+- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+-done
+-
+-fi
+-fi
+-ac_ct_CC=$ac_cv_prog_ac_ct_CC
+-if test -n "$ac_ct_CC"; then
+- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
+- CC=$ac_ct_CC
+-else
+- CC="$ac_cv_prog_CC"
+-fi
+
++ fi
+ fi
+ if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1731,7 +2207,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+@@ -1742,6 +2218,7 @@
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+@@ -1759,22 +2236,23 @@
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ fi
+ if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+- for ac_prog in cl
++ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+ set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1787,36 +2265,38 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$CC" && break
+ done
+ fi
+ if test -z "$CC"; then
+ ac_ct_CC=$CC
+- for ac_prog in cl
++ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1829,29 +2309,45 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$ac_ct_CC" && break
+ done
+
+- CC=$ac_ct_CC
++ if test "x$ac_ct_CC" = x; then
++ CC=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ CC=$ac_ct_CC
++ fi
+ fi
+
+ fi
+@@ -1864,21 +2360,35 @@
+ { (exit 1); exit 1; }; }
+
+ # Provide some information about the compiler.
+-echo "$as_me:$LINENO:" \
+- "checking for C compiler version" >&5
++echo "$as_me:$LINENO: checking for C compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+- (eval $ac_compiler --version </dev/null >&5) 2>&5
++{ (ac_try="$ac_compiler --version >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+- (eval $ac_compiler -v </dev/null >&5) 2>&5
++{ (ac_try="$ac_compiler -v >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+- (eval $ac_compiler -V </dev/null >&5) 2>&5
++{ (ac_try="$ac_compiler -V >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+@@ -1903,46 +2413,70 @@
+ # Try to create an executable without -o first, disregard a.out.
+ # It will help us diagnose broken compilers, and finding out an intuition
+ # of exeext.
+-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
++echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+- (eval $ac_link_default) 2>&5
++#
++# List of possible output files, starting from the most likely.
++# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
++# only as a last resort. b.out is created by i960 compilers.
++ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
++#
++# The IRIX 6 linker writes into existing files which may not be
++# executable, retaining their permissions. Remove them first so a
++# subsequent execution test works.
++ac_rmfiles=
++for ac_file in $ac_files
++do
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
++ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
++ esac
++done
++rm -f $ac_rmfiles
++
++if { (ac_try="$ac_link_default"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+- # Find the output, starting from the most likely. This scheme is
+-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+-# resort.
+-
+-# Be careful to initialize this variable, since it used to be cached.
+-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+-ac_cv_exeext=
+-# b.out is created by i960 compilers.
+-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
++ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
++# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
++# in a Makefile. We should not override ac_cv_exeext if it was cached,
++# so that the user can short-circuit this test for compilers unknown to
++# Autoconf.
++for ac_file in $ac_files
+ do
+ test -f "$ac_file" || continue
+ case $ac_file in
+- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+- ;;
+- conftest.$ac_ext )
+- # This is the source file.
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+- # FIXME: I believe we export ac_cv_exeext for Libtool,
+- # but it would be cool to find out if it's true. Does anybody
+- # maintain Libtool? --akim.
+- export ac_cv_exeext
++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
++ then :; else
++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ fi
++ # We set ac_cv_exeext here because the later test for it is not
++ # safe: cross compilers may not add the suffix if given an `-o'
++ # argument, so we may need to know it at that point already.
++ # Even if this section looks crufty: it has the advantage of
++ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+ done
++test "$ac_cv_exeext" = no && ac_cv_exeext=
++
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+@@ -1955,19 +2489,23 @@
+ fi
+
+ ac_exeext=$ac_cv_exeext
+-echo "$as_me:$LINENO: result: $ac_file" >&5
+-echo "${ECHO_T}$ac_file" >&6
++{ echo "$as_me:$LINENO: result: $ac_file" >&5
++echo "${ECHO_T}$ac_file" >&6; }
+
+-# Check the compiler produces executables we can run. If not, either
++# Check that the compiler produces executables we can run. If not, either
+ # the compiler is broken, or we cross compile.
+-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+ # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+ # If not cross compiling, check that we can run a simple program.
+ if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -1986,22 +2524,27 @@
+ fi
+ fi
+ fi
+-echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++{ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+
+ rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ ac_clean_files=$ac_clean_files_save
+-# Check the compiler produces executables we can run. If not, either
++# Check that the compiler produces executables we can run. If not, either
+ # the compiler is broken, or we cross compile.
+-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+-echo "$as_me:$LINENO: result: $cross_compiling" >&5
+-echo "${ECHO_T}$cross_compiling" >&6
++{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
++echo "${ECHO_T}$cross_compiling" >&6; }
+
+-echo "$as_me:$LINENO: checking for suffix of executables" >&5
+-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+@@ -2012,9 +2555,8 @@
+ for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+- export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+@@ -2028,14 +2570,14 @@
+ fi
+
+ rm -f conftest$ac_cv_exeext
+-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+-echo "${ECHO_T}$ac_cv_exeext" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
++echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+ rm -f conftest.$ac_ext
+ EXEEXT=$ac_cv_exeext
+ ac_exeext=$EXEEXT
+-echo "$as_me:$LINENO: checking for suffix of object files" >&5
+-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
++echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+ if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2055,14 +2597,20 @@
+ }
+ _ACEOF
+ rm -f conftest.o conftest.obj
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
++ for ac_file in conftest.o conftest.obj conftest.*; do
++ test -f "$ac_file" || continue;
+ case $ac_file in
+- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+@@ -2080,12 +2628,12 @@
+
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+-echo "${ECHO_T}$ac_cv_objext" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
++echo "${ECHO_T}$ac_cv_objext" >&6; }
+ OBJEXT=$ac_cv_objext
+ ac_objext=$OBJEXT
+-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+ if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2108,24 +2656,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -2134,24 +2694,28 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_compiler_gnu=no
++ ac_compiler_gnu=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+ GCC=`test $ac_compiler_gnu = yes && echo yes`
+ ac_test_CFLAGS=${CFLAGS+set}
+ ac_save_CFLAGS=$CFLAGS
+-CFLAGS="-g"
+-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat >conftest.$ac_ext <<_ACEOF
++ ac_save_c_werror_flag=$ac_c_werror_flag
++ ac_c_werror_flag=yes
++ ac_cv_prog_cc_g=no
++ CFLAGS="-g"
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2167,24 +2731,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -2193,12 +2769,131 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_prog_cc_g=no
++ CFLAGS=""
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_c_werror_flag=$ac_save_c_werror_flag
++ CFLAGS="-g"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_g=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_c_werror_flag=$ac_save_c_werror_flag
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+ elif test $ac_cv_prog_cc_g = yes; then
+@@ -2214,12 +2909,12 @@
+ CFLAGS=
+ fi
+ fi
+-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+-if test "${ac_cv_prog_cc_stdc+set}" = set; then
++{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
++echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
++if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_cv_prog_cc_stdc=no
++ ac_cv_prog_cc_c89=no
+ ac_save_CC=$CC
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -2253,12 +2948,17 @@
+ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+- as 'x'. The following induces an error, until -std1 is added to get
++ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+- that's true only with -std1. */
++ that's true only with -std. */
+ int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
++ inside strings and character constants. */
++#define FOO(x) 'x'
++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
++
+ int test (int i, double x);
+ struct s1 {int (*f) (int a);};
+ struct s2 {int (*f) (double a);};
+@@ -2273,205 +2973,74 @@
+ return 0;
+ }
+ _ACEOF
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX -qlanglvl=ansi
+-# Ultrix and OSF/1 -std1
+-# HP-UX 10.20 and later -Ae
+-# HP-UX older versions -Aa -D_HPUX_SOURCE
+-# SVR4 -Xc -D__EXTENSIONS__
+-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
++ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+ do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_prog_cc_stdc=$ac_arg
+-break
++ ac_cv_prog_cc_c89=$ac_arg
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
++
+ fi
+-rm -f conftest.err conftest.$ac_objext
++
++rm -f core conftest.err conftest.$ac_objext
++ test "x$ac_cv_prog_cc_c89" != "xno" && break
+ done
+-rm -f conftest.$ac_ext conftest.$ac_objext
++rm -f conftest.$ac_ext
+ CC=$ac_save_CC
+
+ fi
+-
+-case "x$ac_cv_prog_cc_stdc" in
+- x|xno)
+- echo "$as_me:$LINENO: result: none needed" >&5
+-echo "${ECHO_T}none needed" >&6 ;;
++# AC_CACHE_VAL
++case "x$ac_cv_prog_cc_c89" in
++ x)
++ { echo "$as_me:$LINENO: result: none needed" >&5
++echo "${ECHO_T}none needed" >&6; } ;;
++ xno)
++ { echo "$as_me:$LINENO: result: unsupported" >&5
++echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+- CC="$CC $ac_cv_prog_cc_stdc" ;;
++ CC="$CC $ac_cv_prog_cc_c89"
++ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+ esac
+
+-# Some people use a C++ compiler to compile C. Since we use `exit',
+-# in C++ we need to declare it. In case someone uses the same compiler
+-# for both compiling C and C++ we need to have the C++ compiler decide
+-# the declaration of exit, since it's the most demanding environment.
+-cat >conftest.$ac_ext <<_ACEOF
+-#ifndef __cplusplus
+- choke me
+-#endif
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- for ac_declaration in \
+- '' \
+- 'extern "C" void std::exit (int) throw (); using std::exit;' \
+- 'extern "C" void std::exit (int); using std::exit;' \
+- 'extern "C" void exit (int) throw ();' \
+- 'extern "C" void exit (int);' \
+- 'void exit (int);'
+-do
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-$ac_declaration
+-#include <stdlib.h>
+-int
+-main ()
+-{
+-exit (42);
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- :
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+
+-continue
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-$ac_declaration
+-int
+-main ()
+-{
+-exit (42);
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- break
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-done
+-rm -f conftest*
+-if test -n "$ac_declaration"; then
+- echo '#ifdef __cplusplus' >>confdefs.h
+- echo $ac_declaration >>confdefs.h
+- echo '#endif' >>confdefs.h
+-fi
+-
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -2481,8 +3050,8 @@
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2495,32 +3064,34 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ RANLIB=$ac_cv_prog_RANLIB
+ if test -n "$RANLIB"; then
+- echo "$as_me:$LINENO: result: $RANLIB" >&5
+-echo "${ECHO_T}$RANLIB" >&6
++ { echo "$as_me:$LINENO: result: $RANLIB" >&5
++echo "${ECHO_T}$RANLIB" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ fi
+ if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+ set dummy ranlib; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2533,57 +3104,72 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+ fi
+ fi
+ ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+ if test -n "$ac_ct_RANLIB"; then
+- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+-echo "${ECHO_T}$ac_ct_RANLIB" >&6
++ { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
++echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
+- RANLIB=$ac_ct_RANLIB
++ if test "x$ac_ct_RANLIB" = x; then
++ RANLIB=":"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf at gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ RANLIB=$ac_ct_RANLIB
++ fi
+ else
+ RANLIB="$ac_cv_prog_RANLIB"
+ fi
+
+-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
++set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.make <<\_ACEOF
++SHELL = /bin/sh
+ all:
+- @echo 'ac_maketemp="$(MAKE)"'
++ @echo '@@@%%%=$(MAKE)=@@@%%%'
+ _ACEOF
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+-if test -n "$ac_maketemp"; then
+- eval ac_cv_prog_make_${ac_make}_set=yes
+-else
+- eval ac_cv_prog_make_${ac_make}_set=no
+-fi
++case `${MAKE-make} -f conftest.make 2>/dev/null` in
++ *@@@%%%=?*=@@@%%%*)
++ eval ac_cv_prog_make_${ac_make}_set=yes;;
++ *)
++ eval ac_cv_prog_make_${ac_make}_set=no;;
++esac
+ rm -f conftest.make
+ fi
+-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+ SET_MAKE=
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+ fi
+
+@@ -2600,8 +3186,8 @@
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # OS/2's system install, which has a completely different semantic
+ # ./install, which can be erroneously created by make from ./install.sh.
+-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+ if test -z "$INSTALL"; then
+ if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -2623,7 +3209,7 @@
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+@@ -2642,21 +3228,22 @@
+ ;;
+ esac
+ done
++IFS=$as_save_IFS
+
+
+ fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+- # As a last resort, use the slow shell script. We don't cache a
+- # path for INSTALL within a source directory, because that will
++ # As a last resort, use the slow shell script. Don't cache a
++ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+- # removed, or if the path is relative.
++ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $INSTALL" >&5
+-echo "${ECHO_T}$INSTALL" >&6
++{ echo "$as_me:$LINENO: result: $INSTALL" >&5
++echo "${ECHO_T}$INSTALL" >&6; }
+
+ # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+ # It thinks the first close brace ends the variable substitution.
+@@ -2672,8 +3259,8 @@
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+@@ -2707,8 +3294,13 @@
+ #endif
+ Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -2733,9 +3325,10 @@
+ # Broken: fails on valid input.
+ continue
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+- # OK, works on sane cases. Now check whether non-existent headers
++ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -2745,8 +3338,13 @@
+ /* end confdefs.h. */
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -2773,6 +3371,7 @@
+ ac_preproc_ok=:
+ break
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+ done
+@@ -2790,8 +3389,8 @@
+ else
+ ac_cv_prog_CPP=$CPP
+ fi
+-echo "$as_me:$LINENO: result: $CPP" >&5
+-echo "${ECHO_T}$CPP" >&6
++{ echo "$as_me:$LINENO: result: $CPP" >&5
++echo "${ECHO_T}$CPP" >&6; }
+ ac_preproc_ok=false
+ for ac_c_preproc_warn_flag in '' yes
+ do
+@@ -2814,8 +3413,13 @@
+ #endif
+ Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -2840,9 +3444,10 @@
+ # Broken: fails on valid input.
+ continue
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+- # OK, works on sane cases. Now check whether non-existent headers
++ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -2852,8 +3457,13 @@
+ /* end confdefs.h. */
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -2880,6 +3490,7 @@
+ ac_preproc_ok=:
+ break
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+ done
+@@ -2902,24 +3513,171 @@
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+-echo "$as_me:$LINENO: checking for egrep" >&5
+-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+-if test "${ac_cv_prog_egrep+set}" = set; then
++{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
++echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
++if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+- then ac_cv_prog_egrep='grep -E'
+- else ac_cv_prog_egrep='egrep'
++ # Extract the first word of "grep ggrep" to use in msg output
++if test -z "$GREP"; then
++set dummy grep ggrep; ac_prog_name=$2
++if test "${ac_cv_path_GREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_path_GREP_found=false
++# Loop through the user's path and test for each of PROGNAME-LIST
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in grep ggrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
++ # Check for GNU ac_path_GREP and select it if it is found.
++ # Check for GNU $ac_path_GREP
++case `"$ac_path_GREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
++*)
++ ac_count=0
++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ echo 'GREP' >> "conftest.nl"
++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ ac_count=`expr $ac_count + 1`
++ if test $ac_count -gt ${ac_path_GREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_GREP="$ac_path_GREP"
++ ac_path_GREP_max=$ac_count
+ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++
++ $ac_path_GREP_found && break 3
++ done
++done
++
++done
++IFS=$as_save_IFS
++
++
++fi
++
++GREP="$ac_cv_path_GREP"
++if test -z "$GREP"; then
++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
++ { (exit 1); exit 1; }; }
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+- EGREP=$ac_cv_prog_egrep
+
++else
++ ac_cv_path_GREP=$GREP
++fi
+
+
+-echo "$as_me:$LINENO: checking for AIX" >&5
+-echo $ECHO_N "checking for AIX... $ECHO_C" >&6
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
++echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
++ GREP="$ac_cv_path_GREP"
++
++
++{ echo "$as_me:$LINENO: checking for egrep" >&5
++echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
++if test "${ac_cv_path_EGREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
++ then ac_cv_path_EGREP="$GREP -E"
++ else
++ # Extract the first word of "egrep" to use in msg output
++if test -z "$EGREP"; then
++set dummy egrep; ac_prog_name=$2
++if test "${ac_cv_path_EGREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_path_EGREP_found=false
++# Loop through the user's path and test for each of PROGNAME-LIST
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in egrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
++ # Check for GNU ac_path_EGREP and select it if it is found.
++ # Check for GNU $ac_path_EGREP
++case `"$ac_path_EGREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
++*)
++ ac_count=0
++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ echo 'EGREP' >> "conftest.nl"
++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ ac_count=`expr $ac_count + 1`
++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_EGREP="$ac_path_EGREP"
++ ac_path_EGREP_max=$ac_count
++ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++
++ $ac_path_EGREP_found && break 3
++ done
++done
++
++done
++IFS=$as_save_IFS
++
++
++fi
++
++EGREP="$ac_cv_path_EGREP"
++if test -z "$EGREP"; then
++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++else
++ ac_cv_path_EGREP=$EGREP
++fi
++
++
++ fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
++echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
++ EGREP="$ac_cv_path_EGREP"
++
++
++
++{ echo "$as_me:$LINENO: checking for AIX" >&5
++echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -2933,26 +3691,25 @@
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+ #define _ALL_SOURCE 1
+ _ACEOF
+
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+ rm -f conftest*
+
+
+-echo "$as_me:$LINENO: checking for library containing strerror" >&5
+-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for library containing strerror" >&5
++echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
+ if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+-ac_cv_search_strerror=no
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -2960,115 +3717,89 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char strerror ();
+ int
+ main ()
+ {
+-strerror ();
++return strerror ();
+ ;
+ return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++for ac_lib in '' cposix; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_search_strerror="none required"
++ ac_cv_search_strerror=$ac_res
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-if test "$ac_cv_search_strerror" = no; then
+- for ac_lib in cposix; do
+- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char strerror ();
+-int
+-main ()
+-{
+-strerror ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_strerror="-l$ac_lib"
+-break
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++fi
+
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_strerror+set}" = set; then
++ break
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+- done
++done
++if test "${ac_cv_search_strerror+set}" = set; then
++ :
++else
++ ac_cv_search_strerror=no
+ fi
++rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+-echo "${ECHO_T}$ac_cv_search_strerror" >&6
+-if test "$ac_cv_search_strerror" != no; then
+- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
++{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
++echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
++ac_res=$ac_cv_search_strerror
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+ fi
+
+@@ -3076,8 +3807,8 @@
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3090,30 +3821,32 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ AWK=$ac_cv_prog_AWK
+ if test -n "$AWK"; then
+- echo "$as_me:$LINENO: result: $AWK" >&5
+-echo "${ECHO_T}$AWK" >&6
++ { echo "$as_me:$LINENO: result: $AWK" >&5
++echo "${ECHO_T}$AWK" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$AWK" && break
+ done
+
+-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
++echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
+ if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3153,6 +3886,7 @@
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
++ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+@@ -3171,7 +3905,9 @@
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
++ if (!foo) return 0;
+ }
++ return !x[0] && !zero.x;
+ #endif
+
+ ;
+@@ -3179,24 +3915,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3205,12 +3953,13 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_c_const=no
++ ac_cv_c_const=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+-echo "${ECHO_T}$ac_cv_c_const" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
++echo "${ECHO_T}$ac_cv_c_const" >&6; }
+ if test $ac_cv_c_const = no; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -3219,62 +3968,8 @@
+
+ fi
+
+-echo "$as_me:$LINENO: checking for long file names" >&5
+-echo $ECHO_N "checking for long file names... $ECHO_C" >&6
+-if test "${ac_cv_sys_long_file_names+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- ac_cv_sys_long_file_names=yes
+-# Test for long file names in all the places we know might matter:
+-# . the current directory, where building will happen
+-# $prefix/lib where we will be installing things
+-# $exec_prefix/lib likewise
+-# eval it to expand exec_prefix.
+-# $TMPDIR if set, where it might want to write temporary files
+-# if $TMPDIR is not set:
+-# /tmp where it might want to write temporary files
+-# /var/tmp likewise
+-# /usr/tmp likewise
+-if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+- ac_tmpdirs=$TMPDIR
+-else
+- ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+-fi
+-for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+- test -d $ac_dir || continue
+- test -w $ac_dir || continue # It is less confusing to not echo anything here.
+- ac_xdir=$ac_dir/cf$$
+- (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
+- ac_tf1=$ac_xdir/conftest9012345
+- ac_tf2=$ac_xdir/conftest9012346
+- (echo 1 >$ac_tf1) 2>/dev/null
+- (echo 2 >$ac_tf2) 2>/dev/null
+- ac_val=`cat $ac_tf1 2>/dev/null`
+- if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+- ac_cv_sys_long_file_names=no
+- rm -rf $ac_xdir 2>/dev/null
+- break
+- fi
+- rm -rf $ac_xdir 2>/dev/null
+-done
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
+-echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
+-if test $ac_cv_sys_long_file_names = yes; then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define HAVE_LONG_FILE_NAMES 1
+-_ACEOF
+-
+-fi
+-
+-if test $ac_cv_sys_long_file_names = no; then
+- { { echo "$as_me:$LINENO: error: The Cyrus IMAPD requires support for long file names" >&5
+-echo "$as_me: error: The Cyrus IMAPD requires support for long file names" >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-echo "$as_me:$LINENO: checking for inline" >&5
+-echo $ECHO_N "checking for inline... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for inline" >&5
++echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
+ if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3294,39 +3989,54 @@
+
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_c_inline=$ac_kw; break
++ ac_cv_c_inline=$ac_kw
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
++
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ test "$ac_cv_c_inline" != no && break
+ done
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+-echo "${ECHO_T}$ac_cv_c_inline" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
++echo "${ECHO_T}$ac_cv_c_inline" >&6; }
+
+
+ case $ac_cv_c_inline in
+@@ -3345,8 +4055,8 @@
+ esac
+
+
+-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+ if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3370,24 +4080,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3396,9 +4118,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_header_stdc=no
++ ac_cv_header_stdc=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+@@ -3454,6 +4177,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <ctype.h>
++#include <stdlib.h>
+ #if ((' ' & 0x0FF) == 0x020)
+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+@@ -3473,18 +4197,27 @@
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+- exit(2);
+- exit (0);
++ return 2;
++ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3497,12 +4230,14 @@
+ ( exit $ac_status )
+ ac_cv_header_stdc=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+-echo "${ECHO_T}$ac_cv_header_stdc" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
++echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+ if test $ac_cv_header_stdc = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -3525,9 +4260,9 @@
+ inttypes.h stdint.h unistd.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -3541,24 +4276,36 @@
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3567,12 +4314,14 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_Header=no"
++ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+@@ -3583,8 +4332,8 @@
+ done
+
+
+-echo "$as_me:$LINENO: checking for long" >&5
+-echo $ECHO_N "checking for long... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for long" >&5
++echo $ECHO_N "checking for long... $ECHO_C" >&6; }
+ if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3595,36 +4344,49 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++typedef long ac__type_new_;
+ int
+ main ()
+ {
+-if ((long *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (long))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3633,20 +4395,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_long=no
++ ac_cv_type_long=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+-echo "${ECHO_T}$ac_cv_type_long" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
++echo "${ECHO_T}$ac_cv_type_long" >&6; }
+
+-echo "$as_me:$LINENO: checking size of long" >&5
+-echo $ECHO_N "checking size of long... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking size of long" >&5
++echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test "$ac_cv_type_long" = yes; then
+- # The cast to unsigned long works around a bug in the HP C Compiler
++ # The cast to long int works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+@@ -3659,10 +4422,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
+
+ ;
+@@ -3670,24 +4434,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3700,10 +4476,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -3711,24 +4488,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3737,30 +4526,32 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo=`expr $ac_mid + 1`
+- if test $ac_lo -le $ac_mid; then
+- ac_lo= ac_hi=
+- break
+- fi
+- ac_mid=`expr 2 '*' $ac_mid + 1`
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
+
+ ;
+@@ -3768,24 +4559,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3798,10 +4601,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -3809,24 +4613,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3835,24 +4651,27 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_hi=`expr '(' $ac_mid ')' - 1`
+- if test $ac_mid -le $ac_hi; then
+- ac_lo= ac_hi=
+- break
+- fi
+- ac_mid=`expr 2 '*' $ac_mid`
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo= ac_hi=
++ ac_lo= ac_hi=
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Binary search between lo and hi bounds.
+ while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+@@ -3863,10 +4682,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -3874,24 +4694,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3900,26 +4732,20 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo=`expr '(' $ac_mid ')' + 1`
++ ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_long=$ac_lo;;
+-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute sizeof (long), 77
++echo "$as_me: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; } ;;
++ { (exit 77); exit 77; }; } ;;
+ esac
+ else
+- if test "$cross_compiling" = yes; then
+- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-else
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -3927,8 +4753,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
+-long longval () { return (long) (sizeof (long)); }
+-unsigned long ulongval () { return (long) (sizeof (long)); }
++ typedef long ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+@@ -3937,35 +4764,44 @@
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+- exit (1);
+- if (((long) (sizeof (long))) < 0)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+- long i = longval ();
+- if (i != ((long) (sizeof (long))))
+- exit (1);
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+- unsigned long i = ulongval ();
+- if (i != ((long) (sizeof (long))))
+- exit (1);
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+- exit (ferror (f) || fclose (f) != 0);
++ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3976,30 +4812,29 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ ( exit $ac_status )
+-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute sizeof (long), 77
++echo "$as_me: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++ { (exit 77); exit 77; }; }
+ fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f conftest.val
+ else
+ ac_cv_sizeof_long=0
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+-echo "${ECHO_T}$ac_cv_sizeof_long" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_LONG $ac_cv_sizeof_long
+ _ACEOF
+
+
+
+-echo "$as_me:$LINENO: checking for long long int" >&5
+-echo $ECHO_N "checking for long long int... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for long long int" >&5
++echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
+ if test "${ac_cv_type_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4010,36 +4845,49 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++typedef long long int ac__type_new_;
+ int
+ main ()
+ {
+-if ((long long int *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (long long int))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4048,20 +4896,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_long_long_int=no
++ ac_cv_type_long_long_int=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
+-echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
+
+-echo "$as_me:$LINENO: checking size of long long int" >&5
+-echo $ECHO_N "checking size of long long int... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking size of long long int" >&5
++echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test "$ac_cv_type_long_long_int" = yes; then
+- # The cast to unsigned long works around a bug in the HP C Compiler
++ # The cast to long int works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+@@ -4074,10 +4923,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long long int))) >= 0)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
+
+ ;
+@@ -4085,24 +4935,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4115,10 +4977,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -4126,24 +4989,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4152,30 +5027,32 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo=`expr $ac_mid + 1`
+- if test $ac_lo -le $ac_mid; then
+- ac_lo= ac_hi=
+- break
+- fi
+- ac_mid=`expr 2 '*' $ac_mid + 1`
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long long int))) < 0)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
+
+ ;
+@@ -4183,24 +5060,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4213,10 +5102,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long long int))) >= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -4224,24 +5114,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4250,24 +5152,27 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_hi=`expr '(' $ac_mid ')' - 1`
+- if test $ac_mid -le $ac_hi; then
+- ac_lo= ac_hi=
+- break
+- fi
+- ac_mid=`expr 2 '*' $ac_mid`
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo= ac_hi=
++ ac_lo= ac_hi=
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Binary search between lo and hi bounds.
+ while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+@@ -4278,10 +5183,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -4289,24 +5195,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4315,26 +5233,20 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo=`expr '(' $ac_mid ')' + 1`
++ ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_long_long_int=$ac_lo;;
+-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
+ See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute sizeof (long long int), 77
++echo "$as_me: error: cannot compute sizeof (long long int)
+ See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; } ;;
++ { (exit 77); exit 77; }; } ;;
+ esac
+ else
+- if test "$cross_compiling" = yes; then
+- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-else
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -4342,8 +5254,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
+-long longval () { return (long) (sizeof (long long int)); }
+-unsigned long ulongval () { return (long) (sizeof (long long int)); }
++ typedef long long int ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+@@ -4352,35 +5265,44 @@
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+- exit (1);
+- if (((long) (sizeof (long long int))) < 0)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+- long i = longval ();
+- if (i != ((long) (sizeof (long long int))))
+- exit (1);
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+- unsigned long i = ulongval ();
+- if (i != ((long) (sizeof (long long int))))
+- exit (1);
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+- exit (ferror (f) || fclose (f) != 0);
++ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4391,29 +5313,28 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ ( exit $ac_status )
+-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
+ See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute sizeof (long long int), 77
++echo "$as_me: error: cannot compute sizeof (long long int)
+ See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++ { (exit 77); exit 77; }; }
+ fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f conftest.val
+ else
+ ac_cv_sizeof_long_long_int=0
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
+-echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; }
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+ _ACEOF
+
+
+-echo "$as_me:$LINENO: checking for unsigned long long int" >&5
+-echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for unsigned long long int" >&5
++echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; }
+ if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4424,36 +5345,49 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++typedef unsigned long long int ac__type_new_;
+ int
+ main ()
+ {
+-if ((unsigned long long int *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (unsigned long long int))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4462,20 +5396,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_unsigned_long_long_int=no
++ ac_cv_type_unsigned_long_long_int=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
+-echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; }
+
+-echo "$as_me:$LINENO: checking size of unsigned long long int" >&5
+-echo $ECHO_N "checking size of unsigned long long int... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking size of unsigned long long int" >&5
++echo $ECHO_N "checking size of unsigned long long int... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_unsigned_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test "$ac_cv_type_unsigned_long_long_int" = yes; then
+- # The cast to unsigned long works around a bug in the HP C Compiler
++ # The cast to long int works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+@@ -4488,10 +5423,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) >= 0)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
+
+ ;
+@@ -4499,24 +5435,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4529,10 +5477,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) <= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -4540,24 +5489,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4566,30 +5527,32 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo=`expr $ac_mid + 1`
+- if test $ac_lo -le $ac_mid; then
+- ac_lo= ac_hi=
+- break
+- fi
+- ac_mid=`expr 2 '*' $ac_mid + 1`
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) < 0)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
+
+ ;
+@@ -4597,24 +5560,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4627,10 +5602,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) >= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -4638,24 +5614,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4664,24 +5652,27 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_hi=`expr '(' $ac_mid ')' - 1`
+- if test $ac_mid -le $ac_hi; then
+- ac_lo= ac_hi=
+- break
+- fi
+- ac_mid=`expr 2 '*' $ac_mid`
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo= ac_hi=
++ ac_lo= ac_hi=
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Binary search between lo and hi bounds.
+ while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+@@ -4692,10 +5683,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef unsigned long long int ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (unsigned long long int))) <= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -4703,24 +5695,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4729,26 +5733,20 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo=`expr '(' $ac_mid ')' + 1`
++ ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_unsigned_long_long_int=$ac_lo;;
+-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int), 77
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int)
+ See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute sizeof (unsigned long long int), 77
++echo "$as_me: error: cannot compute sizeof (unsigned long long int)
+ See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; } ;;
++ { (exit 77); exit 77; }; } ;;
+ esac
+ else
+- if test "$cross_compiling" = yes; then
+- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-else
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -4756,8 +5754,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
+-long longval () { return (long) (sizeof (unsigned long long int)); }
+-unsigned long ulongval () { return (long) (sizeof (unsigned long long int)); }
++ typedef unsigned long long int ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+@@ -4766,35 +5765,44 @@
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+- exit (1);
+- if (((long) (sizeof (unsigned long long int))) < 0)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+- long i = longval ();
+- if (i != ((long) (sizeof (unsigned long long int))))
+- exit (1);
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+- unsigned long i = ulongval ();
+- if (i != ((long) (sizeof (unsigned long long int))))
+- exit (1);
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+- exit (ferror (f) || fclose (f) != 0);
++ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4805,22 +5813,21 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ ( exit $ac_status )
+-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int), 77
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long long int)
+ See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute sizeof (unsigned long long int), 77
++echo "$as_me: error: cannot compute sizeof (unsigned long long int)
+ See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++ { (exit 77); exit 77; }; }
+ fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f conftest.val
+ else
+ ac_cv_sizeof_unsigned_long_long_int=0
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long_int" >&5
+-echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long_int" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long_long_int" >&5
++echo "${ECHO_T}$ac_cv_sizeof_unsigned_long_long_int" >&6; }
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int
+ _ACEOF
+@@ -4833,8 +5840,8 @@
+ #define HAVE_LONG_LONG_INT
+ _ACEOF
+
+- echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
++echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
+ if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4860,24 +5867,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4903,24 +5922,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4929,14 +5960,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_c_bigendian=no
++ ac_cv_c_bigendian=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-# It does not; compile a test program.
++ # It does not; compile a test program.
+ if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+@@ -4946,11 +5978,11 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
++short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
++short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
++short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
++short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+ int
+ main ()
+@@ -4961,24 +5993,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -4997,8 +6041,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
++
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -5006,27 +6052,41 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++$ac_includes_default
+ int
+ main ()
+ {
++
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+- long l;
+- char c[sizeof (long)];
++ long int l;
++ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+- exit (u.c[sizeof (long) - 1] == 1);
++ return u.c[sizeof (long int) - 1] == 1;
++
++ ;
++ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -5039,13 +6099,16 @@
+ ( exit $ac_status )
+ ac_cv_c_bigendian=yes
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
++echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in
+ yes)
+
+@@ -5066,8 +6129,8 @@
+ fi
+
+
+-echo "$as_me:$LINENO: checking for __attribute__" >&5
+-echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for __attribute__" >&5
++echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6; }
+ if test "${ac_cv___attribute__+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5098,24 +6161,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -5124,9 +6199,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv___attribute__=no
++ ac_cv___attribute__=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+ if test "$ac_cv___attribute__" = "yes"; then
+@@ -5136,12 +6212,12 @@
+ _ACEOF
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
+-echo "${ECHO_T}$ac_cv___attribute__" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
++echo "${ECHO_T}$ac_cv___attribute__" >&6; }
+
+
+-echo "$as_me:$LINENO: checking if compiler supports -fPIC" >&5
+-echo $ECHO_N "checking if compiler supports -fPIC... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking if compiler supports -fPIC" >&5
++echo $ECHO_N "checking if compiler supports -fPIC... $ECHO_C" >&6; }
+ if test "${ac_cv_fpic+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5172,24 +6248,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -5198,9 +6286,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_fpic=no
++ ac_cv_fpic=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$save_CFLAGS
+
+ fi
+@@ -5210,120 +6299,14 @@
+ else
+ FPIC_CFLAGS=""
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_fpic" >&5
+-echo "${ECHO_T}$ac_cv_fpic" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_fpic" >&5
++echo "${ECHO_T}$ac_cv_fpic" >&6; }
+
+
+
+ # CMU GUESS RUNPATH SWITCH
+- echo "$as_me:$LINENO: checking for runpath switch" >&5
+-echo $ECHO_N "checking for runpath switch... $ECHO_C" >&6
+-if test "${andrew_runpath_switch+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-
+- # first, try -R
+- SAVE_LDFLAGS="${LDFLAGS}"
+- LDFLAGS="-R /usr/lib"
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+-int
+-main ()
+-{
+-
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- andrew_runpath_switch="-R"
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-
+- LDFLAGS="-Wl,-rpath,/usr/lib"
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+-int
+-main ()
+-{
+-
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- andrew_runpath_switch="-Wl,-rpath,"
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-andrew_runpath_switch="none"
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+- LDFLAGS="${SAVE_LDFLAGS}"
++ andrew_runpath_switch="none"
+
+-fi
+-echo "$as_me:$LINENO: result: $andrew_runpath_switch" >&5
+-echo "${ECHO_T}$andrew_runpath_switch" >&6
+
+
+
+@@ -5332,18 +6315,19 @@
+ for ac_header in unistd.h sys/select.h sys/param.h stdarg.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+- echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -5354,24 +6338,36 @@
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -5380,15 +6376,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -5397,8 +6394,13 @@
+ /* end confdefs.h. */
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -5422,9 +6424,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -5448,25 +6451,19 @@
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+
+ fi
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+@@ -5485,9 +6482,9 @@
+ for ac_func in memmove strcasecmp ftruncate strerror
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -5513,53 +6510,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -5568,25 +6571,25 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+
+ else
+- case $LIBOBJS in
+- "$ac_func.$ac_objext" | \
+- *" $ac_func.$ac_objext" | \
+- "$ac_func.$ac_objext "* | \
++ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
++ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
++ ;;
+ esac
+
+ fi
+@@ -5598,9 +6601,9 @@
+ for ac_func in strlcat strlcpy
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -5626,53 +6629,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -5681,13 +6690,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+@@ -5704,9 +6715,9 @@
+ ac_header_dirent=no
+ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+-echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
++echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -5728,24 +6739,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -5754,12 +6777,14 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_Header=no"
++ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+@@ -5771,13 +6796,12 @@
+ done
+ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+ if test $ac_header_dirent = dirent.h; then
+- echo "$as_me:$LINENO: checking for library containing opendir" >&5
+-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
+ if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+-ac_cv_search_opendir=no
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -5785,126 +6809,99 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char opendir ();
+ int
+ main ()
+ {
+-opendir ();
++return opendir ();
+ ;
+ return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++for ac_lib in '' dir; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_search_opendir="none required"
++ ac_cv_search_opendir=$ac_res
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-if test "$ac_cv_search_opendir" = no; then
+- for ac_lib in dir; do
+- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char opendir ();
+-int
+-main ()
+-{
+-opendir ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_opendir="-l$ac_lib"
+-break
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++fi
+
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_opendir+set}" = set; then
++ break
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+- done
++done
++if test "${ac_cv_search_opendir+set}" = set; then
++ :
++else
++ ac_cv_search_opendir=no
+ fi
++rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+-echo "${ECHO_T}$ac_cv_search_opendir" >&6
+-if test "$ac_cv_search_opendir" != no; then
+- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+ fi
+
+ else
+- echo "$as_me:$LINENO: checking for library containing opendir" >&5
+-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
+ if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+-ac_cv_search_opendir=no
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -5912,115 +6909,89 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char opendir ();
+ int
+ main ()
+ {
+-opendir ();
++return opendir ();
+ ;
+ return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++for ac_lib in '' x; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_search_opendir="none required"
++ ac_cv_search_opendir=$ac_res
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-if test "$ac_cv_search_opendir" = no; then
+- for ac_lib in x; do
+- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char opendir ();
+-int
+-main ()
+-{
+-opendir ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_opendir="-l$ac_lib"
+-break
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++fi
+
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_opendir+set}" = set; then
++ break
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+- done
++done
++if test "${ac_cv_search_opendir+set}" = set; then
++ :
++else
++ ac_cv_search_opendir=no
+ fi
++rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+-echo "${ECHO_T}$ac_cv_search_opendir" >&6
+-if test "$ac_cv_search_opendir" != no; then
+- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+ fi
+
+@@ -6030,8 +7001,8 @@
+
+ save_LIBS="$LIBS"
+ LIB_SOCKET=""
+- echo "$as_me:$LINENO: checking for connect" >&5
+-echo $ECHO_N "checking for connect... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for connect" >&5
++echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
+ if test "${ac_cv_func_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6058,53 +7029,59 @@
+
+ #undef connect
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char connect ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_connect) || defined (__stub___connect)
++#if defined __stub_connect || defined __stub___connect
+ choke me
+-#else
+-char (*f) () = connect;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != connect;
++return connect ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6113,18 +7090,19 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_connect=no
++ ac_cv_func_connect=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+-echo "${ECHO_T}$ac_cv_func_connect" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
++echo "${ECHO_T}$ac_cv_func_connect" >&6; }
+ if test $ac_cv_func_connect = yes; then
+ :
+ else
+- echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+-echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
++echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6137,40 +7115,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char gethostbyname ();
+ int
+ main ()
+ {
+-gethostbyname ();
++return gethostbyname ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6179,20 +7169,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_nsl_gethostbyname=no
++ ac_cv_lib_nsl_gethostbyname=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+-echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
++echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
+ if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ LIB_SOCKET="-lnsl $LIB_SOCKET"
+ fi
+
+- echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+-echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
++echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_socket_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6205,40 +7196,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char connect ();
+ int
+ main ()
+ {
+-connect ();
++return connect ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6247,14 +7250,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_socket_connect=no
++ ac_cv_lib_socket_connect=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+-echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
+ if test $ac_cv_lib_socket_connect = yes; then
+ LIB_SOCKET="-lsocket $LIB_SOCKET"
+ fi
+@@ -6263,8 +7267,8 @@
+ fi
+
+ LIBS="$LIB_SOCKET $save_LIBS"
+- echo "$as_me:$LINENO: checking for res_search" >&5
+-echo $ECHO_N "checking for res_search... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for res_search" >&5
++echo $ECHO_N "checking for res_search... $ECHO_C" >&6; }
+ if test "${ac_cv_func_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6291,53 +7295,59 @@
+
+ #undef res_search
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char res_search ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_res_search) || defined (__stub___res_search)
++#if defined __stub_res_search || defined __stub___res_search
+ choke me
+-#else
+-char (*f) () = res_search;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != res_search;
++return res_search ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6346,13 +7356,14 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_res_search=no
++ ac_cv_func_res_search=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
+-echo "${ECHO_T}$ac_cv_func_res_search" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
++echo "${ECHO_T}$ac_cv_func_res_search" >&6; }
+ if test $ac_cv_func_res_search = yes; then
+ :
+ else
+@@ -6385,24 +7396,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6411,8 +7434,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
++
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ fi
+@@ -6423,9 +7448,9 @@
+ for ac_func in dn_expand dns_lookup
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -6451,53 +7476,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6506,13 +7537,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+@@ -6528,8 +7561,8 @@
+
+ cyrus_cv_getaddrinfo=yes
+
+-echo "$as_me:$LINENO: checking for getaddrinfo" >&5
+-echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
++echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
+ if test "${ac_cv_func_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6556,53 +7589,59 @@
+
+ #undef getaddrinfo
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char getaddrinfo ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
++#if defined __stub_getaddrinfo || defined __stub___getaddrinfo
+ choke me
+-#else
+-char (*f) () = getaddrinfo;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != getaddrinfo;
++return getaddrinfo ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6611,20 +7650,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_getaddrinfo=no
++ ac_cv_func_getaddrinfo=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
+-echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; }
+ if test $ac_cv_func_getaddrinfo = yes; then
+ ac_cv_lib_socket_getaddrinfo=no
+ ac_cv_lib_inet6_getaddrinfo=no
+
+ else
+- echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
+-echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
++echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6637,40 +7677,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char getaddrinfo ();
+ int
+ main ()
+ {
+-getaddrinfo ();
++return getaddrinfo ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6679,21 +7731,22 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_socket_getaddrinfo=no
++ ac_cv_lib_socket_getaddrinfo=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
+-echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6; }
+ if test $ac_cv_lib_socket_getaddrinfo = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getaddrinfo=no
+
+ else
+- echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+-echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6703,8 +7756,8 @@
+ fi
+ done
+ fi
+- echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+-echo "${ECHO_T}$ipv6_cv_dir" >&6
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getaddrinfo=no
+ else
+@@ -6713,8 +7766,8 @@
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+- echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
+-echo $ECHO_N "checking for getaddrinfo in -linet6... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
++echo $ECHO_N "checking for getaddrinfo in -linet6... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6727,40 +7780,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char getaddrinfo ();
+ int
+ main ()
+ {
+-getaddrinfo ();
++return getaddrinfo ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6769,14 +7834,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_inet6_getaddrinfo=no
++ ac_cv_lib_inet6_getaddrinfo=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
+-echo "${ECHO_T}$ac_cv_lib_inet6_getaddrinfo" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_getaddrinfo" >&6; }
+ if test $ac_cv_lib_inet6_getaddrinfo = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+@@ -6811,9 +7877,9 @@
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
+-echo $ECHO_N "checking for ${ipv6_cv_pfx}getaddrinfo... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}getaddrinfo... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -6839,53 +7905,59 @@
+
+ #undef ${ipv6_cv_pfx}getaddrinfo
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char ${ipv6_cv_pfx}getaddrinfo ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_${ipv6_cv_pfx}getaddrinfo) || defined (__stub___${ipv6_cv_pfx}getaddrinfo)
++#if defined __stub_${ipv6_cv_pfx}getaddrinfo || defined __stub___${ipv6_cv_pfx}getaddrinfo
+ choke me
+-#else
+-char (*f) () = ${ipv6_cv_pfx}getaddrinfo;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != ${ipv6_cv_pfx}getaddrinfo;
++return ${ipv6_cv_pfx}getaddrinfo ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6894,13 +7966,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+
+ fi
+ rm -f conftest*
+@@ -6919,8 +7993,8 @@
+ fi
+ if test $ipv6_cv_getaddrinfo = yes; then
+
+-echo "$as_me:$LINENO: checking for gai_strerror" >&5
+-echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for gai_strerror" >&5
++echo $ECHO_N "checking for gai_strerror... $ECHO_C" >&6; }
+ if test "${ac_cv_func_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6947,53 +8021,59 @@
+
+ #undef gai_strerror
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char gai_strerror ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_gai_strerror) || defined (__stub___gai_strerror)
++#if defined __stub_gai_strerror || defined __stub___gai_strerror
+ choke me
+-#else
+-char (*f) () = gai_strerror;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != gai_strerror;
++return gai_strerror ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7002,20 +8082,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_gai_strerror=no
++ ac_cv_func_gai_strerror=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
+-echo "${ECHO_T}$ac_cv_func_gai_strerror" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_func_gai_strerror" >&6; }
+ if test $ac_cv_func_gai_strerror = yes; then
+ ac_cv_lib_socket_gai_strerror=no
+ ac_cv_lib_inet6_gai_strerror=no
+
+ else
+- echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
+-echo $ECHO_N "checking for gai_strerror in -lsocket... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
++echo $ECHO_N "checking for gai_strerror in -lsocket... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_socket_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7028,40 +8109,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char gai_strerror ();
+ int
+ main ()
+ {
+-gai_strerror ();
++return gai_strerror ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7070,21 +8163,22 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_socket_gai_strerror=no
++ ac_cv_lib_socket_gai_strerror=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
+-echo "${ECHO_T}$ac_cv_lib_socket_gai_strerror" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_gai_strerror" >&6; }
+ if test $ac_cv_lib_socket_gai_strerror = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_gai_strerror=no
+
+ else
+- echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+-echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7094,8 +8188,8 @@
+ fi
+ done
+ fi
+- echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+-echo "${ECHO_T}$ipv6_cv_dir" >&6
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_gai_strerror=no
+ else
+@@ -7104,8 +8198,8 @@
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+- echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
+-echo $ECHO_N "checking for gai_strerror in -linet6... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
++echo $ECHO_N "checking for gai_strerror in -linet6... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_inet6_gai_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7118,40 +8212,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char gai_strerror ();
+ int
+ main ()
+ {
+-gai_strerror ();
++return gai_strerror ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7160,14 +8266,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_inet6_gai_strerror=no
++ ac_cv_lib_inet6_gai_strerror=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
+-echo "${ECHO_T}$ac_cv_lib_inet6_gai_strerror" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_gai_strerror" >&6; }
+ if test $ac_cv_lib_inet6_gai_strerror = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+@@ -7202,9 +8309,9 @@
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
+-echo $ECHO_N "checking for ${ipv6_cv_pfx}gai_strerror... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}gai_strerror... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -7230,53 +8337,59 @@
+
+ #undef ${ipv6_cv_pfx}gai_strerror
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char ${ipv6_cv_pfx}gai_strerror ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_${ipv6_cv_pfx}gai_strerror) || defined (__stub___${ipv6_cv_pfx}gai_strerror)
++#if defined __stub_${ipv6_cv_pfx}gai_strerror || defined __stub___${ipv6_cv_pfx}gai_strerror
+ choke me
+-#else
+-char (*f) () = ${ipv6_cv_pfx}gai_strerror;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != ${ipv6_cv_pfx}gai_strerror;
++return ${ipv6_cv_pfx}gai_strerror ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7285,13 +8398,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+
+ fi
+ rm -f conftest*
+@@ -7327,8 +8442,8 @@
+
+ cyrus_cv_getnameinfo=yes
+
+-echo "$as_me:$LINENO: checking for getnameinfo" >&5
+-echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for getnameinfo" >&5
++echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6; }
+ if test "${ac_cv_func_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7355,53 +8470,59 @@
+
+ #undef getnameinfo
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char getnameinfo ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo)
++#if defined __stub_getnameinfo || defined __stub___getnameinfo
+ choke me
+-#else
+-char (*f) () = getnameinfo;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != getnameinfo;
++return getnameinfo ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7410,20 +8531,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_getnameinfo=no
++ ac_cv_func_getnameinfo=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
+-echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6; }
+ if test $ac_cv_func_getnameinfo = yes; then
+ ac_cv_lib_socket_getnameinfo=no
+ ac_cv_lib_inet6_getnameinfo=no
+
+ else
+- echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
+-echo $ECHO_N "checking for getnameinfo in -lsocket... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
++echo $ECHO_N "checking for getnameinfo in -lsocket... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7436,40 +8558,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char getnameinfo ();
+ int
+ main ()
+ {
+-getnameinfo ();
++return getnameinfo ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7478,21 +8612,22 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_socket_getnameinfo=no
++ ac_cv_lib_socket_getnameinfo=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
+-echo "${ECHO_T}$ac_cv_lib_socket_getnameinfo" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_socket_getnameinfo" >&6; }
+ if test $ac_cv_lib_socket_getnameinfo = yes; then
+ LIBS="$LIBS -lsocket"
+ ac_cv_lib_inet6_getnameinfo=no
+
+ else
+- echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
+-echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
++echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6; }
+ if test "${ipv6_cv_dir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7502,8 +8637,8 @@
+ fi
+ done
+ fi
+- echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
+-echo "${ECHO_T}$ipv6_cv_dir" >&6
++ { echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
++echo "${ECHO_T}$ipv6_cv_dir" >&6; }
+ if test $ipv6_cv_dir = no; then
+ ac_cv_lib_inet6_getnameinfo=no
+ else
+@@ -7512,8 +8647,8 @@
+ SAVELDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
+ fi
+- echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
+-echo $ECHO_N "checking for getnameinfo in -linet6... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
++echo $ECHO_N "checking for getnameinfo in -linet6... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7526,40 +8661,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char getnameinfo ();
+ int
+ main ()
+ {
+-getnameinfo ();
++return getnameinfo ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7568,14 +8715,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_inet6_getnameinfo=no
++ ac_cv_lib_inet6_getnameinfo=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
+-echo "${ECHO_T}$ac_cv_lib_inet6_getnameinfo" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
++echo "${ECHO_T}$ac_cv_lib_inet6_getnameinfo" >&6; }
+ if test $ac_cv_lib_inet6_getnameinfo = yes; then
+ if test $ipv6_libinet6 = no; then
+ ipv6_libinet6=yes
+@@ -7610,9 +8758,9 @@
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
+ as_ac_var=`echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
+-echo $ECHO_N "checking for ${ipv6_cv_pfx}getnameinfo... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
++echo $ECHO_N "checking for ${ipv6_cv_pfx}getnameinfo... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -7638,53 +8786,59 @@
+
+ #undef ${ipv6_cv_pfx}getnameinfo
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char ${ipv6_cv_pfx}getnameinfo ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_${ipv6_cv_pfx}getnameinfo) || defined (__stub___${ipv6_cv_pfx}getnameinfo)
++#if defined __stub_${ipv6_cv_pfx}getnameinfo || defined __stub___${ipv6_cv_pfx}getnameinfo
+ choke me
+-#else
+-char (*f) () = ${ipv6_cv_pfx}getnameinfo;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != ${ipv6_cv_pfx}getnameinfo;
++return ${ipv6_cv_pfx}getnameinfo ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7693,13 +8847,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+
+ fi
+ rm -f conftest*
+@@ -7731,8 +8887,8 @@
+ fi
+
+
+-echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
+-echo $ECHO_N "checking whether you have ss_family in struct sockaddr_storage... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
++echo $ECHO_N "checking whether you have ss_family in struct sockaddr_storage... $ECHO_C" >&6; }
+ if test "${ipv6_cv_ss_family+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7753,24 +8909,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7779,9 +8947,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ipv6_cv_ss_family=no
++ ipv6_cv_ss_family=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ipv6_cv_ss_family = yes; then
+
+@@ -7792,11 +8961,11 @@
+ else
+ :
+ fi
+-echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
+-echo "${ECHO_T}$ipv6_cv_ss_family" >&6
++{ echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
++echo "${ECHO_T}$ipv6_cv_ss_family" >&6; }
+
+-echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
+-echo $ECHO_N "checking whether you have sa_len in struct sockaddr... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
++echo $ECHO_N "checking whether you have sa_len in struct sockaddr... $ECHO_C" >&6; }
+ if test "${ipv6_cv_sa_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7817,24 +8986,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7843,9 +9024,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ipv6_cv_sa_len=no
++ ipv6_cv_sa_len=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ipv6_cv_sa_len = yes; then
+
+@@ -7856,8 +9038,8 @@
+ else
+ :
+ fi
+-echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
+-echo "${ECHO_T}$ipv6_cv_sa_len" >&6
++{ echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
++echo "${ECHO_T}$ipv6_cv_sa_len" >&6; }
+
+
+
+@@ -7865,18 +9047,19 @@
+ for ac_header in sys/time.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+- echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -7887,24 +9070,36 @@
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7913,15 +9108,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -7930,8 +9126,13 @@
+ /* end confdefs.h. */
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -7955,9 +9156,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -7981,25 +9183,19 @@
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+
+ fi
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+@@ -8011,8 +9207,8 @@
+
+ done
+
+-echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
++echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
+ if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8036,24 +9232,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8062,12 +9270,13 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_header_time=no
++ ac_cv_header_time=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+-echo "${ECHO_T}$ac_cv_header_time" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
++echo "${ECHO_T}$ac_cv_header_time" >&6; }
+ if test $ac_cv_header_time = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -8076,8 +9285,8 @@
+
+ fi
+
+-echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+-echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
++echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
+ if test "${ac_cv_struct_tm+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8099,24 +9308,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8125,12 +9346,13 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_struct_tm=sys/time.h
++ ac_cv_struct_tm=sys/time.h
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+-echo "${ECHO_T}$ac_cv_struct_tm" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
++echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
+ if test $ac_cv_struct_tm = sys/time.h; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -8139,8 +9361,8 @@
+
+ fi
+
+-echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+-echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
++echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8165,24 +9387,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8191,7 +9425,7 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8212,24 +9446,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8238,14 +9484,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_tm_tm_zone=no
++ ac_cv_member_struct_tm_tm_zone=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
++echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
+ if test $ac_cv_member_struct_tm_tm_zone = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -8262,8 +9510,95 @@
+ _ACEOF
+
+ else
+- echo "$as_me:$LINENO: checking for tzname" >&5
+-echo $ECHO_N "checking for tzname... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
++echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
++if test "${ac_cv_have_decl_tzname+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <time.h>
++
++int
++main ()
++{
++#ifndef tzname
++ char *p = (char *) tzname;
++ return !p;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_tzname=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_have_decl_tzname=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
++echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
++if test $ac_cv_have_decl_tzname = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_TZNAME 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_TZNAME 0
++_ACEOF
++
++
++fi
++
++
++ { echo "$as_me:$LINENO: checking for tzname" >&5
++echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
+ if test "${ac_cv_var_tzname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8274,37 +9609,49 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <time.h>
+-#ifndef tzname /* For SGI. */
+-extern char *tzname[]; /* RS6000 and others reject char **tzname. */
++#if !HAVE_DECL_TZNAME
++extern char *tzname[];
+ #endif
+
+ int
+ main ()
+ {
+-atoi(*tzname);
++return tzname[0][0];
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8313,13 +9660,14 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_var_tzname=no
++ ac_cv_var_tzname=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+-echo "${ECHO_T}$ac_cv_var_tzname" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
++echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
+ if test $ac_cv_var_tzname = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -8339,9 +9687,9 @@
+ for ac_func in vprintf
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -8367,53 +9715,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8422,20 +9776,22 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+
+-echo "$as_me:$LINENO: checking for _doprnt" >&5
+-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for _doprnt" >&5
++echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; }
+ if test "${ac_cv_func__doprnt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8462,53 +9818,59 @@
+
+ #undef _doprnt
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char _doprnt ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub__doprnt) || defined (__stub____doprnt)
++#if defined __stub__doprnt || defined __stub____doprnt
+ choke me
+-#else
+-char (*f) () = _doprnt;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != _doprnt;
++return _doprnt ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8517,13 +9879,14 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func__doprnt=no
++ ac_cv_func__doprnt=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+-echo "${ECHO_T}$ac_cv_func__doprnt" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
++echo "${ECHO_T}$ac_cv_func__doprnt" >&6; }
+ if test $ac_cv_func__doprnt = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -8542,20 +9905,20 @@
+
+
+
+-# Check whether --with-bdb or --without-bdb was given.
++# Check whether --with-bdb was given.
+ if test "${with_bdb+set}" = set; then
+- withval="$with_bdb"
+- with_bdb=$withval
++ withval=$with_bdb; with_bdb=$withval
+ else
+ with_bdb="yes"
+-fi;
++fi
+
+
+-# Check whether --with-dbdir or --without-dbdir was given.
++
++# Check whether --with-dbdir was given.
+ if test "${with_dbdir+set}" = set; then
+- withval="$with_dbdir"
+- with_bdb=$withval
+-fi;
++ withval=$with_dbdir; with_bdb=$withval
++fi
++
+
+ case "$with_bdb" in
+ no)
+@@ -8577,21 +9940,21 @@
+ if test "$use_berkeley" != "no"; then
+
+
+-# Check whether --with-bdb-libdir or --without-bdb-libdir was given.
++# Check whether --with-bdb-libdir was given.
+ if test "${with_bdb_libdir+set}" = set; then
+- withval="$with_bdb_libdir"
+- with_bdb_lib=$withval
++ withval=$with_bdb_libdir; with_bdb_lib=$withval
+ else
+ test "${with_bdb_lib+set}" = set || with_bdb_lib=none
+-fi;
++fi
+
+-# Check whether --with-bdb-incdir or --without-bdb-incdir was given.
++
++# Check whether --with-bdb-incdir was given.
+ if test "${with_bdb_incdir+set}" = set; then
+- withval="$with_bdb_incdir"
+- with_bdb_inc=$withval
++ withval=$with_bdb_incdir; with_bdb_inc=$withval
+ else
+ test "${with_bdb_inc+set}" = set || with_bdb_inc=none
+-fi;
++fi
++
+
+
+
+@@ -8606,17 +9969,17 @@
+ fi
+
+ if test "${ac_cv_header_db_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for db.h" >&5
+-echo $ECHO_N "checking for db.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for db.h" >&5
++echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_db_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+-echo "${ECHO_T}$ac_cv_header_db_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
++echo "${ECHO_T}$ac_cv_header_db_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking db.h usability" >&5
+-echo $ECHO_N "checking db.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking db.h usability" >&5
++echo $ECHO_N "checking db.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -8627,24 +9990,36 @@
+ #include <db.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8653,15 +10028,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking db.h presence" >&5
+-echo $ECHO_N "checking db.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking db.h presence" >&5
++echo $ECHO_N "checking db.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -8670,8 +10046,13 @@
+ /* end confdefs.h. */
+ #include <db.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -8695,9 +10076,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -8721,25 +10103,18 @@
+ echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for db.h" >&5
+-echo $ECHO_N "checking for db.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for db.h" >&5
++echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_db_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_db_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
+-echo "${ECHO_T}$ac_cv_header_db_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
++echo "${ECHO_T}$ac_cv_header_db_h" >&6; }
+
+ fi
+ if test $ac_cv_header_db_h = yes; then
+@@ -8787,24 +10162,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8813,9 +10200,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-dblib="no"
++ dblib="no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$dblib" = "berkeley"; then break; fi
+ done
+@@ -8837,24 +10225,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -8863,9 +10263,10 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-dblib="no"
++ dblib="no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ LIBS=$saved_LIBS
+@@ -8921,13 +10322,13 @@
+
+ SIEVE_SUBDIRS=""
+ sievedir="sieve"
+-# Check whether --enable-sieve or --disable-sieve was given.
++# Check whether --enable-sieve was given.
+ if test "${enable_sieve+set}" = set; then
+- enableval="$enable_sieve"
+- if test "$enableval" = no; then
++ enableval=$enable_sieve; if test "$enableval" = no; then
+ sievedir="no"
+ fi
+-fi;
++fi
++
+
+ if test "$sievedir" != "no"; then
+ SIEVE_OBJS="lmtp_sieve.o smtpclient.o"
+@@ -8946,8 +10347,8 @@
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_YACC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8960,25 +10361,27 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_YACC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ YACC=$ac_cv_prog_YACC
+ if test -n "$YACC"; then
+- echo "$as_me:$LINENO: result: $YACC" >&5
+-echo "${ECHO_T}$YACC" >&6
++ { echo "$as_me:$LINENO: result: $YACC" >&5
++echo "${ECHO_T}$YACC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$YACC" && break
+ done
+ test -n "$YACC" || YACC="yacc"
+@@ -8987,8 +10390,8 @@
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_LEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -9001,33 +10404,35 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LEX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ LEX=$ac_cv_prog_LEX
+ if test -n "$LEX"; then
+- echo "$as_me:$LINENO: result: $LEX" >&5
+-echo "${ECHO_T}$LEX" >&6
++ { echo "$as_me:$LINENO: result: $LEX" >&5
++echo "${ECHO_T}$LEX" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$LEX" && break
+ done
+ test -n "$LEX" || LEX=":"
+
+ if test -z "$LEXLIB"
+ then
+- echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+-echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
++echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -9040,40 +10445,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char yywrap ();
+ int
+ main ()
+ {
+-yywrap ();
++return yywrap ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -9082,19 +10499,20 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_fl_yywrap=no
++ ac_cv_lib_fl_yywrap=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
++echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6; }
+ if test $ac_cv_lib_fl_yywrap = yes; then
+ LEXLIB="-lfl"
+ else
+- echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+-echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
++echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_l_yywrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -9107,40 +10525,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char yywrap ();
+ int
+ main ()
+ {
+-yywrap ();
++return yywrap ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -9149,14 +10579,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_l_yywrap=no
++ ac_cv_lib_l_yywrap=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
++echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6; }
+ if test $ac_cv_lib_l_yywrap = yes; then
+ LEXLIB="-ll"
+ fi
+@@ -9166,8 +10597,8 @@
+ fi
+
+ if test "x$LEX" != "x:"; then
+- echo "$as_me:$LINENO: checking lex output file root" >&5
+-echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking lex output file root" >&5
++echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_lex_root+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -9177,8 +10608,13 @@
+ %%
+ %%
+ _ACEOF
+-{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+- (eval $LEX conftest.l) 2>&5
++{ (ac_try="$LEX conftest.l"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$LEX conftest.l") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+@@ -9192,13 +10628,13 @@
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+-echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
++echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; }
+ rm -f conftest.l
+ LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+-echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+-echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
++echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -9213,24 +10649,36 @@
+ `cat $LEX_OUTPUT_ROOT.c`
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -9239,15 +10687,17 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
++
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_save_LIBS
+ rm -f "${LEX_OUTPUT_ROOT}.c"
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+-echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
++echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; }
+ if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -9258,8 +10708,8 @@
+
+ fi
+
+-echo "$as_me:$LINENO: checking for main in -lfl" >&5
+-echo $ECHO_N "checking for main in -lfl... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for main in -lfl" >&5
++echo $ECHO_N "checking for main in -lfl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_fl_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -9276,30 +10726,42 @@
+ int
+ main ()
+ {
+-main ();
++return main ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -9308,14 +10770,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_fl_main=no
++ ac_cv_lib_fl_main=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_fl_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_fl_main" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_main" >&5
++echo "${ECHO_T}$ac_cv_lib_fl_main" >&6; }
+ if test $ac_cv_lib_fl_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBFL 1
+@@ -9326,13 +10789,12 @@
+ fi
+
+
+- echo "$as_me:$LINENO: checking for library containing regcomp" >&5
+-echo $ECHO_N "checking for library containing regcomp... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for library containing regcomp" >&5
++echo $ECHO_N "checking for library containing regcomp... $ECHO_C" >&6; }
+ if test "${ac_cv_search_regcomp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+-ac_cv_search_regcomp=no
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -9340,115 +10802,89 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char regcomp ();
+ int
+ main ()
+ {
+-regcomp ();
++return regcomp ();
+ ;
+ return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++for ac_lib in '' rx regex; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_search_regcomp="none required"
++ ac_cv_search_regcomp=$ac_res
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-if test "$ac_cv_search_regcomp" = no; then
+- for ac_lib in rx regex; do
+- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char regcomp ();
+-int
+-main ()
+-{
+-regcomp ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_regcomp="-l$ac_lib"
+-break
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++fi
+
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if test "${ac_cv_search_regcomp+set}" = set; then
++ break
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+- done
++done
++if test "${ac_cv_search_regcomp+set}" = set; then
++ :
++else
++ ac_cv_search_regcomp=no
+ fi
++rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_search_regcomp" >&5
+-echo "${ECHO_T}$ac_cv_search_regcomp" >&6
+-if test "$ac_cv_search_regcomp" != no; then
+- test "$ac_cv_search_regcomp" = "none required" || LIBS="$ac_cv_search_regcomp $LIBS"
++{ echo "$as_me:$LINENO: result: $ac_cv_search_regcomp" >&5
++echo "${ECHO_T}$ac_cv_search_regcomp" >&6; }
++ac_res=$ac_cv_search_regcomp
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -9456,17 +10892,17 @@
+ _ACEOF
+
+ if test "${ac_cv_header_rxposix_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for rxposix.h" >&5
+-echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for rxposix.h" >&5
++echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
+-echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
++echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking rxposix.h usability" >&5
+-echo $ECHO_N "checking rxposix.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking rxposix.h usability" >&5
++echo $ECHO_N "checking rxposix.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -9477,24 +10913,36 @@
+ #include <rxposix.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -9503,15 +10951,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking rxposix.h presence" >&5
+-echo $ECHO_N "checking rxposix.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking rxposix.h presence" >&5
++echo $ECHO_N "checking rxposix.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -9520,8 +10969,13 @@
+ /* end confdefs.h. */
+ #include <rxposix.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -9545,9 +10999,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -9571,25 +11026,18 @@
+ echo "$as_me: WARNING: rxposix.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: rxposix.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: rxposix.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for rxposix.h" >&5
+-echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for rxposix.h" >&5
++echo $ECHO_N "checking for rxposix.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_rxposix_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_rxposix_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
+-echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_rxposix_h" >&5
++echo "${ECHO_T}$ac_cv_header_rxposix_h" >&6; }
+
+ fi
+ if test $ac_cv_header_rxposix_h = yes; then
+@@ -9611,8 +11059,8 @@
+
+
+
+-echo "$as_me:$LINENO: checking for strerror" >&5
+-echo $ECHO_N "checking for strerror... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for strerror" >&5
++echo $ECHO_N "checking for strerror... $ECHO_C" >&6; }
+ if test "${ac_cv_func_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -9639,53 +11087,59 @@
+
+ #undef strerror
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char strerror ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_strerror) || defined (__stub___strerror)
++#if defined __stub_strerror || defined __stub___strerror
+ choke me
+-#else
+-char (*f) () = strerror;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != strerror;
++return strerror ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -9694,13 +11148,14 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_strerror=no
++ ac_cv_func_strerror=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
+-echo "${ECHO_T}$ac_cv_func_strerror" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
++echo "${ECHO_T}$ac_cv_func_strerror" >&6; }
+ if test $ac_cv_func_strerror = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -9720,18 +11175,19 @@
+ for ac_header in sys/resource.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+- echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -9742,24 +11198,36 @@
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -9768,15 +11236,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -9785,8 +11254,13 @@
+ /* end confdefs.h. */
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -9810,9 +11284,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -9836,25 +11311,19 @@
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+
+ fi
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+@@ -9870,9 +11339,9 @@
+ for ac_func in setrlimit
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -9898,53 +11367,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -9953,13 +11428,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+@@ -9972,9 +11449,9 @@
+ for ac_func in getrlimit
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -10000,53 +11477,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -10055,13 +11538,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+@@ -10076,9 +11561,9 @@
+ for ac_func in daemon setsid
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -10104,53 +11589,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -10159,13 +11650,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+@@ -10179,9 +11672,9 @@
+ for ac_func in shutdown
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -10207,53 +11700,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -10262,13 +11761,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+@@ -10337,8 +11838,8 @@
+
+
+ spt_type=""
+-echo "$as_me:$LINENO: checking for setproctitle" >&5
+-echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for setproctitle" >&5
++echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6; }
+ if test "${ac_cv_func_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -10365,53 +11866,59 @@
+
+ #undef setproctitle
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char setproctitle ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_setproctitle) || defined (__stub___setproctitle)
++#if defined __stub_setproctitle || defined __stub___setproctitle
+ choke me
+-#else
+-char (*f) () = setproctitle;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != setproctitle;
++return setproctitle ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -10420,20 +11927,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_setproctitle=no
++ ac_cv_func_setproctitle=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
+-echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
++echo "${ECHO_T}$ac_cv_func_setproctitle" >&6; }
+ if test $ac_cv_func_setproctitle = yes; then
+ spt_type=SPT_BUILTIN
+ fi
+
+ if test "$spt_type" = ""; then
+- echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
+-echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
++echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_util_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -10446,40 +11954,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char setproctitle ();
+ int
+ main ()
+ {
+-setproctitle ();
++return setproctitle ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -10488,14 +12008,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_util_setproctitle=no
++ ac_cv_lib_util_setproctitle=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
+-echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
++echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6; }
+ if test $ac_cv_lib_util_setproctitle = yes; then
+ spt_type=SPT_BUILTIN
+ LIBS="${LIBS} -lutil"
+@@ -10504,17 +12025,17 @@
+ fi
+ if test "$spt_type" = ""; then
+ if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
+-echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
++echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking sys/pstat.h usability" >&5
+-echo $ECHO_N "checking sys/pstat.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sys/pstat.h usability" >&5
++echo $ECHO_N "checking sys/pstat.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -10525,24 +12046,36 @@
+ #include <sys/pstat.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -10551,15 +12084,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking sys/pstat.h presence" >&5
+-echo $ECHO_N "checking sys/pstat.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sys/pstat.h presence" >&5
++echo $ECHO_N "checking sys/pstat.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -10568,8 +12102,13 @@
+ /* end confdefs.h. */
+ #include <sys/pstat.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -10593,9 +12132,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -10619,25 +12159,18 @@
+ echo "$as_me: WARNING: sys/pstat.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: sys/pstat.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
+-echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sys/pstat.h" >&5
++echo $ECHO_N "checking for sys/pstat.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_pstat_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_sys_pstat_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_pstat_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_pstat_h" >&6; }
+
+ fi
+ if test $ac_cv_header_sys_pstat_h = yes; then
+@@ -10648,17 +12181,17 @@
+ fi
+ if test "$spt_type" = ""; then
+ if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
+-echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
++echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking sys/sysnews.h usability" >&5
+-echo $ECHO_N "checking sys/sysnews.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sys/sysnews.h usability" >&5
++echo $ECHO_N "checking sys/sysnews.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -10669,24 +12202,36 @@
+ #include <sys/sysnews.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -10695,15 +12240,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking sys/sysnews.h presence" >&5
+-echo $ECHO_N "checking sys/sysnews.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sys/sysnews.h presence" >&5
++echo $ECHO_N "checking sys/sysnews.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -10712,8 +12258,13 @@
+ /* end confdefs.h. */
+ #include <sys/sysnews.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -10737,9 +12288,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -10763,25 +12315,18 @@
+ echo "$as_me: WARNING: sys/sysnews.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: sys/sysnews.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
+-echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sys/sysnews.h" >&5
++echo $ECHO_N "checking for sys/sysnews.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_sysnews_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_sys_sysnews_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysnews_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_sysnews_h" >&6; }
+
+ fi
+ if test $ac_cv_header_sys_sysnews_h = yes; then
+@@ -10791,8 +12336,8 @@
+
+ fi
+ if test "$spt_type" = ""; then
+- echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
+-echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
++echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6; }
+ if test "${cyrus_cv_sys_psstrings+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -10809,8 +12354,13 @@
+ #include </nonexistent>
+ #endif
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -10834,18 +12384,19 @@
+
+ cyrus_cv_sys_psstrings=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+ fi
+
+ if test $cyrus_cv_sys_psstrings = yes; then
+ spt_type=SPT_PSSTRINGS
+ fi
+- echo "$as_me:$LINENO: result: $cyrus_cv_sys_psstrings" >&5
+-echo "${ECHO_T}$cyrus_cv_sys_psstrings" >&6
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_psstrings" >&5
++echo "${ECHO_T}$cyrus_cv_sys_psstrings" >&6; }
+ fi
+ if test "$spt_type" = ""; then
+- echo "$as_me:$LINENO: checking for SCO" >&5
+-echo $ECHO_N "checking for SCO... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for SCO" >&5
++echo $ECHO_N "checking for SCO... $ECHO_C" >&6; }
+ if test "${cyrus_cv_sys_sco+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -10860,8 +12411,13 @@
+ #include </nonexistent>
+ #endif
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -10885,18 +12441,19 @@
+
+ cyrus_cv_sys_sco=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+ fi
+
+ if test $cyrus_cv_sys_sco = yes; then
+ spt_type=SPT_SCO
+ fi
+- echo "$as_me:$LINENO: result: $cyrus_cv_sys_sco" >&5
+-echo "${ECHO_T}$cyrus_cv_sys_sco" >&6
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_sco" >&5
++echo "${ECHO_T}$cyrus_cv_sys_sco" >&6; }
+ fi
+ if test "$spt_type" = ""; then
+- echo "$as_me:$LINENO: checking for setproctitle usability" >&5
+-echo $ECHO_N "checking for setproctitle usability... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for setproctitle usability" >&5
++echo $ECHO_N "checking for setproctitle usability... $ECHO_C" >&6; }
+ if test "${cyrus_cv_sys_setproctitle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -10911,8 +12468,13 @@
+ #include </nonexistent>
+ #endif
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -10936,14 +12498,15 @@
+
+ cyrus_cv_sys_setproctitle=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+ fi
+
+ if test $cyrus_cv_sys_setproctitle = no; then
+ spt_type=SPT_NONE
+ fi
+- echo "$as_me:$LINENO: result: $cyrus_cv_sys_setproctitle" >&5
+-echo "${ECHO_T}$cyrus_cv_sys_setproctitle" >&6
++ { echo "$as_me:$LINENO: result: $cyrus_cv_sys_setproctitle" >&5
++echo "${ECHO_T}$cyrus_cv_sys_setproctitle" >&6; }
+ fi
+ if test "$spt_type" != ""; then
+
+@@ -10953,8 +12516,8 @@
+
+ fi
+
+-echo "$as_me:$LINENO: checking nonblocking method" >&5
+-echo $ECHO_N "checking nonblocking method... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking nonblocking method" >&5
++echo $ECHO_N "checking nonblocking method... $ECHO_C" >&6; }
+ if test "${cyrus_cv_sys_nonblock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -10979,24 +12542,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11005,19 +12580,20 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cyrus_cv_sys_nonblock=ioctl
++ cyrus_cv_sys_nonblock=ioctl
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+
+ WITH_NONBLOCK=$cyrus_cv_sys_nonblock
+
+-echo "$as_me:$LINENO: result: $WITH_NONBLOCK" >&5
+-echo "${ECHO_T}$WITH_NONBLOCK" >&6
++{ echo "$as_me:$LINENO: result: $WITH_NONBLOCK" >&5
++echo "${ECHO_T}$WITH_NONBLOCK" >&6; }
+
+-echo "$as_me:$LINENO: checking timezone GMT offset method" >&5
+-echo $ECHO_N "checking timezone GMT offset method... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking timezone GMT offset method" >&5
++echo $ECHO_N "checking timezone GMT offset method... $ECHO_C" >&6; }
+ if test "${cyrus_cv_struct_sys_gmtoff+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11040,24 +12616,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11066,17 +12654,18 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cyrus_cv_struct_sys_gmtoff=gmtime
++ cyrus_cv_struct_sys_gmtoff=gmtime
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+ WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff
+
+-echo "$as_me:$LINENO: result: $WITH_GMTOFF" >&5
+-echo "${ECHO_T}$WITH_GMTOFF" >&6
+-echo "$as_me:$LINENO: checking for shared mmap" >&5
+-echo $ECHO_N "checking for shared mmap... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: result: $WITH_GMTOFF" >&5
++echo "${ECHO_T}$WITH_GMTOFF" >&6; }
++{ echo "$as_me:$LINENO: checking for shared mmap" >&5
++echo $ECHO_N "checking for shared mmap... $ECHO_C" >&6; }
+ if test "${cyrus_cv_func_mmap_shared+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11116,13 +12705,22 @@
+
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11135,17 +12733,19 @@
+ ( exit $ac_status )
+ cyrus_cv_func_mmap_shared=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+
+-echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_shared" >&5
+-echo "${ECHO_T}$cyrus_cv_func_mmap_shared" >&6
++{ echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_shared" >&5
++echo "${ECHO_T}$cyrus_cv_func_mmap_shared" >&6; }
+ if test $cyrus_cv_func_mmap_shared = yes; then
+ WITH_MAP="shared"
+ else
+-echo "$as_me:$LINENO: checking for stupid shared mmap" >&5
+-echo $ECHO_N "checking for stupid shared mmap... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for stupid shared mmap" >&5
++echo $ECHO_N "checking for stupid shared mmap... $ECHO_C" >&6; }
+ if test "${cyrus_cv_func_mmap_stupidshared+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11186,13 +12786,22 @@
+
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11205,12 +12814,14 @@
+ ( exit $ac_status )
+ cyrus_cv_func_mmap_stupidshared=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+
+-echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_stupidshared" >&5
+-echo "${ECHO_T}$cyrus_cv_func_mmap_stupidshared" >&6
++{ echo "$as_me:$LINENO: result: $cyrus_cv_func_mmap_stupidshared" >&5
++echo "${ECHO_T}$cyrus_cv_func_mmap_stupidshared" >&6; }
+ if test $cyrus_cv_func_mmap_stupidshared = yes; then
+ WITH_MAP="stupidshared"
+ else
+@@ -11224,14 +12835,13 @@
+
+
+
+-# Check whether --with-lock or --without-lock was given.
++# Check whether --with-lock was given.
+ if test "${with_lock+set}" = set; then
+- withval="$with_lock"
+- WITH_LOCK="$withval"
++ withval=$with_lock; WITH_LOCK="$withval"
+ else
+
+- echo "$as_me:$LINENO: checking for fcntl" >&5
+-echo $ECHO_N "checking for fcntl... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for fcntl" >&5
++echo $ECHO_N "checking for fcntl... $ECHO_C" >&6; }
+ if test "${ac_cv_func_fcntl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11258,53 +12868,59 @@
+
+ #undef fcntl
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char fcntl ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_fcntl) || defined (__stub___fcntl)
++#if defined __stub_fcntl || defined __stub___fcntl
+ choke me
+-#else
+-char (*f) () = fcntl;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != fcntl;
++return fcntl ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11313,19 +12929,20 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_fcntl=no
++ ac_cv_func_fcntl=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_fcntl" >&5
+-echo "${ECHO_T}$ac_cv_func_fcntl" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_fcntl" >&5
++echo "${ECHO_T}$ac_cv_func_fcntl" >&6; }
+ if test $ac_cv_func_fcntl = yes; then
+ WITH_LOCK="fcntl"
+ else
+
+- echo "$as_me:$LINENO: checking for flock" >&5
+-echo $ECHO_N "checking for flock... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for flock" >&5
++echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
+ if test "${ac_cv_func_flock+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11352,53 +12969,59 @@
+
+ #undef flock
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char flock ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_flock) || defined (__stub___flock)
++#if defined __stub_flock || defined __stub___flock
+ choke me
+-#else
+-char (*f) () = flock;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != flock;
++return flock ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11407,13 +13030,14 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_flock=no
++ ac_cv_func_flock=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_flock" >&5
+-echo "${ECHO_T}$ac_cv_func_flock" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_flock" >&5
++echo "${ECHO_T}$ac_cv_func_flock" >&6; }
+ if test $ac_cv_func_flock = yes; then
+ WITH_LOCK="flock"
+ else
+@@ -11428,13 +13052,14 @@
+ fi
+
+
+-fi;
++fi
++
+
+
+
+ LIB_RT=""
+-echo "$as_me:$LINENO: checking for fdatasync" >&5
+-echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for fdatasync" >&5
++echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
+ if test "${ac_cv_func_fdatasync+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11461,53 +13086,59 @@
+
+ #undef fdatasync
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char fdatasync ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_fdatasync) || defined (__stub___fdatasync)
++#if defined __stub_fdatasync || defined __stub___fdatasync
+ choke me
+-#else
+-char (*f) () = fdatasync;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != fdatasync;
++return fdatasync ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11516,13 +13147,14 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_fdatasync=no
++ ac_cv_func_fdatasync=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_fdatasync" >&5
+-echo "${ECHO_T}$ac_cv_func_fdatasync" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_fdatasync" >&5
++echo "${ECHO_T}$ac_cv_func_fdatasync" >&6; }
+ if test $ac_cv_func_fdatasync = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -11531,8 +13163,8 @@
+
+ else
+
+- echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
+-echo $ECHO_N "checking for fdatasync in -lrt... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
++echo $ECHO_N "checking for fdatasync in -lrt... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_rt_fdatasync+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11545,40 +13177,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char fdatasync ();
+ int
+ main ()
+ {
+-fdatasync ();
++return fdatasync ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11587,14 +13231,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_rt_fdatasync=no
++ ac_cv_lib_rt_fdatasync=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
+-echo "${ECHO_T}$ac_cv_lib_rt_fdatasync" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
++echo "${ECHO_T}$ac_cv_lib_rt_fdatasync" >&6; }
+ if test $ac_cv_lib_rt_fdatasync = yes; then
+
+ LIB_RT="-lrt"
+@@ -11615,8 +13260,8 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+
+- echo "$as_me:$LINENO: checking for sigvec" >&5
+-echo $ECHO_N "checking for sigvec... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sigvec" >&5
++echo $ECHO_N "checking for sigvec... $ECHO_C" >&6; }
+ if test "${ac_cv_func_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11643,53 +13288,59 @@
+
+ #undef sigvec
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char sigvec ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_sigvec) || defined (__stub___sigvec)
++#if defined __stub_sigvec || defined __stub___sigvec
+ choke me
+-#else
+-char (*f) () = sigvec;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != sigvec;
++return sigvec ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11698,21 +13349,22 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_sigvec=no
++ ac_cv_func_sigvec=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_sigvec" >&5
+-echo "${ECHO_T}$ac_cv_func_sigvec" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_sigvec" >&5
++echo "${ECHO_T}$ac_cv_func_sigvec" >&6; }
+ if test $ac_cv_func_sigvec = yes; then
+
+ cyrus_sigveclib=""
+
+ else
+
+- echo "$as_me:$LINENO: checking for sigvec in -lBSD" >&5
+-echo $ECHO_N "checking for sigvec in -lBSD... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sigvec in -lBSD" >&5
++echo $ECHO_N "checking for sigvec in -lBSD... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_BSD_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11725,40 +13377,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char sigvec ();
+ int
+ main ()
+ {
+-sigvec ();
++return sigvec ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11767,22 +13431,23 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_BSD_sigvec=no
++ ac_cv_lib_BSD_sigvec=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_sigvec" >&5
+-echo "${ECHO_T}$ac_cv_lib_BSD_sigvec" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_sigvec" >&5
++echo "${ECHO_T}$ac_cv_lib_BSD_sigvec" >&6; }
+ if test $ac_cv_lib_BSD_sigvec = yes; then
+ cyrus_sigveclib="-lBSD"
+ else
+
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS"
+- echo "$as_me:$LINENO: checking for sigvec in -lucb" >&5
+-echo $ECHO_N "checking for sigvec in -lucb... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sigvec in -lucb" >&5
++echo $ECHO_N "checking for sigvec in -lucb... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_ucb_sigvec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -11795,40 +13460,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char sigvec ();
+ int
+ main ()
+ {
+-sigvec ();
++return sigvec ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -11837,14 +13514,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_ucb_sigvec=no
++ ac_cv_lib_ucb_sigvec=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_sigvec" >&5
+-echo "${ECHO_T}$ac_cv_lib_ucb_sigvec" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_sigvec" >&5
++echo "${ECHO_T}$ac_cv_lib_ucb_sigvec" >&6; }
+ if test $ac_cv_lib_ucb_sigvec = yes; then
+
+ cyrus_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"
+@@ -11867,34 +13545,34 @@
+ # all authentication goes through SASL
+
+
+-# Check whether --with-afs or --without-afs was given.
++# Check whether --with-afs was given.
+ if test "${with_afs+set}" = set; then
+- withval="$with_afs"
+- with_afs="${withval}"
++ withval=$with_afs; with_afs="${withval}"
+ else
+ with_afs="no"
+-fi;
++fi
+
+
+-# Check whether --with-ldap or --without-ldap was given.
++
++# Check whether --with-ldap was given.
+ if test "${with_ldap+set}" = set; then
+- withval="$with_ldap"
+- with_ldap="${withval}"
++ withval=$with_ldap; with_ldap="${withval}"
+ else
+ with_ldap="no"
+-fi;
++fi
+
+-# Check whether --enable-krb5afspts or --disable-krb5afspts was given.
++
++# Check whether --enable-krb5afspts was given.
+ if test "${enable_krb5afspts+set}" = set; then
+- enableval="$enable_krb5afspts"
+- SASL_GSSAPI_LIBS_SET="yes"
++ enableval=$enable_krb5afspts; SASL_GSSAPI_LIBS_SET="yes"
+
+
+ cat >>confdefs.h <<\_ACEOF
+ #define AFSPTS_USE_KRB5
+ _ACEOF
+
+-fi;
++fi
++
+
+ if test "x$with_afs" != "xno"; then
+ if test ! -d $with_afs; then
+@@ -11923,8 +13601,8 @@
+
+ SAVE_LIBS="$LIBS"
+ LIBS="${with_afs}/lib/liblwp.a"
+- echo "$as_me:$LINENO: checking if AFS libraries need sigvec" >&5
+-echo $ECHO_N "checking if AFS libraries need sigvec... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking if AFS libraries need sigvec" >&5
++echo $ECHO_N "checking if AFS libraries need sigvec... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -11941,30 +13619,42 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ cyrus_afs_sigvec="no"
+
+ else
+@@ -11972,12 +13662,13 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+ cyrus_afs_sigvec="yes"
+
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ fi
+@@ -12027,8 +13718,8 @@
+ CPPFLAGS=$LDAP_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+- echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+-echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
++echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -12041,40 +13732,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char ldap_initialize ();
+ int
+ main ()
+ {
+-ldap_initialize ();
++return ldap_initialize ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12083,14 +13786,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_ldap_ldap_initialize=no
++ ac_cv_lib_ldap_ldap_initialize=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+-echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
++echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6; }
+ if test $ac_cv_lib_ldap_ldap_initialize = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -12107,8 +13811,8 @@
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$LDAP_LDFLAGS
+
+- echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
+-echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
++echo $ECHO_N "checking for ldap_initialize in -lldap... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -12121,40 +13825,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char ldap_initialize ();
+ int
+ main ()
+ {
+-ldap_initialize ();
++return ldap_initialize ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12163,14 +13879,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_ldap_ldap_initialize=no
++ ac_cv_lib_ldap_ldap_initialize=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
+-echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
++echo "${ECHO_T}$ac_cv_lib_ldap_ldap_initialize" >&6; }
+ if test $ac_cv_lib_ldap_ldap_initialize = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -12202,46 +13919,46 @@
+
+
+ SERVER_SUBDIRS="master imap"
+-# Check whether --enable-server or --disable-server was given.
++# Check whether --enable-server was given.
+ if test "${enable_server+set}" = set; then
+- enableval="$enable_server"
+- if test "$enableval" = no; then
++ enableval=$enable_server; if test "$enableval" = no; then
+ SERVER_SUBDIRS=""
+ fi
+-fi;
++fi
++
+
+ # We always output a server makefile (just because we can)
+
+
+-# Check whether --with-krb or --without-krb was given.
++# Check whether --with-krb was given.
+ if test "${with_krb+set}" = set; then
+- withval="$with_krb"
+- with_krb="$withval"
++ withval=$with_krb; with_krb="$withval"
+ else
+ with_krb="no"
+-fi;
++fi
+
+
+-# Check whether --with-krbimpl or --without-krbimpl was given.
++
++# Check whether --with-krbimpl was given.
+ if test "${with_krbimpl+set}" = set; then
+- withval="$with_krbimpl"
+- with_krbimpl="$withval"
++ withval=$with_krbimpl; with_krbimpl="$withval"
+ else
+ with_krbimpl="kth"
+-fi;
++fi
+
+-# Check whether --enable-statickrb or --disable-statickrb was given.
++
++# Check whether --enable-statickrb was given.
+ if test "${enable_statickrb+set}" = set; then
+- enableval="$enable_statickrb"
+- with_statickrb="yes"
++ enableval=$enable_statickrb; with_statickrb="yes"
+ else
+ with_statickrb="no"
+-fi;
++fi
+
+
+
+-echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+-echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
++
++{ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -12254,40 +13971,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char res_search ();
+ int
+ main ()
+ {
+-res_search ();
++return res_search ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12296,14 +14025,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_resolv_res_search=no
++ ac_cv_lib_resolv_res_search=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+-echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
+ if test $ac_cv_lib_resolv_res_search = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBRESOLV 1
+@@ -12322,16 +14052,16 @@
+
+ if test "$with_krb" != "no"; then
+
+-# Check whether --with-krbdes or --without-krbdes was given.
++# Check whether --with-krbdes was given.
+ if test "${with_krbdes+set}" = set; then
+- withval="$with_krbdes"
+- with_krbdes="$withval"
++ withval=$with_krbdes; with_krbdes="$withval"
+ else
+ with_krbdes="yes"
+-fi;
++fi
++
+ if test "$with_krbdes" = "yes"; then
+- echo "$as_me:$LINENO: checking for des_ecb_encrypt in -ldes" >&5
+-echo $ECHO_N "checking for des_ecb_encrypt in -ldes... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for des_ecb_encrypt in -ldes" >&5
++echo $ECHO_N "checking for des_ecb_encrypt in -ldes... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_des_des_ecb_encrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -12344,40 +14074,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char des_ecb_encrypt ();
+ int
+ main ()
+ {
+-des_ecb_encrypt ();
++return des_ecb_encrypt ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12386,14 +14128,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_des_des_ecb_encrypt=no
++ ac_cv_lib_des_des_ecb_encrypt=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_ecb_encrypt" >&5
+-echo "${ECHO_T}$ac_cv_lib_des_des_ecb_encrypt" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_ecb_encrypt" >&5
++echo "${ECHO_T}$ac_cv_lib_des_des_ecb_encrypt" >&6; }
+ if test $ac_cv_lib_des_des_ecb_encrypt = yes; then
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$with_krb/lib/libdes.a"
+@@ -12410,8 +14153,8 @@
+ fi
+
+ if test -d ${with_krb}; then
+- echo "$as_me:$LINENO: checking for Kerberos includes" >&5
+-echo $ECHO_N "checking for Kerberos includes... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for Kerberos includes" >&5
++echo $ECHO_N "checking for Kerberos includes... $ECHO_C" >&6; }
+ if test "${cyrus_krbinclude+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -12425,8 +14168,8 @@
+ done
+
+ fi
+-echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
+-echo "${ECHO_T}$cyrus_krbinclude" >&6
++{ echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
++echo "${ECHO_T}$cyrus_krbinclude" >&6; }
+
+ if test -n "${cyrus_krbinclude}"; then
+ CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
+@@ -12449,17 +14192,17 @@
+
+ if test "$with_des" != no; then
+ if test "${ac_cv_header_krb_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for krb.h" >&5
+-echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for krb.h" >&5
++echo $ECHO_N "checking for krb.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_krb_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+-echo "${ECHO_T}$ac_cv_header_krb_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
++echo "${ECHO_T}$ac_cv_header_krb_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking krb.h usability" >&5
+-echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking krb.h usability" >&5
++echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -12470,24 +14213,36 @@
+ #include <krb.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12496,15 +14251,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking krb.h presence" >&5
+-echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking krb.h presence" >&5
++echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -12513,8 +14269,13 @@
+ /* end confdefs.h. */
+ #include <krb.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -12538,9 +14299,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -12564,32 +14326,25 @@
+ echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for krb.h" >&5
+-echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for krb.h" >&5
++echo $ECHO_N "checking for krb.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_krb_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_krb_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+-echo "${ECHO_T}$ac_cv_header_krb_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
++echo "${ECHO_T}$ac_cv_header_krb_h" >&6; }
+
+ fi
+ if test $ac_cv_header_krb_h = yes; then
+ as_ac_Lib=`echo "ac_cv_lib_${KRBLIB}''_krb_mk_priv" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for krb_mk_priv in -l${KRBLIB}" >&5
+-echo $ECHO_N "checking for krb_mk_priv in -l${KRBLIB}... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for krb_mk_priv in -l${KRBLIB}" >&5
++echo $ECHO_N "checking for krb_mk_priv in -l${KRBLIB}... $ECHO_C" >&6; }
++if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+@@ -12601,40 +14356,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char krb_mk_priv ();
+ int
+ main ()
+ {
+-krb_mk_priv ();
++return krb_mk_priv ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12643,14 +14410,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_Lib=no"
++ eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Lib'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ if test "$with_statickrb" = "yes"; then
+ KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a"
+@@ -12689,11 +14458,11 @@
+
+ IMAP_PROGS=""
+
+-# Check whether --with-openssl or --without-openssl was given.
++# Check whether --with-openssl was given.
+ if test "${with_openssl+set}" = set; then
+- withval="$with_openssl"
+- with_openssl="${withval}"
+-fi;
++ withval=$with_openssl; with_openssl="${withval}"
++fi
++
+
+ OPENSSL_INC=
+ OPENSSL_LIB=
+@@ -12701,8 +14470,8 @@
+ no) with_openssl="no";;
+ ""|yes)
+ LIB_RSAREF=""
+- echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
+-echo $ECHO_N "checking for RSAPublicEncrypt in -lrsaref... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
++echo $ECHO_N "checking for RSAPublicEncrypt in -lrsaref... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -12715,40 +14484,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char RSAPublicEncrypt ();
+ int
+ main ()
+ {
+-RSAPublicEncrypt ();
++return RSAPublicEncrypt ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12757,14 +14538,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_rsaref_RSAPublicEncrypt=no
++ ac_cv_lib_rsaref_RSAPublicEncrypt=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
+-echo "${ECHO_T}$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
++echo "${ECHO_T}$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
+ if test $ac_cv_lib_rsaref_RSAPublicEncrypt = yes; then
+ LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
+ else
+@@ -12773,8 +14555,8 @@
+
+
+ with_openssl="yes"
+- echo "$as_me:$LINENO: checking for BIO_accept in -lcrypto" >&5
+-echo $ECHO_N "checking for BIO_accept in -lcrypto... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for BIO_accept in -lcrypto" >&5
++echo $ECHO_N "checking for BIO_accept in -lcrypto... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_crypto_BIO_accept+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -12787,40 +14569,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char BIO_accept ();
+ int
+ main ()
+ {
+-BIO_accept ();
++return BIO_accept ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12829,22 +14623,23 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_crypto_BIO_accept=no
++ ac_cv_lib_crypto_BIO_accept=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_BIO_accept" >&5
+-echo "${ECHO_T}$ac_cv_lib_crypto_BIO_accept" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_BIO_accept" >&5
++echo "${ECHO_T}$ac_cv_lib_crypto_BIO_accept" >&6; }
+ if test $ac_cv_lib_crypto_BIO_accept = yes; then
+ LIBS="-lcrypto $LIB_RSAREF ${LIBS}"
+ else
+ with_openssl="no"
+ fi
+
+- echo "$as_me:$LINENO: checking for SSL_CTX_new in -lssl" >&5
+-echo $ECHO_N "checking for SSL_CTX_new in -lssl... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for SSL_CTX_new in -lssl" >&5
++echo $ECHO_N "checking for SSL_CTX_new in -lssl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_ssl_SSL_CTX_new+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -12857,40 +14652,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char SSL_CTX_new ();
+ int
+ main ()
+ {
+-SSL_CTX_new ();
++return SSL_CTX_new ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -12899,14 +14706,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_ssl_SSL_CTX_new=no
++ ac_cv_lib_ssl_SSL_CTX_new=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5
+-echo "${ECHO_T}$ac_cv_lib_ssl_SSL_CTX_new" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5
++echo "${ECHO_T}$ac_cv_lib_ssl_SSL_CTX_new" >&6; }
+ if test $ac_cv_lib_ssl_SSL_CTX_new = yes; then
+ LIBS="-lssl ${LIBS}"
+ else
+@@ -12938,10 +14746,10 @@
+ LIBS="${LIBS} -lssl -lcrypto";;
+ esac
+
+-echo "$as_me:$LINENO: checking for openssl" >&5
+-echo $ECHO_N "checking for openssl... $ECHO_C" >&6
+-echo "$as_me:$LINENO: result: $with_openssl" >&5
+-echo "${ECHO_T}$with_openssl" >&6
++{ echo "$as_me:$LINENO: checking for openssl" >&5
++echo $ECHO_N "checking for openssl... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: result: $with_openssl" >&5
++echo "${ECHO_T}$with_openssl" >&6; }
+
+ if test "$with_openssl" != "no"; then
+
+@@ -12967,12 +14775,12 @@
+
+
+
+-# Check whether --with-egd-socket or --without-egd-socket was given.
++# Check whether --with-egd-socket was given.
+ if test "${with_egd_socket+set}" = set; then
+- withval="$with_egd_socket"
+- EGD_SOCKET="$withval"
++ withval=$with_egd_socket; EGD_SOCKET="$withval"
++
++fi
+
+-fi;
+ if test -n "$EGD_SOCKET" ; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -12982,11 +14790,11 @@
+ fi
+
+
+-# Check whether --with-zephyr or --without-zephyr was given.
++# Check whether --with-zephyr was given.
+ if test "${with_zephyr+set}" = set; then
+- withval="$with_zephyr"
+- with_zephyr="${withval}"
+-fi;
++ withval=$with_zephyr; with_zephyr="${withval}"
++fi
++
+ if test -z "$with_zephyr"; then
+ if test -f /usr/local/lib/libzephyr.a; then
+ with_zephyr="/usr/local"
+@@ -12998,8 +14806,8 @@
+ ZEPHYR_CPPFLAGS=""
+ case "$with_zephyr" in
+ no) true;;
+- ""|yes) echo "$as_me:$LINENO: checking for ZInitialize in -lzephyr" >&5
+-echo $ECHO_N "checking for ZInitialize in -lzephyr... $ECHO_C" >&6
++ ""|yes) { echo "$as_me:$LINENO: checking for ZInitialize in -lzephyr" >&5
++echo $ECHO_N "checking for ZInitialize in -lzephyr... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_zephyr_ZInitialize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -13012,40 +14820,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char ZInitialize ();
+ int
+ main ()
+ {
+-ZInitialize ();
++return ZInitialize ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -13054,14 +14874,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_zephyr_ZInitialize=no
++ ac_cv_lib_zephyr_ZInitialize=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitialize" >&5
+-echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitialize" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_zephyr_ZInitialize" >&5
++echo "${ECHO_T}$ac_cv_lib_zephyr_ZInitialize" >&6; }
+ if test $ac_cv_lib_zephyr_ZInitialize = yes; then
+ ZEPHYR_LIBS="-lzephyr"
+ else
+@@ -13086,13 +14907,13 @@
+ fi
+
+
+-# Check whether --with-pidfile or --without-pidfile was given.
++# Check whether --with-pidfile was given.
+ if test "${with_pidfile+set}" = set; then
+- withval="$with_pidfile"
+- MASTERPIDFILE="$withval"
++ withval=$with_pidfile; MASTERPIDFILE="$withval"
+ else
+ MASTERPIDFILE="/var/run/cyrus-master.pid"
+-fi;
++fi
++
+ MASTERPIDFILE="\"$MASTERPIDFILE\""
+
+ cat >>confdefs.h <<_ACEOF
+@@ -13100,30 +14921,30 @@
+ _ACEOF
+
+
+-# Check whether --enable-idled or --disable-idled was given.
++# Check whether --enable-idled was given.
+ if test "${enable_idled+set}" = set; then
+- enableval="$enable_idled"
+- if test "$enable_val" != no; then
++ enableval=$enable_idled; if test "$enable_val" != no; then
+ IMAP_PROGS="$IMAP_PROGS idled"
+ fi
+-fi;
++fi
++
+
+ ENABLE_NNTP=no
+-# Check whether --enable-nntp or --disable-nntp was given.
++# Check whether --enable-nntp was given.
+ if test "${enable_nntp+set}" = set; then
+- enableval="$enable_nntp"
+- ENABLE_NNTP=$enableval
++ enableval=$enable_nntp; ENABLE_NNTP=$enableval
+ if test "$ENABLE_NNTP" != no; then
+ IMAP_PROGS="$IMAP_PROGS nntpd fetchnews"
+ fi
+-fi;
++fi
++
+
+ ENABLE_MURDER=no
+-# Check whether --enable-murder or --disable-murder was given.
++# Check whether --enable-murder was given.
+ if test "${enable_murder+set}" = set; then
+- enableval="$enable_murder"
+- ENABLE_MURDER=$enableval
+-fi;
++ enableval=$enable_murder; ENABLE_MURDER=$enableval
++fi
++
+
+ if test "$ENABLE_MURDER" != no; then
+ IMAP_PROGS="$IMAP_PROGS mupdate"
+@@ -13132,18 +14953,19 @@
+ for ac_header in sys/sockio.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+- echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -13154,24 +14976,36 @@
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -13180,15 +15014,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -13197,8 +15032,13 @@
+ /* end confdefs.h. */
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -13222,9 +15062,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -13248,25 +15089,19 @@
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+
+ fi
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+@@ -13281,27 +15116,27 @@
+ fi
+
+ ENABLE_REPLICATION=no
+-# Check whether --enable-replication or --disable-replication was given.
++# Check whether --enable-replication was given.
+ if test "${enable_replication+set}" = set; then
+- enableval="$enable_replication"
+- ENABLE_REPLICATION=$enableval
++ enableval=$enable_replication; ENABLE_REPLICATION=$enableval
+ if test "$ENABLE_REPLICATION" != no; then
+ IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset make_md5"
+ fi
+-fi;
++fi
+
+
+
+
+-# Check whether --with-com_err or --without-com_err was given.
++
++# Check whether --with-com_err was given.
+ if test "${with_com_err+set}" = set; then
+- withval="$with_com_err"
++ withval=$with_com_err;
++fi
+
+-fi;
+ if test -z "$with_com_err"; then
+ # no value supplied
+- echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
+-echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
++echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_com_err_com_err+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -13314,40 +15149,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char com_err ();
+ int
+ main ()
+ {
+-com_err ();
++return com_err ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -13356,14 +15203,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_com_err_com_err=no
++ ac_cv_lib_com_err_com_err=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
+-echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
++echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
+ if test $ac_cv_lib_com_err_com_err = yes; then
+
+ # com_err is already in library path
+@@ -13371,17 +15219,17 @@
+ # can use system com_err
+ with_com_err=""
+ if test "${ac_cv_header_et_com_err_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for et/com_err.h" >&5
+-echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for et/com_err.h" >&5
++echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
+-echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking et/com_err.h usability" >&5
+-echo $ECHO_N "checking et/com_err.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking et/com_err.h usability" >&5
++echo $ECHO_N "checking et/com_err.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -13392,24 +15240,36 @@
+ #include <et/com_err.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -13418,15 +15278,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking et/com_err.h presence" >&5
+-echo $ECHO_N "checking et/com_err.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking et/com_err.h presence" >&5
++echo $ECHO_N "checking et/com_err.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -13435,8 +15296,13 @@
+ /* end confdefs.h. */
+ #include <et/com_err.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -13460,9 +15326,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -13486,25 +15353,18 @@
+ echo "$as_me: WARNING: et/com_err.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: et/com_err.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for et/com_err.h" >&5
+-echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for et/com_err.h" >&5
++echo $ECHO_N "checking for et/com_err.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_et_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_et_com_err_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
+-echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_et_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_et_com_err_h" >&6; }
+
+ fi
+ if test $ac_cv_header_et_com_err_h = yes; then
+@@ -13515,17 +15375,17 @@
+
+ else
+ if test "${ac_cv_header_com_err_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for com_err.h" >&5
+-echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for com_err.h" >&5
++echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+-echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_com_err_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking com_err.h usability" >&5
+-echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking com_err.h usability" >&5
++echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -13536,24 +15396,36 @@
+ #include <com_err.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -13562,15 +15434,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking com_err.h presence" >&5
+-echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking com_err.h presence" >&5
++echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -13579,8 +15452,13 @@
+ /* end confdefs.h. */
+ #include <com_err.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -13604,9 +15482,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -13630,25 +15509,18 @@
+ echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: com_err.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: com_err.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for com_err.h" >&5
+-echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for com_err.h" >&5
++echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_com_err_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_com_err_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+-echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
++echo "${ECHO_T}$ac_cv_header_com_err_h" >&6; }
+
+ fi
+ if test $ac_cv_header_com_err_h = yes; then
+@@ -13665,8 +15537,8 @@
+
+ # Extract the first word of "compile_et", so it can be a program name with args.
+ set dummy compile_et; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -13681,37 +15553,38 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+ esac
+ fi
+ COMPILE_ET=$ac_cv_path_COMPILE_ET
+-
+ if test -n "$COMPILE_ET"; then
+- echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+-echo "${ECHO_T}$COMPILE_ET" >&6
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
+
++
+ else
+
+ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then
+ with_com_err="/usr/local"
+ # Extract the first word of "/usr/local/bin/compile_et", so it can be a program name with args.
+ set dummy /usr/local/bin/compile_et; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -13726,34 +15599,35 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+ esac
+ fi
+ COMPILE_ET=$ac_cv_path_COMPILE_ET
+-
+ if test -n "$COMPILE_ET"; then
+- echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+-echo "${ECHO_T}$COMPILE_ET" >&6
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then
+ with_com_err="/usr"
+ # Extract the first word of "/usr/bin/compile_et", so it can be a program name with args.
+ set dummy /usr/bin/compile_et; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_path_COMPILE_ET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -13768,28 +15642,29 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et"
+ ;;
+ esac
+ fi
+ COMPILE_ET=$ac_cv_path_COMPILE_ET
+-
+ if test -n "$COMPILE_ET"; then
+- echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
+-echo "${ECHO_T}$COMPILE_ET" >&6
++ { echo "$as_me:$LINENO: result: $COMPILE_ET" >&5
++echo "${ECHO_T}$COMPILE_ET" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ else
+ # use ours
+ with_com_err=yes
+@@ -13844,8 +15719,8 @@
+
+
+
+-echo "$as_me:$LINENO: checking for modern syslog" >&5
+-echo $ECHO_N "checking for modern syslog... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for modern syslog" >&5
++echo $ECHO_N "checking for modern syslog... $ECHO_C" >&6; }
+ if test "${cyrus_cv_lib_syslog+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -13860,8 +15735,13 @@
+ #include </nonexistent>
+ #endif
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -13885,6 +15765,7 @@
+
+ cyrus_cv_lib_syslog=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+ fi
+
+@@ -13894,35 +15775,35 @@
+ DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a"
+ CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog"
+ fi
+-echo "$as_me:$LINENO: result: $cyrus_cv_lib_syslog" >&5
+-echo "${ECHO_T}$cyrus_cv_lib_syslog" >&6
++{ echo "$as_me:$LINENO: result: $cyrus_cv_lib_syslog" >&5
++echo "${ECHO_T}$cyrus_cv_lib_syslog" >&6; }
+
+-echo "$as_me:$LINENO: checking which syslog facility to use" >&5
+-echo $ECHO_N "checking which syslog facility to use... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking which syslog facility to use" >&5
++echo $ECHO_N "checking which syslog facility to use... $ECHO_C" >&6; }
+ SYSLOG_FACILITY=LOG_LOCAL6
+
+-# Check whether --with-syslogfacility or --without-syslogfacility was given.
++# Check whether --with-syslogfacility was given.
+ if test "${with_syslogfacility+set}" = set; then
+- withval="$with_syslogfacility"
+- if test "$withval" != "yes" -a "$withval" != "no" ; then
++ withval=$with_syslogfacility; if test "$withval" != "yes" -a "$withval" != "no" ; then
+ SYSLOG_FACILITY=LOG_$withval
+ fi;
+-fi;
++fi
++
+
+ cat >>confdefs.h <<_ACEOF
+ #define SYSLOG_FACILITY $SYSLOG_FACILITY
+ _ACEOF
+
+-echo "$as_me:$LINENO: result: $SYSLOG_FACILITY" >&5
+-echo "${ECHO_T}$SYSLOG_FACILITY" >&6
++{ echo "$as_me:$LINENO: result: $SYSLOG_FACILITY" >&5
++echo "${ECHO_T}$SYSLOG_FACILITY" >&6; }
+
+
+ for ac_func in getdtablesize
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -13948,53 +15829,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14003,88 +15890,88 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+ _ACEOF
+
+ else
+- case $LIBOBJS in
+- "$ac_func.$ac_objext" | \
+- *" $ac_func.$ac_objext" | \
+- "$ac_func.$ac_objext "* | \
++ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
++ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
++ ;;
+ esac
+
+ fi
+ done
+
+
+-# Check whether --enable-cmulocal or --disable-cmulocal was given.
++# Check whether --enable-cmulocal was given.
+ if test "${enable_cmulocal+set}" = set; then
+- enableval="$enable_cmulocal"
+- if test "$enableval" = yes; then
++ enableval=$enable_cmulocal; if test "$enableval" = yes; then
+ EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot"
+ EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile"
+ fi
+-fi;
++fi
+
+-echo "$as_me:$LINENO: checking to use old sieve service name" >&5
+-echo $ECHO_N "checking to use old sieve service name... $ECHO_C" >&6
+-# Check whether --enable-oldsievename or --disable-oldsievename was given.
++
++{ echo "$as_me:$LINENO: checking to use old sieve service name" >&5
++echo $ECHO_N "checking to use old sieve service name... $ECHO_C" >&6; }
++# Check whether --enable-oldsievename was given.
+ if test "${enable_oldsievename+set}" = set; then
+- enableval="$enable_oldsievename"
+- if test "$enableval" = yes; then
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++ enableval=$enable_oldsievename; if test "$enableval" = yes; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+
+ cat >>confdefs.h <<\_ACEOF
+ #define OLD_SIEVE_SERVICE_NAME
+ _ACEOF
+
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi;
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
+
+-# Check whether --enable-listext or --disable-listext was given.
++
++# Check whether --enable-listext was given.
+ if test "${enable_listext+set}" = set; then
+- enableval="$enable_listext"
+- if test "$enableval" = yes; then
++ enableval=$enable_listext; if test "$enableval" = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+ #define ENABLE_LISTEXT
+ _ACEOF
+
+ fi
+-fi;
++fi
+
+-# Check whether --enable-netscapehack or --disable-netscapehack was given.
++
++# Check whether --enable-netscapehack was given.
+ if test "${enable_netscapehack+set}" = set; then
+- enableval="$enable_netscapehack"
+- if test "$enableval" = yes; then
++ enableval=$enable_netscapehack; if test "$enableval" = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+ #define ENABLE_X_NETSCAPE_HACK
+ _ACEOF
+
+ fi
+-fi;
++fi
+
+-echo "$as_me:$LINENO: checking for dlopen" >&5
+-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
++
++{ echo "$as_me:$LINENO: checking for dlopen" >&5
++echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+ if test "${ac_cv_func_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -14111,53 +15998,59 @@
+
+ #undef dlopen
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char dlopen ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_dlopen) || defined (__stub___dlopen)
++#if defined __stub_dlopen || defined __stub___dlopen
+ choke me
+-#else
+-char (*f) () = dlopen;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != dlopen;
++return dlopen ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14166,19 +16059,20 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_dlopen=no
++ ac_cv_func_dlopen=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
++echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
+ if test $ac_cv_func_dlopen = yes; then
+ :
+ else
+
+-echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
++echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -14191,40 +16085,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char dlopen ();
+ int
+ main ()
+ {
+-dlopen ();
++return dlopen ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14233,14 +16139,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_dl_dlopen=no
++ ac_cv_lib_dl_dlopen=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
++echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+ if test $ac_cv_lib_dl_dlopen = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBDL 1
+@@ -14252,8 +16159,8 @@
+
+ fi
+
+-echo "$as_me:$LINENO: checking for crypt" >&5
+-echo $ECHO_N "checking for crypt... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for crypt" >&5
++echo $ECHO_N "checking for crypt... $ECHO_C" >&6; }
+ if test "${ac_cv_func_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -14280,53 +16187,59 @@
+
+ #undef crypt
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char crypt ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_crypt) || defined (__stub___crypt)
++#if defined __stub_crypt || defined __stub___crypt
+ choke me
+-#else
+-char (*f) () = crypt;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != crypt;
++return crypt ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14335,18 +16248,19 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_crypt=no
++ ac_cv_func_crypt=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
+-echo "${ECHO_T}$ac_cv_func_crypt" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
++echo "${ECHO_T}$ac_cv_func_crypt" >&6; }
+ if test $ac_cv_func_crypt = yes; then
+ cmu_have_crypt=yes
+ else
+- echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+-echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
++echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -14359,40 +16273,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char crypt ();
+ int
+ main ()
+ {
+-crypt ();
++return crypt ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14401,14 +16327,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_crypt_crypt=no
++ ac_cv_lib_crypt_crypt=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+-echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
++echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
+ if test $ac_cv_lib_crypt_crypt = yes; then
+ LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
+ else
+@@ -14421,21 +16348,21 @@
+
+
+
+-# Check whether --enable-gssapi or --disable-gssapi was given.
++# Check whether --enable-gssapi was given.
+ if test "${enable_gssapi+set}" = set; then
+- enableval="$enable_gssapi"
+- gssapi=$enableval
++ enableval=$enable_gssapi; gssapi=$enableval
+ else
+ gssapi=yes
+-fi;
++fi
+
+-# Check whether --with-gss_impl or --without-gss_impl was given.
++
++# Check whether --with-gss_impl was given.
+ if test "${with_gss_impl+set}" = set; then
+- withval="$with_gss_impl"
+- gss_impl=$withval
++ withval=$with_gss_impl; gss_impl=$withval
+ else
+ gss_impl=auto
+-fi;
++fi
++
+
+ if test "$gssapi" != no; then
+ platform=
+@@ -14488,17 +16415,17 @@
+ fi
+ fi
+ if test "${ac_cv_header_gssapi_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for gssapi.h" >&5
+-echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for gssapi.h" >&5
++echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
+-echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking gssapi.h usability" >&5
+-echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking gssapi.h usability" >&5
++echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -14509,24 +16436,36 @@
+ #include <gssapi.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14535,15 +16474,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking gssapi.h presence" >&5
+-echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking gssapi.h presence" >&5
++echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -14552,8 +16492,13 @@
+ /* end confdefs.h. */
+ #include <gssapi.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -14577,9 +16522,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -14603,25 +16549,18 @@
+ echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for gssapi.h" >&5
+-echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for gssapi.h" >&5
++echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_gssapi_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
+-echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
+
+ fi
+ if test $ac_cv_header_gssapi_h = yes; then
+@@ -14632,17 +16571,17 @@
+
+ else
+ if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
+-echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
++echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
+-echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
+-echo $ECHO_N "checking gssapi/gssapi.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
++echo $ECHO_N "checking gssapi/gssapi.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -14653,24 +16592,36 @@
+ #include <gssapi/gssapi.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14679,15 +16630,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
+-echo $ECHO_N "checking gssapi/gssapi.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
++echo $ECHO_N "checking gssapi/gssapi.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -14696,8 +16648,13 @@
+ /* end confdefs.h. */
+ #include <gssapi/gssapi.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -14721,9 +16678,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -14747,25 +16705,18 @@
+ echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
+-echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
++echo $ECHO_N "checking for gssapi/gssapi.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
+-echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
++echo "${ECHO_T}$ac_cv_header_gssapi_gssapi_h" >&6; }
+
+ fi
+ if test $ac_cv_header_gssapi_gssapi_h = yes; then
+@@ -14794,8 +16745,8 @@
+ # The choice is reflected in GSSAPIBASE_LIBS
+
+
+-echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+-echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -14808,40 +16759,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char res_search ();
+ int
+ main ()
+ {
+-res_search ();
++return res_search ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14850,14 +16813,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_resolv_res_search=no
++ ac_cv_lib_resolv_res_search=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+-echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
+ if test $ac_cv_lib_resolv_res_search = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBRESOLV 1
+@@ -14884,8 +16848,8 @@
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
+ gss_failed=0
+- echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
+-echo $ECHO_N "checking for gss_unwrap in -lgssapi... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgssapi... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -14898,40 +16862,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char gss_unwrap ();
+ int
+ main ()
+ {
+-gss_unwrap ();
++return gss_unwrap ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -14940,14 +16916,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_gssapi_gss_unwrap=no
++ ac_cv_lib_gssapi_gss_unwrap=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_gssapi_gss_unwrap" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gssapi_gss_unwrap" >&6; }
+ if test $ac_cv_lib_gssapi_gss_unwrap = yes; then
+ gss_impl="heimdal"
+ else
+@@ -14961,8 +16938,8 @@
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
+ # check for libkrb5support first
+- echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
+-echo $ECHO_N "checking for krb5int_getspecific in -lkrb5support... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
++echo $ECHO_N "checking for krb5int_getspecific in -lkrb5support... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -14975,40 +16952,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char krb5int_getspecific ();
+ int
+ main ()
+ {
+-krb5int_getspecific ();
++return krb5int_getspecific ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15017,22 +17006,23 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_krb5support_krb5int_getspecific=no
++ ac_cv_lib_krb5support_krb5int_getspecific=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
+-echo "${ECHO_T}$ac_cv_lib_krb5support_krb5int_getspecific" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
++echo "${ECHO_T}$ac_cv_lib_krb5support_krb5int_getspecific" >&6; }
+ if test $ac_cv_lib_krb5support_krb5int_getspecific = yes; then
+ K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
+ fi
+
+
+ gss_failed=0
+- echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
+-echo $ECHO_N "checking for gss_unwrap in -lgssapi_krb5... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgssapi_krb5... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -15045,40 +17035,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char gss_unwrap ();
+ int
+ main ()
+ {
+-gss_unwrap ();
++return gss_unwrap ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15087,14 +17089,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_gssapi_krb5_gss_unwrap=no
++ ac_cv_lib_gssapi_krb5_gss_unwrap=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; }
+ if test $ac_cv_lib_gssapi_krb5_gss_unwrap = yes; then
+ gss_impl="mit"
+ else
+@@ -15126,8 +17129,8 @@
+ # library (older CyberSafe)
+
+ unset ac_cv_lib_gss_csf_gss_acq_user
+- echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
+-echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
++echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -15140,40 +17143,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char csf_gss_acq_user ();
+ int
+ main ()
+ {
+-csf_gss_acq_user ();
++return csf_gss_acq_user ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15182,20 +17197,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_gss_csf_gss_acq_user=no
++ ac_cv_lib_gss_csf_gss_acq_user=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
+-echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
+ if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
+ gss_impl="cybersafe03"
+ else
+ unset ac_cv_lib_gss_csf_gss_acq_user;
+- echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
+-echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
++echo $ECHO_N "checking for csf_gss_acq_user in -lgss... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -15208,40 +17224,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char csf_gss_acq_user ();
+ int
+ main ()
+ {
+-csf_gss_acq_user ();
++return csf_gss_acq_user ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15250,14 +17278,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_gss_csf_gss_acq_user=no
++ ac_cv_lib_gss_csf_gss_acq_user=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
+-echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
+ if test $ac_cv_lib_gss_csf_gss_acq_user = yes; then
+ gss_impl="cybersafe"
+ else
+@@ -15280,8 +17309,8 @@
+
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
+ gss_failed=0
+- echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
+-echo $ECHO_N "checking for gss_unwrap in -lgss... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
++echo $ECHO_N "checking for gss_unwrap in -lgss... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -15294,40 +17323,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char gss_unwrap ();
+ int
+ main ()
+ {
+-gss_unwrap ();
++return gss_unwrap ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15336,14 +17377,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_gss_gss_unwrap=no
++ ac_cv_lib_gss_gss_unwrap=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_gss_gss_unwrap" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
++echo "${ECHO_T}$ac_cv_lib_gss_gss_unwrap" >&6; }
+ if test $ac_cv_lib_gss_gss_unwrap = yes; then
+ gss_impl="seam"
+ else
+@@ -15534,13 +17576,13 @@
+ fi
+
+ GSSAPI_LIBS=""
+-echo "$as_me:$LINENO: checking GSSAPI" >&5
+-echo $ECHO_N "checking GSSAPI... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking GSSAPI" >&5
++echo $ECHO_N "checking GSSAPI... $ECHO_C" >&6; }
+ if test "$gssapi" != no; then
+- echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
+-echo "${ECHO_T}with implementation ${gss_impl}" >&6
+- echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+-echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
++echo "${ECHO_T}with implementation ${gss_impl}" >&6; }
++ { echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
++echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -15553,40 +17595,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char res_search ();
+ int
+ main ()
+ {
+-res_search ();
++return res_search ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15595,14 +17649,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_resolv_res_search=no
++ ac_cv_lib_resolv_res_search=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+-echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
++echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6; }
+ if test $ac_cv_lib_resolv_res_search = yes; then
+ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
+ fi
+@@ -15617,9 +17672,9 @@
+ for ac_func in gsskrb5_register_acceptor_identity
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -15645,53 +17700,59 @@
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15700,13 +17761,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+@@ -15717,8 +17780,8 @@
+
+ LIBS="$cmu_save_LIBS"
+ else
+- echo "$as_me:$LINENO: result: disabled" >&5
+-echo "${ECHO_T}disabled" >&6
++ { echo "$as_me:$LINENO: result: disabled" >&5
++echo "${ECHO_T}disabled" >&6; }
+ fi
+
+
+@@ -15726,25 +17789,25 @@
+
+
+
+-# Check whether --with-sasl or --without-sasl was given.
++# Check whether --with-sasl was given.
+ if test "${with_sasl+set}" = set; then
+- withval="$with_sasl"
+- with_sasl="$withval"
++ withval=$with_sasl; with_sasl="$withval"
+ else
+ with_sasl="yes"
+-fi;
++fi
+
+
+-# Check whether --with-staticsasl or --without-staticsasl was given.
++
++# Check whether --with-staticsasl was given.
+ if test "${with_staticsasl+set}" = set; then
+- withval="$with_staticsasl"
+- with_staticsasl="$withval";
++ withval=$with_staticsasl; with_staticsasl="$withval";
+ if test $with_staticsasl != "no"; then
+ using_static_sasl="static"
+ fi
+ else
+ with_staticsasl="no"; using_static_sasl="no"
+-fi;
++fi
++
+
+ SASLFLAGS=""
+ LIB_SASL=""
+@@ -15772,17 +17835,17 @@
+ fi
+
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+-echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
+-echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
++echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -15793,24 +17856,36 @@
+ #include <sasl/sasl.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15819,15 +17894,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
+-echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
++echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -15836,8 +17912,13 @@
+ /* end confdefs.h. */
+ #include <sasl/sasl.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -15861,9 +17942,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -15887,40 +17969,33 @@
+ echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+-echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_sasl_sasl_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
+
+ fi
+ if test $ac_cv_header_sasl_sasl_h = yes; then
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+-echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
+-echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
++echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -15931,24 +18006,36 @@
+ #include <sasl/saslutil.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -15957,15 +18044,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
+-echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
++echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -15974,8 +18062,13 @@
+ /* end confdefs.h. */
+ #include <sasl/saslutil.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -15999,9 +18092,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -16025,39 +18119,32 @@
+ echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+-echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
+
+ fi
+ if test $ac_cv_header_sasl_saslutil_h = yes; then
+ for i42 in lib64 lib; do
+ if test -r ${with_staticsasl}/$i42/libsasl2.a; then
+ ac_cv_found_sasl=yes
+- echo "$as_me:$LINENO: checking for static libsasl" >&5
+-echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for static libsasl" >&5
++echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6; }
+ LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
+ fi
+ done
+ if test ! "$ac_cv_found_sasl" = "yes"; then
+- echo "$as_me:$LINENO: checking for static libsasl" >&5
+-echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for static libsasl" >&5
++echo $ECHO_N "checking for static libsasl... $ECHO_C" >&6; }
+ { { echo "$as_me:$LINENO: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&5
+ echo "$as_me: error: Could not find ${with_staticsasl}/lib*/libsasl2.a" >&2;}
+ { (exit 1); exit 1; }; }
+@@ -16069,8 +18156,8 @@
+
+
+
+- echo "$as_me:$LINENO: result: found" >&5
+-echo "${ECHO_T}found" >&6
++ { echo "$as_me:$LINENO: result: found" >&5
++echo "${ECHO_T}found" >&6; }
+
+ if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
+ LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
+@@ -16102,17 +18189,17 @@
+
+ # be sure to check for a SASLv2 specific function
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+-echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
+-echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sasl/sasl.h usability" >&5
++echo $ECHO_N "checking sasl/sasl.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -16123,24 +18210,36 @@
+ #include <sasl/sasl.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -16149,15 +18248,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
+-echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sasl/sasl.h presence" >&5
++echo $ECHO_N "checking sasl/sasl.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -16166,8 +18266,13 @@
+ /* end confdefs.h. */
+ #include <sasl/sasl.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -16191,9 +18296,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -16217,40 +18323,33 @@
+ echo "$as_me: WARNING: sasl/sasl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: sasl/sasl.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
+-echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sasl/sasl.h" >&5
++echo $ECHO_N "checking for sasl/sasl.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sasl_sasl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_sasl_sasl_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_sasl_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_sasl_h" >&6; }
+
+ fi
+ if test $ac_cv_header_sasl_sasl_h = yes; then
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+-echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
+-echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h usability" >&5
++echo $ECHO_N "checking sasl/saslutil.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -16261,24 +18360,36 @@
+ #include <sasl/saslutil.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -16287,15 +18398,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
+-echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sasl/saslutil.h presence" >&5
++echo $ECHO_N "checking sasl/saslutil.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -16304,8 +18416,13 @@
+ /* end confdefs.h. */
+ #include <sasl/saslutil.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -16329,9 +18446,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -16355,30 +18473,23 @@
+ echo "$as_me: WARNING: sasl/saslutil.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: sasl/saslutil.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
+-echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sasl/saslutil.h" >&5
++echo $ECHO_N "checking for sasl/saslutil.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sasl_saslutil_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_sasl_saslutil_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sasl_saslutil_h" >&5
++echo "${ECHO_T}$ac_cv_header_sasl_saslutil_h" >&6; }
+
+ fi
+ if test $ac_cv_header_sasl_saslutil_h = yes; then
+- echo "$as_me:$LINENO: checking for prop_get in -lsasl2" >&5
+-echo $ECHO_N "checking for prop_get in -lsasl2... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for prop_get in -lsasl2" >&5
++echo $ECHO_N "checking for prop_get in -lsasl2... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_sasl2_prop_get+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -16391,40 +18502,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char prop_get ();
+ int
+ main ()
+ {
+-prop_get ();
++return prop_get ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -16433,14 +18556,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_sasl2_prop_get=no
++ ac_cv_lib_sasl2_prop_get=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_prop_get" >&5
+-echo "${ECHO_T}$ac_cv_lib_sasl2_prop_get" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_prop_get" >&5
++echo "${ECHO_T}$ac_cv_lib_sasl2_prop_get" >&6; }
+ if test $ac_cv_lib_sasl2_prop_get = yes; then
+ ac_cv_found_sasl=yes
+ else
+@@ -16531,8 +18655,13 @@
+ #endif
+
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -16558,6 +18687,7 @@
+ echo "$as_me: error: Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+ CPPFLAGS=$cmu_saved_CPPFLAGS
+@@ -16568,8 +18698,8 @@
+
+ LDFLAGS="$LDFLAGS $LIB_SASL"
+
+-echo "$as_me:$LINENO: checking for sasl_checkapop in -lsasl2" >&5
+-echo $ECHO_N "checking for sasl_checkapop in -lsasl2... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sasl_checkapop in -lsasl2" >&5
++echo $ECHO_N "checking for sasl_checkapop in -lsasl2... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_sasl2_sasl_checkapop+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -16582,40 +18712,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char sasl_checkapop ();
+ int
+ main ()
+ {
+-sasl_checkapop ();
++return sasl_checkapop ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -16624,14 +18766,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_sasl2_sasl_checkapop=no
++ ac_cv_lib_sasl2_sasl_checkapop=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_checkapop" >&5
+-echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_checkapop" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_checkapop" >&5
++echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_checkapop" >&6; }
+ if test $ac_cv_lib_sasl2_sasl_checkapop = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -16649,13 +18792,13 @@
+
+
+
+-# Check whether --with-perl or --without-perl was given.
++# Check whether --with-perl was given.
+ if test "${with_perl+set}" = set; then
+- withval="$with_perl"
+- with_perl="$withval"
++ withval=$with_perl; with_perl="$withval"
+ else
+ with_perl="perl"
+-fi;
++fi
++
+
+ if test "${with_perl}" = yes; then
+ with_perl="perl"
+@@ -16670,8 +18813,8 @@
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_PERL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -16684,25 +18827,27 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PERL="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ PERL=$ac_cv_prog_PERL
+ if test -n "$PERL"; then
+- echo "$as_me:$LINENO: result: $PERL" >&5
+-echo "${ECHO_T}$PERL" >&6
++ { echo "$as_me:$LINENO: result: $PERL" >&5
++echo "${ECHO_T}$PERL" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$PERL" && break
+ done
+ test -n "$PERL" || PERL="with_perl=notfound"
+@@ -16731,8 +18876,8 @@
+ PERL_DEPSUBDIRS="none"
+ fi
+
+-echo "$as_me:$LINENO: checking for MD5Init" >&5
+-echo $ECHO_N "checking for MD5Init... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for MD5Init" >&5
++echo $ECHO_N "checking for MD5Init... $ECHO_C" >&6; }
+ if test "${ac_cv_func_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -16759,53 +18904,59 @@
+
+ #undef MD5Init
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char MD5Init ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_MD5Init) || defined (__stub___MD5Init)
++#if defined __stub_MD5Init || defined __stub___MD5Init
+ choke me
+-#else
+-char (*f) () = MD5Init;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != MD5Init;
++return MD5Init ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -16814,18 +18965,19 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_func_MD5Init=no
++ ac_cv_func_MD5Init=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_MD5Init" >&5
+-echo "${ECHO_T}$ac_cv_func_MD5Init" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_func_MD5Init" >&5
++echo "${ECHO_T}$ac_cv_func_MD5Init" >&6; }
+ if test $ac_cv_func_MD5Init = yes; then
+ :
+ else
+- echo "$as_me:$LINENO: checking for MD5Init in -lmd" >&5
+-echo $ECHO_N "checking for MD5Init in -lmd... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for MD5Init in -lmd" >&5
++echo $ECHO_N "checking for MD5Init in -lmd... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_md_MD5Init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -16838,40 +18990,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char MD5Init ();
+ int
+ main ()
+ {
+-MD5Init ();
++return MD5Init ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -16880,14 +19044,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_md_MD5Init=no
++ ac_cv_lib_md_MD5Init=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Init" >&5
+-echo "${ECHO_T}$ac_cv_lib_md_MD5Init" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Init" >&5
++echo "${ECHO_T}$ac_cv_lib_md_MD5Init" >&6; }
+ if test $ac_cv_lib_md_MD5Init = yes; then
+ LIBS="${LIBS} -lmd"
+ else
+@@ -16902,13 +19067,13 @@
+
+
+
+-# Check whether --with-lib-subdir or --without-lib-subdir was given.
++# Check whether --with-lib-subdir was given.
+ if test "${with_lib_subdir+set}" = set; then
+- withval="$with_lib_subdir"
++ withval=$with_lib_subdir;
++fi
+
+-fi;
+-echo "$as_me:$LINENO: checking for long" >&5
+-echo $ECHO_N "checking for long... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for long" >&5
++echo $ECHO_N "checking for long... $ECHO_C" >&6; }
+ if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -16919,36 +19084,49 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++typedef long ac__type_new_;
+ int
+ main ()
+ {
+-if ((long *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (long))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -16957,20 +19135,21 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_long=no
++ ac_cv_type_long=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+-echo "${ECHO_T}$ac_cv_type_long" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
++echo "${ECHO_T}$ac_cv_type_long" >&6; }
+
+-echo "$as_me:$LINENO: checking size of long" >&5
+-echo $ECHO_N "checking size of long... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking size of long" >&5
++echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
+ if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test "$ac_cv_type_long" = yes; then
+- # The cast to unsigned long works around a bug in the HP C Compiler
++ # The cast to long int works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+@@ -16983,10 +19162,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+ test_array [0] = 0
+
+ ;
+@@ -16994,24 +19174,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17024,10 +19216,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -17035,24 +19228,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17061,30 +19266,32 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo=`expr $ac_mid + 1`
+- if test $ac_lo -le $ac_mid; then
+- ac_lo= ac_hi=
+- break
+- fi
+- ac_mid=`expr 2 '*' $ac_mid + 1`
++ ac_lo=`expr $ac_mid + 1`
++ if test $ac_lo -le $ac_mid; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid + 1`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+ test_array [0] = 0
+
+ ;
+@@ -17092,24 +19299,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17122,10 +19341,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -17133,24 +19353,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17159,24 +19391,27 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_hi=`expr '(' $ac_mid ')' - 1`
+- if test $ac_mid -le $ac_hi; then
+- ac_lo= ac_hi=
+- break
+- fi
+- ac_mid=`expr 2 '*' $ac_mid`
++ ac_hi=`expr '(' $ac_mid ')' - 1`
++ if test $ac_mid -le $ac_hi; then
++ ac_lo= ac_hi=
++ break
++ fi
++ ac_mid=`expr 2 '*' $ac_mid`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo= ac_hi=
++ ac_lo= ac_hi=
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Binary search between lo and hi bounds.
+ while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+@@ -17187,10 +19422,11 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++ typedef long ac__type_sizeof_;
+ int
+ main ()
+ {
+-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
++static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+ test_array [0] = 0
+
+ ;
+@@ -17198,24 +19434,36 @@
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17224,26 +19472,20 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_lo=`expr '(' $ac_mid ')' + 1`
++ ac_lo=`expr '(' $ac_mid ')' + 1`
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ case $ac_lo in
+ ?*) ac_cv_sizeof_long=$ac_lo;;
+-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute sizeof (long), 77
++echo "$as_me: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; } ;;
++ { (exit 77); exit 77; }; } ;;
+ esac
+ else
+- if test "$cross_compiling" = yes; then
+- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-else
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -17251,8 +19493,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
+-long longval () { return (long) (sizeof (long)); }
+-unsigned long ulongval () { return (long) (sizeof (long)); }
++ typedef long ac__type_sizeof_;
++static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
++static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+ #include <stdio.h>
+ #include <stdlib.h>
+ int
+@@ -17261,35 +19504,44 @@
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+- exit (1);
+- if (((long) (sizeof (long))) < 0)
++ return 1;
++ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+- long i = longval ();
+- if (i != ((long) (sizeof (long))))
+- exit (1);
++ long int i = longval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+- unsigned long i = ulongval ();
+- if (i != ((long) (sizeof (long))))
+- exit (1);
++ unsigned long int i = ulongval ();
++ if (i != ((long int) (sizeof (ac__type_sizeof_))))
++ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+- exit (ferror (f) || fclose (f) != 0);
++ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17300,29 +19552,28 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ ( exit $ac_status )
+-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot compute sizeof (long), 77
++echo "$as_me: error: cannot compute sizeof (long)
+ See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++ { (exit 77); exit 77; }; }
+ fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ rm -f conftest.val
+ else
+ ac_cv_sizeof_long=0
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+-echo "${ECHO_T}$ac_cv_sizeof_long" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
++echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
+ cat >>confdefs.h <<_ACEOF
+ #define SIZEOF_LONG $ac_cv_sizeof_long
+ _ACEOF
+
+
+-echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
+-echo $ECHO_N "checking what directory libraries are found in... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
++echo $ECHO_N "checking what directory libraries are found in... $ECHO_C" >&6; }
+ if test "${ac_cv_cmu_lib_subdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -17340,8 +19591,8 @@
+ ac_cv_cmu_lib_subdir=$with_lib_subdir
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
+-echo "${ECHO_T}$ac_cv_cmu_lib_subdir" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
++echo "${ECHO_T}$ac_cv_cmu_lib_subdir" >&6; }
+ CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
+
+
+@@ -17349,21 +19600,21 @@
+
+
+
+-# Check whether --with-libwrap or --without-libwrap was given.
++# Check whether --with-libwrap was given.
+ if test "${with_libwrap+set}" = set; then
+- withval="$with_libwrap"
+- with_libwrap=$withval
++ withval=$with_libwrap; with_libwrap=$withval
+ else
+ with_libwrap=yes
+-fi;
++fi
++
+ if test "$with_libwrap" != no; then
+ if test -d "$with_libwrap"; then
+ CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
+ LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+- echo "$as_me:$LINENO: checking for request_init in -lwrap" >&5
+-echo $ECHO_N "checking for request_init in -lwrap... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for request_init in -lwrap" >&5
++echo $ECHO_N "checking for request_init in -lwrap... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_wrap_request_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -17376,40 +19627,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char request_init ();
+ int
+ main ()
+ {
+-request_init ();
++return request_init ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17418,28 +19681,29 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_wrap_request_init=no
++ ac_cv_lib_wrap_request_init=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_request_init" >&5
+-echo "${ECHO_T}$ac_cv_lib_wrap_request_init" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_request_init" >&5
++echo "${ECHO_T}$ac_cv_lib_wrap_request_init" >&6; }
+ if test $ac_cv_lib_wrap_request_init = yes; then
+
+ if test "${ac_cv_header_tcpd_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for tcpd.h" >&5
+-echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for tcpd.h" >&5
++echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
+-echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
++echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking tcpd.h usability" >&5
+-echo $ECHO_N "checking tcpd.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking tcpd.h usability" >&5
++echo $ECHO_N "checking tcpd.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -17450,24 +19714,36 @@
+ #include <tcpd.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17476,15 +19752,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking tcpd.h presence" >&5
+-echo $ECHO_N "checking tcpd.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking tcpd.h presence" >&5
++echo $ECHO_N "checking tcpd.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -17493,8 +19770,13 @@
+ /* end confdefs.h. */
+ #include <tcpd.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -17518,9 +19800,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -17544,25 +19827,18 @@
+ echo "$as_me: WARNING: tcpd.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: tcpd.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: tcpd.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for tcpd.h" >&5
+-echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for tcpd.h" >&5
++echo $ECHO_N "checking for tcpd.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_tcpd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_tcpd_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
+-echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5
++echo "${ECHO_T}$ac_cv_header_tcpd_h" >&6; }
+
+ fi
+ if test $ac_cv_header_tcpd_h = yes; then
+@@ -17578,10 +19854,10 @@
+
+ LIBS="$cmu_save_LIBS"
+ fi
+- echo "$as_me:$LINENO: checking libwrap support" >&5
+-echo $ECHO_N "checking libwrap support... $ECHO_C" >&6
+- echo "$as_me:$LINENO: result: $with_libwrap" >&5
+-echo "${ECHO_T}$with_libwrap" >&6
++ { echo "$as_me:$LINENO: checking libwrap support" >&5
++echo $ECHO_N "checking libwrap support... $ECHO_C" >&6; }
++ { echo "$as_me:$LINENO: result: $with_libwrap" >&5
++echo "${ECHO_T}$with_libwrap" >&6; }
+ LIB_WRAP=""
+ if test "$with_libwrap" != no; then
+
+@@ -17590,8 +19866,8 @@
+ _ACEOF
+
+ LIB_WRAP="-lwrap"
+- echo "$as_me:$LINENO: checking for yp_get_default_domain in -lnsl" >&5
+-echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for yp_get_default_domain in -lnsl" >&5
++echo $ECHO_N "checking for yp_get_default_domain in -lnsl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_nsl_yp_get_default_domain+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -17604,40 +19880,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char yp_get_default_domain ();
+ int
+ main ()
+ {
+-yp_get_default_domain ();
++return yp_get_default_domain ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17646,14 +19934,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_nsl_yp_get_default_domain=no
++ ac_cv_lib_nsl_yp_get_default_domain=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
+-echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_get_default_domain" >&5
++echo "${ECHO_T}$ac_cv_lib_nsl_yp_get_default_domain" >&6; }
+ if test $ac_cv_lib_nsl_yp_get_default_domain = yes; then
+ LIB_WRAP="${LIB_WRAP} -lnsl"
+ fi
+@@ -17665,28 +19954,28 @@
+
+
+
+-# Check whether --with-snmp or --without-snmp was given.
++# Check whether --with-snmp was given.
+ if test "${with_snmp+set}" = set; then
+- withval="$with_snmp"
+- with_snmp=$withval
++ withval=$with_snmp; with_snmp=$withval
+ else
+ with_snmp=yes
+-fi;
++fi
+
+
+-# Check whether --with-ucdsnmp or --without-ucdsnmp was given.
++
++# Check whether --with-ucdsnmp was given.
+ if test "${with_ucdsnmp+set}" = set; then
+- withval="$with_ucdsnmp"
+- with_snmp=$withval
+-fi;
++ withval=$with_ucdsnmp; with_snmp=$withval
++fi
++
+
+ if test "$with_snmp" != "no"; then
+
+ if test "$with_snmp" = "yes"; then
+ # Extract the first word of "net-snmp-config", so it can be a program name with args.
+ set dummy net-snmp-config; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_path_SNMP_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -17702,34 +19991,35 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ ;;
+ esac
+ fi
+ SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG
+-
+ if test -n "$SNMP_CONFIG"; then
+- echo "$as_me:$LINENO: result: $SNMP_CONFIG" >&5
+-echo "${ECHO_T}$SNMP_CONFIG" >&6
++ { echo "$as_me:$LINENO: result: $SNMP_CONFIG" >&5
++echo "${ECHO_T}$SNMP_CONFIG" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ else
+ SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
+ fi
+
+ if test -x "$SNMP_CONFIG"; then
+- echo "$as_me:$LINENO: checking NET SNMP libraries" >&5
+-echo $ECHO_N "checking NET SNMP libraries... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking NET SNMP libraries" >&5
++echo $ECHO_N "checking NET SNMP libraries... $ECHO_C" >&6; }
+
+ SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
+ SNMP_PREFIX=`$SNMP_CONFIG --prefix`
+@@ -17743,11 +20033,11 @@
+ _ACEOF
+
+
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ { echo "$as_me:$LINENO: WARNING: Could not find the required paths. Please check your net-snmp installation." >&5
+ echo "$as_me: WARNING: Could not find the required paths. Please check your net-snmp installation." >&2;}
+ fi
+@@ -17758,8 +20048,8 @@
+ LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
+ fi
+ cmu_save_LIBS="$LIBS"
+- echo "$as_me:$LINENO: checking for sprint_objid in -lsnmp" >&5
+-echo $ECHO_N "checking for sprint_objid in -lsnmp... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sprint_objid in -lsnmp" >&5
++echo $ECHO_N "checking for sprint_objid in -lsnmp... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_snmp_sprint_objid+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -17772,40 +20062,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char sprint_objid ();
+ int
+ main ()
+ {
+-sprint_objid ();
++return sprint_objid ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17814,28 +20116,29 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_snmp_sprint_objid=no
++ ac_cv_lib_snmp_sprint_objid=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_sprint_objid" >&5
+-echo "${ECHO_T}$ac_cv_lib_snmp_sprint_objid" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_sprint_objid" >&5
++echo "${ECHO_T}$ac_cv_lib_snmp_sprint_objid" >&6; }
+ if test $ac_cv_lib_snmp_sprint_objid = yes; then
+
+ if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
+-echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
++echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
+-echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
++echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking ucd-snmp/version.h usability" >&5
+-echo $ECHO_N "checking ucd-snmp/version.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking ucd-snmp/version.h usability" >&5
++echo $ECHO_N "checking ucd-snmp/version.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -17846,24 +20149,36 @@
+ #include <ucd-snmp/version.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -17872,15 +20187,16 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking ucd-snmp/version.h presence" >&5
+-echo $ECHO_N "checking ucd-snmp/version.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking ucd-snmp/version.h presence" >&5
++echo $ECHO_N "checking ucd-snmp/version.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -17889,8 +20205,13 @@
+ /* end confdefs.h. */
+ #include <ucd-snmp/version.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -17914,9 +20235,10 @@
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -17940,25 +20262,18 @@
+ echo "$as_me: WARNING: ucd-snmp/version.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: ucd-snmp/version.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists. ##
+-## ------------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
+-echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for ucd-snmp/version.h" >&5
++echo $ECHO_N "checking for ucd-snmp/version.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_ucd_snmp_version_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_ucd_snmp_version_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
+-echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_ucd_snmp_version_h" >&5
++echo "${ECHO_T}$ac_cv_header_ucd_snmp_version_h" >&6; }
+
+ fi
+ if test $ac_cv_header_ucd_snmp_version_h = yes; then
+@@ -17974,10 +20289,10 @@
+
+ LIBS="$cmu_save_LIBS"
+ fi
+- echo "$as_me:$LINENO: checking UCD SNMP libraries" >&5
+-echo $ECHO_N "checking UCD SNMP libraries... $ECHO_C" >&6
+- echo "$as_me:$LINENO: result: $with_snmp" >&5
+-echo "${ECHO_T}$with_snmp" >&6
++ { echo "$as_me:$LINENO: checking UCD SNMP libraries" >&5
++echo $ECHO_N "checking UCD SNMP libraries... $ECHO_C" >&6; }
++ { echo "$as_me:$LINENO: result: $with_snmp" >&5
++echo "${ECHO_T}$with_snmp" >&6; }
+ LIB_UCDSNMP=""
+ if test "$with_snmp" != no; then
+
+@@ -17986,8 +20301,8 @@
+ _ACEOF
+
+ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
+- echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpm" >&5
+-echo $ECHO_N "checking for rpmdbOpen in -lrpm... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpm" >&5
++echo $ECHO_N "checking for rpmdbOpen in -lrpm... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_rpm_rpmdbOpen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -18000,40 +20315,52 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char rpmdbOpen ();
+ int
+ main ()
+ {
+-rpmdbOpen ();
++return rpmdbOpen ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -18042,14 +20369,15 @@
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_rpm_rpmdbOpen=no
++ ac_cv_lib_rpm_rpmdbOpen=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbOpen" >&5
+-echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbOpen" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmdbOpen" >&5
++echo "${ECHO_T}$ac_cv_lib_rpm_rpmdbOpen" >&6; }
+ if test $ac_cv_lib_rpm_rpmdbOpen = yes; then
+ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt"
+ fi
+@@ -18108,7 +20436,8 @@
+
+
+
+- ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
++ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile"
++
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+@@ -18127,39 +20456,58 @@
+
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+-# So, don't put newlines in cache variables' values.
++# So, we kill variables containing newlines.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+-{
++(
++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ *) $as_unset $ac_var ;;
++ esac ;;
++ esac
++ done
++
+ (set) 2>&1 |
+- case `(ac_space=' '; set | grep ac_space) 2>&1` in
+- *ac_space=\ *)
++ case $as_nl`(ac_space=' '; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+- ;;
++ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+- sed -n \
+- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+- esac;
+-} |
++ esac |
++ sort
++) |
+ sed '
++ /^ac_cv_env_/b end
+ t clear
+- : clear
++ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+- : end' >>confcache
+-if diff $cache_file confcache >/dev/null 2>&1; then :; else
+- if test -w $cache_file; then
+- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++ :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++ if test -w "$cache_file"; then
++ test "x$cache_file" != "x/dev/null" &&
++ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
++echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+- echo "not updating unwritable cache $cache_file"
++ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
++echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+ fi
+ rm -f confcache
+@@ -18168,32 +20516,18 @@
+ # Let make expand exec_prefix.
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+-# VPATH may cause trouble with some makes, so we remove $(srcdir),
+-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+-# trailing colons and then remove the whole line if VPATH becomes empty
+-# (actually we leave an empty line to preserve line numbers).
+-if test "x$srcdir" = x.; then
+- ac_vpsub='/^[ ]*VPATH[ ]*=/{
+-s/:*\$(srcdir):*/:/;
+-s/:*\${srcdir}:*/:/;
+-s/:*@srcdir@:*/:/;
+-s/^\([^=]*=[ ]*\):*/\1/;
+-s/:*$//;
+-s/^[^=]*=[ ]*$//;
+-}'
+-fi
+-
+ DEFS=-DHAVE_CONFIG_H
+
+ ac_libobjs=
+ ac_ltlibobjs=
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+- ac_i=`echo "$ac_i" |
+- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+- # 2. Add them.
+- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
++ ac_i=`echo "$ac_i" | sed "$ac_script"`
++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
++ # will be set to the directory where LIBOBJS objects are built.
++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+ done
+ LIBOBJS=$ac_libobjs
+
+@@ -18231,11 +20565,35 @@
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+- set -o posix
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
+ DUALCASE=1; export DUALCASE # for MKS sh
+
++
++# PATH needs CR
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
+ # Support unset when possible.
+ if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+@@ -18244,8 +20602,43 @@
+ fi
+
+
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++as_nl='
++'
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ { (exit 1); exit 1; }
++fi
++
+ # Work around bugs in pre-3.0 UWIN ksh.
+-$as_unset ENV MAIL MAILPATH
++for as_var in ENV MAIL MAILPATH
++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++done
+ PS1='$ '
+ PS2='> '
+ PS4='+ '
+@@ -18259,18 +20652,19 @@
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+- $as_unset $as_var
++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+ done
+
+ # Required to use basename.
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+ else
+ as_basename=false
+@@ -18278,159 +20672,120 @@
+
+
+ # Name of the executable.
+-as_me=`$as_basename "$0" ||
++as_me=`$as_basename -- "$0" ||
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+- X"$0" : 'X\(/\)$' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X/"$0" |
+- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+- /^X\/\(\/\/\)$/{ s//\1/; q; }
+- /^X\/\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+-
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+
+-# PATH needs CR, and LINENO needs CR and PATH.
+-# Avoid depending upon Character Ranges.
+-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+-as_cr_digits='0123456789'
+-as_cr_alnum=$as_cr_Letters$as_cr_digits
++# CDPATH.
++$as_unset CDPATH
+
+-# The user is always right.
+-if test "${PATH_SEPARATOR+set}" != set; then
+- echo "#! /bin/sh" >conf$$.sh
+- echo "exit 0" >>conf$$.sh
+- chmod +x conf$$.sh
+- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+- PATH_SEPARATOR=';'
+- else
+- PATH_SEPARATOR=:
+- fi
+- rm -f conf$$.sh
+-fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+- test "x$as_lineno_3" = "x$as_lineno_2" || {
+- # Find who we are. Look in the path if we contain no path at all
+- # relative or not.
+- case $0 in
+- *[\\/]* ) as_myself=$0 ;;
+- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+-done
+-
+- ;;
+- esac
+- # We did not find ourselves, most probably we were run as `sh COMMAND'
+- # in which case we are not to be found in the path.
+- if test "x$as_myself" = x; then
+- as_myself=$0
+- fi
+- if test ! -f "$as_myself"; then
+- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+- { (exit 1); exit 1; }; }
+- fi
+- case $CONFIG_SHELL in
+- '')
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for as_base in sh bash ksh sh5; do
+- case $as_dir in
+- /*)
+- if ("$as_dir/$as_base" -c '
+- as_lineno_1=$LINENO
+- as_lineno_2=$LINENO
+- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+- test "x$as_lineno_1" != "x$as_lineno_2" &&
+- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+- CONFIG_SHELL=$as_dir/$as_base
+- export CONFIG_SHELL
+- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+- fi;;
+- esac
+- done
+-done
+-;;
+- esac
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+- # line-number line before each line; the second 'sed' does the real
+- # work. The second script uses 'N' to pair each line-number line
+- # with the numbered line, and appends trailing '-' during
+- # substitution so that $LINENO is not a special case at line end.
++ # line-number line after each line using $LINENO; the second 'sed'
++ # does the real work. The second script uses 'N' to pair each
++ # line-number line with the line containing $LINENO, and appends
++ # trailing '-' during substitution so that $LINENO is not a special
++ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+- sed '=' <$as_myself |
++ # scripts with optimization help from Paolo Bonzini. Blame Lee
++ # E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
+ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
+ N
+- s,$,-,
+- : loop
+- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+- s,-$,,
+- s,^['$as_cr_digits']*\n,,
++ s/-\n.*//
+ ' >$as_me.lineno &&
+- chmod +x $as_me.lineno ||
+- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
++ chmod +x "$as_me.lineno" ||
++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+- # original and so on. Autoconf is especially sensible to this).
+- . ./$as_me.lineno
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+ }
+
+
+-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+- *c*,-n*) ECHO_N= ECHO_C='
+-' ECHO_T=' ' ;;
+- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in
++-n*)
++ case `echo 'x\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ *) ECHO_C='\c';;
++ esac;;
++*)
++ ECHO_N='-n';;
+ esac
+
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+ rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir
++fi
+ echo >conf$$.file
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+- # We could just check for DJGPP; but this test a) works b) is more generic
+- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+- if test -f conf$$.exe; then
+- # Don't use ln at all; we don't have any links
++ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+- else
+- as_ln_s='ln -s'
+- fi
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+-rm -f conf$$ conf$$.exe conf$$.file
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
+
+ if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+@@ -18439,7 +20794,19 @@
+ as_mkdir_p=false
+ fi
+
+-as_executable_p="test -f"
++# Find out whether ``test -x'' works. Don't use a zero-byte file, as
++# systems may use methods other than mode bits to determine executability.
++cat >conf$$.file <<_ASEOF
++#! /bin/sh
++exit 0
++_ASEOF
++chmod +x conf$$.file
++if test -x conf$$.file >/dev/null 2>&1; then
++ as_executable_p="test -x"
++else
++ as_executable_p=:
++fi
++rm -f conf$$.file
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -18448,31 +20815,14 @@
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+-# IFS
+-# We need space, tab and new line, in precisely that order.
+-as_nl='
+-'
+-IFS=" $as_nl"
+-
+-# CDPATH.
+-$as_unset CDPATH
+-
+ exec 6>&1
+
+-# Open the log real soon, to keep \$[0] and so on meaningful, and to
++# Save the log message, to keep $[0] and so on meaningful, and to
+ # report actual input values of CONFIG_FILES etc. instead of their
+-# values after options handling. Logging --version etc. is OK.
+-exec 5>>config.log
+-{
+- echo
+- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+-## Running $as_me. ##
+-_ASBOX
+-} >&5
+-cat >&5 <<_CSEOF
+-
++# values after options handling.
++ac_log="
+ This file was extended by $as_me, which was
+-generated by GNU Autoconf 2.59. Invocation command line was
++generated by GNU Autoconf 2.60. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+@@ -18480,30 +20830,19 @@
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+-_CSEOF
+-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+-echo >&5
++on `(hostname || uname -n) 2>/dev/null | sed 1q`
++"
++
+ _ACEOF
+
++cat >>$CONFIG_STATUS <<_ACEOF
+ # Files that config.status was made for.
+-if test -n "$ac_config_files"; then
+- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+-fi
+-
+-if test -n "$ac_config_headers"; then
+- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+-fi
+-
+-if test -n "$ac_config_links"; then
+- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+-fi
++config_files="$ac_config_files"
++config_headers="$ac_config_headers"
+
+-if test -n "$ac_config_commands"; then
+- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+-fi
++_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+-
+ ac_cs_usage="\
+ \`$as_me' instantiates files from templates according to the
+ current configuration.
+@@ -18527,19 +20866,21 @@
+ $config_headers
+
+ Report bugs to <bug-autoconf at gnu.org>."
+-_ACEOF
+
++_ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ ac_cs_version="\\
+ config.status
+-configured by $0, generated by GNU Autoconf 2.59,
+- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
++configured by $0, generated by GNU Autoconf 2.60,
++ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+-Copyright (C) 2003 Free Software Foundation, Inc.
++Copyright (C) 2006 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+-srcdir=$srcdir
+-INSTALL="$INSTALL"
++
++ac_pwd='$ac_pwd'
++srcdir='$srcdir'
++INSTALL='$INSTALL'
+ _ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+@@ -18550,39 +20891,24 @@
+ do
+ case $1 in
+ --*=*)
+- ac_option=`expr "x$1" : 'x\([^=]*\)='`
+- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
++ ac_option=`expr "X$1" : 'X\([^=]*\)='`
++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+- -*)
++ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+- *) # This is not an option, so the user has probably given explicit
+- # arguments.
+- ac_option=$1
+- ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+-_ACEOF
+-cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+- --version | --vers* | -V )
+- echo "$ac_cs_version"; exit 0 ;;
+- --he | --h)
+- # Conflict between --help and --header
+- { { echo "$as_me:$LINENO: error: ambiguous option: $1
+-Try \`$0 --help' for more information." >&5
+-echo "$as_me: error: ambiguous option: $1
+-Try \`$0 --help' for more information." >&2;}
+- { (exit 1); exit 1; }; };;
+- --help | --hel | -h )
+- echo "$ac_cs_usage"; exit 0 ;;
+- --debug | --d* | -d )
++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
++ echo "$ac_cs_version"; exit ;;
++ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+@@ -18592,18 +20918,24 @@
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
++ --he | --h)
++ # Conflict between --help and --header
++ { echo "$as_me: error: ambiguous option: $1
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; };;
++ --help | --hel | -h )
++ echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+-Try \`$0 --help' for more information." >&5
+-echo "$as_me: error: unrecognized option: $1
+-Try \`$0 --help' for more information." >&2;}
++ -*) { echo "$as_me: error: unrecognized option: $1
++Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+- *) ac_config_targets="$ac_config_targets $1" ;;
++ *) ac_config_targets="$ac_config_targets $1"
++ ac_need_defaults=false ;;
+
+ esac
+ shift
+@@ -18619,37 +20951,51 @@
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ if \$ac_cs_recheck; then
+- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
++ CONFIG_SHELL=$SHELL
++ export CONFIG_SHELL
++ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ fi
+
+ _ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++exec 5>>config.log
++{
++ echo
++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
++## Running $as_me. ##
++_ASBOX
++ echo "$ac_log"
++} >&5
+
+-
+-
+-
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
++
++# Handling of arguments.
+ for ac_config_target in $ac_config_targets
+ do
+- case "$ac_config_target" in
+- # Handling of arguments.
+- "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+- "master/Makefile" ) CONFIG_FILES="$CONFIG_FILES master/Makefile" ;;
+- "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+- "imap/Makefile" ) CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;;
+- "imtest/Makefile" ) CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;;
+- "netnews/Makefile" ) CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;;
+- "perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;;
+- "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
+- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ case $ac_config_target in
++ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
++ "master/Makefile") CONFIG_FILES="$CONFIG_FILES master/Makefile" ;;
++ "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
++ "imap/Makefile") CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;;
++ "imtest/Makefile") CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;;
++ "netnews/Makefile") CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;;
++ "perl/Makefile") CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;;
++ "$EXTRA_OUTPUT") CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+ echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ done
+
++
+ # If the user did not use the arguments to specify the items to instantiate,
+ # then the envvar interface is used. Set only those that are not.
+ # We use the long form for the default assignment because of an extremely
+@@ -18660,625 +21006,620 @@
+ fi
+
+ # Have a temporary directory for convenience. Make it in the build tree
+-# simply because there is no reason to put it here, and in addition,
++# simply because there is no reason against having it here, and in addition,
+ # creating and moving files from /tmp can sometimes cause problems.
+-# Create a temporary directory, and hook for its removal unless debugging.
++# Hook for its removal unless debugging.
++# Note that there is a small window in which the directory will not be cleaned:
++# after its creation but before its name has been assigned to `$tmp'.
+ $debug ||
+ {
+- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
++ tmp=
++ trap 'exit_status=$?
++ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
++' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+ }
+-
+ # Create a (secure) tmp directory for tmp files.
+
+ {
+- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+ } ||
+ {
+- tmp=./confstat$$-$RANDOM
+- (umask 077 && mkdir $tmp)
++ tmp=./conf$$-$RANDOM
++ (umask 077 && mkdir "$tmp")
+ } ||
+ {
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+ }
+
+-_ACEOF
+-
+-cat >>$CONFIG_STATUS <<_ACEOF
+-
+ #
+-# CONFIG_FILES section.
++# Set up the sed scripts for CONFIG_FILES section.
+ #
+
+ # No need to generate the scripts if there are no CONFIG_FILES.
+ # This happens for instance when ./config.status config.h
+-if test -n "\$CONFIG_FILES"; then
+- # Protect against being on the right side of a sed subst in config.status.
+- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+-s, at SHELL@,$SHELL,;t t
+-s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+-s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+-s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+-s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+-s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+-s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+-s, at exec_prefix@,$exec_prefix,;t t
+-s, at prefix@,$prefix,;t t
+-s, at program_transform_name@,$program_transform_name,;t t
+-s, at bindir@,$bindir,;t t
+-s, at sbindir@,$sbindir,;t t
+-s, at libexecdir@,$libexecdir,;t t
+-s, at datadir@,$datadir,;t t
+-s, at sysconfdir@,$sysconfdir,;t t
+-s, at sharedstatedir@,$sharedstatedir,;t t
+-s, at localstatedir@,$localstatedir,;t t
+-s, at libdir@,$libdir,;t t
+-s, at includedir@,$includedir,;t t
+-s, at oldincludedir@,$oldincludedir,;t t
+-s, at infodir@,$infodir,;t t
+-s, at mandir@,$mandir,;t t
+-s, at build_alias@,$build_alias,;t t
+-s, at host_alias@,$host_alias,;t t
+-s, at target_alias@,$target_alias,;t t
+-s, at DEFS@,$DEFS,;t t
+-s, at ECHO_C@,$ECHO_C,;t t
+-s, at ECHO_N@,$ECHO_N,;t t
+-s, at ECHO_T@,$ECHO_T,;t t
+-s, at LIBS@,$LIBS,;t t
+-s, at build@,$build,;t t
+-s, at build_cpu@,$build_cpu,;t t
+-s, at build_vendor@,$build_vendor,;t t
+-s, at build_os@,$build_os,;t t
+-s, at host@,$host,;t t
+-s, at host_cpu@,$host_cpu,;t t
+-s, at host_vendor@,$host_vendor,;t t
+-s, at host_os@,$host_os,;t t
+-s, at MAKEDEPEND@,$MAKEDEPEND,;t t
+-s, at cyrus_prefix@,$cyrus_prefix,;t t
+-s, at service_path@,$service_path,;t t
+-s, at cyrus_user@,$cyrus_user,;t t
+-s, at cyrus_group@,$cyrus_group,;t t
+-s, at CC@,$CC,;t t
+-s, at CFLAGS@,$CFLAGS,;t t
+-s, at LDFLAGS@,$LDFLAGS,;t t
+-s, at CPPFLAGS@,$CPPFLAGS,;t t
+-s, at ac_ct_CC@,$ac_ct_CC,;t t
+-s, at EXEEXT@,$EXEEXT,;t t
+-s, at OBJEXT@,$OBJEXT,;t t
+-s, at RANLIB@,$RANLIB,;t t
+-s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+-s, at SET_MAKE@,$SET_MAKE,;t t
+-s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+-s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+-s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+-s, at CPP@,$CPP,;t t
+-s, at EGREP@,$EGREP,;t t
+-s, at AWK@,$AWK,;t t
+-s, at LIBOBJS@,$LIBOBJS,;t t
+-s, at LIB_SOCKET@,$LIB_SOCKET,;t t
+-s, at IPV6_OBJS@,$IPV6_OBJS,;t t
+-s, at PRE_SUBDIRS@,$PRE_SUBDIRS,;t t
+-s, at EXTRA_SUBDIRS@,$EXTRA_SUBDIRS,;t t
+-s, at DEPLIBS@,$DEPLIBS,;t t
+-s, at LOCALDEFS@,$LOCALDEFS,;t t
+-s, at BDB_INC@,$BDB_INC,;t t
+-s, at BDB_LIB@,$BDB_LIB,;t t
+-s, at CYRUSDB_OBJS@,$CYRUSDB_OBJS,;t t
+-s, at SIEVE_OBJS@,$SIEVE_OBJS,;t t
+-s, at SIEVE_LIBS@,$SIEVE_LIBS,;t t
+-s, at SIEVE_CPPFLAGS@,$SIEVE_CPPFLAGS,;t t
+-s, at YACC@,$YACC,;t t
+-s, at LEX@,$LEX,;t t
+-s, at LEXLIB@,$LEXLIB,;t t
+-s, at LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+-s, at SIEVE_SUBDIRS@,$SIEVE_SUBDIRS,;t t
+-s, at WITH_NONBLOCK@,$WITH_NONBLOCK,;t t
+-s, at WITH_GMTOFF@,$WITH_GMTOFF,;t t
+-s, at WITH_MAP@,$WITH_MAP,;t t
+-s, at WITH_LOCK@,$WITH_LOCK,;t t
+-s, at cyrus_sigveclib@,$cyrus_sigveclib,;t t
+-s, at AFS_LIBS@,$AFS_LIBS,;t t
+-s, at AFS_LDFLAGS@,$AFS_LDFLAGS,;t t
+-s, at LDAP_CPPFLAGS@,$LDAP_CPPFLAGS,;t t
+-s, at LDAP_LDFLAGS@,$LDAP_LDFLAGS,;t t
+-s, at LDAP_LIBS@,$LDAP_LIBS,;t t
+-s, at SERVER_SUBDIRS@,$SERVER_SUBDIRS,;t t
+-s, at OPENSSL_INC@,$OPENSSL_INC,;t t
+-s, at OPENSSL_LIB@,$OPENSSL_LIB,;t t
+-s, at ZEPHYR_LIBS@,$ZEPHYR_LIBS,;t t
+-s, at ZEPHYR_CPPFLAGS@,$ZEPHYR_CPPFLAGS,;t t
+-s, at IMAP_PROGS@,$IMAP_PROGS,;t t
+-s, at COMPILE_ET@,$COMPILE_ET,;t t
+-s, at COM_ERR_LIBS@,$COM_ERR_LIBS,;t t
+-s, at COM_ERR_LDFLAGS@,$COM_ERR_LDFLAGS,;t t
+-s, at COM_ERR_CPPFLAGS@,$COM_ERR_CPPFLAGS,;t t
+-s, at LIB_CRYPT@,$LIB_CRYPT,;t t
+-s, at GSSAPI_LIBS@,$GSSAPI_LIBS,;t t
+-s, at GSSAPIBASE_LIBS@,$GSSAPIBASE_LIBS,;t t
+-s, at LIB_DYN_SASL@,$LIB_DYN_SASL,;t t
+-s, at DYNSASLFLAGS@,$DYNSASLFLAGS,;t t
+-s, at LIB_SASL@,$LIB_SASL,;t t
+-s, at SASLFLAGS@,$SASLFLAGS,;t t
+-s, at PERL@,$PERL,;t t
+-s, at PERL_CCCDLFLAGS@,$PERL_CCCDLFLAGS,;t t
+-s, at MD5OBJ@,$MD5OBJ,;t t
+-s, at SNMP_SUBDIRS@,$SNMP_SUBDIRS,;t t
+-s, at CMU_LIB_SUBDIR@,$CMU_LIB_SUBDIR,;t t
+-s, at LIB_WRAP@,$LIB_WRAP,;t t
+-s, at SNMP_CONFIG@,$SNMP_CONFIG,;t t
+-s, at LIB_UCDSNMP@,$LIB_UCDSNMP,;t t
+-s, at LIB_RT@,$LIB_RT,;t t
+-s, at IMAP_COM_ERR_LIBS@,$IMAP_COM_ERR_LIBS,;t t
+-s, at IMAP_LIBS@,$IMAP_LIBS,;t t
+-s, at PERL_SUBDIRS@,$PERL_SUBDIRS,;t t
+-s, at PERL_DEPSUBDIRS@,$PERL_DEPSUBDIRS,;t t
+-s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+-CEOF
++if test -n "$CONFIG_FILES"; then
+
+ _ACEOF
+
+- cat >>$CONFIG_STATUS <<\_ACEOF
+- # Split the substitutions into bite-sized pieces for seds with
+- # small command number limits, like on Digital OSF/1 and HP-UX.
+- ac_max_sed_lines=48
+- ac_sed_frag=1 # Number of current file.
+- ac_beg=1 # First line for current file.
+- ac_end=$ac_max_sed_lines # Line after last line for current file.
+- ac_more_lines=:
+- ac_sed_cmds=
+- while $ac_more_lines; do
+- if test $ac_beg -gt 1; then
+- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+- else
+- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+- fi
+- if test ! -s $tmp/subs.frag; then
+- ac_more_lines=false
+- else
+- # The purpose of the label and of the branching condition is to
+- # speed up the sed processing (if there are no `@' at all, there
+- # is no need to browse any of the substitutions).
+- # These are the two extra sed commands mentioned above.
+- (echo ':t
+- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+- if test -z "$ac_sed_cmds"; then
+- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+- else
+- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+- fi
+- ac_sed_frag=`expr $ac_sed_frag + 1`
+- ac_beg=$ac_end
+- ac_end=`expr $ac_end + $ac_max_sed_lines`
+- fi
+- done
+- if test -z "$ac_sed_cmds"; then
+- ac_sed_cmds=cat
++
++
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ cat >conf$$subs.sed <<_ACEOF
++SHELL!$SHELL$ac_delim
++PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
++PACKAGE_NAME!$PACKAGE_NAME$ac_delim
++PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
++PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
++PACKAGE_STRING!$PACKAGE_STRING$ac_delim
++PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
++exec_prefix!$exec_prefix$ac_delim
++prefix!$prefix$ac_delim
++program_transform_name!$program_transform_name$ac_delim
++bindir!$bindir$ac_delim
++sbindir!$sbindir$ac_delim
++libexecdir!$libexecdir$ac_delim
++datarootdir!$datarootdir$ac_delim
++datadir!$datadir$ac_delim
++sysconfdir!$sysconfdir$ac_delim
++sharedstatedir!$sharedstatedir$ac_delim
++localstatedir!$localstatedir$ac_delim
++includedir!$includedir$ac_delim
++oldincludedir!$oldincludedir$ac_delim
++docdir!$docdir$ac_delim
++infodir!$infodir$ac_delim
++htmldir!$htmldir$ac_delim
++dvidir!$dvidir$ac_delim
++pdfdir!$pdfdir$ac_delim
++psdir!$psdir$ac_delim
++libdir!$libdir$ac_delim
++localedir!$localedir$ac_delim
++mandir!$mandir$ac_delim
++DEFS!$DEFS$ac_delim
++ECHO_C!$ECHO_C$ac_delim
++ECHO_N!$ECHO_N$ac_delim
++ECHO_T!$ECHO_T$ac_delim
++LIBS!$LIBS$ac_delim
++build_alias!$build_alias$ac_delim
++host_alias!$host_alias$ac_delim
++target_alias!$target_alias$ac_delim
++build!$build$ac_delim
++build_cpu!$build_cpu$ac_delim
++build_vendor!$build_vendor$ac_delim
++build_os!$build_os$ac_delim
++host!$host$ac_delim
++host_cpu!$host_cpu$ac_delim
++host_vendor!$host_vendor$ac_delim
++host_os!$host_os$ac_delim
++WARNERROR!$WARNERROR$ac_delim
++MAKEDEPEND!$MAKEDEPEND$ac_delim
++cyrus_prefix!$cyrus_prefix$ac_delim
++service_path!$service_path$ac_delim
++cyrus_user!$cyrus_user$ac_delim
++cyrus_group!$cyrus_group$ac_delim
++CC!$CC$ac_delim
++CFLAGS!$CFLAGS$ac_delim
++LDFLAGS!$LDFLAGS$ac_delim
++CPPFLAGS!$CPPFLAGS$ac_delim
++ac_ct_CC!$ac_ct_CC$ac_delim
++EXEEXT!$EXEEXT$ac_delim
++OBJEXT!$OBJEXT$ac_delim
++RANLIB!$RANLIB$ac_delim
++SET_MAKE!$SET_MAKE$ac_delim
++INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
++INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
++INSTALL_DATA!$INSTALL_DATA$ac_delim
++CPP!$CPP$ac_delim
++GREP!$GREP$ac_delim
++EGREP!$EGREP$ac_delim
++AWK!$AWK$ac_delim
++LIBOBJS!$LIBOBJS$ac_delim
++LIB_SOCKET!$LIB_SOCKET$ac_delim
++IPV6_OBJS!$IPV6_OBJS$ac_delim
++PRE_SUBDIRS!$PRE_SUBDIRS$ac_delim
++EXTRA_SUBDIRS!$EXTRA_SUBDIRS$ac_delim
++DEPLIBS!$DEPLIBS$ac_delim
++LOCALDEFS!$LOCALDEFS$ac_delim
++BDB_INC!$BDB_INC$ac_delim
++BDB_LIB!$BDB_LIB$ac_delim
++CYRUSDB_OBJS!$CYRUSDB_OBJS$ac_delim
++SIEVE_OBJS!$SIEVE_OBJS$ac_delim
++SIEVE_LIBS!$SIEVE_LIBS$ac_delim
++SIEVE_CPPFLAGS!$SIEVE_CPPFLAGS$ac_delim
++YACC!$YACC$ac_delim
++YFLAGS!$YFLAGS$ac_delim
++LEX!$LEX$ac_delim
++LEXLIB!$LEXLIB$ac_delim
++LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim
++SIEVE_SUBDIRS!$SIEVE_SUBDIRS$ac_delim
++WITH_NONBLOCK!$WITH_NONBLOCK$ac_delim
++WITH_GMTOFF!$WITH_GMTOFF$ac_delim
++WITH_MAP!$WITH_MAP$ac_delim
++WITH_LOCK!$WITH_LOCK$ac_delim
++cyrus_sigveclib!$cyrus_sigveclib$ac_delim
++AFS_LIBS!$AFS_LIBS$ac_delim
++AFS_LDFLAGS!$AFS_LDFLAGS$ac_delim
++LDAP_CPPFLAGS!$LDAP_CPPFLAGS$ac_delim
++LDAP_LDFLAGS!$LDAP_LDFLAGS$ac_delim
++LDAP_LIBS!$LDAP_LIBS$ac_delim
++SERVER_SUBDIRS!$SERVER_SUBDIRS$ac_delim
++_ACEOF
++
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
++ break
++ elif $ac_last_try; then
++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
++ { (exit 1); exit 1; }; }
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+-fi # test -n "$CONFIG_FILES"
++done
+
++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
++if test -n "$ac_eof"; then
++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
++ ac_eof=`expr $ac_eof + 1`
++fi
++
++cat >>$CONFIG_STATUS <<_ACEOF
++cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+ _ACEOF
++sed '
++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
++s/^/s,@/; s/!/@,|#_!!_#|/
++:n
++t n
++s/'"$ac_delim"'$/,g/; t
++s/$/\\/; p
++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
++' >>$CONFIG_STATUS <conf$$subs.sed
++rm -f conf$$subs.sed
++cat >>$CONFIG_STATUS <<_ACEOF
++CEOF$ac_eof
++_ACEOF
++
++
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ cat >conf$$subs.sed <<_ACEOF
++OPENSSL_INC!$OPENSSL_INC$ac_delim
++OPENSSL_LIB!$OPENSSL_LIB$ac_delim
++ZEPHYR_LIBS!$ZEPHYR_LIBS$ac_delim
++ZEPHYR_CPPFLAGS!$ZEPHYR_CPPFLAGS$ac_delim
++IMAP_PROGS!$IMAP_PROGS$ac_delim
++COMPILE_ET!$COMPILE_ET$ac_delim
++COM_ERR_LIBS!$COM_ERR_LIBS$ac_delim
++COM_ERR_LDFLAGS!$COM_ERR_LDFLAGS$ac_delim
++COM_ERR_CPPFLAGS!$COM_ERR_CPPFLAGS$ac_delim
++LIB_CRYPT!$LIB_CRYPT$ac_delim
++GSSAPI_LIBS!$GSSAPI_LIBS$ac_delim
++GSSAPIBASE_LIBS!$GSSAPIBASE_LIBS$ac_delim
++LIB_DYN_SASL!$LIB_DYN_SASL$ac_delim
++DYNSASLFLAGS!$DYNSASLFLAGS$ac_delim
++LIB_SASL!$LIB_SASL$ac_delim
++SASLFLAGS!$SASLFLAGS$ac_delim
++PERL!$PERL$ac_delim
++PERL_CCCDLFLAGS!$PERL_CCCDLFLAGS$ac_delim
++MD5OBJ!$MD5OBJ$ac_delim
++SNMP_SUBDIRS!$SNMP_SUBDIRS$ac_delim
++CMU_LIB_SUBDIR!$CMU_LIB_SUBDIR$ac_delim
++LIB_WRAP!$LIB_WRAP$ac_delim
++SNMP_CONFIG!$SNMP_CONFIG$ac_delim
++LIB_UCDSNMP!$LIB_UCDSNMP$ac_delim
++LIB_RT!$LIB_RT$ac_delim
++IMAP_COM_ERR_LIBS!$IMAP_COM_ERR_LIBS$ac_delim
++IMAP_LIBS!$IMAP_LIBS$ac_delim
++PERL_SUBDIRS!$PERL_SUBDIRS$ac_delim
++PERL_DEPSUBDIRS!$PERL_DEPSUBDIRS$ac_delim
++LTLIBOBJS!$LTLIBOBJS$ac_delim
++_ACEOF
++
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
++ break
++ elif $ac_last_try; then
++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
++ { (exit 1); exit 1; }; }
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++ fi
++done
++
++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
++if test -n "$ac_eof"; then
++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
++ ac_eof=`expr $ac_eof + 1`
++fi
++
++cat >>$CONFIG_STATUS <<_ACEOF
++cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
++_ACEOF
++sed '
++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
++s/^/s,@/; s/!/@,|#_!!_#|/
++:n
++t n
++s/'"$ac_delim"'$/,g/; t
++s/$/\\/; p
++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
++' >>$CONFIG_STATUS <conf$$subs.sed
++rm -f conf$$subs.sed
++cat >>$CONFIG_STATUS <<_ACEOF
++:end
++s/|#_!!_#|//g
++CEOF$ac_eof
++_ACEOF
++
++
++# VPATH may cause trouble with some makes, so we remove $(srcdir),
++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# trailing colons and then remove the whole line if VPATH becomes empty
++# (actually we leave an empty line to preserve line numbers).
++if test "x$srcdir" = x.; then
++ ac_vpsub='/^[ ]*VPATH[ ]*=/{
++s/:*\$(srcdir):*/:/
++s/:*\${srcdir}:*/:/
++s/:*@srcdir@:*/:/
++s/^\([^=]*=[ ]*\):*/\1/
++s/:*$//
++s/^[^=]*=[ ]*$//
++}'
++fi
++
+ cat >>$CONFIG_STATUS <<\_ACEOF
+-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+- case $ac_file in
+- - | *:- | *:-:* ) # input from stdin
+- cat >$tmp/stdin
+- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+- * ) ac_file_in=$ac_file.in ;;
++fi # test -n "$CONFIG_FILES"
++
++
++for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
++do
++ case $ac_tag in
++ :[FHLC]) ac_mode=$ac_tag; continue;;
++ esac
++ case $ac_mode$ac_tag in
++ :[FHL]*:*);;
++ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
++echo "$as_me: error: Invalid tag $ac_tag." >&2;}
++ { (exit 1); exit 1; }; };;
++ :[FH]-) ac_tag=-:-;;
++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
++ ac_save_IFS=$IFS
++ IFS=:
++ set x $ac_tag
++ IFS=$ac_save_IFS
++ shift
++ ac_file=$1
++ shift
+
+- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++ case $ac_mode in
++ :L) ac_source=$1;;
++ :[FH])
++ ac_file_inputs=
++ for ac_f
++ do
++ case $ac_f in
++ -) ac_f="$tmp/stdin";;
++ *) # Look for the file first in the build tree, then in the source tree
++ # (if the path is not absolute). The absolute path cannot be DOS-style,
++ # because $ac_f cannot contain `:'.
++ test -f "$ac_f" ||
++ case $ac_f in
++ [\\/$]*) false;;
++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
++ esac ||
++ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
++echo "$as_me: error: cannot find input file: $ac_f" >&2;}
++ { (exit 1); exit 1; }; };;
++ esac
++ ac_file_inputs="$ac_file_inputs $ac_f"
++ done
++
++ # Let's still pretend it is `configure' which instantiates (i.e., don't
++ # use $as_me), people would be surprised to read:
++ # /* config.h. Generated by config.status. */
++ configure_input="Generated from "`IFS=:
++ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
++ if test x"$ac_file" != x-; then
++ configure_input="$ac_file. $configure_input"
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ fi
++
++ case $ac_tag in
++ *:-:* | *:-) cat >"$tmp/stdin";;
++ esac
++ ;;
++ esac
++
++ ac_dir=`$as_dirname -- "$ac_file" ||
+ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+- X"$ac_file" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$ac_file" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- { if $as_mkdir_p; then
+- mkdir -p "$ac_dir"
+- else
+- as_dir="$ac_dir"
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ { as_dir="$ac_dir"
++ case $as_dir in #(
++ -*) as_dir=./$as_dir;;
++ esac
++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+- while test ! -d "$as_dir"; do
+- as_dirs="$as_dir $as_dirs"
+- as_dir=`(dirname "$as_dir") 2>/dev/null ||
++ while :; do
++ case $as_dir in #(
++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
++ *) as_qdir=$as_dir;;
++ esac
++ as_dirs="'$as_qdir' $as_dirs"
++ as_dir=`$as_dirname -- "$as_dir" ||
+ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+- X"$as_dir" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$as_dir" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ test -d "$as_dir" && break
+ done
+- test ! -n "$as_dirs" || mkdir $as_dirs
+- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
++ test -z "$as_dirs" || eval "mkdir $as_dirs"
++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
++echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+-
+ ac_builddir=.
+
+-if test "$ac_dir" != .; then
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+- # A "../" for each directory in $ac_dir_suffix.
+- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+-else
+- ac_dir_suffix= ac_top_builddir=
+-fi
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
+
+ case $srcdir in
+- .) # No --srcdir option. We are building in place.
++ .) # We are building in place.
+ ac_srcdir=.
+- if test -z "$ac_top_builddir"; then
+- ac_top_srcdir=.
+- else
+- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+- fi ;;
+- [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+- ac_top_srcdir=$srcdir ;;
+- *) # Relative path.
+- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+- ac_top_srcdir=$ac_top_builddir$srcdir ;;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+-# Do not use `cd foo && pwd` to compute absolute paths, because
+-# the directories may not exist.
+-case `pwd` in
+-.) ac_abs_builddir="$ac_dir";;
+-*)
+- case "$ac_dir" in
+- .) ac_abs_builddir=`pwd`;;
+- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+- *) ac_abs_builddir=`pwd`/"$ac_dir";;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_builddir=${ac_top_builddir}.;;
+-*)
+- case ${ac_top_builddir}. in
+- .) ac_abs_top_builddir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_srcdir=$ac_srcdir;;
+-*)
+- case $ac_srcdir in
+- .) ac_abs_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_srcdir=$ac_top_srcdir;;
+-*)
+- case $ac_top_srcdir in
+- .) ac_abs_top_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+- esac;;
+-esac
+
++ case $ac_mode in
++ :F)
++ #
++ # CONFIG_FILE
++ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
++_ACEOF
+
+- if test x"$ac_file" != x-; then
+- { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+- rm -f "$ac_file"
+- fi
+- # Let's still pretend it is `configure' which instantiates (i.e., don't
+- # use $as_me), people would be surprised to read:
+- # /* config.h. Generated by config.status. */
+- if test x"$ac_file" = x-; then
+- configure_input=
+- else
+- configure_input="$ac_file. "
+- fi
+- configure_input=$configure_input"Generated from `echo $ac_file_in |
+- sed 's,.*/,,'` by configure."
++cat >>$CONFIG_STATUS <<\_ACEOF
++# If the template does not know about datarootdir, expand it.
++# FIXME: This hack should be removed a few years after 2.60.
++ac_datarootdir_hack=; ac_datarootdir_seen=
+
+- # First look for the input files in the build tree, otherwise in the
+- # src tree.
+- ac_file_inputs=`IFS=:
+- for f in $ac_file_in; do
+- case $f in
+- -) echo $tmp/stdin ;;
+- [\\/$]*)
+- # Absolute (can't be DOS-style, as IFS=:)
+- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+- { (exit 1); exit 1; }; }
+- echo "$f";;
+- *) # Relative
+- if test -f "$f"; then
+- # Build tree
+- echo "$f"
+- elif test -f "$srcdir/$f"; then
+- # Source tree
+- echo "$srcdir/$f"
+- else
+- # /dev/null tree
+- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+- { (exit 1); exit 1; }; }
+- fi;;
+- esac
+- done` || { (exit 1); exit 1; }
++case `sed -n '/datarootdir/ {
++ p
++ q
++}
++/@datadir@/p
++/@docdir@/p
++/@infodir@/p
++/@localedir@/p
++/@mandir@/p
++' $ac_file_inputs` in
++*datarootdir*) ac_datarootdir_seen=yes;;
++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
++ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
++echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
++ ac_datarootdir_hack='
++ s&@datadir@&$datadir&g
++ s&@docdir@&$docdir&g
++ s&@infodir@&$infodir&g
++ s&@localedir@&$localedir&g
++ s&@mandir@&$mandir&g
++ s&\\\${datarootdir}&$datarootdir&g' ;;
++esac
++_ACEOF
++
++# Neutralize VPATH when `$srcdir' = `.'.
++# Shell code in configure.ac might set extrasub.
++# FIXME: do we really want to maintain this feature?
++cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+ $extrasub
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ :t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+-s, at configure_input@,$configure_input,;t t
+-s, at srcdir@,$ac_srcdir,;t t
+-s, at abs_srcdir@,$ac_abs_srcdir,;t t
+-s, at top_srcdir@,$ac_top_srcdir,;t t
+-s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+-s, at builddir@,$ac_builddir,;t t
+-s, at abs_builddir@,$ac_abs_builddir,;t t
+-s, at top_builddir@,$ac_top_builddir,;t t
+-s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+-s, at INSTALL@,$ac_INSTALL,;t t
+-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+- rm -f $tmp/stdin
+- if test x"$ac_file" != x-; then
+- mv $tmp/out $ac_file
+- else
+- cat $tmp/out
+- rm -f $tmp/out
+- fi
+-
+-done
+-_ACEOF
+-cat >>$CONFIG_STATUS <<\_ACEOF
+-
+-#
+-# CONFIG_HEADER section.
+-#
++s&@configure_input@&$configure_input&;t t
++s&@top_builddir@&$ac_top_builddir_sub&;t t
++s&@srcdir@&$ac_srcdir&;t t
++s&@abs_srcdir@&$ac_abs_srcdir&;t t
++s&@top_srcdir@&$ac_top_srcdir&;t t
++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
++s&@builddir@&$ac_builddir&;t t
++s&@abs_builddir@&$ac_abs_builddir&;t t
++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
++s&@INSTALL@&$ac_INSTALL&;t t
++$ac_datarootdir_hack
++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+
+-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+-# NAME is the cpp macro being defined and VALUE is the value it is being given.
+-#
+-# ac_d sets the value in "#define NAME VALUE" lines.
+-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+-ac_dB='[ ].*$,\1#\2'
+-ac_dC=' '
+-ac_dD=',;t'
+-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+-ac_uB='$,\1#\2define\3'
+-ac_uC=' '
+-ac_uD=',;t'
++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
++ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
++ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined." >&5
++echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined." >&2;}
+
+-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
++ rm -f "$tmp/stdin"
+ case $ac_file in
+- - | *:- | *:-:* ) # input from stdin
+- cat >$tmp/stdin
+- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+- * ) ac_file_in=$ac_file.in ;;
++ -) cat "$tmp/out"; rm -f "$tmp/out";;
++ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+-
+- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+-
+- # First look for the input files in the build tree, otherwise in the
+- # src tree.
+- ac_file_inputs=`IFS=:
+- for f in $ac_file_in; do
+- case $f in
+- -) echo $tmp/stdin ;;
+- [\\/$]*)
+- # Absolute (can't be DOS-style, as IFS=:)
+- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+- { (exit 1); exit 1; }; }
+- # Do quote $f, to prevent DOS paths from being IFS'd.
+- echo "$f";;
+- *) # Relative
+- if test -f "$f"; then
+- # Build tree
+- echo "$f"
+- elif test -f "$srcdir/$f"; then
+- # Source tree
+- echo "$srcdir/$f"
+- else
+- # /dev/null tree
+- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+- { (exit 1); exit 1; }; }
+- fi;;
+- esac
+- done` || { (exit 1); exit 1; }
+- # Remove the trailing spaces.
+- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+-
++ ;;
++ :H)
++ #
++ # CONFIG_HEADER
++ #
+ _ACEOF
+
+-# Transform confdefs.h into two sed scripts, `conftest.defines' and
+-# `conftest.undefs', that substitutes the proper values into
+-# config.h.in to produce config.h. The first handles `#define'
+-# templates, and the second `#undef' templates.
+-# And first: Protect against being on the right side of a sed subst in
+-# config.status. Protect against being in an unquoted here document
+-# in config.status.
+-rm -f conftest.defines conftest.undefs
+-# Using a here document instead of a string reduces the quoting nightmare.
+-# Putting comments in sed scripts is not portable.
+-#
+-# `end' is used to avoid that the second main sed command (meant for
+-# 0-ary CPP macros) applies to n-ary macro definitions.
+-# See the Autoconf documentation for `clear'.
+-cat >confdef2sed.sed <<\_ACEOF
+-s/[\\&,]/\\&/g
+-s,[\\$`],\\&,g
+-t clear
+-: clear
+-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+-t end
+-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+-: end
+-_ACEOF
+-# If some macros were called several times there might be several times
+-# the same #defines, which is useless. Nevertheless, we may not want to
+-# sort them, since we want the *last* AC-DEFINE to be honored.
+-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+-rm -f confdef2sed.sed
++# Transform confdefs.h into a sed script `conftest.defines', that
++# substitutes the proper values into config.h.in to produce config.h.
++rm -f conftest.defines conftest.tail
++# First, append a space to every undef/define line, to ease matching.
++echo 's/$/ /' >conftest.defines
++# Then, protect against being on the right side of a sed subst, or in
++# an unquoted here document, in config.status. If some macros were
++# called several times there might be several #defines for the same
++# symbol, which is useless. But do not sort them, since the last
++# AC_DEFINE must be honored.
++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
++# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
++# NAME is the cpp macro being defined, VALUE is the value it is being given.
++# PARAMS is the parameter list in the macro definition--in most cases, it's
++# just an empty string.
++ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
++ac_dB='\\)[ (].*,\\1define\\2'
++ac_dC=' '
++ac_dD=' ,'
+
+-# This sed command replaces #undef with comments. This is necessary, for
++uniq confdefs.h |
++ sed -n '
++ t rset
++ :rset
++ s/^[ ]*#[ ]*define[ ][ ]*//
++ t ok
++ d
++ :ok
++ s/[\\&,]/\\&/g
++ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
++ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
++ ' >>conftest.defines
++
++# Remove the space that was appended to ease matching.
++# Then replace #undef with comments. This is necessary, for
+ # example, in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+-cat >>conftest.undefs <<\_ACEOF
+-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+-_ACEOF
++# (The regexp can be short, since the line contains either #define or #undef.)
++echo 's/ $//
++s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+-# Break up conftest.defines because some shells have a limit on the size
+-# of here documents, and old seds have small limits too (100 cmds).
+-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+-echo ' :' >>$CONFIG_STATUS
+-rm -f conftest.tail
+-while grep . conftest.defines >/dev/null
++# Break up conftest.defines:
++ac_max_sed_lines=50
++
++# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
++# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
++# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
++# et cetera.
++ac_in='$ac_file_inputs'
++ac_out='"$tmp/out1"'
++ac_nxt='"$tmp/out2"'
++
++while :
+ do
+- # Write a limited-size here document to $tmp/defines.sed.
+- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+- # Speed up: don't consider the non `#define' lines.
+- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+- # Work around the forget-to-reset-the-flag bug.
+- echo 't clr' >>$CONFIG_STATUS
+- echo ': clr' >>$CONFIG_STATUS
+- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
++ # Write a here document:
++ cat >>$CONFIG_STATUS <<_ACEOF
++ # First, check the format of the line:
++ cat >"\$tmp/defines.sed" <<\\CEOF
++/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
++/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
++b
++:def
++_ACEOF
++ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+- sed -f $tmp/defines.sed $tmp/in >$tmp/out
+- rm -f $tmp/in
+- mv $tmp/out $tmp/in
+-' >>$CONFIG_STATUS
+- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
++ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
++ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
++ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
++ grep . conftest.tail >/dev/null || break
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+ done
+-rm -f conftest.defines
+-echo ' fi # grep' >>$CONFIG_STATUS
+-echo >>$CONFIG_STATUS
+-
+-# Break up conftest.undefs because some shells have a limit on the size
+-# of here documents, and old seds have small limits too (100 cmds).
+-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+-rm -f conftest.tail
+-while grep . conftest.undefs >/dev/null
+-do
+- # Write a limited-size here document to $tmp/undefs.sed.
+- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+- # Speed up: don't consider the non `#undef'
+- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+- # Work around the forget-to-reset-the-flag bug.
+- echo 't clr' >>$CONFIG_STATUS
+- echo ': clr' >>$CONFIG_STATUS
+- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+- echo 'CEOF
+- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+- rm -f $tmp/in
+- mv $tmp/out $tmp/in
+-' >>$CONFIG_STATUS
+- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+- rm -f conftest.undefs
+- mv conftest.tail conftest.undefs
+-done
+-rm -f conftest.undefs
++rm -f conftest.defines conftest.tail
+
++echo "ac_result=$ac_in" >>$CONFIG_STATUS
+ cat >>$CONFIG_STATUS <<\_ACEOF
+- # Let's still pretend it is `configure' which instantiates (i.e., don't
+- # use $as_me), people would be surprised to read:
+- # /* config.h. Generated by config.status. */
+- if test x"$ac_file" = x-; then
+- echo "/* Generated by configure. */" >$tmp/config.h
+- else
+- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+- fi
+- cat $tmp/in >>$tmp/config.h
+- rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
++ echo "/* $configure_input */" >"$tmp/config.h"
++ cat "$ac_result" >>"$tmp/config.h"
++ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+ echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$ac_file" : 'X\(//\)[^/]' \| \
+- X"$ac_file" : 'X\(//\)$' \| \
+- X"$ac_file" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
+-echo X"$ac_file" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- { if $as_mkdir_p; then
+- mkdir -p "$ac_dir"
+- else
+- as_dir="$ac_dir"
+- as_dirs=
+- while test ! -d "$as_dir"; do
+- as_dirs="$as_dir $as_dirs"
+- as_dir=`(dirname "$as_dir") 2>/dev/null ||
+-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$as_dir" : 'X\(//\)[^/]' \| \
+- X"$as_dir" : 'X\(//\)$' \| \
+- X"$as_dir" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
+-echo X"$as_dir" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- done
+- test ! -n "$as_dirs" || mkdir $as_dirs
+- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+- { (exit 1); exit 1; }; }; }
+-
+ rm -f $ac_file
+- mv $tmp/config.h $ac_file
++ mv "$tmp/config.h" $ac_file
+ fi
+ else
+- cat $tmp/config.h
+- rm -f $tmp/config.h
++ echo "/* $configure_input */"
++ cat "$ac_result"
+ fi
+-done
+-_ACEOF
++ rm -f "$tmp/out12"
++ ;;
++
++
++ esac
++
++done # for ac_tag
+
+-cat >>$CONFIG_STATUS <<\_ACEOF
+
+ { (exit 0); exit 0; }
+ _ACEOF
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/POTFILES.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/POTFILES.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/POTFILES.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/POTFILES.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+[type: gettext/rfc822deb] cyrus-common-2.2.templates
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/cs.po
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/cs.po?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/cs.po (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/cs.po Sat Aug 26 02:00:13 2006
@@ -1,0 +1,81 @@
+# Czech translation of cyrus-imapd-2.2 templates
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: cyrus-imapd-2.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-12-10 09:48-0700\n"
+"PO-Revision-Date: 2005-12-29 16:07+0100\n"
+"Last-Translator: Martin Sin <martin.sin at seznam.cz>\n"
+"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid "Database backends have changed!"
+msgstr "Backendy databáze se zmÄnily!"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Comparison between /usr/lib/cyrus/cyrus-db-types.txt and /usr/lib/cyrus/"
+"cyrus-db-types.active shows that database backends for Cyrus IMAPd have been "
+"changed."
+msgstr ""
+"Srovnánà mezi /usr/lib/cyrus/cyrus-db-types.txt a /usr/lib/cyrus/cyrus-db-"
+"types.active ukázalo, že se zmÄnil backend databáze pro Cyrus IMAPd."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"This means that those databases for which the database backends changed "
+"might need to be converted manually to the new format, using the cvt_cyrusdb"
+"(8) utility."
+msgstr ""
+"To znamená, že ty databáze, u kterých se databázové backendy zmÄnily, budou "
+"možná vyžadovat ruÄnà pÅevod do nového formátu utilitou cvt_cyrusdb(8)."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Please refer to /usr/share/doc/cyrus21-common/README.Debian.database for "
+"more information. Do not start cyrmaster until you have converted the "
+"databases to the new format."
+msgstr ""
+"Pro vÃce informacà se prosÃm podÃvejte do /usr/share/doc/cyrus21-common/"
+"README.Debian.database. NespouÅ¡tÄjte cyrmaster, dokud nepÅevedete databáze "
+"do nového formátu."
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid "Remove the Cyrus spools, and user sieve scripts?"
+msgstr "Odstranit spool adresáÅe Cyrusu a uživatelské Sieve skripty?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"Should I remove the Cyrus mail and news spools, as well as the user's sieve "
+"scripts, when the package is purged ?"
+msgstr ""
+"Mám pÅi odstranÄnà balÃÄku smazat spool adresáŠs poÅ¡tou, news pÅÃspÄvky a "
+"také uživatelské filtrovacà skripty v jazyce Sieve?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"This question only applies to the default spools and sieve script "
+"directories in /var. If you modified their location in imapd.conf, the new "
+"locations will not be removed; just the old ones in /var."
+msgstr ""
+"Tato otázka se týká pouze výchozÃch spool adresáÅů a Sieve skriptů ve /var. "
+"PÅi zmÄnÄ jejich umÃstÄnà v imapd.conf nebude odstranÄno jejich nové "
+"umÃstÄnÃ, ale pouze jejich staré ve /var."
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/de.po
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/de.po?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/de.po (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/de.po Sat Aug 26 02:00:13 2006
@@ -1,0 +1,95 @@
+# translation of cyrus22-imapd_2.1.16-6_de.po to German
+# translation of cyrus22-imapd_2.1.16-6_templates.po to German
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+# Developers do not need to manually edit POT or PO files.
+# Erik Schanze <mail at erikschanze.de>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: cyrus-imapd-2.2_2.2.12-1_de\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-05-20 00:16+0200\n"
+"PO-Revision-Date: 2004-05-29 22:44+0200\n"
+"Last-Translator: Erik Schanze <mail at erikschanze.de>\n"
+"Language-Team: German <debian-l10n-german at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0.2\n"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid "Database backends have changed!"
+msgstr "Datenbankanbindung hat sich geändert!"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Comparation between /usr/lib/cyrus/cyrus-db-types.txt and /usr/lib/cyrus/"
+"cyrus-db-types.active shows that database backends for Cyrus IMAPd have been "
+"changed."
+msgstr ""
+"Wenn Sie die Dateien /usr/lib/cyrus/cyrus-db-types.txt und /usr/lib/cyrus/"
+"cyrus-db-types.active vergleichen, sehen Sie, dass die Datenbankanbindung "
+"des Cyrus IMAPd geändert wurde."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"This means that those databases for which the database backends changed "
+"might need to be converted manually to the new format, using the cvt_cyrusdb"
+"(8) utility."
+msgstr ""
+"Die Datenbanken, für die sich die Anbindung geändert hat, müssenmit dem "
+"Hilfsprogramm cvt_cyrusdb(8) manuell in das neue Format überführt werden."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian.database for "
+"more information. Do not start cyrmaster until you have converted the "
+"databases to the new format."
+msgstr ""
+"Mehr Informationen finden Sie in der Datei /usr/share/doc/cyrus-common-2.2/"
+"README.Debian.database. Starten Sie keinesfalls cyrmaster, bevor Sie die "
+"Datenbank in das neue Format überführt haben."
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid "Remove the Cyrus spools, and user sieve scripts?"
+msgstr "Cyrus-Spool und Filterskripte der Benutzer löschen?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"Should I remove the Cyrus mail and news spools, as well as the user's sieve "
+"scripts, when the package is purged ?"
+msgstr ""
+"Sollen die Cyrus Email- bzw. News-Spools und die Filterskripte der Benutzer "
+"gelöscht werden, wenn das Paket restlos entfernt wird (purge)?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"This question only applies to the default spools and sieve script "
+"directories in /var. If you modified their location in imapd.conf, the new "
+"locations will not be removed; just the old ones in /var."
+msgstr ""
+"Diese Frage betrifft nur die Standard-Spools und -Filterskriptverzeichnisse "
+"in /var. Wenn Sie deren Ort in der Datei imapd.conf geändert haben, werden "
+"sie an der neuen Stelle nicht gelöscht, nur die alten im Verzeichnis /var."
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/fr.po
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/fr.po?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/fr.po (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/fr.po Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+# PO-DEBCONF TEMPLATE FOR cyrus22-imapd.
+# Copyright (C) 2002 Henrique de Moraes Holschuh <hmh at debian.org>
+# This file is distributed under the same license as the cyrus22-imapd package.
+# $Id: fr.po 247 2005-12-29 16:29:27Z sven $
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: cyrus-imapd-2.2 2.2.12-1\n"
+"POT-Creation-Date: 2003-03-03 10:24-0300\n"
+"PO-Revision-Date: 2002-10-22 10:33+0200\n"
+"Last-Translator: Philippe Batailler <pbatailler at teaser.fr>\n"
+"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid "Database backends have changed!"
+msgstr "L'interfaçage avec les bases de données a changé !"
+
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Comparation between /usr/lib/cyrus/cyrus-db-types.txt and /usr/lib/cyrus/"
+"cyrus-db-types.active shows that database backends for Cyrus IMAPd have been "
+"changed."
+msgstr ""
+"Une comparaison entre /usr/lib/cyrus/cyrus-db-types.txt et /usr/lib/cyrus/"
+"cyrus-db-types.active montre que l'interfaçage de Cyrus IMAPd avec les bases "
+"de données a changé."
+
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"This means that those databases for which the database backends changed "
+"might need to be converted manually to the new format, using the cvt_cyrusdb"
+"(8) utility."
+msgstr ""
+"Cela signifie que les bases de données pour lesquelles l'interfaçage a "
+"changé peuvent nécessiter une conversion manuelle au nouveau format. On peut "
+"se servir de l'utilitaire cvt_cyrusdb (8)."
+
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian.database for "
+"more information. Do not start cyrmaster until you have converted the "
+"databases to the new format."
+msgstr ""
+"Veuillez-vous reporter à /usr/share/doc/cyrus-common-2.2/README.Debian.database pour "
+"des informations supplémentaires. Ne lancez pas cyrmaster avant d'avoir mis "
+"les bases de données au nouveau format."
+
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid "Remove the Cyrus spools, and user sieve scripts?"
+msgstr ""
+"Faut-il supprimer les répertoires de spool propres à Cyrus, ainsi que les "
+"filtres des utilisateurs ?"
+
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"Should I remove the Cyrus mail and news spools, as well as the user's sieve "
+"scripts, when the package is purged ?"
+msgstr ""
+"Dois-je supprimer les répertoires de spool pour le courrier et les "
+"nouvelles, ainsi que les filtres des utilisateurs, quand le système est "
+"purgé du paquet ?"
+
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"This question only applies to the default spools and sieve script "
+"directories in /var. If you modified their location in imapd.conf, the new "
+"locations will not be removed; just the old ones in /var."
+msgstr ""
+"Cette question concerne uniquement les répertoires par défaut situés dans /"
+"var et contenant le spool et les filtres. Si vous aviez modifié leurs "
+"emplacements grâce au fichier imapd.conf, ces emplacements ne seront pas "
+"supprimés ; seuls les anciens, dans /var, le seront."
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/it.po
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/it.po?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/it.po (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/it.po Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+# Traduzione italiana di cyrus22-imapd
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Cristian Rigamonti <cri at linux.it>, 2004.
+msgid ""
+msgstr ""
+"Project-Id-Version: cyrus-imapd-2.2 2.2.12-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-05-20 00:16+0200\n"
+"PO-Revision-Date: 2004-03-28 20:17+0200\n"
+"Last-Translator: Cristian Rigamonti <cri at linux.it>\n"
+"Language-Team: Italian <tp at lists.linux.it>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid "Database backends have changed!"
+msgstr "I backend del database sono cambiati!"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Comparation between /usr/lib/cyrus/cyrus-db-types.txt and /usr/lib/cyrus/"
+"cyrus-db-types.active shows that database backends for Cyrus IMAPd have been "
+"changed."
+msgstr ""
+"Il confronto tra /usr/lib/cyrus/cyrus-db-types.txt e /usr/lib/cyrus/cyrus-db-"
+"types.active mostra che i backend di database per Cyrus IMAPd sono cambiati."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"This means that those databases for which the database backends changed "
+"might need to be converted manually to the new format, using the cvt_cyrusdb"
+"(8) utility."
+msgstr ""
+"Ciò significa che i database per cui sono cambiati i backend devono essere "
+"convertiti manualmente al nuovo formato, usando l'utilità cvt_cyrusdb(8)."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian.database for "
+"more information. Do not start cyrmaster until you have converted the "
+"databases to the new format."
+msgstr ""
+"Si veda /usr/share/doc/cyrus-common-2.2/README.Debian.database per maggiori "
+"informazioni. Non avviare cyrmaster prima di aver convertito i database al "
+"nuovo formato."
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid "Remove the Cyrus spools, and user sieve scripts?"
+msgstr "Rimuovere gli spool di Cyrus e gli script sieve degli utenti?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"Should I remove the Cyrus mail and news spools, as well as the user's sieve "
+"scripts, when the package is purged ?"
+msgstr ""
+"Si desidera rimuovere gli spool di posta e news di Cyrus, oltre agli script "
+"sieve degli utenti, quando il pacchetto sarà rimosso?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"This question only applies to the default spools and sieve script "
+"directories in /var. If you modified their location in imapd.conf, the new "
+"locations will not be removed; just the old ones in /var."
+msgstr ""
+"Questa domanda si riferisce solo agli spool predefiniti e alle directory "
+"degli script sieve in /var. Se la loro posizione è stata modificata in "
+"imapd.conf, non saranno rimosse le nuove posizioni, ma solo quelle in /var."
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/ja.po
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/ja.po?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/ja.po (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/ja.po Sat Aug 26 02:00:13 2006
@@ -1,0 +1,93 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: cyrus-imapd-2.2 2.2.12-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-05-20 00:16+0200\n"
+"PO-Revision-Date: 2004-03-01 03:04+0900\n"
+"Last-Translator: Hideki Yamane <henrich at samba.gr.jp>\n"
+"Language-Team: Japanese <debian-japanese at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-JP\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid "Database backends have changed!"
+msgstr "¥Ð¥Ã¥¯¥¨¥ó¥É¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬Êѹ¹¤µ¤ì¤Þ¤·¤¿!"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Comparation between /usr/lib/cyrus/cyrus-db-types.txt and /usr/lib/cyrus/"
+"cyrus-db-types.active shows that database backends for Cyrus IMAPd have been "
+"changed."
+msgstr ""
+"/usr/lib/cyrus/cyrus-db-types.txt ¤È /usr/lib/cyrus/cyrus-db-types.active ¤ò"
+"Èæ³Ó¤·¤¿¤È¤³¤í Cyrus IMAPd ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬Êѹ¹¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"This means that those databases for which the database backends changed "
+"might need to be converted manually to the new format, using the cvt_cyrusdb"
+"(8) utility."
+msgstr ""
+"¤³¤ì¤é¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¤¬Êѹ¹¤µ¤ì¤¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ï cvt_cyrusdb(8) ¥æ¡¼¥Æ¥£¥ê¥Æ¥£"
+"¤ò»È¤Ã¤Æ¼êư¤Ç¿·¤·¤¤·Á¼°¤ËÊÑ´¹¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian.database for "
+"more information. Do not start cyrmaster until you have converted the "
+"databases to the new format."
+msgstr ""
+"¤è¤ê¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï /usr/share/doc/cyrus-common-2.2/README.Debian.database ¤ò»²"
+"¾È¤·¤Æ¤¯¤À¤µ¤¤¡£¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò¿·¤·¤¤·Á¼°¤ËÊÑ´¹¤¹¤ë¤Þ¤Ç cyrmaster ¤òµ¯Æ°¤·¤Ê¤¤"
+"¤Ç¤¯¤À¤µ¤¤¡£"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid "Remove the Cyrus spools, and user sieve scripts?"
+msgstr "Cyrus ¥¹¥×¡¼¥ë¤È¡¢¥æ¡¼¥¶¤Î sieve ¥¹¥¯¥ê¥×¥È¤òºï½ü¤·¤Þ¤¹¤«?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"Should I remove the Cyrus mail and news spools, as well as the user's sieve "
+"scripts, when the package is purged ?"
+msgstr ""
+"¥Ñ¥Ã¥±¡¼¥¸¤¬´°Á´¤Ëºï½ü¤µ¤ì¤¿ºÝ¡¢sieve ¥¹¥¯¥ê¥×¥È¤ÈƱÍÍ¤Ë Cyrus ¥á¡¼¥ë¡¦¥Ë¥å¡¼"
+"¥¹¥¹¥×¡¼¥ë¤òºï½ü¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¤«?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"This question only applies to the default spools and sieve script "
+"directories in /var. If you modified their location in imapd.conf, the new "
+"locations will not be removed; just the old ones in /var."
+msgstr ""
+"¤³¤Î¼ÁÌä¤Ï /var ¤Ë¤¢¤ëɸ½à¤Î¥¹¥×¡¼¥ë¤È sieve ¥¹¥¯¥ê¥×¥È¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Î¤ßŬÍÑ"
+"¤µ¤ì¤Þ¤¹¡£imapd.conf ¤Ç¥Ç¥£¥ì¥¯¥È¥ê¤òÊѹ¹¤·¤Æ¤¤¤ë¾ì¹ç¡¢Êѹ¹¸å¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë"
+"¤¢¤ë¤â¤Î¤Ïºï½ü¤µ¤ì¤Þ¤»¤ó¡£/var ¤Ë¤¢¤ë¸Å¤¤¤â¤Î¤À¤±¤Ç¤¹¡£"
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/nl.po
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/nl.po?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/nl.po (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/nl.po Sat Aug 26 02:00:13 2006
@@ -1,0 +1,94 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: cyrus-imapd-2.2 2.2.12-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-05-20 00:16+0200\n"
+"PO-Revision-Date: 2004-03-29 10:57+0100\n"
+"Last-Translator: Luk Claes <luk.claes at ugent.be>\n"
+"Language-Team: Debian l10n Dutch <debian-l10n-dutch at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid "Database backends have changed!"
+msgstr "Databank-backends zijn gewijzigd!"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Comparation between /usr/lib/cyrus/cyrus-db-types.txt and /usr/lib/cyrus/"
+"cyrus-db-types.active shows that database backends for Cyrus IMAPd have been "
+"changed."
+msgstr ""
+"Vergelijking tussen /usr/lib/cyrus/cyrus-db-types.txt en /usr/lib/cyrus/"
+"cyrus-db-types.active leert ons dat de databank-backends voor Cyrus IMAPd "
+"gewijzigd zijn."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"This means that those databases for which the database backends changed "
+"might need to be converted manually to the new format, using the cvt_cyrusdb"
+"(8) utility."
+msgstr ""
+"Dit betekent dat deze databanken, waarvan de databank-backends gewijzigd "
+"zijn, mogelijk handmatig geconverteerd moeten worden naar het nieuwe "
+"formaat, gebruik makend van het cvt_cyrusdb(8)-hulpmiddel."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian.database for "
+"more information. Do not start cyrmaster until you have converted the "
+"databases to the new format."
+msgstr ""
+"Raadpleeg /usr/share/doc/cyrus-common-2.2/README.Debian.database voor meer "
+"informatie. Start cyrmaster niet vooraleer u de databanken naar het nieuwe "
+"formaat geconverteerd hebt."
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid "Remove the Cyrus spools, and user sieve scripts?"
+msgstr "De Cyrus-spools, en gebruikers-sieve-scripts verwijderen?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"Should I remove the Cyrus mail and news spools, as well as the user's sieve "
+"scripts, when the package is purged ?"
+msgstr ""
+"Moeten de Cyrus-mail- en -nieuws-spools verwijderd worden, alsook de "
+"gebruikers-sieve-scripts, wanneer het pakket wordt gewist (purged)?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"This question only applies to the default spools and sieve script "
+"directories in /var. If you modified their location in imapd.conf, the new "
+"locations will not be removed; just the old ones in /var."
+msgstr ""
+"Deze vraag heeft enkel betrekking op de standaard spools en de sieve-"
+"scriptmappen in /var. Als u deze locatie heeft gewijzigd in imapd.conf, dan "
+"zal de nieuwe locatie niet verwijderd worden; enkel de oude in /var."
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/pt_BR.po
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/pt_BR.po?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/pt_BR.po (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/pt_BR.po Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+# PO-DEBCONF TEMPLATE FOR cyrus22-imapd.
+# Copyright (C) 2002 Henrique de Moraes Holschuh <hmh at debian.org>
+# This file is distributed under the same license as the cyrus22-imapd package.
+# $Id: pt_BR.po 247 2005-12-29 16:29:27Z sven $
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: cyrus-imapd-2.2 2.1.12-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-05-20 00:16+0200\n"
+"PO-Revision-Date: 2003-03-03 10:45-0300\n"
+"Last-Translator: Henrique de Moraes Holschuh <hmh at debian.org>\n"
+"Language-Team: pt_BR <pt_BR at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid "Database backends have changed!"
+msgstr "Mudança de sistema nas bases de dados!"
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Comparation between /usr/lib/cyrus/cyrus-db-types.txt and /usr/lib/cyrus/"
+"cyrus-db-types.active shows that database backends for Cyrus IMAPd have been "
+"changed."
+msgstr ""
+"Comparação entre /usr/lib/cyrus/cyrus-db-types.txt e /usr/lib/cyrus/cyrus-db-"
+"types.active levam a crer que o sistema de base de dados do Cyrus IMAPd foi "
+"mudado."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"This means that those databases for which the database backends changed "
+"might need to be converted manually to the new format, using the cvt_cyrusdb"
+"(8) utility."
+msgstr ""
+"Isso significa que as bases de dados cujo sistema mudou precisam ser "
+"migradas para o novo sistema manualmente, através do utilitário cvt_cyrusdb"
+"(8)."
+
+#. Type: note
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian.database for "
+"more information. Do not start cyrmaster until you have converted the "
+"databases to the new format."
+msgstr ""
+"Maiores informações estão disponíveis em /usr/share/doc/cyrus-common-2.2/"
+"README.Debian.database. Não inicie cyrmaster até ter convertido o "
+"formatodas bases de dados."
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid "Remove the Cyrus spools, and user sieve scripts?"
+msgstr "Removo as spools do Cyrus e os scripts sieve?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"Should I remove the Cyrus mail and news spools, as well as the user's sieve "
+"scripts, when the package is purged ?"
+msgstr ""
+"Devo remover as áreas de armazenagem (spools) usadas pelo Cyrus, assim como "
+"as áreas usadas para armazenar os scripts sieve dos usuários quando o pacote "
+"for eliminado (purge) do sistema ?"
+
+#. Type: boolean
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"This question only applies to the default spools and sieve script "
+"directories in /var. If you modified their location in imapd.conf, the new "
+"locations will not be removed; just the old ones in /var."
+msgstr ""
+"Apenas as áreas padrão em /var serão removidas. Caso você tenha configurado "
+"outras áreas em imapd.conf, elas não serão removidas."
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/templates.pot
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/templates.pot?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/templates.pot (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/po/templates.pot Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2003-03-03 10:24-0300\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid "Database backends have changed!"
+msgstr ""
+
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Comparation between /usr/lib/cyrus/cyrus-db-types.txt and /usr/lib/cyrus/"
+"cyrus-db-types.active shows that database backends for Cyrus IMAPd have been "
+"changed."
+msgstr ""
+
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"This means that those databases for which the database backends changed "
+"might need to be converted manually to the new format, using the cvt_cyrusdb"
+"(8) utility."
+msgstr ""
+
+#. Description
+#: ../cyrus-common-2.2.templates:3
+msgid ""
+"Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian.database for "
+"more information. Do not start cyrmaster until you have converted the "
+"databases to the new format."
+msgstr ""
+
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid "Remove the Cyrus spools, and user sieve scripts?"
+msgstr ""
+
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"Should I remove the Cyrus mail and news spools, as well as the user's sieve "
+"scripts, when the package is purged ?"
+msgstr ""
+
+#. Description
+#: ../cyrus-common-2.2.templates:19
+msgid ""
+"This question only applies to the default spools and sieve script "
+"directories in /var. If you modified their location in imapd.conf, the new "
+"locations will not be removed; just the old ones in /var."
+msgstr ""
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/pop.pam
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/pop.pam?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/pop.pam (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/pop.pam Sat Aug 26 02:00:13 2006
@@ -1,0 +1,14 @@
+# PAM configuration file for Cyrus POP3 service
+# $Id: pop.pam 5 2005-03-12 23:19:45Z sven $
+#
+# If you want to use Cyrus in a setup where users don't have
+# accounts on the local machine, you'll need to make sure
+# you use something like pam_permit for account checking.
+#
+# Remember that SASL (and therefore Cyrus) accesses PAM
+# modules through saslauthd, and that SASL can only deal with
+# plaintext passwords if PAM is used.
+#
+
+ at include common-auth
+ at include common-account
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/rules
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/rules?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/rules (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/rules Sat Aug 26 02:00:13 2006
@@ -1,0 +1,354 @@
+#!/usr/bin/make -f
+# debian/rules for CMU Cyrus IMAP version 2.3
+# GNU copyright 1997 by Joey Hess.
+# Copyright (c) 2001 by Henrique de Moraes Holschuh
+# Published under the GNU GPL license
+# Based on previous work by Michael-John Turner <mj at debian.org>,
+# David Parker <david at neongoat.com>
+#
+
+# DebHelper control
+export DH_ALWAYS_EXCLUDE=CVS
+
+export MAINPKG=cyrus-common-2.3
+export DOCPKG=cyrus-doc-2.3
+export TMPPKG := $(CURDIR)/debian/tmp
+export PKGDIR := $(CURDIR)/debian/$(MAINPKG)
+export DOCDIR := $(CURDIR)/debian/$(DOCPKG)/usr/share/doc/$(DOCPKG)
+
+export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+# enable dpatch usage
+include /usr/share/dpatch/dpatch.make
+
+# Extra version information to add to Cyrus IMAPd ID
+DEBVERSION:=$(shell LCALL=C dpkg-parsechangelog | sed -ne 's/^Version: \(.*-\)/\1/p')
+EXTRA_IDENT:="Debian-$(DEBVERSION)"
+
+# DB engine version
+DBENGINE=BerkeleyDB4.2
+
+DEBUGFLAGS=-g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ DEBUGFLAGS += -O0
+else
+ DEBUGFLAGS += -O2
+endif
+
+# FOR AUTOCONF 2.52 AND NEWER ONLY
+CONFFLAGS =
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+ CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
+else
+ CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+# Other oddities
+ifneq (,$(findstring strict,$(DEB_BUILD_OPTIONS)))
+ CONFFLAGS += --enable-warnings-are-errors
+endif
+
+# The clean target will remove any and all cruft (as defined by
+# configure ; make distclean ; cd intl; make distclean ).
+# This is done to make sure the build daemon's source tree is the
+# same as the one I am using to produce the i386 debs.
+clean: clean-patched unpatch
+clean-patched: configure
+ dh_testdir
+ dh_testroot
+ -xargs -t -r chmod +x < debian/executable.files
+ -rm -f build-indep-stamp build-arch-stamp configure-stamp install-arch-stamp install-indep-stamp build-stamp
+ -$(MAKE) -i distclean
+ -rm -f config.h config.cache config.status config.log stamp-config confdefs.h
+ -rm -f netnews/Makefile perl/imap/Makefile.old perl/sieve/managesieve/Makefile.old snmp/Makefile Makefile et/Makefile
+ -rm -f doc/pod2htm*
+ -rm -f master/makedepend.log
+ -rm -rf doc/man
+ -rm -f debian/cyrus-db-types.txt debian/cyrus-hardwired-config.txt debian/README.configure-options
+ # -rm -rf et/
+ rm -rf autom4te.cache
+ -xargs -t -r rm -f < debian/deletable.files
+ dh_clean
+
+configure:
+ # ./autogen.sh
+
+build: build-arch build-indep
+
+configure-stamp: patch
+ dh_testdir
+ -rm -f config.sub config.guess
+ cp /usr/share/misc/config.sub config.sub
+ cp /usr/share/misc/config.guess config.guess
+ touch configure.in && touch aclocal.m4 && touch configure
+
+ # IF YOU CHANGE BERKELEY DB VERSION, MAKE SURE TO UPDATE
+ # DBENGINE AT THE TOP OF THIS MAKEFILE!
+ ./configure CFLAGS="-fno-strict-aliasing -fPIC -Wall -pipe $(DEBUGFLAGS)" $(CONFFLAGS) \
+ --with-extraident=$(EXTRA_IDENT) \
+ --prefix=/usr/share --exec-prefix=/usr --libexecdir=/usr/sbin \
+ --bindir=/usr/sbin --sbindir=/usr/sbin \
+ --includedir=/usr/include/cyrus --mandir=/usr/share/man \
+ --datadir=/usr/share/cyrus --sysconfdir=/etc \
+ --with-statedir=/var/state \
+ --sharedstatedir=/usr/share/cyrus \
+ --localstatedir=/var/lib/cyrus \
+ --with-cyrus-prefix=/usr/lib/cyrus --with-lock=fcntl \
+ --with-perl=/usr/bin/perl \
+ --with-openssl=/usr --with-auth=unix \
+ --enable-murder --enable-nntp --enable-replication \
+ --disable-listext --enable-annotatemore --with-sasl=/usr \
+ --enable-idled --with-drac=/usr \
+ --with-cyrus-user=cyrus --with-cyrus-group=mail \
+ --with-tclsh=/usr/bin/tclsh --with-com_err=/usr \
+ --with-pidfile=/var/run/cyrmaster.pid \
+ --with-syslogfacility=MAIL \
+ --with-seen-db=skiplist --with-mboxlist-db=skiplist \
+ --with-ucdsnmp=/usr
+ echo 'To build this package, configure was called as follows:' \
+ > debian/README.configure-options
+ grep with\ options config.status \
+ | sed -e 's/^.*options \\"/configure /;s/\\"$///' \
+ >> debian/README.configure-options
+ sed -i 's/ -lsensors//' master/Makefile
+ touch configure-stamp
+
+build-arch: build-arch-stamp
+build-arch-stamp: configure-stamp
+ dh_testdir
+
+ PERL_MM_OPT="INSTALLDIRS=vendor" $(MAKE)
+ # store database configuration for possible automatic
+ # upgrading later
+ echo "DBENGINE $(DBENGINE)" >>debian/cyrus-db-types.txt
+ grep _db lib/imapoptions \
+ | cut -d, -f1-2 | sed -e 's/{ "//;s/_db", "/ /;s/"$$//' \
+ | sed -e 's/^tls.* /TLS /;s/^subs.* /SUBS /;s/^seen.* /SEEN /;s/^pts.* /PTS /;s/^mbox.* /MBOX /'\
+ | awk '{printf("%s %s\n",toupper($$1),$$2);}' \
+ >>debian/cyrus-db-types.txt
+ mv debian/cyrus-db-types.txt debian/cyrus-db-types.txt.old \
+ && sort -u < debian/cyrus-db-types.txt.old > debian/cyrus-db-types.txt \
+ && rm debian/cyrus-db-types.txt.old
+
+ # store some useful state about the current package
+ echo "PACKAGE_VERSION $(DEBVERSION)" >debian/cyrus-hardwired-config.txt
+ if grep -q -s -n -E '^[[:space:]]*#define[[:space:]]+USE_DIR_FULL[[:space:]]+1' config.h ; then \
+ echo "USE_DIR_FULL 1" >>debian/cyrus-hardwired-config.txt ;\
+ else \
+ echo "USE_DIR_FULL 0" >>debian/cyrus-hardwired-config.txt ;\
+ fi
+
+ touch build-arch-stamp
+
+# We aren't actually able to build arch-indep independently from
+# arch-dep, so we guarantee that the arch build has been done first
+build-indep: build-indep-stamp
+build-indep-stamp: configure-stamp build-arch
+ dh_testdir
+
+ cd doc &&\
+ pod2man ../perl/sieve/scripts/sieveshell.pl > ../man/sieveshell.1 &&\
+ fig2dev -L png murder.fig murder.png &&\
+ rm -f groff-html-*.png pod2htm*
+ cd doc &&\
+ mkdir -p man &&\
+ for man in ../man/*.[1-9] ../debian/*.[1-9]; do \
+ echo "Generating html manpage for $$man..."; \
+ groff -man -Thtml $$man > man/`basename $$man`.html; \
+ done
+ pod2html perl/imap/cyradm.sh > doc/man/cyradm.1.html
+ rm -f pod2htm*
+
+ touch build-indep-stamp
+
+install-arch: build-arch
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs -a
+
+ $(MAKE) install DESTDIR=$(TMPPKG)
+
+ # fix totaly broken location of the include files;
+ # while at it, also avoid namespace collision, and move
+ # lots of admin-only/system-only stuff to sbin and lib
+ # also, do the renaming needed for alternatives
+ # and fix the weird side-effect of setting the proper cyrus
+ # location in configure.
+ mkdir -p $(TMPPKG)/usr/sbin
+ mkdir -p $(TMPPKG)/usr/lib/cyrus
+ for i in master reconstruct quota deliver ; do \
+ mv $(TMPPKG)/usr/lib/cyrus/bin/$$i $(TMPPKG)/usr/sbin/cyr$$i ;\
+ done
+ for i in mbpath ctl_mboxlist ctl_deliver ctl_cyrusdb squatter \
+ tls_prune ipurge cyrdump cvt_cyrusdb chk_cyrus arbitron \
+ cyr_expire unexpunge sync_client sync_reset make_md5 ; do \
+ mv $(TMPPKG)/usr/lib/cyrus/bin/$$i $(TMPPKG)/usr/sbin/$$i ;\
+ done
+ mkdir -p $(TMPPKG)/usr/include
+ mv $(TMPPKG)/usr/share/include/cyrus $(TMPPKG)/usr/include
+ #mv $(TMPPKG)/bin/* $(TMPPKG)/usr/bin
+
+ # Move the perl crap to a saner place
+ mkdir -p $(TMPPKG)/usr/lib
+ mkdir -p $(TMPPKG)/usr/share/perl5
+ #mv $(TMPPKG)/lib/perl5/Cyrus $(TMPPKG)/usr/share/perl5/Cyrus
+ #mv $(TMPPKG)/lib/* $(TMPPKG)/usr/lib
+
+ # for stuff in /etc
+ mkdir -p $(TMPPKG)/etc/cyrus $(TMPPKG)/etc/pam.d
+ install -m 644 debian/imapd.conf $(TMPPKG)/etc
+ install -m 644 debian/cyrus.conf $(TMPPKG)/etc
+ (cd debian ; for i in *.pam ;\
+ do install -m 644 $$i $(TMPPKG)/etc/pam.d/$${i%.pam} ;\
+ done)
+
+ # We rename some utils, so we need to sort out the manpages
+ for i in master reconstruct quota deliver ; do \
+ mv $(TMPPKG)/usr/share/man/man8/$$i.8 $(TMPPKG)/usr/share/man/man8/cyr$${i}.8 ; \
+ done
+
+ # And add our own manpages
+ mkdir -p $(TMPPKG)/usr/share/man/man8
+ install -m 644 debian/cyrdump.8 $(TMPPKG)/usr/share/man/man8/cyrdump.8
+ install -m 644 debian/cyrus-makedirs.8 $(TMPPKG)/usr/share/man/man8/cyrus-makedirs.8
+ install -m 644 debian/arbitronsort.8 $(TMPPKG)/usr/share/man/man8/arbitronsort.8
+
+ # SNMP files
+ mkdir -p $(TMPPKG)/usr/share/snmp/mibs
+ install -m 644 master/CYRUS-MASTER.mib $(TMPPKG)/usr/share/snmp/mibs/CYRUS-MASTER-MIB.txt
+
+ # Install cyradm icons
+ mkdir -p $(TMPPKG)/usr/share/icons/mini
+ install -m 644 debian/cyradm-32x32.xpm $(TMPPKG)/usr/share/icons/cyradm.xpm
+ install -m 644 debian/cyradm-16x16.xpm $(TMPPKG)/usr/share/icons/mini/cyradm.xpm
+
+ # Install debian-provided scripts
+ install debian/cyrus-makedirs $(TMPPKG)/usr/sbin/cyrus-makedirs
+ install -m 644 debian/get-backtrace.gdb $(TMPPKG)/usr/lib/cyrus/get-backtrace.gdb
+
+ # and logcheck files
+ install -m 644 debian/logcheck.ignore \
+ $(PKGDIR)/etc/logcheck/ignore.d.server/cyrus2_3
+ install -m 644 debian/logcheck.violations.ignore \
+ $(PKGDIR)/etc/logcheck/violations.ignore.d/cyrus2_3
+
+ # Install the stuff needed for upgrades
+ for i in convert-sieve.pl dohash rehash undohash translatesieve \
+ upgradesieve masssievec; do \
+ install -m 755 tools/$$i $(PKGDIR)/usr/lib/cyrus/upgrade ;\
+ done
+ install -m 644 debian/cyrus-db-types.upgrading_from_1.5.txt $(PKGDIR)/usr/lib/cyrus/upgrade
+ # And other upgrade helpers
+ install -m 644 debian/cyrus-db-types.txt debian/cyrus-hardwired-config.txt \
+ $(PKGDIR)/usr/lib/cyrus
+ # And other misc useful tools
+ install -m 755 tools/arbitronsort.pl $(TMPPKG)/usr/sbin/arbitronsort
+
+ # Install imtest and its symlinks
+ mv $(TMPPKG)/usr/bin/imtest $(CURDIR)/debian/cyrus-clients-2.3/usr/bin
+ for i in $(TMPPKG)/usr/bin/*test ; do \
+ rm -f "$$i" || true ;\
+ (cd $(CURDIR)/debian/cyrus-clients-2.3/usr/bin &&\
+ ln -s imtest `basename $$i`) ;\
+ done
+
+ # Lintian and Linda overrides
+ cd debian ; \
+ for i in *.linda ; do \
+ mkdir -p "$${i%%.linda}/usr/share/linda/overrides" ;\
+ install -m 644 "$$i" "$${i%%.linda}/usr/share/linda/overrides/$${i%%.linda}" ;\
+ done ;\
+ for i in *.lintian ; do \
+ mkdir -p "$${i%%.lintian}/usr/share/lintian/overrides" ;\
+ install -m 644 "$$i" "$${i%%.lintian}/usr/share/lintian/overrides/$${i%%.lintian}" ;\
+ done
+
+ dh_install -a --sourcedir=$(TMPPKG)
+ touch install-arch-stamp
+
+# We aren't actually able to install arch-indep independently from
+# arch-dep, so we guarantee that the arch build has been done first
+install-indep: build-indep install-arch
+ dh_testdir
+ dh_testroot
+ #dh_clean -k
+ dh_installdirs -i
+
+ # Massage the documentation into place
+ #mkdir -p $(DOCDIR)
+ #find doc/text -name '[Ra-z]*' -type f -exec cp -f {} $(PKGDIR)/usr/share/doc/$(MAINPKG) \;
+ #-(cd $(PKGDIR)/usr/share/doc/$(MAINPKG) && rm copyrights changes htmlstrip.c)
+ #find $(PKGDIR)/usr/share/doc/$(MAINPKG) -type f ! -name '*txt' ! -name '*.*' -exec mv {} {}.txt \;
+
+ # Install the html docs and examples
+ mkdir -p $(DOCDIR)/html
+ install -m 644 doc/*.html doc/murder.png $(DOCDIR)/html
+ cp -a doc/man $(DOCDIR)/html
+ cp -a debian/examples $(DOCDIR)
+ install -m 644 doc/cyrusv2.mc $(DOCDIR)/examples
+
+ # Install contrib/ files
+ mkdir -p $(DOCDIR)/contrib
+ xargs < debian/cyrus-common-2.3.contrib -rti cp -r '{}' $(DOCDIR)/contrib
+
+ dh_install -i --sourcedir=$(TMPPKG)
+
+binary-indep: install-indep
+ dh_testdir -i
+ dh_testroot -i
+# dh_installdebconf -i
+ dh_installdocs -p cyrus-admin-2.3 -p cyrus-doc-2.3
+ dh_installexamples -p cyrus-admin-2.3
+ dh_installmenu -i
+# dh_installlogrotate -i
+# dh_installpam -i
+# dh_installmime -i
+# dh_installcron -i
+ dh_installman -i
+ dh_installchangelogs -p cyrus-admin-2.3 doc/changes.html
+ dh_installchangelogs -p cyrus-doc-2.3
+ dh_strip -i
+ dh_link -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_makeshlibs -i
+ dh_installdeb -i
+ dh_perl -i
+ dh_shlibdeps -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+binary-arch: install-arch
+ dh_testdir -a
+ dh_testroot -a
+ dh_installdebconf -a
+ dh_installdocs -p $(MAINPKG) -p cyrus-clients-2.3 -p libcyrus-imap-perl23
+ dh_installexamples -p $(MAINPKG) -p libcyrus-imap-perl23 -p cyrus-clients-2.3
+ dh_installmenu -a
+# dh_installlogrotate -a
+# dh_installpam -a
+# dh_installmime -a
+ dh_installinit -p $(MAINPKG) --noscripts --name=cyrus2.3
+ dh_installcron -a --name=cyrus23
+ dh_installman -a
+# dh_installinfo -a
+ dh_installchangelogs -p $(MAINPKG) -p cyrus-clients-2.3 doc/changes.html
+ dh_installchangelogs -p libcyrus-imap-perl23 perl/imap/Changes
+ dh_fixperms -a
+ dh_strip -a
+ dh_link -a
+ dh_compress -a
+ dh_fixperms -a
+ dh_makeshlibs -a
+ dh_installdeb -a
+ dh_perl -a
+ dh_shlibdeps -a
+ dh_gencontrol -a
+ dh_md5sums -a
+ dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build build-indep build-arch clean binary-indep binary-arch binary install-arch install-indep clean-patched
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/rules
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/sieve.pam
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/sieve.pam?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/sieve.pam (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/sieve.pam Sat Aug 26 02:00:13 2006
@@ -1,0 +1,14 @@
+# PAM configuration file for Cyrus SIEVE timsieved service
+# $Id: sieve.pam 5 2005-03-12 23:19:45Z sven $
+#
+# If you want to use Cyrus in a setup where users don't have
+# accounts on the local machine, you'll need to make sure
+# you use something like pam_permit for account checking.
+#
+# Remember that SASL (and therefore Cyrus) accesses PAM
+# modules through saslauthd, and that SASL can only deal with
+# plaintext passwords if PAM is used.
+#
+
+ at include common-auth
+ at include common-account
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/source.lintian-overrides
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/source.lintian-overrides?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/source.lintian-overrides (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/source.lintian-overrides Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+cyrus-imapd-2.3 source: source-contains-CVS-dir
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/watch
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/watch?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/watch (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/debian/watch Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+version=2
+ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-(2\.3\..*).tar.(?:gz|bz2)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Makefile
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+/.cvsignore/1.1/Sun Jan 6 20:23:54 2002//Tcyrus-release-2-3-7
+/Makefile.in/1.6.2.1/Mon May 31 18:22:47 2004//Tcyrus-release-2-3-7
+/depot.conf/1.4/Fri Mar 15 22:50:00 2002//Tcyrus-release-2-3-7
+/rc.local.imap/1.2/Thu Aug 2 19:20:41 2001//Tcyrus-release-2-3-7
+/rc.local.ptclient/1.2/Tue Dec 26 19:30:48 2000//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/depot
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,86 @@
+# Makefile for CMU local support
+#
+# @configure_input@
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@
+CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/../lib -I$(srcdir)/../et @CPPFLAGS@
+LIBS = @LIBS@
+DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+
+all:
+
+install:
+ $(srcdir)/../install-sh -d ${DESTDIR}etc
+ $(INSTALL) -m 644 $(srcdir)/depot.conf $(DESTDIR)
+ $(INSTALL) -m 644 $(srcdir)/rc.local.imap $(DESTDIR)etc
+ $(INSTALL) -m 644 $(srcdir)/rc.local.ptclient $(DESTDIR)etc
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
+
+clean:
+ rm -f *.o Makefile.bak makedepend.log
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c \
+ 1>makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/depot.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/depot.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/depot.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/depot.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+usr/local /
+usr/cyrus root.server/usr/cyrus
+etc root.server/etc
+~delete lib/perl5/5.6.1/perllocal.pod
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.imap
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.imap?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.imap (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.imap Sat Aug 26 02:00:13 2006
@@ -1,0 +1,8 @@
+#!/bin/sh
+if [ -d /tmpfs ]; then
+ mkdir /tmpfs/proc
+ chown cyrus /tmpfs/proc
+fi
+
+echo "starting Cyrus system..."
+/usr/cyrus/bin/master &
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.ptclient
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.ptclient?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.ptclient (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/depot/rc.local.ptclient Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+#!/bin/sh
+
+echo -n "Starting ptclient" > /dev/console
+
+ptscache="/var/ptclient/ptscache.db"
+/usr/local/bin/db_load -T -t hash -f /dev/null $ptscache
+touch $ptscache
+chown cyrus $ptscache
+chgrp mail $ptscache
+chmod 660 $ptscache
+
+/bin/su postman -c 'exec /usr/cyrus/bin/doptclient' > /dev/console 2>&1 &
+echo "." > /dev/console
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+man
+murder.png
+netnews.png
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,39 @@
+/.cvsignore/1.3/Wed Oct 22 18:02:52 2003//Tcyrus-release-2-3-7
+/Makefile.dist/1.11/Wed Oct 22 18:50:04 2003//Tcyrus-release-2-3-7
+/altnamespace.html/1.2/Tue Oct 23 20:15:18 2001//Tcyrus-release-2-3-7
+/anoncvs.html/1.3/Sat May 25 19:57:43 2002//Tcyrus-release-2-3-7
+/bugs.html/1.27.2.1/Wed Mar 24 19:52:57 2004//Tcyrus-release-2-3-7
+/changes.html/1.71.2.50/Tue Jun 27 15:58:40 2006//Tcyrus-release-2-3-7
+/cyrusv2.mc/1.4/Thu Aug 23 23:26:56 2001//Tcyrus-release-2-3-7
+/faq.html/1.35.2.1/Wed Mar 24 19:52:58 2004//Tcyrus-release-2-3-7
+/feedback.html/1.6/Fri Aug 15 17:37:04 2003//Tcyrus-release-2-3-7
+/index.html/1.12.2.1/Sat Apr 3 19:08:11 2004//Tcyrus-release-2-3-7
+/install-admin-mb.html/1.3.10.1/Thu Jun 24 15:16:22 2004//Tcyrus-release-2-3-7
+/install-auth.html/1.12/Mon Jul 28 02:47:09 2003//Tcyrus-release-2-3-7
+/install-compile.html/1.16.2.1/Tue Jan 27 23:13:36 2004//Tcyrus-release-2-3-7
+/install-configure.html/1.30.2.3/Thu Feb 12 05:32:32 2004//Tcyrus-release-2-3-7
+/install-murder.html/1.19.2.1/Wed Nov 5 00:54:03 2003//Tcyrus-release-2-3-7
+/install-netnews.html/1.2.2.3/Fri Feb 6 18:48:12 2004//Tcyrus-release-2-3-7
+/install-perf.html/1.10/Thu Jan 2 19:23:11 2003//Tcyrus-release-2-3-7
+/install-prereq.html/1.12/Wed Oct 22 18:50:04 2003//Tcyrus-release-2-3-7
+/install-replication.html/1.1.2.4/Mon Jul 10 14:04:22 2006//Tcyrus-release-2-3-7
+/install-sieve.html/1.4/Tue Oct 23 18:14:48 2001//Tcyrus-release-2-3-7
+/install-snmpmon.html/1.1/Tue Apr 25 02:56:42 2000//Tcyrus-release-2-3-7
+/install-testing.html/1.3/Thu Aug 22 13:49:30 2002//Tcyrus-release-2-3-7
+/install-upgrade.html/1.32.2.7/Mon Jul 10 13:46:20 2006//Tcyrus-release-2-3-7
+/install-virtdomains.html/1.2.2.1/Thu Jan 15 20:24:25 2004//Tcyrus-release-2-3-7
+/install.html/1.9.2.1/Thu Apr 14 17:03:57 2005//Tcyrus-release-2-3-7
+/mailing-list.html/1.5/Mon Feb 24 23:56:23 2003//Tcyrus-release-2-3-7
+/man.html/1.15.2.3/Wed Mar 30 21:44:25 2005//Tcyrus-release-2-3-7
+/murder.fig/1.4.8.1/Wed Feb 4 20:26:27 2004//Tcyrus-release-2-3-7
+/netnews.fig/1.2/Wed Oct 22 18:02:53 2003//Tcyrus-release-2-3-7
+/notes.html/1.2/Sat May 25 19:57:43 2002//Tcyrus-release-2-3-7
+/os.html/1.4/Sun Nov 18 19:50:43 2001//Tcyrus-release-2-3-7
+/overview.html/1.21.2.3/Tue Jul 27 13:13:42 2004//Tcyrus-release-2-3-7
+/questions.html/1.3/Thu Oct 16 15:33:31 2003//Tcyrus-release-2-3-7
+/readme.html/1.19.2.1/Mon Jul 10 14:04:22 2006//Tcyrus-release-2-3-7
+/sieve-protocol.html/1.3/Fri May 2 17:01:57 2003//Tcyrus-release-2-3-7
+/sieve.html/1.1/Tue Apr 25 02:56:46 2000//Tcyrus-release-2-3-7
+/specs.html/1.50.2.32/Fri Jun 16 15:10:28 2006//Tcyrus-release-2-3-7
+D/internal////
+D/text////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/doc
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/Makefile.dist
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/Makefile.dist?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/Makefile.dist (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/Makefile.dist Sat Aug 26 02:00:13 2006
@@ -1,0 +1,19 @@
+# $Id: Makefile.dist,v 1.11 2003/10/22 18:50:04 rjs3 Exp $
+dist:
+ mkdir -p man
+ for man in ../man/*.[1-9]; \
+ do \
+ echo "=== $$man ==="; \
+ groff -man -Thtml $$man > man/`basename $$man`.html; \
+ done
+
+ pod2html ../perl/imap/cyradm.sh > man/cyradm.1.html
+ pod2man ../perl/sieve/scripts/sieveshell.pl > ../man/sieveshell.1
+ pod2html ../perl/sieve/scripts/sieveshell.pl > man/sieveshell.1.html
+
+ rm -f groff-html-*.png pod2htm*
+
+ fig2dev -L png murder.fig murder.png
+ fig2dev -L png netnews.fig netnews.png
+
+ (cd text; make)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/altnamespace.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/altnamespace.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/altnamespace.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/altnamespace.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,94 @@
+<HTML><HEAD>
+<title>Cyrus IMAP Server: Altername Namespace</title>
+<!-- $Id: altnamespace.html,v 1.2 2001/10/23 20:15:18 leg Exp $ -->
+</HEAD><BODY>
+<H1> Cyrus IMAP Server: Alternate Namespace</H1>
+
+<p>This document describes the alternatives to the <a
+href=overview.html#mboxname> standard</a> mailbox presentation
+method. These alternatives may be used together or independently.
+
+<p>The namespace options do NOT change the rules governing the behavior of
+mailboxes (as described in <a href=overview.html#mboxname>
+overview.html</a>) or how mailboxes are stored on the filesystem. The
+mailboxes are ALWAYS stored using the <a href=overview.html#mboxname>
+<tt>netnews</tt> convention</a> and <a href=overview.html#mboxnamestd>
+internal namespace</a>. When configured to use one (or both) of the
+options below, the server simply translates mailbox names between the
+internal names and the external names when used by the client in the
+IMAP protocol and in Sieve scripts.
+
+<p>This design allows the namespace to be changed at runtime (even on
+a running server) without having to reconfigure the server. This also
+means that one mailstore can support multiple namespaces if configured
+correctly.
+
+<p><b>NOTE:</b> If you are upgrading an existing server which
+uses <tt>timsieved</tt> to manage Sieve scripts and choose to enable
+one of the namespace options, you should run the script
+"<tt>tools/translatesieve</tt>" after configuring the namespace
+option(s). This script will translate the folder names in
+<tt>fileinto</tt> actions.
+
+<H2><a name="altname">Alternate Mailbox Namespace</a></H2>
+
+<p>The alternate namespace allows a user's personal mailboxes to
+appear as if they reside at the same level as that user's
+<TT>INBOX</TT> as opposed to children of it. For example, if user
+"<TT>bovik</TT>" had a personal "<TT>work</TT>" mailbox, it would
+appear to user "<TT>bovik</TT>" as "<TT>work</TT>" instead of
+"<TT>INBOX.work</TT>" as it would in the <a
+href=overview.html#mboxnamestd> standard namespace</a>.
+
+<p>This configuration requires that a special prefix be used for
+shared folders (to distinguish them from personal folders) and for
+accessing other users' folders. By default, the prefix for shared
+folders is "<tt>Shared Folders</tt>" and the prefix for other users
+folders is "<tt>Other Users</tt>". For example, a shared folder
+"<tt>foo</tt>" in the <a href=overview.html#mboxnamestd> standard
+namespace</a> would be presented as "<tt>Shared Folders.foo</tt>" in
+the alternate namespace.
+
+<p><b>NOTE:</b> All tools for administering the server, including
+admins using cyradm, always use the <a href=overview.html#mboxnamestd>
+internal namespace</a>.
+
+<H3><a name="altnameconfig">Configuring the Alternate
+Namespace</a></H3>
+
+<p>To use the alternate namespace, turn on the <tt>altnamespace</tt>
+option in <tt>/etc/imapd.conf</tt>. The prefixes used for shared
+folders and other users folders can be changed from the defaults by
+setting the <tt>sharedrefix</tt> and <tt>userprefix</tt> options
+respectively.
+
+<H2><a name="unixhiersep">UNIX Hierarchy Convention</a></H2>
+
+<p>The UNIX hierarchy convention uses the traditional UNIX separator
+character ("/") to delimit levels of the mailbox hierarchy instead of
+the <tt>netnews</tt> character ("."). For example, if user
+"<tt>bovik</tt>" had a personal "<tt>work</tt>" mailbox, it would
+appear to user "<tt>bovik</tt>" as "<tt>INBOX/work</tt>" in the
+<a href=overview.html#mboxnamestd>standard namespace</a>.
+
+<p> When the UNIX hierarchy convention is used, the "." character MAY
+be used in mailbox names, including user names. In order to maintain
+backwards compatibility with the <a
+href=overview.html#mboxnamestd>internal namespace</a>, all "."
+characters are translated to a benign character (currently
+"^") before any data is stored to disk. For example, if user
+"<tt>elmer.fudd</tt>" had a personal "<tt>rabbit.holes</tt>" mailbox,
+it would be stored as "<tt>user.elmer^fud.rabbit^holes</tt>" in the <a
+href=overview.html#mboxnamestd>internal namespace</a>. It is
+important to remember this phenomenon if/when reverting back to the
+<tt>netnews</tt> hierarchy convention.
+
+<H3><a name="unixhiersepconfig">Configuring the UNIX Hierarchy
+Convention</a></H3>
+
+<p>To use the UNIX hierarchy separator, turn on the
+<tt>unixhierarchysep</tt> option in <tt>/etc/imapd.conf</tt>.
+
+<P><HR><P>
+<A HREF="index.html">Return</A> to the Cyrus IMAP Server Home Page
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/anoncvs.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/anoncvs.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/anoncvs.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/anoncvs.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+<html>
+ <title> Cyrus IMAP: Anonymous CVS Access </title>
+ <!-- $Id: anoncvs.html,v 1.3 2002/05/25 19:57:43 leg Exp $ -->
+
+ <body>
+ <h1>Cyrus IMAP: Anonymous CVS Access</h1>
+
+ This file is for those who are reading Cyrus sources via anonymous CVS,
+ or those who would like to.
+
+ If you're someone who would like to work with the source code and get more
+ frequent updates, keeping in mind that we take some liberties with proper
+ CVS use, you might want to get Cyrus via anonymous CVS.
+
+ <blockquote>
+ <b>
+ If you're not a programmer, please don't do this. If you're not at
+ least a little experienced with C, configure, and IMAP, please stick
+ with the tarball releases at ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.
+ </b>
+ </blockquote>
+
+ <p>
+ To get to the repository, get a version of CVS with client-server support
+ (anything remotely recent has this, I think) and do this:
+
+ <p>
+ <tt>
+ cvs -d :pserver:anoncvs at cvs.andrew.cmu.edu:/cvs login <br>
+ <i>(enter "anonymous" as the password)</i> <br>
+ cvs -d :pserver:anoncvs at cvs.andrew.cmu.edu:/cvs co -d cyrus-imapd
+ cyrus<br>
+
+ </tt>
+
+ (the first -d specifies the CVSROOT, in this case, our CVS server, and a
+ path to the CVS repository; co says "check out", -d says "and stick it
+ in the directory cyrus-imapd", and "cyrus" specifies the "cyrus"
+ collection). The password is "anonymous".
+
+ <p>
+ You will need autoconf (v2.12) to build CVS from the repository because
+ we don't keep the configure script in the repository, along with the
+ usual tools to build Cyrus (a compiler, a Unix box, a network.)
+
+ <p>
+ Read access to the repository is availible to anyone via
+ cvs.andrew.cmu.edu. Write access is availible to only a few people at
+ CMU.
+
+ <p>
+ Please note that the version in the repository is not the version we are
+ running. We have a seperate system that resembles version control for
+ releases of software on the Andrew system, and sometimes changes don't
+ get propigated back to CVS.
+
+ <p>
+ What is here is supposed to be stable. It's supposed to work, and
+ compile, and not have amazingly broken changes that can't possibly work.
+ But that may not be the case--and since you decided to use CVS, you
+ shouldn't complain when something doesn't work. You should submit a
+ patch.
+
+ <p>
+ There is no warranty on the Cyrus software.
+ There is no warranty on anything in CVS, and even less of a guarantee
+ of it working. (There. You've been warned.)
+
+<p>Please refer to <a href="feedback.html">Sending Feedback</a> if you
+would like to submit a bug, feature request or (best of all) patch.
+
+ <p>
+ Thanks to Ryan Troll for putting the time in to make the CVS server
+ work and actually documenting it.
+ </p>
+
+
+<P><HR>
+last modified: $Date: 2002/05/25 19:57:43 $
+<br>
+<A HREF="index.html">Return</A> to the Cyrus IMAP Server Home Page
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/bugs.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/bugs.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/bugs.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/bugs.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,133 @@
+<HTML><HEAD>
+<TITLE>Changes to the Cyrus IMAP Server</TITLE>
+<!-- Changed by: Larry Greenfield 15-Aug-1999 -->
+<!-- Changed by: Larry Greenfield 01-Jul-1999 -->
+<!-- Changed by: Tim Showalter 16-Jun-1997 -->
+<!-- $Id: bugs.html,v 1.27.2.1 2004/03/24 19:52:57 ken3 Exp $ -->
+</HEAD><BODY>
+<h1> Known bugs in the Cyrus IMAP Server</h1>
+
+<p>We're working on moving to a <a
+href="http://www.mozilla.org/bugs/">Bugzilla database</a>. It's still
+being built up, but you can search/add to it <a
+href="http://bugzilla.andrew.cmu.edu">here</a>. Eventually, all the
+bugs below will be in there.</p>
+
+<h3>imapd and core utilities</h3>
+
+<ul>
+<li> Multiple APPENDs don't always correctly return the EXISTS
+response. (can't reproduce?)
+
+<li> Particularly large quotas can wrap around.
+
+<li> The RENAME command is not atomic.
+
+<li> <tt>reconstruct</tt> doesn't deal with the <tt>mailboxes.db</tt> file.
+
+<li> we should deal with having to reset UIDs
+
+<li> the algorithm used for naming stage files is fragile and not
+threadsafe.
+
+<li> during appendstage(), the message is parsed once per delivery,
+not once at the beginning.
+
+<li> <tt>master</tt> should pay attention to processes that have told
+it they are listening, and make sure they don't die abnormally.
+likewise, it should be on the lookout for continually forking
+services.
+
+<li> <tt>master</tt> should probably have a babysitting service
+("always keep this process running").
+
+</ul>
+
+<h3>proxyd and Cyrus Murder</h3>
+<ul>
+<li> RENAME across servers isn't implemented.
+
+<li> Tagged lines with literals can cause problems for <tt>proxyd</tt>.
+
+</ul>
+
+<h3>lmtpd, deliver, and sieve</h3>
+
+<ul>
+<li> 8-bit set characters are coerced to 'X', but not before the notify_zephyr
+code (if used) has had a chance to send them out.
+
+<li> Deliver does not handle messages containing NUL properly due to
+stdio problems (the characters between the NUL and the LF will be
+lost.)
+
+<li> Deliver doesn't gracefully handle CR CR sequences in messages.
+Well, ok, it hangs.
+
+</ul>
+
+<h3>authentication and authorization</h3>
+
+<ul>
+<li>Using AFS groups with ptclient, users with negative rights as part of
+groups may be granted access to mailboxes if ptclient has died. We plan
+to have this fixed eventually.
+
+<li> In some failures of the krbck program, the error messages printed out
+bear no resemblance to what actually went wrong.
+</ul>
+
+<h3>other utilities</h3>
+
+<ul>
+<li> <tt>cyradm</tt> may need to change authname/username stuff.
+Something to check.
+
+<li> <tt>imtest</tt>: it would be nice for the authorization name to
+default to the authentication name, except when specifically
+overridden.
+
+<li> any utilities doing db operations should catch signals and poll
+for them to see if it should exit (like mbpath, ipurge).
+
+<li> <tt>imtest</tt> uses <tt>getpass()</tt> to grab passwords from
+users. On some systems (Solaris reported), this will only return the
+first 8 characters, causing authentication failures.
+
+</ul>
+
+<h3>libraries</h3>
+
+<h1> Things we want to do</h1>
+
+<ul>
+<li> Implement the IMAP VIEW extension.
+
+<li> Implement the IMAP ANNOTATE extension.
+
+<li> Implement some sort of backup/restore system that's more
+efficient and easier to use than Amanda on the filesystem.
+
+<li> Add mailbox version numbers.
+
+<li> Add mailbox tombstones (gives NEWNAME support).
+
+<li> Design and implement ALIST, the advanced list command.
+
+<li> Investigate changing from the prot layer to using sfio.
+
+<li> Write a test module for lmtpengine.
+
+<li> Allow renaming users. (RENAME user.joe user.harry.) Needs to
+move all metadata per-user data. (seen, subscriptions, sieve state?)
+</ul>
+
+<p>
+<p>Please refer to <a href="feedback.html">Sending Feedback</a> if you
+would like to submit a bug, feature request or (best of all) patch.
+
+<P><HR>
+Last update: $Date: 2004/03/24 19:52:57 $
+<br>
+<A HREF="index.html">Return</A> to the Cyrus IMAP Server Home Page
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/changes.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/changes.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/changes.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/changes.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2147 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- $Id: changes.html,v 1.71.2.50 2006/06/27 15:58:40 murch Exp $ -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<title>Changes to the Cyrus IMAP Server</title>
+</head>
+<body>
+
+<h1>Changes to the Cyrus IMAP Server since 2.3.6</h1>
+<ul>
+<li>Fixed problems with replication and virtual domains.</li>
+<li>Fixed problems with newer cyrus.index files on 64-bit
+machines.</li>
+<li>Added '<tt>-p <ssf></tt>' option to services so
+that PLAIN authentication can be used without TLS in secure
+environments.</li>
+<li>Added <tt>munge8bit</tt> to control whether unencoded 8-bit
+characters in headers are changed to 'X' or are left alone.</li>
+<li>Added <tt>sieve_allowreferrals</tt> option to control whether
+<tt>timsieved</tt> issues referrals or proxys traffic to backends.</li>
+<li>Fixed miscellaneous bugs and build issues.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.3.5</h1>
+<ul>
+<li>Fixed COPY code so that clients display new messages (added MODSEQ).</li>
+<li>Fixed imtest to be compatible with SASL 2.1.22.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.3.4</h1>
+<ul>
+<li>Fixed append/delivery code so that clients display new messages.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.3.3</h1>
+<ul>
+<li>Added support for BINARY APPEND (including CATENATE).
+<i>Based on contributions from Tom Esh <esh at lucent.com></i>.</li>
+<li>Added support for CONDSTORE (must be enabled on a per-mailbox
+basis with the <tt>/vendor/cmu/cyrus-imapd/condstore</tt> mailbox
+annotation.</li>
+<li>Fixed bug in reconstruct using bad name for cyrus.header.</li>
+<li>Fixed bug with replication and default partition.</li>
+<li><tt>ctl_mboxlist</tt> now dumps/undumps the mailbox type flags,
+making it useful for remote mailboxes.</li>
+<li>Better logging to facilitate message tracking (Wes Craig
+<wes at umich.edu>).</li>
+<li>Implemented CAPABILITY response in banner and after authentication.</li>
+<li>Fixed miscellaneous bugs and build issues.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.3.2</h1>
+<ul>
+<li>Fixed broken berkeley (btree) backend.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.3.1</h1>
+<ul>
+<li>Added more extensive output to arbitron.</li>
+<li>Allow responses of any length from backend when proxing
+IMAP/POP3/NNTP traffic.</li>
+<li>Properly handle timeouts when proxying.</li>
+<li>Added plaintextloginalert option.</li>
+<li>Fixed segfault in deliver.</li>
+<li>Only allow mbpath to be run as Cyrus user.</li>
+<li>Added nntptimeout option for nntpd.</li>
+<li>Added berkeley_hash and berkeley_hash_nosync cyrusdb backends
+(seem to perform better under heavy loads).</li>
+<li>Added TLS support to cyradm.</li>
+<li>Fixed miscellaneous bugs and build issues.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.3.0</h1>
+<ul>
+<li>Updated ACL code to RFC 4314 (separate rights for message delete,
+mailbox delete, and expunge).</li>
+<li>Fixed IDLE to use idled for local mailboxes.</li>
+<li>Fixed miscellaneous build issues.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.x</h1>
+<ul>
+<li>Added support for "unified" and "replicated" Murders. A Murder no
+longer has to have discrete frontend and backend servers; any one
+"unified" server can both proxy and serve local mailboxes (proxy
+functionality in <tt>proxyd</tt> and <tt>lmtpproxyd</tt> has been
+merged with <tt>imapd</tt> and <tt>lmtpd</tt> respectively), or all
+"replicated" servers can serve the same mailboxes from a shared
+filesystem. The new <tt>mupdate_config</tt> option in
+<tt>imapd.conf</tt> is used to determine whether a Murder is using a
+"traditional", "unified" or "replicated" configuration.</li>
+<li>Ported/rewrote/integrated David Carter's mailspool replication
+code. <i>Development sponsored by Columbia University</i>.</li>
+<li>Added support for "delayed" expunge, in which messages are
+removed from the mailbox index at the time of the EXPUNGE (hiding them
+from the client), but the message files and cache entries are left
+behind, to be purged at a later time by <tt>cyr_expire</tt>. This
+reduces the amount of I/O that takes place at the time of EXPUNGE and
+should result in greater responsiveness for the client, especially
+when expunging a large number of messages. The new <tt>expunge_mode</tt>
+option in <tt>imapd.conf</tt> controls whether expunges are
+"immediate" or "delayed". <i>Development sponsored by FastMail</i>.</li>
+<li>Added support to place some/all mailbox metadata files (cyrus.*
+files) on a separate (probably high-speed) partition. See the new
+<tt>metapartition</tt> and <tt>metapartition_files</tt> options for
+details. <i>Development sponsored by FastMail</i>.</li>
+<li>Added support for accessing subfolders of INBOX via POP3. See the
+new <tt>popsubfolders</tt> option for details. <i>Development
+sponsored by FastMail</i>.</li>
+<li>Added support to <tt>lmtpd</tt> to do "fuzzy" mailbox matching
+on user+detail addresses. See the new
+<tt>lmtp_fuzzy_mailbox_match</tt> option for details. <i>Development
+sponsored by FastMail</i>.</li>
+<li>Added new <tt>sieve_extensions</tt> option to allow individual
+Sieve extensions to be enabled/disabled.</li>
+<li>The Sieve "include" extension is now supported. This also allows
+for global sieve scripts. See the new <tt>sieve_extensions</tt>
+options to enable it.</li>
+<li>The Sieve "body" extension is now supported. See the new
+<tt>sieve_extensions</tt> option to enable it. <i>Development
+sponsored by FastMail</i>.</li>
+<li>The $text$ variable for Sieve notify messages is now supported.
+<i>Development sponsored by FastMail</i>.</li>
+<li>The MIME structure of a new message destined for multiple
+recipients is now only parsed once rather than once per delivery,
+resulting in better performance. <i>Development sponsored by
+FastMail</i>.</li>
+<li>Support 64-bit quota usage (both per mailbox and for the entire
+quotaroot), based on a patch from Jeremy Rumpf. <i>Development
+sponsored by FastMail</i>.</li>
+<li>Added new <tt>flushseenstate</tt> option which causes imapd to
+immediately flush changes in \Seen state to disk rather than caching
+them until the mailbox is closed. Enabling this option may fix \Seen
+state weirdness with MS Outlook, at the expense of
+performance/scalability. <i>Based on a patch by John A. Tamplin
+(jtampli at sph.emory.edu).</i></li>
+<li>The Sieve "copy" extension is now supported.</li>
+<li>The IMAP "CATENATE" and "URLAUTH" extensions are now supported.</li>
+<li>Updated Sieve "vacation" extension to draft-ietf-sieve-vacation-04.</li>
+<li>Added support for Sieve scripts on shared mailboxes via the
+/vendor/cmu/cyrus-imapd/sieve annotation.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.11</h1>
+<ul>
+<li>Revert index change which wasn't supposed to make it into 2.2.11</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.10</h1>
+<ul>
+<li>Fix possible single byte overflow in mailbox handling code.</li>
+<li>Fix possible single byte overflows in the imapd annotate extension.</li>
+<li>Fix stack buffer overflows in fetchnews (exploitable by peer news server),
+backend (exploitable by admin), and in imapd (exploitable by users though only on platforms where a filename may be larger than a mailbox name).</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.9</h1>
+<ul>
+<li>Fix 0 termination in mysasl_canon_user.</li>
+<li>Check for imap magic plus buffer overflow in proxyd also (CAN-2004-1015).</li>
+<li>Only send an over quota ALERT on SELECT if the quotaroot is different
+from the last ALERT, or we haven't sent an ALERT in over 10 min.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.8</h1>
+<ul>
+<li>Change ACLs correctly when renaming a user</li>
+<li>Do not abandon std{in,out,err} file descriptors; syslog assumes it can
+use stderr if syslogd isn't running.</li>
+<li>Clean up imap magic plus to avoid buffer overrun (CAN-2004-1011)</li>
+<li>Fix lack of bounds checking in PARTIAL and FETCH (CAN-2004-1012, CAN-2004-1013)</li>
+<li>Do not attempt to reuse a freed connection in lmtpproxyd.</li>
+<li>Allow login without authentication with -N switch in proxyd.</li>
+<li>Fix use of xrealloc and fold pointers in lmtpengine.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.7</h1>
+<ul>
+<li>Fix a double-free bug in the notify code</li>
+<li>Fix a problem with idled and an empty mailbox list</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.6</h1>
+<ul>
+<li>Fix handling of PARTIAL command and partial body fetches</li>
+<li>A large number of portability fixes supplied by Albert Chin
+<china at thewrittenword.com></li>
+<li>Added <tt>client_timeout</tt> option to control connect() timeouts
+for proxy code</li>
+<li>Added <tt>popuseacl</tt> option</li>
+<li>Fix a number of issues with the <tt>quota -f</tt> tool</li>
+<li>Fix thread safety issue in saslserver()</li>
+<li>Fix possible stage file leak in append code</li>
+<li>Fix bugs in handling of MULTIAPPEND introduced in 2.2.3</li>
+<li>Fixed regression bug in Sieve vacation</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.5</h1>
+<ul>
+<li>Fix a bug in the proxy code where a backend connection might get closed
+twice</li>
+<li>Improved consistancy checking in <tt>chk_cyrus</tt></li>
+<li>Fix segfault in APPEND code</li>
+<li>Fix a bug with an interaction between sieve and unixhierarchysep</li>
+<li>Fix a file descriptor leak in the quotadb code</li>
+<li>Fix a triggered assertation in service-thread services</li>
+<li>Add a number of internal consistancy checks to the skiplist code</li>
+<li>Allow <tt>mbpath</tt> to handle virtual domains</li>
+<li>Fix various MANAGESIEVE client authentication issues</li>
+<li>Other minor fixes</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.4</h1>
+<ul>
+<li>Bug fixed in hash table code that could sometimes cause crashes with
+the quotalegacy database</li>
+<li>Net-SNMP compatibility</li>
+<li>Significantly improved com_err detection</li>
+<li>Assorted minor NNTP improvements</li>
+<li>Assorted other minor bugfixes</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.3</h1>
+<ul>
+<li>Quota now uses the cyrusdb interface (<tt>quotalegacy</tt> by
+default).</li>
+<li>All incoming messages are now staged to disk before locking the
+destination mailbox (locks are no longer held during a network
+read).</li>
+<li>Fixed off-by-one error in <tt>fetchnews</tt> (articles are no longer
+skipped).</li>
+<li><tt>nntpd</tt> now uses the Followup-To: header (if exists) instead of
+the Newsgroups: header when constructing post address(es) and adds them
+to the Reply-To: header instead of the To: header.</li>
+<li>Added <tt>berkeley_locks_max</tt>, <tt>berkeley_txns_max</tt> and
+<tt>berkeley_cachesize</tt> options.</li>
+<li>Added <tt>imapmagicplus</tt> option.</li>
+<li>Substantial work on afspts/ptloader canonicalization code</li>
+<li>Much improved LDAP ptloader code (no more internal OpenLDAP dependencies)</li>
+<li>Fixed a number of IPv6 related bugs</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.2</h1>
+<ul>
+<li>Berkeley DB 4.2 Support - note that the Cyrus Berkeley
+enviroment needs to be reset (db_recover) before
+a Berkeley DB version upgrade or you need to remove all berkeley dbs.
+Special care needs to be taken when berkley db is used for mboxlist.</li>
+<li>Runtime configuration of the Cyrus databases. The cyrudb backend
+used for each database can be specified with an <tt>imapd.conf</tt>
+option. <b>NOTE:</b> You MUST convert the database using
+<tt>cvt_cyrusdb</tt> BEFORE changing the backend in <tt>imapd.conf</tt>.
+<li>Sendmail socket map support (<tt>smmapd</tt>) for verifying that
+mailboxes exist and are deliverable before accepting the message and
+sending it to Cyrus.</li>
+<li>New <tt>userid</tt> mode for virtual domains, which does NOT do
+reverse lookups of the IP address.</li>
+<li><tt>nntpd</tt> now supports the Xref header.</li>
+<li><tt>nntpd</tt> can now use the POST command to feed articles to
+upstream servers.</li>
+<li><tt>fetchnews</tt> can now be used with NNTP servers which don't support
+the NEWNEWS command.</li>
+<li><tt>lmtpd</tt> now initializes <tt>duplicate.db</tt> only when it
+is necessary (when using Sieve or <tt>duplicatesuppression</tt>).</li>
+<li>Sieve now verifies that text strings are valid UTF-8.</li>
+<li>Sieve now verifies that address tests and envelope tests are done
+on headers which contain addresses (can be disabled with
+<tt>rfc3028_strict: no</tt>).</li>
+<li>Services will now notice that a new binary has been installed and
+will restart using the new binary once the existing connection is
+closed.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.1</h1>
+
+<ul>
+<li>Major bugfixes in murder altnamespace/unixhierarchysep/virtdomain
+support (Thanks in large part to work by Christian Schulte <cs at schulte.it>)</li>
+<li>Improved master process accounting (Henrique de Moraes Holschuh
+<hmh at debian.org>)</li>
+<li>Significantly improved message header caching (based in large part
+on code supplied by David Carter <David.Carter at ucs.cam.ac.uk> from
+the University of Cambridge)
+<li>The sieve bytecode format has been updated once more, to correctly
+handle short-circuiting of the allof and anyof operators</li>
+<li>Support for warning quota based on absolute mailbox size</li>
+<li>Correct handling of annotations during XFER operations</li>
+<li>Simple support for IMAP BINARY extension</li>
+<li>Support for Automake 1.7 and Autoconf 2.57</li>
+<li>Support for IMAP initial SASL response (the SASL-IR extension)</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.2.0</h1>
+
+<ul>
+<li>The improved directory hashing (fulldirhash) is now a runtime
+configuration option.</li>
+<li>The netnews.db has been integrated into deliver.db.</li>
+<li>Full r/w ANNOTATEMORE support, including more annotations that
+allow the control of operations such as message expiration.
+ANNOTATEMORE is also always enabled now.</li>
+<li><tt>expirenews</tt> has been replaced by <tt>cyr_expire</tt> which
+uses annotations for fine-grained mailbox expiration.</li>
+<li><tt>squatter</tt> can now use annotations for fine-grained mailbox
+indexing.</li>
+<li>Many nntpd enhancements including: reader-only and feeder-only
+modes, support for LIST NEWSGROUPS (via mailbox annotations) and
+gatewaying news to mail (via mailbox annotations).</li>
+<li><tt>fetchnews</tt> can now authenticate to the remote server.</li>
+<li>Removed deprecated LAST command from pop3d.</li>
+<li>Sieve Bytecode is now stored in network byte order, meaning that
+bytecode files can be freely moved between different platforms</li>
+<li>Sieve relational extension now working again.</li>
+<li>Sieve vacation now uses the correct subject.</li>
+<li>A large number of bugs involving virtual domain support have been
+fixed, including issues with the Murder, and with Sieve.</li>
+</ul>
+
+<h1>Changes to the Cyrus IMAP Server since 2.1.x</h1>
+
+<ul>
+<li>There have been extensive performance and consistancy changes to
+the configuration subsystem. This will both ensure greater consistancy
+between the documentation and the code, as well as a more standard format
+for specifing service-specific configuration options in imapd.conf. Important
+changes are detailed here:
+<ul>
+ <li> The tls_[service]_* configuration options have been removed. Now
+use [servicename]_tls_*, where servicename is the service identifier from
+cyrus.conf for that particular process.</li>
+ <li> Administrative groups (e.g. admins and lmtp_admins) no longer union,
+service groups completely override the generic group. </li>
+ <li> lmtp_allowplaintext is no longer a defined parameter and must
+be specified using the service name of your lmtp process if you
+require a specific value</li>
+</ul></li>
+
+<li> libcyrus has been split into libcyrus_min and libcyrus, so as to allow
+sensative applications (such as master) include the least amount of code
+necessary for operation </li>
+
+<li> Virtual domain support. See the <a
+href="install-virtdomains.html">virtual domains</a> document for
+details.</li>
+
+<li> Users can now be renamed (even across domains). Note that this
+is not atomic and weirdness may occur if the user is logged in during
+the rename. See the <tt>allowusermoves</tt> option in
+<tt>imapd.conf(5)</tt> for details.</li>
+
+<li> The <tt>db3</tt> and <tt>db3-nosync</tt> database backends have
+been renamed to <tt>berkeley</tt> and <tt>berkeley-nosync</tt>
+respectively (to avoid confusion over whether or not db4 is supported).</li>
+
+<li> The default mailbox list and seen state database formats have changed
+to skiplist from Berkeley and Flat, respectively. </li>
+
+<li> ptloader is now a regular cyrus service. This has several implications,
+see <a href=install-upgrade.html>install-upgrade.html</a> for more details.</li>
+
+<li> NNTP support. Usenet news can now be fed to and read from Cyrus
+directly via NNTP, without the need for a local news server. See <a
+href="install-netnews.html">netnews</a> document for details.</li>
+
+<li>IPv6 support, provided by Hajimu UMEMOTO <ume at mahoroba.org></li>
+
+<li> Sieve scripts are now compiled to bytecode to allow for faster
+execution (and lmtpd no longer needs lex or yacc). See
+<a href=install-upgrade.html>install-upgrade.html</a> for more details.</li>
+
+<li> The functionality of pop3proxyd has been merged into pop3d. Be
+sure to update <tt>cyrus.conf</tt> on your frontend machines accordingly.</li>
+
+<li> The functionality of <tt>ctl_deliver -E</tt> has been moved to
+<tt>cyr_expire -E</tt>. Be sure to update <tt>cyrus.conf</tt> on your
+machines accordingly.</li>
+
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.14</h2>
+<ul>
+<li>Correct a potential DOS attack in the fud daemon.</li>
+<li>Arbitron now works again</li>
+<li>Telemetry logging for mupdate</li>
+<li>Duplicate Suppression logging for redirect sieve actions</li>
+<li>A number of bugs in reconstruct have been fixed. also added the -p and -x
+options</li>
+<li>Better stubbing out of user_deleteacl</li>
+<li>No longer log any shutdown() failures</li>
+<li>Improved IPv6 support (for systems with two getnameinfo implementations)</li>
+<li>Misc Documentation Improvements</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.13</h2>
+<ul>
+<li>Be more forgiving in the parsing of MIME boundary headers, specifically
+ those generated by Eudora where the outer boundaries are substrings of
+ the inner boundaries. This feature can be disabled by enabling the
+ <tt>rfc2046_strict</tt> option.</li>
+<li>Allow cyradm to handle aggregate mailbox sets for ACL and DELETE
+ operations.</li>
+<li>Add a lmtp_downcase_rcpt option to force the lowercasing of
+ recipient addresses (Henrique de Moraes Holschuh <hmh at debian.org>).</li>
+<li>Include more MIME headers in sieve rejection notices</li>
+<li>Add an mbexamine command for debugging purposes</li>
+<li>LMTP will now fatal error if we cannot initialize the duplicate
+ delivery database.</li>
+<li>Continued audit by Security Appraisers and Bynari</li>
+<li>Correctly terminate the processes by calling service_abort even on
+ successful exit (helps to fix a db3 lockers problem)</li>
+<li>Fix some murder+altnamespace/unixhiersep issues</li>
+<li>Fix imclient's handling of literals.</li>
+<li>Add support for the windows-1256 character set</li>
+<li>Don't log 'could not shut down filedescriptor' messages when the
+ socket is already not connected</li>
+<li>Now include a script to convert sieve script names to the altnamespace
+ format</li>
+<li>Added a <tt>--with-extraident</tt> configure option to make it easier
+ to set the extra version information that is compiled into the binary.</li>
+<li>Minor build fixes.</li>
+<li>Minor other bug fixes.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.12</h2>
+<ul>
+<li>Add maxfds= option in cyrus.conf</li>
+<li>"The shutdown() Patch" by
+Henrique de Moraes Holschuh <hmh at debian.org> and
+Jeremy Howard <jhoward at fastmail.fm></li>
+<li>Now report both built-with and running-with OpenSSL versions</li>
+<li>Misc other small bugfixes</li>
+<li>Security Appraisers and Bynari review of the majority of the modules
+in <tt>imap/</tt></li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.11</h2>
+<ul>
+<li>Master now will forcibly exit if a service is not executable</li>
+<li>Master now has a daemon mode and pidfile support (-d and -p options)</li>
+<li>Berkeley DB Configuration methods have changed. Hopefully they're
+more generic now. You can still use --with-dbdir, or you can use
+--with-bdb-libdir and --with-bdb-incdir</li>
+<li>timsieved now handles usernames with dots (when unixhierarchysep is active)</li>
+<li>tugowar has been removed from the distribution.</li>
+<li>Squatter now has an option to skip unmodified mailboxes.</li>
+<li>Properly hash username to remove a user's sieve scripts when their INBOX
+is removed.</li>
+<li>Reset output buffer when prot_flush returns EOF.</li>
+<li>Minor Makefile improvements with use of $(srcdir)</li>
+<li>Remotepurge improvement for empty mailboxes</li>
+<li>Fix for AFS overwriting the canonicalized username in ptloader</li>
+<li>Security audit of imapd.c performed by SecurityAppraisers and Bynari</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.10</h2>
+<ul>
+<li>Fixed some potential buffer overflows in the sieve code, as well
+as a pre-login buffer overflow in the IMAP parsing code.</li>
+<li>ipurge can now skip flagged messages</li>
+<li>Fix a problem with the flat backend and tracking new files</li>
+<li>Fix a problem with the memory pool routines on 64-bit machines</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.9</h2>
+<ul>
+<li>support Berkley DB 4.1
+<li>more portable use of errno throughout
+<li>timsieved now does telemetry logging
+<li>libcyrus.a no longer supplies fs_get() and fs_give()
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.8</h2>
+<ul>
+<li>Fix a strlcpy() off-by-one error.
+<li>Better handling of errors in connecting to LMTP servers for deliver and
+lmtpproxyd.
+<li>Fix bug in pop3proxyd's pop3s handling.
+<li>Fix Exim install documentation.
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.7</h2>
+<ul>
+<li>Fix a severe locking problem during failed CREATEs</li>
+<li>Change default locking method to fcntl from flock</li>
+<li>Don't cleanup the original mailbox during a RENAME while holding the
+mailbox list lock</li>
+<li>Quoting fixes in cyradm</li>
+<li>Small pathname fix in rehash script</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.6</h2>
+<ul>
+<li>Correct some minor version number errors.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.5</h2>
+<ul>
+<li>Better locking of the mailbox list during mupdate operations for
+CREATE and RENAME</li>
+<li>Permissions fixes for annotations.</li>
+<li>pop3proxyd now does telemetry logging</li>
+<li>Cleanup a number of leaks in the murder code</li>
+<li>Correct semantics of our provided strlcpy(). Fix places where strlcpy()
+was being used incorrectly.</li>
+<li>Correct a significant memory leak in the memory pool routines</li>
+<li>OpenSSL is now handled correctly for the perl modules</li>
+<li>Small documentation cleanups</li>
+<li>The normal assortment of small bugfixes</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.4</h2>
+
+<ul>
+
+<li> Sieve is no longer dependent on duplicate delivery suppression
+(it still uses the duplicate delivery database however). </li>
+
+<li> Sieve now supports <tt>draft-segmuller-sieve-relation-02.txt</tt></li>
+
+<li> <tt>imtest</tt> now includes all the functionality previously
+kept in pop3test, lmtptest, smtptest, and mupdatetest. imtest will
+notice if it is invoked with one of these names and do the right
+thing. The -P flag can be used to force a particular protocol. As
+part of this, the default install location for mupdatetest has changed
+to be the same as the other test utilities. <tt>imtest</tt> also
+includes new MANAGESIEVE functionality (sivtest) as well as the
+ability to reconnect to the same server multiple times (useful for testing
+SSL/TLS session caching and DIGEST-MD5 fast reauth).</li>
+
+<li>snmpgen generates stubbed out code so we don't waste resources on
+something that just doesn't work. At some point in time, we'll make it
+work again as it would be useful to gather aggregate statistics on
+what commands are being used so we can better tune the server. This
+change closes bug #1191. New bug 1267 opened to re-enable the feature.</li>
+
+<li>Added the chk_cyrus program to help point out missing message
+files and/or mailboxes</li>
+
+<li>ANNOTATEMORE improvements. Server annotation support has been added.
+We are also now using the /vendor/cmu/cyrus-imapd hierarchy.
+The "info" command in cyradm now returns annotations for the given mailbox
+(provided that ANNOTATEMORE support is compiled into the server)</li>
+
+<li>The RENAME command has been almost entirely rewritten. Now we rely
+on mailbox-level locking instead of locking the entire mailboxes file
+for the duration of the rename. <tt>ctl_cyrusdb -r</tt> now also
+cleans up "reserved" mailboxes that may appear in the event of a crash.</li>
+
+<li><tt>ctl_mboxlist</tt> can now dump only a particular partition</li>
+
+<li>The configuration subsystem now uses a hash table to speed up lookups
+of options. Additionally, the hash table implementation has been updated
+to possibly take advantage of memory pools.</li>
+
+<li>Many bugfixes related to the Cyrus Murder. Includes improvments to
+subscription handling as well as correct merging of seen state on
+mailbox moves.</li>
+
+<li>Can now configure an external debugger (<tt>debug_command</tt> option
+in imapd.conf.</li>
+
+<li>Misc. autoconf-related fixes (most notably those related to sasl_checkapop
+and O_DSYNC).</li>
+
+<li>Misc. locking-related fixes.</li>
+
+<li>Security fixes related to handling large literals in getxstring(), as
+well as correct usage of layers in timsieved.</li>
+
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.3</h2>
+
+<ul>
+<li> All "MAIL" and "SIEVE" notifications are now handled by
+<tt>notifyd</tt> which is a daemon that supports multiple notification
+methods. The <tt>mailnotifier</tt> and <tt>sievenotifier</tt> options
+have been added to <tt>/etc/imapd.conf</tt> to configure
+notifications. (Ken Murchison) </li>
+
+<li> Many feature enhancements and bugfixes for the Cyrus Murder. The
+code now supports live (but not transparent) moving of mailboxes from
+one server to another. </li>
+
+<li> Some warning fixes. </li>
+
+<li> <tt>fdatasync()</tt> is no longer required. </li>
+
+<li> Fixed a bug in <tt>imap/append.c</tt> that would show itself if a
+message was being delivered to five or more different
+partitions. </li>
+
+<li> Deliveries now don't create a redudant temporary file using
+<tt>tmpfile()</tt>; the staging directory is used instead. (Ken
+Murchison) </li>
+
+<li> Fix a possible crashing bug in <tt>squatter</tt>. (Ken
+Murchison) </li>
+
+<li> Deleting a user now also removes their Sieve scripts. </li>
+
+<li> <tt>cyrusdb_skiplist</tt>: release locks during iteration.
+Should prevent denial of service attacks and possibly increase
+performance. </li>
+
+<li> <tt>cyrusdb_skiplist</tt>: introduce a new mode using
+<tt>O_DSYNC</tt> writes which is possibly faster on Solaris.
+Currently off (it seems to hurt performance on Linux). </li>
+
+<li> <tt>master</tt> has preliminary code to avoid forking
+storms. </li>
+
+<li> <tt>sieveshell</tt> should now loop through all available SASL
+mechanisms before conceding defeat. </li>
+
+<li> <tt>sieveshell</tt> can now upload a file to a different name. </li>
+
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.2</h2>
+
+<ul>
+<li> fud now runs from the Cyrus master process; more generally, the
+Cyrus master process can deal with UDP services. (Amos Gouaux,
+<tt>amos at utdallas.edu</tt>)</li>
+
+<li> Sieve has been updated to be compliant with RFC 3028 and
+draft-martin-sieve-notify-01. All <tt>notify</tt> actions and any
+<tt>fileinto</tt> and/or <tt>redirect</tt> actions using stringlists
+will have to be updated/changed. </li>
+
+<li> added <tt>cvt_cyrusdb</tt> for quick conversions between
+different cyrusdb backends. </li>
+
+<li> fixed a bug in the Sieve header cache, where legal header names
+were being rejected. </li>
+
+<li> many Murder-related fixes </li>
+
+<li> suppress a bogus TLS session reuse DBERROR message </li>
+
+<li> make the list of acceptable TLS ciphers configurable in
+<tt>/etc/imapd.conf</tt> </li>
+
+<li> <tt>cyrusdb_skiplist</tt> fixes; it's now suitable for using in
+production environments though there are still performance problems
+outstanding </li>
+
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.1</h2>
+
+<ul>
+<li> now compatible with Berkeley DB4 (Larry M. Rosenbaum,
+<tt>lmr at ornl.gov</tt>) </li>
+
+<li> timsieved now supports proxying via <tt>loginuseacl</tt> (Amos
+Gouaux, <tt>amos at utdallas.edu</tt>) </li>
+
+<li> Sieve <tt>vacation</tt> now does a case-insensitive comparison of
+<tt>:addresses</tt> </li>
+
+<li> Warning-related bug fixes from Henrique de Moras Holschuh
+<tt>hmh at debian.org</tt></li>
+
+<li> automatic archival of db3 files so that filesystem backups are
+always consistent (Ken Murchison, <tt>ken at oceana.com</tt>)</li>
+
+<li> added a skiplist database backend, still needs more testing </li>
+
+<li> further work on the Cyrus Murder </li>
+
+<li> fixed bug in <tt>remotepurge</tt> dealing with mailboxes with
+characters that need to be escaped inside quoted-strings </li>
+
+<li> Cyrus::IMAP::Admin now supports referrals </li>
+
+<li> <tt>cyradm</tt>, via Cyrus::IMAP::Shell, now can remove
+quotaroots </li>
+
+<li> <tt>timsieved</tt>, <tt>sieveshell</tt>, and the MANAGESIEVE
+protocol extended with referrals </li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.1.0</h2>
+
+<ul>
+<li> now compatible with Cyrus SASL 2.1.0 </li>
+
+<li> fixed a problem with LMTP AUTH and unix domain sockets </li>
+
+<li> make deleting users faster </li>
+
+<li> add a "-n" switch to <tt>remotepurge</tt></li>
+
+<li> cyradm now does implicit SASL authorization </li>
+
+<li> fix for Sieve <tt>:matches</tt> comparator </li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.16</h2>
+
+<ul>
+<li>migrated to SASLv2 (Rob Siemborski)</li>
+
+<li>altnamespace: it is now possible to display user mailboxes as
+siblings to the INBOX at the top-level (Ken Murchison)</li>
+
+<li>unixhierarchysep: it is now possible possible to use slash as
+the hierarchy seperator, instead of a period. (Ken Murchison,
+inspired by David Fuchs, <tt>dfuchs at uniserve.com</tt>)</li>
+
+<li>SSL/TLS session caching (Ken Murchison)</li>
+
+<li>support for IMAP CHILDREN & LISTEXT extensions (Ken
+Murchison, work in progress)</li>
+
+<li>check recipient quota & ACL at time of RCPT TO: in
+<tt>lmtpd</tt> (Ken Murchison)</li>
+
+<li>support for LMTP STARTTLS & SIZE extensions (Ken
+Murchison)</li>
+
+<li>unified deliver.db, using cyrusdb interface, hopefully
+improving concurrency and performance (Ken Murchison)</li>
+
+<li>fixed STORE FLAGS () bug (Ken Murchison)</li>
+
+<li>fixed SEARCH SUBJECT vs. SEARCH HEADER SUBJECT bug (Ken
+Murchison)</li>
+
+<li>users without an INBOX can have subscriptions (Ken Murchison;
+noticing a trend here?)</li>
+
+<li>added cyrusdb_db3_nosync backend, used for duplicatedb and
+session cache, to postpone non-critical writes. (Ken
+Murchison)</li>
+
+<li>support for STARTTLS and AUTH=ANONYMOUS for timsieved (Ken
+Murchison)</li>
+
+<li>do setgid and initgroups in master (as urged by several
+people)</li>
+
+<li>added more config info to IMAP ID (in a vain attempt to improve
+debugging)</li>
+
+<li>configure now checks for DB3.3</li>
+
+<li>SQUAT (Rob O'Callahan, <tt>roc at cs.cmu.edu</tt>)</li>
+
+<li>change SEARCH HEADER <i>x</i> to SEARCH <i>x</i> utilizing
+internal cache where possible (Rob O'Callahan,
+<tt>roc at cs.cmu.edu</tt>)</li>
+
+<li>an improved directory hashing option (Gary Mills,
+<tt>mills at cc.UManitoba.CA</tt>)</li>
+
+<li>use of EGD for SSL/TLS (Amos Gouaux,
+<tt>amos at utdallas.edu</tt>)</li>
+
+<li>separate certs/keys for services (Henning P. Schmiedehausen,
+<tt>hps at intermeta.de</tt>)</li>
+
+<li>ability to force ipurge to traverse personal folders (Carsten
+Hoeger, <tt>choeger at suse.de</tt>)</li>
+
+<li>fixed zero quota bugs in cyradm (Leena Heino,
+<tt>liinu at uta.fi</tt>)</li>
+
+<li>ignore trailing whitespace in imapd.conf</li>
+
+<li>Received: header (with TLS and AUTH info)</li>
+
+<li>added '-i' switch to sendmail command line for SIEVE reject,
+redirect and vacation</li>
+
+<li>small fixes to notify_unix</li>
+
+<li>added "<tt>duplicatesuppression</tt>" switch to imapd.conf for
+enabling/disabling duplicate delivery suppression (Birger Toedtmann,
+<tt>birger at takatukaland.de</tt>)</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.15</h2>
+
+<ul>
+<li>fixed a longstanding bug in <tt>quota</tt> that would affect
+people with unusual top-level hierarchy, fix by John Darrow,
+<tt>John.P.Darrow at wheaton.edu</tt>.</li>
+
+<li>some important fixes to db3 interface code, by Walter Wong
+<tt>wcw at cmu.edu</tt>, prompted by complaints from Scott Adkins
+<tt>adkinss at ohio.edu</tt>.</li>
+
+<li>fixed some memory leaks in imclient and in the Perl IMAP
+module, prompted by Toni Andjelkovic <tt>toni at soth.at</tt>.</li>
+
+<li>fixed a longstanding authentication error in the Perl IMAP
+module, should remove pesky extra Password: prompt.</li>
+
+<li>fixed some allocation bugs in the managesieve perl module.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.14</h2>
+
+<ul>
+<li>fixed memory management bugs in <tt>imapd</tt>, <tt>lmtpd</tt>
+that were being hit due to the connection reuse code and causing
+subtle and annoying problems.</li>
+
+<li>we now clean up better when deleting a user</li>
+
+<li>fixed an endian bug in <tt>ipurge</tt></li>
+
+<li><tt>pop3d</tt> now can also reuse processes.</li>
+
+<li>fix a bug in <tt>imclient</tt> that would strike when
+<tt>cyradm</tt> specifies a mechanism on the command-line. (SASL
+mechanism names aren't case sensitive.)</li>
+
+<li>fix some bugs in handling SIGHUP in <tt>master</tt></li>
+
+<li>fix a couple of goofs in <tt>Admin.pm</tt></li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.13</h2>
+
+<ul>
+<li>fixed a silly bug with reusing SSL connections</li>
+
+<li><tt>lmtpd</tt> can now service multiple clients in sequence,
+hopefully improving performance</li>
+
+<li>changed how Berkeley db databases are opened, hopefully
+lessening the chance of deadlock and improving performance</li>
+
+<li>fixed a couple of memory leaks</li>
+
+<li>lessened the chance of a race condition during
+<tt>index_check()</tt></li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.12</h2>
+
+<ul>
+<li>refactored code so less duplication</li>
+
+<li>added alternate config file for partial virtual domain
+support</li>
+
+<li><tt>pop3d</tt> can now disable USER/PASS commands.</li>
+
+<li>STARTTLS now accepts a SSLv23 hello but doesn't allow SSLv23 to
+be negotiated.</li>
+
+<li><tt>imtest</tt> no longer buffers to aid use as an automated
+layer.</li>
+
+<li><tt>master</tt> now supports maximum number of service
+processes via the "maxchild" modifier.</li>
+
+<li>fixed a bug in the Sieve string lexer.</li>
+
+<li>one <tt>imapd</tt> process can now service multiple clients in
+sequence, eliminating a large number of forks.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.11</h2>
+
+<ul>
+<li>portability fixes involving <tt>setrlimit()</tt></li>
+
+<li>fixed compiler warnings</li>
+
+<li>the STARTTLS command will only accept TLSv1 now, not SSLv2/v3.
+The <tt>imaps</tt> port is unaffected by this change.</li>
+
+<li><tt>timsieved</tt> no longer returns garbage strings.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.9</h2>
+
+<ul>
+<li>some small memory savings</li>
+
+<li>the "fud" daemon once again works correctly</li>
+
+<li>the IDLE extension now uses signals correctly</li>
+
+<li>problems with libwrap have been resolved</li>
+
+<li><tt>imapd</tt> and <tt>pop3d</tt> now log connections protected
+via TLS.</li>
+
+<li>efficiency improvements when searching for a particular
+message-id</li>
+
+<li>fixed an envelope-parsing bug affecting SORT and THREAD</li>
+
+<li>made RENAME keep the same mailbox uniqueid, preserving seen
+state across renames</li>
+
+<li>STOREing flags to multiple messages in one command is now more
+efficient</li>
+
+<li>RENAME now preserves the ACL</li>
+
+<li>LIST is now as efficient as Cyrus v1.6, modulo Berkeley DB
+issues.</li>
+
+<li>Sieve zephyr notifications are now correct.</li>
+
+<li>crash in <tt>reconstruct</tt> now fixed.</li>
+
+<li>man pages added for <tt>cyrus.conf</tt>, <tt>master</tt>,
+<tt>lmtpd</tt>, <tt>idled</tt>, <tt>ctl_mboxlist</tt>, and
+<tt>ctl_deliver</tt>.</li>
+
+<li><tt>master</tt> can now listen on specific interfaces</li>
+
+<li><tt>master</tt> can now reread <tt>/etc/cyrus.conf</tt> on
+SIGHUP.</li>
+
+<li><tt>timsieved</tt> now uses symlinks instead of hard
+links.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.8</h2>
+
+<ul>
+<li>remembered to update this file</li>
+
+<li>bug in <tt>Cyrus::IMAP</tt> perl module affecting cyradm's
+setquota fixed</li>
+
+<li>portability fix with <tt>socklen_t</tt></li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.7</h2>
+
+<ul>
+<li>preliminary implementation of the IDLE extension (Ken
+Murchison, <tt>ken at oceana.com</tt>).</li>
+
+<li>THREAD=REFERENCES now part of the normal build.</li>
+
+<li>tweaks to the installation documentation and suggested Sendmail
+configuration</li>
+
+<li>portability fixes and other small bugfixes</li>
+
+<li>added "<tt>-a</tt>" flag to <tt>lmtpd</tt></li>
+
+<li>master process can now export statistics about running
+processes via UCD SNMP AgentX</li>
+
+<li>many fixes to Cyrus Murder-related code</li>
+
+<li>fixes to perl code, especially the Sieve interface. added an
+IMSP interface to the perl code, but it still needs work.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.6</h2>
+
+<ul>
+<li>some number of random static variables eliminated, to save on
+memory footprint</li>
+
+<li>recursive RENAME was a little to eager; fixed. RENAME will also
+give the client a hint that a sub-RENAME failed. (mostly probably
+useful for cyradm, but cyradm doesn't take advantage of it
+yet.)</li>
+
+<li>THREAD=X-JWZ has turned into THREAD=REFERENCES (Ken
+Murchison)</li>
+
+<li>DELETE wasn't failing cleanly in database code; fixed.</li>
+
+<li>off-by-one bug in seen_db fixed.</li>
+
+<li>starting/committing/aborting transactions now logged more
+correctly in cyrsudb_db3</li>
+
+<li>master will now accept port numbers instead of just service
+names in cyrus.conf. also logs even more verbosely (see bug
+#115.)</li>
+
+<li>libwrap_init() is now inside the loop, since i don't quite
+understand the semantics of libwrap calls.</li>
+
+<li>setquota in cyradm now behaves more sanely (and gives correct
+usage message).</li>
+
+<li>bugfixes to the managesieve client perl api. (still needs
+work.)</li>
+
+<li>small fixes in timsieved.</li>
+
+<li>added a "make dist" target so i won't dread releases as
+much.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server since 2.0.5</h2>
+
+<ul>
+<li>APPEND now honors the \Seen flag.</li>
+
+<li>mailboxes file can once again be a flat text file.
+(compile-time choice)</li>
+
+<li>subscriptions file can be flat text or berkeley db. likewise
+for seen state.</li>
+
+<li>unfortunately, the format of the mailboxes file has
+changed.</li>
+
+<li>implementation of "JWZ" threading, a first pass on the
+forthcoming THREAD=REFERENCES.</li>
+
+<li>bugfixes in libacap.</li>
+
+<li>bugfixes in other Murder related functionality.</li>
+
+<li>removal of dead code.</li>
+
+<li>will now look in CYRUS_PREFIX/etc/imapd.conf if there's no
+/etc/imapd.conf.</li>
+
+<li>more paranoid implementation of ID.</li>
+
+<li>more descriptive lmtp errors.</li>
+
+<li>finished implementation of LMTP 8BITMIME.</li>
+
+<li>fixed minor bugs in pop3d.</li>
+
+<li>small test suite for cyrusdb backends added in
+<tt>lib/test/</tt>.</li>
+
+<li>added <tt>-DPERL_POLLUTE</tt> to the perl compilation to deal
+with Perl 5.6.</li>
+
+<li>small additions to the Sieve library.</li>
+
+<li>As usual, owe lots of thanks to Ken Murchison for his hard work
+and awesome implementations.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server SINCE 2.0.4</h2>
+
+<ul>
+<li>Now should work with Berkeley DB 3.1, but does <b>not</b>
+auto-upgrade 3.0 databases (and, in fact, I haven't written any
+upgrade software yet).</li>
+
+<li>SORT and THREAD should now function correctly.</li>
+
+<li>Some configure fixes.</li>
+
+<li>Some fixes for possible race conditions in initializing
+services and database structures.</li>
+
+<li>Some non-gcc compile fixes with structure initialization.</li>
+
+<li>Some non gcc compile fixes with structure initialization.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server SINCE 2.0.3</h2>
+
+<ul>
+<li>fixed <tt>mbpath</tt> and <tt>ipurge</tt>. Thanks to Alain
+Turbide for the bug report.</li>
+
+<li>configure: removed <tt>mmap_private.c</tt>; it was buggy, and
+not worth supporting.</li>
+
+<li>configure: improvements in detecting libwrap, typos fixed in
+detecting libsasl.</li>
+
+<li>Merged the acapsieve library into libacap.</li>
+
+<li>improvements to the ACAP API.</li>
+
+<li>invariant checks added to the skiplist code.</li>
+
+<li>bugfix in TCL cyradm.</li>
+
+<li>acapmbox.c: bugfixes in handling acap connections.</li>
+
+<li>fix the size given for a unix socket address (changes
+throughout the code), patch thanks to Vladimir Kravchenko,
+<tt>jimson at null.ru</tt>.</li>
+
+<li>rewrote <tt>deliver</tt> to use the generic LMTP API in
+lmtpengine.c. Likewise, implemented the client-side API in
+lmtpengine.c. (Still need to implement AUTH.)</li>
+
+<li>added SORT and THREAD support (Ken Murchison,
+<tt>ken at oceana.com</tt>.)</li>
+
+<li>In checking an APPEND command, we were rejecting valid system
+flags and accepting invalid ones.</li>
+
+<li>minor bug fixes to <tt>proxyd</tt>.</li>
+
+<li>large amount of debugging code added to
+<tt>target-acap</tt>.</li>
+
+<li>build fixes to Perl programs.</li>
+
+<li>allow plaintext authentication to <tt>timsieved</tt>.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server in 2.0</h2>
+
+<ul>
+<li>The mailboxes file is now a transaction-protected Berkeley
+database.</li>
+
+<li>The core delivery process has been moved to <tt>lmtpd</tt>.
+<tt>deliver</tt> is now a simple wrapper to create an LMTP
+transaction.</li>
+
+<li>master process, responsible for spawning services
+(<tt>imapd</tt>, <tt>lmtpd</tt>, etc.) and for routine
+housekeeping. Optionally, it can use <tt>libwrap</tt> to allow or
+deny connections.</li>
+
+<li>ACAP (Application Configuration Access Protocol) support for
+Cyrus Murder: IMAP Aggregator.</li>
+
+<li>Sieve enhancements: regular expressions, notifications,
+automatically setting IMAP flags.</li>
+
+<li>SNMP (Simple Network Management Protocol) support for
+monitoring usage (e.g. number of users logged in) as well as for
+instrumenting protocol usage (e.g. number of times CREATE has been
+called).</li>
+
+<li>Perl version of <tt>cyradm</tt> contributed by Brandon Allbery
+(<tt>allbery at ece.cmu.edu</tt>). Eventually we expect to transition
+to the Perl version away from the TCL version.</li>
+
+<li>Bugfix in modified UTF-7 processing (for mailbox names). Bugfix
+in <tt>index_searchcacheheader()</tt>.</li>
+
+<li>Implemented the extension MULTIAPPEND.</li>
+
+<li>RENAME is now hierarchical.</li>
+
+<li>The right that controls whether a mailbox may be deleted is now
+"c". (It used to be "d".)</li>
+
+<li>An additional backend for seen state has been created,
+<tt>seen_db</tt>. It stores seen state in a per-user database.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.6.20</h2>
+
+<ul>
+<li>Some fixes to the TLS support to gracefully degrade
+service.</li>
+
+<li>Sieve now correctly re-sieves messages that are received with
+identical message-ids, but different envelopes. It also obeys
+plus-addressing on keep actions. (Fixes by Ken Murchison,
+<tt>ken at oceana.com</tt>.)</li>
+
+<li>The server wasn't correctly calculating the percentage of quota
+used when deciding whether or not to issue a warning.</li>
+
+<li>Implemented single-instance store: deliver, when using LMTP,
+will only store one copy of a message per partition, and hard link
+it among multiple users. Sites with a large number of partitions
+could see a performance decrease.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.6.19</h2>
+
+<ul>
+<li>Added STARTTLS support; requires OpenSSL.</li>
+
+<li>Sieve now uses MDNs to reject messages instead of DSNs,
+conforming to the latest Sieve specification. (Ken Murchison)</li>
+
+<li>The duplicate delivery database expiration (deliver -E) was
+deleting all entries; fixed.</li>
+
+<li>imtest is now a little smarter about parsing the protocol to
+avoid synchronization errors prior to authentication.</li>
+
+<li>timsieved's parser is now written in C; should be no noticeable
+changes, but should make compiling it much easier.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.6.16</h2>
+
+<ul>
+<li>Fix to enclosed message parsing (thanks to John Myers).</li>
+
+<li>When trying to skip over non-synchronizing literals during
+error recovery, the IMAP server never stopped eating. Fixed.</li>
+
+<li>Added <tt>with-sasldir</tt> as a configure option.</li>
+
+<li>Fixed a bug in cyradm when it got the CAPABILITY list.</li>
+
+<li>Fixed bugs relating to the incomplete SASLfication of
+deliver.</li>
+
+<li>Fixed bugs in deliver relating to duplicate delivery
+suppression and Sieve vacation functionality.</li>
+
+<li>Fixed a memory leak in deliver.</li>
+
+<li>When looking for SASL options, imapd wasn't defaulting to the
+option without the plugin name requesting it. This caused PLAIN
+authentications to incorrectly fail.</li>
+
+<li>Changed the expiration time of pts entries to 3 hours; only
+affects sites using krb_pts as the authorization method.</li>
+
+<li>Fixed some bugs in imclient; mostly affects cyradm.</li>
+
+<li>Fixed a bug in the Sieve lexer and improved the usefulness of
+the Sieve test program.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.6.13</h2>
+
+<ul>
+<li>An annoying memory management bug in imclient was fixed and
+it's efficiency was improved somewhat.</li>
+
+<li>Added the sieve client (<tt>installsieve</tt>) and server
+(<tt>timsieved</tt>) for getting sieve scripts onto the server and
+managing them once they are there.</li>
+
+<li>The default Sieve script layout has changed to
+sievedir/u/user/default; this supports multiple Sieve scripts per
+user with the ability to switch between them.</li>
+
+<li>Fixed the kerberos-to-local-host bug (patch by Greg Hudson,
+<tt>ghudson at mit.edu</tt>).</li>
+
+<li>Started changes to deliver to support LMTP AUTH.</li>
+
+<li>Improved the error messages logged when authentication
+fails.</li>
+
+<li>Fixed a bug dealing with argument processing in the arbitron
+program.</li>
+
+<li>pop3d now correctly supports SASL AUTH.</li>
+
+<li>imtest will no longer prompt for authentication or
+authorization names; instead, it defaults to the current Unix user.
+Override on the command line.</li>
+
+<li>Likewise, cyradm will no longer prompt. It now accepts "-m" to
+specify what SASL mechanism to use, and the pwcommand option to
+authenticate should once again work when used
+non-interactively.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.6.10</h2>
+
+<ul>
+<li>Changed the sieve option in the configure script to
+<tt>--disable-sieve</tt>.</li>
+
+<li>Updated reconstruct and quota to check for hashed imap spool
+directories correctly.</li>
+
+<li>deliver now will not use Sieve if duplicate delivery
+suppression is disabled. There was also a bug that caused the
+duplicate delivery database to be checked even if dupelim was
+disabled.</li>
+
+<li>deliver now uses tm_gmtoff if available to check for the local
+timezone.</li>
+
+<li>The default format for reading information from INN has
+changed. If you use INN to feed imapd news, you must change your
+"<tt>newsfeeds</tt>" file to contain
+
+<pre>
+collectnews!:*:Tf,WO:collectnews
+</pre>
+</li>
+
+<li>The dohash script now takes a "<tt>-i</tt>" option to run
+interactively and the "<tt>-f</tt>" option to issue warnings
+instead of fatal errors.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.6.1-BETA</h2>
+
+<ul>
+<li>cyradm should now work with all mechanisms (it now handles
+empty challenges and responses).</li>
+
+<li>Fixed deliver to deal with arbitrarily long headers</li>
+
+<li>COPY for non-existent sequence numbers returns NO; this
+contrasts to UID COPY, which always returns OK.</li>
+
+<li>FETCH for non-existent sequence numbers returns NO; this
+contrasts to UID FETCH, which always returns OK.</li>
+
+<li>Fixed a misleading BAD responses to commands that take
+sequences.</li>
+
+<li>Added UIDNEXT untagged response to a SELECT (from
+<tt>draft-crispin-imapv-07.txt</tt>).</li>
+
+<li>pop3d now correctly passes SASL configuration options to
+libsasl.</li>
+
+<li>imtest now correctly flushes the server's output to the
+screen.</li>
+
+<li>Added more hashing using a simple but stupid algorithm. Now
+whenever there is a mailbox access, quota access, or subscription
+access, it goes through a hash function. this is done to help
+reduce the number of files/directories in any given directory.</li>
+
+<li>Added the binary <tt>mbpath</tt>. Given a mailbox name, this
+binary will print the filesystem path to that mailbox. This way if
+you have multiple partitions and hashing turned out, you don't have
+to spend as many mental cycles figuring out where the actual
+directory is.</li>
+
+<li>deliver now checks <tt>sieveusehomedir</tt> and
+<tt>sievedir</tt> in the config file to determine where to look for
+sieve scripts.</li>
+
+<li>ptloader now has a workaround for afs 3.5.</li>
+
+<li>clarified an error message in message.c when an unexpected end
+of file is encountered.</li>
+
+<li>fixed some random memory leaks in deliver.</li>
+
+<li>fixed a fairly major bug in prot_fill. it was performing
+incorrectly when reading only a single character.</li>
+
+<li>fixed a bug in how imtest looked for OK or NO.</li>
+
+<li>fixed a memory leak in imapd.</li>
+
+<li>imapd now allows any user (or member of a group) listed in
+"proxyservers" to proxy.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.6.0-BETA</h2>
+
+<ul>
+<li>fixed stupid bug in imapd</li>
+
+<li>fixed sasl/config.c interaction</li>
+
+<li>fixed use of stat in imtest</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.5.24</h2>
+
+<ul>
+<li>ANSI C is now required.</li>
+
+<li>imtest's interface has changed, to allow for SASL
+authentication. Sorry, but it had to happen. It now also includes a
+timing test (-z) which we use to test the SASL layers.</li>
+
+<li>imtest no longer uses a non-synchronizing literal with LOGIN,
+so it should work against all IMAP servers.</li>
+
+<li>The prot layer now uses SASL for encryption and authentication.
+This changed a large amount of code, and some build
+procedures.</li>
+
+<li>As a side effect of SASL, --enable-static-libraries now doesn't
+do anything. We are considering compiling cyrus with libtool to
+change this.</li>
+
+<li>Error codes returned by programs have changed, and programs
+return EX_TEMPFAIL far more than they used to. This is because
+Sendmail considers most not-EX_TEMPFAIL errors permanent; now, if
+it may not be permanent, EX_TEMPFAIL is returned. (See
+lib/exitcodes.h.)</li>
+
+<li>Two bugs fixed: UID FETCH's with no messages in range now
+return OK, not BAD. And an obscure bug in LIST case sensitivity is
+fixed.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.5.19</h2>
+
+<ul>
+<li>Most of the charset.c code (and mkchartable.c code) has been
+replaced thanks to John Myers).</li>
+
+<li>Bug fix in message.c to look up headers in the cache when
+they're in the cache correctly; thanks to Chris Newman for the
+fix.</li>
+
+<li>Code cleanup here and there (thanks to Bruce Balden).</li>
+
+<li>Annoying (and confusing) lines in syslog every time a message
+was delivered if deliver was compiled using dbm saying that deliver
+was "unable to fetch entry" have been removed.</li>
+
+<li>Content-Disposition lines were being parsed improperly. If they
+had no optional arguments, they were being ignored as if they were
+syntactically incorrect. This is fixed, but imapd will continue to
+serve wrong information unless cyrus.caches are rebuilt (with
+reconstruct) for any message that was added to the mailbox before
+this bug was fixed.</li>
+
+<li>The arbitron program now takes a mailbox pattern argument for
+the mailbox to run on. The manpage always said it did anyway.</li>
+
+<li>Uninitialized variable fixed in imapd.c with the shutdown file
+code.</li>
+
+<li>Minor tweaks to purify build config.</li>
+
+<li>Fix minor memory leak in proc.c where procfname wasn't being
+free'd.</li>
+
+<li>Fix brain fart in auth_krb_pts.c where a CLOSE() was done to a
+DB handle BEFORE we access the data read from the DB database. This
+means we were copying free'd memory into the groups list. Note this
+only affects people using DB, AFS and ptloader.</li>
+
+<li>Committed minor syslog log level changes in ptloader and
+deliver.</li>
+
+<li>make distclean now does what it's supposed to.</li>
+
+<li>Possibly misnamed experimental --enable-static-libraries switch
+that tries to do a good job of building binaries with whatever
+static libraries are availible. If you use this, you do so at your
+own risk, and if it fails, we will disavow all knowledge of you and
+your team. Good luck, Jim.</li>
+
+<li>Add optional third argument to imtest for it to take input from
+a file. This is a gross hack.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.5.14</h2>
+
+<ul>
+<li>LIST now honors the reference argument.
+
+<p>This behavior can be turned off by a configuration option
+imapd.conf--which may be desirable because of certain clients that
+ask for a "mail directory" setting for IMAP which will now cause
+problems when it was ignored before. (The default is for the
+reference argument to be honored.)</p>
+</li>
+
+<li>The <tt>arbitron</tt> program now takes a mailbox pattern
+argument for the mailbox to run on. The manpage always said it did
+anyway.</li>
+
+<li>Added --disable-server switch to optionally prevent compilation
+of server to help sites that just want client libraries (so cyradm
+and libcyrus can be compiled on remote systems without installing
+stuff into /usr/cyrus/bin, etc.) For now, the server is still
+configured in this case, and a Makefile is generated. This could
+change in future versions.</li>
+
+<li>Fixed a mmap leak in index.c in index_search_evaluate that
+caused problems on complex searches. Thanks to Jeff Schiller for
+pointing this out. Fixed a potential leak in mboxlist.c that
+happened if a rename went awry. Thanks to Chris Newman for pointing
+this out.</li>
+
+<li>Fixed a bug in LIST and LSUB code so that user.* mailboxes will
+be printed on every LIST instead of just the first one.</li>
+
+<li>Implemented the <i>POP3 Extension Mechanism</i>, RFC 2449, in
+order to advertise the capabilities already supported.</li>
+
+<li>Fixed a bug in mailbox.c that disallowed MUTF-7 representations
+of ASCII characters when it shouldn't have. (Thanks to John Myers
+for providing a fix and to Per Steinar Iversen for telling me that
+I didn't do it before.)</li>
+
+<li>More cleanup the ptloader/auth_krb_pts code. If you use
+Kerberos and IMSP, you *MUST* pick up cyrus-imspd-v1.5a6 (or
+newer).</li>
+
+<li>A few configure tweaks.</li>
+
+<li>Duplicate delivery changes:
+
+<ul>
+<li>Split out duplicate delivery elimination to multiple files.
+This should help reduce the lock contention that normally occurs
+with this file. To not clutter <i>config_dir</i>, the files will be
+located in a subdirectory named <tt>deliverdb</tt>, for example
+<tt>/var/imap/deliverdb</tt>. If you don't make this directory,
+nothing bad will happen (other than duplicate delivery elimination
+will not work).</li>
+
+<li>The time value is now stored as an integer in native byte order
+as opposed to converting it to a string before it is stored in the
+database.</li>
+
+<li>checkdelivered() now obtains a read lock instead of a write
+lock when trying to check for duplicates. Only markdelivered()
+grabs a write lock.</li>
+</ul>
+</li>
+
+<li>Added logic to cause cyradm to abort more cleanly if not given
+command line arguments in an interactive session. This gets rid of
+the dreaded <tt>application-specific intialization failed</tt>
+messages.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.5.11</h2>
+
+<ul>
+<li>The CREATE command now ignores a trailing hierarchy delimiter
+instead of ignoring the CREATE command.</li>
+
+<li>UIDPLUS is now always advertised in CAPABILITY and is always
+availible. The UIDPLUS extension is a set of optimizations using
+UID values instead of sequence numbers and is described in RFC
+2359.</li>
+
+<li>Cyrus no longer rejects messages with 8-bit characters in the
+headers. Rather than reject the message, characters with the 8th
+bit set are changed to 'X'. Internationalization in headers is
+supported by the mechanism specified in RFC 2047 (and RFC
+1342).</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.5.10</h2>
+
+<ul>
+<li>If ENABLE_EXPERIMENT is set, the server no longer claims to
+support OPTIMIZE-1; instead, it claims to support UIDPLUS. The
+Getuids command has been removed since it is not in the UIDPLUS
+document (draft-myers-imap-optimize-03.txt).</li>
+
+<li>The checks for Tcl in configure are much smarter. The configure
+script asks tclsh where its configuration lives, then consults the
+shell scripts that have that information. This should work with 7.5
+or better, which is what the server requires anyway. (All the
+previous checks to look for Tcl libraries are gone; now, configure
+runs tclsh and asks it where the Tcl libraries are, then runs the
+shell scripts that are in that directory. Since the tclConfig.sh
+script may not be in that directory, it looks in .. as well.)</li>
+
+<li>The checks for com_err in configure are a little smarter and
+look to see if all the pieces are there before trying to use
+them.</li>
+
+<li>Added support for the NAMESPACE extension (if
+--enable-experiment is supplied).</li>
+
+<li>Added a "reject8bit" switch to imapd.conf. If set to "true",
+messages containing 8-bit-set characters in the headers are
+rejected (the previous behavior); if set to "false" or left to the
+default value, messages containing 8-bit-set characters have these
+characters changed to a constant character ('X').</li>
+
+<li>Added the "fud" program. This is an interm hack designed to
+allow allow finger information to be retrieved for cyrus users.
+This is experimental and it is not recommend that services be built
+arround this feature, since it is likely to be removed in a future
+release of the IMAP server.</li>
+
+<li>Bug fix: User defined flags now work properly.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.5.2</h2>
+
+<ul>
+<li>Fixed a bug with word alignment on Solaris using Kerberos
+compiled with Sun's CC. (Several patches were submitted; thanks to
+everyone who did so.)</li>
+
+<li>Patches from John Myers, including more glob fixes.</li>
+
+<li>Use the default hash function from DB. Note that this means
+that the existing <tt>delivered.db</tt> and <tt>ptscache.db</tt> is
+<b>NOT</b> compatible with this release. These files should be
+removed.</li>
+
+<li>Provide two debugging programs that dump the databases:
+<tt>ptdump</tt> and <tt>dump_deliverdb</tt>.</li>
+
+<li>Multiple changes to ptloader. added a bunch of flags; let it
+reauthenticate on its own; added support perl wrapper; added bunch
+of debugging information/output; bunch of other cleanups</li>
+
+<li>The mailboxes file is now closed if it isn't likely to be
+referenced, hopefully preventing old mailboxes files from hanging
+around in memory as frequently.</li>
+
+<li>Added a patch from Eric Hagberg to work around a possible
+deadlock condition in mboxlist.c where rename isn't atomic.</li>
+
+<li>Patch from John Myers to get rid of cyrus.seen corruption in
+bsearch_mem.</li>
+
+<li>Patch from John Myers and to allow ISO-8859-1 characters in
+mailbox names.</li>
+
+<li>Makedepend still runs, and still generates warnings, but these
+are squirrled away in makedepend.log.</li>
+
+<li>On mailbox delete, the server will no longer try and unlink
+".." and "." as we got a report that it seriously breaks one file
+system (even as non-root).</li>
+
+<li>Added some support for Netscape's very misleading "Administrate
+My Mail" menu option in Communicator. Allows for a URL to be set in
+imapd.conf for the page to refer users to; needs to be turned on
+with --enable-netscapehack at compile time to enable it.</li>
+
+<li>Bug swap: imtest quotes password with a non-synchronizing
+literal in order to allow weird characters like ) in passwords. But
+it doesn't look to see if the server supports non-synchronizing
+literals.</li>
+
+<li>If the file "<tt>msg/motd</tt>" exists, the first line is now
+sent to clients upon login.</li>
+
+<li>Bug fix: to handle BODY[] properly when fetching news articles
+(truncation no longer occurs). (thanks to John Prevost)</li>
+
+<li>The makedepend supplied should now run on Solaris Intel.
+(thanks to Chris Newman)</li>
+
+<li>Added some hacks to pwcheck.c for Linux and Digital Unix where
+the default protections on the socket don't allow the cyrus user to
+read it. (thanks to Lyndon Nerenberg)</li>
+
+<li>Bug fix: Flags beginning with \ are system flags and users can
+only create the defined flags. The code to do this before was
+confused.</li>
+
+<li>The configure scripts and makefiles have some random
+fixes.</li>
+
+<li>Added a contrib directory for reasons of laziness in collecting
+patches, not all of which should be in the distribution.</li>
+
+<li>ptloader can now renew its AFS authentication by reading from a
+srvtab file.</li>
+
+<li>The configure script now looks for a libcom_err and can use an
+installed one if one exists.</li>
+
+<li>Other small bug fixes.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.5</h2>
+
+<ul>
+<li>Bug fix: RENAME corrupted mailboxes if they had been EXPUNGEd.
+(may have only happened with INBOX, which Pine tickles once a
+month.)</li>
+
+<li>Bug fix: auth_newstate now initializes its structures.</li>
+
+<li>Bug fix: pop3d.c, a printf was changed to prot_printf.</li>
+
+<li>Cyrus now sends X-NON-HIERARCHICAL-RENAME to alert clients that
+it is not handling RENAME in an IMAP4rev1 compliant manner. This
+will be fixed in a subsequent release.</li>
+
+<li>Bug fix: imclient_autenticate now does resolution on the
+hostname before authenticating to it. This caused problems when
+authenticating to an address that was a CNAME.</li>
+
+<li>Bug fix: LIST %.% (and other multiple hierarchy delimiter
+matches) works properly. Several other glob.c fixes are included as
+well.</li>
+
+<li>Bug fix: a fetch of exclusively BODY[HEADER.FIELDS...] should
+now work properly.</li>
+
+<li>Bug fix: reconstruct now considers a nonexistant INN news
+directory to be empty; this makes reconstruct fix the cyrus.* files
+in the imap news partition.</li>
+
+<li>Added a manpage for imclient.</li>
+
+<li>Fixed a few other minor bugs.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.4</h2>
+
+<ul>
+<li>Implemented the "<tt>IMAP4rev1</tt>" protocol commands. (The
+hierarchical behavior of RENAME, which was added late to the
+IMAP4rev1 specification, is not implemented.) Changes the minor
+version number of the cyrus mailbox database format to 1.
+<b>IMPORTANT:</b> it is necessary to run the command
+"<tt>reconstruct -r</tt>" as the cyrus user after upgrading the
+Cyrus IMAP software from version 1.4 or earlier.</li>
+
+<li>If the file "<tt>msg/shutdown</tt>" exits in the configuration
+directory, the IMAP server will issue the first line in the file in
+an untagged BYE message and shut down.</li>
+
+<li>Permit SPACE in mailbox names.</li>
+
+<li>Permit the "modified UTF-7" internationalized mailbox name
+convention.</li>
+
+<li>"User opened mailbox" messages are now logged at the DEBUG
+level instead of the INFO level.</li>
+
+<li>Added <tt>-q</tt> (ignore quota) switch to
+<tt>deliver</tt>.</li>
+
+<li>New "<tt>krbck</tt>" program for diagnosing common kerberos
+problems.</li>
+
+<li>auth_unix no longer requires users to be in the passwd
+file.</li>
+
+<li>AUTHENTICATE command now reports the protection mechanism in
+use in the text of the tagged OK response</li>
+
+<li>Make MAILBOX_BADFORMAT and MAILBOX_NOTSUPPORTED temporary
+errors.</li>
+
+<li>Use the header cache for SEARCH HEADER</li>
+
+<li>Use "unspecified-domain" instead of server's hostname to fill
+out RFC 822 addresses without the "@domain" part.</li>
+
+<li>Make "reconstruct -r" with no args reconstruct every
+mailbox.</li>
+
+<li>The configure script now defaults to using unix_pwcheck instead
+of unix if the file /etc/shadow exists.</li>
+
+<li>The location of the pwcheck socket directory now defaults to
+"<tt>/var/ptclient/</tt>". It is controlled by the
+"<tt>--with-statedir=DIR</tt>" option, which defaults to
+"<tt>/var</tt>".</li>
+
+<li>Bug fix: by using an certain address form, one could deliver to
+a user's mailbox bypassing the ACL's.</li>
+
+<li>Bug fix: un-fold header lines when parsing for the
+ENVELOPE.</li>
+
+<li>Delete quota roots when deleting the last mailbox that uses
+them. Doesn't catch all cases, but should get over 99% of
+them.</li>
+
+<li>Implement plaintextloginpause configuration option, imposes
+artificial delay on plaintext password logins.</li>
+
+<li>Implement popminpoll configuration option, limits frequency of
+POP3 logins.</li>
+
+<li>Implement AFS PT server group support.</li>
+
+<li>Remove persistence of POP3 LAST value and remove Status:
+hack</li>
+
+<li>Support the new ACL command set in the IMAP server.</li>
+
+<li>Bug fix: Have to initialize reply to 0 in pop3d. Was causing
+POP3 server to occasionally drop the connection during
+authentication.</li>
+
+<li>Bug fix: The COPY command wasn't issuing a [TRYCREATE] when
+appropriate for sub-mailboxes of INBOX.</li>
+
+<li>Bug fix: Renaming a mailbox wasn't correctly changing its
+UIDVALIDITY.</li>
+
+<li>Bug fix: Renaming a mailbox to itself, in order to move it to a
+different partition, was not working correctly.</li>
+
+<li>Update the AUTH support in pop3d to conform to the latest draft
+specification.</li>
+
+<li>Update cyradm to use Tcl 7.5 instead of Tcl 7.4</li>
+
+<li>Re-implement large sections of the netnews support. It no
+longer requires modifications to INN, as it now expunges the index
+entries for expired/canceled articles upon select of the
+newsgroup.</li>
+
+<li>Implement newsspool configuration option, for separating the
+directories for the news spool and the various cyrus.* IMAP server
+index files.</li>
+
+<li>Bug fix: permit empty flag list in APPEND command</li>
+
+<li>Bug fix: deal with truncated Date: header values.</li>
+
+<li>Bug fix: memory mapping code, deal better with 0-length maps,
+since mmap() appears to crap out on that boundary condition.</li>
+
+<li>Portability fix: if no strerror, have to define
+NEED_SYS_ERRLIST.</li>
+
+<li>Bug fix: used append instead of lappend in cyradmin, preventing
+use of any port other than IMAP.</li>
+
+<li>When the client is streaming its commands, the IMAP server
+attempts to stream its tagged responses.</li>
+
+<li>Modify zephyr support to compile without Kerberos support.</li>
+
+<li>Add a bunch of prototype declararations to the code.</li>
+
+<li>In deliver, change the MULT support to instead use the LMTP
+syntax.</li>
+
+<li>imclient: support tagged intermediate replies and a default
+callback.</li>
+
+<li>Implement some experimental protocol extensions for optimizing
+disconnected use resynchronization. Most extensions are disabled by
+default. Client authors should contact info-cyrus at andrew.cmu.edu if
+they wish to experiment with these.</li>
+
+<li>In Makefiles, change $(AR) to ar -- HPUX make is
+defective.</li>
+
+<li>In deliver, use HAVE_LIBDB to select use of db over dbm</li>
+
+<li>Add map_stupidshared mapping module for older versions of
+Digital Unix. It's not quite as bad as HPUX, but...</li>
+
+<li>Bug fix: in imclient.c, don't free NULL pointers and don't call
+htons() on the output of getservbyname(). Have to abort sending the
+command if you get a tagged response when sending a literal.</li>
+
+<li>The auth_xxx routines now create/take a state argument instead
+of maintaining internal static state.</li>
+
+<li>Solaris mktime() is buggy in some releases. Create and use
+mkgmtime() for parsing date strings.</li>
+
+<li>Message parsing routines now use memory mapping, though they
+still copy data around in line-sized buffers.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.3</h2>
+
+<ul>
+<li>Implemented the "<tt>reconstruct -m</tt>" command, for
+reconstructing the <tt>mailboxes</tt> file. <b>IMPORTANT:</b> it is
+necessary to run the command "<tt>reconstruct -m</tt>" as the cyrus
+user after upgrading the Cyrus IMAP software from version 1.3 or
+earlier. We recommend you make a backup copy of the
+<tt>mailboxes</tt> file in the configuration directory before
+performing the conversion.</li>
+
+<li>Mailbox names are now case sensitive, not case insensitive.
+"<tt>INBOX</tt>" is the exception, and is treated as being
+case-insensitive.</li>
+
+<li>Personal mailboxes now appear to their owners as being under
+the "<tt>INBOX.</tt>" hierarchy. For example, the mailbox
+"<tt>user.bovik.work</tt>" appears to the user "<tt>bovik</tt>" as
+"<tt>INBOX.work</tt>". The user may still refer to the mailbox with
+the name "<tt>user.bovik.work</tt>".</li>
+
+<li>Previously, the code used "<tt>anybody</tt>" as the name of the
+group that all users are in, but the documentation used the name
+"<tt>anyone</tt>". Changed the code to match the documentation. The
+name "<tt>anybody</tt>" will be canonicalized to the name
+"<tt>anyone</tt>".</li>
+
+<li>The install document now gives different recommended locations
+for the server databases. The recommended location of the
+configuration directory changed from "<tt>/usr/cyrus</tt>" to
+"<tt>/var/imap</tt>" and the recommended location of the default
+partition directory changed from "<tt>/usr/spool/cyrus</tt>" to
+"<tt>/var/spool/imap</tt>". It is <b>NOT</b> necessary to change
+the locations of these directories when upgrading from version 1.3
+or earlier of the Cyrus IMAP server software. If you do wish to
+change the locations of these directories to match the new
+recommendations, simply rename the directories and change the
+appropriate values in your <tt>/etc/imapd.conf</tt> file.</li>
+
+<li>Created a "<tt>make install</tt>" rule. See the <a
+href="install.html">installation</a> document for all the new
+corresponding <tt>configure</tt> options. Note the recommended
+location of the "<tt>imapd</tt>", "<tt>pop3d</tt>", and
+"<tt>deliver</tt>" programs has changed, this change needs to be
+reflected in the "<tt>inetd.conf</tt>" and "<tt>sendmail.cf</tt>"
+files.</li>
+
+<li>New "<tt>login_unix_pwcheck</tt>" module and "<tt>pwcheck</tt>"
+daemon, for improved shadow password support. See the
+"<tt>pwcheck/README.pwcheck</tt>" file in the distribution for
+details.</li>
+
+<li>Renamed the "<tt>login_unix_shadow</tt>" module to
+"<tt>login_unix_getspnam</tt>".</li>
+
+<li>Added a mail notification mechanism, using Zephyr.</li>
+
+<li>Added a feature to automatically create user IMAP accounts.
+Controlled by the "<tt>autocreatequota</tt>" config option.</li>
+
+<li>Added the "<tt>logtimestamps</tt>" config option, for putting
+timestamp information into protocol telemetry logs.</li>
+
+<li>Beefed up the Kerberos checks in Configure to ensure the DES
+library routines exist.</li>
+
+<li>On some systems, the "<tt>echo</tt>" command with no arguments
+emits a newline. Changed the installation document to instead use
+the "<tt>true</tt>" command to create the "<tt>mailboxes</tt>"
+file.</li>
+
+<li>Store a redundant copy of a mailbox's ACL in the
+<tt>cyrus.header</tt> file, so "<tt>reconstruct -m</tt>" may later
+use it as a backup.</li>
+
+<li>Had to remove the declaration of <tt>tcl_RcFileName</tt> for
+the latest version of Tcl.</li>
+
+<li>Make much more extensive use of memory mapping. Replace the
+binary search module with one that searches a memory mapped
+area.</li>
+
+<li>Replaced the yacc-based RFC822 address parser with a hand-coded
+one.</li>
+
+<li>Replaced the et (error table) libary with a version that
+doesn't require lex or yacc. Remove the lex/yacc checking from
+Configure.</li>
+
+<li>Safety feature: most programs now refuse to run as root.</li>
+
+<li>Bug fix: Issue [TRYCREATE] tag on COPY command when
+appropriate.</li>
+
+<li>Bug fix: The quoted-printable decoder wasn't ignoring trailing
+whitespace, as required by MIME.</li>
+
+<li>Bug fix: Don't spew cascade errors if the server gets an EOF
+during/after reading an APPEND literal.</li>
+
+<li>Bug fix: gmtmoff_gmtime.c was returning results with the wrong
+sign.</li>
+
+<li>Bug fix: imclient_send was appending spaces to %d and %u and
+the response parser was not handling responses that did not contain
+a space after the keyword.</li>
+
+<li>Bug fix: rmnews wasn't removing some (un-indexed) article files
+correctly.</li>
+
+<li>Completely disabled the dropoff code for now. It will be
+completely replaced when IMSP integration is implemented</li>
+
+<li>Added workaround for the Linux mkdir() problem.</li>
+
+<li>In Configure, use a more direct test for a working
+shared-memory mmap</li>
+
+<li>In collectnews, avoid O(n**2) behavior when processing articles
+that have already expired.</li>
+
+<li>Bug fix: append_addseen() would screw up if no messages were
+previously seen.</li>
+
+<li>Added the CMU-specific amssync and cmulocal directories.</li>
+
+<li>Use memmove instead of bcopy.</li>
+
+<li>Implemented the first pass of SMTP/MULT support in
+deliver.</li>
+
+<li>Added cacheid parameter to auth_setid(), for AFS PT server
+support.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.2</h2>
+
+<ul>
+<li>Fixed bug in character set code that broke text searches. Sites
+which care about searching headers need to reconstruct their
+existing mailboxes.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.1-Beta</h2>
+
+<ul>
+<li>Add support for <tt>UIDVALIDITY</tt> special information
+token.</li>
+
+<li>Add <tt>syncnews</tt> and <tt>arbitron</tt> programs.</li>
+
+<li>Redo duplicate delivery elimination in <tt>deliver</tt>.</li>
+
+<li>Bug fixed: Must re-read files after acquiring a lock. Cannot
+trust the mtime of a file to increment when writing the file--file
+could be written to multiple times in the same second.</li>
+
+<li>Bug fixed: <tt>EXAMINE</tt> command should not affect
+<tt>\Recent</tt> status.</li>
+
+<li>Update the user's <tt>\Recent</tt> high-water-mark when we
+report new messages.</li>
+
+<li>Portability changes</li>
+
+<li>Upgrade to autoconf 2.1</li>
+
+<li>Allow privacy to be turned off at compile-time with
+<tt>--disable-privacy</tt> configure switch.</li>
+
+<li>Fix typo in <tt>cyradm</tt> preventing "<tt>all</tt>" from
+being recognized.</li>
+
+<li>Include <tt>map_private.c</tt> memory mapping module for
+systems like HPUX which have half-working <tt>mmap()</tt>
+implementations.</li>
+
+<li>Switch to using UTF-8 for internal search format. Sites which
+care about internationalized searching of headers need to
+reconstruct all their existing mailboxes.</li>
+
+<li>Fix some errors in the iso-8859-* tables.</li>
+
+<li>Add and correct a bunch of case-independence mappings in the
+character tables.</li>
+
+<li>First pass at implementing the <tt>STATUS</tt> extension;
+disabled for release.</li>
+
+<li>First pass at implementing IMAP/IMSP server integration. Not
+ready for general use.</li>
+
+<li>Add <tt>new_cred</tt> and <tt>free_cred</tt> mechanisms to
+authentication modules.</li>
+
+<li>Don't complain when doing "<tt>reconstruct -r foo</tt>" and
+<tt>foo</tt> isn't a mailbox.</li>
+
+<li>Add <tt>IMAP_QUOTAROOT_NONEXISTENT</tt> error code.</li>
+
+<li>Bug fix: Avoid divide by zero when quota is zero</li>
+
+<li>Bug fix: In an error case of the ACL handling code, we have to
+restore tab before breaking out of loop.</li>
+
+<li>Fix file descriptor leak in quota system.</li>
+
+<li>Change a bunch of int variables to unsigned.</li>
+
+<li>Better error reporting on reads that end up short.</li>
+</ul>
+
+<h2>Changes to the Cyrus IMAP Server Since Version 1.0-Beta</h2>
+
+<ul>
+<li>Improved <a href="install.html">installation</a> document.</li>
+
+<li>New "<a href="cyradm.1.html"><tt>cyradm</tt></a>"
+administrative client.</li>
+
+<li>Changed the syslog facility from "<a
+href="install.html#syslog"><tt>local4</tt></a>" to
+"<tt>local6</tt>".</li>
+
+<li>Removed the <tt>renounce setuid</tt> check in "<a
+href="install.html#deliver"><tt>deliver</tt>"</a>. The
+"<tt>deliver</tt>" program must now be <b>non</b>-executable by
+<tt>other</tt>.</li>
+
+<li>Fixed a typo in the parsing of <tt>SEARCH DELETED</tt>. (This
+bug constantly got tripped by newer C-clients.)</li>
+
+<li>Redesigned the implementation of <tt>SEARCH CHARSET</tt>.<br />
+ Sites that wish to search for non-ASCII characters in the headers
+of existing mailboxes must run <tt>reconstruct</tt> on all their
+mailboxes after upgrading to this version.</li>
+
+<li>Added AUTH and KPOP support to the POP3 server.</li>
+
+<li>Added search support for the ISO-2022-JP character set.</li>
+
+<li>Replaced the search engine with a partial Boyer-Moore
+algorithm.</li>
+
+<li>Special-case optimized searching US-ASCII text.</li>
+
+<li>Fixed a bug which caused the message parser to spin-loop on a
+particular degenerate invalid-MIME case.</li>
+
+<li>Fixed a performance bug in the message parser.</li>
+
+<li>Tracked last-minute changes to the IMAP4 protocol.</li>
+
+<li>Fixed a bug in <tt>UNSUBSCRIBE</tt> which caused too many
+subscriptions to be removed.</li>
+
+<li>Added a bunch more "<a
+href="install.html#configure"><tt>configure</tt></a>" options.</li>
+
+<li>Ported to HPUX.</li>
+
+<li>Fixed a bug in the <tt>LIST/LSUB \Noselect</tt> code.</li>
+
+<li>Fixed bug in the globbing code which caused the "<tt>*%</tt>"
+pattern to work incorrectly.</li>
+
+<li>Client-side Kerberos support is now conditionalized on
+<tt>HAVE_ACTE_KRB</tt>, which is set by configure.</li>
+
+<li>Fixed some invalid buffer-alignment assumptions in the Kerberos
+code.</li>
+
+<li>Made the lexers compatible with flex. Configure now looks for
+and prefers to use <tt>flex</tt> and
+<tt>bison</tt>/<tt>byacc</tt>.</li>
+
+<li>Made the IMAP server check for the existence of the mailboxes
+file upon startup, in order to give a more informative error
+message for this common configuration error.</li>
+
+<li>Fixed other minor bugs.</li>
+</ul>
+
+<hr />
+last modified: $Date: 2006/06/27 15:58:40 $ <br />
+<a href="index.html">Return</a> to the Cyrus IMAP Server Home Page
+</body>
+</html>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/cyrusv2.mc
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/cyrusv2.mc?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/cyrusv2.mc (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/cyrusv2.mc Sat Aug 26 02:00:13 2006
@@ -1,0 +1,40 @@
+# divert(-1)
+#
+# (C) Copyright 2000 by Carnegie Mellon University
+#
+# This sample mc file is for a site that uses the Cyrus IMAP server
+# exclusively for local mail. This requires Sendmail 8.10 or later.
+#
+# $Id: cyrusv2.mc,v 1.4 2001/08/23 23:26:56 leg Exp $
+
+divert(0)dnl
+VERSIONID(`cyrus v2 sample configuartion')
+
+OSTYPE(linux)
+define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')
+define(`confTO_IDENT',`0')
+
+dnl setting cyrus as the trusted user will make it easier to pass
+dnl Sendmail's safefile checks. however, it means that someone with the
+dnl "cyrus" password could easily become root.
+dnl define(`confTRUSTED_USER', `cyrus')
+
+define(`confLOCAL_MAILER', `cyrus')
+
+dnl if you aren't using Sendmail 8.12, you might need to remove
+dnl the following feature.
+FEATURE(`preserve_local_plus_detail')
+
+FEATURE(`nocanonify')
+FEATURE(`always_add_domain')
+MAILER(`local')
+MAILER(`smtp')
+
+MAILER_DEFINITIONS
+Mcyrus, P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n,
+ S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix,
+ A=FILE /var/imap/socket/lmtp
+
+LOCAL_RULE_0
+Rbb + $+ < @ $=w . > $#cyrus $: + $1
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/faq.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/faq.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/faq.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/faq.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,279 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<title>Cyrus IMAP Server FAQ</title>
+<!-- $Id: faq.html,v 1.35.2.1 2004/03/24 19:52:58 ken3 Exp $ -->
+</head>
+<body>
+<h1>Cyrus IMAP Server FAQ</h1>
+
+<ul>
+<li><b>Using PAM</b> Under Linux when using PAM and shadow
+passwords, /etc/shadow needs to be readable by the Cyrus user.</li>
+
+<li><b>POP-Before-SMTP</b> It is not included in the default distribution
+because there is already a standard way of doing this with SMTP AUTH.
+Any good MTA and/or MUA should support SMTP AUTH, so we shouldn't have
+to create a hack in an unrelated service. However, if you would like
+to install it anyway, we recommend using
+<a href="http://mail.cc.umanitoba.ca/drac/">DRAC</a>,
+along with the patch available in <tt>contrib/drac_auth.patch</tt>.</li>
+
+<li><b>Using NFS</b> We don't recommend it. If you want to do it,
+it may possibly work but you may also lose your email or have
+corrupted <tt>cyrus.*</tt> files. You can look at the mailing list
+archives for more information.</li>
+
+<li><b>Using AFS/Coda</b> We don't recommend it. It's even less likely
+to work than NFS. If you want to do it, it may possibly work but you
+may also lose your email or have corrupted <tt>cyrus.*</tt>
+files. CMU's previous e-mail system, AMS, leveraged AFS extensively
+for storage (and transit) purposes. For various reasons it didn't
+scale particularly well and led to CMU's interest in IMAP.
+
+<p>
+Cyrus was designed to use a local filesystem with Unix semantics and a
+working mmap()/write() combination. AFS doesn't provide these
+semantics so won't work correctly.</p>
+</li>
+
+<li><b>Virtual hosting</b> - See <a
+href="install-virtdomains.html">virtual domains configuration</a>.</li>
+
+<li><b>dots in userids</b> - you can have a '.' in your username
+IF, AND ONLY IF, you use the <a
+href="altnamespace.html#unixhiersep">UNIX hierarchy
+convention</a>.</li>
+
+<li><b>renaming users</b> - Supported, but try to make sure that the
+user is not, and can not login when doing the rename. Otherwise
+user-meta may get corrupted and/or out of sync.</li>
+
+<li><b>plus addressing</b> - Plus addressing allows direct delivery
+to a particular mailbox (other than an INBOX). This is done in two ways.
+
+<p>The first way allows delivery to a subfolder of a specific user's
+INBOX. This is done via an address of the form: username+mailfolder at domain,
+which will deliver to the user's INBOX.mailfolder folder (or altnamespace
+equivalent). This submailbox must allow the posting user the 'p' right
+(generally, this means 'anyone' must have the 'p' right), otherwise the
+message will just be filed into the user's INBOX.
+
+<p>The second way is to form an address like [postuser]+mailfolder at domain.
+This will deliver into the mailbox 'mailfolder'. [postuser] is the string
+specified in the imapd.conf option of the same name, and may be the
+empty string. As before, the posting user will need to have the 'p' right on
+the mailbox.
+
+<p>For both methods, if 'mailfolder' is more than one level deep, you will
+need to conform to the hierarchy separator appropriate to your site.
+</li>
+
+<li><b>Performance/Capacity/Scaling</b> - See <a
+href="install-perf.html">the performance guide</a>.</li>
+</ul>
+
+<h2>Troubleshooting</h2>
+
+<dl compact="compact">
+<dt><b>Q:</b> I'm getting syslog'd messages from the master process
+saying processes are "signaled to death by 10". What's up?</dt>
+
+<dd>
+<p><b>A:</b> If you're using Berkeley DB 3.0.55, try installing
+some <a
+href="http://www.sleepycat.com/update/3.0.55/patch.3.0.55.html">patches
+to Berkeley DB</a> available from <a
+href="http://www.sleepycat.com/update/3.0.55/patch.3.0.55.html">http://www.sleepycat.com/update/3.0.55/patch.3.0.55.html</a>.</p>
+</dd>
+
+<dt><b>Q:</b> I've used <tt>saslpasswd2</tt> to create CRAM-MD5
+secrets, but imapd doesn't say <tt>AUTH=CRAM-MD5</tt>. Why?</dt>
+
+<dd>
+<p><b>A:</b> Make sure <tt>/etc/sasldb2</tt> is readable by the
+Cyrus user.</p>
+</dd>
+
+<dt><b>Q:</b> I'm using "<tt>sasl_pwcheck_method: saslauthd</tt>", but
+authentication isn't working.</dt>
+
+<dd>
+<p><b>A:</b> Make sure that the <tt>saslauthd</tt> daemon is running
+(you'll want to start it when the system boots). <tt>imapd</tt> is
+unable to connect to <tt>saslauthd</tt> if the following message
+appears in the logs:</p>
+
+<pre>
+Dec 6 12:58:57 mail3.andrew.cmu.edu imapd[1297]: cannot connect to saslauthd server
+</pre>
+
+<p>Make sure that <tt>saslauthd</tt> is running and that the cyrus
+user can access the unix domain socket (defaults to <tt>/var/run/mux</tt>).
+
+</dd>
+
+<dt><b>Q:</b> I'm getting messages about "duplicate_prune". What's
+wrong?</dt>
+
+<dd><p><b>A:</b> These messages look like </p>
+
+<pre>
+Jan 14 13:46:24 grant ctl_deliver[9060]: duplicate_prune: opening
+ /var/imap/deliverdb/deliver-x.db: No such file or directory
+Jan 14 13:46:24 grant ctl_deliver[9060]: duplicate_prune: opening
+ /var/imap/deliverdb/deliver-y.db: No such file or directory
+Jan 14 13:46:24 grant ctl_deliver[9060]: duplicate_prune: opening
+ /var/imap/deliverdb/deliver-z.db: No such file or directory
+</pre>
+
+<p>These messages are normal; one file is maintained for each user
+beginning with "x", "y", "z", etc. If you're first starting or you
+have no users beginning with these letters, these messages are
+completely normal and can be ignored.</p>
+</dd>
+
+<dt><b>Q:</b> I'm getting a message about "<tt>imapd: could not
+getenv(CYRUS_SERVICE); exiting</tt>" in my <tt>imapd.log</tt>.
+What's wrong?</dt>
+
+<dd>
+<p><b>A:</b> Remove all <tt>imap</tt>, <tt>pop</tt>, <tt>lmtp</tt>
+and <tt>sieve</tt> lines from <tt>[x]inetd.conf</tt> and restart
+<tt>[x]inetd</tt>. Cyrus is run out of its own "master" process.</p>
+</dd>
+
+<dt><b>Q:</b> How do I use different SSL/TLS certificates for imap
+and pop?</dt>
+
+<dd>
+<p><b>A:</b> Specify the different certs using the appropriate
+options in <tt>imapd.conf</tt>. Read <tt>imapd.conf(5)</tt> for
+details.</p>
+</dd>
+
+<dt><b>Q:</b> My KPOP client is complaining about TLS keys. What
+should I do?</dt>
+
+<dd>
+<p><b>A:</b> Disable TLS for the kpop service. Either set
+<tt>tls_pop3_cert_file</tt> to <b>disabled</b> in
+<tt>imapd.conf</tt> (which will also disable SSL/TLS for pop3), or
+use a separate config file for kpop. For example, change the kpop
+service in <tt>cyrus.conf</tt> to something like:</p>
+
+<pre>
+kpop cmd="pop3d -k -C /etc/kpopd.conf" listen="kpop"
+</pre>
+
+<p>then copy <tt>/etc/imapd.conf</tt> to <tt>/etc/kpopd.conf</tt> and
+remove the <tt>tls_*</tt> options.</p>
+</dd>
+
+<dt><b>Q:</b> Eudora 5.x can't connect using STARTTLS ("SSL
+Neogotiation Failed"). What should I do?</dt>
+
+<dd>
+<p><b>A:</b> First, complain to QUALCOMM because their STARTTLS
+implementation is broken. Eudora doesn't support TLSv1 (per
+RFC2246) and Cyrus requires it. If you really need this before it
+is fixed in Eudora, remove or comment out the following lines in
+tls.c:</p>
+
+<pre>
+ if (tlsonly) {
+ off |= SSL_OP_NO_SSLv2;
+ off |= SSL_OP_NO_SSLv3;
+ }
+</pre>
+</dd>
+
+<dt><b>Q:</b> I'm getting messages in <tt>imapd.log</tt> like:
+<pre>
+Sep 11 17:23:55 ogg lmtpd[773]: DBERROR db3: 16 lockers
+Sep 11 17:23:55 ogg lmtpd[1409]: DBERROR db3: 17 lockers
+Sep 11 17:23:56 ogg lmtpd[1508]: DBERROR db3: 9 lockers
+Sep 11 17:23:56 ogg lmtpd[776]: DBERROR db3: 9 lockers
+</pre>
+What's wrong?
+</dt>
+
+<dd>
+<p><b>A:</b> Nothing is wrong. These messages are logged whenever
+Berkeley db encounters lock contention, but isn't necessarily a
+problem by themselves. This is especially likely when you have an
+empty or small duplicate delivery database and are receiving a large
+volume of e-mail.</p>
+
+<p>Berkeley db 4.0 has a bug where the number of lockers isn't
+decremented properly, causing this number to be unreliable.</p>
+</dd>
+
+<dt><b>Q:</b> All of the 8bit characters in the headers of messages
+that I receive are being changed to 'X's. What's going on?</dt>
+
+<dd>
+<p><b>A:</b> 8-bit characters are illegal in message headers. Following
+the principal of "be liberal in what you accept, and strict in what you
+send" cyrus converts them to Xs. (Without a character set, having
+the 8-bit characters replaced with Xs is just as good as having them be any
+other 8-bit character, especially for sorting and searching).
+Alternatively, you can set "reject8bit: t" in <tt>imapd.conf</tt> to
+reject the messages outright. It might
+also be reasonable for cyrus to support the use of a default character set,
+however thus far no one has done the work to do so (it would also involve
+QP-encoding the corrupted headers).
+</p>
+</dd>
+
+<dt><b>Q:</b> Why can't I delete any messages from my over-quota mailbox?
+I'm using a client with a 'trash folder'.</dt>
+
+<dd>
+<p><b>A:</b>
+Trash folders, as they are commonly implemented (as an actual IMAP mailbox),
+do not fit the IMAP delete/expunge model very well. In fact, naive
+client implementations will get stuck in a situation where they cannot
+delete a message from a mailbox because they try to COPY it to the trash
+folder before deleting the message. This operation will fail due to the
+mailbox being over quota. This is separate from the fact that a specific
+mailbox name is not interoperable between clients (one might call it 'trash',
+another 'Trash', another 'Recycle Bin', etc)
+</p><p>
+Given the lack of protocol support for a trash folder, this is mostly a
+quality-of-implementation issue on the client side. There
+are a few options here:
+<ul>
+<li>Contact your client vendor to have
+the broken client fixed (one possibility is to have the client ask the user
+if they wish to permanantly delete the message if the COPY operation fails).</li>
+<li>Stop using the 'trash mailbox' feature of your client (if possible).</li>
+<li>Set a separate quota root on the 'trash folders'
+of users. This last option is significantly harder to do correctly, since
+it assumes that all clients that make use of a trash folder do so with the
+same folder name.</li>
+</ul>
+</p>
+</dd>
+
+<dt><b>Q:</b> How do I stop Cyrus from advertising the DIGEST-MD5 and
+CRAM-MD5 shared secret SASL mechanisms?</dt>
+
+<dd>
+<p><b>A:</b> Not really a Cyrus IMAPd question, this can be fixed by
+just removing the SASL plugins from where Cyrus SASL installed them
+(if no other applications require them), or by using the
+<tt>sasl_mech_list</tt> <tt>imapd.conf</tt> option to list only the
+mechanisms that you require.</p>
+</dd>
+
+</dl>
+
+<hr />
+last modified: $Date: 2004/03/24 19:52:58 $ <br />
+<a href="index.html">Return</a> to the Cyrus IMAP Server Home Page
+</body>
+</html>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/feedback.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/feedback.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/feedback.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/feedback.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,58 @@
+<!-- $Id: feedback.html,v 1.6 2003/08/15 17:37:04 rjs3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Sending Feedback on the Cyrus IMAP Server</TITLE>
+
+</HEAD>
+<BODY>
+<h1>Sending Feedback on the Cyrus IMAP Server</h1>
+
+<P>Feedback on and fixes for the software or on the document may be
+sent to <a
+href="mailto:cyrus-bugs+ at andrew.cmu.edu"><tt>cyrus-bugs+ at andrew.cmu.edu</tt></a>.
+Unfortunately, we can not guarantee a response but we'll try the best
+we can. As usual, a high quality and complete message helps us
+tremendously.
+
+<p>If you submit a patch, please send unified diffs (-u) if your diff
+program supports them, or context diffs (-c) if it doesn't. Plain
+diffs are very difficult to evaluate. <a
+href="ftp://ftp.gnu.org/pub/gnu/diffutils/">GNU diff</a> can do this.
+
+<p>When reporting problems, be sure to include the relevant
+information. For example, you must include:
+<ul>
+ <li> the version of imapd
+ <li> the version of libsasl
+ <li> your system type (<tt>uname -a</tt> often provides
+ the right information.
+</ul>
+You should also include:
+<ul>
+ <li> the options you passed to <tt>./configure</tt>
+ <li> the errors from <tt>make</tt> (if any)
+ <li> the <tt>config.status</tt> file generated by
+ <tt>configure</tt>
+</ul>
+
+<p><b>NOTE: </b>If you are able to connect to the imap server, all of this
+information can be gathered by using the <tt>version</tt>
+command in <tt>cyradm</tt>. If you can not use <tt>cyradm</tt>
+because you are having perl problems, you can connect using
+<tt>imtest</tt> and then run the following IMAP command:
+<ul>
+<tt>a ID NIL</tt>
+</ul>
+
+<p>
+The <tt>info-cyrus at andrew.cmu.edu</tt> mailing list exists for the
+discussion of this server and other Cyrus software; more information
+is available in the <a href="mailing-list.html">mailing-list</a>
+document. You may get faster/more responses by posting to this
+list instead of to cyrus-bugs, as there are more readers here.
+
+<P><HR>
+last modified: $Date: 2003/08/15 17:37:04 $
+<br>
+<A HREF="index.html">Return</A> to the Cyrus IMAP Server Home Page
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/index.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/index.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/index.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/index.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<title>Cyrus IMAP Server v2.3 Documentation</title>
+<!-- Changed by: Larry Greenfield, processed by tidy, 18-Nov-2001 -->
+<!-- Changed by: Larry Greenfield, 13-Aug-1999 -->
+<!-- Changed by: John Gardiner Myers, 16-May-1996 -->
+<!-- $Id: index.html,v 1.12.2.1 2004/04/03 19:08:11 ken3 Exp $ -->
+</head>
+<body>
+<h1>Cyrus IMAP Server, version 2.3</h1>
+
+<p>IMAP (Internet Message Access Protocol) is an Internet
+standards-track protocol for accessing messages (mail, bboards,
+news, etc). The Cyrus IMAP server differs from other IMAP server
+implementations in that it is generally intended to be run on
+sealed servers, where normal users are not permitted to log in. The
+mailbox database is stored in parts of the filesystem that are
+private to the Cyrus IMAP system. All user access to messages is
+through the IMAP, POP3, KPOP or NNTP protocols.</p>
+
+<p>The private mailbox database design gives the server large
+advantages in efficiency, scalability, and administratability.
+Multiple concurrent read/write connections to the same mailbox are
+permitted. The server supports access control lists on mailboxes
+and storage quotas on mailbox hierarchies.</p>
+
+<p>The Cyrus project is the implementation of IMAP servers by the
+Carnegie Mellon University Computing Services Department. Over the
+next few months, we will be releasing components of this server,
+which will provide better mail security and easier mail
+administration.</p>
+
+<h2>The Cyrus IMAP Server Distribution</h2>
+
+<p><a href="http://asg.web.cmu.edu/cyrus/download/"><b>Cyrus IMAP
+Server distribution</b></a></p>
+
+<p><b>Documentation</b></p>
+
+<ul>
+<li><a href="readme.html">General release information</a></li>
+
+<li><a href="overview.html">Overview and Concepts</a></li>
+
+<li><a href="install.html">Installing the Cyrus IMAP
+Server</a></li>
+
+<li><a href="changes.html">Changes since the last release</a></li>
+
+<li><a href="faq.html">Frequently Asked Questions</a></li>
+
+<li><a href="man.html">Man Pages</a></li>
+
+<li><a href="specs.html">Protocol Specifications</a></li>
+</ul>
+
+<hr />
+<a href="http://asg.web.cmu.edu/cyrus">Go</a> to the Project Cyrus
+homepage.<br />
+<a href="http://asg.web.cmu.edu">Go</a> to the Andrew Systems Group
+homepage.
+
+<hr />
+last modified: $Date: 2004/04/03 19:08:11 $
+</body>
+</html>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-admin-mb.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-admin-mb.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-admin-mb.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-admin-mb.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,89 @@
+<!-- $Id: install-admin-mb.html,v 1.3.10.1 2004/06/24 15:16:22 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Administering Mailboxes
+</title>
+</head>
+<h1>Administering Mailboxes</h1>
+<body>
+
+The "<tt>cyradm</tt>" command (see the <tt>cyradm</tt>(1) man page for
+complete documentation) manages the creation of, deletion of, ACLs on,
+and quotas on mailboxes. To get an overview of the command, type
+"<kbd>cyradm <var><host></var></kbd>". Once "<tt>cyradm</tt>" has started,
+the user prompt is replaced with the name of the host followed by a
+"<tt>></tt>". Type "<kbd>help</kbd>" at the new prompt. The
+following information is displayed:
+
+<pre>
+ createmailbox, cm create a mailbox
+ deleteaclmailbox, dam delete an ACL on a mailbox
+ deletemailbox, dm delete a mailbox
+ help get help on commands
+ listaclmailbox, lam list the ACL on a mailbox
+ listmailbox, lm list mailboxes
+ listquota, lq list quota on root
+ listquotaroot, lqr, lqm list quota roots on mailbox
+ quit exit program
+ renamemailbox, renm rename a mailbox
+ setaclmailbox, sam set an ACL on a mailbox
+ setquota, sq set quota limits
+</pre>
+
+<b>Note:</b>It's not necessary to run "<tt>cyradm</tt>" on the same
+system as the IMAP server.
+
+<p><b>Note:</b>If you run "<tt>cyradm</tt>" on a system not using
+Kerberos for authentication, you will be prompted for your user name
+and password before you can issue any "<tt>cyradm</tt>" commands. Use
+the "<tt>-u</tt>" option to specify a particular user.
+
+<p>The mailbox naming convention requires that the primary mailbox (inbox)
+for anyone must be named "<tt>user.<var><userid></var></tt>".
+To create a mailbox, type:
+
+<pre>
+<kbd> createmailbox user.<var><userid></var>
+</kbd></pre>
+
+For example, to create a mailbox for the userid "<tt>smith</tt>", type:
+
+<pre>
+<kbd> createmailbox user.smith
+</kbd></pre>
+
+To limit "<tt>smith</tt>" to 10,000 kilobytes of mail, type:
+
+<pre>
+<kbd> setquota user.smith 10000
+</kbd></pre>
+
+Once the inbox is created, users can create their own additional mailboxes
+from a mail program. If Smith created a work mailbox and a play mailbox,
+the full names of the mailboxes would be:
+
+<pre>
+ user.smith.work
+ user.smith.play
+</pre>
+
+<p>Access rights are discussed in detail in the <tt>cyradm</tt>(1) man pages.
+Note that the administrator must grant herself create/delete access
+explicitly before she can delete a mailbox:
+
+<pre>
+<kbd> setaclmailbox <var><mail_box></var> <var><admin_userid></var> c
+ deletemailbox <var><mail_box></var>
+</kbd></pre>
+
+Once you have created mailboxes, your IMAP server installation is
+done. You must then configure a mail interface, such as <a
+href="http://www.washington.edu/pine/">Pine</a> or <a
+href="http://www.cyrusoft.com/mulberry/">Mulberry</a>, to work with the
+IMAP server.
+
+<P><HR>
+last modified: $Date: 2004/06/24 15:16:22 $
+</BODY></HTML>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-auth.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-auth.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-auth.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-auth.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,201 @@
+<!-- $Id: install-auth.html,v 1.12 2003/07/28 02:47:09 rjs3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Authenticating Users
+</title>
+</head>
+<body>
+<h1>Authenticating Users
+</h1>
+
+<h2>Introduction</h2>
+
+The Cyrus IMAP Server uses the Cyrus SASL library to authenticate
+users. Please refer to the Cyrus SASL documentation for specific
+details on SASL. This section focuses specifically on the server processes
+distributed with Cyrus IMAPd.
+
+<h2>Authentication Mechanisms</h2>
+
+At this writing, the underlying Cyrus SASL library supports a
+variety of SASL mechanisms, including CRAM-MD5, DIGEST-MD5, KERBEROS_V4,
+and GSSAPI. The Cyrus IMAP, POP, and LMTP servers also support
+STARTTLS using client-side certificates and the EXTERNAL
+authentication method.
+
+<p>GSSAPI is specific to Kerberos version 5. Additionally, STARTTLS client
+side certificates have not been extensively tested.
+
+<p>When STARTTLS is enabled, the PLAIN SASL mechanism (if installed)
+also becomes available. This is because one should not pass a clear
+text password over the wire unless the connection is encrypted.
+
+<p>The IMAP protocol also supports a way for users to authenticate without
+using SASL (the specification). This is via the 'LOGIN' command (not to be
+confused by the LOGIN SASL mechanism). The IMAP LOGIN command (as with
+PLAIN) will send your password in clear-text to the server. In this case,
+the password is still verified through the Cyrus SASL library, though no
+SASL mechanism actually performs a negotiation.
+
+<p>The POP server is capable of APOP authentication, but this requries that
+Cyrus SASL be compiled <tt>--with-checkapop</tt>, and also that you are using
+an auxprop backend for your password store (e.g. the sasldb auxprop plugin).
+
+<h2>Authentication Recommendations</h2>
+
+<ul>
+<li>If you are running a mail server on a single machine, we recommend
+that you configure the system to use CRAM-MD5 or DIGEST-MD5. We have not
+provided utilities for you to let users change their passwords but either
+we or someone else might provide that feature.
+
+<li>If you have more than one mail server, we recommend that you
+configure the system to use GSSAPI and Kerberos5.
+
+<li>If you have some other authentication mechanism that requires the
+clear text password, you should use <tt>saslauthd</tt>.
+
+<p><tt>saslauthd</tt> is something specific to the Cyrus SASL
+libraries. While it is less generic than PAM, it is much simpler
+to configure. The IMAP server simply sends a userid and a corresponding
+password down a Unix domain pipe. Then, <tt>saslauthd</tt> takes that
+userid and password and tries to authenticate with it -- using whatever
+authentication you use -- and simply returns "yes" or "no" as to
+whether or not the password was correct.
+
+<p>It is possible to configure <tt>saslauthd</tt> to check these
+passwords via a PAM mechanism, <tt>/etc/passwd</tt>, or other
+possibilities.
+
+<p>PAM stands for pluggable authentication modules and the purpose is
+to provide a common API which applications can use to obtain
+authentication for a user. You can think of PAM as a complementary
+layer under the SASL layer. See <a
+href="http://www.kernel.org/pub/linux/libs/pam/FAQ">
+http://www.kernel.org/pub/linux/libs/pam/FAQ</a> for more information
+on PAM. By using a PAM module, all the other applications on your
+system can take advantage of it -- for example, login, xlock, etc.
+
+<p>Keep in mind that when you use PLAIN or LOGIN you should encrypt
+the stream so a user's password can not be trivially sniffed off of
+the network.
+</ul>
+
+<h2>Configuring Authentication</h2>
+
+<p>Cyrus SASL has a number of options that can be configured by
+the application. To configure these via imapd.conf, simply prefix
+the appropriate option name with <tt>sasl_</tt> (e.g.
+<tt>pwcheck_method</tt> becomes <tt>sasl_pwcheck_method</tt>).
+
+<h3>/etc/sasldb2</h3>
+
+<p>The easiest method for authenticating users is to use the libsasl
+authentication database and create users using the
+"<tt>saslpasswd2</tt>" utility. Set "<tt>sasl_pwcheck_method:
+auxprop</tt>", and be sure that the SASL sasldb auxprop module is
+installed (it is, by default). Make sure Cyrus can read "<tt>/etc/sasldb2</tt>":
+<pre>
+<kbd> chown cyrus /etc/sasldb2*
+</kbd></pre>
+
+<h3>Shadow Passwords</h3>
+
+<p>If you want to authenticate users from "<tt>/etc/shadow</tt>", things
+are considerably more complicated, since the cyrus user cannot read the
+shadow password file. Additionally, this will not allow you to use shared
+secret mechanisms. To do this, it is necessary to configure libsasl with
+<tt>saslauthd</tt> support, and set "<tt>sasl_pwcheck_method:
+saslauthd</tt>". The SASL library will then make calls to an external
+utility running as root to authenticate users.
+
+<h3>Kerberos</h3><a name="kerberos"></a>
+
+<h4>Configuring Kerberos v4</h4>
+
+<p>Cyrus IMAP supports Kerberos v4 if the SASL library was compiled
+with KERBEROS_V4 support.</p>
+
+<p>You'll have to
+create a Kerberos v4 identity for the server and add the server's key to
+the "<tt>srvtab</tt>" file. The file must be readable by the cyrus
+user. The server's Kerberos identity is "<tt>imap.HOST at REALM</tt>",
+where "<tt>HOST</tt>" is the first component of the machine's host
+name and "<tt>REALM</tt>" is the machine's Kerberos realm.</p>
+
+<ol>
+<li>Here is a sample session, creating a srvtab file for the
+host named "<tt>foobar</tt>":
+
+<pre>
+<kbd> ksrvutil -f /var/imap/srvtab add
+</kbd></pre>
+
+<p>Here is the information "<tt>ksrvutil</tt>" requests. Respond by
+filling in values or by pressing <KBD>RETURN</KBD>. In this example,
+the host name is "<tt>foobar</tt>" and the realm is
+"<tt>ANDREW.CMU.EDU</tt>".</p>
+
+<pre>
+ Name: <kbd>imap</kbd>
+ Instance: <KBD>foobar</KBD>
+ Realm: <KBD>ANDREW.CMU.EDU</KBD>
+ Version number:
+ New principal: imap.foobar at ANDREW.CMU.EDU; version 0
+ Is this correct? (y,n) [y]
+ Password:
+ Verifying, please re-enter Password:
+ Key successfully added.
+ Would you like to add another key? (y,n) [y] <KBD>n</KBD>
+</pre></li>
+
+<li><p>If you plan to install Kerberized POP, create the Kerberos
+identity "<tt>pop.HOST at REALM</tt>" and add the key to the "<tt>srvtab</tt>"
+file. Likewise, if you plan on using LMTP over TCP, create the
+Kerberos identity "<tt>lmtp.HOST at REALM</tt>" and add the key to the
+"<tt>srvtab</tt>" file.</p></li>
+
+<li><P>Make the "<TT>srvtab</TT>" file owned by the cyrus user:
+<pre>
+<kbd> chown cyrus /var/imap/srvtab
+</kbd></pre></li>
+
+<li>Add the option srvtab option to <tt>/etc/imapd.conf</tt>:
+<pre> srvtab: /var/imap/srvtab</pre></li>
+
+<li>Test using <tt>imtest -m KERBEROS_V4</tt>. <tt>imtest</tt> will
+attempt to authorize as the current Unix user regardless of the
+current ticket's held. Override this with the <tt>-u</tt> option.</li>
+</ol>
+
+<h4>Troubleshooting Kerberos_V4 problems</h4>
+
+<p>Run the program "<tt>krbck</tt>" (found in the <tt>imap</tt>
+directory) as the cyrus user on the IMAP server. This program will
+diagnose some common Kerberos v4 configuration errors.</p>
+
+<h4>Configuring Kerberos v5</h4>
+
+<p>Cyrus IMAP supports Kerberos v5 if the SASL library was compiled
+with GSSAPI support.</p>
+
+<p>You'll have to create a Kerberos v5 identity for the server.
+Kerberos v5 keys are generally stored in "<tt>/etc/krb5.keytab</tt>".
+
+<ol>
+<li>Add the "<tt>imap/hostname</tt>" key using "<tt>kadmin</tt>".
+
+<li> Let the cyrus user read "<tt>/etc/krb5.keytab</tt>":
+user:
+<pre>
+<kbd> chown cyrus /etc/krb5.keytab
+</kbd></pre></li>
+
+<li>Test using <tt>imtest -m GSSAPI</tt>. <tt>imtest</tt> will
+attempt to authorize as the current Unix user regardless of the
+current ticket's held. Override this with the <tt>-u</tt> option.</li>
+</ol>
+
+<HR>
+last modified: $Date: 2003/07/28 02:47:09 $
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-compile.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-compile.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-compile.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-compile.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,293 @@
+<!-- $Id: install-compile.html,v 1.16.2.1 2004/01/27 23:13:36 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Compiling the IMAP Server
+</title>
+</head>
+<h1>Compiling the IMAP Server
+</h1>
+<body>
+
+Once you have unpacked the files by extracting the tar archive,
+"<TT>cd</TT>" to the "<tt>cyrus-imapd-<i>NNNN</i></tt>" directory
+where <i>NNNN</i> is the version number. The configuration files and
+various subdirectories are stored there. In the directory that the
+<TT>configure</TT> file is in, type "<kbd>./configure</kbd>" to
+configure the software. Please continue to read this document as there
+are switches to <kbd>./configure</kbd> that may apply to you.
+
+<h2><kbd>configure</kbd> Overview</h2>
+
+<P>The "<TT>configure</TT>" shell script attempts to guess correct
+values for various system-dependent variables used during compilation.
+It uses those values to create a "<TT>Makefile</TT>" in each directory
+of the package. Finally, it creates a shell script
+"<TT>config.status</TT>" that you can run in the future to recreate
+the current configuration, a file "<TT>config.cache</TT>" that saves
+the results of its tests to speed up reconfiguring, and a file
+"<TT>config.log</TT>" containing compiler output (useful mainly for
+debugging "<TT>configure</TT>").
+
+<P>Running "<tt>configure</tt>" takes awhile. While running, it
+prints some messages telling which features it is checking for.
+
+<P>You can compile the package in a different directory from the one
+containing the source code. Doing so allows you to compile it on more
+than one kind of computer at the same time. To do this, you must use
+a version of "<TT>make</TT>" that supports the "<tt>VPATH</tt>"
+variable, such as GNU "<TT>make</TT>". "<TT>cd</TT>" to the directory
+where you want the object files and executables to go and run the
+"<tt>configure</tt>" script. "<tt>configure</tt>" automatically
+checks for the source code in the directory that "<tt>configure</tt>"
+is in and in "<tt>..</tt>".
+
+<P>By default, "<TT>make install</TT>" will install files (other than
+server-specific programs) in "<TT>/usr/local/bin</TT>",
+"<TT>/usr/local/man</TT>", etc. You can specify an installation
+prefix other than "<TT>/usr/local</TT>" by giving "<TT>configure</TT>"
+the option "<TT>--prefix=PATH</TT>".
+
+<P>You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If
+you give "<TT>configure</TT>" the option
+"<TT>--exec-prefix=PATH</TT>", the package will use <TT>PATH</TT> as
+the prefix for installing programs and libraries. Documentation and
+other data files will still use the regular prefix.
+
+<P>By default, "<TT>make install</TT>" will install the
+server-specific programs in "<TT>/usr/cyrus/bin</TT>". You can
+specify a server-specific installation prefix other than
+"<TT>/usr/cyrus</TT>" by giving "<TT>configure</TT>" the option
+"<TT>--with-cyrus-prefix=PATH</TT>".
+
+<h2>Options to <kbd>configure</kbd></h2>
+<p>Here are a list of switches that can be used with "<A
+NAME="configure"><tt>configure</tt></A>".
+
+<dl>
+<dt><tt>--help</tt>
+<dd>Print a summary of the options to "<tt>configure</tt>", and exit. <P>
+
+<dt><tt>--with-auth=METHOD</tt>
+<dd>Specifies the authorization (group membership) module to use.
+Currently implemented authorization modules are:
+<dl compact>
+<DT><tt>unix</tt>
+<DD>Unix <tt>/etc/passwd</tt> and <tt>/etc/group</tt> file
+<DT><tt>krb</tt>
+<DD>Kerberos principals (requires Kerberos libraries). Optionally,
+specify where to find Kerberos v4 with "<tt>--with-krb=DIR</tt>"
+<B>IMPORTANT:</B> The Kerberos v4 support requires the DES library.
+Some vendor distributions of Kerberos, including the one with Solaris,
+do not have this support and cannot be used.
+<DT><tt>krb_pts</tt>
+<DD>Kerberos principals with AFS PTserver groups (requires Kerberos
+and AFS libraries). Optionally, specify where the AFS libraries are
+found with "<tt>--with-afs=PATH</tt>". Also requires krb support as above.
+</dl>
+Any method of authenticating with SASL can be used with any
+authorization module.<P>
+
+<dt><tt>--with-krb=PATH</tt>
+<dd>Specifies where to find the Kerberos library.<P>
+
+<dt><tt>--with-com_err=PATH</tt>
+<dd>Specifies where to find the com_err environment.<P>
+
+<dt><tt>--with-cyrus-group=USER</tt>
+<dd>Specifies the group used for installing setguid programs. By default,
+configure uses "<TT>mail</TT>". <P>
+
+<dt><tt>--with-cyrus-prefix=PATH</tt>
+<dd>Change the location of the server software. By default, the
+ <tt>cyrus-prefix</tt> is <tt>/usr/cyrus</tt>.<p>
+
+<dt><tt>--with-cyrus-user=USER</tt>
+<dd>Specifies the userid that the Cyrus IMAP server will run as. By
+default, configure uses "<TT>cyrus</TT>". <P>
+
+<dt><tt>--with-dbdir=PATH</tt>
+<dd>Specifies where to find the Berkeley DB library.<P>
+
+<dt><tt>--with-duplicate-db=DB</tt>
+<dd>Specifies which database backend to use for the duplicate delivery
+database. By default, configure uses "<TT>berkeley_nosync</TT>".<P>
+
+<dt><tt>--with-mboxlist-db=DB</tt>
+<dd>Specifies which database backend to use for the mailbox list. By
+default, configure uses "<TT>berkeley</TT>".<P>
+
+<dt><tt>--with-seen-db=DB</tt>
+<dd>Specifies which database backend to use for the seen state. By
+default, configure uses "<TT>flat</TT>".<P>
+
+<dt><tt>--with-subs-db=DB</tt>
+<dd>Specifies which database backend to use for the subscriptions
+list. By default, configure uses "<TT>flat</TT>".<P>
+
+<dt><tt>--with-tls-db=DB</tt>
+<dd>Specifies which database backend to use for the TLS cache. By
+default, configure uses "<TT>berkeley_nosync</TT>".<P>
+
+<dt><tt>--with-idle=METHOD</tt>
+<dd>Specifies the IMAP IDLE method to use.
+Currently implemented IDLE methods are:
+<dl compact>
+<DT><tt>idled</tt>
+<DD>Use the IDLE daemon. The IDLE daemon listens on a UNIX socket for
+messages from lmtpd/imapd/pop3d that a mailbox has been updated. The
+daemon then signals those (if any) imapd that are idling on the
+mailbox to check for the changes.
+<DT><tt>poll</tt>
+<DD>Periodically poll the mailbox for changes.
+<DT><tt>no</tt>
+<DD>Disable IMAP IDLE.
+</dl>
+By default, configure uses "<TT>poll</TT>".<P>
+
+<dt><tt>--with-lock=METHOD</tt>
+<dd>Specifies the locking method to use. Currently implemented locking
+methods are:
+
+<DL compact>
+
+<DT><TT>flock</TT>
+<DD><TT>flock()</TT> locking
+<DT><TT>fcntl</TT>
+<DD><TT>fcntl()</TT> locking
+</DL>
+
+By default, configure uses "<tt>fcntl</tt>" if the "<tt>fcntl()</tt>"
+function exists, "<tt>flock</tt>" otherwise.<P>
+
+<dt><tt>--with-openssl=PATH</tt>
+<dd>Specifies where to find the OpenSSL library.<P>
+
+<dt><tt>--with-egd-socket=FILE</tt>
+<dd>Specifies which socket to use to connect to the Entropy Gathering
+Daemon.<P>
+
+<dt><tt>--with-perl=PATH</tt>
+<dd>Specifies where to find the Perl binary (full path, including
+name of binary).<P>
+
+<dt><tt>--with-sasl=PATH</tt>
+<dd>Specifies the path to the directories containing the library
+(<tt>.../lib</tt>) and include (<tt>.../include</tt>)
+files for libsasl. <P>
+
+<dt><tt>--with-statedir=PATH</tt>
+<dd>Specifies the directory used for communicating with various
+daemons. By default, configure uses "<TT>/var</TT>". <P>
+
+<dt><tt>--with-libwrap=PATH</tt>
+<dd>Specifies where to find the TCP wrappers library.<P>
+
+<dt><tt>--with-ucdsnmp=PATH</tt>
+<dd>Specifies where to find the SNMP library.<P>
+
+<dt><tt>--with-zephyr=PATH</tt>
+<dd>Specifies where to find the Zephyr library (for notifyd).<P>
+
+<dt><tt>--enable-listext</tt>
+<dd>Enables support for LISTEXT extension.<p>
+
+<dt><tt>--enable-murder</tt>
+<dd>Enables support for IMAP Murder.<p>
+
+<dt><tt>--enable-netscapehack</tt>
+<dd>Enables support for X-NETSCAPE extension (administration URLs).<p>
+
+<dt><tt>--disable-sieve</tt>
+<dd>By default, Sieve support is enabled. Use
+<tt>--disable-sieve</tt> to disable compiling the Sieve library and to
+disable all Sieve support.<p>
+
+<dt><tt>--disable-cyradm</tt>
+<dd>Do not compile the <TT>cyradm</TT> administrative client.<P>
+
+<dt><tt>--disable-server</tt>
+<dd>Do not compile the IMAP server programs.<p>
+</dl>
+
+Run <tt>configure --help</tt> for further configuration options.
+
+<P>Some systems require unusual options for compilation or linking
+that the "<TT>configure</TT>" script does not know about. You can
+give "<TT>configure</TT>" initial values for variables by setting them
+in the environment. Using a Bourne-compatible shell, you can do that
+on the command line like this:
+
+<pre>
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+</pre>
+
+Or on systems that have the "<TT>env</TT>" program, you can do it like this:
+
+<pre>
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+</pre>
+
+The "<tt>make</tt>" variables that you might want to override with
+environment variables when running "<tt>configure</tt>" are:
+
+<DL compact>
+<DT><TT>CC</TT>
+<DD>C compiler program.<br>
+Default is "<tt>cc</tt>", or "<tt>gcc</tt>" if "<tt>gcc</tt>" is in
+your <tt>PATH</tt>.<br> (For "<tt>CC</tt>", any value given in the
+environment <strong>overrides</strong> the value that
+"<tt>configure</tt>" would choose.)
+
+<DT><TT>CFLAGS</TT>
+<DD>Debugging and optimization options for the C compiler.<br>
+
+<DT><TT>CPPFLAGS</TT>
+<DD>Header file search directory ("<tt>-IDIR</tt>") and any other
+miscellaneous options for the C preprocessor and compiler. If it is
+not set in the environment when "<tt>configure</tt>" runs, the default value is
+empty.<br>
+
+<DT><TT>LDFLAGS</TT>
+<DD>Stripping ("<TT>-s</TT>") and any other miscellaneous options for the
+linker. If it is not set in the environment when "<tt>configure</tt>" runs,
+the default value is empty.
+
+<DT><TT>DEFS</TT>
+<DD>Configuration options, in the form "<tt>-Dfoo -Dbar ...</tt>"<br>
+
+<DT><TT>LIBS</TT>
+<DD>Libraries to link with, in the form "<tt>-lfoo -lbar ...</tt>"<br>
+(For "<tt>DEFS</tt>" and "<tt>LIBS</tt>", any value given in the
+environment is <strong>added</strong> to the value that
+"<tt>configure</tt>" chooses.)
+</DL>
+
+If you need to do unusual things to compile the package, we encourage
+you to figure out how "<tt>configure</tt>" could check whether to do
+them. After doing so, please send us a patch! Instructions for doing
+so can be found on the <a href="feedback.html">feedback</a> page.
+
+<p>The file "<tt>configure.in</tt>" is used as a template to create
+"<tt>configure</tt>" by a program called "<tt>autoconf</tt>". You
+will only need it if you want to regenerate "<tt>configure</tt>" using
+a newer version of "<tt>autoconf</tt>".
+
+<p>Once you have successfully run "<tt>configure</tt>", execute the
+following commands:
+
+<pre>
+<kbd> make depend
+ make all CFLAGS=-O
+</kbd></pre>
+
+If you want, you can override the "<tt>make</tt>" variables
+<tt>CFLAGS</tt> and <tt>LDFLAGS</tt> by entering the following:
+
+<pre>
+<kbd> make all CFLAGS=-O2 LDFLAGS=-s
+</kbd></pre>
+
+<P><HR>
+last modified: $Date: 2004/01/27 23:13:36 $
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-configure.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-configure.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-configure.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-configure.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,541 @@
+<!-- $Id: install-configure.html,v 1.30.2.3 2004/02/12 05:32:32 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Installing and configuring the IMAP Server
+</title>
+</head>
+<h1>Installing and configuring the IMAP Server
+</h1>
+<body>
+
+This section describes the shell scripts to run and the configuration
+files to modify once "<tt>configure</tt>" and "<tt>make</tt>" have run.
+
+<ol> <li>Create a user and group for the Cyrus subsystem. The
+examples in this document assume a user of "<tt>cyrus</tt>" and a
+group of "<tt>mail</tt>", though any user and group name can be used.
+If a user other than "<tt>cyrus</tt>" is to be used, it must have been
+previously specified in the "<TT>--with-cyrus-user=</TT>" option to
+"<TT>configure</TT>". If a group other than "<tt>mail</tt>" is to be
+used, it must have been previously specified in the
+"<TT>--with-cyrus-group=</TT>" option to "<TT>configure</TT>".
+ <P>
+
+<li>After you've logged in as "<TT>root</TT>", install the cyrus software.
+
+<pre>
+<kbd> make install
+</kbd></pre>
+
+Be sure that the server programs ended up in the directory specified
+by "<tt>--with-cyrus-prefix</tt>" (by default, "<tt>/usr/cyrus/bin</tt>").
+
+<p><li>The Cyrus IMAP server uses the 4.3BSD syslog that separates
+messages into both levels and categories. Invoke "<kbd>man
+syslog</kbd>" to see if "<tt>openlog()</tt>" takes three arguments. If
+it does not, replace the system "<tt>syslogd</tt>" and
+"<tt>syslog.conf</tt>" with the files provided in the
+"<tt>syslog</tt>" directory.
+
+<pre>
+<kbd> mv syslogd /etc/syslogd
+ mv syslog.conf /etc/syslog.conf
+</kbd></pre>
+
+If you do not copy the "<tt>syslog/syslog.conf</tt>" file to the
+"<tt>/etc</tt>" directory, be sure to add support for
+"<tt>local6.debug</tt>". The file should include a line like:
+
+<pre>
+ local6.debug /var/log/imapd.log
+</pre>
+
+You probably also want to log SASL messages with a line like:
+<pre>
+ auth.debug /var/log/auth.log
+</pre>
+
+After installation and testing, you probably want to change the
+".debug" component to something a little less verbose. Create the log
+files:
+
+<pre>
+<kbd> touch /var/log/imapd.log /var/log/auth.log
+</kbd></pre>
+
+<li>Create the file "<tt>/etc/imapd.conf</tt>". Here is a sample
+"<tt>imapd.conf</tt>" with a minimal number of values defined:
+
+<pre>
+ configdirectory: /var/imap
+ partition-default: /var/spool/imap
+ admins: curtj abell
+ sasl_pwcheck_method: saslauthd
+</pre>
+
+For a description of all the fields in this file, see the
+<tt>imapd.conf(5)</tt> man page. (Note
+that this file also exports values to libsasl, the most important of
+them the <tt>pwcheck_method</tt>. In this example, users are
+authenticated via the <tt>saslauthd</tt> daemon, which can be run
+in a number of different ways.)
+
+<p><b>READ THE <tt>imapd.conf(5)</tt> MAN PAGE</b>. There are options
+in there that you will want to know about and default behavior that
+you may not like.
+
+ <P>
+Note that <b>everyday users should not be administrators</b>. Admins
+have powers not granted to regular users and while the server allows
+them to receive mail, some problems will occur if admins are used as
+regular users. You also should <b>not</b> read mail as an
+administrator. You should have separate accounts for reading mail and
+administrating. This is especially true if using the
+<tt>altnamespace</tt> option, because admins are <b>always</b>
+presented with the standard (internal) namespace.
+
+<p><li>Create the configuration directory specified by the
+"<tt>configdirectory</tt>" option in "<tt>imapd.conf.</tt>" The
+configuration directory is similar in concept to the
+"<tt>/usr/lib/news</tt>" directory. It stores information about the
+IMAP server as a whole.
+
+<p>This document uses the configuration directory "<tt>/var/imap</tt>"
+in its examples. This directory should be owned by the
+cyrus user and group and should not permit access to other users.
+
+<pre>
+<kbd> cd /var
+ mkdir imap
+ chown cyrus imap
+ chgrp mail imap
+ chmod 750 imap
+</kbd></pre>
+
+<li>Create the default partition directories specified in the
+"<tt>/etc/imapd.conf</tt>" file.
+
+<p>This document uses a default partition directory of
+"<tt>/var/spool/imap</tt>" in the following example:
+
+<pre>
+<kbd> cd /var/spool
+ mkdir imap
+ chown cyrus imap
+ chgrp mail imap
+ chmod 750 imap
+</kbd></pre>
+
+The partition directory is similar in concept to
+<tt>/var/spool/news</tt>. It is where the mailboxes are stored.
+Unlike most netnews systems, Cyrus allows you to have more
+than one partition.
+
+<li>If you wish to use Sieve, and you didn't configure deliver to look
+in home directories (see the <tt>imapd.conf</tt> man page), create the
+Sieve directory:
+
+<pre>
+<kbd> cd /usr
+ mkdir sieve
+ chown cyrus sieve
+ chgrp mail sieve
+ chmod 750 sieve
+</kbd></pre>
+
+<li>Change to the Cyrus user and use the tool
+"<tt>tools/mkimap</tt>" to create the rest of the directories
+(subdirectories of the directories you just created).
+
+<pre>
+<kbd> su cyrus
+ tools/mkimap
+ exit
+</kbd>
+</pre>
+
+If Perl is not available, it should be easy (but time consuming) to
+create these directories by hand. <P>
+
+<li><b>LINUX SYSTEMS USING EXT2FS ONLY</b>: Set the user, quota, and
+partition directories to update synchronously. Failure to do this may
+lead to data corruption and/or loss of mail after a system
+crash. Unfortunately, doing so may result in a serious performance
+hit. If you are using a newer filesystem than ext2fs on Linux, this
+step should not be necessary. (Running ext3 in any mode is safe.)
+
+<pre>
+<kbd> cd /var/imap
+ chattr +S user quota user/* quota/*
+ chattr +S /var/spool/imap /var/spool/imap/*
+</kbd></pre>
+
+Also set the queue directory of the mail daemon to update
+synchronously. The following example is for sendmail:
+
+<pre>
+<kbd> chattr +S /var/spool/mqueue
+</kbd></pre>
+
+<p><li>To enable STARTTLS support, see <a href="#openssl">how to
+configure OpenSSL</a> below.
+
+<p><li>Add the following lines to the "<tt>/etc/services</tt>" file if they
+aren't already there.
+
+<pre>
+ pop3 110/tcp
+ nntp 119/tcp
+ imap 143/tcp
+ imsp 406/tcp
+ nntps 563/tcp
+ acap 674/tcp
+ imaps 993/tcp
+ pop3s 995/tcp
+ kpop 1109/tcp
+ sieve 2000/tcp
+ lmtp 2003/tcp
+ fud 4201/udp
+</pre>
+
+<p><li><b>Remove "<tt>/etc/[x]inetd.conf</tt>" entries.</b> Any
+<tt>imap</tt>, <tt>imaps</tt>, <tt>pop3</tt>, <tt>pop3s</tt>,
+<tt>kpop</tt>, <tt>lmtp</tt> and <tt>sieve</tt> lines need to be
+removed from <tt>/etc/[x]inetd.conf</tt> and [x]inetd needs to be
+restarted.
+</ol>
+
+<a name="master"><h3>Configuring the Master Process</h3></a>
+
+<ol>
+<li> Choose a configuration from the <tt>master/conf</tt> directory:
+
+ <dl compact>
+ <dt><tt>small.conf</tt><dd>bare-bones server supporting IMAP and POP
+ <dt><tt>normal.conf</tt><dd>server supporting IMAP, POP, the SSL
+ wrapped versions, and the Sieve script management protocol
+ <dt><tt>prefork.conf</tt><dd>The same configuration as above, but
+ with some preforked processes for faster processing.
+ <dt><tt>backend-cmu.conf</tt><dd>Our configuration (for Murder Backend /
+ typical IMAP servers)
+ <dt><tt>frontend-cmu.conf</tt><dd>Our configuration (for Murder Frontend servers)
+ </dl>
+
+<p>To use <tt>normal.conf</tt>, do:
+<pre>
+<kbd> cp master/conf/normal.conf /etc/cyrus.conf
+</kbd></pre>
+
+<p>Optionally, you can edit <tt>/etc/cyrus.conf</tt> to disable or
+enabling certain services, or to tune the number of preforked copies.
+Be sure not to remove the entries that are labeled required.
+
+<p><li>Arrange to start "<tt>/usr/cyrus/bin/master</tt>" as root when
+the system starts. It will bind some ports and then give up it's root
+privileges. Until your system reboots, you can start the master
+process by hand:
+
+<pre>
+<kbd> /usr/cyrus/bin/master &
+</kbd></pre>
+
+<p><li>Monitor the progress of the master process by examining the
+<tt>imapd.log</tt> file. It should never exit by itself, but you can
+shut down the mail system by sending it a signal with <tt>kill</tt>.
+</ol>
+
+<a name="mta"><h3>Configuring the Mail Transfer Agent</h3></a>
+
+<p>In order to deliver mail to the Cyrus system, you'll have to
+configure your MTA (Sendmail, Postfix, Exim, etc) to use LMTP.
+
+<h4>Configuring <a href="http://www.sendmail.org/">Sendmail</a></h4>
+
+Generate a sendmail configuration file which delivers local mail
+to the IMAP server. See the file <TT>cf/README</TT> in the Sendmail
+distribution for information on how to create a complete configuration
+file. This file also lists variables that can be used to customize
+the mailer definitions mentioned below.
+
+<p>The following configurations assume that you are using the
+<tt>lmtpunix</tt> service from one of the sample <tt>cyrus.conf</tt>
+files discussed above.
+
+<ul>
+<li> For Sendmail 8.12.4 and higher, use the <tt>cyrusv2</tt> mailer
+definition in the Sendmail distribution:
+
+<pre>
+define(`confLOCAL_MAILER', `cyrusv2')
+MAILER(`cyrusv2')
+</pre>
+
+If you wish to change the name of the UNIX socket or switch to TCP,
+define <tt>CYRUSV2_MAILER_ARGS</tt> appropriately as described in
+<TT>cf/README</TT>.</li>
+
+<p><li> For Sendmail 8.10 - 8.12.3, use the <a
+href="cyrusv2.mc">cyrusv2.mc</a> file as a template to create a
+Sendmail configuration file.</li>
+
+<p><li> For Sendmail 8.9.x and earlier, use the <tt>cyrus</tt> mailer
+definition in the Sendmail distribution:
+
+<pre>
+define(`confLOCAL_MAILER', `cyrus')
+MAILER(`cyrus')
+</pre>
+
+Edit <TT>/etc/group</TT> and
+add user "<TT>daemon</TT>" to the "<TT>mail</TT>" group. This will
+permit sendmail to run the "<TT>deliver</TT>" (LMTP client) program to
+deliver mail to the IMAP server.</li>
+</ul>
+
+<p>Cyrus also includes a socket map daemon <tt>smmapd</tt> which can
+be used by Sendmail 8.13 and higher (a patch for 8.12 is available) to
+verify at RCPT TO time that a message can be delivered to the
+particular mailbox. To use this daemon, add <tt>smmapd</tt> as a
+service in <tt>cyrus.conf</tt> and configure Sendmail accordingly.
+
+<h4>Configuring <a href="http://www.postfix.org/">Postfix</a></h4>
+
+The Postfix source distribution comes with the
+file "<tt>README_FILES/LMTP_README</tt>". Even if you are using a
+binary distribution of Postfix, it would be well worth your while
+to download the full Postfix source. Not only will you get the
+above file, but numerous other "readme" files and sample
+configuration files.
+
+<p>One thing you need to watch out for is the UID and GID of
+the Postfix software. As it states in the Postfix "<tt>INSTALL</tt>"
+document, you must create a new account that does not share its UID
+and GID with any other user account. This is for security reasons.
+If you installed Postfix with a GID of "<tt>mail</tt>", you will need
+to select a different GID for Cyrus. See the Cyrus configure options
+"<tt>--with-cyrus-user</tt>" and "<tt>--with-cyrus-group</tt>". (This
+was more crucial when the use of Cyrus' "<tt>deliver</tt>" was more
+prevalent, but it is still a good idea to follow this policy.)
+
+<p>Another thing to note is the location of your "<tt>sendmail</tt>"
+command. On some platforms this will be "<tt>/usr/sbin/sendmail</tt>",
+on others, "<tt>/usr/lib/sendmail</tt>". Cyrus will need to know where
+this command is. See <a href="install-sieve.html">Installing Sieve</a>
+for more details.
+
+<p>Assuming that you are using the <tt>lmtpunix</tt> service from one
+of the sample <tt>cyrus.conf</tt> files discussed above, the Postfix
+configuration file "<tt>/etc/postfix/main.cf</tt>" should have the
+following line:
+
+<pre>
+ mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
+</pre>
+
+<p>Naturally, both the Postfix UID and the Cyrus UID need to be
+able to access the specified socket file.
+
+<p>Starting with Postfix snapshot-20010222, you can improve the
+efficiency of LMTP delivery via the "<tt>mailbox_transport</tt>" by
+putting the following entries in "<tt>/etc/postfix/main.cf</tt>":
+
+<pre>
+ local_destination_recipient_limit = 300
+ local_destination_concurrency_limit = 5
+</pre>
+
+<p>Of course you should adjust these settings as appropriate for
+the capacity of the hardware you are using. The recipient limit
+setting can be used to take advantage of the single instance
+message store capability of Cyrus. The concurrency limit can be
+used to control how many simultaneous LMTP sessions will be
+permitted to the Cyrus message store.
+
+<p>Additional examples are included in the Postfix
+file "<tt>README_FILES/LMTP_README</tt>".
+
+<h4>Configuring <a href="http://www.exim.org/">Exim 4</a></h4>
+
+Generate an Exim configuration file which delivers local mail to the
+IMAP server. See the Exim documentation for information on how to
+create a complete configuration file.
+
+<p>Cyrus is designed to be used as a black-box server -- there
+are usually no local user accounts. As a result, you must define the
+following "router":
+
+<ul>
+<pre>
+localuser:
+ driver = accept
+ transport = local_delivery
+</pre>
+</ul>
+
+<p>The following "transports" assume that you are using either the
+<tt>lmtpunix</tt> or <tt>lmtp</tt> service from one of the sample
+<tt>cyrus.conf</tt> files discussed above.
+
+<ul>
+<p><li> Using <tt>lmtpunix</tt> (UNIX socket):
+
+<pre>
+local_delivery:
+ driver = lmtp
+ command = "/usr/cyrus/bin/deliver -l"
+ batch_max = 20
+ user = cyrus
+</pre>
+</li>
+
+<p><li> Using <tt>lmtp</tt> (TCP socket -- Exim and Cyrus on same host):
+
+<pre>
+local_delivery:
+ driver = smtp
+ protocol = lmtp
+ hosts = localhost
+ allow_localhost
+</pre>
+</li>
+</ul>
+
+<p>For more advanced configurations (such as address verification, etc),
+consult the Exim documentation and sample configurations.
+
+<h3>Exporting Netnews via IMAP</h3>
+
+If you wish to use export Netnews via IMAP, consult <a
+href=install-netnews.html>install-netnews.html</a>.
+
+<a name="openssl"><h2>SSL, TLS, and OpenSSL</h2></a>
+
+<p>Transport Layer Security (TLS), is a standardized version of the Secure
+Sockets Layer (SSL v3) standard. IMAP can make use of two different
+versions of TLS/SSL: STARTTLS and an SSL wrapped session.</p>
+
+<p>In STARTTLS, a client connects to the IMAP port as normal and then
+issues the STARTTLS command, which begins a TLS negotiation. This is
+currently supported by the Cyrus IMAP server when it is compiled with
+OpenSSL.</p>
+
+<p>The alternative, a SSL wrapped connection, involves the client
+connected to a seperate port ("<tt>imaps</tt>") and negotiating a SSL
+session before starting the IMAP protocol. Again, this is supported
+natively by the Cyrus IMAP server when it is compiled with
+OpenSSL.</p>
+
+<p>Both TLS and SSL require a server key and a certificate.
+Optionally, in addition to establishing a secure connection, TLS can
+authenticate the client.</p>
+
+<h3>Configuring Cyrus with OpenSSL</h3>
+
+<ol>
+<li><p>OpenSSL requires the certificate and key in PEM format. You can
+create the server's private key and certificate yourself using
+OpenSSL. Here, we create a self-signed key for the machine
+"<tt> foobar.andrew.cmu.edu</tt>" and put both the certificate and key
+in the file "<tt>/var/imap/server.pem</tt>".</p>
+
+<p>Please do not blindly enter in the information to OpenSSL
+below. Instead, enter the appropriate information for your
+organization (i.e. NOT Carnegie Mellon University for the Organization
+name, etc.).</p>
+
+<pre>
+<kbd>openssl req -new -x509 -nodes -out /var/imap/server.pem -keyout /var/imap/server.pem -days 365</kbd>
+Using configuration from /usr/local/lib/openssl/openssl.cnf
+Generating a 1024 bit RSA private key
+.............+++++
+......................+++++
+writing new private key to '/var/imap/server.pem'
+-----
+You are about to be asked to enter information that will be incorporated
+into your certificate request.
+What you are about to enter is what is called a Distinguished Name or a DN.
+There are quite a few fields but you can leave some blank
+For some fields there will be a default value,
+If you enter '.', the field will be left blank.
+-----
+Country Name (2 letter code) [AU]:<kbd>US</kbd>
+State or Province Name (full name) [Some-State]:<kbd>Pennsylvania</kbd>
+Locality Name (eg, city) []:<kbd>Pittsburgh</kbd>
+Organization Name (eg, company) [Internet Widgits Pty Ltd]:<kbd>Carnegie Mellon University</kbd>
+Organizational Unit Name (eg, section) []:<kbd>Andrew Systems Group</kbd>
+Common Name (eg, YOUR name) []:<kbd>foobar.andrew.cmu.edu</kbd>
+Email Address []:
+</pre></li>
+
+<li>Make sure to make key file(s) readable by the Cyrus user. For
+example: <kbd>chown cyrus /var/imap/server.pem</kbd>
+
+<li>Add the following to <tt>/etc/imapd.conf</tt> to tell the server
+where to find the certificate and key file (used for ALL services):
+
+<pre>tls_cert_file: /var/imap/server.pem
+tls_key_file: /var/imap/server.pem
+</pre>
+
+Optionally, you can use separate certificates and key files for each
+service:
+
+<pre>[servicename]_tls_cert_file: /var/imap/imap-server.pem
+[servicename]_tls_key_file: /var/imap/imap-server.pem
+</pre>
+
+"servicename" here refers to the name of the service as specified
+in cyrus.conf. It is <i>not</i> necessaraly the name of the binary.
+
+<p>This is useful if you want to use different hostnames for each service
+(e.g. via virtual host interfaces or DNS CNAMEs). In the absence of
+any of the service specific options, the value of the global option is
+used. A value of <b>disabled</b> for the certificate or key file for
+a particular service will disable SSL/TLS for that service.
+
+<p>If you have a Certificate Authority (CA), you may wish to generate
+a certificate request and send it to be signed by your CA.
+
+<p>By default, Cyrus will cache SSL/TLS sessions for reuse for up to
+24 hours. By adjusting the value of the <tt>tls_session_timeout</tt> option in
+<tt>imapd.conf</tt>, the session caching can be disabled (0) or the
+expiration period shortened.
+<p>
+</li>
+
+<li>You can test STARTTLS by using <tt>imtest</tt>:
+<pre><kbd>imtest -t "" foobar.andrew.cmu.edu
+</kbd></pre>
+
+</ol>
+
+<h3>Client-side certificates</h3>
+
+<p>Client certificates are somewhat harder to configure than server
+certificates. You'll need a CA (certificate authority) and need to
+generate client certificates signed by that CA. STARTTLS in Sendmail
+and other MTAs have similiar problems, so <a
+href="http://www.sendmail.org/~ca/email/starttls.html">Claus Assman's
+page</a> is a good reference.</p>
+
+<p>You can use the self-signed certificate generated above as a CA for
+client certificates. To do this, try the following:</p>
+
+
+
+<p><b>TODO:</b> write me!</p>
+
+<p>Unfortunately, there's no standard on how to convert the client's
+authenticate DN (distinguished name) to a SASL authentication
+name.</p>
+
+<a name="altnamespace"><h2>Alternate Namespace and UNIX Hierarchy
+Convention</h2></a>
+
+If you wish to use the alternate namespace and/or the UNIX hierarchy
+convention, consult <a
+href=altnamespace.html#altnameconfig>altnamespace.html</a>.
+
+<P><HR>
+last modified: $Date: 2004/02/12 05:32:32 $
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-murder.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-murder.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-murder.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-murder.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,355 @@
+<!-- $Id: install-murder.html,v 1.19.2.1 2003/11/05 00:54:03 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Installing The Cyrus Murder
+</title>
+</head>
+<h1>Installing The Cyrus Murder
+</h1>
+<body>
+
+<b><i>Note that Cyrus Murder is still relatively young in the grand scheme of
+things, and if you choose to deploy you are doing so at your own risk.
+Many of the failure modes can be difficult to track without a detailed
+understanding of the mupdate protocol and IMAP in general, and thus even
+considering a deployment is not for the faint at heart.<p>
+Sites which think they need the Murder functionality but do not need
+a uniform namespace (no shared mailboxes) should consider other IMAP
+proxy solutions.<p>
+At the same time, we are using it successfully in production at Carnegie
+Mellon.
+</i></b><br>
+
+<h3>Introduction & Assumptions</h3>
+This document is intended to be a guide to the configuration of a Cyrus
+IMAP Aggregator, aka Cyrus Murder. It is recommended that you review
+<A HREF=http://asg.web.cmu.edu/cyrus/ag.html>this document</A> to be familliar
+with the concepts at work. This document is a work in progress and is at this
+point incomplete.<p>
+This document assumes that you have successfully been able to setup atleast
+one Cyrus IMAP server. This server will become your first backend server.
+It also assumes that you are familliar with the administration and day
+to day operations of the Cyrus IMAP server and the SASL authentication library.
+If you feel uncomfortable with this, please refer to the rest of the
+documentation first.<p>
+There is a <A HREF=murder.png>diagram</A> that shows the interactions of
+the various components of the Cyrus Murder which may be helpful in
+understanding the "big picture".<p>
+
+<h2>Installation</h2>
+You will need to build Cyrus IMAPd with the <tt>--enable-murder</tt> configure
+option. This builds the proxyds and the associated utilities.
+
+<h3>Requirements</h3>
+<ul>
+<li>Atleast one Cyrus IMAP server. If there are more than one, their name
+spaces must not conflict. That is, all the mailbox names must be unique
+(or in different namespaces)</li>
+<li>Atleast one machine that will become the first Frontend Server.</li>
+<li>One machine to become the MUPDATE master server. This can be the
+same as one of your frontend servers.</li>
+</ul>
+
+<h3>Configuring the MUPDATE Master</h3>
+
+The mupdate master server needs to be running the mupdate service in master
+mode. Note that you can have the MUPDATE master be one of your frontend
+machines, just do not configure a slave mupdate process on this machine.<P>
+
+To configure an mupdate master, you will want a cyrus.conf that includes a
+line similar to the following in the SERVICES section:<p>
+
+<pre>
+ mupdate cmd="/usr/cyrus/bin/mupdate -m" listen=3905 prefork=1
+</pre>
+
+Note the "-m" option to tell mupdate that it should start in master mode.<p>
+
+You will also need to configure atleast a skeleton imapd.conf that defines
+the <tt>configdirectory</tt>, a bogus <tt>partition-default</tt> and the
+<tt>admins</tt> that can authenticate to the server. Note that slave
+mupdate servers as well as the backend servers will need to be able to
+authenticate as admins on the master. Here is a very simple imapd.conf for
+a master server:<p>
+
+<pre>
+configdirectory: /imap/conf
+partition-default: /tmp
+
+admins: mupdateslave1 backend1
+</pre>
+
+You will also need to configure SASL to properly allow authentication in
+your enviornment.<p>
+
+<h3>Setting up the backends to push changes to the MUPDATE Master</h3>
+On the backends, configuration to be a part of a murder is easy. You just
+need to configure the backend to be a part of the murder. To do this,
+set the <tt>mupdate_server</tt> option in imapd.conf. Depending on what
+authentication mechanisms you are using, you may also want to set some
+or all of the following:
+
+<ul>
+<li><tt>mupdate_username</tt></li>
+<li><tt>mupdate_authname</tt></li>
+<li><tt>mupdate_realm</tt></li>
+<li><tt>mupdate_password</tt></li>
+</ul>
+
+Once these settings are successfully made, any mailbox operation on the
+backend will be sent to the mupdate master for confirmation and entry into
+the mupdate database.<p>
+
+You will also want to configure atleast one user/group using the
+<tt>proxyservers</tt> imapd.conf option. This user <i>should not</i>
+be an administrator, since this means that anyone who can get ahold
+of your proxy servers now has full administrative control on your
+backend. Example:<p>
+
+<pre>
+admins: cyrus
+proxyservers: murder
+</pre>
+
+Keep in mind that you will need to create the proxy user(s) and be sure
+that they can authenticate to the backend as well.
+
+<h3>Importing the database from the backend</h3>
+Importing the current mailboxes database is easy, as there is a ctl_mboxlist
+option to do so. To do the first synchronization, simply change to the
+cyrus user, and issue a <tt>ctl_mboxlist -m</tt>.<p>
+
+<p>Note that you may wish to issue a <tt>ctl_mboxlist -mw</tt> first to
+be sure you understand all the operations that this command will perform,
+since it does require that all mailboxes are unique in the murder namespace.</p>
+
+If everything is configured properly, the
+mailbox database of the current host will dump to the mupdate master. If
+there are problems, the most likely cause is a misconfiguration of the
+authentication settings, or that mupdate might not be running on the master.
+Using <tt>mupdatetest</tt> may be helpful in this case (it establishes
+an authenticated connection to the mupdate server, if it can).<p>
+
+It is also useful to have the backends automatically resync the state of
+their local mailboxes database with the master on start up. You can
+configure this by adding the following to the <tt>START</tt> section
+of cyrus.conf on the backends:<p>
+
+<pre>
+ mupdatepush cmd="ctl_mboxlist -m"
+</pre>
+
+This will perform synchronization with the mupdate master each time the backend
+restarts, bringing the mupdate database up to date with the contents of the
+backend (and performing ACTIVATE and DELETES as needed to do so).<p>
+
+<b>Warning</b>: If somehow a mailbox exists on two (or more) backend servers,
+each time one of them synchronizes its database that backend server will
+become authoritative. Though this should not happen during normal operation
+of the murder (because of the consistancy guarantees of the MUPDATE protocol,
+and the fact that mailbox operations are denied if the mupdate master is down),
+it <b>is</b> possible when first creating the mupdate database or
+when bringing a new backend server into the murder.
+
+<h3>Configuring the frontends</h3>
+
+Configuring the frontends is a two step process. First, you want to set
+<tt>mupdate_server</tt> (and friends) as you did for the backends above.
+However, because the frontends only talk to the mupdate master via a slave
+running on the local machine, you will also need to set up a slave on the
+same machine, in the <tt>SERVICES</tt> section of cyrus.conf, like so:<p>
+
+<pre>
+ # mupdate database service - must prefork atleast 1
+ mupdate cmd="mupdate" listen=3905 prefork=1
+</pre>
+
+Note that as this is a threaded service, you must prefork atleast 1 of them
+so that the database can be synchronized at startup. Otherwise, the service
+will not start running until after you recieve an mupdate client connection
+to the slave (which is not a recommended configuration at this point).<p>
+
+You will also want to change all of your <tt>imapd</tt> entries to be
+<tt>proxyd</tt>, and all of your <tt>lmtpd</tt> entries to be
+<tt>lmtpproxyd</tt>. That is, you will probably have a <tt>SERVICES</tt>
+section that looks more like this now:<p>
+
+<pre>
+ mupdate cmd="/usr/cyrus/bin/mupdate" listen=3905 prefork=1
+
+ imap cmd="proxyd" listen="imap" prefork=5
+ imaps cmd="proxyd -s" listen="imaps" prefork=1
+ pop3 cmd="pop3d" listen="pop3" prefork=0
+ pop3s cmd="pop3d -s" listen="pop3s" prefork=0
+ kpop cmd="pop3d -k" listen="kpop" prefork=0
+ nntp cmd="nntpd" listen="nntp" prefork=0
+ nntps cmd="nntpd -s" listen="nntps" prefork=0
+ sieve cmd="timsieved" listen="sieve" prefork=0
+ lmtp cmd="lmtpproxyd" listen="/var/imap/socket/lmtp" prefork=0
+</pre>
+
+Note that timsieved does not need a proxy daemon, the managesieve protocol
+deals with the murder with referrals to the backends internally.<p>
+
+Additionally, you will need entries in imapd.conf to indicate the proxy
+auth name and passwords (if you are using a SASL mechanism that requires them)
+to the backends, for example, if your backends are
+<tt>mail1.andrew.cmu.edu</tt> and <tt>mail2.andrew.cmu.edu</tt> with passwords
+of <tt>foo</tt> and <tt>bar</tt>, and an auth name of <tt>murder</tt>:<p>
+
+<pre>
+mail1_password: foo
+mail2_password: bar
+proxy_authname: murder
+</pre>
+
+If your SASL mechanism does not require authnames or passwords (e.g.
+KERBEROS_V4), then this is not required. Note that we used the same
+authname as the configured in the <tt>proxyservers</tt> line in the backend's
+<tt>imapd.conf</tt> above.<p>
+
+When you start master on the frontend, a local mailboxes database should
+automatically synchronize itself with the contents of the mupdate master,
+and you should be ready to go. Your clients should connect to the frontends,
+and the frontends will proxy or refer as applicable to the blackend servers.<p>
+
+<h3>Additional backend configuration</h3>
+
+If your authentication system requires usernames, passwords, etc, to
+authenticate (e.g. it isn't Kerberos), then you will also need to
+specify proxy_authname (and friends) in the backend imapd.confs as well.
+This is so that the backends can authenticate to eachother to facilitate
+maibox moves. (Backend machines will need to be full admins).
+
+<h3>Delivering mail</h3>
+
+To deliver mail to your Murder, configure your MTA just as you did
+before, but instead of connecting directly to <tt>lmtpd</tt>, it
+should connect to <tt>lmtpproxyd</tt>. You can connect to the
+<tt>lmtpproxyd</tt> running on the frontend machines, or you can
+install <tt>master</tt> and <tt>lmtpproxyd</tt> on your SMTP servers.
+
+<h2>Administration</h2>
+
+<h3>Keeping the database synced</h3>
+<p>Consistancy in the database is maintained by pushing the current status
+of the backends to the master, and having the frontends stay up to date with
+the master's database. Since the frontends resync themselves entirely
+when they startup, downtime should not at all be a problem. (While they
+are up they should be continously recieving database updates, as well as
+when they lose connection to the master, they will try to reconnect and
+resync their database upon reconnection)</p>
+<p>Provided that the namespace of the backend servers is kept discrete
+(with no mailboxes existing on the same server), it is not a big deal
+to resync the mupdate master using <tt>ctl_mboxlist -m</tt>. If two servers
+do have the same mailbox, this will need to be resolved before database
+consistancy can be guranteed.</p>
+<h3>Moving Mailboxes between backends</h3>
+<p>There is currently no 100% foolproof way to do this, however, if you issue
+a rename command to a frontend (as you would to move a mailbox between partitions),
+and replace the partition name with the name of the new backend, it will move
+the mailbox to the indicated backend. You can also use the format
+<tt>backend.domain.com!partition</tt> to move to a specific partition
+(otherwise the default partition will be used). In cyradm, this looks
+like:<p>
+
+<pre>
+cyrus.andrew.cmu.edu> rename user.bcyrus user.bcyrus mail2.andrew.cmu.edu!u2
+</pre>
+
+Note that since seen state is stored per-user, it is possible that when
+moving a shared mailbox users will have strange effects. The general rule
+is that moving an INBOX will move the entire user (including all sub-mailboxes
+to the INBOX, and seen state, and subscriptions, and sieve scripts, etc).
+The seen state is merged with the seen state on the new backend, so that
+no data is lost (seen state is also the only part left behind on the source
+backend). In the case of any other mailbox, however, only that individual
+mailbox is moved. If it is a quota root, the new quota root is instated
+on the new server, but otherwise quotas can appear to be violated,
+since each backend only takes care of its own quota.<p>
+
+In general, its better to leave trees of mailboxes on the same server, and
+not move submailboxes of inboxes between servers.
+</p>
+<h3>Adding additional backend servers</h3>
+<p>This is very easy to do, simply configure an empty backend server
+and set its <tt>mupdate_server</tt> parameter to point at the mupdate
+master. Then, issue mailbox creates to it as you would any other
+backend server.</p>
+<h3>Backups</h3>
+<p>xxx, need to write stuff. You don't need to really backup the data on
+the mupdate master or slaves, since this data can all be generated directly
+from the backends quite easily.</p>
+
+<h3>Gotchyas</h3>
+<ul>
+<li><b>Clients dealing with a pool of frontend servers</b> - Some clients may
+not be terribly efficient caching connections to a pool of imap servers, this
+isn't a problem, per se, but it may mean that you will see many more
+authentications than you are used to.
+<ul><li><b>Kerberos issues</b> - If you are using kerberos authentication,
+you will want to ensure that all your machines are keyed properly, as we
+have seen problems with different clients trying to authenticate to
+different services (e.g. imap.imap-pool instead of imap.pool-frontend-1), so
+test the clients in use in your enviornment and be sure that they work with
+whatever keying scheme you use.</li></ul>
+<li><b>Clients dealing with referrals</b> - Some clients (we've had particuar
+trouble with pine, though most of these issues have now been resolved and
+new versions should be OK (that is, pine > 4.44), but as referrals have not
+been extensively used by any IMAP server until now, referrals are very likely
+to not work correctly or have surprising effects.
+<li><b>Clients dealing with getting a NO on LSUB commands</b> - Some clients
+(Outlook, for example) may behave poorly if an LSUB command returns a NO, which
+may be the case if the backend server with the user's inbox is down. We
+have, for example, seen this result in the deletion of the disconnected
+message cache.
+<li><b>Behavior of cyradm / some mailbox operations</b> - The behavior
+of some administrative commands
+might be slightly unexpected. For example, you can only issue a SETQUOTA
+to a frontend server if the entire mailbox tree underneath where you are
+setting the quota exists on the same backend server, otherwise you will need
+to connect directly to the backend servers to perform the needed changes.
+Similarally, mailboxes will be created on the same backend server
+that their parent is in. In order to create them on a different server
+(or to create a new top level mailbox) you will need to connect directly to
+the desired backend server.
+<li><b>Subscriptions</b> - If users want subscribe to a mailbox other than on
+their backend home server, they won't be able to, unless you set
+"<tt>allowallsubscribe: t</tt>" in the backend imapd.confs. This essentially
+lets any string be subscribed to successfully.
+<li><b>Restarting the mupdate master</b> - Because <tt>ctl_cyrusdb -r</tt>
+clears reservations on mailbox, if you restart the mupdate master (and
+run recovery), then this could (we suspect, very rarely) lead to inconsistancies
+in the mupdate database.
+</ul>
+
+<h3>Troubleshooting & when things go wrong</h3>
+<ul>
+<li><b>Mailbox operations are being denied</b> - This is an indication
+that the mupdate master may be down. Restart it.</li>
+<li><b>Mailbox operations are not being seen by one or more frontends</b> -
+This indicates that the mupdate process on a slave may have died,
+you may need to restart master. Alternatively, mupdate will retry connections
+every 20 seconds or so for about 20 attempts if the master does go down.</li>
+<li><b>A frontend's mailboxes.db is corrupt / out of sync</b> - Restart master
+on the frontend, and have the mupdate process resynch the local database.
+You may need to remove the local mailboxes database if the corruption is
+extreme.</li>
+<li><b>A mailbox's location keeps switching between two (or more) backend
+hosts.</b> - It probably actually exists on both hosts. Delete the
+mailbox from all but one of the hosts, and run a ctl_mboxlist -m on the one
+where you want it to actually live.</li>
+<li><b>Databases are never created on the frontends/slaves</b> - Check
+to ensure that the mupdate slave process is started, (is prefork=1)</li>
+</ul>
+
+<p><h3>References</h3><ul>
+<li><A HREF=http://asg.web.cmu.edu/cyrus/ag.html>Aggregator Overview</A></li>
+<li><A HREF=http://asg.web.cmu.edu/cyrus/mupdate.html>MUPDATE Protocol Reference</A></li>
+</ul>
+
+<P><HR>
+last modified: $Date: 2003/11/05 00:54:03 $
+</BODY></HTML>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-netnews.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-netnews.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-netnews.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-netnews.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,205 @@
+<!-- $Id: install-netnews.html,v 1.2.2.3 2004/02/06 18:48:12 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Cyrus and Netnews
+</title>
+</head>
+<h1>Cyrus and Netnews
+</h1>
+<body>
+
+<b><i>Note that the NNTP support in Cyrus is still relatively young in
+the grand scheme of things, and has not been tested under a heavy
+Usenet load. That being said, the code appears to be stable and is
+currently running in production serving 50-60 newsgroups with a volume
+of about 6000 messages per day.</i></b>
+
+<h2>Introduction</h2>
+Cyrus has the ability to export Usenet via IMAP and/or export shared
+IMAP mailboxes via NNTP. This is made possible by a new NNTP daemon
+which is included with Cyrus.
+
+<p>This document assumes that you have successfully been able to setup
+your Cyrus IMAP server. If you have not already done so, please refer
+to the rest of the documentation. This document also assumes that you
+are familiar with Usenet and shared IMAP mailboxes.
+
+<p>There is a <a href=netnews.png>diagram</a> that shows the interactions of
+the various components of the NNTP support in Cyrus which may be
+helpful in understanding the "big picture".<p>
+
+<h2>Installation</h2>
+You will need to build Cyrus IMAPd with the <tt>--enable-nntp</tt> configure
+option. This builds nntpd and the associated utilities.
+
+<h3>Requirements</h3>
+Obviously you must have a newsfeed or news reader access from your ISP
+or Usenet provider.
+
+<h2>Configuration</h2>
+The first thing that must be done is to decide where your newsgroup
+mailboxes will reside, either at the toplevel of your hierarchy (eg,
+<tt>comp.mail.imap</tt>) or rooted elsewhere (eg,
+<tt>netnews.comp.mail.imap</tt>). If your newsgroup mailboxes are not
+at the toplevel of your hierarchy, then you must specify the parent
+with the <tt>newsprefix</tt> in <tt>imapd.conf</tt>. Using the
+example above, <tt>newsprefix</tt> would be set to <tt>netnews</tt>.
+
+<p>You must create a mailbox for each newsgroup that you would like to
+receive/export before the newsgroups can be used. If some groups are
+private, be sure to set the ACLs accordingly. The
+<tt>tools/mknewsgroups</tt> script can be used to help facilitate mass
+creation of newsgroup mailboxes. When using this script, be sure to
+add posting rights for 'anyone' (eg. <tt>mknewsgroups -a 'anyone +p'
+...</tt>) so that articles can be fed/posted.
+
+<h3>Receiving articles</h3>
+In order to receive usenet articles, you must make sure that the Cyrus
+<tt>nntpd</tt> service is enabled in <tt>cyrus.conf</tt>. The
+<tt>master/conf/normal.conf</tt> and <tt>master/conf/prefork.conf</tt>
+sample configs both include entries for <tt>nntpd</tt> (disabled by
+default).
+
+<h4>Push (traditional) feeds</h4>
+If your usenet peer will be pushing articles to you, no further
+configuration is necessary, beyond letting your peer access your Cyrus
+server on port 119 (nntp).
+
+<h4>Pull (suck) feeds</h4>
+If you prefer to pull articles from your peer (and your provider
+allows it), then you can use the <tt>fetchnews</tt> utility which will
+retrieve articles from your peer and feed them to your Cyrus server.
+If supported by your peer, <tt>fetchnews</tt> will use the NEWNEWS
+command, otherwise it will fallback to keeping track of the high water
+mark of each group.
+You will probably want to configure <tt>fetchnews</tt> as an EVENT in
+<tt>cyrus.conf</tt> to be called periodically (eg, once an hour, every
+15 minutes, etc).
+
+<p>As an alternative to <tt>fetchnews</tt>, you can also use the
+ <a href=http://home.comcast.net/~bobyetman/><tt>suck</tt></a> program
+ to pull articles from your peer.
+
+<h4>imapfeed</h4>
+Alternatively, if you already have an INN v2.3 server in-house you can
+use the included <tt>imapfeed</tt> utility (written by the authors of
+Cyrus) to feed articles to your Cyrus server via LMTP. Consult the
+INN documentation for further details.
+
+<h4>Control Messages</h4>
+Control messages are accepted, parsed and delivered to the
+corresponding <tt>control.*</tt> pseudo-group (eg,
+<tt>control.newgroup</tt>, <tt>control.cancel</tt>, etc) if it exists,
+so that they may be reviewed by an administrator.
+
+<p>Automatic execution of control messages is only performed if the
+<tt>newsmaster</tt> (default = "news") user has the proper
+access control for the given mailbox. For example, to allow cancel
+control messages to be performed for "misc.test" articles, give the
+"news" user the 'd' right on "misc.test". To allow newgroup,
+rmgroup and mvgroup control messages to be performed on the "misc"
+hierarchy, give the "news" user the 'c' right on "misc".
+
+<p><b>NOTE:</b> No sender or PGP verification of control messages is
+currently implemented.
+
+<h3>Reading/Posting articles</h3>
+In order to have articles posted by your local users propagate to the
+outside world, you must specify the name of your usenet peer(s) with the
+<tt>newspeer</tt> option in <tt>imapd.conf</tt>. This is the host(s)
+that <tt>nntpd</tt> contacts to feed outgoing articles. Depending on the
+configuration of the <tt>newspeer</tt> option, articles will be fed to the
+upstream server(s) using either the POST or IHAVE command. Also note
+that you may specify an optional wildmat to filter which groups will
+be fed (see <tt>imapd.conf(5)</tt> for details).
+
+<p>Newsgroups can also be gatewayed to email by setting
+<tt>/vendor/cmu/cyrus-imapd/news2mail</tt> mailbox annotations to the
+corresponding email addresses.
+
+<h4>News clients</h4>
+
+If anonymous logins are disabled (default) in <tt>imapd.conf</tt>,
+then your news clients will have to be configured to login with a
+username and password, otherwise they will not be allowed to post.
+Furthermore, if plaintext logins are disabled in <tt>imapd.conf</tt>,
+then you might have to configure your news clients to use SSL/TLS and
+enable the <tt>nntps</tt> service in <tt>cyrus.conf</tt>.
+
+<p>If you want to allow your news clients to use the NNTP NEWNEWS
+command, you will have to enable the <tt>allownewnews</tt> option in
+<tt>imapd.conf</tt>.
+
+<h4>Email clients</h4>
+If you are exporting Usenet via IMAP, and your users' messaging clients
+are not savvy enough to reply to and post articles via NNTP, then you will
+have to configure your server so your users can reply to and post
+articles via SMTP.
+
+<p>To help faciliate this, you can set the <tt>newspostuser</tt>
+option to a "pseudo" user which will be used to construct email delivery
+addresses for each incoming article. These addresses are inserted
+into a <tt>Reply-To:</tt> in the article. For example, if set to "post", an
+article posted to <tt>comp.mail.imap</tt> will have an address of
+"post+comp.mail.imap" inserted into the <tt>Reply-To:</tt> header. This
+will allow a user to easily reply to an article via email. Otherwise,
+the users will have to learn the correct email address format for
+posting and replying to articles.
+
+<p>In order for these email messages to be fed into your news server
+(and subsequently to the outside world) you need to use an email to
+news gateway, such as <a
+href=http://www.ossp.org/pkg/tool/lmtp2nntp/><tt>lmtp2nntp</tt></a>. You need
+to configure your MTA (Sendmail, Postfix, etc) so that
+<tt>lmtp2nntp</tt> is used as the local mailer whenever it receives a
+news article. A simple rule for doing this in Sendmail is shown
+below:
+
+<pre>
+# mail addressed to post+ goes to lmtp2nntp at localhost
+LOCAL_RULE_0
+Rpost + $+ < @ $=w . > $#lmtp2nntp $@ localhost $: $1
+</pre>
+
+<p>For other configurations, consult the <tt>lmtp2nntp</tt> and
+documentation and your MTA documentation.
+
+<p><b>NOTE:</b> If anonymous logins are disabled (default) in
+<tt>imapd.conf</tt>, then you should configure <tt>lmtp2nntp</tt> to
+use its "feed" operation mode.
+
+<h3>Expiring articles</h3>
+Expiration of articles is done by the <tt>cyr_expire</tt> utility.
+Control over when articles are expunged is accomplished with the
+<tt>/vendor/cmu/cyrus-imapd/expire</tt> mailbox annotation. This
+annotation sets the number of days that messages should be kept in the
+mailbox before they expire. All entries in the duplicate deliver
+database that correspond to these messages are also kept for the same
+number of days before they are purged (overriding the
+<tt>cyr_expire -E</tt> option).
+
+<p>Setting the expire time to 0 (zero) for a mailbox will ensure that
+neither the messages nor the corresponding database entries will ever
+be expired. This can be useful for shared mailboxes (e.g. mailing
+list archives) which are being exported via NNTP. <i>Note that this
+will cause the duplicate delivery database to consistently grow in
+proportion to the number of messages in such mailboxes.</i>
+
+<p>If a mailbox does not have an expire time set on it, then the
+messages will never be expunged, but the corresponding database
+entries WILL be expired after the default number of days
+(<tt>cyr_expire -E</tt> option).
+
+<p>Note that the <tt>/vendor/cmu/cyrus-imapd/expire</tt> mailbox
+annotation is inherited by child mailboxes, so that you may control
+expiration on an entire mailbox/newsgroup hierarchy simply by setting
+the annotation on the root of the hierarchy. For example, if you set
+the annotation on <tt>comp</tt>, then ALL of the newsgroups in the
+<tt>comp</tt> hierarchy will be expired at the same time. Similarly,
+if you set the annotation on <tt>alt.binaries</tt>, all of the binary
+newsgroups under <tt>alt</tt> will be expired at the same time
+(independently from <tt>comp</tt>).
+
+<P><HR>
+last modified: $Date: 2004/02/06 18:48:12 $
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-perf.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-perf.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-perf.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-perf.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,138 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- $Id: install-perf.html,v 1.10 2003/01/02 19:23:11 rjs3 Exp $ -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<title>Performance Notes</title>
+</head>
+<body>
+<h1>Performance Notes</h1>
+
+Performance issues for you to consider. If you never expect to have
+more than 100 simultaneous users, chances are any hardware you have
+will be fine. If you plan on having thousands or more users, please
+be sure to review this section.
+
+<p>If your configuration directory is not <tt>/var/imap</tt>,
+adjust accordingly.</p>
+
+<ul>
+<li><tt><b>/var/imap/proc</b></tt> - After a successful login, the
+imapd creates a file in <tt>/var/imap/proc</tt> that is its unix
+process id. It also contains the name of any <tt>SELECT</tt>'d
+mailbox. The file is deleted when the user logs out.
+
+<p>Given the potential load, this is a good candidate to move
+elsewhere. This can be done by symlink'ing the directory to another
+partition. We symlink it to a directory on a memory/viritual memory
+filesystem (specifically Solaris' tmpfs). If you use a tmpfs type
+filesystem, make sure that you have sufficient memory/swap to do
+this.</p>
+
+<p>Some people don't care about this information and just #ifdef
+out the code. We probably should add a <tt>configure</tt> option to
+do this.</p>
+</li>
+
+<li><tt><b>/var/imap/mailboxes.db</b></tt> - The mailboxes list is often
+the ultimate source of contention between imap processes, especially if
+clients are inefficient about their use of the LIST command. For this reason
+it is often better to use the skiplist backend which is optimized for
+enumeration of the database, as opposed to the default, Berkeley DB
+(use <tt>--with-mboxlist-db=skiplist</tt>).
+
+<p>Mika Iisakkila (<i>mika.iisakkila at pingrid.fi</i>) writes: Nevertheless,
+you can also tweak the Berkeley backend if you want to or have to stick
+with it. Cyrus doesn't do anything to increase the BDB cache size, and the
+default (256 kB) is way too small for any reasonably large site. With some
+50000 mailboxes and random operations, I found the hit rate for default
+BDB cache to be 70-80%. After growing the cache size to 2M, hit rate
+approached 99% and disk traffic was greatly reduced since most of the
+operations are reads anyway. Therefore processes could complete their work
+and release their locks much more quickly, and the dreaded "DBERROR: xxx
+lockers" messages stayed at a comfortable level. You can modify the source
+(<tt>/lib/cyrusdb_db3.c</tt>, the setting is commented out) or you can put
+a <tt>DB_CONFIG</tt> file under <tt>/var/imap/db</tt> with the appropriate
+setting. Read more about this in the Berkeley docs before trying it, typos
+and incorrect settings can cause havoc.</p>
+
+<li><tt><b>/var/imap/deliverdb</b></tt> - Unless you disable
+duplicate delivery suppression, each time a mail message is
+delivered it needs to lock the database and check to see if the
+message-id has been seen already. If you require really high
+throughput delivery, you may want to disable this feature.
+
+<p>We run with it enabled and it doesn't significantly impact our
+performance.</p>
+</li>
+
+<li><tt><b>/var/spool/mqueue</b></tt> - Sendmail can be pretty
+harsh on the spool partition. Having this on a separate disk is
+usually a good idea. Consider using LMTP and delivering from a
+separate machine.</li>
+
+<li>Unused SASL mechanisms - If you just build the SASL library and
+copied all the mechanisms into /usr/lib/sasl2, the <tt>imapd</tt>
+will try to use them and allocate some amount of memory. In
+general, the operating system will swap out those pages but you may
+be allocating more swap space than you need. So, look in
+/usr/lib/sasl2 and if you don't plan on using those mechanisms,
+don't leave them there.</li>
+
+<li>You may want to increase the listen queue value when starting
+up the master process. For example, you may want to do this if you
+see the Listen queue drop counter increasing quickly. For example,
+under Solaris, look at the variable tcpListenDrop (from <tt>netstat
+-sP tcp</tt>).</li>
+
+<li><b>Database recovery.</b> If restarting the server takes a long
+time due to the <tt>cyrusdb</tt> database recovery procedure (this is
+usually true if you have a large number of deliveries) you should look
+into shortening the interval between checkpoints, controlled by the
+<tt>cyrusdb</tt> event in <tt>/etc/cyrus.conf</tt>. We run
+checkpoints every 5 minutes; the current suggested install interval
+is 30 minutes.</li>
+
+<li>Some filesystems support the <tt>noatime</tt> mount option. The
+server does not use the atime information so you can go ahead and
+enable this feature.</li>
+
+<li>Depending on your syslog configuration and usage volume, Cyrus may
+generate thousands of syslog messages. On Linux, syslog
+performance can be greatly improved by disabling synchronous
+logging (disabling fsync() after each message). Prepending
+filenames in /etc/syslog.conf with a "-", e.g., "/var/log/maillog"
+becomes "-/var/log/maillog", disables syslog's fsync() call after
+each log message. If you log many messages those fsync()s will
+kill your I/O throughput. Note that if you do not need the detail provided
+by the LOG_DEBUG level, then not logging these messages can significantly
+reduces the amount of log entries that cyrus makes.</li>
+</ul>
+
+<p>In general, there's no magic bullet for performance. It depends
+on your hardware, your operating system, and how your users use the
+system. In general, an <tt>imapd</tt> process takes up anywhere
+from 256 Kbytes of memory to 512 Kbytes when it is first fired up.
+CPU has not been a big deal, but it may become more important as
+the imap sessions are encrypted and now that searching may be more
+frequent. Disk I/O is probably the most important and having a
+hardware RAID subsystem with an amount of write-back cache would be
+a good thing.</p>
+
+<p>Finally, if you are talking about less than 100 interactive
+users it is likely that any relatively modern hardware can support
+it. If you are talking about having more than 1000 interactive
+users, you should know how to predict your utilization, go
+overboard on hardware, be willing to suffer growing pains, or be
+able to hire someone that can help.</p>
+
+<p>There are a number of good performance tuning articles out for
+Solaris by Adrian Cockcroft. Go to your favorite search engine and
+look for his name.</p>
+
+<hr />
+last modified: $Date: 2003/01/02 19:23:11 $
+</body>
+</html>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-prereq.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-prereq.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-prereq.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-prereq.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,98 @@
+<!-- $Id: install-prereq.html,v 1.12 2003/10/22 18:50:04 rjs3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Prerequisites and other notes
+</title>
+</head>
+<h1>Prerequisites and other notes
+</h1>
+<body>
+
+<P>The following programs and/or packages are <b>required</b>.
+
+<ul>
+<LI> <b>libsasl</b>, version 2.1.7 or higher. To obtain libsasl, ftp
+it from <a
+href="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail"><TT>ftp.andrew.cmu.edu</TT></a>.
+Earlier versions of SASL will not work; please get the latest one.
+Configure SASL so that it supports whatever authentication method your
+site uses. Please pay careful attention to the SASL
+configuration. This is the biggest problem that most people have.
+
+<li> <b>Berkeley DB</b>, version 3.0.55 or higher. Berkeley DB can be
+obtained from <a href="http://www.sleepycat.com">Sleepycat</a>. It is
+strongly recommended that libsasl be compiled with Berkeley DB
+support, using the same version of Berkeley DB. (If you have a
+Berkeley DB version mismatch, somewhat perplexing crashes result.)
+
+<li> <b>GNU Make</b> is required. Get it from <a
+href="http://www.gnu.org/">the Free Software Foundation</a>. It is
+probably easier to find it via <a
+href="ftp://ftp.gnu.org/pub/gnu/make">ftp</a>.
+
+</ul>
+<p>
+
+The following programs and/or packages are required for specific
+features. If you don't have them, certain features of the IMAP server
+will be disabled.
+
+<ul>
+<LI> <b>makedepend</b>. A version is included in the
+<TT>makedepend</TT> subdirectory of the distribution. Try and install
+it before installing the Cyrus IMAPd. If it fails, the configure
+script will use a dummy shell script instead of makedepend, and you
+should be sure to always give the command "<TT>make clean</TT>" before
+"<TT>make all</TT>". If you don't mind builds taking longer, this
+isn't a big deal and you can ignore any makedepend errors.
+
+<LI> <b>Perl</b>, version 5. To obtain Perl, see <a
+href="http://www.cpan.org/">the comprehensive Perl archive</a>. This
+is required for <tt>cyradm</tt> (written by Brandon Allbery). It is
+also used for some installation scripts: you don't need it but it may
+make your life easier. We recommend at least version 5.00502.
+
+<li> <b>OpenSSL</b>, version 0.9.4 or higher. Required for STARTTLS
+support and for IMAP/POP3 wrapped in SSL (the imaps/pop3s ports).
+Available from <a
+href="http://www.openssl.org/">http://www.openssl.org/</a>.
+
+<li> <b>libwrap</b>, from Wietse Venema. This will allow one to
+control who is accessing what service, based on IP address. Available
+from <a
+href="ftp://ftp.porcupine.org/pub/security/">ftp://ftp.porcupine.org/pub/security/</a>
+in the <tt>tcp_wrappers</tt> package..
+
+<li> <b>Net-SNMP</b> (formerly UCD-SNMP), version 4.2 or higher.
+Required for SNMP monitoring of the IMAP server. Available from <a
+href="http://www.net-snmp.org/">http://www.net-snmp.org/</a>.
+
+<LI> If you use AFS PTS support for groups, Cyrus still depends on
+Kerberos and AFS. If you successfully compiled SASL with your
+Kerberos library, it's likely that it will work well with Cyrus.
+
+<LI> We recommend using an MTA (mail transfer agent) that supports
+LMTP (local mail transfer protocol). We use Sendmail and recommend
+version 8.12.8 or higher, available from <A
+HREF="http://www.sendmail.org">http://www.sendmail.org</a>. Others
+have reported success with
+<a href="http://www.postfix.org/">Postfix</a>.
+</ul>
+
+
+<P>The following programs and/or packages are recommended:
+
+<ul>
+<li><a href="ftp://ftp.gnu.org/non-gnu/flex">flex</a> - libsieve has
+two different lexical analyzers, and that's hard to do with
+traditional lex.
+
+<li><a href="ftp://ftp.gnu.org/gnu/gcc">gcc</a> - we build using gcc
+ and the compiler options <tt>-O2 -g</tt>.
+</ul>
+
+<P><HR>
+last modified: $Date: 2003/10/22 18:50:04 $
+</BODY></HTML>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-replication.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-replication.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-replication.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-replication.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,186 @@
+<!-- $Id: install-replication.html,v 1.1.2.4 2006/07/10 14:04:22 murch Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Cyrus replication
+</title>
+</head>
+<h1>Cyrus replication
+</h1>
+<body>
+
+<b><i>Note that Cyrus replication is still relatively young in the
+grand scheme of things, and if you choose to deploy you are doing so
+at your own risk. The core of the replication code has been used
+successfully in production at <a
+href="http://www-uxsup.csx.cam.ac.uk/~dpc22/cyrus/replication.html">Cambridge
+University</a> for about a year, but it has been rewritten extensively
+as part of the integration into the mainstream Cyrus codebase.
+</i></b><br><br>
+<b><i>Also note that the replication protocol currently does not have
+the facility to support the IMAP CONDSTORE extension (modification
+sequences). It is recommended that you do not try to use both
+CONDSTORE and replication at this time. The deficiencies in the
+replication protocol will be fixed in version 2.3.8.
+</i></b><br>
+
+<h3>Introduction & Assumptions</h3>
+<p>The Cyrus replication engine is designed to replicate the mailstore on
+standalone Cyrus servers or "backend" servers in a Cyrus Murder to
+provide a high-availability environment. It is <b>NOT</b> intended to
+replicate "frontend" servers or the "mupdate master" in a Cyrus
+Murder. <i>Note that load balancing is not possible with the current
+replication code, but it is intended to be supported in the
+future.</i></p>
+
+<p>This document assumes that you have successfully been able to setup
+atleast one Cyrus IMAP server. This server will become your first
+"master" server. It also assumes that you are familliar with the
+administration and day to day operations of the Cyrus IMAP server and
+the SASL authentication library. If you feel uncomfortable with this,
+please refer to the rest of the documentation first.</p>
+
+<h2>Installation</h2>
+You will need to build Cyrus IMAPd with the
+<tt>--enable-replication</tt> configure option. This builds the
+replication client/server applications and utilities.
+
+<h3>Requirements</h3>
+<ul>
+<li>Atleast one standalone or "backend" Cyrus IMAP server.</li>
+<li>Atleast one machine that will become the first "replica" server.</li>
+</ul>
+
+<h3>Configuring the "replica" server</h3>
+
+The "replica" server is a standalone server which listens for
+and processes synchronization messages from a "master" server. The
+"replica" server needs to be configured to accept these synchonization
+messages.<p>
+
+<ol>
+<p><li>Configure a standalone server as described in the rest
+of the documentation.
+
+<p><li>Add the following line to the "<tt>/etc/services</tt>" file.
+
+<pre>
+ csync 2005/tcp
+</pre>
+
+<p>Note that the port number is arbitrary as long as its not being
+used by any other services on your network.
+
+<p><li>
+Add a line similar to the following in the SERVICES section of cyrus.conf:<p>
+
+<pre>
+ syncserver cmd="/usr/cyrus/bin/sync_server" listen="csync"
+</pre>
+
+<p><li>Start/restart <tt>"/usr/cyrus/bin/master"</tt>.
+
+</ol>
+
+<h3>Configuring the "master" server</h3>
+
+The "master" server is the standalone or "backend" server which
+is actively serving mailboxes to clients. This server needs to be
+configured to synchronize its mailstore with a "replica" server.<p>
+
+<ol>
+<p><li>Add the following line to the "<tt>/etc/services</tt>" file.
+
+<pre>
+ csync 2005/tcp
+</pre>
+
+<p>Note that the port number MUST be the same as that used on the
+"replica" server.
+
+<p><li>
+Specify the hostname of the "replica" server and how to authenticate
+to it using the following imap.conf options:
+
+<ul>
+<li><tt>sync_host</tt></li>
+<li><tt>sync_authname</tt></li>
+<li><tt>sync_realm</tt></li>
+<li><tt>sync_password</tt></li>
+</ul>
+
+<p>Note that <tt>sync_authname</tt> MUST be an admin on the "replica"
+server. Also note that <tt>sync_realm</tt> and <tt>sync_password</tt>
+may not be necessary depending on the SASL mechanism used for
+authentication.
+
+</ol>
+
+<h4>Universally Unique Identifiers (UUIDs)</h4>
+
+An optional, but recommended step is to enable UUIDs for messages.
+Use of UUIDs improves efficiency by eliminating the synchronization
+of messages which the "replica" has already received from the
+"master". Note that UUIDs can be safely enabled and disabled at any
+time.
+
+<ol>
+<p><li>
+Define the <tt>sync_machineid</tt> option in imapd.conf. This option
+specifies the numeric identifier (1 - 255) of the "master" machine
+which is used in constructing the UUID for each message on the server.
+This identifier MUST be unique across all active "backend" servers in
+a Murder. Example:<p>
+
+<pre>
+sync_machineid: 1
+</pre>
+
+<p><li>For each IMAP, NNTP and LMTP service in cyrus.conf, enable the
+<tt>provide_uuid</tt> argument. Example:<p>
+
+<pre>
+imap cmd="imapd" listen="imap" prefork=5 provide_uuid=1
+</pre>
+</ol>
+
+<h4>"Rolling" replication</h4>
+
+"Rolling" replication means that the "master" server continuously
+synchonizes itself with the replica. To configure "rolling"
+replication, perform the following:
+
+<ol>
+<p><li>Enable the <tt>sync_log</tt> option in imapd.conf. This allows
+the <tt>imapd</tt>, <tt>pop3d</tt>, <tt>nntpd</tt>, and <tt>lmtpd</tt>
+services to log synchonization actions which will be periodically
+serviced by <tt>sync_client</tt>.
+
+<p><li>Optionally, adjust the <tt>sync_repeat_interval</tt> in imapd.conf.
+
+<p><li>
+Add a line similar to the following in the STARTUP section of cyrus.conf:<p>
+
+<pre>
+ syncclient cmd="/usr/cyrus/bin/sync_client -r"
+</pre>
+
+<p><li>Start/restart <tt>"/usr/cyrus/bin/master"</tt>.
+
+</ol>
+
+<h2>Administration</h2>
+
+<h3>Manual replication</h3>
+
+To manually synchonize any part of the mailstore, simply run
+<tt>sync_client(8)</tt> with the appropriate command line options.
+Note that you CAN manually synchonize even if "rolling" replication
+has been configured.
+
+<h3>Failover</h3>
+
+<P><HR>
+last modified: $Date: 2006/07/10 14:04:22 $
+</BODY></HTML>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-sieve.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-sieve.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-sieve.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-sieve.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,137 @@
+<!-- $Id: install-sieve.html,v 1.4 2001/10/23 18:14:48 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Installing Sieve
+</title>
+</head>
+<h1>Installing Sieve
+</h1>
+<body>
+
+<p>This section assumes that you compiled Cyrus with sieve support. If
+you specified <tt>--disable-sieve</tt> when running
+<tt>./configure</tt>, you did NOT compile the server with sieve
+support.
+
+<p>A <a href="http://www.cyrusoft.com/sieve">brief introduction</a> to
+Sieve at is available from <a href="http://www.cyrusoft.com/">Cyrusoft
+International</a>.
+
+<h3>Configure outgoing mail</h3>
+
+<p>Some Sieve actions (redirect, vacation) can send outgoing mail.</p>
+
+<p>You'll need to make sure that "<tt>lmtpd</tt>" can send outgoing
+messages. Currently, it invokes "<tt>/usr/lib/sendmail</tt>" by
+default to send messages. Change this by adding a line like:
+
+<pre>
+ sendmail: /usr/sbin/sendmail
+</pre>
+
+in your "<tt>/etc/imapd.conf</tt>". If you're using Postfix or another
+MTA, make sure that the sendmail referenced in
+"<tt>/etc/imapd.conf</tt>" is Sendmail-compatible.</p>
+
+<h3>Managing Sieve Scripts</h3>
+
+Since Cyrus is based around the concept of a sealed-server, the normal
+way for users to manipulate Sieve scripts is through the
+"<tt>sieveshell</tt>" utility.
+
+<p>If, for some reason, you do have user home directories on the
+server, you can use the "<tt>sieveusehomedir</tt>" option and have the
+sieve script stored in the home directory of the user as
+"<tt>~/.sieve</tt>".
+
+<h3>Testing the sieve server</h3>
+<ol>
+
+<p>
+<li>The Sieve server, "<tt>timsieved</tt>", is used for transporting
+user Sieve scripts to the sealed IMAP server. It is incompatible with
+the "<tt>sieveusehomedir</tt>" option. It is named after the
+principal author, Tim Martin, who desperately wanted something named
+after him in the Cyrus distribution.
+
+<p>
+<li>From your normal account, telnet to the sieve port on the
+server you're setting up:
+
+<pre>
+<kbd> telnet foobar sieve
+</kbd></pre>
+
+If your server is running, you'll get a message similar to the following one:
+
+<pre>
+ Trying 128.2.10.192...
+ Connected to foobar.andrew.cmu.edu.
+ Escape character is '^]'.
+ "IMPLEMENTATION" "Cyrus timsieved v1.1.0"
+ "SASL" "ANONYMOUS PLAIN KERBEROS_V4 GSSAPI"
+ "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress regex"
+ OK
+</pre>
+
+<p>
+Any message other than one similar to the one above means there is a
+problem. Make sure all of authentication methods you wish to support
+are listed. This list should be identical to the one listed by
+"<tt>imapd</tt>" earlier. Next terminate the connection, by typing
+ "<kbd>logout</kbd>".
+
+<p>
+<li>Next test authenticating to the sieve server. To do this run the
+"<tt>sieveshell</tt>" utility. You must specify the server. If you
+run this utility from a different machine without the "sieve" entry in
+"/etc/services", port 2000 will be used.
+
+<pre>
+ "<kbd>sieveshell foobar</kbd>"
+ Please enter your password: ******
+ > quit
+</pre>
+
+This should produce the message "<tt>Authentication failed</tt>" with
+a description of the failure if there was a problem.
+
+<p><li>Next you should attempt to place a sieve script on the
+server. To do this create a file named "<tt>myscript.script</tt>" with
+the following lines. Replace "<tt>foo at example.org</tt>" with an email
+address you can send mail from, but that is not the one you are
+working on now.
+
+<pre>
+ require ["reject","fileinto"];
+
+ if address :is :all "From" "foo at example.org"
+ {
+ reject "testing";
+ }
+</pre>
+
+To place this script on the server run the following command:
+
+<pre>
+ "<kbd>sieveshell foobar</kbd>"
+ Please enter your password: ******
+ > put myscript.script
+ > activate myscript
+ > quit
+</pre>
+
+This should place your script on the server and make it the active script.
+
+<p>
+<li>Test that the sieve script is actually run from deliver. Send
+a message to the address you're working on from the address mentioned
+in the sieve script. The message should be rejected.
+
+</ol>
+
+<P><HR>
+last modified: $Date: 2001/10/23 18:14:48 $
+</BODY></HTML>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-snmpmon.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-snmpmon.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-snmpmon.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-snmpmon.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,31 @@
+<!-- $Id: install-snmpmon.html,v 1.1 2000/04/25 02:56:42 leg Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>SNMP Monitoring
+</title>
+</head>
+<h1>SNMP Monitoring
+</h1>
+<body>
+
+<p><b>TODO:</b>finish this section. The majority of this section will
+get moved to the external CySNIIP docs and this will be stuff specific
+ to the imapd.
+
+<p>Cyrus uses an auxillary process called "<tt>tugowar</tt>", so named
+because there's a push-pull model. Various components of the Cyrus
+mail system push data to <tt>tugowar</tt>, and <tt>tugowar</tt>
+listens for SNMP queries (remote clients pull the data from
+<tt>tugowar</tt>).</p>
+
+<h3>Configuring tugowar</h3>
+
+<h3>Testing the tugowar daemon</h3>
+
+<h3>SNMP data exported</h3>
+
+<P><HR>
+last modified: $Date: 2000/04/25 02:56:42 $
+</BODY></HTML>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-testing.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-testing.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-testing.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-testing.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,139 @@
+<!-- $Id: install-testing.html,v 1.3 2002/08/22 13:49:30 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Testing the IMAP Server
+</title>
+</head>
+<h1>Testing the IMAP Server
+</h1>
+<body>
+
+To test the IMAP server, reboot and perform the following steps (all
+of these samples use "<tt>foobar</tt>" as the IMAP server name). A
+list of answers to common installation problems is maintained in <A
+HREF="http://asg.web.cmu.edu/cyrus/imapd/install-FAQ.html">http://asg.web.cmu.edu/cyrus/imapd/install-FAQ</A>.
+
+<ol>
+<li>From your normal account, telnet to the IMAP port on the
+server you're setting up:
+
+<pre>
+<kbd> telnet foobar imap
+</kbd></pre>
+
+If your server is running, you'll get the following message:
+
+<pre>
+ Trying 128.2.232.95...
+ Connected to foobar.andrew.cmu.edu.
+ Escape character is '^]'.
+ * OK foobar.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
+</pre>
+
+<p>
+Any message other than one starting with "<tt>* OK</tt>" means there
+is a problem. To terminate the connection, type
+ "<kbd>. logout</kbd>".
+
+<p>Naturally the version number should match the version you just
+installed.
+
+<P>
+<li>Use "<tt>imtest</tt>" to test logging in with plaintext passwords:
+
+<pre>
+<kbd> /usr/local/bin/imtest -m login foobar
+</kbd></pre>
+
+<p>If you want to specify a different user, do:
+
+<pre>
+<kbd> /usr/local/bin/imtest -m login -a <i>USER</i> foobar
+</kbd></pre>
+
+If your server is running, you'll get the following message:
+<pre>
+ <kbd>% /usr/local/bin/imtest -m login foobar</kbd>
+ S: * OK mail1.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
+ C: C01 CAPABILITY
+ S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS
+ X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=GSSAPI AUTH=ANONYMOUS
+ AUTH=KERBEROS_V4 UNSELECT
+ S: C01 OK Completed
+ Password:
+ + go ahead
+ L01 OK User logged in
+ Authenticated.
+ Security strength factor: 0
+</pre>
+
+<p>Any message other than one starting with a "<tt>L01 OK</tt>" means there is
+a problem. If the test fails, a more specific error message should be
+written through <tt>syslog</tt> to the server log. To terminate the
+connection, type "<kbd>. logout</kbd>".
+
+<li>You should now test the server with each of the various
+authentication mechanisms you have installed. The supported mechanisms
+are listed in the CAPABILITY line:
+
+<pre>
+ * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS
+ X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=ANONYMOUS
+ AUTH=KERBEROS_V4 AUTH=DIGEST-MD5 AUTH=CRAM-MD5 UNSELECT
+ . OK Completed
+</pre>
+
+Each of the mechanism names is preceded by a 'AUTH='. For this example
+the ANONYMOUS, KERBEROS_V4, DIGEST-MD5, and CRAM-MD5 mechanisms are
+available. If a mechanism does not appear that you wish to use,
+examine the libsasl log messages. Generally, if a mechanism does not
+appear, it means it failed to initialize. (For example, if the server
+is unable to access the srvtab file the KERBEROS_V4 mechanism will
+refuse to load.)
+
+<p>Plaintext login is a special case: the PLAIN SASL mechanism is only
+advertised under an encrypted connection. However, plaintext logins
+are available (as long as you haven't disabled plaintext)
+by using <tt>-m login</tt>(as above).
+
+<p>To terminate the <tt>imtest</tt> connection, type "<kbd>. logout</kbd>".
+
+<p>Once you are satisfied with the authentication mechanism list you
+should attempt to log in with each of those mechanisms. Run <tt>imtest</tt>
+specifying which mechanism you would like to use.
+
+<pre>
+ <kbd>/usr/local/bin/imtest -m KERBEROS_V4 foobar</kbd>
+ C: C01 CAPABILITY
+ S: * OK foobar.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
+ S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE
+ UIDPLUS X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=ANONYMOUS
+ AUTH=GSSAPI AUTH=KERBEROS_V4 UNSELECT
+ S: C01 OK Completed
+ C: A01 AUTHENTICATE KERBEROS_V4
+ S: + wYcDAA==
+ C: BAYBQU5EUkVXLkNNVS5FRFUAOCAm7F/Y+HabCzJ
+ /UMtVcvWRjTohuq/USaCV6gYdkAU5DOcADAq
+ S: + 0aAsUGQZhgQ=
+ C: ADMe/cVivAYYzy1yd4Vojg==
+ S: A01 OK Success (privacy protection)
+ Authenticated.
+ Security strength factor: 56
+</pre>
+
+<p>Any message other than one starting with a "<tt>A01 OK</tt>" means there is
+a problem. If the test fails, a more specific error message is written
+through <TT>syslog</TT> to the server log. To terminate the
+connection, type "<kbd>. logout</kbd>".</p>
+
+<p>See the libsasl documentation for a full description of all the
+mechanisms. It is also possible to support "security layers"
+(privacy or integrity protected connections). By default,
+<tt>imtest</tt> uses the strongest layer available with the selected
+mechanism; use "<tt>-l</tt>" to choose an alternate layer.</p>
+
+</ol>
+
+<P><HR>
+last modified: $Date: 2002/08/22 13:49:30 $
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-upgrade.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-upgrade.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-upgrade.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-upgrade.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,467 @@
+<!-- $Id: install-upgrade.html,v 1.32.2.7 2006/07/10 13:46:20 murch Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Upgrading From Previous Versions
+</title>
+</head>
+<body>
+
+<h1>Upgrading From Previous Versions</h1>
+
+<h2>Upgrading from 2.3.3 or later (64-bit machines)</h2>
+<ul>
+<li>Due to byte alignment issues in cyrus.index, all mailboxes
+will have to be reconstructed.</li>
+</ul>
+
+<h2>Upgrading from 2.3.4 or 2.3.5</h2>
+<ul>
+<li>Any mailboxes which had messages appended/delivered/copied with a
+2.3.4 service or copied with a 2.3.5 imapd <b>MUST</b> be
+reconstructed in order for the new messages to be displayed by
+clients.</li>
+</ul>
+
+<h2>Upgrading from 2.2.x or earlier</h2>
+<ul>
+<li>If you wish to use separate metadata partition(s), you <b>MUST</b>
+first shut down Cyrus and then perform the following:
+<ol>
+<li>Set the <tt>metapartition-*</tt> and <tt>metapartition_files</tt>
+options to suit your configuration. For a full description of these
+options, see the <tt>imapd.conf(5)</tt> man page.</li>
+<li>Create the metadata partition directory(s) listed in the
+<tt>metapartition-*</tt> option(s), setting the ownership and
+permissions in same fashion as step 6 of <a
+href="install-configure.html">install-configure</a>.</li>
+<li>Run the <tt>tools/migrate-metadata</tt> script (as the cyrus user)
+to move the metadata files listed in the
+<tt>metapartition_files</tt> option from the spool partition(s) to the
+new metadata partition(s). This script may take a long time to run
+depending on the number of mailboxes on the server, but presumably the
+metadata partitions are located on high speed storage, so the writes
+should be relatively fast.</li>
+<li>Restart Cyrus.</li>
+</ol>
+</ul>
+
+<h2>Upgrading from 2.2.2 or earlier</h2>
+<ul>
+<li>The Cyrus database backend configuration is now handled at runtime
+using <tt>imapd.conf</tt> options. If you are not using the default
+backend for any of the databases, make sure that you specify the
+correct backend(s) in appropriate option(s).</li>
+<li>The format of the <tt>newspeer</tt> option has been changed.
+The existing format will still be parsed, but the option should be
+upgraded to use the new format (see <tt>imapd.conf(5)</tt> for
+details).</li>
+</ul>
+
+<h2>Upgrading from 2.2.1 or earlier</h2>
+<ul>
+<li>The sieve bytecode format has changed again to correct an issue
+with the short circuiting of the allof and anyof operators. To
+upgrade existing scripts (outside of home directories), you can run the
+<tt>tools/masssievec</tt> perl script included with the distribution. It
+requires a path to your <tt>sievec</tt> binary. This should also upgrade
+scripts that have already been compiled to bytecode. For example:
+<pre>
+masssievec /usr/src/cyrus/sieve/sievec
+</pre></li>
+
+</ul>
+
+<h2>Upgrading from 2.2.0 or earlier</h2>
+
+<ul>
+<li>The improved directory hashing (fulldirhash) is now a runtime
+configuration option. If you are currently using this feature, then
+make sure that you enable the <tt>fulldirhash</tt> option in
+<tt>imapd.conf</tt>.</li>
+
+<li>The format of mailbox index files has changed. They are upgraded on
+the fly, so you need to do nothing to upgrade. However, to downgrade them
+you will need to remove the cyrus.index files, and reconstruct the mailboxes,
+otherwise the index files will be invalid.</li>
+
+<li><tt>ctl_deliver -E</tt> has been deprecated in favor of
+<tt>cyr_expire -E</tt>. This new tool does both duplicate delivery
+database pruning as well as message expunging. You should replace the
+appropriate <tt>EVENTS</tt> entry in <tt>cyrus.conf</tt> with one of
+those in the sample configurations in the <tt>master/conf</tt>
+directory.</li>
+
+<li>The sieve bytecode format has changed. The new format is encoded in
+network byte order, and will be transferable between architechures. To
+upgrade existing scripts (outside of home directories), you can run the
+<tt>tools/masssievec</tt> perl script included with the distribution. It
+requires a path to your <tt>sievec</tt> binary. This should also upgrade
+scripts that have already been compiled to bytecode. For example:
+
+<pre>
+masssievec /usr/src/cyrus/sieve/sievec
+</pre>
+</ul>
+
+
+<h2>Upgrading from 2.1.x or earlier</h2>
+
+<h3>General information (ALL SITES)</h3>
+
+<ul>
+<li>The default database formats for the mailbox list and the seen
+state databases has been changed to the skiplist backend. There are
+two ways of dealing with this if you have been using the defaults.
+
+<ol>
+<li>Specify <tt>--with-mboxlist-db=berkeley</tt> and
+<tt>--with-seen-db=flat</tt> to <tt>configure</tt>. This will
+instruct Cyrus to continue to use the previous defaults.</li>
+
+<li>Use the <tt>cvt_cyrusdb</tt> program to directly convert the databases.
+This should be done with the server down, and with the binaries from the new
+Cyrus distribution. Change any paths that do not match your configuration.<br>
+For the mailbox list, the command looks like:
+<pre>
+/usr/cyrus/bin/cvt_cyrusdb /var/imap/mailboxes.db berkeley /var/imap/mailboxes.db.new skiplist
+mv /var/imap/mailboxes.db.new /var/imap/mailboxes.db
+</pre>
+Note that the use of full paths to the database files is important. You
+should also backup your old mailboxes database before moving the new one
+in.<br />
+
+For the seen state databases, the command to get them all in one fell swoop
+looks like:
+<pre>
+find /var/imap/user -name \*.seen -exec /usr/cyrus/bin/cvt_cyrusdb \{\} flat \{\}.new skiplist \; -exec mv \{\}.new \{\} \;
+</pre>
+
+The slashes are important for shell escaping. Again, you should back
+up the contents of your <tt>/var/imap/user</tt> directory before
+executing this command. These commands may take some time to complete,
+especially if your databases are large.
+
+</li></ol>
+
+We believe that skiplist offers considerable performance advantages
+for these two databases over the previous defaults. </li>
+
+<li>Sieve scripts are now compiled into bytecode. The program
+<tt>sievec</tt> is provided to do this process manually (timsieved will
+compile submitted sieve scripts as they are uploaded). To upgrade
+existing scripts (outside of home directories), you can run the
+<tt>tools/masssievec</tt> perl script included with the distribution.
+It requires a path to your <tt>sievec</tt> binary. For example:
+
+<pre>
+masssievec /usr/src/cyrus/sieve/sievec
+</pre>
+
+Note that this will fail for scripts that use the "envelope"
+extention but do not require it. Cyrus 2.1's <tt>timsieved</tt> did
+not do appropriate checking that the optional envelope test was
+required before it was used.
+</li>
+
+<li> Configuration subsystem changes:
+
+<ul>
+ <li>The tls_[service]_* configuration options have been removed. Now
+ use [servicename]_tls_*, where servicename is the service identifier
+ from <tt>cyrus.conf</tt> for that particular process.</li>
+
+ <li>The <tt>admins</tt> and <tt>lmtp_admins</tt> configuration
+ options no longer union. Per-service options completely override
+ the default value when they are specified.</li>
+
+ <li><tt>lmtp_allowplaintext</tt> is no longer a defined parameter and must
+ be specified using the service name of your lmtp process if you
+ require a specific value.</li>
+</ul>
+</li>
+</ul>
+
+<h3>Specialized information (Murder, AFS, etc.)</h3>
+
+<ul>
+<li>The IMAP IDLE command is now supported by proxyd and is controlled
+by the <tt>imapidlepoll</tt> option, which is enabled by default (60
+seconds). To disable IMAP IDLE in proxyd, set <tt>imapidlepoll</tt>
+to 0.</li>
+
+<li>User moves via RENAME and XFER are now controlled by the
+<tt>allowusermoves</tt> option, which defaults to off.</li>
+
+<li>If you use <tt>ptloader</tt>, it now runs as a regular cyrus
+service. This means that you will need master to acquire and maintain
+AFS tokens for it. You will also need to create the ptclient
+directory under your imap configdirectory, to hold the PTS cache (now
+a full-fledged cyrusdb) and UNIX socket. In <tt>cyrus.conf</tt>,
+ptloader should be setup to listen on
+<i><configdirectory></i>/ptclient/ptsock. See the
+<tt>master/test/cmu-backend.conf</tt> example configuration file.</li>
+
+<li>Also, <tt>ptloader</tt> has been given a generic interface. You
+should now specify "<tt>--with-auth=pts</tt>" (instead of
+"<tt>--with-auth=krb_pts</tt>") to <tt>configure</tt>. There is also
+a <tt>--with-pts=</tt> <tt>configure</tt> option that defaults to
+<tt>afskrb</tt> (Kerberos Canonicalization, AFS PTS Groups). There is
+also an experimental ldap module. Note also that if <tt>ptloader</tt>
+fails the lookup, authorization (and therefore authentication) will
+now fail, as canonicalization is done inside of ptloader.</li>
+
+<li>The format of sieve referrals has changed to be more consistant
+with the current managesieve draft, this may cause interoperability
+problems when using managesieve clients and servers from different
+cyrus versions.</li>
+
+<li>Clients that use old-style ACL commands that include the
+"MAILBOX" directive will no longer function.
+We do not know of any clients that have this problem currently.</li>
+
+<li>Any applications that link libcyrus.a now need to link libcyrus_min.a
+as well.</li>
+
+
+</ul>
+
+<h2>Upgrading from 2.1.13 or earlier</h2>
+<ul>
+<li>We are now more forgiving of MIME boundry headers generated by earlier
+versions of eudora. However, if you have messages already in the mailstore
+that you want to fix you will need to reconstruct the affected mailboxes
+to regenerate the cached bodystructure data to take this into account.
+Nothing needs to be done for new messages to be treated in this way.</li>
+</ul>
+
+<h2>Upgrading from 2.1.12 or earlier</h2>
+<ul>
+<li>timsieved was corrected to behave properly in the altnamespace configuration.
+However, this means that it was previously looking for sieve scripts in
+"user.name" format instead of the (correct) "user^name"
+format. A sample script to do this (which should be run in the top level of
+the sieve directory) is in <tt>tools/convert-sieve.pl</tt>. Note that this
+is only needed if you are running with altnamespace turned on.</li>
+</ul>
+
+<h2>Upgrading from 2.1.3 or earlier</h2>
+<ul>
+<li>If you use notifications (previously <tt>notify_zephyr</tt> or
+<tt>notify_unix</tt>) this functionality has been seperated out to
+<tt>notifyd</tt>. See the <tt>notifyd</tt> manpage and example
+entries in <tt>master/conf</tt>.</li>
+
+</ul>
+
+<h2>Upgrading from 2.1.2 or earlier</h2>
+
+<ul>
+<li> Sieve has been updated to be compliant with RFC 3028 and
+draft-martin-sieve-notify-01. All <tt>notify</tt> actions and any
+<tt>fileinto</tt> and/or <tt>redirect</tt> actions using stringlists
+will have to be updated/changed. </li>
+</ul>
+
+<h2>Upgrading from 2.0.16 or earlier</h2>
+
+<ul>
+<li> You must install and configure Cyrus SASL version 2 to use Cyrus
+IMAP 2.1 and later. You can download SASL at <a
+href="http://asg.web.cmu.edu/cyrus/download/">http://asg.web.cmu.edu/cyrus/download/</a>.
+
+<li> If you use <tt>timsieved</tt> to manage Sieve scripts, and have
+enabled the alternate namespace and/or the Unix hierarchy separator,
+run the script "<tt>tools/translatesieve</tt>". This script will
+translate the folder names in <tt>fileinto</tt> actions.
+
+<li> Cyrus now uses the service name "sieve" instead of "imap" for the
+SASL profile of <tt>timsieved</tt>. If you use <tt>timsieved</tt> to
+manage Sieve scripts, be sure to update your password checking
+mechanism appropriately,
+
+<li> If you have enabled the improved directory hashing scheme, run
+the script "<tt>tools/rehash full</tt>". This script will rehash your
+existing directories.
+
+<li> The hashed deliver databases (used for duplicate delivery suppression
+and Sieve) have been merged into a single <tt>deliver.db</tt> database.
+You can safely remove the entire <tt>/var/imap/deliverdb</tt>
+directory structure after shutting down the server.
+
+<li>All of the Cyrus databases have been unified under a single BDB
+environment. A new <tt>ctl_cyrusdb</tt> tool is now used for database
+recovery and checkpointing instead of <tt>ctl_mboxlist</tt> and
+<tt>ctl_deliver</tt>. You should replace the appropriate <tt>START</tt> and
+<tt>EVENTS</tt> entries in <tt>cyrus.conf</tt> with those in the
+sample configurations in the <tt>master/conf</tt> directory.
+
+<li> Cyrus now caches SSL/TLS sessions in an external database. If you
+have support for SSL/TLS, and haven't disabled session caching (see
+<tt>imapd.conf(5)</tt>), you should add a line like the following to
+the <tt>EVENTS</tt> section of <tt>cyrus.conf</tt> to prune expired
+sessions from the database:
+
+<pre><kbd> # this is only necessary if caching TLS sessions
+ tlsprune cmd="tls_prune" period=1440
+</kbd></pre>
+</ul>
+
+<h2>Upgrading from 2.0.6, 2.0.7, 2.0.8, or 2.0.9 or earlier</h2>
+
+<ul>
+<li> If you use <tt>timsieved</tt> to manage Sieve scripts, run the
+script "<tt>tools/upgradesieve</tt>". <tt>timsieved</tt> now uses
+symlinks instead of hard links.
+</ul>
+
+<h2>Upgrading from a previous 2.0 version to 2.0.6</h2>
+
+<b>Warning:</b> You do not need to follow these instructions if you're
+upgrading from version 1.6.
+
+<ul>
+<li>You can now pick whether to use Berkeley db to store seen state,
+the subscription files, and the mailboxes file or a flat text file, at
+compile time only. (Look in <tt>imap/seen_db.c</tt> and
+<tt>imap/mboxlist.h</tt>.)
+
+<li>The format of the mailboxes file and seen state has changed. It is
+not possible to preserve seen state, but upgrade the mailboxes file as
+follows:
+<ol>
+<li> Run <tt>ctl_mboxlist -d > mboxlist.temp</tt> to dump existing
+mailboxes.
+
+<li> Remove old database files: <tt>rm mailboxes.db db/*
+user/*/*.seen</tt>
+
+<li>With the new version of ctl_mboxlist, run <tt>ctl_mboxlist -u <
+mboxlist.temp</tt>.
+</ol>
+</ul>
+
+<h2>Upgrading from 1.6.22 or 1.6.24</h2>
+
+<b>Warning:</b> Cyrus imapd 2.0 will automatically convert on-disk
+file formats as the server is used. <b>It is not possible to run 1.6
+after 2.0 has been used on a mail spool without reconstructing every
+mailbox.</b>
+
+<ul>
+<li>Create some extra directories and remove the duplicate delivery
+database:
+<pre>
+<kbd> mkdir /var/imap/db
+ mkdir /var/imap/socket
+ chown cyrus /var/imap/db /var/imap/socket
+ rm -rf /var/imap/deliverdb
+</kbd></pre>
+
+<li>Convert mailboxes file to Berkeley DB:
+<pre>
+<kbd> su cyrus
+ cd /var/imap
+ ctl_mboxlist -u < mailboxes
+ ctl_cyrusdb -c
+</kbd></pre>
+
+Please keep a backup of your mailboxes file. You can dump an
+old-style mailboxes file by using <tt>ctl_mboxlist -d</tt>.
+
+<li>remove "<tt>/etc/inetd.conf</tt>" entries. The <tt>imap</tt> and
+<tt>popd3d</tt> lines need to be removed from <tt>/etc/inetd.conf</tt>
+and inetd needs to be restarted.
+
+<li>master process configuration: You'll need to configure the master
+process Cyrus process and ensure that it starts on boot. see <a
+href="install-configure.html#master">this section</a> of the
+configuration instructions.
+
+<li>MTA configuration. You will have to reconfigure your MTA to speak
+to lmtpd. See <a href="install-configure.html#mta">this section</a> of
+the configuration document.
+
+<li>cyrus.seen conversion. The cyrus.seen file will be automatically
+upgraded as users read mail. After some time, you might want to
+delete the cyrus.seen file in each mailbox; it is superceded by the
+user/joe.seen file.
+
+<li>cyrus.index conversion. The cyrus.index file will be
+automatically upgraded the first time each mailbox is SELECTed.
+
+<li>Netnews conversion. The netnews programs are no longer built. If
+you are using netnews, you will need to apply the diff in the
+<tt>netnews/</tt> directory to INN or see if INN is now distributing
+those changes. You will also want to run <tt>remotepurge</tt> on a
+regular basis to purge old netnews posts.
+
+</ul>
+
+
+<h2>Upgrading from 1.6.13</h2>
+<ul>
+<li> Upgrading from the Cyrus IMAP server version 1.6.13 or earlier:
+if you use Sieve, you should run the "<tt>tools/upgradesieve</tt>"
+script, as the format of the "<tt>/usr/sieve</tt>" directory has
+changed slightly.
+
+<p>timsieved, included in this release, will handle maintenance of Sieve
+scripts.
+
+<li> Upgrading from the Cyrus IMAP server version 1.6.10 or earlier:
+if you export news via the IMAP server, you'll have to change your
+"<tt>newsfeeds</tt>" file to contain
+<pre>collectnews!:*:Tf,WR:collectnews</pre> The format of the
+input to collectnews has changed.
+
+<p>Duplicate delivery suppression is now required for Sieve.
+
+<li> Upgrading from the Cyrus IMAP server version 1.6.1 or earlier
+(including 1.5.x!): the quota and user directories are now hashed by
+the first character of the username. This is to reduce the number of
+entries in any given directory. It doesn't do a great job (and in some
+cases it will do a really poor job) but as a quick hack it shouldn't
+make things worse. Optionally, the data partitions can also be hashed
+by enabling the "hashimapspool" option.
+
+<p>You must hash your directories using the "<tt>dohash</tt>" script
+in the tools subdirectory. (If you want to hash your mail spool, be
+sure to set "hashimapspool" before running "<tt>dohash</tt>".) This
+must be run as the Cyrus user. Be sure to stop mail service while
+converting. Doing this in single user mode is probably the safest.
+
+</ul>
+
+<h2>Upgrading from 1.5</h2>
+<ul>
+<li> Upgrading from the Cyrus IMAP server version 1.5 or earlier:
+libsasl is now required. Configuring SASL to work may be a chore,
+especially if you use shadow passwords.
+
+<li> An ANSI C compiler is now required. gcc should work fine and can
+be acquired from <a href="http://www.gnu.org/software/gcc/gcc.html">
+http://www.gnu.org/software/gcc/gcc.html</a>.
+
+<li> Make sure to read the upgrading instructions under 1.6 above.
+
+<li> Upgrading from 1.5.14 or earlier requires deleting the delivered
+database. Remove the file delivered.db in the configdirectory and make a
+directory called "deliverdb" in the configdirectory. This may cause some
+duplicates to get through.
+
+<li> Upgrading from 1.5.14 or earlier requires removing the PTS cache
+database (if the AFS PTS group support is used, which is not the
+default). The PTS cache is in /var/ptclient/ptscache.db, and you
+should remove it. This is because the format for the PTS cache for
+IMSP has changed. If you use AFS ACLs, IMSPd, and IMAPd on the same
+machine, make sure you have version 1.5a5 of the IMSP server for this
+version of the IMAP server. (If you don't have IMSP, or AFS, don't
+worry about it.)
+
+</ul>
+
+<HR><P>
+last modified: $Date: 2006/07/10 13:46:20 $
+</BODY></HTML>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-virtdomains.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-virtdomains.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-virtdomains.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install-virtdomains.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,224 @@
+<!-- $Id: install-virtdomains.html,v 1.2.2.1 2004/01/15 20:24:25 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Configuring Virtual Domains
+</title>
+</head>
+<h1>Configuring Virtual Domains
+</h1>
+<body>
+
+<h2>Introduction</h2>
+
+<p>Virtual domains is the practice of hosting a service for more than one
+domain on one server. Cyrus IMAP has the ability to host IMAP/POP
+mailboxes for multiple domains (e.g. <tt>test at example.com</tt> and
+<tt>test at example.net</tt>) on a single server or Murder.</p>
+
+<p>In order to accomplish this, Cyrus needs to know which domain to look
+in when a mailbox is accessed. There are two ways in which Cyrus can
+determine the domain:</p>
+
+<ul>
+<li>Fully qualified userid - the client logs in with a userid
+containing the domain in which the user belongs (e.g
+<tt>test at example.com</tt> or <tt>test%example.net</tt>)</li>
+<li>IP address - the server looks up the domain based on the IP
+address of the receiving interface (useful for servers with multiple
+NICs or using IP aliasing)</li>
+</ul>
+
+<p>Both of these methods are active if the <tt>virtdomains</tt> option
+is set to <tt>on</tt> (or <tt>yes</tt>, <tt>1</tt>, <tt>true</tt>) and
+can be used in conjunction with one another. If the
+<tt>virtdomains</tt> option is set to <tt>userid</tt>, then only the
+first method is used. Note that a fully qualified userid takes
+precedence over a domain obtained from the IP address.</p>
+
+<h3>Concepts</h3>
+<p>Perhaps the most important part of this process is to understand
+the changes in the paradigm.</p>
+
+<ul>
+<li><b>Everyone is in a domain</b> - It's best to think of every user
+as existing inside a domain. Unqualified users are technically inside the
+<tt>defaultdomain</tt>.</li>
+<li><b>Names can be qualified</b> - Global admins can reference
+mailboxes and ids by qualified names. That is, for any given mailbox
+command, you can add <tt>@domain</tt> to the end of the mailbox name.
+Here are some examples:
+ <ul>
+ <li><tt>cyradm> create user.jill at example.net</tt> <em>(create a
+ user)</em></li>
+ <li><tt>cyradm> create user.rick at example.net</tt> <em>(create
+ another user)</em></li>
+ <li><tt>cyradm> setquota user.rick at example.net 50000</tt>
+ <em>(define a quota)</em></li>
+ <li><tt>cyradm> setaclmailbox user.rick at example.net
+ jill at example.net read</tt> <em>(give Jill read access to Rick's
+ mailbox)</em></li>
+ <li><tt>cyradm> listmailbox *@example.net</tt> <em>(list all
+ mailboxes in the example.net domain)</em></li>
+ </ul></li>
+ <li><b>Each mailbox exists in only one domain</b></li>
+ <li><b>Domains are mutually exclusive</b> - Users only have access to
+ mailboxes within their own domain (intra-domain). The following
+ example will not work: <tt>setacl user.jill at herdomain.com
+ rick at hisdomain.com read</tt>.
+ <li><b>Global and Domain admins</b> - The Cyrus virtual domains
+ implementation supports per-domain administrators as well as
+ global (inter-domain) administrators. Domain-specific
+ administrators are specified with a fully qualified userid in the
+ <tt>admins</tt> option (e.g. <tt>admin at example.net</tt>) and only
+ have access to mailboxes in the associated domain. Global
+ administrators are specified with an unqualified userid.
+</ul>
+
+<h2>Quick Start</h2>
+<ol>
+<li>Add <tt>virtdomains: yes</tt> to <tt>imapd.conf</tt></li>
+<li>Add a <tt>defaultdomain</tt> entry to <tt>imapd.conf</tt></li>
+<li>Use cyradm (as a global or domain admin) to create mailboxes for
+each domain.</li>
+</ol>
+
+<h2>Configuration</h2>
+Support for virtual domains is enabled by turning on the
+<tt>virtdomains</tt> option in <tt>imapd.conf</tt>.
+
+<p>When upgrading from a single domain installation to a virtual
+domain installation, the name of the existing domain (domain of the
+server hostname) should be specified using the <tt>defaultdomain</tt>
+option in <tt>imapd.conf</tt>. This allows users to continue to
+access their mailboxes using unqualified userids. For example, if the
+primary IP address on your server resolves to 'www.xxx.yyy.zzz',
+then set <tt>defaultdomain</tt> to 'xxx.yyy.zzz'.
+
+<p>Even for new installations, it is <i>recommended</i> that the
+"real" domain of the server (domain of its primary hostname), be set
+to the <tt>defaultdomain</tt>. See <a href=#admins>Administrators</a>
+below for further discussion.
+
+<p>Here is a sample <tt>imapd.conf</tt> with a minimal set of configuration
+options.</p>
+
+<pre>
+configdirectory: /var/imap
+partition-default: /var/spool/imap
+admins: admin rick.admin at hisdomain.com jill.admin at herdomain.net
+virtdomains: yes
+defaultdomain: exampleisp.net
+</pre>
+
+<p>This example has three domains: exampleisp.net, hisdomain.com, and
+herdomain.net. <tt>admin</tt> can administer all three domains, while
+<tt>rick.admin at hisdomain.com</tt> and
+<tt>jill.admin at herdomain.net</tt> can only administer their respective
+domains.</p>
+
+<p>Note that everyday users should not be administrators. In the
+above example, Jill and Rick have separate administrative accounts for
+their domains.</p>
+
+<h3>Multiple IP Addresses</h3>
+
+<p>In order to use a multiple IP address configuration, the server must
+be able to do a reverse lookup on the IP address to determine the
+hostname of the receiving interface. For example:</p>
+
+<pre><kbd>
+192.168.0.1 -> mail.example.com
+192.168.0.2 -> mail.example.net
+192.168.0.3 -> mail.foo.bar
+</kbd></pre>
+
+<p>Once the server obtains the fully qualified hostname of the
+interface, it removes the localpart (ie, 'mail') and uses the
+remainder as the domain for any user that logs in.</p>
+
+<p>This address to hostname mapping would usually be done via DNS,
+<tt>/etc/hosts</tt>, NIS, etc. Configuration of the various naming
+services is beyond the scope of this document.</p>
+
+<h3>Delivering mail</h3>
+
+<p>To deliver mail to your virtual domains, configure your MTA so that
+the envelope recipient (RCPT TO) passed to <tt>lmtpd</tt> is fully
+qualified with the correct domain.</p>
+
+<h4>Configuring Sendmail</h4>
+
+<p>In general, follow the basic <a href=install-configure.html>configuration
+instructions</a>. Here are a few caveots:</p>
+
+<ul>
+<li> It is easiest to use the mailertable to route mail to Cyrus,
+rather than adding the domain to the local-host-names file ($w). This
+prevents Sendmail from changing the domain name to the local host
+name.
+
+<pre>
+example.com cyrusv2:/var/imap/socket/lmtp
+</pre></li>
+
+<li> You'll have to use the Cyrus mailer in LMTP mode, and you'll have
+to change the mailer flags so that it provides the full domain while
+communicating LMTP. Specifically these changes:
+
+<pre>
+S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP
+</pre></li>
+</ul>
+
+<h3>Mail Clients</h3>
+<p>The only changes you'll need to make to the mail client is to change the
+username to the fully qualified domain name, ie <tt>user at example.com</tt>.
+Note that to support some mail clients, the <tt>user%example.com</tt>
+form of userid is also supported. Users in the default domain will not
+need to reconfigur their clients (as unqualified userids are assumed to
+be in the default domain)</p>
+
+<a name="admins"><h3>Administration</h3></a>
+
+<p>The Cyrus virtual domains implementation supports per-domain
+administrators as well as "global" (inter-domain) administrators.
+Domain-specific administrators are specified with a
+fully qualified userid in the <tt>admins</tt> option
+(e.g. <tt>admin at example.net</tt>) and only have access to mailboxes in
+the associated domain. Mailbox names should be specified in the same
+fashion as on a single domain configuration.</p>
+
+<p>Global administrators are specified with an unqualified userid in the
+<tt>admins</tt> option and have access to <i>any</i> mailbox on the
+server. Because global admins use unqualified userids, they belong
+to the <tt>defaultdomain</tt>. As a result, you can NOT have a global
+admin without specifying a <tt>defaultdomain</tt>. Note that when
+trying to login as a global admin to a multi-homed server from remote
+machine, it might be necessary to fully qualify the userid with the
+<tt>defaultdomain</tt>.</p>
+
+<p>Global admins must use a <tt>mailbox at domain</tt> syntax when
+specifying mailboxes outside of the <tt>defaultdomain</tt>. Examples
+(using <tt>cyradm</tt>):</p>
+
+<p>To create a new INBOX for user 'test' in <tt>defaultdomain</tt>:</p>
+
+<pre><kbd>
+ cm user.test
+</kbd></pre>
+
+<p>To create a new INBOX for user 'test' in domain 'example.com':</p>
+
+<pre><kbd>
+ cm user.test at example.com
+</kbd></pre>
+
+To list all mailboxes in domain 'example.com':</p>
+
+<pre><kbd>
+ lm *@example.com
+</kbd></pre>
+
+<P><HR>
+last modified: $Date: 2004/01/15 20:24:25 $
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/install.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,64 @@
+<!-- $Id: install.html,v 1.9.2.1 2005/04/14 17:03:57 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Installing and Configuring the Cyrus IMAP Server</TITLE>
+
+</HEAD>
+<BODY>
+<h1> Installing and Configuring the Cyrus IMAP Server</h1>
+
+<P>The Internet Message Access Protocol (IMAP) is an Internet
+standards-track protocol for accessing messages (mail, news, etc).
+The IMAP server stores and provides access to messages.
+
+<P>The file <a href="questions.html">doc/questions.html</a> contains a
+list of questions we'd like to answer but haven't gotten to yet; <a
+href="faq.html">doc/faq.html</a> contains some answers that we have
+thought of. Please feel free to contribute!
+
+<p>Please refer to <a href="feedback.html">Sending Feedback</a> if
+ you would like to submit a bug, feature request or patch.
+
+<p>For detailed changes, refer to the file <a
+HREF="changes.html"><TT>doc/changes</TT></a> in the distribution.
+
+<h2>Contents</h2>
+<p>
+<ul>
+<li><a href="install-upgrade.html">Upgrading From Previous Versions</a>
+<li><a href="install-prereq.html">Prerequisites</a>
+<li><a href="install-auth.html">Authenticating Users</a>
+<li><a href="install-compile.html">Compiling the IMAP Server</a>
+<li><a href="install-configure.html">Configuring the IMAP Server</a>
+<li><a href="install-testing.html">Testing the IMAP Server</a>
+<li><a href="install-admin-mb.html">Administering Mailboxes</a>
+<li><a href="install-sieve.html">Installing SIEVE</a>
+<li><a href="install-snmpmon.html">SNMP Monitoring</a>
+<li><a href="install-netnews.html">Cyrus and Netnews</a>
+<li><a href="install-virtdomains.html">Virtual Domains</a>
+<li><a href="install-replication.html">Cyrus Replication</a>
+<li><a href="install-murder.html">Cyrus Murder: The IMAP
+ Aggregator</a>
+<li><a href="os.html">Operating System Specific Notes</a>
+<li><a href="install-perf.html">Performance Notes</a>
+</ul>
+
+<h2>Other interesting stuff</h2>
+<p>
+Here's some software that you may want to run with Cyrus. This
+software isn't maintained or supported by CMU, so please ask the
+maintainers for support.
+<ul>
+<li><a href="http://host1.dyndns.org/websieve/">Websieve</a>, a web-based
+front-end for Sieve script management with Cyrus.
+<li><a href="http://www.sendmail.org/">Sendmail</a>, the most popular
+MTA around.
+<li><a href="http://www.postfix.org/">Postfix</a>, a popular
+competitor MTA.
+</ul>
+
+<P><HR>
+last modified: $Date: 2005/04/14 17:03:57 $
+<br>
+<A HREF="index.html">Return</A> to the Cyrus IMAP Server Home Page
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+/bytecode/1.2/Wed Oct 22 18:02:54 2003//Tcyrus-release-2-3-7
+/database-formats.html/1.1.2.2/Mon Apr 19 00:43:52 2004//Tcyrus-release-2-3-7
+/hacking/1.2/Wed Oct 22 18:02:54 2003//Tcyrus-release-2-3-7
+/internationalization.html/1.7/Wed Oct 22 18:50:05 2003//Tcyrus-release-2-3-7
+/locking/1.2/Sat May 25 19:57:43 2002//Tcyrus-release-2-3-7
+/mailbox-format.html/1.3.2.7/Fri Mar 31 19:22:10 2006//Tcyrus-release-2-3-7
+/master-state-machine.fig/1.2/Wed Oct 22 18:02:54 2003//Tcyrus-release-2-3-7
+/prot-events/1.1/Sun Feb 3 15:47:54 2002//Tcyrus-release-2-3-7
+/prot.html/1.3/Wed Aug 6 21:28:05 2003//Tcyrus-release-2-3-7
+/replication_examples/1.1.2.1/Mon Feb 21 19:25:15 2005//Tcyrus-release-2-3-7
+/replication_protocol/1.1.2.1/Mon Feb 21 19:25:15 2005//Tcyrus-release-2-3-7
+/specials/1.1.2.2/Thu May 6 19:41:44 2004//Tcyrus-release-2-3-7
+/uuid/1.1.2.1/Mon Feb 21 19:25:15 2005//Tcyrus-release-2-3-7
+/var_directory_structure/1.1.2.1/Mon Feb 21 19:25:16 2005//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/doc/internal
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/bytecode
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/bytecode?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/bytecode (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/bytecode Sat Aug 26 02:00:13 2006
@@ -1,0 +1,142 @@
+A Developers Guide to the Sieve Bytecode
+Rob Siemborski <rjs3 at andrew.cmu.edu>
+
+Motivation
+----------
+
+The motivation behind moving to Sieve Bytecode is severalfold:
+
+1. Parsing a script at each execution is expensive computationally,
+
+2. Lex/Yacc are costly in terms of memory usage and executable size, whereas
+ a bytecode parser is much lighter weight.
+
+3. Using bytecode can simplify the code for the execution phase,
+ which is far more frequently occuring than the upload/compile phase.
+
+4. Rewriting a significant part of the sieve execution framework forces
+ a decent amount of refactoring on what has traditionally been a problematic
+ part of the Cyrus code base. There is still work to do in this area.
+
+Overall Bytecode Format
+-----------------------
+
+In the final bytecode, each opcode/parameter is aligned on a 4-byte boundary.
+Strings are NUL-terminated (and padded to a 4-byte boundary as needed).
+
+Ideally, we'd have all integers in network byte order, so as to make the
+scripts portable, but version 1 does not have this feature.
+
+At the beginning of the file, there is a magic header to identify it as
+a bytecode file, and a 4 byte version number. Immediately following the
+version number are the opcodes that relate to the script.
+
+Generation
+----------
+
+A Sieve Bytecode file is generated in three "passes":
+
+1. Generate a parse tree using lex/yacc from the sieve script. (addr.y,
+ addr-lex.l, sieve.y, sieve-lex.l).
+2. Serialize the parse tree into an intermediate form, where strings
+ are held separate from the rest of the representation. (bc_generate.c)
+3. Serialize the intermediate form into the final bytecode. (bc_emit.c)
+
+The intermediate form is an array of bytecode_t unions, with strings
+located elsewhere in memory. The entry point is bc_generate: sieve_generate_bytecode()
+/ bc_action_generate().
+
+bc_action_generate traverses the commandlist_t tree and emits opcodes in
+sequence.
+
+Simple actions (STOP, DISCARD, KEEP, MARK, UNMARK) have no arguments,
+and processing proceeds directly.
+
+More complicated options have a sequence of arguments that are emitted
+following the initial opcode.
+
+For example, single argument commands such as REJECT, FILEINTO, REDIRECT
+are followed by a bytecode_t for a string's length, and then a bytecode_t
+which contains a pointer to a string.
+
+Commands such as ADDFLAG, SETFLAG, REMOVEFLAG, which take a stringlist, format
+the stringlist as (using bc_stringlist_generate):
+
+{Number of Strings}{String 1 Length}{String 1 Ptr}{String 2 Length}....
+
+So their resulting final output would appear as:
+
+{Opcode}{...stringlist from above...}
+
+Even more complicated action opcodes (vacation, notify) etc,
+may take a sequence of integer values (flags), stringlists, or individual
+strings. These are more specifically documented in the code.
+
+This leaves us with the IF keyword (and tests).
+In the pass 1 form, IF appears as the following bytecode_t structures:
+
+{IF opcode}
+{Beginning of the then block}
+{End of the then block / beginning of the else block}
+{End of the else block / -1 for no else block}
+{....test opcodes....}
+{....'then' action opcodes....}
+{....'else' action opcodes.... [optional]}
+
+Test opcodes are generated by the bc_test_generate function, which
+is very similar to bc_action_generate (tests without arguments are
+just opcodes, tests with arguments have them serialized into place
+directly following the original opcode). Test lists are represented
+as {number of tests}{address of the end of the list}{test 1}{test 2}.
+
+In the third pass, strings are serialized into place, and if statement
+jumps are resolved to actual addresses within the file This is done
+in bc_emit: sieve_emit_bytecode / bc_action_emit.
+
+This results in a totally serialized representation, using byte offsets
+within the file instead of indexes into the array of bytecode_t's. In
+addition to the manipulations that are necessary to do this, there are several
+other changes in format.
+
+Two new opcodes exist: NULL and JUMP (which performs an unconditional
+jump).
+
+Stringlists and testslists now include a precomputed byte length of
+the entire list, so it can be skipped over as needed.
+
+So as to be executable without a stack, the IF statements are designed as
+follows:
+
+{IF opcode}
+{....test block....}
+{JUMP (location of false condition) }
+{....then block....}
+{(if there is an else) JUMP (end of else block)}
+{(if there is an else) .... else block ....}
+
+The idea being that if the test is true, the instruction pointer should move
+to the then block, otherwise the else block will be hit automatically
+(due to the unconditional jump).
+
+Evaluation
+----------
+The evaluation routines are in bc_eval.c, the basic idea is that we can
+simply mmap the bytecode, run straight through it, and complete the processing
+without maintaining a stack.
+
+The processing is done by overlaying a bytecode_input_t array over the mmap.
+This allows addressing elements within the file to be simple. There is
+an instruction pointer which is incremented as each action is performed,
+or as actions/tests are skipped.
+
+Of special note in bc_eval.c is the unwrap_string function which
+will pull a string out of the bytecode, and return the instruction
+pointer at the end of the string.
+
+
+Other things to consider
+------------------------
+
+1 The Bytecode can be extended to contain other extensions. This could require
+regeneration of older scripts. In many cases this can be avoided by putting
+the new commands at the end of the proper enum in bytecode.h
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/database-formats.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/database-formats.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/database-formats.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/database-formats.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,156 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="revision" content="$Id: database-formats.html,v 1.1.2.2 2004/04/19 00:43:52 ken3 Exp $" />
+<meta name="author" content="Ken Murchison" />
+
+<title>Database Formats</title>
+</head>
+
+<body>
+<h1>Database Formats</h1>
+
+<h2>Introduction</h2>
+
+<p>
+This is an attempt to document the cyrus database formats. It should not
+be considered authoritative and is subject to change.</p>
+
+<p> No external tools should make use of this information. The only
+supported method of access to the databases is via the API specific to
+the database and the underlying cyrusdb interface.</p>
+
+<h2>Mailbox List (mailboxes.db)</h2>
+
+<p>
+This database contains the master list of all mailboxes on the
+system. The database is indexed by mailbox name and each data record
+contains the mailbox type, the partition on which the mailbox resides
+and the ACL on the mailbox. The format of each record is as follows:</p>
+
+<pre>
+Key: <Mailbox Name>
+
+Data: <Type Number>SP<Partition>SP<ACL (space-separated userid/rights pairs)>
+</pre>
+
+<h2>Annotations (annotations.db)</h2>
+
+<p>This database contains mailbox and server annotations. The
+database is indexed by mailbox name (empty for server annotations) +
+annotation name + userid (empty for shared annotations) and each data
+record contains the value size, value data, content-type of the data
+and timestamp of the record. The format is each record is as follows:</p>
+
+<pre>
+Key: <Mailbox Name>\0<Annotation Name>\0<Userid>\0
+
+Data: <Value Size (4 bytes)><Value>\0<Content-Type>\0<Timestamp (4 bytes)>
+</pre>
+
+<h2>Quotas (quotas.db)</h2>
+
+<p>This database contains the master list of quotaroots on the
+system. The database is indexed by quota root and each data record
+contains the current usage of all mailboxes under the quota root and
+the limit of the quota root. The format of each record is as
+follows:</p>
+
+<pre>
+Key: <Quota Root>
+
+Data: <Usage (in bytes)>SP<Limit (in Kbytes)>
+</pre>
+
+<h3>Legacy Quotas</h3>
+
+<p>The legacy quota database uses a distributed system in which each
+quota root is stored in a separate file named by quota root and the
+contents has the following format:</p>
+
+<pre>
+<Usage (in bytes)>\n
+<Limit (in Kbytes)>\n
+</pre>
+
+<p>The translation to/from this data record format is handled by the
+quota_legacy cyrusdb backend.<p>
+
+<h2>Duplicate Delivery (deliver.db)</h2>
+
+<p>This database is used for duplicate delivery suppression, retrieving
+usenet articles by message-id, and tracking Sieve redirects and
+vacation responses. The database is indexed by message-id +
+recipient (either mailbox or email address) and each data record
+contains the timestamp of the record and the UID of the message within
+the mailbox (if delivered locally). The format of each record is as
+follows:</p>
+
+<pre>
+Key: <Message-ID>\0<Recipient>\0
+
+Data: <Timestamp (4 bytes)><Message UID (4 bytes)>
+</pre>
+
+<h2>TLS cache (tls_sessions.db)</h2>
+
+<p>This database caches SSL/TLS sessions so that subsequent
+connections using the same session-id can bypass the SSL/TLS
+handshaking, resulting is shorter connection times. The database is
+indexed by session-id and each data record contains the timestamp of
+the record and the ASN1 representation of the session data. The
+format of each record is as follows:</p>
+
+<pre>
+Key: <Session-ID (multi-byte)>
+
+Data: <Timestamp (4 bytes)><Session Data (multi-byte)>
+</pre>
+
+<h2>PTS cache (ptscache.db)</h2>
+
+<p>This database caches authentication state records, resulting in
+shorter authentication/canonicalization times. The database is
+indexed by userid and each data record contains an authentication
+state for the userid. The format of each record is as follows:</p>
+
+<pre>
+Key: <Userid>
+
+Data: <Auth State (multi-byte)>
+</pre>
+
+<h2>Seen State (<userid>.seen)</h2>
+
+This database is a per-user database and maintains the list of
+messages that the user has read in each mailbox. The database is
+indexed by mailbox unique-id and each data record contains the
+database version number, the timestamp of when a message was last
+read, the message unique-id of the last read message, the timestamp of
+the last record change and a list of message unique-ids which have
+been read. The format of each record is as follows:</p>
+
+<pre>
+Key: <Mailbox UID>
+
+Data: <Version>SP<Last Read Time>SP<Last Read UID>SP<Last Change Time>SP<List of Read UIDs>
+</pre>
+
+<h2>Subscriptions (<userid>.sub)</h2>
+
+<p>This database is a per-user database and contains the list of
+mailboxes to which the user has subscribed. The database is indexed
+by mailbox name and each data record contains no data. The format of
+each record is follows:</p>
+
+<pre>
+Key: <Mailbox Name>
+
+Data: None
+</pre>
+
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/hacking
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/hacking?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/hacking (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/hacking Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+This file aims to be a guide to Cyrus coding style/conventions/useful utilities
+for people trying to approach the code in a sane way. It's not well organized
+right now but hopefully that will improve with time ;)
+
+- Memory Allocation:
+ - All cyrus memory allocation should be done through the libcyrus functions.
+ These are all written to correctly call fatal() in the event of an
+ out-of-memory condition.
+ - In addition to xmalloc and xrealloc, we provide replacements for
+ strdup, strndup, and a malloc that will guarantee zeroed block of memory
+ (xzmalloc).
+ - If you are going to need to do a large number of small allocations, and
+ then free them all at once, you should look at the memory pool routines,
+ which are much faster, but will leak memory until you free the entire
+ pool at once.
+
+- strlcpy vs strncpy vs memcpy
+ - use strlcpy when you know the size of the buffer, e.g.:
+ char buf[50];
+ strlcpy(buf, src, sizeof(buf));
+
+ - use memcpy to truncate a string into a buffer you know is large enough.
+ Note that when you do this the resulting buffer will
+ NOT BE NULL TERMINATED.
+ memcpy(buf, src, 4);
+ buf[5] = '\0'
+
+ - you should try to avoid strncpy, since it is much slower than memcpy
+ (it zero-fills the rest of the buffer) and isn't as safe as strlcpy.
+
+ - Use of the functions in this way will reduce the confusion involved in
+ their various behaviors. In other words, this avoids things that look like:
+ strncpy(buf, src, sizeof(buf)-1);
+
+- map_refresh and map_free
+
+ - In many cases, it is far more effective to read a file via the operating
+ system's mmap facility than it is to via the traditional read() and
+ lseek system calls. To this end, Cyrus provides an operating system
+ independent wrapper around the mmap() services (or lack thereof) of the
+ operating system.
+
+ - Cyrus currently only supports read-only memory maps, all writes back
+ to a file need to be done via the more traditional facilities. This is
+ to enable very low-performance support for operating systems which do not
+ provide an mmap() facility via a fake userspace mmap.
+
+ - To create a map, simply call map_refresh on the map (details are in
+ lib/map.h). To free it, call map_free on the same map.
+
+ - Despite the fact that the maps are read-only, it is often useful to open
+ the file descriptors O_RDWR, especially if the file decriptors could
+ possibly be used for writing elsewhere in the code. Some operating
+ systems REQUIRE file descriptors that are mmap()ed to be opened
+ O_RDWR, so just do it.
+
+- Network Functions
+ - Cyrus abstracts socket stream access to a concept we refer to as
+ "prot streams" Prot Streams take care of all of the necessary
+ SASL and TLS/SSL encrpytion that may need to happen before data
+ goes out/comes in from the network. The API is documented in
+ lib/prot.h
+
+- (todo) Authorization Modules
+
+Some general hints that all made it into my 11/15 16:47 commit that I
+think may be generally useful to people hacking on the cyrus source:
+
+- Command line apps should link cli_fatal.o so they all fatal()
+in the same way, unless there is a really good reason they need to do
+something unique.
+- If you call config_init() you must call cyrus_done() before you exit.
+- No one should ever call DB->init() or DB->done() cyrusdb functions
+except for in libcyrus_init()
+- I've been trying to keep #include statements for libcyrus and libimap
+alphabetical, and below any system includes, but this is merely my personal
+style
+- Don't exit at the bottom of main with exit(x) use return instead.
+- For all the command line utilities that need to be sure that they are
+running as cyrus, it should be the first thing they do, and they should
+exit with an appropriate fatal() call
+- All services should have a shut_down call. It should be the ONLY way of
+exiting the application. fatal() should always make an attempt to call
+shut_down() if it can (though it should have a recursive fatal() trap just
+in case). Similarly, commandline utilities probably don't need a shut_down().
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/internationalization.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/internationalization.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/internationalization.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/internationalization.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,460 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<!-- warning this is a UTF-8 file. please don't pretend it's ISO-8859. -->
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="revision"
+content="$Id: internationalization.html,v 1.7 2003/10/22 18:50:05 rjs3 Exp $" />
+<meta name="author" content="Larry Greenfield" />
+
+<title>internationalization</title>
+</head>
+
+<body>
+<h1>charset code</h1>
+
+<h2>introduction</h2>
+
+<p>Cyrus currently transcodes characters to a canonical UTF-8 form for
+searching. The base spec of IMAP4 only requires understanding multiple
+character sets to properly implement SEARCH. Since the base spec came
+out, several extensions have been proposed that require further
+charset support: SORT, THREAD, and the Sieve subsystem. As of this
+writing, Cyrus doesn't correctly support these other commands.</p>
+
+<p>Cyrus currently only believes in 16-bit characters. Technically,
+Unicode has up to 21-bit characters (expressible in UTF-16 and 3-byte
+UTF-8) and ISO 10646 allows up to 31-bit characters (though ISO's
+current policy is to not allocate any characters outside of the 21-bit
+Unicode range). The lower 16-bit characters make up the basic
+multilingual plane (BMP) where the majority of languages live. This
+restriction is apparent in <tt>charset.c:writeutf8()</tt>, the UTF-8
+decoders, and the Unicode canonicalization table used by Cyrus. Since
+Cyrus's known character sets (except for UTF-8) don't contain any
+characters off of the BMP this isn't seen to be a major problem.</p>
+
+<p>Throughout this text, Unicode and ISO 10646 will be used
+interchangible to refer to the 16-bit character set of the BMP,
+regardless of encoding. "Character", unless otherwise specified,
+refers to a single Unicode character <tt>ffff</tt> or under. </p>
+
+<h2>cyrus canonical form</h2>
+
+<p>Since when users search e-mail messages it's much easier for them
+to eliminate false positives than realize there are hits that aren't
+displayed, the Cyrus searching algorithm errs on the side of more
+matches. Before comparing any two strings, Cyrus puts them in a
+canonical form. Logically, the process works as follows:</p>
+
+<ul>
+<li> the input string is translated into a sequence of Unicode
+characters. </li>
+
+<li> each character is transformed into lowercase. (For some
+characters, a single uppercase character may transform into multiple
+lowercase characters.) </li>
+
+<li> each character is fully decomposed. </li>
+
+<li> all whitespace (Unicode general categories starting with
+<tt>Z</tt>) is removed. </li>
+
+<li> combining diacritical marks, such as the accent on é, are
+removed. (These are Unicode characters <tt>0300</tt>-<tt>03ff</tt>.)
+</li>
+
+<li> certain characters are expanded to alternative spellings using
+ASCII characters, such as "æ" to "ae". </li>
+
+<li> the output characters are then encoded in UTF-8. </li>
+
+</ul>
+
+<p>The actual transcoding does all of these steps at once with the aid
+of tables, carefully built at compile-time.</p>
+
+<p>The central part of Cyrus's internationalization support is it's
+transcoding routines in <tt>lib/charset.[ch]</tt>, and
+<tt>lib/chartable.[ch]</tt>. Cyrus's transcoding routines are very
+elegant and very compact, thus somewhat intimidating. During
+compilation, Cyrus builds up a large number of tables (see <a
+href="#mkchartable">mkchartable</a>) and uses them so that it never
+has to consider more than a single octet at a time while outputing the
+Cyrus canonical form for an input string.</p>
+
+<h2>external interface</h2>
+
+<p>
+<tt>lib/charset.h</tt> is the public interface for Cyrus lib clients
+to get character canonicalization and searching support. In contains
+the following functions:</p>
+
+<dl>
+<dt><tt>char *charset_convert(const char *s, int charset, char *buf,
+int bufsz)</tt></dt>
+
+<dd> Given a string <i>s</i> in charset <i>charset</i>, decode it into
+canonical form in <i>buf</i>. <i>buf</i> must be reallocable and
+currently at least size <i>bufsz</i>.</dd>
+
+<dt><tt>char *charset_decode_mimeheader(const char *s, char *buf, int
+bufsz)</tt></dt> <dd> Given a string <i>s</i> containing possible MIME
+encoded substrings (per RFC 2047), decode into canonical form in
+<i>buf</i>. <i>buf</i> must be reallocable and currently at least size
+<i>bufsz</i>.</dd>
+
+<dt><tt>charset_index charset_lookupname(const char *name)</tt></dt>
+<dd> Given <i>name</i> return the Cyrus charset index. 0 always
+represents US-ASCII. The returned charset_index may be saved in a
+file; it is stable and is an integer. If this version of Cyrus does
+not support the charset, <tt>CHARSET_UNKNOWN_CHARSET</tt> is
+returned.</dd>
+
+<dt><tt>comp_pat *charset_compilepat(const char *s)</tt></dt>
+<dd>
+Compiles a NUL-terminated canonicalized string <i>s</i> into a
+Boyer-Moore table for fast searching. I'll describe these <a
+href="#comp_pat">compiled patterns</a> later. </dd>
+
+<dt><tt>void charset_freepat(comp_pat *pat)</tt></dt>
+<dd> Frees a pattern previously return by <tt>charset_compilepat()</tt>.</dd>
+
+<dt><tt>int charset_searchstring(const char *substr, comp_pat *pat,
+ const char *s, int len)</tt></dt>
+<dd> Searches for a canonicalized string <i>substr</i> in the
+ canonicalized string <i>s</i>. <i>s</i> is of length <i>len</i>.
+ <i>substr</i> must have been previously compiled into <i>pat</i>.
+ Returns non-zero for a hit, zero for no match.
+</dd>
+
+<dt><tt>int charset_searchfile(const char *substr, comp_pat *pat,
+ const char *msg_base, int mapnl, int len,
+ charset_index charset, int encoding)</tt></dt>
+
+<dd>
+Searches for the canonicalized string <i>substr</i> with compiled
+pattern <i>pat</i> in a large buffer starting at <i>msg_base</i> of
+length <i>len</i>. The large buffer is of charset <i>charset</i> with
+the encoding <i>encoding</i>. <tt>charset_searchfile()</tt> will
+dynamically unencode and canonicalize the search text looking for
+<i>substr</i>. (If <i>mapnl</i> is set, the buffer has only <tt>\n</tt>
+instead of <tt>\r\n</tt>, but the length assumes that each <tt>\n</tt>
+is dynamically converted to <tt>\r\n</tt>. This feature is deprecated.)
+</dd>
+
+<dt><tt>char *charset_decode_mimebody(const char *msg_base, int len,
+ int encoding, char **buf, int *bufsz,
+ int *outlen)</tt></dt>
+<dd>
+Decode the MIME body part (per RFC 2045) located in the large buffer
+starting at <i>msg_base</i> of length <i>len</i>. The large buffer is of
+encoding <i>encoding</i>. <tt>charset_decode_mimebody()</tt> will decode
+into <i>buf</i>. <i>buf</i> must be reallocable and currently at least size
+<i>bufsz</i>. The number of decoded bytes is returned in <i>outlen</i>.</dd>
+
+<dt><tt>charset_extractfile()</tt></dt>
+<dd> Used by <tt>squatter</tt> and possibly other text indexing engines,
+but not described here.</dd>
+
+</dl>
+
+<h2>the TRANSLATE macro: using the transcoding tables</h2>
+
+<p>The external interface is implemented with the help of the
+<tt>START</tt> and <tt>TRANSLATE</tt> macros:</p>
+
+<dl>
+<dt><tt>void START(struct decode_state *state, const unsigned char
+(*table)[256][4])</tt></dt>
+
+<dd>
+<tt>START</tt> initializes <i>state</i> to be ready for transcoding of the
+charset translation table given with <i>table</i>. The starting active
+table is always the first one in the list passed in.</dd>
+
+<dt><tt>void TRANSLATE(struct decode_state *state, unsigned char
+input, unsigned char *outbuf, unsigned outindex)</tt></dt>
+
+<dd>
+<tt>TRANSLATE</tt> takes four parameters: <i>state</i> is the current
+state of the translation; it must have been initialized with
+<tt>START</tt> and is modified by <tt>TRANSLATE</tt>; <i>input</i> is
+one octet of input from the stream to be transcoded; <i>outbuf</i> is
+a pointer to the start of the buffer to write output characters;
+<i>outindex</i> is the index where this translation should be
+written. The size of <i>outbuf</i> must be at least <i>outindex +
+charset_max_translation</i>.
+</dd>
+</dl>
+
+<p>Each charset consists of a set of one or more tables; the
+<i>table</i> parameter passed into <tt>START</tt> is the first of
+these tables and the others are adjacent in memory. Characters are
+transcoded by indexing into the active table with <i>input</i> and
+examining the 4 octet translation. The 4 octet translation may consist
+of 0â3 character translations followed by a control code or a
+series of control codes. In effect, the translation for a given octet
+is a mini-program that consists either of UTF-8 octets or control
+codes. One of the control codes RET, END, JSR, or JMP must occur in
+the 4 octet translation.</p>
+
+<h3>control codes</h3>
+
+<p>Control codes are represented by uppercase US-ASCII characters
+since no uppercase characters can appear in the output translation
+(recall that Cyrus canonical form downcases). Any uppercase US-ASCII
+character (<tt>[A .. Z]</tt>) is thus interpreted specially by the
+<tt>TRANSLATE</tt> virtual machine. Any other octet encountered as an
+output translation is presumed to be part of the UTF-8 output
+sequence and copied to the output.</p>
+
+<p>The names of control codes are actually C pre-processor defines to
+uppercase US-ASCII characters. As the mnenomics are easier to
+understand, I use them in discussing their semantics.</p>
+
+<h3>control code reference</h3>
+
+<p><tt>TRANSLATE</tt> recognizes the following "normal" control
+codes:</p>
+
+<dl>
+<dt>XLT</dt>
+
+<dd>This is the first octet of the four octet sequence, indicating
+that the desired translation is larger than 3 UTF-8 octets. The next
+two octets represent an offset to look up in the special
+chartables_long_translations[] table. After that translation is copied
+to the outbuf, the final octet is interpreted (it must be either a RET
+or an END).</dd>
+
+<dt>JSR</dt>
+
+<dd>The <tt>TRANSLATE</tt> virtual machine has a stack, fixed at size
+1. A JSR copies address of the current active table to the stack and
+transitions to the active table given by the next two octets. (For
+instance, table 1 would be the next table after the table given as a
+parameter to <tt>START</tt>.) Translation of the current octet stops
+after encountering a JSR.
+
+<p>JSRs are useful for converting a two octet input character: the
+first octet in the character will make a JSR to some table; the second
+octet will produce a translation and RET to the current table.
+</p>
+
+<p>Since the virtual machine has a fixed size stack, it would be
+highly unusual for the virtual machine to encounter two different JSRs
+without an intervening RET.</p></dd>
+
+<dt>JMP</dt>
+
+<dd> Similiar to JSR, but does not change the stack. It is the
+equivalent of a goto. JMPs are useful to deal with modal input
+character sets (such as an escape in ISO-2022-JP, see <a
+href="#mkchartable">how the tables are generated</a>).</dd>
+
+<dt>RET</dt>
+
+<dd>Indicates that we are done translating this input octet and we should
+return to the previous active table. It might appear as the first of
+the 4 translation octets, in which case this input character
+translates into nothing (it might be whitespace, for instance).</dd>
+
+<dt>END</dt>
+
+<dd>Indicates we are done translating this input octet. When
+<tt>TRANSLATE</tt> is next called, that input octet will be
+interpreted against the current active table; the stack does not
+change. </dd>
+
+</dl>
+
+<p>In addition, it recognizes the following "special" control codes
+for charsets that aren't easily represented by a set of tables, UTF-8
+and UTF-7:</p>
+
+<dl>
+<dt>U7F </dt>
+
+<dd>UTF-7 consists of US-ASCII characters and a special escape
+character that indicates a transition to base-64 encoded UTF-16
+characters. The virtual machine has built in code to handle the base64
+decoding. In UTF-7's base64, 8 input octets result in 3 characters, so
+the tables would be rather large.</dd>
+
+<dt>U7N</dt>
+
+<dd>This indicates that the current octet is the continuation of the
+base-64 section.</dd>
+
+<dt>U83</dt>
+
+<dd>One and two character UTF-8 sequences are handled normally in the
+charset code. To keep the table size down, 3 octet sequences are
+handled specially. U83 indicates that the current input octet is the
+start of a three character sequence. It is also an implicit jump to
+the 2nd table in the UTF-8 sequence, ending this translation.</dd>
+
+<dt>U83_2</dt>
+
+<dd>This input octet 2nd of 3-octet UTF-8 input, with an implicit
+jump to the 3rd table. </dd>
+
+<dt>U83_3</dt>
+
+<dd>3rd octet of a 3-octet UTF-8 input. This produces the output
+characters and has an implicit jump to the 1st table of UTF-8.</dd>
+
+</dl>
+
+<p>Finally, it's useful to mention the special character
+<tt>EMPTY</tt> which is guaranteed not to match any character. It is
+also represented by an uppercase US-ASCII character.
+
+<h2 id="comp_pat">searching and compiled patterns</h2>
+
+<h3>boyer-moore</h3>
+
+<p>brief description of boyer-moore xxx</p>
+
+<h3>cyrus implementation</h3>
+
+<p>why two arrays? us-ascii optimization, really kinda useless now
+xxx</p>
+
+<p>meta-data stored at the end xxx</p>
+
+<h2 id="mkchartable">generating the tables: <tt>mkchartable</tt></h2>
+
+<p>The program <tt>mkchartable</tt> is used to generate the charset
+transcoding tables used by TRANSLATE. These tables are carefully
+constructed so no more than a single octet need be examined at a time;
+this octet results in either an output stream of UTF-8 characters
+being generated or some sort of state change.</p>
+
+<p><tt>mkchartable</tt> uses three different sorts of input files to
+generate these tables. These files are located in the
+<tt>lib/charset</tt> directory.</p>
+
+<h3 id="charset_tables">charset tables</h3>
+
+<p>Each charset file maps a single charset to the corresponding
+Unicode characters. For the US-ASCII and ISO-8859-x character sets
+this is trivial: each input byte corresponds to a single Unicode
+character. (Actually, some ISO-8859-x octets do not map to any Unicode
+character. In that case, the file either does not contain that octet
+or map it to "<tt>????</tt>".)</p>
+
+<p>Other character sets are trickier. For instance, GB-2312 has both
+single and double byte characters, but is still a simple map from
+input character to output character. More complicated are modal
+character encodings. For instance, ISO-2022-JP starts in US-ASCII mode
+and uses <tt>1B</tt> as an escape character followed by another two
+characters to select a new mode.</p>
+
+<p>The input charset labels modes with "<tt>:</tt>" followed by the
+mode name. The starting mode "<tt>US-ASCII</tt>" in ISO-2022-JP is
+preceeded by "<tt>:US-ASCII</tt>". Mode transitions are denoted by a
+Unicode conversion of "<tt>>newmode</tt>" or
+"<tt>:newmode</tt>". To denote that the octet <tt>42</tt> transitions
+into the "<tt>US-ASCII</tt>" mode, the charset file has "<tt>42
+>US-ASCII</tt>". The mode names themselves are arbitrary labels and
+have no effect on the output.</p>
+
+<p>The input charset labels modes with ":" followed by the mode name.
+The mode name is optionally followed by a space and the
+"<tt><</tt>" character. If the "<tt><</tt>" character is
+present, then all translations will be followed by a RET instruction
+instead of an END instruction.</p>
+
+<p>The transition "<tt>>newmode</tt>" results in a JSR instruction
+being generated. A JMP instruction is generated by a transition of
+"<tt>:newmode</tt>".</p>
+
+<p>The input byte can be specified as "<tt>*</tt>". This is used to
+define the "default action" which is used for input bytes that are not
+otherwise defined for the mode. If the default action is not
+explicitly stated, it is a translation to EMPTY.</p>
+
+<h3>unicode data table</h3>
+
+<p>The <tt>unidata2.txt</tt> file is verbatim from the Unicode
+standard. More recent versions should be available <a
+href="http://www.unicode.org/xxx">from their website</a>. Each entry
+in the file describers a Unicode character by the following
+properties, seperated by semicolons:</p>
+
+<ul>
+<li>code point (16-bit character value) in hex</li>
+<li>character name (unused by Cyrus)</li>
+<li>general category, such as whitespace or puncuation</li>
+<li>the canonical combining class (unused)</li>
+<li>bidirection chategory (unused)</li>
+<li>character decomposition</li>
+<li>decimal digit value (unused)</li>
+<li>digit value (unused, and, no, I don't know the difference)</li>
+<li>numeric value including fractions (unused)</li>
+<li>mirrored character (unused)</li>
+<li>Unicode 1.0 name (unused)</li>
+<li>comment (unused)</li>
+<li>upper case equivalent (unused)</li>
+<li>lower case equivalent</li>
+</ul>
+
+<p>In general, Cyrus uses the lower case equivalent if there is one,
+and the decomposed value otherwise.</p>
+
+<h3>unicode fixup table</h3>
+
+<p>The <tt>unifix.txt</tt> file contains Cyrus-specific mappings for
+characters. It overrides the <tt>unidata2.txt</tt> table. Each rule in
+the file is explained with a comment. It's helpful to remember that
+the Unicode general categories starting with <tt>Z</tt> represent
+whitespace, and whitespace is always removed.</p>
+
+<h3>generating <tt>chartable.c</tt></h3>
+
+<p>how <tt>mkchartable</tt> works: collapses the encoding modes, the
+unicode translations, and other normalizations into the output tables
+described above xxx</p>
+
+<h2>for the future</h2>
+
+<h3>Sieve/ACAP comparators</h3>
+
+<h3>adjustable normalization?</h3>
+
+<p>The use of uppercase US-ASCII characters is one of the annoyances
+in trying to generalize the charset transcoding. If we continue to
+restrict the characters under consideration to the BMP, switching to
+UTF-8 control codes that start 4 or 5 byte sequences is possible.</p>
+
+<p>Another possibility is to use a NUL character as an escape
+sequence, though this increases the size of each control code by 1
+octet.</p>
+
+<h3>handle >2 octet input characters</h3>
+
+<h3>make UTF-8 more regular</h3>
+
+<p>consider whether we really need U83, U83_2, U83_3. also consider
+changing <tt>{ U83, 0, 0, 0 }</tt> translations to <tt>{ U83, JMP, 0, 1
+}</tt> sequences to at least eliminate the implicit jump.</p>
+
+<h3>require minimal UTF-8 characters</h3>
+
+<h2>references</h2>
+
+<p>xxx</p>
+
+<ul>
+<li>[UNICODE] Unicode / ISO 10646</li>
+<li>[UTF-8] utf-8 RFC</li>
+<li>[UTF-7] utf-7 RFC</li>
+<li>[BM] boyer-moore</li>
+<li>[ACAP] the comparators reference. see section XXX of RFC 2244.</li>
+</ul>
+
+</body>
+</html>
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/internationalization.html
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/locking
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/locking?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/locking (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/locking Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+$Id: locking,v 1.2 2002/05/25 19:57:43 leg Exp $
+
+In an ideal world, our locking order is:
+
+cyrus.header
+cyrus.index
+quota
+seen
+mailboxes file
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/mailbox-format.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/mailbox-format.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/mailbox-format.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/mailbox-format.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,466 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="revision" content="$Id: mailbox-format.html,v 1.3.2.7 2006/03/31 19:22:10 murch Exp $" />
+<meta name="author" content="Rob Siemborski" />
+
+<title>mailbox format</title>
+</head>
+
+<body>
+<h1>mailbox format</h1>
+
+<h2>intro</h2>
+
+<p>
+This is an attempt to document the cyrus mailbox format. It should not
+be considered authoritative and is subject to change.</p>
+
+<p> No external tools should make use of this information. The only
+supported method of access to the mail store is through the standard
+interfaces: IMAP, POP, NNTP, LMTP, etc.</p>
+
+<p>
+A cyrus mailbox is a directory in the filesystem. It contains the
+following files:</p>
+
+<ul>
+<li> Zero or more message files </li>
+<li> the <tt>cyrus.header</tt> metadata file </li>
+<li> the <tt>cyrus.index</tt> metadata file </li>
+<li> the <tt>cyrus.cache</tt> metadata file </li>
+<li> zero or one <tt>cyrus.expunge</tt> metadata file </li>
+<li> zero or one <tt>cyrus.squat</tt> search indexes </li>
+<li> zero or more subdirectories </li>
+</ul>
+
+<h2>message files</h2>
+
+<p>
+The message files are named by their UID, followed by a ".", so UID 423
+would be named "<tt>423.</tt>". They are stored in wire-format: lines
+are terminated by CRLF and binary data is not allowed.</p>
+
+<h2><tt>cyrus.header</tt></h2>
+
+<p>This file contains mailbox-wide information that does not change that
+often. Its format:</p>
+
+<pre>
+<Mailbox Header Magic String>
+<Quota Root>\t<Mailbox Unique ID String>\n
+<Space-separated list of user flags>\n
+<Mailbox ACL>\n
+</pre>
+
+<h2><tt>cyrus.index</tt>, <tt>cyrus.expunge</tt> and <tt>cyrus.cache</tt></h2>
+
+<p>xxx not just caches; the index file stores stuff not present in the
+message file! </p>
+
+<p>
+These files cache frequently accessed information on a per-message basis.
+The index file holds fixed-length records on a per-message basis (and
+a header for the mailbox of related metadata), while the cache
+file holds variable-length information.</p>
+
+<p> Any binary data in these files is stored in network byte order.
+All of the binary data is also 4-byte aligned. Strings in the
+<tt>cyrus.cache</tt> are stored NUL-terminated (this only applies to
+<tt>cyrus.cache</tt>). To ensure alignment of following data, the end
+of strings may be NUL-padded by up to 4 bytes.</p>
+
+<p> The cyrus.expunge file has the exact same format as cyrus.index,
+and holds the records of expunged messages which have yet to have their
+corresponding cache records and messages files deleted.</p>
+
+<p>
+The overall format of these files looks sort of like this:</p>
+
+<pre>
+cyrus.index:
++----------------+
+| Mailbox Header |
++----------------+
+| Msg: Seq Num 1 |
++----------------+
+| Msg: Seq Num 2 |
++----------------+
+| ... |
++----------------+
+</pre>
+
+<p> The basic idea being that there is one header, and then all the
+message records are evenly spaced throughout the file. All of the
+message records are at well-known offsets, making any part of the file
+accessable at roughly equal speed.</p>
+
+<pre>
+cyrus.cache:
+
++------------------------------------------------------------------------+
+|Gen # (32bits)|Size 1 (32bits)|Data 1 |
++------------------------------------------------------------------------+
+| |Size 2 (32bits)|Data 2 |Size 3 (32bits)| Data 3 |
++------------------------------------------------------------------------+
+| ..... |
++------------------------------------------------------------------------+
+</pre>
+
+<p>
+The cache file is different from the index file. It starts with a 4
+byte header (the generation number—more on that later), then it
+has a whole bunch of entries in (size)(data) format. The entries for
+each message are always consecutive, and in the same order (i.e. for
+any given message, the envelope is always the first bit of data), but
+there is no way to tell (without use of an offset from the index file)
+what message starts where.
+</p>
+
+<h3>detail of <tt>cyrus.index</tt> header</h3>
+
+<p>The index header contains the following information, in order:</p>
+
+<dl>
+<dt>
+Generation Number (4 bytes)</dt>
+<dd>A number that is basically the "revision number" of the mailbox. It must
+ match between the cache and index files. This is to ensure that if we
+ fail to sync both the cache and index files and a crash happens (so that
+ only one is synced), we do not provide bad data to the user.</dd>
+
+<dt>Format (4 bytes)</dt>
+<dd>Basically obsolete (indicates netnews or regular).</dd>
+
+<dt>Minor Version (4 bytes)</dt>
+<dd>Indicates the version number of the index file. This can be used
+ for on-the-fly upgrades of the index and cache files.</dd>
+
+<dt>Start Offset (4 bytes)</dt>
+<dd> Size of index header.</dd>
+
+<dt>Record Size (4 bytes)</dt>
+<dd> Size of an index record.</dd>
+
+<dt>Exists (4 bytes)</dt>
+<dd> How many messages are in the mailbox.</dd>
+
+<dt>Last Appenddate (4 bytes)</dt>
+<dd> (time_t) of the last time a message was appended</dd>
+
+<dt>Last UID (4 bytes)</dt>
+<dd> Highest UID of all messages in the mailbox (UIDNEXT - 1).</dd>
+
+<dt>Quota Mailbox Used (8 bytes)</dt>
+<dd> Total amount of storage used by all of the messages in the mailbox.
+Platforms that don't support 64-bit integers only use the last 4 bytes.</dd>
+
+<dt>POP3 Last Login (4 bytes)</dt>
+<dd> (time_t) of the last pop3 login to this INBOX, used to enforce
+the "poptimeout" <tt>imapd.conf</tt> option.</dd>
+
+<dt>UIDvalidity (4 bytes)</dt>
+<dd>The UID validitiy of this mailbox. Cyrus currently uses the
+<tt>time()</tt> when this mailbox was created.</dd>
+
+<dt>Deleted, Answered, and Flagged (4 bytes each)</dt>
+<dd> Counts of how many messages have each flag.</dd>
+
+<dt>Mailbox Options (4 bytes)</dt>
+
+<dd> Bitmask of mailbox options, consisting of any combination of the
+following:
+<dl>
+<dt>POP3_NEW_UIDL</dt>
+
+<dd> Flag signalling that we're using
+"<em>uidvalidity</em>.<em>uid</em>" instead of just "<em>uid</em>" for
+the output of the POP3 UIDL command.</dd>
+
+<dt>IMAP_CONDSTORE</dt>
+
+<dd> Flag signalling that we're supporting the IMAP CONDSTORE
+extension on the mailbox.</dd>
+</dl>
+</dd>
+
+<dt>Leaked Cache (4 bytes)</dt>
+<dd> Number of leaked records in the cache file.</dd>
+
+<dt>HighestModSeq (8 bytes)</dt>
+
+<dd> Highest Modification Sequence of all the messages in the
+mailbox (CONDSTORE).</dd>
+</dl>
+
+<p>
+There are also spare fields in the index header, to allow for future
+expansion without forcing an upgrade of the file.</p>
+
+<h3>detail of <tt>cyrus.index</tt> records</h3>
+
+<p>These records start immediately following the <tt>cyrus.index</tt>
+header, and are all fixed size. They are in-order by sequence number
+of the message.</p>
+
+<dl>
+<dt>UID (4 bytes)</dt>
+<dd> UID of the message</dd>
+
+<dt>INTERNALDATE (4 bytes)</dt>
+<dd>INTERNALDATE of the message</dd>
+
+<dt>SENTDATE (4 bytes)</dt>
+<dd> Contents of the Date: header normalized to a Unix time_t.</dd>
+
+<dt>SIZE (4 bytes)</dt>
+<dd> Size of the whole message (in octets)</dd>
+
+<dt>HEADER SIZE (4 bytes)</dt>
+<dd> Size of the message header (in octets)</dd>
+
+<dt>CONTENT_OFFSET (4 bytes)</dt>
+<dd>Offset into the message file where the message content begins.</dd>
+
+<dt>CACHE_OFFSET (4 bytes)</dt>
+<dd>Offset into the cache file for the beginning of this message's
+ cache entry.</dd>
+
+<dt>LAST UPDATED (4 bytes)</dt>
+<dd>(time_t) of the last time this record was changed</dd>
+
+<dt>SYSTEM FLAGS (4 bytes)</dt>
+<dd> Bitmask showing which system flags are set/unset</dd>
+
+<dt>USER FLAGS (MAX_USER_FLAGS / 32 bytes)</dt>
+<dd> Bitmask showing which user flags are set/unset</dd>
+
+<dt>CONTENT_LINES (4 bytes)</dt>
+<dd> Number of text lines contained in the message content (body).</dd>
+
+<dt>CACHE_VERSION (4 bytes)</dt>
+<dd>Indicates the version number of the cache record for the message
+(determines which headers are cached).</dd>
+
+<dt>UUID (MESSAGE_UUID_SIZE bytes)</dt>
+<dd>Universal UID of the message (used by replication code).</dd>
+
+<dt>MODSEQ (8 bytes)</dt>
+<dd>Modification Sequence of the message (CONDSTORE).</dd>
+</dl>
+
+<h3><tt>cyrus.cache</tt> file format detail</h3>
+
+<p>
+The order of fields per record in the cache file is as follows:
+(keep in mind that they are all preceeded by a 4 byte network byte order
+size).</p>
+
+<dl>
+<dt>Envelope Response</dt>
+<dd> Raw IMAP response for a request for the envelope.</dd>
+
+<dt>Bodystructure Response</dt>
+<dd> Raw IMAP response for a request for the bodystructure.</dd>
+
+<dt>Body Response</dt>
+<dd> Raw IMAP response for an (old style) request for the body.</dd>
+
+<dt>Binary Bodystructure</dt>
+<dd><p>
+ Offsets into the message file to pull out various body parts. Because
+ of the nature of MIME parts, this is somewhat recursive.</p>
+
+<p>
+ This looks like the following (starting the octet following the cache
+ field size). All of the fields are bit32s.</p>
+
+<pre>
+ [
+ [Number of message parts+1 for the rfc822 header if present]
+ [
+ [Offset in the message file of the header of this part]
+ [Size (octets) of the header of this part]
+ [Offset in the message file of the content of this part]
+ [Size (octets) of the content of this part]
+ [Encoding Type of this part]
+ ]
+ (repeat for each part as well as once for the headers)
+ [zero *or* number of sub-parts in the case of a multipart.
+ if nonzero, this is a recursion into the top structure]
+ (repeat for each part)
+ ]
+</pre>
+
+<p>
+ Note if this is not a message/rfc822, than the values for the sizes
+ of the part 0 are -1 (to indicate that it doesn't exist). Sub-parts are
+ not possible for a part 0, so they aren't included when finding recursive
+ entries.
+</p>
+
+<p>
+ The offset and size info for both the mime header and content part are
+ useful in order to do fast indexing on the appropriate parts of the
+ message file when a client does a FETCH request for BODY[HEADER],
+ or BODY[2.MIME].
+</p>
+
+<p>
+ Note that the top level RFC822 headers are a treated as a
+ separate part from their body text ("0" or "HEADER").
+</p>
+
+<p>
+ In the case of a multipart/alternative, the content size & offset
+ refers to the size of the entire mime part.
+</p>
+
+<p>
+ A very simple message (with a single text/plain part) would therefore
+ look like:
+</p>
+
+<pre>
+ [[2][rfc822 header][text/plain body part info][0]]
+</pre>
+
+<p>
+ A simple multipart/alternative message might look like:
+</p>
+
+<pre>
+ [[3][rfc822 header][text/plain message part info]
+ [second message part info][0][0]]
+</pre>
+
+<p>
+ A message with an attachment that has two subparts:
+</p>
+
+<pre>
+ [[3][rfc822 header info][rfc822 first body part info][attachment info][0][
+ [3][NIL header info][sub part 1 info][sub part 2 info][0][0]]]
+</pre>
+
+<p>
+ A message with an attached message/rfc822 message with the following
+ total structure:
+</p>
+
+<pre>
+ message/rfc822
+ 0 headers; content-type: multipart/mixed
+ 1 text/plain
+ 2 message/rfc822
+ 0 headers; content-type: multipart/alternative
+ 1 text/plain
+ 2 text/html
+</pre>
+
+<pre>
+ [[3][rfc822 header part 0][text/plain part 1][overall attachment info][0][
+ [3][rfc822 header part 2.0][text/plain part 2.1][text/html part 2.2]
+ [0][0]]]
+</pre>
+
+</dd>
+
+<dt>Cache Header</dt>
+<dd>
+<p>
+ Any cached header fields. These are in the same format they would
+ appear in the message file:
+</p>
+
+<pre>
+ HeaderName: headerdata\r\n
+</pre>
+
+<p>
+ Examples include: References, In-Reply-To, etc.
+</p>
+</dd>
+
+<dt>From</dt>
+<dd> The from header.</dd>
+
+<dt>To</dt>
+<dd> The to header.</dd>
+
+<dt>Cc</dt>
+<dd> The CC header.</dd>
+
+<dt>Bcc</dt>
+<dd> The BCC header.</dd>
+
+<dt>Subject</dt>
+<dd> The Subject header.</dd>
+</dl>
+
+<h2>notes</h2>
+
+<ul>
+<li> Expunge is very slow (it requires rewriting both the cache and
+ index file in addition to the unlinks; this is very painful on
+ synchronous filesystems)</li>
+
+<li> Append is relatively fast (it only adds to the end of both the
+ cache and index files and modifies the index header)</li>
+
+<li> Message delivery is something like this:
+
+<ol>
+<li> write/sync message file</li>
+<li> write/sync new <tt>cyrus.index</tt> record</li>
+<li> write/sync new <tt>cyrus.cache</tt> record</li>
+<li> calculate, write, sync new <tt>cyrus.index</tt> header</li>
+<li> acknowledge message delivery</li>
+</ol>
+
+<p>The message isn't delivered until the new index header is written. In
+case of a crash before the new index header is written, any previous
+writes will be overwritten on the next delivery (and will not be
+noticed by the readers).</p>
+
+<p>Note that certain power failure situations (power failure in the
+middle of a disk sector write) could cause a mailbox to need
+reconstruction (possibly even losing some flag state). These failure
+modes are not possible in the "Hardware RAID disk model" (which we
+will describe somewhere else when we get around to it).</p>
+</li>
+
+</ul>
+
+<h2>Future considerations</h2>
+
+<ul>
+<li> Cache all header fields? (or all up to Xk?) This could greatly improve
+ speeds of clients that just ask for everything, but also increases the
+ expense of rewriting the cache file (as well as the size it takes
+ on disk).</li>
+
+<li> Reformat cache file to use a (size)(size)(size)(size)(data)(data)(data)
+ format. This makes accesses anywhere in the cache file equally fast,
+ as opposed to having to iterate through all the entires for a given
+ message to get to the last one. Note that either way is still O(1)
+ so maybe it doesn't matter much.</li>
+
+<li> Can we do better with expunge if we don't rewrite the cache file as often?
+ (instead, allow it to accumulate dead data, and only once in a while
+ sweep through and clear out the dead data). This should be fine
+ from a correctness standpoint since if we eliminate the index record we
+ just don't have a pointer to the cache file data anymore.</li>
+
+<li> It would be useful to store a uniqueid -> mailbox name index, so that
+ we could fix arbitron again.</li>
+
+</ul>
+
+</body>
+</html>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/master-state-machine.fig
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/master-state-machine.fig?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/master-state-machine.fig (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/master-state-machine.fig Sat Aug 26 02:00:13 2006
@@ -1,0 +1,177 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+6 3375 2550 4650 3900
+6 3375 2550 4650 3825
+4 0 0 50 -1 0 12 0.7854 4 180 1500 3516 3741 SIGCHLD(service)\001
+-6
+4 0 0 50 -1 0 12 0.7854 4 135 675 3675 3900 nactive--\001
+-6
+6 4050 9525 4950 9900
+4 0 0 50 -1 0 12 0.0000 4 135 855 4050 9675 Connection\001
+4 0 0 50 -1 0 12 0.0000 4 90 660 4050 9900 nconn++\001
+-6
+6 2625 6900 3975 8175
+6 2700 6900 3975 8175
+4 0 0 50 -1 0 12 5.4978 4 180 1500 2797 7041 SIGCHLD(service)\001
+-6
+4 0 0 50 -1 0 12 5.4978 4 135 675 2638 7200 nactive--\001
+-6
+6 2100 450 4350 900
+4 0 0 50 -1 0 12 0.0000 4 180 2205 2100 600 Child in illegal state detected\001
+4 0 0 50 -1 0 12 0.0000 4 180 1770 2100 825 (via message handling)\001
+-6
+6 11100 3450 13125 3825
+4 0 0 50 -1 0 12 0.0000 4 180 1965 11100 3600 ConnectionMulti(service)\001
+4 0 0 50 -1 0 12 0.0000 4 90 660 11100 3825 nconn++\001
+-6
+6 8100 5850 9450 7350
+4 0 0 50 -1 0 12 0.7854 4 180 1605 8210 7116 Unavailable(service)\001
+4 0 0 50 -1 0 12 0.7854 4 180 1155 8369 7275 readyworkers--\001
+-6
+6 8925 6300 10200 7725
+4 0 0 50 -1 0 12 0.7854 4 180 1425 9055 7470 Available(service)\001
+4 0 0 50 -1 0 12 0.7854 4 180 1245 9214 7630 readyworkers++\001
+-6
+6 8100 8250 10125 8700
+4 0 0 50 -1 0 12 0.0000 4 180 1965 8100 8400 ConnectionMulti(service)\001
+4 0 0 50 -1 0 12 0.0000 4 180 1950 8100 8625 nconn++ readyworkers++\001
+-6
+6 8325 1875 9975 3450
+4 0 0 50 -1 0 12 5.4978 4 180 1965 8484 2016 ConnectionMulti(service)\001
+4 0 0 50 -1 0 12 5.4978 4 90 660 8325 2175 nconn++\001
+-6
+6 11175 9075 12900 9825
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
+ 11175 9225 11850 9225
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
+ 11175 9525 11850 9525
+2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
+ 11175 9825 11850 9825
+4 0 0 50 -1 0 12 0.0000 4 135 975 11925 9825 Initial States\001
+4 0 0 50 -1 0 12 0.0000 4 180 795 11925 9525 Messages\001
+4 0 0 50 -1 0 12 0.0000 4 180 555 11925 9225 Signals\001
+-6
+6 9750 375 12825 1350
+4 0 0 50 -1 0 36 0.0000 4 495 2925 9750 750 Cyrus Master\001
+4 0 0 50 -1 0 36 0.0000 4 375 3060 9750 1350 State Machine\001
+-6
+6 8100 9075 9975 9525
+4 0 0 50 -1 0 12 0.0000 4 180 1560 8100 9225 Connection(service)\001
+4 0 0 50 -1 0 12 0.0000 4 180 1860 8100 9450 nconn++ readyworkers--\001
+-6
+6 10050 2400 12000 2775
+4 0 0 50 -1 0 12 0.0000 4 180 1935 10050 2550 New Service (nactive++)\001
+4 0 0 50 -1 0 12 0.0000 4 135 645 10050 2775 or Event\001
+-6
+6 3375 4200 5325 4725
+4 0 0 50 -1 0 12 -0.0000 4 180 1875 3446 4628 nactive-- readyworkers--\001
+4 0 0 50 -1 0 12 -0.0000 4 180 1500 3446 4403 SIGCHLD(service)\001
+-6
+6 6750 2475 7125 4050
+4 0 0 50 -1 0 12 1.5708 4 180 1560 6900 4050 Connection(service)\001
+4 0 0 50 -1 0 12 1.5708 4 90 660 7125 4050 nconn++\001
+-6
+2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
+ 7200 2325 7200 1125 5175 1125 5175 2325 7200 2325
+2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
+ 2850 5700 2850 4500 825 4500 825 5700 2850 5700
+2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
+ 12075 5775 12075 4575 10050 4575 10050 5775 12075 5775
+2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
+ 7200 9225 7200 8025 5175 8025 5175 9225 7200 9225
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5175 1275 1425 4500
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5175 8325 2325 5700
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5175 8850 1800 5700
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 10050 4800 2850 4800
+2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 5
+ 1 1 1.00 60.00 120.00
+ 1350 5700 1350 6300 525 6300 525 5325 825 5325
+2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 975 2250 975 4500
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 5
+ 1 1 1.00 60.00 120.00
+ 1575 5700 1575 6675 300 6675 300 5100 825 5100
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7200 2025 10350 4575
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7275 1575 10875 4575
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5175 1875 2250 4500
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 10050 5400 2850 5400
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 10200 5775 7200 8325
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 7200 8400 7200 8625 10500 5775
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 7200 8775 10425 8775 10950 5775
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 5
+ 1 1 1.00 60.00 120.00
+ 5700 9225 5700 9975 3975 9975 3975 9000 5175 9000
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 5
+ 1 1 1.00 60.00 120.00
+ 5850 9225 5850 9975 7575 9975 7575 9075 7200 9075
+2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 3975 750 5475 750 5475 1125
+2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 6300 750 5775 750 5775 1125
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 5
+ 1 1 1.00 60.00 120.00
+ 11400 4575 11400 3900 13050 3900 13050 4875 12075 4875
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 11175 5775 10725 8925 7200 8925
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 5
+ 1 1 1.00 60.00 120.00
+ 11325 5775 11325 6450 13050 6450 13050 5550 12075 5550
+2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 10800 2700 10800 4125 11250 4575
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 5550 2325 5550 8025
+2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6600 2325 6600 8025
+4 0 0 50 -1 0 24 0.0000 4 255 765 1350 5250 Dead\001
+4 0 0 50 -1 0 24 0.0000 4 255 1470 5475 1875 Unknown\001
+4 0 0 50 -1 0 24 0.0000 4 330 750 5775 8775 Busy\001
+4 0 0 50 -1 0 24 0.0000 4 330 915 10500 5325 Ready\001
+4 0 0 50 -1 0 12 0.0000 4 180 465 675 6150 (Any)\001
+4 0 0 50 -1 0 12 0.0000 4 180 1425 450 1875 Unregistered Child\001
+4 0 0 50 -1 0 12 0.0000 4 135 795 675 2100 SIGCHLD\001
+4 0 0 50 -1 0 12 0.0000 4 135 795 375 6900 SIGCHLD\001
+4 0 0 50 -1 0 12 0.7854 4 180 1545 2850 3225 SIGCHLD(!service)\001
+4 0 0 50 -1 0 12 5.4978 4 180 1545 3300 6450 SIGCHLD(!service)\001
+4 0 0 50 -1 0 12 0.0000 4 135 900 6075 9900 Unavailable\001
+4 0 0 50 -1 0 12 0.0000 4 180 2220 6375 825 Message from unknown child\001
+4 0 0 50 -1 0 12 0.0000 4 180 1425 11550 6300 Available(service)\001
+4 0 0 50 -1 0 12 5.4978 4 180 1425 7950 3000 Available(service)\001
+4 0 0 50 -1 0 12 0.0000 4 180 2895 9900 1650 based on a sketch by hmh at debian.org\001
+4 0 0 50 -1 0 12 -0.0000 4 180 1545 3450 5700 SIGCHLD(!service)\001
+4 0 0 50 -1 0 12 1.5708 4 180 1605 5775 4050 Unavailable(service)\001
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot-events
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot-events?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot-events (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot-events Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+Return-Path: <ken at oceana.com>
+Received: from mail3.andrew.cmu.edu ([unix socket])
+ by mail3.andrew.cmu.edu (Cyrus v2.1.1-053) with LMTP; Sun, 03 Feb 2002 10:37:49 -0500
+X-Sieve: CMU Sieve 2.0
+Received: from mx1.andrew.cmu.edu (MX1.ANDREW.CMU.EDU [128.2.10.111])
+ by mail3.andrew.cmu.edu (8.12.2.Beta3/8.12.2.Beta3) with ESMTP id g13FbmZ5001152
+ for <leg+ at mail3.andrew.cmu.edu>; Sun, 3 Feb 2002 10:37:48 -0500 (EST)
+Received: from eagle.oceana.com (eagle.oceana.com [208.17.123.12])
+ by mx1.andrew.cmu.edu (8.12.2.Beta3/8.12.2.Beta3) with ESMTP id g13FblJw022603
+ for <leg+ at andrew.cmu.edu>; Sun, 3 Feb 2002 10:37:47 -0500
+Received: from oceana.com (ppp4.oceana.com [192.168.10.246])
+ by eagle.oceana.com (8.12.2/8.12.2) with ESMTP id g13FbkNT024933
+ for <leg+ at andrew.cmu.edu>; Sun, 3 Feb 2002 10:37:47 -0500
+Message-ID: <3C5D5966.C5318D4C at oceana.com>
+Date: Sun, 03 Feb 2002 10:38:14 -0500
+From: Ken Murchison <ken at oceana.com>
+Organization: Oceana Matrix Ltd.
+X-Mailer: Mozilla 4.79 [en] (Win98; U)
+X-Accept-Language: en,pdf
+MIME-Version: 1.0
+To: Lawrence Greenfield <leg+ at andrew.cmu.edu>
+Subject: Re: prot events
+References: <200202030504.g1354Zm0002888 at smtp5.andrew.cmu.edu>
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+
+
+Lawrence Greenfield wrote:
+>
+> Can you give me some details on how the event API in the prot layer
+> works? I'm a little unclear about the memory management, what should
+> be returned from the event callback,
+
+Either the event pointer (if the event is still active), or NULL (if the
+event has been removed by the callback).
+
+> and how to reschedule an event.
+
+Simply set the 'mark' time in the event to the wall time you want it to
+run again.
+
+> (I'd like to make an event called every X seconds of idle time; I know
+> the API can't do exactly that but I suspect I can fake it well enough.)
+
+Look at backend_timeout() in proxyd.c and/or drac_ping() in
+contrib/drac_auth.patch, they do exactly this.
+
+The API is pretty simple:
+
+- use prot_addwaitevent() to add an event (linked list) callback onto a
+stream. takes the stream, the 'mark' time at which to run the event
+(NOT an interval, but the future clock value), the function pointer, and
+a rock to pass to the callback as args, and returns a pointer to the
+event (to use for future removal).
+
+- use prot_removewaitevent() to remove an event. takes the stream and a
+pointer to the event as args.
+
+- the event callback gets the stream, a pointer to the event and the
+rock as args. To reschedule an event, simply set the 'mark' time and
+return the event pointer. If the callback removes the event, then
+return NULL.
+
+
+If you see and flaws in this API, feel free to go ahead and change it.
+
+Ken
+--
+Kenneth Murchison Oceana Matrix Ltd.
+Software Engineer 21 Princeton Place
+716-662-8973 x26 Orchard Park, NY 14127
+--PGP Public Key-- http://www.oceana.com/~ken/ksm.pgp
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/prot.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,93 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<!-- $Id: prot.html,v 1.3 2003/08/06 21:28:05 rjs3 Exp $ -->
+<title>prot layer</title>
+</head>
+<body>
+<h1>prot layer</h1>
+
+<p>The prot layer, defined in <tt>prot.h</tt>, is a stdio
+replacement for network i/o. It does the standard buffering of
+input and output and allows certain operations especially suited
+for request/response protocols like IMAP.</p>
+
+<h2>Events</h2>
+
+<p>The prot layer allows "events" to be associated with each prot
+stream. These events are trigger at the given time or after when
+the protstream is attempted to be read from.</p>
+
+<p>An event is currently represented by the following
+datastructure:</p>
+
+<pre>
+struct prot_waitevent;
+
+typedef struct prot_waitevent *prot_waiteventcallback_t(struct protstream *s,
+ struct prot_waitevent *ev,
+ void *rock);
+
+struct prot_waitevent {
+ time_t mark;
+ prot_waiteventcallback_t *proc;
+ void *rock;
+ struct prot_waitevent *next;
+};
+</pre>
+
+<p>The application is currently allowed to modify <i>mark</i>,
+<i>proc</i>, and <i>rock</i> as desired when there are no active
+calls to a prot function on the stream which this event is
+associated.</p>
+
+The API is as follows:
+
+<ul>
+<li>Use <tt>prot_addwaitevent()</tt> to add an event callback onto
+the stream:
+
+<pre>
+extern struct prot_waitevent *prot_addwaitevent(struct protstream *s,
+ time_t mark,
+ prot_waiteventcallback_t *proc,
+ void *rock);
+</pre>
+
+where <i>s</i> is the stream to add the event to, <i>mark</i> is
+the time to trigger the event, <i>proc</i> is the callback to make,
+and <i>rock</i> is an opaque data item handed to the callback. It
+returns a pointer to the event structure; this is the pointer that
+must be used to remove the event or modify it in some way.</li>
+
+<li>Use <tt>prot_removewaitevent()</tt> to remove an event:
+
+<pre>
+extern void prot_removewaitevent(struct protstream *s,
+ struct prot_waitevent *event);
+</pre>
+
+It requires <i>event</i> to have been returned from
+<tt>prot_addwaitevent()</tt> previously. No further references are
+allowed to <i>event</i> or its fields. <i>event->rock</i> is not
+free'd nor examined in any way. This function may be called while
+inside the callback <i>event->proc()</i>. If an event is removed
+inside of its callback, that callback must return
+<tt>NULL</tt>.</li>
+</ul>
+
+<p>Some common things to do with events:</p>
+
+<ul>
+<li>To reschedule an event <i>ev</i>, simply set <i>ev->mark</i>
+to the next time it should trigger. If currently in
+<i>ev->proc()</i>, it should return <i>ev</i>.</li>
+</ul>
+
+<hr />
+last modified: $Date: 2003/08/06 21:28:05 $
+</body>
+</html>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_examples
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_examples?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_examples (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_examples Sat Aug 26 02:00:13 2006
@@ -1,0 +1,152 @@
+Introduction
+============
+
+The replication system creates a link between two Cyrus mailstores: a
+master and a replica system. Both systems can be live mailstores with
+active users: here in Cambridge we install systems in pairs.
+
+Typically half of the users will be using each system, and each system
+replicates to its partner. In the event of a failover everyone uses the
+remaining system in a pair. This is typically safe as the IMAP/POP/SMTP
+servers define which of the two systems is the live server for any given
+account, and the replica just plays a game of follow my leader.
+
+Occasionally I think about introducing some form of sanity check so that we
+have to explicitly issue a command to the remaining backend system as well
+as the proxies in the event of a failover.
+
+A short example of replication in action
+========================================
+
+Index:
+
+ #: Annotation
+ C: Command issued by client
+ S: Command issued by server
+
+# Authentication between systems is done using SSH key based authentication:
+
+C: $ ssh -x cyrus-2 /usr/local/cyrus/bin/sync_server
+S: * Sync Server v0.0 [EXPERIMENTAL]
+
+# Create new auth_state and ask for all information about given list of
+# folders (namely user.dpc22). Returns:
+#
+# "**" unsolicited response for each mailbox. Returns:
+# Folder UniqueID, Name, ACL, UIDlast, timestamp for last seen update.
+#
+# "*" response for each mail message in folder:
+# UID, UUID, flags (other than \Seen state)
+
+C: user_some dpc22 user.dpc22
+S: ** 6b98205c796c6c61 user.dpc22 \
+S: "dpc22 lrswipcda anonymous 0 " 4151 1062945305
+S: * 1 000000000000000000000000 ()
+S: * 3697 0101003f4c56b00545000000 ()
+S: * 3919 0101003f4c56b04b2900000d ()
+S: * 3937 0101003f4c56b0514900001f ()
+S: * 4066 0101003f4c56b07422000002 ()
+S: * 4089 0101003f4c56b07e56000023 (\answered)
+S: * 4118 0101003f4c56b08328000016 ()
+S: * 4131 0101003f4c56b084d7000002 ()
+S: * 4136 0101003f4c56b087f3000001 ()
+S: * 4140 0101003f4c56b08c9d000026 ()
+S: OK User_Some finished
+
+# Select a folder to work with
+
+C: select user.dpc22
+S: OK 6b98205c796c6c61 4151 1062945305
+
+# Remove message with UID "1" from folder list (message which has been
+# sitting in my inbox since January, has no UUID defined)
+
+C: expunge 1
+S: OK Expunge Complete
+
+# Set some user flags on message UID "4140"
+
+C: setflags 4140 (hello world)
+S: OK Updated flags on 1 messages okay
+
+# Demonstrate that something has changed:
+
+C: status
+S: * 3697 0101003f4c56b00545000000 ()
+S: * 3919 0101003f4c56b04b2900000d ()
+S: * 3937 0101003f4c56b0514900001f ()
+S: * 4066 0101003f4c56b07422000002 ()
+S: * 4089 0101003f4c56b07e56000023 (\answered)
+S: * 4118 0101003f4c56b08328000016 ()
+S: * 4131 0101003f4c56b084d7000002 ()
+S: * 4136 0101003f4c56b087f3000001 ()
+S: * 4140 0101003f4c56b08c9d000026 (hello world)
+S: OK 4151
+
+# Now lets correct the damage that we just inflicted:
+
+C: $ replicate -s cyrus-2 -v -v -m user.dpc22
+S: MAILBOXES user.dpc22
+S: USER_SOME dpc22 user.dpc22
+S: SELECT user.dpc22
+S: SETFLAGS [1 msgs]
+S: UPLOAD [1 msgs]
+S: SETSEEN dpc22 ...
+S: ENDUSER
+
+C: $ ssh -x cyrus-2 /usr/local/cyrus/bin/sync_server
+S: * Sync Server v0.0 [EXPERIMENTAL]
+S: user_some dpc22 user.dpc22
+S: ** 6b98205c796c6c61 user.dpc22 \
+S: "dpc22 lrswipcda anonymous 0 " 4156 1062968731
+S: * 1 000000000000000000000000 ()
+S: * 3697 0101003f4c56b00545000000 ()
+S: * 3919 0101003f4c56b04b2900000d ()
+S: * 3937 0101003f4c56b0514900001f ()
+S: * 4066 0101003f4c56b07422000002 ()
+S: * 4089 0101003f4c56b07e56000023 (\answered)
+S: * 4118 0101003f4c56b08328000016 ()
+S: * 4131 0101003f4c56b084d7000002 ()
+S: * 4136 0101003f4c56b087f3000001 ()
+S: * 4140 0101003f4c56b08c9d000026 ()
+S: OK User_Some finished
+
+# Back where we started: the replication engine reinserted message UID 0
+# which was missing, and removed "hello world" from message UID 4140
+
+Tracking messages between folders
+=================================
+
+# I've just saved a message from my inbox into a folder named "zzz",
+# creating the folder the process.
+
+C: $ replicate -s cyrus-2 -v -v -m user.dpc22 user.dpc22.zzz
+
+Replication action on two MAILBOX objects:
+
+S: MAILBOXES user.dpc22 user.dpc22.zzz
+
+Ask server for contents of the two folders:
+
+S: USER_SOME dpc22 ...
+
+Reserve message with given UUID in user.dpc22 so that it can be moved
+
+S: RESERVE user.dpc22 ...
+
+Remove message from source folder (reserved copy left behind)
+
+S: SELECT user.dpc22
+S: EXPUNGE [1 msgs]
+S: SETSEEN dpc22 ...
+
+Create target folder and copy in message that we reserved (doesn't have to
+be uploaded again)
+
+S: CREATE user.dpc22.zzz 7f6f384c3f5ba99a
+S: "dpc22 lrswipcda anonymous 0 " 0 1062971802
+S: SELECT user.dpc22.zzz
+S: UPLOAD [1 msgs]
+S: SETSEEN dpc22 ...
+S: ENDUSER
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_protocol
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_protocol?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_protocol (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/replication_protocol Sat Aug 26 02:00:13 2006
@@ -1,0 +1,489 @@
+Replication Wire protocol : types
+=================================
+
+ulong::
+ Unsigned long integer 0 <= x <= (2^32)-1
+
+quota_t::
+ EITHER : Unsigned long integer :: 0 <= x <= (2^32)-1
+ OR : Unsigned long long integer :: 0 <= x <= (2^64)-1
+
+time_t::
+ Timestamp (currently 32 bit unsigned integer, offset into Unix epoch)
+
+literal+::
+ {count+}\r\n
+Arbitrary string of count bytes\r\n
+
+astring::
+ Atom or string
+
+qstring::
+ Quoted string
+
+flag_list_t
+ List of system and user flags of the form: (\Deleted \Answered Hello World)
+
+Return values
+=============
+
+Each command sent to the server is a single logical line of arbitrary length
+(literal encoding may make the single logical line span multiple lines).
+
+Responses follow the IMAP three state module:
+
+ OK English text\r\n -- Operation completed okay
+ NO English text\r\n -- Operation failed: reason attached
+BAD English text\r\n -- replication protocol error.
+
+Unsolicited/Multiline responses.
+
+Some commands generate responses which span multiple lines. The final line
+in the response will start "OK", "NO", or "BAD". Intermediate lines will
+all start "*". Some commands may generate structured responses (e.g: a list
+of mailboxes plus all of their contents) where the number of "*" at the
+start of the line defines the structure of the response.
+
+Replication Wire Protocol : Brief text descriptions
+===================================================
+
+The replication protocol defines 32 verbs at the time of writing.
+
+----------------------------------------------------------------------
+
+ADDSUB
+ subscription :: astring
+
+Add string to list of subscription on server.
+
+----------------------------------------------------------------------
+
+ACTIVATE_SIEVE
+ sieve_name :: astring
+
+Activate sieve file of given name for this user.
+
+----------------------------------------------------------------------
+
+CREATE
+ mailboxname :: astring -- e.g: user.dpc22.zzz
+ uniqueid :: astring -- Cyrus UniqueID (currently 64bit hex number)
+ acl :: astring -- Initial ACL for this mailbox
+ mbtype :: int
+ uidvalidity :: ulong
+
+Create mailbox with given name. UniqueID currently derived from
+UIDvalidity and mailbox name, but no guarantee that this will always
+be the case.
+
+Special value "NIL" for ACL means that mailbox has come from UW world or
+some other location without ACL. We construct appropriate default ACL:
+
+ userid --> "lrswipcda"
+ anonymous --> "0" (for FUD daemon)
+
+----------------------------------------------------------------------
+
+CONTENTS
+
+Dump complete contents of current folder to output screen. Used for
+downloading messages from Cyrus into UW world.
+
+Response is series of lines of the form:
+
+ * [uid] [internaldate]
+ [flags :: flag_list_t]
+ [message body :: literal]
+
+followed by final "OK" line. flag_list includes \Seen state for current
+users, unlike STATUS, USER_ALL and USER_SOME.
+
+----------------------------------------------------------------------
+
+DEACTIVATE_SIEVE
+
+Deactivate the active sieve file for this user.
+
+----------------------------------------------------------------------
+
+DELETE
+ mailbox :: astring.
+
+Delete mailbox with given name.
+
+----------------------------------------------------------------------
+
+DELSUB
+ mailbox :: astring
+
+Delete subscription with given name
+
+----------------------------------------------------------------------
+
+DELETE_SIEVE
+ sieve_name :: astring
+
+Delete sieve file with given name.
+
+----------------------------------------------------------------------
+
+EXIT
+
+Shut down sync_server
+
+----------------------------------------------------------------------
+
+EXPUNGE
+ uid0 :: ulong
+ . . .
+ uidn :: ulong
+
+Remove messages matching given list of UIDS from currently selected
+folder. Will return single line "OK Expunge Complete" on success.
+
+----------------------------------------------------------------------
+
+ENDUSER
+
+Unlock current user and call auth_freestate() to discard current
+authentication.
+
+----------------------------------------------------------------------
+
+GET_SIEVE sieve_name :: astring
+
+Get sieve script with given name. Successful response is of form:
+
+OK {%lu+}\r\n
+Sieve script
+\r\n
+
+----------------------------------------------------------------------
+
+INFO
+
+Get meta information for currently selected folder. Response is single line
+of the form:
+
+OK
+ UIDvalidity :: ulong
+ UIDlast :: ulong
+ Flags :: flag_list_t
+
+"INFO" command is almost certainly historical baggage and should be removed.
+
+----------------------------------------------------------------------
+
+LIST
+
+List mail folders for currently selected list. Multiline response of
+the form:
+
+ * [Uniqueid :: astring] [Name :: astring] [Acl :: astring]
+ . . .
+ * [Uniqueid :: astring] [Name :: astring] [Acl :: astring]
+ OK List complete
+
+List command probably obsolete with advent of USER_ALL and USER_SOME
+commands.
+
+----------------------------------------------------------------------
+
+LSUB
+
+List subscriptions for currently selected user. Multiline response of the
+form:
+
+ * [Subscription :: astring]
+ . . .
+ * [Subscription :: astring]
+ OK Lsub complete
+
+----------------------------------------------------------------------
+
+LIST_SIEVE
+
+List available sieve files for currently selected users. Multiline
+response of the form:
+
+ * [Sieve_name :: astring] [*] <-- "*" for active sieve file
+ . . .
+ * [Sieve_name :: astring]
+ OK List_sieve complete
+
+----------------------------------------------------------------------
+
+QUOTA
+ quota_root :: astring
+
+Get quota root information. Response is single line of the form:
+
+OK
+ Limit :: quota_t (Kbytes)
+ Expunged_timeout :: ulong (seconds)
+ Expunged_vol_min :: quota_t (KBytes)
+ Expunged_vol_max :: quota_t (KBytes)
+ Expunged_vol_overflow :: quota_t (KBytes)
+ Mailbox_limit :: ulong (KBytes)
+
+----------------------------------------------------------------------
+
+RENAME
+ old_name :: astring
+ new_name :: astring
+
+Rename mailbox old_name --> new_name
+
+----------------------------------------------------------------------
+
+RESET
+ account :: astring
+
+Reset named account back to initial state. Wipes all of the following:
+ mailboxes
+ subscriptions
+ seen data
+ Sieve files.
+
+----------------------------------------------------------------------
+
+RESERVE
+ mailbox :: astring
+ uuid0 :: ulong
+ . . .
+ uuidn :: ulong
+
+Reserves collection of messages matching list of UUIDs in given mailbox.
+Message data is linked into /var/spool/imap/sync. staging directory
+so that we can later link the messages into other folders even if the
+original has been expunged. Multiline response of the form:
+
+ * [UUID :: astring]
+ . . .
+ * [UUID :: astring]
+ OK Reserve complete
+
+so that client knows which reserve operations have been complete and which
+have failed.
+
+----------------------------------------------------------------------
+
+RESTART
+
+sync_client wants to negotiate a restart to clear up. Clears out all staged
+messages causes by upload and reserve sync_server child process exits
+cleanly, parent forks off a new child to resolve any memory leaks.
+
+Responds:
+ OK restarting.
+
+----------------------------------------------------------------------
+
+SELECT mailbox :: astring
+
+Select named mailbox as current folder (calls mailbox_open()).
+
+----------------------------------------------------------------------
+
+STATUS
+
+Return complete status of currently selected mailbox. Multiline response:
+
+ * [uid :: ulong] [uuid :: astring] [flags :: flag_list]
+ . . .
+ * [uid :: ulong] [uuid :: astring] [flags :: flag_list]
+ OK [last_uid :: ulong]
+
+Believe that this command has been obsoleted by USER_ALL and USER_SOME.
+Occasionally useful for debugging purposes.
+
+----------------------------------------------------------------------
+
+SETFLAGS
+ [
+ uid :: ulong
+ flags :: flag_list_t e.g: (\Deleted \Flagged Hello World)
+ ] +
+
+Set flags for messages with given series of UIDs. SETFLAGS can take
+an arbitrary number of "uid (flags) " pairs on a single line.
+
+----------------------------------------------------------------------
+
+SETSEEN
+ user :: astring
+ lastread :: time_t
+ lastuid :: time_t
+ lastchange :: time_t
+ seenuid :: astring
+
+Update seen database for current selected mailbox + nominated userid.
+seenuid is opaque string used by seendb code. The replication engine
+doesn't attempt to decompose seenuid strings to work out if anything
+has changed, it just uses the lastchange timestamp to work out if
+the seenuid string should be updated.
+
+Successful Response:
+ OK Setseen Succeeded
+
+----------------------------------------------------------------------
+
+SETACL
+ mailbox :: astring
+ acl :: astring
+
+Set ACL on given mailbox. ACL will typically contain tab characters,
+so the astring will be the quoted form e.g:
+
+ "dpc22\ttlrswipcda\tanonymous\t0\t"
+
+----------------------------------------------------------------------
+
+SETQUOTA
+ quotaroot :: astring
+ limit :: quota_t
+ expunged_timeout :: ulong
+ expunged_vol_min :: ulong
+ expunged_vol_max :: ulong
+ expunged_vol_overflow :: ulong
+ mailbox_limit :: ulong (KBytes)
+
+Set limits and overrides for given quota root.
+
+----------------------------------------------------------------------
+
+UPLOAD
+ newlastuid :: ulong
+ last_appenddate :: time_t
+
+ Arbitrary list of messages on single logical line , with three forms:
+
+ SIMPLE # Unparsed message that we need to parse
+ UUID :: astring
+ UID :: ulong # "NIL" => Use UUID 0.
+ internaldate :: time_t
+ sentdate :: time_t
+ last_updated :: time_t
+ flags :: flag_list_t
+ message_text :: literal+
+
+ PARSED # Message plus pre-parsed cyrus.cache entry
+ UUID :: astring
+ UID :: ulong
+ internaldate :: time_t
+ sentdate :: time_t
+ last_updated :: time_t
+ flags :: flag_list_t
+ message_cache :: literal+
+ message_text :: literal+
+
+ COPY # Copy of message which has already
+ UUID :: astring # been UPLOADED or RESERVED
+ UID :: ulong # Message body and cache available
+ internaldate :: time_t # from staging directory
+ sentdate :: time_t
+
+Upload an arbitrary list of messages to the currently selected folder.
+
+Will normally only add messages to the end of the mailfolder in current use
+(and the code has special optimised path for that case). However if
+message list contains UIDs which belong in the middle of a mailbox, or a
+given UID exists on both client and server but the UUID values don't match
+(which normally indicates the two ends have lost sync with each other),
+the the UPLOAD command will merge in new and replacement messages.
+
+Response:
+ OK Upload %lu messages okay
+
+----------------------------------------------------------------------
+
+UIDLAST
+ last_uid :: ulong
+ last_appenddate :: ulong
+
+Update last_uid and last_appenddate timestamps on mailfolder. Typically
+used when new messages have been arrived and then been expunged between
+replication runs. Essentially UPLOAD operation with an empty message list.
+
+----------------------------------------------------------------------
+
+USER
+ user ::astring
+
+Select given user: locks out concurrent access from other replication
+runners and calls auth_newstate to authenticate us as the user in question.
+
+Response:
+ OK Locked [username]
+
+----------------------------------------------------------------------
+
+USER_ALL
+ user ::astring
+
+
+Select given user: locks out concurrent access from other replication
+runners and calls auth_newstate to authenticate us as the user in question.
+
+Response is a complete list of _everything_ in the target account on
+the replica system in a single round trip. Multi line response,
+with various kinds of "*" response indicating different objects.
+Format should be familiar from other commands which examine only a
+portion of the target account.
+
+**** Sieve script. Single line response of the form:
+
+ **** [name :: astring]
+ [last_update :: time_t]
+ [* - if active Sieve]
+
+*** Subscription. Single line response of the form:
+
+ *** [name :: astring]
+
+** Mailbox. Single line response of the form:
+
+ ** [uniqueid :: astring]
+ [name :: astring]
+ [acl :: astring]
+ [lastuid :: ulong]
+ [lastchange :: time_t]
+
+* Message within last mailbox listed as a "**" item. Format is the
+ same as that generated by STATUS command:
+
+ * [uid :: ulong]
+ [uuid :: astring]
+ [flags :: flag_list_t]
+
+Final line of successful response is used to report QUOTA information
+in the same format:
+
+OK
+ Limit :: quota_t (Kbytes)
+ expunged_timeout :: ulong (seconds)
+ expunged_vol_min :: quota_t (KBytes)
+ expunged_vol_max :: quota_t (KBytes)
+ expunged_vol_overflow :: quota_t (KBytes)
+ mailbox_limit :: ulong (KBytes)
+
+----------------------------------------------------------------------
+
+USER_SOME
+ user :: astring
+ mailbox1 :: astring
+ . . .
+ mailboxn :: astring
+
+Similar to USER_ALL command, but only returns mailbox and message lists
+for given set of mailboxes. Doesn't return sieve or subscription info.
+
+----------------------------------------------------------------------
+
+UPLOAD_SIEVE
+ sieve_name :: astring
+ sieve_file :: literal+
+
+Response on success:
+ Upload_sieve completed.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/specials
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/specials?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/specials (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/specials Sat Aug 26 02:00:13 2006
@@ -1,0 +1,30 @@
+This document is supposed to be a repository of "special characters"
+used in Cyrus naming of users, folders, directory paths, etc.
+
+--- Current Uses ---
+Character: +
+ - (LMTP) Separation of postuser and target mailbox for delivery
+ - (LMTP) Separation of username and submailbox for delivery
+ - (IMAP) Flag at end of login name that indicates that LIST should
+ return LSUB results (when imapmagicplus is set)
+ - (POP3) POP a subfolder directly (e.g. rjs3+foo POPs user.rjs3.foo)
+
+Character: . /
+ - [mailbox names] Hierarchy separators
+
+Character: ^
+ - [mailbox names] In unixhierarchysep, ^ is the part of the internal
+ name that represents a '.'
+
+Characters: @ %
+ - [usernames] These are realm separators for the purposes of authentication
+
+--- Future Uses ---
+
+Character: +
+ - IMAP LIST filters (e.g. rjs3+foo will only list folders that match foo*)
+ -- possibly other interpretations here:
+ - rjs3+foo will do an effective chroot(foo.)
+ - rjs3+foo will only list folders in user.rjs3.foo*
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/uuid
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/uuid?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/uuid (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/uuid Sat Aug 26 02:00:13 2006
@@ -1,0 +1,79 @@
+UUID scheme
+===========
+
+The replication system uses cluster wide Globally Unique Message Unique
+Identifies (UUID)s to replicate messages shared by a single instance store,
+to improve the efficiency of the replication engine when moving messages
+between mailboxes and in order to resolve conflicts when the master and
+replica end disagree about the collection of message UIDs in a given
+folder. See ./replication_protocol for details of the replication system.
+
+The UUID system shouldn't be _required_ for replication, but it does make
+the replication system work quite a lot more effectively and reliably.
+
+UUIDs are 96 bit (12 byte) numbers, represented on the wire as 24 hex digits
+(I plan to switch to a 16 digit BASE64 wire representation for efficiency).
+
+UUIDs are stored in network byte ordering (big endian), and the first
+byte in the 12 byte array defines the structure of the remaining 11 bytes.
+At the moment only two UUID schemas are defined.
+
+UUID schema 0 (first byte == 0)
+================================
+
+The only defined value in UUID 0 is the NULL value, where all 12 bytes are
+zero. (any other value with a leading zero byte is illegal). This is the
+NULL UUID, used when UUID values are unavailable. If a message uses the
+NULL UUID as its value, various optimisatations and sanity checks are
+disabled. The same effect is seen if UUIDs are disabled entirely.
+
+UUID schema 1 (first byte == 1)
+===============================
+
+The big idea here is that the Cyrus master process on each system is the
+natural place to allocate blocks of UUIDs to service process.
+
+Service which expect/need UUIDs use an extra option "provide_uuid=1" in the
+cyrus.conf file: see sample cyrus.conf for an example.
+
+If the first byte of a UUID is binary value 1, the remaining bytes define a
+unique message body/text. The remaining 11 bytes are allocated in blocks of
+2^24 UUIDs by the Cyrus master process with the following structure:
+
+struct uuid_info {
+ unsigned short schema; /* 8 bits used */ /* 1 */
+ unsigned short machine; /* 8 bits used */
+ unsigned short timestamp_generation; /* 8 bits used */
+ unsigned long master_start_time; /* 32 bits used */
+ unsigned short child_counter; /* 16 bits used */
+ unsigned long count; /* 24 bits used */
+};
+
+Service applications have no interest in the first 9 bytes in the 12 byte
+sequence: they just treat them as an opaque prefix to a 24 bit counter,
+which can be converted into a 12 byte sequence or 24 digit hex number.
+
+Schema 1 limits us to 256 machines in a cluster and uses the startup time
+of the master process (a 32 bit timestamp) to create a starting value for a
+counter. To protect us from system clocks running backwards, the number
+corresponding to the master start time is recorded in the file
+"/var/imap/master_uuid" and increments slowly as the child_counter
+field overflows (65536 child processes). The master process will refuse to
+start if the current time is less than the timestamp recorded in the
+master_uuid file ("timestamp_generation" can be used as an emergency escape
+mechanism if the system clock consistently jumps backwards):
+
+In normal operation it is very unlikely that we will consistently allocate
+start 65536 child processes every second, so a buffer of available UUID
+ranges accumulates quickly after the master process starts. After a few
+seconds of operation we will normally be protected against clock slews.
+
+Sample /var/imap/master_uuid structure:
+ schema=1 # Constant
+ machine=1 # Should be unique within cluster at
+ # given time to prevent conflicts.
+ timestamp_generation=0 # Emergency escape mechanism
+ master_start_time=1062919294 # 32 bit timestamp should be good til 2070
+ # (and we can always overflow into
+ timestamp_generation or schema then!)
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/var_directory_structure
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/var_directory_structure?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/var_directory_structure (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/internal/var_directory_structure Sat Aug 26 02:00:13 2006
@@ -1,0 +1,63 @@
+Directory structure under /var/spool/imap
+=========================================
+
+stage./
+ Normal staging directory
+
+sync./
+ Staging directory for replication system
+ Includes
+ sync./locks/*
+
+ which are lock files for each user on the system to prevent two
+ replication runs from trying to update the same account at the same time
+ (nothing disasterous should happen even without this lock, but the second
+ job in will get a bit confused if the target end changes under its feet,
+ and will probably drop back to a recovery mode.
+
+user/
+ Familiar user.userid space.
+
+Directory structure under /var/imap
+===================================
+
+Complete list:
+
+ drwxr-xr-x 2 cyrus cyrus 232 Sep 7 08:21 db
+ drwxr-x--- 2 cyrus cyrus 112 Sep 7 19:51 db.backup1
+ drwxr-x--- 2 cyrus cyrus 112 Sep 7 19:21 db.backup2
+ -rw-r----- 1 cyrus cyrus 20799488 Sep 7 19:51 deliver.db
+ drwxr-xr-x 2 cyrus cyrus 48 Sep 7 10:16 log
+ -rw-r----- 1 cyrus cyrus 1995000 Sep 7 19:38 mailboxes.db
+ -rw-r--r-- 1 cyrus cyrus 10 Jun 2 10:08 master_machine
+ -rw-r--r-- 1 cyrus cyrus 71 Sep 7 08:21 master_uuid
+ drwxr-xr-x 2 cyrus cyrus 48 Jun 2 10:08 msg
+ drwxr-xr-x 2 cyrus cyrus 1872 Sep 7 19:55 proc
+ drwxr-xr-x 28 cyrus cyrus 672 Jun 2 10:08 quota
+ drwxr-xr-x 2 cyrus cyrus 224 Sep 7 08:21 socket
+ drwxr-xr-x 2 cyrus cyrus 72 Sep 7 10:19 sync
+ drwxr-xr-x 28 cyrus cyrus 672 Jun 2 10:08 user
+
+Most of that will be familiar. New entries are:
+
+master_machine
+ Defines machine number in replication cluster. Used as sanity check
+ aginst master_uuid file. Sample content:
+
+ machine=1
+
+master_uuid
+ Full information about UUID schema in use. See ./uuid for details.
+ Sample content:
+
+ schema=1
+ machine=1
+ timestamp_generation=0
+ master_start_time=1062919294
+
+sync/current
+ Transaction log from IMAP, POP and LMTP daemons, typically feed into
+ sync_client running as asynchronous replication engine.
+
+ Rotated to be sync/current-<pid> by asychronous runner.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/mailing-list.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/mailing-list.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/mailing-list.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/mailing-list.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> <head>
+<title>info-cyrus mailing list</title>
+<!-- $Id: mailing-list.html,v 1.5 2003/02/24 23:56:23 ken3 Exp $ -->
+</head>
+
+<body>
+<h1>info-cyrus mailing list</h1>
+
+ <p>
+ We run a mailing list for users of Project Cyrus software.
+ The
+ <tt>info-cyrus at andrew.cmu.edu</tt> mailing list exists for the
+ discussion of this server and other Cyrus software. Please do
+ <b>NOT</b> send subscription requests to the list.
+
+<p> <b>To subscribe</b>: Send mail to <a
+href=
+"mailto:majordomo at lists.andrew.cmu.edu?subject=subscribe info-cyrus">
+<TT>majordomo at lists.andrew.cmu.edu</TT></a>
+
+to subscribe with the body of 'subscribe info-cyrus' (or just click
+the link above and that should just work).
+
+<p>An archive is availible via anonymous IMAP at <a
+href="imap://cyrus.andrew.cmu.edu/archive.info-cyrus">
+imap://cyrus.andrew.cmu.edu/archive.info-cyrus</a>.
+
+<p>A web archive is also available at
+<a href="http://asg.web.cmu.edu/archive/mailbox.php3?mailbox=archive.info-cyrus">
+http://asg.web.cmu.edu/archive/mailbox.php3?mailbox=archive.info-cyrus</a>
+
+<p>If you are not subscribed to the list (or you are sending the
+message from a different address than the one which you are subscribed
+under), your message is directed to a human for
+approval. Unfortunately, the human does not always promptly process
+the message.
+
+<p>There is also a developers list available at <tt>cyrus-devel at lists.andrew.cmu.edu</tt>.
+with similar <a href="mailto:majordomo at lists.andrew.cmu.edu?subject=subscribe cyrus-devel">subscription</a>
+methods and <a href="http://asg.web.cmu.edu/archive/mailbox.php3?mailbox=archive.cyrus-devel">
+archive location</a>
+
+<p>Detailed contact information can be found at <a
+href="http://asg.web.cmu.edu/cyrus/contacts.html">
+http://asg.web.cmu.edu/cyrus/contacts.html</a>
+
+<P><HR>
+last modified: $Date: 2003/02/24 23:56:23 $
+<br>
+<A HREF="index.html">Return</A> to the Cyrus IMAP Server Home Page
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,64 @@
+<!-- $Id: man.html,v 1.15.2.3 2005/03/30 21:44:25 ken3 Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Cyrus IMAP Server Man Pages</TITLE>
+</HEAD>
+<BODY>
+<h1>Cyrus IMAP Server Man Pages</h1>
+
+<B>User Commands</B>
+<UL>
+<LI><A HREF="man/cyradm.1.html"><tt>cyradm</TT>(1)</a>
+<LI><A HREF="man/imtest.1.html"><TT>imtest</TT>(1)</A>
+<LI><A HREF="man/installsieve.1.html"><TT>installsieve</TT>(1)</A>
+<LI><A HREF="man/lmtptest.1.html"><TT>lmtptest</TT>(1)</A>
+<LI><A HREF="man/mupdatetest.1.html"><TT>mupdatetest</TT>(1)</A>
+<LI><A HREF="man/nntptest.1.html"><TT>nntptest</TT>(1)</A>
+<LI><A HREF="man/pop3test.1.html"><TT>pop3test</TT>(1)</A>
+<LI><A HREF="man/sieveshell.1.html"><TT>shellsieve</TT>(1)</A>
+<LI><A HREF="man/sivtest.1.html"><TT>sivtest</TT>(1)</A>
+<LI><A HREF="man/smtptest.1.html"><TT>smtptest</TT>(1)</A>
+</UL>
+
+<B>Subroutines</B>
+<UL>
+<LI><A HREF="man/imclient.3.html"><TT>imclient</TT>(3)</A>
+</UL>
+
+<B>File Formats</B>
+<UL>
+<LI><A HREF="man/cyrus.conf.5.html"><tt>cyrus.conf</TT>(5)</a>
+<LI><A HREF="man/imapd.conf.5.html"><TT>imapd.conf</TT>(5)</A>
+<LI><A HREF="man/krb.equiv.5.html"><TT>krb.equiv</TT>(5)</A>
+</UL>
+
+<B>System Administration</B>
+<UL>
+<LI><A HREF="man/arbitron.8.html"><TT>arbitron</TT>(8)</A>
+<LI><A HREF="man/chk_cyrus.8.html"><TT>chk_cyrus</TT>(8)</A>
+<LI><A HREF="man/ctl_cyrusdb.8.html"><TT>ctl_cyrusdb</TT>(8)</A>
+<LI><A HREF="man/ctl_deliver.8.html"><TT>ctl_deliver</TT>(8)</A>
+<LI><A HREF="man/ctl_mboxlist.8.html"><TT>ctl_mboxlist</TT>(8)</A>
+<LI><A HREF="man/cyr_expire.8.html"><TT>cyr_expire</TT>(8)</A>
+<LI><A HREF="man/deliver.8.html"><TT>deliver</TT>(8)</A>
+<LI><A HREF="man/fetchnews.8.html"><TT>fetchnews</TT>(8)</A>
+<LI><A HREF="man/fud.8.html"><TT>fud</TT>(8)</A>
+<LI><A HREF="man/idled.8.html"><TT>idled</TT>(8)</A>
+<LI><A HREF="man/imapd.8.html"><TT>imapd</TT>(8)</A>
+<LI><A HREF="man/ipurge.8.html"><TT>ipurge</TT>(8)</A>
+<LI><A HREF="man/lmtpd.8.html"><TT>lmtpd</TT>(8)</A>
+<LI><A HREF="man/master.8.html"><TT>master</TT>(8)</A>
+<LI><A HREF="man/mbexamine.8.html"><TT>mbexamine</TT>(8)</A>
+<LI><A HREF="man/mbpath.8.html"><TT>mbpath</TT>(8)</A>
+<LI><A HREF="man/nntpd.8.html"><TT>nntpd</TT>(8)</A>
+<LI><A HREF="man/notifyd.8.html"><TT>notifyd</TT>(8)</A>
+<LI><A HREF="man/pop3d.8.html"><TT>pop3d</TT>(8)</A>
+<LI><A HREF="man/quota.8.html"><TT>quota</TT>(8)</A>
+<LI><A HREF="man/reconstruct.8.html"><TT>reconstruct</TT>(8)</A>
+<LI><A HREF="man/smmapd.8.html"><TT>smmapd</TT>(8)</A>
+<LI><A HREF="man/squatter.8.html"><TT>squatter</TT>(8)</A>
+<LI><A HREF="man/syncnews.8.html"><TT>syncnews</TT>(8)</A>
+<LI><A HREF="man/timsieved.8.html"><TT>timsieved</TT>(8)</A>
+<LI><A HREF="man/tls_prune.8.html"><TT>tls_prune</TT>(8)</A>
+<LI><A HREF="man/unexpunge.8.html"><TT>unexpunge</TT>(8)</A>
+</UL>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/arbitron.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/arbitron.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/arbitron.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/arbitron.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,211 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:52 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>ARBITRON</title>
+</head>
+<body>
+
+<h1 align=center>ARBITRON</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>arbitron − arbitron mailboxes</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>arbitron</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−o</b> ] [ <b>−u</b> ] [ <b>−l</b> ] [
+<b>−p</b> <i>months</i> ]<br>
+[ <b>−d</b> <i>days</i> | <b>−D</b>
+<i>mmddyyyy</i>[<b>:</b><i>mmddyyyy</i>] ]
+<i>mailbox</i>...</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Arbitron</i> collects and reports readership
+statistics for mailboxes on the server. It also optionally
+prunes the mailboxes of \Seen state for dormant users.</p>
+<!-- INDENTATION -->
+<p><i>Arbitron</i> produces one line of output per mailbox,
+reporting the mailbox name followed by a space, followed by
+the number of readers (and if -u is specified, followed by a
+colon and a comma-separated list of the readers userids),
+and if -o is not specified, another space and the number of
+subscribers (and if -u is specified, followed by a colon and
+a comma-separated list of the subscribers userids).
+<b>IMPORTANT: This format is subject to change in future
+versions.</b></p>
+<!-- INDENTATION -->
+<p>Each "reader" is a distinct authentication
+identity which has "s" rights to the mailbox and
+which has SELECTed the mailbox within either the past
+<i>days</i> days or the specified date range. Users are not
+counted as reading their own personal mailboxes. Personal
+mailboxes are not reported unless there is at least one
+reader other than the mailboxes owner.</p>
+<!-- INDENTATION -->
+<p><i>Arbitron</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−o</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>"old way" -- do not report subscribers.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−u</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Report userids in addition to the count(s).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−l</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Enable long reporting (comma delimited table consisting
+of mbox, userid, r/s, start time, end time).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−d</b> <i>days</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Count as a reader an authentication identity which has
+SELECTed the mailbox within <i>days</i> days. Default is
+30.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−D</b>
+<i>mmddyyyy</i>[<b>:</b><i>mmddyyyy</i>]</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Count as a reader an authentication identity which has
+SELECTed the mailbox within the given date range. The start
+date and optional end date are specified as 2-digit month of
+the year, 2-digit day of the month, and 4-digit year. If the
+end date is not specified, then the current system time is
+used as the end time.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>months</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Prune \Seen state for users who have not SELECTed the
+mailbox within <i>months</i> months. Default is
+infinity.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/chk_cyrus.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/chk_cyrus.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/chk_cyrus.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/chk_cyrus.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,128 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:52 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>CHK_CYRUS</title>
+</head>
+<body>
+
+<h1 align=center>CHK_CYRUS</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>chk_cyrus − perform a consistency check of the
+cyrus mailstore</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>chk_cyrus</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−P</b> <i>partition</i> ] [ <b>−M</b>
+<i>mailbox</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Chk_cyrus</i> is used to perform a consistency check
+on the cyrus datastore, and output a list of
+files/directories that are expected to exist, but do not.
+Status messagess are output to stderr, the list of
+files/directories is output to stdout. This list can be
+passed to a backup program to aid a partial restoral, for
+instance.</p>
+<!-- INDENTATION -->
+<p><i>Chk_cyrus</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−P</b> <i>partition</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Run the consistency check for only the given partition.
+May not be specified with -M. <b>−M</b> <i>mailbox</i>
+Run the consistency check for only the given mailbox. May
+not be specified with -P.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_cyrusdb.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_cyrusdb.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_cyrusdb.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_cyrusdb.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,148 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:52 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>CTL_CYRUSDB</title>
+</head>
+<body>
+
+<h1 align=center>CTL_CYRUSDB</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>ctl_cyrusdb − perform operations common to all
+Cyrus databases</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ctl_cyrusdb</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−r</b> [ <b>−x</b> ]<b><br>
+ctl_cyrusdb</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−c</b></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Ctl_cyrusdb</i> is used to perform various
+administrative operations on the Cyrus databases.</p>
+<!-- INDENTATION -->
+<p><i>Ctl_cyrusdb</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>. The <i>configdirectory</i> option is used to
+determine the default location of the Cyrus databases.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−r</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Recover the databases after an application or system
+failure. Also performs database cleanup like removing
+mailbox reservations (and any associated mailbox files).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−x</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Used with -r to recover the database only. (Prevents
+database cleanup).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−c</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Checkpoint and archive the databases. Changes to the
+database which are part of committed transactions are
+written to disk. Also, a <i>hot</i> backup of the databases
+is made and inactive log files are removed.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_deliver.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_deliver.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_deliver.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_deliver.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,137 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:52 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>CTL_DELIVER</title>
+</head>
+<body>
+
+<h1 align=center>CTL_DELIVER</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>ctl_deliver − perform operations on the duplicate
+delivery database</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ctl_deliver</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−d</b> [ <b>−f</b> <i>filename</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Ctl_deliver</i> is used to perform various
+administrative operations on the duplicate delivery
+database.</p>
+<!-- INDENTATION -->
+<p><i>Ctl_deliver</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="13%"></td>
+<td width="2%">
+
+<p><b>−d</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Dump the contents of the database to standard output in
+a portable flat-text format.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−f</b> <i>filename</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Use the database specified by <i>filename</i> instead of
+the default (<i>configdirectory</i><b>/deliver.db</b>).</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_mboxlist.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_mboxlist.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_mboxlist.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ctl_mboxlist.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,236 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:52 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>CTL_MBOXLIST</title>
+</head>
+<body>
+
+<h1 align=center>CTL_MBOXLIST</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>ctl_mboxlist − perform operations on the mailbox
+list database</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ctl_mboxlist</b> [ <b>−C</b> <i>config-file</i>
+] <b>−d</b> [ <b>−x</b> ] [ <b>−p</b>
+<i>partition</i> ] [ <b>−f</b> <i>filename</i>
+]<b><br>
+ctl_mboxlist</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−u</b> [ <b>−f</b> <i>filename</i> ]<b><br>
+ctl_mboxlist</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−m</b> [ <b>−a</b> ] [ <b>−w</b> ]<br>
+[ <b>−f</b> <i>filename</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Ctl_mboxlist</i> is used to perform various
+administrative operations on the mailbox list database.</p>
+<!-- INDENTATION -->
+<p><i>Ctl_mboxlist</i> reads its configuration options out
+of the <i>imapd.conf</i>(5) file unless specified otherwise
+by <b>-C</b>. The <i>configdirectory</i> option is used to
+determine the default location of the mailbox list
+database.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="13%"></td>
+<td width="2%">
+
+<p><b>−d</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Dump the contents of the database to standard output in
+a portable flat-text format. NOTE: In Cyrus versions 2.2.13
+and earlier, the dump format did not include the mailbox
+type flags, breaking remote mailboxes (frontends, mupdate
+master, unified backends) when undumped.</p>
+</td>
+<tr valign="top" align="left">
+<td width="13%"></td>
+<td width="2%">
+
+<p><b>−x</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>When performing a dump, remove the mailboxes dumped from
+the mailbox list (mostly useful when specified with -p)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>partition</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>When performing a dump, dump only thise mailboxes that
+live on <i>partition</i></p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−u</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Load the contents of the database from standard input.
+The input MUST be in the format output using the
+<b>−d</b> option. NOTE: Both the old and new formats
+can be loaded, but the old format will break remote
+mailboxes.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−m</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>For backend servers in the Cyrus Murder, synchronize the
+local mailbox list file with the MUPDATE server.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−a</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>When used with -m, assume the local mailboxes file is
+authoritiative, that is, only change the mupdate server, do
+not delete any local mailboxes. USE THIS OPTION WITH CARE,
+as it allows namespace collisions into the murder.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−w</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>When used with -m, print out what would be done but do
+not perform the operations.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−f</b> <i>filename</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Use the database specified by <i>filename</i> instead of
+the default
+(<i>configdirectory</i><b>/mailboxes.db</b>).</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cvt_cyrusdb.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cvt_cyrusdb.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cvt_cyrusdb.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cvt_cyrusdb.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,109 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:52 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>CVT_CYRUSDB</title>
+</head>
+<body>
+
+<h1 align=center>CVT_CYRUSDB</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>cvt_cyrusdb − convert a database file between cyrus
+database formats</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>cvt_cyrusdb</b> [ <b>−C</b> <i>config-file</i> ]
+<old-file> <old-fileformat> <new-file>
+<new-file-format></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>cvt_cyrusdb</i> is used to convert a cyrusdb file
+between different database backends. Note that you should
+not attempt to use the same file for input and output.</p>
+<!-- INDENTATION -->
+<p>Running without any options will list the available
+database backends.</p>
+<!-- INDENTATION -->
+<p><i>cvt_cyrusdb</i> reads any applicable configuration
+options out of the <i>imapd.conf</i>(5) file unless
+specified otherwise by <b>-C</b>. note that the file
+locations are NOT read out of the configuration file, and
+must be supplied on the command line.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyr_expire.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyr_expire.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyr_expire.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyr_expire.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,177 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>CYR_EXPIRE</title>
+</head>
+<body>
+
+<h1 align=center>CYR_EXPIRE</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>cyr_expire − expire messages and duplicate delivery
+database entries</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>cyr_expire</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−E</b> <i>expire-days</i> [ <b>−X</b>
+<i>expunge-days</i> ] [ <b>−v</b> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Cyr_expire</i> is used to expire messages and
+duplicate delivery database entries. <i>Cyr_expire</i> also
+cleanses mailboxes of partially expunged messages (when
+using the "delayed" expunge mode). The expiration
+of messages is controlled by the
+<b>/vendor/cmu/cyrus-imapd/expire</b> mailbox annotation
+which specifies the age (in days) of messages in the given
+mailbox that should be deleted. Any duplicate delivery
+database entries which correspond to the mailbox are also
+deleted at the same frequency.</p>
+<!-- INDENTATION -->
+<p>The value of the <b>/vendor/cmu/cyrus-imapd/expire</b>
+annotation is inherited by all children of the given
+mailbox, so an entire mailbox tree can be expired by seting
+a single annotation on the root of that tree. If a mailbox
+does not have a <b>/vendor/cmu/cyrus-imapd/expire</b>
+annotation set on it (or does not inherit one), then no
+messages are expired from the mailbox.</p>
+<!-- INDENTATION -->
+<p><i>Cyr_expire</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−E</b> <i>expire-days</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Prune the duplicate database of entries older than
+<i>expire-days</i>. This value is only used for entries
+which do not have a corresponding
+<b>/vendor/cmu/cyrus-imapd/expire</b> mailbox
+annotation.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−X</b> <i>expunge-days</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Expunge previously deleted messages older than
+<i>expunge-days</i> (when using the "delayed"
+expunge mode). The default is 0 (zero) days, which will
+expunge <b>all</b> previously deleted messages.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−v</b></p>
+</td>
+<td width="13%"></td>
+<td width="32%">
+
+<p>Enable verbose output.</p>
+</td>
+<td width="39%">
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyradm.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyradm.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyradm.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyradm.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,500 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>cyradm - Cyrus administration shell, alter ego of Cyrus::IMAP::Shell</title>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<link rev="made" href="mailto:root at localhost" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#commands">COMMANDS</a></li>
+ <li><a href="#notes">NOTES</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+ <li><a href="#see_also">SEE ALSO</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>cyradm - Cyrus administration shell, alter ego of Cyrus::IMAP::Shell</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ $ cyradm [--user user] [--[no]rc] [--systemrc file] [--userrc file] \
+ > [--port n] [--auth mechanism] [--tlskey keyfile] [--notls] \
+ > [--server] server</pre>
+<p>but possibly</p>
+<pre>
+ $ perl -MCyrus::IMAP::Shell -e 'run("myscript")'</pre>
+<p>or even (not recommended)</p>
+<pre>
+ use Cyrus::IMAP::Admin::Shell;</pre>
+<pre>
+ run('myscriptname');</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This module implements <strong>cyradm</strong> in Perl. It is a shell around
+<a href="/Cyrus/IMAP/Admin.html">the Cyrus::IMAP::Admin manpage</a>. Commands are provided in both Tcl-compatible
+forms and GNU-style long option forms.</p>
+<p>
+</p>
+<hr />
+<h1><a name="commands">COMMANDS</a></h1>
+<dl>
+<dt><strong><a name="item_authenticate__5b_2d_2dminssf_n_5d__5b_2d_2dmaxssf_"><code>authenticate</code> [<code>--minssf</code> <em>N</em>] [<code>--maxssf</code> <em>N</em>] [<code>--mechanisms</code> <em>list</em>] [<em>user</em>]</a></strong>
+
+<dt><strong><a name="item_auth__5b_2d_2dminssf_n_5d__5b_2d_2dmaxssf_n_5d__5b"><code>auth</code> [<code>--minssf</code> <em>N</em>] [<code>--maxssf</code> <em>N</em>] [<code>--mechanisms</code> <em>list</em>] [<em>user</em>]</a></strong>
+
+<dt><strong><a name="item_login__5b_2d_2dminssf_n_5d__5b_2d_2dmaxssf_n_5d__5"><code>login</code> [<code>--minssf</code> <em>N</em>] [<code>--maxssf</code> <em>N</em>] [<code>--mechanisms</code> <em>list</em>] [<em>user</em>]</a></strong>
+
+<dd>
+<p>Authenticate to server. You must already be connected to a server and
+Cyrus imapd will refuse to allow you to re-authenticate once you have
+authenticated once.</p>
+</dd>
+</li>
+<dt><strong><a name="item_chdir_directory"><code>chdir</code> <em>directory</em></a></strong>
+
+<dt><strong><a name="item_cd_directory"><code>cd</code> <em>directory</em></a></strong>
+
+<dd>
+<p>Change directory. A <code>pwd</code> builtin is not provided, but the default command
+action will run <code>pwd</code> from a shell if invoked.</p>
+</dd>
+</li>
+<dt><strong><a name="item_createmailbox__5b_2d_2dpartition_partition_5d_mail"><code>createmailbox</code> [<code>--partition</code> <em>partition</em>] <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_createmailbox_mailbox_partition"><code>createmailbox</code> <em>mailbox</em> <em>partition</em></a></strong>
+
+<dt><strong><a name="item_create__5b_2d_2dpartition_partition_5d_mailbox"><code>create</code> [<code>--partition</code> <em>partition</em>] <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_create_mailbox_partition"><code>create</code> <em>mailbox</em> <em>partition</em></a></strong>
+
+<dt><strong><a name="item_cm__5b_2d_2dpartition_partition_5d_mailbox"><code>cm</code> [<code>--partition</code> <em>partition</em>] <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_cm_mailbox_partition"><code>cm</code> <em>mailbox</em> <em>partition</em></a></strong>
+
+<dd>
+<p>Create a mailbox on the default or a specified partition. Both old-style
+and getopt-style usages are accepted (combining them will produce an error).</p>
+</dd>
+</li>
+<dt><strong><a name="item_deleteaclmailbox_mailbox_id__5b_2e_2e_2e_5d"><code>deleteaclmailbox</code> <em>mailbox</em> <em>id</em> [...]</a></strong>
+
+<dt><strong><a name="item_deleteacl_mailbox_id__5b_2e_2e_2e_5d"><code>deleteacl</code> <em>mailbox</em> <em>id</em> [...]</a></strong>
+
+<dt><strong><a name="item_dam_mailbox_id__5b_2e_2e_2e_5d"><code>dam</code> <em>mailbox</em> <em>id</em> [...]</a></strong>
+
+<dd>
+<p>Remove ACLs from the specified mailbox.</p>
+</dd>
+</li>
+<dt><strong><a name="item_deletemailbox_mailbox"><code>deletemailbox</code> <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_delete_mailbox"><code>delete</code> <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_dm_mailbox"><code>dm</code> <em>mailbox</em></a></strong>
+
+<dd>
+<p>Delete the specified mailbox.</p>
+</dd>
+<dd>
+<p>Administrators do not have implicit delete rights on mailboxes. Use the
+<strong>setaclmailbox</strong> command to grant the <a href="#item_x"><code>x</code></a> permission to your
+principal if you need to delete a mailbox you do not own.</p>
+</dd>
+<dd>
+<p>Note that the online help admits to an optional host argument. This argument
+is not currently used, and will be rejected with an error if specified; it
+is reserved for IMSP.</p>
+</dd>
+</li>
+<dt><strong><a name="item_disconnect"><code>disconnect</code></a></strong>
+
+<dt><strong><a name="item_disc"><code>disc</code></a></strong>
+
+<dd>
+<p>Disconnect from the current server. The prompt will revert to <code>cyradm></code>.</p>
+</dd>
+</li>
+<dt><strong><a name="item_exit__5bnumber_5d"><code>exit</code> [<em>number</em>]</a></strong>
+
+<dt><strong><a name="item_quit__5bnumber_5d"><code>quit</code> [<em>number</em>]</a></strong>
+
+<dd>
+<p>Exit <strong>cyradm</strong>, optionally with a specific exit status; the exit status of the
+last command will be used if one is not specified.</p>
+</dd>
+</li>
+<dt><strong><a name="item_help__5bcommand_5d">help [command]</a></strong>
+
+<dt><strong><a name="item__3f__5bcommand_5d">? [command]</a></strong>
+
+<dd>
+<p>Show help for <code>command</code> or all commands.</p>
+</dd>
+</li>
+<dt><strong><a name="item_info__5bmailbox_5d"><code>info</code> [<em>mailbox</em>]</a></strong>
+
+<dd>
+<p>Display the mailbox/server metadata.</p>
+</dd>
+</li>
+<dt><strong><a name="item_listaclmailbox_mailbox"><code>listaclmailbox</code> <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_listacl_mailbox"><code>listacl</code> <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_lam_mailbox"><code>lam</code> <em>mailbox</em></a></strong>
+
+<dd>
+<p>List ACLs on the specified mailbox.</p>
+</dd>
+</li>
+<dt><strong><a name="item_listmailbox__5b_2d_2dsubscribed_5d__5bpattern__5br"><code>listmailbox</code> [<code>--subscribed</code>] [<em>pattern</em> [<em>reference</em>]]</a></strong>
+
+<dt><strong><a name="item_list__5b_2d_2dsubscribed_5d__5bpattern__5breferenc"><code>list</code> [<code>--subscribed</code>] [<em>pattern</em> [<em>reference</em>]]</a></strong>
+
+<dt><strong><a name="item_lm__5b_2d_2dsubscribed_5d__5bpattern__5breference_"><code>lm</code> [<code>--subscribed</code>] [<em>pattern</em> [<em>reference</em>]]</a></strong>
+
+<dd>
+<p>List all, or all subscribed, mailboxes matching the specified pattern.
+The pattern may have embedded wildcards <code>'*'</code> or <code>'%'</code>, which match
+anything or anything except the separator character, respectively.</p>
+</dd>
+<dd>
+<p>Mailboxes returned will be relative to the specified reference if one
+is specified. This allows a mailbox list to be limited to a particular
+hierarchy.</p>
+</dd>
+<dd>
+<p>In some cases when the <code>'%'</code> wildcard is used to end a pattern, it may
+match an entry which is not a mailbox but which contains other mailboxes.
+In this case, the entry will be parenthesized to indicate that it is a
+root for other mailboxes, as opposed to a mailbox itself.</p>
+</dd>
+</li>
+<dt><strong><a name="item_listquota_root"><code>listquota</code> <em>root</em></a></strong>
+
+<dt><strong><a name="item_lq_root"><code>lq</code> <em>root</em></a></strong>
+
+<dd>
+<p>List quotas on specified root. If the specified mailbox path does not have
+a quota assigned, an error will be raised; see <em>listquotaroot</em> for a way to
+find the quota root for a mailbox.</p>
+</dd>
+</li>
+<dt><strong><a name="item_listquotaroot_mailbox"><code>listquotaroot</code> <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_lqm_mailbox"><code>lqm</code> <em>mailbox</em></a></strong>
+
+<dt><strong><a name="item_lqr_mailbox_3f"><code>lqr</code> <em>mailbox?</em></a></strong>
+
+<dd>
+<p>show quota roots and quotas for mailbox</p>
+</dd>
+</li>
+<dt><strong><a name="item_mboxconfig_mailbox_attribute_value"><code>mboxconfig</code> <em>mailbox</em> <em>attribute</em> <em>value</em></a></strong>
+
+<dt><strong><a name="item_mboxcfg_mailbox_attribute_value"><code>mboxcfg</code> <em>mailbox</em> <em>attribute</em> <em>value</em></a></strong>
+
+<dd>
+<p>Set mailbox metadata. A value of ``none'' will remove the attribute.
+The currently supported attributes are:</p>
+</dd>
+<dl>
+<dt><strong><a name="item_comment"><code>comment</code></a></strong>
+
+<dd>
+<p>Sets a comment or description associated with the mailbox.</p>
+</dd>
+</li>
+<dt><strong><a name="item_condstore"><code>condstore</code></a></strong>
+
+<dd>
+<p>Enables the IMAP CONDSTORE extension (modification sequences) on the mailbox.</p>
+</dd>
+</li>
+<dt><strong><a name="item_expire"><code>expire</code></a></strong>
+
+<dd>
+<p>Sets the number of days after which messages will be expired from the mailbox.</p>
+</dd>
+</li>
+<dt><strong><a name="item_sieve"><code>sieve</code></a></strong>
+
+<dd>
+<p>Indicates the name of the global sieve script that should be run when
+a message is delivered to the shared mailbox (not used for personal
+mailboxes).</p>
+</dd>
+</li>
+<dt><strong><a name="item_squat"><code>squat</code></a></strong>
+
+<dd>
+<p>Indicates that the mailbox should have a squat index created for it.</p>
+</dd>
+</li>
+<dt><strong><a name="item_news2mail"><code>news2mail</code></a></strong>
+
+<dd>
+<p>Sets an email address to which messages injected into the server via NNTP
+will be sent.</p>
+</dd>
+</li>
+</dl>
+<dt><strong><a name="item_renamemailbox__5b_2d_2dpartition_partition_5d_oldn"><code>renamemailbox</code> [<code>--partition</code> <em>partition</em>] <em>oldname</em> <em>newname</em></a></strong>
+
+<dt><strong><a name="item_rename__5b_2d_2dpartition_partition_5d_oldname_new"><code>rename</code> [<code>--partition</code> <em>partition</em>] <em>oldname</em> <em>newname</em></a></strong>
+
+<dt><strong><a name="item_renm__5b_2d_2dpartition_partition_5d_oldname_newna"><code>renm</code> [<code>--partition</code> <em>partition</em>] <em>oldname</em> <em>newname</em></a></strong>
+
+<dt><strong><a name="item_renamemailbox_oldname_newname__5bpartition_5d"><code>renamemailbox</code> <em>oldname</em> <em>newname</em> [<em>partition</em>]</a></strong>
+
+<dt><strong><a name="item_rename_oldname_newname__5bpartition_5d"><code>rename</code> <em>oldname</em> <em>newname</em> [<em>partition</em>]</a></strong>
+
+<dt><strong><a name="item_renm_oldname_newname__5bpartition_5d"><code>renm</code> <em>oldname</em> <em>newname</em> [<em>partition</em>]</a></strong>
+
+<dd>
+<p>Rename the specified mailbox, optionally moving it to a different partition.
+Both old-style and getopt-style usages are accepted; combining them will
+produce an error.</p>
+</dd>
+</li>
+<dt><strong><a name="item_server__5b_2d_2dnoauthenticate_5d__5bserver_5d">server [--noauthenticate] [server]</a></strong>
+
+<dt><strong><a name="item_connect__5b_2d_2dnoauthenticate_5d__5bserver_5d">connect [--noauthenticate] [server]</a></strong>
+
+<dt><strong><a name="item_servername__5b_2d_2dnoauthenticate_5d__5bserver_5d">servername [--noauthenticate] [server]</a></strong>
+
+<dd>
+<p>With no arguments, show the current server. With an argument, connect to that
+server. It will prompt for automatic login unless the <code>--noauthenticate</code>
+option is specified. (This may change; in particular, either automatic
+authentication will be removed or all <code>authenticate</code> options will be added.)</p>
+</dd>
+<dd>
+<p>When connected to a server, <strong>cyradm</strong>'s prompt changes from <code>cyradm></code> to
+<code>servername></code>, where <em>servername</em> is the fully qualified domain name
+of the connected server.</p>
+</dd>
+</li>
+<dt><strong><a name="item_setaclmailbox_mailbox_id_rights__5bid_rights__2e_2"><code>setaclmailbox</code> <em>mailbox</em> <em>id</em> <em>rights</em> [<em>id</em> <em>rights</em> ...]</a></strong>
+
+<dt><strong><a name="item_setacl_mailbox_id_rights__5bid_rights__2e_2e_2e_5d"><code>setacl</code> <em>mailbox</em> <em>id</em> <em>rights</em> [<em>id</em> <em>rights</em> ...]</a></strong>
+
+<dt><strong><a name="item_sam_mailbox_id_rights__5bid_rights__2e_2e_2e_5d"><code>sam</code> <em>mailbox</em> <em>id</em> <em>rights</em> [<em>id</em> <em>rights</em> ...]</a></strong>
+
+<dd>
+<p>Set ACLs on a mailbox. The ACL may be one of the special strings <code>none</code>,
+<code>read</code> (<code>lrs</code>), <code>post</code> (<code>lrsp</code>), <code>append</code> (<code>lrsip</code>), <code>write</code>
+(<code>lrswipkxte</code>), <code>delete</code> (<code>lrxte</code>), or <code>all</code> (<code>lrswipkxte</code>), or
+any combinations of the ACL codes:</p>
+</dd>
+<dl>
+<dt><strong><a name="item_l">l</a></strong>
+
+<dd>
+<p>Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox)</p>
+</dd>
+</li>
+<dt><strong><a name="item_r">r</a></strong>
+
+<dd>
+<p>Read (SELECT/EXAMINE the mailbox, perform STATUS)</p>
+</dd>
+</li>
+<dt><strong><a name="item_s">s</a></strong>
+
+<dd>
+<p>Seen (set/clear \SEEN flag via STORE, also set \SEEN flag during
+ APPEND/COPY/FETCH BODY[...])</p>
+</dd>
+</li>
+<dt><strong><a name="item_w">w</a></strong>
+
+<dd>
+<p>Write flags other than \SEEN and \DELETED</p>
+</dd>
+</li>
+<dt><strong><a name="item_i">i</a></strong>
+
+<dd>
+<p>Insert (APPEND, COPY destination)</p>
+</dd>
+</li>
+<dt><strong><a name="item_p">p</a></strong>
+
+<dd>
+<p>Post (send mail to mailbox)</p>
+</dd>
+</li>
+<dt><strong><a name="item_k">k</a></strong>
+
+<dd>
+<p>Create mailbox (CREATE new sub-mailboxes, parent for new mailbox in RENAME)</p>
+</dd>
+</li>
+<dt><strong><a name="item_x">x</a></strong>
+
+<dd>
+<p>Delete mailbox (DELETE mailbox, old mailbox name in RENAME)</p>
+</dd>
+</li>
+<dt><strong><a name="item_t">t</a></strong>
+
+<dd>
+<p>Delete messages (set/clear \DELETED flag via STORE, also set \DELETED
+ flag during APPEND/COPY)</p>
+</dd>
+</li>
+<dt><strong><a name="item_e">e</a></strong>
+
+<dd>
+<p>Perform EXPUNGE and expunge as part of CLOSE</p>
+</dd>
+</li>
+<dt><strong><a name="item_a">a</a></strong>
+
+<dd>
+<p>Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)</p>
+</dd>
+</li>
+</dl>
+<dt><strong><a name="item_setinfo_attribute_value"><code>setinfo</code> <em>attribute</em> <em>value</em></a></strong>
+
+<dd>
+<p>Set server metadata. A value of ``none'' will remove the attribute.
+The currently supported attributes are:</p>
+</dd>
+<dl>
+<dt><strong><a name="item_motd"><code>motd</code></a></strong>
+
+<dd>
+<p>Sets a ``message of the day''. The message gets displayed as an ALERT after
+authentication.</p>
+</dd>
+</li>
+<dt><strong><code>comment</code></strong>
+
+<dd>
+<p>Sets a comment or description associated with the server.</p>
+</dd>
+</li>
+<dt><strong><a name="item_admin"><code>admin</code></a></strong>
+
+<dd>
+<p>Sets the administrator email address for the server.</p>
+</dd>
+</li>
+<dt><strong><a name="item_shutdown"><code>shutdown</code></a></strong>
+
+<dd>
+<p>Sets a shutdown message. The message gets displayed as an ALERT and
+all users are disconnected from the server (subsequent logins are disallowed).</p>
+</dd>
+</li>
+<dt><strong><code>expire</code></strong>
+
+<dd>
+<p>Sets the number of days after which messages will be expired from the
+server (unless overridden by a mailbox annotation).</p>
+</dd>
+</li>
+<dt><strong><code>squat</code></strong>
+
+<dd>
+<p>Indicates that all mailboxes should have a squat indexes created for
+them (unless overridden by a mailbox annotation).</p>
+</dd>
+</li>
+</dl>
+<dt><strong><a name="item_setquota_root_resource_value__5bresource_value__2e"><code>setquota</code> <em>root</em> <em>resource</em> <em>value</em> [<em>resource</em> <em>value</em> ...]</a></strong>
+
+<dt><strong><a name="item_sq_root_resource_value__5bresource_value__2e_2e_2e"><code>sq</code> <em>root</em> <em>resource</em> <em>value</em> [<em>resource</em> <em>value</em> ...]</a></strong>
+
+<dd>
+<p>Set a quota on the specified root, which may or may not be an actual mailbox.
+The only <em>resource</em> understood by <strong>Cyrus</strong> is <code>STORAGE</code>. The <em>value</em> may
+be the special string <code>none</code> which will remove the quota.</p>
+</dd>
+</li>
+<dt><strong><a name="item_version"><code>version</code></a></strong>
+
+<dt><strong><a name="item_ver"><code>ver</code></a></strong>
+
+<dd>
+<p>Display the version info of the current server.</p>
+</dd>
+</li>
+<dt><strong><a name="item_xfermailbox__5b_2d_2dpartition_partition_5d_mailbo"><code>xfermailbox</code> [<code>--partition</code> <em>partition</em>] <em>mailbox</em> <em>server</em></a></strong>
+
+<dt><strong><a name="item_xfer__5b_2d_2dpartition_partition_5d_mailbox_serve"><code>xfer</code> [<code>--partition</code> <em>partition</em>] <em>mailbox</em> <em>server</em></a></strong>
+
+<dt><strong><a name="item_xfermailbox_mailbox_server__5bpartition_5d"><code>xfermailbox</code> <em>mailbox</em> <em>server</em> [<em>partition</em>]</a></strong>
+
+<dt><strong><a name="item_xfer_mailbox_server__5bpartition_5d"><code>xfer</code> <em>mailbox</em> <em>server</em> [<em>partition</em>]</a></strong>
+
+<dd>
+<p>Transfer (relocate) the specified mailbox to a different server.
+Both old-style and getopt-style usages are accepted; combining them will
+produce an error.</p>
+</dd>
+</li>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="notes">NOTES</a></h1>
+<p>GNU-style long options must be given in their entirety; Tcl-style options
+may be abbreviated.</p>
+<p>Tcl-style options are provided as a compatibility feature. They will
+probably go away in the future.</p>
+<p>Multiple commands can be given on a line, separated by <code>';'</code> characters.</p>
+<p>All commands set an exit status, which at present is not useful.</p>
+<p>Unknown commands are passed to a subshell for execution.</p>
+<p>The Tcl version of <strong>cyradm</strong> is used for scripting as well as interactively.
+While this is possible to a limited extent by use of the <code>run</code> method,
+scripting would normally be done with <code>Cyrus::IMAP::Admin</code>, which is far
+more flexible than either interactive <code>cyradm</code> or the Tcl scripting
+mechanism for Cyrus.</p>
+<p><strong>cyradm</strong> understands <strong>/bin/sh</strong>-style redirection: any command can have
+its standard or error output redirected, with all <strong>sh</strong>-style redirections
+(except <code><></code>) supported. It does not currently understand pipes
+or backgrounding.</p>
+<p>If the <code>Term::Readline::Perl</code> or <code>Term::Readline::GNU</code> modules are
+available, <strong>cyradm</strong> will use it.</p>
+<p>An alias facility is implemented internally, but no access is currently
+provided to it. This will change, if only to allow some of the predefined
+aliases to be removed if they conflict with useful shell commands.</p>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p>Brandon S. Allbery, <a href="mailto:allbery at ece.cmu.edu">allbery at ece.cmu.edu</a></p>
+<p>
+</p>
+<hr />
+<h1><a name="see_also">SEE ALSO</a></h1>
+<p>Cyrus::IMAP::Admin
+Term::ReadLine
+sh(1), perl(1), imapd(8).</p>
+
+</body>
+
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyrus.conf.5.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyrus.conf.5.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyrus.conf.5.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/cyrus.conf.5.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,595 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>CYRUS.CONF</title>
+</head>
+<body>
+
+<h1 align=center>CYRUS.CONF</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#SECTION DESCRIPTIONS">SECTION DESCRIPTIONS</a><br>
+<a href="#EXAMPLE">EXAMPLE</a><br>
+<a href="#ACCESS CONTROL">ACCESS CONTROL</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>cyrus.conf − Cyrus configuration file</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/cyrus.conf</b> is the configuration file for the
+Cyrus <b>master</b> process. It defines the startup
+procedures, services and events to be spawned by
+<b>master</b>.</p>
+<!-- INDENTATION -->
+<p>The <b>/etc/cyrus.conf</b> file consists of a series of
+entries divided into sections of the form</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="20%"></td>
+<td width="79%">
+<p><i>section</i> {</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="30%"></td>
+<td width="69%">
+<p><i>name arguments</i></p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="38%"></td>
+<td width="7%">
+
+<p><i>...</i></p>
+</td>
+<td width="54%">
+</td>
+<tr valign="top" align="left">
+<td width="38%"></td>
+<td width="7%">
+
+<p><i>...</i></p>
+</td>
+<td width="54%">
+</td>
+<tr valign="top" align="left">
+<td width="38%"></td>
+<td width="7%">
+
+<p><i>...</i></p>
+</td>
+<td width="54%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="20%"></td>
+<td width="79%">
+<p>}</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>where <i>section</i> is the name of the section,
+<i>name</i> is the name of the entry and <i>arguments</i> is
+the whitespace-separated list of arguments for the
+entry.</p>
+<!-- INDENTATION -->
+<p>Blank lines and lines beginning with
+‘‘#’’ are ignored.</p>
+</td>
+</table>
+<a name="SECTION DESCRIPTIONS"></a>
+<h2>SECTION DESCRIPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>The paragraphs below detail the three sections
+(<b>START</b>, <b>SERVICES</b>, <b>EVENTS</b>) that can be
+placed in the <b>/etc/cyrus.conf</b> file. The arguments
+that are available for each entry within the section are
+described, and each argument’s default value is
+shown.</p>
+<!-- INDENTATION -->
+<p>Arguments can appear in any order. Some arguments have no
+default value, these are listed with ‘‘<no
+default>’’. For string arguments, the value
+MUST be enclosed in double quotes.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="4%"></td>
+<td width="95%">
+<p><b>START</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>This section lists the processes to run before any
+<b>SERVICES</b> are spawned. This section is typically used
+to initialize databases and start long running daemons.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>cmd=</b><no default></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The command (with options) to spawn as a child process.
+This string argument is required.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="4%"></td>
+<td width="95%">
+<p><b>SERVICES</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>This section is the heart of the <b>/etc/cyrus.conf</b>
+file. It lists the processes that should be spawned to
+handle client connections made on certain Internet/UNIX
+sockets.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>cmd=</b><no default></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The command (with options) to spawn as a child process.
+This string argument is required.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>listen=</b><no default></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The UNIX or internet socket to listen on. This string
+field is required and takes one of the following forms:</p>
+<!-- INDENTATION -->
+<p><i>path</i><br>
+[ <i>host</i> <b>:</b> ] <i>port</i></p>
+<!-- INDENTATION -->
+<p>where <i>path</i> is the explicit path to a UNIX socket,
+<i>host</i> is either the hostname or bracket-enclosed IP
+address of a network interface, and <i>port</i> is either a
+port number or service name (as listed in
+<b>/etc/services</b>).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>proto=</b>tcp</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The protocol used for this service (<i>tcp</i>,
+<i>tcp4</i>, <i>tcp6</i>, <i>udp</i>, <i>udp4</i>,
+<i>udp6</i>). This string argument is optional.</p>
+<!-- INDENTATION -->
+<p><b>tcp4</b>, <b>udp4</b>: These arguments are used to
+bind the service to IPv4 only.<b><br>
+tcp6</b>, <b>udp6</b>: These arguments are used to bind the
+service to IPv6 only, if the operating system supports
+this.<b><br>
+tcp</b>, <b>udp</b>: These arguments are used to bind to
+both IPv4 and IPv6 if possible.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>prefork=</b>0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The number of instances of this service to always have
+running and waiting for a connection (for faster initial
+response time). This integer value is optional.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>provide_uuid=</b>0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Provide the service the required information for
+constructing universally unique identifiers (UUIDs) for
+messages. This option is only used for IMAP, NNTP and LMTP
+services when replicating the mailstore between servers.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>maxchild=</b>-1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The maximum number of instances of this service to spawn.
+A value of -1 means unlimited. This integer value is
+optional.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>maxfds=</b>256</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The maximum number of file descriptors to which to limit
+this process. This integer value is optional.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="4%"></td>
+<td width="95%">
+<p><b>EVENTS</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>This section lists processes that should be run at
+specific intervals, similar to cron jobs. This section is
+typically used to perform scheduled cleanup/maintenance.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>cmd=</b><no default></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The command (with options) to spawn as a child process.
+This string argument is required.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>period=</b>0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The interval (in minutes) at which to run the command.
+This integer value is optional, but SHOULD be a positive
+integer > 10.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>at=</b><hhmm></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The time (24-hour format) at which to run the command
+each day. If set to a valid time (0000-2359), period is
+automatically set to 1440. This string argument is
+optional.</p>
+</td>
+</table>
+<a name="EXAMPLE"></a>
+<h2>EXAMPLE</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p># example cyrus.conf</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="-2%">
+
+<p>START { recover</p>
+</td>
+<td width="7%"></td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>cmd="ctl_cyrusdb -r"</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>}</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="6" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="-2%">
+
+<p>SERVICES { imap</p>
+</td>
+<td width="7%"></td>
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>cmd="imapd" listen="imap" prefork=1
+imaps</p>
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="-2%"></td>
+<td width="7%"></td>
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>cmd="imapd -s" listen="imaps"
+prefork=0 lmtpunix</p>
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="-2%"></td>
+<td width="7%"></td>
+<td width="7%"></td>
+<td width="7%"></td>
+<td width="70%">
+
+<p>cmd="lmtpd"
+listen="/var/imap/socket/lmtp" lmtp</p>
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="-2%"></td>
+<td width="7%"></td>
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>cmd="lmtpd"
+listen="localhost:lmtp"</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>}</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="-2%">
+
+<p>EVENTS { checkpoint</p>
+</td>
+<td width="14%"></td>
+<td width="7%"></td>
+<td width="70%">
+
+<p>cmd="ctl_cyrusdb -c" period=30 delprune</p>
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="-2%"></td>
+<td width="14%"></td>
+<td width="7%"></td>
+<td width="70%">
+
+<p>cmd="cyr_expire -E 3" at=0400 tlsprune</p>
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="-2%"></td>
+<td width="14%"></td>
+<td width="7%"></td>
+<td width="70%">
+
+<p>cmd="tls_prune" at=0400</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>}</p>
+</td>
+</table>
+<a name="ACCESS CONTROL"></a>
+<h2>ACCESS CONTROL</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>When TCP Wrappers is used to control access to Cyrus
+services, the <i>name</i> of the service entry should be
+used as the process name in the <b>hosts_access(5)</b>
+table. For instance, in the example above, "imap",
+"imaps", "lmtpunix" and "lmtp"
+would be used as the process names. This allows a single
+daemon such as imapd to be run in different modes or
+configurations (i.e., SSL and non-SSL enabled) yet still
+have separate access control rules.</p>
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>master(8)</b>, <b>imapd(8)</b>, <b>pop3d(8)</b>,
+<b>lmtpd(8)</b>, <b>timsieved(8)</b>, <b>idled(8)</b>,
+<b>notifyd(8)</b>, <b>ctl_cyrusdb(8)</b>,
+<b>ctl_deliver(8)</b>, <b>tls_prune(8)</b>,
+<b>hosts_access(5)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/deliver.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/deliver.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/deliver.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/deliver.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,264 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>DELIVER</title>
+</head>
+<body>
+
+<h1 align=center>DELIVER</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#NOTES">NOTES</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>deliver − deliver mail to an IMAP mailbox</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>deliver</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−d</b> ] [ <b>−r</b> <i>address</i> ]<br>
+[ <b>−f</b> <i>address</i> ] [ <b>−m</b>
+<i>mailbox</i> ] [ <b>−a</b> <i>auth-id</i> ]<br>
+[ <b>−q</b> ] [ <i>userid</i> ]...<b><br>
+deliver</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−l</b></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Deliver</i> reads a message from the standard input
+and delivers it to one or more IMAP mailboxes.</p>
+<!-- INDENTATION -->
+<p><i>Deliver</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−d</b></p>
+</td>
+<td width="13%"></td>
+<td width="60%">
+
+<p>Ignored for compatability with <b>/bin/mail.</b></p>
+</td>
+<td width="11%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−r</b> <i>address</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Insert a <b>Return-Path:</b> header containing
+<i>address</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−f</b> <i>address</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Insert a <b>Return-Path:</b> header containing
+<i>address</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−m</b> <i>mailbox</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Deliver to <i>mailbox</i>. If any <i>userid</i>s are
+specified, attempts to deliver to
+user.<i>userid</i>.<i>mailbox</i> for each <i>userid</i>. If
+the ACL on any such mailbox does not grant the sender the
+"p" right or if <b>−m</b> is not specified,
+then delivers to the INBOX for the <i>userid</i>, regardless
+of the ACL on the INBOX.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="20%"></td>
+<td width="79%">
+<p>If no <i>userid</i>s are specified, attempts to deliver
+to <i>mailbox</i>. If the ACL on <i>mailbox</i> does not
+grant the sender the "p" right, the delivery
+fails.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−a</b> <i>auth-id</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specify the authorization id of the sender. Defaults to
+"anonymous".</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−q</b></p>
+</td>
+<td width="13%"></td>
+<td width="72%">
+
+<p>Deliver message even when receiving mailbox is over
+quota.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−l</b></p>
+</td>
+<td width="13%"></td>
+<td width="72%">
+
+<p>Accept messages using the LMTP protocol.</p>
+</td>
+</table>
+<a name="NOTES"></a>
+<h2>NOTES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Depending on the setting of <b>reject8bit</b> in
+<b>imapd.conf(5)</b>, deliver either rejects/accepts
+messages with 8-bit-set characters in the headers. If we
+accept messages with 8-bit-set characters in the headers,
+then depending on the setting of <b>munge8bit</b>, these
+characters are either left un-touched or changed to
+‘X’. This is because such characters can’t
+be interpreted since the character set is not known,
+although some communities not well-served by US-ASCII assume
+that those characters can be used to represent characters
+not present in US-ASCII.</p>
+<!-- INDENTATION -->
+<p>A method for encoding 8-bit-set characters is provided by
+RFC 2047.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtpd(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fetchnews.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fetchnews.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fetchnews.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fetchnews.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,217 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>FETCHNEWS</title>
+</head>
+<body>
+
+<h1 align=center>FETCHNEWS</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>fetchnews − retrieve new articles from peer and
+feed to Cyrus</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>fetchnews</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−s</b> <i>servername[:port]</i> ]<br>
+[ <b>−n</b> ] [ <b>−y</b> ] [ <b>−w</b>
+<i>wildmat</i> ] [ <b>−f</b> <i>tstampfile</i> ]<br>
+[ <b>−a</b> <i>authname</i> [ <b>−p</b>
+<i>password</i> ] ] <i>peername</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Fetchnews</i> retrieves news articles from a peer news
+server and feeds them to a Cyrus server. <i>Fetchnews</i>
+connects to the peer specified by <i>peername</i>, requests
+new articles since the time stored in <i>tstampfile</i> and
+feeds them to <i>servername</i>.</p>
+<!-- INDENTATION -->
+<p><i>Fetchnews</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−s</b> <i>servername</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Hostname of the Cyrus server (with optional port) to
+which articles should be fed. Defaults to
+"localhost:nntp".</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−n</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Don’t use the NEWNEWS command. <i>Fetchnews</i>
+will keep track of the high and low water marks for each
+group and use them to fetch new articles.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−y</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Use 4 instead of 2 digits for year. 2-digits are rfc977-
+but not y2k-compliant.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−w</b> <i>wildmat</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Wildmat pattern specifying which newsgroups to search for
+new articles. Defaults to "*".</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−f</b> <i>tstampfile</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>File in which to read/write the timestamp of when
+articles were last retrieved. Defaults to
+"newsstamp" located in <i>configdir</i> as
+specified by the configuration options.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−a</b> <i>authname</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authentication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>password</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Password to use for authentication.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fud.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fud.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fud.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/fud.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,202 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>FUD</title>
+</head>
+<body>
+
+<h1 align=center>FUD</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#BUGS">BUGS</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>FUD − provide information about user mailboxes</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>fud</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−U</b> <i>uses</i> ] [ <b>−T</b>
+<i>timeout</i> ] [ <b>−D</b> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>FUD</b> is a long lived datagram daemon started from
+master that provides information about when a user last read
+their mail, when mail last arrived in a user’s
+mailbox, and how many messages are recent for that user.</p>
+<!-- INDENTATION -->
+<p>Note that for <b>FUD</b> to run properly you must set
+proto=udp in its cyrus.conf services entry. prefork=1 is
+also recommended. <b>FUD</b> will automatically proxy any
+and all FUD requests to the appropriate backend server if it
+is runing on a Cyrus Murder frontend machine.</p>
+<!-- INDENTATION -->
+<p><b>FUD</b> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−U</b> <i>uses</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The maximum number of times that the process should be
+used for new connections before shutting down. The default
+is 250.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−T</b> <i>timeout</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The number of seconds that the process will wait for a
+new connection before shutting down. Note that a value of 0
+(zero) will disable the timeout. The default is 60.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−D</b></p>
+</td>
+<td width="13%"></td>
+<td width="72%">
+
+<p>Run external debugger specified in debug_command.</p>
+</td>
+<td width="0%">
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Default configuration file.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/cyrus.conf</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Cyrus Master process configuration file.</p>
+</td>
+</table>
+<a name="BUGS"></a>
+<h2>BUGS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Though not really a bug, <b>FUD</b> will silently ignore
+any requests that it does not consider valid.</p>
+<!-- INDENTATION -->
+<p>Also not really a bug, <b>FUD</b> requires that the
+anonymous user has the 0 (zero) right on the mailbox in
+question. This is only a "bug" because 0 is not a
+standard IMAP ACL bit.</p>
+<!-- INDENTATION -->
+<p><b>FUD</b> is an experimental interface meant to provide
+information to build a finger-like service around.
+Eventually it should be superceded by a more standards-based
+protocol.</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/idled.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/idled.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/idled.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/idled.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,105 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>IDLED</title>
+</head>
+<body>
+
+<h1 align=center>IDLED</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>idled − provide near real-time updates for IMAP
+IDLE</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>idled</b> [ <b>−C</b> <i>config-file</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Idled</i> is a long lived datagram daemon which
+receives notifications of mailbox changes and signals the
+appropriate <i>imapd</i> to report the changes to the
+client. <i>Idled</i> is usually started from
+<i>master.</i></p>
+<!-- INDENTATION -->
+<p><i>Idled</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>. The <i>idlesocket</i> option is used to specify
+the Unix domain socket to listen on for notifications.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,207 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>IMAPD</title>
+</head>
+<body>
+
+<h1 align=center>IMAPD</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>imapd − IMAP server process</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−U</b> <i>uses</i> ] [ <b>−T</b>
+<i>timeout</i> ] [ <b>−D</b> ]<br>
+[ <b>−s</b> ] [ <b>−p</b> <i>ssf</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Imapd</i> is an IMAP4rev1 server. It accepts commands
+on its standard input and responds on its standard output.
+It MUST be invoked by <i>master</i>(8) with those
+descriptors attached to a remote client connection.</p>
+<!-- INDENTATION -->
+<p><i>Imapd</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+<!-- INDENTATION -->
+<p>If the file msg/shutdown is created under the directory
+specified in the <i>configdirectory</i> configuration
+option, then <i>imapd</i> will shut down the connection,
+sending the first line contained in the file to the client
+as the reason. New connections are denied.</p>
+<!-- INDENTATION -->
+<p>If the file msg/motd is created under the directory
+specified in the <i>configdirectory</i> configuration
+option, then <i>imapd</i> will send the first line contained
+in the file to clients upon connect as an ALERT message
+which IMAP-compliant clients are required to display. This
+option serves to annoy users mostly. Unfortunately clients
+tend to connect far more frequently than is apparent,
+causing each connection to generate a seperate server ALERT
+for each connection. Many clients do not display these
+properly, if they do anything with them at all.</p>
+<!-- INDENTATION -->
+<p>If the directory log/<i>user</i> exists under the
+directory specified in the <i>configdirectory</i>
+configuration option, then <i>imapd</i> will create protocol
+telemetry logs for sessions authenticating as <i>user</i>.
+The telemetry logs will be stored in the log/<i>user</i>
+directory with a filename of the <i>imapd</i>
+process-id.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−U</b> <i>uses</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The maximum number of times that the process should be
+used for new connections before shutting down. The default
+is 250.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−T</b> <i>timeout</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The number of seconds that the process will wait for a
+new connection before shutting down. Note that a value of 0
+(zero) will disable the timeout. The default is 60.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>−D</b></p>
+</td>
+<td width="77%">
+
+<p>Run external debugger specified in debug_command.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>−s</b></p>
+</td>
+<td width="77%">
+
+<p>Serve IMAP over SSL (imaps). All data to and from
+<i>imapd</i> is encrypted using the Secure Sockets
+Layer.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>−p</b> <i>ssf</i></p>
+</td>
+<td width="77%">
+
+<p>Tell <i>imapd</i> that an external layer exists. An SSF
+(security strength factor) of 1 means an integrity
+protection layer exists. Any higher SSF implies some form of
+privacy protection.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.conf.5.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.conf.5.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.conf.5.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imapd.conf.5.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3931 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>IMAPD.CONF</title>
+</head>
+<body>
+
+<h1 align=center>IMAPD.CONF</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#FIELD DESCRIPTIONS">FIELD DESCRIPTIONS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>imapd.conf − IMAP configuration file</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b> is the configuration file for the
+Cyrus IMAP server. It defines local parameters for IMAP.</p>
+<!-- INDENTATION -->
+<p>Each line of the <b>/etc/imapd.conf</b> file has the
+form</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="20%"></td>
+<td width="79%">
+<p><i>option</i>: <i>value</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>where <i>option</i> is the name of the configuration
+option being set and <i>value</i> is the value that the
+configuration option is being set to.</p>
+<!-- INDENTATION -->
+<p>Blank lines and lines beginning with
+‘‘#’’ are ignored.</p>
+<!-- INDENTATION -->
+<p>For boolean and enumerated options, the values
+‘‘yes’’,
+‘‘on’’,
+‘‘t’’,
+‘‘true’’ and
+‘‘1’’ turn the option on, the values
+‘‘no’’,
+‘‘off’’,
+‘‘f’’,
+‘‘false’’ and
+‘‘0’’ turn the option off.</p>
+</td>
+</table>
+<a name="FIELD DESCRIPTIONS"></a>
+<h2>FIELD DESCRIPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>The sections below detail options that can be placed in
+the <b>/etc/imapd.conf</b> file, and show each
+option’s default value. Some options have no default
+value, these are listed with ‘‘<no
+default>’’. Some options default to the empty
+string, these are listed with
+‘‘<none>’’.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>admins:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The list of userids with administrative rights. Separate
+each userid with a space. Sites using Kerberos
+authentication may use separate "admin"
+instances.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Note that accounts used by users should not be
+administrators. Administrative accounts should not receive
+mail. That is, if user "jbRo" is a user reading
+mail, he should not also be in the admins line. Some
+problems may occur otherwise, most notably the ability of
+administrators to create top-level mailboxes visible to
+users, but not writable by users.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>afspts_localrealms:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The list of realms which are to be treated as local, and
+thus stripped during identifier canonicalization (for the
+AFSPTS ptloader module). This is different from loginrealms
+in that it occurs later in the authorization process (as the
+user id is canonified for PTS lookup)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>afspts_mycell:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Cell to use for AFS PTS lookups. Defaults to the local
+cell.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>allowallsubscribe:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Allow subscription to nonexistent mailboxes. This option
+is typically used on backend servers in a Murder so that
+users can subscribe to mailboxes that don’t reside on
+their "home" server. This option can also be used
+as a workaround for IMAP clients which don’t play well
+with nonexistent or unselectable mailboxes (eg. Microsoft
+Outlook).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>allowanonymouslogin:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Permit logins by the user "anonymous" using any
+password. Also allows use of the SASL ANONYMOUS
+mechanism.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>allowapop:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Allow use of the POP3 APOP authentication command.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Note that this command requires that SASL is compiled
+with APOP support, that the plaintext passwords are
+available in a SASL auxprop backend (eg. sasldb), and that
+the system can provide enough entropy (eg. from
+/dev/urandom) to create a challenge in the banner.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>allownewnews:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Allow use of the NNTP NEWNEWS command.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Note that this is a very expensive command and should
+only be enabled when absolutely necessary.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>allowplaintext:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Allow the use of cleartext passwords on the wire.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>allowusermoves:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Allow moving user accounts (with associated meta-data)
+via RENAME or XFER.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Note that measures should be taken to make sure that the
+user being moved is not logged in, and can not login during
+the move. Failure to do so may result in the user’s
+meta-data (seen state, subscriptions, etc) being corrupted
+or out of date.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>altnamespace:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Use the alternate IMAP namespace, where personal folders
+reside at the same level in the hierarchy as INBOX.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>This option ONLY applies where interaction takes place
+with the client/user. Currently this is limited to the IMAP
+protocol (imapd) and Sieve scripts (lmtpd). This option does
+NOT apply to admin tools such as cyradm (admins ONLY),
+reconstruct, quota, etc., NOR does it affect LMTP delivery
+of messages directly to mailboxes via plus-addressing.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>annotation_db:</b> skiplist</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for mailbox annotations.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>berkeley</i>, <i>berkeley-hash</i>,
+<i>skiplist</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>auth_mech:</b> unix</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The authorization mechanism to use.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>unix</i>, <i>pts</i>, <i>krb</i>,
+<i>krb5</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>autocreatequota:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If nonzero, normal users may create their own IMAP
+accounts by creating the mailbox INBOX. The user’s
+quota is set to the value if it is positive, otherwise the
+user has unlimited quota.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>berkeley_cachesize:</b> 512</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Size (in kilobytes) of the shared memory buffer pool
+(cache) used by the berkeley environment. The minimum
+allowed value is 20. The maximum allowed value is 4194303
+(4GB).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>berkeley_locks_max:</b> 50000</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Maximum number of locks to be held or requested in the
+berkeley environment.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>berkeley_txns_max:</b> 100</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Maximum number of transactions to be supported in the
+berkeley environment.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>client_timeout:</b> 10</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Number of seconds to wait before returning a timeout
+failure when performing a client connection (e.g. in a
+murder environment)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>configdirectory:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The pathname of the IMAP configuration directory. This
+field is required.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>debug_command:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Debug command to be used by processes started with -D
+option. The string is a C format string that gets 3 options:
+the first is the name of the executable (without path). The
+second is the pid (integer) and the third is the service ID.
+Example: /usr/local/bin/gdb /usr/cyrus/bin/%s %d</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>defaultacl:</b> anyone lrs</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The Access Control List (ACL) placed on a newly-created
+(non-user) mailbox that does not have a parent mailbox.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>defaultdomain:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The default domain for virtual domain support</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>defaultpartition:</b> default</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The partition name used by default for new mailboxes.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>deleteright:</b> c</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Deprecated - only used for backwards compatibility with
+existing installations. Lists the old RFC 2086 right which
+was used to grant the user the ability to delete a mailbox.
+If a user has this right, they will automatically be given
+the new ’x’ right.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>duplicate_db:</b> berkeley-nosync</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for the duplicate delivery
+suppression and sieve.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>berkeley</i>, <i>berkeley-nosync</i>,
+<i>berkeley-hash</i>, <i>berkeley-hash-nosync</i>,
+<i>skiplist</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>duplicatesuppression:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, lmtpd will suppress delivery of a message to
+a mailbox if a message with the same message-id (or
+resent-message-id) is recorded as having already been
+delivered to the mailbox. Records the mailbox and
+message-id/resent-message-id of all successful
+deliveries.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>expunge_mode:</b> immediate</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The mode in which messages (and their corresponding cache
+entries) are expunged. "Immediate" mode is the
+default behavior in which the message files and cache
+entries are purged at the time of the EXPUNGE. In
+"delayed" mode, the messages are removed from the
+mailbox index at the time of the EXPUNGE (hiding them from
+the client), but the message files and cache entries are
+left behind, to be purged at a later time by
+"cyr_expire". This reduces the amount of I/O that
+takes place at the time of EXPUNGE and should result in
+greater responsiveness for the client, especially when
+expunging a large number of messages.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>immediate</i>, <i>delayed</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>flushseenstate:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, changes to the seen state will be flushed to
+disk immediately, otherwise changes will be cached and
+flushed when the mailbox is closed. This option may be used
+to fix the problem of previously read messages being marked
+as unread in Microsoft Outlook, at the expense of a loss of
+performance/scalability.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>foolstupidclients:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, only list the personal namespace when a LIST
+"*" is performed. (it changes the request to a
+LIST "INBOX*"</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>force_sasl_client_mech:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Force preference of a given SASL mechanism for client
+side operations (e.g. murder environments). This is separate
+from (and overridden by) the ability to use the <host
+shortname>_mechs option to set preferred mechanisms for a
+specific host</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>fulldirhash:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, uses an improved directory hashing scheme
+which hashes the entire username instead of using just the
+first letter. This changes hash algorithm used for quota and
+user directories and if <i>hashimapspool</i> is enabled, the
+entire mail spool.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Note that this option can NOT be changed on a live
+system. The server must be quiesced and then the directories
+moved with the <b>rehash</b> utility.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>hashimapspool:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, the partitions will also be hashed, in
+addition to the hashing done on configuration directories.
+This is recommended if one partition has a very bushy
+mailbox tree.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>hostname_mechs:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Force a particular list of SASL mechanisms to be used
+when authenticating to the backend server hostname (where
+hostname is the short hostname of the server in question).
+If it is not specified it will query the server for
+available mechanisms and pick one to use. - Cyrus Murder</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>hostname_password:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The password to use for authentication to the backend
+server hostname (where hostname is the short hostname of the
+server) - Cyrus Murder</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>idlesocket:</b> {configdirectory}/socket/idle</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Unix domain socket that idled listens on.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ignorereference:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>For backwards compatibility with Cyrus 1.5.10 and earlier
+-- ignore the reference argument in LIST or LSUB
+commands.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapidlepoll:</b> 60</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The interval (in seconds) for polling for mailbox changes
+and ALERTs while running the IDLE command. This option is
+used when idled is not enabled or can not be contacted. The
+minimum value is 1. A value of 0 will disable IDLE.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapidresponse:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, the server responds to an ID command with a
+parameter list containing: version, vendor, support-url, os,
+os-version, command, arguments, environment. Otherwise the
+server returns NIL.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapmagicplus:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Only list a restricted set of mailboxes via IMAP by using
+userid+namespace syntax as the authentication/authorization
+id. Using userid+ (with an empty namespace) will list only
+subscribed mailboxes.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>implicit_owner_rights:</b> lca</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The implicit Access Control List (ACL) for the owner of a
+mailbox.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>@include:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Directive which includes the specified file as part of
+the configuration. If the path to the file is not absolute,
+CYRUS_PATH is prepended.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_authz:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>SASL authorization ID for the LDAP server</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_base:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Contains the LDAP base dn for the LDAP ptloader
+module</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_bind_dn:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Bind DN for the connection to the LDAP server (simple
+bind). Do not use for anonymous simple binds</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_deref:</b> never</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify how aliases dereferencing is handled during
+search.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>search</i>, <i>find</i>,
+<i>always</i>, <i>never</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_filter:</b> (uid=%u)</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify a filter that searches user identifiers. The
+following tokens can be used in the filter string:</p>
+<!-- INDENTATION -->
+<p>%% = % %u = user %U = user portion of %u (%U = test when
+%u = test at domain.tld) %d = domain portion of %u if available
+(%d = domain.tld when %u = %test at domain.tld), otherwise same
+as %r %D = user dn. (use when ldap_member_method: filter)
+%1-9 = domain tokens (%1 = tld, %2 = domain when %d =
+domain.tld)</p>
+<!-- INDENTATION -->
+<p>ldap_filter is not used when ldap_sasl is enabled.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_group_base:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>LDAP base dn for ldap_group_filter.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_group_filter:</b> (cn=%u)</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify a filter that searches for group identifiers. See
+ldap_filter for more options.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_group_scope:</b> sub</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify search scope for ldap_group_filter.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>sub</i>, <i>one</i>, <i>base</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_id:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>SASL authentication ID for the LDAP server</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_mech:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>SASL mechanism for LDAP authentication</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_member_attribute:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>See ldap_member_method.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_member_base:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>LDAP base dn for ldap_member_filter.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_member_filter:</b> (member=%D)</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify a filter for "ldap_member_method:
+filter". See ldap_filter for more options.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_member_method:</b> attribute</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify a group method. The "attribute" method
+retrieves groups from a multi-valued attribute specified in
+ldap_member_attribute.</p>
+<!-- INDENTATION -->
+<p>The "filter" method uses a filter, specified by
+ldap_member_filter, to find groups; ldap_member_attribute is
+a single-value attribute group name.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>attribute</i>, <i>filter</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_member_scope:</b> sub</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify search scope for ldap_member_filter.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>sub</i>, <i>one</i>, <i>base</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_password:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Password for the connection to the LDAP server (SASL and
+simple bind). Do not use for anonymous simple binds</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_realm:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>SASL realm for LDAP authentication</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_referrals:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify whether or not the client should follow
+referrals.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_restart:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify whether or not LDAP I/O operations are
+automatically restarted if they abort prematurely.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_sasl:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Use SASL for LDAP binds in the LDAP PTS module.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_sasl_authc:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Deprecated. Use ldap_id</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_sasl_authz:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Deprecated. Use ldap_authz</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_sasl_mech:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Deprecated. Use ldap_mech</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_sasl_password:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Deprecated. User ldap_password</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_sasl_realm:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Deprecated. Use ldap_realm</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_scope:</b> sub</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify search scope.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>sub</i>, <i>one</i>, <i>base</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_servers:</b> ldap://localhost/</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Deprecated. Use ldap_uri</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_size_limit:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify a number of entries for a search request to
+return.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_start_tls:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Use StartTLS extended operation. Do not use ldaps:
+ldap_uri when this option is enabled.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_time_limit:</b> 5</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify a number of seconds for a search request to
+complete.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_timeout:</b> 5</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify a number of seconds a search can take before
+timing out.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_tls_cacert_dir:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Path to directory with CA (Certificate Authority)
+certificates.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_tls_cacert_file:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>File containing CA (Certificate Authority)
+certificate(s).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_tls_cert:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>File containing the client certificate.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_tls_check_peer:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Require and verify server certificate. If this option is
+yes, you must specify ldap_tls_cacert_file or
+ldap_tls_cacert_dir.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_tls_ciphers:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>List of SSL/TLS ciphers to allow. The format of the
+string is described in ciphers(1).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_tls_key:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>File containing the private client key.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_uri:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Contains a list of the URLs of all the LDAP servers when
+using the LDAP PTS module.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ldap_version:</b> 3</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Specify the LDAP protocol version. If ldap_start_tls
+and/or ldap_use_sasl are enabled, ldap_version will be
+automatically set to 3.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtp_downcase_rcpt:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, lmtpd will convert the recipient address to
+lowercase (up to a ’+’ character, if
+present).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtp_fuzzy_mailbox_match:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, and the mailbox specified in the detail part
+of the recipient (everything after the ’+’) does
+not exist, lmtpd will try to find the closest match
+(ignoring case, ignoring whitespace, falling back to parent)
+to the specified mailbox name.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtp_over_quota_perm_failure:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, lmtpd returns a permanent failure code when a
+user’s mailbox is over quota. By default, the failure
+is temporary, causing the MTA to queue the message and retry
+later.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtp_strict_quota:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, lmtpd returns a failure code when the
+incoming message will cause the user’s mailbox to
+exceed its quota. By default, the failure won’t occur
+until the mailbox is already over quota.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtpsocket:</b> {configdirectory}/socket/lmtp</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Unix domain socket that lmtpd listens on, used by
+deliver(8). This should match the path specified in
+cyrus.conf(5).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>loginrealms:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The list of remote realms whose users may authenticate
+using cross-realm authentication identifiers. Separate each
+realm name by a space. (A cross-realm identity is considered
+any identity returned by SASL with an "@" in
+it.).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>loginuseacl:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, any authentication identity which has
+<b>a</b> rights on a user’s INBOX may log in as that
+user.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>logtimestamps:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Include notations in the protocol telemetry logs
+indicating the number of seconds since the last command or
+response.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mailnotifier:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Notifyd(8) method to use for "MAIL"
+notifications. If not set, "MAIL" notifications
+are disabled.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>maxmessagesize:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Maximum incoming LMTP message size. If non-zero, lmtpd
+will reject messages larger than <i>maxmessagesize</i>
+bytes. If set to 0, this will allow messages of any size
+(the default).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mboxkey_db:</b> skiplist</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for mailbox keys.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>berkeley</i>, <i>skiplist</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mboxlist_db:</b> skiplist</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for the mailbox list.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>flat</i>, <i>berkeley</i>,
+<i>berkeley-hash</i>, <i>skiplist</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>metapartition_files:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Space-separated list of metadata files to be stored on a
+<i>metapartition</i> rather than in the mailbox directory on
+a spool partition.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>header</i>, <i>index</i>,
+<i>cache</i>, <i>expunge</i>, <i>squat</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>metapartition-name:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The pathname of the metadata partition <i>name</i>,
+corresponding to spool partition <b>partition-name</b>. For
+any mailbox residing in a directory on
+<b>partition-name</b>, the metadata files listed in
+<i>metapartition_files</i> will be stored in a corresponding
+directory on <b>metapartition-name</b>. Note that not every
+<b>partition-name</b> option is required to have a
+corresponding <b>metapartition-name</b> option, so that you
+can selectively choose which spool partitions will have
+separate metadata partitions.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_authname:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The SASL username (Authentication Name) to use when
+authenticating to the mupdate server (if needed).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_config:</b> standard</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The configuration of the mupdate servers in the Cyrus
+Murder. The "standard" config is one in which
+there are discreet frontend (proxy) and backend servers. The
+"unified" config is one in which a server can be
+both a frontend and backend. The "replicated"
+config is one in which multiple backend servers all share
+the same mailspool, but each have their own
+"replicated" copy of mailboxes.db.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>standard</i>, <i>unified</i>,
+<i>replicated</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>md5_dir:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Top level directory for MD5 store manipulated by
+make_md5. File structure within this directory is one file
+for each user on the system, hashed on the first letter of
+the userid (e.g: /var/imap/md5/d/dpc22).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>md5_user_map:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Map file (cdb) to allow partial make_md5 runs. Maps
+username to UID</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>munge8bit:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, lmtpd munges messages with 8-bit characters
+in the headers. The 8-bit characters are changed to
+‘X’. If <b>reject8bit</b> is enabled, setting
+<b>munge8bit</b> has no effect. (A proper solution to
+non-ASCII characters in headers is offered by RFC 2047 and
+its predecessors.)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_connections_max:</b> 128</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The max number of connections that a mupdate process will
+allow, this is related to the number of file descriptors in
+the mupdate process. Beyond this number connections will be
+immediately issued a BYE response.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_password:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The SASL password (if needed) to use when authenticating
+to the mupdate server.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_port:</b> 3905</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The port of the mupdate server for the Cyrus Murder</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_realm:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The SASL realm (if needed) to use when authenticating to
+the mupdate server.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_retry_delay:</b> 20</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The base time to wait between connection retries to the
+mupdate server.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_server:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The mupdate server for the Cyrus Murder</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_username:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The SASL username (Authorization Name) to use when
+authenticating to the mupdate server</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_workers_max:</b> 50</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The maximum number of mupdate worker threads
+(overall)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_workers_maxspare:</b> 10</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The maximum number of idle mupdate worker threads</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_workers_minspare:</b> 2</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The minimum number of idle mupdate worker threads</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate_workers_start:</b> 5</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The number of mupdate worker threads to start</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>netscapeurl:</b>
+http://asg.web.cmu.edu/cyrus/imapd/netscape-admin.html</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled at compile time, this specifies a URL to reply
+when Netscape asks the server where the mail administration
+HTTP server is. The default is a site at CMU with a
+hopefully informative message; administrators should set
+this to a local resource with some information of greater
+use.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>newsmaster:</b> news</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Userid that is used for checking access controls when
+executing Usenet control messages. For instance, to allow
+articles to be automatically deleted by cancel messages,
+give the "news" user the ’d’ right on
+the desired mailboxes. To allow newsgroups to be
+automatically created, deleted and renamed by the
+corresponding control messages, give the "news"
+user the ’c’ right on the desired mailbox
+hierarchies.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>newspeer:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>A list of whitespace-separated news server specifications
+to which articles should be fed. Each server specification
+is a string of the form [user[:pass]@]host[:port][/wildmat]
+where ’host’ is the fully qualified hostname of
+the server, ’port’ is the port on which the
+server is listening, ’user’ and
+’pass’ are the authentication credentials and
+’wildmat’ is a pattern that specifies which
+groups should be fed. If no ’port’ is specified,
+port 119 is used. If no ’wildmat’ is specified,
+all groups are fed. If ’user’ is specified (even
+if empty), then the NNTP POST command will be used to feed
+the article to the server, otherwise the IHAVE command will
+be used.</p>
+<!-- INDENTATION -->
+<p>A ’@’ may be used in place of ’!’
+in the wildmat to prevent feeding articles cross-posted to
+the given group, otherwise cross-posted articles are fed if
+any part of the wildmat matches. For example, the string
+"peer.example.com:*,!control.*, at local.*" would
+feed all groups except control messages and local groups to
+peer.example.com. In the case of cross-posting to local
+groups, these articles would not be fed.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>newspostuser:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Userid used to deliver usenet articles to newsgroup
+folders (usually via lmtp2nntp). For example, if set to
+"post", email sent to
+"post+comp.mail.imap" would be delivered to the
+"comp.mail.imap" folder.</p>
+<!-- INDENTATION -->
+<p>When set, the Cyrus NNTP server will add a <i>To:</i>
+header to each incoming usenet article. This <i>To:</i>
+header will contain email delivery addresses corresponding
+to each newsgroup in the <i>Newsgroups:</i> header. By
+default, a <i>To:</i> header is not added to usenet
+articles.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>newsprefix:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Prefix to be prepended to newsgroup names to make the
+corresponding IMAP mailbox names.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>nntptimeout:</b> 3</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Set the length of the NNTP server’s inactivity
+autologout timer, in minutes. The minimum value is 3, the
+default.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>notifysocket:</b>
+{configdirectory}/socket/notify</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Unix domain socket that the mail notification daemon
+listens on.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>partition-name:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The pathname of the partition <i>name</i>. At least one
+field, for the partition named in the
+<b>defaultpartition</b> option, is required. For example, if
+the value of the <b>defaultpartion</b> option is
+<b>default</b>, then the <b>partition-default</b> field is
+required.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>plaintextloginpause:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Number of seconds to pause after a successful plaintext
+login. For systems that support strong authentication, this
+permits users to perceive a cost of using plaintext
+passwords. (This does not affect the use of PLAIN in SASL
+authentications.)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>plaintextloginalert:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Message to send to client after a successful plaintext
+login.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>popexpiretime:</b> -1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The number of days advertised as being the minimum a
+message may be left on the POP server before it is deleted
+(via the CAPA command, defined in the POP3 Extension
+Mechanism, which some clients may support).
+"NEVER", the default, may be specified with a
+negative number. The Cyrus POP3 server never deletes mail,
+no matter what the value of this parameter is. However, if a
+site implements a less liberal policy, it needs to change
+this parameter accordingly.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>popminpoll:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Set the minimum amount of time the server forces users to
+wait between successive POP logins, in minutes.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>popsubfolders:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Allow access to subfolders of INBOX via POP3 by using
+userid+subfolder syntax as the authentication/authorization
+id.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>poppollpadding:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Create a softer minimum poll restriction. Allows
+<i>poppollpadding</i> connections before the minpoll
+restriction is triggered. Additionally, one padding entry is
+recovered every <i>popminpoll</i> minutes. This allows for
+the occasional polling rate faster than popminpoll, (i.e.
+for clients that require a send/receive to send mail) but
+still enforces the rate long-term. Default is 1
+(disabled).</p>
+<!-- INDENTATION -->
+<p>The easiest way to think of it is a queue of past
+connections, with one slot being filled for every
+connection, and one slot being cleared every
+<i>popminpoll</i> minutes. When the queue is full, the user
+will not be able to check mail again until a slot is
+cleared. If the user waits a sufficient amount of time, they
+will get back many or all of the slots.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>poptimeout:</b> 10</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Set the length of the POP server’s inactivity
+autologout timer, in minutes. The minimum value is 10, the
+default.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>popuseacl:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Enforce IMAP ACLs in the pop server. Due to the nature of
+the POP3 protocol, the only rights which are used by the pop
+server are ’r’ and ’d’ for the owner
+of the mailbox. The ’r’ right allows the user to
+open the mailbox and list/retrieve messages. The
+’d’ right allows the user to delete
+messages.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>postmaster:</b> postmaster</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Username that is used as the ’From’ address
+in rejection MDNs produced by sieve.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>postuser:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Userid used to deliver messages to shared folders. For
+example, if set to "bb", email sent to
+"bb+shared.blah" would be delivered to the
+"shared.blah" folder. By default, an email address
+of "+shared.blah" would be used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>proxy_authname:</b> proxy</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The authentication name to use when authenticating to a
+backend server in the Cyrus Murder.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>proxy_password:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The default password to use when authenticating to a
+backend server in the Cyrus Murder. May be overridden on a
+host-specific basis using the hostname_password option.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>proxy_realm:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The authentication realm to use when authenticating to a
+backend server in the Cyrus Murder</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>proxyd_allow_status_referral:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Set to true to allow proxyd to issue referrals to clients
+that support it when answering the STATUS command. This is
+disabled by default since some clients issue many STATUS
+commands in a row, and do not cache the connections that
+these referrals would cause, thus resulting in a higher
+authentication load on the respective backend server.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>proxyservers:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>A list of users and groups that are allowed to proxy for
+other users, separated by spaces. Any user listed in this
+will be allowed to login for any other user: use with
+caution.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>pts_module:</b> afskrb</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The PTS module to use.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>afskrb</i>, <i>ldap</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ptloader_sock:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Unix domain socket that ptloader listens on. (defaults to
+configdir/ptclient/ptsock)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ptscache_db:</b> berkeley</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for the pts cache.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>berkeley</i>, <i>berkeley-hash</i>,
+<i>skiplist</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ptscache_timeout:</b> 10800</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The timeout (in seconds) for the PTS cache database when
+using the auth_krb_pts authorization method (default: 3
+hours).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ptskrb5_convert524:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>When using the AFSKRB ptloader module with Kerberos 5
+canonicalization, do the final 524 conversion to get a n AFS
+style name (using ’.’ instead of
+’/’, and using short names</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ptskrb5_strip_default_realm:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>When using the AFSKRB ptloader module with Kerberos 5
+canonicalization, strip the default realm from the userid
+(this does not affect the stripping of realms specified by
+the afspts_localrealms option)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>quota_db:</b> quotalegacy</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for quotas.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>flat</i>, <i>berkeley</i>,
+<i>berkeley-hash</i>, <i>skiplist</i>,
+<i>quotalegacy</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>quotawarn:</b> 90</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The percent of quota utilization over which the server
+generates warnings.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>quotawarnkb:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The maximum amount of free space (in kB) in which to give
+a quota warning (if this value is 0, or if the quota is
+smaller than this amount, than warnings are always
+given).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>reject8bit:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, lmtpd rejects messages with 8-bit characters
+in the headers.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>rfc2046_strict:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, imapd will be strict (per RFC 2046) when
+matching MIME boundary strings. This means that boundaries
+containing other boundaries as substrings will be treated as
+identical. Since enabling this option will break some
+messages created by Eudora 5.1 (and earlier), it is
+recommended that it be left disabled unless there is good
+reason to do otherwise.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>rfc3028_strict:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, Sieve will be strict (per RFC 3028) with
+regards to which headers are allowed to be used in address
+and envelope tests. This means that only those headers which
+are defined to contain addresses will be allowed in address
+tests and only "to" and "from" will be
+allowed in envelope tests. When disabled, ANY grammatically
+correct header will be allowed.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sasl_auto_transition:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, the SASL library will automatically create
+authentication secrets when given a plaintext password. See
+the SASL documentation.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sasl_maximum_layer:</b> 256</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Maximum SSF (security strength factor) that the server
+will allow a client to negotiate.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sasl_minimum_layer:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The minimum SSF that the server will allow a client to
+negotiate. A value of 1 requires integrity protection; any
+higher value requires some amount of encryption.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sasl_option:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Any SASL option can be set by preceding it with
+"sasl_". This file overrides the SASL
+configuration file.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sasl_pwcheck_method:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The mechanism used by the server to verify plaintext
+passwords. Possible values include "auxprop",
+"saslauthd", and "pwcheck".</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>seenstate_db:</b> skiplist</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for the seen state.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>flat</i>, <i>berkeley</i>,
+<i>berkeley-hash</i>, <i>skiplist</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sendmail:</b> /usr/lib/sendmail</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The pathname of the sendmail executable. Sieve invokes
+sendmail for sending rejections, redirects and vacation
+responses.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>servername:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>This is the hostname visible in the greeting messages of
+the POP, IMAP and LMTP daemons. If it is unset, then the
+result returned from gethostname(2) is used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sharedprefix:</b> Shared Folders</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If using the alternate IMAP namespace, the prefix for the
+shared namespace. The hierarchy delimiter will be
+automatically appended.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sieve_allowreferrals:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, timsieved will issue referrals to clients
+when the user’s scripts reside on a remote server (in
+a Murder). Otherwise, timsieved will proxy traffic to the
+remote server.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sieve_extensions:</b> fileinto reject vacation
+imapflags notify envelope relational regex subaddress
+copy</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Space-separated list of Sieve extensions allowed to be
+used in sieve scripts, enforced at submission by
+timsieved(8). Any previously installed script will be
+unaffected by this option and will continue to execute
+regardless of the extensions used. This option has no effect
+on options that are disabled at compile time (e.g.
+"regex").</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>fileinto</i>, <i>reject</i>,
+<i>vacation</i>, <i>imapflags</i>, <i>notify</i>,
+<i>include</i>, <i>envelope</i>, <i>body</i>,
+<i>relational</i>, <i>regex</i>, <i>subaddress</i>,
+<i>copy</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sieve_maxscriptsize:</b> 32</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Maximum size (in kilobytes) any sieve script can be,
+enforced at submission by timsieved(8).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sieve_maxscripts:</b> 5</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Maximum number of sieve scripts any user may have,
+enforced at submission by timsieved(8).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sievedir:</b> /usr/sieve</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If sieveusehomedir is false, this directory is searched
+for Sieve scripts.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sievenotifier:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Notifyd(8) method to use for "SIEVE"
+notifications. If not set, "SIEVE" notifications
+are disabled.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>This method is only used when no method is specified in
+the script.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sieveusehomedir:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, lmtpd will look for Sieve scripts in
+user’s home directories: ~user/.sieve.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>singleinstancestore:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, imapd, lmtpd and nntpd attempt to only write
+one copy of a message per partition and create hard links,
+resulting in a potentially large disk savings.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>skiplist_unsafe:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, this option forces the skiplist cyrusdb
+backend to not sync writes to the disk. Enabling this option
+is NOT RECOMMENDED.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>soft_noauth:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If enabled, lmtpd returns temporary failures if the
+client does not successfully authenticate. Otherwise lmtpd
+returns permanent failures (causing the mail to bounce
+immediately).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>srvtab:</b> <empty string></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The pathname of <i>srvtab</i> file containing the
+server’s private key. This option is passed to the
+SASL library and overrides its default setting.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>submitservers:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>A list of users and groups that are allowed to resolve
+"urlauth=submit+" IMAP URLs, separated by spaces.
+Any user listed in this will be allowed to fetch the
+contents of any valid "urlauth=submit+" IMAP URL:
+use with caution.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>subscription_db:</b> flat</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for the subscriptions
+list.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>flat</i>, <i>berkeley</i>,
+<i>berkeley-hash</i>, <i>skiplist</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_authname:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The authentication name to use when authenticating to a
+sync server.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_host:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Name of the host (replica running sync_server(8)) to
+which replication actions will be sent by
+sync_client(8).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_log:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Enable replication action logging by lmtpd(8), imapd(8),
+pop3d(8), and nntpd(8). The log {configdirectory}/sync/log
+is used by sync_client(8) for "rolling"
+replication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_machineid:</b> -1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Machine ID of this server which must be unique within a
+cluster. Any negative number, the default, will disable the
+use of UUIDs for replication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_password:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The default password to use when authenticating to a sync
+server.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_realm:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The authentication realm to use when authenticating to a
+sync server.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_repeat_interval:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Minimum interval (in seconds) between replication runs in
+rolling replication mode. If a replication run takes longer
+than this time, we repeat immediately.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_shutdown_file:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Simple latch used to tell sync_client(8) that it should
+shut down at the next opportunity. Safer than sending
+signals to running processes</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>syslog_prefix:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>String to be prepended to the process name in syslog
+entries.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>temp_path:</b> /tmp</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The pathname to store temporary files in</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>timeout:</b> 30</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The length of the IMAP server’s inactivity
+autologout timer, in minutes. The minimum value is 30, the
+default.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tls_ca_file:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>File containing one or more Certificate Authority (CA)
+certificates.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tls_ca_path:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Path to directory with certificates of CAs. This
+directory must have filenames with the hashed value of the
+certificate (see openssl(XXX)).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tlscache_db:</b> berkeley-nosync</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The cyrusdb backend to use for the TLS cache.</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>berkeley</i>, <i>berkeley-nosync</i>,
+<i>berkeley-hash</i>, <i>berkeley-hash-nosync</i>,
+<i>skiplist</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tls_cert_file:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>File containing the certificate presented for server
+authentication during STARTTLS. A value of
+"disabled" will disable SSL/TLS.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tls_cipher_list:</b> DEFAULT</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The list of SSL/TLS ciphers to allow. The format of the
+string is described in ciphers(1).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tls_key_file:</b> <none></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>File containing the private key belonging to the server
+certificate. A value of "disabled" will disable
+SSL/TLS.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tls_require_cert:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Require a client certificate for ALL services (imap,
+pop3, lmtp, sieve).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tls_session_timeout:</b> 1440</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The length of time (in minutes) that a TLS session will
+be cached for later reuse. The maximum value is 1440 (24
+hours), the default. A value of 0 will disable session
+caching.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>umask:</b> 077</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The umask value used by various Cyrus IMAP programs.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>username_tolower:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Convert usernames to all lowercase before
+login/authenticate. This is useful with authentication
+backends which ignore case during username lookups (such as
+LDAP).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>userprefix:</b> Other Users</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>If using the alternate IMAP namespace, the prefix for the
+other users namespace. The hierarchy delimiter will be
+automatically appended.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>unix_group_enable:</b> 1</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Should we look up groups when using auth_unix (disable
+this if you are not using groups in ACLs for your IMAP
+server, and you are using auth_unix with a backend (such as
+LDAP) that can make getgrent() calls very slow)</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>unixhierarchysep:</b> 0</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Use the UNIX separator character ’/’ for
+delimiting levels of mailbox hierarchy. The default is to
+use the netnews separator character ’.’.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>virtdomains:</b> off</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Enable virtual domain support. If enabled, the
+user’s domain will be determined by splitting a fully
+qualified userid at the last ’@’ or
+’%’ symbol. If the userid is unqualified, and
+the virtdomains option is set to "on", then the
+domain will be determined by doing a reverse lookup on the
+IP address of the incoming network interface, otherwise the
+user is assumed to be in the default domain (if set).</p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>off</i>, <i>userid</i>, <i>on</i></p>
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd(8)</b>, <b>pop3d(8)</b>, <b>nntpd(8)</b>,
+<b>lmtpd(8)</b>, <b>timsieved(8)</b>, <b>idled(8)</b>,
+<b>notifyd(8)</b>, <b>deliver(8)</b>, <b>master(8)</b>,
+<b>ciphers(1)</b></p>
+<!-- INDENTATION -->
+<p>Allowed values: <i>off</i>, <i>userid</i>, <i>on</i></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imclient.3.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imclient.3.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imclient.3.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imclient.3.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,872 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>IMCLIENT</title>
+</head>
+<body>
+
+<h1 align=center>IMCLIENT</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#EXAMPLES">EXAMPLES</a><br>
+<a href="#BUGS">BUGS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+<a href="#KEYWORDS">KEYWORDS</a><br>
+<a href="#COPYRIGHT">COPYRIGHT</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>imclient library - authenticating callback interface to
+IMAP/IMSP servers</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>#include <cyrus/imclient.h></b></p>
+<!-- INDENTATION -->
+<p><b>int imclient_connect(struct imclient
+**</b><i>imclient</i><b>, const char *</b><i>host</i><b>,
+const char *</b><i>port</i><b>);</b></p>
+<!-- INDENTATION -->
+<p><b>void imclient_close (struct imclient
+*</b><i>imclient</i><b>);<br>
+void imclient_setflags(struct imclient
+*</b><i>imclient</i><b>, int</b><i>flags</i><b>);<br>
+void imclient_clearflags (struct imclient
+*</b><i>imclient</i><b>, int</b><i>flags</i><b>);<br>
+char* imclient_servername (struct imclient
+*</b><i>imclient</i><b>);<br>
+void imclient_addcallback (struct imclient * imclient
+,...);<br>
+void imclient_send (struct imclient *</b><i>imclient</i><b>,
+void (*</b><i>finishproc</i><b>)(), void
+*</b><i>finishrock</i><b>, const char *</b><i>fmt</i><b>,
+...);<br>
+void imclient_getselectinfo (struct imclient
+*</b><i>imclient</i><b>, int *</b><i>fd</i><b>, int *</b>
+<i>wanttowrite</i><b>);<br>
+void imclient_processoneevent (struct imclient
+*</b><i>imclient</i><b>);<br>
+int imclient_authenticate (struct imclient
+*</b><i>imclient</i><b>, struct sasl_client
+**</b><i>availmech</i><b>, const char
+*</b><i>service</i><b>, const char *</b><i>user</i><b>,
+int</b> <i>protallowed</i><b>);<br>
+int imclient_havetls ();<br>
+int imclient_starttls (struct imclient
+*</b><i>imclient</i><b>, char *</b><i>cert_file</i><b>, char
+*</b><i>key_file</i><b>, char *</b><i>CAfile</i><b>, char
+*</b><i>CApath</i><b>);</b></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>The imclient library functions are distributed with Cyrus
+IMAP and IMSP. These functions are used for building
+IMAP/IMSP client software. These functions handle Kerberos
+authentication and can set callbacks based on the keyword in
+untagged replies or based on the command tag at the end of
+command replies.</p>
+<!-- INDENTATION -->
+<p>Users must link with the -lcyrus switch, and must supply
+a function called <i>fatal</i> to be called in case of any
+error within <i>libcyrus.a.</i></p>
+<!-- INDENTATION -->
+<p>All of the <b>imclient</b> functions begin with the
+prefix <i>imclient</i> and takes an argument of type
+<b>struct imclient *</b> as the first argument which is
+initialized by <b>imclient_connect</b> and freed by
+<b>imclient_close.</b></p>
+<!-- INDENTATION -->
+<p>See below for a description of each function.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_connect()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Connects the client server to the host. If successful, it
+returns 0 and sets the imclient argument to a pointer to an
+<b>imclient</b> struct. The <b>imclient</b> struct
+represents the current connection, flags, and callbacks. On
+failure, the current <b>errno</b> is returned if a system
+call failed, -1 is returned if the host name was not found,
+and -2 is returned if the service name was not found.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_close()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Closes and frees the <b>imclient</b> connection.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_setflags()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Sets the flags specified by the <b>flags</b> argument on
+the <b>imclient</b> connection. Currently the only flag
+allowed is <b>IMCLIENT_CONN_NONSYNCLITERAL</b> (this flag
+indicates that the server supports non-synchronizing
+literals described by the LITERAL+ extension).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_clearflags()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Clears the flags specified by the <b>flags</b> argument
+on the <b>imclient</b> connection.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_servername()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Returns a char * pointer to the name of the server
+connected to by <b>imclient.</b></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_addcallback()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Adds an untagged data callback to the <b>imclient</b>
+connection. The function <b>imclient_addcallback</b> takes
+callbacks of the type <b>imclient_proc_t</b> which is
+defined to be:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>typedef void imclient_proc_t (struct imclient *imclient,
+void *rock, struct imclient_reply *reply);</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>and <b>struct imclient_reply *</b> is defined to
+be:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>struct imclient_reply {</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="29%"></td>
+<td width="70%">
+<p>char *keyword; long msgno; char *text;</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>};</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>After the first argument <b>imclient,</b> there can be
+zero or more instances of the set of <b>keyword, flags,
+proc,</b> and <b>rock,</b> each adding or changing a single
+callback. Each instance adds or changes the callback for
+<b>keyword.</b> The argument, <b>flags,</b> specifies
+information about the parsing of the untagged data.
+<b>proc</b> and <b>rock</b> specify the callback function
+and rock to invoke when the untagged data is received.
+<b>proc</b> may be a null pointer, in which case no function
+is invoked. The callback function may not call the functions
+<b>imclient_close(), imclient_send(), imclient_eof(),
+imclient_processoneevent(),</b> or
+<b>imclient_authenticate()</b> on the connection. The
+callback function may over write the text of untagged
+data.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_send()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Sends a new command to the <b>imclient</b> connection.
+<b>finishproc</b> and <b>finnishrock</b> are the function
+and rock called when the command completes.
+<b>functionproc</b> may be a null pointer, in which case no
+callback is made. The call back function may not call the
+functions <b>imclient_close(), imclient_send(),
+imclient_eof(), imclient_processoneevent(),</b> or
+<b>imclient_authenticate()</b> on the connection. The
+argument, <b>fmt</b> , is a print like specification of the
+command. It must not include the tag as the tag is
+automatically added by imclient_send(). The defined
+%-sequences are:</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p><b>%%</b> for %<b><br>
+%a</b> for an IMAP atom<b><br>
+%s</b> for an astring (which will be quoted or literalized
+as needed)<b><br>
+%d</b> for a decimal<b><br>
+%u</b> for an unsigned decimal<b><br>
+%v</b> for #astring (argument is a null-terminated array of
+<b>char *</b> which are written as space separated
+astrings)</p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_getselectinfo()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Gets the information for calling <b>select(2). fd</b> is
+filled in with the file descriptor to <b>select(2)</b> for
+read. <b>wanttowrite</b> is filled in with a nonzero value
+if select should be used for write as well.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_processoneevent()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Processes one input or output event on the
+<b>imclient</b> connection.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_authenticate()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Authenticates the <b>imclient</b> connection using one of
+the mechanisms in <b>availmech.</b> The argument,
+<b>user,</b> if not NULL, specifies the user to authenticate
+as. If the user is NULL, the current user is used. The
+argument <b>protallowed</b> is a bitmask of permissible
+protection mechanisms.<br>
+On success, 0 is returned. On failure (i.e., "BAD"
+keyboard, or no authentication mechanisms worked), 1 is
+returned. On extreme failure (premature "OK"), 2
+is returned.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_havetls()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Returns a Boolean indicating whether the <b>imclient</b>
+library was compiled with TLS (SSL) support. If so,
+<b>imclient_starttls()</b> may be used to secure the IMAP
+connection.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imclient_starttls()</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>Issues a STARTTLS command on an existing IMAP connection
+and negotiates the secure link. The <b>cert_file</b> and
+<b>key_file</b> arguments specify the client certificate and
+secret key to use to authenticate ourselves to the server.
+If client authentication is not needed, set both of these
+arguments to NULL.</p>
+<!-- INDENTATION -->
+<p>The <b>CAfile</b> and <b>CApath</b> arguments specify a
+file or directory, respectively, of CA certificates for
+validating server certificates. (See
+<b>SSL_CTX_load_verify_locations(3)</b> for details.) If
+both of these are NULL, the client will be unable to
+validate the server’s certificate, in which case the
+connection may succeed but a warning will be printed to
+stdout.</p>
+</td>
+</table>
+<a name="EXAMPLES"></a>
+<h2>EXAMPLES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>The following code is a possible skeletion of
+<b>imclient</b> that relies on Kerberos to do
+authentication. This code preforms an IMAP CAPABILITY
+request and prints out the result.</p>
+<!-- INDENTATION -->
+<pre>struct sasl_client;
+#include <cyrus/xmalloc.h> /* example uses xstrdup */
+#include <cyrus/sasl.h>
+#include <cyrus/imclient.h>
+#include <stdio.h>
+
+extern struct sasl_client krb_sasl_client;
+
+struct sasl_client *login_sasl_client[] = {
+ &krb_sasl_client,
+ NULL
+};
+struct imclient *imclient;
+char server[] = "cyrus.andrew.cmu.edu" ;
+char port[] = "imap";
+
+void fatal(char* message, int rc) {
+ fprintf(stderr, "fatal error: %s\n", message);
+ exit(rc);
+}
+
+static void callback_capability(struct imclient *imclient,
+</pre>
+</td>
+</table>
+<!-- TABS -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="6" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="63%">
+
+<p>void *rock,</p>
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="63%">
+
+<p>struct imclient_reply *reply) {</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>if (reply->text != NULL) {</p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="92%">
+
+<p>*((char**)rock) = xstrdup( reply->text );</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>}<br>
+}</p>
+<!-- INDENTATION -->
+<p>static void end_command (struct imclient *connection,
+void*</p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>rock, struct imclient_reply *inmsg) {</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>(*(int*)rock)--;<br>
+}</p>
+<!-- INDENTATION -->
+<p>main() {<br>
+char* capability_string;<br>
+int nc;</p>
+<!-- INDENTATION -->
+<p>if (imclient_connect(&imclient, server, port))
+{</p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="0%"></td>
+<td width="7%"></td>
+<td width="7%">
+
+<p>fprintf(stderr,</p>
+</td>
+<td width="77%">
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="0%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="77%">
+
+<p>"error: Couldn’t connect to %s
+%s\n",</p>
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="0%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="77%">
+
+<p>server, port);</p>
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="0%"></td>
+<td width="7%"></td>
+<td width="7%">
+
+<p>exit(1);</p>
+</td>
+<td width="77%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>}</p>
+<!-- INDENTATION -->
+<p>if (imclient_authenticate(imclient, login_sasl_client,
+"imap"</p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>/* service */,</p>
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>NULL /* user */, SASL_PROT_ANY)) {</p>
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%"></td>
+<td width="7%">
+
+<p>exit(1);</p>
+</td>
+<td width="7%"></td>
+<td width="70%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>}</p>
+<!-- INDENTATION -->
+<p>imclient_addcallback(imclient,
+"CAPABILITY",</p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>CALLBACK_NOLITERAL,</p>
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>callback_capability,</p>
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>&capability_string,</p>
+</td>
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="70%">
+
+<p>NULL);</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>nc = 1;</p>
+<!-- INDENTATION -->
+<p>imclient_send(imclient, end_command,</p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="7%">
+</td>
+<td width="7%">
+</td>
+<td width="77%">
+
+<p>(void*) &nc, "CAPABILITY");</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>while(nc > 0) {</p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="92%">
+
+<p>imclient_processoneevent(imclient);</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>}</p>
+<!-- INDENTATION -->
+<p>if (strstr("LITERAL+", capability_string))
+{</p></td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="7%"></td>
+<td width="92%">
+
+<p>imclient_setflags(imclient,
+IMCLIENT_CONN_NONSYNCLITERAL);</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>}</p>
+<!-- INDENTATION -->
+<p>imclient_send(imclient, NULL, NULL,
+"LOGOUT");<br>
+imclient_close(imclient);</p>
+<!-- INDENTATION -->
+<p>printf("capability text is: %s\n",
+capability_string);</p>
+<!-- INDENTATION -->
+<p>free(capability_string);<br>
+}</p>
+</td>
+</table>
+<a name="BUGS"></a>
+<h2>BUGS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>No known bugs.</p>
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>cyradm, imapd, imspd,</b> RFC2033 (IMAP LITERAL+
+extension), RFC2060 (IMAP4rev1 specification), and
+<b>select(2)</b></p>
+</td>
+</table>
+<a name="KEYWORDS"></a>
+<h2>KEYWORDS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>IMAP, ACAP, IMSP, Kerberos, Authentication</p>
+</td>
+</table>
+<a name="COPYRIGHT"></a>
+<h2>COPYRIGHT</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Copyright 1997-2002, Carnegie Mellon University. All
+Rights Reserved.</p>
+<!-- INDENTATION -->
+<p>See the source distribution for copying information.</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imtest.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imtest.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imtest.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/imtest.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,407 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>IMTEST</title>
+</head>
+<body>
+
+<h1 align=center>IMTEST</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>imtest − interactive IMAP test program</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imtest</b> [ <b>−t</b> <i>keyfile</i> ] [
+<b>−p</b> <i>port</i> ] [ <b>−m</b>
+<i>mechanism</i> ]<br>
+[ <b>−a</b> <i>userid</i> ] [ <b>−u</b>
+<i>userid</i> ] [ <b>−k</b> <i>num</i> ] [
+<b>−l</b> <i>num</i> ]<br>
+[ <b>−r</b> <i>realm</i> ] [ <b>−f</b>
+<i>file</i> ] [ <b>−n</b> <i>num</i> ] [
+<b>−s</b> ] [ <b>−c</b> ]<br>
+[ <b>−i</b> ] [ <b>−z</b> ] [ <b>−v</b> ]
+[ <b>−I</b> <i>file</i> ] [ <b>−x</b>
+<i>file</i> ]<br>
+[ <b>−X</b> <i>file</i> ] [ <b>−o</b>
+<i>option</i><b>=</b><i>value</i> ] <i>hostname</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>imtest</i> is a utility that allows you to
+authenticate to a IMAP or IMSP server and interactively
+issue commands to it. Once authenticated you may issue any
+IMAP or IMSP command by simply typing it in. It is capable
+of multiple SASL authentication mechanisms and handles
+encryption layers transparently. This utility is often used
+for testing the operation of a imsp or imap server. Also
+those developing IMAP clients find it useful.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−t</b> <i>keyfile</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Enable TLS. <i>keyfile</i> contains the TLS public and
+private keys. Specify <b>""</b> to negotiate a TLS
+encryption layer but not use TLS authentication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>port</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Port to connect to. If left off this defaults to
+<b>imap</b> as defined in /etc/services.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-m</b> <i>mechanism</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Force imtest to use <i>mechanism</i> for authentication.
+If not specified the strongest authentication mechanism
+supported by the server is chosen. Specify <b>login</b> to
+use the LOGIN command instead of AUTHENTICATE.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-a</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authentication; defaults to the current
+user. This is the userid whose password or credentials will
+be presented to the server for verification.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-u</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authorization; defaults to the current
+user. This is the userid whose identity will be assumed
+after authentication. <b>NOTE:</b> This is only used with
+SASL mechanisms that allow proxying (e.g. PLAIN,
+DIGEST-MD5).</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-k</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Minimum protection layer required.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-l</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Maximum protection layer to use (<b>0</b>=none;
+<b>1=</b>integrity; etc). For example if you are using the
+KERBEROS_V4 authentication mechanism specifying <b>0</b>
+will force imtest to not use any layer and specifying
+<b>1</b> will force it to use the integrity layer. By
+default the maximum supported protection layer will be
+used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-r</b> <i>realm</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specify the <i>realm</i> to use. Certain authentication
+mechanisms (e.g. DIGEST-MD5) may require one to specify the
+realm.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-f</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Pipe <i>file</i> into connection after
+authentication.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-n</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Number of authentication attempts; default = 1. The
+client will attempt to do SSL/TLS session reuse and/or fast
+reauth (e.g. DIGEST-MD5), if possible.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-s</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Enable IMAP over SSL (imaps).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-c</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Enable challenge prompt callbacks. This will cause the
+OTP mechanism to ask for the the one-time password instead
+of the secret pass-phrase (library generates the correct
+response).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-i</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Don’t send an initial client response for SASL
+mechanisms, even if the protocol supports it.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-I</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Echo the PID of the running process into <i>file</i>
+(This can be useful with -X).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-x</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Open the named socket for the interactive portion</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-X</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Like -x, only close all file descriptors & daemonize
+the process.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-o</b> <i>option</i><b>=</b><i>value</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Set the SASL <i>option</i> to <i>value</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>-v</b></p>
+</td>
+<td width="13%"></td>
+<td width="69%">
+
+<p>Verbose. Print out more information than usual.</p>
+</td>
+<td width="2%">
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>-z</b></p>
+</td>
+<td width="13%"></td>
+<td width="69%">
+
+<p>Timing test.</p>
+</td>
+<td width="2%">
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/installsieve.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/installsieve.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/installsieve.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/installsieve.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,102 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>INSTALLSIEVE</title>
+</head>
+<body>
+
+<h1 align=center>INSTALLSIEVE</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>installsieve − user utility for managing sieve
+scripts</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>installsieve</b></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>installsieve</i> is a utility that allows users to
+manage their sieve scripts kept on the server.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>-v <name></i> View script with the given name.
+The script if retrieved sucessfully is output to standard
+output.</p>
+<!-- INDENTATION -->
+<p><i>-l</i> List all of the scripts currently on the
+server. If one of the scripts is active a arrow is printed
+indicating that it is the active script.</p>
+<!-- INDENTATION -->
+<p><i>-p <port></i> Port to connect to. If left off
+this defaults to "sieve" as defined in
+/etc/services.</p>
+<!-- INDENTATION -->
+<p><i>-i <file></i> Install a file onto the server. If
+a script with the same name already exists on the server it
+is overwritten. Upon sucessfully putting the script on the
+server the script is set active. If <file> has the
+extension .script it is chopped when put on the server since
+sieve names may not contain a ’.’.</p>
+<!-- INDENTATION -->
+<p><i>-a <name></i> Set <name> as the active
+script. The list of available names can be obtained from the
+’-l’ option..</p>
+<!-- INDENTATION -->
+<p><i>-d <name></i> Delete the sieve script on the
+server with <name>.</p>
+<!-- INDENTATION -->
+<p><i>-m <mechanism></i> Force installsieve to use
+<mechanism> for authentication. If not specified the
+strongest authentication mechanism is chosen.</p>
+<!-- INDENTATION -->
+<p><i>-g <name></i> Get the sieve script with
+<name> and save it to disk with a ".script"
+extension. If a file with that name already exists it is
+overwritten.</p>
+<!-- INDENTATION -->
+<p><i>-u <user></i> Userid/Authname to use for
+authentication; by default, the current user.</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ipurge.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ipurge.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ipurge.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/ipurge.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,244 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>IPURGE</title>
+</head>
+<body>
+
+<h1 align=center>IPURGE</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>ipurge − delete mail from IMAP mailbox or partition
+based on age or size</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>ipurge</b> [ <b>−f</b> ] [ <b>−C</b>
+<i>config-file</i> ] [ <b>−x</b> ] [ <b>−X</b> ]
+[ <b>−i</b> ] [ <b>−s</b> ]<br>
+[ <b>−d</b> <i>days</i> | <b>−b</b> <i>bytes</i>
+| <b>−k</b> <i>Kbytes</i> | <b>−m</b>
+<i>Mbytes</i> ]<br>
+[ <i>mailbox-pattern</i>... ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Ipurge</i> deletes messages from the mailbox(es)
+specified by <i>mailbox-pattern</i> that are older or larger
+than specified by the <b>-d</b>, <b>-b</b>, <b>-k</b> or
+<b>-m</b> options. If no <i>mailbox-pattern</i> is given,
+<i>ipurge</i> works on all mailboxes. If the <b>-x</b>
+option is given, the message age and size MUST match exactly
+those specified by <b>-d</b>, <b>-b</b>, <b>-k</b> or
+<b>-m</b>. The are no default values, and at least one of
+<b>-d</b>, <b>-b</b>, <b>-k</b> or <b>-m</b> MUST be
+specified.</p>
+<!-- INDENTATION -->
+<p><i>Ipurge</i> by default only deletes mail below shared
+folders, which means that mails in mailbox(es) below INBOX.*
+and user.* stay untouched. Use the option <b>-f</b> to also
+delete mail in mailbox(es) below these folders.</p>
+<!-- INDENTATION -->
+<p><i>Ipurge</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−f</b></p>
+</td>
+<td width="13%"></td>
+<td width="58%">
+
+<p>Force deletion of mail in <i>all</i> mailboxes.</p>
+</td>
+<td width="13%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−d</b> <i>days</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Age of message in <i>days</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−b</b> <i>bytes</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Size of message in <i>bytes</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−k</b> <i>Kbytes</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Size of message in <i>Kbytes</i> (2^10 bytes).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−m</b> <i>Mbytes</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Size of message in <i>Mbytes</i> (2^20 bytes).</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−x</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Perform an exact match on age or size (instead of older
+or larger).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−X</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Use delivery time instead of Date: header for date
+matches</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−i</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Invert match logic: -x means not equal, date is for
+newer, size is for smaller</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−s</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Skip over messages that have the \Flagged flag set.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/krb.equiv.5.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/krb.equiv.5.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/krb.equiv.5.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/krb.equiv.5.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,65 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>KRB.EQUIV</title>
+</head>
+<body>
+
+<h1 align=center>KRB.EQUIV</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#SAMPLE FILE">SAMPLE FILE</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/krb.equiv</b> − Kerberos equivalences</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>krb.equiv</i> contains zero or more lines, each of
+which describes a mapping of a kerberos principal
+(<i>userid at host</i>) to a local user (<i>userid</i> or
+alias). Each line of the file consists of two fields,
+separated by at least one whitespace character; other blanks
+are ignored. The first field is the kerberos principal name
+to remap, and the second is the name of the corresponding
+local user.</p>
+</td>
+</table>
+<a name="SAMPLE FILE"></a>
+<h2>SAMPLE FILE</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<pre>tyq4 at ANDY.CMU.EDU tyq4
+tyq4 at DEANNA.ORG tyq4
+ty347 at ECE.CMU.EDU tyq4
+jj12 at ANDY.CMU.EDU tick
+tick at DEANNA.ORG tick
+jy9o at ANDY.CMU.EDU jyager
+jyager at CS.CMU.EDU jyager
+
+</pre>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtpd.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtpd.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtpd.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtpd.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,172 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>LMTPD</title>
+</head>
+<body>
+
+<h1 align=center>LMTPD</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>lmtpd − LMTP server process</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtpd</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−U</b> <i>uses</i> ] [ <b>−T</b>
+<i>timeout</i> ] [ <b>−D</b> ]<br>
+[ <b>−a</b> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Lmtpd</i> is an LMTP server used to deliver mail to
+the IMAP mailstore. It accepts commands on its standard
+input and responds on its standard output. It MUST be
+invoked by <i>master</i>(8) with those descriptors attached
+to a remote client connection.</p>
+<!-- INDENTATION -->
+<p><i>Lmtpd</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−U</b> <i>uses</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The maximum number of times that the process should be
+used for new connections before shutting down. The default
+is 250.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−T</b> <i>timeout</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The number of seconds that the process will wait for a
+new connection before shutting down. Note that a value of 0
+(zero) will disable the timeout. The default is 60.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−D</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Run external debugger specified in debug_command.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−a</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Preauthorize connections initiated on an internet
+socket, instead of requiring LMTP AUTH. This should only be
+used for connections coming from trusted hosts.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtptest.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtptest.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtptest.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/lmtptest.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,328 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:53 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>LMTPTEST</title>
+</head>
+<body>
+
+<h1 align=center>LMTPTEST</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>lmtptest − interactive LMTP test program</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtptest</b> [ <b>−t</b> <i>keyfile</i> ] [
+<b>−p</b> <i>port</i> ] [ <b>−m</b>
+<i>mechanism</i> ]<br>
+[ <b>−a</b> <i>userid</i> ] [ <b>−u</b>
+<i>userid</i> ] [ <b>−k</b> <i>num</i> ] [
+<b>−l</b> <i>num</i> ]<br>
+[ <b>−r</b> <i>realm</i> ] [ <b>−f</b>
+<i>file</i> ] [ <b>−n</b> <i>num</i> ] [
+<b>−c</b> ]<br>
+[ <b>−i</b> ] [ <b>−o</b>
+<i>option</i><b>=</b><i>value</i> ] [ <b>−v</b> ]
+<i>hostname</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>lmtptest</i> is a utility that allows you to
+authenticate to a LMTP server and interactively issue
+commands to it. Once authenticated you may issue any LMTP
+command by simply typing it in. It is capable of multiple
+SASL authentication mechanisms and handles encryption layers
+transparently. This utility is often used for testing the
+operation of a lmtp server. Also those developing LMTP
+clients find it useful.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−t</b> <i>keyfile</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Enable TLS. <i>keyfile</i> contains the TLS public and
+private keys. Specify <b>""</b> to negotiate a TLS
+encryption layer but not use TLS authentication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>port</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Port to connect to. If left off this defaults to
+<b>lmtp</b> as defined in /etc/services.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-m</b> <i>mechanism</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Force lmtptest to use <i>mechanism</i> for
+authentication. If not specified the strongest
+authentication mechanism supported by the server is
+chosen.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-a</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authentication; defaults to the current
+user. This is the userid whose password or credentials will
+be presented to the server for verification.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-u</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authorization; defaults to the current
+user. This is the userid whose identity will be assumed
+after authentication. <b>NOTE:</b> This is only used with
+SASL mechanisms that allow proxying (e.g. PLAIN,
+DIGEST-MD5).</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-k</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Minimum protection layer required.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-l</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Maximum protection layer to use (<b>0</b>=none;
+<b>1=</b>integrity; etc). For example if you are using the
+KERBEROS_V4 authentication mechanism specifying <b>0</b>
+will force lmtptest to not use any layer and specifying
+<b>1</b> will force it to use the integrity layer. By
+default the maximum supported protection layer will be
+used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-r</b> <i>realm</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specify the <i>realm</i> to use. Certain authentication
+mechanisms (e.g. DIGEST-MD5) may require one to specify the
+realm.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-f</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Pipe <i>file</i> into connection after
+authentication.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-n</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Number of authentication attempts; default = 1. The
+client will attempt to do SSL/TLS session reuse and/or fast
+reauth (e.g. DIGEST-MD5), if possible.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-c</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Enable challenge prompt callbacks. This will cause the
+OTP mechanism to ask for the the one-time password instead
+of the secret pass-phrase (library generates the correct
+response).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-i</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Don’t send an initial client response for SASL
+mechanisms, even if the protocol supports it.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-o</b> <i>option</i><b>=</b><i>value</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Set the SASL <i>option</i> to <i>value</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>-v</b></p>
+</td>
+<td width="13%"></td>
+<td width="69%">
+
+<p>Verbose. Print out more information than usual.</p>
+</td>
+<td width="2%">
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>lmtpd(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/make_md5.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/make_md5.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/make_md5.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/make_md5.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,215 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>MAKE_MD5</title>
+</head>
+<body>
+
+<h1 align=center>MAKE_MD5</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#AUTHORS">AUTHORS</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>make_md5 − Generate MD5 checksums for given set of
+users.</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>make_md5</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−D</b> <i>md5_dir</i> ] [ <b>−k</b>
+<i>count</i> ] [ <b>−f</b> <i>input_file</i> ] [
+<b>−m</b> <i>offset</i> ] [ <b>−M</b>
+<i>modulo</i> ] [ <b>−v</b> ] [ <i>userid</i>... ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Generate MD5 checksums for messages given set of users.
+Works as incremental update: reads in existing set of md5
+checksums from <i>md5_dir/u/userid</i> (hashed on first
+letter of userid) if that file exists. Scans account looking
+for new messages, and then updates record.</p>
+<!-- INDENTATION -->
+<p>The MD5 checksums which are generated are used to test
+integrity of the master, replica and backup systems on
+Hermes.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−D</b> <i>md5_dir</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read and write md5 checksums from <i>md5_dir</i>,
+overrides configuration file setting of the same name.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−k</b> <i>count</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Concurrency level: run up to <i>count</i> asynchronous
+child processes.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−f</b> <i>input_file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>List of accounts to process: use in place of command line
+arguments.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−m</b> <i>offset</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Regenerate given fraction of the user database in
+combination with −M below.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−M</b> <i>modulo</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Regenerate MD5 checksums for given fraction of user
+database. Allows for rolling consisency checks.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−v</b></p>
+</td>
+<td width="13%"></td>
+<td width="19%">
+
+<p>Verbose mode.</p>
+</td>
+<td width="52%">
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="AUTHORS"></a>
+<h2>AUTHORS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>David Carter (dpc22 at cam.ac.uk)</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/master.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/master.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/master.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/master.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,294 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>MASTER</title>
+</head>
+<body>
+
+<h1 align=center>MASTER</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#CONFIGURATION">CONFIGURATION</a><br>
+<a href="#NOTES">NOTES</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>master − master Cyrus process</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>master</b> [ <b>−C</b> <i>alternate
+imapd.conf</i> ] [ <b>−M</b> <i>alternate
+cyrus.conf</i> ] [ <b>−l</b> <i>listen queue</i> ] [
+<b>−p</b> <i>pidfile</i> ] [ <b>−P</b> <i>snmp
+agentx ping interval</i> ] [ <b>−j</b> <i>janitor
+period</i> ] [ <b>−d</b> ] [ <b>−D</b> ] [
+<b>−x</b> <i>snmp agentx socket</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Master</i> is the process that controls all of the
+Cyrus processes. This process is responsible for creating
+all imapd, pop3d, lmtpd and sieved child processes. This
+process also initializes the Berkeley DB code and performs
+scheduled cleanup/maintenance.</p>
+<!-- INDENTATION -->
+<p>If this process dies, then no new sessions will be
+started.</p>
+<!-- INDENTATION -->
+<p>It kills itself and all child processes when it receives
+a SIGTERM.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>alternate imapd.conf</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specifies an alternate imapd.conf for use by master (note
+that this will not affect any sub-processes spawned by
+master, you should specify those specifically in the
+respective entries in cyrus.conf).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−M</b> <i>alternate cyrus.conf</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specifies an alternate cyrus.conf for use by master.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−l</b> <i>listen queue backlog</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Increase the listen queue backlog. By default, the listen
+queue is set to 32. On systems with a high connection rate,
+it may be desirable to increase this value. refer to
+<b>listen(2)</b> for details.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−j</b> <i>janitor full-sweeps per
+second</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Sets the amount of times per second the janitor should
+sweep the entire child table. Leave it at the default of 1
+unless you have a really high fork rate (and you have not
+increased the child hash table size when you compiled Cyrus
+from its default of 10000 entries).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>pidfile</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Use <i>pidfile</i> as the pidfile. If not specified,
+defaults to /var/run/cyrus-master.pid</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−P</b> <i>snmp agentx ping interval</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Sets the amount on time in seconds the subagent will try
+and reconnect to the master agent (snmpd) if it ever becomes
+(or starts) disconnected. Requires net-snmp 5.0 or
+higher.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−d</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Start in daemon mode (run in background and disconnect
+from controlling terminal).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−D</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Don’t close stdin/stdout/stderr. Primiarly useful
+for debugging.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−x</b> <i>snmp agentx socket</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Address the master agent (most likely snmpd) listens on.
+Requires net-snmp 5.0 or higher.</p>
+</td>
+</table>
+<a name="CONFIGURATION"></a>
+<h2>CONFIGURATION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Upon execution, <i>master</i> reads its configuration
+information out of the <i>cyrus.conf</i>(5) file.</p>
+<!-- INDENTATION -->
+<p><i>Master</i> rereads its configuration file when it
+receives a hangup signal, SIGHUP. Services and events may be
+added, deleted or modified when the configuration file is
+reread. Any active services removed from the configuration
+file will be allowed to run until completion.</p>
+</td>
+</table>
+<a name="NOTES"></a>
+<h2>NOTES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>The environment variable <b>CYRUS_VERBOSE</b> can be set
+to log additional debugging information. Setting the value
+to 1 results in base level logging. Setting it higher
+results in more log messages being generated.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/cyrus.conf, /etc/imapd.conf,
+/var/run/cyrus-master.pid</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>cyrus.conf(5)</b>, <b>imapd.conf(5)</b>,
+<b>imapd(8)</b>, <b>pop3d(8)</b>, <b>lmtpd(8)</b>,
+<b>timsieved(8)</b>, <b>idled(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbexamine.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbexamine.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbexamine.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbexamine.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,120 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>MBEXAMINE</title>
+</head>
+<body>
+
+<h1 align=center>MBEXAMINE</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>mbexamine − examine a cyrus-format mailbox</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mbexamine</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−u uid</b> ] <i>mailbox</i>...<b><br>
+mbexamine</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−s seqnum</b> ] <i>mailbox</i>...</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Mbexamine</i> will examine the header, index, and
+cache files of a cyrus format mailbox and dump the
+information contained therein. It can also limit its output
+to a specific uid or sequence number, through use of the -s
+and -u switches. <i>Mbexamine</i> reads its configuration
+options out of the <i>imapd.conf</i>(5) file unless
+specified otherwise by <b>-C</b>. It uses the mboxlist
+database to locate the mailbox on disk.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−s</b></p>
+</td>
+<td width="13%"></td>
+<td width="72%">
+
+<p>Dump information for the given sequence number only.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−u</b></p>
+</td>
+<td width="13%"></td>
+<td width="72%">
+
+<p>Dump information for the given uid only.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbpath.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbpath.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbpath.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mbpath.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,107 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>MBPATH</title>
+</head>
+<body>
+
+<h1 align=center>MBPATH</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>mbpath − translate mailbox names to filesystem
+paths</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mbpath</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−q</b> ] [ <b>−s</b> ] [ <b>−m</b> ] [
+<i>mailbox-names</i>... ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>Given a mailbox name or a space separated list of mailbox
+names, <i>mbpath</i> outputs the filesystem path to the
+mailbox.</p>
+<!-- INDENTATION -->
+<p><i>Mbpath</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>−q</i> suppress any error output.</p>
+<!-- INDENTATION -->
+<p><i>−s</i> if any error occurs, stop processing the
+list of mailboxes and exit.</p>
+<!-- INDENTATION -->
+<p><i>−m</i> output the path to the metadata files (if
+different from the message files).</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mupdatetest.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mupdatetest.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mupdatetest.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/mupdatetest.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,303 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>MUPDATETEST</title>
+</head>
+<body>
+
+<h1 align=center>MUPDATETEST</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>mupdatetest − interactive MUPDATE test program</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdatetest</b> [ <b>−p</b> <i>port</i> ] [
+<b>−m</b> <i>mechanism</i> ]<br>
+[ <b>−a</b> <i>userid</i> ] [ <b>−u</b>
+<i>userid</i> ] [ <b>−k</b> <i>num</i> ] [
+<b>−l</b> <i>num</i> ]<br>
+[ <b>−r</b> <i>realm</i> ] [ <b>−f</b>
+<i>file</i> ] [ <b>−n</b> <i>num</i> ] [
+<b>−c</b> ]<br>
+[ <b>−i</b> ] [ <b>−o</b>
+<i>option</i><b>=</b><i>value</i> ] [ <b>−v</b> ]
+<i>hostname</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>mupdatetest</i> is a utility that allows you to
+authenticate to a MUPDATE server and interactively issue
+commands to it. Once authenticated you may issue any MUPDATE
+command by simply typing it in. It is capable of multiple
+SASL authentication mechanisms and handles encryption layers
+transparently. This utility is often used for testing the
+operation of a mupdate server. Note that you must be an
+admin in order to authenticate to an mupdate server.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>port</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Port to connect to. If left off this defaults to
+<b>mupdate</b> as defined in /etc/services.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-m</b> <i>mechanism</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Force mupdatetest to use <i>mechanism</i> for
+authentication. If not specified the strongest
+authentication mechanism supported by the server is
+chosen.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-a</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authentication; defaults to the current
+user. This is the userid whose password or credentials will
+be presented to the server for verification.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-u</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authorization; defaults to the current
+user. This is the userid whose identity will be assumed
+after authentication. <b>NOTE:</b> This is only used with
+SASL mechanisms that allow proxying (e.g. PLAIN,
+DIGEST-MD5).</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-k</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Minimum protection layer required.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-l</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Maximum protection layer to use (<b>0</b>=none;
+<b>1=</b>integrity; etc). For example if you are using the
+KERBEROS_V4 authentication mechanism specifying <b>0</b>
+will force mupdatetest to not use any layer and specifying
+<b>1</b> will force it to use the integrity layer. By
+default the maximum supported protection layer will be
+used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-r</b> <i>realm</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specify the <i>realm</i> to use. Certain authentication
+mechanisms (e.g. DIGEST-MD5) may require one to specify the
+realm.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-f</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Pipe <i>file</i> into connection after
+authentication.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-n</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Number of authentication attempts; default = 1. The
+client will attempt to fast reauth (e.g. DIGEST-MD5), if
+possible.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-c</b></p>
+</td>
+<td width="77%">
+
+<p>Enable challenge prompt callbacks. This will cause the
+OTP mechanism to ask for the the one-time password instead
+of the secret pass-phrase (library generates the correct
+response).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-i</b></p>
+</td>
+<td width="77%">
+
+<p>Don’t send an initial client response for SASL
+mechanisms, even if the protocol supports it.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-o</b> <i>option</i><b>=</b><i>value</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Set the SASL <i>option</i> to <i>value</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>-v</b></p>
+</td>
+<td width="13%"></td>
+<td width="69%">
+
+<p>Verbose. Print out more information than usual.</p>
+</td>
+<td width="2%">
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>mupdate(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntpd.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntpd.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntpd.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntpd.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,228 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>NNTPD</title>
+</head>
+<body>
+
+<h1 align=center>NNTPD</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>nntpd − NNTP server process</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>nntpd</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−U</b> <i>uses</i> ] [ <b>−T</b>
+<i>timeout</i> ] [ <b>−D</b> ]<br>
+[ <b>−s</b> ] [ <b>−r</b> ] [ <b>−f</b> ]
+[ <b>−p</b> <i>ssf</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Nntpd</i> is a NNTP server. It accepts commands on its
+standard input and responds on its standard output. It MUST
+invoked by <i>master</i>(8) with those descriptors attached
+to a remote client connection.</p>
+<!-- INDENTATION -->
+<p><i>Nntpd</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>. The optional <i>newsprefix</i> option specifies a
+prefix to be prepended to newsgroup names to make the
+corresponding IMAP mailbox names. The optional
+<i>newspostuser</i> option specifies the special userid to
+be used when contructing the To: header address for
+following up to articles when read via IMAP. The optional
+<i>newspeer</i> option specifies the fully qualified
+hostname of the upstream news server to which articles are
+fed. The optional <i>allownewnews</i> option enables the
+NNTP NEWNEWS command. NOTE: For servers with a large volume
+of articles, the NEWNEWS command can be expensive.</p>
+<!-- INDENTATION -->
+<p>If the directory log/<i>user</i> exists under the
+directory specified in the <i>configdirectory</i>
+configuration option, then <i>nntpd</i> will create protocol
+telemetry logs for sessions authenticating as <i>user</i>.
+The telemetry logs will be stored in the log/<i>user</i>
+directory with a filename of the <i>nntpd</i>
+process-id.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−U</b> <i>uses</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The maximum number of times that the process should be
+used for new connections before shutting down. The default
+is 250.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−T</b> <i>timeout</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The number of seconds that the process will wait for a
+new connection before shutting down. Note that a value of 0
+(zero) will disable the timeout. The default is 60.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−D</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Run external debugger specified in debug_command.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−s</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Serve NNTP over SSL (nntps). All data to and from
+<i>nntpd</i> is encrypted using the Secure Sockets
+Layer.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−r</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Only allow NNTP reader commands. Permitted clients will
+only be allowed to read/post articles.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−f</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Only allow NNTP feeder commands. Permitted clients will
+only be allowed to feed articles (no reading).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−p</b> <i>ssf</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Tell <i>nntpd</i> that an external layer exists. An SSF
+(security strength factor) of 1 means an integrity
+protection layer exists. Any higher SSF implies some form of
+privacy protection.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntptest.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntptest.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntptest.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/nntptest.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,334 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>NNTPTEST</title>
+</head>
+<body>
+
+<h1 align=center>NNTPTEST</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>nntptest − interactive NNTP test program</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>nntptest</b> [ <b>−t</b> <i>keyfile</i> ] [
+<b>−p</b> <i>port</i> ] [ <b>−m</b>
+<i>mechanism</i> ]<br>
+[ <b>−a</b> <i>userid</i> ] [ <b>−u</b>
+<i>userid</i> ] [ <b>−k</b> <i>num</i> ] [
+<b>−l</b> <i>num</i> ]<br>
+[ <b>−r</b> <i>realm</i> ] [ <b>−f</b>
+<i>file</i> ] [ <b>−n</b> <i>num</i> ] [
+<b>−s</b> ] [ <b>−c</b> ]<br>
+[ <b>−i</b> ] [ <b>−o</b>
+<i>option</i><b>=</b><i>value</i> ] [ <b>−v</b> ]
+<i>hostname</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>nntptest</i> is a utility that allows you to
+authenticate to a NNTP server and interactively issue
+commands to it. Once authenticated you may issue any NNTP
+command by simply typing it in. It is capable of multiple
+SASL authentication mechanisms and handles encryption layers
+transparently. This utility is often used for testing the
+operation of a nntp server. Also those developing NNTP
+clients find it useful.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−t</b> <i>keyfile</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Enable TLS. <i>keyfile</i> contains the TLS public and
+private keys. Specify <b>""</b> to negotiate a TLS
+encryption layer but not use TLS authentication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>port</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Port to connect to. If left off this defaults to
+<b>nntp</b> as defined in /etc/services.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-m</b> <i>mechanism</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Force nntptest to use <i>mechanism</i> for
+authentication. If not specified the strongest
+authentication mechanism supported by the server is chosen.
+Specify <b>user</b> to use the AUTHINFO USER/PASS commands
+instead of AUTHINFO SASL.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-a</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authentication; defaults to the current
+user. This is the userid whose password or credentials will
+be presented to the server for verification.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-u</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authorization; defaults to the current
+user. This is the userid whose identity will be assumed
+after authentication. <b>NOTE:</b> This is only used with
+SASL mechanisms that allow proxying (e.g. PLAIN,
+DIGEST-MD5).</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-k</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Minimum protection layer required.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-l</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Maximum protection layer to use (<b>0</b>=none;
+<b>1=</b>integrity; etc). For example if you are using the
+KERBEROS_V4 authentication mechanism specifying <b>0</b>
+will force nntptest to not use any layer and specifying
+<b>1</b> will force it to use the integrity layer. By
+default the maximum supported protection layer will be
+used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-r</b> <i>realm</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specify the <i>realm</i> to use. Certain authentication
+mechanisms (e.g. DIGEST-MD5) may require one to specify the
+realm.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-f</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Pipe <i>file</i> into connection after
+authentication.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-n</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Number of authentication attempts; default = 1. The
+client will attempt to do SSL/TLS session reuse and/or fast
+reauth (e.g. DIGEST-MD5), if possible.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-s</b></p>
+</td>
+<td width="77%">
+
+<p>Enable NNTP over SSL (nntps).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-c</b></p>
+</td>
+<td width="77%">
+
+<p>Enable challenge prompt callbacks. This will cause the
+OTP mechanism to ask for the the one-time password instead
+of the secret pass-phrase (library generates the correct
+response).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-i</b></p>
+</td>
+<td width="77%">
+
+<p>Don’t send an initial client response for SASL
+mechanisms, even if the protocol supports it.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-o</b> <i>option</i><b>=</b><i>value</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Set the SASL <i>option</i> to <i>value</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>-v</b></p>
+</td>
+<td width="13%"></td>
+<td width="69%">
+
+<p>Verbose. Print out more information than usual.</p>
+</td>
+<td width="2%">
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>nntpd(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/notifyd.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/notifyd.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/notifyd.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/notifyd.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,243 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>NOTIFYD</title>
+</head>
+<body>
+
+<h1 align=center>NOTIFYD</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#NOTIFICATION METHODS">NOTIFICATION METHODS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>notifyd − Cyrus notification server</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>notifyd</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−U</b> <i>uses</i> ] [ <b>−T</b>
+<i>timeout</i> ]<br>
+[ <b>−D</b> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>Notifyd</b> is a daemon started from master(8) that
+handles notification requests on behalf of lmtpd(8).
+<b>Notifyd</b> accepts the request and performs the
+notification using the method specified in the request.</p>
+<!-- INDENTATION -->
+<p>Note that for <b>notifyd</b> to run properly you must set
+proto=udp in its cyrus.conf services entry. prefork=1 is
+also recommended.</p>
+<!-- INDENTATION -->
+<p><b>Notifyd</b> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>. The <i>notifysocket</i> option is used to specify
+the Unix domain socket to listen on for notifications.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−U</b> <i>uses</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The maximum number of times that the process should be
+used for new connections before shutting down. The default
+is 250.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−T</b> <i>timeout</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The number of seconds that the process will wait for a
+new connection before shutting down. Note that a value of 0
+(zero) will disable the timeout. The default is 60.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−D</b></p>
+</td>
+<td width="13%"></td>
+<td width="72%">
+
+<p>Run external debugger specified in debug_command.</p>
+</td>
+<td width="0%">
+</td>
+</table>
+<a name="NOTIFICATION METHODS"></a>
+<h2>NOTIFICATION METHODS</h2>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>null</b></p>
+</td>
+<td width="77%">
+
+<p>Ignore the notification request.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>log</b></p>
+</td>
+<td width="77%">
+
+<p>Log the notification to syslog (for testing).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>mailto</b></p>
+</td>
+<td width="77%">
+
+<p>Email the notification. This method can ONLY be used in
+a Sieve ’notify’ action as it requires a
+<i>mailto:</i> URL to be specified as an <i>:option</i>.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>zephyr</b></p>
+</td>
+<td width="77%">
+
+<p>Send the notification as a zephyrgram. If used in a
+Sieve ’notify’ action, additional recipients can
+be specified as <i>:options</i>.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Default configuration file.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/cyrus.conf</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Cyrus Master process configuration file.</p>
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>cyrus.conf</b>,
+<b>master(8)</b>, <b>lmtpd(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3d.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3d.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3d.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3d.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,206 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>POP3D</title>
+</head>
+<body>
+
+<h1 align=center>POP3D</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>pop3d − POP3 server process</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>pop3d</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−U</b> <i>uses</i> ] [ <b>−T</b>
+<i>timeout</i> ] [ <b>−D</b> ]<br>
+[ <b>−s</b> ] [ <b>−k</b> ] [ <b>−p</b>
+<i>ssf</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Pop3d</i> is a POP3 server. It accepts commands on its
+standard input and responds on its standard output. It MUST
+invoked by <i>master</i>(8) with those descriptors attached
+to a remote client connection.</p>
+<!-- INDENTATION -->
+<p><i>Pop3d</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+<!-- INDENTATION -->
+<p>If the directory log/<i>user</i> exists under the
+directory specified in the <i>configdirectory</i>
+configuration option, then <i>pop3d</i> will create protocol
+telemetry logs for sessions authenticating as <i>user</i>.
+The telemetry logs will be stored in the log/<i>user</i>
+directory with a filename of the <i>pop3d</i>
+process-id.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−U</b> <i>uses</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The maximum number of times that the process should be
+used for new connections before shutting down. The default
+is 250.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−T</b> <i>timeout</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The number of seconds that the process will wait for a
+new connection before shutting down. Note that a value of 0
+(zero) will disable the timeout. The default is 60.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−D</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Run external debugger specified in debug_command.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−s</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Serve POP3 over SSL (pop3s). All data to and from
+<i>pop3d</i> is encrypted using the Secure Sockets
+Layer.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−k</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Serve MIT’s KPOP (Kerberized POP) protocol
+instead.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−p</b> <i>ssf</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Tell <i>pop3d</i> that an external layer exists. An SSF
+(security strength factor) of 1 means an integrity
+protection layer exists. Any higher SSF implies some form of
+privacy protection.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3test.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3test.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3test.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/pop3test.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,334 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>POP3TEST</title>
+</head>
+<body>
+
+<h1 align=center>POP3TEST</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>pop3test − interactive POP3 test program</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>pop3test</b> [ <b>−t</b> <i>keyfile</i> ] [
+<b>−p</b> <i>port</i> ] [ <b>−m</b>
+<i>mechanism</i> ]<br>
+[ <b>−a</b> <i>userid</i> ] [ <b>−u</b>
+<i>userid</i> ] [ <b>−k</b> <i>num</i> ] [
+<b>−l</b> <i>num</i> ]<br>
+[ <b>−r</b> <i>realm</i> ] [ <b>−f</b>
+<i>file</i> ] [ <b>−n</b> <i>num</i> ] [
+<b>−s</b> ] [ <b>−c</b> ]<br>
+[ <b>−i</b> ] [ <b>−o</b>
+<i>option</i><b>=</b><i>value</i> ] [ <b>−v</b> ]
+<i>hostname</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>pop3test</i> is a utility that allows you to
+authenticate to a POP3 server and interactively issue
+commands to it. Once authenticated you may issue any POP3
+command by simply typing it in. It is capable of multiple
+SASL authentication mechanisms and handles encryption layers
+transparently. This utility is often used for testing the
+operation of a pop3 server. Also those developing POP3
+clients find it useful.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−t</b> <i>keyfile</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Enable TLS. <i>keyfile</i> contains the TLS public and
+private keys. Specify <b>""</b> to negotiate a TLS
+encryption layer but not use TLS authentication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>port</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Port to connect to. If left off this defaults to
+<b>pop3</b> as defined in /etc/services.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-m</b> <i>mechanism</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Force pop3test to use <i>mechanism</i> for
+authentication. If not specified the strongest
+authentication mechanism supported by the server is chosen.
+Specify <b>user</b> to use the USER/PASS commands or
+<b>apop</b> to use the APOP command instead of AUTH.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-a</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authentication; defaults to the current
+user. This is the userid whose password or credentials will
+be presented to the server for verification.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-u</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authorization; defaults to the current
+user. This is the userid whose identity will be assumed
+after authentication. <b>NOTE:</b> This is only used with
+SASL mechanisms that allow proxying (e.g. PLAIN,
+DIGEST-MD5).</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-k</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Minimum protection layer required.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-l</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Maximum protection layer to use (<b>0</b>=none;
+<b>1=</b>integrity; etc). For example if you are using the
+KERBEROS_V4 authentication mechanism specifying <b>0</b>
+will force pop3test to not use any layer and specifying
+<b>1</b> will force it to use the integrity layer. By
+default the maximum supported protection layer will be
+used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-r</b> <i>realm</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specify the <i>realm</i> to use. Certain authentication
+mechanisms (e.g. DIGEST-MD5) may require one to specify the
+realm.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-f</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Pipe <i>file</i> into connection after
+authentication.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-n</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Number of authentication attempts; default = 1. The
+client will attempt to do SSL/TLS session reuse and/or fast
+reauth (e.g. DIGEST-MD5), if possible.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-s</b></p>
+</td>
+<td width="77%">
+
+<p>Enable POP3 over SSL (pop3s).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-c</b></p>
+</td>
+<td width="77%">
+
+<p>Enable challenge prompt callbacks. This will cause the
+OTP mechanism to ask for the the one-time password instead
+of the secret pass-phrase (library generates the correct
+response).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-i</b></p>
+</td>
+<td width="77%">
+
+<p>Don’t send an initial client response for SASL
+mechanisms, even if the protocol supports it.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-o</b> <i>option</i><b>=</b><i>value</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Set the SASL <i>option</i> to <i>value</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>-v</b></p>
+</td>
+<td width="13%"></td>
+<td width="69%">
+
+<p>Verbose. Print out more information than usual.</p>
+</td>
+<td width="2%">
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>pop3d(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/quota.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/quota.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/quota.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/quota.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,135 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>QUOTA</title>
+</head>
+<body>
+
+<h1 align=center>QUOTA</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>quota − report and optionally fix quota usage</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>quota</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−d</b> <i>domain</i> ] [ <b>−f</b> ] [
+<i>mailbox-prefix</i>... ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Quota</i> generates a report listing quota roots,
+giving their limits and usage. If the <i>−f</i> option
+is given, <i>quota</i> first fixes any inconsistencies in
+the quota subsystem, such as mailboxes with the wrong quota
+root or quota roots with the wrong quota usage reported. If
+an optional <i>domain</i> is given, the quota listing (and
+inconsistency fixing) is performed in that domain rather
+than the default domain. If any optional
+<i>mailbox-prefix</i> arguments are given, the quota listing
+(and inconsistency fixing) is limited to quota roots with
+names that start with one of the given prefixes.</p>
+<!-- INDENTATION -->
+<p>Running <i>quota</i> with both the <i>−f</i> option
+and <i>mailbox-prefix</i> arguments is not recommended.</p>
+<!-- INDENTATION -->
+<p><i>Quota</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−d</b> <i>domain</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>List/fix quotas in <i>domain</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="13%"></td>
+<td width="2%">
+
+<p><b>−f</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Fix any inconsistencies in the quota subsystem before
+generating a report.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/reconstruct.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/reconstruct.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/reconstruct.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/reconstruct.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,222 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>RECONSTRUCT</title>
+</head>
+<body>
+
+<h1 align=center>RECONSTRUCT</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#EXAMPLES">EXAMPLES</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>reconstruct − reconstruct mailboxes</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>reconstruct</b> [ <b>−C</b> <i>config-file</i> ]
+[ <b>−p</b> <i>partition</i> ] [ <b>−x</b> ] [
+<b>−r</b> ] [ <b>−f</b> ]
+<i>mailbox</i>...<b><br>
+reconstruct</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−m</b></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Reconstruct</i> rebuilds one or more IMAP mailboxes.
+When invoked with the <b>−m</b> switch, it rebuilds
+the master mailboxes file. It can be used to recover from
+almost any sort of data corruption.</p>
+<!-- INDENTATION -->
+<p>If <i>Reconstruct</i> can find existing header and index
+files, it attempts to preserve any data in them that is not
+derivable from the message files themselves. The state
+<i>reconstruct</i> attempts to preserve includes the flag
+names, flag state, and internaldate. <i>Reconstruct</i>
+derives all other information from the message files.</p>
+<!-- INDENTATION -->
+<p><i>Reconstruct</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>. Any mailbox directory underneath the path
+specified in the <i>partition-news</i> configuration option
+is assumed to be in news format.</p>
+<!-- INDENTATION -->
+<p><i>Reconstruct</i> does not adjust the quota usage
+recorded in any quota root files. After running
+<i>reconstruct</i>, it is advisable to run <i>quota</i>(8)
+with the <i>−f</i> switch in order to fix the quota
+root files.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>partition</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Search for the listed (non-existant) mailboxes on the
+indicated partition. Create the mailboxes in the database in
+addition to reconstructing them. (not compatible with the
+use of wildcards)</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−x</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>When processing a mailbox which is not in the mailbox
+list (e.g. via the -p or -f options), do not import the
+metadata from the mailbox, instead create it anew (this
+specifically affects at least the mailbox’s seen state
+unique identifier, user flags, and ACL).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−r</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Recursively reconstruct all sub-mailboxes of the
+mailboxes or mailbox prefixes given as arguments.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−f</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Examine the filesystem underneath mailbox, adding all
+directories with a cyrus.header found there as new
+mailboxes. Useful for restoring mailboxes from backups.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−m</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p><b>NOTE: CURRENTLY UNAVAILABLE</b></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Rebuild the <i>mailboxes</i> file. Use whatever data in
+the existing <i>mailboxes</i> file it can scavenge, then
+scans all partitions listed in the <i>imapd.conf</i>(5) file
+for additional mailboxes.</p>
+</td>
+</table>
+<a name="EXAMPLES"></a>
+<h2>EXAMPLES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>You want to reconstruct the index files for a user, you
+have recovered a deleted mail file from backup and given it
+a suitable name (eg user/ben-lacy/33.), but it is not
+visible since it is not indexed:</p>
+<!-- INDENTATION -->
+<pre>reconstruct -r user.ben-lacy
+</pre>
+<!-- INDENTATION -->
+<p>If you have the <b>unixhierarchysep:yes</b> option set in
+<b>/etc/imapd.conf</b> you would need to run:</p>
+<!-- INDENTATION -->
+<pre>reconstruct -r user/ben.lacy
+</pre>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/rmnews.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/rmnews.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/rmnews.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/rmnews.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,85 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>RMNEWS</title>
+</head>
+<body>
+
+<h1 align=center>RMNEWS</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>rmnews − expunge and remove news articles</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>rmnews</b></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Rmnews</i> reads article data from the standard input.
+It then expunges and removes the listed articles.
+<i>Rmnews</i> is designed to be used by InterNetNews to
+remove canceled, superseded, and expired news articles.</p>
+<!-- INDENTATION -->
+<p>The input is processed as an INN <i>expirerm</i> file
+listing or an INN cancel stream written as a
+‘‘WC’’ entry in the
+<i>newsfeeds</i>(5) file. This data consists of lines of
+text, each containing a list of relative article pathnames,
+with a single space between entries. If a listed file is
+contained in an IMAP news mailbox, it is expunged out of
+that mailbox. In any case, each listed file is unlinked.</p>
+<!-- INDENTATION -->
+<p><i>Rmnews</i> reads its configuration options out of the
+<i>imapd.conf</i>(5) file. The optional <i>newsprefix</i>
+option specifies a prefix to be prepended to newsgroup names
+to make the corresponding IMAP mailbox names. The required
+<i>partition-news</i> option specifies the pathname prefix
+to the IMAP news mailboxes. The value of
+<i>partition-news</i> concatenated with the
+dots-to-slashes-converted value of <i>newsprefix</i> must be
+the pathname of the news spool directory.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sieveshell.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sieveshell.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sieveshell.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sieveshell.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,100 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>sieveshell - remotely manipulate sieve scripts</title>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<link rev="made" href="mailto:root at localhost" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#options">OPTIONS</a></li>
+ <li><a href="#references">REFERENCES</a></li>
+ <li><a href="#author">AUTHOR</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>sieveshell - remotely manipulate sieve scripts</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<p>sieveshell [<strong>--user</strong>=<em>user</em>] [<strong>--authname</strong>=<em>authname</em>]
+[<strong>--realm</strong>=<em>realm</em>] [<strong>--exec</strong>=<em>script</em>] <em>server</em>[<strong>:</strong><em>port</em>]</p>
+<p>sieveshell <strong>--help</strong></p>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p><strong>sieveshell</strong> allows users to manipulate their scripts on a remote
+server. It works via MANAGESIEVE, a work in progress.</p>
+<p>The following commands are recognized:</p>
+<p><strong>list</strong> list scripts on server.</p>
+<p><strong>put</strong> <filename> upload script to server.</p>
+<p><strong>get</strong> <name> [<filename>] get script. if no filename display to stdout</p>
+<p><strong>delete</strong> <name> delete script.</p>
+<p><strong>activate</strong> <name> activate script.</p>
+<p><strong>deactivate</strong> deactivate all scripts.</p>
+<p>
+</p>
+<hr />
+<h1><a name="options">OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="item__2du_user_2c__2d_2duser_3duser"><strong>-u</strong> <em>user</em>, <strong>--user</strong>=<em>user</em></a></strong>
+
+<dd>
+<p>The authorization name to request; by default, derived from the
+authentication credentials.</p>
+</dd>
+</li>
+<dt><strong><a name="item__2da_authname_2c__2d_2dauthname_3dauthname"><strong>-a</strong> <em>authname</em>, <strong>--authname</strong>=<em>authname</em></a></strong>
+
+<dd>
+<p>The user to use for authentication (defaults to current user).</p>
+</dd>
+</li>
+<dt><strong><a name="item__2dr_realm_2c__2d_2drealm_3drealm"><strong>-r</strong> <em>realm</em>, <strong>--realm</strong>=<em>realm</em></a></strong>
+
+<dd>
+<p>The realm to attempt authentication in.</p>
+</dd>
+</li>
+<dt><strong><a name="item__2de_script_2c__2d_2dexec_3dscript"><strong>-e</strong> <em>script</em>, <strong>--exec</strong>=<em>script</em></a></strong>
+
+<dd>
+<p>Instead of working interactively, run commands from <em>script</em>, and
+exit when done.</p>
+</dd>
+</li>
+</dl>
+<p>
+</p>
+<hr />
+<h1><a name="references">REFERENCES</a></h1>
+<p>[MANAGESIEVE] Martin, T.; ``A Protocol for Remotely Managing Sieve
+Scripts'', draft-ietf-managesieve-03.txt, Mirapoint, Inc.; May 2001,
+work in progress.</p>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p>Tim Martin <<a href="mailto:tmartin at mirapoint.com">tmartin at mirapoint.com</a>>, and the rest of the Cyrus
+team <<a href="mailto:cyrus-bugs at andrew.cmu.edu">cyrus-bugs at andrew.cmu.edu</a>>.
+</p>
+
+</body>
+
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sivtest.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sivtest.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sivtest.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sivtest.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,322 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>SIVTEST</title>
+</head>
+<body>
+
+<h1 align=center>SIVTEST</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>sivtest − interactive MANAGESIEVE test program</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sivtest</b> [ <b>−t</b> <i>keyfile</i> ] [
+<b>−p</b> <i>port</i> ] [ <b>−m</b>
+<i>mechanism</i> ]<br>
+[ <b>−a</b> <i>userid</i> ] [ <b>−u</b>
+<i>userid</i> ] [ <b>−k</b> <i>num</i> ] [
+<b>−l</b> <i>num</i> ]<br>
+[ <b>−r</b> <i>realm</i> ] [ <b>−f</b>
+<i>file</i> ] [ <b>−n</b> <i>num</i> ] [
+<b>−c</b> ]<br>
+[ <b>−i</b> ] [ <b>−o</b>
+<i>option</i><b>=</b><i>value</i> ] [ <b>−v</b> ]
+<i>hostname</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>sivtest</i> is a utility that allows you to
+authenticate to a MANAGESIEVE server and interactively issue
+commands to it. Once authenticated you may issue any
+MANAGESIEVE command by simply typing it in. It is capable of
+multiple SASL authentication mechanisms and handles
+encryption layers transparently. This utility is often used
+for testing the operation of a timsieved server. Also those
+developing MANAGESIEVE clients find it useful.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−t</b> <i>keyfile</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Enable TLS. <i>keyfile</i> contains the TLS public and
+private keys. Specify <b>""</b> to negotiate a TLS
+encryption layer but not use TLS authentication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>port</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Port to connect to. If left off this defaults to
+<b>sieve</b> as defined in /etc/services.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-m</b> <i>mechanism</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Force sivtest to use <i>mechanism</i> for authentication.
+If not specified the strongest authentication mechanism
+supported by the server is chosen.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-a</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authentication; defaults to the current
+user. This is the userid whose password or credentials will
+be presented to the server for verification.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-u</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authorization; defaults to the current
+user. This is the userid whose identity will be assumed
+after authentication. <b>NOTE:</b> This is only used with
+SASL mechanisms that allow proxying (e.g. PLAIN,
+DIGEST-MD5).</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-k</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Minimum protection layer required.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-l</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Maximum protection layer to use (<b>0</b>=none;
+<b>1=</b>integrity; etc). For example if you are using the
+KERBEROS_V4 authentication mechanism specifying <b>0</b>
+will force sivtest to not use any layer and specifying
+<b>1</b> will force it to use the integrity layer. By
+default the maximum supported protection layer will be
+used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-r</b> <i>realm</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specify the <i>realm</i> to use. Certain authentication
+mechanisms (e.g. DIGEST-MD5) may require one to specify the
+realm.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-f</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Pipe <i>file</i> into connection after
+authentication.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="3" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-n</b> <i>num</i></p>
+</td>
+<td width="77%">
+
+<p>Number of authentication attempts; default = 1. The
+client will attempt to do SSL/TLS session reuse and/or fast
+reauth (e.g. DIGEST-MD5), if possible.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-c</b></p>
+</td>
+<td width="77%">
+
+<p>Enable challenge prompt callbacks. This will cause the
+OTP mechanism to ask for the the one-time password instead
+of the secret pass-phrase (library generates the correct
+response).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
+<p><b>-i</b></p>
+</td>
+<td width="77%">
+
+<p>Don’t send an initial client response for SASL
+mechanisms, even if the protocol supports it.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-o</b> <i>option</i><b>=</b><i>value</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Set the SASL <i>option</i> to <i>value</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>-v</b></p>
+</td>
+<td width="13%"></td>
+<td width="69%">
+
+<p>Verbose. Print out more information than usual.</p>
+</td>
+<td width="2%">
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>timsieved(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smmapd.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smmapd.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smmapd.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smmapd.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,176 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>SMMAPD</title>
+</head>
+<body>
+
+<h1 align=center>SMMAPD</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>SMMAPD − Sendmail socket map daemon</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>smmapd</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−U</b> <i>uses</i> ] [ <b>−T</b>
+<i>timeout</i> ]<br>
+[ <b>−D</b> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>SMMAPD</b> is a Sendmail socket map daemon which is
+used to verify that a Cyrus mailbox exists, that it is
+postable and it is under quota. It accepts commands on its
+standard input and responds on its standard output. It MUST
+be invoked by <i>master</i>(8) with those descriptors
+attached to a remote client connection.</p>
+<!-- INDENTATION -->
+<p><b>SMMAPD</b> reads its configuration options out of the
+<i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−U</b> <i>uses</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The maximum number of times that the process should be
+used for new connections before shutting down. The default
+is 250.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−T</b> <i>timeout</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The number of seconds that the process will wait for a
+new connection before shutting down. Note that a value of 0
+(zero) will disable the timeout. The default is 60.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−D</b></p>
+</td>
+<td width="13%"></td>
+<td width="72%">
+
+<p>Run external debugger specified in debug_command.</p>
+</td>
+<td width="0%">
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Default configuration file.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/cyrus.conf</b></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Cyrus Master process configuration file.</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smtptest.1.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smtptest.1.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smtptest.1.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/smtptest.1.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,339 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:54 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>SMTPTEST</title>
+</head>
+<body>
+
+<h1 align=center>SMTPTEST</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>smtptest − interactive SMTP test program</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>smtptest</b> [ <b>−t</b> <i>keyfile</i> ] [
+<b>−p</b> <i>port</i> ] [ <b>−m</b>
+<i>mechanism</i> ]<br>
+[ <b>−a</b> <i>userid</i> ] [ <b>−u</b>
+<i>userid</i> ] [ <b>−k</b> <i>num</i> ] [
+<b>−l</b> <i>num</i> ]<br>
+[ <b>−r</b> <i>realm</i> ] [ <b>−f</b>
+<i>file</i> ] [ <b>−n</b> <i>num</i> ] [
+<b>−s</b> ] [ <b>−c</b> ]<br>
+[ <b>−i</b> ] [ <b>−o</b>
+<i>option</i><b>=</b><i>value</i> ] [ <b>−v</b> ]
+<i>hostname</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>smtptest</i> is a utility that allows you to
+authenticate to a SMTP server and interactively issue
+commands to it. Once authenticated you may issue any SMTP
+command by simply typing it in. It is capable of multiple
+SASL authentication mechanisms and handles encryption layers
+transparently. This utility is often used for testing the
+operation of a smtp server. Also those developing SMTP
+clients find it useful.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−t</b> <i>keyfile</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Enable TLS. <i>keyfile</i> contains the TLS public and
+private keys. Specify <b>""</b> to negotiate a TLS
+encryption layer but not use TLS authentication.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−p</b> <i>port</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Port to connect to. If left off this defaults to
+<b>smtp</b> as defined in /etc/services.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-m</b> <i>mechanism</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Force smtptest to use <i>mechanism</i> for
+authentication. If not specified the strongest
+authentication mechanism supported by the server is
+chosen.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-a</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authentication; defaults to the current
+user. This is the userid whose password or credentials will
+be presented to the server for verification.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-u</b> <i>userid</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Userid to use for authorization; defaults to the current
+user. This is the userid whose identity will be assumed
+after authentication. <b>NOTE:</b> This is only used with
+SASL mechanisms that allow proxying (e.g. PLAIN,
+DIGEST-MD5).</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-k</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Minimum protection layer required.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-l</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Maximum protection layer to use (<b>0</b>=none;
+<b>1=</b>integrity; etc). For example if you are using the
+KERBEROS_V4 authentication mechanism specifying <b>0</b>
+will force smtptest to not use any layer and specifying
+<b>1</b> will force it to use the integrity layer. By
+default the maximum supported protection layer will be
+used.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-r</b> <i>realm</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Specify the <i>realm</i> to use. Certain authentication
+mechanisms (e.g. DIGEST-MD5) may require one to specify the
+realm.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-f</b> <i>file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Pipe <i>file</i> into connection after
+authentication.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-n</b> <i>num</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Number of authentication attempts; default = 1. The
+client will attempt to do SSL/TLS session reuse and/or fast
+reauth (e.g. DIGEST-MD5), if possible.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-s</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Enable SMTP over SSL (smtps).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-c</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Enable challenge prompt callbacks. This will cause the
+OTP mechanism to ask for the the one-time password instead
+of the secret pass-phrase (library generates the correct
+response).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>-i</b></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Don’t send an initial client response for SASL
+mechanisms, even if the protocol supports it.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>-o</b> <i>option</i><b>=</b><i>value</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Set the SASL <i>option</i> to <i>value</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>-v</b></p>
+</td>
+<td width="13%"></td>
+<td width="69%">
+
+<p>Verbose. Print out more information than usual.</p>
+</td>
+<td width="2%">
+</td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sendmail(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/squatter.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/squatter.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/squatter.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/squatter.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,181 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:55 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>SQUATTER</title>
+</head>
+<body>
+
+<h1 align=center>SQUATTER</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>squatter − create SQUAT indexes for mailboxes</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>squatter</b> [ <b>−C</b> <i>config-file</i> ] [
+<b>−r</b> ] [ <b>−s</b> ] [ <b>−a</b> ] [
+<b>−v</b> ] <i>mailbox</i>...</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Squatter</i> creates a new SQUAT index for one or more
+IMAP mailboxes. The SQUAT index is a unified index of all of
+the header and body text of each message a given mailbox.
+This index is used to significantly reduce IMAP SEARCH times
+on a mailbox.</p>
+<!-- INDENTATION -->
+<p><i>Squatter</i> creates an index of ALL messages in the
+mailbox, not just those since the last time that it was run
+(i.e., it does NOT do incremental updates). Any messages
+appended to the mailbox after <i>squatter</i> is run, will
+NOT be included in the index. To include new messages in the
+index, <i>squatter</i> must be run again. For large and
+active mailboxes, it is recommended to run <i>squatter</i>
+periodically as an EVENT in <i>cyrus.conf</i>(5)</p>
+<!-- INDENTATION -->
+<p><b>NOTE:</b> Messages and mailboxes that have not been
+indexed CAN still be SEARCHed, just not as quickly as those
+with a SQUAT index.</p>
+<!-- INDENTATION -->
+<p><i>Squatter</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−r</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Recursively create indexes for all sub-mailboxes of the
+mailboxes or mailbox prefixes given as arguments.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−s</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Skip mailboxes whose index file is older than their
+current squat file (within a small time delta).</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−a</b></p>
+</td>
+<td width="7%"></td>
+<td width="77%">
+
+<p>Only create indexes for mailboxes which have the shared
+<i>/vendor/cmu/cyrus-imapd/squat</i> annotation set to
+"true".</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>The value of the <b>/vendor/cmu/cyrus-imapd/squat</b>
+annotation is inherited by all children of the given
+mailbox, so an entire mailbox tree can be indexed (or not
+indexed) by setting a single annotation on the root of that
+tree with a value of "true" (or
+"false"). If a mailbox does not have a
+<b>/vendor/cmu/cyrus-imapd/squat</b> annotation set on it
+(or does not inherit one), then the mailbox is not indexed.
+In other words, the implicit value of
+<b>/vendor/cmu/cyrus-imapd/squat</b> is
+"false".</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−v</b></p>
+</td>
+<td width="13%"></td>
+<td width="72%">
+
+<p>Increase the verbosity of progress/status messages.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf /etc/cyrus.conf</b></p></td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_client.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_client.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_client.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_client.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,329 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:55 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>SYNC_CLIENT</title>
+</head>
+<body>
+
+<h1 align=center>SYNC_CLIENT</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+<a href="#AUTHORS">AUTHORS</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>sync_client − client side of the synchronization
+(replication) engine</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_client</b> [ <b>−v</b> ] [ <b>−l</b>
+] [ <b>−C</b> <i>config-file</i> ] [ <b>−S</b>
+<i>servername</i> ]<br>
+[ <b>−f</b> <i>input-file</i> ] [ <b>−F</b>
+<i>shutdown_file</i> ] [ <b>−w</b>
+<i>wait_interval</i> ]<br>
+[ <b>−t</b> <i>timeout</i> ] [ <b>−d</b>
+<i>delay</i> ] [ <b>−r</b> ] [ <b>−u</b> ] [
+<b>−m</b> ]<br>
+[ <b>−s</b> ] <i>objects</i>...</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Sync_client</i> is the client side of the replication
+system. It runs on the client (master) system and connects
+to the target (replica) system and generates an appropriate
+sequence of transactions to synchronize the replica system
+with the master system.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="5" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−v</b></p>
+</td>
+<td width="13%"></td>
+<td width="30%">
+
+<p>Verbose mode.</p>
+</td>
+<td width="41%">
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="2%">
+
+<p><b>−l</b></p>
+</td>
+<td width="13%"></td>
+<td width="30%">
+
+<p>Verbose logging mode.</p>
+</td>
+<td width="41%">
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−S</b> <i>servername</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Tells <b>sync_client</b> which server to communicate
+with. Overrides the <i>sync_host</i> configuration
+option.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−f</b> <i>input-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>In mailbox or user replication mode: provides list of
+users or mailboxes to replicate. In rolling replication
+mode, specifies an alternate log file (sync_client will exit
+after processing the log file).</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−F</b> <i>shutdown-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Rolling replication checks for this file at the end of
+each replication cycle and shuts down if it is present. Used
+to request nice clean shutdown at first convenient point.
+The file in question is removed on shutdown. Overrides
+<i>sync_shutdown_file</i> option in <i>imapd.conf</i></p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−w</b> <i>interval</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Wait this long before starting. Typically used so that we
+can attach a debugger to one end of the replication system
+or the other.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−t</b> <i>timeout</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Timeout for single replication run in rolling
+replication. <b>sync_client</b> will negotiate a restart
+after this many seconds. Default: 600 seconds</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−d</b> <i>delay</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Minimum delay between replication runs in rolling
+replication mode. Larger values provide better efficiency as
+transactions can be merged. Smaller values mean that the
+replica system is more up to date and that you don’t
+end up with large blocks of replication transactions as a
+single group. Default: 3 seconds.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−r</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Rolling (repeat) replication mode. Pick up a list of
+actions recorded by the <b>lmtpd(8), imapd(8), popd(8) and
+nntpd(8)</b> daemons from the file specified in
+<i>sync_log_file.</i> Repeat until <i>sync_shutdwon_file</i>
+appears.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−u</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>User mode. Remaining arguments are list of users who
+should be replicated.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−m</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Mailbox mode. Remaining arguments are list of mailboxes
+which should be replicated.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−s</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Sieve mode. Remaining arguments are list of users whose
+Sieve files should be replicated. Principally used for
+debugging purposes: not exposed to
+<b>sync_client(8).</b></p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_server(8)</b></p>
+</td>
+</table>
+<a name="AUTHORS"></a>
+<h2>AUTHORS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>David Carter (dpc22 at cam.ac.uk), Ken Murchison
+(ken at oceana.com)</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_reset.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_reset.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_reset.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_reset.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,139 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:55 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>SYNC_RESET</title>
+</head>
+<body>
+
+<h1 align=center>SYNC_RESET</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+<a href="#AUTHORS">AUTHORS</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>sync_reset − Account reset utility. DANGER.</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_server</b> [ <b>−C</b> <i>config-file</i> ]
+[ <b>−v</b> ] [ <b>−f</b> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Sync_reset</i> is a small utility program to destroy
+user accounts on a system. The only safeguard which is in
+place is the obligary force option.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−v</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Verbose mode.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−f</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Force operation. Without this flag <i>sync_reset</i>
+just bails out with an error. Principally here to try and
+prevent accidents with command autorepeat.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_client(8)</b></p>
+</td>
+</table>
+<a name="AUTHORS"></a>
+<h2>AUTHORS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>David Carter (dpc22 at cam.ac.uk), Ken Murchison
+(ken at oceana.com)</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_server.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_server.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_server.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/sync_server.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,132 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:55 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>SYNC_SERVER</title>
+</head>
+<body>
+
+<h1 align=center>SYNC_SERVER</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+<a href="#AUTHORS">AUTHORS</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>sync_server − server side of the synchronization
+(replication) engine</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_server</b> [ <b>−C</b> <i>config-file</i> ]
+[ <b>−p</b> <i>ssf</i> ]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Sync_server</i> is the server side of the the
+replication system. It runs on the target (replica) system
+and listens for connections from <i>sync_client</i> which
+provides instructions for synchronizing the replica system
+with the master system.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="8%">
+
+<p><b>−p</b> <i>ssf</i></p>
+</td>
+<td width="1%"></td>
+<td width="77%">
+
+<p>Tell <i>sync_server</i> that an external layer exists.
+An SSF (security strength factor) of 1 means an integrity
+protection layer exists. Any higher SSF implies some form of
+privacy protection.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>sync_client(8)</b></p>
+</td>
+</table>
+<a name="AUTHORS"></a>
+<h2>AUTHORS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>David Carter (dpc22 at cam.ac.uk), Ken Murchison
+(ken at oceana.com)</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/syncnews.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/syncnews.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/syncnews.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/syncnews.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,116 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:55 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>SYNCNEWS</title>
+</head>
+<body>
+
+<h1 align=center>SYNCNEWS</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#BUGS">BUGS</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>syncnews − synchronize IMAP news mailboxes with
+active file</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>syncnews</b> [ <b>−C</b> <i>config-file</i> ]
+<i>active-file</i></p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Syncnews</i> compares the list of IMAP news mailboxes
+with the news active file. News mailboxes which are not
+listed in the active file are removed. Newsgroups listed in
+the active file but not in the IMAP mailboxes file have IMAP
+mailboxes created.</p>
+<!-- INDENTATION -->
+<p>A newsgroup must have a status of
+‘‘y’’,
+‘‘m’’, or
+‘‘n’’ to be considered listed in the
+active file.</p>
+<!-- INDENTATION -->
+<p><i>Syncnews</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="BUGS"></a>
+<h2>BUGS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>If a newsgroup is listed in the active file, but does not
+have the news spool directories created, <i>syncnews</i>
+will create those news spool directories in the process of
+creating the IMAP mailbox. The created directories are
+likely to then have ownership and permissions that do not
+permit the news server to write article files.</p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/timsieved.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/timsieved.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/timsieved.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/timsieved.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,110 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:55 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>TIMSIEVED</title>
+</head>
+<body>
+
+<h1 align=center>TIMSIEVED</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>timsieved − CMU hack for getting sieve scripts onto
+the server</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>timsieved</b> [ <b>−C</b> <i>config-file</i>
+]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>timsieved</i> is a server that allows users to
+remotely manage their sieve scripts kept on the server. It
+accepts commands on its standard input and responds on its
+standard output. It MUST be invoked by <i>master</i>(8) with
+those descriptors attached to a remote client
+connection.</p>
+<!-- INDENTATION -->
+<p>Cyrus admins that authenticate and authorize as
+themselves (e.g. don’t proxy) manage global
+scripts.</p>
+<!-- INDENTATION -->
+<p><i>Timsieved</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/tls_prune.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/tls_prune.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/tls_prune.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/tls_prune.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,104 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:55 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>TLS_PRUNE</title>
+</head>
+<body>
+
+<h1 align=center>TLS_PRUNE</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>tls_prune − prune expired sessions from the TLS
+sessions database</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>tls_prune</b> [ <b>−C</b> <i>config-file</i>
+]</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Tls_prune</i> is used to prune expired sessions from
+the TLS sessions database. The lifetime of a TLS session is
+determined by the <b>tls_session_timeout</b> configuration
+option.</p>
+<!-- INDENTATION -->
+<p><i>Tls_prune</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b>, <b>master(8)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/unexpunge.8.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/unexpunge.8.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/unexpunge.8.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/man/unexpunge.8.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,173 @@
+<!-- Creator : groff version 1.18.1.1 -->
+<!-- CreationDate: Mon Jul 10 10:31:55 2006 -->
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta name="Content-Style" content="text/css">
+<title>UNEXPUNGE</title>
+</head>
+<body>
+
+<h1 align=center>UNEXPUNGE</h1>
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+<a name="NAME"></a>
+<h2>NAME</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p>unexpunge − restore expunged (but yet unremoved)
+messages</p>
+</td>
+</table>
+<a name="SYNOPSIS"></a>
+<h2>SYNOPSIS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>unexpunge</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−l</b> <i>mailbox</i><b><br>
+unexpunge</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−a</b> [ <b>−d</b> ] [ <b>−v</b> ]
+<i>mailbox</i><b><br>
+unexpunge</b> [ <b>−C</b> <i>config-file</i> ]
+<b>−u</b> [ <b>−d</b> ] [ <b>−v</b> ]
+<i>mailbox uid</i>...</p>
+</td>
+</table>
+<a name="DESCRIPTION"></a>
+<h2>DESCRIPTION</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><i>Unexpunge</i> is used to restore expunged messages
+which have yet to be removed from the Cyrus mailspool. This
+utility is only useful when the server is configured to use
+<b>delayed</b> expunge.</p>
+<!-- INDENTATION -->
+<p><i>Unexpunge</i> reads its configuration options out of
+the <i>imapd.conf</i>(5) file unless specified otherwise by
+<b>-C</b>.</p>
+</td>
+</table>
+<a name="OPTIONS"></a>
+<h2>OPTIONS</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>−C</b> <i>config-file</i></p></td>
+</table>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="21%"></td>
+<td width="77%">
+<p>Read configuration options from <i>config-file</i>.</p>
+</td>
+</table>
+<!-- TABS -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="4" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−l</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>List the expunged messages in the specified mailbox
+which are available for restoration.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−a</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Restore <b>all</b> of the expunged messages in the
+specified mailbox.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−u</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Restore only those messages having the specified UIDs in
+the specified mailbox.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−d</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Unset the <i>\Deleted</i> flag on any restored
+messages.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="4%">
+
+<p><b>−v</b></p>
+</td>
+<td width="5%"></td>
+<td width="77%">
+
+<p>Enable verbose output/logging.</p>
+</td>
+</table>
+<a name="FILES"></a>
+<h2>FILES</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>/etc/imapd.conf</b></p></td>
+</table>
+<a name="SEE ALSO"></a>
+<h2>SEE ALSO</h2>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
+<p><b>imapd.conf(5)</b></p>
+</td>
+</table>
+<hr>
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.fig
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.fig?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.fig (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.fig Sat Aug 26 02:00:13 2006
@@ -1,0 +1,120 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+6 8400 6075 10800 6900
+4 0 0 50 0 0 12 0.0000 4 180 2370 8400 6225 Client connects to any frontend\001
+4 0 0 50 0 0 12 0.0000 4 180 1995 8400 6450 server, which then queries\001
+4 0 0 50 0 0 12 0.0000 4 135 1965 8400 6675 its local mailbox database\001
+4 0 0 50 0 0 12 0.0000 4 135 2295 8400 6900 for the location of the mailbox.\001
+-6
+6 825 1800 3075 3075
+4 0 0 50 0 0 12 0.0000 4 180 1920 825 1950 Backend Servers perform\001
+4 0 0 50 0 0 12 0.0000 4 135 1950 825 2175 RESERVE and COMMIT\001
+4 0 0 50 0 0 12 0.0000 4 180 2250 825 2400 operations to mupdate master\001
+4 0 0 50 0 0 12 0.0000 4 180 2100 825 2625 before allowing any mailbox\001
+4 0 0 50 0 0 12 0.0000 4 180 1920 825 2850 operation that affects the\001
+4 0 0 50 0 0 12 0.0000 4 135 1365 825 3075 mailbox database.\001
+-6
+6 5250 1800 9225 2475
+4 0 0 50 0 0 12 0.0000 4 135 2940 5250 1950 Frontend server mailbox databases are\001
+4 0 0 50 0 0 12 0.0000 4 180 3300 5250 2400 mupdate connection to the mupdate master.\001
+4 0 0 50 0 0 12 0.0000 4 180 3960 5250 2175 updated based upon a stream on a frotnend-initiated\001
+-6
+6 9600 1500 11250 2400
+4 0 0 50 0 0 12 0.0000 4 135 1575 9600 1650 Connection to LMTP\001
+4 0 0 50 0 0 12 0.0000 4 180 1440 9600 1875 proxy (possibly via\001
+4 0 0 50 0 0 12 0.0000 4 135 1620 9600 2100 unix socket on SMTP\001
+4 0 0 50 0 0 12 0.0000 4 180 555 9600 2325 server)\001
+-6
+6 6075 750 10950 1200
+4 0 0 50 0 0 12 0.0000 4 180 4875 6075 1125 the master mupdate server to determine final destination of mail.\001
+4 0 0 50 0 0 12 0.0000 4 180 4245 6075 900 LMTP proxies perform mupdate lookups directly against\001
+-6
+6 7950 3150 9075 4050
+4 0 0 50 0 0 12 0.0000 4 180 960 7950 3300 LMTP Proxy\001
+4 0 0 50 0 0 12 0.0000 4 180 930 7950 3525 (possibly on\001
+4 0 0 50 0 0 12 0.0000 4 135 1005 7950 3750 a Frontend or\001
+4 0 0 50 0 0 12 0.0000 4 180 1080 7950 3975 SMTP server)\001
+-6
+6 10125 3600 13200 4500
+4 0 0 50 0 0 12 0.0000 4 180 2580 10125 3750 Final mail delivery is via an LMTP\001
+4 0 0 50 0 0 12 0.0000 4 180 2595 10125 3975 proxy which uses LMTP to deliver\001
+4 0 0 50 0 0 12 0.0000 4 135 2715 10125 4200 to the correct backend server based\001
+4 0 0 50 0 0 12 0.0000 4 180 3060 10125 4425 on information from the mupdate master.\001
+-6
+6 3450 4200 6150 5325
+4 0 0 50 0 0 12 0.0000 4 180 2550 3450 4350 Frontend servers perform mailbox\001
+4 0 0 50 0 0 12 0.0000 4 180 2700 3450 4575 lookup, and then connect via IMAP,\001
+4 0 0 50 0 0 12 0.0000 4 165 2415 3450 4800 POP, NNTP, MANAGESIEVE,\001
+4 0 0 50 0 0 12 0.0000 4 165 2205 3450 5025 or LMTP to backend servers,\001
+4 0 0 50 0 0 12 0.0000 4 180 1125 3450 5250 as appropriate.\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 1650 3375 2550 3375 2550 5100 1650 5100 1650 3375
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 6975 3375 7875 3375 7875 5100 6975 5100 6975 3375
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 10875 4725 11775 4725 11775 6450 10875 6450 10875 4725
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 6975 5475 7875 5475 7875 7200 6975 7200 6975 5475
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 4125 975 5025 975 5025 2700 4125 2700 4125 975
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 1650 5475 2550 5475 2550 7200 1650 7200 1650 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 2550 3750 2550 3675 4125 2325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 5100 2325 5025 2400 6975 3675
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 5025 2325 5025 2400 6975 5850
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 10875 5100 7875 4200
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 10875 5325 7875 6000
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6975 6450 2550 4950
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 6975 3900 6975 3825 2550 4050
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 6990 4380 2565 6630
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+ 1 1 1.00 60.00 120.00
+ 6900 6530 6975 6530 2550 6830
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 11550 1425 12450 1425 12450 3150 11550 3150 11550 1425
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 9375 2550 9300 1575
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 11550 1950 9975 2775
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 9075 2925 2550 3750
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 9300 1575 5025 1200
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 2580 5753 4155 2528
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 9075 2550 9975 2550 9975 4275 9075 4275 9075 2550
+4 0 0 50 0 0 12 0.0000 4 180 1275 4125 750 Mupdate Master\001
+4 0 0 50 0 0 12 0.0000 4 135 1290 1575 7500 Backend Servers\001
+4 0 0 50 0 0 24 0.0000 4 330 6090 525 375 Cyrus MURDER component interactions\001
+4 0 0 50 0 0 12 0.0000 4 135 1305 6975 7500 Frontend Servers\001
+4 0 0 50 0 0 12 0.0000 4 135 1020 11550 3450 SMTP Server\001
+4 0 0 50 0 0 12 0.0000 4 135 1875 10875 6750 IMAP/POP/NNTP Client\001
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.png
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.png?rev=585&root=cyrus22&view=auto
==============================================================================
Binary file - no diff available.
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/murder.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.fig
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.fig?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.fig (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.fig Sat Aug 26 02:00:13 2006
@@ -1,0 +1,132 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+6 2400 1875 3600 3900
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 2550 1875 3450 1875 3450 3600 2550 3600 2550 1875
+4 1 0 50 0 0 16 0.0000 4 165 1140 3000 3900 NNTP Peer\001
+-6
+6 10725 1875 12075 3900
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 10950 1875 11850 1875 11850 3600 10950 3600 10950 1875
+4 1 0 50 0 0 16 0.0000 4 165 1320 11400 3900 NNTP Client\001
+-6
+6 10425 5550 12375 7650
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 10950 5550 11850 5550 11850 7275 10950 7275 10950 5550
+4 1 0 50 0 0 16 0.0000 4 195 1935 11400 7575 IMAP/POP3 Client\001
+-6
+6 3525 8325 9375 9600
+6 3525 8550 9375 9600
+6 3525 8550 9375 9600
+6 3675 8775 9225 8925
+6 3675 8775 9225 8925
+1 3 0 1 4 4 50 0 20 0.000 1 0.0000 3750 8850 75 75 3750 8850 3825 8850
+1 3 0 1 2 2 50 0 41 0.000 1 0.0000 4950 8850 75 75 4950 8850 5025 8850
+1 3 0 1 1 1 50 0 41 0.000 1 0.0000 6150 8850 75 75 6150 8850 6225 8850
+1 3 0 1 5 5 50 0 41 0.000 1 0.0000 7350 8850 75 75 7350 8850 7425 8850
+1 3 0 1 31 31 50 0 41 0.000 1 0.0000 8550 8850 75 75 8550 8850 8625 8850
+4 0 0 50 0 0 12 0.0000 4 135 465 5100 8925 IMAP\001
+4 0 0 50 0 0 12 0.0000 4 135 480 7500 8925 SMTP\001
+4 0 0 50 0 0 12 0.0000 4 135 480 8700 8925 LMTP\001
+4 0 0 50 0 0 12 0.0000 4 135 480 3900 8925 NNTP\001
+-6
+4 0 0 50 0 0 12 0.0000 4 135 435 6300 8925 POP3\001
+-6
+6 4725 9225 8250 9375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 4725 9300 5325 9300
+2 1 1 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2
+ 7125 9300 7725 9300
+4 0 0 50 0 0 12 0.0000 4 135 435 7800 9375 Email\001
+4 0 0 50 0 0 12 0.0000 4 135 690 5400 9375 Netnews\001
+-6
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 3525 8550 9375 8550 9375 9600 3525 9600 3525 8550
+-6
+-6
+4 0 0 50 0 0 12 0.0000 4 135 750 3525 8475 LEGEND\001
+-6
+6 2325 5550 3675 7575
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 2550 5550 3450 5550 3450 7275 2550 7275 2550 5550
+4 1 0 50 0 0 16 0.0000 4 165 1350 3000 7575 SMTP Server\001
+4 1 4 50 0 0 12 0.0000 4 180 750 3000 5925 lmtp2nntp\001
+4 1 31 50 0 0 12 0.0000 4 180 600 3000 6525 cyrusv2\001
+-6
+6 6825 3675 7725 6375
+2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 6825 4875 7725 4875
+2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 6825 4275 7725 4275
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 6825 3675 7725 3675 7725 6000 6825 6000 6825 3675
+2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 6825 5475 7725 5475
+4 1 0 50 0 0 16 0.0000 4 225 585 7275 6300 Cyrus\001
+4 1 4 50 0 0 12 0.0000 4 180 420 7275 4050 nntpd\001
+4 1 31 50 0 0 12 0.0000 4 180 420 7275 4650 lmtpd\001
+4 1 2 50 0 0 12 0.0000 4 180 450 7275 5775 imapd\001
+4 1 1 50 0 0 12 0.0000 4 180 450 7275 5250 pop3d\001
+-6
+2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3450 5850 6825 4050
+2 1 1 1 31 7 50 0 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 3450 6375 6825 4575
+2 1 1 1 5 7 50 0 -1 4.000 0 0 -1 1 1 2
+ 0 0 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 2550 6975 1125 6975
+2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 1 1 2
+ 0 0 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 2550 2775 1125 2775
+2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 3450 2775 6825 3900
+2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 7725 3900 10950 2625
+2 1 1 1 4 7 50 0 -1 4.000 0 0 -1 1 1 2
+ 1 1 1.00 60.00 120.00
+ 1 1 1.00 60.00 120.00
+ 7725 4050 10950 2775
+2 1 1 1 23 7 50 0 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 10950 7050 3450 7050
+2 1 0 1 23 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 10950 6900 3450 6900
+2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 2550 6150 3450 6150
+2 1 2 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+ 2550 6750 3450 6750
+2 1 1 1 1 7 50 0 -1 4.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7723 5188 10948 5863
+2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
+ 1 1 1.00 60.00 120.00
+ 7725 5775 10950 6450
+2 1 1 1 2 7 50 0 -1 4.000 0 0 -1 1 1 2
+ 1 1 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 7725 5625 10950 6300
+4 1 5 50 0 0 12 0.0000 4 180 375 1875 7200 relay\001
+4 1 5 50 0 0 12 0.0000 4 150 330 7275 6825 post\001
+4 1 5 50 0 0 12 0.0000 4 135 510 7275 7275 submit\001
+4 1 4 50 0 0 12 0.0000 4 180 1110 1875 3000 feed (IHAVE)\001
+4 0 0 50 0 0 24 0.0000 4 330 6990 600 750 Cyrus Email / Netnews component interactions\001
+4 1 23 50 0 0 12 0.0000 4 180 465 3000 7050 smtpd\001
+4 1 4 50 0 0 12 0.0000 4 180 975 9075 3075 read (POST)\001
+4 1 4 50 0 0 12 0.0000 4 180 1110 5175 3075 feed (IHAVE)\001
+4 1 4 50 0 0 12 0.0000 4 180 1110 4650 4800 feed (IHAVE)\001
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.png
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.png?rev=585&root=cyrus22&view=auto
==============================================================================
Binary file - no diff available.
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/netnews.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/notes.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/notes.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/notes.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/notes.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,23 @@
+<html>
+<!-- $Id: notes.html,v 1.2 2002/05/25 19:57:43 leg Exp $ -->
+
+<body>
+<ul>
+<li>appending: it's important that the index records for individual
+messages make it to disk before the index header indicating that
+they're there. so something like:
+<ol>
+<li>sync messages to disk (or depend on <tt>link()</tt> being atomic)
+<li>create new index records, flush to disk
+<li>create new header if necessary (adding new user flag), flush to disk
+<li>flush cache file
+<li>update index header, flush to disk
+</ol>
+</li>
+
+
+
+</ul>
+
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/os.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/os.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/os.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/os.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,71 @@
+<!-- $Id: os.html,v 1.4 2001/11/18 19:50:43 leg Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Operating System Notes
+</title>
+</head>
+<h1>Operating System Notes
+</h1>
+<body>
+
+<h2>All</h2>
+
+<ol>
+<li> Shadow passwords
+<br>On any system with shadow passwords (including Solaris 2.5 with
+Unix authentication), read the SASL documentation carefully to make
+sure it is configured correctly.
+</ol>
+
+<h2>Solaris</h2>
+
+<ol>
+<li>Modern Solaris systems have several useful utilities in
+<tt>/usr/proc/bin</tt>, among them <tt>pmap</tt>. This can be used to
+calculate the incremental cost (number of non-shared pages) of an
+<tt>imapd</tt> process, which is useful for sizing purposes.
+</ol>
+
+<h2>HP-UX</h2>
+
+<ol>
+<li> The memory mapping support (<tt>mmap(2)</tt>) in HP-UX does not
+have the right semantics for the Cyrus IMAP server under the 9.0 and
+10.0 release of the operating system. It appears this is related to
+the hardware's use of inverse page tables. It is recommended that
+large-scale sites consider using some other platform.
+
+<p><LI> HP-UX 9.0.4: Comments from testers
+
+<br> The C that ships with HP-UX is totally unsuited for use with unix
+packages. Either the HP-UX ANSI C developers kit must be purchased
+separately from HP or GNU's gcc compiler (which can bootstrap itself
+from the basic HP C) must be built on the target system.
+</ol>
+
+
+<h2>Linux</h2>
+
+<ol>
+<li> synchronous fs updates.
+<br>By turning on synchronous updates for ext2fs, all updates (instead of
+just meta-data) become synchronous. This is good for reliability. Bad
+for performance.
+
+<p> The big problem used to be with the <tt>mailboxes</tt> file. The
+2.0 release and later addressed this problem by changing the flat file
+to a Berkerley DB database.
+
+<p>Note this is for ext2fs. If you are using a newer filesystem (such
+as xfs, jfs, or reiserfs) the synchronous metadata issue shouldn't
+come up. Then again, we haven't really looked at other filesystems
+for linux yet. (It appears that the different filesystems support
+slightly different semantics, and it's not always clear what the right
+thing for the application to do is.)
+</ol>
+
+<P><HR>
+last modified: $Date: 2001/11/18 19:50:43 $
+</BODY></HTML>
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/overview.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/overview.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/overview.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/overview.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,846 @@
+<HTML><HEAD>
+<title>Cyrus IMAP Server: Overview and Concepts</title>
+<!-- $Id: overview.html,v 1.21.2.3 2004/07/27 13:13:42 ken3 Exp $ -->
+</HEAD><BODY>
+<H1>Cyrus IMAP Server: Overview and Concepts</H1>
+
+<p>This document gives an overview of the Cyrus IMAP server. The
+Cyrus IMAP (Internet Message Access Protocol) server provides
+access to personal mail and system-wide bulletin boards through
+the IMAP protocol. The Cyrus IMAP server is a scalable
+enterprise mail system designed for use from small to
+large enterprise environments using
+standards-based technologies.
+
+<p>A full Cyrus IMAP implementation allows a seamless mail and
+bulletin board environment to be set up across
+multiple servers. It differs from other IMAP server
+implementations in that it is run on "sealed" servers,
+where users are not normally permitted to log in. The mailbox
+database is stored in parts of the filesystem that are private to the
+Cyrus IMAP system. All user access to mail is through software
+using the IMAP, IMAPS, POP3, POP3S, or KPOP protocols.
+
+<p>The private mailbox database design gives the server large advantages
+in efficiency, scalability, and administratability. Multiple
+concurrent read/write connections to the same mailbox are permitted.
+The server supports access control lists on mailboxes and storage
+quotas on mailbox hierarchies.
+
+<p>This document is organized into the following areas:
+
+<UL>
+<LI><a href="#mboxname">Mailbox Namespace</a>
+<UL>
+<li><A href="#mboxnamestd">Standard (Internal) Namespace</A>
+<li><A href="#mboxnamealt">Alternate Namespace</A>
+</UL>
+<LI><a href="#acl">Access Control Lists</a>
+<UL>
+<li><A href="#aclrt">Access Rights</A>
+<li><A href="#aclident">Identifiers</A>
+<li><A href="#aclany">"<TT>anonymous</TT>" and "<TT>anyone</TT>"</A>
+<li><A href="#aclauth">Kerberos vs. Unix Authorization</A>
+<LI><A HREF="#aclneg">Negative Rights</A>
+<li><A href="#acluser">Calculating Users' Rights</A>
+<li><A HREF="#acladm">Implicit Rights for Administrators on Personal
+Mailboxes</A>
+<li><A href="#aclmbox">Initial ACLs for Newly Created Mailboxes</A>
+</UL>
+<li><a href="#login">Login Authentication</A>
+<UL>
+<li><a href="#loginanon">Anonymous Logins</A>
+<li><a href="#loginker">Kerberos Logins</A>
+<li><a href="#loginunix">Unix Logins</A>
+</UL>
+<li><a href="#quota">Quotas</a>
+<UL>
+<li><a href="#quotasup">Supports Quotas on Storage</a>
+<li><a href="#quotaroots">Quota Roots</a>
+<li><a href="#quotamail">Mail Delivery Behavior</a>
+<li><a href="#quotawarnings">Quota Warnings Upon Select When User Has "<TT>d</TT>" Rights</a>
+<li><a href="#quotapartitions">Quotas and Partitions</a>
+</UL>
+<li><a href="#notification">New Mail Notification</a>
+<li><a href="#partitions">Partitions</a>
+<UL>
+<li><a href="#partitionscreate">Specifying Partitions with "<TT>create</TT>"</a>
+<li><a href="#partitionsrename">Changing Partitions with "<TT>rename</TT>"</a>
+</UL>
+<li><a href="#news">News</a>
+<li><A href="#pop3">POP3 Server</A>
+<li><A href="#syslog">The <TT>syslog</TT> facility</A>
+<li><A href="#recovery">Mail Directory Recovery</A>
+<UL>
+<li><a href="#recoverymboxdir">Reconstructing Mailbox Directories</a>
+<li><a href="#recoverymbox">Reconstructing the Mailboxes File</a>
+<li><a href="#recoveryquotas">Reconstructing Quota Roots</a>
+<li><a href="#recoveryquotasrm">Removing Quota Roots</a>
+<li><a href="#recoverysubs">Subscriptions</a>
+</UL>
+<li><a href="#configdir">Configuration Directory</a>
+<UL>
+<li><a href="#configdirlog">"<TT>log</TT>" Directory</a>
+<li><a href="#configdirproc">"<TT>proc</TT>" Directory</a>
+</UL>
+<li><a href="#messagedelivery">Message Delivery</a>
+<ul>
+<li><a href="#lmtp">Local Mail Transfer Protocol</a>
+<li><a href="#singleinstance">Single Instance Store</a>
+<li><a href="#duplicate">Duplicate Delivery Suppression</a>
+<li><a href="#sieve">Sieve, a Mail Filtering Language</a>
+</ul>
+</UL>
+
+<H2><a name="mboxname">Mailbox Namespace</a></H2>
+
+By default, the Cyrus IMAP server presents mailboxes using the
+<TT>netnews</TT> namespace convention. Mailbox names are
+case-sensitive. A mailbox name may not start or end with a "."
+character, nor may it contain two "." characters in a row.
+
+<p>In this implementation, non-ASCII characters and shell
+metacharacters are not permitted in mailbox names.
+
+<p>Optionally, the server can present mailboxes using the <a
+href=altnamespace.html#unixhiersep> UNIX hierarchy convention</a>.
+
+<H3><A NAME="mboxnamestd">Standard (Internal) Namespace</A></H3>
+
+<p>All personal mailboxes for user "<TT>bovik</TT>" begin with the
+string "<TT>user.bovik.</TT>". For example, if user "<TT>bovik</TT>"
+had a personal "<TT>work</TT>" mailbox, it would be called
+"<TT>user.bovik.work</TT>". To user "<TT>bovik</TT>", however, the
+prefix "<TT>user.bovik.</TT>" normally appears as "<TT>INBOX.</TT>".
+The mailbox "<TT>user.bovik.work</TT>" would therefore appear as
+"<TT>INBOX.work</TT>". If the <A HREF="#acl">access control list</A>
+of the mailbox permitted other users to see that mailbox, it would
+appear to them as "<TT>user.bovik.work</TT>".
+
+<P>The mailbox "<TT>user.bovik</TT>" is where the user
+"<TT>bovik</TT>" normally receives new mail, and normally appears to
+user "<TT>bovik</TT>" as "<TT>INBOX</TT>". The mailbox
+"<TT>user.bovik</TT>" is referred to in this document as user
+"<TT>bovik</TT>"'s <TT>INBOX</TT>.
+
+<p>Administrators create and delete users by creating and deleting the
+users' <TT>INBOX</TT>. If a user has an <TT>INBOX</TT>, then they are
+allowed to subscribe to mailboxes. Only users without dots in their
+userid are permitted to have an <TT>INBOX</TT>. (A user with a dot in
+their userid would be able to login but would not be able to receive mail.
+Note that when using the unix hierarchy seperator, this is not the case, and
+any user may have a dot in their userid.)
+
+<p>When an administrator deletes a user's <TT>INBOX</TT>, all of the
+user's personal mailboxes are deleted as well.
+
+<p>With the one notable exception of <TT>INBOX</TT>, all mailbox names are
+system-wide--they refer to the same mailbox regardless of the user.
+<A HREF="#acl">Access control lists</A> determine which users can
+access or see which mailboxes. Using
+
+<p>In contexts which permit relative mailbox names, the mailbox namespace
+works as follows:
+
+<UL>
+<LI> Names that do not start with "." are fully qualified.
+<LI> Names that start with "." are relative to the current context.
+</UL>
+
+Thus, if you are working with folder names and the top of the
+hierarchy is named "<TT>cmu.</TT>", the name "<TT>comp.infosystems.www</TT>"
+resolves to "<TT>comp.infosystems.www</TT>" and the name
+"<TT>.comp.infosystems.www</TT>" resolves to
+"<TT>cmu.comp.infosystems.www</TT>".
+
+<H3><A NAME="mboxnamealt">Alternate Namespace</A></H3>
+
+The Cyrus IMAP server can also use an <a
+href=altnamespace.html#altname> alternate namespace</a> which allows
+a user's personal mailboxes to appear as if they reside at the same
+level as that user's <TT>INBOX</TT> as opposed to children of it. With
+this feature, it may appear that there are non-unique names for mailboxes
+between users (2 different users may each have a top level "work" mailbox),
+but the internal representation is still <tt>user.name.work</tt>.
+
+<H2><A NAME="acl">Access Control Lists</A></H2>
+
+Access to each mailbox is controlled by each mailbox's access control list.
+Access Control Lists (ACLs) provide a powerful mechanism
+for specifying the users or groups of users who have permission to
+access the mailboxes.
+
+An ACL is a list of zero or more entries. Each entry has an identifier
+and a set of rights. The identifier specifies the user or group of
+users for which the entry applies. The set of rights is one or more
+letters or digits, each letter or digit conferring a particular privilege.
+
+<H3><A NAME="aclrt">Access Rights</A></H3>
+
+The defined rights are:
+
+<DL compact>
+<DT><TT>l<dd>lookup </TT> - The user may see that the mailbox exists.
+<dt><TT>r<dd>read </TT> - The user may read the mailbox.
+ The user may select the mailbox, fetch data, perform searches,
+ and copy messages from the mailbox.
+<dt><TT>s<dd>seen </TT> - Keep per-user seen state.
+ The "Seen" and "Recent" flags are preserved for the user.
+<dt><TT>w<dd>write </TT> - The user may modify flags and keywords other than
+ "Seen" and "Deleted" (which are controlled by other sets of rights).
+<dt><TT>i<dd>insert </TT> - The user may insert new messages into the mailbox.
+<dt><TT>p<dd>post </TT> - The user may send mail to the submission address for
+ the mailbox. This right differs from the "<TT>i</TT>" right in that
+ the delivery system inserts trace information into submitted
+ messages.
+<dt><TT>c<dd>create </TT> - The user may create new sub-mailboxes
+ of the mailbox, or delete or rename the current mailbox.
+<dt><TT>d<dd>delete </TT> - The user may store the "Deleted" flag,
+ and perform expunges.
+<dt><TT>a<dd>administer </TT> - The user may change the ACL on the mailbox.
+</DL>
+
+You can combine access rights in different ways. For example:
+
+<DL compact>
+<DT><TT>lrs</TT>
+<DD>The user can read the mailbox.
+</DL>
+
+<DL>
+<DT><TT>lrsp</TT>
+<DD>The user can read the mailbox, and can
+post to it through the delivery system. Most delivery
+systems do not provide authentication, so the "<TT>p</TT>" right usually has
+meaning only for the "anonymous" user.
+</DL>
+
+<DL>
+<DT><TT>lr</TT>
+<DD> The user can see the mailbox and can read it, but the server does
+not preserve the "Seen" and "Recent" flags. This set of rights is
+primarily useful for "anonymous IMAP."
+</DL>
+
+<DL>
+<DT><TT>rs</TT>
+<DD>The user can read the mailbox and the server preserves the "Seen"
+and "Recent" flags, but the mailbox is not visible to the user through
+the various mailbox listing commands. The user must know the name of
+the mailbox to be able to access it.
+</DL>
+
+<DL>
+<DT><TT>lrsip</TT>
+<DD> The user can read and append to the mailbox, either through
+IMAP, or through the delivery system.
+</DL>
+
+<H3><A name="aclident">Identifiers</A></H3>
+
+The identifier part of an ACL entry specifies the user or group
+for which the entry applies.
+
+<p>There are two special identifiers,
+"anonymous", and "anyone", which are explained below. The meaning of
+other identifiers usually depends on the authorization mechanism being used
+(selected by <tt>--with-auth</tt> at compile time, defaulting to Unix).
+
+<H4><A NAME="aclany">"<TT>anonymous</TT>" and "<TT>anyone</TT>"</A></H4>
+
+With any authorization mechanism, two special identifiers are defined.
+The identifier "<TT>anonymous</TT>" refers to the anonymous, or unauthenticated
+user. The identifier "<TT>anyone</TT>" refers to all users, including the
+anonymous user.
+
+<H3><A NAME="aclauth">Kerberos vs. Unix Authorization</A></H3>
+
+The Cyrus IMAP server comes with four authorization mechanisms, one is
+compatible with Unix-style ("<tt>/etc/passwd</tt>") authorization, one for
+use with Kerberos 4, one for use with Kerberos 5, and one for use with
+an external authorization process (ptloader) which can interface with
+other group databases (e.g. AFS PTS groups, LDAP Groups, etc).
+
+<p>Note that authorization is <b>not</b> authentication. Authentication
+is the act of proving who you are. Authorization is the act of determining
+what rights you have. Authentication is discussed in the
+<a href="#login">Login Authentication</a> part of this document.
+
+<p>In the Unix authorization mechanism, identifiers are either a
+valid userid or the string "<tt>group</tt>":
+followed by a group listed in "<tt>/etc/group</tt>". Thus:
+
+<pre>
+ root Refers to the user root
+ group:staff Refers to the group staff
+</pre>
+
+<p>It is also possible to use unix groups with users authenticated
+through a non-/etc/passwd backend. Note that using unix groups
+in this way (without associated /etc/passwd entries) is not recommended.
+
+<p>Using the Kerberos authorization mechanism, identifiers are of the
+form:
+
+<pre>
+ <VAR>principal</VAR>.<VAR>instance</VAR>@<VAR>realm</VAR>
+</pre>
+
+If "<TT>.<VAR>instance</VAR></TT>" is omitted, it defaults to the null
+string. If "<TT>@<VAR>realm</VAR></TT>" is omitted, it defaults to
+the local realm.
+
+<p>The file "<TT>/etc/krb.equiv</TT>" contains mappings between
+Kerberos principals. The file contains zero or more lines, each
+containing two fields. Any identity matching the first field of a
+line is changed to the second identity during canonicalization. For
+example, a line in "<TT>/etc/krb.equiv</TT>" of:
+
+<pre>
+ bovik at REMOTE.COM bovik
+</pre>
+
+will cause the identity "<TT>bovik at REMOTE.COM</TT>" to be treated as if
+it were the local identity "<TT>bovik</TT>".
+
+<p>A site may wish to write their own authorization mechanism, perhaps
+to implement a local group mechanism. If it does so (by implementing an
+<tt>auth_[whatever]</tt> module), it will dictate its own form and meaning
+of identifiers.
+
+<H3><A name="aclneg">Negative Rights</A></H3>
+
+Any of the above defined identifiers may be prefixed with a "<TT>-</TT>"
+character. The associated rights are then removed from that
+identifier. These are referred to as "negative rights".
+
+<H3><A NAME="acluser">Calculating Users' Rights</A></H3>
+
+To calculate the set of rights granted to a user, the server first
+calculates the union of all of the rights granted to the user and to
+all groups the user is a member of. The server then calculates and
+removes the union of all the negative rights granted to the user and
+to all groups the user is a member of.
+
+<p>For example, given the ACL:
+
+<pre>
+ anyone lrsp
+ fred lwi
+ -anonymous s
+</pre>
+
+The user "<TT>fred</TT>" will be granted the rights "<TT>lrswip</TT>"
+and the anonymous user will be granted the rights "<TT>lrp</TT>".
+
+<H4><A name="acladm">Implicit Rights for Administrators on Personal
+Mailboxes</A></H4>
+
+Regardless of the ACL on a mailbox, users who are listed in the
+"admins" configuration option in "<tt>/etc/imapd.conf</tt>" implicitly
+have the "<tt>l</tt>" and "<tt>a</tt>" rights on all mailboxes. Users
+also implicitly have the "<tt>l</tt>" and "<tt>a</tt>" rights on their
+INBOX and all of their personal mailboxes.
+
+<H3><A name="aclmbox">Initial ACLs for Newly Created Mailboxes</A></H3>
+
+When a mailbox is created, its ACL starts off with a copy of the ACL
+of its closest parent mailbox. When a user is created, the ACL on the
+user's <TT>INBOX</TT> starts off with a single entry granting all
+rights to the user. When a non-user mailbox is created and does not
+have a parent, its ACL is initialized to the value of the
+"<TT>defaultacl</TT>" option in "<tt>/etc/imapd.conf</tt>"<p>
+
+Note that some rights are available implicitly, for example
+'anonymous' always has 'p' on user INBOXes, and users always
+have rights on mailboxes within their INBOX hierarchy.
+
+<h2><a name="login">Login Authentication</A></H2>
+
+This section discusses different types of authentication (ways of logging
+in) that can be used with Cyrus IMAP.
+
+<p>The Cyrus IMAP server uses the Cyrus SASL library for
+authentication. This section describes how to configure SASL with use
+with Cyrus imapd. Please consult the Cyrus SASL System
+Administrator's Guide for more detailed, up-to-date information.
+
+<h3><a name="loginanon">Anonymous Logins</A></H3>
+
+Regardless of the SASL mechanism used by an individual connection, the
+server can support anonymous login. If the
+"<TT>allowanonymouslogin</TT>" option in "<tt>/etc/imapd.conf</tt>" is
+turned on, then the server will permit plaintext password logins using
+the user "<TT>anonymous</TT>" and any password.
+
+Additionally, the server will enable any SASL mechanisms that allow
+anonymous logins.
+
+<h3><a name="loginplain">Plaintext Authentication</a></h3>
+
+The SASL library has several ways of verifying plaintext passwords
+Plaintext passwords are passed either by the IMAP <tt>LOGIN</tt>
+command or by the SASL <TT>PLAIN</TT> mechanism (under a TLS layer).
+
+<ul>
+<li>PAM
+<li>Kerberos v4
+
+Plaintext passwords are verified by obtaining a ticket for the
+server's Kerberos identity, to protect against Kerberos server
+spoofing attacks.
+
+<li><tt>/etc/passwd</tt>
+<li><tt>/etc/shadow</tt>
+<li>etc.
+</ul>
+
+<tt>sasl_auto_transition</tt> automatically creates secrets for shared
+secret authentication when given a password.
+
+<p>The method of plaintext password verification is always through the
+SASL library, even in the case of the internal LOGIN command. This is
+to allow the SASL library to be the only source of authentication
+information. You'll want to look at the <tt>sasl_pwcheck_method</tt> option
+in the SASL documentation to understand how to configure a plaintext
+password verifier for your system.
+
+<p>To disallow the use of plaintext passwords for authentication, you
+can set <tt>allowplaintext: no</tt> in imapd.conf. This will still allow
+PLAIN under TLS, but IMAP LOGIN commands will now fail.
+
+<h3><a name="loginker">Kerberos Logins</A></H3>
+
+The Kerberos SASL mechanism supports the <TT>KERBEROS_V4</TT>
+authentication mechanism. The mechanism requires that a
+<TT>srvtab</TT> file exist in the location given in the
+"<TT>srvtab</TT>" configuration option. The <TT>srvtab</TT> file must
+be readable by the Cyrus server and must contain a
+"<TT>imap.<VAR><host></VAR><VAR>@<realm></VAR></TT>"
+service key, where <TT><VAR><host></VAR></TT> is the first
+component of the server's host name and
+<TT><VAR><realm></VAR></TT> is the server's Kerberos realm.
+
+<p>The server will permit logins by identities in the local realm and
+identities in the realms listed in the "<TT>loginrealms</TT>" option
+in "<tt>/etc/imapd.conf</tt>".
+
+<p>The file "<TT>/etc/krb.equiv</TT>" contains mappings between
+Kerberos principals. The file contains zero or more lines, each
+containing two fields. Any identity matching the first field of a
+line is permitted to log in as the identity in the second field.
+
+<p>If the "<TT>loginuseacl</TT>" configuration option is turned on,
+than any Kerberos identity that is granted the "<tt>a</tt>" right on
+the user's <TT>INBOX</TT> is permitted to log in as that user.
+
+<h3><a name="loginmd5">Shared Secrets Logins</a></h3>
+
+Some mechanisms require the user and the server to share a secret (generally
+a password) that can be used for comparison without actually passing the
+password in the clear across the network. For these mechanism (such as
+CRAM-MD5 and DIGEST-MD5), you will need to supply a source of passwords,
+such as the sasldb (which is described more fully in the Cyrus SASL
+distribution)
+
+<h2><a name="quota">Quotas</a></h2>
+
+Quotas allow server administrators to limit resources used by
+hierarchies of mailboxes on the server.
+
+<h3><a name="quotasup">Supports Quotas on Storage</a></h3>
+
+<p>The Cyrus IMAP server supports quotas on storage, which is defined
+as the number of bytes of the relevant RFC-822 messages, in kilobytes.
+Each copy of a message is counted independently, even when the server
+can conserve disk space use by making hard links to message files.
+The additional disk space overhead used by mailbox index and cache
+files is not charged against a quota.
+
+<h3><a name="quotaroots">Quota Roots</a></h3>
+
+Quotas are applied to quota roots, which can be at any level of the
+mailbox hierarchy. Quota roots need not also be mailboxes.
+
+<p>Quotas on a quota root apply to the sum of the usage of any mailbox at
+that level and any sub-mailboxes of that level that are not underneath
+a quota root on a sub-hierarchy. This means that each mailbox is
+limited by at most one quota root.
+
+<p>For example, if the mailboxes
+
+<pre>
+ user.bovik
+ user.bovik.list.imap
+ user.bovik.list.info-cyrus
+ user.bovik.saved
+ user.bovik.todo
+</pre>
+
+<p>exist and the quota roots
+
+<pre>
+ user.bovik
+ user.bovik.list
+ user.bovik.saved
+</pre>
+
+exist, then the quota root "<TT>user.bovik</TT>" applies to the
+mailboxes "<TT>user.bovik</TT>" and "<TT>user.bovik.todo</TT>"; the
+quota root "<tt>user.bovik.list</tt>" applies to the mailboxes
+"<tt>user.bovik.list.imap</tt>" and
+"<tt>user.bovik.list.info-cyrus</tt>"; and the quota root
+"<tt>user.bovik.saved</tt>" applies to the mailbox
+"<tt>user.bovik.saved</tt>".
+
+<p>Quota roots are created automatically when they
+are mentioned in the
+"<tt>setquota</tt>" command. Quota roots may not be deleted through the
+protocol, see <A href="#recoveryquotasrm">Removing Quota Roots</A> for
+instructions on how to delete them.
+
+<h3><a name="quotamail">Mail Delivery Behavior</a></h3>
+
+Normally, in order for a message to be inserted into a mailbox, the
+quota root for the mailbox must have enough unused storage so that
+inserting the message will not cause the block quota to go over the limit.
+
+<p>Mail delivery is a special case. In order for a message to be
+delivered to a mailbox, the quota root for the mailbox must not have
+usage that is over the limit. If the usage is not over the limit,
+then one message may be delivered regardless of its size. This puts
+the mailbox's usage over the quota, causing a user to be informed of
+the problem and permitting them to correct it. If delivery were not
+permitted in this case, the user would have no practical way of
+knowing that there was mail that could not be delivered.
+
+<p>If the usage is over the limit, then the mail delivery will fail with
+a temporary error. This will cause the delivery system to re-attempt
+delivery for a couple of days (permitting the user time to notice and
+correct the problem) and then return the mail to the sender.
+
+<h3><a name="quotawarnings">Quota Warnings Upon Select When User Has "<TT>d</TT>" Rights</a></h3>
+
+When a user selects a mailbox whose quota root has usage that is close
+to or over the limit and the user has "<TT>d</TT>" rights on the mailbox, the
+server will issue an alert notifying the user that usage is close to
+or over the limit. The threshold of usage at which the server will
+issue quota warnings is set by the "<TT>quotawarn</TT>" configuration option.
+
+<p>The server only issues warnings when the user has "<TT>d</TT>"
+rights because only users with "<TT>d</TT>" rights are capable of
+correcting the problem.
+
+<h3><a name="quotapartitions">Quotas and Partitions</a></h3>
+
+Quota roots are independent of <A href="#partitions">partitions</A>. A single
+quota root can apply to mailboxes in different partitions.
+
+<h2><a name="notification">New Mail Notification</a></h2>
+
+<p>The Cyrus IMAP server comes with a notification daemon which
+supports multiple mechanisms for notifying users of new mail.
+Notifications can be configured to be sent upon normal delivery
+(<tt>"MAIL"</tt> class) and/or sent as requested by a <a
+href=specs.html#sieve>Sieve</a> script (<tt>"SIEVE"</tt> class).
+
+<p>By default, both types of notifications are disabled.
+Notifications are enabled by using one or both of the following
+configuration options:
+
+<ul>
+<li>
+the "<TT>mailnotifier</TT>" option selects the <a
+href=man/notifyd.8.html>notifyd</a> method to use for
+"<tt>MAIL</tt>" class notifications
+</li>
+
+<li>
+the "<TT>sievenotifier</TT>" option selects the <a
+href=man/notifyd.8.html>notifyd</a> method to use for
+"<tt>SIEVE</tt>" class notifications (when no method is specified by
+the Sieve action)
+</li>
+</ul>
+
+<h2><a name="partitions">Partitions</a></h2>
+
+Partitions allow administrators to store different mailboxes in
+different parts of the Unix filesystem. This is intended to be used
+to allow hierarchies of mailboxes to be spread across multiple disks.
+
+<h3><a name="partitionscreate">Specifying Partitions with "<TT>create</TT>"</a></h3>
+
+When an administrator creates a new mailbox, the name of the partition
+for the mailbox may be specified using an optional second argument to
+the "<TT>create</TT>" command. Non-administrators are not permitted to
+specify the partition of a mailbox. If the partition is not
+specified, then the mailbox inherits the partition of its most
+immediate parent mailbox. If the mailbox has no parent, it gets the
+partition specified in the "<TT>defaultpartition</TT>" configuration
+option.
+
+<P>The optional second argument to the "<TT>create</TT>" command can
+usually be given only when using a specialized Cyrus-aware administrative
+client such as <I>cyradm</I>.
+
+<h3><a name="partitionsrename">Changing Partitions with "<TT>rename</TT>"</a></h3>
+
+An administrator may change the partition of a mailbox by using the
+rename command with an optional third argument. When a third argument
+to rename is given, the first and second arguments can be the
+same--this changes the partition of a mailbox without changing its
+name. If a third argument to rename is not given and the first
+argument is not "<TT>INBOX</TT>", the partition of a mailbox does not change.
+If a third argument to rename is not given and the first argument is
+"<TT>INBOX</TT>", the newly created mailbox gets the same partition it would
+get from the "<TT>create</TT>" command.
+
+<h2><A NAME="news">News</a></h2>
+
+Cyrus has the ability to export Usenet via IMAP and/or export shared
+IMAP mailboxes via an NNTP server which is included with Cyrus. For
+more information on exporting news groups through the IMAP server, see
+<a href="install-netnews.html">install-netnews.html</a>.
+
+<h2><a name="pop3">POP3 Server</a></h2>
+
+The Cyrus IMAP server software comes with a compatibility POP3 server.
+Due to limitations in the POP3 protocol, the server can only access a
+user's <tt>INBOX</tt> and only one instance of a POP3 server may exist for any
+one user at any time. While a POP3 server has a user's <tt>INBOX</tt> open,
+expunge operations from any concurrent IMAP session will fail.
+
+<p>When Kerberos login authentication is being used, the POP3 server
+uses the server identity
+"<TT>pop.<VAR>host</VAR>@<VAR>realm</VAR></TT>" instead of
+"<TT>imap.<VAR>host</VAR>@<VAR>realm</VAR></TT>", where
+"<TT><VAR>host</VAR></TT>" is the first component of the server's host
+name and "<TT><VAR>realm</VAR></TT>" is the server's Kerberos realm.
+When the POP3 server is invoked with the "<TT>-k</TT>" switch, the
+server exports MIT's KPOP protocol instead of generic POP3.
+
+<h3><a name="syslog">The <TT>syslog</TT> facility</a></h3>
+
+The Cyrus IMAP server software sends log messages to the "<TT>local6</TT>"
+syslog facility. The severity levels used are:
+
+<UL>
+<LI><TT>CRIT</TT> - Critical errors which probably require prompt administrator action
+<LI><TT>ERR</TT> - I/O errors, including failure to update quota usage.
+The syslog message includes the specific file and Unix error.
+<LI><TT>WARNING</TT> - Protection mechanism failures, client inactivity
+timeouts
+<LI><TT>NOTICE</TT> - Authentications, both successful and unsuccessful
+<LI><TT>INFO</TT> - Mailbox openings, duplicate delivery suppression
+</UL>
+
+<h2><a name="recovery">Mail Directory Recovery</a></h2>
+
+This section describes the various databases used by the Cyrus IMAP
+server software and what can be done to recover from various
+inconsistencies in these databases.
+
+<h3><a name="recoverymboxdir">Reconstructing Mailbox Directories</a></h3>
+
+The largest database is the mailbox directories. Each
+mailbox directory contains the following files:
+
+<DL>
+<DT>message files
+<DD> There is one file per message, containing the
+ message in RFC 822 format. Lines in the message are separated by
+ CRLF, not just LF. The file name of each message is the message's
+ UID followed by a dot (.).
+
+<P>In netnews newsgroups, the message files instead follow the
+ format and naming conventions imposed by the netnews software. <P>
+
+<DT><TT>cyrus.header</TT>
+<DD>This file contains a magic number and variable-length
+ information about the mailbox itself. <P>
+
+<DT><TT>cyrus.index</TT>
+<DD>This file contains fixed-length information about the
+ mailbox itself and each message in the mailbox. <P>
+
+<DT><TT>cyrus.cache</TT>
+<DD>This file contans variable-length information about
+ each message in the mailbox. <P>
+
+<DT><TT>cyrus.seen</TT>
+<DD>This file contains variable-length state information about
+ each reader of the mailbox who has "<TT>s</TT>" permissions.
+</DL>
+
+The "<TT>reconstruct</TT>" program can be used to recover from
+corruption in mailbox directories. If "<TT>reconstruct</TT>" can find
+existing header and index files, it attempts to preserve any data in
+them that is not derivable from the message files themselves. The
+state "<TT>reconstruct</TT>" attempts to preserve includes the flag
+names, flag state, and internal date. "<TT>Reconstruct</TT>"
+derives all other information from the message files.
+
+<p>An administrator may recover from a damaged disk by restoring message
+files from a backup and then running reconstruct to regenerate what it
+can of the other files.
+
+<p>The "<TT>reconstruct</TT>" program does not adjust the quota usage
+recorded in any quota root files. After running reconstruct, it is
+advisable to run "<TT>quota -f</TT>" (described below) in order to fix
+the quota root files.
+
+<h3><a name="recoverymbox">Reconstructing the Mailboxes File</a></h3>
+
+<B><I> NOTE: CURRENTLY UNAVAILABLE </I></B> <p>
+
+The mailboxes file in the configuration directory is the most critical
+file in the entire Cyrus IMAP system. It contains a sorted list of
+each mailbox on the server, along with the mailboxes quota root and
+ACL.
+
+To reconstruct a corrupted mailboxes file, run the "<TT>reconstruct
+-m</TT>" command. The "<TT>reconstruct</TT>" program, when invoked
+with the "<TT>-m</TT>" switch, scavenges and corrects whatever data it
+can find in the existing mailboxes file. It then scans all partitions
+listed in the imapd.conf file for additional mailbox directories to
+put in the mailboxes file.
+
+<p>The <TT>cyrus.header</TT> file in each mailbox directory stores a
+redundant copy of the mailbox ACL, to be used as a backup when
+rebuilding the mailboxes file.
+
+<h3><a name="recoveryquotas">Reconstructing Quota Roots</a></h3>
+
+The subdirectory "<TT>quota</TT>" of the configuration directory (specified in
+the "<TT>configdirectory</TT>" configuration option) contains one file per
+quota root, with the file name being the name of the quota root. These
+files store the quota usage and limits of each of the quota roots.
+
+<p>The "<TT>quota</TT>" program, when invoked with the "<TT>-f</TT>"
+switch, recalculates the quota root of each mailbox and the quota
+usage of each <a href="#quotaroots">quota root</a>.
+
+<h4><a name="recoveryquotasrm">Removing Quota Roots</a></h4>
+
+To remove a quota root, remove the quota root's file. Then run
+"<TT>quota -f</TT>" to make the quota files consistent again.
+
+<h3><a name="recoverysubs">Subscriptions</a></h3>
+
+The subdirectory "<TT>user</TT>" of the configuration directory contains user
+subscriptions. There is one file per user, with a filename of the
+userid followed by "<TT>.sub</TT>". Each file contains a sorted list of
+subscribed mailboxes.
+
+<p>There is no program to recover from damaged subscription files. A
+site may recover from lost subscription files by restoring from backups.
+
+<h2><a name="configdir">Configuration Directory</a></h2>
+
+Many objects in the configuration directory are discussed in
+the Database Recovery section. This section documents two
+other directories that reside in the configuration directory.
+
+<h3><a name="configdirlog">"<TT>log</TT>" Directory</a></h3>
+
+The subdirectory "<TT>log</TT>" under the configuration directory permits
+administrators to keep protocol telemetry logs on a per-user basis.
+
+<p>If a subdirectory of "<TT>log</TT>" exists with the same name as a user, the
+IMAP and POP3 servers will keep a telemetry log of protocol sessions
+authenticating as that user. The telemetry log is stored in the
+subdirectory with a filename of the server process-id and starts with
+the first command following authentication.
+
+<h3><a name="configdirproc">"<TT>proc</TT>" Directory</a></h3>
+
+The subdirectory "<TT>proc</TT>" under the configuration directory
+contains one file per active server process. The file name is the ASCII
+representation of the process id and the file contains the following
+tab-separated fields:
+
+<UL>
+<LI>hostname of the client
+<LI>login name of the user, if logged in
+<LI>selected mailbox, if a mailbox is selected
+</UL>
+
+The file may contain arbitrary characters after the first newline
+character.
+
+<p>The "<TT>proc</TT>" subdirectory is normally be cleaned out on
+server reboot.
+
+<h2>Message Delivery</h2><a name="messagedelivery"></a>
+
+<p>Mail transport agents such as Sendmail, Postfix, or Exim communicate
+with the Cyrus server via LMTP (the Local Mail Transport Protocol)
+implemented by the LMTP daemon. This can be done either directly by the
+MTA (prefered, for performance reasons) or via the <tt>deliver</tt> LMTP
+client.
+
+<h3>Local Mail Transfer Protocol</h3><a name="lmtp"></a>
+
+<p>LMTP, the Local Mail Transfer Protocol, is a variant of SMTP design for
+transferring mail to the final message store. LMTP allows MTAs to deliver
+"local" mail over a network. This is an easy optimization so that the
+IMAP server doesn't need to maintain a queue of messages or run an
+MTA.</p>
+
+<p>The Cyrus server implements LMTP via the <tt>lmtpd</tt> daemon. LMTP
+can either be used over a network via TCP or local via a UNIX domain
+socket. There are security differnces between these two alternatives; read
+more below</p>
+
+<p>For final delivery via LMTP over a TCP socket, it is necessary to use
+LMTP AUTH. This is accomplished using SASL to authenticate the delivering
+user. If your mail server is performing delivery via LMTP AUTH (that is,
+using a SASL mechanism), you will want their authentication id to be an
+LMTP admins (either via the <tt>admins</tt> imapd.conf option or via the
+<tt><service>_admins</tt> option, typically <tt>lmtp_admins</tt>).</p>
+
+<p>Alternatively you may deliver via LMTP to a unix domain socket, and the
+connection will be preauthenticated as an administrative user (and access
+control is accomplished by controlling access to the socket).</p>
+
+<p>Note that if a user has a sieve script, the sieve script runs authorized
+as *that* user, and the rights of the posting user are ignored for the purposes
+of determining the outcome of the sieve script.</p>
+
+<h3>Single Instance Store</h3><a name="singleinstance"></a>
+
+<p>If a delivery attempt mentions several recipients (only possible if
+the MTA is speaking LMTP to <tt>lmtpd</tt>), the server attempts to
+store as few copies of a message as possible. It will store one copy
+of the message per partition, and create hard links for all other
+recipients of the message.</p>
+
+<p>Single instance store can be turned off by using the
+"singleinstancestore" flag in the configuration file.</p>
+
+<h3>Duplicate Delivery Suppression</h3><a name="duplicate"></a>
+
+A message is considered a duplicate if two copies of a message with
+the same message-id and the same envelope receipient are received.
+Cyrus uses the duplicate delivery database to hold this information,
+and it looks approximately 3 days back in the default install.
+
+<p>Duplicate delivery suppression can be turned off by using the
+"duplicatesuppression" flag in the configuration file.</p>
+
+<h3>Sieve, a Mail Filtering Language</h3><a name="sieve"></a>
+
+Sieve is a mail filtering language that can filter mail into an appropriate
+IMAP mailbox as it is delivered via lmtp. For more information, look
+<A HREF="sieve.html">here</a>.
+
+<h3>Cyrus Murder, the IMAP Aggregator</h3><a name="aggregator"></a>
+
+Cyrus now supports the distribution of mailboxes across a number of IMAP
+servers to allow for horizontal scalability. For information on setting
+up this configuration, see <A href="install-murder.html">here</A>.
+
+<P><HR><P>
+<A HREF="index.html">Return</A> to the Cyrus IMAP Server Home Page
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/questions.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/questions.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/questions.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/questions.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,33 @@
+<html>
+<head>
+<title>outstanding questions in cyrus documentation</title>
+<!-- $Id: questions.html,v 1.3 2003/10/16 15:33:31 rjs3 Exp $ -->
+</head><body>
+
+questions we really should answer. if you feel like doing us a favor,
+sit down and answer one.
+
+<ul>
+<li> why is it so hard to get <tt>imapd</tt> working with redhat's
+shadow password implementation?
+
+<li> When does <tt>imapd</tt> advertise PLAIN? when does it accept
+plaintext logins?
+
+<li> What are the advantages of LMTP?
+
+<li> How do I configure Sendmail to use LMTP?
+
+<li> How do I configure Postfix to work with Cyrus? To use LMTP?
+
+<li> How can I run LMTP over TCP? Why should I want to?
+
+<li> What are the performance implications of single-instance store?
+(in effect as of 1.6.22) How should I configure partitions to deal
+with a large number of users?
+
+</ul>
+
+
+</body>
+</html>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/readme.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/readme.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/readme.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/readme.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,195 @@
+<HTML><HEAD>
+ <TITLE>Cyrus IMAP Server Release Information</TITLE>
+ <!-- $Id: readme.html,v 1.19.2.1 2006/07/10 14:04:22 murch Exp $ -->
+ </HEAD><BODY>
+ <H1> Cyrus IMAP Server Release Information</H1>
+
+
+IMAP (Internet Message Access Protocol) is an Internet standards-track
+protocol for accessing messages (mail, bboards, news, etc). The Cyrus
+IMAP server differs from other IMAP server implementations in that it
+is generally intended to be run on "sealed" servers, where normal
+users are not permitted to log in. The mailbox database is stored in
+parts of the filesystem that are private to the Cyrus IMAP system.
+All user access to mail is through the IMAP, NNTP, POP3, or KPOP protocols.
+
+<P> The private mailbox database design gives the server large
+advantages in efficiency, scalability, and administratability.
+Multiple concurrent read/write connections to the same mailbox are
+permitted. The server supports access control lists on mailboxes and
+storage quotas on mailbox hierarchies.
+
+<h2>Features</h2>
+
+<P> The Cyrus server supports the IMAP4rev1 protocol described in RFC
+3501. IMAP4rev1 has been approved as a proposed standard.
+
+<P> Character sets supported for searching are: us-ascii, iso-8859-1,
+iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6,
+iso-8859-7, iso-8859-8, iso-8859-9, koi8-r, iso-2022-jp,
+iso-2022-kr, gb2312, big5, iso-8859-15, windows-1252, windows-1256. The
+character mapping tables most likely contain errors.
+
+<P> The server supports any authentication mechanism available from
+the SASL library. Currently, support includes: KERBEROS_V4, GSSAPI,
+CRAM-MD5, DIGEST-MD5, OTP, PLAIN, and STARTTLS.
+
+<p> The server supports imaps/pop3s/nntps (IMAP/POP3/NNTP encrypted using SSL).
+
+<p> The server makes an attempt to do single instance store where
+possible when an email message is addressed to multiple recipients.
+
+<p>We current support the following IMAP capabilities:
+<tt>
+IMAP4 IMAP4rev1 ACL RIGHTS=kxte QUOTA LITERAL+ NAMESPACE UIDPLUS ID
+NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND SORT SORT=MODSEQ
+THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE
+CONDSTORE URLAUTH IDLE STARTTLS SASL-IR</tt>.
+
+<p> The server supports SIEVE for server side email filtering.
+
+<h2>Upgrade Caveats</h2>
+
+This section reserved for WARNING WARNING WARNING comments.
+
+<br><br><b><i>Note that the replication protocol currently does not have
+the facility to support the IMAP CONDSTORE extension (modification
+sequences). It is recommended that you do not try to use both
+CONDSTORE and replication at this time. The deficiencies in the
+replication protocol will be fixed in version 2.3.8.
+</i></b>
+
+
+<h2>Installation Overview</h2>
+
+<P> This system should be expected to have the same order-of-magnitude
+installation complexity as a netnews system. Maintenance should have
+similar complexity, except administrators will have to deal with <A
+HREF="cyradm.1.html">creation and deletion of users</A> and will have
+the option of managing quotas and access control lists.
+
+<p>This package is distributed as a source only release. It is
+expected that you can compile and configure software. Installation
+instructions are in the <a
+href="install.html">install.html</a>. Please be sure to read
+this document.
+
+<p>A detailed overview of the server is available in <a
+href="overview.html">overview.html</a>.
+
+<P> This server has been successfully installed on a number of Unix
+systems. We run the software under SPARC Solaris 2.7. Please refer
+to <a href="os.html">os.html</a> for operating system specific issues.
+
+
+<h2>Server Notes</h2>
+
+<P> The mailbox namespace is like that for netnews--hierarchical names
+separated by the "<tt>.</tt>" character. Mailboxes without a parent
+may only be created by an administrator. Mailboxes with a parent may
+be created as the ACL (Access Control List) on the parent mailbox
+permits.
+
+<P> Users' personal mailboxes are under the "<tt>user</tt>" hierarchy.
+The names of the personal mailboxes for user "<tt>bovik</tt>" all
+start with the prefix "<tt>user.bovik.</tt>". The mailbox
+"<tt>user.bovik</tt>" is special in that it is presented to user
+"<tt>bovik</tt>" as if it were named "<tt>INBOX</tt>". Creating the
+mailbox "<tt>user.bovik</tt>" is equivalent to creating an account for
+user "<tt>bovik</tt>"--it permits "<tt>bovik</tt>" to receive mail,
+create personal mailboxes, and subscribe to mailboxes. Deleting the
+mailbox "<tt>user.bovik</tt>" has the special-case side-effect of
+deleting all mailboxes starting with "<tt>user.bovik.</tt>" and of
+deleting the subscriptions for "<tt>bovik</tt>."
+
+<h2>Licensing Information</h2>
+
+The following copyright applies to the code:
+
+<pre>
+ * Copyright (c) 1994-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+</pre>
+
+<p>If you find this software useful and valuable in your work, we
+would welcome any support you can offer toward continuing this work.
+We gratefully accept contributions, whether intellectual or monetary.
+Intellectual contributions in the form of code or constructive
+collaboration can be directed via the <a href="feedback.html">feedback
+page</a>.
+
+<p>If you wish to provide financial support to the Cyrus Project,
+send a check payable to "Carnegie Mellon University" to
+<pre>
+ Project Cyrus
+ Computing Services
+ Carnegie Mellon University
+ 5000 Forbes Ave
+ Pittsburgh, PA 15213
+ USA
+</pre>
+
+<h2>Summary</h2>
+
+<p>If you want to install the server, be sure to read the installation
+instructions in <a
+href="install.html">install.html</a>.
+
+<p>More details about the server implementation is in the <a
+href="overview.html">server overview</a> document.
+
+<p>Please refer to <a href="feedback.html">Sending Feedback</a> if you
+would like to submit a bug, feature request or (best of all) patch.
+
+<p>There is a mailing list. See the <a
+href="mailing-list.html">mailing list</a> document for details.
+
+<p>A list of known problems can be found in the <a
+href="bugs.html">bugs</a> file.
+
+<p><a href="http://www.ora.com">O'Reilly</a> has a book out named <a
+href="http://www.oreilly.com/catalog/mimap/">Managing IMAP</a>. While
+ the book does not directly talk about the 2.0 code base, it
+ provides very good information on the configuration and
+ setup that can be applied to the newer code.
+
+<P><HR>
+last modified: 2001/08/03 21:18:05
+<br>
+<A HREF="index.html">Return</A> to the Cyrus IMAP Server Home Page
+</BODY></HTML>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve-protocol.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve-protocol.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve-protocol.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve-protocol.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,89 @@
+<!-- $Id: sieve-protocol.html,v 1.3 2003/05/02 17:01:57 rjs3 Exp $ -->
+
+<HTML><HEAD>
+<TITLE>Protocol for Sieve script exchange</TITLE>
+</HEAD><BODY>
+<H1>Protocol for Sieve script exchange</H1>
+
+<i>Please note that this document is not authoritative and may well be out
+of date, you should look at <a href=specs.html>specs.html</a> for the
+current authoritative document for the MANAGESIEVE protocol.</i>
+
+Note: This is <b>not</b> a standards track protocol. If you decide to base
+a program upon it you have been warned.
+
+This is a simple text-based protocol for getting user sieve scripts
+onto the (presumably sealed) IMAP server. The requirements for this
+process are:
+
+<ul>
+<li> the user must authenticate to gain access, preferably via a
+secure SASL mechanism.
+<li> only valid sieve scripts may be accepted
+</ul>
+
+Additional features provided:
+
+<ul>
+<li> the ability to manage multiple scripts on the server with zero or one
+of them being the "active" sieve script
+</ul>
+
+<h3>Types</h3>
+
+This a line oriented protocol much like [IMAP] or [ACAP]. There
+are two types: ATOMS and strings. Strings may be quoted or
+literal. See [ACAP] for detailed descriptions.
+<br>
+
+<i>sievename</i> is a string where only certain characters are
+allowed and it must be at least 1 character long.
+
+<h3>Commands</h3>
+
+<dl>
+<DT><tt>AUTHENTICATE SP <i>string</i> [SP <i>string</i>] EOL</tt>
+<DD>
+SASL authentication; the parameters are the mechanism and optionally
+the initial data. Initial data is base64 encoded. The server
+replies with a OK or NO response, or a string base64 encoded followed
+by an EOL. Client then replies with a string base64 encoded followed
+by an EOL and the procedure is repeated.
+
+<DT><tt>NOOP EOL</tt>
+<DD>
+No side affects. OK, NO replies
+
+<DT><tt>LOGOUT EOL</tt>
+<DD>
+Logout, terminates connection. OK, NO replies.
+
+<DT><tt>GETSCRIPT SP <i>sievename</i> EOL</tt>
+<DD>
+
+The parameter is the name of the requested script.
+Returns: <tt>string EOL</tt> containing the script data.
+Get the script with name <i>sievename</i> from the server. OK, NO replies
+
+<DT><tt>PUTSCRIPT SP <i>sievename</i> SP <i>string</i> </tt> EOL
+<DD>
+Puts <i>sievename</i> with data <i>data</i> onto the server if
+possible. OK, NO replies.
+
+<DT><tt> SETACTIVE SP <i>sievename</i> </tt>EOL
+<DD>
+Set the script with the name <i>sievename</i> as the active
+script. Any other script that was active is no longer. OK, NO replies
+
+<DT><TT>DELETESCRIPT SP <i>sievename</i> </tt>EOL
+<DD>
+Delete the script with <i>sievename</i>. OK or NO replies.
+
+<DT><TT>LISTSCRIPTS EOL</TT>
+<DD>
+returns zero or more: <i>sievename</i> EOL.
+where the active script has a '*' at the end of it's name
+OK or NO replies
+
+</dl>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/sieve.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+<HTML><HEAD>
+<TITLE>Sieve: A mail filtering language</TITLE>
+<!-- $Id: sieve.html,v 1.1 2000/04/25 02:56:46 leg Exp $ -->
+</HEAD><BODY>
+<H1> Sieve: A mail filtering language</H1>
+
+Sieve is a Internet standards-track protocol for filtering messages on
+delivery. The Cyrus Sieve implementation supports filing messages
+into specific folders, forwarding messages, rejecting messages, and
+the standard vacation function. It can reply to messages based on
+headers or envelope information.
+
+<H2>Cyrus Sieve</H2>
+
+<H2>Some simple sample Sieve scripts</H2>
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/specs.html
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/specs.html?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/specs.html (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/specs.html Sat Aug 26 02:00:13 2006
@@ -1,0 +1,215 @@
+<!-- $Id: specs.html,v 1.50.2.32 2006/06/16 15:10:28 murch Exp $ -->
+<HTML>
+<HEAD>
+<TITLE>Cyrus IMAP Server Protocol Specifications</TITLE>
+</HEAD>
+<BODY>
+<h1>Cyrus IMAP Server Protocol Specifications</h1>
+
+<TABLE BORDER="1" CELLSPACING="1" CELLPADDING="2">
+
+<TR><TD COLSPAN=2><br><h2>IMAP</h2></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3501.txt">RFC 3501</A></TD>
+<TD>Internet Message Access Protocol - version 4rev1
+<BR><I>being updated by</I> <A HREF="ftp://ftp.cac.washington.edu/mail/rfc3501-errata">
+rfc3501-errata</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc1730.txt">RFC 1730</A></TD>
+<TD>Internet Message Access Protocol - version 4</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc4314.txt">RFC 4314</A></TD>
+<TD>IMAP4 Access Control List (ACL) Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2087.txt">RFC 2087</A></TD>
+<TD>IMAP4 QUOTA extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2088.txt">RFC 2088</A></TD>
+<TD>IMAP4 non-synchronizing literals</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2177.txt">RFC 2177</A></TD>
+<TD>IMAP4 IDLE command</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2192.txt">RFC 2192</A></TD>
+<TD>IMAP URL Scheme
+<BR><I>being updated by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-lemonade-rfc2192bis-02.txt">draft-ietf-lemonade-rfc2192bis</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2193.txt">RFC 2193</A></TD>
+<TD>IMAP4 Mailbox Referrals</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2342.txt">RFC 2342</A></TD>
+<TD>IMAP4 Namespace</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc4315.txt">RFC 4315</A></TD>
+<TD>Internet Message Access Protocol (IMAP) - UIDPLUS extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2971.txt">RFC 2971</A></TD>
+<TD>IMAP4 ID extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3348.txt">RFC 3348</A></TD>
+<TD>IMAP4 Child Mailbox Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3502.txt">RFC 3502</A></TD>
+<TD>IMAP MULTIAPPEND extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3516.txt">RFC 3516</A></TD>
+<TD>IMAP4 Binary Content Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3691.txt">RFC 3691</A></TD>
+<TD>Internet Message Access Protocol (IMAP) UNSELECT command</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc4467.txt">RFC 4467</A></TD>
+<TD>Internet Message Access Protocol (IMAP) - URLAUTH Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc4469.txt">RFC 4469</A></TD>
+<TD>Internet Message Access Protocol (IMAP) CATENATE Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc4550.txt">RFC 4550</A></TD>
+<TD>Internet Email to Support Diverse Service Environments (Lemonade)
+Profile</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc4551.txt">RFC 4551</A></TD>
+<TD>IMAP Extension for Conditional STORE operation</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-ietf-imapext-sort-17.txt">
+draft-ietf-imapext-sort</A></TD>
+<TD>IMAP SORT and THREAD Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-ietf-imapext-list-extensions-13.txt">
+draft-ietf-imapext-list-extensions</A></TD>
+<TD>IMAP4 LIST Command Extensions</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-daboo-imap-annotatemore-09.txt">
+draft-daboo-imap-annotatemore</A></TD>
+<TD>IMAP ANNOTATEMORE Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-siemborski-imap-sasl-initial-response-04.txt">
+draft-siemborski-imap-sasl-initial-response</A></TD>
+<TD>IMAP Extension for SASL Initial Client Response</TD></TR>
+
+
+<TR><TD COLSPAN=2><br><h2>POP</h2></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc1939.txt">RFC 1939</A></TD>
+<TD>Post Office Protocol - Version 3 (POP3)</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc1734.txt">RFC 1734</A></TD>
+<TD>POP3 AUTHentication command
+<BR><I>being updated by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-siemborski-rfc1734bis-04.txt">
+draft-siemborski-rfc1734bis</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2449.txt">RFC 2449</A></TD>
+<TD>POP3 Extension Mechanism</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2595.txt">RFC 2595</A></TD>
+<TD>Using TLS with IMAP, POP3 and ACAP</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3206.txt">
+RFC 3206</A></TD><TD>The SYS and AUTH POP Response Codes</TD></TR>
+
+<TR><TD COLSPAN=2><br><h2>NNTP</h2></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc0977.txt">RFC 977</A></TD>
+<TD>Network News Transfer Protocol
+<BR><I>being updated by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-nntpext-base-27.txt">
+draft-ietf-nntpext-base</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2980.txt">RFC 2980</A></TD>
+<TD>Common NNTP Extensions</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-ietf-nntpext-streaming-06.txt">
+draft-ietf-nntpext-streaming</A></TD>
+<TD>NNTP Extension for Streaming Feeds</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-ietf-nntpext-authinfo-09.txt">
+draft-ietf-nntpext-authinfo</A></TD>
+<TD>NNTP Extension for Authentication</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-ietf-nntpext-tls-nntp-07.txt">
+draft-ietf-nntpext-tls-nntp</A></TD>
+<TD>Using TLS with NNTP</TD></TR>
+
+<TR><TD COLSPAN=2><br><h2>SASL</h2></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A></TD>
+<TD>Simple Authentication and Security Layer (SASL)
+<BR><I>being revised by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sasl-rfc2222bis-11.txt">
+draft-ietf-sasl-rfc2222bis</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2195.txt">RFC 2195</A></TD>
+<TD>IMAP/POP AUTHorize Extension for Simple Challenge/Response
+<BR><I>being revised by</I>
+<A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sasl-crammd5-04.txt">
+draft-ietf-sasl-crammd5</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2245.txt">RFC 2245</A></TD>
+<TD>Anonymous SASL Mechanism
+<BR><I>being revised by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sasl-anon-05.txt">
+draft-ietf-sasl-anon</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2444.txt">RFC 2444</A></TD>
+<TD>The One-Time-Password SASL Mechanism</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2595.txt">RFC 2595</A></TD>
+<TD>Using TLS with IMAP, POP3 and ACAP
+<BR><I>being revised by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sasl-plain-08.txt">
+draft-ietf-sasl-plain</a></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2831.txt">RFC 2831</A></TD>
+<TD>Using Digest Authentication as a SASL Mechanism
+<BR><I>being revised by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sasl-rfc2831bis-06.txt">
+draft-ietf-sasl-rfc2831bis</a></TD></TR>
+
+<TR><TD COLSPAN=2><br><h2>TLS/SSL</h2></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2246.txt">RFC 2246</A></TD>
+<TD>The TLS Protocol Version 1.0
+<BR><I>being revised by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-tls-rfc2246-bis-13.txt">
+draft-ietf-tls-rfc2246-bis</a></TD></TR>
+<TR><TD><A HREF="http://www.netscape.com/eng/ssl3/draft302.txt">
+draft-freier-ssl-version3</A></TD>
+<TD>The SSL Protocol Version 3.0</TD></TR>
+<TR><TD><A HREF="http://www.netscape.com/eng/security/SSL_2.html">
+draft-hickman-netscape-ssl</A></TD>
+<TD>The SSL Protocol Version 2.0</TD></TR>
+
+<TR><TD COLSPAN=2><br><h2>LMTP</h2></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2033.txt">RFC 2033</A></TD>
+<TD>Local Mail Transfer Protocol </TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2821.txt">RFC 2821</A></TD>
+<TD>Simple Mail Transfer Protocol (SMTP)</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc1869.txt">RFC 1869</A></TD>
+<TD>SMTP Service Extensions</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc1652.txt">RFC 1652</A></TD>
+<TD>SMTP Service Extension for 8bit-MIMEtransport</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc1870.txt">RFC 1870</A></TD>
+<TD>SMTP Service Extension for Message Size Declaration</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2034.txt">RFC 2034</A></TD>
+<TD>SMTP Service Extension for Returning Enhanced Error Codes</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3463.txt">RFC 3463</A></TD>
+<TD>Enhanced Mail System Status Codes</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3207.txt">RFC 3207</A></TD>
+<TD>SMTP Service Extension for Secure SMTP over TLS</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2554.txt">RFC 2554</A></TD>
+<TD>SMTP Service Extension for Authentication
+<BR><I>being updated by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-siemborski-rfc2554bis-04.txt">
+draft-siemborski-rfc2554bis</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2920.txt">RFC 2920</A></TD>
+<TD>SMTP Service Extension for Command Pipelining</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3848.txt">RFC 3848</A></TD>
+<TD>ESMTP and LMTP Transmission Types Registration</TD></TR>
+<TR><TD><A HREF="http://www.oceana.com/ftp/drafts/draft-murchison-lmtp-ignorequota-02.txt">
+draft-murchison-lmtp-ignorequota</A></TD>
+<TD>LMTP Service Extension for Ignoring Recipient Quotas</TD></TR>
+
+
+<TR><TD COLSPAN=2><br><h2>Sieve</h2></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3028.txt">RFC 3028</A></TD>
+<TD>Sieve: A Mail Filtering Language
+<BR><I>being updated by</I> <A HREF="http://ietf.org/internet-drafts/draft-ietf-sieve-3028bis-06.txt">
+draft-ietf-sieve-3028bis</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3431.txt">RFC 3431</A></TD>
+<TD>Sieve Extension: Relational Tests</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3598.txt">RFC 3598</A></TD>
+<TD>Sieve Email Filtering -- Subaddress Extension
+<BR><I>being updated by</I> <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sieve-rfc3598bis-04.txt">
+draft-ietf-sieve-rfc3598bis</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3894.txt">RFC 3894</A></TD>
+<TD>Sieve Extension: Copying Without Side Effects</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2298.txt">RFC 2298</A></TD>
+<TD>Extensible Message Format for Message Disposition Notifications (MDNs)</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sieve-vacation-06.txt">
+draft-ietf-sieve-vacation</A></TD>
+<TD>Sieve Email Filtering: Vacation Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sieve-body-03.txt">
+draft-ietf-sieve-body</A></TD>
+<TD>Sieve Mail Filtering Language: Body Extension</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/internet-drafts/draft-ietf-sieve-regex-00.txt">
+draft-ietf-sieve-regex</A></TD>
+<TD>Sieve -- Regular Expression Extension</TD></TR>
+<TR><TD><A HREF="http://www.oceana.com/ftp/drafts/draft-daboo-sieve-include-01.txt">
+draft-daboo-sieve-include</A></TD>
+<TD>SIEVE Include Extension</TD></TR>
+<TR><TD><A HREF="http://www.oceana.com/ftp/drafts/draft-melnikov-sieve-imapflags-03.txt">
+draft-melnikov-sieve-imapflags</A></TD>
+<TD>Sieve -- IMAP flag Extension</TD></TR>
+<TR><TD><A HREF="http://www.oceana.com/ftp/drafts/draft-martin-sieve-notify-01.txt">
+draft-martin-sieve-notify</A></TD>
+<TD>Sieve -- An extension for providing instant notifications</TD></TR>
+<TR><TD><A HREF="http://www.oceana.com/ftp/drafts/draft-martin-managesieve-04.txt">
+draft-martin-managesieve</A></TD>
+<TD>Protocol for Remotely Managing Sieve Scripts</TD></TR>
+
+<TR><TD COLSPAN=2><br><h2>Other</h2></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc2822.txt">RFC 2822</A></TD>
+<TD>Internet Message Format</TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc1036.txt">RFC 1036</A></TD>
+<TD>Standard for Interchange of USENET Messages
+<BR><I>being updated by</I>
+<A HREF="http://www.ietf.org/internet-drafts/draft-ietf-usefor-usefor-08.txt">
+draft-ietf-usefor-usefor</A> <I>and</I>
+<A HREF="http://www.ietf.org/internet-drafts/draft-ietf-usefor-usepro-05.txt">
+draft-ietf-usefor-usepro</A></TD></TR>
+<TR><TD><A HREF="http://www.ietf.org/rfc/rfc3656.txt">RFC 3656</a></TD>
+<TD>MUPDATE Protocol (For Cyrus Murder)</TD></TR>
+</TABLE>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,33 @@
+altnamespace
+anoncvs
+bugs
+changes
+faq
+feedback
+htmlstrip
+index
+install
+install-admin-mb
+install-auth
+install-compile
+install-configure
+install-murder
+install-netnews
+install-virtdomains
+install-perf
+install-prereq
+install-replication
+install-sieve
+install-snmpmon
+install-testing
+install-upgrade
+mailing-list
+man
+notes
+os
+overview
+questions
+readme
+sieve
+sieve-protocol
+specs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+/.cvsignore/1.2.2.1/Mon Dec 5 15:58:06 2005//Tcyrus-release-2-3-7
+/Makefile/1.4/Thu Nov 14 15:27:35 2002//Tcyrus-release-2-3-7
+/htmlstrip.c/1.9/Wed Oct 22 18:50:06 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/doc/text
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/Makefile
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/Makefile?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/Makefile (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/Makefile Sat Aug 26 02:00:13 2006
@@ -1,0 +1,57 @@
+# Makefile for cyrus documentation directory
+#
+# Copyright 1998 Carnegie Mellon University
+#
+# No warranties, either expressed or implied, are made regarding the
+# operation, use, or results of the software.
+#
+# Permission to use, copy, modify and distribute this software and its
+# documentation is hereby granted for non-commercial purposes only
+# provided that this copyright notice appears in all copies and in
+# supporting documentation.
+#
+# Permission is also granted to Internet Service Providers and others
+# entities to use the software for internal purposes.
+#
+# The distribution, modification or sale of a product which uses or is
+# based on the software, in whole or in part, for commercial purposes or
+# benefits requires specific, additional permission from:
+#
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# $Id: Makefile,v 1.4 2002/11/14 15:27:35 rjs3 Exp $
+
+all: htmlstrip docs clean
+
+docs:
+ for file in ../*.html; \
+ do \
+ echo "=== $$file ==="; \
+ ./htmlstrip $$file > `basename $$file .html`; \
+ done
+ @echo "== done =="
+
+htmlstrip: htmlstrip.c
+ $(CC) $(CFLAGS) -o htmlstrip htmlstrip.c
+
+clean:
+ rm -f *.o *~ Makefile.bak htmlstrip
+
+realclean: clean
+ rm -f $(DOCS)
+
+ci: docs
+ cvs ci -m 'updated from html source' $(DOCS)
+
+distclean: clean
+
+depend:
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/altnamespace
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/altnamespace?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/altnamespace (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/altnamespace Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+ Cyrus IMAP Server: Alternate Namespace
+
+ This document describes the alternatives to the standard mailbox
+ presentation method. These alternatives may be used together or
+ independently.
+
+ The namespace options do NOT change the rules governing the behavior of
+ mailboxes (as described in overview.html) or how mailboxes are stored
+ on the filesystem. The mailboxes are ALWAYS stored using the netnews
+ convention and internal namespace. When configured to use one (or both)
+ of the options below, the server simply translates mailbox names
+ between the internal names and the external names when used by the
+ client in the IMAP protocol and in Sieve scripts.
+
+ This design allows the namespace to be changed at runtime (even on a
+ running server) without having to reconfigure the server. This also
+ means that one mailstore can support multiple namespaces if configured
+ correctly.
+
+ NOTE: If you are upgrading an existing server which uses timsieved to
+ manage Sieve scripts and choose to enable one of the namespace options,
+ you should run the script "tools/translatesieve" after configuring the
+ namespace option(s). This script will translate the folder names in
+ fileinto actions.
+
+Alternate Mailbox Namespace
+
+ The alternate namespace allows a user's personal mailboxes to appear as
+ if they reside at the same level as that user's INBOX as opposed to
+ children of it. For example, if user "bovik" had a personal "work"
+ mailbox, it would appear to user "bovik" as "work" instead of
+ "INBOX.work" as it would in the standard namespace.
+
+ This configuration requires that a special prefix be used for shared
+ folders (to distinguish them from personal folders) and for accessing
+ other users' folders. By default, the prefix for shared folders is
+ "Shared Folders" and the prefix for other users folders is "Other
+ Users". For example, a shared folder "foo" in the standard namespace
+ would be presented as "Shared Folders.foo" in the alternate namespace.
+
+ NOTE: All tools for administering the server, including admins using
+ cyradm, always use the internal namespace.
+
+Configuring the Alternate Namespace
+
+ To use the alternate namespace, turn on the altnamespace option in
+ /etc/imapd.conf. The prefixes used for shared folders and other users
+ folders can be changed from the defaults by setting the sharedrefix and
+ userprefix options respectively.
+
+UNIX Hierarchy Convention
+
+ The UNIX hierarchy convention uses the traditional UNIX separator
+ character ("/") to delimit levels of the mailbox hierarchy instead of
+ the netnews character ("."). For example, if user "bovik" had a
+ personal "work" mailbox, it would appear to user "bovik" as
+ "INBOX/work" in the standard namespace.
+
+ When the UNIX hierarchy convention is used, the "." character MAY be
+ used in mailbox names, including user names. In order to maintain
+ backwards compatibility with the internal namespace, all "." characters
+ are translated to a benign character (currently "^") before any data is
+ stored to disk. For example, if user "elmer.fudd" had a personal
+ "rabbit.holes" mailbox, it would be stored as
+ "user.elmer^fud.rabbit^holes" in the internal namespace. It is
+ important to remember this phenomenon if/when reverting back to the
+ netnews hierarchy convention.
+
+Configuring the UNIX Hierarchy Convention
+
+ To use the UNIX hierarchy separator, turn on the unixhierarchysep
+ option in /etc/imapd.conf.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/anoncvs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/anoncvs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/anoncvs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/anoncvs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,53 @@
+Cyrus IMAP: Anonymous CVS Access
+
+ This file is for those who are reading Cyrus sources via anonymous CVS,
+ or those who would like to. If you're someone who would like to work
+ with the source code and get more frequent updates, keeping in mind
+ that we take some liberties with proper CVS use, you might want to get
+ Cyrus via anonymous CVS.
+
+ If you're not a programmer, please don't do this. If you're not at
+ least a little experienced with C, configure, and IMAP, please
+ stick with the tarball releases at
+ ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.
+
+ To get to the repository, get a version of CVS with client-server
+ support (anything remotely recent has this, I think) and do this:
+
+ cvs -d :pserver:anoncvs at cvs.andrew.cmu.edu:/cvs login
+ (enter "anonymous" as the password)
+ cvs -d :pserver:anoncvs at cvs.andrew.cmu.edu:/cvs co -d cyrus-imapd cyrus
+ (the first -d specifies the CVSROOT, in this case, our CVS server, and
+ a path to the CVS repository; co says "check out", -d says "and stick
+ it in the directory cyrus-imapd", and "cyrus" specifies the "cyrus"
+ collection). The password is "anonymous".
+
+ You will need autoconf (v2.12) to build CVS from the repository because
+ we don't keep the configure script in the repository, along with the
+ usual tools to build Cyrus (a compiler, a Unix box, a network.)
+
+ Read access to the repository is availible to anyone via
+ cvs.andrew.cmu.edu. Write access is availible to only a few people at
+ CMU.
+
+ Please note that the version in the repository is not the version we
+ are running. We have a seperate system that resembles version control
+ for releases of software on the Andrew system, and sometimes changes
+ don't get propigated back to CVS.
+
+ What is here is supposed to be stable. It's supposed to work, and
+ compile, and not have amazingly broken changes that can't possibly
+ work. But that may not be the case--and since you decided to use CVS,
+ you shouldn't complain when something doesn't work. You should submit a
+ patch.
+
+ There is no warranty on the Cyrus software. There is no warranty on
+ anything in CVS, and even less of a guarantee of it working. (There.
+ You've been warned.)
+
+ Please refer to Sending Feedback if you would like to submit a bug,
+ feature request or (best of all) patch.
+
+ Thanks to Ryan Troll for putting the time in to make the CVS server
+ work and actually documenting it.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/bugs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/bugs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/bugs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/bugs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,78 @@
+ Known bugs in the Cyrus IMAP Server
+
+ We're working on moving to a Bugzilla database. It's still being built
+ up, but you can search/add to it here. Eventually, all the bugs below
+ will be in there.
+
+imapd and core utilities
+
+ * Multiple APPENDs don't always correctly return the EXISTS response.
+ (can't reproduce?)
+ * Particularly large quotas can wrap around.
+ * The RENAME command is not atomic.
+ * reconstruct doesn't deal with the mailboxes.db file.
+ * we should deal with having to reset UIDs
+ * the algorithm used for naming stage files is fragile and not
+ threadsafe.
+ * during appendstage(), the message is parsed once per delivery, not
+ once at the beginning.
+ * master should pay attention to processes that have told it they are
+ listening, and make sure they don't die abnormally. likewise, it
+ should be on the lookout for continually forking services.
+ * master should probably have a babysitting service ("always keep
+ this process running").
+
+proxyd and Cyrus Murder
+
+ * RENAME across servers isn't implemented.
+ * Tagged lines with literals can cause problems for proxyd.
+
+lmtpd, deliver, and sieve
+
+ * 8-bit set characters are coerced to 'X', but not before the
+ notify_zephyr code (if used) has had a chance to send them out.
+ * Deliver does not handle messages containing NUL properly due to
+ stdio problems (the characters between the NUL and the LF will be
+ lost.)
+ * Deliver doesn't gracefully handle CR CR sequences in messages.
+ Well, ok, it hangs.
+
+authentication and authorization
+
+ * Using AFS groups with ptclient, users with negative rights as part
+ of groups may be granted access to mailboxes if ptclient has died.
+ We plan to have this fixed eventually.
+ * In some failures of the krbck program, the error messages printed
+ out bear no resemblance to what actually went wrong.
+
+other utilities
+
+ * cyradm may need to change authname/username stuff. Something to
+ check.
+ * imtest: it would be nice for the authorization name to default to
+ the authentication name, except when specifically overridden.
+ * any utilities doing db operations should catch signals and poll for
+ them to see if it should exit (like mbpath, ipurge).
+ * imtest uses getpass() to grab passwords from users. On some systems
+ (Solaris reported), this will only return the first 8 characters,
+ causing authentication failures.
+
+libraries
+
+ Things we want to do
+
+ * Implement the IMAP VIEW extension.
+ * Implement the IMAP ANNOTATE extension.
+ * Implement some sort of backup/restore system that's more efficient
+ and easier to use than Amanda on the filesystem.
+ * Add mailbox version numbers.
+ * Add mailbox tombstones (gives NEWNAME support).
+ * Design and implement ALIST, the advanced list command.
+ * Investigate changing from the prot layer to using sfio.
+ * Write a test module for lmtpengine.
+ * Allow renaming users. (RENAME user.joe user.harry.) Needs to move
+ all metadata per-user data. (seen, subscriptions, sieve state?)
+
+ Please refer to Sending Feedback if you would like to submit a bug,
+ feature request or (best of all) patch.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/changes
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/changes?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/changes (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/changes Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1466 @@
+Changes to the Cyrus IMAP Server since 2.3.6
+
+ * Fixed problems with replication and virtual domains.
+ * Fixed problems with newer cyrus.index files on 64-bit machines.
+ * Added '-p <ssf>' option to services so that PLAIN authentication
+ can be used without TLS in secure environments.
+ * Added munge8bit to control whether unencoded 8-bit characters in
+ headers are changed to 'X' or are left alone.
+ * Added sieve_allowreferrals option to control whether timsieved
+ issues referrals or proxys traffic to backends.
+ * Fixed miscellaneous bugs and build issues.
+
+Changes to the Cyrus IMAP Server since 2.3.5
+
+ * Fixed COPY code so that clients display new messages (added
+ MODSEQ).
+ * Fixed imtest to be compatible with SASL 2.1.22.
+
+Changes to the Cyrus IMAP Server since 2.3.4
+
+ * Fixed append/delivery code so that clients display new messages.
+
+Changes to the Cyrus IMAP Server since 2.3.3
+
+ * Added support for BINARY APPEND (including CATENATE). Based on
+ contributions from Tom Esh <esh at lucent.com>.
+ * Added support for CONDSTORE (must be enabled on a per-mailbox basis
+ with the /vendor/cmu/cyrus-imapd/condstore mailbox annotation.
+ * Fixed bug in reconstruct using bad name for cyrus.header.
+ * Fixed bug with replication and default partition.
+ * ctl_mboxlist now dumps/undumps the mailbox type flags, making it
+ useful for remote mailboxes.
+ * Better logging to facilitate message tracking (Wes Craig
+ <wes at umich.edu>).
+ * Implemented CAPABILITY response in banner and after authentication.
+ * Fixed miscellaneous bugs and build issues.
+
+Changes to the Cyrus IMAP Server since 2.3.2
+
+ * Fixed broken berkeley (btree) backend.
+
+Changes to the Cyrus IMAP Server since 2.3.1
+
+ * Added more extensive output to arbitron.
+ * Allow responses of any length from backend when proxing
+ IMAP/POP3/NNTP traffic.
+ * Properly handle timeouts when proxying.
+ * Added plaintextloginalert option.
+ * Fixed segfault in deliver.
+ * Only allow mbpath to be run as Cyrus user.
+ * Added nntptimeout option for nntpd.
+ * Added berkeley_hash and berkeley_hash_nosync cyrusdb backends (seem
+ to perform better under heavy loads).
+ * Added TLS support to cyradm.
+ * Fixed miscellaneous bugs and build issues.
+
+Changes to the Cyrus IMAP Server since 2.3.0
+
+ * Updated ACL code to RFC 4314 (separate rights for message delete,
+ mailbox delete, and expunge).
+ * Fixed IDLE to use idled for local mailboxes.
+ * Fixed miscellaneous build issues.
+
+Changes to the Cyrus IMAP Server since 2.2.x
+
+ * Added support for "unified" and "replicated" Murders. A Murder no
+ longer has to have discrete frontend and backend servers; any one
+ "unified" server can both proxy and serve local mailboxes (proxy
+ functionality in proxyd and lmtpproxyd has been merged with imapd
+ and lmtpd respectively), or all "replicated" servers can serve the
+ same mailboxes from a shared filesystem. The new mupdate_config
+ option in imapd.conf is used to determine whether a Murder is using
+ a "traditional", "unified" or "replicated" configuration.
+ * Ported/rewrote/integrated David Carter's mailspool replication
+ code. Development sponsored by Columbia University.
+ * Added support for "delayed" expunge, in which messages are removed
+ from the mailbox index at the time of the EXPUNGE (hiding them from
+ the client), but the message files and cache entries are left
+ behind, to be purged at a later time by cyr_expire. This reduces
+ the amount of I/O that takes place at the time of EXPUNGE and
+ should result in greater responsiveness for the client, especially
+ when expunging a large number of messages. The new expunge_mode
+ option in imapd.conf controls whether expunges are "immediate" or
+ "delayed". Development sponsored by FastMail.
+ * Added support to place some/all mailbox metadata files (cyrus.*
+ files) on a separate (probably high-speed) partition. See the new
+ metapartition and metapartition_files options for details.
+ Development sponsored by FastMail.
+ * Added support for accessing subfolders of INBOX via POP3. See the
+ new popsubfolders option for details. Development sponsored by
+ FastMail.
+ * Added support to lmtpd to do "fuzzy" mailbox matching on
+ user+detail addresses. See the new lmtp_fuzzy_mailbox_match option
+ for details. Development sponsored by FastMail.
+ * Added new sieve_extensions option to allow individual Sieve
+ extensions to be enabled/disabled.
+ * The Sieve "include" extension is now supported. This also allows
+ for global sieve scripts. See the new sieve_extensions options to
+ enable it.
+ * The Sieve "body" extension is now supported. See the new
+ sieve_extensions option to enable it. Development sponsored by
+ FastMail.
+ * The $text$ variable for Sieve notify messages is now supported.
+ Development sponsored by FastMail.
+ * The MIME structure of a new message destined for multiple
+ recipients is now only parsed once rather than once per delivery,
+ resulting in better performance. Development sponsored by FastMail.
+ * Support 64-bit quota usage (both per mailbox and for the entire
+ quotaroot), based on a patch from Jeremy Rumpf. Development
+ sponsored by FastMail.
+ * Added new flushseenstate option which causes imapd to immediately
+ flush changes in \Seen state to disk rather than caching them until
+ the mailbox is closed. Enabling this option may fix \Seen state
+ weirdness with MS Outlook, at the expense of
+ performance/scalability. Based on a patch by John A. Tamplin
+ (jtampli at sph.emory.edu).
+ * The Sieve "copy" extension is now supported.
+ * The IMAP "CATENATE" and "URLAUTH" extensions are now supported.
+ * Updated Sieve "vacation" extension to draft-ietf-sieve-vacation-04.
+ * Added support for Sieve scripts on shared mailboxes via the
+ /vendor/cmu/cyrus-imapd/sieve annotation.
+
+Changes to the Cyrus IMAP Server since 2.2.11
+
+ * Revert index change which wasn't supposed to make it into 2.2.11
+
+Changes to the Cyrus IMAP Server since 2.2.10
+
+ * Fix possible single byte overflow in mailbox handling code.
+ * Fix possible single byte overflows in the imapd annotate extension.
+ * Fix stack buffer overflows in fetchnews (exploitable by peer news
+ server), backend (exploitable by admin), and in imapd (exploitable
+ by users though only on platforms where a filename may be larger
+ than a mailbox name).
+
+Changes to the Cyrus IMAP Server since 2.2.9
+
+ * Fix 0 termination in mysasl_canon_user.
+ * Check for imap magic plus buffer overflow in proxyd also
+ (CAN-2004-1015).
+ * Only send an over quota ALERT on SELECT if the quotaroot is
+ different from the last ALERT, or we haven't sent an ALERT in over
+ 10 min.
+
+Changes to the Cyrus IMAP Server since 2.2.8
+
+ * Change ACLs correctly when renaming a user
+ * Do not abandon std{in,out,err} file descriptors; syslog assumes it
+ can use stderr if syslogd isn't running.
+ * Clean up imap magic plus to avoid buffer overrun (CAN-2004-1011)
+ * Fix lack of bounds checking in PARTIAL and FETCH (CAN-2004-1012,
+ CAN-2004-1013)
+ * Do not attempt to reuse a freed connection in lmtpproxyd.
+ * Allow login without authentication with -N switch in proxyd.
+ * Fix use of xrealloc and fold pointers in lmtpengine.
+
+Changes to the Cyrus IMAP Server since 2.2.7
+
+ * Fix a double-free bug in the notify code
+ * Fix a problem with idled and an empty mailbox list
+
+Changes to the Cyrus IMAP Server since 2.2.6
+
+ * Fix handling of PARTIAL command and partial body fetches
+ * A large number of portability fixes supplied by Albert Chin
+ <china at thewrittenword.com>
+ * Added client_timeout option to control connect() timeouts for proxy
+ code
+ * Added popuseacl option
+ * Fix a number of issues with the quota -f tool
+ * Fix thread safety issue in saslserver()
+ * Fix possible stage file leak in append code
+ * Fix bugs in handling of MULTIAPPEND introduced in 2.2.3
+ * Fixed regression bug in Sieve vacation
+
+Changes to the Cyrus IMAP Server since 2.2.5
+
+ * Fix a bug in the proxy code where a backend connection might get
+ closed twice
+ * Improved consistancy checking in chk_cyrus
+ * Fix segfault in APPEND code
+ * Fix a bug with an interaction between sieve and unixhierarchysep
+ * Fix a file descriptor leak in the quotadb code
+ * Fix a triggered assertation in service-thread services
+ * Add a number of internal consistancy checks to the skiplist code
+ * Allow mbpath to handle virtual domains
+ * Fix various MANAGESIEVE client authentication issues
+ * Other minor fixes
+
+Changes to the Cyrus IMAP Server since 2.2.4
+
+ * Bug fixed in hash table code that could sometimes cause crashes
+ with the quotalegacy database
+ * Net-SNMP compatibility
+ * Significantly improved com_err detection
+ * Assorted minor NNTP improvements
+ * Assorted other minor bugfixes
+
+Changes to the Cyrus IMAP Server since 2.2.3
+
+ * Quota now uses the cyrusdb interface (quotalegacy by default).
+ * All incoming messages are now staged to disk before locking the
+ destination mailbox (locks are no longer held during a network
+ read).
+ * Fixed off-by-one error in fetchnews (articles are no longer
+ skipped).
+ * nntpd now uses the Followup-To: header (if exists) instead of the
+ Newsgroups: header when constructing post address(es) and adds them
+ to the Reply-To: header instead of the To: header.
+ * Added berkeley_locks_max, berkeley_txns_max and berkeley_cachesize
+ options.
+ * Added imapmagicplus option.
+ * Substantial work on afspts/ptloader canonicalization code
+ * Much improved LDAP ptloader code (no more internal OpenLDAP
+ dependencies)
+ * Fixed a number of IPv6 related bugs
+
+Changes to the Cyrus IMAP Server since 2.2.2
+
+ * Berkeley DB 4.2 Support - note that the Cyrus Berkeley enviroment
+ needs to be reset (db_recover) before a Berkeley DB version upgrade
+ or you need to remove all berkeley dbs. Special care needs to be
+ taken when berkley db is used for mboxlist.
+ * Runtime configuration of the Cyrus databases. The cyrudb backend
+ used for each database can be specified with an imapd.conf option.
+ NOTE: You MUST convert the database using cvt_cyrusdb BEFORE
+ changing the backend in imapd.conf.
+ * Sendmail socket map support (smmapd) for verifying that mailboxes
+ exist and are deliverable before accepting the message and sending
+ it to Cyrus.
+ * New userid mode for virtual domains, which does NOT do reverse
+ lookups of the IP address.
+ * nntpd now supports the Xref header.
+ * nntpd can now use the POST command to feed articles to upstream
+ servers.
+ * fetchnews can now be used with NNTP servers which don't support the
+ NEWNEWS command.
+ * lmtpd now initializes duplicate.db only when it is necessary (when
+ using Sieve or duplicatesuppression).
+ * Sieve now verifies that text strings are valid UTF-8.
+ * Sieve now verifies that address tests and envelope tests are done
+ on headers which contain addresses (can be disabled with
+ rfc3028_strict: no).
+ * Services will now notice that a new binary has been installed and
+ will restart using the new binary once the existing connection is
+ closed.
+
+Changes to the Cyrus IMAP Server since 2.2.1
+
+ * Major bugfixes in murder altnamespace/unixhierarchysep/virtdomain
+ support (Thanks in large part to work by Christian Schulte
+ <cs at schulte.it>)
+ * Improved master process accounting (Henrique de Moraes Holschuh
+ <hmh at debian.org>)
+ * Significantly improved message header caching (based in large part
+ on code supplied by David Carter <David.Carter at ucs.cam.ac.uk> from
+ the University of Cambridge)
+ * The sieve bytecode format has been updated once more, to correctly
+ handle short-circuiting of the allof and anyof operators
+ * Support for warning quota based on absolute mailbox size
+ * Correct handling of annotations during XFER operations
+ * Simple support for IMAP BINARY extension
+ * Support for Automake 1.7 and Autoconf 2.57
+ * Support for IMAP initial SASL response (the SASL-IR extension)
+
+Changes to the Cyrus IMAP Server since 2.2.0
+
+ * The improved directory hashing (fulldirhash) is now a runtime
+ configuration option.
+ * The netnews.db has been integrated into deliver.db.
+ * Full r/w ANNOTATEMORE support, including more annotations that
+ allow the control of operations such as message expiration.
+ ANNOTATEMORE is also always enabled now.
+ * expirenews has been replaced by cyr_expire which uses annotations
+ for fine-grained mailbox expiration.
+ * squatter can now use annotations for fine-grained mailbox indexing.
+ * Many nntpd enhancements including: reader-only and feeder-only
+ modes, support for LIST NEWSGROUPS (via mailbox annotations) and
+ gatewaying news to mail (via mailbox annotations).
+ * fetchnews can now authenticate to the remote server.
+ * Removed deprecated LAST command from pop3d.
+ * Sieve Bytecode is now stored in network byte order, meaning that
+ bytecode files can be freely moved between different platforms
+ * Sieve relational extension now working again.
+ * Sieve vacation now uses the correct subject.
+ * A large number of bugs involving virtual domain support have been
+ fixed, including issues with the Murder, and with Sieve.
+
+Changes to the Cyrus IMAP Server since 2.1.x
+
+ * There have been extensive performance and consistancy changes to
+ the configuration subsystem. This will both ensure greater
+ consistancy between the documentation and the code, as well as a
+ more standard format for specifing service-specific configuration
+ options in imapd.conf. Important changes are detailed here:
+
+ * The tls_[service]_* configuration options have been removed.
+ Now use [servicename]_tls_*, where servicename is the service
+ identifier from cyrus.conf for that particular process.
+ * Administrative groups (e.g. admins and lmtp_admins) no longer
+ union, service groups completely override the generic group.
+ * lmtp_allowplaintext is no longer a defined parameter and must
+ be specified using the service name of your lmtp process if you
+ require a specific value
+
+ * libcyrus has been split into libcyrus_min and libcyrus, so as to
+ allow sensative applications (such as master) include the least
+ amount of code necessary for operation
+ * Virtual domain support. See the virtual domains document for
+ details.
+ * Users can now be renamed (even across domains). Note that this is
+ not atomic and weirdness may occur if the user is logged in during
+ the rename. See the allowusermoves option in imapd.conf(5) for
+ details.
+ * The db3 and db3-nosync database backends have been renamed to
+ berkeley and berkeley-nosync respectively (to avoid confusion over
+ whether or not db4 is supported).
+ * The default mailbox list and seen state database formats have
+ changed to skiplist from Berkeley and Flat, respectively.
+ * ptloader is now a regular cyrus service. This has several
+ implications, see install-upgrade.html for more details.
+ * NNTP support. Usenet news can now be fed to and read from Cyrus
+ directly via NNTP, without the need for a local news server. See
+ netnews document for details.
+ * IPv6 support, provided by Hajimu UMEMOTO <ume at mahoroba.org>
+ * Sieve scripts are now compiled to bytecode to allow for faster
+ execution (and lmtpd no longer needs lex or yacc). See
+ install-upgrade.html for more details.
+ * The functionality of pop3proxyd has been merged into pop3d. Be sure
+ to update cyrus.conf on your frontend machines accordingly.
+ * The functionality of ctl_deliver -E has been moved to cyr_expire
+ -E. Be sure to update cyrus.conf on your machines accordingly.
+
+Changes to the Cyrus IMAP Server since 2.1.14
+
+ * Correct a potential DOS attack in the fud daemon.
+ * Arbitron now works again
+ * Telemetry logging for mupdate
+ * Duplicate Suppression logging for redirect sieve actions
+ * A number of bugs in reconstruct have been fixed. also added the -p
+ and -x options
+ * Better stubbing out of user_deleteacl
+ * No longer log any shutdown() failures
+ * Improved IPv6 support (for systems with two getnameinfo
+ implementations)
+ * Misc Documentation Improvements
+
+Changes to the Cyrus IMAP Server since 2.1.13
+
+ * Be more forgiving in the parsing of MIME boundary headers,
+ specifically those generated by Eudora where the outer boundaries
+ are substrings of the inner boundaries. This feature can be
+ disabled by enabling the rfc2046_strict option.
+ * Allow cyradm to handle aggregate mailbox sets for ACL and DELETE
+ operations.
+ * Add a lmtp_downcase_rcpt option to force the lowercasing of
+ recipient addresses (Henrique de Moraes Holschuh <hmh at debian.org>).
+ * Include more MIME headers in sieve rejection notices
+ * Add an mbexamine command for debugging purposes
+ * LMTP will now fatal error if we cannot initialize the duplicate
+ delivery database.
+ * Continued audit by Security Appraisers and Bynari
+ * Correctly terminate the processes by calling service_abort even on
+ successful exit (helps to fix a db3 lockers problem)
+ * Fix some murder+altnamespace/unixhiersep issues
+ * Fix imclient's handling of literals.
+ * Add support for the windows-1256 character set
+ * Don't log 'could not shut down filedescriptor' messages when the
+ socket is already not connected
+ * Now include a script to convert sieve script names to the
+ altnamespace format
+ * Added a --with-extraident configure option to make it easier to set
+ the extra version information that is compiled into the binary.
+ * Minor build fixes.
+ * Minor other bug fixes.
+
+Changes to the Cyrus IMAP Server since 2.1.12
+
+ * Add maxfds= option in cyrus.conf
+ * "The shutdown() Patch" by Henrique de Moraes Holschuh
+ <hmh at debian.org> and Jeremy Howard <jhoward at fastmail.fm>
+ * Now report both built-with and running-with OpenSSL versions
+ * Misc other small bugfixes
+ * Security Appraisers and Bynari review of the majority of the
+ modules in imap/
+
+Changes to the Cyrus IMAP Server since 2.1.11
+
+ * Master now will forcibly exit if a service is not executable
+ * Master now has a daemon mode and pidfile support (-d and -p
+ options)
+ * Berkeley DB Configuration methods have changed. Hopefully they're
+ more generic now. You can still use --with-dbdir, or you can use
+ --with-bdb-libdir and --with-bdb-incdir
+ * timsieved now handles usernames with dots (when unixhierarchysep is
+ active)
+ * tugowar has been removed from the distribution.
+ * Squatter now has an option to skip unmodified mailboxes.
+ * Properly hash username to remove a user's sieve scripts when their
+ INBOX is removed.
+ * Reset output buffer when prot_flush returns EOF.
+ * Minor Makefile improvements with use of $(srcdir)
+ * Remotepurge improvement for empty mailboxes
+ * Fix for AFS overwriting the canonicalized username in ptloader
+ * Security audit of imapd.c performed by SecurityAppraisers and
+ Bynari
+
+Changes to the Cyrus IMAP Server since 2.1.10
+
+ * Fixed some potential buffer overflows in the sieve code, as well as
+ a pre-login buffer overflow in the IMAP parsing code.
+ * ipurge can now skip flagged messages
+ * Fix a problem with the flat backend and tracking new files
+ * Fix a problem with the memory pool routines on 64-bit machines
+
+Changes to the Cyrus IMAP Server since 2.1.9
+
+ * support Berkley DB 4.1
+ * more portable use of errno throughout
+ * timsieved now does telemetry logging
+ * libcyrus.a no longer supplies fs_get() and fs_give()
+
+Changes to the Cyrus IMAP Server since 2.1.8
+
+ * Fix a strlcpy() off-by-one error.
+ * Better handling of errors in connecting to LMTP servers for deliver
+ and lmtpproxyd.
+ * Fix bug in pop3proxyd's pop3s handling.
+ * Fix Exim install documentation.
+
+Changes to the Cyrus IMAP Server since 2.1.7
+
+ * Fix a severe locking problem during failed CREATEs
+ * Change default locking method to fcntl from flock
+ * Don't cleanup the original mailbox during a RENAME while holding
+ the mailbox list lock
+ * Quoting fixes in cyradm
+ * Small pathname fix in rehash script
+
+Changes to the Cyrus IMAP Server since 2.1.6
+
+ * Correct some minor version number errors.
+
+Changes to the Cyrus IMAP Server since 2.1.5
+
+ * Better locking of the mailbox list during mupdate operations for
+ CREATE and RENAME
+ * Permissions fixes for annotations.
+ * pop3proxyd now does telemetry logging
+ * Cleanup a number of leaks in the murder code
+ * Correct semantics of our provided strlcpy(). Fix places where
+ strlcpy() was being used incorrectly.
+ * Correct a significant memory leak in the memory pool routines
+ * OpenSSL is now handled correctly for the perl modules
+ * Small documentation cleanups
+ * The normal assortment of small bugfixes
+
+Changes to the Cyrus IMAP Server since 2.1.4
+
+ * Sieve is no longer dependent on duplicate delivery suppression (it
+ still uses the duplicate delivery database however).
+ * Sieve now supports draft-segmuller-sieve-relation-02.txt
+ * imtest now includes all the functionality previously kept in
+ pop3test, lmtptest, smtptest, and mupdatetest. imtest will notice
+ if it is invoked with one of these names and do the right thing.
+ The -P flag can be used to force a particular protocol. As part of
+ this, the default install location for mupdatetest has changed to
+ be the same as the other test utilities. imtest also includes new
+ MANAGESIEVE functionality (sivtest) as well as the ability to
+ reconnect to the same server multiple times (useful for testing
+ SSL/TLS session caching and DIGEST-MD5 fast reauth).
+ * snmpgen generates stubbed out code so we don't waste resources on
+ something that just doesn't work. At some point in time, we'll make
+ it work again as it would be useful to gather aggregate statistics
+ on what commands are being used so we can better tune the server.
+ This change closes bug #1191. New bug 1267 opened to re-enable the
+ feature.
+ * Added the chk_cyrus program to help point out missing message files
+ and/or mailboxes
+ * ANNOTATEMORE improvements. Server annotation support has been
+ added. We are also now using the /vendor/cmu/cyrus-imapd hierarchy.
+ The "info" command in cyradm now returns annotations for the given
+ mailbox (provided that ANNOTATEMORE support is compiled into the
+ server)
+ * The RENAME command has been almost entirely rewritten. Now we rely
+ on mailbox-level locking instead of locking the entire mailboxes
+ file for the duration of the rename. ctl_cyrusdb -r now also cleans
+ up "reserved" mailboxes that may appear in the event of a crash.
+ * ctl_mboxlist can now dump only a particular partition
+ * The configuration subsystem now uses a hash table to speed up
+ lookups of options. Additionally, the hash table implementation has
+ been updated to possibly take advantage of memory pools.
+ * Many bugfixes related to the Cyrus Murder. Includes improvments to
+ subscription handling as well as correct merging of seen state on
+ mailbox moves.
+ * Can now configure an external debugger (debug_command option in
+ imapd.conf.
+ * Misc. autoconf-related fixes (most notably those related to
+ sasl_checkapop and O_DSYNC).
+ * Misc. locking-related fixes.
+ * Security fixes related to handling large literals in getxstring(),
+ as well as correct usage of layers in timsieved.
+
+Changes to the Cyrus IMAP Server since 2.1.3
+
+ * All "MAIL" and "SIEVE" notifications are now handled by notifyd
+ which is a daemon that supports multiple notification methods. The
+ mailnotifier and sievenotifier options have been added to
+ /etc/imapd.conf to configure notifications. (Ken Murchison)
+ * Many feature enhancements and bugfixes for the Cyrus Murder. The
+ code now supports live (but not transparent) moving of mailboxes
+ from one server to another.
+ * Some warning fixes.
+ * fdatasync() is no longer required.
+ * Fixed a bug in imap/append.c that would show itself if a message
+ was being delivered to five or more different partitions.
+ * Deliveries now don't create a redudant temporary file using
+ tmpfile(); the staging directory is used instead. (Ken Murchison)
+ * Fix a possible crashing bug in squatter. (Ken Murchison)
+ * Deleting a user now also removes their Sieve scripts.
+ * cyrusdb_skiplist: release locks during iteration. Should prevent
+ denial of service attacks and possibly increase performance.
+ * cyrusdb_skiplist: introduce a new mode using O_DSYNC writes which
+ is possibly faster on Solaris. Currently off (it seems to hurt
+ performance on Linux).
+ * master has preliminary code to avoid forking storms.
+ * sieveshell should now loop through all available SASL mechanisms
+ before conceding defeat.
+ * sieveshell can now upload a file to a different name.
+
+Changes to the Cyrus IMAP Server since 2.1.2
+
+ * fud now runs from the Cyrus master process; more generally, the
+ Cyrus master process can deal with UDP services. (Amos Gouaux,
+ amos at utdallas.edu)
+ * Sieve has been updated to be compliant with RFC 3028 and
+ draft-martin-sieve-notify-01. All notify actions and any fileinto
+ and/or redirect actions using stringlists will have to be
+ updated/changed.
+ * added cvt_cyrusdb for quick conversions between different cyrusdb
+ backends.
+ * fixed a bug in the Sieve header cache, where legal header names
+ were being rejected.
+ * many Murder-related fixes
+ * suppress a bogus TLS session reuse DBERROR message
+ * make the list of acceptable TLS ciphers configurable in
+ /etc/imapd.conf
+ * cyrusdb_skiplist fixes; it's now suitable for using in production
+ environments though there are still performance problems
+ outstanding
+
+Changes to the Cyrus IMAP Server since 2.1.1
+
+ * now compatible with Berkeley DB4 (Larry M. Rosenbaum, lmr at ornl.gov)
+ * timsieved now supports proxying via loginuseacl (Amos Gouaux,
+ amos at utdallas.edu)
+ * Sieve vacation now does a case-insensitive comparison of :addresses
+ * Warning-related bug fixes from Henrique de Moras Holschuh
+ hmh at debian.org
+ * automatic archival of db3 files so that filesystem backups are
+ always consistent (Ken Murchison, ken at oceana.com)
+ * added a skiplist database backend, still needs more testing
+ * further work on the Cyrus Murder
+ * fixed bug in remotepurge dealing with mailboxes with characters
+ that need to be escaped inside quoted-strings
+ * Cyrus::IMAP::Admin now supports referrals
+ * cyradm, via Cyrus::IMAP::Shell, now can remove quotaroots
+ * timsieved, sieveshell, and the MANAGESIEVE protocol extended with
+ referrals
+
+Changes to the Cyrus IMAP Server since 2.1.0
+
+ * now compatible with Cyrus SASL 2.1.0
+ * fixed a problem with LMTP AUTH and unix domain sockets
+ * make deleting users faster
+ * add a "-n" switch to remotepurge
+ * cyradm now does implicit SASL authorization
+ * fix for Sieve :matches comparator
+
+Changes to the Cyrus IMAP Server since 2.0.16
+
+ * migrated to SASLv2 (Rob Siemborski)
+ * altnamespace: it is now possible to display user mailboxes as
+ siblings to the INBOX at the top-level (Ken Murchison)
+ * unixhierarchysep: it is now possible possible to use slash as the
+ hierarchy seperator, instead of a period. (Ken Murchison, inspired
+ by David Fuchs, dfuchs at uniserve.com)
+ * SSL/TLS session caching (Ken Murchison)
+ * support for IMAP CHILDREN & LISTEXT extensions (Ken Murchison, work
+ in progress)
+ * check recipient quota & ACL at time of RCPT TO: in lmtpd (Ken
+ Murchison)
+ * support for LMTP STARTTLS & SIZE extensions (Ken Murchison)
+ * unified deliver.db, using cyrusdb interface, hopefully improving
+ concurrency and performance (Ken Murchison)
+ * fixed STORE FLAGS () bug (Ken Murchison)
+ * fixed SEARCH SUBJECT vs. SEARCH HEADER SUBJECT bug (Ken Murchison)
+ * users without an INBOX can have subscriptions (Ken Murchison;
+ noticing a trend here?)
+ * added cyrusdb_db3_nosync backend, used for duplicatedb and session
+ cache, to postpone non-critical writes. (Ken Murchison)
+ * support for STARTTLS and AUTH=ANONYMOUS for timsieved (Ken
+ Murchison)
+ * do setgid and initgroups in master (as urged by several people)
+ * added more config info to IMAP ID (in a vain attempt to improve
+ debugging)
+ * configure now checks for DB3.3
+ * SQUAT (Rob O'Callahan, roc at cs.cmu.edu)
+ * change SEARCH HEADER x to SEARCH x utilizing internal cache where
+ possible (Rob O'Callahan, roc at cs.cmu.edu)
+ * an improved directory hashing option (Gary Mills,
+ mills at cc.UManitoba.CA)
+ * use of EGD for SSL/TLS (Amos Gouaux, amos at utdallas.edu)
+ * separate certs/keys for services (Henning P. Schmiedehausen,
+ hps at intermeta.de)
+ * ability to force ipurge to traverse personal folders (Carsten
+ Hoeger, choeger at suse.de)
+ * fixed zero quota bugs in cyradm (Leena Heino, liinu at uta.fi)
+ * ignore trailing whitespace in imapd.conf
+ * Received: header (with TLS and AUTH info)
+ * added '-i' switch to sendmail command line for SIEVE reject,
+ redirect and vacation
+ * small fixes to notify_unix
+ * added "duplicatesuppression" switch to imapd.conf for
+ enabling/disabling duplicate delivery suppression (Birger
+ Toedtmann, birger at takatukaland.de)
+
+Changes to the Cyrus IMAP Server since 2.0.15
+
+ * fixed a longstanding bug in quota that would affect people with
+ unusual top-level hierarchy, fix by John Darrow,
+ John.P.Darrow at wheaton.edu.
+ * some important fixes to db3 interface code, by Walter Wong
+ wcw at cmu.edu, prompted by complaints from Scott Adkins
+ adkinss at ohio.edu.
+ * fixed some memory leaks in imclient and in the Perl IMAP module,
+ prompted by Toni Andjelkovic toni at soth.at.
+ * fixed a longstanding authentication error in the Perl IMAP module,
+ should remove pesky extra Password: prompt.
+ * fixed some allocation bugs in the managesieve perl module.
+
+Changes to the Cyrus IMAP Server since 2.0.14
+
+ * fixed memory management bugs in imapd, lmtpd that were being hit
+ due to the connection reuse code and causing subtle and annoying
+ problems.
+ * we now clean up better when deleting a user
+ * fixed an endian bug in ipurge
+ * pop3d now can also reuse processes.
+ * fix a bug in imclient that would strike when cyradm specifies a
+ mechanism on the command-line. (SASL mechanism names aren't case
+ sensitive.)
+ * fix some bugs in handling SIGHUP in master
+ * fix a couple of goofs in Admin.pm
+
+Changes to the Cyrus IMAP Server since 2.0.13
+
+ * fixed a silly bug with reusing SSL connections
+ * lmtpd can now service multiple clients in sequence, hopefully
+ improving performance
+ * changed how Berkeley db databases are opened, hopefully lessening
+ the chance of deadlock and improving performance
+ * fixed a couple of memory leaks
+ * lessened the chance of a race condition during index_check()
+
+Changes to the Cyrus IMAP Server since 2.0.12
+
+ * refactored code so less duplication
+ * added alternate config file for partial virtual domain support
+ * pop3d can now disable USER/PASS commands.
+ * STARTTLS now accepts a SSLv23 hello but doesn't allow SSLv23 to be
+ negotiated.
+ * imtest no longer buffers to aid use as an automated layer.
+ * master now supports maximum number of service processes via the
+ "maxchild" modifier.
+ * fixed a bug in the Sieve string lexer.
+ * one imapd process can now service multiple clients in sequence,
+ eliminating a large number of forks.
+
+Changes to the Cyrus IMAP Server since 2.0.11
+
+ * portability fixes involving setrlimit()
+ * fixed compiler warnings
+ * the STARTTLS command will only accept TLSv1 now, not SSLv2/v3. The
+ imaps port is unaffected by this change.
+ * timsieved no longer returns garbage strings.
+
+Changes to the Cyrus IMAP Server since 2.0.9
+
+ * some small memory savings
+ * the "fud" daemon once again works correctly
+ * the IDLE extension now uses signals correctly
+ * problems with libwrap have been resolved
+ * imapd and pop3d now log connections protected via TLS.
+ * efficiency improvements when searching for a particular message-id
+ * fixed an envelope-parsing bug affecting SORT and THREAD
+ * made RENAME keep the same mailbox uniqueid, preserving seen state
+ across renames
+ * STOREing flags to multiple messages in one command is now more
+ efficient
+ * RENAME now preserves the ACL
+ * LIST is now as efficient as Cyrus v1.6, modulo Berkeley DB issues.
+ * Sieve zephyr notifications are now correct.
+ * crash in reconstruct now fixed.
+ * man pages added for cyrus.conf, master, lmtpd, idled, ctl_mboxlist,
+ and ctl_deliver.
+ * master can now listen on specific interfaces
+ * master can now reread /etc/cyrus.conf on SIGHUP.
+ * timsieved now uses symlinks instead of hard links.
+
+Changes to the Cyrus IMAP Server since 2.0.8
+
+ * remembered to update this file
+ * bug in Cyrus::IMAP perl module affecting cyradm's setquota fixed
+ * portability fix with socklen_t
+
+Changes to the Cyrus IMAP Server since 2.0.7
+
+ * preliminary implementation of the IDLE extension (Ken Murchison,
+ ken at oceana.com).
+ * THREAD=REFERENCES now part of the normal build.
+ * tweaks to the installation documentation and suggested Sendmail
+ configuration
+ * portability fixes and other small bugfixes
+ * added "-a" flag to lmtpd
+ * master process can now export statistics about running processes
+ via UCD SNMP AgentX
+ * many fixes to Cyrus Murder-related code
+ * fixes to perl code, especially the Sieve interface. added an IMSP
+ interface to the perl code, but it still needs work.
+
+Changes to the Cyrus IMAP Server since 2.0.6
+
+ * some number of random static variables eliminated, to save on
+ memory footprint
+ * recursive RENAME was a little to eager; fixed. RENAME will also
+ give the client a hint that a sub-RENAME failed. (mostly probably
+ useful for cyradm, but cyradm doesn't take advantage of it yet.)
+ * THREAD=X-JWZ has turned into THREAD=REFERENCES (Ken Murchison)
+ * DELETE wasn't failing cleanly in database code; fixed.
+ * off-by-one bug in seen_db fixed.
+ * starting/committing/aborting transactions now logged more correctly
+ in cyrsudb_db3
+ * master will now accept port numbers instead of just service names
+ in cyrus.conf. also logs even more verbosely (see bug #115.)
+ * libwrap_init() is now inside the loop, since i don't quite
+ understand the semantics of libwrap calls.
+ * setquota in cyradm now behaves more sanely (and gives correct usage
+ message).
+ * bugfixes to the managesieve client perl api. (still needs work.)
+ * small fixes in timsieved.
+ * added a "make dist" target so i won't dread releases as much.
+
+Changes to the Cyrus IMAP Server since 2.0.5
+
+ * APPEND now honors the \Seen flag.
+ * mailboxes file can once again be a flat text file. (compile-time
+ choice)
+ * subscriptions file can be flat text or berkeley db. likewise for
+ seen state.
+ * unfortunately, the format of the mailboxes file has changed.
+ * implementation of "JWZ" threading, a first pass on the forthcoming
+ THREAD=REFERENCES.
+ * bugfixes in libacap.
+ * bugfixes in other Murder related functionality.
+ * removal of dead code.
+ * will now look in CYRUS_PREFIX/etc/imapd.conf if there's no
+ /etc/imapd.conf.
+ * more paranoid implementation of ID.
+ * more descriptive lmtp errors.
+ * finished implementation of LMTP 8BITMIME.
+ * fixed minor bugs in pop3d.
+ * small test suite for cyrusdb backends added in lib/test/.
+ * added -DPERL_POLLUTE to the perl compilation to deal with Perl 5.6.
+ * small additions to the Sieve library.
+ * As usual, owe lots of thanks to Ken Murchison for his hard work and
+ awesome implementations.
+
+Changes to the Cyrus IMAP Server SINCE 2.0.4
+
+ * Now should work with Berkeley DB 3.1, but does not auto-upgrade 3.0
+ databases (and, in fact, I haven't written any upgrade software
+ yet).
+ * SORT and THREAD should now function correctly.
+ * Some configure fixes.
+ * Some fixes for possible race conditions in initializing services
+ and database structures.
+ * Some non-gcc compile fixes with structure initialization.
+ * Some non gcc compile fixes with structure initialization.
+
+Changes to the Cyrus IMAP Server SINCE 2.0.3
+
+ * fixed mbpath and ipurge. Thanks to Alain Turbide for the bug
+ report.
+ * configure: removed mmap_private.c; it was buggy, and not worth
+ supporting.
+ * configure: improvements in detecting libwrap, typos fixed in
+ detecting libsasl.
+ * Merged the acapsieve library into libacap.
+ * improvements to the ACAP API.
+ * invariant checks added to the skiplist code.
+ * bugfix in TCL cyradm.
+ * acapmbox.c: bugfixes in handling acap connections.
+ * fix the size given for a unix socket address (changes throughout
+ the code), patch thanks to Vladimir Kravchenko, jimson at null.ru.
+ * rewrote deliver to use the generic LMTP API in lmtpengine.c.
+ Likewise, implemented the client-side API in lmtpengine.c. (Still
+ need to implement AUTH.)
+ * added SORT and THREAD support (Ken Murchison, ken at oceana.com.)
+ * In checking an APPEND command, we were rejecting valid system flags
+ and accepting invalid ones.
+ * minor bug fixes to proxyd.
+ * large amount of debugging code added to target-acap.
+ * build fixes to Perl programs.
+ * allow plaintext authentication to timsieved.
+
+Changes to the Cyrus IMAP Server in 2.0
+
+ * The mailboxes file is now a transaction-protected Berkeley
+ database.
+ * The core delivery process has been moved to lmtpd. deliver is now a
+ simple wrapper to create an LMTP transaction.
+ * master process, responsible for spawning services (imapd, lmtpd,
+ etc.) and for routine housekeeping. Optionally, it can use libwrap
+ to allow or deny connections.
+ * ACAP (Application Configuration Access Protocol) support for Cyrus
+ Murder: IMAP Aggregator.
+ * Sieve enhancements: regular expressions, notifications,
+ automatically setting IMAP flags.
+ * SNMP (Simple Network Management Protocol) support for monitoring
+ usage (e.g. number of users logged in) as well as for instrumenting
+ protocol usage (e.g. number of times CREATE has been called).
+ * Perl version of cyradm contributed by Brandon Allbery
+ (allbery at ece.cmu.edu). Eventually we expect to transition to the
+ Perl version away from the TCL version.
+ * Bugfix in modified UTF-7 processing (for mailbox names). Bugfix in
+ index_searchcacheheader().
+ * Implemented the extension MULTIAPPEND.
+ * RENAME is now hierarchical.
+ * The right that controls whether a mailbox may be deleted is now
+ "c". (It used to be "d".)
+ * An additional backend for seen state has been created, seen_db. It
+ stores seen state in a per-user database.
+
+Changes to the Cyrus IMAP Server Since Version 1.6.20
+
+ * Some fixes to the TLS support to gracefully degrade service.
+ * Sieve now correctly re-sieves messages that are received with
+ identical message-ids, but different envelopes. It also obeys
+ plus-addressing on keep actions. (Fixes by Ken Murchison,
+ ken at oceana.com.)
+ * The server wasn't correctly calculating the percentage of quota
+ used when deciding whether or not to issue a warning.
+ * Implemented single-instance store: deliver, when using LMTP, will
+ only store one copy of a message per partition, and hard link it
+ among multiple users. Sites with a large number of partitions could
+ see a performance decrease.
+
+Changes to the Cyrus IMAP Server Since Version 1.6.19
+
+ * Added STARTTLS support; requires OpenSSL.
+ * Sieve now uses MDNs to reject messages instead of DSNs, conforming
+ to the latest Sieve specification. (Ken Murchison)
+ * The duplicate delivery database expiration (deliver -E) was
+ deleting all entries; fixed.
+ * imtest is now a little smarter about parsing the protocol to avoid
+ synchronization errors prior to authentication.
+ * timsieved's parser is now written in C; should be no noticeable
+ changes, but should make compiling it much easier.
+
+Changes to the Cyrus IMAP Server Since Version 1.6.16
+
+ * Fix to enclosed message parsing (thanks to John Myers).
+ * When trying to skip over non-synchronizing literals during error
+ recovery, the IMAP server never stopped eating. Fixed.
+ * Added with-sasldir as a configure option.
+ * Fixed a bug in cyradm when it got the CAPABILITY list.
+ * Fixed bugs relating to the incomplete SASLfication of deliver.
+ * Fixed bugs in deliver relating to duplicate delivery suppression
+ and Sieve vacation functionality.
+ * Fixed a memory leak in deliver.
+ * When looking for SASL options, imapd wasn't defaulting to the
+ option without the plugin name requesting it. This caused PLAIN
+ authentications to incorrectly fail.
+ * Changed the expiration time of pts entries to 3 hours; only affects
+ sites using krb_pts as the authorization method.
+ * Fixed some bugs in imclient; mostly affects cyradm.
+ * Fixed a bug in the Sieve lexer and improved the usefulness of the
+ Sieve test program.
+
+Changes to the Cyrus IMAP Server Since Version 1.6.13
+
+ * An annoying memory management bug in imclient was fixed and it's
+ efficiency was improved somewhat.
+ * Added the sieve client (installsieve) and server (timsieved) for
+ getting sieve scripts onto the server and managing them once they
+ are there.
+ * The default Sieve script layout has changed to
+ sievedir/u/user/default; this supports multiple Sieve scripts per
+ user with the ability to switch between them.
+ * Fixed the kerberos-to-local-host bug (patch by Greg Hudson,
+ ghudson at mit.edu).
+ * Started changes to deliver to support LMTP AUTH.
+ * Improved the error messages logged when authentication fails.
+ * Fixed a bug dealing with argument processing in the arbitron
+ program.
+ * pop3d now correctly supports SASL AUTH.
+ * imtest will no longer prompt for authentication or authorization
+ names; instead, it defaults to the current Unix user. Override on
+ the command line.
+ * Likewise, cyradm will no longer prompt. It now accepts "-m" to
+ specify what SASL mechanism to use, and the pwcommand option to
+ authenticate should once again work when used non-interactively.
+
+Changes to the Cyrus IMAP Server Since Version 1.6.10
+
+ * Changed the sieve option in the configure script to
+ --disable-sieve.
+ * Updated reconstruct and quota to check for hashed imap spool
+ directories correctly.
+ * deliver now will not use Sieve if duplicate delivery suppression is
+ disabled. There was also a bug that caused the duplicate delivery
+ database to be checked even if dupelim was disabled.
+ * deliver now uses tm_gmtoff if available to check for the local
+ timezone.
+ * The default format for reading information from INN has changed. If
+ you use INN to feed imapd news, you must change your "newsfeeds"
+ file to contain
+
+ collectnews!:*:Tf,WO:collectnews
+
+ * The dohash script now takes a "-i" option to run interactively and
+ the "-f" option to issue warnings instead of fatal errors.
+
+Changes to the Cyrus IMAP Server Since Version 1.6.1-BETA
+
+ * cyradm should now work with all mechanisms (it now handles empty
+ challenges and responses).
+ * Fixed deliver to deal with arbitrarily long headers
+ * COPY for non-existent sequence numbers returns NO; this contrasts
+ to UID COPY, which always returns OK.
+ * FETCH for non-existent sequence numbers returns NO; this contrasts
+ to UID FETCH, which always returns OK.
+ * Fixed a misleading BAD responses to commands that take sequences.
+ * Added UIDNEXT untagged response to a SELECT (from
+ draft-crispin-imapv-07.txt).
+ * pop3d now correctly passes SASL configuration options to libsasl.
+ * imtest now correctly flushes the server's output to the screen.
+ * Added more hashing using a simple but stupid algorithm. Now
+ whenever there is a mailbox access, quota access, or subscription
+ access, it goes through a hash function. this is done to help
+ reduce the number of files/directories in any given directory.
+ * Added the binary mbpath. Given a mailbox name, this binary will
+ print the filesystem path to that mailbox. This way if you have
+ multiple partitions and hashing turned out, you don't have to spend
+ as many mental cycles figuring out where the actual directory is.
+ * deliver now checks sieveusehomedir and sievedir in the config file
+ to determine where to look for sieve scripts.
+ * ptloader now has a workaround for afs 3.5.
+ * clarified an error message in message.c when an unexpected end of
+ file is encountered.
+ * fixed some random memory leaks in deliver.
+ * fixed a fairly major bug in prot_fill. it was performing
+ incorrectly when reading only a single character.
+ * fixed a bug in how imtest looked for OK or NO.
+ * fixed a memory leak in imapd.
+ * imapd now allows any user (or member of a group) listed in
+ "proxyservers" to proxy.
+
+Changes to the Cyrus IMAP Server Since Version 1.6.0-BETA
+
+ * fixed stupid bug in imapd
+ * fixed sasl/config.c interaction
+ * fixed use of stat in imtest
+
+Changes to the Cyrus IMAP Server Since Version 1.5.24
+
+ * ANSI C is now required.
+ * imtest's interface has changed, to allow for SASL authentication.
+ Sorry, but it had to happen. It now also includes a timing test
+ (-z) which we use to test the SASL layers.
+ * imtest no longer uses a non-synchronizing literal with LOGIN, so it
+ should work against all IMAP servers.
+ * The prot layer now uses SASL for encryption and authentication.
+ This changed a large amount of code, and some build procedures.
+ * As a side effect of SASL, --enable-static-libraries now doesn't do
+ anything. We are considering compiling cyrus with libtool to change
+ this.
+ * Error codes returned by programs have changed, and programs return
+ EX_TEMPFAIL far more than they used to. This is because Sendmail
+ considers most not-EX_TEMPFAIL errors permanent; now, if it may not
+ be permanent, EX_TEMPFAIL is returned. (See lib/exitcodes.h.)
+ * Two bugs fixed: UID FETCH's with no messages in range now return
+ OK, not BAD. And an obscure bug in LIST case sensitivity is fixed.
+
+Changes to the Cyrus IMAP Server Since Version 1.5.19
+
+ * Most of the charset.c code (and mkchartable.c code) has been
+ replaced thanks to John Myers).
+ * Bug fix in message.c to look up headers in the cache when they're
+ in the cache correctly; thanks to Chris Newman for the fix.
+ * Code cleanup here and there (thanks to Bruce Balden).
+ * Annoying (and confusing) lines in syslog every time a message was
+ delivered if deliver was compiled using dbm saying that deliver was
+ "unable to fetch entry" have been removed.
+ * Content-Disposition lines were being parsed improperly. If they had
+ no optional arguments, they were being ignored as if they were
+ syntactically incorrect. This is fixed, but imapd will continue to
+ serve wrong information unless cyrus.caches are rebuilt (with
+ reconstruct) for any message that was added to the mailbox before
+ this bug was fixed.
+ * The arbitron program now takes a mailbox pattern argument for the
+ mailbox to run on. The manpage always said it did anyway.
+ * Uninitialized variable fixed in imapd.c with the shutdown file
+ code.
+ * Minor tweaks to purify build config.
+ * Fix minor memory leak in proc.c where procfname wasn't being
+ free'd.
+ * Fix brain fart in auth_krb_pts.c where a CLOSE() was done to a DB
+ handle BEFORE we access the data read from the DB database. This
+ means we were copying free'd memory into the groups list. Note this
+ only affects people using DB, AFS and ptloader.
+ * Committed minor syslog log level changes in ptloader and deliver.
+ * make distclean now does what it's supposed to.
+ * Possibly misnamed experimental --enable-static-libraries switch
+ that tries to do a good job of building binaries with whatever
+ static libraries are availible. If you use this, you do so at your
+ own risk, and if it fails, we will disavow all knowledge of you and
+ your team. Good luck, Jim.
+ * Add optional third argument to imtest for it to take input from a
+ file. This is a gross hack.
+
+Changes to the Cyrus IMAP Server Since Version 1.5.14
+
+ * LIST now honors the reference argument.
+
+ This behavior can be turned off by a configuration option
+ imapd.conf--which may be desirable because of certain clients that
+ ask for a "mail directory" setting for IMAP which will now cause
+ problems when it was ignored before. (The default is for the
+ reference argument to be honored.)
+ * The arbitron program now takes a mailbox pattern argument for the
+ mailbox to run on. The manpage always said it did anyway.
+ * Added --disable-server switch to optionally prevent compilation of
+ server to help sites that just want client libraries (so cyradm and
+ libcyrus can be compiled on remote systems without installing stuff
+ into /usr/cyrus/bin, etc.) For now, the server is still configured
+ in this case, and a Makefile is generated. This could change in
+ future versions.
+ * Fixed a mmap leak in index.c in index_search_evaluate that caused
+ problems on complex searches. Thanks to Jeff Schiller for pointing
+ this out. Fixed a potential leak in mboxlist.c that happened if a
+ rename went awry. Thanks to Chris Newman for pointing this out.
+ * Fixed a bug in LIST and LSUB code so that user.* mailboxes will be
+ printed on every LIST instead of just the first one.
+ * Implemented the POP3 Extension Mechanism, RFC 2449, in order to
+ advertise the capabilities already supported.
+ * Fixed a bug in mailbox.c that disallowed MUTF-7 representations of
+ ASCII characters when it shouldn't have. (Thanks to John Myers for
+ providing a fix and to Per Steinar Iversen for telling me that I
+ didn't do it before.)
+ * More cleanup the ptloader/auth_krb_pts code. If you use Kerberos
+ and IMSP, you *MUST* pick up cyrus-imspd-v1.5a6 (or newer).
+ * A few configure tweaks.
+ * Duplicate delivery changes:
+
+ * Split out duplicate delivery elimination to multiple files.
+ This should help reduce the lock contention that normally
+ occurs with this file. To not clutter config_dir, the files
+ will be located in a subdirectory named deliverdb, for example
+ /var/imap/deliverdb. If you don't make this directory, nothing
+ bad will happen (other than duplicate delivery elimination will
+ not work).
+ * The time value is now stored as an integer in native byte order
+ as opposed to converting it to a string before it is stored in
+ the database.
+ * checkdelivered() now obtains a read lock instead of a write
+ lock when trying to check for duplicates. Only markdelivered()
+ grabs a write lock.
+
+ * Added logic to cause cyradm to abort more cleanly if not given
+ command line arguments in an interactive session. This gets rid of
+ the dreaded application-specific intialization failed messages.
+
+Changes to the Cyrus IMAP Server Since Version 1.5.11
+
+ * The CREATE command now ignores a trailing hierarchy delimiter
+ instead of ignoring the CREATE command.
+ * UIDPLUS is now always advertised in CAPABILITY and is always
+ availible. The UIDPLUS extension is a set of optimizations using
+ UID values instead of sequence numbers and is described in RFC
+ 2359.
+ * Cyrus no longer rejects messages with 8-bit characters in the
+ headers. Rather than reject the message, characters with the 8th
+ bit set are changed to 'X'. Internationalization in headers is
+ supported by the mechanism specified in RFC 2047 (and RFC 1342).
+
+Changes to the Cyrus IMAP Server Since Version 1.5.10
+
+ * If ENABLE_EXPERIMENT is set, the server no longer claims to support
+ OPTIMIZE-1; instead, it claims to support UIDPLUS. The Getuids
+ command has been removed since it is not in the UIDPLUS document
+ (draft-myers-imap-optimize-03.txt).
+ * The checks for Tcl in configure are much smarter. The configure
+ script asks tclsh where its configuration lives, then consults the
+ shell scripts that have that information. This should work with 7.5
+ or better, which is what the server requires anyway. (All the
+ previous checks to look for Tcl libraries are gone; now, configure
+ runs tclsh and asks it where the Tcl libraries are, then runs the
+ shell scripts that are in that directory. Since the tclConfig.sh
+ script may not be in that directory, it looks in .. as well.)
+ * The checks for com_err in configure are a little smarter and look
+ to see if all the pieces are there before trying to use them.
+ * Added support for the NAMESPACE extension (if --enable-experiment
+ is supplied).
+ * Added a "reject8bit" switch to imapd.conf. If set to "true",
+ messages containing 8-bit-set characters in the headers are
+ rejected (the previous behavior); if set to "false" or left to the
+ default value, messages containing 8-bit-set characters have these
+ characters changed to a constant character ('X').
+ * Added the "fud" program. This is an interm hack designed to allow
+ allow finger information to be retrieved for cyrus users. This is
+ experimental and it is not recommend that services be built arround
+ this feature, since it is likely to be removed in a future release
+ of the IMAP server.
+ * Bug fix: User defined flags now work properly.
+
+Changes to the Cyrus IMAP Server Since Version 1.5.2
+
+ * Fixed a bug with word alignment on Solaris using Kerberos compiled
+ with Sun's CC. (Several patches were submitted; thanks to everyone
+ who did so.)
+ * Patches from John Myers, including more glob fixes.
+ * Use the default hash function from DB. Note that this means that
+ the existing delivered.db and ptscache.db is NOT compatible with
+ this release. These files should be removed.
+ * Provide two debugging programs that dump the databases: ptdump and
+ dump_deliverdb.
+ * Multiple changes to ptloader. added a bunch of flags; let it
+ reauthenticate on its own; added support perl wrapper; added bunch
+ of debugging information/output; bunch of other cleanups
+ * The mailboxes file is now closed if it isn't likely to be
+ referenced, hopefully preventing old mailboxes files from hanging
+ around in memory as frequently.
+ * Added a patch from Eric Hagberg to work around a possible deadlock
+ condition in mboxlist.c where rename isn't atomic.
+ * Patch from John Myers to get rid of cyrus.seen corruption in
+ bsearch_mem.
+ * Patch from John Myers and to allow ISO-8859-1 characters in mailbox
+ names.
+ * Makedepend still runs, and still generates warnings, but these are
+ squirrled away in makedepend.log.
+ * On mailbox delete, the server will no longer try and unlink ".."
+ and "." as we got a report that it seriously breaks one file system
+ (even as non-root).
+ * Added some support for Netscape's very misleading "Administrate My
+ Mail" menu option in Communicator. Allows for a URL to be set in
+ imapd.conf for the page to refer users to; needs to be turned on
+ with --enable-netscapehack at compile time to enable it.
+ * Bug swap: imtest quotes password with a non-synchronizing literal
+ in order to allow weird characters like ) in passwords. But it
+ doesn't look to see if the server supports non-synchronizing
+ literals.
+ * If the file "msg/motd" exists, the first line is now sent to
+ clients upon login.
+ * Bug fix: to handle BODY[] properly when fetching news articles
+ (truncation no longer occurs). (thanks to John Prevost)
+ * The makedepend supplied should now run on Solaris Intel. (thanks to
+ Chris Newman)
+ * Added some hacks to pwcheck.c for Linux and Digital Unix where the
+ default protections on the socket don't allow the cyrus user to
+ read it. (thanks to Lyndon Nerenberg)
+ * Bug fix: Flags beginning with \ are system flags and users can only
+ create the defined flags. The code to do this before was confused.
+ * The configure scripts and makefiles have some random fixes.
+ * Added a contrib directory for reasons of laziness in collecting
+ patches, not all of which should be in the distribution.
+ * ptloader can now renew its AFS authentication by reading from a
+ srvtab file.
+ * The configure script now looks for a libcom_err and can use an
+ installed one if one exists.
+ * Other small bug fixes.
+
+Changes to the Cyrus IMAP Server Since Version 1.5
+
+ * Bug fix: RENAME corrupted mailboxes if they had been EXPUNGEd. (may
+ have only happened with INBOX, which Pine tickles once a month.)
+ * Bug fix: auth_newstate now initializes its structures.
+ * Bug fix: pop3d.c, a printf was changed to prot_printf.
+ * Cyrus now sends X-NON-HIERARCHICAL-RENAME to alert clients that it
+ is not handling RENAME in an IMAP4rev1 compliant manner. This will
+ be fixed in a subsequent release.
+ * Bug fix: imclient_autenticate now does resolution on the hostname
+ before authenticating to it. This caused problems when
+ authenticating to an address that was a CNAME.
+ * Bug fix: LIST %.% (and other multiple hierarchy delimiter matches)
+ works properly. Several other glob.c fixes are included as well.
+ * Bug fix: a fetch of exclusively BODY[HEADER.FIELDS...] should now
+ work properly.
+ * Bug fix: reconstruct now considers a nonexistant INN news directory
+ to be empty; this makes reconstruct fix the cyrus.* files in the
+ imap news partition.
+ * Added a manpage for imclient.
+ * Fixed a few other minor bugs.
+
+Changes to the Cyrus IMAP Server Since Version 1.4
+
+ * Implemented the "IMAP4rev1" protocol commands. (The hierarchical
+ behavior of RENAME, which was added late to the IMAP4rev1
+ specification, is not implemented.) Changes the minor version
+ number of the cyrus mailbox database format to 1. IMPORTANT: it is
+ necessary to run the command "reconstruct -r" as the cyrus user
+ after upgrading the Cyrus IMAP software from version 1.4 or
+ earlier.
+ * If the file "msg/shutdown" exits in the configuration directory,
+ the IMAP server will issue the first line in the file in an
+ untagged BYE message and shut down.
+ * Permit SPACE in mailbox names.
+ * Permit the "modified UTF-7" internationalized mailbox name
+ convention.
+ * "User opened mailbox" messages are now logged at the DEBUG level
+ instead of the INFO level.
+ * Added -q (ignore quota) switch to deliver.
+ * New "krbck" program for diagnosing common kerberos problems.
+ * auth_unix no longer requires users to be in the passwd file.
+ * AUTHENTICATE command now reports the protection mechanism in use in
+ the text of the tagged OK response
+ * Make MAILBOX_BADFORMAT and MAILBOX_NOTSUPPORTED temporary errors.
+ * Use the header cache for SEARCH HEADER
+ * Use "unspecified-domain" instead of server's hostname to fill out
+ RFC 822 addresses without the "@domain" part.
+ * Make "reconstruct -r" with no args reconstruct every mailbox.
+ * The configure script now defaults to using unix_pwcheck instead of
+ unix if the file /etc/shadow exists.
+ * The location of the pwcheck socket directory now defaults to
+ "/var/ptclient/". It is controlled by the "--with-statedir=DIR"
+ option, which defaults to "/var".
+ * Bug fix: by using an certain address form, one could deliver to a
+ user's mailbox bypassing the ACL's.
+ * Bug fix: un-fold header lines when parsing for the ENVELOPE.
+ * Delete quota roots when deleting the last mailbox that uses them.
+ Doesn't catch all cases, but should get over 99% of them.
+ * Implement plaintextloginpause configuration option, imposes
+ artificial delay on plaintext password logins.
+ * Implement popminpoll configuration option, limits frequency of POP3
+ logins.
+ * Implement AFS PT server group support.
+ * Remove persistence of POP3 LAST value and remove Status: hack
+ * Support the new ACL command set in the IMAP server.
+ * Bug fix: Have to initialize reply to 0 in pop3d. Was causing POP3
+ server to occasionally drop the connection during authentication.
+ * Bug fix: The COPY command wasn't issuing a [TRYCREATE] when
+ appropriate for sub-mailboxes of INBOX.
+ * Bug fix: Renaming a mailbox wasn't correctly changing its
+ UIDVALIDITY.
+ * Bug fix: Renaming a mailbox to itself, in order to move it to a
+ different partition, was not working correctly.
+ * Update the AUTH support in pop3d to conform to the latest draft
+ specification.
+ * Update cyradm to use Tcl 7.5 instead of Tcl 7.4
+ * Re-implement large sections of the netnews support. It no longer
+ requires modifications to INN, as it now expunges the index entries
+ for expired/canceled articles upon select of the newsgroup.
+ * Implement newsspool configuration option, for separating the
+ directories for the news spool and the various cyrus.* IMAP server
+ index files.
+ * Bug fix: permit empty flag list in APPEND command
+ * Bug fix: deal with truncated Date: header values.
+ * Bug fix: memory mapping code, deal better with 0-length maps, since
+ mmap() appears to crap out on that boundary condition.
+ * Portability fix: if no strerror, have to define NEED_SYS_ERRLIST.
+ * Bug fix: used append instead of lappend in cyradmin, preventing use
+ of any port other than IMAP.
+ * When the client is streaming its commands, the IMAP server attempts
+ to stream its tagged responses.
+ * Modify zephyr support to compile without Kerberos support.
+ * Add a bunch of prototype declararations to the code.
+ * In deliver, change the MULT support to instead use the LMTP syntax.
+ * imclient: support tagged intermediate replies and a default
+ callback.
+ * Implement some experimental protocol extensions for optimizing
+ disconnected use resynchronization. Most extensions are disabled by
+ default. Client authors should contact info-cyrus at andrew.cmu.edu if
+ they wish to experiment with these.
+ * In Makefiles, change $(AR) to ar -- HPUX make is defective.
+ * In deliver, use HAVE_LIBDB to select use of db over dbm
+ * Add map_stupidshared mapping module for older versions of Digital
+ Unix. It's not quite as bad as HPUX, but...
+ * Bug fix: in imclient.c, don't free NULL pointers and don't call
+ htons() on the output of getservbyname(). Have to abort sending the
+ command if you get a tagged response when sending a literal.
+ * The auth_xxx routines now create/take a state argument instead of
+ maintaining internal static state.
+ * Solaris mktime() is buggy in some releases. Create and use
+ mkgmtime() for parsing date strings.
+ * Message parsing routines now use memory mapping, though they still
+ copy data around in line-sized buffers.
+
+Changes to the Cyrus IMAP Server Since Version 1.3
+
+ * Implemented the "reconstruct -m" command, for reconstructing the
+ mailboxes file. IMPORTANT: it is necessary to run the command
+ "reconstruct -m" as the cyrus user after upgrading the Cyrus IMAP
+ software from version 1.3 or earlier. We recommend you make a
+ backup copy of the mailboxes file in the configuration directory
+ before performing the conversion.
+ * Mailbox names are now case sensitive, not case insensitive. "INBOX"
+ is the exception, and is treated as being case-insensitive.
+ * Personal mailboxes now appear to their owners as being under the
+ "INBOX." hierarchy. For example, the mailbox "user.bovik.work"
+ appears to the user "bovik" as "INBOX.work". The user may still
+ refer to the mailbox with the name "user.bovik.work".
+ * Previously, the code used "anybody" as the name of the group that
+ all users are in, but the documentation used the name "anyone".
+ Changed the code to match the documentation. The name "anybody"
+ will be canonicalized to the name "anyone".
+ * The install document now gives different recommended locations for
+ the server databases. The recommended location of the configuration
+ directory changed from "/usr/cyrus" to "/var/imap" and the
+ recommended location of the default partition directory changed
+ from "/usr/spool/cyrus" to "/var/spool/imap". It is NOT necessary
+ to change the locations of these directories when upgrading from
+ version 1.3 or earlier of the Cyrus IMAP server software. If you do
+ wish to change the locations of these directories to match the new
+ recommendations, simply rename the directories and change the
+ appropriate values in your /etc/imapd.conf file.
+ * Created a "make install" rule. See the installation document for
+ all the new corresponding configure options. Note the recommended
+ location of the "imapd", "pop3d", and "deliver" programs has
+ changed, this change needs to be reflected in the "inetd.conf" and
+ "sendmail.cf" files.
+ * New "login_unix_pwcheck" module and "pwcheck" daemon, for improved
+ shadow password support. See the "pwcheck/README.pwcheck" file in
+ the distribution for details.
+ * Renamed the "login_unix_shadow" module to "login_unix_getspnam".
+ * Added a mail notification mechanism, using Zephyr.
+ * Added a feature to automatically create user IMAP accounts.
+ Controlled by the "autocreatequota" config option.
+ * Added the "logtimestamps" config option, for putting timestamp
+ information into protocol telemetry logs.
+ * Beefed up the Kerberos checks in Configure to ensure the DES
+ library routines exist.
+ * On some systems, the "echo" command with no arguments emits a
+ newline. Changed the installation document to instead use the
+ "true" command to create the "mailboxes" file.
+ * Store a redundant copy of a mailbox's ACL in the cyrus.header file,
+ so "reconstruct -m" may later use it as a backup.
+ * Had to remove the declaration of tcl_RcFileName for the latest
+ version of Tcl.
+ * Make much more extensive use of memory mapping. Replace the binary
+ search module with one that searches a memory mapped area.
+ * Replaced the yacc-based RFC822 address parser with a hand-coded
+ one.
+ * Replaced the et (error table) libary with a version that doesn't
+ require lex or yacc. Remove the lex/yacc checking from Configure.
+ * Safety feature: most programs now refuse to run as root.
+ * Bug fix: Issue [TRYCREATE] tag on COPY command when appropriate.
+ * Bug fix: The quoted-printable decoder wasn't ignoring trailing
+ whitespace, as required by MIME.
+ * Bug fix: Don't spew cascade errors if the server gets an EOF
+ during/after reading an APPEND literal.
+ * Bug fix: gmtmoff_gmtime.c was returning results with the wrong
+ sign.
+ * Bug fix: imclient_send was appending spaces to %d and %u and the
+ response parser was not handling responses that did not contain a
+ space after the keyword.
+ * Bug fix: rmnews wasn't removing some (un-indexed) article files
+ correctly.
+ * Completely disabled the dropoff code for now. It will be completely
+ replaced when IMSP integration is implemented
+ * Added workaround for the Linux mkdir() problem.
+ * In Configure, use a more direct test for a working shared-memory
+ mmap
+ * In collectnews, avoid O(n**2) behavior when processing articles
+ that have already expired.
+ * Bug fix: append_addseen() would screw up if no messages were
+ previously seen.
+ * Added the CMU-specific amssync and cmulocal directories.
+ * Use memmove instead of bcopy.
+ * Implemented the first pass of SMTP/MULT support in deliver.
+ * Added cacheid parameter to auth_setid(), for AFS PT server support.
+
+Changes to the Cyrus IMAP Server Since Version 1.2
+
+ * Fixed bug in character set code that broke text searches. Sites
+ which care about searching headers need to reconstruct their
+ existing mailboxes.
+
+Changes to the Cyrus IMAP Server Since Version 1.1-Beta
+
+ * Add support for UIDVALIDITY special information token.
+ * Add syncnews and arbitron programs.
+ * Redo duplicate delivery elimination in deliver.
+ * Bug fixed: Must re-read files after acquiring a lock. Cannot trust
+ the mtime of a file to increment when writing the file--file could
+ be written to multiple times in the same second.
+ * Bug fixed: EXAMINE command should not affect \Recent status.
+ * Update the user's \Recent high-water-mark when we report new
+ messages.
+ * Portability changes
+ * Upgrade to autoconf 2.1
+ * Allow privacy to be turned off at compile-time with
+ --disable-privacy configure switch.
+ * Fix typo in cyradm preventing "all" from being recognized.
+ * Include map_private.c memory mapping module for systems like HPUX
+ which have half-working mmap() implementations.
+ * Switch to using UTF-8 for internal search format. Sites which care
+ about internationalized searching of headers need to reconstruct
+ all their existing mailboxes.
+ * Fix some errors in the iso-8859-* tables.
+ * Add and correct a bunch of case-independence mappings in the
+ character tables.
+ * First pass at implementing the STATUS extension; disabled for
+ release.
+ * First pass at implementing IMAP/IMSP server integration. Not ready
+ for general use.
+ * Add new_cred and free_cred mechanisms to authentication modules.
+ * Don't complain when doing "reconstruct -r foo" and foo isn't a
+ mailbox.
+ * Add IMAP_QUOTAROOT_NONEXISTENT error code.
+ * Bug fix: Avoid divide by zero when quota is zero
+ * Bug fix: In an error case of the ACL handling code, we have to
+ restore tab before breaking out of loop.
+ * Fix file descriptor leak in quota system.
+ * Change a bunch of int variables to unsigned.
+ * Better error reporting on reads that end up short.
+
+Changes to the Cyrus IMAP Server Since Version 1.0-Beta
+
+ * Improved installation document.
+ * New "cyradm" administrative client.
+ * Changed the syslog facility from "local4" to "local6".
+ * Removed the renounce setuid check in "deliver". The "deliver"
+ program must now be non-executable by other.
+ * Fixed a typo in the parsing of SEARCH DELETED. (This bug constantly
+ got tripped by newer C-clients.)
+ * Redesigned the implementation of SEARCH CHARSET.
+ Sites that wish to search for non-ASCII characters in the headers
+ of existing mailboxes must run reconstruct on all their mailboxes
+ after upgrading to this version.
+ * Added AUTH and KPOP support to the POP3 server.
+ * Added search support for the ISO-2022-JP character set.
+ * Replaced the search engine with a partial Boyer-Moore algorithm.
+ * Special-case optimized searching US-ASCII text.
+ * Fixed a bug which caused the message parser to spin-loop on a
+ particular degenerate invalid-MIME case.
+ * Fixed a performance bug in the message parser.
+ * Tracked last-minute changes to the IMAP4 protocol.
+ * Fixed a bug in UNSUBSCRIBE which caused too many subscriptions to
+ be removed.
+ * Added a bunch more "configure" options.
+ * Ported to HPUX.
+ * Fixed a bug in the LIST/LSUB \Noselect code.
+ * Fixed bug in the globbing code which caused the "*%" pattern to
+ work incorrectly.
+ * Client-side Kerberos support is now conditionalized on
+ HAVE_ACTE_KRB, which is set by configure.
+ * Fixed some invalid buffer-alignment assumptions in the Kerberos
+ code.
+ * Made the lexers compatible with flex. Configure now looks for and
+ prefers to use flex and bison/byacc.
+ * Made the IMAP server check for the existence of the mailboxes file
+ upon startup, in order to give a more informative error message for
+ this common configuration error.
+ * Fixed other minor bugs.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/faq
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/faq?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/faq (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/faq Sat Aug 26 02:00:13 2006
@@ -1,0 +1,207 @@
+Cyrus IMAP Server FAQ
+
+ * Using PAM Under Linux when using PAM and shadow passwords,
+ /etc/shadow needs to be readable by the Cyrus user.
+ * POP-Before-SMTP It is not included in the default distribution
+ because there is already a standard way of doing this with SMTP
+ AUTH. Any good MTA and/or MUA should support SMTP AUTH, so we
+ shouldn't have to create a hack in an unrelated service. However,
+ if you would like to install it anyway, we recommend using DRAC,
+ along with the patch available in contrib/drac_auth.patch.
+ * Using NFS We don't recommend it. If you want to do it, it may
+ possibly work but you may also lose your email or have corrupted
+ cyrus.* files. You can look at the mailing list archives for more
+ information.
+ * Using AFS/Coda We don't recommend it. It's even less likely to work
+ than NFS. If you want to do it, it may possibly work but you may
+ also lose your email or have corrupted cyrus.* files. CMU's
+ previous e-mail system, AMS, leveraged AFS extensively for storage
+ (and transit) purposes. For various reasons it didn't scale
+ particularly well and led to CMU's interest in IMAP.
+
+ Cyrus was designed to use a local filesystem with Unix semantics
+ and a working mmap()/write() combination. AFS doesn't provide these
+ semantics so won't work correctly.
+ * Virtual hosting - See virtual domains configuration.
+ * dots in userids - you can have a '.' in your username IF, AND ONLY
+ IF, you use the UNIX hierarchy convention.
+ * renaming users - Supported, but try to make sure that the user is
+ not, and can not login when doing the rename. Otherwise user-meta
+ may get corrupted and/or out of sync.
+ * plus addressing - Plus addressing allows direct delivery to a
+ particular mailbox (other than an INBOX). This is done in two ways.
+
+ The first way allows delivery to a subfolder of a specific user's
+ INBOX. This is done via an address of the form:
+ username+mailfolder at domain, which will deliver to the user's
+ INBOX.mailfolder folder (or altnamespace equivalent). This
+ submailbox must allow the posting user the 'p' right (generally,
+ this means 'anyone' must have the 'p' right), otherwise the message
+ will just be filed into the user's INBOX.
+
+ The second way is to form an address like
+ [postuser]+mailfolder at domain. This will deliver into the mailbox
+ 'mailfolder'. [postuser] is the string specified in the imapd.conf
+ option of the same name, and may be the empty string. As before,
+ the posting user will need to have the 'p' right on the mailbox.
+
+ For both methods, if 'mailfolder' is more than one level deep, you
+ will need to conform to the hierarchy separator appropriate to your
+ site.
+ * Performance/Capacity/Scaling - See the performance guide.
+
+Troubleshooting
+
+ Q: I'm getting syslog'd messages from the master process saying
+ processes are "signaled to death by 10". What's up?
+
+
+ A: If you're using Berkeley DB 3.0.55, try installing some
+ patches to Berkeley DB available from
+ http://www.sleepycat.com/update/3.0.55/patch.3.0.55.html.
+ Q: I've used saslpasswd2 to create CRAM-MD5 secrets, but imapd doesn't
+ say AUTH=CRAM-MD5. Why?
+
+
+ A: Make sure /etc/sasldb2 is readable by the Cyrus user.
+ Q: I'm using "sasl_pwcheck_method: saslauthd", but authentication isn't
+ working.
+
+
+ A: Make sure that the saslauthd daemon is running (you'll want
+ to start it when the system boots). imapd is unable to connect
+ to saslauthd if the following message appears in the logs:
+
+ Dec 6 12:58:57 mail3.andrew.cmu.edu imapd[1297]: cannot connect to saslauthd server
+
+ Make sure that saslauthd is running and that the cyrus user can
+ access the unix domain socket (defaults to /var/run/mux).
+ Q: I'm getting messages about "duplicate_prune". What's wrong?
+
+
+ A: These messages look like
+
+ Jan 14 13:46:24 grant ctl_deliver[9060]: duplicate_prune: opening
+ /var/imap/deliverdb/deliver-x.db: No such file or directory
+ Jan 14 13:46:24 grant ctl_deliver[9060]: duplicate_prune: opening
+ /var/imap/deliverdb/deliver-y.db: No such file or directory
+ Jan 14 13:46:24 grant ctl_deliver[9060]: duplicate_prune: opening
+ /var/imap/deliverdb/deliver-z.db: No such file or directory
+
+ These messages are normal; one file is maintained for each user
+ beginning with "x", "y", "z", etc. If you're first starting or
+ you have no users beginning with these letters, these messages
+ are completely normal and can be ignored.
+ Q: I'm getting a message about "imapd: could not getenv(CYRUS_SERVICE);
+ exiting" in my imapd.log. What's wrong?
+
+
+ A: Remove all imap, pop, lmtp and sieve lines from
+ [x]inetd.conf and restart [x]inetd. Cyrus is run out of its own
+ "master" process.
+ Q: How do I use different SSL/TLS certificates for imap and pop?
+
+
+ A: Specify the different certs using the appropriate options in
+ imapd.conf. Read imapd.conf(5) for details.
+ Q: My KPOP client is complaining about TLS keys. What should I do?
+
+
+ A: Disable TLS for the kpop service. Either set
+ tls_pop3_cert_file to disabled in imapd.conf (which will also
+ disable SSL/TLS for pop3), or use a separate config file for
+ kpop. For example, change the kpop service in cyrus.conf to
+ something like:
+
+ kpop cmd="pop3d -k -C /etc/kpopd.conf" listen="kpop"
+
+ then copy /etc/imapd.conf to /etc/kpopd.conf and remove the
+ tls_* options.
+ Q: Eudora 5.x can't connect using STARTTLS ("SSL Neogotiation Failed").
+ What should I do?
+
+
+ A: First, complain to QUALCOMM because their STARTTLS
+ implementation is broken. Eudora doesn't support TLSv1 (per
+ RFC2246) and Cyrus requires it. If you really need this before
+ it is fixed in Eudora, remove or comment out the following
+ lines in tls.c:
+
+ if (tlsonly) {
+ off |= SSL_OP_NO_SSLv2;
+ off |= SSL_OP_NO_SSLv3;
+ }
+
+ Q: I'm getting messages in imapd.log like:
+
+ Sep 11 17:23:55 ogg lmtpd[773]: DBERROR db3: 16 lockers
+ Sep 11 17:23:55 ogg lmtpd[1409]: DBERROR db3: 17 lockers
+ Sep 11 17:23:56 ogg lmtpd[1508]: DBERROR db3: 9 lockers
+ Sep 11 17:23:56 ogg lmtpd[776]: DBERROR db3: 9 lockers
+
+ What's wrong?
+
+
+ A: Nothing is wrong. These messages are logged whenever
+ Berkeley db encounters lock contention, but isn't necessarily a
+ problem by themselves. This is especially likely when you have
+ an empty or small duplicate delivery database and are receiving
+ a large volume of e-mail.
+
+ Berkeley db 4.0 has a bug where the number of lockers isn't
+ decremented properly, causing this number to be unreliable.
+ Q: All of the 8bit characters in the headers of messages that I receive
+ are being changed to 'X's. What's going on?
+
+
+ A: 8-bit characters are illegal in message headers. Following
+ the principal of "be liberal in what you accept, and strict in
+ what you send" cyrus converts them to Xs. (Without a character
+ set, having the 8-bit characters replaced with Xs is just as
+ good as having them be any other 8-bit character, especially
+ for sorting and searching). Alternatively, you can set
+ "reject8bit: t" in imapd.conf to reject the messages outright.
+ It might also be reasonable for cyrus to support the use of a
+ default character set, however thus far no one has done the
+ work to do so (it would also involve QP-encoding the corrupted
+ headers).
+ Q: Why can't I delete any messages from my over-quota mailbox? I'm
+ using a client with a 'trash folder'.
+
+
+ A: Trash folders, as they are commonly implemented (as an
+ actual IMAP mailbox), do not fit the IMAP delete/expunge model
+ very well. In fact, naive client implementations will get stuck
+ in a situation where they cannot delete a message from a
+ mailbox because they try to COPY it to the trash folder before
+ deleting the message. This operation will fail due to the
+ mailbox being over quota. This is separate from the fact that a
+ specific mailbox name is not interoperable between clients (one
+ might call it 'trash', another 'Trash', another 'Recycle Bin',
+ etc)
+
+ Given the lack of protocol support for a trash folder, this is
+ mostly a quality-of-implementation issue on the client side.
+ There are a few options here:
+
+ * Contact your client vendor to have the broken client fixed
+ (one possibility is to have the client ask the user if they
+ wish to permanantly delete the message if the COPY
+ operation fails).
+ * Stop using the 'trash mailbox' feature of your client (if
+ possible).
+ * Set a separate quota root on the 'trash folders' of users.
+ This last option is significantly harder to do correctly,
+ since it assumes that all clients that make use of a trash
+ folder do so with the same folder name.
+
+ Q: How do I stop Cyrus from advertising the DIGEST-MD5 and CRAM-MD5
+ shared secret SASL mechanisms?
+
+
+ A: Not really a Cyrus IMAPd question, this can be fixed by just
+ removing the SASL plugins from where Cyrus SASL installed them
+ (if no other applications require them), or by using the
+ sasl_mech_list imapd.conf option to list only the mechanisms
+ that you require.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/feedback
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/feedback?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/feedback (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/feedback Sat Aug 26 02:00:13 2006
@@ -1,0 +1,36 @@
+Sending Feedback on the Cyrus IMAP Server
+
+ Feedback on and fixes for the software or on the document may be sent
+ to cyrus-bugs+ at andrew.cmu.edu. Unfortunately, we can not guarantee a
+ response but we'll try the best we can. As usual, a high quality and
+ complete message helps us tremendously.
+
+ If you submit a patch, please send unified diffs (-u) if your diff
+ program supports them, or context diffs (-c) if it doesn't. Plain diffs
+ are very difficult to evaluate. GNU diff can do this.
+
+ When reporting problems, be sure to include the relevant information.
+ For example, you must include:
+
+ * the version of imapd
+ * the version of libsasl
+ * your system type (uname -a often provides the right information.
+
+ You should also include:
+
+ * the options you passed to ./configure
+ * the errors from make (if any)
+ * the config.status file generated by configure
+
+ NOTE: If you are able to connect to the imap server, all of this
+ information can be gathered by using the version command in cyradm. If
+ you can not use cyradm because you are having perl problems, you can
+ connect using imtest and then run the following IMAP command:
+
+ a ID NIL
+
+ The info-cyrus at andrew.cmu.edu mailing list exists for the discussion of
+ this server and other Cyrus software; more information is available in
+ the mailing-list document. You may get faster/more responses by posting
+ to this list instead of to cyrus-bugs, as there are more readers here.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/htmlstrip.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/htmlstrip.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/htmlstrip.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/htmlstrip.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,412 @@
+/* htmlstrip.c -- HTML to text converter
+ *
+ * Copyright 1998-2003, Carnegie Mellon University. All Rights Reserved.
+ *
+ * This software is made available for academic and research
+ * purposes only. No commercial license is hereby granted.
+ * Copying and other reproduction is authorized only for research,
+ * education, and other non-commercial purposes. No warranties,
+ * either expressed or implied, are made regarding the operation,
+ * use, or results of the software. Such a release does not permit
+ * use of the code for commercial purposes or benefits by anyone
+ * without specific, additional permission by the owner of the code.
+ *
+ */
+
+/* $Id: htmlstrip.c,v 1.9 2003/10/22 18:50:06 rjs3 Exp $ */
+
+#include <stdio.h>
+#include <string.h>
+
+#define MODE_PRE 1 /* Preformatted */
+#define MODE_IGNORETXT 2 /* Discard text */
+
+#define FLAG_NOPUSH 1 /* Has no end marker, don't push on stack */
+#define FLAG_BREAK 2 /* Breaks a line */
+#define FLAG_PARAGRAPH 4 /* Breaks a paragraph */
+
+struct mode {
+ char *name;
+ int indent;
+ int listnum;
+ int flags;
+ int mode;
+ int startline;
+};
+
+struct mode modestack[100] = {"TOPLEVEL", 4};
+int curmode = 0;
+int didparagraph = 1;
+
+struct tag {
+ char *name;
+ int flags;
+ int mode;
+ int indent;
+};
+
+struct tag cmds[] = {
+ { "!--", FLAG_NOPUSH, 0, 0, },
+ { "!DOCTYPE", FLAG_NOPUSH, 0, 0, },
+ { "link", FLAG_NOPUSH, 0, 0, },
+ { "html", 0, 0, 0, },
+ { "head", 0, MODE_IGNORETXT, 0, },
+ { "title", 0, MODE_IGNORETXT, 0, },
+ { "body", 0, 0, 0, },
+ { "p", FLAG_PARAGRAPH|FLAG_NOPUSH, 0, 0, },
+ { "pre", FLAG_PARAGRAPH, MODE_PRE, 0, },
+ { "a", 0, 0, 0, },
+ /* KLUDGE: we set MODE_PRE on <h1> to fake centering it ourselves */
+ { "h1", FLAG_PARAGRAPH, MODE_PRE, -4, },
+ { "h2", FLAG_PARAGRAPH, 0, -4, },
+ { "h3", FLAG_PARAGRAPH, 0, -4, },
+ { "h4", FLAG_PARAGRAPH, 0, -4, },
+ { "h5", FLAG_PARAGRAPH, 0, -4, },
+ { "h6", FLAG_PARAGRAPH, 0, -4, },
+ { "em", 0, 0, 0, },
+ { "strong", 0, 0, 0, },
+ { "code", 0, 0, 0, },
+ { "samp", 0, 0, 0, },
+ { "kbd", 0, 0, 0, },
+ { "var", 0, 0, 0, },
+ { "dfn", 0, 0, 0, },
+ { "cite", 0, 0, 0, },
+ { "blockquote", FLAG_PARAGRAPH, 0, 4, },
+ { "b", 0, 0, 0, },
+ { "i", 0, 0, 0, },
+ { "u", 0, 0, 0, },
+ { "tt", 0, 0, 0, },
+ { "dl", FLAG_PARAGRAPH, 0, 8, },
+ { "dt", FLAG_BREAK|FLAG_NOPUSH, 0, -8, },
+ { "dd", FLAG_NOPUSH, 0, 0, },
+ { "ul", FLAG_PARAGRAPH, 0, 4, },
+ { "ol", FLAG_PARAGRAPH, 0, 4, },
+ { "li", FLAG_BREAK|FLAG_NOPUSH, 0, -4, },
+ { "br", FLAG_BREAK|FLAG_NOPUSH, 0, 0, },
+ { "hr", FLAG_BREAK|FLAG_NOPUSH, 0, 0, },
+ { "meta", FLAG_NOPUSH, 0, 0, },
+ { "table", 0, 0, 0, },
+ { "tr", FLAG_PARAGRAPH, 0, 0, },
+ { "td", 0, 0, 0, },
+};
+
+
+main(argc, argv)
+int argc;
+char **argv;
+{
+ FILE *infile;
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s file\n", argv[0]);
+ exit(1);
+ }
+
+ infile = fopen(argv[1], "r");
+ if (!infile) {
+ perror(argv[1]);
+ exit(1);
+ }
+
+ parse(infile);
+ exit(0);
+}
+
+parse(infile)
+FILE *infile;
+{
+ char outputbuf[1024];
+ int outpos = 0;
+ int c;
+ int cmd;
+ int endtag;
+ int lineno = 1;
+ int i;
+ char *p;
+
+ while ((c = lex(infile, &cmd, &endtag, &lineno)) != EOF) {
+ if (!c) {
+ if (endtag) {
+ if (cmds[cmd].flags & FLAG_NOPUSH) {
+ /* ignore */
+ }
+ else if (strcmp(cmds[cmd].name, modestack[curmode].name)!=0) {
+ fprintf(stderr,
+ "<%s> line %d mismatched with </%s> on line %d\n",
+ modestack[curmode].name,
+ modestack[curmode].startline,
+ cmds[cmd].name, lineno);
+ exit(1);
+ }
+ else {
+ if ((modestack[curmode].flags & FLAG_PARAGRAPH) &&
+ !(modestack[curmode].mode & MODE_IGNORETXT)) {
+ if (outpos) {
+ outputbuf[outpos++] = '\n';
+ outputbuf[outpos++] = '\0';
+ fputs(outputbuf, stdout);
+ outpos = 0;
+ }
+ if (!didparagraph) {
+ putc('\n', stdout);
+ didparagraph = 1;
+ }
+ }
+ curmode--;
+ }
+ }
+ else {
+ if (!(modestack[curmode].mode & MODE_IGNORETXT)) {
+ if (cmds[cmd].flags & (FLAG_PARAGRAPH|FLAG_BREAK)) {
+ if (outpos) {
+ outputbuf[outpos++] = '\n';
+ outputbuf[outpos++] = '\0';
+ fputs(outputbuf, stdout);
+ outpos = 0;
+ }
+ }
+ if ((cmds[cmd].flags & FLAG_PARAGRAPH)
+ && !didparagraph) {
+ putc('\n', stdout);
+ didparagraph = 1;
+ }
+ }
+ if (cmds[cmd].flags & FLAG_NOPUSH) {
+
+ if (!strcmp(cmds[cmd].name, "dt")) {
+ while (outpos < modestack[curmode].indent - 8) {
+ outputbuf[outpos++] = ' ';
+ }
+ }
+
+ if (!strcmp(cmds[cmd].name, "dd")) {
+ if (outpos-1 >= modestack[curmode].indent) {
+ /* Break line */
+ outputbuf[outpos++] = '\n';
+ outputbuf[outpos++] = '\0';
+ fputs(outputbuf, stdout);
+ outpos = 0;
+ }
+ /* Indent line */
+ while (outpos < modestack[curmode].indent) {
+ outputbuf[outpos++] = ' ';
+ }
+ }
+
+ if (!strcmp(cmds[cmd].name, "li")) {
+ if (modestack[curmode].listnum == 0) {
+ fprintf(stderr, "<li> inside a <%s> on line %d\n",
+ modestack[curmode].name, lineno);
+ exit(1);
+ }
+ while (outpos < modestack[curmode].indent - 4) {
+ outputbuf[outpos++] = ' ';
+ }
+
+ if (modestack[curmode].listnum < 0) {
+ outputbuf[outpos++] = ' ';
+ outputbuf[outpos++] = ' ';
+ outputbuf[outpos++] = '*';
+ outputbuf[outpos++] = ' ';
+ }
+ else {
+ if (modestack[curmode].listnum >=100) {
+ fprintf(stderr,
+ "too many <li> items on line %d\n",
+ lineno);
+ exit(1);
+ }
+ outputbuf[outpos++] =
+ modestack[curmode].listnum > 9 ?
+ modestack[curmode].listnum/10 + '0' : ' ';
+ outputbuf[outpos++] =
+ modestack[curmode].listnum%10 + '0';
+ outputbuf[outpos++] = '.';
+ outputbuf[outpos++] = ' ';
+ modestack[curmode].listnum++;
+ }
+ }
+ if (!strcmp(cmds[cmd].name, "hr")) {
+ /* XXX hack */
+ modestack[curmode].mode |= MODE_IGNORETXT;
+ }
+ }
+ else {
+ curmode++;
+ if (curmode >= 100) {
+ fprintf(stderr, "too many nested tags on line %d\n",
+ lineno);
+ exit(1);
+ }
+ modestack[curmode].name = cmd[cmds].name;
+ modestack[curmode].indent =
+ modestack[curmode-1].indent + cmd[cmds].indent;
+ modestack[curmode].listnum = 0;
+ modestack[curmode].flags = cmd[cmds].flags;
+ modestack[curmode].mode =
+ modestack[curmode-1].mode | cmd[cmds].mode;
+ modestack[curmode].startline = lineno;
+
+ if (!strcmp(cmds[cmd].name, "ul")) {
+ modestack[curmode].listnum = -1;
+ }
+ if (!strcmp(cmds[cmd].name, "ol")) {
+ modestack[curmode].listnum = 1;
+ }
+
+ }
+ }
+ }
+ else if (modestack[curmode].mode & MODE_IGNORETXT) {
+ /* do nothing */
+ }
+ else if (isspace(c) && !(modestack[curmode].mode & MODE_PRE)) {
+ /* Only emit space if previous char not a space */
+ if (outpos && !isspace(outputbuf[outpos-1])) {
+ outputbuf[outpos++] = ' ';
+ }
+ }
+ else if (c == '\n') {
+ /* Newline inside MODE_PRE. Emit current line */
+ if (outpos || !didparagraph) {
+ outputbuf[outpos++] = '\n';
+ outputbuf[outpos++] = '\0';
+ fputs(outputbuf, stdout);
+ outpos = 0;
+ didparagraph = 0;
+ }
+ }
+ else {
+ didparagraph = 0;
+ if (!outpos) {
+ /* Indent line */
+ for (i = 0; i < modestack[curmode].indent; i++) {
+ outputbuf[outpos++] = ' ';
+ }
+ }
+ outputbuf[outpos++] = c;
+
+ /* Check for line wrapping */
+ if (outpos > 75 && !(modestack[curmode].mode & MODE_PRE)) {
+ outputbuf[outpos] = '\0';
+ p = strrchr(outputbuf, ' ');
+ if (p && p-outputbuf > modestack[curmode].indent) {
+ *p++ = '\0';
+ fputs(outputbuf, stdout);
+ putc('\n', stdout);
+ outpos = 0;
+ if (*p) {
+ for (i = 0; i < modestack[curmode].indent; i++) {
+ outputbuf[outpos++] = ' ';
+ }
+ while (*p) {
+ outputbuf[outpos++] = *p++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* Write out last line of output */;
+ if (outpos) {
+ outputbuf[outpos++] = '\n';
+ outputbuf[outpos++] = '\0';
+ fputs(outputbuf, stdout);
+ }
+}
+
+int lex(infile, cmdptr, endtagptr, linenoptr)
+FILE *infile;
+int *cmdptr;
+int *endtagptr;
+int *linenoptr;
+{
+ int c;
+ static char buf[1024];
+ int i = 0;
+ int lineno = *linenoptr;
+ char *p;
+
+ c = getc(infile);
+ if (c == '&') {
+ while ((c = getc(infile)) != EOF && c != ';') {
+ buf[i++] = c;
+ if (c == '\n' || i > 1000) {
+ fprintf(stderr, "unterminated entity on line %d\n", lineno);
+ exit(1);
+ }
+ }
+ if (c == EOF) {
+ fprintf(stderr, "unexpected EOF on line %d\n", lineno);
+ exit(1);
+ }
+ buf[i] = '\0';
+ if (!strcasecmp(buf, "amp")) return '&';
+ if (!strcasecmp(buf, "lt")) return '<';
+ if (!strcasecmp(buf, "gt")) return '>';
+ if (!strcasecmp(buf, "quot")) return '"';
+ if (!strcasecmp(buf, "nbsp")) return ' ';
+ fprintf(stderr, "unrecognized entity '%s' on line %d\n", buf, lineno);
+ exit(1);
+ }
+
+ if (!c) {
+ fprintf(stderr, "NUL character on line %d\n", lineno);
+ exit(1);
+ }
+
+ if (c == '\n') (*linenoptr)++;
+ if (c != '<') return c;
+
+ while (i<=1000 && (c = getc(infile)) != EOF && c != '>') {
+ if (c == '\n') (*linenoptr)++;
+ if (isspace(c)) c = ' ';
+ buf[i++] = c;
+
+ if (c == '\"') {
+ while (i<=1000 && (c = getc(infile)) != EOF && c != '\"') {
+ if (c == '\n') (*linenoptr)++;
+ buf[i++] = c;
+ }
+ if (c == EOF || i > 1000) {
+ fprintf(stderr,
+ "unterminated string in tag starting on line %d\n",
+ lineno);
+ exit(1);
+ }
+ buf[i++] = c;
+ }
+ }
+
+ buf[i] = '\0';
+
+ if (c == EOF || i > 1000) {
+ fprintf(stderr, "unterminated tag starting on line %d\n",
+ lineno);
+ exit(1);
+ }
+
+ if (p = strchr(buf, ' ')) *p = '\0';
+
+ p = buf;
+ if (*p == '/') {
+ *endtagptr = 1;
+ p++;
+ }
+ else {
+ *endtagptr = 0;
+ }
+
+ for (i = 0; i<(sizeof(cmds)/sizeof(*cmds)); i++) {
+ if (!strcasecmp(p, cmds[i].name)) {
+ *cmdptr = i;
+ return 0;
+ }
+ }
+
+ fprintf(stderr, "unknown tag <%s> starting on line %d\n", buf,
+ lineno);
+ exit(1);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/index
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/index?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/index (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/index Sat Aug 26 02:00:13 2006
@@ -1,0 +1,35 @@
+Cyrus IMAP Server, version 2.3
+
+ IMAP (Internet Message Access Protocol) is an Internet standards-track
+ protocol for accessing messages (mail, bboards, news, etc). The Cyrus
+ IMAP server differs from other IMAP server implementations in that it
+ is generally intended to be run on sealed servers, where normal users
+ are not permitted to log in. The mailbox database is stored in parts of
+ the filesystem that are private to the Cyrus IMAP system. All user
+ access to messages is through the IMAP, POP3, KPOP or NNTP protocols.
+
+ The private mailbox database design gives the server large advantages
+ in efficiency, scalability, and administratability. Multiple concurrent
+ read/write connections to the same mailbox are permitted. The server
+ supports access control lists on mailboxes and storage quotas on
+ mailbox hierarchies.
+
+ The Cyrus project is the implementation of IMAP servers by the Carnegie
+ Mellon University Computing Services Department. Over the next few
+ months, we will be releasing components of this server, which will
+ provide better mail security and easier mail administration.
+
+The Cyrus IMAP Server Distribution
+
+ Cyrus IMAP Server distribution
+
+ Documentation
+
+ * General release information
+ * Overview and Concepts
+ * Installing the Cyrus IMAP Server
+ * Changes since the last release
+ * Frequently Asked Questions
+ * Man Pages
+ * Protocol Specifications
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install Sat Aug 26 02:00:13 2006
@@ -1,0 +1,45 @@
+ Installing and Configuring the Cyrus IMAP Server
+
+ The Internet Message Access Protocol (IMAP) is an Internet
+ standards-track protocol for accessing messages (mail, news, etc). The
+ IMAP server stores and provides access to messages.
+
+ The file doc/questions.html contains a list of questions we'd like to
+ answer but haven't gotten to yet; doc/faq.html contains some answers
+ that we have thought of. Please feel free to contribute!
+
+ Please refer to Sending Feedback if you would like to submit a bug,
+ feature request or patch.
+
+ For detailed changes, refer to the file doc/changes in the
+ distribution.
+
+Contents
+
+ * Upgrading From Previous Versions
+ * Prerequisites
+ * Authenticating Users
+ * Compiling the IMAP Server
+ * Configuring the IMAP Server
+ * Testing the IMAP Server
+ * Administering Mailboxes
+ * Installing SIEVE
+ * SNMP Monitoring
+ * Cyrus and Netnews
+ * Virtual Domains
+ * Cyrus Replication
+ * Cyrus Murder: The IMAP Aggregator
+ * Operating System Specific Notes
+ * Performance Notes
+
+Other interesting stuff
+
+ Here's some software that you may want to run with Cyrus. This software
+ isn't maintained or supported by CMU, so please ask the maintainers for
+ support.
+
+ * Websieve, a web-based front-end for Sieve script management with
+ Cyrus.
+ * Sendmail, the most popular MTA around.
+ * Postfix, a popular competitor MTA.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-admin-mb
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-admin-mb?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-admin-mb (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-admin-mb Sat Aug 26 02:00:13 2006
@@ -1,0 +1,61 @@
+Administering Mailboxes
+
+ The "cyradm" command (see the cyradm(1) man page for complete
+ documentation) manages the creation of, deletion of, ACLs on, and
+ quotas on mailboxes. To get an overview of the command, type "cyradm
+ <host>". Once "cyradm" has started, the user prompt is replaced with
+ the name of the host followed by a ">". Type "help" at the new prompt.
+ The following information is displayed:
+
+ createmailbox, cm create a mailbox
+ deleteaclmailbox, dam delete an ACL on a mailbox
+ deletemailbox, dm delete a mailbox
+ help get help on commands
+ listaclmailbox, lam list the ACL on a mailbox
+ listmailbox, lm list mailboxes
+ listquota, lq list quota on root
+ listquotaroot, lqr, lqm list quota roots on mailbox
+ quit exit program
+ renamemailbox, renm rename a mailbox
+ setaclmailbox, sam set an ACL on a mailbox
+ setquota, sq set quota limits
+
+ Note:It's not necessary to run "cyradm" on the same system as the IMAP
+ server.
+
+ Note:If you run "cyradm" on a system not using Kerberos for
+ authentication, you will be prompted for your user name and password
+ before you can issue any "cyradm" commands. Use the "-u" option to
+ specify a particular user.
+
+ The mailbox naming convention requires that the primary mailbox (inbox)
+ for anyone must be named "user.<userid>". To create a mailbox, type:
+
+ createmailbox user.<userid>
+
+ For example, to create a mailbox for the userid "smith", type:
+
+ createmailbox user.smith
+
+ To limit "smith" to 10,000 kilobytes of mail, type:
+
+ setquota user.smith 10000
+
+ Once the inbox is created, users can create their own additional
+ mailboxes from a mail program. If Smith created a work mailbox and a
+ play mailbox, the full names of the mailboxes would be:
+
+ user.smith.work
+ user.smith.play
+
+ Access rights are discussed in detail in the cyradm(1) man pages. Note
+ that the administrator must grant herself create/delete access
+ explicitly before she can delete a mailbox:
+
+ setaclmailbox <mail_box> <admin_userid> c
+ deletemailbox <mail_box>
+
+ Once you have created mailboxes, your IMAP server installation is done.
+ You must then configure a mail interface, such as Pine or Mulberry, to
+ work with the IMAP server.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-auth
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-auth?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-auth (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-auth Sat Aug 26 02:00:13 2006
@@ -1,0 +1,171 @@
+Authenticating Users
+
+Introduction
+
+ The Cyrus IMAP Server uses the Cyrus SASL library to authenticate
+ users. Please refer to the Cyrus SASL documentation for specific
+ details on SASL. This section focuses specifically on the server
+ processes distributed with Cyrus IMAPd.
+
+Authentication Mechanisms
+
+ At this writing, the underlying Cyrus SASL library supports a variety
+ of SASL mechanisms, including CRAM-MD5, DIGEST-MD5, KERBEROS_V4, and
+ GSSAPI. The Cyrus IMAP, POP, and LMTP servers also support STARTTLS
+ using client-side certificates and the EXTERNAL authentication method.
+
+ GSSAPI is specific to Kerberos version 5. Additionally, STARTTLS client
+ side certificates have not been extensively tested.
+
+ When STARTTLS is enabled, the PLAIN SASL mechanism (if installed) also
+ becomes available. This is because one should not pass a clear text
+ password over the wire unless the connection is encrypted.
+
+ The IMAP protocol also supports a way for users to authenticate without
+ using SASL (the specification). This is via the 'LOGIN' command (not to
+ be confused by the LOGIN SASL mechanism). The IMAP LOGIN command (as
+ with PLAIN) will send your password in clear-text to the server. In
+ this case, the password is still verified through the Cyrus SASL
+ library, though no SASL mechanism actually performs a negotiation.
+
+ The POP server is capable of APOP authentication, but this requries
+ that Cyrus SASL be compiled --with-checkapop, and also that you are
+ using an auxprop backend for your password store (e.g. the sasldb
+ auxprop plugin).
+
+Authentication Recommendations
+
+ * If you are running a mail server on a single machine, we recommend
+ that you configure the system to use CRAM-MD5 or DIGEST-MD5. We
+ have not provided utilities for you to let users change their
+ passwords but either we or someone else might provide that feature.
+ * If you have more than one mail server, we recommend that you
+ configure the system to use GSSAPI and Kerberos5.
+ * If you have some other authentication mechanism that requires the
+ clear text password, you should use saslauthd.
+
+ saslauthd is something specific to the Cyrus SASL libraries. While
+ it is less generic than PAM, it is much simpler to configure. The
+ IMAP server simply sends a userid and a corresponding password down
+ a Unix domain pipe. Then, saslauthd takes that userid and password
+ and tries to authenticate with it -- using whatever authentication
+ you use -- and simply returns "yes" or "no" as to whether or not
+ the password was correct.
+
+ It is possible to configure saslauthd to check these passwords via
+ a PAM mechanism, /etc/passwd, or other possibilities.
+
+ PAM stands for pluggable authentication modules and the purpose is
+ to provide a common API which applications can use to obtain
+ authentication for a user. You can think of PAM as a complementary
+ layer under the SASL layer. See
+ http://www.kernel.org/pub/linux/libs/pam/FAQ for more information
+ on PAM. By using a PAM module, all the other applications on your
+ system can take advantage of it -- for example, login, xlock, etc.
+
+ Keep in mind that when you use PLAIN or LOGIN you should encrypt
+ the stream so a user's password can not be trivially sniffed off of
+ the network.
+
+Configuring Authentication
+
+ Cyrus SASL has a number of options that can be configured by the
+ application. To configure these via imapd.conf, simply prefix the
+ appropriate option name with sasl_ (e.g. pwcheck_method becomes
+ sasl_pwcheck_method).
+
+/etc/sasldb2
+
+ The easiest method for authenticating users is to use the libsasl
+ authentication database and create users using the "saslpasswd2"
+ utility. Set "sasl_pwcheck_method: auxprop", and be sure that the SASL
+ sasldb auxprop module is installed (it is, by default). Make sure Cyrus
+ can read "/etc/sasldb2":
+
+ chown cyrus /etc/sasldb2*
+
+Shadow Passwords
+
+ If you want to authenticate users from "/etc/shadow", things are
+ considerably more complicated, since the cyrus user cannot read the
+ shadow password file. Additionally, this will not allow you to use
+ shared secret mechanisms. To do this, it is necessary to configure
+ libsasl with saslauthd support, and set "sasl_pwcheck_method:
+ saslauthd". The SASL library will then make calls to an external
+ utility running as root to authenticate users.
+
+Kerberos
+
+Configuring Kerberos v4
+
+ Cyrus IMAP supports Kerberos v4 if the SASL library was compiled with
+ KERBEROS_V4 support.
+
+ You'll have to create a Kerberos v4 identity for the server and add the
+ server's key to the "srvtab" file. The file must be readable by the
+ cyrus user. The server's Kerberos identity is "imap.HOST at REALM", where
+ "HOST" is the first component of the machine's host name and "REALM" is
+ the machine's Kerberos realm.
+
+ 1. Here is a sample session, creating a srvtab file for the host named
+ "foobar":
+
+ ksrvutil -f /var/imap/srvtab add
+
+ Here is the information "ksrvutil" requests. Respond by filling in
+ values or by pressing RETURN. In this example, the host name is
+ "foobar" and the realm is "ANDREW.CMU.EDU".
+
+ Name: imap
+ Instance: foobar
+ Realm: ANDREW.CMU.EDU
+ Version number:
+ New principal: imap.foobar at ANDREW.CMU.EDU; version 0
+ Is this correct? (y,n) [y]
+ Password:
+ Verifying, please re-enter Password:
+ Key successfully added.
+ Would you like to add another key? (y,n) [y] n
+
+ 2.
+ If you plan to install Kerberized POP, create the Kerberos identity
+ "pop.HOST at REALM" and add the key to the "srvtab" file. Likewise, if
+ you plan on using LMTP over TCP, create the Kerberos identity
+ "lmtp.HOST at REALM" and add the key to the "srvtab" file.
+ 3.
+
+ Make the "srvtab" file owned by the cyrus user:
+
+ chown cyrus /var/imap/srvtab
+
+ 4. Add the option srvtab option to /etc/imapd.conf:
+
+ srvtab: /var/imap/srvtab
+
+ 5. Test using imtest -m KERBEROS_V4. imtest will attempt to authorize
+ as the current Unix user regardless of the current ticket's held.
+ Override this with the -u option.
+
+Troubleshooting Kerberos_V4 problems
+
+ Run the program "krbck" (found in the imap directory) as the cyrus user
+ on the IMAP server. This program will diagnose some common Kerberos v4
+ configuration errors.
+
+Configuring Kerberos v5
+
+ Cyrus IMAP supports Kerberos v5 if the SASL library was compiled with
+ GSSAPI support.
+
+ You'll have to create a Kerberos v5 identity for the server. Kerberos
+ v5 keys are generally stored in "/etc/krb5.keytab".
+
+ 1. Add the "imap/hostname" key using "kadmin".
+ 2. Let the cyrus user read "/etc/krb5.keytab": user:
+
+ chown cyrus /etc/krb5.keytab
+
+ 3. Test using imtest -m GSSAPI. imtest will attempt to authorize as
+ the current Unix user regardless of the current ticket's held.
+ Override this with the -u option.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-compile
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-compile?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-compile (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-compile Sat Aug 26 02:00:13 2006
@@ -1,0 +1,242 @@
+Compiling the IMAP Server
+
+ Once you have unpacked the files by extracting the tar archive, "cd" to
+ the "cyrus-imapd-NNNN" directory where NNNN is the version number. The
+ configuration files and various subdirectories are stored there. In the
+ directory that the configure file is in, type "./configure" to
+ configure the software. Please continue to read this document as there
+ are switches to ./configure that may apply to you.
+
+configure Overview
+
+ The "configure" shell script attempts to guess correct values for
+ various system-dependent variables used during compilation. It uses
+ those values to create a "Makefile" in each directory of the package.
+ Finally, it creates a shell script "config.status" that you can run in
+ the future to recreate the current configuration, a file "config.cache"
+ that saves the results of its tests to speed up reconfiguring, and a
+ file "config.log" containing compiler output (useful mainly for
+ debugging "configure").
+
+ Running "configure" takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ You can compile the package in a different directory from the one
+ containing the source code. Doing so allows you to compile it on more
+ than one kind of computer at the same time. To do this, you must use a
+ version of "make" that supports the "VPATH" variable, such as GNU
+ "make". "cd" to the directory where you want the object files and
+ executables to go and run the "configure" script. "configure"
+ automatically checks for the source code in the directory that
+ "configure" is in and in "..".
+
+ By default, "make install" will install files (other than
+ server-specific programs) in "/usr/local/bin", "/usr/local/man", etc.
+ You can specify an installation prefix other than "/usr/local" by
+ giving "configure" the option "--prefix=PATH".
+
+ You can specify separate installation prefixes for
+ architecture-specific files and architecture-independent files. If you
+ give "configure" the option "--exec-prefix=PATH", the package will use
+ PATH as the prefix for installing programs and libraries. Documentation
+ and other data files will still use the regular prefix.
+
+ By default, "make install" will install the server-specific programs in
+ "/usr/cyrus/bin". You can specify a server-specific installation prefix
+ other than "/usr/cyrus" by giving "configure" the option
+ "--with-cyrus-prefix=PATH".
+
+Options to configure
+
+ Here are a list of switches that can be used with "configure".
+
+ --help Print a summary of the options to "configure", and exit.
+
+ --with-auth=METHOD
+ Specifies the authorization (group membership) module to use.
+ Currently implemented authorization modules are:
+
+ unix Unix /etc/passwd and /etc/group file
+ krb Kerberos principals (requires Kerberos libraries).
+ Optionally, specify where to find Kerberos v4 with
+ "--with-krb=DIR" IMPORTANT: The Kerberos v4 support
+ requires the DES library. Some vendor distributions of
+ Kerberos, including the one with Solaris, do not have
+ this support and cannot be used.
+ krb_pts Kerberos principals with AFS PTserver groups (requires
+ Kerberos and AFS libraries). Optionally, specify where
+ the AFS libraries are found with "--with-afs=PATH".
+ Also requires krb support as above.
+
+ Any method of authenticating with SASL can be used with any
+ authorization module.
+
+ --with-krb=PATH
+ Specifies where to find the Kerberos library.
+
+ --with-com_err=PATH
+ Specifies where to find the com_err environment.
+
+ --with-cyrus-group=USER
+ Specifies the group used for installing setguid programs. By
+ default, configure uses "mail".
+
+ --with-cyrus-prefix=PATH
+ Change the location of the server software. By default, the
+ cyrus-prefix is /usr/cyrus.
+
+ --with-cyrus-user=USER
+ Specifies the userid that the Cyrus IMAP server will run as. By
+ default, configure uses "cyrus".
+
+ --with-dbdir=PATH
+ Specifies where to find the Berkeley DB library.
+
+ --with-duplicate-db=DB
+ Specifies which database backend to use for the duplicate
+ delivery database. By default, configure uses
+ "berkeley_nosync".
+
+ --with-mboxlist-db=DB
+ Specifies which database backend to use for the mailbox list.
+ By default, configure uses "berkeley".
+
+ --with-seen-db=DB
+ Specifies which database backend to use for the seen state. By
+ default, configure uses "flat".
+
+ --with-subs-db=DB
+ Specifies which database backend to use for the subscriptions
+ list. By default, configure uses "flat".
+
+ --with-tls-db=DB
+ Specifies which database backend to use for the TLS cache. By
+ default, configure uses "berkeley_nosync".
+
+ --with-idle=METHOD
+ Specifies the IMAP IDLE method to use. Currently implemented
+ IDLE methods are:
+
+ idled Use the IDLE daemon. The IDLE daemon listens on a UNIX
+ socket for messages from lmtpd/imapd/pop3d that a
+ mailbox has been updated. The daemon then signals those
+ (if any) imapd that are idling on the mailbox to check
+ for the changes.
+ poll Periodically poll the mailbox for changes.
+ no Disable IMAP IDLE.
+
+ By default, configure uses "poll".
+
+ --with-lock=METHOD
+ Specifies the locking method to use. Currently implemented
+ locking methods are:
+
+ flock flock() locking
+ fcntl fcntl() locking
+
+ By default, configure uses "fcntl" if the "fcntl()" function
+ exists, "flock" otherwise.
+
+ --with-openssl=PATH
+ Specifies where to find the OpenSSL library.
+
+ --with-egd-socket=FILE
+ Specifies which socket to use to connect to the Entropy
+ Gathering Daemon.
+
+ --with-perl=PATH
+ Specifies where to find the Perl binary (full path, including
+ name of binary).
+
+ --with-sasl=PATH
+ Specifies the path to the directories containing the library
+ (.../lib) and include (.../include) files for libsasl.
+
+ --with-statedir=PATH
+ Specifies the directory used for communicating with various
+ daemons. By default, configure uses "/var".
+
+ --with-libwrap=PATH
+ Specifies where to find the TCP wrappers library.
+
+ --with-ucdsnmp=PATH
+ Specifies where to find the SNMP library.
+
+ --with-zephyr=PATH
+ Specifies where to find the Zephyr library (for notifyd).
+
+ --enable-listext
+ Enables support for LISTEXT extension.
+
+ --enable-murder
+ Enables support for IMAP Murder.
+
+ --enable-netscapehack
+ Enables support for X-NETSCAPE extension (administration URLs).
+
+ --disable-sieve
+ By default, Sieve support is enabled. Use --disable-sieve to
+ disable compiling the Sieve library and to disable all Sieve
+ support.
+
+ --disable-cyradm
+ Do not compile the cyradm administrative client.
+
+ --disable-server
+ Do not compile the IMAP server programs.
+
+ Run configure --help for further configuration options.
+
+ Some systems require unusual options for compilation or linking that
+ the "configure" script does not know about. You can give "configure"
+ initial values for variables by setting them in the environment. Using
+ a Bourne-compatible shell, you can do that on the command line like
+ this:
+
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+ Or on systems that have the "env" program, you can do it like this:
+
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+ The "make" variables that you might want to override with environment
+ variables when running "configure" are:
+
+ CC C compiler program.
+ Default is "cc", or "gcc" if "gcc" is in your PATH.
+ (For "CC", any value given in the environment overrides the
+ value that "configure" would choose.)
+ CFLAGS Debugging and optimization options for the C compiler.
+ CPPFLAGS
+ Header file search directory ("-IDIR") and any other
+ miscellaneous options for the C preprocessor and compiler. If
+ it is not set in the environment when "configure" runs, the
+ default value is empty.
+ LDFLAGS Stripping ("-s") and any other miscellaneous options for the
+ linker. If it is not set in the environment when "configure"
+ runs, the default value is empty.
+ DEFS Configuration options, in the form "-Dfoo -Dbar ..."
+ LIBS Libraries to link with, in the form "-lfoo -lbar ..."
+ (For "DEFS" and "LIBS", any value given in the environment is
+ added to the value that "configure" chooses.)
+
+ If you need to do unusual things to compile the package, we encourage
+ you to figure out how "configure" could check whether to do them. After
+ doing so, please send us a patch! Instructions for doing so can be
+ found on the feedback page.
+
+ The file "configure.in" is used as a template to create "configure" by
+ a program called "autoconf". You will only need it if you want to
+ regenerate "configure" using a newer version of "autoconf".
+
+ Once you have successfully run "configure", execute the following
+ commands:
+
+ make depend
+ make all CFLAGS=-O
+
+ If you want, you can override the "make" variables CFLAGS and LDFLAGS
+ by entering the following:
+
+ make all CFLAGS=-O2 LDFLAGS=-s
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-configure
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-configure?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-configure (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-configure Sat Aug 26 02:00:13 2006
@@ -1,0 +1,447 @@
+Installing and configuring the IMAP Server
+
+ This section describes the shell scripts to run and the configuration
+ files to modify once "configure" and "make" have run.
+
+ 1. Create a user and group for the Cyrus subsystem. The examples in
+ this document assume a user of "cyrus" and a group of "mail",
+ though any user and group name can be used. If a user other than
+ "cyrus" is to be used, it must have been previously specified in
+ the "--with-cyrus-user=" option to "configure". If a group other
+ than "mail" is to be used, it must have been previously specified
+ in the "--with-cyrus-group=" option to "configure".
+
+ 2. After you've logged in as "root", install the cyrus software.
+
+ make install
+
+ Be sure that the server programs ended up in the directory
+ specified by "--with-cyrus-prefix" (by default, "/usr/cyrus/bin").
+
+ 3. The Cyrus IMAP server uses the 4.3BSD syslog that separates
+ messages into both levels and categories. Invoke "man syslog" to
+ see if "openlog()" takes three arguments. If it does not, replace
+ the system "syslogd" and "syslog.conf" with the files provided in
+ the "syslog" directory.
+
+ mv syslogd /etc/syslogd
+ mv syslog.conf /etc/syslog.conf
+
+ If you do not copy the "syslog/syslog.conf" file to the "/etc"
+ directory, be sure to add support for "local6.debug". The file
+ should include a line like:
+
+ local6.debug /var/log/imapd.log
+
+ You probably also want to log SASL messages with a line like:
+
+ auth.debug /var/log/auth.log
+
+ After installation and testing, you probably want to change the
+ ".debug" component to something a little less verbose. Create the
+ log files:
+
+ touch /var/log/imapd.log /var/log/auth.log
+
+ 4. Create the file "/etc/imapd.conf". Here is a sample "imapd.conf"
+ with a minimal number of values defined:
+
+ configdirectory: /var/imap
+ partition-default: /var/spool/imap
+ admins: curtj abell
+ sasl_pwcheck_method: saslauthd
+
+ For a description of all the fields in this file, see the
+ imapd.conf(5) man page. (Note that this file also exports values to
+ libsasl, the most important of them the pwcheck_method. In this
+ example, users are authenticated via the saslauthd daemon, which
+ can be run in a number of different ways.)
+
+ READ THE imapd.conf(5) MAN PAGE. There are options in there that
+ you will want to know about and default behavior that you may not
+ like.
+
+ Note that everyday users should not be administrators. Admins have
+ powers not granted to regular users and while the server allows
+ them to receive mail, some problems will occur if admins are used
+ as regular users. You also should not read mail as an
+ administrator. You should have separate accounts for reading mail
+ and administrating. This is especially true if using the
+ altnamespace option, because admins are always presented with the
+ standard (internal) namespace.
+
+ 5. Create the configuration directory specified by the
+ "configdirectory" option in "imapd.conf." The configuration
+ directory is similar in concept to the "/usr/lib/news" directory.
+ It stores information about the IMAP server as a whole.
+
+ This document uses the configuration directory "/var/imap" in its
+ examples. This directory should be owned by the cyrus user and
+ group and should not permit access to other users.
+
+ cd /var
+ mkdir imap
+ chown cyrus imap
+ chgrp mail imap
+ chmod 750 imap
+
+ 6. Create the default partition directories specified in the
+ "/etc/imapd.conf" file.
+
+ This document uses a default partition directory of
+ "/var/spool/imap" in the following example:
+
+ cd /var/spool
+ mkdir imap
+ chown cyrus imap
+ chgrp mail imap
+ chmod 750 imap
+
+ The partition directory is similar in concept to /var/spool/news.
+ It is where the mailboxes are stored. Unlike most netnews systems,
+ Cyrus allows you to have more than one partition.
+ 7. If you wish to use Sieve, and you didn't configure deliver to look
+ in home directories (see the imapd.conf man page), create the Sieve
+ directory:
+
+ cd /usr
+ mkdir sieve
+ chown cyrus sieve
+ chgrp mail sieve
+ chmod 750 sieve
+
+ 8. Change to the Cyrus user and use the tool "tools/mkimap" to create
+ the rest of the directories (subdirectories of the directories you
+ just created).
+
+ su cyrus
+ tools/mkimap
+ exit
+
+
+ If Perl is not available, it should be easy (but time consuming) to
+ create these directories by hand.
+
+ 9. LINUX SYSTEMS USING EXT2FS ONLY: Set the user, quota, and partition
+ directories to update synchronously. Failure to do this may lead to
+ data corruption and/or loss of mail after a system crash.
+ Unfortunately, doing so may result in a serious performance hit. If
+ you are using a newer filesystem than ext2fs on Linux, this step
+ should not be necessary. (Running ext3 in any mode is safe.)
+
+ cd /var/imap
+ chattr +S user quota user/* quota/*
+ chattr +S /var/spool/imap /var/spool/imap/*
+
+ Also set the queue directory of the mail daemon to update
+ synchronously. The following example is for sendmail:
+
+ chattr +S /var/spool/mqueue
+
+ 10. To enable STARTTLS support, see how to configure OpenSSL below.
+
+ 11. Add the following lines to the "/etc/services" file if they aren't
+ already there.
+
+ pop3 110/tcp
+ nntp 119/tcp
+ imap 143/tcp
+ imsp 406/tcp
+ nntps 563/tcp
+ acap 674/tcp
+ imaps 993/tcp
+ pop3s 995/tcp
+ kpop 1109/tcp
+ sieve 2000/tcp
+ lmtp 2003/tcp
+ fud 4201/udp
+
+ 12. Remove "/etc/[x]inetd.conf" entries. Any imap, imaps, pop3, pop3s,
+ kpop, lmtp and sieve lines need to be removed from
+ /etc/[x]inetd.conf and [x]inetd needs to be restarted.
+
+Configuring the Master Process
+
+ 1. Choose a configuration from the master/conf directory:
+
+ small.conf
+ bare-bones server supporting IMAP and POP
+ normal.conf
+ server supporting IMAP, POP, the SSL wrapped versions, and
+ the Sieve script management protocol
+ prefork.conf
+ The same configuration as above, but with some preforked
+ processes for faster processing.
+ backend-cmu.conf
+ Our configuration (for Murder Backend / typical IMAP
+ servers)
+ frontend-cmu.conf
+ Our configuration (for Murder Frontend servers)
+
+ To use normal.conf, do:
+
+ cp master/conf/normal.conf /etc/cyrus.conf
+
+ Optionally, you can edit /etc/cyrus.conf to disable or enabling
+ certain services, or to tune the number of preforked copies. Be
+ sure not to remove the entries that are labeled required.
+
+ 2. Arrange to start "/usr/cyrus/bin/master" as root when the system
+ starts. It will bind some ports and then give up it's root
+ privileges. Until your system reboots, you can start the master
+ process by hand:
+
+ /usr/cyrus/bin/master &
+
+ 3. Monitor the progress of the master process by examining the
+ imapd.log file. It should never exit by itself, but you can shut
+ down the mail system by sending it a signal with kill.
+
+Configuring the Mail Transfer Agent
+
+ In order to deliver mail to the Cyrus system, you'll have to configure
+ your MTA (Sendmail, Postfix, Exim, etc) to use LMTP.
+
+Configuring Sendmail
+
+ Generate a sendmail configuration file which delivers local mail to the
+ IMAP server. See the file cf/README in the Sendmail distribution for
+ information on how to create a complete configuration file. This file
+ also lists variables that can be used to customize the mailer
+ definitions mentioned below.
+
+ The following configurations assume that you are using the lmtpunix
+ service from one of the sample cyrus.conf files discussed above.
+
+ * For Sendmail 8.12.4 and higher, use the cyrusv2 mailer definition
+ in the Sendmail distribution:
+
+ define(`confLOCAL_MAILER', `cyrusv2')
+ MAILER(`cyrusv2')
+
+ If you wish to change the name of the UNIX socket or switch to TCP,
+ define CYRUSV2_MAILER_ARGS appropriately as described in cf/README.
+
+ * For Sendmail 8.10 - 8.12.3, use the cyrusv2.mc file as a template
+ to create a Sendmail configuration file.
+
+ * For Sendmail 8.9.x and earlier, use the cyrus mailer definition in
+ the Sendmail distribution:
+
+ define(`confLOCAL_MAILER', `cyrus')
+ MAILER(`cyrus')
+
+ Edit /etc/group and add user "daemon" to the "mail" group. This
+ will permit sendmail to run the "deliver" (LMTP client) program to
+ deliver mail to the IMAP server.
+
+ Cyrus also includes a socket map daemon smmapd which can be used by
+ Sendmail 8.13 and higher (a patch for 8.12 is available) to verify at
+ RCPT TO time that a message can be delivered to the particular mailbox.
+ To use this daemon, add smmapd as a service in cyrus.conf and configure
+ Sendmail accordingly.
+
+Configuring Postfix
+
+ The Postfix source distribution comes with the file
+ "README_FILES/LMTP_README". Even if you are using a binary distribution
+ of Postfix, it would be well worth your while to download the full
+ Postfix source. Not only will you get the above file, but numerous
+ other "readme" files and sample configuration files.
+
+ One thing you need to watch out for is the UID and GID of the Postfix
+ software. As it states in the Postfix "INSTALL" document, you must
+ create a new account that does not share its UID and GID with any other
+ user account. This is for security reasons. If you installed Postfix
+ with a GID of "mail", you will need to select a different GID for
+ Cyrus. See the Cyrus configure options "--with-cyrus-user" and
+ "--with-cyrus-group". (This was more crucial when the use of Cyrus'
+ "deliver" was more prevalent, but it is still a good idea to follow
+ this policy.)
+
+ Another thing to note is the location of your "sendmail" command. On
+ some platforms this will be "/usr/sbin/sendmail", on others,
+ "/usr/lib/sendmail". Cyrus will need to know where this command is. See
+ Installing Sieve for more details.
+
+ Assuming that you are using the lmtpunix service from one of the sample
+ cyrus.conf files discussed above, the Postfix configuration file
+ "/etc/postfix/main.cf" should have the following line:
+
+ mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
+
+ Naturally, both the Postfix UID and the Cyrus UID need to be able to
+ access the specified socket file.
+
+ Starting with Postfix snapshot-20010222, you can improve the efficiency
+ of LMTP delivery via the "mailbox_transport" by putting the following
+ entries in "/etc/postfix/main.cf":
+
+ local_destination_recipient_limit = 300
+ local_destination_concurrency_limit = 5
+
+ Of course you should adjust these settings as appropriate for the
+ capacity of the hardware you are using. The recipient limit setting can
+ be used to take advantage of the single instance message store
+ capability of Cyrus. The concurrency limit can be used to control how
+ many simultaneous LMTP sessions will be permitted to the Cyrus message
+ store.
+
+ Additional examples are included in the Postfix file
+ "README_FILES/LMTP_README".
+
+Configuring Exim 4
+
+ Generate an Exim configuration file which delivers local mail to the
+ IMAP server. See the Exim documentation for information on how to
+ create a complete configuration file.
+
+ Cyrus is designed to be used as a black-box server -- there are usually
+ no local user accounts. As a result, you must define the following
+ "router":
+
+ localuser:
+ driver = accept
+ transport = local_delivery
+
+ The following "transports" assume that you are using either the
+ lmtpunix or lmtp service from one of the sample cyrus.conf files
+ discussed above.
+
+ * Using lmtpunix (UNIX socket):
+
+ local_delivery:
+ driver = lmtp
+ command = "/usr/cyrus/bin/deliver -l"
+ batch_max = 20
+ user = cyrus
+
+ * Using lmtp (TCP socket -- Exim and Cyrus on same host):
+
+ local_delivery:
+ driver = smtp
+ protocol = lmtp
+ hosts = localhost
+ allow_localhost
+
+ For more advanced configurations (such as address verification, etc),
+ consult the Exim documentation and sample configurations.
+
+Exporting Netnews via IMAP
+
+ If you wish to use export Netnews via IMAP, consult
+ install-netnews.html.
+
+SSL, TLS, and OpenSSL
+
+ Transport Layer Security (TLS), is a standardized version of the Secure
+ Sockets Layer (SSL v3) standard. IMAP can make use of two different
+ versions of TLS/SSL: STARTTLS and an SSL wrapped session.
+
+ In STARTTLS, a client connects to the IMAP port as normal and then
+ issues the STARTTLS command, which begins a TLS negotiation. This is
+ currently supported by the Cyrus IMAP server when it is compiled with
+ OpenSSL.
+
+ The alternative, a SSL wrapped connection, involves the client
+ connected to a seperate port ("imaps") and negotiating a SSL session
+ before starting the IMAP protocol. Again, this is supported natively by
+ the Cyrus IMAP server when it is compiled with OpenSSL.
+
+ Both TLS and SSL require a server key and a certificate. Optionally, in
+ addition to establishing a secure connection, TLS can authenticate the
+ client.
+
+Configuring Cyrus with OpenSSL
+
+ 1.
+ OpenSSL requires the certificate and key in PEM format. You can
+ create the server's private key and certificate yourself using
+ OpenSSL. Here, we create a self-signed key for the machine "
+ foobar.andrew.cmu.edu" and put both the certificate and key in the
+ file "/var/imap/server.pem".
+
+ Please do not blindly enter in the information to OpenSSL below.
+ Instead, enter the appropriate information for your organization
+ (i.e. NOT Carnegie Mellon University for the Organization name,
+ etc.).
+
+ openssl req -new -x509 -nodes -out /var/imap/server.pem -keyout /var/imap/server.pem -days 365
+ Using configuration from /usr/local/lib/openssl/openssl.cnf
+ Generating a 1024 bit RSA private key
+ .............+++++
+ ......................+++++
+ writing new private key to '/var/imap/server.pem'
+ -----
+ You are about to be asked to enter information that will be incorporated
+ into your certificate request.
+ What you are about to enter is what is called a Distinguished Name or a DN.
+ There are quite a few fields but you can leave some blank
+ For some fields there will be a default value,
+ If you enter '.', the field will be left blank.
+ -----
+ Country Name (2 letter code) [AU]:US
+ State or Province Name (full name) [Some-State]:Pennsylvania
+ Locality Name (eg, city) []:Pittsburgh
+ Organization Name (eg, company) [Internet Widgits Pty Ltd]:Carnegie Mellon University
+ Organizational Unit Name (eg, section) []:Andrew Systems Group
+ Common Name (eg, YOUR name) []:foobar.andrew.cmu.edu
+ Email Address []:
+
+ 2. Make sure to make key file(s) readable by the Cyrus user. For
+ example: chown cyrus /var/imap/server.pem
+ 3. Add the following to /etc/imapd.conf to tell the server where to
+ find the certificate and key file (used for ALL services):
+
+ tls_cert_file: /var/imap/server.pem
+ tls_key_file: /var/imap/server.pem
+
+ Optionally, you can use separate certificates and key files for
+ each service:
+
+ [servicename]_tls_cert_file: /var/imap/imap-server.pem
+ [servicename]_tls_key_file: /var/imap/imap-server.pem
+
+ "servicename" here refers to the name of the service as specified
+ in cyrus.conf. It is not necessaraly the name of the binary.
+
+ This is useful if you want to use different hostnames for each
+ service (e.g. via virtual host interfaces or DNS CNAMEs). In the
+ absence of any of the service specific options, the value of the
+ global option is used. A value of disabled for the certificate or
+ key file for a particular service will disable SSL/TLS for that
+ service.
+
+ If you have a Certificate Authority (CA), you may wish to generate
+ a certificate request and send it to be signed by your CA.
+
+ By default, Cyrus will cache SSL/TLS sessions for reuse for up to
+ 24 hours. By adjusting the value of the tls_session_timeout option
+ in imapd.conf, the session caching can be disabled (0) or the
+ expiration period shortened.
+
+ 4. You can test STARTTLS by using imtest:
+
+ imtest -t "" foobar.andrew.cmu.edu
+
+Client-side certificates
+
+ Client certificates are somewhat harder to configure than server
+ certificates. You'll need a CA (certificate authority) and need to
+ generate client certificates signed by that CA. STARTTLS in Sendmail
+ and other MTAs have similiar problems, so Claus Assman's page is a good
+ reference.
+
+ You can use the self-signed certificate generated above as a CA for
+ client certificates. To do this, try the following:
+
+ TODO: write me!
+
+ Unfortunately, there's no standard on how to convert the client's
+ authenticate DN (distinguished name) to a SASL authentication name.
+
+Alternate Namespace and UNIX Hierarchy Convention
+
+ If you wish to use the alternate namespace and/or the UNIX hierarchy
+ convention, consult altnamespace.html.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-murder
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-murder?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-murder (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-murder Sat Aug 26 02:00:13 2006
@@ -1,0 +1,345 @@
+Installing The Cyrus Murder
+
+ Note that Cyrus Murder is still relatively young in the grand scheme of
+ things, and if you choose to deploy you are doing so at your own risk.
+ Many of the failure modes can be difficult to track without a detailed
+ understanding of the mupdate protocol and IMAP in general, and thus
+ even considering a deployment is not for the faint at heart.
+
+ Sites which think they need the Murder functionality but do not need a
+ uniform namespace (no shared mailboxes) should consider other IMAP
+ proxy solutions.
+
+ At the same time, we are using it successfully in production at
+ Carnegie Mellon.
+
+Introduction & Assumptions
+
+ This document is intended to be a guide to the configuration of a Cyrus
+ IMAP Aggregator, aka Cyrus Murder. It is recommended that you review
+ this document to be familliar with the concepts at work. This document
+ is a work in progress and is at this point incomplete.
+
+ This document assumes that you have successfully been able to setup
+ atleast one Cyrus IMAP server. This server will become your first
+ backend server. It also assumes that you are familliar with the
+ administration and day to day operations of the Cyrus IMAP server and
+ the SASL authentication library. If you feel uncomfortable with this,
+ please refer to the rest of the documentation first.
+
+ There is a diagram that shows the interactions of the various
+ components of the Cyrus Murder which may be helpful in understanding
+ the "big picture".
+
+Installation
+
+ You will need to build Cyrus IMAPd with the --enable-murder configure
+ option. This builds the proxyds and the associated utilities.
+
+Requirements
+
+ * Atleast one Cyrus IMAP server. If there are more than one, their
+ name spaces must not conflict. That is, all the mailbox names must
+ be unique (or in different namespaces)
+ * Atleast one machine that will become the first Frontend Server.
+ * One machine to become the MUPDATE master server. This can be the
+ same as one of your frontend servers.
+
+Configuring the MUPDATE Master
+
+ The mupdate master server needs to be running the mupdate service in
+ master mode. Note that you can have the MUPDATE master be one of your
+ frontend machines, just do not configure a slave mupdate process on
+ this machine.
+
+ To configure an mupdate master, you will want a cyrus.conf that
+ includes a line similar to the following in the SERVICES section:
+
+ mupdate cmd="/usr/cyrus/bin/mupdate -m" listen=3905 prefork=1
+
+ Note the "-m" option to tell mupdate that it should start in master
+ mode.
+
+ You will also need to configure atleast a skeleton imapd.conf that
+ defines the configdirectory, a bogus partition-default and the admins
+ that can authenticate to the server. Note that slave mupdate servers as
+ well as the backend servers will need to be able to authenticate as
+ admins on the master. Here is a very simple imapd.conf for a master
+ server:
+
+ configdirectory: /imap/conf
+ partition-default: /tmp
+
+ admins: mupdateslave1 backend1
+
+ You will also need to configure SASL to properly allow authentication
+ in your enviornment.
+
+Setting up the backends to push changes to the MUPDATE Master
+
+ On the backends, configuration to be a part of a murder is easy. You
+ just need to configure the backend to be a part of the murder. To do
+ this, set the mupdate_server option in imapd.conf. Depending on what
+ authentication mechanisms you are using, you may also want to set some
+ or all of the following:
+
+ * mupdate_username
+ * mupdate_authname
+ * mupdate_realm
+ * mupdate_password
+
+ Once these settings are successfully made, any mailbox operation on the
+ backend will be sent to the mupdate master for confirmation and entry
+ into the mupdate database.
+
+ You will also want to configure atleast one user/group using the
+ proxyservers imapd.conf option. This user should not be an
+ administrator, since this means that anyone who can get ahold of your
+ proxy servers now has full administrative control on your backend.
+ Example:
+
+ admins: cyrus
+ proxyservers: murder
+
+ Keep in mind that you will need to create the proxy user(s) and be sure
+ that they can authenticate to the backend as well.
+
+Importing the database from the backend
+
+ Importing the current mailboxes database is easy, as there is a
+ ctl_mboxlist option to do so. To do the first synchronization, simply
+ change to the cyrus user, and issue a ctl_mboxlist -m.
+
+ Note that you may wish to issue a ctl_mboxlist -mw first to be sure you
+ understand all the operations that this command will perform, since it
+ does require that all mailboxes are unique in the murder namespace. If
+ everything is configured properly, the mailbox database of the current
+ host will dump to the mupdate master. If there are problems, the most
+ likely cause is a misconfiguration of the authentication settings, or
+ that mupdate might not be running on the master. Using mupdatetest may
+ be helpful in this case (it establishes an authenticated connection to
+ the mupdate server, if it can).
+
+ It is also useful to have the backends automatically resync the state
+ of their local mailboxes database with the master on start up. You can
+ configure this by adding the following to the START section of
+ cyrus.conf on the backends:
+
+ mupdatepush cmd="ctl_mboxlist -m"
+
+ This will perform synchronization with the mupdate master each time the
+ backend restarts, bringing the mupdate database up to date with the
+ contents of the backend (and performing ACTIVATE and DELETES as needed
+ to do so).
+
+ Warning: If somehow a mailbox exists on two (or more) backend servers,
+ each time one of them synchronizes its database that backend server
+ will become authoritative. Though this should not happen during normal
+ operation of the murder (because of the consistancy guarantees of the
+ MUPDATE protocol, and the fact that mailbox operations are denied if
+ the mupdate master is down), it is possible when first creating the
+ mupdate database or when bringing a new backend server into the murder.
+
+Configuring the frontends
+
+ Configuring the frontends is a two step process. First, you want to set
+ mupdate_server (and friends) as you did for the backends above.
+ However, because the frontends only talk to the mupdate master via a
+ slave running on the local machine, you will also need to set up a
+ slave on the same machine, in the SERVICES section of cyrus.conf, like
+ so:
+
+ # mupdate database service - must prefork atleast 1
+ mupdate cmd="mupdate" listen=3905 prefork=1
+
+ Note that as this is a threaded service, you must prefork atleast 1 of
+ them so that the database can be synchronized at startup. Otherwise,
+ the service will not start running until after you recieve an mupdate
+ client connection to the slave (which is not a recommended
+ configuration at this point).
+
+ You will also want to change all of your imapd entries to be proxyd,
+ and all of your lmtpd entries to be lmtpproxyd. That is, you will
+ probably have a SERVICES section that looks more like this now:
+
+ mupdate cmd="/usr/cyrus/bin/mupdate" listen=3905 prefork=1
+
+ imap cmd="proxyd" listen="imap" prefork=5
+ imaps cmd="proxyd -s" listen="imaps" prefork=1
+ pop3 cmd="pop3d" listen="pop3" prefork=0
+ pop3s cmd="pop3d -s" listen="pop3s" prefork=0
+ kpop cmd="pop3d -k" listen="kpop" prefork=0
+ nntp cmd="nntpd" listen="nntp" prefork=0
+ nntps cmd="nntpd -s" listen="nntps" prefork=0
+ sieve cmd="timsieved" listen="sieve" prefork=0
+ lmtp cmd="lmtpproxyd" listen="/var/imap/socket/lmtp" prefork=0
+
+ Note that timsieved does not need a proxy daemon, the managesieve
+ protocol deals with the murder with referrals to the backends
+ internally.
+
+ Additionally, you will need entries in imapd.conf to indicate the proxy
+ auth name and passwords (if you are using a SASL mechanism that
+ requires them) to the backends, for example, if your backends are
+ mail1.andrew.cmu.edu and mail2.andrew.cmu.edu with passwords of foo and
+ bar, and an auth name of murder:
+
+ mail1_password: foo
+ mail2_password: bar
+ proxy_authname: murder
+
+ If your SASL mechanism does not require authnames or passwords (e.g.
+ KERBEROS_V4), then this is not required. Note that we used the same
+ authname as the configured in the proxyservers line in the backend's
+ imapd.conf above.
+
+ When you start master on the frontend, a local mailboxes database
+ should automatically synchronize itself with the contents of the
+ mupdate master, and you should be ready to go. Your clients should
+ connect to the frontends, and the frontends will proxy or refer as
+ applicable to the blackend servers.
+
+Additional backend configuration
+
+ If your authentication system requires usernames, passwords, etc, to
+ authenticate (e.g. it isn't Kerberos), then you will also need to
+ specify proxy_authname (and friends) in the backend imapd.confs as
+ well. This is so that the backends can authenticate to eachother to
+ facilitate maibox moves. (Backend machines will need to be full
+ admins).
+
+Delivering mail
+
+ To deliver mail to your Murder, configure your MTA just as you did
+ before, but instead of connecting directly to lmtpd, it should connect
+ to lmtpproxyd. You can connect to the lmtpproxyd running on the
+ frontend machines, or you can install master and lmtpproxyd on your
+ SMTP servers.
+
+Administration
+
+Keeping the database synced
+
+ Consistancy in the database is maintained by pushing the current status
+ of the backends to the master, and having the frontends stay up to date
+ with the master's database. Since the frontends resync themselves
+ entirely when they startup, downtime should not at all be a problem.
+ (While they are up they should be continously recieving database
+ updates, as well as when they lose connection to the master, they will
+ try to reconnect and resync their database upon reconnection)
+
+ Provided that the namespace of the backend servers is kept discrete
+ (with no mailboxes existing on the same server), it is not a big deal
+ to resync the mupdate master using ctl_mboxlist -m. If two servers do
+ have the same mailbox, this will need to be resolved before database
+ consistancy can be guranteed.
+
+Moving Mailboxes between backends
+
+ There is currently no 100% foolproof way to do this, however, if you
+ issue a rename command to a frontend (as you would to move a mailbox
+ between partitions), and replace the partition name with the name of
+ the new backend, it will move the mailbox to the indicated backend. You
+ can also use the format backend.domain.com!partition to move to a
+ specific partition (otherwise the default partition will be used). In
+ cyradm, this looks like:
+
+ cyrus.andrew.cmu.edu> rename user.bcyrus user.bcyrus mail2.andrew.cmu.edu!u2
+
+ Note that since seen state is stored per-user, it is possible that when
+ moving a shared mailbox users will have strange effects. The general
+ rule is that moving an INBOX will move the entire user (including all
+ sub-mailboxes to the INBOX, and seen state, and subscriptions, and
+ sieve scripts, etc). The seen state is merged with the seen state on
+ the new backend, so that no data is lost (seen state is also the only
+ part left behind on the source backend). In the case of any other
+ mailbox, however, only that individual mailbox is moved. If it is a
+ quota root, the new quota root is instated on the new server, but
+ otherwise quotas can appear to be violated, since each backend only
+ takes care of its own quota.
+
+ In general, its better to leave trees of mailboxes on the same server,
+ and not move submailboxes of inboxes between servers.
+
+Adding additional backend servers
+
+ This is very easy to do, simply configure an empty backend server and
+ set its mupdate_server parameter to point at the mupdate master. Then,
+ issue mailbox creates to it as you would any other backend server.
+
+Backups
+
+ xxx, need to write stuff. You don't need to really backup the data on
+ the mupdate master or slaves, since this data can all be generated
+ directly from the backends quite easily.
+
+Gotchyas
+
+ * Clients dealing with a pool of frontend servers - Some clients may
+ not be terribly efficient caching connections to a pool of imap
+ servers, this isn't a problem, per se, but it may mean that you
+ will see many more authentications than you are used to.
+
+ * Kerberos issues - If you are using kerberos authentication, you
+ will want to ensure that all your machines are keyed properly,
+ as we have seen problems with different clients trying to
+ authenticate to different services (e.g. imap.imap-pool instead
+ of imap.pool-frontend-1), so test the clients in use in your
+ enviornment and be sure that they work with whatever keying
+ scheme you use.
+
+ * Clients dealing with referrals - Some clients (we've had particuar
+ trouble with pine, though most of these issues have now been
+ resolved and new versions should be OK (that is, pine > 4.44), but
+ as referrals have not been extensively used by any IMAP server
+ until now, referrals are very likely to not work correctly or have
+ surprising effects.
+ * Clients dealing with getting a NO on LSUB commands - Some clients
+ (Outlook, for example) may behave poorly if an LSUB command returns
+ a NO, which may be the case if the backend server with the user's
+ inbox is down. We have, for example, seen this result in the
+ deletion of the disconnected message cache.
+ * Behavior of cyradm / some mailbox operations - The behavior of some
+ administrative commands might be slightly unexpected. For example,
+ you can only issue a SETQUOTA to a frontend server if the entire
+ mailbox tree underneath where you are setting the quota exists on
+ the same backend server, otherwise you will need to connect
+ directly to the backend servers to perform the needed changes.
+ Similarally, mailboxes will be created on the same backend server
+ that their parent is in. In order to create them on a different
+ server (or to create a new top level mailbox) you will need to
+ connect directly to the desired backend server.
+ * Subscriptions - If users want subscribe to a mailbox other than on
+ their backend home server, they won't be able to, unless you set
+ "allowallsubscribe: t" in the backend imapd.confs. This essentially
+ lets any string be subscribed to successfully.
+ * Restarting the mupdate master - Because ctl_cyrusdb -r clears
+ reservations on mailbox, if you restart the mupdate master (and run
+ recovery), then this could (we suspect, very rarely) lead to
+ inconsistancies in the mupdate database.
+
+Troubleshooting & when things go wrong
+
+ * Mailbox operations are being denied - This is an indication that
+ the mupdate master may be down. Restart it.
+ * Mailbox operations are not being seen by one or more frontends -
+ This indicates that the mupdate process on a slave may have died,
+ you may need to restart master. Alternatively, mupdate will retry
+ connections every 20 seconds or so for about 20 attempts if the
+ master does go down.
+ * A frontend's mailboxes.db is corrupt / out of sync - Restart master
+ on the frontend, and have the mupdate process resynch the local
+ database. You may need to remove the local mailboxes database if
+ the corruption is extreme.
+ * A mailbox's location keeps switching between two (or more) backend
+ hosts. - It probably actually exists on both hosts. Delete the
+ mailbox from all but one of the hosts, and run a ctl_mboxlist -m on
+ the one where you want it to actually live.
+ * Databases are never created on the frontends/slaves - Check to
+ ensure that the mupdate slave process is started, (is prefork=1)
+
+References
+
+ * Aggregator Overview
+ * MUPDATE Protocol Reference
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-netnews
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-netnews?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-netnews (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-netnews Sat Aug 26 02:00:13 2006
@@ -1,0 +1,192 @@
+Cyrus and Netnews
+
+ Note that the NNTP support in Cyrus is still relatively young in the
+ grand scheme of things, and has not been tested under a heavy Usenet
+ load. That being said, the code appears to be stable and is currently
+ running in production serving 50-60 newsgroups with a volume of about
+ 6000 messages per day.
+
+Introduction
+
+ Cyrus has the ability to export Usenet via IMAP and/or export shared
+ IMAP mailboxes via NNTP. This is made possible by a new NNTP daemon
+ which is included with Cyrus.
+
+ This document assumes that you have successfully been able to setup
+ your Cyrus IMAP server. If you have not already done so, please refer
+ to the rest of the documentation. This document also assumes that you
+ are familiar with Usenet and shared IMAP mailboxes.
+
+ There is a diagram that shows the interactions of the various
+ components of the NNTP support in Cyrus which may be helpful in
+ understanding the "big picture".
+
+Installation
+
+ You will need to build Cyrus IMAPd with the --enable-nntp configure
+ option. This builds nntpd and the associated utilities.
+
+Requirements
+
+ Obviously you must have a newsfeed or news reader access from your ISP
+ or Usenet provider.
+
+Configuration
+
+ The first thing that must be done is to decide where your newsgroup
+ mailboxes will reside, either at the toplevel of your hierarchy (eg,
+ comp.mail.imap) or rooted elsewhere (eg, netnews.comp.mail.imap). If
+ your newsgroup mailboxes are not at the toplevel of your hierarchy,
+ then you must specify the parent with the newsprefix in imapd.conf.
+ Using the example above, newsprefix would be set to netnews.
+
+ You must create a mailbox for each newsgroup that you would like to
+ receive/export before the newsgroups can be used. If some groups are
+ private, be sure to set the ACLs accordingly. The tools/mknewsgroups
+ script can be used to help facilitate mass creation of newsgroup
+ mailboxes. When using this script, be sure to add posting rights for
+ 'anyone' (eg. mknewsgroups -a 'anyone +p' ...) so that articles can be
+ fed/posted.
+
+Receiving articles
+
+ In order to receive usenet articles, you must make sure that the Cyrus
+ nntpd service is enabled in cyrus.conf. The master/conf/normal.conf and
+ master/conf/prefork.conf sample configs both include entries for nntpd
+ (disabled by default).
+
+Push (traditional) feeds
+
+ If your usenet peer will be pushing articles to you, no further
+ configuration is necessary, beyond letting your peer access your Cyrus
+ server on port 119 (nntp).
+
+Pull (suck) feeds
+
+ If you prefer to pull articles from your peer (and your provider allows
+ it), then you can use the fetchnews utility which will retrieve
+ articles from your peer and feed them to your Cyrus server. If
+ supported by your peer, fetchnews will use the NEWNEWS command,
+ otherwise it will fallback to keeping track of the high water mark of
+ each group. You will probably want to configure fetchnews as an EVENT
+ in cyrus.conf to be called periodically (eg, once an hour, every 15
+ minutes, etc).
+
+ As an alternative to fetchnews, you can also use the suck program to
+ pull articles from your peer.
+
+imapfeed
+
+ Alternatively, if you already have an INN v2.3 server in-house you can
+ use the included imapfeed utility (written by the authors of Cyrus) to
+ feed articles to your Cyrus server via LMTP. Consult the INN
+ documentation for further details.
+
+Control Messages
+
+ Control messages are accepted, parsed and delivered to the
+ corresponding control.* pseudo-group (eg, control.newgroup,
+ control.cancel, etc) if it exists, so that they may be reviewed by an
+ administrator.
+
+ Automatic execution of control messages is only performed if the
+ newsmaster (default = "news") user has the proper access control for
+ the given mailbox. For example, to allow cancel control messages to be
+ performed for "misc.test" articles, give the "news" user the 'd' right
+ on "misc.test". To allow newgroup, rmgroup and mvgroup control messages
+ to be performed on the "misc" hierarchy, give the "news" user the 'c'
+ right on "misc".
+
+ NOTE: No sender or PGP verification of control messages is currently
+ implemented.
+
+Reading/Posting articles
+
+ In order to have articles posted by your local users propagate to the
+ outside world, you must specify the name of your usenet peer(s) with
+ the newspeer option in imapd.conf. This is the host(s) that nntpd
+ contacts to feed outgoing articles. Depending on the configuration of
+ the newspeer option, articles will be fed to the upstream server(s)
+ using either the POST or IHAVE command. Also note that you may specify
+ an optional wildmat to filter which groups will be fed (see
+ imapd.conf(5) for details).
+
+ Newsgroups can also be gatewayed to email by setting
+ /vendor/cmu/cyrus-imapd/news2mail mailbox annotations to the
+ corresponding email addresses.
+
+News clients
+
+ If anonymous logins are disabled (default) in imapd.conf, then your
+ news clients will have to be configured to login with a username and
+ password, otherwise they will not be allowed to post. Furthermore, if
+ plaintext logins are disabled in imapd.conf, then you might have to
+ configure your news clients to use SSL/TLS and enable the nntps service
+ in cyrus.conf.
+
+ If you want to allow your news clients to use the NNTP NEWNEWS command,
+ you will have to enable the allownewnews option in imapd.conf.
+
+Email clients
+
+ If you are exporting Usenet via IMAP, and your users' messaging clients
+ are not savvy enough to reply to and post articles via NNTP, then you
+ will have to configure your server so your users can reply to and post
+ articles via SMTP.
+
+ To help faciliate this, you can set the newspostuser option to a
+ "pseudo" user which will be used to construct email delivery addresses
+ for each incoming article. These addresses are inserted into a
+ Reply-To: in the article. For example, if set to "post", an article
+ posted to comp.mail.imap will have an address of "post+comp.mail.imap"
+ inserted into the Reply-To: header. This will allow a user to easily
+ reply to an article via email. Otherwise, the users will have to learn
+ the correct email address format for posting and replying to articles.
+
+ In order for these email messages to be fed into your news server (and
+ subsequently to the outside world) you need to use an email to news
+ gateway, such as lmtp2nntp. You need to configure your MTA (Sendmail,
+ Postfix, etc) so that lmtp2nntp is used as the local mailer whenever it
+ receives a news article. A simple rule for doing this in Sendmail is
+ shown below:
+
+ # mail addressed to post+ goes to lmtp2nntp at localhost
+ LOCAL_RULE_0
+ Rpost + $+ < @ $=w . > $#lmtp2nntp $@ localhost $: $1
+
+ For other configurations, consult the lmtp2nntp and documentation and
+ your MTA documentation.
+
+ NOTE: If anonymous logins are disabled (default) in imapd.conf, then
+ you should configure lmtp2nntp to use its "feed" operation mode.
+
+Expiring articles
+
+ Expiration of articles is done by the cyr_expire utility. Control over
+ when articles are expunged is accomplished with the
+ /vendor/cmu/cyrus-imapd/expire mailbox annotation. This annotation sets
+ the number of days that messages should be kept in the mailbox before
+ they expire. All entries in the duplicate deliver database that
+ correspond to these messages are also kept for the same number of days
+ before they are purged (overriding the cyr_expire -E option).
+
+ Setting the expire time to 0 (zero) for a mailbox will ensure that
+ neither the messages nor the corresponding database entries will ever
+ be expired. This can be useful for shared mailboxes (e.g. mailing list
+ archives) which are being exported via NNTP. Note that this will cause
+ the duplicate delivery database to consistently grow in proportion to
+ the number of messages in such mailboxes.
+
+ If a mailbox does not have an expire time set on it, then the messages
+ will never be expunged, but the corresponding database entries WILL be
+ expired after the default number of days (cyr_expire -E option).
+
+ Note that the /vendor/cmu/cyrus-imapd/expire mailbox annotation is
+ inherited by child mailboxes, so that you may control expiration on an
+ entire mailbox/newsgroup hierarchy simply by setting the annotation on
+ the root of the hierarchy. For example, if you set the annotation on
+ comp, then ALL of the newsgroups in the comp hierarchy will be expired
+ at the same time. Similarly, if you set the annotation on alt.binaries,
+ all of the binary newsgroups under alt will be expired at the same time
+ (independently from comp).
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-perf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-perf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-perf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-perf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,106 @@
+Performance Notes
+
+ Performance issues for you to consider. If you never expect to have
+ more than 100 simultaneous users, chances are any hardware you have
+ will be fine. If you plan on having thousands or more users, please be
+ sure to review this section.
+
+ If your configuration directory is not /var/imap, adjust accordingly.
+
+ * /var/imap/proc - After a successful login, the imapd creates a file
+ in /var/imap/proc that is its unix process id. It also contains the
+ name of any SELECT'd mailbox. The file is deleted when the user
+ logs out.
+
+ Given the potential load, this is a good candidate to move
+ elsewhere. This can be done by symlink'ing the directory to another
+ partition. We symlink it to a directory on a memory/viritual memory
+ filesystem (specifically Solaris' tmpfs). If you use a tmpfs type
+ filesystem, make sure that you have sufficient memory/swap to do
+ this.
+
+ Some people don't care about this information and just #ifdef out
+ the code. We probably should add a configure option to do this.
+ * /var/imap/mailboxes.db - The mailboxes list is often the ultimate
+ source of contention between imap processes, especially if clients
+ are inefficient about their use of the LIST command. For this
+ reason it is often better to use the skiplist backend which is
+ optimized for enumeration of the database, as opposed to the
+ default, Berkeley DB (use --with-mboxlist-db=skiplist).
+
+ Mika Iisakkila (mika.iisakkila at pingrid.fi) writes: Nevertheless,
+ you can also tweak the Berkeley backend if you want to or have to
+ stick with it. Cyrus doesn't do anything to increase the BDB cache
+ size, and the default (256 kB) is way too small for any reasonably
+ large site. With some 50000 mailboxes and random operations, I
+ found the hit rate for default BDB cache to be 70-80%. After
+ growing the cache size to 2M, hit rate approached 99% and disk
+ traffic was greatly reduced since most of the operations are reads
+ anyway. Therefore processes could complete their work and release
+ their locks much more quickly, and the dreaded "DBERROR: xxx
+ lockers" messages stayed at a comfortable level. You can modify the
+ source (/lib/cyrusdb_db3.c, the setting is commented out) or you
+ can put a DB_CONFIG file under /var/imap/db with the appropriate
+ setting. Read more about this in the Berkeley docs before trying
+ it, typos and incorrect settings can cause havoc.
+ * /var/imap/deliverdb - Unless you disable duplicate delivery
+ suppression, each time a mail message is delivered it needs to lock
+ the database and check to see if the message-id has been seen
+ already. If you require really high throughput delivery, you may
+ want to disable this feature.
+
+ We run with it enabled and it doesn't significantly impact our
+ performance.
+ * /var/spool/mqueue - Sendmail can be pretty harsh on the spool
+ partition. Having this on a separate disk is usually a good idea.
+ Consider using LMTP and delivering from a separate machine.
+ * Unused SASL mechanisms - If you just build the SASL library and
+ copied all the mechanisms into /usr/lib/sasl2, the imapd will try
+ to use them and allocate some amount of memory. In general, the
+ operating system will swap out those pages but you may be
+ allocating more swap space than you need. So, look in
+ /usr/lib/sasl2 and if you don't plan on using those mechanisms,
+ don't leave them there.
+ * You may want to increase the listen queue value when starting up
+ the master process. For example, you may want to do this if you see
+ the Listen queue drop counter increasing quickly. For example,
+ under Solaris, look at the variable tcpListenDrop (from netstat -sP
+ tcp).
+ * Database recovery. If restarting the server takes a long time due
+ to the cyrusdb database recovery procedure (this is usually true if
+ you have a large number of deliveries) you should look into
+ shortening the interval between checkpoints, controlled by the
+ cyrusdb event in /etc/cyrus.conf. We run checkpoints every 5
+ minutes; the current suggested install interval is 30 minutes.
+ * Some filesystems support the noatime mount option. The server does
+ not use the atime information so you can go ahead and enable this
+ feature.
+ * Depending on your syslog configuration and usage volume, Cyrus may
+ generate thousands of syslog messages. On Linux, syslog performance
+ can be greatly improved by disabling synchronous logging (disabling
+ fsync() after each message). Prepending filenames in
+ /etc/syslog.conf with a "-", e.g., "/var/log/maillog" becomes
+ "-/var/log/maillog", disables syslog's fsync() call after each log
+ message. If you log many messages those fsync()s will kill your I/O
+ throughput. Note that if you do not need the detail provided by the
+ LOG_DEBUG level, then not logging these messages can significantly
+ reduces the amount of log entries that cyrus makes.
+
+ In general, there's no magic bullet for performance. It depends on your
+ hardware, your operating system, and how your users use the system. In
+ general, an imapd process takes up anywhere from 256 Kbytes of memory
+ to 512 Kbytes when it is first fired up. CPU has not been a big deal,
+ but it may become more important as the imap sessions are encrypted and
+ now that searching may be more frequent. Disk I/O is probably the most
+ important and having a hardware RAID subsystem with an amount of
+ write-back cache would be a good thing.
+
+ Finally, if you are talking about less than 100 interactive users it is
+ likely that any relatively modern hardware can support it. If you are
+ talking about having more than 1000 interactive users, you should know
+ how to predict your utilization, go overboard on hardware, be willing
+ to suffer growing pains, or be able to hire someone that can help.
+
+ There are a number of good performance tuning articles out for Solaris
+ by Adrian Cockcroft. Go to your favorite search engine and look for his
+ name.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-prereq
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-prereq?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-prereq (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-prereq Sat Aug 26 02:00:13 2006
@@ -1,0 +1,57 @@
+Prerequisites and other notes
+
+ The following programs and/or packages are required.
+
+ * libsasl, version 2.1.7 or higher. To obtain libsasl, ftp it from
+ ftp.andrew.cmu.edu. Earlier versions of SASL will not work; please
+ get the latest one. Configure SASL so that it supports whatever
+ authentication method your site uses. Please pay careful attention
+ to the SASL configuration. This is the biggest problem that most
+ people have.
+ * Berkeley DB, version 3.0.55 or higher. Berkeley DB can be obtained
+ from Sleepycat. It is strongly recommended that libsasl be compiled
+ with Berkeley DB support, using the same version of Berkeley DB.
+ (If you have a Berkeley DB version mismatch, somewhat perplexing
+ crashes result.)
+ * GNU Make is required. Get it from the Free Software Foundation. It
+ is probably easier to find it via ftp.
+
+ The following programs and/or packages are required for specific
+ features. If you don't have them, certain features of the IMAP server
+ will be disabled.
+
+ * makedepend. A version is included in the makedepend subdirectory of
+ the distribution. Try and install it before installing the Cyrus
+ IMAPd. If it fails, the configure script will use a dummy shell
+ script instead of makedepend, and you should be sure to always give
+ the command "make clean" before "make all". If you don't mind
+ builds taking longer, this isn't a big deal and you can ignore any
+ makedepend errors.
+ * Perl, version 5. To obtain Perl, see the comprehensive Perl
+ archive. This is required for cyradm (written by Brandon Allbery).
+ It is also used for some installation scripts: you don't need it
+ but it may make your life easier. We recommend at least version
+ 5.00502.
+ * OpenSSL, version 0.9.4 or higher. Required for STARTTLS support and
+ for IMAP/POP3 wrapped in SSL (the imaps/pop3s ports). Available
+ from http://www.openssl.org/.
+ * libwrap, from Wietse Venema. This will allow one to control who is
+ accessing what service, based on IP address. Available from
+ ftp://ftp.porcupine.org/pub/security/ in the tcp_wrappers package..
+ * Net-SNMP (formerly UCD-SNMP), version 4.2 or higher. Required for
+ SNMP monitoring of the IMAP server. Available from
+ http://www.net-snmp.org/.
+ * If you use AFS PTS support for groups, Cyrus still depends on
+ Kerberos and AFS. If you successfully compiled SASL with your
+ Kerberos library, it's likely that it will work well with Cyrus.
+ * We recommend using an MTA (mail transfer agent) that supports LMTP
+ (local mail transfer protocol). We use Sendmail and recommend
+ version 8.12.8 or higher, available from http://www.sendmail.org.
+ Others have reported success with Postfix.
+
+ The following programs and/or packages are recommended:
+
+ * flex - libsieve has two different lexical analyzers, and that's
+ hard to do with traditional lex.
+ * gcc - we build using gcc and the compiler options -O2 -g.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-replication
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-replication?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-replication (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-replication Sat Aug 26 02:00:13 2006
@@ -1,0 +1,140 @@
+Cyrus replication
+
+ Note that Cyrus replication is still relatively young in the grand
+ scheme of things, and if you choose to deploy you are doing so at your
+ own risk. The core of the replication code has been used successfully
+ in production at Cambridge University for about a year, but it has been
+ rewritten extensively as part of the integration into the mainstream
+ Cyrus codebase.
+ Also note that the replication protocol currently does not have the
+ facility to support the IMAP CONDSTORE extension (modification
+ sequences). It is recommended that you do not try to use both CONDSTORE
+ and replication at this time. The deficiencies in the replication
+ protocol will be fixed in version 2.3.8.
+
+Introduction & Assumptions
+
+ The Cyrus replication engine is designed to replicate the mailstore on
+ standalone Cyrus servers or "backend" servers in a Cyrus Murder to
+ provide a high-availability environment. It is NOT intended to
+ replicate "frontend" servers or the "mupdate master" in a Cyrus Murder.
+ Note that load balancing is not possible with the current replication
+ code, but it is intended to be supported in the future.
+
+ This document assumes that you have successfully been able to setup
+ atleast one Cyrus IMAP server. This server will become your first
+ "master" server. It also assumes that you are familliar with the
+ administration and day to day operations of the Cyrus IMAP server and
+ the SASL authentication library. If you feel uncomfortable with this,
+ please refer to the rest of the documentation first.
+
+Installation
+
+ You will need to build Cyrus IMAPd with the --enable-replication
+ configure option. This builds the replication client/server
+ applications and utilities.
+
+Requirements
+
+ * Atleast one standalone or "backend" Cyrus IMAP server.
+ * Atleast one machine that will become the first "replica" server.
+
+Configuring the "replica" server
+
+ The "replica" server is a standalone server which listens for and
+ processes synchronization messages from a "master" server. The
+ "replica" server needs to be configured to accept these synchonization
+ messages.
+
+ 1. Configure a standalone server as described in the rest of the
+ documentation.
+
+ 2. Add the following line to the "/etc/services" file.
+
+ csync 2005/tcp
+
+ Note that the port number is arbitrary as long as its not being
+ used by any other services on your network.
+
+ 3. Add a line similar to the following in the SERVICES section of
+ cyrus.conf:
+
+ syncserver cmd="/usr/cyrus/bin/sync_server" listen="csync"
+
+ 4. Start/restart "/usr/cyrus/bin/master".
+
+Configuring the "master" server
+
+ The "master" server is the standalone or "backend" server which is
+ actively serving mailboxes to clients. This server needs to be
+ configured to synchronize its mailstore with a "replica" server.
+
+ 1. Add the following line to the "/etc/services" file.
+
+ csync 2005/tcp
+
+ Note that the port number MUST be the same as that used on the
+ "replica" server.
+
+ 2. Specify the hostname of the "replica" server and how to
+ authenticate to it using the following imap.conf options:
+
+ * sync_host
+ * sync_authname
+ * sync_realm
+ * sync_password
+
+ Note that sync_authname MUST be an admin on the "replica" server.
+ Also note that sync_realm and sync_password may not be necessary
+ depending on the SASL mechanism used for authentication.
+
+Universally Unique Identifiers (UUIDs)
+
+ An optional, but recommended step is to enable UUIDs for messages. Use
+ of UUIDs improves efficiency by eliminating the synchronization of
+ messages which the "replica" has already received from the "master".
+ Note that UUIDs can be safely enabled and disabled at any time.
+
+ 1. Define the sync_machineid option in imapd.conf. This option
+ specifies the numeric identifier (1 - 255) of the "master" machine
+ which is used in constructing the UUID for each message on the
+ server. This identifier MUST be unique across all active "backend"
+ servers in a Murder. Example:
+
+ sync_machineid: 1
+
+ 2. For each IMAP, NNTP and LMTP service in cyrus.conf, enable the
+ provide_uuid argument. Example:
+
+ imap cmd="imapd" listen="imap" prefork=5 provide_uuid=1
+
+"Rolling" replication
+
+ "Rolling" replication means that the "master" server continuously
+ synchonizes itself with the replica. To configure "rolling"
+ replication, perform the following:
+
+ 1. Enable the sync_log option in imapd.conf. This allows the imapd,
+ pop3d, nntpd, and lmtpd services to log synchonization actions
+ which will be periodically serviced by sync_client.
+
+ 2. Optionally, adjust the sync_repeat_interval in imapd.conf.
+
+ 3. Add a line similar to the following in the STARTUP section of
+ cyrus.conf:
+
+ syncclient cmd="/usr/cyrus/bin/sync_client -r"
+
+ 4. Start/restart "/usr/cyrus/bin/master".
+
+Administration
+
+Manual replication
+
+ To manually synchonize any part of the mailstore, simply run
+ sync_client(8) with the appropriate command line options. Note that you
+ CAN manually synchonize even if "rolling" replication has been
+ configured.
+
+Failover
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-sieve
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-sieve?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-sieve (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-sieve Sat Aug 26 02:00:13 2006
@@ -1,0 +1,102 @@
+Installing Sieve
+
+ This section assumes that you compiled Cyrus with sieve support. If you
+ specified --disable-sieve when running ./configure, you did NOT compile
+ the server with sieve support.
+
+ A brief introduction to Sieve at is available from Cyrusoft
+ International.
+
+Configure outgoing mail
+
+ Some Sieve actions (redirect, vacation) can send outgoing mail.
+
+ You'll need to make sure that "lmtpd" can send outgoing messages.
+ Currently, it invokes "/usr/lib/sendmail" by default to send messages.
+ Change this by adding a line like:
+
+ sendmail: /usr/sbin/sendmail
+
+ in your "/etc/imapd.conf". If you're using Postfix or another MTA, make
+ sure that the sendmail referenced in "/etc/imapd.conf" is
+ Sendmail-compatible.
+
+Managing Sieve Scripts
+
+ Since Cyrus is based around the concept of a sealed-server, the normal
+ way for users to manipulate Sieve scripts is through the "sieveshell"
+ utility.
+
+ If, for some reason, you do have user home directories on the server,
+ you can use the "sieveusehomedir" option and have the sieve script
+ stored in the home directory of the user as "~/.sieve".
+
+Testing the sieve server
+
+ 1. The Sieve server, "timsieved", is used for transporting user Sieve
+ scripts to the sealed IMAP server. It is incompatible with the
+ "sieveusehomedir" option. It is named after the principal author,
+ Tim Martin, who desperately wanted something named after him in the
+ Cyrus distribution.
+
+ 2. From your normal account, telnet to the sieve port on the server
+ you're setting up:
+
+ telnet foobar sieve
+
+ If your server is running, you'll get a message similar to the
+ following one:
+
+ Trying 128.2.10.192...
+ Connected to foobar.andrew.cmu.edu.
+ Escape character is '^]'.
+ "IMPLEMENTATION" "Cyrus timsieved v1.1.0"
+ "SASL" "ANONYMOUS PLAIN KERBEROS_V4 GSSAPI"
+ "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress regex"
+ OK
+
+ Any message other than one similar to the one above means there is
+ a problem. Make sure all of authentication methods you wish to
+ support are listed. This list should be identical to the one listed
+ by "imapd" earlier. Next terminate the connection, by typing
+ "logout".
+
+ 3. Next test authenticating to the sieve server. To do this run the
+ "sieveshell" utility. You must specify the server. If you run this
+ utility from a different machine without the "sieve" entry in
+ "/etc/services", port 2000 will be used.
+
+ "sieveshell foobar"
+ Please enter your password: ******
+ > quit
+
+ This should produce the message "Authentication failed" with a
+ description of the failure if there was a problem.
+
+ 4. Next you should attempt to place a sieve script on the server. To
+ do this create a file named "myscript.script" with the following
+ lines. Replace "foo at example.org" with an email address you can send
+ mail from, but that is not the one you are working on now.
+
+ require ["reject","fileinto"];
+
+ if address :is :all "From" "foo at example.org"
+ {
+ reject "testing";
+ }
+
+ To place this script on the server run the following command:
+
+ "sieveshell foobar"
+ Please enter your password: ******
+ > put myscript.script
+ > activate myscript
+ > quit
+
+ This should place your script on the server and make it the active
+ script.
+
+ 5. Test that the sieve script is actually run from deliver. Send a
+ message to the address you're working on from the address mentioned
+ in the sieve script. The message should be rejected.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-snmpmon
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-snmpmon?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-snmpmon (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-snmpmon Sat Aug 26 02:00:13 2006
@@ -1,0 +1,17 @@
+SNMP Monitoring
+
+ TODO:finish this section. The majority of this section will get moved
+ to the external CySNIIP docs and this will be stuff specific to the
+ imapd.
+
+ Cyrus uses an auxillary process called "tugowar", so named because
+ there's a push-pull model. Various components of the Cyrus mail system
+ push data to tugowar, and tugowar listens for SNMP queries (remote
+ clients pull the data from tugowar).
+
+Configuring tugowar
+
+Testing the tugowar daemon
+
+SNMP data exported
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-testing
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-testing?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-testing (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-testing Sat Aug 26 02:00:13 2006
@@ -1,0 +1,108 @@
+Testing the IMAP Server
+
+ To test the IMAP server, reboot and perform the following steps (all of
+ these samples use "foobar" as the IMAP server name). A list of answers
+ to common installation problems is maintained in
+ http://asg.web.cmu.edu/cyrus/imapd/install-FAQ.
+
+ 1. From your normal account, telnet to the IMAP port on the server
+ you're setting up:
+
+ telnet foobar imap
+
+ If your server is running, you'll get the following message:
+
+ Trying 128.2.232.95...
+ Connected to foobar.andrew.cmu.edu.
+ Escape character is '^]'.
+ * OK foobar.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
+
+ Any message other than one starting with "* OK" means there is a
+ problem. To terminate the connection, type ". logout".
+
+ Naturally the version number should match the version you just
+ installed.
+
+ 2. Use "imtest" to test logging in with plaintext passwords:
+
+ /usr/local/bin/imtest -m login foobar
+
+ If you want to specify a different user, do:
+
+ /usr/local/bin/imtest -m login -a USER foobar
+
+ If your server is running, you'll get the following message:
+
+ % /usr/local/bin/imtest -m login foobar
+ S: * OK mail1.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
+ C: C01 CAPABILITY
+ S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS
+ X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=GSSAPI AUTH=ANONYMOUS
+ AUTH=KERBEROS_V4 UNSELECT
+ S: C01 OK Completed
+ Password:
+ + go ahead
+ L01 OK User logged in
+ Authenticated.
+ Security strength factor: 0
+
+ Any message other than one starting with a "L01 OK" means there is
+ a problem. If the test fails, a more specific error message should
+ be written through syslog to the server log. To terminate the
+ connection, type ". logout".
+ 3. You should now test the server with each of the various
+ authentication mechanisms you have installed. The supported
+ mechanisms are listed in the CAPABILITY line:
+
+ * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS
+ X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=ANONYMOUS
+ AUTH=KERBEROS_V4 AUTH=DIGEST-MD5 AUTH=CRAM-MD5 UNSELECT
+ . OK Completed
+
+ Each of the mechanism names is preceded by a 'AUTH='. For this
+ example the ANONYMOUS, KERBEROS_V4, DIGEST-MD5, and CRAM-MD5
+ mechanisms are available. If a mechanism does not appear that you
+ wish to use, examine the libsasl log messages. Generally, if a
+ mechanism does not appear, it means it failed to initialize. (For
+ example, if the server is unable to access the srvtab file the
+ KERBEROS_V4 mechanism will refuse to load.)
+
+ Plaintext login is a special case: the PLAIN SASL mechanism is only
+ advertised under an encrypted connection. However, plaintext logins
+ are available (as long as you haven't disabled plaintext) by using
+ -m login(as above).
+
+ To terminate the imtest connection, type ". logout".
+
+ Once you are satisfied with the authentication mechanism list you
+ should attempt to log in with each of those mechanisms. Run imtest
+ specifying which mechanism you would like to use.
+
+ /usr/local/bin/imtest -m KERBEROS_V4 foobar
+ C: C01 CAPABILITY
+ S: * OK foobar.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
+ S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE
+ UIDPLUS X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=ANONYMOUS
+ AUTH=GSSAPI AUTH=KERBEROS_V4 UNSELECT
+ S: C01 OK Completed
+ C: A01 AUTHENTICATE KERBEROS_V4
+ S: + wYcDAA==
+ C: BAYBQU5EUkVXLkNNVS5FRFUAOCAm7F/Y+HabCzJ
+ /UMtVcvWRjTohuq/USaCV6gYdkAU5DOcADAq
+ S: + 0aAsUGQZhgQ=
+ C: ADMe/cVivAYYzy1yd4Vojg==
+ S: A01 OK Success (privacy protection)
+ Authenticated.
+ Security strength factor: 56
+
+ Any message other than one starting with a "A01 OK" means there is
+ a problem. If the test fails, a more specific error message is
+ written through syslog to the server log. To terminate the
+ connection, type ". logout".
+
+ See the libsasl documentation for a full description of all the
+ mechanisms. It is also possible to support "security layers"
+ (privacy or integrity protected connections). By default, imtest
+ uses the strongest layer available with the selected mechanism; use
+ "-l" to choose an alternate layer.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-upgrade
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-upgrade?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-upgrade (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-upgrade Sat Aug 26 02:00:13 2006
@@ -1,0 +1,356 @@
+Upgrading From Previous Versions
+
+Upgrading from 2.3.3 or later (64-bit machines)
+
+ * Due to byte alignment issues in cyrus.index, all mailboxes will
+ have to be reconstructed.
+
+Upgrading from 2.3.4 or 2.3.5
+
+ * Any mailboxes which had messages appended/delivered/copied with a
+ 2.3.4 service or copied with a 2.3.5 imapd MUST be reconstructed in
+ order for the new messages to be displayed by clients.
+
+Upgrading from 2.2.x or earlier
+
+ * If you wish to use separate metadata partition(s), you MUST first
+ shut down Cyrus and then perform the following:
+
+ 1. Set the metapartition-* and metapartition_files options to suit
+ your configuration. For a full description of these options,
+ see the imapd.conf(5) man page.
+ 2. Create the metadata partition directory(s) listed in the
+ metapartition-* option(s), setting the ownership and
+ permissions in same fashion as step 6 of install-configure.
+ 3. Run the tools/migrate-metadata script (as the cyrus user) to
+ move the metadata files listed in the metapartition_files
+ option from the spool partition(s) to the new metadata
+ partition(s). This script may take a long time to run depending
+ on the number of mailboxes on the server, but presumably the
+ metadata partitions are located on high speed storage, so the
+ writes should be relatively fast.
+ 4. Restart Cyrus.
+
+Upgrading from 2.2.2 or earlier
+
+ * The Cyrus database backend configuration is now handled at runtime
+ using imapd.conf options. If you are not using the default backend
+ for any of the databases, make sure that you specify the correct
+ backend(s) in appropriate option(s).
+ * The format of the newspeer option has been changed. The existing
+ format will still be parsed, but the option should be upgraded to
+ use the new format (see imapd.conf(5) for details).
+
+Upgrading from 2.2.1 or earlier
+
+ * The sieve bytecode format has changed again to correct an issue
+ with the short circuiting of the allof and anyof operators. To
+ upgrade existing scripts (outside of home directories), you can run
+ the tools/masssievec perl script included with the distribution. It
+ requires a path to your sievec binary. This should also upgrade
+ scripts that have already been compiled to bytecode. For example:
+
+ masssievec /usr/src/cyrus/sieve/sievec
+
+Upgrading from 2.2.0 or earlier
+
+ * The improved directory hashing (fulldirhash) is now a runtime
+ configuration option. If you are currently using this feature, then
+ make sure that you enable the fulldirhash option in imapd.conf.
+ * The format of mailbox index files has changed. They are upgraded on
+ the fly, so you need to do nothing to upgrade. However, to
+ downgrade them you will need to remove the cyrus.index files, and
+ reconstruct the mailboxes, otherwise the index files will be
+ invalid.
+ * ctl_deliver -E has been deprecated in favor of cyr_expire -E. This
+ new tool does both duplicate delivery database pruning as well as
+ message expunging. You should replace the appropriate EVENTS entry
+ in cyrus.conf with one of those in the sample configurations in the
+ master/conf directory.
+ * The sieve bytecode format has changed. The new format is encoded in
+ network byte order, and will be transferable between architechures.
+ To upgrade existing scripts (outside of home directories), you can
+ run the tools/masssievec perl script included with the
+ distribution. It requires a path to your sievec binary. This should
+ also upgrade scripts that have already been compiled to bytecode.
+ For example:
+
+ masssievec /usr/src/cyrus/sieve/sievec
+
+Upgrading from 2.1.x or earlier
+
+General information (ALL SITES)
+
+ * The default database formats for the mailbox list and the seen
+ state databases has been changed to the skiplist backend. There are
+ two ways of dealing with this if you have been using the defaults.
+
+ 1. Specify --with-mboxlist-db=berkeley and --with-seen-db=flat to
+ configure. This will instruct Cyrus to continue to use the
+ previous defaults.
+ 2. Use the cvt_cyrusdb program to directly convert the databases.
+ This should be done with the server down, and with the binaries
+ from the new Cyrus distribution. Change any paths that do not
+ match your configuration.
+ For the mailbox list, the command looks like:
+
+ /usr/cyrus/bin/cvt_cyrusdb /var/imap/mailboxes.db berkeley /var/imap/mailboxes.db.new skiplist
+ mv /var/imap/mailboxes.db.new /var/imap/mailboxes.db
+
+ Note that the use of full paths to the database files is
+ important. You should also backup your old mailboxes database
+ before moving the new one in.
+ For the seen state databases, the command to get them all in
+ one fell swoop looks like:
+
+ find /var/imap/user -name \*.seen -exec /usr/cyrus/bin/cvt_cyrusdb \{\} flat \{\}.new skiplist \; -exec mv \{\}.new \{\} \;
+
+ The slashes are important for shell escaping. Again, you should
+ back up the contents of your /var/imap/user directory before
+ executing this command. These commands may take some time to
+ complete, especially if your databases are large.
+
+ We believe that skiplist offers considerable performance advantages
+ for these two databases over the previous defaults.
+ * Sieve scripts are now compiled into bytecode. The program sievec is
+ provided to do this process manually (timsieved will compile
+ submitted sieve scripts as they are uploaded). To upgrade existing
+ scripts (outside of home directories), you can run the
+ tools/masssievec perl script included with the distribution. It
+ requires a path to your sievec binary. For example:
+
+ masssievec /usr/src/cyrus/sieve/sievec
+
+ Note that this will fail for scripts that use the "envelope"
+ extention but do not require it. Cyrus 2.1's timsieved did not do
+ appropriate checking that the optional envelope test was required
+ before it was used.
+ * Configuration subsystem changes:
+
+ * The tls_[service]_* configuration options have been removed.
+ Now use [servicename]_tls_*, where servicename is the service
+ identifier from cyrus.conf for that particular process.
+ * The admins and lmtp_admins configuration options no longer
+ union. Per-service options completely override the default
+ value when they are specified.
+ * lmtp_allowplaintext is no longer a defined parameter and must
+ be specified using the service name of your lmtp process if you
+ require a specific value.
+
+Specialized information (Murder, AFS, etc.)
+
+ * The IMAP IDLE command is now supported by proxyd and is controlled
+ by the imapidlepoll option, which is enabled by default (60
+ seconds). To disable IMAP IDLE in proxyd, set imapidlepoll to 0.
+ * User moves via RENAME and XFER are now controlled by the
+ allowusermoves option, which defaults to off.
+ * If you use ptloader, it now runs as a regular cyrus service. This
+ means that you will need master to acquire and maintain AFS tokens
+ for it. You will also need to create the ptclient directory under
+ your imap configdirectory, to hold the PTS cache (now a
+ full-fledged cyrusdb) and UNIX socket. In cyrus.conf, ptloader
+ should be setup to listen on <configdirectory>/ptclient/ptsock. See
+ the master/test/cmu-backend.conf example configuration file.
+ * Also, ptloader has been given a generic interface. You should now
+ specify "--with-auth=pts" (instead of "--with-auth=krb_pts") to
+ configure. There is also a --with-pts= configure option that
+ defaults to afskrb (Kerberos Canonicalization, AFS PTS Groups).
+ There is also an experimental ldap module. Note also that if
+ ptloader fails the lookup, authorization (and therefore
+ authentication) will now fail, as canonicalization is done inside
+ of ptloader.
+ * The format of sieve referrals has changed to be more consistant
+ with the current managesieve draft, this may cause interoperability
+ problems when using managesieve clients and servers from different
+ cyrus versions.
+ * Clients that use old-style ACL commands that include the "MAILBOX"
+ directive will no longer function. We do not know of any clients
+ that have this problem currently.
+ * Any applications that link libcyrus.a now need to link
+ libcyrus_min.a as well.
+
+Upgrading from 2.1.13 or earlier
+
+ * We are now more forgiving of MIME boundry headers generated by
+ earlier versions of eudora. However, if you have messages already
+ in the mailstore that you want to fix you will need to reconstruct
+ the affected mailboxes to regenerate the cached bodystructure data
+ to take this into account. Nothing needs to be done for new
+ messages to be treated in this way.
+
+Upgrading from 2.1.12 or earlier
+
+ * timsieved was corrected to behave properly in the altnamespace
+ configuration. However, this means that it was previously looking
+ for sieve scripts in "user.name" format instead of the (correct)
+ "user^name" format. A sample script to do this (which should be run
+ in the top level of the sieve directory) is in
+ tools/convert-sieve.pl. Note that this is only needed if you are
+ running with altnamespace turned on.
+
+Upgrading from 2.1.3 or earlier
+
+ * If you use notifications (previously notify_zephyr or notify_unix)
+ this functionality has been seperated out to notifyd. See the
+ notifyd manpage and example entries in master/conf.
+
+Upgrading from 2.1.2 or earlier
+
+ * Sieve has been updated to be compliant with RFC 3028 and
+ draft-martin-sieve-notify-01. All notify actions and any fileinto
+ and/or redirect actions using stringlists will have to be
+ updated/changed.
+
+Upgrading from 2.0.16 or earlier
+
+ * You must install and configure Cyrus SASL version 2 to use Cyrus
+ IMAP 2.1 and later. You can download SASL at
+ http://asg.web.cmu.edu/cyrus/download/.
+ * If you use timsieved to manage Sieve scripts, and have enabled the
+ alternate namespace and/or the Unix hierarchy separator, run the
+ script "tools/translatesieve". This script will translate the
+ folder names in fileinto actions.
+ * Cyrus now uses the service name "sieve" instead of "imap" for the
+ SASL profile of timsieved. If you use timsieved to manage Sieve
+ scripts, be sure to update your password checking mechanism
+ appropriately,
+ * If you have enabled the improved directory hashing scheme, run the
+ script "tools/rehash full". This script will rehash your existing
+ directories.
+ * The hashed deliver databases (used for duplicate delivery
+ suppression and Sieve) have been merged into a single deliver.db
+ database. You can safely remove the entire /var/imap/deliverdb
+ directory structure after shutting down the server.
+ * All of the Cyrus databases have been unified under a single BDB
+ environment. A new ctl_cyrusdb tool is now used for database
+ recovery and checkpointing instead of ctl_mboxlist and ctl_deliver.
+ You should replace the appropriate START and EVENTS entries in
+ cyrus.conf with those in the sample configurations in the
+ master/conf directory.
+ * Cyrus now caches SSL/TLS sessions in an external database. If you
+ have support for SSL/TLS, and haven't disabled session caching (see
+ imapd.conf(5)), you should add a line like the following to the
+ EVENTS section of cyrus.conf to prune expired sessions from the
+ database:
+
+ # this is only necessary if caching TLS sessions
+ tlsprune cmd="tls_prune" period=1440
+
+Upgrading from 2.0.6, 2.0.7, 2.0.8, or 2.0.9 or earlier
+
+ * If you use timsieved to manage Sieve scripts, run the script
+ "tools/upgradesieve". timsieved now uses symlinks instead of hard
+ links.
+
+Upgrading from a previous 2.0 version to 2.0.6
+
+ Warning: You do not need to follow these instructions if you're
+ upgrading from version 1.6.
+
+ * You can now pick whether to use Berkeley db to store seen state,
+ the subscription files, and the mailboxes file or a flat text file,
+ at compile time only. (Look in imap/seen_db.c and imap/mboxlist.h.)
+ * The format of the mailboxes file and seen state has changed. It is
+ not possible to preserve seen state, but upgrade the mailboxes file
+ as follows:
+
+ 1. Run ctl_mboxlist -d > mboxlist.temp to dump existing mailboxes.
+ 2. Remove old database files: rm mailboxes.db db/* user/*/*.seen
+ 3. With the new version of ctl_mboxlist, run ctl_mboxlist -u <
+ mboxlist.temp.
+
+Upgrading from 1.6.22 or 1.6.24
+
+ Warning: Cyrus imapd 2.0 will automatically convert on-disk file
+ formats as the server is used. It is not possible to run 1.6 after 2.0
+ has been used on a mail spool without reconstructing every mailbox.
+
+ * Create some extra directories and remove the duplicate delivery
+ database:
+
+ mkdir /var/imap/db
+ mkdir /var/imap/socket
+ chown cyrus /var/imap/db /var/imap/socket
+ rm -rf /var/imap/deliverdb
+
+ * Convert mailboxes file to Berkeley DB:
+
+ su cyrus
+ cd /var/imap
+ ctl_mboxlist -u < mailboxes
+ ctl_cyrusdb -c
+
+ Please keep a backup of your mailboxes file. You can dump an
+ old-style mailboxes file by using ctl_mboxlist -d.
+ * remove "/etc/inetd.conf" entries. The imap and popd3d lines need to
+ be removed from /etc/inetd.conf and inetd needs to be restarted.
+ * master process configuration: You'll need to configure the master
+ process Cyrus process and ensure that it starts on boot. see this
+ section of the configuration instructions.
+ * MTA configuration. You will have to reconfigure your MTA to speak
+ to lmtpd. See this section of the configuration document.
+ * cyrus.seen conversion. The cyrus.seen file will be automatically
+ upgraded as users read mail. After some time, you might want to
+ delete the cyrus.seen file in each mailbox; it is superceded by the
+ user/joe.seen file.
+ * cyrus.index conversion. The cyrus.index file will be automatically
+ upgraded the first time each mailbox is SELECTed.
+ * Netnews conversion. The netnews programs are no longer built. If
+ you are using netnews, you will need to apply the diff in the
+ netnews/ directory to INN or see if INN is now distributing those
+ changes. You will also want to run remotepurge on a regular basis
+ to purge old netnews posts.
+
+Upgrading from 1.6.13
+
+ * Upgrading from the Cyrus IMAP server version 1.6.13 or earlier: if
+ you use Sieve, you should run the "tools/upgradesieve" script, as
+ the format of the "/usr/sieve" directory has changed slightly.
+
+ timsieved, included in this release, will handle maintenance of
+ Sieve scripts.
+ * Upgrading from the Cyrus IMAP server version 1.6.10 or earlier: if
+ you export news via the IMAP server, you'll have to change your
+ "newsfeeds" file to contain
+
+ collectnews!:*:Tf,WR:collectnews
+
+ The format of the input to collectnews has changed.
+
+ Duplicate delivery suppression is now required for Sieve.
+ * Upgrading from the Cyrus IMAP server version 1.6.1 or earlier
+ (including 1.5.x!): the quota and user directories are now hashed
+ by the first character of the username. This is to reduce the
+ number of entries in any given directory. It doesn't do a great job
+ (and in some cases it will do a really poor job) but as a quick
+ hack it shouldn't make things worse. Optionally, the data
+ partitions can also be hashed by enabling the "hashimapspool"
+ option.
+
+ You must hash your directories using the "dohash" script in the
+ tools subdirectory. (If you want to hash your mail spool, be sure
+ to set "hashimapspool" before running "dohash".) This must be run
+ as the Cyrus user. Be sure to stop mail service while converting.
+ Doing this in single user mode is probably the safest.
+
+Upgrading from 1.5
+
+ * Upgrading from the Cyrus IMAP server version 1.5 or earlier:
+ libsasl is now required. Configuring SASL to work may be a chore,
+ especially if you use shadow passwords.
+ * An ANSI C compiler is now required. gcc should work fine and can be
+ acquired from http://www.gnu.org/software/gcc/gcc.html.
+ * Make sure to read the upgrading instructions under 1.6 above.
+ * Upgrading from 1.5.14 or earlier requires deleting the delivered
+ database. Remove the file delivered.db in the configdirectory and
+ make a directory called "deliverdb" in the configdirectory. This
+ may cause some duplicates to get through.
+ * Upgrading from 1.5.14 or earlier requires removing the PTS cache
+ database (if the AFS PTS group support is used, which is not the
+ default). The PTS cache is in /var/ptclient/ptscache.db, and you
+ should remove it. This is because the format for the PTS cache for
+ IMSP has changed. If you use AFS ACLs, IMSPd, and IMAPd on the same
+ machine, make sure you have version 1.5a5 of the IMSP server for
+ this version of the IMAP server. (If you don't have IMSP, or AFS,
+ don't worry about it.)
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-virtdomains
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-virtdomains?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-virtdomains (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/install-virtdomains Sat Aug 26 02:00:13 2006
@@ -1,0 +1,185 @@
+Configuring Virtual Domains
+
+Introduction
+
+ Virtual domains is the practice of hosting a service for more than one
+ domain on one server. Cyrus IMAP has the ability to host IMAP/POP
+ mailboxes for multiple domains (e.g. test at example.com and
+ test at example.net) on a single server or Murder.
+
+ In order to accomplish this, Cyrus needs to know which domain to look
+ in when a mailbox is accessed. There are two ways in which Cyrus can
+ determine the domain:
+
+ * Fully qualified userid - the client logs in with a userid
+ containing the domain in which the user belongs (e.g
+ test at example.com or test%example.net)
+ * IP address - the server looks up the domain based on the IP address
+ of the receiving interface (useful for servers with multiple NICs
+ or using IP aliasing)
+
+ Both of these methods are active if the virtdomains option is set to on
+ (or yes, 1, true) and can be used in conjunction with one another. If
+ the virtdomains option is set to userid, then only the first method is
+ used. Note that a fully qualified userid takes precedence over a domain
+ obtained from the IP address.
+
+Concepts
+
+ Perhaps the most important part of this process is to understand the
+ changes in the paradigm.
+
+ * Everyone is in a domain - It's best to think of every user as
+ existing inside a domain. Unqualified users are technically inside
+ the defaultdomain.
+ * Names can be qualified - Global admins can reference mailboxes and
+ ids by qualified names. That is, for any given mailbox command, you
+ can add @domain to the end of the mailbox name. Here are some
+ examples:
+
+ * cyradm> create user.jill at example.net (create a user)
+ * cyradm> create user.rick at example.net (create another user)
+ * cyradm> setquota user.rick at example.net 50000 (define a quota)
+ * cyradm> setaclmailbox user.rick at example.net jill at example.net
+ read (give Jill read access to Rick's mailbox)
+ * cyradm> listmailbox *@example.net (list all mailboxes in the
+ example.net domain)
+
+ * Each mailbox exists in only one domain
+ * Domains are mutually exclusive - Users only have access to
+ mailboxes within their own domain (intra-domain). The following
+ example will not work: setacl user.jill at herdomain.com
+ rick at hisdomain.com read.
+ * Global and Domain admins - The Cyrus virtual domains implementation
+ supports per-domain administrators as well as global (inter-domain)
+ administrators. Domain-specific administrators are specified with a
+ fully qualified userid in the admins option (e.g.
+ admin at example.net) and only have access to mailboxes in the
+ associated domain. Global administrators are specified with an
+ unqualified userid.
+
+Quick Start
+
+ 1. Add virtdomains: yes to imapd.conf
+ 2. Add a defaultdomain entry to imapd.conf
+ 3. Use cyradm (as a global or domain admin) to create mailboxes for
+ each domain.
+
+Configuration
+
+ Support for virtual domains is enabled by turning on the virtdomains
+ option in imapd.conf.
+
+ When upgrading from a single domain installation to a virtual domain
+ installation, the name of the existing domain (domain of the server
+ hostname) should be specified using the defaultdomain option in
+ imapd.conf. This allows users to continue to access their mailboxes
+ using unqualified userids. For example, if the primary IP address on
+ your server resolves to 'www.xxx.yyy.zzz', then set defaultdomain to
+ 'xxx.yyy.zzz'.
+
+ Even for new installations, it is recommended that the "real" domain of
+ the server (domain of its primary hostname), be set to the
+ defaultdomain. See Administrators below for further discussion.
+
+ Here is a sample imapd.conf with a minimal set of configuration
+ options.
+
+ configdirectory: /var/imap
+ partition-default: /var/spool/imap
+ admins: admin rick.admin at hisdomain.com jill.admin at herdomain.net
+ virtdomains: yes
+ defaultdomain: exampleisp.net
+
+ This example has three domains: exampleisp.net, hisdomain.com, and
+ herdomain.net. admin can administer all three domains, while
+ rick.admin at hisdomain.com and jill.admin at herdomain.net can only
+ administer their respective domains.
+
+ Note that everyday users should not be administrators. In the above
+ example, Jill and Rick have separate administrative accounts for their
+ domains.
+
+Multiple IP Addresses
+
+ In order to use a multiple IP address configuration, the server must be
+ able to do a reverse lookup on the IP address to determine the hostname
+ of the receiving interface. For example:
+
+ 192.168.0.1 -> mail.example.com
+ 192.168.0.2 -> mail.example.net
+ 192.168.0.3 -> mail.foo.bar
+
+ Once the server obtains the fully qualified hostname of the interface,
+ it removes the localpart (ie, 'mail') and uses the remainder as the
+ domain for any user that logs in.
+
+ This address to hostname mapping would usually be done via DNS,
+ /etc/hosts, NIS, etc. Configuration of the various naming services is
+ beyond the scope of this document.
+
+Delivering mail
+
+ To deliver mail to your virtual domains, configure your MTA so that the
+ envelope recipient (RCPT TO) passed to lmtpd is fully qualified with
+ the correct domain.
+
+Configuring Sendmail
+
+ In general, follow the basic configuration instructions. Here are a few
+ caveots:
+
+ * It is easiest to use the mailertable to route mail to Cyrus, rather
+ than adding the domain to the local-host-names file ($w). This
+ prevents Sendmail from changing the domain name to the local host
+ name.
+
+ example.com cyrusv2:/var/imap/socket/lmtp
+
+ * You'll have to use the Cyrus mailer in LMTP mode, and you'll have
+ to change the mailer flags so that it provides the full domain
+ while communicating LMTP. Specifically these changes:
+
+ S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP
+
+Mail Clients
+
+ The only changes you'll need to make to the mail client is to change
+ the username to the fully qualified domain name, ie user at example.com.
+ Note that to support some mail clients, the user%example.com form of
+ userid is also supported. Users in the default domain will not need to
+ reconfigur their clients (as unqualified userids are assumed to be in
+ the default domain)
+
+Administration
+
+ The Cyrus virtual domains implementation supports per-domain
+ administrators as well as "global" (inter-domain) administrators.
+ Domain-specific administrators are specified with a fully qualified
+ userid in the admins option (e.g. admin at example.net) and only have
+ access to mailboxes in the associated domain. Mailbox names should be
+ specified in the same fashion as on a single domain configuration.
+
+ Global administrators are specified with an unqualified userid in the
+ admins option and have access to any mailbox on the server. Because
+ global admins use unqualified userids, they belong to the
+ defaultdomain. As a result, you can NOT have a global admin without
+ specifying a defaultdomain. Note that when trying to login as a global
+ admin to a multi-homed server from remote machine, it might be
+ necessary to fully qualify the userid with the defaultdomain.
+
+ Global admins must use a mailbox at domain syntax when specifying
+ mailboxes outside of the defaultdomain. Examples (using cyradm):
+
+ To create a new INBOX for user 'test' in defaultdomain:
+
+ cm user.test
+
+ To create a new INBOX for user 'test' in domain 'example.com':
+
+ cm user.test at example.com
+
+ To list all mailboxes in domain 'example.com':
+
+ lm *@example.com
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/mailing-list
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/mailing-list?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/mailing-list (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/mailing-list Sat Aug 26 02:00:13 2006
@@ -1,0 +1,29 @@
+info-cyrus mailing list
+
+ We run a mailing list for users of Project Cyrus software. The
+ info-cyrus at andrew.cmu.edu mailing list exists for the discussion of
+ this server and other Cyrus software. Please do NOT send subscription
+ requests to the list.
+
+ To subscribe: Send mail to majordomo at lists.andrew.cmu.edu to subscribe
+ with the body of 'subscribe info-cyrus' (or just click the link above
+ and that should just work).
+
+ An archive is availible via anonymous IMAP at
+ imap://cyrus.andrew.cmu.edu/archive.info-cyrus.
+
+ A web archive is also available at
+ http://asg.web.cmu.edu/archive/mailbox.php3?mailbox=archive.info-cyrus
+
+ If you are not subscribed to the list (or you are sending the message
+ from a different address than the one which you are subscribed under),
+ your message is directed to a human for approval. Unfortunately, the
+ human does not always promptly process the message.
+
+ There is also a developers list available at
+ cyrus-devel at lists.andrew.cmu.edu. with similar subscription methods and
+ archive location
+
+ Detailed contact information can be found at
+ http://asg.web.cmu.edu/cyrus/contacts.html
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/man
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/man?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/man (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/man Sat Aug 26 02:00:13 2006
@@ -1,0 +1,55 @@
+Cyrus IMAP Server Man Pages
+
+ User Commands
+
+ * cyradm(1)
+ * imtest(1)
+ * installsieve(1)
+ * lmtptest(1)
+ * mupdatetest(1)
+ * nntptest(1)
+ * pop3test(1)
+ * shellsieve(1)
+ * sivtest(1)
+ * smtptest(1)
+
+ Subroutines
+
+ * imclient(3)
+
+ File Formats
+
+ * cyrus.conf(5)
+ * imapd.conf(5)
+ * krb.equiv(5)
+
+ System Administration
+
+ * arbitron(8)
+ * chk_cyrus(8)
+ * ctl_cyrusdb(8)
+ * ctl_deliver(8)
+ * ctl_mboxlist(8)
+ * cyr_expire(8)
+ * deliver(8)
+ * fetchnews(8)
+ * fud(8)
+ * idled(8)
+ * imapd(8)
+ * ipurge(8)
+ * lmtpd(8)
+ * master(8)
+ * mbexamine(8)
+ * mbpath(8)
+ * nntpd(8)
+ * notifyd(8)
+ * pop3d(8)
+ * quota(8)
+ * reconstruct(8)
+ * smmapd(8)
+ * squatter(8)
+ * syncnews(8)
+ * timsieved(8)
+ * tls_prune(8)
+ * unexpunge(8)
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/notes
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/notes?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/notes (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/notes Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+ * appending: it's important that the index records for individual
+ messages make it to disk before the index header indicating that
+ they're there. so something like:
+
+ 1. sync messages to disk (or depend on link() being atomic)
+ 2. create new index records, flush to disk
+ 3. create new header if necessary (adding new user flag), flush to
+ disk
+ 4. flush cache file
+ 5. update index header, flush to disk
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/os
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/os?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/os (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/os Sat Aug 26 02:00:13 2006
@@ -1,0 +1,48 @@
+Operating System Notes
+
+All
+
+ 1. Shadow passwords
+ On any system with shadow passwords (including Solaris 2.5 with
+ Unix authentication), read the SASL documentation carefully to make
+ sure it is configured correctly.
+
+Solaris
+
+ 1. Modern Solaris systems have several useful utilities in
+ /usr/proc/bin, among them pmap. This can be used to calculate the
+ incremental cost (number of non-shared pages) of an imapd process,
+ which is useful for sizing purposes.
+
+HP-UX
+
+ 1. The memory mapping support (mmap(2)) in HP-UX does not have the
+ right semantics for the Cyrus IMAP server under the 9.0 and 10.0
+ release of the operating system. It appears this is related to the
+ hardware's use of inverse page tables. It is recommended that
+ large-scale sites consider using some other platform.
+
+ 2. HP-UX 9.0.4: Comments from testers
+ The C that ships with HP-UX is totally unsuited for use with unix
+ packages. Either the HP-UX ANSI C developers kit must be purchased
+ separately from HP or GNU's gcc compiler (which can bootstrap
+ itself from the basic HP C) must be built on the target system.
+
+Linux
+
+ 1. synchronous fs updates.
+ By turning on synchronous updates for ext2fs, all updates (instead
+ of just meta-data) become synchronous. This is good for
+ reliability. Bad for performance.
+
+ The big problem used to be with the mailboxes file. The 2.0 release
+ and later addressed this problem by changing the flat file to a
+ Berkerley DB database.
+
+ Note this is for ext2fs. If you are using a newer filesystem (such
+ as xfs, jfs, or reiserfs) the synchronous metadata issue shouldn't
+ come up. Then again, we haven't really looked at other filesystems
+ for linux yet. (It appears that the different filesystems support
+ slightly different semantics, and it's not always clear what the
+ right thing for the application to do is.)
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/overview
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/overview?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/overview (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/overview Sat Aug 26 02:00:13 2006
@@ -1,0 +1,754 @@
+Cyrus IMAP Server: Overview and Concepts
+
+ This document gives an overview of the Cyrus IMAP server. The Cyrus
+ IMAP (Internet Message Access Protocol) server provides access to
+ personal mail and system-wide bulletin boards through the IMAP
+ protocol. The Cyrus IMAP server is a scalable enterprise mail system
+ designed for use from small to large enterprise environments using
+ standards-based technologies.
+
+ A full Cyrus IMAP implementation allows a seamless mail and bulletin
+ board environment to be set up across multiple servers. It differs from
+ other IMAP server implementations in that it is run on "sealed"
+ servers, where users are not normally permitted to log in. The mailbox
+ database is stored in parts of the filesystem that are private to the
+ Cyrus IMAP system. All user access to mail is through software using
+ the IMAP, IMAPS, POP3, POP3S, or KPOP protocols.
+
+ The private mailbox database design gives the server large advantages
+ in efficiency, scalability, and administratability. Multiple concurrent
+ read/write connections to the same mailbox are permitted. The server
+ supports access control lists on mailboxes and storage quotas on
+ mailbox hierarchies.
+
+ This document is organized into the following areas:
+
+ * Mailbox Namespace
+
+ * Standard (Internal) Namespace
+ * Alternate Namespace
+
+ * Access Control Lists
+
+ * Access Rights
+ * Identifiers
+ * "anonymous" and "anyone"
+ * Kerberos vs. Unix Authorization
+ * Negative Rights
+ * Calculating Users' Rights
+ * Implicit Rights for Administrators on Personal Mailboxes
+ * Initial ACLs for Newly Created Mailboxes
+
+ * Login Authentication
+
+ * Anonymous Logins
+ * Kerberos Logins
+ * Unix Logins
+
+ * Quotas
+
+ * Supports Quotas on Storage
+ * Quota Roots
+ * Mail Delivery Behavior
+ * Quota Warnings Upon Select When User Has "d" Rights
+ * Quotas and Partitions
+
+ * New Mail Notification
+ * Partitions
+
+ * Specifying Partitions with "create"
+ * Changing Partitions with "rename"
+
+ * News
+ * POP3 Server
+ * The syslog facility
+ * Mail Directory Recovery
+
+ * Reconstructing Mailbox Directories
+ * Reconstructing the Mailboxes File
+ * Reconstructing Quota Roots
+ * Removing Quota Roots
+ * Subscriptions
+
+ * Configuration Directory
+
+ * "log" Directory
+ * "proc" Directory
+
+ * Message Delivery
+
+ * Local Mail Transfer Protocol
+ * Single Instance Store
+ * Duplicate Delivery Suppression
+ * Sieve, a Mail Filtering Language
+
+Mailbox Namespace
+
+ By default, the Cyrus IMAP server presents mailboxes using the netnews
+ namespace convention. Mailbox names are case-sensitive. A mailbox name
+ may not start or end with a "." character, nor may it contain two "."
+ characters in a row.
+
+ In this implementation, non-ASCII characters and shell metacharacters
+ are not permitted in mailbox names.
+
+ Optionally, the server can present mailboxes using the UNIX hierarchy
+ convention.
+
+Standard (Internal) Namespace
+
+ All personal mailboxes for user "bovik" begin with the string
+ "user.bovik.". For example, if user "bovik" had a personal "work"
+ mailbox, it would be called "user.bovik.work". To user "bovik",
+ however, the prefix "user.bovik." normally appears as "INBOX.". The
+ mailbox "user.bovik.work" would therefore appear as "INBOX.work". If
+ the access control list of the mailbox permitted other users to see
+ that mailbox, it would appear to them as "user.bovik.work".
+
+ The mailbox "user.bovik" is where the user "bovik" normally receives
+ new mail, and normally appears to user "bovik" as "INBOX". The mailbox
+ "user.bovik" is referred to in this document as user "bovik"'s INBOX.
+
+ Administrators create and delete users by creating and deleting the
+ users' INBOX. If a user has an INBOX, then they are allowed to
+ subscribe to mailboxes. Only users without dots in their userid are
+ permitted to have an INBOX. (A user with a dot in their userid would be
+ able to login but would not be able to receive mail. Note that when
+ using the unix hierarchy seperator, this is not the case, and any user
+ may have a dot in their userid.)
+
+ When an administrator deletes a user's INBOX, all of the user's
+ personal mailboxes are deleted as well.
+
+ With the one notable exception of INBOX, all mailbox names are
+ system-wide--they refer to the same mailbox regardless of the user.
+ Access control lists determine which users can access or see which
+ mailboxes. Using
+
+ In contexts which permit relative mailbox names, the mailbox namespace
+ works as follows:
+
+ * Names that do not start with "." are fully qualified.
+ * Names that start with "." are relative to the current context.
+
+ Thus, if you are working with folder names and the top of the hierarchy
+ is named "cmu.", the name "comp.infosystems.www" resolves to
+ "comp.infosystems.www" and the name ".comp.infosystems.www" resolves to
+ "cmu.comp.infosystems.www".
+
+Alternate Namespace
+
+ The Cyrus IMAP server can also use an alternate namespace which allows
+ a user's personal mailboxes to appear as if they reside at the same
+ level as that user's INBOX as opposed to children of it. With this
+ feature, it may appear that there are non-unique names for mailboxes
+ between users (2 different users may each have a top level "work"
+ mailbox), but the internal representation is still user.name.work.
+
+Access Control Lists
+
+ Access to each mailbox is controlled by each mailbox's access control
+ list. Access Control Lists (ACLs) provide a powerful mechanism for
+ specifying the users or groups of users who have permission to access
+ the mailboxes. An ACL is a list of zero or more entries. Each entry has
+ an identifier and a set of rights. The identifier specifies the user or
+ group of users for which the entry applies. The set of rights is one or
+ more letters or digits, each letter or digit conferring a particular
+ privilege.
+
+Access Rights
+
+ The defined rights are:
+
+ l lookup - The user may see that the mailbox exists.
+ r read - The user may read the mailbox. The user may select the
+ mailbox, fetch data, perform searches, and copy messages from
+ the mailbox.
+ s seen - Keep per-user seen state. The "Seen" and "Recent" flags
+ are preserved for the user.
+ w write - The user may modify flags and keywords other than
+ "Seen" and "Deleted" (which are controlled by other sets of
+ rights).
+ i insert - The user may insert new messages into the mailbox.
+ p post - The user may send mail to the submission address for the
+ mailbox. This right differs from the "i" right in that the
+ delivery system inserts trace information into submitted
+ messages.
+ c create - The user may create new sub-mailboxes of the mailbox,
+ or delete or rename the current mailbox.
+ d delete - The user may store the "Deleted" flag, and perform
+ expunges.
+ a administer - The user may change the ACL on the mailbox.
+
+ You can combine access rights in different ways. For example:
+
+ lrs The user can read the mailbox.
+
+ lrsp The user can read the mailbox, and can post to it through the
+ delivery system. Most delivery systems do not provide
+ authentication, so the "p" right usually has meaning only for
+ the "anonymous" user.
+
+ lr The user can see the mailbox and can read it, but the server
+ does not preserve the "Seen" and "Recent" flags. This set of
+ rights is primarily useful for "anonymous IMAP."
+
+ rs The user can read the mailbox and the server preserves the
+ "Seen" and "Recent" flags, but the mailbox is not visible to
+ the user through the various mailbox listing commands. The user
+ must know the name of the mailbox to be able to access it.
+
+ lrsip The user can read and append to the mailbox, either through
+ IMAP, or through the delivery system.
+
+Identifiers
+
+ The identifier part of an ACL entry specifies the user or group for
+ which the entry applies.
+
+ There are two special identifiers, "anonymous", and "anyone", which are
+ explained below. The meaning of other identifiers usually depends on
+ the authorization mechanism being used (selected by --with-auth at
+ compile time, defaulting to Unix).
+
+"anonymous" and "anyone"
+
+ With any authorization mechanism, two special identifiers are defined.
+ The identifier "anonymous" refers to the anonymous, or unauthenticated
+ user. The identifier "anyone" refers to all users, including the
+ anonymous user.
+
+Kerberos vs. Unix Authorization
+
+ The Cyrus IMAP server comes with four authorization mechanisms, one is
+ compatible with Unix-style ("/etc/passwd") authorization, one for use
+ with Kerberos 4, one for use with Kerberos 5, and one for use with an
+ external authorization process (ptloader) which can interface with
+ other group databases (e.g. AFS PTS groups, LDAP Groups, etc).
+
+ Note that authorization is not authentication. Authentication is the
+ act of proving who you are. Authorization is the act of determining
+ what rights you have. Authentication is discussed in the Login
+ Authentication part of this document.
+
+ In the Unix authorization mechanism, identifiers are either a valid
+ userid or the string "group": followed by a group listed in
+ "/etc/group". Thus:
+
+ root Refers to the user root
+ group:staff Refers to the group staff
+
+ It is also possible to use unix groups with users authenticated through
+ a non-/etc/passwd backend. Note that using unix groups in this way
+ (without associated /etc/passwd entries) is not recommended.
+
+ Using the Kerberos authorization mechanism, identifiers are of the
+ form:
+
+ principal.instance at realm
+
+ If ".instance" is omitted, it defaults to the null string. If "@realm"
+ is omitted, it defaults to the local realm.
+
+ The file "/etc/krb.equiv" contains mappings between Kerberos
+ principals. The file contains zero or more lines, each containing two
+ fields. Any identity matching the first field of a line is changed to
+ the second identity during canonicalization. For example, a line in
+ "/etc/krb.equiv" of:
+
+ bovik at REMOTE.COM bovik
+
+ will cause the identity "bovik at REMOTE.COM" to be treated as if it were
+ the local identity "bovik".
+
+ A site may wish to write their own authorization mechanism, perhaps to
+ implement a local group mechanism. If it does so (by implementing an
+ auth_[whatever] module), it will dictate its own form and meaning of
+ identifiers.
+
+Negative Rights
+
+ Any of the above defined identifiers may be prefixed with a "-"
+ character. The associated rights are then removed from that identifier.
+ These are referred to as "negative rights".
+
+Calculating Users' Rights
+
+ To calculate the set of rights granted to a user, the server first
+ calculates the union of all of the rights granted to the user and to
+ all groups the user is a member of. The server then calculates and
+ removes the union of all the negative rights granted to the user and to
+ all groups the user is a member of.
+
+ For example, given the ACL:
+
+ anyone lrsp
+ fred lwi
+ -anonymous s
+
+ The user "fred" will be granted the rights "lrswip" and the anonymous
+ user will be granted the rights "lrp".
+
+Implicit Rights for Administrators on Personal Mailboxes
+
+ Regardless of the ACL on a mailbox, users who are listed in the
+ "admins" configuration option in "/etc/imapd.conf" implicitly have the
+ "l" and "a" rights on all mailboxes. Users also implicitly have the "l"
+ and "a" rights on their INBOX and all of their personal mailboxes.
+
+Initial ACLs for Newly Created Mailboxes
+
+ When a mailbox is created, its ACL starts off with a copy of the ACL of
+ its closest parent mailbox. When a user is created, the ACL on the
+ user's INBOX starts off with a single entry granting all rights to the
+ user. When a non-user mailbox is created and does not have a parent,
+ its ACL is initialized to the value of the "defaultacl" option in
+ "/etc/imapd.conf"
+
+ Note that some rights are available implicitly, for example 'anonymous'
+ always has 'p' on user INBOXes, and users always have rights on
+ mailboxes within their INBOX hierarchy.
+
+Login Authentication
+
+ This section discusses different types of authentication (ways of
+ logging in) that can be used with Cyrus IMAP.
+
+ The Cyrus IMAP server uses the Cyrus SASL library for authentication.
+ This section describes how to configure SASL with use with Cyrus imapd.
+ Please consult the Cyrus SASL System Administrator's Guide for more
+ detailed, up-to-date information.
+
+Anonymous Logins
+
+ Regardless of the SASL mechanism used by an individual connection, the
+ server can support anonymous login. If the "allowanonymouslogin" option
+ in "/etc/imapd.conf" is turned on, then the server will permit
+ plaintext password logins using the user "anonymous" and any password.
+ Additionally, the server will enable any SASL mechanisms that allow
+ anonymous logins.
+
+Plaintext Authentication
+
+ The SASL library has several ways of verifying plaintext passwords
+ Plaintext passwords are passed either by the IMAP LOGIN command or by
+ the SASL PLAIN mechanism (under a TLS layer).
+
+ * PAM
+ * Kerberos v4 Plaintext passwords are verified by obtaining a ticket
+ for the server's Kerberos identity, to protect against Kerberos
+ server spoofing attacks.
+ * /etc/passwd
+ * /etc/shadow
+ * etc.
+
+ sasl_auto_transition automatically creates secrets for shared secret
+ authentication when given a password.
+
+ The method of plaintext password verification is always through the
+ SASL library, even in the case of the internal LOGIN command. This is
+ to allow the SASL library to be the only source of authentication
+ information. You'll want to look at the sasl_pwcheck_method option in
+ the SASL documentation to understand how to configure a plaintext
+ password verifier for your system.
+
+ To disallow the use of plaintext passwords for authentication, you can
+ set allowplaintext: no in imapd.conf. This will still allow PLAIN under
+ TLS, but IMAP LOGIN commands will now fail.
+
+Kerberos Logins
+
+ The Kerberos SASL mechanism supports the KERBEROS_V4 authentication
+ mechanism. The mechanism requires that a srvtab file exist in the
+ location given in the "srvtab" configuration option. The srvtab file
+ must be readable by the Cyrus server and must contain a
+ "imap.<host>@<realm>" service key, where <host> is the first component
+ of the server's host name and <realm> is the server's Kerberos realm.
+
+ The server will permit logins by identities in the local realm and
+ identities in the realms listed in the "loginrealms" option in
+ "/etc/imapd.conf".
+
+ The file "/etc/krb.equiv" contains mappings between Kerberos
+ principals. The file contains zero or more lines, each containing two
+ fields. Any identity matching the first field of a line is permitted to
+ log in as the identity in the second field.
+
+ If the "loginuseacl" configuration option is turned on, than any
+ Kerberos identity that is granted the "a" right on the user's INBOX is
+ permitted to log in as that user.
+
+Shared Secrets Logins
+
+ Some mechanisms require the user and the server to share a secret
+ (generally a password) that can be used for comparison without actually
+ passing the password in the clear across the network. For these
+ mechanism (such as CRAM-MD5 and DIGEST-MD5), you will need to supply a
+ source of passwords, such as the sasldb (which is described more fully
+ in the Cyrus SASL distribution)
+
+Quotas
+
+ Quotas allow server administrators to limit resources used by
+ hierarchies of mailboxes on the server.
+
+Supports Quotas on Storage
+
+ The Cyrus IMAP server supports quotas on storage, which is defined as
+ the number of bytes of the relevant RFC-822 messages, in kilobytes.
+ Each copy of a message is counted independently, even when the server
+ can conserve disk space use by making hard links to message files. The
+ additional disk space overhead used by mailbox index and cache files is
+ not charged against a quota.
+
+Quota Roots
+
+ Quotas are applied to quota roots, which can be at any level of the
+ mailbox hierarchy. Quota roots need not also be mailboxes.
+
+ Quotas on a quota root apply to the sum of the usage of any mailbox at
+ that level and any sub-mailboxes of that level that are not underneath
+ a quota root on a sub-hierarchy. This means that each mailbox is
+ limited by at most one quota root.
+
+ For example, if the mailboxes
+
+ user.bovik
+ user.bovik.list.imap
+ user.bovik.list.info-cyrus
+ user.bovik.saved
+ user.bovik.todo
+
+ exist and the quota roots
+
+ user.bovik
+ user.bovik.list
+ user.bovik.saved
+
+ exist, then the quota root "user.bovik" applies to the mailboxes
+ "user.bovik" and "user.bovik.todo"; the quota root "user.bovik.list"
+ applies to the mailboxes "user.bovik.list.imap" and
+ "user.bovik.list.info-cyrus"; and the quota root "user.bovik.saved"
+ applies to the mailbox "user.bovik.saved".
+
+ Quota roots are created automatically when they are mentioned in the
+ "setquota" command. Quota roots may not be deleted through the
+ protocol, see Removing Quota Roots for instructions on how to delete
+ them.
+
+Mail Delivery Behavior
+
+ Normally, in order for a message to be inserted into a mailbox, the
+ quota root for the mailbox must have enough unused storage so that
+ inserting the message will not cause the block quota to go over the
+ limit.
+
+ Mail delivery is a special case. In order for a message to be delivered
+ to a mailbox, the quota root for the mailbox must not have usage that
+ is over the limit. If the usage is not over the limit, then one message
+ may be delivered regardless of its size. This puts the mailbox's usage
+ over the quota, causing a user to be informed of the problem and
+ permitting them to correct it. If delivery were not permitted in this
+ case, the user would have no practical way of knowing that there was
+ mail that could not be delivered.
+
+ If the usage is over the limit, then the mail delivery will fail with a
+ temporary error. This will cause the delivery system to re-attempt
+ delivery for a couple of days (permitting the user time to notice and
+ correct the problem) and then return the mail to the sender.
+
+Quota Warnings Upon Select When User Has "d" Rights
+
+ When a user selects a mailbox whose quota root has usage that is close
+ to or over the limit and the user has "d" rights on the mailbox, the
+ server will issue an alert notifying the user that usage is close to or
+ over the limit. The threshold of usage at which the server will issue
+ quota warnings is set by the "quotawarn" configuration option.
+
+ The server only issues warnings when the user has "d" rights because
+ only users with "d" rights are capable of correcting the problem.
+
+Quotas and Partitions
+
+ Quota roots are independent of partitions. A single quota root can
+ apply to mailboxes in different partitions.
+
+New Mail Notification
+
+ The Cyrus IMAP server comes with a notification daemon which supports
+ multiple mechanisms for notifying users of new mail. Notifications can
+ be configured to be sent upon normal delivery ("MAIL" class) and/or
+ sent as requested by a Sieve script ("SIEVE" class).
+
+ By default, both types of notifications are disabled. Notifications are
+ enabled by using one or both of the following configuration options:
+
+ * the "mailnotifier" option selects the notifyd method to use for
+ "MAIL" class notifications
+ * the "sievenotifier" option selects the notifyd method to use for
+ "SIEVE" class notifications (when no method is specified by the
+ Sieve action)
+
+Partitions
+
+ Partitions allow administrators to store different mailboxes in
+ different parts of the Unix filesystem. This is intended to be used to
+ allow hierarchies of mailboxes to be spread across multiple disks.
+
+Specifying Partitions with "create"
+
+ When an administrator creates a new mailbox, the name of the partition
+ for the mailbox may be specified using an optional second argument to
+ the "create" command. Non-administrators are not permitted to specify
+ the partition of a mailbox. If the partition is not specified, then the
+ mailbox inherits the partition of its most immediate parent mailbox. If
+ the mailbox has no parent, it gets the partition specified in the
+ "defaultpartition" configuration option.
+
+ The optional second argument to the "create" command can usually be
+ given only when using a specialized Cyrus-aware administrative client
+ such as cyradm.
+
+Changing Partitions with "rename"
+
+ An administrator may change the partition of a mailbox by using the
+ rename command with an optional third argument. When a third argument
+ to rename is given, the first and second arguments can be the
+ same--this changes the partition of a mailbox without changing its
+ name. If a third argument to rename is not given and the first argument
+ is not "INBOX", the partition of a mailbox does not change. If a third
+ argument to rename is not given and the first argument is "INBOX", the
+ newly created mailbox gets the same partition it would get from the
+ "create" command.
+
+News
+
+ Cyrus has the ability to export Usenet via IMAP and/or export shared
+ IMAP mailboxes via an NNTP server which is included with Cyrus. For
+ more information on exporting news groups through the IMAP server, see
+ install-netnews.html.
+
+POP3 Server
+
+ The Cyrus IMAP server software comes with a compatibility POP3 server.
+ Due to limitations in the POP3 protocol, the server can only access a
+ user's INBOX and only one instance of a POP3 server may exist for any
+ one user at any time. While a POP3 server has a user's INBOX open,
+ expunge operations from any concurrent IMAP session will fail.
+
+ When Kerberos login authentication is being used, the POP3 server uses
+ the server identity "pop.host at realm" instead of "imap.host at realm",
+ where "host" is the first component of the server's host name and
+ "realm" is the server's Kerberos realm. When the POP3 server is invoked
+ with the "-k" switch, the server exports MIT's KPOP protocol instead of
+ generic POP3.
+
+The syslog facility
+
+ The Cyrus IMAP server software sends log messages to the "local6"
+ syslog facility. The severity levels used are:
+
+ * CRIT - Critical errors which probably require prompt administrator
+ action
+ * ERR - I/O errors, including failure to update quota usage. The
+ syslog message includes the specific file and Unix error.
+ * WARNING - Protection mechanism failures, client inactivity timeouts
+ * NOTICE - Authentications, both successful and unsuccessful
+ * INFO - Mailbox openings, duplicate delivery suppression
+
+Mail Directory Recovery
+
+ This section describes the various databases used by the Cyrus IMAP
+ server software and what can be done to recover from various
+ inconsistencies in these databases.
+
+Reconstructing Mailbox Directories
+
+ The largest database is the mailbox directories. Each mailbox directory
+ contains the following files:
+
+ message files
+ There is one file per message, containing the message in RFC
+ 822 format. Lines in the message are separated by CRLF, not
+ just LF. The file name of each message is the message's UID
+ followed by a dot (.).
+
+ In netnews newsgroups, the message files instead follow the
+ format and naming conventions imposed by the netnews software.
+
+ cyrus.header
+ This file contains a magic number and variable-length
+ information about the mailbox itself.
+
+ cyrus.index
+ This file contains fixed-length information about the mailbox
+ itself and each message in the mailbox.
+
+ cyrus.cache
+ This file contans variable-length information about each
+ message in the mailbox.
+
+ cyrus.seen
+ This file contains variable-length state information about each
+ reader of the mailbox who has "s" permissions.
+
+ The "reconstruct" program can be used to recover from corruption in
+ mailbox directories. If "reconstruct" can find existing header and
+ index files, it attempts to preserve any data in them that is not
+ derivable from the message files themselves. The state "reconstruct"
+ attempts to preserve includes the flag names, flag state, and internal
+ date. "Reconstruct" derives all other information from the message
+ files.
+
+ An administrator may recover from a damaged disk by restoring message
+ files from a backup and then running reconstruct to regenerate what it
+ can of the other files.
+
+ The "reconstruct" program does not adjust the quota usage recorded in
+ any quota root files. After running reconstruct, it is advisable to run
+ "quota -f" (described below) in order to fix the quota root files.
+
+Reconstructing the Mailboxes File
+
+ NOTE: CURRENTLY UNAVAILABLE
+
+ The mailboxes file in the configuration directory is the most critical
+ file in the entire Cyrus IMAP system. It contains a sorted list of each
+ mailbox on the server, along with the mailboxes quota root and ACL. To
+ reconstruct a corrupted mailboxes file, run the "reconstruct -m"
+ command. The "reconstruct" program, when invoked with the "-m" switch,
+ scavenges and corrects whatever data it can find in the existing
+ mailboxes file. It then scans all partitions listed in the imapd.conf
+ file for additional mailbox directories to put in the mailboxes file.
+
+ The cyrus.header file in each mailbox directory stores a redundant copy
+ of the mailbox ACL, to be used as a backup when rebuilding the
+ mailboxes file.
+
+Reconstructing Quota Roots
+
+ The subdirectory "quota" of the configuration directory (specified in
+ the "configdirectory" configuration option) contains one file per quota
+ root, with the file name being the name of the quota root. These files
+ store the quota usage and limits of each of the quota roots.
+
+ The "quota" program, when invoked with the "-f" switch, recalculates
+ the quota root of each mailbox and the quota usage of each quota root.
+
+Removing Quota Roots
+
+ To remove a quota root, remove the quota root's file. Then run "quota
+ -f" to make the quota files consistent again.
+
+Subscriptions
+
+ The subdirectory "user" of the configuration directory contains user
+ subscriptions. There is one file per user, with a filename of the
+ userid followed by ".sub". Each file contains a sorted list of
+ subscribed mailboxes.
+
+ There is no program to recover from damaged subscription files. A site
+ may recover from lost subscription files by restoring from backups.
+
+Configuration Directory
+
+ Many objects in the configuration directory are discussed in the
+ Database Recovery section. This section documents two other directories
+ that reside in the configuration directory.
+
+"log" Directory
+
+ The subdirectory "log" under the configuration directory permits
+ administrators to keep protocol telemetry logs on a per-user basis.
+
+ If a subdirectory of "log" exists with the same name as a user, the
+ IMAP and POP3 servers will keep a telemetry log of protocol sessions
+ authenticating as that user. The telemetry log is stored in the
+ subdirectory with a filename of the server process-id and starts with
+ the first command following authentication.
+
+"proc" Directory
+
+ The subdirectory "proc" under the configuration directory contains one
+ file per active server process. The file name is the ASCII
+ representation of the process id and the file contains the following
+ tab-separated fields:
+
+ * hostname of the client
+ * login name of the user, if logged in
+ * selected mailbox, if a mailbox is selected
+
+ The file may contain arbitrary characters after the first newline
+ character.
+
+ The "proc" subdirectory is normally be cleaned out on server reboot.
+
+Message Delivery
+
+ Mail transport agents such as Sendmail, Postfix, or Exim communicate
+ with the Cyrus server via LMTP (the Local Mail Transport Protocol)
+ implemented by the LMTP daemon. This can be done either directly by the
+ MTA (prefered, for performance reasons) or via the deliver LMTP client.
+
+Local Mail Transfer Protocol
+
+ LMTP, the Local Mail Transfer Protocol, is a variant of SMTP design for
+ transferring mail to the final message store. LMTP allows MTAs to
+ deliver "local" mail over a network. This is an easy optimization so
+ that the IMAP server doesn't need to maintain a queue of messages or
+ run an MTA.
+
+ The Cyrus server implements LMTP via the lmtpd daemon. LMTP can either
+ be used over a network via TCP or local via a UNIX domain socket. There
+ are security differnces between these two alternatives; read more below
+
+ For final delivery via LMTP over a TCP socket, it is necessary to use
+ LMTP AUTH. This is accomplished using SASL to authenticate the
+ delivering user. If your mail server is performing delivery via LMTP
+ AUTH (that is, using a SASL mechanism), you will want their
+ authentication id to be an LMTP admins (either via the admins
+ imapd.conf option or via the <service>_admins option, typically
+ lmtp_admins).
+
+ Alternatively you may deliver via LMTP to a unix domain socket, and the
+ connection will be preauthenticated as an administrative user (and
+ access control is accomplished by controlling access to the socket).
+
+ Note that if a user has a sieve script, the sieve script runs
+ authorized as *that* user, and the rights of the posting user are
+ ignored for the purposes of determining the outcome of the sieve
+ script.
+
+Single Instance Store
+
+ If a delivery attempt mentions several recipients (only possible if the
+ MTA is speaking LMTP to lmtpd), the server attempts to store as few
+ copies of a message as possible. It will store one copy of the message
+ per partition, and create hard links for all other recipients of the
+ message.
+
+ Single instance store can be turned off by using the
+ "singleinstancestore" flag in the configuration file.
+
+Duplicate Delivery Suppression
+
+ A message is considered a duplicate if two copies of a message with the
+ same message-id and the same envelope receipient are received. Cyrus
+ uses the duplicate delivery database to hold this information, and it
+ looks approximately 3 days back in the default install.
+
+ Duplicate delivery suppression can be turned off by using the
+ "duplicatesuppression" flag in the configuration file.
+
+Sieve, a Mail Filtering Language
+
+ Sieve is a mail filtering language that can filter mail into an
+ appropriate IMAP mailbox as it is delivered via lmtp. For more
+ information, look here.
+
+Cyrus Murder, the IMAP Aggregator
+
+ Cyrus now supports the distribution of mailboxes across a number of
+ IMAP servers to allow for horizontal scalability. For information on
+ setting up this configuration, see here.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/questions
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/questions?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/questions (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/questions Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+ questions we really should answer. if you feel like doing us a favor,
+ sit down and answer one.
+
+ * why is it so hard to get imapd working with redhat's shadow
+ password implementation?
+ * When does imapd advertise PLAIN? when does it accept plaintext
+ logins?
+ * What are the advantages of LMTP?
+ * How do I configure Sendmail to use LMTP?
+ * How do I configure Postfix to work with Cyrus? To use LMTP?
+ * How can I run LMTP over TCP? Why should I want to?
+ * What are the performance implications of single-instance store? (in
+ effect as of 1.6.22) How should I configure partitions to deal with
+ a large number of users?
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/readme
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/readme?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/readme (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/readme Sat Aug 26 02:00:13 2006
@@ -1,0 +1,167 @@
+ Cyrus IMAP Server Release Information
+
+ IMAP (Internet Message Access Protocol) is an Internet standards-track
+ protocol for accessing messages (mail, bboards, news, etc). The Cyrus
+ IMAP server differs from other IMAP server implementations in that it
+ is generally intended to be run on "sealed" servers, where normal users
+ are not permitted to log in. The mailbox database is stored in parts of
+ the filesystem that are private to the Cyrus IMAP system. All user
+ access to mail is through the IMAP, NNTP, POP3, or KPOP protocols.
+
+ The private mailbox database design gives the server large advantages
+ in efficiency, scalability, and administratability. Multiple concurrent
+ read/write connections to the same mailbox are permitted. The server
+ supports access control lists on mailboxes and storage quotas on
+ mailbox hierarchies.
+
+Features
+
+ The Cyrus server supports the IMAP4rev1 protocol described in RFC 3501.
+ IMAP4rev1 has been approved as a proposed standard.
+
+ Character sets supported for searching are: us-ascii, iso-8859-1,
+ iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7,
+ iso-8859-8, iso-8859-9, koi8-r, iso-2022-jp, iso-2022-kr, gb2312, big5,
+ iso-8859-15, windows-1252, windows-1256. The character mapping tables
+ most likely contain errors.
+
+ The server supports any authentication mechanism available from the
+ SASL library. Currently, support includes: KERBEROS_V4, GSSAPI,
+ CRAM-MD5, DIGEST-MD5, OTP, PLAIN, and STARTTLS.
+
+ The server supports imaps/pop3s/nntps (IMAP/POP3/NNTP encrypted using
+ SSL).
+
+ The server makes an attempt to do single instance store where possible
+ when an email message is addressed to multiple recipients.
+
+ We current support the following IMAP capabilities: IMAP4 IMAP4rev1 ACL
+ RIGHTS=kxte QUOTA LITERAL+ NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME
+ UNSELECT CHILDREN MULTIAPPEND SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT
+ THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE URLAUTH IDLE STARTTLS
+ SASL-IR.
+
+ The server supports SIEVE for server side email filtering.
+
+Upgrade Caveats
+
+ This section reserved for WARNING WARNING WARNING comments.
+ Note that the replication protocol currently does not have the facility
+ to support the IMAP CONDSTORE extension (modification sequences). It is
+ recommended that you do not try to use both CONDSTORE and replication
+ at this time. The deficiencies in the replication protocol will be
+ fixed in version 2.3.8.
+
+Installation Overview
+
+ This system should be expected to have the same order-of-magnitude
+ installation complexity as a netnews system. Maintenance should have
+ similar complexity, except administrators will have to deal with
+ creation and deletion of users and will have the option of managing
+ quotas and access control lists.
+
+ This package is distributed as a source only release. It is expected
+ that you can compile and configure software. Installation instructions
+ are in the install.html. Please be sure to read this document.
+
+ A detailed overview of the server is available in overview.html.
+
+ This server has been successfully installed on a number of Unix
+ systems. We run the software under SPARC Solaris 2.7. Please refer to
+ os.html for operating system specific issues.
+
+Server Notes
+
+ The mailbox namespace is like that for netnews--hierarchical names
+ separated by the "." character. Mailboxes without a parent may only be
+ created by an administrator. Mailboxes with a parent may be created as
+ the ACL (Access Control List) on the parent mailbox permits.
+
+ Users' personal mailboxes are under the "user" hierarchy. The names of
+ the personal mailboxes for user "bovik" all start with the prefix
+ "user.bovik.". The mailbox "user.bovik" is special in that it is
+ presented to user "bovik" as if it were named "INBOX". Creating the
+ mailbox "user.bovik" is equivalent to creating an account for user
+ "bovik"--it permits "bovik" to receive mail, create personal mailboxes,
+ and subscribe to mailboxes. Deleting the mailbox "user.bovik" has the
+ special-case side-effect of deleting all mailboxes starting with
+ "user.bovik." and of deleting the subscriptions for "bovik."
+
+Licensing Information
+
+ The following copyright applies to the code:
+
+ * Copyright (c) 1994-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ If you find this software useful and valuable in your work, we would
+ welcome any support you can offer toward continuing this work. We
+ gratefully accept contributions, whether intellectual or monetary.
+ Intellectual contributions in the form of code or constructive
+ collaboration can be directed via the feedback page.
+
+ If you wish to provide financial support to the Cyrus Project, send a
+ check payable to "Carnegie Mellon University" to
+
+ Project Cyrus
+ Computing Services
+ Carnegie Mellon University
+ 5000 Forbes Ave
+ Pittsburgh, PA 15213
+ USA
+
+Summary
+
+ If you want to install the server, be sure to read the installation
+ instructions in install.html.
+
+ More details about the server implementation is in the server overview
+ document.
+
+ Please refer to Sending Feedback if you would like to submit a bug,
+ feature request or (best of all) patch.
+
+ There is a mailing list. See the mailing list document for details.
+
+ A list of known problems can be found in the bugs file.
+
+ O'Reilly has a book out named Managing IMAP. While the book does not
+ directly talk about the 2.0 code base, it provides very good
+ information on the configuration and setup that can be applied to the
+ newer code.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve Sat Aug 26 02:00:13 2006
@@ -1,0 +1,12 @@
+ Sieve: A mail filtering language
+
+ Sieve is a Internet standards-track protocol for filtering messages on
+ delivery. The Cyrus Sieve implementation supports filing messages into
+ specific folders, forwarding messages, rejecting messages, and the
+ standard vacation function. It can reply to messages based on headers
+ or envelope information.
+
+Cyrus Sieve
+
+Some simple sample Sieve scripts
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve-protocol
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve-protocol?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve-protocol (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/sieve-protocol Sat Aug 26 02:00:13 2006
@@ -1,0 +1,56 @@
+Protocol for Sieve script exchange
+
+ Please note that this document is not authoritative and may well be out
+ of date, you should look at specs.html for the current authoritative
+ document for the MANAGESIEVE protocol. Note: This is not a standards
+ track protocol. If you decide to base a program upon it you have been
+ warned. This is a simple text-based protocol for getting user sieve
+ scripts onto the (presumably sealed) IMAP server. The requirements for
+ this process are:
+
+ * the user must authenticate to gain access, preferably via a secure
+ SASL mechanism.
+ * only valid sieve scripts may be accepted
+
+ Additional features provided:
+
+ * the ability to manage multiple scripts on the server with zero or
+ one of them being the "active" sieve script
+
+Types
+
+ This a line oriented protocol much like [IMAP] or [ACAP]. There are two
+ types: ATOMS and strings. Strings may be quoted or literal. See [ACAP]
+ for detailed descriptions.
+ sievename is a string where only certain characters are allowed and it
+ must be at least 1 character long.
+
+Commands
+
+ AUTHENTICATE SP string [SP string] EOL
+ SASL authentication; the parameters are the mechanism and
+ optionally the initial data. Initial data is base64 encoded.
+ The server replies with a OK or NO response, or a string base64
+ encoded followed by an EOL. Client then replies with a string
+ base64 encoded followed by an EOL and the procedure is
+ repeated.
+ NOOP EOL
+ No side affects. OK, NO replies
+ LOGOUT EOL
+ Logout, terminates connection. OK, NO replies.
+ GETSCRIPT SP sievename EOL
+ The parameter is the name of the requested script. Returns:
+ string EOL containing the script data. Get the script with name
+ sievename from the server. OK, NO replies
+ PUTSCRIPT SP sievename SP string EOL
+ Puts sievename with data data onto the server if possible. OK,
+ NO replies.
+ SETACTIVE SP sievename EOL
+ Set the script with the name sievename as the active script.
+ Any other script that was active is no longer. OK, NO replies
+ DELETESCRIPT SP sievename EOL
+ Delete the script with sievename. OK or NO replies.
+ LISTSCRIPTS EOL
+ returns zero or more: sievename EOL. where the active script
+ has a '*' at the end of it's name OK or NO replies
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/specs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/specs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/specs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/doc/text/specs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,175 @@
+Cyrus IMAP Server Protocol Specifications
+
+IMAP
+
+ RFC 3501 Internet Message Access Protocol - version 4rev1
+ being updated by rfc3501-errata
+
+ RFC 1730 Internet Message Access Protocol - version 4
+
+ RFC 4314 IMAP4 Access Control List (ACL) Extension
+
+ RFC 2087 IMAP4 QUOTA extension
+
+ RFC 2088 IMAP4 non-synchronizing literals
+
+ RFC 2177 IMAP4 IDLE command
+
+ RFC 2192 IMAP URL Scheme
+ being updated by draft-ietf-lemonade-rfc2192bis
+
+ RFC 2193 IMAP4 Mailbox Referrals
+
+ RFC 2342 IMAP4 Namespace
+
+ RFC 4315 Internet Message Access Protocol (IMAP) - UIDPLUS extension
+
+ RFC 2971 IMAP4 ID extension
+
+ RFC 3348 IMAP4 Child Mailbox Extension
+
+ RFC 3502 IMAP MULTIAPPEND extension
+
+ RFC 3516 IMAP4 Binary Content Extension
+
+ RFC 3691 Internet Message Access Protocol (IMAP) UNSELECT command
+
+ RFC 4467 Internet Message Access Protocol (IMAP) - URLAUTH Extension
+
+ RFC 4469 Internet Message Access Protocol (IMAP) CATENATE Extension
+
+ RFC 4550 Internet Email to Support Diverse Service Environments
+ (Lemonade) Profile
+
+ RFC 4551 IMAP Extension for Conditional STORE operation
+
+ draft-ietf-imapext-sort IMAP SORT and THREAD Extension
+
+ draft-ietf-imapext-list-extensions IMAP4 LIST Command Extensions
+
+ draft-daboo-imap-annotatemore IMAP ANNOTATEMORE Extension
+
+ draft-siemborski-imap-sasl-initial-response IMAP Extension for SASL
+ Initial Client Response
+
+POP
+
+ RFC 1939 Post Office Protocol - Version 3 (POP3)
+
+ RFC 1734 POP3 AUTHentication command
+ being updated by draft-siemborski-rfc1734bis
+
+ RFC 2449 POP3 Extension Mechanism
+
+ RFC 2595 Using TLS with IMAP, POP3 and ACAP
+
+ RFC 3206The SYS and AUTH POP Response Codes
+
+NNTP
+
+ RFC 977 Network News Transfer Protocol
+ being updated by draft-ietf-nntpext-base
+
+ RFC 2980 Common NNTP Extensions
+
+ draft-ietf-nntpext-streaming NNTP Extension for Streaming Feeds
+
+ draft-ietf-nntpext-authinfo NNTP Extension for Authentication
+
+ draft-ietf-nntpext-tls-nntp Using TLS with NNTP
+
+SASL
+
+ RFC 2222 Simple Authentication and Security Layer (SASL)
+ being revised by draft-ietf-sasl-rfc2222bis
+
+ RFC 2195 IMAP/POP AUTHorize Extension for Simple Challenge/Response
+ being revised by draft-ietf-sasl-crammd5
+
+ RFC 2245 Anonymous SASL Mechanism
+ being revised by draft-ietf-sasl-anon
+
+ RFC 2444 The One-Time-Password SASL Mechanism
+
+ RFC 2595 Using TLS with IMAP, POP3 and ACAP
+ being revised by draft-ietf-sasl-plain
+
+ RFC 2831 Using Digest Authentication as a SASL Mechanism
+ being revised by draft-ietf-sasl-rfc2831bis
+
+TLS/SSL
+
+ RFC 2246 The TLS Protocol Version 1.0
+ being revised by draft-ietf-tls-rfc2246-bis
+
+ draft-freier-ssl-version3 The SSL Protocol Version 3.0
+
+ draft-hickman-netscape-ssl The SSL Protocol Version 2.0
+
+LMTP
+
+ RFC 2033 Local Mail Transfer Protocol
+
+ RFC 2821 Simple Mail Transfer Protocol (SMTP)
+
+ RFC 1869 SMTP Service Extensions
+
+ RFC 1652 SMTP Service Extension for 8bit-MIMEtransport
+
+ RFC 1870 SMTP Service Extension for Message Size Declaration
+
+ RFC 2034 SMTP Service Extension for Returning Enhanced Error Codes
+
+ RFC 3463 Enhanced Mail System Status Codes
+
+ RFC 3207 SMTP Service Extension for Secure SMTP over TLS
+
+ RFC 2554 SMTP Service Extension for Authentication
+ being updated by draft-siemborski-rfc2554bis
+
+ RFC 2920 SMTP Service Extension for Command Pipelining
+
+ RFC 3848 ESMTP and LMTP Transmission Types Registration
+
+ draft-murchison-lmtp-ignorequota LMTP Service Extension for Ignoring
+ Recipient Quotas
+
+Sieve
+
+ RFC 3028 Sieve: A Mail Filtering Language
+ being updated by draft-ietf-sieve-3028bis
+
+ RFC 3431 Sieve Extension: Relational Tests
+
+ RFC 3598 Sieve Email Filtering -- Subaddress Extension
+ being updated by draft-ietf-sieve-rfc3598bis
+
+ RFC 3894 Sieve Extension: Copying Without Side Effects
+
+ RFC 2298 Extensible Message Format for Message Disposition
+ Notifications (MDNs)
+
+ draft-ietf-sieve-vacation Sieve Email Filtering: Vacation Extension
+
+ draft-ietf-sieve-body Sieve Mail Filtering Language: Body Extension
+
+ draft-ietf-sieve-regex Sieve -- Regular Expression Extension
+
+ draft-daboo-sieve-include SIEVE Include Extension
+
+ draft-melnikov-sieve-imapflags Sieve -- IMAP flag Extension
+
+ draft-martin-sieve-notify Sieve -- An extension for providing instant
+ notifications
+
+ draft-martin-managesieve Protocol for Remotely Managing Sieve Scripts
+
+Other
+
+ RFC 2822 Internet Message Format
+
+ RFC 1036 Standard for Interchange of USENET Messages
+ being updated by draft-ietf-usefor-usefor and draft-ietf-usefor-usepro
+
+ RFC 3656 MUPDATE Protocol (For Cyrus Murder)
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+Makefile
+compile_et
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,22 @@
+/.cvsignore/1.1/Sun Jan 6 02:03:30 2002//Tcyrus-release-2-3-7
+/Makefile.in/1.13/Tue Nov 27 02:24:56 2001//Tcyrus-release-2-3-7
+/com_err.3/1.2/Tue May 23 20:52:06 2000//Tcyrus-release-2-3-7
+/com_err.c/1.5.4.1/Tue May 25 01:28:00 2004//Tcyrus-release-2-3-7
+/com_err.h/1.3/Thu Feb 13 20:15:21 2003//Tcyrus-release-2-3-7
+/com_err.texinfo/1.1/Wed Jul 5 18:34:05 1995//Tcyrus-release-2-3-7
+/compile_et.1/1.2/Tue May 23 20:52:06 2000//Tcyrus-release-2-3-7
+/compile_et.sh/1.2/Tue May 23 20:52:06 2000//Tcyrus-release-2-3-7
+/config_script/1.2/Tue May 23 20:52:06 2000//Tcyrus-release-2-3-7
+/error_message.c/1.5.4.1/Tue May 25 01:28:00 2004//Tcyrus-release-2-3-7
+/error_table.h/1.3/Thu Feb 13 20:15:21 2003//Tcyrus-release-2-3-7
+/et_c.awk/1.1/Wed Jul 5 18:34:05 1995//Tcyrus-release-2-3-7
+/et_h.awk/1.1/Wed Jul 5 18:34:05 1995//Tcyrus-release-2-3-7
+/et_name.c/1.3/Thu Feb 13 20:15:21 2003//Tcyrus-release-2-3-7
+/init_et.c/1.3/Thu Feb 13 20:15:21 2003//Tcyrus-release-2-3-7
+/internal.h/1.3/Thu Feb 13 20:15:21 2003//Tcyrus-release-2-3-7
+/mit-sipb-copyright.h/1.1/Wed Jul 5 18:34:05 1995//Tcyrus-release-2-3-7
+/test1.et/1.1/Wed Jul 5 18:34:05 1995//Tcyrus-release-2-3-7
+/test2.et/1.1/Wed Jul 5 18:34:05 1995//Tcyrus-release-2-3-7
+/test_et.c/1.1/Wed Jul 5 18:34:05 1995//Tcyrus-release-2-3-7
+/texinfo.tex/1.1/Wed Jul 5 18:34:05 1995//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/et
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,139 @@
+# Makefile for error-table routines
+#
+# @configure_input@
+#
+# Copyright (c) 1996-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+ARCHIVE = ar cr
+
+AWK = @AWK@
+SED = sed
+
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+SHELL = /bin/sh
+
+LIBOBJS= error_message.o et_name.o init_et.o com_err.o
+# for et_lex.lex.c include in error_table.y
+LOCALINCLUDE=-I. -I.. -I$(srcdir)
+
+all: compile_et libcom_err.a
+
+install:
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) -I$(srcdir)/../lib -I. -I.. $(CFLAGS) $<
+
+# solaris make loses on com_err.c but not on init_et.c, but this helps
+com_err.o: com_err.c
+
+#
+# real entries...
+#
+
+compile_et: $(srcdir)/compile_et.sh $(srcdir)/config_script
+ $(srcdir)/config_script $(srcdir)/compile_et.sh $(AWK) $(SED) > compile_et
+ chmod 755 compile_et
+
+et_c.awk: $(srcdir)/et_c.awk
+ $(CP) $(srcdir)/et_c.awk et_c.awk
+
+et_h.awk: $(srcdir)/et_h.awk
+ $(CP) $(srcdir)/et_h.awk et_h.awk
+
+clean:
+ rm -f compile_et compile_et.o error_table.o
+ rm -f libcom_err.a
+ rm -f $(LIBOBJS)
+
+distclean: clean
+ rm -f compile_et compile_et.o error_table.o
+ rm -f libcom_err.a
+ rm -f $(LIBOBJS)
+ rm Makefile
+
+depend: compile_et
+
+#install:: com_err.h
+# $(INSTALLFILE) $(srcdir)/com_err.h $(DESTDIR)$(INCLDIR)/com_err.h
+#
+#install:: mit-sipb-copyright.h
+# $(INSTALLFILE) $(srcdir)/mit-sipb-copyright.h $(DESTDIR)$(INCLDIR)/mit-sipb-copyright.h
+#
+#install:: com_err.3
+# $(INSTALLFILE) $(srcdir)/com_err.3 $(DESTDIR)$(MANDIR)/man3/com_err.3
+#
+#install:: compile_et.1
+# $(INSTALLFILE) $(srcdir)/compile_et.1 $(DESTDIR)$(MANDIR)/man1/compile_et.1
+
+
+## install_library_target(com_err,$(LIBOBJS),$(LINTFILES),)
+
+libcom_err.a: $(LIBOBJS)
+ rm -f libcom_err.a
+ $(ARCHIVE) $@ $(LIBOBJS)
+ $(RANLIB) $@
+
+#install::
+# $(INSTALLLIB) libcom_err.a $(DESTDIR)$(LIBDIR)/libcom_err.a
+# $(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libcom_err.a
+# $(RANLIB) $(DESTDIR)$(LIBDIR)/libcom_err.a
+# $(CHMOD) 444 $(DESTDIR)$(LIBDIR)/libcom_err.a
+##
+
+libcom_err.o: $(LIBOBJS)
+ ld -r -s -o libcom_err.o $(LIBOBJS)
+ chmod -x libcom_err.o
+
+TAGS: et_name.c error_message.c compile_et.c error_table.c \
+ lex.yy.c init_et.c
+ etags et_name.c error_message.c compile_et.c \
+ error_table.c init_et.c
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.3
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.3?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.3 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.3 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,135 @@
+.\"
+.\" Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" Copyright (c) 1988 Massachusetts Institute of Technology,
+.\" Student Information Processing Board. All rights reserved.
+.\"
+.\" $Header: /cvs/src/cyrus/et/com_err.3,v 1.2 2000/05/23 20:52:06 robeson Exp $
+.\"
+.TH COM_ERR 3 "22 Nov 1988" SIPB
+.SH NAME
+com_err \- common error display routine
+.SH SYNOPSIS
+.nf
+ #include "com_err.h"
+.PP
+void com_err (whoami, code, format, ...);
+ const char *whoami;
+ long code;
+ const char *format;
+.PP
+proc = set_com_err_hook (proc);
+.fi
+void (*
+.I proc
+) (const char *, long, const char *, va_list);
+.nf
+.PP
+proc = reset_com_err_hook ();
+.PP
+void initialize_XXXX_error_table ();
+.fi
+.SH DESCRIPTION
+.I Com_err
+displays an error message on the standard error stream
+.I stderr
+(see
+.IR stdio (3S))
+composed of the
+.I whoami
+string, which should specify the program name or some subportion of
+a program, followed by an error message generated from the
+.I code
+value (derived from
+.IR compile_et (1)),
+and a string produced using the
+.I format
+string and any following arguments, in the same style as
+.IR fprintf (3).
+
+The behavior of
+.I com_err
+can be modified using
+.I set_com_err_hook;
+this defines a procedure which is called with the arguments passed to
+.I com_err,
+instead of the default internal procedure which sends the formatted
+text to error output. Thus the error messages from a program can all
+easily be diverted to another form of diagnostic logging, such as
+.IR syslog (3).
+.I Reset_com_err_hook
+may be used to restore the behavior of
+.I com_err
+to its default form. Both procedures return the previous ``hook''
+value. These ``hook'' procedures must have the declaration given for
+.I proc
+above in the synopsis.
+
+The
+.I initialize_XXXX_error_table
+routine is generated mechanically by
+.IR compile_et (1)
+from a source file containing names and associated strings. Each
+table has a name of up to four characters, which is used in place of
+the
+.B XXXX
+in the name of the routine. These routines should be called before
+any of the corresponding error codes are used, so that the
+.I com_err
+library will recognize error codes from these tables when they are
+used.
+
+The
+.B com_err.h
+header file should be included in any source file that uses routines
+from the
+.I com_err
+library; executable files must be linked using
+.I ``-lcom_err''
+in order to cause the
+.I com_err
+library to be included.
+
+.\" .IR for manual entries
+.\" .PP for paragraph breaks
+
+.SH "SEE ALSO"
+compile_et (1), syslog (3).
+
+Ken Raeburn, "A Common Error Description Library for UNIX".
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,187 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * Copyright 1987, 1988 by MIT Student Information Processing Board.
+ *
+ * For copyright info, see mit-sipb-copyright.h.
+ */
+
+#define IN_COM_ERR
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include "mit-sipb-copyright.h"
+
+#if defined(HAVE_STDARG_H) || defined(_WINDOWS)
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#define VARARGS
+#endif
+
+#include "error_table.h"
+#include "internal.h"
+
+struct et_list * _et_list = (struct et_list *) NULL;
+
+#ifdef notdef
+/*
+ * Protect us from header version (externally visible) of com_err, so
+ * we can survive in a <varargs.h> environment. I think.
+ */
+#define com_err com_err_external
+#include "com_err.h"
+#undef com_err
+#endif
+
+/* We have problems with varargs definitions if we include com_err.h */
+
+/*
+ * XXX for now, we define error_message by hand. Ultimately, we
+ * should fix up com_err.h so that it's safe to #include here
+ * directly.
+ */
+#if defined(__STDC__) || defined(_WINDOWS)
+extern char const * INTERFACE error_message (long);
+#else
+extern char * INTERFACE error_message ();
+#endif
+
+static void
+#if defined(__STDC__) || defined(_WINDOWS)
+ default_com_err_proc (const char *whoami, long code, const char *fmt, va_list args)
+#else
+ default_com_err_proc (whoami, code, fmt, args)
+ const char *whoami;
+ long code;
+ const char *fmt;
+ va_list args;
+#endif
+{
+ static char errbuf[1024]; /* For those w/o stdio */
+
+ *errbuf = '\0';
+ if (whoami) {
+ strcat (errbuf, whoami);
+ strcat (errbuf, ": ");
+ }
+ if (code) {
+ strcat (errbuf, error_message(code));
+ strcat (errbuf, " ");
+ }
+ if (fmt) {
+ vsprintf (errbuf + strlen (errbuf), fmt, args);
+ }
+#ifdef _WINDOWS
+ MessageBox (NULL, errbuf, "Kerboros", MB_ICONEXCLAMATION);
+#else
+ fputs (errbuf, stderr);
+ /* should do this only on a tty in raw mode */
+ putc('\r', stderr);
+ putc('\n', stderr);
+ fflush(stderr);
+#endif
+}
+
+#if defined(__STDC__) || defined(_WINDOWS)
+typedef void (*errf) (const char *, long, const char *, va_list);
+#else
+typedef void (*errf) ();
+#endif
+
+errf com_err_hook = default_com_err_proc;
+
+void com_err_va (whoami, code, fmt, args)
+ const char *whoami;
+ long code;
+ const char *fmt;
+ va_list args;
+{
+ (*com_err_hook) (whoami, code, fmt, args);
+}
+
+#ifndef VARARGS
+void INTERFACE_C com_err (const char *whoami,
+ long code,
+ const char *fmt, ...)
+{
+#else
+void INTERFACE_C com_err (va_alist)
+ va_dcl
+{
+ const char *whoami, *fmt;
+ long code;
+#endif
+ va_list pvar;
+
+ if (!com_err_hook)
+ com_err_hook = default_com_err_proc;
+#ifdef VARARGS
+ va_start (pvar);
+ whoami = va_arg (pvar, const char *);
+ code = va_arg (pvar, long);
+ fmt = va_arg (pvar, const char *);
+#else
+ va_start(pvar, fmt);
+#endif
+ com_err_va (whoami, code, fmt, pvar);
+ va_end(pvar);
+}
+
+errf set_com_err_hook (new_proc)
+ errf new_proc;
+{
+ errf x = com_err_hook;
+
+ if (new_proc)
+ com_err_hook = new_proc;
+ else
+ com_err_hook = default_com_err_proc;
+
+ return x;
+}
+
+errf reset_com_err_hook () {
+ errf x = com_err_hook;
+ com_err_hook = default_com_err_proc;
+ return x;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,103 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * Header file for common error description library.
+ *
+ * Copyright 1988, Student Information Processing Board of the
+ * Massachusetts Institute of Technology.
+ *
+ * Copyright 1995 by Cygnus Support.
+ *
+ * For copyright and distribution info, see the documentation supplied
+ * with this package.
+ */
+
+#ifndef __COM_ERR_H
+
+#ifndef HAVE_STDARG_H
+/* End-user programs may need this -- oh well */
+#if defined(__STDC__) || defined(_WINDOWS)
+#define HAVE_STDARG_H 1
+#endif
+#endif
+
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+/* This should be part of k5-config.h but many application
+ * programs are not including that file. We probably want to
+ * come up with a better way of handling this problem.
+ */
+#ifndef INTERFACE
+#ifdef _WINDOWS
+#define INTERFACE __far __export __pascal
+#define INTERFACE_C __far __export __cdecl
+#else
+#define INTERFACE
+#define INTERFACE_C
+#endif
+#endif
+#ifndef FAR
+#define FAR
+#endif
+
+#if defined(__STDC__) || defined(_WINDOWS)
+/* ANSI C -- use prototypes etc */
+extern void INTERFACE_C com_err (const char FAR *, long, const char FAR *, ...);
+extern char const FAR * INTERFACE error_message (long);
+extern void (*com_err_hook) (const char *, long, const char *, va_list);
+extern void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list)))
+ (const char *, long, const char *, va_list);
+extern void (*reset_com_err_hook ()) (const char *, long, const char *, va_list);
+#else
+/* no prototypes */
+extern void INTERFACE_C com_err ();
+extern char * INTERFACE error_message ();
+extern void (*com_err_hook) ();
+extern void (*set_com_err_hook ()) ();
+extern void (*reset_com_err_hook ()) ();
+#endif
+
+#define __COM_ERR_H
+#endif /* ! defined(__COM_ERR_H) */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.texinfo
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.texinfo?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.texinfo (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/com_err.texinfo Sat Aug 26 02:00:13 2006
@@ -1,0 +1,554 @@
+\input texinfo @c -*-texinfo-*-
+
+ at c $Header: /cvs/src/cyrus/et/com_err.texinfo,v 1.1 1995/07/05 18:34:05 jm36 Exp $
+ at c $Source: /cvs/src/cyrus/et/com_err.texinfo,v $
+ at c $Locker: $
+
+ at c Note that although this source file is in texinfo format (more
+ at c or less), it is not yet suitable for turning into an ``info''
+ at c file. Sorry, maybe next time.
+ at c
+ at c In order to produce hardcopy documentation from a texinfo file,
+ at c run ``tex com_err.texinfo'' which will load in texinfo.tex,
+ at c provided in this distribution. (texinfo.tex is from the Free
+ at c Software Foundation, and is under different copyright restrictions
+ at c from the rest of this package.)
+
+ at ifinfo
+ at barfo
+ at end ifinfo
+
+ at iftex
+ at tolerance 10000
+
+ at c Mutate section headers...
+ at begingroup
+ @catcode#=6
+ @gdef at secheading#1#2#3{@secheadingi {#3 at enspace #1}}
+ at endgroup
+ at end iftex
+
+ at setfilename com_err
+ at settitle A Common Error Description Library for UNIX
+
+ at ifinfo
+This file documents the use of the Common Error Description library.
+
+Copyright (C) 1987, 1988 Student Information Processing Board of the
+Massachusetts Institute of Technology.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
+used in advertising or publicity pertaining to distribution of the software
+without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B.
+make no representations about the suitability of this software for any
+purpose. It is provided "as is" without express or implied warranty.
+
+Note that the file texinfo.tex, provided with this distribution, is from
+the Free Software Foundation, and is under different copyright restrictions
+from the remainder of this package.
+
+ at end ifinfo
+
+ at ignore
+Permission is granted to process this file through Tex and print the
+results, provided the printed document carries copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+
+ at end ignore
+
+ at setchapternewpage odd
+
+ at titlepage
+ at center @titlefont{A Common Error Description}
+ at center @titlefont{Library for UNIX}
+ at sp 2
+ at center Ken Raeburn
+ at center Bill Sommerfeld
+ at sp 1
+ at center MIT Student Information Processing Board
+ at sp 3
+ at center last updated 1 January 1989
+ at center for version 1.2
+ at center ***DRAFT COPY ONLY***
+
+ at vskip 2in
+
+ at center @b{Abstract}
+
+UNIX has always had a clean and simple system call interface, with a
+standard set of error codes passed between the kernel and user
+programs. Unfortunately, the same cannot be said of many of the
+libraries layered on top of the primitives provided by the kernel.
+Typically, each one has used a different style of indicating errors to
+their callers, leading to a total hodgepodge of error handling, and
+considerable amounts of work for the programmer. This paper describes
+a library and associated utilities which allows a more uniform way for
+libraries to return errors to their callers, and for programs to
+describe errors and exceptional conditions to their users.
+
+ at page
+ at vskip 0pt plus 1filll
+
+Copyright @copyright{} 1987, 1988 by the Student Information Processing
+Board of the Massachusetts Institute of Technology.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
+used in advertising or publicity pertaining to distribution of the software
+without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B.
+make no representations about the suitability of this software for any
+purpose. It is provided "as is" without express or implied warranty.
+
+Note that the file texinfo.tex, provided with this distribution, is from
+the Free Software Foundation, and is under different copyright restrictions
+from the remainder of this package.
+
+ at end titlepage
+
+ at ifinfo
+ at c should put a menu here someday....
+ at end ifinfo
+
+ at page
+
+ at section Why com_err?
+
+In building application software packages, a programmer often has to
+deal with a number of libraries, each of which can use a different
+error-reporting mechanism. Sometimes one of two values is returned,
+indicating simply SUCCESS or FAILURE, with no description of errors
+encountered. Sometimes it is an index into a table of text strings,
+where the name of the table used is dependent on the library being
+used when the error is generated; since each table starts numbering at
+0 or 1, additional information as to the source of the error code is
+needed to determine which table to look at. Sometimes no text messages are
+supplied at all, and the programmer must supply them at any point at which
+he may wish to report error conditions.
+Often, a global variable is assigned some value describing the error, but
+the programmer has to know in each case whether to look at @code{errno},
+ at code{h_errno}, the return value from @code{hes_err()}, or whatever other
+variables or routines are specified.
+And what happens if something
+in the procedure of
+examining or reporting the error changes the same variable?
+
+The package we have developed is an attempt to present a common
+error-handling mechanism to manipulate the most common form of error code
+in a fashion that does not have the problems listed above.
+
+A list of up to 256 text messages is supplied to a translator we have
+written, along with the three- to four-character ``name'' of the error
+table. The library using this error table need only call a routine
+generated from this error-table source to make the table ``known'' to the
+com_err library, and any error code the library generates can be converted
+to the corresponding error message. There is also a default format for
+error codes accidentally returned before making the table known, which is
+of the form @samp{unknown code foo 32}, where @samp{foo} would be the name
+of the table.
+
+ at section Error codes
+
+Error codes themselves are 32 bit (signed) integers, of which the high
+order 24 bits are an identifier of which error table the error code is
+from, and the low order 8 bits are a sequential error number within
+the table. An error code may thus be easily decomposed into its component
+parts. Only the lowest 32 bits of an error code are considered significant
+on systems which support wider values.
+
+Error table 0 is defined to match the UNIX system call error table
+(@code{sys_errlist}); this allows @code{errno} values to be used directly
+in the library (assuming that @code{errno} is of a type with the same width
+as @t{long}). Other error table numbers are formed by compacting together
+the first four characters of the error table name. The mapping between
+characters in the name and numeric values in the error code are defined in
+a system-independent fashion, so that two systems that can pass integral
+values between them can reliably pass error codes without loss of meaning;
+this should work even if the character sets used are not the same.
+(However, if this is to be done, error table 0 should be avoided, since the
+local system call error tables may differ.)
+
+Any variable which is to contain an error code should be declared @t{long}.
+The draft proposed American National Standard for C (as of May, 1988)
+requires that @t{long} variables be at least 32 bits; any system which does
+not support 32-bit @t{long} values cannot make use of this package (nor
+much other software that assumes an ANSI-C environment base) without
+significant effort.
+
+ at section Error table source file
+
+The error table source file begins with the declaration of the table name,
+as
+
+ at example
+error_table @var{tablename}
+ at end example
+
+Individual error codes are
+specified with
+
+ at example
+error_code @var{ERROR_NAME}, @var{"text message"}
+ at end example
+
+where @samp{ec} can also be used as a short form of @samp{error_code}. To
+indicate the end of the table, use @samp{end}. Thus, a (short) sample
+error table might be:
+
+ at example
+
+ error_table dsc
+
+ error_code DSC_DUP_MTG_NAME,
+ "Meeting already exists"
+
+ ec DSC_BAD_PATH,
+ "A bad meeting pathname was given"
+
+ ec DSC_BAD_MODES,
+ "Invalid mode for this access control list"
+
+ end
+
+ at end example
+
+ at section The error-table compiler
+
+The error table compiler is named @code{compile_et}. It takes one
+argument, the pathname of a file (ending in @samp{.et}, e.g.,
+ at samp{dsc_err.et}) containing an error table source file. It parses the
+error table, and generates two output files -- a C header file
+(@samp{discuss_err.h}) which contains definitions of the numerical values
+of the error codes defined in the error table, and a C source file which
+should be compiled and linked with the executable. The header file must be
+included in the source of a module which wishes to reference the error
+codes defined; the object module generated from the C code may be linked in
+to a program which wishes to use the printed forms of the error codes.
+
+This translator accepts a @kbd{-language @var{lang}} argument, which
+determines for which language (or language variant) the output should be
+written. At the moment, @var{lang} is currently limited to @kbd{ANSI-C}
+and @kbd{K&R-C}, and some abbreviated forms of each. Eventually, this will
+be extended to include some support for C++. The default is currently
+ at kbd{K&R-C}, though the generated sources will have ANSI-C code
+conditionalized on the symbol @t{__STDC__}.
+
+ at section Run-time support routines
+
+Any source file which uses the routines supplied with or produced by the
+com_err package should include the header file @file{<com_err.h>}. It
+contains declarations and definitions which may be needed on some systems.
+(Some functions cannot be referenced properly without the return type
+declarations in this file. Some functions may work properly on most
+architectures even without the header file, but relying on this is not
+recommended.)
+
+The run-time support routines and variables provided via this package
+include the following:
+
+ at example
+void initialize_ at var{xxxx}_error_table (void);
+ at end example
+
+One of these routines is built by the error compiler for each error table.
+It makes the @var{xxxx} error table ``known'' to the error reporting
+system. By convention, this routine should be called in the initialization
+routine of the @var{xxxx} library. If the library has no initialization
+routine, some combination of routines which form the core of the library
+should ensure that this routine is called. It is not advised to leave it
+the caller to make this call.
+
+There is no harm in calling this routine more than once.
+
+ at example
+#define ERROR_TABLE_BASE_ at var{xxxx} @var{nnnnn}L
+ at end example
+
+This symbol contains the value of the first error code entry in the
+specified table.
+This rarely needs be used by the
+programmer.
+
+ at example
+const char *error_message (long code);
+ at end example
+
+This routine returns the character string error message associated
+with @code{code}; if this is associated with an unknown error table, or
+if the code is associated with a known error table but the code is not
+in the table, a string of the form @samp{Unknown code @var{xxxx nn}} is
+returned, where @var{xxxx} is the error table name produced by
+reversing the compaction performed on the error table number implied
+by that error code, and @var{nn} is the offset from that base value.
+
+Although this routine is available for use when needed, its use should be
+left to circumstances which render @code{com_err} (below) unusable.
+
+ at example
+void com_err (const char *whoami, /* module reporting error */
+ long code, /* error code */
+ const char *format, /* format for additional detail */
+ ...); /* (extra parameters) */
+ at end example
+
+This routine provides an alternate way to print error messages to
+standard error; it allows the error message to be passed in as a
+parameter, rather than in an external variable. @emph{Provide grammatical
+context for ``message.''}
+
+If @var{format} is @code{(char *)NULL}, the formatted message will not be
+printed. @var{format} may not be omitted.
+
+ at example
+#include <stdarg.h>
+
+void com_err_va (const char *whoami,
+ long code,
+ const char *format,
+ va_list args);
+ at end example
+
+This routine provides an interface, equivalent to @code{com_err} above,
+which may be used by higher-level variadic functions (functions which
+accept variable numbers of arguments).
+
+ at example
+#include <stdarg.h>
+
+void (*set_com_err_hook (void (*proc) ())) ();
+
+void (*@var{proc}) (const char *whoami, long code, va_list args);
+
+void reset_com_err_hook ();
+ at end example
+
+These two routines allow a routine to be dynamically substituted for
+ at samp{com_err}. After @samp{set_com_err_hook} has been called,
+calls to @samp{com_err} will turn into calls to the new hook routine.
+ at samp{reset_com_err_hook} turns off this hook. This may intended to
+be used in daemons (to use a routine which calls @var{syslog(3)}), or
+in a window system application (which could pop up a dialogue box).
+
+If a program is to be used in an environment in which simply printing
+messages to the @code{stderr} stream would be inappropriate (such as in a
+daemon program which runs without a terminal attached),
+ at code{set_com_err_hook} may be used to redirect output from @code{com_err}.
+The following is an example of an error handler which uses @var{syslog(3)}
+as supplied in BSD 4.3:
+
+ at example
+#include <stdio.h>
+#include <stdarg.h>
+#include <syslog.h>
+
+/* extern openlog (const char * name, int logopt, int facility); */
+/* extern syslog (int priority, char * message, ...); */
+
+void hook (const char * whoami, long code,
+ const char * format, va_list args)
+@{
+ char buffer[BUFSIZ];
+ static int initialized = 0;
+ if (!initialized) @{
+ openlog (whoami,
+ LOG_NOWAIT|LOG_CONS|LOG_PID|LOG_NDELAY,
+ LOG_DAEMON);
+ initialized = 1;
+ @}
+ vsprintf (buffer, format, args);
+ syslog (LOG_ERR, "%s %s", error_message (code), buffer);
+@}
+ at end example
+
+After making the call
+ at code{set_com_err_hook (hook);},
+any calls to @code{com_err} will result in messages being sent to the
+ at var{syslogd} daemon for logging.
+The name of the program, @samp{whoami}, is supplied to the
+ at samp{openlog()} call, and the message is formatted into a buffer and
+passed to @code{syslog}.
+
+Note that since the extra arguments to @code{com_err} are passed by
+reference via the @code{va_list} value @code{args}, the hook routine may
+place any form of interpretation on them, including ignoring them. For
+consistency, @code{printf}-style interpretation is suggested, via
+ at code{vsprintf} (or @code{_doprnt} on BSD systems without full support for
+the ANSI C library).
+
+ at section Coding Conventions
+
+The following conventions are just some general stylistic conventions
+to follow when writing robust libraries and programs. Conventions
+similar to this are generally followed inside the UNIX kernel and most
+routines in the Multics operating system. In general, a routine
+either succeeds (returning a zero error code, and doing some side
+effects in the process), or it fails, doing minimal side effects; in
+any event, any invariant which the library assumes must be maintained.
+
+In general, it is not in the domain of non user-interface library
+routines to write error messages to the user's terminal, or halt the
+process. Such forms of ``error handling'' should be reserved for
+failures of internal invariants and consistancy checks only, as it
+provides the user of the library no way to clean up for himself in the
+event of total failure.
+
+Library routines which can fail should be set up to return an error
+code. This should usually be done as the return value of the
+function; if this is not acceptable, the routine should return a
+``null'' value, and put the error code into a parameter passed by
+reference.
+
+Routines which use the first style of interface can be used from
+user-interface levels of a program as follows:
+
+ at example
+@{
+ if ((code = initialize_world(getuid(), random())) != 0) @{
+ com_err("demo", code,
+ "when trying to initialize world");
+ exit(1);
+ @}
+ if ((database = open_database("my_secrets", &code))==NULL) @{
+ com_err("demo", code,
+ "while opening my_secrets");
+ exit(1);
+ @}
+@}
+ at end example
+
+A caller which fails to check the return status is in error. It is
+possible to look for code which ignores error returns by using lint;
+look for error messages of the form ``foobar returns value which is
+sometimes ignored'' or ``foobar returns value which is always
+ignored.''
+
+Since libraries may be built out of other libraries, it is often necessary
+for the success of one routine to depend on another. When a lower level
+routine returns an error code, the middle level routine has a few possible
+options. It can simply return the error code to its caller after doing
+some form of cleanup, it can substitute one of its own, or it can take
+corrective action of its own and continue normally. For instance, a
+library routine which makes a ``connect'' system call to make a network
+connection may reflect the system error code @code{ECONNREFUSED}
+(Connection refused) to its caller, or it may return a ``server not
+available, try again later,'' or it may try a different server.
+
+Cleanup which is typically necessary may include, but not be limited
+to, freeing allocated memory which will not be needed any more,
+unlocking concurrancy locks, dropping reference counts, closing file
+descriptors, or otherwise undoing anything which the procedure did up
+to this point. When there are a lot of things which can go wrong, it
+is generally good to write one block of error-handling code which is
+branched to, using a goto, in the event of failure. A common source
+of errors in UNIX programs is failing to close file descriptors on
+error returns; this leaves a number of ``zombied'' file descriptors
+open, which eventually causes the process to run out of file
+descriptors and fall over.
+
+ at example
+@{
+ FILE *f1=NULL, *f2=NULL, *f3=NULL;
+ int status = 0;
+
+ if ( (f1 = fopen(FILE1, "r")) == NULL) @{
+ status = errno;
+ goto error;
+ @}
+
+ /*
+ * Crunch for a while
+ */
+
+ if ( (f2 = fopen(FILE2, "w")) == NULL) @{
+ status = errno;
+ goto error;
+ @}
+
+ if ( (f3 = fopen(FILE3, "a+")) == NULL) @{
+ status = errno;
+ goto error;
+ @}
+
+ /*
+ * Do more processing.
+ */
+ fclose(f1);
+ fclose(f2);
+ fclose(f3);
+ return 0;
+
+error:
+ if (f1) fclose(f1);
+ if (f2) fclose(f2);
+ if (f3) fclose(f3);
+ return status;
+@}
+ at end example
+
+ at section Building and Installation
+
+The distribution of this package will probably be done as a compressed
+``tar''-format file available via anonymous FTP from SIPB.MIT.EDU.
+Retrieve @samp{pub/com_err.tar.Z} and extract the contents. A subdirectory
+ at t{profiled} should be created to hold objects compiled for profiling.
+Running ``make all'' should then be sufficient to build the library and
+error-table compiler. The files @samp{libcom_err.a},
+ at samp{libcom_err_p.a}, @samp{com_err.h}, and @samp{compile_et} should be
+installed for use; @samp{com_err.3} and @samp{compile_et.1} can also be
+installed as manual pages.
+
+Potential problems:
+
+ at itemize @bullet
+
+ at item Use of @code{strcasecmp}, a routine provided in BSD for
+case-insensitive string comparisons. If an equivalent routine is
+available, you can modify @code{CFLAGS} in the makefile to define
+ at code{strcasecmp} to the name of that routine.
+
+ at item Compilers that defined @code{__STDC__} without providing the header
+file @code{<stdarg.h>}. One such example is Metaware's High ``C''
+compiler, as provided at Project Athena on the IBM RT/PC workstation; if
+ at code{__HIGHC__} is defined, it is assumed that @code{<stdarg.h>} is not
+available, and therefore @code{<varargs.h>} must be used. If the symbol
+ at code{VARARGS} is defined (e.g., in the makefile), @code{<varargs.h>} will
+be used.
+
+ at item If your linker rejects symbols that are simultaneously defined in two
+library files, edit @samp{Makefile} to remove @samp{perror.c} from the
+library. This file contains a version of @var{perror(3)} which calls
+ at code{com_err} instead of calling @code{write} directly.
+
+ at end itemize
+
+As I do not have access to non-BSD systems, there are probably
+bugs present that may interfere with building or using this package on
+other systems. If they are reported to me, they can probably be fixed for
+the next version.
+
+ at section Bug Reports
+
+Please send any comments or bug reports to the principal author: Ken
+Raeburn, @t{Raeburn@@Athena.MIT.EDU}.
+
+ at section Acknowledgements
+
+I would like to thank: Bill Sommerfeld, for his help with some of this
+documentation, and catching some of the bugs the first time around;
+Honeywell Information Systems, for not killing off the @emph{Multics}
+operating system before I had an opportunity to use it; Honeywell's
+customers, who persuaded them not to do so, for a while; Ted Anderson of
+CMU, for catching some problems before version 1.2 left the nest; Stan
+Zanarotti and several others of MIT's Student Information Processing Board,
+for getting us started with ``discuss,'' for which this package was
+originally written; and everyone I've talked into --- I mean, asked to read
+this document and the ``man'' pages.
+
+ at bye
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,118 @@
+.\"
+.\" Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" Copyright (c) 1988 Massachusetts Institute of Technology,
+.\" Student Information Processing Board. All rights reserved.
+.\"
+.\" $Header: /cvs/src/cyrus/et/compile_et.1,v 1.2 2000/05/23 20:52:06 robeson Exp $
+.\"
+.TH COMPILE_ET 1 "22 Nov 1988" SIPB
+.SH NAME
+compile_et \- error table compiler
+.SH SYNOPSIS
+.B compile_et
+file
+.SH DESCRIPTION
+.B Compile_et
+converts a table listing error-code names and associated messages into
+a C source file suitable for use with the
+.IR com_err (3)
+library.
+
+The source file name must end with a suffix of ``.et''; the file
+consists of a declaration supplying the name (up to four characters
+long) of the error-code table:
+
+.B error_table
+.I name
+
+followed by up to 256 entries of the form:
+
+.B error_code
+.I name,
+"
+.I string
+"
+
+and a final
+
+.B end
+
+to indicate the end of the table.
+
+The name of the table is used to construct the name of a subroutine
+.I initialize_XXXX_error_table
+which must be called in order for the
+.I com_err
+library to recognize the error table.
+
+The various error codes defined are assigned sequentially increasing
+numbers (starting with a large number computed as a hash function of
+the name of the table); thus for compatibility it is suggested that
+new codes be added only to the end of an existing table, and that no
+codes be removed from tables.
+
+The names defined in the table are placed into a C header file with
+preprocessor directives defining them as integer constants of up to
+32 bits in magnitude.
+
+A C source file is also generated which should be compiled and linked
+with the object files which reference these error codes; it contains
+the text of the messages and the initialization subroutine. Both C
+files have names derived from that of the original source file, with
+the ``.et'' suffix replaced by ``.c'' and ``.h''.
+
+A ``#'' in the source file is treated as a comment character, and all
+remaining text to the end of the source line will be ignored.
+
+.SH BUGS
+
+Since
+.B compile_et
+uses a very simple parser based on
+.IR yacc (1),
+its error recovery leaves much to be desired.
+
+.\" .IR for manual entries
+.\" .PP for paragraph breaks
+
+.SH "SEE ALSO"
+com_err (3).
+
+Ken Raeburn, "A Common Error Description Library for UNIX".
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.sh
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.sh?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.sh (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.sh Sat Aug 26 02:00:13 2006
@@ -1,0 +1,48 @@
+#!/bin/sh
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#
+AWK=@AWK@
+DIR=@DIR@
+
+ROOT=`echo $1 | sed -e s/.et$//`
+BASE=`echo $ROOT | sed -e 's;.*/;;'`
+
+$AWK -f ${DIR}/et_h.awk outfile=${BASE}.h $ROOT.et
+$AWK -f ${DIR}/et_c.awk outfile=${BASE}.c $ROOT.et
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/compile_et.sh
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/config_script
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/config_script?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/config_script (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/config_script Sat Aug 26 02:00:13 2006
@@ -1,0 +1,62 @@
+#!/bin/sh
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# This program takes a shell script and configures for the following
+# variables: @DIR@
+# @AWK@
+# @SED@
+#
+# Usage: config_script <filename> [<awk>] [<sed>]
+#
+
+FILE=$1
+AWK=$2
+SED=$3
+
+# Grr.... not all Unix's have the dirname command
+TMP=`echo $1 | sed -e 's;[^/]*$;;' -e 's/^$/./'`
+DIR=`cd ${TMP}; pwd`
+
+if test "${AWK}x" = "x" ; then
+ AWK=awk
+fi
+if test "${SED}x" = "x" ; then
+ SED=sed
+fi
+sed -e "s;@DIR@;${DIR};" -e "s;@AWK@;${AWK};" -e "s;@SED@;${SED};" $FILE
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/config_script
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_message.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_message.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_message.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_message.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,115 @@
+/*
+ * util/et/error_message.c
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright 1987 by the Student Information Processing Board
+ * of the Massachusetts Institute of Technology
+ *
+ * For copyright info, see "mit-sipb-copyright.h".
+ */
+
+#define IN_COM_ERR
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "error_table.h"
+#include "mit-sipb-copyright.h"
+#include "internal.h"
+
+static const char copyright[] =
+ "Copyright 1986, 1987, 1988 by the Student Information Processing Board\nand the department of Information Systems\nof the Massachusetts Institute of Technology";
+
+static char buffer[25];
+
+extern struct et_list * _et_list;
+
+const char * INTERFACE error_message (code)
+long code;
+{
+ int offset;
+ long l_offset;
+ struct et_list *et;
+ long table_num;
+ int started = 0;
+ char *cp;
+
+ l_offset = code & ((1<<ERRCODE_RANGE)-1);
+ offset = (int) l_offset;
+ table_num = code - l_offset;
+ if (!table_num) {
+#ifdef HAS_STRERROR
+ return strerror (offset);
+#else
+ if (offset < sys_nerr)
+ return(sys_errlist[offset]);
+ else
+ goto oops;
+#endif
+ }
+ for (et = _et_list; et; et = et->next) {
+ if (et->table->base == table_num) {
+ /* This is the right table */
+ if (et->table->n_msgs <= offset)
+ goto oops;
+ return(et->table->msgs[offset]);
+ }
+ }
+oops:
+ strcpy (buffer, "Unknown code ");
+ if (table_num) {
+ strcat (buffer, error_table_name (table_num));
+ strcat (buffer, " ");
+ }
+ for (cp = buffer; *cp; cp++)
+ ;
+ if (offset >= 100) {
+ *cp++ = '0' + offset / 100;
+ offset %= 100;
+ started++;
+ }
+ if (started || offset >= 10) {
+ *cp++ = '0' + offset / 10;
+ offset %= 10;
+ }
+ *cp++ = '0' + offset;
+ *cp = '\0';
+ return(buffer);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_table.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_table.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_table.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/error_table.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright 1988 by the Student Information Processing Board of the
+ * Massachusetts Institute of Technology.
+ *
+ * For copyright info, see mit-sipb-copyright.h.
+ */
+
+#ifndef _ET_H
+
+/* This directory doesn't really know about the krb5 world. The following
+ windows defines are usually hidden in k5-config.h. For now I'll just
+ place here what is needed from that file. Later we may decide to do
+ it differently.
+*/
+#ifdef _WINDOWS
+#define INTERFACE __far __export __pascal
+#define INTERFACE_C __far __export __cdecl
+#define sys_nerr _sys_nerr
+#define sys_errlist _sys_errlist
+int __far __pascal MessageBox (void __far *, const char __far*, const char __far*, unsigned int);
+#define MB_ICONEXCLAMATION 0x0030
+#else
+#define INTERFACE
+#define INTERFACE_C
+extern int errno;
+#endif
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table *table;
+};
+extern struct et_list * _et_list;
+
+#define ERRCODE_RANGE 8 /* # of bits to shift table number */
+#define BITS_PER_CHAR 6 /* # bits to shift per character in name */
+
+#if defined(__STDC__) || defined(KRB5_PROVIDE_PROTOTYPES) || defined(_WINDOWS)
+extern const char *error_table_name (long);
+#else
+extern const char *error_table_name ();
+#endif
+
+#define _ET_H
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_c.awk
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_c.awk?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_c.awk (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_c.awk Sat Aug 26 02:00:13 2006
@@ -1,0 +1,183 @@
+BEGIN {
+char_shift=64
+## "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
+c2n["A"]=1
+c2n["B"]=2
+c2n["C"]=3
+c2n["D"]=4
+c2n["E"]=5
+c2n["F"]=6
+c2n["G"]=7
+c2n["H"]=8
+c2n["I"]=9
+c2n["J"]=10
+c2n["K"]=11
+c2n["L"]=12
+c2n["M"]=13
+c2n["N"]=14
+c2n["O"]=15
+c2n["P"]=16
+c2n["Q"]=17
+c2n["R"]=18
+c2n["S"]=19
+c2n["T"]=20
+c2n["U"]=21
+c2n["V"]=22
+c2n["W"]=23
+c2n["X"]=24
+c2n["Y"]=25
+c2n["Z"]=26
+c2n["a"]=27
+c2n["b"]=28
+c2n["c"]=29
+c2n["d"]=30
+c2n["e"]=31
+c2n["f"]=32
+c2n["g"]=33
+c2n["h"]=34
+c2n["i"]=35
+c2n["j"]=36
+c2n["k"]=37
+c2n["l"]=38
+c2n["m"]=39
+c2n["n"]=40
+c2n["o"]=41
+c2n["p"]=42
+c2n["q"]=43
+c2n["r"]=44
+c2n["s"]=45
+c2n["t"]=46
+c2n["u"]=47
+c2n["v"]=48
+c2n["w"]=49
+c2n["x"]=50
+c2n["y"]=51
+c2n["z"]=52
+c2n["0"]=53
+c2n["1"]=54
+c2n["2"]=55
+c2n["3"]=56
+c2n["4"]=57
+c2n["5"]=58
+c2n["6"]=59
+c2n["7"]=60
+c2n["8"]=61
+c2n["9"]=62
+c2n["_"]=63
+}
+/^#/ { next }
+/^[ \t]*(error_table|et)[ \t]+[a-zA-Z][a-zA-Z0-9_]+/ {
+ table_number = 0
+ table_name = $2
+ mod_base = 1000000
+ for(i=1; i<=length(table_name); i++) {
+ table_number=(table_number*char_shift)+c2n[substr(table_name,i,1)]
+ }
+
+ # We start playing *_high, *low games here because the some
+ # awk programs do not have the necessary precision (sigh)
+ tab_base_low = table_number % mod_base
+ tab_base_high = int(table_number / mod_base)
+ tab_base_sign = 1;
+
+ # figure out: table_number_base=table_number*256
+ tab_base_low = tab_base_low * 256
+ tab_base_high = (tab_base_high * 256) + \
+ int(tab_base_low / mod_base)
+ tab_base_low = tab_base_low % mod_base
+
+ if (table_number > 128*256*256) {
+ # figure out: table_number_base -= 256*256*256*256
+ # sub_high, sub_low is 256*256*256*256
+ sub_low = 256*256*256 % mod_base
+ sub_high = int(256*256*256 / mod_base)
+
+ sub_low = sub_low * 256
+ sub_high = (sub_high * 256) + int(sub_low / mod_base)
+ sub_low = sub_low % mod_base
+
+ tab_base_low = sub_low - tab_base_low;
+ tab_base_high = sub_high - tab_base_high;
+ tab_base_sign = -1;
+ if (tab_base_low < 0) {
+ tab_base_low = tab_base_low + mod_base
+ tab_base_high--
+ }
+ }
+ print "/*" > outfile
+ print " * " outfile ":" > outfile
+ print " * This file is automatically generated; please do not edit it." > outfile
+ print " */" > outfile
+
+ print "#if defined(__STDC__) || defined(_WINDOWS)" > outfile
+ print "#define NOARGS void" > outfile
+ print "#else" > outfile
+ print "#define NOARGS" > outfile
+ print "#define const" > outfile
+ print "#endif" > outfile
+ print "" > outfile
+ print "static const char * const text[] = {" > outfile
+ table_item_count = 0
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,[ \t]*$/ {
+ skipone=1
+ next
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,[ \t]*".*"[ \t]*$/ {
+ text=""
+ for (i=3; i<=NF; i++) {
+ text = text FS $i
+ }
+ text=substr(text,2,length(text)-1);
+ printf "\t%s,\n", text > outfile
+ table_item_count++
+}
+
+{
+ if (skipone) {
+ printf "\t%s,\n", $0 > outfile
+ table_item_count++
+ }
+ skipone=0
+}
+END {
+
+
+ print " 0" > outfile
+ print "};" > outfile
+ print "" > outfile
+ print "struct error_table {" > outfile
+ print " char const * const * msgs;" > outfile
+ print " long base;" > outfile
+ print " int n_msgs;" > outfile
+ print "};" > outfile
+ print "struct et_list {" > outfile
+ print " struct et_list *next;" > outfile
+ print " const struct error_table * table;" > outfile
+ print "};" > outfile
+ print "extern struct et_list *_et_list;" > outfile
+ print "" > outfile
+ if (tab_base_high == 0) {
+ print "static const struct error_table et = { text, " \
+ sprintf("%dL, %d };", tab_base_sign*tab_base_low, \
+ table_item_count) > outfile
+ } else {
+ print "static const struct error_table et = { text, " \
+ sprintf("%d%06dL, %d };", tab_base_sign*tab_base_high, \
+ tab_base_low, table_item_count) > outfile
+ }
+ print "" > outfile
+ print "static struct et_list link = { 0, 0 };" > outfile
+ print "" > outfile
+ print "void initialize_" table_name "_error_table (NOARGS) {" > outfile
+ print " if (!link.table) {" > outfile
+ print " link.next = _et_list;" > outfile
+ print " link.table = &et;" > outfile
+ print " _et_list = &link;" > outfile
+ print " }" > outfile
+ print "}" > outfile
+
+
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_h.awk
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_h.awk?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_h.awk (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_h.awk Sat Aug 26 02:00:13 2006
@@ -1,0 +1,150 @@
+BEGIN {
+char_shift=64
+## "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
+c2n["A"]=1
+c2n["B"]=2
+c2n["C"]=3
+c2n["D"]=4
+c2n["E"]=5
+c2n["F"]=6
+c2n["G"]=7
+c2n["H"]=8
+c2n["I"]=9
+c2n["J"]=10
+c2n["K"]=11
+c2n["L"]=12
+c2n["M"]=13
+c2n["N"]=14
+c2n["O"]=15
+c2n["P"]=16
+c2n["Q"]=17
+c2n["R"]=18
+c2n["S"]=19
+c2n["T"]=20
+c2n["U"]=21
+c2n["V"]=22
+c2n["W"]=23
+c2n["X"]=24
+c2n["Y"]=25
+c2n["Z"]=26
+c2n["a"]=27
+c2n["b"]=28
+c2n["c"]=29
+c2n["d"]=30
+c2n["e"]=31
+c2n["f"]=32
+c2n["g"]=33
+c2n["h"]=34
+c2n["i"]=35
+c2n["j"]=36
+c2n["k"]=37
+c2n["l"]=38
+c2n["m"]=39
+c2n["n"]=40
+c2n["o"]=41
+c2n["p"]=42
+c2n["q"]=43
+c2n["r"]=44
+c2n["s"]=45
+c2n["t"]=46
+c2n["u"]=47
+c2n["v"]=48
+c2n["w"]=49
+c2n["x"]=50
+c2n["y"]=51
+c2n["z"]=52
+c2n["0"]=53
+c2n["1"]=54
+c2n["2"]=55
+c2n["3"]=56
+c2n["4"]=57
+c2n["5"]=58
+c2n["6"]=59
+c2n["7"]=60
+c2n["8"]=61
+c2n["9"]=62
+c2n["_"]=63
+}
+/^#/ { next }
+/^[ \t]*(error_table|et)[ \t]+[a-zA-Z][a-zA-Z0-9_]+/ {
+ table_number = 0
+ table_name = $2
+ mod_base = 1000000
+ for(i=1; i<=length(table_name); i++) {
+ table_number=(table_number*char_shift)+c2n[substr(table_name,i,1)]
+ }
+ # We start playing *_high, *low games here because the some
+ # awk programs do not have the necessary precision (sigh)
+ tab_base_low = table_number % mod_base
+ tab_base_high = int(table_number / mod_base)
+ tab_base_sign = 1;
+
+ # figure out: table_number_base=table_number*256
+ tab_base_low = tab_base_low * 256
+ tab_base_high = (tab_base_high * 256) + \
+ int(tab_base_low / mod_base)
+ tab_base_low = tab_base_low % mod_base
+
+ if (table_number > 128*256*256) {
+ # figure out: table_number_base -= 256*256*256*256
+ # sub_high, sub_low is 256*256*256*256
+ sub_low = 256*256*256 % mod_base
+ sub_high = int(256*256*256 / mod_base)
+
+ sub_low = sub_low * 256
+ sub_high = (sub_high * 256) + int(sub_low / mod_base)
+ sub_low = sub_low % mod_base
+
+ tab_base_low = sub_low - tab_base_low;
+ tab_base_high = sub_high - tab_base_high;
+ tab_base_sign = -1;
+ if (tab_base_low < 0) {
+ tab_base_low = tab_base_low + mod_base
+ tab_base_high--
+ }
+ }
+ curr_low = tab_base_low
+ curr_high = tab_base_high
+ curr_sign = tab_base_sign
+ print "/*" > outfile
+ print " * " outfile ":" > outfile
+ print " * This file is automatically generated; please do not edit it." > outfile
+ print " */" > outfile
+}
+
+/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,/ {
+ tag=substr($2,1,length($2)-1)
+ if (curr_high == 0) {
+ printf "#define %-40s (%dL)\n", tag, \
+ curr_sign*curr_low > outfile
+ } else {
+ printf "#define %-40s (%d%06dL)\n", tag, curr_high*curr_sign, \
+ curr_low > outfile
+ }
+ curr_low += curr_sign;
+ if (curr_low >= mod_base) {
+ curr_low -= mod_base;
+ curr_high++
+ }
+ if (curr_low < 0) {
+ cur_low += mod_base
+ cur_high--
+ }
+}
+
+END {
+ print "extern void initialize_" table_name "_error_table ();" > outfile
+ if (tab_base_high == 0) {
+ print "#define ERROR_TABLE_BASE_" table_name " (" \
+ sprintf("%d", tab_base_sign*tab_base_low) \
+ "L)" > outfile
+ } else {
+ print "#define ERROR_TABLE_BASE_" table_name " (" \
+ sprintf("%d%06d", tab_base_sign*tab_base_high, \
+ tab_base_low) "L)" > outfile
+ }
+ print "" > outfile
+ print "/* for compatibility with older versions... */" > outfile
+ print "#define init_" table_name "_err_tbl initialize_" table_name "_error_table" > outfile
+ print "#define " table_name "_err_base ERROR_TABLE_BASE_" table_name > outfile
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_name.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_name.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_name.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/et_name.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,79 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright 1987 by MIT Student Information Processing Board
+ *
+ * For copyright info, see mit-sipb-copyright.h.
+ */
+
+#include "error_table.h"
+#include "mit-sipb-copyright.h"
+#include "internal.h"
+
+#ifndef lint
+static const char copyright[] =
+ "Copyright 1987,1988 by Student Information Processing Board, Massachusetts Institute of Technology";
+#endif
+
+static const char char_set[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
+
+static char buf[6];
+
+const char * error_table_name (num)
+ long num;
+{
+ long ch;
+ int i;
+ char *p;
+
+ /* num = aa aaa abb bbb bcc ccc cdd ddd d?? ??? ??? */
+ p = buf;
+ num >>= ERRCODE_RANGE;
+ /* num = ?? ??? ??? aaa aaa bbb bbb ccc ccc ddd ddd */
+ num &= 077777777;
+ /* num = 00 000 000 aaa aaa bbb bbb ccc ccc ddd ddd */
+ for (i = 4; i >= 0; i--) {
+ ch = (num >> BITS_PER_CHAR * i) & ((1 << BITS_PER_CHAR) - 1);
+ if (ch != 0)
+ *p++ = char_set[ch-1];
+ }
+ *p = '\0';
+ return(buf);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/init_et.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/init_et.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/init_et.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/init_et.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+/*
+ * util/et/init_et.c
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright 1986, 1987, 1988 by MIT Information Systems and
+ * the MIT Student Information Processing Board.
+ *
+ * For copyright info, see mit-sipb-copyright.h.
+ */
+
+#include <stdio.h>
+#include "error_table.h"
+#include "mit-sipb-copyright.h"
+
+extern char *malloc(), *realloc();
+
+struct foobar {
+ struct et_list etl;
+ struct error_table et;
+};
+
+extern struct et_list * _et_list;
+
+int init_error_table(msgs, base, count)
+ const char * const * msgs;
+ int base;
+ int count;
+{
+ struct foobar * new_et;
+
+ if (!base || !count || !msgs)
+ return 0;
+
+ new_et = (struct foobar *) malloc(sizeof(struct foobar));
+ if (!new_et)
+ return errno; /* oops */
+ new_et->etl.table = &new_et->et;
+ new_et->et.msgs = msgs;
+ new_et->et.base = base;
+ new_et->et.n_msgs= count;
+
+ new_et->etl.next = _et_list;
+ _et_list = &new_et->etl;
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/internal.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/internal.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/internal.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/internal.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,53 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * internal include file for com_err package
+ */
+#include "mit-sipb-copyright.h"
+
+#include <errno.h>
+
+#ifdef NEED_SYS_ERRLIST
+extern char const * const sys_errlist[];
+extern const int sys_nerr;
+#endif
+
+#if defined(__STDC__) && !defined(HDR_HAS_PERROR) && !defined(_WINDOWS)
+void perror (const char *);
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/mit-sipb-copyright.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/mit-sipb-copyright.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/mit-sipb-copyright.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/mit-sipb-copyright.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,19 @@
+/*
+
+Copyright 1987, 1988 by the Student Information Processing Board
+ of the Massachusetts Institute of Technology
+
+Permission to use, copy, modify, and distribute this software
+and its documentation for any purpose and without fee is
+hereby granted, provided that the above copyright notice
+appear in all copies and that both that copyright notice and
+this permission notice appear in supporting documentation,
+and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
+used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+M.I.T. and the M.I.T. S.I.P.B. make no representations about
+the suitability of this software for any purpose. It is
+provided "as is" without express or implied warranty.
+
+*/
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test1.et
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test1.et?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test1.et (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test1.et Sat Aug 26 02:00:13 2006
@@ -1,0 +1,69 @@
+ error_table krb
+
+ error_code KRB_MK_AP_TKFIL,
+ "Can't read ticket file"
+
+ ec KRB_MK_AP_NOTKT,
+ "Can't find ticket or TGT"
+
+ ec KRB_MK_AP_TGTEXP,
+ "TGT expired"
+
+ ec KRB_RD_AP_UNDEC,
+ "Can't decode authenticator"
+
+ ec KRB_RD_AP_EXP,
+ "Ticket expired"
+
+ ec KRB_RD_AP_REPEAT,
+ "Repeated request"
+
+ ec KRB_RD_AP_NOT_US,
+ "The ticket isn't for us"
+
+ ec KRB_RD_AP_INCON,
+ "Request is inconsistent"
+
+ ec KRB_RD_AP_TIME,
+ "Delta-T too big"
+
+ ec KRB_RD_AP_BADD,
+ "Incorrect net address"
+
+ ec KRB_RD_AP_VERSION,
+ "Protocol version mismatch"
+
+ ec KRB_RD_AP_MSG_TYPE,
+ "Invalid message type"
+
+ ec KRB_RD_AP_MODIFIED,
+ "Message stream modified"
+
+ ec KRB_RD_AP_ORDER,
+ "Message out of order"
+
+ ec KRB_RD_AP_UNAUTHOR,
+ "Unauthorized request"
+
+ ec KRB_GT_PW_NULL,
+ "Current password is null"
+
+ ec KRB_GT_PW_BADPW,
+ "Incorrect current password"
+
+ ec KRB_GT_PW_PROT,
+ "Protocol error"
+
+ ec KRB_GT_PW_KDCERR,
+ "Error returned by KDC"
+
+ ec KRB_GT_PW_NULLTKT,
+ "Null ticket returned by KDC"
+
+ ec KRB_SKDC_RETRY,
+ "Retry count exceeded"
+
+ ec KRB_SKDC_CANT,
+ "Can't send request"
+
+ end
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test2.et
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test2.et?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test2.et (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test2.et Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9 @@
+ error_table quux
+
+ ec FOO_ERR, "foo"
+
+ ec BAR_ERR, "bar"
+
+ ec BAZ_ERR, "meow"
+
+ end
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test_et.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test_et.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test_et.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/test_et.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,47 @@
+#include <stdio.h>
+#include <errno.h>
+#include "com_err.h"
+#include "test1.h"
+#include "test2.h"
+
+extern int sys_nerr, errno;
+
+main()
+{
+ printf("Before initiating error table:\n\n");
+ printf("Table name '%s'\n", error_table_name(KRB_MK_AP_TGTEXP));
+ printf("UNIX name '%s'\n", error_table_name(EPERM));
+ printf("Msg TGT-expired is '%s'\n", error_message(KRB_MK_AP_TGTEXP));
+ printf("Msg EPERM is '%s'\n", error_message(EPERM));
+ printf("Msg FOO_ERR is '%s'\n", error_message(FOO_ERR));
+ printf("Msg {sys_nerr-1} is '%s'\n", error_message(sys_nerr-1));
+ printf("Msg {sys_nerr} is '%s'\n", error_message(sys_nerr));
+
+ printf("With 0: tgt-expired -> %s\n", error_message(KRB_MK_AP_TGTEXP));
+
+ initialize_krb_error_table();
+ printf("KRB error table initialized: base %d (%s), name %s\n",
+ ERROR_TABLE_BASE_krb, error_message(ERROR_TABLE_BASE_krb),
+ error_table_name(ERROR_TABLE_BASE_krb));
+ initialize_krb_error_table();
+ printf("With krb: tgt-expired -> %s\n",
+ error_message(KRB_MK_AP_TGTEXP));
+
+ initialize_quux_error_table();
+ printf("QUUX error table initialized: base %d (%s), name %s\n",
+ ERROR_TABLE_BASE_quux, error_message(ERROR_TABLE_BASE_quux),
+ error_table_name(ERROR_TABLE_BASE_quux));
+
+ printf("Msg for TGT-expired is '%s'\n",
+ error_message(KRB_MK_AP_TGTEXP));
+ printf("Msg {sys_nerr-1} is '%s'\n", error_message(sys_nerr-1));
+ printf("Msg FOO_ERR is '%s'\n", error_message(FOO_ERR));
+ printf("Msg KRB_SKDC_CANT is '%s'\n",
+ error_message(KRB_SKDC_CANT));
+ printf("Msg 1e6 (8B 64) is '%s'\n", error_message(1000000));
+ printf("\n\nCOM_ERR tests:\n");
+ com_err("whoami", FOO_ERR, (char *)NULL);
+ com_err("whoami", FOO_ERR, " -- message goes %s", "here");
+ com_err("whoami", 0, (char *)0);
+ com_err("whoami", 0, "error number %d\n", 0);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/texinfo.tex
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/texinfo.tex?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/texinfo.tex (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/et/texinfo.tex Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2077 @@
+%% TeX macros to handle texinfo files
+
+% Copyright (C) 1985, 1986, 1988 Richard M. Stallman
+
+% NO WARRANTY
+
+% BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
+%NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
+%WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
+%RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS"
+%WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+%BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+%FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
+%AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+%DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
+%CORRECTION.
+
+% IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
+%STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
+%WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
+%LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
+%OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+%USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
+%DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
+%A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
+%PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
+%DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
+
+% GENERAL PUBLIC LICENSE TO COPY
+
+% 1. You may copy and distribute verbatim copies of this source file
+%as you receive it, in any medium, provided that you conspicuously
+%and appropriately publish on each copy a valid copyright notice
+%"Copyright (C) 1986 Richard M. Stallman"; and include
+%following the copyright notice a verbatim copy of the above disclaimer
+%of warranty and of this License.
+
+% 2. You may modify your copy or copies of this source file or
+%any portion of it, and copy and distribute such modifications under
+%the terms of Paragraph 1 above, provided that you also do the following:
+
+% a) cause the modified files to carry prominent notices stating
+% that you changed the files and the date of any change; and
+
+% b) cause the whole of any work that you distribute or publish,
+% that in whole or in part contains or is a derivative of this
+% program or any part thereof, to be licensed at no charge to all
+% third parties on terms identical to those contained in this
+% License Agreement (except that you may choose to grant more extensive
+% warranty protection to some or all third parties, at your option).
+
+% c) You may charge a distribution fee for the physical act of
+% transferring a copy, and you may at your option offer warranty
+% protection in exchange for a fee.
+
+%Mere aggregation of another unrelated program with this program (or its
+%derivative) on a volume of a storage or distribution medium does not bring
+%the other program under the scope of these terms.
+
+% 3. You may copy and distribute this program (or a portion or derivative
+%of it, under Paragraph 2) in object code or executable form under the terms
+%of Paragraphs 1 and 2 above provided that you also do one of the following:
+
+% a) accompany it with the complete corresponding machine-readable
+% source code, which must be distributed under the terms of
+% Paragraphs 1 and 2 above; or,
+
+% b) accompany it with a written offer, valid for at least three
+% years, to give any third party free (except for a nominal
+% shipping charge) a complete machine-readable copy of the
+% corresponding source code, to be distributed under the terms of
+% Paragraphs 1 and 2 above; or,
+
+% c) accompany it with the information you received as to where the
+% corresponding source code may be obtained. (This alternative is
+% allowed only for noncommercial distribution and only if you
+% received the program in object code or executable form alone.)
+
+%For an executable file, complete source code means all the source code for
+%all modules it contains; but, as a special exception, it need not include
+%source code for modules which are standard libraries that accompany the
+%operating system on which the executable file runs.
+
+% 4. You may not copy, sublicense, distribute or transfer this program
+%except as expressly provided under this License Agreement. Any attempt
+%otherwise to copy, sublicense, distribute or transfer this program is void and
+%your rights to use the program under this License agreement shall be
+%automatically terminated. However, parties who have received computer
+%software programs from you with this License Agreement will not have
+%their licenses terminated so long as such parties remain in full compliance.
+
+% 5. If you wish to incorporate parts of this program into other free
+%programs whose distribution conditions are different, write to the Free
+%Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet
+%worked out a simple rule that can be stated here, but we will often permit
+%this. We will be guided by the two goals of preserving the free status of
+%all derivatives of our free software and of promoting the sharing and reuse of
+%software.
+
+%In other words, you are welcome to use, share and improve this program.
+%You are forbidden to forbid anyone else to use, share and improve
+%what you give them. Help stamp out software-hoarding!
+
+\def\texinfoversion{1.18}
+\message{Loading texinfo package [Version \texinfoversion]:}
+\message{}
+
+% Save some parts of plain tex whose names we will redefine.
+
+\let\ptexlbrace=\{
+\let\ptexrbrace=\}
+\let\ptexdot=\.
+\let\ptexstar=\*
+\let\ptexend=\end
+\let\ptexbullet=\bullet
+\let\ptexb=\b
+\let\ptexc=\c
+\let\ptexi=\i
+\let\ptext=\t
+\let\ptexl=\l
+\let\ptexL=\L
+
+\def\tie{\penalty 10000\ } % Save plain tex definition of ~.
+
+\message{Basics,}
+\chardef\other=12
+
+\hyphenation{ap-pen-dix}
+\hyphenation{mini-buf-fer mini-buf-fers}
+\hyphenation{eshell}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen \bindingoffset \bindingoffset=0pt
+\newdimen \normaloffset \normaloffset=\hoffset
+\newdimen\pagewidth \newdimen\pageheight
+\pagewidth=\hsize \pageheight=\vsize
+
+%---------------------Begin change-----------------------
+%
+% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\cornerlong \newdimen\cornerthick
+\newdimen \topandbottommargin
+\newdimen \outerhsize \newdimen \outervsize
+\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
+\outerhsize=7in
+\outervsize=9.5in
+\topandbottommargin=.75in
+%
+%---------------------End change-----------------------
+
+% \onepageout takes a vbox as an argument. Note that \pagecontents
+% does insertions itself, but you have to call it yourself.
+\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
+\def\onepageout#1{\hoffset=\normaloffset
+\ifodd\pageno \advance\hoffset by \bindingoffset
+\else \advance\hoffset by -\bindingoffset\fi
+\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
+ {\let\hsize=\pagewidth \makefootline}}
+\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
+
+
+% Here is a modification of the main output routine for Near East Publications
+% This provides right-angle cropmarks at all four corners.
+% The contents of the page are centerlined into the cropmarks,
+% and any desired binding offset is added as an \hskip on either
+% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
+%
+\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
+ \shipout
+ \vbox to \outervsize{\hsize=\outerhsize
+ \vbox{\line{\ewtop\hfill\ewtop}}
+ \nointerlineskip
+ \line{\vbox{\moveleft\cornerthick\nstop}
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}}
+ \vskip \topandbottommargin
+ \centerline{\ifodd\pageno\hskip\bindingoffset\fi
+ \vbox{
+ {\let\hsize=\pagewidth \makeheadline}
+ \pagebody{#1}
+ {\let\hsize=\pagewidth \makefootline}}
+ \ifodd\pageno\else\hskip\bindingoffset\fi}
+ \vskip \topandbottommargin plus1fill minus1fill
+ \boxmaxdepth\cornerthick
+ \line{\vbox{\moveleft\cornerthick\nsbot}
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}}
+ \nointerlineskip
+ \vbox{\line{\ewbot\hfill\ewbot}}
+ }
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
+%
+% Do @cropmarks to get crop marks
+\def\cropmarks{\let\onepageout=\croppageout }
+
+\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+{\catcode`\@ =11
+\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+\dimen@=\dp#1 \unvbox#1
+\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
+\ifr at ggedbottom \kern-\dimen@ \vfil \fi}
+}
+
+%
+% Here are the rules for the cropmarks. Note that they are
+% offset so that the space between them is truly \outerhsize or \outervsize
+% (P. A. MacKay, 12 November, 1986)
+%
+\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
+\def\nstop{\vbox
+ {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
+\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
+\def\nsbot{\vbox
+ {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Parse an argument, then pass it to #1.
+% The argument can be delimited with [...] or with "..." or braces
+% or it can be a whole line.
+% #1 should be a macro which expects
+% an ordinary undelimited TeX argument.
+
+\def\parsearg #1{\let\next=#1\begingroup\obeylines\futurelet\temp\parseargx}
+
+\def\parseargx{%
+\ifx \obeyedspace\temp \aftergroup\parseargdiscardspace \else%
+\aftergroup \parseargline %
+\fi \endgroup}
+
+{\obeyspaces %
+\gdef\parseargdiscardspace {\begingroup\obeylines\futurelet\temp\parseargx}}
+
+\gdef\obeyedspace{\ }
+
+\def\parseargline{\begingroup \obeylines \parsearglinex}
+{\obeylines %
+\gdef\parsearglinex #1^^M{\endgroup \next {#1}}}
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+%% These are used to keep @begin/@end levels from running away
+%% Call \inENV within environments (after a \begingroup)
+\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
+\def\ENVcheck{%
+\ifENV\errmessage{Still within an environment. Type Return to continue.}
+\endgroup\fi} % This is not perfect, but it should reduce lossage
+
+% @begin foo is the same as @foo, for now.
+\newhelp\EMsimple{Type <Return> to continue}
+
+\outer\def\begin{\parsearg\beginxxx}
+
+\def\beginxxx #1{%
+\expandafter\ifx\csname #1\endcsname\relax
+{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
+\csname #1\endcsname\fi}
+
+%% @end foo executes the definition of \Efoo.
+%% foo can be delimited by doublequotes or brackets.
+
+\def\end{\parsearg\endxxx}
+
+\def\endxxx #1{%
+\expandafter\ifx\csname E#1\endcsname\relax
+\expandafter\ifx\csname #1\endcsname\relax
+\errmessage{Undefined command @end #1}\else
+\errorE{#1}\fi\fi
+\csname E#1\endcsname}
+\def\errorE#1{
+{\errhelp=\EMsimple \errmessage{@end #1 not within #1 environment}}}
+
+% Single-spacing is done by various environments.
+
+\newskip\singlespaceskip \singlespaceskip = \baselineskip
+\def\singlespace{%
+{\advance \baselineskip by -\singlespaceskip
+\kern \baselineskip}%
+\baselineskip=\singlespaceskip
+}
+
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\sf \char '100}}
+
+% Define @` and @' to be the same as ` and '
+% but suppressing ligatures.
+\def\`{{`}}
+\def\'{{'}}
+
+% Used to generate quoted braces.
+
+\def\mylbrace {{\tt \char '173}}
+\def\myrbrace {{\tt \char '175}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break}
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=3000 }
+
+% @w prevents a word break
+\def\w #1{\hbox{#1}}
+
+% @group ... @end group forces ... to be all on one page.
+
+\def\group{\begingroup% \inENV ???
+\def \Egroup{\egroup\endgroup}
+\vbox\bgroup}
+
+% @br forces paragraph break
+
+\let\br = \par
+
+% @dots{} output some dots
+
+\def\dots{$\ldots$}
+
+% @page forces the start of a new page
+
+\def\page{\par\vfill\supereject}
+
+% @exdent text....
+% outputs text on separate line in roman font, starting at standard page margin
+
+\def\exdent{\errmessage{@exdent in filled text}}
+ % @lisp, etc, define \exdent locally from \internalexdent
+
+{\obeyspaces
+\gdef\internalexdent{\parsearg\exdentzzz}}
+
+\def\exdentzzz #1{{\advance \leftskip by -\lispnarrowing
+\advance \hsize by -\leftskip
+\advance \hsize by -\rightskip
+\leftline{{\rm#1}}}}
+
+% @include file insert text of that file as input.
+
+\def\include{\parsearg\includezzz}
+\def\includezzz #1{{\def\thisfile{#1}\input #1
+}}
+
+\def\thisfile{}
+
+% @center line outputs that line, centered
+
+\def\center{\parsearg\centerzzz}
+\def\centerzzz #1{{\advance\hsize by -\leftskip
+\advance\hsize by -\rightskip
+\centerline{#1}}}
+
+% @sp n outputs n lines of vertical space
+
+\def\sp{\parsearg\spxxx}
+\def\spxxx #1{\par \vskip #1\baselineskip}
+
+% @comment ...line which is ignored...
+% @c is the same as @comment
+% @ignore ... @end ignore is another way to write a comment
+
+\def\comment{\parsearg \commentxxx}
+
+\def\commentxxx #1{}
+
+\let\c=\comment
+
+\long\def\ignore #1\end ignore{}
+
+\outer\def\ifset{\parsearg\ifsetxxx}
+
+\def\ifsetxxx #1#2\end ifset{%
+\expandafter\ifx\csname IF#1\endcsname\relax \else #2\fi}
+
+\outer\def\ifclear{\parsearg\ifclearxxx}
+
+\def\ifclearxxx #1#2\end ifclear{%
+\expandafter\ifx\csname IF#1\endcsname\relax #2\fi}
+
+% Some texinfo constructs that are trivial in tex
+
+\def\iftex{}
+\def\Eiftex{}
+\long\def\ifinfo #1\end ifinfo{}
+\long\def\menu #1\end menu{}
+\def\asis#1{#1}
+
+\def\node{\parsearg\nodezzz}
+\def\nodezzz#1{\nodexxx [#1,]}
+\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
+\let\lastnode=\relax
+
+\def\donoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\setref{\lastnode}\fi
+\let\lastnode=\relax}
+
+\def\unnumbnoderef{\ifx\lastnode\relax\else
+\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
+\let\lastnode=\relax}
+
+\let\refill=\relax
+
+\let\setfilename=\comment
+
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{See Info file \file{\losespace#3{}}, node `\losespace#1{}'}
+\def\losespace #1{#1}
+
+\message{fonts,}
+
+% Font-change commands.
+
+%% Try out Computer Modern fonts at \magstephalf
+\font\tenrm=cmr10 scaled \magstephalf
+\font\tentt=cmtt10 scaled \magstephalf
+% Instead of cmb10, you many want to use cmbx10.
+% cmbx10 is a prettier font on its own, but cmb10
+% looks better when embedded in a line with cmr10.
+\font\tenbf=cmb10 scaled \magstephalf
+\font\tenit=cmti10 scaled \magstephalf
+\font\tensl=cmsl10 scaled \magstephalf
+\font\tensf=cmss10 scaled \magstephalf
+\def\li{\sf}
+\font\tensc=cmcsc10 scaled \magstephalf
+
+% Fonts for @defun, etc.
+\font\defbf=cmbx10 scaled \magstep1 %was 1314
+\let\deftt=\tentt
+\def\df{\let\tt=\deftt \defbf}
+
+% Font for title
+\font\titlerm = cmbx10 scaled \magstep5
+
+% Fonts for indices
+\font\indit=cmti9 \font\indrm=cmr9
+\def\indbf{\indrm} \def\indsl{\indit}
+\def\indexfonts{\let\it=\indit \let\sl=\indsl \let\bf=\indbf \let\rm=\indrm}
+
+% Fonts for headings
+\font\chaprm=cmbx10 scaled \magstep3
+\font\chapit=cmti10 scaled \magstep3
+\font\chapsl=cmsl10 scaled \magstep3
+\font\chaptt=cmtt10 scaled \magstep3
+\font\chapsf=cmss10 scaled \magstep3
+\let\chapbf=\chaprm
+
+\font\secrm=cmbx10 scaled \magstep2
+\font\secit=cmti10 scaled \magstep2
+\font\secsl=cmsl10 scaled \magstep2
+\font\sectt=cmtt10 scaled \magstep2
+\font\secsf=cmss10 scaled \magstep2
+\let\secbf=\secrm
+
+\font\ssecrm=cmbx10 scaled \magstep1
+\font\ssecit=cmti10 scaled \magstep1
+\font\ssecsl=cmsl10 scaled \magstep1
+\font\ssectt=cmtt10 scaled \magstep1
+\font\ssecsf=cmss10 scaled \magstep1
+\let\ssecbf=\ssecrm
+
+\def\textfonts{\let\rm=\tenrm\let\it=\tenit\let\sl=\tensl\let\bf=\tenbf%
+\let\sc=\tensc\let\sf=\tensf}
+\def\chapfonts{\let\rm=\chaprm\let\it=\chapit\let\sl=\chapsl\let\bf=\chapbf\let\tt=\chaptt\let\sf=\chapsf}
+\def\secfonts{\let\rm=\secrm\let\it=\secit\let\sl=\secsl\let\bf=\secbf\let\tt=\sectt\let\sf=\secsf}
+\def\subsecfonts{\let\rm=\ssecrm\let\it=\ssecit\let\sl=\ssecsl\let\bf=\ssecbf\let\tt=\ssectt\let\sf=\ssecsf}
+% Count depth in font-changes, for error checks
+\newcount\fontdepth \fontdepth=0
+
+%% Add scribe-like font environments, plus @l for inline lisp (usually sans
+%% serif) and @ii for TeX italic
+
+\def\i#1{{\sl #1}}
+\let\var=\i
+\let\dfn=\i
+\let\emph=\i
+\let\cite=\i
+
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+\def\t#1{{\tt \rawbackslash \frenchspacing #1}\null}
+\let\ttfont = \t
+\let\kbd=\t
+\let\code=\t
+\def\samp #1{`{\tt \rawbackslash \frenchspacing #1}'\null}
+\def\key #1{{\tt \uppercase{#1}}\null}
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+\let\file=\samp
+
+\def\l#1{{\li #1}\null}
+
+\def\r#1{{\rm #1}}
+\def\s#1{{\sc #1}}
+\def\ii#1{{\it #1}}
+
+\def\titlefont#1{{\titlerm #1}}
+
+\def\titlepage{\begingroup \parindent=0pt \hbox{}%
+\let\oldpage=\page
+\def\page{\oldpage \hbox{}}}
+
+\def\Etitlepage{\endgroup\page\HEADINGSon}
+
+% Make altmode in file print out right
+
+\catcode `\^^[=\active \def^^[{$\diamondsuit$}
+
+\message{page headings,}
+
+%%% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks \evenheadline % Token sequence for heading line of even pages
+\newtoks \oddheadline % Token sequence for heading line of odd pages
+\newtoks \evenfootline % Token sequence for footing line of even pages
+\newtoks \oddfootline % Token sequence for footing line of odd pages
+
+% Now make Tex use those variables
+\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}}
+\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}}
+
+% Commands to set those variables.
+% For example, this is what @headings on does
+% @evenheading @thistitle|@thispage|@thischapter
+% @oddheading @thischapter|@thispage|@thistitle
+% @evenfooting @thisfile||
+% @oddfooting ||@thisfile
+
+\def\evenheading{\parsearg\evenheadingxxx}
+\def\oddheading{\parsearg\oddheadingxxx}
+\def\everyheading{\parsearg\everyheadingxxx}
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\everyfooting{\parsearg\everyfootingxxx}
+
+{\catcode`\@=0 %
+
+\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
+\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
+\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish}
+\gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
+\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
+\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish}
+\gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
+\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+%
+}% unbind the catcode of @.
+
+% @headings on turns them on.
+% @headings off turns them off.
+% By default, they are off.
+
+\def\headings #1 {\csname HEADINGS#1\endcsname}
+
+\def\HEADINGSoff{
+\global\evenheadline={\hfil} \global\evenfootline={\hfil}
+\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
+\HEADINGSoff
+% When we turn headings on, set the page number to 1,
+% Put current file name in lower left corner,
+% Put chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSon{
+\pagealignmacro
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+}
+
+% Subroutines used in generating headings
+% Produces Day Month Year style of output.
+\def\today{\number\day\space
+\ifcase\month\or
+January\or February\or March\or April\or May\or June\or
+July\or August\or September\or October\or November\or December\fi
+\space\number\year}
+
+% Use this if you want the Month Day, Year style of output.
+%\def\today{\ifcase\month\or
+%January\or February\or March\or April\or May\or June\or
+%July\or August\or September\or October\or November\or December\fi
+%\space\number\day, \number\year}
+
+% @settitle line... specifies the title of the document, for headings
+% It generates no output of its own
+
+\def\thistitle{No Title}
+\def\settitle{\parsearg\settitlezzz}
+\def\settitlezzz #1{\gdef\thistitle{#1}}
+
+\message{tables,}
+
+% Tables -- @table, @ftable, @item(x), @kitem(x), @xitem(x).
+
+% default indentation of table text
+\newdimen\tableindent \tableindent=.8in
+% default indentation of @itemize and @enumerate text
+\newdimen\itemindent \itemindent=.3in
+% margin between end of table item and start of table text.
+\newdimen\itemmargin \itemmargin=.1in
+
+% used internally for \itemindent minus \itemmargin
+\newdimen\itemmax
+
+% Note @table and @ftable define @item, @itemx, etc., with these defs.
+% They also define \itemindex
+% to index the item name in whatever manner is desired (perhaps none).
+
+\def\internalBitem{\smallbreak \parsearg\itemzzz}
+\def\internalBitemx{\par \parsearg\itemzzz}
+
+\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
+\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \par \parsearg\xitemzzz}
+
+\def\internalBkitem{\smallbreak \parsearg\kitemzzz}
+\def\internalBkitemx{\par \parsearg\kitemzzz}
+
+\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}\itemzzz {#1}}
+
+\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}\itemzzz {#1}}
+
+\def\itemzzz #1{\begingroup %
+\advance \hsize by -\rightskip %
+\advance \hsize by -\leftskip %
+\setbox0=\hbox{\itemfont{#1}}%
+\itemindex{#1}%
+\parskip=0in %
+\noindent %
+\ifdim \wd0>\itemmax %
+\vadjust{\penalty 10000}%
+\hbox to \hsize{\hskip -\tableindent\box0\hss}\ %
+\else %
+\hbox to 0pt{\hskip -\tableindent\box0\hss}%
+\fi %
+\endgroup %
+}
+
+\def\item{\errmessage{@item while not in a table}}
+\def\itemx{\errmessage{@itemx while not in a table}}
+\def\kitem{\errmessage{@kitem while not in a table}}
+\def\kitemx{\errmessage{@kitemx while not in a table}}
+\def\xitem{\errmessage{@xitem while not in a table}}
+\def\xitemx{\errmessage{@xitemx while not in a table}}
+
+%% Contains a kludge to get @end[description] to work
+\def\description{\tablez{\dontindex}{1}{}{}{}{}}
+
+\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
+{\obeylines\obeyspaces%
+\gdef\tablex #1^^M{%
+\tabley\dontindex#1 \endtabley}}
+
+\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
+{\obeylines\obeyspaces%
+\gdef\ftablex #1^^M{%
+\tabley\fnitemindex#1 \endtabley}}
+
+\def\dontindex #1{}
+\def\fnitemindex #1{\doind {fn}{\code{#1}}}%
+
+{\obeyspaces %
+\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
+\tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
+
+\def\tablez #1#2#3#4#5#6{%
+\aboveenvbreak %
+\begingroup %
+\def\Edescription{\Etable}% Neccessary kludge.
+\let\itemindex=#1%
+\ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
+\ifnum 0#4>0 \tableindent=#4\mil \fi %
+\ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
+\def\itemfont{#2}%
+\itemmax=\tableindent %
+\advance \itemmax by -\itemmargin %
+\advance \leftskip by \tableindent %
+\parindent = 0pt
+\parskip = \smallskipamount
+\ifdim \parskip=0pt \parskip=2pt \fi%
+\def\Etable{\endgraf\endgroup\afterenvbreak}%
+\let\item = \internalBitem %
+\let\itemx = \internalBitemx %
+\let\kitem = \internalBkitem %
+\let\kitemx = \internalBkitemx %
+\let\xitem = \internalBxitem %
+\let\xitemx = \internalBxitemx %
+}
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\def\itemize{\parsearg\itemizezzz}
+
+\def\itemizezzz #1{\itemizey {#1}{\Eitemize}}
+
+\def\itemizey #1#2{%
+\aboveenvbreak %
+\begingroup %
+\itemno = 0 %
+\itemmax=\itemindent %
+\advance \itemmax by -\itemmargin %
+\advance \leftskip by \itemindent %
+\parindent = 0pt
+\parskip = \smallskipamount
+\ifdim \parskip=0pt \parskip=2pt \fi%
+\def#2{\endgraf\endgroup\afterenvbreak}%
+\def\itemcontents{#1}%
+\let\item=\itemizeitem}
+
+\def\bullet{$\ptexbullet$}
+\def\minus{$-$}
+
+\def\enumerate{\itemizey{\the\itemno.}\Eenumerate\flushcr}
+
+% Definition of @item while inside @itemize.
+
+\def\itemizeitem{%
+\advance\itemno by 1
+{\let\par=\endgraf \smallbreak}%
+\ifhmode \errmessage{\in hmode at itemizeitem}\fi
+{\parskip=0in \hskip 0pt
+\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
+\vadjust{\penalty 300}}%
+\flushcr}
+
+\message{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within \newindex.
+{\catcode`\@=11
+\gdef\newwrite{\alloc at 7\write\chardef\sixt@@n}}
+
+% \newindex {foo} defines an index named foo.
+% It automatically defines \fooindex such that
+% \fooindex ...rest of line... puts an entry in the index foo.
+% It also defines \fooindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is foo.
+% The name of an index should be no more than 2 characters long
+% for the sake of vms.
+
+\def\newindex #1{
+\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
+\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\doindex {#1}}
+}
+
+% @defindex foo == \newindex{foo}
+
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+
+\def\newcodeindex #1{
+\expandafter\newwrite \csname#1indfile\endcsname% Define number for output file
+\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\docodeindex {#1}}
+}
+
+\def\defcodeindex{\parsearg\newcodeindex}
+
+% @synindex foo bar makes index foo feed into index bar.
+% Do this instead of @defindex foo if you don't want it as a separate index.
+\def\synindex #1 #2 {%
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\doindex {#2}}%
+}
+
+% @syncodeindex foo bar similar, but put all entries made for index foo
+% inside @code.
+\def\syncodeindex #1 #2 {%
+\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
+\noexpand\docodeindex {#2}}%
+}
+
+% Define \doindex, the driver for all \fooindex macros.
+% Argument #1 is generated by the calling \fooindex macro,
+% and it is "foo", the name of the index.
+
+% \doindex just uses \parsearg; it calls \doind for the actual work.
+% This is because \doind is more useful to call from other macros.
+
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+
+\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
+\def\singleindexer #1{\doind{\indexname}{#1}}
+
+% like the previous two, but they put @code around the argument.
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
+\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+
+\def\indexdummies{%
+\def\bf{\realbackslash bf }%
+\def\rm{\realbackslash rm }%
+\def\sl{\realbackslash sl }%
+\def\dots{\realbackslash dots }%
+\def\copyright{\realbackslash copyright }%
+}
+
+% \indexnofonts no-ops all font-change commands.
+% This is used when outputting the strings to sort the index by.
+\def\indexdummyfont#1{#1}
+\def\indexnofonts{%
+\let\code=\indexdummyfont
+\let\samp=\indexdummyfont
+\let\kbd=\indexdummyfont
+\let\key=\indexdummyfont
+\let\var=\indexdummyfont
+}
+
+% To define \realbackslash, we must make \ not be an escape.
+% We must first make another character (@) an escape
+% so we do not become unable to do a definition.
+
+{\catcode`\@=0 \catcode`\\=\other
+ at gdef@realbackslash{\}}
+
+\let\indexbackslash=0 %overridden during \printindex.
+
+\def\doind #1#2{%
+{\indexdummies % Must do this here, since \bf, etc expand at this stage
+\count10=\lastpenalty %
+\escapechar=`\\%
+{\let\folio=0% Expand all macros now EXCEPT \folio
+\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
+% so it will be output as is; and it will print as backslash in the indx.
+%
+% Now process the index-string once, with all font commands turned off,
+% to get the string to sort the index by.
+{\indexnofonts
+\xdef\temp1{#2}%
+}%
+% Now produce the complete index entry. We process the index-string again,
+% this time with font commands expanded, to get what to print in the index.
+\edef\temp{%
+\write \csname#1indfile\endcsname{%
+\realbackslash entry {\temp1}{\folio}{#2}}}%
+\temp }%
+\penalty\count10}}
+
+\def\dosubind #1#2#3{%
+{\indexdummies % Must do this here, since \bf, etc expand at this stage
+\count10=\lastpenalty %
+\escapechar=`\\%
+{\let\folio=0%
+\def\rawbackslashxx{\indexbackslash}%
+%
+% Now process the index-string once, with all font commands turned off,
+% to get the string to sort the index by.
+{\indexnofonts
+\xdef\temp1{#2 #3}%
+}%
+% Now produce the complete index entry. We process the index-string again,
+% this time with font commands expanded, to get what to print in the index.
+\edef\temp{%
+\write \csname#1indfile\endcsname{%
+\realbackslash entry {\temp1}{\folio}{#2}{#3}}}%
+\temp }%
+\penalty\count10}}
+
+% The index entry written in the file actually looks like
+% \entry {sortstring}{page}{topic}
+% or
+% \entry {sortstring}{page}{topic}{subtopic}
+% The texindex program reads in these files and writes files
+% containing these kinds of lines:
+% \initial {c}
+% before the first topic whose initial is c
+% \entry {topic}{pagelist}
+% for a topic that is used without subtopics
+% \primary {topic}
+% for the beginning of a topic that is used with subtopics
+% \secondary {subtopic}{pagelist}
+% for each subtopic.
+
+% Define the user-accessible indexing commands
+% @findex, @vindex, @kindex, @cindex.
+
+\def\findex {\fnindex}
+\def\kindex {\kyindex}
+\def\cindex {\cpindex}
+\def\vindex {\vrindex}
+\def\tindex {\tpindex}
+\def\pindex {\pgindex}
+
+\def\cindexsub {\begingroup\obeylines\cindexsub}
+{\obeylines %
+\gdef\cindexsub "#1" #2^^M{\endgroup %
+\dosubind{cp}{#2}{#1}}}
+
+% Define the macros used in formatting output of the sorted index material.
+
+% This is what you call to cause a particular index to get printed.
+% Write
+% @unnumbered Function Index
+% @printindex fn
+
+\def\printindex{\parsearg\doprintindex}
+
+\def\doprintindex#1{\tex %
+\catcode`\%=\other\catcode`\&=\other\catcode`\#=\other
+\catcode`\$=\other\catcode`\_=\other
+\catcode`\~=\other
+\def\indexbackslash{\rawbackslashxx}
+\indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt
+\begindoublecolumns
+\openin 1 \jobname.#1s
+\ifeof 1 \else \closein 1 \input \jobname.#1s
+\fi
+\enddoublecolumns
+\Etex}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+% Same as \bigskipamount except no shrink.
+% \balancecolumns gets confused if there is any shrink.
+\newskip\initialskipamount \initialskipamount 12pt plus4pt
+
+\outer\def\initial #1{%
+{\let\tentt=\sectt \let\sf=\sectt
+\ifdim\lastskip<\initialskipamount
+\removelastskip \penalty-200 \vskip \initialskipamount\fi
+\line{\secbf#1\hfill}\kern 2pt\penalty3000}}
+
+\outer\def\entry #1#2{
+{\parfillskip=0in \parskip=0in \parindent=0in
+\hangindent=1in \hangafter=1%
+\noindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll #2\par
+}}
+
+\def\primary #1{\line{#1\hfil}}
+
+\newskip\secondaryindent \secondaryindent=0.5cm
+
+\def\secondary #1#2{
+{\parfillskip=0in \parskip=0in
+\hangindent =1in \hangafter=1
+\noindent\hskip\secondaryindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll#2\par
+}}
+
+%% Define two-column mode, which is used in indexes.
+%% Adapted from the TeXBook, page 416
+\catcode `\@=11
+
+\newbox\partialpage
+
+\newdimen\doublecolumnhsize \doublecolumnhsize = 3.11in
+\newdimen\doublecolumnvsize \doublecolumnvsize = 19.1in
+
+\def\begindoublecolumns{\begingroup
+ \output={\global\setbox\partialpage=\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}\eject
+ \output={\doublecolumnout} \hsize=\doublecolumnhsize \vsize=\doublecolumnvsize}
+\def\enddoublecolumns{\output={\balancecolumns}\eject
+ \endgroup \pagegoal=\vsize}
+
+\def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth
+ \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty}
+\def\pagesofar{\unvbox\partialpage %
+ \hsize=\doublecolumnhsize % have to restore this since output routine
+% changes it to set cropmarks (P. A. MacKay, 12 Nov. 1986)
+ \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
+\def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0
+ \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by2 \splittopskip=\topskip
+ {\vbadness=10000 \loop \global\setbox3=\copy0
+ \global\setbox1=\vsplit3 to\dimen@
+ \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}
+ \setbox0=\vbox to\dimen@{\unvbox1} \setbox2=\vbox to\dimen@{\unvbox3}
+ \pagesofar}
+
+\catcode `\@=\other
+\message{sectioning,}
+% Define chapters, sections, etc.
+
+\newcount \chapno
+\newcount \secno
+\newcount \subsecno
+\newcount \subsubsecno
+
+% This counter is funny since it counts through charcodes of letters A, B, ...
+\newcount \appendixno \appendixno = `\@
+\def\appendixletter{\char\the\appendixno}
+
+\newwrite \contentsfile
+\openout \contentsfile = \jobname.toc
+
+% Each @chapter defines this as the name of the chapter.
+% page headings and footings can use it. @section does likewise
+
+\def\thischapter{} \def\thissection{}
+\def\seccheck#1{\if \pageno<0 %
+\errmessage{@#1 not allowed after generating table of contents}\fi
+%
+}
+
+\outer\def\chapter{\parsearg\chapterzzz}
+\def\chapterzzz #1{\seccheck{chapter}%
+\secno=0 \subsecno=0 \subsubsecno=0 \global\advance \chapno by 1 \message{Chapter \the\chapno}%
+\chapmacro {#1}{\the\chapno}%
+\gdef\thissection{#1}\gdef\thischapter{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+}
+
+\outer\def\appendix{\parsearg\appendixzzz}
+\def\appendixzzz #1{\seccheck{appendix}%
+\secno=0 \subsecno=0 \subsubsecno=0 \global\advance \appendixno by 1 \message{Appendix \appendixletter}%
+\chapmacro {#1}{Appendix \appendixletter}%
+\gdef\thischapter{#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash chapentry {#1}{Appendix \appendixletter}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+}
+
+\outer\def\unnumbered{\parsearg\unnumberedzzz}
+\def\unnumberedzzz #1{\seccheck{unnumbered}%
+\secno=0 \subsecno=0 \subsubsecno=0 \message{(#1)}
+\unnumbchapmacro {#1}%
+\gdef\thischapter{#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+}
+
+\outer\def\section{\parsearg\sectionzzz}
+\def\sectionzzz #1{\seccheck{section}%
+\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
+\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash secentry %
+{#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}
+
+\outer\def\appendixsection{\parsearg\appendixsectionzzz}
+\outer\def\appendixsec{\parsearg\appendixsectionzzz}
+\def\appendixsectionzzz #1{\seccheck{appendixsection}%
+\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
+\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash secentry %
+{#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\unnumberedsec{\parsearg\unnumberedseczzz}
+\def\unnumberedseczzz #1{\seccheck{unnumberedsec}%
+\plainsecheading {#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\subsection{\parsearg\subsectionzzz}
+\def\subsectionzzz #1{\seccheck{subsection}%
+\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
+\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash subsecentry %
+{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}
+
+\outer\def\appendixsubsec{\parsearg\appendixsubseczzz}
+\def\appendixsubseczzz #1{\seccheck{appendixsubsec}%
+\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
+\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash subsecentry %
+{#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\unnumberedsubsec{\parsearg\unnumberedsubseczzz}
+\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
+\plainsecheading {#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\subsubsection{\parsearg\subsubsectionzzz}
+\def\subsubsectionzzz #1{\seccheck{subsubsection}%
+\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
+\subsubsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash subsubsecentry %
+{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%\
+\escapechar=`\\%
+\write \contentsfile \temp %
+\donoderef %
+\penalty 10000 %
+}
+
+\outer\def\appendixsubsubsec{\parsearg\appendixsubsubseczzz}
+\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
+\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
+\subsubsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash subsubsecentry{#1}%
+{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%\
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
+\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
+\plainsecheading {#1}\gdef\thissection{#1}%
+\let\rawbackslash=\relax%
+\let\frenchspacing=\relax%
+\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
+\escapechar=`\\%
+\write \contentsfile \temp %
+\unnumbnoderef %
+\penalty 10000 %
+}
+
+% Define @majorheading, @heading and @subheading
+
+\outer\def\majorheading #1{%
+{\advance\chapheadingskip by 10pt \chapbreak }%
+{\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 200}
+
+\outer\def\chapheading #1{\chapbreak %
+{\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 200}
+
+\let\heading=\secheadingi
+\let\subheading=\subsecheadingi
+\let\subsubheading=\subsubsecheadingi
+
+% These macros generate a chapter, section, etc. heading only
+% (including whitespace, linebreaking, etc. around it),
+% given all the information in convenient, parsed form.
+
+%%% Args are the skip and penalty (usually negative)
+\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
+
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+
+%%% Define plain chapter starts, and page on/off switching for it
+% Parameter controlling skip before chapter headings (if needed)
+
+\newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt
+
+\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+\def\chappager{\par\vfill\supereject}
+\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
+
+\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+
+\def\CHAPPAGoff{
+\global\let\pchapsepmacro=\chapbreak
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGon{
+\global\let\pchapsepmacro=\chappager
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGodd{
+\global\let\pchapsepmacro=\chapoddpage
+\global\let\pagealignmacro=\chapoddpage}
+
+\CHAPPAGon
+
+\def\CHAPFplain{
+\global\let\chapmacro=\chfplain
+\global\let\unnumbchapmacro=\unnchfplain}
+
+\def\chfplain #1#2{%
+\pchapsepmacro %
+{\chapfonts \line{\chaprm #2.\enspace #1\hfill}}\bigskip \par\penalty 5000 %
+}
+
+\def\unnchfplain #1{%
+\pchapsepmacro %
+{\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 10000 %
+}
+\CHAPFplain % The default
+
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \line{\chaprm #1\hfill}}\bigskip \par\penalty 10000 %
+}
+
+\def\chfopen #1#2{\chapoddpage {\chapfonts
+\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
+\par\penalty 5000 %
+}
+
+\def\CHAPFopen{
+\global\let\chapmacro=\chfopen
+\global\let\unnumbchapmacro=\unnchfopen}
+
+% Parameter controlling skip before section headings.
+
+\newskip \subsecheadingskip \subsecheadingskip = 17pt plus 8pt minus 4pt
+\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
+
+\newskip \secheadingskip \secheadingskip = 21pt plus 8pt minus 4pt
+\def\secheadingbreak{\dobreak \secheadingskip {-1000}}
+
+\def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}}
+\def\plainsecheading #1{\secheadingi {#1}}
+\def\secheadingi #1{{\advance \secheadingskip by \parskip %
+\secheadingbreak}%
+{\secfonts \line{\secrm #1\hfill}}%
+\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
+
+\def\subsecheading #1#2#3#4{{\advance \subsecheadingskip by \parskip %
+\subsecheadingbreak}%
+{\secfonts \line{\secrm#2.#3.#4\enspace #1\hfill}}%
+\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
+
+\def\subsubsecfonts{\subsecfonts} % Maybe this should change
+
+\def\subsubsecheading #1#2#3#4#5{{\advance \subsecheadingskip by \parskip %
+\subsecheadingbreak}%
+{\secfonts \line{\secrm#2.#3.#4.#5\enspace #1\hfill}}%
+\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000}
+
+\message{toc printing,}
+
+\def\Dotsbox{\hbox to 1em{\hss.\hss}} % Used by index macros
+
+\def\finishcontents{%
+\ifnum\pageno>0 %
+\pagealignmacro %
+\immediate\closeout \contentsfile%
+\pageno=-1 % Request roman numbered pages
+\fi}
+
+\outer\def\contents{%
+\finishcontents %
+\unnumbchapmacro{Table of Contents}
+\def\thischapter{Table of Contents}
+{\catcode`\\=0
+\catcode`\{=1 % Set up to handle contents files properly
+\catcode`\}=2
+\catcode`\@=11
+\input \jobname.toc
+}
+\vfill \eject}
+
+\outer\def\summarycontents{%
+\finishcontents %
+\unnumbchapmacro{Summary Table of Contents}
+\def\thischapter{Summary Table of Contents}
+{\catcode`\\=0
+\catcode`\{=1 % Set up to handle contents files properly
+\catcode`\}=2
+\catcode`\@=11
+\def\smallbreak{}
+\def\secentry ##1##2##3##4{}
+\def\subsecentry ##1##2##3##4##5{}
+\def\subsubsecentry ##1##2##3##4##5##6{}
+\def\unnumbsecentry ##1##2{}
+\def\unnumbsubsecentry ##1##2{}
+\def\unnumbsubsubsecentry ##1##2{}
+\let\medbreak=\smallbreak
+\input \jobname.toc
+}
+\vfill \eject}
+
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+% These macros generate individual entries in the table of contents
+% The first argument is the chapter or section name.
+% The last argument is the page number.
+% The arguments in between are the chapter number, section number, ...
+
+\def\chapentry #1#2#3{%
+\medbreak
+\line{#2.\space#1\leaders\hbox to 1em{\hss.\hss}\hfill #3}
+}
+
+\def\unnumbchapentry #1#2{%
+\medbreak
+\line{#1\leaders\Dotsbox\hfill #2}
+}
+
+\def\secentry #1#2#3#4{%
+\line{\enspace\enspace#2.#3\space#1\leaders\Dotsbox\hfill#4}
+}
+
+\def\unnumbsecentry #1#2{%
+\line{\enspace\enspace#1\leaders\Dotsbox\hfill #2}
+}
+
+\def\subsecentry #1#2#3#4#5{%
+\line{\enspace\enspace\enspace\enspace
+#2.#3.#4\space#1\leaders\Dotsbox\hfill #5}
+}
+
+\def\unnumbsubsecentry #1#2{%
+\line{\enspace\enspace\enspace\enspace#1\leaders\Dotsbox\hfill #2}
+}
+
+\def\subsubsecentry #1#2#3#4#5#6{%
+\line{\enspace\enspace\enspace\enspace\enspace\enspace
+#2.#3.#4.#5\space#1\leaders\Dotsbox\hfill #6}
+}
+
+\def\unnumbsubsubsecentry #1#2{%
+\line{\enspace\enspace\enspace\enspace\enspace\enspace#1\leaders\Dotsbox\hfill #2}
+}
+
+\message{environments,}
+
+% @tex ... @end tex escapes into raw Tex temporarily.
+% One exception: @ is still an escape character, so that @end tex works.
+% But \@ or @@ will get a plain tex @ character.
+
+\def\tex{\begingroup
+\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
+\catcode `\%=14
+\catcode`\"=12
+\catcode`\|=12
+\catcode`\<=12
+\catcode`\>=12
+\escapechar=`\\
+%
+\let\{=\ptexlbrace
+\let\}=\ptexrbrace
+\let\.=\ptexdot
+\let\*=\ptexstar
+\def\@={@}%
+\let\bullet=\ptexbullet
+\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
+\let\L=\ptexL
+%
+\let\Etex=\endgroup}
+
+% Define @lisp ... @endlisp.
+% @lisp does a \begingroup so it can rebind things,
+% including the definition of @endlisp (which normally is erroneous).
+
+% Amount to narrow the margins by for @lisp.
+\newskip\lispnarrowing \lispnarrowing=0.4in
+
+% This is the definition that ^M gets inside @lisp
+% phr: changed space to \null, to avoid overfull hbox problems.
+{\obeyspaces%
+\gdef\lisppar{\null\endgraf}}
+
+% Cause \obeyspaces to make each Space cause a word-separation
+% rather than the default which is that it acts punctuation.
+% This is because space in tt font looks funny.
+{\obeyspaces %
+\gdef\sepspaces{\def {\ }}}
+
+\newskip\aboveenvskipamount \aboveenvskipamount= 0pt
+\def\aboveenvbreak{{\advance\aboveenvskipamount by \parskip
+\endgraf \ifdim\lastskip<\aboveenvskipamount
+\removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}}
+
+\def\afterenvbreak{\endgraf \ifdim\lastskip<\aboveenvskipamount
+\removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}
+
+\def\lisp{\aboveenvbreak\begingroup\inENV %This group ends at the end of the @lisp body
+\hfuzz=12truept % Don't be fussy
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% Single space lines
+\singlespace %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+\let\par=\lisppar
+\def\Elisp{\endgroup\afterenvbreak}%
+\parskip=0pt \advance \rightskip by \lispnarrowing
+\advance \leftskip by \lispnarrowing
+\parindent=0pt
+\let\exdent=\internalexdent
+\obeyspaces \obeylines \tt \rawbackslash
+\def\next##1{}\next}
+
+
+\let\example=\lisp
+\def\Eexample{\Elisp}
+
+\let\smallexample=\lisp
+\def\Esmallexample{\Elisp}
+
+% Macro for 9 pt. examples, necessary to print with 5" lines.
+% From Pavel at xerox. This is not really used unless the
+% @smallbook command is given.
+
+\def\smalllispx{\aboveenvbreak\begingroup\inENV
+% This group ends at the end of the @lisp body
+\hfuzz=12truept % Don't be fussy
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% Single space lines
+\singlespace %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+\let\par=\lisppar
+\def\Esmalllisp{\endgroup\afterenvbreak}%
+\parskip=0pt \advance \rightskip by \lispnarrowing
+\advance \leftskip by \lispnarrowing
+\parindent=0pt
+\let\exdent=\internalexdent
+\obeyspaces \obeylines \ninett \rawbackslash
+\def\next##1{}\next}
+
+% This is @display; same as @lisp except use roman font.
+
+\def\display{\begingroup\inENV %This group ends at the end of the @display body
+\aboveenvbreak
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% Single space lines
+\singlespace %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+\let\par=\lisppar
+\def\Edisplay{\endgroup\afterenvbreak}%
+\parskip=0pt \advance \rightskip by \lispnarrowing
+\advance \leftskip by \lispnarrowing
+\parindent=0pt
+\let\exdent=\internalexdent
+\obeyspaces \obeylines
+\def\next##1{}\next}
+
+% This is @format; same as @lisp except use roman font and don't narrow margins
+
+\def\format{\begingroup\inENV %This group ends at the end of the @format body
+\aboveenvbreak
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+\singlespace %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+\let\par=\lisppar
+\def\Eformat{\endgroup\afterenvbreak}
+\parskip=0pt \parindent=0pt
+\obeyspaces \obeylines
+\def\next##1{}\next}
+
+% @flushleft and @flushright
+
+\def\flushleft{\begingroup\inENV %This group ends at the end of the @format body
+\aboveenvbreak
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+% This also causes @ to work when the directive name
+% is terminated by end of line.
+\let\par=\lisppar
+\def\Eflushleft{\endgroup\afterenvbreak}%
+\parskip=0pt \parindent=0pt
+\obeyspaces \obeylines
+\def\next##1{}\next}
+
+\def\flushright{\begingroup\inENV %This group ends at the end of the @format body
+\aboveenvbreak
+% Make spaces be word-separators rather than space tokens.
+\sepspaces %
+% The following causes blank lines not to be ignored
+% by adding a space to the end of each line.
+% This also causes @ to work when the directive name
+% is terminated by end of line.
+\let\par=\lisppar
+\def\Eflushright{\endgroup\afterenvbreak}%
+\parskip=0pt \parindent=0pt
+\advance \leftskip by 0pt plus 1fill
+\obeyspaces \obeylines
+\def\next##1{}\next}
+
+% @quotation - narrow the margins.
+
+\def\quotation{\begingroup\inENV %This group ends at the end of the @quotation body
+{\parskip=0pt % because we will skip by \parskip too, later
+\aboveenvbreak}%
+\singlespace
+\parindent=0pt
+\def\Equotation{\par\endgroup\afterenvbreak}%
+\advance \rightskip by \lispnarrowing
+\advance \leftskip by \lispnarrowing}
+
+\message{defuns,}
+% Define formatter for defuns
+% First, allow user to change definition object font (\df) internally
+\def\setdeffont #1 {\csname DEF#1\endcsname}
+
+\newskip\defbodyindent \defbodyindent=36pt
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deftypemargin \deftypemargin=12pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+
+\newcount\parencount
+% define \functionparens, which makes ( and ) and & do special things.
+% \functionparens affects the group it is contained in.
+\def\activeparens{%
+\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
+\catcode`\[=\active \catcode`\]=\active}
+{\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
+\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
+\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+
+% Definitions of (, ) and & used in args for functions.
+% This is the definition of ( outside of all parentheses.
+\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %
+\global\advance\parencount by 1 }
+%
+% This is the definition of ( when already inside a level of parens.
+\gdef\opnested{\char`\(\global\advance\parencount by 1 }
+%
+\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
+% also in that case restore the outer-level definition of (.
+\ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
+\global\advance \parencount by -1 }
+% If we encounter &foo, then turn on ()-hacking afterwards
+\gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ }
+%
+\gdef\normalparens{\boldbrax\let&=\ampnr}
+} % End of definition inside \activeparens
+%% These parens (in \boldbrax) actually are a little bolder than the
+%% contained text. This is especially needed for [ and ]
+\def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}
+\def\lbrb{{\tt\char`\[}} \def\rbrb{{\tt\char`\]}}
+
+% First, defname, which formats the header line itself.
+% #1 should be the function name.
+% #2 should be the type of definition, such as "Function".
+
+\def\defname #1#2{%
+\leftskip = 0in %
+\noindent %
+\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
+\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
+\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
+\parshape 2 0in \dimen0 \defargsindent \dimen1 %
+% Now output arg 2 ("Function" or some such)
+% ending at \deftypemargin from the right margin,
+% but stuck inside a box of width 0 so it does not interfere with linebreaking
+\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}%
+\tolerance=10000 \hbadness=10000 % Make all lines underfull and no complaints
+{\df #1}\enskip % Generate function name
+}
+
+% Actually process the body of a definition
+% #1 should be the terminating control sequence, such as \Edefun.
+% #2 should be the "another name" control sequence, such as \defunx.
+% #3 should be the control sequence that actually processes the header,
+% such as \defunheader.
+
+\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
+\parindent=0in \leftskip=\defbodyindent %
+\begingroup\obeylines\activeparens\spacesplit#3}
+
+\def\defmethparsebody #1#2#3#4 {\begingroup\inENV %
+\medbreak %
+% Define the end token that this defining construct specifies
+% so that it will exit this group.
+\def#1{\endgraf\endgroup\medbreak}%
+\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
+\parindent=0in \leftskip=\defbodyindent %
+\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
+
+% Split up #2 at the first space token.
+% call #1 with two arguments:
+% the first is all of #2 before the space token,
+% the second is all of #2 after that space token.
+% If #2 contains no space token, all of it is passed as the first arg
+% and the second is passed as empty.
+
+{\obeylines
+\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
+\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
+\ifx\relax #3%
+#1{#2}{}\else #1{#2}{#3#4}\fi}}
+
+% So much for the things common to all kinds of definitions.
+
+% Define @defun.
+
+% First, define the processing that is wanted for arguments of \defun
+% Use this to expand the args and terminate the paragraph they make up
+
+\def\defunargs #1{\functionparens \sl #1%
+\ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%
+\interlinepenalty=10000
+\endgraf\vskip -\parskip \penalty 10000}
+
+% Do complete processing of one @defun or @defunx line already parsed.
+
+% @deffn Command forward-char nchars
+
+\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
+
+\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
+\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup}
+
+% @defun == @deffn Function
+
+\def\defun{\defparsebody\Edefun\defunx\defunheader}
+
+\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Function}%
+\defunargs {#2}\endgroup %
+}
+
+% @defmac == @deffn Macro
+
+\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
+
+\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Macro}%
+\defunargs {#2}\endgroup %
+}
+
+% @defspec == @deffn Special Form
+
+\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
+
+\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
+\begingroup\defname {#1}{Special form}%
+\defunargs {#2}\endgroup %
+}
+
+% This definition is run if you use @defunx
+% anywhere other than immediately after a @defun or @defunx.
+
+\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
+\def\defunx #1 {\errmessage{@defunx in invalid context}}
+\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
+\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
+
+% @defmethod, and so on
+
+% @defop {Funny Method} foo-class frobnicate argument
+
+\def\defop #1 {\def\defoptype{#1}%
+\defmethparsebody\Edefop\defopx\defopheader}
+
+\def\defopheader #1#2#3{\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
+\begingroup\defname {#2}{\defoptype{} on #1}%
+\defunargs {#3}\endgroup %
+}
+
+% @defmethod == @defop Method
+
+\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
+
+\def\defmethodheader #1#2#3{\dosubind {fn}{\code{#2}}{on #1}% entry in function index
+\begingroup\defname {#2}{Operation on #1}%
+\defunargs {#3}\endgroup %
+}
+
+% @defcv {Class Option} foo-class foo-flag
+
+\def\defcv #1 {\def\defcvtype{#1}%
+\defmethparsebody\Edefcv\defcvx\defcvheader}
+
+\def\defcvarheader #1#2#3{%
+\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
+\begingroup\defname {#2}{\defcvtype of #1}%
+\defvarargs {#3}\endgroup %
+}
+
+% @defivar == @defcv {Instance Variable}
+
+\def\defivar{\defmethparsebody\Edefivar\defivarx\defivarheader}
+
+\def\defivarheader #1#2#3{%
+\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
+\begingroup\defname {#2}{Instance variable of #1}%
+\defvarargs {#3}\endgroup %
+}
+
+% These definitions are run if you use @defmethodx, etc.,
+% anywhere other than immediately after a @defmethod, etc.
+
+\def\defopx #1 {\errmessage{@defopx in invalid context}}
+\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
+\def\defcvx #1 {\errmessage{@defcvx in invalid context}}
+\def\defivarx #1 {\errmessage{@defivarx in invalid context}}
+
+% Now @defvar
+
+% First, define the processing that is wanted for arguments of @defvar.
+% This is actually simple: just print them in roman.
+% This must expand the args and terminate the paragraph they make up
+\def\defvarargs #1{\normalparens #1%
+\interlinepenalty=10000
+\endgraf\vskip -\parskip \penalty 10000}
+
+% @defvr Counter foo-count
+
+\def\defvr{\defmethparsebody\Edefvr\defvrx\defvrheader}
+
+\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
+\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
+
+% @defvar == @defvr Variable
+
+\def\defvar{\defparsebody\Edefvar\defvarx\defvarheader}
+
+\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
+\begingroup\defname {#1}{Variable}%
+\defvarargs {#2}\endgroup %
+}
+
+% @defopt == @defvr {User Option}
+
+\def\defopt{\defparsebody\Edefopt\defoptx\defoptheader}
+
+\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
+\begingroup\defname {#1}{User Option}%
+\defvarargs {#2}\endgroup %
+}
+
+% This definition is run if you use @defvarx
+% anywhere other than immediately after a @defvar or @defvarx.
+
+\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
+\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
+\def\defoptx #1 {\errmessage{@defoptx in invalid context}}
+
+% Now define @deftp
+% Args are printed in bold, a slight difference from @defvar.
+
+\def\deftpargs #1{\bf \defvarargs{#1}}
+
+% @deftp Class window height width ...
+
+\def\deftp{\defmethparsebody\Edeftp\deftpx\deftpheader}
+
+\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
+\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
+
+% This definition is run if you use @deftpx, etc
+% anywhere other than immediately after a @deftp, etc.
+
+\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
+
+\message{cross reference,}
+% Define cross-reference macros
+\newwrite \auxfile
+
+% \setref{foo} defines a cross-reference point named foo.
+
+\def\setref#1{%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Ysectionnumberandtype}}
+
+\def\unnumbsetref#1{%
+\dosetq{#1-pg}{Ypagenumber}%
+\dosetq{#1-snt}{Ynothing}}
+
+% \xref and \pxref generate cross references to specified points.
+
+\def\pxref #1{see \xrefX [#1,,,,,,,]}
+\def\xref #1{See \xrefX [#1,,,,,,,]}
+\def\xrefX [#1,#2,#3,#4,#5,#6]{%
+\setbox1=\hbox{\i{\losespace#5{}}}%
+\setbox0=\hbox{\losespace#3{}}%
+\ifdim \wd0 =0pt \setbox0=\hbox{\losespace#1{}}\fi%
+\ifdim \wd1 >0pt%
+section \unhbox0{} in \unhbox1%
+\else%
+\refx{#1-snt} [\unhbox0], page\tie \refx{#1-pg}%
+\fi }
+
+% \dosetq is the interface for calls from other macros
+
+\def\dosetq #1#2{{\let\folio=0%
+\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
+\next}}
+
+% \internalsetq {foo}{page} expands into CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
+% When the aux file is read, ' is the escape character
+
+\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
+
+% Things to be expanded by \internalsetq
+
+\def\Ypagenumber{\folio}
+
+\def\Ynothing{}
+
+\def\Ysectionnumberandtype{%
+\ifnum\secno=0 chapter\xreftie\the\chapno %
+\else \ifnum \subsecno=0 section\xreftie\the\chapno.\the\secno %
+\else \ifnum \subsubsecno=0 %
+section\xreftie\the\chapno.\the\secno.\the\subsecno %
+\else %
+section\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
+\fi \fi \fi }
+
+\gdef\xreftie{'tie}
+
+% Define @refx to reference a specific cross-reference string.
+
+\def\refx#1{%
+{%
+\expandafter\ifx\csname X#1\endcsname\relax
+% If not defined, say something at least.
+\expandafter\gdef\csname X#1\endcsname {$<$undefined$>$}%
+\message {WARNING: Cross-reference "#1" used but not yet defined}%
+\message {}%
+\fi %
+\csname X#1\endcsname %It's defined, so just use it.
+}}
+
+% Read the last existing aux file, if any. No error if none exists.
+
+% This is the macro invoked by entries in the aux file.
+\def\xrdef #1#2{
+{\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}}
+
+{
+\catcode `\^^@=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\^^C=\other
+\catcode `\^^D=\other
+\catcode `\^^E=\other
+\catcode `\^^F=\other
+\catcode `\^^G=\other
+\catcode `\^^H=\other
+\catcode `\=\other
+\catcode `\^^L=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\=\other
+\catcode `\^^[=\other
+\catcode `\^^\=\other
+\catcode `\^^]=\other
+\catcode `\^^^=\other
+\catcode `\^^_=\other
+\catcode `\@=\other
+\catcode `\^=\other
+\catcode `\~=\other
+\catcode `\[=\other
+\catcode `\]=\other
+\catcode`\"=\other
+\catcode`\_=\other
+\catcode`\|=\other
+\catcode`\<=\other
+\catcode`\>=\other
+\catcode `\$=\other
+\catcode `\#=\other
+\catcode `\&=\other
+
+% the aux file uses ' as the escape.
+% Turn off \ as an escape so we do not lose on
+% entries which were dumped with control sequences in their names.
+% For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
+% Reference to such entries still does not work the way one would wish,
+% but at least they do not bomb out when the aux file is read in.
+
+\catcode `\{=1 \catcode `\}=2
+\catcode `\%=\other
+\catcode `\'=0
+\catcode `\\=\other
+
+'openin 1 'jobname.aux
+'ifeof 1 'else 'closein 1 'input 'jobname.aux
+'fi
+}
+
+% Open the new aux file. Tex will close it automatically at exit.
+
+\openout \auxfile=\jobname.aux
+
+% Footnotes.
+
+\newcount \footnoteno
+
+\def\supereject{\par\penalty -20000\footnoteno =0 }
+
+\let\ptexfootnote=\footnote
+
+{\catcode `\@=11
+\gdef\footnote{\global\advance \footnoteno by \@ne
+\edef\thisfootno{$^{\the\footnoteno}$}%
+\let\@sf\empty
+\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
+\thisfootno\@sf\parsearg\footnotezzz}
+
+\gdef\footnotezzz #1{\insert\footins{
+\interlinepenalty\interfootnotelinepenalty
+\splittopskip\ht\strutbox % top baseline for broken footnotes
+\splitmaxdepth\dp\strutbox \floatingpenalty\@MM
+\leftskip\z at skip \rightskip\z at skip \spaceskip\z at skip \xspaceskip\z at skip
+\footstrut\hang\textindent{\thisfootno}#1\strut}}
+
+}%end \catcode `\@=11
+
+% End of control word definitions.
+
+\message{and turning on texinfo input format.}
+
+\newindex{cp}
+\newcodeindex{fn}
+\newcodeindex{vr}
+\newcodeindex{tp}
+\newcodeindex{ky}
+\newcodeindex{pg}
+
+% Set some numeric style parameters, for 8.5 x 11 format.
+
+\hsize = 6.5in
+\parindent 15pt
+\parskip 18pt plus 1pt
+\baselineskip 15pt
+\advance\topskip by 1.2cm
+
+% Prevent underfull vbox error messages.
+\vbadness=10000
+
+% Use @smallbook to reset parameters for 7x9.5 format
+\def\smallbook{
+\global\lispnarrowing = 0.3in
+\global\baselineskip 12pt
+\global\parskip 3pt plus 1pt
+\global\hsize = 5in
+\global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in
+\global\vsize=7.5in
+\global\tolerance=700
+\global\hfuzz=1pt
+
+\global\pagewidth=\hsize
+\global\pageheight=\vsize
+\global\font\ninett=cmtt9
+
+\global\let\smalllisp=\smalllispx
+\global\let\smallexample=\smalllispx
+\global\def\Esmallexample{\Esmalllisp}
+}
+
+%% For a final copy, take out the rectangles
+%% that mark overfull boxes (in case you have decided
+%% that the text looks ok even though it passes the margin).
+\def\finalout{\overfullrule=0pt}
+
+% Turn off all special characters except @
+% (and those which the user can use as if they were ordinary)
+% Define certain chars to be always in tt font.
+
+\catcode`\"=\active
+\def\activedoublequote{{\tt \char '042}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt \char '176}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+\catcode`\_=\active
+\def_{{\tt \char '137}}
+\catcode`\|=\active
+\def|{{\tt \char '174}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+
+\catcode`\@=0
+
+% \rawbackslashxx output one backslash character in current font
+{\catcode`\\=\other
+ at gdef@rawbackslashxx{\}}
+
+% \rawbackslash redefines \ as input to do \rawbackslashxx.
+{\catcode`\\=\active
+ at gdef@rawbackslash{@let\=@rawbackslashxx }}
+
+% \normalbackslash outputs one backslash in fixed width font.
+\def\normalbackslash{{\tt\rawbackslashxx}}
+
+% Say @foo, not \foo, in error messages.
+\escapechar=`\@
+
+%% These look ok in all fonts, so just make them not special. The @rm below
+%% makes sure that the current font starts out as the newly loaded cmr10
+\catcode`\$=\other \catcode`\%=\other \catcode`\&=\other \catcode`\#=\other
+
+\catcode 17=0 @c Define control-q
+\catcode`\\=\active
+ at let\=@normalbackslash
+
+ at textfonts
+ at rm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,45 @@
+Makefile
+makedepend.log
+arbitron
+chk_cyrus
+ctl_cyrusdb
+ctl_deliver
+ctl_mboxlist
+cvt_cyrusdb
+cyrdump
+cyr_expire
+deliver
+fetchnews
+fud
+idled
+imap_err.c
+imap_err.h
+imapd
+ipurge
+lmtpd
+lmtpproxyd
+lmtpstats.c
+lmtpstats.h
+make_md5
+mbexamine
+mbpath
+mupdate
+mupdate_err.c
+mupdate_err.h
+nntpd
+nntp_err.c
+nntp_err.h
+pop3d
+proxyd
+pushstats.c
+pushstats.h
+quota
+reconstruct
+smmapd
+squatter
+sync_client
+sync_reset
+sync_server
+tls_prune
+unexpunge
+xversion.h
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,132 @@
+/.cvsignore/1.9.2.3/Wed Mar 30 03:16:04 2005//Tcyrus-release-2-3-7
+/Makefile.dist/1.7.2.1/Tue Nov 18 16:22:51 2003//Tcyrus-release-2-3-7
+/Makefile.in/1.175.2.20/Wed Mar 15 18:56:29 2006//Tcyrus-release-2-3-7
+/annotate.c/1.16.2.16/Thu Jun 1 13:23:23 2006//Tcyrus-release-2-3-7
+/annotate.h/1.5.2.3/Thu Aug 5 16:23:30 2004//Tcyrus-release-2-3-7
+/append.c/1.102.2.16/Thu May 25 12:57:31 2006//Tcyrus-release-2-3-7
+/append.h/1.24.2.4/Thu Jun 2 16:16:02 2005//Tcyrus-release-2-3-7
+/arbitron.c/1.31.2.5/Mon Jan 16 15:43:07 2006//Tcyrus-release-2-3-7
+/backend.c/1.16.2.18/Tue Jun 27 15:58:42 2006//Tcyrus-release-2-3-7
+/backend.h/1.7.2.7/Tue Jan 17 20:15:20 2006//Tcyrus-release-2-3-7
+/chk_cyrus.c/1.11.2.6/Thu Aug 5 16:23:30 2004//Tcyrus-release-2-3-7
+/cli_fatal.c/1.2.2.1/Sat Jan 31 18:56:54 2004//Tcyrus-release-2-3-7
+/convert_code.c/1.7/Thu Feb 13 20:15:23 2003//Tcyrus-release-2-3-7
+/convert_code.h/1.6/Wed Oct 22 18:50:07 2003//Tcyrus-release-2-3-7
+/ctl_cyrusdb.c/1.18.2.7/Wed Feb 16 21:06:18 2005//Tcyrus-release-2-3-7
+/ctl_deliver.c/1.18.2.2/Tue May 25 01:28:02 2004//Tcyrus-release-2-3-7
+/ctl_mboxlist.c/1.43.2.7/Thu Apr 6 15:42:10 2006//Tcyrus-release-2-3-7
+/cvt_cyrusdb.c/1.12.2.3/Tue May 25 01:28:03 2004//Tcyrus-release-2-3-7
+/cyr_expire.c/1.2.2.11/Thu Dec 15 13:21:16 2005//Tcyrus-release-2-3-7
+/cyrdump.c/1.14.2.5/Fri Mar 31 19:22:12 2006//Tcyrus-release-2-3-7
+/deliver.c/1.169.2.10/Wed May 4 19:26:16 2005//Tcyrus-release-2-3-7
+/delivered_prune.c/1.1.2.1/Fri Apr 8 16:48:30 2005//Tcyrus-release-2-3-7
+/duplicate.c/1.35.2.5/Wed Mar 24 19:53:00 2004//Tcyrus-release-2-3-7
+/duplicate.h/1.14.2.1/Thu Feb 12 05:32:34 2004//Tcyrus-release-2-3-7
+/fetchnews.c/1.2.2.13/Mon Apr 10 16:20:56 2006//Tcyrus-release-2-3-7
+/fud.c/1.48.2.6/Wed Apr 13 15:43:36 2005//Tcyrus-release-2-3-7
+/global.c/1.2.2.15/Tue Dec 13 19:35:50 2005//Tcyrus-release-2-3-7
+/global.h/1.2.2.6/Thu Nov 17 15:46:15 2005//Tcyrus-release-2-3-7
+/idle.c/1.2.2.3/Mon Dec 12 21:23:58 2005//Tcyrus-release-2-3-7
+/idle.h/1.4.4.3/Mon Dec 12 21:23:58 2005//Tcyrus-release-2-3-7
+/idled.c/1.17.2.6/Mon Dec 12 21:23:58 2005//Tcyrus-release-2-3-7
+/idled.h/1.4.4.1/Mon Dec 12 21:23:59 2005//Tcyrus-release-2-3-7
+/imap_err.et/1.50.2.3/Fri May 27 17:40:38 2005//Tcyrus-release-2-3-7
+/imap_proxy.c/1.1.2.17/Fri Feb 10 21:10:45 2006//Tcyrus-release-2-3-7
+/imap_proxy.h/1.1.2.7/Tue May 31 18:09:20 2005//Tcyrus-release-2-3-7
+/imapd.c/1.443.2.84/Mon Jul 3 13:22:41 2006//Tcyrus-release-2-3-7
+/imapd.h/1.55.2.4/Fri Mar 31 19:22:21 2006//Tcyrus-release-2-3-7
+/imapparse.c/1.13.2.2/Fri Mar 17 14:25:45 2006//Tcyrus-release-2-3-7
+/index.c/1.199.2.28/Wed Jul 5 19:51:30 2006//Tcyrus-release-2-3-7
+/index.h/1.9.2.6/Fri Mar 31 19:22:24 2006//Tcyrus-release-2-3-7
+/ipurge.c/1.20.2.7/Mon May 31 18:22:53 2004//Tcyrus-release-2-3-7
+/lmtp_sieve.c/1.1.2.15/Tue May 23 13:09:35 2006//Tcyrus-release-2-3-7
+/lmtp_sieve.h/1.1.2.5/Wed Oct 19 14:50:06 2005//Tcyrus-release-2-3-7
+/lmtpd.c/1.121.2.35/Tue May 23 13:09:36 2006//Tcyrus-release-2-3-7
+/lmtpd.h/1.1.2.1/Wed Oct 19 14:50:07 2005//Tcyrus-release-2-3-7
+/lmtpengine.c/1.93.2.17/Tue Nov 1 20:14:20 2005//Tcyrus-release-2-3-7
+/lmtpengine.h/1.18.2.5/Sat Apr 17 18:47:30 2004//Tcyrus-release-2-3-7
+/lmtpstats.snmp/1.6/Thu Oct 12 19:13:57 2000//Tcyrus-release-2-3-7
+/mailbox.c/1.147.2.36/Fri Jun 2 18:55:06 2006//Tcyrus-release-2-3-7
+/mailbox.h/1.77.2.14/Fri Jun 2 16:41:57 2006//Tcyrus-release-2-3-7
+/make_md5.c/1.1.2.4/Wed Jan 18 19:41:56 2006//Tcyrus-release-2-3-7
+/mbdump.c/1.26.2.10/Mon May 22 20:52:27 2006//Tcyrus-release-2-3-7
+/mbdump.h/1.4.4.1/Thu Apr 8 21:13:05 2004//Tcyrus-release-2-3-7
+/mbexamine.c/1.5.2.10/Fri Jun 2 16:41:57 2006//Tcyrus-release-2-3-7
+/mboxkey.c/1.1.2.1/Thu Nov 17 15:46:28 2005//Tcyrus-release-2-3-7
+/mboxkey.h/1.1.2.1/Thu Nov 17 15:46:28 2005//Tcyrus-release-2-3-7
+/mboxlist.c/1.221.2.22/Mon May 22 20:37:25 2006//Tcyrus-release-2-3-7
+/mboxlist.h/1.38.2.3/Mon Feb 21 19:25:40 2005//Tcyrus-release-2-3-7
+/mboxname.c/1.31.2.4/Mon Feb 14 06:43:17 2005//Tcyrus-release-2-3-7
+/mboxname.h/1.12.2.1/Wed Mar 24 19:53:08 2004//Tcyrus-release-2-3-7
+/mbpath.c/1.14.2.5/Sat Feb 25 18:32:35 2006//Tcyrus-release-2-3-7
+/message.c/1.97.2.11/Fri May 26 16:27:18 2006//Tcyrus-release-2-3-7
+/message.h/1.6.4.6/Thu Mar 9 22:39:36 2006//Tcyrus-release-2-3-7
+/mupdate-client.c/1.38.2.12/Wed Mar 15 18:56:30 2006//Tcyrus-release-2-3-7
+/mupdate-client.h/1.13.4.2/Wed Nov 23 13:41:26 2005//Tcyrus-release-2-3-7
+/mupdate-slave.c/1.24.2.4/Wed Mar 15 18:56:31 2006//Tcyrus-release-2-3-7
+/mupdate.c/1.77.2.19/Wed Mar 15 18:56:31 2006//Tcyrus-release-2-3-7
+/mupdate.h/1.15.2.2/Wed Mar 15 18:56:32 2006//Tcyrus-release-2-3-7
+/mupdate_err.et/1.5/Wed Mar 20 23:03:06 2002//Tcyrus-release-2-3-7
+/mutex.h/1.2/Wed Oct 22 18:02:58 2003//Tcyrus-release-2-3-7
+/mutex_fake.c/1.2/Wed Oct 22 18:02:58 2003//Tcyrus-release-2-3-7
+/mutex_pthread.c/1.2/Wed Oct 22 18:02:58 2003//Tcyrus-release-2-3-7
+/nntp_err.et/1.2/Wed Oct 22 18:02:58 2003//Tcyrus-release-2-3-7
+/nntpd.c/1.2.2.50/Fri May 26 15:50:07 2006//Tcyrus-release-2-3-7
+/notify.c/1.13.2.1/Fri Mar 17 14:14:54 2006//Tcyrus-release-2-3-7
+/notify.h/1.7/Wed Oct 22 18:50:08 2003//Tcyrus-release-2-3-7
+/pop3d.c/1.144.2.43/Fri May 26 15:50:09 2006//Tcyrus-release-2-3-7
+/proc.c/1.25/Wed Oct 22 18:50:08 2003//Tcyrus-release-2-3-7
+/protocol.c/1.2.2.13/Tue Jun 27 15:58:42 2006//Tcyrus-release-2-3-7
+/protocol.h/1.2.2.6/Tue Jun 27 15:58:42 2006//Tcyrus-release-2-3-7
+/proxy.c/1.1.2.8/Fri Feb 10 21:10:58 2006//Tcyrus-release-2-3-7
+/proxy.h/1.1.2.7/Fri Feb 10 21:10:58 2006//Tcyrus-release-2-3-7
+/pushstats.snmp/1.10/Wed Mar 6 20:49:03 2002//Tcyrus-release-2-3-7
+/quota.c/1.48.2.17/Fri May 27 16:49:44 2005//Tcyrus-release-2-3-7
+/quota.h/1.1.2.3/Mon Aug 9 18:51:21 2004//Tcyrus-release-2-3-7
+/quota_db.c/1.1.2.3/Mon Aug 9 18:51:21 2004//Tcyrus-release-2-3-7
+/reconstruct.c/1.81.2.21/Fri Jun 2 16:41:57 2006//Tcyrus-release-2-3-7
+/saslclient.c/1.12.2.2/Tue Jun 27 15:58:42 2006//Tcyrus-release-2-3-7
+/saslclient.h/1.2/Wed Oct 22 18:02:59 2003//Tcyrus-release-2-3-7
+/saslserver.c/1.5.2.4/Mon Feb 21 19:25:45 2005//Tcyrus-release-2-3-7
+/search_engines.c/1.5.4.1/Thu Apr 8 21:13:08 2004//Tcyrus-release-2-3-7
+/search_engines.h/1.2/Thu Feb 13 20:15:30 2003//Tcyrus-release-2-3-7
+/seen.h/1.14/Wed Oct 22 18:50:08 2003//Tcyrus-release-2-3-7
+/seen_bigdb.c/1.9.2.1/Fri Dec 19 18:33:38 2003//Tcyrus-release-2-3-7
+/seen_db.c/1.42.2.5/Thu Jun 24 15:16:29 2004//Tcyrus-release-2-3-7
+/seen_local.c/1.41.2.2/Mon Feb 14 06:43:17 2005//Tcyrus-release-2-3-7
+/setproctitle.c/1.16/Thu Feb 13 20:15:30 2003//Tcyrus-release-2-3-7
+/signals.c/1.11.2.2/Mon Feb 14 16:27:42 2005//Tcyrus-release-2-3-7
+/signals.h/1.1.2.1/Fri Dec 17 18:15:17 2004//Tcyrus-release-2-3-7
+/smmapd.c/1.1.2.14/Fri Jul 1 22:13:45 2005//Tcyrus-release-2-3-7
+/smtpclient.c/1.2/Wed Oct 22 18:02:59 2003//Tcyrus-release-2-3-7
+/smtpclient.h/1.2/Wed Oct 22 18:02:59 2003//Tcyrus-release-2-3-7
+/spool.c/1.2.2.7/Fri May 26 16:27:19 2006//Tcyrus-release-2-3-7
+/spool.h/1.2.2.2/Wed Mar 24 19:53:11 2004//Tcyrus-release-2-3-7
+/squat.c/1.6.4.1/Fri Feb 27 21:17:36 2004//Tcyrus-release-2-3-7
+/squat.h/1.2/Thu Feb 13 20:15:31 2003//Tcyrus-release-2-3-7
+/squat_build.c/1.9.4.1/Wed Dec 15 16:42:50 2004//Tcyrus-release-2-3-7
+/squat_internal.c/1.2/Thu Feb 13 20:15:31 2003//Tcyrus-release-2-3-7
+/squat_internal.h/1.2/Thu Feb 13 20:15:31 2003//Tcyrus-release-2-3-7
+/squatter.c/1.12.2.5/Fri Mar 31 19:22:28 2006//Tcyrus-release-2-3-7
+/sync_client.c/1.1.2.35/Wed Jun 14 18:03:24 2006//Tcyrus-release-2-3-7
+/sync_commit.c/1.1.2.10/Tue Jun 13 17:24:40 2006//Tcyrus-release-2-3-7
+/sync_commit.h/1.1.2.2/Tue May 17 18:29:46 2005//Tcyrus-release-2-3-7
+/sync_log.c/1.1.2.7/Thu May 12 19:56:17 2005//Tcyrus-release-2-3-7
+/sync_log.h/1.1.2.6/Wed Jun 14 14:16:12 2006//Tcyrus-release-2-3-7
+/sync_reset.c/1.1.2.4/Tue Dec 13 15:31:10 2005//Tcyrus-release-2-3-7
+/sync_server.c/1.1.2.23/Mon Jun 12 18:56:42 2006//Tcyrus-release-2-3-7
+/sync_support.c/1.1.2.19/Wed Jun 14 18:03:24 2006//Tcyrus-release-2-3-7
+/sync_support.h/1.1.2.9/Thu Jun 16 00:02:10 2005//Tcyrus-release-2-3-7
+/syncnews.c/1.24.2.2/Tue May 25 01:28:13 2004//Tcyrus-release-2-3-7
+/telemetry.c/1.8/Wed Oct 22 18:50:08 2003//Tcyrus-release-2-3-7
+/telemetry.h/1.3/Tue Jul 22 19:17:20 2003//Tcyrus-release-2-3-7
+/tls.c/1.47.2.3/Fri Oct 28 14:51:18 2005//Tcyrus-release-2-3-7
+/tls.h/1.18/Wed Oct 22 18:50:09 2003//Tcyrus-release-2-3-7
+/tls_prune.c/1.5.2.1/Tue Jan 27 23:13:51 2004//Tcyrus-release-2-3-7
+/unexpunge.c/1.1.2.5/Fri Mar 31 19:22:28 2006//Tcyrus-release-2-3-7
+/user.c/1.17.2.5/Thu Nov 17 15:46:28 2005//Tcyrus-release-2-3-7
+/user.h/1.6/Wed Oct 22 18:50:09 2003//Tcyrus-release-2-3-7
+/version.c/1.14.2.5/Wed Feb 16 21:06:19 2005//Tcyrus-release-2-3-7
+/version.h/1.128.2.17/Mon Jul 10 13:46:20 2006//Tcyrus-release-2-3-7
+/xversion.sh/1.7/Wed Oct 22 18:03:00 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/imap
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.dist
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.dist?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.dist (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.dist Sat Aug 26 02:00:13 2006
@@ -1,0 +1,30 @@
+# $Id: Makefile.dist,v 1.7.2.1 2003/11/18 16:22:51 ken3 Exp $
+# it would be nice to figure out how to make "Makefile" do an
+# 'include' of this file.
+# we'd have to make this use srcdir and only define COMPILE_ET if it wasn't
+# already defined.
+
+SNMPGEN = ../snmp/snmpgen
+
+BUILT_SOURCES = imap_err.h imap_err.c \
+ nntp_err.h nntp_err.c \
+ mupdate_err.h mupdate_err.c \
+ lmtpstats.c lmtpstats.h \
+ pushstats.c pushstats.h
+
+dist: $(BUILT_SOURCES)
+
+imap_err.h imap_err.c: imap_err.et
+ $(COMPILE_ET) imap_err.et
+
+nntp_err.h nntp_err.c: nntp_err.et
+ $(COMPILE_ET) nntp_err.et
+
+mupdate_err.h mupdate_err.c: mupdate_err.et
+ $(COMPILE_ET) mupdate_err.et
+
+pushstats.c pushstats.h: pushstats.snmp
+ $(SNMPGEN) pushstats.snmp
+
+lmtpstats.c lmtpstats.h: lmtpstats.snmp
+ $(SNMPGEN) lmtpstats.snmp
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,356 @@
+# Makefile for cyrus imap server and associated programs
+# $Id: Makefile.in,v 1.175.2.20 2006/03/15 18:56:29 murch Exp $
+#
+# @configure_input@
+#
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+DEFINES=-DSETPROCTITLE
+
+# \Seen state database. Either 'db' (berkeley db) or
+# 'local' (legacy flat file).
+SEEN=seen_db.o
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+AWK = @AWK@
+
+CYRUS_USER=@cyrus_user@
+CYRUS_GROUP=@cyrus_group@
+
+DEFS = @DEFS@ @LOCALDEFS@
+CPPFLAGS = -I.. -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @SIEVE_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@
+SIEVE_OBJS = @SIEVE_OBJS@
+SIEVE_LIBS = @SIEVE_LIBS@
+IMAP_COM_ERR_LIBS = @IMAP_COM_ERR_LIBS@
+LIB_WRAP = @LIB_WRAP@
+LIBS = $(IMAP_LIBS) $(IMAP_COM_ERR_LIBS)
+DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@ @COM_ERR_LDFLAGS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+COMPILE_ET=@COMPILE_ET@
+
+#
+# Some notes on purify --
+# you probably want to run the make as the cyrus user as
+# purify sets the cache directory based on the user. So,
+# if you don't, purify can't find the instrumented libraries
+# and so you don't get any useful information.
+# It may also help to run purify by hand to instrument any of
+# the dynamic libraries that may crop up during run time.
+#
+PURIFY=/usr/local/bin/purify
+PUREOPT= -best-effort -logfile=/tmp/pure/%v.%p.log -always_use_cache_dir -cachedir=/usr/tmp/$(USER)
+QUANTIFY=/usr/local/bin/quantify
+QUANTOPT=-windows=no -filename-prefix=/tmp/quant/%v.%p -write-summary-file= -logfile=/tmp/quant/%v.%p.log
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+service_path = @service_path@
+
+LOBJS= append.o mailbox.o mboxlist.o mupdate-client.o mboxname.o message.o \
+ global.o imap_err.o mupdate_err.o proc.o setproctitle.o \
+ convert_code.o duplicate.o saslclient.o saslserver.o signals.o \
+ annotate.o search_engines.o squat.o squat_internal.o mbdump.o \
+ imapparse.o telemetry.o user.o notify.o protocol.o idle.o quota_db.o \
+ sync_log.o $(SEEN) mboxkey.o backend.o tls.o
+
+IMAPDOBJS=pushstats.o imapd.o proxy.o imap_proxy.o index.o version.o
+
+LMTPOBJS=lmtpstats.o lmtpengine.o spool.o
+
+# Your typical objects for the command line utilities
+CLIOBJS=cli_fatal.o mutex_fake.o
+
+SERVICE=../master/service.o
+SERVICETHREAD=../master/service-thread.o
+
+PROGS = imapd lmtpd pop3d \
+ fud smmapd reconstruct quota mbpath ipurge \
+ cyrdump chk_cyrus cvt_cyrusdb deliver ctl_mboxlist \
+ ctl_deliver ctl_cyrusdb squatter mbexamine cyr_expire arbitron \
+ unexpunge @IMAP_PROGS@
+
+BUILTSOURCES = imap_err.c imap_err.h pushstats.c pushstats.h \
+ lmtpstats.c lmtpstats.h xversion.h mupdate_err.c mupdate_err.h \
+ nntp_err.c nntp_err.h
+
+all: $(BUILTSOURCES) $(PROGS) $(SUIDPROGS)
+
+pure: imapd.pure lmtpd.pure mupdate.pure
+
+
+install:
+ $(srcdir)/../install-sh -d ${DESTDIR}$(service_path)
+ for file in $(PROGS); \
+ do \
+ $(INSTALL) -m 755 $$file $(DESTDIR)$(service_path) || exit 1; \
+ done
+ ln -f $(DESTDIR)$(service_path)/pop3d $(DESTDIR)$(service_path)/pop3proxyd
+ ln -f $(DESTDIR)$(service_path)/imapd $(DESTDIR)$(service_path)/proxyd
+ ln -f $(DESTDIR)$(service_path)/lmtpd $(DESTDIR)$(service_path)/lmtpproxyd
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ $<
+
+### libimap
+
+libimap.a: $(LOBJS)
+ rm -f libimap.a
+ ar cr libimap.a $(LOBJS)
+ $(RANLIB) libimap.a
+
+### Built Source Files
+
+xversion:
+ rm -f version.o
+ AWK=$(AWK) $(srcdir)/xversion.sh
+
+xversion.h: xversion
+
+pushstats.c: pushstats.snmp $(srcdir)/../snmp/snmpgen
+ $(srcdir)/../snmp/snmpgen $(srcdir)/pushstats.snmp
+
+pushstats.h: pushstats.c
+
+lmtpstats.c: lmtpstats.snmp $(srcdir)/../snmp/snmpgen
+ $(srcdir)/../snmp/snmpgen $(srcdir)/lmtpstats.snmp
+
+lmtpstats.h: lmtpstats.c
+
+imap_err.c: imap_err.et
+ $(COMPILE_ET) $(srcdir)/imap_err.et
+
+imap_err.h: imap_err.c
+
+nntp_err.c: nntp_err.et
+ $(COMPILE_ET) $(srcdir)/nntp_err.et
+
+nntp_err.h: nntp_err.c
+
+mupdate_err.c: mupdate_err.et
+ $(COMPILE_ET) $(srcdir)/mupdate_err.et
+
+mupdate_err.h: mupdate_err.c
+
+### Services
+idled: idled.o mutex_fake.o libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o idled \
+ idled.o mutex_fake.o libimap.a $(DEPLIBS) $(LIBS)
+
+lmtpd: lmtpd.o proxy.o $(LMTPOBJS) $(SIEVE_OBJS) mutex_fake.o \
+ libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o lmtpd \
+ $(SERVICE) lmtpd.o proxy.o $(LMTPOBJS) $(SIEVE_OBJS) \
+ mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+lmtpd.pure: lmtpd.o proxy.o $(LMTPOBJS) $(SIEVE_OBJS) \
+ mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
+ $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o lmtpd.pure \
+ $(SERVICE) lmtpd.o proxy.o $(LMTPOBJS) $(SIEVE_OBJS) \
+ mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o imapd \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o \
+ libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o imapd.pure \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \
+ $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(QUANTIFY) $(QUANTOPT) $(CC) $(LDFLAGS) -o imapd.quant \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \
+ $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+mupdate: mupdate.o mupdate-slave.o mupdate-client.o mutex_pthread.o tls.o \
+ libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o mupdate \
+ $(SERVICETHREAD) mupdate.o mupdate-slave.o mupdate-client.o \
+ mutex_pthread.o tls.o libimap.a \
+ $(DEPLIBS) $(LIBS) $(LIB_WRAP) -lpthread
+
+mupdate.pure: mupdate.o mupdate-slave.o mupdate-client.o mutex_pthread.o \
+ libimap.a $(DEPLIBS)
+ $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o mupdate.pure \
+ $(SERVICETHREAD) mupdate.o mupdate-slave.o mupdate-client.o \
+ mutex_pthread.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) -lpthread
+
+pop3d: pop3d.o proxy.o backend.o tls.o mutex_fake.o libimap.a \
+ $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o pop3d pop3d.o proxy.o backend.o tls.o $(SERVICE) \
+ mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+nntpd: nntpd.o proxy.o backend.o index.o smtpclient.o spool.o tls.o \
+ mutex_fake.o nntp_err.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o nntpd nntpd.o proxy.o backend.o index.o spool.o \
+ smtpclient.o tls.o $(SERVICE) mutex_fake.o nntp_err.o \
+ libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+fud: fud.o libimap.a mutex_fake.o $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o fud $(SERVICE) fud.o mutex_fake.o libimap.a \
+ $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+smmapd: smmapd.o libimap.a mutex_fake.o $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o smmapd $(SERVICE) smmapd.o mutex_fake.o libimap.a \
+ $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+sync_server: sync_server.o sync_support.o sync_commit.o \
+ imapparse.o tls.o libimap.a mutex_fake.o $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o \
+ sync_server sync_server.o sync_support.o sync_commit.o \
+ imapparse.o tls.o $(SERVICE) libimap.a mutex_fake.o \
+ $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+
+### Command Line Utilities
+arbitron: arbitron.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o arbitron arbitron.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+cvt_cyrusdb: cvt_cyrusdb.o mutex_fake.o libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o cvt_cyrusdb cvt_cyrusdb.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+chk_cyrus: chk_cyrus.o mutex_fake.o libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o chk_cyrus chk_cyrus.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+deliver: deliver.o $(LMTPOBJS) proxy.o mutex_fake.o libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o deliver deliver.o $(LMTPOBJS) proxy.o \
+ mutex_fake.o libimap.a $(DEPLIBS) $(LIBS)
+
+ctl_deliver: ctl_deliver.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o \
+ $@ ctl_deliver.o $(CLIOBJS) libimap.a $(DEPLIBS) $(LIBS)
+
+ctl_mboxlist: ctl_mboxlist.o mupdate-client.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o $@ ctl_mboxlist.o mupdate-client.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+ctl_cyrusdb: ctl_cyrusdb.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o \
+ $@ ctl_cyrusdb.o $(CLIOBJS) libimap.a $(DEPLIBS) $(LIBS)
+
+cyr_expire: cyr_expire.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o $@ cyr_expire.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+fetchnews: fetchnews.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o \
+ $@ fetchnews.o $(CLIOBJS) libimap.a $(DEPLIBS) $(LIBS)
+
+squatter: squatter.o index.o squat_build.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o squatter squatter.o index.o squat_build.o \
+ $(CLIOBJS) libimap.a $(DEPLIBS) $(LIBS)
+
+mbpath: mbpath.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o mbpath mbpath.o $(CLIOBJS) libimap.a \
+ $(DEPLIBS) $(LIBS)
+
+ipurge: ipurge.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o ipurge ipurge.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+cyrdump: cyrdump.o index.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o cyrdump cyrdump.o index.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+mbexamine: mbexamine.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o \
+ mbexamine mbexamine.o $(CLIOBJS) libimap.a $(DEPLIBS) $(LIBS)
+
+reconstruct: reconstruct.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o \
+ reconstruct reconstruct.o $(CLIOBJS) libimap.a $(DEPLIBS) $(LIBS)
+
+quota: quota.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o quota quota.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+tls_prune: tls_prune.o tls.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o \
+ $@ tls_prune.o tls.o $(CLIOBJS) libimap.a $(DEPLIBS) $(LIBS)
+
+unexpunge: unexpunge.o $(CLIOBJS) libimap.a $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o $@ unexpunge.o $(CLIOBJS) \
+ libimap.a $(DEPLIBS) $(LIBS)
+
+make_md5: make_md5.o libimap.a mutex_fake.o $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o make_md5 make_md5.o libimap.a mutex_fake.o $(DEPLIBS) $(LIBS)
+
+sync_client: sync_client.o sync_support.o \
+ backend.o tls.o imapparse.o libimap.a mutex_fake.o $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o \
+ sync_client sync_client.o sync_support.o \
+ backend.o tls.o imapparse.o libimap.a mutex_fake.o $(DEPLIBS) $(LIBS)
+
+sync_reset: sync_reset.o sync_support.o sync_commit.o \
+ libimap.a mutex_fake.o $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o \
+ sync_reset sync_reset.o sync_support.o sync_commit.o \
+ libimap.a mutex_fake.o $(DEPLIBS) $(LIBS)
+
+### Other Misc Targets
+
+clean:
+ rm -f *.o *.a Makefile.bak makedepend.log \
+ $(BUILTSOURCES) $(PROGS) $(SUIDPROGS)
+
+distclean: clean
+ rm -f Makefile
+
+depend: imap_err.h
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2073 @@
+/* annotate.c -- Annotation manipulation routines
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: annotate.c,v 1.16.2.16 2006/06/01 13:23:23 murch Exp $
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <syslog.h>
+
+#include "acl.h"
+#include "assert.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "glob.h"
+#include "hash.h"
+#include "imapd.h"
+#include "global.h"
+#include "imap_err.h"
+#include "mboxlist.h"
+#include "util.h"
+#include "xmalloc.h"
+
+#include "annotate.h"
+#include "sync_log.h"
+
+#define DB config_annotation_db
+
+extern void printstring(const char *s);
+extern void appendattvalue(struct attvaluelist **l, char *attrib,
+ const char *value);
+extern void freeattvalues(struct attvaluelist *l);
+
+struct db *anndb;
+static int annotate_dbopen = 0;
+int (*proxy_fetch_func)(const char *server, const char *mbox_pat,
+ struct strlist *entry_pat,
+ struct strlist *attribute_pat) = NULL;
+int (*proxy_store_func)(const char *server, const char *mbox_pat,
+ struct entryattlist *entryatts) = NULL;
+
+/* String List Management */
+/*
+ * Append 's' to the strlist 'l'. Possibly include metadata.
+ */
+void appendstrlist_withdata(struct strlist **l, char *s, void *d, size_t size)
+{
+ struct strlist **tail = l;
+
+ while (*tail) tail = &(*tail)->next;
+
+ *tail = (struct strlist *)xmalloc(sizeof(struct strlist));
+ (*tail)->s = xstrdup(s);
+ (*tail)->p = 0;
+ if(d && size) {
+ (*tail)->rock = xmalloc(size);
+ memcpy((*tail)->rock, d, size);
+ } else {
+ (*tail)->rock = NULL;
+ }
+ (*tail)->next = 0;
+}
+
+/*
+ * Append 's' to the strlist 'l'.
+ */
+void appendstrlist(struct strlist **l, char *s)
+{
+ appendstrlist_withdata(l, s, NULL, 0);
+}
+
+/*
+ * Append 's' to the strlist 'l', compiling it as a pattern.
+ * Caller must pass in memory that is freed when the strlist is freed.
+ */
+void appendstrlistpat(struct strlist **l, char *s)
+{
+ struct strlist **tail = l;
+
+ while (*tail) tail = &(*tail)->next;
+
+ *tail = (struct strlist *)xmalloc(sizeof(struct strlist));
+ (*tail)->s = s;
+ (*tail)->rock = NULL;
+ (*tail)->p = charset_compilepat(s);
+ (*tail)->next = 0;
+}
+
+/*
+ * Free the strlist 'l'
+ */
+void freestrlist(struct strlist *l)
+{
+ struct strlist *n;
+
+ while (l) {
+ n = l->next;
+ free(l->s);
+ if (l->p) charset_freepat(l->p);
+ if (l->rock) free(l->rock);
+ free((char *)l);
+ l = n;
+ }
+}
+
+/* Attribute Management (also used by the ID command) */
+
+/*
+ * Append the 'attrib'/'value' pair to the attvaluelist 'l'.
+ */
+void appendattvalue(struct attvaluelist **l, char *attrib, const char *value)
+{
+ struct attvaluelist **tail = l;
+
+ while (*tail) tail = &(*tail)->next;
+
+ *tail = (struct attvaluelist *)xmalloc(sizeof(struct attvaluelist));
+ (*tail)->attrib = xstrdup(attrib);
+ (*tail)->value = xstrdup(value);
+ (*tail)->next = 0;
+}
+
+/*
+ * Free the attvaluelist 'l'
+ */
+void freeattvalues(struct attvaluelist *l)
+{
+ struct attvaluelist *n;
+
+ while (l) {
+ n = l->next;
+ free(l->attrib);
+ free(l->value);
+ l = n;
+ }
+}
+
+/*
+ * Append the 'entry'/'attvalues' pair to the entryattlist 'l'.
+ */
+void appendentryatt(struct entryattlist **l, char *entry,
+ struct attvaluelist *attvalues)
+{
+ struct entryattlist **tail = l;
+
+ while (*tail) tail = &(*tail)->next;
+
+ *tail = (struct entryattlist *)xmalloc(sizeof(struct entryattlist));
+ (*tail)->entry = xstrdup(entry);
+ (*tail)->attvalues = attvalues;
+ (*tail)->next = NULL;
+}
+
+/*
+ * Free the entryattlist 'l'
+ */
+void freeentryatts(struct entryattlist *l)
+{
+ struct entryattlist *n;
+
+ while (l) {
+ n = l->next;
+ free(l->entry);
+ if (l->attvalues) freeattvalues(l->attvalues);
+ l = n;
+ }
+}
+
+/* must be called after cyrus_init */
+void annotatemore_init(int myflags,
+ int (*fetch_func)(const char *, const char *,
+ struct strlist *, struct strlist *),
+ int (*store_func)(const char *, const char *,
+ struct entryattlist *))
+{
+ int r;
+
+ if (myflags & ANNOTATE_SYNC) {
+ r = DB->sync();
+ }
+
+ if (fetch_func) {
+ proxy_fetch_func = fetch_func;
+ }
+ if (store_func) {
+ proxy_store_func = store_func;
+ }
+}
+
+void annotatemore_open(char *fname)
+{
+ int ret;
+ char *tofree = NULL;
+
+ /* create db file name */
+ if (!fname) {
+ fname = xmalloc(strlen(config_dir)+sizeof(FNAME_ANNOTATIONS));
+ tofree = fname;
+ strcpy(fname, config_dir);
+ strcat(fname, FNAME_ANNOTATIONS);
+ }
+
+ ret = DB->open(fname, CYRUSDB_CREATE, &anndb);
+ if (ret != 0) {
+ syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
+ cyrusdb_strerror(ret));
+ fatal("can't read annotations file", EC_TEMPFAIL);
+ }
+
+ if (tofree) free(tofree);
+
+ annotate_dbopen = 1;
+}
+
+void annotatemore_close(void)
+{
+ int r;
+
+ if (annotate_dbopen) {
+ r = DB->close(anndb);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing annotations: %s",
+ cyrusdb_strerror(r));
+ }
+ annotate_dbopen = 0;
+ }
+}
+
+void annotatemore_done(void)
+{
+ /* DB->done() handled by cyrus_done() */
+}
+
+static int make_key(const char *mboxname, const char *entry,
+ const char *userid, char *key, size_t keysize)
+{
+ int keylen = 0;
+
+ strlcpy(key+keylen, mboxname, keysize-keylen);
+ keylen += strlen(mboxname) + 1;
+ strlcpy(key+keylen, entry, keysize-keylen);
+ keylen += strlen(entry);
+ /* if we don't have a userid, we're doing a foreach() */
+ if (userid) {
+ keylen++;
+ strlcpy(key+keylen, userid, keysize-keylen);
+ keylen += strlen(userid) + 1;
+ }
+
+ return keylen;
+}
+
+static int split_attribs(const char *data, int datalen __attribute__((unused)),
+ struct annotation_data *attrib)
+{
+ unsigned long tmp;
+
+ /* xxx use datalen? */
+ /* xxx sanity check the data? */
+ attrib->size = (size_t) ntohl(*(unsigned long *) data);
+ data += sizeof(unsigned long); /* skip to value */
+
+ attrib->value = data;
+ data += strlen(data) + 1; /* skip to contenttype */
+
+ attrib->contenttype = data;
+ data += strlen(data) + 1; /* skip to modifiedsince */
+
+ memcpy(&tmp, data, sizeof(unsigned long));
+ attrib->modifiedsince = (size_t) ntohl(tmp);
+ data += sizeof(unsigned long); /* skip to optional attribs */
+
+ return 0;
+}
+
+struct find_rock {
+ struct glob *mglob;
+ struct glob *eglob;
+ int (*proc)();
+ void *rock;
+};
+
+static int find_p(void *rock, const char *key,
+ int keylen __attribute__((unused)),
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ struct find_rock *frock = (struct find_rock *) rock;
+ const char *mboxname, *entry, *userid;
+
+ mboxname = key;
+ entry = mboxname + strlen(mboxname) + 1;
+ userid = entry + strlen(entry) + 1;
+
+ return ((GLOB_TEST(frock->mglob, mboxname) != -1) &&
+ (GLOB_TEST(frock->eglob, entry) != -1));
+}
+
+static int find_cb(void *rock, const char *key,
+ int keylen __attribute__((unused)),
+ const char *data, int datalen)
+{
+ struct find_rock *frock = (struct find_rock *) rock;
+ const char *mboxname, *entry, *userid;
+ struct annotation_data attrib;
+ int r;
+
+ mboxname = key;
+ entry = mboxname + strlen(mboxname) + 1;
+ userid = entry + strlen(entry) + 1;
+
+ r = split_attribs(data, datalen, &attrib);
+
+ if (!r) r = frock->proc(mboxname, entry, userid, &attrib, frock->rock);
+
+ return r;
+}
+
+int annotatemore_findall(const char *mailbox, const char *entry,
+ int (*proc)(), void *rock, struct txn **tid)
+{
+ char key[MAX_MAILBOX_PATH+1], *p;
+ int keylen, r;
+ struct find_rock frock;
+
+ frock.mglob = glob_init(mailbox, GLOB_HIERARCHY);
+ frock.eglob = glob_init(entry, GLOB_HIERARCHY);
+ GLOB_SET_SEPARATOR(frock.eglob, '/');
+ frock.proc = proc;
+ frock.rock = rock;
+
+ /* Find fixed-string pattern prefix */
+ keylen = make_key(mailbox, entry, NULL, key, sizeof(key));
+
+ for (p = key; keylen; p++, keylen--) {
+ if (*p == '*' || *p == '%') break;
+ }
+ keylen = p - key;
+
+ r = DB->foreach(anndb, key, keylen, &find_p, &find_cb, &frock, tid);
+
+ glob_free(&frock.mglob);
+ glob_free(&frock.eglob);
+
+ return r;
+}
+
+enum {
+ ATTRIB_VALUE_SHARED = (1<<0),
+ ATTRIB_VALUE_PRIV = (1<<1),
+ ATTRIB_SIZE_SHARED = (1<<2),
+ ATTRIB_SIZE_PRIV = (1<<3),
+ ATTRIB_MODIFIEDSINCE_SHARED = (1<<4),
+ ATTRIB_MODIFIEDSINCE_PRIV = (1<<5),
+ ATTRIB_CONTENTTYPE_SHARED = (1<<6),
+ ATTRIB_CONTENTTYPE_PRIV = (1<<7)
+};
+
+typedef enum {
+ ANNOTATION_PROXY_T_INVALID = 0,
+
+ PROXY_ONLY = 1,
+ BACKEND_ONLY = 2,
+ PROXY_AND_BACKEND = 3
+} annotation_proxy_t;
+
+struct mailbox_annotation_rock
+{
+ char *server, *partition, *acl, *path, *mpath;
+};
+
+/* To free values in the mailbox_annotation_rock as needed */
+static void cleanup_mbrock(struct mailbox_annotation_rock *mbrock __attribute__((unused)))
+{
+ /* Don't free server and partition, since they're straight from the
+ * output of mboxlist_detail() */
+ return;
+}
+
+static void get_mb_data(const char *mboxname,
+ struct mailbox_annotation_rock *mbrock)
+{
+ if(!mbrock->server && !mbrock->partition) {
+ int r = mboxlist_detail(mboxname, NULL,
+ &(mbrock->path), &(mbrock->mpath),
+ &(mbrock->server), &(mbrock->acl), NULL);
+ if (r) return;
+
+ mbrock->partition = strchr(mbrock->server, '!');
+ if (mbrock->partition) {
+ *(mbrock->partition)++ = '\0';
+ mbrock->path = mbrock->mpath = NULL;
+ } else {
+ mbrock->partition = mbrock->server;
+ mbrock->server = NULL;
+ }
+ }
+}
+
+/*************************** Annotation Fetching ***************************/
+
+struct fetchdata {
+ struct namespace *namespace;
+ struct protstream *pout;
+ char *userid;
+ int isadmin;
+ struct auth_state *auth_state;
+ struct annotate_f_entry_list *entry_list;
+ unsigned attribs;
+ struct entryattlist **entryatts;
+ struct hash_table entry_table;
+
+ /* For proxies (a null entry_list indicates that we ONLY proxy) */
+ /* if these are NULL, we have had a local exact match, and we
+ DO NOT proxy */
+ struct hash_table server_table;
+ const char *orig_mailbox;
+ struct strlist *orig_entry;
+ struct strlist *orig_attribute;
+};
+
+static void output_attlist(struct protstream *pout, struct attvaluelist *l)
+{
+ int flag = 0;
+
+ assert(l);
+
+ prot_putc('(',pout);
+
+ while(l) {
+ if(flag) prot_putc(' ',pout);
+ else flag = 1;
+
+ printstring(l->attrib);
+ prot_putc(' ',pout);
+ printstring(l->value);
+
+ l = l->next;
+ }
+
+ prot_putc(')',pout);
+}
+
+/* Output a single entry and attributes for a single mailbox.
+ * Shared and private annotations are output together by caching
+ * the attributes until the mailbox and/or entry changes.
+ *
+ * The cache is reset by calling with a NULL mboxname or entry.
+ * The last entry is flushed by calling with a NULL attrib.
+ */
+static void output_entryatt(const char *mboxname, const char *entry,
+ const char *userid, struct annotation_data *attrib,
+ struct fetchdata *fdata)
+{
+ static struct attvaluelist *attvalues = NULL;
+ static char lastname[MAX_MAILBOX_NAME+1];
+ static char lastentry[MAX_MAILBOX_NAME+1];
+ char key[MAX_MAILBOX_PATH+1]; /* XXX MAX_MAILBOX_NAME + entry + userid */
+ char buf[100];
+
+ /* We have to reset before each GETANNOTATION command.
+ * Handle it as a dirty hack.
+ */
+ if (!mboxname || !entry) {
+ attvalues = NULL;
+ lastname[0] = '\0';
+ lastentry[0] = '\0';
+ return;
+ }
+
+ /* Check if this is a new entry.
+ * If so, flush our current entry. Otherwise append the entry.
+ *
+ * We also need a way to flush the last cached entry when we're done.
+ * Handle it as a dirty hack.
+ */
+ if ((!attrib || strcmp(mboxname, lastname) || strcmp(entry, lastentry))
+ && attvalues) {
+ prot_printf(fdata->pout, "* ANNOTATION \"%s\" \"%s\" ",
+ lastname, lastentry);
+ output_attlist(fdata->pout, attvalues);
+ prot_printf(fdata->pout, "\r\n");
+
+ freeattvalues(attvalues);
+ attvalues = NULL;
+ }
+ if (!attrib) return;
+
+ strlcpy(lastname, mboxname, sizeof(lastname));
+ strlcpy(lastentry, entry, sizeof(lastentry));
+
+ /* check if we already returned this entry */
+ strlcpy(key, mboxname, sizeof(key));
+ strlcat(key, entry, sizeof(key));
+ strlcat(key, userid, sizeof(key));
+ if (hash_lookup(key, &(fdata->entry_table))) return;
+ hash_insert(key, (void *)0xDEADBEEF, &(fdata->entry_table));
+
+ if (!userid[0]) { /* shared annotation */
+ if ((fdata->attribs & ATTRIB_VALUE_SHARED) && attrib->value) {
+ appendattvalue(&attvalues, "value.shared", attrib->value);
+ }
+
+ if ((fdata->attribs & ATTRIB_CONTENTTYPE_SHARED)
+ && attrib->value && attrib->contenttype) {
+ appendattvalue(&attvalues, "content-type.shared",
+ attrib->contenttype);
+ }
+
+ /* Base the return of the size attribute on whether or not there is
+ * an attribute, not whether size is nonzero. */
+ if ((fdata->attribs & ATTRIB_SIZE_SHARED) && attrib->value) {
+ snprintf(buf, sizeof(buf), "%u", attrib->size);
+ appendattvalue(&attvalues, "size.shared", buf);
+ }
+
+ /* For this one we need both a value for the entry *and* a nonzero
+ * modifiedsince time */
+ if ((fdata->attribs & ATTRIB_MODIFIEDSINCE_SHARED)
+ && attrib->value && attrib->modifiedsince) {
+ snprintf(buf, sizeof(buf), "%ld", attrib->modifiedsince);
+ appendattvalue(&attvalues, "modifiedsince.shared", buf);
+ }
+ }
+ else { /* private annotation */
+ if ((fdata->attribs & ATTRIB_VALUE_PRIV) && attrib->value) {
+ appendattvalue(&attvalues, "value.priv", attrib->value);
+ }
+
+ if ((fdata->attribs & ATTRIB_CONTENTTYPE_PRIV)
+ && attrib->value && attrib->contenttype) {
+ appendattvalue(&attvalues, "content-type.priv",
+ attrib->contenttype);
+ }
+
+ /* Base the return of the size attribute on whether or not there is
+ * an attribute, not whether size is nonzero. */
+ if ((fdata->attribs & ATTRIB_SIZE_PRIV) && attrib->value) {
+ snprintf(buf, sizeof(buf), "%u", attrib->size);
+ appendattvalue(&attvalues, "size.priv", buf);
+ }
+
+ /* For this one we need both a value for the entry *and* a nonzero
+ * modifiedsince time */
+ if ((fdata->attribs & ATTRIB_MODIFIEDSINCE_PRIV)
+ && attrib->value && attrib->modifiedsince) {
+ snprintf(buf, sizeof(buf), "%ld", attrib->modifiedsince);
+ appendattvalue(&attvalues, "modifiedsince.priv", buf);
+ }
+ }
+}
+
+static void annotation_get_fromfile(const char *int_mboxname __attribute__((unused)),
+ const char *ext_mboxname,
+ const char *entry,
+ struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock __attribute__((unused)),
+ void *rock)
+{
+ const char *filename = (const char *) rock;
+ char path[1024], buf[1024], *p;
+ FILE *f;
+ struct stat statbuf;
+ struct annotation_data attrib;
+
+ snprintf(path, sizeof(path), "%s/msg/%s", config_dir, filename);
+ if ((f = fopen(path, "r")) && fgets(buf, sizeof(buf), f)) {
+ if ((p = strchr(buf, '\r'))!=NULL) *p = 0;
+ if ((p = strchr(buf, '\n'))!=NULL) *p = 0;
+
+ memset(&attrib, 0, sizeof(attrib));
+
+ attrib.value = buf;
+ attrib.size = strlen(buf);
+ attrib.contenttype = "text/plain";
+ if (!fstat(fileno(f), &statbuf))
+ attrib.modifiedsince = statbuf.st_mtime;
+
+ output_entryatt(ext_mboxname, entry, "", &attrib, fdata);
+ }
+ if (f) fclose(f);
+}
+
+static void annotation_get_server(const char *int_mboxname,
+ const char *ext_mboxname,
+ const char *entry,
+ struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock __attribute__((unused)))
+{
+ struct annotation_data attrib;
+
+ if(!int_mboxname || !ext_mboxname || !fdata || !mbrock)
+ fatal("annotation_get_server called with bad parameters", EC_TEMPFAIL);
+
+ get_mb_data(int_mboxname, mbrock);
+
+ /* Make sure its a remote mailbox */
+ if (!mbrock->server) return;
+
+ /* Check ACL */
+ if(!fdata->isadmin &&
+ (!mbrock->acl ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_LOOKUP)))
+ return;
+
+ memset(&attrib, 0, sizeof(attrib));
+
+ attrib.value = mbrock->server;
+ if(mbrock->server) {
+ attrib.size = strlen(mbrock->server);
+ attrib.contenttype = "text/plain";
+ }
+
+ output_entryatt(ext_mboxname, entry, "", &attrib, fdata);
+}
+
+static void annotation_get_partition(const char *int_mboxname,
+ const char *ext_mboxname,
+ const char *entry,
+ struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock __attribute__((unused)))
+{
+ struct annotation_data attrib;
+
+ if(!int_mboxname || !ext_mboxname || !fdata || !mbrock)
+ fatal("annotation_get_partition called with bad parameters",
+ EC_TEMPFAIL);
+
+ get_mb_data(int_mboxname, mbrock);
+
+ /* Make sure its a local mailbox */
+ if (mbrock->server) return;
+
+ /* Check ACL */
+ if(!fdata->isadmin &&
+ (!mbrock->acl ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_LOOKUP)))
+ return;
+
+ memset(&attrib, 0, sizeof(attrib));
+
+ attrib.value = mbrock->partition;
+ if(mbrock->partition) {
+ attrib.size = strlen(mbrock->partition);
+ attrib.contenttype = "text/plain";
+ }
+
+ output_entryatt(ext_mboxname, entry, "", &attrib, fdata);
+}
+
+static void annotation_get_size(const char *int_mboxname,
+ const char *ext_mboxname,
+ const char *entry,
+ struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock __attribute__((unused)))
+{
+ struct mailbox mailbox;
+ struct index_record record;
+ int r = 0, msg;
+#ifdef HAVE_LONG_LONG_INT
+ unsigned long long totsize = 0;
+# define SIZE_FMT "%llu"
+#else
+ unsigned long totsize = 0;
+# define SIZE_FMT "%lu"
+#endif
+ char value[21];
+ struct annotation_data attrib;
+
+ if(!int_mboxname || !ext_mboxname || !fdata || !mbrock)
+ fatal("annotation_get_size called with bad parameters",
+ EC_TEMPFAIL);
+
+ get_mb_data(int_mboxname, mbrock);
+
+ /* Make sure its a local mailbox */
+ if (mbrock->server) return;
+
+ /* Check ACL */
+ if(!fdata->isadmin &&
+ (!mbrock->acl ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_LOOKUP) ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_READ)))
+ return;
+
+ if (mailbox_open_header(int_mboxname, 0, &mailbox) != 0)
+ return;
+
+ if (!r) r = mailbox_open_index(&mailbox);
+
+ if (!r) {
+ for (msg = 1; msg <= mailbox.exists; msg++) {
+ if ((r = mailbox_read_index_record(&mailbox, msg, &record))!=0)
+ break;
+ totsize += record.size;
+ }
+ }
+
+ mailbox_close(&mailbox);
+
+ if (r || snprintf(value, sizeof(value), SIZE_FMT, totsize) == -1)
+ return;
+
+ memset(&attrib, 0, sizeof(attrib));
+
+ attrib.value = value;
+ attrib.size = strlen(value);
+ attrib.contenttype = "text/plain";
+
+ output_entryatt(ext_mboxname, entry, "", &attrib, fdata);
+}
+
+static void annotation_get_lastupdate(const char *int_mboxname,
+ const char *ext_mboxname,
+ const char *entry,
+ struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock __attribute__((unused)))
+{
+ time_t modtime = 0;
+ struct stat header, index;
+ char valuebuf[128];
+ struct annotation_data attrib;
+
+ if(!int_mboxname || !ext_mboxname || !fdata || !mbrock)
+ fatal("annotation_get_lastupdate called with bad parameters",
+ EC_TEMPFAIL);
+
+ get_mb_data(int_mboxname, mbrock);
+
+ /* Make sure its a local mailbox */
+ if (mbrock->server) return;
+
+ /* Check ACL */
+ if(!fdata->isadmin &&
+ (!mbrock->acl ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_LOOKUP) ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_READ)))
+ return;
+
+ if (!mbrock->path) return;
+ if (mailbox_stat(mbrock->path, mbrock->mpath, &header, &index, NULL)) return;
+
+ modtime = (header.st_mtime > index.st_mtime) ?
+ header.st_mtime : index.st_mtime;
+
+ cyrus_ctime(modtime, valuebuf);
+
+ memset(&attrib, 0, sizeof(attrib));
+
+ attrib.value = valuebuf;
+ attrib.size = strlen(valuebuf);
+ attrib.contenttype = "text/plain";
+
+ output_entryatt(ext_mboxname, entry, "", &attrib, fdata);
+}
+
+static void annotation_get_lastpop(const char *int_mboxname,
+ const char *ext_mboxname,
+ const char *entry,
+ struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock __attribute__((unused)))
+{
+ struct mailbox mailbox;
+ int r = 0;
+ char value[40];
+ struct annotation_data attrib;
+
+ if(!int_mboxname || !ext_mboxname || !fdata || !mbrock)
+ fatal("annotation_get_lastpop called with bad parameters",
+ EC_TEMPFAIL);
+
+ get_mb_data(int_mboxname, mbrock);
+
+ /* Make sure its a local mailbox */
+ if (mbrock->server) return;
+
+ /* Check ACL */
+ if(!fdata->isadmin &&
+ (!mbrock->acl ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_LOOKUP) ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_READ)))
+ return;
+
+
+ if (mailbox_open_header(int_mboxname, 0, &mailbox) != 0)
+ return;
+
+ if (!r) {
+ r = mailbox_open_index(&mailbox);
+ }
+
+ if (!r) {
+ if (mailbox.pop3_last_login == 0) {
+ strcpy (value, " ");
+ } else {
+ cyrus_ctime(mailbox.pop3_last_login, value);
+ }
+ }
+
+ mailbox_close(&mailbox);
+
+ if ( r)
+ return;
+
+ memset(&attrib, 0, sizeof(attrib));
+
+ attrib.value = value;
+ attrib.size = strlen(value);
+ attrib.contenttype = "text/plain";
+
+ output_entryatt(ext_mboxname, entry, "", &attrib, fdata);
+}
+
+static void annotation_get_condstore(const char *int_mboxname,
+ const char *ext_mboxname,
+ const char *entry,
+ struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock __attribute__((unused)))
+{
+ struct mailbox mailbox;
+ int r = 0;
+ char value[40];
+ struct annotation_data attrib;
+
+ if(!int_mboxname || !ext_mboxname || !fdata || !mbrock)
+ fatal("annotation_get_condstore called with bad parameters",
+ EC_TEMPFAIL);
+
+ get_mb_data(int_mboxname, mbrock);
+
+ /* Make sure its a local mailbox */
+ if (mbrock->server) return;
+
+ /* Check ACL */
+ if(!fdata->isadmin &&
+ (!mbrock->acl ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_LOOKUP) ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_READ)))
+ return;
+
+
+ if (mailbox_open_header(int_mboxname, 0, &mailbox) != 0)
+ return;
+
+ if (!r) {
+ r = mailbox_open_index(&mailbox);
+ }
+
+ if (!r) {
+ if (mailbox.options & OPT_IMAP_CONDSTORE) {
+ strcpy(value, "true");
+ } else {
+ strcpy(value, "false");
+ }
+ }
+
+ mailbox_close(&mailbox);
+
+ if (r) return;
+
+ memset(&attrib, 0, sizeof(attrib));
+
+ attrib.value = value;
+ attrib.size = strlen(value);
+ attrib.contenttype = "text/plain";
+
+ output_entryatt(ext_mboxname, entry, "", &attrib, fdata);
+}
+
+struct rw_rock {
+ const char *ext_mboxname;
+ struct fetchdata *fdata;
+};
+
+static int rw_cb(const char *mailbox __attribute__((unused)),
+ const char *entry, const char *userid,
+ struct annotation_data *attrib, void *rock)
+{
+ struct rw_rock *rw_rock = (struct rw_rock *) rock;
+
+ if (!userid[0] || !strcmp(userid, rw_rock->fdata->userid)) {
+ output_entryatt(rw_rock->ext_mboxname, entry, userid, attrib,
+ rw_rock->fdata);
+ }
+
+ return 0;
+}
+
+static void annotation_get_fromdb(const char *int_mboxname,
+ const char *ext_mboxname,
+ const char *entry __attribute__((unused)),
+ struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock)
+{
+ struct rw_rock rw_rock;
+ const char *entrypat = (const char *) rock;
+
+ if(!int_mboxname || !ext_mboxname || !entrypat || !fdata ||
+ (int_mboxname[0] && !mbrock)) {
+ fatal("annotation_get_fromdb called with bad parameters", EC_TEMPFAIL);
+ }
+
+ if (!int_mboxname[0]) {
+ /* server annotation */
+
+ /* XXX any kind of access controls for reading? */
+ }
+ else {
+ /* mailbox annotation */
+ get_mb_data(int_mboxname, mbrock);
+
+ /* Make sure its a local mailbox */
+ if (mbrock->server) return;
+
+ /* Check ACL */
+ if(!fdata->isadmin &&
+ (!mbrock->acl ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_LOOKUP) ||
+ !(cyrus_acl_myrights(fdata->auth_state, mbrock->acl) & ACL_READ)))
+ return;
+ }
+
+ rw_rock.ext_mboxname = ext_mboxname;
+ rw_rock.fdata = fdata;
+
+ annotatemore_findall(int_mboxname, entrypat, &rw_cb, &rw_rock, NULL);
+}
+
+struct annotate_f_entry
+{
+ const char *name; /* entry name */
+ annotation_proxy_t proxytype; /* mask of allowed server types */
+ void (*get)(const char *int_mboxname, const char *ext_mboxname,
+ const char *name, struct fetchdata *fdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock); /* function to get the entry */
+ void *rock; /* rock passed to get() function */
+};
+
+struct annotate_f_entry_list
+{
+ const struct annotate_f_entry *entry;
+ const char *entrypat;
+ struct annotate_f_entry_list *next;
+};
+
+const struct annotate_f_entry mailbox_ro_entries[] =
+{
+ { "/vendor/cmu/cyrus-imapd/partition", BACKEND_ONLY,
+ annotation_get_partition, NULL },
+ { "/vendor/cmu/cyrus-imapd/server", PROXY_ONLY,
+ annotation_get_server, NULL },
+ { "/vendor/cmu/cyrus-imapd/size", BACKEND_ONLY,
+ annotation_get_size, NULL },
+ { "/vendor/cmu/cyrus-imapd/lastupdate", BACKEND_ONLY,
+ annotation_get_lastupdate, NULL },
+ { "/vendor/cmu/cyrus-imapd/lastpop", BACKEND_ONLY,
+ annotation_get_lastpop, NULL },
+ { "/vendor/cmu/cyrus-imapd/condstore", BACKEND_ONLY,
+ annotation_get_condstore, NULL },
+ { NULL, ANNOTATION_PROXY_T_INVALID, NULL, NULL }
+};
+
+const struct annotate_f_entry mailbox_rw_entry =
+ { NULL, BACKEND_ONLY, annotation_get_fromdb, NULL };
+
+const struct annotate_f_entry server_legacy_entries[] =
+{
+ { "/motd", PROXY_AND_BACKEND, annotation_get_fromfile, "motd" },
+ { "/vendor/cmu/cyrus-imapd/shutdown", PROXY_AND_BACKEND,
+ annotation_get_fromfile, "shutdown" },
+ { NULL, ANNOTATION_PROXY_T_INVALID, NULL, NULL }
+};
+
+const struct annotate_f_entry server_entry =
+ { NULL, PROXY_AND_BACKEND, annotation_get_fromdb, NULL };
+
+/* Annotation attributes and their flags */
+struct annotate_attrib
+{
+ const char *name;
+ int entry;
+};
+
+const struct annotate_attrib annotation_attributes[] =
+{
+ { "value", ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV },
+ { "value.shared", ATTRIB_VALUE_SHARED },
+ { "value.priv", ATTRIB_VALUE_PRIV },
+ { "size", ATTRIB_SIZE_SHARED | ATTRIB_SIZE_PRIV },
+ { "size.shared", ATTRIB_SIZE_SHARED },
+ { "size.priv", ATTRIB_SIZE_PRIV },
+ { "modifiedsince", ATTRIB_MODIFIEDSINCE_SHARED | ATTRIB_MODIFIEDSINCE_PRIV },
+ { "modifiedsince.shared", ATTRIB_MODIFIEDSINCE_SHARED },
+ { "modifiedsince.priv", ATTRIB_MODIFIEDSINCE_PRIV },
+ { "content-type", ATTRIB_CONTENTTYPE_SHARED | ATTRIB_CONTENTTYPE_PRIV },
+ { "content-type.shared", ATTRIB_CONTENTTYPE_SHARED },
+ { "content-type.priv", ATTRIB_CONTENTTYPE_PRIV },
+ { NULL, 0 }
+};
+
+static int fetch_cb(char *name, int matchlen,
+ int maycreate __attribute__((unused)), void* rock)
+{
+ struct fetchdata *fdata = (struct fetchdata *) rock;
+ struct annotate_f_entry_list *entries_ptr;
+ static char lastname[MAX_MAILBOX_PATH+1];
+ static int sawuser = 0;
+ int c;
+ char int_mboxname[MAX_MAILBOX_PATH+1], ext_mboxname[MAX_MAILBOX_PATH+1];
+ struct mailbox_annotation_rock mbrock;
+
+ /* We have to reset the sawuser flag before each fetch command.
+ * Handle it as a dirty hack.
+ */
+ if (name == NULL) {
+ sawuser = 0;
+ lastname[0] = '\0';
+ return 0;
+ }
+ /* Suppress any output of a partial match */
+ if (name[matchlen] && strncmp(lastname, name, matchlen) == 0) {
+ return 0;
+ }
+
+ /*
+ * We can get a partial match for "user" multiple times with
+ * other matches inbetween. Handle it as a special case
+ */
+ if (matchlen == 4 && strncasecmp(name, "user", 4) == 0) {
+ if (sawuser) return 0;
+ sawuser = 1;
+ }
+
+ strlcpy(lastname, name, sizeof(lastname));
+ lastname[matchlen] = '\0';
+
+ if (!strncasecmp(lastname, "INBOX", 5)) {
+ (*fdata->namespace->mboxname_tointernal)(fdata->namespace, "INBOX",
+ fdata->userid, int_mboxname);
+ strlcat(int_mboxname, lastname+5, sizeof(int_mboxname));
+ }
+ else
+ strlcpy(int_mboxname, lastname, sizeof(int_mboxname));
+
+ c = name[matchlen];
+ if (c) name[matchlen] = '\0';
+ (*fdata->namespace->mboxname_toexternal)(fdata->namespace, name,
+ fdata->userid, ext_mboxname);
+ if (c) name[matchlen] = c;
+
+ memset(&mbrock, 0, sizeof(struct mailbox_annotation_rock));
+
+ if (proxy_fetch_func && fdata->orig_entry) {
+ get_mb_data(int_mboxname, &mbrock);
+ }
+
+ /* Loop through the list of provided entries to get */
+ for (entries_ptr = fdata->entry_list;
+ entries_ptr;
+ entries_ptr = entries_ptr->next) {
+
+ entries_ptr->entry->get(int_mboxname, ext_mboxname,
+ entries_ptr->entry->name, fdata,
+ &mbrock, (entries_ptr->entry->rock ?
+ entries_ptr->entry->rock :
+ (void*) entries_ptr->entrypat));
+ }
+
+ if (proxy_fetch_func && fdata->orig_entry && mbrock.server &&
+ !hash_lookup(mbrock.server, &(fdata->server_table))) {
+ /* xxx ignoring result */
+ proxy_fetch_func(mbrock.server, fdata->orig_mailbox,
+ fdata->orig_entry, fdata->orig_attribute);
+ hash_insert(mbrock.server, (void *)0xDEADBEEF, &(fdata->server_table));
+ }
+
+ cleanup_mbrock(&mbrock);
+
+ return 0;
+}
+
+int annotatemore_fetch(char *mailbox,
+ struct strlist *entries, struct strlist *attribs,
+ struct namespace *namespace, int isadmin, char *userid,
+ struct auth_state *auth_state, struct protstream *pout)
+{
+ struct strlist *e = entries;
+ struct strlist *a = attribs;
+ struct fetchdata fdata;
+ struct glob *g;
+ const struct annotate_f_entry *non_db_entries;
+ const struct annotate_f_entry *db_entry;
+
+ memset(&fdata, 0, sizeof(struct fetchdata));
+ fdata.pout = pout;
+ fdata.namespace = namespace;
+ fdata.userid = userid;
+ fdata.isadmin = isadmin;
+ fdata.auth_state = auth_state;
+
+ /* Reset state in output_entryatt() */
+ output_entryatt(NULL, NULL, NULL, NULL, NULL);
+
+ /* Build list of attributes to fetch */
+ while (a) {
+ int attribcount;
+
+ g = glob_init(a->s, GLOB_HIERARCHY);
+
+ for (attribcount = 0;
+ annotation_attributes[attribcount].name;
+ attribcount++) {
+ if (GLOB_TEST(g, annotation_attributes[attribcount].name) != -1) {
+ fdata.attribs |= annotation_attributes[attribcount].entry;
+ }
+ }
+
+ glob_free(&g);
+
+ a = a->next;
+ }
+
+ if (!fdata.attribs) return 0;
+
+ if (!mailbox[0]) {
+ /* server annotation(s) */
+ non_db_entries = server_legacy_entries;
+ db_entry = &server_entry;
+ }
+ else {
+ /* mailbox annotation(s) */
+ non_db_entries = mailbox_ro_entries;
+ db_entry = &mailbox_rw_entry;
+ }
+
+ /* Build a list of callbacks for fetching the annotations */
+ while (e) {
+ int entrycount;
+ int check_db = 0; /* should we check the db for this entry? */
+
+ g = glob_init(e->s, GLOB_HIERARCHY);
+ GLOB_SET_SEPARATOR(g, '/');
+
+ for (entrycount = 0;
+ non_db_entries[entrycount].name;
+ entrycount++) {
+
+ if (GLOB_TEST(g, non_db_entries[entrycount].name) != -1) {
+ /* Add this entry to our list only if it
+ applies to our particular server type */
+ if ((non_db_entries[entrycount].proxytype != PROXY_ONLY)
+ || proxy_fetch_func) {
+ struct annotate_f_entry_list *nentry =
+ xmalloc(sizeof(struct annotate_f_entry_list));
+
+ nentry->next = fdata.entry_list;
+ nentry->entry = &(non_db_entries[entrycount]);
+ fdata.entry_list = nentry;
+ }
+ }
+
+ if (!strcmp(e->s, non_db_entries[entrycount].name)) {
+ /* exact match */
+ if (non_db_entries[entrycount].proxytype != PROXY_ONLY) {
+ fdata.orig_entry = entries; /* proxy it */
+ }
+ break;
+ }
+ }
+
+ if (!non_db_entries[entrycount].name) {
+ /* no [exact] match */
+ fdata.orig_entry = entries; /* proxy it */
+ check_db = 1;
+ }
+
+ /* Add the db entry to our list if only if it
+ applies to our particular server type */
+ if (check_db &&
+ ((db_entry->proxytype != PROXY_ONLY) || proxy_fetch_func)) {
+ /* Add the db entry to our list */
+ struct annotate_f_entry_list *nentry =
+ xmalloc(sizeof(struct annotate_f_entry_list));
+
+ nentry->next = fdata.entry_list;
+ nentry->entry = db_entry;
+ nentry->entrypat = e->s;
+ fdata.entry_list = nentry;
+ }
+
+ glob_free(&g);
+
+ e = e->next;
+ }
+
+ if (!mailbox[0]) {
+ /* server annotation(s) */
+
+ if (fdata.entry_list) {
+ struct annotate_f_entry_list *entries_ptr;
+
+ /* xxx better way to determine a size for this table? */
+ construct_hash_table(&fdata.entry_table, 100, 1);
+
+ /* Loop through the list of provided entries to get */
+ for (entries_ptr = fdata.entry_list;
+ entries_ptr;
+ entries_ptr = entries_ptr->next) {
+
+ entries_ptr->entry->get("", "", entries_ptr->entry->name,
+ &fdata, NULL,
+ (entries_ptr->entry->rock ?
+ entries_ptr->entry->rock :
+ (void*) entries_ptr->entrypat));
+ }
+
+ free_hash_table(&fdata.entry_table, NULL);
+ }
+ }
+ else {
+ /* mailbox annotation(s) */
+
+ if (fdata.entry_list || proxy_fetch_func) {
+ char mboxpat[MAX_MAILBOX_NAME+1];
+
+ /* Reset state in fetch_cb */
+ fetch_cb(NULL, 0, 0, 0);
+
+ /* xxx better way to determine a size for this table? */
+ construct_hash_table(&fdata.entry_table, 100, 1);
+
+ if(proxy_fetch_func && fdata.orig_entry) {
+ fdata.orig_mailbox = mailbox;
+ fdata.orig_attribute = attribs;
+ /* xxx better way to determine a size for this table? */
+ construct_hash_table(&fdata.server_table, 10, 1);
+ }
+
+ /* copy the pattern so we can change hiersep */
+ strlcpy(mboxpat, mailbox, sizeof(mboxpat));
+ mboxname_hiersep_tointernal(namespace, mboxpat,
+ config_virtdomains ?
+ strcspn(mboxpat, "@") : 0);
+
+ (*namespace->mboxlist_findall)(namespace, mboxpat,
+ isadmin, userid,
+ auth_state, fetch_cb,
+ &fdata);
+ free_hash_table(&fdata.entry_table, NULL);
+
+ if(proxy_fetch_func && fdata.orig_entry) {
+ free_hash_table(&fdata.server_table, NULL);
+ }
+ }
+ }
+
+ /* Flush last cached entry in output_entryatt() */
+ output_entryatt("", "", "", NULL, &fdata);
+
+ /* Free the entry list, if needed */
+ while(fdata.entry_list) {
+ struct annotate_f_entry_list *freeme = fdata.entry_list;
+ fdata.entry_list = fdata.entry_list->next;
+ free(freeme);
+ }
+
+ return 0;
+}
+
+/************************** Annotation Storing *****************************/
+
+int annotatemore_lookup(const char *mboxname, const char *entry,
+ const char *userid, struct annotation_data *attrib)
+{
+ char key[MAX_MAILBOX_PATH+1];
+ int keylen, datalen, r;
+ const char *data;
+
+ memset(attrib, 0, sizeof(struct annotation_data));
+
+ keylen = make_key(mboxname, entry, userid, key, sizeof(key));
+
+ do {
+ r = DB->fetch(anndb, key, keylen, &data, &datalen, NULL);
+ } while (r == CYRUSDB_AGAIN);
+
+ if (!r && data) {
+ r = split_attribs(data, datalen, attrib);
+ }
+ else if (r == CYRUSDB_NOTFOUND) r = 0;
+
+ return r;
+}
+
+static int write_entry(const char *mboxname, const char *entry,
+ const char *userid, struct annotation_data *attrib,
+ struct txn **tid)
+{
+ char key[MAX_MAILBOX_PATH+1];
+ int keylen, r;
+
+ keylen = make_key(mboxname, entry, userid, key, sizeof(key));
+
+ if (!strcmp(attrib->value, "NIL")) {
+ do {
+ r = DB->delete(anndb, key, keylen, tid, 0);
+ } while (r == CYRUSDB_AGAIN);
+ }
+ else {
+ char data[MAX_MAILBOX_PATH+1];
+ int datalen = 0;
+ unsigned long l;
+
+ l = htonl(strlen(attrib->value));
+ memcpy(data+datalen, &l, sizeof(l));
+ datalen += sizeof(l);
+
+ strlcpy(data+datalen, attrib->value, sizeof(data)-datalen);
+ datalen += strlen(attrib->value) + 1;
+
+ if (!attrib->contenttype || !strcmp(attrib->contenttype, "NIL")) {
+ attrib->contenttype = "text/plain";
+ }
+ strlcpy(data+datalen, attrib->contenttype, sizeof(data)-datalen);
+ datalen += strlen(attrib->contenttype) + 1;
+
+ l = htonl(attrib->modifiedsince);
+ memcpy(data+datalen, &l, sizeof(l));
+ datalen += sizeof(l);
+
+ do {
+ r = DB->store(anndb, key, keylen, data, datalen, tid);
+ } while (r == CYRUSDB_AGAIN);
+ }
+
+ return r;
+}
+
+int annotatemore_write_entry(const char *mboxname, const char *entry,
+ const char *userid,
+ const char *value, const char *contenttype,
+ size_t size, time_t modifiedsince,
+ struct txn **tid)
+{
+ struct annotation_data theentry;
+
+ theentry.size = size;
+ theentry.modifiedsince = modifiedsince ? modifiedsince : time(NULL);
+ theentry.contenttype = contenttype ? contenttype : "text/plain";
+ theentry.value = value ? value : "NIL";
+
+ return write_entry(mboxname, entry, userid, &theentry, tid);
+}
+
+struct storedata {
+ struct namespace *namespace;
+ char *userid;
+ int isadmin;
+ struct auth_state *auth_state;
+ struct annotate_st_entry_list *entry_list;
+
+ /* number of mailboxes matching the pattern */
+ unsigned count;
+
+ /* for backends only */
+ struct txn *tid;
+
+ /* for proxies only */
+ struct hash_table server_table;
+};
+
+enum {
+ ATTRIB_TYPE_CONTENTTYPE,
+ ATTRIB_TYPE_STRING,
+ ATTRIB_TYPE_BOOLEAN,
+ ATTRIB_TYPE_UINT,
+ ATTRIB_TYPE_INT
+};
+
+struct annotate_st_entry {
+ const char *name; /* entry name */
+ int type; /* entry type */
+ annotation_proxy_t proxytype; /* mask of allowed server types */
+ int attribs; /* mask of allowed attributes */
+ int acl; /* add'l required ACL for .shared */
+ int (*set)(const char *int_mboxname, struct annotate_st_entry_list *entry,
+ struct storedata *sdata, struct mailbox_annotation_rock *mbrock,
+ void *rock); /* function to set the entry */
+ void *rock; /* rock passed to set() function */
+};
+
+struct annotate_st_entry_list
+{
+ const struct annotate_st_entry *entry;
+ struct annotation_data shared;
+ struct annotation_data priv;
+
+ struct annotate_st_entry_list *next;
+};
+
+static const char *annotate_canon_value(const char *value, int type)
+{
+ char *p = NULL;
+
+ /* check for "NIL" */
+ if (!strcasecmp(value, "NIL")) return "NIL";
+
+ switch (type) {
+ case ATTRIB_TYPE_CONTENTTYPE:
+ /* XXX how do we check this? */
+ break;
+
+ case ATTRIB_TYPE_STRING:
+ /* free form */
+ break;
+
+ case ATTRIB_TYPE_BOOLEAN:
+ /* make sure its "true" or "false" */
+ if (!strcasecmp(value, "true")) return "true";
+ else if (!strcasecmp(value, "false")) return "false";
+ else return NULL;
+ break;
+
+ case ATTRIB_TYPE_UINT:
+ /* make sure its a valid ulong ( >= 0 ) */
+ errno = 0;
+ strtoul(value, &p, 10);
+ if ((p == value) /* no value */
+ || (*p != '\0') /* illegal char */
+ || errno /* overflow */
+ || strchr(value, '-')) { /* negative number */
+ return NULL;
+ }
+ break;
+
+ case ATTRIB_TYPE_INT:
+ /* make sure its a valid long */
+ errno = 0;
+ strtol(value, &p, 10);
+ if ((p == value) /* no value */
+ || (*p != '\0') /* illegal char */
+ || errno) { /* underflow/overflow */
+ return NULL;
+ }
+ break;
+
+ default:
+ /* unknown type */
+ return NULL;
+ break;
+ }
+
+ return value;
+}
+
+static int store_cb(char *name, int matchlen,
+ int maycreate __attribute__((unused)), void *rock)
+{
+ struct storedata *sdata = (struct storedata *) rock;
+ struct annotate_st_entry_list *entries_ptr;
+ static char lastname[MAX_MAILBOX_PATH+1];
+ static int sawuser = 0;
+ char int_mboxname[MAX_MAILBOX_PATH+1];
+ struct mailbox_annotation_rock mbrock;
+ int r = 0;
+
+ /* We have to reset the sawuser flag before each fetch command.
+ * Handle it as a dirty hack.
+ */
+ if (name == NULL) {
+ sawuser = 0;
+ lastname[0] = '\0';
+ return 0;
+ }
+ /* Suppress any output of a partial match */
+ if (name[matchlen] && strncmp(lastname, name, matchlen) == 0) {
+ return 0;
+ }
+
+ /*
+ * We can get a partial match for "user" multiple times with
+ * other matches inbetween. Handle it as a special case
+ */
+ if (matchlen == 4 && strncasecmp(name, "user", 4) == 0) {
+ if (sawuser) return 0;
+ sawuser = 1;
+ }
+
+ strlcpy(lastname, name, sizeof(lastname));
+ lastname[matchlen] = '\0';
+
+ if (!strncasecmp(lastname, "INBOX", 5)) {
+ (*sdata->namespace->mboxname_tointernal)(sdata->namespace, "INBOX",
+ sdata->userid, int_mboxname);
+ strlcat(int_mboxname, lastname+5, sizeof(int_mboxname));
+ }
+ else
+ strlcpy(int_mboxname, lastname, sizeof(int_mboxname));
+
+ memset(&mbrock, 0, sizeof(struct mailbox_annotation_rock));
+ get_mb_data(int_mboxname, &mbrock);
+
+ for (entries_ptr = sdata->entry_list;
+ entries_ptr;
+ entries_ptr = entries_ptr->next) {
+
+ r = entries_ptr->entry->set(int_mboxname, entries_ptr, sdata, &mbrock,
+ entries_ptr->entry->rock);
+ if (r) goto cleanup;
+ }
+
+ sync_log_annotation(int_mboxname);
+
+ sdata->count++;
+
+ if (proxy_store_func && mbrock.server &&
+ !hash_lookup(mbrock.server, &(sdata->server_table))) {
+ hash_insert(mbrock.server, (void *)0xDEADBEEF, &(sdata->server_table));
+ }
+
+ cleanup:
+ cleanup_mbrock(&mbrock);
+
+ return r;
+}
+
+struct proxy_rock {
+ char *mbox_pat;
+ struct entryattlist *entryatts;
+};
+
+static void store_proxy(char *server, void *data __attribute__((unused)),
+ void *rock)
+{
+ struct proxy_rock *prock = (struct proxy_rock *) rock;
+
+ proxy_store_func(server, prock->mbox_pat, prock->entryatts);
+}
+
+static int annotation_set_tofile(const char *int_mboxname __attribute__((unused)),
+ struct annotate_st_entry_list *entry,
+ struct storedata *sdata,
+ struct mailbox_annotation_rock *mbrock __attribute__((unused)),
+ void *rock)
+{
+ const char *filename = (const char *) rock;
+ char path[1024];
+ FILE *f;
+
+ /* Check ACL */
+ if (!sdata->isadmin) return IMAP_PERMISSION_DENIED;
+
+ snprintf(path, sizeof(path), "%s/msg/%s", config_dir, filename);
+
+ /* XXX how do we do this atomically with other annotations? */
+ if (!strcmp(entry->shared.value, "NIL"))
+ return unlink(path);
+ else if ((f = fopen(path, "w"))) {
+ fprintf(f, "%s\n", entry->shared.value);
+ return fclose(f);
+ }
+
+ return IMAP_IOERROR;
+}
+
+static int annotation_set_todb(const char *int_mboxname,
+ struct annotate_st_entry_list *entry,
+ struct storedata *sdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock __attribute__((unused)))
+{
+ int r = 0;
+
+ if (entry->shared.value || entry->shared.contenttype) {
+ /* Check ACL
+ *
+ * Must be an admin to set shared server annotations and
+ * must have the required rights for shared mailbox annotations.
+ */
+ int acl = ACL_READ | ACL_WRITE | entry->entry->acl;
+
+ if (!sdata->isadmin &&
+ (!int_mboxname[0] || !mbrock->acl ||
+ ((cyrus_acl_myrights(sdata->auth_state,
+ mbrock->acl) & acl) != acl))) {
+ return IMAP_PERMISSION_DENIED;
+ }
+
+ /* Make sure its a server or local mailbox annotation */
+ if (!int_mboxname[0] || !mbrock->server) {
+ /* if we don't have a value, retrieve the existing entry */
+ if (!entry->shared.value) {
+ struct annotation_data shared;
+
+ r = annotatemore_lookup(int_mboxname, entry->entry->name,
+ "", &shared);
+ if (r) return r;
+
+ entry->shared.value = shared.value;
+ }
+
+ r = write_entry(int_mboxname, entry->entry->name, "",
+ &(entry->shared), &(sdata->tid));
+ }
+ }
+ if (entry->priv.value || entry->priv.contenttype) {
+ /* Check ACL
+ *
+ * XXX We don't actually need to check anything here,
+ * since we don't have any access control for server annotations
+ * and all we need for private mailbox annotations is ACL_LOOKUP,
+ * and we wouldn't be in this callback without it.
+ */
+
+ /* Make sure its a server or local mailbox annotation */
+ if (!int_mboxname[0] || !mbrock->server) {
+ /* if we don't have a value, retrieve the existing entry */
+ if (!entry->priv.value) {
+ struct annotation_data priv;
+
+ r = annotatemore_lookup(int_mboxname, entry->entry->name,
+ sdata->userid, &priv);
+ if (r) return r;
+
+ entry->priv.value = priv.value;
+ }
+
+ r = write_entry(int_mboxname, entry->entry->name, sdata->userid,
+ &(entry->priv), &(sdata->tid));
+ }
+ }
+
+ return r;
+}
+
+static int annotation_set_condstore(const char *int_mboxname,
+ struct annotate_st_entry_list *entry,
+ struct storedata *sdata,
+ struct mailbox_annotation_rock *mbrock,
+ void *rock __attribute__((unused)))
+{
+ struct mailbox mailbox;
+ int r = 0;
+
+ /* Check ACL */
+ if(!sdata->isadmin &&
+ (!mbrock->acl ||
+ !(cyrus_acl_myrights(sdata->auth_state, mbrock->acl) & ACL_LOOKUP) ||
+ !(cyrus_acl_myrights(sdata->auth_state, mbrock->acl) & ACL_WRITE))) {
+ return;
+ }
+
+ r = mailbox_open_header(int_mboxname, 0, &mailbox);
+ if (!r) r = mailbox_open_index(&mailbox);
+ if (!r) r = mailbox_lock_index(&mailbox);
+
+ if (!r) {
+ if (!strcmp(entry->shared.value, "true")) {
+ mailbox.options |= OPT_IMAP_CONDSTORE;
+ } else {
+ mailbox.options &= ~OPT_IMAP_CONDSTORE;
+ }
+
+ r = mailbox_write_index_header(&mailbox);
+ }
+
+ mailbox_close(&mailbox);
+
+ return r;
+
+}
+
+const struct annotate_st_entry server_entries[] =
+{
+ { "/comment", ATTRIB_TYPE_STRING, PROXY_AND_BACKEND,
+ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV
+ | ATTRIB_CONTENTTYPE_SHARED | ATTRIB_CONTENTTYPE_PRIV,
+ ACL_ADMIN, annotation_set_todb, NULL },
+ { "/motd", ATTRIB_TYPE_STRING, PROXY_AND_BACKEND,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_tofile, "motd" },
+ { "/admin", ATTRIB_TYPE_STRING, PROXY_AND_BACKEND,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_todb, NULL },
+ { "/vendor/cmu/cyrus-imapd/shutdown", ATTRIB_TYPE_STRING, PROXY_AND_BACKEND,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_tofile, "shutdown" },
+ { "/vendor/cmu/cyrus-imapd/squat", ATTRIB_TYPE_BOOLEAN, PROXY_AND_BACKEND,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_todb, NULL },
+ { "/vendor/cmu/cyrus-imapd/expire", ATTRIB_TYPE_UINT, PROXY_AND_BACKEND,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_todb, NULL },
+ { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
+};
+
+const struct annotate_st_entry mailbox_rw_entries[] =
+{
+ { "/comment", ATTRIB_TYPE_STRING, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV
+ | ATTRIB_CONTENTTYPE_SHARED | ATTRIB_CONTENTTYPE_PRIV,
+ 0, annotation_set_todb, NULL },
+ { "/sort", ATTRIB_TYPE_STRING, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV
+ | ATTRIB_CONTENTTYPE_SHARED | ATTRIB_CONTENTTYPE_PRIV,
+ 0, annotation_set_todb, NULL },
+ { "/thread", ATTRIB_TYPE_STRING, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV
+ | ATTRIB_CONTENTTYPE_SHARED | ATTRIB_CONTENTTYPE_PRIV,
+ 0, annotation_set_todb, NULL },
+ { "/check", ATTRIB_TYPE_BOOLEAN, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV
+ | ATTRIB_CONTENTTYPE_SHARED | ATTRIB_CONTENTTYPE_PRIV,
+ 0, annotation_set_todb, NULL },
+ { "/checkperiod", ATTRIB_TYPE_UINT, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV
+ | ATTRIB_CONTENTTYPE_SHARED | ATTRIB_CONTENTTYPE_PRIV,
+ 0, annotation_set_todb, NULL },
+ { "/vendor/cmu/cyrus-imapd/squat", ATTRIB_TYPE_BOOLEAN, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_todb, NULL },
+ { "/vendor/cmu/cyrus-imapd/expire", ATTRIB_TYPE_UINT, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_todb, NULL },
+ { "/vendor/cmu/cyrus-imapd/news2mail", ATTRIB_TYPE_STRING, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_todb, NULL },
+ { "/vendor/cmu/cyrus-imapd/sieve", ATTRIB_TYPE_STRING, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_todb, NULL },
+ { "/vendor/cmu/cyrus-imapd/condstore", ATTRIB_TYPE_BOOLEAN, BACKEND_ONLY,
+ ATTRIB_VALUE_SHARED | ATTRIB_CONTENTTYPE_SHARED,
+ ACL_ADMIN, annotation_set_condstore, NULL },
+ { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
+};
+
+int annotatemore_store(char *mailbox,
+ struct entryattlist *l,
+ struct namespace *namespace,
+ int isadmin,
+ char *userid,
+ struct auth_state *auth_state)
+{
+ int r = 0;
+ struct entryattlist *e = l;
+ struct attvaluelist *av;
+ struct storedata sdata;
+ const struct annotate_st_entry *entries;
+ time_t now = time(0);
+
+ memset(&sdata, 0, sizeof(struct storedata));
+ sdata.namespace = namespace;
+ sdata.userid = userid;
+ sdata.isadmin = isadmin;
+ sdata.auth_state = auth_state;
+
+ if (!mailbox[0]) {
+ /* server annotations */
+ entries = server_entries;
+ }
+ else {
+ /* mailbox annotation(s) */
+ entries = mailbox_rw_entries;
+ }
+
+ /* Build a list of callbacks for storing the annotations */
+ while (e) {
+ int entrycount, attribs;
+ struct annotate_st_entry_list *nentry = NULL;
+
+ /* See if we support this entry */
+ for (entrycount = 0;
+ entries[entrycount].name;
+ entrycount++) {
+ if (!strcmp(e->entry, entries[entrycount].name)) {
+ break;
+ }
+ }
+ if (!entries[entrycount].name) {
+ /* unknown annotation */
+ return IMAP_PERMISSION_DENIED;
+ }
+
+ /* Add this entry to our list only if it
+ applies to our particular server type */
+ if ((entries[entrycount].proxytype != PROXY_ONLY)
+ || proxy_store_func) {
+ nentry = xzmalloc(sizeof(struct annotate_st_entry_list));
+ nentry->next = sdata.entry_list;
+ nentry->entry = &(entries[entrycount]);
+ nentry->shared.modifiedsince = now;
+ nentry->priv.modifiedsince = now;
+ sdata.entry_list = nentry;
+ }
+
+ /* See if we are allowed to set the given attributes. */
+ attribs = entries[entrycount].attribs;
+ av = e->attvalues;
+ while (av) {
+ const char *value;
+ if (!strcmp(av->attrib, "value.shared")) {
+ if (!(attribs & ATTRIB_VALUE_SHARED)) {
+ r = IMAP_PERMISSION_DENIED;
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+ entries[entrycount].type);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+ }
+ if (nentry) nentry->shared.value = value;
+ }
+ else if (!strcmp(av->attrib, "content-type.shared")) {
+ if (!(attribs & ATTRIB_CONTENTTYPE_SHARED)) {
+ r = IMAP_PERMISSION_DENIED;
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+ ATTRIB_TYPE_CONTENTTYPE);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+ }
+ if (nentry) nentry->shared.contenttype = value;
+ }
+ else if (!strcmp(av->attrib, "value.priv")) {
+ if (!(attribs & ATTRIB_VALUE_PRIV)) {
+ r = IMAP_PERMISSION_DENIED;
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+ entries[entrycount].type);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+ }
+ if (nentry) nentry->priv.value = value;
+ }
+ else if (!strcmp(av->attrib, "content-type.priv")) {
+ if (!(attribs & ATTRIB_CONTENTTYPE_PRIV)) {
+ r = IMAP_PERMISSION_DENIED;
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+ ATTRIB_TYPE_CONTENTTYPE);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+ }
+ if (nentry) nentry->priv.contenttype = value;
+ }
+ else {
+ r = IMAP_PERMISSION_DENIED;
+ goto cleanup;
+ }
+
+ av = av->next;
+ }
+
+ e = e->next;
+ }
+
+ if (!mailbox[0]) {
+ /* server annotations */
+
+ if (sdata.entry_list) {
+ struct annotate_st_entry_list *entries_ptr;
+
+ /* Loop through the list of provided entries to get */
+ for (entries_ptr = sdata.entry_list;
+ entries_ptr;
+ entries_ptr = entries_ptr->next) {
+
+ r = entries_ptr->entry->set("", entries_ptr, &sdata, NULL,
+ entries_ptr->entry->rock);
+ if (r) break;
+ }
+
+ if (!r) sync_log_annotation("");
+ }
+ }
+
+ else {
+ /* mailbox annotations */
+
+ char mboxpat[MAX_MAILBOX_NAME+1];
+
+ /* Reset state in store_cb */
+ store_cb(NULL, 0, 0, 0);
+
+ if (proxy_store_func) {
+ /* xxx better way to determine a size for this table? */
+ construct_hash_table(&sdata.server_table, 10, 1);
+ }
+
+ /* copy the pattern so we can change hiersep */
+ strlcpy(mboxpat, mailbox, sizeof(mboxpat));
+ mboxname_hiersep_tointernal(namespace, mboxpat,
+ config_virtdomains ?
+ strcspn(mboxpat, "@") : 0);
+
+ r = (*namespace->mboxlist_findall)(namespace, mboxpat,
+ isadmin, userid,
+ auth_state, store_cb,
+ &sdata);
+
+ if (!r && !sdata.count) r = IMAP_MAILBOX_NONEXISTENT;
+
+ if (proxy_store_func) {
+ if (!r) {
+ /* proxy command to backends */
+ struct proxy_rock prock = { NULL, NULL };
+ prock.mbox_pat = mailbox;
+ prock.entryatts = l;
+ hash_enumerate(&sdata.server_table, store_proxy, &prock);
+ }
+ free_hash_table(&sdata.server_table, NULL);
+ }
+ }
+
+ if (sdata.tid) {
+ if (!r) {
+ /* commit txn */
+ DB->commit(anndb, sdata.tid);
+ }
+ else {
+ /* abort txn */
+ DB->abort(anndb, sdata.tid);
+ }
+ }
+
+ cleanup:
+ /* Free the entry list */
+ while (sdata.entry_list) {
+ struct annotate_st_entry_list *freeme = sdata.entry_list;
+ sdata.entry_list = sdata.entry_list->next;
+ free(freeme);
+ }
+
+ return r;
+}
+
+struct rename_rock {
+ const char *newmboxname;
+ const char *olduserid;
+ const char *newuserid;
+ struct txn *tid;
+};
+
+static int rename_cb(const char *mailbox, const char *entry,
+ const char *userid, struct annotation_data *attrib,
+ void *rock)
+{
+ struct rename_rock *rrock = (struct rename_rock *) rock;
+ int r = 0;
+
+ if (rrock->newmboxname) {
+ /* create newly renamed entry */
+
+ if (rrock->olduserid && rrock->newuserid &&
+ !strcmp(rrock->olduserid, userid)) {
+ /* renaming a user, so change the userid for priv annots */
+ r = write_entry(rrock->newmboxname, entry, rrock->newuserid,
+ attrib, &rrock->tid);
+ }
+ else {
+ r = write_entry(rrock->newmboxname, entry, userid,
+ attrib, &rrock->tid);
+ }
+ }
+
+ if (!r) {
+ /* delete existing entry */
+ attrib->value = "NIL";
+ r = write_entry(mailbox, entry, userid, attrib, &rrock->tid);
+ }
+
+ return r;
+}
+
+int annotatemore_rename(const char *oldmboxname, const char *newmboxname,
+ const char *olduserid, const char *newuserid)
+{
+ struct rename_rock rrock;
+ int r;
+
+ rrock.newmboxname = newmboxname;
+ rrock.olduserid = olduserid;
+ rrock.newuserid = newuserid;
+ rrock.tid = NULL;
+
+ r = annotatemore_findall(oldmboxname, "*", &rename_cb, &rrock, &rrock.tid);
+
+ if (rrock.tid) {
+ if (!r) {
+ /* commit txn */
+ DB->commit(anndb, rrock.tid);
+ }
+ else {
+ /* abort txn */
+ DB->abort(anndb, rrock.tid);
+ }
+ }
+
+ return r;
+}
+
+int annotatemore_delete(const char *mboxname)
+{
+ /* we treat a deleteion as a rename without a new name */
+
+ return annotatemore_rename(mboxname, NULL, NULL, NULL);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/annotate.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,155 @@
+ /*
+ * annotate.h -- Annotation manipulation routines
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: annotate.h,v 1.5.2.3 2004/08/05 16:23:30 ken3 Exp $
+ */
+
+#ifndef ANNOTATE_H
+#define ANNOTATE_H
+
+#include "charset.h" /* for comp_pat */
+#include "imapd.h"
+#include "mboxname.h"
+#include "prot.h"
+#include "cyrusdb.h"
+
+/* List of strings, for fetch and search argument blocks */
+struct strlist {
+ char *s; /* String */
+ comp_pat *p; /* Compiled pattern, for search */
+ void *rock; /* Associated metadata */
+ struct strlist *next;
+};
+
+/* List of attrib-value pairs */
+struct attvaluelist {
+ char *attrib;
+ char *value;
+ struct attvaluelist *next;
+};
+
+/* entry-attribute(s) struct */
+struct entryattlist {
+ char *entry;
+ struct attvaluelist *attvalues;
+ struct entryattlist *next;
+};
+
+/* String List Management */
+void appendstrlist(struct strlist **l, char *s);
+void appendstrlistpat(struct strlist **l, char *s);
+void appendstrlist_withdata(struct strlist **l, char *s, void *d, size_t size);
+void freestrlist(struct strlist *l);
+
+/* Attribute Management (also used by ID) */
+void appendattvalue(struct attvaluelist **l, char *attrib, const char *value);
+void freeattvalues(struct attvaluelist *l);
+
+/* Entry Management */
+void appendentryatt(struct entryattlist **l, char *entry,
+ struct attvaluelist *attvalues);
+void freeentryatts(struct entryattlist *l);
+
+/* name of the annotation database */
+#define FNAME_ANNOTATIONS "/annotations.db"
+
+/* initialize database structures */
+#define ANNOTATE_SYNC (1 << 1)
+void annotatemore_init(int myflags,
+ int (*fetch_func)(const char *, const char *,
+ struct strlist *, struct strlist *),
+ int (*store_func)(const char *, const char *,
+ struct entryattlist *));
+
+/* open the annotation db */
+void annotatemore_open(char *name);
+
+/* 'proc'ess all annotations matching 'mailbox' and 'entry' */
+int annotatemore_findall(const char *mailbox, const char *entry,
+ int (*proc)(), void *rock, struct txn **tid);
+
+/* fetch annotations and output results */
+int annotatemore_fetch(char *mailbox,
+ struct strlist *entries, struct strlist *attribs,
+ struct namespace *namespace, int isadmin, char *userid,
+ struct auth_state *auth_state, struct protstream *pout);
+
+struct annotation_data {
+ const char *value;
+ size_t size;
+ time_t modifiedsince;
+ const char *contenttype;
+};
+
+/* lookup a single annotation and return result */
+int annotatemore_lookup(const char *mboxname, const char *entry,
+ const char *userid, struct annotation_data *attrib);
+
+/* store annotations */
+int annotatemore_store(char *mailbox,
+ struct entryattlist *l, struct namespace *namespace,
+ int isadmin, char *userid,
+ struct auth_state *auth_state);
+
+/* low-level interface for use by mbdump routines */
+int annotatemore_write_entry(const char *mboxname, const char *entry,
+ const char *userid,
+ const char *value, const char *contenttype,
+ size_t size, time_t modifiedsince,
+ struct txn **tid);
+
+/* rename the annotations for 'oldmboxname' to 'newmboxname'
+ * if 'olduserid' is non-NULL then the private annotations
+ * for 'olduserid' are renamed to 'newuserid'
+ */
+int annotatemore_rename(const char *oldmboxname, const char *newmboxname,
+ const char *olduserid, const char *newuserid);
+
+/* delete the annotations for 'mboxname' */
+int annotatemore_delete(const char *mboxname);
+
+/* close the database */
+void annotatemore_close(void);
+
+/* done with database stuff */
+void annotatemore_done(void);
+
+#endif /* ANNOTATE_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1120 @@
+/* append.c -- Routines for appending messages to a mailbox
+ * $Id: append.c,v 1.102.2.16 2006/05/25 12:57:31 murch Exp $
+ *
+ * Copyright (c)1998, 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <sys/types.h>
+#include <syslog.h>
+#include <sys/stat.h>
+
+#include "acl.h"
+#include "assert.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "message.h"
+#include "append.h"
+#include "global.h"
+#include "prot.h"
+#include "xmalloc.h"
+#include "mboxlist.h"
+#include "seen.h"
+#include "retry.h"
+#include "quota.h"
+
+#include "message_uuid.h"
+
+struct stagemsg {
+ char fname[1024];
+
+ /* the parts buffer consists of
+ /part1/stage./file \0
+ /part2/stage./file \0
+ ... \0
+ \0
+
+ the main invariant is double \0 at the end
+ */
+ char *parts; /* buffer of current stage parts */
+ char *partend; /* end of buffer */
+ struct message_uuid uuid;
+};
+
+static int append_addseen(struct mailbox *mailbox, const char *userid,
+ const char *msgrange);
+static void addme(char **msgrange, int *alloced, long uid);
+
+#define zero_index(i) { memset(&i, 0, sizeof(struct index_record)); }
+
+/*
+ * Check to see if mailbox can be appended to
+ *
+ * Arguments:
+ * name - name of mailbox directory
+ * format - mailbox must be of this format
+ * aclcheck - user must have these rights on mailbox ACL
+ * quotacheck - mailbox must have this much quota left
+ * (-1 means don't care about quota)
+ *
+ */
+int append_check(const char *name, int format,
+ struct auth_state *auth_state,
+ long aclcheck, long quotacheck)
+{
+ struct mailbox m;
+ int r;
+ int mbflags;
+
+ /* Is mailbox moved? */
+ r = mboxlist_detail(name, &mbflags, NULL, NULL, NULL, NULL, NULL);
+
+ if (!r) {
+ if(mbflags & MBTYPE_MOVING) return IMAP_MAILBOX_MOVED;
+ } else {
+ return r;
+ }
+
+ r = mailbox_open_header(name, auth_state, &m);
+ if (r) return r;
+
+ if ((m.myrights & aclcheck) != aclcheck) {
+ r = (m.myrights & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ mailbox_close(&m);
+ return r;
+ }
+
+ r = mailbox_open_index(&m);
+ if (r) {
+ mailbox_close(&m);
+ return r;
+ }
+
+ if (m.format != format) {
+ mailbox_close(&m);
+ return IMAP_MAILBOX_NOTSUPPORTED;
+ }
+
+ r = quota_read(&m.quota, NULL, 0);
+ if (!r) {
+ if (m.quota.limit >= 0 && quotacheck >= 0 &&
+ m.quota.used + quotacheck >
+ ((uquota_t) m.quota.limit * QUOTA_UNITS)) {
+ r = IMAP_QUOTA_EXCEEDED;
+ }
+ }
+ else if (r == IMAP_QUOTAROOT_NONEXISTENT) r = 0;
+
+ mailbox_close(&m);
+ return r;
+}
+
+/*
+ * Open a mailbox for appending
+ *
+ * Arguments:
+ * name - name of mailbox directory
+ * format - mailbox must be of this format
+ * aclcheck - user must have these rights on mailbox ACL
+ * quotacheck - mailbox must have this much quota left
+ * (-1 means don't care about quota)
+ *
+ * On success, the struct pointed to by 'as' is set up.
+ *
+ */
+int append_setup(struct appendstate *as, const char *name,
+ int format,
+ const char *userid, struct auth_state *auth_state,
+ long aclcheck, long quotacheck)
+{
+ int r;
+
+ r = mailbox_open_header(name, auth_state, &as->m);
+ if (r) return r;
+
+ if ((as->m.myrights & aclcheck) != aclcheck) {
+ r = (as->m.myrights & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ mailbox_close(&as->m);
+ return r;
+ }
+
+ r = mailbox_lock_header(&as->m);
+ if (r) {
+ mailbox_close(&as->m);
+ return r;
+ }
+
+ r = mailbox_open_index(&as->m);
+ if (r) {
+ mailbox_close(&as->m);
+ return r;
+ }
+
+ if (as->m.format != format) {
+ mailbox_close(&as->m);
+ return IMAP_MAILBOX_NOTSUPPORTED;
+ }
+
+ r = mailbox_lock_index(&as->m);
+ if (r) {
+ mailbox_close(&as->m);
+ return r;
+ }
+
+ as->tid = NULL;
+ r = quota_read(&as->m.quota, &as->tid, 1);
+ if (!r) {
+ if (as->m.quota.limit >= 0 && quotacheck >= 0 &&
+ as->m.quota.used + quotacheck >
+ ((uquota_t) as->m.quota.limit * QUOTA_UNITS)) {
+ quota_abort(&as->tid);
+ mailbox_close(&as->m);
+ r = IMAP_QUOTA_EXCEEDED;
+ }
+ }
+ else if (r == IMAP_QUOTAROOT_NONEXISTENT) r = 0;
+
+ if (r) {
+ mailbox_close(&as->m);
+ return r;
+ }
+
+ if (userid) {
+ strlcpy(as->userid, userid, sizeof(as->userid));
+ } else {
+ as->userid[0] = '\0';
+ }
+
+ /* zero out metadata */
+ as->orig_cache_len = as->m.cache_len;
+ as->nummsg = as->numanswered =
+ as->numdeleted = as->numflagged = 0;
+ as->quota_used = 0;
+ as->writeheader = 0;
+ as->seen_msgrange = NULL;
+ as->seen_alloced = 0;
+
+ as->s = APPEND_READY;
+
+ return 0;
+}
+
+/* may return non-zero, indicating that the entire append has failed
+ and the mailbox is probably in an inconsistent state. */
+int append_commit(struct appendstate *as,
+ long quotacheck __attribute__((unused)),
+ unsigned long *uidvalidity,
+ unsigned long *start,
+ unsigned long *num)
+{
+ int r = 0;
+
+ if (as->s == APPEND_DONE) return 0;
+
+ if (start) *start = as->m.last_uid + 1;
+ if (num) *num = as->nummsg;
+ if (uidvalidity) *uidvalidity = as->m.uidvalidity;
+
+ /* write out the header if we created new user flags */
+ if (as->writeheader && (r = mailbox_write_header(&as->m))) {
+ syslog(LOG_ERR, "IOERROR: writing header for %s: %s",
+ as->m.name, error_message(r));
+ append_abort(as);
+ return r;
+ }
+
+ /* Here we flush the cache file first, since we do not update
+ * the generation number on append, and it is safe to have an
+ * extra cache record (with no associated index record) */
+
+ /* Flush out the cache file data */
+ if (fsync(as->m.cache_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing cache file for %s: %m",
+ as->m.name);
+ append_abort(as);
+ return IMAP_IOERROR;
+ }
+
+ /* flush the new index records */
+ if (fsync(as->m.index_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing index records for %s: %m",
+ as->m.name);
+ append_abort(as);
+ return IMAP_IOERROR;
+ }
+
+ /* Calculate new index header information */
+ as->m.exists += as->nummsg;
+ as->m.last_uid += as->nummsg;
+ if (as->m.options & OPT_IMAP_CONDSTORE) as->m.highestmodseq++;
+
+ as->m.answered += as->numanswered;
+ as->m.deleted += as->numdeleted;
+ as->m.flagged += as->numflagged;
+
+ as->m.last_appenddate = time(0);
+ as->m.quota_mailbox_used += as->quota_used;
+ if (as->m.minor_version > MAILBOX_MINOR_VERSION) {
+ as->m.minor_version = MAILBOX_MINOR_VERSION;
+ }
+
+ /* Write out index header & synchronize to disk. */
+ r = mailbox_write_index_header(&as->m);
+ if (r) {
+ syslog(LOG_ERR, "IOERROR: writing index header for %s: %s",
+ as->m.name, error_message(r));
+ append_abort(as);
+ return r;
+ }
+
+ /* Write out updated quota usage */
+ as->m.quota.used += as->quota_used;
+ r = quota_write(&as->m.quota, &as->tid);
+ if (!r) quota_commit(&as->tid);
+ else {
+ quota_abort(&as->tid);
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record use of %u bytes in quota file %s",
+ as->quota_used, as->m.quota.root);
+ }
+
+ /* set seen state */
+ if (as->seen_msgrange && as->userid[0]) {
+ append_addseen(&as->m, as->userid, as->seen_msgrange);
+ }
+ if (as->seen_msgrange) {
+ free(as->seen_msgrange);
+ }
+
+ mailbox_unlock_index(&as->m);
+ mailbox_unlock_header(&as->m);
+ mailbox_close(&as->m);
+
+ as->s = APPEND_DONE;
+
+ return 0;
+}
+
+/* may return non-zero, indicating an internal error of some sort. */
+int append_abort(struct appendstate *as)
+{
+ int r = 0;
+ unsigned long uid;
+
+ if (as->s == APPEND_DONE) return 0;
+ as->s = APPEND_DONE;
+
+ /* unlink message files that were created */
+ for (uid = as->m.last_uid + 1; uid <= as->m.last_uid + as->nummsg; uid++) {
+ char fname[MAX_MAILBOX_PATH+1];
+
+ /* Create message file */
+ strlcpy(fname, as->m.path, sizeof(fname));
+ strlcat(fname, "/", sizeof(fname));
+ mailbox_message_get_fname(&as->m, uid, fname + strlen(fname),
+ sizeof(fname) - strlen(fname));
+ if (unlink(fname) < 0) {
+ /* hmmm, never got appended? */
+ /* r = IMAP_IOERROR; */
+ }
+ }
+
+ /* truncate the cache */
+ ftruncate(as->m.cache_fd, as->orig_cache_len);
+
+ /* unlock mailbox */
+ mailbox_unlock_index(&as->m);
+ mailbox_unlock_header(&as->m);
+ mailbox_close(&as->m);
+
+ /* unlock quota */
+ quota_abort(&as->tid);
+
+ if (as->seen_msgrange) {
+ free(as->seen_msgrange);
+ }
+
+ return r;
+}
+
+/*
+ * Return the number of stage msgs
+ */
+
+int append_stageparts(struct stagemsg *stagep)
+{
+ if (!stagep) return 0;
+
+ /* xxx count number of active parts */
+ return -1;
+}
+
+/*
+ * staging, to allow for single-instance store. initializes the stage
+ * with the file for the given mailboxname and returns the open file
+ * so it can double as the spool file
+ */
+FILE *append_newstage(const char *mailboxname, time_t internaldate,
+ int msgnum, struct stagemsg **stagep)
+{
+ struct stagemsg *stage;
+ char stagedir[MAX_MAILBOX_PATH+1], stagefile[MAX_MAILBOX_PATH+1];
+ FILE *f;
+ int r;
+
+ assert(mailboxname != NULL);
+ assert(stagep != NULL);
+
+ stage = xmalloc(sizeof(struct stagemsg));
+ stage->parts = xzmalloc(5 * (MAX_MAILBOX_PATH+1) * sizeof(char));
+ stage->partend = stage->parts + 5 * (MAX_MAILBOX_PATH+1) * sizeof(char);
+
+ /* Assign new, shared MessageID */
+ message_uuid_assign(&stage->uuid);
+
+ snprintf(stage->fname, sizeof(stage->fname), "%d-%d-%d",
+ (int) getpid(), (int) internaldate, msgnum);
+
+ r = mboxlist_findstage(mailboxname, stagedir, sizeof(stagedir));
+ if (r) {
+ syslog(LOG_ERR, "couldn't find stage directory for mbox: '%s': %s",
+ mailboxname, error_message(r));
+ return NULL;
+ }
+ strlcpy(stagefile, stagedir, sizeof(stagefile));
+ strlcat(stagefile, stage->fname, sizeof(stagefile));
+
+ /* create this file and put it into stage->parts[0] */
+ f = fopen(stagefile, "w+");
+ if (!f) {
+ if (mkdir(stagedir, 0755) != 0) {
+ syslog(LOG_ERR, "couldn't create stage directory: %s: %m",
+ stagedir);
+ } else {
+ syslog(LOG_NOTICE, "created stage directory %s",
+ stagedir);
+ f = fopen(stagefile, "w+");
+ }
+ }
+ if (!f) {
+ syslog(LOG_ERR, "IOERROR: creating message file %s: %m",
+ stagefile);
+ *stagep = NULL;
+ return NULL;
+ }
+
+ strlcpy(stage->parts, stagefile, MAX_MAILBOX_PATH+1);
+ /* make sure there's a NUL NUL at the end */
+ stage->parts[strlen(stagefile) + 1] = '\0';
+
+ *stagep = stage;
+ return f;
+}
+
+/*
+ * staging, to allow for single-instance store. the complication here
+ * is multiple partitions.
+ */
+int append_fromstage(struct appendstate *as, struct body **body,
+ struct stagemsg *stage, time_t internaldate,
+ const char **flag, int nflags, int nolink)
+{
+ struct mailbox *mailbox = &as->m;
+ struct index_record message_index;
+ char fname[MAX_MAILBOX_PATH+1];
+ FILE *destfile;
+ int i, r;
+ int userflag, emptyflag;
+
+ /* for staging */
+ char stagefile[MAX_MAILBOX_PATH+1];
+ int sflen;
+ char *p;
+
+ assert(stage != NULL && stage->parts[0] != '\0');
+ assert(mailbox->format == MAILBOX_FORMAT_NORMAL);
+
+ zero_index(message_index);
+
+ /* xxx check errors */
+ mboxlist_findstage(mailbox->name, stagefile, sizeof(stagefile));
+ strlcat(stagefile, stage->fname, sizeof(stagefile));
+ sflen = strlen(stagefile);
+
+ p = stage->parts;
+ while (p < stage->partend) {
+ int sl = strlen(p);
+
+ if (sl == 0) {
+ /* our partition isn't here */
+ break;
+ }
+ if (!strcmp(stagefile, p)) {
+ /* aha, this is us */
+ break;
+ }
+
+ p += sl + 1;
+ }
+
+ if (*p == '\0') {
+ /* ok, create this file, and copy the name of it into 'p'.
+ make sure not to overwrite stage->partend */
+
+ /* create the new staging file from the first stage part */
+ r = mailbox_copyfile(stage->parts, stagefile, 0);
+ if (r) {
+ /* maybe the directory doesn't exist? */
+ char stagedir[MAX_MAILBOX_PATH+1];
+
+ /* xxx check errors */
+ mboxlist_findstage(mailbox->name, stagedir, sizeof(stagedir));
+ if (mkdir(stagedir, 0755) != 0) {
+ syslog(LOG_ERR, "couldn't create stage directory: %s: %m",
+ stagedir);
+ } else {
+ syslog(LOG_NOTICE, "created stage directory %s",
+ stagedir);
+ r = mailbox_copyfile(stage->parts, stagefile, 0);
+ }
+ }
+ if (r) {
+ /* oh well, we tried */
+
+ syslog(LOG_ERR, "IOERROR: creating message file %s: %m",
+ stagefile);
+ unlink(stagefile);
+ return r;
+ }
+
+ if (p + sflen > stage->partend - 5) {
+ int cursize = stage->partend - stage->parts;
+ int curp = p - stage->parts;
+
+ /* need more room; double the buffer */
+ stage->parts = xrealloc(stage->parts, 2 * cursize);
+ stage->partend = stage->parts + 2 * cursize;
+ p = stage->parts + curp;
+ }
+ strcpy(p, stagefile);
+ /* make sure there's a NUL NUL at the end */
+ p[sflen + 1] = '\0';
+ }
+
+ /* 'p' contains the message and is on the same partition
+ as the mailbox we're looking at */
+
+ /* Setup */
+ message_index.uid = mailbox->last_uid + as->nummsg + 1;
+ if (mailbox->options & OPT_IMAP_CONDSTORE) {
+ message_index.modseq = mailbox->highestmodseq + 1;
+ } else {
+ message_index.modseq = 1;
+ }
+ message_index.last_updated = time(0);
+ message_index.internaldate = internaldate;
+ lseek(mailbox->cache_fd, 0L, SEEK_END);
+
+ /* Create message file */
+ as->nummsg++;
+ strlcpy(fname, mailbox->path, sizeof(fname));
+ strlcat(fname, "/", sizeof(fname));
+ mailbox_message_get_fname(mailbox, message_index.uid,
+ fname + strlen(fname),
+ sizeof(fname) - strlen(fname));
+
+ r = mailbox_copyfile(p, fname, nolink);
+ destfile = fopen(fname, "r");
+ if (!r && destfile) {
+ /* ok, we've successfully created the file */
+ if (!*body || (as->nummsg - 1))
+ r = message_parse_file(destfile, NULL, NULL, body);
+ if (!r) r = message_create_record(mailbox, &message_index, *body);
+ }
+ if (destfile) {
+ /* this will hopefully ensure that the link() actually happened
+ and makes sure that the file actually hits disk */
+ fsync(fileno(destfile));
+ fclose(destfile);
+ }
+ if (r) {
+ append_abort(as);
+ return r;
+ }
+
+ /* Handle flags the user wants to set in the message */
+ for (i = 0; i < nflags; i++) {
+ if (!strcmp(flag[i], "\\seen")) {
+ addme(&as->seen_msgrange, &as->seen_alloced, message_index.uid);
+ }
+ else if (!strcmp(flag[i], "\\deleted")) {
+ if (mailbox->myrights & ACL_DELETEMSG) {
+ message_index.system_flags |= FLAG_DELETED;
+ as->numdeleted++;
+ }
+ }
+ else if (!strcmp(flag[i], "\\draft")) {
+ if (mailbox->myrights & ACL_WRITE) {
+ message_index.system_flags |= FLAG_DRAFT;
+ }
+ }
+ else if (!strcmp(flag[i], "\\flagged")) {
+ if (mailbox->myrights & ACL_WRITE) {
+ message_index.system_flags |= FLAG_FLAGGED;
+ as->numflagged++;
+ }
+ }
+ else if (!strcmp(flag[i], "\\answered")) {
+ if (mailbox->myrights & ACL_WRITE) {
+ message_index.system_flags |= FLAG_ANSWERED;
+ as->numanswered++;
+ }
+ }
+ else if (mailbox->myrights & ACL_WRITE) {
+ /* User flag */
+ emptyflag = -1;
+ for (userflag = 0; userflag < MAX_USER_FLAGS; userflag++) {
+ if (mailbox->flagname[userflag]) {
+ if (!strcasecmp(flag[i], mailbox->flagname[userflag]))
+ break;
+ }
+ else if (emptyflag == -1) emptyflag = userflag;
+ }
+
+ /* Flag is not defined--create it */
+ if (userflag == MAX_USER_FLAGS && emptyflag != -1) {
+ userflag = emptyflag;
+ mailbox->flagname[userflag] = xstrdup(flag[i]);
+ as->writeheader++;
+ }
+
+ if (userflag != MAX_USER_FLAGS) {
+ message_index.user_flags[userflag/32] |= 1<<(userflag&31);
+ }
+ }
+ }
+ /* Copy Message UUID from stage */
+ message_uuid_copy(&message_index.uuid, &stage->uuid);
+
+ /* Write out index file entry */
+ r = mailbox_append_index(mailbox, &message_index,
+ mailbox->exists + as->nummsg - 1, 1, 0);
+ if (r) {
+ append_abort(as);
+ return r;
+ }
+
+ /* ok, we've successfully added a message */
+ as->quota_used += message_index.size;
+
+ return 0;
+}
+
+int append_removestage(struct stagemsg *stage)
+{
+ char *p;
+
+ if (stage == NULL) return 0;
+
+ p = stage->parts;
+ while (*p != '\0' && p < stage->partend) {
+ /* unlink the staging file */
+ if (unlink(p) != 0) {
+ syslog(LOG_ERR, "IOERROR: error unlinking file %s: %m", p);
+ }
+ p += strlen(p) + 1;
+ }
+
+ free(stage->parts);
+ free(stage);
+ return 0;
+}
+
+/*
+ * Append to 'mailbox' from the prot stream 'messagefile'.
+ * 'mailbox' must have been opened with append_setup().
+ * 'size' is the expected size of the message.
+ * 'internaldate' specifies the internaldate for the new message.
+ * 'flags' contains the names of the 'nflags' flags that the
+ * user wants to set in the message. If the '\Seen' flag is
+ * in 'flags', then the 'userid' passed to append_setup controls whose
+ * \Seen flag gets set.
+ *
+ * The message is not committed to the mailbox (nor is the mailbox
+ * unlocked) until append_commit() is called. multiple
+ * append_onefromstream()s can be aborted by calling append_abort().
+ */
+int append_fromstream(struct appendstate *as, struct body **body,
+ struct protstream *messagefile,
+ unsigned long size,
+ time_t internaldate,
+ const char **flag,
+ int nflags)
+{
+ struct mailbox *mailbox = &as->m;
+ struct index_record message_index;
+ char fname[MAX_MAILBOX_PATH+1];
+ FILE *destfile;
+ int i, r;
+ int userflag, emptyflag;
+
+ assert(mailbox->format == MAILBOX_FORMAT_NORMAL);
+ assert(size != 0);
+
+ zero_index(message_index);
+ /* Setup */
+ message_index.uid = mailbox->last_uid + as->nummsg + 1;
+ if (mailbox->options & OPT_IMAP_CONDSTORE) {
+ message_index.modseq = mailbox->highestmodseq + 1;
+ } else {
+ message_index.modseq = 1;
+ }
+ message_index.last_updated = time(0);
+ message_index.internaldate = internaldate;
+ lseek(mailbox->cache_fd, 0L, SEEK_END);
+
+ /* Create message file */
+ strlcpy(fname, mailbox->path, sizeof(fname));
+ strlcat(fname, "/", sizeof(fname));
+ mailbox_message_get_fname(mailbox, message_index.uid,
+ fname + strlen(fname),
+ sizeof(fname) - strlen(fname));
+ as->nummsg++;
+
+ unlink(fname);
+ destfile = fopen(fname, "w+");
+ if (!destfile) {
+ syslog(LOG_ERR, "IOERROR: creating message file %s: %m", fname);
+ append_abort(as);
+ return IMAP_IOERROR;
+ }
+
+ /* Copy and parse message */
+ r = message_copy_strict(messagefile, destfile, size, 0);
+ if (!r) {
+ if (!*body || (as->nummsg - 1))
+ r = message_parse_file(destfile, NULL, NULL, body);
+ if (!r) r = message_create_record(mailbox, &message_index, *body);
+ }
+ fclose(destfile);
+ if (r) {
+ append_abort(as);
+ return r;
+ }
+
+ /* Handle flags the user wants to set in the message */
+ for (i = 0; i < nflags; i++) {
+ if (!strcmp(flag[i], "\\seen")) {
+ addme(&as->seen_msgrange, &as->seen_alloced, message_index.uid);
+ }
+ else if (!strcmp(flag[i], "\\deleted")) {
+ if (mailbox->myrights & ACL_DELETEMSG) {
+ message_index.system_flags |= FLAG_DELETED;
+ as->numdeleted++;
+ }
+ }
+ else if (!strcmp(flag[i], "\\draft")) {
+ if (mailbox->myrights & ACL_WRITE) {
+ message_index.system_flags |= FLAG_DRAFT;
+ }
+ }
+ else if (!strcmp(flag[i], "\\flagged")) {
+ if (mailbox->myrights & ACL_WRITE) {
+ message_index.system_flags |= FLAG_FLAGGED;
+ as->numflagged++;
+ }
+ }
+ else if (!strcmp(flag[i], "\\answered")) {
+ if (mailbox->myrights & ACL_WRITE) {
+ message_index.system_flags |= FLAG_ANSWERED;
+ as->numanswered++;
+ }
+ }
+ else if (mailbox->myrights & ACL_WRITE) {
+ /* User flag */
+ emptyflag = -1;
+ for (userflag = 0; userflag < MAX_USER_FLAGS; userflag++) {
+ if (mailbox->flagname[userflag]) {
+ if (!strcasecmp(flag[i], mailbox->flagname[userflag]))
+ break;
+ }
+ else if (emptyflag == -1) emptyflag = userflag;
+ }
+
+ /* Flag is not defined--create it */
+ if (userflag == MAX_USER_FLAGS && emptyflag != -1) {
+ userflag = emptyflag;
+ mailbox->flagname[userflag] = xstrdup(flag[i]);
+ as->writeheader++;
+ }
+
+ if (userflag != MAX_USER_FLAGS) {
+ message_index.user_flags[userflag/32] |= 1<<(userflag&31);
+ }
+ }
+ }
+
+ /* Assign new Message-UUID */
+ message_uuid_assign(&message_index.uuid);
+
+ /* Write out index file entry; if we abort later, it's not
+ important */
+ r = mailbox_append_index(mailbox, &message_index,
+ mailbox->exists + as->nummsg - 1, 1, 0);
+ if (r) {
+ append_abort(as);
+ return r;
+ }
+
+ /* ok, we've successfully added a message */
+ as->quota_used += message_index.size;
+
+ return 0;
+}
+
+/*
+ * Append to 'append_mailbox' ('as') the 'nummsg' messages from the
+ * mailbox 'mailbox' listed in the array pointed to by 'copymsg'.
+ * 'as' must have been opened with append_setup(). If the '\Seen'
+ * flag is to be set anywhere then 'userid' passed to append_setup()
+ * contains the name of the user whose \Seen flag gets set.
+ */
+int append_copy(struct mailbox *mailbox,
+ struct appendstate *as,
+ int nummsg,
+ struct copymsg *copymsg,
+ int nolink)
+{
+ struct mailbox *append_mailbox = &as->m;
+ int msg;
+ struct index_record *message_index;
+ char fname[MAX_MAILBOX_PATH+1];
+ const char *src_base;
+ unsigned long src_size;
+ const char *startline, *endline;
+ FILE *destfile;
+ int r, n;
+ int flag, userflag, emptyflag;
+ struct body *body = NULL;
+
+ assert(append_mailbox->format == MAILBOX_FORMAT_NORMAL);
+
+ if (!nummsg) {
+ append_abort(as);
+ return 0;
+ }
+
+ lseek(append_mailbox->cache_fd, 0L, SEEK_END);
+ message_index = (struct index_record *)
+ xmalloc(nummsg * sizeof(struct index_record));
+
+ /* Copy/link all files and cache info */
+ for (msg = 0; msg < nummsg; msg++) {
+ zero_index(message_index[msg]);
+ message_index[msg].uid = append_mailbox->last_uid + 1 + as->nummsg;
+ if (append_mailbox->options & OPT_IMAP_CONDSTORE) {
+ message_index[msg].modseq = append_mailbox->highestmodseq + 1;
+ } else {
+ message_index[msg].modseq = 1;
+ }
+ message_index[msg].last_updated = time(0);
+ message_index[msg].internaldate = copymsg[msg].internaldate;
+ as->nummsg++;
+
+ strlcpy(fname, append_mailbox->path, sizeof(fname));
+ strlcat(fname, "/", sizeof(fname));
+ mailbox_message_get_fname(append_mailbox, message_index[msg].uid,
+ fname + strlen(fname),
+ sizeof(fname) - strlen(fname));
+
+ if (copymsg[msg].cache_len) {
+ char fnamebuf[MAX_MAILBOX_PATH + MAILBOX_FNAME_LEN + 1];
+
+ strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, "/", sizeof(fnamebuf));
+
+ mailbox_message_get_fname(mailbox, copymsg[msg].uid,
+ fnamebuf + strlen(fnamebuf),
+ sizeof(fnamebuf) - strlen(fnamebuf));
+
+ /* Link/copy message file */
+ r = mailbox_copyfile(fnamebuf, fname, nolink);
+ if (r) goto fail;
+
+ /* Write out cache info, copy other info */
+ message_index[msg].cache_offset =
+ lseek(append_mailbox->cache_fd, 0L, SEEK_CUR);
+ message_index[msg].sentdate = copymsg[msg].sentdate;
+ message_index[msg].size = copymsg[msg].size;
+ message_index[msg].header_size = copymsg[msg].header_size;
+ message_index[msg].content_offset = copymsg[msg].header_size;
+ message_index[msg].content_lines = copymsg[msg].content_lines;
+ message_index[msg].cache_version = copymsg[msg].cache_version;
+
+ n = retry_write(append_mailbox->cache_fd, copymsg[msg].cache_begin,
+ copymsg[msg].cache_len);
+ if (n == -1) {
+ syslog(LOG_ERR, "IOERROR: writing cache file for %s: %m",
+ append_mailbox->name);
+ r = IMAP_IOERROR;
+ goto fail;
+ }
+ } else {
+ /*
+ * Have to copy the message, possibly converting LF to CR LF
+ * Then, we have to parse the message.
+ */
+ r = 0;
+ unlink(fname);
+ destfile = fopen(fname, "w+");
+ if (!destfile) {
+ syslog(LOG_ERR, "IOERROR: writing message file %s: %m", fname);
+ r = IMAP_IOERROR;
+ goto fail;
+ }
+ if (mailbox_map_message(mailbox, copymsg[msg].uid,
+ &src_base, &src_size) != 0) {
+ fclose(destfile);
+ syslog(LOG_ERR, "IOERROR: opening message file %lu of %s: %m",
+ copymsg[msg].uid, mailbox->name);
+ r = IMAP_IOERROR;
+ goto fail;
+ }
+
+ startline = src_base;
+ while ( (endline = memchr(startline, '\n',
+ src_size - (startline - src_base))) ) {
+ fwrite(startline, 1, (endline - startline), destfile);
+ if (endline == startline || endline[-1] != '\r') {
+ putc('\r', destfile);
+ }
+ putc('\n', destfile);
+ startline = endline+1;
+ }
+ fwrite(startline, 1, src_size - (startline - src_base), destfile);
+
+ fflush(destfile);
+ if (ferror(destfile) || fsync(fileno(destfile))) {
+ syslog(LOG_ERR, "IOERROR: writing message: %m");
+ r = IMAP_IOERROR;
+ }
+
+ mailbox_unmap_message(mailbox, copymsg[msg].uid,
+ &src_base, &src_size);
+
+ if (!r) r = message_parse_file(destfile, NULL, NULL, &body);
+ if (!r) r = message_create_record(append_mailbox,
+ &message_index[msg], body);
+ if (body) message_free_body(body);
+ fclose(destfile);
+ if (r) goto fail;
+ }
+
+ as->quota_used += message_index[msg].size;
+
+ /* Handle any flags that need to be copied */
+ if (append_mailbox->myrights & ACL_WRITE) {
+ message_index[msg].system_flags =
+ copymsg[msg].system_flags & ~FLAG_DELETED;
+
+ for (flag = 0; copymsg[msg].flag[flag]; flag++) {
+ emptyflag = -1;
+ for (userflag = 0; userflag < MAX_USER_FLAGS; userflag++) {
+ if (append_mailbox->flagname[userflag]) {
+ if (!strcasecmp(copymsg[msg].flag[flag],
+ append_mailbox->flagname[userflag]))
+ break;
+ }
+ else if (emptyflag == -1) emptyflag = userflag;
+ }
+
+ /* Flag is not defined--create it */
+ if (userflag == MAX_USER_FLAGS && emptyflag != -1) {
+ userflag = emptyflag;
+ append_mailbox->flagname[userflag] =
+ xstrdup(copymsg[msg].flag[flag]);
+ as->writeheader++;
+ }
+
+ if (userflag != MAX_USER_FLAGS) {
+ message_index[msg].user_flags[userflag/32] |=
+ 1<<(userflag&31);
+ }
+ }
+ }
+ if (append_mailbox->myrights & ACL_DELETEMSG) {
+ message_index[msg].system_flags |=
+ copymsg[msg].system_flags & FLAG_DELETED;
+ }
+
+ if (message_index[msg].system_flags & FLAG_DELETED) as->numdeleted++;
+ if (message_index[msg].system_flags & FLAG_ANSWERED) as->numanswered++;
+ if (message_index[msg].system_flags & FLAG_FLAGGED) as->numflagged++;
+
+ /* should this message be marked \Seen? */
+ if (copymsg[msg].seen) {
+ addme(&as->seen_msgrange, &as->seen_alloced,
+ message_index[msg].uid);
+ }
+
+ /* Assign messageID for this message */
+ message_uuid_copy(&message_index[msg].uuid, ©msg[msg].uuid);
+ }
+
+ if (body) free(body);
+
+ /* Write out index file entries */
+ r = mailbox_append_index(append_mailbox, message_index,
+ append_mailbox->exists + as->nummsg - nummsg,
+ nummsg, 0);
+
+ fail:
+ if (r) append_abort(as);
+ free(message_index);
+
+ return r;
+}
+
+/* add 'uid' to 'msgrange'. 'uid' should be larger than anything in
+ * 'msgrange'.
+ */
+static void addme(char **msgrange, int *alloced, long uid)
+{
+ char *p;
+ int wasrange;
+ int len;
+
+ assert(msgrange != NULL);
+ len = *msgrange ? strlen(*msgrange) : 0;
+ if (*alloced < len + 40) {
+ *alloced += 40;
+ *msgrange = (char *) xrealloc(*msgrange, sizeof(char *) * (*alloced));
+ }
+
+ p = *msgrange;
+
+ if (!len) {
+ /* first time */
+ sprintf(*msgrange, "%ld", uid);
+ } else {
+ /* this is tricky if this is the second number we're adding */
+ wasrange = 0;
+
+ /* see what the last one is */
+ p = *msgrange + len - 1;
+ while (isdigit((int) *p) && p > *msgrange) p--;
+ /* second time, p == msgrange here */
+ if (*p == ':') wasrange = 1;
+ p++;
+ if (atoi(p) == uid - 1) {
+ if (!wasrange) {
+ p = *msgrange + len;
+ *p++ = ':';
+ } else {
+ /* we'll just overwrite the current number */
+ }
+ } else {
+ p = *msgrange + len;
+ *p++ = ',';
+ }
+ sprintf(p, "%ld", uid);
+ return;
+ }
+}
+
+/*
+ * Set the \Seen flag for 'userid' in 'mailbox' for the messages from
+ * 'msgrange'. the lowest msgrange must be larger than any previously
+ * seen message.
+ */
+static int append_addseen(struct mailbox *mailbox,
+ const char *userid,
+ const char *msgrange)
+{
+ int r;
+ struct seen *seendb;
+ time_t last_read, last_change;
+ unsigned last_uid;
+ char *seenuids;
+ int last_seen;
+ char *tail, *p;
+ int oldlen, newlen;
+ int start;
+
+ /* what's the first uid in our new list? */
+ start = atoi(msgrange);
+
+ r = seen_open(mailbox, userid, SEEN_CREATE, &seendb);
+ if (r) return r;
+
+ r = seen_lockread(seendb, &last_read, &last_uid, &last_change, &seenuids);
+ if (r) return r;
+
+ oldlen = strlen(seenuids);
+ newlen = oldlen + strlen(msgrange) + 10;
+ seenuids = xrealloc(seenuids, newlen);
+
+ tail = seenuids + oldlen;
+ /* Scan back to last uid */
+ while (tail > seenuids && isdigit((int) tail[-1])) tail--;
+ for (p = tail, last_seen=0; *p; p++) last_seen = last_seen * 10 + *p - '0';
+ if (last_seen && last_seen >= start-1) {
+ if (tail > seenuids && tail[-1] == ':') p = tail - 1;
+ *p++ = ':';
+ }
+ else {
+ if (p > seenuids) *p++ = ',';
+ }
+ strlcpy(p, msgrange, newlen-(p-seenuids+1));
+
+ r = seen_write(seendb, last_read, last_uid, time(NULL), seenuids);
+ seen_close(seendb);
+ free(seenuids);
+ return r;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/append.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,150 @@
+/* append.h -- Description of messages to be copied
+ * $Id: append.h,v 1.24.2.4 2005/06/02 16:16:02 ken3 Exp $
+ *
+ * Copyright (c) 1998, 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#ifndef INCLUDED_APPEND_H
+#define INCLUDED_APPEND_H
+
+#include "mailbox.h"
+#include "message.h"
+#include "prot.h"
+
+struct copymsg {
+ unsigned long uid;
+ time_t internaldate;
+ time_t sentdate;
+ unsigned long size;
+ unsigned long header_size;
+ unsigned long content_lines;
+ unsigned long cache_version;
+ const char *cache_begin;
+ int cache_len; /* 0 if need to copy & parse message */
+ int seen;
+ struct message_uuid uuid;
+ bit32 system_flags;
+ char *flag[MAX_USER_FLAGS+1];
+};
+
+/* it's ridiculous i have to expose this structure if i want to allow
+ clients to stack-allocate it */
+struct appendstate {
+ /* mailbox we're appending to */
+ struct mailbox m;
+ char userid[MAX_MAILBOX_NAME+1];
+
+ enum { APPEND_READY, APPEND_DONE } s;
+ /* current state of append */
+
+ /* if we abort, where should we truncate the cache file? */
+ unsigned long orig_cache_len;
+
+ int writeheader; /* did we change the mailbox header? */
+
+ int nummsg; /* number of messages appended pending commit.
+ from m.last_uid + 1 ... m.last_uid + nummsg */
+
+ /* summary information to change on commit */
+ int numanswered, numdeleted, numflagged;
+
+ /* set seen on these message on commit */
+ char *seen_msgrange;
+ int seen_alloced;
+
+ /* the amount of quota we've used so far in this append */
+ int quota_used;
+
+ /* txn for updating quota */
+ struct txn *tid;
+};
+
+/* add helper function to determine uid range appended? */
+
+struct stagemsg;
+
+extern int append_check(const char *name, int format,
+ struct auth_state *auth_state,
+ long aclcheck, long quotacheck);
+
+/* appendstate must be allocated by client */
+extern int append_setup(struct appendstate *mailbox, const char *name,
+ int format,
+ const char *userid, struct auth_state *auth_state,
+ long aclcheck, long quotacheck);
+
+extern int append_commit(struct appendstate *mailbox,
+ long quotacheck,
+ unsigned long *uidvalidity,
+ unsigned long *startuid,
+ unsigned long *num);
+extern int append_abort(struct appendstate *mailbox);
+
+int append_stageparts(struct stagemsg *stagep);
+
+/* creates a new stage and returns stage file corresponding to mailboxname */
+extern FILE *append_newstage(const char *mailboxname, time_t internaldate,
+ int msgnum, struct stagemsg **stagep);
+
+/* adds a new mailbox to the stage initially created by append_newstage() */
+extern int append_fromstage(struct appendstate *mailbox, struct body **body,
+ struct stagemsg *stage, time_t internaldate,
+ const char **flag, int nflags, int nolink);
+
+/* removes the stage (frees memory, deletes the staging files) */
+extern int append_removestage(struct stagemsg *stage);
+
+extern int append_fromstream(struct appendstate *as, struct body **body,
+ struct protstream *messagefile,
+ unsigned long size, time_t internaldate,
+ const char **flag, int nflags);
+
+extern int append_copy(struct mailbox *mailbox,
+ struct appendstate *append_mailbox,
+ int nummsg, struct copymsg *copymsg, int nolink);
+
+extern int append_collectnews(struct appendstate *mailbox,
+ const char *group, unsigned long feeduid);
+
+#define append_getuidvalidity(as) ((as)->m.uidvalidity);
+#define append_getlastuid(as) ((as)->m.last_uid);
+
+#endif /* INCLUDED_APPEND_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/arbitron.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/arbitron.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/arbitron.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/arbitron.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,534 @@
+/* arbitron.c -- program to report readership statistics
+ *
+ * Copyright (c) 1998, 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: arbitron.c,v 1.31.2.5 2006/01/16 15:43:07 murch Exp $ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+
+#include "assert.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "hash.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "mpool.h"
+#include "mboxlist.h"
+#include "convert_code.h"
+#include "seen.h"
+#include "xmalloc.h"
+
+/* config.c stuff */
+const int config_need_data = 0;
+
+#define DB (config_seenstate_db)
+#define SUBDB (config_subscription_db)
+
+extern int optind;
+extern char *optarg;
+
+/* Maintain the mailbox list */
+/* xxx it'd be nice to generate a subscriber list too */
+struct user_list {
+ const char *user;
+ struct user_list *next;
+};
+
+struct arb_mailbox_data {
+ int nreaders;
+ struct user_list *readers;
+ int nsubscribers;
+ struct user_list *subscribers;
+};
+
+struct mpool *arb_pool;
+hash_table mailbox_table, mboxname_table;
+
+time_t report_start_time = -1, report_end_time, prune_time = 0;
+int code = 0;
+int dosubs = 1;
+int dousers = 0;
+int long_report = 0;
+
+/* current namespace */
+static struct namespace arb_namespace;
+
+/* forward declarations */
+void usage(void);
+void run_users(void);
+void make_report(char *key, void *data, void *rock);
+void process_seen(const char *path, const char *user);
+void process_subs(const char *path, const char *user);
+int do_mailbox(const char *name, int matchlen, int maycreate, void *rock);
+
+int main(int argc,char **argv)
+{
+ int opt, r;
+ int report_days = 30;
+ int prune_months = 0;
+ char pattern[MAX_MAILBOX_NAME+1];
+ char *alt_config = NULL;
+ time_t now = time(0);
+
+ strcpy(pattern, "*");
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ report_end_time = now;
+
+ while ((opt = getopt(argc, argv, "C:oud:D:p:l")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'd':
+ if (report_start_time != -1) usage();
+ report_days = atoi(optarg);
+ if (report_days <= 0) usage();
+ break;
+
+ case 'D': {
+ unsigned month, day, year;
+ struct tm date;
+
+ if (strlen(optarg) < 8 ||
+ sscanf(optarg, "%02u%02u%04u", &month, &day, &year) < 3) {
+ usage();
+ }
+ memset(&date, 0, sizeof(struct tm));
+ date.tm_mon = month - 1;
+ date.tm_mday = day;
+ date.tm_year = year - 1900;
+ report_start_time = mktime(&date);
+
+ if (optarg[8] == ':' && strlen(optarg+9) == 8) {
+ if (sscanf(optarg+9, "%02u%02u%04u", &month, &day, &year) < 3) {
+ usage();
+ }
+ memset(&date, 0, sizeof(struct tm));
+ date.tm_mon = month - 1;
+ date.tm_mday = day;
+ date.tm_year = year - 1900;
+ report_end_time = mktime(&date);
+ }
+
+ break;
+ }
+
+ case 'o':
+ dosubs = 0;
+ break;
+
+ case 'u':
+ dousers = 1;
+ break;
+
+ case 'p':
+ prune_months = atoi(optarg);
+ if (prune_months <= 0) usage();
+ break;
+
+ case 'l':
+ long_report = dousers = 1;
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ /* Init Cyrus Backend Foo */
+ cyrus_init(alt_config, "arbitron", 0);
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(&arb_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ if (optind != argc) strlcpy(pattern, argv[optind], sizeof(pattern));
+
+ if (report_start_time == -1) {
+ report_start_time = now - (report_days*60*60*24);
+ }
+ if (prune_months) {
+ prune_time = now - (prune_months*60*60*24*31);
+ }
+
+ /* Allocate our shared memory pools */
+ arb_pool = new_mpool(0);
+ construct_hash_table(&mailbox_table, 2047, 1);
+ construct_hash_table(&mboxname_table, 2047, 1);
+
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_tointernal(&arb_namespace, pattern, 0);
+
+ /* Get the mailbox list */
+ fprintf(stderr, "Loading Mailboxes...");
+ (*arb_namespace.mboxlist_findall)(&arb_namespace, pattern, 1, 0, 0,
+ do_mailbox, NULL);
+
+ fprintf(stderr, "Done\nLoading Users");
+
+ /* Now do all the users */
+ run_users();
+
+ fprintf(stderr, "Done\n");
+
+ /* And print the report */
+ hash_enumerate(&mboxname_table, make_report, NULL);
+
+ /* Free Resources */
+ free_hash_table(&mailbox_table, NULL);
+ free_hash_table(&mboxname_table, NULL);
+ free_mpool(arb_pool);
+ mboxlist_close();
+ mboxlist_done();
+
+ cyrus_done();
+
+ return code;
+}
+
+void usage(void)
+{
+ fprintf(stderr,
+ "usage: arbitron [-o] [-u] [-l] [-C alt_config] "
+ "[-d days | -D mmddyyy[:mmddyyyy]]\n"
+ " [-p months] [mboxpattern]\n");
+ exit(EC_USAGE);
+}
+
+int do_mailbox(const char *name, int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock __attribute__((unused)))
+{
+ int r;
+ struct mailbox mbox;
+
+ r = mailbox_open_header(name, NULL, &mbox);
+ if(!r) {
+ struct arb_mailbox_data *d = mpool_malloc(arb_pool,
+ sizeof(struct arb_mailbox_data));
+
+ d->nreaders = 0;
+ d->nsubscribers = 0;
+
+/* printf("inserting %s (key %s)\n", name, mbox.uniqueid); */
+
+ hash_insert(mbox.uniqueid, d, &mailbox_table);
+ hash_insert(name, d, &mboxname_table);
+
+ mailbox_close(&mbox);
+ }
+
+ return 0;
+}
+
+void run_users()
+{
+ char prefix[MAX_MAILBOX_PATH+1],path[MAX_MAILBOX_PATH+1],
+ file[MAX_MAILBOX_PATH+1];
+ DIR *dirp, *dirq;
+ struct dirent *dirent1, *dirent2;
+
+ snprintf(prefix, sizeof(prefix), "%s%s", config_dir, FNAME_USERDIR);
+
+ dirp = opendir(prefix);
+ if(!dirp) {
+ fatal("can't open user directory", EC_SOFTWARE);
+ }
+
+ while((dirent1 = readdir(dirp)) != NULL) {
+ if(!strcmp(dirent1->d_name, ".") || !strcmp(dirent1->d_name,"..")) {
+ continue;
+ }
+
+ snprintf(path, sizeof(path), "%s%s", prefix, dirent1->d_name);
+/* printf("trying %s\n",path); */
+
+ dirq = opendir(path);
+ if(dirq) {
+ fprintf(stderr, ".");
+ while(dirq && ((dirent2 = readdir(dirq)) != NULL)) {
+ size_t len;
+
+ if(!strcmp(dirent2->d_name, ".") ||
+ !strcmp(dirent2->d_name,"..")) {
+ continue;
+ }
+
+ len = strlen(dirent2->d_name);
+
+ /* 5 is magic number for strlen(".seen") and
+ 4 is the magic number for strlen(".sub") */
+ if(len > 4) {
+ char *user = NULL;
+
+ snprintf(file, sizeof(file),
+ "%s/%s", path, dirent2->d_name);
+/* printf("got file %s\n",file); */
+ if(len > 5 &&
+ !strcmp(dirent2->d_name + len - 5, ".seen")) {
+ if (dousers) {
+ user = mpool_strndup(arb_pool, dirent2->d_name,
+ len-5);
+ }
+ process_seen(file, user);
+ } else if (dosubs &&
+ !strcmp(dirent2->d_name + len - 4, ".sub")) {
+ if (dousers) {
+ user = mpool_strndup(arb_pool, dirent2->d_name,
+ len-4);
+ }
+ process_subs(file, user);
+ }
+ }
+ }
+ closedir(dirq);
+ }
+
+ }
+ closedir(dirp);
+
+}
+
+static int process_user_cb(void *rockp,
+ const char *key, int keylen,
+ const char *tmpdata __attribute__((unused)),
+ int tmpdatalen __attribute__((unused)))
+{
+ /* Only called to do deletes */
+/* printf("pruning entry\n"); */
+
+ DB->delete((struct db *)rockp, key, keylen, NULL, 0);
+
+ return 0;
+}
+
+/* We can cheat and do all we need to in this function */
+static int process_user_p(void *rockp,
+ const char *key,
+ int keylen,
+ const char *data,
+ int datalen __attribute__((unused)))
+{
+ int ret = 0;
+ long version, lastread;
+ char *p;
+ char buf[64];
+ struct arb_mailbox_data *mbox;
+ const char *user = (const char *) rockp;
+
+ /* remember that 'data' may not be null terminated ! */
+ version = strtol(data, &p, 10); data = p;
+ /* xxx not checking version */
+ lastread = strtol(data, &p, 10); data = p;
+
+ memcpy(buf, key, keylen);
+ buf[keylen] = '\0';
+
+ mbox = hash_lookup(buf, &mailbox_table);
+
+ if(mbox && lastread >= report_start_time &&
+ lastread <= report_end_time) {
+/* printf("got %s\n", mbox->name); */
+ mbox->nreaders++;
+ if (user) {
+ struct user_list *u = mpool_malloc(arb_pool,
+ sizeof(struct user_list));
+
+ u->user = user;
+ u->next = mbox->readers;
+ mbox->readers = u;
+ }
+ }
+
+ /* Check for pruning even if mailbox isn't valid */
+ if(lastread < prune_time) {
+ ret = 1;
+ }
+
+ /* Only return true if we need to prune this guy */
+ return ret;
+}
+
+void process_seen(const char *path, const char *user)
+{
+ int r;
+ struct db *tmp = NULL;
+
+ r = DB->open(path, 0, &tmp);
+ if(r) goto done;
+
+ DB->foreach(tmp, "", 0, process_user_p, process_user_cb,
+ (void *) user, NULL);
+
+ done:
+ if(tmp) DB->close(tmp);
+}
+
+static int process_subs_cb(void *rockp __attribute__((unused)),
+ const char *key __attribute__((unused)),
+ int keylen __attribute__((unused)),
+ const char *tmpdata __attribute__((unused)),
+ int tmpdatalen __attribute__((unused)))
+{
+ return 0;
+}
+
+static int process_subs_p(void *rockp,
+ const char *key, int keylen,
+ const char *tmpdata __attribute__((unused)),
+ int tmpdatalen __attribute__((unused)))
+{
+ struct arb_mailbox_data *mbox;
+ char buf[MAX_MAILBOX_NAME+1];
+ const char *user = (const char *) rockp;
+
+ memcpy(buf, key, keylen);
+ buf[keylen] = '\0';
+
+/* printf("lookup %s\n", buf); */
+
+ mbox = hash_lookup(buf, &mboxname_table);
+
+ if(mbox) {
+/* printf("got sub %s\n", buf); */
+ mbox->nsubscribers++;
+ if (user) {
+ struct user_list *u = mpool_malloc(arb_pool,
+ sizeof(struct user_list));
+
+ u->user = user;
+ u->next = mbox->subscribers;
+ mbox->subscribers = u;
+ }
+ }
+
+ return 0; /* never do callback */
+}
+
+void process_subs(const char *path, const char *user)
+{
+ int r;
+ struct db *tmp = NULL;
+
+ r = SUBDB->open(path, 0, &tmp);
+ if(r) goto done;
+
+ SUBDB->foreach(tmp, "", 0, process_subs_p, process_subs_cb,
+ (void *) user, NULL);
+
+ done:
+ if(tmp) SUBDB->close(tmp);
+}
+
+void report_users(struct user_list *u)
+{
+ char sep = ':';
+
+ while (u) {
+ printf("%c%s", sep, u->user);
+ sep = ',';
+ u = u->next;
+ }
+}
+
+void long_report_users(struct user_list *u, const char *mbox, char type)
+{
+ char buf[100];
+ struct tm *tm;
+
+ while (u) {
+ printf("%s,%s,%c,", mbox, u->user, type);
+ tm = localtime(&report_start_time);
+ strftime(buf, sizeof(buf), "%m-%d-%Y %H:%M:%S", tm);
+ printf("%s,", buf);
+
+ tm = localtime(&report_end_time);
+ strftime(buf, sizeof(buf), "%m-%d-%Y %H:%M:%S", tm);
+ printf("%s\n", buf);
+ u = u->next;
+ }
+}
+
+void make_report(char *key, void *data, void *rock __attribute__((unused)))
+{
+ struct arb_mailbox_data *mbox = (struct arb_mailbox_data *)data;
+
+ /* Skip underread user mailboxes */
+ if(!strncasecmp(key, "user.", 5) && mbox->nreaders <= 1)
+ return;
+
+ mboxname_hiersep_toexternal(&arb_namespace, key, 0);
+
+ if (long_report) {
+ long_report_users(mbox->readers, key, 'r');
+ long_report_users(mbox->subscribers, key, 's');
+ }
+ else {
+ printf("%s %d", key, mbox->nreaders);
+ if (dousers) report_users(mbox->readers);
+ if (dosubs) {
+ printf(" %d", mbox->nsubscribers);
+ if (dousers) report_users(mbox->subscribers);
+ }
+ printf("\n");
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,504 @@
+/* backend.c -- IMAP server proxy for Cyrus Murder
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: backend.c,v 1.16.2.18 2006/06/27 15:58:42 murch Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/un.h>
+#include <syslog.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "prot.h"
+#include "backend.h"
+#include "global.h"
+#include "xmalloc.h"
+#include "iptostring.h"
+#include "util.h"
+
+static char *ask_capability(struct protstream *pout, struct protstream *pin,
+ struct protocol_t *prot, unsigned long *capa,
+ int banner)
+{
+ char str[4096];
+ char *ret = NULL, *tmp;
+ struct capa_t *c;
+
+ *capa = 0;
+
+ if (!banner && prot->capa_cmd.cmd) {
+ /* request capabilities of server */
+ prot_printf(pout, "%s\r\n", prot->capa_cmd.cmd);
+ prot_flush(pout);
+ }
+
+ do {
+ if (prot_fgets(str, sizeof(str), pin) == NULL) {
+ return NULL;
+ }
+
+ /* look for capabilities in the string */
+ for (c = prot->capa_cmd.capa; c->str; c++) {
+ if ((tmp = strstr(str, c->str)) != NULL) {
+ *capa = *capa | c->flag;
+
+ if (c->flag == CAPA_AUTH) {
+ if (prot->capa_cmd.parse_mechlist)
+ ret = prot->capa_cmd.parse_mechlist(str, prot);
+ else
+ ret = xstrdup(tmp+strlen(c->str));
+ }
+ }
+ }
+ /* look for the end of the capabilities */
+ } while (strncasecmp(str, prot->capa_cmd.resp, strlen(prot->capa_cmd.resp)));
+
+ return ret;
+}
+
+static int do_starttls(struct backend *s, struct tls_cmd_t *tls_cmd)
+{
+#ifndef HAVE_SSL
+ return -1;
+#else
+ char buf[2048];
+ int r;
+ int *layerp;
+ char *auth_id;
+ sasl_ssf_t ssf;
+
+ /* send starttls command */
+ prot_printf(s->out, "%s\r\n", tls_cmd->cmd);
+ prot_flush(s->out);
+
+ /* check response */
+ if (!prot_fgets(buf, sizeof(buf), s->in) ||
+ strncmp(buf, tls_cmd->ok, strlen(tls_cmd->ok)))
+ return -1;
+
+ r = tls_init_clientengine(5, "", "");
+ if (r == -1) return -1;
+
+ /* SASL and openssl have different ideas about whether ssf is signed */
+ layerp = (int *) &ssf;
+ r = tls_start_clienttls(s->in->fd, s->out->fd, layerp, &auth_id,
+ &s->tlsconn, &s->tlssess);
+ if (r == -1) return -1;
+
+ r = sasl_setprop(s->saslconn, SASL_SSF_EXTERNAL, &ssf);
+ if (r != SASL_OK) return -1;
+
+ r = sasl_setprop(s->saslconn, SASL_AUTH_EXTERNAL, auth_id);
+ if (r != SASL_OK) return -1;
+
+ prot_settls(s->in, s->tlsconn);
+ prot_settls(s->out, s->tlsconn);
+
+ return 0;
+#endif /* HAVE_SSL */
+}
+
+static int backend_authenticate(struct backend *s, struct protocol_t *prot,
+ char **mechlist, const char *userid,
+ sasl_callback_t *cb, const char **status)
+{
+ int r;
+ sasl_security_properties_t *secprops = NULL;
+ struct sockaddr_storage saddr_l, saddr_r;
+ char remoteip[60], localip[60];
+ socklen_t addrsize;
+ int local_cb = 0;
+ char buf[2048], optstr[128], *p;
+ const char *mech_conf, *pass;
+
+ if (!cb) {
+ local_cb = 1;
+ strlcpy(optstr, s->hostname, sizeof(optstr));
+ p = strchr(optstr, '.');
+ if (p) *p = '\0';
+ strlcat(optstr, "_password", sizeof(optstr));
+ pass = config_getoverflowstring(optstr, NULL);
+ if(!pass) pass = config_getstring(IMAPOPT_PROXY_PASSWORD);
+ cb = mysasl_callbacks(userid,
+ config_getstring(IMAPOPT_PROXY_AUTHNAME),
+ config_getstring(IMAPOPT_PROXY_REALM),
+ pass);
+ }
+
+ /* set the IP addresses */
+ addrsize=sizeof(struct sockaddr_storage);
+ if (getpeername(s->sock, (struct sockaddr *)&saddr_r, &addrsize) != 0)
+ return SASL_FAIL;
+ if(iptostring((struct sockaddr *)&saddr_r, addrsize, remoteip, 60) != 0)
+ return SASL_FAIL;
+
+ addrsize=sizeof(struct sockaddr_storage);
+ if (getsockname(s->sock, (struct sockaddr *)&saddr_l, &addrsize)!=0)
+ return SASL_FAIL;
+ if(iptostring((struct sockaddr *)&saddr_l, addrsize, localip, 60) != 0)
+ return SASL_FAIL;
+
+ /* Require proxying if we have an "interesting" userid (authzid) */
+ r = sasl_client_new(prot->sasl_service, s->hostname, localip, remoteip, cb,
+ (userid && *userid ? SASL_NEED_PROXY : 0) |
+ (prot->sasl_cmd.parse_success ? SASL_SUCCESS_DATA : 0),
+ &s->saslconn);
+ if (r != SASL_OK) {
+ return r;
+ }
+
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ r = sasl_setprop(s->saslconn, SASL_SEC_PROPS, secprops);
+ if (r != SASL_OK) {
+ return r;
+ }
+
+ /* Get SASL mechanism list. We can force a particular
+ mechanism using a <shorthost>_mechs option */
+ strcpy(buf, s->hostname);
+ p = strchr(buf, '.');
+ if (p) *p = '\0';
+ strcat(buf, "_mechs");
+ mech_conf = config_getoverflowstring(buf, NULL);
+
+ if(!mech_conf) {
+ mech_conf = config_getstring(IMAPOPT_FORCE_SASL_CLIENT_MECH);
+ }
+
+ do {
+ /* If we have a mech_conf, use it */
+ if (mech_conf) {
+ free(*mechlist);
+ *mechlist = xstrdup(mech_conf);
+ }
+
+ if (*mechlist) {
+ /* we now do the actual SASL exchange */
+ saslclient(s->saslconn, &prot->sasl_cmd, *mechlist,
+ s->in, s->out, &r, status);
+
+ /* garbage collect */
+ free(*mechlist);
+ *mechlist = NULL;
+ }
+ else r = SASL_NOMECH;
+
+ /* If we don't have a usable mech, do TLS and try again */
+ } while (r == SASL_NOMECH && CAPA(s, CAPA_STARTTLS) &&
+ do_starttls(s, &prot->tls_cmd) != -1 &&
+ (*mechlist = ask_capability(s->out, s->in, prot, &s->capability, 0)));
+
+ /* xxx unclear that this is correct */
+ if (local_cb) free_callbacks(cb);
+
+ if (r == SASL_OK) {
+ prot_setsasl(s->in, s->saslconn);
+ prot_setsasl(s->out, s->saslconn);
+ }
+
+ /* r == SASL_OK on success */
+ return r;
+}
+
+static int timedout = 0;
+
+static void timed_out(int sig)
+{
+ if (sig == SIGALRM) {
+ timedout = 1;
+ } else {
+ fatal("Bad signal in timed_out", EC_SOFTWARE);
+ }
+}
+
+struct backend *backend_connect(struct backend *ret_backend, const char *server,
+ struct protocol_t *prot, const char *userid,
+ sasl_callback_t *cb, const char **auth_status)
+{
+ /* need to (re)establish connection to server or create one */
+ int sock = -1;
+ int r;
+ int err = -1;
+ struct addrinfo hints, *res0 = NULL, *res1 = NULL, *res;
+ struct sockaddr_un sunsock;
+ char buf[2048], *mechlist = NULL;
+ struct sigaction action;
+ struct backend *ret;
+
+ if (!ret_backend) {
+ ret = xmalloc(sizeof(struct backend));
+ memset(ret, 0, sizeof(struct backend));
+ strlcpy(ret->hostname, server, sizeof(ret->hostname));
+ ret->timeout = NULL;
+ }
+ else
+ ret = ret_backend;
+
+ if (server[0] == '/') { /* unix socket */
+ res0 = &hints;
+ memset(res0, 0, sizeof(struct addrinfo));
+ res0->ai_family = PF_UNIX;
+ res0->ai_socktype = SOCK_STREAM;
+
+ res0->ai_addr = (struct sockaddr *) &sunsock;
+ res0->ai_addrlen = sizeof(sunsock.sun_family) + strlen(server) + 1;
+#ifdef SIN6_LEN
+ res0->ai_addrlen += sizeof(sunsock.sun_len);
+ sunsock.sun_len = res0->ai_addrlen;
+#endif
+ sunsock.sun_family = AF_UNIX;
+ strlcpy(sunsock.sun_path, server, sizeof(sunsock.sun_path));
+
+ /* XXX set that we are preauthed */
+
+ /* change hostname to 'config_servername' */
+ strlcpy(ret->hostname, config_servername, sizeof(ret->hostname));
+ }
+ else { /* inet socket */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ err = getaddrinfo(server, prot->service, &hints, &res0);
+ if (err) {
+ syslog(LOG_ERR, "getaddrinfo(%s) failed: %s",
+ server, gai_strerror(err));
+ if (!ret_backend) free(ret);
+ return NULL;
+ }
+ /* Get addrinfo struct for local interface. */
+ err = getaddrinfo(config_servername, NULL, &hints, &res1);
+ if(err) {
+ syslog(LOG_ERR, "getaddrinfo(%s) failed: %s",
+ config_servername, gai_strerror(err));
+ }
+ }
+
+ /* Setup timeout */
+ timedout = 0;
+ action.sa_flags = 0;
+ action.sa_handler = timed_out;
+ if(sigaction(SIGALRM, &action, NULL) < 0)
+ {
+ syslog(LOG_ERR, "Setting timeout in backend_connect failed: sigaction: %m");
+ /* continue anyway */
+ }
+
+ for (res = res0; res; res = res->ai_next) {
+ sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+ if (sock < 0)
+ continue;
+ /* Bind to local interface. */
+ if (!err) {
+ if (bind(sock, res1->ai_addr, res1->ai_addrlen) < 0) {
+ struct sockaddr_in *local_sockaddr = (struct sockaddr_in *) res1->ai_addr;
+ syslog(LOG_ERR, "failed to bind to address %s: %s",
+ inet_ntoa(local_sockaddr->sin_addr), strerror(errno));
+ }
+ freeaddrinfo(res1);
+ }
+ alarm(config_getint(IMAPOPT_CLIENT_TIMEOUT));
+ if (connect(sock, res->ai_addr, res->ai_addrlen) >= 0)
+ break;
+ if(errno == EINTR && timedout == 1)
+ errno = ETIMEDOUT;
+ close(sock);
+ sock = -1;
+ }
+
+ /* Remove timeout code */
+ alarm(0);
+ signal(SIGALRM, SIG_IGN);
+
+ if (sock < 0) {
+ if (res0 != &hints)
+ freeaddrinfo(res0);
+ syslog(LOG_ERR, "connect(%s) failed: %m", server);
+ if (!ret_backend) free(ret);
+ return NULL;
+ }
+ memcpy(&ret->addr, res->ai_addr, res->ai_addrlen);
+ if (res0 != &hints)
+ freeaddrinfo(res0);
+
+ ret->in = prot_new(sock, 0);
+ ret->out = prot_new(sock, 1);
+ ret->sock = sock;
+ prot_setflushonread(ret->in, ret->out);
+ ret->prot = prot;
+
+ if (!prot->banner.is_capa) {
+ do { /* read the initial greeting */
+ if (!prot_fgets(buf, sizeof(buf), ret->in)) {
+ syslog(LOG_ERR,
+ "backend_connect(): couldn't read initial greeting: %s",
+ ret->in->error ? ret->in->error : "(null)");
+ if (!ret_backend) free(ret);
+ close(sock);
+ return NULL;
+ }
+ } while (strncasecmp(buf, prot->banner.resp,
+ strlen(prot->banner.resp)));
+ }
+
+ /* get the capabilities */
+ mechlist = ask_capability(ret->out, ret->in, prot, &ret->capability,
+ prot->banner.is_capa);
+
+ /* now need to authenticate to backend server,
+ unless we're doing LMTP on a UNIX socket (deliver) */
+ if ((server[0] != '/') || strcmp(prot->sasl_service, "lmtp")) {
+ if ((r = backend_authenticate(ret, prot, &mechlist, userid,
+ cb, auth_status))) {
+ syslog(LOG_ERR, "couldn't authenticate to backend server: %s",
+ sasl_errstring(r, NULL, NULL));
+ if (!ret_backend) free(ret);
+ close(sock);
+ ret = NULL;
+ }
+ }
+
+ if (mechlist) free(mechlist);
+
+ if (!ret_backend) ret_backend = ret;
+
+ return ret;
+}
+
+int backend_ping(struct backend *s)
+{
+ char buf[1024];
+
+ if (!s || !s->prot->ping_cmd.cmd) return 0;
+ if (!s->sock == -1) return -1; /* Disconnected Socket */
+
+ prot_printf(s->out, "%s\r\n", s->prot->ping_cmd.cmd);
+ prot_flush(s->out);
+
+ for (;;) {
+ if (!prot_fgets(buf, sizeof(buf), s->in)) {
+ /* connection closed? */
+ return -1;
+ } else if (s->prot->ping_cmd.unsol &&
+ !strncmp(s->prot->ping_cmd.unsol, buf,
+ strlen(s->prot->ping_cmd.unsol))) {
+ /* unsolicited response */
+ continue;
+ } else {
+ /* success/fail response */
+ return strncmp(s->prot->ping_cmd.ok, buf,
+ strlen(s->prot->ping_cmd.ok));
+ }
+ }
+}
+
+void backend_disconnect(struct backend *s)
+{
+ char buf[1024];
+
+ if (!s || s->sock == -1) return;
+
+ if (!prot_error(s->in)) {
+ if (s->prot->logout_cmd.cmd) {
+ prot_printf(s->out, "%s\r\n", s->prot->logout_cmd.cmd);
+ prot_flush(s->out);
+
+ for (;;) {
+ if (!prot_fgets(buf, sizeof(buf), s->in)) {
+ /* connection closed? */
+ break;
+ } else if (s->prot->logout_cmd.unsol &&
+ !strncmp(s->prot->logout_cmd.unsol, buf,
+ strlen(s->prot->logout_cmd.unsol))) {
+ /* unsolicited response */
+ continue;
+ } else {
+ /* success/fail response -- don't care either way */
+ break;
+ }
+ }
+ }
+ }
+
+ /* Flush the incoming buffer */
+ prot_NONBLOCK(s->in);
+ prot_fill(s->in);
+
+#ifdef HAVE_SSL
+ /* Free tlsconn */
+ if (s->tlsconn) {
+ tls_reset_servertls(&s->tlsconn);
+ s->tlsconn = NULL;
+ }
+#endif /* HAVE_SSL */
+
+ /* close/free socket & prot layer */
+ cyrus_close_sock(s->sock);
+ s->sock = -1;
+
+ prot_free(s->in);
+ prot_free(s->out);
+ s->in = s->out = NULL;
+
+ /* Free saslconn */
+ if(s->saslconn) {
+ sasl_dispose(&(s->saslconn));
+ s->saslconn = NULL;
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/backend.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,94 @@
+/* backend.h -- IMAP server proxy for Cyrus Murder
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: backend.h,v 1.7.2.7 2006/01/17 20:15:20 murch Exp $ */
+
+#ifndef _INCLUDED_BACKEND_H
+#define _INCLUDED_BACKEND_H
+
+#include "global.h"
+#include "mboxlist.h"
+#include "prot.h"
+#include "protocol.h"
+#include "tls.h"
+
+/* Functionality to bring up/down connections to backend servers */
+
+struct backend {
+ char hostname[MAX_PARTITION_LEN];
+ struct sockaddr_storage addr;
+ int sock;
+
+ /* protocol we're speaking */
+ struct protocol_t *prot;
+
+ /* service-specific context */
+ void *context;
+
+ /* only used by imapd and nntpd */
+ struct protstream *clientin; /* input stream from client to proxy */
+ struct backend **current, **inbox; /* pointers to current/inbox be ptrs */
+ struct prot_waitevent *timeout; /* event for idle timeout */
+
+ sasl_conn_t *saslconn;
+#ifdef HAVE_SSL
+ SSL *tlsconn;
+ SSL_SESSION *tlssess;
+#endif /* HAVE_SSL */
+
+ unsigned long capability;
+
+ struct buf last_result;
+ struct protstream *in; /* from the be server to me, the proxy */
+ struct protstream *out; /* to the be server */
+};
+
+/* if cache is NULL, returns a new struct backend, otherwise returns
+ * cache on success (and returns NULL on failure, but leaves cache alone) */
+struct backend *backend_connect(struct backend *cache, const char *server,
+ struct protocol_t *prot, const char *userid,
+ sasl_callback_t *cb, const char **auth_status);
+int backend_ping(struct backend *s);
+void backend_disconnect(struct backend *s);
+
+#define CAPA(s, c) ((s)->capability & (c))
+
+#endif /* _INCLUDED_BACKEND_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/chk_cyrus.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/chk_cyrus.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/chk_cyrus.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/chk_cyrus.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,253 @@
+/* chk_cyrus.c: cyrus mailstore consistancy checker
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * $Id: chk_cyrus.c,v 1.11.2.6 2004/08/05 16:23:30 ken3 Exp $
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <syslog.h>
+#include <errno.h>
+#include <ctype.h>
+#include <limits.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "exitcodes.h"
+#include "index.h"
+#include "global.h"
+#include "mboxlist.h"
+#include "mailbox.h"
+#include "map.h"
+#include "xmalloc.h"
+
+/* config.c stuff */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+/* need to use these names so the macros are happy */
+static const char *index_base;
+static unsigned long index_len;
+static unsigned long start_offset;
+static unsigned long record_size;
+
+void usage(void)
+{
+ fprintf(stderr, "chk_cyrus [-C <altconfig>] partition\n");
+ exit(-1);
+}
+
+const char *check_part = NULL; /* partition we are checking */
+
+static int chkmbox(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock __attribute__((unused)))
+{
+ int r;
+ char *part, *path, *mpath;
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ unsigned long real_len;
+ int fd=-1;
+ int i,exists;
+ struct stat sbuf;
+
+ index_base = NULL;
+
+ /* Do an mboxlist_detail on the mailbox */
+ r = mboxlist_detail(name, NULL, &path, &mpath, &part, NULL, NULL);
+
+ /* xxx reserved mailboxes? */
+
+ if(r) {
+ fprintf(stderr, "bad mailbox %s in chkmbox\n", name);
+ fatal("fatal error",EC_TEMPFAIL);
+ }
+
+ /* are we on the partition we are checking? */
+ if(check_part && strcmp(part,check_part)) goto done;
+
+ fprintf(stderr, "checking: %s (%s)\n", name, path);
+
+ if(chdir(path) == -1) {
+ fprintf(stderr, "can't chdir to %s\n", path);
+ /* whole mailbox! */
+ printf("%s\n",path);
+ goto done;
+ }
+
+ if (mpath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_INDEX))
+ strlcpy(fnamebuf, mpath, sizeof(fnamebuf));
+ else
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+ fd = open(fnamebuf, O_RDONLY, 0666);
+ if(fd == -1) {
+ fprintf(stderr, "can't open cyrus.index\n");
+ /* whole mailbox! */
+ printf("%s\n", fnamebuf);
+ goto done;
+ }
+
+ if(fstat(fd, &sbuf) == -1) {
+ fprintf(stderr, "can't stat cyrus.index\n");
+ /* whole mailbox! */
+ printf("%s\n", fnamebuf);
+ goto done;
+ }
+
+ index_len = sbuf.st_size;
+ real_len = 0;
+ map_refresh(fd, 1, &index_base, &real_len, index_len,
+ "cyrus.index", name);
+
+ if(!index_base) {
+ fprintf(stderr, "mmap failed\n");
+ exit(3);
+ }
+
+ /* xxx index file versions */
+
+ exists = ntohl(*((bit32 *)(index_base + OFFSET_EXISTS)));
+ start_offset =
+ ntohl(*((bit32 *)(index_base+OFFSET_START_OFFSET)));
+ record_size =
+ ntohl(*((bit32 *)(index_base+OFFSET_RECORD_SIZE)));
+
+ fprintf(stderr, " -> %d records\n", exists);
+
+ if(real_len < (exists * record_size + start_offset)) {
+ fprintf(stderr, " -> Oversized Exists Value %d\n", exists);
+ printf("%s\n",path);
+ fflush(stdout);
+ } else {
+ for(i=1;i<=exists;i++) {
+ char filebuf[1024];
+
+ /* xxx check for monotonic increasing UIDs in the index file */
+ /* xxx check for nonnegative UIDs in the index file */
+
+ snprintf(filebuf, sizeof(filebuf), "%s/%d.", path, UID(i));
+ if(stat(filebuf, &sbuf) == -1) {
+ fprintf(stderr, " -> %s missing\n", filebuf);
+ printf("%s\n",filebuf);
+ fflush(stdout);
+ }
+ }
+ }
+
+ done:
+ if(index_base) map_free(&index_base, &real_len);
+ if(fd != -1) close(fd);
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ char *alt_config = NULL;
+ char pattern[2] = { '*', '\0' };
+ const char *mailbox = NULL;
+
+ extern char *optarg;
+ int opt;
+
+ while ((opt = getopt(argc, argv, "C:P:M:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'P':
+ if(mailbox) {
+ usage();
+ exit(EC_USAGE);
+ }
+ check_part = optarg;
+ break;
+
+ case 'M':
+ if(check_part) {
+ usage();
+ exit(EC_USAGE);
+ }
+ mailbox = optarg;
+ break;
+
+ default:
+ usage();
+ /* NOTREACHED */
+ }
+ }
+
+ cyrus_init(alt_config, "chk_cyrus", 0);
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ if(mailbox) {
+ fprintf(stderr, "Examining mailbox: %s\n", mailbox);
+ chkmbox((char *)mailbox,0,0,NULL);
+ } else {
+ fprintf(stderr, "Examining partition: %s\n",
+ (check_part ? check_part : "ALL PARTITIONS"));
+
+ /* build a list of mailboxes - we're using internal names here */
+ mboxlist_findall(NULL, pattern, 1, NULL,
+ NULL, chkmbox, NULL);
+ }
+
+ mboxlist_close();
+ mboxlist_done();
+
+ cyrus_done();
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cli_fatal.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cli_fatal.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cli_fatal.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cli_fatal.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+/* cli_fatal.c -- Provide a generic fatal() for the command line utilities
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: cli_fatal.c,v 1.2.2.1 2004/01/31 18:56:54 ken3 Exp $
+ */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "global.h"
+#include "xmalloc.h"
+
+/* generic printstring() implementation for command line utilities */
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for utilities!",
+ EC_SOFTWARE);
+}
+
+/* generic fatal() routine for command line utilities */
+void fatal(const char *message, int code)
+{
+ static int recurse_code = 0;
+
+ if (recurse_code) {
+ exit(code);
+ }
+
+ recurse_code = code;
+ fprintf(stderr, "fatal error: %s\n", message);
+ cyrus_done();
+ exit(code);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,77 @@
+/* convert_code.c: Convert IMAP_* error to exitcodes.h exit status
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * $Id: convert_code.c,v 1.7 2003/02/13 20:15:23 rjs3 Exp $ */
+
+/* Same old convert_code function moved into one place instead of being
+ * redundant in every file.
+ * tjs 23-jul-1998
+ */
+
+#include <config.h>
+
+#include "imap_err.h"
+#include "exitcodes.h"
+
+int convert_code(int r)
+{
+ switch (r) {
+ case 0:
+ return 0;
+
+ case IMAP_IOERROR:
+ return EC_IOERR;
+
+ case IMAP_PERMISSION_DENIED:
+ return EC_NOPERM;
+
+ case IMAP_QUOTA_EXCEEDED:
+ return EC_TEMPFAIL;
+
+ case IMAP_MAILBOX_NOTSUPPORTED:
+ return EC_DATAERR;
+
+ case IMAP_MAILBOX_NONEXISTENT:
+ return EC_UNAVAILABLE;
+ }
+
+ /* Some error we're not expecting. */
+ return EC_SOFTWARE;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/convert_code.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+/* convert_code.h
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+
+ */
+
+/* $Id: convert_code.h,v 1.6 2003/10/22 18:50:07 rjs3 Exp $ */
+
+#ifndef CONVERT_CODE_H
+#define CONVERT_CODE_H
+
+
+int convert_code(int r);
+
+#endif /* CONVERT_CODE_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_cyrusdb.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_cyrusdb.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_cyrusdb.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_cyrusdb.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,341 @@
+/* ctl_cyrusdb.c -- Program to perform operations common to all cyrus DBs
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: ctl_cyrusdb.c,v 1.18.2.7 2005/02/16 21:06:18 shadow Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <errno.h>
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+
+#include "annotate.h"
+#include "cyrusdb.h"
+#include "duplicate.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "libcyr_cfg.h"
+#include "mboxlist.h"
+#include "seen.h"
+#include "tls.h"
+#include "util.h"
+#include "xmalloc.h"
+
+#define N(a) (sizeof(a) / sizeof(a[0]))
+
+/* config.c stuff */
+const int config_need_data = 0;
+
+struct cyrusdb {
+ const char *name;
+ struct cyrusdb_backend **env;
+ int archive;
+} dblist[] = {
+ { FNAME_MBOXLIST, &config_mboxlist_db, 1 },
+ { FNAME_QUOTADB, &config_quota_db, 1 },
+ { FNAME_ANNOTATIONS, &config_annotation_db, 1 },
+ { FNAME_DELIVERDB, &config_duplicate_db, 0 },
+ { FNAME_TLSSESSIONS, &config_tlscache_db, 0 },
+ { FNAME_PTSDB, &config_ptscache_db, 0 },
+ { NULL, NULL, 0 }
+};
+
+static int compdb(const void *v1, const void *v2)
+{
+ struct cyrusdb *db1 = (struct cyrusdb *) v1;
+ struct cyrusdb *db2 = (struct cyrusdb *) v2;
+
+ return (db1->env - db2->env);
+}
+
+void usage(void)
+{
+ fprintf(stderr, "ctl_cyrusdb [-C <altconfig>] -c\n");
+ fprintf(stderr, "ctl_cyrusdb [-C <altconfig>] -r [-x]\n");
+ exit(-1);
+}
+
+/* Callback for use by recover_reserved */
+static int fixmbox(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock __attribute__((unused)))
+{
+ int mbtype;
+ int r;
+
+ /* Do an mboxlist_detail on the mailbox */
+ r = mboxlist_detail(name, &mbtype, NULL, NULL, NULL, NULL, NULL);
+
+ /* if it is MBTYPE_RESERVED, unset it & call mboxlist_delete */
+ if(!r && (mbtype & MBTYPE_RESERVE)) {
+ if(!r) {
+ r = mboxlist_deletemailbox(name, 1, NULL, NULL, 0, 0, 1);
+ if(r) {
+ /* log the error */
+ syslog(LOG_ERR,
+ "could not remove reserved mailbox '%s': %s",
+ name, error_message(r));
+ } else {
+ syslog(LOG_ERR,
+ "removed reserved mailbox '%s'",
+ name);
+ }
+ }
+ }
+
+ return 0;
+}
+void recover_reserved()
+{
+ char pattern[2] = { '*', '\0' };
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* Need annotations.db for mboxlist_deletemailbox() */
+ annotatemore_init(0, NULL, NULL);
+ annotatemore_open(NULL);
+
+ /* build a list of mailboxes - we're using internal names here */
+ mboxlist_findall(NULL, pattern, 1, NULL,
+ NULL, fixmbox, NULL);
+
+ annotatemore_close();
+ annotatemore_done();
+
+ mboxlist_close();
+ mboxlist_done();
+}
+
+
+int main(int argc, char *argv[])
+{
+ extern char *optarg;
+ int opt, r, r2;
+ char *alt_config = NULL;
+ int reserve_flag = 1;
+ enum { RECOVER, CHECKPOINT, NONE } op = NONE;
+ char dirname[1024], backup1[1024], backup2[1024];
+ char *archive_files[N(dblist)];
+ char *msg = "";
+ int i, j, rotated = 0;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+ r = r2 = 0;
+
+ while ((opt = getopt(argc, argv, "C:rxc")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'r':
+ libcyrus_config_setint(CYRUSOPT_DB_INIT_FLAGS, CYRUSDB_RECOVER);
+ msg = "recovering cyrus databases";
+ if (op == NONE) op = RECOVER;
+ else usage();
+ break;
+
+ case 'c':
+ msg = "checkpointing cyrus databases";
+ if (op == NONE) op = CHECKPOINT;
+ else usage();
+ break;
+
+ case 'x':
+ reserve_flag = 0;
+ break;
+
+ default:
+ usage();
+ break;
+ }
+ }
+
+ if (op == NONE || (op != RECOVER && !reserve_flag)) {
+ usage();
+ /* NOTREACHED */
+ }
+
+ cyrus_init(alt_config, "ctl_cyrusdb", 0);
+
+ /* create the name of the db directory */
+ /* (used by backup directory names) */
+ strcpy(dirname, config_dir);
+ strcat(dirname, FNAME_DBDIR);
+
+ /* create the names of the backup directories */
+ strcpy(backup1, dirname);
+ strcat(backup1, ".backup1");
+ strcpy(backup2, dirname);
+ strcat(backup2, ".backup2");
+
+ syslog(LOG_NOTICE, "%s", msg);
+
+ /* sort dbenvs */
+ qsort(dblist, N(dblist)-1, sizeof(struct cyrusdb), &compdb);
+
+ memset(archive_files, 0, N(dblist) * sizeof(char*));
+ for (i = 0, j = 0; dblist[i].name != NULL; i++) {
+
+ /* if we need to archive this db, add it to the list */
+ if (dblist[i].archive) {
+ archive_files[j] = (char*) xmalloc(strlen(config_dir) +
+ strlen(dblist[i].name) + 1);
+ strcpy(archive_files[j], config_dir);
+ strcat(archive_files[j++], dblist[i].name);
+ }
+
+ /* deal with each dbenv once */
+ if (dblist[i].env == dblist[i+1].env) continue;
+
+ r = r2 = 0;
+ switch (op) {
+ case RECOVER:
+ break;
+
+ case CHECKPOINT:
+ r2 = (*(dblist[i].env))->sync();
+ if (r2) {
+ syslog(LOG_ERR, "DBERROR: sync %s: %s", dirname,
+ cyrusdb_strerror(r2));
+ fprintf(stderr,
+ "ctl_cyrusdb: unable to sync environment\n");
+ }
+
+ /* ARCHIVE */
+ r2 = 0;
+
+ if (!rotated) {
+ /* rotate the backup directories -- ONE time only */
+ char *tail;
+ DIR *dirp;
+ struct dirent *dirent;
+
+ tail = backup2 + strlen(backup2);
+
+ /* remove db.backup2 */
+ dirp = opendir(backup2);
+ strcat(tail++, "/");
+
+ if (dirp) {
+ while ((dirent = readdir(dirp)) != NULL) {
+ if (dirent->d_name[0] == '.') continue;
+
+ strcpy(tail, dirent->d_name);
+ unlink(backup2);
+ }
+
+ closedir(dirp);
+ }
+ tail[-1] = '\0';
+ r2 = rmdir(backup2);
+
+ /* move db.backup1 to db.backup2 */
+ if (r2 == 0 || errno == ENOENT)
+ r2 = rename(backup1, backup2);
+
+ /* make a new db.backup1 */
+ if (r2 == 0 || errno == ENOENT)
+ r2 = mkdir(backup1, 0755);
+
+ rotated = 1;
+ }
+
+ /* do the archive */
+ if (r2 == 0)
+ r2 = (*(dblist[i].env))->archive((const char**) archive_files,
+ backup1);
+
+ if (r2) {
+ syslog(LOG_ERR, "DBERROR: archive %s: %s", dirname,
+ cyrusdb_strerror(r2));
+ fprintf(stderr,
+ "ctl_cyrusdb: unable to archive environment\n");
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ /* free the archive_list */
+ while (j > 0) {
+ free(archive_files[--j]);
+ archive_files[j] = NULL;
+ }
+ }
+
+ if(op == RECOVER && reserve_flag)
+ recover_reserved();
+
+ cyrus_done();
+
+ syslog(LOG_NOTICE, "done %s", msg);
+ exit(r || r2);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_deliver.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_deliver.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_deliver.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_deliver.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,162 @@
+/* ctl_deliver.c -- Program to perform operations on duplicate delivery db
+ * $Id: ctl_deliver.c,v 1.18.2.2 2004/05/25 01:28:02 ken3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <errno.h>
+#include <signal.h>
+
+#include "cyrusdb.h"
+#include "duplicate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "libcyr_cfg.h"
+#include "util.h"
+#include "xmalloc.h"
+
+/* global state */
+const int config_need_data = 0;
+
+void usage(void)
+{
+ fprintf(stderr,
+ "ctl_deliver [-C <altconfig>] -d [-f <dbfile>]\n");
+ exit(-1);
+}
+
+int main(int argc, char *argv[])
+{
+ extern char *optarg;
+ int opt, r = 0;
+ char *alt_file = NULL;
+ char *alt_config = NULL;
+ char *days = NULL;
+ int flag = 0;
+ enum { DUMP, PRUNE, NONE } op = NONE;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:drE:f:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'd':
+ if (op == NONE) op = DUMP;
+ else usage();
+ break;
+
+ case 'f':
+ if (alt_file == NULL) alt_file = optarg;
+ else usage ();
+ break;
+
+ case 'E':
+ if (op == NONE) op = PRUNE;
+ else usage();
+ /* deprecated, but we still support it */
+ days = optarg;
+ break;
+
+ default:
+ usage();
+ break;
+ }
+ }
+
+ switch (op) {
+ case PRUNE: {
+ char buf[4096];
+
+ fprintf(stderr, "ctl_deliver -E is deprecated: "
+ "using cyr_expire -E instead\n");
+
+ r = snprintf(buf, sizeof(buf), "%s/cyr_expire", SERVICE_PATH);
+ if(r < 0 || r >= sizeof(buf)) {
+ fatal("cyr_expire command buffer not sufficiently big", EC_CONFIG);
+ }
+
+ if (alt_config)
+ execl(buf, buf, "-C", alt_config, "-E", days, NULL);
+ else
+ execl(buf, buf, "-E", days, NULL);
+
+ break;
+ }
+
+ case DUMP:
+ cyrus_init(alt_config, "ctl_deliver", 0);
+
+ if (duplicate_init(alt_file, flag) != 0) {
+ fprintf(stderr,
+ "ctl_deliver: unable to init duplicate delivery database\n");
+ exit(1);
+ }
+
+ printf("it is NOW: %d\n", (int) time(NULL));
+ printf("got %d entries\n", duplicate_dump(stdout));
+
+ r = 0;
+
+ duplicate_done();
+ cyrus_done();
+ break;
+
+ case NONE:
+ r = 2;
+ usage();
+ break;
+ }
+
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_mboxlist.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_mboxlist.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_mboxlist.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ctl_mboxlist.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,745 @@
+/* ctl_mboxlist.c -- do DB related operations on mboxlist
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: ctl_mboxlist.c,v 1.43.2.7 2006/04/06 15:42:10 murch Exp $ */
+
+/* currently doesn't catch signals; probably SHOULD */
+
+#include <config.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <syslog.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sasl/sasl.h>
+
+#include "assert.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "global.h"
+#include "libcyr_cfg.h"
+#include "mboxlist.h"
+#include "mupdate.h"
+#include "xmalloc.h"
+
+/* config.c stuff */
+const int config_need_data = 0;
+
+extern int optind;
+extern char *optarg;
+
+const int PER_COMMIT = 1000;
+
+enum mboxop { DUMP,
+ M_POPULATE,
+ RECOVER,
+ CHECKPOINT,
+ UNDUMP,
+ NONE };
+
+struct dumprock {
+ enum mboxop op;
+
+ struct txn *tid;
+
+ const char *partition;
+ int purge;
+
+ mupdate_handle *h;
+};
+
+struct mb_node
+{
+ char mailbox[MAX_MAILBOX_NAME+1];
+ char server[MAX_MAILBOX_NAME+1];
+ char *acl;
+ struct mb_node *next;
+};
+
+static struct mb_node *act_head = NULL, **act_tail = &act_head;
+static struct mb_node *del_head = NULL;
+static struct mb_node *wipe_head = NULL, *unflag_head = NULL;
+
+/* assume the local copy is authoritative and that it should just overwrite
+ * mupdate */
+static int local_authoritative = 0;
+static int warn_only = 0;
+
+/* For each mailbox that this guy gets called for, check that
+ * it is a mailbox that:
+ * a) mupdate server thinks *we* host
+ * -> Because we were called, this is the case, provided we
+ * -> gave the prefix parameter to the remote.
+ * b) we do not actually host
+ *
+ * if that's the case, enqueue a delete
+ * otherwise, we both agree that it exists, but we still need
+ * to verify that its info is up to date.
+ */
+static int mupdate_list_cb(struct mupdate_mailboxdata *mdata,
+ const char *cmd,
+ void *context __attribute__((unused)))
+{
+ int ret;
+
+ /* the server thinks we have it, do we think we have it? */
+ ret = mboxlist_lookup(mdata->mailbox, NULL, NULL);
+ if(ret) {
+ struct mb_node *next;
+
+ next = xzmalloc(sizeof(struct mb_node));
+ strlcpy(next->mailbox, mdata->mailbox, sizeof(next->mailbox));
+
+ next->next = del_head;
+ del_head = next;
+ } else {
+ /* we both agree that it exists */
+ /* throw it onto the back of the activate queue */
+ /* we may or may not need to send an update */
+ struct mb_node *next;
+
+ next = xzmalloc(sizeof(struct mb_node));
+ strlcpy(next->mailbox, mdata->mailbox, sizeof(next->mailbox));
+ strlcpy(next->server, mdata->server, sizeof(next->server));
+ if(!strncmp(cmd, "MAILBOX", 7))
+ next->acl = xstrdup(mdata->acl);
+
+ *act_tail = next;
+ act_tail = &(next->next);
+ }
+ return 0;
+}
+
+static int dump_cb(void *rockp,
+ const char *key, int keylen,
+ const char *data, int datalen)
+{
+ struct dumprock *d = (struct dumprock *) rockp;
+ int r;
+ char *p;
+ char *name, *part, *acl;
+ int mbtype;
+
+ /* \0 terminate 'name' */
+ name = xstrndup(key, keylen);
+
+ /* Get mailbox type */
+ mbtype = strtol(data, &p, 10);
+
+ p = strchr(data, ' ');
+ if (p == NULL) {
+ abort();
+ }
+ p++;
+ acl = strchr(p, ' ');
+ if (acl == NULL) {
+ abort();
+ }
+ /* grab 'part', \0 terminate */
+ part = xstrndup(p, acl - p);
+
+ /* \0 terminate 'acl' */
+ p = acl + 1;
+ acl = xstrndup(p, datalen - (p - data));
+
+ switch (d->op) {
+ case DUMP:
+ if(!d->partition || !strcmp(d->partition, part)) {
+ printf("%s\t%d %s\t%s\n", name, mbtype, part, acl);
+ if(d->purge) {
+ config_mboxlist_db->delete(mbdb, key, keylen, &(d->tid), 0);
+ }
+ }
+ break;
+ case M_POPULATE:
+ {
+ char *realpart = xmalloc(strlen(config_servername) + 1
+ + strlen(part) + 1);
+ int skip_flag;
+
+ /* If it is marked MBTYPE_MOVING, and it DOES match the entry,
+ * we need to unmark it. If it does not match the entry in our
+ * list, then we assume that it successfully made the move and
+ * we delete it from the local disk */
+
+ /* realpart is 'hostname!partition' */
+ sprintf(realpart, "%s!%s", config_servername, part);
+
+ /* If they match, then we should check that we actually need
+ * to update it. If they *don't* match, then we believe that we
+ * need to send fresh data. There will be no point at which something
+ * is in the act_head list that we do not have locally, because that
+ * is a condition of being in the act_head list */
+ if(act_head && !strcmp(name, act_head->mailbox)) {
+ struct mb_node *tmp;
+
+ /* If this mailbox was moving, we want to unmark the movingness,
+ * since the MUPDATE server agreed that it lives here. */
+ /* (and later also force an mupdate push) */
+ if(mbtype & MBTYPE_MOVING) {
+ struct mb_node *next;
+
+ if(warn_only) {
+ printf("Remove remote flag on: %s\n", name);
+ } else {
+ next = xzmalloc(sizeof(struct mb_node));
+ strlcpy(next->mailbox, name, sizeof(next->mailbox));
+ next->next = unflag_head;
+ unflag_head = next;
+ }
+
+ /* No need to update mupdate NOW, we'll get it when we
+ * untag the mailbox */
+ skip_flag = 1;
+ } else if(act_head->acl &&
+ !strcmp(realpart, act_head->server) &&
+ !strcmp(acl, act_head->acl)) {
+ /* Do not update if location does match, and there is an acl,
+ * and the acl matches */
+
+ skip_flag = 1;
+ } else {
+ skip_flag = 0;
+ }
+
+ /* in any case, free the node. */
+ if(act_head->acl) free(act_head->acl);
+ tmp = act_head;
+ act_head = act_head->next;
+ free(tmp);
+ } else {
+ /* if they do not match, do an explicit MUPDATE find on the
+ * mailbox, and if it is living somewhere else, delete the local
+ * data, if it is NOT living somewhere else, recreate it in
+ * mupdate */
+ struct mupdate_mailboxdata *unused_mbdata;
+
+ /* if this is okay, we found it (so it is on another host, since
+ * it wasn't in our list in this position) */
+ if(!local_authoritative &&
+ !mupdate_find(d->h, name, &unused_mbdata)) {
+ /* since it lives on another server, schedule it for a wipe */
+ struct mb_node *next;
+
+ if(warn_only) {
+ printf("Remove Local Mailbox: %s\n", name);
+ } else {
+ next = xzmalloc(sizeof(struct mb_node));
+ strlcpy(next->mailbox, name, sizeof(next->mailbox));
+ next->next = wipe_head;
+ wipe_head = next;
+ }
+
+ skip_flag = 1;
+ } else {
+ /* Check that it isn't flagged moving */
+ if(mbtype & MBTYPE_MOVING) {
+ /* it's flagged moving, we'll fix it later (and
+ * push it then too) */
+ struct mb_node *next;
+
+ if(warn_only) {
+ printf("Remove remote flag on: %s\n", name);
+ } else {
+ next = xzmalloc(sizeof(struct mb_node));
+ strlcpy(next->mailbox, name, sizeof(next->mailbox));
+ next->next = unflag_head;
+ unflag_head = next;
+ }
+
+ /* No need to update mupdate now, we'll get it when we
+ * untag the mailbox */
+ skip_flag = 1;
+ } else {
+ /* we should just push the change to mupdate now */
+ skip_flag = 0;
+ }
+ }
+ }
+
+ if(skip_flag) {
+ free(realpart);
+ break;
+ }
+ if(warn_only) {
+ printf("Force Activate: %s\n", name);
+ free(realpart);
+ break;
+ }
+ r = mupdate_activate(d->h,name,realpart,acl);
+
+ free(realpart);
+
+ if(r == MUPDATE_NOCONN) {
+ fprintf(stderr, "permanant failure storing '%s'\n", name);
+ return IMAP_IOERROR;
+ } else if (r == MUPDATE_FAIL) {
+ fprintf(stderr,
+ "temporary failure storing '%s' (update continuing)",
+ name);
+ }
+
+ break;
+ }
+
+ default: /* yikes ! */
+ abort();
+ break;
+ }
+
+ free(name);
+ free(part);
+ free(acl);
+
+ return 0;
+}
+
+/* Resyncing with mupdate:
+ *
+ * If it is local and not present on mupdate at all, push to mupdate.
+ * If it is local and present on mupdate for another host, delete local mailbox
+ * If it is local and present on mupdate but with incorrect partition/acl,
+ * update mupdate.
+ * If it is not local and present on mupdate for this host, delete it from
+ * mupdate.
+ */
+
+void do_dump(enum mboxop op, const char *part, int purge)
+{
+ struct dumprock d;
+ int ret;
+ char buf[8192];
+
+ assert(op == DUMP || op == M_POPULATE);
+ assert(op == DUMP || !purge);
+ assert(op == DUMP || !part);
+
+ d.op = op;
+ d.partition = part;
+ d.purge = purge;
+ d.tid = NULL;
+
+ if(op == M_POPULATE) {
+ ret = mupdate_connect(NULL, NULL, &(d.h), NULL);
+ if(ret) {
+ fprintf(stderr, "couldn't connect to mupdate server\n");
+ exit(1);
+ }
+
+ /* now we need a list of what the remote thinks we have
+ * To generate it, ask for a prefix of '<our hostname>!',
+ * (to ensure we get exactly our hostname) */
+ snprintf(buf, sizeof(buf), "%s!", config_servername);
+ ret = mupdate_list(d.h, mupdate_list_cb, buf, NULL);
+ if(ret) {
+ fprintf(stderr, "couldn't do LIST command on mupdate server\n");
+ exit(1);
+ }
+
+ /* Run pending mupdate deletes */
+ while(del_head) {
+ struct mb_node *me = del_head;
+ del_head = del_head->next;
+
+ if(warn_only) {
+ printf("Remove from MUPDATE: %s\n", me->mailbox);
+ } else {
+ ret = mupdate_delete(d.h, me->mailbox);
+ if(ret) {
+ fprintf(stderr,
+ "couldn't mupdate delete %s\n", me->mailbox);
+ exit(1);
+ }
+ }
+
+ free(me);
+ }
+ }
+
+ /* Dump Database */
+ config_mboxlist_db->foreach(mbdb, "", 0, NULL, &dump_cb, &d, NULL);
+
+ if(d.tid) {
+ config_mboxlist_db->commit(mbdb, d.tid);
+ d.tid = NULL;
+ }
+
+ if(op == M_POPULATE) {
+ /* Remove MBTYPE_MOVING flags (unflag_head) */
+ while(unflag_head) {
+ struct mb_node *me = unflag_head;
+ int type;
+ char *part, *acl, *newpart;
+
+ unflag_head = unflag_head->next;
+
+ ret = mboxlist_detail(me->mailbox, &type, NULL, NULL,
+ &part, &acl, NULL);
+ if(ret) {
+ fprintf(stderr,
+ "couldn't perform lookup to un-remote-flag %s\n",
+ me->mailbox);
+ exit(1);
+ }
+
+ /* Reset the partition! */
+ newpart = strchr(part, '!');
+ if(!newpart) newpart = part;
+ else newpart++;
+
+ ret = mboxlist_update(me->mailbox, type & ~MBTYPE_MOVING,
+ newpart, acl, 1);
+ if(ret) {
+ fprintf(stderr,
+ "couldn't perform update to un-remote-flag %s\n",
+ me->mailbox);
+ exit(1);
+ }
+
+ /* force a push to mupdate */
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, part);
+ ret = mupdate_activate(d.h, me->mailbox, buf, acl);
+ if(ret) {
+ fprintf(stderr,
+ "couldn't perform mupdatepush to un-remote-flag %s\n",
+ me->mailbox);
+ exit(1);
+ }
+
+ free(me);
+ }
+
+ /* Delete local mailboxes where needed (wipe_head) */
+ while(wipe_head) {
+ struct mb_node *me = wipe_head;
+
+ wipe_head = wipe_head->next;
+
+ ret = mboxlist_deletemailbox(me->mailbox, 1, "", NULL, 0, 1, 1);
+ if(ret) {
+ fprintf(stderr, "couldn't delete defunct mailbox %s\n",
+ me->mailbox);
+ exit(1);
+ }
+
+ free(me);
+ }
+
+ /* Done with mupdate */
+ mupdate_disconnect(&(d.h));
+ sasl_done();
+ }
+
+ return;
+}
+
+void do_undump(void)
+{
+ int r = 0;
+ char buf[16384];
+ int line = 0;
+ char last_commit[MAX_MAILBOX_NAME];
+ char *key=NULL, *data=NULL;
+ int keylen, datalen;
+ int untilCommit = PER_COMMIT;
+ struct txn *tid = NULL;
+
+ last_commit[0] = '\0';
+
+ while (fgets(buf, sizeof(buf), stdin)) {
+ char *name, *partition, *acl;
+ char *p;
+ int mbtype = 0, tries = 0;
+
+ line++;
+
+ name = buf;
+ for (p = buf; *p && *p != '\t'; p++) ;
+ if (!*p) {
+ fprintf(stderr, "line %d: no partition found\n", line);
+ continue;
+ }
+ *p++ = '\0';
+ if (isdigit((int) *p)) {
+ /* new style dump */
+ mbtype = strtol(p, &p, 10);
+ /* skip trailing space */
+ if (*p == ' ') p++;
+ }
+ partition = p;
+ for (; *p && *p != '\t'; p++) ;
+ if (!*p) {
+ fprintf(stderr, "line %d: no acl found\n", line);
+ continue;
+ }
+ *p++ = '\0';
+ acl = p;
+ /* chop off the newline */
+ for (; *p && *p != '\r' && *p != '\n'; p++) ;
+ *p++ = '\0';
+
+ if (strlen(name) > MAX_MAILBOX_NAME) {
+ fprintf(stderr, "line %d: mailbox name too long\n", line);
+ continue;
+ }
+ if (strlen(partition) >= MAX_PARTITION_LEN) {
+ fprintf(stderr, "line %d: partition name too long\n", line);
+ continue;
+ }
+
+ key = name; keylen = strlen(key);
+ data = mboxlist_makeentry(mbtype, partition, acl); datalen = strlen(data);
+
+ tries = 0;
+ retry:
+ r = config_mboxlist_db->store(mbdb, key, keylen, data, datalen, &tid);
+ switch (r) {
+ case 0:
+ break;
+ case CYRUSDB_AGAIN:
+ if (tries++ < 5) {
+ fprintf(stderr, "warning: DB_LOCK_DEADLOCK; retrying\n");
+ goto retry;
+ }
+ fprintf(stderr, "error: too many deadlocks, aborting\n");
+ break;
+ default:
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ free(data);
+
+ if(--untilCommit == 0) {
+ /* commit */
+ r = config_mboxlist_db->commit(mbdb, tid);
+ if(r) break;
+ tid = NULL;
+ untilCommit = PER_COMMIT;
+ strlcpy(last_commit,key,sizeof(last_commit));
+ }
+
+ if (r) break;
+ }
+
+ if(!r && tid) {
+ /* commit the last transaction */
+ r=config_mboxlist_db->commit(mbdb, tid);
+ }
+
+ if (r) {
+ if(tid) config_mboxlist_db->abort(mbdb, tid);
+ fprintf(stderr, "db error: %s\n", cyrusdb_strerror(r));
+ if(key) fprintf(stderr, "was processing mailbox: %s\n", key);
+ if(last_commit[0]) fprintf(stderr, "last commit was at: %s\n",
+ last_commit);
+ else fprintf(stderr, "no commits\n");
+ }
+
+
+ return;
+}
+
+void usage(void)
+{
+ fprintf(stderr, "DUMP:\n");
+ fprintf(stderr, " ctl_mboxlist [-C <alt_config>] -d [-x] [-f filename] [-p partition]\n");
+ fprintf(stderr, "UNDUMP:\n");
+ fprintf(stderr,
+ " ctl_mboxlist [-C <alt_config>] -u [-f filename]"
+ " [< mboxlist.dump]\n");
+ fprintf(stderr, "MUPDATE populate:\n");
+ fprintf(stderr, " ctl_mboxlist [-C <alt_config>] -m [-a] [-w] [-f filename]\n");
+ exit(1);
+}
+
+int main(int argc, char *argv[])
+{
+ const char *partition = NULL;
+ char *mboxdb_fname = NULL;
+ int dopurge = 0;
+ int opt;
+ enum mboxop op = NONE;
+ char *alt_config = NULL;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:awmdurcxf:p:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'r':
+ /* deprecated, but we still support it */
+ fprintf(stderr, "ctl_mboxlist -r is deprecated: "
+ "use ctl_cyrusdb -r instead\n");
+ syslog(LOG_WARNING, "ctl_mboxlist -r is deprecated: "
+ "use ctl_cyrusdb -r instead");
+ if (op == NONE) op = RECOVER;
+ else usage();
+ break;
+
+ case 'c':
+ /* deprecated, but we still support it */
+ fprintf(stderr, "ctl_mboxlist -c is deprecated: "
+ "use ctl_cyrusdb -c instead\n");
+ syslog(LOG_WARNING, "ctl_mboxlist -c is deprecated: "
+ "use ctl_cyrusdb -c instead");
+ if (op == NONE) op = CHECKPOINT;
+ else usage();
+ break;
+
+ case 'f':
+ if (!mboxdb_fname) {
+ mboxdb_fname = optarg;
+ } else {
+ usage();
+ }
+ break;
+
+ case 'd':
+ if (op == NONE) op = DUMP;
+ else usage();
+ break;
+
+ case 'u':
+ if (op == NONE) op = UNDUMP;
+ else usage();
+ break;
+
+ case 'm':
+ if (op == NONE) op = M_POPULATE;
+ else usage();
+ break;
+
+ case 'p':
+ partition = optarg;
+ break;
+
+ case 'x':
+ dopurge = 1;
+ break;
+
+ case 'a':
+ local_authoritative = 1;
+ break;
+
+ case 'w':
+ warn_only = 1;
+ break;
+
+ default:
+ usage();
+ break;
+ }
+ }
+
+ if(op != M_POPULATE && (local_authoritative || warn_only)) usage();
+ if(op != DUMP && partition) usage();
+ if(op != DUMP && dopurge) usage();
+
+ if(op == RECOVER) {
+ syslog(LOG_NOTICE, "running mboxlist recovery");
+ libcyrus_config_setint(CYRUSOPT_DB_INIT_FLAGS, CYRUSDB_RECOVER);
+ }
+
+ cyrus_init(alt_config, "ctl_mboxlist", 0);
+ global_sasl_init(1,0,NULL);
+
+ switch (op) {
+ case RECOVER:
+ /* this was done by the call to cyrus_init via libcyrus */
+ syslog(LOG_NOTICE, "done running mboxlist recovery");
+ break;
+
+ case CHECKPOINT:
+ syslog(LOG_NOTICE, "checkpointing mboxlist");
+ mboxlist_init(MBOXLIST_SYNC);
+ mboxlist_done();
+ break;
+
+ case DUMP:
+ case M_POPULATE:
+ mboxlist_init(0);
+ mboxlist_open(mboxdb_fname);
+
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ do_dump(op, partition, dopurge);
+
+ quotadb_close();
+ quotadb_done();
+
+ mboxlist_close();
+ mboxlist_done();
+ break;
+
+ case UNDUMP:
+ mboxlist_init(0);
+ mboxlist_open(mboxdb_fname);
+
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ do_undump();
+
+ quotadb_close();
+ quotadb_done();
+
+ mboxlist_close();
+ mboxlist_done();
+ break;
+
+ default:
+ usage();
+ cyrus_done();
+ return 1;
+ }
+
+ cyrus_done();
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cvt_cyrusdb.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cvt_cyrusdb.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cvt_cyrusdb.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cvt_cyrusdb.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,182 @@
+/* dbcvt.c -- Convert between two database formats
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: cvt_cyrusdb.c,v 1.12.2.3 2004/05/25 01:28:03 ken3 Exp $
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <syslog.h>
+
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+#include "acl.h"
+#include "assert.h"
+#include "auth.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "glob.h"
+#include "imap_err.h"
+#include "global.h"
+#include "mailbox.h"
+#include "util.h"
+#include "xmalloc.h"
+
+/* config.c stuff */
+const int config_need_data = 0;
+
+struct cyrusdb_backend *DB_OLD = NULL, *DB_NEW = NULL;
+
+struct db *odb = NULL, *ndb = NULL;
+struct txn *tid = NULL;
+
+int converter_cb(void *rock __attribute__((unused)),
+ const char *key, int keylen,
+ const char *data, int datalen)
+{
+ return DB_NEW->store(ndb, key, keylen, data, datalen, &tid);
+}
+
+int main(int argc, char *argv[])
+{
+ const char *old_db, *new_db;
+ int i,r;
+ int opt;
+ char *alt_config = NULL;
+
+ while ((opt = getopt(argc, argv, "C:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ }
+ }
+
+ if((argc - optind) != 4) {
+ fprintf(stderr, "Usage: %s [-C altconfig] <old db> <old db backend> <new db> <new db backend>\n", argv[0]);
+ fprintf(stderr, "Usable Backends: ");
+
+ if(!cyrusdb_backends || !cyrusdb_backends[0])
+ fatal("we don't seem to have any db backends available", EC_OSERR);
+
+ fprintf(stderr, "%s", cyrusdb_backends[0]->name);
+ for(i=1; cyrusdb_backends[i]; i++)
+ fprintf(stderr, ", %s", cyrusdb_backends[i]->name);
+
+ fprintf(stderr, "\n");
+ exit(-1);
+ }
+
+ old_db = argv[optind];
+ new_db = argv[optind+2];
+
+ if(old_db[0] != '/' || new_db[0] != '/') {
+ printf("\nSorry, you cannot use this tool with relative path names.\n"
+ "This is because some database backends (mainly berkeley) do not\n"
+ "always do what you would expect with them.\n"
+ "\nPlease use absolute pathnames instead.\n\n");
+ exit(EC_OSERR);
+ }
+
+ for(i=0; cyrusdb_backends[i]; i++) {
+ if(!strcmp(cyrusdb_backends[i]->name, argv[optind+1])) {
+ DB_OLD = cyrusdb_backends[i]; break;
+ }
+ }
+ if(!cyrusdb_backends[i]) {
+ fatal("unknown old backend", EC_TEMPFAIL);
+ }
+
+ for(i=0; cyrusdb_backends[i]; i++) {
+ if(!strcmp(cyrusdb_backends[i]->name, argv[optind+3])) {
+ DB_NEW = cyrusdb_backends[i]; break;
+ }
+ }
+ if(!cyrusdb_backends[i]) {
+ fatal("unknown new backend", EC_TEMPFAIL);
+ }
+
+ if(DB_NEW == DB_OLD) {
+ fatal("no conversion required", EC_TEMPFAIL);
+ }
+
+ cyrus_init(alt_config, "cvt_cyrusdb", 0);
+
+ printf("Converting from %s (%s) to %s (%s)\n", old_db, DB_OLD->name,
+ new_db, DB_NEW->name);
+
+ r = DB_OLD->open(old_db, 0, &odb);
+ if(r != CYRUSDB_OK)
+ fatal("can't open old database", EC_TEMPFAIL);
+ r = DB_NEW->open(new_db, CYRUSDB_CREATE, &ndb);
+ if(r != CYRUSDB_OK)
+ fatal("can't open new database", EC_TEMPFAIL);
+
+ DB_OLD->foreach(odb, "", 0, NULL, converter_cb, NULL, NULL);
+
+ /* we want to have done atleast one entry at this point */
+ if(tid)
+ DB_NEW->commit(ndb, tid);
+ else
+ fprintf(stderr, "Warning: apparently empty database converted.\n");
+
+
+ DB_OLD->close(odb);
+ DB_NEW->close(ndb);
+
+ cyrus_done();
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyr_expire.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyr_expire.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyr_expire.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyr_expire.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,334 @@
+/* cyr_expire.c -- Program to expire deliver.db entries and messages
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: cyr_expire.c,v 1.2.2.11 2005/12/15 13:21:16 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <errno.h>
+#include <signal.h>
+
+#include "annotate.h"
+#include "cyrusdb.h"
+#include "duplicate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "hash.h"
+#include "libcyr_cfg.h"
+#include "mboxlist.h"
+#include "util.h"
+#include "xmalloc.h"
+
+/* global state */
+const int config_need_data = 0;
+
+void usage(void)
+{
+ fprintf(stderr,
+ "cyr_expire [-C <altconfig>] -E <days> [-X <expunge-days>] [-v]\n");
+ exit(-1);
+}
+
+struct expire_rock {
+ struct hash_table *table;
+ enum enum_value expunge_mode;
+ time_t expire_mark;
+ time_t expunge_mark;
+ unsigned long mailboxes;
+ unsigned long messages;
+ unsigned long deleted;
+ int verbose;
+};
+
+/*
+ * mailbox_expunge() callback to expunge expired articles.
+ */
+static int expire_cb(struct mailbox *mailbox __attribute__((unused)),
+ void *rock, char *index, int expunge_flags)
+{
+ struct expire_rock *erock = (struct expire_rock *) rock;
+ bit32 tstamp;
+
+ erock->messages++;
+
+ /* if we're cleaning up expunge, delete by expunge time */
+ if (expunge_flags & EXPUNGE_CLEANUP) {
+ tstamp = ntohl(*((bit32 *)(index+OFFSET_LAST_UPDATED)));
+ if (tstamp < erock->expunge_mark) {
+ erock->deleted++;
+ return 1;
+ }
+ } else {
+ /* otherwise, we're expiring messages by sent date */
+ tstamp = ntohl(*((bit32 *)(index+OFFSET_SENTDATE)));
+ if (tstamp < erock->expire_mark) {
+ erock->deleted++;
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
+/*
+ * mboxlist_findall() callback function to:
+ * - expire messages from mailboxes,
+ * - build a hash table of mailboxes in which we expired messages,
+ * - and perform a cleanup of expunged messages
+ */
+int expire(char *name, int matchlen, int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct expire_rock *erock = (struct expire_rock *) rock;
+ char buf[MAX_MAILBOX_NAME+1] = "", *p;
+ struct annotation_data attrib;
+ int r, domainlen = 0;
+
+ if (config_virtdomains && (p = strchr(name, '!')))
+ domainlen = p - name + 1;
+
+ strncpy(buf, name, matchlen);
+ buf[matchlen] = '\0';
+
+ /* see if we need to expire messages.
+ * since mailboxes inherit /vendor/cmu/cyrus-imapd/expire,
+ * we need to iterate all the way up to "" (server entry)
+ */
+ while (1) {
+ r = annotatemore_lookup(buf, "/vendor/cmu/cyrus-imapd/expire", "",
+ &attrib);
+
+ if (r || /* error */
+ attrib.value || /* found an entry */
+ !buf[0] || /* done recursing */
+ !strcmp(buf+domainlen, "user")) { /* server entry doesn't apply
+ to personal mailboxes */
+ break;
+ }
+
+ p = strrchr(buf, '.'); /* find parent mailbox */
+
+ if (p && (p - buf > domainlen)) /* don't split subdomain */
+ *p = '\0';
+ else if (!buf[domainlen]) /* server entry */
+ buf[0] = '\0';
+ else /* domain entry */
+ buf[domainlen] = '\0';
+ }
+
+ if (!r && (attrib.value ||
+ erock->expunge_mode != IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE)) {
+ struct mailbox mailbox;
+ int doclose = 0;
+ int expunge_flags = 0;
+
+ /* Open/lock header */
+ r = mailbox_open_header(name, 0, &mailbox);
+ if (!r && mailbox.header_fd != -1) {
+ doclose = 1;
+ (void) mailbox_lock_header(&mailbox);
+ mailbox.header_lock_count = 1;
+ }
+
+ /* Attempt to open/lock index */
+ if (!r) r = mailbox_open_index(&mailbox);
+ if (!r) {
+ (void) mailbox_lock_index(&mailbox);
+ mailbox.index_lock_count = 1;
+ }
+
+ if (r) {
+ /* mailbox corrupt/nonexistent -- skip it */
+ syslog(LOG_WARNING, "unable to open/lock mailbox %s", name);
+ if (doclose) mailbox_close(&mailbox);
+ return 0;
+ }
+
+ erock->mailboxes++;
+ erock->expire_mark = 0;
+
+ if (attrib.value) {
+ /* add mailbox to table */
+ unsigned long expire_days = strtoul(attrib.value, NULL, 10);
+ time_t *expire_mark = (time_t *) xmalloc(sizeof(time_t));
+
+ *expire_mark = expire_days ?
+ time(0) - (expire_days * 60 * 60 * 24) : 0 /* never */ ;
+ hash_insert(name, (void *) expire_mark, erock->table);
+
+ if (erock->verbose) {
+ fprintf(stderr,
+ "expiring messages in %s older than %ld days\n",
+ name, expire_days);
+ }
+
+ erock->expire_mark = *expire_mark;
+
+ expunge_flags |= EXPUNGE_FORCE;
+ }
+
+ if (erock->expunge_mode != IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE) {
+ /* cleanup mailbox of expunged messages */
+ expunge_flags |= EXPUNGE_CLEANUP;
+ }
+
+ r = mailbox_expunge(&mailbox, expire_cb, erock, expunge_flags);
+ mailbox_close(&mailbox);
+ }
+
+ return r;
+}
+
+int main(int argc, char *argv[])
+{
+ extern char *optarg;
+ int opt, r = 0, expire_days = 0, expunge_days = 0;
+ char *alt_config = NULL;
+ char buf[100];
+ struct hash_table expire_table;
+ struct expire_rock erock;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ /* zero the expire_rock */
+ memset(&erock, 0, sizeof(erock));
+
+ while ((opt = getopt(argc, argv, "C:E:X:v")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'E':
+ if (expire_days) usage();
+ expire_days = atoi(optarg);
+ break;
+
+ case 'X':
+ if (expunge_days) usage();
+ expunge_days = atoi(optarg);
+ break;
+
+ case 'v':
+ erock.verbose++;
+ break;
+
+ default:
+ usage();
+ break;
+ }
+ }
+
+ if (!expire_days) usage();
+
+ cyrus_init(alt_config, "cyr_expire", 0);
+
+ annotatemore_init(0, NULL, NULL);
+ annotatemore_open(NULL);
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* open the quota db, we'll need it for expunge */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ if (duplicate_init(NULL, 0) != 0) {
+ fprintf(stderr,
+ "cyr_expire: unable to init duplicate delivery database\n");
+ exit(1);
+ }
+
+ /* xxx better way to determine a size for this table? */
+ construct_hash_table(&expire_table, 10000, 1);
+
+ /* expire messages from mailboxes,
+ * build a hash table of mailboxes in which we expired messages,
+ * and perform a cleanup of expunged messages
+ */
+ erock.table = &expire_table;
+ erock.expunge_mode = config_getenum(IMAPOPT_EXPUNGE_MODE);
+ erock.expunge_mark = time(0) - (expunge_days * 60 * 60 * 24);
+
+ if (erock.verbose &&
+ erock.expunge_mode != IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE) {
+ fprintf(stderr,
+ "expunging deleted messages in mailboxes older than %d days\n",
+ expunge_days);
+ }
+
+ strlcpy(buf, "*", sizeof(buf));
+ mboxlist_findall(NULL, buf, 1, 0, 0, &expire, &erock);
+
+ syslog(LOG_NOTICE, "expunged %lu out of %lu messages from %lu mailboxes",
+ erock.deleted, erock.messages, erock.mailboxes);
+ if (erock.verbose) {
+ fprintf(stderr, "\nexpunged %lu out of %lu messages from %lu mailboxes\n",
+ erock.deleted, erock.messages, erock.mailboxes);
+ }
+
+ /* purge deliver.db entries of expired messages */
+ r = duplicate_prune(expire_days, &expire_table);
+
+ free_hash_table(&expire_table, free);
+
+ quotadb_close();
+ quotadb_done();
+ mboxlist_close();
+ mboxlist_done();
+ annotatemore_close();
+ annotatemore_done();
+ duplicate_done();
+ cyrus_done();
+
+ exit(r);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyrdump.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyrdump.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyrdump.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/cyrdump.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,355 @@
+/* $Id: cyrdump.c,v 1.14.2.5 2006/03/31 19:22:12 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <string.h>
+
+/* cyrus includes */
+#include "assert.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "imapd.h"
+#include "imap_err.h"
+#include "imapurl.h"
+#include "mailbox.h"
+#include "mboxlist.h"
+#include "sysexits.h"
+#include "xmalloc.h"
+
+
+/* config.c stuff */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+int verbose = 0;
+
+static int dump_me(char *name, int matchlen, int maycreate, void *rock);
+static void print_seq(const char *tag, const char *attrib,
+ unsigned *seq, int n);
+int usage(const char *name);
+
+/* available from elsewhere */
+int index_getuidsequence(struct mailbox *mailbox,
+ struct searchargs *searchargs,
+ unsigned **uid_list);
+
+/* current namespace */
+static struct namespace dump_namespace;
+
+int imapd_exists;
+struct protstream *imapd_out = NULL;
+struct auth_state *imapd_authstate = NULL;
+char *imapd_userid = NULL;
+int imapd_condstore_client = 0;
+
+struct incremental_record {
+ int incruid;
+};
+
+int main(int argc, char *argv[])
+{
+ int option;
+ char buf[MAX_MAILBOX_PATH+1];
+ int i, r;
+ char *alt_config = NULL;
+ struct incremental_record irec;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EX_USAGE);
+
+ while ((option = getopt(argc, argv, "v")) != EOF) {
+ switch (option) {
+ case 'v':
+ verbose++;
+ break;
+
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ default:
+ usage(argv[0]);
+ break;
+ }
+ }
+
+ if (optind == argc) {
+ usage(argv[0]);
+ }
+
+ cyrus_init(alt_config, "dump", 0);
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(&dump_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ irec.incruid = 0;
+ for (i = optind; i < argc; i++) {
+ strlcpy(buf, argv[i], sizeof(buf));
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_tointernal(&dump_namespace, buf,
+ config_virtdomains ?
+ strcspn(buf, "@") : 0);
+ (*dump_namespace.mboxlist_findall)(&dump_namespace, buf, 1, 0, 0,
+ dump_me, &irec);
+ }
+
+ mboxlist_close();
+ mboxlist_done();
+
+ cyrus_done();
+
+ return 0;
+}
+
+int usage(const char *name)
+{
+ fprintf(stderr, "usage: %s [-v] [mboxpattern ...]\n", name);
+
+ exit(EC_USAGE);
+}
+
+static void generate_boundary(char *boundary, size_t size)
+{
+ assert(size >= 100);
+
+ snprintf(boundary, size, "dump-%ld-%ld-%ld",
+ (long) getpid(), (long) time(NULL), (long) rand());
+}
+
+static int dump_me(char *name, int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)), void *rock)
+{
+ int r;
+ struct mailbox m;
+ char boundary[128];
+ struct imapurl url;
+ char imapurl[MAX_MAILBOX_PATH];
+ struct incremental_record *irec = (struct incremental_record *) rock;
+ struct searchargs searchargs;
+ unsigned *uids;
+ unsigned *uidseq;
+ int i, n, numuids;
+
+ memset(&m, 0, sizeof(struct mailbox));
+ r = mailbox_open_header(name, 0, &m);
+ if (r) {
+ if (verbose) {
+ printf("error opening %s: %s\n", name, error_message(r));
+ }
+ return 0;
+ }
+
+ r = mailbox_open_index(&m);
+ if (!r) r = mailbox_lock_pop(&m);
+ if (r) {
+ if (verbose) {
+ printf("error locking index %s: %s\n", name, error_message(r));
+ }
+ mailbox_close(&m);
+ return 0;
+ }
+
+ mailbox_read_index_header(&m);
+ index_operatemailbox(&m);
+
+ generate_boundary(boundary, sizeof(boundary));
+
+ printf("Content-Type: multipart/related; boundary=\"%s\"\n\n", boundary);
+
+ printf("--%s\n", boundary);
+ printf("Content-Type: text/xml\n");
+ printf("IMAP-Dump-Version: 0\n");
+ printf("\n");
+
+ printf("<imapdump uniqueid=\"%s\">\n", m.uniqueid);
+ memset(&url, 0, sizeof(struct imapurl));
+ url.server = config_servername;
+ url.mailbox = m.name;
+ imapurl_toURL(imapurl, &url);
+ printf(" <mailbox-url>%s</mailbox-url>\n", imapurl);
+ printf(" <incremental-uid>%d</incremental-uid>\n", irec->incruid);
+ printf(" <nextuid>%ld</nextuid>\n", m.last_uid + 1);
+ printf("\n");
+
+ memset(&searchargs, 0, sizeof(struct searchargs));
+ numuids = index_getuidsequence(&m, &searchargs, &uids);
+ print_seq("uidlist", NULL, uids, numuids);
+ printf("\n");
+
+ printf(" <flags>\n");
+
+ searchargs.system_flags_set = FLAG_ANSWERED;
+ n = index_getuidsequence(&m, &searchargs, &uidseq);
+ print_seq("flag", "name=\"\\Answered\" user=\"*\"", uidseq, n);
+ if (uidseq) free(uidseq);
+
+ searchargs.system_flags_set = FLAG_DELETED;
+ n = index_getuidsequence(&m, &searchargs, &uidseq);
+ print_seq("flag", "name=\"\\Deleted\" user=\"*\"", uidseq, n);
+ if (uidseq) free(uidseq);
+
+ searchargs.system_flags_set = FLAG_DRAFT;
+ n = index_getuidsequence(&m, &searchargs, &uidseq);
+ print_seq("flag", "name=\"\\Draft\" user=\"*\"", uidseq, n);
+ if (uidseq) free(uidseq);
+
+ searchargs.system_flags_set = FLAG_FLAGGED;
+ n = index_getuidsequence(&m, &searchargs, &uidseq);
+ print_seq("flag", "name=\"\\Flagged\" user=\"*\"", uidseq, n);
+ if (uidseq) free(uidseq);
+
+ printf(" </flags>\n");
+
+ printf("</imapdump>\n");
+
+ for (i = 0; i < numuids; i++) {
+ const char *base;
+ unsigned long len;
+
+ if (uids[i] < irec->incruid) {
+ /* already dumped this message */
+ /* xxx could do binary search to get to the first
+ undumped uid */
+ continue;
+ }
+
+ printf("\n--%s\n", boundary);
+ printf("Content-Type: message/rfc822\n");
+ printf("Content-ID: %d\n", uids[i]);
+ printf("\n");
+ r = mailbox_map_message(&m, uids[i], &base, &len);
+ if (r) {
+ if (verbose) {
+ printf("error mapping message %d: %s\n", uids[i],
+ error_message(r));
+ }
+ break;
+ }
+ fwrite(base, 1, len, stdout);
+ mailbox_unmap_message(&m, uids[i], &base, &len);
+ }
+
+ printf("\n--%s--\n", boundary);
+
+ index_closemailbox(&m);
+ mailbox_close(&m);
+
+ return 0;
+}
+
+static void print_seq(const char *tag, const char *attrib,
+ unsigned *seq, int n)
+{
+ int i;
+
+ printf(" <%s%s%s>", tag, attrib ? " " : "", attrib ? attrib : "");
+ for (i = 0; i < n; i++) {
+ printf("%u ", seq[i]);
+ }
+ printf("</%s>\n", tag);
+}
+
+
+#if 0
+ char *p, *str;
+ int str_sz;
+ int run_start = 0;
+ int first_time = 1;
+
+ p = str = (char *) xmalloc(sizeof(char) * 1024);
+ str_sz = 1024;
+ run_start = msgno_list[0];
+ for (i = 1; i < n; i++) {
+ if (msgno_list[i] == msgno_list[i-1] + 1) {
+ /* on a run */
+ continue;
+ }
+ if (first_time) {
+ first_time = 0;
+ } else {
+ *p++ = ',';
+ }
+ if (run_start != msgno_list[i-1]) {
+ /* non-trivial run */
+ p += sprintf(p, "%d:%d", run_start, msgno_list[i-1]);
+ } else {
+ /* singleton */
+ p += sprintf(p, "%d", msgno_list[i-1]);
+ }
+ if (p > (str + str_sz - 20)) {
+ /* running out of room */
+ int x;
+
+ x = p - str;
+ str = (char *) xrealloc(str, str_sz *= 2);
+ p = str + x;
+ }
+ run_start = msgno_list[i];
+ }
+ /* now handle the last entry */
+ if (!first_time) {
+ *p++ = ',';
+ }
+ if (run_start != msgno_list[i-1]) {
+ sprintf(p, "%d:%d", run_start, msgno_list[i-1]);
+ } else {
+ sprintf(p, "%d", msgno_list[i-1]);
+ }
+
+ return str;
+
+#endif
+
+void printastring(const char *s __attribute__((unused)))
+{
+ fatal("printastring not implemented in cyrdump", EC_SOFTWARE);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/deliver.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/deliver.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/deliver.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/deliver.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,391 @@
+/* deliver.c -- deliver shell - just calls lmtpd
+ * Tim Martin
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: deliver.c,v 1.169.2.10 2005/05/04 19:26:16 ken3 Exp $ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <errno.h>
+#include <pwd.h>
+#include <sys/types.h>
+
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/un.h>
+
+#include "global.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "xmalloc.h"
+#include "lmtpengine.h"
+#include "prot.h"
+#include "version.h"
+
+/* config.c stuff */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+extern int optind;
+extern char *optarg;
+
+static int logdebug = 0;
+
+static struct protstream *deliver_out, *deliver_in;
+
+static const char *sockaddr;
+
+/* unused for deliver.c, but needed to make lmtpengine.c happy */
+int deliver_logfd = -1;
+
+/* forward declarations */
+
+static int deliver_msg(char *return_path, char *authuser, int ignorequota,
+ char **users, int numusers, char *mailbox);
+static struct backend *init_net(const char *sockaddr);
+
+static void usage()
+{
+ fprintf(stderr,
+ "421-4.3.0 usage: deliver [-C <alt_config> ] [-m mailbox]"
+ " [-a auth] [-r return_path] [-l] [-D]\r\n");
+ fprintf(stderr, "421 4.3.0 %s\n", CYRUS_VERSION);
+ exit(EC_USAGE);
+}
+
+void fatal(const char* s, int code)
+{
+ static int recurse_code = 0;
+
+ if(recurse_code) exit(code);
+ else recurse_code = 0;
+
+ prot_printf(deliver_out,"421 4.3.0 deliver: %s\r\n", s);
+ prot_flush(deliver_out);
+ cyrus_done();
+ exit(code);
+}
+
+/*
+ * Here we're just an intermediatory piping stdin to lmtp socket
+ * and lmtp socket to stdout
+ */
+void pipe_through(struct backend *conn)
+{
+ struct protgroup *protin = protgroup_new(2);
+
+ protgroup_insert(protin, deliver_in);
+ protgroup_insert(protin, conn->in);
+
+ do {
+ /* Flush any buffered output */
+ prot_flush(deliver_out);
+ prot_flush(conn->out);
+
+ } while (!proxy_check_input(protin, deliver_in, deliver_out,
+ conn->in, conn->out, 0));
+
+ /* ok, we're done. */
+ protgroup_free(protin);
+
+ return;
+}
+
+int main(int argc, char **argv)
+{
+ int r = 0;
+ int opt;
+ int lmtpflag = 0;
+ int ignorequota = 0;
+ char *mailboxname = NULL;
+ char *authuser = NULL;
+ char *return_path = NULL;
+ char buf[1024];
+ char *alt_config = NULL;
+
+ while ((opt = getopt(argc, argv, "C:df:r:m:a:F:eE:lqD")) != EOF) {
+ switch(opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'd':
+ /* Ignore -- /bin/mail compatibility flags */
+ break;
+
+ case 'D':
+ logdebug = 1;
+ break;
+
+ case 'r':
+ case 'f':
+ return_path = optarg;
+ break;
+
+ case 'm':
+ if (mailboxname) {
+ fprintf(stderr, "deliver: multiple -m options\n");
+ usage();
+ /* NOTREACHED */
+ }
+ if (*optarg) mailboxname = optarg;
+ break;
+
+ case 'a':
+ if (authuser) {
+ fprintf(stderr, "deliver: multiple -a options\n");
+ usage();
+ /* NOTREACHED */
+ }
+ authuser = optarg;
+ break;
+
+ case 'F': /* set IMAP flag. we no longer support this */
+ fprintf(stderr,"deliver: 'F' option no longer supported\n");
+ usage();
+ break;
+
+ case 'e':
+ /* duplicate delivery. ignore */
+ break;
+
+ case 'E':
+ fprintf(stderr,"deliver: 'E' option no longer supported\n");
+ usage();
+ break;
+
+ case 'l':
+ lmtpflag = 1;
+ break;
+
+ case 'q':
+ ignorequota = 1;
+ break;
+
+ default:
+ usage();
+ /* NOTREACHED */
+ }
+ }
+
+ deliver_in = prot_new(0, 0);
+ deliver_out = prot_new(1, 1);
+ prot_setflushonread(deliver_in, deliver_out);
+ prot_settimeout(deliver_in, 300);
+
+ cyrus_init(alt_config, "deliver", CYRUSINIT_NODB);
+
+ sockaddr = config_getstring(IMAPOPT_LMTPSOCKET);
+ if (!sockaddr) {
+ strlcpy(buf, config_dir, sizeof(buf));
+ strlcat(buf, "/socket/lmtp", sizeof(buf));
+ sockaddr = buf;
+ }
+
+ if (lmtpflag == 1) {
+ struct backend *conn = init_net(sockaddr);
+
+ pipe_through(conn);
+
+ backend_disconnect(conn);
+ free(conn);
+ }
+ else {
+ if (return_path == NULL) {
+ uid_t me = getuid();
+ struct passwd *p = getpwuid(me);
+ return_path = p->pw_name;
+ }
+
+ /* deliver to users or global mailbox */
+ r = deliver_msg(return_path,authuser, ignorequota,
+ argv+optind, argc - optind, mailboxname);
+ }
+
+ cyrus_done();
+
+ return r;
+}
+
+void just_exit(const char *msg)
+{
+ com_err(msg, 0, error_message(errno));
+
+ fatal(msg, EC_CONFIG);
+}
+
+/* initialize the network
+ * we talk on unix sockets
+ */
+static struct backend *init_net(const char *unixpath)
+{
+ int lmtpdsock;
+ struct sockaddr_un addr;
+ struct backend *conn;
+
+ if ((lmtpdsock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ just_exit("socket failed");
+ }
+
+ addr.sun_family = AF_UNIX;
+ strlcpy(addr.sun_path, unixpath, sizeof(addr.sun_path));
+
+ if (connect(lmtpdsock, (struct sockaddr *) &addr,
+ sizeof(addr.sun_family) + strlen(addr.sun_path) + 1) < 0) {
+ just_exit("connect failed");
+ }
+
+ conn = xzmalloc(sizeof(struct backend));
+ conn->timeout = NULL;
+ conn->in = prot_new(lmtpdsock, 0);
+ conn->out = prot_new(lmtpdsock, 1);
+ conn->sock = lmtpdsock;
+ prot_setflushonread(conn->in, conn->out);
+ conn->prot = &protocol[PROTOCOL_LMTP];
+
+ return conn;
+}
+
+static int deliver_msg(char *return_path, char *authuser, int ignorequota,
+ char **users, int numusers, char *mailbox)
+{
+ int r;
+ struct backend *conn;
+ struct lmtp_txn *txn = LMTP_TXN_ALLOC(numusers ? numusers : 1);
+ int j;
+ int ml = 0;
+
+ /* must have either some users or a mailbox */
+ if (!numusers && !mailbox) {
+ usage();
+ }
+
+ /* connect */
+ conn = backend_connect(NULL, sockaddr, &protocol[PROTOCOL_LMTP],
+ "", NULL, NULL);
+ if (!conn) {
+ just_exit("couldn't connect to lmtpd");
+ }
+
+ /* setup txn */
+ txn->from = return_path;
+ txn->auth = authuser;
+ txn->data = deliver_in;
+ txn->isdotstuffed = 0;
+ txn->tempfail_unknown_mailbox = 0;
+ txn->rcpt_num = numusers ? numusers : 1;
+ if (mailbox) ml = strlen(mailbox);
+ if (numusers == 0) {
+ /* just deliver to mailbox 'mailbox' */
+ const char *BB = config_getstring(IMAPOPT_POSTUSER);
+ txn->rcpt[0].addr = (char *) xmalloc(ml + strlen(BB) + 2); /* xxx leaks! */
+ sprintf(txn->rcpt[0].addr, "%s+%s", BB, mailbox);
+ txn->rcpt[0].ignorequota = ignorequota;
+ } else {
+ /* setup each recipient */
+ for (j = 0; j < numusers; j++) {
+ if (mailbox) {
+ size_t ulen;
+
+ /* we let it leak ! */
+ txn->rcpt[j].addr =
+ (char *) xmalloc(strlen(users[j]) + ml + 2);
+
+ /* find the length of the userid minus the domain */
+ ulen = strcspn(users[j], "@");
+ sprintf(txn->rcpt[j].addr, "%.*s+%s", ulen, users[j], mailbox);
+
+ /* add the domain if we have one */
+ if (ulen < strlen(users[j]))
+ strcat(txn->rcpt[j].addr, users[j]+ulen);
+ } else {
+ txn->rcpt[j].addr = users[j];
+ }
+ txn->rcpt[j].ignorequota = ignorequota;
+ }
+ }
+
+ /* run txn */
+ r = lmtp_runtxn(conn, txn);
+
+ /* disconnect */
+ backend_disconnect(conn);
+ free(conn);
+
+ /* examine txn for error state */
+ r = 0;
+ for (j = 0; j < txn->rcpt_num; j++) {
+ switch (txn->rcpt[j].result) {
+ case RCPT_GOOD:
+ break;
+
+ case RCPT_TEMPFAIL:
+ r = EC_TEMPFAIL;
+ break;
+
+ case RCPT_PERMFAIL:
+ /* we just need any permanent failure, though we should
+ probably return data from the client-side LMTP info */
+ printf("%s: %s\n",
+ txn->rcpt[j].addr, error_message(txn->rcpt[j].r));
+ if (r != EC_TEMPFAIL) {
+ r = EC_DATAERR;
+ }
+ break;
+ }
+ }
+
+ /* return appropriately */
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/delivered_prune.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/delivered_prune.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/delivered_prune.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/delivered_prune.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,122 @@
+/* cyr_expire.c -- Program to expire deliver.db entries and messages
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: delivered_prune.c,v 1.1.2.1 2005/04/08 16:48:30 shadow Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <errno.h>
+#include <signal.h>
+
+#include "annotate.h"
+#include "cyrusdb.h"
+#include "duplicate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "hash.h"
+#include "libcyr_cfg.h"
+#include "mboxlist.h"
+#include "util.h"
+#include "xmalloc.h"
+
+/* global state */
+const int config_need_data = 0;
+
+void usage(void)
+{
+ fprintf(stderr,
+ "cyr_expire [-C <altconfig>] -E <days>\n");
+ exit(-1);
+}
+
+int main(int argc, char *argv[])
+{
+ extern char *optarg;
+ int opt, r = 0, expire_days = 0;
+ char *alt_config = NULL;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:E:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'E':
+ if (expire_days) usage();
+ expire_days = atoi(optarg);
+ break;
+
+ default:
+ usage();
+ break;
+ }
+ }
+
+ if (!expire_days) usage();
+
+ cyrus_init(alt_config, "delivered_expire", 0);
+
+ if (duplicate_init(NULL, 0) != 0) {
+ fprintf(stderr,
+ "cyr_expire: unable to init duplicate delivery database\n");
+ exit(1);
+ }
+
+ /* purge deliver.db entries of expired messages */
+ r = duplicate_prune(expire_days, NULL);
+
+ duplicate_done();
+ cyrus_done();
+
+ exit(r);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,416 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: duplicate.c,v 1.35.2.5 2004/03/24 19:53:00 ken3 Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+#include <assert.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_DIRENT_H
+# include <dirent.h>
+#else
+# define dirent direct
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+#include <errno.h>
+
+#include "xmalloc.h"
+#include "imap_err.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "util.h"
+#include "cyrusdb.h"
+
+#include "duplicate.h"
+
+#define DB (config_duplicate_db)
+
+static struct db *dupdb = NULL;
+static int duplicate_dbopen = 0;
+
+/* must be called after cyrus_init */
+int duplicate_init(char *fname, int myflags __attribute__((unused)))
+{
+ char buf[1024];
+ int r = 0;
+
+ if (r != 0)
+ syslog(LOG_ERR, "DBERROR: init %s: %s", buf,
+ cyrusdb_strerror(r));
+ else {
+ char *tofree = NULL;
+
+ /* create db file name */
+ if (!fname) {
+ fname = xmalloc(strlen(config_dir)+sizeof(FNAME_DELIVERDB));
+ tofree = fname;
+ strcpy(fname, config_dir);
+ strcat(fname, FNAME_DELIVERDB);
+ }
+
+ r = DB->open(fname, CYRUSDB_CREATE, &dupdb);
+ if (r != 0)
+ syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
+ cyrusdb_strerror(r));
+ else
+ duplicate_dbopen = 1;
+
+ if (tofree) free(tofree);
+ }
+
+ return r;
+}
+
+time_t duplicate_check(char *id, int idlen, const char *to, int tolen)
+{
+ char buf[1024];
+ int r;
+ const char *data = NULL;
+ int len = 0;
+ time_t mark = 0;
+
+ if (!duplicate_dbopen) return 0;
+
+ if (idlen + tolen > sizeof(buf) - 30) return 0;
+ memcpy(buf, id, idlen);
+ buf[idlen] = '\0';
+ memcpy(buf + idlen + 1, to, tolen);
+ buf[idlen + tolen + 1] = '\0';
+
+ do {
+ r = DB->fetch(dupdb, buf,
+ idlen + tolen + 2, /* +2 b/c 1 for the center null;
+ +1 for the terminating null */
+ &data, &len, NULL);
+ } while (r == CYRUSDB_AGAIN);
+
+ if (!r && data) {
+ assert((len == sizeof(time_t)) ||
+ (len == sizeof(time_t) + sizeof(unsigned long)));
+
+ /* found the record */
+ memcpy(&mark, data, sizeof(time_t));
+ } else if (r != CYRUSDB_OK) {
+ if (r != CYRUSDB_NOTFOUND) {
+ syslog(LOG_ERR, "duplicate_check: error looking up %s/%s: %s",
+ id, to,
+ cyrusdb_strerror(r));
+ }
+ mark = 0;
+ }
+
+ syslog(LOG_DEBUG, "duplicate_check: %-40s %-20s %ld",
+ buf, buf+idlen+1, mark);
+
+ return mark;
+}
+
+void duplicate_log(char *msgid, const char *name, char *action)
+{
+ if (strlen(msgid) < 80) {
+ char pretty[160];
+
+ beautify_copy(pretty, msgid);
+ syslog(LOG_INFO, "dupelim: eliminated duplicate message to %s id %s (%s)",
+ name, msgid, action);
+ }
+ else {
+ syslog(LOG_INFO, "dupelim: eliminated duplicate message to %s (%s)",
+ name, action);
+ }
+}
+
+void duplicate_mark(char *id, int idlen, const char *to, int tolen, time_t mark,
+ unsigned long uid)
+{
+ char buf[1024], data[100];
+ int r;
+
+ if (!duplicate_dbopen) return;
+
+ if (idlen + tolen > sizeof(buf) - 30) return;
+ memcpy(buf, id, idlen);
+ buf[idlen] = '\0';
+ memcpy(buf + idlen + 1, to, tolen);
+ buf[idlen + tolen + 1] = '\0';
+
+ memcpy(data, &mark, sizeof(mark));
+ memcpy(data + sizeof(mark), &uid, sizeof(uid));
+
+ do {
+ r = DB->store(dupdb, buf,
+ idlen + tolen + 2, /* +2 b/c 1 for the center null;
+ +1 for the terminating null */
+ data, sizeof(mark)+sizeof(uid), NULL);
+ } while (r == CYRUSDB_AGAIN);
+
+ syslog(LOG_DEBUG, "duplicate_mark: %-40s %-20s %ld %lu",
+ buf, buf+idlen+1, mark, uid);
+
+ return;
+}
+
+struct findrock {
+ int (*proc)();
+ void *rock;
+};
+
+static int find_p(void *rock __attribute__((unused)),
+ const char *id,
+ int idlen __attribute__((unused)),
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ const char *rcpt;
+
+ /* grab the rcpt and make sure its a mailbox */
+ rcpt = id + strlen(id) + 1;
+ return (rcpt[0] != '.');
+}
+
+static int find_cb(void *rock, const char *id,
+ int idlen __attribute__((unused)),
+ const char *data, int datalen)
+{
+ struct findrock *frock = (struct findrock *) rock;
+ const char *rcpt;
+ time_t mark;
+ unsigned long uid = 0;
+ int r;
+
+ /* grab the rcpt */
+ rcpt = id + strlen(id) + 1;
+
+ /* grab the mark and uid */
+ memcpy(&mark, data, sizeof(time_t));
+ if (datalen > sizeof(mark))
+ memcpy(&uid, data + sizeof(mark), sizeof(unsigned long));
+
+ r = (*frock->proc)(id, rcpt, mark, uid, frock->rock);
+
+ return r;
+}
+
+int duplicate_find(char *msgid, int (*proc)(), void *rock)
+{
+ struct findrock frock;
+
+ if (!msgid) msgid = "";
+
+ frock.proc = proc;
+ frock.rock = rock;
+
+ /* check each entry in our database */
+ DB->foreach(dupdb, msgid, strlen(msgid), &find_p, &find_cb, &frock, NULL);
+
+ return 0;
+}
+
+struct prunerock {
+ struct db *db;
+ time_t expmark; /* default expmark, if not overridden by table entry */
+ struct hash_table *expire_table;
+ int count;
+ int deletions;
+};
+
+static int prune_p(void *rock,
+ const char *id, int idlen __attribute__((unused)),
+ const char *data, int datalen __attribute__((unused)))
+{
+ struct prunerock *prock = (struct prunerock *) rock;
+ const char *rcpt;
+ time_t mark, *expmark = NULL;
+
+ prock->count++;
+
+ /* grab the rcpt, make sure its a mailbox and lookup its expire time */
+ rcpt = id + strlen(id) + 1;
+ if (prock->expire_table && rcpt[0] && rcpt[0] != '.') {
+ expmark = (time_t *) hash_lookup(rcpt, prock->expire_table);
+ }
+
+ /* grab the mark */
+ memcpy(&mark, data, sizeof(time_t));
+
+ /* check if we should prune this entry */
+ return (mark < (expmark ? *expmark : prock->expmark));
+}
+
+static int prune_cb(void *rock, const char *id, int idlen,
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ struct prunerock *prock = (struct prunerock *) rock;
+ int r;
+
+ prock->deletions++;
+
+ do {
+ r = DB->delete(prock->db, id, idlen, NULL, 0);
+ } while (r == CYRUSDB_AGAIN);
+
+
+ return 0;
+}
+
+int duplicate_prune(int days, struct hash_table *expire_table)
+{
+ struct prunerock prock;
+
+ if (days < 0) fatal("must specify positive number of days", EC_USAGE);
+
+ prock.count = prock.deletions = 0;
+ prock.expmark = time(NULL) - (days * 60 * 60 * 24);
+ prock.expire_table = expire_table;
+ syslog(LOG_NOTICE, "duplicate_prune: pruning back %d days", days);
+
+ /* check each entry in our database */
+ prock.db = dupdb;
+ DB->foreach(dupdb, "", 0, &prune_p, &prune_cb, &prock, NULL);
+
+ syslog(LOG_NOTICE, "duplicate_prune: purged %d out of %d entries",
+ prock.deletions, prock.count);
+
+ return 0;
+}
+
+struct dumprock {
+ FILE *f;
+ int count;
+};
+
+static const char hexcodes[] = "0123456789ABCDEF";
+
+static int dump_cb(void *rock,
+ const char *key, int keylen __attribute__((unused)),
+ const char *data, int datalen)
+{
+ struct dumprock *drock = (struct dumprock *) rock;
+ time_t mark;
+ char *id, *to, *freeme;
+ int idlen, i;
+ unsigned long uid = 0;
+
+ assert((datalen == sizeof(time_t)) ||
+ (datalen == sizeof(time_t) + sizeof(unsigned long)));
+
+ drock->count++;
+
+ memcpy(&mark, data, sizeof(time_t));
+ if (datalen > sizeof(mark))
+ memcpy(&uid, data + sizeof(mark), sizeof(unsigned long));
+ to = (char*) key + strlen(key) + 1;
+ id = (char *) key;
+ idlen = strlen(id);
+
+ for (i = 0; i < idlen; i++) {
+ if (!isprint((unsigned char) id[i])) break;
+ }
+
+ if (i != idlen) {
+ /* change to hexadecimal */
+ freeme = (char *) xmalloc(sizeof(char) * idlen * 2 + 1);
+ for (i = 0; i < idlen; i++) {
+ freeme[2 * i] = hexcodes[(id[i] >> 4) & 0xf];
+ freeme[2 * i + 1] = hexcodes[id[i] & 0xf];
+ }
+ freeme[2 * idlen] = '\0';
+ id = freeme;
+ } else {
+ freeme = NULL;
+ }
+
+ fprintf(drock->f, "id: %-40s\tto: %-20s\tat: %ld\tuid: %lu\n",
+ id, to, (long) mark, uid);
+
+ if (freeme) free(freeme);
+
+ return 0;
+}
+
+int duplicate_dump(FILE *f)
+{
+ struct dumprock drock;
+
+ drock.f = f;
+ drock.count = 0;
+
+ /* check each entry in our database */
+ DB->foreach(dupdb, "", 0, NULL, &dump_cb, &drock, NULL);
+
+ return drock.count;
+}
+
+int duplicate_done(void)
+{
+ int r = 0;
+
+ if (duplicate_dbopen) {
+ r = DB->close(dupdb);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing deliverdb: %s",
+ cyrusdb_strerror(r));
+ }
+ duplicate_dbopen = 0;
+ }
+
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/duplicate.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,64 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: duplicate.h,v 1.14.2.1 2004/02/12 05:32:34 ken3 Exp $ */
+
+#ifndef DUPLICATE_H
+#define DUPLICATE_H
+
+#include "hash.h"
+
+/* name of the duplicate delivery database */
+#define FNAME_DELIVERDB "/deliver.db"
+
+int duplicate_init(char*, int);
+
+time_t duplicate_check(char *id, int idlen, const char *to, int tolen);
+void duplicate_log(char *msgid, const char *name, char *action);
+void duplicate_mark(char *id, int idlen, const char *to, int tolen, time_t mark,
+ unsigned long uid);
+int duplicate_find(char *msgid, int (*proc)(), void *rock);
+
+int duplicate_prune(int days, struct hash_table *expire_table);
+int duplicate_dump(FILE *f);
+
+int duplicate_done(void);
+
+#endif /* DUPLICATE_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fetchnews.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fetchnews.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fetchnews.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fetchnews.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,621 @@
+/* fetchnews.c -- Program to pull new articles from a peer and push to server
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: fetchnews.c,v 1.2.2.13 2006/04/10 16:20:56 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <syslog.h>
+#include <signal.h>
+
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/un.h>
+
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "gmtoff.h"
+#include "lock.h"
+#include "prot.h"
+#include "xmalloc.h"
+
+/* global state */
+const int config_need_data = 0;
+
+#define FNAME_NEWSRCDB "/fetchnews.db"
+#define DB (&cyrusdb_flat)
+
+static struct db *newsrc_db = NULL;
+static int newsrc_dbopen = 0;
+
+/* must be called after cyrus_init */
+int newsrc_init(char *fname, int myflags __attribute__((unused)))
+{
+ char buf[1024];
+ int r = 0;
+
+ if (r != 0)
+ syslog(LOG_ERR, "DBERROR: init %s: %s", buf,
+ cyrusdb_strerror(r));
+ else {
+ char *tofree = NULL;
+
+ /* create db file name */
+ if (!fname) {
+ fname = xmalloc(strlen(config_dir)+sizeof(FNAME_NEWSRCDB));
+ tofree = fname;
+ strcpy(fname, config_dir);
+ strcat(fname, FNAME_NEWSRCDB);
+ }
+
+ r = DB->open(fname, CYRUSDB_CREATE, &newsrc_db);
+ if (r != 0)
+ syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
+ cyrusdb_strerror(r));
+ else
+ newsrc_dbopen = 1;
+
+ if (tofree) free(tofree);
+ }
+
+ return r;
+}
+
+int newsrc_done(void)
+{
+ int r = 0;
+
+ if (newsrc_dbopen) {
+ r = DB->close(newsrc_db);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing fetchnews.db: %s",
+ cyrusdb_strerror(r));
+ }
+ newsrc_dbopen = 0;
+ }
+
+ return r;
+}
+
+void usage(void)
+{
+ fprintf(stderr,
+ "fetchnews [-C <altconfig>] [-s <server>] [-n] [-y] [-w <wildmat>] [-f <tstamp file>]\n"
+ " [-a <authname> [-p <password>]] <peer>\n");
+ exit(-1);
+}
+
+int init_net(const char *host, char *port,
+ struct protstream **in, struct protstream **out)
+{
+ int sock = -1, err;
+ struct addrinfo hints, *res, *res0;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = 0;
+ if ((err = getaddrinfo(host, port, &hints, &res0)) != 0) {
+ syslog(LOG_ERR, "getaddrinfo(%s, %s) failed: %m", host, port);
+ return -1;
+ }
+
+ for (res = res0; res; res = res->ai_next) {
+ if ((sock = socket(res->ai_family, res->ai_socktype,
+ res->ai_protocol)) < 0)
+ continue;
+ if (connect(sock, res->ai_addr, res->ai_addrlen) >= 0)
+ break;
+ close(sock);
+ sock = -1;
+ }
+ freeaddrinfo(res0);
+ if(sock < 0) {
+ syslog(LOG_ERR, "connect(%s:%s) failed: %m", host, port);
+ return -1;
+ }
+
+ *in = prot_new(sock, 0);
+ *out = prot_new(sock, 1);
+ prot_setflushonread(*in, *out);
+
+ return sock;
+}
+
+int fetch(char *msgid, int bymsgid,
+ struct protstream *pin, struct protstream *pout,
+ struct protstream *sin, struct protstream *sout,
+ int *rejected, int *accepted, int *failed)
+{
+ char buf[4096];
+
+ /* see if we want this article */
+ prot_printf(sout, "IHAVE %s\r\n", msgid);
+ if (!prot_fgets(buf, sizeof(buf), sin)) {
+ syslog(LOG_ERR, "IHAVE terminated abnormally");
+ return -1;
+ }
+ else if (strncmp("335", buf, 3)) {
+ /* don't want it */
+ (*rejected)++;
+ return 0;
+ }
+
+ /* fetch the article */
+ if (bymsgid)
+ prot_printf(pout, "ARTICLE %s\r\n", msgid);
+ else
+ prot_printf(pout, "ARTICLE\r\n");
+
+ if (!prot_fgets(buf, sizeof(buf), pin)) {
+ syslog(LOG_ERR, "ARTICLE terminated abnormally");
+ return -1;
+ }
+ else if (strncmp("220", buf, 3)) {
+ /* doh! the article doesn't exist, terminate IHAVE */
+ prot_printf(sout, ".\r\n");
+ }
+ else {
+ /* store the article */
+ while (prot_fgets(buf, sizeof(buf), pin)) {
+ if (buf[0] == '.') {
+ if (buf[1] == '\r' && buf[2] == '\n') {
+ /* End of message */
+ prot_printf(sout, ".\r\n");
+ break;
+ }
+ else if (buf[1] != '.') {
+ /* Add missing dot-stuffing */
+ prot_putc('.', sout);
+ }
+ }
+
+ do {
+ /* look for malformed lines with NUL CR LF */
+ if (buf[strlen(buf)-1] != '\n' &&
+ strlen(buf)+2 < sizeof(buf)-1 &&
+ buf[strlen(buf)+2] == '\n') {
+ strlcat(buf, "\r\n", sizeof(buf));
+ }
+ prot_printf(sout, "%s", buf);
+ } while (buf[strlen(buf)-1] != '\n' &&
+ prot_fgets(buf, sizeof(buf), pin));
+ }
+
+ if (buf[0] != '.') {
+ syslog(LOG_ERR, "ARTICLE terminated abnormally");
+ return -1;
+ }
+ }
+
+ /* see how we did */
+ if (!prot_fgets(buf, sizeof(buf), sin)) {
+ syslog(LOG_ERR, "IHAVE terminated abnormally");
+ return -1;
+ }
+ else if (!strncmp("235", buf, 3))
+ (*accepted)++;
+ else
+ (*failed)++;
+
+ return 0;
+}
+
+#define RESP_GROW 100
+#define BUFFERSIZE 4096
+
+int main(int argc, char *argv[])
+{
+ extern char *optarg;
+ int opt;
+ char *alt_config = NULL, *port = "119";
+ const char *peer = NULL, *server = "localhost", *wildmat = "*";
+ char *authname = NULL, *password = NULL;
+ int psock = -1, ssock = -1;
+ struct protstream *pin, *pout, *sin, *sout;
+ char buf[BUFFERSIZE];
+ char sfile[1024] = "";
+ int fd = -1, i, n, offered, rejected, accepted, failed;
+ time_t stamp;
+ char **resp = NULL;
+ int newnews = 1;
+ char *datefmt = "%y%m%d %H%M%S";
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:s:w:f:a:p:ny")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 's': /* server */
+ server = xstrdup(optarg);
+ if ((port = strchr(server, ':')))
+ *port++ = '\0';
+ else
+ port = "119";
+ break;
+
+ case 'w': /* wildmat */
+ wildmat = optarg;
+ break;
+
+ case 'f': /* timestamp file */
+ snprintf(sfile, sizeof(sfile), optarg);
+ break;
+
+ case 'a': /* authname */
+ authname = optarg;
+ break;
+
+ case 'p': /* password */
+ password = optarg;
+ break;
+
+ case 'n': /* no newnews */
+ newnews = 0;
+ break;
+
+ case 'y': /* newsserver is y2k compliant */
+ datefmt = "%Y%m%d %H%M%S";
+ break;
+
+ default:
+ usage();
+ /* NOTREACHED */
+ }
+ }
+ if (argc - optind < 1) {
+ usage();
+ /* NOTREACHED */
+ }
+
+ peer = argv[optind++];
+
+ cyrus_init(alt_config, "fetchnews", 0);
+
+ /* connect to the peer */
+ /* xxx configurable port number? */
+ if ((psock = init_net(peer, "119", &pin, &pout)) < 0) {
+ fprintf(stderr, "connection to %s failed\n", peer);
+ cyrus_done();
+ exit(-1);
+ }
+
+ /* read the initial greeting */
+ if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("20", buf, 2)) {
+ syslog(LOG_ERR, "peer not available");
+ goto quit;
+ }
+
+ if (authname) {
+ /* authenticate to peer */
+ /* XXX this should be modified to support SASL and STARTTLS */
+
+ prot_printf(pout, "AUTHINFO USER %s\r\n", authname);
+ if (!prot_fgets(buf, sizeof(buf), pin)) {
+ syslog(LOG_ERR, "AUTHINFO USER terminated abnormally");
+ goto quit;
+ }
+ else if (!strncmp("381", buf, 3)) {
+ /* password required */
+ if (!password)
+ password = getpass("Please enter the password: ");
+
+ if (!password) {
+ fprintf(stderr, "failed to get password\n");
+ goto quit;
+ }
+
+ prot_printf(pout, "AUTHINFO PASS %s\r\n", password);
+ if (!prot_fgets(buf, sizeof(buf), pin)) {
+ syslog(LOG_ERR, "AUTHINFO PASS terminated abnormally");
+ goto quit;
+ }
+ }
+
+ if (strncmp("281", buf, 3)) {
+ /* auth failed */
+ goto quit;
+ }
+ }
+
+ /* change to reader mode - not always necessary, so ignore result */
+ prot_printf(pout, "MODE READER\r\n");
+ prot_fgets(buf, sizeof(buf), pin);
+
+ if (newnews) {
+ struct tm ctime, *ptime;
+
+ /* fetch the server's current time */
+ prot_printf(pout, "DATE\r\n");
+
+ if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("111 ", buf, 4)) {
+ syslog(LOG_ERR, "error fetching DATE");
+ goto quit;
+ }
+
+ /* parse and normalize the server time */
+ memset(&ctime, 0, sizeof(struct tm));
+ sscanf(buf+4, "%4d%02d%02d%02d%02d%02d",
+ &ctime.tm_year, &ctime.tm_mon, &ctime.tm_mday,
+ &ctime.tm_hour, &ctime.tm_min, &ctime.tm_sec);
+ ctime.tm_year -= 1900;
+ ctime.tm_mon--;
+ ctime.tm_isdst = -1;
+
+ /* read the previous timestamp */
+ if (!sfile[0]) {
+ char oldfile[1024];
+
+ snprintf(sfile, sizeof(sfile), "%s/fetchnews.stamp", config_dir);
+
+ /* upgrade from the old stamp filename to the new */
+ snprintf(oldfile, sizeof(oldfile), "%s/newsstamp", config_dir);
+ rename(oldfile, sfile);
+ }
+
+ if ((fd = open(sfile, O_RDWR | O_CREAT, 0644)) == -1) {
+ syslog(LOG_ERR, "can not open %s", sfile);
+ goto quit;
+ }
+ if (lock_nonblocking(fd) == -1) {
+ syslog(LOG_ERR, "can not lock %s: %m", sfile);
+ goto quit;
+ }
+
+ if (read(fd, &stamp, sizeof(stamp)) < sizeof(stamp)) {
+ /* XXX do something better here */
+ stamp = 0;
+ }
+
+ /* ask for new articles */
+ if (stamp) stamp -= 180; /* adjust back 3 minutes */
+ ptime = gmtime(&stamp);
+ ptime->tm_isdst = -1;
+ strftime(buf, sizeof(buf), datefmt, ptime);
+ prot_printf(pout, "NEWNEWS %s %s GMT\r\n", wildmat, buf);
+
+ if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("230", buf, 3)) {
+ syslog(LOG_ERR, "peer doesn't support NEWNEWS");
+ newnews = 0;
+ }
+
+ /* prepare server's current time as new timestamp */
+ stamp = mktime(&ctime);
+ /* adjust for local timezone
+
+ XXX We need to do this because we use gmtime() above.
+ We can't change this, otherwise we'd be incompatible
+ with an old localtime timestamp.
+ */
+ stamp += gmtoff_of(&ctime, stamp);
+ }
+
+ if (!newnews) {
+ prot_printf(pout, "LIST ACTIVE %s\r\n", wildmat);
+
+ if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("215", buf, 3)) {
+ syslog(LOG_ERR, "peer doesn't support LIST ACTIVE");
+ goto quit;
+ }
+ }
+
+ /* process the NEWNEWS/LIST ACTIVE list */
+ n = 0;
+ while (prot_fgets(buf, sizeof(buf), pin)) {
+ if (buf[0] == '.') break;
+
+ if (!(n % RESP_GROW)) { /* time to alloc more */
+ resp = (char **)
+ xrealloc(resp, (n + RESP_GROW) * sizeof(char *));
+ }
+ resp[n++] = xstrdup(buf);
+ }
+ if (buf[0] != '.') {
+ syslog(LOG_ERR, "%s terminated abnormally",
+ newnews ? "NEWNEWS" : "LIST ACTIVE");
+ goto quit;
+ }
+
+ if (!n) {
+ /* nothing matches our wildmat */
+ goto quit;
+ }
+
+ /* connect to the server */
+ if ((ssock = init_net(server, port, &sin, &sout)) < 0) {
+ fprintf(stderr, "connection to %s failed\n", server);
+ goto quit;
+ }
+
+ /* read the initial greeting */
+ if (!prot_fgets(buf, sizeof(buf), sin) || strncmp("20", buf, 2)) {
+ syslog(LOG_ERR, "server not available");
+ goto quit;
+ }
+
+ /* fetch and store articles */
+ offered = rejected = accepted = failed = 0;
+ if (newnews) {
+ /* response is a list of msgids */
+ for (i = 0; i < n; i++) {
+ /* find the end of the msgid */
+ *(strrchr(resp[i], '>') + 1) = '\0';
+
+ offered++;
+ if (fetch(resp[i], 1, pin, pout, sin, sout,
+ &rejected, &accepted, &failed)) {
+ goto quit;
+ }
+ }
+
+ /* write the current timestamp */
+ lseek(fd, 0, SEEK_SET);
+ if (write(fd, &stamp, sizeof(stamp)) < sizeof(stamp))
+ syslog(LOG_ERR, "error writing %s", sfile);
+ lock_unlock(fd);
+ close(fd);
+ }
+ else {
+ char group[BUFFERSIZE], msgid[BUFFERSIZE], lastbuf[50];
+ const char *data;
+ unsigned long low, high, last, cur;
+ int start;
+ int datalen;
+ struct txn *tid = NULL;
+
+ newsrc_init(NULL, 0);
+
+ /*
+ * response is a list of groups.
+ * select each group, and STAT each article we haven't seen yet.
+ */
+ for (i = 0; i < n; i++) {
+ /* parse the LIST ACTIVE response */
+ sscanf(resp[i], "%s %lu %lu", group, &high, &low);
+
+ last = 0;
+ if (!DB->fetchlock(newsrc_db, group, strlen(group),
+ &data, &datalen, &tid)) {
+ last = strtoul(data, NULL, 10);
+ }
+ if (high <= last) continue;
+
+ /* select the group */
+ prot_printf(pout, "GROUP %s\r\n", group);
+ if (!prot_fgets(buf, sizeof(buf), pin)) {
+ syslog(LOG_ERR, "GROUP terminated abnormally");
+ continue;
+ }
+ else if (strncmp("211", buf, 3)) break;
+
+ for (start = 1, cur = low > last ? low : ++last;; cur++) {
+ if (start) {
+ /* STAT the first article we haven't seen */
+ prot_printf(pout, "STAT %lu\r\n", cur);
+ } else {
+ /* continue with the NEXT article */
+ prot_printf(pout, "NEXT\r\n");
+ }
+
+ if (!prot_fgets(buf, sizeof(buf), pin)) {
+ syslog(LOG_ERR, "STAT/NEXT terminated abnormally");
+ cur--;
+ break;
+ }
+ if (!strncmp("223", buf, 3)) {
+ /* parse the STAT/NEXT response */
+ sscanf(buf, "223 %lu %s", &cur, msgid);
+
+ /* find the end of the msgid */
+ *(strrchr(msgid, '>') + 1) = '\0';
+
+ if (fetch(msgid, 0, pin, pout, sin, sout,
+ &rejected, &accepted, &failed)) {
+ cur--;
+ break;
+ }
+ offered++;
+ start = 0;
+ }
+
+ /* have we reached the highwater mark? */
+ if (cur >= high) break;
+ }
+
+ snprintf(lastbuf, sizeof(lastbuf), "%lu", cur);
+ DB->store(newsrc_db, group, strlen(group),
+ lastbuf, strlen(lastbuf)+1, &tid);
+ }
+
+ if (tid) DB->commit(newsrc_db, tid);
+ newsrc_done();
+ }
+
+ syslog(LOG_NOTICE,
+ "fetchnews: %s offered %d; %s rejected %d, accepted %d, failed %d",
+ peer, offered, server, rejected, accepted, failed);
+
+ quit:
+ if (psock >= 0) {
+ prot_printf(pout, "QUIT\r\n");
+ prot_flush(pout);
+
+ /* Flush the incoming buffer */
+ prot_NONBLOCK(pin);
+ prot_fill(pin);
+
+ /* close/free socket & prot layer */
+ close(psock);
+
+ prot_free(pin);
+ prot_free(pout);
+ }
+
+ if (ssock >= 0) {
+ prot_printf(sout, "QUIT\r\n");
+ prot_flush(sout);
+
+ /* Flush the incoming buffer */
+ prot_NONBLOCK(sin);
+ prot_fill(sin);
+
+ /* close/free socket & prot layer */
+ close(psock);
+
+ prot_free(sin);
+ prot_free(sout);
+ }
+
+ cyrus_done();
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fud.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fud.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fud.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/fud.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,513 @@
+/* fud.c -- long-lived finger information provider
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+
+ */
+
+#include <config.h>
+
+/* $Id: fud.c,v 1.48.2.6 2005/04/13 15:43:36 shadow Exp $ */
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <errno.h>
+#include <pwd.h>
+
+#include "assert.h"
+#include "mboxlist.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "xmalloc.h"
+#include "acl.h"
+#include "seen.h"
+#include "mboxname.h"
+#include "map.h"
+
+#define REQ_OK 0
+#define REQ_DENY 1
+#define REQ_UNK 2
+
+extern int optind;
+
+/* current namespace */
+static struct namespace fud_namespace;
+
+/* config.c info. note that technically we may need partition data, but
+ * only if we're not on a frontend, so we won't flat-out require it here */
+const int config_need_data = 0;
+
+/* forward decls */
+extern void setproctitle_init(int argc, char **argv, char **envp);
+
+int handle_request(const char *who, const char *name,
+ struct sockaddr_storage sfrom, socklen_t sfromsiz);
+
+void send_reply(struct sockaddr_storage sfrom, socklen_t sfromsiz, int status,
+ const char *user, const char *mbox,
+ int numrecent, time_t lastread, time_t lastarrived);
+
+int soc = 0; /* inetd (master) has handed us the port as stdin */
+
+char who[16];
+
+#define MAXLOGNAME 16 /* should find out for real */
+#define MAXDOMNAME 20 /* should find out for real */
+
+int begin_handling(void)
+{
+ struct sockaddr_storage sfrom;
+ socklen_t sfromsiz = sizeof(sfrom);
+ int r;
+ char buf[MAXLOGNAME + MAXDOMNAME+ MAX_MAILBOX_NAME + 1];
+ char username[MAXLOGNAME + MAXDOMNAME];
+ char mbox[MAX_MAILBOX_NAME+1];
+ char *q;
+ int off;
+ int maxuserlen = MAXLOGNAME + config_virtdomains ? MAXDOMNAME : 0;
+
+ while(1) {
+ /* For safety */
+ memset(username,'\0',MAXLOGNAME + MAXDOMNAME);
+ memset(mbox,'\0',MAX_MAILBOX_NAME+1);
+ memset(buf, '\0', MAXLOGNAME + MAX_MAILBOX_NAME + 1);
+
+ if (signals_poll() == SIGHUP) {
+ /* caught a SIGHUP, return */
+ return 0;
+ }
+ r = recvfrom(soc, buf, 511, 0,
+ (struct sockaddr *) &sfrom, &sfromsiz);
+ if (r == -1) {
+ return(errno);
+ }
+ for(off = 0; buf[off] != '|' && off < maxuserlen; off++);
+ if(off > 0 && off < maxuserlen) {
+ strncpy(username,buf,off);
+ username[off] = '\0';
+ } else {
+ continue;
+ }
+
+ /* Copy what is past the | to the mailbox name */
+ q = buf + off + 1;
+ strlcpy(mbox, q, sizeof(mbox));
+
+ handle_request(username,mbox,sfrom,sfromsiz);
+ }
+
+ /* never reached */
+}
+
+void shut_down(int code) __attribute__((noreturn));
+void shut_down(int code)
+{
+ seen_done();
+ mboxlist_close();
+ mboxlist_done();
+ closelog();
+ cyrus_done();
+ exit(code);
+}
+
+
+/*
+ * run once when process is forked;
+ * MUST NOT exit directly; must return with non-zero error code
+ */
+int service_init(int argc, char **argv, char **envp)
+{
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ setproctitle_init(argc, argv, envp);
+
+ signals_set_shutdown(&shut_down);
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+ mailbox_initialize();
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+int service_main(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ int r = 0;
+
+ /* Set namespace */
+ if ((r = mboxname_init_namespace(&fud_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ r = begin_handling();
+
+ shut_down(r);
+ return 0;
+}
+
+static void cyrus_timeout(int signo __attribute__((unused)))
+{
+ return;
+}
+
+static int setsigalrm(int enable)
+
+{
+ struct sigaction action;
+
+ sigemptyset(&action.sa_mask);
+
+ action.sa_flags = 0;
+
+ if(enable) {
+ action.sa_handler = cyrus_timeout;
+ } else {
+ action.sa_handler = SIG_IGN;
+ }
+
+ if (sigaction(SIGALRM, &action, NULL) < 0) {
+ syslog(LOG_ERR, "installing SIGALRM handler: sigaction: %m");
+ return -1;
+ }
+
+ return 0;
+}
+
+
+/* Send a proxy request to the backend, send their reply to sfrom */
+int do_proxy_request(const char *who, const char *name,
+ const char *backend_host,
+ struct sockaddr_storage sfrom, socklen_t sfromsiz)
+{
+ char tmpbuf[1024];
+ int rc;
+ int csoc = -1;
+ int error;
+ struct sockaddr_storage cin, cout;
+ struct addrinfo hints, *res0, *res;
+ socklen_t cinsiz, coutsiz;
+ static char *backend_port = NULL; /* fud port */
+
+ /* Open a UDP socket to the Cyrus mail server */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_DGRAM;
+ if (!backend_port) {
+ backend_port = "fud";
+ error = getaddrinfo(backend_host, backend_port, &hints, &res0);
+ if (error == EAI_SERVICE) {
+ backend_port = "4201"; /* default fud port */
+ error = getaddrinfo(backend_host, backend_port, &hints, &res0);
+ }
+ } else
+ error = getaddrinfo(backend_host, backend_port, &hints, &res0);
+ if (error != 0) {
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ rc = IMAP_SERVER_UNAVAILABLE;
+ goto done;
+ }
+
+ /*
+ * XXX: Since UDP is used, we cannot use an IPv6->IPv4 fallback
+ * strategy, here. So, when we can use same address family with
+ * incoming packet, just try it. When same address family is not
+ * found in DNS, we try another one.
+ */
+ csoc = -1;
+ for (res = res0; res; res = res->ai_next) {
+ if (res->ai_family == sfrom.ss_family) {
+ csoc = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+ break;
+ }
+ }
+ if (csoc < 0) {
+ for (res = res0; res; res = res->ai_next) {
+ if (res->ai_family != sfrom.ss_family &&
+ (res->ai_family == AF_INET || res->ai_family == AF_INET6)) {
+ csoc = socket(res->ai_family, res->ai_socktype,
+ res->ai_protocol);
+ break;
+ }
+ }
+ }
+ if (csoc < 0) {
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ rc = IMAP_SERVER_UNAVAILABLE;
+ freeaddrinfo(res0);
+ goto done;
+ }
+
+ memcpy(&cin, res->ai_addr, res->ai_addrlen);
+ cinsiz = res->ai_addrlen;
+ freeaddrinfo(res0);
+
+ /* Write a Cyrus query into *tmpbuf */
+ memset (tmpbuf, '\0', sizeof(tmpbuf));
+ snprintf (tmpbuf, sizeof(tmpbuf), "%s|%s", who, name);
+
+ /* Send the query and wait for a reply */
+ sendto (csoc, tmpbuf, strlen (tmpbuf), 0,
+ (struct sockaddr *) &cin, cinsiz);
+ memset (tmpbuf, '\0', strlen (tmpbuf));
+
+ if (setsigalrm(1) < 0) {
+ rc = IMAP_SERVER_UNAVAILABLE;
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ goto done;
+ }
+
+ rc = 0;
+ coutsiz = sizeof(cout);
+ alarm (1);
+ rc = recvfrom (csoc, tmpbuf, sizeof(tmpbuf), 0,
+ (struct sockaddr *) &cout, &coutsiz);
+ alarm (0);
+
+ setsigalrm(0); /* Failure isn't really terrible here */
+
+ if (rc < 1) {
+ rc = IMAP_SERVER_UNAVAILABLE;
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ goto done;
+ }
+
+ /* Send reply back */
+ /* rc is size */
+ sendto(soc, tmpbuf, rc, 0, (struct sockaddr *) &sfrom, sfromsiz);
+ rc = 0;
+
+ done:
+ if(csoc != -1) close(csoc);
+ return rc;
+}
+
+int handle_request(const char *who, const char *name,
+ struct sockaddr_storage sfrom, socklen_t sfromsiz)
+{
+ int r;
+ struct mailbox mailbox;
+ struct seen *seendb;
+ time_t lastread;
+ time_t lastarrived;
+ unsigned recentuid;
+ char *seenuids;
+ unsigned numrecent;
+ char mboxname[MAX_MAILBOX_NAME+1];
+ char *location, *acl;
+ int mbflag;
+
+ numrecent = 0;
+ lastread = 0;
+ lastarrived = 0;
+
+ r = (*fud_namespace.mboxname_tointernal)(&fud_namespace,name,who,mboxname);
+ if (r) return r;
+
+ r = mboxlist_detail(mboxname, &mbflag, &location, NULL, NULL, &acl, NULL);
+ if(r || mbflag & MBTYPE_RESERVE) {
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ return r;
+ }
+
+ if(mbflag & MBTYPE_REMOTE) {
+ struct auth_state *mystate;
+ char *p = NULL;
+
+ /* xxx hide that we are storing partitions */
+ p = strchr(location, '!');
+ if(p) *p = '\0';
+
+ /* Check the ACL */
+ mystate = auth_newstate("anonymous");
+ if(cyrus_acl_myrights(mystate, acl) & ACL_USER0) {
+ /* We want to proxy this one */
+ auth_freestate(mystate);
+ return do_proxy_request(who, name, location, sfrom, sfromsiz);
+ } else {
+ /* Permission Denied */
+ auth_freestate(mystate);
+ send_reply(sfrom, sfromsiz, REQ_DENY, who, name, 0, 0, 0);
+ return 0;
+ }
+ }
+
+ /*
+ * Open/lock header
+ */
+ r = mailbox_open_header(mboxname, NULL, &mailbox);
+ if (r) {
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ return r;
+ }
+
+ r = mailbox_open_index(&mailbox);
+ if (r) {
+ mailbox_close(&mailbox);
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ return r;
+ }
+
+ if (mboxname_isusermailbox(mboxname, 0) && !(mailbox.myrights & ACL_USER0)) {
+ mailbox_close(&mailbox);
+ send_reply(sfrom, sfromsiz, REQ_DENY, who, name, 0, 0, 0);
+ return 0;
+ }
+
+ r = seen_open(&mailbox, who, 0, &seendb);
+
+/*
+ mailbox_close(&mailbox);
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ return r;
+ }
+*/
+
+ if (!r) {
+ seenuids = NULL;
+ r = seen_read(seendb, &lastread, &recentuid, &lastarrived, &seenuids);
+ if (seenuids) free(seenuids);
+ seen_close(seendb);
+ if (r) {
+ mailbox_close(&mailbox);
+ send_reply(sfrom, sfromsiz, REQ_UNK, who, name, 0, 0, 0);
+ return r;
+ }
+ } else {
+ /* Fake Data -- couldn't open seen database */
+ lastread = 0;
+ recentuid = 0;
+ lastarrived = 0;
+ seenuids = "";
+ }
+
+ lastarrived = mailbox.last_appenddate;
+ {
+ const char *base;
+ unsigned long len = 0;
+ unsigned int msg;
+ unsigned uid;
+
+ map_refresh(mailbox.index_fd, 0, &base, &len,
+ mailbox.start_offset +
+ mailbox.exists * mailbox.record_size,
+ "index", mailbox.name);
+ for (msg = 0; msg < mailbox.exists; msg++) {
+ uid = ntohl(*((bit32 *)(base + mailbox.start_offset +
+ msg * mailbox.record_size +
+ OFFSET_UID)));
+ if (uid > recentuid) numrecent++;
+ }
+ map_free(&base, &len);
+ }
+
+ mailbox_close(&mailbox);
+
+ send_reply(sfrom, sfromsiz, REQ_OK, who, name, numrecent,
+ lastread, lastarrived);
+
+ return(0);
+}
+
+void
+send_reply(struct sockaddr_storage sfrom, socklen_t sfromsiz,
+ int status, const char *user, const char *mbox,
+ int numrecent, time_t lastread, time_t lastarrived)
+{
+ char buf[MAX_MAILBOX_PATH + 16 + 9];
+ int siz;
+
+ switch(status) {
+ case REQ_DENY:
+ sendto(soc,"PERMDENY",9,0,(struct sockaddr *) &sfrom, sfromsiz);
+ break;
+ case REQ_OK:
+ siz = snprintf(buf, sizeof(buf), "%s|%s|%d|%d|%d",
+ user,mbox,numrecent,(int) lastread,
+ (int)lastarrived);
+ sendto(soc,buf,siz,0,(struct sockaddr *) &sfrom, sfromsiz);
+ break;
+ case REQ_UNK:
+ sendto(soc,"UNKNOWN",8,0,(struct sockaddr *) &sfrom, sfromsiz);
+ break;
+ }
+}
+
+void fatal(const char* s, int code)
+{
+ static int recurse_code = 0;
+ if (recurse_code) {
+ /* We were called recursively. Just give up */
+ exit(code);
+ }
+ recurse_code = code;
+ syslog(LOG_ERR, "Fatal error: %s", s);
+
+ shut_down(code);
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for FUD!",
+ EC_SOFTWARE);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,657 @@
+/* global.c -- Configuration routines
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: global.c,v 1.2.2.15 2005/12/13 19:35:50 murch Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <errno.h>
+
+#include "acl.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "gmtoff.h"
+#include "hash.h"
+#include "imap_err.h"
+#include "global.h"
+#include "libconfig.h"
+#include "libcyr_cfg.h"
+#include "mboxlist.h"
+#include "mupdate_err.h"
+#include "mutex.h"
+#include "prot.h" /* for PROT_BUFSIZE */
+#include "util.h"
+#include "xmalloc.h"
+
+static enum {
+ NOT_RUNNING = 0,
+ RUNNING = 1,
+ DONE = 2
+} cyrus_init_run = NOT_RUNNING;
+
+static int cyrus_init_nodb = 0;
+
+int config_implicitrights; /* "lca" */
+unsigned long config_metapartition_files; /* 0 */
+struct cyrusdb_backend *config_mboxlist_db;
+struct cyrusdb_backend *config_quota_db;
+struct cyrusdb_backend *config_subscription_db;
+struct cyrusdb_backend *config_annotation_db;
+struct cyrusdb_backend *config_seenstate_db;
+struct cyrusdb_backend *config_mboxkey_db;
+struct cyrusdb_backend *config_duplicate_db;
+struct cyrusdb_backend *config_tlscache_db;
+struct cyrusdb_backend *config_ptscache_db;
+
+/* Called before a cyrus application starts (but after command line parameters
+ * are read) */
+int cyrus_init(const char *alt_config, const char *ident, unsigned flags)
+{
+ char *p;
+ const char *val;
+ const char *prefix;
+ int umaskval = 0;
+
+ if(cyrus_init_run != NOT_RUNNING) {
+ fatal("cyrus_init called twice!", EC_CONFIG);
+ } else {
+ cyrus_init_run = RUNNING;
+ }
+
+ cyrus_init_nodb = (flags & CYRUSINIT_NODB);
+
+ initialize_imap_error_table();
+ initialize_mupd_error_table();
+
+ if(!ident)
+ fatal("service name was not specified to cyrus_init", EC_CONFIG);
+
+ config_ident = ident;
+
+ /* xxx we lose here since we can't have the prefix until we load the
+ * config file */
+ openlog(config_ident, LOG_PID, SYSLOG_FACILITY);
+
+ /* Load configuration file. This will set config_dir when it finds it */
+ config_read(alt_config);
+
+ prefix = config_getstring(IMAPOPT_SYSLOG_PREFIX);
+
+ /* Reopen the log with the new prefix, if needed */
+ if(prefix) {
+ int size = strlen(prefix) + 1 + strlen(ident) + 1;
+ char *ident_buf = xmalloc(size);
+
+ strlcpy(ident_buf, prefix, size);
+ strlcat(ident_buf, "/", size);
+ strlcat(ident_buf, ident, size);
+
+ closelog();
+ openlog(ident_buf, LOG_PID, SYSLOG_FACILITY);
+
+ /* don't free the openlog() string! */
+ }
+
+ /* Look up default partition */
+ config_defpartition = config_getstring(IMAPOPT_DEFAULTPARTITION);
+ for (p = (char *)config_defpartition; *p; p++) {
+ if (!isalnum((unsigned char) *p))
+ fatal("defaultpartition option contains non-alphanumeric character",
+ EC_CONFIG);
+ if (isupper((unsigned char) *p)) *p = tolower((unsigned char) *p);
+ }
+
+ /* Look up umask */
+ val = config_getstring(IMAPOPT_UMASK);
+ while (*val) {
+ if (*val >= '0' && *val <= '7') umaskval = umaskval*8 + *val - '0';
+ val++;
+ }
+ umask(umaskval);
+
+ /* look up and canonify the implicit rights of mailbox owners */
+ config_implicitrights =
+ cyrus_acl_strtomask(config_getstring(IMAPOPT_IMPLICIT_OWNER_RIGHTS));
+
+ config_metapartition_files = config_getbitfield(IMAPOPT_METAPARTITION_FILES);
+
+ if (!cyrus_init_nodb) {
+ /* lookup the database backends */
+ config_mboxlist_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_MBOXLIST_DB));
+ config_quota_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_QUOTA_DB));
+ config_subscription_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_SUBSCRIPTION_DB));
+ config_annotation_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_ANNOTATION_DB));
+ config_seenstate_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_SEENSTATE_DB));
+ config_mboxkey_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_MBOXKEY_DB));
+ config_duplicate_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_DUPLICATE_DB));
+ config_tlscache_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_TLSCACHE_DB));
+ config_ptscache_db =
+ cyrusdb_fromname(config_getstring(IMAPOPT_PTSCACHE_DB));
+
+ /* configure libcyrus as needed */
+ libcyrus_config_setstring(CYRUSOPT_CONFIG_DIR, config_dir);
+ libcyrus_config_setswitch(CYRUSOPT_AUTH_UNIX_GROUP_ENABLE,
+ config_getswitch(IMAPOPT_UNIX_GROUP_ENABLE));
+ libcyrus_config_setswitch(CYRUSOPT_USERNAME_TOLOWER,
+ config_getswitch(IMAPOPT_USERNAME_TOLOWER));
+ libcyrus_config_setswitch(CYRUSOPT_SKIPLIST_UNSAFE,
+ config_getswitch(IMAPOPT_SKIPLIST_UNSAFE));
+ libcyrus_config_setstring(CYRUSOPT_TEMP_PATH,
+ config_getstring(IMAPOPT_TEMP_PATH));
+ libcyrus_config_setint(CYRUSOPT_PTS_CACHE_TIMEOUT,
+ config_getint(IMAPOPT_PTSCACHE_TIMEOUT));
+ libcyrus_config_setswitch(CYRUSOPT_FULLDIRHASH,
+ config_getswitch(IMAPOPT_FULLDIRHASH));
+ libcyrus_config_setstring(CYRUSOPT_PTSCACHE_DB,
+ config_getstring(IMAPOPT_PTSCACHE_DB));
+ libcyrus_config_setstring(CYRUSOPT_PTLOADER_SOCK,
+ config_getstring(IMAPOPT_PTLOADER_SOCK));
+ libcyrus_config_setswitch(CYRUSOPT_VIRTDOMAINS,
+ config_getenum(IMAPOPT_VIRTDOMAINS));
+ libcyrus_config_setint(CYRUSOPT_BERKELEY_CACHESIZE,
+ config_getint(IMAPOPT_BERKELEY_CACHESIZE));
+ libcyrus_config_setstring(CYRUSOPT_AUTH_MECH,
+ config_getstring(IMAPOPT_AUTH_MECH));
+ libcyrus_config_setint(CYRUSOPT_BERKELEY_LOCKS_MAX,
+ config_getint(IMAPOPT_BERKELEY_LOCKS_MAX));
+ libcyrus_config_setint(CYRUSOPT_BERKELEY_TXNS_MAX,
+ config_getint(IMAPOPT_BERKELEY_TXNS_MAX));
+ libcyrus_config_setstring(CYRUSOPT_DELETERIGHT,
+ config_getstring(IMAPOPT_DELETERIGHT));
+
+ /* Not until all configuration parameters are set! */
+ libcyrus_init();
+ }
+
+ return 0;
+}
+
+void global_sasl_init(int client, int server, const sasl_callback_t *callbacks)
+{
+ static int called_already = 0;
+
+ assert(client || server);
+ assert(!called_already);
+
+ called_already = 1;
+
+ /* set the SASL allocation functions */
+ sasl_set_alloc((sasl_malloc_t *) &xmalloc,
+ (sasl_calloc_t *) &calloc,
+ (sasl_realloc_t *) &xrealloc,
+ (sasl_free_t *) &free);
+
+ /* set the SASL mutex functions */
+ sasl_set_mutex((sasl_mutex_alloc_t *) &cyrus_mutex_alloc,
+ (sasl_mutex_lock_t *) &cyrus_mutex_lock,
+ (sasl_mutex_unlock_t *) &cyrus_mutex_unlock,
+ (sasl_mutex_free_t *) &cyrus_mutex_free);
+
+ if(client && sasl_client_init(callbacks)) {
+ fatal("could not init sasl (client)", EC_SOFTWARE);
+ }
+
+ if(server && sasl_server_init(callbacks, "Cyrus")) {
+ fatal("could not init sasl (server)", EC_SOFTWARE);
+ }
+}
+
+/* this is a wrapper to call the cyrus configuration from SASL */
+int mysasl_config(void *context __attribute__((unused)),
+ const char *plugin_name,
+ const char *option,
+ const char **result,
+ unsigned *len)
+{
+ char opt[1024];
+
+ if (!strcmp(option, "srvtab")) {
+ /* we don't transform srvtab! */
+ *result = config_getstring(IMAPOPT_SRVTAB);
+ } else {
+ *result = NULL;
+
+ if (plugin_name) {
+ /* first try it with the plugin name */
+ strlcpy(opt, "sasl_", sizeof(opt));
+ strlcat(opt, plugin_name, sizeof(opt));
+ strlcat(opt, "_", sizeof(opt));
+ strlcat(opt, option, sizeof(opt));
+ *result = config_getoverflowstring(opt, NULL);
+ }
+
+ if (*result == NULL) {
+ /* try without the plugin name */
+ strlcpy(opt, "sasl_", sizeof(opt));
+ strlcat(opt, option, sizeof(opt));
+ *result = config_getoverflowstring(opt, NULL);
+ }
+ }
+
+ if (*result != NULL) {
+ if (len) { *len = strlen(*result); }
+ return SASL_OK;
+ }
+
+ return SASL_FAIL;
+}
+
+/* This creates a structure that defines the allowable
+ * security properties
+ */
+sasl_security_properties_t *mysasl_secprops(int flags)
+{
+ static sasl_security_properties_t ret;
+
+ ret.maxbufsize = PROT_BUFSIZE;
+ ret.min_ssf = config_getint(IMAPOPT_SASL_MINIMUM_LAYER);
+ /* minimum allowable security strength */
+ ret.max_ssf = config_getint(IMAPOPT_SASL_MAXIMUM_LAYER);
+ /* maximum allowable security strength */
+
+ ret.security_flags = flags;
+ /* ret.security_flags |= SASL_SEC_NOPLAINTEXT; */
+ if (!config_getswitch(IMAPOPT_ALLOWANONYMOUSLOGIN)) {
+ ret.security_flags |= SASL_SEC_NOANONYMOUS;
+ }
+ ret.property_names = NULL;
+ ret.property_values = NULL;
+
+ return &ret;
+}
+
+/* true if 'authstate' is in 'opt' */
+int global_authisa(struct auth_state *authstate, enum imapopt opt)
+{
+ char buf[1024];
+ const char *val = config_getstring(opt);
+ int len;
+
+ /* Is the option defined? */
+ if(!val) return 0;
+
+ while (*val) {
+ char *p;
+
+ for (p = (char *) val; *p && !isspace((int) *p); p++);
+ len = p-val;
+ if(len >= sizeof(buf))
+ len = sizeof(buf) - 1;
+ memcpy(buf, val, len);
+ buf[len] = '\0';
+
+ if (auth_memberof(authstate, buf)) {
+ return 1;
+ }
+ val = p;
+ while (*val && isspace((int) *val)) val++;
+ }
+
+ return 0;
+}
+
+/* Note: This function is not idempotent! Only call it once for a given ID
+ * or you will be unhappy (think IP hosting). */
+char *canonify_userid(char *user, char *loginid, int *domain_from_ip)
+{
+ char *domain = NULL;
+ int len = strlen(user);
+ char buf[81];
+
+ /* check for domain */
+ if (config_virtdomains &&
+ ((domain = strrchr(user, '@')) || (domain = strrchr(user, '%')))) {
+ *domain = '@';
+ len = domain - user;
+ }
+
+ /* check for global identifiers */
+ if (is_userid_anonymous(user)) {
+ return "anonymous";
+ }
+ else if ((len == 7 && strncasecmp(user, "anybody", len) == 0) ||
+ (len == 6 && strncasecmp(user, "anyone", len) == 0)) {
+ return "anyone";
+ }
+
+ if (config_virtdomains) {
+ if (domain) {
+ if (config_defdomain && !strcasecmp(config_defdomain, domain+1)) {
+ *domain = '\0'; /* trim the default domain */
+ }
+ }
+ else if (loginid) { /* used for LISTRIGHTS */
+ if ((domain = strrchr(loginid, '@'))) {
+ /* append the domain from the login id */
+ snprintf(buf, sizeof(buf), "%s@%s", user, domain+1);
+ user = buf;
+ }
+ }
+ else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID) {
+ socklen_t salen;
+ int error;
+ struct sockaddr_storage localaddr;
+ char hbuf[NI_MAXHOST];
+
+ salen = sizeof(localaddr);
+ if (getsockname(0, (struct sockaddr *)&localaddr, &salen) == 0) {
+ error = getnameinfo((struct sockaddr *)&localaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD);
+ if (error == 0 && (domain = strchr(hbuf, '.')) &&
+ !(config_defdomain && !strcasecmp(config_defdomain, domain+1))) {
+ /* append the domain from our IP */
+ snprintf(buf, sizeof(buf), "%s@%s", user, domain+1);
+ user = buf;
+
+ if (domain_from_ip) *domain_from_ip = 1;
+ }
+ }
+ }
+ }
+
+ return auth_canonifyid(user, 0);
+}
+
+int mysasl_canon_user(sasl_conn_t *conn,
+ void *context,
+ const char *user, unsigned ulen,
+ unsigned flags __attribute__((unused)),
+ const char *user_realm __attribute__((unused)),
+ char *out,
+ unsigned out_max, unsigned *out_ulen)
+{
+ char *canonuser = NULL;
+
+ if (ulen+1 > out_max) {
+ sasl_seterror(conn, 0, "buffer overflow while canonicalizing");
+ return SASL_BUFOVER;
+ }
+ memcpy(out, user, ulen);
+ out[ulen] = '\0';
+
+ canonuser = canonify_userid(out, NULL, (int*) context);
+ if (!canonuser) {
+ sasl_seterror(conn, 0, "bad userid authenticated");
+ return SASL_BADAUTH;
+ }
+ *out_ulen = strlen(canonuser);
+ if (*out_ulen >= out_max) {
+ sasl_seterror(conn, 0, "buffer overflow while canonicalizing");
+ return SASL_BUFOVER;
+ }
+
+ strcpy(out, canonuser);
+
+ return SASL_OK;
+}
+
+int is_userid_anonymous(const char *user)
+{
+ int len = strlen(user);
+ const char *domain;
+
+ assert(user);
+
+ /* check for domain */
+ if (config_virtdomains &&
+ ((domain = strrchr(user, '@')) || (domain = strrchr(user, '%')))) {
+ len = domain - user;
+ }
+
+ /* check if we are anonymous */
+ if (len == 9 && strncasecmp(user, "anonymous", len) == 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+/*
+ * acl_ok() checks to see if the the inbox for 'user' grants the 'a'
+ * right to 'authstate'. Returns 1 if so, 0 if not.
+ */
+/* Note that we do not determine if the mailbox is remote or not */
+static int acl_ok(const char *user, struct auth_state *authstate)
+{
+ struct namespace namespace;
+ char *acl;
+ char bufuser[MAX_MAILBOX_NAME], inboxname[MAX_MAILBOX_NAME];
+ int r;
+
+ /* Set namespace */
+ if ((r = mboxname_init_namespace(&namespace, 0)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ strlcpy(bufuser, user, sizeof(bufuser));
+
+ /* Translate any separators in userid */
+ mboxname_hiersep_tointernal(&namespace, bufuser,
+ config_virtdomains ?
+ strcspn(bufuser, "@") : 0);
+
+ if (!r)
+ r = (*namespace.mboxname_tointernal)(&namespace, "INBOX",
+ bufuser, inboxname);
+
+ if (r || !authstate ||
+ mboxlist_lookup(inboxname, &acl, NULL)) {
+ r = 0; /* Failed so assume no proxy access */
+ }
+ else {
+ r = (cyrus_acl_myrights(authstate, acl) & ACL_ADMIN) != 0;
+ }
+ return r;
+}
+
+/* should we allow users to proxy? return SASL_OK if yes,
+ SASL_BADAUTH otherwise */
+int mysasl_proxy_policy(sasl_conn_t *conn,
+ void *context,
+ const char *requested_user, unsigned rlen,
+ const char *auth_identity, unsigned alen,
+ const char *def_realm __attribute__((unused)),
+ unsigned urlen __attribute__((unused)),
+ struct propctx *propctx __attribute__((unused)))
+{
+ struct proxy_context *ctx = (struct proxy_context *) context;
+ const char *val = config_getstring(IMAPOPT_LOGINREALMS);
+ struct auth_state *authstate;
+ int userisadmin = 0;
+ char *realm;
+
+ /* check if remote realm */
+ if ((!config_virtdomains || *val) &&
+ (realm = strchr(auth_identity, '@'))!=NULL) {
+ realm++;
+ while (*val) {
+ if (!strncasecmp(val, realm, strlen(realm)) &&
+ (!val[strlen(realm)] || isspace((int) val[strlen(realm)]))) {
+ break;
+ }
+ /* not this realm, try next one */
+ while (*val && !isspace((int) *val)) val++;
+ while (*val && isspace((int) *val)) val++;
+ }
+ if (!*val) {
+ sasl_seterror(conn, 0, "cross-realm login %s denied",
+ auth_identity);
+ return SASL_BADAUTH;
+ }
+ }
+
+ authstate = auth_newstate(auth_identity);
+
+ /* ok, is auth_identity an admin? */
+ userisadmin = global_authisa(authstate, IMAPOPT_ADMINS);
+
+ if (!ctx) {
+ /* for now only admins are allowed */
+ auth_freestate(authstate);
+
+ if (!userisadmin) {
+ syslog(LOG_ERR, "%s is not an admin", auth_identity);
+ sasl_seterror(conn, SASL_NOLOG, "only admins may authenticate");
+ return SASL_BADAUTH;
+ }
+
+ return SASL_OK;
+ }
+
+ if (alen != rlen || strncmp(auth_identity, requested_user, alen)) {
+ /* we want to authenticate as a different user; we'll allow this
+ if we're an admin or if we've allowed ACL proxy logins */
+ int use_acl = ctx->use_acl && config_getswitch(IMAPOPT_LOGINUSEACL);
+
+ if (userisadmin ||
+ (use_acl && acl_ok(requested_user, authstate)) ||
+ (ctx->proxy_servers &&
+ global_authisa(authstate, IMAPOPT_PROXYSERVERS))) {
+ /* proxy ok! */
+
+ userisadmin = 0; /* no longer admin */
+ auth_freestate(authstate);
+
+ authstate = auth_newstate(requested_user);
+
+ /* are we a proxy admin? */
+ if (ctx->userisproxyadmin)
+ *(ctx->userisproxyadmin) =
+ global_authisa(authstate, IMAPOPT_ADMINS);
+ } else {
+ sasl_seterror(conn, 0, "user %s is not allowed to proxy",
+ auth_identity);
+
+ auth_freestate(authstate);
+
+ return SASL_BADAUTH;
+ }
+ }
+
+ if (ctx->authstate)
+ *(ctx->authstate) = authstate;
+ else
+ auth_freestate(authstate);
+ if (ctx->userisadmin) *(ctx->userisadmin) = userisadmin;
+
+ return SASL_OK;
+}
+
+/* covert a time_t date to an IMAP-style date
+ * datebuf needs to be >= 30 bytes */
+void cyrus_ctime(time_t date, char *datebuf)
+{
+ struct tm *tm = localtime(&date);
+ long gmtoff = gmtoff_of(tm, date);
+ int gmtnegative = 0;
+ static const char *monthname[] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+
+ if (date == 0 || tm->tm_year < 69) {
+ abort();
+ }
+
+ if (gmtoff < 0) {
+ gmtoff = -gmtoff;
+ gmtnegative = 1;
+ }
+ gmtoff /= 60;
+ sprintf(datebuf,
+ "%2u-%s-%u %.2u:%.2u:%.2u %c%.2lu%.2lu",
+ tm->tm_mday, monthname[tm->tm_mon], tm->tm_year+1900,
+ tm->tm_hour, tm->tm_min, tm->tm_sec,
+ gmtnegative ? '-' : '+', gmtoff/60, gmtoff%60);
+}
+
+/* call before a cyrus application exits */
+void cyrus_done()
+{
+ if(cyrus_init_run != RUNNING) return;
+ cyrus_init_run = DONE;
+
+ if (!cyrus_init_nodb) libcyrus_done();
+}
+
+/*
+ * Returns 1 if we have a shutdown file, with the first line in buf.
+ * Otherwise returns 0, and the contents of buf is undefined.
+ */
+int shutdown_file(char *buf, int size)
+{
+ FILE *f;
+ static char shutdownfilename[1024] = "";
+ char *p;
+
+ if (!shutdownfilename[0])
+ snprintf(shutdownfilename, sizeof(shutdownfilename),
+ "%s/msg/shutdown", config_dir);
+ if ((f = fopen(shutdownfilename, "r")) == NULL) return 0;
+
+ fgets(buf, size, f);
+ if ((p = strchr(buf, '\r')) != NULL) *p = 0;
+ if ((p = strchr(buf, '\n')) != NULL) *p = 0;
+
+ syslog(LOG_DEBUG, "Shutdown file: %s, closing connection", buf);
+
+ return 1;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/global.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,157 @@
+/* global.h -- Header for global/shared variables & functions.
+ * $Id: global.h,v 1.2.2.6 2005/11/17 15:46:15 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_GLOBAL_H
+#define INCLUDED_GLOBAL_H
+
+#include <sasl/sasl.h>
+#include "libconfig.h"
+#include "auth.h"
+#include "mboxname.h"
+#include "signals.h"
+
+/* Flags for cyrus_init() */
+enum {
+ CYRUSINIT_NODB = (1<<0)
+};
+
+/* Startup the configuration subsystem */
+/* Note that cyrus_init is pretty much the wholesale startup function
+ * for any libimap/libcyrus process, and should be called fairly early
+ * (and needs an associated cyrus_done call) */
+extern int cyrus_init(const char *alt_config, const char *ident,
+ unsigned flags);
+extern void global_sasl_init(int client, int server,
+ const sasl_callback_t *callbacks);
+
+/* Shutdown a cyrus process */
+extern void cyrus_done();
+
+/* sasl configuration */
+extern int mysasl_config(void *context,
+ const char *plugin_name,
+ const char *option,
+ const char **result,
+ unsigned *len);
+extern sasl_security_properties_t *mysasl_secprops(int flags);
+
+/* user canonification */
+extern char *canonify_userid(char *user, char *loginid, int *domain_from_ip);
+
+extern int is_userid_anonymous(const char *user);
+
+extern int mysasl_canon_user(sasl_conn_t *conn,
+ void *context,
+ const char *user, unsigned ulen,
+ unsigned flags,
+ const char *user_realm,
+ char *out_user,
+ unsigned out_max, unsigned *out_ulen);
+
+extern int mysasl_proxy_policy(sasl_conn_t *conn,
+ void *context,
+ const char *requested_user, unsigned rlen,
+ const char *auth_identity, unsigned alen,
+ const char *def_realm __attribute__((unused)),
+ unsigned urlen __attribute__((unused)),
+ struct propctx *propctx __attribute__((unused)));
+
+/* check if `authstate' is a valid member of class */
+extern int global_authisa(struct auth_state *authstate,
+ enum imapopt opt);
+
+/* useful types */
+struct protstream;
+struct buf {
+ char *s;
+ int len;
+ int alloc;
+};
+
+struct proxy_context {
+ int use_acl;
+ int proxy_servers;
+ struct auth_state **authstate;
+ int *userisadmin;
+ int *userisproxyadmin;
+};
+
+/* imap parsing functions (imapparse.c) */
+int getword(struct protstream *in, struct buf *buf);
+
+/* IMAP_BIN_ASTRING is an IMAP_ASTRING that does not perform the
+ * does-not-contain-a-NULL check (in the case of a literal) */
+enum string_types { IMAP_ASTRING,
+ IMAP_BIN_ASTRING,
+ IMAP_NSTRING,
+ IMAP_QSTRING,
+ IMAP_STRING };
+
+int getxstring(struct protstream *pin, struct protstream *pout,
+ struct buf *buf, int type);
+#define getastring(pin, pout, buf) getxstring((pin), (pout), (buf), IMAP_ASTRING)
+#define getbastring(pin, pout, buf) getxstring((pin), (pout), (buf), IMAP_BIN_ASTRING)
+#define getnstring(pin, pout, buf) getxstring((pin), (pout), (buf), IMAP_NSTRING)
+#define getqstring(pin, pout, buf) getxstring((pin), (pout), (buf), IMAP_QSTRING)
+#define getstring(pin, pout, buf) getxstring((pin), (pout), (buf), IMAP_STRING)
+void freebuf(struct buf *buf);
+
+void eatline(struct protstream *pin, int c);
+
+/* Misc utils */
+extern void cyrus_ctime(time_t date, char *datebuf);
+extern int shutdown_file(char *buf, int size);
+
+/* Misc globals */
+extern int config_implicitrights;
+extern unsigned long config_metapartition_files;
+extern struct cyrusdb_backend *config_mboxlist_db;
+extern struct cyrusdb_backend *config_quota_db;
+extern struct cyrusdb_backend *config_subscription_db;
+extern struct cyrusdb_backend *config_annotation_db;
+extern struct cyrusdb_backend *config_seenstate_db;
+extern struct cyrusdb_backend *config_mboxkey_db;
+extern struct cyrusdb_backend *config_duplicate_db;
+extern struct cyrusdb_backend *config_tlscache_db;
+extern struct cyrusdb_backend *config_ptscache_db;
+
+#endif /* INCLUDED_GLOBAL_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,254 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: idle.c,v 1.2.2.3 2005/12/12 21:23:58 murch Exp $ */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <syslog.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <syslog.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+
+#include "idle.h"
+#include "idled.h"
+#include "global.h"
+
+const char *idle_method_desc = "no";
+
+/* function to report mailbox updates to the client */
+static idle_updateproc_t *idle_update = NULL;
+
+/* how often to poll the mailbox */
+static time_t idle_period = -1;
+static int idle_started = 0;
+
+/* UNIX socket variables */
+static int notify_sock = -1;
+static struct sockaddr_un idle_remote;
+static int idle_remote_len = 0;
+
+
+/*
+ * Send a message to idled
+ */
+static int idle_send_msg(int msg, struct mailbox *mailbox)
+{
+ idle_data_t idledata;
+
+ /* fill the structure */
+ idledata.msg = msg;
+ idledata.pid = getpid();
+ strcpy(idledata.mboxname, mailbox ? mailbox->name : ".");
+
+ /* send */
+ if (sendto(notify_sock, (void *) &idledata,
+ IDLEDATA_BASE_SIZE+strlen(idledata.mboxname)+1, /* 1 for NULL */
+ 0, (struct sockaddr *) &idle_remote, idle_remote_len) == -1) {
+ syslog(LOG_ERR, "error sending to idled: %x", msg);
+ return 0;
+ }
+
+ return 1;
+}
+
+/*
+ * Notify idled of a mailbox change
+ */
+void idle_notify(struct mailbox *mailbox)
+{
+ /* We should try to determine if we need to send this
+ * (ie, is an imapd is IDLE on 'mailbox'?).
+ */
+ idle_send_msg(IDLE_NOTIFY, mailbox);
+}
+
+/*
+ * Create connection to idled for sending notifications
+ */
+int idle_enabled(void)
+{
+ if (idle_period == -1) {
+ int s;
+ int fdflags;
+ struct stat sbuf;
+ const char *idle_sock;
+
+ /* get polling period in case we can't connect to idled
+ * NOTE: if used, a period of zero disables IDLE
+ */
+ idle_period = config_getint(IMAPOPT_IMAPIDLEPOLL);
+ if (idle_period < 0) idle_period = 0;
+
+ if (!idle_period) return 0;
+
+ idle_method_desc = "poll";
+
+ if ((s = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
+ return idle_period;
+ }
+
+ idle_remote.sun_family = AF_UNIX;
+ idle_sock = config_getstring(IMAPOPT_IDLESOCKET);
+ if (idle_sock) {
+ strcpy(idle_remote.sun_path, idle_sock);
+ }
+ else {
+ strcpy(idle_remote.sun_path, config_dir);
+ strcat(idle_remote.sun_path, FNAME_IDLE_SOCK);
+ }
+ idle_remote_len = sizeof(idle_remote.sun_family) +
+ strlen(idle_remote.sun_path) + 1;
+
+ /* check that the socket exists */
+ if (stat(idle_remote.sun_path, &sbuf) < 0) {
+ close(s);
+ return idle_period;
+ }
+
+ /* put us in non-blocking mode */
+ fdflags = fcntl(s, F_GETFD, 0);
+ if (fdflags != -1) fdflags = fcntl(s, F_SETFL, O_NONBLOCK | fdflags);
+ if (fdflags == -1) { close(s); return idle_period; }
+
+ notify_sock = s;
+
+ if (!idle_send_msg(IDLE_NOOP, NULL)) {
+ close(s);
+ notify_sock = -1;
+ return idle_period;
+ }
+
+ /* set the mailbox update notifier */
+ mailbox_set_updatenotifier(idle_notify);
+
+ idle_method_desc = "idled";
+
+ return 1;
+ }
+ else if (notify_sock != -1) {
+ /* if the idle socket is already open, we're enabled */
+ return 1;
+ }
+ else {
+ return idle_period;
+ }
+}
+
+static void idle_handler(int sig)
+{
+ /* ignore the signals, unless the server has started idling */
+ if (!idle_started) return;
+
+ switch (sig) {
+ case SIGUSR1:
+ idle_update(IDLE_MAILBOX);
+ break;
+ case SIGUSR2:
+ idle_update(IDLE_ALERT);
+ break;
+ case SIGALRM:
+ idle_update(IDLE_MAILBOX|IDLE_ALERT);
+ alarm(idle_period);
+ break;
+ }
+}
+
+int idle_init(idle_updateproc_t *proc)
+{
+ struct sigaction action;
+
+ idle_update = proc;
+
+ /* We don't want recursive calls to idle_update() */
+ sigemptyset(&action.sa_mask);
+ sigaddset(&action.sa_mask, SIGUSR1);
+ sigaddset(&action.sa_mask, SIGUSR2);
+ action.sa_flags = 0;
+#ifdef SA_RESTART
+ action.sa_flags |= SA_RESTART;
+#endif
+ action.sa_handler = idle_handler;
+
+ /* Setup the signal handlers */
+ if ((sigaction(SIGUSR1, &action, NULL) < 0) ||
+ (sigaction(SIGUSR2, &action, NULL) < 0) ||
+ (sigaction(SIGALRM, &action, NULL) < 0)) {
+ syslog(LOG_ERR, "sigaction: %m");
+
+ /* Cancel receiving signals */
+ idle_done(NULL);
+ return 0;
+ }
+
+ return 1;
+}
+
+void idle_start(struct mailbox *mailbox)
+{
+ idle_started = 1;
+
+ /* Tell idled that we're idling */
+ if (notify_sock == -1 || !idle_send_msg(IDLE_INIT, mailbox)) {
+ /* otherwise, we'll poll with SIGALRM */
+ alarm(idle_period);
+ }
+}
+
+void idle_done(struct mailbox *mailbox)
+{
+ /* Tell idled that we're done idling */
+ if (notify_sock != -1) idle_send_msg(IDLE_DONE, mailbox);
+
+ /* Remove the signal handlers */
+ signal(SIGUSR1, SIG_IGN);
+ signal(SIGUSR2, SIG_IGN);
+ signal(SIGALRM, SIG_IGN);
+
+ idle_update = NULL;
+ idle_started = 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idle.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: idle.h,v 1.4.4.3 2005/12/12 21:23:58 murch Exp $ */
+
+#ifndef IDLE_H
+#define IDLE_H
+
+#include "mailbox.h"
+
+extern const char *idle_method_desc;
+
+typedef enum {
+ IDLE_MAILBOX = 0x1,
+ IDLE_ALERT = 0x2
+} idle_flags_t;
+
+typedef void idle_updateproc_t(idle_flags_t flags);
+
+
+/* Is IDLE enabled? Can also do initial setup, if necessary */
+int idle_enabled(void);
+
+/* Setup for IDLE.
+ * 'proc' is a pointer to a function which reports mailbox updates and/or
+ * ALERTs to the client.
+ */
+int idle_init(idle_updateproc_t *proc);
+
+/* Start IDLEing on 'mailbox'. */
+void idle_start(struct mailbox *mailbox);
+
+/* Cleanup when IDLE is completed. */
+void idle_done(struct mailbox *mailbox);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,419 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: idled.c,v 1.17.2.6 2005/12/12 21:23:58 murch Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <syslog.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+#include <fcntl.h>
+
+#include "idled.h"
+#include "global.h"
+#include "mboxlist.h"
+#include "xmalloc.h"
+#include "hash.h"
+#include "exitcodes.h"
+
+/* global state */
+const int config_need_data = 0;
+
+extern int optind;
+extern char *optarg;
+
+static int verbose = 0;
+static int debugmode = 0;
+static time_t idle_timeout;
+
+struct ientry {
+ pid_t pid;
+ time_t itime;
+ struct ientry *next;
+};
+static struct hash_table itable;
+static struct ientry *ifreelist;
+static int itable_inc = 100;
+void idle_done(char *mboxname, pid_t pid);
+
+void fatal(const char *msg, int err)
+{
+ if (debugmode) fprintf(stderr, "dying with %s %d\n",msg,err);
+ syslog(LOG_CRIT, "%s", msg);
+ syslog(LOG_NOTICE, "exiting");
+
+ cyrus_done();
+
+ exit(err);
+}
+
+static int mbox_count_cb(void *rockp,
+ const char *key __attribute__((unused)),
+ int keylen __attribute__((unused)),
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ int *ip = (int *) rockp;
+ (*ip)++;
+
+ return 0;
+}
+
+/* return a new 'ientry', either from the freelist or by malloc'ing it */
+static struct ientry *get_ientry(void)
+{
+ struct ientry *t;
+
+ if (!ifreelist) {
+ /* create child_table_inc more and add them to the freelist */
+ struct ientry *n;
+ int i;
+
+ n = xmalloc(itable_inc * sizeof(struct ientry));
+ ifreelist = n;
+ for (i = 0; i < itable_inc - 1; i++) {
+ n[i].next = n + (i + 1);
+ }
+ /* i == child_table_inc - 1, last item in block */
+ n[i].next = NULL;
+ }
+
+ t = ifreelist;
+ ifreelist = ifreelist->next;
+
+ return t;
+}
+
+/* remove pid from list of those idling on mboxname */
+void idle_done(char *mboxname, pid_t pid)
+{
+ struct ientry *t, *p = NULL;
+
+ t = (struct ientry *) hash_lookup(mboxname, &itable);
+ while (t && t->pid != pid) {
+ p = t;
+ t = t->next;
+ }
+ if (t) {
+ if (!p) {
+ /* first pid in the linked list */
+
+ p = t->next; /* remove node */
+
+ /* we just removed the data that the hash entry
+ was pointing to, so insert the new data */
+ hash_insert(mboxname, p, &itable);
+ }
+ else {
+ /* not the first pid in the linked list */
+
+ p->next = t->next; /* remove node */
+ }
+ t->next = ifreelist; /* add to freelist */
+ ifreelist = t;
+ }
+}
+
+void process_msg(idle_data_t *idledata)
+{
+ struct ientry *t, *n;
+
+ switch (idledata->msg) {
+ case IDLE_INIT:
+ if (verbose || debugmode)
+ syslog(LOG_DEBUG, "imapd[%ld]: IDLE_INIT '%s'\n",
+ idledata->pid, idledata->mboxname);
+
+ /* add pid to list of those idling on mboxname */
+ t = (struct ientry *) hash_lookup(idledata->mboxname, &itable);
+ n = get_ientry();
+ n->pid = idledata->pid;
+ n->itime = time(NULL);
+ n->next = t;
+ hash_insert(idledata->mboxname, n, &itable);
+ break;
+
+ case IDLE_NOTIFY:
+ if (verbose || debugmode)
+ syslog(LOG_DEBUG, "IDLE_NOTIFY '%s'\n", idledata->mboxname);
+
+ /* send a message to all pids idling on mboxname */
+ t = (struct ientry *) hash_lookup(idledata->mboxname, &itable);
+ while (t) {
+ if ((t->itime + idle_timeout) < time(NULL)) {
+ /* This process has been idling for longer than the timeout
+ * period, so it probably died. Remove it from the list.
+ */
+ if (verbose || debugmode)
+ syslog(LOG_DEBUG, " TIMEOUT %d\n", t->pid);
+
+ n = t;
+ t = t->next;
+ idle_done(idledata->mboxname, n->pid);
+ }
+ else { /* signal process to update */
+ if (verbose || debugmode)
+ syslog(LOG_DEBUG, " SIGUSR1 %d\n", t->pid);
+
+ kill(t->pid, SIGUSR1);
+ t = t->next;
+ }
+ }
+ break;
+
+ case IDLE_DONE:
+ if (verbose || debugmode)
+ syslog(LOG_DEBUG, "imapd[%ld]: IDLE_DONE '%s'\n",
+ idledata->pid, idledata->mboxname);
+
+ /* remove pid from list of those idling on mboxname */
+ idle_done(idledata->mboxname, idledata->pid);
+ break;
+
+ case IDLE_NOOP:
+ break;
+
+ default:
+ syslog(LOG_ERR, "unrecognized message: %lx", idledata->msg);
+ break;
+ }
+}
+
+void idle_alert(char *key __attribute__((unused)),
+ void *data,
+ void *rock __attribute__((unused)))
+{
+ struct ientry *t = (struct ientry *) data;
+
+ while (t) {
+ /* signal process to check ALERTs */
+ if (verbose || debugmode)
+ syslog(LOG_DEBUG, " SIGUSR2 %d\n", t->pid);
+ kill(t->pid, SIGUSR2);
+
+ t = t->next;
+ }
+}
+
+int main(int argc, char **argv)
+{
+ char shutdownfilename[1024];
+ char *p = NULL;
+ int opt;
+ int nmbox = 0;
+ int s, len;
+ struct sockaddr_un local;
+ idle_data_t idledata;
+ struct sockaddr_un from;
+ socklen_t fromlen;
+ mode_t oldumask;
+ fd_set read_set, rset;
+ int nfds;
+ struct timeval timeout;
+ pid_t pid;
+ int fd;
+ char *alt_config = NULL;
+ const char *idle_sock;
+
+ p = getenv("CYRUS_VERBOSE");
+ if (p) verbose = atoi(p) + 1;
+
+ while ((opt = getopt(argc, argv, "C:d")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ case 'd': /* don't fork. debugging mode */
+ debugmode = 1;
+ break;
+ default:
+ fprintf(stderr, "invalid argument\n");
+ exit(EC_USAGE);
+ break;
+ }
+ }
+
+ cyrus_init(alt_config, "idled", 0);
+
+ /* get name of shutdown file */
+ snprintf(shutdownfilename, sizeof(shutdownfilename), "%s/msg/shutdown",
+ config_dir);
+
+ /* Set inactivity timer (convert from minutes to seconds) */
+ idle_timeout = config_getint(IMAPOPT_TIMEOUT);
+ if (idle_timeout < 30) idle_timeout = 30;
+ idle_timeout *= 60;
+
+ /* count the number of mailboxes */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+ config_mboxlist_db->foreach(mbdb, "", 0, NULL, &mbox_count_cb,
+ &nmbox, NULL);
+ mboxlist_close();
+ mboxlist_done();
+
+ /* create idle table -- +1 to avoid a zero value */
+ construct_hash_table(&itable, nmbox + 1, 1);
+ ifreelist = NULL;
+
+ /* create socket we are going to use for listening */
+ if ((s = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
+ perror("socket");
+ cyrus_done();
+ exit(1);
+ }
+
+ /* bind it to a local file */
+ local.sun_family = AF_UNIX;
+ idle_sock = config_getstring(IMAPOPT_IDLESOCKET);
+ if (idle_sock) {
+ strlcpy(local.sun_path, idle_sock, sizeof(local.sun_path));
+ }
+ else {
+ strlcpy(local.sun_path, config_dir, sizeof(local.sun_path));
+ strlcat(local.sun_path, FNAME_IDLE_SOCK, sizeof(local.sun_path));
+ }
+ unlink(local.sun_path);
+ len = sizeof(local.sun_family) + strlen(local.sun_path) + 1;
+
+ oldumask = umask((mode_t) 0); /* for Linux */
+
+ if (bind(s, (struct sockaddr *)&local, len) == -1) {
+ perror("bind");
+ cyrus_done();
+ exit(1);
+ }
+ umask(oldumask); /* for Linux */
+ chmod(local.sun_path, 0777); /* for DUX */
+
+ /* fork unless we were given the -d option */
+ if (debugmode == 0) {
+
+ pid = fork();
+
+ if (pid == -1) {
+ perror("fork");
+ cyrus_done();
+ exit(1);
+ }
+
+ if (pid != 0) { /* parent */
+ cyrus_done();
+ exit(0);
+ }
+ }
+ /* child */
+
+ /* get ready for select() */
+ FD_ZERO(&read_set);
+ FD_SET(s, &read_set);
+ nfds = s + 1;
+
+ for (;;) {
+ int n;
+
+ /* check for shutdown file */
+ if ((fd = open(shutdownfilename, O_RDONLY, 0)) != -1) {
+ /* signal all processes to shutdown */
+ if (verbose || debugmode)
+ syslog(LOG_DEBUG, "IDLE_ALERT\n");
+
+ hash_enumerate(&itable, idle_alert, NULL);
+ }
+
+ /* timeout for select is 1 second */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ /* check for the next input */
+ rset = read_set;
+ n = select(nfds, &rset, NULL, NULL, &timeout);
+ if (n < 0 && errno == EAGAIN) continue;
+ if (n < 0 && errno == EINTR) continue;
+ if (n == -1) {
+ /* uh oh */
+ syslog(LOG_ERR, "select(): %m");
+ close(s);
+ fatal("select error",-1);
+ }
+
+ /* read on unix socket */
+ if (FD_ISSET(s, &rset)) {
+ fromlen = sizeof(from);
+ n = recvfrom(s, (void*) &idledata, sizeof(idle_data_t), 0,
+ (struct sockaddr *) &from, &fromlen);
+
+ if (n > 0) {
+ if (n <= IDLEDATA_BASE_SIZE ||
+ idledata.mboxname[n - 1 - IDLEDATA_BASE_SIZE] != '\0')
+ syslog(LOG_ERR, "Invalid message received, size=%d\n", n);
+ else
+ process_msg(&idledata);
+ }
+ } else {
+ /* log some sort of error */
+ }
+
+ }
+
+ cyrus_done();
+
+ /* never gets here */
+ exit(1);
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for POP3!",
+ EC_SOFTWARE);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/idled.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,68 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: idled.h,v 1.4.4.1 2005/12/12 21:23:59 murch Exp $ */
+
+#ifndef IDLED_H
+#define IDLED_H
+
+#include "mailbox.h"
+
+/* socket to communicate with the idled */
+#define FNAME_IDLE_SOCK "/socket/idle"
+
+typedef struct idle_data_s {
+ unsigned long msg;
+ unsigned long pid;
+
+ /* 1 for null. leave at end of structure for alignment */
+ char mboxname[MAX_MAILBOX_NAME+1];
+} idle_data_t;
+
+#define IDLEDATA_BASE_SIZE (2 * sizeof(unsigned long))
+
+typedef enum {
+ IDLE_INIT,
+ IDLE_DONE,
+ IDLE_NOTIFY,
+ IDLE_NOOP
+} idle_msg_t;
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,107 @@
+/*
+ * imap_err.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+static const char * const text[] = {
+ "Internal Error",
+ "System I/O error",
+ "Operating System Error",
+ "mail system storage has been exceeded",
+ "Permission denied",
+ "Over quota",
+ "Message size exceeds fixed limit",
+ "Too many user flags in mailbox",
+ "Invalid namespace prefix in configuration file",
+ "Mailbox has an invalid format",
+ "Operation is not supported on mailbox",
+ "Mailbox does not exist",
+ "Mailbox already exists",
+ "Invalid mailbox name",
+ "Mailbox has been moved to another server",
+ "Mailbox is currently reserved",
+ "Mailbox is locked by POP server",
+ "Unknown/invalid partition",
+ "Invalid identifier",
+ "Message contains NUL characters",
+ "Message contains bare newlines",
+ "Message contains non-ASCII characters in headers",
+ "Message contains invalid header",
+ "Message has no header/body separator",
+ "Quota root does not exist",
+ "Bad protocol",
+ "Syntax error in parameters",
+ "Invalid annotation entry",
+ "Invalid annotation attribute",
+ "Invalid annotation value",
+ "Bad URL",
+ "Invalid server requested",
+ "Server(s) unavailable to complete operation",
+ "The remote Server(s) denied the operation",
+ "Retry operation",
+ "This mailbox hierarchy does not exist on a single backend server.",
+ "The remote server does not support MULTIAPPEND",
+ "Unrecognized character set",
+ "Invalid user",
+ "Login incorrect",
+ "Anonymous login is not permitted",
+ "Unsupported quota resource",
+ "Authentication failed",
+ "Client cancelled authentication",
+ "Protocol error during authentication",
+ "Mailbox is over quota",
+ "Mailbox is at %d%% of quota",
+ "Message %d no longer exists",
+ "Unable to checkpoint \\Seen state",
+ "Unable to preserve \\Seen state",
+ "No matching messages",
+ "No matching annotations",
+ "[UNKNOWN-CTE] Can not process the binary data",
+ "LOGOUT received",
+ "Completed",
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_imap_error_table = { text, -1904809472L, 55 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_imap_error_table_r(struct et_list **list);
+void initialize_imap_error_table(void);
+
+void initialize_imap_error_table(void) {
+ initialize_imap_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_imap_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_imap_error_table;
+ et->next = 0;
+ *end = et;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.et
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.et?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.et (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.et Sat Aug 26 02:00:13 2006
@@ -1,0 +1,207 @@
+# imap_err.et -- Error codes for Cyrus IMAP server programs
+#
+# Copyright 1998 Carnegie Mellon University
+#
+# No warranties, either expressed or implied, are made regarding the
+# operation, use, or results of the software.
+#
+# Permission to use, copy, modify and distribute this software and its
+# documentation is hereby granted for non-commercial purposes only
+# provided that this copyright notice appears in all copies and in
+# supporting documentation.
+#
+# Permission is also granted to Internet Service Providers and others
+# entities to use the software for internal purposes.
+#
+# The distribution, modification or sale of a product which uses or is
+# based on the software, in whole or in part, for commercial purposes or
+# benefits requires specific, additional permission from:
+#
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# $Id: imap_err.et,v 1.50.2.3 2005/05/27 17:40:38 ken3 Exp $
+
+error_table imap
+
+ec IMAP_INTERNAL,
+ "Internal Error"
+
+ec IMAP_IOERROR,
+ "System I/O error"
+
+ec IMAP_SYS_ERROR,
+ "Operating System Error"
+
+ec IMAP_NOSPACE,
+ "mail system storage has been exceeded"
+
+ec IMAP_PERMISSION_DENIED,
+ "Permission denied"
+
+ec IMAP_QUOTA_EXCEEDED,
+ "Over quota"
+
+ec IMAP_MESSAGE_TOO_LARGE,
+ "Message size exceeds fixed limit"
+
+ec IMAP_USERFLAG_EXHAUSTED,
+ "Too many user flags in mailbox"
+
+ec IMAP_NAMESPACE_BADPREFIX,
+ "Invalid namespace prefix in configuration file"
+
+ec IMAP_MAILBOX_BADFORMAT,
+ "Mailbox has an invalid format"
+
+ec IMAP_MAILBOX_NOTSUPPORTED,
+ "Operation is not supported on mailbox"
+
+ec IMAP_MAILBOX_NONEXISTENT,
+ "Mailbox does not exist"
+
+ec IMAP_MAILBOX_EXISTS,
+ "Mailbox already exists"
+
+ec IMAP_MAILBOX_BADNAME,
+ "Invalid mailbox name"
+
+ec IMAP_MAILBOX_MOVED,
+ "Mailbox has been moved to another server"
+
+ec IMAP_MAILBOX_RESERVED,
+ "Mailbox is currently reserved"
+
+ec IMAP_MAILBOX_POPLOCKED,
+ "Mailbox is locked by POP server"
+
+ec IMAP_PARTITION_UNKNOWN,
+ "Unknown/invalid partition"
+
+ec IMAP_INVALID_IDENTIFIER,
+ "Invalid identifier"
+
+ec IMAP_MESSAGE_CONTAINSNULL,
+ "Message contains NUL characters"
+
+ec IMAP_MESSAGE_CONTAINSNL,
+ "Message contains bare newlines"
+
+ec IMAP_MESSAGE_CONTAINS8BIT,
+ "Message contains non-ASCII characters in headers"
+
+ec IMAP_MESSAGE_BADHEADER,
+ "Message contains invalid header"
+
+ec IMAP_MESSAGE_NOBLANKLINE,
+ "Message has no header/body separator"
+
+ec IMAP_QUOTAROOT_NONEXISTENT,
+ "Quota root does not exist"
+
+ec IMAP_PROTOCOL_ERROR,
+ "Bad protocol"
+
+ec IMAP_PROTOCOL_BAD_PARAMETERS,
+ "Syntax error in parameters"
+
+ec IMAP_ANNOTATION_BADENTRY,
+ "Invalid annotation entry"
+
+ec IMAP_ANNOTATION_BADATTRIB,
+ "Invalid annotation attribute"
+
+ec IMAP_ANNOTATION_BADVALUE,
+ "Invalid annotation value"
+
+ec IMAP_BADURL,
+ "Bad URL"
+
+# following used only proxy/db operations
+ec IMAP_BAD_SERVER,
+ "Invalid server requested"
+
+ec IMAP_SERVER_UNAVAILABLE,
+ "Server(s) unavailable to complete operation"
+
+ec IMAP_REMOTE_DENIED,
+ "The remote Server(s) denied the operation"
+
+ec IMAP_AGAIN,
+ "Retry operation"
+
+ec IMAP_NOT_SINGULAR_ROOT,
+ "This mailbox hierarchy does not exist on a single backend server."
+
+ec IMAP_REMOTE_NO_MULTIAPPEND,
+ "The remote server does not support MULTIAPPEND"
+
+# Following only used for internationalization of error messages
+
+ec IMAP_UNRECOGNIZED_CHARSET,
+ "Unrecognized character set"
+
+ec IMAP_INVALID_USER,
+ "Invalid user"
+
+ec IMAP_INVALID_LOGIN,
+ "Login incorrect"
+
+ec IMAP_ANONYMOUS_NOT_PERMITTED,
+ "Anonymous login is not permitted"
+
+ec IMAP_UNSUPPORTED_QUOTA,
+ "Unsupported quota resource"
+
+# Following used only for SASL operations
+
+ec IMAP_SASL_FAIL,
+ "Authentication failed"
+
+ec IMAP_SASL_CANCEL,
+ "Client cancelled authentication"
+
+ec IMAP_SASL_PROTERR,
+ "Protocol error during authentication"
+
+# Following used for internationalization of untagged OK/NO responses
+
+ec IMAP_NO_OVERQUOTA,
+ "Mailbox is over quota"
+
+ec IMAP_NO_CLOSEQUOTA,
+ "Mailbox is at %d%% of quota"
+
+ec IMAP_NO_MSGGONE,
+ "Message %d no longer exists"
+
+ec IMAP_NO_CHECKSEEN,
+ "Unable to checkpoint \\Seen state"
+
+ec IMAP_NO_CHECKPRESERVE,
+ "Unable to preserve \\Seen state"
+
+ec IMAP_NO_NOSUCHMSG,
+ "No matching messages"
+
+ec IMAP_NO_NOSUCHANNOTATION,
+ "No matching annotations"
+
+ec IMAP_NO_UNKNOWN_CTE,
+ "[UNKNOWN-CTE] Can not process the binary data"
+
+# Following used for internationalization of untagged BYE response
+
+ec IMAP_BYE_LOGOUT,
+ "LOGOUT received"
+
+# Following used for internationalization of tagged OK response
+
+ec IMAP_OK_COMPLETED,
+ "Completed"
+
+end
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_err.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+/*
+ * imap_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define IMAP_INTERNAL (-1904809472L)
+#define IMAP_IOERROR (-1904809471L)
+#define IMAP_SYS_ERROR (-1904809470L)
+#define IMAP_NOSPACE (-1904809469L)
+#define IMAP_PERMISSION_DENIED (-1904809468L)
+#define IMAP_QUOTA_EXCEEDED (-1904809467L)
+#define IMAP_MESSAGE_TOO_LARGE (-1904809466L)
+#define IMAP_USERFLAG_EXHAUSTED (-1904809465L)
+#define IMAP_NAMESPACE_BADPREFIX (-1904809464L)
+#define IMAP_MAILBOX_BADFORMAT (-1904809463L)
+#define IMAP_MAILBOX_NOTSUPPORTED (-1904809462L)
+#define IMAP_MAILBOX_NONEXISTENT (-1904809461L)
+#define IMAP_MAILBOX_EXISTS (-1904809460L)
+#define IMAP_MAILBOX_BADNAME (-1904809459L)
+#define IMAP_MAILBOX_MOVED (-1904809458L)
+#define IMAP_MAILBOX_RESERVED (-1904809457L)
+#define IMAP_MAILBOX_POPLOCKED (-1904809456L)
+#define IMAP_PARTITION_UNKNOWN (-1904809455L)
+#define IMAP_INVALID_IDENTIFIER (-1904809454L)
+#define IMAP_MESSAGE_CONTAINSNULL (-1904809453L)
+#define IMAP_MESSAGE_CONTAINSNL (-1904809452L)
+#define IMAP_MESSAGE_CONTAINS8BIT (-1904809451L)
+#define IMAP_MESSAGE_BADHEADER (-1904809450L)
+#define IMAP_MESSAGE_NOBLANKLINE (-1904809449L)
+#define IMAP_QUOTAROOT_NONEXISTENT (-1904809448L)
+#define IMAP_PROTOCOL_ERROR (-1904809447L)
+#define IMAP_PROTOCOL_BAD_PARAMETERS (-1904809446L)
+#define IMAP_ANNOTATION_BADENTRY (-1904809445L)
+#define IMAP_ANNOTATION_BADATTRIB (-1904809444L)
+#define IMAP_ANNOTATION_BADVALUE (-1904809443L)
+#define IMAP_BADURL (-1904809442L)
+#define IMAP_BAD_SERVER (-1904809441L)
+#define IMAP_SERVER_UNAVAILABLE (-1904809440L)
+#define IMAP_REMOTE_DENIED (-1904809439L)
+#define IMAP_AGAIN (-1904809438L)
+#define IMAP_NOT_SINGULAR_ROOT (-1904809437L)
+#define IMAP_REMOTE_NO_MULTIAPPEND (-1904809436L)
+#define IMAP_UNRECOGNIZED_CHARSET (-1904809435L)
+#define IMAP_INVALID_USER (-1904809434L)
+#define IMAP_INVALID_LOGIN (-1904809433L)
+#define IMAP_ANONYMOUS_NOT_PERMITTED (-1904809432L)
+#define IMAP_UNSUPPORTED_QUOTA (-1904809431L)
+#define IMAP_SASL_FAIL (-1904809430L)
+#define IMAP_SASL_CANCEL (-1904809429L)
+#define IMAP_SASL_PROTERR (-1904809428L)
+#define IMAP_NO_OVERQUOTA (-1904809427L)
+#define IMAP_NO_CLOSEQUOTA (-1904809426L)
+#define IMAP_NO_MSGGONE (-1904809425L)
+#define IMAP_NO_CHECKSEEN (-1904809424L)
+#define IMAP_NO_CHECKPRESERVE (-1904809423L)
+#define IMAP_NO_NOSUCHMSG (-1904809422L)
+#define IMAP_NO_NOSUCHANNOTATION (-1904809421L)
+#define IMAP_NO_UNKNOWN_CTE (-1904809420L)
+#define IMAP_BYE_LOGOUT (-1904809419L)
+#define IMAP_OK_COMPLETED (-1904809418L)
+extern const struct error_table et_imap_error_table;
+extern void initialize_imap_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_imap_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_imap (-1904809472L)
+
+/* for compatibility with older versions... */
+#define init_imap_err_tbl initialize_imap_error_table
+#define imap_err_base ERROR_TABLE_BASE_imap
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1324 @@
+/*
+ * imap_proxy.c - IMAP proxy support functions
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * "This product includes software developed by Computing Services
+ * acknowledgment:
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: imap_proxy.c,v 1.1.2.17 2006/02/10 21:10:45 murch Exp $
+ */
+
+#include <config.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include <syslog.h>
+#include <sys/un.h>
+
+#include "acl.h"
+#include "annotate.h"
+#include "backend.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "imap_err.h"
+#include "imap_proxy.h"
+#include "proxy.h"
+#include "mboxname.h"
+#include "mupdate-client.h"
+#include "prot.h"
+#include "xmalloc.h"
+
+extern unsigned int proxy_cmdcnt;
+extern struct protstream *imapd_in, *imapd_out;
+extern struct backend *backend_inbox, *backend_current, **backend_cached;
+extern char *imapd_userid, *proxy_userid;
+extern struct namespace imapd_namespace;
+
+extern void printstring(const char *s);
+extern void printastring(const char *s);
+extern int mlookup(const char *tag, const char *ext_name,
+ const char *name, int *flags, char **pathp, char **mpathp,
+ char **partp, char **aclp, struct txn **tid) ;
+
+void proxy_gentag(char *tag, size_t len)
+{
+ snprintf(tag, len, "PROXY%d", proxy_cmdcnt++);
+}
+
+struct backend *proxy_findinboxserver(void)
+{
+ char inbox[MAX_MAILBOX_NAME+1];
+ int r, mbtype;
+ char *server = NULL;
+ struct backend *s = NULL;
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, "INBOX",
+ imapd_userid, inbox);
+
+ if(!r) {
+ r = mlookup(NULL, NULL, inbox, &mbtype, NULL, NULL, &server, NULL, NULL);
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ }
+ }
+
+ return s;
+}
+
+/* pipe_response() reads from 's->in' until either the tagged response
+ starting with 'tag' appears, or if 'tag' is NULL, to the end of the
+ current line. If 'include_tag' is set, the tagged line is included
+ in the output, otherwise the tagged line is stored in 's->last_result'.
+ In either case, the result of the tagged command is returned.
+
+/* 's->last_result' assumes that tagged responses don't contain literals.
+ Unfortunately, the IMAP grammar allows them */
+
+/* force_notfatal says to not fatal() if we lose connection to backend_current
+ * even though it is in 95% of the cases, a good idea... */
+static int pipe_response(struct backend *s, const char *tag, int include_tag,
+ int force_notfatal)
+{
+ char buf[2048];
+ char eol[128];
+ int sl;
+ int cont = 0, last = !tag, r = PROXY_OK;
+ size_t taglen;
+
+ s->timeout->mark = time(NULL) + IDLE_TIMEOUT;
+
+ if (tag) {
+ taglen = strlen(tag);
+ if(taglen >= sizeof(buf)) {
+ fatal("tag too large",EC_TEMPFAIL);
+ }
+ }
+
+ s->last_result.len = 0;
+
+ /* the only complication here are literals */
+ do {
+ /* if 'cont' is set, we're looking at the continuation to a very
+ long line.
+ if 'last' is set, we've seen the tag we're looking for, we're
+ just reading the end of the line. */
+ if (!cont) eol[0] = '\0';
+
+ if (!prot_fgets(buf, sizeof(buf), s->in)) {
+ /* uh oh */
+ if(s == backend_current && !force_notfatal)
+ fatal("Lost connection to selected backend", EC_UNAVAILABLE);
+ proxy_downserver(s);
+ return PROXY_NOCONNECTION;
+ }
+
+ sl = strlen(buf);
+
+ if (tag) {
+ /* Check for the tagged line */
+ if (!cont && buf[taglen] == ' ' && !strncmp(tag, buf, taglen)) {
+
+ switch (buf[taglen + 1]) {
+ case 'O': case 'o':
+ r = PROXY_OK;
+ break;
+ case 'N': case 'n':
+ r = PROXY_NO;
+ break;
+ case 'B': case 'b':
+ r = PROXY_BAD;
+ break;
+ default: /* huh? no result? */
+ if(s == backend_current && !force_notfatal)
+ fatal("Lost connection to selected backend",
+ EC_UNAVAILABLE);
+ proxy_downserver(s);
+ r = PROXY_NOCONNECTION;
+ break;
+ }
+
+ last = 1;
+ }
+
+ if (last && !include_tag) {
+ /* Store the tagged line */
+ if (sl > s->last_result.alloc - s->last_result.len) {
+ s->last_result.alloc =
+ (s->last_result.alloc == 0) ? sizeof(buf) :
+ s->last_result.alloc * 2;
+ s->last_result.s = xrealloc(s->last_result.s,
+ s->last_result.alloc+1);
+ }
+
+ strcpy(s->last_result.s + s->last_result.len, buf + taglen + 1);
+ s->last_result.len += sl - taglen - 1;
+ }
+ }
+
+ if (sl == (sizeof(buf) - 1) && buf[sl-1] != '\n') {
+ /* only got part of a line */
+ /* we save the last 64 characters in case it has important
+ literal information */
+ strcpy(eol, buf + sl - 64);
+
+ /* write out this part, but we have to keep reading until we
+ hit the end of the line */
+ if (!last || include_tag) prot_write(imapd_out, buf, sl);
+ cont = 1;
+ continue;
+ } else { /* we got the end of the line */
+ int i;
+ int litlen = 0, islit = 0;
+
+ if (!last || include_tag) prot_write(imapd_out, buf, sl);
+
+ /* now we have to see if this line ends with a literal */
+ if (sl < 64) {
+ strcat(eol, buf);
+ } else {
+ strcat(eol, buf + sl - 63);
+ }
+
+ /* eol now contains the last characters from the line; we want
+ to see if we've hit a literal */
+ i = strlen(eol);
+ if (i >= 4 &&
+ eol[i-1] == '\n' && eol[i-2] == '\r' && eol[i-3] == '}') {
+ /* possible literal */
+ i -= 4;
+ while (i > 0 && eol[i] != '{' && isdigit((int) eol[i])) {
+ i--;
+ }
+ if (eol[i] == '{') {
+ islit = 1;
+ litlen = atoi(eol + i + 1);
+ }
+ }
+
+ /* copy the literal over */
+ if (islit) {
+ while (litlen > 0) {
+ int j = (litlen > sizeof(buf) ? sizeof(buf) : litlen);
+
+ j = prot_read(s->in, buf, j);
+ if(!j) {
+ /* EOF or other error */
+ return -1;
+ }
+ if (!last || include_tag) prot_write(imapd_out, buf, j);
+ litlen -= j;
+ }
+
+ /* none of our saved information has any relevance now */
+ eol[0] = '\0';
+
+ /* have to keep going for the end of the line */
+ cont = 1;
+ continue;
+ }
+ }
+
+ /* ok, let's read another line */
+ cont = 0;
+
+ } while (!last || cont);
+
+ return r;
+}
+
+int pipe_until_tag(struct backend *s, const char *tag, int force_notfatal)
+{
+ return pipe_response(s, tag, 0, force_notfatal);
+}
+
+int pipe_including_tag(struct backend *s, const char *tag, int force_notfatal) {
+ int r;
+
+ r = pipe_response(s, tag, 1, force_notfatal);
+ if (r == PROXY_NOCONNECTION) {
+ /* don't have to worry about downing the server, since
+ * pipe_until_tag does that for us */
+ prot_printf(imapd_out, "%s NO %s\r\n", tag,
+ error_message(IMAP_SERVER_UNAVAILABLE));
+ }
+ return r;
+}
+
+static int pipe_to_end_of_response(struct backend *s, int force_notfatal)
+{
+ return pipe_response(s, NULL, 0, force_notfatal);
+}
+
+/* copy our current input to 's' until we hit a true EOL.
+
+ 'optimistic_literal' is how happy we should be about assuming
+ that a command will go through by converting synchronizing literals of
+ size less than optimistic_literal to nonsync
+
+ returns 0 on success, <0 on big failure, >0 on full command not sent */
+int pipe_command(struct backend *s, int optimistic_literal)
+{
+ char buf[2048];
+ char eol[128];
+ int sl;
+
+ s->timeout->mark = time(NULL) + IDLE_TIMEOUT;
+
+ eol[0] = '\0';
+
+ /* again, the complication here are literals */
+ for (;;) {
+ if (!prot_fgets(buf, sizeof(buf), imapd_in)) {
+ /* uh oh */
+ return -1;
+ }
+
+ sl = strlen(buf);
+
+ if (sl == (sizeof(buf) - 1) && buf[sl-1] != '\n') {
+ /* only got part of a line */
+ strcpy(eol, buf + sl - 64);
+
+ /* and write this out, except for what we've saved */
+ prot_write(s->out, buf, sl - 64);
+ continue;
+ } else {
+ int i, nonsynch = 0, islit = 0, litlen = 0;
+
+ if (sl < 64) {
+ strcat(eol, buf);
+ } else {
+ /* write out what we have, and copy the last 64 characters
+ to eol */
+ prot_printf(s->out, "%s", eol);
+ prot_write(s->out, buf, sl - 64);
+ strcpy(eol, buf + sl - 64);
+ }
+
+ /* now determine if eol has a literal in it */
+ i = strlen(eol);
+ if (i >= 4 &&
+ eol[i-1] == '\n' && eol[i-2] == '\r' && eol[i-3] == '}') {
+ /* possible literal */
+ i -= 4;
+ if (eol[i] == '+') {
+ nonsynch = 1;
+ i--;
+ }
+ while (i > 0 && eol[i] != '{' && isdigit((int) eol[i])) {
+ i--;
+ }
+ if (eol[i] == '{') {
+ islit = 1;
+ litlen = atoi(eol + i + 1);
+ }
+ }
+
+ if (islit) {
+ if (nonsynch) {
+ prot_write(s->out, eol, strlen(eol));
+ } else if (!nonsynch && (litlen <= optimistic_literal)) {
+ prot_printf(imapd_out, "+ i am an optimist\r\n");
+ prot_write(s->out, eol, strlen(eol) - 3);
+ /* need to insert a + to turn it into a nonsynch */
+ prot_printf(s->out, "+}\r\n");
+ } else {
+ /* we do a standard synchronizing literal */
+ prot_write(s->out, eol, strlen(eol));
+ /* but here the game gets tricky... */
+ prot_fgets(buf, sizeof(buf), s->in);
+ /* but for now we cheat */
+ prot_write(imapd_out, buf, strlen(buf));
+ if (buf[0] != '+' && buf[1] != ' ') {
+ /* char *p = strchr(buf, ' '); */
+ /* strncpy(s->last_result, p + 1, LAST_RESULT_LEN);*/
+
+ /* stop sending command now */
+ return 1;
+ }
+ }
+
+ /* gobble literal and sent it onward */
+ while (litlen > 0) {
+ int j = (litlen > sizeof(buf) ? sizeof(buf) : litlen);
+
+ j = prot_read(imapd_in, buf, j);
+ if(!j) {
+ /* EOF or other error */
+ return -1;
+ }
+ prot_write(s->out, buf, j);
+ litlen -= j;
+ }
+
+ eol[0] = '\0';
+
+ /* have to keep going for the send of the command */
+ continue;
+ } else {
+ /* no literal, so we're done! */
+ prot_write(s->out, eol, strlen(eol));
+
+ return 0;
+ }
+ }
+ }
+}
+
+/* This handles piping of the LSUB command, because we have to figure out
+ * what mailboxes actually exist before passing them to the end user.
+ *
+ * It is also needed if we are doing a FIND MAILBOXES, for that we do an
+ * LSUB on the backend anyway, because the semantics of FIND do not allow
+ * it to return nonexistant mailboxes (RFC1176), but we need to really dumb
+ * down the response when this is the case.
+ */
+int pipe_lsub(struct backend *s, const char *tag,
+ int force_notfatal, const char *resp)
+{
+ int taglen = strlen(tag);
+ int c;
+ int r = PROXY_OK;
+ int exist_r;
+ char mailboxname[MAX_MAILBOX_PATH + 1];
+ static struct buf tagb, cmd, sep, name;
+ int cur_flags_size = 64;
+ char *flags = xmalloc(cur_flags_size);
+
+ const char *end_strip_flags[] = { " \\NonExistent)", "\\NonExistent)",
+ NULL };
+ const char *mid_strip_flags[] = { "\\NonExistent ",
+ NULL
+ };
+
+ assert(s);
+ assert(s->timeout);
+
+ s->timeout->mark = time(NULL) + IDLE_TIMEOUT;
+
+ while(1) {
+ c = getword(s->in, &tagb);
+
+ if(c == EOF) {
+ if(s == backend_current && !force_notfatal)
+ fatal("Lost connection to selected backend", EC_UNAVAILABLE);
+ proxy_downserver(s);
+ free(flags);
+ return PROXY_NOCONNECTION;
+ }
+
+ if(!strncmp(tag, tagb.s, taglen)) {
+ char buf[2048];
+ if(!prot_fgets(buf, sizeof(buf), s->in)) {
+ if(s == backend_current && !force_notfatal)
+ fatal("Lost connection to selected backend",
+ EC_UNAVAILABLE);
+ proxy_downserver(s);
+ free(flags);
+ return PROXY_NOCONNECTION;
+ }
+ /* Got the end of the response */
+ if (s->last_result.alloc == 0) {
+ s->last_result.alloc = sizeof(buf);
+ s->last_result.s = xmalloc(s->last_result.alloc+1);
+ }
+ strcpy(s->last_result.s, buf);
+ s->last_result.len = strlen(buf);
+
+ switch (buf[0]) {
+ case 'O': case 'o':
+ r = PROXY_OK;
+ break;
+ case 'N': case 'n':
+ r = PROXY_NO;
+ break;
+ case 'B': case 'b':
+ r = PROXY_BAD;
+ break;
+ default: /* huh? no result? */
+ if(s == backend_current && !force_notfatal)
+ fatal("Lost connection to selected backend",
+ EC_UNAVAILABLE);
+ proxy_downserver(s);
+ r = PROXY_NOCONNECTION;
+ break;
+ }
+ break; /* we're done */
+ }
+
+ c = getword(s->in, &cmd);
+
+ if(c == EOF) {
+ if(s == backend_current && !force_notfatal)
+ fatal("Lost connection to selected backend", EC_UNAVAILABLE);
+ proxy_downserver(s);
+ free(flags);
+ return PROXY_NOCONNECTION;
+ }
+
+ if(strncasecmp("LSUB", cmd.s, 4) && strncasecmp("LIST", cmd.s, 4)) {
+ prot_printf(imapd_out, "%s %s ", tagb.s, cmd.s);
+ r = pipe_to_end_of_response(s, force_notfatal);
+ if(r != PROXY_OK) {
+ free(flags);
+ return r;
+ }
+ } else {
+ /* build up the response bit by bit */
+ int i = 0;
+ char *p;
+
+ c = prot_getc(s->in);
+ while(c != ')' && c != EOF) {
+ flags[i++] = c;
+ if(i == cur_flags_size) {
+ /* expand our buffer */
+ cur_flags_size *= 2;
+ flags = xrealloc(flags, cur_flags_size);
+ }
+ c = prot_getc(s->in);
+ }
+
+ if(c != EOF) {
+ /* terminate string */
+ flags[i++] = ')';
+ if(i == cur_flags_size) {
+ /* expand our buffer */
+ cur_flags_size *= 2;
+ flags = xrealloc(flags, cur_flags_size);
+ }
+ flags[i] = '\0';
+ /* get the next character */
+ c = prot_getc(s->in);
+ }
+
+ if(c != ' ') {
+ if(s == backend_current && !force_notfatal)
+ fatal("Bad LSUB response from selected backend",
+ EC_UNAVAILABLE);
+ proxy_downserver(s);
+ free(flags);
+ return PROXY_NOCONNECTION;
+ }
+
+ /* Check for flags that we should remove
+ * (e.g. NoSelect, NonExistent) */
+ for(i=0; end_strip_flags[i]; i++) {
+ p = strstr(flags, end_strip_flags[i]);
+ if(p) {
+ *p = ')';
+ *(p+1) = '\0';
+ }
+ }
+
+ for(i=0; mid_strip_flags[i]; i++) {
+ int mid_strip_len = strlen(mid_strip_flags[i]);
+ p = strstr(flags, mid_strip_flags[i]);
+ while(p) {
+ strcpy(p, p + mid_strip_len);
+ p = strstr(flags, mid_strip_flags[i]);
+ }
+ }
+
+ /* Get separator */
+ c = getastring(s->in, s->out, &sep);
+
+ if(c != ' ') {
+ if(s == backend_current && !force_notfatal)
+ fatal("Bad LSUB response from selected backend",
+ EC_UNAVAILABLE);
+ proxy_downserver(s);
+ free(flags);
+ return PROXY_NOCONNECTION;
+ }
+
+ /* Get name */
+ c = getastring(s->in, s->out, &name);
+
+ if(c == '\r') c = prot_getc(s->in);
+ if(c != '\n') {
+ if(s == backend_current && !force_notfatal)
+ fatal("Bad LSUB response from selected backend",
+ EC_UNAVAILABLE);
+ proxy_downserver(s);
+ free(flags);
+ return PROXY_NOCONNECTION;
+ }
+
+ /* lookup name */
+ exist_r = 1;
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace,
+ name.s,
+ imapd_userid,
+ mailboxname);
+ if (!r) {
+ int mbtype;
+ exist_r = mboxlist_detail(mailboxname, &mbtype,
+ NULL, NULL, NULL, NULL, NULL);
+ if(!exist_r && (mbtype & MBTYPE_RESERVE))
+ exist_r = IMAP_MAILBOX_RESERVED;
+ } else {
+ /* skip this one */
+ syslog(LOG_ERR, "could not convert %s to internal form",
+ name.s);
+ continue;
+ }
+
+ /* send our response */
+ /* we need to set \Noselect if it's not in our mailboxes.db */
+ if(resp[0] == 'L') {
+ if(!exist_r) {
+ prot_printf(imapd_out, "* %s %s \"%s\" ",
+ resp, flags, sep.s);
+ } else {
+ prot_printf(imapd_out, "* %s (\\Noselect) \"%s\" ",
+ resp, sep.s);
+ }
+
+ printstring(name.s);
+ prot_printf(imapd_out, "\r\n");
+
+ } else if(resp[0] == 'M' && !exist_r) {
+ /* Note that it has to exist for a find response */
+ prot_printf(imapd_out, "* %s ", resp);
+ printastring(name.s);
+ prot_printf(imapd_out, "\r\n");
+ }
+ }
+ } /* while(1) */
+
+ free(flags);
+ return r;
+}
+
+/* xxx start of separate proxy-only code
+ (remove when we move to a unified environment) */
+static int chomp(struct protstream *p, char *s)
+{
+ int c = prot_getc(p);
+
+ while (*s) {
+ if (tolower(c) != tolower(*s)) { break; }
+ s++;
+ c = prot_getc(p);
+ }
+ if (*s) {
+ if (c != EOF) prot_ungetc(c, p);
+ c = EOF;
+ }
+ return c;
+}
+
+#define BUFGROWSIZE 100
+
+/* read characters from 'p' until 'end' is seen */
+static char *grab(struct protstream *p, char end)
+{
+ int alloc = BUFGROWSIZE, cur = 0;
+ int c = -1;
+ char *ret = (char *) xmalloc(alloc);
+
+ ret[0] = '\0';
+ while ((c = prot_getc(p)) != end) {
+ if (c == EOF) break;
+ if (cur == alloc - 1) {
+ alloc += BUFGROWSIZE;
+ ret = xrealloc(ret, alloc);
+
+ }
+ ret[cur++] = c;
+ }
+ if (cur) ret[cur] = '\0';
+
+ return ret;
+}
+
+/* remove \Recent from the flags */
+static char *editflags(char *flags)
+{
+ char *p;
+
+ p = flags;
+ while ((p = strchr(p, '\\')) != NULL) {
+ if (!strncasecmp(p + 1, "recent", 6)) {
+ if (p[7] == ' ') {
+ /* shift everything over so that \recent vanishes */
+ char *q;
+
+ q = p + 8;
+ while (*q) {
+ *p++ = *q++;
+ }
+ *p = '\0';
+ } else if (p[7] == '\0') {
+ /* last flag in line */
+ *p = '\0';
+ } else {
+ /* not really \recent, i guess */
+ p++;
+ }
+ } else {
+ p++;
+ }
+ }
+
+ return flags;
+}
+
+void proxy_copy(const char *tag, char *sequence, char *name, int myrights,
+ int usinguid, struct backend *s)
+{
+ char mytag[128];
+ struct d {
+ char *idate;
+ char *flags;
+ unsigned int seqno, uid;
+ struct d *next;
+ } *head, *p, *q;
+ int c;
+
+ /* find out what the flags & internaldate for this message are */
+ proxy_gentag(mytag, sizeof(mytag));
+ prot_printf(backend_current->out,
+ "%s %s %s (Flags Internaldate)\r\n",
+ tag, usinguid ? "Uid Fetch" : "Fetch", sequence);
+ head = (struct d *) xmalloc(sizeof(struct d));
+ head->flags = NULL; head->idate = NULL;
+ head->seqno = head->uid = 0;
+ head->next = NULL;
+ p = head;
+ /* read all the responses into the linked list */
+ for (/* each FETCH response */;;) {
+ unsigned int seqno = 0, uidno = 0;
+ char *flags = NULL, *idate = NULL;
+
+ /* read a line */
+ c = prot_getc(backend_current->in);
+ if (c != '*') break;
+ c = prot_getc(backend_current->in);
+ if (c != ' ') { /* protocol error */ c = EOF; break; }
+
+ /* read seqno */
+ seqno = 0;
+ while (isdigit(c = prot_getc(backend_current->in))) {
+ seqno *= 10;
+ seqno += c - '0';
+ }
+ if (seqno == 0 || c != ' ') {
+ /* we suck and won't handle this case */
+ c = EOF; break;
+ }
+ c = chomp(backend_current->in, "fetch (");
+ if (c == EOF) {
+ c = chomp(backend_current->in, "exists\r");
+ if (c == '\n') { /* got EXISTS response */
+ prot_printf(imapd_out, "* %d EXISTS\r\n", seqno);
+ continue;
+ }
+ }
+ if (c == EOF) {
+ /* XXX the "exists" check above will eat "ex" */
+ c = chomp(backend_current->in, "punge\r");
+ if (c == '\n') { /* got EXPUNGE response */
+ prot_printf(imapd_out, "* %d EXPUNGE\r\n", seqno);
+ continue;
+ }
+ }
+ if (c == EOF) {
+ c = chomp(backend_current->in, "recent\r");
+ if (c == '\n') { /* got RECENT response */
+ prot_printf(imapd_out, "* %d RECENT\r\n", seqno);
+ continue;
+ }
+ }
+ /* huh, don't get this response */
+ if (c == EOF) break;
+ for (/* each fetch item */;;) {
+ /* looking at the first character in an item */
+ switch (c) {
+ case 'f': case 'F': /* flags? */
+ c = chomp(backend_current->in, "lags");
+ if (c != ' ') { c = EOF; }
+ else c = prot_getc(backend_current->in);
+ if (c != '(') { c = EOF; }
+ else {
+ flags = grab(backend_current->in, ')');
+ c = prot_getc(backend_current->in);
+ }
+ break;
+ case 'i': case 'I': /* internaldate? */
+ c = chomp(backend_current->in, "nternaldate");
+ if (c != ' ') { c = EOF; }
+ else c = prot_getc(backend_current->in);
+ if (c != '"') { c = EOF; }
+ else {
+ idate = grab(backend_current->in, '"');
+ c = prot_getc(backend_current->in);
+ }
+ break;
+ case 'u': case 'U': /* uid */
+ c = chomp(backend_current->in, "id");
+ if (c != ' ') { c = EOF; }
+ else {
+ uidno = 0;
+ while (isdigit(c = prot_getc(backend_current->in))) {
+ uidno *= 10;
+ uidno += c - '0';
+ }
+ }
+ break;
+ default: /* hmm, don't like the smell of it */
+ c = EOF;
+ break;
+ }
+ /* looking at either SP seperating items or a RPAREN */
+ if (c == ' ') { c = prot_getc(backend_current->in); }
+ else if (c == ')') break;
+ else { c = EOF; break; }
+ }
+ /* if c == EOF we have either a protocol error or a situation
+ we can't handle, and we should die. */
+ if (c == ')') c = prot_getc(backend_current->in);
+ if (c == '\r') c = prot_getc(backend_current->in);
+ if (c != '\n') { c = EOF; break; }
+
+ /* if we're missing something, we should echo */
+ if (!flags || !idate) {
+ char sep = '(';
+ prot_printf(imapd_out, "* %d FETCH ", seqno);
+ if (uidno) {
+ prot_printf(imapd_out, "%cUID %d", sep, uidno);
+ sep = ' ';
+ }
+ if (flags) {
+ prot_printf(imapd_out, "%cFLAGS %s", sep, flags);
+ sep = ' ';
+ }
+ if (idate) {
+ prot_printf(imapd_out, "%cINTERNALDATE %s", sep, flags);
+ sep = ' ';
+ }
+ prot_printf(imapd_out, ")\r\n");
+ continue;
+ }
+
+ /* add to p->next */
+ p->next = xmalloc(sizeof(struct d));
+ p = p->next;
+ p->idate = idate;
+ p->flags = editflags(flags);
+ p->uid = uidno;
+ p->seqno = seqno;
+ p->next = NULL;
+ }
+ if (c != EOF) {
+ prot_ungetc(c, backend_current->in);
+
+ /* we should be looking at the tag now */
+ pipe_until_tag(backend_current, tag, 0);
+ }
+ if (c == EOF) {
+ /* uh oh, we're not happy */
+ fatal("Lost connection to selected backend", EC_UNAVAILABLE);
+ }
+
+ /* start the append */
+ prot_printf(s->out, "%s Append {%d+}\r\n%s", tag, strlen(name), name);
+ prot_printf(backend_current->out, "%s %s %s (Rfc822.peek)\r\n",
+ mytag, usinguid ? "Uid Fetch" : "Fetch", sequence);
+ for (/* each FETCH response */;;) {
+ unsigned int seqno = 0, uidno = 0;
+
+ /* read a line */
+ c = prot_getc(backend_current->in);
+ if (c != '*') break;
+ c = prot_getc(backend_current->in);
+ if (c != ' ') { /* protocol error */ c = EOF; break; }
+
+ /* read seqno */
+ seqno = 0;
+ while (isdigit(c = prot_getc(backend_current->in))) {
+ seqno *= 10;
+ seqno += c - '0';
+ }
+ if (seqno == 0 || c != ' ') {
+ /* we suck and won't handle this case */
+ c = EOF; break;
+ }
+ c = chomp(backend_current->in, "fetch (");
+ if (c == EOF) { /* not a fetch response */
+ c = chomp(backend_current->in, "exists\r");
+ if (c == '\n') { /* got EXISTS response */
+ prot_printf(imapd_out, "* %d EXISTS\r\n", seqno);
+ continue;
+ }
+ }
+ if (c == EOF) { /* not an exists response */
+ /* XXX the "exists" check above will eat "ex" */
+ c = chomp(backend_current->in, "punge\r");
+ if (c == '\n') { /* got EXPUNGE response */
+ prot_printf(imapd_out, "* %d EXPUNGE\r\n", seqno);
+ continue;
+ }
+ }
+ if (c == EOF) { /* not an exists response */
+ c = chomp(backend_current->in, "recent\r");
+ if (c == '\n') { /* got RECENT response */
+ prot_printf(imapd_out, "* %d RECENT\r\n", seqno);
+ continue;
+ }
+ }
+ if (c == EOF) {
+ /* huh, don't get this response */
+ break;
+ }
+ /* find seqno in the list */
+ p = head;
+ while (p->next && seqno != p->next->seqno) p = p->next;
+ if (!p->next) break;
+ q = p->next;
+ p->next = q->next;
+ for (/* each fetch item */;;) {
+ int sz = 0;
+
+ switch (c) {
+ case 'u': case 'U':
+ c = chomp(backend_current->in, "id");
+ if (c != ' ') { c = EOF; }
+ else {
+ uidno = 0;
+ while (isdigit(c = prot_getc(backend_current->in))) {
+ uidno *= 10;
+ uidno += c - '0';
+ }
+ }
+ break;
+
+ case 'r': case 'R':
+ c = chomp(backend_current->in, "fc822");
+ if (c == ' ') c = prot_getc(backend_current->in);
+ if (c != '{') c = EOF;
+ else {
+ sz = 0;
+ while (isdigit(c = prot_getc(backend_current->in))) {
+ sz *= 10;
+ sz += c - '0';
+ /* xxx overflow */
+ }
+ }
+ if (c == '}') c = prot_getc(backend_current->in);
+ if (c == '\r') c = prot_getc(backend_current->in);
+ if (c != '\n') c = EOF;
+
+ if (c != EOF) {
+ /* append p to s->out */
+ prot_printf(s->out, " (%s) \"%s\" {%d+}\r\n",
+ q->flags, q->idate, sz);
+ while (sz) {
+ char buf[2048];
+ int j = (sz > sizeof(buf) ? sizeof(buf) : sz);
+
+ j = prot_read(backend_current->in, buf, j);
+ if(!j) break;
+ prot_write(s->out, buf, j);
+ sz -= j;
+ }
+ c = prot_getc(backend_current->in);
+ }
+
+ break; /* end of case */
+ default:
+ c = EOF;
+ break;
+ }
+ /* looking at either SP seperating items or a RPAREN */
+ if (c == ' ') { c = prot_getc(backend_current->in); }
+ else if (c == ')') break;
+ else { c = EOF; break; }
+ }
+
+ /* if c == EOF we have either a protocol error or a situation
+ we can't handle, and we should die. */
+ if (c == ')') c = prot_getc(backend_current->in);
+ if (c == '\r') c = prot_getc(backend_current->in);
+ if (c != '\n') { c = EOF; break; }
+
+ /* free q */
+ free(q->idate);
+ free(q->flags);
+ free(q);
+ }
+ if (c != EOF) {
+ char *appenduid, *b;
+ int res;
+
+ /* pushback the first character of the tag we're looking at */
+ prot_ungetc(c, backend_current->in);
+
+ /* nothing should be left in the linked list */
+ assert(head->next == NULL);
+
+ /* ok, finish the append; we need the UIDVALIDITY and UIDs
+ to return as part of our COPYUID response code */
+ prot_printf(s->out, "\r\n");
+
+ /* should be looking at 'mytag' on 'backend_current',
+ 'tag' on 's' */
+ pipe_until_tag(backend_current, mytag, 0);
+ res = pipe_until_tag(s, tag, 0);
+
+ if (res == PROXY_OK) {
+ if (myrights & ACL_READ) {
+ appenduid = strchr(s->last_result.s, '[');
+ /* skip over APPENDUID */
+ appenduid += strlen("[appenduid ");
+ b = strchr(appenduid, ']');
+ *b = '\0';
+ prot_printf(imapd_out, "%s OK [COPYUID %s] %s\r\n", tag,
+ appenduid, error_message(IMAP_OK_COMPLETED));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+ } else {
+ prot_printf(imapd_out, "%s %s", tag, s->last_result.s);
+ }
+ } else {
+ /* abort the append */
+ prot_printf(s->out, " {0}\r\n");
+ pipe_until_tag(backend_current, mytag, 0);
+ pipe_until_tag(s, tag, 0);
+
+ /* report failure */
+ prot_printf(imapd_out, "%s NO inter-server COPY failed\r\n", tag);
+ }
+
+ /* free dynamic memory */
+ while (head) {
+ p = head;
+ head = head->next;
+ if (p->idate) free(p->idate);
+ if (p->flags) free(p->flags);
+ free(p);
+ }
+}
+/* xxx end of separate proxy-only code */
+
+int proxy_catenate_url(struct backend *s, struct imapurl *url, FILE *f,
+ unsigned long *size, const char **parseerr)
+{
+ char mytag[128];
+ int c, r = 0, found = 0;
+ unsigned long uidvalidity = 0;
+
+ *size = 0;
+ *parseerr = NULL;
+
+ /* select the mailbox (read-only) */
+ proxy_gentag(mytag, sizeof(mytag));
+ prot_printf(s->out, "%s Examine {%d+}\r\n%s\r\n",
+ mytag, strlen(url->mailbox), url->mailbox);
+ for (/* each examine response */;;) {
+ /* read a line */
+ c = prot_getc(s->in);
+ if (c != '*') break;
+ c = prot_getc(s->in);
+ if (c != ' ') { /* protocol error */ c = EOF; break; }
+
+ c = chomp(s->in, "ok [uidvalidity");
+ if (c == EOF) {
+ /* we don't care about this response */
+ eatline(s->in, c);
+ continue;
+ }
+
+ /* read uidvalidity */
+ while (isdigit(c = prot_getc(s->in))) {
+ uidvalidity *= 10;
+ uidvalidity += c - '0';
+ }
+ if (c != ']') { c = EOF; break; }
+ eatline(s->in, c); /* we don't care about the rest of the line */
+ }
+ if (c != EOF) {
+ prot_ungetc(c, s->in);
+
+ /* we should be looking at the tag now */
+ eatline(s->in, c);
+ }
+ if (c == EOF) {
+ /* uh oh, we're not happy */
+ fatal("Lost connection to backend", EC_UNAVAILABLE);
+ }
+
+ if (url->uidvalidity && (uidvalidity != url->uidvalidity)) {
+ *parseerr = "Uidvalidity of mailbox has changed";
+ r = IMAP_BADURL;
+ goto unselect;
+ }
+
+ /* fetch the bodypart */
+ proxy_gentag(mytag, sizeof(mytag));
+ prot_printf(s->out, "%s Uid Fetch %lu Body.Peek[%s]\r\n",
+ mytag, url->uid, url->section ? url->section : "");
+ for (/* each fetch response */;;) {
+ unsigned long seqno;
+
+ next_resp:
+ /* read a line */
+ c = prot_getc(s->in);
+ if (c != '*') break;
+ c = prot_getc(s->in);
+ if (c != ' ') { /* protocol error */ c = EOF; break; }
+
+ /* read seqno */
+ seqno = 0;
+ while (isdigit(c = prot_getc(s->in))) {
+ seqno *= 10;
+ seqno += c - '0';
+ }
+ if (seqno == 0 || c != ' ') {
+ /* we suck and won't handle this case */
+ c = EOF; break;
+ }
+ c = chomp(s->in, "fetch (");
+ if (c == EOF) { /* not a fetch response */
+ eatline(s->in, c);
+ continue;
+ }
+
+ for (/* each fetch item */;;) {
+ unsigned long uid, sz;
+
+ switch (c) {
+ case 'u': case 'U':
+ c = chomp(s->in, "id");
+ if (c != ' ') { c = EOF; }
+ else {
+ uid = 0;
+ while (isdigit(c = prot_getc(s->in))) {
+ uid *= 10;
+ uid += c - '0';
+ }
+
+ if (uid != url->uid) {
+ /* not our response */
+ eatline(s->in, c);
+ goto next_resp;
+ }
+ }
+ break;
+
+ case 'b': case 'B':
+ c = chomp(s->in, "ody[");
+ while (c != ']') c = prot_getc(s->in);
+ if (c == ']') c = prot_getc(s->in);
+ if (c == ' ') c = prot_getc(s->in);
+ if (c == '{') {
+ sz = 0;
+ while (isdigit(c = prot_getc(s->in))) {
+ sz *= 10;
+ sz += c - '0';
+ /* xxx overflow */
+ }
+ if (c == '}') c = prot_getc(s->in);
+ if (c == '\r') c = prot_getc(s->in);
+ if (c != '\n') c = EOF;
+ }
+ else if (c == 'n' || c == 'N') {
+ c = chomp(s->in, "il");
+ r = IMAP_BADURL;
+ *parseerr = "No such message part";
+ }
+
+ if (c != EOF) {
+ /* catenate to f */
+ found = 1;
+ *size = sz;
+
+ while (sz) {
+ char buf[2048];
+ int j = (sz > sizeof(buf) ? sizeof(buf) : sz);
+
+ j = prot_read(s->in, buf, j);
+ if(!j) break;
+ fwrite(buf, j, 1, f);
+ sz -= j;
+ }
+ c = prot_getc(s->in);
+ }
+
+ break; /* end of case */
+ default:
+ /* probably a FLAGS item */
+ eatline(s->in, c);
+ goto next_resp;
+ }
+ /* looking at either SP separating items or a RPAREN */
+ if (c == ' ') { c = prot_getc(s->in); }
+ else if (c == ')') break;
+ else { c = EOF; break; }
+ }
+
+ /* if c == EOF we have either a protocol error or a situation
+ we can't handle, and we should die. */
+ if (c == ')') c = prot_getc(s->in);
+ if (c == '\r') c = prot_getc(s->in);
+ if (c != '\n') { c = EOF; break; }
+ }
+ if (c != EOF) {
+ prot_ungetc(c, s->in);
+
+ /* we should be looking at the tag now */
+ eatline(s->in, c);
+ }
+ if (c == EOF) {
+ /* uh oh, we're not happy */
+ fatal("Lost connection to backend", EC_UNAVAILABLE);
+ }
+
+ unselect:
+ /* unselect the mailbox */
+ proxy_gentag(mytag, sizeof(mytag));
+ prot_printf(s->out, "%s Unselect\r\n", mytag);
+ for (/* each unselect response */;;) {
+ /* read a line */
+ c = prot_getc(s->in);
+ if (c != '*') break;
+ c = prot_getc(s->in);
+ if (c != ' ') { /* protocol error */ c = EOF; break; }
+
+ /* we don't care about this response */
+ eatline(s->in, c);
+ }
+ if (c != EOF) {
+ prot_ungetc(c, s->in);
+
+ /* we should be looking at the tag now */
+ eatline(s->in, c);
+ }
+ if (c == EOF) {
+ /* uh oh, we're not happy */
+ fatal("Lost connection to backend", EC_UNAVAILABLE);
+ }
+
+ if (!r && !found) {
+ r = IMAP_BADURL;
+ *parseerr = "No such message in mailbox";
+ }
+
+ return r;
+}
+
+/* Proxy GETANNOTATION commands to backend */
+int annotate_fetch_proxy(const char *server, const char *mbox_pat,
+ struct strlist *entry_pat,
+ struct strlist *attribute_pat)
+{
+ struct backend *be;
+ struct strlist *l;
+ char mytag[128];
+
+ assert(server && mbox_pat && entry_pat && attribute_pat);
+
+ be = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!be) return IMAP_SERVER_UNAVAILABLE;
+
+ /* Send command to remote */
+ proxy_gentag(mytag, sizeof(mytag));
+ prot_printf(be->out, "%s GETANNOTATION \"%s\" (", mytag, mbox_pat);
+ for (l = entry_pat; l; l = l->next) {
+ prot_printf(be->out, "\"%s\"%s", l->s, l->next ? " " : "");
+ }
+ prot_printf(be->out, ") (");
+ for (l = attribute_pat; l; l = l->next) {
+ prot_printf(be->out, "\"%s\"%s", l->s, l->next ? " " : "");
+ }
+ prot_printf(be->out, ")\r\n");
+ prot_flush(be->out);
+
+ /* Pipe the results. Note that backend-current may also pipe us other
+ messages. */
+ pipe_until_tag(be, mytag, 0);
+
+ return 0;
+}
+
+/* Proxy SETANNOTATION commands to backend */
+int annotate_store_proxy(const char *server, const char *mbox_pat,
+ struct entryattlist *entryatts)
+{
+ struct backend *be;
+ struct entryattlist *e;
+ struct attvaluelist *av;
+ char mytag[128];
+
+ assert(server && mbox_pat && entryatts);
+
+ be = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!be) return IMAP_SERVER_UNAVAILABLE;
+
+ /* Send command to remote */
+ proxy_gentag(mytag, sizeof(mytag));
+ prot_printf(be->out, "%s SETANNOTATION \"%s\" (", mytag, mbox_pat);
+ for (e = entryatts; e; e = e->next) {
+ prot_printf(be->out, "\"%s\" (", e->entry);
+
+ for (av = e->attvalues; av; av = av->next) {
+ prot_printf(be->out, "\"%s\" \"%s\"%s", av->attrib, av->value,
+ av->next ? " " : "");
+ }
+ prot_printf(be->out, ")");
+ if (e->next) prot_printf(be->out, " ");
+ }
+ prot_printf(be->out, ")\r\n");
+ prot_flush(be->out);
+
+ /* Pipe the results. Note that backend-current may also pipe us other
+ messages. */
+ pipe_until_tag(be, mytag, 0);
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imap_proxy.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,80 @@
+/*
+ * imap_proxy.h - IMAP proxy support functions
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * "This product includes software developed by Computing Services
+ * acknowledgment:
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: imap_proxy.h,v 1.1.2.7 2005/05/31 18:09:20 ken3 Exp $
+ */
+
+#ifndef _IMAP_PROXY_H
+#define _IMAP_PROXY_H
+
+#include "annotate.h"
+#include "backend.h"
+#include "imapurl.h"
+
+enum {
+ PROXY_NOCONNECTION = -1,
+ PROXY_OK = 0,
+ PROXY_NO = 1,
+ PROXY_BAD = 2
+};
+
+void proxy_gentag(char *tag, size_t len);
+
+struct backend *proxy_findinboxserver(void);
+
+int pipe_until_tag(struct backend *s, const char *tag, int force_notfatal);
+int pipe_including_tag(struct backend *s, const char *tag, int force_notfatal);
+int pipe_command(struct backend *s, int optimistic_literal);
+int pipe_lsub(struct backend *s, const char *tag,
+ int force_notfatal, const char *resp);
+
+void proxy_copy(const char *tag, char *sequence, char *name, int myrights,
+ int usinguid, struct backend *s);
+
+int proxy_catenate_url(struct backend *s, struct imapurl *url, FILE *f,
+ unsigned long *size, const char **parseerr);
+
+int annotate_fetch_proxy(const char *server, const char *mbox_pat,
+ struct strlist *entry_pat,
+ struct strlist *attribute_pat);
+int annotate_store_proxy(const char *server, const char *mbox_pat,
+ struct entryattlist *entryatts);
+#endif /* _IMAP_PROXY_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9816 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * "This product includes software developed by Computing Services
+ * acknowledgment:
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: imapd.c,v 1.443.2.84 2006/07/03 13:22:41 murch Exp $ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <sasl/sasl.h>
+
+#include "acl.h"
+#include "annotate.h"
+#include "append.h"
+#include "auth.h"
+#include "backend.h"
+#include "charset.h"
+#include "exitcodes.h"
+#include "idle.h"
+#include "global.h"
+#include "imap_err.h"
+#include "proxy.h"
+#include "imap_proxy.h"
+#include "imapd.h"
+#include "imapurl.h"
+#include "imparse.h"
+#include "index.h"
+#include "iptostring.h"
+#include "mailbox.h"
+#include "message.h"
+#include "mboxkey.h"
+#include "mboxlist.h"
+#include "mboxname.h"
+#include "mbdump.h"
+#include "mkgmtime.h"
+#include "mupdate-client.h"
+#include "quota.h"
+#include "sync_log.h"
+#include "telemetry.h"
+#include "tls.h"
+#include "user.h"
+#include "util.h"
+#include "version.h"
+#include "xmalloc.h"
+
+#include "pushstats.h" /* SNMP interface */
+
+extern void seen_done(void);
+
+extern int optind;
+extern char *optarg;
+
+/* global state */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+static char shutdownfilename[1024];
+static int imaps = 0;
+static sasl_ssf_t extprops_ssf = 0;
+
+/* PROXY STUFF */
+/* we want a list of our outgoing connections here and which one we're
+ currently piping */
+
+static const int ultraparanoid = 1; /* should we kick after every operation? */
+unsigned int proxy_cmdcnt;
+
+static int referral_kick = 0; /* kick after next command recieved, for
+ referrals that are likely to change the
+ mailbox list */
+
+/* all subscription commands go to the backend server containing the
+ user's inbox */
+struct backend *backend_inbox = NULL;
+
+/* the current server most commands go to */
+struct backend *backend_current = NULL;
+
+/* our cached connections */
+struct backend **backend_cached = NULL;
+
+/* are we doing virtdomains with multiple IPs? */
+static int disable_referrals;
+
+/* has the client issued an RLIST or RLSUB? */
+static int supports_referrals;
+
+/* end PROXY STUFF */
+
+/* per-user/session state */
+struct protstream *imapd_out = NULL;
+struct protstream *imapd_in = NULL;
+struct protgroup *protin = NULL;
+static char imapd_clienthost[NI_MAXHOST*2+1] = "[local]";
+static int imapd_logfd = -1;
+char *imapd_userid = NULL, *proxy_userid = NULL;
+static char *imapd_magicplus = NULL;
+struct auth_state *imapd_authstate = 0;
+static int imapd_userisadmin = 0;
+static int imapd_userisproxyadmin = 0;
+int imapd_condstore_client = 0;
+static sasl_conn_t *imapd_saslconn; /* the sasl connection context */
+static int imapd_starttls_done = 0; /* have we done a successful starttls? */
+const char *plaintextloginalert = NULL;
+#ifdef HAVE_SSL
+/* our tls connection, if any */
+static SSL *tls_conn = NULL;
+#endif /* HAVE_SSL */
+
+/* stage(s) for APPEND */
+struct appendstage {
+ struct stagemsg *stage;
+ FILE *f;
+ char **flag;
+ int nflags, flagalloc;
+ time_t internaldate;
+ int binary;
+} **stage = NULL;
+unsigned long numstage = 0;
+
+/* the sasl proxy policy context */
+static struct proxy_context imapd_proxyctx = {
+ 1, 1, &imapd_authstate, &imapd_userisadmin, &imapd_userisproxyadmin
+};
+
+/* current sub-user state */
+static struct mailbox mboxstruct;
+static struct mailbox *imapd_mailbox;
+int imapd_exists = -1;
+
+/* current namespace */
+struct namespace imapd_namespace;
+
+static const char *monthname[] = {
+ "jan", "feb", "mar", "apr", "may", "jun",
+ "jul", "aug", "sep", "oct", "nov", "dec"
+};
+
+static const int max_monthdays[] = {
+ 31, 29, 31, 30, 31, 30,
+ 31, 31, 30, 31, 30, 31
+};
+
+void motd_file(int fd);
+void shut_down(int code);
+void fatal(const char *s, int code);
+
+void cmdloop(void);
+void cmd_login(char *tag, char *user);
+void cmd_authenticate(char *tag, char *authtype, char *resp);
+void cmd_noop(char *tag, char *cmd);
+void capa_response(int flags);
+void cmd_capability(char *tag);
+void cmd_append(char *tag, char *name, const char *cur_name);
+void cmd_select(char *tag, char *cmd, char *name);
+void cmd_close(char *tag);
+void cmd_fetch(char *tag, char *sequence, int usinguid);
+void cmd_partial(const char *tag, const char *msgno, char *data,
+ const char *start, const char *count);
+void cmd_store(char *tag, char *sequence, int usinguid);
+void cmd_search(char *tag, int usinguid);
+void cmd_sort(char *tag, int usinguid);
+void cmd_thread(char *tag, int usinguid);
+void cmd_copy(char *tag, char *sequence, char *name, int usinguid);
+void cmd_expunge(char *tag, char *sequence);
+void cmd_create(char *tag, char *name, char *partition, int localonly);
+void cmd_delete(char *tag, char *name, int localonly, int force);
+void cmd_dump(char *tag, char *name, int uid_start);
+void cmd_undump(char *tag, char *name);
+void cmd_xfer(char *tag, char *name, char *toserver, char *topart);
+void cmd_rename(char *tag, char *oldname, char *newname, char *partition);
+void cmd_reconstruct(const char *tag, const char *name, int recursive);
+void cmd_find(char *tag, char *namespace, char *pattern);
+void cmd_list(char *tag, int listopts, char *reference, char *pattern);
+void cmd_changesub(char *tag, char *namespace, char *name, int add);
+void cmd_getacl(const char *tag, const char *name);
+void cmd_listrights(char *tag, char *name, char *identifier);
+void cmd_myrights(const char *tag, const char *name);
+void cmd_setacl(char *tag, const char *name,
+ const char *identifier, const char *rights);
+void cmd_getquota(const char *tag, const char *name);
+void cmd_getquotaroot(const char *tag, const char *name);
+void cmd_setquota(const char *tag, const char *quotaroot);
+void cmd_status(char *tag, char *name);
+void cmd_unselect(char* tag);
+void cmd_namespace(char* tag);
+void cmd_mupdatepush(char *tag, char *name);
+void cmd_id(char* tag);
+extern void id_getcmdline(int argc, char **argv);
+extern void id_response(struct protstream *pout);
+
+void cmd_idle(char* tag);
+void idle_update(idle_flags_t flags);
+
+void cmd_starttls(char *tag, int imaps);
+
+#ifdef HAVE_SSL
+void cmd_urlfetch(char *tag);
+void cmd_genurlauth(char *tag);
+void cmd_resetkey(char *tag, char *mailbox, char *mechanism);
+#endif
+
+#ifdef ENABLE_X_NETSCAPE_HACK
+void cmd_netscrape(char* tag);
+#endif
+
+void cmd_getannotation(char* tag, char *mboxpat);
+void cmd_setannotation(char* tag, char *mboxpat);
+
+int getannotatefetchdata(char *tag,
+ struct strlist **entries, struct strlist **attribs);
+int getannotatestoredata(char *tag, struct entryattlist **entryatts);
+
+void annotate_response(struct entryattlist *l);
+
+#ifdef ENABLE_LISTEXT
+int getlistopts(char *tag, int *listopts);
+#endif
+
+int getsearchprogram(char *tag, struct searchargs *searchargs,
+ int *charset, int parsecharset);
+int getsearchcriteria(char *tag, struct searchargs *searchargs,
+ int *charset, int parsecharset);
+int getsearchdate(time_t *start, time_t *end);
+int getsortcriteria(char *tag, struct sortcrit **sortcrit);
+int getdatetime(time_t *date);
+
+void printstring(const char *s);
+void printastring(const char *s);
+
+void appendfieldlist(struct fieldlist **l, char *section,
+ struct strlist *fields, char *trail,
+ void *d, size_t size);
+void freefieldlist(struct fieldlist *l);
+void freestrlist(struct strlist *l);
+void appendsearchargs(struct searchargs *s, struct searchargs *s1,
+ struct searchargs *s2);
+void freesearchargs(struct searchargs *s);
+static void freesortcrit(struct sortcrit *s);
+
+static int mailboxdata(char *name, int matchlen, int maycreate, void *rock);
+static int listdata(char *name, int matchlen, int maycreate, void *rock);
+static void mstringdata(char *cmd, char *name, int matchlen, int maycreate,
+ int listopts);
+
+extern void setproctitle_init(int argc, char **argv, char **envp);
+extern int proc_register(const char *progname, const char *clienthost,
+ const char *userid, const char *mailbox);
+extern void proc_cleanup(void);
+
+extern int saslserver(sasl_conn_t *conn, const char *mech,
+ const char *init_resp, const char *resp_prefix,
+ const char *continuation, const char *empty_resp,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, char **success_data);
+
+/* Enable the resetting of a sasl_conn_t */
+static int reset_saslconn(sasl_conn_t **conn);
+
+static struct
+{
+ char *ipremoteport;
+ char *iplocalport;
+ sasl_ssf_t ssf;
+ char *authid;
+} saslprops = {NULL,NULL,0,NULL};
+
+static int imapd_canon_user(sasl_conn_t *conn, void *context,
+ const char *user, unsigned ulen,
+ unsigned flags, const char *user_realm,
+ char *out, unsigned out_max, unsigned *out_ulen)
+{
+ char userbuf[MAX_MAILBOX_NAME+1], *p;
+ size_t n;
+ int r;
+
+ if (!ulen) ulen = strlen(user);
+
+ if (config_getswitch(IMAPOPT_IMAPMAGICPLUS)) {
+ /* make a working copy of the auth[z]id */
+ if (ulen > MAX_MAILBOX_NAME) {
+ sasl_seterror(conn, 0, "buffer overflow while canonicalizing");
+ return SASL_BUFOVER;
+ }
+ memcpy(userbuf, user, ulen);
+ userbuf[ulen] = '\0';
+ user = userbuf;
+
+ /* See if we're using the magic plus
+ (currently we don't support anything after '+') */
+ if ((p = strchr(userbuf, '+')) &&
+ (n = config_virtdomains ? strcspn(p, "@") : strlen(p)) == 1) {
+
+ if (flags & SASL_CU_AUTHZID) {
+ /* make a copy of the magic plus */
+ if (imapd_magicplus) free(imapd_magicplus);
+ imapd_magicplus = xstrndup(p, n);
+ }
+
+ /* strip the magic plus from the auth[z]id */
+ memmove(p, p+n, strlen(p+n)+1);
+ ulen -= n;
+ }
+ }
+
+ r = mysasl_canon_user(conn, context, user, ulen, flags, user_realm,
+ out, out_max, out_ulen);
+
+ if (!r && imapd_magicplus && flags == SASL_CU_AUTHZID) {
+ /* If we're only doing the authzid, put back the magic plus
+ in case its used in the challenge/response calculation */
+ n = strlen(imapd_magicplus);
+ if (*out_ulen + n > out_max) {
+ sasl_seterror(conn, 0, "buffer overflow while canonicalizing");
+ r = SASL_BUFOVER;
+ }
+ else {
+ p = (config_virtdomains && (p = strchr(out, '@'))) ?
+ p : out + *out_ulen;
+ memmove(p+n, p, strlen(p)+1);
+ memcpy(p, imapd_magicplus, n);
+ *out_ulen += n;
+ }
+ }
+
+ return r;
+}
+
+static int imapd_proxy_policy(sasl_conn_t *conn,
+ void *context,
+ const char *requested_user, unsigned rlen,
+ const char *auth_identity, unsigned alen,
+ const char *def_realm,
+ unsigned urlen,
+ struct propctx *propctx)
+{
+ if (config_getswitch(IMAPOPT_IMAPMAGICPLUS)) {
+ char userbuf[MAX_MAILBOX_NAME+1], *p;
+ size_t n;
+
+ /* make a working copy of the authzid */
+ if (!rlen) rlen = strlen(requested_user);
+ if (rlen > MAX_MAILBOX_NAME) {
+ sasl_seterror(conn, 0, "buffer overflow while proxying");
+ return SASL_BUFOVER;
+ }
+ memcpy(userbuf, requested_user, rlen);
+ userbuf[rlen] = '\0';
+ requested_user = userbuf;
+
+ /* See if we're using the magic plus */
+ if ((p = strchr(userbuf, '+'))) {
+ n = config_virtdomains ? strcspn(p, "@") : strlen(p);
+
+ /* strip the magic plus from the authzid */
+ memmove(p, p+n, strlen(p+n)+1);
+ rlen -= n;
+ }
+ }
+
+ return mysasl_proxy_policy(conn, context, requested_user, rlen,
+ auth_identity, alen, def_realm, urlen, propctx);
+}
+
+static const struct sasl_callback mysasl_cb[] = {
+ { SASL_CB_GETOPT, &mysasl_config, NULL },
+ { SASL_CB_PROXY_POLICY, &imapd_proxy_policy, (void*) &imapd_proxyctx },
+ { SASL_CB_CANON_USER, &imapd_canon_user, (void*) &disable_referrals },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+/* imapd_refer() issues a referral to the client. */
+static void imapd_refer(const char *tag,
+ const char *server,
+ const char *mailbox)
+{
+ struct imapurl imapurl;
+ char url[MAX_MAILBOX_PATH+1];
+
+ memset(&imapurl, 0, sizeof(struct imapurl));
+ imapurl.server = server;
+ imapurl.mailbox = mailbox;
+ imapurl.auth = !strcmp(imapd_userid, "anonymous") ? "anonymous" : "*";
+
+ imapurl_toURL(url, &imapurl);
+
+ prot_printf(imapd_out, "%s NO [REFERRAL %s] Remote mailbox.\r\n",
+ tag, url);
+}
+
+/* wrapper for mboxlist_lookup that will force a referral if we are remote
+ * returns IMAP_SERVER_UNAVAILABLE if we don't have a place to send the client
+ * (that'd be a bug).
+ * returns IMAP_MAILBOX_MOVED if we referred the client */
+/* ext_name is the external name of the mailbox */
+/* you can avoid referring the client by setting tag or ext_name to NULL. */
+int mlookup(const char *tag, const char *ext_name,
+ const char *name, int *flags, char **pathp, char **mpathp,
+ char **partp, char **aclp, struct txn **tid)
+{
+ int r, mbtype;
+ char *remote, *acl;
+
+ r = mboxlist_detail(name, &mbtype, pathp, mpathp, &remote, &acl, tid);
+ if ((r == IMAP_MAILBOX_NONEXISTENT || (mbtype & MBTYPE_RESERVE)) &&
+ config_mupdate_server) {
+ /* It is not currently active, make sure we have the most recent
+ * copy of the database */
+ kick_mupdate();
+ r = mboxlist_detail(name, &mbtype, pathp, mpathp, &remote, &acl, tid);
+ }
+
+ if(partp) *partp = remote;
+ if(aclp) *aclp = acl;
+ if(flags) *flags = mbtype;
+ if(r) return r;
+
+ if(mbtype & MBTYPE_RESERVE) return IMAP_MAILBOX_RESERVED;
+
+ if(mbtype & MBTYPE_MOVING) {
+ /* do we have rights on the mailbox? */
+ if(!imapd_userisadmin &&
+ (!acl || !(cyrus_acl_myrights(imapd_authstate,acl) & ACL_LOOKUP))) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ } else if(tag && ext_name && remote && *remote) {
+ char *c = NULL;
+
+ c = strchr(remote, '!');
+ if(c) *c = '\0';
+ imapd_refer(tag, remote, ext_name);
+ r = IMAP_MAILBOX_MOVED;
+ } else if(config_mupdate_server) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ } else {
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ }
+ }
+ else if (mbtype & MBTYPE_REMOTE) {
+ /* xxx hide the fact that we are storing partitions */
+ if(remote && *remote) {
+ char *c;
+ c = strchr(remote, '!');
+ if(c) *c = '\0';
+ }
+ }
+
+ return r;
+}
+
+static void imapd_reset(void)
+{
+ int i;
+
+ proc_cleanup();
+
+ /* close backend connections */
+ i = 0;
+ while (backend_cached && backend_cached[i]) {
+ proxy_downserver(backend_cached[i]);
+ if (backend_cached[i]->last_result.s) {
+ free(backend_cached[i]->last_result.s);
+ }
+ free(backend_cached[i]);
+ i++;
+ }
+ if (backend_cached) free(backend_cached);
+ backend_cached = NULL;
+ backend_inbox = backend_current = NULL;
+ proxy_cmdcnt = 0;
+ disable_referrals = 0;
+ supports_referrals = 0;
+
+ if (imapd_mailbox) {
+ index_closemailbox(imapd_mailbox);
+ mailbox_close(imapd_mailbox);
+ imapd_mailbox = 0;
+ }
+
+ if (imapd_in) {
+ /* Flush the incoming buffer */
+ prot_NONBLOCK(imapd_in);
+ prot_fill(imapd_in);
+
+ prot_free(imapd_in);
+ }
+
+ if (imapd_out) {
+ /* Flush the outgoing buffer */
+ prot_flush(imapd_out);
+
+ prot_free(imapd_out);
+ }
+
+ imapd_in = imapd_out = NULL;
+
+ if (protin) protgroup_reset(protin);
+
+#ifdef HAVE_SSL
+ if (tls_conn) {
+ if (tls_reset_servertls(&tls_conn) == -1) {
+ fatal("tls_reset() failed", EC_TEMPFAIL);
+ }
+ tls_conn = NULL;
+ }
+#endif
+
+ cyrus_reset_stdio();
+
+ strcpy(imapd_clienthost, "[local]");
+ if (imapd_logfd != -1) {
+ close(imapd_logfd);
+ imapd_logfd = -1;
+ }
+ if (imapd_userid != NULL) {
+ free(imapd_userid);
+ imapd_userid = NULL;
+ }
+ if (proxy_userid != NULL) {
+ free(proxy_userid);
+ proxy_userid = NULL;
+ }
+ if (imapd_magicplus != NULL) {
+ free(imapd_magicplus);
+ imapd_magicplus = NULL;
+ }
+ if (imapd_authstate) {
+ auth_freestate(imapd_authstate);
+ imapd_authstate = NULL;
+ }
+ imapd_userisadmin = 0;
+ imapd_userisproxyadmin = 0;
+ imapd_condstore_client = 0;
+ if (imapd_saslconn) {
+ sasl_dispose(&imapd_saslconn);
+ imapd_saslconn = NULL;
+ }
+ imapd_starttls_done = 0;
+ plaintextloginalert = NULL;
+
+ if(saslprops.iplocalport) {
+ free(saslprops.iplocalport);
+ saslprops.iplocalport = NULL;
+ }
+ if(saslprops.ipremoteport) {
+ free(saslprops.ipremoteport);
+ saslprops.ipremoteport = NULL;
+ }
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ saslprops.ssf = 0;
+
+ imapd_exists = -1;
+}
+
+/*
+ * run once when process is forked;
+ * MUST NOT exit directly; must return with non-zero error code
+ */
+int service_init(int argc, char **argv, char **envp)
+{
+ int ret;
+ int opt;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+ setproctitle_init(argc, argv, envp);
+
+ /* set signal handlers */
+ signals_set_shutdown(&shut_down);
+ signal(SIGPIPE, SIG_IGN);
+
+ /* load the SASL plugins */
+ global_sasl_init(1, 1, mysasl_cb);
+
+ ret = snprintf(shutdownfilename, sizeof(shutdownfilename),
+ "%s/msg/shutdown", config_dir);
+
+ if(ret < 0 || ret >= sizeof(shutdownfilename)) {
+ fatal("shutdownfilename buffer too small (configdirectory too long)",
+ EC_CONFIG);
+ }
+
+ /* open the mboxlist, we'll need it for real work */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+ mailbox_initialize();
+
+ /* open the quota db, we'll need it for real work */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ /* setup for sending IMAP IDLE notifications */
+ idle_enabled();
+
+ /* create connection to the SNMP listener, if available. */
+ snmp_connect(); /* ignore return code */
+ snmp_set_str(SERVER_NAME_VERSION,CYRUS_VERSION);
+
+ while ((opt = getopt(argc, argv, "sp:")) != EOF) {
+ switch (opt) {
+ case 's': /* imaps (do starttls right away) */
+ imaps = 1;
+ if (!tls_enabled()) {
+ syslog(LOG_ERR, "imaps: required OpenSSL options not present");
+ fatal("imaps: required OpenSSL options not present",
+ EC_CONFIG);
+ }
+ break;
+ case 'p': /* external protection */
+ extprops_ssf = atoi(optarg);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* Initialize the annotatemore extention */
+ if (config_mupdate_server)
+ annotatemore_init(0, annotate_fetch_proxy, annotate_store_proxy);
+ else
+ annotatemore_init(0, NULL, NULL);
+ annotatemore_open(NULL);
+
+ /* Create a protgroup for input from the client and selected backend */
+ protin = protgroup_new(2);
+
+ /* YYY Sanity checks possible here? */
+ message_uuid_client_init(getenv("CYRUS_UUID_PREFIX"));
+
+ return 0;
+}
+
+/*
+ * run for each accepted connection
+ */
+#ifdef ID_SAVE_CMDLINE
+int service_main(int argc, char **argv, char **envp __attribute__((unused)))
+#else
+int service_main(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+#endif
+{
+ socklen_t salen;
+ int timeout;
+ sasl_security_properties_t *secprops = NULL;
+ struct sockaddr_storage imapd_localaddr, imapd_remoteaddr;
+ char localip[60], remoteip[60];
+ char hbuf[NI_MAXHOST];
+ int niflags;
+ int imapd_haveaddr = 0;
+
+ signals_poll();
+
+#ifdef ID_SAVE_CMDLINE
+ /* get command line args for use in ID before getopt mangles them */
+ id_getcmdline(argc, argv);
+#endif
+
+ sync_log_init();
+
+ imapd_in = prot_new(0, 0);
+ imapd_out = prot_new(1, 1);
+ protgroup_insert(protin, imapd_in);
+
+ /* Find out name of client host */
+ salen = sizeof(imapd_remoteaddr);
+ if (getpeername(0, (struct sockaddr *)&imapd_remoteaddr, &salen) == 0 &&
+ (imapd_remoteaddr.ss_family == AF_INET ||
+ imapd_remoteaddr.ss_family == AF_INET6)) {
+ if (getnameinfo((struct sockaddr *)&imapd_remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD) == 0) {
+ strncpy(imapd_clienthost, hbuf, sizeof(hbuf));
+ strlcat(imapd_clienthost, " ", sizeof(imapd_clienthost));
+ imapd_clienthost[sizeof(imapd_clienthost)-30] = '\0';
+ } else {
+ imapd_clienthost[0] = '\0';
+ }
+ niflags = NI_NUMERICHOST;
+#ifdef NI_WITHSCOPEID
+ if (((struct sockaddr *)&imapd_remoteaddr)->sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&imapd_remoteaddr, salen, hbuf,
+ sizeof(hbuf), NULL, 0, niflags) != 0)
+ strlcpy(hbuf, "unknown", sizeof(hbuf));
+ strlcat(imapd_clienthost, "[", sizeof(imapd_clienthost));
+ strlcat(imapd_clienthost, hbuf, sizeof(imapd_clienthost));
+ strlcat(imapd_clienthost, "]", sizeof(imapd_clienthost));
+ salen = sizeof(imapd_localaddr);
+ if (getsockname(0, (struct sockaddr *)&imapd_localaddr, &salen) == 0) {
+ if(iptostring((struct sockaddr *)&imapd_remoteaddr, salen,
+ remoteip, sizeof(remoteip)) == 0
+ && iptostring((struct sockaddr *)&imapd_localaddr, salen,
+ localip, sizeof(localip)) == 0) {
+ imapd_haveaddr = 1;
+ }
+ }
+ }
+
+ /* create the SASL connection */
+ if (sasl_server_new("imap", config_servername,
+ NULL, NULL, NULL, NULL, 0,
+ &imapd_saslconn) != SASL_OK) {
+ fatal("SASL failed initializing: sasl_server_new()", EC_TEMPFAIL);
+ }
+
+ /* never allow plaintext, since IMAP has the LOGIN command */
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ sasl_setprop(imapd_saslconn, SASL_SEC_PROPS, secprops);
+ sasl_setprop(imapd_saslconn, SASL_SSF_EXTERNAL, &extprops_ssf);
+
+ if (imapd_haveaddr) {
+ sasl_setprop(imapd_saslconn, SASL_IPREMOTEPORT, remoteip);
+ saslprops.ipremoteport = xstrdup(remoteip);
+ sasl_setprop(imapd_saslconn, SASL_IPLOCALPORT, localip);
+ saslprops.iplocalport = xstrdup(localip);
+ }
+
+ proc_register("imapd", imapd_clienthost, NULL, NULL);
+
+ /* Set inactivity timer */
+ timeout = config_getint(IMAPOPT_TIMEOUT);
+ if (timeout < 30) timeout = 30;
+ prot_settimeout(imapd_in, timeout*60);
+ prot_setflushonread(imapd_in, imapd_out);
+
+ /* we were connected on imaps port so we should do
+ TLS negotiation immediately */
+ if (imaps == 1) cmd_starttls(NULL, 1);
+
+ snmp_increment(TOTAL_CONNECTIONS, 1);
+ snmp_increment(ACTIVE_CONNECTIONS, 1);
+
+ cmdloop();
+
+ /* LOGOUT executed */
+ prot_flush(imapd_out);
+ snmp_increment(ACTIVE_CONNECTIONS, -1);
+
+ /* cleanup */
+ imapd_reset();
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+/*
+ * found a motd file; spit out message and return
+ */
+void motd_file(fd)
+int fd;
+{
+ struct protstream *motd_in;
+ char buf[1024];
+ char *p;
+
+ motd_in = prot_new(fd, 0);
+
+ prot_fgets(buf, sizeof(buf), motd_in);
+ if ((p = strchr(buf, '\r'))!=NULL) *p = 0;
+ if ((p = strchr(buf, '\n'))!=NULL) *p = 0;
+
+ for(p = buf; *p == '['; p++); /* can't have [ be first char, sigh */
+ prot_printf(imapd_out, "* OK [ALERT] %s\r\n", p);
+}
+
+/*
+ * Cleanly shut down and exit
+ */
+void shut_down(int code) __attribute__((noreturn));
+void shut_down(int code)
+{
+ int i;
+
+ proc_cleanup();
+
+ i = 0;
+ while (backend_cached && backend_cached[i]) {
+ proxy_downserver(backend_cached[i]);
+ if (backend_cached[i]->last_result.s) {
+ free(backend_cached[i]->last_result.s);
+ }
+ free(backend_cached[i]);
+ i++;
+ }
+ if (backend_cached) free(backend_cached);
+
+ if (imapd_mailbox) {
+ index_closemailbox(imapd_mailbox);
+ mailbox_close(imapd_mailbox);
+ }
+ seen_done();
+ mboxkey_done();
+ mboxlist_close();
+ mboxlist_done();
+
+ quotadb_close();
+ quotadb_done();
+
+ annotatemore_close();
+ annotatemore_done();
+
+ if (imapd_in) {
+ /* Flush the incoming buffer */
+ prot_NONBLOCK(imapd_in);
+ prot_fill(imapd_in);
+
+ prot_free(imapd_in);
+ }
+
+ if (imapd_out) {
+ /* Flush the outgoing buffer */
+ prot_flush(imapd_out);
+ prot_free(imapd_out);
+
+ /* one less active connection */
+ snmp_increment(ACTIVE_CONNECTIONS, -1);
+ }
+
+ if (protin) protgroup_free(protin);
+
+#ifdef HAVE_SSL
+ tls_shutdown_serverengine();
+#endif
+
+ cyrus_done();
+
+ exit(code);
+}
+
+void fatal(const char *s, int code)
+{
+ static int recurse_code = 0;
+
+ if (recurse_code) {
+ /* We were called recursively. Just give up */
+ proc_cleanup();
+ snmp_increment(ACTIVE_CONNECTIONS, -1);
+ exit(recurse_code);
+ }
+ recurse_code = code;
+ if (imapd_out) {
+ prot_printf(imapd_out, "* BYE Fatal error: %s\r\n", s);
+ prot_flush(imapd_out);
+ }
+ if (stage) {
+ /* Cleanup the stage(s) */
+ while (numstage) {
+ struct appendstage *curstage = stage[--numstage];
+
+ if (curstage->f != NULL) fclose(curstage->f);
+ append_removestage(curstage->stage);
+ while (curstage->nflags--) {
+ free(curstage->flag[curstage->nflags]);
+ }
+ if (curstage->flag) free((char *) curstage->flag);
+ free(curstage);
+ }
+ free(stage);
+ }
+
+ syslog(LOG_ERR, "Fatal error: %s", s);
+ shut_down(code);
+}
+
+/*
+ * Check the currently selected mailbox for updates.
+ *
+ * 'be' is the backend (if any) that we just proxied a command to.
+ */
+static void imapd_check(struct backend *be, int usinguid, int checkseen)
+{
+ if (backend_current && backend_current != be) {
+ /* remote mailbox */
+ char mytag[128];
+
+ proxy_gentag(mytag, sizeof(mytag));
+
+ prot_printf(backend_current->out, "%s Noop\r\n", mytag);
+ pipe_until_tag(backend_current, mytag, 0);
+ }
+ else if (imapd_mailbox) {
+ /* local mailbox */
+ index_check(imapd_mailbox, usinguid, checkseen);
+ }
+}
+
+/*
+ * Top-level command loop parsing
+ */
+void cmdloop()
+{
+ int fd;
+ char motdfilename[1024];
+ int c;
+ int ret;
+ int usinguid, havepartition, havenamespace, recursive;
+ static struct buf tag, cmd, arg1, arg2, arg3, arg4;
+ char *p, shut[1024];
+ const char *err;
+
+ prot_printf(imapd_out, "* OK [CAPABILITY ");
+ capa_response(CAPA_PREAUTH);
+ prot_printf(imapd_out, "] %s Cyrus IMAP4 %s%s server ready\r\n",
+ config_servername,
+ config_mupdate_server ? "(Murder) " : "", CYRUS_VERSION);
+
+ ret = snprintf(motdfilename, sizeof(motdfilename), "%s/msg/motd",
+ config_dir);
+
+ if(ret < 0 || ret >= sizeof(motdfilename)) {
+ fatal("motdfilename buffer too small (configdirectory too long)",
+ EC_CONFIG);
+ }
+
+ if ((fd = open(motdfilename, O_RDONLY, 0)) != -1) {
+ motd_file(fd);
+ close(fd);
+ }
+
+ for (;;) {
+ /* Flush any buffered output */
+ prot_flush(imapd_out);
+ if (backend_current) prot_flush(backend_current->out);
+
+ /* Check for shutdown file */
+ if ( !imapd_userisadmin && imapd_userid
+ && shutdown_file(shut, sizeof(shut))) {
+ for (p = shut; *p == '['; p++); /* can't have [ be first char */
+ prot_printf(imapd_out, "* BYE [ALERT] %s\r\n", p);
+ shut_down(0);
+ }
+
+ signals_poll();
+
+ if (!proxy_check_input(protin, imapd_in, imapd_out,
+ backend_current ? backend_current->in : NULL,
+ NULL, 0)) {
+ /* No input from client */
+ continue;
+ }
+
+ /* Parse tag */
+ c = getword(imapd_in, &tag);
+ if (c == EOF) {
+ if ((err = prot_error(imapd_in))!=NULL
+ && strcmp(err, PROT_EOF_STRING)) {
+ syslog(LOG_WARNING, "%s, closing connection", err);
+ prot_printf(imapd_out, "* BYE %s\r\n", err);
+ }
+ return;
+ }
+ if (c != ' ' || !imparse_isatom(tag.s) || (tag.s[0] == '*' && !tag.s[1])) {
+ prot_printf(imapd_out, "* BAD Invalid tag\r\n");
+ eatline(imapd_in, c);
+ continue;
+ }
+
+ /* Parse command name */
+ c = getword(imapd_in, &cmd);
+ if (!cmd.s[0]) {
+ prot_printf(imapd_out, "%s BAD Null command\r\n", tag.s);
+ eatline(imapd_in, c);
+ continue;
+ }
+ if (islower((unsigned char) cmd.s[0]))
+ cmd.s[0] = toupper((unsigned char) cmd.s[0]);
+ for (p = &cmd.s[1]; *p; p++) {
+ if (isupper((unsigned char) *p)) *p = tolower((unsigned char) *p);
+ }
+
+ /* if we need to force a kick, do so */
+ if (referral_kick) {
+ kick_mupdate();
+ referral_kick = 0;
+ }
+
+ if (plaintextloginalert) {
+ prot_printf(imapd_out, "* OK [ALERT] %s\r\n",
+ plaintextloginalert);
+ plaintextloginalert = NULL;
+ }
+
+ /* Only Authenticate/Login/Logout/Noop/Capability/Id/Starttls
+ allowed when not logged in */
+ if (!imapd_userid && !strchr("ALNCIS", cmd.s[0])) goto nologin;
+
+ /* note that about half the commands (the common ones that don't
+ hit the mailboxes file) now close the mailboxes file just in
+ case it was open. */
+ switch (cmd.s[0]) {
+ case 'A':
+ if (!strcmp(cmd.s, "Authenticate")) {
+ int haveinitresp = 0;
+
+ if (c != ' ') goto missingargs;
+ c = getword(imapd_in, &arg1);
+ if (!imparse_isatom(arg1.s)) {
+ prot_printf(imapd_out, "%s BAD Invalid authenticate mechanism\r\n", tag.s);
+ eatline(imapd_in, c);
+ continue;
+ }
+ if (c == ' ') {
+ haveinitresp = 1;
+ c = getword(imapd_in, &arg2);
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ if (imapd_userid) {
+ prot_printf(imapd_out, "%s BAD Already authenticated\r\n", tag.s);
+ continue;
+ }
+ cmd_authenticate(tag.s, arg1.s, haveinitresp ? arg2.s : NULL);
+
+ snmp_increment(AUTHENTICATE_COUNT, 1);
+ }
+ else if (!imapd_userid) goto nologin;
+ else if (!strcmp(cmd.s, "Append")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+
+ cmd_append(tag.s, arg1.s, NULL);
+
+ snmp_increment(APPEND_COUNT, 1);
+ }
+ else goto badcmd;
+ break;
+
+ case 'B':
+ if (!strcmp(cmd.s, "Bboard")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ prot_ungetc(c, imapd_in);
+
+ cmd_select(tag.s, cmd.s, arg1.s);
+
+ snmp_increment(BBOARD_COUNT, 1);
+ }
+ else goto badcmd;
+ break;
+
+ case 'C':
+ if (!strcmp(cmd.s, "Capability")) {
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_capability(tag.s);
+
+ snmp_increment(CAPABILITY_COUNT, 1);
+ }
+ else if (!imapd_userid) goto nologin;
+ else if (!strcmp(cmd.s, "Check")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_noop(tag.s, cmd.s);
+
+ snmp_increment(CHECK_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Copy")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ usinguid = 0;
+ if (c != ' ') goto missingargs;
+ copy:
+ c = getword(imapd_in, &arg1);
+ if (c == '\r') goto missingargs;
+ if (c != ' ' || !imparse_issequence(arg1.s)) goto badsequence;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_copy(tag.s, arg1.s, arg2.s, usinguid);
+
+ snmp_increment(COPY_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Create")) {
+ havepartition = 0;
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ havepartition = 1;
+ c = getword(imapd_in, &arg2);
+ if (!imparse_isatom(arg2.s)) goto badpartition;
+ }
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_create(tag.s, arg1.s, havepartition ? arg2.s : 0, 0);
+
+ snmp_increment(CREATE_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Close")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_close(tag.s);
+
+ snmp_increment(CLOSE_COUNT, 1);
+ }
+ else goto badcmd;
+ break;
+
+ case 'D':
+ if (!strcmp(cmd.s, "Delete")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_delete(tag.s, arg1.s, 0, 0);
+
+ snmp_increment(DELETE_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Deleteacl")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_setacl(tag.s, arg1.s, arg2.s, NULL);
+
+ snmp_increment(DELETEACL_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Dump")) {
+ int uid_start = 0;
+
+ if(c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if(c == ' ') {
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if(!imparse_isnumber(arg2.s)) goto extraargs;
+ uid_start = atoi(arg2.s);
+ }
+
+ if(c == '\r') c = prot_getc(imapd_in);
+ if(c != '\n') goto extraargs;
+
+ cmd_dump(tag.s, arg1.s, uid_start);
+ /* snmp_increment(DUMP_COUNT, 1);*/
+ }
+ else goto badcmd;
+ break;
+
+ case 'E':
+ if (!strcmp(cmd.s, "Expunge")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_expunge(tag.s, 0);
+
+ snmp_increment(EXPUNGE_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Examine")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ prot_ungetc(c, imapd_in);
+
+ cmd_select(tag.s, cmd.s, arg1.s);
+
+ snmp_increment(EXAMINE_COUNT, 1);
+ }
+ else goto badcmd;
+ break;
+
+ case 'F':
+ if (!strcmp(cmd.s, "Fetch")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ usinguid = 0;
+ if (c != ' ') goto missingargs;
+ fetch:
+ c = getword(imapd_in, &arg1);
+ if (c == '\r') goto missingargs;
+ if (c != ' ' || !imparse_issequence(arg1.s)) goto badsequence;
+
+ cmd_fetch(tag.s, arg1.s, usinguid);
+
+ snmp_increment(FETCH_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Find")) {
+ c = getword(imapd_in, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_find(tag.s, arg1.s, arg2.s);
+
+ snmp_increment(FIND_COUNT, 1);
+ }
+ else goto badcmd;
+ break;
+
+ case 'G':
+ if (!strcmp(cmd.s, "Getacl")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_getacl(tag.s, arg1.s);
+
+ snmp_increment(GETACL_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Getannotation")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+
+ cmd_getannotation(tag.s, arg1.s);
+
+ snmp_increment(GETANNOTATION_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Getquota")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_getquota(tag.s, arg1.s);
+
+ snmp_increment(GETQUOTA_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Getquotaroot")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_getquotaroot(tag.s, arg1.s);
+
+ snmp_increment(GETQUOTAROOT_COUNT, 1);
+ }
+#ifdef HAVE_SSL
+ else if (!strcmp(cmd.s, "Genurlauth")) {
+ if (c != ' ') goto missingargs;
+
+ cmd_genurlauth(tag.s);
+ /* snmp_increment(GENURLAUTH_COUNT, 1);*/
+ }
+#endif
+ else goto badcmd;
+ break;
+
+ case 'I':
+ if (!strcmp(cmd.s, "Id")) {
+ if (c != ' ') goto missingargs;
+ cmd_id(tag.s);
+
+ snmp_increment(ID_COUNT, 1);
+ }
+ else if (!imapd_userid) goto nologin;
+ else if (!strcmp(cmd.s, "Idle") && idle_enabled()) {
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_idle(tag.s);
+
+ snmp_increment(IDLE_COUNT, 1);
+ }
+ else goto badcmd;
+ break;
+
+ case 'L':
+ if (!strcmp(cmd.s, "Login")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if(c != ' ') goto missingargs;
+
+ cmd_login(tag.s, arg1.s);
+
+ snmp_increment(LOGIN_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Logout")) {
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ snmp_increment(LOGOUT_COUNT, 1);
+
+ /* force any responses from our selected backend */
+ if (backend_current) imapd_check(NULL, 0, 0);
+
+ prot_printf(imapd_out, "* BYE %s\r\n",
+ error_message(IMAP_BYE_LOGOUT));
+ prot_printf(imapd_out, "%s OK %s\r\n", tag.s,
+ error_message(IMAP_OK_COMPLETED));
+ return;
+ }
+ else if (!imapd_userid) goto nologin;
+ else if (!strcmp(cmd.s, "List")) {
+ int listopts = LIST_CHILDREN;
+#ifdef ENABLE_LISTEXT
+ /* Check for and parse LISTEXT options */
+ c = prot_getc(imapd_in);
+ if (c == '(') {
+ c = getlistopts(tag.s, &listopts);
+ if (c == EOF) {
+ eatline(imapd_in, c);
+ continue;
+ }
+ }
+ else
+ prot_ungetc(c, imapd_in);
+#endif /* ENABLE_LISTEXT */
+ if (imapd_magicplus) listopts += LIST_SUBSCRIBED;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_list(tag.s, listopts, arg1.s, arg2.s);
+
+ snmp_increment(LIST_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Lsub")) {
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_list(tag.s, LIST_LSUB | LIST_CHILDREN, arg1.s, arg2.s);
+
+ snmp_increment(LSUB_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Listrights")) {
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_listrights(tag.s, arg1.s, arg2.s);
+
+ snmp_increment(LISTRIGHTS_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Localappend")) {
+ /* create a local-only mailbox */
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c != ' ') goto missingargs;
+
+ cmd_append(tag.s, arg1.s, *arg2.s ? arg2.s : NULL);
+
+ snmp_increment(APPEND_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Localcreate")) {
+ /* create a local-only mailbox */
+ havepartition = 0;
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ havepartition = 1;
+ c = getword(imapd_in, &arg2);
+ if (!imparse_isatom(arg2.s)) goto badpartition;
+ }
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_create(tag.s, arg1.s, havepartition ? arg2.s : NULL, 1);
+
+ /* xxxx snmp_increment(CREATE_COUNT, 1); */
+ }
+ else if (!strcmp(cmd.s, "Localdelete")) {
+ /* delete a mailbox locally only */
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_delete(tag.s, arg1.s, 1, 1);
+
+ /* xxxx snmp_increment(DELETE_COUNT, 1); */
+ }
+ else goto badcmd;
+ break;
+
+ case 'M':
+ if (!strcmp(cmd.s, "Myrights")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_myrights(tag.s, arg1.s);
+
+ /* xxxx snmp_increment(MYRIGHTS_COUNT, 1); */
+ }
+ else if (!strcmp(cmd.s, "Mupdatepush")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if(c == EOF) goto missingargs;
+ if(c == '\r') c = prot_getc(imapd_in);
+ if(c != '\n') goto extraargs;
+ cmd_mupdatepush(tag.s, arg1.s);
+
+ /* xxxx snmp_increment(MUPDATEPUSH_COUNT, 1); */
+ } else goto badcmd;
+ break;
+
+ case 'N':
+ if (!strcmp(cmd.s, "Noop")) {
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_noop(tag.s, cmd.s);
+
+ /* xxxx snmp_increment(NOOP_COUNT, 1); */
+ }
+#ifdef ENABLE_X_NETSCAPE_HACK
+ else if (!strcmp(cmd.s, "Netscape")) {
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_netscrape(tag.s);
+ }
+#endif
+ else if (!imapd_userid) goto nologin;
+ else if (!strcmp(cmd.s, "Namespace")) {
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_namespace(tag.s);
+
+ /* xxxx snmp_increment(NAMESPACE_COUNT, 1); */
+ }
+ else goto badcmd;
+ break;
+
+ case 'P':
+ if (!strcmp(cmd.s, "Partial")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ if (c != ' ') goto missingargs;
+ c = getword(imapd_in, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getword(imapd_in, &arg2);
+ if (c != ' ') goto missingargs;
+ c = getword(imapd_in, &arg3);
+ if (c != ' ') goto missingargs;
+ c = getword(imapd_in, &arg4);
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_partial(tag.s, arg1.s, arg2.s, arg3.s, arg4.s);
+
+ /* xxxx snmp_increment(PARTIAL_COUNT, 1); */
+ }
+ else goto badcmd;
+ break;
+
+ case 'R':
+ if (!strcmp(cmd.s, "Rename")) {
+ havepartition = 0;
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ havepartition = 1;
+ c = getword(imapd_in, &arg3);
+ if (!imparse_isatom(arg3.s)) goto badpartition;
+ }
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_rename(tag.s, arg1.s, arg2.s, havepartition ? arg3.s : 0);
+
+ /* xxxx snmp_increment(RENAME_COUNT, 1); */
+ } else if(!strcmp(cmd.s, "Reconstruct")) {
+ recursive = 0;
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if(c == ' ') {
+ /* Optional RECURSEIVE argument */
+ c = getword(imapd_in, &arg2);
+ if(!imparse_isatom(arg2.s))
+ goto extraargs;
+ else if(!strcasecmp(arg2.s, "RECURSIVE"))
+ recursive = 1;
+ else
+ goto extraargs;
+ }
+ if(c == '\r') c = prot_getc(imapd_in);
+ if(c != '\n') goto extraargs;
+ cmd_reconstruct(tag.s, arg1.s, recursive);
+
+ /* snmp_increment(RECONSTRUCT_COUNT, 1); */
+ }
+ else if (!strcmp(cmd.s, "Rlist")) {
+ supports_referrals = !disable_referrals;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_list(tag.s, LIST_CHILDREN | LIST_REMOTE, arg1.s, arg2.s);
+
+/* snmp_increment(LIST_COUNT, 1); */
+ }
+ else if (!strcmp(cmd.s, "Rlsub")) {
+ supports_referrals = !disable_referrals;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_list(tag.s, LIST_LSUB | LIST_CHILDREN | LIST_REMOTE,
+ arg1.s, arg2.s);
+/* snmp_increment(LSUB_COUNT, 1); */
+ }
+#ifdef HAVE_SSL
+ else if (!strcmp(cmd.s, "Resetkey")) {
+ int have_mbox = 0, have_mech = 0;
+
+ if (c == ' ') {
+ have_mbox = 1;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ have_mech = 1;
+ c = getword(imapd_in, &arg2);
+ }
+ }
+
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_resetkey(tag.s, have_mbox ? arg1.s : 0,
+ have_mech ? arg2.s : 0);
+ /* snmp_increment(RESETKEY_COUNT, 1);*/
+ }
+#endif
+ else goto badcmd;
+ break;
+
+ case 'S':
+ if (!strcmp(cmd.s, "Starttls")) {
+ if (!tls_enabled()) {
+ /* we don't support starttls */
+ goto badcmd;
+ }
+
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ /* if we've already done SASL fail */
+ if (imapd_userid != NULL) {
+ prot_printf(imapd_out,
+ "%s BAD Can't Starttls after authentication\r\n", tag.s);
+ continue;
+ }
+
+ /* check if already did a successful tls */
+ if (imapd_starttls_done == 1) {
+ prot_printf(imapd_out,
+ "%s BAD Already did a successful Starttls\r\n",
+ tag.s);
+ continue;
+ }
+ cmd_starttls(tag.s, 0);
+
+ snmp_increment(STARTTLS_COUNT, 1);
+ continue;
+ }
+ if (!imapd_userid) {
+ goto nologin;
+ } else if (!strcmp(cmd.s, "Store")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ usinguid = 0;
+ if (c != ' ') goto missingargs;
+ store:
+ c = getword(imapd_in, &arg1);
+ if (c != ' ' || !imparse_issequence(arg1.s)) goto badsequence;
+
+ cmd_store(tag.s, arg1.s, usinguid);
+
+ snmp_increment(STORE_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Select")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == EOF) goto missingargs;
+ prot_ungetc(c, imapd_in);
+
+ cmd_select(tag.s, cmd.s, arg1.s);
+
+ snmp_increment(SELECT_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Search")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ usinguid = 0;
+ if (c != ' ') goto missingargs;
+ search:
+
+ cmd_search(tag.s, usinguid);
+
+ snmp_increment(SEARCH_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Subscribe")) {
+ if (c != ' ') goto missingargs;
+ havenamespace = 0;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == ' ') {
+ havenamespace = 1;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ }
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ if (havenamespace) {
+ cmd_changesub(tag.s, arg1.s, arg2.s, 1);
+ }
+ else {
+ cmd_changesub(tag.s, (char *)0, arg1.s, 1);
+ }
+ snmp_increment(SUBSCRIBE_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Setacl")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg3);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_setacl(tag.s, arg1.s, arg2.s, arg3.s);
+
+ snmp_increment(SETACL_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Setannotation")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+
+ cmd_setannotation(tag.s, arg1.s);
+
+ snmp_increment(SETANNOTATION_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Setquota")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ cmd_setquota(tag.s, arg1.s);
+
+ snmp_increment(SETQUOTA_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Sort")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ usinguid = 0;
+ if (c != ' ') goto missingargs;
+ sort:
+ cmd_sort(tag.s, usinguid);
+
+ snmp_increment(SORT_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Status")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') goto missingargs;
+ cmd_status(tag.s, arg1.s);
+
+ snmp_increment(STATUS_COUNT, 1);
+ }
+ else goto badcmd;
+ break;
+
+ case 'T':
+ if (!strcmp(cmd.s, "Thread")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ usinguid = 0;
+ if (c != ' ') goto missingargs;
+ thread:
+ cmd_thread(tag.s, usinguid);
+
+ snmp_increment(THREAD_COUNT, 1);
+ }
+ else goto badcmd;
+ break;
+
+ case 'U':
+ if (!strcmp(cmd.s, "Uid")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ usinguid = 1;
+ if (c != ' ') goto missingargs;
+ c = getword(imapd_in, &arg1);
+ if (c != ' ') goto missingargs;
+ lcase(arg1.s);
+ if (!strcmp(arg1.s, "fetch")) {
+ goto fetch;
+ }
+ else if (!strcmp(arg1.s, "store")) {
+ goto store;
+ }
+ else if (!strcmp(arg1.s, "search")) {
+ goto search;
+ }
+ else if (!strcmp(arg1.s, "sort")) {
+ goto sort;
+ }
+ else if (!strcmp(arg1.s, "thread")) {
+ goto thread;
+ }
+ else if (!strcmp(arg1.s, "copy")) {
+ goto copy;
+ }
+ else if (!strcmp(arg1.s, "expunge")) {
+ c = getword(imapd_in, &arg1);
+ if (!imparse_issequence(arg1.s)) goto badsequence;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_expunge(tag.s, arg1.s);
+
+ snmp_increment(EXPUNGE_COUNT, 1);
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Unrecognized UID subcommand\r\n", tag.s);
+ eatline(imapd_in, c);
+ }
+ }
+ else if (!strcmp(cmd.s, "Unsubscribe")) {
+ if (c != ' ') goto missingargs;
+ havenamespace = 0;
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c == ' ') {
+ havenamespace = 1;
+ c = getastring(imapd_in, imapd_out, &arg2);
+ }
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ if (havenamespace) {
+ cmd_changesub(tag.s, arg1.s, arg2.s, 0);
+ }
+ else {
+ cmd_changesub(tag.s, (char *)0, arg1.s, 0);
+ }
+
+ snmp_increment(UNSUBSCRIBE_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Unselect")) {
+ if (!imapd_mailbox && !backend_current) goto nomailbox;
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+ cmd_unselect(tag.s);
+
+ snmp_increment(UNSELECT_COUNT, 1);
+ }
+ else if (!strcmp(cmd.s, "Undump")) {
+ if(c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+
+ /* we want to get a list at this point */
+ if(c != ' ') goto missingargs;
+
+ cmd_undump(tag.s, arg1.s);
+ /* snmp_increment(UNDUMP_COUNT, 1);*/
+ }
+#ifdef HAVE_SSL
+ else if (!strcmp(cmd.s, "Urlfetch")) {
+ if (c != ' ') goto missingargs;
+
+ cmd_urlfetch(tag.s);
+ /* snmp_increment(URLFETCH_COUNT, 1);*/
+ }
+#endif
+ else goto badcmd;
+ break;
+
+ case 'X':
+ if (!strcmp(cmd.s, "Xfer")) {
+ int havepartition = 0;
+
+ /* Mailbox */
+ if(c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg1);
+
+ /* Dest Server */
+ if(c != ' ') goto missingargs;
+ c = getastring(imapd_in, imapd_out, &arg2);
+
+ if(c == ' ') {
+ /* Dest Partition */
+ c = getastring(imapd_in, imapd_out, &arg3);
+ if (!imparse_isatom(arg3.s)) goto badpartition;
+ havepartition = 1;
+ }
+
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_xfer(tag.s, arg1.s, arg2.s,
+ (havepartition ? arg3.s : NULL));
+ /* snmp_increment(XFER_COUNT, 1);*/
+ }
+ else goto badcmd;
+ break;
+
+ default:
+ badcmd:
+ prot_printf(imapd_out, "%s BAD Unrecognized command\r\n", tag.s);
+ eatline(imapd_in, c);
+ }
+
+ continue;
+
+ nologin:
+ prot_printf(imapd_out, "%s BAD Please login first\r\n", tag.s);
+ eatline(imapd_in, c);
+ continue;
+
+ nomailbox:
+ prot_printf(imapd_out, "%s BAD Please select a mailbox first\r\n", tag.s);
+ eatline(imapd_in, c);
+ continue;
+
+ missingargs:
+ prot_printf(imapd_out, "%s BAD Missing required argument to %s\r\n", tag.s, cmd.s);
+ eatline(imapd_in, c);
+ continue;
+
+ extraargs:
+ prot_printf(imapd_out, "%s BAD Unexpected extra arguments to %s\r\n", tag.s, cmd.s);
+ eatline(imapd_in, c);
+ continue;
+
+ badsequence:
+ prot_printf(imapd_out, "%s BAD Invalid sequence in %s\r\n", tag.s, cmd.s);
+ eatline(imapd_in, c);
+ continue;
+
+ badpartition:
+ prot_printf(imapd_out, "%s BAD Invalid partition name in %s\r\n",
+ tag.s, cmd.s);
+ eatline(imapd_in, c);
+ continue;
+ }
+}
+
+/*
+ * Perform a LOGIN command
+ */
+void cmd_login(char *tag, char *user)
+{
+ char userbuf[MAX_MAILBOX_NAME+1];
+ unsigned userlen;
+ const char *canon_user = userbuf;
+ char c;
+ struct buf passwdbuf;
+ char *passwd;
+ const char *reply = NULL;
+ int r;
+
+ if (imapd_userid) {
+ eatline(imapd_in, ' ');
+ prot_printf(imapd_out, "%s BAD Already logged in\r\n", tag);
+ return;
+ }
+
+ r = imapd_canon_user(imapd_saslconn, NULL, user, 0,
+ SASL_CU_AUTHID | SASL_CU_AUTHZID, NULL,
+ userbuf, sizeof(userbuf), &userlen);
+
+ if (r) {
+ syslog(LOG_NOTICE, "badlogin: %s plaintext %s invalid user",
+ imapd_clienthost, beautify_string(user));
+ prot_printf(imapd_out, "%s NO %s\r\n", tag,
+ error_message(IMAP_INVALID_USER));
+ return;
+ }
+
+ /* possibly disallow login */
+ if ((imapd_starttls_done == 0) &&
+ (config_getswitch(IMAPOPT_ALLOWPLAINTEXT) == 0) &&
+ !is_userid_anonymous(canon_user)) {
+ eatline(imapd_in, ' ');
+ prot_printf(imapd_out, "%s NO Login only available under a layer\r\n",
+ tag);
+ return;
+ }
+
+ memset(&passwdbuf,0,sizeof(struct buf));
+ c = getastring(imapd_in, imapd_out, &passwdbuf);
+
+ if(c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ freebuf(&passwdbuf);
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to LOGIN\r\n",
+ tag);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ passwd = passwdbuf.s;
+
+ if (is_userid_anonymous(canon_user)) {
+ if (config_getswitch(IMAPOPT_ALLOWANONYMOUSLOGIN)) {
+ passwd = beautify_string(passwd);
+ if (strlen(passwd) > 500) passwd[500] = '\0';
+ syslog(LOG_NOTICE, "login: %s anonymous %s",
+ imapd_clienthost, passwd);
+ reply = "Anonymous access granted";
+ imapd_userid = xstrdup("anonymous");
+ }
+ else {
+ syslog(LOG_NOTICE, "badlogin: %s anonymous login refused",
+ imapd_clienthost);
+ prot_printf(imapd_out, "%s NO %s\r\n", tag,
+ error_message(IMAP_ANONYMOUS_NOT_PERMITTED));
+ freebuf(&passwdbuf);
+ return;
+ }
+ }
+ else if ((r = sasl_checkpass(imapd_saslconn,
+ canon_user,
+ strlen(canon_user),
+ passwd,
+ strlen(passwd))) != SASL_OK) {
+ syslog(LOG_NOTICE, "badlogin: %s plaintext %s %s",
+ imapd_clienthost, canon_user, sasl_errdetail(imapd_saslconn));
+
+ sleep(3);
+
+ /* Don't allow user probing */
+ if (r == SASL_NOUSER) r = SASL_BADAUTH;
+
+ if ((reply = sasl_errstring(r, NULL, NULL)) != NULL) {
+ prot_printf(imapd_out, "%s NO Login failed: %s\r\n", tag, reply);
+ } else {
+ prot_printf(imapd_out, "%s NO Login failed: %d\r\n", tag, r);
+ }
+
+ snmp_increment_args(AUTHENTICATION_NO, 1,
+ VARIABLE_AUTH, 0 /* hash_simple("LOGIN") */,
+ VARIABLE_LISTEND);
+ freebuf(&passwdbuf);
+ return;
+ }
+ else {
+ r = sasl_getprop(imapd_saslconn, SASL_USERNAME,
+ (const void **) &canon_user);
+
+ if(r != SASL_OK) {
+ if ((reply = sasl_errstring(r, NULL, NULL)) != NULL) {
+ prot_printf(imapd_out, "%s NO Login failed: %s\r\n",
+ tag, reply);
+ } else {
+ prot_printf(imapd_out, "%s NO Login failed: %d\r\n", tag, r);
+ }
+
+ snmp_increment_args(AUTHENTICATION_NO, 1,
+ VARIABLE_AUTH, 0 /* hash_simple("LOGIN") */,
+ VARIABLE_LISTEND);
+ freebuf(&passwdbuf);
+ return;
+ }
+
+ reply = "User logged in";
+ imapd_userid = xstrdup(canon_user);
+ snmp_increment_args(AUTHENTICATION_YES, 1,
+ VARIABLE_AUTH, 0 /*hash_simple("LOGIN") */,
+ VARIABLE_LISTEND);
+ syslog(LOG_NOTICE, "login: %s %s%s plaintext%s %s", imapd_clienthost,
+ imapd_userid, imapd_magicplus ? imapd_magicplus : "",
+ imapd_starttls_done ? "+TLS" : "",
+ reply ? reply : "");
+
+ /* Apply penalty only if not under layer */
+ if (!imapd_starttls_done) {
+ int plaintextloginpause = config_getint(IMAPOPT_PLAINTEXTLOGINPAUSE);
+ if (plaintextloginpause) {
+ sleep(plaintextloginpause);
+ }
+
+ /* Fetch plaintext login nag message */
+ plaintextloginalert = config_getstring(IMAPOPT_PLAINTEXTLOGINALERT);
+ }
+ }
+
+ imapd_authstate = auth_newstate(imapd_userid);
+
+ imapd_userisadmin = global_authisa(imapd_authstate, IMAPOPT_ADMINS);
+
+ prot_printf(imapd_out, "%s OK [CAPABILITY ", tag);
+ capa_response(CAPA_PREAUTH|CAPA_POSTAUTH);
+ prot_printf(imapd_out, "] %s\r\n", reply);
+
+ /* Create telemetry log */
+ imapd_logfd = telemetry_log(imapd_userid, imapd_in, imapd_out, 0);
+
+ /* Set namespace */
+ if ((r = mboxname_init_namespace(&imapd_namespace,
+ imapd_userisadmin || imapd_userisproxyadmin)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ /* Make a copy of the external userid for use in proxying */
+ proxy_userid = xstrdup(imapd_userid);
+
+ /* Translate any separators in userid */
+ mboxname_hiersep_tointernal(&imapd_namespace, imapd_userid,
+ config_virtdomains ?
+ strcspn(imapd_userid, "@") : 0);
+
+ freebuf(&passwdbuf);
+ return;
+}
+
+/*
+ * Perform an AUTHENTICATE command
+ */
+void
+cmd_authenticate(char *tag, char *authtype, char *resp)
+{
+ int sasl_result;
+
+ const int *ssfp;
+ char *ssfmsg=NULL;
+
+ const char *canon_user;
+
+ int r;
+
+ r = saslserver(imapd_saslconn, authtype, resp, "", "+ ", "",
+ imapd_in, imapd_out, &sasl_result, NULL);
+
+ if (r) {
+ const char *errorstring = NULL;
+
+ switch (r) {
+ case IMAP_SASL_CANCEL:
+ prot_printf(imapd_out,
+ "%s BAD Client canceled authentication\r\n", tag);
+ break;
+ case IMAP_SASL_PROTERR:
+ errorstring = prot_error(imapd_in);
+
+ prot_printf(imapd_out,
+ "%s NO Error reading client response: %s\r\n",
+ tag, errorstring ? errorstring : "");
+ break;
+ default:
+ /* failed authentication */
+ syslog(LOG_NOTICE, "badlogin: %s %s [%s]",
+ imapd_clienthost, authtype, sasl_errdetail(imapd_saslconn));
+
+ snmp_increment_args(AUTHENTICATION_NO, 1,
+ VARIABLE_AUTH, 0, /* hash_simple(authtype) */
+ VARIABLE_LISTEND);
+ sleep(3);
+
+ /* Don't allow user probing */
+ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
+
+ errorstring = sasl_errstring(sasl_result, NULL, NULL);
+ if (errorstring) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, errorstring);
+ } else {
+ prot_printf(imapd_out, "%s NO Error authenticating\r\n", tag);
+ }
+ }
+
+ reset_saslconn(&imapd_saslconn);
+ return;
+ }
+
+ /* successful authentication */
+
+ /* get the userid from SASL --- already canonicalized from
+ * mysasl_proxy_policy()
+ */
+ sasl_result = sasl_getprop(imapd_saslconn, SASL_USERNAME,
+ (const void **) &canon_user);
+ if (sasl_result != SASL_OK) {
+ prot_printf(imapd_out, "%s NO weird SASL error %d SASL_USERNAME\r\n",
+ tag, sasl_result);
+ syslog(LOG_ERR, "weird SASL error %d getting SASL_USERNAME",
+ sasl_result);
+ reset_saslconn(&imapd_saslconn);
+ return;
+ }
+
+ /* If we're proxying, the authzid may contain a magic plus,
+ so re-canonify it */
+ if (config_getswitch(IMAPOPT_IMAPMAGICPLUS) && strchr(canon_user, '+')) {
+ char userbuf[MAX_MAILBOX_NAME+1];
+ unsigned userlen;
+
+ sasl_result = imapd_canon_user(imapd_saslconn, NULL, canon_user, 0,
+ SASL_CU_AUTHID | SASL_CU_AUTHZID,
+ NULL, userbuf, sizeof(userbuf), &userlen);
+ if (sasl_result != SASL_OK) {
+ prot_printf(imapd_out,
+ "%s NO SASL canonification error %d\r\n",
+ tag, sasl_result);
+ reset_saslconn(&imapd_saslconn);
+ return;
+ }
+
+ imapd_userid = xstrdup(userbuf);
+ } else {
+ imapd_userid = xstrdup(canon_user);
+ }
+
+ proc_register("imapd", imapd_clienthost, imapd_userid, (char *)0);
+
+ syslog(LOG_NOTICE, "login: %s %s%s %s%s %s", imapd_clienthost,
+ imapd_userid, imapd_magicplus ? imapd_magicplus : "",
+ authtype, imapd_starttls_done ? "+TLS" : "", "User logged in");
+
+ sasl_getprop(imapd_saslconn, SASL_SSF, (const void **) &ssfp);
+
+ /* really, we should be doing a sasl_getprop on SASL_SSF_EXTERNAL,
+ but the current libsasl doesn't allow that. */
+ if (imapd_starttls_done) {
+ switch(*ssfp) {
+ case 0: ssfmsg = "tls protection"; break;
+ case 1: ssfmsg = "tls plus integrity protection"; break;
+ default: ssfmsg = "tls plus privacy protection"; break;
+ }
+ } else {
+ switch(*ssfp) {
+ case 0: ssfmsg = "no protection"; break;
+ case 1: ssfmsg = "integrity protection"; break;
+ default: ssfmsg = "privacy protection"; break;
+ }
+ }
+
+ snmp_increment_args(AUTHENTICATION_YES, 1,
+ VARIABLE_AUTH, 0, /* hash_simple(authtype) */
+ VARIABLE_LISTEND);
+
+ if (!*ssfp) {
+ prot_printf(imapd_out, "%s OK [CAPABILITY ", tag);
+ capa_response(CAPA_PREAUTH|CAPA_POSTAUTH);
+ prot_printf(imapd_out, "] Success (%s)\r\n", ssfmsg);
+ } else {
+ prot_printf(imapd_out, "%s OK Success (%s)\r\n", tag, ssfmsg);
+ }
+
+ prot_setsasl(imapd_in, imapd_saslconn);
+ prot_setsasl(imapd_out, imapd_saslconn);
+
+ /* Create telemetry log */
+ imapd_logfd = telemetry_log(imapd_userid, imapd_in, imapd_out, 0);
+
+ /* Set namespace */
+ if ((r = mboxname_init_namespace(&imapd_namespace,
+ imapd_userisadmin || imapd_userisproxyadmin)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ /* Make a copy of the external userid for use in proxying */
+ proxy_userid = xstrdup(imapd_userid);
+
+ /* Translate any separators in userid */
+ mboxname_hiersep_tointernal(&imapd_namespace, imapd_userid,
+ config_virtdomains ?
+ strcspn(imapd_userid, "@") : 0);
+
+ return;
+}
+
+/*
+ * Perform a NOOP command
+ */
+void cmd_noop(char *tag, char *cmd)
+{
+ if (backend_current) {
+ /* remote mailbox */
+ prot_printf(backend_current->out, "%s %s\r\n", tag, cmd);
+
+ return;
+ }
+
+ if (imapd_mailbox) {
+ index_check(imapd_mailbox, 0, 1);
+ }
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+/*
+ * Parse and perform an ID command.
+ *
+ * the command has been parsed up to the parameter list.
+ *
+ * we only allow one ID in non-authenticated state from a given client.
+ * we only allow MAXIDFAILED consecutive failed IDs from a given client.
+ * we only record MAXIDLOG ID responses from a given client.
+ */
+void cmd_id(char *tag)
+{
+ static int did_id = 0;
+ static int failed_id = 0;
+ static int logged_id = 0;
+ int error = 0;
+ int c = EOF, npair = 0;
+ static struct buf arg, field;
+ struct attvaluelist *params = 0;
+
+ /* check if we've already had an ID in non-authenticated state */
+ if (!imapd_userid && did_id) {
+ prot_printf(imapd_out,
+ "%s NO Only one Id allowed in non-authenticated state\r\n",
+ tag);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ /* check if we've had too many failed IDs in a row */
+ if (failed_id >= MAXIDFAILED) {
+ prot_printf(imapd_out, "%s NO Too many (%u) invalid Id commands\r\n",
+ tag, failed_id);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ /* ok, accept parameter list */
+ c = getword(imapd_in, &arg);
+ /* check for "NIL" or start of parameter list */
+ if (strcasecmp(arg.s, "NIL") && c != '(') {
+ prot_printf(imapd_out, "%s BAD Invalid parameter list in Id\r\n", tag);
+ eatline(imapd_in, c);
+ failed_id++;
+ return;
+ }
+
+ /* parse parameter list */
+ if (c == '(') {
+ for (;;) {
+ if (c == ')') {
+ /* end of string/value pairs */
+ break;
+ }
+
+ /* get field name */
+ c = getstring(imapd_in, imapd_out, &field);
+ if (c != ' ') {
+ prot_printf(imapd_out,
+ "%s BAD Invalid/missing field name in Id\r\n",
+ tag);
+ error = 1;
+ break;
+ }
+
+ /* get field value */
+ c = getnstring(imapd_in, imapd_out, &arg);
+ if (c != ' ' && c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Invalid/missing value in Id\r\n",
+ tag);
+ error = 1;
+ break;
+ }
+
+ /* ok, we're anal, but we'll still process the ID command */
+ if (strlen(field.s) > MAXIDFIELDLEN) {
+ prot_printf(imapd_out,
+ "%s BAD field longer than %u octets in Id\r\n",
+ tag, MAXIDFIELDLEN);
+ error = 1;
+ break;
+ }
+ if (strlen(arg.s) > MAXIDVALUELEN) {
+ prot_printf(imapd_out,
+ "%s BAD value longer than %u octets in Id\r\n",
+ tag, MAXIDVALUELEN);
+ error = 1;
+ break;
+ }
+ if (++npair > MAXIDPAIRS) {
+ prot_printf(imapd_out,
+ "%s BAD too many (%u) field-value pairs in ID\r\n",
+ tag, MAXIDPAIRS);
+ error = 1;
+ break;
+ }
+
+ /* ok, we're happy enough */
+ appendattvalue(¶ms, field.s, arg.s);
+ }
+
+ if (error || c != ')') {
+ /* erp! */
+ eatline(imapd_in, c);
+ freeattvalues(params);
+ failed_id++;
+ return;
+ }
+ c = prot_getc(imapd_in);
+ }
+
+ /* check for CRLF */
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to Id\r\n", tag);
+ eatline(imapd_in, c);
+ freeattvalues(params);
+ failed_id++;
+ return;
+ }
+
+ /* log the client's ID string.
+ eventually this should be a callback or something. */
+ if (npair && logged_id < MAXIDLOG) {
+ char logbuf[MAXIDLOGLEN + 1] = "";
+ struct attvaluelist *pptr;
+
+ for (pptr = params; pptr; pptr = pptr->next) {
+ /* should we check for and format literals here ??? */
+ snprintf(logbuf + strlen(logbuf), MAXIDLOGLEN - strlen(logbuf),
+ " \"%s\" ", pptr->attrib);
+ if (!strcmp(pptr->value, "NIL"))
+ snprintf(logbuf + strlen(logbuf), MAXIDLOGLEN - strlen(logbuf),
+ "NIL");
+ else
+ snprintf(logbuf + strlen(logbuf), MAXIDLOGLEN - strlen(logbuf),
+ "\"%s\"", pptr->value);
+ }
+
+ syslog(LOG_INFO, "client id:%s", logbuf);
+
+ logged_id++;
+ }
+
+ freeattvalues(params);
+
+ /* spit out our ID string.
+ eventually this might be configurable. */
+ if (config_getswitch(IMAPOPT_IMAPIDRESPONSE)) {
+ id_response(imapd_out);
+ prot_printf(imapd_out, ")\r\n");
+ }
+ else
+ prot_printf(imapd_out, "* ID NIL\r\n");
+
+ imapd_check(NULL, 0, 0);
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+
+ failed_id = 0;
+ did_id = 1;
+}
+
+/*
+ * Perform an IDLE command
+ */
+void cmd_idle(char *tag)
+{
+ int c = EOF;
+ static struct buf arg;
+ static int idle_period = -1;
+
+ if (!backend_current) { /* Local mailbox */
+ /* Setup for doing mailbox updates */
+ if (!idle_init(idle_update)) {
+ prot_printf(imapd_out,
+ "%s NO cannot start idling\r\n", tag);
+ return;
+ }
+
+ /* Tell client we are idling and waiting for end of command */
+ prot_printf(imapd_out, "+ idling\r\n");
+ prot_flush(imapd_out);
+
+ /* Start doing mailbox updates */
+ if (imapd_mailbox) index_check(imapd_mailbox, 0, 1);
+ idle_start(imapd_mailbox);
+
+ /* Get continuation data */
+ c = getword(imapd_in, &arg);
+
+ /* Stop updates and do any necessary cleanup */
+ idle_done(imapd_mailbox);
+ }
+ else { /* Remote mailbox */
+ int done = 0, shutdown = 0;
+ char buf[2048];
+
+ /* get polling period */
+ if (idle_period == -1) {
+ idle_period = config_getint(IMAPOPT_IMAPIDLEPOLL);
+ }
+
+ if (CAPA(backend_current, CAPA_IDLE)) {
+ /* Start IDLE on backend */
+ prot_printf(backend_current->out, "%s IDLE\r\n", tag);
+ if (!prot_fgets(buf, sizeof(buf), backend_current->in)) {
+
+ /* If we received nothing from the backend, fail */
+ prot_printf(imapd_out, "%s NO %s\r\n", tag,
+ error_message(IMAP_SERVER_UNAVAILABLE));
+ return;
+ }
+ if (buf[0] != '+') {
+ /* If we received anything but a continuation response,
+ spit out what we received and quit */
+ prot_write(imapd_out, buf, strlen(buf));
+ return;
+ }
+ }
+
+ /* Tell client we are idling and waiting for end of command */
+ prot_printf(imapd_out, "+ idling\r\n");
+ prot_flush(imapd_out);
+
+ /* Pipe updates to client while waiting for end of command */
+ while (!done) {
+ /* Flush any buffered output */
+ prot_flush(imapd_out);
+
+ /* Check for shutdown file */
+ if (!imapd_userisadmin && shutdown_file(buf, sizeof(buf))) {
+ shutdown = done = 1;
+ goto done;
+ }
+
+ done = proxy_check_input(protin, imapd_in, imapd_out,
+ backend_current->in, NULL, idle_period);
+
+ /* If not running IDLE on backend, poll the mailbox for updates */
+ if (!CAPA(backend_current, CAPA_IDLE)) {
+ imapd_check(NULL, 0, 1);
+ }
+ }
+
+ /* Get continuation data */
+ c = getword(imapd_in, &arg);
+
+ done:
+ if (CAPA(backend_current, CAPA_IDLE)) {
+ /* Either the client timed out, or ended the command.
+ In either case we're done, so terminate IDLE on backend */
+ prot_printf(backend_current->out, "Done\r\n");
+ pipe_until_tag(backend_current, tag, 0);
+ }
+
+ if (shutdown) {
+ char *p;
+
+ for (p = buf; *p == '['; p++); /* can't have [ be first char */
+ prot_printf(imapd_out, "* BYE [ALERT] %s\r\n", p);
+ shut_down(0);
+ }
+ }
+
+ imapd_check(NULL, 0, 1);
+
+ if (c != EOF) {
+ if (!strcasecmp(arg.s, "Done") &&
+ (c = (c == '\r') ? prot_getc(imapd_in) : c) == '\n') {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+ else {
+ prot_printf(imapd_out,
+ "%s BAD Invalid Idle continuation\r\n", tag);
+ eatline(imapd_in, c);
+ }
+ }
+}
+
+/* Send unsolicited untagged responses to the client */
+void idle_update(idle_flags_t flags)
+{
+ if ((flags & IDLE_MAILBOX) && imapd_mailbox)
+ index_check(imapd_mailbox, 0, 1);
+
+ if (flags & IDLE_ALERT) {
+ char shut[1024];
+ if (! imapd_userisadmin && shutdown_file(shut, sizeof(shut))) {
+ char *p;
+ for (p = shut; *p == '['; p++); /* can't have [ be first char */
+ prot_printf(imapd_out, "* BYE [ALERT] %s\r\n", p);
+ shut_down(0);
+ }
+ }
+
+ prot_flush(imapd_out);
+}
+
+void capa_response(int flags)
+{
+ const char *sasllist; /* the list of SASL mechanisms */
+ int mechcount;
+
+ prot_printf(imapd_out, CAPA_PREAUTH_STRING);
+
+ if(config_mupdate_server) {
+ prot_printf(imapd_out, " MUPDATE=mupdate://%s/", config_mupdate_server);
+ }
+
+ if (tls_enabled() && !imapd_starttls_done && !imapd_authstate) {
+ prot_printf(imapd_out, " STARTTLS");
+ }
+ if (imapd_authstate ||
+ (!imapd_starttls_done && !config_getswitch(IMAPOPT_ALLOWPLAINTEXT))) {
+ prot_printf(imapd_out, " LOGINDISABLED");
+ }
+
+ /* add the SASL mechs */
+ if (!imapd_authstate &&
+ sasl_listmech(imapd_saslconn, NULL,
+ "AUTH=", " AUTH=", " SASL-IR",
+ &sasllist,
+ NULL, &mechcount) == SASL_OK && mechcount > 0) {
+ prot_printf(imapd_out, " %s", sasllist);
+ } else {
+ /* else don't show anything */
+ }
+
+ if (!(flags & CAPA_POSTAUTH)) return;
+
+ prot_printf(imapd_out, CAPA_POSTAUTH_STRING);
+
+ if (idle_enabled()) {
+ prot_printf(imapd_out, " IDLE");
+ }
+
+#ifdef ENABLE_LISTEXT
+ prot_printf(imapd_out, " LISTEXT LIST-SUBSCRIBED");
+#endif /* ENABLE_LISTEXT */
+
+#ifdef ENABLE_X_NETSCAPE_HACK
+ prot_printf(imapd_out, " X-NETSCAPE");
+#endif
+
+#ifdef HAVE_SSL
+ prot_printf(imapd_out, " URLAUTH");
+#endif
+}
+
+/*
+ * Perform a CAPABILITY command
+ */
+void cmd_capability(char *tag)
+{
+ imapd_check(NULL, 0, 0);
+
+ prot_printf(imapd_out, "* CAPABILITY ");
+
+ capa_response(CAPA_PREAUTH|CAPA_POSTAUTH);
+
+ prot_printf(imapd_out, "\r\n%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+/*
+ * Parse and perform an APPEND command.
+ * The command has been parsed up to and including
+ * the mailbox name.
+ */
+static int isokflag(char *s, int *isseen)
+{
+ if (s[0] == '\\') {
+ lcase(s);
+ if (!strcmp(s, "\\seen")) {
+ *isseen = 1;
+ return 1;
+ }
+ if (!strcmp(s, "\\answered")) return 1;
+ if (!strcmp(s, "\\flagged")) return 1;
+ if (!strcmp(s, "\\draft")) return 1;
+ if (!strcmp(s, "\\deleted")) return 1;
+
+ /* uh oh, system flag i don't recognize */
+ return 0;
+ } else {
+ /* valid user flag? */
+ return imparse_isatom(s);
+ }
+}
+
+static int getliteralsize(char *p, int c,
+ unsigned *size, int *binary, const char **parseerr)
+
+{
+ int sawdigit = 0;
+ int isnowait = 0;
+
+ /* Check for literal8 */
+ if (*p == '~') {
+ p++;
+
+ *binary = 1;
+ }
+ if (*p != '{') {
+ *parseerr = "Missing required argument to Append command";
+ return IMAP_PROTOCOL_ERROR;
+ }
+
+ /* Read size from literal */
+ isnowait = 0;
+ *size = 0;
+ for (++p; *p && isdigit((int) *p); p++) {
+ sawdigit++;
+ if (*size > (UINT_MAX - (*p - '0')) / 10)
+ return IMAP_MESSAGE_TOO_LARGE;
+ *size = (*size)*10 + *p - '0';
+#if 0
+ if (*size < 0) {
+ lose();
+ }
+#endif
+ }
+ if (*p == '+') {
+ isnowait++;
+ p++;
+ }
+
+ if (c == '\r') {
+ c = prot_getc(imapd_in);
+ }
+ else {
+ prot_ungetc(c, imapd_in);
+ c = ' '; /* Force a syntax error */
+ }
+
+ if (*p != '}' || p[1] || c != '\n' || !sawdigit) {
+ *parseerr = "Invalid literal in Append command";
+ return IMAP_PROTOCOL_ERROR;
+ }
+
+ if (!isnowait) {
+ /* Tell client to send the message */
+ prot_printf(imapd_out, "+ go ahead\r\n");
+ prot_flush(imapd_out);
+ }
+
+ return 0;
+}
+
+static int catenate_text(FILE *f, unsigned *totalsize, int *binary,
+ const char **parseerr)
+{
+ int c;
+ static struct buf arg;
+ unsigned size = 0;
+ char buf[4096+1];
+ int n;
+ int r;
+
+ c = getword(imapd_in, &arg);
+
+ /* Read size from literal */
+ r = getliteralsize(arg.s, c, &size, binary, parseerr);
+ if (r) return r;
+
+ if (*totalsize > UINT_MAX - size) r = IMAP_MESSAGE_TOO_LARGE;
+
+ /* Catenate message part to stage */
+ while (size) {
+ n = prot_read(imapd_in, buf, size > 4096 ? 4096 : size);
+ if (!n) {
+ syslog(LOG_ERR,
+ "IOERROR: reading message: unexpected end of file");
+ return IMAP_IOERROR;
+ }
+
+ buf[n] = '\0';
+ if (!*binary && (n != strlen(buf))) r = IMAP_MESSAGE_CONTAINSNULL;
+
+ size -= n;
+ if (r) continue;
+
+ /* XXX do we want to try and validate the message like
+ we do in message_copy_strict()? */
+
+ if (f) fwrite(buf, n, 1, f);
+ }
+
+ *totalsize += size;
+
+ return r;
+}
+
+static int catenate_url(const char *s, const char *cur_name, FILE *f,
+ unsigned *totalsize, const char **parseerr)
+{
+ struct imapurl url;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ struct mailbox mboxstruct, *mailbox;
+ unsigned msgno;
+ int r = 0, doclose = 0;
+ unsigned long size = 0;
+
+ imapurl_fromURL(&url, s);
+
+ if (url.server) {
+ *parseerr = "Only relative URLs are supported";
+ r = IMAP_BADURL;
+#if 0
+ } else if (url.server && strcmp(url.server, config_servername)) {
+ *parseerr = "Can not catenate messages from another server";
+ r = IMAP_BADURL;
+#endif
+ } else if (!url.mailbox && !imapd_mailbox && !cur_name) {
+ *parseerr = "No mailbox is selected or specified";
+ r = IMAP_BADURL;
+ } else if (url.mailbox || (url.mailbox = cur_name)) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace,
+ url.mailbox,
+ imapd_userid, mailboxname);
+ if (!r) {
+ if (!imapd_mailbox || strcmp(imapd_mailbox->name, mailboxname)) {
+ /* not the currently selected mailbox, so try to open it */
+ int mbtype;
+ char *newserver;
+
+ /* lookup the location of the mailbox */
+ r = mlookup(NULL, NULL, mailboxname, &mbtype, NULL, NULL,
+ &newserver, NULL, NULL);
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ struct backend *be;
+
+ be = proxy_findserver(newserver, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ } else {
+ r = proxy_catenate_url(be, &url, f, &size, parseerr);
+ if (*totalsize > UINT_MAX - size)
+ r = IMAP_MESSAGE_TOO_LARGE;
+ else
+ *totalsize += size;
+ }
+
+ free(url.freeme);
+
+ return r;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ r = mailbox_open_header(mailboxname, imapd_authstate,
+ &mboxstruct);
+ }
+
+ if (!r) {
+ doclose = 1;
+ r = mailbox_open_index(&mboxstruct);
+ }
+
+ if (!r && !(mboxstruct.myrights & ACL_READ)) {
+ r = (imapd_userisadmin || (mboxstruct.myrights & ACL_LOOKUP)) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ }
+
+ if (!r) {
+ mailbox = &mboxstruct;
+ index_operatemailbox(mailbox);
+ }
+ } else {
+ mailbox = imapd_mailbox;
+ }
+ }
+
+ if (r) {
+ *parseerr = error_message(r);
+ r = IMAP_BADURL;
+ }
+ } else {
+ mailbox = imapd_mailbox;
+ }
+
+ if (r) {
+ /* nothing to do, handled up top */
+ } else if (url.uidvalidity &&
+ (mailbox->uidvalidity != url.uidvalidity)) {
+ *parseerr = "Uidvalidity of mailbox has changed";
+ r = IMAP_BADURL;
+ } else if (!url.uid || !(msgno = index_finduid(url.uid)) ||
+ (index_getuid(msgno) != url.uid)) {
+ *parseerr = "No such message in mailbox";
+ r = IMAP_BADURL;
+ } else {
+ /* Catenate message part to stage */
+ struct protstream *s = prot_new(fileno(f), 1);
+
+ r = index_urlfetch(mailbox, msgno, url.section,
+ url.start_octet, url.octet_count, s, &size);
+ if (r == IMAP_BADURL)
+ *parseerr = "No such message part";
+ else if (!r) {
+ if (*totalsize > UINT_MAX - size)
+ r = IMAP_MESSAGE_TOO_LARGE;
+ else
+ *totalsize += size;
+ }
+
+ prot_flush(s);
+ prot_free(s);
+
+ /* XXX do we want to try and validate the message like
+ we do in message_copy_strict()? */
+ }
+
+ free(url.freeme);
+
+ if (doclose) {
+ mailbox_close(&mboxstruct);
+ if (imapd_mailbox) index_operatemailbox(imapd_mailbox);
+ }
+
+ return r;
+}
+
+static int append_catenate(FILE *f, const char *cur_name, unsigned *totalsize,
+ int *binary, const char **parseerr, const char **url)
+{
+ int c, r = 0;
+ static struct buf arg;
+
+ do {
+ c = getword(imapd_in, &arg);
+ if (c != ' ') {
+ *parseerr = "Missing message part data in Append command";
+ return IMAP_PROTOCOL_ERROR;
+ }
+
+ if (!strcasecmp(arg.s, "TEXT")) {
+ int r1 = catenate_text(!r ? f : NULL, totalsize, binary, parseerr);
+ if (r1) return r1;
+
+ /* if we see a SP, we're trying to catenate more than one part */
+
+ /* Parse newline terminating command */
+ c = prot_getc(imapd_in);
+ }
+ else if (!strcasecmp(arg.s, "URL")) {
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c != ' ' && c != ')') {
+ *parseerr = "Missing URL in Append command";
+ return IMAP_PROTOCOL_ERROR;
+ }
+
+ if (!r) {
+ r = catenate_url(arg.s, cur_name, f, totalsize, parseerr);
+ if (r) *url = arg.s;
+ }
+ }
+ else {
+ *parseerr = "Invalid message part type in Append command";
+ return IMAP_PROTOCOL_ERROR;
+ }
+
+ fflush(f);
+ } while (c == ' ');
+
+ if (c != ')') {
+ *parseerr = "Missing space or ) after catenate list in Append command";
+ return IMAP_PROTOCOL_ERROR;
+ }
+
+ if (ferror(f) || fsync(fileno(f))) {
+ syslog(LOG_ERR, "IOERROR: writing message: %m");
+ return IMAP_IOERROR;
+ }
+
+ return r;
+}
+
+/* If an APPEND is proxied from another server,
+ * 'cur_name' is the name of the currently selected mailbox (if any)
+ * in case we have to resolve relative URLs
+ */
+#define FLAGGROW 10
+void cmd_append(char *tag, char *name, const char *cur_name)
+{
+ int c;
+ static struct buf arg;
+ char *p;
+ time_t now = time(NULL);
+ unsigned size, totalsize = 0;
+ int sync_seen = 0;
+ int r, i;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ struct appendstate mailbox;
+ unsigned long uidvalidity;
+ unsigned long firstuid, num;
+ long doappenduid = 0;
+ const char *parseerr = NULL, *url = NULL;
+ int mbtype;
+ char *newserver;
+ int numalloc = 5;
+ struct appendstage *curstage;
+
+ /* See if we can append */
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, &mbtype, NULL, NULL,
+ &newserver, NULL, NULL);
+ }
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ struct backend *s = NULL;
+
+ if (supports_referrals) {
+ imapd_refer(tag, newserver, name);
+ /* Eat the argument */
+ eatline(imapd_in, prot_getc(imapd_in));
+ return;
+ }
+
+ s = proxy_findserver(newserver, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) r = IMAP_SERVER_UNAVAILABLE;
+
+ imapd_check(s, 0, 0);
+
+ if (!r) {
+ int is_active = 1;
+ s->context = (void*) &is_active;
+ if (imapd_mailbox) {
+ prot_printf(s->out, "%s Localappend {%d+}\r\n%s {%d+}\r\n%s ",
+ tag, strlen(name), name,
+ strlen(imapd_mailbox->name), imapd_mailbox->name);
+ } else {
+ prot_printf(s->out, "%s Localappend {%d+}\r\n%s {%d+}\r\n%s ",
+ tag, strlen(name), name, 0, "");
+ }
+ if (!(r = pipe_command(s, 16384))) {
+ if (s != backend_current) pipe_including_tag(s, tag, 0);
+ }
+ s->context = NULL;
+ } else {
+ eatline(imapd_in, prot_getc(imapd_in));
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag,
+ prot_error(imapd_in) ? prot_error(imapd_in) :
+ error_message(r));
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ r = append_check(mailboxname, MAILBOX_FORMAT_NORMAL,
+ imapd_authstate, ACL_INSERT, totalsize);
+ }
+ if (r) {
+ eatline(imapd_in, ' ');
+ prot_printf(imapd_out, "%s NO %s%s\r\n",
+ tag,
+ (r == IMAP_MAILBOX_NONEXISTENT &&
+ mboxlist_createmailboxcheck(mailboxname, 0, 0,
+ imapd_userisadmin,
+ imapd_userid, imapd_authstate,
+ (char **)0, (char **)0) == 0)
+ ? "[TRYCREATE] " : "", error_message(r));
+ return;
+ }
+
+ stage = xmalloc(numalloc * sizeof(struct appendstage *));
+
+ c = ' '; /* just parsed a space */
+ /* we loop, to support MULTIAPPEND */
+ while (!r && c == ' ') {
+ /* Grow the stage array, if necessary */
+ if (numstage == numalloc) {
+ /* Avoid integer wrap as arg to xrealloc */
+ if (numalloc > INT_MAX/(2*sizeof(struct appendstage *)))
+ goto done;
+ numalloc *= 2;
+ stage = xrealloc(stage, numalloc * sizeof(struct appendstage *));
+ }
+ curstage = stage[numstage] = xzmalloc(sizeof(struct appendstage));
+ numstage++;
+ /* Parse flags */
+ c = getword(imapd_in, &arg);
+ if (c == '(' && !arg.s[0]) {
+ curstage->nflags = 0;
+ do {
+ c = getword(imapd_in, &arg);
+ if (!curstage->nflags && !arg.s[0] && c == ')') break; /* empty list */
+ if (!isokflag(arg.s, &sync_seen)) {
+ parseerr = "Invalid flag in Append command";
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ if (curstage->nflags == curstage->flagalloc) {
+ curstage->flagalloc += FLAGGROW;
+ curstage->flag =
+ (char **) xrealloc((char *) curstage->flag,
+ curstage->flagalloc * sizeof(char *));
+ }
+ curstage->flag[curstage->nflags] = xstrdup(arg.s);
+ curstage->nflags++;
+ } while (c == ' ');
+ if (c != ')') {
+ parseerr =
+ "Missing space or ) after flag name in Append command";
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ c = prot_getc(imapd_in);
+ if (c != ' ') {
+ parseerr = "Missing space after flag list in Append command";
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ c = getword(imapd_in, &arg);
+ }
+
+ /* Parse internaldate */
+ if (c == '\"' && !arg.s[0]) {
+ prot_ungetc(c, imapd_in);
+ c = getdatetime(&(curstage->internaldate));
+ if (c != ' ') {
+ parseerr = "Invalid date-time in Append command";
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ c = getword(imapd_in, &arg);
+ } else {
+ curstage->internaldate = now;
+ }
+
+ /* Stage the message */
+ curstage->f = append_newstage(mailboxname, now, numstage, &(curstage->stage));
+ if (!curstage->f) {
+ r = IMAP_IOERROR;
+ goto done;
+ }
+
+ if (!strcasecmp(arg.s, "CATENATE")) {
+ if (c != ' ' || (c = prot_getc(imapd_in) != '(')) {
+ parseerr = "Missing message part(s) in Append command";
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ /* Catenate the message part(s) to stage */
+ size = 0;
+ r = append_catenate(curstage->f, cur_name, &size,
+ &(curstage->binary), &parseerr, &url);
+ if (r) goto done;
+ }
+ else {
+ /* Read size from literal */
+ r = getliteralsize(arg.s, c, &size, &(curstage->binary), &parseerr);
+ if (r) goto done;
+
+ /* Copy message to stage */
+ r = message_copy_strict(imapd_in, curstage->f, size, curstage->binary);
+ }
+ totalsize += size;
+
+ /* if we see a SP, we're trying to append more than one message */
+
+ /* Parse newline terminating command */
+ c = prot_getc(imapd_in);
+ }
+
+ done:
+ if (r) {
+ eatline(imapd_in, c);
+ } else {
+ /* we should be looking at the end of the line */
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ parseerr = "junk after literal";
+ r = IMAP_PROTOCOL_ERROR;
+ eatline(imapd_in, c);
+ }
+ }
+
+ /* Append from the stage(s) */
+ if (!r) {
+ r = append_setup(&mailbox, mailboxname, MAILBOX_FORMAT_NORMAL,
+ imapd_userid, imapd_authstate, ACL_INSERT, totalsize);
+ }
+ if (!r) {
+ struct body *body = NULL;
+
+ doappenduid = (mailbox.m.myrights & ACL_READ);
+
+ for (i = 0; !r && i < numstage; i++) {
+ if (stage[i]->binary) {
+ r = message_parse_binary_file(stage[i]->f, &body);
+ }
+ fclose(stage[i]->f); stage[i]->f = NULL;
+ if (!r) {
+ r = append_fromstage(&mailbox, &body, stage[i]->stage,
+ stage[i]->internaldate,
+ (const char **) stage[i]->flag,
+ stage[i]->nflags, 0);
+ }
+ if (body) message_free_body(body);
+ }
+ if (body) free(body);
+
+ if (!r) {
+ r = append_commit(&mailbox, totalsize, &uidvalidity, &firstuid, &num);
+ if (!r) {
+ sync_log_append(mailboxname);
+ if (sync_seen) sync_log_seen(imapd_userid, mailboxname);
+ }
+ } else {
+ append_abort(&mailbox);
+ }
+ }
+
+ /* Cleanup the stage(s) */
+ while (numstage) {
+ curstage = stage[--numstage];
+
+ if (curstage->f != NULL) fclose(curstage->f);
+ append_removestage(curstage->stage);
+ while (curstage->nflags--) {
+ free(curstage->flag[curstage->nflags]);
+ }
+ if (curstage->flag) free((char *) curstage->flag);
+ free(curstage);
+ }
+ if (stage) free(stage);
+ stage = NULL;
+
+ imapd_check(NULL, 0, 0);
+
+ if (r == IMAP_PROTOCOL_ERROR && parseerr) {
+ prot_printf(imapd_out, "%s BAD %s\r\n", tag, parseerr);
+ } else if (r == IMAP_BADURL) {
+ prot_printf(imapd_out, "%s NO [BADURL \"%s\"] %s\r\n",
+ tag, url, parseerr);
+ } else if (r) {
+ prot_printf(imapd_out, "%s NO %s%s\r\n",
+ tag,
+ (r == IMAP_MAILBOX_NONEXISTENT &&
+ mboxlist_createmailboxcheck(mailboxname, 0, 0,
+ imapd_userisadmin,
+ imapd_userid, imapd_authstate,
+ (char **)0, (char **)0) == 0)
+ ? "[TRYCREATE] " : r == IMAP_MESSAGE_TOO_LARGE
+ ? "[TOOBIG]" : "", error_message(r));
+ } else if (doappenduid) {
+ /* is this a space seperated list or sequence list? */
+ prot_printf(imapd_out, "%s OK [APPENDUID %lu", tag, uidvalidity);
+ if (num == 1) {
+ prot_printf(imapd_out, " %lu", firstuid);
+ } else {
+ prot_printf(imapd_out, " %lu:%lu", firstuid, firstuid + num - 1);
+ }
+ prot_printf(imapd_out, "] %s\r\n", error_message(IMAP_OK_COMPLETED));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+}
+
+/*
+ * Perform a SELECT/EXAMINE/BBOARD command
+ */
+void cmd_select(char *tag, char *cmd, char *name)
+{
+ int c;
+ struct mailbox mailbox;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int r = 0;
+ double usage;
+ int doclose = 0;
+ int mbtype;
+ char *newserver;
+ struct backend *backend_next = NULL;
+ static char lastqr[MAX_MAILBOX_PATH+1] = "";
+ static time_t nextalert = 0;
+
+ c = prot_getc(imapd_in);
+ if (cmd[0] != 'B' && c == ' ') {
+ static struct buf arg;
+
+ c = prot_getc(imapd_in);
+ if (c != '(') goto badlist;
+
+ c = getword(imapd_in, &arg);
+ if (arg.s[0] == '\0') goto badlist;
+ for (;;) {
+ lcase(arg.s);
+ if (!strcmp(arg.s, "condstore")) {
+ imapd_condstore_client = 1;
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid %s modifier %s\r\n",
+ tag, cmd, arg.s);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ if (c == ' ') c = getword(imapd_in, &arg);
+ else break;
+ }
+
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close parenthesis in %s\r\n", tag, cmd);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ c = prot_getc(imapd_in);
+ }
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to %s\r\n", tag, cmd);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ if (imapd_mailbox) {
+ index_closemailbox(imapd_mailbox);
+ mailbox_close(imapd_mailbox);
+ imapd_mailbox = 0;
+ }
+
+ if (cmd[0] == 'B') {
+ /* BBoard namespace is empty */
+ r = IMAP_MAILBOX_NONEXISTENT;
+ }
+ else {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ }
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, &mbtype, NULL, NULL,
+ &newserver, NULL, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ if (supports_referrals) {
+ imapd_refer(tag, newserver, name);
+ return;
+ }
+
+ backend_next = proxy_findserver(newserver, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox,
+ imapd_in);
+ if (!backend_next) r = IMAP_SERVER_UNAVAILABLE;
+
+ if (backend_current && backend_current != backend_next) {
+ char mytag[128];
+
+ /* remove backend_current from the protgroup */
+ protgroup_delete(protin, backend_current->in);
+
+ /* switching servers; flush old server output */
+ proxy_gentag(mytag, sizeof(mytag));
+ prot_printf(backend_current->out, "%s Unselect\r\n", mytag);
+ /* do not fatal() here, because we don't really care about this
+ * server anymore anyway */
+ pipe_until_tag(backend_current, mytag, 1);
+ }
+ backend_current = backend_next;
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ return;
+ }
+
+ prot_printf(backend_current->out, "%s %s {%d+}\r\n%s\r\n", tag, cmd,
+ strlen(name), name);
+ switch (pipe_including_tag(backend_current, tag, 0)) {
+ case PROXY_OK:
+ proc_register("imapd", imapd_clienthost, imapd_userid, mailboxname);
+ syslog(LOG_DEBUG, "open: user %s opened %s on %s",
+ imapd_userid, name, newserver);
+
+ /* add backend_current to the protgroup */
+ protgroup_insert(protin, backend_current->in);
+ break;
+ default:
+ syslog(LOG_DEBUG, "open: user %s failed to open %s", imapd_userid,
+ name);
+ /* not successfully selected */
+ backend_current = NULL;
+ break;
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+ if (backend_current) {
+ char mytag[128];
+
+ /* remove backend_current from the protgroup */
+ protgroup_delete(protin, backend_current->in);
+
+ /* switching servers; flush old server output */
+ proxy_gentag(mytag, sizeof(mytag));
+ prot_printf(backend_current->out, "%s Unselect\r\n", mytag);
+ /* do not fatal() here, because we don't really care about this
+ * server anymore anyway */
+ pipe_until_tag(backend_current, mytag, 1);
+ }
+ backend_current = NULL;
+
+ if (!r) {
+ r = mailbox_open_header(mailboxname, imapd_authstate, &mailbox);
+ }
+
+ if (!r) {
+ doclose = 1;
+ r = mailbox_open_index(&mailbox);
+ }
+ if (!r && !(mailbox.myrights & ACL_READ)) {
+ r = (imapd_userisadmin || (mailbox.myrights & ACL_LOOKUP)) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ if (doclose) mailbox_close(&mailbox);
+ return;
+ }
+
+ mboxstruct = mailbox;
+ imapd_mailbox = &mboxstruct;
+
+ index_newmailbox(imapd_mailbox, cmd[0] == 'E');
+
+ /* Examine command puts mailbox in read-only mode */
+ if (cmd[0] == 'E') {
+ imapd_mailbox->myrights &= ~ACL_READ_WRITE;
+ }
+
+ if (imapd_mailbox->myrights & ACL_EXPUNGE) {
+ time_t now = time(NULL);
+
+ /* Warn if mailbox is close to or over quota */
+ r = quota_read(&imapd_mailbox->quota, NULL, 0);
+ if (!r && imapd_mailbox->quota.limit > 0 &&
+ (strcmp(imapd_mailbox->quota.root, lastqr) || now > nextalert)) {
+ /* Warn if the following possibilities occur:
+ * - quotawarnkb not set + quotawarn hit
+ * - quotawarnkb set larger than mailbox + quotawarn hit
+ * - quotawarnkb set + hit + quotawarn hit
+ */
+ int warnsize = config_getint(IMAPOPT_QUOTAWARNKB);
+ if (warnsize <= 0 || warnsize >= imapd_mailbox->quota.limit ||
+ ((uquota_t) (imapd_mailbox->quota.limit - warnsize)) * QUOTA_UNITS <
+ imapd_mailbox->quota.used) {
+ usage = ((double) imapd_mailbox->quota.used * 100.0) / (double)
+ ((uquota_t) imapd_mailbox->quota.limit * QUOTA_UNITS);
+ if (usage >= 100.0) {
+ prot_printf(imapd_out, "* NO [ALERT] %s\r\n",
+ error_message(IMAP_NO_OVERQUOTA));
+ }
+ else if (usage > config_getint(IMAPOPT_QUOTAWARN)) {
+ int usageint = (int) usage;
+ prot_printf(imapd_out, "* NO [ALERT] ");
+ prot_printf(imapd_out, error_message(IMAP_NO_CLOSEQUOTA),
+ usageint);
+ prot_printf(imapd_out, "\r\n");
+ }
+ }
+ strlcpy(lastqr, imapd_mailbox->quota.root, sizeof(lastqr));
+ nextalert = now + 600; /* ALERT every 10 min regardless */
+ }
+ }
+
+ prot_printf(imapd_out, "%s OK [READ-%s] %s\r\n", tag,
+ (imapd_mailbox->myrights & ACL_READ_WRITE) ?
+ "WRITE" : "ONLY", error_message(IMAP_OK_COMPLETED));
+
+ proc_register("imapd", imapd_clienthost, imapd_userid, mailboxname);
+ syslog(LOG_DEBUG, "open: user %s opened %s", imapd_userid, name);
+ return;
+
+ badlist:
+ prot_printf(imapd_out, "%s BAD Invalid modifier list in %s\r\n", tag, cmd);
+ eatline(imapd_in, c);
+}
+
+/*
+ * Perform a CLOSE command
+ */
+void cmd_close(char *tag)
+{
+ int r;
+
+ if (backend_current) {
+ /* remote mailbox */
+ prot_printf(backend_current->out, "%s Close\r\n", tag);
+ /* xxx do we want this to say OK if the connection is gone?
+ * saying NO is clearly wrong, hense the fatal request. */
+ pipe_including_tag(backend_current, tag, 0);
+
+ /* remove backend_current from the protgroup */
+ protgroup_delete(protin, backend_current->in);
+
+ backend_current = NULL;
+ return;
+ }
+
+ /* local mailbox */
+ if (!(imapd_mailbox->myrights & ACL_EXPUNGE)) r = 0;
+ else {
+ r = mailbox_expunge(imapd_mailbox, (int (*)())0, (char *)0, 0);
+ if (!r) sync_log_mailbox(imapd_mailbox->name);
+ }
+
+ index_closemailbox(imapd_mailbox);
+ mailbox_close(imapd_mailbox);
+ imapd_mailbox = 0;
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+}
+
+/*
+ * Perform an UNSELECT command -- for some support of IMAP proxy.
+ * Just like close except no expunge.
+ */
+void cmd_unselect(char *tag)
+{
+ if (backend_current) {
+ /* remote mailbox */
+ prot_printf(backend_current->out, "%s Unselect\r\n", tag);
+ /* xxx do we want this to say OK if the connection is gone?
+ * saying NO is clearly wrong, hense the fatal request. */
+ pipe_including_tag(backend_current, tag, 0);
+ backend_current = NULL;
+
+ /* remove backend_current from the protgroup */
+ protgroup_delete(protin, backend_current->in);
+ return;
+ }
+
+ /* local mailbox */
+ index_closemailbox(imapd_mailbox);
+ mailbox_close(imapd_mailbox);
+ imapd_mailbox = 0;
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+/*
+ * Parse the syntax for a partial fetch:
+ * "<" number "." nz-number ">"
+ */
+#define PARSE_PARTIAL(start_octet, octet_count) \
+ (start_octet) = (octet_count) = 0; \
+ if (*p == '<' && isdigit((int) p[1])) { \
+ (start_octet) = p[1] - '0'; \
+ p += 2; \
+ while (isdigit((int) *p)) { \
+ (start_octet) = \
+ (start_octet) * 10 + *p++ - '0'; \
+ } \
+ \
+ if (*p == '.' && p[1] >= '1' && p[1] <= '9') { \
+ (octet_count) = p[1] - '0'; \
+ p[0] = '>'; p[1] = '\0'; /* clip off the octet count \
+ (its not used in the reply) */ \
+ p += 2; \
+ while (isdigit((int) *p)) { \
+ (octet_count) = \
+ (octet_count) * 10 + *p++ - '0'; \
+ } \
+ } \
+ else p--; \
+ \
+ if (*p != '>') { \
+ prot_printf(imapd_out, \
+ "%s BAD Invalid body partial\r\n", tag); \
+ eatline(imapd_in, c); \
+ goto freeargs; \
+ } \
+ p++; \
+ }
+
+/*
+ * Parse and perform a FETCH/UID FETCH command
+ * The command has been parsed up to and including
+ * the sequence
+ */
+void cmd_fetch(char *tag, char *sequence, int usinguid)
+{
+ const char *cmd = usinguid ? "UID Fetch" : "Fetch";
+ static struct buf fetchatt, fieldname;
+ int c;
+ int inlist = 0;
+ int fetchitems = 0;
+ struct fetchargs fetchargs;
+ struct octetinfo oi;
+ struct strlist *newfields = 0;
+ char *p, *section;
+ int fetchedsomething, r;
+ clock_t start = clock();
+ char mytime[100];
+
+ if (backend_current) {
+ /* remote mailbox */
+ prot_printf(backend_current->out, "%s %s %s ", tag, cmd, sequence);
+ pipe_command(backend_current, 65536);
+ return;
+ }
+
+ /* local mailbox */
+ memset(&fetchargs, 0, sizeof(struct fetchargs));
+
+ c = getword(imapd_in, &fetchatt);
+ if (c == '(' && !fetchatt.s[0]) {
+ inlist = 1;
+ c = getword(imapd_in, &fetchatt);
+ }
+ for (;;) {
+ ucase(fetchatt.s);
+ switch (fetchatt.s[0]) {
+ case 'A':
+ if (!inlist && !strcmp(fetchatt.s, "ALL")) {
+ fetchitems |= FETCH_ALL;
+ }
+ else goto badatt;
+ break;
+
+ case 'B':
+ if (!strncmp(fetchatt.s, "BINARY[", 7) ||
+ !strncmp(fetchatt.s, "BINARY.PEEK[", 12) ||
+ !strncmp(fetchatt.s, "BINARY.SIZE[", 12)) {
+ int binsize = 0;
+
+ p = section = fetchatt.s + 7;
+ if (!strncmp(p, "PEEK[", 5)) {
+ p = section += 5;
+ }
+ else if (!strncmp(p, "SIZE[", 5)) {
+ p = section += 5;
+ binsize = 1;
+ }
+ else {
+ fetchitems |= FETCH_SETSEEN;
+ }
+ while (isdigit((int) *p) || *p == '.') {
+ if (*p == '.' && !isdigit((int) p[-1])) break;
+ /* Part number can not begin with '0' */
+ if (*p == '0' && !isdigit((int) p[-1])) break;
+ p++;
+ }
+
+ if (*p != ']') {
+ prot_printf(imapd_out, "%s BAD Invalid binary section\r\n", tag);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ p++;
+
+ if (!binsize) PARSE_PARTIAL(oi.start_octet, oi.octet_count);
+
+ if (*p) {
+ prot_printf(imapd_out, "%s BAD Junk after binary section\r\n", tag);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ if (binsize)
+ appendstrlist_withdata(&fetchargs.sizesections, section, &oi, sizeof(oi));
+ else
+ appendstrlist_withdata(&fetchargs.binsections, section, &oi, sizeof(oi));
+ }
+ else if (!strcmp(fetchatt.s, "BODY")) {
+ fetchitems |= FETCH_BODY;
+ }
+ else if (!strcmp(fetchatt.s, "BODYSTRUCTURE")) {
+ fetchitems |= FETCH_BODYSTRUCTURE;
+ }
+ else if (!strncmp(fetchatt.s, "BODY[", 5) ||
+ !strncmp(fetchatt.s, "BODY.PEEK[", 10)) {
+ p = section = fetchatt.s + 5;
+ if (!strncmp(p, "PEEK[", 5)) {
+ p = section += 5;
+ }
+ else {
+ fetchitems |= FETCH_SETSEEN;
+ }
+ while (isdigit((int) *p) || *p == '.') {
+ if (*p == '.' && !isdigit((int) p[-1])) break;
+ /* Obsolete section 0 can only occur before close brace */
+ if (*p == '0' && !isdigit((int) p[-1]) && p[1] != ']') break;
+ p++;
+ }
+
+ if (*p == 'H' && !strncmp(p, "HEADER.FIELDS", 13) &&
+ (p == section || p[-1] == '.') &&
+ (p[13] == '\0' || !strcmp(p+13, ".NOT"))) {
+
+ /*
+ * If not top-level or a HEADER.FIELDS.NOT, can't pull
+ * the headers out of the cache.
+ */
+ if (p != section || p[13] != '\0') {
+ fetchargs.cache_atleast = BIT32_MAX;
+ }
+
+ if (c != ' ') {
+ prot_printf(imapd_out,
+ "%s BAD Missing required argument to %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ c = prot_getc(imapd_in);
+ if (c != '(') {
+ prot_printf(imapd_out, "%s BAD Missing required open parenthesis in %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ do {
+ c = getastring(imapd_in, imapd_out, &fieldname);
+ for (p = fieldname.s; *p; p++) {
+ if (*p <= ' ' || *p & 0x80 || *p == ':') break;
+ }
+ if (*p || !*fieldname.s) {
+ prot_printf(imapd_out, "%s BAD Invalid field-name in %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ appendstrlist(&newfields, fieldname.s);
+ if (fetchargs.cache_atleast < BIT32_MAX) {
+ bit32 this_ver =
+ mailbox_cached_header(fieldname.s);
+ if(this_ver > fetchargs.cache_atleast)
+ fetchargs.cache_atleast = this_ver;
+ }
+ } while (c == ' ');
+ if (c != ')') {
+ prot_printf(imapd_out, "%s BAD Missing required close parenthesis in %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+
+ /* Grab/parse the ]<x.y> part */
+ c = getword(imapd_in, &fieldname);
+ p = fieldname.s;
+ if (*p++ != ']') {
+ prot_printf(imapd_out, "%s BAD Missing required close bracket after %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+
+ PARSE_PARTIAL(oi.start_octet, oi.octet_count);
+
+ if (*p) {
+ prot_printf(imapd_out, "%s BAD Junk after body section\r\n", tag);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ appendfieldlist(&fetchargs.fsections,
+ section, newfields, fieldname.s,
+ &oi, sizeof(oi));
+ newfields = 0;
+ break;
+ }
+
+ switch (*p) {
+ case 'H':
+ if (p != section && p[-1] != '.') break;
+ if (!strncmp(p, "HEADER]", 7)) p += 6;
+ break;
+
+ case 'M':
+ if (!strncmp(p-1, ".MIME]", 6)) p += 4;
+ break;
+
+ case 'T':
+ if (p != section && p[-1] != '.') break;
+ if (!strncmp(p, "TEXT]", 5)) p += 4;
+ break;
+ }
+
+ if (*p != ']') {
+ prot_printf(imapd_out, "%s BAD Invalid body section\r\n", tag);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ p++;
+
+ PARSE_PARTIAL(oi.start_octet, oi.octet_count);
+
+ if (*p) {
+ prot_printf(imapd_out, "%s BAD Junk after body section\r\n", tag);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ appendstrlist_withdata(&fetchargs.bodysections, section,
+ &oi, sizeof(oi));
+ }
+ else goto badatt;
+ break;
+
+ case 'E':
+ if (!strcmp(fetchatt.s, "ENVELOPE")) {
+ fetchitems |= FETCH_ENVELOPE;
+ }
+ else goto badatt;
+ break;
+
+ case 'F':
+ if (!inlist && !strcmp(fetchatt.s, "FAST")) {
+ fetchitems |= FETCH_FAST;
+ }
+ else if (!inlist && !strcmp(fetchatt.s, "FULL")) {
+ fetchitems |= FETCH_FULL;
+ }
+ else if (!strcmp(fetchatt.s, "FLAGS")) {
+ fetchitems |= FETCH_FLAGS;
+ }
+ else goto badatt;
+ break;
+
+ case 'I':
+ if (!strcmp(fetchatt.s, "INTERNALDATE")) {
+ fetchitems |= FETCH_INTERNALDATE;
+ }
+ else goto badatt;
+ break;
+
+ case 'M':
+ if ((imapd_mailbox->options & OPT_IMAP_CONDSTORE) &&
+ !strcmp(fetchatt.s, "MODSEQ")) {
+ fetchitems |= FETCH_MODSEQ;
+ }
+ else goto badatt;
+ break;
+ case 'R':
+ if (!strcmp(fetchatt.s, "RFC822")) {
+ fetchitems |= FETCH_RFC822|FETCH_SETSEEN;
+ }
+ else if (!strcmp(fetchatt.s, "RFC822.HEADER")) {
+ fetchitems |= FETCH_HEADER;
+ }
+ else if (!strcmp(fetchatt.s, "RFC822.PEEK")) {
+ fetchitems |= FETCH_RFC822;
+ }
+ else if (!strcmp(fetchatt.s, "RFC822.SIZE")) {
+ fetchitems |= FETCH_SIZE;
+ }
+ else if (!strcmp(fetchatt.s, "RFC822.TEXT")) {
+ fetchitems |= FETCH_TEXT|FETCH_SETSEEN;
+ }
+ else if (!strcmp(fetchatt.s, "RFC822.TEXT.PEEK")) {
+ fetchitems |= FETCH_TEXT;
+ }
+ else if (!strcmp(fetchatt.s, "RFC822.HEADER.LINES") ||
+ !strcmp(fetchatt.s, "RFC822.HEADER.LINES.NOT")) {
+ if (c != ' ') {
+ prot_printf(imapd_out, "%s BAD Missing required argument to %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ c = prot_getc(imapd_in);
+ if (c != '(') {
+ prot_printf(imapd_out, "%s BAD Missing required open parenthesis in %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ do {
+ c = getastring(imapd_in, imapd_out, &fieldname);
+ for (p = fieldname.s; *p; p++) {
+ if (*p <= ' ' || *p & 0x80 || *p == ':') break;
+ }
+ if (*p || !*fieldname.s) {
+ prot_printf(imapd_out, "%s BAD Invalid field-name in %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ lcase(fieldname.s);;
+ /* 19 is magic number -- length of
+ * "RFC822.HEADERS.NOT" */
+ appendstrlist(strlen(fetchatt.s) == 19 ?
+ &fetchargs.headers : &fetchargs.headers_not,
+ fieldname.s);
+ if (strlen(fetchatt.s) != 19) {
+ fetchargs.cache_atleast = BIT32_MAX;
+ }
+ if (fetchargs.cache_atleast < BIT32_MAX) {
+ bit32 this_ver =
+ mailbox_cached_header(fieldname.s);
+ if(this_ver > fetchargs.cache_atleast)
+ fetchargs.cache_atleast = this_ver;
+ }
+ } while (c == ' ');
+ if (c != ')') {
+ prot_printf(imapd_out, "%s BAD Missing required close parenthesis in %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ c = prot_getc(imapd_in);
+ }
+ else goto badatt;
+ break;
+
+ case 'U':
+ if (!strcmp(fetchatt.s, "UID")) {
+ fetchitems |= FETCH_UID;
+ }
+ else goto badatt;
+ break;
+
+ default:
+ badatt:
+ prot_printf(imapd_out, "%s BAD Invalid %s attribute %s\r\n", tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+
+ if (inlist && c == ' ') c = getword(imapd_in, &fetchatt);
+ else break;
+ }
+
+ if (inlist && c == ')') {
+ inlist = 0;
+ c = prot_getc(imapd_in);
+ if (c == ' ') {
+ /* Grab/parse the modifier(s) */
+ c = prot_getc(imapd_in);
+ if (c != '(') {
+ prot_printf(imapd_out,
+ "%s BAD Missing required open parenthesis in %s modifiers\r\n",
+ tag, cmd);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ inlist = 1;
+ do {
+ c = getword(imapd_in, &fetchatt);
+ ucase(fetchatt.s);
+ if ((imapd_mailbox->options & OPT_IMAP_CONDSTORE) &&
+ !strcmp(fetchatt.s, "CHANGEDSINCE")) {
+ if (c != ' ') {
+ prot_printf(imapd_out,
+ "%s BAD Missing required argument to %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ c = getastring(imapd_in, imapd_out, &fieldname);
+ fetchargs.changedsince = strtoul(fieldname.s, &p, 10);
+ if (*p || fetchargs.changedsince == ULONG_MAX) {
+ prot_printf(imapd_out,
+ "%s BAD Invalid argument to %s %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ fetchitems |= FETCH_MODSEQ;
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid %s modifier %s\r\n",
+ tag, cmd, fetchatt.s);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ } while (c == ' ');
+ if (c == ')') {
+ inlist = 0;
+ c = prot_getc(imapd_in);
+ }
+ }
+ }
+ if (inlist) {
+ prot_printf(imapd_out, "%s BAD Missing close parenthesis in %s\r\n",
+ tag, cmd);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out, "%s BAD Unexpected extra arguments to %s\r\n", tag, cmd);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+
+ if (!fetchitems && !fetchargs.bodysections && !fetchargs.fsections &&
+ !fetchargs.binsections && !fetchargs.sizesections &&
+ !fetchargs.headers && !fetchargs.headers_not) {
+ prot_printf(imapd_out, "%s BAD Missing required argument to %s\r\n", tag, cmd);
+ goto freeargs;
+ }
+
+ if (fetchitems & FETCH_MODSEQ) {
+ if (!imapd_condstore_client++)
+ prot_printf(imapd_out, "* OK [HIGHESTMODSEQ " MODSEQ_FMT "] \r\n",
+ imapd_mailbox->highestmodseq);
+ }
+
+ if (usinguid || config_getswitch(IMAPOPT_FLUSHSEENSTATE)) {
+ if (usinguid) fetchitems |= FETCH_UID;
+ index_check(imapd_mailbox, usinguid, /* update \Seen state from disk? */
+ config_getswitch(IMAPOPT_FLUSHSEENSTATE) << 1 /* quiet */);
+ }
+
+ fetchargs.fetchitems = fetchitems;
+ r = index_fetch(imapd_mailbox, sequence, usinguid, &fetchargs,
+ &fetchedsomething);
+
+ snprintf(mytime, sizeof(mytime), "%2.3f",
+ (clock() - start) / (double) CLOCKS_PER_SEC);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s (%s sec)\r\n", tag,
+ error_message(r), mytime);
+ } else if (fetchedsomething || usinguid) {
+ prot_printf(imapd_out, "%s OK %s (%s sec)\r\n", tag,
+ error_message(IMAP_OK_COMPLETED), mytime);
+ if (config_getswitch(IMAPOPT_FLUSHSEENSTATE) &&
+ (fetchargs.fetchitems & FETCH_SETSEEN)) {
+ /* flush \Seen state to disk */
+ index_check(imapd_mailbox, usinguid, 2 /* quiet */);
+ }
+ } else {
+ /* normal FETCH, nothing came back */
+ prot_printf(imapd_out, "%s NO %s (%s sec)\r\n", tag,
+ error_message(IMAP_NO_NOSUCHMSG), mytime);
+ }
+
+ freeargs:
+ freestrlist(newfields);
+ freestrlist(fetchargs.bodysections);
+ freefieldlist(fetchargs.fsections);
+ freestrlist(fetchargs.headers);
+ freestrlist(fetchargs.headers_not);
+}
+
+#undef PARSE_PARTIAL /* cleanup */
+
+/*
+ * Perform a PARTIAL command
+ */
+void cmd_partial(const char *tag, const char *msgno, char *data,
+ const char *start, const char *count)
+{
+ const char *pc;
+ char *p;
+ struct fetchargs fetchargs;
+ char *section;
+ int prev;
+ int fetchedsomething;
+
+ if (backend_current) {
+ /* remote mailbox */
+ prot_printf(backend_current->out, "%s Partial %s %s %s %s\r\n",
+ tag, msgno, data, start, count);
+ return;
+ }
+
+ /* local mailbox */
+ memset(&fetchargs, 0, sizeof(struct fetchargs));
+
+ for (pc = msgno; *pc; pc++) {
+ if (!isdigit((int) *pc)) break;
+ }
+ if (*pc || !*msgno) {
+ prot_printf(imapd_out, "%s BAD Invalid message number\r\n", tag);
+ return;
+ }
+
+ lcase(data);
+ if (!strcmp(data, "rfc822")) {
+ fetchargs.fetchitems = FETCH_RFC822|FETCH_SETSEEN;
+ }
+ else if (!strcmp(data, "rfc822.header")) {
+ fetchargs.fetchitems = FETCH_HEADER;
+ }
+ else if (!strcmp(data, "rfc822.peek")) {
+ fetchargs.fetchitems = FETCH_RFC822;
+ }
+ else if (!strcmp(data, "rfc822.text")) {
+ fetchargs.fetchitems = FETCH_TEXT|FETCH_SETSEEN;
+ }
+ else if (!strcmp(data, "rfc822.text.peek")) {
+ fetchargs.fetchitems = FETCH_TEXT;
+ }
+ else if (!strncmp(data, "body[", 5) ||
+ !strncmp(data, "body.peek[", 10)) {
+ p = section = data + 5;
+ if (!strncmp(p, "peek[", 5)) {
+ p = section += 5;
+ }
+ else {
+ fetchargs.fetchitems = FETCH_SETSEEN;
+ }
+ while (isdigit((int) *p) || *p == '.') {
+ if (*p == '.' && (p == section || !isdigit((int) p[1]))) break;
+ p++;
+ }
+ if (p == section || *p != ']' || p[1]) {
+ prot_printf(imapd_out, "%s BAD Invalid body section\r\n", tag);
+ freestrlist(fetchargs.bodysections);
+ return;
+ }
+ *(p+1) = '\0'; /* Keep the closing bracket in place */
+ appendstrlist(&fetchargs.bodysections, section);
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid Partial item\r\n", tag);
+ freestrlist(fetchargs.bodysections);
+ return;
+ }
+
+ for (pc = start; *pc; pc++) {
+ if (!isdigit((int) *pc)) break;
+ prev = fetchargs.start_octet;
+ fetchargs.start_octet = fetchargs.start_octet*10 + *pc - '0';
+ if(fetchargs.start_octet < prev) {
+ fetchargs.start_octet = 0;
+ break;
+ }
+ }
+ if (*pc || !fetchargs.start_octet) {
+ prot_printf(imapd_out, "%s BAD Invalid starting octet\r\n", tag);
+ freestrlist(fetchargs.bodysections);
+ return;
+ }
+ fetchargs.start_octet--; /* Normalize to be 0-based */
+
+ prev = fetchargs.octet_count;
+ for (pc = count; *pc; pc++) {
+ if (!isdigit((int) *pc)) break;
+ prev = fetchargs.octet_count;
+ fetchargs.octet_count = fetchargs.octet_count*10 + *pc - '0';
+ if(fetchargs.octet_count < prev) {
+ prev = -1;
+ break;
+ }
+ }
+ if (*pc || !*count || prev == -1) {
+ prot_printf(imapd_out, "%s BAD Invalid octet count\r\n", tag);
+ freestrlist(fetchargs.bodysections);
+ return;
+ }
+
+ fetchargs.fetchitems |= FETCH_IS_PARTIAL;
+
+ index_fetch(imapd_mailbox, msgno, 0, &fetchargs, &fetchedsomething);
+
+ index_check(imapd_mailbox, 0, /* flush \Seen state to disk? */
+ config_getswitch(IMAPOPT_FLUSHSEENSTATE) &&
+ fetchedsomething && (fetchargs.fetchitems & FETCH_SETSEEN));
+
+ if (fetchedsomething) {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ } else {
+ prot_printf(imapd_out,
+ "%s BAD Invalid sequence in PARTIAL command\r\n",
+ tag);
+ }
+
+ freestrlist(fetchargs.bodysections);
+}
+
+/*
+ * Parse and perform a STORE/UID STORE command
+ * The command has been parsed up to and including
+ * the sequence
+ */
+void cmd_store(char *tag, char *sequence, int usinguid)
+{
+ const char *cmd = usinguid ? "UID Store" : "Store";
+ struct storeargs storeargs;
+ static struct buf operation, flagname;
+ int len, c;
+ char **flag = 0;
+ int nflags = 0, flagalloc = 0;
+ int flagsparsed = 0, inlist = 0;
+ int r;
+
+ if (backend_current) {
+ /* remote mailbox */
+ prot_printf(backend_current->out, "%s %s %s ",
+ tag, cmd, sequence);
+ pipe_command(backend_current, 65536);
+ return;
+ }
+
+ /* local mailbox */
+ memset(&storeargs, 0, sizeof storeargs);
+ storeargs.unchangedsince = ULONG_MAX;
+
+ c = prot_getc(imapd_in);
+ if (c == '(') {
+ /* Grab/parse the modifier(s) */
+ static struct buf storemod, modvalue;
+ char *p;
+
+ do {
+ c = getword(imapd_in, &storemod);
+ lcase(storemod.s);
+ if ((imapd_mailbox->options & OPT_IMAP_CONDSTORE) &&
+ !strcmp(storemod.s, "unchangedsince")) {
+ if (c != ' ') {
+ prot_printf(imapd_out,
+ "%s BAD Missing required argument to %s %s\r\n",
+ tag, cmd, storemod.s);
+ eatline(imapd_in, c);
+ return;
+ }
+ c = getastring(imapd_in, imapd_out, &modvalue);
+ storeargs.unchangedsince = strtoul(modvalue.s, &p, 10);
+ if (*p || storeargs.unchangedsince == ULONG_MAX) {
+ prot_printf(imapd_out,
+ "%s BAD Invalid argument to %s %s\r\n",
+ tag, cmd, storemod.s);
+ eatline(imapd_in, c);
+ return;
+ }
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid %s modifier %s\r\n",
+ tag, cmd, storemod.s);
+ eatline(imapd_in, c);
+ return;
+ }
+ } while (c == ' ');
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close paren in store modifier entry \r\n",
+ tag);
+ eatline(imapd_in, c);
+ return;
+ }
+ c = prot_getc(imapd_in);
+ if (c != ' ') {
+ prot_printf(imapd_out,
+ "%s BAD Missing required argument to %s\r\n",
+ tag, cmd);
+ eatline(imapd_in, c);
+ return;
+ }
+ }
+ else
+ prot_ungetc(c, imapd_in);
+
+ c = getword(imapd_in, &operation);
+ if (c != ' ') {
+ prot_printf(imapd_out,
+ "%s BAD Missing required argument to %s\r\n", tag, cmd);
+ eatline(imapd_in, c);
+ return;
+ }
+ lcase(operation.s);
+
+ len = strlen(operation.s);
+ if (len > 7 && !strcmp(operation.s+len-7, ".silent")) {
+ storeargs.silent = 1;
+ operation.s[len-7] = '\0';
+ }
+
+ if (!strcmp(operation.s, "+flags")) {
+ storeargs.operation = STORE_ADD;
+ }
+ else if (!strcmp(operation.s, "-flags")) {
+ storeargs.operation = STORE_REMOVE;
+ }
+ else if (!strcmp(operation.s, "flags")) {
+ storeargs.operation = STORE_REPLACE;
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid %s attribute\r\n", tag, cmd);
+ eatline(imapd_in, ' ');
+ return;
+ }
+
+ for (;;) {
+ c = getword(imapd_in, &flagname);
+ if (c == '(' && !flagname.s[0] && !flagsparsed && !inlist) {
+ inlist = 1;
+ continue;
+ }
+
+ if (!flagname.s[0]) break;
+
+ if (flagname.s[0] == '\\') {
+ lcase(flagname.s);
+ if (!strcmp(flagname.s, "\\seen")) {
+ storeargs.seen = 1;
+ }
+ else if (!strcmp(flagname.s, "\\answered")) {
+ storeargs.system_flags |= FLAG_ANSWERED;
+ }
+ else if (!strcmp(flagname.s, "\\flagged")) {
+ storeargs.system_flags |= FLAG_FLAGGED;
+ }
+ else if (!strcmp(flagname.s, "\\deleted")) {
+ storeargs.system_flags |= FLAG_DELETED;
+ }
+ else if (!strcmp(flagname.s, "\\draft")) {
+ storeargs.system_flags |= FLAG_DRAFT;
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid system flag in %s command\r\n",
+ tag, cmd);
+ eatline(imapd_in, c);
+ goto freeflags;
+ }
+ }
+ else if (!imparse_isatom(flagname.s)) {
+ prot_printf(imapd_out, "%s BAD Invalid flag name %s in %s command\r\n",
+ tag, flagname.s, cmd);
+ eatline(imapd_in, c);
+ goto freeflags;
+ }
+ else {
+ if (nflags == flagalloc) {
+ flagalloc += FLAGGROW;
+ flag = (char **)xrealloc((char *)flag,
+ flagalloc*sizeof(char *));
+ }
+ flag[nflags] = xstrdup(flagname.s);
+ nflags++;
+ }
+
+ flagsparsed++;
+ if (c != ' ') break;
+ }
+
+ if (!inlist && !flagsparsed) {
+ prot_printf(imapd_out, "%s BAD Missing required argument to %s\r\n", tag, cmd);
+ eatline(imapd_in, c);
+ return;
+ }
+ if (inlist && c == ')') {
+ inlist = 0;
+ c = prot_getc(imapd_in);
+ }
+ if (inlist) {
+ prot_printf(imapd_out, "%s BAD Missing close parenthesis in %s\r\n", tag, cmd);
+ eatline(imapd_in, c);
+ goto freeflags;
+ }
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out, "%s BAD Unexpected extra arguments to %s\r\n", tag, cmd);
+ eatline(imapd_in, c);
+ goto freeflags;
+ }
+
+ if ((storeargs.unchangedsince != ULONG_MAX) && !imapd_condstore_client++) {
+ prot_printf(imapd_out, "* OK [HIGHESTMODSEQ " MODSEQ_FMT "] \r\n",
+ imapd_mailbox->highestmodseq);
+ }
+
+ r = index_store(imapd_mailbox, sequence, usinguid, &storeargs,
+ flag, nflags);
+
+ if (config_getswitch(IMAPOPT_FLUSHSEENSTATE) &&
+ (storeargs.seen || storeargs.operation == STORE_REPLACE)) {
+ /* flush \Seen state to disk */
+ index_check(imapd_mailbox, usinguid, 1);
+ }
+ else if (usinguid) {
+ index_check(imapd_mailbox, 1, 0);
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+
+ /* We only need to log a MAILBOX event if we've changed
+ a flag other than \Seen */
+ if (storeargs.system_flags || nflags ||
+ storeargs.operation == STORE_REPLACE) {
+ sync_log_mailbox(imapd_mailbox->name);
+ }
+ }
+
+ freeflags:
+ while (nflags--) {
+ free(flag[nflags]);
+ }
+ if (flag) free((char *)flag);
+}
+
+void cmd_search(char *tag, int usinguid)
+{
+ int c;
+ int charset = 0;
+ struct searchargs *searchargs;
+ clock_t start = clock();
+ char mytime[100];
+ int n;
+
+ if (backend_current) {
+ /* remote mailbox */
+ const char *cmd = usinguid ? "UID Search" : "Search";
+
+ prot_printf(backend_current->out, "%s %s ", tag, cmd);
+ pipe_command(backend_current, 65536);
+ return;
+ }
+
+ /* local mailbox */
+ searchargs = (struct searchargs *)xzmalloc(sizeof(struct searchargs));
+
+ c = getsearchprogram(tag, searchargs, &charset, 1);
+ if (c == EOF) {
+ eatline(imapd_in, ' ');
+ freesearchargs(searchargs);
+ return;
+ }
+
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out, "%s BAD Unexpected extra arguments to Search\r\n", tag);
+ eatline(imapd_in, c);
+ freesearchargs(searchargs);
+ return;
+ }
+
+ index_check(imapd_mailbox, 1, 0);
+
+ if (charset == -1) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag,
+ error_message(IMAP_UNRECOGNIZED_CHARSET));
+ }
+ else {
+ n = index_search(imapd_mailbox, searchargs, usinguid);
+ snprintf(mytime, sizeof(mytime), "%2.3f",
+ (clock() - start) / (double) CLOCKS_PER_SEC);
+ prot_printf(imapd_out, "%s OK %s (%d msgs in %s secs)\r\n", tag,
+ error_message(IMAP_OK_COMPLETED), n, mytime);
+ }
+
+ freesearchargs(searchargs);
+}
+
+/*
+ * Perform a SORT/UID SORT command
+ */
+void cmd_sort(char *tag, int usinguid)
+{
+ int c;
+ struct sortcrit *sortcrit = NULL;
+ static struct buf arg;
+ int charset = 0;
+ struct searchargs *searchargs;
+ clock_t start = clock();
+ char mytime[100];
+ int n;
+
+ if (backend_current) {
+ /* remote mailbox */
+ char *cmd = usinguid ? "UID Sort" : "Sort";
+
+ prot_printf(backend_current->out, "%s %s ", tag, cmd);
+ pipe_command(backend_current, 65536);
+ return;
+ }
+
+ /* local mailbox */
+ c = getsortcriteria(tag, &sortcrit);
+ if (c == EOF) {
+ eatline(imapd_in, ' ');
+ freesortcrit(sortcrit);
+ return;
+ }
+
+ /* get charset */
+ if (c != ' ') {
+ prot_printf(imapd_out, "%s BAD Missing charset in Sort\r\n",
+ tag);
+ eatline(imapd_in, c);
+ freesortcrit(sortcrit);
+ return;
+ }
+
+ c = getword(imapd_in, &arg);
+ if (c != ' ') {
+ prot_printf(imapd_out, "%s BAD Missing search criteria in Sort\r\n",
+ tag);
+ eatline(imapd_in, c);
+ freesortcrit(sortcrit);
+ return;
+ }
+ lcase(arg.s);
+ charset = charset_lookupname(arg.s);
+
+ if (charset == -1) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag,
+ error_message(IMAP_UNRECOGNIZED_CHARSET));
+ eatline(imapd_in, c);
+ freesortcrit(sortcrit);
+ return;
+ }
+
+ searchargs = (struct searchargs *)xzmalloc(sizeof(struct searchargs));
+
+ c = getsearchprogram(tag, searchargs, &charset, 0);
+ if (c == EOF) {
+ eatline(imapd_in, ' ');
+ freesearchargs(searchargs);
+ freesortcrit(sortcrit);
+ return;
+ }
+
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to Sort\r\n", tag);
+ eatline(imapd_in, c);
+ freesearchargs(searchargs);
+ freesortcrit(sortcrit);
+ return;
+ }
+
+ index_check(imapd_mailbox, 1, 0);
+
+ n = index_sort(imapd_mailbox, sortcrit, searchargs, usinguid);
+ snprintf(mytime, sizeof(mytime), "%2.3f",
+ (clock() - start) / (double) CLOCKS_PER_SEC);
+ prot_printf(imapd_out, "%s OK %s (%d msgs in %s secs)\r\n", tag,
+ error_message(IMAP_OK_COMPLETED), n, mytime);
+
+ freesortcrit(sortcrit);
+ freesearchargs(searchargs);
+ return;
+}
+
+/*
+ * Perform a THREAD/UID THREAD command
+ */
+void cmd_thread(char *tag, int usinguid)
+{
+ static struct buf arg;
+ int c;
+ int charset = 0;
+ int alg;
+ struct searchargs *searchargs;
+ clock_t start = clock();
+ char mytime[100];
+ int n;
+
+ if (backend_current) {
+ /* remote mailbox */
+ const char *cmd = usinguid ? "UID Thread" : "Thread";
+
+ prot_printf(backend_current->out, "%s %s ", tag, cmd);
+ pipe_command(backend_current, 65536);
+ return;
+ }
+
+ /* local mailbox */
+ /* get algorithm */
+ c = getword(imapd_in, &arg);
+ if (c != ' ') {
+ prot_printf(imapd_out, "%s BAD Missing algorithm in Thread\r\n", tag);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ if ((alg = find_thread_algorithm(arg.s)) == -1) {
+ prot_printf(imapd_out, "%s BAD Invalid Thread algorithm %s\r\n",
+ tag, arg.s);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ /* get charset */
+ c = getword(imapd_in, &arg);
+ if (c != ' ') {
+ prot_printf(imapd_out, "%s BAD Missing charset in Thread\r\n",
+ tag);
+ eatline(imapd_in, c);
+ return;
+ }
+ lcase(arg.s);
+ charset = charset_lookupname(arg.s);
+
+ if (charset == -1) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag,
+ error_message(IMAP_UNRECOGNIZED_CHARSET));
+ eatline(imapd_in, c);
+ return;
+ }
+
+ searchargs = (struct searchargs *)xzmalloc(sizeof(struct searchargs));
+
+ c = getsearchprogram(tag, searchargs, &charset, 0);
+ if (c == EOF) {
+ eatline(imapd_in, ' ');
+ freesearchargs(searchargs);
+ return;
+ }
+
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to Thread\r\n", tag);
+ eatline(imapd_in, c);
+ freesearchargs(searchargs);
+ return;
+ }
+
+ index_check(imapd_mailbox, 1, 0);
+
+ n = index_thread(imapd_mailbox, alg, searchargs, usinguid);
+ snprintf(mytime, sizeof(mytime), "%2.3f",
+ (clock() - start) / (double) CLOCKS_PER_SEC);
+ prot_printf(imapd_out, "%s OK %s (%d msgs in %s secs)\r\n", tag,
+ error_message(IMAP_OK_COMPLETED), n, mytime);
+
+ freesearchargs(searchargs);
+ return;
+}
+
+/*
+ * Perform a COPY/UID COPY command
+ */
+void cmd_copy(char *tag, char *sequence, char *name, int usinguid)
+{
+ int r, myrights;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int mbtype;
+ char *server, *acl;
+ char *copyuid;
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+
+ if (!r) {
+ r = mlookup(NULL, NULL, mailboxname, &mbtype, NULL, NULL,
+ &server, &acl, NULL);
+ }
+
+ if (!r) myrights = cyrus_acl_myrights(imapd_authstate, acl);
+
+ if (!r && backend_current) {
+ /* remote mailbox -> local or remote mailbox */
+
+ /* xxx start of separate proxy-only code
+ (remove when we move to a unified environment) */
+ struct backend *s = NULL;
+
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ goto done;
+ }
+
+ if (s != backend_current) {
+ /* this is the hard case; we have to fetch the messages and append
+ them to the other mailbox */
+
+ proxy_copy(tag, sequence, name, myrights, usinguid, s);
+ return;
+ }
+ /* xxx end of separate proxy-only code */
+
+ /* simply send the COPY to the backend */
+ prot_printf(backend_current->out, "%s %s %s {%d+}\r\n%s\r\n",
+ tag, usinguid ? "UID Copy" : "Copy",
+ sequence, strlen(name), name);
+
+ return;
+ }
+ else if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* local mailbox -> remote mailbox
+ *
+ * fetch the messages and APPEND them to the backend
+ *
+ * xxx completely untested
+ */
+ struct backend *s = NULL;
+ int res;
+
+ index_check(imapd_mailbox, usinguid, 0);
+
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) r = IMAP_SERVER_UNAVAILABLE;
+ else if (!CAPA(s, CAPA_MULTIAPPEND)) {
+ /* we need MULTIAPPEND for atomicity */
+ r = IMAP_REMOTE_NO_MULTIAPPEND;
+ }
+
+ if (r) goto done;
+
+ /* start the append */
+ prot_printf(s->out, "%s Append {%d+}\r\n%s", tag, strlen(name), name);
+
+ /* append the messages */
+ r = index_copy_remote(imapd_mailbox, sequence, usinguid, s->out);
+
+ if (!r) {
+ /* ok, finish the append; we need the UIDVALIDITY and UIDs
+ to return as part of our COPYUID response code */
+ char *appenduid, *b;
+
+ prot_printf(s->out, "\r\n");
+
+ res = pipe_until_tag(s, tag, 0);
+
+ if (res == PROXY_OK) {
+ if (myrights & ACL_READ) {
+ appenduid = strchr(s->last_result.s, '[');
+ /* skip over APPENDUID */
+ appenduid += strlen("[appenduid ");
+ b = strchr(appenduid, ']');
+ *b = '\0';
+ prot_printf(imapd_out, "%s OK [COPYUID %s] %s\r\n", tag,
+ appenduid, error_message(IMAP_OK_COMPLETED));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+ } else {
+ prot_printf(imapd_out, "%s %s", tag, s->last_result.s);
+ }
+ } else {
+ /* abort the append */
+ prot_printf(s->out, " {0}\r\n");
+ pipe_until_tag(s, tag, 0);
+
+ /* report failure */
+ prot_printf(imapd_out, "%s NO inter-server COPY failed\r\n", tag);
+ }
+
+ return;
+ }
+
+ /* local mailbox -> local mailbox */
+ if (!r) {
+ r = index_copy(imapd_mailbox, sequence, usinguid, mailboxname,
+ ©uid, !config_getswitch(IMAPOPT_SINGLEINSTANCESTORE));
+ }
+
+ index_check(imapd_mailbox, usinguid, 0);
+
+ done:
+ if (r && !(usinguid && r == IMAP_NO_NOSUCHMSG)) {
+ prot_printf(imapd_out, "%s NO %s%s\r\n", tag,
+ (r == IMAP_MAILBOX_NONEXISTENT &&
+ mboxlist_createmailboxcheck(mailboxname, 0, 0,
+ imapd_userisadmin,
+ imapd_userid, imapd_authstate,
+ (char **)0, (char **)0) == 0)
+ ? "[TRYCREATE] " : "", error_message(r));
+ }
+ else if (copyuid) {
+ prot_printf(imapd_out, "%s OK [COPYUID %s] %s\r\n", tag,
+ copyuid, error_message(IMAP_OK_COMPLETED));
+ free(copyuid);
+ }
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+}
+
+/*
+ * Perform an EXPUNGE command
+ * sequence == NULL if this isn't a UID EXPUNGE
+ */
+void cmd_expunge(char *tag, char *sequence)
+{
+ int r;
+
+ if (backend_current) {
+ /* remote mailbox */
+ if (sequence) {
+ prot_printf(backend_current->out, "%s UID Expunge %s\r\n", tag,
+ sequence);
+ } else {
+ prot_printf(backend_current->out, "%s Expunge\r\n", tag);
+ }
+ return;
+ }
+
+ /* local mailbox */
+ if (!(imapd_mailbox->myrights & ACL_EXPUNGE)) r = IMAP_PERMISSION_DENIED;
+ else if (sequence) {
+ r = mailbox_expunge(imapd_mailbox, index_expungeuidlist, sequence, 0);
+ }
+ else {
+ r = mailbox_expunge(imapd_mailbox, (mailbox_decideproc_t *)0,
+ (void *)0, 0);
+ }
+
+ index_check(imapd_mailbox, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ sync_log_mailbox(imapd_mailbox->name);
+ }
+}
+
+/*
+ * Perform a CREATE command
+ */
+void cmd_create(char *tag, char *name, char *partition, int localonly)
+{
+ int r = 0;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int autocreatequota;
+ int sync_lockfd = (-1);
+
+ if (partition && !imapd_userisadmin) {
+ r = IMAP_PERMISSION_DENIED;
+ }
+
+ if (name[0] && name[strlen(name)-1] == imapd_namespace.hier_sep) {
+ /* We don't care about trailing hierarchy delimiters. */
+ name[strlen(name)-1] = '\0';
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ }
+
+ if (!r && !localonly && config_mupdate_server) {
+ int guessedpart = 0;
+
+ /* determine if we're creating locally or remotely */
+ if (!partition) {
+ guessedpart = 1;
+ r = mboxlist_createmailboxcheck(mailboxname, 0, 0,
+ imapd_userisadmin,
+ imapd_userid, imapd_authstate,
+ NULL, &partition);
+ }
+
+ if (!r && !config_partitiondir(partition)) {
+ /* invalid partition, assume its a server (remote mailbox) */
+ char *server;
+ struct backend *s = NULL;
+ int res;
+
+ /* check for a remote partition */
+ server = partition;
+ partition = strchr(server, '!');
+ if (partition) *partition++ = '\0';
+ if (guessedpart) partition = NULL;
+
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) r = IMAP_SERVER_UNAVAILABLE;
+
+ if (!r) {
+ if (!CAPA(s, CAPA_MUPDATE)) {
+ /* reserve mailbox on MUPDATE */
+ }
+ }
+
+ if (!r) {
+ /* ok, send the create to that server */
+ if (partition)
+ prot_printf(s->out,
+ "%s CREATE {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag, strlen(name), name,
+ strlen(partition), partition);
+ else
+ prot_printf(s->out, "%s CREATE {%d+}\r\n%s\r\n",
+ tag, strlen(name), name);
+ res = pipe_until_tag(s, tag, 0);
+
+ if (!CAPA(s, CAPA_MUPDATE)) {
+ /* do MUPDATE create operations */
+ }
+ /* make sure we've seen the update */
+ if (ultraparanoid && res == PROXY_OK) kick_mupdate();
+ }
+
+ imapd_check(s, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ /* we're allowed to reference last_result since the noop, if
+ sent, went to a different server */
+ prot_printf(imapd_out, "%s %s", tag, s->last_result.s);
+ }
+
+ return;
+ }
+
+ /* local mailbox -- fall through */
+ if (guessedpart) partition = NULL;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ /* xxx we do forced user creates on LOCALCREATE to facilitate
+ * mailbox moves */
+ r = mboxlist_createmailbox(mailboxname, 0, partition,
+ imapd_userisadmin,
+ imapd_userid, imapd_authstate,
+ localonly, localonly, 0);
+
+ if (r == IMAP_PERMISSION_DENIED && !strcasecmp(name, "INBOX") &&
+ (autocreatequota = config_getint(IMAPOPT_AUTOCREATEQUOTA))) {
+
+ /* Auto create */
+ r = mboxlist_createmailbox(mailboxname, 0,
+ partition, 1, imapd_userid,
+ imapd_authstate, 0, 0, 0);
+
+ if (!r && autocreatequota > 0) {
+ (void) mboxlist_setquota(mailboxname, autocreatequota, 0);
+ }
+ }
+ }
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ else {
+ if (config_mupdate_server &&
+ (config_mupdate_config != IMAP_ENUM_MUPDATE_CONFIG_STANDARD)) {
+ kick_mupdate();
+ }
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+
+ if (mboxname_isusermailbox(mailboxname, 1))
+ sync_log_user(name+5);
+ else
+ sync_log_mailbox(mailboxname);
+ }
+}
+
+/* Callback for use by cmd_delete */
+static int delmbox(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock __attribute__((unused)))
+{
+ int r;
+
+ r = mboxlist_deletemailbox(name, imapd_userisadmin,
+ imapd_userid, imapd_authstate,
+ 0, 0, 0);
+
+ if (!r) sync_log_mailbox(name);
+
+ if(r) {
+ prot_printf(imapd_out, "* NO delete %s: %s\r\n",
+ name, error_message(r));
+ }
+
+ return 0;
+}
+
+/*
+ * Perform a DELETE command
+ */
+void cmd_delete(char *tag, char *name, int localonly, int force)
+{
+ int r;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int mbtype;
+ char *server;
+ char *p;
+ int domainlen = 0;
+ int sync_lockfd = (-1);
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+
+ if (!r) {
+ r = mlookup(NULL, NULL, mailboxname, &mbtype, NULL, NULL,
+ &server, NULL, NULL);
+ }
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ struct backend *s = NULL;
+ int res;
+
+ if (supports_referrals) {
+ imapd_refer(tag, server, name);
+ referral_kick = 1;
+ return;
+ }
+
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) r = IMAP_SERVER_UNAVAILABLE;
+
+ if (!r) {
+ prot_printf(s->out, "%s DELETE {%d+}\r\n%s\r\n",
+ tag, strlen(name), name);
+ res = pipe_until_tag(s, tag, 0);
+
+ if (!CAPA(s, CAPA_MUPDATE) && res == PROXY_OK) {
+ /* do MUPDATE delete operations */
+ }
+
+ /* make sure we've seen the update */
+ if (ultraparanoid && res == PROXY_OK) kick_mupdate();
+ }
+
+ imapd_check(s, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ /* we're allowed to reference last_result since the noop, if
+ sent, went to a different server */
+ prot_printf(imapd_out, "%s %s", tag, s->last_result.s);
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ if (config_virtdomains && (p = strchr(mailboxname, '!')))
+ domainlen = p - mailboxname + 1;
+
+ r = mboxlist_deletemailbox(mailboxname, imapd_userisadmin,
+ imapd_userid, imapd_authstate, 1-force,
+ localonly, 0);
+ }
+
+ /* was it a top-level user mailbox? */
+ /* localonly deletes are only per-mailbox */
+ if (!r && !localonly &&
+ !strncmp(mailboxname+domainlen, "user.", 5) &&
+ !strchr(mailboxname+domainlen+5, '.')) {
+ int mailboxname_len = strlen(mailboxname);
+
+ /* If we aren't too close to MAX_MAILBOX_NAME, append .* */
+ p = mailboxname + mailboxname_len; /* end of mailboxname */
+ if (mailboxname_len < sizeof(mailboxname) - 3) {
+ strcpy(p, ".*");
+ }
+
+ /* build a list of mailboxes - we're using internal names here */
+ mboxlist_findall(NULL, mailboxname, imapd_userisadmin, imapd_userid,
+ imapd_authstate, delmbox, NULL);
+
+ /* take care of deleting ACLs, subscriptions, seen state and quotas */
+ *p = '\0'; /* clip off pattern */
+ if ((!domainlen) ||
+ (domainlen+1 < (sizeof(mailboxname) - mailboxname_len))) {
+ if (domainlen) {
+ /* fully qualify the userid */
+ snprintf(p, (sizeof(mailboxname) - mailboxname_len), "@%.*s",
+ domainlen-1, mailboxname);
+ }
+ user_deletedata(mailboxname+domainlen+5, imapd_userid,
+ imapd_authstate, 1);
+
+ sync_log_user(mailboxname+domainlen+5);
+
+ *p = '\0'; /* clip off domain */
+ }
+ }
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ else {
+ if (config_mupdate_server &&
+ (config_mupdate_config != IMAP_ENUM_MUPDATE_CONFIG_STANDARD)) {
+ kick_mupdate();
+ }
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+
+ sync_log_mailbox(mailboxname);
+ }
+}
+
+struct renrock
+{
+ int ol;
+ int nl;
+ int rename_user;
+ char *olduser, *newuser;
+ char *acl_olduser, *acl_newuser;
+ char *newmailboxname;
+ char *partition;
+};
+
+/* Callback for use by cmd_rename */
+static int renmbox(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ char oldextname[MAX_MAILBOX_NAME+1];
+ char newextname[MAX_MAILBOX_NAME+1];
+ struct renrock *text = (struct renrock *)rock;
+ int r;
+
+ if((text->nl + strlen(name + text->ol)) > MAX_MAILBOX_NAME)
+ return 0;
+
+ strcpy(text->newmailboxname + text->nl, name + text->ol);
+
+ r = mboxlist_renamemailbox(name, text->newmailboxname,
+ text->partition,
+ 1, imapd_userid, imapd_authstate);
+
+ (*imapd_namespace.mboxname_toexternal)(&imapd_namespace,
+ name,
+ imapd_userid, oldextname);
+ (*imapd_namespace.mboxname_toexternal)(&imapd_namespace,
+ text->newmailboxname,
+ imapd_userid, newextname);
+
+ if(r) {
+ prot_printf(imapd_out, "* NO rename %s %s: %s\r\n",
+ oldextname, newextname, error_message(r));
+ if (RENAME_STOP_ON_ERROR) return r;
+ } else {
+ /* If we're renaming a user, change quotaroot and ACL */
+ if (text->rename_user) {
+ user_copyquotaroot(name, text->newmailboxname);
+ user_renameacl(text->newmailboxname,
+ text->acl_olduser, text->acl_newuser);
+ }
+
+ /* Rename mailbox annotations */
+ annotatemore_rename(name, text->newmailboxname,
+ text->rename_user ? text->olduser : NULL,
+ text->newuser);
+
+ prot_printf(imapd_out, "* OK rename %s %s\r\n",
+ oldextname, newextname);
+
+ sync_log_mailbox_double(name, text->newmailboxname);
+ }
+
+ prot_flush(imapd_out);
+
+ return 0;
+}
+
+/*
+ * Perform a RENAME command
+ */
+void cmd_rename(char *tag, char *oldname, char *newname, char *partition)
+{
+ int r = 0;
+ char oldmailboxname[MAX_MAILBOX_NAME+3];
+ char newmailboxname[MAX_MAILBOX_NAME+2];
+ char oldmailboxname2[MAX_MAILBOX_NAME+1];
+ char newmailboxname2[MAX_MAILBOX_NAME+1];
+ char oldextname[MAX_MAILBOX_NAME+1];
+ char newextname[MAX_MAILBOX_NAME+1];
+ int sync_lockfd = (-1);
+ int omlen, nmlen;
+ char *p;
+ int recursive_rename = 1;
+ int rename_user = 0;
+ char olduser[128], newuser[128];
+ char acl_olduser[128], acl_newuser[128];
+ int mbtype;
+ char *server;
+
+ if (partition && !imapd_userisadmin) {
+ r = IMAP_PERMISSION_DENIED;
+ }
+
+ /* canonicalize names */
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, oldname,
+ imapd_userid, oldmailboxname);
+ if (!r)
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, newname,
+ imapd_userid, newmailboxname);
+
+ /* Keep temporary copy: master is trashed */
+ strcpy(oldmailboxname2, oldmailboxname);
+ strcpy(newmailboxname2, newmailboxname);
+
+ if (!r) {
+ r = mlookup(NULL, NULL, oldmailboxname, &mbtype, NULL, NULL,
+ &server, NULL, NULL);
+ }
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ struct backend *s = NULL;
+ int res;
+
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) r = IMAP_SERVER_UNAVAILABLE;
+
+ /* xxx start of separate proxy-only code
+ (remove when we move to a unified environment) */
+
+ /* Cross Server Rename */
+ if (!r && partition) {
+ char *destpart;
+
+ if (strcmp(oldname, newname)) {
+ prot_printf(imapd_out,
+ "%s NO Cross-server or cross-partition move w/rename not supported\r\n",
+ tag);
+ return;
+ }
+
+ /* dest partition? */
+
+ destpart = strchr(partition,'!');
+ if (destpart) {
+ char newserver[MAX_MAILBOX_NAME+1];
+ if (strlen(partition) >= sizeof(newserver)) {
+ prot_printf(imapd_out,
+ "%s NO Partition name too long\r\n", tag);
+ return;
+ }
+ strcpy(newserver,partition);
+ newserver[destpart-partition]='\0';
+ destpart++;
+
+ if (!strcmp(server, newserver)) {
+ /* Same Server, different partition */
+ /* xxx this would require administrative access to the
+ * backend, which we won't get */
+ prot_printf(imapd_out,
+ "%s NO Can't move across partitions via a proxy\r\n",
+ tag);
+ return;
+ } else {
+ /* Cross Server */
+ /* <tag> XFER <name> <dest server> <dest partition> */
+ prot_printf(s->out,
+ "%s XFER {%d+}\r\n%s {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag, strlen(oldname), oldname,
+ strlen(newserver), newserver,
+ strlen(destpart), destpart);
+ }
+
+ } else {
+ /* <tag> XFER <name> <dest server> */
+ prot_printf(s->out, "%s XFER {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag, strlen(oldname), oldname,
+ strlen(partition), partition);
+ }
+
+ res = pipe_including_tag(s, tag, 0);
+
+ /* make sure we've seen the update */
+ if (ultraparanoid && res == PROXY_OK) kick_mupdate();
+
+ return;
+ }
+ /* xxx end of separate proxy-only code */
+
+ if (!r) {
+ if (!CAPA(s, CAPA_MUPDATE)) {
+ /* do MUPDATE create operations for new mailbox */
+ }
+
+ prot_printf(s->out, "%s RENAME {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag, strlen(oldname), oldname,
+ strlen(newname), newname);
+ res = pipe_until_tag(s, tag, 0);
+
+ if (!CAPA(s, CAPA_MUPDATE)) {
+ /* Activate/abort new mailbox in MUPDATE*/
+ /* delete old mailbox from MUPDATE */
+ }
+
+ /* make sure we've seen the update */
+ if (res == PROXY_OK) kick_mupdate();
+ }
+
+ imapd_check(s, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ /* we're allowed to reference last_result since the noop, if
+ sent, went to a different server */
+ prot_printf(imapd_out, "%s %s", tag, s->last_result.s);
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+
+ if (!r && partition && !config_partitiondir(partition)) {
+ /* invalid partition, assume its a server (remote destination) */
+ char *server;
+
+ if (strcmp(oldname, newname)) {
+ prot_printf(imapd_out,
+ "%s NO Cross-server or cross-partition move w/rename not supported\r\n",
+ tag);
+ return;
+ }
+
+ /* dest partition? */
+ server = partition;
+ partition = strchr(server, '!');
+ if (partition) *partition++ = '\0';
+
+ cmd_xfer(tag, oldname, server, partition);
+
+ return;
+ }
+
+ /* local destination */
+
+ /* if this is my inbox, don't do recursive renames */
+ if (!strcasecmp(oldname, "inbox")) {
+ recursive_rename = 0;
+ }
+ /* check if we're an admin renaming a user */
+ else if (config_getswitch(IMAPOPT_ALLOWUSERMOVES) &&
+ mboxname_isusermailbox(oldmailboxname, 1) &&
+ mboxname_isusermailbox(newmailboxname, 1) &&
+ strcmp(oldmailboxname, newmailboxname) && /* different user */
+ imapd_userisadmin) {
+ rename_user = 1;
+ }
+
+ /* if we're renaming something inside of something else,
+ don't recursively rename stuff */
+ omlen = strlen(oldmailboxname);
+ nmlen = strlen(newmailboxname);
+ if (omlen < nmlen) {
+ if (!strncmp(oldmailboxname, newmailboxname, omlen) &&
+ newmailboxname[omlen] == '.') {
+ recursive_rename = 0;
+ }
+ } else {
+ if (!strncmp(oldmailboxname, newmailboxname, nmlen) &&
+ oldmailboxname[nmlen] == '.') {
+ recursive_rename = 0;
+ }
+ }
+
+ /* attempt to rename the base mailbox */
+ if (!r) {
+ r = mboxlist_renamemailbox(oldmailboxname, newmailboxname, partition,
+ imapd_userisadmin,
+ imapd_userid, imapd_authstate);
+ }
+
+ /* If we're renaming a user, take care of changing quotaroot, ACL,
+ seen state, subscriptions and sieve scripts */
+ if (!r && rename_user) {
+ char *domain;
+
+ /* create canonified userids */
+
+ domain = strchr(oldmailboxname, '!');
+ strcpy(olduser, domain ? domain+6 : oldmailboxname+5);
+ if (domain)
+ sprintf(olduser+strlen(olduser), "@%.*s",
+ domain - oldmailboxname, oldmailboxname);
+ strcpy(acl_olduser, olduser);
+
+ /* Translate any separators in source old userid (for ACLs) */
+ mboxname_hiersep_toexternal(&imapd_namespace, acl_olduser,
+ config_virtdomains ?
+ strcspn(acl_olduser, "@") : 0);
+
+ domain = strchr(newmailboxname, '!');
+ strcpy(newuser, domain ? domain+6 : newmailboxname+5);
+ if (domain)
+ sprintf(newuser+strlen(newuser), "@%.*s",
+ domain - newmailboxname, newmailboxname);
+ strcpy(acl_newuser, newuser);
+
+ /* Translate any separators in destination new userid (for ACLs) */
+ mboxname_hiersep_toexternal(&imapd_namespace, acl_newuser,
+ config_virtdomains ?
+ strcspn(acl_newuser, "@") : 0);
+
+ user_copyquotaroot(oldmailboxname, newmailboxname);
+ user_renameacl(newmailboxname, acl_olduser, acl_newuser);
+ user_renamedata(olduser, newuser, imapd_userid, imapd_authstate);
+
+ /* XXX report status/progress of meta-data */
+ }
+
+ if (!r) {
+ /* Rename mailbox annotations */
+ annotatemore_rename(oldmailboxname, newmailboxname,
+ rename_user ? olduser : NULL,
+ newuser);
+ }
+
+ /* rename all mailboxes matching this */
+ if (!r && recursive_rename) {
+ struct renrock rock;
+ int ol = omlen + 1;
+ int nl = nmlen + 1;
+
+ (*imapd_namespace.mboxname_toexternal)(&imapd_namespace,
+ oldmailboxname,
+ imapd_userid, oldextname);
+ (*imapd_namespace.mboxname_toexternal)(&imapd_namespace,
+ newmailboxname,
+ imapd_userid, newextname);
+
+ prot_printf(imapd_out, "* OK rename %s %s\r\n",
+ oldextname, newextname);
+ prot_flush(imapd_out);
+
+ strcat(oldmailboxname, ".*");
+ strcat(newmailboxname, ".");
+
+ /* setup the rock */
+ rock.newmailboxname = newmailboxname;
+ rock.ol = ol;
+ rock.nl = nl;
+ rock.olduser = olduser;
+ rock.newuser = newuser;
+ rock.acl_olduser = acl_olduser;
+ rock.acl_newuser = acl_newuser;
+ rock.partition = partition;
+ rock.rename_user = rename_user;
+
+ /* add submailboxes; we pretend we're an admin since we successfully
+ renamed the parent - we're using internal names here */
+ r = mboxlist_findall(NULL, oldmailboxname, 1, imapd_userid,
+ imapd_authstate, renmbox, &rock);
+ }
+
+ /* take care of deleting old ACLs, subscriptions, seen state and quotas */
+ if (!r && rename_user)
+ user_deletedata(olduser, imapd_userid, imapd_authstate, 1);
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ if (config_mupdate_server &&
+ (config_mupdate_config != IMAP_ENUM_MUPDATE_CONFIG_STANDARD)) {
+ kick_mupdate();
+ }
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ sync_log_mailbox_double(oldmailboxname2, newmailboxname2);
+ }
+}
+
+/*
+ * Perform a RECONSTRUCT command
+ */
+void cmd_reconstruct(const char *tag, const char *name, int recursive)
+{
+ int r = 0;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ char quotaroot[MAX_MAILBOX_NAME+1];
+ int mbtype;
+ char *server;
+ struct mailbox mailbox;
+
+ /* administrators only please */
+ if (!imapd_userisadmin) {
+ r = IMAP_PERMISSION_DENIED;
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ }
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, &mbtype, NULL, NULL,
+ &server, NULL, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ imapd_refer(tag, server, name);
+ return;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ int pid;
+
+ /* Reconstruct it */
+
+ pid = fork();
+ if(pid == -1) {
+ r = IMAP_SYS_ERROR;
+ } else if(pid == 0) {
+ char buf[4096];
+ int ret;
+
+ /* Child - exec reconstruct*/
+ syslog(LOG_NOTICE, "Reconstructing '%s' (%s) for user '%s'",
+ mailboxname, recursive ? "recursive" : "not recursive",
+ imapd_userid);
+
+ fclose(stdin);
+ fclose(stdout);
+ fclose(stderr);
+
+ ret = snprintf(buf, sizeof(buf), "%s/reconstruct", SERVICE_PATH);
+ if(ret < 0 || ret >= sizeof(buf)) {
+ /* in child, so fatailing won't disconnect our user */
+ fatal("reconstruct buffer not sufficiently big", EC_CONFIG);
+ }
+
+ if(recursive) {
+ execl(buf, buf, "-C", config_filename, "-r", "-f",
+ mailboxname, NULL);
+ } else {
+ execl(buf, buf, "-C", config_filename, mailboxname, NULL);
+ }
+
+ /* if we are here, we have a problem */
+ exit(-1);
+ } else {
+ int status;
+
+ /* Parent, wait on child */
+ if(waitpid(pid, &status, 0) < 0) r = IMAP_SYS_ERROR;
+
+ /* Did we fail? */
+ if(WEXITSTATUS(status) != 0) r = IMAP_SYS_ERROR;
+ }
+ }
+
+ /* Still in parent, need to re-quota the mailbox*/
+
+ /* Find its quota root */
+ if (!r) {
+ r = mailbox_open_header(mailboxname, imapd_authstate, &mailbox);
+ }
+
+ if(!r) {
+ if(mailbox.quota.root) {
+ strcpy(quotaroot, mailbox.quota.root);
+ } else {
+ strcpy(quotaroot, mailboxname);
+ }
+ mailbox_close(&mailbox);
+ }
+
+ /* Run quota -f */
+ if (!r) {
+ int pid;
+
+ pid = fork();
+ if(pid == -1) {
+ r = IMAP_SYS_ERROR;
+ } else if(pid == 0) {
+ char buf[4096];
+ int ret;
+
+ /* Child - exec reconstruct*/
+ syslog(LOG_NOTICE,
+ "Regenerating quota roots starting with '%s' for user '%s'",
+ mailboxname, imapd_userid);
+
+ fclose(stdin);
+ fclose(stdout);
+ fclose(stderr);
+
+ ret = snprintf(buf, sizeof(buf), "%s/quota", SERVICE_PATH);
+ if(ret < 0 || ret >= sizeof(buf)) {
+ /* in child, so fatailing won't disconnect our user */
+ fatal("quota buffer not sufficiently big", EC_CONFIG);
+ }
+
+ execl(buf, buf, "-C", config_filename, "-f", quotaroot, NULL);
+
+ /* if we are here, we have a problem */
+ exit(-1);
+ } else {
+ int status;
+
+ /* Parent, wait on child */
+ if(waitpid(pid, &status, 0) < 0) r = IMAP_SYS_ERROR;
+
+ /* Did we fail? */
+ if(WEXITSTATUS(status) != 0) r = IMAP_SYS_ERROR;
+ }
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ sync_log_user(imapd_userid);
+ }
+}
+
+/*
+ * Perform a FIND command
+ */
+void cmd_find(char *tag, char *namespace, char *pattern)
+{
+ char *p;
+ lcase(namespace);
+
+ for (p = pattern; *p; p++) {
+ if (*p == '%') *p = '?';
+ }
+
+ if (!strcasecmp(namespace, "mailboxes")) {
+ if (backend_inbox || (backend_inbox = proxy_findinboxserver())) {
+ /* remote INBOX */
+ prot_printf(backend_inbox->out,
+ "%s Lsub \"\" {%d+}\r\n%s\r\n",
+ tag, strlen(pattern), pattern);
+ pipe_lsub(backend_inbox, tag, 0, "MAILBOX");
+ } else {
+ /* local INBOX */
+ int force = config_getswitch(IMAPOPT_ALLOWALLSUBSCRIBE);
+
+ /* Translate any separators in pattern */
+ mboxname_hiersep_tointernal(&imapd_namespace, pattern,
+ config_virtdomains ?
+ strcspn(pattern, "@") : 0);
+
+ (*imapd_namespace.mboxlist_findsub)(&imapd_namespace, pattern,
+ imapd_userisadmin, imapd_userid,
+ imapd_authstate, mailboxdata,
+ NULL, force);
+ }
+ }
+ else if (!strcasecmp(namespace, "all.mailboxes")) {
+ /* Translate any separators in pattern */
+ mboxname_hiersep_tointernal(&imapd_namespace, pattern,
+ config_virtdomains ?
+ strcspn(pattern, "@") : 0);
+
+ (*imapd_namespace.mboxlist_findall)(&imapd_namespace, pattern,
+ imapd_userisadmin, imapd_userid,
+ imapd_authstate, mailboxdata, NULL);
+ }
+ else if (!strcasecmp(namespace, "bboards")
+ || !strcasecmp(namespace, "all.bboards")) {
+ ;
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid FIND subcommand\r\n", tag);
+ return;
+ }
+
+ imapd_check(backend_inbox, 0, 0);
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+static int mstringdatacalls;
+
+/*
+ * Perform a LIST or LSUB command
+ */
+void cmd_list(char *tag, int listopts, char *reference, char *pattern)
+{
+ char *buf = NULL;
+ int patlen = 0;
+ int reflen = 0;
+ static int ignorereference = 0;
+ clock_t start = clock();
+ char mytime[100];
+ int (*findall)(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock);
+ int (*findsub)(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock, int force);
+
+ /* Ignore the reference argument?
+ (the behavior in 1.5.10 & older) */
+ if (ignorereference == 0) {
+ ignorereference = config_getswitch(IMAPOPT_IGNOREREFERENCE);
+ }
+
+ /* Reset state in mstringdata */
+ mstringdata(NULL, NULL, 0, 0, 0);
+
+ if (!pattern[0] && !(listopts & LIST_LSUB)) {
+ /* Special case: query top-level hierarchy separator */
+ prot_printf(imapd_out, "* LIST (\\Noselect) \"%c\" \"\"\r\n",
+ imapd_namespace.hier_sep);
+ } else if ((listopts & (LIST_LSUB | LIST_SUBSCRIBED)) &&
+ (backend_inbox || (backend_inbox = proxy_findinboxserver()))) {
+ /* remote INBOX */
+ if ((listopts & LIST_SUBSCRIBED) && (listopts & LIST_EXT) &&
+ CAPA(backend_inbox, CAPA_LISTSUBSCRIBED)) {
+ prot_printf(backend_inbox->out, "%s List (subscribed", tag);
+ if (listopts & LIST_CHILDREN)
+ prot_printf(backend_inbox->out, " children");
+ if (listopts & LIST_REMOTE)
+ prot_printf(backend_inbox->out, " remote");
+ prot_printf(backend_inbox->out, ") ");
+ } else {
+ prot_printf(backend_inbox->out, "%s Lsub ", tag);
+ }
+ prot_printf(backend_inbox->out,
+ "{%d+}\r\n%s {%d+}\r\n%s\r\n",
+ strlen(reference), reference,
+ strlen(pattern), pattern);
+ pipe_lsub(backend_inbox, tag, 0, (listopts & LIST_LSUB) ? "LSUB" : "LIST");
+ } else {
+ /* Do we need to concatenate fields? */
+ if (!ignorereference || pattern[0] == imapd_namespace.hier_sep) {
+ /* Either
+ * - name begins with dot
+ * - we're configured to honor the reference argument */
+
+ /* Allocate a buffer, figure out how to stick the arguments
+ together, do it, then do that instead of using pattern. */
+ patlen = strlen(pattern);
+ reflen = strlen(reference);
+
+ buf = xmalloc(patlen + reflen + 1);
+ buf[0] = '\0';
+
+ if (*reference) {
+ /* check for LIST A. .B, change to LIST "" A.B */
+ if (reference[reflen-1] == imapd_namespace.hier_sep &&
+ pattern[0] == imapd_namespace.hier_sep) {
+ reference[--reflen] = '\0';
+ }
+ strcpy(buf, reference);
+ }
+ strcat(buf, pattern);
+ pattern = buf;
+ }
+
+ /* Translate any separators in pattern */
+ mboxname_hiersep_tointernal(&imapd_namespace, pattern,
+ config_virtdomains ?
+ strcspn(pattern, "@") : 0);
+
+ /* Check to see if we should only list the personal namespace */
+ if (!strcmp(pattern, "*")
+ && config_getswitch(IMAPOPT_FOOLSTUPIDCLIENTS)) {
+ if (buf) free(buf);
+ buf = xstrdup("INBOX*");
+ pattern = buf;
+ findsub = mboxlist_findsub;
+ findall = mboxlist_findall;
+ }
+ else {
+ findsub = imapd_namespace.mboxlist_findsub;
+ findall = imapd_namespace.mboxlist_findall;
+ }
+
+ if (listopts & (LIST_LSUB | LIST_SUBSCRIBED)) {
+ int force = config_getswitch(IMAPOPT_ALLOWALLSUBSCRIBE);
+
+ (*findsub)(&imapd_namespace, pattern,
+ imapd_userisadmin, imapd_userid, imapd_authstate,
+ listdata, &listopts, force);
+ }
+ else {
+ (*findall)(&imapd_namespace, pattern,
+ imapd_userisadmin, imapd_userid, imapd_authstate,
+ listdata, &listopts);
+ }
+
+ listdata((char *)0, 0, 0, &listopts);
+
+ if (buf) free(buf);
+ }
+
+ imapd_check(!(listopts & (LIST_LSUB | LIST_SUBSCRIBED)) ?
+ backend_inbox : NULL, 0, 0);
+
+ snprintf(mytime, sizeof(mytime), "%2.3f",
+ (clock() - start) / (double) CLOCKS_PER_SEC);
+ prot_printf(imapd_out, "%s OK %s (%s secs %d calls)\r\n", tag,
+ error_message(IMAP_OK_COMPLETED), mytime, mstringdatacalls);
+}
+
+/*
+ * Perform a SUBSCRIBE (add is nonzero) or
+ * UNSUBSCRIBE (add is zero) command
+ */
+void cmd_changesub(char *tag, char *namespace, char *name, int add)
+{
+ const char *cmd = add ? "Subscribe" : "Unsubscribe";
+ int r = 0;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int force = config_getswitch(IMAPOPT_ALLOWALLSUBSCRIBE);
+
+ if (backend_inbox || (backend_inbox = proxy_findinboxserver())) {
+ /* remote INBOX */
+ if (add) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace,
+ name, imapd_userid,
+ mailboxname);
+ if (!r) r = mlookup(NULL, NULL, mailboxname,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+
+ /* Doesn't exist on murder */
+ }
+
+ imapd_check(backend_inbox, 0, 0);
+
+ if (!r) {
+ if (namespace) {
+ prot_printf(backend_inbox->out,
+ "%s %s {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag, cmd,
+ strlen(namespace), namespace,
+ strlen(name), name);
+ } else {
+ prot_printf(backend_inbox->out, "%s %s {%d+}\r\n%s\r\n",
+ tag, cmd,
+ strlen(name), name);
+ }
+ if (backend_inbox != backend_current)
+ pipe_including_tag(backend_inbox, tag, 0);
+ }
+ else {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+
+ return;
+ }
+
+ /* local INBOX */
+ if (namespace) lcase(namespace);
+ if (!namespace || !strcmp(namespace, "mailbox")) {
+ int len = strlen(name);
+ if (force && imapd_namespace.isalt &&
+ (((len == strlen(imapd_namespace.prefix[NAMESPACE_USER]) - 1) &&
+ !strncmp(name, imapd_namespace.prefix[NAMESPACE_USER], len)) ||
+ ((len == strlen(imapd_namespace.prefix[NAMESPACE_SHARED]) - 1) &&
+ !strncmp(name, imapd_namespace.prefix[NAMESPACE_SHARED], len)))) {
+ r = 0;
+ }
+ else {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ if (!r) {
+ r = mboxlist_changesub(mailboxname, imapd_userid,
+ imapd_authstate, add, force);
+ }
+ }
+ }
+ else if (!strcmp(namespace, "bboard")) {
+ r = add ? IMAP_MAILBOX_NONEXISTENT : 0;
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid %s subcommand\r\n", tag, cmd);
+ return;
+ }
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s: %s\r\n", tag, cmd, error_message(r));
+ }
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ sync_log_subscribe(imapd_userid, mailboxname, add);
+ }
+}
+
+/*
+ * Perform a GETACL command
+ */
+void cmd_getacl(const char *tag, const char *name)
+{
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int r, access;
+ char *acl;
+ char *rights, *nextid;
+ char str[ACL_MAXSTR];
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, NULL, NULL, NULL, NULL, &acl, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if (!r) {
+ access = cyrus_acl_myrights(imapd_authstate, acl);
+
+ if (!(access & ACL_ADMIN) &&
+ !imapd_userisadmin &&
+ !mboxname_userownsmailbox(imapd_userid, mailboxname)) {
+ r = (access&ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ }
+ }
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ return;
+ }
+
+ prot_printf(imapd_out, "* ACL ");
+ printastring(name);
+
+ while (acl) {
+ rights = strchr(acl, '\t');
+ if (!rights) break;
+ *rights++ = '\0';
+
+ nextid = strchr(rights, '\t');
+ if (!nextid) break;
+ *nextid++ = '\0';
+
+ prot_printf(imapd_out, " ");
+ printastring(acl);
+ prot_printf(imapd_out, " ");
+ rights = cyrus_acl_masktostr(cyrus_acl_strtomask(rights), str, 1);
+ printastring(rights);
+ acl = nextid;
+ }
+ prot_printf(imapd_out, "\r\n");
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+/*
+ * Perform a LISTRIGHTS command
+ */
+void
+cmd_listrights(tag, name, identifier)
+char *tag;
+char *name;
+char *identifier;
+{
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int r, rights;
+ char *acl;
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, NULL, NULL, NULL, NULL, &acl, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if (!r) {
+ rights = cyrus_acl_myrights(imapd_authstate, acl);
+
+ if (!rights && !imapd_userisadmin &&
+ !mboxname_userownsmailbox(imapd_userid, mailboxname)) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ }
+ }
+
+ imapd_check(NULL, 0, 0);
+
+ if (!r) {
+ struct auth_state *authstate = auth_newstate(identifier);
+ char *canon_identifier;
+ int canonidlen = 0;
+ int implicit;
+ char rightsdesc[100], optional[33];
+
+ if (global_authisa(authstate, IMAPOPT_ADMINS))
+ canon_identifier = identifier; /* don't canonify global admins */
+ else
+ canon_identifier = canonify_userid(identifier, imapd_userid, NULL);
+ auth_freestate(authstate);
+
+ if (canon_identifier) canonidlen = strlen(canon_identifier);
+
+ if (!canon_identifier) {
+ implicit = 0;
+ }
+ else if (mboxname_userownsmailbox(canon_identifier, mailboxname)) {
+ /* identifier's personal mailbox */
+ implicit = config_implicitrights;
+ }
+ else if (mboxname_isusermailbox(mailboxname, 1)) {
+ /* anyone can post to an INBOX */
+ implicit = ACL_POST;
+ }
+ else {
+ implicit = 0;
+ }
+
+ /* calculate optional rights */
+ cyrus_acl_masktostr(implicit ^ (canon_identifier ? ACL_FULL : 0),
+ optional, 1);
+
+ /* build the rights string */
+ if (implicit) {
+ cyrus_acl_masktostr(implicit, rightsdesc, 1);
+ }
+ else {
+ strcpy(rightsdesc, "\"\"");
+ }
+
+ if (*optional) {
+ int i, n = strlen(optional);
+ char *p = rightsdesc + strlen(rightsdesc);
+
+ for (i = 0; i < n; i++) {
+ *p++ = ' ';
+ *p++ = optional[i];
+ }
+ *p = '\0';
+ }
+
+ prot_printf(imapd_out, "* LISTRIGHTS ");
+ printastring(name);
+ prot_putc(' ', imapd_out);
+ printastring(identifier);
+ prot_printf(imapd_out, " %s", rightsdesc);
+
+ prot_printf(imapd_out, "\r\n%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ return;
+ }
+
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+}
+
+/*
+ * Perform a MYRIGHTS command
+ */
+void cmd_myrights(const char *tag, const char *name)
+{
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int r, rights = 0;
+ char *acl;
+ char str[ACL_MAXSTR];
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, NULL, NULL, NULL, NULL, &acl, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if (!r) {
+ rights = cyrus_acl_myrights(imapd_authstate, acl);
+
+ /* Add in implicit rights */
+ if (imapd_userisadmin) {
+ rights |= ACL_LOOKUP|ACL_ADMIN;
+ }
+ else if (mboxname_userownsmailbox(imapd_userid, mailboxname)) {
+ rights |= config_implicitrights;
+ }
+
+ if (!(rights & (ACL_LOOKUP|ACL_READ|ACL_INSERT|ACL_CREATE|ACL_DELETEMBOX|ACL_ADMIN))) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ }
+ }
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ return;
+ }
+
+ prot_printf(imapd_out, "* MYRIGHTS ");
+ printastring(name);
+ prot_printf(imapd_out, " ");
+ printastring(cyrus_acl_masktostr(rights, str, 1));
+ prot_printf(imapd_out, "\r\n%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+/*
+ * Perform a SETACL command
+ */
+void cmd_setacl(char *tag, const char *name,
+ const char *identifier, const char *rights)
+{
+ int r;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ char *server;
+ int mbtype;
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+
+ /* is it remote? */
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, &mbtype, NULL, NULL,
+ &server, NULL, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ struct backend *s = NULL;
+ int res;
+
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) r = IMAP_SERVER_UNAVAILABLE;
+
+ if (!r && imapd_userisadmin && supports_referrals) {
+ /* They aren't an admin remotely, so let's refer them */
+ imapd_refer(tag, server, name);
+ referral_kick = 1;
+ return;
+ } else if (!r) {
+ if (rights) {
+ prot_printf(s->out,
+ "%s Setacl {%d+}\r\n%s {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag, strlen(name), name,
+ strlen(identifier), identifier,
+ strlen(rights), rights);
+ } else {
+ prot_printf(s->out,
+ "%s Deleteacl {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag, strlen(name), name,
+ strlen(identifier), identifier);
+ }
+ res = pipe_until_tag(s, tag, 0);
+
+ if (!CAPA(s, CAPA_MUPDATE) && res == PROXY_OK) {
+ /* setup new ACL in MUPDATE */
+ }
+ /* make sure we've seen the update */
+ if (ultraparanoid && res == PROXY_OK) kick_mupdate();
+ }
+
+ imapd_check(s, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ /* we're allowed to reference last_result since the noop, if
+ sent, went to a different server */
+ prot_printf(imapd_out, "%s %s", tag, s->last_result.s);
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ r = mboxlist_setacl(mailboxname, identifier, rights,
+ imapd_userisadmin, imapd_userid, imapd_authstate);
+ }
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ if (config_mupdate_server &&
+ (config_mupdate_config != IMAP_ENUM_MUPDATE_CONFIG_STANDARD)) {
+ kick_mupdate();
+ }
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ sync_log_acl(mailboxname);
+ }
+}
+
+/*
+ * Callback for (get|set)quota, to ensure that all of the
+ * submailboxes are on the same server.
+ */
+static int quota_cb(char *name, int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)), void *rock)
+{
+ int r;
+ char *this_server;
+ const char *servername = (const char *)rock;
+
+ r = mlookup(NULL, NULL, name, NULL, NULL, NULL, &this_server, NULL, NULL);
+ if(r) return r;
+
+ if(strcmp(servername, this_server)) {
+ /* Not on same server as the root */
+ return IMAP_NOT_SINGULAR_ROOT;
+ } else {
+ return PROXY_OK;
+ }
+}
+
+/*
+ * Perform a GETQUOTA command
+ */
+void cmd_getquota(const char *tag, const char *name)
+{
+ int r;
+ struct quota quota;
+ char quotarootbuf[MAX_MAILBOX_PATH+3];
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int mbtype;
+ char *server_rock = NULL, *server_rock_tmp = NULL;
+
+ imapd_check(NULL, 0, 0);
+
+ if (!imapd_userisadmin) r = IMAP_PERMISSION_DENIED;
+ else {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ }
+
+ if (!r) {
+ r = mlookup(NULL, NULL, mailboxname, &mbtype, NULL, NULL,
+ &server_rock_tmp, NULL, NULL);
+ }
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ server_rock = xstrdup(server_rock_tmp);
+
+ snprintf(quotarootbuf, sizeof(quotarootbuf), "%s.*", mailboxname);
+
+ r = mboxlist_findall(&imapd_namespace, quotarootbuf,
+ imapd_userisadmin, imapd_userid,
+ imapd_authstate, quota_cb, server_rock);
+
+ if (!r) {
+ /* Do the referral */
+ imapd_refer(tag, server_rock, name);
+ free(server_rock);
+ } else {
+ if(server_rock) free(server_rock);
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ quota.root = mailboxname;
+ r = quota_read("a, NULL, 0);
+ }
+
+ if (!r) {
+ prot_printf(imapd_out, "* QUOTA ");
+ printastring(name);
+ prot_printf(imapd_out, " (");
+ if (quota.limit >= 0) {
+ prot_printf(imapd_out, "STORAGE " UQUOTA_T_FMT " %d",
+ quota.used/QUOTA_UNITS, quota.limit);
+ }
+ prot_printf(imapd_out, ")\r\n");
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ return;
+ }
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+/*
+ * Perform a GETQUOTAROOT command
+ */
+void cmd_getquotaroot(const char *tag, const char *name)
+{
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ char *server;
+ int mbtype;
+ struct mailbox mailbox;
+ int r;
+ int doclose = 0;
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, &mbtype, NULL, NULL,
+ &server, NULL, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+
+ if (imapd_userisadmin) {
+ /* If they are an admin, they won't retain that privledge if we
+ * proxy for them, so we need to refer them -- even if they haven't
+ * told us they're able to handle it. */
+ imapd_refer(tag, server, name);
+ } else {
+ struct backend *s;
+
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) r = IMAP_SERVER_UNAVAILABLE;
+
+ imapd_check(s, 0, 0);
+
+ if (!r) {
+ prot_printf(s->out, "%s Getquotaroot {%d+}\r\n%s\r\n",
+ tag, strlen(name), name);
+ if (s != backend_current) pipe_including_tag(s, tag, 0);
+ } else {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ r = mailbox_open_header(mailboxname, imapd_authstate, &mailbox);
+ }
+
+ if (!r) {
+ doclose = 1;
+ if (!imapd_userisadmin && !(mailbox.myrights & ACL_READ)) {
+ r = (mailbox.myrights & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ }
+ }
+
+ if (!r) {
+ prot_printf(imapd_out, "* QUOTAROOT ");
+ printastring(name);
+ if (mailbox.quota.root) {
+ (*imapd_namespace.mboxname_toexternal)(&imapd_namespace,
+ mailbox.quota.root,
+ imapd_userid, mailboxname);
+ prot_printf(imapd_out, " ");
+ printastring(mailboxname);
+ r = quota_read(&mailbox.quota, NULL, 0);
+ if (!r) {
+ prot_printf(imapd_out, "\r\n* QUOTA ");
+ printastring(mailboxname);
+ prot_printf(imapd_out, " (");
+ if (mailbox.quota.limit >= 0) {
+ prot_printf(imapd_out, "STORAGE " UQUOTA_T_FMT " %d",
+ mailbox.quota.used/QUOTA_UNITS,
+ mailbox.quota.limit);
+ }
+ prot_putc(')', imapd_out);
+ }
+ }
+ prot_printf(imapd_out, "\r\n");
+ }
+
+ if (doclose) mailbox_close(&mailbox);
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ return;
+ }
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+/*
+ * Parse and perform a SETQUOTA command
+ * The command has been parsed up to the resource list
+ */
+void cmd_setquota(const char *tag, const char *quotaroot)
+{
+ int newquota = -1;
+ int badresource = 0;
+ int c;
+ int force = 0;
+ static struct buf arg;
+ char *p;
+ int r;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int mbtype;
+ char *server_rock_tmp = NULL;
+
+ c = prot_getc(imapd_in);
+ if (c != '(') goto badlist;
+
+ c = getword(imapd_in, &arg);
+ if (c != ')' || arg.s[0] != '\0') {
+ for (;;) {
+ if (c != ' ') goto badlist;
+ if (strcasecmp(arg.s, "storage") != 0) badresource = 1;
+ c = getword(imapd_in, &arg);
+ if (c != ' ' && c != ')') goto badlist;
+ if (arg.s[0] == '\0') goto badlist;
+ newquota = 0;
+ for (p = arg.s; *p; p++) {
+ if (!isdigit((int) *p)) goto badlist;
+ newquota = newquota * 10 + *p - '0';
+ if (newquota < 0) goto badlist; /* overflow */
+ }
+ if (c == ')') break;
+ }
+ }
+ c = prot_getc(imapd_in);
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out, "%s BAD Unexpected extra arguments to SETQUOTA\r\n", tag);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ if (badresource) r = IMAP_UNSUPPORTED_QUOTA;
+ else if (!imapd_userisadmin && !imapd_userisproxyadmin) {
+ /* need to allow proxies so that mailbox moves can set initial quota
+ * roots */
+ r = IMAP_PERMISSION_DENIED;
+ } else {
+ /* are we forcing the creation of a quotaroot by having a leading +? */
+ if (quotaroot[0] == '+') {
+ force = 1;
+ quotaroot++;
+ }
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, quotaroot,
+ imapd_userid, mailboxname);
+ }
+
+ if (!r) {
+ r = mlookup(NULL, NULL, mailboxname, &mbtype, NULL, NULL,
+ &server_rock_tmp, NULL, NULL);
+ }
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ char quotarootbuf[MAX_MAILBOX_NAME + 3];
+ char *server_rock = xstrdup(server_rock_tmp);
+
+ snprintf(quotarootbuf, sizeof(quotarootbuf), "%s.*", mailboxname);
+
+ r = mboxlist_findall(&imapd_namespace, quotarootbuf,
+ imapd_userisadmin, imapd_userid,
+ imapd_authstate, quota_cb, server_rock);
+
+ imapd_check(NULL, 0, 0);
+
+ if (!r) {
+ /* Do the referral */
+ imapd_refer(tag, server_rock, quotaroot);
+ free(server_rock);
+ } else {
+ if (server_rock) free(server_rock);
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+ if (!r || (r == IMAP_MAILBOX_NONEXISTENT)) {
+ r = mboxlist_setquota(mailboxname, newquota, force);
+ }
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ return;
+ }
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ sync_log_quota(mailboxname);
+ return;
+
+ badlist:
+ prot_printf(imapd_out, "%s BAD Invalid quota list in Setquota\r\n", tag);
+ eatline(imapd_in, c);
+}
+
+#ifdef HAVE_SSL
+/*
+ * this implements the STARTTLS command, as described in RFC 2595.
+ * one caveat: it assumes that no external layer is currently present.
+ * if a client executes this command, information about the external
+ * layer that was passed on the command line is disgarded. this should
+ * be fixed.
+ */
+/* imaps - whether this is an imaps transaction or not */
+void cmd_starttls(char *tag, int imaps)
+{
+ int result;
+ int *layerp;
+
+ char *auth_id;
+ sasl_ssf_t ssf;
+
+ /* SASL and openssl have different ideas about whether ssf is signed */
+ layerp = (int *) &ssf;
+
+ if (imapd_starttls_done == 1)
+ {
+ prot_printf(imapd_out, "%s NO TLS already active\r\n", tag);
+ return;
+ }
+
+ result=tls_init_serverengine("imap",
+ 5, /* depth to verify */
+ !imaps, /* can client auth? */
+ !imaps); /* TLS only? */
+
+ if (result == -1) {
+
+ syslog(LOG_ERR, "error initializing TLS");
+
+ if (imaps == 0) {
+ prot_printf(imapd_out, "%s NO Error initializing TLS\r\n", tag);
+ } else {
+ fatal("tls_init() failed", EC_CONFIG);
+ }
+
+ return;
+ }
+
+ if (imaps == 0)
+ {
+ prot_printf(imapd_out, "%s OK Begin TLS negotiation now\r\n", tag);
+ /* must flush our buffers before starting tls */
+ prot_flush(imapd_out);
+ }
+
+ result=tls_start_servertls(0, /* read */
+ 1, /* write */
+ layerp,
+ &auth_id,
+ &tls_conn);
+
+ /* if error */
+ if (result==-1) {
+ if (imaps == 0) {
+ prot_printf(imapd_out, "%s NO Starttls negotiation failed\r\n",
+ tag);
+ syslog(LOG_NOTICE, "STARTTLS negotiation failed: %s",
+ imapd_clienthost);
+ return;
+ } else {
+ syslog(LOG_NOTICE, "imaps TLS negotiation failed: %s",
+ imapd_clienthost);
+ fatal("tls_start_servertls() failed", EC_TEMPFAIL);
+ return;
+ }
+ }
+
+ /* tell SASL about the negotiated layer */
+ result = sasl_setprop(imapd_saslconn, SASL_SSF_EXTERNAL, &ssf);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ saslprops.ssf = ssf;
+
+ result = sasl_setprop(imapd_saslconn, SASL_AUTH_EXTERNAL, auth_id);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ if(auth_id)
+ saslprops.authid = xstrdup(auth_id);
+
+ /* tell the prot layer about our new layers */
+ prot_settls(imapd_in, tls_conn);
+ prot_settls(imapd_out, tls_conn);
+
+ imapd_starttls_done = 1;
+}
+#else
+void cmd_starttls(char *tag, int imaps)
+{
+ fatal("cmd_starttls() executed, but starttls isn't implemented!",
+ EC_SOFTWARE);
+}
+#endif /* HAVE_SSL */
+
+/*
+ * Parse and perform a STATUS command
+ * The command has been parsed up to the attribute list
+ */
+void cmd_status(char *tag, char *name)
+{
+ int c;
+ int statusitems = 0;
+ static struct buf arg;
+ struct mailbox mailbox;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int mbtype;
+ char *server;
+ int r = 0;
+ int doclose = 0;
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, &mbtype, NULL, NULL,
+ &server, NULL, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) {
+ /* Eat the argument */
+ eatline(imapd_in, prot_getc(imapd_in));
+ return;
+ }
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+
+ if (supports_referrals
+ && config_getswitch(IMAPOPT_PROXYD_ALLOW_STATUS_REFERRAL)) {
+ imapd_refer(tag, server, name);
+ /* Eat the argument */
+ eatline(imapd_in, prot_getc(imapd_in));
+ }
+ else {
+ struct backend *s;
+
+ s = proxy_findserver(server, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!s) r = IMAP_SERVER_UNAVAILABLE;
+
+ imapd_check(s, 0, 0);
+
+ if (!r) {
+ prot_printf(s->out, "%s Status {%d+}\r\n%s ", tag,
+ strlen(name), name);
+ if (!pipe_command(s, 65536)) {
+ if (s != backend_current) pipe_including_tag(s, tag, 0);
+ }
+ } else {
+ eatline(imapd_in, prot_getc(imapd_in));
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ }
+
+ return;
+ }
+
+ /* local mailbox */
+
+ /*
+ * Perform a full checkpoint of any open mailbox, in case we're
+ * doing a STATUS check of the current mailbox.
+ */
+ imapd_check(NULL, 0, 1);
+
+ c = prot_getc(imapd_in);
+ if (c != '(') goto badlist;
+
+ c = getword(imapd_in, &arg);
+ if (arg.s[0] == '\0') goto badlist;
+ for (;;) {
+ lcase(arg.s);
+ if (!strcmp(arg.s, "messages")) {
+ statusitems |= STATUS_MESSAGES;
+ }
+ else if (!strcmp(arg.s, "recent")) {
+ statusitems |= STATUS_RECENT;
+ }
+ else if (!strcmp(arg.s, "uidnext")) {
+ statusitems |= STATUS_UIDNEXT;
+ }
+ else if (!strcmp(arg.s, "uidvalidity")) {
+ statusitems |= STATUS_UIDVALIDITY;
+ }
+ else if (!strcmp(arg.s, "unseen")) {
+ statusitems |= STATUS_UNSEEN;
+ }
+ else if (!strcmp(arg.s, "highestmodseq")) {
+ statusitems |= STATUS_HIGHESTMODSEQ;
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid Status attribute %s\r\n",
+ tag, arg.s);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ if (c == ' ') c = getword(imapd_in, &arg);
+ else break;
+ }
+
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close parenthesis in Status\r\n", tag);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ c = prot_getc(imapd_in);
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to Status\r\n", tag);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ if (!r) {
+ r = mailbox_open_header(mailboxname, imapd_authstate, &mailbox);
+ }
+
+ if (!r) {
+ doclose = 1;
+ r = mailbox_open_index(&mailbox);
+ }
+ if (!r && !(mailbox.myrights & ACL_READ)) {
+ r = (imapd_userisadmin || (mailbox.myrights & ACL_LOOKUP)) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ }
+
+ if (!r) {
+ r = index_status(&mailbox, name, statusitems);
+ }
+
+ if (doclose) mailbox_close(&mailbox);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ return;
+ }
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ return;
+
+ badlist:
+ prot_printf(imapd_out, "%s BAD Invalid status list in Status\r\n", tag);
+ eatline(imapd_in, c);
+}
+
+#ifdef ENABLE_X_NETSCAPE_HACK
+/*
+ * Reply to Netscape's crock with a crock of my own
+ */
+void cmd_netscrape(char *tag)
+{
+ const char *url;
+
+ url = config_getstring(IMAPOPT_NETSCAPEURL);
+
+ /* I only know of three things to reply with: */
+ prot_printf(imapd_out,
+ "* OK [NETSCAPE] Carnegie Mellon Cyrus IMAP\r\n"
+ "* VERSION %s\r\n",
+ CYRUS_VERSION);
+ if (url) prot_printf(imapd_out, "* ACCOUNT-URL %s\r\n", url);
+ prot_printf(imapd_out, "%s OK %s\r\n",
+ tag, error_message(IMAP_OK_COMPLETED));
+}
+#endif /* ENABLE_X_NETSCAPE_HACK */
+
+/* Callback for cmd_namespace to be passed to mboxlist_findall.
+ * For each top-level mailbox found, print a bit of the response
+ * if it is a shared namespace. The rock is used as an integer in
+ * order to ensure the namespace response is correct on a server with
+ * no shared namespace.
+ */
+static int namespacedata(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ int* sawone = (int*) rock;
+
+ if (!name) {
+ return 0;
+ }
+
+ if ((!strncasecmp(name, "INBOX", 5) && (!name[5] || name[5] == '.'))) {
+ /* The user has a "personal" namespace. */
+ sawone[NAMESPACE_INBOX] = 1;
+ } else if (mboxname_isusermailbox(name, 0)) {
+ /* The user can see the "other users" namespace. */
+ sawone[NAMESPACE_USER] = 1;
+ } else {
+ /* The user can see the "shared" namespace. */
+ sawone[NAMESPACE_SHARED] = 1;
+ }
+
+ return 0;
+}
+
+/*
+ * Print out a response to the NAMESPACE command defined by
+ * RFC 2342.
+ */
+void cmd_namespace(tag)
+ char* tag;
+{
+ int sawone[3] = {0, 0, 0};
+ char* pattern;
+
+ if (SLEEZY_NAMESPACE) {
+ char inboxname[MAX_MAILBOX_NAME+1];
+
+ if (strlen(imapd_userid) + 5 > MAX_MAILBOX_NAME)
+ sawone[NAMESPACE_INBOX] = 0;
+ else {
+ (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, "INBOX",
+ imapd_userid, inboxname);
+ sawone[NAMESPACE_INBOX] =
+ !mboxlist_lookup(inboxname, NULL, NULL);
+ }
+ sawone[NAMESPACE_USER] = 1;
+ sawone[NAMESPACE_SHARED] = 1;
+ } else {
+ pattern = xstrdup("%");
+ /* now find all the exciting toplevel namespaces -
+ * we're using internal names here
+ */
+ mboxlist_findall(NULL, pattern, imapd_userisadmin, imapd_userid,
+ imapd_authstate, namespacedata, (void*) sawone);
+ free(pattern);
+ }
+
+ prot_printf(imapd_out, "* NAMESPACE");
+ if (sawone[NAMESPACE_INBOX]) {
+ prot_printf(imapd_out, " ((\"%s\" \"%c\"))",
+ imapd_namespace.prefix[NAMESPACE_INBOX],
+ imapd_namespace.hier_sep);
+ } else {
+ prot_printf(imapd_out, " NIL");
+ }
+ if (sawone[NAMESPACE_USER]) {
+ prot_printf(imapd_out, " ((\"%s\" \"%c\"))",
+ imapd_namespace.prefix[NAMESPACE_USER],
+ imapd_namespace.hier_sep);
+ } else {
+ prot_printf(imapd_out, " NIL");
+ }
+ if (sawone[NAMESPACE_SHARED]) {
+ prot_printf(imapd_out, " ((\"%s\" \"%c\"))",
+ imapd_namespace.prefix[NAMESPACE_SHARED],
+ imapd_namespace.hier_sep);
+ } else {
+ prot_printf(imapd_out, " NIL");
+ }
+ prot_printf(imapd_out, "\r\n");
+
+ imapd_check(NULL, 0, 0);
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+}
+
+/*
+ * Parse annotate fetch data.
+ *
+ * This is a generic routine which parses just the annotation data.
+ * Any surrounding command text must be parsed elsewhere, ie,
+ * GETANNOTATION, FETCH.
+ */
+
+int getannotatefetchdata(char *tag,
+ struct strlist **entries, struct strlist **attribs)
+{
+ int c;
+ static struct buf arg;
+
+ *entries = *attribs = NULL;
+
+ c = prot_getc(imapd_in);
+ if (c == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation entry\r\n", tag);
+ goto baddata;
+ }
+ else if (c == '(') {
+ /* entry list */
+ do {
+ c = getqstring(imapd_in, imapd_out, &arg);
+ if (c == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation entry\r\n", tag);
+ goto baddata;
+ }
+
+ /* add the entry to the list */
+ appendstrlist(entries, arg.s);
+
+ } while (c == ' ');
+
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close paren in annotation entry list \r\n",
+ tag);
+ goto baddata;
+ }
+
+ c = prot_getc(imapd_in);
+ }
+ else {
+ /* single entry -- add it to the list */
+ prot_ungetc(c, imapd_in);
+ c = getqstring(imapd_in, imapd_out, &arg);
+ if (c == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation entry\r\n", tag);
+ goto baddata;
+ }
+
+ appendstrlist(entries, arg.s);
+ }
+
+ if (c != ' ' || (c = prot_getc(imapd_in)) == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation attribute(s)\r\n", tag);
+ goto baddata;
+ }
+
+ if (c == '(') {
+ /* attrib list */
+ do {
+ c = getnstring(imapd_in, imapd_out, &arg);
+ if (c == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation attribute(s)\r\n", tag);
+ goto baddata;
+ }
+
+ /* add the attrib to the list */
+ appendstrlist(attribs, arg.s);
+
+ } while (c == ' ');
+
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close paren in "
+ "annotation attribute list\r\n", tag);
+ goto baddata;
+ }
+
+ c = prot_getc(imapd_in);
+ }
+ else {
+ /* single attrib */
+ prot_ungetc(c, imapd_in);
+ c = getqstring(imapd_in, imapd_out, &arg);
+ if (c == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation attribute\r\n", tag);
+ goto baddata;
+ }
+
+ appendstrlist(attribs, arg.s);
+ }
+
+ return c;
+
+ baddata:
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+}
+
+/*
+ * Parse annotate store data.
+ *
+ * This is a generic routine which parses just the annotation data.
+ * Any surrounding command text must be parsed elsewhere, ie,
+ * SETANNOTATION, STORE, APPEND.
+ */
+
+int getannotatestoredata(char *tag, struct entryattlist **entryatts)
+{
+ int c, islist = 0;
+ static struct buf entry, attrib, value;
+ struct attvaluelist *attvalues = NULL;
+
+ *entryatts = NULL;
+
+ c = prot_getc(imapd_in);
+ if (c == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation entry\r\n", tag);
+ goto baddata;
+ }
+ else if (c == '(') {
+ /* entry list */
+ islist = 1;
+ }
+ else {
+ /* single entry -- put the char back */
+ prot_ungetc(c, imapd_in);
+ }
+
+ do {
+ /* get entry */
+ c = getqstring(imapd_in, imapd_out, &entry);
+ if (c == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation entry\r\n", tag);
+ goto baddata;
+ }
+
+ /* parse att-value list */
+ if (c != ' ' || (c = prot_getc(imapd_in)) != '(') {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation attribute-values list\r\n",
+ tag);
+ goto baddata;
+ }
+
+ do {
+ /* get attrib */
+ c = getqstring(imapd_in, imapd_out, &attrib);
+ if (c == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation attribute\r\n", tag);
+ goto baddata;
+ }
+
+ /* get value */
+ if (c != ' ' ||
+ (c = getnstring(imapd_in, imapd_out, &value)) == EOF) {
+ prot_printf(imapd_out,
+ "%s BAD Missing annotation value\r\n", tag);
+ goto baddata;
+ }
+
+ /* add the attrib-value pair to the list */
+ appendattvalue(&attvalues, attrib.s, value.s);
+
+ } while (c == ' ');
+
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close paren in annotation "
+ "attribute-values list\r\n", tag);
+ goto baddata;
+ }
+
+ /* add the entry to the list */
+ appendentryatt(entryatts, entry.s, attvalues);
+ attvalues = NULL;
+
+ c = prot_getc(imapd_in);
+
+ } while (c == ' ');
+
+ if (islist) {
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close paren in annotation entry list \r\n",
+ tag);
+ goto baddata;
+ }
+
+ c = prot_getc(imapd_in);
+ }
+
+ return c;
+
+ baddata:
+ if (attvalues) freeattvalues(attvalues);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+}
+
+/*
+ * Output an entry/attribute-value list response.
+ *
+ * This is a generic routine which outputs just the annotation data.
+ * Any surrounding response text must be output elsewhere, ie,
+ * GETANNOTATION, FETCH.
+ */
+void annotate_response(struct entryattlist *l)
+{
+ int islist; /* do we have more than one entry? */
+
+ if (!l) return;
+
+ islist = (l->next != NULL);
+
+ if (islist) prot_printf(imapd_out, "(");
+
+ while (l) {
+ prot_printf(imapd_out, "\"%s\"", l->entry);
+
+ /* do we have attributes? solicited vs. unsolicited */
+ if (l->attvalues) {
+ struct attvaluelist *av = l->attvalues;
+
+ prot_printf(imapd_out, " (");
+ while (av) {
+ prot_printf(imapd_out, "\"%s\" ", av->attrib);
+ if (!strcasecmp(av->value, "NIL"))
+ prot_printf(imapd_out, "NIL");
+ else
+ prot_printf(imapd_out, "\"%s\"", av->value);
+
+ if ((av = av->next) == NULL)
+ prot_printf(imapd_out, ")");
+ else
+ prot_printf(imapd_out, " ");
+ }
+ }
+
+ if ((l = l->next) != NULL)
+ prot_printf(imapd_out, " ");
+ }
+
+ if (islist) prot_printf(imapd_out, ")");
+}
+
+/*
+ * Perform a GETANNOTATION command
+ *
+ * The command has been parsed up to the entries
+ */
+void cmd_getannotation(char *tag, char *mboxpat)
+{
+ int c, r = 0;
+ struct strlist *entries = NULL, *attribs = NULL;
+
+ c = getannotatefetchdata(tag, &entries, &attribs);
+ if (c == EOF) {
+ eatline(imapd_in, c);
+ return;
+ }
+
+ /* check for CRLF */
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to Getannotation\r\n",
+ tag);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+
+ r = annotatemore_fetch(mboxpat, entries, attribs, &imapd_namespace,
+ imapd_userisadmin || imapd_userisproxyadmin,
+ imapd_userid, imapd_authstate, imapd_out);
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n",
+ tag, error_message(IMAP_OK_COMPLETED));
+ }
+
+ freeargs:
+ if (entries) freestrlist(entries);
+ if (attribs) freestrlist(attribs);
+
+ return;
+}
+
+/*
+ * Perform a SETANNOTATION command
+ *
+ * The command has been parsed up to the entry-att list
+ */
+void cmd_setannotation(char *tag, char *mboxpat)
+{
+ int c, r = 0;
+ struct entryattlist *entryatts = NULL;
+
+ c = getannotatestoredata(tag, &entryatts);
+ if (c == EOF) {
+ eatline(imapd_in, c);
+ return;
+ }
+
+ /* check for CRLF */
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to Setannotation\r\n",
+ tag);
+ eatline(imapd_in, c);
+ goto freeargs;
+ }
+
+ r = annotatemore_store(mboxpat,
+ entryatts, &imapd_namespace, imapd_userisadmin,
+ imapd_userid, imapd_authstate);
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+
+ freeargs:
+ if (entryatts) freeentryatts(entryatts);
+ return;
+}
+
+/*
+ * Parse a search program
+ */
+int getsearchprogram(tag, searchargs, charset, parsecharset)
+char *tag;
+struct searchargs *searchargs;
+int *charset;
+int parsecharset;
+{
+ int c;
+
+ do {
+ c = getsearchcriteria(tag, searchargs, charset, parsecharset);
+ parsecharset = 0;
+ } while (c == ' ');
+ return c;
+}
+
+/*
+ * Parse a search criteria
+ */
+int getsearchcriteria(tag, searchargs, charset, parsecharset)
+char *tag;
+struct searchargs *searchargs;
+int *charset;
+int parsecharset;
+{
+ static struct buf criteria, arg;
+ struct searchargs *sub1, *sub2;
+ char *p, *str;
+ int c, flag;
+ unsigned size;
+ time_t start, end;
+
+ c = getword(imapd_in, &criteria);
+ lcase(criteria.s);
+ switch (criteria.s[0]) {
+ case '\0':
+ if (c != '(') goto badcri;
+ c = getsearchprogram(tag, searchargs, charset, 0);
+ if (c == EOF) return EOF;
+ if (c != ')') {
+ prot_printf(imapd_out, "%s BAD Missing required close paren in Search command\r\n",
+ tag);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+ }
+ c = prot_getc(imapd_in);
+ break;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case '*':
+ if (imparse_issequence(criteria.s)) {
+ appendstrlist(&searchargs->sequence, criteria.s);
+ }
+ else goto badcri;
+ break;
+
+ case 'a':
+ if (!strcmp(criteria.s, "answered")) {
+ searchargs->system_flags_set |= FLAG_ANSWERED;
+ }
+ else if (!strcmp(criteria.s, "all")) {
+ break;
+ }
+ else goto badcri;
+ break;
+
+ case 'b':
+ if (!strcmp(criteria.s, "before")) {
+ if (c != ' ') goto missingarg;
+ c = getsearchdate(&start, &end);
+ if (c == EOF) goto baddate;
+ if (!searchargs->before || searchargs->before > start) {
+ searchargs->before = start;
+ }
+ }
+ else if (!strcmp(criteria.s, "bcc")) {
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c == EOF) goto missingarg;
+ str = charset_convert(arg.s, *charset, NULL, 0);
+ if (strchr(str, EMPTY)) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ }
+ else {
+ appendstrlistpat(&searchargs->bcc, str);
+ }
+ }
+ else if (!strcmp(criteria.s, "body")) {
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c == EOF) goto missingarg;
+ str = charset_convert(arg.s, *charset, NULL, 0);
+ if (strchr(str, EMPTY)) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ }
+ else {
+ appendstrlistpat(&searchargs->body, str);
+ }
+ }
+ else goto badcri;
+ break;
+
+ case 'c':
+ if (!strcmp(criteria.s, "cc")) {
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c == EOF) goto missingarg;
+ str = charset_convert(arg.s, *charset, NULL, 0);
+ if (strchr(str, EMPTY)) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ }
+ else {
+ appendstrlistpat(&searchargs->cc, str);
+ }
+ }
+ else if (parsecharset && !strcmp(criteria.s, "charset")) {
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c != ' ') goto missingarg;
+ lcase(arg.s);
+ *charset = charset_lookupname(arg.s);
+ }
+ else goto badcri;
+ break;
+
+ case 'd':
+ if (!strcmp(criteria.s, "deleted")) {
+ searchargs->system_flags_set |= FLAG_DELETED;
+ }
+ else if (!strcmp(criteria.s, "draft")) {
+ searchargs->system_flags_set |= FLAG_DRAFT;
+ }
+ else goto badcri;
+ break;
+
+ case 'f':
+ if (!strcmp(criteria.s, "flagged")) {
+ searchargs->system_flags_set |= FLAG_FLAGGED;
+ }
+ else if (!strcmp(criteria.s, "from")) {
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c == EOF) goto missingarg;
+ str = charset_convert(arg.s, *charset, NULL, 0);
+ if (strchr(str, EMPTY)) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ }
+ else {
+ appendstrlistpat(&searchargs->from, str);
+ }
+ }
+ else goto badcri;
+ break;
+
+ case 'h':
+ if (!strcmp(criteria.s, "header")) {
+ struct strlist **patlist;
+
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c != ' ') goto missingarg;
+ lcase(arg.s);
+
+ /* some headers can be reduced to search terms */
+ if (!strcmp(arg.s, "bcc")) {
+ patlist = &searchargs->bcc;
+ }
+ else if (!strcmp(arg.s, "cc")) {
+ patlist = &searchargs->cc;
+ }
+ else if (!strcmp(arg.s, "to")) {
+ patlist = &searchargs->to;
+ }
+ else if (!strcmp(arg.s, "from")) {
+ patlist = &searchargs->from;
+ }
+ else if (!strcmp(arg.s, "subject")) {
+ patlist = &searchargs->subject;
+ }
+
+ /* we look message-id up in the envelope */
+ else if (!strcmp(arg.s, "message-id")) {
+ patlist = &searchargs->messageid;
+ }
+
+ /* all other headers we handle normally */
+ else {
+ if (searchargs->cache_atleast < BIT32_MAX) {
+ bit32 this_ver =
+ mailbox_cached_header(arg.s);
+ if(this_ver > searchargs->cache_atleast)
+ searchargs->cache_atleast = this_ver;
+ }
+ appendstrlist(&searchargs->header_name, arg.s);
+ patlist = &searchargs->header;
+ }
+
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c == EOF) goto missingarg;
+ str = charset_convert(arg.s, *charset, NULL, 0);
+ if (strchr(str, EMPTY)) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ }
+ else {
+ appendstrlistpat(patlist, str);
+ }
+ }
+ else goto badcri;
+ break;
+
+ case 'k':
+ if (!strcmp(criteria.s, "keyword")) {
+ if (c != ' ') goto missingarg;
+ c = getword(imapd_in, &arg);
+ if (!imparse_isatom(arg.s)) goto badflag;
+ lcase(arg.s);
+ for (flag=0; flag < MAX_USER_FLAGS; flag++) {
+ if (imapd_mailbox->flagname[flag] &&
+ !strcasecmp(imapd_mailbox->flagname[flag], arg.s)) break;
+ }
+ if (flag == MAX_USER_FLAGS) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ break;
+ }
+ searchargs->user_flags_set[flag/32] |= 1<<(flag&31);
+ }
+ else goto badcri;
+ break;
+
+ case 'l':
+ if (!strcmp(criteria.s, "larger")) {
+ if (c != ' ') goto missingarg;
+ c = getword(imapd_in, &arg);
+ size = 0;
+ for (p = arg.s; *p && isdigit((int) *p); p++) {
+ size = size * 10 + *p - '0';
+ /* if (size < 0) goto badnumber; */
+ }
+ if (!arg.s || *p) goto badnumber;
+ if (size > searchargs->larger) searchargs->larger = size;
+ }
+ else goto badcri;
+ break;
+
+ case 'm':
+ if ((imapd_mailbox->options & OPT_IMAP_CONDSTORE) &&
+ !strcmp(criteria.s, "modseq")) {
+ if (c != ' ') goto missingarg;
+ c = getword(imapd_in, &arg);
+ for (p = arg.s; *p && isdigit((int) *p); p++) {
+ searchargs->modseq = searchargs->modseq * 10 + *p - '0';
+ }
+ if (!arg.s || *p) goto badnumber;
+ }
+ else goto badcri;
+ break;
+
+ case 'n':
+ if (!strcmp(criteria.s, "not")) {
+ if (c != ' ') goto missingarg;
+ sub1 = (struct searchargs *)xzmalloc(sizeof(struct searchargs));
+ c = getsearchcriteria(tag, sub1, charset, 0);
+ if (c == EOF) {
+ freesearchargs(sub1);
+ return EOF;
+ }
+
+ appendsearchargs(searchargs, sub1, (struct searchargs *)0);
+ }
+ else if (!strcmp(criteria.s, "new")) {
+ searchargs->flags |= (SEARCH_SEEN_UNSET|SEARCH_RECENT_SET);
+ }
+ else goto badcri;
+ break;
+
+ case 'o':
+ if (!strcmp(criteria.s, "or")) {
+ if (c != ' ') goto missingarg;
+ sub1 = (struct searchargs *)xzmalloc(sizeof(struct searchargs));
+ c = getsearchcriteria(tag, sub1, charset, 0);
+ if (c == EOF) {
+ freesearchargs(sub1);
+ return EOF;
+ }
+ if (c != ' ') goto missingarg;
+ sub2 = (struct searchargs *)xzmalloc(sizeof(struct searchargs));
+ c = getsearchcriteria(tag, sub2, charset, 0);
+ if (c == EOF) {
+ freesearchargs(sub1);
+ freesearchargs(sub2);
+ return EOF;
+ }
+ appendsearchargs(searchargs, sub1, sub2);
+ }
+ else if (!strcmp(criteria.s, "old")) {
+ searchargs->flags |= SEARCH_RECENT_UNSET;
+ }
+ else if (!strcmp(criteria.s, "on")) {
+ if (c != ' ') goto missingarg;
+ c = getsearchdate(&start, &end);
+ if (c == EOF) goto baddate;
+ if (!searchargs->before || searchargs->before > end) {
+ searchargs->before = end;
+ }
+ if (!searchargs->after || searchargs->after < start) {
+ searchargs->after = start;
+ }
+ }
+ else goto badcri;
+ break;
+
+ case 'r':
+ if (!strcmp(criteria.s, "recent")) {
+ searchargs->flags |= SEARCH_RECENT_SET;
+ }
+ else goto badcri;
+ break;
+
+ case 's':
+ if (!strcmp(criteria.s, "seen")) {
+ searchargs->flags |= SEARCH_SEEN_SET;
+ }
+ else if (!strcmp(criteria.s, "sentbefore")) {
+ if (c != ' ') goto missingarg;
+ c = getsearchdate(&start, &end);
+ if (c == EOF) goto baddate;
+ if (!searchargs->sentbefore || searchargs->sentbefore > start) {
+ searchargs->sentbefore = start;
+ }
+ }
+ else if (!strcmp(criteria.s, "senton")) {
+ if (c != ' ') goto missingarg;
+ c = getsearchdate(&start, &end);
+ if (c == EOF) goto baddate;
+ if (!searchargs->sentbefore || searchargs->sentbefore > end) {
+ searchargs->sentbefore = end;
+ }
+ if (!searchargs->sentafter || searchargs->sentafter < start) {
+ searchargs->sentafter = start;
+ }
+ }
+ else if (!strcmp(criteria.s, "sentsince")) {
+ if (c != ' ') goto missingarg;
+ c = getsearchdate(&start, &end);
+ if (c == EOF) goto baddate;
+ if (!searchargs->sentafter || searchargs->sentafter < start) {
+ searchargs->sentafter = start;
+ }
+ }
+ else if (!strcmp(criteria.s, "since")) {
+ if (c != ' ') goto missingarg;
+ c = getsearchdate(&start, &end);
+ if (c == EOF) goto baddate;
+ if (!searchargs->after || searchargs->after < start) {
+ searchargs->after = start;
+ }
+ }
+ else if (!strcmp(criteria.s, "smaller")) {
+ if (c != ' ') goto missingarg;
+ c = getword(imapd_in, &arg);
+ size = 0;
+ for (p = arg.s; *p && isdigit((int) *p); p++) {
+ size = size * 10 + *p - '0';
+ /* if (size < 0) goto badnumber; */
+ }
+ if (!arg.s || *p) goto badnumber;
+ if (size == 0) size = 1;
+ if (!searchargs->smaller || size < searchargs->smaller)
+ searchargs->smaller = size;
+ }
+ else if (!strcmp(criteria.s, "subject")) {
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c == EOF) goto missingarg;
+ str = charset_convert(arg.s, *charset, NULL, 0);
+ if (strchr(str, EMPTY)) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ }
+ else {
+ appendstrlistpat(&searchargs->subject, str);
+ }
+ }
+ else goto badcri;
+ break;
+
+ case 't':
+ if (!strcmp(criteria.s, "to")) {
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c == EOF) goto missingarg;
+ str = charset_convert(arg.s, *charset, NULL, 0);
+ if (strchr(str, EMPTY)) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ }
+ else {
+ appendstrlistpat(&searchargs->to, str);
+ }
+ }
+ else if (!strcmp(criteria.s, "text")) {
+ if (c != ' ') goto missingarg;
+ c = getastring(imapd_in, imapd_out, &arg);
+ if (c == EOF) goto missingarg;
+ str = charset_convert(arg.s, *charset, NULL, 0);
+ if (strchr(str, EMPTY)) {
+ /* Force failure */
+ searchargs->flags = (SEARCH_RECENT_SET|SEARCH_RECENT_UNSET);
+ }
+ else {
+ appendstrlistpat(&searchargs->text, str);
+ }
+ }
+ else goto badcri;
+ break;
+
+ case 'u':
+ if (!strcmp(criteria.s, "uid")) {
+ if (c != ' ') goto missingarg;
+ c = getword(imapd_in, &arg);
+ if (!imparse_issequence(arg.s)) goto badcri;
+ appendstrlist(&searchargs->uidsequence, arg.s);
+ }
+ else if (!strcmp(criteria.s, "unseen")) {
+ searchargs->flags |= SEARCH_SEEN_UNSET;
+ }
+ else if (!strcmp(criteria.s, "unanswered")) {
+ searchargs->system_flags_unset |= FLAG_ANSWERED;
+ }
+ else if (!strcmp(criteria.s, "undeleted")) {
+ searchargs->system_flags_unset |= FLAG_DELETED;
+ }
+ else if (!strcmp(criteria.s, "undraft")) {
+ searchargs->system_flags_unset |= FLAG_DRAFT;
+ }
+ else if (!strcmp(criteria.s, "unflagged")) {
+ searchargs->system_flags_unset |= FLAG_FLAGGED;
+ }
+ else if (!strcmp(criteria.s, "unkeyword")) {
+ if (c != ' ') goto missingarg;
+ c = getword(imapd_in, &arg);
+ if (!imparse_isatom(arg.s)) goto badflag;
+ lcase(arg.s);
+ for (flag=0; flag < MAX_USER_FLAGS; flag++) {
+ if (imapd_mailbox->flagname[flag] &&
+ !strcasecmp(imapd_mailbox->flagname[flag], arg.s)) break;
+ }
+ if (flag != MAX_USER_FLAGS) {
+ searchargs->user_flags_unset[flag/32] |= 1<<(flag&31);
+ }
+ }
+ else goto badcri;
+ break;
+
+ default:
+ badcri:
+ prot_printf(imapd_out, "%s BAD Invalid Search criteria\r\n", tag);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+ }
+
+ return c;
+
+ missingarg:
+ prot_printf(imapd_out, "%s BAD Missing required argument to Search %s\r\n",
+ tag, criteria.s);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+
+ badflag:
+ prot_printf(imapd_out, "%s BAD Invalid flag name %s in Search command\r\n",
+ tag, arg.s);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+
+ baddate:
+ prot_printf(imapd_out, "%s BAD Invalid date in Search command\r\n", tag);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+
+ badnumber:
+ prot_printf(imapd_out, "%s BAD Invalid number in Search command\r\n", tag);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+}
+
+void cmd_dump(char *tag, char *name, int uid_start)
+{
+ int r = 0;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ char *path, *mpath, *acl;
+
+ /* administrators only please */
+ if (!imapd_userisadmin) {
+ r = IMAP_PERMISSION_DENIED;
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ }
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, NULL, &path, &mpath,
+ NULL, &acl, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if(!r) {
+ r = dump_mailbox(tag, mailboxname, path, mpath, acl, uid_start,
+ imapd_in, imapd_out, imapd_authstate);
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+}
+
+void cmd_undump(char *tag, char *name)
+{
+ int r = 0;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ char *path, *mpath, *acl;
+
+ /* administrators only please */
+ if (!imapd_userisadmin) {
+ r = IMAP_PERMISSION_DENIED;
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ }
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, NULL, &path, &mpath,
+ NULL, &acl, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if(!r) {
+ /* save this stuff from additional mlookups */
+ char *safe_path = xstrdup(path);
+ char *safe_mpath = mpath ? xstrdup(mpath) : NULL;
+ char *safe_acl = xstrdup(acl);
+ r = undump_mailbox(mailboxname, safe_path, safe_mpath, safe_acl,
+ imapd_in, imapd_out, imapd_authstate);
+ free(safe_path);
+ if (safe_mpath) free(safe_mpath);
+ free(safe_acl);
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s%s\r\n",
+ tag,
+ (r == IMAP_MAILBOX_NONEXISTENT &&
+ mboxlist_createmailboxcheck(mailboxname, 0, 0,
+ imapd_userisadmin,
+ imapd_userid, imapd_authstate,
+ NULL, NULL) == 0)
+ ? "[TRYCREATE] " : "", error_message(r));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+}
+
+static int getresult(struct protstream *p, char *tag)
+{
+ char buf[4096];
+ char *str = (char *) buf;
+
+ while(1) {
+ if (!prot_fgets(str, sizeof(buf), p)) {
+ return IMAP_SERVER_UNAVAILABLE;
+ }
+ if (!strncmp(str, tag, strlen(tag))) {
+ str += strlen(tag);
+ if(!*str) {
+ /* We got a tag, but no response */
+ return IMAP_SERVER_UNAVAILABLE;
+ }
+ str++;
+ if (!strncasecmp(str, "OK ", 3)) { return 0; }
+ if (!strncasecmp(str, "NO ", 3)) { return IMAP_REMOTE_DENIED; }
+ return IMAP_SERVER_UNAVAILABLE; /* huh? */
+ }
+ /* skip this line, we don't really care */
+ }
+}
+
+/* given 2 protstreams and a mailbox, gets the acl and then wipes it */
+static int trashacl(struct protstream *pin, struct protstream *pout,
+ char *mailbox)
+{
+ int i=0, j=0;
+ char tagbuf[128];
+ int c; /* getword() returns an int */
+ struct buf tag, cmd, tmp, user;
+ int r = 0;
+
+ memset(&tag, 0, sizeof(struct buf));
+ memset(&cmd, 0, sizeof(struct buf));
+ memset(&tmp, 0, sizeof(struct buf));
+ memset(&user, 0, sizeof(struct buf));
+
+ prot_printf(pout, "ACL0 GETACL {%d+}\r\n%s\r\n",
+ strlen(mailbox), mailbox);
+
+ while(1) {
+ c = getword(pin, &tag);
+ if (c == EOF) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ break;
+ }
+
+ c = getword(pin, &cmd);
+ if (c == EOF) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ break;
+ }
+
+ if(c == '\r') {
+ c = prot_getc(pin);
+ if(c != '\n') {
+ r = IMAP_SERVER_UNAVAILABLE;
+ goto cleanup;
+ }
+ }
+ if(c == '\n') goto cleanup;
+
+ if (tag.s[0] == '*' && !strncmp(cmd.s, "ACL", 3)) {
+ while(c != '\n') {
+ /* An ACL response, we should send a DELETEACL command */
+ c = getastring(pin, pout, &tmp);
+ if (c == EOF) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ goto cleanup;
+ }
+
+ if(c == '\r') {
+ c = prot_getc(pin);
+ if(c != '\n') {
+ r = IMAP_SERVER_UNAVAILABLE;
+ goto cleanup;
+ }
+ }
+ if(c == '\n') goto cleanup;
+
+ c = getastring(pin, pout, &user);
+ if (c == EOF) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ goto cleanup;
+ }
+
+ snprintf(tagbuf, sizeof(tagbuf), "ACL%d", ++i);
+
+ prot_printf(pout, "%s DELETEACL {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tagbuf, strlen(mailbox), mailbox,
+ strlen(user.s), user.s);
+ if(c == '\r') {
+ c = prot_getc(pin);
+ if(c != '\n') {
+ r = IMAP_SERVER_UNAVAILABLE;
+ goto cleanup;
+ }
+ }
+ /* if the next character is \n, we'll exit the loop */
+ }
+ continue;
+ } else if (!strncmp(tag.s, "ACL0", 4)) {
+ /* end of this command */
+ if (!strcasecmp(cmd.s, "OK")) { break; }
+ if (!strcasecmp(cmd.s, "NO")) { r = IMAP_REMOTE_DENIED; break; }
+ r = IMAP_SERVER_UNAVAILABLE;
+ break;
+ }
+ }
+
+ cleanup:
+
+ /* Now cleanup after all the DELETEACL commands */
+ if(!r) {
+ while(j < i) {
+ c = getword(pin, &tag);
+ if (c == EOF) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ break;
+ }
+
+ eatline(pin, c);
+
+ if(!strncmp("ACL", tag.s, 3)) {
+ j++;
+ }
+ }
+ }
+
+ if(r) eatline(pin, c);
+
+ freebuf(&user);
+ freebuf(&tmp);
+ freebuf(&cmd);
+ freebuf(&tag);
+
+ return r;
+}
+
+static int dumpacl(struct protstream *pin, struct protstream *pout,
+ char *mailbox, char *acl_in)
+{
+ int r = 0;
+ int c; /* getword() returns an int */
+ char tag[128];
+ int tagnum = 1;
+ char *rights, *nextid;
+ int mailboxlen = strlen(mailbox);
+ char *acl_safe = acl_in ? xstrdup(acl_in) : NULL;
+ char *acl = acl_safe;
+ struct buf inbuf;
+
+ memset(&inbuf, 0, sizeof(struct buf));
+
+ while (acl) {
+ rights = strchr(acl, '\t');
+ if (!rights) break;
+ *rights++ = '\0';
+
+ nextid = strchr(rights, '\t');
+ if (!nextid) break;
+ *nextid++ = '\0';
+
+ snprintf(tag, sizeof(tag), "SACL%d", tagnum++);
+
+ prot_printf(pout, "%s SETACL {%d+}\r\n%s {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag,
+ mailboxlen, mailbox,
+ strlen(acl), acl,
+ strlen(rights), rights);
+
+ while(1) {
+ c = getword(pin, &inbuf);
+ if (c == EOF) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ break;
+ }
+ if(strncmp(tag, inbuf.s, strlen(tag))) {
+ eatline(pin, c);
+ continue;
+ } else {
+ /* this is our line */
+ break;
+ }
+ }
+
+ /* Are we OK? */
+
+ c = getword(pin, &inbuf);
+ if (c == EOF) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ break;
+ }
+
+ if(strncmp("OK", inbuf.s, 2)) {
+ r = IMAP_REMOTE_DENIED;
+ break;
+ }
+
+ /* Eat the line and get the next one */
+ eatline(pin, c);
+ acl = nextid;
+ }
+
+ freebuf(&inbuf);
+ if(acl_safe) free(acl_safe);
+
+ return r;
+}
+
+static int do_xfer_single(char *toserver, char *topart,
+ char *name, char *mailboxname,
+ int mbflags,
+ char *path, char *mpath, char *part, char *acl,
+ int prereserved,
+ mupdate_handle *h_in,
+ struct backend *be_in)
+{
+ int r = 0, rerr = 0;
+ char buf[MAX_PARTITION_LEN+HOSTNAME_SIZE+2];
+ struct backend *be = NULL;
+ mupdate_handle *mupdate_h = NULL;
+ int backout_mupdate = 0;
+ int backout_remotebox = 0;
+ int backout_remoteflag = 0;
+
+ /* Make sure we're given a sane value */
+ if(topart && !imparse_isatom(topart)) {
+ return IMAP_PARTITION_UNKNOWN;
+ }
+
+ if(!strcmp(toserver, config_servername)) {
+ return IMAP_BAD_SERVER;
+ }
+
+ /* Okay, we have the mailbox, now the order of steps is:
+ *
+ * 1) Connect to remote server.
+ * 2) LOCALCREATE on remote server
+ * 2.5) Set mailbox as REMOTE on local server
+ * 3) mupdate.DEACTIVATE(mailbox, remoteserver) xxx what partition?
+ * 4) undump mailbox from local to remote
+ * 5) Sync remote acl
+ * 6) mupdate.ACTIVATE(mailbox, remoteserver)
+ * ** MAILBOX NOW LIVING ON REMOTE SERVER
+ * 6.5) force remote server to push the final mupdate entry to ensure
+ * that the state of the world is correct (required if we do not
+ * know the remote partition, but worst case it will be caught
+ * when they next sync)
+ * 7) local delete of mailbox
+ * 8) remove local remote mailbox entry??????
+ */
+
+ /* Step 1: Connect to remote server */
+ if(!r && !be_in) {
+ /* Just authorize as the IMAP server, so pass "" as our authzid */
+ be = backend_connect(NULL, toserver, &protocol[PROTOCOL_IMAP],
+ "", NULL, NULL);
+ if(!be) r = IMAP_SERVER_UNAVAILABLE;
+ if(r) syslog(LOG_ERR,
+ "Could not move mailbox: %s, Backend connect failed",
+ mailboxname);
+ } else if(!r) {
+ be = be_in;
+ }
+
+ /* Step 1a: Connect to mupdate (as needed) */
+ if(h_in) {
+ mupdate_h = h_in;
+ } else if (config_mupdate_server) {
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(r) {
+ syslog(LOG_ERR,
+ "Could not move mailbox: %s, MUPDATE connect failed",
+ mailboxname);
+ goto done;
+ }
+
+ }
+
+ /* Step 2: LOCALCREATE on remote server */
+ if(!r) {
+ if(topart) {
+ /* need to send partition as an atom */
+ prot_printf(be->out, "LC1 LOCALCREATE {%d+}\r\n%s %s\r\n",
+ strlen(name), name, topart);
+ } else {
+ prot_printf(be->out, "LC1 LOCALCREATE {%d+}\r\n%s\r\n",
+ strlen(name), name);
+ }
+ r = getresult(be->in, "LC1");
+ if(r) syslog(LOG_ERR, "Could not move mailbox: %s, LOCALCREATE failed",
+ mailboxname);
+ else backout_remotebox = 1;
+ }
+
+ /* Step 2.5: Set mailbox as REMOTE on local server */
+ if(!r) {
+ snprintf(buf, sizeof(buf), "%s!%s", toserver, part);
+ r = mboxlist_update(mailboxname, mbflags|MBTYPE_MOVING, buf, acl, 1);
+ if(r) syslog(LOG_ERR, "Could not move mailbox: %s, " \
+ "mboxlist_update failed", mailboxname);
+ }
+
+ /* Step 3: mupdate.DEACTIVATE(mailbox, newserver) */
+ /* (only if mailbox has not been already deactivated by our caller) */
+ if(!r && mupdate_h && !prereserved) {
+ backout_remoteflag = 1;
+
+ /* Note we are making the reservation on OUR host so that recovery
+ * make sense */
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, part);
+ r = mupdate_deactivate(mupdate_h, mailboxname, buf);
+ if(r) syslog(LOG_ERR,
+ "Could not move mailbox: %s, MUPDATE DEACTIVATE failed",
+ mailboxname);
+ }
+
+ /* Step 4: Dump local -> remote */
+ if(!r) {
+ backout_mupdate = 1;
+
+ prot_printf(be->out, "D01 UNDUMP {%d+}\r\n%s ", strlen(name), name);
+
+ r = dump_mailbox(NULL, mailboxname, path, mpath, acl,
+ 0, be->in, be->out, imapd_authstate);
+
+ if(r)
+ syslog(LOG_ERR,
+ "Could not move mailbox: %s, dump_mailbox() failed",
+ mailboxname);
+ }
+
+ if(!r) {
+ r = getresult(be->in, "D01");
+ if(r) syslog(LOG_ERR, "Could not move mailbox: %s, UNDUMP failed",
+ mailboxname);
+ }
+
+ /* Step 5: Set ACL on remote */
+ if(!r) {
+ r = trashacl(be->in, be->out, name);
+ if(r) syslog(LOG_ERR, "Could not clear remote acl on %s",
+ mailboxname);
+ }
+ if(!r) {
+ r = dumpacl(be->in, be->out, name, acl);
+ if(r) syslog(LOG_ERR, "Could not set remote acl on %s",
+ mailboxname);
+ }
+
+ /* Step 6: mupdate.activate(mailbox, remote) */
+ /* We do this from the local server first so that recovery is easier */
+ if(!r && mupdate_h) {
+ /* Note the flag that we don't have a valid partiton at the moment */
+ snprintf(buf, sizeof(buf), "%s!MOVED", toserver);
+ r = mupdate_activate(mupdate_h, mailboxname, buf, acl);
+ }
+
+ /* MAILBOX NOW LIVES ON REMOTE */
+ if(!r) {
+ backout_remotebox = 0;
+ backout_mupdate = 0;
+ backout_remoteflag = 0;
+
+ /* 6.5) Kick remote server to correct mupdate entry */
+ /* Note that we don't really care if this succeeds or not */
+ if (mupdate_h) {
+ prot_printf(be->out, "MP1 MUPDATEPUSH {%d+}\r\n%s\r\n",
+ strlen(name), name);
+ rerr = getresult(be->in, "MP1");
+ if(rerr) {
+ syslog(LOG_ERR,
+ "Could not trigger remote push to mupdate server" \
+ "during move of %s",
+ mailboxname);
+ }
+ }
+ }
+
+ /* 7) local delete of mailbox
+ * & remove local "remote" mailboxlist entry */
+ if(!r) {
+ /* Note that we do not check the ACL, and we don't update MUPDATE */
+ /* note also that we need to remember to let proxyadmins do this */
+ r = mboxlist_deletemailbox(mailboxname,
+ imapd_userisadmin || imapd_userisproxyadmin,
+ imapd_userid, imapd_authstate, 0, 1, 0);
+ if(r) syslog(LOG_ERR,
+ "Could not delete local mailbox during move of %s",
+ mailboxname);
+
+ if (!r) {
+ /* Delete mailbox annotations */
+ annotatemore_delete(mailboxname);
+ }
+ }
+
+done:
+ if(r && mupdate_h && backout_mupdate) {
+ rerr = 0;
+ /* xxx if the mupdate server is what failed, then this won't
+ help any! */
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, part);
+ rerr = mupdate_activate(mupdate_h, mailboxname, buf, acl);
+ if(rerr) {
+ syslog(LOG_ERR,
+ "Could not back out mupdate during move of %s (%s)",
+ mailboxname, error_message(rerr));
+ }
+ }
+ if(r && backout_remotebox) {
+ rerr = 0;
+ prot_printf(be->out, "LD1 LOCALDELETE {%d+}\r\n%s\r\n",
+ strlen(name), name);
+ rerr = getresult(be->in, "LD1");
+ if(rerr) {
+ syslog(LOG_ERR,
+ "Could not back out remote mailbox during move of %s (%s)",
+ name, error_message(rerr));
+ }
+ }
+ if(r && backout_remoteflag) {
+ rerr = 0;
+
+ rerr = mboxlist_update(mailboxname, mbflags, part, acl, 1);
+ if(rerr) syslog(LOG_ERR, "Could not unset remote flag on mailbox: %s",
+ mailboxname);
+ }
+
+ /* release the handles we got locally if necessary */
+ if(mupdate_h && !h_in)
+ mupdate_disconnect(&mupdate_h);
+ if(be && !be_in)
+ backend_disconnect(be);
+
+ return r;
+}
+
+struct xfer_user_rock
+{
+ char *toserver;
+ char *topart;
+ mupdate_handle *h;
+ struct backend *be;
+};
+
+static int xfer_user_cb(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ mupdate_handle *mupdate_h = ((struct xfer_user_rock *)rock)->h;
+ char *toserver = ((struct xfer_user_rock *)rock)->toserver;
+ char *topart = ((struct xfer_user_rock *)rock)->topart;
+ struct backend *be = ((struct xfer_user_rock *)rock)->be;
+ char externalname[MAX_MAILBOX_NAME+1];
+ int mbflags;
+ int r = 0;
+ char *inpath, *inmpath, *inpart, *inacl;
+ char *path = NULL, *mpath = NULL, *part = NULL, *acl = NULL;
+
+ if (!r) {
+ /* NOTE: NOT mlookup() because we don't want to issue a referral */
+ /* xxx but what happens if they are remote
+ * mailboxes? */
+ r = mboxlist_detail(name, &mbflags,
+ &inpath, &inmpath, &inpart, &inacl, NULL);
+ }
+
+ if (!r) {
+ path = xstrdup(inpath);
+ if (inmpath) mpath = xstrdup(inmpath);
+ part = xstrdup(inpart);
+ acl = xstrdup(inacl);
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_toexternal)(&imapd_namespace,
+ name,
+ imapd_userid,
+ externalname);
+ }
+
+ if(!r) {
+ r = do_xfer_single(toserver, topart, externalname, name, mbflags,
+ path, mpath, part, acl, 0, mupdate_h, be);
+ }
+
+ if(path) free(path);
+ if(mpath) free(mpath);
+ if(part) free(part);
+ if(acl) free(acl);
+
+ return r;
+}
+
+
+void cmd_xfer(char *tag, char *name, char *toserver, char *topart)
+{
+ int r = 0;
+ char buf[MAX_PARTITION_LEN+HOSTNAME_SIZE+2];
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int mbflags;
+ int moving_user = 0;
+ int backout_mupdate = 0;
+ mupdate_handle *mupdate_h = NULL;
+ char *inpath, *inmpath, *inpart, *inacl;
+ char *path = NULL, *mpath = NULL, *part = NULL, *acl = NULL;
+ char *p, *mbox = mailboxname;
+
+ /* administrators only please */
+ /* however, proxys can do this, if their authzid is an admin */
+ if (!imapd_userisadmin && !imapd_userisproxyadmin) {
+ r = IMAP_PERMISSION_DENIED;
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace,
+ name,
+ imapd_userid,
+ mailboxname);
+ }
+
+ /* NOTE: Since XFER can only be used by an admin, and we always connect
+ * to the destination backend as an admin, we take advantage of the fact
+ * that admins *always* use a consistent mailbox naming scheme.
+ * So, 'name' should be used in any command we send to a backend, and
+ * 'mailboxname' is the internal name to be used for mupdate and findall.
+ */
+
+ if (config_virtdomains && (p = strchr(mailboxname, '!'))) {
+ /* pointer to mailbox w/o domain prefix */
+ mbox = p + 1;
+ }
+
+ if(!strncmp(mbox, "user.", 5) && !strchr(mbox+5, '.')) {
+ if ((strlen(mbox+5) == (strlen(imapd_userid) - (mbox - mailboxname))) &&
+ !strncmp(mbox+5, imapd_userid, strlen(mbox+5))) {
+ /* don't move your own inbox, that could be troublesome */
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ } else if (!config_getswitch(IMAPOPT_ALLOWUSERMOVES)) {
+ /* not configured to allow user moves */
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ } else {
+ moving_user = 1;
+ }
+ }
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, &mbflags,
+ &inpath, &inmpath, &inpart, &inacl, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ if (!r) {
+ path = xstrdup(inpath);
+ if (inmpath) mpath = xstrdup(inmpath);
+ part = xstrdup(inpart);
+ acl = xstrdup(inacl);
+ }
+
+ /* if we are not moving a user, just move the one mailbox */
+ if(!r && !moving_user) {
+ r = do_xfer_single(toserver, topart, name, mailboxname, mbflags,
+ path, mpath, part, acl, 0, NULL, NULL);
+ } else if (!r) {
+ struct backend *be = NULL;
+
+ /* we need to reserve the users inbox - connect to mupdate */
+ if(!r && config_mupdate_server) {
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(r) {
+ syslog(LOG_ERR,
+ "Could not move mailbox: %s, MUPDATE connect failed",
+ mailboxname);
+ goto done;
+ }
+ }
+
+ /* Get a single connection to the remote backend */
+ be = backend_connect(NULL, toserver, &protocol[PROTOCOL_IMAP],
+ "", NULL, NULL);
+ if(!be) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ syslog(LOG_ERR,
+ "Could not move mailbox: %s, " \
+ "Initial backend connect failed",
+ mailboxname);
+ }
+
+ /* deactivate their inbox */
+ if(!r && mupdate_h) {
+ /* Note we are making the reservation on OUR host so that recovery
+ * make sense */
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, part);
+ r = mupdate_deactivate(mupdate_h, mailboxname, buf);
+ if(r) syslog(LOG_ERR,
+ "Could deactivate mailbox: %s, during move",
+ mailboxname);
+ else backout_mupdate = 1;
+ }
+
+ /* If needed, set an uppermost quota root */
+ if(!r) {
+ struct quota quota;
+
+ quota.root = mailboxname;
+ r = quota_read("a, NULL, 0);
+
+ if(!r) {
+ /* note use of + to force the setting of a nonexistant
+ * quotaroot */
+ prot_printf(be->out, "Q01 SETQUOTA {%d+}\r\n" \
+ "+%s (STORAGE %d)\r\n",
+ strlen(name)+1, name, quota.limit);
+ r = getresult(be->in, "Q01");
+ if(r) syslog(LOG_ERR,
+ "Could not move mailbox: %s, " \
+ "failed setting initial quota root\r\n",
+ mailboxname);
+ }
+ else if (r == IMAP_QUOTAROOT_NONEXISTENT) r = 0;
+ }
+
+
+ /* recursively move all sub-mailboxes, using internal names */
+ if(!r) {
+ struct xfer_user_rock rock;
+
+ rock.toserver = toserver;
+ rock.topart = topart;
+ rock.h = mupdate_h;
+ rock.be = be;
+
+ snprintf(buf, sizeof(buf), "%s.*", mailboxname);
+ r = mboxlist_findall(NULL, buf, 1, imapd_userid,
+ imapd_authstate, xfer_user_cb,
+ &rock);
+ }
+
+ /* xxx how do you back out if one of the above moves fails? */
+
+ /* move this mailbox */
+ /* ...and seen file, and subs file, and sieve scripts... */
+ if(!r) {
+ r = do_xfer_single(toserver, topart, name, mailboxname, mbflags,
+ path, mpath, part, acl, 1, mupdate_h, be);
+ }
+
+ if(be) {
+ backend_disconnect(be);
+ free(be);
+ }
+
+ if(r && mupdate_h && backout_mupdate) {
+ int rerr = 0;
+ /* xxx if the mupdate server is what failed, then this won't
+ help any! */
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, part);
+ rerr = mupdate_activate(mupdate_h, mailboxname, buf, acl);
+ if(rerr) {
+ syslog(LOG_ERR,
+ "Could not back out mupdate during move of %s (%s)",
+ mailboxname, error_message(rerr));
+ }
+ } else if(!r) {
+ /* this was a successful user delete, and we need to delete
+ certain user meta-data (but not seen state!) */
+ user_deletedata(mailboxname+5, imapd_userid, imapd_authstate, 0);
+ }
+
+ if(!r && mupdate_h) {
+ mupdate_disconnect(&mupdate_h);
+ }
+ }
+
+ done:
+ if(part) free(part);
+ if(path) free(path);
+ if(mpath) free(mpath);
+ if(acl) free(acl);
+
+ imapd_check(NULL, 0, 0);
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n",
+ tag,
+ error_message(r));
+ } else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+
+ return;
+}
+
+/*
+ * Parse a "date", for SEARCH criteria
+ * The time_t's pointed to by 'start' and 'end' are set to the
+ * times of the start and end of the parsed date.
+ */
+int getsearchdate(start, end)
+time_t *start, *end;
+{
+ int c;
+ struct tm tm;
+ int quoted = 0;
+ char month[4];
+
+ memset(&tm, 0, sizeof tm);
+
+ c = prot_getc(imapd_in);
+ if (c == '\"') {
+ quoted++;
+ c = prot_getc(imapd_in);
+ }
+
+ /* Day of month */
+ if (!isdigit(c)) goto baddate;
+ tm.tm_mday = c - '0';
+ c = prot_getc(imapd_in);
+ if (isdigit(c)) {
+ tm.tm_mday = tm.tm_mday * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ }
+
+ if (c != '-') goto baddate;
+ c = prot_getc(imapd_in);
+
+ /* Month name */
+ if (!isalpha(c)) goto baddate;
+ month[0] = c;
+ c = prot_getc(imapd_in);
+ if (!isalpha(c)) goto baddate;
+ month[1] = c;
+ c = prot_getc(imapd_in);
+ if (!isalpha(c)) goto baddate;
+ month[2] = c;
+ c = prot_getc(imapd_in);
+ month[3] = '\0';
+ lcase(month);
+
+ for (tm.tm_mon = 0; tm.tm_mon < 12; tm.tm_mon++) {
+ if (!strcmp(month, monthname[tm.tm_mon])) break;
+ }
+ if (tm.tm_mon == 12) goto baddate;
+
+ if (c != '-') goto baddate;
+ c = prot_getc(imapd_in);
+
+ /* Year */
+ if (!isdigit(c)) goto baddate;
+ tm.tm_year = c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_year = tm.tm_year * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if (isdigit(c)) {
+ if (tm.tm_year < 19) goto baddate;
+ tm.tm_year -= 19;
+ tm.tm_year = tm.tm_year * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_year = tm.tm_year * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ }
+
+ if (quoted) {
+ if (c != '\"') goto baddate;
+ c = prot_getc(imapd_in);
+ }
+
+ tm.tm_isdst = -1;
+ *start = mktime(&tm);
+
+ tm.tm_sec = tm.tm_min = 59;
+ tm.tm_hour = 23;
+ tm.tm_isdst = -1;
+ *end = mktime(&tm);
+
+ return c;
+
+ baddate:
+ prot_ungetc(c, imapd_in);
+ return EOF;
+}
+
+#define SORTGROWSIZE 10
+
+/*
+ * Parse sort criteria
+ */
+int getsortcriteria(char *tag, struct sortcrit **sortcrit)
+{
+ int c;
+ static struct buf criteria;
+ int nsort, n;
+
+ *sortcrit = NULL;
+
+ c = prot_getc(imapd_in);
+ if (c != '(') goto missingcrit;
+
+ c = getword(imapd_in, &criteria);
+ if (criteria.s[0] == '\0') goto missingcrit;
+
+ nsort = 0;
+ n = 0;
+ for (;;) {
+ if (n >= nsort - 1) { /* leave room for implicit criterion */
+ /* (Re)allocate an array for sort criteria */
+ nsort += SORTGROWSIZE;
+ *sortcrit =
+ (struct sortcrit *) xrealloc(*sortcrit,
+ nsort * sizeof(struct sortcrit));
+ /* Zero out the newly added sortcrit */
+ memset((*sortcrit)+n, 0, SORTGROWSIZE * sizeof(struct sortcrit));
+ }
+
+ lcase(criteria.s);
+ if (!strcmp(criteria.s, "reverse")) {
+ (*sortcrit)[n].flags |= SORT_REVERSE;
+ goto nextcrit;
+ }
+ else if (!strcmp(criteria.s, "arrival"))
+ (*sortcrit)[n].key = SORT_ARRIVAL;
+ else if (!strcmp(criteria.s, "cc"))
+ (*sortcrit)[n].key = SORT_CC;
+ else if (!strcmp(criteria.s, "date"))
+ (*sortcrit)[n].key = SORT_DATE;
+ else if (!strcmp(criteria.s, "from"))
+ (*sortcrit)[n].key = SORT_FROM;
+ else if (!strcmp(criteria.s, "size"))
+ (*sortcrit)[n].key = SORT_SIZE;
+ else if (!strcmp(criteria.s, "subject"))
+ (*sortcrit)[n].key = SORT_SUBJECT;
+ else if (!strcmp(criteria.s, "to"))
+ (*sortcrit)[n].key = SORT_TO;
+#if 0
+ else if (!strcmp(criteria.s, "annotation")) {
+ (*sortcrit)[n].key = SORT_ANNOTATION;
+ if (c != ' ') goto missingarg;
+ c = getstring(imapd_in, &arg);
+ if (c != ' ') goto missingarg;
+ (*sortcrit)[n].args.annot.entry = xstrdup(arg.s);
+ c = getstring(imapd_in, &arg);
+ if (c == EOF) goto missingarg;
+ (*sortcrit)[n].args.annot.attrib = xstrdup(arg.s);
+ }
+#endif
+ else if ((imapd_mailbox->options & OPT_IMAP_CONDSTORE) &&
+ !strcmp(criteria.s, "modseq"))
+ (*sortcrit)[n].key = SORT_MODSEQ;
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid Sort criterion %s\r\n",
+ tag, criteria.s);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+ }
+
+ n++;
+
+ nextcrit:
+ if (c == ' ') c = getword(imapd_in, &criteria);
+ else break;
+ }
+
+ if ((*sortcrit)[n].flags & SORT_REVERSE && !(*sortcrit)[n].key) {
+ prot_printf(imapd_out,
+ "%s BAD Missing Sort criterion to reverse\r\n", tag);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+ }
+
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close parenthesis in Sort\r\n", tag);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+ }
+
+ /* Terminate the list with the implicit sort criterion */
+ (*sortcrit)[n++].key = SORT_SEQUENCE;
+
+ c = prot_getc(imapd_in);
+
+ return c;
+
+ missingcrit:
+ prot_printf(imapd_out, "%s BAD Missing Sort criteria\r\n", tag);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+#if 0 /* For annotations stuff above */
+ missingarg:
+ prot_printf(imapd_out, "%s BAD Missing argument to Sort criterion %s\r\n",
+ tag, criteria.s);
+ if (c != EOF) prot_ungetc(c, imapd_in);
+ return EOF;
+#endif
+}
+
+#ifdef ENABLE_LISTEXT
+/*
+ * Parse LIST options.
+ * The command has been parsed up to and including the opening '('.
+ */
+int getlistopts(char *tag, int *listopts)
+{
+ int c;
+ static struct buf arg;
+
+ *listopts = LIST_EXT;
+
+ for (;;) {
+ c = getword(imapd_in, &arg);
+ if (!arg.s[0]) break;
+
+ lcase(arg.s);
+ if (!strcmp(arg.s, "subscribed")) {
+ *listopts |= LIST_SUBSCRIBED;
+ }
+ else if (!strcmp(arg.s, "children")) {
+ *listopts |= LIST_CHILDREN;
+ }
+ else if (!strcmp(arg.s, "remote")) {
+ *listopts |= LIST_REMOTE;
+ }
+ else {
+ prot_printf(imapd_out, "%s BAD Invalid List option %s\r\n",
+ tag, arg.s);
+ return EOF;
+ }
+
+ if (c != ' ') break;
+ }
+
+ if (c != ')') {
+ prot_printf(imapd_out,
+ "%s BAD Missing close parenthesis in List\r\n", tag);
+ return EOF;
+ }
+
+ c = prot_getc(imapd_in);
+
+ return c;
+}
+#endif /* ENABLE_LISTEXT */
+
+/*
+ * Parse a date_time, for the APPEND command
+ */
+int getdatetime(date)
+time_t *date;
+{
+ int c;
+ struct tm tm;
+ int old_format = 0;
+ char month[4], zone[4], *p;
+ time_t tmp_gmtime;
+ int zone_off;
+
+ memset(&tm, 0, sizeof tm);
+
+ c = prot_getc(imapd_in);
+ if (c != '\"') goto baddate;
+
+ /* Day of month */
+ c = prot_getc(imapd_in);
+ if (c == ' ') c = '0';
+ if (!isdigit(c)) goto baddate;
+ tm.tm_mday = c - '0';
+ c = prot_getc(imapd_in);
+ if (isdigit(c)) {
+ tm.tm_mday = tm.tm_mday * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if(tm.tm_mday <= 0 || tm.tm_mday > 31)
+ goto baddate;
+ }
+
+ if (c != '-') goto baddate;
+ c = prot_getc(imapd_in);
+
+ /* Month name */
+ if (!isalpha(c)) goto baddate;
+ month[0] = c;
+ c = prot_getc(imapd_in);
+ if (!isalpha(c)) goto baddate;
+ month[1] = c;
+ c = prot_getc(imapd_in);
+ if (!isalpha(c)) goto baddate;
+ month[2] = c;
+ c = prot_getc(imapd_in);
+ month[3] = '\0';
+ lcase(month);
+
+ for (tm.tm_mon = 0; tm.tm_mon < 12; tm.tm_mon++) {
+ if (!strcmp(month, monthname[tm.tm_mon])) break;
+ }
+ if (tm.tm_mon == 12) goto baddate;
+ /* xxx this doesn't quite work in leap years */
+ if (tm.tm_mday > max_monthdays[tm.tm_mon]) goto baddate;
+
+ if (c != '-') goto baddate;
+ c = prot_getc(imapd_in);
+
+ /* Year */
+ if (!isdigit(c)) goto baddate;
+ tm.tm_year = c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_year = tm.tm_year * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if (isdigit(c)) {
+ if (tm.tm_year < 19) goto baddate;
+ tm.tm_year -= 19;
+ tm.tm_year = tm.tm_year * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_year = tm.tm_year * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ }
+ else old_format++;
+
+ /* Hour */
+ if (c != ' ') goto baddate;
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_hour = c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_hour = tm.tm_hour * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if (tm.tm_hour > 23) goto baddate;
+
+ /* Minute */
+ if (c != ':') goto baddate;
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_min = c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_min = tm.tm_min * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if (tm.tm_min > 59) goto baddate;
+
+ /* Second */
+ if (c != ':') goto baddate;
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_sec = c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ tm.tm_sec = tm.tm_sec * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if (tm.tm_min > 60) goto baddate;
+
+ /* Time zone */
+ if (old_format) {
+ if (c != '-') goto baddate;
+ c = prot_getc(imapd_in);
+
+ if (!isalpha(c)) goto baddate;
+ zone[0] = c;
+ c = prot_getc(imapd_in);
+
+ if (c == '\"') {
+ /* Military (single-char) zones */
+ zone[1] = '\0';
+ lcase(zone);
+ if (zone[0] <= 'm') {
+ zone_off = (zone[0] - 'a' + 1)*60;
+ }
+ else if (zone[0] < 'z') {
+ zone_off = ('m' - zone[0])*60;
+ }
+ else zone_off = 0;
+ }
+ else {
+ /* UT (universal time) */
+ zone[1] = c;
+ c = prot_getc(imapd_in);
+ if (c == '\"') {
+ zone[2] = '\0';
+ lcase(zone);
+ if (!strcmp(zone, "ut")) goto baddate;
+ zone_off = 0;
+ }
+ else {
+ /* 3-char time zone */
+ zone[2] = c;
+ c = prot_getc(imapd_in);
+ if (c != '\"') goto baddate;
+ zone[3] = '\0';
+ lcase(zone);
+ p = strchr("aecmpyhb", zone[0]);
+ if (c != '\"' || zone[2] != 't' || !p) goto baddate;
+ zone_off = (strlen(p) - 12)*60;
+ if (zone[1] == 'd') zone_off -= 60;
+ else if (zone[1] != 's') goto baddate;
+ }
+ }
+ }
+ else {
+ if (c != ' ') goto baddate;
+ c = prot_getc(imapd_in);
+
+ if (c != '+' && c != '-') goto baddate;
+ zone[0] = c;
+
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ zone_off = c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ zone_off = zone_off * 10 + c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ zone_off = zone_off * 6 + c - '0';
+ c = prot_getc(imapd_in);
+ if (!isdigit(c)) goto baddate;
+ zone_off = zone_off * 10 + c - '0';
+
+ if (zone[0] == '-') zone_off = -zone_off;
+
+ c = prot_getc(imapd_in);
+ if (c != '\"') goto baddate;
+
+ }
+
+ c = prot_getc(imapd_in);
+
+ tm.tm_isdst = -1;
+
+ tmp_gmtime = mkgmtime(&tm);
+ if(tmp_gmtime == -1) goto baddate;
+
+ *date = tmp_gmtime - zone_off*60;
+
+ return c;
+
+ baddate:
+ prot_ungetc(c, imapd_in);
+ return EOF;
+}
+
+/*
+ * Print 's' as a quoted-string or literal (but not an atom)
+ */
+void
+printstring(s)
+const char *s;
+{
+ const char *p;
+ int len = 0;
+
+ /* Look for any non-QCHAR characters */
+ for (p = s; *p && len < 1024; p++) {
+ len++;
+ if (*p & 0x80 || *p == '\r' || *p == '\n'
+ || *p == '\"' || *p == '%' || *p == '\\') break;
+ }
+
+ /* if it's too long, literal it */
+ if (*p || len >= 1024) {
+ prot_printf(imapd_out, "{%u}\r\n%s", strlen(s), s);
+ } else {
+ prot_printf(imapd_out, "\"%s\"", s);
+ }
+}
+
+/*
+ * Print 's' as an atom, quoted-string, or literal
+ */
+void
+printastring(s)
+const char *s;
+{
+ const char *p;
+ int len = 0;
+
+ if (imparse_isatom(s)) {
+ prot_printf(imapd_out, "%s", s);
+ return;
+ }
+
+ /* Look for any non-QCHAR characters */
+ for (p = s; *p && len < 1024; p++) {
+ len++;
+ if (*p & 0x80 || *p == '\r' || *p == '\n'
+ || *p == '\"' || *p == '%' || *p == '\\') break;
+ }
+
+ /* if it's too long, literal it */
+ if (*p || len >= 1024) {
+ prot_printf(imapd_out, "{%u}\r\n%s", strlen(s), s);
+ } else {
+ prot_printf(imapd_out, "\"%s\"", s);
+ }
+}
+
+/*
+ * Append 'section', 'fields', 'trail' to the fieldlist 'l'.
+ */
+void
+appendfieldlist(struct fieldlist **l, char *section,
+ struct strlist *fields, char *trail,
+ void *d, size_t size)
+{
+ struct fieldlist **tail = l;
+
+ while (*tail) tail = &(*tail)->next;
+
+ *tail = (struct fieldlist *)xmalloc(sizeof(struct fieldlist));
+ (*tail)->section = xstrdup(section);
+ (*tail)->fields = fields;
+ (*tail)->trail = xstrdup(trail);
+ if(d && size) {
+ (*tail)->rock = xmalloc(size);
+ memcpy((*tail)->rock, d, size);
+ } else {
+ (*tail)->rock = NULL;
+ }
+ (*tail)->next = 0;
+}
+
+
+/*
+ * Free the fieldlist 'l'
+ */
+void freefieldlist(struct fieldlist *l)
+{
+ struct fieldlist *n;
+
+ while (l) {
+ n = l->next;
+ free(l->section);
+ freestrlist(l->fields);
+ free(l->trail);
+ if (l->rock) free(l->rock);
+ free((char *)l);
+ l = n;
+ }
+}
+
+/*
+ * Append the searchargs 's1' and 's2' to the sublist of 's'
+ */
+void
+appendsearchargs(s, s1, s2)
+struct searchargs *s, *s1, *s2;
+{
+ struct searchsub **tail = &s->sublist;
+
+ while (*tail) tail = &(*tail)->next;
+
+ *tail = (struct searchsub *)xmalloc(sizeof(struct searchsub));
+ (*tail)->sub1 = s1;
+ (*tail)->sub2 = s2;
+ (*tail)->next = 0;
+}
+
+
+/*
+ * Free the searchargs 's'
+ */
+void
+freesearchargs(s)
+struct searchargs *s;
+{
+ struct searchsub *sub, *n;
+
+ if (!s) return;
+
+ freestrlist(s->sequence);
+ freestrlist(s->uidsequence);
+ freestrlist(s->from);
+ freestrlist(s->to);
+ freestrlist(s->cc);
+ freestrlist(s->bcc);
+ freestrlist(s->subject);
+ freestrlist(s->body);
+ freestrlist(s->text);
+ freestrlist(s->header_name);
+ freestrlist(s->header);
+
+ for (sub = s->sublist; sub; sub = n) {
+ n = sub->next;
+ freesearchargs(sub->sub1);
+ freesearchargs(sub->sub2);
+ free(sub);
+ }
+ free(s);
+}
+
+/*
+ * Free an array of sortcrit
+ */
+static void freesortcrit(struct sortcrit *s)
+{
+ int i = 0;
+
+ if (!s) return;
+ do {
+ switch (s[i].key) {
+ case SORT_ANNOTATION:
+ free(s[i].args.annot.entry);
+ free(s[i].args.annot.attrib);
+ break;
+ }
+ i++;
+ } while (s[i].key != SORT_SEQUENCE);
+ free(s);
+}
+
+/*
+ * Issue a MAILBOX untagged response
+ */
+static int mailboxdata(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock __attribute__((unused)))
+{
+ char mboxname[MAX_MAILBOX_PATH+1];
+
+ (*imapd_namespace.mboxname_toexternal)(&imapd_namespace, name,
+ imapd_userid, mboxname);
+ prot_printf(imapd_out, "* MAILBOX %s\r\n", mboxname);
+ return 0;
+}
+
+/*
+ * Issue a LIST or LSUB untagged response
+ */
+static void mstringdata(char *cmd, char *name, int matchlen, int maycreate,
+ int listopts)
+{
+ static char lastname[MAX_MAILBOX_PATH+1];
+ static int lastnamedelayed = 0;
+ static int lastnamenoinferiors = 0;
+ static int nonexistent = 0;
+ static int sawuser = 0;
+ int lastnamehassub = 0;
+ int c, mbtype;
+ char mboxname[MAX_MAILBOX_PATH+1];
+
+ /* We have to reset the sawuser flag before each list command.
+ * Handle it as a dirty hack.
+ */
+ if (cmd == NULL) {
+ sawuser = 0;
+ mstringdatacalls = 0;
+ return;
+ }
+ mstringdatacalls++;
+
+ if (lastnamedelayed) {
+ /* Check if lastname has children */
+ if (name && strncmp(lastname, name, strlen(lastname)) == 0 &&
+ name[strlen(lastname)] == '.') {
+ lastnamehassub = 1;
+ }
+ prot_printf(imapd_out, "* %s (", cmd);
+ if (nonexistent == IMAP_MAILBOX_RESERVED) {
+ /* LISTEXT wants \\PlaceHolder instead of \\Noselect */
+ if (listopts & LIST_EXT)
+ prot_printf(imapd_out, "\\PlaceHolder");
+ else
+ prot_printf(imapd_out, "\\Noselect");
+ } else if (nonexistent) {
+ prot_printf(imapd_out, "\\NonExistent");
+ }
+ if (lastnamenoinferiors) {
+ prot_printf(imapd_out, "%s\\Noinferiors", nonexistent ? " " : "");
+ }
+ else if ((listopts & LIST_CHILDREN) &&
+ /* we can't determine \HasNoChildren for subscriptions */
+ (lastnamehassub ||
+ !(listopts & (LIST_LSUB | LIST_SUBSCRIBED)))) {
+ prot_printf(imapd_out, "%s%s", nonexistent ? " " : "",
+ lastnamehassub ? "\\HasChildren" : "\\HasNoChildren");
+ }
+ prot_printf(imapd_out, ") \"%c\" ", imapd_namespace.hier_sep);
+
+ (*imapd_namespace.mboxname_toexternal)(&imapd_namespace, lastname,
+ imapd_userid, mboxname);
+ printstring(mboxname);
+ prot_printf(imapd_out, "\r\n");
+ lastnamedelayed = lastnamenoinferiors = nonexistent = 0;
+ }
+
+ /* Special-case to flush any final state */
+ if (!name) {
+ lastname[0] = '\0';
+ return;
+ }
+
+ /* Suppress any output of a partial match */
+ if ((name[matchlen]
+ && strncmp(lastname, name, matchlen) == 0
+ && (lastname[matchlen] == '\0' || lastname[matchlen] == '.'))) {
+ return;
+ }
+
+ /*
+ * We can get a partial match for "user" multiple times with
+ * other matches inbetween. Handle it as a special case
+ */
+ if (matchlen == 4 && strncasecmp(name, "user", 4) == 0) {
+ if (sawuser) return;
+ sawuser = 1;
+ }
+
+ strlcpy(lastname, name, sizeof(lastname));
+ lastname[matchlen] = '\0';
+ nonexistent = 0;
+
+ /* Now we need to see if this mailbox exists */
+ /* first convert "INBOX" to "user.<userid>" */
+ if (!strncasecmp(lastname, "inbox", 5)) {
+ (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, "INBOX",
+ imapd_userid, mboxname);
+ strlcat(mboxname, lastname+5, sizeof(mboxname));
+ }
+ else
+ strlcpy(mboxname, lastname, sizeof(mboxname));
+
+ /* Look it up */
+ nonexistent = mboxlist_detail(mboxname, &mbtype,
+ NULL, NULL, NULL, NULL, NULL);
+ if(!nonexistent && (mbtype & MBTYPE_RESERVE))
+ nonexistent = IMAP_MAILBOX_RESERVED;
+
+ if (!name[matchlen]) {
+ lastnamedelayed = 1;
+ if (!maycreate) lastnamenoinferiors = 1;
+ return;
+ }
+
+ c = name[matchlen];
+ if (c) name[matchlen] = '\0';
+ prot_printf(imapd_out, "* %s (", cmd);
+ if (c) {
+ /* Handle namespace prefix as a special case */
+ if (!strcmp(name, "user") ||
+ !strcmp(name, imapd_namespace.prefix[NAMESPACE_SHARED])) {
+ prot_printf(imapd_out, "\\Noselect");
+ if (listopts & LIST_EXT)
+ prot_printf(imapd_out, " \\PlaceHolder");
+ }
+ else {
+ if (nonexistent)
+ prot_printf(imapd_out, "\\NonExistent");
+ /* LISTEXT uses \PlaceHolder instead of \Noselect */
+ if (listopts & LIST_EXT)
+ prot_printf(imapd_out, "%s\\PlaceHolder", nonexistent ? " " : "");
+ else
+ prot_printf(imapd_out, "%s\\Noselect", nonexistent ? " " : "");
+ }
+ if (listopts & LIST_CHILDREN)
+ prot_printf(imapd_out, " \\HasChildren");
+ }
+ prot_printf(imapd_out, ") \"%c\" ", imapd_namespace.hier_sep);
+
+ (*imapd_namespace.mboxname_toexternal)(&imapd_namespace, name,
+ imapd_userid, mboxname);
+ printstring(mboxname);
+ prot_printf(imapd_out, "\r\n");
+ if (c) name[matchlen] = c;
+ return;
+}
+
+/*
+ * Issue a LIST untagged response
+ */
+static int listdata(char *name, int matchlen, int maycreate, void *rock)
+{
+ int listopts = *((int *)rock);
+
+ mstringdata(((listopts & LIST_LSUB) ? "LSUB" : "LIST"),
+ name, matchlen, maycreate, listopts);
+
+ return 0;
+}
+
+/* Reset the given sasl_conn_t to a sane state */
+static int reset_saslconn(sasl_conn_t **conn)
+{
+ int ret;
+ sasl_security_properties_t *secprops = NULL;
+
+ sasl_dispose(conn);
+ /* do initialization typical of service_main */
+ ret = sasl_server_new("imap", config_servername,
+ NULL, NULL, NULL,
+ NULL, 0, conn);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.ipremoteport)
+ ret = sasl_setprop(*conn, SASL_IPREMOTEPORT,
+ saslprops.ipremoteport);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.iplocalport)
+ ret = sasl_setprop(*conn, SASL_IPLOCALPORT,
+ saslprops.iplocalport);
+ if(ret != SASL_OK) return ret;
+
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ ret = sasl_setprop(*conn, SASL_SEC_PROPS, secprops);
+ if(ret != SASL_OK) return ret;
+ /* end of service_main initialization excepting SSF */
+
+ /* If we have TLS/SSL info, set it */
+ if(saslprops.ssf) {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &saslprops.ssf);
+ } else {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &extprops_ssf);
+ }
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.authid) {
+ ret = sasl_setprop(*conn, SASL_AUTH_EXTERNAL, saslprops.authid);
+ if(ret != SASL_OK) return ret;
+ }
+ /* End TLS/SSL Info */
+
+ return SASL_OK;
+}
+
+void cmd_mupdatepush(char *tag, char *name)
+{
+ int r = 0;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ char *part, *acl;
+ mupdate_handle *mupdate_h = NULL;
+ char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+
+ if (!imapd_userisadmin) {
+ r = IMAP_PERMISSION_DENIED;
+ }
+ if (!config_mupdate_server) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
+ imapd_userid, mailboxname);
+ }
+
+ if (!r) {
+ r = mlookup(tag, name, mailboxname, NULL, NULL, NULL,
+ &part, &acl, NULL);
+ }
+ if (r == IMAP_MAILBOX_MOVED) return;
+
+ /* Push mailbox to mupdate server */
+ if (!r) {
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ }
+
+ if (!r) {
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, part);
+
+ r = mupdate_activate(mupdate_h, mailboxname, buf, acl);
+ }
+
+ if(mupdate_h) {
+ mupdate_disconnect(&mupdate_h);
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+}
+
+#ifdef HAVE_SSL
+/* Convert the ASCII hex into binary data
+ *
+ * 'bin' MUST be able to accomodate at least strlen(hex)/2 bytes
+ */
+void hex2bin(const char *hex, unsigned char *bin, unsigned int *binlen)
+{
+ int i;
+ const char *c;
+ unsigned char msn, lsn;
+
+ for (c = hex, i = 0; *c && isxdigit((int) *c); c++) {
+ msn = (*c > '9') ? tolower((int) *c) - 'a' + 10 : *c - '0';
+ c++;
+ lsn = (*c > '9') ? tolower((int) *c) - 'a' + 10 : *c - '0';
+
+ bin[i++] = (unsigned char) (msn << 4) | lsn;
+ }
+ *binlen = i;
+}
+
+enum {
+ URLAUTH_ALG_HMAC_SHA1 = 0 /* HMAC-SHA1 */
+};
+
+void cmd_urlfetch(char *tag)
+{
+ struct mboxkey *mboxkey_db;
+ int c, r, doclose;
+ static struct buf arg;
+ struct imapurl url;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ struct mailbox mboxstruct, *mailbox;
+ unsigned msgno;
+ unsigned int token_len;
+ int mbtype;
+ char *newserver;
+ time_t now = time(NULL);
+
+ prot_printf(imapd_out, "* URLFETCH");
+
+ do {
+ c = getastring(imapd_in, imapd_out, &arg);
+ prot_putc(' ', imapd_out);
+ printstring(arg.s);
+ prot_putc(' ', imapd_out);
+
+ r = doclose = 0;
+ imapurl_fromURL(&url, arg.s);
+
+ /* validate the URL */
+ if (!url.user || !url.server || !url.mailbox || !url.uid ||
+ (url.urlauth.access && !(url.urlauth.mech && url.urlauth.token))) {
+ /* missing info */
+ r = IMAP_BADURL;
+ } else if (strcmp(url.server, config_servername)) {
+ /* wrong server */
+ r = IMAP_BADURL;
+ } else if (url.urlauth.expire &&
+ url.urlauth.expire < mktime(gmtime(&now))) {
+ /* expired */
+ r = IMAP_BADURL;
+ } else if (url.urlauth.access) {
+ /* check mechanism & authorization */
+ int authorized = 0;
+
+ if (!strcasecmp(url.urlauth.mech, "INTERNAL")) {
+ if (!strncasecmp(url.urlauth.access, "submit+", 7) &&
+ global_authisa(imapd_authstate, IMAPOPT_SUBMITSERVERS)) {
+ /* authorized submit server */
+ authorized = 1;
+ } else if (!strncasecmp(url.urlauth.access, "user+", 5) &&
+ !strcmp(url.urlauth.access+5, imapd_userid)) {
+ /* currently authorized user */
+ authorized = 1;
+ } else if (!strcasecmp(url.urlauth.access, "authuser") &&
+ strcmp(imapd_userid, "anonymous")) {
+ /* any non-anonymous authorized user */
+ authorized = 1;
+ } else if (!strcasecmp(url.urlauth.access, "anonymous")) {
+ /* anyone */
+ authorized = 1;
+ }
+ }
+
+ if (!authorized) r = IMAP_BADURL;
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace,
+ url.mailbox,
+ url.user, mailboxname);
+ }
+ if (!r) {
+ r = mlookup(NULL, NULL, mailboxname, &mbtype, NULL, NULL,
+ &newserver, NULL, NULL);
+ }
+
+ if (!r && (mbtype & MBTYPE_REMOTE)) {
+ /* remote mailbox */
+ struct backend *be;
+
+ be = proxy_findserver(newserver, &protocol[PROTOCOL_IMAP],
+ proxy_userid, &backend_cached,
+ &backend_current, &backend_inbox, imapd_in);
+ if (!be) {
+ r = IMAP_SERVER_UNAVAILABLE;
+ } else {
+ /* XXX proxy command to backend */
+ }
+
+ free(url.freeme);
+
+ continue;
+ }
+
+ /* local mailbox */
+ if (!r) {
+ if (url.urlauth.token) {
+ /* validate the URLAUTH token */
+ hex2bin(url.urlauth.token,
+ (unsigned char *) url.urlauth.token, &token_len);
+
+ /* first byte is the algorithm used to create token */
+ switch (url.urlauth.token[0]) {
+ case URLAUTH_ALG_HMAC_SHA1: {
+ const char *key;
+ size_t keylen;
+ unsigned char vtoken[EVP_MAX_MD_SIZE];
+ unsigned int vtoken_len;
+
+ r = mboxkey_open(url.user, 0, &mboxkey_db);
+ r = mboxkey_read(mboxkey_db, mailboxname, &key, &keylen);
+ HMAC(EVP_sha1(), key, keylen, arg.s, url.urlauth.rump_len,
+ vtoken, &vtoken_len);
+ mboxkey_close(mboxkey_db);
+
+ if (memcmp(vtoken, url.urlauth.token+1, vtoken_len)) {
+ r = IMAP_BADURL;
+ }
+
+ break;
+ }
+ default:
+ r = IMAP_BADURL;
+ break;
+ }
+ }
+
+ if (!r) {
+ if (!imapd_mailbox || strcmp(imapd_mailbox->name, mailboxname)) {
+ /* not the currently selected mailbox, so try to open it */
+
+ r = mailbox_open_header(mailboxname, imapd_authstate,
+ &mboxstruct);
+
+ if (!r) {
+ doclose = 1;
+ r = mailbox_open_index(&mboxstruct);
+ }
+
+ if (!r && !url.urlauth.access &&
+ !(mboxstruct.myrights & ACL_READ)) {
+ r = (imapd_userisadmin ||
+ (mboxstruct.myrights & ACL_LOOKUP)) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ }
+
+ if (!r) {
+ mailbox = &mboxstruct;
+ index_operatemailbox(mailbox);
+ }
+ } else {
+ mailbox = imapd_mailbox;
+ }
+ }
+
+ if (r) {
+ /* nothing to do, handled up top */
+ } else if (url.uidvalidity &&
+ (mailbox->uidvalidity != url.uidvalidity)) {
+ r = IMAP_BADURL;
+ } else if (!url.uid || !(msgno = index_finduid(url.uid)) ||
+ (index_getuid(msgno) != url.uid)) {
+ r = IMAP_BADURL;
+ } else {
+ r = index_urlfetch(mailbox, msgno, url.section,
+ url.start_octet, url.octet_count,
+ imapd_out, NULL);
+ }
+
+ free(url.freeme);
+
+ if (doclose) {
+ mailbox_close(&mboxstruct);
+ if (imapd_mailbox) index_operatemailbox(imapd_mailbox);
+ }
+ }
+
+ if (r) prot_printf(imapd_out, "NIL");
+
+ } while (c == ' ');
+
+ prot_printf(imapd_out, "\r\n");
+
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to URLFETCH\r\n", tag);
+ eatline(imapd_in, c);
+ }
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+}
+
+/* Convert the binary data into ASCII hex
+ *
+ * 'hex' MUST be able to accomodate at least 2*binlen+1 bytes
+ */
+void bin2hex(unsigned char *bin, int binlen, char *hex)
+{
+ int i;
+ unsigned char c;
+
+ for (i = 0; i < binlen; i++) {
+ c = (bin[i] >> 4) & 0xf;
+ hex[i*2] = (c > 9) ? ('a' + c - 10) : ('0' + c);
+ c = bin[i] & 0xf;
+ hex[i*2+1] = (c > 9) ? ('a' + c - 10) : ('0' + c);
+ }
+ hex[i*2] = '\0';
+}
+
+#define MBOX_KEY_LEN 16 /* 128 bits */
+
+void cmd_genurlauth(char *tag)
+{
+ struct mboxkey *mboxkey_db;
+ int first = 1;
+ int c, r, doclose;
+ static struct buf arg1, arg2;
+ struct imapurl url;
+ char mailboxname[MAX_MAILBOX_NAME+1], *urlauth = NULL;
+ char newkey[MBOX_KEY_LEN];
+ const char *key;
+ size_t keylen;
+ unsigned char token[EVP_MAX_MD_SIZE+1]; /* +1 for algorithm */
+ unsigned int token_len;
+ int mbtype;
+ char *newserver;
+ time_t now = time(NULL);
+
+ r = mboxkey_open(imapd_userid, MBOXKEY_CREATE, &mboxkey_db);
+ if (r) {
+ prot_printf(imapd_out,
+ "%s NO Can not open mailbox key db for %s: %s\r\n",
+ tag, imapd_userid, error_message(r));
+ return;
+ }
+
+ do {
+ c = getastring(imapd_in, imapd_out, &arg1);
+ if (c != ' ') {
+ prot_printf(imapd_out,
+ "%s BAD Missing required argument to Genurlauth\r\n",
+ tag);
+ eatline(imapd_in, c);
+ return;
+ }
+ c = getword(imapd_in, &arg2);
+ if (strcasecmp(arg2.s, "INTERNAL")) {
+ prot_printf(imapd_out,
+ "%s BAD Unknown auth mechanism to Genurlauth %s\r\n",
+ tag, arg2.s);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ r = 0;
+ imapurl_fromURL(&url, arg1.s);
+
+ /* validate the URL */
+ if (!url.user || !url.server || !url.mailbox || !url.uid ||
+ !url.urlauth.access) {
+ r = IMAP_BADURL;
+ } else if (strcmp(url.user, imapd_userid)) {
+ /* not using currently authorized user's namespace */
+ r = IMAP_BADURL;
+ } else if (strcmp(url.server, config_servername)) {
+ /* wrong server */
+ r = IMAP_BADURL;
+ } else if (url.urlauth.expire &&
+ url.urlauth.expire < mktime(gmtime(&now))) {
+ /* already expired */
+ r = IMAP_BADURL;
+ }
+
+ if (!r) {
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace,
+ url.mailbox,
+ imapd_userid, mailboxname);
+ }
+ if (!r) {
+ r = mlookup(NULL, NULL, mailboxname, &mbtype, NULL, NULL,
+ &newserver, NULL, NULL);
+ }
+ if (r) {
+ prot_printf(imapd_out,
+ "%s BAD Poorly specified URL to Genurlauth %s\r\n",
+ tag, arg1.s);
+ eatline(imapd_in, c);
+ return;
+ }
+
+ if (mbtype & MBTYPE_REMOTE) {
+ /* XXX proxy to backend */
+ continue;
+ }
+
+ /* lookup key */
+ r = mboxkey_read(mboxkey_db, mailboxname, &key, &keylen);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error fetching mboxkey: %s",
+ cyrusdb_strerror(r));
+ }
+ else if (!key) {
+ /* create a new key */
+ RAND_bytes(newkey, MBOX_KEY_LEN);
+ key = newkey;
+ keylen = MBOX_KEY_LEN;
+ r = mboxkey_write(mboxkey_db, mailboxname, key, keylen);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error writing new mboxkey: %s",
+ cyrusdb_strerror(r));
+ }
+ }
+
+ if (r) {
+ eatline(imapd_in, c);
+ prot_printf(imapd_out,
+ "%s NO Error authorizing %s: %s\r\n",
+ tag, arg1.s, cyrusdb_strerror(r));
+ return;
+ }
+
+ /* first byte is the algorithm used to create token */
+ token[0] = URLAUTH_ALG_HMAC_SHA1;
+ HMAC(EVP_sha1(), key, keylen, arg1.s, strlen(arg1.s),
+ token+1, &token_len);
+ token_len++;
+
+ urlauth = xrealloc(urlauth, strlen(arg1.s) + 10 +
+ 2 * (EVP_MAX_MD_SIZE+1) + 1);
+ strcpy(urlauth, arg1.s);
+ strcat(urlauth, ":internal:");
+ bin2hex(token, token_len, urlauth+strlen(urlauth));
+
+ if (first) {
+ prot_printf(imapd_out, "* GENURLAUTH");
+ first = 0;
+ }
+ prot_putc(' ', imapd_out);
+ printstring(urlauth);
+ } while (c == ' ');
+
+ if (!first) prot_printf(imapd_out, "\r\n");
+
+ if (c == '\r') c = prot_getc(imapd_in);
+ if (c != '\n') {
+ prot_printf(imapd_out,
+ "%s BAD Unexpected extra arguments to GENURLAUTH\r\n", tag);
+ eatline(imapd_in, c);
+ }
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
+ }
+
+ mboxkey_close(mboxkey_db);
+}
+
+void cmd_resetkey(char *tag, char *mailbox,
+ char *mechanism __attribute__((unused)))
+/* XXX we don't support any external mechanisms, so we ignore it */
+{
+ int r;
+
+ if (mailbox) {
+ /* delete key for specified mailbox */
+ char mailboxname[MAX_MAILBOX_NAME+1], *newserver;
+ int mbtype;
+ struct mboxkey *mboxkey_db;
+
+ r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace,
+ mailbox,
+ imapd_userid, mailboxname);
+ if (!r) {
+ r = mlookup(NULL, NULL, mailboxname, &mbtype, NULL, NULL,
+ &newserver, NULL, NULL);
+ }
+ if (r) {
+ prot_printf(imapd_out, "%s NO Error removing key: %s\r\n",
+ tag, error_message(r));
+ return;
+ }
+
+ if (mbtype & MBTYPE_REMOTE) {
+ /* XXX proxy to backend */
+ return;
+ }
+
+ r = mboxkey_open(imapd_userid, MBOXKEY_CREATE, &mboxkey_db);
+ if (!r) {
+ r = mboxkey_write(mboxkey_db, mailboxname, NULL, 0);
+ mboxkey_close(mboxkey_db);
+ }
+
+ if (r) {
+ prot_printf(imapd_out, "%s NO Error removing key: %s\r\n",
+ tag, cyrusdb_strerror(r));
+ } else {
+ prot_printf(imapd_out,
+ "%s OK [URLMECH INTERNAL] key removed\r\n", tag);
+ }
+ }
+ else {
+ /* delete ALL keys */
+ /* XXX what do we do about multiple backends? */
+ r = mboxkey_delete_user(imapd_userid);
+ if (r) {
+ prot_printf(imapd_out, "%s NO Error removing keys: %s\r\n",
+ tag, cyrusdb_strerror(r));
+ } else {
+ prot_printf(imapd_out, "%s OK All keys removed\r\n", tag);
+ }
+ }
+}
+#endif /* HAVE_SSL */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapd.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,280 @@
+/* imapd.h -- Common state for IMAP daemon
+ * $Id: imapd.h,v 1.55.2.4 2006/03/31 19:22:21 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_IMAPD_H
+#define INCLUDED_IMAPD_H
+
+#include "annotate.h"
+#include "charset.h"
+#include "mailbox.h"
+#include "prot.h"
+
+/* Userid client has logged in as */
+extern char *imapd_userid;
+
+/* Authorization state for logged in userid */
+extern struct auth_state *imapd_authstate;
+
+/* Number of messages in currently open mailbox */
+extern int imapd_exists;
+
+/* Is client CONDSTORE-aware? */
+extern int imapd_condstore_client;
+
+/* List of HEADER.FIELDS[.NOT] fetch specifications */
+struct fieldlist {
+ char *section; /* First part of BODY[x] value */
+ struct strlist *fields; /* List of field-names */
+ char *trail; /* Last part of BODY[x] value */
+ void *rock;
+ struct fieldlist *next;
+};
+
+/* Items that may be fetched */
+struct fetchargs {
+ int fetchitems; /* Bitmask */
+ struct strlist *binsections; /* BINARY[x]<x> values */
+ struct strlist *sizesections; /* BINARY.SIZE[x] values */
+ struct strlist *bodysections; /* BODY[x]<x> values */
+ struct fieldlist *fsections; /* BODY[xHEADER.FIELDSx]<x> values */
+ struct strlist *headers; /* RFC822.HEADER.LINES */
+ struct strlist *headers_not; /* RFC822.HEADER.LINES.NOT */
+ int start_octet; /* start_octet for partial fetch */
+ int octet_count; /* octet_count for partial fetch, or 0 */
+ modseq_t changedsince; /* changed since modseq, or 0 */
+
+ bit32 cache_atleast; /* to do headers we need atleast this
+ * cache version */
+};
+
+struct octetinfo
+{
+ int start_octet;
+ int octet_count;
+};
+
+/* Bitmasks for fetchitems */
+enum {
+ FETCH_UID = (1<<0),
+ FETCH_INTERNALDATE = (1<<1),
+ FETCH_SIZE = (1<<2),
+ FETCH_FLAGS = (1<<3),
+ FETCH_ENVELOPE = (1<<4),
+ FETCH_BODYSTRUCTURE = (1<<5),
+ FETCH_BODY = (1<<6),
+ FETCH_HEADER = (1<<7),
+ FETCH_TEXT = (1<<8),
+ FETCH_RFC822 = (1<<9),
+ FETCH_SETSEEN = (1<<10),
+/* FETCH_UNCACHEDHEADER = (1<<11) -- obsolete */
+ FETCH_IS_PARTIAL = (1<<12), /* this is the PARTIAL command */
+ FETCH_MODSEQ = (1<<13)
+};
+
+enum {
+ FETCH_FAST = (FETCH_FLAGS|FETCH_INTERNALDATE|FETCH_SIZE),
+ FETCH_ALL = (FETCH_FLAGS|FETCH_INTERNALDATE|FETCH_SIZE|FETCH_ENVELOPE),
+ FETCH_FULL = (FETCH_ALL|FETCH_BODY)
+};
+
+/* Arguments to Store functions */
+struct storeargs {
+ int operation;
+ modseq_t unchangedsince; /* unchanged since modseq, or ULLONG_MAX */
+ int silent;
+ int seen;
+ bit32 system_flags;
+ /* private to index.c */
+ bit32 user_flags[MAX_USER_FLAGS/32];
+ time_t update_time;
+ int usinguid;
+ /* private to index_storeflag() */
+ int last_msgno;
+ int last_found;
+};
+
+/* values for operation */
+enum {
+ STORE_ADD = 1,
+ STORE_REMOVE = 2,
+ STORE_REPLACE = 3
+};
+
+struct searchsub {
+ struct searchsub *next;
+ struct searchargs *sub1;
+ /*
+ * If sub2 is null, then sub1 is NOT'ed.
+ * Otherwise sub1 and sub2 are OR'ed.
+ */
+ struct searchargs *sub2;
+};
+
+enum {
+ SEARCH_RECENT_SET = (1<<0),
+ SEARCH_RECENT_UNSET = (1<<1),
+ SEARCH_SEEN_SET = (1<<2),
+ SEARCH_SEEN_UNSET = (1<<3)
+/* SEARCH_UNCACHEDHEADER = (1<<4) -- obsolete */
+};
+
+/* Things that may be searched for */
+struct searchargs {
+ int flags;
+ unsigned smaller, larger;
+ time_t before, after;
+ time_t sentbefore, sentafter;
+ bit32 system_flags_set;
+ bit32 system_flags_unset;
+ bit32 user_flags_set[MAX_USER_FLAGS/32];
+ bit32 user_flags_unset[MAX_USER_FLAGS/32];
+ struct strlist *sequence;
+ struct strlist *uidsequence;
+ struct strlist *from;
+ struct strlist *to;
+ struct strlist *cc;
+ struct strlist *bcc;
+ struct strlist *subject;
+ struct strlist *messageid;
+ struct strlist *body;
+ struct strlist *text;
+ struct strlist *header_name, *header;
+ struct searchsub *sublist;
+ modseq_t modseq;
+
+ bit32 cache_atleast;
+};
+
+/* Sort criterion */
+struct sortcrit {
+ unsigned key; /* sort key */
+ int flags; /* key modifiers as defined below */
+ union { /* argument(s) to the sort key */
+ struct {
+ char *entry;
+ char *attrib;
+ } annot;
+ } args;
+};
+
+/* Values for sort keys */
+enum {
+ SORT_SEQUENCE = 0,
+ SORT_ARRIVAL,
+ SORT_CC,
+ SORT_DATE,
+ SORT_FROM,
+ SORT_SIZE,
+ SORT_SUBJECT,
+ SORT_TO,
+ SORT_ANNOTATION,
+ SORT_MODSEQ
+ /* values > 255 are reserved for internal use */
+};
+
+/* Sort key modifier flag bits */
+#define SORT_REVERSE (1<<0)
+
+/* Bitmask for status queries */
+enum {
+ STATUS_MESSAGES = (1<<0),
+ STATUS_RECENT = (1<<1),
+ STATUS_UIDNEXT = (1<<2),
+ STATUS_UIDVALIDITY = (1<<3),
+ STATUS_UNSEEN = (1<<4),
+ STATUS_HIGHESTMODSEQ = (1<<5)
+};
+
+/* Bitmask for list options */
+enum {
+ LIST_LSUB = (1<<0),
+ LIST_EXT = (1<<1),
+ LIST_SUBSCRIBED = (1<<2),
+ LIST_CHILDREN = (1<<3),
+ LIST_REMOTE = (1<<4)
+};
+
+extern struct protstream *imapd_out, *imapd_in;
+
+extern void index_closemailbox(struct mailbox *mailbox);
+extern void index_newmailbox(struct mailbox *mailbox, int examine_mode);
+extern void index_operatemailbox(struct mailbox *mailbox);
+extern void index_check(struct mailbox *mailbox, int usinguid,
+ int checkseen);
+extern void index_checkseen(struct mailbox *mailbox, int quiet,
+ int usinguid, int oldexists);
+
+extern int index_fetch(struct mailbox *mailbox, const char *sequence,
+ int usinguid, struct fetchargs *fetchargs,
+ int* fetchedsomething);
+extern int index_store(struct mailbox *mailbox, char *sequence,
+ int usinguid, struct storeargs *storeargs,
+ char **flag, int nflags);
+extern int index_search(struct mailbox *mailbox,
+ struct searchargs *searchargs, int usinguid);
+extern int find_thread_algorithm(char *arg);
+extern int index_sort(struct mailbox *mailbox, struct sortcrit *sortcrit,
+ struct searchargs *searchargs, int usinguid);
+extern int index_thread(struct mailbox *mailbox, int algorithm,
+ struct searchargs *searchargs, int usinguid);
+extern int index_copy(struct mailbox *mailbox, char *sequence,
+ int usinguid, char *name, char **copyuidp, int nolink);
+extern int index_status(struct mailbox *mailbox, char *name,
+ int statusitems);
+
+extern int index_getuids(struct mailbox *mailbox, unsigned lowuid);
+extern int index_getstate(struct mailbox *mailbox);
+extern int index_checkstate(struct mailbox *mailbox, unsigned indexdate,
+ unsigned seendate);
+
+extern int index_finduid(unsigned uid);
+extern int index_getuid(unsigned msgno);
+
+extern mailbox_decideproc_t index_expungeuidlist;
+
+/* See lib/charset.h for the definition of receiver. */
+extern void index_getsearchtext(struct mailbox* mailbox,
+ index_search_text_receiver_t receiver,
+ void* rock);
+
+#endif /* INCLUDED_IMAPD_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapparse.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapparse.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapparse.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/imapparse.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,315 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: imapparse.c,v 1.13.2.2 2006/03/17 14:25:45 murch Exp $ */
+
+#include <config.h>
+
+#include <ctype.h>
+#include <string.h>
+#include <limits.h>
+
+#include "prot.h"
+#include "xmalloc.h"
+#include "global.h"
+#include "exitcodes.h"
+
+enum {
+ MAXQUOTED = 32768,
+ MAXWORD = 32768,
+ MAXLITERAL = INT_MAX / 20
+};
+
+void freebuf(struct buf *buf)
+{
+ if (buf->s) {
+ free(buf->s);
+ buf->s = NULL;
+ }
+ buf->len = 0;
+ buf->alloc = 0;
+}
+
+/*
+ * Parse a word
+ * (token not containing whitespace, parens, or double quotes)
+ */
+#define BUFGROWSIZE 100
+int getword(struct protstream *in, struct buf *buf)
+{
+ int c;
+ int len = 0;
+
+ if (buf->alloc == 0) {
+ buf->alloc = BUFGROWSIZE;
+ buf->s = xmalloc(buf->alloc+1);
+ }
+
+ for (;;) {
+ c = prot_getc(in);
+ if (c == EOF || isspace(c) || c == '(' || c == ')' || c == '\"') {
+ buf->s[len] = '\0';
+ buf->len = len;
+ return c;
+ }
+ if (len == buf->alloc) {
+ /* xxx limit len */
+ buf->alloc += BUFGROWSIZE;
+ buf->s = xrealloc(buf->s, buf->alloc+1);
+ if (len > MAXWORD) {
+ fatal("word too long", EC_IOERR);
+ }
+ }
+ buf->s[len++] = c;
+ }
+}
+
+/*
+ * Parse an xstring
+ * (astring, nstring or string based on type)
+ */
+int getxstring(struct protstream *pin, struct protstream *pout,
+ struct buf *buf, int type)
+{
+ int c;
+ int i;
+ int len = 0;
+ int sawdigit = 0;
+ int isnowait;
+
+ if (buf->alloc == 0) {
+ buf->alloc = BUFGROWSIZE;
+ buf->s = xmalloc(buf->alloc+1);
+ }
+
+ c = prot_getc(pin);
+ switch (c) {
+ case EOF:
+ case ' ':
+ case '(':
+ case ')':
+ case '\r':
+ case '\n':
+ /* Invalid starting character */
+ buf->s[0] = '\0';
+ buf->len = 0;
+ if (c != EOF) prot_ungetc(c, pin);
+ return EOF;
+
+ case '\"':
+ /*
+ * Quoted-string. Server is liberal in accepting qspecials
+ * other than double-quote, CR, and LF.
+ */
+ for (;;) {
+ c = prot_getc(pin);
+ if (c == '\\') {
+ c = prot_getc(pin);
+ }
+ else if (c == '\"') {
+ buf->s[len] = '\0';
+ buf->len = len;
+ return prot_getc(pin);
+ }
+ else if (c == EOF || c == '\r' || c == '\n') {
+ buf->s[len] = '\0';
+ buf->len = len;
+ if (c != EOF) prot_ungetc(c, pin);
+ return EOF;
+ }
+ if (len == buf->alloc) {
+ buf->alloc += BUFGROWSIZE;
+ buf->s = xrealloc(buf->s, buf->alloc+1);
+
+ if (len > MAXQUOTED) {
+ fatal("word too long", EC_IOERR);
+ }
+ }
+ buf->s[len++] = c;
+ }
+
+ case '{':
+ if (type == IMAP_QSTRING) {
+ /* Invalid starting character */
+ buf->s[0] = '\0';
+ buf->len = 0;
+ if (c != EOF) prot_ungetc(c, pin);
+ return EOF;
+ }
+
+ /* Literal */
+ isnowait = 0;
+ buf->s[0] = '\0';
+ while ((c = prot_getc(pin)) != EOF && isdigit(c)) {
+ sawdigit = 1;
+ len = len*10 + c - '0';
+ if (len > MAXLITERAL || len < 0) {
+ /* we overflowed */
+ fatal("literal too big", EC_IOERR);
+ }
+ }
+ if (c == '+') {
+ isnowait++;
+ c = prot_getc(pin);
+ }
+ if (!sawdigit || c != '}') {
+ if (c != EOF) prot_ungetc(c, pin);
+ return EOF;
+ }
+ c = prot_getc(pin);
+ if (c != '\r') {
+ if (c != EOF) prot_ungetc(c, pin);
+ return EOF;
+ }
+ c = prot_getc(pin);
+ if (c != '\n') {
+ if (c != EOF) prot_ungetc(c, pin);
+ return EOF;
+ }
+ /* xxx limit len */
+
+ if (len >= buf->alloc) {
+ buf->alloc = len+1;
+ buf->s = xrealloc(buf->s, buf->alloc+1);
+ }
+ if (!isnowait) {
+ prot_printf(pout, "+ go ahead\r\n");
+ prot_flush(pout);
+ }
+ for (i = 0; i < len; i++) {
+ c = prot_getc(pin);
+ if (c == EOF) {
+ buf->s[len] = '\0';
+ buf->len = len;
+ return EOF;
+ }
+ buf->s[i] = c;
+ }
+ buf->s[len] = '\0';
+ buf->len = len;
+ if (type != IMAP_BIN_ASTRING && strlen(buf->s) != len)
+ return EOF; /* Disallow imbedded NUL for non IMAP_BIN_ASTRING */
+ return prot_getc(pin);
+
+ default:
+ switch (type) {
+ case IMAP_BIN_ASTRING: /* binary-allowed ASTRING */
+ case IMAP_ASTRING: /* atom, quoted-string or literal */
+ /*
+ * Atom -- server is liberal in accepting specials other
+ * than whitespace, parens, or double quotes
+ */
+ for (;;) {
+ if (c == EOF || isspace(c) || c == '(' ||
+ c == ')' || c == '\"') {
+ buf->s[len] = '\0';
+ buf->len = len;
+ return c;
+ }
+ if (len == buf->alloc) {
+ buf->alloc += BUFGROWSIZE;
+ buf->s = xrealloc(buf->s, buf->alloc+1);
+ /* xxx limit size of atoms */
+ }
+ buf->s[len++] = c;
+ c = prot_getc(pin);
+ }
+ /* never gets here */
+ break;
+
+ case IMAP_NSTRING: /* "NIL", quoted-string or literal */
+ /*
+ * Look for "NIL"
+ */
+ if (c == 'N') {
+ prot_ungetc(c, pin);
+ c = getword(pin, buf);
+ if (!strcmp(buf->s, "NIL"))
+ return c;
+ }
+ if (c != EOF) prot_ungetc(c, pin);
+ return EOF;
+ break;
+
+ case IMAP_QSTRING: /* quoted-string */
+ case IMAP_STRING: /* quoted-string or literal */
+ /* atoms aren't acceptable */
+ if (c != EOF) prot_ungetc(c, pin);
+ return EOF;
+ break;
+ }
+ }
+
+ return EOF;
+}
+
+/*
+ * Eat characters up to and including the next newline
+ * Also look for and eat non-synchronizing literals.
+ */
+void eatline(struct protstream *pin, int c)
+{
+ int state = 0;
+ char *statediagram = " {+}\r";
+ int size = -1;
+
+ for (;;) {
+ if (c == '\n') return;
+ if (c == statediagram[state+1]) {
+ state++;
+ if (state == 1) size = 0;
+ else if (c == '\r') {
+ /* Got a non-synchronizing literal */
+ c = prot_getc(pin);/* Eat newline */
+ while (size--) {
+ c = prot_getc(pin); /* Eat contents */
+ }
+ state = 0; /* Go back to scanning for eol */
+ }
+ }
+ else if (state == 1 && isdigit(c)) {
+ size = size * 10 + c - '0';
+ }
+ else state = 0;
+
+ c = prot_getc(pin);
+ if (c == EOF) return;
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5334 @@
+/* index.c -- Routines for dealing with the index file in the imapd
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+/*
+ * $Id: index.c,v 1.199.2.28 2006/07/05 19:51:30 murch Exp $
+ */
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <syslog.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "acl.h"
+#include "annotate.h"
+#include "append.h"
+#include "assert.h"
+#include "charset.h"
+#include "exitcodes.h"
+#include "hash.h"
+#include "imap_err.h"
+#include "global.h"
+#include "imapd.h"
+#include "lsort.h"
+#include "mailbox.h"
+#include "map.h"
+#include "message.h"
+#include "parseaddr.h"
+#include "search_engines.h"
+#include "seen.h"
+#include "strhash.h"
+#include "stristr.h"
+#include "util.h"
+#include "xmalloc.h"
+
+#include "index.h"
+#include "sync_log.h"
+
+extern void printastring (const char *s);
+
+/* The index and cache files, mapped into memory */
+static const char *index_base;
+static unsigned long index_len;
+static unsigned long index_dirty;
+static const char *cache_base;
+static unsigned long cache_len;
+static unsigned long cache_end;
+static unsigned long cache_dirty;
+
+/* Attributes of memory-mapped index file */
+static ino_t index_ino;
+static unsigned long start_offset;
+static unsigned long record_size;
+
+static unsigned lastnotrecent; /* Msgno of last non-\Recent message */
+
+static time_t *flagreport; /* Array for each msgno of last_updated when
+ * FLAGS data reported to client.
+ * Zero if FLAGS data never reported */
+static char *seenflag; /* Array for each msgno, nonzero if \Seen */
+static time_t seen_last_change; /* Last mod time of \Seen state change */
+static int flagalloced = -1; /* Allocated size of above two arrays */
+struct seen *seendb; /* Seen state database object */
+static char *seenuids; /* Sequence of UID's from last seen checkpoint */
+
+/* Forward declarations */
+typedef int index_sequenceproc_t(struct mailbox *mailbox, unsigned msgno,
+ void *rock);
+
+static int index_forsequence(struct mailbox *mailbox, const char *sequence,
+ int usinguid,
+ index_sequenceproc_t *proc, void *rock,
+ int* fetchedsomething);
+static int index_insequence(int num, char *sequence, int usinguid);
+
+void index_fetchmsg(const char *msg_base, unsigned long msg_size,
+ int format, unsigned offset, unsigned size,
+ unsigned start_octet, unsigned octet_count,
+ struct protstream *pout);
+static int index_fetchsection(const char *resp,
+ const char *msg_base, unsigned long msg_size,
+ int format, char *section,
+ const char *cacheitem, unsigned size,
+ unsigned start_octet, unsigned octet_count);
+static void index_fetchfsection(const char *msg_base,
+ unsigned long msg_size,
+ int format, struct fieldlist *fsection,
+ const char *cacheitem,
+ unsigned start_octet, unsigned octet_count);
+static char *index_readheader(const char *msg_base, unsigned long msg_size,
+ int format, unsigned offset, unsigned size);
+static void index_pruneheader(char *buf, struct strlist *headers,
+ struct strlist *headers_not);
+static void index_fetchheader(const char *msg_base, unsigned long msg_size,
+ int format, unsigned size,
+ struct strlist *headers,
+ struct strlist *headers_not);
+static void index_fetchcacheheader(unsigned msgno, struct strlist *headers,
+ unsigned start_octet, unsigned octet_count);
+static void index_listflags(struct mailbox *mailbox);
+static void index_fetchflags(struct mailbox *mailbox, unsigned msgno,
+ bit32 system_flags, bit32 *user_flags,
+ time_t last_updated);
+static index_sequenceproc_t index_fetchreply;
+static index_sequenceproc_t index_storeseen;
+static index_sequenceproc_t index_storeflag;
+static int index_search_evaluate(struct mailbox *mailbox,
+ struct searchargs *searchargs,
+ unsigned msgno, struct mapfile *msgfile);
+static int index_searchmsg(char *substr, comp_pat *pat,
+ struct mapfile *msgfile, int format,
+ int skipheader, const char *cacheitem);
+static int index_searchheader(char *name, char *substr, comp_pat *pat,
+ struct mapfile *msgfile, int format,
+ int size);
+static int index_searchcacheheader(unsigned msgno, char *name, char *substr,
+ comp_pat *pat);
+static index_sequenceproc_t index_copysetup;
+static int _index_search(unsigned **msgno_list, struct mailbox *mailbox,
+ struct searchargs *searchargs,
+ modseq_t *highestmodseq);
+
+static void parse_cached_envelope(char *env, char *tokens[], int tokens_size);
+static char *find_msgid(char *str, char **rem);
+static char *get_localpart_addr(const char *header);
+static char *index_extract_subject(const char *subj, size_t len, int *is_refwd);
+static char *_index_extract_subject(char *s, int *is_refwd);
+static void index_get_ids(MsgData *msgdata,
+ char *envtokens[], const char *headers);
+static MsgData *index_msgdata_load(unsigned *msgno_list, int n,
+ struct sortcrit *sortcrit);
+
+static void *index_sort_getnext(MsgData *node);
+static void index_sort_setnext(MsgData *node, MsgData *next);
+static int index_sort_compare(MsgData *md1, MsgData *md2,
+ struct sortcrit *call_data);
+static void index_msgdata_free(MsgData *md);
+
+static void *index_thread_getnext(Thread *thread);
+static void index_thread_setnext(Thread *thread, Thread *next);
+static int index_thread_compare(Thread *t1, Thread *t2,
+ struct sortcrit *call_data);
+static void index_thread_orderedsubj(unsigned *msgno_list, int nmsg,
+ int usinguid);
+static void index_thread_sort(Thread *root, struct sortcrit *sortcrit);
+static void index_thread_print(Thread *threads, int usinguid);
+static void index_thread_ref(unsigned *msgno_list, int nmsg, int usinguid);
+
+/* NOTE: Make sure these are listed in CAPABILITY_STRING */
+static const struct thread_algorithm thread_algs[] = {
+ { "ORDEREDSUBJECT", index_thread_orderedsubj },
+ { "REFERENCES", index_thread_ref },
+ { NULL, NULL }
+};
+
+/*
+ * A mailbox is about to be closed.
+ */
+void index_closemailbox(struct mailbox *mailbox)
+{
+ if (seendb) {
+ index_checkseen(mailbox, 1, 0, imapd_exists);
+ seen_close(seendb);
+ seendb = 0;
+ }
+ if (index_len) {
+ /* So what happens if these weren't cloned from this mailbox? */
+ if (index_dirty)
+ map_free(&index_base, &index_len);
+ if (cache_dirty)
+ map_free(&cache_base, &cache_len);
+ index_dirty = cache_dirty = index_len = cache_end = 0;
+ }
+}
+
+/*
+ * A new mailbox has been selected, map it into memory and do the
+ * initial CHECK.
+ */
+void index_newmailbox(struct mailbox *mailbox, int examine_mode)
+{
+ mailbox->keepingseen = (mailbox->myrights & ACL_SEEN);
+ mailbox->examining = examine_mode;
+ index_listflags(mailbox);
+ imapd_exists = -1;
+ index_check(mailbox, 0, 1);
+}
+
+void index_operatemailbox(struct mailbox *mailbox)
+{
+ index_dirty = cache_dirty = 0;
+ index_base = mailbox->index_base;
+ index_len = mailbox->index_len;
+ cache_base = mailbox->cache_base;
+ cache_len = mailbox->cache_len;
+ cache_end = mailbox->cache_size;
+
+ index_ino = mailbox->index_ino;
+ start_offset = mailbox->start_offset;
+ record_size = mailbox->record_size;
+ imapd_exists = mailbox->exists;
+}
+
+/*
+ * Check for and report updates
+ *
+ * If checkseen is 0, \Seen state will not be checkpointed
+ * If checkseen is 1, \Seen state will be checkpointed
+ * If checkseen is 2, \Seen state will be quietly checkpointed
+ */
+void index_check(struct mailbox *mailbox, int usinguid, int checkseen)
+{
+ struct stat sbuf;
+ int newexists, oldexists, oldmsgno, msgno, nexpunge, i, r;
+ struct index_record record;
+ time_t last_read;
+ bit32 user_flags[MAX_USER_FLAGS/32];
+
+ oldexists = imapd_exists;
+
+ /* Check for expunge */
+ if (index_len) {
+ char fnamebuf[MAX_MAILBOX_PATH+1], *path;
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+
+ if (stat(fnamebuf, &sbuf) != 0) {
+ if (errno == ENOENT) {
+ /* Mailbox has been deleted */
+ for(;imapd_exists > 0; imapd_exists--) {
+ prot_printf(imapd_out, "* 1 EXPUNGE\r\n");
+ }
+ mailbox->exists = 0;
+ imapd_exists = -1;
+ if (seendb) {
+ seen_close(seendb);
+ seendb = 0;
+ }
+ }
+ }
+ else if ((sbuf.st_ino != mailbox->index_ino) ||
+ (index_ino != mailbox->index_ino)) {
+ unsigned long olduidvalidity = mailbox->uidvalidity;
+
+ if (mailbox_open_index(mailbox)) {
+ fatal("failed to reopen index file", EC_IOERR);
+ }
+
+ if (olduidvalidity != mailbox->uidvalidity) {
+ /* Force a * OK [UIDVALIDITY n] message */
+ oldexists = -1;
+ }
+
+ for (oldmsgno = msgno = 1; oldmsgno <= imapd_exists;
+ oldmsgno++, msgno++) {
+ if (msgno <= mailbox->exists) {
+ mailbox_read_index_record(mailbox, msgno, &record);
+ }
+ else {
+ record.uid = mailbox->last_uid+1;
+ }
+
+ nexpunge = 0;
+ while (oldmsgno<=imapd_exists && UID(oldmsgno) < record.uid) {
+ nexpunge++;
+ oldmsgno++;
+ }
+ if (nexpunge) {
+ memmove(flagreport+msgno, flagreport+msgno+nexpunge,
+ (oldexists-msgno-nexpunge+1)*sizeof(*flagreport));
+ memmove(seenflag+msgno, seenflag+msgno+nexpunge,
+ (oldexists-msgno-nexpunge+1)*sizeof(*seenflag));
+ oldexists -= nexpunge;
+ while (nexpunge--) {
+ prot_printf(imapd_out, "* %u EXPUNGE\r\n", msgno);
+ }
+ }
+ }
+
+ /* Force re-map of index/cache files */
+ map_free(&index_base, &index_len);
+ map_free(&cache_base, &cache_len);
+ cache_end = 0;
+ index_dirty = cache_dirty = 0;
+
+ /* Force a * n EXISTS message */
+ imapd_exists = -1;
+ }
+ else if (sbuf.st_mtime != mailbox->index_mtime
+ || sbuf.st_size != mailbox->index_size) {
+ mailbox_read_index_header(mailbox);
+ }
+ }
+ index_ino = mailbox->index_ino;
+
+ start_offset = mailbox->start_offset;
+ record_size = mailbox->record_size;
+ newexists = mailbox->exists;
+
+ /* Refresh the index and cache files */
+ map_refresh(mailbox->index_fd, 0, &index_base, &index_len,
+ start_offset + newexists * record_size,
+ "index", mailbox->name);
+ index_dirty = 1;
+ if (fstat(mailbox->cache_fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: stating cache file for %s: %m",
+ mailbox->name);
+ fatal("failed to stat cache file", EC_IOERR);
+ }
+ if (cache_end < sbuf.st_size) {
+ cache_end = sbuf.st_size;
+ map_refresh(mailbox->cache_fd, 0, &cache_base, &cache_len,
+ cache_end, "cache", mailbox->name);
+ cache_dirty = 1;
+ }
+
+ /* If opening mailbox, get \Recent info */
+ if (oldexists == -1 && mailbox->keepingseen) {
+ r = seen_open(mailbox, imapd_userid, SEEN_CREATE, &seendb);
+ if (!r) {
+ free(seenuids);
+ seenuids = NULL;
+ r = seen_lockread(seendb, &last_read, &mailbox->recentuid,
+ &seen_last_change, &seenuids);
+ if (r) seen_close(seendb);
+ }
+ if (r) {
+ seendb = 0;
+ prot_printf(imapd_out, "* OK (seen state failure) %s: %s\r\n",
+ error_message(IMAP_NO_CHECKPRESERVE), error_message(r));
+ syslog(LOG_ERR, "Could not open seen state for %s (%s)",
+ imapd_userid, error_message(r));
+ }
+ else {
+ /*
+ * Empty seenuids so that index_checkseen() will pick up the
+ * initial \Seen info. Leave the database locked.
+ */
+ *seenuids = '\0';
+ }
+ }
+
+ /* If opening mailbox or had an EXPUNGE, find where \Recent starts */
+ if (imapd_exists == -1) {
+ imapd_exists = newexists;
+ lastnotrecent = index_finduid(mailbox->recentuid);
+ imapd_exists = -1;
+ }
+
+ /* If EXISTS changed, report it */
+ if (newexists != imapd_exists) {
+ /* Re-size flagreport and seenflag arrays if necessary */
+ if (newexists > flagalloced) {
+ /* Double what we need in hopes we won't have to realloc again */
+ flagalloced = newexists * 2;
+ flagreport = (time_t *)
+ xrealloc((char *)flagreport, (flagalloced+1) * sizeof(time_t));
+ seenflag = xrealloc(seenflag, flagalloced+1);
+ }
+
+ /* Zero out array entry for newly arrived messages */
+ for (i = oldexists+1; i <= newexists; i++) {
+ flagreport[i] = LAST_UPDATED(i);
+ seenflag[i] = 0;
+ }
+
+ checkseen = 1;
+ imapd_exists = newexists;
+ prot_printf(imapd_out, "* %u EXISTS\r\n* %u RECENT\r\n", imapd_exists,
+ imapd_exists-lastnotrecent);
+ }
+
+ /* Check Flags */
+ if (checkseen) index_checkseen(mailbox, checkseen >> 1, usinguid, oldexists);
+ else if (oldexists == -1) seen_unlock(seendb);
+ for (i = 1; i <= imapd_exists && seenflag[i]; i++);
+ if (i == imapd_exists + 1) mailbox->allseen = mailbox->last_uid;
+ if (oldexists == -1) {
+ if (imapd_exists && i <= imapd_exists) {
+ prot_printf(imapd_out, "* OK [UNSEEN %u] \r\n", i);
+ }
+ prot_printf(imapd_out, "* OK [UIDVALIDITY %lu] \r\n",
+ mailbox->uidvalidity);
+ prot_printf(imapd_out, "* OK [UIDNEXT %lu] \r\n",
+ mailbox->last_uid + 1);
+ if (mailbox->options & OPT_IMAP_CONDSTORE) {
+ prot_printf(imapd_out, "* OK [HIGHESTMODSEQ " MODSEQ_FMT "] \r\n",
+ mailbox->highestmodseq);
+ } else {
+ prot_printf(imapd_out, "* OK [NOMODSEQ] Sorry, modsequences have "
+ "not been enabled on this mailbox\r\n");
+ }
+ }
+
+ for (msgno = 1; msgno <= oldexists; msgno++) {
+ if (flagreport[msgno] < LAST_UPDATED(msgno)) {
+ for (i = 0; i < VECTOR_SIZE(user_flags); i++) {
+ user_flags[i] = USER_FLAGS(msgno, i);
+ }
+ index_fetchflags(mailbox, msgno, SYSTEM_FLAGS(msgno), user_flags,
+ LAST_UPDATED(msgno));
+ if ((mailbox->options & OPT_IMAP_CONDSTORE) &&
+ imapd_condstore_client) {
+ prot_printf(imapd_out, " MODSEQ (" MODSEQ_FMT ")", MODSEQ(msgno));
+ }
+ if (usinguid) prot_printf(imapd_out, " UID %u", UID(msgno));
+ prot_printf(imapd_out, ")\r\n");
+ }
+ }
+}
+
+/*
+ * Checkpoint the user's \Seen state
+ *
+ * Format of the seenuids string:
+ *
+ * no whitespace, n:m indicates an inclusive range (n to m), otherwise
+ * list is comma separated of single messages, e.g.:
+ *
+ * 1:16239,16241:17015,17019:17096,17098,17100
+ *
+ */
+#define SAVEGROW 200
+void
+index_checkseen(mailbox, quiet, usinguid, oldexists)
+struct mailbox *mailbox;
+int quiet;
+int usinguid;
+int oldexists;
+{
+ int r;
+ time_t last_read;
+ unsigned last_uid;
+ char *newseenuids;
+ char *old, *new;
+ unsigned oldnext = 0, oldseen = 0;
+ unsigned newnext = 0, newseen = 0;
+ int neweof = 0;
+ unsigned msgno, uid, dirty = 0;
+ int i;
+ bit32 user_flags[MAX_USER_FLAGS/32];
+ char *saveseenuids, *save;
+ int savealloced;
+ unsigned start, newallseen, inrange, usecomma;
+ mailbox_notifyproc_t *updatenotifier;
+ int dosync = 0;
+
+ if (!mailbox->keepingseen || !seendb) return;
+ if (imapd_exists == 0) {
+ seen_unlock(seendb);
+ return;
+ }
+
+ /* Lock \Seen database and read current values */
+ r = seen_lockread(seendb, &last_read, &last_uid, &seen_last_change,
+ &newseenuids);
+ if (r) {
+ prot_printf(imapd_out, "* OK %s: %s\r\n",
+ error_message(IMAP_NO_CHECKSEEN), error_message(r));
+ seen_close(seendb);
+ return;
+ }
+
+ /*
+ * Propagate changes in the database to the seenflag[] array
+ * and possibly to the client.
+ */
+ old = seenuids;
+ new = newseenuids;
+ while (isdigit((int) *old)) oldnext = oldnext * 10 + *old++ - '0';
+ while (isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
+
+ for (msgno = 1; msgno <= imapd_exists; msgno++) {
+ uid = UID(msgno);
+ while (oldnext <= uid) {
+ if (*old != ':' && !oldseen && oldnext == uid) {
+ oldseen = 1;
+ break;
+ }
+ else {
+ oldseen = (*old == ':');
+ oldnext = 0;
+ if (!*old) oldnext = mailbox->last_uid+1;
+ else old++;
+ while (isdigit((int) *old)) {
+ oldnext = oldnext * 10 + *old++ - '0';
+ }
+ oldnext += oldseen;
+ }
+ }
+ while (newnext <= uid) {
+ if (*new != ':' && !newseen && newnext == uid) {
+ newseen = 1;
+ break;
+ }
+ else {
+ newseen = (*new == ':');
+ newnext = 0;
+ if (!*new) {
+ newnext = mailbox->last_uid+1;
+ neweof++;
+ }
+ else new++;
+ while (isdigit((int) *new)) {
+ newnext = newnext * 10 + *new++ - '0';
+ }
+ newnext += newseen;
+ }
+ }
+
+ /* report flags that have changed */
+ if (oldseen != newseen) {
+ if (seenflag[msgno] != newseen) {
+ seenflag[msgno] = newseen;
+ if (!quiet && msgno <= oldexists && oldexists != -1) {
+ for (i = 0; i < VECTOR_SIZE(user_flags); i++) {
+ user_flags[i] = USER_FLAGS(msgno, i);
+ }
+ index_fetchflags(mailbox, msgno, SYSTEM_FLAGS(msgno),
+ user_flags, LAST_UPDATED(msgno));
+ if ((mailbox->options & OPT_IMAP_CONDSTORE) &&
+ imapd_condstore_client) {
+ prot_printf(imapd_out, " MODSEQ (" MODSEQ_FMT ")",
+ MODSEQ(msgno));
+ }
+ if (usinguid) {
+ prot_printf(imapd_out, " UID %u", UID(msgno));
+ }
+ prot_printf(imapd_out, ")\r\n");
+ }
+ }
+ }
+ else if (seenflag[msgno] != newseen) {
+ dirty++;
+ }
+ }
+
+ if (dirty) {
+ seen_last_change = time((time_t *)0);
+ dosync = 1;
+ }
+
+ if (!mailbox->examining && oldexists != imapd_exists) {
+ /* If just did a SELECT, record time of our reading the mailbox */
+ if (oldexists == -1) last_read = time((time_t *)0);
+
+ /* Track last_uid changes, but not last_read. Tracking last_read
+ * would cause a sync on every SELECT operation, and our (hacked)
+ * FUD doesn't use the information anyway
+ */
+ if (last_uid != mailbox->last_uid)
+ dosync = 1;
+
+ /* Update the \Recent high-water mark */
+ last_uid = mailbox->last_uid;
+ dirty++;
+ }
+
+ /* If there's nothing to save back to the database, clean up and return */
+ if (!dirty) {
+ seen_unlock(seendb);
+ free(seenuids);
+ seenuids = newseenuids;
+ /* We might have deleted our last unseen message */
+ if (!mailbox->allseen) {
+ for (msgno = 1; msgno <= imapd_exists; msgno++) {
+ if (!seenflag[msgno]) break;
+ }
+#if TOIMSP
+ if (msgno == imapd_exists + 1) {
+ toimsp(mailbox->name, mailbox->uidvalidity,
+ "SEENsnn", imapd_userid, mailbox->last_uid,
+ seen_last_change, 0);
+ }
+#endif
+ }
+ return;
+ }
+
+ /* Build the seenuids string to save to the database */
+ start = 1;
+ inrange = 1;
+ newallseen = mailbox->last_uid;
+ usecomma = 0;
+ savealloced = SAVEGROW;
+ save = saveseenuids = xmalloc(savealloced);
+ *save = '\0';
+ for (msgno = 1; msgno <= imapd_exists; msgno++) {
+ uid = UID(msgno);
+ if (seenflag[msgno] != inrange) {
+ newallseen = 0;
+ if (inrange) {
+ if (start == uid-1) {
+ if (usecomma++) *save++ = ',';
+ sprintf(save, "%u", start);
+ save += strlen(save);
+ }
+ else if (uid > 1) {
+ if (usecomma++) *save++ = ',';
+ sprintf(save, "%u:", start);
+ save += strlen(save);
+ sprintf(save, "%u", uid-1);
+ save += strlen(save);
+ }
+ inrange = 0;
+ }
+ else {
+ start = uid;
+ inrange = 1;
+ }
+ }
+ if (save - saveseenuids > savealloced - 30) {
+ savealloced += SAVEGROW;
+ saveseenuids = xrealloc(saveseenuids, savealloced);
+ save = saveseenuids + strlen(saveseenuids);
+ }
+ }
+
+ /* Any messages between uid+1 and mailbox->last_uid get same disposition
+ * as uid
+ */
+ uid = mailbox->last_uid;
+ while (newnext <= uid) {
+ if (*new != ':' && !newseen && newnext == uid) {
+ newseen = 1;
+ break;
+ }
+ else {
+ newseen = (*new == ':');
+ newnext = 0;
+ if (!*new) {
+ newnext = mailbox->last_uid+1;
+ neweof++;
+ }
+ else new++;
+ while (isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
+ newnext += newseen;
+ }
+ }
+
+ if (inrange) {
+ /* Last message read. */
+ if (newseen && newnext > uid+1) {
+ /* We parsed a range which went past uid. Include it in output. */
+ uid = newnext-1;
+ }
+ else if (!neweof && !newseen && newnext == uid+1) {
+ /* We parsed ",N" where N is one past uid. Include it
+ * in the output range */
+ if (*new == ':') {
+ /* There's a ":M" after the ",N". Parse/include that too. */
+ new++;
+ newnext = 0;
+ while (isdigit((int) *new)) newnext = newnext * 10 + *new++ - '0';
+ }
+ uid = newnext;
+ newseen++; /* Forget we parsed ",N" */
+ }
+
+ if (!start && uid > 1) start = 1;
+ if (usecomma++) *save++ = ',';
+ if (start && start != uid) {
+ sprintf(save, "%u:", start);
+ save += strlen(save);
+ }
+ sprintf(save, "%u", uid);
+ save += strlen(save);
+
+ if (!neweof && !newseen) {
+ /* Parsed a lone number */
+ if (usecomma++) *save++ = ',';
+ sprintf(save, "%u", newnext);
+ save += strlen(save);
+ }
+ }
+ else if (newseen && newnext > uid+1) {
+ /* We parsed a range which went past uid. Include it in output */
+ if (usecomma++) *save++ = ',';
+ if (newnext > uid+2) {
+ sprintf(save, "%u:", uid+1);
+ save += strlen(save);
+ }
+ sprintf(save, "%u", newnext-1);
+ save += strlen(save);
+ }
+ else if (*new == ':') {
+ /* Parsed first half of a range. Write it out */
+ if (usecomma++) *save++ = ',';
+ sprintf(save, "%u", uid+1);
+ save += strlen(save);
+ }
+ else if (!neweof && !newseen) {
+ /* Parsed a lone number */
+ if (usecomma++) *save++ = ',';
+ sprintf(save, "%u", newnext);
+ save += strlen(save);
+ }
+
+ if (*new) {
+ if (save - saveseenuids + strlen(new) >= savealloced) {
+ savealloced += strlen(new);
+ saveseenuids = xrealloc(saveseenuids, savealloced);
+ save = saveseenuids + strlen(saveseenuids);
+ }
+ strcpy(save, usecomma ? new : new+1);
+ }
+
+ /* Write the changes, clean up, and return */
+ r = seen_write(seendb, last_read, last_uid, seen_last_change, saveseenuids);
+ seen_unlock(seendb);
+ free(seenuids);
+
+ if (r) {
+ prot_printf(imapd_out, "* OK %s: %s\r\n",
+ error_message(IMAP_NO_CHECKSEEN), error_message(r));
+ free(saveseenuids);
+ seenuids = newseenuids;
+ return;
+ }
+
+ /* (oldexists == imapd_exists) => mailbox already open? */
+ /* Has to be here:
+ * imapd.c doesn't have enough context to work out where seen flags set.
+ * Downside: we have to link sync_client, sync_server with sync_log */
+ if (!r && dosync) {
+ sync_log_seen(imapd_userid, mailbox->name);
+ }
+
+#if TOIMSP
+ if (newallseen) {
+ toimsp(mailbox->name, mailbox->uidvalidity, "SEENsnn", imapd_userid,
+ mailbox->last_uid, seen_last_change, 0);
+ }
+ else if (mailbox->allseen == mailbox->last_uid) {
+ toimsp(mailbox->name, mailbox->uidvalidity, "SEENsnn", imapd_userid,
+ 0, seen_last_change, 0);
+ }
+#endif
+
+ free(newseenuids);
+ seenuids = saveseenuids;
+
+ updatenotifier = mailbox_get_updatenotifier();
+ if (updatenotifier) updatenotifier(mailbox);
+}
+
+
+/*
+ * Perform a FETCH-related command on a sequence.
+ * Fetchedsomething argument is 0 if nothing was fetched, 1 if something was
+ * fetched. (A fetch command that fetches nothing is not a valid fetch
+ * command.)
+ */
+int
+index_fetch(struct mailbox* mailbox,
+ const char* sequence,
+ int usinguid,
+ struct fetchargs* fetchargs,
+ int* fetchedsomething)
+{
+ *fetchedsomething = 0;
+ return index_forsequence(mailbox, sequence, usinguid, index_fetchreply,
+ (char *)fetchargs, fetchedsomething);
+}
+
+/*
+ * Perform a STORE command on a sequence
+ */
+int
+index_store(mailbox, sequence, usinguid, storeargs, flag, nflags)
+struct mailbox *mailbox;
+char *sequence;
+int usinguid;
+struct storeargs *storeargs;
+char **flag;
+int nflags;
+{
+ int i, r, userflag, emptyflag;
+ int writeheader = 0;
+ int newflag[MAX_USER_FLAGS];
+ long myrights = mailbox->myrights;
+
+ /* Handle simple case of just changing /Seen */
+ if (!(mailbox->options & OPT_IMAP_CONDSTORE) &&
+ storeargs->operation != STORE_REPLACE &&
+ !storeargs->system_flags && !nflags) {
+ if (!storeargs->seen) return 0; /* Nothing to change */
+ if (!(myrights & ACL_SEEN)) return IMAP_PERMISSION_DENIED;
+ storeargs->usinguid = usinguid;
+
+ index_forsequence(mailbox, sequence, usinguid,
+ index_storeseen, (char *)storeargs, NULL);
+ return 0;
+ }
+
+ mailbox_read_acl(mailbox, imapd_authstate);
+ myrights &= mailbox->myrights;
+
+ /* First pass at checking permission */
+ if ((storeargs->seen && !(myrights & ACL_SEEN)) ||
+ ((storeargs->system_flags & FLAG_DELETED) &&
+ !(myrights & ACL_DELETEMSG)) ||
+ (((storeargs->system_flags & ~FLAG_DELETED) || nflags) &&
+ !(myrights & ACL_WRITE))) {
+ mailbox->myrights = myrights;
+ return IMAP_PERMISSION_DENIED;
+ }
+
+ /* Check to see if we have to add new user flags */
+ for (userflag=0; userflag < VECTOR_SIZE(newflag); userflag++)
+ newflag[userflag] = 0;
+ for (i=0; i < nflags; i++) {
+ emptyflag = -1;
+ for (userflag = 0; userflag < VECTOR_SIZE(mailbox->flagname); userflag++) {
+ if (mailbox->flagname[userflag]) {
+ if (!strcasecmp(flag[i], mailbox->flagname[userflag]))
+ break;
+ }
+ else if (!newflag[userflag] && emptyflag == -1) {
+ emptyflag = userflag;
+ }
+ }
+ if (userflag == MAX_USER_FLAGS) {
+ if (emptyflag == -1) {
+ return IMAP_USERFLAG_EXHAUSTED;
+ }
+ newflag[emptyflag] = 1;
+ writeheader++;
+ }
+ }
+
+ /* Add the new user flags */
+ if (writeheader) {
+ r = mailbox_lock_header(mailbox);
+ if (r) return r;
+
+ /*
+ * New flags might have been assigned since we last looked
+ * Do the assignment again.
+ */
+ for (userflag=0; userflag < VECTOR_SIZE(newflag); userflag++)
+ newflag[userflag] = 0;
+ for (i=0; i < nflags; i++) {
+ emptyflag = -1;
+ for (userflag = 0; userflag < VECTOR_SIZE(newflag); userflag++) {
+ if (mailbox->flagname[userflag]) {
+ if (!strcasecmp(flag[i], mailbox->flagname[userflag]))
+ break;
+ }
+ else if (emptyflag == -1) {
+ emptyflag = userflag;
+ }
+ }
+ if (userflag == MAX_USER_FLAGS) {
+ if (emptyflag == -1) {
+ mailbox_unlock_header(mailbox);
+ mailbox->myrights = myrights;
+
+ /* Undo the new assignments */
+ for (userflag=0; userflag < VECTOR_SIZE(newflag); userflag++) {
+ if (newflag[userflag] && mailbox->flagname[userflag]) {
+ free(mailbox->flagname[userflag]);
+ mailbox->flagname[userflag] = 0;
+ }
+ }
+
+ /* Tell client about new flags we read while looking */
+ index_listflags(mailbox);
+
+ return IMAP_USERFLAG_EXHAUSTED;
+ }
+ mailbox->flagname[emptyflag] = xstrdup(flag[i]);
+ }
+ }
+
+ /* Tell client about new flags */
+ index_listflags(mailbox);
+
+ r = mailbox_write_header(mailbox);
+ mailbox_unlock_header(mailbox);
+ mailbox->myrights = myrights;
+ if (r) return r;
+ }
+ /* Not reading header anymore--can put back our working ACL */
+ mailbox->myrights = myrights;
+
+ /* Now we know all user flags are in the mailbox header, find the bits */
+ for (i=0; i < nflags; i++) {
+ for (userflag = 0; userflag < VECTOR_SIZE(mailbox->flagname); userflag++) {
+ if (mailbox->flagname[userflag]) {
+ if (!strcasecmp(flag[i], mailbox->flagname[userflag]))
+ break;
+ }
+ }
+ assert(userflag != MAX_USER_FLAGS);
+ storeargs->user_flags[userflag/32] |= 1<<(userflag&31);
+ }
+
+ storeargs->update_time = time((time_t *)0);
+ storeargs->usinguid = usinguid;
+
+ r = mailbox_lock_index(mailbox);
+ if (r) return r;
+
+ r = index_forsequence(mailbox, sequence, usinguid,
+ index_storeflag, (char *)storeargs, NULL);
+
+ /* note that index_forsequence() doesn't sync the index file;
+ that's done below in mailbox_write_index_header() */
+ if (mailbox->dirty) {
+ if (mailbox->options & OPT_IMAP_CONDSTORE) {
+ /* bump HIGHESTMODSEQ */
+ mailbox->highestmodseq++;
+ }
+ /* xxx what to do on failure? */
+ mailbox_write_index_header(mailbox);
+ mailbox->dirty = 0;
+ }
+
+ mailbox_unlock_index(mailbox);
+
+ /* Refresh the index file, for systems without mmap() */
+ map_refresh(mailbox->index_fd, 0, &index_base, &index_len,
+ start_offset + imapd_exists * record_size,
+ "index", mailbox->name);
+ index_dirty = 1;
+
+ return r;
+}
+
+/*
+ * Guts of the SEARCH command.
+ *
+ * Returns message numbers in an array. This function is used by
+ * SEARCH, SORT and THREAD.
+ */
+static int _index_search(unsigned **msgno_list, struct mailbox *mailbox,
+ struct searchargs *searchargs,
+ modseq_t *highestmodseq)
+{
+ unsigned msgno;
+ struct mapfile msgfile;
+ int n = 0;
+ int listindex;
+ int listcount;
+
+ if (imapd_exists <= 0) return 0;
+
+ *msgno_list = (unsigned *) xmalloc(imapd_exists * sizeof(unsigned));
+
+ /* OK, so I'm being a bit clever here. We fill the msgno list with
+ a list of message IDs returned by the search engine. Then we
+ scan through the list and store matching message IDs back into the
+ list. This is OK because we only overwrite message IDs that we've
+ already looked at. */
+ listcount = search_prefilter_messages(*msgno_list, mailbox, searchargs);
+
+ for (listindex = 0; listindex < listcount; listindex++) {
+ msgno = (*msgno_list)[listindex];
+ msgfile.base = 0;
+ msgfile.size = 0;
+
+ if (index_search_evaluate(mailbox, searchargs, msgno, &msgfile)) {
+ (*msgno_list)[n++] = msgno;
+ if (highestmodseq && (MODSEQ(msgno) > *highestmodseq)) {
+ *highestmodseq = MODSEQ(msgno);
+ }
+ }
+ if (msgfile.base) {
+ mailbox_unmap_message(mailbox, UID(msgno),
+ &msgfile.base, &msgfile.size);
+ }
+ }
+
+ /* if we didn't find any matches, free msgno_list */
+ if (!n && *msgno_list) {
+ free(*msgno_list);
+ *msgno_list = NULL;
+ }
+
+ return n;
+}
+
+int index_getuid(unsigned msgno) {
+ return UID(msgno);
+}
+
+/* 'uid_list' is malloc'd string representing the hits from searchargs;
+ returns number of hits */
+int index_getuidsequence(struct mailbox *mailbox,
+ struct searchargs *searchargs,
+ unsigned **uid_list)
+{
+ unsigned *msgno_list;
+ int i, n;
+
+ n = _index_search(&msgno_list, mailbox, searchargs, NULL);
+ if (n == 0) {
+ *uid_list = NULL;
+ return 0;
+ }
+
+ for (i = 0; i < n; i++) {
+ msgno_list[i] = UID(msgno_list[i]);
+ }
+
+ *uid_list = msgno_list;
+ return n;
+}
+
+/*
+ * Performs a SEARCH command.
+ * This is a wrapper around _index_search() which simply prints the results.
+ */
+int index_search(struct mailbox *mailbox, struct searchargs *searchargs,
+ int usinguid)
+{
+ unsigned *msgno_list;
+ int i, n;
+ modseq_t highestmodseq = 0;
+
+ n = _index_search(&msgno_list, mailbox, searchargs,
+ searchargs->modseq ? &highestmodseq : NULL);
+
+ prot_printf(imapd_out, "* SEARCH");
+
+ for (i = 0; i < n; i++)
+ prot_printf(imapd_out, " %u",
+ usinguid ? UID(msgno_list[i]) : msgno_list[i]);
+
+ if (n) free(msgno_list);
+
+ if (highestmodseq) {
+ prot_printf(imapd_out, " (MODSEQ " MODSEQ_FMT ")", highestmodseq);
+ }
+
+ prot_printf(imapd_out, "\r\n");
+
+ return n;
+}
+
+/*
+ * Performs a SORT command
+ */
+int index_sort(struct mailbox *mailbox, struct sortcrit *sortcrit,
+ struct searchargs *searchargs, int usinguid)
+{
+ unsigned *msgno_list;
+ MsgData *msgdata = NULL, *freeme = NULL;
+ int nmsg;
+ clock_t start;
+ modseq_t highestmodseq = 0;
+ int i, modseq = 0;
+
+ if(CONFIG_TIMING_VERBOSE)
+ start = clock();
+
+ if (searchargs->modseq) modseq = 1;
+ else {
+ for (i = 0; sortcrit[i].key != SORT_SEQUENCE; i++) {
+ if (sortcrit[i].key == SORT_MODSEQ) {
+ modseq = 1;
+ break;
+ }
+ }
+ }
+
+ /* Search for messages based on the given criteria */
+ nmsg = _index_search(&msgno_list, mailbox, searchargs,
+ modseq ? &highestmodseq : NULL);
+
+ prot_printf(imapd_out, "* SORT");
+
+ if (nmsg) {
+ /* Create/load the msgdata array */
+ freeme = msgdata = index_msgdata_load(msgno_list, nmsg, sortcrit);
+ free(msgno_list);
+
+ /* Sort the messages based on the given criteria */
+ msgdata = lsort(msgdata,
+ (void * (*)(void*)) index_sort_getnext,
+ (void (*)(void*,void*)) index_sort_setnext,
+ (int (*)(void*,void*,void*)) index_sort_compare,
+ sortcrit);
+
+ /* Output the sorted messages */
+ while (msgdata) {
+ prot_printf(imapd_out, " %u",
+ usinguid ? UID(msgdata->msgno) : msgdata->msgno);
+
+ /* free contents of the current node */
+ index_msgdata_free(msgdata);
+
+ msgdata = msgdata->next;
+ }
+
+ /* free the msgdata array */
+ free(freeme);
+ }
+
+ if (highestmodseq) {
+ prot_printf(imapd_out, " (MODSEQ " MODSEQ_FMT ")", highestmodseq);
+ }
+
+ prot_printf(imapd_out, "\r\n");
+
+ /* debug */
+ if (CONFIG_TIMING_VERBOSE) {
+ int len;
+ char *key_names[] = { "SEQUENCE", "ARRIVAL", "CC", "DATE", "FROM",
+ "SIZE", "SUBJECT", "TO", "ANNOTATION", "MODSEQ" };
+ char buf[1024] = "";
+
+ while (sortcrit->key && sortcrit->key < VECTOR_SIZE(key_names)) {
+ if (sortcrit->flags & SORT_REVERSE)
+ strlcat(buf, "REVERSE ", sizeof(buf));
+
+ strlcat(buf, key_names[sortcrit->key], sizeof(buf));
+
+ switch (sortcrit->key) {
+ case SORT_ANNOTATION:
+ len = strlen(buf);
+ snprintf(buf + len, sizeof(buf) - len,
+ " \"%s\" \"%s\"",
+ sortcrit->args.annot.entry, sortcrit->args.annot.attrib);
+ break;
+ }
+ if ((++sortcrit)->key) strlcat(buf, " ", sizeof(buf));
+ }
+
+ syslog(LOG_DEBUG, "SORT (%s) processing time: %d msg in %f sec",
+ buf, nmsg, (clock() - start) / (double) CLOCKS_PER_SEC);
+ }
+
+ return nmsg;
+}
+
+/*
+ * Performs a THREAD command
+ */
+int index_thread(struct mailbox *mailbox, int algorithm,
+ struct searchargs *searchargs, int usinguid)
+{
+ unsigned *msgno_list;
+ int nmsg;
+ clock_t start;
+ modseq_t highestmodseq = 0;
+
+ if(CONFIG_TIMING_VERBOSE)
+ start = clock();
+
+ /* Search for messages based on the given criteria */
+ nmsg = _index_search(&msgno_list, mailbox, searchargs,
+ searchargs->modseq ? &highestmodseq : NULL);
+
+ if (nmsg) {
+ /* Thread messages using given algorithm */
+ (*thread_algs[algorithm].threader)(msgno_list, nmsg, usinguid);
+
+ free(msgno_list);
+
+ if (highestmodseq) {
+ prot_printf(imapd_out, " (MODSEQ " MODSEQ_FMT ")", highestmodseq);
+ }
+ }
+
+ /* print an empty untagged response */
+ else
+ index_thread_print(NULL, usinguid);
+
+ prot_printf(imapd_out, "\r\n");
+
+ if (CONFIG_TIMING_VERBOSE) {
+ /* debug */
+ syslog(LOG_DEBUG, "THREAD %s processing time: %d msg in %f sec",
+ thread_algs[algorithm].alg_name, nmsg,
+ (clock() - start) / (double) CLOCKS_PER_SEC);
+ }
+
+ return nmsg;
+}
+
+/*
+ * Performs a COPY command
+ */
+int
+index_copy(struct mailbox *mailbox,
+ char *sequence,
+ int usinguid,
+ char *name,
+ char **copyuidp,
+ int nolink)
+{
+ static struct copyargs copyargs;
+ int i;
+ unsigned long totalsize = 0;
+ int r;
+ struct appendstate append_mailbox;
+ char *copyuid;
+ int copyuid_len, copyuid_size;
+ int sepchar;
+ unsigned long uidvalidity;
+ unsigned long startuid, num;
+ long docopyuid;
+
+ *copyuidp = NULL;
+
+ copyargs.nummsg = 0;
+ index_forsequence(mailbox, sequence, usinguid, index_copysetup,
+ (char *)©args, NULL);
+
+ if (copyargs.nummsg == 0) return IMAP_NO_NOSUCHMSG;
+
+ for (i = 0; i < copyargs.nummsg; i++) {
+ totalsize += copyargs.copymsg[i].size;
+ }
+
+ r = append_setup(&append_mailbox, name, MAILBOX_FORMAT_NORMAL,
+ imapd_userid, imapd_authstate, ACL_INSERT, totalsize);
+ if (r) return r;
+
+ docopyuid = (append_mailbox.m.myrights & ACL_READ);
+
+ r = append_copy(mailbox, &append_mailbox, copyargs.nummsg,
+ copyargs.copymsg, nolink);
+ if (!r) append_commit(&append_mailbox, totalsize,
+ &uidvalidity, &startuid, &num);
+
+ if (!r) sync_log_mailbox_double(mailbox->name, name);
+
+ if (!r && docopyuid) {
+ copyuid_size = 1024;
+ copyuid = xmalloc(copyuid_size);
+ snprintf(copyuid, copyuid_size, "%lu", uidvalidity);
+ copyuid_len = strlen(copyuid);
+ sepchar = ' ';
+
+ for (i = 0; i < copyargs.nummsg; i++) {
+ if (copyuid_size < copyuid_len + 50) {
+ copyuid_size += 1024;
+ copyuid = xrealloc(copyuid, copyuid_size);
+ }
+ snprintf(copyuid+copyuid_len, copyuid_size-copyuid_len,
+ "%c%lu", sepchar, copyargs.copymsg[i].uid);
+ copyuid_len += strlen(copyuid+copyuid_len);
+ if (i+1 < copyargs.nummsg &&
+ copyargs.copymsg[i+1].uid == copyargs.copymsg[i].uid + 1) {
+ do {
+ i++;
+ } while (i+1 < copyargs.nummsg &&
+ copyargs.copymsg[i+1].uid == copyargs.copymsg[i].uid + 1);
+ snprintf(copyuid+copyuid_len, copyuid_size-copyuid_len, ":%lu",
+ copyargs.copymsg[i].uid);
+ copyuid_len += strlen(copyuid+copyuid_len);
+ }
+ sepchar = ',';
+ }
+ if (num == 1) {
+ snprintf(copyuid+copyuid_len, copyuid_size-copyuid_len, " %lu",
+ startuid);
+ } else {
+ snprintf(copyuid+copyuid_len, copyuid_size-copyuid_len, " %lu:%lu",
+ startuid, startuid + num - 1);
+ }
+ *copyuidp = copyuid;
+ }
+
+ return r;
+}
+
+/*
+ * Helper function to multiappend a message to remote mailbox
+ */
+static int index_appendremote(struct mailbox *mailbox,
+ unsigned msgno, void *rock)
+{
+ struct protstream *pout = (struct protstream *) rock;
+ const char *msg_base = 0;
+ unsigned long msg_size = 0;
+ bit32 system_flags;
+ bit32 user_flags[MAX_USER_FLAGS/32];
+ unsigned flag;
+ bit32 flagmask = 0;
+ char datebuf[30];
+ char sepchar = '(';
+
+ /* Open the message file */
+ if (mailbox_map_message(mailbox, UID(msgno), &msg_base, &msg_size)) {
+ return IMAP_NO_MSGGONE;
+ }
+
+ /* start the individual append */
+ prot_printf(pout, " ");
+
+ /* add system flags */
+ system_flags = SYSTEM_FLAGS(msgno);
+ if (system_flags & FLAG_ANSWERED) {
+ prot_printf(pout, "%c\\Answered", sepchar);
+ sepchar = ' ';
+ }
+ if (system_flags & FLAG_FLAGGED) {
+ prot_printf(pout, "%c\\Flagged", sepchar);
+ sepchar = ' ';
+ }
+ if (system_flags & FLAG_DRAFT) {
+ prot_printf(pout, "%c\\Draft", sepchar);
+ sepchar = ' ';
+ }
+ if (system_flags & FLAG_DELETED) {
+ prot_printf(pout, "%c\\Deleted", sepchar);
+ sepchar = ' ';
+ }
+ if (seenflag[msgno]) {
+ prot_printf(pout, "%c\\Seen", sepchar);
+ sepchar = ' ';
+ }
+
+ /* add user flags */
+ for (flag = 0; flag < VECTOR_SIZE(user_flags); flag++) {
+ user_flags[flag] = USER_FLAGS(msgno, flag);
+ }
+ for (flag = 0; flag < VECTOR_SIZE(mailbox->flagname); flag++) {
+ if ((flag & 31) == 0) {
+ flagmask = user_flags[flag/32];
+ }
+ if (mailbox->flagname[flag] && (flagmask & (1<<(flag & 31)))) {
+ prot_printf(pout, "%c%s", sepchar, mailbox->flagname[flag]);
+ sepchar = ' ';
+ }
+ }
+
+ /* add internal date */
+ cyrus_ctime(INTERNALDATE(msgno), datebuf);
+ prot_printf(pout, ") \"%s\" ", datebuf);
+
+ /* message literal */
+ index_fetchmsg(msg_base, msg_size, mailbox->format, 0, SIZE(msgno),
+ 0, 0, pout);
+
+ /* close the message file */
+ if (msg_base) {
+ mailbox_unmap_message(mailbox, UID(msgno), &msg_base, &msg_size);
+ }
+
+ return 0;
+}
+
+/*
+ * Performs a COPY command from a local mailbox to a remote mailbox
+ */
+int index_copy_remote(struct mailbox *mailbox, char *sequence,
+ int usinguid, struct protstream *pout)
+{
+ return index_forsequence(mailbox, sequence, usinguid, index_appendremote,
+ (void *) pout, NULL);
+}
+
+/*
+ * Performs a STATUS command
+ */
+int
+index_status(mailbox, name, statusitems)
+struct mailbox *mailbox;
+char *name;
+int statusitems;
+{
+ int r;
+ struct seen *status_seendb;
+ time_t last_read, last_change = 0;
+ unsigned last_uid;
+ char *last_seenuids;
+ int num_recent = 0;
+ int num_unseen = 0;
+ int sepchar;
+
+ if (mailbox->exists != 0 &&
+ (statusitems &
+ (STATUS_RECENT | STATUS_UNSEEN))) {
+ r = seen_open(mailbox, imapd_userid, SEEN_CREATE, &status_seendb);
+ if (r) return r;
+
+ r = seen_lockread(status_seendb, &last_read, &last_uid,
+ &last_change, &last_seenuids);
+ seen_close(status_seendb);
+ if (r) return r;
+
+ if (statusitems & (STATUS_RECENT | STATUS_UNSEEN)) {
+ const char *base;
+ unsigned long len = 0;
+ int msg;
+ unsigned uid;
+
+ map_refresh(mailbox->index_fd, 0, &base, &len,
+ mailbox->start_offset +
+ mailbox->exists * mailbox->record_size,
+ "index", mailbox->name);
+ for (msg = 0; msg < mailbox->exists; msg++) {
+ uid = ntohl(*((bit32 *)(base + mailbox->start_offset +
+ msg * mailbox->record_size +
+ OFFSET_UID)));
+ if (uid > last_uid) num_recent++;
+ if ((statusitems & STATUS_UNSEEN) &&
+ !index_insequence(uid, last_seenuids, 0)) num_unseen++;
+ /* NB: The value of the third argument to index_insequence()
+ * above does not matter.
+ */
+ }
+ map_free(&base, &len);
+ free(last_seenuids);
+ }
+ }
+
+ prot_printf(imapd_out, "* STATUS ");
+ printastring(name);
+ prot_printf(imapd_out, " ");
+ sepchar = '(';
+
+ if (statusitems & STATUS_MESSAGES) {
+ prot_printf(imapd_out, "%cMESSAGES %lu", sepchar, mailbox->exists);
+ sepchar = ' ';
+ }
+ if (statusitems & STATUS_RECENT) {
+ prot_printf(imapd_out, "%cRECENT %u", sepchar, num_recent);
+ sepchar = ' ';
+ }
+ if (statusitems & STATUS_UIDNEXT) {
+ prot_printf(imapd_out, "%cUIDNEXT %lu", sepchar, mailbox->last_uid+1);
+ sepchar = ' ';
+ }
+ if (statusitems & STATUS_UIDVALIDITY) {
+ prot_printf(imapd_out, "%cUIDVALIDITY %lu", sepchar,
+ mailbox->uidvalidity);
+ sepchar = ' ';
+ }
+ if (statusitems & STATUS_UNSEEN) {
+ prot_printf(imapd_out, "%cUNSEEN %u", sepchar, num_unseen);
+ sepchar = ' ';
+ }
+ if (statusitems & STATUS_HIGHESTMODSEQ) {
+ prot_printf(imapd_out, "%cHIGHESTMODSEQ " MODSEQ_FMT, sepchar,
+ (mailbox->options & OPT_IMAP_CONDSTORE) ?
+ mailbox->highestmodseq : 0);
+ sepchar = ' ';
+ }
+ prot_printf(imapd_out, ")\r\n");
+ return 0;
+}
+
+/*
+ * Performs a GETUIDS command
+ */
+int
+index_getuids(mailbox, lowuid)
+struct mailbox *mailbox __attribute__((unused));
+unsigned lowuid;
+{
+ int msgno;
+ unsigned firstuid = 0, lastuid = 0;
+
+
+ prot_printf(imapd_out, "* GETUIDS");
+
+ for (msgno = 1; msgno <= imapd_exists; msgno++) {
+ if (firstuid == 0) {
+ if (UID(msgno) >= lowuid) {
+ prot_printf(imapd_out, " %u %u", msgno, UID(msgno));
+ firstuid = lastuid = UID(msgno);
+ }
+ }
+ else {
+ if (UID(msgno) != ++lastuid) {
+ if (lastuid-1 != firstuid) {
+ prot_printf(imapd_out, ":%u", lastuid-1);
+ }
+ firstuid = lastuid = UID(msgno);
+ prot_printf(imapd_out, ",%u", firstuid);
+ }
+ }
+ }
+ if (lastuid != firstuid) {
+ prot_printf(imapd_out, ":%u", lastuid);
+ }
+ prot_printf(imapd_out, "\r\n");
+
+ return 0;
+}
+
+/*
+ * Performs a XGETSTATE command
+ */
+int
+index_getstate(mailbox)
+struct mailbox *mailbox;
+{
+
+ prot_printf(imapd_out, "* XSTATE %lu %lu\r\n", mailbox->index_mtime,
+ seen_last_change);
+
+ return 0;
+}
+
+#if 0
+/* What's this for? Might as well keep it around. */
+/*
+ * Performs a XCHECKSTATE command
+ */
+int
+index_checkstate(mailbox, indexdate, seendate)
+struct mailbox *mailbox;
+unsigned indexdate;
+unsigned seendate;
+{
+ int r;
+ int msgno;
+ unsigned int startmsgno = 0;
+ int sepchar = ' ';
+
+ /* No messages == everything OK */
+ if (imapd_exists < 1) {
+ prot_printf(imapd_out, "* XCHECKSTATE\r\n");
+ return 0;
+ }
+
+ /* If \Seen data changed, we don't know anything */
+ if (seendate != seen_last_change) {
+ if (imapd_exists == 1) {
+ prot_printf(imapd_out,
+ "* XCHECKSTATE %u\r\n", UID(1));
+ }
+ else {
+ prot_printf(imapd_out,
+ "* XCHECKSTATE %u:%u\r\n", UID(1), UID(imapd_exists));
+ }
+ return 0;
+ }
+
+ prot_printf(imapd_out, "* XCHECKSTATE");
+ for (msgno = 1; msgno <= imapd_exists; msgno++) {
+ /*
+ * Below is >= instead of > because we can get
+ * two STORE commands within the same second.
+ */
+ if (LAST_UPDATED(msgno) >= indexdate) {
+ if (startmsgno == 0) {
+ prot_printf(imapd_out, "%c%u", sepchar, UID(msgno));
+ sepchar = ',';
+ startmsgno = msgno;
+ }
+ }
+ else {
+ if (startmsgno != 0 && startmsgno < msgno - 1) {
+ prot_printf(imapd_out, ":%u", UID(msgno-1));
+ }
+ startmsgno = 0;
+ }
+ }
+
+ if (startmsgno != 0 && startmsgno < imapd_exists) {
+ prot_printf(imapd_out, ":%u", UID(imapd_exists));
+ }
+
+ prot_printf(imapd_out, "\r\n");
+ return 0;
+}
+#endif
+
+/*
+ * Returns the msgno of the message with UID 'uid'.
+ * If no message with UID 'uid', returns the message with
+ * the higest UID not greater than 'uid'.
+ */
+int
+index_finduid(uid)
+unsigned uid;
+{
+ int low=1, high=imapd_exists, mid;
+ unsigned miduid;
+
+ while (low <= high) {
+ mid = (high - low)/2 + low;
+ miduid = UID(mid);
+ if (miduid == uid) {
+ return mid;
+ }
+ else if (miduid > uid) {
+ high = mid - 1;
+ }
+ else {
+ low = mid + 1;
+ }
+ }
+ return high;
+}
+
+/*
+ * Expunge decision procedure to get rid of articles
+ * both \Deleted and listed in the sequence under 'rock'.
+ */
+int index_expungeuidlist(struct mailbox *mailbox __attribute__((unused)),
+ void *rock, char *indexbuf,
+ int expunge_flags __attribute__((unused)))
+{
+ char *sequence = (char *)rock;
+ unsigned uid = ntohl(*((bit32 *)(indexbuf+OFFSET_UID)));
+
+ /* Don't expunge if not \Deleted */
+ if (!(ntohl(*((bit32 *)(indexbuf+OFFSET_SYSTEM_FLAGS))) & FLAG_DELETED))
+ return 0;
+
+ return index_insequence(uid, sequence, 1);
+}
+
+/*
+ * Call a function 'proc' on each message in 'sequence'. If 'usinguid'
+ * is nonzero, 'sequence' is interpreted as a sequence of UIDs instead
+ * of a sequence of msgnos. 'proc' is called with arguments 'mailbox',
+ * the msgno, and 'rock'. If any invocation of 'proc' returns nonzero,
+ * returns the first such returned value. Otherwise, returns zero.
+ */
+static int
+index_forsequence(struct mailbox* mailbox,
+ const char* sequence,
+ int usinguid,
+ index_sequenceproc_t proc,
+ void* rock,
+ int* fetchedsomething)
+{
+ unsigned i, start = 0, end;
+ int r, result = 0;
+
+ /* no messages, no calls. dumps core otherwise */
+ if (! imapd_exists) {
+ return 0;
+ }
+
+ for (;;) {
+ if (isdigit((int) *sequence)) {
+ start = start*10 + *sequence - '0';
+ }
+ else if (*sequence == '*') {
+ start = usinguid ? UID(imapd_exists) : imapd_exists;
+ }
+ else if (*sequence == ':') {
+ end = 0;
+ sequence++;
+ while (isdigit((int) *sequence)) {
+ end = end*10 + *sequence++ - '0';
+ }
+ if (*sequence == '*') {
+ sequence++;
+ end = usinguid ? UID(imapd_exists) : imapd_exists;
+ }
+ if (start > end) {
+ i = end;
+ end = start;
+ start = i;
+ }
+ if (usinguid) {
+ i = index_finduid(start);
+ if (!i || start != UID(i)) i++;
+ start = i;
+ end = index_finduid(end);
+ }
+ if (start < 1) start = 1;
+ if (end > imapd_exists) end = imapd_exists;
+ for (i = start; i <= end; i++) {
+ if (fetchedsomething) *fetchedsomething = 1;
+ r = (*proc)(mailbox, i, rock);
+ if (r && !result) result = r;
+ }
+ start = 0;
+ if (!*sequence) return result;
+ }
+ else {
+ if (start && usinguid) {
+ i = index_finduid(start);
+ if (!i || start != UID(i)) i = 0;
+ start = i;
+ }
+ if (start > 0 && start <= imapd_exists) {
+ if (fetchedsomething) *fetchedsomething = 1;
+ r = (*proc)(mailbox, start, rock);
+ if (r && !result) result = r;
+ }
+ start = 0;
+ if (!*sequence) return result;
+ }
+ sequence++;
+ }
+}
+
+/*
+ * Return nonzero iff 'num' is included in 'sequence'
+ */
+static int
+index_insequence(num, sequence, usinguid)
+int num;
+char *sequence;
+int usinguid;
+{
+ unsigned i, start = 0, end;
+
+ for (;;) {
+ if (isdigit((int) *sequence)) {
+ start = start*10 + *sequence - '0';
+ }
+ else if (*sequence == '*') {
+ sequence++;
+ start = usinguid ? UID(imapd_exists) : imapd_exists;
+ }
+ else if (*sequence == ':') {
+ end = 0;
+ sequence++;
+ while (isdigit((int) *sequence)) {
+ end = end*10 + *sequence++ - '0';
+ }
+ if (*sequence == '*') {
+ sequence++;
+ end = usinguid ? UID(imapd_exists) : imapd_exists;
+ }
+ if (start > end) {
+ i = end;
+ end = start;
+ start = i;
+ }
+ if (num >= start && num <= end) return 1;
+ start = 0;
+ if (!*sequence) return 0;
+ }
+ else {
+ if (num == start) return 1;
+ start = 0;
+ if (!*sequence) return 0;
+ }
+ sequence++;
+ }
+}
+
+/*
+ * Helper function to fetch data from a message file. Writes a
+ * quoted-string or literal containing data from 'msg_base', which is
+ * of size 'msg_size' and format 'format', starting at 'offset' and
+ * containing 'size' octets. If 'octet_count' is nonzero, the data is
+ * further constrained by 'start_octet' and 'octet_count' as per the
+ * IMAP command PARTIAL.
+ */
+void
+index_fetchmsg(msg_base, msg_size, format, offset, size,
+ start_octet, octet_count, pout)
+const char *msg_base;
+unsigned long msg_size;
+int format __attribute__((unused));
+unsigned offset;
+unsigned size; /* this is the correct size for a news message after
+ having LF translated to CRLF */
+unsigned start_octet;
+unsigned octet_count;
+struct protstream *pout;
+{
+ int n;
+
+ /* partial fetch: adjust 'size' */
+ if (octet_count) {
+ if (size <= start_octet) {
+ size = 0;
+ }
+ else {
+ size -= start_octet;
+ }
+ if (size > octet_count) size = octet_count;
+ }
+
+ /* If no data, output null quoted string */
+ if (!msg_base || size == 0) {
+ prot_printf(pout, "\"\"");
+ return;
+ }
+
+ /* Seek over PARTIAL constraint */
+ offset += start_octet;
+ n = size;
+ if (offset + size > msg_size) {
+ n = msg_size - offset;
+ }
+
+ /* Look for a NUL in the data */
+ if (memchr(msg_base + offset, 0, n)) {
+ /* Write size of literal8 */
+ prot_printf(pout, "~{%u}\r\n", size);
+ } else {
+ /* Write size of literal */
+ prot_printf(pout, "{%u}\r\n", size);
+ }
+
+ prot_write(pout, msg_base + offset, n);
+ while (n++ < size) {
+ /* File too short, resynch client.
+ *
+ * This can only happen if the reported size of the part
+ * is incorrect and would push us past EOF.
+ */
+ prot_putc(' ', pout);
+ }
+}
+
+/*
+ * Helper function to fetch a body section
+ */
+static int index_fetchsection(const char *resp,
+ const char *msg_base, unsigned long msg_size,
+ int format, char *section,
+ const char *cacheitem, unsigned size,
+ unsigned start_octet, unsigned octet_count)
+{
+ char *p;
+ int skip = 0;
+ int fetchmime = 0;
+ unsigned offset = 0;
+ char *decbuf = NULL;
+
+ cacheitem += CACHE_ITEM_SIZE_SKIP;
+ p = section;
+
+ /* Special-case BODY[] */
+ if (*p == ']') {
+ if (strstr(resp, "BINARY.SIZE")) {
+ prot_printf(imapd_out, "%s%u", resp, size);
+ } else {
+ prot_printf(imapd_out, "%s", resp);
+ index_fetchmsg(msg_base, msg_size, format, 0, size,
+ start_octet, octet_count, imapd_out);
+ }
+ return 0;
+ }
+
+ while (*p != ']' && *p != 'M') {
+ /* Generate the actual part number */
+ skip = 0;
+ while (isdigit((int) *p)) {
+ skip = skip * 10 + *p++ - '0';
+ /* xxx overflow */
+ }
+ if (*p == '.') p++;
+
+ /* section number too large */
+ if (skip >= CACHE_ITEM_BIT32(cacheitem)) goto badpart;
+
+ /* Handle .0, .HEADER, and .TEXT */
+ if (!skip) {
+ /* We don't have any digits, so its a string */
+ switch (*p) {
+ case 'H':
+ p += 6;
+ fetchmime++; /* .HEADER maps internally to .0.MIME */
+ break;
+
+ case 'T':
+ p += 4;
+ break; /* .TEXT maps internally to .0 */
+
+ default:
+ fetchmime++; /* .0 maps internally to .0.MIME */
+ break;
+ }
+ }
+
+ if (*p != ']' && *p != 'M') {
+ /* We are NOT at the end of a part specification, so there's
+ * a subpart being requested. Find the subpart in the tree. */
+
+ /* Skip the headers for this part, along with the number of
+ * sub parts */
+ cacheitem +=
+ CACHE_ITEM_BIT32(cacheitem) * 5 * 4 + CACHE_ITEM_SIZE_SKIP;
+
+ /* Skip to the correct part */
+ while (--skip) {
+ if (CACHE_ITEM_BIT32(cacheitem) > 0) {
+ /* Skip each part at this level */
+ skip += CACHE_ITEM_BIT32(cacheitem)-1;
+ cacheitem += CACHE_ITEM_BIT32(cacheitem) * 5 * 4;
+ }
+ cacheitem += CACHE_ITEM_SIZE_SKIP;
+ }
+ }
+ }
+
+ if (*p == 'M') fetchmime++;
+
+ cacheitem += skip * 5 * 4 + CACHE_ITEM_SIZE_SKIP + (fetchmime ? 0 : 2 * 4);
+
+ if (CACHE_ITEM_BIT32(cacheitem + CACHE_ITEM_SIZE_SKIP) == -1) goto badpart;
+
+ offset = CACHE_ITEM_BIT32(cacheitem);
+ size = CACHE_ITEM_BIT32(cacheitem + CACHE_ITEM_SIZE_SKIP);
+
+ if ((p = strstr(resp, "BINARY"))) {
+ /* BINARY or BINARY.SIZE */
+ int encoding = CACHE_ITEM_BIT32(cacheitem + 2 * 4) & 0xff;
+
+ msg_base = charset_decode_mimebody(msg_base + offset, size, encoding,
+ &decbuf, 0, &size);
+
+ if (!msg_base) {
+ /* failed to decode */
+ if (decbuf) free(decbuf);
+ return IMAP_NO_UNKNOWN_CTE;
+ }
+ else if (p[6] == '.') {
+ /* BINARY.SIZE */
+ prot_printf(imapd_out, "%s%u", resp, size);
+
+ if (decbuf) free(decbuf);
+ return 0;
+ }
+ else {
+ /* BINARY */
+ msg_size = size;
+ offset = 0;
+ }
+ }
+
+ /* Output body part */
+ prot_printf(imapd_out, "%s", resp);
+ index_fetchmsg(msg_base, msg_size, format, offset, size,
+ start_octet, octet_count, imapd_out);
+
+ if (decbuf) free(decbuf);
+ return 0;
+
+ badpart:
+ if (strstr(resp, "BINARY.SIZE"))
+ prot_printf(imapd_out, "%s0", resp);
+ else
+ prot_printf(imapd_out, "%sNIL", resp);
+ return 0;
+}
+
+/*
+ * Helper function to fetch a HEADER.FIELDS[.NOT] body section
+ */
+static void index_fetchfsection(const char *msg_base,
+ unsigned long msg_size,
+ int format,
+ struct fieldlist *fsection,
+ const char *cacheitem,
+ unsigned start_octet, unsigned octet_count)
+{
+ char *p;
+ int skip = 0;
+ int fields_not = 0;
+ unsigned crlf_start = 0;
+ unsigned crlf_size = 2;
+ char *buf;
+ unsigned size;
+
+ /* If no data, output null quoted string */
+ if (!msg_base) {
+ prot_printf(imapd_out, "\"\"");
+ return;
+ }
+
+ cacheitem += CACHE_ITEM_SIZE_SKIP;
+ p = fsection->section;
+
+ while (*p != 'H') {
+ skip = 0;
+ while (isdigit((int) *p)) {
+ skip = skip * 10 + *p++ - '0';
+ /* xxx overflow */
+ }
+ if (*p == '.') p++;
+
+ /* section number too large */
+ if (skip >= CACHE_ITEM_BIT32(cacheitem)) goto badpart;
+
+ cacheitem += CACHE_ITEM_BIT32(cacheitem) * 5 * 4 + CACHE_ITEM_SIZE_SKIP;
+ while (--skip) {
+ if (CACHE_ITEM_BIT32(cacheitem) > 0) {
+ skip += CACHE_ITEM_BIT32(cacheitem)-1;
+ cacheitem += CACHE_ITEM_BIT32(cacheitem) * 5 * 4;
+ }
+ cacheitem += CACHE_ITEM_SIZE_SKIP;
+ }
+ }
+
+ /* leaf object */
+ if (0 == CACHE_ITEM_BIT32(cacheitem)) goto badpart;
+
+ cacheitem += 4;
+
+ if (CACHE_ITEM_BIT32(cacheitem+CACHE_ITEM_SIZE_SKIP) == -1) goto badpart;
+
+ if (p[13]) fields_not++; /* Check for "." after "HEADER.FIELDS" */
+
+ buf = index_readheader(msg_base, msg_size, format,
+ CACHE_ITEM_BIT32(cacheitem),
+ CACHE_ITEM_BIT32(cacheitem+CACHE_ITEM_SIZE_SKIP));
+
+ if (fields_not) {
+ index_pruneheader(buf, 0, fsection->fields);
+ }
+ else {
+ index_pruneheader(buf, fsection->fields, 0);
+ }
+ size = strlen(buf);
+
+ /* partial fetch: adjust 'size' */
+ if (octet_count) {
+ if (size <= start_octet) {
+ crlf_start = start_octet - size;
+ size = 0;
+ start_octet = 0;
+ if (crlf_size <= crlf_start) {
+ crlf_size = 0;
+ }
+ else {
+ crlf_size -= crlf_start;
+ }
+ }
+ else {
+ size -= start_octet;
+ }
+ if (size > octet_count) {
+ size = octet_count;
+ crlf_size = 0;
+ }
+ else if (size + crlf_size > octet_count) {
+ crlf_size = octet_count - size;
+ }
+ }
+
+ /* If no data, output null quoted string */
+ if (size + crlf_size == 0) {
+ prot_printf(imapd_out, "\"\"");
+ return;
+ }
+
+ /* Write literal */
+ prot_printf(imapd_out, "{%u}\r\n", size + crlf_size);
+ prot_write(imapd_out, buf + start_octet, size);
+ prot_write(imapd_out, "\r\n" + crlf_start, crlf_size);
+
+ return;
+
+ badpart:
+ prot_printf(imapd_out, "NIL");
+}
+
+/*
+ * Helper function to read a header section into a static buffer
+ */
+static char *
+index_readheader(msg_base, msg_size, format, offset, size)
+const char *msg_base;
+unsigned long msg_size;
+int format __attribute__((unused));
+unsigned offset;
+unsigned size;
+{
+ static char *buf;
+ static int bufsize;
+
+ if (offset + size > msg_size) {
+ /* Message file is too short, truncate request */
+ if (offset < msg_size) {
+ size = msg_size - offset;
+ }
+ else {
+ size = 0;
+ }
+ }
+
+ if (bufsize < size+2) {
+ bufsize = size+100;
+ buf = xrealloc(buf, bufsize);
+ }
+
+ msg_base += offset;
+
+ memcpy(buf, msg_base, size);
+ buf[size] = '\0';
+
+ return buf;
+}
+
+/*
+ * Prune the header section in buf to include only those headers
+ * listed in headers or (if headers_not is non-empty) those headers
+ * not in headers_not.
+ */
+static void
+index_pruneheader(char *buf, struct strlist *headers,
+ struct strlist *headers_not)
+{
+ char *p, *colon, *nextheader;
+ int goodheader;
+ char *endlastgood = buf;
+ struct strlist *l;
+
+ p = buf;
+ while (*p && *p != '\r') {
+ colon = strchr(p, ':');
+ if (colon && headers_not) {
+ goodheader = 1;
+ for (l = headers_not; l; l = l->next) {
+ if (colon - p == strlen(l->s) &&
+ !strncasecmp(p, l->s, colon - p)) {
+ goodheader = 0;
+ break;
+ }
+ }
+ } else {
+ goodheader = 0;
+ }
+ if (colon) {
+ for (l = headers; l; l = l->next) {
+ if (colon - p == strlen(l->s) &&
+ !strncasecmp(p, l->s, colon - p)) {
+ goodheader = 1;
+ break;
+ }
+ }
+ }
+
+ nextheader = p;
+ do {
+ nextheader = strchr(nextheader, '\n');
+ if (nextheader) nextheader++;
+ else nextheader = p + strlen(p);
+ } while (*nextheader == ' ' || *nextheader == '\t');
+
+ if (goodheader) {
+ if (endlastgood != p) {
+ /* memmove and not strcpy since this is all within a
+ * single buffer */
+ memmove(endlastgood, p, strlen(p) + 1);
+ nextheader -= p - endlastgood;
+ }
+ endlastgood = nextheader;
+ }
+ p = nextheader;
+ }
+
+ *endlastgood = '\0';
+}
+
+/*
+ * Handle a FETCH RFC822.HEADER.LINES or RFC822.HEADER.LINES.NOT
+ * that can't use the cacheheaders in cyrus.cache
+ */
+static void
+index_fetchheader(msg_base, msg_size, format, size, headers, headers_not)
+const char *msg_base;
+unsigned long msg_size;
+int format;
+unsigned size;
+struct strlist *headers;
+struct strlist *headers_not;
+{
+ char *buf;
+
+ /* If no data, output null quoted string */
+ if (!msg_base) {
+ prot_printf(imapd_out, "\"\"");
+ return;
+ }
+
+ buf = index_readheader(msg_base, msg_size, format, 0, size);
+
+ index_pruneheader(buf, headers, headers_not);
+
+ size = strlen(buf);
+ prot_printf(imapd_out, "{%u}\r\n%s\r\n", size+2, buf);
+}
+
+/*
+ * Handle a FETCH RFC822.HEADER.LINES that can use the
+ * cacheheaders in cyrus.cache
+ */
+static void
+index_fetchcacheheader(unsigned msgno, struct strlist *headers,
+ unsigned start_octet, unsigned octet_count)
+{
+ static char *buf;
+ static int bufsize;
+ const char *cacheitem;
+ unsigned size;
+ unsigned crlf_start = 0;
+ unsigned crlf_size = 2;
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip section */
+
+ size = CACHE_ITEM_LEN(cacheitem);
+ if (bufsize < size+2) {
+ bufsize = size+100;
+ buf = xrealloc(buf, bufsize);
+ }
+
+ memcpy(buf, cacheitem + CACHE_ITEM_SIZE_SKIP, size);
+ buf[size] = '\0';
+
+ index_pruneheader(buf, headers, 0);
+ size = strlen(buf);
+
+ /* partial fetch: adjust 'size' */
+ if (octet_count) {
+ if (size <= start_octet) {
+ crlf_start = start_octet - size;
+ size = 0;
+ start_octet = 0;
+ if (crlf_size <= crlf_start) {
+ crlf_size = 0;
+ }
+ else {
+ crlf_size -= crlf_start;
+ }
+ }
+ else {
+ size -= start_octet;
+ }
+ if (size > octet_count) {
+ size = octet_count;
+ crlf_size = 0;
+ }
+ else if (size + crlf_size > octet_count) {
+ crlf_size = octet_count - size;
+ }
+ }
+
+ if (size + crlf_size == 0) {
+ prot_printf(imapd_out, "\"\"");
+ }
+ else {
+ prot_printf(imapd_out, "{%u}\r\n", size + crlf_size);
+ prot_write(imapd_out, buf + start_octet, size);
+ prot_write(imapd_out, "\r\n" + crlf_start, crlf_size);
+ }
+}
+
+/*
+ * Send a * FLAGS response.
+ */
+static void index_listflags(struct mailbox *mailbox)
+{
+ int i;
+ int cancreate = 0;
+ char sepchar = '(';
+
+ prot_printf(imapd_out, "* FLAGS (\\Answered \\Flagged \\Draft \\Deleted \\Seen");
+ for (i = 0; i < VECTOR_SIZE(mailbox->flagname); i++) {
+ if (mailbox->flagname[i]) {
+ prot_printf(imapd_out, " %s", mailbox->flagname[i]);
+ }
+ else cancreate++;
+ }
+ prot_printf(imapd_out, ")\r\n* OK [PERMANENTFLAGS ");
+ if (!mailbox->examining) {
+ if (mailbox->myrights & ACL_WRITE) {
+ prot_printf(imapd_out, "%c\\Answered \\Flagged \\Draft", sepchar);
+ sepchar = ' ';
+ }
+ if (mailbox->myrights & ACL_DELETEMSG) {
+ prot_printf(imapd_out, "%c\\Deleted", sepchar);
+ sepchar = ' ';
+ }
+ if (mailbox->myrights & ACL_SEEN) {
+ prot_printf(imapd_out, "%c\\Seen", sepchar);
+ sepchar = ' ';
+ }
+ if (mailbox->myrights & ACL_WRITE) {
+ for (i = 0; i < VECTOR_SIZE(mailbox->flagname); i++) {
+ if (mailbox->flagname[i]) {
+ prot_printf(imapd_out, " %s", mailbox->flagname[i]);
+ }
+ }
+ if (cancreate) {
+ prot_printf(imapd_out, " \\*");
+ }
+ }
+ }
+ if (sepchar == '(') prot_printf(imapd_out, "(");
+ prot_printf(imapd_out, ")] \r\n");
+}
+
+/*
+ * Helper function to send * FETCH (FLAGS data.
+ * Does not send the terminating close paren or CRLF.
+ * Also sends preceeding * FLAGS if necessary.
+ */
+static void index_fetchflags(struct mailbox *mailbox,
+ unsigned msgno,
+ bit32 system_flags,
+ bit32 user_flags[MAX_USER_FLAGS/32],
+ time_t last_updated)
+{
+ int sepchar = '(';
+ unsigned flag;
+ bit32 flagmask = 0;
+
+ for (flag = 0; flag < VECTOR_SIZE(mailbox->flagname); flag++) {
+ if ((flag & 31) == 0) {
+ flagmask = user_flags[flag/32];
+ }
+ if (!mailbox->flagname[flag] && (flagmask & (1<<(flag & 31)))) {
+ mailbox_read_header(mailbox);
+ index_listflags(mailbox);
+ break;
+ }
+ }
+
+ prot_printf(imapd_out, "* %u FETCH (FLAGS ", msgno);
+
+ if (msgno > lastnotrecent) {
+ prot_printf(imapd_out, "%c\\Recent", sepchar);
+ sepchar = ' ';
+ }
+ if (system_flags & FLAG_ANSWERED) {
+ prot_printf(imapd_out, "%c\\Answered", sepchar);
+ sepchar = ' ';
+ }
+ if (system_flags & FLAG_FLAGGED) {
+ prot_printf(imapd_out, "%c\\Flagged", sepchar);
+ sepchar = ' ';
+ }
+ if (system_flags & FLAG_DRAFT) {
+ prot_printf(imapd_out, "%c\\Draft", sepchar);
+ sepchar = ' ';
+ }
+ if (system_flags & FLAG_DELETED) {
+ prot_printf(imapd_out, "%c\\Deleted", sepchar);
+ sepchar = ' ';
+ }
+ if (seenflag[msgno]) {
+ prot_printf(imapd_out, "%c\\Seen", sepchar);
+ sepchar = ' ';
+ }
+ for (flag = 0; flag < VECTOR_SIZE(mailbox->flagname); flag++) {
+ if ((flag & 31) == 0) {
+ flagmask = user_flags[flag/32];
+ }
+ if (mailbox->flagname[flag] && (flagmask & (1<<(flag & 31)))) {
+ prot_printf(imapd_out, "%c%s", sepchar, mailbox->flagname[flag]);
+ sepchar = ' ';
+ }
+ }
+ if (sepchar == '(') prot_putc('(', imapd_out);
+ prot_putc(')', imapd_out);
+
+ assert(flagalloced > 0 || msgno < flagalloced);
+
+ flagreport[msgno] = last_updated;
+}
+
+/*
+ * Helper function to send requested * FETCH data for a message
+ */
+static int index_fetchreply(struct mailbox *mailbox,
+ unsigned msgno, void *rock)
+{
+ struct fetchargs *fetchargs = (struct fetchargs *)rock;
+ int fetchitems = fetchargs->fetchitems;
+ const char *msg_base = 0;
+ unsigned long msg_size = 0;
+ struct octetinfo *oi = NULL;
+ int sepchar = '(';
+ int started = 0;
+ int i;
+ bit32 user_flags[MAX_USER_FLAGS/32];
+ const char *cacheitem;
+ struct strlist *section, *field;
+ struct fieldlist *fsection;
+ char respbuf[100];
+ int r = 0;
+
+ /* Check the modseq against changedsince */
+ if (fetchargs->changedsince &&
+ MODSEQ(msgno) <= fetchargs->changedsince) {
+ return 0;
+ }
+
+ /* Open the message file if we're going to need it */
+ if ((fetchitems & (FETCH_HEADER|FETCH_TEXT|FETCH_RFC822)) ||
+ fetchargs->cache_atleast > CACHE_VERSION(msgno) ||
+ fetchargs->binsections || fetchargs->sizesections ||
+ fetchargs->bodysections) {
+ if (mailbox_map_message(mailbox, UID(msgno), &msg_base, &msg_size)) {
+ prot_printf(imapd_out, "* OK ");
+ prot_printf(imapd_out, error_message(IMAP_NO_MSGGONE), msgno);
+ prot_printf(imapd_out, "\r\n");
+ }
+ }
+
+ /* set the \Seen flag if necessary */
+ if (fetchitems & FETCH_SETSEEN) {
+ if (!seenflag[msgno] && (mailbox->myrights & ACL_SEEN)) {
+ seenflag[msgno] = 1;
+ fetchitems |= FETCH_FLAGS;
+ }
+ }
+
+ if (fetchitems & FETCH_FLAGS) {
+ for (i = 0; i < VECTOR_SIZE(user_flags); i++) {
+ user_flags[i] = USER_FLAGS(msgno, i);
+ }
+ index_fetchflags(mailbox, msgno, SYSTEM_FLAGS(msgno), user_flags,
+ LAST_UPDATED(msgno));
+ sepchar = ' ';
+ }
+ else if ((fetchitems & ~FETCH_SETSEEN) || fetchargs->fsections ||
+ fetchargs->headers || fetchargs->headers_not) {
+ /* these fetch items will always succeed, so start the response */
+ prot_printf(imapd_out, "* %u FETCH ", msgno);
+ started = 1;
+ }
+ if (fetchitems & FETCH_UID) {
+ prot_printf(imapd_out, "%cUID %u", sepchar, UID(msgno));
+ sepchar = ' ';
+ }
+ if (fetchitems & FETCH_INTERNALDATE) {
+ time_t msgdate = INTERNALDATE(msgno);
+ char datebuf[30];
+
+ cyrus_ctime(msgdate, datebuf);
+
+ prot_printf(imapd_out, "%cINTERNALDATE \"%s\"",
+ sepchar, datebuf);
+ sepchar = ' ';
+ }
+ if (fetchitems & FETCH_MODSEQ) {
+ prot_printf(imapd_out, "%cMODSEQ (" MODSEQ_FMT ")",
+ sepchar, MODSEQ(msgno));
+ sepchar = ' ';
+ }
+ if (fetchitems & FETCH_SIZE) {
+ prot_printf(imapd_out, "%cRFC822.SIZE %u", sepchar, SIZE(msgno));
+ sepchar = ' ';
+ }
+ if (fetchitems & FETCH_ENVELOPE) {
+ prot_printf(imapd_out, "%cENVELOPE ", sepchar);
+ sepchar = ' ';
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ prot_write(imapd_out, cacheitem + CACHE_ITEM_SIZE_SKIP,
+ CACHE_ITEM_LEN(cacheitem));
+ }
+ if (fetchitems & FETCH_BODYSTRUCTURE) {
+ prot_printf(imapd_out, "%cBODYSTRUCTURE ", sepchar);
+ sepchar = ' ';
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ prot_write(imapd_out, cacheitem + CACHE_ITEM_SIZE_SKIP,
+ CACHE_ITEM_LEN(cacheitem));
+ }
+ if (fetchitems & FETCH_BODY) {
+ prot_printf(imapd_out, "%cBODY ", sepchar);
+ sepchar = ' ';
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ prot_write(imapd_out, cacheitem + CACHE_ITEM_SIZE_SKIP,
+ CACHE_ITEM_LEN(cacheitem));
+ }
+
+ if (fetchitems & FETCH_HEADER) {
+ prot_printf(imapd_out, "%cRFC822.HEADER ", sepchar);
+ sepchar = ' ';
+ index_fetchmsg(msg_base, msg_size, mailbox->format, 0,
+ HEADER_SIZE(msgno),
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->start_octet : 0,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->octet_count : 0,
+ imapd_out);
+ }
+ else if (fetchargs->headers || fetchargs->headers_not) {
+ prot_printf(imapd_out, "%cRFC822.HEADER ", sepchar);
+ sepchar = ' ';
+ if(fetchargs->cache_atleast > CACHE_VERSION(msgno)) {
+ index_fetchheader(msg_base, msg_size, mailbox->format,
+ HEADER_SIZE(msgno),
+ fetchargs->headers, fetchargs->headers_not);
+ } else {
+ index_fetchcacheheader(msgno, fetchargs->headers, 0, 0);
+ }
+ }
+
+ if (fetchitems & FETCH_TEXT) {
+ prot_printf(imapd_out, "%cRFC822.TEXT ", sepchar);
+ sepchar = ' ';
+ index_fetchmsg(msg_base, msg_size, mailbox->format,
+ CONTENT_OFFSET(msgno), SIZE(msgno) - HEADER_SIZE(msgno),
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->start_octet : 0,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->octet_count : 0,
+ imapd_out);
+ }
+ if (fetchitems & FETCH_RFC822) {
+ prot_printf(imapd_out, "%cRFC822 ", sepchar);
+ sepchar = ' ';
+ index_fetchmsg(msg_base, msg_size, mailbox->format, 0, SIZE(msgno),
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->start_octet : 0,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->octet_count : 0,
+ imapd_out);
+ }
+ for (fsection = fetchargs->fsections; fsection; fsection = fsection->next) {
+ prot_printf(imapd_out, "%cBODY[%s ", sepchar, fsection->section);
+ sepchar = '(';
+ for (field = fsection->fields; field; field = field->next) {
+ prot_putc(sepchar, imapd_out);
+ sepchar = ' ';
+ printastring(field->s);
+ }
+ prot_putc(')', imapd_out);
+ sepchar = ' ';
+
+ oi = (struct octetinfo *)fsection->rock;
+
+ prot_printf(imapd_out, "%s ", fsection->trail);
+
+ if(fetchargs->cache_atleast > CACHE_VERSION(msgno)) {
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+
+ index_fetchfsection(msg_base, msg_size, mailbox->format, fsection,
+ cacheitem,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->start_octet : oi->start_octet,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->octet_count : oi->octet_count);
+ }
+ else {
+ index_fetchcacheheader(msgno, fsection->fields,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->start_octet : oi->start_octet,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->octet_count : oi->octet_count);
+ }
+ }
+ for (section = fetchargs->bodysections; section; section = section->next) {
+ respbuf[0] = 0;
+ if (sepchar == '(' && !started) {
+ /* we haven't output a fetch item yet, so start the response */
+ snprintf(respbuf, sizeof(respbuf), "* %u FETCH ", msgno);
+ }
+ snprintf(respbuf+strlen(respbuf), sizeof(respbuf)-strlen(respbuf),
+ "%cBODY[%s ", sepchar, section->s);
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+
+ oi = section->rock;
+
+ r = index_fetchsection(respbuf, msg_base, msg_size, mailbox->format,
+ section->s, cacheitem, SIZE(msgno),
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->start_octet : oi->start_octet,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->octet_count : oi->octet_count);
+ if (!r) sepchar = ' ';
+ }
+ for (section = fetchargs->binsections; section; section = section->next) {
+ respbuf[0] = 0;
+ if (sepchar == '(' && !started) {
+ /* we haven't output a fetch item yet, so start the response */
+ snprintf(respbuf, sizeof(respbuf), "* %u FETCH ", msgno);
+ }
+ snprintf(respbuf+strlen(respbuf), sizeof(respbuf)-strlen(respbuf),
+ "%cBINARY[%s ", sepchar, section->s);
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+
+ oi = section->rock;
+
+ r = index_fetchsection(respbuf, msg_base, msg_size, mailbox->format,
+ section->s, cacheitem, SIZE(msgno),
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->start_octet : oi->start_octet,
+ (fetchitems & FETCH_IS_PARTIAL) ?
+ fetchargs->octet_count : oi->octet_count);
+ if (!r) sepchar = ' ';
+ }
+ for (section = fetchargs->sizesections; section; section = section->next) {
+ respbuf[0] = 0;
+ if (sepchar == '(' && !started) {
+ /* we haven't output a fetch item yet, so start the response */
+ snprintf(respbuf, sizeof(respbuf), "* %u FETCH ", msgno);
+ }
+ snprintf(respbuf+strlen(respbuf), sizeof(respbuf)-strlen(respbuf),
+ "%cBINARY.SIZE[%s ", sepchar, section->s);
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+
+ r = index_fetchsection(respbuf, msg_base, msg_size, mailbox->format,
+ section->s, cacheitem, SIZE(msgno),
+ fetchargs->start_octet, fetchargs->octet_count);
+ if (!r) sepchar = ' ';
+ }
+ if (sepchar != '(') {
+ /* finsh the response if we have one */
+ prot_printf(imapd_out, ")\r\n");
+ }
+ if (msg_base) {
+ mailbox_unmap_message(mailbox, UID(msgno), &msg_base, &msg_size);
+ }
+ return r;
+}
+
+/*
+ * Fetch the text data associated with an IMAP URL.
+ *
+ * If outsize is NULL, the data will be output as a literal (URLFETCH),
+ * otherwise just the data will be output (CATENATE), and its size returned
+ * in *outsize.
+ *
+ * This is an amalgamation of index_fetchreply(), index_fetchsection()
+ * and index_fetchmsg().
+ */
+int index_urlfetch(struct mailbox *mailbox, unsigned msgno,
+ const char *section,
+ unsigned long start_octet, unsigned long octet_count,
+ struct protstream *pout, unsigned long *outsize)
+{
+ const char *msg_base = 0;
+ unsigned long msg_size = 0;
+ const char *cacheitem;
+ int skip = 0;
+ int fetchmime = 0;
+ unsigned size, offset = 0;
+ int n, r = 0;
+
+ if (outsize) *outsize = 0;
+
+ /* Open the message file */
+ if (mailbox_map_message(mailbox, UID(msgno), &msg_base, &msg_size)) {
+ return IMAP_NO_MSGGONE;
+ }
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+
+ size = SIZE(msgno);
+
+ cacheitem += CACHE_ITEM_SIZE_SKIP;
+
+ /* Special-case BODY[] */
+ if (!section || !*section) {
+ /* whole message, no further parsing */
+ }
+ else {
+ char *p = ucase((char *) section);
+
+ while (*p && *p != 'M') {
+ /* Generate the actual part number */
+ skip = 0;
+ while (isdigit((int) *p)) {
+ skip = skip * 10 + *p++ - '0';
+ /* xxx overflow */
+ }
+ if (*p == '.') p++;
+
+ /* section number too large */
+ if (skip >= CACHE_ITEM_BIT32(cacheitem)) {
+ r = IMAP_BADURL;
+ goto done;
+ }
+
+ /* Handle .0, .HEADER, and .TEXT */
+ if (!skip) {
+ /* We don't have any digits, so its a string */
+ switch (*p) {
+ case 'H':
+ p += 6;
+ fetchmime++; /* .HEADER maps internally to .0.MIME */
+ break;
+
+ case 'T':
+ p += 4;
+ break; /* .TEXT maps internally to .0 */
+
+ default:
+ fetchmime++; /* .0 maps internally to .0.MIME */
+ break;
+ }
+ }
+
+ if (*p && *p != 'M') {
+ /* We are NOT at the end of a part specification, so there's
+ * a subpart being requested. Find the subpart in the tree. */
+
+ /* Skip the headers for this part, along with the number of
+ * sub parts */
+ cacheitem +=
+ CACHE_ITEM_BIT32(cacheitem) * 5 * 4 + CACHE_ITEM_SIZE_SKIP;
+
+ /* Skip to the correct part */
+ while (--skip) {
+ if (CACHE_ITEM_BIT32(cacheitem) > 0) {
+ /* Skip each part at this level */
+ skip += CACHE_ITEM_BIT32(cacheitem)-1;
+ cacheitem += CACHE_ITEM_BIT32(cacheitem) * 5 * 4;
+ }
+ cacheitem += CACHE_ITEM_SIZE_SKIP;
+ }
+ }
+ }
+
+ if (*p == 'M') fetchmime++;
+
+ cacheitem += skip * 5 * 4 + CACHE_ITEM_SIZE_SKIP +
+ (fetchmime ? 0 : 2 * 4);
+
+ if (CACHE_ITEM_BIT32(cacheitem + CACHE_ITEM_SIZE_SKIP) == -1) {
+ r = IMAP_BADURL;
+ goto done;
+ }
+
+ offset = CACHE_ITEM_BIT32(cacheitem);
+ size = CACHE_ITEM_BIT32(cacheitem + CACHE_ITEM_SIZE_SKIP);
+ }
+
+ /* Handle PARTIAL request */
+ offset += start_octet;
+ if (octet_count) size = octet_count;
+
+ /* Sanity check the requested size */
+ if (size && (offset + size > msg_size))
+ n = msg_size - offset;
+ else
+ n = size;
+
+ if (outsize)
+ *outsize = n;
+ else
+ prot_printf(pout, "{%u}\r\n", n);
+
+ prot_write(pout, msg_base + offset, n);
+
+ done:
+ /* Close the message file */
+ mailbox_unmap_message(mailbox, UID(msgno), &msg_base, &msg_size);
+
+ return r;
+}
+
+/*
+ * Helper function to perform a STORE command which only changes the
+ * \Seen flag.
+ */
+static int index_storeseen(struct mailbox *mailbox, unsigned msgno, void *rock)
+{
+ struct storeargs *storeargs = (struct storeargs *)rock;
+ int val = (storeargs->operation == STORE_ADD) ? 1 : 0;
+ int i;
+ bit32 user_flags[MAX_USER_FLAGS/32];
+
+ if (seenflag[msgno] == val) return 0;
+ seenflag[msgno] = val;
+
+ if (storeargs->silent) return 0;
+
+ for (i=0; i < VECTOR_SIZE(user_flags); i++) {
+ user_flags[i] = USER_FLAGS(msgno, i);
+ }
+ index_fetchflags(mailbox, msgno, SYSTEM_FLAGS(msgno), user_flags,
+ LAST_UPDATED(msgno));
+ if (storeargs->usinguid) {
+ prot_printf(imapd_out, " UID %u", UID(msgno));
+ }
+ prot_printf(imapd_out, ")\r\n");
+
+ return 0;
+}
+
+/*
+ * Helper function to perform a generalized STORE command
+ */
+static int index_storeflag(struct mailbox *mailbox,
+ unsigned msgno, void *rock)
+{
+ struct storeargs *storeargs = (struct storeargs *)rock;
+ int i;
+ struct index_record record;
+ int uid = UID(msgno);
+ int low=1, high=mailbox->exists;
+ int mid = 0;
+ int r;
+ int firsttry = 1;
+ int dirty = 0;
+ bit32 oldflags;
+ int sepchar = '(';
+
+ /* Check the modseq against unchangedsince */
+ if (MODSEQ(msgno) > storeargs->unchangedsince) return 0;
+
+ /* Change \Seen flag */
+ if (storeargs->operation == STORE_REPLACE && (mailbox->myrights & ACL_SEEN))
+ {
+ if (seenflag[msgno] != storeargs->seen) dirty++;
+ seenflag[msgno] = storeargs->seen;
+ }
+ else if (storeargs->seen) {
+ i = (storeargs->operation == STORE_ADD) ? 1 : 0;
+ if (seenflag[msgno] != i) dirty++;
+ seenflag[msgno] = i;
+ }
+
+ /* Find index record */
+ while (low <= high) {
+ if (firsttry && msgno == storeargs->last_msgno+1) {
+ /* Take "good" first guess */
+ mid = storeargs->last_found + 1;
+ if (mid > high) mid = high;
+ }
+ else {
+ mid = (high - low)/2 + low;
+ }
+ firsttry = 0;
+ r = mailbox_read_index_record(mailbox, mid, &record);
+ if (r) return r;
+ if (record.uid == uid) {
+ break;
+ }
+ else if (record.uid > uid) {
+ high = mid - 1;
+ }
+ else {
+ low = mid + 1;
+ }
+ }
+ storeargs->last_msgno = msgno;
+ storeargs->last_found = mid;
+
+ if (low > high) {
+ /* Message was expunged. */
+ if (storeargs->usinguid) {
+ /* We're going to * n EXPUNGE it */
+ return 0;
+ }
+
+ /* Fake setting the flags */
+ mid = 0;
+ storeargs->last_found = high;
+ record.system_flags = SYSTEM_FLAGS(msgno);
+ for (i = 0; i < VECTOR_SIZE(record.user_flags); i++) {
+ record.user_flags[i] = USER_FLAGS(msgno, i);
+ }
+ }
+
+ /* save old */
+ oldflags = record.system_flags;
+
+ if (storeargs->operation == STORE_REPLACE) {
+ if (!(mailbox->myrights & ACL_WRITE)) {
+ /* ACL_DELETE handled in index_store() */
+ if ((record.system_flags & FLAG_DELETED) !=
+ (storeargs->system_flags & FLAG_DELETED)) {
+ dirty++;
+ }
+ record.system_flags = (record.system_flags&~FLAG_DELETED) |
+ (storeargs->system_flags&FLAG_DELETED);
+ }
+ else {
+ if (!(mailbox->myrights & ACL_DELETEMSG)) {
+ if ((record.system_flags & ~FLAG_DELETED) !=
+ (storeargs->system_flags & ~FLAG_DELETED)) {
+ dirty++;
+ }
+ record.system_flags = (record.system_flags&FLAG_DELETED) |
+ (storeargs->system_flags&~FLAG_DELETED);
+ }
+ else {
+ if (record.system_flags != storeargs->system_flags) dirty++;
+ record.system_flags = storeargs->system_flags;
+ }
+ for (i = 0; i < VECTOR_SIZE(record.user_flags); i++) {
+ if (record.user_flags[i] != storeargs->user_flags[i]) dirty++;
+ record.user_flags[i] = storeargs->user_flags[i];
+ }
+ }
+ }
+ else if (storeargs->operation == STORE_ADD) {
+ if (~record.system_flags & storeargs->system_flags) dirty++;
+
+ record.system_flags |= storeargs->system_flags;
+ for (i = 0; i < VECTOR_SIZE(record.user_flags); i++) {
+ if (~record.user_flags[i] & storeargs->user_flags[i]) dirty++;
+ record.user_flags[i] |= storeargs->user_flags[i];
+ }
+ }
+ else { /* STORE_REMOVE */
+ if (record.system_flags & storeargs->system_flags) dirty++;
+
+ /* change the individual entry */
+ record.system_flags &= ~storeargs->system_flags;
+ for (i = 0; i < VECTOR_SIZE(record.user_flags); i++) {
+ if (record.user_flags[i] & storeargs->user_flags[i]) dirty++;
+ record.user_flags[i] &= ~storeargs->user_flags[i];
+ }
+ }
+
+ if (dirty) {
+ if (mailbox->options & OPT_IMAP_CONDSTORE) {
+ /* bump MODSEQ */
+ record.modseq = mailbox->highestmodseq + 1;
+ }
+
+ /* update totals */
+ if ( (record.system_flags & FLAG_DELETED) && !(oldflags & FLAG_DELETED))
+ mailbox->deleted++;
+ if ( !(record.system_flags & FLAG_DELETED) && (oldflags & FLAG_DELETED))
+ mailbox->deleted--;
+
+ if ( (record.system_flags & FLAG_ANSWERED) && !(oldflags & FLAG_ANSWERED))
+ mailbox->answered++;
+ if ( !(record.system_flags & FLAG_ANSWERED) && (oldflags & FLAG_ANSWERED))
+ mailbox->answered--;
+
+ if ( (record.system_flags & FLAG_FLAGGED) && !(oldflags & FLAG_FLAGGED))
+ mailbox->flagged++;
+ if ( !(record.system_flags & FLAG_FLAGGED) && (oldflags & FLAG_FLAGGED))
+ mailbox->flagged--;
+
+ /* either a system or user flag changed. need to at least touch acap
+ to change the modtime */
+ mailbox->dirty = 1;
+
+ /* If .SILENT, assume client has updated their cache */
+ if (storeargs->silent &&
+ flagreport[msgno] == record.last_updated) {
+ flagreport[msgno] =
+ (record.last_updated >= storeargs->update_time) ?
+ record.last_updated + 1 : storeargs->update_time;
+ }
+
+ record.last_updated =
+ (record.last_updated >= storeargs->update_time) ?
+ record.last_updated + 1 : storeargs->update_time;
+ }
+
+ if (!storeargs->silent) {
+ index_fetchflags(mailbox, msgno, record.system_flags,
+ record.user_flags, record.last_updated);
+ sepchar = ' ';
+ }
+ if ((mailbox->options & OPT_IMAP_CONDSTORE) && imapd_condstore_client) {
+ if (sepchar == '(') {
+ /* we haven't output a fetch item yet, so start the response */
+ prot_printf(imapd_out, "* %u FETCH ", msgno);
+ }
+ prot_printf(imapd_out, "%cMODSEQ (" MODSEQ_FMT ")",
+ sepchar, record.modseq);
+ sepchar = ' ';
+ }
+ if (sepchar != '(') {
+ /* finsh the response if we have one */
+ if (storeargs->usinguid) {
+ prot_printf(imapd_out, " UID %u", UID(msgno));
+ }
+ prot_printf(imapd_out, ")\r\n");
+ }
+
+ if (dirty && mid) {
+ r = mailbox_write_index_record(mailbox, mid, &record, 0);
+ if (r) return r;
+ }
+
+ return 0;
+}
+
+/*
+ * Evaluate a searchargs structure on a msgno
+ *
+ * Note: msgfile argument must be 0 if msg is not mapped in.
+ */
+static int index_search_evaluate(struct mailbox *mailbox,
+ struct searchargs *searchargs,
+ unsigned msgno,
+ struct mapfile *msgfile)
+{
+ int i;
+ struct strlist *l, *h;
+ const char *cacheitem;
+ int cachelen;
+ struct searchsub *s;
+
+ if ((searchargs->flags & SEARCH_RECENT_SET) && msgno <= lastnotrecent)
+ return 0;
+ if ((searchargs->flags & SEARCH_RECENT_UNSET) && msgno > lastnotrecent)
+ return 0;
+ if ((searchargs->flags & SEARCH_SEEN_SET) && !seenflag[msgno]) return 0;
+ if ((searchargs->flags & SEARCH_SEEN_UNSET) && seenflag[msgno]) return 0;
+
+ if (searchargs->smaller && SIZE(msgno) >= searchargs->smaller) return 0;
+ if (searchargs->larger && SIZE(msgno) <= searchargs->larger) return 0;
+
+ if (searchargs->after && INTERNALDATE(msgno) < searchargs->after)
+ return 0;
+ if (searchargs->before && INTERNALDATE(msgno) > searchargs->before)
+ return 0;
+ if (searchargs->sentafter && SENTDATE(msgno) < searchargs->sentafter)
+ return 0;
+ if (searchargs->sentbefore && SENTDATE(msgno) > searchargs->sentbefore)
+ return 0;
+
+ if (searchargs->modseq && MODSEQ(msgno) < searchargs->modseq) return 0;
+
+ if (~SYSTEM_FLAGS(msgno) & searchargs->system_flags_set) return 0;
+ if (SYSTEM_FLAGS(msgno) & searchargs->system_flags_unset) return 0;
+
+ for (i = 0; i < VECTOR_SIZE(searchargs->user_flags_set); i++) {
+ if (~USER_FLAGS(msgno,i) & searchargs->user_flags_set[i])
+ return 0;
+ if (USER_FLAGS(msgno,i) & searchargs->user_flags_unset[i])
+ return 0;
+ }
+
+ for (l = searchargs->sequence; l; l = l->next) {
+ if (!index_insequence(msgno, l->s, 0)) return 0;
+ }
+ for (l = searchargs->uidsequence; l; l = l->next) {
+ if (!index_insequence(UID(msgno), l->s, 1)) return 0;
+ }
+
+ if (searchargs->from || searchargs->to || searchargs->cc ||
+ searchargs->bcc || searchargs->subject || searchargs->messageid) {
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cachelen = CACHE_ITEM_LEN(cacheitem);
+
+ if (searchargs->messageid) {
+ char *tmpenv;
+ char *envtokens[NUMENVTOKENS];
+ char *msgid;
+ int msgidlen;
+
+ /* get msgid out of the envelope */
+
+ /* get a working copy; strip outer ()'s */
+ /* +1 -> skip the leading paren */
+ /* -2 -> don't include the size of the outer parens */
+ tmpenv = xstrndup(cacheitem + CACHE_ITEM_SIZE_SKIP + 1,
+ cachelen - 2);
+ parse_cached_envelope(tmpenv, envtokens, VECTOR_SIZE(envtokens));
+
+ if (!envtokens[ENV_MSGID]) {
+ /* free stuff */
+ free(tmpenv);
+
+ return 0;
+ }
+
+ msgid = lcase(envtokens[ENV_MSGID]);
+ msgidlen = strlen(msgid);
+ for (l = searchargs->messageid; l; l = l->next) {
+ if (!charset_searchstring(l->s, l->p, msgid, msgidlen)) {
+ break;
+ }
+ }
+
+ /* free stuff */
+ free(tmpenv);
+
+ if (l) return 0;
+ }
+
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip section */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip cacheheaders */
+ cachelen = CACHE_ITEM_LEN(cacheitem);
+
+ for (l = searchargs->from; l; l = l->next) {
+ if (cachelen == 0 ||
+ !charset_searchstring(l->s, l->p,
+ cacheitem + CACHE_ITEM_SIZE_SKIP,
+ cachelen))
+ return 0;
+ }
+
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip from */
+ cachelen = CACHE_ITEM_LEN(cacheitem);
+
+ for (l = searchargs->to; l; l = l->next) {
+ if (cachelen == 0 ||
+ !charset_searchstring(l->s, l->p,
+ cacheitem + CACHE_ITEM_SIZE_SKIP,
+ cachelen))
+ return 0;
+ }
+
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip to */
+ cachelen = CACHE_ITEM_LEN(cacheitem);
+
+ for (l = searchargs->cc; l; l = l->next) {
+ if (cachelen == 0 ||
+ !charset_searchstring(l->s, l->p,
+ cacheitem + CACHE_ITEM_SIZE_SKIP,
+ cachelen))
+ return 0;
+ }
+
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip cc */
+ cachelen = CACHE_ITEM_LEN(cacheitem);
+
+ for (l = searchargs->bcc; l; l = l->next) {
+ if (cachelen == 0 ||
+ !charset_searchstring(l->s, l->p,
+ cacheitem + CACHE_ITEM_SIZE_SKIP,
+ cachelen))
+ return 0;
+ }
+
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bcc */
+ cachelen = CACHE_ITEM_LEN(cacheitem);
+
+ for (l = searchargs->subject; l; l = l->next) {
+ if ((cachelen == 3 &&
+ !strcmp(cacheitem + CACHE_ITEM_SIZE_SKIP, "NIL")) ||
+ !charset_searchstring(l->s, l->p,
+ cacheitem + CACHE_ITEM_SIZE_SKIP,
+ cachelen))
+ return 0;
+ }
+ }
+
+ for (s = searchargs->sublist; s; s = s->next) {
+ if (index_search_evaluate(mailbox, s->sub1, msgno, msgfile)) {
+ if (!s->sub2) return 0;
+ }
+ else {
+ if (s->sub2 &&
+ !index_search_evaluate(mailbox, s->sub2, msgno, msgfile))
+ return 0;
+ }
+ }
+
+ if (searchargs->body || searchargs->text ||
+ searchargs->cache_atleast > CACHE_VERSION(msgno)) {
+ if (! msgfile->size) { /* Map the message in if we haven't before */
+ if (mailbox_map_message(mailbox, UID(msgno),
+ &msgfile->base, &msgfile->size)) {
+ return 0;
+ }
+ }
+
+ h = searchargs->header_name;
+ for (l = searchargs->header; l; (l = l->next), (h = h->next)) {
+ if (!index_searchheader(h->s, l->s, l->p, msgfile, mailbox->format,
+ HEADER_SIZE(msgno))) return 0;
+ }
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+
+ for (l = searchargs->body; l; l = l->next) {
+ if (!index_searchmsg(l->s, l->p, msgfile, mailbox->format, 1,
+ cacheitem)) return 0;
+ }
+ for (l = searchargs->text; l; l = l->next) {
+ if (!index_searchmsg(l->s, l->p, msgfile, mailbox->format, 0,
+ cacheitem)) return 0;
+ }
+ }
+ else if (searchargs->header_name) {
+ h = searchargs->header_name;
+ for (l = searchargs->header; l; (l = l->next), (h = h->next)) {
+ if (!index_searchcacheheader(msgno, h->s, l->s, l->p)) return 0;
+ }
+ }
+
+ return 1;
+}
+
+/*
+ * Search part of a message for a substring.
+ * Keep this in sync with index_getsearchtextmsg!
+ */
+static int
+index_searchmsg(char *substr,
+ comp_pat *pat,
+ struct mapfile *msgfile,
+ int format,
+ int skipheader,
+ const char *cacheitem)
+{
+ int partsleft = 1;
+ int subparts;
+ int start, len, charset, encoding;
+ char *p, *q;
+
+ /* Won't find anything in a truncated file */
+ if (msgfile->size == 0) return 0;
+
+ cacheitem += CACHE_ITEM_SIZE_SKIP;
+ while (partsleft--) {
+ subparts = CACHE_ITEM_BIT32(cacheitem);
+ cacheitem += 4;
+ if (subparts) {
+ partsleft += subparts-1;
+
+ if (skipheader) {
+ skipheader = 0; /* Only skip top-level message header */
+ }
+ else {
+ len = CACHE_ITEM_BIT32(cacheitem + CACHE_ITEM_SIZE_SKIP);
+ if (len > 0) {
+ p = index_readheader(msgfile->base, msgfile->size,
+ format, CACHE_ITEM_BIT32(cacheitem),
+ len);
+ q = charset_decode_mimeheader(p, NULL, 0);
+ if (charset_searchstring(substr, pat, q, strlen(q))) {
+ free(q);
+ return 1;
+ }
+ free(q);
+ }
+ }
+ cacheitem += 5*4;
+
+ while (--subparts) {
+ start = CACHE_ITEM_BIT32(cacheitem+2*4);
+ len = CACHE_ITEM_BIT32(cacheitem+3*4);
+ charset = CACHE_ITEM_BIT32(cacheitem+4*4) >> 16;
+ encoding = CACHE_ITEM_BIT32(cacheitem+4*4) & 0xff;
+
+ if (start < msgfile->size && len > 0 &&
+ charset >= 0 && charset < 0xffff) {
+ if (charset_searchfile(substr, pat,
+ msgfile->base + start,
+ format == MAILBOX_FORMAT_NETNEWS,
+ len, charset, encoding)) return 1;
+ }
+ cacheitem += 5*4;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * Search named header of a message for a substring
+ */
+static int index_searchheader(char *name,
+ char *substr,
+ comp_pat *pat,
+ struct mapfile *msgfile,
+ int format,
+ int size)
+{
+ char *p, *q;
+ int r;
+ static struct strlist header;
+
+ header.s = name;
+
+ p = index_readheader(msgfile->base, msgfile->size, format, 0, size);
+ index_pruneheader(p, &header, 0);
+ if (!*p) return 0; /* Header not present, fail */
+ if (!*substr) return 1; /* Only checking existence, succeed */
+ q = charset_decode_mimeheader(strchr(p, ':') + 1, NULL, 0);
+ r = charset_searchstring(substr, pat, q, strlen(q));
+ free(q);
+ return r;
+}
+
+/*
+ * Search named cached header of a message for a substring
+ */
+static int index_searchcacheheader(unsigned msgno,
+ char *name, char *substr,
+ comp_pat *pat)
+{
+ char *q;
+ static struct strlist header;
+ static char *buf;
+ static int bufsize;
+ const char *cacheitem;
+ unsigned size;
+ int r;
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip section */
+
+ size = CACHE_ITEM_LEN(cacheitem);
+ if (!size) return 0; /* No cached headers, fail */
+ cacheitem += sizeof(bit32);
+
+ if (bufsize < size+2) {
+ bufsize = size+100;
+ buf = xrealloc(buf, bufsize);
+ }
+
+ /* Copy this item to the buffer */
+ memcpy(buf, cacheitem, size);
+ buf[size] = '\0';
+
+ header.s = name;
+
+ index_pruneheader(buf, &header, 0);
+ if (!*buf) return 0; /* Header not present, fail */
+ if (!*substr) return 1; /* Only checking existence, succeed */
+ q = charset_decode_mimeheader(strchr(buf, ':') + 1, NULL, 0);
+ r = charset_searchstring(substr, pat, q, strlen(q));
+ free(q);
+ return r;
+}
+
+
+/* This code was cribbed from index_searchmsg. Instead of checking for matches,
+ we call charset_extractfile to send the entire text out to 'receiver'.
+ Keep this in sync with index_searchmsg! */
+static void index_getsearchtextmsg(struct mailbox* mailbox,
+ int uid,
+ index_search_text_receiver_t receiver,
+ void* rock,
+ char const* cacheitem) {
+ struct mapfile msgfile;
+ int partsleft = 1;
+ int subparts;
+ int start, len, charset, encoding;
+ int partcount = 0;
+ char *p, *q;
+ int format = mailbox->format;
+
+ if (mailbox_map_message(mailbox, uid, &msgfile.base, &msgfile.size)) {
+ return;
+ }
+
+ /* Won't find anything in a truncated file */
+ if (msgfile.size > 0) {
+ cacheitem += 4;
+ while (partsleft--) {
+ subparts = CACHE_ITEM_BIT32(cacheitem);
+ cacheitem += 4;
+ if (subparts) {
+ partsleft += subparts-1;
+
+ partcount++;
+
+ len = CACHE_ITEM_BIT32(cacheitem+4);
+ if (len > 0) {
+ p = index_readheader(msgfile.base, msgfile.size,
+ format, CACHE_ITEM_BIT32(cacheitem),
+ len);
+ q = charset_decode_mimeheader(p, NULL, 0);
+ if (partcount == 1) {
+ receiver(uid, SEARCHINDEX_PART_HEADERS,
+ SEARCHINDEX_CMD_STUFFPART, q, strlen(q), rock);
+ receiver(uid, SEARCHINDEX_PART_BODY,
+ SEARCHINDEX_CMD_BEGINPART, NULL, 0, rock);
+ } else {
+ receiver(uid, SEARCHINDEX_PART_BODY,
+ SEARCHINDEX_CMD_APPENDPART, q, strlen(q), rock);
+ }
+ free(q);
+ }
+ cacheitem += 5*4;
+
+ while (--subparts) {
+ start = CACHE_ITEM_BIT32(cacheitem+2*4);
+ len = CACHE_ITEM_BIT32(cacheitem+3*4);
+ charset = CACHE_ITEM_BIT32(cacheitem+4*4) >> 16;
+ encoding = CACHE_ITEM_BIT32(cacheitem+4*4) & 0xff;
+
+ if (start < msgfile.size && len > 0 &&
+ charset >= 0 && charset < 0xffff) {
+ charset_extractfile(receiver, rock, uid,
+ msgfile.base + start,
+ format == MAILBOX_FORMAT_NETNEWS,
+ len, charset, encoding);
+ }
+ cacheitem += 5*4;
+ }
+ }
+ }
+
+ receiver(uid, SEARCHINDEX_PART_BODY,
+ SEARCHINDEX_CMD_ENDPART, NULL, 0, rock);
+ }
+
+ mailbox_unmap_message(mailbox, uid, &msgfile.base, &msgfile.size);
+}
+
+void index_getsearchtext(struct mailbox* mailbox,
+ index_search_text_receiver_t receiver,
+ void* rock) {
+ int i;
+
+ /* Send the converted text of every message out to the receiver. */
+ for (i = 1; i <= imapd_exists; i++) {
+ const char *cacheitem;
+ int uid = UID(i);
+
+ cacheitem = cache_base + CACHE_OFFSET(i);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+
+ index_getsearchtextmsg(mailbox, uid, receiver, rock, cacheitem);
+
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip section */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip cacheheaders */
+
+ receiver(uid, SEARCHINDEX_PART_FROM, SEARCHINDEX_CMD_STUFFPART,
+ cacheitem + 4, CACHE_ITEM_LEN(cacheitem), rock);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip from */
+
+ receiver(uid, SEARCHINDEX_PART_TO, SEARCHINDEX_CMD_STUFFPART,
+ cacheitem + 4, CACHE_ITEM_LEN(cacheitem), rock);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip to */
+
+ receiver(uid, SEARCHINDEX_PART_CC, SEARCHINDEX_CMD_STUFFPART,
+ cacheitem + 4, CACHE_ITEM_LEN(cacheitem), rock);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip cc */
+
+ receiver(uid, SEARCHINDEX_PART_BCC, SEARCHINDEX_CMD_STUFFPART,
+ cacheitem + 4, CACHE_ITEM_LEN(cacheitem), rock);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bcc */
+
+ receiver(uid, SEARCHINDEX_PART_SUBJECT, SEARCHINDEX_CMD_STUFFPART,
+ cacheitem + 4, CACHE_ITEM_LEN(cacheitem), rock);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip subject */
+ }
+}
+
+/*
+ * Helper function to set up arguments to append_copy()
+ */
+#define COPYARGSGROW 30
+static int
+index_copysetup(mailbox, msgno, rock)
+struct mailbox *mailbox;
+unsigned msgno;
+void *rock;
+{
+ struct copyargs *copyargs = (struct copyargs *)rock;
+ int flag = 0;
+ unsigned userflag;
+ bit32 flagmask = 0;
+
+ if (copyargs->nummsg == copyargs->msgalloc) {
+ copyargs->msgalloc += COPYARGSGROW;
+ copyargs->copymsg = (struct copymsg *)
+ xrealloc((char *)copyargs->copymsg,
+ copyargs->msgalloc * sizeof(struct copymsg));
+ }
+
+ copyargs->copymsg[copyargs->nummsg].uid = UID(msgno);
+ copyargs->copymsg[copyargs->nummsg].internaldate = INTERNALDATE(msgno);
+ copyargs->copymsg[copyargs->nummsg].sentdate = SENTDATE(msgno);
+ copyargs->copymsg[copyargs->nummsg].size = SIZE(msgno);
+ copyargs->copymsg[copyargs->nummsg].header_size = HEADER_SIZE(msgno);
+ copyargs->copymsg[copyargs->nummsg].content_lines = CONTENT_LINES(msgno);
+ copyargs->copymsg[copyargs->nummsg].cache_version = CACHE_VERSION(msgno);
+ copyargs->copymsg[copyargs->nummsg].cache_begin = cache_base + CACHE_OFFSET(msgno);
+ message_uuid_unpack(©args->copymsg[copyargs->nummsg].uuid,
+ (unsigned char *) /* YYY */
+ INDEC_OFFSET(msgno)+OFFSET_MESSAGE_UUID);
+
+ if (mailbox->format != MAILBOX_FORMAT_NORMAL) {
+ /* Force copy and re-parse of message */
+ copyargs->copymsg[copyargs->nummsg].cache_len = 0;
+ }
+ else if (msgno < imapd_exists) {
+ copyargs->copymsg[copyargs->nummsg].cache_len =
+ CACHE_OFFSET(msgno+1) - CACHE_OFFSET(msgno);
+ }
+ else {
+ copyargs->copymsg[copyargs->nummsg].cache_len =
+ cache_end - CACHE_OFFSET(msgno);
+ }
+ copyargs->copymsg[copyargs->nummsg].seen = seenflag[msgno];
+ copyargs->copymsg[copyargs->nummsg].system_flags = SYSTEM_FLAGS(msgno);
+
+ for (userflag = 0; userflag < MAX_USER_FLAGS; userflag++) {
+ if ((userflag & 31) == 0) {
+ flagmask = USER_FLAGS(msgno,userflag/32);
+ }
+ if (!mailbox->flagname[userflag] && (flagmask & (1<<(userflag&31)))) {
+ mailbox_read_header(mailbox);
+ index_listflags(mailbox);
+ break;
+ }
+ }
+
+ for (userflag = 0; userflag < MAX_USER_FLAGS; userflag++) {
+ if ((userflag & 31) == 0) {
+ flagmask = USER_FLAGS(msgno,userflag/32);
+ }
+ if (mailbox->flagname[userflag] && (flagmask & (1<<(userflag&31)))) {
+ copyargs->copymsg[copyargs->nummsg].flag[flag++] =
+ mailbox->flagname[userflag];
+ }
+ }
+ copyargs->copymsg[copyargs->nummsg].flag[flag] = 0;
+
+ copyargs->nummsg++;
+
+ return 0;
+}
+
+/*
+ * Creates a list of msgdata.
+ *
+ * We fill these structs with the processed info that will be needed
+ * by the specified sort criteria.
+ */
+#define ANNOTGROWSIZE 10
+
+static MsgData *index_msgdata_load(unsigned *msgno_list, int n,
+ struct sortcrit *sortcrit)
+{
+ MsgData *md, *cur;
+ const char *cacheitem = NULL, *env = NULL,
+ *headers = NULL, *from = NULL, *to = NULL, *cc = NULL, *subj = NULL;
+ int i, j;
+ char *tmpenv;
+ char *envtokens[NUMENVTOKENS];
+ int did_cache, did_env;
+ int label;
+ int annotsize;
+
+ if (!n)
+ return NULL;
+
+ /* create an array of MsgData to use as nodes of linked list */
+ md = (MsgData *) xmalloc(n * sizeof(MsgData));
+ memset(md, 0, n * sizeof(MsgData));
+
+ for (i = 0, cur = md; i < n; i++, cur = cur->next) {
+ /* set msgno */
+ cur->msgno = msgno_list[i];
+
+ /* set pointer to next node */
+ cur->next = (i+1 < n ? cur+1 : NULL);
+
+ did_cache = did_env = 0;
+ tmpenv = NULL;
+ annotsize = 0;
+
+ for (j = 0; sortcrit[j].key; j++) {
+ label = sortcrit[j].key;
+
+ if ((label == SORT_CC || label == SORT_DATE ||
+ label == SORT_FROM || label == SORT_SUBJECT ||
+ label == SORT_TO || label == LOAD_IDS) &&
+ !did_cache) {
+
+ /* fetch cached info */
+ env = cache_base + CACHE_OFFSET(cur->msgno);
+ cacheitem = CACHE_ITEM_NEXT(env); /* bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* body */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* section */
+ headers = CACHE_ITEM_NEXT(cacheitem);
+ from = CACHE_ITEM_NEXT(headers);
+ to = CACHE_ITEM_NEXT(from);
+ cc = CACHE_ITEM_NEXT(to);
+ cacheitem = CACHE_ITEM_NEXT(cc); /* bcc */
+ subj = CACHE_ITEM_NEXT(cacheitem);
+
+ did_cache++;
+ }
+
+ if ((label == SORT_DATE || label == LOAD_IDS) &&
+ !did_env) {
+
+ /* make a working copy of envelope -- strip outer ()'s */
+ /* +1 -> skip the leading paren */
+ /* -2 -> don't include the size of the outer parens */
+ tmpenv = xstrndup(env + CACHE_ITEM_SIZE_SKIP + 1,
+ CACHE_ITEM_LEN(env) - 2);
+
+ /* parse envelope into tokens */
+ parse_cached_envelope(tmpenv, envtokens,
+ VECTOR_SIZE(envtokens));
+
+ did_env++;
+ }
+
+ switch (label) {
+ case SORT_CC:
+ cur->cc = get_localpart_addr(cc + CACHE_ITEM_SIZE_SKIP);
+ break;
+ case SORT_DATE:
+ cur->date = message_parse_date(envtokens[ENV_DATE],
+ PARSE_TIME | PARSE_ZONE);
+ break;
+ case SORT_FROM:
+ cur->from = get_localpart_addr(from + CACHE_ITEM_SIZE_SKIP);
+ break;
+ case SORT_SUBJECT:
+ cur->xsubj = index_extract_subject(subj + CACHE_ITEM_SIZE_SKIP,
+ CACHE_ITEM_LEN(subj),
+ &cur->is_refwd);
+ cur->xsubj_hash = strhash(cur->xsubj);
+ break;
+ case SORT_TO:
+ cur->to = get_localpart_addr(to + CACHE_ITEM_SIZE_SKIP);
+ break;
+ case SORT_ANNOTATION:
+ /* reallocate space for the annotation values if necessary */
+ if (cur->nannot == annotsize) {
+ annotsize += ANNOTGROWSIZE;
+ cur->annot = (char **)
+ xrealloc(cur->annot, annotsize * sizeof(char *));
+ }
+
+ /* fetch attribute value - we fake it for now */
+ cur->annot[cur->nannot] = xstrdup(sortcrit[j].args.annot.attrib);
+ cur->nannot++;
+ break;
+ case LOAD_IDS:
+ index_get_ids(cur, envtokens, headers + CACHE_ITEM_SIZE_SKIP);
+ break;
+ }
+ }
+
+ if (tmpenv) free(tmpenv);
+ }
+
+ return md;
+}
+
+/*
+ * Parse a cached envelope into individual tokens
+ *
+ * When inside a list (ncom > 0), we parse the individual tokens but don't
+ * isolate them -- we return the entire list as a single token.
+ */
+static void parse_cached_envelope(char *env, char *tokens[], int tokens_size)
+{
+ char *c;
+ int i = 0, ncom = 0, len;
+
+ c = env;
+ while (*c != '\0') {
+ switch (*c) {
+ case ' ': /* end of token */
+ if (!ncom) *c = '\0'; /* mark end of token */
+ c++;
+ break;
+ case 'N': /* "NIL" */
+ case 'n':
+ if (!ncom) {
+ if(i>=tokens_size) break;
+ tokens[i++] = NULL; /* empty token */
+ }
+ c += 3; /* skip "NIL" */
+ break;
+ case '"': /* quoted string */
+ c++; /* skip open quote */
+ if (!ncom) {
+ if(i>=tokens_size) break;
+ tokens[i++] = c; /* start of string */
+ }
+ while (*c != '"') { /* find close quote */
+ if (*c == '\0') {
+ /* Oops, bad string. */
+ fatal("Quoted string w/o end quote in parse_cached_envelope",
+ EC_SOFTWARE);
+ }
+ if (*c == '\\') c++; /* skip quoted-specials */
+ c++;
+ }
+ if (!ncom) *c = '\0'; /* end of string */
+ c++; /* skip close quote */
+ break;
+ case '{': /* literal */
+ c++; /* skip open brace */
+ len = 0; /* determine length of literal */
+ while (isdigit((int) *c)) {
+ len = len*10 + *c - '0';
+ c++;
+ }
+ c += 3; /* skip close brace & CRLF */
+ if (!ncom){
+ if(i>=tokens_size) break;
+ tokens[i++] = c; /* start of literal */
+ }
+ c += len; /* skip literal */
+ break;
+ case '(': /* start of address */
+ c++; /* skip open paren */
+ if (!ncom) {
+ if(i>=tokens_size) break;
+ tokens[i++] = c; /* start of address list */
+ }
+ ncom++; /* new open - inc counter */
+ break;
+ case ')': /* end of address */
+ c++; /* skip close paren */
+ if (ncom) { /* paranoia */
+ ncom--; /* close - dec counter */
+ if (!ncom) /* all open paren are closed */
+ *(c-1) = '\0'; /* end of list - trim close paren */
+ }
+ break;
+ default:
+ /* yikes! unparsed junk, just skip it */
+ c++;
+ break;
+ }
+ }
+}
+
+/*
+ * Get the 'local-part' of an address from a header
+ */
+static char *get_localpart_addr(const char *header)
+{
+ struct address *addr = NULL;
+ char *ret;
+
+ parseaddr_list(header, &addr);
+ ret = xstrdup(addr && addr->mailbox ? addr->mailbox : "");
+ parseaddr_free(addr);
+ return ret;
+}
+
+/*
+ * Extract base subject from subject header
+ *
+ * This is a wrapper around _index_extract_subject() which preps the
+ * subj NSTRING and checks for Netscape "[Fwd: ]".
+ */
+static char *index_extract_subject(const char *subj, size_t len, int *is_refwd)
+{
+ char *buf, *s, *base;
+
+ /* parse the subj NSTRING and make a working copy */
+ if (!strcmp(subj, "NIL")) { /* NIL? */
+ return xstrdup(""); /* yes, return empty */
+ } else if (*subj == '"') { /* quoted? */
+ buf = xstrndup(subj + 1, len - 2); /* yes, strip quotes */
+ } else {
+ s = strchr(subj, '}') + 3; /* literal, skip { }\r\n */
+ buf = xstrndup(s, len - (s - subj));
+ }
+
+ for (s = buf;;) {
+ base = _index_extract_subject(s, is_refwd);
+
+ /* If we have a Netscape "[Fwd: ...]", extract the contents */
+ if (!strncasecmp(base, "[fwd:", 5) &&
+ base[strlen(base) - 1] == ']') {
+
+ /* inc refwd counter */
+ *is_refwd += 1;
+
+ /* trim "]" */
+ base[strlen(base) - 1] = '\0';
+
+ /* trim "[fwd:" */
+ s = base + 5;
+ }
+ else /* otherwise, we're done */
+ break;
+ }
+
+ base = xstrdup(base);
+
+ free(buf);
+
+ return base;
+}
+
+/*
+ * Guts if subject extraction.
+ *
+ * Takes a subject string and returns a pointer to the base.
+ */
+static char *_index_extract_subject(char *s, int *is_refwd)
+{
+ char *base, *x;
+
+ /* trim trailer
+ *
+ * start at the end of the string and work towards the front,
+ * resetting the end of the string as we go.
+ */
+ for (x = s + strlen(s) - 1; x >= s;) {
+ if (isspace((int) *x)) { /* whitespace? */
+ *x = '\0'; /* yes, trim it */
+ x--; /* skip past it */
+ }
+ else if (x - s >= 4 &&
+ !strncasecmp(x-4, "(fwd)", 5)) { /* "(fwd)"? */
+ *(x-4) = '\0'; /* yes, trim it */
+ x -= 5; /* skip past it */
+ *is_refwd += 1; /* inc refwd counter */
+ }
+ else
+ break; /* we're done */
+ }
+
+ /* trim leader
+ *
+ * start at the head of the string and work towards the end,
+ * skipping over stuff we don't care about.
+ */
+ for (base = s; base;) {
+ if (isspace((int) *base)) base++; /* whitespace? */
+
+ /* possible refwd */
+ else if ((!strncasecmp(base, "re", 2) && /* "re"? */
+ (x = base + 2)) || /* yes, skip past it */
+ (!strncasecmp(base, "fwd", 3) && /* "fwd"? */
+ (x = base + 3)) || /* yes, skip past it */
+ (!strncasecmp(base, "fw", 2) && /* "fw"? */
+ (x = base + 2))) { /* yes, skip past it */
+ int count = 0; /* init counter */
+
+ while (isspace((int) *x)) x++; /* skip whitespace */
+
+ if (*x == '[') { /* start of blob? */
+ for (x++; x;) { /* yes, get count */
+ if (!*x) { /* end of subj, quit */
+ x = NULL;
+ break;
+ }
+ else if (*x == ']') { /* end of blob, done */
+ break;
+ /* if we have a digit, and we're still
+ counting, keep building the count */
+ } else if (isdigit((int) *x) && count != -1) {
+ count = count * 10 + *x - '0';
+ if (count < 0) { /* overflow */
+ count = -1; /* abort counting */
+ }
+ } else { /* no digit, */
+ count = -1; /* abort counting */
+ }
+ x++;
+ }
+
+ if (x) /* end of blob? */
+ x++; /* yes, skip past it */
+ else
+ break; /* no, we're done */
+ }
+
+ while (isspace((int) *x)) x++; /* skip whitespace */
+
+ if (*x == ':') { /* ending colon? */
+ base = x + 1; /* yes, skip past it */
+ *is_refwd += (count > 0 ? count : 1); /* inc refwd counter
+ by count or 1 */
+ }
+ else
+ break; /* no, we're done */
+ }
+
+#if 0 /* do nested blobs - wait for decision on this */
+ else if (*base == '[') { /* start of blob? */
+ int count = 1; /* yes, */
+ x = base + 1; /* find end of blob */
+ while (count) { /* find matching ']' */
+ if (!*x) { /* end of subj, quit */
+ x = NULL;
+ break;
+ }
+ else if (*x == '[') /* new open */
+ count++; /* inc counter */
+ else if (*x == ']') /* close */
+ count--; /* dec counter */
+ x++;
+ }
+
+ if (!x) /* blob didn't close */
+ break; /* so quit */
+
+ else if (*x) /* end of subj? */
+ base = x; /* no, skip blob */
+#else
+ else if (*base == '[' && /* start of blob? */
+ (x = strpbrk(base+1, "[]")) && /* yes, end of blob */
+ *x == ']') { /* (w/o nesting)? */
+
+ if (*(x+1)) /* yes, end of subj? */
+ base = x + 1; /* no, skip blob */
+#endif
+ else
+ break; /* yes, return blob */
+ }
+ else
+ break; /* we're done */
+ }
+
+ return base;
+}
+
+/* Find a message-id looking thingy in a string. Returns a pointer to the
+ * alloc'd id and the remaining string is returned in the **loc parameter.
+ *
+ * This is a poor-man's way of finding the message-id. We simply look for
+ * any string having the format "< ... @ ... >" and assume that the mail
+ * client created a properly formatted message-id.
+ */
+#define MSGID_SPECIALS "<> @\\"
+
+static char *find_msgid(char *str, char **rem)
+{
+ char *msgid, *src, *dst, *cp;
+
+ if (!str) return NULL;
+
+ msgid = NULL;
+ src = str;
+
+ /* find the start of a msgid (don't go past the end of the header) */
+ while ((cp = src = strpbrk(src, "<\r")) != NULL) {
+
+ /* check for fold or end of header
+ *
+ * Per RFC 2822 section 2.2.3, a long header may be folded by
+ * inserting CRLF before any WSP (SP and HTAB, per section 2.2.2).
+ * Any other CRLF is the end of the header.
+ */
+ if (*cp++ == '\r') {
+ if (*cp++ == '\n' && !(*cp == ' ' || *cp == '\t')) {
+ /* end of header, we're done */
+ break;
+ }
+
+ /* skip fold (or junk) */
+ src++;
+ continue;
+ }
+
+ /* see if we have (and skip) a quoted localpart */
+ if (*cp == '\"') {
+ /* find the endquote, making sure it isn't escaped */
+ do {
+ ++cp; cp = strchr(cp, '\"');
+ } while (cp && *(cp-1) == '\\');
+
+ /* no endquote, so bail */
+ if (!cp) {
+ src++;
+ continue;
+ }
+ }
+
+ /* find the end of the msgid */
+ if ((cp = strchr(cp, '>')) == NULL)
+ return NULL;
+
+ /* alloc space for the msgid */
+ dst = msgid = (char*) xrealloc(msgid, cp - src + 2);
+
+ *dst++ = *src++;
+
+ /* quoted string */
+ if (*src == '\"') {
+ src++;
+ while (*src != '\"') {
+ if (*src == '\\') {
+ src++;
+ }
+ *dst++ = *src++;
+ }
+ src++;
+ }
+ /* atom */
+ else {
+ while (!strchr(MSGID_SPECIALS, *src))
+ *dst++ = *src++;
+ }
+
+ if (*src != '@' || *(dst-1) == '<') continue;
+ *dst++ = *src++;
+
+ /* domain atom */
+ while (!strchr(MSGID_SPECIALS, *src))
+ *dst++ = *src++;
+
+ if (*src != '>' || *(dst-1) == '@') continue;
+ *dst++ = *src++;
+ *dst = '\0';
+
+ if (rem) *rem = src;
+ return msgid;
+ }
+
+ if (msgid) free(msgid);
+ return NULL;
+}
+
+/* Get message-id, and references/in-reply-to */
+#define REFGROWSIZE 10
+
+void index_get_ids(MsgData *msgdata, char *envtokens[], const char *headers)
+{
+ char *refstr, *ref, *in_reply_to;
+ int refsize = REFGROWSIZE;
+ char buf[100];
+
+ /* get msgid */
+ msgdata->msgid = find_msgid(envtokens[ENV_MSGID], NULL);
+ /* if we don't have one, create one */
+ if (!msgdata->msgid) {
+ snprintf(buf, sizeof(buf), "<Empty-ID: %u>", msgdata->msgno);
+ msgdata->msgid = xstrdup(buf);
+ }
+
+ /* grab the References header */
+ if ((refstr = stristr(headers, "references:"))) {
+ /* allocate some space for refs */
+ msgdata->ref = (char **) xmalloc(refsize * sizeof(char *));
+ /* find references */
+ while ((ref = find_msgid(refstr, &refstr)) != NULL) {
+ /* reallocate space for this msgid if necessary */
+ if (msgdata->nref == refsize) {
+ refsize += REFGROWSIZE;
+ msgdata->ref = (char **)
+ xrealloc(msgdata->ref, refsize * sizeof(char *));
+ }
+ /* store this msgid in the array */
+ msgdata->ref[msgdata->nref++] = ref;
+ }
+ }
+
+ /* if we have no references, try in-reply-to */
+ if (!msgdata->nref) {
+ /* get in-reply-to id */
+ in_reply_to = find_msgid(envtokens[ENV_INREPLYTO], NULL);
+ /* if we have an in-reply-to id, make it the ref */
+ if (in_reply_to) {
+ msgdata->ref = (char **) xmalloc(sizeof(char *));
+ msgdata->ref[msgdata->nref++] = in_reply_to;
+ }
+ }
+}
+
+/*
+ * Getnext function for sorting message lists.
+ */
+static void *index_sort_getnext(MsgData *node)
+{
+ return node->next;
+}
+
+/*
+ * Setnext function for sorting message lists.
+ */
+static void index_sort_setnext(MsgData *node, MsgData *next)
+{
+ node->next = next;
+}
+
+/*
+ * Function for comparing two integers.
+ */
+static int numcmp(modseq_t n1, modseq_t n2)
+{
+ return ((n1 < n2) ? -1 : (n1 > n2) ? 1 : 0);
+}
+
+/*
+ * Comparison function for sorting message lists.
+ */
+static int index_sort_compare(MsgData *md1, MsgData *md2,
+ struct sortcrit *sortcrit)
+{
+ int reverse, ret = 0, i = 0, ann = 0;
+
+ do {
+ /* determine sort order from reverse flag bit */
+ reverse = sortcrit[i].flags & SORT_REVERSE;
+
+ switch (sortcrit[i].key) {
+ case SORT_SEQUENCE:
+ ret = numcmp(md1->msgno, md2->msgno);
+ break;
+ case SORT_ARRIVAL:
+ ret = numcmp(INTERNALDATE(md1->msgno), INTERNALDATE(md2->msgno));
+ break;
+ case SORT_CC:
+ ret = strcmp(md1->cc, md2->cc);
+ break;
+ case SORT_DATE:
+ ret = (md1->date && md2->date) ?
+ numcmp(md1->date, md2->date) : numcmp(md1->msgno, md2->msgno);
+ break;
+ case SORT_FROM:
+ ret = strcmp(md1->from, md2->from);
+ break;
+ case SORT_SIZE:
+ ret = numcmp(SIZE(md1->msgno), SIZE(md2->msgno));
+ break;
+ case SORT_SUBJECT:
+ ret = strcmp(md1->xsubj, md2->xsubj);
+ break;
+ case SORT_TO:
+ ret = strcmp(md1->to, md2->to);
+ break;
+ case SORT_ANNOTATION:
+ ret = strcmp(md1->annot[ann], md2->annot[ann]);
+ ann++;
+ break;
+ case SORT_MODSEQ:
+ ret = numcmp(MODSEQ(md1->msgno), MODSEQ(md2->msgno));
+ break;
+ }
+ } while (!ret && sortcrit[i++].key != SORT_SEQUENCE);
+
+ return (reverse ? -ret : ret);
+}
+
+/*
+ * Free a msgdata node.
+ */
+static void index_msgdata_free(MsgData *md)
+{
+#define FREE(x) if (x) free(x)
+ int i;
+
+ if (!md)
+ return;
+ FREE(md->cc);
+ FREE(md->from);
+ FREE(md->to);
+ FREE(md->xsubj);
+ FREE(md->msgid);
+ for (i = 0; i < md->nref; i++)
+ free(md->ref[i]);
+ FREE(md->ref);
+ for (i = 0; i < md->nannot; i++)
+ free(md->annot[i]);
+ FREE(md->annot);
+}
+
+/*
+ * Getnext function for sorting thread lists.
+ */
+static void *index_thread_getnext(Thread *thread)
+{
+ return thread->next;
+}
+
+/*
+ * Setnext function for sorting thread lists.
+ */
+static void index_thread_setnext(Thread *thread, Thread *next)
+{
+ thread->next = next;
+}
+
+/*
+ * Comparison function for sorting threads.
+ */
+static int index_thread_compare(Thread *t1, Thread *t2,
+ struct sortcrit *call_data)
+{
+ MsgData *md1, *md2;
+
+ /* if the container is empty, use the first child's container */
+ md1 = t1->msgdata ? t1->msgdata : t1->child->msgdata;
+ md2 = t2->msgdata ? t2->msgdata : t2->child->msgdata;
+ return index_sort_compare(md1, md2, call_data);
+}
+
+/*
+ * Sort a list of threads.
+ */
+static void index_thread_sort(Thread *root, struct sortcrit *sortcrit)
+{
+ Thread *child;
+
+ /* sort the grandchildren */
+ child = root->child;
+ while (child) {
+ /* if the child has children, sort them */
+ if (child->child)
+ index_thread_sort(child, sortcrit);
+ child = child->next;
+ }
+
+ /* sort the children */
+ root->child = lsort(root->child,
+ (void * (*)(void*)) index_thread_getnext,
+ (void (*)(void*,void*)) index_thread_setnext,
+ (int (*)(void*,void*,void*)) index_thread_compare,
+ sortcrit);
+}
+
+/*
+ * Thread a list of messages using the ORDEREDSUBJECT algorithm.
+ */
+static void index_thread_orderedsubj(unsigned *msgno_list, int nmsg,
+ int usinguid)
+{
+ MsgData *msgdata, *freeme;
+ struct sortcrit sortcrit[] = {{ SORT_SUBJECT, 0, {{NULL, NULL}} },
+ { SORT_DATE, 0, {{NULL, NULL}} },
+ { SORT_SEQUENCE, 0, {{NULL, NULL}} }};
+ unsigned psubj_hash = 0;
+ char *psubj;
+ Thread *head, *newnode, *cur, *parent, *last;
+
+ /* Create/load the msgdata array */
+ freeme = msgdata = index_msgdata_load(msgno_list, nmsg, sortcrit);
+
+ /* Sort messages by subject and date */
+ msgdata = lsort(msgdata,
+ (void * (*)(void*)) index_sort_getnext,
+ (void (*)(void*,void*)) index_sort_setnext,
+ (int (*)(void*,void*,void*)) index_sort_compare,
+ sortcrit);
+
+ /* create an array of Thread to use as nodes of thread tree
+ *
+ * we will be building threads under a dummy head,
+ * so we need (nmsg + 1) nodes
+ */
+ head = (Thread *) xmalloc((nmsg + 1) * sizeof(Thread));
+ memset(head, 0, (nmsg + 1) * sizeof(Thread));
+
+ newnode = head + 1; /* set next newnode to the second
+ one in the array (skip the head) */
+ parent = head; /* parent is the head node */
+ psubj = NULL; /* no previous subject */
+ cur = NULL; /* no current thread */
+ last = NULL; /* no last child */
+
+ while (msgdata) {
+ newnode->msgdata = msgdata;
+
+ /* if no previous subj, or
+ current subj = prev subj (subjs have same hash, and
+ the strings are equal), then add message to current thread */
+ if (!psubj ||
+ (msgdata->xsubj_hash == psubj_hash &&
+ !strcmp(msgdata->xsubj, psubj))) {
+ /* if no children, create first child */
+ if (!parent->child) {
+ last = parent->child = newnode;
+ if (!cur) /* first thread */
+ parent = cur = parent->child;
+ }
+ /* otherwise, add to siblings */
+ else {
+ last->next = newnode;
+ last = last->next;
+ }
+ }
+ /* otherwise, create a new thread */
+ else {
+ cur->next = newnode; /* create and start a new thread */
+ parent = cur = cur->next; /* now work with the new thread */
+ }
+
+ psubj_hash = msgdata->xsubj_hash;
+ psubj = msgdata->xsubj;
+ msgdata = msgdata->next;
+ newnode++;
+ }
+
+ /* Sort threads by date */
+ index_thread_sort(head, sortcrit+1);
+
+ /* Output the threaded messages */
+ index_thread_print(head, usinguid);
+
+ /* free the thread array */
+ free(head);
+
+ /* free the msgdata array */
+ free(freeme);
+}
+
+/*
+ * Guts of thread printing. Recurses over children when necessary.
+ *
+ * Frees contents of msgdata as a side effect.
+ */
+static void _index_thread_print(Thread *thread, int usinguid)
+{
+ Thread *child;
+
+ /* for each thread... */
+ while (thread) {
+ /* start the thread */
+ prot_printf(imapd_out, "(");
+
+ /* if we have a message, print its identifier
+ * (do nothing for empty containers)
+ */
+ if (thread->msgdata) {
+ prot_printf(imapd_out, "%u",
+ usinguid ? UID(thread->msgdata->msgno) :
+ thread->msgdata->msgno);
+
+ /* if we have a child, print the parent-child separator */
+ if (thread->child) prot_printf(imapd_out, " ");
+
+ /* free contents of the current node */
+ index_msgdata_free(thread->msgdata);
+ }
+
+ /* for each child, grandchild, etc... */
+ child = thread->child;
+ while (child) {
+ /* if the child has siblings, print new branch and break */
+ if (child->next) {
+ _index_thread_print(child, usinguid);
+ break;
+ }
+ /* otherwise print the only child */
+ else {
+ prot_printf(imapd_out, "%u",
+ usinguid ? UID(child->msgdata->msgno) :
+ child->msgdata->msgno);
+
+ /* if we have a child, print the parent-child separator */
+ if (child->child) prot_printf(imapd_out, " ");
+
+ /* free contents of the child node */
+ index_msgdata_free(child->msgdata);
+
+ child = child->child;
+ }
+ }
+
+ /* end the thread */
+ prot_printf(imapd_out, ")");
+
+ thread = thread->next;
+ }
+}
+
+/*
+ * Print a list of threads.
+ *
+ * This is a wrapper around _index_thread_print() which simply prints the
+ * start and end of the untagged thread response.
+ */
+static void index_thread_print(Thread *thread, int usinguid)
+{
+ prot_printf(imapd_out, "* THREAD");
+
+ if (thread) {
+ prot_printf(imapd_out, " ");
+ _index_thread_print(thread->child, usinguid);
+ }
+}
+
+/*
+ * Find threading algorithm for given arg.
+ * Returns index into thread_algs[], or -1 if not found.
+ */
+int find_thread_algorithm(char *arg)
+{
+ int alg;
+
+ ucase(arg);
+ for (alg = 0; thread_algs[alg].alg_name; alg++) {
+ if (!strcmp(arg, thread_algs[alg].alg_name))
+ return alg;
+ }
+ return -1;
+}
+
+/*
+ * The following code is an interpretation of JWZ's description
+ * and pseudo-code in http://www.jwz.org/doc/threading.html.
+ *
+ * It has been modified to match the THREAD=REFERENCES algorithm.
+ */
+
+/*
+ * Determines if child is a descendent of parent.
+ *
+ * Returns 1 if yes, 0 otherwise.
+ */
+static int thread_is_descendent(Thread *parent, Thread *child)
+{
+ Thread *kid;
+
+ /* self */
+ if (parent == child)
+ return 1;
+
+ /* search each child's decendents */
+ for (kid = parent->child; kid; kid = kid->next) {
+ if (thread_is_descendent(kid, child))
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * Links child into parent's children.
+ */
+static void thread_adopt_child(Thread *parent, Thread *child)
+{
+ child->parent = parent;
+ child->next = parent->child;
+ parent->child = child;
+}
+
+/*
+ * Unlinks child from it's parent's children.
+ */
+static void thread_orphan_child(Thread *child)
+{
+ Thread *prev, *cur;
+
+ /* sanity check -- make sure child is actually a child of parent */
+ for (prev = NULL, cur = child->parent->child;
+ cur != child && cur != NULL; prev = cur, cur = cur->next);
+
+ if (!cur) {
+ /* uh oh! couldn't find the child in it's parent's children
+ * we should probably return NO to thread command
+ */
+ return;
+ }
+
+ /* unlink child */
+ if (!prev) /* first child */
+ child->parent->child = child->next;
+ else
+ prev->next = child->next;
+ child->parent = child->next = NULL;
+}
+
+/*
+ * Link messages together using message-id and references.
+ */
+static void ref_link_messages(MsgData *msgdata, Thread **newnode,
+ struct hash_table *id_table)
+{
+ Thread *cur, *parent, *ref;
+ int dup_count = 0;
+ char buf[100];
+ int i;
+
+ /* for each message... */
+ while (msgdata) {
+ /* fill the containers with msgdata
+ *
+ * if we already have a container, use it
+ */
+ if ((cur = (Thread *) hash_lookup(msgdata->msgid, id_table))) {
+ /* If this container is not empty, then we have a duplicate
+ * Message-ID. Make this one unique so that we don't stomp
+ * on the old one.
+ */
+ if (cur->msgdata) {
+ snprintf(buf, sizeof(buf), "-dup%d", dup_count++);
+ msgdata->msgid =
+ (char *) xrealloc(msgdata->msgid,
+ strlen(msgdata->msgid) + strlen(buf) + 1);
+ strcat(msgdata->msgid, buf);
+ /* clear cur so that we create a new container */
+ cur = NULL;
+ }
+ else
+ cur->msgdata = msgdata;
+ }
+
+ /* otherwise, make and index a new container */
+ if (!cur) {
+ cur = *newnode;
+ cur->msgdata = msgdata;
+ hash_insert(msgdata->msgid, cur, id_table);
+ (*newnode)++;
+ }
+
+ /* Step 1.A */
+ for (i = 0, parent = NULL; i < msgdata->nref; i++) {
+ /* if we don't already have a container for the reference,
+ * make and index a new (empty) container
+ */
+ if (!(ref = (Thread *) hash_lookup(msgdata->ref[i], id_table))) {
+ ref = *newnode;
+ hash_insert(msgdata->ref[i], ref, id_table);
+ (*newnode)++;
+ }
+
+ /* link the references together as parent-child iff:
+ * - we won't change existing links, AND
+ * - we won't create a loop
+ */
+ if (!ref->parent &&
+ parent && !thread_is_descendent(ref, parent)) {
+ thread_adopt_child(parent, ref);
+ }
+
+ parent = ref;
+ }
+
+ /* Step 1.B
+ *
+ * if we have a parent already, it is probably bogus (the result
+ * of a truncated references field), so unlink from it because
+ * we now have the actual parent
+ */
+ if (cur->parent) thread_orphan_child(cur);
+
+ /* make the last reference the parent of our message iff:
+ * - we won't create a loop
+ */
+ if (parent && !thread_is_descendent(cur, parent))
+ thread_adopt_child(parent, cur);
+
+ msgdata = msgdata->next;
+ }
+}
+
+/*
+ * Gather orphan messages under the root node.
+ */
+static void ref_gather_orphans(char *key __attribute__((unused)),
+ Thread *node,
+ struct rootset *rootset)
+{
+ /* we only care about nodes without parents */
+ if (!node->parent) {
+ if (node->next) {
+ /* uh oh! a node without a parent should not have a sibling
+ * we should probably return NO to thread command
+ */
+ return;
+ }
+
+ /* add this node to root's children */
+ node->next = rootset->root->child;
+ rootset->root->child = node;
+ rootset->nroot++;
+ }
+}
+
+/*
+ * Prune tree of empty containers.
+ */
+static void ref_prune_tree(Thread *parent)
+{
+ Thread *cur, *prev, *next, *child;
+
+ for (prev = NULL, cur = parent->child, next = cur->next;
+ cur;
+ prev = cur, cur = next, next = (cur ? cur->next : NULL)) {
+
+ /* if we have an empty container with no children, delete it */
+ if (!cur->msgdata && !cur->child) {
+ if (!prev) /* first child */
+ parent->child = cur->next;
+ else
+ prev->next = cur->next;
+
+ /* we just removed cur from our list,
+ * so we need to keep the same prev for the next pass
+ */
+ cur = prev;
+ }
+
+ /* if we have an empty container with children, AND
+ * we're not at the root OR we only have one child,
+ * then remove the container but promote its children to this level
+ * (splice them into the current child list)
+ */
+ else if (!cur->msgdata && cur->child &&
+ (cur->parent || !cur->child->next)) {
+ /* move cur's children into cur's place (start the splice) */
+ if (!prev) /* first child */
+ parent->child = cur->child;
+ else
+ prev->next = cur->child;
+
+ /* make cur's parent the new parent of cur's children
+ * (they're moving in with grandma!)
+ */
+ child = cur->child;
+ do {
+ child->parent = cur->parent;
+ } while (child->next && (child = child->next));
+
+ /* make the cur's last child point to cur's next sibling
+ * (finish the splice)
+ */
+ child->next = cur->next;
+
+ /* we just replaced cur with it's children
+ * so make it's first child the next node to process
+ */
+ next = cur->child;
+
+ /* make cur childless and siblingless */
+ cur->child = cur->next = NULL;
+
+ /* we just removed cur from our list,
+ * so we need to keep the same prev for the next pass
+ */
+ cur = prev;
+ }
+
+ /* if we have a message with children, prune it's children */
+ else if (cur->child)
+ ref_prune_tree(cur);
+ }
+}
+
+/*
+ * Sort the messages in the root set by date.
+ */
+static void ref_sort_root(Thread *root)
+{
+ Thread *cur;
+ struct sortcrit sortcrit[] = {{ SORT_DATE, 0, {{NULL, NULL}} },
+ { SORT_SEQUENCE, 0, {{NULL, NULL}} }};
+
+ cur = root->child;
+ while (cur) {
+ /* if the message is a dummy, sort its children */
+ if (!cur->msgdata) {
+ cur->child = lsort(cur->child,
+ (void * (*)(void*)) index_thread_getnext,
+ (void (*)(void*,void*)) index_thread_setnext,
+ (int (*)(void*,void*,void*)) index_thread_compare,
+ sortcrit);
+ }
+ cur = cur->next;
+ }
+
+ /* sort the root set */
+ root->child = lsort(root->child,
+ (void * (*)(void*)) index_thread_getnext,
+ (void (*)(void*,void*)) index_thread_setnext,
+ (int (*)(void*,void*,void*)) index_thread_compare,
+ sortcrit);
+}
+
+/*
+ * Group threads with same subject.
+ */
+static void ref_group_subjects(Thread *root, unsigned nroot, Thread **newnode)
+{
+ Thread *cur, *old, *prev, *next, *child;
+ struct hash_table subj_table;
+ char *subj;
+
+ /* Step 5.A: create a subj_table with one bucket for every possible
+ * subject in the root set
+ */
+ construct_hash_table(&subj_table, nroot, 1);
+
+ /* Step 5.B: populate the table with a container for each subject
+ * at the root
+ */
+ for (cur = root->child; cur; cur = cur->next) {
+ /* Step 5.B.i: find subject of the thread
+ *
+ * if the container is not empty, use it's subject
+ */
+ if (cur->msgdata)
+ subj = cur->msgdata->xsubj;
+ /* otherwise, use the subject of it's first child */
+ else
+ subj = cur->child->msgdata->xsubj;
+
+ /* Step 5.B.ii: if subject is empty, skip it */
+ if (!strlen(subj)) continue;
+
+ /* Step 5.B.iii: lookup this subject in the table */
+ old = (Thread *) hash_lookup(subj, &subj_table);
+
+ /* Step 5.B.iv: insert the current container into the table iff:
+ * - this subject is not in the table, OR
+ * - this container is empty AND the one in the table is not
+ * (the empty one is more interesting as a root), OR
+ * - the container in the table is a re/fwd AND this one is not
+ * (the non-re/fwd is the more interesting of the two)
+ */
+ if (!old ||
+ (!cur->msgdata && old->msgdata) ||
+ (old->msgdata && old->msgdata->is_refwd &&
+ cur->msgdata && !cur->msgdata->is_refwd)) {
+ hash_insert(subj, cur, &subj_table);
+ }
+ }
+
+ /* 5.C - group containers with the same subject together */
+ for (prev = NULL, cur = root->child, next = cur->next;
+ cur;
+ prev = cur, cur = next, next = (next ? next->next : NULL)) {
+ /* Step 5.C.i: find subject of the thread
+ *
+ * if container is not empty, use it's subject
+ */
+ if (cur->msgdata)
+ subj = cur->msgdata->xsubj;
+ /* otherwise, use the subject of it's first child */
+ else
+ subj = cur->child->msgdata->xsubj;
+
+ /* Step 5.C.ii: if subject is empty, skip it */
+ if (!strlen(subj)) continue;
+
+ /* Step 5.C.iii: lookup this subject in the table */
+ old = (Thread *) hash_lookup(subj, &subj_table);
+
+ /* Step 5.C.iv: if we found ourselves, skip it */
+ if (old == cur) continue;
+
+ /* ok, we already have a container which contains our current subject,
+ * so pull this container out of the root set, because we are going to
+ * merge this node with another one
+ */
+ if (!prev) /* we're at the root */
+ root->child = cur->next;
+ else
+ prev->next = cur->next;
+ cur->next = NULL;
+
+ /* if both containers are dummies, append cur's children to old's */
+ if (!old->msgdata && !cur->msgdata) {
+ /* find old's last child */
+ for (child = old->child; child->next; child = child->next);
+
+ /* append cur's children to old's children list */
+ child->next = cur->child;
+
+ /* make old the parent of cur's children */
+ for (child = cur->child; child; child = child->next)
+ child->parent = old;
+
+ /* make cur childless */
+ cur->child = NULL;
+ }
+
+ /* if:
+ * - old container is empty, OR
+ * - the current message is a re/fwd AND the old one is not,
+ * make the current container a child of the old one
+ *
+ * Note: we don't have to worry about the reverse cases
+ * because step 5.B guarantees that they won't happen
+ */
+ else if (!old->msgdata ||
+ (cur->msgdata && cur->msgdata->is_refwd &&
+ !old->msgdata->is_refwd)) {
+ thread_adopt_child(old, cur);
+ }
+
+ /* if both messages are re/fwds OR neither are re/fwds,
+ * then make them both children of a new dummy container
+ * (we don't want to assume any parent-child relationship between them)
+ *
+ * perhaps we can create a parent-child relationship
+ * between re/fwds by counting the number of re/fwds
+ *
+ * Note: we need the hash table to still point to old,
+ * so we must make old the dummy and make the contents of the
+ * new container a copy of old's original contents
+ */
+ else {
+ Thread *new = (*newnode)++;
+
+ /* make new a copy of old (except parent and next) */
+ new->msgdata = old->msgdata;
+ new->child = old->child;
+ new->next = NULL;
+
+ /* make new the parent of it's newly adopted children */
+ for (child = new->child; child; child = child->next)
+ child->parent = new;
+
+ /* make old the parent of cur and new */
+ cur->parent = old;
+ new->parent = old;
+
+ /* empty old and make it have two children (cur and new) */
+ old->msgdata = NULL;
+ old->child = cur;
+ cur->next = new;
+ }
+
+ /* we just removed cur from our list,
+ * so we need to keep the same prev for the next pass
+ */
+ cur = prev;
+ }
+
+ free_hash_table(&subj_table, NULL);
+}
+
+/*
+ * Free an entire thread.
+ */
+static void index_thread_free(Thread *thread)
+{
+ Thread *child;
+
+ /* free the head node */
+ if (thread->msgdata) index_msgdata_free(thread->msgdata);
+
+ /* free the children recursively */
+ child = thread->child;
+ while (child) {
+ index_thread_free(child);
+ child = child->next;
+ }
+}
+
+/*
+ * Guts of thread searching. Recurses over children when necessary.
+ */
+static int _index_thread_search(Thread *thread, int (*searchproc) (MsgData *))
+{
+ Thread *child;
+
+ /* test the head node */
+ if (thread->msgdata && searchproc(thread->msgdata)) return 1;
+
+ /* test the children recursively */
+ child = thread->child;
+ while (child) {
+ if (_index_thread_search(child, searchproc)) return 1;
+ child = child->next;
+ }
+
+ /* if we get here, we struck out */
+ return 0;
+}
+
+/*
+ * Search a thread to see if it contains a message which matches searchproc().
+ *
+ * This is a wrapper around _index_thread_search() which iterates through
+ * each thread and removes any which fail the searchproc().
+ */
+static void index_thread_search(Thread *root, int (*searchproc) (MsgData *))
+{
+ Thread *cur, *prev, *next;
+
+ for (prev = NULL, cur = root->child, next = cur->next;
+ cur;
+ prev = cur, cur= next, next = (cur ? cur->next : NULL)) {
+ if (!_index_thread_search(cur, searchproc)) {
+ /* unlink the thread from the list */
+ if (!prev) /* first thread */
+ root->child = cur->next;
+ else
+ prev->next = cur->next;
+
+ /* free all nodes in the thread */
+ index_thread_free(cur);
+
+ /* we just removed cur from our list,
+ * so we need to keep the same prev for the next pass
+ */
+ cur = prev;
+ }
+ }
+}
+
+/*
+ * Guts of the REFERENCES algorithms. Behavior is tweaked with loadcrit[],
+ * searchproc() and sortcrit[].
+ */
+static void _index_thread_ref(unsigned *msgno_list, int nmsg,
+ struct sortcrit loadcrit[],
+ int (*searchproc) (MsgData *),
+ struct sortcrit sortcrit[], int usinguid)
+{
+ MsgData *msgdata, *freeme, *md;
+ int tref, nnode;
+ Thread *newnode;
+ struct hash_table id_table;
+ struct rootset rootset;
+
+ /* Create/load the msgdata array */
+ freeme = msgdata = index_msgdata_load(msgno_list, nmsg, loadcrit);
+
+ /* calculate the sum of the number of references for all messages */
+ for (md = msgdata, tref = 0; md; md = md->next)
+ tref += md->nref;
+
+ /* create an array of Thread to use as nodes of thread tree (including
+ * empty containers)
+ *
+ * - We will be building threads under a dummy root, so we need at least
+ * (nmsg + 1) nodes.
+ * - We also will need containers for references to non-existent messages.
+ * To make sure we have enough, we will take the worst case and
+ * use the sum of the number of references for all messages.
+ * - Finally, we will need containers to group threads with the same
+ * subject together. To make sure we have enough, we will take the
+ * worst case which will be half of the number of messages.
+ *
+ * This is overkill, but it is the only way to make sure we have enough
+ * ahead of time. If we tried to use xrealloc(), the array might be moved,
+ * and our parent/child/next pointers will no longer be correct
+ * (been there, done that).
+ */
+ nnode = (int) (1.5 * nmsg + 1 + tref);
+ rootset.root = (Thread *) xmalloc(nnode * sizeof(Thread));
+ memset(rootset.root, 0, nnode * sizeof(Thread));
+
+ newnode = rootset.root + 1; /* set next newnode to the second
+ one in the array (skip the root) */
+
+ /* Step 0: create an id_table with one bucket for every possible
+ * message-id and reference (nmsg + tref)
+ */
+ construct_hash_table(&id_table, nmsg + tref, 1);
+
+ /* Step 1: link messages together */
+ ref_link_messages(msgdata, &newnode, &id_table);
+
+ /* Step 2: find the root set (gather all of the orphan messages) */
+ rootset.nroot = 0;
+ hash_enumerate(&id_table, (void (*)(char*,void*,void*)) ref_gather_orphans,
+ &rootset);
+
+ /* discard id_table */
+ free_hash_table(&id_table, NULL);
+
+ /* Step 3: prune tree of empty containers - get our deposit back :^) */
+ ref_prune_tree(rootset.root);
+
+ /* Step 4: sort the root set */
+ ref_sort_root(rootset.root);
+
+ /* Step 5: group root set by subject */
+ ref_group_subjects(rootset.root, rootset.nroot, &newnode);
+
+ /* Optionally search threads (to be used by REFERENCES derivatives) */
+ if (searchproc) index_thread_search(rootset.root, searchproc);
+
+ /* Step 6: sort threads */
+ if (sortcrit) index_thread_sort(rootset.root, sortcrit);
+
+ /* Output the threaded messages */
+ index_thread_print(rootset.root, usinguid);
+
+ /* free the thread array */
+ free(rootset.root);
+
+ /* free the msgdata array */
+ free(freeme);
+}
+
+/*
+ * Thread a list of messages using the REFERENCES algorithm.
+ */
+static void index_thread_ref(unsigned *msgno_list, int nmsg, int usinguid)
+{
+ struct sortcrit loadcrit[] = {{ LOAD_IDS, 0, {{NULL,NULL}} },
+ { SORT_SUBJECT, 0, {{NULL,NULL}} },
+ { SORT_DATE, 0, {{NULL,NULL}} },
+ { SORT_SEQUENCE, 0, {{NULL,NULL}} }};
+ struct sortcrit sortcrit[] = {{ SORT_DATE, 0, {{NULL,NULL}} },
+ { SORT_SEQUENCE, 0, {{NULL,NULL}} }};
+
+ _index_thread_ref(msgno_list, nmsg, loadcrit, NULL, sortcrit, usinguid);
+}
+
+/*
+ * NNTP specific stuff.
+ */
+char *index_get_msgid(struct mailbox *mailbox __attribute__((unused)),
+ unsigned msgno)
+{
+ const char *cacheitem;
+ int cachelen;
+ char *env;
+ char *envtokens[NUMENVTOKENS];
+ char *msgid;
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cachelen = CACHE_ITEM_LEN(cacheitem);
+
+ /* get msgid out of the envelope
+ *
+ * get a working copy; strip outer ()'s
+ * +1 -> skip the leading paren
+ * -2 -> don't include the size of the outer parens
+ */
+ env = xstrndup(cacheitem + CACHE_ITEM_SIZE_SKIP + 1, cachelen - 2);
+ parse_cached_envelope(env, envtokens, VECTOR_SIZE(envtokens));
+
+ msgid = envtokens[ENV_MSGID] ? xstrdup(envtokens[ENV_MSGID]) : NULL;
+
+ /* free stuff */
+ free(env);
+
+ return msgid;
+}
+
+static void massage_header(char *hdr)
+{
+ int n = 0;
+ char *p, c;
+
+ for (p = hdr; *p; p++) {
+ if (*p == ' ' || *p == '\t' || *p == '\r') {
+ if (!n || *(p+1) == '\n') {
+ /* no leading or trailing whitespace */
+ continue;
+ }
+ /* replace with space */
+ c = ' ';
+ }
+ else if (*p == '\n') {
+ if (*(p+1) == ' ' || *(p+1) == '\t') {
+ /* folded header */
+ continue;
+ }
+ /* end of header */
+ break;
+ }
+ else
+ c = *p;
+
+ hdr[n++] = c;
+ }
+ hdr[n] = '\0';
+}
+
+static char *parse_nstring(char **str)
+{
+ char *cp = *str, *val;
+
+ if (*cp == '"') { /* quoted string */
+ val = ++cp; /* skip " */
+ do {
+ cp = strchr(cp, '"');
+ } while (*(cp-1) == '\\'); /* skip escaped " */
+ *cp++ = '\0';
+ }
+ else { /* NIL */
+ val = NULL;
+ cp += 3;
+ }
+
+ *str = cp;
+ return val;
+}
+
+static void parse_env_address(char *str, struct address *addr)
+{
+ str++; /* skip ( */
+ addr->name = parse_nstring(&str);
+ str++; /* skip SP */
+ addr->route = parse_nstring(&str);
+ str++; /* skip SP */
+ addr->mailbox = parse_nstring(&str);
+ str++; /* skip SP */
+ addr->domain = parse_nstring(&str);
+}
+
+extern struct nntp_overview *index_overview(struct mailbox *mailbox,
+ unsigned msgno)
+{
+ static struct nntp_overview over;
+ static char *env = NULL, *from = NULL, *hdr = NULL;
+ static int envsize = 0, fromsize = 0, hdrsize = 0;
+ const char *cacheitem;
+ int size;
+ char *envtokens[NUMENVTOKENS];
+ struct address addr = { NULL, NULL, NULL, NULL, NULL, NULL };
+
+ cacheitem = cache_base + CACHE_OFFSET(msgno); /* envelope */
+
+ /* make a working copy of envelope; strip outer ()'s */
+ /* -2 -> don't include the size of the outer parens */
+ /* +1 -> leave space for NUL */
+ size = CACHE_ITEM_LEN(cacheitem) - 2 + 1;
+ if (envsize < size) {
+ envsize = size;
+ env = xrealloc(env, envsize);
+ }
+ /* +1 -> skip the leading paren */
+ strlcpy(env, cacheitem + CACHE_ITEM_SIZE_SKIP + 1, size);
+
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip section */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* cacheheaders */
+
+ /* make a working copy of headers */
+ /* +1 -> leave space for NUL */
+ size = CACHE_ITEM_LEN(cacheitem) + 1;
+ if (hdrsize < size) {
+ hdrsize = size;
+ hdr = xrealloc(hdr, hdrsize);
+ }
+ strlcpy(hdr, cacheitem + CACHE_ITEM_SIZE_SKIP, size);
+
+ parse_cached_envelope(env, envtokens, VECTOR_SIZE(envtokens));
+
+ over.uid = UID(msgno);
+ over.bytes = SIZE(msgno);
+ over.lines = index_getlines(mailbox, msgno);
+ over.date = envtokens[ENV_DATE];
+ over.msgid = envtokens[ENV_MSGID];
+
+ /* massage subject */
+ if ((over.subj = envtokens[ENV_SUBJECT]))
+ massage_header(over.subj);
+
+ /* build original From: header */
+ if (envtokens[ENV_FROM]) /* paranoia */
+ parse_env_address(envtokens[ENV_FROM], &addr);
+
+ if (addr.mailbox && addr.domain) { /* paranoia */
+ /* +3 -> add space for quotes and space */
+ /* +4 -> add space for < @ > NUL */
+ size = (addr.name ? strlen(addr.name) + 3 : 0) +
+ strlen(addr.mailbox) + strlen(addr.domain) + 4;
+ if (fromsize < size) {
+ fromsize = size;
+ from = xrealloc(from, fromsize);
+ }
+ from[0] = '\0';
+ if (addr.name) sprintf(from, "\"%s\" ", addr.name);
+ snprintf(from + strlen(from), fromsize - strlen(from),
+ "<%s@%s>", addr.mailbox, addr.domain);
+
+ over.from = from;
+ }
+ else
+ over.from = NULL;
+
+ /* massage references */
+ if ((over.ref = stristr(hdr, "references:"))) {
+ over.ref += 11; /* skip over header name */
+ massage_header(over.ref);
+ }
+
+ return &over;
+}
+
+extern char *index_getheader(struct mailbox *mailbox, unsigned msgno,
+ char *hdr)
+{
+ static const char *msg_base = 0;
+ static unsigned long msg_size = 0;
+ struct strlist headers = { NULL, NULL, NULL, NULL };
+ static char *alloc = NULL;
+ static int allocsize = 0;
+ const char *cacheitem;
+ unsigned size;
+ char *buf;
+
+ headers.s = hdr;
+
+ if (msg_base) {
+ mailbox_unmap_message(NULL, 0, &msg_base, &msg_size);
+ msg_base = 0;
+ msg_size = 0;
+ }
+
+ /* see if the header is cached */
+ if (mailbox_cached_header(hdr) != BIT32_MAX) {
+ /* cached header */
+ cacheitem = cache_base + CACHE_OFFSET(msgno);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bodystructure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip section */
+
+ size = CACHE_ITEM_LEN(cacheitem);
+ if (allocsize < size+2) {
+ allocsize = size+100;
+ alloc = xrealloc(alloc, allocsize);
+ }
+
+ memcpy(alloc, cacheitem+CACHE_ITEM_SIZE_SKIP, size);
+ alloc[size] = '\0';
+
+ buf = alloc;
+ }
+ else {
+ /* uncached header */
+ if (mailbox_map_message(mailbox, UID(msgno), &msg_base, &msg_size))
+ return NULL;
+
+ buf = index_readheader(msg_base, msg_size, mailbox->format, 0,
+ HEADER_SIZE(msgno));
+ }
+
+ index_pruneheader(buf, &headers, NULL);
+
+ if (*buf) {
+ buf += strlen(hdr) + 1; /* skip header: */
+ massage_header(buf);
+ }
+
+ return buf;
+}
+
+extern unsigned long index_getsize(struct mailbox *mailbox __attribute__((unused)),
+ unsigned msgno)
+{
+ return SIZE(msgno);
+}
+
+extern unsigned long index_getlines(struct mailbox *mailbox, unsigned msgno)
+{
+ unsigned long lines = CONTENT_LINES(msgno);
+
+ if (lines == BIT32_MAX) {
+ int r;
+ char fname[MAX_MAILBOX_PATH+1];
+ FILE *msgfile;
+ char buf[4096];
+ struct index_record record;
+
+ lines = 0;
+
+ r = mailbox_lock_index(mailbox);
+ if (r) return lines;
+
+ /* get the existing record */
+ r = mailbox_read_index_record(mailbox, msgno, &record);
+ if (r) goto done;
+
+ /* Open the message file */
+ strlcpy(fname, mailbox->path, sizeof(fname));
+ strlcat(fname, "/", sizeof(fname));
+ mailbox_message_get_fname(mailbox, record.uid,
+ fname + strlen(fname),
+ sizeof(fname) - strlen(fname));
+
+ msgfile = fopen(fname, "r");
+ if (!msgfile) goto done;
+
+ /* Find start of body */
+ while (fgets(buf, sizeof(buf), msgfile)) {
+ if (buf[0] == '\r' && buf[1] == '\n') {
+ /* blank line between header and body */
+ break;
+ }
+ }
+
+ /* Count the number of lines in the message body */
+ while (fgets(buf, sizeof(buf), msgfile)) {
+ while (buf[strlen(buf)-1] != '\n' &&
+ fgets(buf, sizeof(buf), msgfile));
+ lines++;
+ }
+ fclose(msgfile);
+
+ /* Update the index record */
+ record.content_lines = lines;
+ record.last_updated = time(0);
+
+ r = mailbox_write_index_record(mailbox, msgno, &record, 1);
+
+ done:
+ mailbox_unlock_index(mailbox);
+ }
+
+ return lines;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/index.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,198 @@
+/* index.c -- Routines for dealing with the index file in the imapd
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+/*
+ * $Id: index.h,v 1.9.2.6 2006/03/31 19:22:24 murch Exp $
+ */
+
+/* Header for internal usage of index.c + programs that make raw access
+ * to index files */
+
+#ifndef INDEX_H
+#define INDEX_H
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <syslog.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "annotate.h" /* for strlist functionality */
+#include "mailbox.h" /* for bit32 */
+
+/* Access macros for the memory-mapped index file data */
+#define INDEC_OFFSET(msgno) (index_base+start_offset+(((msgno)-1)*record_size))
+#define UID(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_UID)))
+#define INTERNALDATE(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_INTERNALDATE)))
+#define SENTDATE(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_SENTDATE)))
+#define SIZE(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_SIZE)))
+#define HEADER_SIZE(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_HEADER_SIZE)))
+#define CONTENT_OFFSET(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_CONTENT_OFFSET)))
+#define CACHE_OFFSET(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_CACHE_OFFSET)))
+#define LAST_UPDATED(msgno) ((time_t)ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_LAST_UPDATED))))
+#define SYSTEM_FLAGS(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_SYSTEM_FLAGS)))
+#define USER_FLAGS(msgno,i) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_USER_FLAGS+((i)*4))))
+#define CONTENT_LINES(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_CONTENT_LINES)))
+#define CACHE_VERSION(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_CACHE_VERSION)))
+#ifdef HAVE_LONG_LONG_INT
+#define MODSEQ(msgno) ntohll(*((bit64 *)(INDEC_OFFSET(msgno)+OFFSET_MODSEQ_64)))
+#else
+#define MODSEQ(msgno) ntohl(*((bit32 *)(INDEC_OFFSET(msgno)+OFFSET_MODSEQ)))
+#endif
+
+/* Access assistance macros for memory-mapped cache file data */
+/* CACHE_ITEM_BIT32: Convert to host byte order */
+/* CACHE_ITEM_LEN: Get the length out */
+/* CACHE_ITEM_NEXT: Return a pointer to the next entry. Sizes are
+ * 4-byte aligned, so round up to the next 4 byte boundry */
+#define CACHE_ITEM_BIT32(ptr) (ntohl(*((bit32 *)(ptr))))
+#define CACHE_ITEM_LEN(ptr) CACHE_ITEM_BIT32(ptr)
+#define CACHE_ITEM_NEXT(ptr) ((ptr)+4+((3+CACHE_ITEM_LEN(ptr))&~3))
+
+/* Size of a bit32 to skip when jumping over cache item sizes */
+#define CACHE_ITEM_SIZE_SKIP sizeof(bit32)
+
+/* Calculate the number of entries in a vector */
+#define VECTOR_SIZE(vector) (sizeof(vector)/sizeof(vector[0]))
+
+/* Cached envelope token positions */
+enum {
+ ENV_DATE = 0,
+ ENV_SUBJECT,
+ ENV_FROM,
+ ENV_SENDER,
+ ENV_REPLYTO,
+ ENV_TO,
+ ENV_CC,
+ ENV_BCC,
+ ENV_INREPLYTO,
+ ENV_MSGID
+};
+#define NUMENVTOKENS (10)
+
+/* Special "sort criteria" to load message-id and references/in-reply-to
+ * into msgdata array for threaders that need them.
+ */
+#define LOAD_IDS 256
+
+struct copyargs {
+ struct copymsg *copymsg;
+ int nummsg;
+ int msgalloc;
+};
+
+struct mapfile {
+ const char *base;
+ unsigned long size;
+};
+
+typedef struct msgdata {
+ unsigned msgno; /* message number */
+ char *msgid; /* message ID */
+ char **ref; /* array of references */
+ int nref; /* number of references */
+ time_t date; /* sent date & time of message
+ from Date: header (adjusted by time zone) */
+ char *cc; /* local-part of first "cc" address */
+ char *from; /* local-part of first "from" address */
+ char *to; /* local-part of first "to" address */
+ char *xsubj; /* extracted subject text */
+ unsigned xsubj_hash; /* hash of extracted subject text */
+ int is_refwd; /* is message a reply or forward? */
+ char **annot; /* array of annotation attribute values
+ (stored in order of sortcrit) */
+ int nannot; /* number of annotation values */
+ struct msgdata *next;
+} MsgData;
+
+typedef struct thread {
+ MsgData *msgdata; /* message data */
+ struct thread *parent; /* parent message */
+ struct thread *child; /* first child message */
+ struct thread *next; /* next sibling message */
+} Thread;
+
+struct rootset {
+ Thread *root;
+ unsigned nroot;
+};
+
+struct thread_algorithm {
+ char *alg_name;
+ void (*threader)(unsigned *msgno_list, int nmsg, int usinguid);
+};
+
+struct nntp_overview {
+ unsigned long uid;
+ char *subj;
+ char *from;
+ char *date;
+ char *msgid;
+ char *ref;
+ unsigned long bytes;
+ unsigned long lines;
+};
+
+extern void index_operatemailbox(struct mailbox *mailbox);
+extern int index_finduid(unsigned uid);
+extern int index_getuid(unsigned msgno);
+extern int index_urlfetch(struct mailbox *mailbox, unsigned msgno,
+ const char *section,
+ unsigned long start_octet, unsigned long octet_count,
+ struct protstream *pout, unsigned long *size);
+extern char *index_get_msgid(struct mailbox *mailbox, unsigned msgno);
+extern struct nntp_overview *index_overview(struct mailbox *mailbox,
+ unsigned msgno);
+extern char *index_getheader(struct mailbox *mailbox, unsigned msgno,
+ char *hdr);
+extern unsigned long index_getsize(struct mailbox *mailbox, unsigned msgno);
+extern unsigned long index_getlines(struct mailbox *mailbox, unsigned msgno);
+extern int index_copy_remote(struct mailbox *mailbox, char *sequence,
+ int usinguid, struct protstream *pout);
+
+#endif /* INDEX_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ipurge.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ipurge.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ipurge.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/ipurge.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,368 @@
+/*
+ * ipurge
+ *
+ * delete mail from cyrus imap mailbox or partition
+ * based on date (or size?)
+ *
+ * includes support for ISPN virtual host extensions
+ *
+ * $Id: ipurge.c,v 1.20.2.7 2004/05/31 18:22:53 ken3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <string.h>
+#include <netinet/in.h>
+
+/* cyrus includes */
+#include "global.h"
+#include "sysexits.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "xmalloc.h"
+#include "mboxlist.h"
+
+/* config.c stuff */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+/* globals for getopt routines */
+extern char *optarg;
+extern int optind;
+extern int opterr;
+extern int optopt;
+
+/* globals for callback functions */
+int days = -1;
+int size = -1;
+int exact = -1;
+int pattern = -1;
+int skipflagged = 0;
+int datemode = OFFSET_SENTDATE;
+int invertmatch = 0;
+
+/* for statistical purposes */
+typedef struct mbox_stats_s {
+
+ int total; /* total including those deleted */
+ int total_bytes;
+ int deleted;
+ int deleted_bytes;
+
+} mbox_stats_t;
+
+/* current namespace */
+static struct namespace purge_namespace;
+
+int verbose = 1;
+int forceall = 0;
+
+int purge_me(char *, int, int);
+int purge_check(struct mailbox *, void *, char *, int);
+int usage(char *name);
+void print_stats(mbox_stats_t *stats);
+
+int main (int argc, char *argv[]) {
+ int option; /* getopt() returns an int */
+ char buf[MAX_MAILBOX_PATH+1];
+ char *alt_config = NULL;
+ int r;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EX_USAGE);
+
+ while ((option = getopt(argc, argv, "C:hxd:b:k:m:fsXi")) != EOF) {
+ switch (option) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ case 'd': {
+ if (optarg == 0) {
+ usage(argv[0]);
+ }
+ days = atoi(optarg) * 86400 /* nominal # of seconds in a 'day' */;
+ } break;
+ case 'b': {
+ if (optarg == 0) {
+ usage(argv[0]);
+ }
+ size = atoi(optarg);
+ } break;
+ case 'k': {
+ if (optarg == 0) {
+ usage(argv[0]);
+ }
+ size = atoi(optarg) * 1024; /* make it bytes */
+ } break;
+ case 'm': {
+ if (optarg == 0) {
+ usage(argv[0]);
+ }
+ size = atoi(optarg) * 1048576; /* 1024 * 1024 */
+ } break;
+ case 'x' : {
+ exact = 1;
+ } break;
+ case 'f' : {
+ forceall = 1;
+ } break;
+ case 's' : {
+ skipflagged = 1;
+ } break;
+ case 'X' : {
+ datemode = OFFSET_INTERNALDATE;
+ } break;
+ case 'i' : {
+ invertmatch = 1;
+ } break;
+ case 'h':
+ default: usage(argv[0]);
+ }
+ }
+ if ((days == -1 ) && (size == -1)) {
+ printf("One of these must be specified -d, -b -k, -m\n");
+ usage(argv[0]);
+ }
+
+ cyrus_init(alt_config, "ipurge", 0);
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(&purge_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* open the quota db, we'll need it for expunge */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ if (optind == argc) { /* do the whole partition */
+ strcpy(buf, "*");
+ (*purge_namespace.mboxlist_findall)(&purge_namespace, buf, 1, 0, 0,
+ purge_me, NULL);
+ } else {
+ for (; optind < argc; optind++) {
+ strncpy(buf, argv[optind], MAX_MAILBOX_NAME);
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_tointernal(&purge_namespace, buf,
+ config_virtdomains ?
+ strcspn(buf, "@") : 0);
+ (*purge_namespace.mboxlist_findall)(&purge_namespace, buf, 1, 0, 0,
+ purge_me, NULL);
+ }
+ }
+ quotadb_close();
+ quotadb_done();
+
+ mboxlist_close();
+ mboxlist_done();
+
+ cyrus_done();
+
+ return 0;
+}
+
+int
+usage(char *name) {
+ printf("usage: %s [-f] [-s] [-C <alt_config>] [-x] [-X] [-i] {-d days | -b bytes|-k Kbytes|-m Mbytes}\n\t[mboxpattern1 ... [mboxpatternN]]\n", name);
+ printf("\tthere are no defaults and at least one of -d, -b, -k, -m\n\tmust be specified\n");
+ printf("\tif no mboxpattern is given %s works on all mailboxes\n", name);
+ printf("\t -x specifies an exact match for days or size\n");
+ printf("\t -f force also to delete mail below user.* and INBOX.*\n");
+ printf("\t -s skip over messages that are flagged.\n");
+ printf("\t -X use delivery time instead of date header for date matches.\n");
+ printf("\t -i invert match logic: -x means not equal, date is for newer, size is for smaller.\n");
+ exit(0);
+}
+
+/* we don't check what comes in on matchlen and maycreate, should we? */
+int purge_me(char *name, int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused))) {
+ struct mailbox the_box;
+ int error;
+ mbox_stats_t stats;
+
+ if( ! forceall ) {
+ /* DON'T purge INBOX* and user.* */
+ if (!strncasecmp(name,"INBOX",5) || mboxname_isusermailbox(name, 0))
+ return 0;
+ }
+
+ memset(&stats, '\0', sizeof(mbox_stats_t));
+
+ if (verbose) {
+ char mboxname[MAX_MAILBOX_NAME+1];
+
+ /* Convert internal name to external */
+ (*purge_namespace.mboxname_toexternal)(&purge_namespace, name,
+ "cyrus", mboxname);
+ printf("Working on %s...\n", mboxname);
+ }
+
+ error = mailbox_open_header(name, 0, &the_box);
+ if (error != 0) { /* did we find it? */
+ syslog(LOG_ERR, "Couldn't find %s, check spelling", name);
+ return error;
+ }
+ if (the_box.header_fd != -1) {
+ (void) mailbox_lock_header(&the_box);
+ }
+ the_box.header_lock_count = 1;
+
+ error = mailbox_open_index(&the_box);
+ if (error != 0) {
+ mailbox_close(&the_box);
+ syslog(LOG_ERR, "Couldn't open mailbox index for %s", name);
+ return error;
+ }
+ (void) mailbox_lock_index(&the_box);
+ the_box.index_lock_count = 1;
+
+ mailbox_expunge(&the_box, purge_check, &stats, EXPUNGE_FORCE);
+ mailbox_close(&the_box);
+
+ print_stats(&stats);
+
+ return 0;
+}
+
+void deleteit(bit32 msgsize, mbox_stats_t *stats)
+{
+ stats->deleted++;
+ stats->deleted_bytes += msgsize;
+}
+
+/* thumbs up routine, checks date & size and returns yes or no for deletion */
+/* 0 = no, 1 = yes */
+int purge_check(struct mailbox *mailbox __attribute__((unused)),
+ void *deciderock, char *buf,
+ int expunge_flags __attribute__((unused)))
+{
+ time_t my_time;
+ mbox_stats_t *stats = (mbox_stats_t *) deciderock;
+ bit32 senttime;
+ bit32 msgsize;
+ bit32 flagged;
+
+ senttime = ntohl(*((bit32 *)(buf + datemode)));
+ msgsize = ntohl(*((bit32 *)(buf + OFFSET_SIZE)));
+ flagged = ntohl(*((bit32 *)(buf + OFFSET_SYSTEM_FLAGS))) & FLAG_FLAGGED;
+
+ stats->total++;
+ stats->total_bytes += msgsize;
+
+ if (skipflagged && flagged)
+ return 0;
+
+ if (exact == 1) {
+ if (days >= 0) {
+ my_time = time(0);
+ /* printf("comparing %ld :: %ld\n", my_time, the_record->sentdate); */
+ if (((my_time - (time_t) senttime)/86400) == (days/86400)) {
+ if (invertmatch) return 0;
+ deleteit(msgsize, stats);
+ return 1;
+ } else {
+ if (!invertmatch) return 0;
+ deleteit(msgsize, stats);
+ return 1;
+ }
+ }
+ if (size >= 0) {
+ /* check size */
+ if (msgsize == size) {
+ if (invertmatch) return 0;
+ deleteit(msgsize, stats);
+ return 1;
+ } else {
+ if (!invertmatch) return 0;
+ deleteit(msgsize, stats);
+ return 1;
+ }
+ }
+ return 0;
+ } else {
+ if (days >= 0) {
+ my_time = time(0);
+ /* printf("comparing %ld :: %ld\n", my_time, the_record->sentdate); */
+ if (!invertmatch && ((my_time - (time_t) senttime) > days)) {
+ deleteit(msgsize, stats);
+ return 1;
+ }
+ if (invertmatch && ((my_time - (time_t) senttime) < days)) {
+ deleteit(msgsize, stats);
+ return 1;
+ }
+ }
+ if (size >= 0) {
+ /* check size */
+ if (!invertmatch && (msgsize > size)) {
+ deleteit(msgsize, stats);
+ return 1;
+ }
+ if (invertmatch && (msgsize < size)) {
+ deleteit(msgsize, stats);
+ return 1;
+ }
+ }
+ return 0;
+ }
+}
+
+void print_stats(mbox_stats_t *stats)
+{
+ printf("total messages \t\t %d\n",stats->total);
+ printf("total bytes \t\t %d\n",stats->total_bytes);
+ printf("Deleted messages \t\t %d\n",stats->deleted);
+ printf("Deleted bytes \t\t %d\n",stats->deleted_bytes);
+ printf("Remaining messages\t\t %d\n",stats->total - stats->deleted);
+ printf("Remaining bytes \t\t %d\n",
+ stats->total_bytes - stats->deleted_bytes);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,936 @@
+/* lmtp_sieve.c -- Sieve implementation for lmtpd
+ *
+ * $Id: lmtp_sieve.c,v 1.1.2.15 2006/05/23 13:09:35 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <pwd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include "annotate.h"
+#include "append.h"
+#include "auth.h"
+#include "duplicate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "imap_err.h"
+#include "lmtpd.h"
+#include "lmtp_sieve.h"
+#include "lmtpengine.h"
+#include "lmtpstats.h"
+#include "notify.h"
+#include "prot.h"
+#include "rfc822date.h"
+#include "sieve_interface.h"
+#include "smtpclient.h"
+#include "util.h"
+#include "version.h"
+#include "xmalloc.h"
+
+static int sieve_usehomedir = 0;
+static const char *sieve_dir = NULL;
+
+/* data per script */
+typedef struct script_data {
+ const char *username;
+ const char *mailboxname;
+ struct auth_state *authstate;
+} script_data_t;
+
+static char *make_sieve_db(const char *user)
+{
+ static char buf[MAX_MAILBOX_PATH+1];
+
+ buf[0] = '.';
+ buf[1] = '\0';
+ strlcat(buf, user, sizeof(buf));
+ strlcat(buf, ".sieve.", sizeof(buf));
+
+ return buf;
+}
+
+/* gets the header "head" from msg. */
+static int getheader(void *v, const char *phead, const char ***body)
+{
+ message_data_t *m = ((deliver_data_t *) v)->m;
+
+ if (phead==NULL) return SIEVE_FAIL;
+ *body = msg_getheader(m, phead);
+
+ if (*body) {
+ return SIEVE_OK;
+ } else {
+ return SIEVE_FAIL;
+ }
+}
+
+static int getsize(void *mc, int *size)
+{
+ message_data_t *m = ((deliver_data_t *) mc)->m;
+
+ *size = msg_getsize(m);
+ return SIEVE_OK;
+}
+
+/* we use the temp field in message_data to avoid having to malloc memory
+ to return, and we also can't expose our the receipients to the message */
+static int getenvelope(void *mc, const char *field, const char ***contents)
+{
+ deliver_data_t *mydata = (deliver_data_t *) mc;
+ message_data_t *m = mydata->m;
+
+ if (!strcasecmp(field, "from")) {
+ *contents = mydata->temp;
+ mydata->temp[0] = m->return_path;
+ mydata->temp[1] = NULL;
+ return SIEVE_OK;
+ } else if (!strcasecmp(field, "to")) {
+ *contents = mydata->temp;
+ mydata->temp[0] = msg_getrcptall(m, mydata->cur_rcpt);
+ mydata->temp[1] = NULL;
+ return SIEVE_OK;
+ } else if (!strcasecmp(field, "auth") && mydata->authuser) {
+ *contents = mydata->temp;
+ mydata->temp[0] = mydata->authuser;
+ mydata->temp[1] = NULL;
+ return SIEVE_OK;
+ } else {
+ *contents = NULL;
+ return SIEVE_FAIL;
+ }
+}
+
+static int getbody(void *mc, const char **content_types,
+ sieve_bodypart_t ***parts)
+{
+ deliver_data_t *mydata = (deliver_data_t *) mc;
+ message_data_t *m = mydata->m;
+ int r = 0;
+
+ if (!mydata->content->body) {
+ /* parse the message body if we haven't already */
+ r = message_parse_file(m->f, &mydata->content->base,
+ &mydata->content->len, &mydata->content->body);
+ }
+
+ /* XXX currently struct bodypart as defined in message.h is the same as
+ sieve_bodypart_t as defined in sieve_interface.h, so we can typecast */
+ if (!r) message_fetch_part(mydata->content, content_types,
+ (struct bodypart ***) parts);
+ return (!r ? SIEVE_OK : SIEVE_FAIL);
+}
+
+
+static int sieve_find_script(const char *user, const char *domain,
+ const char *script, char *fname, size_t size);
+
+static int getinclude(void *sc, const char *script, int isglobal,
+ char *fname, size_t size)
+{
+ script_data_t *sdata = (script_data_t *) sc;
+ char userbuf[MAX_MAILBOX_NAME+1], *user, *domain = NULL;
+ struct stat sbuf;
+ int r;
+
+ if (strstr(script, "../")) {
+ syslog(LOG_NOTICE, "Illegal script name '%s' for user '%s'",
+ script, sdata->username);
+ return SIEVE_FAIL;
+ }
+
+ user = (char *) sdata->username;
+ if (config_virtdomains && strchr(user, '@')) {
+ /* split the user and domain */
+ strlcpy(userbuf, sdata->username, sizeof(userbuf));
+ user = userbuf;
+ if ((domain = strrchr(user, '@'))) *domain++ = '\0';
+ }
+
+ r = sieve_find_script(isglobal ? NULL : user, domain, script,
+ fname, size);
+
+ if (!r && isglobal && domain && stat(fname, &sbuf) != 0) {
+ /* if the domain-specific global script doesn't exist,
+ try a server-wide global script */
+ r = sieve_find_script(NULL, NULL, script, fname, size);
+ }
+
+ return r;
+}
+
+static int global_outgoing_count = 0;
+
+static int send_rejection(const char *origid,
+ const char *rejto,
+ const char *origreceip,
+ const char *mailreceip,
+ const char *reason,
+ struct protstream *file)
+{
+ FILE *sm;
+ const char *smbuf[10];
+ char buf[8192], *namebuf;
+ int i, sm_stat;
+ time_t t;
+ char datestr[80];
+ pid_t sm_pid, p;
+
+ smbuf[0] = "sendmail";
+ smbuf[1] = "-i"; /* ignore dots */
+ smbuf[2] = "-f";
+ smbuf[3] = "<>";
+ smbuf[4] = "--";
+ smbuf[5] = rejto;
+ smbuf[6] = NULL;
+ sm_pid = open_sendmail(smbuf, &sm);
+ if (sm == NULL) {
+ return -1;
+ }
+
+ t = time(NULL);
+ p = getpid();
+ snprintf(buf, sizeof(buf), "<cmu-sieve-%d-%d-%d@%s>", (int) p, (int) t,
+ global_outgoing_count++, config_servername);
+
+ namebuf = make_sieve_db(mailreceip);
+ duplicate_mark(buf, strlen(buf), namebuf, strlen(namebuf), t, 0);
+ fprintf(sm, "Message-ID: %s\r\n", buf);
+
+ rfc822date_gen(datestr, sizeof(datestr), t);
+ fprintf(sm, "Date: %s\r\n", datestr);
+
+ fprintf(sm, "X-Sieve: %s\r\n", SIEVE_VERSION);
+ fprintf(sm, "From: Mail Sieve Subsystem <%s>\r\n",
+ config_getstring(IMAPOPT_POSTMASTER));
+ fprintf(sm, "To: <%s>\r\n", rejto);
+ fprintf(sm, "MIME-Version: 1.0\r\n");
+ fprintf(sm, "Content-Type: "
+ "multipart/report; report-type=disposition-notification;"
+ "\r\n\tboundary=\"%d/%s\"\r\n", (int) p, config_servername);
+ fprintf(sm, "Subject: Automatically rejected mail\r\n");
+ fprintf(sm, "Auto-Submitted: auto-replied (rejected)\r\n");
+ fprintf(sm, "\r\nThis is a MIME-encapsulated message\r\n\r\n");
+
+ /* this is the human readable status report */
+ fprintf(sm, "--%d/%s\r\n", (int) p, config_servername);
+ fprintf(sm, "Content-Type: text/plain; charset=utf-8\r\n");
+ fprintf(sm, "Content-Disposition: inline\r\n");
+ fprintf(sm, "Content-Transfer-Encoding: 8bit\r\n\r\n");
+
+ fprintf(sm, "Your message was automatically rejected by Sieve, a mail\r\n"
+ "filtering language.\r\n\r\n");
+ fprintf(sm, "The following reason was given:\r\n%s\r\n\r\n", reason);
+
+ /* this is the MDN status report */
+ fprintf(sm, "--%d/%s\r\n"
+ "Content-Type: message/disposition-notification\r\n\r\n",
+ (int) p, config_servername);
+ fprintf(sm, "Reporting-UA: %s; Cyrus %s/%s\r\n",
+ config_servername, CYRUS_VERSION, SIEVE_VERSION);
+ if (origreceip)
+ fprintf(sm, "Original-Recipient: rfc822; %s\r\n", origreceip);
+ fprintf(sm, "Final-Recipient: rfc822; %s\r\n", mailreceip);
+ if (origid)
+ fprintf(sm, "Original-Message-ID: %s\r\n", origid);
+ fprintf(sm, "Disposition: "
+ "automatic-action/MDN-sent-automatically; deleted\r\n");
+ fprintf(sm, "\r\n");
+
+ /* this is the original message */
+ fprintf(sm, "--%d/%s\r\nContent-Type: message/rfc822\r\n\r\n",
+ (int) p, config_servername);
+ prot_rewind(file);
+ while ((i = prot_read(file, buf, sizeof(buf))) > 0) {
+ fwrite(buf, i, 1, sm);
+ }
+ fprintf(sm, "\r\n\r\n");
+ fprintf(sm, "--%d/%s--\r\n", (int) p, config_servername);
+
+ fclose(sm);
+ while (waitpid(sm_pid, &sm_stat, 0) < 0);
+
+ return sm_stat; /* sendmail exit value */
+}
+
+static int send_forward(const char *forwardto,
+ char *return_path,
+ struct protstream *file)
+{
+ FILE *sm;
+ const char *smbuf[10];
+ int sm_stat;
+ char buf[1024];
+ pid_t sm_pid;
+ int body = 0, skip;
+
+ smbuf[0] = "sendmail";
+ smbuf[1] = "-i"; /* ignore dots */
+ if (return_path && *return_path) {
+ smbuf[2] = "-f";
+ smbuf[3] = return_path;
+ } else {
+ smbuf[2] = "-f";
+ smbuf[3] = "<>";
+ }
+ smbuf[4] = "--";
+ smbuf[5] = forwardto;
+ smbuf[6] = NULL;
+ sm_pid = open_sendmail(smbuf, &sm);
+
+ if (sm == NULL) {
+ return -1;
+ }
+
+ prot_rewind(file);
+ while (prot_fgets(buf, sizeof(buf), file)) {
+ if (!body && buf[0] == '\r' && buf[1] == '\n') {
+ /* blank line between header and body */
+ body = 1;
+ }
+
+ skip = 0;
+ if (!body) {
+ if (!strncasecmp(buf, "Return-Path:", 12)) {
+ /* strip the Return-Path */
+ skip = 1;
+ }
+ }
+
+ do {
+ if (!skip) fwrite(buf, strlen(buf), 1, sm);
+ } while (buf[strlen(buf)-1] != '\n' &&
+ prot_fgets(buf, sizeof(buf), file));
+ }
+
+ fclose(sm);
+ while (waitpid(sm_pid, &sm_stat, 0) < 0);
+
+ return sm_stat; /* sendmail exit value */
+}
+
+
+static int sieve_redirect(void *ac,
+ void *ic __attribute__((unused)),
+ void *sc, void *mc, const char **errmsg)
+{
+ sieve_redirect_context_t *rc = (sieve_redirect_context_t *) ac;
+ script_data_t *sd = (script_data_t *) sc;
+ message_data_t *m = ((deliver_data_t *) mc)->m;
+ char buf[8192], *sievedb = NULL;
+ int res;
+
+ /* if we have a msgid, we can track our redirects */
+ if (m->id) {
+ snprintf(buf, sizeof(buf), "%s-%s", m->id, rc->addr);
+ sievedb = make_sieve_db(sd->username);
+
+ /* ok, let's see if we've redirected this message before */
+ if (duplicate_check(buf, strlen(buf), sievedb, strlen(sievedb))) {
+ duplicate_log(m->id, sd->username, "redirect");
+ return SIEVE_OK;
+ }
+ }
+
+ if ((res = send_forward(rc->addr, m->return_path, m->data)) == 0) {
+ /* mark this message as redirected */
+ if (sievedb) duplicate_mark(buf, strlen(buf),
+ sievedb, strlen(sievedb), time(NULL), 0);
+
+ snmp_increment(SIEVE_REDIRECT, 1);
+ syslog(LOG_INFO, "sieve redirected: %s to: %s",
+ m->id ? m->id : "<nomsgid>", rc->addr);
+ return SIEVE_OK;
+ } else {
+ if (res == -1) {
+ *errmsg = "Could not spawn sendmail process";
+ } else {
+ *errmsg = sendmail_errstr(res);
+ }
+ return SIEVE_FAIL;
+ }
+}
+
+static int sieve_discard(void *ac __attribute__((unused)),
+ void *ic __attribute__((unused)),
+ void *sc, void *mc,
+ const char **errmsg __attribute__((unused)))
+{
+ script_data_t *sd = (script_data_t *) sc;
+ message_data_t *md = ((deliver_data_t *) mc)->m;
+
+ snmp_increment(SIEVE_DISCARD, 1);
+
+ /* ok, we won't file it, but log it */
+ syslog(LOG_INFO, "sieve discarded: %s",
+ md->id ? md->id : "<nomsgid>");
+
+ return SIEVE_OK;
+}
+
+static int sieve_reject(void *ac,
+ void *ic __attribute__((unused)),
+ void *sc, void *mc, const char **errmsg)
+{
+ sieve_reject_context_t *rc = (sieve_reject_context_t *) ac;
+ script_data_t *sd = (script_data_t *) sc;
+ message_data_t *md = ((deliver_data_t *) mc)->m;
+ const char **body;
+ const char *origreceip;
+ int res;
+
+ if (md->return_path == NULL) {
+ /* return message to who?!? */
+ *errmsg = "No return-path for reply";
+ return SIEVE_FAIL;
+ }
+
+ if (strlen(md->return_path) == 0) {
+ syslog(LOG_INFO, "sieve: discarded reject to <> for %s id %s",
+ sd->username, md->id ? md->id : "<nomsgid>");
+ return SIEVE_OK;
+ }
+
+ body = msg_getheader(md, "original-recipient");
+ origreceip = body ? body[0] : NULL;
+ if ((res = send_rejection(md->id, md->return_path,
+ origreceip, sd->username,
+ rc->msg, md->data)) == 0) {
+ snmp_increment(SIEVE_REJECT, 1);
+ syslog(LOG_INFO, "sieve rejected: %s to: %s",
+ md->id ? md->id : "<nomsgid>", md->return_path);
+ return SIEVE_OK;
+ } else {
+ if (res == -1) {
+ *errmsg = "Could not spawn sendmail process";
+ } else {
+ *errmsg = sendmail_errstr(res);
+ }
+ return SIEVE_FAIL;
+ }
+}
+
+static int sieve_fileinto(void *ac,
+ void *ic __attribute__((unused)),
+ void *sc,
+ void *mc __attribute__((unused)),
+ const char **errmsg __attribute__((unused)))
+{
+ sieve_fileinto_context_t *fc = (sieve_fileinto_context_t *) ac;
+ script_data_t *sd = (script_data_t *) sc;
+ deliver_data_t *mdata = (deliver_data_t *) mc;
+ message_data_t *md = mdata->m;
+ int quotaoverride = msg_getrcpt_ignorequota(md, mdata->cur_rcpt);
+ char namebuf[MAX_MAILBOX_NAME+1];
+ int ret;
+
+ ret = (*mdata->namespace->mboxname_tointernal)(mdata->namespace,
+ fc->mailbox,
+ sd->username, namebuf);
+ if (!ret) {
+ ret = deliver_mailbox(md->f, mdata->content, mdata->stage, md->size,
+ fc->imapflags->flag, fc->imapflags->nflags,
+ (char *) sd->username, sd->authstate, md->id,
+ sd->username, mdata->notifyheader,
+ namebuf, quotaoverride, 0);
+ }
+
+ if (!ret) {
+ snmp_increment(SIEVE_FILEINTO, 1);
+ return SIEVE_OK;
+ } else {
+ *errmsg = error_message(ret);
+ return SIEVE_FAIL;
+ }
+}
+
+static int sieve_keep(void *ac,
+ void *ic __attribute__((unused)),
+ void *sc, void *mc, const char **errmsg)
+{
+ sieve_keep_context_t *kc = (sieve_keep_context_t *) ac;
+ script_data_t *sd = (script_data_t *) sc;
+ deliver_data_t *mydata = (deliver_data_t *) mc;
+ message_data_t *md = mydata->m;
+ int ret;
+
+ ret = deliver_local(mydata, kc->imapflags->flag, kc->imapflags->nflags,
+ (char *) sd->username, sd->mailboxname);
+
+ if (!ret) {
+ snmp_increment(SIEVE_KEEP, 1);
+ return SIEVE_OK;
+ } else {
+ *errmsg = error_message(ret);
+ return SIEVE_FAIL;
+ }
+}
+
+static int sieve_notify(void *ac,
+ void *interp_context __attribute__((unused)),
+ void *script_context,
+ void *mc __attribute__((unused)),
+ const char **errmsg __attribute__((unused)))
+{
+ const char *notifier = config_getstring(IMAPOPT_SIEVENOTIFIER);
+
+ if (notifier) {
+ sieve_notify_context_t *nc = (sieve_notify_context_t *) ac;
+ script_data_t *sd = (script_data_t *) script_context;
+ int nopt = 0;
+
+ snmp_increment(SIEVE_NOTIFY, 1);
+
+ /* count options */
+ while (nc->options[nopt]) nopt++;
+
+ /* "default" is a magic value that implies the default */
+ notify(!strcmp("default",nc->method) ? notifier : nc->method,
+ "SIEVE", nc->priority, sd->username, NULL,
+ nopt, nc->options, nc->message);
+ }
+
+ return SIEVE_OK;
+}
+
+static int autorespond(void *ac,
+ void *ic __attribute__((unused)),
+ void *sc,
+ void *mc __attribute__((unused)),
+ const char **errmsg __attribute__((unused)))
+{
+ sieve_autorespond_context_t *arc = (sieve_autorespond_context_t *) ac;
+ script_data_t *sd = (script_data_t *) sc;
+ time_t t, now;
+ int ret;
+
+ snmp_increment(SIEVE_VACATION_TOTAL, 1);
+
+ now = time(NULL);
+
+ /* ok, let's see if we've responded before */
+ t = duplicate_check(arc->hash, SIEVE_HASHLEN,
+ sd->username, strlen(sd->username));
+ if (t) {
+ if (now >= t) {
+ /* yay, we can respond again! */
+ ret = SIEVE_OK;
+ } else {
+ ret = SIEVE_DONE;
+ }
+ } else {
+ /* never responded before */
+ ret = SIEVE_OK;
+ }
+
+ if (ret == SIEVE_OK) {
+ duplicate_mark((char *) arc->hash, SIEVE_HASHLEN,
+ sd->username, strlen(sd->username),
+ now + arc->days * (24 * 60 * 60), 0);
+ }
+
+ return ret;
+}
+
+static int send_response(void *ac,
+ void *ic __attribute__((unused)),
+ void *sc, void *mc, const char **errmsg)
+{
+ FILE *sm;
+ const char *smbuf[10];
+ char outmsgid[8192], *sievedb;
+ int i, sl, sm_stat;
+ time_t t;
+ char datestr[80];
+ pid_t sm_pid, p;
+ sieve_send_response_context_t *src = (sieve_send_response_context_t *) ac;
+ message_data_t *md = ((deliver_data_t *) mc)->m;
+ script_data_t *sdata = (script_data_t *) sc;
+
+ smbuf[0] = "sendmail";
+ smbuf[1] = "-i"; /* ignore dots */
+ smbuf[2] = "-f";
+ smbuf[3] = "<>";
+ smbuf[4] = "--";
+ smbuf[5] = src->addr;
+ smbuf[6] = NULL;
+ sm_pid = open_sendmail(smbuf, &sm);
+ if (sm == NULL) {
+ *errmsg = "Could not spawn sendmail process";
+ return -1;
+ }
+
+ t = time(NULL);
+ p = getpid();
+ snprintf(outmsgid, sizeof(outmsgid), "<cmu-sieve-%d-%d-%d@%s>",
+ (int) p, (int) t, global_outgoing_count++, config_servername);
+
+ fprintf(sm, "Message-ID: %s\r\n", outmsgid);
+
+ rfc822date_gen(datestr, sizeof(datestr), t);
+ fprintf(sm, "Date: %s\r\n", datestr);
+
+ fprintf(sm, "X-Sieve: %s\r\n", SIEVE_VERSION);
+ fprintf(sm, "From: <%s>\r\n", src->fromaddr);
+ fprintf(sm, "To: <%s>\r\n", src->addr);
+ /* check that subject is sane */
+ sl = strlen(src->subj);
+ for (i = 0; i < sl; i++)
+ if (iscntrl((int) src->subj[i])) {
+ src->subj[i] = '\0';
+ break;
+ }
+ fprintf(sm, "Subject: %s\r\n", src->subj);
+ if (md->id) fprintf(sm, "In-Reply-To: %s\r\n", md->id);
+ fprintf(sm, "Auto-Submitted: auto-replied (vacation)\r\n");
+ fprintf(sm, "MIME-Version: 1.0\r\n");
+ if (src->mime) {
+ fprintf(sm, "Content-Type: multipart/mixed;"
+ "\r\n\tboundary=\"%d/%s\"\r\n", (int) p, config_servername);
+ fprintf(sm, "\r\nThis is a MIME-encapsulated message\r\n\r\n");
+ fprintf(sm, "--%d/%s\r\n", (int) p, config_servername);
+ } else {
+ fprintf(sm, "Content-Type: text/plain; charset=utf-8\r\n");
+ fprintf(sm, "Content-Transfer-Encoding: 8bit\r\n");
+ fprintf(sm, "\r\n");
+ }
+
+ fprintf(sm, "%s\r\n", src->msg);
+
+ if (src->mime) {
+ fprintf(sm, "\r\n--%d/%s--\r\n", (int) p, config_servername);
+ }
+ fclose(sm);
+ while (waitpid(sm_pid, &sm_stat, 0) < 0);
+
+ if (sm_stat == 0) { /* sendmail exit value */
+ sievedb = make_sieve_db(sdata->username);
+
+ duplicate_mark(outmsgid, strlen(outmsgid),
+ sievedb, strlen(sievedb), t, 0);
+
+ snmp_increment(SIEVE_VACATION_REPLIED, 1);
+
+ return SIEVE_OK;
+ } else {
+ *errmsg = sendmail_errstr(sm_stat);
+ return SIEVE_FAIL;
+ }
+}
+
+/* vacation support */
+sieve_vacation_t vacation = {
+ 1, /* min response */
+ 31, /* max response */
+ &autorespond, /* autorespond() */
+ &send_response, /* send_response() */
+};
+
+/* imapflags support */
+static char *markflags[] = { "\\flagged" };
+static sieve_imapflags_t mark = { markflags, 1 };
+
+static int sieve_parse_error_handler(int lineno, const char *msg,
+ void *ic __attribute__((unused)),
+ void *sc)
+{
+ script_data_t *sd = (script_data_t *) sc;
+
+ syslog(LOG_INFO, "sieve parse error for %s: line %d: %s",
+ sd->username, lineno, msg);
+
+ return SIEVE_OK;
+}
+
+static int sieve_execute_error_handler(const char *msg,
+ void *ic __attribute__((unused)),
+ void *sc, void *mc)
+{
+ script_data_t *sd = (script_data_t *) sc;
+ message_data_t *md = ((deliver_data_t *) mc)->m;
+
+ syslog(LOG_INFO, "sieve runtime error for %s id %s: %s",
+ sd->username, md->id ? md->id : "(null)", msg);
+
+ return SIEVE_OK;
+}
+
+sieve_interp_t *setup_sieve(void)
+{
+ sieve_interp_t *interp = NULL;
+ int res;
+
+ sieve_usehomedir = config_getswitch(IMAPOPT_SIEVEUSEHOMEDIR);
+ if (!sieve_usehomedir) {
+ sieve_dir = config_getstring(IMAPOPT_SIEVEDIR);
+ } else {
+ sieve_dir = NULL;
+ }
+
+ res = sieve_interp_alloc(&interp, NULL);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_interp_alloc() returns %d\n", res);
+ fatal("sieve_interp_alloc()", EC_SOFTWARE);
+ }
+
+ res = sieve_register_redirect(interp, &sieve_redirect);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_redirect() returns %d\n", res);
+ fatal("sieve_register_redirect()", EC_SOFTWARE);
+ }
+ res = sieve_register_discard(interp, &sieve_discard);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_discard() returns %d\n", res);
+ fatal("sieve_register_discard()", EC_SOFTWARE);
+ }
+ res = sieve_register_reject(interp, &sieve_reject);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_reject() returns %d\n", res);
+ fatal("sieve_register_reject()", EC_SOFTWARE);
+ }
+ res = sieve_register_fileinto(interp, &sieve_fileinto);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_fileinto() returns %d\n", res);
+ fatal("sieve_register_fileinto()", EC_SOFTWARE);
+ }
+ res = sieve_register_keep(interp, &sieve_keep);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_keep() returns %d\n", res);
+ fatal("sieve_register_keep()", EC_SOFTWARE);
+ }
+ res = sieve_register_imapflags(interp, &mark);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_imapflags() returns %d\n", res);
+ fatal("sieve_register_imapflags()", EC_SOFTWARE);
+ }
+ res = sieve_register_notify(interp, &sieve_notify);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_notify() returns %d\n", res);
+ fatal("sieve_register_notify()", EC_SOFTWARE);
+ }
+ res = sieve_register_size(interp, &getsize);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_size() returns %d\n", res);
+ fatal("sieve_register_size()", EC_SOFTWARE);
+ }
+ res = sieve_register_header(interp, &getheader);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_header() returns %d\n", res);
+ fatal("sieve_register_header()", EC_SOFTWARE);
+ }
+
+ res = sieve_register_envelope(interp, &getenvelope);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR,"sieve_register_envelope() returns %d\n", res);
+ fatal("sieve_register_envelope()", EC_SOFTWARE);
+ }
+
+ res = sieve_register_body(interp, &getbody);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR,"sieve_register_body() returns %d\n", res);
+ fatal("sieve_register_body()", EC_SOFTWARE);
+ }
+
+ res = sieve_register_include(interp, &getinclude);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR,"sieve_register_include() returns %d\n", res);
+ fatal("sieve_register_include()", EC_SOFTWARE);
+ }
+
+ res = sieve_register_vacation(interp, &vacation);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_vacation() returns %d\n", res);
+ fatal("sieve_register_vacation()", EC_SOFTWARE);
+ }
+
+ res = sieve_register_parse_error(interp, &sieve_parse_error_handler);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_parse_error() returns %d\n", res);
+ fatal("sieve_register_parse_error()", EC_SOFTWARE);
+ }
+
+ res = sieve_register_execute_error(interp,
+ &sieve_execute_error_handler);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_execute_error() returns %d\n", res);
+ fatal("sieve_register_execute_error()", EC_SOFTWARE);
+ }
+
+ return interp;
+}
+
+static int sieve_find_script(const char *user, const char *domain,
+ const char *script, char *fname, size_t size)
+{
+ if (!user && !script) {
+ return -1;
+ }
+
+ if (user && strlen(user) > 900) {
+ return -1;
+ }
+
+ if (sieve_usehomedir && user) { /* look in homedir */
+ struct passwd *pent = getpwnam(user);
+
+ if (pent == NULL) {
+ return -1;
+ }
+
+ /* check ~USERNAME/.sieve */
+ snprintf(fname, size, "%s/%s", pent->pw_dir, script ? script : ".sieve");
+ } else { /* look in sieve_dir */
+ size_t len = strlcpy(fname, sieve_dir, size);
+
+ if (domain) {
+ char dhash = (char) dir_hash_c(domain);
+ len += snprintf(fname+len, size-len, "%s%c/%s",
+ FNAME_DOMAINDIR, dhash, domain);
+ }
+
+ if (!user) { /* global script */
+ len = strlcat(fname, "/global/", size);
+ }
+ else {
+ char hash = (char) dir_hash_c(user);
+ len += snprintf(fname+len, size-len, "/%c/%s/", hash, user);
+
+ if (!script) { /* default script */
+ strlcat(fname, "defaultbc", size);
+ return 0;
+ }
+ }
+
+ snprintf(fname+len, size-len, "%s.bc", script);
+ }
+ return 0;
+}
+
+int run_sieve(const char *user, const char *domain, const char *mailbox,
+ sieve_interp_t *interp, deliver_data_t *msgdata)
+{
+ char namebuf[MAX_MAILBOX_NAME+1] = "";
+ struct annotation_data attrib;
+ const char *script = NULL;
+ char fname[MAX_MAILBOX_PATH+1];
+ sieve_execute_t *bc = NULL;
+ script_data_t sdata;
+ char userbuf[MAX_MAILBOX_NAME+1] = "";
+ char authuserbuf[MAX_MAILBOX_NAME+1];
+ int r = 0;
+
+ if (!user) {
+ /* shared mailbox, check for annotation */
+ if (domain) snprintf(namebuf, sizeof(namebuf), "%s!", domain);
+ strlcat(namebuf, mailbox, sizeof(namebuf));
+
+ if (annotatemore_lookup(namebuf,
+ "/vendor/cmu/cyrus-imapd/sieve", "",
+ &attrib) != 0 || !attrib.value) {
+ /* no sieve script annotation */
+ return 1; /* do normal delivery actions */
+ }
+
+ script = attrib.value;
+ }
+
+ if (sieve_find_script(user, domain, script, fname, sizeof(fname)) != 0 ||
+ sieve_script_load(fname, &bc) != SIEVE_OK) {
+ /* no sieve script */
+ return 1; /* do normal delivery actions */
+ }
+
+ if (user) strlcpy(userbuf, user, sizeof(userbuf));
+ if (domain) {
+ strlcat(userbuf, "@", sizeof(userbuf));
+ strlcat(userbuf, domain, sizeof(userbuf));
+ }
+ sdata.username = userbuf;
+ sdata.mailboxname = mailbox;
+
+ if (user) {
+ strlcpy(authuserbuf, userbuf, sizeof(authuserbuf));
+ if (config_getswitch(IMAPOPT_UNIXHIERARCHYSEP)) {
+ mboxname_hiersep_toexternal(msgdata->namespace, authuserbuf,
+ domain ? strcspn(authuserbuf, "@") : 0);
+ }
+ sdata.authstate = auth_newstate(authuserbuf);
+ }
+ else {
+ sdata.authstate = msgdata->authstate;
+ }
+
+ r = sieve_execute_bytecode(bc, interp,
+ (void *) &sdata, (void *) msgdata);
+
+ if ((r == SIEVE_OK) && (msgdata->m->id)) {
+ /* ok, we've run the script */
+ char *sdb;
+
+ /* slap the mailbox back on so we hash the envelope & id
+ when we figure out whether or not to keep the message */
+ snprintf(namebuf, sizeof(namebuf), "%s+%s@%s",
+ user ? user : "", mailbox ? mailbox : "",
+ domain ? domain : "");
+ sdb = make_sieve_db(namebuf);
+
+ duplicate_mark(msgdata->m->id, strlen(msgdata->m->id),
+ sdb, strlen(sdb), time(NULL), 0);
+ }
+
+ /* free everything */
+ if (user && sdata.authstate) auth_freestate(sdata.authstate);
+ sieve_script_unload(&bc);
+
+ /* if there was an error, r is non-zero and
+ we'll do normal delivery */
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtp_sieve.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,55 @@
+/* lmtp_sieve.h -- Sieve implementation for lmtpd
+ *
+ * $Id: lmtp_sieve.h,v 1.1.2.5 2005/10/19 14:50:06 ken3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#ifndef LMTP_SIEVE_H
+#define LMTP_SIEVE_H
+
+#include "lmtpd.h"
+#include "sieve_interface.h"
+
+sieve_interp_t *setup_sieve(void);
+int run_sieve(const char *user, const char *domain, const char *mailbox,
+ sieve_interp_t *interp, deliver_data_t *mydata);
+
+#endif /* LMTP_SIEVE_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1109 @@
+/* lmtpd.c -- Program to deliver mail to a mailbox
+ *
+ * $Id: lmtpd.c,v 1.121.2.35 2006/05/23 13:09:36 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "acl.h"
+#include "annotate.h"
+#include "append.h"
+#include "assert.h"
+#include "auth.h"
+#include "backend.h"
+#include "duplicate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "idle.h"
+#include "imap_err.h"
+#include "imparse.h"
+#include "lock.h"
+#include "mailbox.h"
+#include "map.h"
+#include "mboxlist.h"
+#include "mboxname.h"
+#include "message.h"
+#include "mupdate.h"
+#include "notify.h"
+#include "prot.h"
+#include "proxy.h"
+#include "tls.h"
+#include "util.h"
+#include "version.h"
+#include "xmalloc.h"
+
+#include "lmtpd.h"
+#include "lmtpengine.h"
+#include "lmtpstats.h"
+#ifdef USE_SIEVE
+#include "lmtp_sieve.h"
+
+static sieve_interp_t *sieve_interp = NULL;
+#endif
+
+#include "sync_log.h"
+
+/* forward declarations */
+static int deliver(message_data_t *msgdata, char *authuser,
+ struct auth_state *authstate);
+static int verify_user(const char *user, const char *domain, char *mailbox,
+ long quotacheck, struct auth_state *authstate);
+static char *generate_notify(message_data_t *m);
+
+void shut_down(int code);
+
+static FILE *spoolfile(message_data_t *msgdata);
+static void removespool(message_data_t *msgdata);
+
+/* current namespace */
+static struct namespace lmtpd_namespace;
+
+struct lmtp_func mylmtp = { &deliver, &verify_user, &shut_down,
+ &spoolfile, &removespool, &lmtpd_namespace,
+ 0, 1, 0 };
+
+static void usage();
+
+/* global state */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+extern int optind;
+extern char *optarg;
+static int dupelim = 1; /* eliminate duplicate messages with
+ same message-id */
+static int singleinstance = 1; /* attempt single instance store */
+
+struct stagemsg *stage = NULL;
+
+/* per-user/session state */
+static struct protstream *deliver_out, *deliver_in;
+int deliver_logfd = -1; /* used in lmtpengine.c */
+
+/* our cached connections */
+mupdate_handle *mhandle = NULL;
+struct backend **backend_cached = NULL;
+
+static struct sasl_callback mysasl_cb[] = {
+ { SASL_CB_GETOPT, &mysasl_config, NULL },
+ { SASL_CB_PROXY_POLICY, &mysasl_proxy_policy, NULL },
+ { SASL_CB_CANON_USER, &mysasl_canon_user, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+
+int service_init(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ int r;
+
+ if (geteuid() == 0) return 1;
+
+ signals_set_shutdown(&shut_down);
+ signal(SIGPIPE, SIG_IGN);
+
+ singleinstance = config_getswitch(IMAPOPT_SINGLEINSTANCESTORE);
+
+ global_sasl_init(1, 1, mysasl_cb);
+
+ if (config_mupdate_server &&
+ (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_STANDARD) &&
+ !config_getstring(IMAPOPT_PROXYSERVERS)) {
+ /* proxy only -- talk directly to mupdate master */
+ r = mupdate_connect(config_mupdate_server, NULL, &mhandle, NULL);
+ if (r) {
+ syslog(LOG_ERR, "couldn't connect to MUPDATE server %s: %s",
+ config_mupdate_server, error_message(r));
+ fatal("error connecting with MUPDATE server", EC_TEMPFAIL);
+ }
+ }
+ else {
+ dupelim = config_getswitch(IMAPOPT_DUPLICATESUPPRESSION);
+
+#ifdef USE_SIEVE
+ mylmtp.addheaders = xzmalloc(2 * sizeof(struct addheader));
+ mylmtp.addheaders[0].name = "X-Sieve";
+ mylmtp.addheaders[0].body = SIEVE_VERSION;
+
+ /* setup sieve support */
+ sieve_interp = setup_sieve();
+#else
+ if (dupelim)
+#endif
+ {
+ /* initialize duplicate delivery database */
+ if (duplicate_init(NULL, 0) != 0) {
+ fatal("lmtpd: unable to init duplicate delivery database",
+ EC_SOFTWARE);
+ }
+ }
+
+ /* so we can do mboxlist operations */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* so we can do quota operations */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ /* Initialize the annotatemore db (for sieve on shared mailboxes) */
+ annotatemore_init(0, NULL, NULL);
+ annotatemore_open(NULL);
+
+ /* setup for sending IMAP IDLE notifications */
+ idle_enabled();
+ }
+
+ /* Set namespace */
+ if ((r = mboxname_init_namespace(&lmtpd_namespace, 0)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ /* create connection to the SNMP listener, if available. */
+ snmp_connect(); /* ignore return code */
+ snmp_set_str(SERVER_NAME_VERSION, CYRUS_VERSION);
+
+ /* YYY Sanity checks possible here? */
+ message_uuid_client_init(getenv("CYRUS_UUID_PREFIX"));
+
+ return 0;
+}
+
+static int mupdate_ignore_cb(struct mupdate_mailboxdata *mdata __attribute__((unused)),
+ const char *cmd __attribute__((unused)),
+ void *context __attribute__((unused)))
+{
+ /* If we get called, we've recieved something other than an OK in
+ * response to the NOOP, so we want to hang up this connection anyway */
+ return MUPDATE_FAIL;
+}
+
+/*
+ * run for each accepted connection
+ */
+int service_main(int argc, char **argv,
+ char **envp __attribute__((unused)))
+{
+ int opt, r;
+
+ sync_log_init();
+
+ deliver_in = prot_new(0, 0);
+ deliver_out = prot_new(1, 1);
+ prot_setflushonread(deliver_in, deliver_out);
+ prot_settimeout(deliver_in, 360);
+
+ while ((opt = getopt(argc, argv, "a")) != EOF) {
+ switch(opt) {
+ case 'a':
+ mylmtp.preauth = 1;
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ snmp_increment(TOTAL_CONNECTIONS, 1);
+ snmp_increment(ACTIVE_CONNECTIONS, 1);
+
+ /* get a connection to the mupdate server */
+ r = 0;
+ if (mhandle) {
+ /* we have one already, test it */
+ r = mupdate_noop(mhandle, mupdate_ignore_cb, NULL);
+ if (r) {
+ /* will NULL mhandle for us */
+ mupdate_disconnect(&mhandle);
+
+ /* connect to the mupdate server */
+ r = mupdate_connect(config_mupdate_server, NULL, &mhandle, NULL);
+ }
+ }
+ if (!r) {
+ lmtpmode(&mylmtp, deliver_in, deliver_out, 0);
+ } else {
+ syslog(LOG_ERR, "couldn't connect to %s: %s", config_mupdate_server,
+ error_message(r));
+ prot_printf(deliver_out, "451 %s LMTP Cyrus %s %s\r\n",
+ config_servername, CYRUS_VERSION, error_message(r));
+ }
+
+ /* free session state */
+ if (deliver_in) prot_free(deliver_in);
+ if (deliver_out) prot_free(deliver_out);
+ deliver_in = deliver_out = NULL;
+
+ if (deliver_logfd != -1) {
+ close(deliver_logfd);
+ deliver_logfd = -1;
+ }
+
+ cyrus_reset_stdio();
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+static void
+usage()
+{
+ fprintf(stderr, "421-4.3.0 usage: lmtpd [-C <alt_config>] [-a]\r\n");
+ fprintf(stderr, "421 4.3.0 %s\n", CYRUS_VERSION);
+ exit(EC_USAGE);
+}
+
+struct fuzz_rock {
+ char *mboxname;
+ size_t prefixlen;
+ char *pat;
+ size_t patlen;
+ size_t matchlen;
+};
+
+#define WSP_CHARS "- _"
+
+static int fuzzy_match_cb(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct fuzz_rock *frock = (struct fuzz_rock *) rock;
+ int i;
+
+ for (i = frock->prefixlen; name[i] && frock->pat[i]; i++) {
+ if (tolower((int) name[i]) != frock->pat[i] &&
+ !(strchr(WSP_CHARS, name[i]) &&
+ strchr(WSP_CHARS, frock->pat[i]))) {
+ break;
+ }
+ }
+
+ /* see if we have a [partial] match */
+ if (!name[i] && (!frock->pat[i] || frock->pat[i] == '.') &&
+ i > frock->matchlen) {
+ frock->matchlen = i;
+ strlcpy(frock->mboxname, name, i+1);
+ if (i == frock->patlen) return CYRUSDB_DONE;
+ }
+
+ return 0;
+}
+
+int fuzzy_match(char *mboxname)
+{
+ char name[MAX_MAILBOX_NAME+1], prefix[MAX_MAILBOX_NAME+1], *p = NULL;
+ size_t prefixlen;
+ struct fuzz_rock frock;
+
+ /* make a working copy */
+ strlcpy(name, mboxname, sizeof(name));
+
+ /* check to see if this is an personal mailbox */
+ if (!strncmp(name, "user.", 5) || (p = strstr(name, "!user."))) {
+ p = p ? p + 6 : name + 5;
+
+ /* check to see if this is an INBOX (no '.' after the userid) */
+ if (!(p = strchr(p, '.'))) return 0;
+ }
+
+ if (p) p++; /* skip the trailing '.' */
+ else p = name;
+
+ /* copy the prefix */
+ prefixlen = p - name;
+ strlcpy(prefix, name, prefixlen+1);
+
+ /* normalize the rest of the pattern to lowercase */
+ lcase(p);
+
+ frock.mboxname = mboxname;
+ frock.prefixlen = prefixlen;
+ frock.pat = name;
+ frock.patlen = strlen(name);
+ frock.matchlen = 0;
+
+ strlcat(prefix, "*", sizeof(prefix));
+ mboxlist_findall(NULL, prefix, 1, NULL, NULL, fuzzy_match_cb, &frock);
+
+ return frock.matchlen;
+}
+
+/* proxy mboxlist_lookup; on misses, it asks the listener for this
+ machine to make a roundtrip to the master mailbox server to make
+ sure it's up to date */
+static int mlookup(const char *name, char **server, char **aclp, void *tid)
+{
+ int r, type;
+
+ if (server) *server = NULL;
+
+ if (mhandle) {
+ /* proxy only, so check the mupdate master */
+ struct mupdate_mailboxdata *mailboxdata;
+
+ /* find what server we're sending this to */
+ r = mupdate_find(mhandle, name, &mailboxdata);
+
+ if (r == MUPDATE_MAILBOX_UNKNOWN) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ } else if (r) {
+ /* xxx -- yuck: our error handling for now will be to exit;
+ this txn will be retried later -- to do otherwise means
+ that we may have to restart this transaction from scratch */
+ fatal("error communicating with MUPDATE server", EC_TEMPFAIL);
+ }
+
+ type |= MBTYPE_REMOTE;
+ if (server) *server = (char *) mailboxdata->server;
+ }
+ else {
+ /* do a local lookup and kick the slave if necessary */
+ r = mboxlist_detail(name, &type, NULL, NULL, server, aclp, tid);
+ if (r == IMAP_MAILBOX_NONEXISTENT && config_mupdate_server) {
+ kick_mupdate();
+ r = mboxlist_detail(name, &type, NULL, NULL, server, aclp, tid);
+ }
+ }
+
+ if (type & MBTYPE_REMOTE) {
+ /* xxx hide the fact that we are storing partitions */
+ if (server && *server) {
+ char *c;
+ c = strchr(*server, '!');
+ if (c) *c = '\0';
+ }
+ }
+ else if (server)
+ *server = NULL;
+
+ return r;
+}
+
+/* places msg in mailbox mailboxname.
+ * if you wish to use single instance store, pass stage as non-NULL
+ * if you want to deliver message regardless of duplicates, pass id as NULL
+ * if you want to notify, pass user
+ * if you want to force delivery (to force delivery to INBOX, for instance)
+ * pass acloverride
+ */
+int deliver_mailbox(FILE *f,
+ struct message_content *content,
+ struct stagemsg *stage,
+ unsigned size,
+ char **flag,
+ int nflags,
+ char *authuser,
+ struct auth_state *authstate,
+ char *id,
+ const char *user,
+ char *notifyheader,
+ const char *mailboxname,
+ int quotaoverride,
+ int acloverride)
+{
+ int r;
+ struct appendstate as;
+ time_t now = time(NULL);
+ unsigned long uid;
+ const char *notifier;
+
+ if (dupelim && id &&
+ duplicate_check(id, strlen(id), mailboxname, strlen(mailboxname))) {
+ /* duplicate message */
+ duplicate_log(id, mailboxname, "delivery");
+ return 0;
+ }
+
+ r = append_setup(&as, mailboxname, MAILBOX_FORMAT_NORMAL,
+ authuser, authstate, acloverride ? 0 : ACL_POST,
+ quotaoverride ? -1 :
+ config_getswitch(IMAPOPT_LMTP_STRICT_QUOTA) ? size : 0);
+
+ if (!r && !content->body) {
+ /* parse the message body if we haven't already,
+ and keep the file mmap'ed */
+ r = message_parse_file(f, &content->base, &content->len, &content->body);
+ }
+
+ if (!r) {
+ r = append_fromstage(&as, &content->body, stage, now,
+ (const char **) flag, nflags, !singleinstance);
+ if (r ||
+ (dupelim && id &&
+ duplicate_check(id, strlen(id), mailboxname, strlen(mailboxname)))) {
+ append_abort(&as);
+
+ if (!r) {
+ /* duplicate message */
+ duplicate_log(id, mailboxname, "delivery");
+ return 0;
+ }
+ } else {
+ if (dupelim && id)
+ duplicate_mark(id, strlen(id), mailboxname,
+ strlen(mailboxname), now, uid);
+
+ append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
+ syslog(LOG_INFO, "Delivered: %s to mailbox: %s", id, mailboxname);
+
+ sync_log_append(mailboxname);
+ }
+ }
+
+ if (!r && user && (notifier = config_getstring(IMAPOPT_MAILNOTIFIER))) {
+ char inbox[MAX_MAILBOX_NAME+1];
+ char namebuf[MAX_MAILBOX_NAME+1];
+ char userbuf[MAX_MAILBOX_NAME+1];
+ const char *notify_mailbox = mailboxname;
+ int r2;
+
+ /* translate user.foo to INBOX */
+ if (!(*lmtpd_namespace.mboxname_tointernal)(&lmtpd_namespace,
+ "INBOX", user, inbox)) {
+ int inboxlen = strlen(inbox);
+ if (strlen(mailboxname) >= inboxlen &&
+ !strncmp(mailboxname, inbox, inboxlen) &&
+ (!mailboxname[inboxlen] || mailboxname[inboxlen] == '.')) {
+ strlcpy(inbox, "INBOX", sizeof(inbox));
+ strlcat(inbox, mailboxname+inboxlen, sizeof(inbox));
+ notify_mailbox = inbox;
+ }
+ }
+
+ /* translate mailboxname */
+ r2 = (*lmtpd_namespace.mboxname_toexternal)(&lmtpd_namespace,
+ notify_mailbox,
+ user, namebuf);
+ if (!r2) {
+ strlcpy(userbuf, user, sizeof(userbuf));
+ /* translate any separators in user */
+ mboxname_hiersep_toexternal(&lmtpd_namespace, userbuf,
+ config_virtdomains ?
+ strcspn(userbuf, "@") : 0);
+ notify(notifier, "MAIL", NULL, userbuf, namebuf, 0, NULL,
+ notifyheader ? notifyheader : "");
+ }
+ }
+
+ return r;
+}
+
+enum rcpt_status {
+ done = 0,
+ nosieve, /* no sieve script */
+ s_wait, /* processing sieve requests */
+ s_err, /* error in sieve processing/sending */
+ s_done, /* sieve script successfully run */
+};
+
+void deliver_remote(message_data_t *msgdata,
+ struct dest *dlist, enum rcpt_status *status)
+{
+ struct dest *d;
+
+ /* run the txns */
+ d = dlist;
+ while (d) {
+ struct lmtp_txn *lt = LMTP_TXN_ALLOC(d->rnum);
+ struct rcpt *rc;
+ struct backend *remote;
+ int i = 0;
+ int r = 0;
+
+ lt->from = msgdata->return_path;
+ lt->auth = d->authas[0] ? d->authas : NULL;
+ lt->isdotstuffed = 0;
+ lt->tempfail_unknown_mailbox = 1;
+
+ prot_rewind(msgdata->data);
+ lt->data = msgdata->data;
+ lt->rcpt_num = d->rnum;
+ rc = d->to;
+ for (rc = d->to; rc != NULL; rc = rc->next, i++) {
+ assert(i < d->rnum);
+ lt->rcpt[i].addr = rc->rcpt;
+ lt->rcpt[i].ignorequota =
+ msg_getrcpt_ignorequota(msgdata, rc->rcpt_num);
+ }
+ assert(i == d->rnum);
+
+ remote = proxy_findserver(d->server, &protocol[PROTOCOL_LMTP], "",
+ &backend_cached, NULL, NULL, NULL);
+ if (remote) {
+ r = lmtp_runtxn(remote, lt);
+ } else {
+ /* remote server not available; tempfail all deliveries */
+ for (rc = d->to, i = 0; i < d->rnum; i++) {
+ lt->rcpt[i].result = RCPT_TEMPFAIL;
+ lt->rcpt[i].r = IMAP_SERVER_UNAVAILABLE;
+ }
+ }
+
+ /* process results of the txn, propogating error state to the
+ recipients */
+ for (rc = d->to, i = 0; rc != NULL; rc = rc->next, i++) {
+ int j = rc->rcpt_num;
+ switch (status[j]) {
+ case s_wait:
+ /* hmmm, if something fails we'll want to try an
+ error delivery */
+ if (lt->rcpt[i].result != RCPT_GOOD) {
+ status[j] = s_err;
+ }
+ break;
+ case s_err:
+ /* we've already detected an error for this recipient,
+ and nothing will convince me otherwise */
+ break;
+ case nosieve:
+ /* this is the only delivery we're attempting for this rcpt */
+ msg_setrcpt_status(msgdata, j, lt->rcpt[i].r);
+ status[j] = done;
+ break;
+ case done:
+ case s_done:
+ /* yikes! we shouldn't be getting a notification for this
+ person! */
+ abort();
+ break;
+ }
+ }
+
+ free(lt);
+ d = d->next;
+ }
+}
+
+int deliver_local(deliver_data_t *mydata, char **flag, int nflags,
+ const char *username, const char *mailboxname)
+{
+ char namebuf[MAX_MAILBOX_NAME+1] = "", *tail;
+ message_data_t *md = mydata->m;
+ int quotaoverride = msg_getrcpt_ignorequota(md, mydata->cur_rcpt);
+ int ret;
+
+ /* case 1: shared mailbox request */
+ if (!*username || username[0] == '@') {
+ if (*username) snprintf(namebuf, sizeof(namebuf), "%s!", username+1);
+ strlcat(namebuf, mailboxname, sizeof(namebuf));
+
+ return deliver_mailbox(md->f, mydata->content, mydata->stage,
+ md->size, flag, nflags,
+ mydata->authuser, mydata->authstate, md->id,
+ NULL, mydata->notifyheader,
+ namebuf, quotaoverride, 0);
+ }
+
+ /* case 2: ordinary user */
+ ret = (*mydata->namespace->mboxname_tointernal)(mydata->namespace,
+ "INBOX",
+ username, namebuf);
+
+ if (!ret) {
+ int ret2 = 1;
+
+ tail = namebuf + strlen(namebuf);
+ if (mailboxname) {
+ strlcat(namebuf, ".", sizeof(namebuf));
+ strlcat(namebuf, mailboxname, sizeof(namebuf));
+
+ ret2 = deliver_mailbox(md->f, mydata->content, mydata->stage,
+ md->size, flag, nflags,
+ mydata->authuser, mydata->authstate, md->id,
+ username, mydata->notifyheader,
+ namebuf, quotaoverride, 0);
+ }
+ if (ret2 == IMAP_MAILBOX_NONEXISTENT && mailboxname &&
+ config_getswitch(IMAPOPT_LMTP_FUZZY_MAILBOX_MATCH) &&
+ fuzzy_match(namebuf)) {
+ /* try delivery to a fuzzy matched mailbox */
+ ret2 = deliver_mailbox(md->f, mydata->content, mydata->stage,
+ md->size, flag, nflags,
+ mydata->authuser, mydata->authstate, md->id,
+ username, mydata->notifyheader,
+ namebuf, quotaoverride, 0);
+ }
+ if (ret2) {
+ /* normal delivery to INBOX */
+ struct auth_state *authstate = auth_newstate(username);
+
+ *tail = '\0';
+
+ ret = deliver_mailbox(md->f, mydata->content, mydata->stage,
+ md->size, flag, nflags,
+ (char *) username, authstate, md->id,
+ username, mydata->notifyheader,
+ namebuf, quotaoverride, 1);
+
+ if (authstate) auth_freestate(authstate);
+ }
+ }
+
+ return ret;
+}
+
+int deliver(message_data_t *msgdata, char *authuser,
+ struct auth_state *authstate)
+{
+ int n, nrcpts;
+ struct dest *dlist = NULL;
+ enum rcpt_status *status;
+ struct message_content content = { NULL, 0, NULL };
+ char *notifyheader;
+ deliver_data_t mydata;
+
+ assert(msgdata);
+ nrcpts = msg_getnumrcpt(msgdata);
+ assert(nrcpts);
+
+ notifyheader = generate_notify(msgdata);
+
+ /* create our per-recipient status */
+ status = xzmalloc(sizeof(enum rcpt_status) * nrcpts);
+
+ /* create 'mydata', our per-delivery data */
+ mydata.m = msgdata;
+ mydata.content = &content;
+ mydata.stage = stage;
+ mydata.notifyheader = notifyheader;
+ mydata.namespace = &lmtpd_namespace;
+ mydata.authuser = authuser;
+ mydata.authstate = authstate;
+
+ /* loop through each recipient, attempting delivery for each */
+ for (n = 0; n < nrcpts; n++) {
+ char namebuf[MAX_MAILBOX_NAME+1] = "", *server;
+ char userbuf[MAX_MAILBOX_NAME+1];
+ const char *rcpt, *user, *domain, *mailbox;
+ int r = 0;
+
+ rcpt = msg_getrcptall(msgdata, n);
+ msg_getrcpt(msgdata, n, &user, &domain, &mailbox);
+
+ namebuf[0] = '\0';
+ userbuf[0] = '\0';
+
+ if (domain) snprintf(namebuf, sizeof(namebuf), "%s!", domain);
+
+ /* case 1: shared mailbox request */
+ if (!user) {
+ strlcat(namebuf, mailbox, sizeof(namebuf));
+ }
+ /* case 2: ordinary user */
+ else {
+ strlcat(namebuf, "user.", sizeof(namebuf));
+ strlcat(namebuf, user, sizeof(namebuf));
+
+ strlcpy(userbuf, user, sizeof(userbuf));
+ }
+ if (domain) {
+ strlcat(userbuf, "@", sizeof(userbuf));
+ strlcat(userbuf, domain, sizeof(userbuf));
+ }
+
+ r = mlookup(namebuf, &server, NULL, NULL);
+ if (!r && server) {
+ /* remote mailbox */
+ proxy_adddest(&dlist, rcpt, n, server, authuser);
+ status[n] = nosieve;
+ }
+ else if (!r) {
+ /* local mailbox */
+ mydata.cur_rcpt = n;
+#ifdef USE_SIEVE
+ r = run_sieve(user, domain, mailbox, sieve_interp, &mydata);
+ /* if there was no sieve script, or an error during execution,
+ r is non-zero and we'll do normal delivery */
+#else
+ r = 1; /* normal delivery */
+#endif
+
+ if (r) {
+ r = deliver_local(&mydata, NULL, 0, userbuf, mailbox);
+ }
+ }
+
+ msg_setrcpt_status(msgdata, n, r);
+ }
+
+ if (dlist) {
+ struct dest *d;
+
+ /* run the txns */
+ deliver_remote(msgdata, dlist, status);
+
+ /* free the recipient/destination lists */
+ d = dlist;
+ while (d) {
+ struct dest *nextd = d->next;
+ struct rcpt *rc = d->to;
+
+ while (rc) {
+ struct rcpt *nextrc = rc->next;
+ free(rc);
+ rc = nextrc;
+ }
+ free(d);
+ d = nextd;
+ }
+ dlist = NULL;
+
+ /* do any sieve error recovery, if needed */
+ for (n = 0; n < nrcpts; n++) {
+ switch (status[n]) {
+ case s_wait:
+ case s_err:
+ case s_done:
+ /* yikes, we haven't implemented sieve ! */
+ syslog(LOG_CRIT,
+ "sieve states reached, but we don't implement sieve");
+ abort();
+ break;
+ case nosieve:
+ /* yikes, we never got an answer on this one */
+ syslog(LOG_CRIT, "still waiting for response to rcpt %d",
+ n);
+ abort();
+ break;
+ case done:
+ /* good */
+ break;
+ }
+ }
+
+ /* run the error recovery txns */
+ deliver_remote(msgdata, dlist, status);
+
+ /* everything should be in the 'done' state now, verify this */
+ for (n = 0; n < nrcpts; n++) {
+ assert(status[n] == done || status[n] == s_done);
+ }
+ }
+
+ /* cleanup */
+ free(status);
+ if (content.base) map_free(&content.base, &content.len);
+ if (content.body) {
+ message_free_body(content.body);
+ free(content.body);
+ }
+ append_removestage(stage);
+ stage = NULL;
+ if (notifyheader) free(notifyheader);
+
+ return 0;
+}
+
+void fatal(const char* s, int code)
+{
+ static int recurse_code = 0;
+
+ if(recurse_code) {
+ /* We were called recursively. Just give up */
+ snmp_increment(ACTIVE_CONNECTIONS, -1);
+ exit(recurse_code);
+ }
+ recurse_code = code;
+ if(deliver_out) {
+ prot_printf(deliver_out,"421 4.3.0 lmtpd: %s\r\n", s);
+ prot_flush(deliver_out);
+ }
+ if (stage) append_removestage(stage);
+
+ syslog(LOG_ERR, "FATAL: %s", s);
+
+ /* shouldn't return */
+ shut_down(code);
+
+ exit(code);
+}
+
+/*
+ * Cleanly shut down and exit
+ */
+void shut_down(int code) __attribute__((noreturn));
+void shut_down(int code)
+{
+ int i;
+
+ /* close backend connections */
+ i = 0;
+ while (backend_cached && backend_cached[i]) {
+ proxy_downserver(backend_cached[i]);
+ free(backend_cached[i]);
+ i++;
+ }
+ if (backend_cached) free(backend_cached);
+
+ if (mhandle) {
+ mupdate_disconnect(&mhandle);
+ } else {
+#ifdef USE_SIEVE
+ sieve_interp_free(&sieve_interp);
+#else
+ if (dupelim)
+#endif
+ duplicate_done();
+
+ mboxlist_close();
+ mboxlist_done();
+
+ quotadb_close();
+ quotadb_done();
+
+ annotatemore_close();
+ annotatemore_done();
+ }
+
+#ifdef HAVE_SSL
+ tls_shutdown_serverengine();
+#endif
+ if (deliver_out) {
+ prot_flush(deliver_out);
+
+ /* one less active connection */
+ snmp_increment(ACTIVE_CONNECTIONS, -1);
+ }
+
+ cyrus_done();
+
+ exit(code);
+}
+
+static int verify_user(const char *user, const char *domain, char *mailbox,
+ long quotacheck, struct auth_state *authstate)
+{
+ char namebuf[MAX_MAILBOX_NAME+1] = "";
+ int r = 0;
+
+ if ((!user && !mailbox) ||
+ (domain && (strlen(domain) + 1 > sizeof(namebuf)))) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ } else {
+ /* construct the mailbox that we will verify */
+ if (domain) snprintf(namebuf, sizeof(namebuf), "%s!", domain);
+
+ if (!user) {
+ /* shared folder */
+ if (strlen(namebuf) + strlen(mailbox) > sizeof(namebuf)) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ } else {
+ strlcat(namebuf, mailbox, sizeof(namebuf));
+ }
+ } else {
+ /* ordinary user -- check INBOX */
+ if (strlen(namebuf) + 5 + strlen(user) > sizeof(namebuf)) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ } else {
+ strlcat(namebuf, "user.", sizeof(namebuf));
+ strlcat(namebuf, user, sizeof(namebuf));
+ }
+ }
+ }
+
+ if (!r) {
+ char *server, *acl;
+ long aclcheck = !user ? ACL_POST : 0;
+ /*
+ * check to see if mailbox exists and we can append to it:
+ *
+ * - must have posting privileges on shared folders
+ * - don't care about ACL on INBOX (always allow post)
+ * - don't care about message size (1 msg over quota allowed)
+ */
+ r = mlookup(namebuf, &server, &acl, NULL);
+
+ if (r == IMAP_MAILBOX_NONEXISTENT && !user &&
+ config_getswitch(IMAPOPT_LMTP_FUZZY_MAILBOX_MATCH) &&
+ /* see if we have a mailbox whose name is close */
+ fuzzy_match(namebuf)) {
+
+ /* We are guaranteed that the mailbox returned by fuzzy_match()
+ will be no longer than the original, so we can copy over
+ the existing mailbox. The keeps us from having to do the
+ fuzzy match multiple times. */
+ strcpy(mailbox, domain ? namebuf+strlen(domain)+1 : namebuf);
+
+ r = mlookup(namebuf, &server, &acl, NULL);
+ }
+
+ if (!r && server) {
+ int access = cyrus_acl_myrights(authstate, acl);
+
+ if ((access & aclcheck) != aclcheck) {
+ r = (access & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ }
+ } else if (!r) {
+ r = append_check(namebuf, MAILBOX_FORMAT_NORMAL, authstate,
+ aclcheck, (quotacheck < 0)
+ || config_getswitch(IMAPOPT_LMTP_STRICT_QUOTA) ?
+ quotacheck : 0);
+ }
+ }
+
+ if (r) syslog(LOG_DEBUG, "verify_user(%s) failed: %s", namebuf,
+ error_message(r));
+
+ return r;
+}
+
+const char *notifyheaders[] = { "From", "Subject", "To", 0 };
+/* returns a malloc'd string that should be sent to users for successful
+ delivery of 'm'. */
+char *generate_notify(message_data_t *m)
+{
+ const char **body;
+ char *ret = NULL;
+ unsigned int len = 0;
+ unsigned int pos = 0;
+ int i;
+
+ for (i = 0; notifyheaders[i]; i++) {
+ const char *h = notifyheaders[i];
+ body = msg_getheader(m, h);
+ if (body) {
+ int j;
+
+ for (j = 0; body[j] != NULL; j++) {
+ /* put the header */
+ /* need: length + ": " + '\0'*/
+ while (pos + strlen(h) + 3 > len) {
+ ret = xrealloc(ret, len += 1024);
+ }
+ pos += sprintf(ret + pos, "%s: ", h);
+
+ /* put the header body.
+ xxx it would be nice to linewrap.*/
+ /* need: length + '\n' + '\0' */
+ while (pos + strlen(body[j]) + 2 > len) {
+ ret = xrealloc(ret, len += 1024);
+ }
+ pos += sprintf(ret + pos, "%s\n", body[j]);
+ }
+ }
+ }
+
+ return ret;
+}
+
+FILE *spoolfile(message_data_t *msgdata)
+{
+ int i, n;
+ time_t now = time(NULL);
+ FILE *f = NULL;
+
+ /* spool to the stage of one of the recipients
+ (don't bother if we're only a proxy) */
+ n = mhandle ? 0 : msg_getnumrcpt(msgdata);
+ for (i = 0; !f && (i < n); i++) {
+ char namebuf[MAX_MAILBOX_NAME+1] = "", *server;
+ const char *user, *domain, *mailbox;
+ int r;
+
+ /* build the mailboxname from the recipient address */
+ msg_getrcpt(msgdata, i, &user, &domain, &mailbox);
+
+ if (domain) snprintf(namebuf, sizeof(namebuf), "%s!", domain);
+
+ /* case 1: shared mailbox request */
+ if (!user) {
+ strlcat(namebuf, mailbox, sizeof(namebuf));
+ }
+
+ /* case 2: ordinary user */
+ else {
+ /* assume delivery to INBOX for now */
+ strlcat(namebuf, "user.", sizeof(namebuf));
+ strlcat(namebuf, user, sizeof(namebuf));
+ }
+
+ r = mlookup(namebuf, &server, NULL, NULL);
+ if (!r && !server) {
+ /* local mailbox -- setup stage for later use by deliver() */
+ f = append_newstage(namebuf, now, 0, &stage);
+ }
+ }
+
+ if (!f) {
+ /* we only have remote mailboxes, so use a tempfile */
+ int fd = create_tempfile();
+
+ if (fd != -1) f = fdopen(fd, "w+");
+ }
+
+ return f;
+}
+
+void removespool(message_data_t *msgdata __attribute__((unused)))
+{
+ append_removestage(stage);
+ stage = NULL;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpd.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,91 @@
+/* lmtpd.h -- Program to deliver mail to a mailbox
+ *
+ * $Id: lmtpd.h,v 1.1.2.1 2005/10/19 14:50:07 ken3 Exp $
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#ifndef LMTPD_H
+#define LMTPD_H
+
+#include "append.h"
+#include "auth.h"
+#include "lmtpengine.h"
+#include "mboxname.h"
+#include "message.h"
+
+/* data per message */
+typedef struct deliver_data {
+ message_data_t *m;
+ struct message_content *content;
+
+ int cur_rcpt;
+
+ struct stagemsg *stage; /* staging location for single instance
+ store */
+ char *notifyheader;
+ const char *temp[2]; /* used to avoid extra indirection in
+ getenvelope() */
+
+ struct namespace *namespace;
+
+ char *authuser; /* user who submitted message */
+ struct auth_state *authstate;
+} deliver_data_t;
+
+/* forward declarations */
+extern int deliver_mailbox(FILE *f,
+ struct message_content *content,
+ struct stagemsg *stage,
+ unsigned size,
+ char **flag,
+ int nflags,
+ char *authuser,
+ struct auth_state *authstate,
+ char *id,
+ const char *user,
+ char *notifyheader,
+ const char *mailboxname,
+ int quotaoverride,
+ int acloverride);
+
+extern int fuzzy_match(char *mboxname);
+
+#endif /* LMTPD_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1955 @@
+/* lmtpengine.c: LMTP protocol engine
+ * $Id: lmtpengine.c,v 1.93.2.17 2005/11/01 20:14:20 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <limits.h>
+#include <sys/wait.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "assert.h"
+#include "util.h"
+#include "auth.h"
+#include "prot.h"
+#include "rfc822date.h"
+#include "global.h"
+#include "iptostring.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mupdate_err.h"
+#include "xmalloc.h"
+#include "version.h"
+
+#include "lmtpengine.h"
+#include "lmtpstats.h"
+#include "tls.h"
+#include "telemetry.h"
+
+#define RCPT_GROW 30
+
+/* data per message */
+struct address_data {
+ char *all; /* storage for entire RCPT TO addr -- MUST be freed */
+ char *rcpt; /* storage for user[+mbox][@domain] -- MUST be freed */
+ char *user; /* pointer to user part of rcpt -- DO NOT be free */
+ char *domain; /* pointer to domain part of rcpt -- DO NOT be free */
+ char *mailbox; /* pointer to mailbox part of rcpt -- DO NOT be free */
+ int ignorequota;
+ int status;
+};
+
+struct clientdata {
+ struct protstream *pin;
+ struct protstream *pout;
+ int fd;
+
+ char clienthost[NI_MAXHOST*2+1];
+ char lhlo_param[250];
+
+ sasl_conn_t *conn;
+
+ enum {
+ EXTERNAL_AUTHED = -1, /* -1: external auth'd, but no AUTH issued */
+ NOAUTH = 0,
+ DIDAUTH = 1
+ } authenticated;
+
+#ifdef HAVE_SSL
+ SSL *tls_conn;
+#endif /* HAVE_SSL */
+ int starttls_done;
+};
+
+/* defined in lmtpd.c or lmtpproxyd.c */
+extern int deliver_logfd;
+
+extern int saslserver(sasl_conn_t *conn, const char *mech,
+ const char *init_resp, const char *resp_prefix,
+ const char *continuation, const char *empty_chal,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, char **success_data);
+
+static struct {
+ char *ipremoteport;
+ char *iplocalport;
+ sasl_ssf_t ssf;
+ char *authid;
+} saslprops = {NULL,NULL,0,NULL};
+
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for LMTP!",
+ EC_SOFTWARE);
+}
+
+#ifdef USING_SNMPGEN
+/* round to nearest 1024 bytes and return number of Kbytes.
+ used for SNMP updates. */
+static int roundToK(int x)
+{
+ double rd = (x*1.0)/1024.0;
+ int ri = x/1024;
+
+ if (rd-ri < 0.5)
+ return ri;
+ else
+ return ri+1;
+}
+#else
+#define roundToK(x)
+#endif /* USING_SNMPGEN */
+
+static void send_lmtp_error(struct protstream *pout, int r)
+{
+ switch (r) {
+ case 0:
+ prot_printf(pout, "250 2.1.5 Ok\r\n");
+ break;
+
+ case IMAP_IOERROR:
+ prot_printf(pout, "451 4.3.0 System I/O error\r\n");
+ break;
+
+ case IMAP_SERVER_UNAVAILABLE:
+ case MUPDATE_NOCONN:
+ case MUPDATE_NOAUTH:
+ case MUPDATE_TIMEOUT:
+ case MUPDATE_PROTOCOL_ERROR:
+ prot_printf(pout, "451 4.4.3 Remote server unavailable\r\n");
+ break;
+
+ case IMAP_NOSPACE:
+ prot_printf(pout, "451 4.3.1 cannot create file: out of space\r\n");
+ break;
+
+ case IMAP_AGAIN:
+ prot_printf(pout, "451 4.3.0 transient system error\r\n");
+ break;
+
+ case IMAP_PERMISSION_DENIED:
+ if (LMTP_LONG_ERROR_MSGS) {
+ prot_printf(pout,
+"550-You do not have permission to post a message to this mailbox.\r\n"
+"550-Please contact the owner of this mailbox in order to submit\r\n"
+"550-your message, or %s if you believe you\r\n"
+"550-received this message in error.\r\n"
+"550 5.7.1 Permission denied\r\n",
+ config_getstring(IMAPOPT_POSTMASTER));
+ } else {
+ prot_printf(pout, "550 5.7.1 Permission denied\r\n");
+ }
+ break;
+
+ case IMAP_QUOTA_EXCEEDED:
+ if(config_getswitch(IMAPOPT_LMTP_OVER_QUOTA_PERM_FAILURE)) {
+ /* Not Default - Perm Failure */
+ prot_printf(pout, "552 5.2.2 Over quota\r\n");
+ } else {
+ /* Default - Temp Failure */
+ prot_printf(pout, "452 4.2.2 Over quota\r\n");
+ }
+ break;
+
+ case IMAP_MAILBOX_BADFORMAT:
+ case IMAP_MAILBOX_NOTSUPPORTED:
+ prot_printf(pout, "451 4.2.0 Mailbox has an invalid format\r\n");
+ break;
+
+ case IMAP_MAILBOX_MOVED:
+ prot_printf(pout, "451 4.2.1 Mailbox Moved\r\n");
+ break;
+
+ case IMAP_MESSAGE_CONTAINSNULL:
+ prot_printf(pout, "554 5.6.0 Message contains NUL characters\r\n");
+ break;
+
+ case IMAP_MESSAGE_CONTAINSNL:
+ prot_printf(pout, "554 5.6.0 Message contains bare newlines\r\n");
+ break;
+
+ case IMAP_MESSAGE_CONTAINS8BIT:
+ prot_printf(pout, "554 5.6.0 Message contains non-ASCII characters in headers\r\n");
+ break;
+
+ case IMAP_MESSAGE_BADHEADER:
+ prot_printf(pout, "554 5.6.0 Message contains invalid header\r\n");
+ break;
+
+ case IMAP_MESSAGE_NOBLANKLINE:
+ prot_printf(pout,
+ "554 5.6.0 Message has no header/body separator\r\n");
+ break;
+
+ case IMAP_MAILBOX_NONEXISTENT:
+ /* XXX Might have been moved to other server */
+ if (LMTP_LONG_ERROR_MSGS) {
+ prot_printf(pout,
+"550-Mailbox unknown. Either there is no mailbox associated with this\r\n"
+"550-name or you do not have authorization to see it.\r\n"
+"550 5.1.1 User unknown\r\n");
+ } else {
+ prot_printf(pout, "550 5.1.1 User unknown\r\n");
+ }
+ break;
+
+ case IMAP_PROTOCOL_BAD_PARAMETERS:
+ prot_printf(pout, "501 5.5.4 Syntax error in parameters\r\n");
+ break;
+
+ case MUPDATE_BADPARAM:
+ default:
+ /* Some error we're not expecting. */
+ prot_printf(pout, "554 5.0.0 Unexpected internal error\r\n");
+ break;
+ }
+}
+
+/* ----- this section defines functions on message_data_t.
+ ----- access functions and the like, etc. */
+
+/* returns non-zero on failure */
+int msg_new(message_data_t **m)
+{
+ message_data_t *ret = (message_data_t *) xmalloc(sizeof(message_data_t));
+
+ ret->data = NULL;
+ ret->f = NULL;
+ ret->id = NULL;
+ ret->size = 0;
+ ret->return_path = NULL;
+ ret->rcpt = NULL;
+ ret->rcpt_num = 0;
+
+ ret->authuser = NULL;
+ ret->authstate = NULL;
+
+ ret->rock = NULL;
+
+ ret->hdrcache = spool_new_hdrcache();
+
+ *m = ret;
+ return 0;
+}
+
+void msg_free(message_data_t *m)
+{
+ int i;
+
+ if (m->data) {
+ prot_free(m->data);
+ }
+ if (m->f) {
+ fclose(m->f);
+ }
+ if (m->id) {
+ free(m->id);
+ }
+
+ if (m->return_path) {
+ free(m->return_path);
+ }
+ if (m->rcpt) {
+ for (i = 0; i < m->rcpt_num; i++) {
+ if (m->rcpt[i]->all) free(m->rcpt[i]->all);
+ if (m->rcpt[i]->rcpt) free(m->rcpt[i]->rcpt);
+ free(m->rcpt[i]);
+ }
+ free(m->rcpt);
+ }
+
+ if (m->authuser) {
+ free(m->authuser);
+ if (m->authstate) auth_freestate(m->authstate);
+ }
+
+ spool_free_hdrcache(m->hdrcache);
+
+ free(m);
+}
+
+const char **msg_getheader(message_data_t *m, const char *phead)
+{
+ assert(m && phead);
+
+ return spool_getheader(m->hdrcache, phead);
+}
+
+int msg_getsize(message_data_t *m)
+{
+ return m->size;
+}
+
+int msg_getnumrcpt(message_data_t *m)
+{
+ return m->rcpt_num;
+}
+
+void msg_getrcpt(message_data_t *m, int rcpt_num,
+ const char **user, const char **domain, const char **mailbox)
+{
+ assert(0 <= rcpt_num && rcpt_num < m->rcpt_num);
+ if (user) *user = m->rcpt[rcpt_num]->user;
+ if (domain) *domain = m->rcpt[rcpt_num]->domain;
+ if (mailbox) *mailbox = m->rcpt[rcpt_num]->mailbox;
+}
+
+const char *msg_getrcptall(message_data_t *m, int rcpt_num)
+{
+ assert(0 <= rcpt_num && rcpt_num < m->rcpt_num);
+ return m->rcpt[rcpt_num]->all;
+}
+
+int msg_getrcpt_ignorequota(message_data_t *m, int rcpt_num)
+{
+ assert(0 <= rcpt_num && rcpt_num < m->rcpt_num);
+ return m->rcpt[rcpt_num]->ignorequota;
+}
+
+/* set a recipient status; 'r' should be an IMAP error code that will be
+ translated into an LMTP status code */
+void msg_setrcpt_status(message_data_t *m, int rcpt_num, int r)
+{
+ assert(0 <= rcpt_num && rcpt_num < m->rcpt_num);
+ m->rcpt[rcpt_num]->status = r;
+}
+
+void *msg_getrock(message_data_t *m)
+{
+ return m->rock;
+}
+
+void msg_setrock(message_data_t *m, void *rock)
+{
+ m->rock = rock;
+}
+
+/* return a malloc'd string representing the authorized user.
+ advance 'strp' over the parameter */
+static char *parseautheq(char **strp)
+{
+ char *ret;
+ char *str;
+ char *s = *strp;
+
+ if (!strcmp(s, "<>")) {
+ *strp = s + 2;
+ return NULL;
+ }
+
+ ret = (char *) xmalloc(strlen(s)+1);
+ ret[0]='\0';
+ str = ret;
+
+ if (*s == '<') s++; /* we'll be liberal and accept "<foo>" */
+ while (1)
+ {
+ /* hexchar */
+ if (*s == '+')
+ {
+ int lup;
+ *str = '\0';
+ s++;
+
+ for (lup=0;lup<2;lup++)
+ {
+ if ((*s>='0') && (*s<='9'))
+ (*str) = (*str) & (*s - '0');
+ else if ((*s>='A') && (*s<='F'))
+ (*str) = (*str) & (*s - 'A' + 10);
+ else {
+ free(ret);
+ *strp = s;
+ return NULL;
+ }
+ if (lup==0)
+ {
+ (*str) = (*str) << 4;
+ s++;
+ }
+ }
+ str++;
+
+ } else if ((*s >= '!') && (*s <='~') && (*s!='+') && (*s!='=')) {
+ /* ascii char */
+ *str = *s;
+ str++;
+ } else {
+ /* bad char or end-of-line */
+ break;
+ }
+ s++;
+ }
+
+ *strp = s;
+ if (*s && (*s!=' ')) { free(ret); return NULL; }
+
+ *str = '\0';
+
+ /* take off trailing '>' */
+ if ((str!=ret) && ( *(str-1)=='>'))
+ {
+ *(str-1) = '\0';
+ }
+
+ return ret;
+}
+
+/* return malloc'd string containing the address */
+static char *parseaddr(char *s)
+{
+ char *p, *ret;
+ int len;
+
+ p = s;
+
+ if (*p++ != '<') return 0;
+
+ /* at-domain-list */
+ while (*p == '@') {
+ p++;
+ if (*p == '[') {
+ p++;
+ while (isdigit((int) *p) || *p == '.') p++;
+ if (*p++ != ']') return 0;
+ }
+ else {
+ while (isalnum((int) *p) || *p == '.' || *p == '-') p++;
+ }
+ if (*p == ',' && p[1] == '@') p++;
+ else if (*p == ':' && p[1] != '@') p++;
+ else return 0;
+ }
+
+ /* local-part */
+ if (*p == '\"') {
+ p++;
+ while (*p && *p != '\"') {
+ if (*p == '\\') {
+ if (!*++p) return 0;
+ }
+ p++;
+ }
+ if (!*p++) return 0;
+ }
+ else {
+ while (*p && *p != '@' && *p != '>') {
+ if (*p == '\\') {
+ if (!*++p) return 0;
+ }
+ else {
+ if (*p <= ' ' || (*p & 128) ||
+ strchr("<>()[]\\,;:\"", *p)) return 0;
+ }
+ p++;
+ }
+ }
+
+ /* @domain */
+ if (*p == '@') {
+ p++;
+ if (*p == '[') {
+ p++;
+ while (isdigit((int) *p) || *p == '.') p++;
+ if (*p++ != ']') return 0;
+ }
+ else {
+ while (isalnum((int) *p) || *p == '.' || *p == '-') p++;
+ }
+ }
+
+ if (*p++ != '>') return 0;
+ if (*p && *p != ' ') return 0;
+ len = p - s;
+
+ ret = xmalloc(len + 1);
+ memcpy(ret, s, len);
+ ret[len] = '\0';
+ return ret;
+}
+
+/* clean off the <> from the return path */
+void clean_retpath(char *rpath)
+{
+ int sl;
+
+ /* Remove any angle brackets around return path */
+ if (*rpath == '<') {
+ sl = strlen(rpath);
+ /* use strlen(rpath) so we move the NUL too */
+ memmove(rpath, rpath+1, sl);
+ sl--; /* string is one shorter now */
+ if (rpath[sl-1] == '>') {
+ rpath[sl-1] = '\0';
+ }
+ }
+}
+
+/*
+ * Destructively remove any whitespace and 822 comments
+ * from string pointed to by 'buf'. Does not handle continuation header
+ * lines.
+ */
+void
+clean822space(buf)
+char *buf;
+{
+ char *from=buf, *to=buf;
+ int c;
+ int commentlevel = 0;
+
+ while ((c = *from++)!=0) {
+ switch (c) {
+ case '\r':
+ case '\n':
+ case '\0':
+ *to = '\0';
+ return;
+
+ case ' ':
+ case '\t':
+ continue;
+
+ case '(':
+ commentlevel++;
+ break;
+
+ case ')':
+ if (commentlevel) commentlevel--;
+ break;
+
+ case '\\':
+ if (commentlevel && *from) from++;
+ /* FALL THROUGH */
+
+ default:
+ if (!commentlevel) *to++ = c;
+ break;
+ }
+ }
+}
+
+/*
+ * file in the message structure 'm' from 'pin', assuming a dot-stuffed
+ * stream a la lmtp.
+ *
+ * returns 0 on success, imap error code on failure
+ */
+static int savemsg(struct clientdata *cd,
+ const struct lmtp_func *func,
+ message_data_t *m)
+{
+ FILE *f;
+ struct stat sbuf;
+ const char **body;
+ int r;
+ int nrcpts = m->rcpt_num;
+ time_t now = time(NULL);
+ static unsigned msgid_count = 0;
+ char datestr[80], tls_info[250] = "";
+ const char *skipheaders[] = {
+ "Return-Path", /* need to remove (we add our own) */
+ NULL
+ };
+ char *addbody, *fold[5], *p;
+ int addlen, nfold, i;
+
+ /* Copy to spool file */
+ f = func->spoolfile(m);
+ if (!f) {
+ prot_printf(cd->pout,
+ "451 4.3.%c cannot create temporary file: %s\r\n",
+ (
+#ifdef EDQUOT
+ errno == EDQUOT ||
+#endif
+ errno == ENOSPC) ? '1' : '2',
+ error_message(errno));
+ return IMAP_IOERROR;
+ }
+
+ prot_printf(cd->pout, "354 go ahead\r\n");
+
+ if (m->return_path && func->addretpath) { /* add the return path */
+ char *rpath = m->return_path;
+ const char *hostname = 0;
+
+ clean_retpath(rpath);
+ /* Append our hostname if there's no domain in address */
+ hostname = NULL;
+ if (!strchr(rpath, '@') && strlen(rpath) > 0) {
+ hostname = config_servername;
+ }
+
+ addlen = 2 + strlen(rpath) + (hostname ? 1 + strlen(hostname) : 0);
+ addbody = xmalloc(addlen + 1);
+ sprintf(addbody, "<%s%s%s>",
+ rpath, hostname ? "@" : "", hostname ? hostname : "");
+ fprintf(f, "Return-Path: %s\r\n", addbody);
+ spool_cache_header(xstrdup("Return-Path"), addbody, m->hdrcache);
+ }
+
+ /* add a received header */
+ rfc822date_gen(datestr, sizeof(datestr), now);
+ addlen = 8 + strlen(cd->lhlo_param) + strlen(cd->clienthost);
+ if (m->authuser) addlen += 28 + strlen(m->authuser) + 5; /* +5 for ssf */
+ addlen += 25 + strlen(config_servername) + strlen(CYRUS_VERSION);
+#ifdef HAVE_SSL
+ if (cd->tls_conn) {
+ addlen += 3 + tls_get_info(cd->tls_conn, tls_info, sizeof(tls_info));
+ }
+#endif
+ addlen += 2 + strlen(datestr);
+ p = addbody = xmalloc(addlen + 1);
+
+ nfold = 0;
+ p += sprintf(p, "from %s (%s)", cd->lhlo_param, cd->clienthost);
+ fold[nfold++] = p;
+ if (m->authuser) {
+ const int *ssfp;
+ sasl_getprop(cd->conn, SASL_SSF, (const void **) &ssfp);
+ p += sprintf(p, " (authenticated user=%s bits=%d)",
+ m->authuser, *ssfp);
+ fold[nfold++] = p;
+ }
+
+ /* We are always atleast "with LMTPA" -- no unauth delivery */
+ p += sprintf(p, " by %s (Cyrus %s) with LMTP%s%s",
+ config_servername,
+ CYRUS_VERSION,
+ cd->starttls_done ? "S" : "",
+ cd->authenticated != NOAUTH ? "A" : "");
+
+ if (*tls_info) {
+ fold[nfold++] = p;
+ p += sprintf(p, " (%s)", tls_info);
+ }
+
+ strcat(p++, ";");
+ fold[nfold++] = p;
+ p += sprintf(p, " %s", datestr);
+
+ fprintf(f, "Received: ");
+ for (i = 0, p = addbody; i < nfold; p = fold[i], i++) {
+ fprintf(f, "%.*s\r\n\t", fold[i] - p, p);
+ }
+ fprintf(f, "%s\r\n", p);
+ spool_cache_header(xstrdup("Received"), addbody, m->hdrcache);
+
+ /* add any requested headers */
+ if (func->addheaders) {
+ struct addheader *h;
+ for (h = func->addheaders; h && h->name; h++) {
+ fprintf(f, "%s: %s\r\n", h->name, h->body);
+ spool_cache_header(xstrdup(h->name), xstrdup(h->body), m->hdrcache);
+ }
+ }
+
+ /* fill the cache */
+ r = spool_fill_hdrcache(cd->pin, f, m->hdrcache, skipheaders);
+
+ /* now, using our header cache, fill in the data that we want */
+
+ /* first check resent-message-id */
+ if ((body = msg_getheader(m, "resent-message-id")) && body[0][0]) {
+ m->id = xstrdup(body[0]);
+ } else if ((body = msg_getheader(m, "message-id")) && body[0][0]) {
+ m->id = xstrdup(body[0]);
+ } else if (body) {
+ r = IMAP_MESSAGE_BADHEADER; /* empty message-id */
+ } else {
+ /* no message-id, create one */
+ pid_t p = getpid();
+
+ m->id = xmalloc(40 + strlen(config_servername));
+ sprintf(m->id, "<cmu-lmtpd-%d-%d-%u@%s>", p, (int) now,
+ msgid_count++, config_servername);
+ fprintf(f, "Message-ID: %s\r\n", m->id);
+ spool_cache_header(xstrdup("Message-ID"), xstrdup(m->id), m->hdrcache);
+ }
+
+ /* get date */
+ if (!(body = spool_getheader(m->hdrcache, "date"))) {
+ /* no date, create one */
+ addbody = xstrdup(datestr);
+ fprintf(f, "Date: %s\r\n", addbody);
+ spool_cache_header(xstrdup("Date"), addbody, m->hdrcache);
+ }
+
+ if (!m->return_path &&
+ (body = msg_getheader(m, "return-path"))) {
+ /* let's grab return_path */
+ m->return_path = xstrdup(body[0]);
+ clean822space(m->return_path);
+ clean_retpath(m->return_path);
+ }
+
+ r |= spool_copy_msg(cd->pin, f);
+ if (r) {
+ fclose(f);
+ if (func->removespool) {
+ /* remove the spool'd message */
+ func->removespool(m);
+ }
+ while (nrcpts--) {
+ send_lmtp_error(cd->pout, r);
+ }
+ return r;
+ }
+
+ fflush(f);
+ if (ferror(f)) {
+ while (nrcpts--) {
+ prot_printf(cd->pout,
+ "451 4.3.%c cannot copy message to temporary file: %s\r\n",
+ (
+#ifdef EDQUOT
+ errno == EDQUOT ||
+#endif
+ errno == ENOSPC) ? '1' : '2',
+ error_message(errno));
+ }
+ fclose(f);
+ if (func->removespool) func->removespool(m);
+ return IMAP_IOERROR;
+ }
+
+ if (fstat(fileno(f), &sbuf) == -1) {
+ while (nrcpts--) {
+ prot_printf(cd->pout,
+ "451 4.3.2 cannot stat message temporary file: %s\r\n",
+ error_message(errno));
+ }
+ fclose(f);
+ if (func->removespool) func->removespool(m);
+ return IMAP_IOERROR;
+ }
+ m->size = sbuf.st_size;
+ m->f = f;
+ m->data = prot_new(fileno(f), 0);
+
+ return 0;
+}
+
+/* see if 'addr' exists. if so, fill in 'ad' appropriately.
+ on success, return NULL.
+ on failure, return the error. */
+static int process_recipient(char *addr, struct namespace *namespace,
+ int ignorequota,
+ int (*verify_user)(const char *, const char *,
+ char *, long,
+ struct auth_state *),
+ message_data_t *msg)
+{
+ char *dest;
+ char *rcpt;
+ int r, sl;
+ address_data_t *ret = (address_data_t *) xmalloc(sizeof(address_data_t));
+ int forcedowncase = config_getswitch(IMAPOPT_LMTP_DOWNCASE_RCPT);
+ int quoted, detail;
+
+ assert(addr != NULL && msg != NULL);
+
+ if (*addr == '<') addr++;
+ dest = rcpt = addr;
+
+ /* preserve the entire address */
+ ret->all = xstrdup(addr);
+ sl = strlen(ret->all);
+ if (ret->all[sl-1] == '>')
+ ret->all[sl-1] = '\0';
+
+ /* now find just the user */
+
+ /* Skip at-domain-list */
+ if (*addr == '@') {
+ addr = strchr(addr, ':');
+ if (!addr) {
+ free(ret->all);
+ free(ret);
+ return IMAP_PROTOCOL_BAD_PARAMETERS;
+ }
+ addr++;
+ }
+
+ quoted = detail = 0;
+ while (*addr &&
+ (quoted ||
+ ((config_virtdomains || *addr != '@') && *addr != '>'))) {
+ /* start/end of quoted localpart, skip the quote */
+ if (*addr == '\"') {
+ quoted = !quoted;
+ addr++;
+ continue;
+ }
+
+ /* escaped char, pass it through */
+ if (*addr == '\\') {
+ addr++;
+ if (!*addr) break;
+ } else {
+ /* start of detail */
+ if (*addr == '+') detail = 1;
+
+ /* end of localpart (unless quoted) */
+ if (*addr == '@' && !quoted) detail = 0;
+ }
+
+ /* downcase everything accept the detail */
+ if (forcedowncase && !detail)
+ *dest++ = TOLOWER(*addr++);
+ else
+ *dest++ = *addr++;
+ }
+ *dest = '\0';
+
+ /* make a working copy of rcpt */
+ ret->user = ret->rcpt = xstrdup(rcpt);
+
+ /* find domain */
+ ret->domain = NULL;
+ if (config_virtdomains && (ret->domain = strrchr(ret->rcpt, '@'))) {
+ *(ret->domain)++ = '\0';
+ /* ignore default domain */
+ if (config_defdomain && !strcasecmp(config_defdomain, ret->domain))
+ ret->domain = NULL;
+ }
+
+ /* translate any separators in user & mailbox */
+ mboxname_hiersep_tointernal(namespace, ret->rcpt, 0);
+
+ /* find mailbox */
+ if ((ret->mailbox = strchr(ret->rcpt, '+'))) *(ret->mailbox)++ = '\0';
+
+ /* see if its a shared mailbox address */
+ if (!strcmp(ret->user, config_getstring(IMAPOPT_POSTUSER)))
+ ret->user = NULL;
+
+ r = verify_user(ret->user, ret->domain, ret->mailbox,
+ ignorequota ? -1 : msg->size, msg->authstate);
+ if (r) {
+ /* we lost */
+ free(ret->all);
+ free(ret->rcpt);
+ free(ret);
+ return r;
+ }
+ ret->ignorequota = ignorequota;
+
+ msg->rcpt[msg->rcpt_num] = ret;
+
+ return 0;
+}
+
+static int localauth_mechlist_override(
+ void *context __attribute__((unused)),
+ const char *plugin_name __attribute__((unused)),
+ const char *option,
+ const char **result,
+ unsigned *len)
+{
+ /* If we are doing local auth, we only support EXTERNAL */
+ if (strcmp(option,"mech_list")==0)
+ {
+ *result = "EXTERNAL";
+ if (len)
+ *len = strlen(*result);
+ return SASL_OK;
+ }
+
+ /* if we don't find the option,
+ this should percolate to the global getopt */
+ return SASL_FAIL;
+}
+
+static struct sasl_callback localauth_override_cb[] = {
+ { SASL_CB_GETOPT, &localauth_mechlist_override, NULL },
+ { SASL_CB_LIST_END, NULL, NULL },
+};
+
+/* Reset the given sasl_conn_t to a sane state */
+static int reset_saslconn(sasl_conn_t **conn)
+{
+ int ret, secflags;
+ sasl_security_properties_t *secprops = NULL;
+
+ sasl_dispose(conn);
+ /* do initialization typical of service_main */
+ ret = sasl_server_new("lmtp", config_servername,
+ NULL, NULL, NULL,
+ NULL, 0, conn);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.ipremoteport)
+ ret = sasl_setprop(*conn, SASL_IPREMOTEPORT,
+ saslprops.ipremoteport);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.iplocalport)
+ ret = sasl_setprop(*conn, SASL_IPLOCALPORT,
+ saslprops.iplocalport);
+ if(ret != SASL_OK) return ret;
+
+ secflags = SASL_SEC_NOANONYMOUS;
+ if (!config_getswitch(IMAPOPT_ALLOWPLAINTEXT)) {
+ secflags |= SASL_SEC_NOPLAINTEXT;
+ }
+
+ secprops = mysasl_secprops(secflags);
+ ret = sasl_setprop(*conn, SASL_SEC_PROPS, secprops);
+ if(ret != SASL_OK) return ret;
+ /* end of service_main initialization excepting SSF */
+
+ /* If we have TLS/SSL info, set it */
+ if(saslprops.ssf) {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &saslprops.ssf);
+ }
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.authid) {
+ ret = sasl_setprop(*conn, SASL_AUTH_EXTERNAL, saslprops.authid);
+ if(ret != SASL_OK) return ret;
+ }
+ /* End TLS/SSL Info */
+
+ return SASL_OK;
+}
+
+void lmtpmode(struct lmtp_func *func,
+ struct protstream *pin,
+ struct protstream *pout,
+ int fd)
+{
+ message_data_t *msg = NULL;
+ int max_msgsize;
+ char buf[4096];
+ char *p;
+ int r;
+ struct clientdata cd;
+
+ struct sockaddr_storage localaddr, remoteaddr;
+ int havelocal = 0, haveremote = 0;
+ char localip[60], remoteip[60];
+ socklen_t salen;
+ char hbuf[NI_MAXHOST];
+ int niflags = 0;
+
+ sasl_ssf_t ssf;
+ char *auth_id;
+
+ int secflags = 0;
+ sasl_security_properties_t *secprops = NULL;
+
+ /* setup the clientdata structure */
+ cd.pin = pin;
+ cd.pout = pout;
+ cd.fd = fd;
+ cd.clienthost[0] = '\0';
+ cd.lhlo_param[0] = '\0';
+ cd.authenticated = NOAUTH;
+#ifdef HAVE_SSL
+ cd.tls_conn = NULL;
+#endif
+ cd.starttls_done = 0;
+
+ max_msgsize = config_getint(IMAPOPT_MAXMESSAGESIZE);
+
+ /* If max_msgsize is 0, allow any size */
+ if(!max_msgsize) max_msgsize = INT_MAX;
+
+ msg_new(&msg);
+
+ /* don't leak old connections */
+ if(saslprops.iplocalport) {
+ free(saslprops.iplocalport);
+ saslprops.iplocalport = NULL;
+ }
+ if(saslprops.ipremoteport) {
+ free(saslprops.ipremoteport);
+ saslprops.ipremoteport = NULL;
+ }
+
+ /* determine who we're talking to */
+ salen = sizeof(remoteaddr);
+ r = getpeername(fd, (struct sockaddr *)&remoteaddr, &salen);
+ if (!r &&
+ (remoteaddr.ss_family == AF_INET ||
+ remoteaddr.ss_family == AF_INET6)) {
+ /* connected to an internet socket */
+ if (getnameinfo((struct sockaddr *)&remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD) == 0) {
+ strncpy(cd.clienthost, hbuf, sizeof(hbuf));
+ strlcat(cd.clienthost, " ", sizeof(cd.clienthost));
+ cd.clienthost[sizeof(cd.clienthost)-30] = '\0';
+ } else {
+ cd.clienthost[0] = '\0';
+ }
+ niflags = NI_NUMERICHOST;
+#ifdef NI_WITHSCOPEID
+ if (((struct sockaddr *)&remoteaddr)->sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, niflags) != 0)
+ strlcpy(hbuf, "unknown", sizeof(hbuf));
+ strlcat(cd.clienthost, "[", sizeof(cd.clienthost));
+ strlcat(cd.clienthost, hbuf, sizeof(cd.clienthost));
+ strlcat(cd.clienthost, "]", sizeof(cd.clienthost));
+ salen = sizeof(localaddr);
+ if (!getsockname(fd, (struct sockaddr *)&localaddr, &salen)) {
+ /* set the ip addresses here */
+ if(iptostring((struct sockaddr *)&localaddr, salen,
+ localip, sizeof(localip)) == 0) {
+ havelocal = 1;
+ saslprops.iplocalport = xstrdup(localip);
+ }
+ if(iptostring((struct sockaddr *)&remoteaddr, salen,
+ remoteip, sizeof(remoteip)) == 0) {
+ haveremote = 1;
+ saslprops.ipremoteport = xstrdup(remoteip);
+ }
+ } else {
+ fatal("can't get local addr", EC_SOFTWARE);
+ }
+
+ syslog(LOG_DEBUG, "connection from %s%s",
+ cd.clienthost,
+ func->preauth ? " preauth'd as postman" : "");
+ } else {
+ /* we're not connected to a internet socket! */
+ func->preauth = 1;
+ strcpy(cd.clienthost, "[unix socket]");
+ syslog(LOG_DEBUG, "lmtp connection preauth'd as postman");
+ }
+
+ /* Setup SASL to go. We need to do this *after* we decide if
+ * we are preauthed or not. */
+ if (sasl_server_new("lmtp", config_servername, NULL, NULL,
+ NULL, (func->preauth ? localauth_override_cb : NULL),
+ 0, &cd.conn) != SASL_OK) {
+ fatal("SASL failed initializing: sasl_server_new()", EC_TEMPFAIL);
+ }
+
+ /* set my allowable security properties */
+ /* ANONYMOUS is silly because we allow that anyway */
+ secflags = SASL_SEC_NOANONYMOUS;
+ if (!config_getswitch(IMAPOPT_ALLOWPLAINTEXT)) {
+ secflags |= SASL_SEC_NOPLAINTEXT;
+ }
+
+ secprops = mysasl_secprops(secflags);
+ sasl_setprop(cd.conn, SASL_SEC_PROPS, secprops);
+
+ if (func->preauth) {
+ cd.authenticated = EXTERNAL_AUTHED; /* we'll allow commands,
+ but we still accept
+ the AUTH command */
+ ssf = 2;
+ auth_id = "postman";
+ sasl_setprop(cd.conn, SASL_SSF_EXTERNAL, &ssf);
+ sasl_setprop(cd.conn, SASL_AUTH_EXTERNAL, auth_id);
+
+ deliver_logfd = telemetry_log(auth_id, pin, pout, 0);
+ } else {
+ if(havelocal) sasl_setprop(cd.conn, SASL_IPLOCALPORT, &localip );
+ if(haveremote) sasl_setprop(cd.conn, SASL_IPREMOTEPORT, &remoteip);
+ }
+
+ prot_printf(pout, "220 %s LMTP Cyrus %s ready\r\n",
+ config_servername,
+ CYRUS_VERSION);
+
+ for (;;) {
+ nextcmd:
+ signals_poll();
+
+ if (!prot_fgets(buf, sizeof(buf), pin)) {
+ const char *err = prot_error(pin);
+
+ if (err != NULL) {
+ prot_printf(pout, "421 4.4.1 bye %s\r\n", err);
+ prot_flush(pout);
+ }
+ goto cleanup;
+ }
+ p = buf + strlen(buf) - 1;
+ if (p >= buf && *p == '\n') *p-- = '\0';
+ if (p >= buf && *p == '\r') *p-- = '\0';
+
+ /* Only allow LHLO/NOOP/QUIT when there is a shutdown file */
+ if (!strchr("LlNnQq", buf[0]) &&
+ shutdown_file(buf, sizeof(buf))) {
+
+ prot_printf(pout, "421 4.3.2 %s\r\n", buf);
+ prot_flush(pout);
+
+ func->shutdown(0);
+ }
+
+ switch (buf[0]) {
+ case 'a':
+ case 'A':
+ if (!strncasecmp(buf, "auth ", 5)) {
+ char mech[128];
+ int sasl_result;
+ const char *user;
+
+ if (cd.authenticated > 0) {
+ prot_printf(pout,
+ "503 5.5.0 already authenticated\r\n");
+ continue;
+ }
+ if (msg->rcpt_num != 0) {
+ prot_printf(pout,
+ "503 5.5.0 AUTH not permitted now\r\n");
+ continue;
+ }
+
+ /* ok, what mechanism ? */
+ p = buf + 5;
+ while ((*p != ' ') && (*p != '\0')) {
+ p++;
+ }
+ if (*p == ' ') {
+ *p = '\0';
+ p++;
+ } else {
+ p = NULL;
+ }
+ strlcpy(mech, buf + 5, sizeof(mech));
+
+ r = saslserver(cd.conn, mech, p, "", "334 ", "",
+ pin, pout, &sasl_result, NULL);
+
+ if (r) {
+ const char *errorstring = NULL;
+
+ switch (r) {
+ case IMAP_SASL_CANCEL:
+ prot_printf(pout,
+ "501 5.5.4 client canceled authentication\r\n");
+ break;
+ case IMAP_SASL_PROTERR:
+ errorstring = prot_error(pin);
+
+ prot_printf(pout,
+ "501 5.5.4 Error reading client response: %s\r\n",
+ errorstring ? errorstring : "");
+ break;
+ default:
+ if (sasl_result == SASL_NOMECH) {
+ prot_printf(pout,
+ "504 Unrecognized authentication type.\r\n");
+ continue;
+ }
+ else {
+ sleep(3);
+
+ if (remoteaddr.ss_family == AF_INET ||
+ remoteaddr.ss_family == AF_INET6) {
+ niflags = NI_NUMERICHOST;
+#ifdef NI_WITHSCOPEID
+ if (remoteaddr.ss_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&remoteaddr,
+ salen, hbuf, sizeof(hbuf),
+ NULL, 0, niflags) != 0)
+ strlcpy(hbuf, "[unknown]", sizeof(hbuf));
+ }
+ else
+ strlcpy(hbuf, "[unix socket]", sizeof(hbuf));
+ syslog(LOG_ERR, "badlogin: %s %s %s",
+ hbuf, mech, sasl_errdetail(cd.conn));
+
+ snmp_increment_args(AUTHENTICATION_NO, 1,
+ VARIABLE_AUTH, hash_simple(mech),
+ VARIABLE_LISTEND);
+
+ prot_printf(pout, "501 5.5.4 %s\r\n",
+ sasl_errstring((r == SASL_NOUSER ?
+ SASL_BADAUTH : r),
+ NULL, NULL));
+ }
+ }
+
+ reset_saslconn(&cd.conn);
+ continue;
+ }
+ r = sasl_getprop(cd.conn, SASL_USERNAME, (const void **) &user);
+ if (r != SASL_OK) {
+ prot_printf(pout, "501 5.5.4 SASL Error\r\n");
+ reset_saslconn(&cd.conn);
+ goto nextcmd;
+ }
+
+ /* Create telemetry log */
+ deliver_logfd = telemetry_log(user, pin, pout, 0);
+
+ /* authenticated successfully! */
+ snmp_increment_args(AUTHENTICATION_YES,1,
+ VARIABLE_AUTH, hash_simple(mech),
+ VARIABLE_LISTEND);
+ syslog(LOG_NOTICE, "login: %s %s %s%s %s",
+ cd.clienthost, user, mech,
+ cd.starttls_done ? "+TLS" : "", "User logged in");
+
+ cd.authenticated = DIDAUTH;
+ prot_printf(pout, "235 Authenticated!\r\n");
+
+ /* set protection layers */
+ prot_setsasl(pin, cd.conn);
+ prot_setsasl(pout, cd.conn);
+ continue;
+ }
+ goto syntaxerr;
+
+ case 'd':
+ case 'D':
+ if (!strcasecmp(buf, "data")) {
+ int delivered = 0;
+ int j;
+
+ if (!msg->rcpt_num) {
+ prot_printf(pout, "503 5.5.1 No recipients\r\n");
+ continue;
+ }
+ /* copy message from input to msg structure */
+ r = savemsg(&cd, func, msg);
+ if (r) {
+ goto rset;
+ }
+
+ if (msg->size > max_msgsize) {
+ prot_printf(pout,
+ "552 5.2.3 Message size (%d) exceeds fixed "
+ "maximum message size (%d)\r\n",
+ msg->size, max_msgsize);
+ continue;
+ }
+
+ snmp_increment(mtaReceivedMessages, 1);
+ snmp_increment(mtaReceivedVolume, roundToK(msg->size));
+ snmp_increment(mtaReceivedRecipients, msg->rcpt_num);
+
+ /* do delivery, report status */
+ r = func->deliver(msg, msg->authuser, msg->authstate);
+ for (j = 0; j < msg->rcpt_num; j++) {
+ if (!msg->rcpt[j]->status) delivered++;
+ send_lmtp_error(pout, msg->rcpt[j]->status);
+ }
+
+ snmp_increment(mtaTransmittedMessages, delivered);
+ snmp_increment(mtaTransmittedVolume,
+ roundToK(delivered * msg->size));
+ goto rset;
+ }
+ goto syntaxerr;
+
+ case 'l':
+ case 'L':
+ if (!strncasecmp(buf, "lhlo ", 5)) {
+ unsigned int mechcount;
+ const char *mechs;
+
+ prot_printf(pout, "250-%s\r\n"
+ "250-8BITMIME\r\n"
+ "250-ENHANCEDSTATUSCODES\r\n"
+ "250-PIPELINING\r\n",
+ config_servername);
+ if (max_msgsize < INT_MAX)
+ prot_printf(pout, "250-SIZE %d\r\n", max_msgsize);
+ else
+ prot_printf(pout, "250-SIZE\r\n");
+ if (tls_enabled() && !cd.starttls_done && !cd.authenticated) {
+ prot_printf(pout, "250-STARTTLS\r\n");
+ }
+ if (cd.authenticated <= NOAUTH &&
+ sasl_listmech(cd.conn, NULL, "AUTH ", " ", "", &mechs,
+ NULL, &mechcount) == SASL_OK &&
+ mechcount > 0) {
+ prot_printf(pout,"250-%s\r\n", mechs);
+ }
+ prot_printf(pout, "250 IGNOREQUOTA\r\n");
+
+ strlcpy(cd.lhlo_param, buf + 5, sizeof(cd.lhlo_param));
+
+ continue;
+ }
+ goto syntaxerr;
+
+ case 'm':
+ case 'M':
+ if (!cd.authenticated) {
+ if (config_getswitch(IMAPOPT_SOFT_NOAUTH)) {
+ prot_printf(pout, "430 Authentication required\r\n");
+ } else {
+ prot_printf(pout, "530 Authentication required\r\n");
+ }
+ continue;
+ }
+
+ if (!strncasecmp(buf, "mail ", 5)) {
+ char *tmp;
+ if (msg->return_path) {
+ prot_printf(pout,
+ "503 5.5.1 Nested MAIL command\r\n");
+ continue;
+ }
+ /* +5 to get past "mail "
+ * +10 to get past "mail from:" */
+ if (strncasecmp(buf+5, "from:", 5) != 0 ||
+ !(msg->return_path = parseaddr(buf+10))) {
+ prot_printf(pout,
+ "501 5.5.4 Syntax error in parameters\r\n");
+ continue;
+ }
+ tmp = buf+10+strlen(msg->return_path);
+
+ /* is any other whitespace allow seperating? */
+ while (*tmp == ' ') {
+ tmp++;
+ switch (*tmp) {
+ case 'a': case 'A':
+ if (strncasecmp(tmp, "auth=", 5) != 0) {
+ goto badparam;
+ }
+ tmp += 5;
+ msg->authuser = parseautheq(&tmp);
+ if (msg->authuser) {
+ msg->authstate = auth_newstate(msg->authuser);
+ } else {
+ /* do we want to bounce mail because of this? */
+ /* i guess not. accept with no auth user */
+ msg->authstate = NULL;
+ }
+ break;
+
+ case 'b': case 'B':
+ if (strncasecmp(tmp, "body=", 5) != 0) {
+ goto badparam;
+ }
+ tmp += 5;
+ /* just verify it's one of
+ body-value ::= "7BIT" / "8BITMIME" */
+ if (!strncasecmp(tmp, "7bit", 4)) {
+ tmp += 4;
+ } else if (!strncasecmp(tmp, "8bitmime", 8)) {
+ tmp += 8;
+ } else {
+ prot_printf(pout,
+ "501 5.5.4 Unrecognized BODY type\r\n");
+ goto nextcmd;
+ }
+ break;
+
+ case 's': case 'S':
+ if (strncasecmp(tmp, "size=", 5) != 0) {
+ goto badparam;
+ }
+ tmp += 5;
+ /* make sure we have a value */
+ if (!isdigit((int) *tmp)) {
+ prot_printf(pout,
+ "501 5.5.2 SIZE requires a value\r\n");
+ goto nextcmd;
+ }
+ msg->size = strtoul(tmp, &p, 10);
+ tmp = p;
+ /* make sure the value is in range */
+ if (errno == ERANGE || msg->size < 0 ||
+ msg->size > max_msgsize) {
+ prot_printf(pout,
+ "552 5.2.3 Message SIZE exceeds fixed "
+ "maximum message size (%d)\r\n",
+ max_msgsize);
+ goto nextcmd;
+ }
+ break;
+
+ default:
+ badparam:
+ prot_printf(pout,
+ "501 5.5.4 Unrecognized parameters\r\n");
+ goto nextcmd;
+ }
+ }
+ if (*tmp != '\0') {
+ prot_printf(pout,
+ "501 5.5.4 Syntax error in parameters\r\n");
+ continue;
+ }
+
+ prot_printf(pout, "250 2.1.0 ok\r\n");
+ continue;
+ }
+ goto syntaxerr;
+
+ case 'n':
+ case 'N':
+ if (!strcasecmp(buf, "noop")) {
+ prot_printf(pout,"250 2.0.0 ok\r\n");
+ continue;
+ }
+ goto syntaxerr;
+
+ case 'q':
+ case 'Q':
+ if (!strcasecmp(buf, "quit")) {
+ prot_printf(pout,"221 2.0.0 bye\r\n");
+ prot_flush(pout);
+ goto cleanup;
+ }
+ goto syntaxerr;
+
+ case 'r':
+ case 'R':
+ if (!strncasecmp(buf, "rcpt ", 5)) {
+ char *rcpt = NULL;
+ int ignorequota = 0;
+ char *tmp;
+
+ if (!msg->return_path) {
+ prot_printf(pout, "503 5.5.1 Need MAIL command\r\n");
+ continue;
+ }
+ if (!(msg->rcpt_num % RCPT_GROW)) { /* time to alloc more */
+ msg->rcpt = (address_data_t **)
+ xrealloc(msg->rcpt, (msg->rcpt_num + RCPT_GROW + 1) *
+ sizeof(address_data_t *));
+ }
+ /* +5 to get past "rcpt "
+ * +8 to get past "rcpt to:" */
+ if (strncasecmp(buf+5, "to:", 3) != 0 ||
+ !(rcpt = parseaddr(buf+8))) {
+ prot_printf(pout,
+ "501 5.5.4 Syntax error in parameters\r\n");
+ continue;
+ }
+
+ tmp = buf+8+strlen(rcpt);
+ while (*tmp == ' ') {
+ tmp++;
+ switch (*tmp) {
+ case 'i': case 'I':
+ if (strncasecmp(tmp, "ignorequota", 12) != 0) {
+ goto badrparam;
+ }
+ tmp += 12;
+ ignorequota = 1;
+ break;
+
+ default:
+ badrparam:
+ prot_printf(pout,
+ "501 5.5.4 Unrecognized parameters\r\n");
+ goto nextcmd;
+ }
+ }
+ if (*tmp != '\0') {
+ prot_printf(pout,
+ "501 5.5.4 Syntax error in parameters\r\n");
+ continue;
+ }
+
+ r = process_recipient(rcpt,
+ func->namespace,
+ ignorequota,
+ func->verify_user,
+ msg);
+ if (rcpt) free(rcpt); /* malloc'd in parseaddr() */
+ if (r) {
+ send_lmtp_error(pout, r);
+ continue;
+ }
+ msg->rcpt_num++;
+ msg->rcpt[msg->rcpt_num] = NULL;
+ prot_printf(pout, "250 2.1.5 ok\r\n");
+ continue;
+ }
+ else if (!strcasecmp(buf, "rset")) {
+ prot_printf(pout, "250 2.0.0 ok\r\n");
+
+ rset:
+ if (msg) msg_free(msg);
+ msg_new(&msg);
+
+ continue;
+ }
+ goto syntaxerr;
+
+ case 's':
+ case 'S':
+#ifdef HAVE_SSL
+ if (!strcasecmp(buf, "starttls") && tls_enabled() &&
+ !func->preauth) { /* don't need TLS for preauth'd connect */
+ int *layerp;
+ sasl_ssf_t ssf;
+ char *auth_id;
+
+ /* SASL and openssl have different ideas
+ about whether ssf is signed */
+ layerp = &ssf;
+
+ if (cd.starttls_done == 1) {
+ prot_printf(pout, "454 4.3.3 %s\r\n",
+ "Already successfully executed STARTTLS");
+ continue;
+ }
+ if (msg->rcpt_num != 0) {
+ prot_printf(pout,
+ "503 5.5.0 STARTTLS not permitted now\r\n");
+ continue;
+ }
+
+ r=tls_init_serverengine("lmtp",
+ 5, /* depth to verify */
+ 1, /* can client auth? */
+ 1); /* TLS only? */
+
+ if (r == -1) {
+
+ syslog(LOG_ERR, "[lmtpd] error initializing TLS");
+
+ prot_printf(pout, "454 4.3.3 %s\r\n", "Error initializing TLS");
+ continue;
+ }
+
+ prot_printf(pout, "220 %s\r\n", "Begin TLS negotiation now");
+ /* must flush our buffers before starting tls */
+ prot_flush(pout);
+
+ r=tls_start_servertls(0, /* read */
+ 1, /* write */
+ layerp,
+ &auth_id,
+ &(cd.tls_conn));
+
+ /* if error */
+ if (r==-1) {
+ prot_printf(pout, "454 4.3.3 STARTTLS failed\r\n");
+ syslog(LOG_NOTICE, "[lmtpd] STARTTLS failed: %s", cd.clienthost);
+ continue;
+ }
+
+ /* tell SASL about the negotiated layer */
+ r=sasl_setprop(cd.conn, SASL_SSF_EXTERNAL, &ssf);
+ if (r != SASL_OK)
+ fatal("sasl_setprop(SASL_SSF_EXTERNAL) failed: STARTTLS",
+ EC_TEMPFAIL);
+ saslprops.ssf = ssf;
+
+ r=sasl_setprop(cd.conn, SASL_AUTH_EXTERNAL, auth_id);
+ if (r != SASL_OK)
+ fatal("sasl_setprop(SASL_AUTH_EXTERNAL) failed: STARTTLS",
+ EC_TEMPFAIL);
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ if(auth_id)
+ saslprops.authid = xstrdup(auth_id);
+
+ /* tell the prot layer about our new layers */
+ prot_settls(pin, cd.tls_conn);
+ prot_settls(pout, cd.tls_conn);
+
+ cd.starttls_done = 1;
+
+ continue;
+ }
+#endif /* HAVE_SSL*/
+ goto syntaxerr;
+
+ case 'v':
+ case 'V':
+ if (!strncasecmp(buf, "vrfy ", 5)) {
+ prot_printf(pout,
+ "252 2.3.3 try RCPT to attempt delivery\r\n");
+ continue;
+ }
+ goto syntaxerr;
+
+ default:
+ syntaxerr:
+ prot_printf(pout, "500 5.5.2 Syntax error\r\n");
+ continue;
+ }
+ }
+
+ cleanup:
+ /* free resources and return; this connection has been closed */
+
+ if (msg) msg_free(msg);
+
+ /* security */
+ if (cd.conn) sasl_dispose(&cd.conn);
+
+ cd.starttls_done = 0;
+#ifdef HAVE_SSL
+ if (cd.tls_conn) {
+ tls_reset_servertls(&cd.tls_conn);
+ cd.tls_conn = NULL;
+ }
+#endif
+}
+
+/************** client-side LMTP ****************/
+
+#define ISGOOD(r) (((r) / 100) == 2)
+#define TEMPFAIL(r) (((r) / 100) == 4)
+#define PERMFAIL(r) (((r) / 100) == 5)
+#define ISCONT(s) (s && (s[3] == '-'))
+
+static int revconvert_lmtp(const char *code)
+{
+ int c = atoi(code);
+ switch (c) {
+ case 250:
+ case 251:
+ return 0;
+ case 451:
+ if (code[4] == '4' && code[6] == '3') {
+ if (code[8] == '0') {
+ return IMAP_IOERROR;
+ } else if (code[8] == '1') {
+ return IMAP_NOSPACE;
+ } else {
+ return IMAP_IOERROR;
+ }
+ }
+ else if (code[4] == '4' && code [6] == '4') {
+ return IMAP_SERVER_UNAVAILABLE;
+ }
+ else {
+ return IMAP_IOERROR;
+ }
+ case 452:
+ return IMAP_QUOTA_EXCEEDED;
+ case 550:
+ if (code[4] == '5' && code[6] == '7') {
+ return IMAP_PERMISSION_DENIED;
+ } else if (code[4] == '5' && code[6] == '1') {
+ return IMAP_MAILBOX_NONEXISTENT;
+ }
+ return IMAP_PERMISSION_DENIED;
+ case 552:
+ if (code[6] == '2') {
+ return IMAP_QUOTA_EXCEEDED;
+ } else if (code[6] == '3') {
+ return IMAP_MESSAGE_TOO_LARGE;
+ }
+ return IMAP_QUOTA_EXCEEDED;
+ case 554:
+ return IMAP_MESSAGE_BADHEADER; /* sigh, pick one */
+
+ default:
+ if (ISGOOD(c)) return 0;
+ else if (TEMPFAIL(c)) return IMAP_AGAIN;
+ else if (PERMFAIL(c)) return IMAP_PROTOCOL_ERROR;
+ else return IMAP_AGAIN;
+ }
+}
+
+static int ask_code(const char *s)
+{
+ int ret = 0;
+
+ if (s==NULL) return -1;
+
+ if (strlen(s) < 3) return -1;
+
+ /* check to make sure 0-2 are digits */
+ if ((isdigit((int) s[0])==0) ||
+ (isdigit((int) s[1])==0) ||
+ (isdigit((int) s[2])==0))
+ {
+ return -1;
+ }
+
+ ret = ((s[0]-'0')*100)+((s[1]-'0')*10)+(s[2]-'0');
+
+ return ret;
+}
+
+/* getlastresp reads from 'pin' until we get an LMTP that isn't a continuation.
+ it puts it in 'buf', which must be at least 'len' big.
+
+ '*code' will contain the integer three digit response code.
+ if a read failed, '*code == 400', a temporary failure.
+
+ returns an IMAP error code. */
+static int getlastresp(char *buf, int len, int *code, struct protstream *pin)
+{
+ do {
+ if (!prot_fgets(buf, len, pin)) {
+ *code = 400;
+ return IMAP_SERVER_UNAVAILABLE;
+ }
+ } while (ISCONT(buf));
+ *code = ask_code(buf);
+
+ return 0;
+}
+
+static void pushmsg(struct protstream *in, struct protstream *out,
+ int isdotstuffed)
+{
+ char buf[8192], *p;
+ int lastline_hadendline = 1;
+
+ /* -2: Might need room to add a \r\n\0 set */
+ while (prot_fgets(buf, sizeof(buf)-2, in)) {
+ /* dot stuff */
+ if (!isdotstuffed && (lastline_hadendline == 1) && (buf[0]=='.')) {
+ prot_putc('.', out);
+ }
+ p = buf + strlen(buf) - 1;
+ if (*p == '\n') {
+ if (p == buf || p[-1] != '\r') {
+ p[0] = '\r';
+ p[1] = '\n';
+ p[2] = '\0';
+ }
+ lastline_hadendline = 1;
+ }
+ else if (*p == '\r') {
+ if (buf[0] == '\r' && buf[1] == '\0') {
+ /* The message contained \r\0, and fgets is confusing us.
+ XXX ignored
+ */
+ lastline_hadendline = 1;
+ } else {
+ /*
+ * We were unlucky enough to get a CR just before we ran
+ * out of buffer--put it back.
+ */
+ prot_ungetc('\r', in);
+ *p = '\0';
+ lastline_hadendline = 0;
+ }
+ } else {
+ lastline_hadendline = 0;
+ }
+
+ /* Remove any lone CR characters */
+ while ((p = strchr(buf, '\r')) && p[1] != '\n') {
+ /* Src/Target overlap, use memmove */
+ /* strlen(p) will result in copying the NUL byte as well */
+ memmove(p, p+1, strlen(p));
+ }
+
+ prot_write(out, buf, strlen(buf));
+ }
+
+ if (!isdotstuffed) {
+ /* signify end of message */
+ prot_printf(out, "\r\n.\r\n");
+ }
+}
+
+int lmtp_runtxn(struct backend *conn, struct lmtp_txn *txn)
+{
+ int j, code, r = 0;
+ char buf[8192];
+ int onegood;
+
+ assert(conn && txn);
+ /* pipelining v. no pipelining? */
+
+ /* here's the straightforward non-pipelining version */
+
+ /* rset */
+ prot_printf(conn->out, "RSET\r\n");
+ r = getlastresp(buf, sizeof(buf)-1, &code, conn->in);
+ if (!ISGOOD(code)) {
+ goto failall;
+ }
+
+ /* mail from */
+ if (!txn->from) {
+ prot_printf(conn->out, "MAIL FROM:<>");
+ } else if (txn->from[0] == '<') {
+ prot_printf(conn->out, "MAIL FROM:%s", txn->from);
+ } else {
+ prot_printf(conn->out, "MAIL FROM:<%s>", txn->from);
+ }
+ if (CAPA(conn, CAPA_AUTH)) {
+ prot_printf(conn->out, " AUTH=%s",
+ txn->auth && txn->auth[0] ? txn->auth : "<>");
+ }
+ prot_printf(conn->out, "\r\n");
+ r = getlastresp(buf, sizeof(buf)-1, &code, conn->in);
+ if (!ISGOOD(code)) {
+ goto failall;
+ }
+
+ /* rcpt to */
+ onegood = 0;
+ for (j = 0; j < txn->rcpt_num; j++) {
+ prot_printf(conn->out, "RCPT TO:<%s>", txn->rcpt[j].addr);
+ if (txn->rcpt[j].ignorequota && CAPA(conn, CAPA_IGNOREQUOTA)) {
+ prot_printf(conn->out, " IGNOREQUOTA");
+ }
+ prot_printf(conn->out, "\r\n");
+ r = getlastresp(buf, sizeof(buf)-1, &code, conn->in);
+ if (r) {
+ goto failall;
+ }
+ txn->rcpt[j].r = revconvert_lmtp(buf);
+ if (ISGOOD(code)) {
+ onegood = 1;
+ txn->rcpt[j].result = RCPT_GOOD;
+ } else if (TEMPFAIL(code)) {
+ txn->rcpt[j].result = RCPT_TEMPFAIL;
+ } else if (PERMFAIL(code)) {
+ if(txn->tempfail_unknown_mailbox &&
+ txn->rcpt[j].r == IMAP_MAILBOX_NONEXISTENT) {
+ /* If there is a nonexistant error, we have been told
+ * to mask it (e.g. proxy got out-of-date mupdate data) */
+ txn->rcpt[j].result = RCPT_TEMPFAIL;
+ txn->rcpt[j].r = IMAP_AGAIN;
+ } else {
+ txn->rcpt[j].result = RCPT_PERMFAIL;
+ }
+ } else {
+ /* yikes?!? */
+ code = 400;
+ goto failall;
+ }
+ }
+ if (!onegood) {
+ /* all recipients failed! */
+ return 0;
+ }
+
+ /* data */
+ prot_printf(conn->out, "DATA\r\n");
+ r = getlastresp(buf, sizeof(buf)-1, &code, conn->in);
+ if (r) {
+ goto failall;
+ }
+ if (code != 354) {
+ /* erg? */
+ if (ISGOOD(code)) code = 400;
+ r = IMAP_PROTOCOL_ERROR;
+ goto failall;
+ }
+
+ /* send the data, dot-stuffing as needed */
+ pushmsg(txn->data, conn->out, txn->isdotstuffed);
+
+ /* read the response codes, one for each accepted RCPT TO */
+ for (j = 0; j < txn->rcpt_num; j++) {
+ if (txn->rcpt[j].result == RCPT_GOOD) {
+ /* expecting a status code for this recipient */
+ r = getlastresp(buf, sizeof(buf)-1, &code, conn->in);
+ if (r) {
+ /* technically, some recipients might've succeeded here,
+ but we'll be paranoid */
+ goto failall;
+ }
+ txn->rcpt[j].r = revconvert_lmtp(buf);
+ if (ISGOOD(code)) {
+ onegood = 1;
+ txn->rcpt[j].result = RCPT_GOOD;
+ } else if (TEMPFAIL(code)) {
+ txn->rcpt[j].result = RCPT_TEMPFAIL;
+ } else if (PERMFAIL(code)) {
+ txn->rcpt[j].result = RCPT_PERMFAIL;
+ } else {
+ /* yikes?!? */
+ txn->rcpt[j].result = RCPT_TEMPFAIL;
+ }
+ }
+ }
+
+ /* done with txn */
+ return 0;
+
+ failall:
+ /* something fatal happened during the transaction; we should assign
+ 'code' to all recipients and return */
+ for (j = 0; j < txn->rcpt_num; j++) {
+ if (ISGOOD(code)) {
+ txn->rcpt[j].r = 0;
+ txn->rcpt[j].result = RCPT_GOOD;
+ } else if (TEMPFAIL(code)) {
+ txn->rcpt[j].r = IMAP_AGAIN;
+ txn->rcpt[j].result = RCPT_TEMPFAIL;
+ } else if (PERMFAIL(code)) {
+ txn->rcpt[j].r = IMAP_PROTOCOL_ERROR;
+ txn->rcpt[j].result = RCPT_PERMFAIL;
+ } else {
+ /* code should have been a valid number */
+ abort();
+ }
+ }
+
+ /* return overall error code already set */
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpengine.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,163 @@
+/* lmtpengine.h: lmtp protocol engine interface
+ * $Id: lmtpengine.h,v 1.18.2.5 2004/04/17 18:47:30 ken3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef LMTPENGINE_H
+#define LMTPENGINE_H
+
+/***************** server-side LMTP *******************/
+
+#include "spool.h"
+#include "mboxname.h"
+
+typedef struct message_data message_data_t;
+typedef struct address_data address_data_t;
+
+struct message_data {
+ struct protstream *data; /* message in temp file */
+ FILE *f; /* FILE * corresponding */
+
+ char *id; /* message id */
+ int size; /* size of message */
+
+ /* msg envelope */
+ char *return_path; /* where to return message */
+ address_data_t **rcpt; /* to recipients of this message */
+ int rcpt_num; /* number of recipients */
+
+ /* auth state */
+ char *authuser;
+ struct auth_state *authstate;
+
+ void *rock;
+
+ hdrcache_t hdrcache;
+};
+
+/* return the corresponding header */
+const char **msg_getheader(message_data_t *m, const char *phead);
+
+/* return message size */
+int msg_getsize(message_data_t *m);
+
+/* return # of recipients */
+int msg_getnumrcpt(message_data_t *m);
+
+/* return delivery destination of recipient 'rcpt_num' */
+void msg_getrcpt(message_data_t *m, int rcpt_num,
+ const char **user, const char **domain, const char **mailbox);
+
+/* return entire recipient of 'rcpt_num' */
+const char *msg_getrcptall(message_data_t *m, int rcpt_num);
+
+/* return ignorequota flag of 'rcpt_num' */
+int msg_getrcpt_ignorequota(message_data_t *m, int rcpt_num);
+
+/* set a recipient status; 'r' should be an IMAP error code that will be
+ translated into an LMTP status code */
+void msg_setrcpt_status(message_data_t *m, int rcpt_num, int r);
+
+void *msg_getrock(message_data_t *m);
+void msg_setrock(message_data_t *m, void *rock);
+
+struct addheader {
+ const char *name;
+ const char *body;
+};
+
+struct lmtp_func {
+ int (*deliver)(message_data_t *m,
+ char *authuser, struct auth_state *authstate);
+ int (*verify_user)(const char *user, const char *domain, char *mailbox,
+ long quotacheck, /* user must have this much quota left
+ (-1 means don't care about quota) */
+ struct auth_state *authstate);
+ void (*shutdown)(int code);
+ FILE *(*spoolfile)(message_data_t *m);
+ void (*removespool)(message_data_t *m);
+ struct namespace *namespace; /* mailbox namespace that we're working in */
+ struct addheader *addheaders; /* add these headers to all messages */
+ int addretpath; /* should i add a return-path header? */
+ int preauth; /* preauth connection? */
+};
+
+/* run LMTP on 'pin' and 'pout', doing callbacks to 'func' where appropriate
+ *
+ * will call signals_poll() on occasion.
+ * will return when connection closes.
+ */
+void lmtpmode(struct lmtp_func *func,
+ struct protstream *pin,
+ struct protstream *pout,
+ int fd);
+
+/************** client-side LMTP ****************/
+
+#include "backend.h"
+
+struct lmtp_txn {
+ const char *from;
+ const char *auth;
+ int isdotstuffed; /* 1 if 'data' is a dotstuffed stream
+ (including end-of-file \r\n.\r\n) */
+ int tempfail_unknown_mailbox; /* 1 if '550 5.1.1 unknown mailbox'
+ * should be masked as a temporary failure */
+ struct protstream *data;
+ int rcpt_num;
+ struct lmtp_rcpt {
+ char *addr;
+ int ignorequota;
+ enum {
+ RCPT_GOOD,
+ RCPT_TEMPFAIL,
+ RCPT_PERMFAIL
+ } result;
+ int r; /* if non-zero,
+ a more descriptive error code */
+ } rcpt[1];
+};
+
+#define LMTP_TXN_ALLOC(n) (xmalloc(sizeof(struct lmtp_txn) + \
+ ((n) * (sizeof(struct lmtp_rcpt)))))
+
+int lmtp_runtxn(struct backend *conn, struct lmtp_txn *txn);
+
+#endif /* LMTPENGINE_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,521 @@
+
+/* lmtpstats.c -- automatically generated from lmtpstats.snmp by snmpgen */
+
+
+
+#ifdef USING_SNMPGEN
+
+
+
+/* We disable this code for now since it doesn't actually work and wastes
+
+ * resources. At some point in time, we'll make it work again as it would
+
+ * be useful to gather aggregate statistics on what commands are being used
+
+ * so we can better tune the server. This change closes bug #1191.
+
+ * New bug 1267 opened to re-enable the feature.
+
+ */
+
+
+
+#ifdef HAVE_UNISTD_H
+
+#include <unistd.h>
+
+#endif
+
+#include <stdio.h>
+
+#include <stdlib.h>
+
+#include <errno.h>
+
+#include <string.h>
+
+#include <sys/types.h>
+
+#include <sys/socket.h>
+
+#include <sys/un.h>
+
+#include <fcntl.h>
+
+#include <stdarg.h>
+
+
+
+#include "index.h"
+
+#include "lmtpstats.h"
+
+
+
+extern int close(int);
+
+
+
+int variable_value[2+1];
+
+int variable_tmpvalue[2+1];
+
+
+
+int varvalue(lmtpstats_variable_t var)
+
+{
+
+ if (variable_tmpvalue[var]!=-1)
+
+ return variable_tmpvalue[var];
+
+
+
+ return variable_value[var];
+
+}
+
+
+
+const char *snmp_getdescription(lmtpstats_t evt)
+
+{
+
+ switch (evt) {
+
+ case mtaSuccessfulConvertedMessages: return "Messages converted because of 8bit foo";
+ case AUTHENTICATION_YES: return "Successful authentication of given mechanism";
+ case SIEVE_FILEINTO: return "sieve fileintos";
+ case mtaReceivedVolume: return "Kbytes received";
+ case SIEVE_VACATION_TOTAL: return "vacation messages considered";
+ case SIEVE_MESSAGES_PROCESSED: return "Number of messages processed by Sieve scripts";
+ case SIEVE_KEEP: return "sieve messages kept";
+ case SIEVE_DISCARD: return "sieve discards";
+ case SERVER_NAME_VERSION: return "Name and version string for server";
+ case AUTHENTICATION_NO: return "Failed authentication of given mechanism";
+ case SIEVE_VACATION_REPLIED: return "vacation messages sent";
+ case SIEVE_REJECT: return "sieve rejects";
+ case TOTAL_CONNECTIONS: return "Count of the total number of connections since the beginning of time";
+ case ACTIVE_CONNECTIONS: return "Count of the active number of connections";
+ case SERVER_UPTIME: return "Amount of time server has been running";
+ case mtaTransmittedMessages: return "Messages stored to disk";
+ case SIEVE_REDIRECT: return "sieve redirects";
+ case mtaTransmittedVolume: return "Kbytes stored to disk";
+ case SIEVE_NOTIFY: return "sieve notifications sent";
+ case mtaReceivedMessages: return "Messages we've received";
+ case mtaReceivedRecipients: return "Recipients accepted";
+
+ }
+
+ return NULL;
+
+}
+
+
+
+const char *snmp_getoid(const char *name __attribute__((unused)),
+
+ lmtpstats_t evt, char *buf, int buflen)
+
+{
+
+ switch (evt) {
+
+ case mtaSuccessfulConvertedMessages: snprintf(buf,buflen,"1.3.6.1.2.1.28.1.%d.10",varvalue(VARIABLE_MTA)); return buf;
+ case AUTHENTICATION_YES: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.2.2.%d.0",varvalue(VARIABLE_AUTH)); return buf;
+ case SIEVE_FILEINTO: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.4"); return buf;
+ case mtaReceivedVolume: snprintf(buf,buflen,"1.3.6.1.2.1.28.1.%d.4",varvalue(VARIABLE_MTA)); return buf;
+ case SIEVE_VACATION_TOTAL: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.8"); return buf;
+ case SIEVE_MESSAGES_PROCESSED: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.0"); return buf;
+ case SIEVE_KEEP: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.5"); return buf;
+ case SIEVE_DISCARD: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.2"); return buf;
+ case SERVER_NAME_VERSION: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.2.3.0"); return buf;
+ case AUTHENTICATION_NO: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.2.2.%d.1",varvalue(VARIABLE_AUTH)); return buf;
+ case SIEVE_VACATION_REPLIED: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.7"); return buf;
+ case SIEVE_REJECT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.3"); return buf;
+ case TOTAL_CONNECTIONS: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.2.1.1"); return buf;
+ case ACTIVE_CONNECTIONS: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.2.1.2"); return buf;
+ case SERVER_UPTIME: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.2.3.1"); return buf;
+ case mtaTransmittedMessages: snprintf(buf,buflen,"1.3.6.1.2.1.28.1.%d.3",varvalue(VARIABLE_MTA)); return buf;
+ case SIEVE_REDIRECT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.1"); return buf;
+ case mtaTransmittedVolume: snprintf(buf,buflen,"1.3.6.1.2.1.28.1.%d.6",varvalue(VARIABLE_MTA)); return buf;
+ case SIEVE_NOTIFY: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.3.4.6"); return buf;
+ case mtaReceivedMessages: snprintf(buf,buflen,"1.3.6.1.2.1.28.1.%d.1",varvalue(VARIABLE_MTA)); return buf;
+ case mtaReceivedRecipients: snprintf(buf,buflen,"1.3.6.1.2.1.28.1.%d.7",varvalue(VARIABLE_MTA)); return buf;
+
+ }
+
+ return NULL;
+
+}
+
+
+
+#define SOCK_PATH "/tmp/.snmp_door"
+
+
+
+static int mysock = -1;
+
+static struct sockaddr_un remote;
+
+static int sockaddr_len = 0;
+
+
+
+static void snmp_send(char *str)
+
+{
+
+ if (mysock == -1) return;
+
+
+
+ if (sendto(mysock, str, strlen(str), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return;
+
+ }
+
+
+
+ return;
+
+}
+
+
+
+int snmp_connect(void)
+
+{
+
+ int s;
+
+ int fdflags;
+
+ int lup;
+
+
+
+ if ((s = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ for (lup=0;lup < 2+1; lup++)
+
+ variable_tmpvalue[lup] = -1;
+
+
+
+ remote.sun_family = AF_UNIX;
+
+ strlcpy(remote.sun_path, SOCK_PATH, sizeof(remote.sun_path));
+
+ sockaddr_len = strlen(remote.sun_path) + sizeof(remote.sun_family);
+
+
+
+ /* put us in non-blocking mode */
+
+ fdflags = fcntl(s, F_GETFD, 0);
+
+ if (fdflags != -1) fdflags = fcntl(s, F_SETFL, O_NONBLOCK | fdflags);
+
+ if (fdflags == -1) { close(s); return -1; }
+
+
+
+ mysock = s;
+
+ snmp_send("R 1.3.6.1.4.1.3.2.2.3.2.1\n");
+ snmp_send("R 1.3.6.1.4.1.3.2.2.3.2.2\n");
+ snmp_send("R 1.3.6.1.4.1.3.2.2.3.2.3\n");
+ snmp_send("R 1.3.6.1.2.1.28.1\n");
+ snmp_send("R 1.3.6.1.4.1.3.2.2.3.3.4\n");
+
+ return 0;
+
+}
+
+
+
+int snmp_close(void)
+
+{
+
+ if (mysock > -1)
+
+ close(mysock);
+
+
+
+ return 0;
+
+}
+
+
+
+int snmp_increment_args(lmtpstats_t cmd, int incr, ...)
+
+{
+
+ char tosend[256]; /* xxx UDP max size??? */
+
+ char buf[256];
+
+
+
+ va_list ap; /* varargs thing */
+
+ lmtpstats_variable_t vval;
+
+ int ival;
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ va_start(ap, incr);
+
+
+
+ do {
+
+ vval = va_arg(ap, lmtpstats_variable_t); /* get the next arg */
+
+
+
+ if (vval!=VARIABLE_LISTEND)
+
+ {
+
+ ival = va_arg(ap, int); /* get the next arg */
+
+ variable_tmpvalue[vval] = ival;
+
+ }
+
+
+
+ } while ( vval != VARIABLE_LISTEND);
+
+
+
+ va_end(ap);
+
+
+
+ snprintf(tosend, sizeof(tosend),"C %s %d\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), incr);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ /* set tmp variables back */
+
+ va_start(ap, incr);
+
+
+
+ do {
+
+ vval = va_arg(ap, lmtpstats_variable_t); /* get the next arg */
+
+
+
+ if (vval!=VARIABLE_LISTEND)
+
+ {
+
+ ival = va_arg(ap, int); /* get the next arg */
+
+ variable_tmpvalue[vval] = -1;
+
+ }
+
+
+
+ } while ( vval != VARIABLE_LISTEND);
+
+
+
+ va_end(ap);
+
+
+
+ return 0;
+
+}
+
+
+
+int snmp_increment(lmtpstats_t cmd, int incr)
+
+{
+
+ char tosend[256]; /* xxx UDP max size??? */
+
+ char buf[256];
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ snprintf(tosend, sizeof(tosend),"C %s %d\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), incr);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ return 0;
+
+}
+
+
+
+int snmp_set(lmtpstats_t cmd, int value)
+
+{
+
+ char tosend[256];
+
+ char buf[256];
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ snprintf(tosend, sizeof(tosend),"I %s %d\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), value);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ return 1;
+
+}
+
+
+
+int snmp_set_str(lmtpstats_t cmd, char *value)
+
+{
+
+ char tosend[256];
+
+ char buf[256];
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ snprintf(tosend, sizeof(tosend),"S %s %s\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), value);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ return 1;
+
+}
+
+
+
+int snmp_set_time(lmtpstats_t cmd, time_t t)
+
+{
+
+ char tosend[256];
+
+ char buf[256];
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ snprintf(tosend, sizeof(tosend),"T %s %lu\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), t);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ return 1;
+
+}
+
+
+
+/* should use SNMPDEFINE's as parameter */
+
+int snmp_set_oid(lmtpstats_t cmd, char *str)
+
+{
+
+ return snmp_set_str(cmd,str);
+
+}
+
+
+
+void snmp_setvariable(lmtpstats_variable_t name, int value)
+
+{
+
+ variable_value[name] = value;
+
+}
+
+
+
+#endif
+
+
+
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,160 @@
+
+/* lmtpstats.h -- statistics push interface
+
+ * generated automatically from lmtpstats.snmp by snmpgen
+
+ *
+
+ * Copyright 2000 Carnegie Mellon University
+
+ *
+
+ * No warranty, yadda yadda
+
+ */
+
+
+
+#ifndef lmtpstats_H
+
+#define lmtpstats_H
+
+
+
+#define SNMPDEFINE_mib2 "1.3.6.1.2.1"
+#define SNMPDEFINE_cmulmtp "1.3.6.1.4.1.3.2.2.3.2"
+#define SNMPDEFINE_mtamib "1.3.6.1.2.1.28"
+#define SNMPDEFINE_cmutree "1.3.6.1.4.1.3.2.2.3"
+#define SNMPDEFINE_cmusieve "1.3.6.1.4.1.3.2.2.3.3"
+#define SNMPDEFINE_mgmt "1.3.6.1.2"
+
+
+
+#ifndef USING_SNMPGEN
+
+
+
+#define snmp_connect()
+
+#define snmp_close()
+
+#define snmp_increment(a, b)
+
+#define snmp_increment_args(a, b, c, d, e)
+
+#define snmp_set(a, b)
+
+#define snmp_set_str(a, b)
+
+#define snmp_set_oid(a, b)
+
+#define snmp_set_time(a, b)
+
+#define snmp_getdescription(a)
+
+#define snmp_getoid(a, b, c, d)
+
+#define snmp_setvariable(a, b)
+
+
+
+typedef void lmtpstats_t;
+
+
+
+#else
+
+
+
+typedef enum {
+
+ mtaSuccessfulConvertedMessages,
+ AUTHENTICATION_YES,
+ SIEVE_FILEINTO,
+ mtaReceivedVolume,
+ SIEVE_VACATION_TOTAL,
+ SIEVE_MESSAGES_PROCESSED,
+ SIEVE_KEEP,
+ SIEVE_DISCARD,
+ SERVER_NAME_VERSION,
+ AUTHENTICATION_NO,
+ SIEVE_VACATION_REPLIED,
+ SIEVE_REJECT,
+ TOTAL_CONNECTIONS,
+ ACTIVE_CONNECTIONS,
+ SERVER_UPTIME,
+ mtaTransmittedMessages,
+ SIEVE_REDIRECT,
+ mtaTransmittedVolume,
+ SIEVE_NOTIFY,
+ mtaReceivedMessages,
+ mtaReceivedRecipients
+} lmtpstats_t;
+
+
+
+typedef enum {
+
+ VARIABLE_LISTEND,
+ VARIABLE_AUTH,
+ VARIABLE_MTA
+
+
+} lmtpstats_variable_t;
+
+
+
+int snmp_connect(void);
+
+
+
+int snmp_close(void);
+
+
+
+/* only valid on counters */
+
+int snmp_increment(lmtpstats_t cmd, int);
+
+int snmp_increment_args(lmtpstats_t cmd, int incr, ...);
+
+
+
+/* only valid on values */
+
+int snmp_set(lmtpstats_t cmd, int);
+
+
+
+int snmp_set_str(lmtpstats_t cmd, char *value);
+
+
+
+int snmp_set_oid(lmtpstats_t cmd, char *str);
+
+
+
+int snmp_set_time(lmtpstats_t cmd, time_t t);
+
+
+
+const char *snmp_getdescription(lmtpstats_t cmd);
+
+
+
+const char *snmp_getoid(const char *name, lmtpstats_t cmd, char* buf, int buflen);
+
+
+
+void snmp_setvariable(lmtpstats_variable_t, int);
+
+
+
+#endif /* USING_SNMPGEN */
+
+
+
+#endif /* lmtpstats_H */
+
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.snmp
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.snmp?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.snmp (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/lmtpstats.snmp Sat Aug 26 02:00:13 2006
@@ -1,0 +1,112 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+# Count number of times command was executed
+#
+
+define mgmt 1.3.6.1.2
+define mib2 [mgmt].1
+define mtamib [mib2].28
+
+define cmutree 1.3.6.1.4.1.3.2.2.3
+define cmulmtp [cmutree].2
+define cmusieve [cmutree].3
+
+# 'C' means counter
+# 'auto' means just pick any number you want
+
+BASE [cmulmtp].1
+
+# Connections
+
+C,TOTAL_CONNECTIONS,"Count of the total number of connections since the beginning of time", 1
+C,ACTIVE_CONNECTIONS,"Count of the active number of connections", 2
+
+#
+# Authentication stats
+#
+
+var AUTH
+
+BASE [cmulmtp].2.{AUTH}
+
+C,AUTHENTICATION_YES,"Successful authentication of given mechanism",auto
+C,AUTHENTICATION_NO, "Failed authentication of given mechanism", auto
+
+#
+# General information
+#
+
+BASE [cmulmtp].3
+
+S,SERVER_NAME_VERSION,"Name and version string for server",auto
+T,SERVER_UPTIME,"Amount of time server has been running",auto
+
+#
+# Message stats
+#
+
+var MTA
+
+BASE [mtamib].1.{MTA}
+
+C,mtaReceivedMessages ,"Messages we've received",1
+C,mtaTransmittedMessages ,"Messages stored to disk",3
+C,mtaReceivedVolume ,"Kbytes received",4
+C,mtaTransmittedVolume ,"Kbytes stored to disk",6
+C,mtaReceivedRecipients ,"Recipients accepted",7
+C,mtaSuccessfulConvertedMessages,"Messages converted because of 8bit foo",10
+
+#
+# Sieve stats
+#
+
+BASE [cmusieve].4
+
+C,SIEVE_MESSAGES_PROCESSED,"Number of messages processed by Sieve scripts",auto
+
+C,SIEVE_REDIRECT ,"sieve redirects",auto
+C,SIEVE_DISCARD ,"sieve discards",auto
+C,SIEVE_REJECT ,"sieve rejects",auto
+C,SIEVE_FILEINTO ,"sieve fileintos",auto
+C,SIEVE_KEEP ,"sieve messages kept",auto
+C,SIEVE_NOTIFY ,"sieve notifications sent",auto
+C,SIEVE_VACATION_REPLIED,"vacation messages sent",auto
+C,SIEVE_VACATION_TOTAL ,"vacation messages considered",auto
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3333 @@
+/* mailbox.c -- Mailbox manipulation routines
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: mailbox.c,v 1.147.2.36 2006/06/02 18:55:06 murch Exp $
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+
+#include "acl.h"
+#include "assert.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "imap_err.h"
+#include "index.h"
+#include "lock.h"
+#include "mailbox.h"
+#include "map.h"
+#include "mboxlist.h"
+#include "retry.h"
+#include "seen.h"
+#include "util.h"
+#include "xmalloc.h"
+
+static int mailbox_doing_reconstruct = 0;
+#define zeromailbox(m) { memset(&m, 0, sizeof(struct mailbox)); \
+ (m).header_fd = -1; \
+ (m).index_fd = -1; \
+ (m).cache_fd = -1; \
+ (m).examining = 1; }
+
+static int mailbox_upgrade_index(struct mailbox *mailbox);
+
+struct fnamebuf {
+ char buf[MAX_MAILBOX_PATH+1];
+ char *tail;
+ size_t len;
+};
+
+struct fnamepath {
+ struct fnamebuf data;
+ struct fnamebuf meta;
+};
+
+/*
+ * Build the filename of the given metadata file specified by 'metaflag'.
+ *
+ * On success, returns a pointer to the correct fnamebuf.
+ * On failure (buffer overflow), returns NULL.
+ *
+ * A metaflag of 0 (zero) initializes the buffers.
+ */
+static struct fnamebuf *mailbox_meta_get_fname(struct fnamepath *fpath,
+ struct mailbox *mailbox,
+ unsigned long metaflag)
+{
+ const char *filename = NULL;
+ struct fnamebuf *fname;
+ char *path;
+ size_t n;
+
+ /* select the filename, based on the metadata flag */
+ switch (metaflag) {
+ case 0: /* initialize */
+ fpath->data.len = fpath->meta.len = 0;
+ filename = "";
+ break;
+ case IMAP_ENUM_METAPARTITION_FILES_HEADER:
+ filename = FNAME_HEADER;
+ break;
+ case IMAP_ENUM_METAPARTITION_FILES_INDEX:
+ filename = FNAME_INDEX;
+ break;
+ case IMAP_ENUM_METAPARTITION_FILES_CACHE:
+ filename = FNAME_CACHE;
+ break;
+ case IMAP_ENUM_METAPARTITION_FILES_EXPUNGE:
+ filename = FNAME_EXPUNGE_INDEX;
+ break;
+ case IMAP_ENUM_METAPARTITION_FILES_SQUAT:
+ filename = FNAME_SQUAT_INDEX;
+ break;
+ }
+
+ /* select the path and buffer, based on the metadata flag */
+ if (mailbox->mpath && (config_metapartition_files & metaflag)) {
+ fname = &fpath->meta;
+ path = mailbox->mpath;
+ }
+ else {
+ fname = &fpath->data;
+ path = mailbox->path;
+ }
+
+ if (!fname->len) {
+ /* first time using the buffer, add the path */
+ n = strlcpy(fname->buf, path, sizeof(fname->buf));
+ if (n >= sizeof(fname->buf)) return NULL; /* overflow */
+
+ fname->len = strlen(fname->buf);
+ fname->tail = fname->buf + fname->len;
+ }
+
+ /* append the filename to the path */
+ n = strlcpy(fname->tail, filename, sizeof(fname->buf) - fname->len);
+ if (n >= (sizeof(fname->buf) - fname->len)) return NULL; /* overflow */
+
+ return fname;
+}
+
+/*
+ * Names of the headers we cache in the cyrus.cache file.
+ *
+ * Changes to this list probably require bumping the cache version
+ * number (obviously)
+ *
+ * note that header names longer than MAX_CACHED_HEADER_SIZE
+ * won't be cached regardless
+ *
+ * xxx can we get benefits by requireing this list to be sorted?
+ * (see is_cached_header())
+ *
+ */
+const struct mailbox_header_cache mailbox_cache_headers[] = {
+ /* things we have always cached */
+ { "priority", 0 },
+ { "references", 0 },
+ { "resent-from", 0 },
+ { "newsgroups", 0 },
+ { "followup-to", 0 },
+
+ /* x headers that we may want to cache anyway */
+ { "x-mailer", 1 },
+ { "x-trace", 1 },
+
+ /* outlook express seems to want these */
+ { "x-ref", 2 },
+ { "x-priority", 2 },
+ { "x-msmail-priority", 2 },
+ { "x-msoesrec", 2 },
+
+ /* things to never cache */
+ { "bcc", BIT32_MAX },
+ { "cc", BIT32_MAX },
+ { "date", BIT32_MAX },
+ { "delivery-date", BIT32_MAX },
+ { "envelope-to", BIT32_MAX },
+ { "from", BIT32_MAX },
+ { "in-reply-to", BIT32_MAX },
+ { "mime-version", BIT32_MAX },
+ { "reply-to", BIT32_MAX },
+ { "received", BIT32_MAX },
+ { "return-path", BIT32_MAX },
+ { "sender", BIT32_MAX },
+ { "subject", BIT32_MAX },
+ { "to", BIT32_MAX },
+
+ /* older versions of PINE (before 4.56) need message-id in the cache too
+ * though technically it is a waste of space because it is in
+ * ENVELOPE. We should probably uncomment the following at some
+ * future point [ken3 notes this may also be useful to have here for
+ * threading so we can avoid parsing the envelope] */
+ /* { "message-id", BIT32_MAX }, */
+};
+const int MAILBOX_NUM_CACHE_HEADERS =
+ sizeof(mailbox_cache_headers)/sizeof(struct mailbox_header_cache);
+
+/*
+ * Function to test if a header is in the cache
+ *
+ * Assume cache entry version 1, unless other data is found
+ * in the table.
+ */
+static inline int is_cached_header(const char *hdr)
+{
+ int i;
+
+ /* xxx if we can sort the header list we can do better here */
+ for (i=0; i<MAILBOX_NUM_CACHE_HEADERS; i++) {
+ if (!strcmp(mailbox_cache_headers[i].name, hdr))
+ return mailbox_cache_headers[i].min_cache_version;
+ }
+
+ /* Don't Cache X- headers unless explicitly configured to*/
+ if ((hdr[0] == 'x') && (hdr[1] == '-')) return BIT32_MAX;
+
+ /* Everything else we cache in version 1 */
+ return 1;
+}
+
+/* External API to is_cached_header that prepares the string
+ *
+ * Returns minimum version required for lookup to succeed
+ * or BIT32_MAX if header not cached
+ */
+int mailbox_cached_header(const char *s)
+{
+ char hdr[MAX_CACHED_HEADER_SIZE];
+ int i;
+
+ /* Generate lower case copy of string */
+ /* xxx sometimes the caller has already generated this ..
+ * maybe we can just require callers to do it? */
+ for (i=0 ; *s && (i < (MAX_CACHED_HEADER_SIZE - 1)) ; i++)
+ hdr[i] = tolower(*s++);
+
+ if (*s) return BIT32_MAX; /* Input too long for match */
+ hdr[i] = '\0';
+
+ return is_cached_header(hdr);
+}
+
+/* Same as mailbox_cached_header, but for use on a header
+ * as it appears in the message (i.e. :-terminated, not NUL-terminated)
+ */
+int mailbox_cached_header_inline(const char *text)
+{
+ char buf[MAX_CACHED_HEADER_SIZE];
+ int i;
+
+ /* Scan for header */
+ for (i=0; i < (MAX_CACHED_HEADER_SIZE - 1); i++) {
+ if (!text[i] || text[i] == '\r' || text[i] == '\n') break;
+
+ if (text[i] == ':') {
+ buf[i] = '\0';
+ return is_cached_header(buf);
+ } else {
+ buf[i] = tolower(text[i]);
+ }
+ }
+ return BIT32_MAX;
+}
+
+unsigned long
+mailbox_cache_size(struct mailbox *mailbox, unsigned msgno)
+{
+ const char *p;
+ unsigned long cache_offset;
+ unsigned int cache_ent;
+ const char *cacheitem, *cacheitembegin;
+
+ assert((msgno > 0) && (msgno <= mailbox->exists));
+
+ p = (mailbox->index_base + mailbox->start_offset +
+ ((msgno-1) * mailbox->record_size));
+
+ cache_offset = ntohl(*((bit32 *)(p+OFFSET_CACHE_OFFSET)));
+
+ /* Compute size of this record */
+ cacheitembegin = cacheitem = mailbox->cache_base + cache_offset;
+ for (cache_ent = 0; cache_ent < NUM_CACHE_FIELDS; cache_ent++) {
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ }
+ return(cacheitem - cacheitembegin);
+}
+
+/* function to be used for notification of mailbox changes/updates */
+static mailbox_notifyproc_t *updatenotifier = NULL;
+
+/*
+ * Set the updatenotifier function
+ */
+void mailbox_set_updatenotifier(mailbox_notifyproc_t *notifyproc)
+{
+ updatenotifier = notifyproc;
+}
+
+/*
+ * Get the updatenotifier function
+ */
+mailbox_notifyproc_t *mailbox_get_updatenotifier(void)
+{
+ return updatenotifier;
+}
+
+/*
+ * Create connection to acappush (obsolete)
+ */
+int mailbox_initialize(void)
+{
+ return 0;
+}
+
+/* create the unique identifier for a mailbox named 'name' with
+ * uidvalidity 'uidvalidity'. 'uniqueid' should be at least 17 bytes
+ * long. the unique identifier is just the mailbox name hashed to 32
+ * bits followed by the uid, both converted to hex.
+ */
+#define PRIME (2147484043UL)
+
+void mailbox_make_uniqueid(char *name, unsigned long uidvalidity,
+ char *uniqueid, size_t outlen)
+{
+ unsigned long hash = 0;
+
+ while (*name) {
+ hash *= 251;
+ hash += *name++;
+ hash %= PRIME;
+ }
+ snprintf(uniqueid, outlen, "%08lx%08lx", hash, uidvalidity);
+}
+
+/*
+ * Calculate relative filename for the message with UID 'uid'
+ * in 'mailbox'. 'out' must be at least MAILBOX_FNAME_LEN long.
+ */
+void mailbox_message_get_fname(struct mailbox *mailbox, unsigned long uid,
+ char *out, size_t size)
+{
+ char buf[MAILBOX_FNAME_LEN];
+
+ assert(mailbox->format != MAILBOX_FORMAT_NETNEWS);
+
+ snprintf(buf, sizeof(buf), "%lu.", uid);
+
+ assert(strlen(buf) < size);
+
+ strlcpy(out,buf,size);
+}
+
+/*
+ * Maps in the content for the message with UID 'uid' in 'mailbox'.
+ * Returns map in 'basep' and 'lenp'
+ */
+int mailbox_map_message(struct mailbox *mailbox, unsigned long uid,
+ const char **basep, unsigned long *lenp)
+{
+ int msgfd;
+ char buf[4096];
+ struct stat sbuf;
+
+ snprintf(buf, sizeof(buf), "%s/%lu.", mailbox->path,uid);
+
+ msgfd = open(buf, O_RDONLY, 0666);
+ if (msgfd == -1) return errno;
+
+ if (fstat(msgfd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m", buf);
+ fatal("can't fstat message file", EC_OSFILE);
+ }
+ *basep = 0;
+ *lenp = 0;
+ map_refresh(msgfd, 1, basep, lenp, sbuf.st_size, buf, mailbox->name);
+ close(msgfd);
+
+ return 0;
+}
+
+/*
+ * Releases the buffer obtained from mailbox_map_message()
+ */
+void mailbox_unmap_message(struct mailbox *mailbox __attribute__((unused)),
+ unsigned long uid __attribute__((unused)),
+ const char **basep, unsigned long *lenp)
+{
+ map_free(basep, lenp);
+}
+
+/*
+ * Set the "reconstruct" mode. Causes most errors to be ignored.
+ */
+void
+mailbox_reconstructmode()
+{
+ mailbox_doing_reconstruct = 1;
+}
+
+/* stat a mailbox's control files. returns a bitmask that sets
+ * 0x1 if the header fialed, 0x2 if the index failed, and 0x4 if the cache failed */
+int mailbox_stat(const char *mbpath, const char *metapath,
+ struct stat *header, struct stat *index, struct stat *cache)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ const char *path;
+ int r = 0, ret = 0;
+
+ assert(mbpath && (header || index));
+
+ if(header) {
+ path = (metapath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_HEADER)) ?
+ metapath : mbpath;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_HEADER, sizeof(fnamebuf));
+ r = stat(fnamebuf, header);
+ if(r) ret |= 0x1;
+ }
+
+ if(!r && index) {
+ path = (metapath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ metapath : mbpath;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+ r = stat(fnamebuf, index);
+ if(r) ret |= 0x2;
+ }
+
+ if(!r && cache) {
+ path = (metapath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_CACHE)) ?
+ metapath : mbpath;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_CACHE, sizeof(fnamebuf));
+ r = stat(fnamebuf, cache);
+ if(r) ret |= 0x4;
+ }
+
+ return ret;
+}
+
+
+/*
+ * Open and read the header of the mailbox with name 'name'
+ * The structure pointed to by 'mailbox' is initialized.
+ */
+int mailbox_open_header(const char *name,
+ struct auth_state *auth_state,
+ struct mailbox *mailbox)
+{
+ char *path, *mpath, *acl;
+ int r;
+
+ r = mboxlist_detail(name, NULL, &path, &mpath, NULL, &acl, NULL);
+ if (r) return r;
+
+ return mailbox_open_header_path(name, path, mpath,
+ acl, auth_state, mailbox, 0);
+}
+
+/*
+ * Open and read the header of the mailbox with name 'name'
+ * path 'path', and ACL 'acl'.
+ * The structure pointed to by 'mailbox' is initialized.
+ */
+int mailbox_open_header_path(const char *name,
+ const char *path,
+ const char *mpath,
+ const char *acl,
+ struct auth_state *auth_state,
+ struct mailbox *mailbox,
+ int suppresslog)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ struct stat sbuf;
+ int r;
+
+ zeromailbox(*mailbox);
+
+ if (mpath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_HEADER)) {
+ strlcpy(fnamebuf, mpath, sizeof(fnamebuf));
+ }
+ else
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+
+ strlcat(fnamebuf, FNAME_HEADER, sizeof(fnamebuf));
+ mailbox->header_fd = open(fnamebuf, O_RDWR, 0);
+
+ if (mailbox->header_fd == -1 && !mailbox_doing_reconstruct) {
+ if (!suppresslog) {
+ syslog(LOG_ERR, "IOERROR: opening %s: %m", fnamebuf);
+ }
+ return IMAP_IOERROR;
+ }
+
+ if (mailbox->header_fd != -1) {
+ if (fstat(mailbox->header_fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating %s: %m", fnamebuf);
+ fatal("can't fstat header file", EC_OSFILE);
+ }
+ map_refresh(mailbox->header_fd, 1, &mailbox->header_base,
+ &mailbox->header_len, sbuf.st_size, "header", name);
+ mailbox->header_ino = sbuf.st_ino;
+ }
+
+ mailbox->name = xstrdup(name);
+ mailbox->path = xstrdup(path);
+ if (mpath) mailbox->mpath = xstrdup(mpath);
+
+ /* Note that the header does have the ACL information, but it is only
+ * a backup, and the mboxlist data is considered authoritative, so
+ * we will just use what we were passed */
+ mailbox->acl = xstrdup(acl);
+
+ mailbox->myrights = cyrus_acl_myrights(auth_state, mailbox->acl);
+
+ if (mailbox->header_fd == -1) return 0;
+
+ r = mailbox_read_header(mailbox);
+ if (r && !mailbox_doing_reconstruct) {
+ mailbox_close(mailbox);
+ return r;
+ }
+
+ return 0;
+}
+
+int mailbox_open_locked(const char *mbname,
+ const char *mbpath,
+ const char *metapath,
+ const char *mbacl,
+ struct auth_state *auth_state,
+ struct mailbox *mb,
+ int suppresslog)
+{
+ int r;
+
+ r = mailbox_open_header_path(mbname, mbpath, metapath, mbacl, auth_state,
+ mb, suppresslog);
+ if(r) return r;
+
+ /* now we have to close the mailbox if we fail */
+
+ r = mailbox_lock_header(mb);
+ if(!r)
+ r = mailbox_open_index(mb);
+ if(!r)
+ r = mailbox_lock_index(mb);
+
+ if(r) mailbox_close(mb);
+
+ return r;
+}
+
+#define MAXTRIES 60
+
+/*
+ * Open the index and cache files for 'mailbox'. Also
+ * read the index header.
+ */
+int mailbox_open_index(struct mailbox *mailbox)
+{
+ struct fnamepath fpath;
+ struct fnamebuf *fname;
+ bit32 index_gen = 0, cache_gen = 0;
+ int tries = 0;
+
+ if (mailbox->index_fd != -1) {
+ close(mailbox->index_fd);
+ map_free(&mailbox->index_base, &mailbox->index_len);
+ }
+ if (mailbox->cache_fd != -1) {
+ close(mailbox->cache_fd);
+ map_free(&mailbox->cache_base, &mailbox->cache_len);
+ }
+
+ /* initialize the paths */
+ mailbox_meta_get_fname(&fpath, mailbox, 0);
+
+ do {
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_INDEX);
+ mailbox->index_fd = open(fname->buf, O_RDWR, 0);
+ if (mailbox->index_fd != -1) {
+ map_refresh(mailbox->index_fd, 0, &mailbox->index_base,
+ &mailbox->index_len, MAP_UNKNOWN_LEN, "index",
+ mailbox->name);
+ }
+ if (mailbox_doing_reconstruct) break;
+ if (mailbox->index_fd == -1) {
+ syslog(LOG_ERR, "IOERROR: opening %s: %m", fname->buf);
+ return IMAP_IOERROR;
+ }
+
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_CACHE);
+ mailbox->cache_fd = open(fname->buf, O_RDWR, 0);
+ if (mailbox->cache_fd != -1) {
+ struct stat sbuf;
+
+ if (fstat(mailbox->cache_fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating %s: %m", mailbox->name);
+ fatal("can't fstat cache file", EC_OSFILE);
+ }
+ mailbox->cache_size = sbuf.st_size;
+ map_refresh(mailbox->cache_fd, 0, &mailbox->cache_base,
+ &mailbox->cache_len, mailbox->cache_size, "cache",
+ mailbox->name);
+ }
+ if (mailbox->cache_fd == -1) {
+ syslog(LOG_ERR, "IOERROR: opening %s: %m", fname->buf);
+ return IMAP_IOERROR;
+ }
+
+ /* Check generation number matches */
+ if (mailbox->index_len < 4 || mailbox->cache_len < 4) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+ index_gen = ntohl(*(bit32 *)(mailbox->index_base+OFFSET_GENERATION_NO));
+ cache_gen = ntohl(*(bit32 *)(mailbox->cache_base+OFFSET_GENERATION_NO));
+
+ if (index_gen != cache_gen) {
+ close(mailbox->index_fd);
+ map_free(&mailbox->index_base, &mailbox->index_len);
+ close(mailbox->cache_fd);
+ map_free(&mailbox->cache_base, &mailbox->cache_len);
+ sleep(1);
+ }
+ } while (index_gen != cache_gen && tries++ < MAXTRIES);
+
+ if (index_gen != cache_gen) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+ mailbox->generation_no = index_gen;
+
+ return mailbox_read_index_header(mailbox);
+}
+
+/*
+ * Close the mailbox 'mailbox', freeing all associated resources.
+ */
+void mailbox_close(struct mailbox *mailbox)
+{
+ int flag;
+
+ close(mailbox->header_fd);
+ map_free(&mailbox->header_base, &mailbox->header_len);
+
+ if (mailbox->index_fd != -1) {
+ close(mailbox->index_fd);
+ if (mailbox->index_base)
+ map_free(&mailbox->index_base, &mailbox->index_len);
+ }
+
+ if (mailbox->cache_fd != -1) {
+ close(mailbox->cache_fd);
+ if (mailbox->cache_base)
+ map_free(&mailbox->cache_base, &mailbox->cache_len);
+ }
+
+ free(mailbox->name);
+ free(mailbox->path);
+ if (mailbox->mpath) free(mailbox->mpath);
+ free(mailbox->acl);
+ free(mailbox->uniqueid);
+ if (mailbox->quota.root) free(mailbox->quota.root);
+
+ for (flag = 0; flag < MAX_USER_FLAGS; flag++) {
+ if (mailbox->flagname[flag]) free(mailbox->flagname[flag]);
+ }
+
+ zeromailbox(*mailbox);
+}
+
+/*
+ * Read the header of 'mailbox'
+ */
+int mailbox_read_header(struct mailbox *mailbox)
+{
+ int flag;
+ const char *name, *p, *tab, *eol;
+ int oldformat = 0;
+
+ /* Check magic number */
+ if (mailbox->header_len < sizeof(MAILBOX_HEADER_MAGIC)-1 ||
+ strncmp(mailbox->header_base, MAILBOX_HEADER_MAGIC,
+ sizeof(MAILBOX_HEADER_MAGIC)-1)) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+
+ /* Read quota file pathname */
+ p = mailbox->header_base + sizeof(MAILBOX_HEADER_MAGIC)-1;
+ tab = memchr(p, '\t', mailbox->header_len - (p - mailbox->header_base));
+ eol = memchr(p, '\n', mailbox->header_len - (p - mailbox->header_base));
+ if (!tab || tab > eol || !eol) {
+ oldformat = 1;
+ if (!eol) return IMAP_MAILBOX_BADFORMAT;
+ else {
+ syslog(LOG_DEBUG, "mailbox '%s' has old cyrus.header",
+ mailbox->name);
+ }
+ tab = eol;
+ }
+ if (mailbox->quota.root) {
+ free(mailbox->quota.root);
+ }
+ if (p < tab) {
+ mailbox->quota.root = xstrndup(p, tab - p);
+ } else {
+ mailbox->quota.root = NULL;
+ }
+
+ if (!oldformat) {
+ /* read uniqueid */
+ p = tab + 1;
+ if (p == eol) return IMAP_MAILBOX_BADFORMAT;
+ mailbox->uniqueid = xstrndup(p, eol - p);
+ } else {
+ /* uniqueid needs to be generated when we know the uidvalidity */
+ mailbox->uniqueid = NULL;
+ }
+
+ /* Read names of user flags */
+ p = eol + 1;
+ eol = memchr(p, '\n', mailbox->header_len - (p - mailbox->header_base));
+ if (!eol) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+ name = p;
+ flag = 0;
+ while (name <= eol && flag < MAX_USER_FLAGS) {
+ p = memchr(name, ' ', eol-name);
+ if (!p) p = eol;
+ if (mailbox->flagname[flag]) free(mailbox->flagname[flag]);
+ if (name != p) {
+ mailbox->flagname[flag++] = xstrndup(name, p-name);
+ }
+ else {
+ mailbox->flagname[flag++] = NULL;
+ }
+
+ name = p+1;
+ }
+ while (flag < MAX_USER_FLAGS) {
+ if (mailbox->flagname[flag]) free(mailbox->flagname[flag]);
+ mailbox->flagname[flag++] = NULL;
+ }
+
+ if (!mailbox->uniqueid) {
+ char buf[32];
+
+ /* generate uniqueid */
+ mailbox_lock_header(mailbox);
+ mailbox_open_index(mailbox);
+ mailbox_make_uniqueid(mailbox->name, mailbox->uidvalidity,
+ buf, sizeof(buf));
+ mailbox->uniqueid = xstrdup(buf);
+ mailbox_write_header(mailbox);
+ mailbox_unlock_header(mailbox);
+ }
+
+ return 0;
+}
+
+/*
+ * Read the acl out of the header of 'mailbox'
+ */
+int mailbox_read_header_acl(struct mailbox *mailbox)
+{
+ const char *p, *eol;
+
+ /* Check magic number */
+ if (mailbox->header_len < sizeof(MAILBOX_HEADER_MAGIC)-1 ||
+ strncmp(mailbox->header_base, MAILBOX_HEADER_MAGIC,
+ sizeof(MAILBOX_HEADER_MAGIC)-1)) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+
+ /* Skip quota file pathname */
+ p = mailbox->header_base + sizeof(MAILBOX_HEADER_MAGIC)-1;
+ eol = memchr(p, '\n', mailbox->header_len - (p - mailbox->header_base));
+ if (!eol) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+
+ /* Skip names of user flags */
+ p = eol + 1;
+ eol = memchr(p, '\n', mailbox->header_len - (p - mailbox->header_base));
+ if (!eol) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+
+ /* Read ACL */
+ p = eol + 1;
+ eol = memchr(p, '\n', mailbox->header_len - (p - mailbox->header_base));
+ if (!eol) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+
+ free(mailbox->acl);
+ mailbox->acl = xstrndup(p, eol-p);
+
+ return 0;
+}
+
+/*
+ * Read the the ACL for 'mailbox'.
+ */
+int mailbox_read_acl(struct mailbox *mailbox,
+ struct auth_state *auth_state)
+{
+ int r;
+ char *acl;
+
+ r = mboxlist_lookup(mailbox->name, &acl, NULL);
+ if (r) return r;
+
+ free(mailbox->acl);
+ mailbox->acl = xstrdup(acl);
+ mailbox->myrights = cyrus_acl_myrights(auth_state, mailbox->acl);
+
+ return 0;
+}
+
+/*
+ * Read the header of the index file for mailbox
+ */
+int mailbox_read_index_header(struct mailbox *mailbox)
+{
+ struct stat sbuf;
+
+ if (mailbox->index_fd == -1) return IMAP_MAILBOX_BADFORMAT;
+
+ fstat(mailbox->index_fd, &sbuf);
+ mailbox->index_ino = sbuf.st_ino;
+ mailbox->index_mtime = sbuf.st_mtime;
+ mailbox->index_size = sbuf.st_size;
+ map_refresh(mailbox->index_fd, 0, &mailbox->index_base,
+ &mailbox->index_len, sbuf.st_size, "index",
+ mailbox->name);
+
+ if (mailbox->index_len < OFFSET_POP3_LAST_LOGIN ||
+ (mailbox->index_len <
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_START_OFFSET))))) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+
+ if (mailbox_doing_reconstruct) {
+ mailbox->generation_no =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_GENERATION_NO)));
+ }
+ mailbox->format =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_FORMAT)));
+ mailbox->minor_version =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_MINOR_VERSION)));
+ mailbox->start_offset =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_START_OFFSET)));
+ mailbox->record_size =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_RECORD_SIZE)));
+
+ if ((mailbox->start_offset < OFFSET_HIGHESTMODSEQ+4) ||
+ (mailbox->record_size < INDEX_RECORD_SIZE) ||
+ (mailbox->minor_version < MAILBOX_MINOR_VERSION)) {
+ if (mailbox_upgrade_index(mailbox))
+ return IMAP_IOERROR;
+
+ /* things might have been changed out from under us. reread */
+ return mailbox_open_index(mailbox);
+ }
+
+ mailbox->exists =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_EXISTS)));
+ mailbox->last_appenddate =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_LAST_APPENDDATE)));
+ mailbox->last_uid =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_LAST_UID)));
+
+#ifdef HAVE_LONG_LONG_INT
+ if (mailbox->minor_version > 5) {
+ /* newer versions may use 64bit quotas now */
+ mailbox->quota_mailbox_used =
+ ntohll(*((bit64 *)(mailbox->index_base+OFFSET_QUOTA_MAILBOX_USED64)));
+ } else
+#endif
+ {
+ mailbox->quota_mailbox_used =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_QUOTA_MAILBOX_USED)));
+ }
+
+ mailbox->pop3_last_login =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_POP3_LAST_LOGIN)));
+ mailbox->uidvalidity =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_UIDVALIDITY)));
+ mailbox->deleted =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_DELETED)));
+ mailbox->answered =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_ANSWERED)));
+ mailbox->flagged =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_FLAGGED)));
+ mailbox->dirty = 0;
+ mailbox->options =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_MAILBOX_OPTIONS)));
+ mailbox->leaked_cache_records =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_LEAKED_CACHE)));
+#ifdef HAVE_LONG_LONG_INT
+ mailbox->highestmodseq =
+ ntohll(*((bit64 *)(mailbox->index_base+OFFSET_HIGHESTMODSEQ_64)));
+#else
+ mailbox->highestmodseq =
+ ntohl(*((bit32 *)(mailbox->index_base+OFFSET_HIGHESTMODSEQ)));
+#endif
+
+ if (!mailbox->exists) mailbox->options |= OPT_POP3_NEW_UIDL;
+
+ if (!mailbox_doing_reconstruct &&
+ (mailbox->minor_version < MAILBOX_MINOR_VERSION)) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+
+ return 0;
+}
+
+/*
+ * Read an index record from a mailbox
+ */
+int
+mailbox_read_index_record(mailbox, msgno, record)
+struct mailbox *mailbox;
+unsigned msgno;
+struct index_record *record;
+{
+ unsigned long offset;
+ unsigned const char *buf;
+ int n;
+
+ offset = mailbox->start_offset + (msgno-1) * mailbox->record_size;
+ if (offset + INDEX_RECORD_SIZE > mailbox->index_len) {
+ syslog(LOG_ERR,
+ "IOERROR: index record %u for %s past end of file",
+ msgno, mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ buf = (unsigned char*) mailbox->index_base + offset;
+
+ record->uid = htonl(*((bit32 *)(buf+OFFSET_UID)));
+ record->internaldate = htonl(*((bit32 *)(buf+OFFSET_INTERNALDATE)));
+ record->sentdate = htonl(*((bit32 *)(buf+OFFSET_SENTDATE)));
+ record->size = htonl(*((bit32 *)(buf+OFFSET_SIZE)));
+ record->header_size = htonl(*((bit32 *)(buf+OFFSET_HEADER_SIZE)));
+ record->content_offset = htonl(*((bit32 *)(buf+OFFSET_CONTENT_OFFSET)));
+ record->cache_offset = htonl(*((bit32 *)(buf+OFFSET_CACHE_OFFSET)));
+ record->last_updated = htonl(*((bit32 *)(buf+OFFSET_LAST_UPDATED)));
+ record->system_flags = htonl(*((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)));
+ for (n = 0; n < MAX_USER_FLAGS/32; n++) {
+ record->user_flags[n] = htonl(*((bit32 *)(buf+OFFSET_USER_FLAGS+4*n)));
+ }
+ record->content_lines = htonl(*((bit32 *)(buf+OFFSET_CONTENT_LINES)));
+ record->cache_version = htonl(*((bit32 *)(buf+OFFSET_CACHE_VERSION)));
+ message_uuid_unpack(&record->uuid, buf+OFFSET_MESSAGE_UUID);
+#ifdef HAVE_LONG_LONG_INT
+ record->modseq = htonll(*((bit64 *)(buf+OFFSET_MODSEQ_64)));
+#else
+ record->modseq = htonl(*((bit32 *)(buf+OFFSET_MODSEQ)));
+#endif
+ return 0;
+}
+
+/*
+ * Lock the header for 'mailbox'. Reread header if necessary.
+ */
+int mailbox_lock_header(struct mailbox *mailbox)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1], *path;
+ struct stat sbuf;
+ const char *lockfailaction;
+ int r;
+
+ if (mailbox->header_lock_count++) return 0;
+
+ assert(mailbox->index_lock_count == 0);
+ assert(mailbox->seen_lock_count == 0);
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_HEADER)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_HEADER, sizeof(fnamebuf));
+
+ r = lock_reopen(mailbox->header_fd, fnamebuf, &sbuf, &lockfailaction);
+ if (r) {
+ mailbox->header_lock_count--;
+ syslog(LOG_ERR, "IOERROR: %s header for %s: %m",
+ lockfailaction, mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ if (sbuf.st_ino != mailbox->header_ino) {
+ map_free(&mailbox->header_base, &mailbox->header_len);
+ map_refresh(mailbox->header_fd, 1, &mailbox->header_base,
+ &mailbox->header_len, sbuf.st_size, "header",
+ mailbox->name);
+ mailbox->header_ino = sbuf.st_ino;
+ r = mailbox_read_header(mailbox);
+ if (r && !mailbox_doing_reconstruct) {
+ mailbox_unlock_header(mailbox);
+ return r;
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * Lock the index file for 'mailbox'. Reread index file header if necessary.
+ */
+int mailbox_lock_index(struct mailbox *mailbox)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1], *path;
+ struct stat sbuffd, sbuffile;
+ int r;
+
+ if (mailbox->index_lock_count++) return 0;
+
+ assert(mailbox->seen_lock_count == 0);
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+
+ /* why is this not a lock_reopen()? -leg
+ *
+ * this is not a lock_reopen() because we need to do all of the
+ * work of mailbox_open_index, not just opening the file --
+ * presumably we could extend the api of lock_reopen to tell us if
+ * it had to reopen the file or not, then this could be a bit smarter --
+ * but we'd still have to deal with the fact that mailbox_open_index
+ * does its own open() call. -rjs3 */
+ for (;;) {
+ r = lock_blocking(mailbox->index_fd);
+ if (r == -1) {
+ mailbox->index_lock_count--;
+ syslog(LOG_ERR, "IOERROR: locking index for %s: %m",
+ mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ fstat(mailbox->index_fd, &sbuffd);
+ r = stat(fnamebuf, &sbuffile);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: stating index for %s: %m",
+ mailbox->name);
+ mailbox_unlock_index(mailbox);
+ return IMAP_IOERROR;
+ }
+
+ if (sbuffd.st_ino == sbuffile.st_ino) break;
+
+ if ((r = mailbox_open_index(mailbox))) {
+ return r;
+ }
+ }
+
+ r = mailbox_read_index_header(mailbox);
+ if (r && !mailbox_doing_reconstruct) {
+ mailbox_unlock_index(mailbox);
+ return r;
+ }
+
+ return 0;
+}
+
+/*
+ * Place a POP lock on 'mailbox'.
+ */
+int
+mailbox_lock_pop(mailbox)
+struct mailbox *mailbox;
+{
+ int r = -1;
+
+ if (mailbox->pop_lock_count++) return 0;
+
+ r = lock_nonblocking(mailbox->cache_fd);
+ if (r == -1) {
+ mailbox->pop_lock_count--;
+ if (errno == EWOULDBLOCK || errno == EAGAIN || errno == EACCES) {
+ return IMAP_MAILBOX_POPLOCKED;
+ }
+ syslog(LOG_ERR, "IOERROR: locking cache for %s: %m", mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ return 0;
+}
+
+/*
+ * Release lock on the header for 'mailbox'
+ */
+void mailbox_unlock_header(struct mailbox *mailbox)
+{
+ assert(mailbox->header_lock_count != 0);
+
+ if (--mailbox->header_lock_count == 0) {
+ if (lock_unlock(mailbox->header_fd))
+ syslog(LOG_ERR, "IOERROR: unlocking header of %s: %m",
+ mailbox->name);
+ }
+}
+
+/*
+ * Release lock on the index file for 'mailbox'
+ */
+void
+mailbox_unlock_index(mailbox)
+struct mailbox *mailbox;
+{
+ assert(mailbox->index_lock_count != 0);
+
+ if (--mailbox->index_lock_count == 0) {
+ if (lock_unlock(mailbox->index_fd))
+ syslog(LOG_ERR, "IOERROR: unlocking index of %s: %m",
+ mailbox->name);
+ }
+}
+
+/*
+ * Release POP lock for 'mailbox'
+ */
+void
+mailbox_unlock_pop(mailbox)
+struct mailbox *mailbox;
+{
+ assert(mailbox->pop_lock_count != 0);
+
+ if (--mailbox->pop_lock_count == 0) {
+ if (lock_unlock(mailbox->cache_fd))
+ syslog(LOG_ERR, "IOERROR: unlocking POP lock of %s: %m",
+ mailbox->name);
+ }
+}
+
+/*
+ * Write the header file for 'mailbox'
+ */
+int mailbox_write_header(struct mailbox *mailbox)
+{
+ int flag;
+ int newheader_fd;
+ int r = 0;
+ const char *quota_root;
+ char fnamebuf[MAX_MAILBOX_PATH+1], *path;
+ char newfnamebuf[MAX_MAILBOX_PATH+1];
+ struct stat sbuf;
+ struct iovec iov[10];
+ int niov;
+
+ assert(mailbox->header_lock_count != 0);
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_HEADER)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_HEADER, sizeof(fnamebuf));
+ strlcpy(newfnamebuf, fnamebuf, sizeof(newfnamebuf));
+ strlcat(newfnamebuf, ".NEW", sizeof(newfnamebuf));
+
+ newheader_fd = open(newfnamebuf, O_CREAT | O_TRUNC | O_RDWR, 0666);
+ if (newheader_fd == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", newfnamebuf);
+ return IMAP_IOERROR;
+ }
+
+ /* Write magic header, do NOT write the trailing NUL */
+ r = write(newheader_fd, MAILBOX_HEADER_MAGIC,
+ sizeof(MAILBOX_HEADER_MAGIC) - 1);
+
+ if(r != -1) {
+ niov = 0;
+ quota_root = mailbox->quota.root ? mailbox->quota.root : "";
+ WRITEV_ADDSTR_TO_IOVEC(iov,niov,(char *)quota_root);
+ WRITEV_ADD_TO_IOVEC(iov,niov,"\t",1);
+ WRITEV_ADDSTR_TO_IOVEC(iov,niov,mailbox->uniqueid);
+ WRITEV_ADD_TO_IOVEC(iov,niov,"\n",1);
+ r = retry_writev(newheader_fd, iov, niov);
+ }
+
+ if(r != -1) {
+ for (flag = 0; flag < MAX_USER_FLAGS; flag++) {
+ if (mailbox->flagname[flag]) {
+ niov = 0;
+ WRITEV_ADDSTR_TO_IOVEC(iov,niov,mailbox->flagname[flag]);
+ WRITEV_ADD_TO_IOVEC(iov,niov," ",1);
+ r = retry_writev(newheader_fd, iov, niov);
+ if(r == -1) break;
+ }
+ }
+ }
+
+ if(r != -1) {
+ niov = 0;
+ WRITEV_ADD_TO_IOVEC(iov,niov,"\n",1);
+ WRITEV_ADDSTR_TO_IOVEC(iov,niov,mailbox->acl);
+ WRITEV_ADD_TO_IOVEC(iov,niov,"\n",1);
+ r = retry_writev(newheader_fd, iov, niov);
+ }
+
+ if (r == -1 || fsync(newheader_fd) ||
+ lock_blocking(newheader_fd) == -1 ||
+ rename(newfnamebuf, fnamebuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", newfnamebuf);
+ close(newheader_fd);
+ unlink(newfnamebuf);
+ return IMAP_IOERROR;
+ }
+
+ if (mailbox->header_fd != -1) {
+ close(mailbox->header_fd);
+ map_free(&mailbox->header_base, &mailbox->header_len);
+ }
+ mailbox->header_fd = newheader_fd;
+
+ if (fstat(mailbox->header_fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating %s: %m", fnamebuf);
+ fatal("can't fstat header file", EC_OSFILE);
+ }
+
+ map_refresh(mailbox->header_fd, 1, &mailbox->header_base,
+ &mailbox->header_len, sbuf.st_size, "header", mailbox->name);
+ mailbox->header_ino = sbuf.st_ino;
+
+ return 0;
+}
+
+/*
+ * Write the index header for 'mailbox'
+ */
+int mailbox_write_index_header(struct mailbox *mailbox)
+{
+ char buf[INDEX_HEADER_SIZE];
+ unsigned long header_size = sizeof(buf);
+ int n;
+
+ assert(mailbox->index_lock_count != 0);
+
+ *((bit32 *)(buf+OFFSET_GENERATION_NO)) = htonl(mailbox->generation_no);
+ *((bit32 *)(buf+OFFSET_FORMAT)) = htonl(mailbox->format);
+ *((bit32 *)(buf+OFFSET_MINOR_VERSION)) = htonl(mailbox->minor_version);
+ *((bit32 *)(buf+OFFSET_START_OFFSET)) = htonl(mailbox->start_offset);
+ *((bit32 *)(buf+OFFSET_RECORD_SIZE)) = htonl(mailbox->record_size);
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(mailbox->exists);
+ *((bit32 *)(buf+OFFSET_LAST_APPENDDATE)) = htonl(mailbox->last_appenddate);
+ *((bit32 *)(buf+OFFSET_LAST_UID)) = htonl(mailbox->last_uid);
+
+ /* quotas may be 64bit now */
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) =
+ htonll(mailbox->quota_mailbox_used);
+#else
+ /* zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) =
+ htonl(mailbox->quota_mailbox_used);
+#endif
+
+ *((bit32 *)(buf+OFFSET_POP3_LAST_LOGIN)) = htonl(mailbox->pop3_last_login);
+ *((bit32 *)(buf+OFFSET_UIDVALIDITY)) = htonl(mailbox->uidvalidity);
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(mailbox->deleted);
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(mailbox->answered);
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(mailbox->flagged);
+ *((bit32 *)(buf+OFFSET_MAILBOX_OPTIONS)) = htonl(mailbox->options);
+ *((bit32 *)(buf+OFFSET_LEAKED_CACHE)) =
+ htonl(mailbox->leaked_cache_records);
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_HIGHESTMODSEQ_64)) = htonll(mailbox->highestmodseq);
+#else
+ /* zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_HIGHESTMODSEQ_64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_HIGHESTMODSEQ)) = htonl(mailbox->highestmodseq);
+#endif
+ *((bit32 *)(buf+OFFSET_SPARE0)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE1)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE2)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE3)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE4)) = htonl(0); /* RESERVED */
+
+ if (mailbox->start_offset < header_size)
+ header_size = mailbox->start_offset;
+
+ lseek(mailbox->index_fd, 0, SEEK_SET);
+ n = retry_write(mailbox->index_fd, buf, header_size);
+ if ((unsigned long)n != header_size || fsync(mailbox->index_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing index header for %s: %m",
+ mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ if (updatenotifier) updatenotifier(mailbox);
+
+ return 0;
+}
+
+/*
+ * Put an index record into a buffer suitable for writing to a file.
+ */
+void mailbox_index_record_to_buf(struct index_record *record, char *buf)
+{
+ int n;
+
+ *((bit32 *)(buf+OFFSET_UID)) = htonl(record->uid);
+ *((bit32 *)(buf+OFFSET_INTERNALDATE)) = htonl(record->internaldate);
+ *((bit32 *)(buf+OFFSET_SENTDATE)) = htonl(record->sentdate);
+ *((bit32 *)(buf+OFFSET_SIZE)) = htonl(record->size);
+ *((bit32 *)(buf+OFFSET_HEADER_SIZE)) = htonl(record->header_size);
+ *((bit32 *)(buf+OFFSET_CONTENT_OFFSET)) = htonl(record->content_offset);
+ *((bit32 *)(buf+OFFSET_CACHE_OFFSET)) = htonl(record->cache_offset);
+ *((bit32 *)(buf+OFFSET_LAST_UPDATED)) = htonl(record->last_updated);
+ *((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)) = htonl(record->system_flags);
+ for (n = 0; n < MAX_USER_FLAGS/32; n++) {
+ *((bit32 *)(buf+OFFSET_USER_FLAGS+4*n)) = htonl(record->user_flags[n]);
+ }
+ *((bit32 *)(buf+OFFSET_CONTENT_LINES)) = htonl(record->content_lines);
+ *((bit32 *)(buf+OFFSET_CACHE_VERSION)) = htonl(record->cache_version);
+ message_uuid_pack(&record->uuid, buf+OFFSET_MESSAGE_UUID);
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_MODSEQ_64)) = htonll(record->modseq);
+#else
+ /* zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_MODSEQ_64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_MODSEQ)) = htonl(record->modseq);
+#endif
+}
+
+/*
+ * Write an index record to a mailbox
+ * call fsync() on index_fd if 'sync' is true
+ */
+int
+mailbox_write_index_record(struct mailbox *mailbox,
+ unsigned msgno,
+ struct index_record *record,
+ int sync)
+{
+ int n;
+ char buf[INDEX_RECORD_SIZE];
+
+ mailbox_index_record_to_buf(record, buf);
+
+ n = lseek(mailbox->index_fd,
+ mailbox->start_offset + (msgno-1) * mailbox->record_size,
+ SEEK_SET);
+ if (n == -1) {
+ syslog(LOG_ERR, "IOERROR: seeking index record %u for %s: %m",
+ msgno, mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ n = retry_write(mailbox->index_fd, buf, INDEX_RECORD_SIZE);
+ if (n != INDEX_RECORD_SIZE || (sync && fsync(mailbox->index_fd))) {
+ syslog(LOG_ERR, "IOERROR: writing index record %u for %s: %m",
+ msgno, mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ return 0;
+}
+
+/*
+ * Append a new record to the index file
+ * call fsync() on index_fd if 'sync' is true
+ */
+int mailbox_append_index(struct mailbox *mailbox,
+ struct index_record *record,
+ unsigned start,
+ unsigned num,
+ int sync)
+{
+ unsigned i;
+ int len, n;
+ char *buf, *p;
+ long last_offset;
+ time_t now = time(NULL);
+
+ assert(mailbox->index_lock_count != 0);
+
+ if (mailbox->record_size < INDEX_RECORD_SIZE) {
+ return IMAP_MAILBOX_BADFORMAT;
+ }
+
+ len = num * mailbox->record_size;
+ buf = xmalloc(len);
+ memset(buf, 0, len);
+
+ for (i = 0; i < num; i++) {
+ /* Sanity check the timestamps so index_fetchreply() won't abort() */
+ if (record[i].internaldate <= 0) record[i].internaldate = now;
+ if (record[i].sentdate <= 0) record[i].sentdate = now;
+ if (record[i].last_updated <= 0) record[i].internaldate = now;
+
+ p = buf + i*mailbox->record_size;
+
+ mailbox_index_record_to_buf(&record[i], p);
+ }
+
+ last_offset = mailbox->start_offset + start * mailbox->record_size;
+ lseek(mailbox->index_fd, last_offset, SEEK_SET);
+ n = retry_write(mailbox->index_fd, buf, len);
+ free(buf);
+ if (n != len || (sync && fsync(mailbox->index_fd))) {
+ syslog(LOG_ERR, "IOERROR: appending index records for %s: %m",
+ mailbox->name);
+ ftruncate(mailbox->index_fd, last_offset);
+ return IMAP_IOERROR;
+ }
+
+ return 0;
+}
+
+/*
+ * Lock the index file for 'mailbox'.
+ * DON'T Reread index file header if necessary.
+ */
+static int mailbox_lock_index_for_upgrade(struct mailbox *mailbox)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1], *path;
+ struct stat sbuffd, sbuffile;
+ int r;
+
+ if (mailbox->index_lock_count++) return 0;
+
+ assert(mailbox->seen_lock_count == 0);
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+
+ for (;;) {
+ r = lock_blocking(mailbox->index_fd);
+ if (r == -1) {
+ mailbox->index_lock_count--;
+ syslog(LOG_ERR, "IOERROR: locking index for %s: %m",
+ mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ fstat(mailbox->index_fd, &sbuffd);
+ r = stat(fnamebuf, &sbuffile);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: stating index for %s: %m",
+ mailbox->name);
+ mailbox_unlock_index(mailbox);
+ return IMAP_IOERROR;
+ }
+
+ if (sbuffd.st_ino == sbuffile.st_ino) break;
+
+ if ((r = mailbox_open_index(mailbox))) {
+ return r;
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * Upgrade an index/expunge file for 'mailbox'
+ */
+static void mailbox_upgrade_index_work(struct mailbox *mailbox,
+ FILE *newindex,
+ const char *index_base,
+ unsigned long index_len)
+{
+ unsigned long exists;
+ unsigned msgno;
+ bit32 oldstart_offset, oldrecord_size, recsize_diff;
+ char buf[INDEX_HEADER_SIZE > INDEX_RECORD_SIZE ?
+ INDEX_HEADER_SIZE : INDEX_RECORD_SIZE];
+ char *bufp;
+ int quota_offset = 0;
+ int calculate_flagcounts = 0;
+ bit32 numansweredflag = 0;
+ bit32 numdeletedflag = 0;
+ bit32 numflaggedflag = 0;
+
+ /* Copy existing header so we can upgrade it */
+ memcpy(buf, index_base, INDEX_HEADER_SIZE);
+
+ exists = ntohl(*((bit32 *)(buf+OFFSET_EXISTS)));
+
+ if (ntohl(*((bit32 *)(buf+OFFSET_MINOR_VERSION))) <= 5) {
+ quota_offset = sizeof(bit32);
+ /* upgrade quota to 64-bits (bump existing fields) */
+ memmove(buf+OFFSET_QUOTA_MAILBOX_USED, buf+OFFSET_QUOTA_MAILBOX_USED64,
+ INDEX_HEADER_SIZE - OFFSET_QUOTA_MAILBOX_USED64 - quota_offset);
+ /* zero the unused 32-bits */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ }
+
+ if (ntohl(*((bit32 *)(buf+OFFSET_MINOR_VERSION))) < 8) {
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_HIGHESTMODSEQ_64)) = htonll(1);
+#else
+ *((bit32 *)(buf+OFFSET_HIGHESTMODSEQ_64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_HIGHESTMODSEQ)) = htonl(1);
+#endif
+ }
+
+ /* change version number */
+ *((bit32 *)(buf+OFFSET_MINOR_VERSION)) = htonl(MAILBOX_MINOR_VERSION);
+
+ /* save old start_offset; change start_offset */
+ oldstart_offset = ntohl(*((bit32 *)(buf+OFFSET_START_OFFSET)));
+ *((bit32 *)(buf+OFFSET_START_OFFSET)) = htonl(INDEX_HEADER_SIZE);
+
+ /* save old record_size; change record_size */
+ oldrecord_size = ntohl(*((bit32 *)(buf+OFFSET_RECORD_SIZE)));
+ *((bit32 *)(buf+OFFSET_RECORD_SIZE)) = htonl(INDEX_RECORD_SIZE);
+ recsize_diff = INDEX_RECORD_SIZE - oldrecord_size;
+
+ /* upgrade other fields as necessary */
+ if (oldstart_offset < OFFSET_POP3_LAST_LOGIN-quota_offset+sizeof(bit32)) {
+ *((bit32 *)(buf+OFFSET_POP3_LAST_LOGIN)) = htonl(0);
+ }
+ if (oldstart_offset < OFFSET_UIDVALIDITY-quota_offset+sizeof(bit32)) {
+ *((bit32 *)(buf+OFFSET_UIDVALIDITY)) = htonl(1);
+ }
+ if (oldstart_offset < OFFSET_FLAGGED-quota_offset+sizeof(bit32)) {
+ struct stat sbuf;
+
+ if (fstat(mailbox->cache_fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating %s: %m", mailbox->name);
+ fatal("can't fstat cache file", EC_OSFILE);
+ }
+ mailbox->cache_size = sbuf.st_size;
+ map_refresh(mailbox->cache_fd, 0, &mailbox->cache_base,
+ &mailbox->cache_len, mailbox->cache_size,
+ "cache", mailbox->name);
+
+ calculate_flagcounts = 1;
+ }
+ if (oldstart_offset < OFFSET_MAILBOX_OPTIONS-quota_offset+sizeof(bit32)) {
+ unsigned long options = !exists ? OPT_POP3_NEW_UIDL : 0;
+ *((bit32 *)(buf+OFFSET_MAILBOX_OPTIONS)) = htonl(options);
+ }
+#if 0
+ if (oldstart_offset < OFFSET_HIGHESTMODSEQ-quota_offset+sizeof(bit32) ||
+ !ntohll(*((bit64 *)(buf+OFFSET_HIGHESTMODSEQ_64)))) {
+ *((bit64 *)(buf+OFFSET_HIGHESTMODSEQ_64)) = htonll(1);
+ }
+#endif
+ *((bit32 *)(buf+OFFSET_SPARE0)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE1)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE2)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE3)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE4)) = htonl(0); /* RESERVED */
+
+ /* Write new header */
+ fwrite(buf, 1, INDEX_HEADER_SIZE, newindex);
+
+ /* Write the rest of new index */
+ memset(buf, 0, INDEX_RECORD_SIZE);
+ for (msgno = 1; msgno <= exists; msgno++) {
+ /* Write the existing (old) part of the index record */
+ bufp = (char *) (index_base + oldstart_offset +
+ (msgno - 1)*oldrecord_size);
+
+ if (calculate_flagcounts) {
+ bit32 sysflags = ntohl(*((bit32 *)(bufp+OFFSET_SYSTEM_FLAGS)));
+
+ if (sysflags & FLAG_ANSWERED) numansweredflag++;
+ if (sysflags & FLAG_DELETED) numdeletedflag++;
+ if (sysflags & FLAG_FLAGGED) numflaggedflag++;
+ }
+
+ fwrite(bufp, oldrecord_size, 1, newindex);
+
+ if (recsize_diff) {
+ /* We need to upgrade the index record to include new fields. */
+
+ /* Currently, this means adding a content_lines placeholder.
+ * We use BIT32_MAX rather than 0, since a message body can
+ * be empty. We'll calculate the actual value on demand.
+ */
+ if (oldrecord_size < OFFSET_CONTENT_LINES+sizeof(bit32)) {
+ *((bit32 *)(buf+OFFSET_CONTENT_LINES)) = htonl(BIT32_MAX);
+ }
+
+ /* Set the initial cache version to 0, that is, with the old
+ * format of the cached headers */
+ if (oldrecord_size < OFFSET_CACHE_VERSION+sizeof(bit32)) {
+ *((bit32 *)(buf+OFFSET_CACHE_VERSION)) = htonl(0);
+ }
+
+ /* Reset undefined MessageUUIDs to NULL value (slow copy) */
+ if (oldrecord_size < OFFSET_MESSAGE_UUID+MESSAGE_UUID_PACKED_SIZE)
+ memset(buf+OFFSET_MESSAGE_UUID, 0, MESSAGE_UUID_PACKED_SIZE);
+
+ /* Set the initial modseq to 1 */
+ if (oldrecord_size < OFFSET_MODSEQ+4) {
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_MODSEQ_64)) = htonll(1);
+#else
+ *((bit32 *)(buf+OFFSET_MODSEQ_64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_MODSEQ)) = htonl(1);
+#endif
+ }
+
+ fwrite(buf+oldrecord_size, recsize_diff, 1, newindex);
+ }
+ }
+
+ if (calculate_flagcounts) {
+ /* go back and add flag counts to header */
+ memset(buf, 0, INDEX_RECORD_SIZE);
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(numdeletedflag);
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(numansweredflag);
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(numflaggedflag);
+
+ fseek(newindex, OFFSET_DELETED, SEEK_SET);
+ fwrite(buf+OFFSET_DELETED,
+ OFFSET_FLAGGED+sizeof(bit32)-OFFSET_DELETED, 1, newindex);
+ }
+}
+
+/*
+ * Upgrade the index and expunge files for 'mailbox'
+ */
+static int mailbox_upgrade_index(struct mailbox *mailbox)
+{
+ int r;
+ char fnamebuf[MAX_MAILBOX_PATH+1], fnamebufnew[MAX_MAILBOX_PATH+1], *path;
+ FILE *newindex = NULL;
+ int expunge_fd;
+
+ /* Lock files and open new index file */
+ r = mailbox_lock_header(mailbox);
+ if (r) return r;
+ r = mailbox_lock_index_for_upgrade(mailbox);
+ if (r) {
+ mailbox_unlock_header(mailbox);
+ return r;
+ }
+
+ if (!mailbox_doing_reconstruct) {
+ /* If we're reconstructing, we don't open the existing cache file */
+ r = mailbox_lock_pop(mailbox);
+ if (r) {
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ return r;
+ }
+ }
+
+ /* Upgrade index file */
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+
+ strlcpy(fnamebufnew, fnamebuf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ newindex = fopen(fnamebufnew, "w+");
+ if (!newindex) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebufnew);
+ goto fail;
+ }
+
+ mailbox_upgrade_index_work(mailbox, newindex,
+ mailbox->index_base, mailbox->index_len);
+
+ /* Ensure everything made it to disk */
+ fflush(newindex);
+ if (ferror(newindex) ||
+ fsync(fileno(newindex))) {
+ syslog(LOG_ERR, "IOERROR: writing index for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ if (rename(fnamebufnew, fnamebuf)) {
+ syslog(LOG_ERR, "IOERROR: renaming index file for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ fclose(newindex);
+ newindex = NULL;
+
+ /* Upgrade expunge index file */
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_EXPUNGE)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_EXPUNGE_INDEX, sizeof(fnamebuf));
+
+ expunge_fd = open(fnamebuf, O_RDWR, 0666);
+ if (expunge_fd != -1) {
+ struct stat sbuf;
+ const char *lockfailaction;
+ const char *expunge_index_base = NULL;
+ unsigned long expunge_index_len = 0; /* mapped size */
+
+ strlcpy(fnamebufnew, fnamebuf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ newindex = fopen(fnamebufnew, "w+");
+ if (!newindex) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebufnew);
+ close(expunge_fd);
+ goto fail;
+ }
+
+ if ((r = lock_reopen(expunge_fd, fnamebuf, &sbuf, &lockfailaction))) {
+ syslog(LOG_ERR, "IOERROR: %s expunge index for %s: %m",
+ lockfailaction, mailbox->name);
+ close(expunge_fd);
+ goto fail;
+ }
+
+ map_refresh(expunge_fd, 1, &expunge_index_base,
+ &expunge_index_len, sbuf.st_size, "expunge",
+ mailbox->name);
+
+ mailbox_upgrade_index_work(mailbox, newindex,
+ expunge_index_base, expunge_index_len);
+
+ map_free(&expunge_index_base, &expunge_index_len);
+ if (lock_unlock(expunge_fd))
+ syslog(LOG_ERR,
+ "IOERROR: unlocking expunge index of %s: %m",
+ mailbox->name);
+ close(expunge_fd);
+
+ /* Ensure everything made it to disk */
+ fflush(newindex);
+ if (ferror(newindex) ||
+ fsync(fileno(newindex))) {
+ syslog(LOG_ERR, "IOERROR: writing index for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ if (rename(fnamebufnew, fnamebuf)) {
+ syslog(LOG_ERR, "IOERROR: renaming index file for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+ }
+
+ if (!mailbox_doing_reconstruct) mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ if (newindex) fclose(newindex);
+
+ return 0;
+
+ fail:
+ if (!mailbox_doing_reconstruct) mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ if (newindex) fclose(newindex);
+
+ return IMAP_IOERROR;
+}
+
+/*
+ * Expunge decision proc used by mailbox_expunge() (in cleanup mode)
+ * to avoid expunging any messages from cyrus.index
+ */
+static int expungenone(struct mailbox *mailbox __attribute__((unused)),
+ void *rock __attribute__((unused)),
+ char *index __attribute__((unused)),
+ int expunge_flags __attribute__((unused)))
+{
+ return 0;
+}
+
+/*
+ * Expunge decision proc used by mailbox_expunge() (in cleanup mode)
+ * to expunge all messages in cyrus.expunge
+ * Also used by mailbox_rename() to expunge all messages in INBOX
+ */
+static int expungeall(struct mailbox *mailbox __attribute__((unused)),
+ void *rock __attribute__((unused)),
+ char *indexbuf __attribute__((unused)),
+ int expunge_flags __attribute__((unused)))
+{
+ return 1;
+}
+
+static int process_records(struct mailbox *mailbox, FILE *newindex,
+ const char *index_base, unsigned long exists,
+ unsigned long *deleted, unsigned *numdeleted,
+ uquota_t *quotadeleted, unsigned *numansweredflag,
+ unsigned *numdeletedflag, unsigned *numflaggedflag,
+ FILE *newcache, size_t *new_cache_total_size,
+ int expunge_fd, long last_offset,
+ mailbox_decideproc_t *decideproc, void *deciderock,
+ int expunge_flags)
+{
+ char buf[INDEX_HEADER_SIZE > INDEX_RECORD_SIZE ?
+ INDEX_HEADER_SIZE : INDEX_RECORD_SIZE];
+ unsigned msgno;
+ unsigned newexpunged;
+ unsigned newexists;
+ unsigned newdeleted;
+ unsigned newanswered;
+ unsigned newflagged;
+ time_t now = time(NULL);
+ int n;
+
+ /* Copy over records for nondeleted messages */
+ for (msgno = 1; msgno <= exists; msgno++) {
+ /* Copy index record for this message */
+ memcpy(buf,
+ index_base + mailbox->start_offset +
+ (msgno - 1) * mailbox->record_size, mailbox->record_size);
+
+ /* Sanity check */
+ if (*((bit32 *)(buf+OFFSET_UID)) == 0) {
+ syslog(LOG_ERR, "IOERROR: %s zero index/expunge record %u/%lu",
+ mailbox->name, msgno, exists);
+ return IMAP_IOERROR;
+ }
+
+ /* Should we delete the message from the index file? */
+ if (decideproc ? decideproc(mailbox, deciderock, buf, expunge_flags) :
+ (ntohl(*((bit32 *)(buf+OFFSET_SYSTEM_FLAGS))) & FLAG_DELETED)) {
+
+ bit32 sysflags = ntohl(*((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)));
+
+ /* Remember UID and size */
+ deleted[(*numdeleted)++] = ntohl(*((bit32 *)(buf+OFFSET_UID)));
+ *quotadeleted += ntohl(*((bit32 *)(buf+OFFSET_SIZE)));
+
+ /* Update system flag counts accordingly */
+ if (sysflags & FLAG_ANSWERED) (*numansweredflag)++;
+ if (sysflags & FLAG_DELETED) (*numdeletedflag)++;
+ if (sysflags & FLAG_FLAGGED) (*numflaggedflag)++;
+
+ if (expunge_fd != -1) {
+ /* Copy the index record to cyrus.expunge */
+ /* XXX For now, we just append to the end of the file.
+ * For two-phase, we should sort by UID.
+ */
+ *((bit32 *)(buf+OFFSET_LAST_UPDATED)) = htonl(now);
+ n = retry_write(expunge_fd, buf, mailbox->record_size);
+ if (n != mailbox->record_size) {
+ syslog(LOG_ERR,
+ "IOERROR: writing expunge index record %u for %s: %m",
+ msgno, mailbox->name);
+ ftruncate(expunge_fd, last_offset);
+ return IMAP_IOERROR;
+ }
+ }
+ } else if (newcache) {
+ /* Keep this message and update the index/cache record */
+ size_t cache_record_size;
+ unsigned long cache_offset;
+ unsigned int cache_ent;
+ const char *cacheitem, *cacheitembegin;
+
+ cache_offset = ntohl(*((bit32 *)(buf+OFFSET_CACHE_OFFSET)));
+
+ if (cache_offset == 0) {
+ syslog(LOG_ERR, "IOERROR: reading index header for %s: got 0 cache_offset on message %u/%lu; trying recovery",
+ mailbox->name, msgno, mailbox->exists);
+ continue;
+ }
+
+ /* Fix up cache file offset */
+ *((bit32 *)(buf+OFFSET_CACHE_OFFSET)) =
+ htonl(*new_cache_total_size);
+ if (newindex) fwrite(buf, 1, mailbox->record_size, newindex);
+
+ /* Compute size of this record */
+ cacheitembegin = cacheitem = mailbox->cache_base + cache_offset;
+ for (cache_ent = 0; cache_ent < NUM_CACHE_FIELDS; cache_ent++) {
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ }
+ cache_record_size = (cacheitem - cacheitembegin);
+ *new_cache_total_size += cache_record_size;
+
+ /* fwrite will automatically call write() in a sane way */
+ fwrite(cacheitembegin, 1, cache_record_size, newcache);
+
+ } else if (newindex) {
+ /* Keep this message, but just update the index record */
+ fwrite(buf, 1, mailbox->record_size, newindex);
+ }
+ }
+
+ if (!newindex) return 0;
+
+ /* Fix up information in index header */
+ rewind(newindex);
+ n = fread(buf, 1, mailbox->start_offset, newindex);
+ if ((unsigned long) n != mailbox->start_offset) {
+ syslog(LOG_ERR,
+ "IOERROR: reading index header for %s: got %d of %ld",
+ mailbox->name, n, mailbox->start_offset);
+ return IMAP_IOERROR;
+ }
+
+ /* Fix up exists */
+ newexists = ntohl(*((bit32 *)(buf+OFFSET_EXISTS))) - *numdeleted;
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(newexists);
+
+ /* Fix up expunged count */
+ if (newcache) {
+ *((bit32 *)(buf+OFFSET_LEAKED_CACHE)) = htonl(0);
+ } else {
+ newexpunged = ntohl(*((bit32 *)(buf+OFFSET_LEAKED_CACHE))) + *numdeleted;
+ *((bit32 *)(buf+OFFSET_LEAKED_CACHE)) = htonl(newexpunged);
+ }
+
+ /* Fix up other counts */
+ newanswered = ntohl(*((bit32 *)(buf+OFFSET_ANSWERED))) - *numansweredflag;
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(newanswered);
+ newdeleted = ntohl(*((bit32 *)(buf+OFFSET_DELETED))) - *numdeletedflag;
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(newdeleted);
+ newflagged = ntohl(*((bit32 *)(buf+OFFSET_FLAGGED))) - *numflaggedflag;
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(newflagged);
+
+ /* Fix up quota_mailbox_used */
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) =
+ htonll(ntohll(*((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64))) - *quotadeleted);
+#else
+ /* zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) =
+ htonl(ntohl(*((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED))) - *quotadeleted);
+#endif
+
+ /* Fix up start offset if necessary */
+ if (mailbox->start_offset < INDEX_HEADER_SIZE) {
+ *((bit32 *)(buf+OFFSET_START_OFFSET)) = htonl(INDEX_HEADER_SIZE);
+ }
+
+ /* Write out new index header */
+ rewind(newindex);
+ fwrite(buf, 1, mailbox->start_offset, newindex);
+
+ return 0;
+}
+
+/*
+ * Perform an expunge operation on 'mailbox'. If nonzero, the
+ * function pointed to by 'decideproc' is called (with 'deciderock') to
+ * determine which messages to expunge. If 'decideproc' is a null pointer,
+ * then messages with the \Deleted flag are expunged. If 'flags' includes
+ * EXPUNGE_FORCE, then messages will be expunged immediately, regardless of
+ * expunge_mode. If 'flags' includes EXPUNGE_CLEANUP, then any previously
+ * delayed expunges will be completed (remove leaked cache entries
+ * and delete messages files).
+ *
+ * The following files are updated for the various modes:
+ * - immediate mode: cyrus.index, cyrus.cache, quota.db, messages
+ * - delayed mode: cyrus.index, cyrus.expunge, quota.db
+ * - cleanup mode: cyrus.index, cyrus.cache, cyrus.expunge, messages
+ */
+int mailbox_expunge(struct mailbox *mailbox,
+ mailbox_decideproc_t *decideproc, void *deciderock,
+ int flags)
+{
+ enum enum_value config_expunge_mode = config_getenum(IMAPOPT_EXPUNGE_MODE);
+ int r, n;
+ struct fnamepath fpath;
+ struct fnamebuf *fname;
+ char fnamebufnew[MAX_MAILBOX_PATH+1];
+ FILE *newindex = NULL, *newcache = NULL, *newexpungeindex = NULL;
+ unsigned long *deleted = 0;
+ unsigned numdeleted = 0;
+ uquota_t quotadeleted = 0;
+ unsigned numansweredflag = 0;
+ unsigned numdeletedflag = 0;
+ unsigned numflaggedflag = 0;
+ unsigned newexists;
+ unsigned newdeleted;
+ unsigned newanswered;
+ unsigned newflagged;
+
+ char buf[INDEX_HEADER_SIZE > INDEX_RECORD_SIZE ?
+ INDEX_HEADER_SIZE : INDEX_RECORD_SIZE];
+ unsigned msgno;
+ struct stat sbuf;
+ struct txn *tid = NULL;
+
+ /* Offset into the new cache file for use when updating the index record */
+ size_t new_cache_total_size = sizeof(bit32);
+
+ /* delayed expunge related stuff */
+ int expunge_fd = -1;
+ long last_offset = 0;
+ const char *expunge_index_base = NULL;
+ unsigned long expunge_index_len = 0; /* mapped size */
+ time_t now = time(NULL);
+ unsigned long expunge_exists = 0;
+
+ /* EXPUNGE_FORCE means immediate mode */
+ if (flags == EXPUNGE_FORCE)
+ config_expunge_mode = IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE;
+
+ /* initialize the paths */
+ mailbox_meta_get_fname(&fpath, mailbox, 0);
+
+ /* If we're in delayed or cleanup mode, open the expunge index */
+ if ((config_expunge_mode != IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE) ||
+ (flags & EXPUNGE_CLEANUP)) {
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_EXPUNGE);
+
+ expunge_fd = open(fname->buf, O_RDWR, 0666);
+ if (expunge_fd == -1 && errno == ENOENT &&
+ !(flags & EXPUNGE_CLEANUP)) {
+ /* we're not in cleanup mode, try creating one */
+ expunge_fd = open(fname->buf, O_RDWR|O_CREAT, 0666);
+ }
+ if (expunge_fd == -1) {
+ if (errno == ENOENT && (flags & EXPUNGE_CLEANUP)) {
+ /* we're doing cleanup and no cyrus.expunge */
+ if (flags == EXPUNGE_CLEANUP) {
+ /* we're ONLY doing cleanup, so we're done */
+ return 0;
+ }
+ } else {
+ syslog(LOG_ERR, "IOERROR: opening %s: %m", fname->buf);
+ return IMAP_IOERROR;
+ }
+ }
+ }
+
+ /* Lock files and open new index file */
+ r = mailbox_lock_header(mailbox);
+ if (r) return r;
+ r = mailbox_lock_index(mailbox);
+ if (r) {
+ mailbox_unlock_header(mailbox);
+ return r;
+ }
+
+ r = mailbox_lock_pop(mailbox);
+ if (r) {
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ return r;
+ }
+
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_INDEX);
+ strlcat(fname->buf, ".NEW", sizeof(fname->buf));
+
+ newindex = fopen(fname->buf, "w+");
+ if (!newindex) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fname->buf);
+ mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ return IMAP_IOERROR;
+ }
+
+ /* If we're in immediate or cleanup mode, open cache files */
+ if ((config_expunge_mode == IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE) ||
+ (flags & EXPUNGE_CLEANUP)) {
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_CACHE);
+
+ if (fstat(mailbox->cache_fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating %s: %m", fname->buf);
+ fatal("can't fstat cache file", EC_OSFILE);
+ }
+ mailbox->cache_size = sbuf.st_size;
+ map_refresh(mailbox->cache_fd, 0, &mailbox->cache_base,
+ &mailbox->cache_len, mailbox->cache_size,
+ "cache", mailbox->name);
+
+ strlcat(fname->buf, ".NEW", sizeof(fname->buf));
+
+ newcache = fopen(fname->buf, "w+");
+ if (!newcache) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fname->buf);
+ fclose(newindex);
+ mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ return IMAP_IOERROR;
+ }
+ }
+
+ /* Copy over index header */
+ memcpy(buf, mailbox->index_base, mailbox->start_offset);
+
+ /* Update Generation Number */
+ if (newcache) {
+ *((bit32 *)buf+OFFSET_GENERATION_NO) = htonl(mailbox->generation_no+1);
+
+ /* Write generation number to cache file */
+ fwrite(buf, 1, sizeof(bit32), newcache);
+ }
+
+ /* Write out new index header */
+ fwrite(buf, 1, mailbox->start_offset, newindex);
+
+ /* Grow the index header if necessary */
+ for (n = mailbox->start_offset; n < INDEX_HEADER_SIZE; n++) {
+ if (n == OFFSET_UIDVALIDITY+3) {
+ putc(1, newindex);
+ }
+ else {
+ putc(0, newindex);
+ }
+ }
+
+ /* If we're using cyrus.expunge, lock it */
+ if (expunge_fd != -1) {
+ const char *lockfailaction;
+
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_EXPUNGE);
+
+ if ((r = lock_reopen(expunge_fd, fname->buf, &sbuf, &lockfailaction))) {
+ syslog(LOG_ERR, "IOERROR: %s expunge index for %s: %m",
+ lockfailaction, mailbox->name);
+ close(expunge_fd);
+ }
+ else {
+ /* Read the expunge index */
+ if (!sbuf.st_size) {
+ /* Empty cyrus.expunge, create a header */
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(0);
+
+ /* quotas may be 64bit now */
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonll(0);
+#else
+ /* zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) = htonl(0);
+#endif
+
+ *((bit32 *)(buf+OFFSET_LEAKED_CACHE)) = htonl(0);
+
+ n = retry_write(expunge_fd, buf, mailbox->start_offset);
+
+ /* Ensure everything made it to disk */
+ if (n != mailbox->start_offset || fsync(expunge_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing expunge index for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ sbuf.st_size = mailbox->start_offset;
+ }
+
+ map_refresh(expunge_fd, 1, &expunge_index_base,
+ &expunge_index_len, sbuf.st_size, "expunge",
+ mailbox->name);
+
+ expunge_exists = ntohl(*((bit32 *)(expunge_index_base+OFFSET_EXISTS)));
+
+ /* Skip to end of file, so we can append new records */
+ last_offset = mailbox->start_offset +
+ expunge_exists * mailbox->record_size;
+ lseek(expunge_fd, last_offset, SEEK_SET);
+
+ if ((flags & EXPUNGE_CLEANUP) && expunge_exists && decideproc) {
+ /* If we're doing a cleanup and there's a chance that we'll
+ * leave expunged messages behind, open a new expunge file.
+ */
+ strlcat(fname->buf, ".NEW", sizeof(fname->buf));
+
+ newexpungeindex = fopen(fname->buf, "w+");
+ if (!newexpungeindex) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fname->buf);
+ map_free(&expunge_index_base, &expunge_index_len);
+ if (lock_unlock(expunge_fd))
+ syslog(LOG_ERR,
+ "IOERROR: unlocking expunge index of %s: %m",
+ mailbox->name);
+ r = IMAP_IOERROR;
+ }
+ }
+ }
+
+ if (r) {
+ mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ return IMAP_IOERROR;
+ }
+ }
+
+ /* Allocate array for deleted msgnos */
+ if (mailbox->exists || expunge_exists) {
+ /* XXX kludge: not all mallocs return a valid pointer to 0 bytes;
+ some have the good sense to return 0 */
+ deleted = (unsigned long *)
+ xmalloc((mailbox->exists + expunge_exists) * sizeof(unsigned long));
+ }
+
+ /* If we're doing a cleanup w/o a decideproc, use expungenone()
+ so we don't delete any records from cyrus.index. */
+ if ((flags & EXPUNGE_CLEANUP) && !decideproc) decideproc = expungenone;
+
+ /* Copy over records for nondeleted messages */
+ r = process_records(mailbox, newindex, mailbox->index_base,
+ mailbox->exists, deleted, &numdeleted,
+ "adeleted, &numansweredflag, &numdeletedflag,
+ &numflaggedflag, newcache, &new_cache_total_size,
+ expunge_fd, last_offset, decideproc, deciderock, 0);
+ if (r) goto fail;
+
+ /* Record quota release */
+ r = quota_read(&mailbox->quota, &tid, 1);
+ if (!r) {
+ if (mailbox->quota.used >= quotadeleted) {
+ mailbox->quota.used -= quotadeleted;
+ }
+ else {
+ mailbox->quota.used = 0;
+ }
+ r = quota_write(&mailbox->quota, &tid);
+ if (!r) quota_commit(&tid);
+ else {
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record free of " UQUOTA_T_FMT " bytes in quota %s",
+ quotadeleted, mailbox->quota.root);
+ }
+ }
+ else if (r != IMAP_QUOTAROOT_NONEXISTENT) goto fail;
+
+ if (flags & EXPUNGE_CLEANUP) {
+ unsigned new_deleted = numdeleted;
+
+ if (newexpungeindex) {
+ /* Copy over expunge index header */
+ memcpy(buf, expunge_index_base, mailbox->start_offset);
+
+ /* Update Generation Number */
+ *((bit32 *)buf+OFFSET_GENERATION_NO) = htonl(mailbox->generation_no+1);
+
+ /* Write out new expunge index header */
+ fwrite(buf, 1, mailbox->start_offset, newexpungeindex);
+ }
+
+ /* If we're doing a cleanup w/o a decideproc, use expungeall()
+ so we delete all records from cyrus.expunge. */
+ if (decideproc == expungenone) decideproc = expungeall;
+
+ /* Copy over records for nonpurged messages */
+ r = process_records(mailbox, newexpungeindex, expunge_index_base,
+ expunge_exists, deleted, &numdeleted,
+ "adeleted, &numansweredflag, &numdeletedflag,
+ &numflaggedflag, newcache, &new_cache_total_size,
+ -1, 0, decideproc, deciderock, EXPUNGE_CLEANUP);
+ if (r) goto fail;
+ expunge_exists -= (numdeleted - new_deleted);
+ }
+ else if (config_expunge_mode != IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE) {
+ /* Fix up information in expunge index header */
+ lseek(expunge_fd, 0, SEEK_SET);
+ n = read(expunge_fd, buf, mailbox->start_offset);
+ if ((unsigned long)n != mailbox->start_offset) {
+ syslog(LOG_ERR,
+ "IOERROR: reading expunge index header for %s: got %d of %ld",
+ mailbox->name, n, mailbox->start_offset);
+ ftruncate(expunge_fd, last_offset);
+ goto fail;
+ }
+
+ /* Update appenddate */
+ *((bit32 *)(buf+OFFSET_LAST_APPENDDATE)) = htonl(now);
+
+ /* Fix up exists */
+ newexists = ntohl(*((bit32 *)(buf+OFFSET_EXISTS)))+numdeleted;
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(newexists);
+
+ /* Fix up other counts */
+ newanswered = ntohl(*((bit32 *)(buf+OFFSET_ANSWERED)))+numansweredflag;
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(newanswered);
+ newdeleted = ntohl(*((bit32 *)(buf+OFFSET_DELETED)))+numdeletedflag;
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(newdeleted);
+ newflagged = ntohl(*((bit32 *)(buf+OFFSET_FLAGGED)))+numflaggedflag;
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(newflagged);
+
+ /* Fix up quota_mailbox_used */
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) =
+ htonll(ntohll(*((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)))+quotadeleted);
+#else
+ /* zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) =
+ htonl(ntohl(*((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)))+quotadeleted);
+#endif
+
+ /* Fix up start offset if necessary */
+ if (mailbox->start_offset < INDEX_HEADER_SIZE) {
+ *((bit32 *)(buf+OFFSET_START_OFFSET)) = htonl(INDEX_HEADER_SIZE);
+ }
+
+ /* Write out new cyrus.expunge header */
+ lseek(expunge_fd, 0, SEEK_SET);
+ n = retry_write(expunge_fd, buf, mailbox->start_offset);
+
+ /* Ensure everything made it to disk */
+ if (n != mailbox->start_offset || fsync(expunge_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing index/cache for %s: %m",
+ mailbox->name);
+ ftruncate(expunge_fd, last_offset);
+ goto fail;
+ }
+ }
+
+ /* Ensure everything made it to disk */
+ fflush(newindex);
+ if (newcache) fflush(newcache);
+ if (newexpungeindex) fflush(newexpungeindex);
+ if (ferror(newindex) || fsync(fileno(newindex)) ||
+ (newcache && (ferror(newcache) || fsync(fileno(newcache)))) ||
+ (newexpungeindex &&
+ (ferror(newexpungeindex) || fsync(fileno(newexpungeindex))))) {
+ syslog(LOG_ERR, "IOERROR: writing index/cache/expunge for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ /* Rename/close our files */
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_INDEX);
+
+ strlcpy(fnamebufnew, fname->buf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ if (rename(fnamebufnew, fname->buf)) {
+ syslog(LOG_ERR, "IOERROR: renaming index file for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ if (newcache) {
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_CACHE);
+
+ strlcpy(fnamebufnew, fname->buf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ if (rename(fnamebufnew, fname->buf)) {
+ syslog(LOG_CRIT,
+ "CRITICAL IOERROR: renaming cache file for %s, need to reconstruct: %m",
+ mailbox->name);
+ /* Fall through and delete message files anyway */
+ }
+ }
+
+ if (flags & EXPUNGE_CLEANUP) {
+ fname = mailbox_meta_get_fname(&fpath, mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_EXPUNGE);
+
+ if (newexpungeindex) {
+ strlcpy(fnamebufnew, fname->buf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ if (rename(fnamebufnew, fname->buf)) {
+ syslog(LOG_CRIT,
+ "CRITICAL IOERROR: renaming cache file for %s, need to reconstruct: %m",
+ mailbox->name);
+ /* Fall through and delete message files anyway */
+ }
+
+ fclose(newexpungeindex);
+ }
+
+ if (!expunge_exists) {
+ /* We deleted all cyrus.expunge records, so delete the file */
+ unlink(fname->buf);
+ }
+ }
+ else if (numdeleted) {
+ if (updatenotifier) updatenotifier(mailbox);
+ }
+
+ mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ if (expunge_fd != -1) {
+ if (lock_unlock(expunge_fd))
+ syslog(LOG_ERR, "IOERROR: unlocking expunge index of %s: %m",
+ mailbox->name);
+ close(expunge_fd);
+ }
+ if (expunge_index_base) map_free(&expunge_index_base, &expunge_index_len);
+ fclose(newindex);
+
+ if (newcache) {
+ fclose(newcache);
+
+ /* Delete message files */
+ fname = &fpath.data;
+ *(fname->tail)++ = '/';
+ fname->len++;
+ for (msgno = 0; msgno < numdeleted; msgno++) {
+ mailbox_message_get_fname(mailbox, deleted[msgno],
+ fname->tail,
+ sizeof(fname->buf) - fname->len);
+ unlink(fname->buf);
+ }
+ }
+
+ if (numdeleted > 0) {
+ syslog(LOG_NOTICE, "Expunged %d messages from %s",
+ numdeleted, mailbox->name);
+ }
+
+ if (deleted) free(deleted);
+
+ return 0;
+
+ fail:
+ if (deleted) free(deleted);
+ if (newindex) fclose(newindex);
+ if (newcache) fclose(newcache);
+ if (expunge_fd != -1) {
+ if (lock_unlock(expunge_fd))
+ syslog(LOG_ERR, "IOERROR: unlocking expunge index of %s: %m",
+ mailbox->name);
+ close(expunge_fd);
+ }
+ if (expunge_index_base) map_free(&expunge_index_base, &expunge_index_len);
+ if (newexpungeindex) fclose(newexpungeindex);
+ mailbox_unlock_pop(mailbox);
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+ return IMAP_IOERROR;
+}
+
+int mailbox_create(const char *name,
+ char *partition,
+ const char *acl,
+ const char *uniqueid,
+ int format,
+ struct mailbox *mailboxp)
+{
+ int r;
+ char quota_root[MAX_MAILBOX_PATH+1];
+ int hasquota;
+ char *path, *mpath;
+ struct fnamepath fpath;
+ struct fnamebuf *fname;
+ struct mailbox mailbox;
+ int save_errno;
+ int n;
+ const char *lockfailaction;
+ struct stat sbuf;
+
+ r = mboxlist_getpath(partition, name, &path, &mpath);
+ if (r) return r;
+
+ if (cyrus_mkdir(path, 0755) == -1) return IMAP_IOERROR;
+ if (mkdir(path, 0755) == -1 && errno != EEXIST) {
+ save_errno = errno;
+ if (stat(path, &sbuf) == -1) {
+ errno = save_errno;
+ syslog(LOG_ERR, "IOERROR: creating directory %s: %m", path);
+ return IMAP_IOERROR;
+ }
+ }
+
+ if (mpath && config_metapartition_files) {
+ if (cyrus_mkdir(mpath, 0755) == -1) return IMAP_IOERROR;
+ if (mkdir(mpath, 0755) == -1 && errno != EEXIST) {
+ save_errno = errno;
+ if (stat(mpath, &sbuf) == -1) {
+ errno = save_errno;
+ syslog(LOG_ERR, "IOERROR: creating directory %s: %m", mpath);
+ return IMAP_IOERROR;
+ }
+ }
+ }
+
+ zeromailbox(mailbox);
+
+ mailbox.name = xstrdup(name);
+ mailbox.path = xstrdup(path);
+ if (mpath) mailbox.mpath = xstrdup(mpath);
+ mailbox.acl = xstrdup(acl);
+
+ hasquota = quota_findroot(quota_root, sizeof(quota_root), name);
+
+ /* Initialize the paths */
+ mailbox_meta_get_fname(&fpath, &mailbox, 0);
+
+ fname = mailbox_meta_get_fname(&fpath, &mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_HEADER);
+ /* Bounds Check */
+ if(!fname) {
+ syslog(LOG_ERR, "IOERROR: Mailbox name too long (%s + %s)",
+ fname->buf, FNAME_HEADER);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ mailbox.header_fd = open(fname->buf, O_RDWR|O_TRUNC|O_CREAT, 0666);
+ if (mailbox.header_fd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fname->buf);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ /* Note that we are locking the mailbox here. Technically, this function
+ * can be called with a lock on the mailbox list. This would otherwise
+ * violate the locking semantics, but it is okay since the mailbox list
+ * changes have not been committed, and the mailbox we create here *can't*
+ * be opened by anyone else */
+
+ r = lock_reopen(mailbox.header_fd, fname->buf, NULL, &lockfailaction);
+ if(r) {
+ syslog(LOG_ERR, "IOERROR: %s header for new mailbox %s: %m",
+ lockfailaction, mailbox.name);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+ mailbox.header_lock_count++;
+
+ fname = mailbox_meta_get_fname(&fpath, &mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_INDEX);
+ /* Bounds Check */
+ if(!fname) {
+ syslog(LOG_ERR, "IOERROR: Mailbox name too long (%s + %s)",
+ fname->buf, FNAME_INDEX);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ mailbox.index_fd = open(fname->buf, O_RDWR|O_TRUNC|O_CREAT, 0666);
+ if (mailbox.index_fd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fname->buf);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ r = lock_reopen(mailbox.index_fd, fname->buf, NULL, &lockfailaction);
+ if(r) {
+ syslog(LOG_ERR, "IOERROR: %s index for new mailbox %s: %m",
+ lockfailaction, mailbox.name);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+ mailbox.index_lock_count++;
+
+ fname = mailbox_meta_get_fname(&fpath, &mailbox,
+ IMAP_ENUM_METAPARTITION_FILES_CACHE);
+ /* Bounds Check */
+ if(!fname) {
+ syslog(LOG_ERR, "IOERROR: Mailbox name too long (%s + %s)",
+ fname->buf, FNAME_CACHE);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ mailbox.cache_fd = open(fname->buf, O_RDWR|O_TRUNC|O_CREAT, 0666);
+ if (mailbox.cache_fd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fname->buf);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ if (hasquota) mailbox.quota.root = xstrdup(quota_root);
+ mailbox.generation_no = 0;
+ mailbox.format = format;
+ mailbox.minor_version = MAILBOX_MINOR_VERSION;
+ mailbox.start_offset = INDEX_HEADER_SIZE;
+ mailbox.record_size = INDEX_RECORD_SIZE;
+ mailbox.exists = 0;
+ mailbox.last_appenddate = 0;
+ mailbox.last_uid = 0;
+ mailbox.quota_mailbox_used = 0;
+ mailbox.pop3_last_login = 0;
+ mailbox.uidvalidity = time(0);
+ mailbox.deleted = 0;
+ mailbox.answered = 0;
+ mailbox.flagged = 0;
+ mailbox.options = OPT_POP3_NEW_UIDL;
+ mailbox.leaked_cache_records = 0;
+ mailbox.highestmodseq = 1;
+
+ if (!uniqueid) {
+ size_t unique_size = sizeof(char) * 32;
+ mailbox.uniqueid = xmalloc(unique_size);
+ mailbox_make_uniqueid(mailbox.name, mailbox.uidvalidity,
+ mailbox.uniqueid, unique_size);
+ } else {
+ mailbox.uniqueid = xstrdup(uniqueid);
+ }
+
+ r = mailbox_write_header(&mailbox);
+ if (!r) r = mailbox_write_index_header(&mailbox);
+ if (!r) {
+ n = retry_write(mailbox.cache_fd, (char *)&mailbox.generation_no, 4);
+ if (n != 4 || fsync(mailbox.cache_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing initial cache for %s: %m",
+ mailbox.name);
+ r = IMAP_IOERROR;
+ }
+ }
+ if (!r) r = seen_create_mailbox(&mailbox);
+
+ if (mailboxp) {
+ *mailboxp = mailbox;
+ }
+ else {
+ mailbox_close(&mailbox);
+ }
+ return r;
+}
+
+/*
+ * Delete and close the mailbox 'mailbox'. Closes 'mailbox' whether
+ * or not the deletion was successful. Requires a locked mailbox.
+ */
+int mailbox_delete(struct mailbox *mailbox, int delete_quota_root)
+{
+ int r, rquota = 0;
+ DIR *dirp;
+ struct dirent *f;
+ char buf[MAX_MAILBOX_PATH+1], *path;
+ char *tail;
+ struct txn *tid = NULL;
+
+ /* Ensure that we are locked */
+ if(!mailbox->header_lock_count) return IMAP_INTERNAL;
+
+ rquota = quota_read(&mailbox->quota, &tid, 1);
+
+ seen_delete_mailbox(mailbox);
+
+ if (delete_quota_root && !rquota) {
+ quota_delete(&mailbox->quota, &tid);
+ free(mailbox->quota.root);
+ mailbox->quota.root = NULL;
+ } else if (!rquota) {
+ /* Free any quota being used by this mailbox */
+ if (mailbox->quota.used >= mailbox->quota_mailbox_used) {
+ mailbox->quota.used -= mailbox->quota_mailbox_used;
+ }
+ else {
+ mailbox->quota.used = 0;
+ }
+ r = quota_write(&mailbox->quota, &tid);
+ if (r) {
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record free of " UQUOTA_T_FMT " bytes in quota %s",
+ mailbox->quota_mailbox_used, mailbox->quota.root);
+ }
+ else
+ quota_commit(&tid);
+ }
+
+ /* remove data (message file) directory */
+ path = mailbox->path;
+
+ do {
+ /* remove all files in directory */
+ strlcpy(buf, path, sizeof(buf));
+
+ if(strlen(buf) >= sizeof(buf) - 2) {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s)", buf);
+ fatal("path too long", EC_OSFILE);
+ }
+
+ tail = buf + strlen(buf);
+ *tail++ = '/';
+ *tail = '\0';
+ dirp = opendir(path);
+ if (dirp) {
+ while ((f = readdir(dirp))!=NULL) {
+ if (f->d_name[0] == '.'
+ && (f->d_name[1] == '\0'
+ || (f->d_name[1] == '.' &&
+ f->d_name[2] == '\0'))) {
+ /* readdir() can return "." or "..", and I got a bug report
+ that SCO might blow the file system to smithereens if we
+ unlink(".."). Let's not do that. */
+ continue;
+ }
+
+ if(strlen(buf) + strlen(f->d_name) >= sizeof(buf)) {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ buf, f->d_name);
+ fatal("Path too long", EC_OSFILE);
+ }
+ strcpy(tail, f->d_name);
+ unlink(buf);
+ *tail = '\0';
+ }
+ closedir(dirp);
+ }
+
+ /* Remove empty directories, going up path */
+ tail--;
+ do {
+ *tail = '\0';
+ } while (rmdir(buf) == 0 && (tail = strrchr(buf, '/')));
+
+ /* remove metadata directory (if exists) */
+ } while (mailbox->mpath && (path != mailbox->mpath) &&
+ (path = mailbox->mpath));
+
+ syslog(LOG_NOTICE, "Deleted mailbox %s", mailbox->name);
+ mailbox_close(mailbox);
+ return 0;
+}
+
+/* if 'isinbox' is set, we perform the funky RENAME INBOX INBOX.old
+ semantics, regardless of whether or not the name of the mailbox is
+ 'user.foo'.*/
+/* requires a LOCKED oldmailbox pointer */
+int mailbox_rename_copy(struct mailbox *oldmailbox,
+ const char *newname,
+ char *newpartition,
+ bit32 *olduidvalidityp, bit32 *newuidvalidityp,
+ struct mailbox *newmailbox)
+{
+ int r;
+ unsigned int flag, msgno;
+ struct index_record record;
+ struct fnamepath oldfpath, newfpath;
+ struct fnamebuf *oldfname, *newfname;
+ struct txn *tid = NULL;
+
+ assert(oldmailbox->header_lock_count > 0
+ && oldmailbox->index_lock_count > 0);
+
+ /* Create new mailbox */
+ r = mailbox_create(newname, newpartition,
+ oldmailbox->acl, oldmailbox->uniqueid,
+ oldmailbox->format, newmailbox);
+
+ if (r) return r;
+
+ if (strcmp(oldmailbox->name, newname) == 0) {
+ /* Just moving mailboxes between partitions */
+ newmailbox->uidvalidity = oldmailbox->uidvalidity;
+ }
+
+ if (olduidvalidityp) *olduidvalidityp = oldmailbox->uidvalidity;
+ if (newuidvalidityp) *newuidvalidityp = newmailbox->uidvalidity;
+
+ /* Copy flag names */
+ for (flag = 0; flag < MAX_USER_FLAGS; flag++) {
+ if (oldmailbox->flagname[flag]) {
+ newmailbox->flagname[flag] = xstrdup(oldmailbox->flagname[flag]);
+ }
+ }
+ r = mailbox_write_header(newmailbox);
+ if (r) {
+ mailbox_close(newmailbox);
+ return r;
+ }
+
+ /* Check quota if necessary */
+ if (newmailbox->quota.root) {
+ r = quota_read(&(newmailbox->quota), &tid, 1);
+ if (!oldmailbox->quota.root ||
+ strcmp(oldmailbox->quota.root, newmailbox->quota.root) != 0) {
+ if (!r && newmailbox->quota.limit >= 0 &&
+ newmailbox->quota.used + oldmailbox->quota_mailbox_used >
+ ((uquota_t) newmailbox->quota.limit * QUOTA_UNITS)) {
+ r = IMAP_QUOTA_EXCEEDED;
+ }
+ }
+ if (r && r != IMAP_QUOTAROOT_NONEXISTENT) {
+ mailbox_close(newmailbox);
+ return r;
+ }
+ }
+
+ /* Initialize the paths */
+ mailbox_meta_get_fname(&oldfpath, oldmailbox, 0);
+ mailbox_meta_get_fname(&newfpath, newmailbox, 0);
+
+ /* Copy over index/cache files */
+ oldfname = mailbox_meta_get_fname(&oldfpath, oldmailbox,
+ IMAP_ENUM_METAPARTITION_FILES_INDEX);
+ newfname = mailbox_meta_get_fname(&newfpath, newmailbox,
+ IMAP_ENUM_METAPARTITION_FILES_INDEX);
+
+ /* Check to see if we're going to be over-long */
+ if (!oldfname) {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ oldfname->buf, FNAME_INDEX);
+ fatal("Path Too Long", EC_OSFILE);
+ }
+ if (!newfname) {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ newfname->buf, FNAME_INDEX);
+ fatal("Path Too Long", EC_OSFILE);
+ }
+
+ unlink(newfname->buf); /* Make link() possible */
+
+ r = mailbox_copyfile(oldfname->buf, newfname->buf, 0);
+
+ oldfname = mailbox_meta_get_fname(&oldfpath, oldmailbox,
+ IMAP_ENUM_METAPARTITION_FILES_CACHE);
+ newfname = mailbox_meta_get_fname(&newfpath, newmailbox,
+ IMAP_ENUM_METAPARTITION_FILES_CACHE);
+
+ /* Check to see if we're going to be over-long */
+ if (!oldfname) {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ oldfname->buf, FNAME_CACHE);
+ fatal("Path Too Long", EC_OSFILE);
+ }
+ if (!newfname) {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ newfname->buf, FNAME_CACHE);
+ fatal("Path Too Long", EC_OSFILE);
+ }
+
+ unlink(newfname->buf);
+
+ if (!r) r = mailbox_copyfile(oldfname->buf, newfname->buf, 0);
+ if (r) {
+ mailbox_close(newmailbox);
+ return r;
+ }
+
+ /* XXX For two-phase expunge, we also need to copy cyrus.expunge */
+
+ /* Re-open index file and store new uidvalidity */
+ close(newmailbox->index_fd);
+ newmailbox->index_fd = dup(oldmailbox->index_fd);
+ (void) mailbox_read_index_header(newmailbox);
+ newmailbox->generation_no = oldmailbox->generation_no;
+ (void) mailbox_write_index_header(newmailbox);
+
+ /* Copy over message files */
+ oldfname = &oldfpath.data;
+ *(oldfname->tail)++ = '/';
+ oldfname->len++;
+ newfname = &newfpath.data;
+ *(newfname->tail)++ = '/';
+ newfname->len++;
+
+ for (msgno = 1; msgno <= oldmailbox->exists; msgno++) {
+ r = mailbox_read_index_record(oldmailbox, msgno, &record);
+ if (r) break;
+ mailbox_message_get_fname(oldmailbox, record.uid, oldfname->tail,
+ sizeof(oldfname->buf) - oldfname->len);
+
+ if(newfname->len + strlen(oldfname->tail) >= sizeof(newfname->buf)) {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ newfname->buf, oldfname->tail);
+ fatal("Path too long", EC_OSFILE);
+ }
+
+ strcpy(newfname->tail, oldfname->tail);
+
+ r = mailbox_copyfile(oldfname->buf, newfname->buf, 0);
+ if (r) break;
+ }
+ if (!r) r = seen_copy(oldmailbox, newmailbox);
+
+ /* XXX For two-phase expunge, we also need to copy message files
+ referenced by cyrus.expunge */
+
+ /* Record new quota usage */
+ if (!r && newmailbox->quota.root) {
+ newmailbox->quota.used += oldmailbox->quota_mailbox_used;
+ r = quota_write(&(newmailbox->quota), &tid);
+ if (!r) quota_commit(&tid);
+ }
+ if (r) {
+ /* failure and back out */
+ for (msgno = 1; msgno <= oldmailbox->exists; msgno++) {
+ if (mailbox_read_index_record(oldmailbox, msgno, &record))
+ continue;
+ mailbox_message_get_fname(oldmailbox, record.uid, newfname->tail,
+ sizeof(newfname->buf) - newfname->len);
+ (void) unlink(newfname->buf);
+ }
+ }
+
+ return r;
+}
+
+int mailbox_rename_cleanup(struct mailbox *oldmailbox, int isinbox)
+{
+ int r = 0;
+
+ if (isinbox) {
+ /* Expunge old mailbox */
+ r = mailbox_expunge(oldmailbox, expungeall, (char *)0, EXPUNGE_FORCE);
+ } else {
+ r = mailbox_delete(oldmailbox, 0);
+ }
+
+ if(r) {
+ syslog(LOG_CRIT,
+ "Rename Failure during mailbox_rename_cleanup (%s), " \
+ "potential leaked space (%s)", oldmailbox->name,
+ error_message(r));
+ }
+
+ return r;
+}
+
+
+/*
+ * Synchronize 'new' mailbox to 'old' mailbox.
+ */
+int
+mailbox_sync(const char *oldname, const char *oldpath,
+ const char *oldmpath, const char *oldacl,
+ const char *newname, char *newpath, char *newmpath, int docreate,
+ bit32 *olduidvalidityp, bit32 *newuidvalidityp,
+ struct mailbox *mailboxp)
+{
+ int r, r2;
+ struct mailbox oldmailbox, newmailbox;
+ unsigned int flag, oldmsgno, newmsgno;
+ struct index_record oldrecord, newrecord;
+ char oldfname[MAX_MAILBOX_PATH+1], newfname[MAX_MAILBOX_PATH+1];
+ size_t oldfname_len, newfname_len, fn_len;
+ char *oldfnametail, *newfnametail;
+ struct txn *tid = NULL;
+
+ /* Open old mailbox and lock */
+ mailbox_open_header_path(oldname, oldpath, oldmpath,
+ oldacl, 0, &oldmailbox, 0);
+
+ if (oldmailbox.format == MAILBOX_FORMAT_NETNEWS) {
+ mailbox_close(&oldmailbox);
+ return IMAP_MAILBOX_NOTSUPPORTED;
+ }
+
+ r = mailbox_lock_header(&oldmailbox);
+ if (!r) r = mailbox_open_index(&oldmailbox);
+ if (!r) r = mailbox_lock_index(&oldmailbox);
+ if (r) {
+ mailbox_close(&oldmailbox);
+ return r;
+ }
+
+ if (docreate) {
+ /* Create new mailbox */
+ r = mailbox_create(newname, newpath,
+ oldmailbox.acl, oldmailbox.uniqueid, oldmailbox.format,
+ &newmailbox);
+ }
+ else {
+ /* Open new mailbox and lock */
+ r = mailbox_open_header_path(newname, newpath, newmpath,
+ oldacl, 0, &newmailbox, 0);
+ r = mailbox_lock_header(&newmailbox);
+ if (!r) r = mailbox_open_index(&newmailbox);
+ if (!r) r = mailbox_lock_index(&newmailbox);
+ if (r) {
+ mailbox_close(&newmailbox);
+ }
+ }
+ if (r) {
+ mailbox_close(&oldmailbox);
+ return r;
+ }
+
+ newmailbox.uidvalidity = oldmailbox.uidvalidity;
+ if (olduidvalidityp) *olduidvalidityp = oldmailbox.uidvalidity;
+ if (newuidvalidityp) *newuidvalidityp = newmailbox.uidvalidity;
+
+ /* Copy flag names */
+ for (flag = 0; flag < MAX_USER_FLAGS; flag++) {
+ if (oldmailbox.flagname[flag]) {
+ newmailbox.flagname[flag] = xstrdup(oldmailbox.flagname[flag]);
+ }
+ }
+ r = mailbox_write_header(&newmailbox);
+ if (r) {
+ mailbox_close(&newmailbox);
+ mailbox_close(&oldmailbox);
+ return r;
+ }
+
+ /* Check quota if necessary */
+ if (newmailbox.quota.root) {
+ r = quota_read(&newmailbox.quota, &tid, 1);
+ if (!oldmailbox.quota.root ||
+ strcmp(oldmailbox.quota.root, newmailbox.quota.root) != 0) {
+ if (!r && newmailbox.quota.limit >= 0 &&
+ newmailbox.quota.used + oldmailbox.quota_mailbox_used >
+ ((uquota_t) newmailbox.quota.limit * QUOTA_UNITS)) {
+ r = IMAP_QUOTA_EXCEEDED;
+ }
+ }
+ if (r && r != IMAP_QUOTAROOT_NONEXISTENT) {
+ mailbox_close(&newmailbox);
+ mailbox_close(&oldmailbox);
+ return r;
+ }
+ }
+
+ strlcpy(oldfname, oldmailbox.path, sizeof(oldfname));
+ strlcat(oldfname, "/", sizeof(oldfname));
+ oldfname_len = strlen(oldfname);
+ oldfnametail = oldfname + oldfname_len;
+
+ strlcpy(newfname, newmailbox.path, sizeof(newfname));
+ strlcat(newfname, "/", sizeof(newfname));
+ newfname_len = strlen(newfname);
+ newfnametail = newfname + newfname_len;
+
+ /*
+ * Copy over new message files and delete expunged ones.
+ *
+ * We use the fact that UIDs are monotonically increasing to our
+ * advantage; we compare the UIDs from each mailbox in order, and:
+ *
+ * - if UID in "slave" mailbox < UID in "master" mailbox,
+ * then the message has been deleted from "master" since last sync,
+ * so delete it from "slave" and move on to next "slave" UID
+ * - if UID in "slave" mailbox == UID in "master" mailbox,
+ * then message is still current and we already have a copy,
+ * so move on to next UID in each mailbox
+ * - if UID in "master" mailbox > last UID in "slave" mailbox,
+ * then this is a new arrival in "master" since last sync,
+ * so copy it to "slave" and move on to next "master" UID
+ */
+ newmsgno = 1;
+ for (oldmsgno = 1; oldmsgno <= oldmailbox.exists; oldmsgno++) {
+ r = mailbox_read_index_record(&oldmailbox, oldmsgno, &oldrecord);
+ if (r) break;
+ if (newmsgno <= newmailbox.exists) {
+ do {
+ r = mailbox_read_index_record(&newmailbox, newmsgno,
+ &newrecord);
+ if (r) goto fail;
+ newmsgno++;
+
+ if (newrecord.uid < oldrecord.uid) {
+ /* message expunged since last sync - delete message file */
+ mailbox_message_get_fname(&newmailbox, newrecord.uid,
+ newfnametail,
+ sizeof(newfname) - strlen(newfname));
+ unlink(newfname);
+ }
+ } while ((newrecord.uid < oldrecord.uid) &&
+ (newmsgno <= newmailbox.exists));
+ }
+ /* we check 'exists' instead of last UID in case of empty mailbox */
+ if (newmsgno > newmailbox.exists) {
+ /* message arrived since last sync - copy message file */
+ mailbox_message_get_fname(&oldmailbox, oldrecord.uid,
+ oldfnametail,
+ sizeof(oldfname) - strlen(oldfname));
+ strcpy(newfnametail, oldfnametail);
+ r = mailbox_copyfile(oldfname, newfname, 0);
+ if (r) break;
+ }
+ }
+ if (!r) r = seen_copy(&oldmailbox, &newmailbox);
+
+ if (!r) {
+ /* Copy over index/cache files */
+ oldfnametail--;
+ newfnametail--;
+
+ fn_len = strlen(FNAME_INDEX);
+ if((oldfname_len - 1) + fn_len > sizeof(oldfname))
+ {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ oldfname, FNAME_INDEX);
+ fatal("Path too long", EC_OSFILE);
+ }
+ if((newfname_len - 1) + fn_len > sizeof(oldfname))
+ {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ newfname, FNAME_INDEX);
+ fatal("Path too long", EC_OSFILE);
+ }
+
+ strlcpy(oldfnametail, FNAME_INDEX,
+ sizeof(oldfname) - (oldfname_len - 1));
+ strlcpy(newfnametail, FNAME_INDEX,
+ sizeof(newfname) - (newfname_len - 1));
+
+ unlink(newfname); /* Make link() possible */
+ r = mailbox_copyfile(oldfname, newfname, 0);
+
+ fn_len = strlen(FNAME_CACHE);
+ if((oldfname_len - 1) + fn_len > sizeof(oldfname))
+ {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ oldfname, FNAME_CACHE);
+ fatal("Path too long", EC_OSFILE);
+ }
+ if((newfname_len - 1) + fn_len > sizeof(oldfname))
+ {
+ syslog(LOG_ERR, "IOERROR: Path too long (%s + %s)",
+ newfname, FNAME_CACHE);
+ fatal("Path too long", EC_OSFILE);
+ }
+
+ strlcpy(oldfnametail, FNAME_CACHE,
+ sizeof(oldfname) - (oldfname_len - 1));
+ strlcpy(newfnametail, FNAME_CACHE,
+ sizeof(newfname) - (newfname_len - 1));
+
+ unlink(newfname);
+ if (!r) r = mailbox_copyfile(oldfname, newfname, 0);
+
+ if (r) {
+ mailbox_close(&newmailbox);
+ mailbox_close(&oldmailbox);
+ return r;
+ }
+
+ /* Re-open index file and store new uidvalidity */
+ close(newmailbox.index_fd);
+ newmailbox.index_fd = dup(oldmailbox.index_fd);
+ (void) mailbox_read_index_header(&newmailbox);
+ newmailbox.generation_no = oldmailbox.generation_no;
+ (void) mailbox_write_index_header(&newmailbox);
+ }
+
+ /* Record new quota usage */
+ if (!r && newmailbox.quota.root) {
+ newmailbox.quota.used += oldmailbox.quota_mailbox_used;
+ r = quota_write(&newmailbox.quota, &tid);
+ if (!r) quota_commit(&tid);
+ tid = NULL;
+ }
+ if (r) goto fail;
+
+ if (r && newmailbox.quota.root) {
+ r2 = quota_read(&newmailbox.quota, &tid, 1);
+ newmailbox.quota.used += newmailbox.quota_mailbox_used;
+ if (!r2) {
+ r2 = quota_write(&newmailbox.quota, &tid);
+ if (!r2) quota_commit(&tid);
+ }
+ else if (r2 == IMAP_QUOTAROOT_NONEXISTENT) r2 = 0;
+ if (r2) {
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record use of " UQUOTA_T_FMT " bytes in quota %s",
+ newmailbox.quota_mailbox_used, newmailbox.quota.root);
+ }
+ }
+ if (r) goto fail;
+
+ mailbox_close(&oldmailbox);
+ if (mailboxp) {
+ *mailboxp = newmailbox;
+ } else {
+ mailbox_close(&newmailbox);
+ }
+ return 0;
+
+ fail:
+#if 0
+ for (msgno = 1; msgno <= oldmailbox.exists; msgno++) {
+ if (mailbox_read_index_record(&oldmailbox, msgno, &record)) continue;
+ mailbox_message_get_fname(&oldmailbox, record.uid, newfnametail,
+ sizeof(newfname) - strlen(newfname));
+ (void) unlink(newfname);
+ }
+#endif
+ mailbox_close(&newmailbox);
+ mailbox_close(&oldmailbox);
+ return r;
+}
+
+
+/*
+ * Copy (or link) the file 'from' to the file 'to'
+ */
+int mailbox_copyfile(const char *from, const char *to, int nolink)
+{
+ int srcfd, destfd;
+ struct stat sbuf;
+ const char *src_base = 0;
+ unsigned long src_size = 0;
+ int n;
+
+ if (!nolink) {
+ if (link(from, to) == 0) return 0;
+ if (errno == EEXIST) {
+ if (unlink(to) == -1) {
+ syslog(LOG_ERR, "IOERROR: unlinking to recreate %s: %m", to);
+ return IMAP_IOERROR;
+ }
+ if (link(from, to) == 0) return 0;
+ }
+ }
+
+ destfd = open(to, O_RDWR|O_TRUNC|O_CREAT, 0666);
+ if (destfd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", to);
+ return IMAP_IOERROR;
+ }
+
+ srcfd = open(from, O_RDONLY, 0666);
+ if (srcfd == -1) {
+ syslog(LOG_ERR, "IOERROR: opening %s: %m", from);
+ close(destfd);
+ return IMAP_IOERROR;
+ }
+
+
+ if (fstat(srcfd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m", from);
+ close(srcfd);
+ close(destfd);
+ return IMAP_IOERROR;
+ }
+ map_refresh(srcfd, 1, &src_base, &src_size, sbuf.st_size, from, 0);
+
+ n = retry_write(destfd, src_base, src_size);
+
+ if (n == -1 || fsync(destfd)) {
+ map_free(&src_base, &src_size);
+ close(srcfd);
+ close(destfd);
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", to);
+ return IMAP_IOERROR;
+ }
+ map_free(&src_base, &src_size);
+ close(srcfd);
+ close(destfd);
+ return 0;
+}
+
+void mailbox_hash_mbox(char *buf, size_t buf_len,
+ const char *root,
+ const char *name)
+{
+ const char *idx;
+ char c, *p;
+
+ snprintf(buf, buf_len, "%s", root);
+ buf_len -= strlen(buf);
+ buf += strlen(buf);
+
+ if (config_virtdomains && (p = strchr(name, '!'))) {
+ *p = '\0'; /* split domain!user */
+ if (config_hashimapspool) {
+ c = (char) dir_hash_c(name);
+ snprintf(buf, buf_len, "%s%c/%s", FNAME_DOMAINDIR, c, name);
+ }
+ else {
+ snprintf(buf, buf_len, "%s%s", FNAME_DOMAINDIR, name);
+ }
+ *p++ = '!'; /* reassemble domain!user */
+ name = p;
+ buf_len -= strlen(buf);
+ buf += strlen(buf);
+ }
+
+ if (config_hashimapspool) {
+ idx = strchr(name, '.');
+ if (idx == NULL) {
+ idx = name;
+ } else {
+ idx++;
+ }
+ c = (char) dir_hash_c(idx);
+
+ snprintf(buf, buf_len, "/%c/%s", c, name);
+ } else {
+ /* standard mailbox placement */
+ snprintf(buf, buf_len, "/%s", name);
+ }
+
+ /* change all '.'s to '/' */
+ for (p = buf; *p; p++) {
+ if (*p == '.') *p = '/';
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mailbox.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,384 @@
+/* mailbox.h -- Mailbox format definitions
+ * $Id: mailbox.h,v 1.77.2.14 2006/06/02 16:41:57 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+#ifndef INCLUDED_MAILBOX_H
+#define INCLUDED_MAILBOX_H
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <limits.h>
+#include <config.h>
+
+#include "auth.h"
+#include "quota.h"
+#include "message_uuid.h"
+#include "byteorder64.h"
+
+
+#define BIT32_MAX 4294967295U
+
+#if UINT_MAX == BIT32_MAX
+typedef unsigned int bit32;
+#elif ULONG_MAX == BIT32_MAX
+typedef unsigned long bit32;
+#elif USHRT_MAX == BIT32_MAX
+typedef unsigned short bit32;
+#else
+#error dont know what to use for bit32
+#endif
+
+#ifdef HAVE_LONG_LONG_INT
+typedef unsigned long long int bit64;
+typedef unsigned long long int modseq_t;
+#define MODSEQ_FMT "%llu"
+#else
+typedef unsigned long int modseq_t;
+#define MODSEQ_FMT "%lu"
+#endif
+
+#define MAX_MAILBOX_NAME 490
+#define MAX_MAILBOX_PATH 4096
+
+#define MAX_USER_FLAGS (16*8)
+
+#define MAILBOX_HEADER_MAGIC ("\241\002\213\015Cyrus mailbox header\n" \
+ "\"The best thing about this system was that it had lots of goals.\"\n" \
+ "\t--Jim Morris on Andrew\n")
+
+#define MAILBOX_FORMAT_NORMAL 0
+#define MAILBOX_FORMAT_NETNEWS 1
+
+#define MAILBOX_MINOR_VERSION 9
+#define MAILBOX_CACHE_MINOR_VERSION 2
+
+#define FNAME_HEADER "/cyrus.header"
+#define FNAME_INDEX "/cyrus.index"
+#define FNAME_CACHE "/cyrus.cache"
+#define FNAME_SQUAT_INDEX "/cyrus.squat"
+#define FNAME_EXPUNGE_INDEX "/cyrus.expunge"
+
+#define MAILBOX_FNAME_LEN 256
+
+struct mailbox {
+ int header_fd;
+ int index_fd;
+ int cache_fd;
+
+ const char *header_base;
+ unsigned long header_len;
+ const char *index_base;
+ unsigned long index_len; /* mapped size */
+ const char *cache_base;
+ unsigned long cache_len; /* mapped size */
+ unsigned long cache_size; /* actual size */
+
+ int header_lock_count;
+ int index_lock_count;
+ int seen_lock_count;
+ int pop_lock_count;
+
+ ino_t header_ino;
+ time_t index_mtime;
+ ino_t index_ino;
+ off_t index_size;
+
+ /* Information in mailbox list */
+ char *name;
+ char *path;
+ char *mpath;
+ char *acl;
+ long myrights;
+
+ /* Information in header */
+ /* quota.root */
+ char *uniqueid;
+ char *flagname[MAX_USER_FLAGS];
+
+ /* Information in index file */
+ bit32 generation_no;
+ int format;
+ int minor_version;
+ unsigned long start_offset;
+ unsigned long record_size;
+ unsigned long exists;
+ time_t last_appenddate;
+ unsigned long last_uid;
+ uquota_t quota_mailbox_used;
+ unsigned long pop3_last_login;
+ unsigned long uidvalidity;
+
+ unsigned long deleted;
+ unsigned long answered;
+ unsigned long flagged;
+ int dirty;
+
+ unsigned long options;
+ unsigned long leaked_cache_records;
+ modseq_t highestmodseq;
+
+ /*
+ * future expansion -- won't need expand the header
+ *
+ * If the change to the index header change also includes a change
+ * to the index record, there is no benefit to using a spare. In
+ * this case, just add a new field, and optionally add some more
+ * spares.
+ */
+ unsigned long spares[4];
+
+ struct quota quota;
+
+ /* Information in current session */
+ int examining; /* Nonzero if opened with EXAMINE command */
+ int keepingseen; /* Nonzero if /Seen is meaningful */
+ unsigned allseen; /* Last UID if all msgs /Seen last checkpoint */
+ unsigned recentuid; /* UID of last non-\Recent message */
+};
+
+struct index_record {
+ unsigned long uid;
+ time_t internaldate;
+ time_t sentdate;
+ unsigned long size;
+ unsigned long header_size;
+ unsigned long content_offset;
+ unsigned long cache_offset;
+ time_t last_updated;
+ bit32 system_flags;
+ bit32 user_flags[MAX_USER_FLAGS/32];
+ unsigned long content_lines;
+ unsigned long cache_version;
+ struct message_uuid uuid;
+ modseq_t modseq;
+};
+
+/* Offsets of index/expunge header fields
+ *
+ * NOTE: Since we might be using a 64-bit MODSEQ in the index record,
+ * the size of the index header MUST be a multiple of 8 bytes.
+ */
+#define OFFSET_GENERATION_NO 0
+#define OFFSET_FORMAT 4
+#define OFFSET_MINOR_VERSION 8
+#define OFFSET_START_OFFSET 12
+#define OFFSET_RECORD_SIZE 16
+#define OFFSET_EXISTS 20
+#define OFFSET_LAST_APPENDDATE 24
+#define OFFSET_LAST_UID 28
+#define OFFSET_QUOTA_MAILBOX_USED64 32 /* offset for 64bit quotas */
+#define OFFSET_QUOTA_MAILBOX_USED 36 /* offset for 32bit quotas */
+#define OFFSET_POP3_LAST_LOGIN 40
+#define OFFSET_UIDVALIDITY 44
+#define OFFSET_DELETED 48 /* added for ACAP */
+#define OFFSET_ANSWERED 52
+#define OFFSET_FLAGGED 56
+#define OFFSET_MAILBOX_OPTIONS 60
+#define OFFSET_LEAKED_CACHE 64 /* Number of leaked records in cache file */
+#define OFFSET_HIGHESTMODSEQ_64 68 /* CONDSTORE (64-bit modseq) */
+#define OFFSET_HIGHESTMODSEQ 72 /* CONDSTORE (32-bit modseq) */
+#define OFFSET_SPARE0 76 /* Spares - only use these if the index */
+#define OFFSET_SPARE1 80 /* record size remains the same */
+#define OFFSET_SPARE2 84 /* (see note above about spares) */
+#define OFFSET_SPARE3 88
+#define OFFSET_SPARE4 92
+
+/* Offsets of index_record fields in index/expunge file
+ *
+ * NOTE: Since we might be using a 64-bit MODSEQ in the index record,
+ * OFFSET_MODSEQ_64 and the size of the index record MUST be
+ * multiples of 8 bytes.
+ */
+#define OFFSET_UID 0
+#define OFFSET_INTERNALDATE 4
+#define OFFSET_SENTDATE 8
+#define OFFSET_SIZE 12
+#define OFFSET_HEADER_SIZE 16
+#define OFFSET_CONTENT_OFFSET 20
+#define OFFSET_CACHE_OFFSET 24
+#define OFFSET_LAST_UPDATED 28
+#define OFFSET_SYSTEM_FLAGS 32
+#define OFFSET_USER_FLAGS 36
+#define OFFSET_CONTENT_LINES (OFFSET_USER_FLAGS+MAX_USER_FLAGS/8) /* added for nntpd */
+#define OFFSET_CACHE_VERSION OFFSET_CONTENT_LINES+sizeof(bit32)
+#define OFFSET_MESSAGE_UUID OFFSET_CACHE_VERSION+sizeof(bit32)
+#define OFFSET_MODSEQ_64 (OFFSET_MESSAGE_UUID+MESSAGE_UUID_PACKED_SIZE) /* CONDSTORE (64-bit modseq) */
+#define OFFSET_MODSEQ (OFFSET_MODSEQ_64+sizeof(bit32)) /* CONDSTORE (32-bit modseq) */
+
+#define INDEX_HEADER_SIZE (OFFSET_SPARE4+sizeof(bit32))
+#define INDEX_RECORD_SIZE (OFFSET_MODSEQ+sizeof(bit32))
+
+/* Number of fields in an individual message's cache record */
+#define NUM_CACHE_FIELDS 10
+
+#define FLAG_ANSWERED (1<<0)
+#define FLAG_FLAGGED (1<<1)
+#define FLAG_DELETED (1<<2)
+#define FLAG_DRAFT (1<<3)
+
+#define OPT_POP3_NEW_UIDL (1<<0) /* added for Outlook stupidity */
+#define OPT_IMAP_CONDSTORE (1<<1) /* added for CONDSTORE extension */
+
+
+struct mailbox_header_cache {
+ const char *name; /* Name of header */
+ bit32 min_cache_version; /* Cache version it appeared in */
+};
+
+#define MAX_CACHED_HEADER_SIZE 32 /* Max size of a cached header name */
+extern const struct mailbox_header_cache mailbox_cache_headers[];
+extern const int MAILBOX_NUM_CACHE_HEADERS;
+
+/* Bitmasks for expunging */
+enum {
+ EXPUNGE_FORCE = (1<<0),
+ EXPUNGE_CLEANUP = (1<<1)
+};
+
+int mailbox_cached_header(const char *s);
+int mailbox_cached_header_inline(const char *text);
+
+unsigned long mailbox_cache_size(struct mailbox *mailbox, unsigned msgno);
+
+typedef int mailbox_decideproc_t(struct mailbox *mailbox, void *rock,
+ char *indexbuf, int expunge_flags);
+
+typedef void mailbox_notifyproc_t(struct mailbox *mailbox);
+
+extern void mailbox_set_updatenotifier(mailbox_notifyproc_t *notifyproc);
+extern mailbox_notifyproc_t *mailbox_get_updatenotifier(void);
+
+extern int mailbox_initialize(void);
+
+extern char *mailbox_message_fname(struct mailbox *mailbox,
+ unsigned long uid);
+
+/* 'len(out) >= MAILBOX_FNAME_LEN' */
+extern void mailbox_message_get_fname(struct mailbox *mailbox,
+ unsigned long uid,
+ char *out, size_t size);
+
+extern int mailbox_map_message(struct mailbox *mailbox, unsigned long uid,
+ const char **basep, unsigned long *lenp);
+extern void mailbox_unmap_message(struct mailbox *mailbox,
+ unsigned long uid,
+ const char **basep, unsigned long *lenp);
+
+extern void mailbox_reconstructmode(void);
+
+extern int mailbox_stat(const char *mbpath, const char *metapath,
+ struct stat *header, struct stat *index,
+ struct stat *cache);
+
+extern int mailbox_open_header(const char *name, struct auth_state *auth_state,
+ struct mailbox *mailbox);
+extern int mailbox_open_header_path(const char *name, const char *path,
+ const char *mpath, const char *acl,
+ struct auth_state *auth_state,
+ struct mailbox *mailbox,
+ int suppresslog);
+extern int mailbox_open_locked(const char *mbname,
+ const char *mbpath,
+ const char *metapath,
+ const char *mbacl,
+ struct auth_state *auth_state,
+ struct mailbox *mb,
+ int suppresslog);
+extern int mailbox_open_index(struct mailbox *mailbox);
+extern void mailbox_close(struct mailbox *mailbox);
+
+extern int mailbox_read_header(struct mailbox *mailbox);
+extern int mailbox_read_header_acl(struct mailbox *mailbox);
+extern int mailbox_read_acl(struct mailbox *mailbox,
+ struct auth_state *auth_state);
+extern int mailbox_read_index_header(struct mailbox *mailbox);
+extern int mailbox_read_index_record(struct mailbox *mailbox,
+ unsigned msgno,
+ struct index_record *record);
+extern int mailbox_lock_header(struct mailbox *mailbox);
+extern int mailbox_lock_index(struct mailbox *mailbox);
+extern int mailbox_lock_pop(struct mailbox *mailbox);
+
+extern void mailbox_unlock_header(struct mailbox *mailbox);
+extern void mailbox_unlock_index(struct mailbox *mailbox);
+extern void mailbox_unlock_pop(struct mailbox *mailbox);
+
+extern int mailbox_write_header(struct mailbox *mailbox);
+extern int mailbox_write_index_header(struct mailbox *mailbox);
+extern void mailbox_index_record_to_buf(struct index_record *record, char *buf);
+extern int mailbox_write_index_record(struct mailbox *mailbox,
+ unsigned msgno,
+ struct index_record *record, int sync);
+extern int mailbox_append_index(struct mailbox *mailbox,
+ struct index_record *record,
+ unsigned start, unsigned num, int sync);
+
+extern int mailbox_expunge(struct mailbox *mailbox,
+ mailbox_decideproc_t *decideproc, void *deciderock,
+ int flags);
+extern int mailbox_cleanup(struct mailbox *mailbox, int iscurrentdir,
+ mailbox_decideproc_t *decideproc, void *deciderock);
+
+extern void mailbox_make_uniqueid(char *name, unsigned long uidvalidity,
+ char *uniqueid, size_t outlen);
+
+extern int mailbox_create(const char *name, char *partition,
+ const char *acl, const char *uniqueid, int format,
+ struct mailbox *mailboxp);
+extern int mailbox_delete(struct mailbox *mailbox, int delete_quota_root);
+
+extern int mailbox_rename_copy(struct mailbox *oldmailbox,
+ const char *newname, char *newpartition,
+ bit32 *olduidvalidityp, bit32 *newuidvalidityp,
+ struct mailbox *mailboxp);
+extern int mailbox_rename_cleanup(struct mailbox *oldmailbox, int isinbox);
+
+extern int mailbox_sync(const char *oldname, const char *oldpath,
+ const char *oldmpath, const char *oldacl,
+ const char *newname, char *newpath, char *newmpath,
+ int docreate,
+ bit32 *olduidvalidityp, bit32 *newuidvalidtyp,
+ struct mailbox *mailboxp);
+
+extern int mailbox_copyfile(const char *from, const char *to, int nolink);
+extern void mailbox_hash_mbox(char *buf, size_t buf_len,
+ const char *root, const char *name);
+
+#endif /* INCLUDED_MAILBOX_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/make_md5.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/make_md5.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/make_md5.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/make_md5.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,923 @@
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <syslog.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <signal.h>
+
+#include "global.h"
+#include "assert.h"
+#include "mboxlist.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "xmalloc.h"
+#include "acl.h"
+#include "seen.h"
+#include "mboxname.h"
+#include "map.h"
+#include "md5global.h"
+#include "md5.h"
+/*#include "cdb.h"*/
+
+/* global state */
+const int config_need_data = 0;
+
+extern char *optarg;
+extern int optind;
+
+/* Stuff to make index.c link */
+int imapd_exists;
+struct protstream *imapd_out = NULL;
+struct auth_state *imapd_authstate = NULL;
+char *imapd_userid = NULL;
+
+void printastring(const char *s)
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+
+void printstring(const char *s)
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+
+/* end stuff to make index.c link */
+
+static int verbose = 0;
+
+static void shut_down(int code) __attribute__((noreturn));
+static void shut_down(int code)
+{
+ seen_done();
+ quotadb_close();
+ quotadb_done();
+ mboxlist_close();
+ mboxlist_done();
+ exit(code);
+}
+
+static int usage(const char *name)
+{
+ fprintf(stderr,
+ "usage: %s [-C <alt_config>] [-d] [-k <count>] [-v]"
+ " [-m <offset>] [-M <modulo>] user...\n",
+ name);
+
+ exit(EC_USAGE);
+}
+
+void fatal(const char* s, int code)
+{
+ fprintf(stderr, "make_md5: %s\n", s);
+ exit(code);
+}
+
+/* ====================================================================== */
+
+struct md5_node {
+ struct md5_node *next;
+ int active;
+ unsigned long uid;
+ unsigned char md5_msg[16];
+ unsigned char md5_cache[16];
+};
+
+struct md5_mailbox {
+ struct md5_mailbox *next;
+ char *name;
+ char *uniqueid;
+ struct md5_node *head;
+ struct md5_node *tail;
+ unsigned long count;
+ int active;
+};
+
+struct md5_mailbox_list {
+ struct md5_mailbox *head;
+ struct md5_mailbox *tail;
+ unsigned long count;
+ int dirty;
+};
+
+static void
+md5_mailbox_free(struct md5_mailbox *list)
+{
+ struct md5_node *current, *next;
+
+ for (current = list->head; current ; current = next) {
+ next = current->next;
+ free(current);
+ }
+ free(list->name);
+ free(list->uniqueid);
+ free(list);
+}
+
+static void
+md5_mailbox_rename(struct md5_mailbox *mailbox, char *name)
+{
+ free(mailbox->name);
+ mailbox->name = xstrdup(name);
+}
+
+static struct md5_node *
+md5_mailbox_add(struct md5_mailbox *list,
+ unsigned long uid,
+ unsigned char md5_msg[16],
+ unsigned char md5_cache[16],
+ int active)
+{
+ struct md5_node *new = xmalloc(sizeof(struct md5_node));
+ struct md5_node *current, *last;
+
+ new->next = NULL;
+ new->uid = uid;
+ new->active = active;
+ memcpy(&new->md5_msg, md5_msg, 16);
+ memcpy(&new->md5_cache, md5_cache, 16);
+
+ list->count++;
+
+ if (list->head == NULL) {
+ /* Add to empty list */
+ list->head = list->tail = new;
+ return(new);
+ }
+
+ assert(list->tail != NULL);
+ if (list->tail->uid < uid) {
+ /* Add to end of list */
+ /* This is the common case as UIDs assigned in ascending order */
+ list->tail = list->tail->next = new;
+ return(new);
+ }
+
+ assert(list->head != NULL);
+ if (uid < list->head->uid) {
+ new->next = list->head; /* Add to start of list */
+ list->head = new;
+ return(new);
+ }
+
+ current = list->head;
+ do {
+ last = current;
+ current = current->next;
+ } while (current && (uid > current->uid));
+
+ if (current && (uid < current->uid)) {
+ new->next = current; /* Insert between last and current */
+ last->next = new;
+ return(new);
+ }
+ return(current);
+}
+
+static struct md5_mailbox_list *
+md5_mailbox_list_create(void)
+{
+ struct md5_mailbox_list *list = xmalloc(sizeof(struct md5_mailbox_list));
+
+ list->head = NULL;
+ list->tail = NULL;
+ list->count = 0;
+ list->dirty = 0;
+
+ return(list);
+}
+
+static void
+md5_mailbox_list_free(struct md5_mailbox_list *list)
+{
+ struct md5_mailbox *current, *next;
+
+ for (current = list->head; current ; current = next) {
+ next = current->next;
+ md5_mailbox_free(current);
+ }
+ free(list);
+}
+
+static struct md5_mailbox *
+md5_mailbox_list_add(struct md5_mailbox_list *list, char *name, char *uniqueid)
+{
+ struct md5_mailbox *new = xzmalloc(sizeof(struct md5_mailbox));
+ struct md5_mailbox *current, *last;
+
+ list->count++;
+ new->next = NULL;
+ new->name = xstrdup(name);
+ new->uniqueid = xstrdup(uniqueid);
+ new->head = NULL;
+ new->tail = NULL;
+ new->count = 0;
+ new->active = 0;
+
+ if (list->head == NULL) {
+ /* Add to empty list */
+ list->head = list->tail = new;
+ return(new);
+ }
+
+ assert(list->tail != NULL);
+ if (strcmp(list->tail->uniqueid, uniqueid) < 0) {
+ /* Add to end of list */
+ /* This is the common case as folders sorted in ascending order */
+ list->tail = list->tail->next = new;
+ return(new);
+ }
+
+ assert(list->head != NULL);
+ if (strcmp(list->head->uniqueid, uniqueid) > 0) {
+ new->next = list->head; /* Add to start of list */
+ list->head = new;
+ return(new);
+ }
+
+ current = list->head;
+ do {
+ last = current;
+ current = current->next;
+ } while (current && (strcmp(uniqueid, current->uniqueid) > 0));
+
+ if (!current)
+ return(NULL);
+
+ if (!strcmp(uniqueid, current->uniqueid)) {
+ if (strcmp(current->name, name) != 0) {
+ free(current->name);
+ current->name = xstrdup(name);
+ }
+ return(current);
+ }
+
+ /* Insert between last and current */
+ new->next = current;
+ last->next = new;
+ return(new);
+}
+
+static struct md5_mailbox *
+md5_mailbox_list_find(struct md5_mailbox_list *list, char *uniqueid)
+{
+ struct md5_mailbox *mailbox;
+
+ for (mailbox = list->head ; mailbox ; mailbox = mailbox->next) {
+ if (!strcmp(mailbox->uniqueid, uniqueid))
+ return(mailbox);
+ }
+ return(NULL);
+}
+
+static int
+md5_mailbox_list_check_deleted(struct md5_mailbox_list *list)
+{
+ struct md5_mailbox *mailbox;
+
+ for (mailbox = list->head ; mailbox ; mailbox = mailbox->next) {
+ if (!mailbox->active) {
+ list->dirty = 1;
+ return(1);
+ }
+ }
+ return(0);
+}
+
+static int
+md5_parse(unsigned char md5[16], char *s)
+{
+ int i;
+ char c;
+
+ if (strlen(s) != 32)
+ return(0);
+
+ for (i = 0 ; i < 16 ; i++) {
+ c = *s++;
+
+ if ((c >= '0') && (c <= '9'))
+ md5[i] = (c - '0') * 16;
+ else if ((c >= 'a') && (c <= 'z'))
+ md5[i] = (c - 'a' + 10) * 16;
+ else if ((c >= 'A') && (c <= 'Z'))
+ md5[i] = (c - 'A' + 10) * 16;
+ else
+ return(0);
+
+ c = *s++;
+
+ if ((c >= '0') && (c <= '9'))
+ md5[i] += (c - '0');
+ else if ((c >= 'a') && (c <= 'z'))
+ md5[i] += (c - 'a' + 10);
+ else if ((c >= 'A') && (c <= 'Z'))
+ md5[i] += (c - 'A' + 10);
+ else
+ return(0);
+ }
+ return(1);
+}
+
+static int
+md5_mailbox_list_read(struct md5_mailbox_list *list, char *name)
+{
+ struct md5_mailbox *current = NULL;
+ FILE *file;
+ char buf[MAX_MAILBOX_NAME+2];
+ unsigned char md5_msg[16];
+ unsigned char md5_cache[16];
+ int len;
+ int lineno = 0;
+ unsigned long uid;
+ char *mboxname, *uniqueid, *s;
+
+ if ((file=fopen(name, "r")) == NULL)
+ return(0);
+
+ while (fgets(buf, sizeof(buf), file)) {
+ ++lineno;
+
+ if (((len=strlen(buf)) > 0) && (buf[len-1] == '\n'))
+ buf[--len] = '\0';
+
+ if ((buf[0] == '#') || (buf[0] == '\0'))
+ continue;
+
+ if (buf[0] != ' ') {
+ /* "%s %s", mboxname, uniqueid. mboxname may contain spaces */
+ mboxname = buf;
+ uniqueid = strrchr(buf, ' ');
+
+ if ((uniqueid == NULL) || ((uniqueid - mboxname) < 6))
+ goto parse_err;
+ *uniqueid++ = '\0';
+
+ current = md5_mailbox_list_add(list, mboxname, uniqueid);
+ } else {
+ if (!(current && (s = strtok(buf, "\t ")) && (uid = atoi(s)) &&
+ (s = strtok(NULL, "\t ")) && md5_parse(md5_msg, s) &&
+ (s = strtok(NULL, "\t ")) && md5_parse(md5_cache, s)))
+ goto parse_err;
+
+ md5_mailbox_add(current, uid, md5_msg, md5_cache, 0);
+ }
+ }
+ fclose(file);
+ return(0);
+
+ parse_err:
+ syslog(LOG_ERR, "Invalid format input file %s at line %d",
+ name, lineno);
+ fclose(file);
+ return(IMAP_IOERROR);
+}
+
+static int
+md5_mailbox_list_write(struct md5_mailbox_list *list, char *name)
+{
+ struct md5_mailbox *mailbox;
+ struct md5_node *node;
+ FILE *file;
+ int i;
+
+ file = fopen(name, "w");
+ if (file == NULL && errno == ENOENT) {
+ if (cyrus_mkdir(name, 0750) == 0) {
+ file = fopen(name, "w");
+ }
+ }
+ if (file == NULL)
+ return(IMAP_IOERROR);
+
+ for (mailbox = list->head ; mailbox ; mailbox = mailbox->next) {
+ if (!mailbox->active)
+ continue;
+
+ fprintf(file, "%s %s\n", mailbox->name, mailbox->uniqueid);
+
+ for (node = mailbox->head ; node ; node = node->next) {
+ if (!node->active)
+ continue;
+
+ fprintf(file, " %lu: ", node->uid);
+ for (i = 0 ; i < 16 ; i++)
+ fprintf(file, "%-2.2x", node->md5_msg[i]);
+ fprintf(file, " ");
+ for (i = 0 ; i < 16 ; i++)
+ fprintf(file, "%-2.2x", node->md5_cache[i]);
+ fprintf(file, "\n");
+ }
+ }
+ fclose(file);
+ return(0);
+}
+
+/* ====================================================================== */
+
+/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
+ resulting message digest number will be written into the 16 bytes
+ beginning at RESBLOCK. */
+static void *
+md5_buffer (const char *buffer, size_t len, void *resblock)
+{
+ MD5_CTX ctx;
+
+ MD5Init(&ctx);
+ MD5Update(&ctx, buffer, len);
+ MD5Final(resblock, &ctx);
+
+ return resblock;
+}
+
+/* Compute MD5 message digest for bytes read from STREAM. The
+ resulting message digest number will be written into the 16 bytes
+ beginning at RESBLOCK. */
+static int
+md5_stream (FILE *stream, void *resblock)
+{
+ const char *base = NULL;
+ unsigned long len = 0;
+
+ map_refresh(fileno(stream), 1, &base, &len, MAP_UNKNOWN_LEN, "msg", NULL);
+
+ md5_buffer(base, len, resblock);
+
+ map_free(&base, &len);
+
+ return 0;
+}
+
+static int
+md5_single(char *name, int matchlen, int maycreate, void *rock)
+{
+ struct mailbox m;
+ int r = 0;
+ unsigned long msgno;
+ struct index_record record;
+ unsigned char md5_msg[16], md5_cache[16];
+ char buf[MAX_MAILBOX_PATH+1];
+ FILE *file;
+ struct md5_mailbox_list *md5_mailbox_list;
+ struct md5_mailbox *md5_mailbox;
+ struct md5_node *md5_node;
+ unsigned long cache_offset;
+ unsigned long cache_size;
+
+ if (verbose > 1)
+ printf(" %s\n", name);
+
+ md5_mailbox_list = (struct md5_mailbox_list *)rock;
+
+ /* First we have to jump through hoops to open the mailbox and its
+ Cyrus index. */
+ memset(&m, 0, sizeof(struct mailbox));
+
+ /* Garbage collect live cache file */
+ if (!r) r = mailbox_open_header(name, 0, &m);
+ if (r) {
+ syslog(LOG_NOTICE, "error opening %s: %s\n", name, error_message(r));
+ return(r);
+ }
+
+ if (!r) r = mailbox_open_index(&m);
+
+ if (r) {
+ syslog(LOG_NOTICE, "error opening %s: %s\n", name, error_message(r));
+ goto bail;
+ }
+
+ if (!(md5_mailbox=md5_mailbox_list_find(md5_mailbox_list, m.uniqueid))) {
+ /* New mailbox */
+ md5_mailbox = md5_mailbox_list_add(md5_mailbox_list, name, m.uniqueid);
+ md5_mailbox_list->dirty = 1;
+ }
+
+ if (!md5_mailbox) {
+ syslog(LOG_NOTICE, "Failed to create md5_mailbox_list for %s", name);
+ goto bail;
+ }
+
+ if (strcmp(md5_mailbox->name, m.name) != 0) {
+ /* Renamed mailbox */
+ md5_mailbox_rename(md5_mailbox, m.name);
+ md5_mailbox_list->dirty = 1;
+ }
+
+ md5_mailbox->active = 1;
+ md5_node = md5_mailbox->head;
+
+ for (msgno = 1 ; msgno <= m.exists ; msgno++) {
+ if ((r=mailbox_read_index_record(&m, msgno, &record))) {
+ syslog(LOG_ERR, "IOERROR: %s failed to read index record %lu/%lu",
+ m.name, msgno, m.exists);
+ r = IMAP_IOERROR;
+ goto bail;
+ }
+
+ if (record.uid == 0) {
+ syslog(LOG_ERR, "IOERROR: %s zero index record %lu/%lu",
+ m.name, msgno, m.exists);
+ r = IMAP_IOERROR;
+ goto bail;
+ }
+
+ /* Skip over UIDs in md5_mailbox which have now been deleted
+ * (but record fact that md5 list should be updated for this user) */
+ while (md5_node && (md5_node->uid < record.uid)) {
+ md5_mailbox_list->dirty = 1; /* Need to write out new MD5 list */
+ md5_node->active = 0;
+ md5_node = md5_node->next;
+ }
+
+ /* Check whether MD5 value already exists for this UID */
+ if (md5_node && (md5_node->uid == record.uid)) {
+ md5_node->active = 1;
+ md5_node = md5_node->next;
+ continue;
+ }
+
+ snprintf(buf, sizeof(buf), "%s/%lu.", m.path, record.uid);
+
+ if (!(file=fopen(buf, "r"))) {
+ syslog(LOG_ERR, "IOERROR: %s failed to open msg UID %lu",
+ m.name, record.uid);
+ r = IMAP_IOERROR;
+ goto bail;
+ }
+
+ if (md5_stream(file, md5_msg) != 0) {
+ syslog(LOG_ERR, "IOERROR: %s failed to md5 msg UID %lu",
+ m.name, record.uid);
+ r = IMAP_IOERROR;
+ fclose(file);
+ goto bail;
+ }
+
+ cache_offset = record.cache_offset;
+ cache_size = mailbox_cache_size(&m, msgno);
+
+ if (!md5_buffer(m.cache_base+cache_offset, cache_size, md5_cache)) {
+ syslog(LOG_ERR, "IOERROR: %s failed to md5 msg cache UID %lu",
+ m.name, record.uid);
+ r = IMAP_IOERROR;
+ goto bail;
+ }
+
+ md5_mailbox_add(md5_mailbox, record.uid, md5_msg, md5_cache, 1);
+ md5_mailbox_list->dirty = 1; /* Need to write out new MD5 list */
+ fclose(file);
+ }
+ /* Check for deletions at end of the folder */
+ if (md5_node)
+ md5_mailbox_list->dirty = 1; /* Need to write out new MD5 list */
+
+ bail:
+#if 0
+ mailbox_unlock_expire(&m);
+#endif
+ mailbox_close(&m);
+ return(r);
+}
+
+/* ====================================================================== */
+
+/* If uid_set and uid_modulo non-zero, use existing database entry for all
+ * but given tranche of users. That tranche gets regenerated from scratch */
+
+static int
+use_existing_data(char *user, int uid_set, int uid_modulo, int uid_fd)
+{
+ char buf[64];
+ unsigned long len;
+ int uid;
+
+ if ((uid_modulo == 0) || (uid_fd < 0))
+ return(1);
+#if 0 /* XXX make sure we're not the replica */
+ if (cdb_seek(uid_fd, (unsigned char *)user, strlen(user), &len) != 1)
+ return(1);
+#endif
+ if ((len >= sizeof(buf)) || (read(uid_fd, buf, len) != len))
+ return(1);
+
+ if ((uid = atoi(buf)) == 0)
+ return(1);
+
+ return ((uid_set == (uid % uid_modulo)) ? 0 : 1);
+}
+
+static int
+do_user(const char *md5_dir, char *user, struct namespace *namespacep,
+ int uid_set, int uid_modulo, int uid_fd)
+{
+ char buf[MAX_MAILBOX_PATH+1];
+ char buf2[MAX_MAILBOX_PATH+1];
+ int r = 0;
+ int regenerate = 0;
+ struct md5_mailbox_list *md5_mailbox_list = md5_mailbox_list_create();
+
+ imapd_userid = user;
+ imapd_authstate = auth_newstate(imapd_userid);
+
+ if (use_existing_data(user, uid_set, uid_modulo, uid_fd)) {
+ snprintf(buf, sizeof(buf)-1, "%s/%c/%s", md5_dir, user[0], user);
+ r = md5_mailbox_list_read(md5_mailbox_list, buf);
+
+ if (r) {
+ syslog(LOG_NOTICE, "Failed to read mailbox list for %s", user);
+ md5_mailbox_list_free(md5_mailbox_list);
+ return(r);
+ }
+
+ if (verbose > 0)
+ printf("Make_MD5: %s\n", user);
+
+ } else {
+ regenerate = 1;
+ if (verbose > 0)
+ printf("Make_MD5: %s (regenerating)\n", user);
+ }
+
+ /* Index inbox */
+ snprintf(buf, sizeof(buf)-1, "user.%s", user);
+ md5_single(buf, 0, 0, md5_mailbox_list);
+
+ /* And then all folders */
+ snprintf(buf, sizeof(buf)-1, "user.%s.*", user);
+ r = (namespacep->mboxlist_findall)(namespacep, buf, 0,
+ imapd_userid, imapd_authstate,
+ md5_single, md5_mailbox_list);
+ if (r) {
+ syslog(LOG_NOTICE, "Failed to enumerate mailboxes for %s", user);
+ md5_mailbox_list_free(md5_mailbox_list);
+ return(r);
+ }
+
+ auth_freestate(imapd_authstate);
+
+ /* If mailbox have been deleted, we need to rewrite */
+ if (md5_mailbox_list->dirty ||
+ md5_mailbox_list_check_deleted(md5_mailbox_list)) {
+ snprintf(buf, sizeof(buf)-1, "%s/%c/%s-NEW", md5_dir, user[0], user);
+ md5_mailbox_list_write(md5_mailbox_list, buf);
+
+ snprintf(buf, sizeof(buf)-1, "%s/%c/%s-NEW", md5_dir, user[0], user);
+ snprintf(buf2, sizeof(buf2)-1, "%s/%c/%s", md5_dir, user[0], user);
+
+ if (rename(buf, buf2) < 0) {
+ syslog(LOG_NOTICE, "Failed to rename %s -> %s", buf, buf2);
+ md5_mailbox_list_free(md5_mailbox_list);
+ return(IMAP_IOERROR);
+ }
+ }
+
+ if (regenerate)
+ syslog(LOG_NOTICE, "Done make_md5 for %s (regenerated)", user);
+ else
+ syslog(LOG_NOTICE, "Done make_md5 for %s", user);
+
+ md5_mailbox_list_free(md5_mailbox_list);
+ return(0);
+}
+
+/* ====================================================================== */
+
+static unsigned long md5_children = 0;
+
+static void
+md5_child_reaper()
+{
+ int status;
+ pid_t child;
+
+ do {
+ child = waitpid(0, &status, WNOHANG);
+ if ((child > 0) && (md5_children > 0))
+ md5_children--;
+ } while (child > 0);
+}
+
+static int
+md5_signal_child_init(void (*fn)())
+{
+ struct sigaction act, oact;
+
+ sigemptyset(&act.sa_mask);
+ act.sa_handler = fn;
+ act.sa_flags = 0;
+
+ if (sigaction(SIGCHLD, &act, &oact) == 0)
+ return(1);
+
+ fprintf(stderr, "[os_signal_child_init()] sigaction() failed: %s",
+ strerror(errno));
+ return(0);
+}
+
+/* ====================================================================== */
+
+int
+main(int argc, char **argv)
+{
+ int opt;
+ char *alt_config = NULL;
+ char *input_file = NULL;
+ const char *md5_dir = NULL;
+ const char *uid_file = NULL;
+ int uid_fd = (-1);
+ int uid_set = 0;
+ int uid_modulo = 0;
+ int r = 0;
+ int i;
+ int max_children = 0;
+ pid_t pid;
+ struct namespace md5_namespace;
+ char buf[512];
+ FILE *file;
+ int len;
+
+ if(geteuid() == 0)
+ fatal("must run as the Cyrus user", EC_USAGE);
+
+ setbuf(stdout, NULL);
+
+ while ((opt = getopt(argc, argv, "C:D:k:f:m:M:v")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'D': /* MD5 directory */
+ md5_dir = optarg;
+ break;
+
+ case 'f': /* Input file */
+ input_file = optarg;
+ break;
+
+ case 'k': /* Concurrent threads */
+ max_children = atoi(optarg);
+ break;
+
+ case 'm': /* Together with -M process fraction of users */
+ uid_set = atoi(optarg);
+ break;
+
+ case 'M': /* Together with -m process fraction of users */
+ uid_modulo = atoi(optarg);
+ break;
+
+ case 'v': /* verbose */
+ verbose++;
+ break;
+
+ default:
+ usage("make_md5");
+ }
+ }
+
+ /* Set up default bounds if no command line options provided */
+
+ cyrus_init(alt_config, "make_md5", 0);
+
+ syslog(LOG_NOTICE, "Generating MD5 checksums for mailboxes");
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(&md5_namespace, 1)) != 0) {
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+ mailbox_initialize();
+
+ /* open the quota db, we'll need it for real work */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ signals_set_shutdown(&shut_down);
+ signals_add_handlers(0);
+
+ if (!input_file && (optind == argc)) {
+ fprintf(stderr, "please specify user to MD5\n");
+ shut_down(1);
+ }
+
+ if (!md5_dir) md5_dir = config_getstring(IMAPOPT_MD5_DIR);
+
+ if (!md5_dir)
+ md5_dir = xstrdup("/var/imap/md5");
+
+ if (((uid_file = config_getstring(IMAPOPT_MD5_USER_MAP)) != NULL) &&
+ ((uid_fd=open(uid_file, O_RDONLY)) < 0)) {
+ syslog(LOG_NOTICE, "Failed to open uid file %s: %m\n", uid_file);
+ shut_down(1);
+ }
+
+ if (max_children == 0) {
+ /* Simple case */
+
+ if (input_file) {
+ if ((file=fopen(input_file, "r")) == NULL) {
+ syslog(LOG_NOTICE, "Unable to open %s: %m", input_file);
+ shut_down(1);
+ }
+ while (fgets(buf, sizeof(buf), file)) {
+ /* Chomp, then ignore empty/comment lines. */
+ if (((len=strlen(buf)) > 0) && (buf[len-1] == '\n'))
+ buf[--len] = '\0';
+
+ if ((len == 0) || (buf[0] == '#'))
+ continue;
+
+ if (do_user(md5_dir, buf, &md5_namespace,
+ uid_set, uid_modulo, uid_fd)) {
+ syslog(LOG_NOTICE, "Error make_md5 %s: %m", buf);
+ shut_down(1);
+ }
+ }
+ fclose(file);
+ } else for (i = optind; i < argc; i++) {
+ if (do_user(md5_dir, argv[i], &md5_namespace,
+ uid_set, uid_modulo, uid_fd)) {
+ syslog(LOG_NOTICE, "Error make_md5 %s: %m", argv[i]);
+ shut_down(1);
+ }
+ }
+
+ syslog(LOG_NOTICE, "Done MD5 checksums for mailboxes");
+ shut_down(0);
+ }
+
+ /* Enable child handler */
+ if (!md5_signal_child_init(md5_child_reaper)) {
+ fprintf(stderr, "Couldn't initialise child reaper\n");
+ exit(1);
+ }
+
+ if (input_file) {
+ if ((file=fopen(input_file, "r")) == NULL) {
+ syslog(LOG_NOTICE, "Unable to open %s: %m", input_file);
+ shut_down(1);
+ }
+ while (fgets(buf, sizeof(buf), file)) {
+ /* Chomp, then ignore empty/comment lines. */
+ if (((len=strlen(buf)) > 0) && (buf[len-1] == '\n'))
+ buf[--len] = '\0';
+
+ if ((len == 0) || (buf[0] == '#'))
+ continue;
+
+
+ while (md5_children == max_children) /* Concurrency limit */
+ pause();
+
+ if ((pid = fork()) < 0) {
+ fprintf(stderr, "Fork failed.\n");
+ shut_down(1);
+ }
+ if (pid == 0) {
+ /* Child process */
+ do_user(md5_dir, buf, &md5_namespace,
+ uid_set, uid_modulo, uid_fd);
+ _exit(0);
+ }
+ md5_children++; /* Parent process */
+ }
+ fclose(file);
+ } else for (i = optind; i < argc; i++) {
+ while (md5_children == max_children) /* Concurrency limit */
+ pause();
+
+ if ((pid = fork()) < 0) {
+ fprintf(stderr, "Fork failed.\n");
+ shut_down(1);
+ }
+ if (pid == 0) {
+ /* Child process */
+ do_user(md5_dir, argv[i], &md5_namespace,
+ uid_set, uid_modulo, uid_fd);
+ _exit(0);
+ }
+ md5_children++; /* Parent process */
+ }
+
+ /* Wait forall children to finish */
+ while (md5_children > 0)
+ pause();
+
+ syslog(LOG_NOTICE, "Finished generating MD5 checksums for mailboxes");
+ shut_down(0);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,911 @@
+/* mbdump.c -- Mailbox dump routines
+ * $Id: mbdump.c,v 1.26.2.10 2006/05/22 20:52:27 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <assert.h>
+
+#include "annotate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "imap_err.h"
+#include "imparse.h"
+#include "mailbox.h"
+#include "map.h"
+#include "mbdump.h"
+#include "mboxlist.h"
+#include "prot.h"
+#include "quota.h"
+#include "seen.h"
+#include "xmalloc.h"
+#include "util.h"
+
+/* is this the active script? */
+static int sieve_isactive(char *sievepath, char *name)
+{
+ char filename[1024];
+ char linkname[1024];
+ char activelink[1024];
+ char *file, *link;
+ int len;
+
+ snprintf(filename, sizeof(filename), "%s/%s", sievepath, name);
+ snprintf(linkname, sizeof(linkname), "%s/defaultbc", sievepath);
+
+ len = readlink(linkname, activelink, sizeof(activelink)-1);
+ if(len < 0) {
+ if(errno != ENOENT) syslog(LOG_ERR, "readlink(defaultbc): %m");
+ return 0;
+ }
+
+ activelink[len] = '\0';
+
+ /* Only compare the part of the file after the last /,
+ * since that is what timsieved does */
+ file = strrchr(filename, '/');
+ link = strrchr(activelink, '/');
+ if(!file) file = filename;
+ else file++;
+ if(!link) link = activelink;
+ else link++;
+
+ if (!strcmp(file, link)) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+struct dump_annotation_rock
+{
+ struct protstream *pout;
+ const char *tag;
+};
+
+static int dump_annotations(const char *mailbox __attribute__((unused)),
+ const char *entry,
+ const char *userid,
+ struct annotation_data *attrib, void *rock)
+{
+ struct dump_annotation_rock *ctx = (struct dump_annotation_rock *)rock;
+
+ /* "A-" userid entry */
+ /* entry is delimited by its leading / */
+ unsigned long ename_size = 2 + strlen(userid) + strlen(entry);
+
+ /* Transfer all attributes for this annotation, don't transfer size
+ * separately since that can be implicitly determined */
+ prot_printf(ctx->pout,
+ " {%ld%s}\r\nA-%s%s (%ld {%d%s}\r\n%s {%d%s}\r\n%s)",
+ ename_size, (!ctx->tag ? "+" : ""),
+ userid, entry,
+ attrib->modifiedsince,
+ attrib->size, (!ctx->tag ? "+" : ""),
+ attrib->value,
+ strlen(attrib->contenttype), (!ctx->tag ? "+" : ""),
+ attrib->contenttype);
+
+ return 0;
+}
+
+struct data_file {
+ const char *fname;
+ unsigned long flag;
+};
+
+static const char fname_header[] = FNAME_HEADER;
+static const char fname_index[] = FNAME_INDEX;
+static const char fname_cache[] = FNAME_CACHE;
+
+static struct data_file data_files[] = {
+ { fname_header+1, IMAP_ENUM_METAPARTITION_FILES_HEADER },
+ { fname_index+1, IMAP_ENUM_METAPARTITION_FILES_INDEX },
+ { fname_cache+1, IMAP_ENUM_METAPARTITION_FILES_CACHE },
+ /* XXX For two-phase expunge, we also need to copy cyrus.expunge */
+ { NULL, 0 }
+};
+
+int dump_mailbox(const char *tag, const char *mbname, const char *mbpath,
+ const char *metapath, const char *mbacl, int uid_start,
+ struct protstream *pin, struct protstream *pout,
+ struct auth_state *auth_state)
+{
+ DIR *mbdir = NULL;
+ int r = 0;
+ struct dirent *next = NULL;
+ char filename[MAX_MAILBOX_PATH + 1024], *fname_tail;
+ size_t fname_len;
+ int filefd;
+ const char *base;
+ unsigned long len;
+ int first = 1;
+ struct mailbox mb;
+ unsigned int msgno;
+ struct stat sbuf;
+ char c;
+ int i;
+ struct data_file *df;
+
+ /* non-null userid means we are moving the user */
+ const char *userid = NULL;
+ enum { SEEN_DB = 0, SUBS_DB = 1 };
+ char *user_data_files[3];
+ int domainlen = 0;
+ char *p = NULL, userbuf[81];
+
+ assert(mbpath);
+
+ if (config_virtdomains && (p = strchr(mbname, '!')))
+ domainlen = p - mbname + 1; /* include separator */
+
+ if(!strncmp(mbname+domainlen, "user.", 5) &&
+ !strchr(mbname+domainlen+5, '.')) {
+ strcpy(userbuf, mbname+domainlen+5);
+ if (domainlen)
+ sprintf(userbuf+strlen(userbuf), "@%.*s", domainlen-1, mbname);
+ userid = userbuf;
+ memset(user_data_files, 0, sizeof(user_data_files));
+ user_data_files[SEEN_DB] = seen_getpath(userid);
+ user_data_files[SUBS_DB] = mboxlist_hash_usersubs(userid);
+ }
+
+ mbdir = opendir(mbpath);
+ if(!mbdir && errno == EACCES) {
+ syslog(LOG_ERR,
+ "could not dump mailbox in %s (permission denied)", mbpath);
+ return IMAP_PERMISSION_DENIED;
+ } else if (!mbdir) {
+ syslog(LOG_ERR,
+ "could not dump mailbox in %s (unknown error)", mbpath);
+ return IMAP_SYS_ERROR;
+ }
+
+ r = mailbox_open_locked(mbname, mbpath, metapath, mbacl, auth_state, &mb, 0);
+ if(r) {
+ closedir(mbdir);
+ return r;
+ }
+
+ /* after this point we have to both close the directory and unlock
+ * the mailbox */
+
+ /* xxx check to ensure we have the cyrus.* files, but we send those last */
+
+ if(tag) prot_printf(pout, "%s DUMP ", tag);
+ prot_putc('(',pout);
+
+ /* The first member is either a number (if it is a quota root), or NIL
+ * (if it isn't) */
+ {
+ struct quota quota;
+
+ quota.root = (char *)mbname; /* xxx */
+
+ r = quota_read("a, NULL, 0);
+ if(r) {
+ prot_printf(pout, "NIL ");
+ if(r == IMAP_QUOTAROOT_NONEXISTENT) r = 0;
+ goto dump_files;
+ }
+
+ prot_printf(pout, "%d ", quota.limit);
+ }
+
+ dump_files:
+
+ snprintf(filename, sizeof(filename), "%s/", mbpath);
+ fname_len = strlen(filename);
+ fname_tail = filename + fname_len;
+
+ for (msgno = 1; msgno <= mb.exists; msgno++) {
+ struct index_record record;
+
+ r = mailbox_read_index_record(&mb, msgno, &record);
+ if (r) {
+ syslog(LOG_ERR, "IOERROR: reading index record %u: %m", msgno);
+ goto done;
+ }
+
+ /* ensure (number) is >= our target uid */
+ if(record.uid < uid_start) continue;
+
+ /* map file */
+ mailbox_message_get_fname(&mb, record.uid, fname_tail,
+ sizeof(filename) - fname_len);
+
+ filefd = open(filename, O_RDONLY, 0666);
+ if (filefd == -1) {
+ syslog(LOG_ERR, "IOERROR: open on %s: %m", filename);
+ r = IMAP_SYS_ERROR;
+ goto done;
+ }
+
+ if (fstat(filefd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m", filename);
+ fatal("can't fstat message file", EC_OSFILE);
+ }
+
+ base = NULL;
+ len = 0;
+
+ map_refresh(filefd, 1, &base, &len, sbuf.st_size, filename, NULL);
+
+ close(filefd);
+
+ /* send filename, size, and contents */
+ if(first) {
+ prot_printf(pout, "{%d}\r\n",
+ strlen(fname_tail));
+
+ if(!tag) {
+ /* synchronize */
+ c = prot_getc(pin);
+ eatline(pin, c); /* We eat it no matter what */
+ if(c != '+') {
+ /* Synchronization Failure, Abort! */
+ syslog(LOG_ERR, "Sync Error: expected '+' got '%c'",c);
+ r = IMAP_SERVER_UNAVAILABLE;
+ goto done;
+ }
+ }
+
+ prot_printf(pout, "%s {%lu%s}\r\n",
+ fname_tail, len,
+ (!tag ? "+" : ""));
+
+ first = 0;
+ } else {
+ prot_printf(pout, " {%d%s}\r\n%s {%lu%s}\r\n",
+ strlen(fname_tail),
+ (!tag ? "+" : ""),
+ fname_tail, len,
+ (!tag ? "+" : ""));
+ }
+ prot_write(pout, base, len);
+ map_free(&base, &len);
+ }
+
+ /* XXX For two-phase expunge, we also need to copy message files
+ referenced by cyrus.expunge */
+
+ for (df = data_files; df->fname; df++) {
+ const char *path;
+
+ /* map file */
+ path = (metapath && (config_metapartition_files & df->flag)) ?
+ metapath : mbpath;
+ strlcpy(filename, path, sizeof(filename));
+ strlcat(filename, "/", sizeof(filename));
+ strlcat(filename, df->fname, sizeof(filename));
+
+ filefd = open(filename, O_RDONLY, 0666);
+ if (filefd == -1) {
+ syslog(LOG_ERR, "IOERROR: open on %s: %m", filename);
+ r = IMAP_SYS_ERROR;
+ goto done;
+ }
+
+ if (fstat(filefd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m", filename);
+ fatal("can't fstat message file", EC_OSFILE);
+ }
+
+ base = NULL;
+ len = 0;
+
+ map_refresh(filefd, 1, &base, &len, sbuf.st_size, filename, NULL);
+
+ close(filefd);
+
+ /* send filename, size, and contents */
+ if(first) {
+ prot_printf(pout, "{%d}\r\n",
+ strlen(df->fname));
+
+ if(!tag) {
+ /* synchronize */
+ c = prot_getc(pin);
+ if(c != '+') {
+ /* Synchronization Failure, Abort! */
+ r = IMAP_SERVER_UNAVAILABLE;
+ goto done;
+ } else {
+ eatline(pin, c);
+ }
+ }
+
+ prot_printf(pout, "%s {%lu%s}\r\n",
+ df->fname, len,
+ (!tag ? "+" : ""));
+ first = 0;
+ } else {
+ prot_printf(pout, " {%d%s}\r\n%s {%lu%s}\r\n",
+ strlen(df->fname),
+ (!tag ? "+" : ""),
+ df->fname, len,
+ (!tag ? "+" : ""));
+ }
+ prot_write(pout, base, len);
+ map_free(&base, &len);
+ }
+
+ /* now dump annotations */
+ {
+ struct dump_annotation_rock actx;
+ actx.tag = tag;
+ actx.pout = pout;
+ annotatemore_findall(mbname,"*",dump_annotations, (void *)&actx, NULL);
+ }
+
+ if(userid) {
+ char sieve_path[MAX_MAILBOX_PATH];
+ int sieve_usehomedir = config_getswitch(IMAPOPT_SIEVEUSEHOMEDIR);
+
+ /* need to transfer seen, subs, and sieve files */
+ for(i=0;i<3;i++) {
+ if(!user_data_files[i]) continue;
+
+ /* map file */
+ filefd = open(user_data_files[i], O_RDONLY, 0666);
+ if (filefd == -1) {
+ syslog(LOG_ERR, "IOERROR: open on %s: %m (continuing)",
+ user_data_files[i]);
+ /* but it is allowed to not exist, so... */
+ continue;
+ }
+
+ if (fstat(filefd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m",
+ user_data_files[i]);
+ fatal("can't fstat message file", EC_OSFILE);
+ }
+
+ base = NULL;
+ len = 0;
+
+ map_refresh(filefd, 1, &base, &len, sbuf.st_size,
+ user_data_files[i], NULL);
+
+ close(filefd);
+
+ /* send user data file type, size, and contents */
+ /* No need to test synchronization, all mailboxes should have
+ * sent a file by this point! */
+ if(i == SEEN_DB) prot_printf(pout, " {4%s}\r\nSEEN",
+ (!tag ? "+" : ""));
+ else if(i == SUBS_DB) prot_printf(pout, " {4%s}\r\nSUBS",
+ (!tag ? "+" : ""));
+ else fatal("unknown user_data_file", EC_OSFILE);
+ prot_printf(pout, " {%lu%s}\r\n",
+ len, (!tag ? "+" : ""));
+ prot_write(pout, base, len);
+ map_free(&base, &len);
+ }
+
+ /* xxx can't use home directories currently
+ * (it makes almost no sense in the conext of a murder) */
+ if(!sieve_usehomedir) {
+ char ext_fname[2048];
+
+ if(mbdir) closedir(mbdir);
+ mbdir = NULL;
+
+ if (domainlen) {
+ *p = '\0'; /* separate domain!mboxname */
+ snprintf(sieve_path, sizeof(sieve_path), "%s%s%c/%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR),
+ FNAME_DOMAINDIR, (char) dir_hash_c(mbname), mbname,
+ (char) dir_hash_c(p+6), p+6); /* unqualified userid */
+ *p = '!'; /* reassemble domain!mboxname */
+ }
+ else {
+ snprintf(sieve_path, sizeof(sieve_path), "%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR),
+ (char) dir_hash_c(userid), userid);
+ }
+ mbdir=opendir(sieve_path);
+
+ if(mbdir) {
+ snprintf(filename, sizeof(filename), "%s/", sieve_path);
+ fname_len = strlen(filename);
+ fname_tail = filename + fname_len;
+
+ while((next = readdir(mbdir)) != NULL) {
+ int length=strlen(next->d_name);
+ /* 7 == strlen(".script"); 3 == strlen(".bc") */
+ if ((length >= 7 && !strcmp(next->d_name + (length - 7), ".script")) ||
+ (length >= 3 && !strcmp(next->d_name + (length - 3), ".bc")))
+ {
+ /* map file */
+ strlcpy(fname_tail, next->d_name,
+ sizeof(filename) - fname_len);
+ syslog(LOG_DEBUG, "wanting to dump %s", filename);
+ filefd = open(filename, O_RDONLY, 0666);
+ if (filefd == -1) {
+ /* non-fatal */
+ syslog(LOG_ERR,
+ "IOERROR: open on %s: %m", filename);
+ continue;
+ }
+
+ if (fstat(filefd, &sbuf) == -1) {
+ syslog(LOG_ERR,
+ "IOERROR: fstat on %s: %m", filename);
+ fatal("can't fstat message file", EC_OSFILE);
+ }
+
+ base = NULL;
+ len = 0;
+
+ map_refresh(filefd, 1, &base, &len, sbuf.st_size,
+ filename, NULL);
+
+ close(filefd);
+
+ /* send filename w/tag + contents */
+ if(sieve_isactive(sieve_path, next->d_name)) {
+ snprintf(ext_fname, sizeof(ext_fname),
+ "SIEVED-%s", next->d_name);
+ } else {
+ snprintf(ext_fname, sizeof(ext_fname),
+ "SIEVE-%s", next->d_name);
+ }
+ prot_printf(pout, " {%d%s}\r\n%s {%lu%s}\r\n",
+ strlen(ext_fname),
+ (!tag ? "+" : ""),
+ ext_fname,
+ len,
+ (!tag ? "+" : ""));
+ prot_write(pout, base, len);
+ map_free(&base, &len);
+ }
+ }
+ }
+ }
+
+ /* transmit sieve script(s) */
+ /* free strings for user_data_files */
+ } /* end if user */
+
+ prot_printf(pout,")\r\n");
+ done:
+ prot_flush(pout);
+
+ mailbox_close(&mb);
+ if(mbdir) closedir(mbdir);
+
+ return r;
+}
+
+int undump_mailbox(const char *mbname, const char *mbpath,
+ const char *metapath, const char *mbacl,
+ struct protstream *pin, struct protstream *pout,
+ struct auth_state *auth_state)
+{
+ struct buf file, data;
+ char c;
+ uquota_t quotaused = 0;
+ int r = 0;
+ int curfile = -1;
+ const char *userid = NULL;
+ struct mailbox mb;
+ char sieve_path[2048];
+ int sieve_usehomedir = config_getswitch(IMAPOPT_SIEVEUSEHOMEDIR);
+ int domainlen = 0;
+ char *p = NULL, userbuf[81];
+
+ memset(&file, 0, sizeof(file));
+ memset(&data, 0, sizeof(data));
+
+ c = getword(pin, &data);
+
+ if (config_virtdomains && (p = strchr(mbname, '!')))
+ domainlen = p - mbname + 1; /* include separator */
+
+ if(!strncmp(mbname+domainlen, "user.", 5) &&
+ !strchr(mbname+domainlen+5, '.')) {
+ strcpy(userbuf, mbname+domainlen+5);
+ if (domainlen)
+ sprintf(userbuf+strlen(userbuf), "@%.*s", domainlen-1, mbname);
+ userid = userbuf;
+
+ if(!sieve_usehomedir) {
+ if (domainlen) {
+ *p = '\0'; /* separate domain!mboxname */
+ snprintf(sieve_path, sizeof(sieve_path), "%s%s%c/%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR),
+ FNAME_DOMAINDIR, (char) dir_hash_c(mbname), mbname,
+ (char) dir_hash_c(p+6), p+6); /* unqualified userid */
+ *p = '!'; /* reassemble domain!mboxname */
+ }
+ else {
+ snprintf(sieve_path, sizeof(sieve_path), "%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR),
+ (char) dir_hash_c(userid), userid);
+ }
+ }
+ }
+
+ /* we better be in a list now */
+ if(c != '(' || data.s[0]) {
+ freebuf(&data);
+ eatline(pin, c);
+ return IMAP_PROTOCOL_BAD_PARAMETERS;
+ }
+
+ /* We should now have a number or a NIL */
+ c = getword(pin, &data);
+ if(!strcmp(data.s, "NIL")) {
+ /* Remove any existing quotaroot */
+ mboxlist_unsetquota(mbname);
+ } else if(imparse_isnumber(data.s)) {
+ /* Set a Quota */
+ mboxlist_setquota(mbname, atoi(data.s), 0);
+ } else {
+ /* Huh? */
+ freebuf(&data);
+ eatline(pin, c);
+ return IMAP_PROTOCOL_BAD_PARAMETERS;
+ }
+
+ if(c != ' ' && c != ')') {
+ freebuf(&data);
+ eatline(pin, c);
+ return IMAP_PROTOCOL_BAD_PARAMETERS;
+ } else if(c == ')') {
+ goto done;
+ }
+
+ r = mailbox_open_locked(mbname, mbpath, metapath, mbacl, auth_state, &mb, 0);
+ if(r) goto done;
+
+ while(1) {
+ char fnamebuf[MAX_MAILBOX_PATH + 1024];
+ char *seen_file = NULL;
+ int isnowait, sawdigit;
+ unsigned long size;
+ unsigned long cutoff = ULONG_MAX / 10;
+ unsigned digit, cutlim = ULONG_MAX % 10;
+
+ c = getastring(pin, pout, &file);
+ if(c != ' ') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ if(!strncmp(file.s, "A-", 2)) {
+ /* Annotation */
+ char *userid;
+ char *annotation;
+ char *contenttype;
+ char *content;
+ size_t contentsize;
+ time_t modtime = 0;
+ int i;
+
+ for(i=2; file.s[i]; i++) {
+ if(file.s[i] == '/') break;
+ }
+ if(!file.s[i]) {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ userid = xmalloc(i-2+1);
+
+ memcpy(userid, &(file.s[2]), i-2);
+ userid[i-2] = '\0';
+
+ annotation = xstrdup(&(file.s[i]));
+
+ if(prot_getc(pin) != '(') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ /* Parse the modtime */
+ c = getword(pin, &data);
+ if (c != ' ') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ if (data.s[0] == '\0') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ for (p = data.s; *p; p++) {
+ if (!isdigit((int) *p)) {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ modtime = modtime * 10 + *p - '0';
+ /* xxx - we won't catch overflow here, but we really
+ * don't care *THAT* much, do we? */
+ }
+
+ c = getbastring(pin, pout, &data);
+ /* xxx binary */
+ content = xstrdup(data.s);
+ contentsize = data.len;
+
+ if(c != ' ') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ c = getastring(pin, pout, &data);
+ contenttype = xstrdup(data.s);
+
+ if(c != ')') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ annotatemore_write_entry(mbname, annotation, userid, content,
+ contenttype, contentsize, modtime, NULL);
+
+ free(userid);
+ free(annotation);
+ free(content);
+ free(contenttype);
+
+ c = prot_getc(pin);
+ if(c == ')') break; /* that was the last item */
+ else if(c != ' ') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ continue;
+ }
+
+ /* read size of literal */
+ c = prot_getc(pin);
+ if (c != '{') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ size = isnowait = sawdigit = 0;
+ while ((c = prot_getc(pin)) != EOF && isdigit(c)) {
+ sawdigit = 1;
+ digit = c - '0';
+ /* check for overflow */
+ if (size > cutoff || (size == cutoff && digit > cutlim)) {
+ fatal("literal too big", EC_IOERR);
+ }
+ size = size*10 + digit;
+ }
+ if (c == '+') {
+ isnowait++;
+ c = prot_getc(pin);
+ }
+ if (c == '}') {
+ c = prot_getc(pin);
+ if (c == '\r') c = prot_getc(pin);
+ }
+ if (!sawdigit || c != '\n') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ if (!isnowait) {
+ /* Tell client to send the message */
+ prot_printf(pout, "+ go ahead\r\n");
+ prot_flush(pout);
+ }
+
+ if(userid && !strcmp(file.s, "SUBS")) {
+ /* overwriting this outright is absolutely what we want to do */
+ char *s = mboxlist_hash_usersubs(userid);
+ strlcpy(fnamebuf, s, sizeof(fnamebuf));
+ free(s);
+ } else if (userid && !strcmp(file.s, "SEEN")) {
+ seen_file = seen_getpath(userid);
+
+ snprintf(fnamebuf,sizeof(fnamebuf),"%s.%d",seen_file,getpid());
+ } else if (userid && !strncmp(file.s, "SIEVE", 5)) {
+ int isdefault = !strncmp(file.s, "SIEVED", 6);
+ char *realname;
+ int ret;
+
+ /* skip prefixes */
+ if(isdefault) realname = file.s + 7;
+ else realname = file.s + 6;
+
+ if(sieve_usehomedir) {
+ /* xxx! */
+ syslog(LOG_ERR,
+ "dropping sieve file %s since this host is " \
+ "configured for sieve_usehomedir",
+ realname);
+ continue;
+ } else {
+ if(snprintf(fnamebuf, sizeof(fnamebuf),
+ "%s/%s", sieve_path, realname) == -1) {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ } else if(isdefault) {
+ char linkbuf[2048];
+
+ snprintf(linkbuf, sizeof(linkbuf), "%s/defaultbc",
+ sieve_path);
+ ret = symlink(realname, linkbuf);
+ if(ret && errno == ENOENT) {
+ if(cyrus_mkdir(linkbuf, 0750) == 0) {
+ ret = symlink(realname, linkbuf);
+ }
+ }
+ if(ret) {
+ syslog(LOG_ERR, "symlink(%s, %s): %m", realname,
+ linkbuf);
+ /* Non-fatal,
+ let's get the file transferred if we can */
+ }
+
+ }
+ }
+ } else {
+ struct data_file *df;
+ const char *path;
+
+ /* see if its one of our datafiles */
+ for (df = data_files; df->fname && strcmp(df->fname, file.s); df++);
+ path = df->fname && metapath &&
+ (config_metapartition_files & df->flag) ?
+ metapath : mbpath;
+ if(snprintf(fnamebuf, sizeof(fnamebuf),
+ "%s/%s", path, file.s) == -1) {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ if(strncmp(file.s, "cyrus.", 6)) {
+ /* it doesn't match cyrus.*, so its a message file.
+ * charge it against the quota */
+ quotaused += size;
+ }
+ }
+
+ /* if we haven't opened it, do so */
+ curfile = open(fnamebuf, O_WRONLY|O_TRUNC|O_CREAT, 0640);
+ if(curfile == -1 && errno == ENOENT) {
+ if(cyrus_mkdir(fnamebuf, 0750) == 0) {
+ curfile = open(fnamebuf, O_WRONLY|O_TRUNC|O_CREAT, 0640);
+ }
+ }
+
+ if(curfile == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebuf);
+ r = IMAP_IOERROR;
+ goto done;
+ }
+
+ /* write data to file */
+ while (size) {
+ char buf[4096+1];
+ int n = prot_read(pin, buf, size > 4096 ? 4096 : size);
+ if (!n) {
+ syslog(LOG_ERR,
+ "IOERROR: reading message: unexpected end of file");
+ r = IMAP_IOERROR;
+ goto done;
+ }
+
+ size -= n;
+
+ if (write(curfile, buf, n) != n) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
+ r = IMAP_IOERROR;
+ goto done;
+ }
+ }
+
+ close(curfile);
+
+ /* we were operating on the seen state, so merge it and cleanup */
+ if(seen_file) {
+ seen_merge(fnamebuf, seen_file);
+ free(seen_file);
+ seen_file = NULL;
+
+ unlink(fnamebuf);
+ }
+
+ c = prot_getc(pin);
+ if (c == ')') break;
+ if (c != ' ') {
+ r = IMAP_PROTOCOL_ERROR;
+ goto done;
+ }
+ }
+
+ if(!r && quotaused) {
+ struct quota quota;
+ char quota_root[MAX_MAILBOX_PATH+1];
+ struct txn *tid = NULL;
+
+ if (quota_findroot(quota_root, sizeof(quota_root), mbname)) {
+ /* update the quota file */
+ memset("a, 0, sizeof(quota));
+ quota.root = quota_root;
+ r = quota_read("a, &tid, 1);
+ if(!r) {
+ quota.used += quotaused;
+ r = quota_write("a, &tid);
+ if (!r) quota_commit(&tid);
+ } else {
+ syslog(LOG_ERR, "could not lock quota file for %s (%s)",
+ quota_root, error_message(r));
+ }
+ if(r) {
+ syslog(LOG_ERR, "failed writing quota file for %s (%s)",
+ quota_root, error_message(r));
+ }
+ }
+ }
+
+ done:
+ /* eat the rest of the line, we have atleast a \r\n coming */
+ eatline(pin, c);
+ freebuf(&file);
+ freebuf(&data);
+
+ if(curfile >= 0) close(curfile);
+ mailbox_close(&mb);
+
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbdump.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,68 @@
+/* mbdump.h -- Mailbox dump routine definitions
+ * $Id: mbdump.h,v 1.4.4.1 2004/04/08 21:13:05 ken3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+#ifndef INCLUDED_MBDUMP_H
+#define INCLUDED_MBDUMP_H
+
+#include "prot.h"
+
+/* if tag is non-null, we assume that we are a server sending to the
+ * client, and:
+ * a) do not use the + syntax for nonsynchronized literals
+ * b) preface the response with <tag> DUMP
+ *
+ * if tag is NULL, then we use the + nonsynchronized syntax for everything
+ * after the first send.
+ *
+ * (note that this assumes server LITERAL+ support, but we don't care since
+ * this is a Cyrus-only extention)
+ */
+extern int dump_mailbox(const char *tag, const char *mbname,
+ const char *mbpath, const char *metapath,
+ const char *mbacl, int uid_start,
+ struct protstream *pin, struct protstream *pout,
+ struct auth_state *auth_state);
+extern int undump_mailbox(const char *mbname, const char *mbpath,
+ const char *metapath, const char *mbacl,
+ struct protstream *pin, struct protstream *pout,
+ struct auth_state *auth_state);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbexamine.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbexamine.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbexamine.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbexamine.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,398 @@
+/* mbexamine.c -- examine the contents of a mailbox index and cache
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mbexamine.c,v 1.5.2.10 2006/06/02 16:41:57 murch Exp $ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+
+#include "acl.h"
+#include "assert.h"
+#include "bsearch.h"
+#include "convert_code.h"
+#include "exitcodes.h"
+#include "index.h"
+#include "global.h"
+#include "imap_err.h"
+#include "imparse.h"
+#include "mailbox.h"
+#include "message.h"
+#include "mboxname.h"
+#include "mboxlist.h"
+#include "seen.h"
+#include "retry.h"
+#include "util.h"
+#include "xmalloc.h"
+
+extern int optind;
+extern char *optarg;
+
+/* current namespace */
+static struct namespace recon_namespace;
+
+/* config.c stuff */
+const int config_need_data = 0;
+
+/* forward declarations */
+int do_examine(char *name, int matchlen, int maycreate, void *rock);
+void usage(void);
+void shut_down(int code);
+
+int code = 0;
+
+int wantuid = 0;
+int wantvalue = 0;
+
+int main(int argc, char **argv)
+{
+ int opt, i, r;
+ char buf[MAX_MAILBOX_PATH+1];
+ char *alt_config = NULL;
+
+/* if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE); */
+
+ /* Ensure we're up-to-date on the index file format */
+ assert(INDEX_HEADER_SIZE == (OFFSET_SPARE4+4));
+ assert(INDEX_RECORD_SIZE == (OFFSET_MODSEQ+4));
+
+ while ((opt = getopt(argc, argv, "C:u:s:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'u':
+ if(wantvalue) usage();
+ wantuid = 1;
+ wantvalue = atoi(optarg);
+ break;
+
+ case 's':
+ if(wantvalue) usage();
+ wantvalue = atoi(optarg);
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ cyrus_init(alt_config, "mbexamine", 0);
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(&recon_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ signals_set_shutdown(&shut_down);
+ signals_add_handlers(0);
+
+ if (optind == argc) {
+ strlcpy(buf, "*", sizeof(buf));
+ (*recon_namespace.mboxlist_findall)(&recon_namespace, buf, 1, 0, 0,
+ do_examine, NULL);
+ }
+
+ for (i = optind; i < argc; i++) {
+ /* Handle virtdomains and separators in mailboxname */
+ (*recon_namespace.mboxname_tointernal)(&recon_namespace, argv[i],
+ NULL, buf);
+ (*recon_namespace.mboxlist_findall)(&recon_namespace, buf, 1, 0,
+ 0, do_examine, NULL);
+ }
+
+ mboxlist_close();
+ mboxlist_done();
+
+ exit(code);
+}
+
+void usage(void)
+{
+ fprintf(stderr,
+ "usage: mbexamine [-C <alt_config>] [-s seqnum] mailbox...\n"
+ " mbexamine [-C <alt_config>] [-u uid] mailbox...\n");
+ exit(EC_USAGE);
+}
+
+/*
+ * mboxlist_findall() callback function to examine a mailbox
+ */
+int do_examine(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock __attribute__((unused)))
+{
+ int i,r = 0;
+ int flag = 0;
+ char ext_name_buf[MAX_MAILBOX_PATH+1];
+ struct mailbox mailbox;
+ const char *index_base;
+ long int start_offset, record_size;
+
+ signals_poll();
+
+ /* Convert internal name to external */
+ (*recon_namespace.mboxname_toexternal)(&recon_namespace, name,
+ "cyrus", ext_name_buf);
+ printf("Examining %s...\n", ext_name_buf);
+
+ /* Open/lock header */
+ r = mailbox_open_header(name, 0, &mailbox);
+ if (r) {
+ return r;
+ }
+ if (mailbox.header_fd != -1) {
+ (void) mailbox_lock_header(&mailbox);
+ }
+ mailbox.header_lock_count = 1;
+
+ if (chdir(mailbox.path) == -1) {
+ r = IMAP_IOERROR;
+ goto done;
+ }
+
+ /* Attempt to open/lock index */
+ r = mailbox_open_index(&mailbox);
+ if (r) {
+ goto done;
+ } else {
+ (void) mailbox_lock_index(&mailbox);
+ }
+ mailbox.index_lock_count = 1;
+
+ printf(" Mailbox Header Info:\n");
+ printf(" Path to mailbox: %s\n", mailbox.path);
+ printf(" Mailbox ACL: %s\n", mailbox.acl); /* xxx parse */
+ printf(" Unique ID: %s\n", mailbox.uniqueid);
+ printf(" User Flags: ");
+
+ for(i=0;i<MAX_USER_FLAGS;i++) {
+ if(!mailbox.flagname[i]) break;
+ printf("%s ", mailbox.flagname[i]);
+ }
+
+ if(i==0) printf("[none]");
+
+ printf("\n");
+
+ printf("\n Index Header Info:\n");
+ printf(" Generation Number: %d\n", mailbox.generation_no);
+ printf(" Format: ");
+ switch(mailbox.format) {
+ case MAILBOX_FORMAT_NORMAL:
+ printf("NORMAL");
+ break;
+ case MAILBOX_FORMAT_NETNEWS:
+ printf("NET NEWS");
+ break;
+ default:
+ printf("UNKNOWN");
+ }
+ printf("\n");
+ printf(" Minor Version: %d\n", mailbox.minor_version);
+ printf(" Header Size: %ld bytes Record Size: %ld bytes\n",
+ mailbox.start_offset, mailbox.record_size);
+ printf(" Number of Messages: %lu Mailbox Size: " UQUOTA_T_FMT " bytes\n",
+ mailbox.exists, mailbox.quota_mailbox_used);
+ printf(" Last Append Date: (%ld) %s", mailbox.last_appenddate,
+ ctime(&mailbox.last_appenddate));
+ printf(" UIDValidity: %ld Last UID: %ld\n", mailbox.uidvalidity,
+ mailbox.last_uid);
+ printf(" Deleted: %ld Answered: %ld Flagged: %ld\n",
+ mailbox.deleted, mailbox.answered, mailbox.flagged);
+ if (mailbox.minor_version >= 4) {
+ printf(" Mailbox Options:");
+ if (!mailbox.options) {
+ printf(" NONE");
+ } else {
+ if (mailbox.options & OPT_POP3_NEW_UIDL) {
+ printf(" POP3_NEW_UIDL");
+ }
+ if (mailbox.options & OPT_IMAP_CONDSTORE) {
+ printf(" IMAP_CONDSTORE");
+ }
+ }
+ printf("\n");
+ }
+ printf(" Last POP3 Login: (%ld) %s", mailbox.pop3_last_login,
+ ctime(&mailbox.pop3_last_login));
+ if (mailbox.minor_version >= 8) {
+ printf(" Highest Mod Sequence: " MODSEQ_FMT "\n",
+ mailbox.highestmodseq);
+ }
+
+ printf("\n Message Info:\n");
+
+ index_base = mailbox.index_base;
+ start_offset = mailbox.start_offset;
+ record_size = mailbox.record_size;
+
+ for(i=1; i<=mailbox.exists; i++) {
+ const char *cacheitem;
+ int j;
+
+ if(wantvalue) {
+ if(!wantuid) {
+ if(i != wantvalue) continue;
+ } else {
+ if(UID(i) != wantvalue) continue;
+ }
+ flag = 1;
+ }
+
+ printf("%06d> UID:%08d INT_DATE:%d SENTDATE:%d SIZE:%-6d\n",
+ i, UID(i), INTERNALDATE(i), SENTDATE(i),
+ SIZE(i));
+ printf(" > HDRSIZE:%-6d LASTUPD :%ld SYSFLAGS:%08X",
+ HEADER_SIZE(i), LAST_UPDATED(i), SYSTEM_FLAGS(i));
+ if (mailbox.minor_version >= 5)
+ printf(" LINES:%-6d", CONTENT_LINES(i));
+
+ if (mailbox.minor_version >= 6)
+ printf(" CACHEVER:%-6d", CACHE_VERSION(i));
+
+ if (mailbox.minor_version >= 8) {
+ printf(" MODSEQ:" MODSEQ_FMT, MODSEQ(i));
+ }
+
+ printf("\n");
+
+ printf(" > USERFLAGS:");
+ for(j=(MAX_USER_FLAGS/32)-1; j>=0; j--) {
+ printf(" %08X", USER_FLAGS(i,j));
+ }
+ printf("\n");
+
+ cacheitem = mailbox.cache_base + CACHE_OFFSET(i);
+
+ printf(" Envel>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ printf("BdyStr>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ printf(" Body>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+
+#if 0
+ /* xxx print out machine-readable bodystructure? */
+ printf(" Sects>\n");
+#endif
+
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ printf("CacHdr>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ printf(" From>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ printf(" To>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ printf(" Cc>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ printf(" Bcc>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem);
+ printf("Subjct>{%d}%s\n", CACHE_ITEM_LEN(cacheitem),
+ cacheitem + CACHE_ITEM_SIZE_SKIP);
+
+ if(flag) break;
+ }
+
+ if(wantvalue && !flag) {
+ printf("Desired message not found\n");
+ }
+
+ done:
+ mailbox_close(&mailbox);
+
+ return r;
+}
+
+/*
+ * Cleanly shut down and exit
+ */
+void shut_down(int code) __attribute__((noreturn));
+void shut_down(int code)
+{
+ mboxlist_close();
+ mboxlist_done();
+ exit(code);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,510 @@
+/* mboxkey.c -- implementation of URLAUTH mailbox keys
+ * $Id: mboxkey.c,v 1.1.2.1 2005/11/17 15:46:28 murch Exp $
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+
+#include "cyrusdb.h"
+#include "map.h"
+#include "util.h"
+
+#include "global.h"
+#include "xmalloc.h"
+#include "mailbox.h"
+#include "imap_err.h"
+#include "mboxkey.h"
+
+#define FNAME_MBOXKEYSUFFIX ".mboxkey" /* per user mailbox key extension */
+
+enum {
+ MBOXKEY_VERSION = 1,
+ MBOXKEY_DEBUG = 0
+};
+
+struct mboxkey {
+ char *user; /* what user is this for? */
+ struct db *db;
+ struct txn *tid; /* outstanding txn, if any */
+};
+
+static struct mboxkey *lastmboxkey = NULL;
+
+#define DB (config_mboxkey_db)
+
+static void abortcurrent(struct mboxkey *s)
+{
+ if (s && s->tid) {
+ int r = DB->abort(s->db, s->tid);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error aborting txn: %s",
+ cyrusdb_strerror(r));
+ }
+ s->tid = NULL;
+ }
+}
+
+char *mboxkey_getpath(const char *userid)
+{
+ char *fname = xmalloc(strlen(config_dir) + sizeof(FNAME_DOMAINDIR) +
+ sizeof(FNAME_USERDIR) + strlen(userid) +
+ sizeof(FNAME_MBOXKEYSUFFIX) + 10);
+ char c, *domain;
+
+ if (config_virtdomains && (domain = strchr(userid, '@'))) {
+ char d = (char) dir_hash_c(domain+1);
+ *domain = '\0'; /* split user at domain */
+ c = (char) dir_hash_c(userid);
+ sprintf(fname, "%s%s%c/%s%s%c/%s%s", config_dir, FNAME_DOMAINDIR, d,
+ domain+1, FNAME_USERDIR, c, userid, FNAME_MBOXKEYSUFFIX);
+ *domain = '@'; /* reassemble user at domain */
+ }
+ else {
+ c = (char) dir_hash_c(userid);
+ sprintf(fname, "%s%s%c/%s%s", config_dir, FNAME_USERDIR, c, userid,
+ FNAME_MBOXKEYSUFFIX);
+ }
+
+ return fname;
+}
+
+int mboxkey_open(const char *user,
+ int flags,
+ struct mboxkey **mboxkeydbptr)
+{
+ struct mboxkey *mboxkeydb;
+ char *fname = NULL;
+ int r;
+
+ /* try to reuse the last db handle */
+ mboxkeydb = lastmboxkey;
+ lastmboxkey = NULL;
+ if (MBOXKEY_DEBUG) {
+ syslog(LOG_DEBUG, "mboxkey_db: mboxkey_open(%s)", user);
+ }
+
+ /* if this is the db we've already opened, return it */
+ if (mboxkeydb && !strcmp(mboxkeydb->user, user)) {
+ abortcurrent(mboxkeydb);
+ *mboxkeydbptr = mboxkeydb;
+ return 0;
+ }
+
+ *mboxkeydbptr = NULL;
+ /* otherwise, close the existing database */
+ if (mboxkeydb) {
+ abortcurrent(mboxkeydb);
+ r = DB->close(mboxkeydb->db);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing mboxkeydb: %s",
+ cyrusdb_strerror(r));
+ }
+ free(mboxkeydb->user);
+ } else {
+ /* create mboxkeydb */
+ mboxkeydb = (struct mboxkey *) xmalloc(sizeof(struct mboxkey));
+ }
+
+ /* open the mboxkeydb corresponding to user */
+ fname = mboxkey_getpath(user);
+ r = DB->open(fname, (flags & MBOXKEY_CREATE) ? CYRUSDB_CREATE : 0,
+ &mboxkeydb->db);
+ if (r != 0) {
+ int level = (flags & MBOXKEY_CREATE) ? LOG_ERR : LOG_DEBUG;
+ syslog(level, "DBERROR: opening %s: %s", fname,
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ free(mboxkeydb);
+ free(fname);
+ return r;
+ }
+ syslog(LOG_DEBUG, "mboxkey_db: user %s opened %s", user, fname);
+ free(fname);
+
+ mboxkeydb->tid = NULL;
+ mboxkeydb->user = xstrdup(user);
+
+ *mboxkeydbptr = mboxkeydb;
+ return r;
+}
+
+static int mboxkey_readit(struct mboxkey *mboxkeydb, const char *mailbox,
+ const char **mboxkey, size_t *mboxkeylen,
+ int rw)
+{
+ int r;
+ const char *data;
+ int datalen;
+ unsigned short version, s;
+
+ assert(mboxkeydb && mailbox);
+ if (rw || mboxkeydb->tid) {
+ r = DB->fetchlock(mboxkeydb->db, mailbox, strlen(mailbox),
+ &data, &datalen, &mboxkeydb->tid);
+ } else {
+ r = DB->fetch(mboxkeydb->db, mailbox, strlen(mailbox),
+ &data, &datalen, NULL);
+ }
+ switch (r) {
+ case 0:
+ break;
+ case CYRUSDB_AGAIN:
+ syslog(LOG_DEBUG, "deadlock in mboxkey database for '%s/%s'",
+ mboxkeydb->user, mailbox);
+ return IMAP_AGAIN;
+ break;
+ case CYRUSDB_IOERROR:
+ syslog(LOG_ERR, "DBERROR: error fetching txn %s",
+ cyrusdb_strerror(r));
+ return IMAP_IOERROR;
+ break;
+ case CYRUSDB_NOTFOUND:
+ *mboxkey = NULL;
+ *mboxkeylen = 0;
+
+ return 0;
+ break;
+ }
+
+ /* 'data' is <version><mboxkey> */
+ memcpy(&s, data, sizeof(s));
+ version = ntohs(s);
+ assert(version == MBOXKEY_VERSION);
+ *mboxkey = data + sizeof(s);
+ *mboxkeylen = datalen - sizeof(s);
+
+ return 0;
+}
+
+int mboxkey_read(struct mboxkey *mboxkeydb, const char *mailbox,
+ const char **mboxkey, size_t *mboxkeylen)
+{
+ if (MBOXKEY_DEBUG) {
+ syslog(LOG_DEBUG, "mboxkey_db: mboxkey_read(%s, %s)",
+ mboxkeydb->user, mailbox);
+ }
+
+ return mboxkey_readit(mboxkeydb, mailbox, mboxkey, mboxkeylen, 0);
+}
+
+int mboxkey_lockread(struct mboxkey *mboxkeydb, const char *mailbox,
+ const char **mboxkey, size_t *mboxkeylen)
+{
+ if (MBOXKEY_DEBUG) {
+ syslog(LOG_DEBUG, "mboxkey_db: mboxkey_lockread(%s, %s)",
+ mboxkeydb->user, mailbox);
+ }
+
+ return mboxkey_readit(mboxkeydb, mailbox, mboxkey, mboxkeylen, 1);
+}
+
+int mboxkey_write(struct mboxkey *mboxkeydb, const char *mailbox,
+ const char *mboxkey, size_t mboxkeylen)
+{
+ int r;
+
+ assert(mboxkeydb && mailbox);
+/* assert(mboxkeydb->tid);*/
+
+ if (MBOXKEY_DEBUG) {
+ syslog(LOG_DEBUG, "mboxkey_db: mboxkey_write(%s, %s, %s)",
+ mboxkeydb->user, mailbox, mboxkey ? "KEY" : "NIL");
+ }
+
+ if (!mboxkey) {
+ r = DB->delete(mboxkeydb->db, mailbox, strlen(mailbox),
+ &mboxkeydb->tid, 1);
+ }
+ else {
+ unsigned short version = MBOXKEY_VERSION, s;
+ int datalen = sizeof(s) + mboxkeylen;
+ char *data = xmalloc(datalen);
+
+ s = htons(version);
+ memcpy(data, &s, sizeof(s));
+ memcpy(data+sizeof(s), mboxkey, mboxkeylen);
+
+ r = DB->store(mboxkeydb->db, mailbox, strlen(mailbox),
+ data, datalen, &mboxkeydb->tid);
+ free(data);
+ }
+
+ switch (r) {
+ case CYRUSDB_OK:
+ break;
+ case CYRUSDB_IOERROR:
+ r = IMAP_AGAIN;
+ break;
+ default:
+ syslog(LOG_ERR, "DBERROR: error updating database: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ return r;
+}
+
+int mboxkey_close(struct mboxkey *mboxkeydb)
+{
+ int r;
+
+ if (MBOXKEY_DEBUG) {
+ syslog(LOG_DEBUG, "mboxkey_db: mboxkey_close(%s)",
+ mboxkeydb->user);
+ }
+
+ if (mboxkeydb->tid) {
+ r = DB->commit(mboxkeydb->db, mboxkeydb->tid);
+ if (r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: error committing mboxkey txn; "
+ "mboxkey state lost: %s", cyrusdb_strerror(r));
+ }
+ mboxkeydb->tid = NULL;
+ }
+
+ if (lastmboxkey) {
+ int r;
+
+ /* free the old database hanging around */
+ abortcurrent(lastmboxkey);
+ r = DB->close(lastmboxkey->db);
+ if (r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: error closing lastmboxkey: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ if(!r) lastmboxkey->db = NULL;
+ free(lastmboxkey->user);
+ free(lastmboxkey);
+ lastmboxkey = NULL;
+ }
+
+ /* this database can now be reused */
+ lastmboxkey = mboxkeydb;
+ return 0;
+}
+
+int mboxkey_delete_user(const char *user)
+{
+ char *fname = mboxkey_getpath(user);
+ int r = 0;
+
+ if (MBOXKEY_DEBUG) {
+ syslog(LOG_DEBUG, "mboxkey_db: mboxkey_delete_user(%s)",
+ user);
+ }
+
+ /* erp! */
+ r = unlink(fname);
+ if (r < 0 && errno == ENOENT) {
+ syslog(LOG_DEBUG, "can not unlink %s: %m", fname);
+ /* but maybe the user just never read anything? */
+ r = 0;
+ }
+ else if (r < 0) {
+ syslog(LOG_ERR, "error unlinking %s: %m", fname);
+ r = IMAP_IOERROR;
+ }
+ free(fname);
+
+ if (lastmboxkey) {
+ free(lastmboxkey->user);
+ free(lastmboxkey);
+ lastmboxkey = NULL;
+ }
+
+ return r;
+}
+
+/* database better have been locked before this ! */
+int mboxkey_unlock(struct mboxkey *mboxkeydb)
+{
+ int r;
+
+ assert(mboxkeydb);
+ if (!mboxkeydb->tid) return 0;
+
+ if (MBOXKEY_DEBUG) {
+ syslog(LOG_DEBUG, "mboxkey_db: mboxkey_unlock(%s)",
+ mboxkeydb->user);
+ }
+
+ r = DB->commit(mboxkeydb->db, mboxkeydb->tid);
+ if (r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: error committing mboxkey txn; "
+ "mboxkey state lost: %s", cyrusdb_strerror(r));
+ }
+ mboxkeydb->tid = NULL;
+
+ return 0;
+}
+
+int mboxkey_done(void)
+{
+ int r = 0;
+
+ if (MBOXKEY_DEBUG) {
+ syslog(LOG_DEBUG, "mboxkey_db: mboxkey_done()");
+ }
+
+ if (lastmboxkey) {
+ abortcurrent(lastmboxkey);
+ r = DB->close(lastmboxkey->db);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing lastmboxkey: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ free(lastmboxkey->user);
+ free(lastmboxkey);
+ }
+
+ return r;
+}
+#if 0
+struct mboxkey_merge_rock
+{
+ struct db *db;
+ struct txn *tid;
+};
+
+/* Look up the unique id in the tgt file, if it is there, compare the
+ * last change times, and ensure that the tgt database uses the newer of
+ * the two */
+static int mboxkey_merge_cb(void *rockp,
+ const char *key, int keylen,
+ const char *tmpdata, int tmpdatalen)
+{
+ int r;
+ struct mboxkey_merge_rock *rockdata = (struct mboxkey_merge_rock *)rockp;
+ struct db *tgtdb = rockdata->db;
+ const char *tgtdata;
+ int tgtdatalen, dirty = 0;
+
+ if(!tgtdb) return IMAP_INTERNAL;
+
+ r = DB->fetchlock(tgtdb, key, keylen, &tgtdata, &tgtdatalen,
+ &(rockdata->tid));
+ if(!r && tgtdata) {
+ /* compare timestamps */
+ int version, tmplast, tgtlast;
+ char *p;
+ const char *tmp = tmpdata, *tgt = tgtdata;
+
+ /* get version */
+ version = strtol(tgt, &p, 10); tgt = p;
+ assert(version == MBOXKEY_VERSION);
+ /* skip lastread */
+ strtol(tgt, &p, 10); tgt = p;
+ /* skip lastuid */
+ strtol(tgt, &p, 10); tgt = p;
+ /* get lastchange */
+ tgtlast = strtol(tgt, &p, 10);
+
+ /* get version */
+ version = strtol(tmp, &p, 10); tmp = p;
+ assert(version == MBOXKEY_VERSION);
+ /* skip lastread */
+ strtol(tmp, &p, 10); tmp = p;
+ /* skip lastuid */
+ strtol(tmp, &p, 10); tmp = p;
+ /* get lastchange */
+ tmplast = strtol(tmp, &p, 10);
+
+ if(tmplast > tgtlast) dirty = 1;
+ } else {
+ dirty = 1;
+ }
+
+ if(dirty) {
+ /* write back data from new entry */
+ return DB->store(tgtdb, key, keylen, tmpdata, tmpdatalen,
+ &(rockdata->tid));
+ } else {
+ return 0;
+ }
+}
+
+int mboxkey_merge(const char *tmpfile, const char *tgtfile)
+{
+ int r = 0;
+ struct db *tmp = NULL, *tgt = NULL;
+ struct mboxkey_merge_rock rock;
+
+ /* xxx does this need to be CYRUSDB_CREATE? */
+ r = DB->open(tmpfile, CYRUSDB_CREATE, &tmp);
+ if(r) goto done;
+
+ r = DB->open(tgtfile, CYRUSDB_CREATE, &tgt);
+ if(r) goto done;
+
+ rock.db = tgt;
+ rock.tid = NULL;
+
+ r = DB->foreach(tmp, "", 0, NULL, mboxkey_merge_cb, &rock, &rock.tid);
+
+ if(r) DB->abort(rock.db, rock.tid);
+ else DB->commit(rock.db, rock.tid);
+
+ done:
+
+ if(tgt) DB->close(tgt);
+ if(tmp) DB->close(tmp);
+
+ return r;
+}
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxkey.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+/* mboxkey.h -- abstract interface for URLAUTH mailbox keys
+ * $Id: mboxkey.h,v 1.1.2.1 2005/11/17 15:46:28 murch Exp $
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+
+#ifndef MBOXKEY_H
+#define MBOXKEY_H
+
+struct mboxkey;
+
+#define MBOXKEY_CREATE 0x01
+
+/* get a database handle corresponding to user pair */
+int mboxkey_open(const char *user,
+ int flags,
+ struct mboxkey **mboxkeydbptr);
+
+/* read an entry from 'mboxkeydb' */
+int mboxkey_read(struct mboxkey *mboxkeydb, const char *mailbox,
+ const char **mboxkey, size_t *mboxkeylen);
+
+/* read an entry from 'mboxkeydb' and leave that record (or some superset
+ of it) locked for update */
+int mboxkey_lockread(struct mboxkey *mboxkeydb, const char *mailbox,
+ const char **mboxkey, size_t *mboxkeylen);
+
+/* write an entry to 'mboxkeydb' */
+int mboxkey_write(struct mboxkey *mboxkeydb, const char *mailbox,
+ const char *mboxkey, size_t mboxkeylen);
+
+/* close this handle */
+int mboxkey_close(struct mboxkey *mboxkeydb);
+
+/* discard lock on handle */
+int mboxkey_unlock(struct mboxkey *mboxkeydb);
+
+/* called on user operations */
+int mboxkey_delete_user(const char *user);
+
+/* done with all mboxkey operations for this process */
+int mboxkey_done(void);
+
+/* Return a path to the mboxkey database for the given user */
+char *mboxkey_getpath(const char *userid);
+#if 0
+/* Merge tmpfile into tgtfile */
+int mboxkey_merge(const char *tmpfile, const char *tgtfile);
+#endif
+#endif /* MBOXKEY_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3243 @@
+/* mboxlist.c -- Mailbox list manipulation routines
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: mboxlist.c,v 1.221.2.22 2006/05/22 20:37:25 murch Exp $
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <syslog.h>
+
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+#include "acl.h"
+#include "annotate.h"
+#include "auth.h"
+#include "glob.h"
+#include "assert.h"
+#include "global.h"
+#include "cyrusdb.h"
+#include "util.h"
+#include "mailbox.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "xmalloc.h"
+
+#include "mboxname.h"
+#include "mupdate-client.h"
+
+#include "mboxlist.h"
+#include "quota.h"
+
+#define DB config_mboxlist_db
+#define SUBDB config_subscription_db
+
+cyrus_acl_canonproc_t mboxlist_ensureOwnerRights;
+
+struct db *mbdb;
+
+static int mboxlist_dbopen = 0;
+
+static int mboxlist_opensubs();
+static void mboxlist_closesubs();
+
+static int mboxlist_rmquota(const char *name, int matchlen, int maycreate,
+ void *rock);
+static int mboxlist_changequota(const char *name, int matchlen, int maycreate,
+ void *rock);
+
+struct change_rock {
+ struct quota *quota;
+ struct txn **tid;
+};
+
+#define FNAME_SUBSSUFFIX ".sub"
+
+/*
+ * Convert a partition into a path
+ */
+int mboxlist_getpath(const char *partition, const char *name,
+ char **pathp, char **mpathp)
+{
+ static char pathresult[MAX_MAILBOX_PATH+1];
+ static char mpathresult[MAX_MAILBOX_PATH+1];
+ const char *root;
+
+ assert(partition && pathp);
+
+ root = config_partitiondir(partition);
+ if (!root) return IMAP_PARTITION_UNKNOWN;
+
+ mailbox_hash_mbox(pathresult, sizeof(pathresult), root, name);
+ *pathp = pathresult;
+
+ if (mpathp) {
+ root = config_metapartitiondir(partition);
+ if (!root) *mpathp = NULL;
+ else {
+ mailbox_hash_mbox(mpathresult, sizeof(mpathresult), root, name);
+ *mpathp = mpathresult;
+ }
+ }
+
+ return 0;
+}
+
+char *mboxlist_makeentry(int mbtype, const char *part, const char *acl)
+{
+ char *mboxent = (char *) xmalloc(sizeof(char) *
+ (30 + strlen(acl) + strlen(part)));
+ sprintf(mboxent, "%d %s %s", mbtype, part, acl);
+ return mboxent;
+}
+
+/*
+ * Lookup 'name' in the mailbox list.
+ * The capitalization of 'name' is canonicalized to the way it appears
+ * in the mailbox list.
+ * If 'path' is non-nil, a pointer to the full pathname of the mailbox
+ * is placed in the char * pointed to by it. If 'acl' is non-nil, a pointer
+ * to the mailbox ACL is placed in the char * pointed to by it.
+ */
+static int mboxlist_mylookup(const char *name, int *typep,
+ char **pathp, char **mpathp,
+ char **partp, char **aclp,
+ struct txn **tid, int wrlock)
+{
+ int acllen;
+ static char partition[MAX_PARTITION_LEN+HOSTNAME_SIZE+2];
+ static char *aclresult;
+ static int aclresultalloced;
+ int r;
+ const char *data;
+ char *p, *q;
+ int datalen;
+ int namelen;
+ int mbtype;
+
+ namelen = strlen(name);
+
+ if (namelen == 0) {
+ return IMAP_MAILBOX_NONEXISTENT;
+ }
+ if (wrlock) {
+ r = DB->fetchlock(mbdb, name, namelen, &data, &datalen, tid);
+ } else {
+ r = DB->fetch(mbdb, name, namelen, &data, &datalen, tid);
+ }
+ switch (r) {
+ case CYRUSDB_OK:
+ /* copy out interesting parts */
+ mbtype = strtol(data, &p, 10);
+ if (typep) *typep = mbtype;
+
+ if (*p == ' ') p++;
+ q = partition;
+ while (*p != ' ') { /* copy out partition name */
+ *q++ = *p++;
+ }
+ *q = '\0';
+ p++;
+
+ if (partp) {
+ *partp = partition;
+ }
+
+ /* construct pathname if requested */
+ if (pathp) {
+ if (mbtype & MBTYPE_REMOTE) {
+ *pathp = partition;
+ if (mpathp) *mpathp = NULL;
+ } else if (mbtype & MBTYPE_MOVING) {
+ char *part = strchr(partition, '!');
+
+ if(!part) return IMAP_SYS_ERROR;
+ else part++; /* skip the !, go to the beginning
+ of the partition name */
+ r = mboxlist_getpath(part, name, pathp, mpathp);
+ if(r) return r;
+ } else {
+ r = mboxlist_getpath(partition, name, pathp, mpathp);
+ if(r) return r;
+ }
+ }
+
+ /* the rest is ACL; return it if requested */
+ if (aclp) {
+ acllen = datalen - (p - data);
+ if (acllen >= aclresultalloced) {
+ aclresultalloced = acllen + 100;
+ aclresult = xrealloc(aclresult, aclresultalloced);
+ }
+ memcpy(aclresult, p, acllen);
+ aclresult[acllen] = '\0';
+
+ *aclp = aclresult;
+ }
+ break;
+
+ case CYRUSDB_AGAIN:
+ return IMAP_AGAIN;
+ break;
+
+ case CYRUSDB_NOTFOUND:
+ return IMAP_MAILBOX_NONEXISTENT;
+ break;
+
+ default:
+ syslog(LOG_ERR, "DBERROR: error fetching %s: %s",
+ name, cyrusdb_strerror(r));
+ return IMAP_IOERROR;
+ break;
+ }
+
+ return 0;
+}
+
+/*
+ * Lookup 'name' in the mailbox list.
+ * The capitalization of 'name' is canonicalized to the way it appears
+ * in the mailbox list.
+ * If 'acl' is non-nil, a pointer to the mailbox ACL is placed in the char
+ * pointed to by it.
+ */
+int mboxlist_lookup(const char *name, char **aclp, struct txn **tid)
+{
+ return mboxlist_mylookup(name, NULL, NULL, NULL, NULL, aclp, tid, 0);
+}
+
+int mboxlist_detail(const char *name, int *typep, char **pathp, char **mpathp,
+ char **partp, char **aclp, struct txn **tid)
+{
+ return mboxlist_mylookup(name, typep, pathp, mpathp, partp, aclp, tid, 0);
+}
+
+int mboxlist_findstage(const char *name, char *stagedir, size_t sd_len)
+{
+ const char *root;
+ char *partition;
+ int r;
+
+ assert(stagedir != NULL);
+
+ /* Find mailbox */
+ r = mboxlist_mylookup(name, NULL, NULL, NULL, &partition, NULL, NULL, 0);
+ switch (r) {
+ case 0:
+ break;
+ default:
+ return r;
+ break;
+ }
+
+ root = config_partitiondir(partition);
+ if (!root) return IMAP_PARTITION_UNKNOWN;
+
+ snprintf(stagedir, sd_len, "%s/stage./", root);
+
+ return 0;
+}
+
+int mboxlist_update(char *name, int flags, const char *part, const char *acl,
+ int localonly)
+{
+ int r = 0, r2 = 0;
+ char *mboxent = NULL;
+ struct txn *tid = NULL;
+
+ mboxent = mboxlist_makeentry(flags, part, acl);
+ r = DB->store(mbdb, name, strlen(name), mboxent, strlen(mboxent), &tid);
+ free(mboxent);
+ mboxent = NULL;
+
+ if(!r && !localonly && config_mupdate_server) {
+ mupdate_handle *mupdate_h = NULL;
+ /* commit the update to MUPDATE */
+ char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, part);
+
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(r) {
+ syslog(LOG_ERR,
+ "can not connect to mupdate server for update of '%s'",
+ name);
+ } else {
+ r = mupdate_activate(mupdate_h, name, buf, acl);
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't update mailbox entry for '%s'",
+ name);
+ }
+ }
+ mupdate_disconnect(&mupdate_h);
+ }
+
+ if(tid) {
+ if(r) {
+ r2 = DB->abort(mbdb, tid);
+ } else {
+ r2 = DB->commit(mbdb, tid);
+ }
+ }
+
+ if(r2) {
+ syslog(LOG_ERR, "DBERROR: error %s txn in mboxlist_update: %s",
+ r ? "aborting" : "commiting", cyrusdb_strerror(r2));
+ }
+
+ return r;
+}
+
+/*
+ * Check/set up for mailbox creation
+ */
+/* xxx shouldn't we be using mbtype or getting rid of it entirely? */
+static int
+mboxlist_mycreatemailboxcheck(char *name,
+ int new_mbtype __attribute__((unused)),
+ char *partition,
+ int isadmin, char *userid,
+ struct auth_state *auth_state,
+ char **newacl, char **newpartition,
+ int RMW, int localonly, int force_user_create,
+ struct txn **tid)
+{
+ int r;
+ char *mbox = name;
+ char *p;
+ char *acl;
+ char *defaultacl, *identifier, *rights;
+ char parent[MAX_MAILBOX_NAME+1];
+ unsigned long parentlen;
+ char *parentname = NULL;
+ char *parentpartition = NULL;
+ char *parentacl = NULL;
+ unsigned long parentpartitionlen = 0;
+ unsigned long parentacllen = 0;
+ int mbtype;
+
+ /* Check for invalid name/partition */
+ if (partition && strlen(partition) > MAX_PARTITION_LEN) {
+ return IMAP_PARTITION_UNKNOWN;
+ }
+ if (config_virtdomains && (p = strchr(name, '!'))) {
+ /* pointer to mailbox w/o domain prefix */
+ mbox = p + 1;
+ }
+ r = mboxname_policycheck(mbox);
+ if (r) return r;
+
+ /* you must be a real admin to create a local-only mailbox */
+ if(!isadmin && localonly) return IMAP_PERMISSION_DENIED;
+ if(!isadmin && force_user_create) return IMAP_PERMISSION_DENIED;
+
+ /* User has admin rights over their own mailbox namespace */
+ if (mboxname_userownsmailbox(userid, name) && strchr(name+5, '.') &&
+ (config_implicitrights & ACL_ADMIN)) {
+ isadmin = 1;
+ }
+
+ /* Check to see if new mailbox exists */
+ r = mboxlist_mylookup(name, &mbtype, NULL, NULL, NULL, &acl, tid, RMW);
+ switch (r) {
+ case 0:
+ if(mbtype & MBTYPE_RESERVE)
+ r = IMAP_MAILBOX_RESERVED;
+ else
+ r = IMAP_MAILBOX_EXISTS;
+
+ /* Lie about error if privacy demands */
+ if (!isadmin &&
+ !(cyrus_acl_myrights(auth_state, acl) & ACL_LOOKUP)) {
+ r = IMAP_PERMISSION_DENIED;
+ }
+
+ return r;
+ break;
+ case IMAP_MAILBOX_NONEXISTENT:
+ break;
+
+ default:
+ return r;
+ break;
+ }
+
+ /* Search for a parent - stop if we hit the domain separator */
+ strlcpy(parent, name, sizeof(parent));
+ parentlen = 0;
+ while ((parentlen==0) && (p = strrchr(parent, '.')) && !strchr(p, '!')) {
+ *p = '\0';
+
+ r = mboxlist_mylookup(parent, NULL, NULL, NULL, &parentpartition,
+ &parentacl, tid, 0);
+ switch (r) {
+ case 0:
+ parentlen = strlen(parent);
+ parentname = parent;
+
+ parentpartitionlen = strlen(parentpartition);
+
+ parentacllen = strlen(parentacl);
+ break;
+
+ case IMAP_MAILBOX_NONEXISTENT:
+ break;
+
+ default:
+ return r;
+ break;
+ }
+ }
+ if (parentlen != 0) {
+ /* check acl */
+ if (!isadmin &&
+ !(cyrus_acl_myrights(auth_state, parentacl) & ACL_CREATE)) {
+ return IMAP_PERMISSION_DENIED;
+ }
+
+ /* Copy partition, if not specified */
+ if (partition == NULL) {
+ partition = xmalloc(parentpartitionlen + 1);
+ memcpy(partition, parentpartition, parentpartitionlen);
+ partition[parentpartitionlen] = '\0';
+ } else {
+ partition = xstrdup(partition);
+ }
+
+ /* Copy ACL */
+ acl = xmalloc(parentacllen + 1);
+ memcpy(acl, parentacl, parentacllen);
+ acl[parentacllen] = '\0';
+
+ /* Canonicalize case of parent prefix */
+ strncpy(name, parent, strlen(parent));
+ } else { /* parentlen == 0, no parent mailbox */
+ if (!isadmin) {
+ return IMAP_PERMISSION_DENIED;
+ }
+
+ acl = xstrdup("");
+ if (!strncmp(mbox, "user.", 5)) {
+ char *firstdot = strchr(mbox+5, '.');
+ if (!force_user_create && firstdot) {
+ /* Disallow creating user.X.* when no user.X */
+ free(acl);
+ return IMAP_PERMISSION_DENIED;
+ }
+
+ /*
+ * Users by default have all access to their personal mailbox(es),
+ * Nobody else starts with any access to same.
+ *
+ * If this is a forced user create, we might have to avoid creating
+ * an acl for the wrong user.
+ */
+ if(firstdot) *firstdot = '\0';
+ identifier = xmalloc(mbox - name + strlen(mbox+5) + 1);
+ strcpy(identifier, mbox+5);
+ if(firstdot) *firstdot = '.';
+
+ if (config_getswitch(IMAPOPT_UNIXHIERARCHYSEP)) {
+ /*
+ * The mailboxname is now in the internal format,
+ * so we we need to change DOTCHARs back to '.'
+ * in the identifier in order to have the correct ACL.
+ */
+ for (p = identifier; *p; p++) {
+ if (*p == DOTCHAR) *p = '.';
+ }
+ }
+ if (mbox != name) {
+ /* add domain to identifier */
+ sprintf(identifier+strlen(identifier),
+ "@%.*s", mbox - name - 1, name);
+ }
+ cyrus_acl_set(&acl, identifier, ACL_MODE_SET, ACL_ALL,
+ (cyrus_acl_canonproc_t *)0, (void *)0);
+ free(identifier);
+ } else {
+ defaultacl = identifier =
+ xstrdup(config_getstring(IMAPOPT_DEFAULTACL));
+ for (;;) {
+ while (*identifier && isspace((int) *identifier)) identifier++;
+ rights = identifier;
+ while (*rights && !isspace((int) *rights)) rights++;
+ if (!*rights) break;
+ *rights++ = '\0';
+ while (*rights && isspace((int) *rights)) rights++;
+ if (!*rights) break;
+ p = rights;
+ while (*p && !isspace((int) *p)) p++;
+ if (*p) *p++ = '\0';
+ cyrus_acl_set(&acl, identifier, ACL_MODE_SET, cyrus_acl_strtomask(rights),
+ (cyrus_acl_canonproc_t *)0, (void *)0);
+ identifier = p;
+ }
+ free(defaultacl);
+ }
+
+ if (!partition) {
+ partition = (char *)config_defpartition;
+ if (strlen(partition) > MAX_PARTITION_LEN) {
+ /* Configuration error */
+ fatal("name of default partition is too long", EC_CONFIG);
+ }
+ }
+ partition = xstrdup(partition);
+ }
+
+ if (newpartition) *newpartition = partition;
+ else free(partition);
+ if (newacl) *newacl = acl;
+ else free(acl);
+
+ return 0;
+}
+
+int
+mboxlist_createmailboxcheck(char *name, int mbtype, char *partition,
+ int isadmin, char *userid,
+ struct auth_state *auth_state,
+ char **newacl, char **newpartition)
+{
+ return mboxlist_mycreatemailboxcheck(name, mbtype, partition, isadmin,
+ userid, auth_state, newacl,
+ newpartition, 0, 0, 0, NULL);
+}
+
+/*
+ * Create a mailbox
+ *
+ * 1. start mailboxes transaction
+ * 2. verify ACL's to best of ability (CRASH: abort)
+ * 3. open mupdate connection if necessary
+ * 4. verify parent ACL's if need to
+ * 5. create mupdate entry and set as reserved (CRASH: mupdate inconsistant)
+ * 6. create on disk (CRASH: mupdate inconsistant, disk inconsistant)
+ * 8. commit local transaction (CRASH: mupdate inconsistant)
+ * 9. set mupdate entry as commited (CRASH: commited)
+ *
+ */
+
+int mboxlist_createmailbox(char *name, int mbtype, char *partition,
+ int isadmin, char *userid,
+ struct auth_state *auth_state,
+ int localonly, int forceuser, int dbonly)
+{
+ int r;
+ char *acl = NULL;
+ char *newpartition = NULL;
+ struct txn *tid = NULL;
+ mupdate_handle *mupdate_h = NULL;
+ char *mboxent = NULL;
+ int newreserved = 0; /* made reserved entry in local mailbox list */
+ int madereserved = 0; /* made reserved entry on mupdate server */
+
+ /* Must be atleast MAX_PARTITION_LEN + 30 for partition, need
+ * MAX_PARTITION_LEN + HOSTNAME_SIZE + 2 for mupdate location */
+ char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+
+ retry:
+ tid = NULL;
+
+ /* 2. verify ACL's to best of ability (CRASH: abort) */
+ r = mboxlist_mycreatemailboxcheck(name, mbtype, partition, isadmin,
+ userid, auth_state,
+ &acl, &newpartition, 1, localonly,
+ forceuser, &tid);
+ switch (r) {
+ case 0:
+ break;
+ case IMAP_AGAIN:
+ goto retry;
+ default:
+ goto done;
+ }
+
+ /* You can't explicitly create a MOVING or RESERVED mailbox */
+ if(mbtype & (MBTYPE_MOVING | MBTYPE_RESERVE)) {
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ goto done;
+ }
+
+ /* 3a. Reserve mailbox in local database */
+ mboxent = mboxlist_makeentry(mbtype | MBTYPE_RESERVE,
+ newpartition, acl);
+ r = DB->store(mbdb, name, strlen(name),
+ mboxent, strlen(mboxent), &tid);
+ free(mboxent);
+ mboxent = NULL;
+
+ /* 3b. Unlock mailbox list (before calling out to mupdate) */
+ if(r) {
+ syslog(LOG_ERR, "Could not reserve mailbox %s during create", name);
+ goto done;
+ } else {
+ DB->commit(mbdb, tid);
+ tid = NULL;
+ newreserved = 1;
+ }
+
+ /* 4. Create mupdate reservation */
+ if (config_mupdate_server && !localonly) {
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(r) {
+ syslog(LOG_ERR,
+ "can not connect to mupdate server for reservation on '%s'",
+ name);
+ goto done;
+ }
+
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, newpartition);
+
+ /* reserve the mailbox in MUPDATE */
+ r = mupdate_reserve(mupdate_h, name, buf);
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't reserve mailbox entry for '%s'", name);
+ goto done;
+ }
+ }
+ madereserved = 1; /* so we can roll back on failure */
+
+ done: /* All checks compete. Time to fish or cut bait. */
+ if (!r && !dbonly && !(mbtype & MBTYPE_REMOTE)) {
+ /* Filesystem Operations */
+ r = mailbox_create(name, newpartition, acl, NULL,
+ ((mbtype & MBTYPE_NETNEWS) ?
+ MAILBOX_FORMAT_NETNEWS :
+ MAILBOX_FORMAT_NORMAL),
+ NULL);
+ }
+
+ if (r) { /* CREATE failed */
+ int r2 = 0;
+
+ if (tid) {
+ r2 = DB->abort(mbdb, tid);
+ tid = NULL;
+ }
+ if (r2) {
+ syslog(LOG_ERR, "DBERROR: can't abort: %s", cyrusdb_strerror(r2));
+ }
+
+ if(newreserved) {
+ /* remove the RESERVED mailbox entry if we failed */
+ r2 = DB->delete(mbdb, name, strlen(name), NULL, 0);
+ if(r2) {
+ syslog(LOG_ERR,
+ "DBERROR: can't remove RESERVE entry for %s (%s)",
+ name, cyrusdb_strerror(r2));
+ }
+ }
+
+ /* delete mupdate entry if we made it */
+ if (madereserved && config_mupdate_server) {
+ r2 = mupdate_delete(mupdate_h, name);
+ if(r2 > 0) {
+ /* Disconnect, reconnect, and retry */
+ syslog(LOG_WARNING,
+ "MUPDATE: lost connection, retrying");
+ mupdate_disconnect(&mupdate_h);
+ r2 = mupdate_connect(config_mupdate_server, NULL,
+ &mupdate_h, NULL);
+ if(!r2) {
+ r2 = mupdate_delete(mupdate_h, name);
+ }
+ }
+ if(r2) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't unreserve mailbox entry '%s'",
+ name);
+ }
+ }
+ } else { /* all is well - activate the mailbox */
+ mboxent = mboxlist_makeentry(mbtype, newpartition, acl);
+
+ switch(r = DB->store(mbdb, name, strlen(name),
+ mboxent, strlen(mboxent), NULL)) {
+ case 0:
+ break;
+ default:
+ /* xxx This leaves a reserved entry around, it is unclear
+ * that a DB->delete would work though */
+ syslog(LOG_ERR, "DBERROR: failed on activation: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ }
+
+ /* 9. set MUPDATE entry as commited (CRASH: commited) */
+ /* xxx maybe we should roll back if this fails? */
+ if (!r && config_mupdate_server && !localonly) {
+ /* commit the mailbox in MUPDATE */
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, newpartition);
+
+ r = mupdate_activate(mupdate_h, name, buf, acl);
+ if(r > 0) {
+ /* Disconnect, reconnect, and retry */
+ syslog(LOG_WARNING,
+ "MUPDATE: lost connection, retrying");
+ mupdate_disconnect(&mupdate_h);
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(!r) {
+ r = mupdate_activate(mupdate_h, name, buf, acl);
+ }
+ }
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't commit mailbox entry for '%s'", name);
+ }
+ }
+
+ if(config_mupdate_server && mupdate_h) mupdate_disconnect(&mupdate_h);
+
+ if (acl) free(acl);
+ if (newpartition) free(newpartition);
+ if (mboxent) free(mboxent);
+
+ return r;
+}
+
+/* insert an entry for the proxy */
+int mboxlist_insertremote(const char *name, int mbtype,
+ const char *host, const char *acl,
+ struct txn **tid)
+{
+ char *mboxent, *p;
+ int r = 0;
+
+ assert(name != NULL && host != NULL);
+
+ if ((p = strchr(host, '!'))) {
+ /* remote mailbox */
+ int len = (p - host);
+ if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_UNIFIED &&
+ len == strlen(config_servername) &&
+ !strncasecmp(host, config_servername, len)) {
+ /* its on our server, make it a local mailbox */
+ mbtype &= ~MBTYPE_REMOTE;
+ host += len + 1;
+ }
+ else {
+ /* make sure its a remote mailbox */
+ mbtype |= MBTYPE_REMOTE;
+ }
+ }
+
+ mboxent = mboxlist_makeentry(mbtype, host, acl);
+
+ /* database put */
+ r = DB->store(mbdb, name, strlen(name), mboxent, strlen(mboxent), tid);
+ switch (r) {
+ case CYRUSDB_OK:
+ break;
+ case CYRUSDB_AGAIN:
+ abort(); /* shouldn't happen ! */
+ break;
+ default:
+ syslog(LOG_ERR, "DBERROR: error updating database %s: %s",
+ name, cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ free(mboxent);
+
+ return r;
+}
+
+/* Special function to delete a remote mailbox.
+ * Only affects mboxlist.
+ * Assumes admin powers. */
+int mboxlist_deleteremote(const char *name, struct txn **in_tid)
+{
+ int r;
+ struct txn **tid;
+ struct txn *lcl_tid = NULL;
+ int mbtype;
+ char *part;
+
+ if(in_tid) {
+ tid = in_tid;
+ } else {
+ tid = &lcl_tid;
+ }
+
+ retry:
+ r = mboxlist_mylookup(name, &mbtype, NULL, NULL, &part, NULL, tid, 1);
+ switch (r) {
+ case 0:
+ break;
+
+ case IMAP_AGAIN:
+ goto retry;
+ break;
+
+ default:
+ goto done;
+ }
+
+ if((mbtype & MBTYPE_REMOTE) && !strchr(part, '!')) {
+ syslog(LOG_ERR,
+ "mboxlist_deleteremote called on non-remote mailbox: %s",
+ name);
+ goto done;
+ }
+
+ retry_del:
+ /* delete entry */
+ r = DB->delete(mbdb, name, strlen(name), tid, 0);
+ switch (r) {
+ case CYRUSDB_OK: /* success */
+ break;
+ case CYRUSDB_AGAIN:
+ goto retry_del;
+ default:
+ syslog(LOG_ERR, "DBERROR: error deleting %s: %s",
+ name, cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+
+ /* commit db operations, but only if we weren't passed a transaction */
+ if (!in_tid) {
+ r = DB->commit(mbdb, *tid);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: failed on commit: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ tid = NULL;
+ }
+
+ done:
+ if(r && !in_tid) {
+ /* Abort the transaction if it is still in progress */
+ DB->abort(mbdb, *tid);
+ }
+
+ return r;
+}
+
+/*
+ * Delete a mailbox.
+ * Deleting the mailbox user.FOO may only be performed by an admin.
+ *
+ * 1. Begin transaction
+ * 2. Verify ACL's
+ * 3. remove from database
+ * 4. remove from disk
+ * 5. commit transaction
+ * 6. Open mupdate connection if necessary
+ * 7. delete from mupdate
+ *
+ */
+int mboxlist_deletemailbox(const char *name, int isadmin, char *userid,
+ struct auth_state *auth_state, int checkacl,
+ int local_only, int force)
+{
+ int r;
+ char *acl;
+ long access;
+ struct mailbox mailbox;
+ int deletequotaroot = 0;
+ char *path, *mpath;
+ struct txn *tid = NULL;
+ int isremote = 0;
+ int mbtype;
+ const char *p;
+ mupdate_handle *mupdate_h = NULL;
+
+ if(!isadmin && force) return IMAP_PERMISSION_DENIED;
+
+ retry:
+ /* Check for request to delete a user:
+ user.<x> with no dots after it */
+ if ((p = mboxname_isusermailbox(name, 1))) {
+ /* Can't DELETE INBOX (your own inbox) */
+ if (userid) {
+ int len = config_virtdomains ? strcspn(userid, "@") : strlen(userid);
+ if ((len == strlen(p)) && !strncmp(p, userid, len)) {
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ goto done;
+ }
+ }
+
+ /* Only admins may delete user */
+ if (!isadmin) { r = IMAP_PERMISSION_DENIED; goto done; }
+ }
+
+ r = mboxlist_mylookup(name, &mbtype, &path, &mpath, NULL, &acl, &tid, 1);
+ switch (r) {
+ case 0:
+ break;
+
+ case IMAP_AGAIN:
+ goto retry;
+ break;
+
+ default:
+ goto done;
+ }
+
+ isremote = mbtype & MBTYPE_REMOTE;
+
+ /* are we reserved? (but for remote mailboxes this is okay, since
+ * we don't touch their data files at all) */
+ if(!isremote && (mbtype & MBTYPE_RESERVE) && !force) {
+ r = IMAP_MAILBOX_RESERVED;
+ goto done;
+ }
+
+ /* check if user has Delete right (we've already excluded non-admins
+ * from deleting a user mailbox) */
+ if(checkacl) {
+ access = cyrus_acl_myrights(auth_state, acl);
+ if(!(access & ACL_DELETEMBOX)) {
+ /* User has admin rights over their own mailbox namespace */
+ if (mboxname_userownsmailbox(userid, name) &&
+ (config_implicitrights & ACL_ADMIN)) {
+ isadmin = 1;
+ }
+
+ /* Lie about error if privacy demands */
+ r = (isadmin || (access & ACL_LOOKUP)) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ goto done;
+ }
+ }
+
+ /* Lock the mailbox if it isn't a remote mailbox */
+ if(!r && !isremote) {
+ r = mailbox_open_locked(name, path, mpath, acl, 0, &mailbox, 0);
+ if(r && !force) goto done;
+ }
+
+ /* delete entry */
+ r = DB->delete(mbdb, name, strlen(name), &tid, 0);
+ switch (r) {
+ case CYRUSDB_OK: /* success */
+ break;
+ case CYRUSDB_AGAIN:
+ goto retry;
+ default:
+ syslog(LOG_ERR, "DBERROR: error deleting %s: %s",
+ name, cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ if(!force) goto done;
+ }
+
+ /* commit local db operations */
+ if (!r || force) {
+ r = DB->commit(mbdb, tid);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: failed on commit: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ tid = NULL;
+ }
+
+ /* remove from mupdate */
+ if ((!r || force)
+ && !isremote && !local_only && config_mupdate_server) {
+ /* delete the mailbox in MUPDATE */
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(r) {
+ syslog(LOG_ERR,
+ "can not connect to mupdate server for delete of '%s'",
+ name);
+ goto done;
+ }
+ r = mupdate_delete(mupdate_h, name);
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't delete mailbox entry '%s'", name);
+ }
+ mupdate_disconnect(&mupdate_h);
+ }
+
+ if ((r && !force) || isremote) goto done;
+
+ if (!r || force) r = mailbox_delete(&mailbox, deletequotaroot);
+
+ /*
+ * See if we have to remove mailbox's quota root
+ */
+ if (!r && mailbox.quota.root != NULL) {
+ /* xxx look for any other mailboxes in this quotaroot */
+ }
+
+ done:
+ if(r && tid && !force) {
+ /* Abort the transaction if it is still in progress */
+ DB->abort(mbdb, tid);
+ } else if(tid && force) {
+ int delerr;
+ DB->commit(mbdb, tid);
+
+ /* Clean up annotations */
+ delerr = annotatemore_delete(name);
+ if(delerr) {
+ syslog(LOG_ERR,
+ "Failed to delete annotations with mailbox '%s': %s",
+ name, error_message(delerr));
+ }
+ }
+
+ return r;
+}
+
+/*
+ * Rename/move a single mailbox (recursive renames are handled at a
+ * higher level)
+ */
+int mboxlist_renamemailbox(char *oldname, char *newname, char *partition,
+ int isadmin, char *userid,
+ struct auth_state *auth_state)
+{
+ int r;
+ long access;
+ int isusermbox = 0; /* Are we renaming someone's inbox */
+ int partitionmove = 0;
+ int mbtype;
+ char *oldpath = NULL, *oldmpath = NULL;
+ int oldopen = 0, newopen = 0, newreserved = 0;
+ struct mailbox oldmailbox;
+ struct mailbox newmailbox;
+ char *oldacl = NULL, *newacl = NULL;
+ const char *root = NULL;
+ struct txn *tid = NULL;
+ char *newpartition = NULL;
+ char *mboxent = NULL;
+ char *p;
+
+ mupdate_handle *mupdate_h = NULL;
+ int madenew = 0;
+
+ retry:
+ /* 1. get path & acl from mboxlist */
+ r = mboxlist_mylookup(oldname, &mbtype, &oldpath, &oldmpath,
+ NULL, &oldacl, &tid, 1);
+ switch (r) {
+ case 0:
+ break;
+ case IMAP_AGAIN:
+ goto retry;
+ default:
+ goto done;
+ }
+
+ if(mbtype & MBTYPE_RESERVE) {
+ r = IMAP_MAILBOX_RESERVED;
+ goto done;
+ }
+
+ /* make a copy of the old ACL so it doesn't get overwritten
+ by another call to mboxlist_mylookup() */
+ newacl = xstrdup(oldacl);
+
+ /* 2. verify acls */
+ if (!strcmp(oldname, newname) && !(mbtype & MBTYPE_REMOTE)) {
+ /* Attempt to move mailbox across partition */
+ if (!isadmin) {
+ r = IMAP_PERMISSION_DENIED;
+ goto done;
+ } else if (!partition) {
+ r = IMAP_PARTITION_UNKNOWN;
+ goto done;
+ }
+
+ partitionmove = 1;
+ root = config_partitiondir(partition);
+ if (!root) {
+ r = IMAP_PARTITION_UNKNOWN;
+ goto done;
+ }
+ if (!strncmp(root, oldpath, strlen(root)) &&
+ oldpath[strlen(root)] == '/') {
+ /* partitions are the same or share common prefix */
+ r = IMAP_MAILBOX_EXISTS;
+ goto done;
+ }
+ } else if ((p = mboxname_isusermailbox(oldname, 1))) {
+ if (!strncmp(p, userid, config_virtdomains ? strcspn(userid, "@") :
+ strlen(userid))) {
+ /* Special case of renaming inbox */
+ access = cyrus_acl_myrights(auth_state, oldacl);
+ if (!(access & ACL_DELETEMBOX)) {
+ r = IMAP_PERMISSION_DENIED;
+ goto done;
+ }
+ isusermbox = 1;
+ } else if (config_getswitch(IMAPOPT_ALLOWUSERMOVES) &&
+ mboxname_isusermailbox(newname, 1)) {
+ /* Special case of renaming a user */
+ access = cyrus_acl_myrights(auth_state, oldacl);
+ if (!(access & ACL_DELETEMBOX) && !isadmin) {
+ r = (isadmin || (access & ACL_LOOKUP)) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ goto done;
+ }
+ } else {
+ /* Only admins can rename users (INBOX to INBOX) */
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ goto done;
+ }
+ } else {
+ access = cyrus_acl_myrights(auth_state, oldacl);
+ if (!(access & ACL_DELETEMBOX) && !isadmin) {
+ r = (isadmin || (access & ACL_LOOKUP)) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ goto done;
+ }
+ }
+
+ /* We don't support renaming mailboxes in transit */
+ if(!r && (mbtype & MBTYPE_MOVING)) {
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ goto done;
+ }
+
+ /* Check ability to create new mailbox */
+ if (!partitionmove) {
+ if (mboxname_isusermailbox(newname, 1)) {
+ if (config_getswitch(IMAPOPT_ALLOWUSERMOVES) &&
+ mboxname_isusermailbox(oldname, 1)) {
+ if (!isadmin) {
+ /* Only admins can rename users (INBOX to INBOX) */
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ goto done;
+ }
+ } else {
+ /* Even admins can't rename to user's inboxes */
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ goto done;
+ }
+ }
+ r = mboxlist_mycreatemailboxcheck(newname, 0, partition, isadmin,
+ userid, auth_state, NULL,
+ &newpartition, 1, 0, 0, &tid);
+ switch (r) {
+ case 0:
+ break;
+ case IMAP_AGAIN:
+ goto retry;
+ break;
+ default: /* not allowed to create the new mailbox */
+ goto done;
+ break;
+ }
+ } else {
+ newpartition = xstrdup(partition);
+ }
+
+ /* 3a. mark as reserved in the local DB */
+ if(!r && !partitionmove) {
+ mboxent = mboxlist_makeentry(mbtype | MBTYPE_RESERVE,
+ newpartition, newacl);
+
+ r = DB->store(mbdb, newname, strlen(newname),
+ mboxent, strlen(mboxent), &tid);
+
+ free(mboxent);
+ mboxent = NULL;
+ }
+
+ /* 3b. unlock mboxlist (before calling out to mupdate) */
+ if(r) {
+ syslog(LOG_ERR, "Could not reserve mailbox %s during rename", oldname);
+ goto done;
+ } else {
+ DB->commit(mbdb, tid);
+ tid = NULL;
+ if(!partitionmove) newreserved = 1;
+ }
+
+ /* 4. Open mupdate connection and reserve new name (if needed) */
+ if(!r && config_mupdate_server) {
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(r) {
+ syslog(LOG_ERR,
+ "can not connect to mupdate server for rename of '%s'",
+ newname);
+ goto done;
+ }
+ if (!partitionmove) {
+ /* Reserve new name in MUPDATE */
+ char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+ snprintf(buf, sizeof(buf), "%s!%s",
+ config_servername, newpartition);
+
+ r = mupdate_reserve(mupdate_h, newname, buf);
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't reserve mailbox entry for '%s'",
+ newname);
+ goto done;
+ }
+
+ madenew = 1;
+ }
+ }
+
+ /* 5. Lock oldname/oldpath */
+
+ if(!r) {
+ r = mailbox_open_locked(oldname, oldpath, oldmpath, oldacl, auth_state,
+ &oldmailbox, 0);
+ oldopen = 1;
+ }
+
+ /* 6. Copy mailbox */
+ if (!r && !(mbtype & MBTYPE_REMOTE)) {
+ /* Rename the actual mailbox */
+ r = mailbox_rename_copy(&oldmailbox, newname, newpartition,
+ NULL, NULL, &newmailbox);
+ if (r) {
+ goto done;
+ } else {
+ newopen = 1;
+ }
+ }
+
+ if (!isusermbox) {
+ /* 4. Delete entry from berkeley db */
+ r = DB->delete(mbdb, oldname, strlen(oldname), &tid, 0);
+ switch (r) {
+ case 0: /* success */
+ break;
+ case CYRUSDB_AGAIN:
+ goto retry;
+ break;
+ default:
+ syslog(LOG_ERR, "DBERROR: error deleting %s: %s",
+ oldname, cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ mailbox_close(&newmailbox);
+ goto done;
+ break;
+ }
+ }
+
+ /* 7a. create new entry */
+ mboxent = mboxlist_makeentry(mbtype, newpartition, newacl);
+
+ /* 7b. put it into the db */
+ r = DB->store(mbdb, newname, strlen(newname),
+ mboxent, strlen(mboxent), &tid);
+ switch (r) {
+ case 0:
+ break;
+ case CYRUSDB_AGAIN:
+ goto retry;
+ default:
+ syslog(LOG_ERR, "DBERROR: error renaming %s: %s",
+ newname, cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ goto done;
+ }
+
+ done: /* Commit or cleanup */
+ if (r != 0) {
+ int r2 = 0;
+
+ if (tid) {
+ r2 = DB->abort(mbdb, tid);
+ tid = NULL;
+ }
+ if (r2) {
+ syslog(LOG_ERR, "DBERROR: can't abort: %s", cyrusdb_strerror(r2));
+ }
+
+ if(newreserved) {
+ /* remove the RESERVED mailbox entry if we failed */
+ r2 = DB->delete(mbdb, newname, strlen(newname), NULL, 0);
+ if(r2) {
+ syslog(LOG_ERR,
+ "DBERROR: can't remove RESERVE entry for %s (%s)",
+ newname, cyrusdb_strerror(r2));
+ }
+ }
+
+ /* unroll mupdate operations if necessary */
+ if (madenew && config_mupdate_server) {
+ r2 = mupdate_delete(mupdate_h, newname);
+ if(r2 > 0) {
+ /* Disconnect, reconnect, and retry */
+ syslog(LOG_WARNING,
+ "MUPDATE: lost connection, retrying");
+ mupdate_disconnect(&mupdate_h);
+ r2 = mupdate_connect(config_mupdate_server, NULL,
+ &mupdate_h, NULL);
+ if(!r2) {
+ r2 = mupdate_delete(mupdate_h, newname);
+ }
+ }
+ if(r2) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't unreserve mailbox entry '%s'",
+ newname);
+ }
+ }
+ } else {
+ /* commit now */
+ switch (r = DB->commit(mbdb, tid)) {
+ case 0:
+ break;
+
+ default:
+ syslog(LOG_ERR, "DBERROR: failed on commit: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ break;
+ }
+ }
+
+ if (!r && config_mupdate_server) {
+ /* commit the mailbox in MUPDATE */
+ /* This is okay even if we are moving partitions */
+ char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+
+ snprintf(buf, sizeof(buf), "%s!%s",
+ config_servername, newpartition);
+
+ r = mupdate_activate(mupdate_h, newname, buf, newacl);
+ if(r > 0) {
+ /* Disconnect, reconnect, and retry */
+ syslog(LOG_WARNING,
+ "MUPDATE: lost connection, retrying");
+ mupdate_disconnect(&mupdate_h);
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(!r) {
+ r = mupdate_activate(mupdate_h, newname, buf, newacl);
+ }
+ }
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't commit mailbox entry for '%s'",
+ newname);
+ }
+ }
+
+ if (!r && !partitionmove && !isusermbox && config_mupdate_server) {
+ /* delete the old mailbox in MUPDATE..but only if not renaming
+ * your inbox */
+ r = mupdate_delete(mupdate_h, oldname);
+ if(r > 0) {
+ /* Disconnect, reconnect, and retry */
+ syslog(LOG_WARNING,
+ "MUPDATE: lost connection, retrying");
+ mupdate_disconnect(&mupdate_h);
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(!r) {
+ r = mupdate_delete(mupdate_h, oldname);
+ }
+ }
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't delete mailbox entry '%s'", oldname);
+ }
+ }
+
+ if(newopen) mailbox_close(&newmailbox);
+ if(config_mupdate_server) mupdate_disconnect(&mupdate_h);
+
+ if(oldopen) {
+ if(!r)
+ mailbox_rename_cleanup(&oldmailbox,isusermbox);
+
+ mailbox_close(&oldmailbox);
+ }
+
+ /* free memory */
+ if (newacl) free(newacl); /* we're done with the new ACL */
+ if (newpartition) free(newpartition);
+ if (mboxent) free(mboxent);
+
+ return r;
+}
+
+/*
+ * Change the ACL for mailbox 'name' so that 'identifier' has the
+ * rights enumerated in the string 'rights'. If 'rights' is the null
+ * pointer, removes the ACL entry for 'identifier'. 'isadmin' is
+ * nonzero if user is a mailbox admin. 'userid' is the user's login id.
+ *
+ * 1. Start transaction
+ * 2. Check rights
+ * 3. Set db entry
+ * 4. Change backup copy (cyrus.header)
+ * 5. Commit transaction
+ * 6. Change mupdate entry
+ *
+ */
+int mboxlist_setacl(const char *name, const char *identifier,
+ const char *rights,
+ int isadmin, const char *userid,
+ struct auth_state *auth_state)
+{
+ int useridlen = strlen(userid), domainlen = 0;
+ char *cp, ident[256];
+ const char *domain = NULL;
+ int r;
+ int access;
+ int mode = ACL_MODE_SET;
+ int isusermbox = 0;
+ struct mailbox mailbox;
+ int mailbox_open = 0;
+ char *acl, *newacl = NULL;
+ char *partition, *path, *mpath;
+ char *mboxent = NULL;
+ int mbtype;
+ struct txn *tid = NULL;
+
+ if (config_virtdomains) {
+ if ((cp = strchr(userid, '@'))) {
+ useridlen = cp - userid;
+ }
+ if ((cp = strchr(name, '!'))) {
+ domain = name;
+ domainlen = cp - name + 1;
+ }
+
+ /* canonify identifier so it is fully qualified,
+ except for "anonymous", "anyone", the global admin
+ and users in the default domain */
+ if ((cp = strchr(identifier, '@'))) {
+ if (rights &&
+ ((domain && strncasecmp(cp+1, domain, strlen(cp+1))) ||
+ (!domain && (!config_defdomain ||
+ strcasecmp(config_defdomain, cp+1))))) {
+ /* can't set cross-domain ACLs */
+ return IMAP_INVALID_IDENTIFIER;
+ }
+ if ((config_defdomain && !strcasecmp(config_defdomain, cp+1)) ||
+ !strcmp(identifier, "anonymous") ||
+ !strcmp(identifier, "anyone")) {
+ snprintf(ident, sizeof(ident),
+ "%.*s", cp - identifier, identifier);
+ } else {
+ strlcpy(ident, identifier, sizeof(ident));
+ }
+ } else {
+ strlcpy(ident, identifier, sizeof(ident));
+ if (domain && !isadmin &&
+ strcmp(ident, "anonymous") && strcmp(ident, "anyone")) {
+ snprintf(ident+strlen(ident), sizeof(ident)-strlen(ident),
+ "@%.*s",
+ domainlen ? domainlen-1 : (int) strlen(domain), domain);
+ }
+ }
+
+ identifier = ident;
+ }
+
+ if (!strncmp(name+domainlen, "user.", 5) &&
+ (!(cp = strchr(userid, '.')) || (cp - userid) > useridlen) &&
+ !strncmp(name+domainlen+5, userid, useridlen) &&
+ (name[domainlen+5+useridlen] == '\0' ||
+ name[domainlen+5+useridlen] == '.')) {
+ isusermbox = 1;
+ }
+
+ /* 1. Start Transaction */
+ /* lookup the mailbox to make sure it exists and get its acl */
+ do {
+ r = mboxlist_mylookup(name, &mbtype, &path, &mpath,
+ &partition, &acl, &tid, 1);
+ } while(r == IMAP_AGAIN);
+
+ /* Can't do this to an in-transit or reserved mailbox */
+ if(!r && mbtype & (MBTYPE_MOVING | MBTYPE_RESERVE)) {
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ }
+
+ /* if it is not a remote mailbox, we need to unlock the mailbox list,
+ * lock the mailbox, and re-lock the mailboxes list */
+ /* we must do this to obey our locking rules */
+ if (!r && !(mbtype & MBTYPE_REMOTE)) {
+ DB->abort(mbdb, tid);
+ tid = NULL;
+
+ /* open & lock mailbox header */
+ r = mailbox_open_header_path(name, path, mpath,
+ acl, NULL, &mailbox, 0);
+ if (!r) {
+ mailbox_open = 1;
+ r = mailbox_lock_header(&mailbox);
+ }
+
+ if(!r) {
+ do {
+ /* lookup the mailbox to make sure it exists and get its acl */
+ r = mboxlist_mylookup(name, &mbtype, &path, NULL,
+ &partition, &acl, &tid, 1);
+ } while( r == IMAP_AGAIN );
+ }
+
+ if(r) goto done;
+ }
+
+ /* 2. Check Rights */
+ if (!r && !isadmin) {
+ access = cyrus_acl_myrights(auth_state, acl);
+ if (!(access & ACL_ADMIN)) {
+ r = (access & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ goto done;
+ }
+ }
+
+ /* 3. Set DB Entry */
+ if(!r) {
+ /* Make change to ACL */
+ newacl = xstrdup(acl);
+ if (rights) {
+ mode = ACL_MODE_SET;
+ if (*rights == '+') {
+ rights++;
+ mode = ACL_MODE_ADD;
+ }
+ else if (*rights == '-') {
+ rights++;
+ mode = ACL_MODE_REMOVE;
+ }
+
+ if (cyrus_acl_set(&newacl, identifier, mode,
+ cyrus_acl_strtomask(rights),
+ isusermbox ? mboxlist_ensureOwnerRights : 0,
+ (void *)userid)) {
+ r = IMAP_INVALID_IDENTIFIER;
+ }
+ } else {
+ if (cyrus_acl_remove(&newacl, identifier,
+ isusermbox ? mboxlist_ensureOwnerRights : 0,
+ (void *)userid)) {
+ r = IMAP_INVALID_IDENTIFIER;
+ }
+ }
+ }
+
+ if(!r) {
+ /* ok, change the database */
+ mboxent = mboxlist_makeentry(mbtype, partition, newacl);
+
+ do {
+ r = DB->store(mbdb, name, strlen(name),
+ mboxent, strlen(mboxent), &tid);
+ } while(r == CYRUSDB_AGAIN);
+
+ if(r) {
+ syslog(LOG_ERR, "DBERROR: error updating acl %s: %s",
+ name, cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ }
+
+ /* 4. Change backup copy (cyrus.header) */
+ /* we already have it locked from above */
+ if (!r && !(mbtype & MBTYPE_REMOTE)) {
+ if(mailbox.acl) free(mailbox.acl);
+ mailbox.acl = xstrdup(newacl);
+ r = mailbox_write_header(&mailbox);
+ }
+
+ /* 5. Commit transaction */
+ if (!r) {
+ if((r = DB->commit(mbdb, tid)) != 0) {
+ syslog(LOG_ERR, "DBERROR: failed on commit: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ tid = NULL;
+ }
+
+ /* 6. Change mupdate entry */
+ if (!r && config_mupdate_server) {
+ mupdate_handle *mupdate_h = NULL;
+ /* commit the update to MUPDATE */
+ char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+
+ snprintf(buf, sizeof(buf), "%s!%s", config_servername, partition);
+
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(r) {
+ syslog(LOG_ERR,
+ "can not connect to mupdate server for reservation on '%s'",
+ name);
+ } else {
+ r = mupdate_activate(mupdate_h, name, buf, newacl);
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't update mailbox entry for '%s'",
+ name);
+ }
+ }
+ mupdate_disconnect(&mupdate_h);
+ }
+
+ done:
+ if (r && tid) {
+ /* if we are mid-transaction, abort it! */
+ int r2 = DB->abort(mbdb, tid);
+ if(r2) {
+ syslog(LOG_ERR,
+ "DBERROR: error aborting txn in mboxlist_setacl: %s",
+ cyrusdb_strerror(r2));
+ }
+ }
+ if (mailbox_open) mailbox_close(&mailbox);
+ if (mboxent) free(mboxent);
+ if (newacl) free(newacl);
+
+ return r;
+}
+
+/*
+ * Change the ACL for mailbox 'name'.
+ *
+ * 1. Start transaction
+ * 3. Set db entry
+ * 4. Change backup copy (cyrus.header)
+ * 5. Commit transaction
+ * 6. Change mupdate entry
+ *
+ */
+int
+mboxlist_sync_setacls(char *name, char *newacl)
+{
+ int r;
+ struct mailbox mailbox;
+ int mailbox_open = 0;
+ char *acl;
+ char *partition, *path, *mpath;
+ char *mboxent = NULL;
+ int mbtype;
+ struct txn *tid = NULL;
+
+ /* 1. Start Transaction */
+ /* lookup the mailbox to make sure it exists and get its acl */
+ do {
+ r = mboxlist_mylookup(name, &mbtype, &path, &mpath,
+ &partition, &acl, &tid, 1);
+ } while(r == IMAP_AGAIN);
+
+ /* Can't do this to an in-transit or reserved mailbox */
+ if(!r && mbtype & (MBTYPE_MOVING | MBTYPE_RESERVE)) {
+ r = IMAP_MAILBOX_NOTSUPPORTED;
+ }
+
+ /* if it is not a remote mailbox, we need to unlock the mailbox list,
+ * lock the mailbox, and re-lock the mailboxes list */
+ /* we must do this to obey our locking rules */
+ if (!r && !(mbtype & MBTYPE_REMOTE)) {
+ DB->abort(mbdb, tid);
+ tid = NULL;
+
+ /* open & lock mailbox header */
+ r = mailbox_open_header_path(name, path, mpath,
+ acl, NULL, &mailbox, 0);
+ if (!r) {
+ mailbox_open = 1;
+ r = mailbox_lock_header(&mailbox);
+ }
+
+ if(!r) {
+ do {
+ /* lookup the mailbox to make sure it exists and get its acl */
+ r = mboxlist_mylookup(name, &mbtype, &path, &mpath,
+ &partition, &acl, &tid, 1);
+ } while( r == IMAP_AGAIN );
+ }
+
+ if(r) goto done;
+ }
+
+ /* 3. Set DB Entry */
+ if(!r) {
+ /* ok, change the database */
+ mboxent = mboxlist_makeentry(mbtype, partition, newacl);
+
+ do {
+ r = DB->store(mbdb, name, strlen(name),
+ mboxent, strlen(mboxent), &tid);
+ } while(r == CYRUSDB_AGAIN);
+
+ if(r) {
+ syslog(LOG_ERR, "DBERROR: error updating acl %s: %s",
+ name, cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ }
+
+ /* 4. Change backup copy (cyrus.header) */
+ /* we already have it locked from above */
+ if (!r && !(mbtype & MBTYPE_REMOTE)) {
+ if(mailbox.acl) free(mailbox.acl);
+ mailbox.acl = xstrdup(newacl);
+ r = mailbox_write_header(&mailbox);
+ }
+
+ /* 5. Commit transaction */
+ if (!r) {
+ if((r = DB->commit(mbdb, tid)) != 0) {
+ syslog(LOG_ERR, "DBERROR: failed on commit: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ tid = NULL;
+ }
+
+ /* 6. Change mupdate entry */
+ if (!r && config_mupdate_server) {
+ mupdate_handle *mupdate_h = NULL;
+ /* commit the update to MUPDATE */
+ char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+ sprintf(buf, "%s!%s", config_servername, partition);
+
+ r = mupdate_connect(config_mupdate_server, NULL, &mupdate_h, NULL);
+ if(r) {
+ syslog(LOG_ERR,
+ "can not connect to mupdate server for reservation on '%s'",
+ name);
+ } else {
+ r = mupdate_activate(mupdate_h, name, buf, newacl);
+ if(r) {
+ syslog(LOG_ERR,
+ "MUPDATE: can't update mailbox entry for '%s'",
+ name);
+ }
+ }
+ mupdate_disconnect(&mupdate_h);
+ }
+
+ done:
+ if (r && tid) {
+ /* if we are mid-transaction, abort it! */
+ int r2 = DB->abort(mbdb, tid);
+ if(r2) {
+ syslog(LOG_ERR,
+ "DBERROR: error aborting txn in mboxlist_setacl: %s",
+ cyrusdb_strerror(r2));
+ }
+ }
+ if (mailbox_open) mailbox_close(&mailbox);
+ if (mboxent) free(mboxent);
+
+ return r;
+}
+
+struct find_rock {
+ struct glob *g;
+ struct namespace *namespace;
+ int find_namespace;
+ int domainlen;
+ int inboxoffset;
+ const char *inboxcase;
+ const char *usermboxname;
+ int usermboxnamelen;
+ int checkmboxlist;
+ int checkshared;
+ int isadmin;
+ struct auth_state *auth_state;
+ int (*proc)(char *, int, int, void *rock);
+ void *procrock;
+};
+
+/* return non-zero if we like this one */
+static int find_p(void *rockp,
+ const char *key, int keylen,
+ const char *data, int datalen)
+{
+ struct find_rock *rock = (struct find_rock *) rockp;
+ long minmatch;
+ struct glob *g = rock->g;
+ long matchlen;
+
+ /* don't list mailboxes outside of the default domain */
+ if (!rock->domainlen && !rock->isadmin && strchr(key, '!')) return 0;
+
+ minmatch = 0;
+ if (rock->inboxoffset) {
+ char namebuf[MAX_MAILBOX_NAME+1];
+
+ if(keylen >= sizeof(namebuf)) {
+ syslog(LOG_ERR, "oversize keylen in mboxlist.c:find_p()");
+ return 0;
+ }
+ memcpy(namebuf, key, keylen);
+ namebuf[keylen] = '\0';
+
+ if (rock->inboxoffset) {
+ namebuf[rock->inboxoffset] = rock->inboxcase[0];
+ namebuf[rock->inboxoffset+1] = rock->inboxcase[1];
+ namebuf[rock->inboxoffset+2] = rock->inboxcase[2];
+ namebuf[rock->inboxoffset+3] = rock->inboxcase[3];
+ namebuf[rock->inboxoffset+4] = rock->inboxcase[4];
+ }
+
+ matchlen = glob_test(g, namebuf+rock->inboxoffset,
+ keylen-rock->inboxoffset, &minmatch);
+ } else {
+ matchlen = glob_test(g, key, keylen, &minmatch);
+ }
+
+ /* If its not a match, skip it -- partial matches are ok. */
+ if(matchlen == -1) return 0;
+
+ if (rock->find_namespace != NAMESPACE_INBOX &&
+ rock->usermboxname &&
+ keylen >= rock->usermboxnamelen &&
+ (keylen == rock->usermboxnamelen ||
+ key[rock->usermboxnamelen] == '.') &&
+ !strncmp(key, rock->usermboxname, rock->usermboxnamelen)) {
+ /* this would've been output with the inbox stuff, so skip it */
+ return 0;
+ }
+
+ if (rock->find_namespace == NAMESPACE_SHARED &&
+ rock->namespace && rock->namespace->isalt &&
+ !strncmp(key+rock->domainlen, "user", 4) &&
+ (key[rock->domainlen+4] == '\0' || key[rock->domainlen+4] == '.')) {
+ /* this would've been output with the user stuff, so skip it */
+ return 0;
+ }
+
+ /* check acl */
+ if (!rock->isadmin) {
+ /* check the acls */
+ const char *p, *acl;
+ int rights;
+ int acllen;
+ static char *aclbuf = NULL;
+ static int aclbufsz = 0;
+
+ p = strchr(data, ' ');
+ if (!p) {
+ syslog(LOG_ERR, "%s: can't find partition", key);
+ return 0;
+ }
+ p++;
+ acl = strchr(p, ' ');
+ if (!acl) {
+ syslog(LOG_ERR, "%s: can't find acl", key);
+ return 0;
+ }
+ acl++;
+ acllen = datalen - (acl - data);
+ if (acllen >= aclbufsz) {
+ aclbufsz = acllen + 500;
+ aclbuf = xrealloc(aclbuf, aclbufsz);
+ }
+ memcpy(aclbuf, acl, acllen);
+ aclbuf[acllen] = '\0';
+
+ rights = cyrus_acl_myrights(rock->auth_state, aclbuf);
+ if (!(rights & ACL_LOOKUP)) {
+ return 0;
+ }
+ }
+
+ /* if we get here, close enough for us to spend the time
+ acting interested */
+ return 1;
+}
+
+static int find_cb(void *rockp,
+ const char *key, int keylen,
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ char namebuf[MAX_MAILBOX_NAME+1];
+ struct find_rock *rock = (struct find_rock *) rockp;
+ int r = 0;
+ long minmatch;
+ struct glob *g = rock->g;
+
+ /* foreach match, do this test */
+ minmatch = 0;
+ while (minmatch >= 0) {
+ long matchlen;
+
+ if(keylen >= sizeof(namebuf)) {
+ syslog(LOG_ERR, "oversize keylen in mboxlist.c:find_cb()");
+ return 0;
+ }
+ memcpy(namebuf, key, keylen);
+ namebuf[keylen] = '\0';
+
+ if (rock->find_namespace != NAMESPACE_INBOX &&
+ rock->usermboxname &&
+ !strncmp(namebuf, rock->usermboxname, rock->usermboxnamelen)
+ && (keylen == rock->usermboxnamelen ||
+ namebuf[rock->usermboxnamelen] == '.')) {
+ /* this would've been output with the inbox stuff, so skip it */
+ return 0;
+ }
+
+ /* make sure it's in the mailboxes db */
+ if (rock->checkmboxlist) {
+ r = mboxlist_lookup(namebuf, NULL, NULL);
+ } else {
+ r = 0; /* don't bother checking */
+ }
+
+ if (!r && rock->inboxoffset) {
+ namebuf[rock->inboxoffset] = rock->inboxcase[0];
+ namebuf[rock->inboxoffset+1] = rock->inboxcase[1];
+ namebuf[rock->inboxoffset+2] = rock->inboxcase[2];
+ namebuf[rock->inboxoffset+3] = rock->inboxcase[3];
+ namebuf[rock->inboxoffset+4] = rock->inboxcase[4];
+ }
+
+ matchlen = glob_test(g, namebuf+rock->inboxoffset,
+ keylen-rock->inboxoffset, &minmatch);
+
+ if (matchlen == -1) {
+ r = 0;
+ break;
+ }
+
+ switch (r) {
+ case 0:
+ /* found the entry; output it */
+ if (rock->find_namespace == NAMESPACE_SHARED &&
+ rock->checkshared && rock->namespace) {
+ /* special case: LIST "" *% -- output prefix */
+ r = (*rock->proc)(rock->namespace->prefix[NAMESPACE_SHARED],
+ strlen(rock->namespace->prefix[NAMESPACE_SHARED])-1,
+ 1, rock->procrock);
+
+ if (rock->checkshared > 1) {
+ /* special case: LIST "" % -- output prefix only */
+ /* short-circuit the foreach - one mailbox is sufficient */
+ return CYRUSDB_DONE;
+ }
+ }
+
+ rock->checkshared = 0;
+ r = (*rock->proc)(namebuf+rock->inboxoffset, matchlen,
+ 1, rock->procrock);
+
+ break;
+
+ case IMAP_MAILBOX_NONEXISTENT:
+ /* didn't find the entry */
+ r = 0;
+ break;
+
+ default:
+ break;
+ }
+
+ if (r) break;
+ }
+
+ return r;
+}
+
+/*
+ * Find all mailboxes that match 'pattern'.
+ * 'isadmin' is nonzero if user is a mailbox admin. 'userid'
+ * is the user's login id. For each matching mailbox, calls
+ * 'proc' with the name of the mailbox. If 'proc' ever returns
+ * a nonzero value, mboxlist_findall immediately stops searching
+ * and returns that value. 'rock' is passed along as an argument to proc in
+ * case it wants some persistant storage or extra data.
+ */
+/* Find all mailboxes that match 'pattern'. */
+int mboxlist_findall(struct namespace *namespace __attribute__((unused)),
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(), void *rock)
+{
+ struct find_rock cbrock;
+ char usermboxname[MAX_MAILBOX_NAME+1];
+ int usermboxnamelen = 0;
+ const char *data;
+ int datalen;
+ int r = 0;
+ char *p;
+ int prefixlen;
+ int userlen = userid ? strlen(userid) : 0, domainlen = 0;
+ char domainpat[MAX_MAILBOX_NAME+1] = ""; /* do intra-domain fetches only */
+ char *pat = NULL;
+
+ if (config_virtdomains) {
+ char *domain;
+
+ if (userid && (domain = strrchr(userid, '@'))) {
+ userlen = domain - userid;
+ domainlen = strlen(domain); /* includes separator */
+
+ if ((p = strchr(pattern , '!'))) {
+ if ((p-pattern != domainlen-1) ||
+ strncmp(pattern, domain+1, domainlen-1)) {
+ /* don't allow cross-domain access */
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ pattern = p+1;
+ }
+
+ snprintf(domainpat, sizeof(domainpat), "%s!%s", domain+1, pattern);
+ }
+ if ((p = strrchr(pattern, '@'))) {
+ /* global admin specified mbox at domain */
+ if (domainlen) {
+ /* can't do both user at domain and mbox at domain */
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ /* don't prepend default domain */
+ if (!(config_defdomain && !strcasecmp(config_defdomain, p+1))) {
+ snprintf(domainpat, sizeof(domainpat), "%s!", p+1);
+ domainlen = strlen(p);
+ }
+ snprintf(domainpat+domainlen, sizeof(domainpat)-domainlen,
+ "%.*s", p - pattern, pattern);
+ }
+ }
+
+ if (domainpat[0] == '\0')
+ strlcpy(domainpat, pattern, sizeof(domainpat));
+
+ cbrock.g = glob_init(pattern, GLOB_HIERARCHY|GLOB_INBOXCASE);
+ cbrock.namespace = NULL;
+ cbrock.domainlen = domainlen;
+ cbrock.inboxcase = glob_inboxcase(cbrock.g);
+ cbrock.isadmin = isadmin;
+ cbrock.auth_state = auth_state;
+ cbrock.checkmboxlist = 0; /* don't duplicate work */
+ cbrock.checkshared = 0;
+ cbrock.proc = proc;
+ cbrock.procrock = rock;
+
+ /* Build usermboxname */
+ if (userid && (!(p = strchr(userid, '.')) || ((p - userid) > userlen)) &&
+ strlen(userid)+5 < MAX_MAILBOX_NAME) {
+ if (domainlen)
+ snprintf(usermboxname, sizeof(usermboxname),
+ "%s!", userid+userlen+1);
+ snprintf(usermboxname+domainlen, sizeof(usermboxname)-domainlen,
+ "user.%.*s", userlen, userid);
+ usermboxnamelen = strlen(usermboxname);
+ }
+ else {
+ userid = NULL;
+ }
+
+ /* Check for INBOX first of all */
+ if (userid) {
+ if (GLOB_TEST(cbrock.g, "INBOX") != -1) {
+ r = DB->fetch(mbdb, usermboxname, usermboxnamelen,
+ &data, &datalen, NULL);
+ if (!r && data) {
+ r = (*proc)(cbrock.inboxcase, 5, 1, rock);
+ }
+ else if (r == CYRUSDB_NOTFOUND) r = 0;
+ }
+ else if (!strncmp(pattern,
+ usermboxname+domainlen, usermboxnamelen-domainlen) &&
+ GLOB_TEST(cbrock.g, usermboxname+domainlen) != -1) {
+ r = DB->fetch(mbdb, usermboxname, usermboxnamelen,
+ &data, &datalen, NULL);
+ if (!r && data) {
+ r = (*proc)(usermboxname, usermboxnamelen, 1, rock);
+ }
+ else if (r == CYRUSDB_NOTFOUND) r = 0;
+ }
+ strlcat(usermboxname, ".", sizeof(usermboxname));
+ usermboxnamelen++;
+
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ } else {
+ cbrock.usermboxname = NULL;
+ cbrock.usermboxnamelen = 0;
+ }
+
+ if (r) goto done;
+
+ /* Make a working copy of pattern */
+ pattern = pat = xstrdup(pattern);
+
+ /* Find fixed-string pattern prefix */
+ for (p = pat; *p; p++) {
+ if (*p == '*' || *p == '%' || *p == '?' || *p == '@') break;
+ }
+ prefixlen = p - pattern;
+ *p = '\0';
+
+ /*
+ * If user.X.* or INBOX.* can match pattern,
+ * search for those mailboxes next
+ */
+ if (userid &&
+ (!strncmp(usermboxname+domainlen, pattern, usermboxnamelen-domainlen-1) ||
+ !strncasecmp("inbox.", pattern, prefixlen < 6 ? prefixlen : 6))) {
+
+ if (!strncmp(usermboxname+domainlen, pattern, usermboxnamelen-domainlen-1)) {
+ /* switch to pattern with domain prepended */
+ glob_free(&cbrock.g);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ cbrock.inboxoffset = 0;
+ }
+ else {
+ cbrock.inboxoffset = domainlen + userlen;
+ }
+
+ cbrock.find_namespace = NAMESPACE_INBOX;
+ /* iterate through prefixes matching usermboxname */
+ r = DB->foreach(mbdb,
+ usermboxname, usermboxnamelen,
+ &find_p, &find_cb, &cbrock,
+ NULL);
+ }
+
+ if(!r) {
+ cbrock.find_namespace = NAMESPACE_USER;
+ /* switch to pattern with domain prepended */
+ glob_free(&cbrock.g);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ cbrock.inboxoffset = 0;
+ if (usermboxnamelen) {
+ usermboxname[--usermboxnamelen] = '\0';
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ }
+ /* search for all remaining mailboxes.
+ just bother looking at the ones that have the same pattern
+ prefix. */
+ r = DB->foreach(mbdb,
+ domainpat, domainlen + prefixlen,
+ &find_p, &find_cb, &cbrock,
+ NULL);
+ }
+
+
+ done:
+ glob_free(&cbrock.g);
+ if (pat) free(pat);
+
+ return r;
+}
+
+int mboxlist_findall_alt(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock)
+{
+ struct find_rock cbrock;
+ char usermboxname[MAX_MAILBOX_NAME+1], patbuf[MAX_MAILBOX_NAME+1];
+ int usermboxnamelen = 0;
+ const char *data;
+ int datalen;
+ int r = 0;
+ char *p;
+ int prefixlen, len;
+ int userlen = userid ? strlen(userid) : 0, domainlen = 0;
+ char domainpat[MAX_MAILBOX_NAME+1]; /* do intra-domain fetches only */
+ char *pat = NULL;
+
+ if (config_virtdomains && userid && (p = strchr(userid, '@'))) {
+ userlen = p - userid;
+ domainlen = strlen(p); /* includes separator */
+ snprintf(domainpat, sizeof(domainpat), "%s!", p+1);
+ }
+ else
+ domainpat[0] = '\0';
+
+ cbrock.g = glob_init(pattern, GLOB_HIERARCHY|GLOB_INBOXCASE);
+ cbrock.namespace = namespace;
+ cbrock.domainlen = domainlen;
+ cbrock.inboxcase = glob_inboxcase(cbrock.g);
+ cbrock.isadmin = isadmin;
+ cbrock.auth_state = auth_state;
+ cbrock.checkmboxlist = 0; /* don't duplicate work */
+ cbrock.checkshared = 0;
+ cbrock.proc = proc;
+ cbrock.procrock = rock;
+
+ /* Build usermboxname */
+ if (userid && (!(p = strchr(userid, '.')) || ((p - userid) > userlen)) &&
+ strlen(userid)+5 < MAX_MAILBOX_NAME) {
+ if (domainlen)
+ snprintf(usermboxname, sizeof(usermboxname),
+ "%s!", userid+userlen+1);
+ snprintf(usermboxname+domainlen, sizeof(usermboxname)-domainlen,
+ "user.%.*s", userlen, userid);
+ usermboxnamelen = strlen(usermboxname);
+ }
+ else {
+ userid = 0;
+ }
+
+ /* Check for INBOX first of all */
+ if (userid) {
+ if (GLOB_TEST(cbrock.g, "INBOX") != -1) {
+ r = DB->fetch(mbdb, usermboxname, usermboxnamelen,
+ &data, &datalen, NULL);
+ if (!r && data) {
+ r = (*proc)(cbrock.inboxcase, 5, 0, rock);
+ }
+ else if (r == CYRUSDB_NOTFOUND) r = 0;
+ }
+
+ strlcat(usermboxname, ".", sizeof(usermboxname));
+ usermboxnamelen++;
+
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ } else {
+ cbrock.usermboxname = NULL;
+ cbrock.usermboxnamelen = 0;
+ }
+
+ if (r) goto done;
+
+ glob_free(&cbrock.g);
+
+ /* Make a working copy of pattern */
+ pattern = pat = xstrdup(pattern);
+
+ /* Find fixed-string pattern prefix */
+ for (p = pat; *p; p++) {
+ if (*p == '*' || *p == '%' || *p == '?' || *p == '@') break;
+ }
+ prefixlen = p - pattern;
+
+ /*
+ * Personal (INBOX) namespace
+ *
+ * Append pattern to "INBOX.", search for those mailboxes next
+ */
+ if (userid) {
+ strlcpy(patbuf, "INBOX.", sizeof(patbuf));
+ strlcat(patbuf, pattern, sizeof(patbuf));
+ cbrock.g = glob_init(patbuf, GLOB_HIERARCHY|GLOB_INBOXCASE);
+ cbrock.inboxcase = glob_inboxcase(cbrock.g);
+ cbrock.inboxoffset = domainlen+userlen;
+ cbrock.find_namespace = NAMESPACE_INBOX;
+
+ /* iterate through prefixes matching usermboxname */
+ DB->foreach(mbdb,
+ usermboxname, usermboxnamelen,
+ &find_p, &find_cb, &cbrock,
+ NULL);
+
+ glob_free(&cbrock.g);
+ }
+
+ if (usermboxnamelen) {
+ usermboxname[--usermboxnamelen] = '\0';
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ }
+
+ /*
+ * Other Users namespace
+ *
+ * If "Other Users*" can match pattern, search for those mailboxes next
+ */
+ len = strlen(namespace->prefix[NAMESPACE_USER]);
+ if(len>0) len--;
+
+ if (!strncmp(namespace->prefix[NAMESPACE_USER], pattern,
+ prefixlen < len ? prefixlen : len)) {
+
+ if (prefixlen < len) {
+ strlcpy(domainpat+domainlen, pattern+prefixlen,
+ sizeof(domainpat)-domainlen);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ }
+ else {
+ strlcpy(domainpat+domainlen, "user", sizeof(domainpat)-domainlen);
+ strlcat(domainpat, pattern+len, sizeof(domainpat));
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ }
+ cbrock.find_namespace = NAMESPACE_USER;
+ cbrock.inboxoffset = 0;
+
+ /* iterate through prefixes matching usermboxname */
+ strlcpy(domainpat+domainlen, "user", sizeof(domainpat)-domainlen);
+ DB->foreach(mbdb,
+ domainpat, strlen(domainpat),
+ &find_p, &find_cb, &cbrock,
+ NULL);
+
+ glob_free(&cbrock.g);
+ }
+
+ /*
+ * Shared namespace
+ *
+ * search for all remaining mailboxes.
+ * just bother looking at the ones that have the same pattern prefix.
+ */
+ len = strlen(namespace->prefix[NAMESPACE_SHARED]);
+ if(len>0) len--;
+ if (!strncmp(namespace->prefix[NAMESPACE_SHARED], pattern,
+ prefixlen < len ? prefixlen : len)) {
+
+ cbrock.find_namespace = NAMESPACE_SHARED;
+ cbrock.inboxoffset = 0;
+
+ if (prefixlen <= len) {
+ /* Skip pattern which matches shared namespace prefix */
+ for (p = pat+prefixlen; *p; p++) {
+ if (*p == '%') continue;
+ else if (*p == '.') p++;
+ break;
+ }
+
+ if (*pattern && !strchr(pattern, '.') &&
+ pattern[strlen(pattern)-1] == '%') {
+ /* special case: LIST "" *% -- output prefix */
+ cbrock.checkshared = 1;
+ }
+
+ if ((cbrock.checkshared || prefixlen == len) && !*p) {
+ /* special case: LIST "" % -- output prefix
+ (if we have a shared mbox) and quit */
+ strlcpy(domainpat+domainlen, "*", sizeof(domainpat)-domainlen);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ cbrock.checkshared = 2;
+ }
+ else {
+ strlcpy(domainpat+domainlen, p, sizeof(domainpat)-domainlen);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ }
+
+ domainpat[domainlen] = '\0';
+ DB->foreach(mbdb,
+ domainpat, domainlen,
+ &find_p, &find_cb, &cbrock,
+ NULL);
+ }
+ else if (pattern[len] == '.') {
+ strlcpy(domainpat+domainlen, pattern+len+1,
+ sizeof(domainpat)-domainlen);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+
+ DB->foreach(mbdb,
+ domainpat, domainlen+prefixlen-(len+1),
+ &find_p, &find_cb, &cbrock,
+ NULL);
+ }
+ }
+
+ done:
+ glob_free(&cbrock.g);
+ if (pat) free(pat);
+
+ return r;
+}
+
+static int child_cb(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ if (!name) return 0;
+ return (*((int *) rock) = 1);
+}
+
+/*
+ * Set the quota on or create a quota root
+ */
+int mboxlist_setquota(const char *root, int newquota, int force)
+{
+ char pattern[MAX_MAILBOX_PATH+1];
+ struct quota quota;
+ int have_mailbox = 1;
+ int r, t;
+ struct txn *tid = NULL;
+ struct change_rock crock;
+
+ if (!root[0] || root[0] == '.' || strchr(root, '/')
+ || strchr(root, '*') || strchr(root, '%') || strchr(root, '?')) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ memset("a, 0, sizeof(struct quota));
+
+ quota.root = (char *) root;
+ r = quota_read("a, &tid, 1);
+
+ if (!r) {
+ /* Just change it */
+
+ quota.limit = newquota;
+
+ r = quota_write("a, &tid);
+ if (!r) quota_commit(&tid);
+
+ return r;
+ }
+
+ if (r != IMAP_QUOTAROOT_NONEXISTENT) return r;
+
+ /*
+ * Have to create a new quota root
+ */
+ strlcpy(pattern, quota.root, sizeof(pattern));
+
+ if (config_virtdomains && quota.root[strlen(quota.root)-1] == '!') {
+ /* domain quota */
+ have_mailbox = 0;
+ strlcat(pattern, "*", sizeof(pattern));
+ }
+ else {
+ strlcat(pattern, ".*", sizeof(pattern));
+
+ /* look for a top-level mailbox in the proposed quotaroot */
+ r = mboxlist_detail(quota.root, &t, NULL, NULL, NULL, NULL, NULL);
+ if (r) {
+ if (!force && r == IMAP_MAILBOX_NONEXISTENT) {
+ /* look for a child mailbox in the proposed quotaroot */
+ mboxlist_findall(NULL, pattern, 1, NULL, NULL,
+ child_cb, (void *) &force);
+ }
+
+ /* are we going to force the create anyway? */
+ if(!force) return r;
+ else {
+ have_mailbox = 0;
+ t = 0;
+ }
+ }
+
+ if(t & (MBTYPE_REMOTE | MBTYPE_MOVING)) {
+ /* Can't set quota on a remote mailbox */
+ return IMAP_MAILBOX_NOTSUPPORTED;
+ }
+ }
+
+ /* perhaps create .NEW, lock, check if it got recreated, move in place */
+ quota.used = 0;
+ quota.limit = newquota;
+ r = quota_write("a, &tid);
+ if (r) return r;
+
+ crock.quota = "a;
+ crock.tid = &tid;
+ /* top level mailbox */
+ if(have_mailbox)
+ mboxlist_changequota(quota.root, 0, 0, &crock);
+ /* submailboxes - we're using internal names here */
+ mboxlist_findall(NULL, pattern, 1, 0, 0, mboxlist_changequota, &crock);
+
+ r = quota_write("a, &tid);
+ if (!r) quota_commit(&tid);
+
+ return r;
+}
+
+/*
+ * Remove a quota root
+ */
+int mboxlist_unsetquota(const char *root)
+{
+ char pattern[MAX_MAILBOX_PATH+1];
+ struct quota quota;
+ int r=0;
+
+ if (!root[0] || root[0] == '.' || strchr(root, '/')
+ || strchr(root, '*') || strchr(root, '%') || strchr(root, '?')) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ quota.root = (char *) root;
+ r = quota_read("a, NULL, 0);
+ if (r == IMAP_QUOTAROOT_NONEXISTENT) {
+ /* already unset */
+ return 0;
+ }
+ else if (r) return r;
+
+ /*
+ * Have to remove it from all affected mailboxes
+ */
+ strlcpy(pattern, root, sizeof(pattern));
+ if (config_virtdomains && root[strlen(root)-1] == '!') {
+ /* domain quota */
+ strlcat(pattern, "*", sizeof(pattern));
+ }
+ else
+ strlcat(pattern, ".*", sizeof(pattern));
+
+ /* top level mailbox */
+ mboxlist_rmquota(root, 0, 0, (void *)root);
+ /* submailboxes - we're using internal names here */
+ mboxlist_findall(NULL, pattern, 1, 0, 0, mboxlist_rmquota, (void *)root);
+
+ r = quota_delete("a, NULL);
+
+ return r;
+}
+
+/*
+ * Retrieve internal information, for reconstructing mailboxes file
+ */
+void mboxlist_getinternalstuff(const char **listfnamep __attribute__((unused)),
+ const char **newlistfnamep __attribute__((unused)),
+ const char **basep __attribute__((unused)),
+ unsigned long * sizep __attribute__((unused)))
+{
+ printf("yikes! don't reconstruct me!\n");
+ abort();
+}
+
+/*
+ * ACL access canonicalization routine which ensures that 'owner'
+ * retains lookup, administer, and create rights over a mailbox.
+ */
+int mboxlist_ensureOwnerRights(rock, identifier, access)
+void *rock;
+const char *identifier;
+int access;
+{
+ char *owner = (char *)rock;
+ if (strcmp(identifier, owner) != 0) return access;
+ return access|config_implicitrights;
+}
+
+/*
+ * Helper function to remove the quota root for 'name'
+ */
+static int mboxlist_rmquota(const char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ int r;
+ struct mailbox mailbox;
+ const char *oldroot = (const char *) rock;
+
+ assert(rock != NULL);
+
+ r = mailbox_open_header(name, 0, &mailbox);
+ if (r) goto error_noclose;
+
+ r = mailbox_lock_header(&mailbox);
+ if (r) goto error;
+
+ r = mailbox_open_index(&mailbox);
+ if (r) goto error;
+
+ r = mailbox_lock_index(&mailbox);
+ if (r) goto error;
+
+ if (mailbox.quota.root) {
+ if (strlen(mailbox.quota.root) != strlen(oldroot)
+ || strcmp(mailbox.quota.root, oldroot)) {
+ /* Part of a different quota root */
+ mailbox_close(&mailbox);
+ return 0;
+ }
+
+ /* Need to clear the quota root */
+ free(mailbox.quota.root);
+ mailbox.quota.root = NULL;
+
+ r = mailbox_write_header(&mailbox);
+ if(r) goto error;
+ }
+
+ mailbox_close(&mailbox);
+ return 0;
+
+ error:
+ mailbox_close(&mailbox);
+ error_noclose:
+ syslog(LOG_ERR, "LOSTQUOTA: unable to remove quota root %s for %s: %s",
+ oldroot, name, error_message(r));
+
+ return 0;
+}
+
+/*
+ * Helper function to change the quota root for 'name' to that pointed
+ * to by the static global struct pointer 'mboxlist_newquota'.
+ */
+static int mboxlist_changequota(const char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ int r;
+ struct mailbox mailbox;
+ struct change_rock *crock = (struct change_rock *) rock;
+ struct quota *mboxlist_newquota = crock->quota;
+ struct txn **tid = crock->tid;
+
+ assert(rock != NULL);
+
+ r = mailbox_open_header(name, 0, &mailbox);
+ if (r) goto error_noclose;
+
+ r = mailbox_lock_header(&mailbox);
+ if (r) goto error;
+
+ r = mailbox_open_index(&mailbox);
+ if (r) goto error;
+
+ r = mailbox_lock_index(&mailbox);
+ if (r) goto error;
+
+ if (mailbox.quota.root) {
+ if (strlen(mailbox.quota.root) >= strlen(mboxlist_newquota->root)) {
+ /* Part of a child quota root */
+ mailbox_close(&mailbox);
+ return 0;
+ }
+
+ r = quota_read(&mailbox.quota, tid, 1);
+ if (r) goto error;
+ if (mailbox.quota.used >= mailbox.quota_mailbox_used) {
+ mailbox.quota.used -= mailbox.quota_mailbox_used;
+ }
+ else {
+ mailbox.quota.used = 0;
+ }
+ r = quota_write(&mailbox.quota, tid);
+ if (r) {
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record free of " UQUOTA_T_FMT " bytes in quota %s",
+ mailbox.quota_mailbox_used, mailbox.quota.root);
+ }
+ free(mailbox.quota.root);
+ }
+
+ mailbox.quota.root = xstrdup(mboxlist_newquota->root);
+ r = mailbox_write_header(&mailbox);
+ if (r) goto error;
+
+ mboxlist_newquota->used += mailbox.quota_mailbox_used;
+ mailbox_close(&mailbox);
+ return 0;
+
+ error:
+ mailbox_close(&mailbox);
+ error_noclose:
+ syslog(LOG_ERR, "LOSTQUOTA: unable to change quota root for %s to %s: %s",
+ name, mboxlist_newquota->root, error_message(r));
+
+ /* Note, we're a callback, and it's not a huge tragedy if we
+ * fail, so we don't ever return a failure */
+ return 0;
+}
+
+/* must be called after cyrus_init */
+void mboxlist_init(int myflags)
+{
+ int r;
+
+ if (myflags & MBOXLIST_SYNC) {
+ r = DB->sync();
+ }
+}
+
+void mboxlist_open(char *fname)
+{
+ int ret;
+ char *tofree = NULL;
+
+ /* create db file name */
+ if (!fname) {
+ size_t fname_len = strlen(config_dir)+strlen(FNAME_MBOXLIST)+1;
+
+ fname = xmalloc(fname_len);
+ tofree = fname;
+
+ strlcpy(fname, config_dir, fname_len);
+ strlcat(fname, FNAME_MBOXLIST, fname_len);
+ }
+
+ ret = DB->open(fname, CYRUSDB_CREATE, &mbdb);
+ if (ret != 0) {
+ syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
+ cyrusdb_strerror(ret));
+ /* Exiting TEMPFAIL because Sendmail thinks this
+ EC_OSFILE == permanent failure. */
+ fatal("can't read mailboxes file", EC_TEMPFAIL);
+ }
+
+ if (tofree) free(tofree);
+
+ mboxlist_dbopen = 1;
+}
+
+void mboxlist_close(void)
+{
+ int r;
+
+ if (mboxlist_dbopen) {
+ r = DB->close(mbdb);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing mailboxes: %s",
+ cyrusdb_strerror(r));
+ }
+ mboxlist_dbopen = 0;
+ }
+}
+
+void mboxlist_done(void)
+{
+ /* DB->done() handled by cyrus_done() */
+}
+
+/* hash the userid to a file containing the subscriptions for that user */
+char *mboxlist_hash_usersubs(const char *userid)
+{
+ char *fname = xmalloc(strlen(config_dir) + sizeof(FNAME_DOMAINDIR) +
+ sizeof(FNAME_USERDIR) + strlen(userid) +
+ sizeof(FNAME_SUBSSUFFIX) + 10);
+ char c, *domain;
+
+ if (config_virtdomains && (domain = strchr(userid, '@'))) {
+ char d = (char) dir_hash_c(domain+1);
+ *domain = '\0'; /* split user at domain */
+ c = (char) dir_hash_c(userid);
+ sprintf(fname, "%s%s%c/%s%s%c/%s%s", config_dir, FNAME_DOMAINDIR, d,
+ domain+1, FNAME_USERDIR, c, userid, FNAME_SUBSSUFFIX);
+ *domain = '@'; /* replace '@' */
+ }
+ else {
+ c = (char) dir_hash_c(userid);
+ sprintf(fname, "%s%s%c/%s%s", config_dir, FNAME_USERDIR, c, userid,
+ FNAME_SUBSSUFFIX);
+ }
+
+ return fname;
+}
+
+/*
+ * Open the subscription list for 'userid'.
+ *
+ * On success, returns zero.
+ * On failure, returns an error code.
+ */
+static int
+mboxlist_opensubs(const char *userid,
+ struct db **ret)
+{
+ int r = 0;
+ char *subsfname;
+
+ /* Build subscription list filename */
+ subsfname = mboxlist_hash_usersubs(userid);
+ r = SUBDB->open(subsfname, CYRUSDB_CREATE, ret);
+ if (r != CYRUSDB_OK) {
+ r = IMAP_IOERROR;
+ }
+ free(subsfname);
+
+ return r;
+}
+
+/*
+ * Close a subscription file
+ */
+static void mboxlist_closesubs(struct db *sub)
+{
+ SUBDB->close(sub);
+}
+
+/*
+ * Find subscribed mailboxes that match 'pattern'.
+ * 'isadmin' is nonzero if user is a mailbox admin. 'userid'
+ * is the user's login id. For each matching mailbox, calls
+ * 'proc' with the name of the mailbox.
+ */
+int mboxlist_findsub(struct namespace *namespace __attribute__((unused)),
+ const char *pattern, int isadmin __attribute__((unused)),
+ char *userid, struct auth_state *auth_state,
+ int (*proc)(), void *rock, int force)
+{
+ struct db *subs = NULL;
+ struct find_rock cbrock;
+ char usermboxname[MAX_MAILBOX_NAME+1];
+ int usermboxnamelen = 0;
+ const char *data;
+ int datalen;
+ int r = 0;
+ char *p;
+ int prefixlen;
+ int userlen = userid ? strlen(userid) : 0, domainlen = 0;
+ char domainpat[MAX_MAILBOX_NAME+1]; /* do intra-domain fetches only */
+ char *pat = NULL;
+
+ if (config_virtdomains && userid && (p = strchr(userid, '@'))) {
+ userlen = p - userid;
+ domainlen = strlen(p); /* includes separator */
+ snprintf(domainpat, sizeof(domainpat), "%s!%s", p+1, pattern);
+ }
+ else
+ strncpy(domainpat, pattern, sizeof(domainpat));
+
+ cbrock.g = glob_init(pattern, GLOB_HIERARCHY|GLOB_INBOXCASE);
+ cbrock.namespace = NULL;
+ cbrock.domainlen = domainlen;
+ cbrock.inboxcase = glob_inboxcase(cbrock.g);
+ cbrock.isadmin = 1; /* user can always see their subs */
+ cbrock.auth_state = auth_state;
+ cbrock.checkmboxlist = !force;
+ cbrock.checkshared = 0;
+ cbrock.proc = proc;
+ cbrock.procrock = rock;
+
+ /* open the subscription file that contains the mailboxes the
+ user is subscribed to */
+ if ((r = mboxlist_opensubs(userid, &subs)) != 0) {
+ goto done;
+ }
+
+ /* Build usermboxname */
+ if (userid && (!(p = strchr(userid, '.')) || ((p - userid) > userlen)) &&
+ strlen(userid)+5 < MAX_MAILBOX_NAME) {
+ if (domainlen)
+ snprintf(usermboxname, sizeof(usermboxname),
+ "%s!", userid+userlen+1);
+ snprintf(usermboxname+domainlen, sizeof(usermboxname)-domainlen,
+ "user.%.*s", userlen, userid);
+ usermboxnamelen = strlen(usermboxname);
+ }
+ else {
+ userid = 0;
+ }
+
+ /* Check for INBOX first of all */
+ if (userid) {
+ if (GLOB_TEST(cbrock.g, "INBOX") != -1) {
+ r = SUBDB->fetch(subs, usermboxname, usermboxnamelen,
+ &data, &datalen, NULL);
+ if (!r && data) {
+ r = (*proc)(cbrock.inboxcase, 5, 1, rock);
+ }
+ else if (r == CYRUSDB_NOTFOUND) r = 0;
+ }
+ else if (!strncmp(pattern,
+ usermboxname+domainlen, usermboxnamelen-domainlen) &&
+ GLOB_TEST(cbrock.g, usermboxname+domainlen) != -1) {
+ r = SUBDB->fetch(subs, usermboxname, usermboxnamelen,
+ &data, &datalen, NULL);
+ if (!r && data) {
+ r = (*proc)(usermboxname, usermboxnamelen, 1, rock);
+ }
+ else if (r == CYRUSDB_NOTFOUND) r = 0;
+ }
+ strlcat(usermboxname, ".", sizeof(usermboxname));
+ usermboxnamelen++;
+
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ }
+
+ if (r) goto done;
+
+ /* Make a working copy of pattern */
+ pattern = pat = xstrdup(pattern);
+
+ /* Find fixed-string pattern prefix */
+ for (p = pat; *p; p++) {
+ if (*p == '*' || *p == '%' || *p == '?' || *p == '@') break;
+ }
+ prefixlen = p - pattern;
+ *p = '\0';
+
+ /*
+ * If user.X.* or INBOX.* can match pattern,
+ * search for those mailboxes next
+ */
+ if (userid &&
+ (!strncmp(usermboxname+domainlen, pattern, usermboxnamelen-domainlen-1) ||
+ !strncasecmp("inbox.", pattern, prefixlen < 6 ? prefixlen : 6))) {
+
+ if (!strncmp(usermboxname+domainlen, pattern, usermboxnamelen-domainlen-1)) {
+ /* switch to pattern with domain prepended */
+ glob_free(&cbrock.g);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ cbrock.inboxoffset = 0;
+ }
+ else {
+ cbrock.inboxoffset = strlen(userid);
+ }
+
+ cbrock.find_namespace = NAMESPACE_INBOX;
+ /* iterate through prefixes matching usermboxname */
+ SUBDB->foreach(subs,
+ usermboxname, usermboxnamelen,
+ &find_p, &find_cb, &cbrock,
+ NULL);
+
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ } else {
+ cbrock.usermboxname = NULL;
+ cbrock.usermboxnamelen = 0;
+ }
+
+ cbrock.find_namespace = NAMESPACE_USER;
+ /* switch to pattern with domain prepended */
+ glob_free(&cbrock.g);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ cbrock.inboxoffset = 0;
+ if (usermboxnamelen) {
+ usermboxname[--usermboxnamelen] = '\0';
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ }
+ /* search for all remaining mailboxes.
+ just bother looking at the ones that have the same pattern prefix. */
+ SUBDB->foreach(subs, domainpat, domainlen + prefixlen,
+ &find_p, &find_cb, &cbrock, NULL);
+
+ done:
+ if (subs) mboxlist_closesubs(subs);
+ glob_free(&cbrock.g);
+ if (pat) free(pat);
+
+ return r;
+}
+
+int mboxlist_findsub_alt(struct namespace *namespace,
+ const char *pattern, int isadmin __attribute__((unused)),
+ char *userid, struct auth_state *auth_state,
+ int (*proc)(), void *rock, int force)
+{
+ struct db *subs = NULL;
+ struct find_rock cbrock;
+ char usermboxname[MAX_MAILBOX_NAME+1], patbuf[MAX_MAILBOX_NAME+1];
+ int usermboxnamelen = 0;
+ const char *data;
+ int datalen;
+ int r = 0;
+ char *p;
+ int prefixlen, len;
+ int userlen = userid ? strlen(userid) : 0, domainlen = 0;
+ char domainpat[MAX_MAILBOX_NAME+1]; /* do intra-domain fetches only */
+ char *pat = NULL;
+
+ if (config_virtdomains && userid && (p = strchr(userid, '@'))) {
+ userlen = p - userid;
+ domainlen = strlen(p); /* includes separator */
+ snprintf(domainpat, sizeof(domainpat), "%s!", p+1);
+ }
+ else
+ domainpat[0] = '\0';
+
+ cbrock.g = glob_init(pattern, GLOB_HIERARCHY|GLOB_INBOXCASE);
+ cbrock.namespace = namespace;
+ cbrock.domainlen = domainlen;
+ cbrock.inboxcase = glob_inboxcase(cbrock.g);
+ cbrock.isadmin = 1; /* user can always see their subs */
+ cbrock.auth_state = auth_state;
+ cbrock.checkmboxlist = !force;
+ cbrock.checkshared = 0;
+ cbrock.proc = proc;
+ cbrock.procrock = rock;
+
+ /* open the subscription file that contains the mailboxes the
+ user is subscribed to */
+ if ((r = mboxlist_opensubs(userid, &subs)) != 0) {
+ goto done;
+ }
+
+ /* Build usermboxname */
+ if (userid && (!(p = strchr(userid, '.')) || ((p - userid) > userlen)) &&
+ strlen(userid)+5 < MAX_MAILBOX_NAME) {
+ if (domainlen)
+ snprintf(usermboxname, sizeof(usermboxname),
+ "%s!", userid+userlen+1);
+ snprintf(usermboxname+domainlen, sizeof(usermboxname)-domainlen,
+ "user.%.*s", userlen, userid);
+ usermboxnamelen = strlen(usermboxname);
+ }
+ else {
+ userid = 0;
+ }
+
+ /* Check for INBOX first of all */
+ if (userid) {
+ if (GLOB_TEST(cbrock.g, "INBOX") != -1) {
+ r = SUBDB->fetch(subs, usermboxname, usermboxnamelen,
+ &data, &datalen, NULL);
+ if (!r && data) {
+ r = (*proc)(cbrock.inboxcase, 5, 0, rock);
+ }
+ else if (r == CYRUSDB_NOTFOUND) r = 0;
+ }
+ strlcat(usermboxname, ".", sizeof(usermboxname));
+ usermboxnamelen++;
+
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ }
+
+ if (r) goto done;
+
+ glob_free(&cbrock.g);
+
+ /* Make a working copy of pattern */
+ pattern = pat = xstrdup(pattern);
+
+ /* Find fixed-string pattern prefix */
+ for (p = pat; *p; p++) {
+ if (*p == '*' || *p == '%' || *p == '?' || *p == '@') break;
+ }
+ prefixlen = p - pattern;
+
+ /*
+ * Personal (INBOX) namespace
+ *
+ * Append pattern to "INBOX.", search for those subscriptions next
+ */
+ if (userid) {
+ strlcpy(patbuf, "INBOX.", sizeof(patbuf));
+ strlcat(patbuf, pattern, sizeof(patbuf));
+ cbrock.g = glob_init(patbuf, GLOB_HIERARCHY|GLOB_INBOXCASE);
+ cbrock.inboxcase = glob_inboxcase(cbrock.g);
+ cbrock.inboxoffset = domainlen+userlen;
+ cbrock.find_namespace = NAMESPACE_INBOX;
+
+ /* iterate through prefixes matching usermboxname */
+ SUBDB->foreach(subs,
+ usermboxname, usermboxnamelen,
+ &find_p, &find_cb, &cbrock,
+ NULL);
+
+ glob_free(&cbrock.g);
+
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ } else {
+ cbrock.usermboxname = NULL;
+ cbrock.usermboxnamelen = 0;
+ }
+
+ if (usermboxnamelen) {
+ usermboxname[--usermboxnamelen] = '\0';
+ cbrock.usermboxname = usermboxname;
+ cbrock.usermboxnamelen = usermboxnamelen;
+ }
+
+ /*
+ * Other Users namespace
+ *
+ * If "Other Users*" can match pattern, search for those subscriptions next
+ */
+ len = strlen(namespace->prefix[NAMESPACE_USER]);
+ if(len>0) len--; /* Remove Separator */
+ if (!strncmp(namespace->prefix[NAMESPACE_USER], pattern,
+ prefixlen < len ? prefixlen : len)) {
+
+ if (prefixlen < len) {
+ strlcpy(domainpat+domainlen, pattern+prefixlen,
+ sizeof(domainpat)-domainlen);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ }
+ else {
+ strlcpy(domainpat+domainlen, "user",
+ sizeof(domainpat)-domainlen);
+ strlcat(domainpat, pattern+len, sizeof(domainpat));
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ }
+ cbrock.find_namespace = NAMESPACE_USER;
+ cbrock.inboxoffset = 0;
+
+ /* iterate through prefixes matching usermboxname */
+ strlcpy(domainpat+domainlen, "user", sizeof(domainpat)-domainlen);
+ SUBDB->foreach(subs,
+ domainpat, strlen(domainpat),
+ &find_p, &find_cb, &cbrock,
+ NULL);
+
+ glob_free(&cbrock.g);
+ }
+
+ /*
+ * Shared namespace
+ *
+ * search for all remaining subscriptions.
+ * just bother looking at the ones that have the same pattern prefix.
+ */
+ len = strlen(namespace->prefix[NAMESPACE_SHARED]);
+ if(len>0) len--; /* Remove Separator */
+ if (!strncmp(namespace->prefix[NAMESPACE_SHARED], pattern,
+ prefixlen < len ? prefixlen : len)) {
+
+ cbrock.find_namespace = NAMESPACE_SHARED;
+ cbrock.inboxoffset = 0;
+
+ if (prefixlen <= len) {
+ /* Skip pattern which matches shared namespace prefix */
+ for (p = pat+prefixlen; *p; p++) {
+ if (*p == '%') continue;
+ else if (*p == '.') p++;
+ break;
+ }
+
+ if (*pattern && !strchr(pattern, '.') &&
+ pattern[strlen(pattern)-1] == '%') {
+ /* special case: LSUB "" *% -- output prefix */
+ cbrock.checkshared = 1;
+ }
+
+ if ((cbrock.checkshared || prefixlen == len) && !*p) {
+ /* special case: LSUB "" % -- output prefix
+ (if we have a shared mbox) and quit */
+ strlcpy(domainpat+domainlen, "*", sizeof(domainpat)-domainlen);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ cbrock.checkshared = 2;
+ }
+ else {
+ strlcpy(domainpat+domainlen, p, sizeof(domainpat)-domainlen);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+ }
+
+ domainpat[domainlen] = '\0';
+ SUBDB->foreach(subs,
+ domainpat, domainlen,
+ &find_p, &find_cb, &cbrock,
+ NULL);
+ }
+ else if (pattern[len] == '.') {
+ strlcpy(domainpat+domainlen, pattern+len+1,
+ sizeof(domainpat)-domainlen);
+ cbrock.g = glob_init(domainpat, GLOB_HIERARCHY);
+
+ SUBDB->foreach(subs,
+ domainpat, domainlen+prefixlen-(len+1),
+ &find_p, &find_cb, &cbrock,
+ NULL);
+ }
+ }
+
+ done:
+ if (subs) mboxlist_closesubs(subs);
+ glob_free(&cbrock.g);
+ if (pat) free(pat);
+
+ return r;
+}
+
+/*
+ * Change 'user's subscription status for mailbox 'name'.
+ * Subscribes if 'add' is nonzero, unsubscribes otherwise.
+ * if 'force' is set, force the subscription through even if
+ * we don't know about 'name'.
+ */
+int mboxlist_changesub(const char *name, const char *userid,
+ struct auth_state *auth_state, int add, int force)
+{
+ int r;
+ char *acl;
+ struct db *subs;
+
+ if ((r = mboxlist_opensubs(userid, &subs)) != 0) {
+ return r;
+ }
+
+ if (add && !force) {
+ /* Ensure mailbox exists and can be seen by user */
+ if ((r = mboxlist_lookup(name, &acl, NULL))!=0) {
+ mboxlist_closesubs(subs);
+ return r;
+ }
+ if ((cyrus_acl_myrights(auth_state, acl) & ACL_LOOKUP) == 0) {
+ mboxlist_closesubs(subs);
+ return IMAP_MAILBOX_NONEXISTENT;
+ }
+ }
+
+ if (add) {
+ r = SUBDB->store(subs, name, strlen(name), "", 0, NULL);
+ } else {
+ r = SUBDB->delete(subs, name, strlen(name), NULL, 0);
+ /* if it didn't exist, that's ok */
+ if (r == CYRUSDB_EXISTS) r = CYRUSDB_OK;
+ }
+
+ switch (r) {
+ case CYRUSDB_OK:
+ r = 0;
+ break;
+
+ default:
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ mboxlist_closesubs(subs);
+ return r;
+}
+
+/* Transaction Handlers */
+int mboxlist_commit(struct txn *tid)
+{
+ assert(tid);
+
+ return DB->commit(mbdb, tid);
+}
+
+int mboxlist_abort(struct txn *tid)
+{
+ assert(tid);
+
+ return DB->abort(mbdb, tid);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxlist.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,206 @@
+/* mboxlist.h -- Mailbox list manipulation routines
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: mboxlist.h,v 1.38.2.3 2005/02/21 19:25:40 ken3 Exp $
+ */
+
+#ifndef INCLUDED_MBOXLIST_H
+#define INCLUDED_MBOXLIST_H
+
+#include "config.h"
+#include "cyrusdb.h"
+#include "mailbox.h"
+#include "auth.h"
+#include "mboxname.h"
+
+extern struct db *mbdb;
+
+/*
+ * Maximum length of partition name. [config.c has a limit of 70]
+ */
+#define MAX_PARTITION_LEN 64
+
+/* flags for types of mailboxes */
+#define MBTYPE_REMOTE 0x01 /* Not on this server (part is remote host) */
+#define MBTYPE_RESERVE 0x02 /* Reserved [mupdate/imapd] /
+ Rename Target [imapd] (part is normal, but
+ you are not allowed to create this mailbox,
+ even though it doesn't actually exist */
+#define MBTYPE_NETNEWS 0x04 /* Netnews Mailbox */
+#define MBTYPE_MOVING 0x08 /* Mailbox in mid-transfer (part is remotehost!localpart) */
+
+/* master name of the mailboxes file */
+#define FNAME_MBOXLIST "/mailboxes.db"
+
+#define HOSTNAME_SIZE 512
+
+/* each mailbox has the following data */
+struct mbox_entry {
+ char name[MAX_MAILBOX_NAME];
+ int mbtype;
+ char partition[MAX_PARTITION_LEN];
+ /* holds remote machine for REMOTE mailboxes */
+ char acls[1];
+};
+
+/* Convert a partition into a path */
+int mboxlist_getpath(const char *partition, const char *name,
+ char **pathp, char **mpathp);
+
+/* Lookup 'name' in the mailbox list. */
+int mboxlist_lookup(const char *name, char **aclp, struct txn **tid);
+
+/* Lookup 'name' and get more detail */
+int mboxlist_detail(const char *name, int *typep, char **pathp, char **mpathp,
+ char **partp, char **aclp, struct txn **tid);
+
+/* insert/delete stub entries */
+int mboxlist_insertremote(const char *name, int mbtype, const char *host,
+ const char *acl, struct txn **rettid);
+int mboxlist_deleteremote(const char *name, struct txn **in_tid);
+
+
+
+/* Update a mailbox's entry */
+int mboxlist_update(char *name, int flags, const char *part, const char *acl,
+ int localonly);
+
+/* check user's ability to create mailbox */
+int mboxlist_createmailboxcheck(char *name, int mbtype, char *partition,
+ int isadmin, char *userid,
+ struct auth_state *auth_state,
+ char **newacl, char **newpartition);
+
+/* create mailbox */
+/* localonly creates the local mailbox without touching mupdate */
+/* forceuser allows the creation of user.x.<name> without a user.x */
+/* dbonly skips filesystem operations (e.g. reconstruct) */
+int mboxlist_createmailbox(char *name, int mbtype, char *partition,
+ int isadmin, char *userid,
+ struct auth_state *auth_state,
+ int localonly, int forceuser, int dbonly);
+
+/* Delete a mailbox. */
+/* setting local_only disables any communication with the mupdate server
+ * and deletes the mailbox from the filesystem regardless of if it is
+ * MBTYPE_REMOTE or not */
+/* force ignores errors and just tries to wipe the mailbox off the face of
+ * the planet */
+int mboxlist_deletemailbox(const char *name, int isadmin, char *userid,
+ struct auth_state *auth_state, int checkacl,
+ int local_only, int force);
+
+/* Rename/move a mailbox (hierarchical) */
+int mboxlist_renamemailbox(char *oldname, char *newname, char *partition,
+ int isadmin, char *userid,
+ struct auth_state *auth_state);
+
+/* change ACL */
+int mboxlist_setacl(const char *name, const char *identifier,
+ const char *rights, int isadmin,
+ const char *userid, struct auth_state *auth_state);
+
+/* Change all ACLs on mailbox */
+int mboxlist_sync_setacls(char *name, char *acl);
+
+/* Find all mailboxes that match 'pattern'. */
+int mboxlist_findall(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(), void *rock);
+int mboxlist_findall_std(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock);
+int mboxlist_findall_alt(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock);
+
+/* Find subscribed mailboxes that match 'pattern'. */
+int mboxlist_findsub(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(), void *rock,
+ int force);
+int mboxlist_findsub_std(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock, int force);
+int mboxlist_findsub_alt(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock, int force);
+
+/* given a mailbox 'name', where should we stage messages for it?
+ 'stagedir' should be MAX_MAILBOX_PATH. */
+int mboxlist_findstage(const char *name, char *stagedir, size_t sd_len);
+
+/* Change 'user's subscription status for mailbox 'name'. */
+int mboxlist_changesub(const char *name, const char *userid,
+ struct auth_state *auth_state, int add, int force);
+
+/* get name a file containing subscriptions for 'userid' */
+char *mboxlist_hash_usersubs(const char *userid);
+
+/* set or create quota root */
+int mboxlist_setquota(const char *root, int newquota, int force);
+int mboxlist_unsetquota(const char *root);
+
+/* returns a malloc() string that is the representation in the mailboxes
+ file. for ctl_mboxlist */
+char *mboxlist_makeentry(int mbtype, const char *part, const char *acl);
+
+/* open the mailboxes db */
+void mboxlist_open(char *name);
+
+/* close the database */
+void mboxlist_close(void);
+
+/* initialize database structures */
+#define MBOXLIST_SYNC 0x02
+void mboxlist_init(int flags);
+
+/* done with database stuff */
+void mboxlist_done(void);
+
+/* for transactions */
+int mboxlist_commit(struct txn *tid);
+int mboxlist_abort(struct txn *tid);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,752 @@
+/* mboxname.c -- Mailbox list manipulation routines
+ * $Id: mboxname.c,v 1.31.2.4 2005/02/14 06:43:17 shadow Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "assert.h"
+#include "glob.h"
+#include "global.h"
+#include "mailbox.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "xmalloc.h"
+
+#include "mboxname.h"
+#include "mboxlist.h"
+
+/* Mailbox patterns which the design of the server prohibits */
+static char *badmboxpatterns[] = {
+ "",
+ "*\t*",
+ "*\n*",
+ "*/*",
+ ".*",
+ "*.",
+ "*..*",
+ "user",
+};
+#define NUM_BADMBOXPATTERNS (sizeof(badmboxpatterns)/sizeof(*badmboxpatterns))
+
+#define XX 127
+/*
+ * Table for decoding modified base64 for IMAP UTF-7 mailbox names
+ */
+static const char index_mod64[256] = {
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,62, 63,XX,XX,XX,
+ 52,53,54,55, 56,57,58,59, 60,61,XX,XX, XX,XX,XX,XX,
+ XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
+ 15,16,17,18, 19,20,21,22, 23,24,25,XX, XX,XX,XX,XX,
+ XX,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
+ 41,42,43,44, 45,46,47,48, 49,50,51,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+};
+#define CHARMOD64(c) (index_mod64[(unsigned char)(c)])
+
+
+/*
+ * Convert the external mailbox 'name' to an internal name.
+ * If 'userid' is non-null, it is the name of the current user.
+ * On success, results are placed in the buffer pointed to by
+ * 'result', the buffer must be of size MAX_MAILBOX_NAME+1.
+ */
+
+/* Handle conversion from the standard namespace to the internal namespace */
+static int mboxname_tointernal(struct namespace *namespace, const char *name,
+ const char *userid, char *result)
+{
+ char *cp;
+ int userlen, domainlen = 0, namelen;
+
+ /* Blank the result, just in case */
+ result[0] = '\0';
+
+ userlen = userid ? strlen(userid) : 0;
+ namelen = strlen(name);
+
+ if (config_virtdomains) {
+ if (userid && (cp = strrchr(userid, '@'))) {
+ /* user logged in as user at domain */
+ userlen = cp++ - userid;
+ /* don't prepend default domain */
+ if (!(config_defdomain && !strcasecmp(config_defdomain, cp))) {
+ domainlen = strlen(cp)+1;
+ if (domainlen > MAX_MAILBOX_NAME)
+ return IMAP_MAILBOX_BADNAME;
+ sprintf(result, "%s!", cp);
+ }
+ }
+ if ((cp = strrchr(name, '@'))) {
+ /* mailbox specified as mbox at domain */
+ namelen = cp - name;
+
+ if (config_defdomain && !strcasecmp(config_defdomain, cp+1)) {
+ if (domainlen) {
+ /* don't allow cross-domain access */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ /* don't prepend default domain */
+ }
+ else {
+ if ((!domainlen && !namespace->isadmin) ||
+ (domainlen && strcasecmp(userid+userlen, cp))) {
+ /* don't allow cross-domain access
+ (except for global admin) */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ domainlen = strlen(cp+1)+1;
+ if (domainlen > MAX_MAILBOX_NAME)
+ return IMAP_MAILBOX_BADNAME;
+ sprintf(result, "%s!", cp+1);
+ }
+ }
+
+ /* if no domain specified, we're in the default domain */
+ }
+
+ result += domainlen;
+
+ /* Personal (INBOX) namespace */
+ if ((name[0] == 'i' || name[0] == 'I') &&
+ !strncasecmp(name, "inbox", 5) &&
+ (namelen == 5 || name[5] == namespace->hier_sep)) {
+
+ if (!userid || ((cp = strchr(userid, namespace->hier_sep)) &&
+ (cp - userid < userlen))) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ if (domainlen+namelen+userlen > MAX_MAILBOX_NAME) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ sprintf(result, "user.%.*s%.*s", userlen, userid, namelen-5, name+5);
+
+ /* Translate any separators in userid+mailbox */
+ mboxname_hiersep_tointernal(namespace, result+5+userlen, 0);
+ return 0;
+ }
+
+ /* Other Users & Shared namespace */
+ if (domainlen+namelen > MAX_MAILBOX_NAME) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+ sprintf(result, "%.*s", namelen, name);
+
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_tointernal(namespace, result, 0);
+ return 0;
+}
+
+/* Handle conversion from the alternate namespace to the internal namespace */
+static int mboxname_tointernal_alt(struct namespace *namespace,
+ const char *name,
+ const char *userid, char *result)
+{
+ char *cp;
+ int userlen, domainlen = 0, namelen;
+ int prefixlen;
+ size_t resultlen;
+
+ /* Blank the result, just in case */
+ result[0] = '\0';
+
+ userlen = userid ? strlen(userid) : 0;
+ namelen = strlen(name);
+
+ if (config_virtdomains) {
+ if (userid && (cp = strchr(userid, '@'))) {
+ /* user logged in as user at domain */
+ userlen = cp++ - userid;
+ if (!(config_defdomain && !strcasecmp(config_defdomain, cp))) {
+ /* don't prepend default domain */
+ domainlen = strlen(cp)+1;
+ if (domainlen > MAX_MAILBOX_NAME)
+ return IMAP_MAILBOX_BADNAME;
+ sprintf(result, "%s!", cp);
+ }
+ }
+ if ((cp = strrchr(name, '@'))) {
+ /* mailbox specified as mbox at domain */
+ namelen = cp - name;
+
+ if (config_defdomain && !strcasecmp(config_defdomain, cp+1)) {
+ if (domainlen) {
+ /* don't allow cross-domain access */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ /* don't prepend default domain */
+ }
+ else {
+ if ((!domainlen && !namespace->isadmin) ||
+ (domainlen && strcasecmp(userid+userlen, cp))) {
+ /* don't allow cross-domain access
+ (except for global admin) */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ domainlen = strlen(cp+1)+1;
+ if (domainlen > MAX_MAILBOX_NAME)
+ return IMAP_MAILBOX_BADNAME;
+ sprintf(result, "%s!", cp+1);
+ }
+ }
+
+ /* if no domain specified, we're in the default domain */
+ }
+
+ result += domainlen;
+
+ /* Shared namespace */
+ prefixlen = strlen(namespace->prefix[NAMESPACE_SHARED]);
+ if(prefixlen == 0) return IMAP_MAILBOX_BADNAME;
+
+ if (!strncmp(name, namespace->prefix[NAMESPACE_SHARED], prefixlen-1) &&
+ (namelen == prefixlen-1 || name[prefixlen-1] == namespace->hier_sep)) {
+
+ if (namelen == prefixlen-1) {
+ /* can't create folders using undelimited prefix */
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ if (domainlen+namelen-prefixlen > MAX_MAILBOX_NAME) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ sprintf(result, "%.*s", namelen-prefixlen, name+prefixlen);
+
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_tointernal(namespace, result, 0);
+ return 0;
+ }
+
+ /* Other Users namespace */
+ prefixlen = strlen(namespace->prefix[NAMESPACE_USER]);
+ if(prefixlen == 0) return IMAP_MAILBOX_BADNAME;
+
+ if (!strncmp(name, namespace->prefix[NAMESPACE_USER], prefixlen-1) &&
+ (namelen == prefixlen-1 || name[prefixlen-1] == namespace->hier_sep)) {
+
+ if (namelen == prefixlen-1) {
+ /* can't create folders using undelimited prefix */
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ if (domainlen+namelen-prefixlen+5 > MAX_MAILBOX_NAME) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ sprintf(result, "user.%.*s", namelen-prefixlen, name+prefixlen);
+
+ /* Translate any separators in userid+mailbox */
+ mboxname_hiersep_tointernal(namespace, result+5, 0);
+ return 0;
+ }
+
+ /* Personal (INBOX) namespace */
+ if (!userid || ((cp = strchr(userid, namespace->hier_sep)) &&
+ (cp - userid < userlen))) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ if (domainlen+userlen+5 > MAX_MAILBOX_NAME) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ sprintf(result, "user.%.*s", userlen, userid);
+
+ /* INBOX */
+ if ((name[0] == 'i' || name[0] == 'I') &&
+ !strncasecmp(name, "inbox", 5) &&
+ (namelen == 5 || name[5] == namespace->hier_sep)) {
+
+ if (name[5] == namespace->hier_sep) {
+ /* can't create folders under INBOX */
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ return 0;
+ }
+
+ resultlen = strlen(result);
+
+ /* other personal folder */
+ if (domainlen+resultlen+6+namelen > MAX_MAILBOX_NAME) {
+ return IMAP_MAILBOX_BADNAME;
+ }
+ snprintf(result+resultlen, MAX_MAILBOX_NAME+1-resultlen, ".%.*s",
+ namelen, name);
+
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_tointernal(namespace, result+6+userlen, 0);
+ return 0;
+}
+
+/*
+ * Convert the internal mailbox 'name' to an external name.
+ * If 'userid' is non-null, it is the name of the current user.
+ * On success, results are placed in the buffer pointed to by
+ * 'result', the buffer must be of size MAX_MAILBOX_NAME+1.
+ */
+
+/* Handle conversion from the internal namespace to the standard namespace */
+static int mboxname_toexternal(struct namespace *namespace, const char *name,
+ const char *userid, char *result)
+{
+ char *domain = NULL, *cp;
+ size_t domainlen = 0, resultlen;
+
+ /* Blank the result, just in case */
+ result[0] = '\0';
+
+ if(strlen(name) > MAX_MAILBOX_NAME) return IMAP_MAILBOX_BADNAME;
+
+ if (config_virtdomains && (cp = strchr(name, '!'))) {
+ domain = (char*) name;
+ domainlen = cp++ - name;
+ name = cp;
+
+ /* don't use the domain if it matches the user's domain */
+ if (userid && (cp = strchr(userid, '@')) &&
+ (strlen(++cp) == domainlen) && !strncmp(domain, cp, domainlen))
+ domain = NULL;
+ }
+
+ strcpy(result, name);
+
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_toexternal(namespace, result, 0);
+
+ resultlen = strlen(result);
+
+ /* Append domain */
+ if (domain) {
+ if(resultlen+domainlen+1 > MAX_MAILBOX_NAME)
+ return IMAP_MAILBOX_BADNAME;
+
+ snprintf(result+resultlen, MAX_MAILBOX_NAME+1-resultlen,
+ "@%.*s", domainlen, domain);
+ }
+
+ return 0;
+}
+
+/* Handle conversion from the internal namespace to the alternate namespace */
+static int mboxname_toexternal_alt(struct namespace *namespace, const char *name,
+ const char *userid, char *result)
+{
+ char *domain;
+ size_t userlen, resultlen;
+
+ /* Blank the result, just in case */
+ result[0] = '\0';
+
+ if(strlen(name) > MAX_MAILBOX_NAME) return IMAP_MAILBOX_BADNAME;
+
+ if (!userid) return IMAP_MAILBOX_BADNAME;
+
+ userlen = strlen(userid);
+
+ if (config_virtdomains && (domain = strchr(userid, '@'))) {
+ size_t domainlen = strlen(domain);
+
+ userlen = domain - userid;
+
+ if (!strncmp(name, domain+1, domainlen-1) &&
+ name[domainlen-1] == '!') {
+ name += domainlen;
+ }
+ }
+
+ /* Personal (INBOX) namespace */
+ if (!strncasecmp(name, "inbox", 5) &&
+ (name[5] == '\0' || name[5] == '.')) {
+ if (name[5] == '\0')
+ strcpy(result, name);
+ else
+ strcpy(result, name+6);
+ }
+ /* paranoia - this shouldn't be needed */
+ else if (!strncmp(name, "user.", 5) &&
+ !strncmp(name+5, userid, userlen) &&
+ (name[5+userlen] == '\0' ||
+ name[5+userlen] == '.')) {
+ if (name[5+userlen] == '\0')
+ strcpy(result, "INBOX");
+ else
+ strcpy(result, name+5+userlen+1);
+ }
+
+ /* Other Users namespace */
+ else if (!strncmp(name, "user", 4) &&
+ (name[4] == '\0' || name[4] == '.')) {
+ size_t prefixlen = strlen(namespace->prefix[NAMESPACE_USER]);
+
+ if ((prefixlen > MAX_MAILBOX_NAME) ||
+ ((name[4] == '.') &&
+ ((prefixlen+1+strlen(name+5)) > MAX_MAILBOX_NAME)))
+ return IMAP_MAILBOX_BADNAME;
+
+ sprintf(result, "%.*s",
+ prefixlen-1, namespace->prefix[NAMESPACE_USER]);
+ resultlen = strlen(result);
+ if (name[4] == '.') {
+ sprintf(result+resultlen, "%c%s", namespace->hier_sep, name+5);
+ }
+ }
+
+ /* Shared namespace */
+ else {
+ /* special case: LIST/LSUB "" % */
+ if (!strncmp(name, namespace->prefix[NAMESPACE_SHARED],
+ strlen(namespace->prefix[NAMESPACE_SHARED])-1)) {
+ strcpy(result, name);
+ }
+ else {
+ strcpy(result, namespace->prefix[NAMESPACE_SHARED]);
+ strcat(result, name);
+ }
+ }
+
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_toexternal(namespace, result, 0);
+ return 0;
+}
+
+/*
+ * Create namespace based on config options.
+ */
+int mboxname_init_namespace(struct namespace *namespace, int isadmin)
+{
+ const char *prefix;
+
+ assert(namespace != NULL);
+
+ namespace->isadmin = isadmin;
+
+ namespace->hier_sep =
+ config_getswitch(IMAPOPT_UNIXHIERARCHYSEP) ? '/' : '.';
+ namespace->isalt = !isadmin && config_getswitch(IMAPOPT_ALTNAMESPACE);
+
+ if (namespace->isalt) {
+ /* alternate namespace */
+ strcpy(namespace->prefix[NAMESPACE_INBOX], "");
+
+ prefix = config_getstring(IMAPOPT_USERPREFIX);
+ if (!prefix || strlen(prefix) == 0 ||
+ strlen(prefix) >= MAX_NAMESPACE_PREFIX ||
+ strchr(prefix,namespace->hier_sep) != NULL)
+ return IMAP_NAMESPACE_BADPREFIX;
+ sprintf(namespace->prefix[NAMESPACE_USER], "%.*s%c",
+ MAX_NAMESPACE_PREFIX-1, prefix, namespace->hier_sep);
+
+ prefix = config_getstring(IMAPOPT_SHAREDPREFIX);
+ if (!prefix || strlen(prefix) == 0 ||
+ strlen(prefix) >= MAX_NAMESPACE_PREFIX ||
+ strchr(prefix, namespace->hier_sep) != NULL ||
+ !strncmp(namespace->prefix[NAMESPACE_USER], prefix, strlen(prefix)))
+ return IMAP_NAMESPACE_BADPREFIX;
+ sprintf(namespace->prefix[NAMESPACE_SHARED], "%.*s%c",
+ MAX_NAMESPACE_PREFIX-1, prefix, namespace->hier_sep);
+
+ namespace->mboxname_tointernal = mboxname_tointernal_alt;
+ namespace->mboxname_toexternal = mboxname_toexternal_alt;
+ namespace->mboxlist_findall = mboxlist_findall_alt;
+ namespace->mboxlist_findsub = mboxlist_findsub_alt;
+ }
+
+ else {
+ /* standard namespace */
+ sprintf(namespace->prefix[NAMESPACE_INBOX], "%s%c",
+ "INBOX", namespace->hier_sep);
+ sprintf(namespace->prefix[NAMESPACE_USER], "%s%c",
+ "user", namespace->hier_sep);
+ strcpy(namespace->prefix[NAMESPACE_SHARED], "");
+
+ namespace->mboxname_tointernal = mboxname_tointernal;
+ namespace->mboxname_toexternal = mboxname_toexternal;
+ namespace->mboxlist_findall = mboxlist_findall;
+ namespace->mboxlist_findsub = mboxlist_findsub;
+ }
+
+ return 0;
+}
+
+/*
+ * Translate separator charactors in a mailboxname from its external
+ * representation to its internal representation '.'.
+ * If using the unixhierarchysep '/', all '.'s get translated to DOTCHAR.
+ */
+char *mboxname_hiersep_tointernal(struct namespace *namespace, char *name,
+ int length)
+{
+ char *p;
+
+ assert(namespace != NULL);
+ assert(namespace->hier_sep == '.' || namespace->hier_sep == '/');
+
+ if (!length) length = strlen(name);
+
+ if (namespace->hier_sep == '/') {
+ /* change all '/'s to '.' and all '.'s to DOTCHAR */
+ for (p = name; *p && length; p++, length--) {
+ if (*p == '/') *p = '.';
+ else if (*p == '.') *p = DOTCHAR;
+ }
+ }
+
+ return name;
+}
+
+/*
+ * Translate separator charactors in a mailboxname from its internal
+ * representation '.' to its external representation.
+ * If using the unixhierarchysep '/', all DOTCHAR get translated to '.'.
+ */
+char *mboxname_hiersep_toexternal(struct namespace *namespace, char *name,
+ int length)
+{
+ char *p;
+
+ assert(namespace != NULL);
+ assert(namespace->hier_sep == '.' || namespace->hier_sep == '/');
+
+ if (!length) length=strlen(name);
+
+ if (namespace->hier_sep == '/') {
+ /* change all '.'s to '/' and all DOTCHARs to '.' */
+ for (p = name; *p && length; p++, length--) {
+ if (*p == '.') *p = '/';
+ else if (*p == DOTCHAR) *p = '.';
+ }
+ }
+
+ return name;
+}
+
+/*
+ * Return nonzero if 'userid' owns the (internal) mailbox 'name'.
+ */
+int mboxname_userownsmailbox(const char *userid, const char *name)
+{
+ struct namespace internal = { '.', 0, 0, { "INBOX.", "user.", "" },
+ NULL, NULL, NULL, NULL };
+ char inboxname[MAX_MAILBOX_NAME+1];
+
+ if (!mboxname_tointernal(&internal, "INBOX", userid, inboxname) &&
+ !strncmp(name, inboxname, strlen(inboxname)) &&
+ (name[strlen(inboxname)] == '\0' || name[strlen(inboxname)] == '.')) {
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * If (internal) mailbox 'name' is a user's mailbox (optionally INBOX),
+ * returns a pointer to the userid, otherwise returns NULL.
+ */
+char *mboxname_isusermailbox(const char *name, int isinbox)
+{
+ const char *p;
+
+ if (((!strncmp(name, "user.", 5) && (p = name+5)) ||
+ ((p = strstr(name, "!user.")) && (p += 6))) &&
+ (!isinbox || !strchr(p, '.')))
+ return (char*) p;
+ else
+ return NULL;
+}
+
+/*
+ * Apply additional restrictions on netnews mailbox names.
+ * Cannot have all-numeric name components.
+ */
+int mboxname_netnewscheck(char *name)
+{
+ int c;
+ int sawnonnumeric = 0;
+
+ while ((c = *name++)!=0) {
+ switch (c) {
+ case '.':
+ if (!sawnonnumeric) return IMAP_MAILBOX_BADNAME;
+ sawnonnumeric = 0;
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ break;
+
+ default:
+ sawnonnumeric = 1;
+ break;
+ }
+ }
+ if (!sawnonnumeric) return IMAP_MAILBOX_BADNAME;
+ return 0;
+}
+
+
+/*
+ * Apply site policy restrictions on mailbox names.
+ * Restrictions are hardwired for now.
+ */
+#define GOODCHARS " +,-.0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"
+int mboxname_policycheck(char *name)
+{
+ unsigned i;
+ struct glob *g;
+ int sawutf7 = 0;
+ unsigned c1, c2, c3, c4, c5, c6, c7, c8;
+ int ucs4;
+ int unixsep;
+
+ unixsep = config_getswitch(IMAPOPT_UNIXHIERARCHYSEP);
+
+ if (strlen(name) > MAX_MAILBOX_NAME) return IMAP_MAILBOX_BADNAME;
+ for (i = 0; i < NUM_BADMBOXPATTERNS; i++) {
+ g = glob_init(badmboxpatterns[i], 0);
+ if (GLOB_TEST(g, name) != -1) {
+ glob_free(&g);
+ return IMAP_MAILBOX_BADNAME;
+ }
+ glob_free(&g);
+ }
+
+ if (*name == '~') return IMAP_MAILBOX_BADNAME;
+ while (*name) {
+ if (*name == '&') {
+ /* Modified UTF-7 */
+ name++;
+ while (*name != '-') {
+ if (sawutf7) {
+ /* Two adjacent utf7 sequences */
+ return IMAP_MAILBOX_BADNAME;
+ }
+
+ if ((c1 = CHARMOD64(*name++)) == XX ||
+ (c2 = CHARMOD64(*name++)) == XX ||
+ (c3 = CHARMOD64(*name++)) == XX) {
+ /* Non-base64 character */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ ucs4 = (c1 << 10) | (c2 << 4) | (c3 >> 2);
+ if ((ucs4 & 0xff80) == 0 || (ucs4 & 0xf800) == 0xd800) {
+ /* US-ASCII or multi-word character */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ if (*name == '-') {
+ /* Trailing bits not zero */
+ if (c3 & 0x03) return IMAP_MAILBOX_BADNAME;
+
+ /* End of UTF-7 sequence */
+ break;
+ }
+
+ if ((c4 = CHARMOD64(*name++)) == XX ||
+ (c5 = CHARMOD64(*name++)) == XX ||
+ (c6 = CHARMOD64(*name++)) == XX) {
+ /* Non-base64 character */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ ucs4 = ((c3 & 0x03) << 14) | (c4 << 8) | (c5 << 2) | (c6 >> 4);
+ if ((ucs4 & 0xff80) == 0 || (ucs4 & 0xf800) == 0xd800) {
+ /* US-ASCII or multi-word character */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ if (*name == '-') {
+ /* Trailing bits not zero */
+ if (c6 & 0x0f) return IMAP_MAILBOX_BADNAME;
+
+ /* End of UTF-7 sequence */
+ break;
+ }
+
+ if ((c7 = CHARMOD64(*name++)) == XX ||
+ (c8 = CHARMOD64(*name++)) == XX) {
+ /* Non-base64 character */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ ucs4 = ((c6 & 0x0f) << 12) | (c7 << 6) | c8;
+ if ((ucs4 & 0xff80) == 0 || (ucs4 & 0xf800) == 0xd800) {
+ /* US-ASCII or multi-word character */
+ return IMAP_MAILBOX_BADNAME;
+ }
+ }
+
+ if (name[-1] == '&') sawutf7 = 0; /* '&-' is sequence for '&' */
+ else sawutf7 = 1;
+
+ name++; /* Skip over terminating '-' */
+ }
+ else {
+ if (!strchr(GOODCHARS, *name) &&
+ /* If we're using unixhierarchysep, DOTCHAR is allowed */
+ !(unixsep && *name == DOTCHAR))
+ return IMAP_MAILBOX_BADNAME;
+ name++;
+ sawutf7 = 0;
+ }
+ }
+ return 0;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mboxname.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,119 @@
+/* mboxname.h -- Mailbox list manipulation routines
+ * $Id: mboxname.h,v 1.12.2.1 2004/03/24 19:53:08 ken3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_MBOXNAME_H
+#define INCLUDED_MBOXNAME_H
+
+#include "auth.h"
+
+#define MAX_NAMESPACE_PREFIX 40
+
+/* placeholder character for '.' in mailboxnames */
+#define DOTCHAR '^'
+
+/* list of our namespaces */
+enum { NAMESPACE_INBOX = 0,
+ NAMESPACE_USER = 1,
+ NAMESPACE_SHARED = 2 };
+
+/* structure holding server namespace info */
+struct namespace {
+ char hier_sep;
+ int isalt; /* are we using the alternate namespace? */
+ int isadmin; /* current user is an admin */
+ char prefix[3][MAX_NAMESPACE_PREFIX+1];
+ /* Convert the external mailbox 'name' to an internal name. */
+ int (*mboxname_tointernal)(struct namespace *namespace, const char *name,
+ const char *userid, char *result);
+ /* Convert the internal mailbox 'name' to an external name. */
+ int (*mboxname_toexternal)(struct namespace *namespace, const char *name,
+ const char *userid, char *result);
+ int (*mboxlist_findall)(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock);
+ int (*mboxlist_findsub)(struct namespace *namespace,
+ const char *pattern, int isadmin, char *userid,
+ struct auth_state *auth_state, int (*proc)(),
+ void *rock, int force);
+};
+
+/* Create namespace based on config options. */
+int mboxname_init_namespace(struct namespace *namespace, int isadmin);
+
+/*
+ * Translate separator charactors in a mailboxname from its external
+ * representation to its internal representation '.'.
+ * If using the unixhierarchysep '/', all '.'s get translated to DOTCHAR.
+ * length is the length of the string to translate (0 = strlen(name)).
+ */
+char *mboxname_hiersep_tointernal(struct namespace *namespace, char *name,
+ int length);
+
+/*
+ * Translate separator charactors in a mailboxname from its internal
+ * representation '.' to its external representation.
+ * If using the unixhierarchysep '/', all DOTCHAR get translated to '.'.
+ * length is the length of the string to translate (0 = strlen(name)).
+ */
+char *mboxname_hiersep_toexternal(struct namespace *namespace, char *name,
+ int length);
+
+/* Return nonzero if 'userid' owns the (internal) mailbox 'name'. */
+int mboxname_userownsmailbox(const char *userid, const char *name);
+
+/*
+ * If (internal) mailbox 'name' is a user's mailbox (optionally INBOX),
+ * returns a pointer to the userid, otherwise returns NULL.
+ */
+char *mboxname_isusermailbox(const char *name, int isinbox);
+
+/*
+ * Return nonzero if (internal) mailbox 'name' consists of legal characters.
+ * If using the unixhierarchysep '/', DOTCHAR ('.' placeholder) is allowed.
+ */
+int mboxname_policycheck(char *name);
+
+int mboxname_netnewscheck(char *name);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbpath.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbpath.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbpath.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mbpath.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,165 @@
+/* mbpath.c -- help the sysadmin to find the path matching the mailbox
+ *
+ * $Id: mbpath.c,v 1.14.2.5 2006/02/25 18:32:35 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* static char _rcsid[] = "$Id: mbpath.c,v 1.14.2.5 2006/02/25 18:32:35 murch Exp $"; */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/param.h>
+
+#include "acl.h"
+#include "util.h"
+#include "auth.h"
+#include "prot.h"
+#include "imparse.h"
+#include "lock.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "xmalloc.h"
+#include "mboxlist.h"
+
+extern int optind;
+extern char *optarg;
+
+/* current namespace */
+static struct namespace mbpath_namespace;
+
+/* config.c stuff */
+const int config_need_data = 0;
+
+static int
+usage(void) {
+ fprintf(stderr,"usage: mbpath [-C <alt_config>] [-q] [-s] [-m] <mailbox name>...\n");
+ fprintf(stderr,"\t-q\tquietly drop any error messages\n");
+ fprintf(stderr,"\t-s\tstop on error\n");
+ fprintf(stderr,"\t-m\toutput the path to the metadata files (if different from the message files)\n");
+ exit(-1);
+}
+
+int
+main(int argc, char **argv)
+{
+ char *path, *mpath;
+ int rc, i, quiet = 0, stop_on_error=0, metadata=0;
+ int opt; /* getopt() returns an int */
+ char *alt_config = NULL;
+ char buf[MAX_MAILBOX_PATH+1];
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:qsm")) != EOF) {
+ switch(opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ case 'q':
+ quiet = 1;
+ break;
+ case 's':
+ stop_on_error = 1;
+ break;
+ case 'm':
+ metadata = 1;
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ cyrus_init(alt_config, "mbpath", 0);
+
+ if ((rc = mboxname_init_namespace(&mbpath_namespace, 1)) != 0) {
+ fatal(error_message(rc), -1);
+ }
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ for (i = optind; i < argc; i++) {
+ (void)memset(&path, 0, sizeof(path));
+
+ /* Translate mailboxname */
+ (*mbpath_namespace.mboxname_tointernal)(&mbpath_namespace, argv[i], NULL, buf);
+
+ if ((rc = mboxlist_detail(buf, NULL, &path, &mpath,
+ NULL, NULL, NULL)) == 0) {
+ if (metadata && mpath) printf("%s\n", mpath);
+ else printf("%s\n", path);
+ } else {
+ if (!quiet && (rc == IMAP_MAILBOX_NONEXISTENT)) {
+ fprintf(stderr, "Invalid mailbox name: %s\n", argv[i]);
+ }
+ if (stop_on_error) {
+ if (quiet) {
+ fatal("", -1);
+ } else {
+ fatal("Error in processing mailbox. Stopping\n", -1);
+ }
+ }
+ }
+ }
+
+ mboxlist_close();
+ mboxlist_done();
+
+ cyrus_done();
+
+ return 0;
+}
+
+/* $Header: /cvs/src/cyrus/imap/mbpath.c,v 1.14.2.5 2006/02/25 18:32:35 murch Exp $ */
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2754 @@
+/* message.c -- Message manipulation/parsing
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * $Id: message.c,v 1.97.2.11 2006/05/26 16:27:18 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <sys/stat.h>
+#include <netinet/in.h>
+#include <stdlib.h>
+
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "prot.h"
+#include "map.h"
+#include "mailbox.h"
+#include "message.h"
+#include "parseaddr.h"
+#include "charset.h"
+#include "util.h"
+#include "xmalloc.h"
+#include "global.h"
+#include "retry.h"
+
+/* Message being parsed */
+struct msg {
+ const char *base;
+ unsigned long len;
+ unsigned long offset;
+ int encode;
+};
+
+/* cyrus.cache file item buffer */
+struct ibuf {
+ char *start, *end, *last;
+};
+
+/*
+ * Parsed form of a body-part
+ */
+struct body {
+ /* Content-* header information */
+ char *type;
+ char *subtype;
+ struct param *params;
+ char *id;
+ char *description;
+ char *encoding;
+ char *md5;
+ char *disposition;
+ struct param *disposition_params;
+ struct param *language;
+
+ /* Location/size information */
+ long header_offset;
+ long header_size;
+ long header_lines;
+ long content_offset;
+ long content_size;
+ long content_lines;
+ long boundary_size; /* Size of terminating boundary */
+ long boundary_lines;
+
+ int numparts; /* For multipart types */
+ struct body *subpart; /* For message/rfc822 and multipart types */
+
+ /*
+ * Other header information.
+ * Only meaningful for body-parts at top level or
+ * enclosed in message/rfc-822
+ */
+ char *date;
+ char *subject;
+ struct address *from;
+ struct address *sender;
+ struct address *reply_to;
+ struct address *to;
+ struct address *cc;
+ struct address *bcc;
+ char *in_reply_to;
+ char *message_id;
+
+ /*
+ * Cached headers. Only filled in at top-level
+ */
+ struct ibuf cacheheaders;
+};
+
+/* List of Content-type parameters */
+struct param {
+ struct param *next;
+ char *attribute;
+ char *value;
+};
+
+/* List of pending multipart boundaries */
+struct boundary {
+ char **id;
+ int count;
+ int alloc;
+};
+
+/* (draft standard) MIME tspecials */
+#define TSPECIALS "()<>@,;:\\\"/[]?="
+
+/* Default MIME Content-type */
+#define DEFAULT_CONTENT_TYPE "TEXT/PLAIN; CHARSET=us-ascii"
+
+static int message_parse_mapped P((const char *msg_base, unsigned long msg_len,
+ struct body *body));
+static int message_parse_body P((struct msg *msg,
+ int format, struct body *body,
+ char *defaultContentType,
+ struct boundary *boundaries));
+
+static int message_parse_headers P((struct msg *msg,
+ int format, struct body *body,
+ char *defaultContentType,
+ struct boundary *boundaries));
+static void message_parse_address P((char *hdr, struct address **addrp));
+static void message_parse_encoding P((char *hdr, char **hdrp));
+static void message_parse_string P((char *hdr, char **hdrp));
+static void message_parse_header P((char *hdr, struct ibuf *ibuf));
+static void message_parse_type P((char *hdr, struct body *body));
+/* static */ void message_parse_disposition P((char *hdr, struct body *body));
+static void message_parse_params P((char *hdr, struct param **paramp));
+static void message_fold_params P((struct param **paramp));
+static void message_parse_language P((char *hdr, struct param **paramp));
+static void message_parse_rfc822space P((char **s));
+
+static void message_parse_multipart P((struct msg *msg,
+ int format, struct body *body,
+ struct boundary *boundaries));
+static void message_parse_content P((struct msg *msg,
+ int format, struct body *body,
+ struct boundary *boundaries));
+
+static char *message_getline P((char *s, unsigned n, struct msg *msg));
+static int message_pendingboundary P((const char *s, char **boundaries,
+ int *boundaryct));
+
+static int message_write_cache P((int outfd, struct body *body));
+
+static void message_write_envelope P((struct ibuf *ibuf, struct body *body));
+static void message_write_body P((struct ibuf *ibuf, struct body *body,
+ int newformat));
+static void message_write_address P((struct ibuf *ibuf,
+ struct address *addrlist));
+static void message_write_nstring P((struct ibuf *ibuf, char *s));
+static void message_write_text P((struct ibuf *ibuf, char *s));
+static void message_write_number P((struct ibuf *ibuf, unsigned n));
+static void message_write_section P((struct ibuf *ibuf, struct body *body));
+static void message_write_charset P((struct ibuf *ibuf, struct body *body));
+static void message_write_bit32 P((struct ibuf *ibuf, bit32 val));
+static void message_write_searchaddr P((struct ibuf *ibuf,
+ struct address *addrlist));
+
+static void message_ibuf_init P((struct ibuf *ibuf));
+static int message_ibuf_ensure P((struct ibuf *ibuf, unsigned len));
+static void message_ibuf_iov P((struct iovec *iov, struct ibuf *ibuf));
+static void message_ibuf_free P((struct ibuf *ibuf));
+
+/*
+ * Copy a message of 'size' bytes from 'from' to 'to',
+ * ensuring minimal RFC-822 compliance.
+ *
+ * Caller must have initialized config_* routines (with cyrus_init) to read
+ * imapd.conf before calling.
+ */
+int
+message_copy_strict(from, to, size, allow_null)
+struct protstream *from;
+FILE *to;
+unsigned size;
+int allow_null;
+{
+ char buf[4096+1];
+ unsigned char *p, *endp;
+ int r = 0;
+ int n;
+ int sawcr = 0, sawnl;
+ int reject8bit = config_getswitch(IMAPOPT_REJECT8BIT);
+ int munge8bit = config_getswitch(IMAPOPT_MUNGE8BIT);
+ int inheader = 1, blankline = 1;
+
+ while (size) {
+ n = prot_read(from, buf, size > 4096 ? 4096 : size);
+ if (!n) {
+ syslog(LOG_ERR, "IOERROR: reading message: unexpected end of file");
+ return IMAP_IOERROR;
+ }
+
+ buf[n] = '\0';
+
+ /* Quick check for NUL in entire buffer, if we're not allowing it */
+ if (!allow_null && (n != strlen(buf))) {
+ r = IMAP_MESSAGE_CONTAINSNULL;
+ }
+
+ size -= n;
+ if (r) continue;
+
+ for (p = (unsigned char *)buf, endp = p + n; p < endp; p++) {
+ if (!*p && inheader) {
+ /* NUL in header is always bad */
+ r = IMAP_MESSAGE_CONTAINSNULL;
+ }
+ else if (*p == '\n') {
+ if (!sawcr && (inheader || !allow_null))
+ r = IMAP_MESSAGE_CONTAINSNL;
+ sawcr = 0;
+ if (blankline) {
+ inheader = 0;
+ }
+ blankline = 1;
+ }
+ else if (*p == '\r') {
+ sawcr = 1;
+ }
+ else {
+ sawcr = 0;
+ blankline = 0;
+ if (inheader && *p >= 0x80) {
+ if (reject8bit) {
+ /* We have been configured to reject all mail of this
+ form. */
+ if (!r) r = IMAP_MESSAGE_CONTAINS8BIT;
+ } else if (munge8bit) {
+ /* We have been configured to munge all mail of this
+ form. */
+ *p = 'X';
+ }
+ }
+ }
+ }
+
+ fwrite(buf, 1, n, to);
+ }
+
+ if (r) return r;
+ fflush(to);
+ if (ferror(to) || fsync(fileno(to))) {
+ syslog(LOG_ERR, "IOERROR: writing message: %m");
+ return IMAP_IOERROR;
+ }
+ rewind(to);
+
+ /* Go back and check headers */
+ sawnl = 1;
+ for (;;) {
+ if (!fgets(buf, sizeof(buf), to)) {
+ return sawnl ? 0 : IMAP_MESSAGE_BADHEADER;
+ }
+
+ /* End of header section */
+ if (sawnl && buf[0] == '\r') return 0;
+
+ /* Check for valid header name */
+ if (sawnl && buf[0] != ' ' && buf[0] != '\t') {
+ if (buf[0] == ':') return IMAP_MESSAGE_BADHEADER;
+ for (p = (unsigned char *)buf; *p != ':'; p++) {
+ if (*p <= ' ') return IMAP_MESSAGE_BADHEADER;
+ }
+ }
+
+ /* Used to be some 8bit checks here but those were moved above so that
+ we could do something other than refuse the message.
+ Unfortunately, we still need to look for the end of the string. */
+ for(p = (unsigned char*) buf; *p; p++);
+
+ sawnl = (p > (unsigned char *)buf) && (p[-1] == '\n');
+ }
+}
+
+/*
+ * Parse the message 'infile' in 'mailbox'. Appends the message's
+ * cache information to the mailbox's cache file and fills in
+ * appropriate information in the index record pointed to by
+ * 'message_index'.
+ *
+ * The caller MUST free the allocated body struct.
+ * If msg_base/msg_len are non-NULL, the file will remain memory-mapped
+ * and returned to the caller. The caller MUST unmap the file.
+ */
+int message_parse_file(FILE *infile,
+ const char **msg_base, unsigned long *msg_len,
+ struct body **body)
+{
+ int fd = fileno(infile);
+ struct stat sbuf;
+ const char *tmp_base;
+ unsigned long tmp_len;
+ int unmap = 0, r;
+
+ if (!msg_base) {
+ unmap = 1;
+ msg_base = &tmp_base;
+ msg_len = &tmp_len;
+ }
+ *msg_base = 0;
+ *msg_len = 0;
+
+ if (fstat(fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on new message in spool: %m");
+ fatal("can't fstat message file", EC_OSFILE);
+ }
+ map_refresh(fd, 1, msg_base, msg_len, sbuf.st_size,
+ "new message", 0);
+
+ if (!*body) *body = (struct body *) xmalloc(sizeof(struct body));
+ r = message_parse_mapped(*msg_base, *msg_len, *body);
+
+ if (unmap) map_free(msg_base, msg_len);
+
+ return r;
+}
+
+
+/*
+ * Parse the message 'infile' in 'mailbox'. Appends the message's
+ * cache information to the mailbox's cache file and fills in
+ * appropriate information in the index record pointed to by
+ * 'message_index'.
+ *
+ * The caller MUST free the allocated body struct.
+ *
+ * This function differs from message_parse_file() in that we create a
+ * writable buffer rather than memory-mapping the file, so that binary
+ * data can be encoded into the buffer. The file is rewritten upon
+ * completion.
+ *
+ * XXX can we do this with mmap()?
+ */
+int message_parse_binary_file(FILE *infile, struct body **body)
+{
+ int fd = fileno(infile);
+ struct stat sbuf;
+ struct msg msg;
+ int n;
+
+ if (fstat(fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on new message in spool: %m");
+ fatal("can't fstat message file", EC_OSFILE);
+ }
+ msg.len = sbuf.st_size;
+ msg.base = xmalloc(msg.len);
+ msg.offset = 0;
+ msg.encode = 1;
+
+ lseek(fd, 0L, SEEK_SET);
+
+ n = retry_read(fd, (char*) msg.base, msg.len);
+ if (n != msg.len) {
+ syslog(LOG_ERR, "IOERROR: reading binary file in spool: %m");
+ return IMAP_IOERROR;
+ }
+
+ if (!*body) *body = (struct body *) xmalloc(sizeof(struct body));
+ message_parse_body(&msg, MAILBOX_FORMAT_NORMAL, *body,
+ DEFAULT_CONTENT_TYPE, (struct boundary *)0);
+
+ lseek(fd, 0L, SEEK_SET);
+ n = retry_write(fd, msg.base, msg.len);
+
+ free((char*) msg.base);
+
+ if (n != msg.len || fsync(fd)) {
+ syslog(LOG_ERR, "IOERROR: rewriting binary file in spool: %m");
+ return IMAP_IOERROR;
+ }
+
+ return 0;
+}
+
+
+/*
+ * Parse the message at 'msg_base' of length 'msg_len' in 'mailbox'.
+ * Appends the message's cache information to the mailbox's cache file
+ * and fills in appropriate information in the index record pointed to
+ * by 'message_index'.
+ */
+int message_parse_mapped(const char *msg_base, unsigned long msg_len,
+ struct body *body)
+{
+ struct msg msg;
+
+ msg.base = msg_base;
+ msg.len = msg_len;
+ msg.offset = 0;
+ msg.encode = 0;
+
+ message_parse_body(&msg, MAILBOX_FORMAT_NORMAL, body,
+ DEFAULT_CONTENT_TYPE, (struct boundary *)0);
+
+ return 0;
+}
+
+static void message_find_part(struct body *body, const char *section,
+ const char **content_types,
+ const char *msg_base, unsigned long msg_len,
+ struct bodypart ***parts, int *n)
+{
+ int match;
+ const char **type;
+ char nextsection[128];
+
+ for (match = 0, type = content_types; !match && *type; type++) {
+ const char *subtype = strchr(*type, '/');
+ size_t tlen = subtype ? (subtype++ - *type) : strlen(*type);
+
+ if ((!(*type)[0] || (tlen == strlen(body->type) &&
+ !strncasecmp(body->type, *type, tlen))) &&
+ (!subtype || !subtype[0] || !strcasecmp(body->subtype, subtype))) {
+ match = 1;
+ }
+ }
+
+ if (match) {
+ /* matching part, sanity check the size against the mmap'd file */
+ if (body->content_offset + body->content_size > msg_len) {
+ syslog(LOG_ERR, "IOERROR: body part exceeds size of message file");
+ fatal("body part exceeds size of message file", EC_OSFILE);
+ }
+
+ /* grow the array and add the new part */
+ *parts = xrealloc(*parts, (*n+2)*sizeof(struct bodypart *));
+ (*parts)[*n] = xmalloc(sizeof(struct bodypart));
+ strlcpy((*parts)[*n]->section, section, sizeof((*parts)[*n]->section));
+ (*parts)[*n]->content = msg_base + body->content_offset;
+ (*parts)[*n]->encoding = body->encoding;
+ (*parts)[*n]->size = body->content_size;
+ (*parts)[++(*n)] = NULL;
+ }
+ else if (!strcmp(body->type, "MULTIPART")) {
+ int i;
+
+ for (i = 0; i < body->numparts; i++) {
+ snprintf(nextsection, sizeof(nextsection), "%s.%d", section, i+1);
+ message_find_part(&body->subpart[i], nextsection, content_types,
+ msg_base, msg_len, parts, n);
+ }
+ }
+ else if (!strcmp(body->type, "MESSAGE") &&
+ !strcmp(body->subtype, "RFC822")) {
+ snprintf(nextsection, sizeof(nextsection), "%s.1", section);
+ message_find_part(body->subpart, nextsection, content_types,
+ msg_base, msg_len, parts, n);
+ }
+}
+
+/*
+ * Fetch the bodypart(s) which match the given content_type and return
+ * them as an allocated array.
+ *
+ * The caller MUST free the array of allocated bodypart(s).
+ */
+void message_fetch_part(struct message_content *msg,
+ const char **content_types,
+ struct bodypart ***parts)
+{
+ int n = 0; /* running count of the number of matching parts */
+
+ *parts = NULL;
+ message_find_part(msg->body, "1", content_types,
+ msg->base, msg->len, parts, &n);
+}
+
+/*
+ * Appends the message's cache information to the mailbox's cache file
+ * and fills in appropriate information in the index record pointed to
+ * by 'message_index'.
+ */
+int
+message_create_record(mailbox, message_index, body)
+struct mailbox *mailbox;
+struct index_record *message_index;
+struct body *body;
+{
+ int n;
+
+ message_index->sentdate = message_parse_date(body->date, 0);
+ message_index->size = body->header_size + body->content_size;
+ message_index->header_size = body->header_size;
+ message_index->content_offset = body->content_offset;
+ message_index->content_lines = body->content_lines;
+
+ message_index->cache_offset = lseek(mailbox->cache_fd, 0, SEEK_CUR);
+
+ message_index->cache_version = MAILBOX_CACHE_MINOR_VERSION;
+
+ n = message_write_cache(mailbox->cache_fd, body);
+
+ if (n == -1) {
+ syslog(LOG_ERR, "IOERROR: appending cache for %s: %m", mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ return 0;
+}
+
+/* YYY Following used by sync_support.c. Should use message_create_record()
+ * instead now that is available?
+ *
+ * Parse the message at 'msg_base' of length 'msg_len' in 'mailbox'.
+ * Appends the message's cache information to the mailbox's cache file
+ * and fills in appropriate information in the index record pointed to
+ * by 'message_index'.
+ */
+int
+message_parse_mapped_async(msg_base, msg_len, format, cache_fd, message_index)
+const char *msg_base;
+unsigned long msg_len;
+int format;
+int cache_fd;
+struct index_record *message_index;
+{
+ struct body body;
+ struct msg msg;
+ int n;
+
+ msg.base = msg_base;
+ msg.len = msg_len;
+ msg.offset = 0;
+ msg.encode = 0;
+
+ message_parse_body(&msg, format, &body,
+ DEFAULT_CONTENT_TYPE, (struct boundary *)0);
+
+ message_index->sentdate = message_parse_date(body.date, 0);
+ message_index->size = body.header_size + body.content_size;
+ message_index->header_size = body.header_size;
+ message_index->content_offset = body.content_offset;
+
+ message_index->cache_offset = lseek(cache_fd, 0, SEEK_CUR);
+ n = message_write_cache(cache_fd, &body);
+ message_free_body(&body);
+
+ if (n == -1) {
+ syslog(LOG_ERR, "IOERROR: appending cache for sync_server: %m");
+ return IMAP_IOERROR;
+ }
+
+ return 0;
+}
+
+/*
+ * Parse a body-part
+ */
+static int
+message_parse_body(msg, format, body, defaultContentType, boundaries)
+struct msg *msg;
+int format;
+struct body *body;
+char *defaultContentType;
+struct boundary *boundaries;
+{
+ struct boundary newboundaries;
+ int sawboundary;
+
+ memset(body, 0, sizeof(struct body));
+ newboundaries.id = 0;
+
+ /* No passed-in boundary structure, create a new, empty one */
+ if (!boundaries) {
+ boundaries = &newboundaries;
+ boundaries->alloc = boundaries->count = 0;
+ /* We're at top-level--set up to store cached headers */
+ message_ibuf_init(&body->cacheheaders);
+ }
+
+ sawboundary = message_parse_headers(msg, format, body, defaultContentType,
+ boundaries);
+
+ /* Recurse according to type */
+ if (strcmp(body->type, "MULTIPART") == 0) {
+ if (!sawboundary) {
+ message_parse_multipart(msg, format, body, boundaries);
+ }
+ }
+ else if (strcmp(body->type, "MESSAGE") == 0 &&
+ strcmp(body->subtype, "RFC822") == 0) {
+ body->subpart = (struct body *)xmalloc(sizeof(struct body));
+
+ if (sawboundary) {
+ memset(body->subpart, 0, sizeof(struct body));
+ message_parse_type(DEFAULT_CONTENT_TYPE, body->subpart);
+ }
+ else {
+ message_parse_body(msg, format, body->subpart,
+ DEFAULT_CONTENT_TYPE, boundaries);
+ }
+
+ /* Calculate our size/lines information */
+ body->content_size = body->subpart->header_size +
+ body->subpart->content_size;
+ body->content_lines = body->subpart->header_lines +
+ body->subpart->content_lines;
+
+ /* Move any enclosing boundary information up to our level */
+ body->boundary_size = body->subpart->boundary_size;
+ body->boundary_lines = body->subpart->boundary_lines;
+ }
+ else {
+ if (!sawboundary) {
+ message_parse_content(msg, format, body, boundaries);
+ }
+ }
+
+ /* Free up boundary storage if necessary */
+ if (newboundaries.id) free(newboundaries.id);
+
+ return 0;
+}
+
+/*
+ * Parse the headers of a body-part
+ */
+#define HEADGROWSIZE 1000
+static int
+message_parse_headers(msg, format, body, defaultContentType,
+ boundaries)
+struct msg *msg;
+int format __attribute__((unused));
+struct body *body;
+char *defaultContentType;
+struct boundary *boundaries;
+{
+ static int alloced = 0;
+ static char *headers;
+ int left, len;
+ char *next;
+ int sawboundary = 0;
+
+ body->header_offset = msg->offset;
+
+ if (!alloced) {
+ headers = xmalloc(alloced = HEADGROWSIZE);
+ }
+
+ next = headers;
+ *next++ = '\n'; /* Leading newline to prime the pump */
+ left = alloced - 3; /* Allow for leading newline, added CR */
+ /* and trailing NUL */
+
+ /* Slurp up all of the headers into 'headers' */
+ while (message_getline(next, left, msg) &&
+ (next[-1] != '\n' ||
+ (*next != '\r' || next[1] != '\n'))) {
+
+ if (next[-1] == '\n' && *next == '-' &&
+ message_pendingboundary(next, boundaries->id, &boundaries->count)) {
+ body->boundary_size = strlen(next);
+ body->boundary_lines++;
+ if (next - 1 > headers) {
+ body->boundary_size += 2;
+ body->boundary_lines++;
+ next[-2] = '\0';
+ }
+ else {
+ *next = '\0';
+ }
+ sawboundary = 1;
+ break;
+ }
+
+ len = strlen(next);
+ left -= len;
+ next += len;
+
+ /* Allocate more header space if necessary */
+ if (left < 100) {
+ len = next - headers;
+ alloced += HEADGROWSIZE;
+ left += HEADGROWSIZE;
+ headers = xrealloc(headers, alloced);
+ next = headers + len;
+ }
+ }
+
+ body->content_offset = msg->offset;
+ body->header_size = strlen(headers+1);
+
+ /* Scan over the slurped-up headers for interesting header information */
+ body->header_lines = -1; /* Correct for leading newline */
+ for (next = headers; *next; next++) {
+ if (*next == '\n') {
+ body->header_lines++;
+
+ /* Check for headers in generic cache */
+ if (body->cacheheaders.start &&
+ (next[1] != ' ') && (next[1] != '\t') &&
+ mailbox_cached_header_inline(next+1) != BIT32_MAX) {
+ message_parse_header(next+1, &body->cacheheaders);
+ }
+
+ switch (next[1]) {
+ case 'b':
+ case 'B':
+ if (!strncasecmp(next+2, "cc:", 3)) {
+ message_parse_address(next+5, &body->bcc);
+ }
+ break;
+
+ case 'c':
+ case 'C':
+ if (!strncasecmp(next+2, "c:", 2)) {
+ message_parse_address(next+4, &body->cc);
+ }
+ if (!strncasecmp(next+2, "ontent-", 7)) {
+ switch (next[9]) {
+ case 'd':
+ case 'D':
+ if (!strncasecmp(next+10, "escription:", 11)) {
+ message_parse_string(next+21, &body->description);
+ }
+ else if (!strncasecmp(next+10, "isposition:", 11)) {
+ message_parse_disposition(next+21, body);
+ }
+ break;
+
+ case 'i':
+ case 'I':
+ if (!strncasecmp(next+10, "d:", 2)) {
+ message_parse_string(next+12, &body->id);
+ }
+ break;
+
+ case 'l':
+ case 'L':
+ if (!strncasecmp(next+10, "anguage:", 8)) {
+ message_parse_language(next+18, &body->language);
+ }
+ break;
+
+ case 'm':
+ case 'M':
+ if (!strncasecmp(next+10, "d5:", 3)) {
+ message_parse_string(next+13, &body->md5);
+ }
+ break;
+
+ case 't':
+ case 'T':
+ if (!strncasecmp(next+10, "ransfer-encoding:", 17)) {
+ message_parse_encoding(next+27, &body->encoding);
+
+ /* If we're encoding binary, replace "binary"
+ with "base64" in CTE header body */
+ if (msg->encode &&
+ !strcmp(body->encoding, "BINARY")) {
+ char *p = (char*)
+ stristr(msg->base + body->header_offset +
+ (next - headers) + 27,
+ "binary");
+ memcpy(p, "base64", 6);
+ }
+ }
+ else if (!strncasecmp(next+10, "ype:", 4)) {
+ message_parse_type(next+14, body);
+ }
+ break;
+ }
+ }
+ break;
+
+ case 'd':
+ case 'D':
+ if (!strncasecmp(next+2, "ate:", 4)) {
+ message_parse_string(next+6, &body->date);
+ }
+ break;
+
+ case 'f':
+ case 'F':
+ if (!strncasecmp(next+2, "rom:", 4)) {
+ message_parse_address(next+6, &body->from);
+ }
+ break;
+
+ case 'i':
+ case 'I':
+ if (!strncasecmp(next+2, "n-reply-to:", 11)) {
+ message_parse_string(next+13, &body->in_reply_to);
+ }
+ break;
+
+ case 'm':
+ case 'M':
+ if (!strncasecmp(next+2, "essage-id:", 10)) {
+ message_parse_string(next+12, &body->message_id);
+ }
+ break;
+
+ case 'r':
+ case 'R':
+ if (!strncasecmp(next+2, "eply-to:", 8)) {
+ message_parse_address(next+10, &body->reply_to);
+ }
+
+ break;
+
+ case 's':
+ case 'S':
+ if (!strncasecmp(next+2, "ubject:", 7)) {
+ message_parse_string(next+9, &body->subject);
+ }
+ if (!strncasecmp(next+2, "ender:", 6)) {
+ message_parse_address(next+8, &body->sender);
+ }
+ break;
+
+ case 't':
+ case 'T':
+ if (!strncasecmp(next+2, "o:", 2)) {
+ message_parse_address(next+4, &body->to);
+ }
+ break;
+ } /* switch(next[1]) */
+ } /* if (*next == '\n') */
+ }
+
+ /* If didn't find Content-Type: header, use the passed-in default type */
+ if (!body->type) {
+ message_parse_type(defaultContentType, body);
+ }
+ return sawboundary;
+}
+
+/*
+ * Parse a list of RFC-822 addresses from a header, appending them
+ * to the address list pointed to by 'addrp'.
+ */
+static void
+message_parse_address(hdr, addrp)
+char *hdr;
+struct address **addrp;
+{
+ char *hdrend, hdrendchar = '\0';
+
+ /* Find end of header */
+ hdrend = hdr;
+ do {
+ hdrend = strchr(hdrend+1, '\n');
+ } while (hdrend && (hdrend[1] == ' ' || hdrend[1] == '\t'));
+
+ /* Put a NUL character at the end of header */
+ if (hdrend) {
+ if (hdrend > hdr && hdrend[-1] == '\r') hdrend--;
+ hdrendchar = *hdrend;
+ *hdrend = '\0';
+ }
+
+ parseaddr_list(hdr, addrp);
+
+ /* Put character at end of header back */
+ if (hdrend) *hdrend = hdrendchar;
+}
+
+/*
+ * Parse a Content-Transfer-Encoding from a header.
+ */
+static void
+message_parse_encoding(hdr, hdrp)
+char *hdr;
+char **hdrp;
+{
+ int len;
+ char *p;
+
+ /* Ignore if we already saw one of these headers */
+ if (*hdrp) return;
+
+ /* Skip leading whitespace, ignore header if blank */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Find end of encoding token */
+ for (p = hdr; *p && !isspace((int) *p) && *p != '('; p++) {
+ if (*p < ' ' || strchr(TSPECIALS, *p)) return;
+ }
+ len = p - hdr;
+
+ /* Skip trailing whitespace, ignore header if trailing garbage */
+ message_parse_rfc822space(&p);
+ if (p) return;
+
+ /* Save encoding token */
+ *hdrp = xmalloc(len + 1);
+ strlcpy(*hdrp, hdr, len + 1);
+ for (p = *hdrp; *p; p++) {
+ if (islower((int) *p)) *p = toupper((int) *p);
+ }
+}
+
+/*
+ * Parse an uninterpreted header
+ */
+static void
+message_parse_string(hdr, hdrp)
+char *hdr;
+char **hdrp;
+{
+ int len;
+ char *hdrend;
+
+ /* Ignore if we already saw one of these headers */
+ if (*hdrp) return;
+
+ /* Skip initial whitespace */
+ while (*hdr == ' ' || *hdr == '\t') hdr++;
+
+ /* Find end of header */
+ hdrend = hdr;
+ do {
+ hdrend = strchr(hdrend+1, '\n');
+ } while (hdrend && (hdrend[1] == ' ' || hdrend[1] == '\t'));
+ if (hdrend) {
+ if (hdrend > hdr && hdrend[-1] == '\r') hdrend--;
+ }
+ else {
+ hdrend = hdr + strlen(hdr);
+ }
+
+ /* Save header value */
+ len = hdrend - hdr;
+ *hdrp = xmalloc(len + 1);
+ strlcpy(*hdrp, hdr, len + 1);
+
+ /* Un-fold header (overlapping buffers, use memmove) */
+ hdrend = *hdrp;
+ while ((hdrend = strchr(hdrend, '\n'))!=NULL) {
+ if (hdrend > *hdrp && hdrend[-1] == '\r') {
+ hdrend--;
+ memmove(hdrend, hdrend+2, strlen(hdrend+2)+1);
+ }
+ else {
+ memmove(hdrend, hdrend+1, strlen(hdrend+1)+1);
+ }
+ }
+}
+
+/*
+ * Cache a header
+ */
+static void
+message_parse_header(hdr, ibuf)
+char *hdr;
+struct ibuf *ibuf;
+{
+ int len;
+ char *hdrend;
+
+ /* Find end of header */
+ hdrend = hdr;
+ do {
+ hdrend = strchr(hdrend+1, '\n');
+ } while (hdrend && (hdrend[1] == ' ' || hdrend[1] == '\t'));
+ if (hdrend) {
+ if (hdrend > hdr && hdrend[-1] == '\r') hdrend--;
+ }
+ else {
+ hdrend = hdr + strlen(hdr);
+ }
+
+ /* Save header value */
+ len = hdrend - hdr;
+ message_ibuf_ensure(ibuf, len+2);
+ strncpy(ibuf->end, hdr, len);
+ ibuf->end += len;
+ *(ibuf->end)++ = '\r';
+ *(ibuf->end)++ = '\n';
+}
+
+/*
+ * Parse a Content-Type from a header.
+ */
+static void
+message_parse_type(hdr, body)
+char *hdr;
+struct body *body;
+{
+ char *type;
+ int typelen;
+ char *subtype;
+ int subtypelen;
+ char *p;
+
+ /* Ignore if we already saw one of these headers */
+ if (body->type) return;
+
+ /* Skip leading whitespace, ignore header if blank */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Find end of type token */
+ type = hdr;
+ for (; *hdr && !isspace((int) *hdr) && *hdr != '/' && *hdr != '('; hdr++) {
+ if (*hdr < ' ' || strchr(TSPECIALS, *hdr)) return;
+ }
+ typelen = hdr - type;
+
+ /* Skip whitespace after type */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Ignore header if no '/' character */
+ if (*hdr++ != '/') return;
+
+ /* Skip whitespace before subtype, ignore header if no subtype */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Find end of subtype token */
+ subtype = hdr;
+ for (; *hdr && !isspace((int) *hdr) && *hdr != ';' && *hdr != '('; hdr++) {
+ if (*hdr < ' ' || strchr(TSPECIALS, *hdr)) return;
+ }
+ subtypelen = hdr - subtype;
+
+ /* Skip whitespace after subtype */
+ message_parse_rfc822space(&hdr);
+
+ /* Ignore header if not at end of header or parameter delimiter */
+ if (hdr && *hdr != ';') return;
+
+ /* Save content type & subtype */
+ body->type = xmalloc(typelen + 1);
+ strlcpy(body->type, type, typelen + 1);
+ for (p = body->type; *p; p++) {
+ if (islower((int) *p)) *p = toupper((int) *p);
+ }
+ body->subtype = xmalloc(subtypelen + 1);
+ strlcpy(body->subtype, subtype, subtypelen + 1);
+ for (p = body->subtype; *p; p++) {
+ if (islower((int) *p)) *p = toupper((int) *p);
+ }
+
+ /* Parse parameter list */
+ if (hdr) {
+ message_parse_params(hdr+1, &body->params);
+ message_fold_params(&body->params);
+ }
+}
+
+/*
+ * Parse a Content-Disposition from a header.
+ */
+/* static */ void
+message_parse_disposition(hdr, body)
+char *hdr;
+struct body *body;
+{
+ char *disposition;
+ int dispositionlen;
+ char *p;
+
+ /* Ignore if we already saw one of these headers */
+ if (body->disposition) return;
+
+ /* Skip leading whitespace, ignore header if blank */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Find end of disposition token */
+ disposition = hdr;
+ for (; *hdr && !isspace((int) *hdr) && *hdr != ';' && *hdr != '('; hdr++) {
+ if (*hdr < ' ' || strchr(TSPECIALS, *hdr)) return;
+ }
+ dispositionlen = hdr - disposition;
+
+ /* Skip whitespace after type */
+ message_parse_rfc822space(&hdr);
+
+ /* Ignore header if not at end of header or parameter delimiter */
+ if (hdr && *hdr != ';') return;
+
+ /* Save content disposition */
+ body->disposition = xmalloc(dispositionlen + 1);
+ strlcpy(body->disposition, disposition, dispositionlen + 1);
+
+ for (p = body->disposition; *p; p++) {
+ if (islower((int) *p)) *p = toupper((int) *p);
+ }
+
+ /* Parse parameter list */
+ if (hdr) {
+ message_parse_params(hdr+1, &body->disposition_params);
+ message_fold_params(&body->disposition_params);
+ }
+}
+
+/*
+ * Parse a parameter list from a header
+ */
+static void
+message_parse_params(hdr, paramp)
+char *hdr;
+struct param **paramp;
+{
+ struct param *param;
+ char *attribute;
+ int attributelen;
+ char *value;
+ int valuelen;
+ char *p;
+
+ for (;;) {
+ /* Skip over leading whitespace */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Find end of attribute */
+ attribute = hdr;
+ for (; *hdr && !isspace((int) *hdr) && *hdr != '=' && *hdr != '('; hdr++) {
+ if (*hdr < ' ' || strchr(TSPECIALS, *hdr)) return;
+ }
+ attributelen = hdr - attribute;
+
+ /* Skip whitespace after attribute */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Ignore param if no '=' character */
+ if (*hdr++ != '=') return;
+
+ /* Skip whitespace before value */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Find end of value */
+ value = hdr;
+ if (*hdr == '\"') {
+ hdr++;
+ while (*hdr && *hdr != '\"') {
+ if (*hdr == '\\') {
+ hdr++;
+ if (!*hdr) return;
+ }
+ if (*hdr == '\r') {
+ if (hdr[1] == '\n' && (hdr[2] == ' ' || hdr[2] == '\t')) hdr += 2;
+ else return;
+ }
+ hdr++;
+ }
+ if (!*hdr++) return;
+ }
+ else {
+ for (; *hdr && !isspace((int) *hdr) && *hdr != ';' && *hdr != '('; hdr++) {
+ if (*hdr < ' ' || strchr(TSPECIALS, *hdr)) return;
+ }
+ }
+ valuelen = hdr - value;
+
+ /* Skip whitespace after value */
+ message_parse_rfc822space(&hdr);
+
+ /* Ignore parameter if not at end of header or parameter delimiter */
+ if (hdr && *hdr++ != ';') return;
+
+ /* Save attribute/value pair */
+ *paramp = param = (struct param *)xmalloc(sizeof(struct param));
+ memset(param, 0, sizeof(struct param));
+ param->attribute = xmalloc(attributelen + 1);
+ strlcpy(param->attribute, attribute, attributelen + 1);
+
+ for (p = param->attribute; *p; p++) {
+ if (islower((int) *p)) *p = toupper((int) *p);
+ }
+ param->value = xmalloc(valuelen + 1);
+ if (*value == '\"') {
+ p = param->value;
+ value++;
+ while (*value != '\"') {
+ if (*value == '\\') value++;
+ else if (*value == '\r') value += 2;
+ *p++ = *value++;
+ }
+ *p = '\0';
+ }
+ else {
+ strlcpy(param->value, value, valuelen + 1);
+ }
+
+ /* Get ready to parse the next parameter */
+ paramp = ¶m->next;
+ }
+}
+
+/* Alphabet for hex encoding */
+static char basis_hex[] = "0123456789ABCDEF";
+
+/*
+ * Decode RFC-2231 parameter continuations
+ *
+ * Algorithm: Run down the list of parameters looking for
+ * an attribute of the form "foo*0" or "foo*0*". When we find
+ * such an attribute, we look for "foo*1"/"foo*1*", "foo*2"/"foo*2*"
+ * etc, appending each value to that of "foo*0" and then removing the
+ * parameter we just appended from the list. When appending values,
+ * if either parameter has extended syntax, we have to convert the other
+ * value from simple to extended syntax. At the end, we change the name
+ * of "foo*0"/"foo*0*" to either "foo" or "foo*", depending on whether
+ * the value has extended syntax or not.
+ */
+static void
+message_fold_params(struct param **params)
+{
+ struct param *thisparam; /* The "foo*1" param we're folding */
+ struct param **continuation; /* Pointer to the "foo*2" param */
+ struct param *tmpparam; /* Placeholder for removing "foo*2" */
+ char *asterisk;
+ int section;
+ int is_extended;
+ char sectionbuf[5];
+ int attributelen, sectionbuflen;
+ char *from, *to;
+
+ for (thisparam = *params; thisparam; thisparam = thisparam->next) {
+ asterisk = strchr(thisparam->attribute, '*');
+ if (asterisk && asterisk[1] == '0' &&
+ (!asterisk[2] || (asterisk[2] == '*' && !asterisk[3]))) {
+ /* An initial section. Find and collect the rest */
+ is_extended = (asterisk[2] == '*');
+ *asterisk = '\0';
+ attributelen = asterisk - thisparam->attribute;
+ section = 1;
+ for (;;) {
+ if (section == 100) break;
+ sectionbuf[0] = '*';
+ if (section > 9) {
+ sectionbuf[1] = section/10 + '0';
+ sectionbuf[2] = section%10 + '0';
+ sectionbuf[3] = '\0';
+ sectionbuflen = 3;
+ }
+ else {
+ sectionbuf[1] = section + '0';
+ sectionbuf[2] = '\0';
+ sectionbuflen = 2;
+ }
+
+ /* Find the next continuation */
+ for (continuation = params; *continuation;
+ continuation = &((*continuation)->next)) {
+ if (!strncmp((*continuation)->attribute, thisparam->attribute,
+ attributelen) &&
+ !strncmp((*continuation)->attribute + attributelen,
+ sectionbuf, sectionbuflen) &&
+ ((*continuation)->attribute[attributelen+sectionbuflen] == '\0' ||
+ ((*continuation)->attribute[attributelen+sectionbuflen] == '*' && (*continuation)->attribute[attributelen+sectionbuflen+1] == '\0'))) {
+ break;
+ }
+ }
+
+ /* No more continuations to find */
+ if (!*continuation) break;
+
+ if ((*continuation)->attribute[attributelen+sectionbuflen] == '\0') {
+ /* Continuation is simple */
+ if (is_extended) {
+ /* Have to re-encode continuation value */
+ thisparam->value =
+ xrealloc(thisparam->value,
+ strlen(thisparam->value) +
+ 3*strlen((*continuation)->value) + 1);
+ from = (*continuation)->value;
+ to = thisparam->value + strlen(thisparam->value);
+ while (*from) {
+ if (*from <= ' ' || *from >= 0x7f ||
+ *from == '*' || *from == '\'' ||
+ *from == '%' || strchr(TSPECIALS, *from)) {
+ *to++ = '%';
+ *to++ = basis_hex[(*from>>4) & 0xf];
+ *to++ = basis_hex[*from & 0xf];
+ } else {
+ *to++ = *from;
+ }
+ from++;
+ }
+ *to++ = '\0';
+ }
+ else {
+ thisparam->value =
+ xrealloc(thisparam->value,
+ strlen(thisparam->value) +
+ strlen((*continuation)->value) + 1);
+ from = (*continuation)->value;
+ to = thisparam->value + strlen(thisparam->value);
+ while ((*to++ = *from++)!= 0)
+ { }
+ }
+ }
+ else {
+ /* Continuation is extended */
+ if (is_extended) {
+ thisparam->value =
+ xrealloc(thisparam->value,
+ strlen(thisparam->value) +
+ strlen((*continuation)->value) + 1);
+ from = (*continuation)->value;
+ to = thisparam->value + strlen(thisparam->value);
+ while ((*to++ = *from++) != 0)
+ { }
+ }
+ else {
+ /* Have to re-encode thisparam value */
+ char *tmpvalue =
+ xmalloc(2 + 3*strlen(thisparam->value) +
+ strlen((*continuation)->value) + 1);
+
+ from = thisparam->value;
+ to = tmpvalue;
+ *to++ = '\''; /* Unspecified charset */
+ *to++ = '\''; /* Unspecified language */
+ while (*from) {
+ if (*from <= ' ' || *from >= 0x7f ||
+ *from == '*' || *from == '\'' ||
+ *from == '%' || strchr(TSPECIALS, *from)) {
+ *to++ = '%';
+ *to++ = basis_hex[(*from>>4) & 0xf];
+ *to++ = basis_hex[*from & 0xf];
+ } else {
+ *to++ = *from;
+ }
+ from++;
+ }
+ from = (*continuation)->value;
+
+ while ((*to++ = *from++)!=0)
+ { }
+
+ free(thisparam->value);
+ thisparam->value = tmpvalue;
+ is_extended = 1;
+ }
+ }
+
+ /* Remove unneeded continuation */
+ free((*continuation)->attribute);
+ free((*continuation)->value);
+ tmpparam = *continuation;
+ *continuation = (*continuation)->next;
+ free(tmpparam);
+ section++;
+ }
+
+ /* Fix up attribute name */
+ if (is_extended) {
+ asterisk[0] = '*';
+ asterisk[1] = '\0';
+ } else {
+ asterisk[0] = '\0';
+ }
+ }
+ }
+}
+
+
+/*
+ * Parse a language list from a header
+ */
+static void
+message_parse_language(hdr, paramp)
+char *hdr;
+struct param **paramp;
+{
+ struct param *param;
+ char *value;
+ int valuelen;
+ char *p;
+
+ for (;;) {
+ /* Skip over leading whitespace */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Skip whitespace before value */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) return;
+
+ /* Find end of value */
+ value = hdr;
+ for (; *hdr && !isspace((int) *hdr) && *hdr != ',' && *hdr != '('; hdr++) {
+ if (*hdr != '-' && !isalpha(((int) *hdr))) return;
+ }
+ valuelen = hdr - value;
+
+ /* Skip whitespace after value */
+ message_parse_rfc822space(&hdr);
+
+ /* Ignore parameter if not at end of header or language delimiter */
+ if (hdr && *hdr++ != ',') return;
+
+ /* Save value pair */
+ *paramp = param = (struct param *)xmalloc(sizeof(struct param));
+ memset(param, 0, sizeof(struct param));
+ param->value = xmalloc(valuelen + 1);
+ strlcpy(param->value, value, valuelen + 1);
+
+ for (p = param->value; *p; p++) {
+ if (islower((int) *p)) *p = toupper((int) *p);
+ }
+
+ /* Get ready to parse the next parameter */
+ paramp = ¶m->next;
+ }
+}
+
+/*
+ * Parse a RFC-822 date from a header.
+ * Only parses to day granularity--ignores the time of day.
+ */
+time_t
+message_parse_date(hdr, flags)
+char *hdr;
+unsigned flags;
+{
+ struct tm tm;
+ time_t t;
+ char month[4];
+ static char *monthname[] = {
+ "jan", "feb", "mar", "apr", "may", "jun",
+ "jul", "aug", "sep", "oct", "nov", "dec"
+ };
+ int zone_off = 0;
+
+ if (!hdr) goto baddate;
+
+ memset(&tm, 0, sizeof(tm));
+
+ message_parse_rfc822space(&hdr);
+ if (!hdr) goto baddate;
+
+ if (isalpha((int) *hdr)) {
+ /* Day name -- skip over it */
+ hdr++;
+ if (!isalpha((int) *hdr)) goto baddate;
+ hdr++;
+ if (!isalpha((int) *hdr)) goto baddate;
+ hdr++;
+ message_parse_rfc822space(&hdr);
+ if (!hdr || *hdr++ != ',') goto baddate;
+ message_parse_rfc822space(&hdr);
+ if (!hdr) goto baddate;
+ }
+
+ if (!isdigit((int) *hdr)) goto baddate;
+ tm.tm_mday = *hdr++ - '0';
+ if (isdigit((int) *hdr)) {
+ tm.tm_mday = tm.tm_mday*10 + *hdr++ - '0';
+ }
+
+ /* Parse month name */
+ message_parse_rfc822space(&hdr);
+ if (!hdr) goto baddate;
+ month[0] = *hdr++;
+ if (!isalpha((int) month[0])) goto baddate;
+ month[1] = *hdr++;
+ if (!isalpha((int) month[1])) goto baddate;
+ month[2] = *hdr++;
+ if (!isalpha((int) month[2])) goto baddate;
+ month[3] = '\0';
+ lcase(month);
+ for (tm.tm_mon = 0; tm.tm_mon < 12; tm.tm_mon++) {
+ if (!strcmp(month, monthname[tm.tm_mon])) break;
+ }
+ if (tm.tm_mon == 12) goto baddate;
+
+ /* Parse year */
+ message_parse_rfc822space(&hdr);
+ if (!hdr || !isdigit((int) *hdr)) goto baddate;
+ tm.tm_year = *hdr++ - '0';
+ if (!isdigit((int) *hdr)) goto baddate;
+ tm.tm_year = tm.tm_year * 10 + *hdr++ - '0';
+ if (isdigit((int) *hdr)) {
+ if (tm.tm_year < 19) goto baddate;
+ tm.tm_year -= 19;
+ tm.tm_year = tm.tm_year * 10 + *hdr++ - '0';
+ if (!isdigit((int) *hdr)) goto baddate;
+ tm.tm_year = tm.tm_year * 10 + *hdr++ - '0';
+ } else {
+ if (tm.tm_year < 70) {
+ /* two-digit year, probably after 2000.
+ * This patent was overturned, right?
+ */
+ tm.tm_year += 100;
+ }
+ }
+ if (isdigit((int) *hdr)) {
+ /* five-digit date */
+ goto baddate;
+ }
+
+ message_parse_rfc822space(&hdr);
+ if (hdr && (flags & PARSE_TIME)) {
+ /* Parse hour */
+ if (!hdr || !isdigit((int) *hdr)) goto badtime;
+ tm.tm_hour = *hdr++ - '0';
+ if (!isdigit((int) *hdr)) goto badtime;
+ tm.tm_hour = tm.tm_hour * 10 + *hdr++ - '0';
+ if (!hdr || *hdr++ != ':') goto badtime;
+
+ /* Parse min */
+ if (!hdr || !isdigit((int) *hdr)) goto badtime;
+ tm.tm_min = *hdr++ - '0';
+ if (!isdigit((int) *hdr)) goto badtime;
+ tm.tm_min = tm.tm_min * 10 + *hdr++ - '0';
+
+ if (*hdr == ':') {
+ /* Parse sec */
+ if (!++hdr || !isdigit((int) *hdr)) goto badtime;
+ tm.tm_sec = *hdr++ - '0';
+ if (!isdigit((int) *hdr)) goto badtime;
+ tm.tm_sec = tm.tm_sec * 10 + *hdr++ - '0';
+ }
+
+ message_parse_rfc822space(&hdr);
+ if (hdr && (flags & PARSE_ZONE)) {
+ /* Parse timezone offset */
+ if (*hdr == '+' || *hdr == '-') {
+ /* Parse numeric offset */
+ int east = (*hdr++ == '-');
+
+ if (!hdr || !isdigit((int) *hdr)) goto badzone;
+ zone_off = *hdr++ - '0';
+ if (!hdr || !isdigit((int) *hdr)) goto badzone;
+ zone_off = zone_off * 10 + *hdr++ - '0';
+ if (!hdr || !isdigit((int) *hdr)) goto badzone;
+ zone_off = zone_off * 6 + *hdr++ - '0';
+ if (!hdr || !isdigit((int) *hdr)) goto badzone;
+ zone_off = zone_off * 10 + *hdr++ - '0';
+
+ if (east) zone_off = -zone_off;
+ }
+ else if (isalpha((unsigned char) *hdr)) {
+ char zone[4];
+
+ zone[0] = *hdr++;
+ if (!isalpha((unsigned char) *hdr)) {
+ /* Parse military (single-char) zone */
+ zone[1] = '\0';
+ lcase(zone);
+ if (zone[0] < 'j')
+ zone_off = (zone[0] - 'a' + 1) * 60;
+ else if (zone[0] == 'j')
+ goto badzone;
+ else if (zone[0] <= 'm')
+ zone_off = (zone[0] - 'a') * 60;
+ else if (zone[0] < 'z')
+ zone_off = ('m' - zone[0]) * 60;
+ else
+ zone_off = 0;
+ }
+ else {
+ zone[1] = *hdr++;
+ if (!isalpha((unsigned char) *hdr)) {
+ /* Parse UT (universal time) */
+ zone[2] = '\0';
+ lcase(zone);
+ if (strcmp(zone, "ut")) goto badzone;
+ zone_off = 0;
+ }
+ else {
+ /* Parse 3-char time zone */
+ char *p;
+
+ zone[2] = *hdr;
+ zone[3] = '\0';
+ lcase(zone);
+ /* GMT (Greenwich mean time) */
+ if (!strcmp(zone, "gmt")) zone_off = 0;
+
+ /* US time zone */
+ else {
+ p = strchr("aecmpyhb", zone[0]);
+ if (!p || zone[2] != 't') goto badzone;
+ zone_off = (strlen(p) - 12) * 60;
+ if (zone[1] == 'd') zone_off += 60;
+ else if (zone[1] != 's') goto badzone;
+ }
+ }
+ }
+ }
+ else
+ badzone:
+ zone_off = 0;
+ }
+ }
+ else
+ badtime:
+ tm.tm_hour = 12;
+
+ tm.tm_isdst = -1;
+
+ t = mktime(&tm);
+ /* Don't return -1; it's never right. Return the current time instead.
+ * That's much closer than 1969.
+ */
+ if (t >= 0) return (t - zone_off * 60);
+
+ baddate:
+ return time(0);
+}
+
+/*
+ * Skip over RFC-822 whitespace and comments
+ */
+static void
+message_parse_rfc822space(s)
+char **s;
+{
+ char *p = *s;
+ int commentlevel = 0;
+
+ if (!p) return;
+ while (*p && (isspace((int) *p) || *p == '(')) {
+ if (*p == '\n') {
+ p++;
+ if (*p != ' ' && *p != '\t') {
+ *s = 0;
+ return;
+ }
+ }
+ else if (*p == '(') {
+ p++;
+ commentlevel++;
+ while (commentlevel) {
+ switch (*p) {
+ case '\n':
+ p++;
+ if (*p == ' ' || *p == '\t') break;
+ /* FALL THROUGH */
+ case '\0':
+ *s = 0;
+ return;
+
+ case '\\':
+ p++;
+ break;
+
+ case '(':
+ commentlevel++;
+ break;
+
+ case ')':
+ commentlevel--;
+ break;
+ }
+ p++;
+ }
+ }
+ else p++;
+ }
+ if (*p == 0) {
+ *s = 0;
+ }
+ else {
+ *s = p;
+ }
+}
+
+/*
+ * Parse the content of a MIME multipart body-part
+ */
+static void
+message_parse_multipart(msg, format, body, boundaries)
+struct msg *msg;
+int format;
+struct body *body;
+struct boundary *boundaries;
+{
+ struct body preamble, epilogue;
+ struct param *boundary;
+ char *defaultContentType = DEFAULT_CONTENT_TYPE;
+ int i, depth;
+
+ memset(&preamble, 0, sizeof(struct body));
+ memset(&epilogue, 0, sizeof(struct body));
+ if (strcmp(body->subtype, "DIGEST") == 0) {
+ defaultContentType = "MESSAGE/RFC822";
+ }
+
+ /* Find boundary id */
+ boundary = body->params;
+ while(boundary && strcmp(boundary->attribute, "BOUNDARY") != 0) {
+ boundary = boundary->next;
+ }
+
+ if (!boundary) {
+ /* Invalid MIME--treat as zero-part multipart */
+ message_parse_content(msg, format, body, boundaries);
+ return;
+ }
+
+ /* Expand boundaries array if necessary */
+ if (boundaries->count == boundaries->alloc) {
+ boundaries->alloc += 20;
+ boundaries->id = (char **)xrealloc((char *)boundaries->id,
+ boundaries->alloc * sizeof(char *));
+ }
+
+ /* Add the new boundary id */
+ boundaries->id[boundaries->count++] = boundary->value;
+ depth = boundaries->count;
+
+ /* Parse preamble */
+ message_parse_content(msg, format, &preamble, boundaries);
+
+ /* Parse the component body-parts */
+ while (boundaries->count == depth) {
+ body->subpart = (struct body *)xrealloc((char *)body->subpart,
+ (body->numparts+1)*sizeof(struct body));
+ message_parse_body(msg, format, &body->subpart[body->numparts++],
+ defaultContentType, boundaries);
+ if (msg->offset == msg->len &&
+ body->subpart[body->numparts-1].boundary_size == 0) {
+ /* hit the end of the message, therefore end all pending
+ multiparts */
+ boundaries->count = 0;
+ }
+ }
+
+ if (boundaries->count == depth-1) {
+ /* Parse epilogue */
+ message_parse_content(msg, format, &epilogue, boundaries);
+ }
+ else if (body->numparts) {
+ /*
+ * We hit the boundary of an enclosing multipart while parsing
+ * a component body-part. Move the enclosing boundary information
+ * up to our level.
+ */
+ body->boundary_size = body->subpart[body->numparts-1].boundary_size;
+ body->boundary_lines = body->subpart[body->numparts-1].boundary_lines;
+ body->subpart[body->numparts-1].boundary_size = 0;
+ body->subpart[body->numparts-1].boundary_lines = 0;
+ }
+ else {
+ /*
+ * We hit the boundary of an enclosing multipart while parsing
+ * the preamble. Move the enclosing boundary information
+ * up to our level.
+ */
+ body->boundary_size = preamble.boundary_size;
+ body->boundary_lines = preamble.boundary_lines;
+ preamble.boundary_size = 0;
+ preamble.boundary_lines = 0;
+ }
+
+ /*
+ * Calculate our size/lines information
+ */
+ body->content_size = preamble.content_size + preamble.boundary_size;
+ body->content_lines = preamble.content_lines + preamble.boundary_lines;
+ for (i=0; i< body->numparts; i++) {
+ body->content_size += body->subpart[i].header_size +
+ body->subpart[i].content_size +
+ body->subpart[i].boundary_size;
+ body->content_lines += body->subpart[i].header_lines +
+ body->subpart[i].content_lines +
+ body->subpart[i].boundary_lines;
+ }
+ body->content_size += epilogue.content_size;
+ body->content_lines += epilogue.content_lines;
+
+ /*
+ * Move any enclosing boundary information up to our level.
+ */
+ body->boundary_size += epilogue.boundary_size;
+ body->boundary_lines += epilogue.boundary_lines;
+}
+
+/*
+ * Parse the content of a generic body-part
+ */
+static void
+message_parse_content(msg, format, body, boundaries)
+struct msg *msg;
+int format __attribute__((unused));
+struct body *body;
+struct boundary *boundaries;
+{
+ const char *line, *endline;
+ unsigned long s_offset = msg->offset;
+ int encode;
+ int len;
+
+ /* Should we encode a binary part? */
+ encode = msg->encode &&
+ body->encoding && !strcasecmp(body->encoding, "binary");
+
+ while (msg->offset < msg->len) {
+ line = msg->base + msg->offset;
+ endline = memchr(line, '\n', msg->len - msg->offset);
+ if (endline) {
+ endline++;
+ }
+ else {
+ endline = msg->base + msg->len;
+ }
+ len = endline - line;
+ msg->offset += len;
+
+ if (line[0] == '-' && line[1] == '-' &&
+ message_pendingboundary(line, boundaries->id, &boundaries->count)) {
+ body->boundary_size = len;
+ body->boundary_lines++;
+ if (body->content_lines) {
+ body->content_lines--;
+ body->boundary_lines++;
+ }
+ if (body->content_size) {
+ body->content_size -= 2;
+ body->boundary_size += 2;
+ }
+ break;
+ }
+
+ body->content_size += len;
+
+ /* Count the content lines, unless we're encoding
+ (we always count blank lines) */
+ if (endline[-1] == '\n' &&
+ (!encode || line[0] == '\r')) {
+ body->content_lines++;
+ }
+ }
+
+ if (encode) {
+ int b64_size, b64_lines, delta;
+
+ /* Determine encoded size */
+ charset_encode_mimebody(NULL, body->content_size, NULL,
+ &b64_size, NULL);
+
+ delta = b64_size - body->content_size;
+
+ /* Realloc buffer to accomodate encoding overhead */
+ msg->base = xrealloc((char*) msg->base, msg->len + delta);
+
+ /* Shift content and remaining data by delta */
+ memmove((char*) msg->base + s_offset + delta, msg->base + s_offset,
+ msg->len - s_offset);
+
+ /* Encode content into buffer at current position */
+ charset_encode_mimebody(msg->base + s_offset + delta,
+ body->content_size,
+ (char*) msg->base + s_offset,
+ NULL, &b64_lines);
+
+ /* Adjust buffer position and length to account for encoding */
+ msg->offset += delta;
+ msg->len += delta;
+
+ /* Adjust body structure to account for encoding */
+ strcpy(body->encoding, "BASE64");
+ body->content_size = b64_size;
+ body->content_lines += b64_lines;
+ }
+}
+
+
+/*
+ * Read a line from 'msg' (or at most 'n' characters) into 's'
+ */
+static char *
+message_getline(s, n, msg)
+char *s;
+unsigned n;
+struct msg *msg;
+{
+ char *rval = s;
+
+ if (n == 0) return 0;
+ n--; /* Allow for terminating nul */
+
+ while (msg->offset < msg->len && n--) {
+ if ((*s++ = msg->base[msg->offset++]) == '\n') break;
+ }
+ *s = '\0';
+
+ if (s == rval) return 0;
+ return rval;
+}
+
+
+/*
+ * Return nonzero if s is an enclosing boundary delimiter.
+ * If we hit a terminating boundary, the integer pointed to by
+ * 'boundaryct' is modified appropriately.
+ */
+static int message_pendingboundary(s, boundaries, boundaryct)
+const char *s;
+char **boundaries;
+int *boundaryct;
+{
+ int i, len;
+ int rfc2046_strict = config_getswitch(IMAPOPT_RFC2046_STRICT);
+
+ if (s[0] != '-' || s[1] != '-') return(0);
+ s+=2;
+
+ for (i=0; i < *boundaryct; ++i) {
+ len = strlen(boundaries[i]);
+ if (!strncmp(s, boundaries[i], len)) {
+ if (s[len] == '-' && s[len+1] == '-') *boundaryct = i;
+ else if (!rfc2046_strict && s[len] && !isspace((int) s[len])) {
+ /* Allow substring matches in the boundary.
+ *
+ * If rfc2046_strict is enabled, boundaries containing
+ * other boundaries as substrings will be treated as identical
+ * (per RFC 2046 section 5.1.1). Note that this will
+ * break some messages created by Eudora 5.1 (and earlier).
+ */
+ continue;
+ }
+ return(1);
+ }
+ }
+ return(0);
+}
+
+/*
+ * Write the cache information for the message parsed to 'body'
+ * to 'outfile'.
+ */
+static int
+message_write_cache(outfd, body)
+int outfd;
+struct body *body;
+{
+ struct ibuf section, envelope, bodystructure, oldbody;
+ struct ibuf from, to, cc, bcc, subject;
+ struct body toplevel;
+ int n;
+ struct iovec iov[15];
+ char* t;
+
+ toplevel.type = "MESSAGE";
+ toplevel.subtype = "RFC822";
+ toplevel.subpart = body;
+
+ message_ibuf_init(&envelope);
+ message_write_envelope(&envelope, body);
+
+ message_ibuf_init(&bodystructure);
+ message_write_body(&bodystructure, body, 1);
+
+ message_ibuf_init(&oldbody);
+ message_write_body(&oldbody, body, 0);
+
+ message_ibuf_init(§ion);
+ message_write_section(§ion, &toplevel);
+
+ message_ibuf_init(&from);
+ message_write_searchaddr(&from, body->from);
+
+ message_ibuf_init(&to);
+ message_write_searchaddr(&to, body->to);
+
+ message_ibuf_init(&cc);
+ message_write_searchaddr(&cc, body->cc);
+
+ message_ibuf_init(&bcc);
+ message_write_searchaddr(&bcc, body->bcc);
+
+ message_ibuf_init(&subject);
+ t = charset_decode_mimeheader(body->subject, NULL, 0);
+ message_write_nstring(&subject, t);
+ free(t);
+
+ message_ibuf_iov(&iov[0], &envelope);
+ message_ibuf_iov(&iov[1], &bodystructure);
+ message_ibuf_iov(&iov[2], &oldbody);
+ message_ibuf_iov(&iov[3], §ion);
+ message_ibuf_iov(&iov[4], &body->cacheheaders);
+ message_ibuf_iov(&iov[5], &from);
+ message_ibuf_iov(&iov[6], &to);
+ message_ibuf_iov(&iov[7], &cc);
+ message_ibuf_iov(&iov[8], &bcc);
+ message_ibuf_iov(&iov[9], &subject);
+
+ n = retry_writev(outfd, iov, 10);
+
+ message_ibuf_free(&envelope);
+ message_ibuf_free(&bodystructure);
+ message_ibuf_free(&oldbody);
+ message_ibuf_free(§ion);
+ message_ibuf_free(&from);
+ message_ibuf_free(&to);
+ message_ibuf_free(&cc);
+ message_ibuf_free(&bcc);
+ message_ibuf_free(&subject);
+
+ return n;
+}
+
+/* Append character 'c' to 'ibuf' */
+#define PUTIBUF(ibuf,c) (((void)((ibuf)->end<(ibuf)->last || message_ibuf_ensure((ibuf),1))),(*((ibuf)->end)++ = (c)))
+
+/*
+ * Write the IMAP envelope for 'body' to 'ibuf'
+ */
+static void
+message_write_envelope(ibuf, body)
+struct ibuf *ibuf;
+struct body *body;
+{
+ PUTIBUF(ibuf, '(');
+ message_write_nstring(ibuf, body->date);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, body->subject);
+ PUTIBUF(ibuf, ' ');
+ message_write_address(ibuf, body->from);
+ PUTIBUF(ibuf, ' ');
+ message_write_address(ibuf, body->sender ? body->sender : body->from);
+ PUTIBUF(ibuf, ' ');
+ message_write_address(ibuf, body->reply_to ? body->reply_to : body->from);
+ PUTIBUF(ibuf, ' ');
+ message_write_address(ibuf, body->to);
+ PUTIBUF(ibuf, ' ');
+ message_write_address(ibuf, body->cc);
+ PUTIBUF(ibuf, ' ');
+ message_write_address(ibuf, body->bcc);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, body->in_reply_to);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, body->message_id);
+ PUTIBUF(ibuf, ')');
+}
+
+/*
+ * Write the BODY (if 'newformat' is zero) or BODYSTRUCTURE
+ * (if 'newformat' is nonzero) for 'body' to 'ibuf'.
+ */
+static void
+message_write_body(ibuf, body, newformat)
+struct ibuf *ibuf;
+struct body *body;
+int newformat;
+{
+ struct param *param;
+
+ if (strcmp(body->type, "MULTIPART") == 0) {
+ int i;
+
+ /* 0-part multiparts are illegal--convert to 0-len text parts */
+ if (body->numparts == 0) {
+ static struct body zerotextbody;
+
+ if (!zerotextbody.type) {
+ message_parse_type(DEFAULT_CONTENT_TYPE, &zerotextbody);
+ }
+ message_write_body(ibuf, &zerotextbody, newformat);
+ return;
+ }
+
+ /* Multipart types get a body_multipart */
+ PUTIBUF(ibuf, '(');
+ for (i = 0; i < body->numparts; i++) {
+ message_write_body(ibuf, &body->subpart[i], newformat);
+ }
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, body->subtype);
+
+ if (newformat) {
+ PUTIBUF(ibuf, ' ');
+ if ((param = body->params)!=NULL) {
+ PUTIBUF(ibuf, '(');
+ while (param) {
+ message_write_nstring(ibuf, param->attribute);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, param->value);
+ if ((param = param->next)!=NULL) {
+ PUTIBUF(ibuf, ' ');
+ }
+ }
+ PUTIBUF(ibuf, ')');
+ }
+ else message_write_nstring(ibuf, (char *)0);
+ PUTIBUF(ibuf, ' ');
+ if (body->disposition) {
+ PUTIBUF(ibuf, '(');
+ message_write_nstring(ibuf, body->disposition);
+ PUTIBUF(ibuf, ' ');
+ if ((param = body->disposition_params)!=NULL) {
+ PUTIBUF(ibuf, '(');
+ while (param) {
+ message_write_nstring(ibuf, param->attribute);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, param->value);
+ if ((param = param->next)!=NULL) {
+ PUTIBUF(ibuf, ' ');
+ }
+ }
+ PUTIBUF(ibuf, ')');
+ }
+ else message_write_nstring(ibuf, (char *)0);
+ PUTIBUF(ibuf, ')');
+ }
+ else {
+ message_write_nstring(ibuf, (char *)0);
+ }
+ PUTIBUF(ibuf, ' ');
+ if ((param = body->language)!=NULL) {
+ PUTIBUF(ibuf, '(');
+ while (param) {
+ message_write_nstring(ibuf, param->value);
+ if ((param = param->next)!=NULL) {
+ PUTIBUF(ibuf, ' ');
+ }
+ }
+ PUTIBUF(ibuf, ')');
+ }
+ else message_write_nstring(ibuf, (char *)0);
+ }
+
+ PUTIBUF(ibuf, ')');
+ return;
+ }
+
+ PUTIBUF(ibuf, '(');
+ message_write_nstring(ibuf, body->type);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, body->subtype);
+ PUTIBUF(ibuf, ' ');
+
+ if ((param = body->params)!=NULL) {
+ PUTIBUF(ibuf, '(');
+ while (param) {
+ message_write_nstring(ibuf, param->attribute);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, param->value);
+ if ((param = param->next)!=NULL) {
+ PUTIBUF(ibuf, ' ');
+ }
+ }
+ PUTIBUF(ibuf, ')');
+ }
+ else message_write_nstring(ibuf, (char *)0);
+ PUTIBUF(ibuf, ' ');
+
+ message_write_nstring(ibuf, body->id);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, body->description);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, body->encoding ? body->encoding : "7BIT");
+ PUTIBUF(ibuf, ' ');
+ message_write_number(ibuf, body->content_size);
+
+ if (strcmp(body->type, "TEXT") == 0) {
+ /* Text types get a line count */
+ PUTIBUF(ibuf, ' ');
+ message_write_number(ibuf, body->content_lines);
+ }
+ else if (strcmp(body->type, "MESSAGE") == 0
+ && strcmp(body->subtype, "RFC822") == 0) {
+ /* Message/rfc822 gets a body_msg */
+ PUTIBUF(ibuf, ' ');
+ message_write_envelope(ibuf, body->subpart);
+ PUTIBUF(ibuf, ' ');
+ message_write_body(ibuf, body->subpart, newformat);
+ PUTIBUF(ibuf, ' ');
+ message_write_number(ibuf, body->content_lines);
+ }
+
+ if (newformat) {
+ /* Add additional fields for BODYSTRUCTURE */
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, body->md5);
+ PUTIBUF(ibuf, ' ');
+ if (body->disposition) {
+ PUTIBUF(ibuf, '(');
+ message_write_nstring(ibuf, body->disposition);
+ PUTIBUF(ibuf, ' ');
+ if ((param = body->disposition_params)!=NULL) {
+ PUTIBUF(ibuf, '(');
+ while (param) {
+ message_write_nstring(ibuf, param->attribute);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, param->value);
+ if ((param = param->next)!=NULL) {
+ PUTIBUF(ibuf, ' ');
+ }
+ }
+ PUTIBUF(ibuf, ')');
+ }
+ else message_write_nstring(ibuf, (char *)0);
+ PUTIBUF(ibuf, ')');
+ }
+ else {
+ message_write_nstring(ibuf, (char *)0);
+ }
+ PUTIBUF(ibuf, ' ');
+ if ((param = body->language)!=NULL) {
+ PUTIBUF(ibuf, '(');
+ while (param) {
+ message_write_nstring(ibuf, param->value);
+ if ((param = param->next)!=NULL) {
+ PUTIBUF(ibuf, ' ');
+ }
+ }
+ PUTIBUF(ibuf, ')');
+ }
+ else message_write_nstring(ibuf, (char *)0);
+ }
+
+ PUTIBUF(ibuf, ')');
+}
+
+/*
+ * Write the address list 'addrlist' to 'ibuf'
+ */
+static void
+message_write_address(ibuf, addrlist)
+struct ibuf *ibuf;
+struct address *addrlist;
+{
+ /* If no addresses, write out NIL */
+ if (!addrlist) {
+ message_write_nstring(ibuf, (char *)0);
+ return;
+ }
+
+ PUTIBUF(ibuf, '(');
+
+ while (addrlist) {
+ PUTIBUF(ibuf, '(');
+ message_write_nstring(ibuf, addrlist->name);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, addrlist->route);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, addrlist->mailbox);
+ PUTIBUF(ibuf, ' ');
+ message_write_nstring(ibuf, addrlist->domain);
+ PUTIBUF(ibuf, ')');
+ addrlist = addrlist->next;
+ }
+
+ PUTIBUF(ibuf, ')');
+}
+
+/*
+ * Write the nil-or-string 's' to 'ibuf'
+ */
+static void
+message_write_nstring(ibuf, s)
+struct ibuf *ibuf;
+char *s;
+{
+ char *p;
+ int len = 0;
+
+ /* Write null pointer as NIL */
+ if (!s) {
+ message_ibuf_ensure(ibuf, 3);
+ *(ibuf->end)++ = 'N';
+ *(ibuf->end)++ = 'I';
+ *(ibuf->end)++ = 'L';
+ return;
+ }
+
+ /* Look for any non-QCHAR characters */
+ for (p = s; *p; p++) {
+ len++;
+ if (*p & 0x80 || *p == '\r' || *p == '\n'
+ || *p == '\"' || *p == '%' || *p == '\\') break;
+ }
+
+ if (*p || len >= 1024) {
+ /* Write out as literal */
+ char buf[100];
+ snprintf(buf, sizeof(buf), "{%u}\r\n", strlen(s));
+ message_ibuf_ensure(ibuf, strlen(s)+strlen(buf));
+ for (p = buf; *p; p++) *(ibuf->end)++ = *p;
+ for (p = s; *p; p++) *(ibuf->end)++ = *p;
+ }
+ else {
+ /* Write out as quoted string */
+ message_ibuf_ensure(ibuf, strlen(s)+2);
+ *(ibuf->end)++ = '\"';
+ for (p = s; *p; p++) *(ibuf->end)++ = *p;
+ *(ibuf->end)++ = '\"';
+ }
+}
+
+/*
+ * Write the text 's' to 'ibuf'
+ */
+static void
+message_write_text(ibuf, s)
+struct ibuf *ibuf;
+char *s;
+{
+ char *p;
+
+ message_ibuf_ensure(ibuf, strlen(s));
+ for (p = s; *p; p++) *(ibuf->end)++ = *p;
+}
+
+/*
+ * Write out the IMAP number 'n' to 'ibuf'
+ */
+static void
+message_write_number(ibuf, n)
+struct ibuf *ibuf;
+unsigned n;
+{
+ char buf[100], *p;
+
+ snprintf(buf, sizeof(buf), "%u", n);
+
+ message_ibuf_ensure(ibuf, strlen(buf));
+ for (p = buf; *p; p++) *(ibuf->end)++ = *p;
+}
+
+/*
+ * Write out the FETCH BODY[section] location/size information to 'ibuf'.
+ */
+static void
+message_write_section(ibuf, body)
+struct ibuf *ibuf;
+struct body *body;
+{
+ int part;
+
+ if (strcmp(body->type, "MESSAGE") == 0
+ && strcmp(body->subtype, "RFC822") == 0) {
+ if (body->subpart->numparts) {
+ /*
+ * Part 0 of a message/rfc822 is the message header/text.
+ * Nested parts of a message/rfc822 containing a multipart
+ * are the sub-parts of the multipart.
+ */
+ message_write_bit32(ibuf, body->subpart->numparts+1);
+ message_write_bit32(ibuf, body->subpart->header_offset);
+ message_write_bit32(ibuf, body->subpart->header_size);
+ message_write_bit32(ibuf, body->subpart->content_offset);
+ message_write_bit32(ibuf, body->subpart->content_size);
+ message_write_bit32(ibuf, (-1<<16)|ENCODING_NONE);
+ for (part = 0; part < body->subpart->numparts; part++) {
+ message_write_bit32(ibuf, body->subpart->subpart[part].header_offset);
+ message_write_bit32(ibuf, body->subpart->subpart[part].header_size);
+ message_write_bit32(ibuf, body->subpart->subpart[part].content_offset);
+ if (body->subpart->subpart[part].numparts == 0 &&
+ strcmp(body->subpart->subpart[part].type, "MULTIPART") == 0) {
+ /* Treat 0-part multipart as 0-length text */
+ message_write_bit32(ibuf, 0);
+ }
+ else {
+ message_write_bit32(ibuf, body->subpart->subpart[part].content_size);
+ }
+ message_write_charset(ibuf, &body->subpart->subpart[part]);
+ }
+ for (part = 0; part < body->subpart->numparts; part++) {
+ message_write_section(ibuf, &body->subpart->subpart[part]);
+ }
+ }
+ else {
+ /*
+ * Part 0 of a message/rfc822 is the message header/text.
+ * Part 1 of a message/rfc822 containing a non-multipart
+ * is the message body.
+ */
+ message_write_bit32(ibuf, 2);
+ message_write_bit32(ibuf, body->subpart->header_offset);
+ message_write_bit32(ibuf, body->subpart->header_size);
+ message_write_bit32(ibuf, body->subpart->content_offset);
+ message_write_bit32(ibuf, body->subpart->content_size);
+ message_write_bit32(ibuf, (-1<<16)|ENCODING_NONE);
+ message_write_bit32(ibuf, body->subpart->header_offset);
+ message_write_bit32(ibuf, body->subpart->header_size);
+ message_write_bit32(ibuf, body->subpart->content_offset);
+ if (strcmp(body->subpart->type, "MULTIPART") == 0) {
+ /* Treat 0-part multipart as 0-length text */
+ message_write_bit32(ibuf, 0);
+ message_write_bit32(ibuf, (-1<<16)|ENCODING_NONE);
+ }
+ else {
+ message_write_bit32(ibuf, body->subpart->content_size);
+ message_write_charset(ibuf, body->subpart);
+ }
+ message_write_section(ibuf, body->subpart);
+ }
+ }
+ else if (body->numparts) {
+ /*
+ * Cannot fetch part 0 of a multipart.
+ * Nested parts of a multipart are the sub-parts.
+ */
+ message_write_bit32(ibuf, body->numparts+1);
+ message_write_bit32(ibuf, 0);
+ message_write_bit32(ibuf, -1);
+ message_write_bit32(ibuf, 0);
+ message_write_bit32(ibuf, -1);
+ message_write_bit32(ibuf, (-1<<16)|ENCODING_NONE);
+ for (part = 0; part < body->numparts; part++) {
+ message_write_bit32(ibuf, body->subpart[part].header_offset);
+ message_write_bit32(ibuf, body->subpart[part].header_size);
+ message_write_bit32(ibuf, body->subpart[part].content_offset);
+ if (body->subpart[part].numparts == 0 &&
+ strcmp(body->subpart[part].type, "MULTIPART") == 0) {
+ /* Treat 0-part multipart as 0-length text */
+ message_write_bit32(ibuf, 0);
+ message_write_bit32(ibuf, (-1<<16)|ENCODING_NONE);
+ }
+ else {
+ message_write_bit32(ibuf, body->subpart[part].content_size);
+ message_write_charset(ibuf, &body->subpart[part]);
+ }
+ }
+ for (part = 0; part < body->numparts; part++) {
+ message_write_section(ibuf, &body->subpart[part]);
+ }
+ }
+ else {
+ /*
+ * Leaf section--no part 0 or nested parts
+ */
+ message_write_bit32(ibuf, 0);
+ }
+}
+
+/*
+ * Write the 32-bit charset/encoding value for section 'body' to 'ibuf'
+ */
+static void
+message_write_charset(ibuf, body)
+struct ibuf *ibuf;
+struct body *body;
+{
+ int encoding, charset;
+ struct param *param;
+
+ if (!body->encoding) encoding = ENCODING_NONE;
+ else {
+ switch (body->encoding[0]) {
+ case '7':
+ case '8':
+ if (!strcmp(body->encoding+1, "BIT")) encoding = ENCODING_NONE;
+ else encoding = ENCODING_UNKNOWN;
+ break;
+
+ case 'B':
+ if (!strcmp(body->encoding, "BASE64")) encoding = ENCODING_BASE64;
+ else if (!strcmp(body->encoding, "BINARY"))
+ encoding = ENCODING_NONE;
+ else encoding = ENCODING_UNKNOWN;
+ break;
+
+ case 'Q':
+ if (!strcmp(body->encoding, "QUOTED-PRINTABLE"))
+ encoding = ENCODING_QP;
+ else encoding = ENCODING_UNKNOWN;
+ break;
+
+ default:
+ encoding = ENCODING_UNKNOWN;
+ }
+ }
+
+ if (!body->type || !strcmp(body->type, "TEXT")) {
+ charset = 0; /* Default is us-ascii */
+ for (param = body->params; param; param = param->next) {
+ if (!strcasecmp(param->attribute, "charset")) {
+ charset = charset_lookupname(param->value);
+ break;
+ }
+ }
+ message_write_bit32(ibuf, (charset<<16)|encoding);
+ }
+ else if (!strcmp(body->type, "MESSAGE")) {
+ if (!strcmp(body->subtype, "RFC822")) {
+ message_write_bit32(ibuf, (-1<<16)|ENCODING_NONE);
+ }
+ else {
+ message_write_bit32(ibuf, (0<<16)|ENCODING_NONE);
+ }
+ }
+ else {
+ message_write_bit32(ibuf, (-1<<16)|encoding);
+ }
+}
+
+/*
+ * Write the 32-bit integer quantitiy 'val' to 'ibuf'
+ */
+static void
+message_write_bit32(ibuf, val)
+struct ibuf *ibuf;
+bit32 val;
+{
+ bit32 buf;
+ int i;
+ char *p = (char *)&buf;
+
+ message_ibuf_ensure(ibuf, sizeof(bit32));
+ buf = htonl(val);
+
+ for (i=0; i < sizeof(bit32); i++) {
+ *(ibuf->end)++ = *p++;
+ }
+}
+
+/*
+ * Unparse the address list 'addrlist' to 'ibuf'
+ */
+static void
+message_write_searchaddr(ibuf, addrlist)
+struct ibuf *ibuf;
+struct address *addrlist;
+{
+ int prevaddr = 0;
+ char* tmp;
+
+ while (addrlist) {
+
+ /* Handle RFC-822 group addresses */
+ if (!addrlist->domain) {
+ if (addrlist->mailbox) {
+ if (prevaddr) PUTIBUF(ibuf, ',');
+
+ tmp = charset_decode_mimeheader(addrlist->mailbox, NULL, 0);
+ message_write_text(ibuf, tmp);
+ free(tmp);
+ tmp = NULL;
+ PUTIBUF(ibuf, ':');
+
+ /* Suppress a trailing comma */
+ prevaddr = 0;
+ }
+ else {
+ PUTIBUF(ibuf, ';');
+ prevaddr = 1;
+ }
+ }
+ else {
+ if (prevaddr) PUTIBUF(ibuf, ',');
+
+ if (addrlist->name) {
+ tmp = charset_decode_mimeheader(addrlist->name, NULL, 0);
+ message_write_text(ibuf, tmp);
+ free(tmp); tmp = NULL;
+ PUTIBUF(ibuf, ' ');
+ }
+
+ PUTIBUF(ibuf, '<');
+ if (addrlist->route) {
+ lcase(addrlist->route);
+ message_write_text(ibuf, addrlist->route);
+ PUTIBUF(ibuf, ':');
+ }
+
+ lcase(addrlist->mailbox);
+ message_write_text(ibuf, addrlist->mailbox);
+ PUTIBUF(ibuf, '@');
+
+ lcase(addrlist->domain);
+ message_write_text(ibuf, addrlist->domain);
+ PUTIBUF(ibuf, '>');
+ prevaddr = 1;
+ }
+
+ addrlist = addrlist->next;
+ }
+}
+
+/*
+ * Initialize 'ibuf'
+ */
+#define IBUFGROWSIZE 1000
+static void
+message_ibuf_init(ibuf)
+struct ibuf *ibuf;
+{
+ char *s = xmalloc(IBUFGROWSIZE);
+
+ ibuf->start = ibuf->end = s + sizeof(bit32);
+ ibuf->last = ibuf->start + IBUFGROWSIZE - sizeof(bit32);
+}
+
+/*
+ * Ensure 'ibuf' has enough free space to append 'len' bytes.
+ */
+static int
+message_ibuf_ensure(struct ibuf *ibuf,
+ unsigned len)
+{
+ char *s;
+ int size;
+
+ if (ibuf->last - ibuf->end >= len) return 0;
+ if (len < IBUFGROWSIZE) len = IBUFGROWSIZE;
+
+ s = ibuf->start - sizeof(bit32);
+ size = len + (ibuf->last - ibuf->start);
+ s = xrealloc(s, size + sizeof(bit32));
+ s += sizeof(bit32);
+ ibuf->end = (ibuf->end - ibuf->start) + s;
+ ibuf->start = s;
+ ibuf->last = s + size;
+
+ return 1;
+}
+
+/*
+ * Set up 'iov' to write the data for 'ibuf'.
+ */
+static void
+message_ibuf_iov(iov, ibuf)
+struct iovec *iov;
+struct ibuf *ibuf;
+{
+ char *s;
+ int len;
+
+ /* Drop padding on end */
+ message_ibuf_ensure(ibuf, 3);
+ ibuf->end[0] = '\0';
+ ibuf->end[1] = '\0';
+ ibuf->end[2] = '\0';
+
+ len = (ibuf->end - ibuf->start);
+ s = ibuf->start - sizeof(bit32);
+ *((bit32 *)s) = htonl(len);
+
+ iov->iov_base = s;
+ iov->iov_len = (len+sizeof(bit32)+3) & ~3;
+}
+
+/*
+ * Free the space used by 'ibuf'
+ */
+static void
+message_ibuf_free(ibuf)
+struct ibuf *ibuf;
+{
+ free(ibuf->start - sizeof(bit32));
+}
+
+/*
+ * Free the parsed body-part 'body'
+ */
+void
+message_free_body(body)
+struct body *body;
+{
+ struct param *param, *nextparam;
+ int part;
+
+ if (body->type) {
+ free(body->type);
+ free(body->subtype);
+ for (param = body->params; param; param = nextparam) {
+ nextparam = param->next;
+ free(param->attribute);
+ free(param->value);
+ free(param);
+ }
+ }
+ if (body->id) free(body->id);
+ if (body->description) free(body->description);
+ if (body->encoding) free(body->encoding);
+ if (body->md5) free(body->md5);
+ if (body->disposition) {
+ free(body->disposition);
+ for (param = body->disposition_params; param; param = nextparam) {
+ nextparam = param->next;
+ free(param->attribute);
+ free(param->value);
+ free(param);
+ }
+ }
+ for (param = body->language; param; param = nextparam) {
+ nextparam = param->next;
+ free(param->value);
+ free(param);
+ }
+ if (body->date) free(body->date);
+ if (body->subject) free(body->subject);
+ if (body->from) parseaddr_free(body->from);
+ if (body->sender) parseaddr_free(body->sender);
+ if (body->reply_to) parseaddr_free(body->reply_to);
+ if (body->to) parseaddr_free(body->to);
+ if (body->cc) parseaddr_free(body->cc);
+ if (body->bcc) parseaddr_free(body->bcc);
+ if (body->in_reply_to) free(body->in_reply_to);
+ if (body->message_id) free(body->message_id);
+
+ if (body->subpart) {
+ if (body->numparts) {
+ for (part=0; part < body->numparts; part++) {
+ message_free_body(&body->subpart[part]);
+ }
+ }
+ else {
+ message_free_body(body->subpart);
+ }
+ free(body->subpart);
+ }
+ if (body->cacheheaders.start) {
+ message_ibuf_free(&body->cacheheaders);
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/message.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,104 @@
+/* message.h -- Message parsing
+ $Id: message.h,v 1.6.4.6 2006/03/09 22:39:36 murch Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+
+ */
+#ifndef INCLUDED_MESSAGE_H
+#define INCLUDED_MESSAGE_H
+
+#ifndef P
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+#endif
+
+#include <stdio.h>
+
+#include "prot.h"
+#include "mailbox.h"
+
+extern int message_copy_strict P((struct protstream *from, FILE *to,
+ unsigned size, int allow_null));
+
+/* Flags for parsing message date/time - to be bitwise OR'd */
+#define PARSE_DATE (1<<0)
+#define PARSE_TIME (1<<1)
+#define PARSE_ZONE (1<<2)
+
+extern time_t message_parse_date P((char *hdr, unsigned flags));
+
+/* declare this here so it can be used externally, but remain opaque */
+struct body;
+
+struct message_content {
+ const char *base; /* memory mapped file */
+ unsigned long len;
+ struct body *body; /* parsed body structure */
+};
+
+/* MUST keep this struct sync'd with sieve_bodypart in sieve_interface.h */
+struct bodypart {
+ char section[128];
+ const char *content;
+ const char *encoding;
+ unsigned long size;
+};
+
+extern int message_parse_binary_file P((FILE *infile, struct body **body));
+extern int message_parse_file P((FILE *infile,
+ const char **msg_base, unsigned long *msg_len,
+ struct body **body));
+extern void message_fetch_part P((struct message_content *msg,
+ const char **content_types,
+ struct bodypart ***parts));
+extern int message_create_record P((struct mailbox *mailbox,
+ struct index_record *message_index,
+ struct body *body));
+extern void message_free_body P((struct body *body));
+
+extern int
+message_parse_mapped_async P((const char *msg_base, unsigned long msg_len,
+ int format, int cache_fd,
+ struct index_record *message_index));
+
+#endif /* INCLUDED_MESSAGE_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,677 @@
+/* mupdate-client.c -- cyrus murder database clients
+ *
+ * $Id: mupdate-client.c,v 1.38.2.12 2006/03/15 18:56:30 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <signal.h>
+#include <ctype.h>
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+#include <syslog.h>
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include "assert.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "imparse.h"
+#include "iptostring.h"
+#include "mupdate.h"
+#include "prot.h"
+#include "protocol.h"
+#include "xmalloc.h"
+
+const char service_name[] = "mupdate";
+
+static sasl_security_properties_t *make_secprops(void)
+{
+ sasl_security_properties_t *ret =
+ (sasl_security_properties_t *) xzmalloc(sizeof(sasl_security_properties_t));
+
+ ret->maxbufsize = PROT_BUFSIZE;
+ ret->min_ssf = config_getint(IMAPOPT_SASL_MINIMUM_LAYER);
+ ret->max_ssf = config_getint(IMAPOPT_SASL_MAXIMUM_LAYER);
+
+ return ret;
+}
+
+int mupdate_connect(const char *server, const char *port,
+ mupdate_handle **handle,
+ sasl_callback_t *cbs)
+{
+ mupdate_handle *h = NULL;
+ int local_cbs = 0;
+
+ if(!handle)
+ return MUPDATE_BADPARAM;
+
+ /* open connection to 'server' */
+ if(!server) {
+ server = config_mupdate_server;
+ if (server == NULL) {
+ fatal("couldn't get mupdate server name", EC_UNAVAILABLE);
+ }
+ }
+
+ h = xzmalloc(sizeof(mupdate_handle));
+ *handle = h;
+
+ if(!cbs) {
+ local_cbs = 1;
+ cbs = mysasl_callbacks(config_getstring(IMAPOPT_MUPDATE_USERNAME),
+ config_getstring(IMAPOPT_MUPDATE_AUTHNAME),
+ config_getstring(IMAPOPT_MUPDATE_REALM),
+ config_getstring(IMAPOPT_MUPDATE_PASSWORD));
+ }
+
+ h->conn = backend_connect(NULL, server, &protocol[PROTOCOL_MUPDATE],
+ "", cbs, NULL);
+
+ /* xxx unclear that this is correct, but it prevents a memory leak */
+ if (local_cbs) free_callbacks(cbs);
+
+ if (!h->conn) {
+ return MUPDATE_NOCONN;
+ }
+
+ h->saslcompleted = 1;
+
+ /* SUCCESS */
+ return 0;
+}
+
+void mupdate_disconnect(mupdate_handle **hp)
+{
+ mupdate_handle *h;
+
+ if(!hp || !(*hp)) return;
+ h = *hp;
+
+ backend_disconnect(h->conn);
+ free(h->conn);
+
+ freebuf(&(h->tag));
+ freebuf(&(h->cmd));
+ freebuf(&(h->arg1));
+ freebuf(&(h->arg2));
+ freebuf(&(h->arg3));
+
+ if(h->acl_buf) free(h->acl_buf);
+
+ free(h);
+ *hp = NULL;
+}
+
+/* We're really only looking for an OK or NO or BAD here -- and the callback
+ * is never called in those cases. So if the callback is called, we have
+ * an error! */
+static int mupdate_scarf_one(struct mupdate_mailboxdata *mdata __attribute__((unused)),
+ const char *cmd,
+ void *context __attribute__((unused)))
+{
+ syslog(LOG_ERR, "mupdate_scarf_one was called, but shouldn't be. Command recieved was %s", cmd);
+ return -1;
+}
+
+int mupdate_activate(mupdate_handle *handle,
+ const char *mailbox, const char *server,
+ const char *acl)
+{
+ int ret;
+ enum mupdate_cmd_response response;
+
+ if (!handle) return MUPDATE_BADPARAM;
+ if (!mailbox || !server || !acl) return MUPDATE_BADPARAM;
+ if (!handle->saslcompleted) return MUPDATE_NOAUTH;
+
+ if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_REPLICATED) {
+ /* we don't care about the server part, everything is local */
+ const char *part = strchr(server, '!');
+
+ if (part) server = part + 1;
+ }
+
+ prot_printf(handle->conn->out,
+ "X%u ACTIVATE {%d+}\r\n%s {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ handle->tagn++, strlen(mailbox), mailbox,
+ strlen(server), server, strlen(acl), acl);
+
+ ret = mupdate_scarf(handle, mupdate_scarf_one, NULL, 1, &response);
+ if (ret) {
+ return ret;
+ } else if (response != MUPDATE_OK) {
+ return MUPDATE_FAIL;
+ } else {
+ return 0;
+ }
+}
+
+int mupdate_reserve(mupdate_handle *handle,
+ const char *mailbox, const char *server)
+{
+ int ret;
+ enum mupdate_cmd_response response;
+
+ if (!handle) return MUPDATE_BADPARAM;
+ if (!mailbox || !server) return MUPDATE_BADPARAM;
+ if (!handle->saslcompleted) return MUPDATE_NOAUTH;
+
+ if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_REPLICATED) {
+ /* we don't care about the server part, everything is local */
+ const char *part = strchr(server, '!');
+
+ if (part) server = part + 1;
+ }
+
+ prot_printf(handle->conn->out,
+ "X%u RESERVE {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ handle->tagn++, strlen(mailbox), mailbox,
+ strlen(server), server);
+
+ ret = mupdate_scarf(handle, mupdate_scarf_one, NULL, 1, &response);
+ if (ret) {
+ return ret;
+ } else if (response != MUPDATE_OK) {
+ return MUPDATE_FAIL_RESERVE;
+ } else {
+ return 0;
+ }
+}
+
+int mupdate_deactivate(mupdate_handle *handle,
+ const char *mailbox, const char *server)
+{
+ int ret;
+ enum mupdate_cmd_response response;
+
+ if (!handle) return MUPDATE_BADPARAM;
+ if (!mailbox || !server) return MUPDATE_BADPARAM;
+ if (!handle->saslcompleted) return MUPDATE_NOAUTH;
+
+ if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_REPLICATED) {
+ /* we don't care about the server part, everything is local */
+ const char *part = strchr(server, '!');
+
+ if (part) server = part + 1;
+ }
+
+ prot_printf(handle->conn->out,
+ "X%u DEACTIVATE {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ handle->tagn++, strlen(mailbox), mailbox,
+ strlen(server), server);
+
+ ret = mupdate_scarf(handle, mupdate_scarf_one, NULL, 1, &response);
+ if (ret) {
+ return ret;
+ } else if (response != MUPDATE_OK) {
+ return MUPDATE_FAIL_RESERVE;
+ } else {
+ return 0;
+ }
+}
+
+int mupdate_delete(mupdate_handle *handle,
+ const char *mailbox)
+{
+ int ret;
+ enum mupdate_cmd_response response;
+
+ if (!handle) return MUPDATE_BADPARAM;
+ if (!mailbox) return MUPDATE_BADPARAM;
+ if (!handle->saslcompleted) return MUPDATE_NOAUTH;
+
+ prot_printf(handle->conn->out,
+ "X%u DELETE {%d+}\r\n%s\r\n", handle->tagn++,
+ strlen(mailbox), mailbox);
+
+ ret = mupdate_scarf(handle, mupdate_scarf_one, NULL, 1, &response);
+ if (ret) {
+ return ret;
+ } else if (response != MUPDATE_OK) {
+ return MUPDATE_FAIL;
+ } else {
+ return 0;
+ }
+}
+
+
+static int mupdate_find_cb(struct mupdate_mailboxdata *mdata,
+ const char *cmd, void *context)
+{
+ struct mupdate_handle_s *h = (struct mupdate_handle_s *)context;
+
+ if(!h || !cmd || !mdata) return 1;
+
+ /* coyp the data to the handle storage */
+ /* xxx why can't we just point to the 'mdata' buffers? */
+ strlcpy(h->mailbox_buf, mdata->mailbox, sizeof(h->mailbox_buf));
+ strlcpy(h->server_buf, mdata->server, sizeof(h->server_buf));
+
+ if(!strncmp(cmd, "MAILBOX", 7)) {
+ int len = strlen(mdata->acl) + 1;
+
+ h->mailboxdata_buf.t = ACTIVE;
+
+ if(len > h->acl_buf_len) {
+ /* we want to at least double the buffer */
+ if (len < 2 * h->acl_buf_len) {
+ len = 2 * h->acl_buf_len;
+ }
+
+ h->acl_buf = xrealloc(h->acl_buf, len);
+ strcpy(h->acl_buf, mdata->acl);
+ }
+ } else if (!strncmp(cmd, "RESERVE", 7)) {
+ h->mailboxdata_buf.t = RESERVE;
+ if(!h->acl_buf) {
+ h->acl_buf = xstrdup("");
+ h->acl_buf_len = 1;
+ } else {
+ h->acl_buf[0] = '\0';
+ }
+ } else {
+ /* Bad command */
+ return 1;
+ }
+
+ h->mailboxdata_buf.mailbox = h->mailbox_buf;
+ h->mailboxdata_buf.server = h->server_buf;
+ h->mailboxdata_buf.acl = h->acl_buf;
+
+ return 0;
+}
+
+int mupdate_find(mupdate_handle *handle, const char *mailbox,
+ struct mupdate_mailboxdata **target)
+{
+ int ret;
+ enum mupdate_cmd_response response;
+
+ if(!handle || !mailbox || !target) return MUPDATE_BADPARAM;
+
+ prot_printf(handle->conn->out,
+ "X%u FIND {%d+}\r\n%s\r\n", handle->tagn++,
+ strlen(mailbox), mailbox);
+
+ memset(&(handle->mailboxdata_buf), 0, sizeof(handle->mailboxdata_buf));
+
+ ret = mupdate_scarf(handle, mupdate_find_cb, handle, 1, &response);
+
+ /* note that the response is still OK even if there was no data returned,
+ * so we have to make sure we actually filled in the data too */
+ if (!ret && response == MUPDATE_OK && handle->mailboxdata_buf.mailbox) {
+ *target = &(handle->mailboxdata_buf);
+ return 0;
+ } else if(!ret && response == MUPDATE_OK) {
+ /* it looked okay, but we didn't get a mailbox */
+ *target = NULL;
+ return MUPDATE_MAILBOX_UNKNOWN;
+ } else {
+ /* Something Bad happened */
+ *target = NULL;
+ return ret ? ret : MUPDATE_FAIL;
+ }
+}
+
+int mupdate_list(mupdate_handle *handle, mupdate_callback callback,
+ const char *prefix, void *context)
+{
+ int ret;
+ enum mupdate_cmd_response response;
+
+ if(!handle || !callback) return MUPDATE_BADPARAM;
+
+ if(prefix) {
+ prot_printf(handle->conn->out,
+ "X%u LIST {%d+}\r\n%s\r\n", handle->tagn++,
+ strlen(prefix), prefix);
+ } else {
+ prot_printf(handle->conn->out,
+ "X%u LIST\r\n", handle->tagn++);
+ }
+
+ ret = mupdate_scarf(handle, callback, context, 1, &response);
+
+ if (ret) {
+ return ret;
+ } else if (response != MUPDATE_OK) {
+ return MUPDATE_FAIL;
+ } else {
+ return 0;
+ }
+}
+
+
+int mupdate_noop(mupdate_handle *handle, mupdate_callback callback,
+ void *context)
+{
+ int ret;
+ enum mupdate_cmd_response response;
+
+ if(!handle || !callback) return MUPDATE_BADPARAM;
+
+ prot_printf(handle->conn->out,
+ "X%u NOOP\r\n", handle->tagn++);
+
+ ret = mupdate_scarf(handle, callback, context, 1, &response);
+
+ if (!ret && response == MUPDATE_OK) {
+ return 0;
+ } else {
+ return ret ? ret : MUPDATE_FAIL;
+ }
+}
+
+#define CHECKNEWLINE(c, ch) do { if ((ch) == '\r') (ch)=prot_getc((c)->conn->in); \
+ if ((ch) != '\n') { syslog(LOG_ERR, \
+ "extra arguments recieved, aborting connection");\
+ r = MUPDATE_PROTOCOL_ERROR;\
+ goto done; }} while(0)
+
+/* Scarf up the incoming data and perform the requested operations */
+int mupdate_scarf(mupdate_handle *handle,
+ mupdate_callback callback,
+ void *context,
+ int wait_for_ok,
+ enum mupdate_cmd_response *response)
+{
+ struct mupdate_mailboxdata box;
+ int r = 0;
+
+ if (!handle || !callback) return MUPDATE_BADPARAM;
+
+ /* keep going while we have input or if we're waiting for an OK */
+ while (!r) {
+ int ch;
+ char *p;
+
+ if (wait_for_ok) {
+ prot_BLOCK(handle->conn->in);
+ } else {
+ /* check for input */
+ prot_NONBLOCK(handle->conn->in);
+ ch = prot_getc(handle->conn->in);
+
+ if(ch == EOF && errno == EAGAIN) {
+ /* this was just "no input" we return 0 */
+ goto done;
+ } else if(ch == EOF) {
+ /* this was a fatal error */
+ r = MUPDATE_NOCONN;
+ goto done;
+ } else {
+ /* there's input waiting, put back our character */
+ prot_ungetc(ch, handle->conn->in);
+ }
+
+ /* Set it back to blocking so we don't get half a word */
+ prot_BLOCK(handle->conn->in);
+ }
+
+ ch = getword(handle->conn->in, &(handle->tag));
+ if (ch == EOF) {
+ /* this was a fatal error */
+ r = MUPDATE_NOCONN;
+ goto done;
+ }
+
+ if(ch != ' ') {
+ /* We always have a command */
+ syslog(LOG_ERR, "Protocol error from master: no tag");
+ r = MUPDATE_PROTOCOL_ERROR;
+ goto done;
+ }
+ ch = getword(handle->conn->in, &(handle->cmd));
+ if(ch != ' ') {
+ /* We always have an argument */
+ syslog(LOG_ERR, "Protocol error from master: no keyword");
+ r = MUPDATE_PROTOCOL_ERROR;
+ break;
+ }
+
+ if (islower((unsigned char) handle->cmd.s[0])) {
+ handle->cmd.s[0] = toupper((unsigned char) handle->cmd.s[0]);
+ }
+ for (p = &(handle->cmd.s[1]); *p; p++) {
+ if (islower((unsigned char) *p))
+ *p = toupper((unsigned char) *p);
+ }
+
+ switch(handle->cmd.s[0]) {
+ case 'B':
+ if(!strncmp(handle->cmd.s, "BAD", 3)) {
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg1));
+ CHECKNEWLINE(handle, ch);
+
+ syslog(LOG_ERR, "mupdate BAD response: %s", handle->arg1.s);
+ if (wait_for_ok && response) {
+ *response = MUPDATE_BAD;
+ }
+ goto done;
+ } else if (!strncmp(handle->cmd.s, "BYE", 3)) {
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg1));
+ CHECKNEWLINE(handle, ch);
+
+ syslog(LOG_ERR, "mupdate BYE response: %s", handle->arg1.s);
+ if(wait_for_ok && response) {
+ *response = MUPDATE_BYE;
+ }
+ goto done;
+ }
+ goto badcmd;
+
+ case 'D':
+ if(!strncmp(handle->cmd.s, "DELETE", 6)) {
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg1));
+ CHECKNEWLINE(handle, ch);
+
+ memset(&box, 0, sizeof(box));
+ box.mailbox = handle->arg1.s;
+
+ /* Handle delete command */
+ r = callback(&box, handle->cmd.s, context);
+ if (r) {
+ syslog(LOG_ERR,
+ "error deleting mailbox: callback returned %d", r);
+ goto done;
+ }
+ break;
+ }
+ goto badcmd;
+
+ case 'M':
+ if(!strncmp(handle->cmd.s, "MAILBOX", 7)) {
+ /* Mailbox Name */
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg1));
+ if(ch != ' ') {
+ r = MUPDATE_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ /* Server */
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg2));
+ if(ch != ' ') {
+ r = MUPDATE_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ /* ACL */
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg3));
+ CHECKNEWLINE(handle, ch);
+
+ /* Handle mailbox command */
+ memset(&box, 0, sizeof(box));
+ box.mailbox = handle->arg1.s;
+ box.server = handle->arg2.s;
+ box.acl = handle->arg3.s;
+ r = callback(&box, handle->cmd.s, context);
+ if (r) { /* callback error ? */
+ syslog(LOG_ERR,
+ "error activating mailbox: callback returned %d", r);
+ goto done;
+ }
+ break;
+ }
+ goto badcmd;
+ case 'N':
+ if(!strncmp(handle->cmd.s, "NO", 2)) {
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg1));
+ CHECKNEWLINE(handle, ch);
+
+ syslog(LOG_DEBUG, "mupdate NO response: %s", handle->arg1.s);
+ if (wait_for_ok) {
+ if (response) *response = MUPDATE_NO;
+ goto done;
+ }
+ break;
+ }
+ goto badcmd;
+ case 'O':
+ if(!strncmp(handle->cmd.s, "OK", 2)) {
+ /* It's all good, grab the attached string and move on */
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg1));
+
+ CHECKNEWLINE(handle, ch);
+ if (wait_for_ok) {
+ if (response) *response = MUPDATE_OK;
+ goto done;
+ }
+ break;
+ }
+ goto badcmd;
+ case 'R':
+ if(!strncmp(handle->cmd.s, "RESERVE", 7)) {
+ /* Mailbox Name */
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg1));
+ if(ch != ' ') {
+ r = MUPDATE_PROTOCOL_ERROR;
+ goto done;
+ }
+
+ /* Server */
+ ch = getstring(handle->conn->in, handle->conn->out, &(handle->arg2));
+ CHECKNEWLINE(handle, ch);
+
+ /* Handle reserve command */
+ memset(&box, 0, sizeof(box));
+ box.mailbox = handle->arg1.s;
+ box.server = handle->arg2.s;
+ r = callback(&box, handle->cmd.s, context);
+ if (r) { /* callback error ? */
+ syslog(LOG_ERR,
+ "error reserving mailbox: callback returned %d", r);
+ goto done;
+ }
+
+ break;
+ }
+ goto badcmd;
+
+ default:
+ badcmd:
+ /* Bad Command */
+ syslog(LOG_ERR, "bad/unexpected command from master: %s",
+ handle->cmd.s);
+ r = MUPDATE_PROTOCOL_ERROR;
+ goto done;
+ }
+ }
+
+ done:
+ /* reset blocking */
+ prot_NONBLOCK(handle->conn->in);
+
+ return r;
+}
+
+void kick_mupdate(void)
+{
+ char buf[2048];
+ struct sockaddr_un srvaddr;
+ int s, r;
+ int len;
+
+ s = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (s == -1) {
+ syslog(LOG_ERR, "socket: %m");
+ return;
+ }
+
+ strlcpy(buf, config_dir, sizeof(buf));
+ strlcat(buf, FNAME_MUPDATE_TARGET_SOCK, sizeof(buf));
+ memset((char *)&srvaddr, 0, sizeof(srvaddr));
+ srvaddr.sun_family = AF_UNIX;
+ strcpy(srvaddr.sun_path, buf);
+ len = sizeof(srvaddr.sun_family) + strlen(srvaddr.sun_path) + 1;
+
+ r = connect(s, (struct sockaddr *)&srvaddr, len);
+ if (r == -1) {
+ syslog(LOG_ERR, "kick_mupdate: can't connect to target: %m");
+ goto done;
+ }
+
+ r = read(s, buf, sizeof(buf));
+ if (r <= 0) {
+ syslog(LOG_ERR, "kick_mupdate: can't read from target: %m");
+ }
+
+ done:
+ close(s);
+ return;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-client.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,115 @@
+/* mupdate-client.h -- cyrus murder database clients
+ *
+ * $Id: mupdate-client.h,v 1.13.4.2 2005/11/23 13:41:26 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef INCLUDED_MUPDATE_CLIENT_H
+#define INCLUDED_MUPDATE_CLIENT_H
+
+#include <sasl/sasl.h>
+
+#define FNAME_MUPDATE_TARGET_SOCK "/socket/mupdate.target"
+
+typedef struct mupdate_handle_s mupdate_handle;
+
+/* connect & authenticate to an mupdate server */
+int mupdate_connect(const char *server, const char *port,
+ mupdate_handle **handle, sasl_callback_t *cbs);
+
+/* disconnect from mupdate server */
+void mupdate_disconnect(mupdate_handle **h);
+
+/* activate a mailbox */
+int mupdate_activate(mupdate_handle *handle,
+ const char *mailbox, const char *server,
+ const char *acl);
+
+/* reserve a piece of namespace */
+int mupdate_reserve(mupdate_handle *handle,
+ const char *mailbox, const char *server);
+
+/* deactivate a mailbox (ACTIVE->RESERVE) */
+int mupdate_deactivate(mupdate_handle *handle,
+ const char *mailbox, const char *server);
+
+/* delete a mailbox */
+int mupdate_delete(mupdate_handle *handle,
+ const char *mailbox);
+
+enum mbtype {
+ ACTIVE, RESERVE
+};
+
+/* mailbox data structure */
+struct mupdate_mailboxdata {
+ const char *mailbox;
+ const char *server;
+ const char *acl;
+ enum mbtype t;
+};
+
+/* does a given mailbox exist? 1 if false, 0 if true, -1 if error,
+ * "target" gets pointed at a struct mudate_mailboxdata that is only valid
+ * until the next mupdate_* call on this mupdate_handle.
+ */
+int mupdate_find(mupdate_handle *handle, const char *mailbox,
+ struct mupdate_mailboxdata **target);
+
+/* Callbacks for mupdate_scarf and mupdate_list */
+/* cmd is one of DELETE, MAILBOX, RESERVE */
+/* context is as provided to mupdate_scarf */
+/* FIXME/xxx: "cmd" can probabally go away and instead
+ * we just use the t in mdata */
+typedef int (*mupdate_callback)(struct mupdate_mailboxdata *mdata,
+ const char *cmd, void *context);
+
+/* perform an MUPDATE LIST operation (callback is called for
+ * each remote mailbox) */
+int mupdate_list(mupdate_handle *handle, mupdate_callback callback,
+ const char *prefix, void *context);
+
+/* ping the mupdate server with a NOOP. */
+int mupdate_noop(mupdate_handle *handle, mupdate_callback callback,
+ void *context);
+
+/* ping a local slave */
+void kick_mupdate(void);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-slave.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-slave.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-slave.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate-slave.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,350 @@
+/* mupdate-slave.c -- cyrus murder database clients
+ *
+ * $Id: mupdate-slave.c,v 1.24.2.4 2006/03/15 18:56:31 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <signal.h>
+#include <ctype.h>
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+#include <syslog.h>
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/stat.h>
+#include <netinet/in.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include "prot.h"
+#include "xmalloc.h"
+#include "global.h"
+#include "assert.h"
+#include "imparse.h"
+#include "iptostring.h"
+#include "mupdate.h"
+#include "exitcodes.h"
+
+/* Returns file descriptor of kick socket (or does not return) */
+static int open_kick_socket()
+{
+ int r,s,len;
+ char fnamebuf[2048];
+ struct sockaddr_un srvaddr;
+ mode_t oldumask;
+
+ s = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (s == -1) {
+ syslog(LOG_ERR, "socket: %m");
+ fatal("socket failed", EC_OSERR);
+ }
+
+ strlcpy(fnamebuf, config_dir, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_MUPDATE_TARGET_SOCK, sizeof(fnamebuf));
+
+ (void) unlink(fnamebuf);
+ memset((char *)&srvaddr, 0, sizeof(srvaddr));
+ srvaddr.sun_family = AF_UNIX;
+ strlcpy(srvaddr.sun_path, fnamebuf, sizeof(srvaddr.sun_path));
+ len = strlen(srvaddr.sun_path) + sizeof(srvaddr.sun_family) + 1;
+ oldumask = umask((mode_t) 0); /* for Linux */
+ r = bind(s, (struct sockaddr *)&srvaddr, len);
+ umask(oldumask); /* for Linux */
+ chmod(fnamebuf, 0777); /* for DUX */
+ if (r == -1) {
+ syslog(LOG_ERR, "bind: %s: %m", fnamebuf);
+ fatal("bind failed", EC_OSERR);
+ }
+ r = listen(s, 10);
+ if (r == -1) {
+ syslog(LOG_ERR, "listen: %m");
+ fatal("listen failed", EC_OSERR);
+ }
+
+ return s;
+}
+
+/* Accept up to max_fds connections on kicksock, put the fds into
+ * the array fd_list (atleast max_fds big), and the number of connections
+ * into num_fds */
+static int get_kick_fds(int kicksock,
+ int *fd_list, int *num_fds, int max_fds) {
+ fd_set read_set;
+ int highest_fd = kicksock + 1;
+ struct timeval tv;
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+
+ FD_ZERO(&read_set);
+ FD_SET(kicksock, &read_set);
+
+ *num_fds = 0;
+
+ for(*num_fds = 0; *num_fds<max_fds; (*num_fds)++) {
+ int gotdata;
+ fd_set rset;
+
+ rset = read_set;
+ gotdata = select(highest_fd, &rset, NULL, NULL, &tv);
+
+ if(gotdata == -1) {
+ /* Select Error! */
+ syslog(LOG_ERR, "kicksock select failed");
+ return -1;
+ } else if (gotdata != 0 && FD_ISSET(kicksock, &rset)) {
+ struct sockaddr_un clientaddr;
+ int len = sizeof(clientaddr);
+
+ fd_list[*num_fds] =
+ accept(kicksock, (struct sockaddr *)&clientaddr, (socklen_t *)&len);
+ if (fd_list[*num_fds] == -1) {
+ syslog(LOG_WARNING, "kicksock accept() failed: %m %d", kicksock);
+ return -1;
+ }
+ } else {
+ /* Timeout Expired, we're done! */
+ break;
+ }
+ }
+
+ return 0;
+}
+
+#define KICK_FDS_LEN 5
+
+static void mupdate_listen(mupdate_handle *handle, int pingtimeout)
+{
+ int gotdata = 0;
+ fd_set rset, read_set;
+ int highest_fd, kicksock;
+ int waiting_for_noop = 0;
+ int kick_fds[KICK_FDS_LEN];
+ int num_kick_fds = 0;
+
+ if (!handle || !handle->saslcompleted) return;
+
+ /* don't handle connections (and drop current connections)
+ * while we sync */
+ mupdate_unready();
+
+ /* First, resync the database */
+ if(mupdate_synchronize(handle)) return;
+
+ mupdate_signal_db_synced();
+
+ /* Okay, we're all set to go */
+ mupdate_ready();
+
+ kicksock = open_kick_socket();
+ highest_fd = ((kicksock > handle->conn->sock) ? kicksock : handle->conn->sock) + 1;
+
+ FD_ZERO(&read_set);
+ FD_SET(handle->conn->sock, &read_set);
+ FD_SET(kicksock, &read_set);
+
+ /* Now just listen to the rest of the updates */
+ while(1) {
+ struct timeval tv;
+
+ tv.tv_sec = pingtimeout;
+ tv.tv_usec = 0;
+
+ prot_flush(handle->conn->out);
+
+ rset = read_set;
+
+ gotdata = select(highest_fd, &rset, NULL, NULL, &tv);
+
+ if(gotdata == -1) {
+ /* Oops? */
+ syslog(LOG_ERR, "select failed");
+ break;
+ } else if(gotdata != 0) {
+ if (FD_ISSET(handle->conn->sock, &rset)) {
+ /* If there is a fatal error, die, other errors ignore */
+ if (mupdate_scarf(handle, cmd_change, NULL,
+ waiting_for_noop, NULL) != 0) {
+ break;
+ }
+ }
+
+ /* If we were waiting on a noop, we no longer are.
+ * If we have been kicked, tell them we're done now */
+ if(waiting_for_noop) {
+ waiting_for_noop = 0;
+
+ for(;num_kick_fds;num_kick_fds--) {
+ if (write(kick_fds[num_kick_fds-1], "ok", 2) < 0) {
+ syslog(LOG_WARNING,
+ "can't write to IPC socket (ignoring)");
+ }
+ close(kick_fds[num_kick_fds-1]);
+ }
+ }
+
+ if (FD_ISSET(kicksock, &rset)) {
+ /* We were kicked--collect outstanding kicks! */
+ if(get_kick_fds(kicksock,
+ kick_fds, &num_kick_fds, KICK_FDS_LEN)) {
+ /* Nonzero return code -- Error */
+ break;
+ }
+
+ prot_printf(handle->conn->out, "N%u NOOP\r\n", handle->tagn++);
+ prot_flush(handle->conn->out);
+ waiting_for_noop = 1;
+ }
+ } else /* (gotdata == 0) */ {
+ /* Timeout, send a NOOP */
+ if(!waiting_for_noop) {
+ prot_printf(handle->conn->out, "N%u NOOP\r\n", handle->tagn++);
+ prot_flush(handle->conn->out);
+ waiting_for_noop = 1;
+ } else {
+ /* We were already waiting on a noop! */
+ syslog(LOG_ERR, "connection to master timed out.");
+ break;
+ }
+ }
+ } /* Loop */
+
+ /* Don't leak the descriptors! */
+ for(;num_kick_fds;num_kick_fds--) {
+ close(kick_fds[num_kick_fds-1]);
+ }
+ close(kicksock);
+}
+
+void *mupdate_client_start(void *rock __attribute__((unused)))
+{
+ mupdate_handle *h = NULL;
+ int retry_delay = 20, real_delay;
+ int ret;
+
+ srand(time(NULL) * getpid());
+
+ if(!config_mupdate_server) {
+ fatal("couldn't get mupdate server name", EC_UNAVAILABLE);
+ }
+
+ retry_delay = config_getint(IMAPOPT_MUPDATE_RETRY_DELAY);
+ if(retry_delay < 0) {
+ fatal("invalid value for mupdate_retry_delay", EC_UNAVAILABLE);
+ }
+
+ while(1) {
+ ret = mupdate_connect(config_mupdate_server, NULL, &h, NULL);
+ if(ret) {
+ syslog(LOG_ERR,"couldn't connect to mupdate server");
+ goto retry;
+ }
+
+ syslog(LOG_ERR, "successful mupdate connection to %s",
+ config_mupdate_server);
+
+ mupdate_listen(h, retry_delay);
+
+ retry:
+ /* Cleanup */
+ mupdate_disconnect(&h);
+
+ real_delay = retry_delay + (rand() % (retry_delay / 2));
+
+ syslog(LOG_ERR,
+ "retrying connection to mupdate server in %d seconds",
+ real_delay);
+
+ /* Wait before retrying */
+ sleep(real_delay);
+ }
+
+ return NULL;
+}
+
+void *mupdate_placebo_kick_start(void *rock __attribute__((unused)))
+{
+ int kicksock, kickconn = -1;
+
+ kicksock = open_kick_socket();
+
+ /* Now just listen to the rest of the updates */
+ while(1) {
+ struct sockaddr_un clientaddr;
+ int len;
+
+ /* Only handle one kick at a time -- they're fast */
+ len = sizeof(clientaddr);
+ kickconn =
+ accept(kicksock, (struct sockaddr *)&clientaddr, (socklen_t *)&len);
+
+ if (kickconn == -1) {
+ syslog(LOG_WARNING, "accept(): %m");
+ break;
+ } else {
+ if (write(kickconn, "ok", 2) < 0) {
+ syslog(LOG_WARNING, "can't write to IPC socket?");
+ }
+ close(kickconn);
+ kickconn = -1;
+ }
+ } /* Loop */
+
+ /* Don't leak the descriptor! */
+ if(kickconn >= 0) close(kickconn);
+ close(kicksock);
+
+ return NULL;
+}
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2388 @@
+/* mupdate.c -- cyrus murder database master
+ *
+ * $Id: mupdate.c,v 1.77.2.19 2006/03/15 18:56:31 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <errno.h>
+
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#if !defined(SIOCGIFCONF) && defined(HAVE_SYS_SOCKIO_H)
+# include <sys/sockio.h>
+#endif
+#include <net/if.h>
+
+#include <pthread.h>
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "mupdate.h"
+#include "mupdate-client.h"
+#include "telemetry.h"
+
+#include "exitcodes.h"
+#include "global.h"
+#include "imap_err.h"
+#include "iptostring.h"
+#include "mailbox.h"
+#include "mboxlist.h"
+#include "mpool.h"
+#include "nonblock.h"
+#include "prot.h"
+#include "tls.h"
+#include "util.h"
+#include "version.h"
+#include "xmalloc.h"
+
+/* Sent to clients that we can't accept a connection for. */
+static const char SERVER_UNABLE_STRING[] = "* BYE \"Server Unable\"\r\n";
+
+static const int NO_NEW_CONNECTION = -1;
+
+static int masterp = 0;
+
+typedef enum {
+ DOCMD_OK = 0,
+ DOCMD_CONN_FINISHED = 1
+} mupdate_docmd_result_t;
+
+enum {
+ poll_interval = 1,
+ update_wait = 5
+};
+
+struct pending {
+ struct pending *next;
+
+ char mailbox[MAX_MAILBOX_NAME+1];
+};
+
+struct stringlist
+{
+ char *str;
+ struct stringlist *next;
+};
+
+struct conn {
+ int fd;
+ int logfd;
+
+ struct protstream *pin;
+ struct protstream *pout;
+ sasl_conn_t *saslconn;
+ char *userid;
+
+#ifdef HAVE_SSL
+ SSL *tlsconn;
+#else
+ void *tlsconn;
+#endif
+
+ int idle;
+
+ char clienthost[NI_MAXHOST*2+1];
+
+ struct
+ {
+ char *ipremoteport;
+ char ipremoteport_buf[60];
+ char *iplocalport;
+ char iplocalport_buf[60];
+ sasl_ssf_t ssf;
+ char *authid;
+ } saslprops;
+
+ /* UPDATE command handling */
+ const char *streaming; /* tag */
+ struct stringlist *streaming_hosts; /* partial updates */
+
+ /* pending changes to send, in reverse order */
+ pthread_mutex_t m;
+ pthread_cond_t cond;
+ struct pending *plist;
+ struct conn *updatelist_next;
+ struct prot_waitevent *ev; /* invoked every 'update_wait' seconds
+ to send out updates */
+
+ /* Prefix for list commands */
+ const char *list_prefix;
+ size_t list_prefix_len;
+
+ /* For parsing */
+ struct buf tag, cmd, arg1, arg2, arg3;
+
+ /* For connection list management */
+ struct conn *next;
+ struct conn *next_idle;
+};
+
+static int ready_for_connections = 0;
+static pthread_cond_t ready_for_connections_cond = PTHREAD_COND_INITIALIZER;
+static pthread_mutex_t ready_for_connections_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+static int synced = 0;
+static pthread_cond_t synced_cond = PTHREAD_COND_INITIALIZER;
+static pthread_mutex_t synced_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+static pthread_mutex_t listener_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_cond_t listener_cond = PTHREAD_COND_INITIALIZER;
+static int listener_lock = 0;
+
+/* if you want to lick both listener and either of these two, you
+ * must lock listener first. You must have both listener_mutex and
+ * idle_connlist_mutex locked to remove anything from the idle_connlist */
+static pthread_mutex_t idle_connlist_mutex = PTHREAD_MUTEX_INITIALIZER;
+struct conn *idle_connlist = NULL; /* protected by listener_mutex */
+static pthread_mutex_t connection_count_mutex = PTHREAD_MUTEX_INITIALIZER;
+static int connection_count = 0;
+static pthread_mutex_t idle_worker_mutex = PTHREAD_MUTEX_INITIALIZER;
+static int idle_worker_count = 0;
+static pthread_mutex_t worker_count_mutex = PTHREAD_MUTEX_INITIALIZER;
+static int worker_count = 0;
+
+pthread_mutex_t connlist_mutex = PTHREAD_MUTEX_INITIALIZER;
+struct conn *connlist = NULL;
+
+/* ---- connection signaling pipe */
+static int conn_pipe[2];
+
+/* ---- database access ---- */
+pthread_mutex_t mailboxes_mutex = PTHREAD_MUTEX_INITIALIZER;
+struct conn *updatelist = NULL;
+
+/* --- prototypes --- */
+static void conn_free(struct conn *C);
+mupdate_docmd_result_t docmd(struct conn *c);
+void cmd_authenticate(struct conn *C,
+ const char *tag, const char *mech,
+ const char *clientstart);
+void cmd_set(struct conn *C,
+ const char *tag, const char *mailbox,
+ const char *server, const char *acl, enum settype t);
+void cmd_find(struct conn *C, const char *tag, const char *mailbox,
+ int send_ok, int send_delete);
+void cmd_list(struct conn *C, const char *tag, const char *host_prefix);
+void cmd_startupdate(struct conn *C, const char *tag,
+ struct stringlist *partial);
+void cmd_starttls(struct conn *C, const char *tag);
+void shut_down(int code);
+static int reset_saslconn(struct conn *c);
+void database_init();
+void sendupdates(struct conn *C, int flushnow);
+
+extern int saslserver(sasl_conn_t *conn, const char *mech,
+ const char *init_resp, const char *resp_prefix,
+ const char *continuation, const char *empty_chal,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, char **success_data);
+
+/* Functions for manipulating stringlists */
+static void stringlist_add(struct stringlist **list, const char *string);
+static void stringlist_free(struct stringlist **list);
+static int stringlist_contains(struct stringlist *list, const char *str);
+
+/* --- prototypes in mupdate-slave.c */
+void *mupdate_client_start(void *rock);
+void *mupdate_placebo_kick_start(void *rock);
+
+/* --- main() for each thread */
+static void *thread_main(void *rock);
+
+/* --- for config.c */
+const int config_need_data = 0;
+
+static struct conn *conn_new(int fd)
+{
+ struct conn *C = xzmalloc(sizeof(struct conn));
+ struct sockaddr_storage localaddr, remoteaddr;
+ int r;
+ int haveaddr = 0;
+ int salen;
+ int secflags;
+ char hbuf[NI_MAXHOST];
+ int niflags;
+
+ C->fd = fd;
+ C->logfd = -1;
+
+ C->pin = prot_new(C->fd, 0);
+ C->pout = prot_new(C->fd, 1);
+
+ prot_setflushonread(C->pin, C->pout);
+ prot_settimeout(C->pin, 180*60);
+
+ C->pin->userdata = C->pout->userdata = C;
+
+ pthread_mutex_lock(&connlist_mutex); /* LOCK */
+ C->next = connlist;
+ connlist = C;
+ pthread_mutex_unlock(&connlist_mutex); /* UNLOCK */
+
+ pthread_mutex_lock(&connection_count_mutex); /* LOCK */
+ connection_count++;
+ pthread_mutex_unlock(&connection_count_mutex); /* UNLOCK */
+
+ /* Find out name of client host */
+ salen = sizeof(remoteaddr);
+ if (getpeername(C->fd, (struct sockaddr *)&remoteaddr, &salen) == 0 &&
+ (remoteaddr.ss_family == AF_INET ||
+ remoteaddr.ss_family == AF_INET6)) {
+ niflags = 0;
+#ifdef NI_WITHSCOPEID
+ if (remoteaddr.ss_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, niflags) == 0)
+ strlcpy(C->clienthost, hbuf, sizeof(C->clienthost)-30);
+ else
+ strlcpy(C->clienthost, "Unknown", sizeof(C->clienthost)-30);
+ niflags = NI_NUMERICHOST;
+#ifdef NI_WITHSCOPEID
+ if (((struct sockaddr *)&remoteaddr)->sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, niflags) != 0)
+ strlcpy(hbuf, "unknown", sizeof(hbuf));
+ strlcat(C->clienthost, " [", sizeof(C->clienthost));
+ strlcat(C->clienthost, hbuf, sizeof(C->clienthost));
+ strlcat(C->clienthost, "]", sizeof(C->clienthost));
+ salen = sizeof(localaddr);
+ if (getsockname(C->fd, (struct sockaddr *)&localaddr, &salen) == 0
+ && iptostring((struct sockaddr *)&remoteaddr, salen,
+ C->saslprops.ipremoteport_buf,
+ sizeof(C->saslprops.ipremoteport_buf)) == 0
+ && iptostring((struct sockaddr *)&localaddr, salen,
+ C->saslprops.iplocalport_buf,
+ sizeof(C->saslprops.iplocalport_buf)) == 0) {
+ haveaddr = 1;
+ }
+ }
+
+ if(haveaddr) {
+ C->saslprops.ipremoteport = C->saslprops.ipremoteport_buf;
+ C->saslprops.iplocalport = C->saslprops.iplocalport_buf;
+ }
+
+ /* create sasl connection */
+ r = sasl_server_new("mupdate",
+ config_servername, NULL,
+ C->saslprops.iplocalport,
+ C->saslprops.ipremoteport,
+ NULL, 0,
+ &C->saslconn);
+ if(r != SASL_OK) {
+ syslog(LOG_ERR, "failed to start sasl for connection: %s",
+ sasl_errstring(r, NULL, NULL));
+ prot_printf(C->pout, SERVER_UNABLE_STRING);
+
+ C->idle = 0;
+ conn_free(C);
+ return NULL;
+ }
+
+ /* set my allowable security properties */
+ secflags = SASL_SEC_NOANONYMOUS;
+ if (!config_getswitch(IMAPOPT_ALLOWPLAINTEXT)) {
+ secflags |= SASL_SEC_NOPLAINTEXT;
+ }
+ sasl_setprop(C->saslconn, SASL_SEC_PROPS, mysasl_secprops(secflags));
+
+ /* Clear Buffers */
+ memset(&(C->tag), 0, sizeof(struct buf));
+ memset(&(C->cmd), 0, sizeof(struct buf));
+ memset(&(C->arg1), 0, sizeof(struct buf));
+ memset(&(C->arg2), 0, sizeof(struct buf));
+ memset(&(C->arg3), 0, sizeof(struct buf));
+
+ return C;
+}
+
+static void conn_free(struct conn *C)
+{
+ assert(!C->idle); /* Not allowed to free idle connections */
+
+ if (C->streaming) { /* remove from updatelist */
+ struct conn *upc;
+
+ pthread_mutex_lock(&mailboxes_mutex);
+
+ if (C == updatelist) {
+ /* first thing in updatelist */
+ updatelist = C->updatelist_next;
+ } else {
+ /* find in update list */
+ for (upc = updatelist; upc->updatelist_next != NULL;
+ upc = upc->updatelist_next) {
+ if (upc->updatelist_next == C) break;
+ }
+ /* must find it ! */
+ assert(upc->updatelist_next == C);
+
+ upc->updatelist_next = C->updatelist_next;
+ }
+
+ pthread_mutex_unlock(&mailboxes_mutex);
+ }
+
+ /* decrease connection counter */
+ pthread_mutex_lock(&connection_count_mutex);
+ connection_count--;
+ pthread_mutex_unlock(&connection_count_mutex);
+
+ /* remove from connlist */
+ pthread_mutex_lock(&connlist_mutex); /* LOCK */
+ if (C == connlist) {
+ connlist = connlist->next;
+ } else {
+ struct conn *t;
+
+ for (t = connlist; t->next != NULL; t = t->next) {
+ if (t->next == C) break;
+ }
+ assert(t != NULL);
+ t->next = C->next;
+ }
+ pthread_mutex_unlock(&connlist_mutex); /* UNLOCK */
+
+ if (C->ev) prot_removewaitevent(C->pin, C->ev);
+
+ prot_flush(C->pout);
+
+ if (C->pin) prot_free(C->pin);
+ if (C->pout) prot_free(C->pout);
+
+#ifdef HAVE_SSL
+ if (C->tlsconn) tls_reset_servertls(&C->tlsconn);
+ tls_shutdown_serverengine();
+#endif
+
+ cyrus_close_sock(C->fd);
+ if(C->logfd != -1) close(C->logfd);
+
+ if (C->saslconn) sasl_dispose(&C->saslconn);
+
+ if (C->saslprops.authid) free(C->saslprops.authid);
+
+ /* free struct bufs */
+ freebuf(&(C->tag));
+ freebuf(&(C->cmd));
+ freebuf(&(C->arg1));
+ freebuf(&(C->arg2));
+ freebuf(&(C->arg3));
+
+ if(C->streaming_hosts) stringlist_free(&(C->streaming_hosts));
+
+ free(C);
+}
+
+static void stringlist_add(struct stringlist **list, const char *string)
+{
+ struct stringlist *tmp;
+
+ assert(list);
+ assert(string);
+
+ tmp = xmalloc(sizeof(struct stringlist));
+ tmp->str = xstrdup(string);
+
+ tmp->next = *list;
+ *list = tmp;
+}
+
+static void stringlist_free(struct stringlist **list)
+{
+ struct stringlist *tmp, *tmp_next;
+ for(tmp = *list; tmp; tmp=tmp_next) {
+ tmp_next = tmp->next;
+ free(tmp->str);
+ free(tmp);
+ }
+ *list = NULL;
+}
+
+/* returns true if the list contains an exact match */
+static int stringlist_contains(struct stringlist *list, const char *str)
+{
+ struct stringlist *tmp;
+ for(tmp = list; tmp; tmp=tmp->next) {
+ if(!strcmp(str, tmp->str)) return 1;
+ }
+ return 0;
+}
+
+
+/*
+ * The auth_*.c backends called by mysasl_proxy_policy()
+ * use static variables which we need to protect with a mutex.
+ */
+static pthread_mutex_t proxy_policy_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+static int mupdate_proxy_policy(sasl_conn_t *conn,
+ void *context,
+ const char *requested_user, unsigned rlen,
+ const char *auth_identity, unsigned alen,
+ const char *def_realm,
+ unsigned urlen,
+ struct propctx *propctx)
+{
+ int r;
+
+ pthread_mutex_lock(&proxy_policy_mutex); /* LOCK */
+
+ r = mysasl_proxy_policy(conn, context, requested_user, rlen,
+ auth_identity, alen, def_realm, urlen, propctx);
+
+ pthread_mutex_unlock(&proxy_policy_mutex); /* UNLOCK */
+
+ return r;
+}
+
+static struct sasl_callback mysasl_cb[] = {
+ { SASL_CB_GETOPT, &mysasl_config, NULL },
+ { SASL_CB_PROXY_POLICY, &mupdate_proxy_policy, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+/*
+ * Is the IP address of the given hostname local?
+ * Returns 1 if local, 0 otherwise.
+ */
+static int islocalip(const char *hostname)
+{
+ struct hostent *hp;
+ struct in_addr *haddr, *iaddr;
+ struct ifconf ifc;
+ struct ifreq *ifr;
+ char buf[8192]; /* XXX this limits us to 256 interfaces */
+ int sock, islocal = 0;
+
+ if ((hp = gethostbyname(hostname)) == NULL) {
+ fprintf(stderr, "unknown host: %s\n", hostname);
+ return 0;
+ }
+
+ haddr = (struct in_addr *) hp->h_addr;
+
+ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
+ fprintf(stderr, "socket() failed\n");
+ return 0;
+ }
+
+ ifc.ifc_buf = buf;
+ ifc.ifc_len = sizeof(buf);
+
+ if (ioctl(sock, SIOCGIFCONF, &ifc) != 0) {
+ fprintf(stderr, "ioctl(SIOCGIFCONF) failed: %d\n", errno);
+ close(sock);
+ return 0;
+ }
+
+ for (ifr = ifc.ifc_req; ifr - ifc.ifc_req < ifc.ifc_len; ifr++) {
+ if (ioctl(sock, SIOCGIFADDR, ifr) != 0) continue;
+ if (ioctl(sock, SIOCGIFFLAGS, ifr) != 0) continue;
+
+ /* skip any inactive or loopback interfaces */
+ if (!(ifr->ifr_flags & IFF_UP) || (ifr->ifr_flags & IFF_LOOPBACK))
+ continue;
+
+ iaddr = &(((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr);
+
+ /* compare the host address to the interface address */
+ if (!memcmp(haddr, iaddr, sizeof(struct in_addr))) {
+ islocal = 1;
+ break;
+ }
+ }
+
+ close(sock);
+
+ return islocal;
+}
+
+/*
+ * run once when process is forked;
+ * MUST NOT exit directly; must return with non-zero error code
+ */
+int service_init(int argc, char **argv,
+ char **envp __attribute__((unused)))
+{
+ int i, r, workers_to_start;
+ int opt, autoselect = 0;
+ pthread_t t;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ /* Do minor configuration checking */
+ workers_to_start = config_getint(IMAPOPT_MUPDATE_WORKERS_START);
+
+ if(config_getint(IMAPOPT_MUPDATE_WORKERS_MAX) < config_getint(IMAPOPT_MUPDATE_WORKERS_MINSPARE)) {
+ syslog(LOG_CRIT, "Maximum total worker threads is less than minimum spare worker threads");
+ return EC_SOFTWARE;
+ }
+
+ if(workers_to_start < config_getint(IMAPOPT_MUPDATE_WORKERS_MINSPARE)) {
+ syslog(LOG_CRIT, "Starting worker threads is less than minimum spare worker threads");
+ return EC_SOFTWARE;
+ }
+
+ if(config_getint(IMAPOPT_MUPDATE_WORKERS_MAXSPARE) < workers_to_start) {
+ syslog(LOG_CRIT, "Maximum spare worker threads is less than starting worker threads");
+ return EC_SOFTWARE;
+ }
+
+ if(config_getint(IMAPOPT_MUPDATE_WORKERS_MINSPARE) > workers_to_start) {
+ syslog(LOG_CRIT, "Minimum spare worker threads is greater than starting worker threads");
+ return EC_SOFTWARE;
+ }
+
+ if(config_getint(IMAPOPT_MUPDATE_WORKERS_MAX) < workers_to_start) {
+ syslog(LOG_CRIT, "Maximum total worker threads is less than starting worker threads");
+ return EC_SOFTWARE;
+ }
+
+ /* set signal handlers */
+ signals_set_shutdown(&shut_down);
+ signal(SIGPIPE, SIG_IGN);
+
+ global_sasl_init(1, 1, mysasl_cb);
+
+ /* see if we're the master or a slave */
+ while ((opt = getopt(argc, argv, "ma")) != EOF) {
+ switch (opt) {
+ case 'm':
+ masterp = 1;
+ break;
+ case 'a':
+ autoselect = 1;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!masterp && autoselect) masterp = islocalip(config_mupdate_server);
+
+ if (masterp &&
+ config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_UNIFIED) {
+ /* XXX We currently prohibit this because mailboxes created
+ * on the master will cause local mailbox entries to be propagated
+ * to the slave. We can probably fix this by prepending
+ * config_servername onto the entries before updating the slaves.
+ */
+ fatal("can not run mupdate master on a unified server", EC_USAGE);
+ }
+
+ if(pipe(conn_pipe) == -1) {
+ syslog(LOG_ERR, "could not setup connection signaling pipe %m");
+ return EC_OSERR;
+ }
+
+ database_init();
+
+ if (!masterp) {
+ r = pthread_create(&t, NULL, &mupdate_client_start, NULL);
+ if(r == 0) {
+ pthread_detach(t);
+ } else {
+ syslog(LOG_ERR, "could not start client thread");
+ return EC_SOFTWARE;
+ }
+
+ /* Wait until they sync the database */
+ pthread_mutex_lock(&synced_mutex);
+ if(!synced)
+ pthread_cond_wait(&synced_cond, &synced_mutex);
+ pthread_mutex_unlock(&synced_mutex);
+ } else {
+ pthread_t t;
+
+ r = pthread_create(&t, NULL, &mupdate_placebo_kick_start, NULL);
+ if(r == 0) {
+ pthread_detach(t);
+ } else {
+ syslog(LOG_ERR, "could not start placebo kick thread");
+ return EC_SOFTWARE;
+ }
+
+ mupdate_ready();
+ }
+
+ /* Now create the worker thread pool */
+ for(i=0; i < workers_to_start; i++) {
+ r = pthread_create(&t, NULL, &thread_main, NULL);
+ if(r == 0) {
+ pthread_detach(t);
+ } else {
+ syslog(LOG_ERR, "could not start client thread");
+ return EC_SOFTWARE;
+ }
+ }
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+void fatal(const char *s, int code)
+{
+ static int recurse_code = 0;
+
+ if(recurse_code) exit(code);
+ else recurse_code = code;
+
+ syslog(LOG_ERR, "%s", s);
+ shut_down(code);
+
+ /* NOTREACHED */
+ exit(code); /* shut up GCC */
+}
+
+#define CHECKNEWLINE(c, ch) do { if ((ch) == '\r') (ch)=prot_getc((c)->pin); \
+ if ((ch) != '\n') goto extraargs; } while (0)
+
+mupdate_docmd_result_t docmd(struct conn *c)
+{
+ mupdate_docmd_result_t ret = DOCMD_OK;
+ int ch;
+ int was_blocking = prot_IS_BLOCKING(c->pin);
+ char *p;
+
+ nextcmd:
+ /* First we do a check for input */
+ prot_NONBLOCK(c->pin);
+ ch = prot_getc(c->pin);
+
+ if (ch == EOF && errno == EAGAIN) {
+ /* no input from client */
+ goto done;
+ } else if (ch == EOF) {
+ goto lost_conn;
+ } else {
+ /* there's input waiting, put back our character */
+ prot_ungetc(ch, c->pin);
+ }
+
+ /* Set it back to blocking so we don't get half a word */
+ prot_BLOCK(c->pin);
+
+ ch = getword(c->pin, &(c->tag));
+ if (ch == EOF) goto lost_conn;
+
+ /* send out any updates we have pending */
+ if (c->streaming) {
+ sendupdates(c, 0); /* don't flush pout though */
+ }
+
+ if (ch != ' ') {
+ prot_printf(c->pout, "* BAD \"Need command\"\r\n");
+ eatline(c->pin, ch);
+ goto nextcmd;
+ }
+
+ /* parse command name */
+ ch = getword(c->pin, &(c->cmd));
+ if(ch == EOF) {
+ goto lost_conn;
+ } else if (!c->cmd.s[0]) {
+ prot_printf(c->pout, "%s BAD \"Null command\"\r\n", c->tag.s);
+ eatline(c->pin, ch);
+ goto nextcmd;
+ }
+
+ if (islower((unsigned char) c->cmd.s[0])) {
+ c->cmd.s[0] = toupper((unsigned char) c->cmd.s[0]);
+ }
+ for (p = &(c->cmd.s[1]); *p; p++) {
+ if (isupper((unsigned char) *p)) *p = tolower((unsigned char) *p);
+ }
+
+ switch (c->cmd.s[0]) {
+ case 'A':
+ if (!strcmp(c->cmd.s, "Authenticate")) {
+ int opt = 0;
+
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg1));
+ if (ch == ' ') {
+ ch = getstring(c->pin, c->pout, &(c->arg2));
+ opt = 1;
+ }
+ CHECKNEWLINE(c, ch);
+
+ if (c->userid) {
+ prot_printf(c->pout,
+ "%s BAD \"already authenticated\"\r\n",
+ c->tag.s);
+ goto nextcmd;
+ }
+
+ cmd_authenticate(c, c->tag.s, c->arg1.s,
+ opt ? c->arg2.s : NULL);
+ }
+ else if (!c->userid) goto nologin;
+ else if (!strcmp(c->cmd.s, "Activate")) {
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg1));
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg2));
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg3));
+ CHECKNEWLINE(c, ch);
+
+ if (c->streaming) goto notwhenstreaming;
+ if (!masterp) goto masteronly;
+
+ cmd_set(c, c->tag.s, c->arg1.s, c->arg2.s,
+ c->arg3.s, SET_ACTIVE);
+ }
+ else goto badcmd;
+ break;
+
+ case 'D':
+ if (!c->userid) goto nologin;
+ else if (!strcmp(c->cmd.s, "Deactivate")) {
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg1));
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg2));
+ CHECKNEWLINE(c, ch);
+
+ if (c->streaming) goto notwhenstreaming;
+ if (!masterp) goto masteronly;
+
+ cmd_set(c, c->tag.s, c->arg1.s, c->arg2.s,
+ NULL, SET_DEACTIVATE);
+ }
+ else if (!strcmp(c->cmd.s, "Delete")) {
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg1));
+ CHECKNEWLINE(c, ch);
+
+ if (c->streaming) goto notwhenstreaming;
+ if (!masterp) goto masteronly;
+
+ cmd_set(c, c->tag.s, c->arg1.s, NULL, NULL, SET_DELETE);
+ }
+ else goto badcmd;
+ break;
+
+ case 'F':
+ if (!c->userid) goto nologin;
+ else if (!strcmp(c->cmd.s, "Find")) {
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg1));
+ CHECKNEWLINE(c, ch);
+
+ if (c->streaming) goto notwhenstreaming;
+
+ cmd_find(c, c->tag.s, c->arg1.s, 1, 0);
+ }
+ else goto badcmd;
+ break;
+
+ case 'L':
+ if (!strcmp(c->cmd.s, "Logout")) {
+ CHECKNEWLINE(c, ch);
+
+ prot_printf(c->pout, "%s OK \"bye-bye\"\r\n", c->tag.s);
+ ret = DOCMD_CONN_FINISHED;
+ goto done;
+ }
+ else if (!c->userid) goto nologin;
+ else if (!strcmp(c->cmd.s, "List")) {
+ int opt = 0;
+
+ if (ch == ' ') {
+ /* Optional partition/host prefix parameter */
+ ch = getstring(c->pin, c->pout, &(c->arg1));
+ opt = 1;
+ }
+ CHECKNEWLINE(c, ch);
+
+ if (c->streaming) goto notwhenstreaming;
+
+ cmd_list(c, c->tag.s, opt ? c->arg1.s : NULL);
+
+ prot_printf(c->pout, "%s OK \"list complete\"\r\n", c->tag.s);
+ }
+ else goto badcmd;
+ break;
+
+ case 'N':
+ if (!c->userid) goto nologin;
+ else if (!strcmp(c->cmd.s, "Noop")) {
+ CHECKNEWLINE(c, ch);
+
+ if (c->streaming) {
+ /* Make *very* sure we are up-to-date */
+ kick_mupdate();
+ sendupdates(c, 0); /* don't flush pout though */
+ }
+
+ prot_printf(c->pout, "%s OK \"Noop done\"\r\n", c->tag.s);
+ }
+ else goto badcmd;
+ break;
+
+ case 'R':
+ if (!c->userid) goto nologin;
+ else if (!strcmp(c->cmd.s, "Reserve")) {
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg1));
+ if (ch != ' ') goto missingargs;
+ ch = getstring(c->pin, c->pout, &(c->arg2));
+ CHECKNEWLINE(c, ch);
+
+ if (c->streaming) goto notwhenstreaming;
+ if (!masterp) goto masteronly;
+
+ cmd_set(c, c->tag.s, c->arg1.s, c->arg2.s, NULL, SET_RESERVE);
+ }
+ else goto badcmd;
+ break;
+
+ case 'S':
+ if (!strcmp(c->cmd.s, "Starttls")) {
+ CHECKNEWLINE(c, ch);
+
+ if (!tls_enabled()) {
+ /* we don't support starttls */
+ goto badcmd;
+ }
+
+ /* if we've already done SASL fail */
+ if (c->userid) {
+ prot_printf(c->pout,
+ "%s BAD Can't Starttls after authentication\r\n",
+ c->tag.s);
+ goto nextcmd;
+ }
+
+ /* check if already did a successful tls */
+ if (c->tlsconn) {
+ prot_printf(c->pout,
+ "%s BAD Already did a successful Starttls\r\n",
+ c->tag.s);
+ goto nextcmd;
+ }
+ cmd_starttls(c, c->tag.s);
+ }
+ else goto badcmd;
+ break;
+
+ case 'U':
+ if (!c->userid) goto nologin;
+ else if (!strcmp(c->cmd.s, "Update")) {
+ struct stringlist *arg = NULL;
+ int counter = 30; /* limit on number of processed hosts */
+
+ while(ch == ' ') {
+ /* Hey, look, more bits of a PARTIAL-UPDATE command */
+ ch = getstring(c->pin, c->pout, &(c->arg1));
+ if(c->arg1.s[0] == '\0') {
+ stringlist_free(&arg);
+ goto badargs;
+ }
+ if(counter-- == 0) {
+ stringlist_free(&arg);
+ goto extraargs;
+ }
+ stringlist_add(&arg,c->arg1.s);
+ }
+
+ CHECKNEWLINE(c, ch);
+ if (c->streaming) goto notwhenstreaming;
+
+ cmd_startupdate(c, c->tag.s, arg);
+ }
+ else goto badcmd;
+ break;
+
+ default:
+ badcmd:
+ prot_printf(c->pout, "%s BAD \"Unrecognized command\"\r\n",
+ c->tag.s);
+ eatline(c->pin, ch);
+ break;
+
+ extraargs:
+ prot_printf(c->pout, "%s BAD \"Extra arguments\"\r\n",
+ c->tag.s);
+ eatline(c->pin, ch);
+ break;
+
+ badargs:
+ prot_printf(c->pout, "%s BAD \"Badly formed arguments\"\r\n",
+ c->tag.s);
+ eatline(c->pin, ch);
+ break;
+
+ missingargs:
+ prot_printf(c->pout, "%s BAD \"Missing arguments\"\r\n",
+ c->tag.s);
+ eatline(c->pin, ch);
+ break;
+
+ notwhenstreaming:
+ prot_printf(c->pout, "%s BAD \"not legal when streaming\"\r\n",
+ c->tag.s);
+ break;
+
+ masteronly:
+ prot_printf(c->pout,
+ "%s BAD \"read-only session\"\r\n",
+ c->tag.s);
+ break;
+
+ nologin:
+ prot_printf(c->pout, "%s BAD Please login first\r\n", c->tag.s);
+ eatline(c->pin, ch);
+ break;
+ }
+
+ /* Check for more input */
+ goto nextcmd;
+
+ lost_conn:
+ {
+ const char *err;
+
+ if ((err = prot_error(c->pin)) != NULL
+ && strcmp(err, PROT_EOF_STRING)) {
+ syslog(LOG_WARNING, "%s, closing connection", err);
+ prot_printf(c->pout, "* BYE \"%s\"\r\n", err);
+ }
+
+ ret = DOCMD_CONN_FINISHED;
+ }
+
+ done:
+ /* Restore the state of the input stream */
+ if(was_blocking)
+ prot_BLOCK(c->pin);
+ else
+ prot_NONBLOCK(c->pin);
+
+ /* Necessary since we don't ever do a prot_read on an idle connection
+ * in mupdate */
+ prot_flush(c->pout);
+
+ return ret;
+}
+
+/*
+ * run for each accepted connection
+ */
+int service_main_fd(int fd,
+ int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ int flag;
+
+ /* First check that we can handle the new connection. */
+ pthread_mutex_lock(&connection_count_mutex); /* LOCK */
+ flag =
+ (connection_count >= config_getint(IMAPOPT_MUPDATE_CONNECTIONS_MAX));
+ pthread_mutex_unlock(&connection_count_mutex); /* UNLOCK */
+
+ if (flag) {
+ /* Do the nonblocking write, if it fails, too bad for them. */
+ nonblock(fd, 1);
+ write(fd,SERVER_UNABLE_STRING,sizeof(SERVER_UNABLE_STRING));
+ close(fd);
+
+ syslog(LOG_ERR,
+ "Server too busy, dropping connection.");
+ } else if(write(conn_pipe[1], &fd, sizeof(fd)) == -1) {
+ /* signal that a new file descriptor is available.
+ * If it fails... */
+
+ syslog(LOG_CRIT,
+ "write to conn_pipe to signal new connection failed: %m");
+ return EC_TEMPFAIL;
+ }
+ return 0;
+}
+
+/*
+ * Issue the capability banner
+ */
+static void dobanner(struct conn *c)
+{
+ char slavebuf[4096];
+ const char *mechs;
+ unsigned int mechcount;
+ int ret;
+
+ /* send initial the banner + flush pout */
+ ret = sasl_listmech(c->saslconn, NULL,
+ "* AUTH \"", "\" \"", "\"",
+ &mechs, NULL, &mechcount);
+
+ /* Add mupdate:// tag if necessary */
+ if(!masterp) {
+ if(!config_mupdate_server)
+ fatal("mupdate server was not specified for slave",
+ EC_TEMPFAIL);
+
+ snprintf(slavebuf, sizeof(slavebuf), "mupdate://%s",
+ config_mupdate_server);
+ }
+
+ prot_printf(c->pout, "%s\r\n",
+ (ret == SASL_OK && mechcount > 0) ? mechs : "* AUTH");
+
+ if (tls_enabled() && !c->tlsconn) {
+ prot_printf(c->pout, "* STARTTLS\r\n");
+ }
+
+ prot_printf(c->pout, "* PARTIAL-UPDATE\r\n");
+
+ prot_printf(c->pout,
+ "* OK MUPDATE \"%s\" \"Cyrus Murder\" \"%s\" \"%s\"\r\n",
+ config_servername,
+ CYRUS_VERSION, masterp ? "(master)" : slavebuf);
+
+ prot_flush(c->pout);
+}
+
+/*
+ * The main thread loop
+ */
+/* Note that You Must Lock Listen mutex before idle worker mutex,
+ * though you can lock them individually too */
+static void *thread_main(void *rock __attribute__((unused)))
+{
+ struct conn *C; /* used for loops */
+ struct conn *currConn = NULL; /* the connection we care about currently */
+ struct protgroup *protin = protgroup_new(PROTGROUP_SIZE_DEFAULT);
+ struct protgroup *protout = NULL;
+ struct timeval now;
+ struct timespec timeout;
+ int need_workers, too_many;
+ int max_worker_flag;
+ int do_a_command;
+ int send_a_banner;
+ int connflag;
+ int new_fd;
+ int ret = 0;
+
+ /* Lock Worker Count Mutex */
+ pthread_mutex_lock(&worker_count_mutex); /* LOCK */
+ /* Change total number of workers */
+ worker_count++;
+ syslog(LOG_DEBUG,
+ "New worker thread started, for a total of %d", worker_count);
+ /* Unlock Worker Count Mutex */
+ pthread_mutex_unlock(&worker_count_mutex); /* UNLOCK */
+
+ /* This is a big infinite loop */
+ while(1) {
+ send_a_banner = do_a_command = 0;
+
+ pthread_mutex_lock(&idle_worker_mutex);
+ /* If we are over the limit on idle threads, die. */
+ max_worker_flag = (idle_worker_count >=
+ config_getint(IMAPOPT_MUPDATE_WORKERS_MAXSPARE));
+ /* Increment Idle Workers */
+ if(!max_worker_flag) idle_worker_count++;
+ pthread_mutex_unlock(&idle_worker_mutex);
+
+ if(max_worker_flag) goto worker_thread_done;
+
+ retry_lock:
+
+ /* Lock Listen Mutex - If locking takes more than 60 seconds,
+ * kill off this thread. Ideally this is a FILO queue */
+ pthread_mutex_lock(&listener_mutex); /* LOCK */
+ ret = 0;
+ while(listener_lock && ret != ETIMEDOUT) {
+ gettimeofday(&now, NULL);
+ timeout.tv_sec = now.tv_sec + 60;
+ timeout.tv_nsec = now.tv_usec * 1000;
+ ret = pthread_cond_timedwait(&listener_cond,
+ &listener_mutex,
+ &timeout);
+ }
+ if(!ret) {
+ /* Set listener lock until we decide what to do */
+ listener_lock = 1;
+ }
+ pthread_mutex_unlock(&listener_mutex); /* UNLOCK */
+
+ if(ret == ETIMEDOUT) {
+ if(idle_worker_count <= config_getint(IMAPOPT_MUPDATE_WORKERS_MINSPARE)) {
+ /* below number of spare workers, try to get the lock again */
+ goto retry_lock;
+ } else {
+ /* Decrement Idle Worker Count */
+ pthread_mutex_lock(&idle_worker_mutex); /* LOCK */
+ idle_worker_count--;
+ pthread_mutex_unlock(&idle_worker_mutex); /* UNLOCK */
+
+ syslog(LOG_DEBUG,
+ "Thread timed out waiting for listener_lock");
+ goto worker_thread_done;
+ }
+ }
+
+ signals_poll();
+
+ /* Check if we are ready for connections, if not, wait */
+ pthread_mutex_lock(&ready_for_connections_mutex); /* LOCK */
+ /* are we ready to take connections? */
+ while(!ready_for_connections) {
+ pthread_cond_wait(&ready_for_connections_cond,
+ &ready_for_connections_mutex);
+ }
+ pthread_mutex_unlock(&ready_for_connections_mutex); /* UNLOCK */
+
+ connflag = 0;
+
+ /* Reset protin to all zeros (to preserve memory allocation) */
+ protgroup_reset(protin);
+
+ /* Clear protout if needed */
+ protgroup_free(protout);
+ protout = NULL;
+
+ /* Build list of idle protstreams */
+ pthread_mutex_lock(&idle_connlist_mutex); /* LOCK */
+ for(C=idle_connlist; C; C=C->next_idle) {
+ assert(C->idle);
+
+ protgroup_insert(protin, C->pin);
+ }
+ pthread_mutex_unlock(&idle_connlist_mutex); /* UNLOCK */
+
+ /* Select on Idle Conns + conn_pipe */
+ if(prot_select(protin, conn_pipe[0],
+ &protout, &connflag, NULL) == -1) {
+ syslog(LOG_ERR, "prot_select() failed in thread_main: %m");
+ fatal("prot_select() failed in thread_main", EC_TEMPFAIL);
+ }
+
+ /* Decrement Idle Worker Count */
+ pthread_mutex_lock(&worker_count_mutex); /* LOCK */
+ pthread_mutex_lock(&idle_worker_mutex); /* LOCK */
+ idle_worker_count--;
+
+ need_workers = config_getint(IMAPOPT_MUPDATE_WORKERS_MINSPARE)
+ - idle_worker_count;
+
+ if(need_workers > 0) {
+ too_many = (need_workers + worker_count) -
+ config_getint(IMAPOPT_MUPDATE_WORKERS_MAX);
+ if (too_many > 0) need_workers -= too_many;
+ }
+
+ /* Do we need a new worker (or two, or three...)?
+ * (are we allowed to create one?) */
+ while(need_workers > 0) {
+ pthread_t t;
+ int r = pthread_create(&t, NULL, &thread_main, NULL);
+ if(r == 0) {
+ pthread_detach(t);
+ } else {
+ syslog(LOG_ERR,
+ "could not start a new worker thread (not fatal)");
+ }
+ /* Even if we fail to create the new thread, keep going */
+ need_workers--;
+ }
+ pthread_mutex_unlock(&idle_worker_mutex); /* UNLOCK */
+ pthread_mutex_unlock(&worker_count_mutex); /* UNLOCK */
+
+ /* If we've been signaled to be unready, drop all current connections
+ * in the idle list */
+ if(!ready_for_connections) {
+ /* Free all connections on idle_connlist. Note that
+ * any connection not currently on the idle_connlist will
+ * instead be freed when they drop out of their docmd() below */
+ pthread_mutex_lock(&idle_connlist_mutex); /* LOCK */
+ for(C=idle_connlist; C; C=C->next_idle) {
+ prot_printf(C->pout,
+ "* BYE \"no longer ready for connections\"\r\n");
+
+ C->idle = 0;
+ conn_free(C);
+ }
+ idle_connlist = NULL;
+ pthread_mutex_unlock(&idle_connlist_mutex); /* UNLOCK */
+
+ goto nextlistener;
+ }
+
+ if(connflag) {
+ /* read the fd from the pipe, if needed */
+ if(read(conn_pipe[0], &new_fd, sizeof(new_fd)) == -1) {
+ syslog(LOG_CRIT,
+ "read from conn_pipe for new connection failed: %m");
+ fatal("conn_pipe read failed", EC_TEMPFAIL);
+ }
+ } else {
+ new_fd = NO_NEW_CONNECTION;
+ }
+
+ if(new_fd != NO_NEW_CONNECTION) {
+ /* new_fd indicates a new connection */
+ currConn = conn_new(new_fd);
+ if(currConn)
+ send_a_banner = 1;
+ } else if(protout) {
+ /* Handle existing connection, we'll need to pull it off
+ * the idle_connlist */
+ struct protstream *ptmp;
+ struct conn **prev;
+
+ pthread_mutex_lock(&idle_connlist_mutex); /* LOCK */
+ prev = &(idle_connlist);
+
+ /* Grab the first connection out of the ready set, and use it */
+ ptmp = protgroup_getelement(protout, 0);
+ assert(ptmp);
+ currConn = ptmp->userdata;
+ assert(currConn);
+
+ currConn->idle = 0;
+ for(C=idle_connlist; C; prev = &(C->next_idle), C=C->next_idle) {
+ if(C == currConn) {
+ *prev = C->next_idle;
+ C->next_idle = NULL;
+ break;
+ }
+ }
+ pthread_mutex_unlock(&idle_connlist_mutex); /* UNLOCK */
+
+ do_a_command = 1;
+ }
+
+ nextlistener:
+ /* Let another listener in */
+ pthread_mutex_lock(&listener_mutex);
+ assert(listener_lock);
+ listener_lock = 0;
+ pthread_cond_signal(&listener_cond);
+ pthread_mutex_unlock(&listener_mutex);
+
+ /* Do work in this thread, if needed */
+ if(send_a_banner) {
+ dobanner(currConn);
+ } else if(do_a_command) {
+ assert(currConn);
+
+ if(docmd(currConn) == DOCMD_CONN_FINISHED) {
+ conn_free(currConn);
+ /* continue to top of loop here since we won't be adding
+ * this back to the idle list */
+ continue;
+ }
+
+ /* Are we allowed to continue serving data? */
+ if(!ready_for_connections) {
+ prot_printf(C->pout,
+ "* BYE \"no longer ready for connections\"\r\n");
+ conn_free(currConn);
+ /* continue to top of loop here since we won't be adding
+ * this back to the idle list */
+ continue;
+ }
+ } /* done handling command */
+
+ if(send_a_banner || do_a_command) {
+ /* We did work in this thread, so we need to [re-]add the
+ * connection to the idle list and signal the current listner */
+
+ pthread_mutex_lock(&idle_connlist_mutex); /* LOCK */
+ currConn->idle = 1;
+ currConn->next_idle = idle_connlist;
+ idle_connlist = currConn;
+ pthread_mutex_unlock(&idle_connlist_mutex); /* UNLOCK */
+
+ /* Signal to our caller that we should add something
+ * to select() on, since this connection is ready again */
+ if(write(conn_pipe[1], &NO_NEW_CONNECTION,
+ sizeof(NO_NEW_CONNECTION)) == -1) {
+ fatal("write to conn_pipe to signal docmd done failed",
+ EC_TEMPFAIL);
+ }
+ }
+
+ } /* while(1) */
+
+ worker_thread_done:
+ /* Remove this worker from the pool */
+ /* Note that workers exiting the loop above should NOT be counted
+ * in the idle_worker_count */
+ pthread_mutex_lock(&worker_count_mutex); /* LOCK */
+ worker_count--;
+ syslog(LOG_DEBUG,
+ "Worker thread finished, for a total of %d (%d spare)",
+ worker_count, idle_worker_count);
+ pthread_mutex_unlock(&worker_count_mutex); /* UNLOCK */
+
+ protgroup_free(protin);
+ protgroup_free(protout);
+
+ return NULL;
+}
+
+/* read from disk database must be unlocked. */
+void database_init()
+{
+ pthread_mutex_lock(&mailboxes_mutex); /* LOCK */
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ pthread_mutex_unlock(&mailboxes_mutex); /* UNLOCK */
+}
+
+/* log change to database. database must be locked. */
+void database_log(const struct mbent *mb, struct txn **mytid)
+{
+ switch (mb->t) {
+ case SET_ACTIVE:
+ mboxlist_insertremote(mb->mailbox, 0, mb->server, mb->acl, mytid);
+ break;
+
+ case SET_RESERVE:
+ mboxlist_insertremote(mb->mailbox, MBTYPE_RESERVE, mb->server,
+ "", mytid);
+ break;
+
+ case SET_DELETE:
+ mboxlist_deleteremote(mb->mailbox, mytid);
+ break;
+
+ case SET_DEACTIVATE:
+ /* SET_DEACTIVATE is not a real value that an actual
+ mailbox can have! */
+ abort();
+ }
+}
+
+/* lookup in database. database must be locked */
+/* This could probabally be more efficient and avoid some copies */
+/* passing in a NULL pool implies that we should use regular xmalloc,
+ * a non-null pool implies we should use the mpool functionality */
+struct mbent *database_lookup(const char *name, struct mpool *pool)
+{
+ char *part, *acl;
+ int type;
+ struct mbent *out;
+
+ if(!name) return NULL;
+
+ if(mboxlist_detail(name, &type, NULL, NULL, &part, &acl, NULL))
+ return NULL;
+
+ if(type & MBTYPE_RESERVE) {
+ if(!pool) out = xmalloc(sizeof(struct mbent) + 1);
+ else out = mpool_malloc(pool, sizeof(struct mbent) + 1);
+ out->t = SET_RESERVE;
+ out->acl[0] = '\0';
+ } else {
+ if(!pool) out = xmalloc(sizeof(struct mbent) + strlen(acl));
+ else out = mpool_malloc(pool, sizeof(struct mbent) + strlen(acl));
+ out->t = SET_ACTIVE;
+ strcpy(out->acl, acl);
+ }
+
+ out->mailbox = (pool) ? mpool_strdup(pool, name) : xstrdup(name);
+ out->server = (pool) ? mpool_strdup(pool, part) : xstrdup(part);
+
+ return out;
+}
+
+void cmd_authenticate(struct conn *C,
+ const char *tag, const char *mech,
+ const char *clientstart)
+{
+ int r, sasl_result;
+
+ r = saslserver(C->saslconn, mech, clientstart, "", "", "",
+ C->pin, C->pout, &sasl_result, NULL);
+
+ if (r) {
+ const char *errorstring = NULL;
+
+ switch (r) {
+ case IMAP_SASL_CANCEL:
+ prot_printf(C->pout,
+ "%s NO Client canceled authentication\r\n", tag);
+ break;
+ case IMAP_SASL_PROTERR:
+ errorstring = prot_error(C->pin);
+
+ prot_printf(C->pout,
+ "%s NO Error reading client response: %s\r\n",
+ tag, errorstring ? errorstring : "");
+ break;
+ default:
+ sleep(3);
+
+ syslog(LOG_ERR, "badlogin: %s %s %s",
+ C->clienthost,
+ mech, sasl_errdetail(C->saslconn));
+
+ prot_printf(C->pout, "%s NO \"%s\"\r\n", tag,
+ sasl_errstring((r == SASL_NOUSER ? SASL_BADAUTH : r),
+ NULL, NULL));
+ }
+
+ reset_saslconn(C);
+ return;
+ }
+
+ /* Successful Authentication */
+ r = sasl_getprop(C->saslconn, SASL_USERNAME, (const void **)&C->userid);
+ if(r != SASL_OK) {
+ prot_printf(C->pout, "%s NO \"SASL Error\"\r\n", tag);
+ reset_saslconn(C);
+ return;
+ }
+
+ syslog(LOG_NOTICE, "login: %s %s %s%s %s", C->clienthost, C->userid,
+ mech, C->tlsconn ? "+TLS" : "", "User logged in");
+
+ prot_printf(C->pout, "%s OK \"Authenticated\"\r\n", tag);
+
+ prot_setsasl(C->pin, C->saslconn);
+ prot_setsasl(C->pout, C->saslconn);
+
+ C->logfd = telemetry_log(C->userid, C->pin, C->pout, 1);
+
+ return;
+}
+
+/* Log the update out to anyone who is in our updatelist */
+/* INVARIANT: caller MUST hold mailboxes_mutex */
+/* oldserver is the previous value of the server in this update,
+ thisserver is the current value of the mailbox's server */
+void log_update(const char *mailbox,
+ const char *oldserver,
+ const char *thisserver)
+{
+ struct conn *upc;
+
+ for (upc = updatelist; upc != NULL; upc = upc->updatelist_next) {
+ /* for each connection, add to pending list */
+ struct pending *p = (struct pending *) xmalloc(sizeof(struct pending));
+ strlcpy(p->mailbox, mailbox, sizeof(p->mailbox));
+
+ /* this might need to be inside the mutex, but I doubt it */
+ if(upc->streaming_hosts
+ && (!oldserver || !stringlist_contains(upc->streaming_hosts,
+ oldserver))
+ && (!thisserver || !stringlist_contains(upc->streaming_hosts,
+ thisserver))) {
+ /* No Match! Continue! */
+ continue;
+ }
+
+ pthread_mutex_lock(&upc->m);
+ p->next = upc->plist;
+ upc->plist = p;
+
+ pthread_cond_signal(&upc->cond);
+ pthread_mutex_unlock(&upc->m);
+ }
+}
+
+void cmd_set(struct conn *C,
+ const char *tag, const char *mailbox,
+ const char *server, const char *acl, enum settype t)
+{
+ struct mbent *m;
+ char *oldserver = NULL;
+ char *thisserver = NULL;
+ char *tmp;
+
+ /* Hold any output that we need to do */
+ enum {
+ EXISTS, NOTACTIVE, DOESNTEXIST, ISOK, NOOUTPUT
+ } msg = NOOUTPUT;
+
+ syslog(LOG_DEBUG, "cmd_set(fd:%d, %s)", C->fd, mailbox);
+
+ pthread_mutex_lock(&mailboxes_mutex); /* LOCK */
+
+ m = database_lookup(mailbox, NULL);
+ if (m && t == SET_RESERVE) {
+ if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_STANDARD) {
+ /* failed; mailbox already exists */
+ msg = EXISTS;
+ goto done;
+ }
+ /* otherwise do nothing (local create on master) */
+ }
+
+ if ((!m || m->t != SET_ACTIVE) && t == SET_DEACTIVATE) {
+ /* failed; mailbox not currently active */
+ msg = NOTACTIVE;
+ goto done;
+ } else if (t == SET_DEACTIVATE) {
+ t = SET_RESERVE;
+ }
+
+ if (t == SET_DELETE) {
+ if (!m) {
+ if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_STANDARD) {
+ /* failed; mailbox doesn't exist */
+ msg = DOESNTEXIST;
+ goto done;
+ }
+ /* otherwise do nothing (local delete on master) */
+ } else {
+ oldserver = xstrdup(m->server);
+
+ /* do the deletion */
+ m->t = SET_DELETE;
+ }
+ } else {
+ if(m)
+ oldserver = m->server;
+
+ if (m && (!acl || strlen(acl) < strlen(m->acl))) {
+ /* change what's already there -- the acl is smaller */
+ m->server = xstrdup(server);
+ if (acl) strcpy(m->acl, acl);
+ else m->acl[0] = '\0';
+
+ m->t = t;
+ } else {
+ struct mbent *newm;
+
+ /* allocate new mailbox */
+ if (acl) {
+ newm = xrealloc(m, sizeof(struct mbent) + strlen(acl));
+ } else {
+ newm = xrealloc(m, sizeof(struct mbent) + 1);
+ }
+ newm->mailbox = xstrdup(mailbox);
+ newm->server = xstrdup(server);
+ if (acl) {
+ strcpy(newm->acl, acl);
+ } else {
+ newm->acl[0] = '\0';
+ }
+
+ newm->t = t;
+
+ /* re-scope */
+ m = newm;
+ }
+ }
+
+ /* write to disk */
+ if (m) database_log(m, NULL);
+
+ if(oldserver) {
+ tmp = strchr(oldserver, '!');
+ if(tmp) *tmp = '\0';
+ }
+
+ if(server) {
+ thisserver = xstrdup(server);
+ tmp = strchr(thisserver, '!');
+ if(tmp) *tmp = '\0';
+ }
+
+ /* post pending changes */
+ log_update(mailbox, oldserver, thisserver);
+
+ msg = ISOK;
+ done:
+ if(thisserver) free(thisserver);
+ if(oldserver) free(oldserver);
+ free_mbent(m);
+ pthread_mutex_unlock(&mailboxes_mutex); /* UNLOCK */
+
+ /* Delay output until here to avoid blocking while holding
+ * mailboxes_mutex */
+ switch(msg) {
+ case EXISTS:
+ prot_printf(C->pout, "%s NO \"mailbox already exists\"\r\n", tag);
+ break;
+ case NOTACTIVE:
+ prot_printf(C->pout, "%s NO \"mailbox not currently active\"\r\n",
+ tag);
+ break;
+ case DOESNTEXIST:
+ prot_printf(C->pout, "%s NO \"mailbox doesn't exist\"\r\n", tag);
+ break;
+ case ISOK:
+ prot_printf(C->pout, "%s OK \"done\"\r\n", tag);
+ break;
+ default:
+ break;
+ }
+}
+
+void cmd_find(struct conn *C, const char *tag, const char *mailbox,
+ int send_ok, int send_delete)
+{
+ struct mbent *m;
+
+ syslog(LOG_DEBUG, "cmd_find(fd:%d, %s)", C->fd, mailbox);
+
+ /* Only hold the mutex around database_lookup,
+ * since the mbent stays valid even if the database changes,
+ * and we don't want to block on network I/O */
+ pthread_mutex_lock(&mailboxes_mutex); /* LOCK */
+ m = database_lookup(mailbox, NULL);
+ pthread_mutex_unlock(&mailboxes_mutex); /* UNLOCK */
+
+ if (m && m->t == SET_ACTIVE) {
+ prot_printf(C->pout, "%s MAILBOX {%d+}\r\n%s {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag,
+ strlen(m->mailbox), m->mailbox,
+ strlen(m->server), m->server,
+ strlen(m->acl), m->acl);
+ } else if (m && m->t == SET_RESERVE) {
+ prot_printf(C->pout, "%s RESERVE {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ tag,
+ strlen(m->mailbox), m->mailbox,
+ strlen(m->server), m->server);
+ } else if (send_delete) {
+ /* not found, if needed, send a delete */
+ prot_printf(C->pout, "%s DELETE {%d+}\r\n%s\r\n",
+ tag, strlen(mailbox), mailbox);
+ }
+
+ free_mbent(m);
+
+ if (send_ok) {
+ prot_printf(C->pout, "%s OK \"Search completed\"\r\n", tag);
+ }
+}
+
+/* Callback for cmd_startupdate to be passed to mboxlist_findall. */
+/* Requires that C->streaming be set to the tag to respond with */
+static int sendupdate(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct conn *C = (struct conn *)rock;
+ struct mbent *m;
+ char *server = NULL;
+
+ if(!C) return -1;
+
+ m = database_lookup(name, NULL);
+ if(!m) return -1;
+
+ if(!C->list_prefix ||
+ !strncmp(m->server, C->list_prefix, C->list_prefix_len)) {
+ /* Either there is not a prefix to test, or we matched it */
+ char *tmp;
+
+ if(C->streaming_hosts) {
+ server = xstrdup(m->server);
+ tmp = strchr(server, '!');
+ if(tmp) *tmp = '\0';
+ }
+
+ if(!C->streaming_hosts ||
+ stringlist_contains(C->streaming_hosts, server)) {
+ switch (m->t) {
+ case SET_ACTIVE:
+ prot_printf(C->pout,
+ "%s MAILBOX {%d+}\r\n%s {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ C->streaming,
+ strlen(m->mailbox), m->mailbox,
+ strlen(m->server), m->server,
+ strlen(m->acl), m->acl);
+ break;
+ case SET_RESERVE:
+ prot_printf(C->pout, "%s RESERVE {%d+}\r\n%s {%d+}\r\n%s\r\n",
+ C->streaming,
+ strlen(m->mailbox), m->mailbox,
+ strlen(m->server), m->server);
+ break;
+
+ case SET_DELETE:
+ /* deleted item in the list !?! */
+ case SET_DEACTIVATE:
+ /* SET_DEACTIVATE is not a real value! */
+ abort();
+ }
+ }
+ }
+
+ if(server) free(server);
+ free_mbent(m);
+ return 0;
+}
+
+void cmd_list(struct conn *C, const char *tag, const char *host_prefix)
+{
+ char pattern[2] = {'*','\0'};
+
+ /* List operations can result in a lot of output, let's do this
+ * with the prot layer nonblocking so we don't hold the mutex forever*/
+ prot_NONBLOCK(C->pout);
+
+ /* indicate interest in updates */
+ pthread_mutex_lock(&mailboxes_mutex); /* LOCK */
+
+ /* since this isn't valid when streaming, just use the same callback */
+ C->streaming = tag;
+ C->list_prefix = host_prefix;
+ if(C->list_prefix) C->list_prefix_len = strlen(C->list_prefix);
+ else C->list_prefix_len = 0;
+
+ mboxlist_findall(NULL, pattern, 1, NULL,
+ NULL, sendupdate, (void*)C);
+
+ C->streaming = NULL;
+ C->list_prefix = NULL;
+ C->list_prefix_len = 0;
+
+ pthread_mutex_unlock(&mailboxes_mutex); /* UNLOCK */
+
+ prot_BLOCK(C->pout);
+ prot_flush(C->pout);
+}
+
+
+/*
+ * we've registered this connection for streaming, and every X seconds
+ * this will be invoked. note that we always send out updates as soon
+ * as we get a noop: that resets this counter back */
+struct prot_waitevent *sendupdates_evt(struct protstream *s __attribute__((unused)),
+ struct prot_waitevent *ev,
+ void *rock)
+{
+ struct conn *C = (struct conn *) rock;
+
+ sendupdates(C, 1);
+
+ /* 'sendupdates()' will update when we next trigger */
+ return ev;
+}
+
+void cmd_startupdate(struct conn *C, const char *tag,
+ struct stringlist *partial)
+{
+ char pattern[2] = {'*','\0'};
+
+ /* initialize my condition variable */
+ pthread_cond_init(&C->cond, NULL);
+
+ /* The inital dump of the database can result in a lot of data,
+ * let's do this nonblocking */
+ prot_NONBLOCK(C->pout);
+
+ /* indicate interest in updates */
+ pthread_mutex_lock(&mailboxes_mutex); /* LOCK */
+
+ C->updatelist_next = updatelist;
+ updatelist = C;
+ C->streaming = xstrdup(tag);
+ C->streaming_hosts = partial;
+
+ /* dump initial list */
+ mboxlist_findall(NULL, pattern, 1, NULL,
+ NULL, sendupdate, (void*)C);
+
+ pthread_mutex_unlock(&mailboxes_mutex); /* UNLOCK */
+
+ prot_printf(C->pout, "%s OK \"streaming starts\"\r\n", tag);
+
+ prot_BLOCK(C->pout);
+ prot_flush(C->pout);
+
+ /* schedule our first update */
+ C->ev = prot_addwaitevent(C->pin, time(NULL) + update_wait,
+ sendupdates_evt, C);
+}
+
+/* send out any pending updates.
+ if 'flushnow' is set, flush the output buffer */
+void sendupdates(struct conn *C, int flushnow)
+{
+ struct pending *p, *q;
+
+ pthread_mutex_lock(&C->m);
+
+ /* just grab the update list and release the lock */
+ p = C->plist;
+ C->plist = NULL;
+ pthread_mutex_unlock(&C->m);
+
+ while (p != NULL) {
+ /* send update */
+ q = p;
+ p = p->next;
+
+ /* notify just like a FIND - except enable sending of DELETE
+ * notifications */
+ cmd_find(C, C->streaming, q->mailbox, 0, 1);
+
+ free(q);
+ }
+
+ /* reschedule event for 'update_wait' seconds */
+ C->ev->mark = time(NULL) + update_wait;
+
+ if (flushnow) {
+ prot_flush(C->pout);
+ }
+}
+
+#ifdef HAVE_SSL
+void cmd_starttls(struct conn *C, const char *tag)
+{
+ int result;
+ int *layerp;
+
+ char *auth_id;
+ sasl_ssf_t ssf;
+
+ /* SASL and openssl have different ideas about whether ssf is signed */
+ layerp = (int *) &ssf;
+
+ result=tls_init_serverengine("mupdate",
+ 5, /* depth to verify */
+ 1, /* can client auth? */
+ 1); /* TLS only? */
+
+ if (result == -1) {
+
+ syslog(LOG_ERR, "error initializing TLS");
+
+ prot_printf(C->pout, "%s NO Error initializing TLS\r\n", tag);
+
+ return;
+ }
+
+ prot_printf(C->pout, "%s OK Begin TLS negotiation now\r\n", tag);
+ /* must flush our buffers before starting tls */
+ prot_flush(C->pout);
+
+ result=tls_start_servertls(C->pin->fd, /* read */
+ C->pout->fd, /* write */
+ layerp,
+ &auth_id,
+ &C->tlsconn);
+
+ /* if error */
+ if (result==-1) {
+ prot_printf(C->pout, "%s NO Starttls negotiation failed\r\n",
+ tag);
+ syslog(LOG_NOTICE, "STARTTLS negotiation failed: %s",
+ C->clienthost);
+ return;
+ }
+
+ /* tell SASL about the negotiated layer */
+ result = sasl_setprop(C->saslconn, SASL_SSF_EXTERNAL, &ssf);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ C->saslprops.ssf = ssf;
+
+ result = sasl_setprop(C->saslconn, SASL_AUTH_EXTERNAL, auth_id);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ if(C->saslprops.authid) {
+ free(C->saslprops.authid);
+ C->saslprops.authid = NULL;
+ }
+ if(auth_id)
+ C->saslprops.authid = xstrdup(auth_id);
+
+ /* tell the prot layer about our new layers */
+ prot_settls(C->pin, C->tlsconn);
+ prot_settls(C->pout, C->tlsconn);
+
+ /* Reissue capability banner */
+ dobanner(C);
+}
+#else
+void cmd_starttls(struct conn *C, const char *tag)
+{
+ fatal("cmd_starttls() executed, but starttls isn't implemented!",
+ EC_SOFTWARE);
+}
+#endif /* HAVE_SSL */
+
+void shut_down(int code) __attribute__((noreturn));
+void shut_down(int code)
+{
+ cyrus_done();
+
+ exit(code);
+}
+
+/* Reset the given sasl_conn_t to a sane state */
+static int reset_saslconn(struct conn *c)
+{
+ int ret, secflags;
+ sasl_security_properties_t *secprops = NULL;
+
+ sasl_dispose(&c->saslconn);
+ /* do initialization typical of service_main */
+ ret = sasl_server_new("mupdate", config_servername,
+ NULL, NULL, NULL,
+ NULL, 0, &c->saslconn);
+ if(ret != SASL_OK) return ret;
+
+ if(c->saslprops.ipremoteport)
+ ret = sasl_setprop(c->saslconn, SASL_IPREMOTEPORT,
+ c->saslprops.ipremoteport);
+ if(ret != SASL_OK) return ret;
+
+ if(c->saslprops.iplocalport)
+ ret = sasl_setprop(c->saslconn, SASL_IPLOCALPORT,
+ c->saslprops.iplocalport);
+ if(ret != SASL_OK) return ret;
+
+ secflags = SASL_SEC_NOANONYMOUS;
+ if (!config_getswitch(IMAPOPT_ALLOWPLAINTEXT)) {
+ secflags |= SASL_SEC_NOPLAINTEXT;
+ }
+ secprops = mysasl_secprops(secflags);
+ ret = sasl_setprop(c->saslconn, SASL_SEC_PROPS, secprops);
+ if(ret != SASL_OK) return ret;
+ /* end of service_main initialization excepting SSF */
+
+ /* If we have TLS/SSL info, set it */
+ if(c->saslprops.ssf) {
+ ret = sasl_setprop(c->saslconn, SASL_SSF_EXTERNAL, &c->saslprops.ssf);
+ }
+ if(ret != SASL_OK) return ret;
+
+ if(c->saslprops.authid) {
+ ret = sasl_setprop(c->saslconn, SASL_AUTH_EXTERNAL, c->saslprops.authid);
+ if(ret != SASL_OK) return ret;
+ }
+ /* End TLS/SSL Info */
+
+ return SASL_OK;
+}
+
+int cmd_change(struct mupdate_mailboxdata *mdata,
+ const char *rock, void *context __attribute__((unused)))
+{
+ struct mbent *m = NULL;
+ char *oldserver = NULL;
+ char *thisserver = NULL;
+ char *tmp;
+ enum settype t = -1;
+ int ret = 0;
+
+ if(!mdata || !rock || !mdata->mailbox) return 1;
+
+ pthread_mutex_lock(&mailboxes_mutex); /* LOCK */
+
+ if(!strncmp(rock, "DELETE", 6)) {
+ m = database_lookup(mdata->mailbox, NULL);
+
+ if(!m) {
+ syslog(LOG_DEBUG, "attempt to delete unknown mailbox %s",
+ mdata->mailbox);
+ /* Mailbox doesn't exist - this isn't as fatal as you might
+ * think. */
+ /* ret = -1; */
+ goto done;
+ }
+ m->t = t = SET_DELETE;
+
+ oldserver = xstrdup(m->server);
+ } else {
+ m = database_lookup(mdata->mailbox, NULL);
+
+ if(m)
+ oldserver = m->server;
+
+ if (m && (!mdata->acl || strlen(mdata->acl) < strlen(m->acl))) {
+ /* change what's already there */
+ /* old m->server freed when oldserver is freed */
+ m->server = xstrdup(mdata->server);
+
+ if (mdata->acl) strcpy(m->acl, mdata->acl);
+ else m->acl[0] = '\0';
+
+ if(!strncmp(rock, "MAILBOX", 6)) {
+ m->t = t = SET_ACTIVE;
+ } else if(!strncmp(rock, "RESERVE", 7)) {
+ m->t = t = SET_RESERVE;
+ } else {
+ syslog(LOG_DEBUG,
+ "bad mupdate command in cmd_change: %s", rock);
+ ret = 1;
+ goto done;
+ }
+ } else {
+ struct mbent *newm;
+
+ if(m) {
+ free(m->mailbox);
+ /* m->server freed when oldserver freed */
+ }
+
+ /* allocate new mailbox */
+ if (mdata->acl) {
+ newm = xrealloc(m, sizeof(struct mbent) + strlen(mdata->acl));
+ } else {
+ newm = xrealloc(m, sizeof(struct mbent) + 1);
+ }
+
+ newm->mailbox = xstrdup(mdata->mailbox);
+ newm->server = xstrdup(mdata->server);
+
+ if (mdata->acl) {
+ strcpy(newm->acl, mdata->acl);
+ } else {
+ newm->acl[0] = '\0';
+ }
+
+ if(!strncmp(rock, "MAILBOX", 6)) {
+ newm->t = t = SET_ACTIVE;
+ } else if(!strncmp(rock, "RESERVE", 7)) {
+ newm->t = t = SET_RESERVE;
+ } else {
+ syslog(LOG_DEBUG,
+ "bad mupdate command in cmd_change: %s", rock);
+ ret = 1;
+ goto done;
+ }
+
+ /* Bring it back into scope */
+ m = newm;
+ }
+ }
+
+ /* write to disk */
+ database_log(m, NULL);
+
+ if(oldserver) {
+ tmp = strchr(oldserver, '!');
+ if(tmp) *tmp = '\0';
+ }
+
+ if(mdata->server) {
+ thisserver = xstrdup(mdata->server);
+ tmp = strchr(thisserver, '!');
+ if(tmp) *tmp = '\0';
+ }
+
+ /* post pending changes to anyone we are talking to */
+ log_update(mdata->mailbox, oldserver, thisserver);
+
+ done:
+ if(oldserver) free(oldserver);
+ if(thisserver) free(thisserver);
+
+ free_mbent(m);
+ pthread_mutex_unlock(&mailboxes_mutex); /* UNLOCK */
+
+ return ret;
+}
+
+struct sync_rock
+{
+ struct mpool *pool;
+ struct mbent_queue *boxes;
+};
+
+/* Read a series of MAILBOX and RESERVE commands and tack them onto a
+ * queue */
+int cmd_resync(struct mupdate_mailboxdata *mdata,
+ const char *rock, void *context)
+{
+ struct sync_rock *r = (struct sync_rock *)context;
+ struct mbent_queue *remote_boxes = r->boxes;
+ struct mbent *newm = NULL;
+
+ if(!mdata || !rock || !mdata->mailbox || !remote_boxes) return 1;
+
+ /* allocate new mailbox */
+ if (mdata->acl) {
+ newm = mpool_malloc(r->pool,sizeof(struct mbent) + strlen(mdata->acl));
+ } else {
+ newm = mpool_malloc(r->pool,sizeof(struct mbent) + 1);
+ }
+
+ newm->mailbox = mpool_strdup(r->pool, mdata->mailbox);
+ newm->server = mpool_strdup(r->pool, mdata->server);
+
+ if (mdata->acl) {
+ strcpy(newm->acl, mdata->acl);
+ } else {
+ newm->acl[0] = '\0';
+ }
+
+ if(!strncmp(rock, "MAILBOX", 6)) {
+ newm->t = SET_ACTIVE;
+ } else if(!strncmp(rock, "RESERVE", 7)) {
+ newm->t = SET_RESERVE;
+ } else {
+ syslog(LOG_NOTICE,
+ "bad mupdate command in cmd_resync: %s", rock);
+ return 1;
+ }
+
+ /* Insert onto queue */
+ newm->next = NULL;
+ *(remote_boxes->tail) = newm;
+ remote_boxes->tail = &(newm->next);
+
+ return 0;
+}
+
+/* Callback for mupdate_synchronize to be passed to mboxlist_findall. */
+static int sync_findall_cb(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct sync_rock *r = (struct sync_rock *)rock;
+ struct mbent_queue *local_boxes = (struct mbent_queue *)r->boxes;
+ struct mbent *m;
+
+ if(!local_boxes) return 1;
+
+ m = database_lookup(name, r->pool);
+ /* If it doesn't exist, fine... */
+ if(!m) return 0;
+
+ m->next = NULL;
+ *(local_boxes->tail) = m;
+ local_boxes->tail = &(m->next);
+
+ return 0;
+}
+
+int mupdate_synchronize(mupdate_handle *handle)
+{
+ struct mbent_queue local_boxes;
+ struct mbent_queue remote_boxes;
+ struct mbent *l,*r;
+ struct mpool *pool;
+ struct sync_rock rock;
+ char pattern[] = { '*', '\0' };
+ int ret = 0;
+
+ if(!handle || !handle->saslcompleted) return 1;
+
+ pool = new_mpool(131072); /* Arbitrary, but large (128k) */
+ rock.pool = pool;
+
+ /* ask for updates and set nonblocking */
+ prot_printf(handle->conn->out, "U01 UPDATE\r\n");
+
+ /* Note that this prevents other people from running an UPDATE against
+ * us for the duration. this is a GOOD THING */
+ pthread_mutex_lock(&mailboxes_mutex); /* LOCK */
+
+ syslog(LOG_NOTICE,
+ "synchronizing mailbox list with master mupdate server");
+
+ local_boxes.head = NULL;
+ local_boxes.tail = &(local_boxes.head);
+ remote_boxes.head = NULL;
+ remote_boxes.tail = &(remote_boxes.head);
+
+ rock.boxes = &remote_boxes;
+
+ /* If there is a fatal error, die, other errors ignore */
+ if (mupdate_scarf(handle, cmd_resync, &rock, 1, NULL) != 0) {
+ struct mbent *p=remote_boxes.head, *p_next=NULL;
+ while(p) {
+ p_next = p->next;
+ p = p_next;
+ }
+
+ ret = 1;
+ goto done;
+ }
+
+ /* Make socket nonblocking now */
+ prot_NONBLOCK(handle->conn->in);
+
+ rock.boxes = &local_boxes;
+
+ mboxlist_findall(NULL, pattern, 1, NULL,
+ NULL, sync_findall_cb, (void*)&rock);
+
+ /* Traverse both lists, compare the names */
+ /* If they match, ensure that server and acl are correct, if so,
+ move on, if not, fix them */
+ /* If the local is before the next remote, delete it */
+ /* If the next remote is before theis local, insert it and try again */
+ for(l = local_boxes.head, r = remote_boxes.head; l && r;
+ l = local_boxes.head, r = remote_boxes.head)
+ {
+ int ret = strcmp(l->mailbox, r->mailbox);
+ if(!ret) {
+ /* Match */
+ if(l->t != r->t ||
+ strcmp(l->server, r->server) ||
+ strcmp(l->acl,r->acl)) {
+ /* Something didn't match, replace it */
+ mboxlist_insertremote(r->mailbox,
+ (r->t == SET_RESERVE ?
+ MBTYPE_RESERVE : 0),
+ r->server, r->acl, NULL);
+ }
+ /* Okay, dump these two */
+ local_boxes.head = l->next;
+ remote_boxes.head = r->next;
+ } else if (ret < 0) {
+ /* Local without corresponding remote, delete it */
+ mboxlist_deletemailbox(l->mailbox, 1, "", NULL, 0, 0, 0);
+ local_boxes.head = l->next;
+ } else /* (ret > 0) */ {
+ /* Remote without corresponding local, insert it */
+ mboxlist_insertremote(r->mailbox,
+ (r->t == SET_RESERVE ?
+ MBTYPE_RESERVE : 0),
+ r->server, r->acl, NULL);
+ remote_boxes.head = r->next;
+ }
+ }
+
+ if(l && !r) {
+ /* we have more deletes to do */
+ while(l) {
+ mboxlist_deletemailbox(l->mailbox, 1, "", NULL, 0, 0, 0);
+ local_boxes.head = l->next;
+ l = local_boxes.head;
+ }
+ } else if (r && !l) {
+ /* we have more inserts to do */
+ while(r) {
+ mboxlist_insertremote(r->mailbox,
+ (r->t == SET_RESERVE ?
+ MBTYPE_RESERVE : 0),
+ r->server, r->acl, NULL);
+ remote_boxes.head = r->next;
+ r = remote_boxes.head;
+ }
+ }
+
+ /* All up to date! */
+ syslog(LOG_NOTICE, "mailbox list synchronization complete");
+
+ done:
+ pthread_mutex_unlock(&mailboxes_mutex); /* UNLOCK */
+ free_mpool(pool);
+ return ret;
+}
+
+void mupdate_signal_db_synced(void)
+{
+ pthread_mutex_lock(&synced_mutex);
+ synced = 1;
+ pthread_cond_broadcast(&synced_cond);
+ pthread_mutex_unlock(&synced_mutex);
+}
+
+void mupdate_ready(void)
+{
+ if(ready_for_connections) {
+ syslog(LOG_CRIT, "mupdate_ready called when already ready");
+ fatal("mupdate_ready called when already ready", EC_TEMPFAIL);
+ }
+
+ pthread_mutex_lock(&ready_for_connections_mutex);
+ ready_for_connections = 1;
+ pthread_cond_broadcast(&ready_for_connections_cond);
+ pthread_mutex_unlock(&ready_for_connections_mutex);
+}
+
+/* Signal unreadyness. Next active worker will kill off all idle connections.
+ * any non-idle connection will die off when it leaves docmd() */
+void mupdate_unready(void)
+{
+ pthread_mutex_lock(&ready_for_connections_mutex);
+
+ syslog(LOG_NOTICE, "unready for connections");
+
+ ready_for_connections = 0;
+
+ pthread_mutex_unlock(&ready_for_connections_mutex);
+}
+
+/* Used to free malloc'd mbent's (not for mpool'd mbents) */
+void free_mbent(struct mbent *p)
+{
+ if(!p) return;
+ free(p->server);
+ free(p->mailbox);
+ free(p);
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for MUPDATE!",
+ EC_SOFTWARE);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,138 @@
+/* mupdate.h - private mupdate header file
+ *
+ * $Id: mupdate.h,v 1.15.2.2 2006/03/15 18:56:32 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef INCLUDED_MUPDATE_H
+#define INCLUDED_MUPDATE_H
+
+/* Quick reference to the mupdate files:
+ *
+ * mupdate.h: Internal header for mupdate modules.
+ * mupdate-client.h: Public header for mupdate clients.
+ * mupdate-client.c: Implementation of client functions
+ * mupdate.c: Implementation of server functions
+ * mupdate-slave.c: Slave listener thread functions.
+ */
+
+#include "backend.h"
+#include "mailbox.h"
+#include "mupdate-client.h"
+#include "mupdate_err.h"
+#include "global.h"
+
+struct mupdate_handle_s {
+ struct backend *conn;
+
+ /* For keeping track of what tag # is next */
+ unsigned int tagn;
+
+ /* For mupdate_scarf and mupdate_authenticate */
+ struct buf tag, cmd, arg1, arg2, arg3;
+
+ /* For client side mupdate_find calls */
+ char mailbox_buf[MAX_MAILBOX_NAME];
+ char server_buf[MAX_MAILBOX_NAME];
+ char *acl_buf;
+ size_t acl_buf_len;
+ struct mupdate_mailboxdata mailboxdata_buf;
+
+ int saslcompleted;
+};
+
+enum settype {
+ SET_ACTIVE,
+ SET_RESERVE,
+ SET_DELETE,
+ SET_DEACTIVATE
+};
+
+/* mailbox name MUST be first, since it is the key */
+/* acl MUST be last, since it is what causes the variable size */
+struct mbent {
+ char *mailbox;
+ char *server;
+ enum settype t;
+ struct mbent *next; /* used for queue */
+ char acl[1];
+};
+
+struct mbent_queue
+{
+ struct mbent *head;
+ struct mbent **tail;
+};
+
+/* Used to free malloc'd mbent's */
+void free_mbent(struct mbent *p);
+
+/* Used by the slave listener thread to update the local database */
+int cmd_change(struct mupdate_mailboxdata *mdata,
+ const char *cmd, void *context);
+
+/* Given an mbent_queue, will synchronize the local database to it */
+int mupdate_synchronize(mupdate_handle *handle);
+
+/* Signal that we are ready to accept connections */
+void mupdate_ready(void);
+void mupdate_unready(void);
+void mupdate_signal_db_synced(void);
+
+/* --- internal client functions (mupdate-client.c) --- */
+/* these are used by the slave thread and by the client API */
+
+enum mupdate_cmd_response {
+ MUPDATE_OK = 0,
+ MUPDATE_NO = -1,
+ MUPDATE_BAD = -2,
+ MUPDATE_BYE = -3
+};
+
+/* Scarf up the incoming data and perform the requested operations */
+/* Returns 0 on no error
+ otherwise MUPDATE_error. */
+/* if 'wait_for_ok' is set and 'response' != NULL, *response is filled in */
+int mupdate_scarf(mupdate_handle *handle,
+ mupdate_callback callback,
+ void *context,
+ int wait_for_ok,
+ enum mupdate_cmd_response *response);
+
+#endif /* INCLUDED_MUPDATE_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,60 @@
+/*
+ * mupdate_err.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+static const char * const text[] = {
+ "the mupdate operation failed",
+ "unable to reserve mailbox on mupdate server",
+ "no connection to server",
+ "no authentication to server",
+ "timed out waiting for server response",
+ "bad parameters to function",
+ "Remote mupdate server sent bad protocol",
+ "Mailbox not in mupdate database",
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_mupd_error_table = { text, -1627742720L, 8 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_mupd_error_table_r(struct et_list **list);
+void initialize_mupd_error_table(void);
+
+void initialize_mupd_error_table(void) {
+ initialize_mupd_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_mupd_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_mupd_error_table;
+ et->next = 0;
+ *end = et;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.et
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.et?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.et (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.et Sat Aug 26 02:00:13 2006
@@ -1,0 +1,54 @@
+# mupdate_err.et -- Error codes for the mupdate API
+# $Id: mupdate_err.et,v 1.5 2002/03/20 23:03:06 rjs3 Exp $
+#
+# Copyright 2001 Carnegie Mellon University
+#
+# No warranties, either expressed or implied, are made regarding the
+# operation, use, or results of the software.
+#
+# Permission to use, copy, modify and distribute this software and its
+# documentation is hereby granted for non-commercial purposes only
+# provided that this copyright notice appears in all copies and in
+# supporting documentation.
+#
+# Permission is also granted to Internet Service Providers and others
+# entities to use the software for internal purposes.
+#
+# The distribution, modification or sale of a product which uses or is
+# based on the software, in whole or in part, for commercial purposes or
+# benefits requires specific, additional permission from:
+#
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+error_table mupd
+
+ec MUPDATE_FAIL,
+ "the mupdate operation failed"
+
+ec MUPDATE_FAIL_RESERVE,
+ "unable to reserve mailbox on mupdate server"
+
+ec MUPDATE_NOCONN,
+ "no connection to server"
+
+ec MUPDATE_NOAUTH,
+ "no authentication to server"
+
+ec MUPDATE_TIMEOUT,
+ "timed out waiting for server response"
+
+ec MUPDATE_BADPARAM,
+ "bad parameters to function"
+
+ec MUPDATE_PROTOCOL_ERROR,
+ "Remote mupdate server sent bad protocol"
+
+ec MUPDATE_MAILBOX_UNKNOWN,
+ "Mailbox not in mupdate database"
+
+end
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mupdate_err.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,26 @@
+/*
+ * mupdate_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define MUPDATE_FAIL (-1627742720L)
+#define MUPDATE_FAIL_RESERVE (-1627742719L)
+#define MUPDATE_NOCONN (-1627742718L)
+#define MUPDATE_NOAUTH (-1627742717L)
+#define MUPDATE_TIMEOUT (-1627742716L)
+#define MUPDATE_BADPARAM (-1627742715L)
+#define MUPDATE_PROTOCOL_ERROR (-1627742714L)
+#define MUPDATE_MAILBOX_UNKNOWN (-1627742713L)
+extern const struct error_table et_mupd_error_table;
+extern void initialize_mupd_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_mupd_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_mupd (-1627742720L)
+
+/* for compatibility with older versions... */
+#define init_mupd_err_tbl initialize_mupd_error_table
+#define mupd_err_base ERROR_TABLE_BASE_mupd
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,54 @@
+/* mutex.h - header for mutex functions
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mutex.h,v 1.2 2003/10/22 18:02:58 rjs3 Exp $ */
+
+#ifndef CYRUS_MUTEX_H
+#define CYRUS_MUTEX_H
+
+#include <config.h>
+
+void *cyrus_mutex_alloc(void);
+int cyrus_mutex_lock(void *mutex);
+int cyrus_mutex_unlock(void *mutex);
+void cyrus_mutex_free(void *mutex);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_fake.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_fake.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_fake.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_fake.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,66 @@
+/* mutex_fake.c - fake mutex new/lock/unlock/destroy functions (for SASL)
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mutex_fake.c,v 1.2 2003/10/22 18:02:58 rjs3 Exp $ */
+
+#include <config.h>
+
+#include <sasl/sasl.h>
+
+void *cyrus_mutex_alloc(void)
+{
+ return (void *)0x1;
+}
+
+int cyrus_mutex_lock(void *mutex __attribute__((unused)))
+{
+ return SASL_OK;
+}
+
+int cyrus_mutex_unlock(void *mutex __attribute__((unused)))
+{
+ return SASL_OK;
+}
+
+void cyrus_mutex_free(void *mutex __attribute__((unused)))
+{
+ return;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_pthread.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_pthread.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_pthread.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/mutex_pthread.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,78 @@
+/* mutex_fake.c - fake mutex new/lock/unlock/destroy functions (for SASL)
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mutex_pthread.c,v 1.2 2003/10/22 18:02:58 rjs3 Exp $ */
+
+#include <config.h>
+
+#include <pthread.h>
+#include <sasl/sasl.h>
+
+#include "xmalloc.h"
+
+void *cyrus_mutex_alloc(void)
+{
+ pthread_mutex_t *ret = (pthread_mutex_t *)xmalloc(sizeof(pthread_mutex_t));
+
+ pthread_mutex_init(ret, NULL);
+
+ return ret;
+}
+
+int cyrus_mutex_lock(void *mutex)
+{
+ return pthread_mutex_lock(mutex);
+}
+
+int cyrus_mutex_unlock(void *mutex)
+{
+ return pthread_mutex_unlock(mutex);
+}
+
+void cyrus_mutex_free(void *mutex)
+{
+ if(!mutex) return;
+
+ pthread_mutex_destroy(mutex);
+ free(mutex);
+
+ return;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,57 @@
+/*
+ * nntp_err.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+static const char * const text[] = {
+ "No newsgroups header in article",
+ "Error parsing newgroups header",
+ "Already have this article",
+ "Error transferring this article",
+ "Unknown control message",
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_nntp_error_table = { text, -1567905280L, 5 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_nntp_error_table_r(struct et_list **list);
+void initialize_nntp_error_table(void);
+
+void initialize_nntp_error_table(void) {
+ initialize_nntp_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_nntp_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_nntp_error_table;
+ et->next = 0;
+ *end = et;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.et
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.et?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.et (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.et Sat Aug 26 02:00:13 2006
@@ -1,0 +1,45 @@
+# nntp_err.et -- Error codes for the Cyrus NNTP server
+# $Id: nntp_err.et,v 1.2 2003/10/22 18:02:58 rjs3 Exp $
+#
+# Copyright 2002 Carnegie Mellon University
+#
+# No warranties, either expressed or implied, are made regarding the
+# operation, use, or results of the software.
+#
+# Permission to use, copy, modify and distribute this software and its
+# documentation is hereby granted for non-commercial purposes only
+# provided that this copyright notice appears in all copies and in
+# supporting documentation.
+#
+# Permission is also granted to Internet Service Providers and others
+# entities to use the software for internal purposes.
+#
+# The distribution, modification or sale of a product which uses or is
+# based on the software, in whole or in part, for commercial purposes or
+# benefits requires specific, additional permission from:
+#
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+error_table nntp
+
+ec NNTP_NO_NEWSGROUPS,
+ "No newsgroups header in article"
+
+ec NNTP_FAIL_NEWSGROUPS,
+ "Error parsing newgroups header"
+
+ec NNTP_DONT_SEND,
+ "Already have this article"
+
+ec NNTP_FAIL_TRANSFER,
+ "Error transferring this article"
+
+ec NNTP_UNKNOWN_CONTROLMSG,
+ "Unknown control message"
+
+end
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntp_err.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,23 @@
+/*
+ * nntp_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define NNTP_NO_NEWSGROUPS (-1567905280L)
+#define NNTP_FAIL_NEWSGROUPS (-1567905279L)
+#define NNTP_DONT_SEND (-1567905278L)
+#define NNTP_FAIL_TRANSFER (-1567905277L)
+#define NNTP_UNKNOWN_CONTROLMSG (-1567905276L)
+extern const struct error_table et_nntp_error_table;
+extern void initialize_nntp_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_nntp_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_nntp (-1567905280L)
+
+/* for compatibility with older versions... */
+#define init_nntp_err_tbl initialize_nntp_error_table
+#define nntp_err_base ERROR_TABLE_BASE_nntp
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntpd.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntpd.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntpd.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/nntpd.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4126 @@
+/* nntpd.c -- NNTP server
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: nntpd.c,v 1.2.2.50 2006/05/26 15:50:07 murch Exp $
+ */
+
+/*
+ * TODO:
+ *
+ * - add sender and PGP verification code for control messages
+ * - figure out what to do with control messages when proxying
+ */
+
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/param.h>
+#include <syslog.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <ctype.h>
+
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "acl.h"
+#include "annotate.h"
+#include "append.h"
+#include "auth.h"
+#include "backend.h"
+#include "duplicate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "hash.h"
+#include "idle.h"
+#include "imap_err.h"
+#include "index.h"
+#include "iptostring.h"
+#include "mailbox.h"
+#include "map.h"
+#include "mboxlist.h"
+#include "mkgmtime.h"
+#include "mupdate-client.h"
+#include "nntp_err.h"
+#include "prot.h"
+#include "proxy.h"
+#include "retry.h"
+#include "rfc822date.h"
+#include "smtpclient.h"
+#include "spool.h"
+#include "sync_log.h"
+#include "telemetry.h"
+#include "tls.h"
+#include "util.h"
+#include "version.h"
+#include "wildmat.h"
+#include "xmalloc.h"
+
+extern int optind;
+extern char *optarg;
+extern int opterr;
+
+/* Stuff to make index.c link */
+int imapd_exists;
+struct protstream *imapd_out = NULL;
+struct auth_state *imapd_authstate = NULL;
+char *imapd_userid = NULL;
+int imapd_condstore_client = 0;
+
+void printastring(const char *s __attribute__((unused)))
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+/* end stuff to make index.c link */
+
+/* PROXY STUFF */
+/* we want a list of our outgoing connections here and which one we're
+ currently piping */
+
+/* the current server most commands go to */
+struct backend *backend_current = NULL;
+
+/* our cached connections */
+struct backend **backend_cached = NULL;
+
+#ifdef HAVE_SSL
+static SSL *tls_conn;
+#endif /* HAVE_SSL */
+
+sasl_conn_t *nntp_saslconn; /* the sasl connection context */
+
+char newsprefix[100] = "";
+char *nntp_userid = 0, *newsmaster;
+struct auth_state *nntp_authstate = 0, *newsmaster_authstate;
+static struct mailbox *nntp_group = 0;
+struct sockaddr_storage nntp_localaddr, nntp_remoteaddr;
+int nntp_haveaddr = 0;
+char nntp_clienthost[NI_MAXHOST*2+1] = "[local]";
+struct protstream *nntp_out = NULL;
+struct protstream *nntp_in = NULL;
+struct protgroup *protin = NULL;
+static int nntp_logfd = -1;
+unsigned nntp_exists = 0;
+unsigned nntp_current = 0;
+unsigned did_capabilities = 0;
+int allowanonymous = 0;
+int singleinstance = 1; /* attempt single instance store */
+
+struct stagemsg *stage = NULL;
+
+/* Bitmasks for NNTP modes */
+enum {
+ MODE_READ = (1<<0),
+ MODE_FEED = (1<<1)
+};
+
+static unsigned nntp_capa = MODE_READ | MODE_FEED; /* general-purpose */
+
+static sasl_ssf_t extprops_ssf = 0;
+static int nntps = 0;
+int nntp_starttls_done = 0;
+
+static struct mailbox mboxstruct;
+
+/* the sasl proxy policy context */
+static struct proxy_context nntp_proxyctx = {
+ 0, 1, &nntp_authstate, NULL, NULL
+};
+
+/* for config.c */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+/*
+ * values for article parts
+ * these correspond to the last digit of the response code
+ */
+enum {
+ ARTICLE_ALL = 0,
+ ARTICLE_HEAD = 1,
+ ARTICLE_BODY = 2,
+ ARTICLE_STAT = 3
+};
+
+/* values for post modes */
+enum {
+ POST_POST = 0,
+ POST_IHAVE = 1,
+ POST_CHECK = 2,
+ POST_TAKETHIS = 3
+};
+
+/* response codes for each stage of posting */
+struct {
+ int ok, cont, no, fail;
+} post_codes[] = { { 240, 340, 440, 441 },
+ { 235, 335, 435, 436 },
+ { -1, 238, 438, -1 },
+ { 239, -1, -1, 439 } };
+
+struct wildmat {
+ char *pat;
+ int not;
+};
+
+static struct wildmat *split_wildmats(char *str);
+static void free_wildmats(struct wildmat *wild);
+
+static void cmdloop(void);
+static int open_group(char *name, int has_prefix,
+ struct backend **ret, int *postable);
+static int parserange(char *str, unsigned long *uid, unsigned long *last,
+ char **msgid, struct backend **be);
+static time_t parse_datetime(char *datestr, char *timestr, char *gmt);
+static void cmd_article(int part, char *msgid, unsigned long uid);
+static void cmd_authinfo_user(char *user);
+static void cmd_authinfo_pass(char *pass);
+static void cmd_authinfo_sasl(char *cmd, char *mech, char *resp);
+static void cmd_capabilities(char *keyword);
+static void cmd_hdr(char *cmd, char *hdr, char *pat, char *msgid,
+ unsigned long uid, unsigned long last);
+static void cmd_help(void);
+static void cmd_list(char *arg1, char *arg2);
+static void cmd_mode(char *arg);
+static void cmd_newgroups(time_t tstamp);
+static void cmd_newnews(char *wild, time_t tstamp);
+static void cmd_over(char *msgid, unsigned long uid, unsigned long last);
+static void cmd_post(char *msgid, int mode);
+static void cmd_starttls(int nntps);
+void usage(void);
+void shut_down(int code) __attribute__ ((noreturn));
+
+
+extern void setproctitle_init(int argc, char **argv, char **envp);
+extern int proc_register(const char *progname, const char *clienthost,
+ const char *userid, const char *mailbox);
+extern void proc_cleanup(void);
+
+extern int saslserver(sasl_conn_t *conn, const char *mech,
+ const char *init_resp, const char *resp_prefix,
+ const char *continuation, const char *empty_resp,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, char **success_data);
+
+static struct
+{
+ char *ipremoteport;
+ char *iplocalport;
+ sasl_ssf_t ssf;
+ char *authid;
+} saslprops = {NULL,NULL,0,NULL};
+
+static struct sasl_callback mysasl_cb[] = {
+ { SASL_CB_GETOPT, &mysasl_config, NULL },
+ { SASL_CB_PROXY_POLICY, &mysasl_proxy_policy, (void*) &nntp_proxyctx },
+ { SASL_CB_CANON_USER, &mysasl_canon_user, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+/* proxy mboxlist_lookup; on misses, it asks the listener for this
+ machine to make a roundtrip to the master mailbox server to make
+ sure it's up to date */
+static int mlookup(const char *name, char **server, char **aclp, void *tid)
+{
+ int r, type;
+
+ if(server) *server = NULL;
+
+ r = mboxlist_detail(name, &type, NULL, NULL, server, aclp, tid);
+ if (r == IMAP_MAILBOX_NONEXISTENT && config_mupdate_server) {
+ kick_mupdate();
+ r = mboxlist_detail(name, &type, NULL, NULL, server, aclp, tid);
+ }
+
+ if (type & MBTYPE_REMOTE) {
+ /* xxx hide the fact that we are storing partitions */
+ if(server && *server) {
+ char *c;
+ c = strchr(*server, '!');
+ if(c) *c = '\0';
+ }
+ }
+ else if (server)
+ *server = NULL;
+
+ return r;
+}
+
+static int read_response(struct backend *s, int force_notfatal, char **result)
+{
+ static char buf[2048];
+
+ s->timeout->mark = time(NULL) + IDLE_TIMEOUT;
+
+ if (!prot_fgets(buf, sizeof(buf), s->in)) {
+ /* uh oh */
+ if (s == backend_current && !force_notfatal)
+ fatal("Lost connection to selected backend", EC_UNAVAILABLE);
+ proxy_downserver(s);
+ return IMAP_SERVER_UNAVAILABLE;
+ }
+
+ *result = buf;
+ return 0;
+}
+
+static int pipe_to_end_of_response(struct backend *s, int force_notfatal)
+{
+ char buf[2048];
+
+ s->timeout->mark = time(NULL) + IDLE_TIMEOUT;
+
+ do {
+ if (!prot_fgets(buf, sizeof(buf), s->in)) {
+ /* uh oh */
+ if (s == backend_current && !force_notfatal)
+ fatal("Lost connection to selected backend", EC_UNAVAILABLE);
+ proxy_downserver(s);
+ return IMAP_SERVER_UNAVAILABLE;
+ }
+
+ prot_printf(nntp_out, "%s", buf);
+ } while (strcmp(buf, ".\r\n"));
+
+ return 0;
+}
+/* end proxy support functions */
+
+static void nntp_reset(void)
+{
+ int i;
+
+ proc_cleanup();
+
+ /* close local mailbox */
+ if (nntp_group) {
+ mailbox_close(nntp_group);
+ nntp_group = 0;
+ }
+
+ /* close backend connections */
+ i = 0;
+ while (backend_cached && backend_cached[i]) {
+ proxy_downserver(backend_cached[i]);
+ free(backend_cached[i]->context);
+ free(backend_cached[i]);
+ i++;
+ }
+ if (backend_cached) free(backend_cached);
+ backend_cached = NULL;
+ backend_current = NULL;
+
+ if (nntp_in) {
+ prot_NONBLOCK(nntp_in);
+ prot_fill(nntp_in);
+
+ prot_free(nntp_in);
+ }
+
+ if (nntp_out) {
+ prot_flush(nntp_out);
+ prot_free(nntp_out);
+ }
+
+ nntp_in = nntp_out = NULL;
+
+ if (protin) protgroup_reset(protin);
+
+#ifdef HAVE_SSL
+ if (tls_conn) {
+ tls_reset_servertls(&tls_conn);
+ tls_conn = NULL;
+ }
+#endif
+
+ cyrus_reset_stdio();
+
+ strcpy(nntp_clienthost, "[local]");
+ if (nntp_logfd != -1) {
+ close(nntp_logfd);
+ nntp_logfd = -1;
+ }
+ if (nntp_userid != NULL) {
+ free(nntp_userid);
+ nntp_userid = NULL;
+ }
+ if (nntp_authstate) {
+ auth_freestate(nntp_authstate);
+ nntp_authstate = NULL;
+ }
+ if (nntp_saslconn) {
+ sasl_dispose(&nntp_saslconn);
+ nntp_saslconn = NULL;
+ }
+ nntp_starttls_done = 0;
+
+ if(saslprops.iplocalport) {
+ free(saslprops.iplocalport);
+ saslprops.iplocalport = NULL;
+ }
+ if(saslprops.ipremoteport) {
+ free(saslprops.ipremoteport);
+ saslprops.ipremoteport = NULL;
+ }
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ saslprops.ssf = 0;
+
+ nntp_exists = 0;
+ nntp_current = 0;
+ did_capabilities = 0;
+}
+
+/*
+ * run once when process is forked;
+ * MUST NOT exit directly; must return with non-zero error code
+ */
+int service_init(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ int opt;
+ const char *prefix;
+
+ initialize_nntp_error_table();
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+ setproctitle_init(argc, argv, envp);
+
+ /* set signal handlers */
+ signals_set_shutdown(&shut_down);
+ signal(SIGPIPE, SIG_IGN);
+
+ /* load the SASL plugins */
+ global_sasl_init(1, 1, mysasl_cb);
+
+ if ((prefix = config_getstring(IMAPOPT_NEWSPREFIX)))
+ snprintf(newsprefix, sizeof(newsprefix), "%s.", prefix);
+
+ /* initialize duplicate delivery database */
+ if (duplicate_init(NULL, 0) != 0) {
+ syslog(LOG_ERR,
+ "unable to init duplicate delivery database\n");
+ fatal("unable to init duplicate delivery database", EC_SOFTWARE);
+ }
+
+ /* open the mboxlist, we'll need it for real work */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* open the quota db, we'll need it for expunge */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ /* setup for sending IMAP IDLE notifications */
+ idle_enabled();
+
+ while ((opt = getopt(argc, argv, "srfp:")) != EOF) {
+ switch(opt) {
+ case 's': /* nntps (do starttls right away) */
+ nntps = 1;
+ if (!tls_enabled()) {
+ syslog(LOG_ERR, "nntps: required OpenSSL options not present");
+ fatal("nntps: required OpenSSL options not present",
+ EC_CONFIG);
+ }
+ break;
+
+ case 'r': /* enter reader-only mode */
+ nntp_capa = MODE_READ;
+ break;
+
+ case 'f': /* enter feeder-only mode */
+ nntp_capa = MODE_FEED;
+ break;
+
+ case 'p': /* external protection */
+ extprops_ssf = atoi(optarg);
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ /* Initialize the annotatemore extention */
+ annotatemore_init(0, NULL, NULL);
+ annotatemore_open(NULL);
+
+ newsmaster = (char *) config_getstring(IMAPOPT_NEWSMASTER);
+ newsmaster_authstate = auth_newstate(newsmaster);
+
+ singleinstance = config_getswitch(IMAPOPT_SINGLEINSTANCESTORE);
+
+ /* Create a protgroup for input from the client and selected backend */
+ protin = protgroup_new(2);
+
+ return 0;
+}
+
+/*
+ * run for each accepted connection
+ */
+int service_main(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ socklen_t salen;
+ char localip[60], remoteip[60];
+ char hbuf[NI_MAXHOST];
+ int niflags;
+ int timeout;
+ sasl_security_properties_t *secprops=NULL;
+ char unavail[1024];
+
+ signals_poll();
+
+ sync_log_init();
+
+ nntp_in = prot_new(0, 0);
+ nntp_out = prot_new(1, 1);
+ protgroup_insert(protin, nntp_in);
+
+ /* Find out name of client host */
+ salen = sizeof(nntp_remoteaddr);
+ if (getpeername(0, (struct sockaddr *)&nntp_remoteaddr, &salen) == 0 &&
+ (nntp_remoteaddr.ss_family == AF_INET ||
+ nntp_remoteaddr.ss_family == AF_INET6)) {
+ if (getnameinfo((struct sockaddr *)&nntp_remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD) == 0) {
+ strncpy(nntp_clienthost, hbuf, sizeof(hbuf));
+ strlcat(nntp_clienthost, " ", sizeof(nntp_clienthost));
+ nntp_clienthost[sizeof(nntp_clienthost)-30] = '\0';
+ } else {
+ nntp_clienthost[0] = '\0';
+ }
+ niflags = NI_NUMERICHOST;
+#ifdef NI_WITHSCOPEID
+ if (((struct sockaddr *)&nntp_remoteaddr)->sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&nntp_remoteaddr, salen, hbuf,
+ sizeof(hbuf), NULL, 0, niflags) != 0)
+ strlcpy(hbuf, "unknown", sizeof(hbuf));
+ strlcat(nntp_clienthost, "[", sizeof(nntp_clienthost));
+ strlcat(nntp_clienthost, hbuf, sizeof(nntp_clienthost));
+ strlcat(nntp_clienthost, "]", sizeof(nntp_clienthost));
+ salen = sizeof(nntp_localaddr);
+ if (getsockname(0, (struct sockaddr *)&nntp_localaddr, &salen) == 0) {
+ nntp_haveaddr = 1;
+ }
+ }
+
+ /* other params should be filled in */
+ if (sasl_server_new("nntp", config_servername, NULL, NULL, NULL,
+ NULL, SASL_SUCCESS_DATA, &nntp_saslconn) != SASL_OK)
+ fatal("SASL failed initializing: sasl_server_new()",EC_TEMPFAIL);
+
+ /* will always return something valid */
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ sasl_setprop(nntp_saslconn, SASL_SEC_PROPS, secprops);
+ sasl_setprop(nntp_saslconn, SASL_SSF_EXTERNAL, &extprops_ssf);
+
+ if(iptostring((struct sockaddr *)&nntp_localaddr, salen,
+ localip, 60) == 0) {
+ sasl_setprop(nntp_saslconn, SASL_IPLOCALPORT, localip);
+ saslprops.iplocalport = xstrdup(localip);
+ }
+
+ if(iptostring((struct sockaddr *)&nntp_remoteaddr, salen,
+ remoteip, 60) == 0) {
+ sasl_setprop(nntp_saslconn, SASL_IPREMOTEPORT, remoteip);
+ saslprops.ipremoteport = xstrdup(remoteip);
+ }
+
+ proc_register("nntpd", nntp_clienthost, NULL, NULL);
+
+ /* Set inactivity timer */
+ timeout = config_getint(IMAPOPT_NNTPTIMEOUT);
+ if (timeout < 3) timeout = 3;
+ prot_settimeout(nntp_in, timeout*60);
+ prot_setflushonread(nntp_in, nntp_out);
+
+ /* we were connected on nntps port so we should do
+ TLS negotiation immediatly */
+ if (nntps == 1) cmd_starttls(1);
+
+ if (shutdown_file(unavail, sizeof(unavail))) {
+ prot_printf(nntp_out,
+ "400 %s Cyrus NNTP%s %s server unavailable, %s\r\n",
+ config_servername, config_mupdate_server ? " Murder" : "",
+ CYRUS_VERSION, unavail);
+
+ shut_down(0);
+ }
+
+ prot_printf(nntp_out,
+ "%u %s Cyrus NNTP%s %s server ready, posting %s\r\n",
+ (nntp_capa & MODE_READ) ? 200 : 201,
+ config_servername, config_mupdate_server ? " Murder" : "",
+ CYRUS_VERSION,
+ (nntp_capa & MODE_READ) ? "allowed" : "prohibited");
+
+ cmdloop();
+
+ /* QUIT executed */
+
+ /* cleanup */
+ nntp_reset();
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+void usage(void)
+{
+ prot_printf(nntp_out, "503 usage: nntpd [-C <alt_config>] [-s]\r\n");
+ prot_flush(nntp_out);
+ exit(EC_USAGE);
+}
+
+/*
+ * Cleanly shut down and exit
+ */
+void shut_down(int code)
+{
+ int i;
+
+ proc_cleanup();
+
+ /* close local mailbox */
+ if (nntp_group) {
+ mailbox_close(nntp_group);
+ }
+
+ /* close backend connections */
+ i = 0;
+ while (backend_cached && backend_cached[i]) {
+ proxy_downserver(backend_cached[i]);
+ free(backend_cached[i]->context);
+ free(backend_cached[i]);
+ i++;
+ }
+ if (backend_cached) free(backend_cached);
+
+ duplicate_done();
+
+ mboxlist_close();
+ mboxlist_done();
+
+ quotadb_close();
+ quotadb_done();
+
+ annotatemore_close();
+ annotatemore_done();
+
+ if (nntp_in) {
+ prot_NONBLOCK(nntp_in);
+ prot_fill(nntp_in);
+ prot_free(nntp_in);
+ }
+
+ if (nntp_out) {
+ prot_flush(nntp_out);
+ prot_free(nntp_out);
+ }
+
+ if (protin) protgroup_free(protin);
+
+#ifdef HAVE_SSL
+ tls_shutdown_serverengine();
+#endif
+
+ cyrus_done();
+
+ exit(code);
+}
+
+void fatal(const char* s, int code)
+{
+ static int recurse_code = 0;
+
+ if (recurse_code) {
+ /* We were called recursively. Just give up */
+ proc_cleanup();
+ exit(recurse_code);
+ }
+ recurse_code = code;
+ if (nntp_out) {
+ prot_printf(nntp_out, "205 Fatal error: %s\r\n", s);
+ prot_flush(nntp_out);
+ }
+ if (stage) append_removestage(stage);
+ syslog(LOG_ERR, "Fatal error: %s", s);
+ shut_down(code);
+}
+
+/* Reset the given sasl_conn_t to a sane state */
+static int reset_saslconn(sasl_conn_t **conn)
+{
+ int ret;
+ sasl_security_properties_t *secprops = NULL;
+
+ sasl_dispose(conn);
+ /* do initialization typical of service_main */
+ ret = sasl_server_new("nntp", config_servername,
+ NULL, NULL, NULL,
+ NULL, SASL_SUCCESS_DATA, conn);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.ipremoteport)
+ ret = sasl_setprop(*conn, SASL_IPREMOTEPORT,
+ saslprops.ipremoteport);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.iplocalport)
+ ret = sasl_setprop(*conn, SASL_IPLOCALPORT,
+ saslprops.iplocalport);
+ if(ret != SASL_OK) return ret;
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ ret = sasl_setprop(*conn, SASL_SEC_PROPS, secprops);
+ if(ret != SASL_OK) return ret;
+ /* end of service_main initialization excepting SSF */
+
+ /* If we have TLS/SSL info, set it */
+ if(saslprops.ssf) {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &saslprops.ssf);
+ } else {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &extprops_ssf);
+ }
+
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.authid) {
+ ret = sasl_setprop(*conn, SASL_AUTH_EXTERNAL, saslprops.authid);
+ if(ret != SASL_OK) return ret;
+ }
+ /* End TLS/SSL Info */
+
+ return SASL_OK;
+}
+
+/*
+ * Top-level command loop parsing
+ */
+static void cmdloop(void)
+{
+ int c, r = 0, mode;
+ static struct buf cmd, arg1, arg2, arg3, arg4;
+ char *p, *result, buf[1024];
+ const char *err;
+ unsigned long uid, last;
+ struct backend *be;
+
+ allowanonymous = config_getswitch(IMAPOPT_ALLOWANONYMOUSLOGIN);
+
+ for (;;) {
+ /* Flush any buffered output */
+ prot_flush(nntp_out);
+ if (backend_current) prot_flush(backend_current->out);
+
+ /* Check for shutdown file */
+ if (shutdown_file(buf, sizeof(buf))) {
+ prot_printf(nntp_out, "400 %s\r\n", buf);
+ shut_down(0);
+ }
+
+ signals_poll();
+
+ if (!proxy_check_input(protin, nntp_in, nntp_out,
+ backend_current ? backend_current->in : NULL,
+ NULL, 0)) {
+ /* No input from client */
+ continue;
+ }
+
+ /* Parse command name */
+ c = getword(nntp_in, &cmd);
+ if (c == EOF) {
+ if ((err = prot_error(nntp_in)) != NULL
+ && strcmp(err, PROT_EOF_STRING)) {
+ syslog(LOG_WARNING, "%s, closing connection", err);
+ prot_printf(nntp_out, "400 %s\r\n", err);
+ }
+ return;
+ }
+ if (!cmd.s[0]) {
+ prot_printf(nntp_out, "501 Empty command\r\n");
+ eatline(nntp_in, c);
+ continue;
+ }
+ if (islower((unsigned char) cmd.s[0]))
+ cmd.s[0] = toupper((unsigned char) cmd.s[0]);
+ for (p = &cmd.s[1]; *p; p++) {
+ if (isupper((unsigned char) *p)) *p = tolower((unsigned char) *p);
+ }
+
+ /* Ihave/Takethis only allowed for feeders */
+ if (!(nntp_capa & MODE_FEED) &&
+ strchr("IT", cmd.s[0])) goto noperm;
+
+ /* Body/Date/Group/Newgroups/Newnews/Next/Over/Post/Xhdr/Xover/Xpat
+ only allowed for readers */
+ if (!(nntp_capa & MODE_READ) &&
+ strchr("BDGNOPX", cmd.s[0])) goto noperm;
+
+ /* Only Authinfo/Capabilities/Check/Head/Help/Ihave/List Active/
+ Mode/Quit/Starttls/Stat/Takethis allowed when not logged in */
+ if (!nntp_userid && !allowanonymous &&
+ !strchr("ACHILMQST", cmd.s[0])) goto nologin;
+
+ switch (cmd.s[0]) {
+ case 'A':
+ if (!strcmp(cmd.s, "Authinfo")) {
+ arg2.len = arg3.len = 0;
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg1); /* subcommand */
+ if (c == EOF) goto missingargs;
+
+ lcase(arg1.s);
+
+ if (strcmp(arg1.s, "generic") && c != ' ') {
+ /* arg2 is required for all subcommands except generic */
+ goto missingargs;
+ }
+ if (c == ' ') {
+ c = getword(nntp_in, &arg2); /* argument/sasl mech */
+ if (c == EOF) goto missingargs;
+ }
+
+ if (!strcmp(arg1.s, "sasl") && c == ' ') {
+ c = getword(nntp_in, &arg3); /* init response (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ if (!strcmp(arg1.s, "user"))
+ cmd_authinfo_user(arg2.s);
+ else if (!strcmp(arg1.s, "pass"))
+ cmd_authinfo_pass(arg2.s);
+ else if (!strcmp(arg1.s, "sasl") || !strcmp(arg1.s, "generic"))
+ cmd_authinfo_sasl(arg1.s, arg2.len ? arg2.s : NULL,
+ arg3.len ? arg3.s : NULL);
+ else
+ prot_printf(nntp_out,
+ "501 Unrecognized AUTHINFO command\r\n");
+ }
+ else if (!(nntp_capa & MODE_READ)) goto noperm;
+ else if (!nntp_userid && !allowanonymous) goto nologin;
+ else if (!strcmp(cmd.s, "Article")) {
+ char curgroup[MAX_MAILBOX_NAME+1], *msgid;
+
+ mode = ARTICLE_ALL;
+
+ article:
+ if (arg1.s) *arg1.s = 0;
+
+ if (c == ' ') {
+ c = getword(nntp_in, &arg1); /* number/msgid (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ /* in case a msgid makes us switch groups */
+ strcpy(curgroup, nntp_group ? nntp_group->name : "");
+
+ if (parserange(arg1.s, &uid, NULL, &msgid, &be) != -1) {
+ if (be) {
+ if (arg1.s && *arg1.s)
+ prot_printf(be->out, "%s %s\r\n", cmd.s, arg1.s);
+ else
+ prot_printf(be->out, "%s\r\n", cmd.s);
+
+ if (be != backend_current) {
+ r = read_response(be, 0, &result);
+ if (r) goto noopengroup;
+
+ prot_printf(nntp_out, "%s", result);
+ if (!strncmp(result, "22", 2) &&
+ mode != ARTICLE_STAT) {
+ pipe_to_end_of_response(be, 0);
+ }
+ }
+ }
+ else
+ cmd_article(mode, msgid, uid);
+ }
+
+ /* return to previously selected group */
+ if (*curgroup && nntp_group &&
+ strcmp(curgroup, nntp_group->name)) {
+ open_group(curgroup, 1, NULL, NULL);
+ }
+ }
+ else goto badcmd;
+ break;
+
+ case 'B':
+ if (!strcmp(cmd.s, "Body")) {
+ mode = ARTICLE_BODY;
+ goto article;
+ }
+ else goto badcmd;
+ break;
+
+ case 'C':
+ if (!strcmp(cmd.s, "Capabilities")) {
+ arg1.len = 0;
+
+ if (c == ' ') {
+ c = getword(nntp_in, &arg1); /* keyword (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_capabilities(arg1.s);
+ }
+ else if (!(nntp_capa & MODE_FEED)) goto noperm;
+ else if (!strcmp(cmd.s, "Check")) {
+ mode = POST_CHECK;
+ goto ihave;
+ }
+ else goto badcmd;
+ break;
+
+ case 'D':
+ if (!strcmp(cmd.s, "Date")) {
+ time_t now = time(NULL);
+ struct tm *my_tm = gmtime(&now);
+ char buf[15];
+
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ strftime(buf, sizeof(buf), "%Y%m%d%H%M%S", my_tm);
+ prot_printf(nntp_out, "111 %s\r\n", buf);
+ }
+ else goto badcmd;
+ break;
+
+ case 'G':
+ if (!strcmp(cmd.s, "Group")) {
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg1); /* group */
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ r = open_group(arg1.s, 0, &be, NULL);
+ if (r) goto nogroup;
+ else if (be) {
+ prot_printf(be->out, "GROUP %s\r\n", arg1.s);
+ r = read_response(be, 0, &result);
+ if (r) goto nogroup;
+
+ prot_printf(nntp_out, "%s", result);
+
+ if (!strncmp(result, "211", 3)) {
+ if (backend_current && backend_current != be) {
+ /* remove backend_current from the protgroup */
+ protgroup_delete(protin, backend_current->in);
+ }
+ backend_current = be;
+
+ /* add backend_current to the protgroup */
+ protgroup_insert(protin, backend_current->in);
+ }
+ }
+ else {
+ if (backend_current) {
+ /* remove backend_current from the protgroup */
+ protgroup_delete(protin, backend_current->in);
+ }
+ backend_current = NULL;
+
+ nntp_exists = nntp_group->exists;
+ nntp_current = nntp_exists > 0;
+
+ prot_printf(nntp_out, "211 %u %lu %lu %s\r\n",
+ nntp_exists,
+ nntp_exists ? index_getuid(1) :
+ nntp_group->last_uid+1,
+ nntp_exists ? index_getuid(nntp_exists) :
+ nntp_group->last_uid,
+ arg1.s);
+ }
+ }
+ else goto badcmd;
+ break;
+
+ case 'H':
+ if (!strcmp(cmd.s, "Head")) {
+ mode = ARTICLE_HEAD;
+ goto article;
+ }
+ else if (!strcmp(cmd.s, "Help")) {
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_help();
+ }
+ else if (!(nntp_capa & MODE_READ)) goto noperm;
+ else if (!nntp_userid && !allowanonymous) goto nologin;
+ else if (!strcmp(cmd.s, "Hdr")) {
+ char curgroup[MAX_MAILBOX_NAME+1], *msgid;
+
+ hdr:
+ if (arg2.s) *arg2.s = 0;
+
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg1); /* header */
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ c = getword(nntp_in, &arg2); /* range (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ /* in case a msgid makes us switch groups */
+ strcpy(curgroup, nntp_group ? nntp_group->name : "");
+
+ if (parserange(arg2.s, &uid, &last, &msgid, &be) != -1) {
+ if (be) {
+ if (arg2.s && *arg2.s)
+ prot_printf(be->out, "%s %s %s\r\n",
+ cmd.s, arg1.s, arg2.s);
+ else
+ prot_printf(be->out, "%s %s\r\n", cmd.s, arg1.s);
+
+ if (be != backend_current) {
+ r = read_response(be, 0, &result);
+ if (r) goto noopengroup;
+
+ prot_printf(nntp_out, "%s", result);
+ if (!strncmp(result, "22", 2)) { /* 221 or 225 */
+ pipe_to_end_of_response(be, 0);
+ }
+ }
+ }
+ else
+ cmd_hdr(cmd.s, arg1.s, NULL, msgid, uid, last);
+ }
+
+ /* return to previously selected group */
+ if (*curgroup && nntp_group &&
+ strcmp(curgroup, nntp_group->name)) {
+ open_group(curgroup, 1, NULL, NULL);
+ }
+ }
+ else goto badcmd;
+ break;
+
+ case 'I':
+ if (!strcmp(cmd.s, "Ihave")) {
+ mode = POST_IHAVE;
+
+ ihave:
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg1); /* msgid */
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_post(arg1.s, mode);
+ }
+ else goto badcmd;
+ break;
+
+ case 'L':
+ if (!strcmp(cmd.s, "List")) {
+ arg1.len = arg2.len = 0;
+ if (c == ' ') {
+ c = getword(nntp_in, &arg1); /* subcommand (optional) */
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ c = getword(nntp_in, &arg2); /* argument (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_list(arg1.len ? arg1.s : NULL, arg2.len ? arg2.s : NULL);
+ }
+ else if (!(nntp_capa & MODE_READ)) goto noperm;
+ else if (!nntp_userid && !allowanonymous) goto nologin;
+ else if (!strcmp(cmd.s, "Last")) {
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ if (backend_current) {
+ prot_printf(backend_current->out, "LAST\r\n");
+ }
+ else if (!nntp_group) goto noopengroup;
+ else if (!nntp_current) goto nocurrent;
+ else if (nntp_current == 1) {
+ prot_printf(nntp_out,
+ "422 No previous article in this group\r\n");
+ }
+ else {
+ char *msgid = index_get_msgid(nntp_group, --nntp_current);
+
+ prot_printf(nntp_out, "223 %u %s\r\n",
+ index_getuid(nntp_current),
+ msgid ? msgid : "<0>");
+
+ if (msgid) free(msgid);
+ }
+ }
+ else if (!strcmp(cmd.s, "Listgroup")) {
+ arg1.len = 0;
+ arg2.s = arg2.s ? strcpy(arg2.s, "1-") : "1-";
+ be = backend_current;
+
+ if (c == ' ') {
+ c = getword(nntp_in, &arg1); /* group (optional) */
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ c = getword(nntp_in, &arg2); /* range (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ if (arg1.len) {
+ r = open_group(arg1.s, 0, &be, NULL);
+ if (r) goto nogroup;
+ }
+
+ if (be) {
+ if (arg1.len)
+ prot_printf(be->out, "LISTGROUP %s %s\r\n",
+ arg1.s, arg2.s);
+ else
+ prot_printf(be->out, "LISTGROUP\r\n");
+
+ r = read_response(be, 0, &result);
+ if (r) goto noopengroup;
+
+ prot_printf(nntp_out, "%s", result);
+
+ if (!strncmp(result, "211", 3)) {
+ pipe_to_end_of_response(be, 0);
+
+ if (backend_current && backend_current != be) {
+ /* remove backend_current from the protgroup */
+ protgroup_delete(protin, backend_current->in);
+ }
+ backend_current = be;
+
+ /* add backend_current to the protgroup */
+ protgroup_insert(protin, backend_current->in);
+ }
+ }
+ else if (!nntp_group) goto noopengroup;
+ else if (parserange(arg2.s, &uid, &last, NULL, NULL) != -1) {
+ int msgno, last_msgno;
+
+ if (backend_current) {
+ /* remove backend_current from the protgroup */
+ protgroup_delete(protin, backend_current->in);
+ }
+ backend_current = NULL;
+
+ nntp_exists = nntp_group->exists;
+ nntp_current = nntp_exists > 0;
+
+ prot_printf(nntp_out, "211 %u %lu %lu %s\r\n",
+ nntp_exists,
+ nntp_exists ? index_getuid(1) :
+ nntp_group->last_uid+1,
+ nntp_exists ? index_getuid(nntp_exists) :
+ nntp_group->last_uid,
+ nntp_group->name + strlen(newsprefix));
+
+ msgno = index_finduid(uid);
+ if (!msgno || index_getuid(msgno) != uid) msgno++;
+ last_msgno = index_finduid(last);
+
+ for (; msgno <= last_msgno; msgno++)
+ prot_printf(nntp_out, "%u\r\n", index_getuid(msgno));
+ prot_printf(nntp_out, ".\r\n");
+ }
+ }
+ else goto badcmd;
+ break;
+
+ case 'M':
+ if (!strcmp(cmd.s, "Mode")) {
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg1); /* mode */
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_mode(arg1.s);
+ }
+ else goto badcmd;
+ break;
+
+ case 'N':
+ if (!strcmp(cmd.s, "Newgroups")) {
+ time_t tstamp;
+
+ arg3.len = 0;
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg1); /* date */
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg2); /* time */
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ c = getword(nntp_in, &arg3); /* "GMT" (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ if ((tstamp = parse_datetime(arg1.s, arg2.s,
+ arg3.len ? arg3.s : NULL)) < 0)
+ goto baddatetime;
+
+ cmd_newgroups(tstamp);
+ }
+ else if (!strcmp(cmd.s, "Newnews")) {
+ time_t tstamp;
+
+ if (!config_getswitch(IMAPOPT_ALLOWNEWNEWS))
+ goto cmddisabled;
+
+ arg4.len = 0;
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg1); /* wildmat */
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg2); /* date */
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg3); /* time */
+ if (c == EOF) goto missingargs;
+ if (c == ' ') {
+ c = getword(nntp_in, &arg4); /* "GMT" (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ if ((tstamp = parse_datetime(arg2.s, arg3.s,
+ arg4.len ? arg4.s : NULL)) < 0)
+ goto baddatetime;
+
+ cmd_newnews(arg1.s, tstamp);
+ }
+ else if (!strcmp(cmd.s, "Next")) {
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ if (backend_current) {
+ prot_printf(backend_current->out, "NEXT\r\n");
+ }
+ else if (!nntp_group) goto noopengroup;
+ else if (!nntp_current) goto nocurrent;
+ else if (nntp_current == nntp_exists) {
+ prot_printf(nntp_out,
+ "421 No next article in this group\r\n");
+ }
+ else {
+ char *msgid = index_get_msgid(nntp_group, ++nntp_current);
+
+ prot_printf(nntp_out, "223 %u %s\r\n",
+ index_getuid(nntp_current),
+ msgid ? msgid : "<0>");
+
+ if (msgid) free(msgid);
+ }
+ }
+ else goto badcmd;
+ break;
+
+ case 'O':
+ if (!strcmp(cmd.s, "Over")) {
+ char curgroup[MAX_MAILBOX_NAME+1], *msgid;
+
+ over:
+ if (arg1.s) *arg1.s = 0;
+
+ if (c == ' ') {
+ c = getword(nntp_in, &arg1); /* range/msgid (optional) */
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ /* in case a msgid makes us switch groups */
+ strcpy(curgroup, nntp_group ? nntp_group->name : "");
+
+ msgid = NULL;
+ if (parserange(arg1.s, &uid, &last,
+ /* XOVER doesn't accept message-id */
+ (cmd.s[0] == 'X' ? NULL : &msgid), &be) != -1) {
+ if (be) {
+ if (arg1.s && *arg1.s)
+ prot_printf(be->out, "%s %s\r\n", cmd.s, arg1.s);
+ else
+ prot_printf(be->out, "%s\r\n", cmd.s);
+
+ if (be != backend_current) {
+ r = read_response(be, 0, &result);
+ if (r) goto noopengroup;
+
+ prot_printf(nntp_out, "%s", result);
+ if (!strncmp(result, "224", 3)) {
+ pipe_to_end_of_response(be, 0);
+ }
+ }
+ }
+ else
+ cmd_over(msgid, uid, last);
+ }
+
+ /* return to previously selected group */
+ if (*curgroup && nntp_group &&
+ strcmp(curgroup, nntp_group->name)) {
+ open_group(curgroup, 1, NULL, NULL);
+ }
+ }
+ else goto badcmd;
+ break;
+
+ case 'P':
+ if (!strcmp(cmd.s, "Post")) {
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_post(NULL, POST_POST);
+ }
+ else goto badcmd;
+ break;
+
+ case 'Q':
+ if (!strcmp(cmd.s, "Quit")) {
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ prot_printf(nntp_out, "205 Connection closing\r\n");
+ return;
+ }
+ else goto badcmd;
+ break;
+
+ case 'S':
+ if (!strcmp(cmd.s, "Starttls") && tls_enabled()) {
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_starttls(0);
+ }
+ else if (!strcmp(cmd.s, "Stat")) {
+ mode = ARTICLE_STAT;
+ goto article;
+ }
+ else if (!nntp_userid && !allowanonymous) goto nologin;
+ else if (!strcmp(cmd.s, "Slave")) {
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ prot_printf(nntp_out, "202 Slave status noted\r\n");
+ }
+ else goto badcmd;
+ break;
+
+ case 'T':
+ if (!strcmp(cmd.s, "Takethis")) {
+ mode = POST_TAKETHIS;
+ goto ihave;
+ }
+ else goto badcmd;
+ break;
+
+ case 'X':
+ if (!strcmp(cmd.s, "Xhdr")) {
+ goto hdr;
+ }
+ else if (!strcmp(cmd.s, "Xover")) {
+ goto over;
+ }
+ else if (!strcmp(cmd.s, "Xpat")) {
+ char curgroup[MAX_MAILBOX_NAME+1], *msgid;
+
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg1); /* header */
+ if (c != ' ') goto missingargs;
+
+ /* gobble extra whitespace (hack for Mozilla) */
+ while ((c = prot_getc(nntp_in)) == ' ');
+ prot_ungetc(c, nntp_in);
+
+ c = getword(nntp_in, &arg2); /* range */
+ if (c != ' ') goto missingargs;
+ c = getword(nntp_in, &arg3); /* wildmat */
+ if (c == EOF) goto missingargs;
+
+ /* XXX per RFC 2980, we can have multiple patterns */
+
+ if (c == '\r') c = prot_getc(nntp_in);
+ if (c != '\n') goto extraargs;
+
+ /* in case a msgid makes us switch groups */
+ strcpy(curgroup, nntp_group ? nntp_group->name : "");
+
+ if (parserange(arg2.s, &uid, &last, &msgid, &be) != -1) {
+ if (be) {
+ prot_printf(be->out, "%s %s %s %s\r\n",
+ cmd.s, arg1.s, arg2.s, arg3.s);
+
+ if (be != backend_current) {
+ r = read_response(be, 0, &result);
+ if (r) goto noopengroup;
+
+ prot_printf(nntp_out, "%s", result);
+ if (!strncmp(result, "221", 3)) {
+ pipe_to_end_of_response(be, 0);
+ }
+ }
+ }
+ else
+ cmd_hdr(cmd.s, arg1.s, arg3.s, msgid, uid, last);
+ }
+
+ /* return to previously selected group */
+ if (*curgroup && nntp_group &&
+ strcmp(curgroup, nntp_group->name)) {
+ open_group(curgroup, 1, NULL, NULL);
+ }
+ }
+ else goto badcmd;
+ break;
+
+ default:
+ badcmd:
+ prot_printf(nntp_out, "500 Unrecognized command\r\n");
+ eatline(nntp_in, c);
+ }
+
+ continue;
+
+ noperm:
+ prot_printf(nntp_out, "502 Permission denied\r\n");
+ eatline(nntp_in, c);
+ continue;
+
+ nologin:
+ prot_printf(nntp_out, "480 Authentication required\r\n");
+ eatline(nntp_in, c);
+ continue;
+
+ cmddisabled:
+ prot_printf(nntp_out, "503 \"%s\" disabled\r\n", cmd.s);
+ eatline(nntp_in, c);
+ continue;
+
+ extraargs:
+ prot_printf(nntp_out, "501 Unexpected extra argument\r\n");
+ eatline(nntp_in, c);
+ continue;
+
+ missingargs:
+ prot_printf(nntp_out, "501 Missing argument\r\n");
+ eatline(nntp_in, c);
+ continue;
+
+ baddatetime:
+ prot_printf(nntp_out, "501 Bad date/time\r\n");
+ continue;
+
+ nogroup:
+ prot_printf(nntp_out, "411 No such newsgroup (%s)\r\n",
+ error_message(r));
+ continue;
+
+ noopengroup:
+ prot_printf(nntp_out, "412 No newsgroup selected\r\n");
+ continue;
+
+ nocurrent:
+ prot_printf(nntp_out, "420 Current article number is invalid\r\n");
+ continue;
+
+ noarticle:
+ prot_printf(nntp_out, "423 No such article(s) in this newsgroup\r\n");
+ continue;
+ }
+}
+
+struct findrock {
+ const char *mailbox;
+ unsigned long uid;
+};
+
+/*
+ * duplicate_find() callback function to fetch a message by msgid
+ */
+static int find_cb(const char *msgid __attribute__((unused)),
+ const char *mailbox,
+ time_t mark __attribute__((unused)),
+ unsigned long uid, void *rock)
+{
+ struct findrock *frock = (struct findrock *) rock;
+
+ /* make sure its a message in a mailbox that we're serving via NNTP */
+ if (!strncmp(mailbox, "user.", 5) ||
+ strncmp(mailbox, newsprefix, strlen(newsprefix))) return 0;
+
+ frock->mailbox = mailbox;
+ frock->uid = uid;
+
+ return CYRUSDB_DONE;
+}
+
+static int find_msgid(char *msgid, char **mailbox, unsigned long *uid)
+{
+ struct findrock frock = { NULL, 0 };
+
+ duplicate_find(msgid, &find_cb, &frock);
+
+ if (!frock.mailbox) return 0;
+
+ if (mailbox) {
+ if (!frock.mailbox[0]) return 0;
+ *mailbox = (char *) frock.mailbox;
+ }
+ if (uid) {
+ if (!frock.uid) return 0;
+ *uid = frock.uid;
+ }
+
+ return 1;
+}
+
+static int parsenum(char *str, char **rem)
+{
+ char *p = str;
+ int result = 0;
+
+ while (*p && isdigit((int) *p)) {
+ result = result * 10 + *p++ - '0';
+ if (result < 0) {
+ /* xxx overflow */
+ }
+ }
+
+ if (rem) {
+ *rem = p;
+ return (*p && p == str ? -1 : result);
+ }
+
+ return (*p ? -1 : result);
+}
+
+static int parserange(char *str, unsigned long *uid, unsigned long *last,
+ char **msgid, struct backend **ret)
+{
+ char *p = NULL, *mboxname;
+ int r = 0;
+
+ *uid = 0;
+ if (last) *last = 0;
+ if (msgid) *msgid = NULL;
+ if (ret) *ret = NULL;
+
+ if (!str || !*str) {
+ /* no argument, use current article */
+ if (backend_current) {
+ if (ret) *ret = backend_current;
+ }
+ else if (!nntp_group) goto noopengroup;
+ else if (!nntp_current) goto nocurrent;
+ else {
+ *uid = index_getuid(nntp_current);
+ if (last) *last = *uid;
+ }
+ }
+ else if (*str == '<') {
+ /* message-id, find server and/or mailbox */
+ if (!msgid) goto badrange;
+ if (!find_msgid(str, &mboxname, uid)) goto nomsgid;
+ if (!nntp_group || strcmp(mboxname, nntp_group->name)) {
+ if ((r = open_group(mboxname, 1, ret, NULL))) goto nomsgid;
+ *msgid = str;
+ }
+ /* else, within the current group, so treat as by uid */
+ }
+ else if (backend_current)
+ *ret = backend_current;
+ else if (!nntp_group) goto noopengroup;
+ else if ((*uid = parsenum(str, &p)) <= 0) goto badrange;
+ else if (p && *p) {
+ /* extra stuff, check for range */
+ if (!last || (*p != '-')) goto badrange;
+ if (*++p)
+ *last = parsenum(p, NULL);
+ else
+ *last = index_getuid(nntp_exists);
+ }
+
+ if (last && !*last) *last = *uid;
+
+ return 0;
+
+ noopengroup:
+ prot_printf(nntp_out, "412 No newsgroup selected\r\n");
+ return -1;
+
+ nocurrent:
+ prot_printf(nntp_out, "420 Current article number is invalid\r\n");
+ return -1;
+
+ nomsgid:
+ prot_printf(nntp_out, "430 No article found with that message-id");
+ if (r) prot_printf(nntp_out, " (%s)", error_message(r));
+ prot_printf(nntp_out, "\r\n");
+ return -1;
+
+ badrange:
+ prot_printf(nntp_out, "501 Bad message-id, message number, or range\r\n");
+ return -1;
+}
+
+static const int numdays[] = {
+ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
+};
+
+#define isleap(year) (!((year) % 4) && (((year) % 100) || !((year) % 400)))
+
+/*
+ * Parse a date/time specification per draft-ietf-nntpext-base.
+ */
+static time_t parse_datetime(char *datestr, char *timestr, char *gmt)
+{
+ int datelen = strlen(datestr), leapday;
+ unsigned long d, t;
+ char *p;
+ struct tm tm;
+
+ /* check format of strings */
+ if ((datelen != 6 && datelen != 8) ||
+ strlen(timestr) != 6 || (gmt && strcasecmp(gmt, "GMT")))
+ return -1;
+
+ /* convert datestr to ulong */
+ d = strtoul(datestr, &p, 10);
+ if (d == ULONG_MAX || *p) return -1;
+
+ /* convert timestr to ulong */
+ t = strtoul(timestr, &p, 10);
+ if (t == ULONG_MAX || *p) return -1;
+
+ /* populate the time struct */
+ tm.tm_year = d / 10000;
+ d %= 10000;
+ tm.tm_mon = d / 100 - 1;
+ tm.tm_mday = d % 100;
+
+ tm.tm_hour = t / 10000;
+ t %= 10000;
+ tm.tm_min = t / 100;
+ tm.tm_sec = t % 100;
+
+ /* massage the year to years since 1900 */
+ if (tm.tm_year > 99) tm.tm_year -= 1900;
+ else {
+ /*
+ * guess century
+ * if year > current year, use previous century
+ * otherwise, use current century
+ */
+ time_t now = time(NULL);
+ struct tm *current;
+ int century;
+
+ current = gmt ? gmtime(&now) : localtime(&now);
+ century = current->tm_year / 100;
+ if (tm.tm_year > current->tm_year % 100) century--;
+ tm.tm_year += century * 100;
+ }
+
+ /* sanity check the date/time (including leap day and leap second) */
+ leapday = tm.tm_mon == 1 && isleap(tm.tm_year + 1900);
+ if (tm.tm_year < 70 || tm.tm_mon < 0 || tm.tm_mon > 11 ||
+ tm.tm_mday < 1 || tm.tm_mday > (numdays[tm.tm_mon] + leapday) ||
+ tm.tm_hour > 23 || tm.tm_min > 59 || tm.tm_sec > 60)
+ return -1;
+
+ return (gmt ? mkgmtime(&tm) : mktime(&tm));
+}
+
+static int open_group(char *name, int has_prefix, struct backend **ret,
+ int *postable /* used for LIST ACTIVE only */)
+{
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int r = 0;
+ char *acl, *newserver;
+ struct backend *backend_next = NULL;
+
+ /* close local group */
+ if (nntp_group) {
+ mailbox_close(nntp_group);
+ nntp_group = 0;
+ }
+
+ if (!has_prefix) {
+ snprintf(mailboxname, sizeof(mailboxname), "%s%s", newsprefix, name);
+ name = mailboxname;
+ }
+
+ if (!r) r = mlookup(name, &newserver, &acl, NULL);
+
+ if (!r && acl) {
+ int myrights = cyrus_acl_myrights(nntp_authstate, acl);
+
+ if (postable) *postable = myrights & ACL_POST;
+ if (!postable && /* allow limited 'r' for LIST ACTIVE */
+ !(myrights & ACL_READ)) {
+ r = (myrights & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ }
+ }
+
+ if (r) return r;
+
+ if (newserver) {
+ /* remote group */
+ backend_next = proxy_findserver(newserver, &protocol[PROTOCOL_NNTP],
+ nntp_userid ? nntp_userid : "anonymous",
+ &backend_cached, &backend_current,
+ NULL, nntp_in);
+ if (!backend_next) return IMAP_SERVER_UNAVAILABLE;
+
+ *ret = backend_next;
+ }
+ else {
+ /* local group */
+ int doclose = 0;
+
+ r = mailbox_open_header(name, nntp_authstate, &mboxstruct);
+
+ if (!r) {
+ doclose = 1;
+ r = mailbox_open_index(&mboxstruct);
+ }
+
+ if (r) {
+ if (doclose) mailbox_close(&mboxstruct);
+ return r;
+ }
+
+ nntp_group = &mboxstruct;
+ index_operatemailbox(nntp_group);
+
+ if (ret) *ret = NULL;
+ }
+
+ syslog(LOG_DEBUG, "open: user %s opened %s",
+ nntp_userid ? nntp_userid : "anonymous", name);
+
+ return 0;
+}
+
+static void cmd_capabilities(char *keyword __attribute__((unused)))
+{
+ const char *mechlist;
+ int mechcount = 0;
+
+ prot_printf(nntp_out, "101 Capability list follows:\r\n");
+ prot_printf(nntp_out, "VERSION 2\r\n");
+ prot_printf(nntp_out,
+ "IMPLEMENTATION Cyrus NNTP%s server %s\r\n",
+ config_mupdate_server ? " Murder" : "", CYRUS_VERSION);
+
+ /* add STARTTLS */
+ if (tls_enabled() && !nntp_starttls_done && !nntp_authstate)
+ prot_printf(nntp_out, "STARTTLS\r\n");
+
+ /* check for SASL mechs */
+ sasl_listmech(nntp_saslconn, NULL, "SASL ", " ", "\r\n",
+ &mechlist, NULL, &mechcount);
+
+ /* add the AUTHINFO variants */
+ if (!nntp_authstate) {
+ prot_printf(nntp_out, "AUTHINFO%s%s\r\n",
+ (nntp_starttls_done ||
+ config_getswitch(IMAPOPT_ALLOWPLAINTEXT)) ?
+ " USER" : "", mechcount ? " SASL" : "");
+ }
+
+ /* add the SASL mechs */
+ if (mechcount) prot_printf(nntp_out, "%s", mechlist);
+
+ /* add the reader capabilities/extensions */
+ if ((nntp_capa & MODE_READ) && (nntp_userid || allowanonymous)) {
+ prot_printf(nntp_out, "READER\r\n");
+ prot_printf(nntp_out, "POST\r\n");
+ if (config_getswitch(IMAPOPT_ALLOWNEWNEWS))
+ prot_printf(nntp_out, "NEWNEWS\r\n");
+ prot_printf(nntp_out, "HDR\r\n");
+ prot_printf(nntp_out, "OVER\r\n");
+ prot_printf(nntp_out, "XPAT\r\n");
+ }
+
+ /* add the feeder capabilities/extensions */
+ if (nntp_capa & MODE_FEED) {
+ prot_printf(nntp_out, "IHAVE\r\n");
+ prot_printf(nntp_out, "STREAMING\r\n");
+ }
+
+ /* add the LIST variants */
+ prot_printf(nntp_out, "LIST ACTIVE%s\r\n",
+ ((nntp_capa & MODE_READ) && (nntp_userid || allowanonymous)) ?
+ " HEADERS NEWSGROUPS OVERVIEW.FMT" : "");
+
+ prot_printf(nntp_out, ".\r\n");
+
+ did_capabilities = 1;
+}
+
+/*
+ * duplicate_find() callback function to build Xref content
+ */
+struct xref_rock {
+ char *buf;
+ size_t size;
+};
+
+static int xref_cb(const char *msgid __attribute__((unused)),
+ const char *mailbox,
+ time_t mark __attribute__((unused)),
+ unsigned long uid, void *rock)
+{
+ struct xref_rock *xrock = (struct xref_rock *) rock;
+ size_t len = strlen(xrock->buf);
+
+ /* make sure its a message in a mailbox that we're serving via NNTP */
+ if (*mailbox && !strncmp(mailbox, newsprefix, strlen(newsprefix)) &&
+ strncmp(mailbox, "user.", 5)) {
+ snprintf(xrock->buf + len, xrock->size - len,
+ " %s:%lu", mailbox + strlen(newsprefix), uid);
+ }
+
+ return 0;
+}
+
+/*
+ * Build an Xref header. We have to do this on the fly because there is
+ * no way to store it in the article at delivery time.
+ */
+static void build_xref(char *msgid, char *buf, size_t size, int body_only)
+{
+ struct xref_rock xrock = { buf, size };
+
+ snprintf(buf, size, "%s%s", body_only ? "" : "Xref: ", config_servername);
+ duplicate_find(msgid, &xref_cb, &xrock);
+}
+
+static void cmd_article(int part, char *msgid, unsigned long uid)
+{
+ int msgno, by_msgid = (msgid != NULL);
+ char fname[MAX_MAILBOX_PATH+1];
+ FILE *msgfile;
+
+ msgno = index_finduid(uid);
+ if (!msgno || index_getuid(msgno) != uid) {
+ prot_printf(nntp_out, "423 No such article in this newsgroup\r\n");
+ return;
+ }
+
+ strlcpy(fname, nntp_group->path, sizeof(fname));
+ strlcat(fname, "/", sizeof(fname));
+ mailbox_message_get_fname(nntp_group, uid, fname + strlen(fname),
+ sizeof(fname) - strlen(fname));
+
+ msgfile = fopen(fname, "r");
+ if (!msgfile) {
+ prot_printf(nntp_out, "502 Could not read message file\r\n");
+ return;
+ }
+
+ nntp_current = msgno;
+
+ if (!by_msgid) msgid = index_get_msgid(nntp_group, msgno);
+
+ prot_printf(nntp_out, "%u %lu %s\r\n",
+ 220 + part, by_msgid ? 0 : uid, msgid ? msgid : "<0>");
+
+ if (part != ARTICLE_STAT) {
+ char buf[4096];
+ int body = 0;
+ int output = (part != ARTICLE_BODY);
+
+ while (fgets(buf, sizeof(buf), msgfile)) {
+
+ if (!body && buf[0] == '\r' && buf[1] == '\n') {
+ /* blank line between header and body */
+ body = 1;
+ if (output) {
+ /* add the Xref header */
+ char xref[8192];
+
+ build_xref(msgid, xref, sizeof(xref), 0);
+ prot_printf(nntp_out, "%s\r\n", xref);
+ }
+ if (part == ARTICLE_HEAD) {
+ /* we're done */
+ break;
+ }
+ else if (part == ARTICLE_BODY) {
+ /* start outputing text */
+ output = 1;
+ continue;
+ }
+ }
+
+ if (output) {
+ if (buf[0] == '.') prot_putc('.', nntp_out);
+ do {
+ prot_printf(nntp_out, "%s", buf);
+ } while (buf[strlen(buf)-1] != '\n' &&
+ fgets(buf, sizeof(buf), msgfile));
+ }
+ }
+
+ /* Protect against messages not ending in CRLF */
+ if (buf[strlen(buf)-1] != '\n') prot_printf(nntp_out, "\r\n");
+
+ prot_printf(nntp_out, ".\r\n");
+
+ /* Reset inactivity timer in case we spend a long time
+ pushing data to the client over a slow link. */
+ prot_resettimeout(nntp_in);
+ }
+
+ if (!by_msgid) free(msgid);
+
+ fclose(msgfile);
+}
+
+static void cmd_authinfo_user(char *user)
+{
+ char *p;
+
+ if (nntp_authstate) {
+ prot_printf(nntp_out, "502 Already authenticated\r\n");
+ return;
+ }
+
+ /* possibly disallow USER */
+ if (!(nntp_starttls_done || config_getswitch(IMAPOPT_ALLOWPLAINTEXT))) {
+ prot_printf(nntp_out,
+ "483 AUTHINFO USER command only available under a layer\r\n");
+ return;
+ }
+
+ if (nntp_userid) {
+ prot_printf(nntp_out, "502 Must give AUTHINFO PASS command\r\n");
+ return;
+ }
+
+ if (!(p = canonify_userid(user, NULL, NULL))) {
+ prot_printf(nntp_out, "502 Invalid user\r\n");
+ syslog(LOG_NOTICE,
+ "badlogin: %s plaintext %s invalid user",
+ nntp_clienthost, beautify_string(user));
+ }
+ else {
+ nntp_userid = xstrdup(p);
+ prot_printf(nntp_out, "381 Give AUTHINFO PASS command\r\n");
+ }
+}
+
+static void cmd_authinfo_pass(char *pass)
+{
+ if (nntp_authstate) {
+ prot_printf(nntp_out, "502 Already authenticated\r\n");
+ return;
+ }
+
+ if (!nntp_userid) {
+ prot_printf(nntp_out, "482 Must give AUTHINFO USER command first\r\n");
+ return;
+ }
+
+ if (!strcmp(nntp_userid, "anonymous")) {
+ if (allowanonymous) {
+ pass = beautify_string(pass);
+ if (strlen(pass) > 500) pass[500] = '\0';
+ syslog(LOG_NOTICE, "login: %s anonymous %s",
+ nntp_clienthost, pass);
+ }
+ else {
+ syslog(LOG_NOTICE, "badlogin: %s anonymous login refused",
+ nntp_clienthost);
+ prot_printf(nntp_out, "502 Invalid login\r\n");
+ return;
+ }
+ }
+ else if (sasl_checkpass(nntp_saslconn,
+ nntp_userid,
+ strlen(nntp_userid),
+ pass,
+ strlen(pass))!=SASL_OK) {
+ syslog(LOG_NOTICE, "badlogin: %s plaintext %s %s",
+ nntp_clienthost, nntp_userid, sasl_errdetail(nntp_saslconn));
+ sleep(3);
+ prot_printf(nntp_out, "502 Invalid login\r\n");
+ free(nntp_userid);
+ nntp_userid = 0;
+
+ return;
+ }
+ else {
+ syslog(LOG_NOTICE, "login: %s %s plaintext%s %s", nntp_clienthost,
+ nntp_userid, nntp_starttls_done ? "+TLS" : "",
+ "User logged in");
+
+ prot_printf(nntp_out, "281 User logged in\r\n");
+
+ nntp_authstate = auth_newstate(nntp_userid);
+
+ /* Create telemetry log */
+ nntp_logfd = telemetry_log(nntp_userid, nntp_in, nntp_out, 0);
+ }
+}
+
+static void cmd_authinfo_sasl(char *cmd, char *mech, char *resp)
+{
+ int r, sasl_result;
+ char *success_data;
+ const int *ssfp;
+ char *ssfmsg = NULL;
+ const char *canon_user;
+
+ if (nntp_userid) {
+ prot_printf(nntp_out, "502 Already authenticated\r\n");
+ return;
+ }
+
+ if (cmd[0] == 'g') {
+ /* if client didn't specify any mech we give them the list */
+ if (!mech) {
+ const char *sasllist;
+ int mechnum;
+
+ prot_printf(nntp_out, "281 List of mechanisms follows\r\n");
+
+ /* CRLF separated, dot terminated */
+ if (sasl_listmech(nntp_saslconn, NULL,
+ "", "\r\n", "\r\n",
+ &sasllist,
+ NULL, &mechnum) == SASL_OK) {
+ if (mechnum > 0) {
+ prot_printf(nntp_out, "%s", sasllist);
+ }
+ }
+
+ prot_printf(nntp_out, ".\r\n");
+ return;
+ }
+
+ r = saslserver(nntp_saslconn, mech, resp, "AUTHINFO GENERIC ", "381 ",
+ "", nntp_in, nntp_out, &sasl_result, &success_data);
+ }
+ else
+ r = saslserver(nntp_saslconn, mech, resp, "", "383 ", "=",
+ nntp_in, nntp_out, &sasl_result, &success_data);
+
+ if (r) {
+ int code;
+ const char *errorstring = NULL;
+
+ switch (r) {
+ case IMAP_SASL_CANCEL:
+ prot_printf(nntp_out,
+ "481 Client canceled authentication\r\n");
+ break;
+ case IMAP_SASL_PROTERR:
+ errorstring = prot_error(nntp_in);
+
+ prot_printf(nntp_out,
+ "482 Error reading client response: %s\r\n",
+ errorstring ? errorstring : "");
+ break;
+ default:
+ /* failed authentication */
+ switch (sasl_result) {
+ case SASL_NOMECH:
+ case SASL_TOOWEAK:
+ code = 501;
+ break;
+ case SASL_ENCRYPT:
+ code = 483;
+ break;
+ case SASL_BADPROT:
+ code = 482;
+ break;
+ default:
+ code = 481;
+ }
+
+ syslog(LOG_NOTICE, "badlogin: %s %s [%s]",
+ nntp_clienthost, mech, sasl_errdetail(nntp_saslconn));
+
+ sleep(3);
+
+ /* Don't allow user probing */
+ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
+
+ errorstring = sasl_errstring(sasl_result, NULL, NULL);
+ if (errorstring) {
+ prot_printf(nntp_out, "%d %s\r\n", code, errorstring);
+ } else {
+ prot_printf(nntp_out, "%d Error authenticating\r\n", code);
+ }
+ }
+
+ reset_saslconn(&nntp_saslconn);
+ return;
+ }
+
+ /* successful authentication */
+
+ /* get the userid from SASL --- already canonicalized from
+ * mysasl_proxy_policy()
+ */
+ sasl_result = sasl_getprop(nntp_saslconn, SASL_USERNAME,
+ (const void **) &canon_user);
+ nntp_userid = xstrdup(canon_user);
+ if (sasl_result != SASL_OK) {
+ prot_printf(nntp_out, "481 weird SASL error %d SASL_USERNAME\r\n",
+ sasl_result);
+ syslog(LOG_ERR, "weird SASL error %d getting SASL_USERNAME",
+ sasl_result);
+ reset_saslconn(&nntp_saslconn);
+ return;
+ }
+
+ proc_register("nntpd", nntp_clienthost, nntp_userid, (char *)0);
+
+ syslog(LOG_NOTICE, "login: %s %s %s%s %s", nntp_clienthost, nntp_userid,
+ mech, nntp_starttls_done ? "+TLS" : "", "User logged in");
+
+ sasl_getprop(nntp_saslconn, SASL_SSF, (const void **) &ssfp);
+
+ /* really, we should be doing a sasl_getprop on SASL_SSF_EXTERNAL,
+ but the current libsasl doesn't allow that. */
+ if (nntp_starttls_done) {
+ switch(*ssfp) {
+ case 0: ssfmsg = "tls protection"; break;
+ case 1: ssfmsg = "tls plus integrity protection"; break;
+ default: ssfmsg = "tls plus privacy protection"; break;
+ }
+ } else {
+ switch(*ssfp) {
+ case 0: ssfmsg = "no protection"; break;
+ case 1: ssfmsg = "integrity protection"; break;
+ default: ssfmsg = "privacy protection"; break;
+ }
+ }
+
+ if (success_data) {
+ prot_printf(nntp_out, "283 %s\r\n", success_data);
+ free(success_data);
+ } else {
+ prot_printf(nntp_out, "281 Success (%s)\r\n", ssfmsg);
+ }
+
+ prot_setsasl(nntp_in, nntp_saslconn);
+ prot_setsasl(nntp_out, nntp_saslconn);
+
+ /* Create telemetry log */
+ nntp_logfd = telemetry_log(nntp_userid, nntp_in, nntp_out, 0);
+}
+
+static void cmd_hdr(char *cmd, char *hdr, char *pat, char *msgid,
+ unsigned long uid, unsigned long last)
+{
+ int msgno, last_msgno;
+ int by_msgid = (msgid != NULL);
+ int found = 0;
+
+ lcase(hdr);
+
+ msgno = index_finduid(uid);
+ if (!msgno || index_getuid(msgno) != uid) msgno++;
+ last_msgno = index_finduid(last);
+
+ for (; msgno <= last_msgno; msgno++) {
+ char *body;
+
+ if (!found++)
+ prot_printf(nntp_out, "%u Headers follow:\r\n",
+ cmd[0] == 'X' ? 221 : 225);
+
+ /* see if we're looking for metadata */
+ if (hdr[0] == ':') {
+ if (!strcasecmp(":size", hdr)) {
+ char xref[8192];
+ unsigned long size = index_getsize(nntp_group, msgno);
+
+ if (!by_msgid) msgid = index_get_msgid(nntp_group, msgno);
+ build_xref(msgid, xref, sizeof(xref), 0);
+ if (!by_msgid) free(msgid);
+
+ prot_printf(nntp_out, "%lu %lu\r\n", by_msgid ? 0 : uid,
+ size + strlen(xref) + 2); /* +2 for \r\n */
+ }
+ else if (!strcasecmp(":lines", hdr))
+ prot_printf(nntp_out, "%lu %lu\r\n",
+ by_msgid ? 0 : index_getuid(msgno),
+ index_getlines(nntp_group, msgno));
+ else
+ prot_printf(nntp_out, "%lu \r\n",
+ by_msgid ? 0 : index_getuid(msgno));
+ }
+ else if (!strcmp(hdr, "xref") && !pat /* [X]HDR only */) {
+ char xref[8192];
+
+ if (!by_msgid) msgid = index_get_msgid(nntp_group, msgno);
+ build_xref(msgid, xref, sizeof(xref), 1);
+ if (!by_msgid) free(msgid);
+
+ prot_printf(nntp_out, "%lu %s\r\n",
+ by_msgid ? 0 : index_getuid(msgno), xref);
+ }
+ else if ((body = index_getheader(nntp_group, msgno, hdr)) &&
+ (!pat || /* [X]HDR */
+ wildmat(body, pat))) { /* XPAT with match */
+ prot_printf(nntp_out, "%lu %s\r\n",
+ by_msgid ? 0 : index_getuid(msgno), body);
+ }
+ }
+
+ if (found)
+ prot_printf(nntp_out, ".\r\n");
+ else
+ prot_printf(nntp_out, "423 No such article(s) in this newsgroup\r\n");
+}
+
+static void cmd_help(void)
+{
+ prot_printf(nntp_out, "100 Supported commands:\r\n");
+
+ if ((nntp_capa & MODE_READ) && (nntp_userid || allowanonymous)) {
+ prot_printf(nntp_out, "\tARTICLE [ message-id | number ]\r\n"
+ "\t\tRetrieve entirety of the specified article.\r\n");
+ }
+ if (!nntp_authstate) {
+ if (!nntp_userid) {
+ prot_printf(nntp_out, "\tAUTHINFO SASL mechanism [initial-response]\r\n"
+ "\t\tPerform an authentication exchange using the specified\r\n"
+ "\t\tSASL mechanism.\r\n");
+ prot_printf(nntp_out, "\tAUTHINFO USER username\r\n"
+ "\t\tPresent username for authentication.\r\n");
+ }
+ prot_printf(nntp_out, "\tAUTHINFO PASS password\r\n"
+ "\t\tPresent clear-text password for authentication.\r\n");
+ }
+ if ((nntp_capa & MODE_READ) && (nntp_userid || allowanonymous)) {
+ prot_printf(nntp_out, "\tBODY [ message-id | number ]\r\n"
+ "\t\tRetrieve body of the specified article.\r\n");
+ }
+ prot_printf(nntp_out, "\tCAPABILITIES\r\n"
+ "\t\tList the current server capabilities.\r\n");
+ if (nntp_capa & MODE_FEED) {
+ prot_printf(nntp_out, "\tCHECK message-id\r\n"
+ "\t\tCheck if the server wants the specified article.\r\n");
+ }
+ if ((nntp_capa & MODE_READ) && (nntp_userid || allowanonymous)) {
+ prot_printf(nntp_out, "\tDATE\r\n"
+ "\t\tRequest the current server UTC date and time.\r\n");
+ prot_printf(nntp_out, "\tGROUP group\r\n"
+ "\t\tSelect a newsgroup for article retrieval.\r\n");
+ prot_printf(nntp_out, "\tHDR header [ message-id | range ]\r\n"
+ "\t\tRetrieve the specified header/metadata from the\r\n"
+ "\t\tspecified article(s).\r\n");
+ }
+ prot_printf(nntp_out, "\tHEAD [ message-id | number ]\r\n"
+ "\t\tRetrieve the headers of the specified article.\r\n");
+ prot_printf(nntp_out, "\tHELP\r\n"
+ "\t\tRequest command summary (this text).\r\n");
+ if (nntp_capa & MODE_FEED) {
+ prot_printf(nntp_out, "\tIHAVE message-id\r\n"
+ "\t\tPresent/transfer the specified article to the server.\r\n");
+ }
+ if ((nntp_capa & MODE_READ) && (nntp_userid || allowanonymous)) {
+ prot_printf(nntp_out, "\tLAST\r\n"
+ "\t\tSelect the previous article.\r\n");
+ }
+ prot_printf(nntp_out, "\tLIST [ ACTIVE wildmat ]\r\n"
+ "\t\tList the (subset of) valid newsgroups.\r\n");
+ if ((nntp_capa & MODE_READ) && (nntp_userid || allowanonymous)) {
+ prot_printf(nntp_out, "\tLIST HEADERS [ MSGID | RANGE ]\r\n"
+ "\t\tList the headers and metadata items available via HDR.\r\n");
+ prot_printf(nntp_out, "\tLIST NEWSGROUPS [wildmat]\r\n"
+ "\t\tList the descriptions of the specified newsgroups.\r\n");
+ prot_printf(nntp_out, "\tLIST OVERVIEW.FMT\r\n"
+ "\t\tList the headers and metadata items available via OVER.\r\n");
+ prot_printf(nntp_out, "\tLISTGROUP [group [range]]\r\n"
+ "\t\tList the article numbers in the specified newsgroup.\r\n");
+ if (config_getswitch(IMAPOPT_ALLOWNEWNEWS))
+ prot_printf(nntp_out, "\tNEWNEWS wildmat date time [GMT]\r\n"
+ "\t\tList the newly arrived articles in the specified newsgroup(s)\r\n"
+ "\t\tsince the specified date and time.\r\n");
+ prot_printf(nntp_out, "\tNEXT\r\n"
+ "\t\tSelect the next article.\r\n");
+ prot_printf(nntp_out, "\tOVER [ message-id | range ]\r\n"
+ "\t\tRetrieve the overview information for the specified article(s).\r\n");
+ prot_printf(nntp_out, "\tPOST\r\n"
+ "\t\tPost an article to the server.\r\n");
+ }
+
+ prot_printf(nntp_out, "\tQUIT\r\n"
+ "\t\tTerminate the session.\r\n");
+ if (tls_enabled() && !nntp_starttls_done && !nntp_authstate) {
+ prot_printf(nntp_out, "\tSTARTTLS\r\n"
+ "\t\tStart a TLS negotiation.\r\n");
+ }
+ prot_printf(nntp_out, "\tSTAT [ message-id | number ]\r\n"
+ "\t\tCheck if the specified article exists.\r\n");
+ if (nntp_capa & MODE_FEED) {
+ prot_printf(nntp_out, "\tTAKETHIS message-id\r\n"
+ "\t\tTransfer the specified article to the server.\r\n");
+ }
+ if ((nntp_capa & MODE_READ) && (nntp_userid || allowanonymous)) {
+ prot_printf(nntp_out, "\tXPAT header message-id|range wildmat\r\n"
+ "\t\tList the specified article(s) in which the contents\r\n"
+ "\t\tof the specified header/metadata matches the wildmat.\r\n");
+ }
+ prot_printf(nntp_out, ".\r\n");
+}
+
+struct list_rock {
+ int (*proc)();
+ struct wildmat *wild;
+ struct hash_table server_table;
+};
+
+/*
+ * mboxlist_findall() callback function to LIST
+ */
+int list_cb(char *name, int matchlen, int maycreate __attribute__((unused)),
+ void *rock)
+{
+ static char lastname[MAX_MAILBOX_NAME+1];
+ struct list_rock *lrock = (struct list_rock *) rock;
+ struct wildmat *wild;
+
+ /* We have to reset the initial state.
+ * Handle it as a dirty hack.
+ */
+ if (!name) {
+ lastname[0] = '\0';
+ return 0;
+ }
+
+ /* skip personal mailboxes */
+ if ((!strncasecmp(name, "INBOX", 5) && (!name[5] || name[5] == '.')) ||
+ !strncmp(name, "user.", 5))
+ return 0;
+
+ /* don't repeat */
+ if (matchlen == strlen(lastname) &&
+ !strncmp(name, lastname, matchlen)) return 0;
+
+ strncpy(lastname, name, matchlen);
+ lastname[matchlen] = '\0';
+
+ /* see if the mailbox matches one of our wildmats */
+ wild = lrock->wild;
+ while (wild->pat && wildmat(name, wild->pat) != 1) wild++;
+
+ /* if we don't have a match, or its a negative match, skip it */
+ if (!wild->pat || wild->not) return 0;
+
+ return lrock->proc(name, lrock);
+}
+
+struct enum_rock {
+ const char *cmd;
+ char *wild;
+};
+
+/*
+ * hash_enumerate() callback function to LIST (proxy)
+ */
+void list_proxy(char *server, void *data __attribute__((unused)), void *rock)
+{
+ struct enum_rock *erock = (struct enum_rock *) rock;
+ struct backend *be;
+ int r;
+ char *result;
+
+ be = proxy_findserver(server, &protocol[PROTOCOL_NNTP],
+ nntp_userid ? nntp_userid : "anonymous",
+ &backend_cached, &backend_current, NULL, nntp_in);
+ if (!be) return;
+
+ prot_printf(be->out, "LIST %s %s\r\n", erock->cmd, erock->wild);
+
+ r = read_response(be, 0, &result);
+ if (!r && !strncmp(result, "215 ", 4)) {
+ while (!(r = read_response(be, 0, &result)) && result[0] != '.') {
+ prot_printf(nntp_out, "%s", result);
+ }
+ }
+}
+
+/*
+ * perform LIST ACTIVE (backend) or create a server hash table (proxy)
+ */
+int do_active(char *name, void *rock)
+{
+ struct list_rock *lrock = (struct list_rock *) rock;
+ int r, postable;
+ struct backend *be;
+
+ /* open the group */
+ r = open_group(name, 1, &be, &postable);
+ if (r) {
+ /* can't open group, skip it */
+ }
+ else if (be) {
+ if (!hash_lookup(be->hostname, &lrock->server_table)) {
+ /* add this server to our table */
+ hash_insert(be->hostname, (void *)0xDEADBEEF, &lrock->server_table);
+ }
+ }
+ else {
+ prot_printf(nntp_out, "%s %lu %lu %c\r\n", name+strlen(newsprefix),
+ nntp_group->exists ? index_getuid(nntp_group->exists) :
+ nntp_group->last_uid,
+ nntp_group->exists ? index_getuid(1) :
+ nntp_group->last_uid+1,
+ postable ? 'y' : 'n');
+
+ mailbox_close(nntp_group);
+ nntp_group = 0;
+ }
+
+ return 0;
+}
+
+/*
+ * perform LIST NEWSGROUPS (backend) or create a server hash table (proxy)
+ */
+int do_newsgroups(char *name, void *rock)
+{
+ struct list_rock *lrock = (struct list_rock *) rock;
+ char *acl, *server;
+ int r;
+
+ r = mlookup(name, &server, &acl, NULL);
+
+ if (r || !acl || !(cyrus_acl_myrights(nntp_authstate, acl) && ACL_LOOKUP))
+ return 0;
+
+ if (server) {
+ /* remote group */
+ if (!hash_lookup(server, &lrock->server_table)) {
+ /* add this server to our table */
+ hash_insert(server, (void *)0xDEADBEEF, &lrock->server_table);
+ }
+ }
+ else {
+ /* local group */
+ return CYRUSDB_DONE;
+ }
+
+ return 0;
+}
+
+/*
+ * annotatemore_findall() callback function to LIST NEWSGROUPS
+ */
+int newsgroups_cb(const char *mailbox,
+ const char *entry __attribute__((unused)),
+ const char *userid,
+ struct annotation_data *attrib, void *rock)
+{
+ struct wildmat *wild = (struct wildmat *) rock;
+
+ /* skip personal mailboxes */
+ if ((!strncasecmp(mailbox, "INBOX", 5) &&
+ (!mailbox[5] || mailbox[5] == '.')) ||
+ !strncmp(mailbox, "user.", 5))
+ return 0;
+
+ /* see if the mailbox matches one of our wildmats */
+ while (wild->pat && wildmat(mailbox, wild->pat) != 1) wild++;
+
+ /* if we don't have a match, or its a negative match, skip it */
+ if (!wild->pat || wild->not) return 0;
+
+ /* we only care about shared /comment */
+ if (userid[0]) return 0;
+
+ prot_printf(nntp_out, "%s\t%s\r\n", mailbox+strlen(newsprefix),
+ attrib->value);
+
+ return 0;
+}
+
+static void cmd_list(char *arg1, char *arg2)
+{
+ if (!arg1)
+ arg1 = "active";
+ else
+ lcase(arg1);
+
+ if (!strcmp(arg1, "active")) {
+ char pattern[MAX_MAILBOX_NAME+1];
+ struct list_rock lrock;
+ struct enum_rock erock;
+
+ if (!arg2) arg2 = "*";
+
+ erock.cmd = "ACTIVE";
+ erock.wild = xstrdup(arg2); /* make a copy before we munge it */
+
+ lrock.proc = do_active;
+ lrock.wild = split_wildmats(arg2); /* split the list of wildmats */
+
+ /* xxx better way to determine a size for this table? */
+ construct_hash_table(&lrock.server_table, 10, 1);
+
+ prot_printf(nntp_out, "215 List of newsgroups follows:\r\n");
+
+ strcpy(pattern, newsprefix);
+ strcat(pattern, "*");
+ list_cb(NULL, 0, 0, NULL);
+ mboxlist_findall(NULL, pattern, 0, nntp_userid, nntp_authstate,
+ list_cb, &lrock);
+
+ /* proxy to the backends */
+ hash_enumerate(&lrock.server_table, list_proxy, &erock);
+
+ prot_printf(nntp_out, ".\r\n");
+
+ /* free the hash table */
+ free_hash_table(&lrock.server_table, NULL);
+
+ /* free the wildmats */
+ free_wildmats(lrock.wild);
+ free(erock.wild);
+
+ if (nntp_group) {
+ mailbox_close(nntp_group);
+ nntp_group = 0;
+ }
+ }
+ else if (!(nntp_capa & MODE_READ)) {
+ prot_printf(nntp_out, "502 Permission denied\r\n");
+ return;
+ }
+ else if (!nntp_userid && !allowanonymous) {
+ prot_printf(nntp_out, "480 Authentication required\r\n");
+ return;
+ }
+ else if (!strcmp(arg1, "headers")) {
+ if (arg2 && strcmp(arg2, "msgid") && strcmp(arg2, "range")) {
+ prot_printf(nntp_out, "501 Unexpected extra argument\r\n");
+ return;
+ }
+
+ prot_printf(nntp_out, "215 Header and metadata list follows:\r\n");
+ prot_printf(nntp_out, ":\r\n"); /* all headers */
+ prot_printf(nntp_out, ":bytes\r\n");
+ prot_printf(nntp_out, ":lines\r\n");
+ prot_printf(nntp_out, ".\r\n");
+ }
+ else if (!strcmp(arg1, "newsgroups")) {
+ char pattern[MAX_MAILBOX_NAME+1];
+ struct list_rock lrock;
+ struct enum_rock erock;
+
+ if (!arg2) arg2 = "*";
+
+ erock.cmd = "NEWSGROUPS";
+ erock.wild = xstrdup(arg2); /* make a copy before we munge it */
+
+ lrock.proc = do_newsgroups;
+ lrock.wild = split_wildmats(arg2); /* split the list of wildmats */
+
+ /* xxx better way to determine a size for this table? */
+ construct_hash_table(&lrock.server_table, 10, 1);
+
+ prot_printf(nntp_out, "215 List of newsgroups follows:\r\n");
+
+ strcpy(pattern, newsprefix);
+ strcat(pattern, "*");
+ list_cb(NULL, 0, 0, NULL);
+ mboxlist_findall(NULL, pattern, 0, nntp_userid, nntp_authstate,
+ list_cb, &lrock);
+
+ /* proxy to the backends */
+ hash_enumerate(&lrock.server_table, list_proxy, &erock);
+
+ strcpy(pattern, newsprefix);
+ strcat(pattern, "*");
+ annotatemore_findall(pattern, "/comment",
+ newsgroups_cb, lrock.wild, NULL);
+
+ prot_printf(nntp_out, ".\r\n");
+
+ /* free the hash table */
+ free_hash_table(&lrock.server_table, NULL);
+
+ /* free the wildmats */
+ free_wildmats(lrock.wild);
+ free(erock.wild);
+ }
+ else if (!strcmp(arg1, "overview.fmt")) {
+ if (arg2) {
+ prot_printf(nntp_out, "501 Unexpected extra argument\r\n");
+ return;
+ }
+
+ prot_printf(nntp_out, "215 Order of overview fields follows:\r\n");
+ prot_printf(nntp_out, "Subject:\r\n");
+ prot_printf(nntp_out, "From:\r\n");
+ prot_printf(nntp_out, "Date:\r\n");
+ prot_printf(nntp_out, "Message-ID:\r\n");
+ prot_printf(nntp_out, "References:\r\n");
+ if (did_capabilities) {
+ /* new OVER format */
+ prot_printf(nntp_out, ":bytes\r\n");
+ prot_printf(nntp_out, ":lines\r\n");
+ } else {
+ /* old XOVER format */
+ prot_printf(nntp_out, "Bytes:\r\n");
+ prot_printf(nntp_out, "Lines:\r\n");
+ }
+ prot_printf(nntp_out, "Xref:full\r\n");
+ prot_printf(nntp_out, ".\r\n");
+ }
+ else if (!strcmp(arg1, "active.times") || !strcmp(arg1, "distributions") ||
+ !strcmp(arg1, "distrib.pats")) {
+ prot_printf(nntp_out, "503 Unsupported LIST command\r\n");
+ }
+ else {
+ prot_printf(nntp_out, "501 Unrecognized LIST command\r\n");
+ }
+ prot_flush(nntp_out);
+}
+
+static void cmd_mode(char *arg)
+{
+ lcase(arg);
+
+ if (!strcmp(arg, "reader")) {
+ prot_printf(nntp_out,
+ "%u %s Cyrus NNTP%s %s server ready, posting %s\r\n",
+ (nntp_capa & MODE_READ) ? 200 : 201,
+ config_servername, config_mupdate_server ? " Murder" : "",
+ CYRUS_VERSION,
+ (nntp_capa & MODE_READ) ? "allowed" : "prohibited");
+ }
+ else if (!strcmp(arg, "stream")) {
+ if (nntp_capa & MODE_FEED) {
+ prot_printf(nntp_out, "203 Streaming allowed\r\n");
+ }
+ else {
+ prot_printf(nntp_out, "502 Streaming prohibited\r\n");
+ }
+ }
+ else {
+ prot_printf(nntp_out, "501 Unrecognized MODE\r\n");
+ }
+ prot_flush(nntp_out);
+}
+
+static void cmd_newgroups(time_t tstamp __attribute__((unused)))
+{
+ prot_printf(nntp_out, "503 Can't determine NEWGROUPS at this time\r\n");
+#if 0
+ prot_printf(nntp_out, "231 List of new newsgroups follows:\r\n");
+
+ /* Do search of annotations here. */
+
+ prot_printf(nntp_out, ".\r\n");
+#endif
+}
+
+struct newrock {
+ time_t tstamp;
+ struct wildmat *wild;
+};
+
+/*
+ * duplicate_find() callback function to list NEWNEWS
+ */
+static int newnews_cb(const char *msgid, const char *rcpt, time_t mark,
+ unsigned long uid, void *rock)
+{
+ static char lastid[1024];
+ struct newrock *nrock = (struct newrock *) rock;
+
+ /* We have to reset the initial state.
+ * Handle it as a dirty hack.
+ */
+ if (!msgid) {
+ lastid[0] = '\0';
+ return 0;
+ }
+
+ /* Make sure we don't return duplicate msgids,
+ * the message is newer than the tstamp, and
+ * the message isn't in a personal mailbox.
+ */
+ if (strcmp(msgid, lastid) && mark >= nrock->tstamp &&
+ uid && rcpt[0] && strncmp(rcpt, "user.", 5)) {
+ struct wildmat *wild = nrock->wild;
+
+ strlcpy(lastid, msgid, sizeof(lastid));
+
+ /* see if the mailbox matches one of our wildmats */
+ while (wild->pat && wildmat(rcpt, wild->pat) != 1) wild++;
+
+ /* we have a match, and its not a negative match */
+ if (wild->pat && !wild->not)
+ prot_printf(nntp_out, "%s\r\n", msgid);
+ }
+
+ return 0;
+}
+
+static void cmd_newnews(char *wild, time_t tstamp)
+{
+ struct newrock nrock;
+
+ nrock.tstamp = tstamp;
+ nrock.wild = split_wildmats(wild);
+
+ prot_printf(nntp_out, "230 List of new articles follows:\r\n");
+
+ newnews_cb(NULL, NULL, 0, 0, NULL);
+ duplicate_find("", &newnews_cb, &nrock);
+
+ prot_printf(nntp_out, ".\r\n");
+
+ free_wildmats(nrock.wild);
+}
+
+static void cmd_over(char *msgid, unsigned long uid, unsigned long last)
+{
+ int msgno, last_msgno;
+ struct nntp_overview *over;
+ int found = 0;
+
+ msgno = index_finduid(uid);
+ if (!msgno || index_getuid(msgno) != uid) msgno++;
+ last_msgno = index_finduid(last);
+
+ for (; msgno <= last_msgno; msgno++) {
+ if (!found++)
+ prot_printf(nntp_out, "224 Overview information follows:\r\n");
+
+ if ((over = index_overview(nntp_group, msgno))) {
+ char xref[8192];
+
+ build_xref(over->msgid, xref, sizeof(xref), 0);
+
+ prot_printf(nntp_out, "%lu\t%s\t%s\t%s\t%s\t%s\t%lu\t%lu\t%s\r\n",
+ msgid ? 0 : over->uid,
+ over->subj ? over->subj : "",
+ over->from ? over->from : "",
+ over->date ? over->date : "",
+ over->msgid ? over->msgid : "",
+ over->ref ? over->ref : "",
+ over->bytes + strlen(xref) + 2, /* +2 for \r\n */
+ over->lines, xref);
+ }
+ }
+
+ if (found)
+ prot_printf(nntp_out, ".\r\n");
+ else
+ prot_printf(nntp_out, "423 No such article(s) in this newsgroup\r\n");
+}
+
+
+#define RCPT_GROW 30
+
+typedef struct message_data message_data_t;
+
+struct message_data {
+ struct protstream *data; /* message in temp file */
+ FILE *f; /* FILE * corresponding */
+
+ char *id; /* message id */
+ char *path; /* path */
+ char *control; /* control message */
+ unsigned long size; /* size of message in bytes */
+
+ char **rcpt; /* mailboxes to post message */
+ int rcpt_num; /* number of groups */
+
+ hdrcache_t hdrcache;
+};
+
+/* returns non-zero on failure */
+int msg_new(message_data_t **m)
+{
+ message_data_t *ret = (message_data_t *) xmalloc(sizeof(message_data_t));
+
+ ret->data = NULL;
+ ret->f = NULL;
+ ret->id = NULL;
+ ret->path = NULL;
+ ret->control = NULL;
+ ret->size = 0;
+ ret->rcpt = NULL;
+ ret->rcpt_num = 0;
+
+ ret->hdrcache = spool_new_hdrcache();
+
+ *m = ret;
+ return 0;
+}
+
+void msg_free(message_data_t *m)
+{
+ int i;
+
+ if (m->data) {
+ prot_free(m->data);
+ }
+ if (m->f) {
+ fclose(m->f);
+ }
+ if (m->id) {
+ free(m->id);
+ }
+ if (m->path) {
+ free(m->path);
+ }
+ if (m->control) {
+ free(m->control);
+ }
+
+ if (m->rcpt) {
+ for (i = 0; i < m->rcpt_num; i++) {
+ free(m->rcpt[i]);
+ }
+ free(m->rcpt);
+ }
+
+ spool_free_hdrcache(m->hdrcache);
+
+ free(m);
+}
+
+static int parse_groups(const char *groups, message_data_t *msg)
+{
+ const char *p;
+ char *rcpt = NULL;
+ size_t n;
+
+ for (p = groups;; p += n) {
+ /* skip whitespace */
+ while (p && *p && (isspace((int) *p) || *p == ',')) p++;
+
+ if (!p || !*p) return 0;
+
+ if (!(msg->rcpt_num % RCPT_GROW)) { /* time to alloc more */
+ msg->rcpt = (char **)
+ xrealloc(msg->rcpt, (msg->rcpt_num + RCPT_GROW + 1) *
+ sizeof(char *));
+ }
+
+ /* find end of group name */
+ n = strcspn(p, ", \t");
+ rcpt = xrealloc(rcpt, strlen(newsprefix) + n + 1);
+ if (!rcpt) return -1;
+
+ /* construct the mailbox name */
+ sprintf(rcpt, "%s%.*s", newsprefix, n, p);
+
+ /* Only add mailboxes that exist */
+ if (!mlookup(rcpt, NULL, NULL, NULL)) {
+ msg->rcpt[msg->rcpt_num] = rcpt;
+ msg->rcpt_num++;
+ msg->rcpt[msg->rcpt_num] = rcpt = NULL;
+ }
+ }
+
+ return NNTP_FAIL_NEWSGROUPS;
+}
+
+/*
+ * file in the message structure 'm' from 'pin', assuming a dot-stuffed
+ * stream a la nntp.
+ *
+ * returns 0 on success, imap error code on failure
+ */
+static int savemsg(message_data_t *m, FILE *f)
+{
+ struct stat sbuf;
+ const char **body, **groups;
+ int r, i;
+ time_t now = time(NULL);
+ static int post_count = 0;
+ FILE *stagef = NULL;
+ const char *skipheaders[] = {
+ "Path", /* need to prepend our servername */
+ "Xref", /* need to remove (generated on the fly) */
+ "Reply-To", /* need to add "post" email addresses */
+ NULL
+ };
+ int addlen;
+
+ m->f = f;
+
+ /* fill the cache */
+ r = spool_fill_hdrcache(nntp_in, f, m->hdrcache, skipheaders);
+ if (r) {
+ /* got a bad header */
+
+ /* flush the remaining output */
+ spool_copy_msg(nntp_in, NULL);
+ return r;
+ }
+
+ /* now, using our header cache, fill in the data that we want */
+
+ /* get path */
+ addlen = strlen(config_servername) + 1;
+ if ((body = spool_getheader(m->hdrcache, "path")) != NULL) {
+ /* prepend to the cached path */
+ addlen += strlen(body[0]);
+ body[0] = xrealloc((char *) body[0], addlen + 1);
+ memmove((char *) body[0] + strlen(config_servername) + 1, body[0],
+ strlen(body[0]) + 1); /* +1 for \0 */
+ strcpy((char *) body[0], config_servername);
+ *((char *) body[0] + strlen(config_servername)) = '!';
+ m->path = xstrdup(body[0]);
+ } else {
+ /* no path, create one */
+ addlen += nntp_userid ? strlen(nntp_userid) : strlen("anonymous");
+ m->path = xmalloc(addlen + 1);
+ sprintf(m->path, "%s!%s", config_servername,
+ nntp_userid ? nntp_userid : "anonymous");
+ spool_cache_header(xstrdup("Path"), xstrdup(m->path), m->hdrcache);
+ }
+ fprintf(f, "Path: %s\r\n", m->path);
+
+ /* get message-id */
+ if ((body = spool_getheader(m->hdrcache, "message-id")) != NULL) {
+ m->id = xstrdup(body[0]);
+ } else {
+ /* no message-id, create one */
+ pid_t p = getpid();
+
+ m->id = xmalloc(40 + strlen(config_servername));
+ sprintf(m->id, "<cmu-nntpd-%d-%d-%d@%s>", p, (int) now,
+ post_count++, config_servername);
+ fprintf(f, "Message-ID: %s\r\n", m->id);
+ spool_cache_header(xstrdup("Message-ID"), xstrdup(m->id), m->hdrcache);
+ }
+
+ /* get date */
+ if ((body = spool_getheader(m->hdrcache, "date")) == NULL) {
+ /* no date, create one */
+ char datestr[80];
+
+ rfc822date_gen(datestr, sizeof(datestr), now);
+ fprintf(f, "Date: %s\r\n", datestr);
+ spool_cache_header(xstrdup("Date"), xstrdup(datestr), m->hdrcache);
+ }
+
+ /* get control */
+ if ((body = spool_getheader(m->hdrcache, "control")) != NULL) {
+ int len;
+
+ m->control = xstrdup(body[0]);
+
+ /* create a recipient for the appropriate pseudo newsgroup */
+ m->rcpt_num = 1;
+ m->rcpt = (char **) xmalloc(sizeof(char *));
+ len = strcspn(m->control, " \t\r\n");
+ m->rcpt[0] = xmalloc(strlen(newsprefix) + 8 + len + 1);
+ sprintf(m->rcpt[0], "%scontrol.%.*s", newsprefix, len, m->control);
+ } else {
+ m->control = NULL; /* no control */
+
+ /* get newsgroups */
+ if ((groups = spool_getheader(m->hdrcache, "newsgroups")) != NULL) {
+ /* parse newsgroups and create recipients */
+ r = parse_groups(groups[0], m);
+ if (!r && !m->rcpt_num) {
+ r = IMAP_MAILBOX_NONEXISTENT; /* no newsgroups that we serve */
+ }
+ if (!r) {
+ const char *newspostuser = config_getstring(IMAPOPT_NEWSPOSTUSER);
+ /* get reply-to */
+ body = spool_getheader(m->hdrcache, "reply-to");
+
+ /* add Reply-To: header */
+ if (body || newspostuser) {
+ const char **postto, *p;
+ char *replyto, *r, *fold = NULL, *sep = "";
+ size_t n;
+
+ if (newspostuser) {
+ /* add "post" email addresses based on newsgroup */
+
+ /* determine which groups header to use */
+ postto = spool_getheader(m->hdrcache, "followup-to");
+ if (!postto) postto = groups;
+
+ /* count the number of groups */
+ for (n = 0, p = postto[0]; p; n++) {
+ p = strchr(p, ',');
+ if (p) p++;
+ }
+
+ /* estimate size of post addresses */
+ addlen = strlen(postto[0]) +
+ n * (strlen(newspostuser) + 3);
+
+ if (body) {
+ /* append to the cached header */
+ addlen += strlen(body[0]);
+ body[0] = xrealloc((char *) body[0], addlen + 1);
+ replyto = (char *) body[0];
+ fold = replyto + strlen(replyto) + 1;
+ sep = ", ";
+ }
+ else {
+ /* create a new header body */
+ replyto = xzmalloc(addlen + 1);
+ }
+
+ r = replyto + strlen(replyto);
+ for (p = postto[0];; p += n) {
+ /* skip whitespace */
+ while (p && *p &&
+ (isspace((int) *p) || *p == ',')) p++;
+ if (!p || !*p) break;
+
+ /* find end of group name */
+ n = strcspn(p, ", \t");
+
+ /* add the post address */
+ r += sprintf(r, "%s%s+%.*s",
+ sep, newspostuser, n, p);
+
+ sep = ", ";
+ }
+
+ if (!body) {
+ /* add the new header to the cache */
+ spool_cache_header(xstrdup("Reply-To"), replyto,
+ m->hdrcache);
+ }
+ } else {
+ /* no newspostuser, use original replyto */
+ replyto = (char *) body[0];
+ }
+
+ /* add the header to the file */
+ fprintf(f, "Reply-To: ");
+ r = replyto;
+ if (fold) {
+ fprintf(f, "%.*s\r\n\t", fold - r, r);
+ r = fold;
+ }
+ fprintf(f, "%s\r\n", r);
+ }
+ }
+ } else {
+ r = NNTP_NO_NEWSGROUPS; /* no newsgroups header */
+ }
+
+ if (r) {
+ /* error getting newsgroups */
+
+ /* flush the remaining output */
+ spool_copy_msg(nntp_in, NULL);
+ return r;
+ }
+ }
+
+ fflush(f);
+ if (ferror(f)) {
+ return IMAP_IOERROR;
+ }
+
+ if (fstat(fileno(f), &sbuf) == -1) {
+ return IMAP_IOERROR;
+ }
+
+ /* spool to the stage of one of the recipients */
+ for (i = 0; !stagef && (i < m->rcpt_num); i++) {
+ stagef = append_newstage(m->rcpt[i], now, 0, &stage);
+ }
+
+ if (stagef) {
+ const char *base = 0;
+ unsigned long size = 0;
+ int n;
+
+ /* copy the header from our tmpfile to the stage */
+ map_refresh(fileno(f), 1, &base, &size, sbuf.st_size, "tmp", 0);
+ n = retry_write(fileno(stagef), base, size);
+ map_free(&base, &size);
+
+ if (n == -1) {
+ /* close and remove the stage */
+ fclose(stagef);
+ append_removestage(stage);
+ stage = NULL;
+ return IMAP_IOERROR;
+ }
+ else {
+ /* close the tmpfile and use the stage */
+ fclose(f);
+ m->f = f = stagef;
+ }
+ }
+ /* else this is probably a remote group, so use the tmpfile */
+
+ r = spool_copy_msg(nntp_in, f);
+
+ if (r) return r;
+
+ fflush(f);
+ if (ferror(f)) {
+ return IMAP_IOERROR;
+ }
+
+ if (fstat(fileno(f), &sbuf) == -1) {
+ return IMAP_IOERROR;
+ }
+ m->size = sbuf.st_size;
+ m->data = prot_new(fileno(f), 0);
+
+ return 0;
+}
+
+static int deliver_remote(message_data_t *msg, struct dest *dlist)
+{
+ struct dest *d;
+
+ /* run the txns */
+ for (d = dlist; d; d = d->next) {
+ struct backend *be;
+ char buf[4096];
+
+ be = proxy_findserver(d->server, &protocol[PROTOCOL_NNTP],
+ nntp_userid ? nntp_userid : "anonymous",
+ &backend_cached, &backend_current,
+ NULL, nntp_in);
+ if (!be) return IMAP_SERVER_UNAVAILABLE;
+
+ /* tell the backend about our new article */
+ prot_printf(be->out, "IHAVE %s\r\n", msg->id);
+ prot_flush(be->out);
+
+ if (!prot_fgets(buf, sizeof(buf), be->in) ||
+ strncmp("335", buf, 3)) {
+ syslog(LOG_NOTICE, "backend doesn't want article %s", msg->id);
+ continue;
+ }
+
+ /* send the article */
+ rewind(msg->f);
+ while (fgets(buf, sizeof(buf), msg->f)) {
+ if (buf[0] == '.') prot_putc('.', be->out);
+ do {
+ prot_printf(be->out, "%s", buf);
+ } while (buf[strlen(buf)-1] != '\n' &&
+ fgets(buf, sizeof(buf), msg->f));
+ }
+
+ /* Protect against messages not ending in CRLF */
+ if (buf[strlen(buf)-1] != '\n') prot_printf(be->out, "\r\n");
+
+ prot_printf(be->out, ".\r\n");
+
+ if (!prot_fgets(buf, sizeof(buf), be->in) ||
+ strncmp("235", buf, 3)) {
+ syslog(LOG_WARNING, "article %s transfer to backend failed",
+ msg->id);
+ return NNTP_FAIL_TRANSFER;
+ }
+ }
+
+ return 0;
+}
+
+static int deliver(message_data_t *msg)
+{
+ int n, r = 0, myrights;
+ char *rcpt = NULL, *local_rcpt = NULL, *server, *acl;
+ time_t now = time(NULL);
+ unsigned long uid;
+ struct body *body = NULL;
+ struct dest *dlist = NULL;
+
+ /* check ACLs of all mailboxes */
+ for (n = 0; n < msg->rcpt_num; n++) {
+ rcpt = msg->rcpt[n];
+
+ /* look it up */
+ r = mlookup(rcpt, &server, &acl, NULL);
+ if (r) return IMAP_MAILBOX_NONEXISTENT;
+
+ if (!(acl && (myrights = cyrus_acl_myrights(nntp_authstate, acl)) &&
+ (myrights & ACL_POST)))
+ return IMAP_PERMISSION_DENIED;
+
+ if (server) {
+ /* remote group */
+ proxy_adddest(&dlist, NULL, 0, server, "");
+ }
+ else {
+ /* local group */
+ struct appendstate as;
+
+ if (msg->id &&
+ duplicate_check(msg->id, strlen(msg->id), rcpt, strlen(rcpt))) {
+ /* duplicate message */
+ duplicate_log(msg->id, rcpt, "nntp delivery");
+ continue;
+ }
+
+ r = append_setup(&as, rcpt, MAILBOX_FORMAT_NORMAL,
+ nntp_userid, nntp_authstate, ACL_POST, 0);
+
+ if (!r) {
+ prot_rewind(msg->data);
+ if (stage) {
+ r = append_fromstage(&as, &body, stage, now,
+ (const char **) NULL, 0, !singleinstance);
+ } else {
+ /* XXX should never get here */
+ r = append_fromstream(&as, &body, msg->data, msg->size, now,
+ (const char **) NULL, 0);
+ }
+ if (r || (msg->id &&
+ duplicate_check(msg->id, strlen(msg->id),
+ rcpt, strlen(rcpt)))) {
+ append_abort(&as);
+
+ if (!r) {
+ /* duplicate message */
+ duplicate_log(msg->id, rcpt, "nntp delivery");
+ continue;
+ }
+ }
+ else {
+ r = append_commit(&as, 0, NULL, &uid, NULL);
+ if (!r) sync_log_append(rcpt);
+ }
+ }
+
+ if (!r && msg->id)
+ duplicate_mark(msg->id, strlen(msg->id), rcpt, strlen(rcpt),
+ now, uid);
+
+ if (r) return r;
+
+ local_rcpt = rcpt;
+ }
+ }
+
+ if (body) {
+ message_free_body(body);
+ free(body);
+ }
+
+ if (dlist) {
+ struct dest *d;
+
+ /* run the txns */
+ r = deliver_remote(msg, dlist);
+
+ /* free the destination list */
+ d = dlist;
+ while (d) {
+ struct dest *nextd = d->next;
+ free(d);
+ d = nextd;
+ }
+ }
+
+ return r;
+}
+
+static int newgroup(message_data_t *msg)
+{
+ int r;
+ char *group;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int sync_lockfd = (-1);
+
+ /* isolate newsgroup */
+ group = msg->control + 8; /* skip "newgroup" */
+ while (isspace((int) *group)) group++;
+
+ snprintf(mailboxname, sizeof(mailboxname), "%s%.*s",
+ newsprefix, (int) strcspn(group, " \t\r\n"), group);
+
+ r = mboxlist_createmailbox(mailboxname, 0, NULL, 0,
+ newsmaster, newsmaster_authstate, 0, 0, 0);
+
+ /* XXX check body of message for useful MIME parts */
+
+ if (!r) sync_log_mailbox(mailboxname);
+
+ return r;
+}
+
+static int rmgroup(message_data_t *msg)
+{
+ int r;
+ char *group;
+ char mailboxname[MAX_MAILBOX_NAME+1];
+ int sync_lockfd = (-1);
+
+ /* isolate newsgroup */
+ group = msg->control + 7; /* skip "rmgroup" */
+ while (isspace((int) *group)) group++;
+
+ snprintf(mailboxname, sizeof(mailboxname), "%s%.*s",
+ newsprefix, (int) strcspn(group, " \t\r\n"), group);
+
+ /* XXX should we delete right away, or wait until empty? */
+
+ r = mboxlist_deletemailbox(mailboxname, 0,
+ newsmaster, newsmaster_authstate, 1, 0, 0);
+
+ if (!r) sync_log_mailbox(mailboxname);
+
+ return r;
+}
+
+static int mvgroup(message_data_t *msg)
+{
+ int r, len;
+ char *group;
+ char oldmailboxname[MAX_MAILBOX_NAME+1];
+ char newmailboxname[MAX_MAILBOX_NAME+1];
+ int sync_lockfd = (-1);
+
+ /* isolate old newsgroup */
+ group = msg->control + 7; /* skip "mvgroup" */
+ while (isspace((int) *group)) group++;
+
+ len = (int) strcspn(group, " \t\r\n");
+ snprintf(oldmailboxname, sizeof(oldmailboxname), "%s%.*s",
+ newsprefix, len, group);
+
+ /* isolate new newsgroup */
+ group += len; /* skip old newsgroup */
+ while (isspace((int) *group)) group++;
+
+ len = (int) strcspn(group, " \t\r\n");
+ snprintf(newmailboxname, sizeof(newmailboxname), "%s%.*s",
+ newsprefix, len, group);
+
+ r = mboxlist_renamemailbox(oldmailboxname, newmailboxname, NULL, 0,
+ newsmaster, newsmaster_authstate);
+
+ /* XXX check body of message for useful MIME parts */
+
+ if (!r) sync_log_mailbox_double(oldmailboxname, newmailboxname);
+
+ return r;
+}
+
+/*
+ * mailbox_exchange() callback function to delete cancelled articles
+ */
+static int expunge_cancelled(struct mailbox *mailbox __attribute__((unused)),
+ void *rock, char *index,
+ int expunge_flags __attribute__((unused)))
+{
+ int uid = ntohl(*((bit32 *)(index+OFFSET_UID)));
+
+ /* only expunge the UID that we obtained from the msgid */
+ return (uid == *((unsigned long *) rock));
+}
+
+/*
+ * duplicate_find() callback function to cancel articles
+ */
+static int cancel_cb(const char *msgid __attribute__((unused)),
+ const char *mailbox,
+ time_t mark __attribute__((unused)),
+ unsigned long uid,
+ void *rock)
+{
+ /* make sure its a message in a mailbox that we're serving via NNTP */
+ if (*mailbox && !strncmp(mailbox, newsprefix, strlen(newsprefix)) &&
+ strncmp(mailbox, "user.", 5)) {
+ struct mailbox mbox;
+ int r, doclose = 0;
+
+ r = mailbox_open_header(mailbox, 0, &mbox);
+
+ if (!r &&
+ !(cyrus_acl_myrights(newsmaster_authstate, mbox.acl) & ACL_DELETEMSG))
+ r = IMAP_PERMISSION_DENIED;
+
+ if (!r) {
+ doclose = 1;
+ if (mbox.header_fd != -1)
+ mailbox_lock_header(&mbox);
+ mbox.header_lock_count = 1;
+
+ r = mailbox_open_index(&mbox);
+ }
+
+ if (!r) {
+ mailbox_lock_index(&mbox);
+ mbox.index_lock_count = 1;
+ mailbox_expunge(&mbox, expunge_cancelled, &uid, EXPUNGE_FORCE);
+ }
+
+ if (doclose) mailbox_close(&mbox);
+
+ /* if we failed, pass the return code back in the rock */
+ if (r) *((int *) rock) = r;
+ else sync_log_mailbox(mbox.name);
+ }
+
+ return 0;
+}
+
+static int cancel(message_data_t *msg)
+{
+ int r = 0;
+ char *msgid, *p;
+ time_t now = time(NULL);
+
+ /* isolate msgid */
+ msgid = strchr(msg->control, '<');
+ p = strrchr(msgid, '>') + 1;
+ *p = '\0';
+
+ /* find and expunge the message from all mailboxes */
+ duplicate_find(msgid, &cancel_cb, &r);
+
+ /* store msgid of cancelled message for IHAVE/CHECK/TAKETHIS
+ * (in case we haven't received the message yet)
+ */
+ duplicate_mark(msgid, strlen(msgid), "", 0, 0, now);
+
+ return r;
+}
+
+/* strip any post addresses from a header body.
+ * returns 1 if a nonpost address was found, 0 otherwise.
+ */
+static int strip_post_addresses(char *body)
+{
+ const char *newspostuser = config_getstring(IMAPOPT_NEWSPOSTUSER);
+ char *p, *end;
+ size_t postlen, n;
+ int nonpost = 0;
+
+ if (!newspostuser) return 1; /* we didn't add this header, so leave it */
+ postlen = strlen(newspostuser);
+
+ for (p = body;; p += n) {
+ end = p;
+
+ /* skip whitespace */
+ while (p && *p && (isspace((int) *p) || *p == ',')) p++;
+
+ if (!p || !*p) break;
+
+ /* find end of address */
+ n = strcspn(p, ", \t\r\n");
+
+ if ((n > postlen + 1) && /* +1 for '+' */
+ !strncmp(p, newspostuser, postlen) && p[postlen] == '+') {
+ /* found a post address. since we always add the post
+ * addresses to the end of the header, truncate it right here.
+ */
+ strcpy(end, "\r\n");
+ break;
+ }
+
+ nonpost = 1;
+ }
+
+ return nonpost;
+}
+
+
+static void feedpeer(char *peer, message_data_t *msg)
+{
+ char *user, *pass, *host, *port, *wild, *path, *s;
+ int oldform = 0;
+ struct wildmat *wmat = NULL, *w;
+ int len, err, n, feed = 1;
+ struct addrinfo hints, *res, *res0;
+ int sock = -1;
+ struct protstream *pin, *pout;
+ char buf[4096];
+ int body = 0, skip;
+
+ /* parse the peer */
+ user = pass = host = port = wild = NULL;
+ if ((wild = strrchr(peer, '/')))
+ *wild++ = '\0';
+ else if ((wild = strrchr(peer, ':')) &&
+ strcspn(wild, "!*?,.") != strlen(wild)) {
+ *wild++ = '\0';
+ host = peer;
+ oldform = 1;
+ }
+ if (!oldform) {
+ if ((host = strchr(peer, '@'))) {
+ *host++ = '\0';
+ user = peer;
+ if ((pass = strchr(user, ':'))) *pass++ = '\0';
+ }
+ else
+ host = peer;
+
+ if ((port = strchr(host, ':'))) *port++ = '\0';
+ }
+
+ /* check path to see if this message came through our peer */
+ len = strlen(host);
+ path = msg->path;
+ while (path && (s = strchr(path, '!'))) {
+ if ((s - path) == len && !strncmp(path, host, len)) {
+ return;
+ }
+ path = s + 1;
+ }
+
+ /* check newsgroups against wildmat to see if we should feed it */
+ if (wild && *wild) {
+ wmat = split_wildmats(wild);
+
+ feed = 0;
+ for (n = 0; n < msg->rcpt_num; n++) {
+ /* see if the newsgroup matches one of our wildmats */
+ w = wmat;
+ while (w->pat &&
+ wildmat(msg->rcpt[n], w->pat) != 1) {
+ w++;
+ }
+
+ if (w->pat) {
+ /* we have a match, check to see what kind of match */
+ if (!w->not) {
+ /* positive match, ok to feed, keep checking */
+ feed = 1;
+ }
+ else if (w->not < 0) {
+ /* absolute negative match, do not feed */
+ feed = 0;
+ break;
+ }
+ else {
+ /* negative match, keep checking */
+ }
+ }
+ else {
+ /* no match, keep checking */
+ }
+ }
+
+ free_wildmats(wmat);
+ }
+
+ if (!feed) return;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = 0;
+ if (!port || !*port) port = "119";
+ if ((err = getaddrinfo(host, port, &hints, &res0)) != 0) {
+ syslog(LOG_ERR, "getaddrinfo(%s, %s) failed: %m", host, port);
+ return;
+ }
+
+ for (res = res0; res; res = res->ai_next) {
+ if ((sock = socket(res->ai_family, res->ai_socktype,
+ res->ai_protocol)) < 0)
+ continue;
+ if (connect(sock, res->ai_addr, res->ai_addrlen) >= 0)
+ break;
+ close(sock);
+ sock = -1;
+ }
+ freeaddrinfo(res0);
+ if(sock < 0) {
+ syslog(LOG_ERR, "connect(%s:%s) failed: %m", host, port);
+ return;
+ }
+
+ pin = prot_new(sock, 0);
+ pout = prot_new(sock, 1);
+ prot_setflushonread(pin, pout);
+
+ /* read the initial greeting */
+ if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("200", buf, 3)) {
+ syslog(LOG_ERR, "peer doesn't allow posting");
+ goto quit;
+ }
+
+ if (user) {
+ /* change to reader mode - not always necessary, so ignore result */
+ prot_printf(pout, "MODE READER\r\n");
+ prot_fgets(buf, sizeof(buf), pin);
+
+ if (*user) {
+ /* authenticate to peer */
+ /* XXX this should be modified to support SASL and STARTTLS */
+
+ prot_printf(pout, "AUTHINFO USER %s\r\n", user);
+ if (!prot_fgets(buf, sizeof(buf), pin)) {
+ syslog(LOG_ERR, "AUTHINFO USER terminated abnormally");
+ goto quit;
+ }
+ else if (!strncmp("381", buf, 3)) {
+ /* password required */
+ if (!pass) {
+ syslog(LOG_ERR, "need password for AUTHINFO PASS");
+ goto quit;
+ }
+
+ prot_printf(pout, "AUTHINFO PASS %s\r\n", pass);
+ if (!prot_fgets(buf, sizeof(buf), pin)) {
+ syslog(LOG_ERR, "AUTHINFO PASS terminated abnormally");
+ goto quit;
+ }
+ }
+
+ if (strncmp("281", buf, 3)) {
+ /* auth failed */
+ syslog(LOG_ERR, "authentication failed");
+ goto quit;
+ }
+ }
+
+ /* tell the peer we want to post */
+ prot_printf(pout, "POST\r\n");
+ prot_flush(pout);
+
+ if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("340", buf, 3)) {
+ syslog(LOG_ERR, "peer doesn't allow posting");
+ goto quit;
+ }
+ }
+ else {
+ /* tell the peer about our new article */
+ prot_printf(pout, "IHAVE %s\r\n", msg->id);
+ prot_flush(pout);
+
+ if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("335", buf, 3)) {
+ syslog(LOG_ERR, "peer doesn't want article %s", msg->id);
+ goto quit;
+ }
+ }
+
+ /* send the article */
+ rewind(msg->f);
+ while (fgets(buf, sizeof(buf), msg->f)) {
+ if (!body && buf[0] == '\r' && buf[1] == '\n') {
+ /* blank line between header and body */
+ body = 1;
+ }
+
+ skip = 0;
+ if (!body) {
+ if (!strncasecmp(buf, "Reply-To:", 9)) {
+ /* strip any post addresses, skip if becomes empty */
+ if (!strip_post_addresses(buf+9)) skip = 1;
+ }
+ }
+
+ if (!skip && buf[0] == '.') prot_putc('.', pout);
+ do {
+ if (!skip) prot_printf(pout, "%s", buf);
+ } while (buf[strlen(buf)-1] != '\n' &&
+ fgets(buf, sizeof(buf), msg->f));
+ }
+
+ /* Protect against messages not ending in CRLF */
+ if (buf[strlen(buf)-1] != '\n') prot_printf(pout, "\r\n");
+
+ prot_printf(pout, ".\r\n");
+
+ if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("2", buf, 1)) {
+ syslog(LOG_ERR, "article %s transfer to peer failed", msg->id);
+ }
+
+ quit:
+ prot_printf(pout, "QUIT\r\n");
+ prot_flush(pout);
+
+ prot_fgets(buf, sizeof(buf), pin);
+
+ /* Flush the incoming buffer */
+ prot_NONBLOCK(pin);
+ prot_fill(pin);
+
+ /* close/free socket & prot layer */
+ close(sock);
+
+ prot_free(pin);
+ prot_free(pout);
+
+ return;
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for nntpd!",
+ EC_SOFTWARE);
+}
+
+#define ALLOC_SIZE 10
+
+static void news2mail(message_data_t *msg)
+{
+ struct annotation_data attrib;
+ int n, i, r;
+ FILE *sm;
+ static const char **smbuf = NULL;
+ static int allocsize = 0;
+ int sm_stat;
+ pid_t sm_pid;
+ char buf[4096], to[1024] = "";
+
+ if (!smbuf) {
+ allocsize += ALLOC_SIZE;
+ smbuf = xzmalloc(allocsize * sizeof(const char *));
+
+ smbuf[0] = "sendmail";
+ smbuf[1] = "-i"; /* ignore dots */
+ smbuf[2] = "-f";
+ smbuf[3] = "<>";
+ smbuf[4] = "--";
+ }
+
+ for (i = 5, n = 0; n < msg->rcpt_num; n++) {
+ /* see if we want to send this to a mailing list */
+ r = annotatemore_lookup(msg->rcpt[n],
+ "/vendor/cmu/cyrus-imapd/news2mail", "",
+ &attrib);
+ if (r) continue;
+
+ /* add the email address to our argv[] and to our To: header */
+ if (attrib.value) {
+ if (i >= allocsize - 1) {
+ allocsize += ALLOC_SIZE;
+ smbuf = xrealloc(smbuf, allocsize * sizeof(const char *));
+ }
+
+ smbuf[i++] = xstrdup(attrib.value);
+ smbuf[i] = NULL;
+
+ if (to[0]) strlcat(to, ", ", sizeof(to));
+ strlcat(to, attrib.value, sizeof(to));
+ }
+ }
+
+ /* send the message */
+ if (i > 5) {
+ sm_pid = open_sendmail(smbuf, &sm);
+
+ if (!sm)
+ syslog(LOG_ERR, "news2mail: could not spawn sendmail process");
+ else {
+ int body = 0, skip, found_to = 0;
+
+ rewind(msg->f);
+
+ while (fgets(buf, sizeof(buf), msg->f)) {
+ if (!body && buf[0] == '\r' && buf[1] == '\n') {
+ /* blank line between header and body */
+ body = 1;
+
+ /* insert a To: header if the message doesn't have one */
+ if (!found_to) fprintf(sm, "To: %s\r\n", to);
+ }
+
+ skip = 0;
+ if (!body) {
+ /* munge various news-specific headers */
+ if (!strncasecmp(buf, "Newsgroups:", 11)) {
+ /* rename Newsgroups: to X-Newsgroups: */
+ fprintf(sm, "X-");
+ } else if (!strncasecmp(buf, "Xref:", 5) ||
+ !strncasecmp(buf, "Path:", 5) ||
+ !strncasecmp(buf, "NNTP-Posting-", 13)) {
+ /* skip these (for now) */
+ skip = 1;
+ } else if (!strncasecmp(buf, "To:", 3)) {
+ /* insert our mailing list RCPTs first, and then
+ fold the header to accomodate the original RCPTs */
+ fprintf(sm, "To: %s,\r\n", to);
+ /* overwrite the original "To:" with spaces */
+ memset(buf, ' ', 3);
+ found_to = 1;
+ } else if (!strncasecmp(buf, "Reply-To:", 9)) {
+ /* strip any post addresses, skip if becomes empty */
+ if (!strip_post_addresses(buf+9)) skip = 1;
+ }
+ }
+
+ do {
+ if (!skip) fprintf(sm, "%s", buf);
+ } while (buf[strlen(buf)-1] != '\n' &&
+ fgets(buf, sizeof(buf), msg->f));
+ }
+
+ /* Protect against messages not ending in CRLF */
+ if (buf[strlen(buf)-1] != '\n') fprintf(sm, "\r\n");
+
+ fclose(sm);
+ while (waitpid(sm_pid, &sm_stat, 0) < 0);
+
+ if (sm_stat) /* sendmail exit value */
+ syslog(LOG_ERR, "news2mail failed: %s",
+ sendmail_errstr(sm_stat));
+ }
+
+ /* free the RCPTs */
+ for (i = 5; smbuf[i]; i++) {
+ free((char *) smbuf[i]);
+ smbuf[i] = NULL;
+ }
+ }
+
+ return;
+}
+
+static void cmd_post(char *msgid, int mode)
+{
+ FILE *f = NULL;
+ message_data_t *msg;
+ int r = 0;
+
+ /* check if we want this article */
+ if (msgid && find_msgid(msgid, NULL, NULL)) {
+ /* already have it */
+ r = NNTP_DONT_SEND;
+ }
+
+ if (mode != POST_TAKETHIS) {
+ if (r) {
+ prot_printf(nntp_out, "%u %s Do not send article\r\n",
+ post_codes[mode].no, msgid ? msgid : "");
+ return;
+ }
+ else {
+ prot_printf(nntp_out, "%u %s Send article\r\n",
+ post_codes[mode].cont, msgid ? msgid : "");
+ if (mode == POST_CHECK) return;
+ }
+ }
+
+ /* get a spool file (if needed) */
+ if (!r) {
+ f = tmpfile();
+ if (!f) r = IMAP_IOERROR;
+ }
+
+ if (f) {
+ msg_new(&msg);
+
+ /* spool the article */
+ r = savemsg(msg, f);
+
+ /* deliver the article */
+ if (!r) r = deliver(msg);
+
+ if (!r) {
+ prot_printf(nntp_out, "%u %s Article received ok\r\n",
+ post_codes[mode].ok, msg->id ? msg->id : "");
+
+ /* process control messages */
+ if (msg->control && !config_mupdate_server) {
+ int r1 = 0;
+
+ /* XXX check PGP signature */
+ if (!strncmp(msg->control, "newgroup", 8))
+ r1 = newgroup(msg);
+ else if (!strncmp(msg->control, "rmgroup", 7))
+ r1 = rmgroup(msg);
+ else if (!strncmp(msg->control, "mvgroup", 7))
+ r1 = mvgroup(msg);
+ else if (!strncmp(msg->control, "cancel", 6))
+ r1 = cancel(msg);
+ else
+ r1 = NNTP_UNKNOWN_CONTROLMSG;
+
+ if (r1)
+ syslog(LOG_WARNING, "control message '%s' failed: %s",
+ msg->control, error_message(r1));
+ else {
+ syslog(LOG_INFO, "control message '%s' succeeded",
+ msg->control);
+ }
+ }
+
+ if (msg->id) {
+ const char *peers = config_getstring(IMAPOPT_NEWSPEER);
+
+ /* send the article upstream */
+ if (peers) {
+ char *tmpbuf, *cur_peer, *next_peer;
+
+ /* make a working copy of the peers */
+ cur_peer = tmpbuf = xstrdup(peers);
+
+ while (cur_peer) {
+ /* eat any leading whitespace */
+ while (isspace(*cur_peer)) cur_peer++;
+
+ /* find end of peer */
+ if ((next_peer = strchr(cur_peer, ' ')) ||
+ (next_peer = strchr(cur_peer, '\t')))
+ *next_peer++ = '\0';
+
+ /* feed the article to this peer */
+ feedpeer(cur_peer, msg);
+
+ /* move to next peer */
+ cur_peer = next_peer;
+ }
+
+ free(tmpbuf);
+ }
+
+ /* gateway news to mail */
+ news2mail(msg);
+ }
+ }
+
+ msg_free(msg); /* does fclose() */
+ if (stage) append_removestage(stage);
+ stage = NULL;
+ }
+ else {
+ /* flush the article from the stream */
+ spool_copy_msg(nntp_in, NULL);
+ }
+
+ if (r) {
+ prot_printf(nntp_out, "%u %s Failed receiving article (%s)\r\n",
+ post_codes[mode].fail, msgid ? msgid : "",
+ error_message(r));
+ }
+
+ prot_flush(nntp_out);
+}
+
+#ifdef HAVE_SSL
+static void cmd_starttls(int nntps)
+{
+ int result;
+ int *layerp;
+ sasl_ssf_t ssf;
+ char *auth_id;
+
+ if (nntp_starttls_done == 1) {
+ prot_printf(nntp_out, "502 %s\r\n",
+ "Already successfully executed STARTTLS");
+ return;
+ }
+
+ /* SASL and openssl have different ideas about whether ssf is signed */
+ layerp = (int *) &ssf;
+
+ result=tls_init_serverengine("nntp",
+ 5, /* depth to verify */
+ !nntps, /* can client auth? */
+ !nntps); /* TLS only? */
+
+ if (result == -1) {
+
+ syslog(LOG_ERR, "[nntpd] error initializing TLS");
+
+ if (nntps == 0)
+ prot_printf(nntp_out, "580 %s\r\n", "Error initializing TLS");
+ else
+ fatal("tls_init() failed",EC_TEMPFAIL);
+
+ return;
+ }
+
+ if (nntps == 0)
+ {
+ prot_printf(nntp_out, "382 %s\r\n", "Begin TLS negotiation now");
+ /* must flush our buffers before starting tls */
+ prot_flush(nntp_out);
+ }
+
+ result=tls_start_servertls(0, /* read */
+ 1, /* write */
+ layerp,
+ &auth_id,
+ &tls_conn);
+
+ /* if error */
+ if (result==-1) {
+ if (nntps == 0) {
+ prot_printf(nntp_out, "580 Starttls failed\r\n");
+ syslog(LOG_NOTICE, "[nntpd] STARTTLS failed: %s", nntp_clienthost);
+ } else {
+ syslog(LOG_NOTICE, "nntps failed: %s", nntp_clienthost);
+ fatal("tls_start_servertls() failed", EC_TEMPFAIL);
+ }
+ return;
+ }
+
+ /* tell SASL about the negotiated layer */
+ result = sasl_setprop(nntp_saslconn, SASL_SSF_EXTERNAL, &ssf);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ saslprops.ssf = ssf;
+
+ result = sasl_setprop(nntp_saslconn, SASL_AUTH_EXTERNAL, auth_id);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ if(auth_id)
+ saslprops.authid = xstrdup(auth_id);
+
+ /* tell the prot layer about our new layers */
+ prot_settls(nntp_in, tls_conn);
+ prot_settls(nntp_out, tls_conn);
+
+ nntp_starttls_done = 1;
+}
+#else
+static void cmd_starttls(int nntps __attribute__((unused)))
+{
+ fatal("cmd_starttls() called, but no OpenSSL", EC_SOFTWARE);
+}
+#endif /* HAVE_SSL */
+
+static struct wildmat *split_wildmats(char *str)
+{
+ const char *prefix;
+ char pattern[MAX_MAILBOX_NAME+1] = "", *p, *c;
+ struct wildmat *wild = NULL;
+ int n = 0;
+
+ if ((prefix = config_getstring(IMAPOPT_NEWSPREFIX)))
+ snprintf(pattern, sizeof(pattern), "%s.", prefix);
+ p = pattern + strlen(pattern);
+
+ /*
+ * split the list of wildmats
+ *
+ * we split them right to left because this is the order in which
+ * we want to test them (per draft-ietf-nntpext-base 5.2)
+ */
+ do {
+ if ((c = strrchr(str, ',')))
+ *c++ = '\0';
+ else
+ c = str;
+
+ if (!(n % 10)) /* alloc some more */
+ wild = xrealloc(wild, (n + 11) * sizeof(struct wildmat));
+
+ if (*c == '!') wild[n].not = 1; /* not */
+ else if (*c == '@') wild[n].not = -1; /* absolute not (feeding) */
+ else wild[n].not = 0;
+
+ strcpy(p, wild[n].not ? c + 1 : c);
+ wild[n++].pat = xstrdup(pattern);
+ } while (c != str);
+ wild[n].pat = NULL;
+
+ return wild;
+}
+
+static void free_wildmats(struct wildmat *wild)
+{
+ struct wildmat *w = wild;
+
+ while (w->pat) {
+ free(w->pat);
+ w++;
+ }
+ free(wild);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,150 @@
+/* notify.c -- Module to notify of new mail
+ * $Id: notify.c,v 1.13.2.1 2006/03/17 14:14:54 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/un.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "global.h"
+#include "notify.h"
+#include "xmalloc.h"
+
+#define FNAME_NOTIFY_SOCK "/socket/notify"
+
+#define NOTIFY_MAXSIZE 8192
+
+static int add_arg(char *buf, int max_size, const char *arg, int *buflen)
+{
+ const char *myarg = (arg ? arg : "");
+ int len = strlen(myarg) + 1;
+
+ if (*buflen + len > max_size) return -1;
+
+ strcat(buf+*buflen, myarg);
+ *buflen += len;
+
+ return 0;
+}
+
+void notify(const char *method,
+ const char *class, const char *priority,
+ const char *user, const char *mailbox,
+ int nopt, const char **options,
+ const char *message)
+{
+ const char *notify_sock;
+ int soc;
+ struct sockaddr_un sun_data;
+ char buf[NOTIFY_MAXSIZE] = "", noptstr[20];
+ int buflen = 0;
+ int i, r = 0;
+
+ soc = socket(AF_UNIX, SOCK_DGRAM, 0);
+ if (soc == -1) {
+ syslog(LOG_ERR, "unable to create notify socket(): %m");
+ return;
+ }
+
+ memset((char *)&sun_data, 0, sizeof(sun_data));
+ sun_data.sun_family = AF_UNIX;
+ notify_sock = config_getstring(IMAPOPT_NOTIFYSOCKET);
+ if (notify_sock) {
+ strlcpy(sun_data.sun_path, notify_sock, sizeof(sun_data.sun_path));
+ }
+ else {
+ strlcpy(sun_data.sun_path, config_dir, sizeof(sun_data.sun_path));
+ strlcat(sun_data.sun_path,
+ FNAME_NOTIFY_SOCK, sizeof(sun_data.sun_path));
+ }
+
+ /*
+ * build request of the form:
+ *
+ * method NUL class NUL priority NUL user NUL mailbox NUL
+ * nopt NUL N(option NUL) message NUL
+ */
+
+ r = add_arg(buf, sizeof(buf), method, &buflen);
+ if (!r) r = add_arg(buf, sizeof(buf), class, &buflen);
+ if (!r) r = add_arg(buf, sizeof(buf), priority, &buflen);
+ if (!r) r = add_arg(buf, sizeof(buf), user, &buflen);
+ if (!r) r = add_arg(buf, sizeof(buf), mailbox, &buflen);
+
+ snprintf(noptstr, sizeof(noptstr), "%d", nopt);
+ if (!r) r = add_arg(buf, sizeof(buf), noptstr, &buflen);
+
+ for (i = 0; !r && i < nopt; i++) {
+ r = add_arg(buf, sizeof(buf), options[i], &buflen);
+ }
+
+ if (!r) r = add_arg(buf, sizeof(buf), message, &buflen);
+
+ if (r) {
+ syslog(LOG_ERR, "notify datagram too large, %s, %s",
+ user, mailbox);
+ close(soc);
+ return;
+ }
+
+ r = sendto(soc, buf, buflen, 0,
+ (struct sockaddr *)&sun_data, sizeof(sun_data));
+ if (r < buflen) {
+ syslog(LOG_ERR, "unable to sendto() notify socket: %m");
+ return;
+ }
+
+ close(soc);
+
+ return;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/notify.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,53 @@
+/* notify.h -- abstract interface for notifications
+ *
+ * $Id: notify.h,v 1.7 2003/10/22 18:50:08 rjs3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef NOTIFY_H
+#define NOTIFY_H
+
+void notify(const char *method,
+ const char *class, const char *priority,
+ const char *user, const char *mailbox,
+ int nopt, const char **options,
+ const char *message);
+
+#endif /* NOTIFY_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pop3d.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pop3d.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pop3d.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pop3d.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1852 @@
+/* pop3d.c -- POP3 server protocol parsing
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * $Id: pop3d.c,v 1.144.2.43 2006/05/26 15:50:09 murch Exp $
+ */
+#include <config.h>
+
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <syslog.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <ctype.h>
+#include "prot.h"
+
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "acl.h"
+#include "util.h"
+#include "auth.h"
+#include "iptostring.h"
+#include "global.h"
+#include "tls.h"
+
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "version.h"
+#include "xmalloc.h"
+#include "mboxlist.h"
+#include "idle.h"
+#include "telemetry.h"
+#include "backend.h"
+#include "proxy.h"
+
+#include "sync_log.h"
+
+#ifdef HAVE_KRB
+/* kerberos des is purported to conflict with OpenSSL DES */
+#define DES_DEFS
+#include <krb.h>
+
+/* MIT's kpop authentication kludge */
+char klrealm[REALM_SZ];
+AUTH_DAT kdata;
+#endif /* HAVE_KRB */
+static int kflag = 0;
+
+extern int optind;
+extern char *optarg;
+extern int opterr;
+
+
+
+#ifdef HAVE_SSL
+static SSL *tls_conn;
+#endif /* HAVE_SSL */
+
+sasl_conn_t *popd_saslconn; /* the sasl connection context */
+
+char *popd_userid = 0, *popd_subfolder = 0;
+struct mailbox *popd_mailbox = 0;
+struct auth_state *popd_authstate = 0;
+int config_popuseacl;
+struct sockaddr_storage popd_localaddr, popd_remoteaddr;
+int popd_haveaddr = 0;
+char popd_clienthost[NI_MAXHOST*2+1] = "[local]";
+struct protstream *popd_out = NULL;
+struct protstream *popd_in = NULL;
+static int popd_logfd = -1;
+unsigned popd_exists = 0;
+unsigned popd_login_time;
+struct msg {
+ unsigned uid;
+ unsigned size;
+ int deleted;
+} *popd_msg = NULL;
+
+static sasl_ssf_t extprops_ssf = 0;
+static int pop3s = 0;
+int popd_starttls_done = 0;
+
+static struct mailbox mboxstruct;
+
+static mailbox_decideproc_t expungedeleted;
+
+/* the sasl proxy policy context */
+static struct proxy_context popd_proxyctx = {
+ 0, 1, &popd_authstate, NULL, NULL
+};
+
+/* signal to config.c */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+/* current namespace */
+static struct namespace popd_namespace;
+
+/* PROXY stuff */
+struct backend *backend = NULL;
+
+static void bitpipe(void);
+/* end PROXY stuff */
+
+static char popd_apop_chal[45 + MAXHOSTNAMELEN + 1]; /* <rand.time at hostname> */
+static void cmd_apop(char *response);
+
+static void cmd_auth(char *arg);
+static void cmd_capa(void);
+static void cmd_pass(char *pass);
+static void cmd_user(char *user);
+static void cmd_starttls(int pop3s);
+static void blat(int msg,int lines);
+static int openinbox(void);
+static void cmdloop(void);
+static void kpop(void);
+static int parsenum(char **ptr);
+void usage(void);
+void shut_down(int code) __attribute__ ((noreturn));
+
+
+extern void setproctitle_init(int argc, char **argv, char **envp);
+extern int proc_register(const char *progname, const char *clienthost,
+ const char *userid, const char *mailbox);
+extern void proc_cleanup(void);
+
+extern int saslserver(sasl_conn_t *conn, const char *mech,
+ const char *init_resp, const char *resp_prefix,
+ const char *continuation, const char *empty_chal,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, char **success_data);
+
+/* Enable the resetting of a sasl_conn_t */
+static int reset_saslconn(sasl_conn_t **conn);
+
+static struct
+{
+ char *ipremoteport;
+ char *iplocalport;
+ sasl_ssf_t ssf;
+ char *authid;
+} saslprops = {NULL,NULL,0,NULL};
+
+static int popd_canon_user(sasl_conn_t *conn, void *context,
+ const char *user, unsigned ulen,
+ unsigned flags, const char *user_realm,
+ char *out, unsigned out_max, unsigned *out_ulen)
+{
+ char userbuf[MAX_MAILBOX_NAME+1], *p;
+ size_t n;
+ int r;
+
+ if (!ulen) ulen = strlen(user);
+
+ if (config_getswitch(IMAPOPT_POPSUBFOLDERS)) {
+ /* make a working copy of the auth[z]id */
+ if (ulen > MAX_MAILBOX_NAME) {
+ sasl_seterror(conn, 0, "buffer overflow while canonicalizing");
+ return SASL_BUFOVER;
+ }
+ memcpy(userbuf, user, ulen);
+ userbuf[ulen] = '\0';
+ user = userbuf;
+
+ /* See if we're trying to access a subfolder */
+ if ((p = strchr(userbuf, '+'))) {
+ n = config_virtdomains ? strcspn(p, "@") : strlen(p);
+
+ if (flags & SASL_CU_AUTHZID) {
+ /* make a copy of the subfolder */
+ if (popd_subfolder) free(popd_subfolder);
+ popd_subfolder = xstrndup(p, n);
+ }
+
+ /* strip the subfolder from the auth[z]id */
+ memmove(p, p+n, strlen(p+n)+1);
+ ulen -= n;
+ }
+ }
+
+ r = mysasl_canon_user(conn, context, user, ulen, flags, user_realm,
+ out, out_max, out_ulen);
+
+ if (!r && popd_subfolder && flags == SASL_CU_AUTHZID) {
+ /* If we're only doing the authzid, put back the subfolder
+ in case its used in the challenge/response calculation */
+ n = strlen(popd_subfolder);
+ if (*out_ulen + n > out_max) {
+ sasl_seterror(conn, 0, "buffer overflow while canonicalizing");
+ r = SASL_BUFOVER;
+ }
+ else {
+ p = (config_virtdomains && (p = strchr(out, '@'))) ?
+ p : out + *out_ulen;
+ memmove(p+n, p, strlen(p)+1);
+ memcpy(p, popd_subfolder, n);
+ *out_ulen += n;
+ }
+ }
+
+ return r;
+}
+
+static int popd_proxy_policy(sasl_conn_t *conn,
+ void *context,
+ const char *requested_user, unsigned rlen,
+ const char *auth_identity, unsigned alen,
+ const char *def_realm,
+ unsigned urlen,
+ struct propctx *propctx)
+{
+ if (config_getswitch(IMAPOPT_POPSUBFOLDERS)) {
+ char userbuf[MAX_MAILBOX_NAME+1], *p;
+ size_t n;
+
+ /* make a working copy of the authzid */
+ if (!rlen) rlen = strlen(requested_user);
+ if (rlen > MAX_MAILBOX_NAME) {
+ sasl_seterror(conn, 0, "buffer overflow while proxying");
+ return SASL_BUFOVER;
+ }
+ memcpy(userbuf, requested_user, rlen);
+ userbuf[rlen] = '\0';
+ requested_user = userbuf;
+
+ /* See if we're trying to access a subfolder */
+ if ((p = strchr(userbuf, '+'))) {
+ n = config_virtdomains ? strcspn(p, "@") : strlen(p);
+
+ /* strip the subfolder from the authzid */
+ memmove(p, p+n, strlen(p+n)+1);
+ rlen -= n;
+ }
+ }
+
+ return mysasl_proxy_policy(conn, context, requested_user, rlen,
+ auth_identity, alen, def_realm, urlen, propctx);
+}
+
+static struct sasl_callback mysasl_cb[] = {
+ { SASL_CB_GETOPT, &mysasl_config, NULL },
+ { SASL_CB_PROXY_POLICY, &popd_proxy_policy, (void*) &popd_proxyctx },
+ { SASL_CB_CANON_USER, &popd_canon_user, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+static void popd_reset(void)
+{
+ proc_cleanup();
+
+ /* close local mailbox */
+ if (popd_mailbox) {
+ mailbox_close(popd_mailbox);
+ popd_mailbox = 0;
+ }
+
+ /* close backend connection */
+ if (backend) {
+ backend_disconnect(backend);
+ free(backend);
+ backend = NULL;
+ }
+
+ if (popd_in) {
+ prot_NONBLOCK(popd_in);
+ prot_fill(popd_in);
+
+ prot_free(popd_in);
+ }
+
+ if (popd_out) {
+ prot_flush(popd_out);
+ prot_free(popd_out);
+ }
+
+ popd_in = popd_out = NULL;
+
+#ifdef HAVE_SSL
+ if (tls_conn) {
+ tls_reset_servertls(&tls_conn);
+ tls_conn = NULL;
+ }
+#endif
+
+ cyrus_reset_stdio();
+
+ strcpy(popd_clienthost, "[local]");
+ if (popd_logfd != -1) {
+ close(popd_logfd);
+ popd_logfd = -1;
+ }
+ if (popd_userid != NULL) {
+ free(popd_userid);
+ popd_userid = NULL;
+ }
+ if (popd_subfolder != NULL) {
+ free(popd_subfolder);
+ popd_subfolder = NULL;
+ }
+ if (popd_authstate) {
+ auth_freestate(popd_authstate);
+ popd_authstate = NULL;
+ }
+ if (popd_saslconn) {
+ sasl_dispose(&popd_saslconn);
+ popd_saslconn = NULL;
+ }
+ popd_starttls_done = 0;
+
+ if(saslprops.iplocalport) {
+ free(saslprops.iplocalport);
+ saslprops.iplocalport = NULL;
+ }
+ if(saslprops.ipremoteport) {
+ free(saslprops.ipremoteport);
+ saslprops.ipremoteport = NULL;
+ }
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ saslprops.ssf = 0;
+
+ popd_exists = 0;
+}
+
+/*
+ * run once when process is forked;
+ * MUST NOT exit directly; must return with non-zero error code
+ */
+int service_init(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ int r;
+ int opt;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+ setproctitle_init(argc, argv, envp);
+
+ /* set signal handlers */
+ signals_set_shutdown(&shut_down);
+ signal(SIGPIPE, SIG_IGN);
+
+ /* load the SASL plugins */
+ global_sasl_init(1, 1, mysasl_cb);
+
+ /* open the mboxlist, we'll need it for real work */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* open the quota db, we'll need it for expunge */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ /* setup for sending IMAP IDLE notifications */
+ idle_enabled();
+
+ /* Set namespace */
+ if ((r = mboxname_init_namespace(&popd_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ while ((opt = getopt(argc, argv, "skp:")) != EOF) {
+ switch(opt) {
+ case 's': /* pop3s (do starttls right away) */
+ pop3s = 1;
+ if (!tls_enabled()) {
+ syslog(LOG_ERR, "pop3s: required OpenSSL options not present");
+ fatal("pop3s: required OpenSSL options not present",
+ EC_CONFIG);
+ }
+ break;
+
+ case 'k':
+ kflag++;
+ break;
+
+ case 'p': /* external protection */
+ extprops_ssf = atoi(optarg);
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * run for each accepted connection
+ */
+int service_main(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ socklen_t salen;
+ char hbuf[NI_MAXHOST];
+ char localip[60], remoteip[60];
+ int niflags;
+ int timeout;
+ sasl_security_properties_t *secprops=NULL;
+
+ signals_poll();
+
+ sync_log_init();
+
+ popd_in = prot_new(0, 0);
+ popd_out = prot_new(1, 1);
+
+ /* Find out name of client host */
+ salen = sizeof(popd_remoteaddr);
+ if (getpeername(0, (struct sockaddr *)&popd_remoteaddr, &salen) == 0 &&
+ (popd_remoteaddr.ss_family == AF_INET ||
+ popd_remoteaddr.ss_family == AF_INET6)) {
+ if (getnameinfo((struct sockaddr *)&popd_remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD) == 0) {
+ strncpy(popd_clienthost, hbuf, sizeof(hbuf));
+ strlcat(popd_clienthost, " ", sizeof(popd_clienthost));
+ } else {
+ popd_clienthost[0] = '\0';
+ }
+ niflags = NI_NUMERICHOST;
+#ifdef NI_WITHSCOPEID
+ if (((struct sockaddr *)&popd_remoteaddr)->sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&popd_remoteaddr, salen, hbuf,
+ sizeof(hbuf), NULL, 0, niflags) != 0)
+ strlcpy(hbuf, "unknown", sizeof(hbuf));
+ strlcat(popd_clienthost, "[", sizeof(popd_clienthost));
+ strlcat(popd_clienthost, hbuf, sizeof(popd_clienthost));
+ strlcat(popd_clienthost, "]", sizeof(popd_clienthost));
+ salen = sizeof(popd_localaddr);
+ if (getsockname(0, (struct sockaddr *)&popd_localaddr, &salen) == 0) {
+ popd_haveaddr = 1;
+ }
+ }
+
+ /* other params should be filled in */
+ if (sasl_server_new("pop", config_servername, NULL, NULL, NULL,
+ NULL, 0, &popd_saslconn) != SASL_OK)
+ fatal("SASL failed initializing: sasl_server_new()",EC_TEMPFAIL);
+
+ /* will always return something valid */
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ sasl_setprop(popd_saslconn, SASL_SEC_PROPS, secprops);
+ sasl_setprop(popd_saslconn, SASL_SSF_EXTERNAL, &extprops_ssf);
+
+ if(iptostring((struct sockaddr *)&popd_localaddr,
+ salen, localip, 60) == 0) {
+ sasl_setprop(popd_saslconn, SASL_IPLOCALPORT, localip);
+ saslprops.iplocalport = xstrdup(localip);
+ }
+
+ if(iptostring((struct sockaddr *)&popd_remoteaddr,
+ salen, remoteip, 60) == 0) {
+ sasl_setprop(popd_saslconn, SASL_IPREMOTEPORT, remoteip);
+ saslprops.ipremoteport = xstrdup(remoteip);
+ }
+
+ proc_register("pop3d", popd_clienthost, NULL, NULL);
+
+ /* Set inactivity timer */
+ timeout = config_getint(IMAPOPT_POPTIMEOUT);
+ if (timeout < 10) timeout = 10;
+ prot_settimeout(popd_in, timeout*60);
+ prot_setflushonread(popd_in, popd_out);
+
+ if (kflag) kpop();
+
+ /* we were connected on pop3s port so we should do
+ TLS negotiation immediatly */
+ if (pop3s == 1) cmd_starttls(1);
+
+ /* Create APOP challenge for banner */
+ *popd_apop_chal = 0;
+ if (config_getswitch(IMAPOPT_ALLOWAPOP) &&
+ (sasl_checkapop(popd_saslconn, NULL, 0, NULL, 0) == SASL_OK) &&
+ !sasl_mkchal(popd_saslconn,
+ popd_apop_chal, sizeof(popd_apop_chal), 1)) {
+ syslog(LOG_WARNING, "APOP disabled: can't create challenge");
+ }
+
+ prot_printf(popd_out, "+OK %s Cyrus POP3%s %s server ready %s\r\n",
+ config_servername, config_mupdate_server ? " Murder" : "",
+ CYRUS_VERSION, popd_apop_chal);
+ cmdloop();
+
+ /* QUIT executed */
+
+ /* don't bother reusing KPOP connections */
+ if (kflag) shut_down(0);
+
+ /* cleanup */
+ popd_reset();
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+void usage(void)
+{
+ prot_printf(popd_out, "-ERR usage: pop3d [-C <alt_config>] [-k] [-s]\r\n");
+ prot_flush(popd_out);
+ exit(EC_USAGE);
+}
+
+/*
+ * Cleanly shut down and exit
+ */
+void shut_down(int code)
+{
+ proc_cleanup();
+
+ /* close local mailbox */
+ if (popd_mailbox) {
+ mailbox_close(popd_mailbox);
+ }
+
+ if (popd_msg) {
+ free(popd_msg);
+ }
+
+ /* close backend connection */
+ if (backend) {
+ backend_disconnect(backend);
+ free(backend);
+ }
+
+ mboxlist_close();
+ mboxlist_done();
+
+ quotadb_close();
+ quotadb_done();
+
+ if (popd_in) {
+ prot_NONBLOCK(popd_in);
+ prot_fill(popd_in);
+ prot_free(popd_in);
+ }
+
+ if (popd_out) {
+ prot_flush(popd_out);
+ prot_free(popd_out);
+ }
+
+#ifdef HAVE_SSL
+ tls_shutdown_serverengine();
+#endif
+
+ cyrus_done();
+
+ exit(code);
+}
+
+void fatal(const char* s, int code)
+{
+ static int recurse_code = 0;
+
+ if (recurse_code) {
+ /* We were called recursively. Just give up */
+ proc_cleanup();
+ exit(recurse_code);
+ }
+ recurse_code = code;
+ if (popd_out) {
+ prot_printf(popd_out, "-ERR [SYS/PERM] Fatal error: %s\r\n", s);
+ prot_flush(popd_out);
+ }
+ syslog(LOG_ERR, "Fatal error: %s", s);
+ shut_down(code);
+}
+
+#ifdef HAVE_KRB
+/* translate IPv4 mapped IPv6 address to IPv4 address */
+#ifdef IN6_IS_ADDR_V4MAPPED
+static void sockaddr_unmapped(struct sockaddr *sa, socklen_t *len)
+{
+ struct sockaddr_in6 *sin6;
+ struct sockaddr_in *sin4;
+ uint32_t addr;
+ int port;
+
+ if (sa->sa_family != AF_INET6)
+ return;
+ sin6 = (struct sockaddr_in6 *)sa;
+ if (!IN6_IS_ADDR_V4MAPPED((&sin6->sin6_addr)))
+ return;
+ sin4 = (struct sockaddr_in *)sa;
+ addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
+ port = sin6->sin6_port;
+ memset(sin4, 0, sizeof(struct sockaddr_in));
+ sin4->sin_addr.s_addr = addr;
+ sin4->sin_port = port;
+ sin4->sin_family = AF_INET;
+#ifdef HAVE_SOCKADDR_SA_LEN
+ sin4->sin_len = sizeof(struct sockaddr_in);
+#endif
+ *len = sizeof(struct sockaddr_in);
+}
+#else
+static void sockaddr_unmapped(struct sockaddr *sa __attribute__((unused)),
+ socklen_t *len __attribute__((unused)))
+{
+ return;
+}
+#endif
+
+
+/*
+ * MIT's kludge of a kpop protocol
+ * Client does a krb_sendauth() first thing
+ */
+void kpop(void)
+{
+ Key_schedule schedule;
+ KTEXT_ST ticket;
+ char instance[INST_SZ];
+ char version[9];
+ const char *srvtab;
+ int r;
+ socklen_t len;
+
+ if (!popd_haveaddr) {
+ fatal("Cannot get client's IP address", EC_OSERR);
+ }
+
+ srvtab = config_getstring(IMAPOPT_SRVTAB);
+
+ sockaddr_unmapped((struct sockaddr *)&popd_remoteaddr, &len);
+ if (popd_remoteaddr.ss_family != AF_INET) {
+ prot_printf(popd_out,
+ "-ERR [AUTH] Kerberos authentication failure: %s\r\n",
+ "not an IPv4 connection");
+ shut_down(0);
+ }
+
+ strcpy(instance, "*");
+ r = krb_recvauth(0L, 0, &ticket, "pop", instance,
+ (struct sockaddr_in *) &popd_remoteaddr,
+ (struct sockaddr_in *) NULL,
+ &kdata, (char*) srvtab, schedule, version);
+
+ if (r) {
+ prot_printf(popd_out, "-ERR [AUTH] Kerberos authentication failure: %s\r\n",
+ krb_err_txt[r]);
+ syslog(LOG_NOTICE,
+ "badlogin: %s kpop ? %s%s%s@%s %s",
+ popd_clienthost, kdata.pname,
+ kdata.pinst[0] ? "." : "", kdata.pinst,
+ kdata.prealm, krb_err_txt[r]);
+ shut_down(0);
+ }
+
+ r = krb_get_lrealm(klrealm,1);
+ if (r) {
+ prot_printf(popd_out, "-ERR [AUTH] Kerberos failure: %s\r\n",
+ krb_err_txt[r]);
+ syslog(LOG_NOTICE,
+ "badlogin: %s kpop ? %s%s%s@%s krb_get_lrealm: %s",
+ popd_clienthost, kdata.pname,
+ kdata.pinst[0] ? "." : "", kdata.pinst,
+ kdata.prealm, krb_err_txt[r]);
+ shut_down(0);
+ }
+}
+#else
+void kpop(void)
+{
+ usage();
+}
+#endif
+
+/*
+ * Top-level command loop parsing
+ */
+static void cmdloop(void)
+{
+ char inputbuf[8192];
+ char *p, *arg;
+ unsigned msg = 0;
+
+ for (;;) {
+ signals_poll();
+
+ if (backend) {
+ /* create a pipe from client to backend */
+ bitpipe();
+
+ /* pipe has been closed */
+ return;
+ }
+
+ /* check for shutdown file */
+ if (shutdown_file(inputbuf, sizeof(inputbuf))) {
+ for (p = inputbuf; *p == '['; p++); /* can't have [ be first char */
+ prot_printf(popd_out, "-ERR [SYS/TEMP] %s\r\n", p);
+ shut_down(0);
+ }
+
+ if (!prot_fgets(inputbuf, sizeof(inputbuf), popd_in)) {
+ shut_down(0);
+ }
+
+ p = inputbuf + strlen(inputbuf);
+ if (p > inputbuf && p[-1] == '\n') *--p = '\0';
+ if (p > inputbuf && p[-1] == '\r') *--p = '\0';
+
+ /* Parse into keword and argument */
+ for (p = inputbuf; *p && !isspace((int) *p); p++);
+ if (*p) {
+ *p++ = '\0';
+ arg = p;
+ if (strcasecmp(inputbuf, "pass") != 0) {
+ while (*arg && isspace((int) *arg)) {
+ arg++;
+ }
+ }
+ if (!*arg) {
+ if (strcasecmp(inputbuf, "auth") == 0) {
+ /* HACK for MS Outlook's incorrect use of the old-style
+ * SASL discovery method.
+ * Outlook uses "AUTH \r\n" instead if "AUTH\r\n"
+ */
+ arg = 0;
+ }
+ else {
+ prot_printf(popd_out, "-ERR Syntax error\r\n");
+ continue;
+ }
+ }
+ }
+ else {
+ arg = 0;
+ }
+ lcase(inputbuf);
+
+ if (!strcmp(inputbuf, "quit")) {
+ if (!arg) {
+ if (popd_mailbox) {
+ if (!mailbox_lock_index(popd_mailbox)) {
+ int pollpadding =config_getint(IMAPOPT_POPPOLLPADDING);
+ int minpollsec = config_getint(IMAPOPT_POPMINPOLL)*60;
+ if ((minpollsec > 0) && (pollpadding > 1)) {
+ int mintime = popd_login_time - (minpollsec*(pollpadding));
+ if (popd_mailbox->pop3_last_login < mintime) {
+ popd_mailbox->pop3_last_login = mintime + minpollsec;
+ } else {
+ popd_mailbox->pop3_last_login += minpollsec;
+ }
+ } else {
+ popd_mailbox->pop3_last_login = popd_login_time;
+ }
+ mailbox_write_index_header(popd_mailbox);
+ mailbox_unlock_index(popd_mailbox);
+ }
+
+ for (msg = 1; msg <= popd_exists; msg++) {
+ if (popd_msg[msg].deleted) break;
+ }
+
+ if (msg <= popd_exists) {
+ (void) mailbox_expunge(popd_mailbox, expungedeleted,
+ 0, 0);
+ sync_log_mailbox(popd_mailbox->name);
+ }
+ }
+ prot_printf(popd_out, "+OK\r\n");
+ return;
+ }
+ else prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else if (!strcmp(inputbuf, "capa")) {
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ } else {
+ cmd_capa();
+ }
+ }
+ else if (!strcmp(inputbuf, "stls") && tls_enabled()) {
+ if (arg) {
+ prot_printf(popd_out,
+ "-ERR STLS doesn't take any arguments\r\n");
+ } else {
+ cmd_starttls(0);
+ }
+ }
+ else if (!popd_mailbox) {
+ if (!strcmp(inputbuf, "user")) {
+ if (!arg) {
+ prot_printf(popd_out, "-ERR Missing argument\r\n");
+ }
+ else {
+ cmd_user(arg);
+ }
+ }
+ else if (!strcmp(inputbuf, "pass")) {
+ if (!arg) prot_printf(popd_out, "-ERR Missing argument\r\n");
+ else cmd_pass(arg);
+ }
+ else if (!strcmp(inputbuf, "apop") && *popd_apop_chal) {
+ if (!arg) prot_printf(popd_out, "-ERR Missing argument\r\n");
+ else cmd_apop(arg);
+ }
+ else if (!strcmp(inputbuf, "auth")) {
+ cmd_auth(arg);
+ }
+ else {
+ prot_printf(popd_out, "-ERR Unrecognized command\r\n");
+ }
+ }
+ else if (!strcmp(inputbuf, "stat")) {
+ unsigned nmsgs = 0, totsize = 0;
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else {
+ for (msg = 1; msg <= popd_exists; msg++) {
+ if (!popd_msg[msg].deleted) {
+ nmsgs++;
+ totsize += popd_msg[msg].size;
+ }
+ }
+ prot_printf(popd_out, "+OK %u %u\r\n", nmsgs, totsize);
+ }
+ }
+ else if (!strcmp(inputbuf, "list")) {
+ if (arg) {
+ msg = parsenum(&arg);
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else if (msg < 1 || msg > popd_exists ||
+ popd_msg[msg].deleted) {
+ prot_printf(popd_out, "-ERR No such message\r\n");
+ }
+ else {
+ prot_printf(popd_out, "+OK %u %u\r\n", msg, popd_msg[msg].size);
+ }
+ }
+ else {
+ prot_printf(popd_out, "+OK scan listing follows\r\n");
+ for (msg = 1; msg <= popd_exists; msg++) {
+ if (!popd_msg[msg].deleted) {
+ prot_printf(popd_out, "%u %u\r\n", msg, popd_msg[msg].size);
+ }
+ }
+ prot_printf(popd_out, ".\r\n");
+ }
+ }
+ else if (!strcmp(inputbuf, "retr")) {
+ if (!arg) prot_printf(popd_out, "-ERR Missing argument\r\n");
+ else {
+ msg = parsenum(&arg);
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else if (msg < 1 || msg > popd_exists ||
+ popd_msg[msg].deleted) {
+ prot_printf(popd_out, "-ERR No such message\r\n");
+ }
+ else {
+ blat(msg, -1);
+ }
+ }
+ }
+ else if (!strcmp(inputbuf, "dele")) {
+ if (!arg) prot_printf(popd_out, "-ERR Missing argument\r\n");
+ else if (config_popuseacl && !(mboxstruct.myrights & ACL_DELETEMSG)) {
+ prot_printf(popd_out, "-ERR [SYS/PERM] %s\r\n",
+ error_message(IMAP_PERMISSION_DENIED));
+ }
+ else {
+ msg = parsenum(&arg);
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else if (msg < 1 || msg > popd_exists ||
+ popd_msg[msg].deleted) {
+ prot_printf(popd_out, "-ERR No such message\r\n");
+ }
+ else {
+ popd_msg[msg].deleted = 1;
+ prot_printf(popd_out, "+OK message deleted\r\n");
+ }
+ }
+ }
+ else if (!strcmp(inputbuf, "noop")) {
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else {
+ prot_printf(popd_out, "+OK\r\n");
+ }
+ }
+ else if (!strcmp(inputbuf, "rset")) {
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else {
+ for (msg = 1; msg <= popd_exists; msg++) {
+ popd_msg[msg].deleted = 0;
+ }
+ prot_printf(popd_out, "+OK\r\n");
+ }
+ }
+ else if (!strcmp(inputbuf, "top")) {
+ int lines;
+
+ if (arg) msg = parsenum(&arg);
+ if (!arg) prot_printf(popd_out, "-ERR Missing argument\r\n");
+ else {
+ lines = parsenum(&arg);
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else if (msg < 1 || msg > popd_exists ||
+ popd_msg[msg].deleted) {
+ prot_printf(popd_out, "-ERR No such message\r\n");
+ }
+ else if (lines < 0) {
+ prot_printf(popd_out, "-ERR Invalid number of lines\r\n");
+ }
+ else {
+ blat(msg, lines);
+ }
+ }
+ }
+ else if (!strcmp(inputbuf, "uidl")) {
+ if (arg) {
+ msg = parsenum(&arg);
+ if (arg) {
+ prot_printf(popd_out, "-ERR Unexpected extra argument\r\n");
+ }
+ else if (msg < 1 || msg > popd_exists ||
+ popd_msg[msg].deleted) {
+ prot_printf(popd_out, "-ERR No such message\r\n");
+ }
+ else if (mboxstruct.options & OPT_POP3_NEW_UIDL) {
+ prot_printf(popd_out, "+OK %u %lu.%u\r\n", msg,
+ mboxstruct.uidvalidity,
+ popd_msg[msg].uid);
+ }
+ else {
+ /* old uidl format */
+ prot_printf(popd_out, "+OK %u %u\r\n",
+ msg, popd_msg[msg].uid);
+ }
+ }
+ else {
+ prot_printf(popd_out, "+OK unique-id listing follows\r\n");
+ for (msg = 1; msg <= popd_exists; msg++) {
+ if (!popd_msg[msg].deleted) {
+ if (mboxstruct.options & OPT_POP3_NEW_UIDL) {
+ prot_printf(popd_out, "%u %lu.%u\r\n", msg,
+ mboxstruct.uidvalidity,
+ popd_msg[msg].uid);
+ } else {
+ prot_printf(popd_out, "%u %u\r\n", msg,
+ popd_msg[msg].uid);
+ }
+ }
+ }
+ prot_printf(popd_out, ".\r\n");
+ }
+ }
+ else {
+ prot_printf(popd_out, "-ERR Unrecognized command\r\n");
+ }
+ }
+}
+
+#ifdef HAVE_SSL
+static void cmd_starttls(int pop3s)
+{
+ int result;
+ int *layerp;
+ sasl_ssf_t ssf;
+ char *auth_id;
+
+ /* SASL and openssl have different ideas about whether ssf is signed */
+ layerp = (int *) &ssf;
+
+ if (popd_starttls_done == 1)
+ {
+ prot_printf(popd_out, "-ERR %s\r\n",
+ "Already successfully executed STLS");
+ return;
+ }
+
+ result=tls_init_serverengine("pop3",
+ 5, /* depth to verify */
+ !pop3s, /* can client auth? */
+ !pop3s); /* TLS only? */
+
+ if (result == -1) {
+
+ syslog(LOG_ERR, "[pop3d] error initializing TLS");
+
+ if (pop3s == 0)
+ prot_printf(popd_out, "-ERR [SYS/PERM] %s\r\n", "Error initializing TLS");
+ else
+ fatal("tls_init() failed",EC_TEMPFAIL);
+
+ return;
+ }
+
+ if (pop3s == 0)
+ {
+ prot_printf(popd_out, "+OK %s\r\n", "Begin TLS negotiation now");
+ /* must flush our buffers before starting tls */
+ prot_flush(popd_out);
+ }
+
+ result=tls_start_servertls(0, /* read */
+ 1, /* write */
+ layerp,
+ &auth_id,
+ &tls_conn);
+
+ /* if error */
+ if (result==-1) {
+ if (pop3s == 0) {
+ prot_printf(popd_out, "-ERR [SYS/PERM] Starttls failed\r\n");
+ syslog(LOG_NOTICE, "[pop3d] STARTTLS failed: %s", popd_clienthost);
+ } else {
+ syslog(LOG_NOTICE, "pop3s failed: %s", popd_clienthost);
+ fatal("tls_start_servertls() failed", EC_TEMPFAIL);
+ }
+ return;
+ }
+
+ /* tell SASL about the negotiated layer */
+ result = sasl_setprop(popd_saslconn, SASL_SSF_EXTERNAL, &ssf);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ saslprops.ssf = ssf;
+
+ result = sasl_setprop(popd_saslconn, SASL_AUTH_EXTERNAL, auth_id);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ if(auth_id)
+ saslprops.authid = xstrdup(auth_id);
+
+ /* tell the prot layer about our new layers */
+ prot_settls(popd_in, tls_conn);
+ prot_settls(popd_out, tls_conn);
+
+ popd_starttls_done = 1;
+}
+#else
+static void cmd_starttls(int pop3s __attribute__((unused)))
+{
+ fatal("cmd_starttls() called, but no OpenSSL", EC_SOFTWARE);
+}
+#endif /* HAVE_SSL */
+
+static void cmd_apop(char *response)
+{
+ int sasl_result;
+ char *canon_user;
+
+ assert(response != NULL);
+
+ if (popd_userid) {
+ prot_printf(popd_out, "-ERR [AUTH] Must give PASS command\r\n");
+ return;
+ }
+
+ sasl_result = sasl_checkapop(popd_saslconn,
+ popd_apop_chal,
+ strlen(popd_apop_chal),
+ response,
+ strlen(response));
+
+ /* failed authentication */
+ if (sasl_result != SASL_OK)
+ {
+ syslog(LOG_NOTICE, "badlogin: %s APOP (%s) %s",
+ popd_clienthost, popd_apop_chal,
+ sasl_errdetail(popd_saslconn));
+
+ sleep(3);
+
+ /* Don't allow user probing */
+ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
+
+ prot_printf(popd_out, "-ERR [AUTH] authenticating: %s\r\n",
+ sasl_errstring(sasl_result, NULL, NULL));
+
+ if (popd_subfolder) {
+ free(popd_subfolder);
+ popd_subfolder = 0;
+ }
+ return;
+ }
+
+ /* successful authentication */
+
+ /*
+ * get the userid from SASL --- already canonicalized from
+ * mysasl_proxy_policy()
+ */
+ sasl_result = sasl_getprop(popd_saslconn, SASL_USERNAME,
+ (const void **) &canon_user);
+ popd_userid = xstrdup(canon_user);
+ if (sasl_result != SASL_OK) {
+ prot_printf(popd_out,
+ "-ERR [AUTH] weird SASL error %d getting SASL_USERNAME\r\n",
+ sasl_result);
+ if (popd_subfolder) {
+ free(popd_subfolder);
+ popd_subfolder = 0;
+ }
+ return;
+ }
+
+ syslog(LOG_NOTICE, "login: %s %s%s APOP%s %s", popd_clienthost,
+ popd_userid, popd_subfolder ? popd_subfolder : "",
+ popd_starttls_done ? "+TLS" : "", "User logged in");
+
+ popd_authstate = auth_newstate(popd_userid);
+
+ openinbox();
+}
+
+void cmd_user(char *user)
+{
+ char userbuf[MAX_MAILBOX_NAME+1], *dot, *domain;
+ unsigned userlen;
+
+ /* possibly disallow USER */
+ if (!(kflag || popd_starttls_done ||
+ config_getswitch(IMAPOPT_ALLOWPLAINTEXT))) {
+ prot_printf(popd_out,
+ "-ERR [AUTH] USER command only available under a layer\r\n");
+ return;
+ }
+
+ if (popd_userid) {
+ prot_printf(popd_out, "-ERR [AUTH] Must give PASS command\r\n");
+ return;
+ }
+
+ if (popd_canon_user(popd_saslconn, NULL, user, 0,
+ SASL_CU_AUTHID | SASL_CU_AUTHZID,
+ NULL, userbuf, sizeof(userbuf), &userlen) ||
+ /* '.' isn't allowed if '.' is the hierarchy separator */
+ (popd_namespace.hier_sep == '.' && (dot = strchr(userbuf, '.')) &&
+ !(config_virtdomains && /* allow '.' in dom.ain */
+ (domain = strchr(userbuf, '@')) && (dot > domain))) ||
+ strlen(userbuf) + 6 > MAX_MAILBOX_NAME) {
+ prot_printf(popd_out, "-ERR [AUTH] Invalid user\r\n");
+ syslog(LOG_NOTICE,
+ "badlogin: %s plaintext %s invalid user",
+ popd_clienthost, beautify_string(user));
+ }
+ else {
+ popd_userid = xstrdup(userbuf);
+ prot_printf(popd_out, "+OK Name is a valid mailbox\r\n");
+ }
+}
+
+void cmd_pass(char *pass)
+{
+ int plaintextloginpause;
+
+ if (!popd_userid) {
+ prot_printf(popd_out, "-ERR [AUTH] Must give USER command\r\n");
+ return;
+ }
+
+#ifdef HAVE_KRB
+ if (kflag) {
+ if (strcmp(popd_userid, kdata.pname) != 0 ||
+ kdata.pinst[0] ||
+ strcmp(klrealm, kdata.prealm) != 0) {
+ prot_printf(popd_out, "-ERR [AUTH] Invalid login\r\n");
+ syslog(LOG_NOTICE,
+ "badlogin: %s kpop %s %s%s%s@%s access denied",
+ popd_clienthost, popd_userid,
+ kdata.pname, kdata.pinst[0] ? "." : "",
+ kdata.pinst, kdata.prealm);
+ return;
+ }
+
+ syslog(LOG_NOTICE, "login: %s %s kpop", popd_clienthost, popd_userid);
+
+ openinbox();
+ return;
+ }
+#endif
+
+ if (!strcmp(popd_userid, "anonymous")) {
+ if (config_getswitch(IMAPOPT_ALLOWANONYMOUSLOGIN)) {
+ pass = beautify_string(pass);
+ if (strlen(pass) > 500) pass[500] = '\0';
+ syslog(LOG_NOTICE, "login: %s anonymous %s",
+ popd_clienthost, pass);
+ }
+ else {
+ syslog(LOG_NOTICE, "badlogin: %s anonymous login refused",
+ popd_clienthost);
+ prot_printf(popd_out, "-ERR [AUTH] Invalid login\r\n");
+ return;
+ }
+ }
+ else if (sasl_checkpass(popd_saslconn,
+ popd_userid,
+ strlen(popd_userid),
+ pass,
+ strlen(pass))!=SASL_OK) {
+ syslog(LOG_NOTICE, "badlogin: %s plaintext %s %s",
+ popd_clienthost, popd_userid, sasl_errdetail(popd_saslconn));
+ sleep(3);
+ prot_printf(popd_out, "-ERR [AUTH] Invalid login\r\n");
+ free(popd_userid);
+ popd_userid = 0;
+ if (popd_subfolder) {
+ free(popd_subfolder);
+ popd_subfolder = 0;
+ }
+ return;
+ }
+ else {
+ syslog(LOG_NOTICE, "login: %s %s%s plaintext%s %s", popd_clienthost,
+ popd_userid, popd_subfolder ? popd_subfolder : "",
+ popd_starttls_done ? "+TLS" : "", "User logged in");
+
+ if ((plaintextloginpause = config_getint(IMAPOPT_PLAINTEXTLOGINPAUSE))
+ != 0) {
+ sleep(plaintextloginpause);
+ }
+ }
+
+ popd_authstate = auth_newstate(popd_userid);
+
+ openinbox();
+}
+
+/* Handle the POP3 Extension extension.
+ */
+void cmd_capa()
+{
+ int minpoll = config_getint(IMAPOPT_POPMINPOLL) * 60;
+ int expire = config_getint(IMAPOPT_POPEXPIRETIME);
+ int mechcount;
+ const char *mechlist;
+
+ prot_printf(popd_out, "+OK List of capabilities follows\r\n");
+
+ /* SASL special case: print SASL, then a list of supported capabilities */
+ if (!popd_mailbox && !backend &&
+ sasl_listmech(popd_saslconn,
+ NULL, /* should be id string */
+ "SASL ", " ", "\r\n",
+ &mechlist,
+ NULL, &mechcount) == SASL_OK && mechcount > 0) {
+ prot_write(popd_out, mechlist, strlen(mechlist));
+ }
+
+ if (tls_enabled() && !popd_starttls_done && !popd_mailbox && !backend) {
+ prot_printf(popd_out, "STLS\r\n");
+ }
+ if (expire < 0) {
+ prot_printf(popd_out, "EXPIRE NEVER\r\n");
+ } else {
+ prot_printf(popd_out, "EXPIRE %d\r\n", expire);
+ }
+
+ prot_printf(popd_out, "LOGIN-DELAY %d\r\n", minpoll);
+ prot_printf(popd_out, "TOP\r\n");
+ prot_printf(popd_out, "UIDL\r\n");
+ prot_printf(popd_out, "PIPELINING\r\n");
+ prot_printf(popd_out, "RESP-CODES\r\n");
+ prot_printf(popd_out, "AUTH-RESP-CODE\r\n");
+
+ if (!popd_mailbox && !backend &&
+ (kflag || popd_starttls_done
+ || config_getswitch(IMAPOPT_ALLOWPLAINTEXT))) {
+ prot_printf(popd_out, "USER\r\n");
+ }
+
+ prot_printf(popd_out,
+ "IMPLEMENTATION Cyrus POP3%s server %s\r\n",
+ config_mupdate_server ? " Murder" : "", CYRUS_VERSION);
+
+ prot_printf(popd_out, ".\r\n");
+ prot_flush(popd_out);
+}
+
+
+void cmd_auth(char *arg)
+{
+ int r, sasl_result;
+ char *authtype;
+ char *canon_user;
+
+ /* if client didn't specify an argument we give them the list
+ *
+ * XXX This method of mechanism discovery is an undocumented feature
+ * that appeared in draft-myers-sasl-pop3 and is still used by
+ * some clients.
+ */
+ if (!arg) {
+ const char *sasllist;
+ int mechnum;
+
+ prot_printf(popd_out, "+OK List of supported mechanisms follows\r\n");
+
+ /* CRLF separated, dot terminated */
+ if (sasl_listmech(popd_saslconn, NULL,
+ "", "\r\n", "\r\n",
+ &sasllist,
+ NULL, &mechnum) == SASL_OK) {
+ if (mechnum>0) {
+ prot_printf(popd_out,"%s",sasllist);
+ }
+ }
+
+ prot_printf(popd_out, ".\r\n");
+ return;
+ }
+
+ authtype = arg;
+
+ /* according to RFC 2449, since we advertise the "SASL" capability, we
+ * must accept an optional second argument as an initial client
+ * response (base64 encoded!).
+ */
+ while (*arg && !isspace((int) *arg)) {
+ arg++;
+ }
+ if (isspace((int) *arg)) {
+ /* null terminate authtype, get argument */
+ *arg++ = '\0';
+ } else {
+ /* no optional client response */
+ arg = NULL;
+ }
+
+ r = saslserver(popd_saslconn, authtype, arg, "", "+ ", "",
+ popd_in, popd_out, &sasl_result, NULL);
+
+ if (r) {
+ const char *errorstring = NULL;
+
+ switch (r) {
+ case IMAP_SASL_CANCEL:
+ prot_printf(popd_out,
+ "-ERR [AUTH] Client canceled authentication\r\n");
+ break;
+ case IMAP_SASL_PROTERR:
+ errorstring = prot_error(popd_in);
+
+ prot_printf(popd_out,
+ "-ERR [AUTH] Error reading client response: %s\r\n",
+ errorstring ? errorstring : "");
+ break;
+ default:
+ /* failed authentication */
+ if (authtype) {
+ syslog(LOG_NOTICE, "badlogin: %s %s %s",
+ popd_clienthost, authtype,
+ sasl_errstring(sasl_result, NULL, NULL));
+ } else {
+ syslog(LOG_NOTICE, "badlogin: %s %s",
+ popd_clienthost, authtype);
+ }
+
+ sleep(3);
+
+ /* Don't allow user probing */
+ if (sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH;
+
+ prot_printf(popd_out, "-ERR [AUTH] authenticating: %s\r\n",
+ sasl_errstring(sasl_result, NULL, NULL));
+ }
+
+ if (popd_subfolder) {
+ free(popd_subfolder);
+ popd_subfolder = 0;
+ }
+ reset_saslconn(&popd_saslconn);
+ return;
+ }
+
+ /* successful authentication */
+
+ /* get the userid from SASL --- already canonicalized from
+ * mysasl_proxy_policy()
+ */
+ sasl_result = sasl_getprop(popd_saslconn, SASL_USERNAME,
+ (const void **) &canon_user);
+ if (sasl_result != SASL_OK) {
+ prot_printf(popd_out,
+ "-ERR [AUTH] weird SASL error %d getting SASL_USERNAME\r\n",
+ sasl_result);
+ return;
+ }
+
+ /* If we're proxying, the authzid may contain a subfolder,
+ so re-canonify it */
+ if (config_getswitch(IMAPOPT_POPSUBFOLDERS) && strchr(canon_user, '+')) {
+ char userbuf[MAX_MAILBOX_NAME+1];
+ unsigned userlen;
+
+ sasl_result = popd_canon_user(popd_saslconn, NULL, canon_user, 0,
+ SASL_CU_AUTHID | SASL_CU_AUTHZID,
+ NULL, userbuf, sizeof(userbuf), &userlen);
+ if (sasl_result != SASL_OK) {
+ prot_printf(popd_out,
+ "-ERR [AUTH] SASL canonification error %d\r\n",
+ sasl_result);
+ return;
+ }
+
+ popd_userid = xstrdup(userbuf);
+ } else {
+ popd_userid = xstrdup(canon_user);
+ }
+ syslog(LOG_NOTICE, "login: %s %s%s %s%s %s", popd_clienthost,
+ popd_userid, popd_subfolder ? popd_subfolder : "",
+ authtype, popd_starttls_done ? "+TLS" : "", "User logged in");
+
+ if (!openinbox()) {
+ prot_setsasl(popd_in, popd_saslconn);
+ prot_setsasl(popd_out, popd_saslconn);
+ }
+ else {
+ reset_saslconn(&popd_saslconn);
+ }
+}
+
+/*
+ * Complete the login process by opening and locking the user's inbox
+ */
+int openinbox(void)
+{
+ char userid[MAX_MAILBOX_NAME+1], inboxname[MAX_MAILBOX_PATH+1];
+ char extname[MAX_MAILBOX_NAME+1] = "INBOX";
+ int type, myrights = 0;
+ char *server = NULL, *acl;
+ int r, log_level = LOG_ERR;
+ const char *statusline = NULL;
+
+ /* Translate any separators in userid
+ (use a copy since we need the original userid for AUTH to backend) */
+ strlcpy(userid, popd_userid, sizeof(userid));
+ mboxname_hiersep_tointernal(&popd_namespace, userid,
+ config_virtdomains ?
+ strcspn(userid, "@") : 0);
+
+ /* Create the mailbox that we're trying to access */
+ if (popd_subfolder && popd_subfolder[1]) {
+ snprintf(extname+5, sizeof(extname)-5, "%c%s",
+ popd_namespace.hier_sep, popd_subfolder+1);
+ }
+ r = (*popd_namespace.mboxname_tointernal)(&popd_namespace, extname,
+ userid, inboxname);
+
+ if (!r) r = mboxlist_detail(inboxname, &type, NULL, NULL,
+ &server, &acl, NULL);
+ if (!r && (config_popuseacl = config_getswitch(IMAPOPT_POPUSEACL)) &&
+ (!acl ||
+ !((myrights = cyrus_acl_myrights(popd_authstate, acl)) & ACL_READ))) {
+ r = (myrights & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ log_level = LOG_INFO;
+ }
+ if (r) {
+ sleep(3);
+ syslog(log_level, "Unable to locate maildrop %s: %s",
+ inboxname, error_message(r));
+ prot_printf(popd_out,
+ "-ERR [SYS/PERM] Unable to locate maildrop: %s\r\n",
+ error_message(r));
+ goto fail;
+ }
+
+ if (type & MBTYPE_REMOTE) {
+ /* remote mailbox */
+
+ /* xxx hide the fact that we are storing partitions */
+ if (server) {
+ char *c;
+ c = strchr(server, '!');
+ if(c) *c = '\0';
+ }
+
+ /* Make a working copy of userid in case we need to alter it */
+ strlcpy(userid, popd_userid, sizeof(userid));
+
+ if (popd_subfolder) {
+ /* Add the subfolder back to the userid for proxying */
+ size_t n = strlen(popd_subfolder);
+ char *p = (config_virtdomains && (p = strchr(userid, '@'))) ?
+ p : userid + strlen(userid);
+ memmove(p+n, p, strlen(p)+1);
+ memcpy(p, popd_subfolder, n);
+ }
+
+ backend = backend_connect(NULL, server, &protocol[PROTOCOL_POP3],
+ userid, NULL, &statusline);
+
+ if (!backend) {
+ syslog(LOG_ERR, "couldn't authenticate to backend server");
+ prot_printf(popd_out, "-ERR%s",
+ statusline ? statusline :
+ " Authentication to backend server failed\r\n");
+ prot_flush(popd_out);
+
+ goto fail;
+ }
+ }
+ else {
+ /* local mailbox */
+ int msg;
+ struct index_record record;
+ int minpoll;
+ int doclose = 0;
+
+ popd_login_time = time(0);
+
+ r = mailbox_open_header(inboxname, popd_authstate, &mboxstruct);
+ if (!r) {
+ doclose = 1;
+ if (config_popuseacl && !(mboxstruct.myrights & ACL_READ)) {
+ r = (mboxstruct.myrights & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ log_level = LOG_INFO;
+ }
+ }
+ if (r) {
+ sleep(3);
+ syslog(log_level, "Unable to open maildrop %s: %s",
+ inboxname, error_message(r));
+ prot_printf(popd_out,
+ "-ERR [SYS/PERM] Unable to open maildrop: %s\r\n",
+ error_message(r));
+ if (doclose) mailbox_close(&mboxstruct);
+ goto fail;
+ }
+
+ r = mailbox_open_index(&mboxstruct);
+ if (!r) r = mailbox_lock_pop(&mboxstruct);
+ if (r) {
+ mailbox_close(&mboxstruct);
+ syslog(LOG_ERR, "Unable to lock maildrop %s: %s",
+ inboxname, error_message(r));
+ prot_printf(popd_out,
+ "-ERR [IN-USE] Unable to lock maildrop: %s\r\n",
+ error_message(r));
+ goto fail;
+ }
+
+ if ((minpoll = config_getint(IMAPOPT_POPMINPOLL)) &&
+ mboxstruct.pop3_last_login + 60*minpoll > popd_login_time) {
+ prot_printf(popd_out,
+ "-ERR [LOGIN-DELAY] Logins must be at least %d minute%s apart\r\n",
+ minpoll, minpoll > 1 ? "s" : "");
+ if (!mailbox_lock_index(&mboxstruct)) {
+ mboxstruct.pop3_last_login = popd_login_time;
+ mailbox_write_index_header(&mboxstruct);
+ }
+ mailbox_close(&mboxstruct);
+ goto fail;
+ }
+
+ if (!r) {
+ popd_exists = mboxstruct.exists;
+ popd_msg = (struct msg *) xrealloc(popd_msg, (popd_exists+1) *
+ sizeof(struct msg));
+ for (msg = 1; msg <= popd_exists; msg++) {
+ if ((r = mailbox_read_index_record(&mboxstruct, msg, &record))!=0)
+ break;
+ popd_msg[msg].uid = record.uid;
+ popd_msg[msg].size = record.size;
+ popd_msg[msg].deleted = 0;
+ }
+ }
+ if (r) {
+ mailbox_close(&mboxstruct);
+ popd_exists = 0;
+ syslog(LOG_ERR, "Unable to read maildrop %s", inboxname);
+ prot_printf(popd_out,
+ "-ERR [SYS/PERM] Unable to read maildrop\r\n");
+ goto fail;
+ }
+ popd_mailbox = &mboxstruct;
+ proc_register("pop3d", popd_clienthost, popd_userid,
+ popd_mailbox->name);
+ }
+
+ /* Create telemetry log */
+ popd_logfd = telemetry_log(popd_userid, popd_in, popd_out, 0);
+
+ prot_printf(popd_out, "+OK%s",
+ statusline ? statusline : " Mailbox locked and ready\r\n");
+ prot_flush(popd_out);
+ return 0;
+
+ fail:
+ free(popd_userid);
+ popd_userid = 0;
+ if (popd_subfolder) {
+ free(popd_subfolder);
+ popd_subfolder = 0;
+ }
+ auth_freestate(popd_authstate);
+ popd_authstate = NULL;
+ return 1;
+}
+
+static void blat(int msg,int lines)
+{
+ FILE *msgfile;
+ char buf[4096];
+ char fnamebuf[MAILBOX_FNAME_LEN];
+ int thisline = -2;
+
+ strlcpy(fnamebuf, popd_mailbox->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, "/", sizeof(fnamebuf));
+ mailbox_message_get_fname(popd_mailbox, popd_msg[msg].uid,
+ fnamebuf + strlen(fnamebuf),
+ sizeof(fnamebuf) - strlen(fnamebuf));
+ msgfile = fopen(fnamebuf, "r");
+ if (!msgfile) {
+ prot_printf(popd_out, "-ERR [SYS/PERM] Could not read message file\r\n");
+ return;
+ }
+ prot_printf(popd_out, "+OK Message follows\r\n");
+ while (lines != thisline) {
+ if (!fgets(buf, sizeof(buf), msgfile)) break;
+
+ if (thisline < 0) {
+ if (buf[0] == '\r' && buf[1] == '\n') thisline = 0;
+ }
+ else thisline++;
+
+ if (buf[0] == '.') prot_putc('.', popd_out);
+ do {
+ prot_printf(popd_out, "%s", buf);
+ }
+ while (buf[strlen(buf)-1] != '\n' && fgets(buf, sizeof(buf), msgfile));
+ }
+ fclose(msgfile);
+
+ /* Protect against messages not ending in CRLF */
+ if (buf[strlen(buf)-1] != '\n') prot_printf(popd_out, "\r\n");
+
+ prot_printf(popd_out, ".\r\n");
+
+ /* Reset inactivity timer in case we spend a long time
+ pushing data to the client over a slow link. */
+ prot_resettimeout(popd_in);
+}
+
+static int parsenum(char **ptr)
+{
+ char *p = *ptr;
+ int result = 0;
+
+ if (!isdigit((int) *p)) {
+ *ptr = 0;
+ return -1;
+ }
+ while (*p && isdigit((int) *p)) {
+ result = result * 10 + *p++ - '0';
+ if (result < 0) {
+ /* xxx overflow */
+ }
+ }
+
+ if (*p) {
+ while (*p && isspace((int) *p)) p++;
+ *ptr = p;
+ }
+ else *ptr = 0;
+ return result;
+}
+
+static int expungedeleted(struct mailbox *mailbox __attribute__((unused)),
+ void *rock __attribute__((unused)), char *index,
+ int expunge_flags __attribute__((unused)))
+{
+ int msg;
+ int uid = ntohl(*((bit32 *)(index+OFFSET_UID)));
+
+ for (msg = 1; msg <= popd_exists; msg++) {
+ if (popd_msg[msg].uid == uid) {
+ return popd_msg[msg].deleted;
+ }
+ }
+ return 0;
+}
+
+/* Reset the given sasl_conn_t to a sane state */
+static int reset_saslconn(sasl_conn_t **conn)
+{
+ int ret;
+ sasl_security_properties_t *secprops = NULL;
+
+ sasl_dispose(conn);
+ /* do initialization typical of service_main */
+ ret = sasl_server_new("pop", config_servername,
+ NULL, NULL, NULL,
+ NULL, 0, conn);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.ipremoteport)
+ ret = sasl_setprop(*conn, SASL_IPREMOTEPORT,
+ saslprops.ipremoteport);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.iplocalport)
+ ret = sasl_setprop(*conn, SASL_IPLOCALPORT,
+ saslprops.iplocalport);
+ if(ret != SASL_OK) return ret;
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ ret = sasl_setprop(*conn, SASL_SEC_PROPS, secprops);
+ if(ret != SASL_OK) return ret;
+ /* end of service_main initialization excepting SSF */
+
+ /* If we have TLS/SSL info, set it */
+ if(saslprops.ssf) {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &saslprops.ssf);
+ } else {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &extprops_ssf);
+ }
+
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.authid) {
+ ret = sasl_setprop(*conn, SASL_AUTH_EXTERNAL, saslprops.authid);
+ if(ret != SASL_OK) return ret;
+ }
+ /* End TLS/SSL Info */
+
+ return SASL_OK;
+}
+
+/* we've authenticated the client, we've connected to the backend.
+ now it's all up to them */
+static void bitpipe(void)
+{
+ struct protgroup *protin = protgroup_new(2);
+ int shutdown = 0;
+ char buf[4096];
+
+ protgroup_insert(protin, popd_in);
+ protgroup_insert(protin, backend->in);
+
+ do {
+ /* Flush any buffered output */
+ prot_flush(popd_out);
+ prot_flush(backend->out);
+
+ /* check for shutdown file */
+ if (shutdown_file(buf, sizeof(buf))) {
+ shutdown = 1;
+ goto done;
+ }
+ } while (!proxy_check_input(protin, popd_in, popd_out,
+ backend->in, backend->out, 0));
+
+ done:
+ /* ok, we're done. */
+ protgroup_free(protin);
+
+ if (shutdown) {
+ char *p;
+ for (p = buf; *p == '['; p++); /* can't have [ be first char */
+ prot_printf(popd_out, "-ERR [SYS/TEMP] %s\r\n", p);
+ shut_down(0);
+ }
+
+ return;
+}
+
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for POP3!",
+ EC_SOFTWARE);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proc.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proc.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proc.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proc.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,113 @@
+/* proc.c -- Server process registry
+ $Id: proc.c,v 1.25 2003/10/22 18:50:08 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+#include <config.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <syslog.h>
+#include <string.h>
+
+#include "global.h"
+#include "exitcodes.h"
+#include "xmalloc.h"
+
+#define FNAME_PROCDIR "/proc/"
+
+static char *procfname = 0;
+static FILE *procfile = 0;
+
+extern void setproctitle_init(int argc, char **argv, char **envp);
+extern void setproctitle(const char *fmt, ...);
+
+int proc_register(progname, clienthost, userid, mailbox)
+const char *progname;
+const char *clienthost;
+const char *userid;
+const char *mailbox;
+{
+ unsigned pid;
+
+ if (!procfname) {
+ pid = getpid();
+
+ procfname = xmalloc(strlen(config_dir)+sizeof(FNAME_PROCDIR)+10);
+ sprintf(procfname, "%s%s%u", config_dir, FNAME_PROCDIR, pid);
+
+ procfile = fopen(procfname, "w+");
+ if (!procfile) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", procfname);
+ fatal("can't write proc file", EC_IOERR);
+ }
+ }
+
+ rewind(procfile);
+ fprintf(procfile, "%s", clienthost);
+ if (userid) {
+ fprintf(procfile, "\t%s", userid);
+ if (mailbox) {
+ fprintf(procfile, "\t%s", mailbox);
+ }
+ }
+ putc('\n', procfile);
+ fflush(procfile);
+ ftruncate(fileno(procfile), ftell(procfile));
+
+ setproctitle("%s: %s %s %s", progname, clienthost,
+ userid ? userid : "",
+ mailbox ? mailbox : "");
+
+ return 0;
+}
+
+void proc_cleanup(void)
+{
+ if (procfname) {
+ fclose(procfile);
+ unlink(procfname);
+ free(procfname);
+ procfname = NULL;
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,184 @@
+/* protocol.c -- client-side protocol abstraction
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: protocol.c,v 1.2.2.13 2006/06/27 15:58:42 murch Exp $ */
+
+#include <config.h>
+
+#include <ctype.h>
+#include <string.h>
+#include <limits.h>
+
+#include "protocol.h"
+#include "xmalloc.h"
+
+static char *imap_parsemechlist(const char *str, struct protocol_t *prot)
+{
+ char *ret = xzmalloc(strlen(str)+1);
+ char *tmp;
+ int num = 0;
+
+ if (strstr(str, "SASL-IR")) {
+ /* server supports initial response in AUTHENTICATE command */
+ prot->sasl_cmd.maxlen = INT_MAX;
+ }
+
+ while ((tmp = strstr(str, "AUTH="))) {
+ char *end = (tmp += 5);
+
+ while((*end != ' ') && (*end != '\0')) end++;
+
+ /* add entry to list */
+ if (num++ > 0) strcat(ret, " ");
+ strlcat(ret, tmp, strlen(ret) + (end - tmp) + 1);
+
+ /* reset the string */
+ str = end + 1;
+ }
+
+ return ret;
+}
+
+static char *nntp_parsesuccess(char *str, const char **status)
+{
+ char *success = NULL;
+
+ if (!strncmp(str, "283 ", 4)) {
+ success = str+4;
+ }
+
+ if (status) *status = NULL;
+ return success;
+}
+
+static char *sieve_parsesuccess(char *str, const char **status)
+{
+ char *success = NULL, *tmp;
+
+ if (!strncmp(str, "OK (", 4) &&
+ (tmp = strstr(str+4, "SASL \"")) != NULL) {
+ success = tmp+6; /* skip SASL " */
+ tmp = strstr(success, "\"");
+ *tmp = '\0'; /* clip " */
+ }
+
+ if (status) *status = NULL;
+ return success;
+}
+
+struct protocol_t protocol[] = {
+ { "imap", "imap",
+ { 0, "* OK" },
+ { "C01 CAPABILITY", "C01 ", &imap_parsemechlist,
+ { { " AUTH=", CAPA_AUTH },
+ { " STARTTLS", CAPA_STARTTLS },
+ { " IDLE", CAPA_IDLE },
+ { " MUPDATE", CAPA_MUPDATE },
+ { " MULTIAPPEND", CAPA_MULTIAPPEND },
+ { " LIST-SUBSCRIBED", CAPA_LISTSUBSCRIBED },
+ { NULL, 0 } } },
+ { "S01 STARTTLS", "S01 OK", "S01 NO" },
+ { "A01 AUTHENTICATE", 0, 0, "A01 OK", "A01 NO", "+ ", "*", NULL },
+ { "N01 NOOP", "* ", "N01 OK" },
+ { "Q01 LOGOUT", "* ", "Q01 " } },
+ { "pop3", "pop",
+ { 0, "+OK " },
+ { "CAPA", ".", NULL,
+ { { "SASL ", CAPA_AUTH },
+ { "STLS", CAPA_STARTTLS },
+ { NULL, 0 } } },
+ { "STLS", "+OK", "-ERR" },
+ { "AUTH", 255, 0, "+OK", "-ERR", "+ ", "*", NULL },
+ { "NOOP", NULL, "+OK" },
+ { "QUIT", NULL, "+OK" } },
+ { "nntp", "nntp",
+ { 0, "20" },
+ { "CAPABILITIES", ".", NULL,
+ { { "SASL ", CAPA_AUTH },
+ { "STARTTLS", CAPA_STARTTLS },
+ { NULL, 0 } } },
+ { "STARTTLS", "382", "580" },
+ { "AUTHINFO SASL", 512, 0, "28", "48", "383 ", "*", &nntp_parsesuccess },
+ { "DATE", NULL, "111" },
+ { "QUIT", NULL, "205" } },
+ { "lmtp", "lmtp",
+ { 0, "220 " },
+ { "LHLO murder", "250 ", NULL,
+ { { "AUTH ", CAPA_AUTH },
+ { "STARTTLS", CAPA_STARTTLS },
+ { "PIPELINING", CAPA_PIPELINING },
+ { "IGNOREQUOTA", CAPA_IGNOREQUOTA },
+ { NULL, 0 } } },
+ { "STARTTLS", "220", "454" },
+ { "AUTH", 512, 0, "235", "5", "334 ", "*", NULL },
+ { "NOOP", NULL, "250" },
+ { "QUIT", NULL, "221" } },
+ { "mupdate", "mupdate",
+ { 1, "* OK" },
+ { NULL, "* OK", NULL,
+ { { "* AUTH ", CAPA_AUTH },
+ { "* STARTTLS", CAPA_STARTTLS },
+ { NULL, 0 } } },
+ { "S01 STARTTLS", "S01 OK", "S01 NO" },
+ { "A01 AUTHENTICATE", INT_MAX, 1, "A01 OK", "A01 NO", "", "*", NULL },
+ { "N01 NOOP", NULL, "N01 OK" },
+ { "Q01 LOGOUT", NULL, "Q01 " } },
+ { "sieve", SIEVE_SERVICE_NAME,
+ { 1, "OK" },
+ { "CAPABILITY", "OK", NULL,
+ { { "\"SASL\" ", CAPA_AUTH },
+ { "\"STARTTLS\"", CAPA_STARTTLS },
+ { NULL, 0 } } },
+ { "STARTTLS", "OK", "NO" },
+ { "AUTHENTICATE", INT_MAX, 1, "OK", "NO", NULL, "*", &sieve_parsesuccess },
+ { NULL, NULL, NULL },
+ { "LOGOUT", NULL, "OK" } },
+ { "csync", "csync",
+ { 1, "* OK" },
+ { NULL, "* OK", NULL,
+ { { "* SASL ", CAPA_AUTH },
+ { "* STARTTLS", CAPA_STARTTLS },
+ { NULL, 0 } } },
+ { "STARTTLS", "OK", "NO" },
+ { "AUTHENTICATE", INT_MAX, 0, "OK", "NO", "+ ", "*", NULL },
+ { "NOOP", NULL, "OK" },
+ { "EXIT", NULL, "OK" } }
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/protocol.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,124 @@
+/* protocol.h -- client-side protocol abstraction
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: protocol.h,v 1.2.2.6 2006/06/27 15:58:42 murch Exp $ */
+
+#ifndef _INCLUDED_PROTOCOL_H
+#define _INCLUDED_PROTOCOL_H
+
+#include "saslclient.h"
+
+enum {
+ /* generic capabilities */
+ CAPA_AUTH = (1 << 0),
+ CAPA_STARTTLS = (1 << 1),
+
+ /* IMAP capabilities */
+ CAPA_IDLE = (1 << 2),
+ CAPA_MUPDATE = (1 << 3),
+ CAPA_MULTIAPPEND = (1 << 4),
+ CAPA_LISTSUBSCRIBED = (1 << 5),
+
+ /* LMTP capabilities */
+ CAPA_PIPELINING = (1 << 2),
+ CAPA_IGNOREQUOTA = (1 << 3)
+};
+
+#define MAX_CAPA 6
+
+struct capa_t {
+ const char *str;
+ unsigned long flag;
+};
+
+struct protocol_t;
+
+struct banner_t {
+ int is_capa; /* banner is capability response */
+ char *resp; /* end of banner response */
+};
+
+struct capa_cmd_t {
+ const char *cmd; /* [OPTIONAL] capability command string */
+ const char *resp; /* end of capability response */
+ char *(*parse_mechlist)(const char *str, struct protocol_t *prot);
+ /* [OPTIONAL] parse capability string,
+ returns space-separated list of mechs */
+ struct capa_t capa[MAX_CAPA+1];/* capabilities to parse for
+ (MUST end with NULL entry) */
+};
+
+struct tls_cmd_t {
+ const char *cmd; /* tls command string */
+ const char *ok; /* start tls prompt */
+ const char *fail; /* failure response */
+};
+
+struct simple_cmd_t {
+ const char *cmd; /* command string */
+ const char *unsol; /* unsolicited response */
+ const char *ok; /* success response */
+};
+
+struct protocol_t {
+ const char *service; /* INET service name */
+ const char *sasl_service; /* SASL service name */
+ struct banner_t banner;
+ struct capa_cmd_t capa_cmd;
+ struct tls_cmd_t tls_cmd;
+ struct sasl_cmd_t sasl_cmd;
+ struct simple_cmd_t ping_cmd;
+ struct simple_cmd_t logout_cmd;
+};
+
+extern struct protocol_t protocol[];
+
+enum {
+ PROTOCOL_IMAP = 0,
+ PROTOCOL_POP3,
+ PROTOCOL_NNTP,
+ PROTOCOL_LMTP,
+ PROTOCOL_MUPDATE,
+ PROTOCOL_SIEVE,
+ PROTOCOL_CSYNC
+};
+
+#endif /* _INCLUDED_PROTOCOL_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,288 @@
+/*
+ * proxy.c - proxy support functions
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * "This product includes software developed by Computing Services
+ * acknowledgment:
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: proxy.c,v 1.1.2.8 2006/02/10 21:10:58 murch Exp $
+ */
+
+#include <config.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <string.h>
+#include <syslog.h>
+#include <sys/un.h>
+
+#include "backend.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "imap_err.h"
+#include "mupdate-client.h"
+#include "prot.h"
+#include "proxy.h"
+#include "xmalloc.h"
+
+void proxy_adddest(struct dest **dlist, const char *rcpt, int rcpt_num,
+ char *server, const char *authas)
+{
+ struct dest *d;
+
+ /* see if we currently have a 'mailboxdata->server'/'authas'
+ combination. */
+ for (d = *dlist; d != NULL; d = d->next) {
+ if (!strcmp(d->server, server) &&
+ !strcmp(d->authas, authas ? authas : "")) break;
+ }
+
+ if (d == NULL) {
+ /* create a new one */
+ d = xmalloc(sizeof(struct dest));
+ strlcpy(d->server, server, sizeof(d->server));
+ strlcpy(d->authas, authas ? authas : "", sizeof(d->authas));
+ d->rnum = 0;
+ d->to = NULL;
+ d->next = *dlist;
+ *dlist = d;
+ }
+
+ if (rcpt) {
+ struct rcpt *new_rcpt = xmalloc(sizeof(struct rcpt));
+
+ strlcpy(new_rcpt->rcpt, rcpt, sizeof(new_rcpt->rcpt));
+ new_rcpt->rcpt_num = rcpt_num;
+
+ /* add rcpt to d */
+ d->rnum++;
+ new_rcpt->next = d->to;
+ d->to = new_rcpt;
+ }
+}
+
+void proxy_downserver(struct backend *s)
+{
+ if (!s || (s->sock == -1)) {
+ /* already disconnected */
+ return;
+ }
+
+ /* need to logout of server */
+ backend_disconnect(s);
+
+ /* clear any references to this backend */
+ if (s->inbox && (s == *(s->inbox))) *(s->inbox) = NULL;
+ if (s->current && (s == *(s->current))) *(s->current) = NULL;
+ s->inbox = s->current = NULL;
+
+ /* remove the timeout */
+ if (s->timeout) prot_removewaitevent(s->clientin, s->timeout);
+ s->timeout = NULL;
+ s->clientin = NULL;
+}
+
+static struct prot_waitevent *
+backend_timeout(struct protstream *s __attribute__((unused)),
+ struct prot_waitevent *ev, void *rock)
+{
+ struct backend *be = (struct backend *) rock;
+ int is_active = (be->context ? *((int *) be->context) : 0);
+
+ if ((be != *(be->current)) && !is_active) {
+ /* server is not our current server, and idle too long.
+ * down the backend server (removes the event as a side-effect)
+ */
+ proxy_downserver(be);
+ return NULL;
+ }
+ else {
+ /* it will timeout in IDLE_TIMEOUT seconds from now */
+ ev->mark = time(NULL) + IDLE_TIMEOUT;
+ return ev;
+ }
+}
+
+/* return the connection to the server */
+struct backend *
+proxy_findserver(const char *server, /* hostname of backend */
+ struct protocol_t *prot, /* protocol we're speaking */
+ const char *userid, /* proxy as userid (ext form)*/
+ struct backend ***cache, /* ptr to backend cache */
+ struct backend **current, /* ptr to current backend */
+ struct backend **inbox, /* ptr to inbox backend */
+ struct protstream *clientin) /* protstream from client to
+ proxy (if non-NULL a timeout
+ will be setup) */
+{
+ int i = 0;
+ struct backend *ret = NULL;
+
+ if (current && *current && !strcmp(server, (*current)->hostname)) {
+ /* this is our current backend */
+ return *current;
+ }
+
+ /* check if we already a connection to this backend */
+ while (cache && *cache && (*cache)[i]) {
+ if (!strcmp(server, ((*cache)[i])->hostname)) {
+ ret = (*cache)[i];
+ /* ping/noop the server */
+ if ((ret->sock != -1) && backend_ping(ret)) {
+ backend_disconnect(ret);
+ }
+ break;
+ }
+ i++;
+ }
+
+ if (!ret || (ret->sock == -1)) {
+ /* need to (re)establish connection to server or create one */
+ ret = backend_connect(ret, server, prot, userid, NULL, NULL);
+ if (!ret) return NULL;
+
+ if (clientin) {
+ /* add the timeout */
+ ret->clientin = clientin;
+ ret->timeout = prot_addwaitevent(clientin,
+ time(NULL) + IDLE_TIMEOUT,
+ backend_timeout, ret);
+
+ ret->timeout->mark = time(NULL) + IDLE_TIMEOUT;
+ }
+ }
+
+ ret->current = current;
+ ret->inbox = inbox;
+
+ /* insert server in list of cache connections */
+ if (cache && (!*cache || !(*cache)[i])) {
+ *cache = (struct backend **)
+ xrealloc(*cache, (i + 2) * sizeof(struct backend *));
+ (*cache)[i] = ret;
+ (*cache)[i + 1] = NULL;
+ }
+
+ return ret;
+}
+
+/*
+ * Check a protgroup for input.
+ *
+ * Input from serverin is sent to clientout.
+ * If serverout is non-NULL:
+ * - input from clientin is sent to serverout.
+ * - returns -1 if clientin or serverin closed, otherwise returns 0.
+ * If serverout is NULL:
+ * - returns 1 if input from clientin is pending, otherwise returns 0.
+ */
+int proxy_check_input(struct protgroup *protin,
+ struct protstream *clientin,
+ struct protstream *clientout,
+ struct protstream *serverin,
+ struct protstream *serverout,
+ unsigned long timeout_sec)
+{
+ struct protgroup *protout = NULL;
+ struct timeval timeout = { timeout_sec, 0 };
+ int n, ret = 0;
+
+ n = prot_select(protin, PROT_NO_FD, &protout, NULL,
+ timeout_sec ? &timeout : NULL);
+ if (n == -1 && errno != EINTR) {
+ syslog(LOG_ERR, "prot_select() failed in proxy_check_input(): %m");
+ fatal("prot_select() failed in proxy_check_input()", EC_TEMPFAIL);
+ }
+
+ if (n && protout) {
+ /* see who has input */
+ for (; n; n--) {
+ struct protstream *pin = protgroup_getelement(protout, n-1);
+ struct protstream *pout = NULL;
+
+ if (pin == clientin) {
+ /* input from client */
+ if (serverout) {
+ /* stream it to server */
+ pout = serverout;
+ } else {
+ /* notify the caller */
+ ret = 1;
+ }
+ }
+ else if (pin == serverin) {
+ /* input from server, stream it to client */
+ pout = clientout;
+ }
+ else {
+ /* XXX shouldn't get here !!! */
+ fatal("unknown protstream returned by prot_select in proxy_check_input()",
+ EC_SOFTWARE);
+ }
+
+ if (pout) {
+ const char *err;
+
+ do {
+ char buf[4096];
+ int c = prot_read(pin, buf, sizeof(buf));
+
+ if (c == 0 || c < 0) break;
+ prot_write(pout, buf, c);
+ } while (pin->cnt > 0);
+
+ if ((err = prot_error(pin)) != NULL) {
+ if (serverout && !strcmp(err, PROT_EOF_STRING)) {
+ /* we're pipelining, and the connection closed */
+ ret = -1;
+ }
+ else {
+ /* uh oh, we're not happy */
+ fatal("Lost connection to input stream",
+ EC_UNAVAILABLE);
+ }
+ }
+ }
+ }
+
+ protgroup_free(protout);
+ }
+
+ return ret;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/proxy.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+/*
+ * proxy.h - proxy support functions
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * "This product includes software developed by Computing Services
+ * acknowledgment:
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: proxy.h,v 1.1.2.7 2006/02/10 21:10:58 murch Exp $
+ */
+
+#ifndef _PROXY_H
+#define _PROXY_H
+
+#include "backend.h"
+#include "protocol.h"
+#include "prot.h"
+
+#define IDLE_TIMEOUT (5 * 60)
+
+/* a final destination for a message */
+struct rcpt {
+ char rcpt[MAX_MAILBOX_NAME+1]; /* where? */
+ int rcpt_num; /* credit this to who? */
+ struct rcpt *next;
+};
+
+struct dest {
+ char server[MAX_MAILBOX_NAME+1]; /* where? */
+ char authas[MAX_MAILBOX_NAME+1]; /* as who? */
+ int rnum; /* number of rcpts */
+ struct rcpt *to;
+ struct dest *next;
+};
+
+void proxy_adddest(struct dest **dlist, const char *rcpt, int rcpt_num,
+ char *server, const char *authas);
+
+struct backend *
+proxy_findserver(const char *server, struct protocol_t *prot,
+ const char *userid, struct backend ***cache,
+ struct backend **current, struct backend **inbox,
+ struct protstream *clientin);
+
+void proxy_downserver(struct backend *s);
+
+int proxy_check_input(struct protgroup *protin,
+ struct protstream *clientin,
+ struct protstream *clientout,
+ struct protstream *serverin,
+ struct protstream *serverout,
+ unsigned long timeout_sec);
+
+#endif /* _PROXY_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,578 @@
+
+/* pushstats.c -- automatically generated from pushstats.snmp by snmpgen */
+
+
+
+#ifdef USING_SNMPGEN
+
+
+
+/* We disable this code for now since it doesn't actually work and wastes
+
+ * resources. At some point in time, we'll make it work again as it would
+
+ * be useful to gather aggregate statistics on what commands are being used
+
+ * so we can better tune the server. This change closes bug #1191.
+
+ * New bug 1267 opened to re-enable the feature.
+
+ */
+
+
+
+#ifdef HAVE_UNISTD_H
+
+#include <unistd.h>
+
+#endif
+
+#include <stdio.h>
+
+#include <stdlib.h>
+
+#include <errno.h>
+
+#include <string.h>
+
+#include <sys/types.h>
+
+#include <sys/socket.h>
+
+#include <sys/un.h>
+
+#include <fcntl.h>
+
+#include <stdarg.h>
+
+
+
+#include "index.h"
+
+#include "pushstats.h"
+
+
+
+extern int close(int);
+
+
+
+int variable_value[1+1];
+
+int variable_tmpvalue[1+1];
+
+
+
+int varvalue(pushstats_variable_t var)
+
+{
+
+ if (variable_tmpvalue[var]!=-1)
+
+ return variable_tmpvalue[var];
+
+
+
+ return variable_value[var];
+
+}
+
+
+
+const char *snmp_getdescription(pushstats_t evt)
+
+{
+
+ switch (evt) {
+
+ case MYRIGHTS_COUNT: return "Number of myrights";
+ case BBOARD_COUNT: return "Number of bboard";
+ case LSUB_COUNT: return "Number of lsub";
+ case AUTHENTICATION_YES: return "Successful authentication of given mechanism";
+ case GETQUOTAROOT_COUNT: return "Number of getquotaroot";
+ case STATUS_COUNT: return "Number of status";
+ case FETCH_COUNT: return "Number of fetch";
+ case STARTTLS_COUNT: return "Number of starttls";
+ case LOGIN_COUNT: return "Number of login";
+ case UNSUBSCRIBE_COUNT: return "Number of unsubscribe";
+ case GETANNOTATION_COUNT: return "Number of getannotation";
+ case SERVER_NAME_VERSION: return "Name and version string for server";
+ case LISTRIGHTS_COUNT: return "Number of listrights";
+ case AUTHENTICATION_NO: return "Failed authentication of given mechanism";
+ case SORT_COUNT: return "Number of sort";
+ case EXAMINE_COUNT: return "Number of examine";
+ case EXPUNGE_COUNT: return "Number of expunge";
+ case SERVER_UPTIME: return "Amount of time server has been running";
+ case CHECK_COUNT: return "Number of check";
+ case CAPABILITY_COUNT: return "Number of capability";
+ case RENAME_COUNT: return "Number of rename";
+ case LIST_COUNT: return "Number of list";
+ case ID_COUNT: return "Number of id";
+ case GETQUOTA_COUNT: return "Number of getquota";
+ case IDLE_COUNT: return "Number of idle";
+ case DELETE_COUNT: return "Number of delete";
+ case SETANNOTATION_COUNT: return "Number of setannotation";
+ case GETACL_COUNT: return "Number of getacl";
+ case SELECT_COUNT: return "Number of select";
+ case UNSELECT_COUNT: return "Number of unselect";
+ case SETACL_COUNT: return "Number of setacl";
+ case CLOSE_COUNT: return "Number of close";
+ case NOOP_COUNT: return "Number of noop";
+ case GETUIDS_COUNT: return "Number of getuids";
+ case SEARCH_COUNT: return "Number of search";
+ case NAMESPACE_COUNT: return "Number of namespace";
+ case THREAD_COUNT: return "Number of thread";
+ case SETQUOTA_COUNT: return "Number of setquota";
+ case LOGOUT_COUNT: return "Number of logout";
+ case CREATE_COUNT: return "Number of create";
+ case SUBSCRIBE_COUNT: return "Number of subscribe";
+ case TOTAL_CONNECTIONS: return "Count of the total number of connections since the beginning of time";
+ case DELETEACL_COUNT: return "Number of deleteacl";
+ case ACTIVE_CONNECTIONS: return "Count of the active number of connections";
+ case STORE_COUNT: return "Number of store";
+ case FIND_COUNT: return "Number of find";
+ case AUTHENTICATE_COUNT: return "Number of authenticate";
+ case PARTIAL_COUNT: return "Number of partial";
+ case APPEND_COUNT: return "Number of append";
+ case COPY_COUNT: return "Number of copy";
+
+ }
+
+ return NULL;
+
+}
+
+
+
+const char *snmp_getoid(const char *name __attribute__((unused)),
+
+ pushstats_t evt, char *buf, int buflen)
+
+{
+
+ switch (evt) {
+
+ case MYRIGHTS_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.26"); return buf;
+ case BBOARD_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.2"); return buf;
+ case LSUB_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.24"); return buf;
+ case AUTHENTICATION_YES: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.2.%d.0",varvalue(VARIABLE_AUTH)); return buf;
+ case GETQUOTAROOT_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.17"); return buf;
+ case STATUS_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.39"); return buf;
+ case FETCH_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.12"); return buf;
+ case STARTTLS_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.31"); return buf;
+ case LOGIN_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.21"); return buf;
+ case UNSUBSCRIBE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.42"); return buf;
+ case GETANNOTATION_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.15"); return buf;
+ case SERVER_NAME_VERSION: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.3.0"); return buf;
+ case LISTRIGHTS_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.25"); return buf;
+ case AUTHENTICATION_NO: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.2.%d.1",varvalue(VARIABLE_AUTH)); return buf;
+ case SORT_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.40"); return buf;
+ case EXAMINE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.11"); return buf;
+ case EXPUNGE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.10"); return buf;
+ case SERVER_UPTIME: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.3.1"); return buf;
+ case CHECK_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.4"); return buf;
+ case CAPABILITY_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.3"); return buf;
+ case RENAME_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.30"); return buf;
+ case LIST_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.23"); return buf;
+ case ID_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.19"); return buf;
+ case GETQUOTA_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.16"); return buf;
+ case IDLE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.20"); return buf;
+ case DELETE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.8"); return buf;
+ case SETANNOTATION_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.37"); return buf;
+ case GETACL_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.14"); return buf;
+ case SELECT_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.33"); return buf;
+ case UNSELECT_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.43"); return buf;
+ case SETACL_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.36"); return buf;
+ case CLOSE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.7"); return buf;
+ case NOOP_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.27"); return buf;
+ case GETUIDS_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.18"); return buf;
+ case SEARCH_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.34"); return buf;
+ case NAMESPACE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.28"); return buf;
+ case THREAD_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.41"); return buf;
+ case SETQUOTA_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.38"); return buf;
+ case LOGOUT_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.22"); return buf;
+ case CREATE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.6"); return buf;
+ case SUBSCRIBE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.35"); return buf;
+ case TOTAL_CONNECTIONS: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.1.1"); return buf;
+ case DELETEACL_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.9"); return buf;
+ case ACTIVE_CONNECTIONS: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.1.2"); return buf;
+ case STORE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.32"); return buf;
+ case FIND_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.13"); return buf;
+ case AUTHENTICATE_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.0"); return buf;
+ case PARTIAL_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.29"); return buf;
+ case APPEND_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.1"); return buf;
+ case COPY_COUNT: snprintf(buf,buflen,"1.3.6.1.4.1.3.2.2.3.1.4.5"); return buf;
+
+ }
+
+ return NULL;
+
+}
+
+
+
+#define SOCK_PATH "/tmp/.snmp_door"
+
+
+
+static int mysock = -1;
+
+static struct sockaddr_un remote;
+
+static int sockaddr_len = 0;
+
+
+
+static void snmp_send(char *str)
+
+{
+
+ if (mysock == -1) return;
+
+
+
+ if (sendto(mysock, str, strlen(str), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return;
+
+ }
+
+
+
+ return;
+
+}
+
+
+
+int snmp_connect(void)
+
+{
+
+ int s;
+
+ int fdflags;
+
+ int lup;
+
+
+
+ if ((s = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ for (lup=0;lup < 1+1; lup++)
+
+ variable_tmpvalue[lup] = -1;
+
+
+
+ remote.sun_family = AF_UNIX;
+
+ strlcpy(remote.sun_path, SOCK_PATH, sizeof(remote.sun_path));
+
+ sockaddr_len = strlen(remote.sun_path) + sizeof(remote.sun_family);
+
+
+
+ /* put us in non-blocking mode */
+
+ fdflags = fcntl(s, F_GETFD, 0);
+
+ if (fdflags != -1) fdflags = fcntl(s, F_SETFL, O_NONBLOCK | fdflags);
+
+ if (fdflags == -1) { close(s); return -1; }
+
+
+
+ mysock = s;
+
+ snmp_send("R 1.3.6.1.4.1.3.2.2.3.1.1\n");
+ snmp_send("R 1.3.6.1.4.1.3.2.2.3.1.2\n");
+ snmp_send("R 1.3.6.1.4.1.3.2.2.3.1.3\n");
+ snmp_send("R 1.3.6.1.4.1.3.2.2.3.1.4\n");
+
+ return 0;
+
+}
+
+
+
+int snmp_close(void)
+
+{
+
+ if (mysock > -1)
+
+ close(mysock);
+
+
+
+ return 0;
+
+}
+
+
+
+int snmp_increment_args(pushstats_t cmd, int incr, ...)
+
+{
+
+ char tosend[256]; /* xxx UDP max size??? */
+
+ char buf[256];
+
+
+
+ va_list ap; /* varargs thing */
+
+ pushstats_variable_t vval;
+
+ int ival;
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ va_start(ap, incr);
+
+
+
+ do {
+
+ vval = va_arg(ap, pushstats_variable_t); /* get the next arg */
+
+
+
+ if (vval!=VARIABLE_LISTEND)
+
+ {
+
+ ival = va_arg(ap, int); /* get the next arg */
+
+ variable_tmpvalue[vval] = ival;
+
+ }
+
+
+
+ } while ( vval != VARIABLE_LISTEND);
+
+
+
+ va_end(ap);
+
+
+
+ snprintf(tosend, sizeof(tosend),"C %s %d\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), incr);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ /* set tmp variables back */
+
+ va_start(ap, incr);
+
+
+
+ do {
+
+ vval = va_arg(ap, pushstats_variable_t); /* get the next arg */
+
+
+
+ if (vval!=VARIABLE_LISTEND)
+
+ {
+
+ ival = va_arg(ap, int); /* get the next arg */
+
+ variable_tmpvalue[vval] = -1;
+
+ }
+
+
+
+ } while ( vval != VARIABLE_LISTEND);
+
+
+
+ va_end(ap);
+
+
+
+ return 0;
+
+}
+
+
+
+int snmp_increment(pushstats_t cmd, int incr)
+
+{
+
+ char tosend[256]; /* xxx UDP max size??? */
+
+ char buf[256];
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ snprintf(tosend, sizeof(tosend),"C %s %d\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), incr);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ return 0;
+
+}
+
+
+
+int snmp_set(pushstats_t cmd, int value)
+
+{
+
+ char tosend[256];
+
+ char buf[256];
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ snprintf(tosend, sizeof(tosend),"I %s %d\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), value);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ return 1;
+
+}
+
+
+
+int snmp_set_str(pushstats_t cmd, char *value)
+
+{
+
+ char tosend[256];
+
+ char buf[256];
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ snprintf(tosend, sizeof(tosend),"S %s %s\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), value);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ return 1;
+
+}
+
+
+
+int snmp_set_time(pushstats_t cmd, time_t t)
+
+{
+
+ char tosend[256];
+
+ char buf[256];
+
+
+
+ if (mysock == -1) return 1;
+
+
+
+ snprintf(tosend, sizeof(tosend),"T %s %lu\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), t);
+
+
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+
+ return 1;
+
+ }
+
+
+
+ return 1;
+
+}
+
+
+
+/* should use SNMPDEFINE's as parameter */
+
+int snmp_set_oid(pushstats_t cmd, char *str)
+
+{
+
+ return snmp_set_str(cmd,str);
+
+}
+
+
+
+void snmp_setvariable(pushstats_variable_t name, int value)
+
+{
+
+ variable_value[name] = value;
+
+}
+
+
+
+#endif
+
+
+
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,184 @@
+
+/* pushstats.h -- statistics push interface
+
+ * generated automatically from pushstats.snmp by snmpgen
+
+ *
+
+ * Copyright 2000 Carnegie Mellon University
+
+ *
+
+ * No warranty, yadda yadda
+
+ */
+
+
+
+#ifndef pushstats_H
+
+#define pushstats_H
+
+
+
+#define SNMPDEFINE_cmutree "1.3.6.1.4.1.3.2.2.3"
+#define SNMPDEFINE_cmuimap "1.3.6.1.4.1.3.2.2.3.1"
+
+
+
+#ifndef USING_SNMPGEN
+
+
+
+#define snmp_connect()
+
+#define snmp_close()
+
+#define snmp_increment(a, b)
+
+#define snmp_increment_args(a, b, c, d, e)
+
+#define snmp_set(a, b)
+
+#define snmp_set_str(a, b)
+
+#define snmp_set_oid(a, b)
+
+#define snmp_set_time(a, b)
+
+#define snmp_getdescription(a)
+
+#define snmp_getoid(a, b, c, d)
+
+#define snmp_setvariable(a, b)
+
+
+
+typedef void pushstats_t;
+
+
+
+#else
+
+
+
+typedef enum {
+
+ MYRIGHTS_COUNT,
+ BBOARD_COUNT,
+ LSUB_COUNT,
+ AUTHENTICATION_YES,
+ GETQUOTAROOT_COUNT,
+ STATUS_COUNT,
+ FETCH_COUNT,
+ STARTTLS_COUNT,
+ LOGIN_COUNT,
+ UNSUBSCRIBE_COUNT,
+ GETANNOTATION_COUNT,
+ SERVER_NAME_VERSION,
+ LISTRIGHTS_COUNT,
+ AUTHENTICATION_NO,
+ SORT_COUNT,
+ EXAMINE_COUNT,
+ EXPUNGE_COUNT,
+ SERVER_UPTIME,
+ CHECK_COUNT,
+ CAPABILITY_COUNT,
+ RENAME_COUNT,
+ LIST_COUNT,
+ ID_COUNT,
+ GETQUOTA_COUNT,
+ IDLE_COUNT,
+ DELETE_COUNT,
+ SETANNOTATION_COUNT,
+ GETACL_COUNT,
+ SELECT_COUNT,
+ UNSELECT_COUNT,
+ SETACL_COUNT,
+ CLOSE_COUNT,
+ NOOP_COUNT,
+ GETUIDS_COUNT,
+ SEARCH_COUNT,
+ NAMESPACE_COUNT,
+ THREAD_COUNT,
+ SETQUOTA_COUNT,
+ LOGOUT_COUNT,
+ CREATE_COUNT,
+ SUBSCRIBE_COUNT,
+ TOTAL_CONNECTIONS,
+ DELETEACL_COUNT,
+ ACTIVE_CONNECTIONS,
+ STORE_COUNT,
+ FIND_COUNT,
+ AUTHENTICATE_COUNT,
+ PARTIAL_COUNT,
+ APPEND_COUNT,
+ COPY_COUNT
+} pushstats_t;
+
+
+
+typedef enum {
+
+ VARIABLE_LISTEND,
+ VARIABLE_AUTH
+
+
+} pushstats_variable_t;
+
+
+
+int snmp_connect(void);
+
+
+
+int snmp_close(void);
+
+
+
+/* only valid on counters */
+
+int snmp_increment(pushstats_t cmd, int);
+
+int snmp_increment_args(pushstats_t cmd, int incr, ...);
+
+
+
+/* only valid on values */
+
+int snmp_set(pushstats_t cmd, int);
+
+
+
+int snmp_set_str(pushstats_t cmd, char *value);
+
+
+
+int snmp_set_oid(pushstats_t cmd, char *str);
+
+
+
+int snmp_set_time(pushstats_t cmd, time_t t);
+
+
+
+const char *snmp_getdescription(pushstats_t cmd);
+
+
+
+const char *snmp_getoid(const char *name, pushstats_t cmd, char* buf, int buflen);
+
+
+
+void snmp_setvariable(pushstats_variable_t, int);
+
+
+
+#endif /* USING_SNMPGEN */
+
+
+
+#endif /* pushstats_H */
+
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.snmp
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.snmp?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.snmp (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/pushstats.snmp Sat Aug 26 02:00:13 2006
@@ -1,0 +1,131 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Count number of times command was executed
+#
+# This is the CMU apps hierarchy?
+# Should be some IMAP hierarchy in some distant some in a land far away,
+# when ACAP rules the earth.
+
+
+define cmutree 1.3.6.1.4.1.3.2.2.3
+
+define cmuimap [cmutree].1
+
+#
+# Count connection stats
+#
+
+BASE [cmuimap].1
+
+# 'C' means counter
+# 'auto' means just pick any number you want
+
+C,TOTAL_CONNECTIONS,"Count of the total number of connections since the beginning of time", 1
+C,ACTIVE_CONNECTIONS,"Count of the active number of connections", 2
+
+#
+# Authentication stats
+#
+
+var AUTH
+
+BASE [cmuimap].2.{AUTH}
+
+C,AUTHENTICATION_YES,"Successful authentication of given mechanism",auto
+C,AUTHENTICATION_NO, "Failed authentication of given mechanism", auto
+
+#
+# General information
+#
+
+BASE [cmuimap].3
+
+S,SERVER_NAME_VERSION,"Name and version string for server",auto
+T,SERVER_UPTIME,"Amount of time server has been running",auto
+
+BASE [cmuimap].4
+
+# 'C' means counter
+# 'auto' means just pick any number you want
+
+C,AUTHENTICATE_COUNT,"Number of authenticate", auto
+C,APPEND_COUNT,"Number of append", auto
+C,BBOARD_COUNT,"Number of bboard", auto
+C,CAPABILITY_COUNT,"Number of capability", auto
+C,CHECK_COUNT,"Number of check", auto
+C,COPY_COUNT,"Number of copy", auto
+C,CREATE_COUNT,"Number of create", auto
+C,CLOSE_COUNT,"Number of close", auto
+C,DELETE_COUNT,"Number of delete", auto
+C,DELETEACL_COUNT,"Number of deleteacl", auto
+C,EXPUNGE_COUNT,"Number of expunge", auto
+C,EXAMINE_COUNT,"Number of examine", auto
+C,FETCH_COUNT,"Number of fetch", auto
+C,FIND_COUNT,"Number of find", auto
+C,GETACL_COUNT,"Number of getacl", auto
+C,GETANNOTATION_COUNT,"Number of getannotation", auto
+C,GETQUOTA_COUNT,"Number of getquota", auto
+C,GETQUOTAROOT_COUNT,"Number of getquotaroot", auto
+C,GETUIDS_COUNT,"Number of getuids", auto
+C,ID_COUNT,"Number of id", auto
+C,IDLE_COUNT,"Number of idle", auto
+C,LOGIN_COUNT,"Number of login", auto
+C,LOGOUT_COUNT,"Number of logout", auto
+C,LIST_COUNT,"Number of list", auto
+C,LSUB_COUNT,"Number of lsub", auto
+C,LISTRIGHTS_COUNT,"Number of listrights", auto
+C,MYRIGHTS_COUNT,"Number of myrights", auto
+C,NOOP_COUNT,"Number of noop", auto
+C,NAMESPACE_COUNT,"Number of namespace", auto
+C,PARTIAL_COUNT,"Number of partial", auto
+C,RENAME_COUNT,"Number of rename", auto
+C,STARTTLS_COUNT,"Number of starttls", auto
+C,STORE_COUNT,"Number of store", auto
+C,SELECT_COUNT,"Number of select", auto
+C,SEARCH_COUNT,"Number of search", auto
+C,SUBSCRIBE_COUNT,"Number of subscribe", auto
+C,SETACL_COUNT,"Number of setacl", auto
+C,SETANNOTATION_COUNT,"Number of setannotation", auto
+C,SETQUOTA_COUNT,"Number of setquota", auto
+C,STATUS_COUNT,"Number of status", auto
+C,SORT_COUNT,"Number of sort", auto
+C,THREAD_COUNT,"Number of thread", auto
+C,UNSUBSCRIBE_COUNT,"Number of unsubscribe", auto
+C,UNSELECT_COUNT,"Number of unselect", auto
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,564 @@
+/* quota.c -- program to report/reconstruct quotas
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: quota.c,v 1.48.2.17 2005/05/27 16:49:44 ken3 Exp $ */
+
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+
+#include "assert.h"
+#include "cyrusdb.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "xmalloc.h"
+#include "mboxlist.h"
+#include "mboxname.h"
+#include "quota.h"
+#include "convert_code.h"
+#include "util.h"
+
+extern int optind;
+extern char *optarg;
+
+/* current namespace */
+static struct namespace quota_namespace;
+
+/* config.c stuff */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+struct fix_rock {
+ char *domain;
+ struct txn **tid;
+ unsigned long change_count;
+};
+
+struct quotaentry {
+ struct quota quota;
+ int refcount;
+ int deleted;
+ uquota_t newused;
+};
+
+/* forward declarations */
+void usage(void);
+void reportquota(void);
+int buildquotalist(char *domain, char **roots, int nroots,
+ struct fix_rock *frock);
+int fixquota_mailbox(char *name, int matchlen, int maycreate, void *rock);
+int fixquota(struct fix_rock *frock);
+int fixquota_fixroot(struct mailbox *mailbox, char *root);
+int fixquota_finish(int thisquota, struct txn **tid, unsigned long *count);
+
+#define QUOTAGROW 300
+
+struct quotaentry *quota;
+int quota_num = 0, quota_alloc = 0;
+
+int firstquota = 0;
+int redofix = 0;
+int partial;
+
+int main(int argc,char **argv)
+{
+ int opt;
+ int fflag = 0;
+ int r, code = 0;
+ char *alt_config = NULL, *domain = NULL;
+ struct fix_rock frock;
+ struct txn *tid = NULL;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:d:f")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'd':
+ domain = optarg;
+ break;
+
+ case 'f':
+ fflag = 1;
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ cyrus_init(alt_config, "quota", 0);
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace("a_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ /*
+ * Lock mailbox list to prevent mailbox creation/deletion
+ * during work
+ */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ if (!r) {
+ frock.domain = domain;
+ frock.tid = &tid;
+ frock.change_count = 0;
+
+ r = buildquotalist(domain, argv+optind, argc-optind,
+ fflag ? &frock : NULL);
+ }
+
+ if (!r && fflag) {
+ partial = argc-optind;
+ r = fixquota(&frock);
+ }
+
+ quotadb_close();
+ quotadb_done();
+
+ mboxlist_close();
+ mboxlist_done();
+
+ if (r) code = convert_code(r);
+ else reportquota();
+
+ cyrus_done();
+
+ return code;
+}
+
+void usage(void)
+{
+ fprintf(stderr,
+ "usage: quota [-C <alt_config>] [-d <domain>] [-f] [prefix]...\n");
+ exit(EC_USAGE);
+}
+
+void errmsg(const char *fmt, const char *arg, int err)
+{
+ char buf[1024];
+ int len;
+
+ len = snprintf(buf, sizeof(buf), fmt, arg);
+ if (len < sizeof(buf))
+ len += snprintf(buf+len, sizeof(buf)-len, ": %s", error_message(err));
+ if ((err == IMAP_IOERROR) && (len < sizeof(buf)))
+ len += snprintf(buf+len, sizeof(buf)-len, ": %%m");
+
+ syslog(LOG_ERR, buf);
+ fprintf(stderr, "%s\n", buf);
+}
+
+/*
+ * A matching mailbox was found, process it.
+ */
+static int found_match(char *name, int matchlen, int maycreate, void *frock)
+{
+ int r;
+
+ if (quota_num == quota_alloc) {
+ /* Create new qr list entry */
+ quota_alloc += QUOTAGROW;
+ quota = (struct quotaentry *)
+ xrealloc((char *)quota, quota_alloc * sizeof(struct quotaentry));
+ memset("a[quota_num], 0, QUOTAGROW * sizeof(struct quotaentry));
+ }
+
+ /* See if the mailbox name corresponds to a quotaroot */
+ quota[quota_num].quota.root = name;
+ do {
+ r = quota_read("a[quota_num].quota, NULL, 0);
+ } while (r == IMAP_AGAIN);
+
+ switch (r) {
+ case 0:
+ /* Its a quotaroot! */
+ quota[quota_num++].quota.root = xstrdup(name);
+ break;
+ case IMAP_QUOTAROOT_NONEXISTENT:
+ if (!frock || !quota_num ||
+ strncmp(name, quota[quota_num-1].quota.root,
+ strlen(quota[quota_num-1].quota.root))) {
+ /* Its not a quotaroot, and either we're not fixing quotas,
+ or its not part of the most recent quotaroot */
+ return 0;
+ }
+ break;
+ default:
+ return r;
+ break;
+ }
+
+ if (frock) {
+ /* Recalculate the quota (we need the subfolders too!) */
+ r = fixquota_mailbox(name, matchlen, maycreate, frock);
+ }
+
+ return r;
+}
+
+/*
+ * Build the list of quota roots in 'quota'
+ */
+int buildquotalist(char *domain, char **roots, int nroots,
+ struct fix_rock *frock)
+{
+ int i, r;
+ char buf[MAX_MAILBOX_NAME+1], *tail;
+ size_t domainlen = 0;
+
+ buf[0] = '\0';
+ tail = buf;
+ if (domain) {
+ domainlen = snprintf(buf, sizeof(buf), "%s!", domain);
+ tail += domainlen;
+ }
+
+ /*
+ * Walk through all given pattern(s) and resolve them to all
+ * matching mailbox names. Call found_match() for every mailbox
+ * name found. If no pattern is given, assume "*".
+ */
+ i = 0;
+ do {
+ if (nroots > 0) {
+ /* Translate separator in quotaroot.
+ *
+ * We do this directly instead of using the mboxname_tointernal()
+ * function pointer because we know that we are using the internal
+ * namespace and so we don't have to allocate a buffer for the
+ * translated name.
+ */
+ mboxname_hiersep_tointernal("a_namespace, roots[i], 0);
+
+ strlcpy(tail, roots[i], sizeof(buf) - domainlen);
+ }
+ else {
+ strlcpy(tail, "*", sizeof(buf) - domainlen);
+ }
+ i++;
+
+ r = (*quota_namespace.mboxlist_findall)("a_namespace, buf, 1, 0, 0,
+ &found_match, frock);
+ if (r < 0) {
+ errmsg("failed building quota list for '%s'", buf, IMAP_IOERROR);
+ return IMAP_IOERROR;
+ }
+
+ } while (i < nroots);
+
+ return 0;
+}
+
+/*
+ * Account for mailbox 'name' when fixing the quota roots
+ */
+int fixquota_mailbox(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ int r;
+ struct mailbox mailbox;
+ int i, len, thisquota, thisquotalen;
+ struct fix_rock *frock = (struct fix_rock *) rock;
+ char *p, *domain = frock->domain;
+
+ /* make sure the domains match */
+ if (domain &&
+ (!(p = strchr(name, '!')) || (p - name) != strlen(domain) ||
+ strncmp(name, domain, p - name))) {
+ return 0;
+ }
+
+ while (firstquota < quota_num &&
+ strncmp(name, quota[firstquota].quota.root,
+ strlen(quota[firstquota].quota.root)) > 0) {
+ r = fixquota_finish(firstquota++, frock->tid, &frock->change_count);
+ if (r) return r;
+ }
+
+ thisquota = -1;
+ thisquotalen = 0;
+ for (i = firstquota;
+ i < quota_num && strcmp(name, quota[i].quota.root) >= 0; i++) {
+ len = strlen(quota[i].quota.root);
+ if (!strncmp(name, quota[i].quota.root, len) &&
+ (!name[len] || name[len] == '.' ||
+ (domain && name[len-1] == '!'))) {
+ quota[i].refcount++;
+ if (len > thisquotalen) {
+ thisquota = i;
+ thisquotalen = len;
+ }
+ }
+ }
+
+ if (partial && thisquota == -1) return 0;
+
+ r = mailbox_open_header(name, 0, &mailbox);
+ if (r) errmsg("failed opening header for mailbox '%s'", name, r);
+ else {
+ if (thisquota == -1) {
+ if (mailbox.quota.root) {
+ r = fixquota_fixroot(&mailbox, (char *)0);
+ }
+ }
+ else {
+ if (!mailbox.quota.root ||
+ strcmp(mailbox.quota.root, quota[thisquota].quota.root) != 0) {
+ r = fixquota_fixroot(&mailbox, quota[thisquota].quota.root);
+ }
+ if (!r) {
+ r = mailbox_open_index(&mailbox);
+ if (r) errmsg("failed opening index for mailbox '%s'", name, r);
+ }
+
+ if (!r) quota[thisquota].newused += mailbox.quota_mailbox_used;
+ }
+
+ mailbox_close(&mailbox);
+ }
+
+ if (r) {
+ /* mailbox error of some type, commit what we have */
+ quota_commit(frock->tid);
+ *(frock->tid) = NULL;
+ }
+
+ return r;
+}
+
+int fixquota_fixroot(struct mailbox *mailbox,
+ char *root)
+{
+ int r;
+
+ redofix = 1;
+
+ r = mailbox_lock_header(mailbox);
+ if (r) {
+ errmsg("failed locking header for mailbox '%s'", mailbox->name, r);
+ return r;
+ }
+
+ printf("%s: quota root %s --> %s\n", mailbox->name,
+ mailbox->quota.root ? mailbox->quota.root : "(none)",
+ root ? root : "(none)");
+
+ if (mailbox->quota.root) free(mailbox->quota.root);
+ if (root) {
+ mailbox->quota.root = xstrdup(root);
+ }
+ else {
+ mailbox->quota.root = 0;
+ }
+
+ r = mailbox_write_header(mailbox);
+ (void) mailbox_unlock_header(mailbox);
+ if (r) errmsg("failed writing header for mailbox '%s'", mailbox->name, r);
+
+ return r;
+}
+
+/*
+ * Finish fixing up a quota root
+ */
+int fixquota_finish(int thisquota, struct txn **tid, unsigned long *count)
+{
+ int r = 0;
+
+ if (!quota[thisquota].refcount) {
+ if (!quota[thisquota].deleted++) {
+ printf("%s: removed\n", quota[thisquota].quota.root);
+ r = quota_delete("a[thisquota].quota, tid);
+ if (r) {
+ errmsg("failed deleting quotaroot '%s'",
+ quota[thisquota].quota.root, r);
+ return r;
+ }
+ (*count)++;
+ free(quota[thisquota].quota.root);
+ quota[thisquota].quota.root = NULL;
+ }
+ return 0;
+ }
+
+ if (quota[thisquota].quota.used != quota[thisquota].newused) {
+ /* re-read the quota with the record locked */
+ r = quota_read("a[thisquota].quota, tid, 1);
+ if (r) {
+ errmsg("failed reading quotaroot '%s'",
+ quota[thisquota].quota.root, r);
+ return r;
+ }
+ (*count)++;
+ }
+ if (quota[thisquota].quota.used != quota[thisquota].newused) {
+ printf("%s: usage was " UQUOTA_T_FMT ", now " UQUOTA_T_FMT "\n",
+ quota[thisquota].quota.root,
+ quota[thisquota].quota.used, quota[thisquota].newused);
+ quota[thisquota].quota.used = quota[thisquota].newused;
+ r = quota_write("a[thisquota].quota, tid);
+ if (r) {
+ errmsg("failed writing quotaroot '%s'",
+ quota[thisquota].quota.root, r);
+ return r;
+ }
+ (*count)++;
+ }
+
+ /* commit the transaction every 100 changes */
+ if (*count && !(*count % 100)) {
+ quota_commit(tid);
+ *tid = NULL;
+ }
+
+ return r;
+}
+
+
+/*
+ * Fix all the quota roots
+ */
+int fixquota(struct fix_rock *frock)
+{
+ int i, r = 0;
+
+ while (!r && redofix) {
+ while (!r && firstquota < quota_num) {
+ r = fixquota_finish(firstquota++, frock->tid, &frock->change_count);
+ }
+
+ redofix = 0;
+ firstquota = 0;
+
+ /*
+ * Loop over all qr entries and recalculate the quota.
+ * We need the subfolders too!
+ */
+ for (i = 0; !r && i < quota_num; i++) {
+ r = (*quota_namespace.mboxlist_findall)("a_namespace,
+ quota[i].quota.root,
+ 1, 0, 0, fixquota_mailbox,
+ frock);
+ }
+ }
+
+ while (!r && firstquota < quota_num) {
+ r = fixquota_finish(firstquota++, frock->tid, &frock->change_count);
+ }
+
+ if (!r && *(frock->tid)) quota_commit(frock->tid);
+
+ return 0;
+}
+
+/*
+ * Print out the quota report
+ */
+void reportquota(void)
+{
+ int i;
+ char buf[MAX_MAILBOX_PATH+1];
+
+ printf(" Quota %% Used Used Root\n");
+
+ for (i = 0; i < quota_num; i++) {
+ if (quota[i].deleted) continue;
+ if (quota[i].quota.limit > 0) {
+ printf(" %7d " QUOTA_REPORT_FMT , quota[i].quota.limit,
+ ((quota[i].quota.used / QUOTA_UNITS) * 100) / quota[i].quota.limit);
+ }
+ else if (quota[i].quota.limit == 0) {
+ printf(" 0 ");
+ }
+ else {
+ printf(" ");
+ }
+ /* Convert internal name to external */
+ (*quota_namespace.mboxname_toexternal)("a_namespace,
+ quota[i].quota.root,
+ "cyrus", buf);
+ printf(" " QUOTA_REPORT_FMT " %s\n",
+ quota[i].quota.used / QUOTA_UNITS, buf);
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,107 @@
+/* quota.h -- Quota format definitions
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: quota.h,v 1.1.2.3 2004/08/09 18:51:21 ken3 Exp $
+ */
+
+#ifndef INCLUDED_QUOTA_H
+#define INCLUDED_QUOTA_H
+
+#include "cyrusdb.h"
+#include <config.h>
+
+#define FNAME_QUOTADB "/quotas.db"
+
+#define QUOTA_UNITS (1024)
+
+/* Define the proper quota type, it should either be a
+ * long or a long long int depending upon what the
+ * the compiler supports.
+ */
+#ifdef HAVE_LONG_LONG_INT
+typedef unsigned long long int uquota_t;
+typedef long long int quota_t;
+#define UQUOTA_T_FMT "%llu"
+#define QUOTA_T_FMT "%lld"
+#define QUOTA_REPORT_FMT "%8llu"
+#else
+typedef unsigned long uquota_t;
+typedef long quota_t;
+#define UQUOTA_T_FMT "%lu"
+#define QUOTA_T_FMT "%ld"
+#define QUOTA_REPORT_FMT "%8lu"
+#endif
+
+extern struct db *qdb;
+
+struct quota {
+ char *root;
+
+ /* Information in quota entry */
+ uquota_t used;
+ int limit; /* in QUOTA_UNITS */
+};
+
+extern int quota_read(struct quota *quota, struct txn **tid, int wrlock);
+
+extern void quota_commit(struct txn **tid);
+
+extern void quota_abort(struct txn **tid);
+
+extern int quota_write(struct quota *quota, struct txn **tid);
+
+extern int quota_delete(struct quota *quota, struct txn **tid);
+
+extern int quota_findroot(char *ret, size_t retlen, const char *name);
+
+/* open the quotas db */
+void quotadb_open(char *name);
+
+/* close the database */
+void quotadb_close(void);
+
+/* initialize database structures */
+#define QUOTADB_SYNC 0x02
+void quotadb_init(int flags);
+
+/* done with database stuff */
+void quotadb_done(void);
+
+#endif /* INCLUDED_QUOTA_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota_db.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota_db.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota_db.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/quota_db.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,279 @@
+/* quota_db.c -- quota manipulation routines
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: quota_db.c,v 1.1.2.3 2004/08/09 18:51:21 ken3 Exp $
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+
+#include "assert.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "quota.h"
+#include "util.h"
+#include "xmalloc.h"
+
+#define QDB config_quota_db
+
+struct db *qdb;
+
+static int quota_dbopen = 0;
+
+/*
+ * Read the quota entry 'quota'
+ */
+int quota_read(struct quota *quota, struct txn **tid, int wrlock)
+{
+ int r;
+ int qrlen;
+ const char *data;
+ int datalen;
+
+ if (!quota->root || !(qrlen = strlen(quota->root)))
+ return IMAP_QUOTAROOT_NONEXISTENT;
+
+ if (wrlock)
+ r = QDB->fetchlock(qdb, quota->root, qrlen, &data, &datalen, tid);
+ else
+ r = QDB->fetch(qdb, quota->root, qrlen, &data, &datalen, tid);
+
+ switch (r) {
+ case CYRUSDB_OK:
+ sscanf(data, UQUOTA_T_FMT " %d", "a->used, "a->limit);
+ break;
+
+ case CYRUSDB_AGAIN:
+ return IMAP_AGAIN;
+ break;
+
+ case CYRUSDB_NOTFOUND:
+ return IMAP_QUOTAROOT_NONEXISTENT;
+ break;
+
+ default:
+ syslog(LOG_ERR, "DBERROR: error fetching %s: %s",
+ quota->root, cyrusdb_strerror(r));
+ return IMAP_IOERROR;
+ break;
+ }
+
+ return 0;
+}
+
+/*
+ * Commit the outstanding quota transaction
+ */
+void quota_commit(struct txn **tid)
+{
+ if (tid && *tid) {
+ if (QDB->commit(qdb, *tid)) {
+ syslog(LOG_ERR, "IOERROR: committing quota: %m");
+ }
+ *tid = NULL;
+ }
+}
+
+/*
+ * Abort the outstanding quota transaction
+ */
+void quota_abort(struct txn **tid)
+{
+ if (tid && *tid) {
+ if (QDB->abort(qdb, *tid)) {
+ syslog(LOG_ERR, "IOERROR: aborting quota: %m");
+ }
+ *tid = NULL;
+ }
+}
+
+/*
+ * Write out the quota entry 'quota'
+ */
+int quota_write(struct quota *quota, struct txn **tid)
+{
+ int r;
+ int qrlen, len;
+ char buf[1024];
+
+ if (!quota->root) return 0;
+
+ qrlen = strlen(quota->root);
+ if (!qrlen) return IMAP_QUOTAROOT_NONEXISTENT;
+
+ len = snprintf(buf, sizeof(buf) - 1,
+ UQUOTA_T_FMT " %d", quota->used, quota->limit);
+ r = QDB->store(qdb, quota->root, qrlen, buf, len, tid);
+
+ switch (r) {
+ case CYRUSDB_OK:
+ break;
+
+ case CYRUSDB_AGAIN:
+ return IMAP_AGAIN;
+ break;
+
+ default:
+ syslog(LOG_ERR, "DBERROR: error storing %s: %s",
+ quota->root, cyrusdb_strerror(r));
+ return IMAP_IOERROR;
+ break;
+ }
+
+ return 0;
+}
+
+/*
+ * Remove the quota root 'quota'
+ */
+int quota_delete(struct quota *quota, struct txn **tid)
+{
+ int qrlen, r;
+
+ if (!quota->root) return 0;
+
+ qrlen = strlen(quota->root);
+ if (!qrlen) return IMAP_QUOTAROOT_NONEXISTENT;
+
+ r = QDB->delete(qdb, quota->root, qrlen, tid, 0);
+
+ return r;
+}
+
+/*
+ * Find the mailbox 'name' 's quotaroot, and return it in 'ret'.
+ * 'ret' must be at least MAX_MAILBOX_PATH.
+ *
+ * returns true if a quotaroot is found, 0 otherwise.
+*/
+int quota_findroot(char *ret, size_t retlen, const char *name)
+{
+ char *tail, *p, *mbox;
+
+ strlcpy(ret, name, retlen);
+
+ /* find the start of the unqualified mailbox name */
+ mbox = (config_virtdomains && (p = strchr(ret, '!'))) ? p+1 : ret;
+ tail = mbox + strlen(mbox);
+
+ while (QDB->fetch(qdb, ret, strlen(ret), NULL, NULL, NULL)) {
+ tail = strrchr(mbox, '.');
+ if (!tail) break;
+ *tail = '\0';
+ }
+ if (tail) return 1;
+ if (mbox == ret) return 0;
+
+ /* check for a domain quota */
+ *mbox = '\0';
+ return (QDB->fetch(qdb, ret, strlen(ret), NULL, NULL, NULL) == 0);
+}
+
+
+/* must be called after cyrus_init */
+void quotadb_init(int myflags)
+{
+ int r;
+
+ if (myflags & QUOTADB_SYNC) {
+ r = QDB->sync();
+ }
+}
+
+void quotadb_open(char *fname)
+{
+ int ret;
+ char *tofree = NULL;
+
+ /* create db file name */
+ if (!fname) {
+ size_t fname_len = strlen(config_dir)+strlen(FNAME_QUOTADB)+1;
+
+ fname = xmalloc(fname_len);
+ tofree = fname;
+
+ strlcpy(fname, config_dir, fname_len);
+ strlcat(fname, FNAME_QUOTADB, fname_len);
+ }
+
+ ret = QDB->open(fname, CYRUSDB_CREATE, &qdb);
+ if (ret != 0) {
+ syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
+ cyrusdb_strerror(ret));
+ /* Exiting TEMPFAIL because Sendmail thinks this
+ EC_OSFILE == permanent failure. */
+ fatal("can't read quotas file", EC_TEMPFAIL);
+ }
+
+ if (tofree) free(tofree);
+
+ quota_dbopen = 1;
+}
+
+void quotadb_close(void)
+{
+ int r;
+
+ if (quota_dbopen) {
+ r = QDB->close(qdb);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing quotas: %s",
+ cyrusdb_strerror(r));
+ }
+ quota_dbopen = 0;
+ }
+}
+
+void quotadb_done(void)
+{
+ /* DB->done() handled by cyrus_done() */
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/reconstruct.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/reconstruct.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/reconstruct.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/reconstruct.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1038 @@
+/* reconstruct.c -- program to reconstruct a mailbox
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: reconstruct.c,v 1.81.2.21 2006/06/02 16:41:57 murch Exp $ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+
+#include "acl.h"
+#include "assert.h"
+#include "bsearch.h"
+#include "imparse.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "map.h"
+#include "message.h"
+#include "xmalloc.h"
+#include "global.h"
+#include "mboxname.h"
+#include "mboxlist.h"
+#include "quota.h"
+#include "seen.h"
+#include "retry.h"
+#include "convert_code.h"
+#include "util.h"
+
+extern int optind;
+extern char *optarg;
+
+struct discovered {
+ char *name;
+ struct discovered *next;
+};
+
+/* current namespace */
+static struct namespace recon_namespace;
+
+/* config.c stuff */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+/* forward declarations */
+void do_mboxlist(void);
+int do_reconstruct(char *name, int matchlen, int maycreate, void *rock);
+int reconstruct(char *name, struct discovered *l);
+void usage(void);
+
+extern cyrus_acl_canonproc_t mboxlist_ensureOwnerRights;
+
+int code = 0;
+
+int main(int argc, char **argv)
+{
+ int opt, i, r;
+ int rflag = 0;
+ int mflag = 0;
+ int fflag = 0;
+ int xflag = 0;
+ char buf[MAX_MAILBOX_PATH+1];
+ char mbbuf[MAX_MAILBOX_PATH+1];
+ struct discovered head;
+ char *alt_config = NULL;
+ char *start_part = NULL;
+ const char *start_part_path = NULL, *start_part_mpath = NULL, *path;
+
+ memset(&head, 0, sizeof(head));
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ /* Ensure we're up-to-date on the index file format */
+ assert(INDEX_HEADER_SIZE == (OFFSET_SPARE4+4));
+ assert(INDEX_RECORD_SIZE == (OFFSET_MODSEQ+4));
+
+ while ((opt = getopt(argc, argv, "C:p:rmfx")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'p':
+ start_part = optarg;
+ break;
+
+ case 'r':
+ rflag = 1;
+ break;
+
+ case 'm':
+ mflag = 1;
+ break;
+
+ case 'f':
+ fflag = 1;
+ break;
+
+ case 'x':
+ xflag = 1;
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ cyrus_init(alt_config, "reconstruct", 0);
+ global_sasl_init(1,0,NULL);
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(&recon_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ if(start_part) {
+ /* Get partition's path */
+ start_part_path = config_partitiondir(start_part);
+ if (!start_part_path) {
+ fatal(error_message(IMAP_PARTITION_UNKNOWN), EC_USAGE);
+ }
+ start_part_mpath = config_metapartitiondir(start_part);
+ }
+
+ if (mflag) {
+ if (rflag || fflag || optind != argc) {
+ cyrus_done();
+ usage();
+ }
+ do_mboxlist();
+ }
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ mailbox_reconstructmode();
+
+ /* Deal with nonexistent mailboxes */
+ if (start_part) {
+ /* We were handed a mailbox that does not exist currently */
+ if(optind == argc) {
+ fprintf(stderr,
+ "When using -p, you must specify a mailbox to attempt to reconstruct.");
+ exit(EC_USAGE);
+ }
+
+ /* do any of the mailboxes exist in mboxlist already? */
+ /* Do they look like mailboxes? */
+ for (i = optind; i < argc; i++) {
+ struct stat sbuf;
+
+ if(strchr(argv[i],'%') || strchr(argv[i],'*')) {
+ fprintf(stderr, "Using wildcards with -p is not supported.\n");
+ exit(EC_USAGE);
+ }
+
+ /* Translate mailboxname */
+ (*recon_namespace.mboxname_tointernal)(&recon_namespace, argv[i],
+ NULL, buf);
+
+ /* Does it exist */
+ do {
+ r = mboxlist_lookup(buf, NULL, NULL);
+ } while (r == IMAP_AGAIN);
+
+ if(r != IMAP_MAILBOX_NONEXISTENT) {
+ fprintf(stderr,
+ "Mailbox %s already exists. Cannot specify -p.\n",
+ argv[i]);
+ exit(EC_USAGE);
+ }
+
+ /* Does the suspected path *look* like a mailbox? */
+ path = (start_part_mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_HEADER)) ?
+ start_part_mpath : start_part_path;
+ mailbox_hash_mbox(mbbuf, sizeof(mbbuf), path, buf);
+ strlcat(mbbuf, FNAME_HEADER, sizeof(mbbuf));
+ if(stat(mbbuf, &sbuf) < 0) {
+ fprintf(stderr,
+ "%s does not appear to be a mailbox (no %s).\n",
+ argv[i], mbbuf);
+ exit(EC_USAGE);
+ }
+ }
+
+ /* None of them exist. Create them. */
+ for (i = optind; i < argc; i++) {
+ /* Translate mailboxname */
+ (*recon_namespace.mboxname_tointernal)(&recon_namespace, argv[i],
+ NULL, buf);
+
+ r = mboxlist_createmailbox(buf, 0, start_part, 1,
+ "cyrus", NULL, 0, 0, !xflag);
+ if(r) {
+ fprintf(stderr, "could not create %s\n", argv[i]);
+ }
+ }
+ }
+
+ /* Normal Operation */
+ if (optind == argc) {
+ if (rflag) {
+ fprintf(stderr, "please specify a mailbox to recurse from\n");
+ cyrus_done();
+ exit(EC_USAGE);
+ }
+ assert(!rflag);
+ strlcpy(buf, "*", sizeof(buf));
+ (*recon_namespace.mboxlist_findall)(&recon_namespace, buf, 1, 0, 0,
+ do_reconstruct, NULL);
+ }
+
+ for (i = optind; i < argc; i++) {
+ char *domain = NULL;
+
+ /* save domain */
+ if (config_virtdomains) domain = strchr(argv[i], '@');
+
+ strlcpy(buf, argv[i], sizeof(buf));
+ /* Translate any separators in mailboxname */
+ mboxname_hiersep_tointernal(&recon_namespace, buf,
+ config_virtdomains ?
+ strcspn(buf, "@") : 0);
+
+ /* reconstruct the first mailbox/pattern */
+ (*recon_namespace.mboxlist_findall)(&recon_namespace, buf, 1, 0,
+ 0, do_reconstruct,
+ fflag ? &head : NULL);
+ if (rflag) {
+ /* build a pattern for submailboxes */
+ /* XXX mboxlist_findall() is destructive and removes domain */
+ strlcat(buf, ".*", sizeof(buf));
+
+ /* append the domain */
+ if (domain) strlcat(buf, domain, sizeof(buf));
+
+ /* reconstruct the submailboxes */
+ (*recon_namespace.mboxlist_findall)(&recon_namespace, buf, 1, 0,
+ 0, do_reconstruct,
+ fflag ? &head : NULL);
+ }
+ }
+
+ /* examine our list to see if we discovered anything */
+ while (head.next) {
+ struct discovered *p;
+ int r = 0;
+
+ p = head.next;
+ head.next = p->next;
+
+ /* create p (database only) and reconstruct it */
+ /* partition is defined by the parent mailbox */
+ r = mboxlist_createmailbox(p->name, 0, NULL, 1,
+ "cyrus", NULL, 0, 0, !xflag);
+ if (!r) {
+ do_reconstruct(p->name, strlen(p->name), 0, &head);
+ } else {
+ fprintf(stderr, "createmailbox %s: %s\n",
+ p->name, error_message(r));
+ }
+ /* may have added more things into our list */
+
+ free(p->name);
+ free(p);
+ }
+
+ mboxlist_close();
+ mboxlist_done();
+
+ quotadb_close();
+ quotadb_done();
+
+ cyrus_done();
+
+ return code;
+}
+
+void usage(void)
+{
+ fprintf(stderr,
+ "usage: reconstruct [-C <alt_config>] [-p partition] [-rfx] mailbox...\n");
+ fprintf(stderr, " reconstruct [-C <alt_config>] -m\n");
+ exit(EC_USAGE);
+}
+
+int compare_uid(const void *a, const void *b)
+{
+ return *(unsigned long *)a - *(unsigned long *)b;
+}
+
+#define UIDGROW 300
+
+
+/*
+ * mboxlist_findall() callback function to reconstruct a mailbox
+ */
+int
+do_reconstruct(char *name,
+ int matchlen,
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ int r;
+ char buf[MAX_MAILBOX_PATH+1];
+ static char lastname[MAX_MAILBOX_PATH+1] = "";
+
+ signals_poll();
+
+ /* don't repeat */
+ if (matchlen == strlen(lastname) &&
+ !strncmp(name, lastname, matchlen)) return 0;
+
+ if(matchlen >= sizeof(lastname))
+ matchlen = sizeof(lastname) - 1;
+
+ strncpy(lastname, name, matchlen);
+ lastname[matchlen] = '\0';
+
+ r = reconstruct(lastname, rock);
+ if (r) {
+ com_err(name, r, (r == IMAP_IOERROR) ? error_message(errno) : NULL);
+ code = convert_code(r);
+ } else {
+ /* Convert internal name to external */
+ (*recon_namespace.mboxname_toexternal)(&recon_namespace, lastname,
+ NULL, buf);
+ printf("%s\n", buf);
+ }
+
+ return 0;
+}
+
+/*
+ * Reconstruct the single mailbox named 'name'
+ */
+int reconstruct(char *name, struct discovered *found)
+{
+ char buf[((INDEX_HEADER_SIZE > INDEX_RECORD_SIZE) ?
+ INDEX_HEADER_SIZE : INDEX_RECORD_SIZE)];
+ char quota_root[MAX_MAILBOX_PATH+1];
+ bit32 valid_user_flags[MAX_USER_FLAGS/32];
+
+ struct mailbox mailbox;
+
+ int r = 0;
+ int i, n, hasquota, flag;
+ int format = MAILBOX_FORMAT_NORMAL;
+
+ char *p;
+
+ char fnamebuf[MAX_MAILBOX_PATH+1], newfnamebuf[MAX_MAILBOX_PATH+1];
+ FILE *newindex, *msgfile;
+ DIR *dirp;
+ struct dirent *dirent;
+ struct stat sbuf;
+ int newcache_fd;
+
+ unsigned long *uid;
+ int uid_num, uid_alloc;
+
+ int msg, old_msg = 0;
+ int new_exists = 0,
+ new_answered = 0,
+ new_flagged = 0,
+ new_deleted = 0;
+
+ char *list_acl, *list_part;
+ int list_type;
+
+ uquota_t new_quota = 0;
+
+ struct index_record message_index, old_index;
+ static struct index_record zero_index;
+ struct body *body = NULL;
+
+ char *mypath, *mympath, *mypart, *myacl;
+ int mytype;
+ char mbpath[MAX_MAILBOX_PATH+1], *path;
+
+ int expunge_fd = -1;
+
+ /* Start by looking up current data in mailbox list */
+ r = mboxlist_detail(name, &mytype, &mypath, &mympath,
+ &mypart, &myacl, NULL);
+ if(r) return r;
+
+ /* stat for header, if it is not there, we need to create it
+ * note that we do not want to wind up with a fully-open mailbox,
+ * so we will re-open. */
+ path = (mympath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_HEADER)) ?
+ mympath : mypath;
+ snprintf(mbpath, sizeof(mbpath), "%s%s", path, FNAME_HEADER);
+ if(stat(mbpath, &sbuf) == -1) {
+ /* Header doesn't exist, create it! */
+ r = mailbox_create(name, mypart, myacl, NULL,
+ ((mytype & MBTYPE_NETNEWS) ?
+ MAILBOX_FORMAT_NETNEWS :
+ MAILBOX_FORMAT_NORMAL), NULL);
+ if(r) return r;
+ }
+
+ /* Now open just the header (it will hopefully be valid) */
+ r = mailbox_open_header(name, 0, &mailbox);
+ if (r) return r;
+
+ if (mailbox.header_fd != -1) {
+ (void) mailbox_lock_header(&mailbox);
+ }
+ mailbox.header_lock_count = 1;
+
+ if (chdir(mailbox.path) == -1) {
+ return IMAP_IOERROR;
+ }
+
+ /* Fix quota root */
+ hasquota = quota_findroot(quota_root, sizeof(quota_root), mailbox.name);
+ if (mailbox.quota.root) free(mailbox.quota.root);
+ if (hasquota) {
+ mailbox.quota.root = xstrdup(quota_root);
+ }
+ else {
+ mailbox.quota.root = 0;
+ }
+
+ /* Validate user flags */
+ for (i = 0; i < MAX_USER_FLAGS/32; i++) {
+ valid_user_flags[i] = 0;
+ }
+ for (flag = 0; flag < MAX_USER_FLAGS; flag++) {
+ if (!mailbox.flagname[flag]) continue;
+ if ((flag && !mailbox.flagname[flag-1]) ||
+ !imparse_isatom(mailbox.flagname[flag])) {
+ free(mailbox.flagname[flag]);
+ mailbox.flagname[flag] = 0;
+ }
+ valid_user_flags[flag/32] |= 1<<(flag&31);
+ }
+
+ /* Verify ACL and update mboxlist if needed */
+ r = mailbox_read_header_acl(&mailbox);
+ if (r) return r;
+
+ r = mboxlist_detail(name, &list_type, NULL, NULL,
+ &list_part, &list_acl, NULL);
+ if (r) return r;
+
+ if(strcmp(list_acl, mailbox.acl)) {
+ r = mboxlist_update(name, list_type, list_part, mailbox.acl, 0);
+ }
+ if(r) return r;
+
+ /* Attempt to open/lock index */
+ r = mailbox_open_index(&mailbox);
+ if (r) {
+ mailbox.exists = 0;
+ mailbox.last_uid = 0;
+ mailbox.last_appenddate = 0;
+ mailbox.uidvalidity = time(0);
+ /* If we can't read the index, assume new UIDL so that stupid clients
+ will retrieve all of the messages in the mailbox. */
+ mailbox.options = OPT_POP3_NEW_UIDL;
+ mailbox.highestmodseq = 1;
+ }
+ else {
+ (void) mailbox_lock_index(&mailbox);
+ }
+ mailbox.index_lock_count = 1;
+ mailbox.pop3_last_login = 0;
+
+ /* Create new index/cache files */
+ path = (mailbox.mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox.mpath : mailbox.path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+ strlcat(fnamebuf, ".NEW", sizeof(fnamebuf));
+ newindex = fopen(fnamebuf, "w+");
+ if (!newindex) {
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ path = (mailbox.mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_CACHE)) ?
+ mailbox.mpath : mailbox.path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_CACHE, sizeof(fnamebuf));
+ strlcat(fnamebuf, ".NEW", sizeof(fnamebuf));
+ newcache_fd = open(fnamebuf, O_RDWR|O_TRUNC|O_CREAT, 0666);
+ if (newcache_fd == -1) {
+ fclose(newindex);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ memset(buf, 0, sizeof(buf));
+ *((bit32 *)(buf+OFFSET_GENERATION_NO)) = htonl(mailbox.generation_no + 1);
+ fwrite(buf, 1, INDEX_HEADER_SIZE, newindex);
+ retry_write(newcache_fd, buf, sizeof(bit32));
+
+ /* Remove any previously expunged messages */
+ /* XXX For two-phase we will need to keep the messages referenced
+ in cyrus.expunge and refresh its header and offsets */
+ path = (mailbox.mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_EXPUNGE)) ?
+ mailbox.mpath : mailbox.path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_EXPUNGE_INDEX, sizeof(fnamebuf));
+ if (stat(fnamebuf, &sbuf) != -1 &&
+ sbuf.st_size > OFFSET_LEAKED_CACHE &&
+ (expunge_fd = open(fnamebuf, O_RDONLY, 0666)) != -1) {
+ const char *index_base = NULL;
+ unsigned long index_len = 0; /* mapped size */
+ int format, minor_version;
+ unsigned long start_offset, record_size, exists;
+
+ /* Map the file */
+ map_refresh(expunge_fd, 1, &index_base,
+ &index_len, sbuf.st_size, "expunge", mailbox.name);
+
+ format = ntohl(*((bit32 *)(index_base+OFFSET_FORMAT)));
+ minor_version = ntohl(*((bit32 *)(index_base+OFFSET_MINOR_VERSION)));
+ start_offset = ntohl(*((bit32 *)(index_base+OFFSET_START_OFFSET)));
+ record_size = ntohl(*((bit32 *)(index_base+OFFSET_RECORD_SIZE)));
+ exists = ntohl(*((bit32 *)(index_base+OFFSET_EXISTS)));
+
+ /* Sanity check the header as best we can */
+ if (format == 0 && exists &&
+ minor_version && minor_version <= MAILBOX_MINOR_VERSION &&
+ start_offset && start_offset <= INDEX_HEADER_SIZE &&
+ record_size && record_size <= INDEX_RECORD_SIZE &&
+ sbuf.st_size >= (start_offset + exists * record_size)) {
+ unsigned msgno;
+ const char *p = index_base + start_offset;
+
+ /* Delete message files */
+ for (msgno = 1; msgno <= exists; msgno++, p += record_size) {
+ unsigned long uid = ntohl(*((bit32 *)(p + OFFSET_UID)));
+ char msgfname[MAILBOX_FNAME_LEN+1];
+
+ /* Sanity check UID */
+ if (uid == 0) {
+ syslog(LOG_ERR, "IOERROR: %s zero expunge record %u/%lu",
+ mailbox.name, msgno, exists);
+ break;
+ }
+
+ mailbox_message_get_fname(&mailbox, uid,
+ msgfname, sizeof(msgfname));
+ unlink(msgfname);
+ }
+ }
+
+ map_free(&index_base, &index_len);
+ close(expunge_fd);
+ }
+ unlink(fnamebuf);
+
+ /* Find all message files in directory */
+ uid = (unsigned long *) xmalloc(UIDGROW * sizeof(unsigned long));
+ uid_num = 0;
+ uid_alloc = UIDGROW;
+ dirp = opendir(".");
+
+ if (!dirp) {
+ fclose(newindex);
+ close(newcache_fd);
+ mailbox_close(&mailbox);
+ free(uid);
+ return IMAP_IOERROR;
+ } else {
+ while ((dirent = readdir(dirp))!=NULL) {
+ if (!isdigit((int) (dirent->d_name[0])) || dirent->d_name[0] ==
+ '0')
+ continue;
+ if (uid_num == uid_alloc) {
+ uid_alloc += UIDGROW;
+ uid = (unsigned long *)
+ xrealloc((char *)uid, uid_alloc * sizeof(unsigned long));
+ }
+ uid[uid_num] = 0;
+ p = dirent->d_name;
+ while (isdigit((int) *p)) {
+ uid[uid_num] = uid[uid_num] * 10 + *p++ - '0';
+ }
+ if (*p++ != '.') continue;
+ if (*p) continue;
+
+ uid_num++;
+ }
+ closedir(dirp);
+ qsort((char *)uid, uid_num, sizeof(*uid), compare_uid);
+ }
+
+ /* Put each message file in the new index/cache */
+ old_msg = 0;
+ old_index.uid = 0;
+ mailbox.format = format;
+ if (mailbox.cache_fd) close(mailbox.cache_fd);
+ mailbox.cache_fd = newcache_fd;
+
+ for (msg = 0; msg < uid_num; msg++) {
+ char msgfname[MAILBOX_FNAME_LEN+1];
+
+ message_index = zero_index;
+ message_index.uid = uid[msg];
+
+ mailbox_message_get_fname(&mailbox, uid[msg], msgfname, sizeof(msgfname));
+ msgfile = fopen(msgfname, "r");
+ if (!msgfile) {
+ fprintf(stderr, "reconstruct: fopen() failed for '%s' [error=%d] -- skipping.\n",
+ msgfname, errno);
+ continue;
+ }
+
+ if (fstat(fileno(msgfile), &sbuf)) {
+ fclose(msgfile);
+ continue;
+ }
+ if (sbuf.st_size == 0) {
+ /* Zero-length message file--blow it away */
+ fclose(msgfile);
+ unlink(msgfname);
+ continue;
+ }
+
+ /* Find old index record, if it exists */
+ while (old_msg < mailbox.exists && old_index.uid < uid[msg]) {
+ if (mailbox_read_index_record(&mailbox, ++old_msg, &old_index)) {
+ old_index.uid = 0;
+ }
+ }
+
+ if (old_index.uid == uid[msg]) {
+ /* Use data in old index file, subject to validity checks */
+ message_index.internaldate = old_index.internaldate;
+ message_index.modseq = old_index.modseq;
+ /* This should never happen, but bugs in 2.3.4 and 2.3.5
+ * could have left modseq blank. If so, update it */
+ if (!message_index.modseq) message_index.modseq = 1;
+ message_index.system_flags = old_index.system_flags &
+ (FLAG_ANSWERED|FLAG_FLAGGED|FLAG_DELETED|FLAG_DRAFT);
+ for (i = 0; i < MAX_USER_FLAGS/32; i++) {
+ message_index.user_flags[i] =
+ old_index.user_flags[i] & valid_user_flags[i];
+ }
+ /* Copy across MessageUUID if confident that data on disk */
+ message_uuid_copy(&message_index.uuid, &old_index.uuid);
+ }
+ else {
+ /* Message file write time is good estimate of internaldate */
+ message_index.internaldate = sbuf.st_mtime;
+ /* If we are recovering a message, assume new UIDL
+ so that stupid clients will retrieve this message */
+ mailbox.options |= OPT_POP3_NEW_UIDL;
+ /* Wipe the Message UUID */
+ message_uuid_set_null(&message_index.uuid);
+ /* If we are recovering a message, reset MODSEQ */
+ message_index.modseq = 1;
+ }
+ message_index.last_updated = time(0);
+ if (message_index.modseq > mailbox.highestmodseq) {
+ mailbox.highestmodseq = message_index.modseq;
+ }
+
+ if (((r = message_parse_file(msgfile, NULL, NULL, &body)) != 0) ||
+ ((r = message_create_record(&mailbox, &message_index, body)) != 0)) {
+ fclose(msgfile);
+ fclose(newindex);
+ mailbox_close(&mailbox);
+ free(uid);
+ return r;
+ }
+ fclose(msgfile);
+ if (body) message_free_body(body);
+
+ /* Write out new entry in index file */
+ mailbox_index_record_to_buf(&message_index, buf);
+
+ n = fwrite(buf, 1, INDEX_RECORD_SIZE, newindex);
+ if (n != INDEX_RECORD_SIZE) {
+ fclose(newindex);
+ mailbox_close(&mailbox);
+ free(uid);
+ return IMAP_IOERROR;
+ }
+
+ new_exists++;
+ if (message_index.system_flags & FLAG_ANSWERED) new_answered++;
+ if (message_index.system_flags & FLAG_FLAGGED) new_flagged++;
+ if (message_index.system_flags & FLAG_DELETED) new_deleted++;
+ new_quota += message_index.size;
+ }
+
+ if (body) free(body);
+
+ /* Write out new index file header */
+ rewind(newindex);
+ if (uid_num && mailbox.last_uid < uid[uid_num-1]) {
+ mailbox.last_uid = uid[uid_num-1] + 100;
+ }
+ if (mailbox.last_appenddate == 0 || mailbox.last_appenddate > time(0)) {
+ mailbox.last_appenddate = time(0);
+ }
+ if (mailbox.uidvalidity == 0 || mailbox.uidvalidity > time(0)) {
+ mailbox.uidvalidity = time(0);
+ }
+
+ free(uid);
+ *((bit32 *)(buf+OFFSET_GENERATION_NO)) = htonl(mailbox.generation_no + 1);
+ *((bit32 *)(buf+OFFSET_FORMAT)) = htonl(mailbox.format);
+ *((bit32 *)(buf+OFFSET_MINOR_VERSION)) = htonl(MAILBOX_MINOR_VERSION);
+ *((bit32 *)(buf+OFFSET_START_OFFSET)) = htonl(INDEX_HEADER_SIZE);
+ *((bit32 *)(buf+OFFSET_RECORD_SIZE)) = htonl(INDEX_RECORD_SIZE);
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(new_exists);
+ *((bit32 *)(buf+OFFSET_LAST_APPENDDATE)) = htonl(mailbox.last_appenddate);
+ *((bit32 *)(buf+OFFSET_LAST_UID)) = htonl(mailbox.last_uid);
+
+ /* quotas may be 64bit now */
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonll(new_quota);
+#else
+ /* zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) = htonl(new_quota);
+#endif
+
+ *((bit32 *)(buf+OFFSET_POP3_LAST_LOGIN)) = htonl(mailbox.pop3_last_login);
+ *((bit32 *)(buf+OFFSET_UIDVALIDITY)) = htonl(mailbox.uidvalidity);
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(new_deleted);
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(new_answered);
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(new_flagged);
+ *((bit32 *)(buf+OFFSET_MAILBOX_OPTIONS)) = htonl(mailbox.options);
+ *((bit32 *)(buf+OFFSET_LEAKED_CACHE)) = htonl(0);
+#ifdef HAVE_LONG_LONG_INT
+ *((bit64 *)(buf+OFFSET_HIGHESTMODSEQ_64)) = htonll(mailbox.highestmodseq);
+#else
+ /* zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_HIGHESTMODSEQ_64)) = htonl(0);
+ *((bit32 *)(buf+OFFSET_HIGHESTMODSEQ)) = htonl(mailbox.highestmodseq);
+#endif
+ *((bit32 *)(buf+OFFSET_SPARE0)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE1)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE2)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE3)) = htonl(0); /* RESERVED */
+ *((bit32 *)(buf+OFFSET_SPARE4)) = htonl(0); /* RESERVED */
+
+ n = fwrite(buf, 1, INDEX_HEADER_SIZE, newindex);
+ fflush(newindex);
+ if (n != INDEX_HEADER_SIZE || ferror(newindex)
+ || fsync(fileno(newindex)) || fsync(newcache_fd)) {
+ fclose(newindex);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ /* validate uniqueid */
+ if (!mailbox.uniqueid) {
+ char buf[32];
+
+ /* this may change uniqueid, but if it does, nothing we can do
+ about it */
+ mailbox_make_uniqueid(mailbox.name, mailbox.uidvalidity, buf,
+ sizeof(buf));
+ mailbox.uniqueid = xstrdup(buf);
+ }
+
+ /* Write header */
+ r = mailbox_write_header(&mailbox);
+ if (r) {
+ mailbox_close(&mailbox);
+ return r;
+ }
+
+ /* Rename new index/cache file in place */
+ path = (mailbox.mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox.mpath : mailbox.path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+ strlcpy(newfnamebuf, fnamebuf, sizeof(newfnamebuf));
+ strlcat(newfnamebuf, ".NEW", sizeof(fnamebuf));
+ if (rename(newfnamebuf, fnamebuf)) {
+ fclose(newindex);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+ path = (mailbox.mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_CACHE)) ?
+ mailbox.mpath : mailbox.path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_CACHE, sizeof(fnamebuf));
+ strlcpy(newfnamebuf, fnamebuf, sizeof(newfnamebuf));
+ strlcat(newfnamebuf, ".NEW", sizeof(newfnamebuf));
+ if (rename(newfnamebuf, fnamebuf)) {
+ fclose(newindex);
+ mailbox_close(&mailbox);
+ return IMAP_IOERROR;
+ }
+
+ fclose(newindex);
+ r = seen_reconstruct(&mailbox, (time_t)0, (time_t)0, (int (*)())0, (void *)0);
+ mailbox_close(&mailbox);
+
+ if (found) {
+ if (mympath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_HEADER) &&
+ chdir(mympath) == -1) {
+ return IMAP_IOERROR;
+ }
+
+ /* we recurse down this directory to see if there's any mailboxes
+ under this not in the mailboxes database */
+ dirp = opendir(".");
+
+ while ((dirent = readdir(dirp)) != NULL) {
+ struct discovered *new;
+
+ /* mailbox directories never have a dot in them */
+ if (strchr(dirent->d_name, '.')) continue;
+ if (stat(dirent->d_name, &sbuf) < 0) continue;
+ if (!S_ISDIR(sbuf.st_mode)) continue;
+
+ /* ok, we found a directory that doesn't have a dot in it;
+ is there a cyrus.header file? */
+ snprintf(fnamebuf, sizeof(fnamebuf), "%s%s",
+ dirent->d_name, FNAME_HEADER);
+ if (stat(fnamebuf, &sbuf) < 0) continue;
+
+ /* ok, we have a real mailbox directory */
+ snprintf(fnamebuf, sizeof(fnamebuf), "%s.%s",
+ name, dirent->d_name);
+
+ /* does fnamebuf exist as a mailbox in mboxlist? */
+ do {
+ r = mboxlist_lookup(fnamebuf, NULL, NULL);
+ } while (r == IMAP_AGAIN);
+ if (!r) continue; /* mailbox exists; it'll be reconstructed
+ with a -r */
+
+ if (r != IMAP_MAILBOX_NONEXISTENT) break; /* erg? */
+ else r = 0; /* reset error condition */
+
+ printf("discovered %s\n", fnamebuf);
+ new = (struct discovered *) xmalloc(sizeof(struct discovered));
+ new->name = strdup(fnamebuf);
+ new->next = found->next;
+ found->next = new;
+ }
+ closedir(dirp);
+ }
+
+ return r;
+}
+
+/* XXX What is the stuff below used for? Do we need to metadata-ize it? */
+
+/* List of directories to scan for mailboxes */
+struct todo {
+ char *name;
+ char *path;
+ char *partition;
+ struct todo *next;
+} *todo_head = 0, **todo_tail = &todo_head;
+
+void
+todo_append(name, path, partition)
+char *name;
+char *path;
+char *partition;
+{
+ struct todo *newentry;
+
+ newentry = (struct todo *)xmalloc(sizeof(struct todo));
+ newentry->name = name;
+ newentry->path = path;
+ newentry->partition = partition;
+ newentry->next = 0;
+ *todo_tail = newentry;
+ todo_tail = &newentry->next;
+}
+
+void
+todo_append_hashed(char *name, char *path, char *partition)
+{
+ DIR *dirp;
+ struct dirent *dirent;
+
+ dirp = opendir(path);
+ if (!dirp) {
+ fprintf(stderr, "reconstruct: couldn't open partition %s: %s\n",
+ partition, strerror(errno));
+ } else while ((dirent = readdir(dirp))!=NULL) {
+ struct todo *newentry;
+
+ if (strchr(dirent->d_name, '.')) {
+ continue;
+ }
+
+ newentry = (struct todo *)xmalloc(sizeof(struct todo));
+ newentry->name = xstrdup(name);
+ newentry->path = xmalloc(strlen(path) +
+ strlen(dirent->d_name) + 2);
+ sprintf(newentry->path, "%s/%s", path, dirent->d_name);
+ newentry->partition = partition;
+ newentry->next = 0;
+ *todo_tail = newentry;
+ todo_tail = &newentry->next;
+ }
+}
+
+char *cleanacl(char *acl, char *mboxname)
+{
+ char owner[MAX_MAILBOX_NAME+1];
+ cyrus_acl_canonproc_t *aclcanonproc = 0;
+ char *p;
+ char *newacl;
+ char *identifier;
+ char *rights;
+
+ /* Rebuild ACL */
+ if ((p = mboxname_isusermailbox(mboxname, 0))) {
+ strlcpy(owner, p, sizeof(owner));
+ p = strchr(owner, '.');
+ if (p) *p = '\0';
+ aclcanonproc = mboxlist_ensureOwnerRights;
+ }
+ newacl = xstrdup("");
+ if (aclcanonproc) {
+ cyrus_acl_set(&newacl, owner, ACL_MODE_SET, ACL_ALL,
+ (cyrus_acl_canonproc_t *)0, (void *)0);
+ }
+ for (;;) {
+ identifier = acl;
+ rights = strchr(acl, '\t');
+ if (!rights) break;
+ *rights++ = '\0';
+ acl = strchr(rights, '\t');
+ if (!acl) break;
+ *acl++ = '\0';
+
+ cyrus_acl_set(&newacl, identifier, ACL_MODE_SET,
+ cyrus_acl_strtomask(rights), aclcanonproc,
+ (void *)owner);
+ }
+
+ return newacl;
+}
+
+/*
+ * Reconstruct the mailboxes list.
+ */
+void do_mboxlist(void)
+{
+ fprintf(stderr, "reconstructing mailboxes.db currently not supported\n");
+ exit(EC_USAGE);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,339 @@
+/* saslclient.c -- shared SASL code for server-server authentication
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: saslclient.c,v 1.12.2.2 2006/06/27 15:58:42 murch Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+#include <syslog.h>
+
+#include "xmalloc.h"
+#include "prot.h"
+#include "imap_err.h"
+#include "saslclient.h"
+
+
+static int mysasl_simple_cb(void *context, int id, const char **result,
+ unsigned int *len)
+{
+ if (!result) {
+ return SASL_BADPARAM;
+ }
+
+ switch (id) {
+ case SASL_CB_USER:
+ *result = (char *) context;
+ break;
+ case SASL_CB_AUTHNAME:
+ *result = (char *) context;
+ break;
+ case SASL_CB_LANGUAGE:
+ *result = NULL;
+ break;
+ default:
+ return SASL_BADPARAM;
+ }
+ if (len) {
+ *len = *result ? strlen(*result) : 0;
+ }
+
+ return SASL_OK;
+}
+
+static int mysasl_getrealm_cb(void *context, int id,
+ const char **availrealms __attribute__((unused)),
+ const char **result)
+{
+ if (id != SASL_CB_GETREALM || !result) {
+ return SASL_BADPARAM;
+ }
+
+ *result = (char *) context;
+ return SASL_OK;
+}
+
+static int mysasl_getsecret_cb(sasl_conn_t *conn,
+ void *context,
+ int id,
+ sasl_secret_t **result)
+{
+ if (!conn || !result || id != SASL_CB_PASS) {
+ return SASL_BADPARAM;
+ }
+
+ *result = (sasl_secret_t *)context;
+
+ return SASL_OK;
+}
+
+sasl_callback_t *mysasl_callbacks(const char *username,
+ const char *authname,
+ const char *realm,
+ const char *password)
+{
+ sasl_callback_t *ret = xmalloc(5 * sizeof(sasl_callback_t));
+ int n = 0;
+
+ if (username) {
+ /* user callback */
+ ret[n].id = SASL_CB_USER;
+ ret[n].proc = &mysasl_simple_cb;
+ ret[n].context = (char *) username;
+ n++;
+ }
+
+ if (authname) {
+ /* authname */
+ ret[n].id = SASL_CB_AUTHNAME;
+ ret[n].proc = &mysasl_simple_cb;
+ ret[n].context = (char *) authname;
+ n++;
+ }
+
+ if (realm) {
+ /* realm */
+ ret[n].id = SASL_CB_GETREALM;
+ ret[n].proc = &mysasl_getrealm_cb;
+ ret[n].context = (char *) realm;
+ n++;
+ }
+
+ if (password) {
+ sasl_secret_t *secret;
+ size_t len = strlen(password);
+
+ secret = (sasl_secret_t *)xmalloc(sizeof(sasl_secret_t) + len);
+ if(!secret) {
+ free(ret);
+ return NULL;
+ }
+
+ strcpy(secret->data,password);
+ secret->len = len;
+
+ /* password */
+ ret[n].id = SASL_CB_PASS;
+ ret[n].proc = &mysasl_getsecret_cb;
+ ret[n].context = secret;
+ n++;
+ }
+
+ ret[n].id = SASL_CB_LIST_END;
+ ret[n].proc = NULL;
+ ret[n].context = NULL;
+
+ return ret;
+}
+
+void free_callbacks(sasl_callback_t *in)
+{
+ int i;
+ if(!in) return;
+
+ for(i=0; in[i].id != SASL_CB_LIST_END; i++)
+ if(in[i].id == SASL_CB_PASS)
+ free(in[i].context);
+
+ free(in);
+}
+
+#define BASE64_BUF_SIZE 21848 /* per RFC 2222bis: ((16K / 3) + 1) * 4 */
+#define AUTH_BUF_SIZE BASE64_BUF_SIZE+50 /* data + response overhead */
+
+int saslclient(sasl_conn_t *conn, struct sasl_cmd_t *sasl_cmd,
+ const char *mechlist,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, const char **status)
+{
+ static char buf[AUTH_BUF_SIZE+1];
+ char *base64, *serverin;
+ unsigned int serverinlen = 0;
+ const char *mech, *clientout = NULL;
+ unsigned int clientoutlen = 0;
+ char cmdbuf[40];
+ int sendliteral = sasl_cmd->quote;
+ int r;
+
+ if (status) *status = NULL;
+
+ r = sasl_client_start(conn, mechlist, NULL,
+ /* do we support initial response? */
+ sasl_cmd->maxlen ? &clientout : NULL,
+ &clientoutlen, &mech);
+
+ if (r != SASL_OK && r != SASL_CONTINUE) {
+ if (sasl_result) *sasl_result = r;
+ if (status) *status = sasl_errdetail(conn);
+ return IMAP_SASL_FAIL;
+ }
+
+ /* build the auth command */
+ if (sasl_cmd->quote)
+ sprintf(cmdbuf, "%s \"%s\"", sasl_cmd->cmd, mech);
+ else
+ sprintf(cmdbuf, "%s %s", sasl_cmd->cmd, mech);
+ prot_printf(pout, "%s", cmdbuf);
+
+ if (clientout) { /* initial response */
+ if (!clientoutlen) { /* zero-length initial response */
+ prot_printf(pout, " =");
+
+ clientout = NULL;
+ }
+ else if (!sendliteral &&
+ ((strlen(cmdbuf) + clientoutlen + 3) > sasl_cmd->maxlen)) {
+ /* initial response is too long for auth command,
+ so wait for a server challenge before sending it */
+ goto noinitresp;
+ }
+ else { /* full response -- encoded below */
+ prot_printf(pout, " ");
+ }
+ }
+
+ do {
+ char *p;
+
+ if (clientout) { /* response */
+ /* convert to base64 */
+ base64 = buf;
+ r = sasl_encode64(clientout, clientoutlen,
+ base64, BASE64_BUF_SIZE, NULL);
+
+ clientout = NULL;
+
+ /* send to server */
+ if (sendliteral) {
+ prot_printf(pout, "{%d+}\r\n", strlen(base64));
+ prot_flush(pout);
+ }
+ prot_printf(pout, "%s", base64);
+ }
+ noinitresp:
+ prot_printf(pout, "\r\n");
+ prot_flush(pout);
+
+ /* get challenge/reply from the server */
+ if (!prot_fgets(buf, AUTH_BUF_SIZE, pin)) {
+ if (sasl_result) *sasl_result = SASL_FAIL;
+ if (status) *status = "EOF from server";
+ return IMAP_SASL_PROTERR;
+ }
+
+ /* check response code */
+ base64 = NULL;
+ if (!strncasecmp(buf, sasl_cmd->ok, strlen(sasl_cmd->ok))) {
+ /* success */
+ if (sasl_cmd->parse_success) /* parse success data */
+ base64 = sasl_cmd->parse_success(buf, status);
+
+ if (!base64 /* no success data */
+ && status) *status = buf + strlen(sasl_cmd->ok);
+
+ r = SASL_OK;
+ }
+ else if (!strncasecmp(buf, sasl_cmd->fail, strlen(sasl_cmd->fail))) {
+ /* failure */
+ if (status) *status = buf + strlen(sasl_cmd->fail);
+ r = SASL_BADAUTH;
+ break;
+ }
+ else if (sasl_cmd->cont &&
+ !strncasecmp(buf, sasl_cmd->cont, strlen(sasl_cmd->cont))) {
+ /* continue */
+ base64 = buf + strlen(sasl_cmd->cont);
+ }
+ else if (!sasl_cmd->cont && buf[0] == '{') {
+ unsigned int litsize = atoi(buf+1);
+
+ /* get actual literal data */
+ if (!prot_fgets(buf, AUTH_BUF_SIZE, pin)) {
+ if (sasl_result) *sasl_result = SASL_FAIL;
+ if (status) *status = "EOF from server";
+ return IMAP_SASL_PROTERR;
+ }
+
+ base64 = buf;
+ }
+ else {
+ /* unknown response */
+ if (status) *status = buf;
+ r = SASL_BADPROT;
+ }
+
+ if (base64) { /* challenge/success data */
+ /* trim CRLF */
+ p = base64 + strlen(base64) - 1;
+ if (p >= base64 && *p == '\n') *p-- = '\0';
+ if (p >= base64 && *p == '\r') *p-- = '\0';
+
+ /* decode the challenge */
+ serverin = buf;
+ r = sasl_decode64(base64, strlen(base64),
+ serverin, BASE64_BUF_SIZE, &serverinlen);
+
+ if (r == SASL_OK &&
+ (serverinlen || !clientout)) { /* no delayed initial response */
+ /* do the next step */
+ r = sasl_client_step(conn, serverin, serverinlen, NULL,
+ &clientout, &clientoutlen);
+ }
+ }
+
+ if (r != SASL_OK && r != SASL_CONTINUE) {
+ /* cancel the exchange */
+ prot_printf(pout, "%s\r\n", sasl_cmd->cancel);
+ prot_flush(pout);
+ }
+
+ sendliteral = !sasl_cmd->cont;
+
+ } while (r == SASL_CONTINUE || (r == SASL_OK && clientout));
+
+ if (sasl_result) *sasl_result = r;
+
+ return (r == SASL_OK ? 0 : IMAP_SASL_FAIL);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslclient.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,77 @@
+/* saslclient.c -- shared SASL code for server-server authentication
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: saslclient.h,v 1.2 2003/10/22 18:02:59 rjs3 Exp $ */
+
+#ifndef SASLCLIENT_H
+#define SASLCLIENT_H
+
+#include <sasl/sasl.h>
+
+#include "prot.h"
+
+struct sasl_cmd_t {
+ const char *cmd; /* auth command string */
+ int maxlen; /* maximum command line length
+ (0 = initial response unsupported by protocol) */
+ int quote; /* quote arguments (literal for base64 data) */
+ const char *ok; /* success response string */
+ const char *fail; /* failure response string */
+ const char *cont; /* continue response string
+ (NULL = send/receive literals) */
+ const char *cancel; /* cancel auth string */
+ char *(*parse_success)(char *str, const char **status);
+ /* [OPTIONAL] parse response for success data */
+};
+
+sasl_callback_t *mysasl_callbacks(const char *username,
+ const char *authname,
+ const char *realm,
+ const char *password);
+
+void free_callbacks(sasl_callback_t *in);
+
+int saslclient(sasl_conn_t *conn, struct sasl_cmd_t *sasl_cmd,
+ const char *mechlist,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, const char **status);
+
+#endif /* SASLCLIENT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslserver.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslserver.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslserver.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/saslserver.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,149 @@
+/* saslserver.c -- shared SASL code for server-side authentication
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: saslserver.c,v 1.5.2.4 2005/02/21 19:25:45 ken3 Exp $ */
+
+#include <config.h>
+
+#include <string.h>
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "prot.h"
+#include "imap_err.h"
+#include "xmalloc.h"
+
+#define BASE64_BUF_SIZE 21848 /* per RFC 2222bis: ((16K / 3) + 1) * 4 */
+
+/* NOTE: success_data will need to be free()d by the caller */
+int saslserver(sasl_conn_t *conn, const char *mech,
+ const char *init_resp, const char *resp_prefix,
+ const char *continuation, const char *empty_chal,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, char **success_data)
+{
+ char base64[BASE64_BUF_SIZE+1];
+ char *clientin = NULL;
+ unsigned int clientinlen = 0;
+ const char *serverout;
+ unsigned int serveroutlen;
+ int r = SASL_OK;
+
+ if (success_data) *success_data = NULL;
+
+ /* initial response */
+ if (init_resp) {
+ clientin = base64;
+ if (!strcmp(init_resp, "=")) {
+ /* zero-length initial response */
+ base64[0] = '\0';
+ }
+ else {
+ r = sasl_decode64(init_resp, strlen(init_resp),
+ clientin, BASE64_BUF_SIZE, &clientinlen);
+ }
+ }
+
+ /* start the exchange */
+ if (r == SASL_OK)
+ r = sasl_server_start(conn, mech, clientin, clientinlen,
+ &serverout, &serveroutlen);
+
+ while (r == SASL_CONTINUE) {
+ char *p;
+
+ /* send the challenge to the client */
+ if (serveroutlen) {
+ r = sasl_encode64(serverout, serveroutlen,
+ base64, BASE64_BUF_SIZE, NULL);
+ if (r != SASL_OK) break;
+ serverout = base64;
+ }
+ else {
+ serverout = empty_chal;
+ }
+
+ prot_printf(pout, "%s%s\r\n", continuation, serverout);
+ prot_flush(pout);
+
+ /* get response from the client */
+ if (!prot_fgets(base64, BASE64_BUF_SIZE, pin) ||
+ strncasecmp(base64, resp_prefix, strlen(resp_prefix))) {
+ if (sasl_result) *sasl_result = SASL_FAIL;
+ return IMAP_SASL_PROTERR;
+ }
+
+ /* trim CRLF */
+ p = base64 + strlen(base64) - 1;
+ if (p >= base64 && *p == '\n') *p-- = '\0';
+ if (p >= base64 && *p == '\r') *p-- = '\0';
+
+ /* trim prefix */
+ p = base64 + strlen(resp_prefix);
+
+ /* check if client cancelled */
+ if (p[0] == '*') {
+ if(sasl_result) *sasl_result = SASL_BADPROT;
+ return IMAP_SASL_CANCEL;
+ }
+
+ /* decode the response */
+ clientin = base64;
+ r = sasl_decode64(p, strlen(p),
+ clientin, BASE64_BUF_SIZE, &clientinlen);
+ if (r != SASL_OK) break;
+
+ /* do the next step */
+ r = sasl_server_step(conn, clientin, clientinlen,
+ &serverout, &serveroutlen);
+ }
+
+ /* success data */
+ if (r == SASL_OK && serverout && success_data) {
+ r = sasl_encode64(serverout, serveroutlen,
+ base64, BASE64_BUF_SIZE, NULL);
+ if (r == SASL_OK)
+ *success_data = (char *) xstrdup(base64);
+ }
+
+ if (sasl_result) *sasl_result = r;
+ return (r == SASL_OK ? 0 : IMAP_SASL_FAIL);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,329 @@
+/* search_engines.c -- Prefiltering routines for SEARCH
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: search_engines.c,v 1.5.4.1 2004/04/08 21:13:08 ken3 Exp $
+ */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <syslog.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "imapd.h"
+#include "global.h"
+#include "xmalloc.h"
+
+#include "squat.h"
+
+typedef struct {
+ unsigned char* vector;
+ struct mailbox* mailbox;
+ char const* part_types;
+ int found_validity;
+} SquatSearchResult;
+
+static int vector_len() {
+ return (imapd_exists >> 3) + 1;
+}
+
+/* The document name is of the form
+
+ pnnn.vvv
+
+ Where p is a part_type character (denoting which segment of the message
+ is represented by the document), nnn is the UID of the message, and vvv
+ is the UID validity value.
+
+ This function parses the document name and returns the message
+ UID only if the name has the right part type and it corresponds
+ to a real message UID.
+*/
+static int parse_doc_name(SquatSearchResult* r, char const* doc_name) {
+ int ch = doc_name[0];
+ char const* t = r->part_types;
+ int doc_UID, index;
+
+ if (ch == 'v' && strncmp(doc_name, "validity.", 9) == 0) {
+ if (atoi(doc_name + 9) == r->mailbox->uidvalidity) {
+ r->found_validity = 1;
+ }
+ return -1;
+ }
+
+ /* make sure that the document part type is one of the ones we're
+ accepting */
+ while (*t != 0 && *t != ch) {
+ t++;
+ }
+ if (*t == 0) {
+ return -1;
+ }
+
+ doc_UID = atoi(++doc_name);
+ while ((*doc_name >= '0' && *doc_name <= '9') || *doc_name == '-') {
+ ++doc_name;
+ }
+ if (*doc_name != 0) {
+ return -1;
+ }
+
+ /* now we need to convert the UID to the message sequence number */
+ index = index_finduid(doc_UID);
+ if (index < 1 || index > imapd_exists || doc_UID != index_getuid(index)) {
+ return -1;
+ }
+
+ return index;
+}
+
+static int drop_indexed_docs(void* closure, SquatListDoc const* doc) {
+ SquatSearchResult* r = (SquatSearchResult*)closure;
+ int doc_ID = parse_doc_name(r, doc->doc_name);
+
+ if (doc_ID >= 0) {
+ unsigned char* vect = r->vector;
+ vect[doc_ID >> 3] &= ~(1 << (doc_ID & 0x7));
+ }
+ return SQUAT_CALLBACK_CONTINUE;
+}
+
+static int fill_with_hits(void* closure, char const* doc) {
+ SquatSearchResult* r = (SquatSearchResult*)closure;
+ int doc_ID = parse_doc_name(r, doc);
+
+ if (doc_ID >= 0) {
+ unsigned char* vect = r->vector;
+ vect[doc_ID >> 3] |= 1 << (doc_ID & 0x7);
+ }
+ return SQUAT_CALLBACK_CONTINUE;
+}
+
+static int search_strlist(SquatSearchIndex* index, struct mailbox* mailbox,
+ unsigned char* output, unsigned char* tmp, struct strlist* strs,
+ char const* part_types) {
+ SquatSearchResult r;
+ int i;
+ int len = vector_len();
+
+ r.part_types = part_types;
+ r.vector = tmp;
+ r.mailbox = mailbox;
+ while (strs != NULL) {
+ char const* s = strs->s;
+
+ memset(tmp, 0, len);
+ if (squat_search_execute(index, s, strlen(s), fill_with_hits, &r)
+ != SQUAT_OK) {
+ syslog(LOG_DEBUG, "SQUAT string list search failed on string %s "
+ "with part types %s", s, part_types);
+ return 0;
+ }
+ for (i = 0; i < len; i++) {
+ output[i] &= tmp[i];
+ }
+
+ strs = strs->next;
+ }
+ return 1;
+}
+
+static unsigned char* search_squat_do_query(SquatSearchIndex* index,
+ struct mailbox* mailbox, struct searchargs* args) {
+ int vlen = vector_len();
+ unsigned char* vect = xmalloc(vlen);
+ unsigned char* t_vect = xmalloc(vlen);
+ unsigned char* result = vect;
+ struct searchsub* sub;
+
+ memset(vect, 255, vlen);
+
+ if (!(search_strlist(index, mailbox, vect, t_vect, args->to, "t")
+ && search_strlist(index, mailbox, vect, t_vect, args->from, "f")
+ && search_strlist(index, mailbox, vect, t_vect, args->cc, "c")
+ && search_strlist(index, mailbox, vect, t_vect, args->bcc, "b")
+ && search_strlist(index, mailbox, vect, t_vect, args->subject, "s")
+ && search_strlist(index, mailbox, vect, t_vect, args->header_name, "h")
+ && search_strlist(index, mailbox, vect, t_vect, args->header, "h")
+ && search_strlist(index, mailbox, vect, t_vect, args->body, "m")
+ && search_strlist(index, mailbox, vect, t_vect, args->text, "mh"))) {
+ result = NULL;
+ goto cleanup;
+ }
+
+ sub = args->sublist;
+ while (sub != NULL) {
+ if (args->sublist->sub2 == NULL) {
+ /* do nothing; because our search is conservative (may include false
+ positives) we can't compute the NOT (since the result might include
+ false negatives, which we do not allow) */
+ /* Note that it's OK to do nothing. We'll just be returning more
+ false positives. */
+ } else {
+ unsigned char* sub1_vect =
+ search_squat_do_query(index, mailbox, args->sublist->sub1);
+ unsigned char* sub2_vect;
+ int i;
+
+ if (sub1_vect == NULL) {
+ result = NULL;
+ goto cleanup;
+ }
+
+ sub2_vect = search_squat_do_query(index, mailbox, args->sublist->sub2);
+
+ if (sub2_vect == NULL) {
+ result = NULL;
+ free(sub1_vect);
+ goto cleanup;
+ }
+
+ for (i = 0; i < vlen; i++) {
+ vect[i] &= sub1_vect[i] | sub2_vect[i];
+ }
+
+ free(sub1_vect);
+ free(sub2_vect);
+ }
+
+ sub = sub->next;
+ }
+
+cleanup:
+ free(t_vect);
+ if (result != vect) {
+ free(vect);
+ }
+
+ return result;
+}
+
+static int search_squat(unsigned* msg_list, struct mailbox *mailbox,
+ struct searchargs *searchargs) {
+ char index_file_name[MAX_MAILBOX_PATH+1], *path;
+ int fd;
+ SquatSearchIndex* index;
+ unsigned char* msg_vector;
+ int result;
+
+ path = mailbox->mpath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_SQUAT) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(index_file_name, path, sizeof(index_file_name));
+ strlcat(index_file_name, FNAME_SQUAT_INDEX, sizeof(index_file_name));
+ if ((fd = open(index_file_name, O_RDONLY)) < 0) {
+ syslog(LOG_DEBUG, "SQUAT failed to open index file");
+ return -1; /* probably not found. Just bail */
+ }
+ if ((index = squat_search_open(fd)) == NULL) {
+ syslog(LOG_DEBUG, "SQUAT failed to open index");
+ close(fd);
+ return -1;
+ }
+ if ((msg_vector = search_squat_do_query(index, mailbox, searchargs))
+ == NULL) {
+ result = -1;
+ } else {
+ int i;
+ int vlen = vector_len();
+ unsigned char* unindexed_vector = xmalloc(vlen);
+ SquatSearchResult r;
+
+ memset(unindexed_vector, 255, vlen);
+ r.vector = unindexed_vector;
+ r.mailbox = mailbox;
+ r.part_types = "tfcbsmh";
+ r.found_validity = 0;
+ if (squat_search_list_docs(index, drop_indexed_docs, &r) != SQUAT_OK) {
+ syslog(LOG_DEBUG, "SQUAT failed to get list of indexed documents");
+ result = -1;
+ } else if (!r.found_validity) {
+ syslog(LOG_DEBUG, "SQUAT didn't find validity record");
+ result = -1;
+ } else {
+ /* Add in any unindexed messages. They must be searched manually. */
+ for (i = 0; i < vlen; i++) {
+ msg_vector[i] |= unindexed_vector[i];
+ }
+
+ result = 0;
+ for (i = 1; i <= imapd_exists; i++) {
+ if ((msg_vector[i >> 3] & (1 << (i & 7))) != 0) {
+ msg_list[result] = i;
+ result++;
+ }
+ }
+ }
+ free(msg_vector);
+ free(unindexed_vector);
+ }
+ squat_search_close(index);
+ close(fd);
+ return result;
+}
+
+int search_prefilter_messages(unsigned* msg_list, struct mailbox *mailbox,
+ struct searchargs *searchargs) {
+ int i, count;
+
+ if (SQUAT_ENGINE) {
+ count = search_squat(msg_list, mailbox, searchargs);
+ if (count >= 0) {
+ syslog(LOG_DEBUG, "SQUAT returned %d messages", count);
+ return count;
+ } else {
+ /* otherwise, we failed for some reason, so do the default */
+ syslog(LOG_DEBUG, "SQUAT failed");
+ }
+ }
+
+ /* Just put in all possible messages. This falls back to Cyrus' default
+ search. */
+ for (i = 0; i < imapd_exists; i++) {
+ msg_list[i] = i + 1;
+ }
+ return imapd_exists;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/search_engines.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,57 @@
+/* search_engines.h -- Prefiltering routines for SEARCH
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: search_engines.h,v 1.2 2003/02/13 20:15:30 rjs3 Exp $
+ */
+
+#ifndef INCLUDED_SEARCH_ENGINES_H
+#define INCLUDED_SEARCH_ENGINES_H
+
+#include "imapd.h"
+
+/* Fill the msg_list with a list of message IDs which could match the
+ * searchargs.
+ * Return the number of message IDs inserted.
+ */
+extern int search_prefilter_messages(unsigned* msg_list,
+ struct mailbox *mailbox,
+ struct searchargs *searchargs);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,105 @@
+/* seen.h -- abstract interface for /Recent and /Seen information
+ * $Id: seen.h,v 1.14 2003/10/22 18:50:08 rjs3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+
+#ifndef SEEN_H
+#define SEEN_H
+
+struct seen;
+
+#define SEEN_CREATE 0x01
+
+/* get a database handle corresponding to (mailbox, user) pair */
+int seen_open(struct mailbox *mailbox,
+ const char *user,
+ int flags,
+ struct seen **seendbptr);
+
+/* read an entry from 'seendb' */
+int seen_read(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr);
+
+/* read an entry from 'seendb' and leave that record (or some superset
+ of it) locked for update */
+int seen_lockread(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr);
+
+/* write an entry to 'seendb'; should have been already locked by
+ seen_lockread() */
+int seen_write(struct seen *seendb, time_t lastread, unsigned int lastuid,
+ time_t lastchange, char *seenuids);
+
+/* close this handle */
+int seen_close(struct seen *seendb);
+
+/* discard lock on handle */
+int seen_unlock(struct seen *seendb);
+
+/* called on mailbox operations */
+int seen_create_mailbox(struct mailbox *mailbox);
+int seen_delete_mailbox(struct mailbox *mailbox);
+int seen_copy(struct mailbox *oldmailbox,struct mailbox *newmailbox);
+
+/* called on user operations */
+int seen_create_user(const char *user);
+int seen_delete_user(const char *user);
+int seen_rename_user(const char *olduser, const char *newuser);
+
+int seen_reconstruct(struct mailbox *mailbox,
+ time_t report_time,
+ time_t prune_time,
+ int (*report_proc)(),
+ void *report_rock);
+
+/* done with all seen operations for this process */
+int seen_done(void);
+
+/* Return a path to the seen database for the given user (or NULL if we are
+ * using bigdb) */
+char *seen_getpath(const char *userid);
+
+/* Merge tmpfile into tgtfile */
+int seen_merge(const char *tmpfile, const char *tgtfile);
+
+#endif /* SEEN_LOCAL_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_bigdb.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_bigdb.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_bigdb.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_bigdb.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,405 @@
+/* seen_bigdb.c -- implementation of seen database using one big cyrusdb
+ * $Id: seen_bigdb.c,v 1.9.2.1 2003/12/19 18:33:38 ken3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include "cyrusdb.h"
+
+#include "global.h"
+#include "xmalloc.h"
+#include "mailbox.h"
+#include "imap_err.h"
+#include "exitcodes.h"
+
+#include "cyrusdb.h"
+#include "seen.h"
+
+#define FNAME_SEENDB "/seenstate.db"
+
+/* choose "flat" or "berkeley" here --- berkeley highly recommended */
+#define DB (&cyrusdb_berkeley)
+
+enum {
+ MAX_KEY = MAX_MAILBOX_PATH + MAX_MAILBOX_NAME + 30,
+ SEEN_VERSION = 1,
+ SEEN_DEBUG = 0
+};
+
+struct seen {
+ const char *user; /* what user is this for? */
+ const char *uniqueid; /* what mailbox? */
+ struct txn *tid; /* outstanding txn, if any */
+};
+
+static int seen_inited = 0;
+static struct db *bigdb;
+
+/* Stub */
+char *seen_getpath(const char *userid)
+{
+ return NULL;
+}
+
+static void seen_init(void)
+{
+ int r;
+ char fname[1024];
+
+ assert(!seen_inited);
+
+ /* create db file name */
+ strcpy(fname, config_dir);
+ strcat(fname, FNAME_SEENDB);
+
+ r = DB->open(fname, CYRUSDB_CREATE, &bigdb);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
+ cyrusdb_strerror(r));
+ fatal("can't read seenstate file", EC_TEMPFAIL);
+ }
+
+ seen_inited = 1;
+}
+
+/* get a database handle corresponding to (mailbox, user) pair */
+int seen_open(struct mailbox *mailbox,
+ const char *user,
+ int flags __attribute__((unused)),
+ struct seen **seendbptr)
+{
+ struct seen *ret;
+
+ if (!seen_inited) {
+ seen_init();
+ }
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_bigdb: seen_open(%s, %s)",
+ mailbox->uniqueid, user);
+ }
+
+ ret = (struct seen *) xmalloc(sizeof(struct seen));
+ ret->tid = NULL;
+ ret->uniqueid = mailbox->uniqueid;
+ ret->user = user;
+
+ *seendbptr = ret;
+ return 0;
+}
+
+/* construct the key for this uniqueid/user pair; ret must be at least
+ MAX_KEY long */
+static int getkey(const char *uniqueid, const char *user,
+ char *ret)
+{
+ assert(uniqueid && user);
+ assert(ret);
+
+ snprintf(ret, MAX_KEY, "%s//%s", uniqueid, user);
+
+ return 0;
+}
+
+static int seen_readit(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr,
+ int rw)
+{
+ char key[MAX_KEY];
+ const char *data, *dstart, *dend;
+ char *p;
+ int datalen;
+ int version;
+ int uidlen;
+ int r;
+
+ assert(seendb);
+ getkey(seendb->uniqueid, seendb->user, key);
+
+ if (rw) {
+ r = DB->fetchlock(bigdb, key, strlen(key),
+ &data, &datalen, &seendb->tid);
+ } else {
+ r = DB->fetch(bigdb, key, strlen(key),
+ &data, &datalen, NULL);
+ }
+ switch (r) {
+ case 0:
+ break;
+ case CYRUSDB_AGAIN:
+ syslog(LOG_DEBUG, "deadlock in seen database for '%s/%s'",
+ seendb->user, seendb->uniqueid);
+ return IMAP_AGAIN;
+ break;
+ case CYRUSDB_IOERROR:
+ syslog(LOG_ERR, "DBERROR: error fetching txn", cyrusdb_strerror(r));
+ return IMAP_IOERROR;
+ break;
+ case CYRUSDB_NOTFOUND:
+ *lastreadptr = 0;
+ *lastuidptr = 0;
+ *lastchangeptr = 0;
+ *seenuidsptr = xstrdup("");
+ return 0;
+ break;
+ }
+
+ /* remember that 'data' may not be null terminated ! */
+ dstart = data;
+ dend = data + datalen;
+
+ version = strtol(data, &p, 10); data = p;
+ assert(version == SEEN_VERSION);
+ *lastreadptr = strtol(data, &p, 10); data = p;
+ *lastuidptr = strtol(data, &p, 10); data = p;
+ *lastchangeptr = strtol(data, &p, 10); data = p;
+ while (isspace((int) *p) && p < dend) p++; data = p;
+ uidlen = dend - data;
+ *seenuidsptr = xmalloc(uidlen + 1);
+ memcpy(*seenuidsptr, data, uidlen);
+ (*seenuidsptr)[uidlen] = '\0';
+
+ return 0;
+}
+/* read an entry from 'seendb' */
+int seen_read(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr)
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_bigdb: seen_read(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ return seen_readit(seendb, lastreadptr, lastuidptr, lastchangeptr,
+ seenuidsptr, 0);
+}
+
+/* read an entry from 'seendb' and leave that record (or some superset
+ of it) locked for update */
+int seen_lockread(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr)
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_bigdb: seen_lockread(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ return seen_readit(seendb, lastreadptr, lastuidptr, lastchangeptr,
+ seenuidsptr, 1);
+}
+
+/* write an entry to 'seendb'; should have been already locked by
+ seen_lockread() */
+int seen_write(struct seen *seendb, time_t lastread, unsigned int lastuid,
+ time_t lastchange, char *seenuids)
+{
+ char key[MAX_KEY];
+ int sz = strlen(seenuids) + 50;
+ char *data = xmalloc(sz);
+ int datalen;
+ int r;
+
+ assert(seendb && seendb->tid);
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_write(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ getkey(seendb->uniqueid, seendb->user, key);
+ sprintf(data, "%d %d %d %d %s", SEEN_VERSION,
+ (int) lastread, lastuid, (int) lastchange, seenuids);
+ datalen = strlen(data);
+
+ r = DB->store(bigdb, key, strlen(key), data, datalen, &seendb->tid);
+ switch (r) {
+ case CYRUSDB_OK:
+ break;
+ case CYRUSDB_IOERROR:
+ r = IMAP_AGAIN;
+ break;
+ default:
+ syslog(LOG_ERR, "DBERROR: error updating database: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ free(data);
+ return r;
+}
+
+/* close this handle */
+int seen_close(struct seen *seendb)
+{
+ int r;
+
+ assert(seendb);
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_close(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ if (seendb->tid) {
+ r = DB->commit(bigdb, seendb->tid);
+ if (r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: error committing seen txn; "
+ "seen state lost: %s", cyrusdb_strerror(r));
+ }
+ seendb->tid = NULL;
+ }
+ free(seendb);
+
+ return 0;
+}
+
+/* discard lock on handle; commit any pending txns */
+int seen_unlock(struct seen *seendb)
+{
+ int r;
+
+ assert(seendb);
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_unlock(%s, %s)",
+ seendb->uniqueid, seendb->user);
+
+ }
+
+ r = DB->commit(bigdb, seendb->tid);
+ if (r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: error committing seen txn; "
+ "seen state lost: %s", cyrusdb_strerror(r));
+ }
+ seendb->tid = NULL;
+
+ return 0;
+}
+
+/* called on mailbox operations */
+int seen_create_mailbox(struct mailbox *mailbox)
+{
+ return 0; /* noop */
+}
+
+int seen_delete_mailbox(struct mailbox *mailbox)
+{
+ return 0; /* noop */
+}
+
+int seen_copy(struct mailbox *oldmailbox,struct mailbox *newmailbox)
+{
+ return 0; /* noop */
+}
+
+/* called on user operations */
+int seen_create_user(const char *user)
+{
+ return 0; /* noop */
+}
+
+int seen_delete_user(const char *user)
+{
+ return 0; /* noop */
+}
+
+int seen_rename_user(const char *olduser, const char *newuser)
+{
+ return 0; /* noop */
+}
+
+int seen_reconstruct(struct mailbox *mailbox,
+ time_t report_time,
+ time_t prune_time,
+ int (*report_proc)(),
+ void *report_rock)
+{
+ return 0; /* noop */
+}
+
+int seen_dump(void)
+{
+ /* need a way of dumping seen state */
+
+ return -1;
+}
+
+/* done with all seen operations for this process */
+int seen_done(void)
+{
+ int r;
+
+ if (seen_inited) {
+ r = DB->close(bigdb);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: closing seen database: %s",
+ cyrusdb_strerror(r));
+ fatal("can't read seenstate file", EC_TEMPFAIL);
+ }
+
+ seen_inited = 0;
+ }
+
+ return 0;
+}
+
+int seen_merge(const char *tmpfile, const char *tgtfile)
+{
+ /* Not supported */
+ return -1;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_db.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_db.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_db.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_db.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,673 @@
+/* seen_db.c -- implementation of seen database using per-user berkeley db
+ * $Id: seen_db.c,v 1.42.2.5 2004/06/24 15:16:29 ken3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include "cyrusdb.h"
+#include "map.h"
+#include "bsearch.h"
+#include "util.h"
+
+#include "global.h"
+#include "xmalloc.h"
+#include "mailbox.h"
+#include "imap_err.h"
+#include "seen.h"
+
+#define FNAME_SEENSUFFIX ".seen" /* per user seen state extension */
+#define FNAME_SEEN "/cyrus.seen" /* for legacy seen state */
+
+enum {
+ SEEN_VERSION = 1,
+ SEEN_DEBUG = 0
+};
+
+struct seen {
+ char *user; /* what user is this for? */
+ const char *uniqueid; /* what mailbox? */
+ const char *path; /* where is this mailbox? */
+ struct db *db;
+ struct txn *tid; /* outstanding txn, if any */
+ int converting;
+};
+
+static struct seen *lastseen = NULL;
+
+#define DB (config_seenstate_db)
+
+static void abortcurrent(struct seen *s)
+{
+ if (s && s->tid) {
+ int r = DB->abort(s->db, s->tid);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error aborting txn: %s",
+ cyrusdb_strerror(r));
+ }
+ s->tid = NULL;
+ }
+}
+
+char *seen_getpath(const char *userid)
+{
+ char *fname = xmalloc(strlen(config_dir) + sizeof(FNAME_DOMAINDIR) +
+ sizeof(FNAME_USERDIR) + strlen(userid) +
+ sizeof(FNAME_SEENSUFFIX) + 10);
+ char c, *domain;
+
+ if (config_virtdomains && (domain = strchr(userid, '@'))) {
+ char d = (char) dir_hash_c(domain+1);
+ *domain = '\0'; /* split user at domain */
+ c = (char) dir_hash_c(userid);
+ sprintf(fname, "%s%s%c/%s%s%c/%s%s", config_dir, FNAME_DOMAINDIR, d,
+ domain+1, FNAME_USERDIR, c, userid, FNAME_SEENSUFFIX);
+ *domain = '@'; /* reassemble user at domain */
+ }
+ else {
+ c = (char) dir_hash_c(userid);
+ sprintf(fname, "%s%s%c/%s%s", config_dir, FNAME_USERDIR, c, userid,
+ FNAME_SEENSUFFIX);
+ }
+
+ return fname;
+}
+
+int seen_open(struct mailbox *mailbox,
+ const char *user,
+ int flags,
+ struct seen **seendbptr)
+{
+ struct seen *seendb;
+ char *fname = NULL;
+ int r;
+
+ /* try to reuse the last db handle */
+ seendb = lastseen;
+ lastseen = NULL;
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_open(%s, %s)",
+ mailbox->uniqueid, user);
+ }
+
+ /* if this is the db we've already opened, return it */
+ if (seendb && !strcmp(seendb->user, user)) {
+ abortcurrent(seendb);
+ seendb->uniqueid = mailbox->uniqueid;
+ seendb->path = mailbox->path;
+ *seendbptr = seendb;
+ return 0;
+ }
+
+ *seendbptr = NULL;
+ /* otherwise, close the existing database */
+ if (seendb) {
+ abortcurrent(seendb);
+ r = DB->close(seendb->db);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing seendb: %s",
+ cyrusdb_strerror(r));
+ }
+ free(seendb->user);
+ } else {
+ /* create seendb */
+ seendb = (struct seen *) xmalloc(sizeof(struct seen));
+ }
+
+ /* open the seendb corresponding to user */
+ fname = seen_getpath(user);
+ r = DB->open(fname, (flags & SEEN_CREATE) ? CYRUSDB_CREATE : 0,
+ &seendb->db);
+ if (r != 0) {
+ int level = (flags & SEEN_CREATE) ? LOG_ERR : LOG_DEBUG;
+ syslog(level, "DBERROR: opening %s: %s", fname,
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ free(seendb);
+ free(fname);
+ return r;
+ }
+ syslog(LOG_DEBUG, "seen_db: user %s opened %s", user, fname);
+ free(fname);
+
+ seendb->tid = NULL;
+ seendb->uniqueid = mailbox->uniqueid;
+ seendb->path = mailbox->path;
+ seendb->user = xstrdup(user);
+
+ *seendbptr = seendb;
+ return r;
+}
+
+static int seen_readold(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ struct stat sbuf;
+ int fd;
+ const char *base;
+ const char *buf = 0, *p;
+ unsigned long len = 0, linelen;
+ unsigned long offset = 0;
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_readold(%s, %s)",
+ seendb->path, seendb->user);
+ }
+
+ strlcpy(fnamebuf, seendb->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf));
+
+ fd = open(fnamebuf, O_RDWR, 0);
+
+ *lastreadptr = 0;
+ *lastuidptr = 0;
+ *lastchangeptr = 0;
+
+ if (fd == -1 && errno == ENOENT) {
+ /* no old-style seen file for this database */
+ *seenuidsptr = xstrdup("");
+ return 0;
+ } else if (fd == -1) {
+ syslog(LOG_ERR, "error opening '%s': %m", fnamebuf);
+ return IMAP_IOERROR;
+ }
+
+ if (fstat(fd, &sbuf) == -1) {
+ close(fd);
+ return IMAP_IOERROR;
+ }
+ map_refresh(fd, 1, &base, &len, sbuf.st_size, fnamebuf, 0);
+
+ /* Find record for user */
+ offset = bsearch_mem(seendb->user, 1, base, len, 0, &linelen);
+
+ if (!linelen) {
+ *seenuidsptr = xstrdup("");
+ close(fd);
+ return 0;
+ }
+
+ /* Skip over username we know is there */
+ buf = base + offset + strlen(seendb->user)+1;
+ *lastreadptr = strtol(buf, (char **) &p, 10); buf = p;
+ *lastuidptr = strtol(buf, (char **) &p, 10); buf = p;
+ *lastchangeptr = strtol(buf, (char **) &p, 10); buf = p;
+ while (isspace((int) *p)) p++;
+ buf = p;
+ /* Scan for end of uids */
+ while (p < base + offset + linelen && !isspace((int) *p)) p++;
+
+ *seenuidsptr = xmalloc(p - buf + 1);
+ strlcpy(*seenuidsptr, buf, p - buf + 1);
+
+ map_free(&base, &len);
+ close(fd);
+
+ return 0;
+}
+
+static int seen_readit(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr,
+ int rw)
+{
+ int r;
+ const char *data, *dstart, *dend;
+ char *p;
+ int datalen;
+ int version;
+ int uidlen;
+
+ assert(seendb && seendb->uniqueid);
+ if (rw || seendb->tid) {
+ r = DB->fetchlock(seendb->db,
+ seendb->uniqueid, strlen(seendb->uniqueid),
+ &data, &datalen, &seendb->tid);
+ } else {
+ r = DB->fetch(seendb->db,
+ seendb->uniqueid, strlen(seendb->uniqueid),
+ &data, &datalen, NULL);
+ }
+ switch (r) {
+ case 0:
+ break;
+ case CYRUSDB_AGAIN:
+ syslog(LOG_DEBUG, "deadlock in seen database for '%s/%s'",
+ seendb->user, seendb->uniqueid);
+ return IMAP_AGAIN;
+ break;
+ case CYRUSDB_IOERROR:
+ syslog(LOG_ERR, "DBERROR: error fetching txn %s",
+ cyrusdb_strerror(r));
+ return IMAP_IOERROR;
+ break;
+ case CYRUSDB_NOTFOUND:
+ r = seen_readold(seendb, lastreadptr, lastuidptr,
+ lastchangeptr, seenuidsptr);
+ if (r) {
+ abortcurrent(seendb);
+ }
+ return r;
+ break;
+ }
+
+ /* remember that 'data' may not be null terminated ! */
+ dstart = data;
+ dend = data + datalen;
+
+ version = strtol(data, &p, 10); data = p;
+ assert(version == SEEN_VERSION);
+ *lastreadptr = strtol(data, &p, 10); data = p;
+ *lastuidptr = strtol(data, &p, 10); data = p;
+ *lastchangeptr = strtol(data, &p, 10); data = p;
+ while (p < dend && isspace((int) *p)) p++; data = p;
+ uidlen = dend - data;
+ *seenuidsptr = xmalloc(uidlen + 1);
+ memcpy(*seenuidsptr, data, uidlen);
+ (*seenuidsptr)[uidlen] = '\0';
+
+ return 0;
+}
+
+int seen_read(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr)
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_read(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ return seen_readit(seendb, lastreadptr, lastuidptr, lastchangeptr,
+ seenuidsptr, 0);
+}
+
+int seen_lockread(struct seen *seendb,
+ time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr)
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_lockread(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ return seen_readit(seendb, lastreadptr, lastuidptr, lastchangeptr,
+ seenuidsptr, 1);
+}
+
+int seen_write(struct seen *seendb, time_t lastread, unsigned int lastuid,
+ time_t lastchange, char *seenuids)
+{
+ int sz = strlen(seenuids) + 50;
+ char *data = xmalloc(sz);
+ int datalen;
+ int r;
+
+ assert(seendb && seendb->uniqueid);
+ assert(seendb->tid);
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_write(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ snprintf(data, sz, "%d %d %d %d %s", SEEN_VERSION,
+ (int) lastread, lastuid, (int) lastchange, seenuids);
+ datalen = strlen(data);
+
+ r = DB->store(seendb->db, seendb->uniqueid, strlen(seendb->uniqueid),
+ data, datalen, &seendb->tid);
+ switch (r) {
+ case CYRUSDB_OK:
+ break;
+ case CYRUSDB_IOERROR:
+ r = IMAP_AGAIN;
+ break;
+ default:
+ syslog(LOG_ERR, "DBERROR: error updating database: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ free(data);
+ return r;
+}
+
+int seen_close(struct seen *seendb)
+{
+ int r;
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_close(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ if (seendb->tid) {
+ r = DB->commit(seendb->db, seendb->tid);
+ if (r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: error committing seen txn; "
+ "seen state lost: %s", cyrusdb_strerror(r));
+ }
+ seendb->tid = NULL;
+ }
+
+ seendb->uniqueid = NULL;
+ seendb->path = NULL;
+
+ if (lastseen) {
+ int r;
+
+ /* free the old database hanging around */
+ abortcurrent(lastseen);
+ r = DB->close(lastseen->db);
+ if (r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: error closing lastseen: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ if(!r) lastseen->db = NULL;
+ free(lastseen->user);
+ free(lastseen);
+ lastseen = NULL;
+ }
+
+ /* this database can now be reused */
+ lastseen = seendb;
+ return 0;
+}
+
+int seen_create_mailbox(struct mailbox *mailbox)
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_create_mailbox(%s)",
+ mailbox->uniqueid);
+ }
+
+ /* noop */
+ return 0;
+}
+
+int seen_delete_mailbox(struct mailbox *mailbox)
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_delete_mailbox(%s)",
+ mailbox->uniqueid);
+ }
+
+ /* noop */
+ return 0;
+}
+
+int seen_create_user(const char *user)
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_create_user(%s)",
+ user);
+ }
+
+ /* we'll be lazy here and create this when needed */
+ return 0;
+}
+
+int seen_delete_user(const char *user)
+{
+ char *fname = seen_getpath(user);
+ int r = 0;
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_delete_user(%s)",
+ user);
+ }
+
+ /* erp! */
+ r = unlink(fname);
+ if (r < 0 && errno == ENOENT) {
+ syslog(LOG_DEBUG, "can not unlink %s: %m", fname);
+ /* but maybe the user just never read anything? */
+ r = 0;
+ }
+ else if (r < 0) {
+ syslog(LOG_ERR, "error unlinking %s: %m", fname);
+ r = IMAP_IOERROR;
+ }
+ free(fname);
+
+ return r;
+}
+
+int seen_rename_user(const char *olduser, const char *newuser)
+{
+ char *oldfname = seen_getpath(olduser);
+ char *newfname = seen_getpath(newuser);
+ int r;
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_rename_user(%s, %s)",
+ olduser, newuser);
+ }
+
+ r = seen_merge(oldfname, newfname);
+
+ free(oldfname);
+ free(newfname);
+
+ return r;
+}
+
+int seen_copy(struct mailbox *oldmailbox, struct mailbox *newmailbox)
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_copy(%s, %s)",
+ oldmailbox->uniqueid, newmailbox->uniqueid);
+ }
+
+ /* noop */
+ return 0;
+}
+
+/* database better have been locked before this ! */
+int seen_unlock(struct seen *seendb)
+{
+ int r;
+
+ assert(seendb);
+ if (!seendb->tid) return 0;
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_unlock(%s, %s)",
+ seendb->uniqueid, seendb->user);
+ }
+
+ r = DB->commit(seendb->db, seendb->tid);
+ if (r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: error committing seen txn; "
+ "seen state lost: %s", cyrusdb_strerror(r));
+ }
+ seendb->tid = NULL;
+
+ return 0;
+}
+
+int seen_done(void)
+{
+ int r = 0;
+
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_done()");
+ }
+
+ if (lastseen) {
+ abortcurrent(lastseen);
+ r = DB->close(lastseen->db);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing lastseen: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ free(lastseen->user);
+ free(lastseen);
+ }
+
+ return r;
+}
+
+int seen_reconstruct(struct mailbox *mailbox __attribute__((unused)),
+ time_t report_time __attribute__((unused)),
+ time_t prune_time __attribute__((unused)),
+ int (*report_proc)() __attribute__((unused)),
+ void *report_rock __attribute__((unused)))
+{
+ if (SEEN_DEBUG) {
+ syslog(LOG_DEBUG, "seen_db: seen_reconstruct()");
+ }
+
+ /* not supported */
+ return 0;
+}
+
+struct seen_merge_rock
+{
+ struct db *db;
+ struct txn *tid;
+};
+
+/* Look up the unique id in the tgt file, if it is there, compare the
+ * last change times, and ensure that the tgt database uses the newer of
+ * the two */
+static int seen_merge_cb(void *rockp,
+ const char *key, int keylen,
+ const char *tmpdata, int tmpdatalen)
+{
+ int r;
+ struct seen_merge_rock *rockdata = (struct seen_merge_rock *)rockp;
+ struct db *tgtdb = rockdata->db;
+ const char *tgtdata;
+ int tgtdatalen, dirty = 0;
+
+ if(!tgtdb) return IMAP_INTERNAL;
+
+ r = DB->fetchlock(tgtdb, key, keylen, &tgtdata, &tgtdatalen,
+ &(rockdata->tid));
+ if(!r && tgtdata) {
+ /* compare timestamps */
+ int version, tmplast, tgtlast;
+ char *p;
+ const char *tmp = tmpdata, *tgt = tgtdata;
+
+ /* get version */
+ version = strtol(tgt, &p, 10); tgt = p;
+ assert(version == SEEN_VERSION);
+ /* skip lastread */
+ strtol(tgt, &p, 10); tgt = p;
+ /* skip lastuid */
+ strtol(tgt, &p, 10); tgt = p;
+ /* get lastchange */
+ tgtlast = strtol(tgt, &p, 10);
+
+ /* get version */
+ version = strtol(tmp, &p, 10); tmp = p;
+ assert(version == SEEN_VERSION);
+ /* skip lastread */
+ strtol(tmp, &p, 10); tmp = p;
+ /* skip lastuid */
+ strtol(tmp, &p, 10); tmp = p;
+ /* get lastchange */
+ tmplast = strtol(tmp, &p, 10);
+
+ if(tmplast > tgtlast) dirty = 1;
+ } else {
+ dirty = 1;
+ }
+
+ if(dirty) {
+ /* write back data from new entry */
+ return DB->store(tgtdb, key, keylen, tmpdata, tmpdatalen,
+ &(rockdata->tid));
+ } else {
+ return 0;
+ }
+}
+
+int seen_merge(const char *tmpfile, const char *tgtfile)
+{
+ int r = 0;
+ struct db *tmp = NULL, *tgt = NULL;
+ struct seen_merge_rock rock;
+
+ /* xxx does this need to be CYRUSDB_CREATE? */
+ r = DB->open(tmpfile, CYRUSDB_CREATE, &tmp);
+ if(r) goto done;
+
+ r = DB->open(tgtfile, CYRUSDB_CREATE, &tgt);
+ if(r) goto done;
+
+ rock.db = tgt;
+ rock.tid = NULL;
+
+ r = DB->foreach(tmp, "", 0, NULL, seen_merge_cb, &rock, &rock.tid);
+
+ if(r) DB->abort(rock.db, rock.tid);
+ else DB->commit(rock.db, rock.tid);
+
+ done:
+
+ if(tgt) DB->close(tgt);
+ if(tmp) DB->close(tmp);
+
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_local.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_local.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_local.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/seen_local.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,779 @@
+/* seen_local.c -- Storage for /Recent and /Seen state on local filesystem
+ * $Id: seen_local.c,v 1.41.2.2 2005/02/14 06:43:17 shadow Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <syslog.h>
+
+#include "assert.h"
+#include "map.h"
+#include "bsearch.h"
+#include "lock.h"
+#include "retry.h"
+#include "mailbox.h"
+#include "imap_err.h"
+#include "xmalloc.h"
+
+#include "seen.h"
+
+#define FNAME_SEEN "/cyrus.seen"
+
+struct seen {
+ int fd;
+ const char *base;
+ unsigned long size;
+ ino_t ino;
+ long offset;
+ long length;
+ struct mailbox *mailbox;
+ char *user;
+};
+
+/*
+ * Open the database for 'user's state in 'mailbox'.
+ * Returns pointer to abstract database type in buffer pointed to
+ * by 'seendbptr'.
+ */
+int seen_open(struct mailbox *mailbox, const char *user,
+ int flags __attribute__((unused)),
+ struct seen **seendbptr)
+{
+ struct seen *seendb;
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ struct stat sbuf;
+
+ seendb = (struct seen *)xmalloc(sizeof(struct seen));
+ seendb->mailbox = mailbox;
+ seendb->user = xstrdup(user);
+
+ strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf));
+
+ seendb->fd = open(fnamebuf, O_RDWR, 0666);
+ if (seendb->fd == -1) {
+ syslog(LOG_ERR, "IOERROR: opening %s: %m", fnamebuf);
+ free(seendb->user);
+ free((char *)seendb);
+ return IMAP_IOERROR;
+ }
+
+ if (fstat(seendb->fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m", fnamebuf);
+ close(seendb->fd);
+ free(seendb->user);
+ free((char *)seendb);
+ return IMAP_IOERROR;
+ }
+ seendb->ino = sbuf.st_ino;
+
+ seendb->base = 0;
+ seendb->size = 0;
+ map_refresh(seendb->fd, 1, &seendb->base, &seendb->size, sbuf.st_size,
+ fnamebuf, 0);
+
+ seendb->offset = 0;
+ seendb->mailbox->seen_lock_count = 0;
+ *seendbptr = seendb;
+ return 0;
+}
+
+/*
+ * Lock the database (if it isn't locked already) and read the user's
+ * entry, returning it in the buffers pointed to by 'lastreadptr',
+ * 'lastuidptr', and 'seenuidsptr'. A malloc'ed string is placed in
+ * the latter and the caller is responsible for freeing it.
+ */
+int seen_lockread(struct seen *seendb, time_t *lastreadptr, unsigned int *lastuidptr,
+ time_t *lastchangeptr, char **seenuidsptr)
+{
+ int r;
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ struct stat sbuf;
+ const char *lockfailaction;
+ const char *buf = 0, *p;
+ unsigned long left;
+ unsigned long length, namelen;
+
+ strlcpy(fnamebuf, seendb->mailbox->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf));
+
+ /* Lock the database */
+ if (!seendb->mailbox->seen_lock_count) {
+ r = lock_reopen(seendb->fd, fnamebuf, &sbuf, &lockfailaction);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: %s %s: %m", lockfailaction, fnamebuf);
+ return IMAP_IOERROR;
+ }
+
+ seendb->mailbox->seen_lock_count = 1;
+
+ if (seendb->ino != sbuf.st_ino) {
+ map_free(&seendb->base, &seendb->size);
+ }
+ map_refresh(seendb->fd, 1, &seendb->base, &seendb->size,
+ sbuf.st_size, fnamebuf, 0);
+ }
+
+ /* Find record for user */
+ seendb->offset = bsearch_mem(seendb->user, 1, seendb->base, seendb->size,
+ seendb->offset, &length);
+
+ seendb->length = length;
+
+ *lastreadptr = 0;
+ *lastuidptr = 0;
+ *lastchangeptr = 0;
+ if (!length) {
+ /* No record for user */
+ *seenuidsptr = xstrdup("");
+ return 0;
+ }
+
+ /* Skip over username we know is there */
+ namelen = strlen(seendb->user)+1;
+ buf = seendb->base + seendb->offset + namelen;
+ left = length - namelen;
+
+ /* Parse last-read timestamp */
+ while (left && isdigit((int) *buf)) {
+ *lastreadptr = *lastreadptr * 10 + *buf++ - '0';
+ left--;
+ }
+ if (left && *buf != '\n') {
+ left--;
+ buf++;
+ }
+
+ /* Parse last-read uid */
+ while (left && isdigit((int) *buf)) {
+ *lastuidptr = *lastuidptr * 10 + *buf++ - '0';
+ left--;
+ }
+ if (left && *buf != '\n') {
+ left--;
+ buf++;
+ }
+
+ /* Scan for end of uids or last-change timestamp */
+ p = buf;
+ while (left && !isspace((int) *p)) {
+ p++;
+ left--;
+ }
+
+ if (left > 1 && p[0] == ' ' && isdigit((int) p[1])) {
+ /* Have a last-change timestamp */
+ while (buf < p) {
+ *lastchangeptr = *lastchangeptr * 10 + *buf++ - '0';
+ }
+ buf++;
+ p++;
+ left--;
+
+ /* Scan for end of uids */
+ while (left && !isspace((int) *p)) {
+ p++;
+ left--;
+ }
+ }
+
+ /* Copy uids into malloc'ed space */
+ *seenuidsptr = xmalloc(p - buf + 1);
+ strncpy(*seenuidsptr, buf, p - buf);
+ (*seenuidsptr)[p - buf] = '\0';
+
+ return 0;
+}
+
+/*
+ * Write out new data for the user
+ */
+#define PADSIZE 30
+int seen_write(struct seen *seendb, time_t lastread, unsigned int lastuid,
+ time_t lastchange, char *seenuids)
+{
+ char timeuidbuf[80];
+ int length;
+ int writefd = -1;
+ int replace;
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ char newfnamebuf[MAX_MAILBOX_PATH+1];
+ int n;
+ struct iovec iov[10];
+ int num_iov;
+ struct stat sbuf;
+ static const char padbuf[/* 100 */] = {
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
+ };
+#define PRUNESIZE sizeof(padbuf)
+
+ assert(seendb->mailbox->seen_lock_count != 0);
+
+ snprintf(timeuidbuf, sizeof(timeuidbuf), "\t%u %u %u ", (unsigned int) lastread, lastuid, (unsigned int) lastchange);
+
+ length = strlen(seendb->user)+strlen(timeuidbuf)+strlen(seenuids)+1;
+
+ /* Replace the entire file if existing record too short or too long */
+ replace = (length >= seendb->length || length+PRUNESIZE < seendb->length);
+
+ num_iov = 0;
+
+ if (replace) {
+ strlcpy(fnamebuf, seendb->mailbox->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf));
+ strlcpy(newfnamebuf, fnamebuf, sizeof(newfnamebuf));
+ strlcat(newfnamebuf, ".NEW", sizeof(newfnamebuf));
+
+ writefd = open(newfnamebuf, O_RDWR|O_TRUNC|O_CREAT, 0666);
+ if (writefd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", newfnamebuf);
+ return IMAP_IOERROR;
+ }
+
+ iov[num_iov].iov_base = (char *)seendb->base;
+ iov[num_iov++].iov_len = seendb->offset;
+ }
+ iov[num_iov].iov_base = seendb->user;
+ iov[num_iov++].iov_len = strlen(seendb->user);
+ iov[num_iov].iov_base = timeuidbuf;
+ iov[num_iov++].iov_len = strlen(timeuidbuf);
+ iov[num_iov].iov_base = seenuids;
+ iov[num_iov++].iov_len = strlen(seenuids);
+ iov[num_iov].iov_base = (char *)padbuf;
+ if (replace) {
+ iov[num_iov++].iov_len = PADSIZE;
+ length += PADSIZE;
+ }
+ else {
+ iov[num_iov++].iov_len = seendb->length - length;
+ }
+ iov[num_iov].iov_base = "\n";
+ iov[num_iov++].iov_len = 1;
+ if (replace) {
+ iov[num_iov].iov_base = (char *)seendb->base
+ + seendb->offset + seendb->length;
+ iov[num_iov++].iov_len =
+ seendb->size - (seendb->offset + seendb->length);
+ }
+
+ if (replace) {
+ n = retry_writev(writefd, iov, num_iov);
+
+ /* Flush and swap in the new file */
+ if (n == -1 || fsync(writefd) ||
+ lock_blocking(writefd) == -1 ||
+ fstat(writefd, &sbuf) == -1 ||
+ rename(newfnamebuf, fnamebuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", newfnamebuf);
+ close(writefd);
+ unlink(newfnamebuf);
+ return IMAP_IOERROR;
+ }
+ close(seendb->fd);
+ seendb->fd = writefd;
+ seendb->ino = sbuf.st_ino;
+ seendb->length = length;
+ map_free(&seendb->base, &seendb->size);
+ map_refresh(seendb->fd, 1, &seendb->base, &seendb->size,
+ sbuf.st_size, fnamebuf, 0);
+ }
+ else {
+ lseek(seendb->fd, seendb->offset, 0);
+ n = retry_writev(seendb->fd, iov, num_iov);
+
+ if (n == -1 || fsync(seendb->fd)) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
+ return IMAP_IOERROR;
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * Unlock the database
+ */
+int seen_unlock(struct seen *seendb)
+{
+ int r;
+
+ if (seendb->mailbox->seen_lock_count == 0) return 0;
+
+ seendb->mailbox->seen_lock_count = 0;
+ r = lock_unlock(seendb->fd);
+
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: unlocking seen db for %s: %m",
+ seendb->mailbox->name);
+ return IMAP_IOERROR;
+ }
+ return 0;
+}
+
+/*
+ * Close the database
+ */
+int seen_close(struct seen *seendb)
+{
+ map_free(&seendb->base, &seendb->size);
+ close(seendb->fd);
+ free(seendb->user);
+ free((char *)seendb);
+ return 0;
+}
+
+/*
+ * Make the \Seen database for the newly created mailbox 'mailbox'.
+ */
+int seen_create(struct mailbox *mailbox)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ int fd;
+
+ strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf));
+
+ fd = open(fnamebuf, O_RDWR|O_TRUNC|O_CREAT, 0666);
+ if (fd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebuf);
+ return IMAP_IOERROR;
+ }
+ close(fd);
+ return 0;
+}
+
+/*
+ * Remove the \Seen database for the mailbox 'mailbox'.
+ */
+int seen_delete(struct mailbox *mailbox)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ int fd;
+ int r;
+ const char *lockfailaction;
+
+ strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf));
+
+ fd = open(fnamebuf, O_RDWR, 0666);
+ if (fd == -1) {
+ syslog(LOG_ERR, "IOERROR: opening %s: %m", fnamebuf);
+ return IMAP_IOERROR;
+ }
+
+ r = lock_reopen(fd, fnamebuf, 0, &lockfailaction);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: %s %s: %m", lockfailaction, fnamebuf);
+ close(fd);
+ return IMAP_IOERROR;
+ }
+
+ unlink(fnamebuf);
+ close(fd);
+ return 0;
+}
+
+/*
+ * Copy the seen database from 'oldmailbox' to 'newmailbox'
+ */
+int seen_copy(struct mailbox *oldmailbox,struct mailbox *newmailbox)
+{
+ char oldfname[MAX_MAILBOX_PATH+1];
+ char newfname[MAX_MAILBOX_PATH+1];
+
+ strlcpy(oldfname, oldmailbox->path, sizeof(oldfname));
+ strlcat(oldfname, FNAME_SEEN, sizeof(oldfname));
+ strlcpy(newfname, newmailbox->path, sizeof(newfname));
+ strlcat(newfname, FNAME_SEEN, sizeof(newfname));
+ return mailbox_copyfile(oldfname, newfname, 0);
+}
+
+/*
+ * List of entries in reconstructed seen database
+ */
+#define NEWIOV_GROW 3 /* 1000 */
+struct iovec *newiov;
+char *freenew;
+int newiov_num;
+int newiov_alloc = 0;
+int newiov_dirty; /* set to 1 if something either
+ * malloced or not in sort order
+ */
+
+/*
+ * Insert a seen record 'line' with length 'len'
+ * into the being-reconstructed seen database.
+ * 'freeit' is nonzero if 'line' should be freed after use.
+ */
+void
+newiov_insert(line, len, freeit)
+const char *line;
+unsigned len;
+int freeit;
+{
+ int low=0;
+ int high=newiov_num-1;
+ int mid, cmp, i;
+
+ if (newiov_num == newiov_alloc) {
+ newiov_alloc += NEWIOV_GROW;
+ newiov = (struct iovec *)xrealloc((char *)newiov,
+ newiov_alloc * sizeof (struct iovec));
+ freenew = xrealloc(freenew, newiov_alloc);
+ }
+
+ /* special-case -- appending to end */
+ if (newiov_num == 0 ||
+ bsearch_compare(line, newiov[newiov_num-1].iov_base) > 0) {
+ newiov[newiov_num].iov_base = (char *)line;
+ newiov[newiov_num].iov_len = len;
+ freenew[newiov_num] = freeit;
+ newiov_num++;
+ if (freeit) newiov_dirty = 1;
+ return;
+ }
+
+ newiov_dirty = 1;
+
+ /* Binary-search for location */
+ while (low <= high) {
+ mid = (high - low)/2 + low;
+ cmp = bsearch_compare(line, newiov[mid].iov_base);
+
+ if (cmp == 0) return;
+
+ if (cmp < 0) {
+ high = mid - 1;
+ }
+ else {
+ low = mid + 1;
+ }
+ }
+
+ /* Open a slot for the new entry and insert entry into the list */
+ for (i = newiov_num-1; i > high; i--) {
+ newiov[i+1].iov_base = newiov[i].iov_base;
+ newiov[i+1].iov_len = newiov[i].iov_len;
+ freenew[i+1] = freenew[i];
+ }
+ newiov_num++;
+ newiov[low].iov_base = (char *)line;
+ newiov[low].iov_len = len;
+ freenew[low] = freeit;
+}
+
+#define FIXING() \
+ if (!dst) { \
+ fixedline = xmalloc(endline - line + 2 + PADSIZE); \
+ strncpy(fixedline, line, p - line); \
+ dst = fixedline + (p - line); \
+ }
+
+/*
+ * Reconstruct the seen database for 'mailbox'. Optionally does usage
+ * counting and old entry pruning for the seen database of 'mailbox'.
+ * Users who have opened the mailbox since 'report_time' are reported,
+ * users who have not opened the mailbox since 'prune_time' have their
+ * entries removed from the seen database. Users are reported by
+ * calling 'report_proc' with 'report_rock' and a pointer to the line
+ * in the database.
+ */
+int seen_reconstruct(struct mailbox *mailbox,
+ time_t report_time,
+ time_t prune_time,
+ int (*report_proc)(),
+ void *report_rock)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1];
+ char newfnamebuf[MAX_MAILBOX_PATH+1];
+ int fd;
+ struct stat sbuf;
+ const char *lockfailaction;
+ const char *base = 0;
+ unsigned long size = 0;
+ const char *line, *endline;
+ const char *tab, *p, *space;
+ time_t lastread;
+ unsigned lastuidread;
+ time_t lastchange;
+ int r, i, n;
+ unsigned lastuid, thisuid;
+ unsigned uidtoobig = mailbox->last_uid;
+ time_t now, nowplus1day;
+ int lastsep;
+ char *fixedline, *dst;
+ int writefd;
+
+ time(&now);
+ nowplus1day = now + 24*60*60;
+
+ strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf));
+
+ fd = open(fnamebuf, O_RDWR, 0666);
+ if (fd == -1) {
+ return seen_create(mailbox);
+ }
+
+ r = lock_reopen(fd, fnamebuf, &sbuf, &lockfailaction);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: %s %s: %m", lockfailaction, fnamebuf);
+ return IMAP_IOERROR;
+ }
+
+ map_refresh(fd, 1, &base, &size, sbuf.st_size, fnamebuf, 0);
+
+ newiov_dirty = 0;
+ newiov_num = 0;
+
+ endline = base;
+ while ((endline = memchr(line=endline, '\n', size - (endline - base)))) {
+ endline++;
+
+ /* Parse/check username */
+ p = tab = memchr(line, '\t', endline - line);
+ if (!tab /* XXX || badusername */) {
+ /* Cause line to be deleted */
+ newiov_dirty = 1;
+ continue;
+ }
+
+ /* Parse last-read timestamp */
+ p++;
+ lastread = 0;
+ while (p < endline && isdigit((int) *p)) {
+ lastread = lastread * 10 + *p++ - '0';
+ }
+ if (p >= endline || *p++ != ' ') {
+ /* Cause line to be deleted */
+ newiov_dirty = 1;
+ continue;
+ }
+ if (lastread > nowplus1day) lastread = now;
+
+ /* Report user if read recently enough */
+ if (report_proc && lastread > report_time) {
+ (*report_proc)(report_rock, line);
+ }
+
+ /* Remove record if it's too old */
+ if (lastread < prune_time) {
+ /* Cause line to be deleted */
+ newiov_dirty = 1;
+ continue;
+ }
+
+
+ /* Parse last-read uid */
+ lastuidread = 0;
+ while (p < endline && isdigit((int) *p)) {
+ lastuidread = lastuidread * 10 + *p++ - '0';
+ }
+ if (p >= endline || *p++ != ' ' || lastuidread > uidtoobig) {
+ /* Cause line to be deleted */
+ newiov_dirty = 1;
+ continue;
+ }
+
+ /* Scan for end of uids or last-change timestamp */
+ lastchange = 0;
+ fixedline = dst = 0;
+ space = memchr(p, ' ', endline - p);
+
+ if (space && space+1 < endline &&
+ space[0] == ' ' && isdigit((int) space[1])) {
+ /* Have a last-change timestamp */
+ while (p < space && isdigit((int) *p)) {
+ lastchange = lastchange * 10 + *p++ - '0';
+ }
+ if (p != space) {
+ /* Cause line to be deleted */
+ newiov_dirty = 1;
+ continue;
+ }
+ if (lastchange > nowplus1day) {
+ lastchange = now;
+ }
+
+ p++; /* Skip over space */
+ space = memchr(p, ' ', endline - p);
+ if (!space) space = endline - 1; /* The newline */
+ }
+ else {
+ FIXING();
+ *dst++ = '0'; /* Add a last-change timestamp of 0 */
+ *dst++ = ' ';
+ }
+
+ /* Scan/scavenge uid list. */
+ lastuid = 0;
+ lastsep = ',';
+
+ while (p < space) {
+ thisuid = 0;
+ while (p < space && isdigit((int) *p)) {
+ if (dst) *dst++ = *p;
+ thisuid = thisuid * 10 + *p++ - '0';
+ }
+
+ if (thisuid <= lastuid || thisuid > uidtoobig) {
+ /* Remove this UID and trailing separator */
+ FIXING();
+ while (isdigit((int) dst[-1])) dst--;
+ if (dst[-1] == ':') dst[-1] = ',';
+ }
+ else if (lastsep == ':' && *p == ':') {
+ /* Change colon to comma */
+ FIXING();
+ *dst++ = lastsep = ',';
+ }
+ else if (*p == ':' || *p == ',') {
+ lastsep = *p;
+ if (dst) *dst++ = lastsep;
+ }
+ else break;
+
+ p++;
+ }
+
+ if (p[-1] == ':' || p[-1] == ',') {
+ FIXING();
+ }
+ if (dst && (dst[-1] == ':' || dst[-1] == ',')) {
+ dst[-1] = ' ';
+ }
+
+ while (p < endline) {
+ if (*p != ' ') {
+ FIXING();
+ }
+ if (dst) *dst++ = ' ';
+ p++;
+ }
+ if (dst) {
+ *dst++ = '\n';
+ newiov_insert(fixedline, dst - fixedline, 1);
+ }
+ else {
+ newiov_insert(line, endline - line, 0);
+ }
+ }
+
+ r = 0;
+
+ if (newiov_dirty) {
+ strlcpy(newfnamebuf, fnamebuf, sizeof(newfnamebuf));
+ strlcat(newfnamebuf, ".NEW", sizeof(newfnamebuf));
+
+ writefd = open(newfnamebuf, O_RDWR|O_TRUNC|O_CREAT, 0666);
+ if (writefd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", newfnamebuf);
+ r = IMAP_IOERROR;
+ goto cleanup;
+ }
+
+ /* Simplify the iov by coalescing ajacent lines */
+ for (i = 0; i < newiov_num - 1; i++) {
+ if ((char *)newiov[i].iov_base + newiov[i].iov_len == newiov[i+1].iov_base &&
+ !freenew[i] && !freenew[i]) {
+ newiov[i+1].iov_base = newiov[i].iov_base;
+ newiov[i+1].iov_len += newiov[i].iov_len;
+ newiov[i].iov_len = 0;
+ }
+ }
+
+ n = retry_writev(writefd, newiov, newiov_num);
+
+ /* Flush and swap in the new file */
+ if (n == -1 || fsync(writefd) ||
+ fstat(writefd, &sbuf) == -1 ||
+ rename(newfnamebuf, fnamebuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", newfnamebuf);
+ unlink(newfnamebuf);
+ r = IMAP_IOERROR;
+ }
+ close(writefd);
+
+ cleanup:
+ for (i = 0; i < newiov_num; i++) {
+ if (freenew[i]) free(newiov[i].iov_base);
+ }
+ }
+
+ map_free(&base, &size);
+ close(fd);
+
+ return r;
+}
+
+/* done with all seen operations for this process */
+int seen_done(void)
+{
+ return 0;
+}
+
+int seen_merge(const char *tmpfile, const char *tgtfile)
+{
+ /* Not supported */
+ return -1;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/setproctitle.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/setproctitle.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/setproctitle.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/setproctitle.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,287 @@
+/* setproctitle -- set process title shown by ps(1)
+ $Id: setproctitle.c,v 1.16 2003/02/13 20:15:30 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1983, 1995 Eric P. Allman
+ * Copyright (c) 1988, 1993
+ * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University 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.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "xmalloc.h"
+
+# define VA_LOCAL_DECL va_list ap;
+# define VA_START(f) va_start(ap, f)
+# define VA_END va_end(ap)
+
+# define MAXLINE 2048 /* max line length */
+
+extern char **environ;
+#ifdef USE_SETPROCTITLE
+int setproctitle_enable = 1;
+#else
+int setproctitle_enable = 0;
+#endif
+
+static char **Argv = NULL; /* pointer to argument vector */
+static char *LastArgv = NULL; /* end of argv */
+
+/*
+ * Sets up a process to be able to use setproctitle()
+ */
+void setproctitle_init(int argc, char **argv, char **envp)
+{
+ int i;
+
+ if (!setproctitle_enable) return;
+
+ /*
+ * Move the environment so setproctitle can use the space at
+ * the top of memory.
+ */
+ for (i = 0; envp[i] != NULL; i++)
+ continue;
+ environ = (char **) xmalloc(sizeof (char *) * (i + 1));
+ for (i = 0; envp[i] != NULL; i++)
+ environ[i] = xstrdup(envp[i]);
+ environ[i] = NULL;
+
+ /*
+ * Save start and extent of argv for setproctitle.
+ */
+
+ Argv = argv;
+ if (i > 0)
+ LastArgv = envp[i - 1] + strlen(envp[i - 1]);
+ else
+ LastArgv = argv[argc - 1] + strlen(argv[argc - 1]);
+}
+
+/*
+** SETPROCTITLE -- set process title for ps
+**
+** Parameters:
+** fmt -- a printf style format string.
+** a, b, c -- possible parameters to fmt.
+**
+** Returns:
+** none.
+**
+** Side Effects:
+** Clobbers argv of our main procedure so ps(1) will
+** display the title.
+*/
+
+#define SPT_NONE 0 /* don't use it at all */
+#define SPT_REUSEARGV 1 /* cover argv with title information */
+#define SPT_BUILTIN 2 /* use libc builtin */
+#define SPT_PSTAT 3 /* use pstat(PSTAT_SETCMD, ...) */
+#define SPT_PSSTRINGS 4 /* use PS_STRINGS->... */
+#define SPT_SYSMIPS 5 /* use sysmips() supported by NEWS-OS 6 */
+#define SPT_SCO 6 /* write kernel u. area */
+
+#ifndef SPT_TYPE
+# define SPT_TYPE SPT_REUSEARGV
+#endif
+
+#if SPT_TYPE != SPT_NONE && SPT_TYPE != SPT_BUILTIN
+
+# if SPT_TYPE == SPT_PSTAT
+# include <sys/pstat.h>
+# endif
+# if SPT_TYPE == SPT_PSSTRINGS
+# include <machine/vmparam.h>
+# include <sys/exec.h>
+# ifndef PS_STRINGS /* hmmmm.... apparently not available after all */
+# undef SPT_TYPE
+# define SPT_TYPE SPT_REUSEARGV
+# else
+# ifndef NKPDE /* FreeBSD 2.0 */
+# define NKPDE 63
+typedef unsigned int *pt_entry_t;
+# endif
+# endif
+# endif
+
+# if SPT_TYPE == SPT_PSSTRINGS
+# define SETPROC_STATIC static
+# else
+# define SETPROC_STATIC
+# endif
+
+# if SPT_TYPE == SPT_SYSMIPS
+# include <sys/sysmips.h>
+# include <sys/sysnews.h>
+# endif
+
+# if SPT_TYPE == SPT_SCO
+# include <sys/immu.h>
+# include <sys/dir.h>
+# include <sys/user.h>
+# include <sys/fs/s5param.h>
+# if PSARGSZ > MAXLINE
+# define SPT_BUFSIZE PSARGSZ
+# endif
+# endif
+
+# ifndef SPT_PADCHAR
+# define SPT_PADCHAR ' '
+# endif
+
+# ifndef SPT_BUFSIZE
+# define SPT_BUFSIZE MAXLINE
+# endif
+
+#endif /* SPT_TYPE != SPT_NONE && SPT_TYPE != SPT_BUILTIN */
+
+#if SPT_TYPE != SPT_BUILTIN
+
+/*VARARGS1*/
+void
+setproctitle(const char *fmt, ...)
+{
+# if SPT_TYPE != SPT_NONE
+ register char *p;
+ register int i;
+ SETPROC_STATIC char buf[SPT_BUFSIZE];
+ VA_LOCAL_DECL
+# if SPT_TYPE == SPT_PSTAT
+ union pstun pst;
+# endif
+# if SPT_TYPE == SPT_SCO
+ off_t seek_off;
+ static int kmem = -1;
+ static int kmempid = -1;
+ struct user u;
+# endif
+# if SPT_TYPE == SPT_REUSEARGV
+ extern char **Argv;
+ extern char *LastArgv;
+# endif
+
+ if (!setproctitle_enable) return;
+
+ p = buf;
+
+ /* print the argument string */
+ VA_START(fmt);
+ (void) vsprintf(p, fmt, ap);
+ VA_END;
+
+ i = strlen(buf);
+
+# if SPT_TYPE == SPT_PSTAT
+ pst.pst_command = buf;
+ pstat(PSTAT_SETCMD, pst, i, 0, 0);
+# endif
+# if SPT_TYPE == SPT_PSSTRINGS
+ PS_STRINGS->ps_nargvstr = 1;
+ PS_STRINGS->ps_argvstr = buf;
+# endif
+# if SPT_TYPE == SPT_SYSMIPS
+ sysmips(SONY_SYSNEWS, NEWS_SETPSARGS, buf);
+# endif
+# if SPT_TYPE == SPT_SCO
+ if (kmem < 0 || kmempid != getpid())
+ {
+ if (kmem >= 0)
+ close(kmem);
+ kmem = open(_PATH_KMEM, O_RDWR, 0);
+ if (kmem < 0)
+ return;
+ (void) fcntl(kmem, F_SETFD, 1);
+ kmempid = getpid();
+ }
+ buf[PSARGSZ - 1] = '\0';
+ seek_off = UVUBLK + (off_t) u.u_psargs - (off_t) &u;
+ if (lseek(kmem, (char *) seek_off, SEEK_SET) == seek_off)
+ (void) write(kmem, buf, PSARGSZ);
+# endif
+# if SPT_TYPE == SPT_REUSEARGV
+ if (i > LastArgv - Argv[0] - 2)
+ {
+ i = LastArgv - Argv[0] - 2;
+ buf[i] = '\0';
+ }
+ (void) strcpy(Argv[0], buf);
+ p = &Argv[0][i];
+ while (p < LastArgv)
+ *p++ = SPT_PADCHAR;
+ Argv[1] = NULL;
+# endif
+# endif /* SPT_TYPE != SPT_NONE */
+}
+
+#endif /* SPT_TYPE != SPT_BUILTIN */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,113 @@
+/* signals.c -- signal handling functions to allow clean shutdown
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/* $Id: signals.c,v 1.11.2.2 2005/02/14 16:27:42 shadow Exp $ */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <signal.h>
+#include <syslog.h>
+
+#include "signals.h"
+#include "xmalloc.h"
+#include "exitcodes.h"
+
+static int gotsignal = 0;
+
+static void sighandler(int sig)
+{
+ /* syslog(LOG_DEBUG, "got signal %d", sig); */
+ gotsignal = sig;
+}
+
+static const int catch[] = { SIGHUP, SIGINT, SIGQUIT, 0 };
+
+void signals_add_handlers(int alarm)
+{
+ struct sigaction action;
+ int i;
+
+ sigemptyset(&action.sa_mask);
+
+ action.sa_flags = 0;
+#ifdef SA_RESETHAND
+ action.sa_flags |= SA_RESETHAND;
+#endif
+
+ action.sa_handler = sighandler;
+
+ /* SIGALRM used as a syscall timeout, so we don't set SA_RESTART */
+ if (alarm && sigaction(SIGALRM, &action, NULL) < 0) {
+ fatal("unable to install signal handler for %d: %m", SIGALRM);
+ }
+
+#ifdef SA_RESTART
+ action.sa_flags |= SA_RESTART;
+#endif
+
+ for (i = 0; catch[i] != 0; i++) {
+ if (catch[i] != SIGALRM && sigaction(catch[i], &action, NULL) < 0) {
+ fatal("unable to install signal handler for %d: %m", catch[i]);
+ }
+ }
+}
+
+static shutdownfn *shutdown_cb = NULL;
+
+void signals_set_shutdown(shutdownfn *s)
+{
+ shutdown_cb = s;
+}
+
+int signals_poll(void)
+{
+ switch (gotsignal) {
+ case SIGINT:
+ case SIGQUIT:
+ if (shutdown_cb) shutdown_cb(EC_TEMPFAIL);
+ else exit(EC_TEMPFAIL);
+ break;
+ default:
+ return gotsignal;
+ break;
+ }
+ return 0; /* compiler warning stupidity */
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/signals.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,53 @@
+/* signals.h -- signal handling functions to allow clean shutdown
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $Id: signals.h,v 1.1.2.1 2004/12/17 18:15:17 ken3 Exp $ */
+
+#ifndef INCLUDED_SIGNALS_H
+#define INCLUDED_SIGNALS_H
+
+typedef void shutdownfn(int);
+
+void signals_add_handlers(int alarm);
+void signals_set_shutdown(shutdownfn *s);
+int signals_poll(void);
+
+#endif /* INCLUDED_SIGNALS_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smmapd.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smmapd.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smmapd.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smmapd.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,463 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * smmapd.c -- sendmail socket map daemon
+ *
+ *
+ * From Sendmail Operations Guide:
+ *
+ * The socket map uses a simple request/reply protocol over TCP or
+ * UNIX domain sockets to query an external server. Both requests and
+ * replies are text based and encoded as netstrings, i.e., a string
+ * "hello there" becomes:
+ *
+ * 11:hello there,
+ *
+ * Note: neither requests nor replies end with CRLF.
+ *
+ * The request consists of the database map name and the lookup key
+ * separated by a space character:
+ *
+ * <mapname> <key>
+ *
+ * The server responds with a status indicator and the result (if any):
+ *
+ * <status> <result>
+ *
+ * The status indicator is one of the following upper case words:
+ *
+ * OK the key was found, result contains the looked up value
+ * NOTFOUND the key was not found, the result is empty
+ * TEMP a temporary failure occured
+ * TIMEOUT a timeout occured on the server side
+ * PERM a permanent failure occured
+ *
+ * In case of errors (status TEMP, TIMEOUT or PERM) the result field
+ * may contain an explanatory message.
+ *
+ *
+ * $Id: smmapd.c,v 1.1.2.14 2005/07/01 22:13:45 ken3 Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <syslog.h>
+#include <signal.h>
+#include <ctype.h>
+
+#include "acl.h"
+#include "append.h"
+#include "mboxlist.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mupdate-client.h"
+#include "util.h"
+#include "xmalloc.h"
+
+const char *BB;
+int forcedowncase;
+
+extern int optind;
+
+struct protstream *map_in, *map_out;
+
+/* current namespace */
+static struct namespace map_namespace;
+
+/* config.c info */
+const int config_need_data = 0;
+
+/* forward decls */
+extern void setproctitle_init(int argc, char **argv, char **envp);
+int begin_handling(void);
+
+void shut_down(int code) __attribute__((noreturn));
+void shut_down(int code)
+{
+ if (map_in) prot_free(map_in);
+ if (map_out) prot_free(map_out);
+
+ cyrus_reset_stdio();
+
+ mboxlist_close();
+ mboxlist_done();
+
+ quotadb_close();
+ quotadb_done();
+
+ cyrus_done();
+ exit(code);
+}
+
+void fatal(const char* s, int code)
+{
+ static int recurse_code = 0;
+ if (recurse_code) {
+ /* We were called recursively. Just give up */
+ exit(code);
+ }
+ recurse_code = code;
+ syslog(LOG_ERR, "Fatal error: %s", s);
+
+ shut_down(code);
+}
+
+/*
+ * run once when process is forked;
+ * MUST NOT exit directly; must return with non-zero error code
+ */
+int service_init(int argc, char **argv, char **envp)
+{
+ int r;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ setproctitle_init(argc, argv, envp);
+
+ signals_set_shutdown(&shut_down);
+ signal(SIGPIPE, SIG_IGN);
+
+ BB = config_getstring(IMAPOPT_POSTUSER);
+ forcedowncase = config_getswitch(IMAPOPT_LMTP_DOWNCASE_RCPT);
+
+ /* so we can do mboxlist operations */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* so we can check the quotas */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ /* Set namespace */
+ if ((r = mboxname_init_namespace(&map_namespace, 1)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+int service_main(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ int r;
+
+ map_in = prot_new(0, 0);
+ map_out = prot_new(1, 1);
+ prot_setflushonread(map_in, map_out);
+ prot_settimeout(map_in, 360);
+
+ r = begin_handling();
+
+ shut_down(r);
+ return 0;
+}
+
+int verify_user(const char *key, long quotacheck,
+ struct auth_state *authstate)
+{
+ char rcpt[MAX_MAILBOX_NAME+1], namebuf[MAX_MAILBOX_NAME+1] = "";
+ char *user = rcpt, *domain = NULL, *mailbox = NULL;
+ int r = 0;
+
+ /* make a working copy of the key and split it into user/domain/mailbox */
+ strlcpy(rcpt, key, sizeof(rcpt));
+
+ /* find domain */
+ if (config_virtdomains && (domain = strrchr(rcpt, '@'))) {
+ *domain++ = '\0';
+ /* ignore default domain */
+ if (config_defdomain && !strcasecmp(config_defdomain, domain))
+ domain = NULL;
+ }
+
+ /* translate any separators in user & mailbox */
+ mboxname_hiersep_tointernal(&map_namespace, rcpt, 0);
+
+ /* find mailbox */
+ if ((mailbox = strchr(rcpt, '+'))) *mailbox++ = '\0';
+
+ /* downcase the rcpt, if necessary */
+ if (forcedowncase) {
+ lcase(user);
+ if (domain) lcase(domain);
+ }
+
+ /* see if its a shared mailbox address */
+ if (!strcmp(user, BB)) user = NULL;
+
+ /* XXX the following is borrowed from lmtpd.c:verify_user() */
+ if ((!user && !mailbox) ||
+ (domain && (strlen(domain) + 1 > sizeof(namebuf)))) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ } else {
+ /* construct the mailbox that we will verify */
+ if (domain) snprintf(namebuf, sizeof(namebuf), "%s!", domain);
+
+ if (!user) {
+ /* shared folder */
+ if (strlen(namebuf) + strlen(mailbox) > sizeof(namebuf)) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ } else {
+ strlcat(namebuf, mailbox, sizeof(namebuf));
+ }
+ } else {
+ /* ordinary user -- check INBOX */
+ if (strlen(namebuf) + 5 + strlen(user) > sizeof(namebuf)) {
+ r = IMAP_MAILBOX_NONEXISTENT;
+ } else {
+ strlcat(namebuf, "user.", sizeof(namebuf));
+ strlcat(namebuf, user, sizeof(namebuf));
+ }
+ }
+ }
+
+ if (!r) {
+ long aclcheck = !user ? ACL_POST : 0;
+ int type;
+ char *acl;
+ char *path;
+ char *c;
+ struct hostent *hp;
+ char *host;
+ struct sockaddr_in sin,sfrom;
+ char buf[512];
+ int soc, x, rc;
+
+ /*
+ * check to see if mailbox exists and we can append to it:
+ *
+ * - must have posting privileges on shared folders
+ * - don't care about ACL on INBOX (always allow post)
+ * - don't care about message size (1 msg over quota allowed)
+ */
+ r = mboxlist_detail(namebuf, &type, &path, NULL, NULL, &acl, NULL);
+ if (r == IMAP_MAILBOX_NONEXISTENT && config_mupdate_server) {
+ kick_mupdate();
+ r = mboxlist_detail(namebuf, &type, &path, NULL, NULL, &acl, NULL);
+ }
+
+ if (!r && (type & MBTYPE_REMOTE)) {
+ /* XXX Perhaps we should support the VRFY command in lmtpd
+ * and then we could do a VRFY to the correct backend which
+ * would also do a quotacheck.
+ */
+ int access = cyrus_acl_myrights(authstate, acl);
+
+ if ((access & aclcheck) != aclcheck) {
+ r = (access & ACL_LOOKUP) ?
+ IMAP_PERMISSION_DENIED : IMAP_MAILBOX_NONEXISTENT;
+ return r;
+ } else {
+ r = 0;
+ }
+
+ /* proxy the request to the real backend server to
+ * check the quota. if this fails, just return 0
+ * (asuume under quota)
+ */
+
+ host = strdup(path);
+ c = strchr(host, '!');
+ if (c) *c = 0;
+
+ syslog(LOG_ERR, "verify_user(%s) proxying to host %s",
+ namebuf, host);
+
+ hp = gethostbyname(host);
+ if (hp == (struct hostent*) 0) {
+ syslog(LOG_ERR, "verify_user(%s) failed: can't find host %s",
+ namebuf, host);
+ return r;
+ }
+
+ soc = socket(PF_INET, SOCK_STREAM, 0);
+ memcpy(&sin.sin_addr.s_addr,hp->h_addr,hp->h_length);
+ sin.sin_family = AF_INET;
+
+ /* XXX port should be configurable */
+ sin.sin_port = htons(12345);
+
+ if (connect(soc,(struct sockaddr *) &sin, sizeof(sin)) < 0) {
+ syslog(LOG_ERR, "verify_user(%s) failed: can't connect to %s",
+ namebuf, host);
+ return r;
+ }
+
+ sprintf(buf,"%d:cyrus %s,%c",strlen(key)+6,key,4);
+ sendto(soc,buf,strlen(buf),0,(struct sockaddr *)&sin,sizeof(sin));
+
+ x = sizeof(sfrom);
+ rc = recvfrom(soc,buf,512,0,(struct sockaddr *)&sfrom,&x);
+
+ buf[rc] = '\0';
+ close(soc);
+
+ prot_printf(map_out, "%s", buf);
+ return -1; /* tell calling function we already replied */
+
+ } else if (!r) {
+ r = append_check(namebuf, MAILBOX_FORMAT_NORMAL, authstate,
+ aclcheck, (quotacheck < 0 )
+ || config_getswitch(IMAPOPT_LMTP_STRICT_QUOTA) ?
+ quotacheck : 0);
+ }
+ }
+
+ if (r) syslog(LOG_DEBUG, "verify_user(%s) failed: %s", namebuf,
+ error_message(r));
+
+ return r;
+}
+
+#define MAXREQUEST 1024 /* XXX is this reasonable? */
+
+int begin_handling(void)
+{
+ int c;
+
+ while ((c = prot_getc(map_in)) != EOF) {
+ int r = 0, sawdigit = 0, len = 0, size = 0;
+ struct auth_state *authstate = NULL;
+ char request[MAXREQUEST+1];
+ char *mapname = NULL, *key = NULL;
+ const char *errstring = NULL;
+
+ if (signals_poll() == SIGHUP) {
+ /* caught a SIGHUP, return */
+ return 0;
+ }
+
+ while (isdigit(c)) {
+ sawdigit = 1;
+ len = len*10 + c - '0';
+ if (len > MAXREQUEST || len < 0) {
+ /* we overflowed */
+ fatal("string too big", EC_IOERR);
+ }
+ c = prot_getc(map_in);
+ }
+ if (c == EOF) {
+ errstring = prot_error(map_in);
+ r = IMAP_IOERROR;
+ }
+ if (!sawdigit || c != ':') {
+ errstring = "missing length";
+ r = IMAP_PROTOCOL_ERROR;
+ }
+ if (!r && prot_read(map_in, request, len) != len) {
+ errstring = "request size doesn't match length";
+ r = IMAP_PROTOCOL_ERROR;
+ }
+ if (!r && (c = prot_getc(map_in)) != ',') {
+ errstring = "missing terminator";
+ r = IMAP_PROTOCOL_ERROR;
+ }
+
+ if (!r) {
+ request[len] = '\0';
+ mapname = request;
+ if (!(key = strchr(request, ' '))) {
+ errstring = "missing key";
+ r = IMAP_PROTOCOL_ERROR;
+ }
+ }
+
+ if (!r) {
+ *key++ = '\0';
+
+ r = verify_user(key, size, authstate);
+ }
+
+ switch (r) {
+ case -1:
+ /* reply already sent */
+ break;
+
+ case 0:
+ prot_printf(map_out, "%d:OK %s,", 3+strlen(key), key);
+ break;
+
+ case IMAP_MAILBOX_NONEXISTENT:
+ prot_printf(map_out, "%d:NOTFOUND %s,",
+ 9+strlen(error_message(r)), error_message(r));
+ break;
+
+ case IMAP_QUOTA_EXCEEDED:
+ if (!config_getswitch(IMAPOPT_LMTP_OVER_QUOTA_PERM_FAILURE)) {
+ prot_printf(map_out, "%d:TEMP %s,", strlen(error_message(r))+5,
+ error_message(r));
+ break;
+ }
+ /* fall through - permanent failure */
+
+ default:
+ if (errstring)
+ prot_printf(map_out, "%d:PERM %s (%s),",
+ 5+strlen(error_message(r))+3+strlen(errstring),
+ error_message(r), errstring);
+ else
+ prot_printf(map_out, "%d:PERM %s,",
+ 5+strlen(error_message(r)), error_message(r));
+ break;
+ }
+ }
+
+ return 0;
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for smmapd!",
+ EC_SOFTWARE);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,124 @@
+/* smtpclient.c -- Routines for sending a message via SMTP
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: smtpclient.c,v 1.2 2003/10/22 18:02:59 rjs3 Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include "global.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "smtpclient.h"
+
+extern void fatal(const char *buf, int code);
+
+pid_t open_sendmail(const char *argv[], FILE **sm)
+{
+ int fds[2];
+ FILE *ret;
+ pid_t p;
+
+ pipe(fds);
+ if ((p = fork()) == 0) {
+ /* i'm the child! run sendmail! */
+ close(fds[1]);
+ /* make the pipe be stdin */
+ dup2(fds[0], 0);
+ execv(config_getstring(IMAPOPT_SENDMAIL), (char **) argv);
+
+ /* if we're here we suck */
+ printf("451 lmtpd: didn't exec() sendmail?!?\r\n");
+ fatal("couldn't exec() sendmail", EC_OSERR);
+ }
+
+ if (p < 0) {
+ /* failure */
+ *sm = NULL;
+ return p;
+ }
+
+ /* parent */
+ close(fds[0]);
+ ret = fdopen(fds[1], "w");
+ *sm = ret;
+
+ return p;
+}
+
+/* sendmail_errstr. create a descriptive message given 'sm_stat':
+ the exit code from wait() from sendmail.
+
+ not thread safe, but probably ok */
+char *sendmail_errstr(int sm_stat)
+{
+ static char errstr[200];
+
+ if (WIFEXITED(sm_stat)) {
+ snprintf(errstr, sizeof errstr,
+ "Sendmail process terminated normally, exit status %d\n",
+ WEXITSTATUS(sm_stat));
+ } else if (WIFSIGNALED(sm_stat)) {
+ snprintf(errstr, sizeof errstr,
+ "Sendmail process terminated abnormally, signal = %d %s\n",
+ WTERMSIG(sm_stat),
+#ifdef WCOREDUMP
+ WCOREDUMP(sm_stat) ? " -- core file generated" :
+#endif
+ "");
+ } else if (WIFSTOPPED(sm_stat)) {
+ snprintf(errstr, sizeof errstr,
+ "Sendmail process stopped, signal = %d\n",
+ WTERMSIG(sm_stat));
+ } else {
+ return NULL;
+ }
+
+ return errstr;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/smtpclient.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+/* smtpclient.h -- Routines for sending a message via SMTP
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: smtpclient.h,v 1.2 2003/10/22 18:02:59 rjs3 Exp $
+ */
+
+#ifndef INCLUDED_SMTPCLIENT_H
+#define INCLUDED_SMTPCLIENT_H
+
+pid_t open_sendmail(const char *argv[], FILE **sm);
+char *sendmail_errstr(int sm_stat);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,485 @@
+/* spool.c -- Routines for spooling/parsing messages from a prot stream
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: spool.c,v 1.2.2.7 2006/05/26 16:27:19 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+
+#include "spool.h"
+#include "prot.h"
+#include "util.h"
+#include "xmalloc.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "nntp_err.h"
+#include "global.h"
+
+#define HEADERCACHESIZE 4009
+
+typedef struct Header header_t;
+
+/* data per message */
+struct Header {
+ char *name;
+ int ncontents;
+ char *contents[1];
+};
+
+hdrcache_t spool_new_hdrcache()
+{
+ int i;
+ hdrcache_t cache;
+
+ cache = (hdrcache_t) xmalloc(HEADERCACHESIZE * sizeof(header_t*));
+ if (!cache) return NULL;
+
+ for (i = 0; i < HEADERCACHESIZE; i++)
+ cache[i] = NULL;
+
+ return cache;
+}
+
+/* hash function used for header cache in struct msg */
+static int hashheader(char *header)
+{
+ int x = 0;
+ /* any CHAR except ' ', :, or a ctrl char */
+ for (; !iscntrl((int) *header) && (*header != ' ') && (*header != ':');
+ header++) {
+ x *= 256;
+ x += *header;
+ x %= HEADERCACHESIZE;
+ }
+ return x;
+}
+
+/* take a list of headers, pull the first one out and return it in
+ name and contents.
+
+ copies fin to fout, massaging
+
+ returns 0 on success, negative on failure */
+typedef enum {
+ NAME_START,
+ NAME,
+ COLON,
+ BODY_START,
+ BODY
+} state;
+
+enum {
+ NAMEINC = 128,
+ BODYINC = 1024
+};
+
+/* we don't have to worry about dotstuffing here, since it's illegal
+ for a header to begin with a dot!
+
+ returns 0 on success, filling in 'headname' and 'contents' with a static
+ pointer (blech).
+ on end of headers, returns 0 with NULL 'headname' and NULL 'contents'
+
+ on error, returns < 0
+*/
+static int parseheader(struct protstream *fin, FILE *fout,
+ char **headname, char **contents,
+ const char **skipheaders)
+{
+ int c;
+ static char *name = NULL, *body = NULL;
+ static int namelen = 0, bodylen = 0;
+ int off = 0;
+ state s = NAME_START;
+ int r = 0;
+ int reject8bit = config_getswitch(IMAPOPT_REJECT8BIT);
+ int munge8bit = config_getswitch(IMAPOPT_MUNGE8BIT);
+ const char **skip = NULL;
+
+ if (namelen == 0) {
+ namelen += NAMEINC;
+ name = (char *) xrealloc(name, namelen * sizeof(char));
+ }
+ if (bodylen == 0) {
+ bodylen += BODYINC;
+ body = (char *) xrealloc(body, bodylen * sizeof(char));
+ }
+
+ /* there are two ways out of this loop, both via gotos:
+ either we successfully read a header (got_header)
+ or we hit an error (ph_error) */
+ while ((c = prot_getc(fin)) != EOF) { /* examine each character */
+ switch (s) {
+ case NAME_START:
+ if (c == '.') {
+ int peek;
+
+ peek = prot_getc(fin);
+ prot_ungetc(peek, fin);
+
+ if (peek == '\r' || peek == '\n') {
+ /* just reached the end of message */
+ r = 0;
+ goto ph_error;
+ }
+ }
+ if (c == '\r' || c == '\n') {
+ /* just reached the end of headers */
+ r = 0;
+ goto ph_error;
+ }
+ /* field-name = 1*ftext
+ ftext = %d33-57 / %d59-126
+ ; Any character except
+ ; controls, SP, and
+ ; ":". */
+ if (!((c >= 33 && c <= 57) || (c >= 59 && c <= 126))) {
+ /* invalid header name */
+ r = IMAP_MESSAGE_BADHEADER;
+ goto ph_error;
+ }
+ name[0] = c;
+ off = 1;
+ s = NAME;
+ break;
+
+ case NAME:
+ if (c == ' ' || c == '\t' || c == ':') {
+ name[off] = '\0';
+ /* see if this header is in our skip list */
+ for (skip = skipheaders;
+ skip && *skip && strcasecmp(name, *skip); skip++);
+ if (!skip || !*skip) {
+ /* write the header name to the output */
+ fputs(name, fout);
+ skip = NULL;
+ }
+ s = (c == ':' ? BODY_START : COLON);
+ break;
+ }
+ if (!((c >= 33 && c <= 57) || (c >= 59 && c <= 126))) {
+ r = IMAP_MESSAGE_BADHEADER;
+ goto ph_error;
+ }
+ name[off++] = c;
+ if (off >= namelen - 3) {
+ namelen += NAMEINC;
+ name = (char *) xrealloc(name, namelen);
+ }
+ break;
+
+ case COLON:
+ if (c == ':') {
+ s = BODY_START;
+ } else if (c != ' ' && c != '\t') {
+ /* i want to avoid confusing dot-stuffing later */
+ while (c == '.') {
+ if (!skip) fputc(c, fout);
+ c = prot_getc(fin);
+ }
+ r = IMAP_MESSAGE_BADHEADER;
+ goto ph_error;
+ }
+ break;
+
+ case BODY_START:
+ if (c == ' ' || c == '\t') /* eat the whitespace */
+ break;
+ off = 0;
+ s = BODY;
+ /* falls through! */
+ case BODY:
+ /* now we want to convert all newlines into \r\n */
+ if (c == '\r' || c == '\n') {
+ int peek;
+
+ peek = prot_getc(fin);
+
+ if (!skip) {
+ fputc('\r', fout);
+ fputc('\n', fout);
+ }
+ /* we should peek ahead to see if it's folded whitespace */
+ if (c == '\r' && peek == '\n') {
+ c = prot_getc(fin);
+ } else {
+ c = peek; /* single newline seperator */
+ }
+ if (c != ' ' && c != '\t') {
+ /* this is the end of the header */
+ body[off] = '\0';
+ prot_ungetc(c, fin);
+ goto got_header;
+ }
+ /* ignore this whitespace, but we'll copy all the rest in */
+ break;
+ } else {
+ if (c >= 0x80) {
+ if (reject8bit) {
+ /* We have been configured to reject all mail of this
+ form. */
+ r = IMAP_MESSAGE_CONTAINS8BIT;
+ goto ph_error;
+ } else if (munge8bit) {
+ /* We have been configured to munge all mail of this
+ form. */
+ c = 'X';
+ }
+ }
+ /* just an ordinary character */
+ body[off++] = c;
+ if (off >= bodylen - 3) {
+ bodylen += BODYINC;
+ body = (char *) xrealloc(body, bodylen);
+ }
+ }
+ }
+
+ /* copy this to the output */
+ if (s != NAME && !skip) fputc(c, fout);
+ }
+
+ /* if we fall off the end of the loop, we hit some sort of error
+ condition */
+
+ ph_error:
+ /* put the last character back; we'll copy it later */
+ prot_ungetc(c, fin);
+
+ /* and we didn't get a header */
+ if (headname != NULL) *headname = NULL;
+ if (contents != NULL) *contents = NULL;
+ return r;
+
+ got_header:
+ if (headname != NULL) *headname = xstrdup(name);
+ if (contents != NULL) *contents = xstrdup(body);
+
+ return 0;
+}
+
+void spool_cache_header(char *name, char *body, hdrcache_t cache)
+{
+ int cl, clinit;
+
+ lcase(name);
+ clinit = cl = hashheader(name);
+ while (cache[cl] != NULL && strcmp(name, cache[cl]->name)) {
+ cl++; /* resolve collisions linearly */
+ cl %= HEADERCACHESIZE;
+ if (cl == clinit) break; /* gone all the way around, so bail */
+ }
+
+ /* found where to put it, so insert it into a list */
+ if (cache[cl]) {
+ /* add this body on */
+ cache[cl]->contents[cache[cl]->ncontents++] = body;
+
+ /* whoops, won't have room for the null at the end! */
+ if (!(cache[cl]->ncontents % 8)) {
+ /* increase the size */
+ cache[cl] = (header_t *)
+ xrealloc(cache[cl],sizeof(header_t) +
+ ((8 + cache[cl]->ncontents) * sizeof(char *)));
+ }
+
+ /* have no need of this */
+ free(name);
+ } else {
+ /* create a new entry in the hash table */
+ cache[cl] = (header_t *) xmalloc(sizeof(header_t) + 8 * sizeof(char*));
+ cache[cl]->name = name;
+ cache[cl]->contents[0] = body;
+ cache[cl]->ncontents = 1;
+ }
+
+ /* we always want a NULL at the end */
+ cache[cl]->contents[cache[cl]->ncontents] = NULL;
+}
+
+int spool_fill_hdrcache(struct protstream *fin, FILE *fout, hdrcache_t cache,
+ const char **skipheaders)
+{
+ int r = 0;
+
+ /* let's fill that header cache */
+ for (;;) {
+ char *name, *body;
+
+ if ((r = parseheader(fin, fout, &name, &body, skipheaders)) < 0) {
+ break;
+ }
+ if (!name) {
+ /* reached the end of headers */
+ break;
+ }
+
+ /* put it in the hash table */
+ spool_cache_header(name, body, cache);
+ }
+
+ return r;
+}
+
+const char **spool_getheader(hdrcache_t cache, const char *phead)
+{
+ char *head;
+ const char **ret = NULL;
+ int clinit, cl;
+
+ assert(cache && phead);
+
+ head = xstrdup(phead);
+ lcase(head);
+
+ /* check the cache */
+ clinit = cl = hashheader(head);
+ while (cache[cl] != NULL) {
+ if (!strcmp(head, cache[cl]->name)) {
+ ret = (const char **) cache[cl]->contents;
+ break;
+ }
+ cl++; /* try next hash bin */
+ cl %= HEADERCACHESIZE;
+ if (cl == clinit) break; /* gone all the way around */
+ }
+
+ free(head);
+
+ return ret;
+}
+
+void spool_free_hdrcache(hdrcache_t cache)
+{
+ int i, j;
+
+ if (!cache) return;
+
+ for (i = 0; i < HEADERCACHESIZE; i++) {
+ if (cache[i]) {
+ free(cache[i]->name);
+ for (j = 0; j < cache[i]->ncontents; j++) {
+ free(cache[i]->contents[j]);
+ }
+ free(cache[i]);
+ }
+ }
+ free(cache);
+}
+
+/* copies the message from fin to fout, massaging accordingly:
+ . newlines are fiddled to \r\n
+ . "." terminates
+ . embedded NULs are rejected
+ . bare \r are removed
+*/
+int spool_copy_msg(struct protstream *fin, FILE *fout)
+{
+ char buf[8192], *p;
+ int r = 0;
+
+ /* -2: Might need room to add a \r\n\0 set */
+ while (prot_fgets(buf, sizeof(buf)-2, fin)) {
+ p = buf + strlen(buf) - 1;
+ if (p < buf) {
+ /* buffer start with a \0 */
+ r = IMAP_MESSAGE_CONTAINSNULL;
+ continue; /* need to eat the rest of the message */
+ }
+ else if (buf[0] == '\r' && buf[1] == '\0') {
+ /* The message contained \r\0, and fgets is confusing us. */
+ r = IMAP_MESSAGE_CONTAINSNULL;
+ continue; /* need to eat the rest of the message */
+ }
+ else if (p[0] == '\r') {
+ /*
+ * We were unlucky enough to get a CR just before we ran
+ * out of buffer--put it back.
+ */
+ prot_ungetc('\r', fin);
+ *p = '\0';
+ }
+ else if (p[0] == '\n' && (p == buf || p[-1] != '\r')) {
+ /* found an \n without a \r */
+ p[0] = '\r';
+ p[1] = '\n';
+ p[2] = '\0';
+ }
+ else if (p[0] != '\n' && (strlen(buf) < sizeof(buf)-3)) {
+ /* line contained a \0 not at the end */
+ r = IMAP_MESSAGE_CONTAINSNULL;
+ continue;
+ }
+
+ /* Remove any lone CR characters */
+ while ((p = strchr(buf, '\r')) && p[1] != '\n') {
+ /* Src/Target overlap, use memmove */
+ /* strlen(p) will result in copying the NUL byte as well */
+ memmove(p, p+1, strlen(p));
+ }
+
+ if (buf[0] == '.') {
+ if (buf[1] == '\r' && buf[2] == '\n') {
+ /* End of message */
+ goto dot;
+ }
+ /* Remove the dot-stuffing */
+ if (fout) fputs(buf+1, fout);
+ } else {
+ if (fout) fputs(buf, fout);
+ }
+ }
+
+ /* wow, serious error---got a premature EOF. */
+ return IMAP_IOERROR;
+
+ dot:
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/spool.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,62 @@
+/* spool.h -- Routines for spooling/parsing messages from a prot stream
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: spool.h,v 1.2.2.2 2004/03/24 19:53:11 ken3 Exp $
+ */
+
+#ifndef INCLUDED_SPOOL_H
+#define INCLUDED_SPOOL_H
+
+#include <stdio.h>
+#include "prot.h"
+
+typedef struct Header **hdrcache_t;
+
+hdrcache_t spool_new_hdrcache();
+void spool_cache_header(char *name, char *body, hdrcache_t cache);
+int spool_fill_hdrcache(struct protstream *fin, FILE *fout, hdrcache_t cache,
+ const char **skipheaders);
+const char **spool_getheader(hdrcache_t cache, const char *phead);
+void spool_free_hdrcache(hdrcache_t cache);
+int spool_copy_msg(struct protstream *fin, FILE *fout);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,615 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: squat.c,v 1.6.4.1 2004/02/27 21:17:36 ken3 Exp $
+ */
+
+/*
+ SQUAT code for searching indexes.
+ Robert O'Callahan
+*/
+
+#include <config.h>
+
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include "squat_internal.h"
+
+#include "xmalloc.h"
+
+struct _SquatSearchIndex {
+ int index_fd; /* the index file */
+ char const* data; /* where it's mmaped to */
+ char const* doc_list; /* where does the doc-list
+ sequence start in memory */
+ char const* word_list; /* where does the word trie
+ offset table start in memory */
+ char const* doc_ID_list; /* where does the doc-ID-list
+ array start in memory */
+ char const* data_end; /* the end of the mmaped file */
+ unsigned char valid_char_bits[32]; /* which characters are valid in
+ queries according to whoever
+ created the index */
+};
+
+/* For each 0 <= i < 256, bit_counts[i] is the number of bits set in i */
+static char bit_counts[256];
+
+/* Returns true IFF the 'len' bytes starting at 's' are each equal to 'v' */
+static int memconst(char const* s, int len, char v) {
+ while (len > 0 && *s == v) {
+ s++;
+ len--;
+ }
+ return len == 0;
+}
+
+SquatSearchIndex* squat_search_open(int fd) {
+ struct stat buf;
+ SquatSearchIndex* index;
+ SquatDiskHeader const* header;
+ SquatInt64 doc_list_offset, doc_ID_list_offset, word_list_offset;
+ SquatInt64 data_len;
+
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ /* initialize bit_counts constant array.
+ This is so clever, I could die */
+ if (bit_counts[1] == 0) {
+ int c;
+ for (c = 1; c < 256; c++) {
+ bit_counts[c] = bit_counts[c >> 1] + (c & 1);
+ }
+ }
+
+ index = (SquatSearchIndex*)xmalloc(sizeof(SquatSearchIndex));
+ index->index_fd = fd;
+
+ if (fstat(fd, &buf) != 0) { /* fstat64? */
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ goto cleanup_index;
+ }
+ data_len = buf.st_size - SQUAT_SAFETY_ZONE;
+ if (data_len < sizeof(SquatDiskHeader)) {
+ squat_set_last_error(SQUAT_ERR_INVALID_INDEX_FILE);
+ goto cleanup_index;
+ }
+
+ index->data = mmap(NULL, data_len + SQUAT_SAFETY_ZONE, PROT_READ, MAP_SHARED, fd, 0);
+ if (index->data == MAP_FAILED) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ goto cleanup_index;
+ }
+
+ header = (SquatDiskHeader const*)index->data;
+ doc_list_offset = squat_decode_64(header->doc_list_offset);
+ word_list_offset = squat_decode_64(header->word_list_offset);
+ doc_ID_list_offset = squat_decode_64(header->doc_ID_list_offset);
+
+ /* Do some sanity checking in case the header was corrupted. We wouldn't
+ want to dereference any bad pointers... */
+ if (memcmp(header->header_text, squat_index_file_header, 8) != 0
+ || doc_list_offset < 0 || doc_list_offset >= data_len
+ || word_list_offset < 0 || word_list_offset >= data_len
+ || doc_ID_list_offset < 0 || doc_ID_list_offset >= data_len
+ || !memconst(index->data + data_len, SQUAT_SAFETY_ZONE, 0)) {
+ squat_set_last_error(SQUAT_ERR_INVALID_INDEX_FILE);
+ goto cleanup_unmap;
+ }
+
+ index->doc_list = index->data + doc_list_offset;
+ index->word_list = index->data + word_list_offset;
+ index->doc_ID_list = index->data + doc_ID_list_offset;
+ index->data_end = index->data + data_len;
+ memcpy(index->valid_char_bits, header->valid_char_bits,
+ sizeof(index->valid_char_bits));
+
+ return index;
+
+cleanup_unmap:
+ munmap((void*)index->data, data_len + SQUAT_SAFETY_ZONE);
+
+cleanup_index:
+ free(index);
+ return NULL;
+}
+
+int squat_search_list_docs(SquatSearchIndex* index,
+ SquatListDocCallback handler, void* closure) {
+ char const* s = index->doc_list;
+
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ while (*s != 0) {
+ SquatListDoc list_doc;
+ int r;
+
+ list_doc.doc_name = s;
+ s += strlen(s) + 1;
+ list_doc.size = squat_decode_I(&s);
+ r = handler(closure, &list_doc);
+
+ if (r == SQUAT_CALLBACK_ABORT) {
+ break;
+ }
+ assert(r == SQUAT_CALLBACK_CONTINUE);
+ }
+
+ return SQUAT_OK;
+}
+
+/* Get a pointer to the index file's list of documents containing the
+ word 'data' */
+static char const* lookup_word_docs(SquatSearchIndex* index,
+ char const* data, int* invalid_file) {
+ int i;
+ char const* s = index->word_list;
+
+ for (i = 0; i < SQUAT_WORD_SIZE; i++) {
+ char p;
+ char ch = data[i];
+ char const* branch_start = s;
+ int skip;
+
+ /* decode 'present' bits to see if ch is present at this level of
+ the tries */
+ p = *s++;
+ if ((p & 0xE0) != 0) { /* singleton */
+ if (ch != p) {
+ return NULL;
+ }
+ skip = 0;
+ /* we're done. s is now pointing at the data for the singleton */
+ } else { /* list of bits */
+ char count;
+ char const* base;
+ int offset, j;
+
+ if ((unsigned char)ch < 8*p) { /* before start of list */
+ return NULL;
+ }
+
+ count = (*s++) + 1;
+
+ if ((unsigned char)ch >= 8*(p + count)) { /* beyond end of list */
+ return NULL;
+ }
+
+ offset = (unsigned char)ch/8 - p;
+ if ((s[offset] & (1 << (ch & 7))) == 0) { /* not in list */
+ return NULL;
+ }
+
+ base = s;
+ s += count;
+
+ /* figure out how many entries there are before our entry */
+ skip = 0;
+ for (j = 0; j < offset; j++) {
+ skip += bit_counts[(unsigned char)base[j]];
+ }
+ for (j = 0; j < (ch & 7); j++) {
+ if ((base[offset] & (1 << j)) != 0) {
+ skip++;
+ }
+ }
+ }
+
+ if (i < SQUAT_WORD_SIZE - 1) {
+ int next_offset;
+
+ s = squat_decode_skip_I(s, skip);
+
+ /* find offset to next branch data */
+ next_offset = squat_decode_I(&s);
+ s = branch_start - next_offset;
+ if (next_offset < 0 || s >= index->data_end) {
+ *invalid_file = 1;
+ return NULL; /* corrupt index */
+ }
+ } else {
+ /* leaf case. We need to scan through the document lists for each
+ leaf to skip. */
+ while (skip-- > 0) {
+ char const* t = s;
+ int v = (int)squat_decode_I(&t);
+
+ if ((v & 1) != 0) {
+ s = t; /* singleton; no more data to eat for this word */
+ } else {
+ s = t + (v >> 1); /* run-list; size is in v>>1 */
+ }
+ }
+ }
+ /* s now points at the trie branch for the data */
+ }
+
+ return s;
+}
+
+/* Get the pointer to the list of documents containing 'data' into
+ '*run_start', and return the number of documents in the list. */
+static int count_docs_containing_word(SquatSearchIndex* index,
+ char const* data, char const** run_start) {
+ int invalid_file = 0;
+ char const* raw_doc_list = lookup_word_docs(index, data, &invalid_file);
+ int i;
+
+ if (raw_doc_list == NULL) {
+ return invalid_file ? -1 : 0;
+ }
+
+ *run_start = raw_doc_list;
+
+ i = (int)squat_decode_I(&raw_doc_list);
+ if ((i & 1) != 0) {
+ return 1; /* singleton */
+ } else {
+ int size = i >> 1;
+ char const* s = raw_doc_list;
+ int count = 0;
+
+ if (raw_doc_list + size >= index->data_end) {
+ return -1;
+ }
+
+ while (s - raw_doc_list < size) {
+ i = (int)squat_decode_I(&s);
+ if ((i & 1) == 1) {
+ count++;
+ } else {
+ count += i >> 1;
+ s = squat_decode_skip_I(s, 1);
+ }
+ }
+
+ if (raw_doc_list + size != s) {
+ return -1;
+ }
+
+ return count;
+ }
+}
+
+/* We store a set of documents in this little structure. The set
+ also maintains a 'current' document pointer. */
+typedef struct {
+ int array_len; /* The length of the array below */
+ int* array_data; /* An array of document IDs, sorted by increasing
+ document ID. It can also contain elements equal
+ to -1, which means "no document".
+ */
+ int index; /* The index of the 'current' document within the array. */
+} SquatDocSet;
+
+/* Extract the list of documents containing the word 'data' into a
+ SquatDocSet. The list is extracted from the index file data
+ 'doc_list' which refers to 'doc_count' documents.
+*/
+static int
+set_to_docs_containing_word(SquatSearchIndex* index __attribute__((unused)),
+ SquatDocSet* set,
+ char const* data __attribute__((unused)),
+ int doc_count, char const* doc_list)
+{
+ int i;
+
+ set->array_len = doc_count;
+ set->array_data = (int*)xmalloc(sizeof(int)*set->array_len);
+
+ i = (int)squat_decode_I(&doc_list);
+ if ((i & 1) != 0) {
+ set->array_data[0] = i >> 1;
+ } else {
+ int size = i >> 1;
+ char const* s = doc_list;
+ int last_doc = 0;
+ int j = 0;
+
+ while (s - doc_list < size) {
+ i = (int)squat_decode_I(&s);
+ if ((i & 1) == 1) {
+ last_doc = set->array_data[j++] = last_doc + (i >> 1);
+ } else {
+ int count = i >> 1;
+ int delta = squat_decode_I(&s);
+
+ last_doc += delta;
+ set->array_data[j++] = last_doc;
+ while (--count > 0) {
+ last_doc++;
+ set->array_data[j++] = last_doc;
+ }
+ }
+ }
+ }
+
+ return SQUAT_OK;
+}
+
+/* Advance the "current document" in the set to the first document
+ with ID > 'doc'. Remove any documents found along the way that were
+ not 'doc'.
+*/
+static void filter_doc(SquatDocSet* set, int doc) {
+ int i = set->index;
+
+ while (i < set->array_len && set->array_data[i] < doc) {
+ /* this document is not in the currently filtered set */
+ set->array_data[i] = -1;
+ i++;
+ }
+
+ /* skip over the matched document, if we matched */
+ if (i < set->array_len && set->array_data[i] == doc) {
+ i++;
+ }
+
+ set->index = i;
+}
+
+/* Remove from a SquatDocSet any documents not in the list of
+ documents containing the word 'data'. The list is extracted from
+ the index file data 'doc_list'.
+*/
+static void
+filter_to_docs_containing_word(SquatSearchIndex* index __attribute__((unused)),
+ SquatDocSet* set,
+ char const* data __attribute__((unused)),
+ char const* doc_list)
+{
+ int i = (int)squat_decode_I(&doc_list);
+
+ set->index = 0;
+
+ if ((i & 1) != 0) {
+ filter_doc(set, i >> 1);
+ } else {
+ int size = i >> 1;
+ char const* s = doc_list;
+ int last_doc = 0;
+
+ while (s - doc_list < size) {
+ i = (int)squat_decode_I(&s);
+ if ((i & 1) == 1) {
+ filter_doc(set, last_doc += i >> 1);
+ } else {
+ int count = i >> 1;
+ int delta = squat_decode_I(&s);
+
+ last_doc += delta;
+ filter_doc(set, last_doc);
+ while (--count > 0) {
+ last_doc++;
+ filter_doc(set, last_doc);
+ }
+ }
+ }
+ }
+}
+
+/* Advance the "current document" pointer to the first document in the set. */
+static void select_first_doc(SquatDocSet* set) {
+ set->index = 0;
+ while (set->index < set->array_len && set->array_data[set->index] < 0) {
+ set->index++;
+ }
+}
+
+/* Is the "current document" pointer pointing to any real document? */
+static int has_more_docs(SquatDocSet* set) {
+ return set->index < set->array_len;
+}
+
+/* Advance the "current document" pointer to the next document in the set,
+ and return its old value */
+static int get_next_doc(SquatDocSet* set) {
+ int doc = set->array_data[set->index];
+
+ set->index++;
+ while (set->index < set->array_len && set->array_data[set->index] < 0) {
+ set->index++;
+ }
+
+ return doc;
+}
+
+static void destroy_docset(SquatDocSet* set) {
+ free(set->array_data);
+}
+
+/* The basic strategy here is pretty simple. We just want to find the
+ documents that contain every subword of the search string. The
+ index tells us which documents contain each subword so it's just a
+ matter of doing O(N) lookups into the index. We construct an
+ explicit document list for one of the subwords and then iterate
+ through that list for each other subword, throwing out any
+ documents that don't contain that subword.
+
+ The only trick is that some subwords may occur in lots of documents
+ while others only occur in a few (or no) documents. In that case we
+ would rather construct the list with the smallest possible number
+ of documents, to save memory and the cost of traversing that list
+ several times.
+*/
+int squat_search_execute(SquatSearchIndex* index, char const* data,
+ int data_len, SquatSearchResultCallback handler, void* closure) {
+ int i;
+ int min_doc_count_word; /* The subword of 'data' that appears in
+ fewest documents */
+ int min_doc_count; /* The number of documents that include that
+ subword */
+ SquatDocSet set;
+ char const** run_starts;
+
+ /* First, do sanity checking on the string. We wouldn't want invalid
+ client searches to mysteriously return 'no documents'. */
+ if (data_len < SQUAT_WORD_SIZE) {
+ squat_set_last_error(SQUAT_ERR_SEARCH_STRING_TOO_SHORT);
+ return SQUAT_ERR;
+ }
+
+ for (i = 0; i < data_len; i++) {
+ int ch = (unsigned char)data[i];
+
+ if ((index->valid_char_bits[ch >> 3] & (1 << (ch & 7))) == 0) {
+ squat_set_last_error(SQUAT_ERR_SEARCH_STRING_INVALID_CHAR);
+ return SQUAT_ERR;
+ }
+ }
+
+ /* We search for every subword of the search string. We save a
+ pointer to the document list for each subword in this array
+ ... so we don't have to traverse the trie data structures more
+ than once per subword.
+ */
+ run_starts = (char const**)xmalloc(sizeof(char const*)*
+ (data_len - SQUAT_WORD_SIZE + 1));
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ /* Now, for each subword, find its list of documents and how many
+ documents are in the list. Remember the word which had minimum
+ number of documents.
+ */
+ min_doc_count = count_docs_containing_word(index, data, run_starts);
+ if (min_doc_count < 0) {
+ squat_set_last_error(SQUAT_ERR_INVALID_INDEX_FILE);
+ goto cleanup_run_starts;
+ } else if (min_doc_count == 0) {
+ /* The first word of the substring isn't in any documents, so we
+ can just stop now. */
+ goto cleanup_run_starts_ok;
+ }
+ min_doc_count_word = 0;
+ for (i = 1; i <= data_len - SQUAT_WORD_SIZE; i++) {
+ int doc_count = count_docs_containing_word(index, data + i,
+ run_starts + i);
+ if (doc_count < 0) {
+ squat_set_last_error(SQUAT_ERR_INVALID_INDEX_FILE);
+ goto cleanup_run_starts;
+ } else if (doc_count == 0) {
+ /* This word isn't in any documents, we can stop now. */
+ goto cleanup_run_starts_ok;
+ } else if (doc_count < min_doc_count) {
+ min_doc_count = doc_count;
+ min_doc_count_word = i;
+ }
+ }
+
+ /* Now, extract the shortest document list into an array. By
+ starting with the shortest document list we avoid pathological
+ situations where one or more of the subwords occurs in zillions
+ of documents, and we'd allocate a huge array and have to iterate
+ through it all lots of times.
+ */
+ if (set_to_docs_containing_word(index, &set, data + min_doc_count_word,
+ min_doc_count, run_starts[min_doc_count_word]) == SQUAT_ERR) {
+ goto cleanup_run_starts;
+ }
+ /* Scan through the other document lists and throw out any documents
+ that aren't in all those lists. */
+ for (i = 0; i <= data_len - SQUAT_WORD_SIZE; i++) {
+ if (i != min_doc_count_word) {
+ filter_to_docs_containing_word(index, &set, data + i, run_starts[i]);
+ }
+ }
+
+ /* Now we have the results. Scan through the set and report each
+ element to the callback function. */
+ select_first_doc(&set);
+ while (has_more_docs(&set)) {
+ int next_doc;
+ char const* next_doc_info;
+ char const* next_doc_data;
+ int r;
+
+ /* Lookup the document info so we can get the document name to report. */
+ next_doc = get_next_doc(&set);
+ next_doc_info = index->doc_ID_list + next_doc*4;
+ if (next_doc < 0 && next_doc_info >= index->data_end) {
+ squat_set_last_error(SQUAT_ERR_INVALID_INDEX_FILE);
+ goto cleanup_docset;
+ }
+
+ next_doc_data = index->doc_list + squat_decode_32(next_doc_info);
+ if (next_doc_data < index->doc_list || next_doc_data >= index->data_end) {
+ squat_set_last_error(SQUAT_ERR_INVALID_INDEX_FILE);
+ goto cleanup_docset;
+ }
+
+ r = handler(closure, next_doc_data);
+ if (r == SQUAT_CALLBACK_ABORT) {
+ break;
+ }
+ assert(r == SQUAT_CALLBACK_CONTINUE);
+ }
+
+ destroy_docset(&set);
+
+cleanup_run_starts_ok:
+ free(run_starts);
+ return SQUAT_OK;
+
+cleanup_docset:
+ destroy_docset(&set);
+
+cleanup_run_starts:
+ free(run_starts);
+ return SQUAT_ERR;
+}
+
+int squat_search_close(SquatSearchIndex* index) {
+ int r = SQUAT_OK;
+
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ if (munmap((void*)index->data,
+ index->data_end + SQUAT_SAFETY_ZONE - index->data) != 0) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ r = SQUAT_ERR;
+ }
+
+ free(index);
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,320 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: squat.h,v 1.2 2003/02/13 20:15:31 rjs3 Exp $
+ */
+
+/*
+ SQUAT library public interface.
+ Robert O'Callahan
+
+ SQUAT (Search QUery Answer Tool) is a library for full-text indexing
+ and searching.
+
+ The primary design goals are simplicity and robustness. There are
+ two parts to the API:
+ -- Indexing: Build an index by feeding in a set of documents
+ composed of arbitrary binary text.
+ -- Searching: Specify an arbitrary substring (of length >=
+ SQUAT_WORD_SIZE, default 4) and return a superset of the
+ documents which contain the substring. (SQUAT can (and
+ occasionally does) return documents which do not match the
+ string, thus the documents must be searched 'by hand' after
+ obtaining a document list from SQUAT.)
+
+ SQUAT provides the following features that other similar engines do not:
+ -- Simple generic API (see above). No "word" heuristics to tweak. No
+ confusion about what can or cannot be matched. This makes SQUAT
+ suitable for indexing non-English, non-ASCII documents.
+ -- Simple, robust design. SQUAT has a very small amount of code. It
+ has been engineered for robustness; arbitrary input documents are
+ allowed, and corrupt index files are always be detected and
+ handled by SQUAT (i.e., it should never crash or behave
+ unpredictably). Anything less is a bug.
+ -- Robust performance. SQUAT searches are always fast. SQUAT index
+ creation uses a two-pass algorithm that consumes little memory
+ even for very large document collections and runs in time linear
+ in the combined size of the documents.
+ -- Easy embedding. The simple C library API makes it easy to add
+ SQUAT index creation and searching functionality to existing
+ applications without the need for helper processes or
+ tools. SQUAT's robustness makes it safe to do so.
+
+ NOTES:
+
+ SQUAT is not thread safe. Make sure that only one thread is in SQUAT
+ code at a time.
+
+ Arbitrary binary substring searching is often not what you want for
+ your application. Most users will want to canonicalize the indexed
+ text and/or queries before feeding them into SQUAT, for example by
+ converting to a uniform case, or by converting runs of whitespace to
+ a single space. Such conversions are the responsibility of the
+ client.
+
+ Minimal index size is *not* a goal of SQUAT. SQUAT tries to build
+ small indices but does not use techniques such as aggregation of
+ small documents (blocking) or aggressive file compression. The main
+ reason for this is to keep the code simple and robust. Another
+ reason is that disk is cheap. (Of course, one could perform blocking
+ at the client level to feed approximately equal size documents into
+ SQUAT, which would reduce index size and possibly make searches
+ faster if the application needs to find the location of the search
+ text and/or verify the search match within each document.) In
+ practice I find that, indexing my email, the indexes are about the
+ size as the processed source text, which is about 1/3 of the total
+ size of my email (since Cyrus' processing strips whitespace, binary
+ attachments, etc).
+
+ The index file format is platform and architecture independent. The
+ file format supports 64-bit file offsets so in theory >2GB index
+ files would work, but the code has not been tested on any 64-bit
+ architectures (64 bit addressing would be needed to mmap such
+ files), so >2GB index files probably don't work in practice.
+*/
+
+#ifndef __SQUAT_H
+#define __SQUAT_H
+
+/* Don't change this unless you're SURE you know what you're doing.
+ Its only effect on the API is that searches for strings that are
+ shorter than SQUAT_WORD_SIZE are not allowed.
+ In SQUAT, a 'word' simply refers to a string of SQUAT_WORD_SIZE
+ arbitrary bytes.
+*/
+#define SQUAT_WORD_SIZE 4
+
+/* Type used for an index under construction. */
+typedef struct _SquatIndex SquatIndex;
+/* Type used for an index being searched. */
+typedef struct _SquatSearchIndex SquatSearchIndex;
+
+typedef long long SquatInt64;
+typedef int SquatInt32;
+
+/* All SQUAT index files start with this magic 8 bytes */
+extern char const squat_index_file_header[8]; /* "SQUAT 1\n" */
+
+/* SQUAT return values */
+#define SQUAT_OK 1
+#define SQUAT_ERR 2
+#define SQUAT_LAST_BUILTIN SQUAT_ERR
+
+/* SQUAT error codes */
+#define SQUAT_ERR_OK 1
+#define SQUAT_ERR_OUT_OF_MEMORY 2
+#define SQUAT_ERR_SYSERR 3 /* check errno */
+#define SQUAT_ERR_INVALID_INDEX_FILE 4
+#define SQUAT_ERR_SEARCH_STRING_TOO_SHORT 5
+#define SQUAT_ERR_SEARCH_STRING_INVALID_CHAR 6
+int squat_get_last_error(void);
+
+
+/***************************************
+ INDEX CONSTRUCTION API
+***************************************/
+
+/* You can get reports about the progress of index creation using a
+ "stats callback" function. Your callback function is called every
+ time an event occurs. */
+#define SQUAT_STATS_COMPLETED_DOC 1 /* Finished processing a document */
+#define SQUAT_STATS_COMPLETED_INITIAL_CHAR 2 /* Indexed all words
+ beginning with a given
+ byte */
+typedef union { /* An event report */
+ struct {
+ int type; /* the type of the event, a SQUAT_STATS_ constant */
+ } generic;
+ struct { /* data for a COMPLETED_DOC event, issued during
+ squat_index_close_document */
+ int type;
+ int const* num_unique_words; /* num_unique_words[i] gives the
+ number of unique words in this
+ source document beginning with the
+ byte i */
+ } completed_doc;
+ struct { /* data for a COMPLETED_INITIAL_CHAR event, issued
+ during squat_index_finish */
+ int type;
+ int completed_char; /* We've just finished processing all
+ words beginning with this byte */
+ int num_words; /* How many unique words over all
+ documents start with this byte */
+ int temp_file_size; /* The size of the temporary file that was
+ used for this byte */
+ } completed_initial_char;
+} SquatStatsEvent;
+typedef void (* SquatStatsCallback)(void* closure, SquatStatsEvent* params);
+
+/* Create a SQUAT index. The index is dumped into 'fd', which should
+ be an empty file opened for writing.
+
+ SQUAT indexing takes space that may be up to 5 times the size of
+ the input documents in the worst case (average case is much
+ lower!). SQUAT will create hundreds of temporary files in /tmp or
+ the directory you specify.
+
+ Once a SquatIndex is successfully initialized, the caller is
+ obligated to call "squat_index_destroy" or "squat_index_finish" on
+ the index.
+*/
+#define SQUAT_OPTION_TMP_PATH 0x01 /* The tmp_path options field is valid. */
+#define SQUAT_OPTION_VALID_CHARS 0x02 /* The valid_chars options field is valid. */
+#define SQUAT_OPTION_STATISTICS 0x04 /* The stats_callback* options
+ fields are valid. */
+typedef struct {
+ int option_mask; /* Which options fields have been
+ initialized? */
+ char const* tmp_path; /* A directory where all
+ temporary files will be
+ created. Must not have any
+ trailing slash. */
+ char const* valid_chars; /* A null-terminated string
+ containing the characters
+ which can appear in search
+ strings. (Sorry, if you use
+ this option, the null
+ character is never allowed in
+ search strings.) If you try to
+ use any other bytes in a
+ search string, you will get an
+ error. If you know in advance
+ that certain bytes cannot
+ appear in search strings, you
+ can improve performance using
+ this option (especially if
+ those bytes do occur in source
+ documents). */
+ SquatStatsCallback stats_callback; /* See above */
+ void* stats_callback_closure; /* Private data passed down into
+ the callback function */
+} SquatOptions;
+SquatIndex* squat_index_init(int fd, SquatOptions const* options);
+
+
+/* Start adding a new document to the index. The name is a
+ null-terminated UTF8 string which is associated with the document.
+ Call this after successfully calling squat_index_init or
+ squat_index_close_document.
+*/
+int squat_index_open_document(SquatIndex* index, char const* name);
+
+
+/* Notify SQUAT about some more data in the current document. This
+ function can be called as many times as desired until all the data
+ in the document has been fed into SQUAT. Call this after
+ successfully calling squat_index_open_document or
+ squat_index_append_document. */
+int squat_index_append_document(SquatIndex* index, char const* data,
+ int data_len);
+
+
+/* Notify SQUAT that the current document has ended.
+ Call this after successfully calling squat_index_open_document or
+ squat_index_append_document. */
+int squat_index_close_document(SquatIndex* index);
+
+
+/* Notify SQUAT that there are no more documents. SQUAT will finish
+ generating the index. It is the client's responsibility to close
+ the original index file. All SQUAT resources associated with the
+ index are released whether this call succeeds or fails.
+ Call this after successfully calling squat_index_init or
+ squat_index_close_document. */
+int squat_index_finish(SquatIndex* index);
+
+
+/* Notify SQUAT that something has gone wrong and index construction
+ must be aborted. It is the client's responsibility to close and/or
+ remove the original index file. All SQUAT resources associated with
+ the index are released whether this call succeeds or fails.
+ Call this anytime. */
+int squat_index_destroy(SquatIndex* index);
+
+
+/***************************************
+ INDEX SEARCH API
+***************************************/
+
+/* Open an index for searching. 'fd' should be an index file opened
+ for reading, positioned at the beginning of the file.
+
+ This function mmaps the entire index file. If there is not enough
+ virtual address space available it will fail with SQUAT_ERR_SYSERR.
+*/
+SquatSearchIndex* squat_search_open(int fd);
+
+/* Get a list of the documents included in the index.
+ The callback function is called once for each document. The
+ callback function returns one of the following results to control
+ the progress of the operation. Call this after successfully calling
+ squat_search_open, squat_search_list_docs, or squat_search_execute. */
+#define SQUAT_CALLBACK_CONTINUE 1 /* return this from the callback
+ function to continue with the
+ operation. */
+#define SQUAT_CALLBACK_ABORT 2 /* return this from the callback
+ function to abort the current
+ operation and return to the
+ client. */
+typedef struct {
+ char const* doc_name; /* The UTF8 name of the document. */
+ SquatInt64 size; /* The total size of the document in bytes. */
+} SquatListDoc;
+typedef int (* SquatListDocCallback)(void* closure, SquatListDoc const* doc);
+int squat_search_list_docs(SquatSearchIndex* index,
+ SquatListDocCallback handler, void* closure);
+
+
+/* Get a list of the documents that may include the given search string.
+ The callback function is called once for each possibly-matching
+ document. The callback function returns one of the above results to
+ control the progress of the operation. Call this after successfully
+ calling squat_search_open, squat_search_list_docs, or
+ squat_search_execute. */
+typedef int (* SquatSearchResultCallback)(void* closure, char const* doc_name);
+int squat_search_execute(SquatSearchIndex* index, char const* data,
+ int data_len, SquatSearchResultCallback handler, void* closure);
+
+
+/* Release the SQUAT resources associated with an index. The resources
+ are released whether this call succeeds or fails.
+ Call this anytime. */
+int squat_search_close(SquatSearchIndex* index);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_build.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_build.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_build.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_build.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1462 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: squat_build.c,v 1.9.4.1 2004/12/15 16:42:50 ken3 Exp $
+ */
+
+/*
+ SQUAT code for building indexes.
+ Robert O'Callahan
+
+ IMPLEMENTATION NOTES:
+
+ The basic strategy here is pretty simple. During the index build
+ process we keep 256 temporary files. Each time we read a source
+ document, we add all its words that start with byte i, along with
+ the document ID, to file #i. Once we've seen all the source
+ documents we proceed through each temporary file #i, one by one,
+ constructing a trie of all the words starting with byte i, and which
+ stores the IDs of the documents that contain each word. When we get
+ to the end of each temporary file, we can write out the trie to the
+ index file and start all over again on the next temporary file.
+
+ This is marvellously scalable! During the document reading phase,
+ we're just dumping data out into temporary files, and the amount of
+ data we dump out is proportional to the total size of the source
+ documents. (In the worst case, with large input files of random
+ data, we write out 3 bytes per input byte into temporary files.)
+ During the trie-building phase, we reread the temporary files and
+ output the final index. In this phase we consume a fair bit of
+ memory, but in the worst case only 8 bytes per document ID per word
+ which starts with the right byte. Even in the very worst case, if
+ there were gigabytes of random data, there are only 2^24 possible
+ such words, and in practice of course there are far fewer.
+
+ In practice performance is dominated by sequential I/O. On my email,
+ I can index half a megabyte of source text per second on a
+ single-disk desktop PC.
+
+ The same trie data structures are used to build tries to record the
+ words used in a particular document (while the source document is
+ being fed in) and to build tries to record the words used in all
+ documents that start with a given byte (while we process each
+ temporary file).
+
+ Each "per document" trie stores all words occurring in the
+ document. We make it a depth 3 trie, and at the leaves we store a
+ bit vector recording which words are present in the document, with a
+ bit set to 1 if a word occurs with its 4th character set to the
+ corresponding byte.
+
+ Each "all document" trie assumes a fixed first word byte, and
+ therefore is only of depth 3. The leaves store the list of document
+ IDs containing the word.
+*/
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/mman.h>
+
+#include "squat_internal.h"
+
+#include "index.h"
+#include "xmalloc.h"
+
+/* A simple write-buffering module which avoids copying of the output data. */
+
+typedef struct {
+ char* buf; /* The malloc'ed buffer, or NULL if there
+ isn't one. */
+ int buf_size; /* The size of that buffer. */
+ int data_len; /* How much data in that buffer is valid. */
+ int fd; /* The fd to write to. */
+ int total_output_bytes; /* How much data have we written out
+ through this buffer in total? */
+} SquatWriteBuffer;
+
+static int init_write_buffer(SquatWriteBuffer* b, int buf_size, int fd) {
+ b->buf_size = buf_size;
+ b->buf = xmalloc(b->buf_size);
+ b->fd = fd;
+ b->data_len = 0;
+ b->total_output_bytes = 0;
+
+ return SQUAT_OK;
+}
+
+/* Make sure that there is enough space in the buffer to write 'len' bytes.
+ Return a pointer to where the written data should be placed. */
+static char* prepare_buffered_write(SquatWriteBuffer* b, int len) {
+ if (b->data_len + len >= b->buf_size) {
+ if (write(b->fd, b->buf, b->data_len) != b->data_len) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ return NULL;
+ }
+ if (b->buf_size < len) {
+ b->buf = (char*)xrealloc(b->buf, len);
+ if (b->buf == NULL) {
+ squat_set_last_error(SQUAT_ERR_OUT_OF_MEMORY);
+ return NULL;
+ }
+ }
+ b->data_len = 0;
+ }
+
+ return b->buf + b->data_len;
+}
+
+/* Signal that data has been written up to the mark 'ptr'.
+ Call this after prepare_buffered_write. */
+static void complete_buffered_write(SquatWriteBuffer* b, char* ptr) {
+ int old_data_len = b->data_len;
+
+ b->data_len = ptr - b->buf;
+ b->total_output_bytes += b->data_len - old_data_len;
+}
+
+/* Flush the output buffer to the file. Reset the file pointer to the start
+ of the file. */
+static int flush_and_reset_buffered_writes(SquatWriteBuffer* b) {
+ if (b->data_len > 0) {
+ if (write(b->fd, b->buf, b->data_len) != b->data_len) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ return SQUAT_ERR;
+ }
+ b->data_len = 0;
+ }
+
+ if (lseek(b->fd, 0, SEEK_SET) != 0) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ return SQUAT_ERR;
+ }
+
+ return SQUAT_OK;
+}
+
+/* A circular linked list of document IDs, stored in increasing order
+ of document ID. */
+typedef struct _WordDocEntry {
+ struct _WordDocEntry* next;
+ int doc_ID;
+} WordDocEntry;
+
+/* These form the leaves of the "all documents" tries. For each of the
+ 256 words with trailing byte 'i', docs[i] is NULL if the word does
+ not occur in any document, otherwise it is the head of a linked
+ list of document IDs for the documents which contain the word. */
+typedef struct {
+ short first_valid_entry; /* We record the first and last valid
+ entries in the array below. These could
+ be computed by just scanning the array,
+ but it turns out that in practice such
+ array scanning dominates the CPU
+ consumption of the indexer. We get
+ major speedup by maintaining these
+ entries on the fly. */
+ short last_valid_entry;
+ WordDocEntry* docs[256]; /* Pointers to the document ID lists for
+ each of the 256 words rooted at this
+ part of the trie. Each non-NULL pointer
+ points to the LAST element of the
+ linked list (i.e. the entry with the
+ highest document ID). This means we can
+ efficiently add to the end of the
+ linked list, and also efficiently get
+ to the start of the linked list (the
+ element with lowest document ID)
+ (because it's circular). */
+} SquatWordTableLeafDocs;
+
+/* These form the leaves of the "per document" tries. For each of the
+ 256 words with trailing byte 'i', presence[i >> 3] & (1 << (i & 7))
+ is 1 if the word occurs in the document, otherwise 0. */
+typedef struct {
+ short first_valid_entry; /* We record the first and last valid
+ entries in the bit vector below. These
+ could be computed by just scanning the
+ array, but we get significant speedup
+ by maintaining them here. */
+ short last_valid_entry;
+ char presence[32];
+} SquatWordTableLeafPresence;
+
+/* This is an entry in a trie. */
+typedef union _SquatWordTableEntry {
+ struct _SquatWordTable* table; /* This is a branch node */
+
+ /* These variants are used for leaves of "per document" tries.
+ They are distinguished by the value of the low bit. */
+ SquatWordTableLeafPresence* leaf_presence; /* low bit is 0 */
+ int leaf_presence_singleton; /* low bit is 1 */
+
+ /* This variant is used for leaves of "all document" tries. */
+ SquatWordTableLeafDocs* leaf_docs;
+} SquatWordTableEntry;
+
+/* This is a trie branch node. */
+typedef struct _SquatWordTable {
+ short first_valid_entry; /* We record the first and last valid
+ entries in the array below, as in the
+ above data structures. */
+ short last_valid_entry;
+ SquatWordTableEntry entries[256];
+} SquatWordTable;
+
+struct _SquatIndex {
+ char* tmp_path; /* Saved tmp_path option, with
+ the temporary filename
+ pattern appended */
+ SquatWriteBuffer out; /* The buffer for the index file itself */
+ char* doc_ID_list; /* A buffer where we hold the
+ encoded array that maps from
+ a document ID to the offset
+ of the document record within
+ the index file. */
+ int doc_ID_list_size; /* The allocated size of the
+ above buffer, measured in
+ multiples of
+ sizeof(SquatInt32) (i.e., 4) */
+ int current_doc_ID; /* The current document
+ ID. Document IDs are numbered
+ starting at zero and
+ incremented by 1 every time
+ we finish processing a source
+ document. */
+ int current_doc_len; /* The total number of bytes
+ processed in the current
+ source document. */
+ SquatWordTable *doc_word_table; /* The root of the trie being
+ built for the current
+ document or for the current
+ initial byte. */
+ char runover_buf[SQUAT_WORD_SIZE]; /* holds the last runover_len
+ bytes of the current source
+ document */
+ int runover_len;
+ WordDocEntry* word_doc_allocator; /* A preallocated buffer of
+ WordDocEntries; this pointer
+ is bumped up one every
+ allocation */
+ unsigned char valid_char_bits[32]; /* Saved valid_char_bits option */
+ SquatStatsCallback stats_callback; /* Saved stats_callback option */
+ void* stats_callback_closure;
+
+ /* put the big structures at the end */
+
+ SquatWriteBuffer index_buffers[256]; /* Buffers for the temporary
+ files, one for each first
+ byte of words occurring in
+ the source documents */
+ int total_num_words[256]; /* total number of words starting with
+ given char */
+ int doc_words[256]; /* number of words in current document
+ starting with given char */
+};
+
+/* Initally, before we see a document, there are no words for the document. */
+static void init_doc_word_table(SquatWordTable** t) {
+ SquatWordTable *ret = (SquatWordTable*)xmalloc(sizeof(SquatWordTable));
+
+ ret->first_valid_entry = 256;
+ ret->last_valid_entry = 0;
+ memset(ret->entries, 0, sizeof(ret->entries));
+ *t = ret;
+}
+
+SquatIndex* squat_index_init(int fd, SquatOptions const* options) {
+ SquatIndex* index;
+ int i;
+ int path_len;
+ char* buf;
+ char const* tmp_path;
+
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ index = (SquatIndex*)xmalloc(sizeof(SquatIndex));
+
+ /* Copy processed options into the SquatIndex */
+ if (options != NULL && (options->option_mask & SQUAT_OPTION_TMP_PATH) != 0) {
+ tmp_path = options->tmp_path;
+ } else {
+ tmp_path = "/tmp";
+ }
+ path_len = strlen(tmp_path);
+ index->tmp_path = xmalloc(path_len + 1 + 12);
+ memcpy(index->tmp_path, tmp_path, path_len);
+ strcpy(index->tmp_path + path_len, "/squatXXXXXX");
+
+ if (options != NULL &&
+ (options->option_mask & SQUAT_OPTION_VALID_CHARS) != 0) {
+ int i;
+
+ memset(index->valid_char_bits, 0, sizeof(index->valid_char_bits));
+ for (i = 0; options->valid_chars[i] != 0; i++) {
+ int ch = (unsigned char)options->valid_chars[i];
+
+ index->valid_char_bits[ch >> 3] |= 1 << (ch & 7);
+ }
+ } else {
+ memset(index->valid_char_bits, 255, sizeof(index->valid_char_bits));
+ }
+
+ if (options != NULL &&
+ (options->option_mask & SQUAT_OPTION_STATISTICS) != 0) {
+ index->stats_callback = options->stats_callback;
+ index->stats_callback_closure = options->stats_callback_closure;
+ } else {
+ index->stats_callback = NULL;
+ }
+
+ /* Finish initializing the SquatIndex */
+ for (i = 0; i < VECTOR_SIZE(index->index_buffers); i++) {
+ index->index_buffers[i].buf = NULL;
+ }
+
+ index->doc_ID_list_size = 1000;
+ index->doc_ID_list = (char*)xmalloc(index->doc_ID_list_size*sizeof(SquatInt32));
+
+ /* Use a 128K write buffer for the main index file */
+ if (init_write_buffer(&index->out, 128*1024, fd) != SQUAT_OK) {
+ goto cleanup_doc_ID_list;
+ }
+
+ /* Write out a dummy header. This will be replaced by the real header at the
+ end of the process. */
+ buf = prepare_buffered_write(&index->out, sizeof(SquatDiskHeader));
+ if (buf == NULL) {
+ goto cleanup_out_buffer;
+ }
+ memset(buf, 0, sizeof(SquatDiskHeader));
+ complete_buffered_write(&index->out, buf + sizeof(SquatDiskHeader));
+
+ index->current_doc_ID = 0;
+ init_doc_word_table(&index->doc_word_table);
+
+ memset(index->total_num_words, 0, sizeof(index->total_num_words));
+
+ return index;
+
+cleanup_out_buffer:
+ free(index->out.buf);
+
+cleanup_doc_ID_list:
+ free(index->doc_ID_list);
+
+/*cleanup_tmp_path:*/
+ free(index->tmp_path);
+
+/*cleanup_index:*/
+ free(index);
+ return NULL;
+}
+
+/* Initialize a write buffer for a temporary file. We generate the
+ temporary file name here. The file is unlinked right away so if we
+ crash, the temporary file doesn't need to be cleaned up. */
+static int init_write_buffer_to_temp(SquatIndex* index, SquatWriteBuffer* b) {
+ int fd = mkstemp(index->tmp_path);
+
+ if (fd < 0) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ return SQUAT_ERR;
+ }
+
+ if (unlink(index->tmp_path) < 0) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ goto cleanup_fd;
+ }
+
+ strcpy(index->tmp_path + strlen(index->tmp_path) - 6, "XXXXXX");
+
+ if (init_write_buffer(b, 64*1024, fd) != SQUAT_OK) {
+ goto cleanup_fd;
+ }
+
+ return SQUAT_OK;
+
+cleanup_fd:
+ close(b->fd);
+ return SQUAT_ERR;
+}
+
+int squat_index_open_document(SquatIndex* index, char const* name) {
+ int name_len;
+ char* buf;
+
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ /* Grow the document ID array as necessary */
+ if (index->current_doc_ID >= index->doc_ID_list_size) {
+ index->doc_ID_list_size *= 2;
+ index->doc_ID_list =
+ (char*)xrealloc(index->doc_ID_list, index->doc_ID_list_size*sizeof(SquatInt32));
+
+ if (index->doc_ID_list == NULL) {
+ squat_set_last_error(SQUAT_ERR_OUT_OF_MEMORY);
+ return SQUAT_ERR;
+ }
+ }
+
+ /* Store the offset of the new document record into the array */
+ squat_encode_32(index->doc_ID_list + index->current_doc_ID*4,
+ index->out.total_output_bytes - sizeof(SquatDiskHeader));
+
+ /* Now write the new document name out to the file. Later we will
+ write the document length right after this. Nobody writes to the
+ file in the interim. */
+ name_len = strlen(name) + 1;
+ if ((buf = prepare_buffered_write(&index->out, name_len)) == NULL) {
+ return SQUAT_ERR;
+ }
+ strcpy(buf, name);
+ complete_buffered_write(&index->out, buf + name_len);
+
+ index->current_doc_len = 0;
+ index->runover_len = 0;
+ memset(index->doc_words, 0, sizeof(index->doc_words));
+
+ return SQUAT_OK;
+}
+
+/* Destroy the SquatWordTable. The leaf data and the internal nodes are free'd. */
+static void delete_doc_word_table(SquatWordTable* t, int depth) {
+ if (depth > 2) {
+ int i;
+
+ depth--;
+ for (i = 0; i < VECTOR_SIZE(t->entries); i++) {
+ SquatWordTableEntry* e = &(t->entries[i]);
+
+ if (e->table != NULL) {
+ delete_doc_word_table(e->table, depth);
+ }
+ }
+ } else {
+ int i;
+
+ /* this happens to work whether the leaf entries are leaf_presence
+ or leaf_docs. This is ugly but acceptable :-) */
+ for (i = 0; i < VECTOR_SIZE(t->entries); i++) {
+ SquatWordTableEntry* e = &(t->entries[i]);
+
+ if (e->leaf_presence != NULL && ((int)e->leaf_presence & 1) == 0) {
+ free(e->leaf_presence);
+ }
+ }
+ }
+ free(t);
+}
+
+#define SQUAT_ADD_NEW_WORD (SQUAT_LAST_BUILTIN + 1)
+
+/* Add an entry to the compressed presence set. We maintain
+ first_valid_entry and last_valid_entry.
+ This is faster than scanning to compute them later.
+ We return SQUAT_ADD_NEW_WORD if the bit wasn't already set. */
+static int set_presence_bit(SquatWordTableLeafPresence* p, int ch) {
+ int mask = 1 << (ch & 7);
+ char* ptr = p->presence + (ch >> 3);
+
+ if (ch < p->first_valid_entry) {
+ p->first_valid_entry = ch;
+ }
+ if (ch > p->last_valid_entry) {
+ p->last_valid_entry = ch;
+ }
+
+ if ((*ptr & mask) == 0) {
+ *ptr |= mask;
+ return SQUAT_ADD_NEW_WORD;
+ } else {
+ return SQUAT_OK;
+ }
+}
+
+/* Add a word to the SquatWordTable trie.
+ If word_entry is NULL then we are in "per document" mode and just record
+ the presence or absence of a word, not the actual document.
+ We return SQUAT_ADD_NEW_WORD if this is the first occurrence of the
+ word in the trie. */
+static int add_to_table(SquatIndex* index, char const* data, int data_len,
+ WordDocEntry* word_entry) {
+ SquatWordTable* t = index->doc_word_table;
+ int ch;
+ SquatWordTableEntry* e;
+
+ while (data_len > 2) {
+ /* Follow the branch node down to the next level of the trie. */
+ ch = (unsigned char)data[0];
+ /* Maintain the valid_entry variables so that we don't have to
+ perform expensive scans of the 256-element arrays
+ later. Surprisingly, this optimization really matters! */
+ if (ch < t->first_valid_entry) {
+ t->first_valid_entry = ch;
+ }
+ if (ch > t->last_valid_entry) {
+ t->last_valid_entry = ch;
+ }
+
+ e = t->entries + ch;
+ t = e->table;
+ /* Allocate the next branch node if it doesn't already exist. */
+ if (t == NULL) {
+ t = (SquatWordTable*)xmalloc(sizeof(SquatWordTable));
+ e->table = t;
+ /* Initially there are no valid entries. Set things up so that
+ the obvious tests will set first_valid_entry and
+ last_valid_entry correctly. */
+ t->first_valid_entry = 256;
+ t->last_valid_entry = 0;
+ memset(t->entries, 0, sizeof(t->entries));
+ }
+
+ data++;
+ data_len--;
+ }
+
+ /* Follow the branch node down to the leaf level */
+ ch = (unsigned char)data[0];
+ if (ch < t->first_valid_entry) {
+ t->first_valid_entry = ch;
+ }
+ if (ch > t->last_valid_entry) {
+ t->last_valid_entry = ch;
+ }
+ e = t->entries + ch;
+
+ ch = (unsigned char)data[1];
+
+ if (word_entry == NULL) {
+ /* We are in "per document" mode. */
+ if (((int)e->leaf_presence & 1) != 0) {
+ /* We currently have a singleton here. */
+ int oldch = e->leaf_presence_singleton >> 1;
+
+ /* If the singleton indicates the same word as the current word,
+ then we don't have to do anything. */
+ if (oldch != ch) {
+ /* Otherwise we have to add the new word. This means we have
+ to convert the singleton to a bit vector. */
+ SquatWordTableLeafPresence* p;
+
+ /* Make an empty bit vector. */
+ p = (SquatWordTableLeafPresence*)
+ xmalloc(sizeof(SquatWordTableLeafPresence));
+ p->first_valid_entry = 256;
+ p->last_valid_entry = 0;
+ memset(p->presence, 0, sizeof(p->presence));
+ e->leaf_presence = p;
+
+ /* Update the bit vector */
+ set_presence_bit(p, ch);
+ return set_presence_bit(p, oldch); /* will always be SQUAT_ADD_NEW_WORD */
+ }
+ } else if (e->leaf_presence == NULL) {
+ /* There's nothing here. Let's make a singleton. */
+ /* this next step might be necessary if sizeof(void*) >
+ sizeof(int). We make sure that the low bit of the pointer in
+ leaf_presence is definitely 1. */
+ e->leaf_presence = (void*)1;
+ e->leaf_presence_singleton = (ch << 1) | 1;
+ return SQUAT_ADD_NEW_WORD;
+ } else {
+ /* We already have the bit vector, so let's just set another bit in it. */
+ return set_presence_bit(e->leaf_presence, ch);
+ }
+ } else {
+ /* We are in "all documents" mode. */
+ SquatWordTableLeafDocs* docs = e->leaf_docs;
+ WordDocEntry** entry_ptr;
+
+ /* Make a new leaf table if we don't already have one. */
+ if (docs == NULL) {
+ docs = (SquatWordTableLeafDocs*)
+ xmalloc(sizeof(SquatWordTableLeafDocs));
+ docs->first_valid_entry = 256;
+ docs->last_valid_entry = 0;
+ memset(docs->docs, 0, sizeof(docs->docs));
+ e->leaf_docs = docs;
+ }
+
+ entry_ptr = docs->docs + ch;
+
+ if (*entry_ptr == NULL) {
+ /* Adding a new word, so may need to update the valid_entry markers */
+ if (ch < docs->first_valid_entry) {
+ docs->first_valid_entry = ch;
+ }
+ if (ch > docs->last_valid_entry) {
+ docs->last_valid_entry = ch;
+ }
+ /* Create the linked list with the single element 'word_entry'. */
+ word_entry->next = word_entry; /* make it circular */
+ *entry_ptr = word_entry;
+ return SQUAT_ADD_NEW_WORD;
+ } else {
+ /* Just add the document to the linked list. word_entry will be
+ the new last element since the document IDs are strictly
+ increasing as we build the trie from its temporary file. */
+ word_entry->next = (*entry_ptr)->next; /* (*entry_ptr)->next is
+ (still) the first
+ element of the list */
+ (*entry_ptr)->next = word_entry; /* the old last element's
+ next now points to the
+ new last element. */
+ *entry_ptr = word_entry; /* save the new last element */
+ }
+ }
+
+ return SQUAT_OK;
+}
+
+/* Add 'doc_ID' to the list of document IDs for word 'word_ptr'
+ in the "all documents" trie. */
+static int add_word_to_trie(SquatIndex* index, char const* word_ptr,
+ int doc_ID) {
+ WordDocEntry* word_entry = index->word_doc_allocator++;
+
+ word_entry->doc_ID = doc_ID;
+ add_to_table(index, word_ptr, SQUAT_WORD_SIZE - 1, word_entry);
+
+ return SQUAT_OK;
+}
+
+/* Add the word 'data' to the "per document" trie for the current document. */
+static int add_word_to_table(SquatIndex* index, char const* data) {
+ int r;
+ int i;
+
+ /* Just ignore the word if it uses an invalid character. */
+ for (i = 0; i < SQUAT_WORD_SIZE; i++) {
+ int ch = (unsigned char)data[i];
+
+ if ((index->valid_char_bits[ch >> 3] & (1 << (ch & 7))) == 0) {
+ /* this word contains an invalid character and need not be indexed,
+ since search strings will never contain such a character. */
+ return SQUAT_OK;
+ }
+ }
+
+ r = add_to_table(index, data, SQUAT_WORD_SIZE, NULL);
+ if (r == SQUAT_ADD_NEW_WORD) {
+ /* Remember how many unique words in this document started with
+ the given first character. */
+ index->doc_words[(unsigned char)data[0]]++;
+ return SQUAT_OK;
+ } else {
+ return r;
+ }
+}
+
+int squat_index_append_document(SquatIndex* index, char const* data,
+ int data_len) {
+ int i;
+ char buf[SQUAT_WORD_SIZE];
+ int new_runover;
+ int new_runover_data;
+
+ assert(data_len >= 0);
+
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ if (data_len == 0) {
+ return SQUAT_OK;
+ }
+
+ /* Scan runover */
+ for (i = 0; i < index->runover_len; i++) {
+ /* Check if we can make a whole word starting with runover bytes
+ from offset i within the runover buffer and with the remaining
+ bytes taken from the new text */
+ if (index->runover_len - i + data_len >= SQUAT_WORD_SIZE) {
+ /* Yep. Build the complete word into 'buf' and then add it. */
+ memcpy(buf, index->runover_buf + i, index->runover_len - i);
+ memcpy(buf + index->runover_len - i, data,
+ SQUAT_WORD_SIZE - (index->runover_len - i));
+ if (add_word_to_table(index, buf) != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ }
+ }
+
+ /* Scan main text */
+ for (i = 0; i <= data_len - SQUAT_WORD_SIZE; i++) {
+ if (add_word_to_table(index, data + i) != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ }
+
+ /* Fill runover. We have to be careful to handle all the cases,
+ particularly we just saw less than SQUAT_WORD_SIZE bytes and we
+ need to copy some data from the old runover buffer into the new
+ runover buffer. */
+ new_runover = index->runover_len + data_len;
+ if (new_runover > SQUAT_WORD_SIZE) {
+ new_runover = SQUAT_WORD_SIZE;
+ }
+ new_runover_data = data_len;
+ if (new_runover_data > new_runover) {
+ new_runover_data = new_runover;
+ }
+ /* Copy data from the old runover buffer into its new position in
+ the new runover buffer */
+ memmove(index->runover_buf,
+ index->runover_buf + index->runover_len -
+ (new_runover - new_runover_data),
+ new_runover - new_runover_data);
+ /* Copy data from the new text into the new runover buffer */
+ memcpy(index->runover_buf + new_runover - new_runover_data,
+ data + data_len - new_runover_data, new_runover_data);
+ index->runover_len = new_runover;
+
+ /* Tracking how much data we've seen for this document in total */
+ index->current_doc_len += data_len;
+
+ return SQUAT_OK;
+}
+
+/* Write the word to the given temporary file. Since each temporary
+ file is dedicated to a given initial byte, the word passed to us
+ has the initial byte removed. */
+static int output_word(SquatWriteBuffer* b, char const* word) {
+ char* buf = prepare_buffered_write(b, SQUAT_WORD_SIZE - 1);
+
+ if (buf == NULL) {
+ return SQUAT_ERR;
+ }
+ memcpy(buf, word, SQUAT_WORD_SIZE - 1);
+ complete_buffered_write(b, buf + SQUAT_WORD_SIZE - 1);
+
+ return SQUAT_OK;
+}
+
+/* Write the word data from the trie 't' into the temporary file
+ accessed through 'b'. Words to write are assembled starting at
+ 'word'; we assume that 'len' bytes have already been assembled
+ leading up to 'word'. This function clears the word data after
+ writing it out. This makes it ready to handle the next document
+ without reallocating everything. */
+static int write_words(SquatIndex* index, SquatWriteBuffer* b,
+ SquatWordTable* t, int len, char* word) {
+ if (len == 2) {
+ /* Handle a branch node that refers to leaves. */
+ int i;
+
+ for (i = t->first_valid_entry; i <= t->last_valid_entry; i++) {
+ SquatWordTableEntry* e = t->entries + i;
+
+ word[0] = (char)i;
+
+ if (((int)e->leaf_presence & 1) != 0) {
+ /* Got a singleton at this branch point. Just output the single word. */
+ word[1] = (char)(e->leaf_presence_singleton >> 1);
+ e->leaf_presence = NULL; /* clear the leaf out */
+ if (output_word(b, word - (SQUAT_WORD_SIZE - 3)) != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ } else if (e->leaf_presence != NULL) {
+ /* Got a bit vector array which we have to scan. */
+ /* The following code is performance critical. It can dominate
+ the performance of the entire indexer. That's why we need
+ the valid_entry fields! */
+ SquatWordTableLeafPresence* p = e->leaf_presence;
+ int i;
+ int last_byte = p->last_valid_entry >> 3;
+
+ for (i = p->first_valid_entry >> 3; i <= last_byte; i++) {
+ if(i >= VECTOR_SIZE(p->presence)) {
+ return SQUAT_ERR;
+ } else {
+ int bits = (unsigned char)p->presence[i];
+ int j;
+
+ for (j = 0; bits > 0; j++, bits >>= 1) {
+ if ((bits & 1) != 0) {
+ /* Output a word for each bit that is set */
+ word[1] = (char)(i*8 + j);
+ if (output_word(b, word - (SQUAT_WORD_SIZE - 3)) != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ }
+ }
+ }
+ }
+ free(p);
+ e->leaf_presence = NULL;
+ }
+ }
+ } else {
+ /* Handle an interior branch node. A simple matter of recursion. */
+ int i;
+
+ for (i = t->first_valid_entry; i <= t->last_valid_entry; i++) {
+ SquatWordTable* new_t = t->entries[i].table;
+
+ if (new_t != NULL) {
+ word[0] = (char)i;
+ if (write_words(index, b, new_t, len - 1, word + 1)
+ != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ }
+ }
+ }
+
+ /* This effectively clears the array because we trust these entries. */
+ t->first_valid_entry = 256;
+ t->last_valid_entry = 0;
+
+ return SQUAT_OK;
+}
+
+int squat_index_close_document(SquatIndex* index) {
+ char* buf;
+ int i;
+
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ /* Write out the length of the current document to the index file,
+ just after the document's name. */
+ if ((buf = prepare_buffered_write(&index->out, 10)) == NULL) {
+ return SQUAT_ERR;
+ }
+ buf = squat_encode_I(buf, index->current_doc_len);
+ complete_buffered_write(&index->out, buf);
+
+ if (index->stats_callback != NULL) {
+ SquatStatsEvent event;
+
+ event.generic.type = SQUAT_STATS_COMPLETED_DOC;
+ event.completed_doc.num_unique_words = index->doc_words;
+ index->stats_callback(index->stats_callback_closure, &event);
+ }
+
+ /* For each byte that started a word in the source document, we need
+ to dump all the words that occurred starting with that byte to
+ the corresponding temporary file. */
+ for (i = 0; i < VECTOR_SIZE(index->doc_words); i++) {
+ if (index->doc_words[i] > 0) {
+ char* write_ptr;
+ char word_buf[SQUAT_WORD_SIZE - 1];
+ int cur_offset;
+
+ if (index->index_buffers[i].buf == NULL) {
+ /* This is the first document that used a word starting with this byte.
+ We need to create the temporary file. */
+ if (init_write_buffer_to_temp(index, index->index_buffers + i)
+ != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ }
+
+ index->total_num_words[i] += index->doc_words[i];
+
+ /* Write out the document ID and the number of words in this
+ document that start with the initial byte. Then we write out
+ the list of words themselves, SQUAT_WORD_SIZE-1 bytes
+ each. Very simple format for the temporary files. We could
+ compress them more but why bother? */
+ write_ptr = prepare_buffered_write(index->index_buffers + i, 20);
+ if (write_ptr == NULL) {
+ return SQUAT_ERR;
+ }
+ write_ptr = squat_encode_I(write_ptr, index->current_doc_ID);
+ write_ptr = squat_encode_I(write_ptr, index->doc_words[i]);
+ complete_buffered_write(index->index_buffers + i, write_ptr);
+
+ cur_offset = index->index_buffers[i].total_output_bytes;
+ if (write_words(index, index->index_buffers + i,
+ index->doc_word_table->entries[i].table,
+ SQUAT_WORD_SIZE - 1, word_buf)
+ != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ /* Make sure that we actually output the exact number of words
+ we thought we added to the trie. It's really easy to break
+ this invariant with bugs in the above code! */
+ assert(index->index_buffers[i].total_output_bytes - cur_offset
+ == (SQUAT_WORD_SIZE - 1)*index->doc_words[i]);
+ }
+ }
+
+ index->current_doc_len = -1;
+
+ index->current_doc_ID++;
+
+ return SQUAT_OK;
+}
+
+/* Dump out a branch node of an "all documents" trie to the index
+ file. It's dumped as a presence table (telling us which branches
+ are non-NULL) followed by a list of relative file offsets in
+ I-format pointing to the subtries for the non-NULL branches. */
+static int dump_word_table_offsets(SquatIndex* index, SquatWordTable* t,
+ int *offset_buf) {
+ int start_present = t->first_valid_entry;
+ int end_present = t->last_valid_entry;
+ char* buf;
+ int present_count; /* We store here the actual number of present branches */
+
+ if (start_present > end_present) {
+ /* There are no non-empty branches so just write an empty presence table */
+ if ((buf = prepare_buffered_write(&index->out, 2)) == NULL) {
+ return SQUAT_ERR;
+ } else {
+ buf[0] = buf[1] = 0;
+ complete_buffered_write(&index->out, buf + 2);
+ return SQUAT_OK;
+ }
+ }
+
+ /* If there is just one valid entry but its index is < 32, then we
+ can't use the one-byte representation for a singleton presence
+ because it would be mistaken for the first byte of a (count,
+ start) presence vector header. A singleton whose index is >= 32
+ can be written out without ambiguity. */
+ if (end_present == start_present && end_present >= 32) {
+ if ((buf = prepare_buffered_write(&index->out, 1)) == NULL) {
+ return SQUAT_ERR;
+ } else {
+ *buf++ = (char)end_present;
+ present_count = 1;
+ }
+ } else {
+ /* We're going to use the presence bit vector format. */
+ int first_byte = start_present >> 3;
+ int byte_count = (end_present >> 3) - first_byte + 1;
+
+ if ((buf = prepare_buffered_write(&index->out, 2 + byte_count)) == NULL) {
+ return SQUAT_ERR;
+ } else {
+ int i;
+
+ *buf++ = (char)first_byte;
+ *buf++ = (char)byte_count - 1; /* subtract 1 to avoid ambiguity
+ over the value '32' (we
+ wouldn't use 0 anyway) */
+ /* Clear the vector */
+ memset(buf, 0, byte_count);
+ present_count = 0;
+ for (i = start_present; i <= end_present; i++) {
+ if (offset_buf[i] > 0) {
+ present_count++;
+ /* Set the bit in the vector. */
+ buf[(i >> 3) - first_byte] |= 1 << (i & 7);
+ }
+ }
+ buf += byte_count;
+ }
+ }
+ complete_buffered_write(&index->out, buf);
+
+ /* Now we write out the actual offset table in I-format. */
+ if ((buf = prepare_buffered_write(&index->out, 10*present_count)) == NULL) {
+ return SQUAT_ERR;
+ } else {
+ int i;
+
+ for (i = start_present; i <= end_present; i++) {
+ int off = offset_buf[i];
+
+ if (off > 0) {
+ buf = squat_encode_I(buf, off);
+ }
+ }
+ }
+ complete_buffered_write(&index->out, buf);
+
+ return SQUAT_OK;
+}
+
+/* Write out the presence table for an "all documents" trie leaf. */
+static int dump_doc_list_present_bits(SquatIndex* index,
+ SquatWordTableLeafDocs* docs) {
+ int start_present = docs->first_valid_entry;
+ int end_present = docs->last_valid_entry;
+ char* buf;
+ int present_count;
+
+ /* If the leaf is empty, we should never get here! */
+ assert(start_present <= end_present);
+
+ /* if it's a singleton < 32, then we can't use the one-byte
+ representation because it would be mistaken for a starting byte */
+ if (end_present == start_present && end_present >= 32) {
+ if ((buf = prepare_buffered_write(&index->out, 1)) == NULL) {
+ return SQUAT_ERR;
+ } else {
+ *buf++ = (char)end_present;
+ present_count = 1;
+ }
+ } else {
+ int first_byte = start_present >> 3;
+ int byte_count = (end_present >> 3) - first_byte + 1;
+
+ if ((buf = prepare_buffered_write(&index->out, 2 + byte_count)) == NULL) {
+ return SQUAT_ERR;
+ } else {
+ int i;
+
+ *buf++ = (char)first_byte;
+ *buf++ = (char)byte_count - 1;
+ memset(buf, 0, byte_count);
+ present_count = 0;
+ for (i = start_present; i <= end_present; i++) {
+ if (docs->docs[i] != NULL) {
+ present_count++;
+ buf[(i >> 3) - first_byte] |= 1 << (i & 7);
+ }
+ }
+ buf += byte_count;
+ }
+ }
+ complete_buffered_write(&index->out, buf);
+
+ return SQUAT_OK;
+}
+
+/* Write out the document lists for an "all documents" trie leaf. */
+static int dump_doc_list_docs(SquatIndex* index,
+ SquatWordTableLeafDocs* docs) {
+ int i;
+ WordDocEntry** doc_list = docs->docs;
+
+ for (i = docs->first_valid_entry; i <= docs->last_valid_entry; i++) {
+ if (doc_list[i] != NULL) {
+ WordDocEntry* first_doc;
+ WordDocEntry* doc;
+ int run_size = 0; /* Bytes required to store the doclist for this word */
+ int last_doc_ID;
+ int run_seq_delta = 0;
+ int run_seq_count;
+ int doc_count = 0; /* number of documents containing this word */
+ char* buf;
+
+ doc = first_doc = doc_list[i]->next;
+
+ last_doc_ID = 0;
+ run_seq_count = 0;
+ /* First compute the run_size bytes required to store the doclist */
+ do {
+ if (doc->doc_ID == last_doc_ID + 1 && run_seq_count > 0) {
+ run_seq_count++;
+ } else {
+ if (run_seq_count > 0) {
+ if (run_seq_count > 1) {
+ run_size += squat_count_encode_I(run_seq_count << 1)
+ + squat_count_encode_I(run_seq_delta);
+ } else {
+ run_size += squat_count_encode_I((run_seq_delta << 1) | 1);
+ }
+ }
+ run_seq_count = 1;
+ run_seq_delta = doc->doc_ID - last_doc_ID;
+ }
+ last_doc_ID = doc->doc_ID;
+ doc = doc->next;
+ doc_count++;
+ } while (doc != first_doc);
+ if (run_seq_count > 0) {
+ if (run_seq_count > 1) {
+ run_size += squat_count_encode_I(run_seq_count << 1)
+ + squat_count_encode_I(run_seq_delta);
+ } else {
+ run_size += squat_count_encode_I((run_seq_delta << 1) | 1);
+ }
+ }
+
+ /* reserve more than enough space in the buffer */
+ if ((buf = prepare_buffered_write(&index->out, 10 + run_size))
+ == NULL) {
+ return SQUAT_ERR;
+ }
+
+ /* If there's only one document, use singleton document format */
+ if (doc_count == 1) {
+ buf = squat_encode_I(buf, (doc->doc_ID << 1) | 1);
+ } else {
+ /* Store the entire document list, with its size first. */
+ buf = squat_encode_I(buf, run_size << 1);
+
+ last_doc_ID = 0;
+ run_seq_count = 0;
+ /* This logic should mirror the logic above that counts the bytes. */
+ do {
+ if (doc->doc_ID == last_doc_ID + 1 && run_seq_count > 0) {
+ run_seq_count++;
+ } else {
+ if (run_seq_count > 0) {
+ if (run_seq_count > 1) {
+ buf = squat_encode_I(buf, run_seq_count << 1);
+ buf = squat_encode_I(buf, run_seq_delta);
+ } else {
+ buf = squat_encode_I(buf, (run_seq_delta << 1) | 1);
+ }
+ }
+ run_seq_count = 1;
+ run_seq_delta = doc->doc_ID - last_doc_ID;
+ }
+ last_doc_ID = doc->doc_ID;
+ doc = doc->next;
+ } while (doc != first_doc);
+ if (run_seq_count > 0) {
+ if (run_seq_count > 1) {
+ buf = squat_encode_I(buf, run_seq_count << 1);
+ buf = squat_encode_I(buf, run_seq_delta);
+ } else {
+ buf = squat_encode_I(buf, (run_seq_delta << 1) | 1);
+ }
+ }
+ }
+
+ complete_buffered_write(&index->out, buf);
+ }
+ }
+
+ return SQUAT_OK;
+}
+
+/* Write an "all documents" subtrie to the index file.
+ 'result_offset' is an absolute offset within the file where this
+ subtrie was stored. We free the trie leaves as we go. */
+static int write_trie_word_data(SquatIndex* index, SquatWordTable* t, int len,
+ int* result_offset) {
+ int i;
+ int offsets[256]; /* Collect the offsets of the subtries in this array. */
+ int off;
+ SquatWordTableEntry* entries = t->entries;
+ int r;
+
+ memset(offsets, 0, t->first_valid_entry*sizeof(int));
+ if (len > 2) {
+ /* interior branch */
+ for (i = t->first_valid_entry; i <= t->last_valid_entry; i++) {
+ SquatWordTable* new_t = entries[i].table;
+
+ if (new_t != NULL) {
+ if (write_trie_word_data(index, new_t, len - 1, offsets + i)
+ != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ } else {
+ offsets[i] = 0;
+ }
+ }
+ } else {
+ /* Leaf case */
+ for (i = t->first_valid_entry; i <= t->last_valid_entry; i++) {
+ SquatWordTableLeafDocs* leaf_docs = entries[i].leaf_docs;
+
+ if (leaf_docs != NULL) {
+ offsets[i] = index->out.total_output_bytes;
+
+ if (dump_doc_list_present_bits(index, leaf_docs) != SQUAT_OK
+ || dump_doc_list_docs(index, leaf_docs) != SQUAT_OK) {
+ return SQUAT_ERR;
+ }
+ free(entries[i].leaf_docs);
+ entries[i].leaf_docs = NULL;
+ } else {
+ offsets[i] = 0;
+ }
+ }
+ }
+ memset(offsets + i, 0, (256 - i)*sizeof(int));
+
+ /* Now we've written out our subtries, we know where our branch
+ table is going to be. */
+ *result_offset = off = index->out.total_output_bytes;
+
+ /* Relativize the offsets. This is just to reduce the probable
+ magnitude of the numbers so they will pack better into I-format. */
+ for (i = t->first_valid_entry; i <= t->last_valid_entry; i++) {
+ if (offsets[i] != 0) {
+ offsets[i] = off - offsets[i];
+ }
+ }
+
+ r = dump_word_table_offsets(index, t, offsets);
+
+ /* Mark this subtrie as empty. */
+ t->first_valid_entry = 256;
+ t->last_valid_entry = 0;
+
+ return r;
+}
+
+/* Dump out a complete trie for the given initial byte from its temporary file.
+ The absolute offset of the trie's root table within the file is
+ returned in 'result_offset'. */
+static int dump_index_trie_words(SquatIndex* index, int first_char,
+ int* result_offset) {
+ SquatWriteBuffer* buf = index->index_buffers + first_char;
+ int num_words = index->total_num_words[first_char];
+ WordDocEntry* doc_table;
+ char const* word_list_ptr;
+ int r = SQUAT_OK;
+ char const* word_ptr;
+
+ /* Allocate all the necessary document-ID linked list entries at once. */
+ doc_table = (WordDocEntry*)xmalloc(sizeof(WordDocEntry)*num_words);
+ index->word_doc_allocator = doc_table;
+
+ /* mmap the temporary file. */
+ word_list_ptr = mmap(NULL, buf->total_output_bytes, PROT_READ, MAP_SHARED,
+ buf->fd, 0);
+ if (word_list_ptr == MAP_FAILED) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ r = SQUAT_ERR;
+ goto cleanup;
+ }
+ word_ptr = word_list_ptr;
+
+ /* Scan through the file */
+ while (num_words > 0) {
+ /* For each document, add all its words to the trie with this document ID */
+ int doc_ID = (int)squat_decode_I(&word_ptr);
+ int doc_words = (int)squat_decode_I(&word_ptr);
+
+ num_words -= doc_words;
+
+ while (doc_words > 0) {
+ if (add_word_to_trie(index, word_ptr, doc_ID)
+ != SQUAT_OK) {
+ r = SQUAT_ERR;
+ goto cleanup_map;
+ }
+ word_ptr += SQUAT_WORD_SIZE - 1;
+ doc_words--;
+ }
+ }
+
+ /* Make sure we used exactly as many linked list entries as we
+ thought we would. */
+ assert(index->word_doc_allocator - doc_table
+ == index->total_num_words[first_char]);
+ /* Make sure we read all the bytes from the temporary file. */
+ assert(word_ptr - word_list_ptr == buf->total_output_bytes);
+
+ /* Now dump the trie to the index file. */
+ r = write_trie_word_data(index, index->doc_word_table,
+ SQUAT_WORD_SIZE - 1, result_offset);
+
+cleanup_map:
+ if (munmap((void*)word_list_ptr, buf->total_output_bytes) != 0
+ && r == SQUAT_OK) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ r = SQUAT_ERR;
+ }
+
+cleanup:
+ free(doc_table);
+
+ return r;
+}
+
+/* This does the grunt work of completing the index. If OK is false we
+ just take the cleanup path ... this is used by squat_index_destroy. */
+static int index_close_internal(SquatIndex* index, int OK) {
+ int r = SQUAT_OK;
+ int doc_list_offset;
+ int doc_ID_list_offset;
+ int word_list_offset;
+ char* buf;
+ int i;
+ SquatDiskHeader* header;
+ int offset_buf[256];
+
+ squat_set_last_error(SQUAT_ERR_OK);
+
+ if (!OK) {
+ goto cleanup;
+ }
+
+ /* Close any open document ... this would really be a client bug. */
+ if (index->current_doc_len >= 0) {
+ squat_index_close_document(index);
+ }
+
+ /* Clear the current trie. We are now going to use it to build
+ all-documents tries. */
+ delete_doc_word_table(index->doc_word_table, SQUAT_WORD_SIZE);
+ init_doc_word_table(&index->doc_word_table);
+
+ /* Write out the array that maps document IDs to offsets of the
+ document records. */
+ doc_list_offset = sizeof(SquatDiskHeader);
+ doc_ID_list_offset = index->out.total_output_bytes + 1;
+ if ((buf = prepare_buffered_write(&index->out,
+ SQUAT_SAFETY_ZONE + ((index->current_doc_ID + 1)*4))) == NULL) {
+ r = SQUAT_ERR;
+ goto cleanup;
+ }
+ *buf++ = 0;
+ memcpy(buf, index->doc_ID_list, index->current_doc_ID*4);
+ buf += index->current_doc_ID*4;
+ memset(buf, 0, 4);
+ complete_buffered_write(&index->out, buf + 4);
+
+ /* Now write out the trie for every initial byte that we saw. The
+ offsets are collected in 'offset_buf'. */
+ memset(offset_buf, 0, sizeof(offset_buf));
+ for (i = 0; i < VECTOR_SIZE(index->index_buffers); i++) {
+ if (index->stats_callback != NULL) {
+ SquatStatsEvent event;
+
+ event.generic.type = SQUAT_STATS_COMPLETED_INITIAL_CHAR;
+ event.completed_initial_char.completed_char = i;
+ event.completed_initial_char.num_words = index->total_num_words[i];
+ if (index->index_buffers[i].buf != NULL) {
+ event.completed_initial_char.temp_file_size =
+ index->index_buffers[i].total_output_bytes;
+ } else {
+ event.completed_initial_char.temp_file_size = 0;
+ }
+ index->stats_callback(index->stats_callback_closure, &event);
+ }
+
+ if (index->index_buffers[i].buf != NULL) {
+ /* We have to flush the temporary file output buffer before we try to use
+ the temporary file. */
+ if (flush_and_reset_buffered_writes(index->index_buffers + i) != SQUAT_OK
+ || dump_index_trie_words(index, i, offset_buf + i) != SQUAT_OK) {
+ r = SQUAT_ERR;
+ goto cleanup;
+ }
+ /* Close files and free memory as we go. This could be important
+ if disk space is low and we're generating a huge index. */
+ if (close(index->index_buffers[i].fd) < 0) {
+ squat_set_last_error(SQUAT_ERR_SYSERR);
+ r = SQUAT_ERR;
+ }
+ free(index->index_buffers[i].buf);
+ index->index_buffers[i].buf = NULL;
+ } else {
+ offset_buf[i] = 0;
+ }
+ }
+
+ /* Save the offset where the root of the index trie is going to go. */
+ word_list_offset = index->out.total_output_bytes;
+
+ /* Relativize the subtrie offsets. */
+ for (i = 0; i < VECTOR_SIZE(offset_buf); i++) {
+ if (offset_buf[i] != 0) {
+ offset_buf[i] = word_list_offset - offset_buf[i];
+
+ if (i < index->doc_word_table->first_valid_entry) {
+ index->doc_word_table->first_valid_entry = i;
+ }
+ index->doc_word_table->last_valid_entry = i;
+ }
+ }
+
+ /* Dump out the offset buffer at last. */
+ if (dump_word_table_offsets(index, index->doc_word_table, offset_buf)
+ != SQUAT_OK) {
+ r = SQUAT_ERR;
+ goto cleanup;
+ }
+
+ /* finally, write trailing zeroes and the header ... now that we know
+ we initialized the file with no errors */
+ if ((buf = prepare_buffered_write(&index->out, SQUAT_SAFETY_ZONE)) == NULL) {
+ r = SQUAT_ERR;
+ goto cleanup;
+ }
+ memset(buf, 0, SQUAT_SAFETY_ZONE);
+ complete_buffered_write(&index->out, buf + SQUAT_SAFETY_ZONE);
+
+ /* Flush writes before we seek back to the start to write the header */
+ if (flush_and_reset_buffered_writes(&index->out) != SQUAT_OK) {
+ r = SQUAT_ERR;
+ goto cleanup;
+ }
+
+ /* Blat out the header */
+ if ((header = (SquatDiskHeader*)prepare_buffered_write(&index->out,
+ sizeof(SquatDiskHeader))) == NULL) {
+ r = SQUAT_ERR;
+ goto cleanup;
+ }
+ memcpy(header->header_text, squat_index_file_header, 8);
+ squat_encode_64(header->doc_list_offset, doc_list_offset);
+ squat_encode_64(header->doc_ID_list_offset, doc_ID_list_offset);
+ squat_encode_64(header->word_list_offset, word_list_offset);
+ memcpy(header->valid_char_bits, index->valid_char_bits,
+ sizeof(header->valid_char_bits));
+ complete_buffered_write(&index->out, (char*)(header + 1));
+
+ /* Flush out the header */
+ if (flush_and_reset_buffered_writes(&index->out) != SQUAT_OK) {
+ r = SQUAT_ERR;
+ goto cleanup;
+ }
+
+ /* WOOHOO! It's done! */
+
+cleanup:
+ free(index->out.buf);
+ delete_doc_word_table(index->doc_word_table, SQUAT_WORD_SIZE - 1);
+ /* If we're bailing out because of an error, we might not have
+ released all the temporary file resources. */
+ for (i = 0; i < VECTOR_SIZE(index->index_buffers); i++) {
+ if (index->index_buffers[i].buf != NULL) {
+ close(index->index_buffers[i].fd);
+ free(index->index_buffers[i].buf);
+ }
+ }
+ free(index->tmp_path);
+ free(index->doc_ID_list);
+ free(index);
+
+ return r;
+}
+
+int squat_index_finish(SquatIndex* index) {
+ return index_close_internal(index, 1);
+}
+
+int squat_index_destroy(SquatIndex* index) {
+ return index_close_internal(index, 0);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,197 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: squat_internal.c,v 1.2 2003/02/13 20:15:31 rjs3 Exp $
+ */
+
+/*
+ Internal routines used by SQUAT.
+ Robert O'Callahan
+*/
+
+#include <assert.h>
+
+#include "squat_internal.h"
+
+static int last_err = SQUAT_ERR_OK;
+
+char const squat_index_file_header[8] = "SQUAT 1\n";
+
+void squat_set_last_error(int err) {
+ last_err = err;
+}
+
+int squat_get_last_error(void) {
+ return last_err;
+}
+
+SquatInt32 squat_decode_32(char const* s) {
+ unsigned char* v = (unsigned char*)s;
+ return ((SquatInt32)v[0] << 24) | ((SquatInt32)v[1] << 16)
+ | ((SquatInt32)v[2] << 8) | (SquatInt32)v[3];
+}
+
+char* squat_encode_32(char* s, SquatInt32 v) {
+ s[0] = (unsigned char)(v >> 24);
+ s[1] = (unsigned char)(v >> 16);
+ s[2] = (unsigned char)(v >> 8);
+ s[3] = (unsigned char)v;
+ return s + 4;
+}
+
+SquatInt64 squat_decode_64(char const* s) {
+ unsigned char* v = (unsigned char*)s;
+ return ((SquatInt64)v[0] << 56) | ((SquatInt64)v[1] << 48)
+ | ((SquatInt64)v[2] << 40) | ((SquatInt64)v[3] << 32)
+ | (((SquatInt32)v[4] << 24) | ((SquatInt32)v[5] << 16)
+ | ((SquatInt32)v[6] << 8) | (SquatInt32)v[7]);
+}
+
+char* squat_encode_64(char* s, SquatInt64 v) {
+ s[0] = (unsigned char)(v >> 56);
+ s[1] = (unsigned char)(v >> 48);
+ s[2] = (unsigned char)(v >> 40);
+ s[3] = (unsigned char)(v >> 32);
+ s[4] = (unsigned char)(v >> 24);
+ s[5] = (unsigned char)(v >> 16);
+ s[6] = (unsigned char)(v >> 8);
+ s[7] = (unsigned char)v;
+ return s + 8;
+}
+
+SquatInt64 squat_decode_I(char const** s) {
+ int ch;
+ SquatInt64 r;
+
+ ch = (unsigned char)*(*s)++;
+ r = ch;
+ while ((ch & 0x80) != 0) {
+ ch = (unsigned char)**s;
+ ++(*s);
+ r = ((r - 0x80) << 7) + ch;
+ }
+ return r;
+}
+
+char const* squat_decode_skip_I(char const* s, int num_to_skip) {
+ while (num_to_skip > 0) {
+ while ((*s & 0x80) != 0) {
+ s++;
+ }
+ s++;
+ num_to_skip--;
+ }
+
+ return s;
+}
+
+int squat_count_encode_I(SquatInt64 v64) {
+ int v = (int)v64;
+ int shift = 56;
+ int result;
+
+ assert(v64 >= 0);
+
+ if (v == v64) {
+ if (v < (1 << 7)) {
+ return 1;
+ } else if (v < (1 << 14)) {
+ return 2;
+ } else if (v < (1 << 21)) {
+ return 3;
+ } else if (v < (1 << 28)) {
+ return 4;
+ }
+ }
+
+ while ((int)(v64 >> shift) == 0) {
+ shift -= 7;
+ }
+
+ result = 0;
+ while (shift >= 0) {
+ shift -= 7;
+ result++;
+ }
+
+ return result;
+}
+
+char* squat_encode_I(char* s, SquatInt64 v64) {
+ int v = (int)v64;
+ int shift = 56;
+ int v64_shifted;
+
+ assert(v64 >= 0);
+
+ if (v == v64) {
+ if (v < (1 << 7)) {
+ s[0] = (unsigned char)v;
+ return s + 1;
+ } else if (v < (1 << 14)) {
+ s[0] = (unsigned char)((v >> 7) | 0x80);
+ s[1] = (unsigned char)(v & 0x7F);
+ return s + 2;
+ } else if (v < (1 << 21)) {
+ s[0] = (unsigned char)((v >> 14) | 0x80);
+ s[1] = (unsigned char)(((v >> 7) & 0x7F) | 0x80);
+ s[2] = (unsigned char)(v & 0x7F);
+ return s + 3;
+ } else if (v < (1 << 28)) {
+ s[0] = (unsigned char)((v >> 21) | 0x80);
+ s[1] = (unsigned char)(((v >> 14) & 0x7F) | 0x80);
+ s[2] = (unsigned char)(((v >> 7) & 0x7F) | 0x80);
+ s[3] = (unsigned char)(v & 0x7F);
+ return s + 4;
+ }
+ }
+
+ while ((v64_shifted = (int)(v64 >> shift)) == 0) {
+ shift -= 7;
+ }
+ while (shift > 7) {
+ *s++ = (unsigned char)((v64_shifted & 0x7F) | 0x80);
+ shift -= 7;
+ v64_shifted = (int)(v64 >> shift);
+ }
+ s[0] = (unsigned char)((v64_shifted & 0x7F) + 0x80);
+ s[1] = (unsigned char)(v & 0x7F);
+ return s + 2;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squat_internal.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,197 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: squat_internal.h,v 1.2 2003/02/13 20:15:31 rjs3 Exp $
+ */
+
+/*
+ SQUAT internal utility functions and definitions, used only by other
+ SQUAT components.
+ Robert O'Callahan
+
+ IMPLEMENTATION NOTES:
+
+ In the following, I assume that SQUAT_WORD_SIZE has its default value of 4.
+
+ For each 'word' (string of 4 consecutive bytes) occurring in the
+ source documents, the SQUAT index records which documents the word
+ occurs in. To search for an arbitrary string of K >= 4 bytes, SQUAT
+ computes the set of documents which contain all K-3 words that the
+ substring contains.
+
+ For example, if we search for "a kitty", SQUAT will return every
+ document which contains each of the substrings "a ki", " kit",
+ "kitt", and "itty". Obviously every document containing "a kitty"
+ also contains those substrings, but other documents may be returned
+ which do not contain "a kitty". (For example, the document "a killer
+ kitty" would also be returned.) However, experiments on an email
+ corpus seem to show that such false matches are very uncommon.
+
+ The index contains three main data structures. There is a doc-list
+ structure which simply records the name and size of each source
+ document. Each entry in this structure has variable length; it is
+ designed to be traversed sequentially by squat_search_list_docs.
+
+ There is a doc-ID-list structure which is an array, indexed by the
+ doc-ID, of offsets to the doc-list element for that doc-ID. This is
+ designed to allow for efficient recovery of the name of a document
+ given its ID.
+
+ The rest of the file is a trie, describing the documents containing
+ each words. Each trie is exactly 3 levels deep, indexed by the first
+ three characters of each word. Each leaf of a trie is a list of
+ lists of documents, one list of documents per last character of a
+ word. The 256-way branch tables within the tries, and the document
+ lists, are stored using mildly clever encodings to reduce space
+ consumption.
+
+ The file contains SQUAT_SAFETY_ZONE (currently 16) zero bytes at the
+ end. They are there to stop runaway decoding loops from segfaulting;
+ these loops can assume the bytes are there, scan away with
+ guaranteed termination, and then detect errors after the fact. We
+ check that these safety bytes are there and zero when we open an
+ index for reading!
+
+ Any words containing any 'invalid characters' as specified by the
+ index creator are simply dropped from the index. The invalid
+ characters are recorded so that clients can get a meaningful error
+ if they try to perform a search using those characters (otherwise
+ they'd just get no documents returned).
+*/
+
+#ifndef __SQUAT_INTERNAL_H
+#define __SQUAT_INTERNAL_H
+
+#include "squat.h"
+
+#define SQUAT_SAFETY_ZONE 16
+
+/* The format of a SQUAT index file. This record is stored at the
+ beginning of the file. */
+typedef struct {
+ char header_text[8]; /* "SQUAT 1\n" */
+ char doc_list_offset[8]; /* offset to a doc-list structure (see below) */
+ char doc_ID_list_offset[8];/* offset to a doc-ID-list structure (see below) */
+ char word_list_offset[8]; /* offset to a word-list structure (see below) */
+ char valid_char_bits[32]; /* a bitmap recording which characters
+ appear in the index. The client
+ promises that query strings will not
+ contain characters which don't have
+ their bits set in the bitmap. */
+} SquatDiskHeader;
+
+/* Index file format
+
+ "I" means an unsigned integer decoded as N bytes as follows:
+ The low 7 bits of each byte encode the integer (most significant byte
+ first). The high 8th bit of the first N-1 bytes is 1 and the high 8th bit
+ of the Nth byte is 0.
+ "N" means a null-terminated UTF8 string.
+ "8" means an 8-bit byte.
+ "32" means a 32-bit signed integer in big-endian format.
+ "64" means a 64-bit signed integer in big-endian format.
+
+ K = SQUAT_WORD_SIZE-1
+
+ <doc-ID-list> = 32"doc-ID-offset"* 0 0 0 0
+
+ <doc-list> = <document-info>* 0
+ <document-info> = S"name" I"length"
+
+ <word-list> = <word-list-trie-1>* <trie-index>
+ <trie-index> = <present-bits> I<subtrie-backwards-offset>*
+ <present-bits> = 8"singleton"
+ | 8"start-byte" 8"count-bytes-minus-one" 8"present-bytes"*
+ <word-list-trie-1> = <word-list-trie-2>* <trie-index>
+ ...
+ <word-list-trie-K> = <present-bits> <word-trie-info>*
+ <word-trie-info> = <index-run>"documents"
+ <index-run> = I"adjusted-single-index"
+ | I"adjusted-run-size" <index-run-list>*
+ <index-run-list> = I"adjusted-single-index-delta"
+ = I"adjusted-run-length" I"first-index-delta"
+
+ The adjusted-single-index is the actual index shifted left one bit with the
+ bottom bit set to 1.
+ The adjusted-run-size is the actual run size (in bytes) shifted left one
+ bit with the bottom bit set to 0.
+ The adjusted-single-index-delta is the actual index shifted left one bit
+ with the bottom bit set to 1.
+ The adjusted-run-length is the length of the run of consecutive indices
+ shifted left one bit with the bottom bit set to 0.
+
+ The last SQUAT_SAFETY_ZONE bytes of the index file must be 0.
+ This helps protect us against corrupt index files.
+*/
+
+void squat_set_last_error(int err);
+
+/* Decode and encode a 32-bit quantity into a 4-byte field in an
+ architecture-independent (big-endian) format. */
+SquatInt32 squat_decode_32(char const* s);
+/* We return s + 4. */
+char* squat_encode_32(char* s, SquatInt32 v);
+
+/* Decode and encode a 64-bit quantity into an 8-byte field in an
+ architecture-independent (big-endian) format. */
+SquatInt64 squat_decode_64(char const* s);
+/* We return s + 8. */
+char* squat_encode_64(char* s, SquatInt64 v);
+
+/* Decode and encode a 64-bit quantity into a variable length field in
+ an architecture-independent format. We use one byte for every 7
+ significant bits of the value.
+ For safety when encoding, make sure there are at least 10 bytes of
+ space available at s.
+ For safety when decoding, make sure that there is at least one zero
+ byte following the data at s.
+ Only non-negative integers can be encoded using these
+ routines. Negative integers might be returned from decoding if the
+ data was corrupted. */
+/* *s is incremented to point past the decoded value. */
+SquatInt64 squat_decode_I(char const** s);
+/* num_to_skip encoded values are decoded and discarded. We return a
+ pointer past the end of the decoded values. */
+char const* squat_decode_skip_I(char const* s, int num_to_skip);
+/* We return a pointer past the encoded value. */
+char* squat_encode_I(char* s, SquatInt64 v);
+/* We return the number of bytes required to encode the given value. */
+int squat_count_encode_I(SquatInt64 v64);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squatter.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squatter.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squatter.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/squatter.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,565 @@
+/* squatter.c -- SQUAT-based message indexing tool
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: squatter.c,v 1.12.2.5 2006/03/31 19:22:28 murch Exp $
+ */
+
+/*
+ This is the tool that creates SQUAT indexes for Cyrus mailboxes.
+
+ SQUAT index files are organised as follows:
+
+ There is (at most) one index file for each Cyrus mailbox, named
+ "cyrus.squat", stored in the mailbox directory.
+
+ Source documents are named 'xUID' where UID is the numeric UID of a
+ message and x is a character denoting a part of the message: 'f' ==
+ FROM, 't' == TO, 'b' == BCC, 'c' == CC, 's' == SUBJECT, 'h' == other
+ headers, 'm' == the body. So, a messge with UID 331 could give rise
+ to several source documents named "f331", "t331", "b331", "c331",
+ "s331", "h331" and "m331".
+
+ There is also a special source document named "validity.N" where N
+ is the validitity nonce for the mailbox. We use this to detect when
+ the UIDs have been renumbered since we created the index (in which
+ case the index is useless and is ignored).
+
+ This tool creates new indexes for one or more mailboxes. (We do not
+ support incremental updates to an index yet.) The index is created
+ in "cyrus.squat.tmp" and then, if creation was successful, it is
+ atomically renamed to "cyrus.squat". This guarantees that we don't
+ interfere with anyone who has the old index open.
+*/
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <syslog.h>
+#include <string.h>
+
+#include "annotate.h"
+#include "assert.h"
+#include "mboxlist.h"
+#include "global.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "xmalloc.h"
+#include "acl.h"
+#include "seen.h"
+#include "mboxname.h"
+#include "map.h"
+#include "squat.h"
+#include "imapd.h"
+
+/* global state */
+const int config_need_data = CONFIG_NEED_PARTITION_DATA;
+
+extern char *optarg;
+extern int optind;
+
+/* current namespace */
+static struct namespace squat_namespace;
+
+/* Stuff to make index.c link */
+int imapd_exists;
+struct protstream *imapd_out = NULL;
+struct auth_state *imapd_authstate = NULL;
+char *imapd_userid = NULL;
+int imapd_condstore_client = 0;
+void printastring(const char *s __attribute__((unused)))
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+/* end stuff to make index.c link */
+
+/* These stats are gathered 1) per mailbox and 2) for the whole operation. */
+typedef struct {
+ int indexed_bytes; /* How many bytes of processed message text
+ have we indexed? */
+ int indexed_messages; /* How many messages have we indexed? */
+ int index_size; /* How many bytes is the index using? */
+ time_t start_time; /* When did this operation start? */
+ time_t end_time; /* When did it end? */
+} SquatStats;
+
+const int SKIP_FUZZ = 60;
+
+static int verbose = 0;
+static int mailbox_count = 0;
+static int skip_unmodified = 0;
+static SquatStats total_stats;
+
+static void start_stats(SquatStats* stats) {
+ stats->index_size = 0;
+ stats->indexed_bytes = 0;
+ stats->indexed_messages = 0;
+ stats->start_time = time(NULL);
+}
+
+static void stop_stats(SquatStats* stats) {
+ stats->end_time = time(NULL);
+}
+
+static void print_stats(FILE* out, SquatStats* stats) {
+ fprintf(out, "Indexed %d messages (%d bytes) "
+ "into %d index bytes in %d seconds\n",
+ stats->indexed_messages, stats->indexed_bytes,
+ stats->index_size, (int) (stats->end_time - stats->start_time));
+}
+
+static int usage(const char *name)
+{
+ fprintf(stderr,
+ "usage: %s [-C <alt_config>] [-r] [-s] [-a] [-v] [mailbox...]\n",
+ name);
+
+ exit(EC_USAGE);
+}
+
+static void fatal_syserror(const char* s)
+{
+ perror(s);
+ exit(99);
+}
+
+static void fatal_squat_error(const char* s)
+{
+ int err = squat_get_last_error();
+
+ switch (err) {
+ case SQUAT_ERR_OUT_OF_MEMORY:
+ fprintf(stderr, "SQUAT: Out of memory (%s)\n", s);
+ break;
+ case SQUAT_ERR_SYSERR:
+ perror(s);
+ break;
+ default:
+ /* There are other error codes, but they only apply for searching,
+ not index construction */
+ fprintf(stderr, "SQUAT: Unknown error %d (%s)\n", err, s);
+ }
+
+ exit(98);
+}
+
+typedef struct {
+ SquatStats* mailbox_stats;
+ SquatIndex* index;
+ struct mailbox* mailbox;
+} SquatReceiverData;
+
+/* Cyrus passes the text to index in here, after it has canonicalized
+ the text. We figure out what source document the text belongs to,
+ and update the index. */
+static void search_text_receiver(int uid, int part, int cmd,
+ char const* text, int text_len, void* rock) {
+ SquatReceiverData* d = (SquatReceiverData*)rock;
+
+ if ((cmd & SEARCHINDEX_CMD_BEGINPART) != 0) {
+ char buf[100];
+ char part_char;
+
+ /* Figure out what the name of the source document is going to be. */
+ switch (part) {
+ case SEARCHINDEX_PART_FROM: part_char = 'f'; break;
+ case SEARCHINDEX_PART_TO: part_char = 't'; break;
+ case SEARCHINDEX_PART_CC: part_char = 'c'; break;
+ case SEARCHINDEX_PART_BCC: part_char = 'b'; break;
+ case SEARCHINDEX_PART_SUBJECT: part_char = 's'; break;
+ case SEARCHINDEX_PART_HEADERS: part_char = 'h'; break;
+ default:
+ assert(0);
+ case SEARCHINDEX_PART_BODY:
+ part_char = 'm';
+ d->mailbox_stats->indexed_messages++;
+ total_stats.indexed_messages++;
+ break;
+ }
+
+ snprintf(buf, sizeof(buf), "%c%d", part_char, uid);
+
+ /* don't index document parts that are going to be empty (or too
+ short to search) */
+ if ((cmd & SEARCHINDEX_CMD_ENDPART) != 0
+ && ((cmd & SEARCHINDEX_CMD_APPENDPART) == 0
+ || text_len < SQUAT_WORD_SIZE)) {
+ if (verbose > 2) {
+ printf("Skipping tiny document part '%s' (size %d)\n", buf,
+ (cmd & SEARCHINDEX_CMD_APPENDPART) == 0 ? 0 : text_len);
+ }
+ return;
+ }
+
+ if (verbose > 2) {
+ printf("Opening document part '%s'\n", buf);
+ }
+
+ if (squat_index_open_document(d->index, buf) != SQUAT_OK) {
+ fatal_squat_error("Writing index");
+ }
+ }
+
+ if ((cmd & SEARCHINDEX_CMD_APPENDPART) != 0) {
+ if (verbose > 3) {
+ printf("Writing %d bytes into message %d\n", text_len, uid);
+ }
+
+ if (squat_index_append_document(d->index, text, text_len) != SQUAT_OK) {
+ fatal_squat_error("Writing index data");
+ }
+ d->mailbox_stats->indexed_bytes += text_len;
+ total_stats.indexed_bytes += text_len;
+ }
+
+ if ((cmd & SEARCHINDEX_CMD_ENDPART) != 0) {
+ if (squat_index_close_document(d->index) != SQUAT_OK) {
+ fatal_squat_error("Writing index update");
+ }
+ }
+}
+
+/* Let SQUAT tell us what's going on in the expensive
+ squat_index_finish function. */
+static void stats_callback(void* closure __attribute__((unused)),
+ SquatStatsEvent* params) {
+ switch (params->generic.type) {
+ case SQUAT_STATS_COMPLETED_INITIAL_CHAR:
+ if (verbose > 1) {
+ if (params->completed_initial_char.num_words > 0) {
+ printf("Processing index character %d, %d total words, "
+ "temp file size is %d\n",
+ params->completed_initial_char.completed_char,
+ params->completed_initial_char.num_words,
+ params->completed_initial_char.temp_file_size);
+ }
+ }
+ break;
+
+ default:
+ ; /* do nothing */
+ }
+}
+
+/* This is called once for each mailbox we're told to index. */
+static int index_me(char *name, int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock) {
+ struct mailbox m;
+ int r;
+ SquatStats stats;
+ SquatReceiverData data;
+ char squat_file_name[MAX_MAILBOX_PATH+1], *path;
+ char new_file_name[MAX_MAILBOX_PATH+1];
+ int fd;
+ SquatOptions options;
+ struct stat squat_file_info;
+ struct stat index_file_info;
+ char uid_validity_buf[30];
+ char extname[MAX_MAILBOX_NAME+1];
+ int use_annot = *((int *) rock);
+
+ /* make sure the mailbox (or an ancestor) has
+ /vendor/cmu/cyrus-imapd/squat set to "true" */
+ if (use_annot) {
+ char buf[MAX_MAILBOX_NAME+1] = "", *p;
+ struct annotation_data attrib;
+ int domainlen = 0;
+
+ if (config_virtdomains && (p = strchr(name, '!')))
+ domainlen = p - name + 1;
+
+ strlcpy(buf, name, sizeof(buf));
+
+ /* since mailboxes inherit /vendor/cmu/cyrus-imapd/squat,
+ we need to iterate all the way up to "" (server entry) */
+ while (1) {
+ r = annotatemore_lookup(buf, "/vendor/cmu/cyrus-imapd/squat", "",
+ &attrib);
+
+ if (r || /* error */
+ attrib.value || /* found an entry */
+ !buf[0]) { /* done recursing */
+ break;
+ }
+
+ p = strrchr(buf, '.'); /* find parent mailbox */
+
+ if (p && (p - buf > domainlen)) /* don't split subdomain */
+ *p = '\0';
+ else if (!buf[domainlen]) /* server entry */
+ buf[0] = '\0';
+ else /* domain entry */
+ buf[domainlen] = '\0';
+ }
+
+ if (r || !attrib.value || strcasecmp(attrib.value, "true"))
+ return 0;
+ }
+
+ /* Convert internal name to external */
+ (*squat_namespace.mboxname_toexternal)(&squat_namespace, name,
+ NULL, extname);
+
+ data.mailbox_stats = &stats;
+ data.mailbox = &m;
+
+ /* First we have to jump through hoops to open the mailbox and its
+ Cyrus index. */
+ memset(&m, 0, sizeof(struct mailbox));
+ r = mailbox_open_header(name, 0, &m);
+ if (r) {
+ if (verbose) {
+ printf("error opening %s: %s\n", extname, error_message(r));
+ }
+ return 1;
+ }
+
+ r = mailbox_open_index(&m);
+ if (!r) r = mailbox_lock_pop(&m);
+ if (r) {
+ if (verbose) {
+ printf("error locking index %s: %s\n", extname, error_message(r));
+ }
+ mailbox_close(&m);
+ return 1;
+ }
+
+ path = (m.mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_SQUAT)) ?
+ m.mpath : m.path;
+ snprintf(squat_file_name, sizeof(squat_file_name),
+ "%s%s", path, FNAME_SQUAT_INDEX);
+
+ /* process only changed mailboxes if skip option delected. */
+ if (skip_unmodified &&
+ !fstat(m.index_fd, &index_file_info) &&
+ !stat(squat_file_name, &squat_file_info)) {
+ if (SKIP_FUZZ + index_file_info.st_mtime <
+ squat_file_info.st_mtime) {
+ syslog(LOG_DEBUG, "skipping mailbox %s", extname);
+ if (verbose > 0) {
+ printf("Skipping mailbox %s\n", extname);
+ }
+ mailbox_close(&m);
+ return 0;
+ }
+ }
+
+ strlcpy(new_file_name, squat_file_name, sizeof(new_file_name));
+ strlcat(new_file_name, ".NEW", sizeof(new_file_name));
+
+ syslog(LOG_INFO, "indexing mailbox %s... ", extname);
+ if (verbose > 0) {
+ printf("Indexing mailbox %s... ", extname);
+ }
+
+ if ((fd = open(new_file_name,
+ O_CREAT | O_TRUNC | O_WRONLY, S_IREAD | S_IWRITE))
+ < 0) {
+ fatal_syserror("Unable to create temporary index file");
+ }
+
+ options.option_mask = SQUAT_OPTION_TMP_PATH | SQUAT_OPTION_STATISTICS;
+ options.tmp_path = m.path;
+ options.stats_callback = stats_callback;
+ options.stats_callback_closure = NULL;
+ data.index = squat_index_init(fd, &options);
+ if (data.index == NULL) {
+ fatal_squat_error("Initializing index");
+ }
+
+ /* write an empty document at the beginning to record the validity
+ nonce */
+ snprintf(uid_validity_buf, sizeof(uid_validity_buf),
+ "validity.%ld", m.uidvalidity);
+ if (squat_index_open_document(data.index, uid_validity_buf) != SQUAT_OK
+ || squat_index_close_document(data.index) != SQUAT_OK) {
+ fatal_squat_error("Writing index");
+ }
+
+ start_stats(&stats);
+
+ mailbox_read_index_header(&m);
+ index_operatemailbox(&m);
+
+ index_getsearchtext(&m, search_text_receiver, &data);
+
+ index_closemailbox(&m);
+ mailbox_close(&m);
+
+ mailbox_count++;
+
+ if (squat_index_finish(data.index) != SQUAT_OK) {
+ fatal_squat_error("Closing index");
+ }
+
+ /* Check how big the resulting file is */
+ if (fstat(fd, &index_file_info) < 0) {
+ fatal_syserror("Unable to stat temporary index file");
+ }
+ stats.index_size = index_file_info.st_size;
+ total_stats.index_size += index_file_info.st_size;
+
+ if (close(fd) < 0) {
+ fatal_syserror("Unable to complete writing temporary index file");
+ }
+
+ /* OK, we successfully created the index under the temporary file name.
+ Let's rename it to make it the real index. */
+ if (rename(new_file_name, squat_file_name) < 0) {
+ fatal_syserror("Unable to rename temporary index file");
+ }
+
+ stop_stats(&stats);
+ if (verbose > 0) {
+ print_stats(stdout, &stats);
+ }
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ int opt;
+ char *alt_config = NULL;
+ int rflag = 0, use_annot = 0;
+ int i;
+ char buf[MAX_MAILBOX_PATH+1];
+ int r;
+
+ if(geteuid() == 0)
+ fatal("must run as the Cyrus user", EC_USAGE);
+
+ setbuf(stdout, NULL);
+
+ while ((opt = getopt(argc, argv, "C:rsav")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'v': /* verbose */
+ verbose++;
+ break;
+
+ case 'r': /* recurse */
+ rflag = 1;
+ break;
+
+ case 's': /* skip unmodifed */
+ skip_unmodified = 1;
+ break;
+
+ case 'a': /* use /squat annotation */
+ use_annot = 1;
+ break;
+
+ default:
+ usage("squatter");
+ }
+ }
+
+ cyrus_init(alt_config, "squatter", 0);
+
+ syslog(LOG_NOTICE, "indexing mailboxes");
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(&squat_namespace, 1)) != 0) {
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ annotatemore_init(0, NULL, NULL);
+ annotatemore_open(NULL);
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+ mailbox_initialize();
+
+ start_stats(&total_stats);
+
+ if (optind == argc) {
+ if (rflag) {
+ fprintf(stderr, "please specify a mailbox to recurse from\n");
+ exit(EC_USAGE);
+ }
+ assert(!rflag);
+ strlcpy(buf, "*", sizeof(buf));
+ (*squat_namespace.mboxlist_findall)(&squat_namespace, buf, 1,
+ 0, 0, index_me, &use_annot);
+ }
+
+ for (i = optind; i < argc; i++) {
+ /* Translate any separators in mailboxname */
+ (*squat_namespace.mboxname_tointernal)(&squat_namespace, argv[i],
+ NULL, buf);
+ index_me(buf, 0, 0, &use_annot);
+ if (rflag) {
+ strlcat(buf, ".*", sizeof(buf));
+ (*squat_namespace.mboxlist_findall)(&squat_namespace, buf, 1,
+ 0, 0, index_me, &use_annot);
+ }
+ }
+
+ if (verbose > 0 && mailbox_count > 1) {
+ stop_stats(&total_stats);
+ printf("Total over all mailboxes: ");
+ print_stats(stdout, &total_stats);
+ }
+
+ syslog(LOG_NOTICE, "done indexing mailboxes");
+
+ seen_done();
+ mboxlist_close();
+ mboxlist_done();
+ annotatemore_close();
+ annotatemore_done();
+
+ cyrus_done();
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_client.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_client.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_client.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_client.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3556 @@
+/* sync_client.c -- Cyrus synchonization client
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_client.c,v 1.1.2.35 2006/06/14 18:03:24 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <syslog.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "global.h"
+#include "assert.h"
+#include "mboxlist.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "quota.h"
+#include "xmalloc.h"
+#include "acl.h"
+#include "seen.h"
+#include "mboxname.h"
+#include "map.h"
+#include "imapd.h"
+#include "imparse.h"
+#include "util.h"
+#include "prot.h"
+#include "sync_support.h"
+#include "sync_commit.h"
+#include "lock.h"
+#include "backend.h"
+
+/* signal to config.c */
+const int config_need_data = 0; /* YYY */
+
+/* Stuff to make index.c link */
+int imapd_exists;
+struct protstream *imapd_out = NULL;
+struct auth_state *imapd_authstate = NULL;
+char *imapd_userid = NULL;
+
+void printastring(const char *s)
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+
+void printstring(const char *s)
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+
+/* end stuff to make index.c link */
+
+/* ====================================================================== */
+
+/* Static global variables and support routines for sync_client */
+
+extern char *optarg;
+extern int optind;
+
+static struct protstream *toserver = NULL;
+static struct protstream *fromserver = NULL;
+
+/* List/Hash of messageIDs that are available on server */
+static struct sync_msgid_list *msgid_onserver = NULL;
+
+static struct namespace sync_namespace;
+static struct auth_state *sync_authstate = NULL;
+
+static int verbose = 0;
+static int verbose_logging = 0;
+
+static int do_meta(char *user);
+
+static void shut_down(int code) __attribute__((noreturn));
+static void shut_down(int code)
+{
+ seen_done();
+ annotatemore_close();
+ annotatemore_done();
+ quotadb_close();
+ quotadb_done();
+ mboxlist_close();
+ mboxlist_done();
+ exit(code);
+}
+
+static int usage(const char *name)
+{
+ fprintf(stderr,
+ "usage: %s -S <servername> [-C <alt_config>] [-r] [-v] mailbox...\n", name);
+
+ exit(EC_USAGE);
+}
+
+void fatal(const char *s, int code)
+{
+ fprintf(stderr, "sync_client: %s\n", s);
+ exit(code);
+}
+
+/* ====================================================================== */
+
+static int send_lock()
+{
+ prot_printf(toserver, "LOCK\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("LOCK", fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int send_unlock()
+{
+ int r = 0;
+ int c = ' ';
+ static struct buf token; /* BSS */
+
+ prot_printf(toserver, "UNLOCK\r\n");
+ prot_flush(toserver);
+
+ r = sync_parse_code("UNLOCK", fromserver, SYNC_PARSE_NOEAT_OKLINE, NULL);
+ if (r) return(r);
+
+ if ((c = getword(fromserver, &token)) != ' ') {
+ eatline(fromserver, c);
+ syslog(LOG_ERR, "Garbage on Unlock response");
+ return(IMAP_PROTOCOL_ERROR);
+ }
+ eatline(fromserver, c);
+
+ /* Clear out msgid_on_server list if server restarted */
+ if (!strcmp(token.s, "[RESTART]")) {
+ int hash_size = msgid_onserver->hash_size;
+
+ sync_msgid_list_free(&msgid_onserver);
+ msgid_onserver = sync_msgid_list_create(hash_size);
+
+ syslog(LOG_INFO, "UNLOCK: received RESTART");
+ }
+
+ return(0);
+}
+
+/* ====================================================================== */
+
+/* Routines relevant to reserve operation */
+
+/* Find the messages that we will want to upload from this mailbox,
+ * flag messages that are already available at the server end */
+
+static int find_reserve_messages(struct mailbox *mailbox,
+ struct sync_msg_list *msg_list,
+ struct sync_msgid_list *server_msgid_list,
+ struct sync_msgid_list *reserve_msgid_list)
+{
+ struct sync_msg *msg;
+ struct index_record record;
+ unsigned long msgno;
+ int r;
+
+ if (mailbox->exists == 0)
+ return(0);
+
+ msg = msg_list->head;
+ for (msgno = 1 ; msgno <= mailbox->exists ; msgno++) {
+ r = mailbox_read_index_record(mailbox, msgno, &record);
+
+ if (r) {
+ syslog(LOG_ERR,
+ "IOERROR: reading index entry for nsgno %lu of %s: %m",
+ record.uid, mailbox->name);
+ return(IMAP_IOERROR);
+ }
+
+ if (msg && ((msg->uid < record.uid) ||
+ ((msg->uid == record.uid) &&
+ message_uuid_compare(&msg->uuid, &record.uuid)))) {
+ msg = msg->next;
+ continue;
+ }
+
+ /* Want to upload this message; does the server have a copy? */
+ if (sync_msgid_lookup(server_msgid_list, &record.uuid))
+ sync_msgid_add(reserve_msgid_list, &record.uuid);
+ }
+
+ return(0);
+}
+
+static int reserve_all_messages(struct mailbox *mailbox,
+ struct sync_msgid_list *server_msgid_list,
+ struct sync_msgid_list *reserve_msgid_list)
+{
+ struct index_record record;
+ unsigned long msgno;
+ int r;
+
+ if (mailbox->exists == 0)
+ return(0);
+
+ for (msgno = 1 ; msgno <= mailbox->exists ; msgno++) {
+ r = mailbox_read_index_record(mailbox, msgno, &record);
+
+ if (r) {
+ syslog(LOG_ERR,
+ "IOERROR: reading index entry for nsgno %lu of %s: %m",
+ record.uid, mailbox->name);
+ return(IMAP_IOERROR);
+ }
+
+ /* Want to upload this message; does the server have a copy? */
+ if (sync_msgid_lookup(server_msgid_list, &record.uuid))
+ sync_msgid_add(reserve_msgid_list, &record.uuid);
+ }
+
+ return(0);
+}
+
+/* Count numbers of instances on server of each MessageID that we will
+ * want to copy */
+
+static int count_reserve_messages(struct sync_folder *server_folder,
+ struct sync_msgid_list *reserve_msgid_list)
+{
+ struct sync_msg_list *msglist = server_folder->msglist;
+ struct sync_msg *msg;
+ struct sync_msgid *msgid;
+
+ for (msg = msglist->head ; msg ; msg = msg->next) {
+ if ((msgid=sync_msgid_lookup(reserve_msgid_list, &msg->uuid)))
+ msgid->count++;
+ }
+
+ return(0);
+}
+
+static int reserve_check_folder(struct sync_msgid_list *reserve_msgid_list,
+ struct sync_folder *folder)
+{
+ struct sync_msg *msg;
+ struct sync_msgid *msgid;
+
+ for (msg = folder->msglist->head ; msg ; msg = msg->next) {
+ msgid = sync_msgid_lookup(reserve_msgid_list, &msg->uuid);
+
+ if (msgid && !msgid->reserved)
+ return(1);
+ }
+ return(0);
+}
+
+static int reserve_folder(struct sync_msgid_list *reserve_msgid_list,
+ struct sync_folder *folder)
+{
+ struct sync_msg *msg;
+ struct sync_msgid *msgid;
+ static struct buf arg;
+ int r = 0, unsolicited, c;
+
+ prot_printf(toserver, "RESERVE ");
+ sync_printastring(toserver, folder->name);
+
+ for (msg = folder->msglist->head ; msg ; msg = msg->next) {
+ msgid = sync_msgid_lookup(reserve_msgid_list, &msg->uuid);
+
+ if (msgid && !msgid->reserved) {
+ /* Attempt to Reserve message in this folder */
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, message_uuid_text(&msgid->uuid));
+ }
+ }
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ r = sync_parse_code("RESERVE", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited);
+
+ /* Parse response to record successfully reserved messages */
+ while (!r && unsolicited) {
+ struct message_uuid tmp_uuid;
+
+ c = getword(fromserver, &arg);
+
+ if (c == '\r')
+ c = prot_getc(fromserver);
+
+ if (c != '\n') {
+ syslog(LOG_ERR, "Illegal response to RESERVE: %s", arg.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ return(IMAP_PROTOCOL_ERROR);
+ }
+
+ if (!message_uuid_from_text(&tmp_uuid, arg.s)) {
+ syslog(LOG_ERR, "Illegal response to RESERVE: %s", arg.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ return(IMAP_PROTOCOL_ERROR);
+ }
+
+ if ((msgid = sync_msgid_lookup(reserve_msgid_list, &tmp_uuid))) {
+ msgid->reserved = 1;
+ reserve_msgid_list->reserved++;
+ sync_msgid_add(msgid_onserver, &tmp_uuid);
+ } else
+ syslog(LOG_ERR, "RESERVE: Unexpected response MessageID %s in %s",
+ arg.s, folder->name);
+
+ r = sync_parse_code("RESERVE", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited);
+ }
+ return(r);
+}
+
+struct reserve_sort_item {
+ struct sync_folder *folder;
+ unsigned long count;
+};
+
+static int reserve_folder_compare(const void *v1, const void *v2)
+{
+ struct reserve_sort_item *s1 = (struct reserve_sort_item *)v1;
+ struct reserve_sort_item *s2 = (struct reserve_sort_item *)v2;
+
+ return(s1->count - s2->count);
+}
+
+static int reserve_messages(struct sync_folder_list *client_list,
+ struct sync_folder_list *server_list,
+ int *vanishedp)
+{
+ struct sync_msgid_list *server_msgid_list = NULL;
+ struct sync_msgid_list *reserve_msgid_list = NULL;
+ struct sync_folder *folder, *folder2;
+ struct sync_msg *msg;
+ struct sync_msgid *msgid;
+ struct reserve_sort_item *reserve_sort_list = 0;
+ int reserve_sort_count;
+ int r = 0;
+ int mailbox_open = 0;
+ int count;
+ int i;
+ struct mailbox m;
+
+ server_msgid_list = sync_msgid_list_create(SYNC_MSGID_LIST_HASH_SIZE);
+ reserve_msgid_list = sync_msgid_list_create(SYNC_MSGID_LIST_HASH_SIZE);
+
+ /* Generate fast lookup hash of all MessageIDs available on server */
+ for (folder = server_list->head ; folder ; folder = folder->next) {
+ for (msg = folder->msglist->head ; msg ; msg = msg->next) {
+ if (!sync_msgid_lookup(server_msgid_list, &msg->uuid))
+ sync_msgid_add(server_msgid_list, &msg->uuid);
+ }
+ }
+
+ /* Find messages we want to upload that are available on server */
+ for (folder = client_list->head ; folder ; folder = folder->next) {
+ /* Quietly skip over folders that have already been processed */
+ if (folder->mark) continue;
+
+ folder->id = NULL;
+ folder->acl = NULL;
+
+ r = mailbox_open_header(folder->name, 0, &m);
+
+ /* Quietly skip over folders which have been deleted since we
+ started working (but record fact in case caller cares) */
+ if (r == IMAP_MAILBOX_NONEXISTENT) {
+ (*vanishedp)++;
+ r = 0;
+ continue;
+ }
+
+ /* Quietly ignore objects that we don't have access to.
+ * Includes directory stubs, which have not underlying cyrus.*
+ * files in the filesystem */
+ if (r == IMAP_PERMISSION_DENIED) {
+ r = 0;
+ continue;
+ }
+
+ if (!r) mailbox_open = 1;
+ if (!r) r = mailbox_open_index(&m);
+
+ if (r) {
+ if (mailbox_open) mailbox_close(&m);
+
+ syslog(LOG_ERR, "IOERROR: %s", error_message(r));
+ goto bail;
+ }
+
+ folder->id = xstrdup(m.uniqueid);
+ folder->acl = xstrdup(m.acl);
+
+ if ((folder2=sync_folder_lookup(server_list, m.uniqueid)))
+ find_reserve_messages(&m, folder2->msglist,
+ server_msgid_list,
+ reserve_msgid_list);
+ else
+ reserve_all_messages(&m,
+ server_msgid_list,
+ reserve_msgid_list);
+
+ mailbox_close(&m);
+ }
+
+ if (reserve_msgid_list->count == 0) {
+ r = 0; /* Nothing to do */
+ goto bail;
+ }
+
+ /* Generate instance count for messages available on server */
+ for (folder = server_list->head ; folder ; folder = folder->next)
+ count_reserve_messages(folder, reserve_msgid_list);
+
+ /* Add all folders which have unique copies of messages to reserve list
+ * (as they will definitely be needed) */
+ for (folder = server_list->head ; folder ; folder = folder->next) {
+ for (msg = folder->msglist->head ; msg ; msg = msg->next) {
+ msgid = sync_msgid_lookup(reserve_msgid_list, &msg->uuid);
+
+ if (msgid && (msgid->count == 1)) {
+ reserve_folder(reserve_msgid_list, folder);
+ folder->reserve = 1;
+ break;
+ }
+ }
+ }
+
+ /* Record all folders with unreserved messages and sort them so the
+ * folder with most unreserved messages in first */
+ reserve_sort_list
+ = xmalloc(server_list->count*sizeof(struct reserve_sort_item));
+
+ /* Count messages we will be able to reserve from each folder on server */
+ reserve_sort_count = 0;
+ for (folder = server_list->head; folder ; folder=folder->next) {
+ if (folder->reserve) continue;
+
+ for (count = 0, msg = folder->msglist->head ; msg ; msg = msg->next) {
+ msgid = sync_msgid_lookup(reserve_msgid_list, &msg->uuid);
+
+ if (msgid && !msgid->reserved)
+ count++;
+ }
+
+ if (count > 0) {
+ reserve_sort_list[reserve_sort_count].folder = folder;
+ reserve_sort_list[reserve_sort_count].count = count;
+ reserve_sort_count++;
+ }
+ }
+
+ /* Sort folders (folder with most reservable messages first) */
+ if (reserve_sort_count > 0)
+ qsort(reserve_sort_list, reserve_sort_count,
+ sizeof(struct reserve_sort_item), reserve_folder_compare);
+
+ /* Work through folders until all messages reserved or no more */
+ for (i=0; i < reserve_sort_count ; i++) {
+ folder = reserve_sort_list[i].folder;
+
+ if (reserve_check_folder(reserve_msgid_list, folder))
+ reserve_folder(reserve_msgid_list, folder);
+
+ if (reserve_msgid_list->reserved == reserve_msgid_list->count)
+ break;
+ }
+
+ bail:
+ sync_msgid_list_free(&server_msgid_list);
+ sync_msgid_list_free(&reserve_msgid_list);
+ if (reserve_sort_list) free(reserve_sort_list);
+ return(r);
+}
+
+static int folders_get_uniqueid(struct sync_folder_list *client_list,
+ int *vanishedp)
+{
+ struct sync_folder *folder;
+ int r = 0;
+ int mailbox_open = 0;
+ struct mailbox m;
+
+ /* Find messages we want to upload that are available on server */
+ for (folder = client_list->head ; folder ; folder = folder->next) {
+ /* Quietly skip over folders that have already been processed */
+ if (folder->mark) continue;
+
+ folder->id = NULL;
+ folder->acl = NULL;
+
+ r = mailbox_open_header(folder->name, 0, &m);
+
+ /* Quietly skip over folders which have been deleted since we
+ started working (but record fact in case caller cares) */
+ if (r == IMAP_MAILBOX_NONEXISTENT) {
+ (*vanishedp)++;
+ r = 0;
+ continue;
+ }
+
+ /* Quietly ignore objects that we don't have access to.
+ * Includes directory stubs, which have not underlying cyrus.*
+ * files in the filesystem */
+ if (r == IMAP_MAILBOX_NONEXISTENT) {
+ r = 0;
+ continue;
+ }
+
+
+ if (!r) mailbox_open = 1;
+ if (!r) r = mailbox_open_index(&m);
+
+ if (r) {
+ if (mailbox_open) mailbox_close(&m);
+ syslog(LOG_ERR, "IOERROR: %s", error_message(r));
+ return(r);
+ }
+
+ folder->id = xstrdup(m.uniqueid);
+ folder->acl = xstrdup(m.acl);
+
+ mailbox_close(&m);
+ }
+
+ return(0);
+}
+
+/* ====================================================================== */
+
+static int user_reset(char *user)
+{
+ prot_printf(toserver, "RESET ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("RESET", fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+/* ====================================================================== */
+
+static int folder_select(char *name, char *myuniqueid,
+ unsigned long *lastuidp)
+{
+ int r, c;
+ static struct buf uniqueid;
+ static struct buf lastuid;
+
+ prot_printf(toserver, "SELECT ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ r = sync_parse_code("SELECT", fromserver, SYNC_PARSE_NOEAT_OKLINE, NULL);
+ if (r) return(r);
+
+ if ((c = getword(fromserver, &uniqueid)) != ' ') {
+ eatline(fromserver, c);
+ syslog(LOG_ERR, "Garbage on Select response");
+ return(IMAP_PROTOCOL_ERROR);
+ }
+
+ c = getword(fromserver, &lastuid);
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') {
+ eatline(fromserver, c);
+ syslog(LOG_ERR, "Garbage on Select response");
+ return(IMAP_PROTOCOL_ERROR);
+ }
+
+ if (strcmp(uniqueid.s, myuniqueid) != 0)
+ return(IMAP_MAILBOX_MOVED);
+
+ if (lastuidp) *lastuidp = sync_atoul(lastuid.s);
+
+ return(0);
+}
+
+static int folder_create(char *name, char *part, char *uniqueid, char *acl,
+ unsigned long uidvalidity)
+{
+ prot_printf(toserver, "CREATE ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, part);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, uniqueid);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, acl);
+ prot_printf(toserver, " ");
+ prot_printf(toserver, "0");
+ prot_printf(toserver, " ");
+ prot_printf(toserver, "%lu\r\n", uidvalidity);
+ prot_flush(toserver);
+
+ return(sync_parse_code("CREATE", fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int folder_rename(char *oldname, char *newname)
+{
+ prot_printf(toserver, "RENAME ");
+ sync_printastring(toserver, oldname);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, newname);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("RENAME", fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int folder_delete(char *name)
+{
+ prot_printf(toserver, "DELETE ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("DELETE", fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int user_addsub(char *user, char *name)
+{
+ if (verbose)
+ printf("ADDSUB %s %s\n", user, name);
+
+ if (verbose_logging)
+ syslog(LOG_INFO, "ADDSUB %s %s", user, name);
+
+ prot_printf(toserver, "ADDSUB ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("ADDSUB", fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int user_delsub(char *user, char *name)
+{
+ if (verbose)
+ printf("DELSUB %s %s\n", user, name);
+
+ if (verbose_logging)
+ syslog(LOG_INFO, "DELSUB %s %s", user, name);
+
+ prot_printf(toserver, "DELSUB ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("DELSUB", fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int folder_setacl(char *name, char *acl)
+{
+ prot_printf(toserver, "SETACL ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, acl);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("SETACL", fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int folder_setannotation(char *name, char *entry, char *userid,
+ char *value)
+{
+ prot_printf(toserver, "SETANNOTATION ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, entry);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, userid);
+ prot_printf(toserver, " ");
+ if (value) sync_printastring(toserver, value);
+ else prot_printf(toserver, "NIL");
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("SETANNOTATION", fromserver,
+ SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+/* ====================================================================== */
+
+static int sieve_upload(char *user, char *name, unsigned long last_update)
+{
+ char *s, *sieve;
+ unsigned long size;
+
+ if (!(sieve = sync_sieve_read(user, name, &size))) {
+ return(IMAP_IOERROR);
+ }
+
+ prot_printf(toserver, "UPLOAD_SIEVE ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, " %lu {%lu+}\r\n", last_update, size);
+
+ s = sieve;
+ while (size) {
+ prot_putc(*s, toserver);
+ s++;
+ size--;
+ }
+ prot_printf(toserver,"\r\n");
+ free(sieve);
+ prot_flush(toserver);
+
+ return(sync_parse_code("UPLOAD_SIEVE",
+ fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+
+ return(1);
+}
+
+static int sieve_delete(char *user, char *name)
+{
+ prot_printf(toserver, "DELETE_SIEVE ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("DELETE_SIEVE",
+ fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int sieve_activate(char *user, char *name)
+{
+ prot_printf(toserver, "ACTIVATE_SIEVE ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("ACTIVATE_SIEVE",
+ fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+static int sieve_deactivate(char *user)
+{
+ prot_printf(toserver, "DEACTIVATE_SIEVE ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("DEACTIVATE_SIEVE",
+ fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+/* ====================================================================== */
+
+static int update_quota_work(struct quota *client, struct quota *server)
+{
+ int r;
+
+ if ((r = quota_read(client, NULL, 0))) {
+ syslog(LOG_INFO, "Warning: failed to read quotaroot %s: %s",
+ client->root, error_message(r));
+ return(0);
+ }
+
+ if (server && (client->limit == server->limit))
+ return(0);
+
+ prot_printf(toserver, "SETQUOTA ");
+ sync_printastring(toserver, client->root);
+
+ prot_printf(toserver, " %d\r\n", client->limit);
+ prot_flush(toserver);
+
+ return(sync_parse_code("SETQUOTA",fromserver,SYNC_PARSE_EAT_OKLINE,NULL));
+}
+
+/* ====================================================================== */
+
+static void create_flags_lookup(int table[], char *client[], char *server[])
+{
+ int i, j;
+
+ /* Rather unfortunate O(n^2) loop, where 0 <= n <= 128
+ * However n (number of active user defined flags is typically small:
+ * (client[i] == NULL) test should make this much closer to O(n).
+ */
+ for (i = 0 ; i < MAX_USER_FLAGS ; i++) {
+ table[i] = (-1);
+
+ if (client[i] == NULL)
+ continue;
+
+ for (j = 0 ; j < MAX_USER_FLAGS ; j++) {
+ if (server[j] && !strcmp(client[i], server[j])) {
+ table[i] = j;
+ break;
+ }
+ }
+ }
+}
+
+static int check_flags(struct mailbox *mailbox, struct sync_msg_list *list,
+ int flag_lookup_table[])
+{
+ struct sync_msg *msg;
+ unsigned long msgno;
+ struct index_record record;
+ int cflag, sflag, cvalue, svalue;
+
+ msg = list->head;
+ for (msgno = 1; msg && (msgno <= mailbox->exists) ; msgno++) {
+ mailbox_read_index_record(mailbox, msgno, &record);
+
+ /* Skip msgs on client missing on server (will upload later) */
+ if (record.uid < msg->uid)
+ continue;
+
+ /* Skip over messages recorded on server which are missing on client
+ * (either will be expunged or have been expunged already) */
+ while (msg && (record.uid > msg->uid))
+ msg = msg->next;
+
+ if (!(msg && (record.uid == msg->uid)))
+ continue;
+
+ /* Got a message on client which has same UID as message on server
+ * Work out if system and user flags match */
+ if (record.system_flags != msg->flags.system_flags)
+ return(1);
+
+ for (cflag = 0; cflag < MAX_USER_FLAGS; cflag++) {
+ if (mailbox->flagname[cflag] == NULL)
+ continue;
+
+ cvalue = svalue = 0;
+
+ if (record.user_flags[cflag/32] & (1<<(cflag&31)))
+ cvalue = 1;
+
+ if (((sflag = flag_lookup_table[cflag]) >= 0) &&
+ (msg->flags.user_flags[sflag/32] & 1<<(sflag&31)))
+ svalue = 1;
+
+ if (cvalue != svalue)
+ return(1);
+ }
+ }
+ return(0);
+}
+
+static int update_flags(struct mailbox *mailbox, struct sync_msg_list *list,
+ int flag_lookup_table[])
+{
+ struct sync_msg *msg;
+ unsigned long msgno;
+ struct index_record record;
+ int flags_printed, flag;
+ int cflag, sflag, cvalue, svalue;
+ int update;
+ int have_update = 0;
+
+ msg = list->head;
+ for (msgno = 1; msg && (msgno <= mailbox->exists) ; msgno++) {
+ mailbox_read_index_record(mailbox, msgno, &record);
+
+ /* Skip msgs on client missing on server (will upload later) */
+ if (record.uid < msg->uid)
+ continue;
+
+ /* Skip over messages recorded on server which are missing on client
+ * (either will be expunged or have been expunged already) */
+ while (msg && (record.uid > msg->uid))
+ msg = msg->next;
+
+ if (!(msg && (record.uid == msg->uid)))
+ continue;
+
+ /* Got a message on client which has same UID as message on server
+ * Work out if system and user flags match */
+ update = 0;
+ if (record.system_flags != msg->flags.system_flags) {
+ update = 1;
+ } else for (cflag = 0; cflag < MAX_USER_FLAGS; cflag++) {
+ if (mailbox->flagname[cflag] == NULL)
+ continue;
+
+ cvalue = svalue = 0;
+
+ if (record.user_flags[cflag/32] & (1<<(cflag&31)))
+ cvalue = 1;
+
+ if (((sflag = flag_lookup_table[cflag]) >= 0) &&
+ (msg->flags.user_flags[sflag/32] & 1<<(sflag&31)))
+ svalue = 1;
+
+ if (cvalue != svalue) {
+ update = 1;
+ break;
+ }
+ }
+ if (!update)
+ continue;
+
+ if (!have_update) {
+ prot_printf(toserver, "SETFLAGS");
+ have_update = 1;
+ }
+
+ prot_printf(toserver, " %lu (", record.uid);
+ flags_printed = 0;
+
+ if (record.system_flags & FLAG_DELETED)
+ sync_flag_print(toserver, &flags_printed,"\\deleted");
+ if (record.system_flags & FLAG_ANSWERED)
+ sync_flag_print(toserver, &flags_printed,"\\answered");
+ if (record.system_flags & FLAG_FLAGGED)
+ sync_flag_print(toserver,&flags_printed, "\\flagged");
+ if (record.system_flags & FLAG_DRAFT)
+ sync_flag_print(toserver,&flags_printed, "\\draft");
+
+ for (flag = 0 ; flag < MAX_USER_FLAGS ; flag++) {
+ if (mailbox->flagname[flag] &&
+ (record.user_flags[flag/32] & (1<<(flag&31)) ))
+ sync_flag_print(toserver, &flags_printed,
+ mailbox->flagname[flag]);
+ }
+ prot_printf(toserver, ")");
+ }
+
+ if (!have_update)
+ return(0);
+
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("SETFLAGS",fromserver,SYNC_PARSE_EAT_OKLINE,NULL));
+}
+
+/* ====================================================================== */
+
+static int check_expunged(struct mailbox *mailbox, struct sync_msg_list *list)
+{
+ struct sync_msg *msg = list->head;
+ unsigned long msgno = 1;
+ struct index_record record;
+
+ for (msgno = 1; msg && (msgno <= mailbox->exists) ; msgno++) {
+ mailbox_read_index_record(mailbox, msgno, &record);
+
+ /* Skip msgs on client missing on server (will upload later) */
+ if (record.uid < msg->uid)
+ continue;
+
+ /* Message on server doesn't exist on client: need expunge */
+ if (record.uid > msg->uid)
+ return(1);
+
+ /* UIDs match => exist on client and server */
+ msg = msg->next;
+ }
+ return((msg) ? 1 : 0); /* Remaining messages on server: expunge needed */
+}
+
+static int expunge(struct mailbox *mailbox, struct sync_msg_list *list)
+{
+ struct sync_msg *msg = list->head;
+ unsigned long msgno = 1;
+ struct index_record record;
+ int count = 0;
+
+ for (msgno = 1; msg && (msgno <= mailbox->exists) ; msgno++) {
+ mailbox_read_index_record(mailbox, msgno, &record);
+
+ /* Skip msgs on client missing on server (will upload later) */
+ if (record.uid < msg->uid)
+ continue;
+
+ /* Expunge messages on server which do not exist on client */
+ while (msg && (record.uid > msg->uid)) {
+ if (count++ == 0)
+ prot_printf(toserver, "EXPUNGE");
+
+ prot_printf(toserver, " %lu", msg->uid);
+ msg = msg->next;
+ }
+
+ /* Skip messages which exist on both client and server */
+ if (msg && (record.uid == msg->uid))
+ msg = msg->next;
+ }
+
+ /* Expunge messages on server which do not exist on client */
+ while (msg) {
+ if (count++ == 0)
+ prot_printf(toserver, "EXPUNGE");
+
+ prot_printf(toserver, " %lu", msg->uid);
+
+ msg = msg->next;
+ }
+
+ if (count == 0)
+ return(0);
+
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+ return(sync_parse_code("EXPUNGE",fromserver,SYNC_PARSE_EAT_OKLINE,NULL));
+}
+
+/* ====================================================================== */
+
+/* Check whether there are any messages to upload in this folder */
+
+static int check_upload_messages(struct mailbox *mailbox,
+ struct sync_msg_list *list)
+{
+ struct sync_msg *msg;
+ struct index_record record;
+ unsigned long msgno;
+
+ if (mailbox->exists == 0)
+ return(0);
+
+ /* Find out whether server is missing any messages */
+ if ((msg = list->head) == NULL)
+ return(1);
+
+ for (msgno = 1 ; msgno <= mailbox->exists ; msgno++) {
+ if (mailbox_read_index_record(mailbox, msgno, &record))
+ return(1); /* Attempt upload, report error then */
+
+ /* Skip over messages recorded on server which are missing on client
+ * (either will be expunged or have been expunged already) */
+ while (msg && (record.uid > msg->uid))
+ msg = msg->next;
+
+ if (msg && (record.uid == msg->uid) &&
+ message_uuid_compare(&record.uuid, &msg->uuid)) {
+ msg = msg->next; /* Ignore exact match */
+ continue;
+ }
+
+ /* Found a message on the client which doesn't exist on the server */
+ return(1);
+ }
+
+ return (msgno <= mailbox->exists);
+}
+
+/* Upload missing messages from folders (uses UPLOAD COPY where possible) */
+
+static int upload_message_work(struct mailbox *mailbox,
+ unsigned long msgno,
+ struct index_record *record)
+{
+ unsigned long cache_size;
+ int flags_printed = 0;
+ int r = 0, flag, need_body;
+ static unsigned long sequence = 1;
+ const char *msg_base = NULL;
+ unsigned long msg_size = 0;
+
+ /* Protocol for PARSED items:
+ * C: PARSED <msgid> <uid>
+ * <internaldate> <sent-date> <last-updated> <flags>
+ * <hdr size> <content_lines>
+ * <cache literal (includes cache size!)>
+ * <msg literal (includes msg size!)>
+ */
+
+ /* Protocol for COPY items:
+ * C: COPY <msgid> <uid>
+ * <internaldate> <sent-date> <last-updated> <flags>
+ */
+
+ if (sync_msgid_lookup(msgid_onserver, &record->uuid)) {
+ prot_printf(toserver, " COPY");
+ need_body = 0;
+ } else {
+ sync_msgid_add(msgid_onserver, &record->uuid);
+ prot_printf(toserver, " PARSED");
+ need_body = 1;
+ }
+
+ prot_printf(toserver, " %s %lu %lu %lu %lu (",
+ message_uuid_text(&record->uuid),
+ record->uid, record->internaldate,
+ record->sentdate, record->last_updated);
+
+ flags_printed = 0;
+
+ if (record->system_flags & FLAG_DELETED)
+ sync_flag_print(toserver, &flags_printed, "\\deleted");
+ if (record->system_flags & FLAG_ANSWERED)
+ sync_flag_print(toserver, &flags_printed, "\\answered");
+ if (record->system_flags & FLAG_FLAGGED)
+ sync_flag_print(toserver, &flags_printed, "\\flagged");
+ if (record->system_flags & FLAG_DRAFT)
+ sync_flag_print(toserver, &flags_printed, "\\draft");
+
+ for (flag = 0 ; flag < MAX_USER_FLAGS ; flag++) {
+ if (mailbox->flagname[flag] &&
+ (record->user_flags[flag/32] & (1<<(flag&31)) ))
+ sync_flag_print(toserver,
+ &flags_printed, mailbox->flagname[flag]);
+ }
+ prot_printf(toserver, ")");
+
+ if (need_body) {
+ /* Server doesn't have this message yet */
+ cache_size = mailbox_cache_size(mailbox, msgno);
+
+ if (cache_size == 0) {
+ syslog(LOG_ERR,
+ "upload_messages(): Empty cache entry for msgno %lu",
+ msgno);
+ return(IMAP_INTERNAL);
+ }
+
+ r = mailbox_map_message(mailbox, record->uid, &msg_base, &msg_size);
+
+ if (r) {
+ syslog(LOG_ERR, "IOERROR: opening message file %lu of %s: %m",
+ record->uid, mailbox->name);
+ return(IMAP_IOERROR);
+ }
+
+ prot_printf(toserver, " %lu %lu %lu {%lu+}\r\n",
+ record->header_size, record->content_lines,
+ record->cache_version, cache_size);
+
+ prot_write(toserver,
+ (char *)(mailbox->cache_base + record->cache_offset),
+ cache_size);
+
+ prot_printf(toserver, "{%lu+}\r\n", record->size);
+ prot_write(toserver, (char *)msg_base, record->size);
+ mailbox_unmap_message(mailbox, record->uid, &msg_base, &msg_size);
+ sequence++;
+ }
+ return(r);
+}
+
+static int upload_messages_list(struct mailbox *mailbox,
+ struct sync_msg_list *list)
+{
+ unsigned long msgno;
+ int r = 0;
+ struct index_record record;
+ struct sync_msg *msg;
+ int count = 0;
+ int c = ' ';
+ static struct buf token; /* BSS */
+
+ if (chdir(mailbox->path)) {
+ syslog(LOG_ERR, "Couldn't chdir to %s: %s",
+ mailbox->path, strerror(errno));
+ return(IMAP_IOERROR);
+ }
+
+ msg = list->head;
+ for (msgno = 1 ; msgno <= mailbox->exists ; msgno++) {
+ r = mailbox_read_index_record(mailbox, msgno, &record);
+
+ if (r) {
+ syslog(LOG_ERR,
+ "IOERROR: reading index entry for nsgno %lu of %s: %m",
+ record.uid, mailbox->name);
+ return(IMAP_IOERROR);
+ }
+
+ /* Skip over messages recorded on server which are missing on client
+ * (either will be expunged or have been expunged already) */
+ while (msg && (record.uid > msg->uid))
+ msg = msg->next;
+
+ if (msg && (record.uid == msg->uid) &&
+ message_uuid_compare(&record.uuid, &msg->uuid)) {
+ msg = msg->next; /* Ignore exact match */
+ continue;
+ }
+
+ if (count++ == 0)
+ prot_printf(toserver, "UPLOAD %lu %lu",
+ mailbox->last_uid, mailbox->last_appenddate);
+
+ /* Message with this UUID exists on client but not server */
+ if ((r=upload_message_work(mailbox, msgno, &record)))
+ return(r);
+
+ if (msg && (msg->uid == record.uid)) /* Overwritten on server */
+ msg = msg->next;
+ }
+
+ if (count == 0)
+ return(r);
+
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ r = sync_parse_code("UPLOAD", fromserver, SYNC_PARSE_NOEAT_OKLINE, NULL);
+ if (r) return(r);
+
+ if ((c = getword(fromserver, &token)) != ' ') {
+ eatline(fromserver, c);
+ syslog(LOG_ERR, "Garbage on Upload response");
+ return(IMAP_PROTOCOL_ERROR);
+ }
+ eatline(fromserver, c);
+
+ /* Clear out msgid_on_server list if server restarted */
+ if (!strcmp(token.s, "[RESTART]")) {
+ int hash_size = msgid_onserver->hash_size;
+
+ sync_msgid_list_free(&msgid_onserver);
+ msgid_onserver = sync_msgid_list_create(hash_size);
+
+ syslog(LOG_INFO, "UPLOAD: received RESTART");
+ }
+
+ return(0);
+}
+
+static int upload_messages_from(struct mailbox *mailbox,
+ unsigned long old_last_uid)
+{
+ unsigned long msgno;
+ int r = 0;
+ struct index_record record;
+ int count = 0;
+ int c = ' ';
+ static struct buf token; /* BSS */
+
+ if (chdir(mailbox->path)) {
+ syslog(LOG_ERR, "Couldn't chdir to %s: %s",
+ mailbox->path, strerror(errno));
+ return(IMAP_IOERROR);
+ }
+
+ for (msgno = 1 ; msgno <= mailbox->exists ; msgno++) {
+ r = mailbox_read_index_record(mailbox, msgno, &record);
+
+ if (r) {
+ syslog(LOG_ERR,
+ "IOERROR: reading index entry for nsgno %lu of %s: %m",
+ record.uid, mailbox->name);
+ return(IMAP_IOERROR);
+ }
+
+ if (record.uid <= old_last_uid)
+ continue;
+
+ if (count++ == 0)
+ prot_printf(toserver, "UPLOAD %lu %lu",
+ mailbox->last_uid, mailbox->last_appenddate);
+
+ if ((r=upload_message_work(mailbox, msgno, &record)))
+ return(r);
+ }
+
+ if (count == 0)
+ return(r);
+
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ r = sync_parse_code("UPLOAD", fromserver, SYNC_PARSE_NOEAT_OKLINE, NULL);
+ if (r) return(r);
+
+ if ((c = getword(fromserver, &token)) != ' ') {
+ eatline(fromserver, c);
+ syslog(LOG_ERR, "Garbage on Upload response");
+ return(IMAP_PROTOCOL_ERROR);
+ }
+ eatline(fromserver, c);
+
+ /* Clear out msgid_on_server list if server restarted */
+ if (!strcmp(token.s, "[RESTART]")) {
+ int hash_size = msgid_onserver->hash_size;
+
+ sync_msgid_list_free(&msgid_onserver);
+ msgid_onserver = sync_msgid_list_create(hash_size);
+
+ syslog(LOG_INFO, "UPLOAD: received RESTART");
+ }
+
+ return(0);
+}
+
+/* upload_messages() null operations still requires UIDLAST update */
+
+static int update_uidlast(struct mailbox *mailbox)
+{
+ prot_printf(toserver, "UIDLAST %lu %lu\r\n",
+ mailbox->last_uid, mailbox->last_appenddate);
+ prot_flush(toserver);
+ return(sync_parse_code("UIDLAST",fromserver, SYNC_PARSE_EAT_OKLINE, NULL));
+}
+
+
+/* ====================================================================== */
+
+static int do_seen(char *user, char *name)
+{
+ int r = 0;
+ struct mailbox m;
+ struct seen *seendb;
+ time_t lastread, lastchange;
+ unsigned int last_recent_uid;
+ char *seenuid = NULL;
+
+ if (verbose)
+ printf("SEEN %s %s\n", user, name);
+
+ if (verbose_logging)
+ syslog(LOG_INFO, "SEEN %s %s", user, name);
+
+ r = mailbox_open_header(name, 0, &m);
+ if (r) return(r);
+
+ r = seen_open(&m, user, 0, &seendb);
+ if (!r) {
+ r = seen_read(seendb, &lastread, &last_recent_uid,
+ &lastchange, &seenuid);
+ seen_close(seendb);
+ }
+
+ if (r) {
+ syslog(LOG_ERR, "Failed to read seendb (%s, %s): %s",
+ user, m.name, error_message(r));
+ goto bail;
+ }
+
+ /* Update seen list */
+ prot_printf(toserver, "SETSEEN ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, m.name);
+ prot_printf(toserver, " %lu %lu %lu ",
+ lastread, last_recent_uid, lastchange);
+ sync_printastring(toserver, seenuid);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+ r = sync_parse_code("SETSEEN",fromserver,SYNC_PARSE_EAT_OKLINE,NULL);
+
+ bail:
+ mailbox_close(&m);
+ if (seenuid) free(seenuid);
+
+ return r;
+}
+
+/* ====================================================================== */
+
+static int do_append(char *name)
+{
+ struct mailbox m;
+ int r = 0;
+ int mailbox_open = 0;
+ int selected = 0;
+ unsigned long last_uid = 0;
+ struct index_record record;
+
+ if (verbose)
+ printf("APPEND %s\n", name);
+
+ if (verbose_logging)
+ syslog(LOG_INFO, "APPEND %s", name);
+
+ if ((r = mailbox_open_header(name, 0, &m)))
+ goto bail;
+
+ mailbox_open = 1;
+
+ if ((r = mailbox_open_index(&m)))
+ goto bail;
+
+ if ((r = folder_select(name, m.uniqueid, &last_uid)))
+ goto bail;
+
+ selected = 1;
+
+ if ((r = mailbox_read_index_record(&m, m.exists, &record)))
+ goto bail;
+
+ if ((record.uid > last_uid) && (r=upload_messages_from(&m, last_uid)))
+ goto bail;
+
+ bail:
+ if (mailbox_open) mailbox_close(&m);
+
+ return(r);
+}
+
+/* ====================================================================== */
+
+static int do_acl(char *name)
+{
+ int r = 0;
+ struct mailbox m;
+
+ if (verbose)
+ printf("SETACL %s\n", name);
+
+ if (verbose_logging)
+ syslog(LOG_INFO, "SETACL: %s", name);
+
+ r = mailbox_open_header(name, 0, &m);
+ if (r) return r;
+
+ r = folder_setacl(m.name, m.acl);
+ mailbox_close(&m);
+
+ return(r);
+}
+
+static int do_quota(char *name)
+{
+ int r = 0;
+ struct quota quota;
+
+ if (verbose)
+ printf("SETQUOTA %s\n", name);
+
+ if (verbose_logging)
+ syslog(LOG_INFO, "SETQUOTA: %s", name);
+
+ quota.root = name;
+ r = update_quota_work("a, NULL);
+
+ return(r);
+}
+
+static int add_annot(const char *mailbox __attribute__((unused)),
+ const char *entry, const char *userid,
+ struct annotation_data *attrib, void *rock)
+{
+ struct sync_annot_list *l = (struct sync_annot_list *) rock;
+
+ sync_annot_list_add(l, entry, userid, attrib->value);
+
+ return 0;
+}
+
+static int do_annotation(char *name)
+{
+ int unsolicited, c, r = 0;
+ static struct buf entry, userid, value;
+ struct sync_annot_list *server_list = sync_annot_list_create();
+
+ prot_printf(toserver, "LIST_ANNOTATIONS ");
+ sync_printastring(toserver, name);
+ prot_printf(toserver, "\r\n", name);
+ prot_flush(toserver);
+ r=sync_parse_code("LIST_ANNOTATIONS", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited);
+
+ while (!r && unsolicited) {
+ if ((c = getastring(fromserver, toserver, &entry)) != ' ') {
+ syslog(LOG_ERR,
+ "LIST_ANNOTATIONS: Invalid type %d response from server: %s",
+ unsolicited, entry.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ r = IMAP_PROTOCOL_ERROR;
+ break;
+ }
+
+ if ((c = getastring(fromserver, toserver, &userid)) != ' ') {
+ syslog(LOG_ERR,
+ "LIST_ANNOTATIONS: Invalid type %d response from server: %s",
+ unsolicited, userid.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ r = IMAP_PROTOCOL_ERROR;
+ break;
+ }
+
+ c = getastring(fromserver, toserver, &value);
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') {
+ syslog(LOG_ERR,
+ "LIST_ANNOTATIONS: Invalid type %d response from server: %s",
+ unsolicited, value.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ r = IMAP_PROTOCOL_ERROR;
+ break;
+ }
+ sync_annot_list_add(server_list, entry.s, userid.s, value.s);
+
+ r = sync_parse_code("LIST_ANNOTATIONS", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited);
+ }
+
+ if (!r) {
+ struct sync_annot_list *client_list = sync_annot_list_create();
+ struct sync_annot_item *c, *s;
+ int n;
+
+ annotatemore_findall(name, "*", &add_annot, client_list, NULL);
+
+ /* both lists are sorted, so we work our way through the lists
+ top-to-bottom and determine what we need to do based on order */
+ for (c = client_list->head,
+ s = server_list->head; c || s; c = c ? c->next : NULL) {
+ if (!s) n = -1; /* add all client annotations */
+ else if (!c) n = 1; /* remove all server annotations */
+ else if ((n = strcmp(c->entry, s->entry)) == 0)
+ n = strcmp(c->userid, s->userid);
+
+ if (n > 0) {
+ /* remove server annotations until we reach or pass the
+ current client annotation, or we reach the end of the
+ server list */
+ do {
+ if ((r = folder_setannotation(name, s->entry, s->userid,
+ NULL))) {
+ goto bail;
+ }
+ s = s->next;
+ if (!s) n = -1; /* end of server list, we're done */
+ else if (!c) n = 1; /* remove all server annotations */
+ else if ((n = strcmp(c->entry, s->entry)) == 0)
+ n = strcmp(c->userid, s->userid);
+ } while (n > 0);
+ }
+
+ if (n == 0) {
+ /* already have the annotation, but is the value different? */
+ if (strcmp(c->value, s->value) != 0) n = -1;
+ s = s->next;
+ }
+ if (c && n < 0) {
+ /* add the current client annotation */
+ if ((r = folder_setannotation(name, c->entry, c->userid,
+ c->value))) {
+ goto bail;
+ }
+ }
+ }
+ bail:
+ sync_annot_list_free(&client_list);
+ }
+
+ sync_annot_list_free(&server_list);
+
+ return(r);
+}
+
+/* ====================================================================== */
+
+/* Caller should acquire expire lock before opening mailbox index:
+ * gives us readonly snapshot of mailbox for duration of upload
+ */
+
+static int do_mailbox_work(struct mailbox *mailbox,
+ struct sync_msg_list *list, int just_created,
+ char *uniqueid)
+{
+ unsigned int last_recent_uid;
+ time_t lastread, lastchange;
+ struct seen *seendb;
+ char *seenuid;
+ int r = 0;
+ int selected = 0;
+ int flag_lookup_table[MAX_USER_FLAGS];
+
+ create_flags_lookup(flag_lookup_table,
+ mailbox->flagname, list->meta.flagname);
+
+ if (check_flags(mailbox, list, flag_lookup_table)) {
+ if (!selected &&
+ (r=folder_select(mailbox->name, mailbox->uniqueid, NULL)))
+ return(r);
+
+ selected = 1;
+ if ((r=update_flags(mailbox, list, flag_lookup_table)))
+ goto bail;
+ }
+
+ if (check_expunged(mailbox, list)) {
+ if (!selected &&
+ (r=folder_select(mailbox->name, mailbox->uniqueid, NULL)))
+ goto bail;
+
+ selected = 1;
+
+ if ((r=expunge(mailbox, list)))
+ goto bail;
+ }
+
+ if (check_upload_messages(mailbox, list)) {
+ if (!selected &&
+ (r=folder_select(mailbox->name, mailbox->uniqueid, NULL)))
+ goto bail;
+ selected = 1;
+
+ if ((r=upload_messages_list(mailbox, list)))
+ goto bail;
+ } else if (just_created || (list->last_uid != mailbox->last_uid)) {
+ if (!selected &&
+ (r=folder_select(mailbox->name, mailbox->uniqueid, NULL)))
+ goto bail;
+ selected = 1;
+
+ if ((r=update_uidlast(mailbox)))
+ goto bail;
+ }
+
+ bail:
+ return(r);
+}
+
+/* ====================================================================== */
+
+int do_folders(struct sync_folder_list *client_list,
+ struct sync_folder_list *server_list,
+ int *vanishedp,
+ int do_contents,
+ int doing_user)
+{
+ struct mailbox m;
+ int r = 0, mailbox_open = 0;
+ struct sync_rename_list *rename_list = sync_rename_list_create();
+ struct sync_folder *folder, *folder2;
+
+ *vanishedp = 0;
+
+ if (do_contents) {
+ /* Attempt to reserve messages on server that we would overwise have
+ * to upload from client */
+ if ((r = reserve_messages(client_list, server_list, vanishedp)))
+ goto bail;
+ } else {
+ /* Just need to check whether folders exist, get uniqueid */
+ if ((r = folders_get_uniqueid(client_list, vanishedp)))
+ goto bail;
+ }
+
+ /* Tag folders on server which still exist on the client. Anything
+ * on the server which remains untagged can be deleted immediately */
+ for (folder = client_list->head ; folder ; folder = folder->next) {
+ /* Quietly skip over folders that have already been processed */
+ if (folder->mark) continue;
+
+ if (folder->id &&
+ (folder2 = sync_folder_lookup(server_list, folder->id))) {
+ folder2->mark = 1;
+ if (strcmp(folder->name , folder2->name) != 0)
+ sync_rename_list_add(rename_list,
+ folder->id, folder2->name, folder->name);
+ }
+ }
+
+ /* Delete folders on server which no longer exist on client */
+ for (folder = server_list->head ; folder ; folder = folder->next) {
+ if (!folder->mark && ((r=folder_delete(folder->name)) != 0))
+ goto bail;
+ }
+
+ /* Need to rename folders in an order which avoids dependancy conflicts
+ * following isn't wildly efficient, but rename_list will typically be
+ * short and contain few dependancies. Algorithm is to simply pick a
+ * rename operation which has no dependancy and repeat until done */
+
+ while (rename_list->done < rename_list->count) {
+ int rename_success = 0;
+ struct sync_rename_item *item, *item2;
+
+ for (item = rename_list->head; item; item = item->next) {
+ if (item->done) continue;
+
+ item2 = sync_rename_lookup(rename_list, item->newname);
+ if (item2 && !item2->done) continue;
+
+ /* Found unprocessed item which should rename cleanly */
+ if ((r = folder_rename(item->oldname, item->newname))) {
+ syslog(LOG_ERR, "do_folders(): failed to rename: %s -> %s ",
+ item->oldname, item->newname);
+ goto bail;
+ }
+
+ rename_list->done++;
+ item->done = 1;
+ rename_success = 1;
+ }
+
+ if (!rename_success) {
+ /* Scanned entire list without a match */
+ syslog(LOG_ERR,
+ "do_folders(): failed to order folders correctly");
+ r = IMAP_PROTOCOL_ERROR;
+ goto bail;
+ }
+ }
+
+ for (folder = client_list->head ; folder ; folder = folder->next) {
+ /* Quietly skip over folders that have already been processed */
+ if (folder->mark || !folder->id) continue;
+
+ r = mailbox_open_header(folder->name, 0, &m);
+
+ /* Deal with folders deleted since start of function call. Likely
+ * cause concurrent rename/delete: caller may need countermeaures
+ * (e.g: lock out imapds for a few seconds and then retry)
+ */
+ if (r == IMAP_MAILBOX_NONEXISTENT) {
+ (*vanishedp)++;
+
+ folder2 = sync_folder_lookup(server_list, folder->id);
+
+ if (folder2 && folder2->mark) {
+ if ((r=folder_delete(folder2->name))) goto bail;
+ folder2->mark = 0;
+ }
+ continue;
+ }
+
+ /* Quietly ignore objects that we don't have access to.
+ * Includes directory stubs, which have not underlying cyrus.*
+ * files in the filesystem */
+ if (r == IMAP_PERMISSION_DENIED) {
+ r = 0;
+ continue;
+ }
+
+ if (!r) mailbox_open = 1;
+
+ if (!r) r = mailbox_open_index(&m);
+
+ if (r) {
+ if (mailbox_open) mailbox_close(&m);
+ syslog(LOG_ERR, "IOERROR: Failed to open %s: %s",
+ folder->name, error_message(r));
+ r = IMAP_IOERROR;
+ goto bail;
+ }
+
+ if ((folder2=sync_folder_lookup(server_list, folder->id))) {
+ if (strcmp(folder2->id, m.uniqueid) != 0) {
+ /* Folder UniqueID has changed under our feet: force resync */
+ char *part;
+
+ if ((r=folder_delete(folder2->name)))
+ goto bail;
+
+ if ((r=mboxlist_detail(m.name,NULL,NULL,NULL,&part,NULL,NULL))
+ || (r=folder_create(m.name,part,m.uniqueid,m.acl,m.uidvalidity)))
+ goto bail;
+
+ if (!r && m.quota.root && !strcmp(m.name, m.quota.root))
+ r = update_quota_work(&m.quota, &folder2->quota);
+
+ if (!r) r = do_annotation(m.name);
+
+ if (!r && do_contents) {
+ struct sync_msg_list *folder_msglist;
+
+ /* 0L, 0L Forces last_uid and seendb push as well */
+ folder_msglist = sync_msg_list_create(m.flagname, 0);
+ r = do_mailbox_work(&m, folder_msglist, 1, m.uniqueid);
+ sync_msg_list_free(&folder_msglist);
+ }
+ } else {
+ /* Deal with existing folder */
+ if (!(folder2->acl && !strcmp(m.acl, folder2->acl)))
+ r = folder_setacl(folder->name, m.acl);
+
+ if (!r && m.quota.root && !strcmp(m.name, m.quota.root))
+ r = update_quota_work(&m.quota, &folder2->quota);
+
+ if (!r) r = do_annotation(m.name);
+
+ if (!r && do_contents)
+ r = do_mailbox_work(&m, folder2->msglist, 0, m.uniqueid);
+ }
+ } else {
+ char *userid, *part;
+
+ /* Need to create fresh folder on server */
+ if ((r=mboxlist_detail(m.name,NULL,NULL,NULL,&part,NULL,NULL)) ||
+ (r=folder_create(m.name,part,m.uniqueid,m.acl,m.uidvalidity)))
+ goto bail;
+
+ if (!r && m.quota.root && !strcmp(m.name, m.quota.root))
+ r = update_quota_work(&m.quota, NULL);
+
+ if (!r) r = do_annotation(m.name);
+
+ if (!r && do_contents) {
+ struct sync_msg_list *folder_msglist;
+
+ /* 0L, 0L Forces last_uid and seendb push as well */
+ folder_msglist = sync_msg_list_create(m.flagname, 0);
+ r = do_mailbox_work(&m, folder_msglist, 1, m.uniqueid);
+ sync_msg_list_free(&folder_msglist);
+ }
+
+ if (!r && !doing_user && (userid = mboxname_isusermailbox(m.name, 1)))
+ r = do_meta(userid);
+
+ }
+ if (r) goto bail;
+
+ /* Mark folder as processed */
+ folder->mark = 1;
+ client_list->count--;
+
+ mailbox_close(&m);
+ mailbox_open = 0;
+ }
+
+ bail:
+ if (mailbox_open) mailbox_close(&m);
+ sync_rename_list_free(&rename_list);
+ return(r);
+}
+
+/* ====================================================================== */
+
+/* Generate sync_folder_list including all msg information from
+ list of client folders */
+
+int do_mailboxes_work(struct sync_folder_list *client_list,
+ struct sync_folder_list *server_list)
+{
+ struct sync_folder *folder = NULL;
+ int c = ' ', r = 0;
+ int unsolicited_type;
+ struct sync_msg *msg = NULL;
+ static struct buf id;
+ static struct buf acl;
+ static struct buf name;
+ static struct buf lastuid;
+ static struct buf arg;
+ struct quota quota, *quotap;
+
+ prot_printf(toserver, "MAILBOXES");
+
+ for (folder = client_list->head ; folder; folder = folder->next) {
+ /* Quietly skip over folders that have already been processed */
+ if (folder->mark) continue;
+
+ prot_printf(toserver, " ");
+ sync_printastring(toserver, folder->name);
+ }
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ r = sync_parse_code("MAILBOXES", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited_type);
+
+ while (!r && (unsolicited_type > 0)) {
+ switch (unsolicited_type) {
+ case 2:
+ /* New folder */
+ if ((c = getword(fromserver, &id)) != ' ')
+ goto parse_err;
+
+ if ((c = getastring(fromserver, toserver, &name)) != ' ')
+ goto parse_err;
+
+ if ((c = getastring(fromserver, toserver, &acl)) != ' ')
+ goto parse_err;
+
+ c = getastring(fromserver, toserver, &lastuid);
+
+ quotap = NULL;
+ if (c == ' ') {
+ c = getword(fromserver, &arg);
+ quota.limit = atoi(arg.s);
+ quotap = "a;
+ }
+
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') goto parse_err;
+ if (!imparse_isnumber(lastuid.s)) goto parse_err;
+
+ folder = sync_folder_list_add(server_list, id.s, name.s, acl.s,
+ quotap);
+ folder->msglist = sync_msg_list_create(NULL, sync_atoul(lastuid.s));
+ break;
+ case 1:
+ /* New message in current folder */
+ if (folder == NULL) goto parse_err; /* No current folder */
+ msg = sync_msg_list_add(folder->msglist);
+
+ if (((c = getword(fromserver, &arg)) != ' ') ||
+ ((msg->uid = sync_atoul(arg.s)) == 0)) goto parse_err;
+
+ if (((c = getword(fromserver, &arg)) != ' ')) goto parse_err;
+
+ if (!message_uuid_from_text(&msg->uuid, arg.s))
+ goto parse_err;
+
+ c = sync_getflags(fromserver, &msg->flags, &folder->msglist->meta);
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') goto parse_err;
+ break;
+ default:
+ goto parse_err;
+ }
+ r = sync_parse_code("MAILBOXES", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited_type);
+ }
+ return(r);
+
+ parse_err:
+ syslog(LOG_ERR,
+ "MAILBOXES: Invalid unsolicited response type %d from server: %s",
+ unsolicited_type, arg.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ return(IMAP_PROTOCOL_ERROR);
+}
+
+/* ====================================================================== */
+
+static int do_mailboxes(struct sync_folder_list *client_folder_list)
+{
+ struct sync_folder_list *server_folder_list = sync_folder_list_create();
+ int r = 0;
+ int vanished = 0;
+ struct sync_folder *folder;
+
+ if (verbose) {
+ printf("MAILBOXES");
+
+ for (folder = client_folder_list->head; folder ; folder = folder->next) {
+ /* Quietly skip over folders that have already been processed */
+ if (folder->mark) continue;
+
+ printf(" %s", folder->name);
+ }
+ printf("\n");
+ }
+
+ if (verbose_logging) {
+ for (folder = client_folder_list->head; folder ; folder = folder->next) {
+ /* Quietly skip over folders that have already been processed */
+ if (folder->mark) continue;
+
+ syslog(LOG_INFO, "MAILBOX %s", folder->name);
+ }
+ }
+
+ /* Worthwhile doing mailboxes even in case of single mailbox:
+ * catches duplicate messages in single folder. Only cost is that
+ * mailbox at server end is opened twice: once for do_mailboxes_work(),
+ * once for do_folders() */
+
+ if (!r) r = do_mailboxes_work(client_folder_list,
+ server_folder_list);
+ if (!r) r = do_folders(client_folder_list, server_folder_list,
+ &vanished, 1, 0);
+
+ sync_folder_list_free(&server_folder_list);
+ return(r);
+}
+
+/* ====================================================================== */
+
+static int addmbox(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct sync_folder_list *list = (struct sync_folder_list *) rock;
+
+ sync_folder_list_add(list, NULL, name, NULL, NULL);
+ return(0);
+}
+
+static int addmbox_sub(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct sync_folder_list *list = (struct sync_folder_list *) rock;
+
+ sync_folder_list_add(list, name, name, NULL, NULL);
+ return(0);
+}
+
+/* ====================================================================== */
+
+int do_mailbox_preload(struct sync_folder *folder)
+{
+ struct mailbox m;
+ int r = 0;
+ unsigned long msgno;
+ struct index_record record;
+ int lastuid = 0;
+
+ if ((r=mailbox_open_header(folder->name, 0, &m)))
+ return(r);
+
+ if (!r) r = mailbox_open_index(&m);
+
+ /* Quietly preload data from index */
+ for (msgno = 1 ; msgno <= m.exists; msgno++) {
+ mailbox_read_index_record(&m, msgno, &record);
+
+ /* Fairly pointless, just to ensure that compiler doesn't
+ optimise loop away somehow */
+ if (record.uid <= lastuid)
+ syslog(LOG_ERR, "cmd_status_work_sub(): UIDs out of order!");
+ }
+
+ mailbox_close(&m);
+ return r;
+}
+
+int do_user_preload(char *user)
+{
+ char buf[MAX_MAILBOX_NAME+1];
+ int r = 0;
+ struct sync_folder_list *client_list = sync_folder_list_create();
+ struct sync_folder *folder;
+
+ /* Generate full list of folders on client side */
+ (sync_namespace.mboxname_tointernal)(&sync_namespace, "INBOX",
+ user, buf);
+ addmbox(buf, 0, 0, (void *)client_list);
+
+ strlcat(buf, ".*", sizeof(buf));
+ r = (sync_namespace.mboxlist_findall)(&sync_namespace, buf, 1,
+ user, NULL, addmbox,
+ (void *)client_list);
+
+ if (r) {
+ syslog(LOG_ERR, "IOERROR: %s", error_message(r));
+ sync_folder_list_free(&client_list);
+ return(r);
+ }
+
+ for (folder = client_list->head ; folder ; folder = folder->next) {
+ r = do_mailbox_preload(folder);
+
+ if (r) break;
+ }
+
+ sync_folder_list_free(&client_list);
+ return(r);
+}
+
+int do_user_main(char *user, struct sync_folder_list *server_list,
+ int *vanishedp)
+{
+ char buf[MAX_MAILBOX_NAME+1];
+ int r = 0;
+ struct sync_folder_list *client_list = sync_folder_list_create();
+
+ /* Generate full list of folders on client side */
+ (sync_namespace.mboxname_tointernal)(&sync_namespace, "INBOX",
+ user, buf);
+ addmbox(buf, 0, 0, (void *)client_list);
+
+ strlcat(buf, ".*", sizeof(buf));
+ r = (sync_namespace.mboxlist_findall)(&sync_namespace, buf, 1,
+ user, NULL, addmbox,
+ (void *)client_list);
+
+ if (r) {
+ syslog(LOG_ERR, "IOERROR: %s", error_message(r));
+ return(r);
+ }
+
+ return(do_folders(client_list, server_list, vanishedp, 1, 1));
+}
+
+int do_user_sub(char *user, struct sync_folder_list *server_list)
+{
+ int r = 0;
+ struct sync_folder_list *client_list = sync_folder_list_create();
+ struct sync_folder *c, *s;
+ int n;
+ char buf[MAX_MAILBOX_NAME+1];
+
+ /* Includes subsiduary nodes automatically */
+ r = (sync_namespace.mboxlist_findsub)(&sync_namespace, "*", 1,
+ user, NULL, addmbox_sub,
+ (void *)client_list, 1);
+ if (r) {
+ syslog(LOG_ERR, "IOERROR: %s", error_message(r));
+ goto bail;
+ }
+
+ /* both lists are sorted, so we work our way through the lists
+ top-to-bottom and determine what we need to do based on order */
+ for (c = client_list->head,
+ s = server_list->head; c || s; c = c ? c->next : NULL) {
+ if (!s) n = -1; /* add all client subscriptions */
+ else if (!c) n = 1; /* remove all server subscriptions */
+ else n = strcmp(c->name, s->name);
+
+ if (n > 0) {
+ /* remove server subscriptions until we reach or pass the
+ current client subscription, or we reach the end of the
+ server list */
+ do {
+ (sync_namespace.mboxname_tointernal)(&sync_namespace, s->name,
+ user, buf);
+ if ((r = user_delsub(user, buf))) goto bail;
+ s = s->next;
+ if (!s) n = -1; /* end of server list, we're done */
+ else if (!c) n = 1; /* remove all server subscriptions */
+ else n = strcmp(c->name, s->name);
+ } while (n > 0);
+ }
+
+ if (n == 0) {
+ /* already subscribed, skip it */
+ s = s->next;
+ }
+ else if (c && n < 0) {
+ /* add the current client subscription */
+ if ((r = user_addsub(user, c->name))) goto bail;
+ }
+ }
+
+ bail:
+ sync_folder_list_free(&client_list);
+ return(r);
+}
+
+static int do_user_seen(char *user)
+{
+ char *seen_file = seen_getpath(user);
+ int filefd;
+ const char *base;
+ unsigned long len;
+ struct stat sbuf;
+
+ /* map file */
+ filefd = open(seen_file, O_RDONLY, 0666);
+ if (filefd == -1) {
+ if (errno == ENOENT) {
+ /* its ok if it doesn't exist */
+ free(seen_file);
+ return 0;
+ }
+ syslog(LOG_ERR, "IOERROR: open on %s: %m", seen_file);
+ return IMAP_SYS_ERROR;
+ }
+
+ if (fstat(filefd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m", seen_file);
+ fatal("can't fstat seen db", EC_OSFILE);
+ }
+
+ base = NULL;
+ len = 0;
+
+ map_refresh(filefd, 1, &base, &len, sbuf.st_size, seen_file, NULL);
+
+ close(filefd);
+ free(seen_file);
+
+ /* Update seen db */
+ prot_printf(toserver, "SETSEEN_ALL ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, " {%lu+}\r\n", len);
+
+ prot_write(toserver, base, len);
+ map_free(&base, &len);
+
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+
+ return(sync_parse_code("SETSEEN_ALL",fromserver,SYNC_PARSE_EAT_OKLINE,NULL));
+}
+
+int do_user_sieve(char *user, struct sync_sieve_list *server_list)
+{
+ int r = 0;
+ struct sync_sieve_list *client_list;
+ struct sync_sieve_item *item, *item2;
+ int client_active = 0;
+ int server_active = 0;
+
+ if ((client_list = sync_sieve_list_generate(user)) == NULL) {
+ syslog(LOG_ERR, "Unable to list sieve scripts for %s", user);
+ return(IMAP_IOERROR);
+ }
+
+ /* Upload missing and out of date scripts */
+ for (item = client_list->head ; item ; item = item->next) {
+ if ((item2 = sync_sieve_lookup(server_list, item->name))) {
+ item2->mark = 1;
+ if ((item2->last_update < item->last_update) &&
+ (r=sieve_upload(user, item->name, item->last_update)))
+ goto bail;
+ } else if ((r=sieve_upload(user, item->name, item->last_update)))
+ goto bail;
+ }
+
+ /* Delete scripts which no longer exist on the client */
+ server_active = 0;
+ for (item = server_list->head ; item ; item = item->next) {
+ if (item->mark) {
+ if (item->active) server_active = 1;
+ } else if ((r=sieve_delete(user, item->name)))
+ goto bail;
+ }
+
+ /* Change active script if necessary */
+ client_active = 0;
+ for (item = client_list->head ; item ; item = item->next) {
+ if (!item->active)
+ continue;
+
+ client_active = 1;
+ if (!((item2 = sync_sieve_lookup(server_list, item->name)) &&
+ (item2->active))) {
+ if ((r = sieve_activate(user, item->name)))
+ goto bail;
+
+ server_active = 1;
+ }
+ break;
+ }
+
+ if (!r && !client_active && server_active)
+ r = sieve_deactivate(user);
+
+ bail:
+ sync_sieve_list_free(&client_list);
+ return(r);
+}
+
+/* do_user() separated into two parts so that we can start process
+ * asynchronously, come back and parse result when local list generated */
+
+int do_user_start(char *user)
+{
+ prot_printf(toserver, "USER ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+ return(0);
+}
+
+int do_user_parse(char *user,
+ struct sync_folder_list *server_list,
+ struct sync_folder_list *server_sub_list,
+ struct sync_sieve_list *server_sieve_list)
+{
+ int r = 0;
+ int c = ' ';
+ int active = 0;
+ int unsolicited_type;
+ static struct buf id;
+ static struct buf name;
+ static struct buf time;
+ static struct buf flag;
+ static struct buf acl;
+ static struct buf lastuid;
+ static struct buf arg;
+ struct sync_folder *folder = NULL;
+ struct sync_msg *msg = NULL;
+ struct quota quota, *quotap;
+
+ r = sync_parse_code("USER", fromserver,
+ SYNC_PARSE_NOEAT_OKLINE, &unsolicited_type);
+
+ /* Unpleasant: translate remote access error into "please reset me" */
+ if (r == IMAP_MAILBOX_NONEXISTENT)
+ return(0);
+
+ while (!r && (unsolicited_type > 0)) {
+ switch (unsolicited_type) {
+ case 4:
+ /* New Sieve script */
+ c = getastring(fromserver, toserver, &name);
+ if (c != ' ') goto parse_err;
+ c = getastring(fromserver, toserver, &time);
+ if (c == ' ') {
+ c = getastring(fromserver, toserver, &flag);
+ if (!strcmp(flag.s, "*"))
+ active = 1;
+ } else
+ active = 0;
+
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') goto parse_err;
+ sync_sieve_list_add(server_sieve_list,
+ name.s, atoi(time.s), active);
+ break;
+ case 3:
+ /* New subscription */
+ c = getastring(fromserver, toserver, &name);
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') goto parse_err;
+ sync_folder_list_add(server_sub_list, name.s, name.s, NULL, NULL);
+ break;
+ case 2:
+ /* New folder */
+ if ((c = getword(fromserver, &id)) != ' ')
+ goto parse_err;
+
+ if ((c = getastring(fromserver, toserver, &name)) != ' ')
+ goto parse_err;
+
+ if ((c = getastring(fromserver, toserver, &acl)) != ' ')
+ goto parse_err;
+
+ c = getastring(fromserver, toserver, &lastuid);
+
+ quotap = NULL;
+ if (c == ' ') {
+ c = getword(fromserver, &arg);
+ quota.limit = atoi(arg.s);
+ quotap = "a;
+ }
+
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') goto parse_err;
+ if (!imparse_isnumber(lastuid.s)) goto parse_err;
+
+ folder = sync_folder_list_add(server_list, id.s, name.s, acl.s,
+ quotap);
+ folder->msglist = sync_msg_list_create(NULL, sync_atoul(lastuid.s));
+ break;
+ case 1:
+ /* New message in current folder */
+ if (folder == NULL) goto parse_err; /* No current folder */
+ msg = sync_msg_list_add(folder->msglist);
+
+ if (((c = getword(fromserver, &arg)) != ' ') ||
+ ((msg->uid = sync_atoul(arg.s)) == 0)) goto parse_err;
+
+ if (((c = getword(fromserver, &arg)) != ' ')) goto parse_err;
+
+ if (!message_uuid_from_text(&msg->uuid, arg.s))
+ goto parse_err;
+
+ c = sync_getflags(fromserver, &msg->flags, &folder->msglist->meta);
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') goto parse_err;
+ break;
+ default:
+ goto parse_err;
+ }
+
+ r = sync_parse_code("USER", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited_type);
+ }
+
+ return(r);
+
+ parse_err:
+ syslog(LOG_ERR, "USER: Invalid type %d response from server",
+ unsolicited_type);
+ sync_eatlines_unsolicited(fromserver, c);
+ return(IMAP_PROTOCOL_ERROR);
+}
+
+int do_user_work(char *user, int *vanishedp)
+{
+ char buf[MAX_MAILBOX_NAME+1];
+ int r = 0, mailbox_open = 0;
+ struct sync_folder_list *server_list = sync_folder_list_create();
+ struct sync_folder_list *server_sub_list = sync_folder_list_create();
+ struct sync_sieve_list *server_sieve_list = sync_sieve_list_create();
+ struct mailbox m;
+ struct sync_folder *folder2;
+
+ if (verbose)
+ printf("USER %s\n", user);
+
+ if (verbose_logging)
+ syslog(LOG_INFO, "USER %s", user);
+
+ (sync_namespace.mboxname_tointernal)(&sync_namespace, "INBOX",
+ user, buf);
+ r = mailbox_open_header(buf, 0, &m);
+ if (r == IMAP_MAILBOX_NONEXISTENT) {
+ /* user has been removed, RESET server */
+ r = user_reset(user);
+ goto bail;
+ }
+ if (!r) mailbox_open = 1;
+ if (!r) r = mailbox_open_index(&m);
+
+ if (r) {
+ if (mailbox_open) mailbox_close(&m);
+ syslog(LOG_ERR, "IOERROR: Failed to open %s: %s",
+ buf, error_message(r));
+ r = IMAP_IOERROR;
+ goto bail;
+ }
+
+ /* Get server started */
+ do_user_start(user);
+
+ /* Preload data at client end while server is working */
+ do_user_preload(user);
+
+ r = do_user_parse(user, server_list, server_sub_list, server_sieve_list);
+
+ if (r) {
+ sync_folder_list_free(&server_list);
+ sync_folder_list_free(&server_sub_list);
+ return(r);
+ }
+
+ /* Reset target account entirely if uniqueid of inbox doesn't match
+ * (Most likely reason is that source account has been replaced)
+ * Also if mailbox doesn't exist at all on target.
+ */
+ if (((folder2 = sync_folder_lookup_byname(server_list, m.name)) == NULL) ||
+ (strcmp(m.uniqueid, folder2->id) != 0)) {
+ r = user_reset(user);
+
+ /* Reset local copies */
+ sync_folder_list_free(&server_list);
+ sync_folder_list_free(&server_sub_list);
+ server_list = sync_folder_list_create();
+ server_sub_list = sync_folder_list_create();
+ }
+
+ mailbox_close(&m);
+
+ if (!r) r = do_user_main(user, server_list, vanishedp);
+ if (!r) r = do_user_sub(user, server_sub_list);
+ if (!r) r = do_user_seen(user);
+ if (!r) r = do_user_sieve(user, server_sieve_list);
+
+ bail:
+ sync_folder_list_free(&server_list);
+ sync_folder_list_free(&server_sub_list);
+ sync_sieve_list_free(&server_sieve_list);
+ return(r);
+}
+
+static int do_user(char *user)
+{
+ struct sync_lock lock;
+ int r = 0;
+ int vanished = 0;
+
+ /* Most of the time we don't need locking here: rename (the only
+ * complicated case) is pretty rare, especially in the middle of the
+ * night, which is when most of this will be going on */
+ r = do_user_work(user, &vanished);
+
+ /* Complication: monthly folder rotation causes rapid rename+create.
+ *
+ * mailbox_open_header() and mailbox_open_index() bail out with
+ * IMAP_MAILBOX_BADFORMAT if they try to open a mailbox which is
+ * currently in the process of being created. This is a nasty race
+ * condition which imapd just ignores (presumably on the principle that
+ * rapid rename+create+select would be very rare in normal use).
+ *
+ * We could solve this problem by putting a sync_lock() around
+ * _every_ single replication operation, but this is tedious and would
+ * probably involve quite a lot of overhead. As an experiment
+ * catch IMAP_MAILBOX_BADFORMAT and have another go while locking out
+ * user access to the mboxlist.
+ */
+
+ if (r == IMAP_MAILBOX_BADFORMAT)
+ syslog(LOG_ERR,
+ "do_user() IMAP_MAILBOX_BADFORMAT: retrying with snapshot");
+
+ if ((r == IMAP_MAILBOX_BADFORMAT) || (vanished > 0)) {
+ /* (vanished > 0): If we lost a folder in transit, lock the user
+ * out of mboxlist for a few seconds while we retry. Will be a NOOP
+ * if folder actually was deleted during do_user_work run.
+ * Following just protects us against folder rename smack in the
+ * middle of night or manual sys. admin inspired sync run */
+
+ sync_lock_reset(&lock);
+ sync_lock(&lock);
+ r = do_user_work(user, &vanished);
+ sync_unlock(&lock);
+ }
+ return(r);
+}
+
+/* ====================================================================== */
+
+static int do_meta_sub(char *user)
+{
+ int unsolicited, c, r = 0;
+ static struct buf name;
+ struct sync_folder_list *server_list = sync_folder_list_create();
+
+ prot_printf(toserver, "LSUB ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+ r=sync_parse_code("LSUB",fromserver, SYNC_PARSE_EAT_OKLINE, &unsolicited);
+
+ while (!r && unsolicited) {
+ c = getastring(fromserver, toserver, &name);
+
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') {
+ syslog(LOG_ERR, "LSUB: Invalid type %d response from server: %s",
+ unsolicited, name.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ r = IMAP_PROTOCOL_ERROR;
+ break;
+ }
+ sync_folder_list_add(server_list, name.s, name.s, NULL, NULL);
+
+ r = sync_parse_code("LSUB", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited);
+ }
+
+ if (!r) r = do_user_sub(user, server_list);
+
+ sync_folder_list_free(&server_list);
+ return(r);
+}
+
+static int do_meta_sieve(char *user)
+{
+ int unsolicited, c, r = 0;
+ static struct buf name;
+ static struct buf time;
+ static struct buf flag;
+ struct sync_sieve_list *server_list = sync_sieve_list_create();
+ int active = 0;
+
+ prot_printf(toserver, "LIST_SIEVE ");
+ sync_printastring(toserver, user);
+ prot_printf(toserver, "\r\n");
+ prot_flush(toserver);
+ r=sync_parse_code("LIST_SIEVE",
+ fromserver, SYNC_PARSE_EAT_OKLINE, &unsolicited);
+
+ while (!r && unsolicited) {
+ c = getastring(fromserver, toserver, &name);
+
+ if (c != ' ') {
+ syslog(LOG_ERR,
+ "LIST_SIEVE: Invalid name response from server: %s",
+ name.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ r = IMAP_PROTOCOL_ERROR;
+ break;
+ }
+ c = getastring(fromserver, toserver, &time);
+
+ if (c == ' ') {
+ c = getastring(fromserver, toserver, &flag);
+ if (!strcmp(flag.s, "*"))
+ active = 1;
+ } else
+ active = 0;
+
+ if (c == '\r') c = prot_getc(fromserver);
+ if (c != '\n') {
+ syslog(LOG_ERR,
+ "LIST_SIEVE: Invalid flag response from server: %s",
+ flag.s);
+ sync_eatlines_unsolicited(fromserver, c);
+ r = IMAP_PROTOCOL_ERROR;
+ break;
+ }
+ sync_sieve_list_add(server_list, name.s, atoi(time.s), active);
+
+ r = sync_parse_code("LIST_SIEVE", fromserver,
+ SYNC_PARSE_EAT_OKLINE, &unsolicited);
+ }
+ if (r) {
+ sync_sieve_list_free(&server_list);
+ return(IMAP_IOERROR);
+ }
+
+ r = do_user_sieve(user, server_list);
+
+ sync_sieve_list_free(&server_list);
+ return(r);
+}
+
+static int do_sieve(char *user)
+{
+ int r = 0;
+
+ r = do_meta_sieve(user);
+
+ return(r);
+}
+
+static int do_meta(char *user)
+{
+ int r = 0;
+
+ if (verbose)
+ printf("META %s\n", user);
+
+ if (verbose_logging)
+ syslog(LOG_INFO, "META %s", user);
+
+ if (!r) r = do_meta_sub(user);
+ if (!r) r = do_user_seen(user);
+ if (!r) r = do_meta_sieve(user);
+
+ return(r);
+}
+
+/* ====================================================================== */
+
+static void remove_meta(char *user, struct sync_action_list *list)
+{
+ struct sync_action *action;
+
+ for (action = list->head ; action ; action = action->next) {
+ if (!strcmp(user, action->user)) {
+ action->active = 0;
+ }
+ }
+}
+
+static void remove_folder(char *name, struct sync_action_list *list,
+ int chk_child)
+{
+ struct sync_action *action;
+ size_t len = strlen(name);
+
+ for (action = list->head ; action ; action = action->next) {
+ if (!strncmp(name, action->name, len) &&
+ ((action->name[len] == '\0') ||
+ (chk_child && (action->name[len] == '.')))) {
+ action->active = 0;
+ }
+ }
+}
+
+/* ====================================================================== */
+
+#define SYNC_MAILBOX_RETRIES 3
+
+static int do_sync(const char *filename)
+{
+ struct sync_user_list *user_folder_list = sync_user_list_create();
+ struct sync_user *user;
+ struct sync_action_list *user_list = sync_action_list_create();
+ struct sync_action_list *meta_list = sync_action_list_create();
+ struct sync_action_list *sieve_list = sync_action_list_create();
+ struct sync_action_list *mailbox_list= sync_action_list_create();
+ struct sync_action_list *append_list = sync_action_list_create();
+ struct sync_action_list *acl_list = sync_action_list_create();
+ struct sync_action_list *quota_list = sync_action_list_create();
+ struct sync_action_list *annot_list = sync_action_list_create();
+ struct sync_action_list *seen_list = sync_action_list_create();
+ struct sync_action_list *sub_list = sync_action_list_create();
+ struct sync_action_list *unsub_list = sync_action_list_create();
+ struct sync_folder_list *folder_list = sync_folder_list_create();
+ static struct buf type, arg1, arg2;
+ char *arg1s, *arg2s;
+ char *userid;
+ struct sync_action *action;
+ int c;
+ int fd;
+ struct protstream *input;
+ int r = 0;
+
+ if ((filename == NULL) || !strcmp(filename, "-"))
+ fd = 0;
+ else {
+ if ((fd = open(filename, O_RDWR)) < 0) {
+ syslog(LOG_ERR, "Failed to open %s: %m", filename);
+ return(IMAP_IOERROR);
+ }
+
+ if (lock_blocking(fd) < 0) {
+ syslog(LOG_ERR, "Failed to lock %s: %m", filename);
+ return(IMAP_IOERROR);
+ }
+ }
+
+ input = prot_new(fd, 0);
+
+ while (1) {
+ if ((c = getword(input, &type)) == EOF)
+ break;
+
+ /* Ignore blank lines */
+ if (c == '\r') c = prot_getc(input);
+ if (c == '\n')
+ continue;
+
+ if (c != ' ') {
+ syslog(LOG_ERR, "Invalid input");
+ eatline(input, c);
+ continue;
+ }
+
+ if ((c = getastring(input, 0, &arg1)) == EOF)
+ break;
+ arg1s = arg1.s;
+
+ if (c == ' ') {
+ if ((c = getastring(input, 0, &arg2)) == EOF)
+ break;
+ arg2s = arg2.s;
+
+ } else
+ arg2s = NULL;
+
+ if (c == '\r') c = prot_getc(input);
+ if (c != '\n') {
+ syslog(LOG_ERR, "Garbage at end of input line");
+ eatline(input, c);
+ continue;
+ }
+
+ ucase(type.s);
+
+ if (!strcmp(type.s, "USER"))
+ sync_action_list_add(user_list, NULL, arg1s);
+ else if (!strcmp(type.s, "META"))
+ sync_action_list_add(meta_list, NULL, arg1s);
+ else if (!strcmp(type.s, "SIEVE"))
+ sync_action_list_add(meta_list, NULL, arg1s);
+ else if (!strcmp(type.s, "MAILBOX"))
+ sync_action_list_add(mailbox_list, arg1s, NULL);
+ else if (!strcmp(type.s, "APPEND"))
+ sync_action_list_add(append_list, arg1s, NULL);
+ else if (!strcmp(type.s, "ACL"))
+ sync_action_list_add(acl_list, arg1s, NULL);
+ else if (!strcmp(type.s, "QUOTA"))
+ sync_action_list_add(quota_list, arg1s, NULL);
+ else if (!strcmp(type.s, "ANNOTATION"))
+ sync_action_list_add(annot_list, arg1s, NULL);
+ else if (!strcmp(type.s, "SEEN"))
+ sync_action_list_add(seen_list, arg2s, arg1s);
+ else if (!strcmp(type.s, "SUB"))
+ sync_action_list_add(sub_list, arg2s, arg1s);
+ else if (!strcmp(type.s, "UNSUB"))
+ sync_action_list_add(unsub_list, arg2s, arg1s);
+ else
+ syslog(LOG_ERR, "Unknown action type: %s", type.s);
+ }
+
+ /* Optimise out redundant clauses */
+
+ for (action = user_list->head ; action ; action = action->next) {
+ char inboxname[MAX_MAILBOX_NAME+1];
+
+ /* USER action overrides any MAILBOX, APPEND, ACL, QUOTA, ANNOTATION action on
+ any of the user's mailboxes or any META, SIEVE, SEEN, SUB, UNSUB
+ action for same user */
+ (sync_namespace.mboxname_tointernal)(&sync_namespace, "INBOX",
+ action->user, inboxname);
+ remove_folder(inboxname, mailbox_list, 1);
+ remove_folder(inboxname, append_list, 1);
+ remove_folder(inboxname, acl_list, 1);
+ remove_folder(inboxname, quota_list, 1);
+ remove_folder(inboxname, annot_list, 1);
+ remove_meta(action->user, meta_list);
+ remove_meta(action->user, sieve_list);
+ remove_meta(action->user, seen_list);
+ remove_meta(action->user, sub_list);
+ remove_meta(action->user, unsub_list);
+ }
+
+ for (action = meta_list->head ; action ; action = action->next) {
+ /* META action overrides any user SIEVE, SEEN, SUB, UNSUB action
+ for same user */
+ remove_meta(action->user, sieve_list);
+ remove_meta(action->user, seen_list);
+ remove_meta(action->user, sub_list);
+ remove_meta(action->user, unsub_list);
+ }
+
+ for (action = mailbox_list->head ; action ; action = action->next) {
+ /* MAILBOX action overrides any APPEND, ACL, QUOTA, ANNOTATION action
+ on same mailbox */
+ remove_folder(action->name, append_list, 0);
+ remove_folder(action->name, acl_list, 0);
+ remove_folder(action->name, quota_list, 0);
+ remove_folder(action->name, annot_list, 0);
+ }
+
+ /* Create a lock for our transaction */
+ if ((r = send_lock())) goto cleanup;
+
+ /* And then run tasks. */
+ for (action = append_list->head ; action ; action = action->next) {
+ if (!action->active)
+ continue;
+
+ if (do_append(action->name)) {
+ sync_action_list_add(mailbox_list, action->name, NULL);
+ if (verbose) {
+ printf(" Promoting: APPEND %s -> MAILBOX %s\n",
+ action->name, action->name);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: APPEND %s -> MAILBOX %s",
+ action->name, action->name);
+ }
+ }
+ }
+
+ for (action = acl_list->head ; action ; action = action->next) {
+ if (action->active && do_acl(action->name)) {
+ sync_action_list_add(mailbox_list, action->name, NULL);
+ if (verbose) {
+ printf(" Promoting: ACL %s -> MAILBOX %s\n",
+ action->name, action->name);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: ACL %s -> MAILBOX %s",
+ action->name, action->name);
+ }
+ }
+ }
+
+ for (action = quota_list->head ; action ; action = action->next) {
+ if (action->active && do_quota(action->name)) {
+ sync_action_list_add(mailbox_list, action->name, NULL);
+ if (verbose) {
+ printf(" Promoting: QUOTA %s -> MAILBOX %s\n",
+ action->name, action->name);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: QUOTA %s -> MAILBOX %s",
+ action->name, action->name);
+ }
+ }
+ }
+
+ for (action = annot_list->head ; action ; action = action->next) {
+ if (action->active && do_annotation(action->name) && *action->name) {
+ sync_action_list_add(mailbox_list, action->name, NULL);
+ if (verbose) {
+ printf(" Promoting: ANNOTATION %s -> MAILBOX %s\n",
+ action->name, action->name);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: ANNOTATION %s -> MAILBOX %s",
+ action->name, action->name);
+ }
+ }
+ }
+
+ for (action = sieve_list->head ; action ; action = action->next) {
+ if (action->active && do_sieve(action->user)) {
+ sync_action_list_add(meta_list, NULL, action->user);
+ if (verbose) {
+ printf(" Promoting: SIEVE %s -> META %s\n",
+ action->user, action->user);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: SIEVE %s -> META %s",
+ action->user, action->user);
+ }
+ }
+ }
+
+ for (action = seen_list->head ; action ; action = action->next) {
+ if (action->active && do_seen(action->user, action->name)) {
+ char *userid = mboxname_isusermailbox(action->name, 1);
+ if (userid && !strcmp(userid, action->user)) {
+ sync_action_list_add(user_list, NULL, action->user);
+ if (verbose) {
+ printf(" Promoting: SEEN %s %s -> USER %s\n",
+ action->user, action->name, action->user);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: SEEN %s %s -> USER %s",
+ action->user, action->name, action->user);
+ }
+ } else {
+ sync_action_list_add(meta_list, NULL, action->user);
+ if (verbose) {
+ printf(" Promoting: SEEN %s %s -> META %s\n",
+ action->user, action->name, action->user);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: SEEN %s %s -> META %s",
+ action->user, action->name, action->user);
+ }
+ }
+ }
+ }
+
+ for (action = sub_list->head ; action ; action = action->next) {
+ if (action->active && user_addsub(action->user, action->name)) {
+ sync_action_list_add(meta_list, NULL, action->user);
+ if (verbose) {
+ printf(" Promoting: SUB %s %s -> META %s\n",
+ action->user, action->name, action->user);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: SUB %s %s -> META %s",
+ action->user, action->name, action->name);
+ }
+ }
+ }
+
+ for (action = unsub_list->head ; action ; action = action->next) {
+ if (action->active && user_delsub(action->user, action->name)) {
+ sync_action_list_add(meta_list, NULL, action->user);
+ if (verbose) {
+ printf(" Promoting: UNSUB %s %s -> META %s\n",
+ action->user, action->name, action->user);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: UNSUB %s %s -> META %s",
+ action->user, action->name, action->name);
+ }
+ }
+ }
+ for (action = mailbox_list->head ; action ; action = action->next) {
+ if (!action->active)
+ continue;
+
+ sync_folder_list_add(folder_list, NULL, action->name, NULL, NULL);
+ }
+
+ if (folder_list->count) {
+ int n = 0;
+ do {
+ sleep(n*2); /* XXX should this be longer? */
+ r = do_mailboxes(folder_list);
+ if (r) {
+ /* promote failed personal mailboxes to USER */
+ struct sync_folder *folder;
+ char *userid, *p;
+
+ for (folder = folder_list->head; folder && folder->mark;
+ folder = folder->next);
+ if (folder &&
+ (userid = xstrdup(mboxname_isusermailbox(folder->name, 0)))) {
+ if ((p = strchr(userid, '.'))) *p = '\0';
+ folder->mark = 1;
+ if (--folder_list->count == 0) r = 0;
+
+ sync_action_list_add(user_list, NULL, userid);
+ if (verbose) {
+ printf(" Promoting: MAILBOX %s -> USER %s\n",
+ folder->name, userid);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: MAILBOX %s -> USER %s",
+ folder->name, userid);
+ }
+ free(userid);
+ }
+ }
+ } while (r && (++n < SYNC_MAILBOX_RETRIES));
+
+ if (r) goto bail;
+ }
+
+ for (action = meta_list->head ; action ; action = action->next) {
+ if (action->active && (r=do_meta(action->user))) {
+ if (r == IMAP_INVALID_USER) goto bail;
+
+ sync_action_list_add(user_list, NULL, action->user);
+ if (verbose) {
+ printf(" Promoting: META %s -> USER %s\n",
+ action->user, action->user);
+ }
+ if (verbose_logging) {
+ syslog(LOG_INFO, " Promoting: META %s -> USER %s",
+ action->user, action->user);
+ }
+ }
+ }
+
+ for (action = user_list->head ; action ; action = action->next) {
+ int n = 0;
+ do {
+ sleep(n*2); /* XXX should this be longer? */
+ r = do_user(action->user);
+ } while (r && (++n < SYNC_MAILBOX_RETRIES));
+
+ if (r) goto bail;
+ }
+
+ bail:
+ send_unlock();
+
+ cleanup:
+ if (r) {
+ if (verbose)
+ fprintf(stderr, "Error in do_sync(): bailing out!\n");
+
+ syslog(LOG_ERR, "Error in do_sync(): bailing out!");
+ }
+
+ sync_user_list_free(&user_folder_list);
+ sync_action_list_free(&user_list);
+ sync_action_list_free(&meta_list);
+ sync_action_list_free(&sieve_list);
+ sync_action_list_free(&mailbox_list);
+ sync_action_list_free(&append_list);
+ sync_action_list_free(&acl_list);
+ sync_action_list_free("a_list);
+ sync_action_list_free(&annot_list);
+ sync_action_list_free(&seen_list);
+ sync_action_list_free(&sub_list);
+ sync_action_list_free(&unsub_list);
+ sync_folder_list_free(&folder_list);
+
+ prot_free(input);
+ close(fd);
+
+ return(r);
+}
+
+/* ====================================================================== */
+
+int do_daemon_work(const char *sync_log_file, const char *sync_shutdown_file,
+ unsigned long timeout, unsigned long min_delta,
+ int *restartp)
+{
+ int r = 0;
+ char *work_file_name;
+ time_t session_start;
+ time_t single_start;
+ int delta;
+ struct stat sbuf;
+
+ *restartp = 0;
+
+ work_file_name = xmalloc(strlen(sync_log_file)+20);
+ snprintf(work_file_name, strlen(sync_log_file)+20,
+ "%s-%d", sync_log_file, getpid());
+
+ session_start = time(NULL);
+
+ while (1) {
+ single_start = time(NULL);
+
+ if (sync_shutdown_file && !stat(sync_shutdown_file, &sbuf)) {
+ unlink(sync_shutdown_file);
+ break;
+ }
+
+ if ((timeout > 0) && ((single_start - session_start) > timeout)) {
+ *restartp = 1;
+ break;
+ }
+
+ if (stat(sync_log_file, &sbuf) < 0) {
+ if (min_delta > 0) {
+ sleep(min_delta);
+ } else {
+ usleep(100000); /* 1/10th second */
+ }
+ continue;
+ }
+
+ if (rename(sync_log_file, work_file_name) < 0) {
+ syslog(LOG_ERR, "Rename %s -> %s failed: %m",
+ sync_log_file, work_file_name);
+ exit(1);
+ }
+
+ if ((r=do_sync(work_file_name)))
+ return(r);
+
+ if (unlink(work_file_name) < 0) {
+ syslog(LOG_ERR, "Unlink %s failed: %m", work_file_name);
+ exit(1);
+ }
+ delta = time(NULL) - single_start;
+
+ if ((delta < min_delta) && ((min_delta-delta) > 0))
+ sleep(min_delta-delta);
+ }
+ free(work_file_name);
+
+ if (*restartp == 0)
+ return(0);
+
+ prot_printf(toserver, "RESTART\r\n");
+ prot_flush(toserver);
+
+ r = sync_parse_code("RESTART", fromserver, SYNC_PARSE_EAT_OKLINE, NULL);
+
+ if (r)
+ syslog(LOG_ERR, "sync_client RESTART failed");
+ else
+ syslog(LOG_INFO, "sync_client RESTART succeeded");
+
+ return(r);
+}
+
+struct backend *replica_connect(struct backend *be, const char *servername,
+ sasl_callback_t *cb)
+{
+ int wait;
+
+ for (wait = 15;; wait *= 2) {
+ be = backend_connect(be, servername, &protocol[PROTOCOL_CSYNC],
+ "", cb, NULL);
+
+ if (be || wait > 1000) break;
+
+ fprintf(stderr,
+ "Can not connect to server '%s', retrying in %d seconds\n",
+ servername, wait);
+ sleep(wait);
+ }
+
+ return be;
+}
+
+void do_daemon(const char *sync_log_file, const char *sync_shutdown_file,
+ unsigned long timeout, unsigned long min_delta,
+ struct backend *be, sasl_callback_t *cb)
+{
+ int r = 0;
+ pid_t pid;
+ int status;
+ int restart;
+
+ /* for a child so we can release from master */
+ if ((pid=fork()) < 0)
+ fatal("fork failed", EC_SOFTWARE);
+
+ if (pid != 0) { /* parent */
+ cyrus_done();
+ exit(0);
+ }
+ /* child */
+
+ if (timeout == 0) {
+ do_daemon_work(sync_log_file, sync_shutdown_file,
+ timeout, min_delta, &restart);
+ return;
+ }
+
+ do {
+ if ((pid=fork()) < 0)
+ fatal("fork failed", EC_SOFTWARE);
+
+ if (pid == 0) {
+ if (be->sock == -1) {
+ /* Reopen up connection to server */
+ be = replica_connect(be, be->hostname, cb);
+
+ if (!be) {
+ fprintf(stderr, "Can not connect to server '%s'\n",
+ be->hostname);
+ _exit(1);
+ }
+
+ /* XXX hack. should just pass 'be' around */
+ fromserver = be->in;
+ toserver = be->out;
+ }
+
+ r = do_daemon_work(sync_log_file, sync_shutdown_file,
+ timeout, min_delta, &restart);
+
+ if (r) _exit(1);
+ if (restart) _exit(EX_TEMPFAIL);
+ _exit(0);
+ }
+ if (waitpid(pid, &status, 0) < 0)
+ fatal("waitpid failed", EC_SOFTWARE);
+ backend_disconnect(be);
+ } while (WIFEXITED(status) && (WEXITSTATUS(status) == EX_TEMPFAIL));
+}
+
+/* ====================================================================== */
+
+static struct sasl_callback mysasl_cb[] = {
+ { SASL_CB_GETOPT, &mysasl_config, NULL },
+ { SASL_CB_CANON_USER, &mysasl_canon_user, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+enum {
+ MODE_UNKNOWN = -1,
+ MODE_REPEAT,
+ MODE_USER,
+ MODE_MAILBOX,
+ MODE_SIEVE
+};
+
+int main(int argc, char **argv)
+{
+ int opt, i = 0;
+ char *alt_config = NULL;
+ char *input_filename = NULL;
+ const char *servername = NULL;
+ int r = 0;
+ int exit_rc = 0;
+ int mode = MODE_UNKNOWN;
+ int wait = 0;
+ int timeout = 600;
+ int min_delta = 0;
+ const char *sync_host = NULL;
+ char sync_log_file[MAX_MAILBOX_PATH+1];
+ const char *sync_shutdown_file = NULL;
+ char buf[512];
+ FILE *file;
+ int len;
+ struct backend *be = NULL;
+ sasl_callback_t *cb;
+
+ /* Global list */
+ msgid_onserver = sync_msgid_list_create(SYNC_MSGID_LIST_HASH_SIZE);
+
+ if(geteuid() == 0)
+ fatal("must run as the Cyrus user", EC_USAGE);
+
+ setbuf(stdout, NULL);
+
+ while ((opt = getopt(argc, argv, "C:vlS:F:f:w:t:d:rums")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'v': /* verbose */
+ verbose++;
+ break;
+
+ case 'l': /* verbose Logging */
+ verbose_logging++;
+ break;
+
+ case 'S': /* Socket descriptor for server */
+ servername = optarg;
+ break;
+
+ case 'F': /* Shutdown file */
+ sync_shutdown_file = optarg;
+ break;
+
+ case 'f': /* input_filename used by user and mailbox modes; OR
+ alternate sync_log_file used by single-run repeat mode */
+ input_filename = optarg;
+ break;
+
+ case 'w':
+ wait = atoi(optarg);
+ break;
+
+ case 't':
+ timeout = atoi(optarg);
+ break;
+
+ case 'd':
+ min_delta = atoi(optarg);
+ break;
+
+ case 'r':
+ if (mode != MODE_UNKNOWN)
+ fatal("Mutually exclusive options defined", EC_USAGE);
+ mode = MODE_REPEAT;
+ break;
+
+ case 'u':
+ if (mode != MODE_UNKNOWN)
+ fatal("Mutually exclusive options defined", EC_USAGE);
+ mode = MODE_USER;
+ break;
+
+ case 'm':
+ if (mode != MODE_UNKNOWN)
+ fatal("Mutually exclusive options defined", EC_USAGE);
+ mode = MODE_MAILBOX;
+ break;
+
+ case 's':
+ if (mode != MODE_UNKNOWN)
+ fatal("Mutually exclusive options defined", EC_USAGE);
+ mode = MODE_SIEVE;
+ break;
+
+ default:
+ usage("sync_client");
+ }
+ }
+
+ if (mode == MODE_UNKNOWN)
+ fatal("No replication mode specified", EC_USAGE);
+
+ cyrus_init(alt_config, "sync_client", 0);
+
+ if (!servername &&
+ !(servername = config_getstring(IMAPOPT_SYNC_HOST))) {
+ fatal("sync_host not defined", EC_SOFTWARE);
+ }
+
+ /* Just to help with debugging, so we have time to attach debugger */
+ if (wait > 0) {
+ fprintf(stderr, "Waiting for %d seconds for gdb attach...\n", wait);
+ sleep(wait);
+ }
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(&sync_namespace, 1)) != 0) {
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ /* open the mboxlist, we'll need it for real work */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+ mailbox_initialize();
+
+ /* open the quota db, we'll need it for real work */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ /* open the annotation db */
+ annotatemore_init(0, NULL, NULL);
+ annotatemore_open(NULL);
+
+ signals_set_shutdown(&shut_down);
+ signals_add_handlers(0);
+
+ /* load the SASL plugins */
+ global_sasl_init(1, 0, mysasl_cb);
+
+ cb = mysasl_callbacks(NULL,
+ config_getstring(IMAPOPT_SYNC_AUTHNAME),
+ config_getstring(IMAPOPT_SYNC_REALM),
+ config_getstring(IMAPOPT_SYNC_PASSWORD));
+
+ /* Open up connection to server */
+ be = replica_connect(NULL, servername, cb);
+
+ if (!be) {
+ fprintf(stderr, "Can not connect to server '%s'\n", servername);
+ exit(1);
+ }
+
+ /* XXX hack. should just pass 'be' around */
+ fromserver = be->in;
+ toserver = be->out;
+
+ switch (mode) {
+ case MODE_USER:
+ if (input_filename) {
+ if ((file=fopen(input_filename, "r")) == NULL) {
+ syslog(LOG_NOTICE, "Unable to open %s: %m", input_filename);
+ shut_down(1);
+ }
+ while (!r && fgets(buf, sizeof(buf), file)) {
+ /* Chomp, then ignore empty/comment lines. */
+ if (((len=strlen(buf)) > 0) && (buf[len-1] == '\n'))
+ buf[--len] = '\0';
+
+ if ((len == 0) || (buf[0] == '#'))
+ continue;
+
+ if ((r = send_lock())) {
+ if (verbose) {
+ fprintf(stderr,
+ "Error from send_lock(): bailing out!\n");
+ }
+ exit_rc = 1;
+ }
+ else {
+ if (do_user(buf)) {
+ if (verbose)
+ fprintf(stderr,
+ "Error from do_user(%s): bailing out!\n",
+ buf);
+ syslog(LOG_ERR, "Error in do_user(%s): bailing out!",
+ buf);
+ exit_rc = 1;
+ }
+ send_unlock();
+ }
+ }
+ fclose(file);
+ } else for (i = optind; !r && i < argc; i++) {
+ if ((r = send_lock())) {
+ if (verbose) {
+ fprintf(stderr,
+ "Error from send_lock(): bailing out!\n");
+ }
+ exit_rc = 1;
+ }
+ else {
+ if (do_user(argv[i])) {
+ if (verbose)
+ fprintf(stderr, "Error from do_user(%s): bailing out!\n",
+ argv[1]);
+ syslog(LOG_ERR, "Error in do_user(%s): bailing out!", argv[i]);
+ exit_rc = 1;
+ }
+ send_unlock();
+ }
+ }
+ break;
+
+ case MODE_MAILBOX:
+ {
+ struct sync_folder_list *folder_list = sync_folder_list_create();
+ struct sync_user *user;
+ char *s, *t;
+
+ if (input_filename) {
+ if ((file=fopen(input_filename, "r")) == NULL) {
+ syslog(LOG_NOTICE, "Unable to open %s: %m", input_filename);
+ shut_down(1);
+ }
+ while (fgets(buf, sizeof(buf), file)) {
+ /* Chomp, then ignore empty/comment lines. */
+ if (((len=strlen(buf)) > 0) && (buf[len-1] == '\n'))
+ buf[--len] = '\0';
+
+ if ((len == 0) || (buf[0] == '#'))
+ continue;
+
+ if (!sync_folder_lookup_byname(folder_list, argv[i]))
+ sync_folder_list_add(folder_list,
+ NULL, argv[i], NULL, NULL);
+ }
+ fclose(file);
+ } else for (i = optind; i < argc; i++) {
+ if (!sync_folder_lookup_byname(folder_list, argv[i]))
+ sync_folder_list_add(folder_list, NULL, argv[i], NULL, NULL);
+ }
+
+ if ((r = send_lock())) {
+ if (verbose) {
+ fprintf(stderr,
+ "Error from send_lock(): bailing out!\n");
+ }
+ syslog(LOG_ERR, "Error in send_lock(): bailing out!");
+ exit_rc = 1;
+ } else {
+ if (do_mailboxes(folder_list)) {
+ if (verbose) {
+ fprintf(stderr,
+ "Error from do_mailboxes(): bailing out!\n");
+ }
+ syslog(LOG_ERR, "Error in do_mailboxes(): bailing out!");
+ exit_rc = 1;
+ }
+ send_unlock();
+ }
+
+ sync_folder_list_free(&folder_list);
+ }
+ break;
+
+ case MODE_SIEVE:
+ for (i = optind; !r && i < argc; i++) {
+ if ((r = send_lock())) {
+ if (verbose) {
+ fprintf(stderr,
+ "Error from send_lock(): bailing out!\n");
+ }
+ syslog(LOG_ERR, "Error in send_lock(): bailing out!");
+ exit_rc = 1;
+ }
+ else {
+ if (do_sieve(argv[i])) {
+ if (verbose) {
+ fprintf(stderr,
+ "Error from do_sieve(%s): bailing out!\n",
+ argv[i]);
+ }
+ syslog(LOG_ERR, "Error in do_sieve(%s): bailing out!",
+ argv[i]);
+ exit_rc = 1;
+ }
+ send_unlock();
+ }
+ }
+ break;
+
+ case MODE_REPEAT:
+ if (input_filename) {
+ exit_rc = do_sync(input_filename);
+ }
+ else {
+ strlcpy(sync_log_file, config_dir, sizeof(sync_log_file));
+ strlcat(sync_log_file, "/sync/log", sizeof(sync_log_file));
+
+ if (!sync_shutdown_file)
+ sync_shutdown_file = config_getstring(IMAPOPT_SYNC_SHUTDOWN_FILE);
+
+ if (!min_delta)
+ min_delta = config_getint(IMAPOPT_SYNC_REPEAT_INTERVAL);
+
+ do_daemon(sync_log_file, sync_shutdown_file, timeout, min_delta,
+ be, cb);
+ }
+ break;
+
+ default:
+ if (verbose) fprintf(stderr, "Nothing to do!\n");
+ break;
+ }
+
+ sync_msgid_list_free(&msgid_onserver);
+ backend_disconnect(be);
+
+ quit:
+ shut_down(exit_rc);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,921 @@
+/* sync_commit.c -- Cyrus synchonization mailbox functions
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_commit.c,v 1.1.2.10 2006/06/13 17:24:40 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <syslog.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "global.h"
+#include "assert.h"
+#include "mboxlist.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "quota.h"
+#include "xmalloc.h"
+#include "acl.h"
+#include "seen.h"
+#include "mboxname.h"
+#include "map.h"
+#include "imapd.h"
+#include "imparse.h"
+#include "util.h"
+#include "retry.h"
+#include "sync_support.h"
+#include "sync_commit.h"
+
+/* ====================================================================== */
+
+static int
+sync_combine_commit(struct mailbox *mailbox,
+ time_t last_appenddate,
+ struct sync_upload_list *upload_list,
+ struct sync_message_list *message_list)
+{
+ char fnamebuf[MAX_MAILBOX_PATH+1], fnamebufnew[MAX_MAILBOX_PATH+1];
+ char *path;
+ FILE *newindex = NULL;
+ FILE *newcache = NULL;
+ unsigned char *buf = NULL;
+ struct sync_upload_item *item;
+ struct sync_message *message;
+ long quota_add = 0; /* Following may be negative on UUID conflict */
+ long numansweredflag = 0;
+ long numdeletedflag = 0;
+ long numflaggedflag = 0;
+ unsigned long newexists = 0;
+ unsigned long newdeleted;
+ unsigned long newanswered;
+ unsigned long newflagged;
+ unsigned long msgno;
+ char target[MAX_MAILBOX_PATH+1];
+ struct index_record record;
+ int n, r = 0, rc;
+ struct txn *tid = NULL;
+
+ if (upload_list->count == 0) return(0); /* NOOP */
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+ strlcat(fnamebuf, ".NEW", sizeof(fnamebuf));
+ newindex = fopen(fnamebuf, "w+");
+ if (!newindex) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebuf);
+ return IMAP_IOERROR;
+ }
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_CACHE)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_CACHE, sizeof(fnamebuf));
+ strlcat(fnamebuf, ".NEW", sizeof(fnamebuf));
+ newcache = fopen(fnamebuf, "w+");
+ if (!newcache) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebuf);
+ fclose(newindex);
+ return IMAP_IOERROR;
+ }
+
+ /* Copy messages into target mailfolder (blat existing messages:
+ * caused by UUID conflict on messages: sync_client wins) */
+ for (item = upload_list->head ; item ; item = item->next) {
+#if 0
+ snprintf(target, MAX_MAILBOX_PATH,
+ "%s/%lu.", mailbox->path, (unsigned long)item->uid);
+
+ if (mailbox_copyfile(item->message->msg_path, target, 0) != 0) {
+ /* Attempt undo before we bail out */
+ for (item=upload_list->head ; item != item; item = item->next)
+ unlink(item->message->msg_path);
+
+ goto fail;
+ }
+#else
+ if (sync_message_copy_fromstage(item->message, mailbox, item->uid)) {
+ goto fail;
+ }
+#endif
+ }
+
+ /* Make sure that new flag names recorded before we try to use them */
+ if (upload_list->meta.newflags) {
+ sync_flags_meta_to_list(&upload_list->meta, mailbox->flagname);
+ mailbox_write_header(mailbox);
+ }
+
+ buf = xmalloc(mailbox->start_offset > mailbox->record_size ?
+ mailbox->start_offset : mailbox->record_size);
+
+ /* Copy index header across */
+ memcpy(buf, mailbox->index_base, mailbox->start_offset);
+ (*(bit32 *)buf)++; /* Increment generation number */
+ fwrite(buf, 1, mailbox->start_offset, newindex);
+
+ /* Grow the index header if necessary */
+ for (n = mailbox->start_offset; n < INDEX_HEADER_SIZE; n++) {
+ if (n == OFFSET_UIDVALIDITY+3) {
+ putc(1, newindex);
+ } else {
+ putc(0, newindex);
+ }
+ }
+
+ /* Cache header is generation number only */
+ fwrite(buf, 1, sizeof(bit32), newcache);
+
+ item = upload_list->head;
+ msgno = 0;
+
+ if (++msgno <= mailbox->exists)
+ mailbox_read_index_record(mailbox, msgno, &record);
+
+ while (item || (msgno <= mailbox->exists)) {
+ newexists++;
+
+ if ((msgno <= mailbox->exists) &&
+ ((item == NULL) || (record.uid < item->uid))) {
+ /* Use record item from existing mailbox */
+ mailbox_index_record_to_buf(&record, buf);
+
+ /* Write out message cache and index */
+ /* Fix up cache file offset */
+ *((bit32 *)(buf+OFFSET_CACHE_OFFSET)) = htonl(ftell(newcache));
+
+ fwrite(mailbox->cache_base + record.cache_offset,
+ 1, mailbox_cache_size(mailbox, msgno), newcache);
+ fwrite(buf, 1, mailbox->record_size, newindex);
+
+ if (++msgno <= mailbox->exists)
+ mailbox_read_index_record(mailbox, msgno, &record);
+ } else {
+ /* Use List item from upload list (may replace existing msg) */
+ message = item->message;
+
+ *((bit32 *)(buf+OFFSET_UID)) = htonl(item->uid);
+ *((bit32 *)(buf+OFFSET_INTERNALDATE)) = htonl(item->internaldate);
+ *((bit32 *)(buf+OFFSET_SENTDATE)) = htonl(item->sentdate);
+ *((bit32 *)(buf+OFFSET_SIZE)) = htonl(message->msg_size);
+ *((bit32 *)(buf+OFFSET_HEADER_SIZE)) = htonl(message->hdr_size);
+ *((bit32 *)(buf+OFFSET_CONTENT_OFFSET)) = htonl(message->hdr_size);
+ *((bit32 *)(buf+OFFSET_LAST_UPDATED)) = htonl(item->last_updated);
+ *((bit32 *)(buf+OFFSET_SYSTEM_FLAGS))
+ = htonl(item->flags.system_flags);
+
+ for (n = 0; n < MAX_USER_FLAGS/32; n++) {
+ *((bit32 *)(buf+OFFSET_USER_FLAGS+4*n))
+ = htonl(item->flags.user_flags[n]);
+ }
+ *((bit32 *)(buf+OFFSET_CONTENT_LINES))
+ = htonl(message->content_lines);
+ *((bit32 *)(buf+OFFSET_CACHE_VERSION))
+ = htonl(message->cache_version);
+
+ message_uuid_pack(&item->uuid, buf+OFFSET_MESSAGE_UUID);
+ quota_add += message->msg_size;
+
+ if (item->flags.system_flags & FLAG_ANSWERED) numansweredflag++;
+ if (item->flags.system_flags & FLAG_DELETED) numdeletedflag++;
+ if (item->flags.system_flags & FLAG_FLAGGED) numflaggedflag++;
+
+ /* Write out message cache and index */
+ /* Fix up cache file offset */
+ *((bit32 *)(buf+OFFSET_CACHE_OFFSET)) = htonl(ftell(newcache));
+
+ fwrite((message_list->cache_base+message->cache_offset), 1,
+ message->cache_size, newcache);
+
+ fwrite(buf, 1, mailbox->record_size, newindex);
+
+ /* Discard existing msg on server because of UUID conflict */
+ /* Need to reclaim allocated space and resources */
+ if (record.uid == item->uid) {
+ quota_add -= record.size;
+ if (record.system_flags & FLAG_ANSWERED) numansweredflag--;
+ if (record.system_flags & FLAG_DELETED) numdeletedflag--;
+ if (record.system_flags & FLAG_FLAGGED) numflaggedflag--;
+
+ if (++msgno <= mailbox->exists)
+ mailbox_read_index_record(mailbox, msgno, &record);
+ }
+
+ item = item->next;
+ }
+ }
+
+ /* Fix up information in index header */
+ rewind(newindex);
+ n = fread(buf, 1, mailbox->start_offset, newindex);
+ if ((unsigned long)n != mailbox->start_offset) {
+ syslog(LOG_ERR, "IOERROR: reading index header for %s: got %d of %ld",
+ mailbox->name, n, mailbox->start_offset);
+ goto fail;
+ }
+
+ /* Fix up last_uid */
+ *((bit32 *)(buf+OFFSET_LAST_UID)) = htonl(upload_list->new_last_uid);
+
+ /* Fix up exists */
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(newexists);
+ /* fix up other counts */
+ newanswered = ntohl(*((bit32 *)(buf+OFFSET_ANSWERED)))+numansweredflag;
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(newanswered);
+ newdeleted = ntohl(*((bit32 *)(buf+OFFSET_DELETED)))+numdeletedflag;
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(newdeleted);
+ newflagged = ntohl(*((bit32 *)(buf+OFFSET_FLAGGED)))+numflaggedflag;
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(newflagged);
+
+ /* Fix up quota_mailbox_used */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) =
+ htonl(ntohl(*((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED))) + quota_add );
+ /* Fix up start offset if necessary */
+ if (mailbox->start_offset < INDEX_HEADER_SIZE) {
+ *((bit32 *)(buf+OFFSET_START_OFFSET)) = htonl(INDEX_HEADER_SIZE);
+ }
+
+ /* Fix up last_append time */
+ *((bit32 *)(buf+OFFSET_LAST_APPENDDATE)) = htonl(last_appenddate);
+
+ rewind(newindex);
+ fwrite(buf, 1, mailbox->start_offset, newindex);
+
+ /* Ensure everything made it to disk */
+ fflush(newindex);
+ fflush(newcache);
+ if (ferror(newindex) || ferror(newcache) ||
+ fsync(fileno(newindex)) || fsync(fileno(newcache))) {
+ syslog(LOG_ERR, "IOERROR: writing index/cache for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ /* Record quota addition */
+ if (mailbox->quota.root) {
+ r = quota_read(&mailbox->quota, &tid, 1);
+ if (!r) {
+ mailbox->quota.used += quota_add;
+ r = quota_write(&mailbox->quota, &tid);
+ if (!r) quota_commit(&tid);
+ }
+ else if (r == IMAP_QUOTAROOT_NONEXISTENT) r = 0;
+
+ if (r) {
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record add of %lu bytes in quota %s",
+ quota_add, mailbox->quota.root);
+ }
+ }
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+
+ strlcpy(fnamebufnew, fnamebuf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+ if (rename(fnamebufnew, fnamebuf)) {
+ syslog(LOG_ERR, "IOERROR: renaming index file for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files &
+ IMAP_ENUM_METAPARTITION_FILES_CACHE)) ?
+ mailbox->mpath : mailbox->path;
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_CACHE, sizeof(fnamebuf));
+
+ strlcpy(fnamebufnew, fnamebuf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+ if (rename(fnamebufnew, fnamebuf)) {
+ syslog(LOG_CRIT, ("CRITICAL IOERROR: renaming cache file for %s, "
+ "need to reconstruct: %m"), mailbox->name);
+ goto fail;
+ }
+
+ /* No more fail clauses after this point: just clean up */
+ free(buf);
+ fclose(newindex);
+ fclose(newcache);
+ return(r);
+
+ fail:
+ if (buf) free(buf);
+ if (newindex) fclose(newindex);
+ if (newcache) fclose(newcache);
+
+ return IMAP_IOERROR;
+}
+
+/* ====================================================================== */
+
+/* Couple of helper routines to clear out expunged messages that we want to
+ * upload again to resolve inconsistent state. upload_list should be in
+ * correct UID order, unsorted expunge index may be in any order (and we
+ * want to preserve that order as expunge index is FIFO list). Simplest
+ * (reasonably efficient) solution is to convert upload_list linked list
+ * into flat array of unsigned long "uid_array" and search with binary chop.
+ */
+
+struct uid_array {
+ unsigned long *array;
+ unsigned long size;
+};
+
+static struct uid_array *
+uid_array_create(struct sync_upload_list *upload_list)
+{
+ struct uid_array *uid_array;
+ struct sync_upload_item *current;
+ unsigned long *array, i, size, lastuid = 0;
+
+ uid_array = xmalloc(sizeof(struct uid_array));
+ uid_array->array = xmalloc((upload_list->count+1) * sizeof(unsigned long));
+ uid_array->size = upload_list->count;
+
+ current = upload_list->head;
+ size = uid_array->size;
+ array = uid_array->array;
+
+ for (i = 0; current && (i < size); i++, current = current->next) {
+ if ((i > 0) && (lastuid > current->uid))
+ break;
+
+ lastuid = array[i] = current->uid;
+ }
+
+ if ((current != NULL) || (i < size)) {
+ syslog(LOG_ERR, "uid_array_create(): Invalid sequence");
+ free(uid_array->array);
+ free(uid_array);
+ return(NULL);
+ }
+ uid_array->array[size] = 0;
+
+ return(uid_array);
+}
+
+static void
+uid_array_free(struct uid_array *uid_array)
+{
+ free(uid_array->array);
+ free(uid_array);
+}
+
+/* ====================================================================== */
+
+static int
+sync_append_commit(struct mailbox *mailbox,
+ time_t last_appenddate,
+ struct sync_upload_list *upload_list,
+ struct sync_message_list *message_list)
+{
+ unsigned char *index_chunk, *record;
+ unsigned char *hbuf = xmalloc(mailbox->start_offset);
+ struct iovec *cache_iovec, *cachev;
+ struct sync_upload_item *item;
+ struct sync_message *message;
+ unsigned long cache_size;
+ unsigned long quota_add = 0;
+ unsigned long numansweredflag = 0;
+ unsigned long numdeletedflag = 0;
+ unsigned long numflaggedflag = 0;
+ unsigned long newexists;
+ unsigned long newdeleted;
+ unsigned long newanswered;
+ unsigned long newflagged;
+ char target[MAX_MAILBOX_PATH];
+ int n, r = 0;
+ struct txn *tid = NULL;
+
+ if (upload_list->count == 0) return(0); /* NOOP */
+
+ /* Set up contiguous block for index append, iovec for cache append */
+ /* Record various message count deltas as we go so that we can update */
+
+ index_chunk = xzmalloc(upload_list->count * INDEX_RECORD_SIZE);
+ cache_iovec = xzmalloc(upload_list->count * sizeof(struct iovec));
+
+ record = index_chunk;
+ cachev = cache_iovec;
+
+ cache_size = mailbox->cache_size;
+
+ for (item = upload_list->head ; item ; item = item->next) {
+ message = item->message;
+
+ cachev->iov_base
+ = (char *)(message_list->cache_base + message->cache_offset);
+ cachev->iov_len = message->cache_size;
+
+ *((bit32 *)(record+OFFSET_UID)) = htonl(item->uid);
+ *((bit32 *)(record+OFFSET_INTERNALDATE)) = htonl(item->internaldate);
+ *((bit32 *)(record+OFFSET_SENTDATE)) = htonl(item->sentdate);
+ *((bit32 *)(record+OFFSET_SIZE)) = htonl(message->msg_size);
+ *((bit32 *)(record+OFFSET_HEADER_SIZE)) = htonl(message->hdr_size);
+ *((bit32 *)(record+OFFSET_CONTENT_OFFSET)) = htonl(message->hdr_size);
+ *((bit32 *)(record+OFFSET_CACHE_OFFSET)) = htonl(cache_size);
+ *((bit32 *)(record+OFFSET_LAST_UPDATED)) = htonl(item->last_updated);
+ *((bit32 *)(record+OFFSET_SYSTEM_FLAGS))
+ = htonl(item->flags.system_flags);
+
+ for (n = 0; n < MAX_USER_FLAGS/32; n++) {
+ *((bit32 *)(record+OFFSET_USER_FLAGS+4*n))
+ = htonl(item->flags.user_flags[n]);
+ }
+ *((bit32 *)(record+OFFSET_CONTENT_LINES))
+ = htonl(message->content_lines);
+ *((bit32 *)(record+OFFSET_CACHE_VERSION))
+ = htonl(message->cache_version);
+ message_uuid_pack(&item->uuid, record+OFFSET_MESSAGE_UUID);
+
+ cache_size += message->cache_size;
+ quota_add += message->msg_size;
+
+ if (item->flags.system_flags & FLAG_ANSWERED) numansweredflag++;
+ if (item->flags.system_flags & FLAG_DELETED) numdeletedflag++;
+ if (item->flags.system_flags & FLAG_FLAGGED) numflaggedflag++;
+
+ record += INDEX_RECORD_SIZE;
+ cachev++;
+ }
+
+ /* Copy messages into target mailfolder */
+ for (item = upload_list->head ; item ; item = item->next) {
+#if 0
+ snprintf(target, MAX_MAILBOX_PATH,
+ "%s/%lu.", mailbox->path, (unsigned long)item->uid);
+
+ if (mailbox_copyfile(item->message->msg_path, target, 0) != 0) {
+ /* Attempt undo before we bail out */
+ for (item = upload_list->head ; item != item; item = item->next)
+ unlink(item->message->msg_path);
+
+ goto fail;
+ }
+#else
+ if (sync_message_copy_fromstage(item->message, mailbox, item->uid)) {
+ goto fail;
+ }
+#endif
+ }
+
+ /* Make sure that new flag names recorded before we try to use them */
+ if (upload_list->meta.newflags) {
+ sync_flags_meta_to_list(&upload_list->meta, mailbox->flagname);
+ mailbox_write_header(mailbox);
+ }
+
+ /* Append to index and cache files */
+ lseek(mailbox->cache_fd, mailbox->cache_size, SEEK_SET);
+ if (retry_writev(mailbox->cache_fd, cache_iovec, upload_list->count) < 0)
+ goto fail;
+
+ lseek(mailbox->index_fd, mailbox->index_size, SEEK_SET);
+ if (retry_write(mailbox->index_fd, index_chunk,
+ upload_list->count * INDEX_RECORD_SIZE) < 0)
+ goto fail;
+
+
+ /* Critical region starts here! */
+ /* Fix up information in index header */
+ lseek(mailbox->index_fd, 0L, SEEK_SET);
+
+ n = read(mailbox->index_fd, hbuf, mailbox->start_offset);
+ if ((unsigned long)n != mailbox->start_offset) {
+ syslog(LOG_ERR,
+ "IOERROR: reading expunge index header for %s: got %d of %lu",
+ mailbox->name, n, mailbox->start_offset);
+ goto fail;
+ }
+
+ /* Fix up last_uid */
+ *((bit32 *)(hbuf+OFFSET_LAST_UID)) = htonl(upload_list->new_last_uid);
+
+ /* Fix up exists */
+ newexists = ntohl(*((bit32 *)(hbuf+OFFSET_EXISTS))) + upload_list->count;
+ *((bit32 *)(hbuf+OFFSET_EXISTS)) = htonl(newexists);
+ /* fix up other counts */
+ newanswered = ntohl(*((bit32 *)(hbuf+OFFSET_ANSWERED)))+numansweredflag;
+ *((bit32 *)(hbuf+OFFSET_ANSWERED)) = htonl(newanswered);
+ newdeleted = ntohl(*((bit32 *)(hbuf+OFFSET_DELETED)))+numdeletedflag;
+ *((bit32 *)(hbuf+OFFSET_DELETED)) = htonl(newdeleted);
+ newflagged = ntohl(*((bit32 *)(hbuf+OFFSET_FLAGGED)))+numflaggedflag;
+ *((bit32 *)(hbuf+OFFSET_FLAGGED)) = htonl(newflagged);
+
+ /* Fix up quota_mailbox_used */
+ *((bit32 *)(hbuf+OFFSET_QUOTA_MAILBOX_USED)) =
+ htonl(ntohl(*((bit32 *)(hbuf+OFFSET_QUOTA_MAILBOX_USED)))+quota_add);
+
+ /* Fix up start offset if necessary */
+ if (mailbox->start_offset < INDEX_HEADER_SIZE) {
+ *((bit32 *)(hbuf+OFFSET_START_OFFSET)) = htonl(INDEX_HEADER_SIZE);
+ }
+
+ /* Fix up last_append time */
+ *((bit32 *)(hbuf+OFFSET_LAST_APPENDDATE)) = htonl(last_appenddate);
+
+ /* And write it back out */
+ lseek(mailbox->index_fd, 0L, SEEK_SET);
+
+ n = retry_write(mailbox->index_fd, hbuf, mailbox->start_offset);
+ if ((unsigned long)n != mailbox->start_offset) {
+ syslog(LOG_ERR, "IOERROR: writing out new expunge header for %s",
+ mailbox->name);
+ goto fail;
+ }
+
+ /* Ensure everything made it to disk */
+ if (fsync(mailbox->index_fd) || fsync(mailbox->cache_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing expunge index/cache for %s: %m",
+ mailbox->name);
+ goto fail;
+ }
+
+ /* Record quota addition */
+ if (mailbox->quota.root) {
+ r = quota_read(&mailbox->quota, &tid, 1);
+ if (!r) {
+ mailbox->quota.used += quota_add;
+ r = quota_write(&mailbox->quota, &tid);
+ if (!r) quota_commit(&tid);
+ }
+ else if (r == IMAP_QUOTAROOT_NONEXISTENT) r = 0;
+
+ if (r) {
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record add of %lu bytes in quota %s",
+ quota_add, mailbox->quota.root);
+ }
+ }
+
+ free(hbuf);
+ free(index_chunk);
+ free(cache_iovec);
+ return(r);
+
+ fail:
+ /* Attempt undo. Is this safe? */
+ ftruncate(mailbox->cache_fd, mailbox->cache_size);
+ ftruncate(mailbox->index_fd, mailbox->index_size);
+
+ free(hbuf);
+ free(index_chunk);
+ free(cache_iovec);
+ return(IMAP_IOERROR);
+}
+
+/* ====================================================================== */
+
+int
+sync_upload_commit(struct mailbox *mailbox,
+ time_t last_appenddate,
+ struct sync_upload_list *upload_list,
+ struct sync_message_list *message_list)
+{
+ struct sync_upload_item *head = upload_list->head;
+ int r;
+
+ if (head == NULL)
+ return(0);
+
+ if (message_list->cache_fd >= 0) {
+ struct stat sbuf;
+
+ if ((fstat(message_list->cache_fd, &sbuf) < 0)) {
+ syslog(LOG_ERR, "Failed to stat temporary cache file: %m");
+ return(IMAP_IOERROR);
+ }
+
+ map_refresh(message_list->cache_fd, 1,
+ &message_list->cache_base, &message_list->cache_len,
+ sbuf.st_size,
+ "new message", mailbox->name);
+ }
+
+ /* Acquire mailbox lock */
+ if ((r=mailbox_lock_header(mailbox)))
+ return(r);
+
+ if ((r=mailbox_lock_index(mailbox))) {
+ mailbox_unlock_header(mailbox);
+ return(r);
+ }
+
+ if (mailbox->last_uid >= head->uid) {
+ /* Note for Ken:
+ *
+ * HERMES_TWO_PHASE_EXPUNGE has some code here to expire messages
+ * which have been expunged but not expired before uploading them
+ * again. This is to make sure that a message with a given UID
+ * never ends up in both the live and expunged version of a given
+ * mailbox. Something similar might be needed with the lazy
+ * expunge code in Cyrus 2.3
+ */
+ r = sync_combine_commit(mailbox, last_appenddate,
+ upload_list, message_list);
+ } else
+ r = sync_append_commit(mailbox, last_appenddate,
+ upload_list, message_list);
+
+ mailbox_unlock_index(mailbox);
+ mailbox_unlock_header(mailbox);
+
+ /* Update mailbox internal index to reflect change */
+ if (!r)
+ r = mailbox_open_index(mailbox);
+
+ return(r);
+}
+
+/* ====================================================================== */
+/* ====================================================================== */
+
+int
+sync_uidlast_commit(struct mailbox *mailbox,
+ unsigned long last_uid,
+ time_t last_appenddate)
+{
+ unsigned char *hbuf = xmalloc(mailbox->start_offset);
+ int n;
+
+ /* Fix up information in index header */
+ lseek(mailbox->index_fd, 0L, SEEK_SET);
+
+ n = read(mailbox->index_fd, hbuf, mailbox->start_offset);
+ if ((unsigned long)n != mailbox->start_offset) {
+ free(hbuf);
+ syslog(LOG_ERR,
+ "IOERROR: reading expunge index header for %s: got %d of %lu",
+ mailbox->name, n, mailbox->start_offset);
+ return(IMAP_IOERROR);
+ }
+
+ /* Fix up last_uid */
+ *((bit32 *)(hbuf+OFFSET_LAST_UID)) = htonl(last_uid);
+
+ /* Fix up last_append time */
+ *((bit32 *)(hbuf+OFFSET_LAST_APPENDDATE)) = htonl(last_appenddate);
+
+ /* And write it back out */
+ lseek(mailbox->index_fd, 0L, SEEK_SET);
+
+ n = retry_write(mailbox->index_fd, hbuf, mailbox->start_offset);
+
+ free(hbuf);
+ if ((unsigned long)n != mailbox->start_offset) {
+ syslog(LOG_ERR, "IOERROR: writing out new expunge header for %s",
+ mailbox->name);
+ return(IMAP_IOERROR);
+ }
+
+ /* Ensure everything made it to disk */
+ if (fsync(mailbox->index_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing expunge index/cache for %s: %m",
+ mailbox->name);
+ return(IMAP_IOERROR);
+ }
+ return(0);
+}
+
+/* ====================================================================== */
+
+int
+sync_setflags_commit(struct mailbox *mailbox, struct sync_flag_list *flag_list)
+{
+ struct index_record record;
+ struct sync_flag_item *item = flag_list->head;
+ unsigned long msgno = 1;
+ int n, r = 0;
+ time_t now = time(NULL);
+
+ if (!r) r = mailbox_lock_header(mailbox);
+ if (!r) r = mailbox_lock_index(mailbox);
+
+ if (r) return(r);
+
+ /* Make sure that new flag names recorded before we try to use them */
+ if (flag_list->meta.newflags) {
+ sync_flags_meta_to_list(&flag_list->meta, mailbox->flagname);
+ mailbox_write_header(mailbox);
+ }
+
+ while (item && (msgno <= mailbox->exists)) {
+ r = mailbox_read_index_record(mailbox, msgno, &record);
+
+ if (r) return(r);
+
+ if (record.uid == item->uid) {
+ bit32 old = record.system_flags;
+ bit32 new = item->flags.system_flags;
+
+ if (!(old & FLAG_ANSWERED) && (new & FLAG_ANSWERED))
+ mailbox->answered++;
+ else if ((old & FLAG_ANSWERED) && !(new & FLAG_ANSWERED))
+ mailbox->answered--;
+
+ if (!(old & FLAG_FLAGGED) && (new & FLAG_FLAGGED))
+ mailbox->flagged++;
+ else if ((old & FLAG_FLAGGED) && !(new & FLAG_FLAGGED))
+ mailbox->flagged--;
+
+ if (!(old & FLAG_DELETED) && (new & FLAG_DELETED))
+ mailbox->deleted++;
+ else if ((old & FLAG_DELETED) && !(new & FLAG_DELETED))
+ mailbox->deleted--;
+
+ record.system_flags = item->flags.system_flags;
+ for (n = 0; n < MAX_USER_FLAGS/32; n++) {
+ record.user_flags[n] = item->flags.user_flags[n];
+ }
+ record.last_updated = ((record.last_updated >= now) ?
+ record.last_updated + 1 : now);
+ mailbox_write_index_record(mailbox, msgno, &record, 0);
+ item = item->next;
+ }
+ msgno++;
+ }
+
+ if (!r) r = mailbox_write_index_header(mailbox);
+ if (!r) mailbox_unlock_index(mailbox);
+ if (!r) mailbox_unlock_header(mailbox);
+
+ if (fsync(mailbox->index_fd)) {
+ syslog(LOG_ERR, "IOERROR: writing index record %lu for %s: %m",
+ msgno, mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ r = mailbox_open_index(mailbox); /* Update internal index */
+ return(r);
+}
+
+/* ====================================================================== */
+
+#define DB config_mboxlist_db
+
+int
+sync_create_commit(char *name, char *partition, char *uniqueid, char *acl,
+ int mbtype, unsigned long uidvalidity,
+ int isadmin, char *userid, struct auth_state *auth_state)
+{
+ int r;
+ int free_uniqueid = 0;
+ const char *root = NULL;
+ char *newpartition = NULL;
+ char *mboxent = NULL;
+ int newreserved = 0; /* made reserved entry in local mailbox list */
+ int mboxopen = 0;
+ struct mailbox m;
+ /* Must be atleast MAX_PARTITION_LEN + 30 for partition, need
+ * MAX_PARTITION_LEN + HOSTNAME_SIZE + 2 for mupdate location */
+ char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+#if 0 /* XXX is this really necessary since only sync_client talks to us? */
+ /* Need an extra sanity check here as normal ACL logic is bypassed */
+ r = mboxname_policycheck(name);
+ if (r) return r;
+#endif
+ if (!uniqueid) {
+ uniqueid = xmalloc(sizeof(char) * 32);
+ mailbox_make_uniqueid(name, uidvalidity, uniqueid, 32); /* YYY */
+ free_uniqueid = 1;
+ }
+
+ r = mboxlist_createmailboxcheck(name, 0, partition, 1,
+ imapd_userid, imapd_authstate,
+ NULL, &newpartition);
+ if (r) goto done;
+
+ mboxent = mboxlist_makeentry(mbtype | MBTYPE_RESERVE, newpartition, acl);
+ r = DB->store(mbdb, name, strlen(name), mboxent, strlen(mboxent), NULL);
+ free(mboxent);
+ mboxent = NULL;
+
+ /* 3b. Unlock mailbox list (before calling out to mupdate) */
+ if(r) {
+ syslog(LOG_ERR, "Could not reserve mailbox %s during create", name);
+ goto done;
+ } else {
+ newreserved = 1;
+ }
+
+ done: /* All checks compete. Time to fish or cut bait. */
+ if (!r && !(mbtype & MBTYPE_REMOTE)) {
+ /* Create new mailbox in the filesystem */
+ r = mailbox_create(name, newpartition, acl, uniqueid,
+ ((mbtype & MBTYPE_NETNEWS) ?
+ MAILBOX_FORMAT_NETNEWS :
+ MAILBOX_FORMAT_NORMAL),
+ NULL);
+ }
+
+ if (r) { /* CREATE failed */
+ int r2 = 0;
+
+ if(newreserved) {
+ /* remove the RESERVED mailbox entry if we failed */
+ r2 = DB->delete(mbdb, name, strlen(name), NULL, 0);
+ if(r2) {
+ syslog(LOG_ERR,
+ "DBERROR: can't remove RESERVE entry for %s (%s)",
+ name, cyrusdb_strerror(r2));
+ }
+ }
+
+ } else { /* all is well - activate the mailbox */
+ mboxent = mboxlist_makeentry(mbtype, newpartition, acl);
+
+ switch(r = DB->store(mbdb, name, strlen(name),
+ mboxent, strlen(mboxent), NULL)) {
+ case 0:
+ break;
+ default:
+ /* xxx This leaves a reserved entry around, it is unclear
+ * that a DB->delete would work though */
+ syslog(LOG_ERR, "DBERROR: failed on activation: %s",
+ cyrusdb_strerror(r));
+ r = IMAP_IOERROR;
+ }
+ }
+ if (mboxent) free(mboxent);
+ if (newpartition) free(newpartition);
+
+ /* Fix UIDvalidity */
+ if (!r) r = mailbox_open_header(name, 0, &m);
+ if (!r) mboxopen = 1;
+ if (!r) r = mailbox_lock_header(&m);
+ if (!r) r = mailbox_open_index(&m);
+ if (!r) r = mailbox_lock_index(&m);
+ if (!r) m.uidvalidity = uidvalidity;
+ if (!r) mailbox_write_index_header(&m);
+
+ if (mboxopen) mailbox_close(&m);
+
+ if (free_uniqueid) free(uniqueid);
+
+ return(r);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_commit.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,64 @@
+/* sync_commit.h -- Cyrus synchonization mailbox functions
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_commit.h,v 1.1.2.2 2005/05/17 18:29:46 ken3 Exp $
+ */
+
+#ifndef INCLUDED_SYNC_COMMIT_H
+#define INCLUDED_SYNC_COMMIT_H
+
+int sync_upload_commit(struct mailbox *mailbox, time_t last_appenddate,
+ struct sync_upload_list *upload_list,
+ struct sync_message_list *message_list);
+
+int sync_uidlast_commit(struct mailbox *mailbox, unsigned long last_uid,
+ time_t last_appenddate);
+
+int sync_setflags_commit(struct mailbox *mailbox,
+ struct sync_flag_list *flag_list);
+
+int sync_create_commit(char *name, char *partition, char *uniqueid, char *acl,
+ int mbtype, unsigned long uidvalidity,
+ int isadmin, char *userid, struct auth_state *auth_state);
+
+#endif /* INCLUDED_SYNC_COMMIT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,214 @@
+/* sync_log.c -- Cyrus synchonization logging functions
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_log.c,v 1.1.2.7 2005/05/12 19:56:17 ken3 Exp $
+ */
+
+/* YYY Need better quoting for obscure filenames: use literals? */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <errno.h>
+
+#include "sync_log.h"
+#include "global.h"
+#include "lock.h"
+#include "mailbox.h"
+#include "retry.h"
+
+static int sync_log_enabled = 0;
+static char sync_log_file[MAX_MAILBOX_PATH+1];
+
+void sync_log_init(void)
+{
+ sync_log_enabled = config_getswitch(IMAPOPT_SYNC_LOG);
+
+ strlcpy(sync_log_file, config_dir, sizeof(sync_log_file));
+ strlcat(sync_log_file, "/sync/log", sizeof(sync_log_file));
+}
+
+static void sync_log_base(const char *string, int len)
+{
+ int fd, rc;
+ struct stat sbuffile, sbuffd;
+ int retries = 0;
+
+ if (!sync_log_enabled) return;
+
+ while (retries++ < SYNC_LOG_RETRIES) {
+ fd = open(sync_log_file, O_WRONLY|O_APPEND|O_CREAT, 0640);
+ if (fd < 0 && errno == ENOENT) {
+ if (!cyrus_mkdir(sync_log_file, 0755)) {
+ fd = open(sync_log_file, O_WRONLY|O_APPEND|O_CREAT, 0640);
+ }
+ }
+ if (fd < 0) {
+ syslog(LOG_ERR, "sync_log(): Unable to write to log file %s: %s",
+ sync_log_file, strerror(errno));
+ return;
+ }
+
+ if (lock_blocking(fd) == -1) {
+ syslog(LOG_ERR, "sync_log(): Failed to lock %s for %s: %m",
+ sync_log_file, string);
+ close(fd);
+ return;
+ }
+
+ /* Check that the file wasn't renamed after it was opened above */
+ if ((fstat(fd, &sbuffd) == 0) &&
+ (stat(sync_log_file, &sbuffile) == 0) &&
+ (sbuffd.st_ino == sbuffile.st_ino))
+ break;
+
+ close(fd);
+ }
+ if (retries >= SYNC_LOG_RETRIES) {
+ close(fd);
+ syslog(LOG_ERR,
+ "sync_log(): Failed to lock %s for %s after %d attempts",
+ sync_log_file, string, retries);
+ return;
+ }
+
+ if ((rc = retry_write(fd, string, len)) < 0)
+ syslog(LOG_ERR, "write() to %s failed: %s",
+ sync_log_file, strerror(errno));
+
+ if (rc < len)
+ syslog(LOG_ERR, "Partial write to %s: %d out of %d only written",
+ sync_log_file, rc, len);
+
+ fsync(fd); /* paranoia */
+ close(fd);
+}
+
+static const char *sync_quote_name(const char *name)
+{
+ static char buf[(2*MAX_MAILBOX_NAME)+3];
+ const char *s;
+ char *p = buf;
+ char c;
+ int need_quote = 0;
+
+ if (!name || !*name) return "\"\"";
+
+ s = name;
+ while ((c=*s++)) {
+ if ((c == ' ') || (c == '\t') || (c == '\\') || (c == '\"') ||
+ (c == '(') || (c == ')') || (c == '{') || (c == '}'))
+ need_quote = 1;
+ else if ((c == '\r') || (c == '\n'))
+ fatal("Illegal line break in folder name", EC_IOERR);
+ }
+
+ if ((s-name) > MAX_MAILBOX_NAME+64)
+ fatal("word too long", EC_IOERR);
+
+ if (!need_quote) return(name);
+
+ s = name;
+ *p++ = '\"';
+ while ((c=*s++)) {
+ if ((c == '\\') || (c == '\"') || (c == '{') || (c == '}'))
+ *p++ = '\\';
+ *p++ = c;
+ }
+
+ *p++ = '\"';
+ *p++ = '\0';
+
+ return(buf);
+}
+
+#define BUFSIZE 4096
+
+void sync_log(char *fmt, ...)
+{
+ va_list ap;
+ char buf[BUFSIZE+1], *p;
+ size_t len;
+ int ival;
+ const char *sval;
+
+ if (!sync_log_enabled) return;
+
+ va_start(ap, fmt);
+ for (len = 0, p = fmt; *p && len < BUFSIZE; p++) {
+ if (*p != '%') {
+ buf[len++] = *p;
+ continue;
+ }
+ switch (*++p) {
+ case 'd':
+ ival = va_arg(ap, int);
+ len += snprintf(buf+len, BUFSIZE-len, "%d", ival);
+ case 's':
+ sval = va_arg(ap, const char *);
+ sval = sync_quote_name(sval);
+ strlcpy(buf+len, sval, BUFSIZE-len);
+ len += strlen(sval);
+ break;
+ default:
+ buf[len++] = *p;
+ break;
+ }
+ }
+ va_end(ap);
+
+ if (buf[len-1] != '\n') buf[len++] = '\n';
+ buf[len] = '\0';
+
+ sync_log_base(buf, len);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_log.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+/* sync_log.c -- Cyrus synchonization logging functions
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_log.h,v 1.1.2.6 2006/06/14 14:16:12 murch Exp $
+ */
+
+#ifndef INCLUDED_SYNC_LOG_H
+#define INCLUDED_SYNC_LOG_H
+
+#define SYNC_LOG_RETRIES (64)
+
+void sync_log_init(void);
+
+void sync_log(char *fmt, ...);
+
+#define sync_log_user(user) \
+ sync_log("USER %s\n", user)
+
+#define sync_log_sieve(user) \
+ sync_log("META %s\n", user)
+
+#define sync_log_mailbox(name) \
+ sync_log("MAILBOX %s\n", name)
+
+#define sync_log_mailbox_double(name1, name2) \
+ sync_log("MAILBOX %s\nMAILBOX %s\n", name1, name2)
+
+#define sync_log_append(name) \
+ sync_log("APPEND %s\n", name)
+
+#define sync_log_acl(name) \
+ sync_log("ACL %s\n", name)
+
+#define sync_log_quota(name) \
+ sync_log("QUOTA %s\n", name)
+
+#define sync_log_annotation(name) \
+ sync_log("ANNOTATION %s\n", name)
+
+#define sync_log_seen(user, name) \
+ sync_log("SEEN %s %s\n", user, name)
+
+#define sync_log_subscribe(user, name, add) \
+ if (add) sync_log("SUB %s %s\n", user, name); \
+ else sync_log("UNSUB %s %s\n", user, name)
+
+#endif /* INCLUDED_SYNC_LOG_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_reset.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_reset.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_reset.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_reset.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,376 @@
+/* sync_reset.c -- Remove a user account from a replica system
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_reset.c,v 1.1.2.4 2005/12/13 15:31:10 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <syslog.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <ctype.h>
+#include <sys/resource.h>
+
+#include "global.h"
+#include "assert.h"
+#include "mboxlist.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "acl.h"
+#include "seen.h"
+#include "mboxname.h"
+#include "map.h"
+#include "imparse.h"
+#include "util.h"
+#include "xmalloc.h"
+#include "retry.h"
+#include "imapd.h"
+#include "user.h"
+#include "sync_support.h"
+#include "sync_commit.h"
+/*#include "cdb.h"*/
+
+/* global state */
+const int config_need_data = 0;
+
+/* Stuff to make index.c link */
+int imapd_exists;
+struct protstream *imapd_out = NULL;
+struct auth_state *imapd_authstate = NULL;
+char *imapd_userid = NULL;
+
+void printastring(const char *s)
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+
+void printstring(const char *s)
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+
+/* end stuff to make index.c link */
+
+/* ====================================================================== */
+
+/* Static global variables and support routines for sync_server */
+
+extern char *optarg;
+extern int optind;
+
+static struct namespace sync_namespace;
+static struct namespace *sync_namespacep = &sync_namespace;
+static struct auth_state *sync_authstate = NULL;
+static char *sync_userid = NULL;
+
+static int verbose = 0;
+
+static void shut_down(int code) __attribute__((noreturn));
+static void shut_down(int code)
+{
+ if (sync_userid) free(sync_userid);
+ if (sync_authstate) auth_freestate(sync_authstate);
+
+ seen_done();
+ mboxlist_close();
+ mboxlist_done();
+ exit(code);
+}
+
+static int usage(const char *name)
+{
+ fprintf(stderr,
+ "usage: %s [-C <alt_config>] [-v] [-f] user...\n", name);
+
+ exit(EC_USAGE);
+}
+
+void fatal(const char* s, int code)
+{
+ fprintf(stderr, "sync_server: %s\n", s);
+ exit(code);
+}
+
+/* ====================================================================== */
+
+static int
+user_master_is_local(char *user)
+{
+ int rc = 0;
+#if 0 /* XXX make sure we're not the replica */
+ const char *filename;
+ unsigned long len;
+ int fd;
+
+ filename = config_getstring(IMAPOPT_SYNC_MASTER_MAP);
+
+ if ((fd = open(filename, O_RDONLY)) < 0)
+ return(0); /* Couldn't open */
+
+ rc = cdb_seek(fd, (unsigned char *)user, strlen(user), &len);
+ close(fd);
+#endif
+ /* rc: -1 => error, 0 => lookup failed, 1 => lookup suceeded */
+ return(rc == 1);
+}
+
+
+/* ====================================================================== */
+
+static int
+addmbox_full(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct sync_folder_list *list = (struct sync_folder_list *) rock;
+
+ /* List all mailboxes, including directories and deleted items */
+
+ sync_folder_list_add(list, name, name, NULL, NULL);
+ return(0);
+}
+
+static int
+addmbox_sub(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct sync_folder_list *list = (struct sync_folder_list *) rock;
+
+ sync_folder_list_add(list, name, name, NULL, NULL);
+ return(0);
+}
+
+/* ====================================================================== */
+
+static int
+reset_single(struct sync_lock *lock, char *user)
+{
+ struct sync_folder_list *list = NULL;
+ struct sync_folder *item;
+ char buf[MAX_MAILBOX_NAME+1];
+ int r = 0;
+ static int md5_dir_set = 0;
+ static const char *md5_dir = NULL;
+
+ if (!md5_dir_set) {
+ md5_dir = config_getstring(IMAPOPT_MD5_DIR);
+ md5_dir_set = 1;
+ }
+
+ if (verbose > 1)
+ fprintf(stderr, " RESET %s\n", user);
+
+ if (user_master_is_local(user)) {
+ fprintf(stderr, "Attempt to update master for %s\n", user);
+ return(IMAP_INVALID_USER);
+ }
+
+ if ((r = sync_lock(lock))) {
+ fprintf(stderr, "Failed to lock: %s\n", error_message(r));
+ return(r);
+ }
+ if (sync_userid) free(sync_userid);
+ if (sync_authstate) auth_freestate(sync_authstate);
+
+ sync_userid = xstrdup(user);
+ sync_authstate = auth_newstate(sync_userid);
+
+ /* Nuke subscriptions */
+ list = sync_folder_list_create();
+ snprintf(buf, sizeof(buf)-1, "user.%s.*", user);
+ r = (sync_namespacep->mboxlist_findsub)(sync_namespacep, buf, 0,
+ user, sync_authstate, addmbox_sub,
+ (void *)list, 0);
+ if (r) goto fail;
+
+ for (item = list->head ; item ; item = item->next) {
+ r = mboxlist_changesub(item->name, sync_userid, sync_authstate, 0, 0);
+ if (r) goto fail;
+ }
+ sync_folder_list_free(&list);
+#if 0
+ /* Nuke DELETED folders */
+ list = sync_folder_list_create();
+
+ snprintf(buf, sizeof(buf)-1, "user.%s.^DELETED.*", user);
+ r = (sync_namespacep->mboxlist_findall)(sync_namespacep, buf, 0,
+ user, sync_authstate, addmbox_full,
+ (void *)list);
+ if (r) goto fail;
+
+ for (item = list->head ; item ; item = item->next) {
+ r=mboxlist_deletemailbox(item->name, 1, NULL, sync_authstate, 1, 0, 0);
+
+ if (r) goto fail;
+ }
+ sync_folder_list_free(&list);
+#endif
+ /* Nuke normal folders */
+ list = sync_folder_list_create();
+
+ snprintf(buf, sizeof(buf)-1, "user.%s.*", user);
+ r = (sync_namespacep->mboxlist_findall)(sync_namespacep, buf, 0,
+ user, sync_authstate, addmbox_full,
+ (void *)list);
+ if (r) goto fail;
+
+ for (item = list->head ; item ; item = item->next) {
+ r=mboxlist_deletemailbox(item->name, 1, NULL, sync_authstate, 1, 0, 0);
+
+ if (r) goto fail;
+ }
+ sync_folder_list_free(&list);
+
+ /* Nuke inbox (recursive nuke possible?) */
+ snprintf(buf, sizeof(buf)-1, "user.%s", user);
+ r = mboxlist_deletemailbox(buf, 1, "cyrus", sync_authstate, 1, 0, 0);
+ if (r && (r != IMAP_MAILBOX_NONEXISTENT)) goto fail;
+
+ if ((r=user_deletedata(user, sync_userid, sync_authstate, 1)))
+ goto fail;
+
+ /* Nuke md5 database entry (not the end of the world if it fails) */
+ if (md5_dir) {
+ snprintf(buf, sizeof(buf)-1, "%s/%c/%s", md5_dir, user[0], user);
+ unlink(buf);
+ }
+
+ sync_unlock(lock);
+
+ return(0);
+
+ fail:
+ sync_unlock(lock);
+ if (list)
+ sync_folder_list_free(&list);
+ fprintf(stderr, "Failed to reset account %s: %s\n",
+ sync_userid, error_message(r));
+
+ return(r);
+}
+
+/* ====================================================================== */
+
+int
+main(int argc, char **argv)
+{
+ int opt;
+ char *alt_config = NULL;
+ int r = 0;
+ int force = 0;
+ struct sync_lock lock;
+ int i;
+
+ sync_lock_reset(&lock);
+
+ if(geteuid() == 0)
+ fatal("must run as the Cyrus user", EC_USAGE);
+
+ setbuf(stdout, NULL);
+
+ while ((opt = getopt(argc, argv, "C:vf")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'v': /* verbose */
+ verbose++;
+ break;
+
+ case 'f': /* force: confirm option */
+ force++;
+ break;
+
+ default:
+ usage("sync_reset");
+ }
+ }
+
+ /* Set up default bounds if no command line options provided */
+
+ cyrus_init(alt_config, "sync_reset", 0);
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(sync_namespacep, 1)) != 0) {
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ /* open the mboxlist, we'll need it for real work */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+ mailbox_initialize();
+
+ signals_set_shutdown(&shut_down);
+ signals_add_handlers(0);
+
+ if (!force) {
+ fprintf(stderr, "Usage: sync_reset -f user user user ...\n");
+ fprintf(stderr, " -f [force] is obligitory for safety\n");
+ shut_down(0);
+ }
+
+ for (i = optind; i < argc; i++) {
+ if (reset_single(&lock, argv[i])) {
+ fprintf(stderr, "Bailing out!\n");
+ break;
+ }
+ }
+
+ shut_down(0);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_server.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_server.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_server.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_server.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2750 @@
+/* sync_server.c -- Cyrus synchonization server
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_server.c,v 1.1.2.23 2006/06/12 18:56:42 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/param.h>
+#include <syslog.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <ctype.h>
+
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "acl.h"
+#include "annotate.h"
+#include "append.h"
+#include "auth.h"
+#include "duplicate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "hash.h"
+#include "imap_err.h"
+#include "imparse.h"
+#include "iptostring.h"
+#include "mailbox.h"
+#include "map.h"
+#include "mboxlist.h"
+#include "prot.h"
+#include "quota.h"
+#include "retry.h"
+#include "seen.h"
+#include "spool.h"
+#include "telemetry.h"
+#include "tls.h"
+#include "util.h"
+#include "version.h"
+#include "xmalloc.h"
+
+#include "sync_support.h"
+#include "sync_commit.h"
+/*#include "cdb.h"*/
+
+extern int optind;
+extern char *optarg;
+extern int opterr;
+
+/* for config.c */
+const int config_need_data = 0;
+
+static sasl_ssf_t extprops_ssf = 0;
+
+/* Stuff to make index.c link */
+int imapd_exists;
+struct protstream *imapd_out = NULL;
+struct auth_state *imapd_authstate = NULL;
+char *imapd_userid = NULL;
+
+void printastring(const char *s __attribute__((unused)))
+{
+ fatal("not implemented", EC_SOFTWARE);
+}
+/* end stuff to make index.c link */
+
+#ifdef HAVE_SSL
+static SSL *tls_conn;
+#endif /* HAVE_SSL */
+
+sasl_conn_t *sync_saslconn; /* the sasl connection context */
+
+char *sync_userid = 0;
+struct namespace sync_namespace;
+struct namespace *sync_namespacep = &sync_namespace;
+struct auth_state *sync_authstate = 0;
+int sync_userisadmin = 0;
+struct sockaddr_storage sync_localaddr, sync_remoteaddr;
+int sync_haveaddr = 0;
+char sync_clienthost[NI_MAXHOST*2+1] = "[local]";
+struct protstream *sync_out = NULL;
+struct protstream *sync_in = NULL;
+static int sync_logfd = -1;
+
+int sync_starttls_done = 0;
+
+static void cmdloop(void);
+static void cmd_authenticate(char *mech, char *resp);
+static void cmd_starttls(void);
+static void cmd_lock(struct sync_lock *lock);
+static void cmd_unlock(struct sync_lock *lock, int restart);
+static void cmd_select(struct mailbox **mailboxp, char *name);
+static void cmd_reserve(char *mailbox_name,
+ struct sync_message_list *message_list);
+static void cmd_quota_work(char *quotaroot);
+static void cmd_quota(char *quotaroot);
+static void cmd_setquota(char *root, int limit);
+static void cmd_reset(char *user);
+static void cmd_status(struct mailbox *mailbox);
+static void cmd_upload(struct mailbox *mailbox,
+ struct sync_message_list *message_list,
+ unsigned long new_last_uid, time_t last_appenddate,
+ int *restart);
+static void cmd_uidlast(struct mailbox *mailbox, unsigned long last_uid,
+ time_t last_appenddate);
+static void cmd_setflags(struct mailbox *mailbox);
+static void cmd_setseen(struct mailbox **mailboxp, char *user, char *mboxname,
+ time_t lastread, unsigned int last_recent_uid,
+ time_t lastchange, char *seenuid);
+static void cmd_setseen_all(char *user, struct buf *data);
+static void cmd_setacl(char *name, char *acl);
+static void cmd_expunge(struct mailbox *mailbox);
+static void cmd_mailboxes();
+static void cmd_user(char *userid);
+static void cmd_create(char *mailboxname, char *partition,
+ char *uniqueid, char *acl,
+ int mbtype, unsigned long uidvalidity);
+static void cmd_delete(char *name);
+static void cmd_rename(char *oldmailboxname, char *newmailboxname);
+static void cmd_lsub(char *user);
+static void cmd_changesub(char *user, char *name, int add);
+static void cmd_set_annotation(char *mailboxname, char *entry, char *userid,
+ char *value);
+static void cmd_list_annotations(char *mailboxname);
+static void cmd_list_sieve(char *user);
+static void cmd_get_sieve(char *user, char *name);
+static void cmd_upload_sieve(char *user, char *name, unsigned long last_update);
+static void cmd_activate_sieve(char *user, char *name);
+static void cmd_deactivate_sieve(char *user);
+static void cmd_delete_sieve(char *user, char *name);
+void usage(void);
+void shut_down(int code) __attribute__ ((noreturn));
+
+
+extern void setproctitle_init(int argc, char **argv, char **envp);
+extern int proc_register(const char *progname, const char *clienthost,
+ const char *userid, const char *mailbox);
+extern void proc_cleanup(void);
+
+extern int saslserver(sasl_conn_t *conn, const char *mech,
+ const char *init_resp, const char *resp_prefix,
+ const char *continuation, const char *empty_resp,
+ struct protstream *pin, struct protstream *pout,
+ int *sasl_result, char **success_data);
+
+static struct {
+ char *ipremoteport;
+ char *iplocalport;
+ sasl_ssf_t ssf;
+ char *authid;
+} saslprops = {NULL,NULL,0,NULL};
+
+/* the sasl proxy policy context */
+static struct proxy_context sync_proxyctx = {
+ 0, 1, &sync_authstate, &sync_userisadmin, NULL
+};
+
+static struct sasl_callback mysasl_cb[] = {
+ { SASL_CB_GETOPT, &mysasl_config, NULL },
+ { SASL_CB_PROXY_POLICY, &mysasl_proxy_policy, (void*) &sync_proxyctx },
+ { SASL_CB_CANON_USER, &mysasl_canon_user, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+static void sync_reset(void)
+{
+ int i;
+
+ proc_cleanup();
+
+ if (sync_in) {
+ prot_NONBLOCK(sync_in);
+ prot_fill(sync_in);
+
+ prot_free(sync_in);
+ }
+
+ if (sync_out) {
+ prot_flush(sync_out);
+ prot_free(sync_out);
+ }
+
+ sync_in = sync_out = NULL;
+
+#ifdef HAVE_SSL
+ if (tls_conn) {
+ tls_reset_servertls(&tls_conn);
+ tls_conn = NULL;
+ }
+#endif
+
+ cyrus_reset_stdio();
+
+ strcpy(sync_clienthost, "[local]");
+ if (sync_logfd != -1) {
+ close(sync_logfd);
+ sync_logfd = -1;
+ }
+ if (sync_userid != NULL) {
+ free(sync_userid);
+ sync_userid = NULL;
+ }
+ if (sync_authstate) {
+ auth_freestate(sync_authstate);
+ sync_authstate = NULL;
+ }
+ if (sync_saslconn) {
+ sasl_dispose(&sync_saslconn);
+ sync_saslconn = NULL;
+ }
+ sync_starttls_done = 0;
+
+ if(saslprops.iplocalport) {
+ free(saslprops.iplocalport);
+ saslprops.iplocalport = NULL;
+ }
+ if(saslprops.ipremoteport) {
+ free(saslprops.ipremoteport);
+ saslprops.ipremoteport = NULL;
+ }
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ saslprops.ssf = 0;
+}
+
+/*
+ * run once when process is forked;
+ * MUST NOT exit directly; must return with non-zero error code
+ */
+int service_init(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ int opt, r;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+ setproctitle_init(argc, argv, envp);
+
+ /* set signal handlers */
+ signals_set_shutdown(&shut_down);
+ signal(SIGPIPE, SIG_IGN);
+
+ /* load the SASL plugins */
+ global_sasl_init(1, 1, mysasl_cb);
+
+ while ((opt = getopt(argc, argv, "p:")) != EOF) {
+ switch(opt) {
+ case 'p': /* external protection */
+ extprops_ssf = atoi(optarg);
+ break;
+ default:
+ usage();
+ }
+ }
+
+ /* Set namespace -- force standard (internal) */
+ if ((r = mboxname_init_namespace(sync_namespacep, 1)) != 0) {
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ /* open the mboxlist, we'll need it for real work */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ /* open the quota db, we'll need it for real work */
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ /* Initialize the annotatemore extention */
+ annotatemore_init(0, NULL, NULL);
+ annotatemore_open(NULL);
+
+ return 0;
+}
+
+/*
+ * Issue the capability banner
+ */
+static void dobanner(void)
+{
+ const char *mechlist;
+ unsigned int mechcount;
+
+ if (sasl_listmech(sync_saslconn, NULL,
+ "* SASL ", " ", "\r\n",
+ &mechlist, NULL, &mechcount) == SASL_OK && mechcount > 0) {
+ prot_printf(sync_out, "%s", mechlist);
+ }
+
+ if (tls_enabled() && !sync_starttls_done) {
+ prot_printf(sync_out, "* STARTTLS\r\n");
+ }
+
+ prot_printf(sync_out,
+ "* OK %s Cyrus sync server %s\r\n",
+ config_servername, CYRUS_VERSION);
+
+ prot_flush(sync_out);
+}
+
+/*
+ * run for each accepted connection
+ */
+int service_main(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ socklen_t salen;
+ char localip[60], remoteip[60];
+ char hbuf[NI_MAXHOST];
+ int niflags;
+ int timeout;
+ sasl_security_properties_t *secprops = NULL;
+
+ signals_poll();
+
+ sync_in = prot_new(0, 0);
+ sync_out = prot_new(1, 1);
+
+ /* Find out name of client host */
+ salen = sizeof(sync_remoteaddr);
+ if (getpeername(0, (struct sockaddr *)&sync_remoteaddr, &salen) == 0 &&
+ (sync_remoteaddr.ss_family == AF_INET ||
+ sync_remoteaddr.ss_family == AF_INET6)) {
+ if (getnameinfo((struct sockaddr *)&sync_remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD) == 0) {
+ strncpy(sync_clienthost, hbuf, sizeof(hbuf));
+ strlcat(sync_clienthost, " ", sizeof(sync_clienthost));
+ sync_clienthost[sizeof(sync_clienthost)-30] = '\0';
+ } else {
+ sync_clienthost[0] = '\0';
+ }
+ niflags = NI_NUMERICHOST;
+#ifdef NI_WITHSCOPEID
+ if (((struct sockaddr *)&sync_remoteaddr)->sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&sync_remoteaddr, salen, hbuf,
+ sizeof(hbuf), NULL, 0, niflags) != 0)
+ strlcpy(hbuf, "unknown", sizeof(hbuf));
+ strlcat(sync_clienthost, "[", sizeof(sync_clienthost));
+ strlcat(sync_clienthost, hbuf, sizeof(sync_clienthost));
+ strlcat(sync_clienthost, "]", sizeof(sync_clienthost));
+ salen = sizeof(sync_localaddr);
+ if (getsockname(0, (struct sockaddr *)&sync_localaddr, &salen) == 0) {
+ sync_haveaddr = 1;
+ }
+ }
+
+ /* other params should be filled in */
+ if (sasl_server_new("csync", config_servername, NULL, NULL, NULL,
+ NULL, 0, &sync_saslconn) != SASL_OK)
+ fatal("SASL failed initializing: sasl_server_new()",EC_TEMPFAIL);
+
+ /* will always return something valid */
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ sasl_setprop(sync_saslconn, SASL_SEC_PROPS, secprops);
+ sasl_setprop(sync_saslconn, SASL_SSF_EXTERNAL, &extprops_ssf);
+
+ if(iptostring((struct sockaddr *)&sync_localaddr, salen,
+ localip, 60) == 0) {
+ sasl_setprop(sync_saslconn, SASL_IPLOCALPORT, localip);
+ saslprops.iplocalport = xstrdup(localip);
+ }
+
+ if(iptostring((struct sockaddr *)&sync_remoteaddr, salen,
+ remoteip, 60) == 0) {
+ sasl_setprop(sync_saslconn, SASL_IPREMOTEPORT, remoteip);
+ saslprops.ipremoteport = xstrdup(remoteip);
+ }
+
+ proc_register("sync_server", sync_clienthost, NULL, NULL);
+#if 0
+ /* Set inactivity timer */
+ timeout = config_getint(IMAPOPT_TIMEOUT);
+ if (timeout < 3) timeout = 3;
+ prot_settimeout(sync_in, timeout*60);
+#endif
+ prot_setflushonread(sync_in, sync_out);
+
+ dobanner();
+
+ cmdloop();
+
+ /* EXIT executed */
+
+ /* cleanup */
+ sync_reset();
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+void usage(void)
+{
+ prot_printf(sync_out, "* usage: sync_server [-C <alt_config>]\r\n");
+ prot_flush(sync_out);
+ exit(EC_USAGE);
+}
+
+/*
+ * Cleanly shut down and exit
+ */
+void shut_down(int code)
+{
+ int i;
+
+ proc_cleanup();
+
+ seen_done();
+ mboxlist_close();
+ mboxlist_done();
+
+ quotadb_close();
+ quotadb_done();
+
+ annotatemore_close();
+ annotatemore_done();
+
+ if (sync_in) {
+ prot_NONBLOCK(sync_in);
+ prot_fill(sync_in);
+ prot_free(sync_in);
+ }
+
+ if (sync_out) {
+ prot_flush(sync_out);
+ prot_free(sync_out);
+ }
+
+#ifdef HAVE_SSL
+ tls_shutdown_serverengine();
+#endif
+
+ cyrus_done();
+
+ exit(code);
+}
+
+void fatal(const char* s, int code)
+{
+ static int recurse_code = 0;
+
+ if (recurse_code) {
+ /* We were called recursively. Just give up */
+ proc_cleanup();
+ exit(recurse_code);
+ }
+ recurse_code = code;
+ if (sync_out) {
+ prot_printf(sync_out, "* Fatal error: %s\r\n", s);
+ prot_flush(sync_out);
+ }
+ syslog(LOG_ERR, "Fatal error: %s", s);
+ shut_down(code);
+}
+
+/* Reset the given sasl_conn_t to a sane state */
+static int reset_saslconn(sasl_conn_t **conn)
+{
+ int ret;
+ sasl_security_properties_t *secprops = NULL;
+
+ sasl_dispose(conn);
+ /* do initialization typical of service_main */
+ ret = sasl_server_new("csync", config_servername,
+ NULL, NULL, NULL,
+ NULL, 0, conn);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.ipremoteport)
+ ret = sasl_setprop(*conn, SASL_IPREMOTEPORT,
+ saslprops.ipremoteport);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.iplocalport)
+ ret = sasl_setprop(*conn, SASL_IPLOCALPORT,
+ saslprops.iplocalport);
+ if(ret != SASL_OK) return ret;
+ secprops = mysasl_secprops(SASL_SEC_NOPLAINTEXT);
+ ret = sasl_setprop(*conn, SASL_SEC_PROPS, secprops);
+ if(ret != SASL_OK) return ret;
+ /* end of service_main initialization excepting SSF */
+
+ /* If we have TLS/SSL info, set it */
+ if(saslprops.ssf) {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &saslprops.ssf);
+ } else {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &extprops_ssf);
+ }
+
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.authid) {
+ ret = sasl_setprop(*conn, SASL_AUTH_EXTERNAL, saslprops.authid);
+ if(ret != SASL_OK) return ret;
+ }
+ /* End TLS/SSL Info */
+
+ return SASL_OK;
+}
+
+static void cmdloop(void)
+{
+ struct sync_message_list *message_list;
+ struct mailbox *mailbox = NULL;
+ struct sync_lock sync_lock;
+ static struct buf cmd;
+ static struct buf arg1, arg2, arg3, arg4, arg5, arg6;
+ int c;
+ char *p;
+
+ syslog(LOG_DEBUG, "cmdloop(): startup");
+
+ message_list = sync_message_list_create(SYNC_MESSAGE_LIST_HASH_SIZE,
+ SYNC_MESSAGE_LIST_MAX_OPEN_FILES);
+
+ if (message_list == NULL) {
+ fatal("* [BYE] Unable to start up server", EC_TEMPFAIL);
+ }
+
+ sync_lock_reset(&sync_lock);
+
+ for (;;) {
+ prot_flush(sync_out);
+
+ /* Parse command name */
+ if ((c = getword(sync_in, &cmd)) == EOF)
+ break;
+
+ if (!cmd.s[0]) {
+ prot_printf(sync_out, "BAD Null command\r\n");
+ eatline(sync_in, c);
+ continue;
+ }
+
+ if (islower((unsigned char) cmd.s[0]))
+ cmd.s[0] = toupper((unsigned char) cmd.s[0]);
+ for (p = &cmd.s[1]; *p; p++) {
+ if (isupper((unsigned char) *p)) *p = tolower((unsigned char) *p);
+ }
+
+ /* Only Authenticate/Exit/Restart/Starttls
+ allowed when not logged in */
+ if (!sync_userid && !strchr("AERS", cmd.s[0])) goto nologin;
+
+ /* Must be an admin */
+ if (sync_userid && !sync_userisadmin) goto noperm;
+
+ switch (cmd.s[0]) {
+ case 'A':
+ if (!strcmp(cmd.s, "Authenticate")) {
+ int haveinitresp = 0;
+
+ if (c != ' ') goto missingargs;
+ c = getword(sync_in, &arg1);
+ if (!imparse_isatom(arg1.s)) {
+ prot_printf(sync_out, "BAD Invalid authenticate mechanism\r\n");
+ eatline(sync_in, c);
+ continue;
+ }
+ if (c == ' ') {
+ haveinitresp = 1;
+ c = getword(sync_in, &arg2);
+ if (c == EOF) goto missingargs;
+ }
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ if (sync_userid) {
+ prot_printf(sync_out, "BAD Already authenticated\r\n");
+ continue;
+ }
+ cmd_authenticate(arg1.s, haveinitresp ? arg2.s : NULL);
+ continue;
+ }
+ else if (!sync_userid) goto nologin;
+ else if (!strcmp(cmd.s, "Addsub")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_changesub(arg1.s, arg2.s,1);
+ continue;
+ }
+ else if (!strcmp(cmd.s, "Activate_sieve")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_activate_sieve(arg1.s, arg2.s);
+ continue;
+ }
+ break;
+ case 'C':
+ if (!strcmp(cmd.s, "Create")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg3);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg4);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg5);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg6);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ if (!imparse_isnumber(arg5.s) || !imparse_isnumber(arg6.s))
+ goto invalidargs;
+
+ cmd_create(arg1.s, arg2.s, arg3.s, arg4.s,
+ atoi(arg5.s), sync_atoul(arg6.s));
+ continue;
+ }
+ break;
+ case 'D':
+ if (!strcmp(cmd.s, "Delete")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_delete(arg1.s);
+ continue;
+ } else if (!strcmp(cmd.s, "Delsub")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_changesub(arg1.s, arg2.s, 0);
+ continue;
+ } else if (!strcmp(cmd.s, "Deactivate_sieve")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_deactivate_sieve(arg1.s);
+ continue;
+ } else if (!strcmp(cmd.s, "Delete_sieve")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_delete_sieve(arg1.s, arg2.s);
+ continue;
+ }
+ break;
+ case 'E':
+ if (!strcmp(cmd.s, "Exit")) {
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ prot_printf(sync_out, "OK Finished\r\n");
+ prot_flush(sync_out);
+ goto exit;
+ break;
+ }
+ else if (!sync_userid) goto nologin;
+ else if (!strcmp(cmd.s, "Expunge")) {
+ if (c != ' ') goto missingargs;
+ cmd_expunge(mailbox);
+ continue;
+ }
+
+ break;
+ case 'G':
+ if (!strcmp(cmd.s, "Get_sieve")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_get_sieve(arg1.s, arg2.s);
+ continue;
+ }
+ break;
+ case 'L':
+ if (!strcmp(cmd.s, "Lsub")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_lsub(arg1.s);
+ continue;
+ } else if (!strcmp(cmd.s, "List_annotations")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_list_annotations(arg1.s);
+ continue;
+ } else if (!strcmp(cmd.s, "List_sieve")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_list_sieve(arg1.s);
+ continue;
+ } else if (!strcmp(cmd.s, "Lock")) {
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_lock(&sync_lock);
+ continue;
+ }
+ break;
+ case 'M':
+ if (!strcmp(cmd.s, "Mailboxes")) {
+ if (c != ' ') goto missingargs;
+ cmd_mailboxes();
+ continue;
+ }
+ break;
+ case 'N':
+ if (!strcmp(cmd.s, "Noop")) {
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ prot_printf(sync_out, "OK Noop completed\r\n");
+ continue;
+ }
+ break;
+ case 'Q':
+ if (!strcmp(cmd.s, "Quota")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_quota(arg1.s);
+ continue;
+ }
+ case 'R':
+ if (!strcmp(cmd.s, "Restart")) {
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ prot_printf(sync_out, "OK Restarting\r\n");
+ prot_flush(sync_out);
+ goto exit;
+ break;
+ }
+ else if (!sync_userid) goto nologin;
+ else if (!strcmp(cmd.s, "Rename")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_rename(arg1.s, arg2.s);
+ continue;
+ } else if (!strcmp(cmd.s, "Reset")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_reset(arg1.s);
+ continue;
+ } else if (!strcmp(cmd.s, "Reserve")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+
+ /* Let cmd_reserve() process list of Message-UUIDs */
+ cmd_reserve(arg1.s, message_list);
+ continue;
+ }
+ break;
+ case 'S':
+ if (!strcmp(cmd.s, "Starttls") && tls_enabled()) {
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ /* if we've already done SASL fail */
+ if (sync_userid != NULL) {
+ prot_printf(sync_out,
+ "BAD Can't Starttls after authentication\r\n");
+ continue;
+ }
+
+ /* check if already did a successful tls */
+ if (sync_starttls_done == 1) {
+ prot_printf(sync_out,
+ "BAD Already did a successful Starttls\r\n");
+ continue;
+ }
+ cmd_starttls();
+ continue;
+ }
+ else if (!sync_userid) goto nologin;
+ else if (!strcmp(cmd.s, "Select")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_select(&mailbox, arg1.s);
+ continue;
+ } else if (!strcmp(cmd.s, "Status")) {
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_status(mailbox);
+ continue;
+ } else if (!strcmp(cmd.s, "Setflags")) {
+ if (c != ' ') goto missingargs;
+ cmd_setflags(mailbox);
+ continue;
+ } else if (!strcmp(cmd.s, "Setseen")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg3);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg4);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg5);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg6);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ if (!imparse_isnumber(arg3.s) ||
+ !imparse_isnumber(arg4.s) ||
+ !imparse_isnumber(arg5.s))
+ goto invalidargs;
+
+ cmd_setseen(&mailbox, arg1.s, arg2.s,
+ sync_atoul(arg3.s), sync_atoul(arg4.s),
+ sync_atoul(arg5.s), arg6.s);
+ continue;
+
+ } else if (!strcmp(cmd.s, "Setseen_all")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getbastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_setseen_all(arg1.s, &arg2);
+ continue;
+
+ } else if (!strcmp(cmd.s, "Setacl")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ cmd_setacl(arg1.s, arg2.s);
+ continue;
+ } else if (!strcmp(cmd.s, "Setquota")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ if (strcmp(arg2.s, "-1") &&
+ !imparse_isnumber(arg2.s)) goto invalidargs;
+
+ cmd_setquota(arg1.s, sync_atoul(arg2.s));
+ continue;
+ }
+ else if (!strcmp(cmd.s, "Setannotation")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg3);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg4);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_set_annotation(arg1.s, arg2.s, arg3.s, arg4.s);
+ continue;
+ }
+ break;
+ case 'U':
+ if (!strcmp(cmd.s, "Upload")) {
+ int restart;
+
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c != ' ') goto missingargs;
+
+ if (!imparse_isnumber(arg1.s)) goto invalidargs;
+ if (!imparse_isnumber(arg2.s)) goto invalidargs;
+
+ cmd_upload(mailbox, message_list,
+ sync_atoul(arg1.s), sync_atoul(arg2.s), &restart);
+
+ if (restart) {
+ int hash_size = message_list->hash_size;
+ int file_max = message_list->file_max;
+
+ /* Reset message list */
+ sync_message_list_free(&message_list);
+ message_list
+ = sync_message_list_create(hash_size, file_max);
+ }
+
+ continue;
+ } else if (!strcmp(cmd.s, "Uidlast")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c == EOF) goto missingargs;
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ if (!imparse_isnumber(arg1.s)) goto invalidargs;
+ if (!imparse_isnumber(arg2.s)) goto invalidargs;
+
+ cmd_uidlast(mailbox, sync_atoul(arg1.s), sync_atoul(arg2.s));
+ continue;
+ } else if (!strcmp(cmd.s, "User")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+ cmd_user(arg1.s);
+ continue;
+ } else if (!strcmp(cmd.s, "Upload_sieve")) {
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg1);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg2);
+ if (c != ' ') goto missingargs;
+ c = getastring(sync_in, sync_out, &arg3);
+ if (c != ' ') goto missingargs;
+ if (!imparse_isnumber(arg3.s))
+ goto invalidargs;
+ cmd_upload_sieve(arg1.s, arg2.s, sync_atoul(arg3.s));
+ continue;
+ } else if (!strcmp(cmd.s, "Unlock")) {
+ int restart;
+
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') goto extraargs;
+
+ if ((restart = sync_message_list_need_restart(message_list))) {
+ int hash_size = message_list->hash_size;
+ int file_max = message_list->file_max;
+
+ /* Reset message list */
+ sync_message_list_free(&message_list);
+ message_list
+ = sync_message_list_create(hash_size, file_max);
+ }
+
+ cmd_unlock(&sync_lock, restart);
+ continue;
+ }
+
+ break;
+ }
+
+ prot_printf(sync_out, "BAD Unrecognized command\r\n");
+ eatline(sync_in, c);
+ continue;
+
+ nologin:
+ prot_printf(sync_out, "NO Please authenticate first\r\n");
+ eatline(sync_in, c);
+ continue;
+
+ noperm:
+ prot_printf(sync_out, "NO %s\r\n",
+ error_message(IMAP_PERMISSION_DENIED));
+ eatline(sync_in, c);
+ continue;
+
+
+ missingargs:
+ prot_printf(sync_out, "BAD Missing required argument to %s\r\n", cmd.s);
+ eatline(sync_in, c);
+ continue;
+
+ invalidargs:
+ prot_printf(sync_out, "BAD Invalid argument to %s\r\n", cmd.s);
+ eatline(sync_in, c);
+ continue;
+
+ extraargs:
+ prot_printf(sync_out, "BAD Unexpected extra arguments to %s\r\n", cmd.s);
+ eatline(sync_in, c);
+ continue;
+ }
+
+ exit:
+ if (mailbox) {
+ mailbox_close(mailbox);
+ mailbox = 0;
+ }
+
+ sync_message_list_free(&message_list);
+}
+
+static void cmd_authenticate(char *mech, char *resp)
+{
+ int r, sasl_result;
+ const int *ssfp;
+ char *ssfmsg = NULL;
+ const char *canon_user;
+
+ if (sync_userid) {
+ prot_printf(sync_out, "502 Already authenticated\r\n");
+ return;
+ }
+
+ r = saslserver(sync_saslconn, mech, resp, "", "+ ", "",
+ sync_in, sync_out, &sasl_result, NULL);
+
+ if (r) {
+ int code;
+ const char *errorstring = NULL;
+
+ switch (r) {
+ case IMAP_SASL_CANCEL:
+ prot_printf(sync_out,
+ "BAD Client canceled authentication\r\n");
+ break;
+ case IMAP_SASL_PROTERR:
+ errorstring = prot_error(sync_in);
+
+ prot_printf(sync_out,
+ "NO Error reading client response: %s\r\n",
+ errorstring ? errorstring : "");
+ break;
+ default:
+ /* failed authentication */
+ errorstring = sasl_errstring(sasl_result, NULL, NULL);
+
+ syslog(LOG_NOTICE, "badlogin: %s %s [%s]",
+ sync_clienthost, mech, sasl_errdetail(sync_saslconn));
+
+ sleep(3);
+
+ if (errorstring) {
+ prot_printf(sync_out, "NO %s\r\n", errorstring);
+ } else {
+ prot_printf(sync_out, "NO Error authenticating\r\n");
+ }
+ }
+
+ reset_saslconn(&sync_saslconn);
+ return;
+ }
+
+ /* successful authentication */
+
+ /* get the userid from SASL --- already canonicalized from
+ * mysasl_proxy_policy()
+ */
+ sasl_result = sasl_getprop(sync_saslconn, SASL_USERNAME,
+ (const void **) &canon_user);
+ if (sasl_result != SASL_OK) {
+ prot_printf(sync_out, "NO weird SASL error %d SASL_USERNAME\r\n",
+ sasl_result);
+ syslog(LOG_ERR, "weird SASL error %d getting SASL_USERNAME",
+ sasl_result);
+ reset_saslconn(&sync_saslconn);
+ return;
+ }
+
+ sync_userid = xstrdup(canon_user);
+ proc_register("sync_server", sync_clienthost, sync_userid, (char *)0);
+
+ syslog(LOG_NOTICE, "login: %s %s %s%s %s", sync_clienthost, sync_userid,
+ mech, sync_starttls_done ? "+TLS" : "", "User logged in");
+
+ sasl_getprop(sync_saslconn, SASL_SSF, (const void **) &ssfp);
+
+ /* really, we should be doing a sasl_getprop on SASL_SSF_EXTERNAL,
+ but the current libsasl doesn't allow that. */
+ if (sync_starttls_done) {
+ switch(*ssfp) {
+ case 0: ssfmsg = "tls protection"; break;
+ case 1: ssfmsg = "tls plus integrity protection"; break;
+ default: ssfmsg = "tls plus privacy protection"; break;
+ }
+ } else {
+ switch(*ssfp) {
+ case 0: ssfmsg = "no protection"; break;
+ case 1: ssfmsg = "integrity protection"; break;
+ default: ssfmsg = "privacy protection"; break;
+ }
+ }
+
+ prot_printf(sync_out, "OK Success (%s)\r\n", ssfmsg);
+
+ prot_setsasl(sync_in, sync_saslconn);
+ prot_setsasl(sync_out, sync_saslconn);
+
+ /* Create telemetry log */
+ sync_logfd = telemetry_log(sync_userid, sync_in, sync_out, 0);
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for sync_server!",
+ EC_SOFTWARE);
+}
+
+#ifdef HAVE_SSL
+static void cmd_starttls(void)
+{
+ int result;
+ int *layerp;
+ sasl_ssf_t ssf;
+ char *auth_id;
+
+ if (sync_starttls_done == 1) {
+ prot_printf(sync_out, "NO %s\r\n",
+ "Already successfully executed STARTTLS");
+ return;
+ }
+
+ /* SASL and openssl have different ideas about whether ssf is signed */
+ layerp = (int *) &ssf;
+
+ result=tls_init_serverengine("csync",
+ 5, /* depth to verify */
+ 1, /* can client auth? */
+ 1); /* TLS only? */
+
+ if (result == -1) {
+
+ syslog(LOG_ERR, "error initializing TLS");
+
+ prot_printf(sync_out, "NO %s\r\n", "Error initializing TLS");
+
+ return;
+ }
+
+ prot_printf(sync_out, "OK %s\r\n", "Begin TLS negotiation now");
+ /* must flush our buffers before starting tls */
+ prot_flush(sync_out);
+
+ result=tls_start_servertls(0, /* read */
+ 1, /* write */
+ layerp,
+ &auth_id,
+ &tls_conn);
+
+ /* if error */
+ if (result==-1) {
+ prot_printf(sync_out, "NO Starttls failed\r\n");
+ syslog(LOG_NOTICE, "STARTTLS failed: %s", sync_clienthost);
+ return;
+ }
+
+ /* tell SASL about the negotiated layer */
+ result = sasl_setprop(sync_saslconn, SASL_SSF_EXTERNAL, &ssf);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ saslprops.ssf = ssf;
+
+ result = sasl_setprop(sync_saslconn, SASL_AUTH_EXTERNAL, auth_id);
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+ if(saslprops.authid) {
+ free(saslprops.authid);
+ saslprops.authid = NULL;
+ }
+ if(auth_id)
+ saslprops.authid = xstrdup(auth_id);
+
+ /* tell the prot layer about our new layers */
+ prot_settls(sync_in, tls_conn);
+ prot_settls(sync_out, tls_conn);
+
+ sync_starttls_done = 1;
+
+ dobanner();
+}
+#else
+static void cmd_starttls(void)
+{
+ fatal("cmd_starttls() called, but no OpenSSL", EC_SOFTWARE);
+}
+#endif /* HAVE_SSL */
+
+static int
+user_master_is_local(char *user)
+{
+ int rc = 0;
+#if 0 /* XXX make sure we're not the replica */
+ const char *filename = config_getstring(IMAPOPT_SYNC_MASTER_MAP);
+ unsigned long len;
+ int fd;
+
+ if ((fd = open(filename, O_RDONLY)) < 0)
+ return(0); /* Couldn't open */
+
+ rc = cdb_seek(fd, (unsigned char *)user, strlen(user), &len);
+ close(fd);
+#endif
+ /* rc: -1 => error, 0 => lookup failed, 1 => lookup suceeded */
+ return(rc == 1);
+}
+
+/* ====================================================================== */
+
+/* Routines implementing individual commands for server */
+static void cmd_lock(struct sync_lock *lock)
+{
+ int r;
+#if 0
+ if (user_master_is_local(user)) {
+ prot_printf(sync_out,
+ "NO IMAP_INVALID_USER Attempt to update master for %s\r\n",
+ user);
+ return;
+ }
+#endif
+ r = sync_lock(lock);
+ if (r) {
+ prot_printf(sync_out, "NO Failed to lock: %s\r\n", error_message(r));
+ } else {
+ prot_printf(sync_out, "OK Locked\r\n");
+ }
+}
+
+static void cmd_unlock(struct sync_lock *lock, int restart)
+{
+ int r = 0;
+
+ if ((r = sync_unlock(lock))) {
+ prot_printf(sync_out, "NO Failed to unlock: %s\r\n",
+ error_message(r));
+ } else if (restart) {
+ prot_printf(sync_out, "OK [RESTART] Unlocked\r\n");
+ syslog(LOG_INFO, "Unlocked [RESTART]");
+ } else {
+ prot_printf(sync_out, "OK [CONTINUE] Unlocked\r\n");
+ syslog(LOG_INFO, "Unlocked");
+ }
+}
+
+static void cmd_select(struct mailbox **mailboxp, char *name)
+{
+ static struct mailbox select_mailbox;
+ struct mailbox *mailbox = *mailboxp;
+ int r = 0;
+
+ if (mailbox) {
+ mailbox_close(mailbox);
+ *mailboxp = NULL;
+ }
+
+ /* Open and lock mailbox */
+ r = mailbox_open_header(name, 0, &select_mailbox);
+
+ if (!r) mailbox = &select_mailbox;
+ if (!r) r = mailbox_open_index(mailbox);
+ if (r) {
+ prot_printf(sync_out, "NO Failed to select mailbox \"%s\": %s\r\n",
+ name, error_message(r));
+ if (mailbox) mailbox_close(mailbox);
+ return;
+ }
+ prot_printf(sync_out, "OK %s %lu\r\n",
+ mailbox->uniqueid, mailbox->last_uid);
+ *mailboxp = mailbox;
+}
+
+/* ====================================================================== */
+
+#define RESERVE_DELTA (100)
+
+static void cmd_reserve(char *mailbox_name,
+ struct sync_message_list *message_list)
+{
+ struct mailbox m;
+ struct index_record record;
+ static struct buf arg;
+ int r = 0, c;
+ int mailbox_open = 0;
+ int alloc = RESERVE_DELTA, count = 0, i, msgno;
+ struct message_uuid *ids = xmalloc(alloc*sizeof(struct message_uuid));
+ char *err = NULL;
+ char mailbox_msg_path[MAX_MAILBOX_PATH+1];
+ char *stage_msg_path;
+ struct sync_message *message = NULL;
+ struct message_uuid tmp_uuid;
+
+ if ((r = sync_message_list_newstage(message_list, mailbox_name))) {
+ eatline(sync_in,c);
+ prot_printf(sync_out, "NO %s\r\n", error_message(r));
+ return;
+ }
+
+ /* Parse list of MessageIDs (must appear in same order as folder) */
+ do {
+ c = getastring(sync_in, sync_out, &arg);
+
+ if (!arg.s || !message_uuid_from_text(&tmp_uuid, arg.s)) {
+ err = "Not a MessageID";
+ goto parse_err;
+ }
+
+ if (alloc == count) {
+ alloc += RESERVE_DELTA;
+ ids = xrealloc(ids, (alloc*sizeof(struct message_uuid)));
+ }
+ message_uuid_copy(&ids[count++], &tmp_uuid);
+ } while (c == ' ');
+
+ if (c == EOF) {
+ err = "Unexpected end of sync_in at end of item";
+ goto parse_err;
+ }
+
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') {
+ err = "Invalid end of sequence";
+ goto parse_err;
+ }
+
+ /* Open and lock mailbox */
+ r = mailbox_open_header(mailbox_name, 0, &m);
+
+ if (!r) mailbox_open = 1;
+ if (!r) r = mailbox_open_index(&m);
+
+ if (r) {
+ if (mailbox_open) mailbox_close(&m);
+
+ prot_printf(sync_out, "NO Failed to open %s: %s\n",
+ mailbox_name, error_message(r));
+ goto cleanup;
+ }
+
+ for (i = 0, msgno = 1 ; msgno <= m.exists; msgno++) {
+ mailbox_read_index_record(&m, msgno, &record);
+
+ if (!message_uuid_compare(&record.uuid, &ids[i]))
+ continue;
+
+ if (sync_message_find(message_list, &record.uuid))
+ continue; /* Duplicate UUID on RESERVE list */
+
+ /* Attempt to reserve this message */
+ snprintf(mailbox_msg_path, sizeof(mailbox_msg_path),
+ "%s/%lu.", m.path, record.uid);
+ stage_msg_path = sync_message_next_path(message_list);
+
+ if (mailbox_copyfile(mailbox_msg_path, stage_msg_path, 0) != 0) {
+ syslog(LOG_ERR, "IOERROR: Unable to link %s -> %s: %m",
+ message->msg_path, mailbox_msg_path);
+ i++; /* Failed to reserve message. */
+ continue;
+ }
+
+ /* Reserve succeeded */
+ message = sync_message_add(message_list, &record.uuid);
+ message->msg_size = record.size;
+ message->hdr_size = record.header_size;
+ message->cache_offset = sync_message_list_cache_offset(message_list);
+ message->content_lines = record.content_lines;
+ message->cache_version = record.cache_version;
+ message->cache_size = mailbox_cache_size(&m, msgno);
+
+ sync_message_list_cache(message_list,
+ (char *)(m.cache_base+record.cache_offset),
+ message->cache_size);
+
+ prot_printf(sync_out, "* %s\r\n", message_uuid_text(&record.uuid));
+ i++;
+ }
+ mailbox_close(&m);
+
+ prot_printf(sync_out, "OK Reserve complete\r\n");
+ goto cleanup;
+
+ parse_err:
+ eatline(sync_in, c);
+ prot_printf(sync_out, "BAD Syntax error in Reserve at item %d: %s\r\n",
+ count, err);
+
+ cleanup:
+ free(ids);
+}
+
+/* ====================================================================== */
+
+static void cmd_quota_work(char *quotaroot)
+{
+ struct mailbox m;
+ int mboxopen = 0;
+ int r;
+
+ /* Open and lock mailbox */
+ r = mailbox_open_header(quotaroot, 0, &m);
+
+ if (!r) mboxopen = 1;
+ if (!r) r = quota_read(&m.quota, NULL, 0);
+
+ if (r) {
+ prot_printf(sync_out, "OK 0\r\n");
+ if (mboxopen) mailbox_close(&m);
+ return;
+ }
+
+ prot_printf(sync_out, "OK %d\r\n", m.quota.limit);
+
+ if (mboxopen) mailbox_close(&m);
+}
+
+static void cmd_quota(char *quotaroot)
+{
+ cmd_quota_work(quotaroot);
+}
+
+static void cmd_setquota(char *root, int limit)
+{
+ char quota_path[MAX_MAILBOX_PATH];
+ struct quota quota;
+ int r = 0;
+
+ /* NB: Minimal interface without two phase expunge */
+ r = mboxlist_setquota(root, limit, 1);
+
+ if (r)
+ prot_printf(sync_out, "NO SetQuota failed %s: %s\r\n",
+ root, error_message(r));
+ else
+ prot_printf(sync_out, "OK SetQuota succeeded\r\n");
+}
+
+/* ====================================================================== */
+
+static int addmbox_full(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct sync_folder_list *list = (struct sync_folder_list *) rock;
+
+ /* List all mailboxes, including directories and deleted items */
+
+ sync_folder_list_add(list, name, name, NULL, NULL);
+ return(0);
+}
+
+static int addmbox_sub(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock)
+{
+ struct sync_folder_list *list = (struct sync_folder_list *) rock;
+
+ sync_folder_list_add(list, name, name, NULL, NULL);
+ return(0);
+}
+
+static void cmd_reset(char *user)
+{
+ struct sync_folder_list *list = NULL;
+ struct sync_folder *item;
+ char buf[MAX_MAILBOX_NAME+1];
+ int r = 0;
+
+ /* Nuke subscriptions */
+ list = sync_folder_list_create();
+ r = (sync_namespacep->mboxlist_findsub)(sync_namespacep, "*",
+ sync_userisadmin,
+ user, sync_authstate,
+ addmbox_sub, (void *)list, 1);
+ if (r) goto fail;
+
+ for (item = list->head ; item ; item = item->next) {
+ r = mboxlist_changesub(item->name, sync_userid, sync_authstate, 0, 0);
+ if (r) goto fail;
+ }
+ sync_folder_list_free(&list);
+
+ /* Nuke normal folders */
+ list = sync_folder_list_create();
+
+ (sync_namespacep->mboxname_tointernal)(sync_namespacep, "INBOX",
+ user, buf);
+ strlcat(buf, ".*", sizeof(buf));
+ r = (sync_namespacep->mboxlist_findall)(sync_namespacep, buf,
+ sync_userisadmin,
+ user, sync_authstate,
+ addmbox_full, (void *)list);
+ if (r) goto fail;
+
+ for (item = list->head ; item ; item = item->next) {
+ r=mboxlist_deletemailbox(item->name, sync_userisadmin, sync_userid,
+ sync_authstate, 0, 0, 1);
+
+ if (r) goto fail;
+ }
+ sync_folder_list_free(&list);
+
+ /* Nuke inbox (recursive nuke possible?) */
+ (sync_namespacep->mboxname_tointernal)(sync_namespacep, "INBOX",
+ user, buf);
+ r = mboxlist_deletemailbox(buf, sync_userisadmin, sync_userid,
+ sync_authstate, 0, 0, 1);
+ if (r && (r != IMAP_MAILBOX_NONEXISTENT)) goto fail;
+
+ if ((r=user_deletedata(user, sync_userid, sync_authstate, 1)))
+ goto fail;
+
+ prot_printf(sync_out, "OK Account reset\r\n");
+ return;
+
+ fail:
+ if (list) sync_folder_list_free(&list);
+ prot_printf(sync_out, "NO Failed to reset account %s: %s\r\n",
+ sync_userid, error_message(r));
+}
+
+/* ====================================================================== */
+
+static void cmd_status_work_preload(struct mailbox *mailbox)
+{
+ unsigned long msgno;
+ struct index_record record;
+ int lastuid = 0;
+
+ /* Quietly preload data from index */
+ for (msgno = 1 ; msgno <= mailbox->exists; msgno++) {
+ mailbox_read_index_record(mailbox, msgno, &record);
+
+ /* Fairly pointless, just to ensure that compiler doesn't
+ optimise loop away somehow */
+ if (record.uid <= lastuid)
+ syslog(LOG_ERR, "cmd_status_work_sub(): UIDs out of order!");
+ }
+}
+
+static void cmd_status_work(struct mailbox *mailbox)
+{
+ unsigned long msgno;
+ struct index_record record;
+ int flags_printed, flag;
+
+ for (msgno = 1 ; msgno <= mailbox->exists; msgno++) {
+ mailbox_read_index_record(mailbox, msgno, &record);
+
+ prot_printf(sync_out, "* %lu %s (",
+ record.uid, message_uuid_text(&record.uuid));
+
+ flags_printed = 0;
+
+ if (record.system_flags & FLAG_DELETED)
+ sync_flag_print(sync_out, &flags_printed, "\\deleted");
+ if (record.system_flags & FLAG_ANSWERED)
+ sync_flag_print(sync_out, &flags_printed, "\\answered");
+ if (record.system_flags & FLAG_FLAGGED)
+ sync_flag_print(sync_out, &flags_printed, "\\flagged");
+ if (record.system_flags & FLAG_DRAFT)
+ sync_flag_print(sync_out, &flags_printed, "\\draft");
+
+ for (flag = 0 ; flag < MAX_USER_FLAGS ; flag++) {
+ if (mailbox->flagname[flag] &&
+ (record.user_flags[flag/32] & (1<<(flag&31)) ))
+ sync_flag_print(sync_out,
+ &flags_printed, mailbox->flagname[flag]);
+ }
+
+ prot_printf(sync_out, ")\r\n");
+ }
+}
+
+static void cmd_status(struct mailbox *mailbox)
+{
+ if (!mailbox) {
+ prot_printf(sync_out, "NO Mailbox not open\r\n");
+ return;
+ }
+ cmd_status_work(mailbox);
+ prot_printf(sync_out, "OK %lu\r\n", mailbox->last_uid);
+}
+
+/* ====================================================================== */
+
+static const char *
+seen_parse(const char *s, unsigned long *first_uidp, unsigned long *last_uidp)
+{
+ unsigned long uid;
+
+ if (!isdigit(*s)) {
+ *first_uidp = *last_uidp = 0L;
+ return(NULL);
+ }
+
+ uid = 0;
+ while (isdigit(*s)) {
+ uid *= 10;
+ uid += (*s++) -'0';
+ }
+ *first_uidp = *last_uidp = uid;
+
+ if (*s == ',') {
+ s++;
+ return(s);
+ }
+
+ if (*s == '\0') return(s);
+ if (*s != ':') return(NULL);
+
+ s++;
+ uid = 0;
+ while (isdigit(*s)) {
+ uid *= 10;
+ uid += (*s++) -'0';
+ }
+ *last_uidp = uid;
+
+ if (*s == ',') {
+ s++;
+ return(s);
+ }
+
+ if (*s != '\0') return(NULL);
+
+ return(s);
+}
+
+static char *
+find_return_path(char *hdr)
+{
+ char *next, *s;
+ int len;
+
+ while (*hdr && *hdr != '\r' && *hdr != '\n') {
+ next = hdr;
+ do {
+ next = strchr(next, '\n');
+ if (next)
+ next++;
+ } while (next && (*next == ' ' || *next == '\t'));
+ if (next) *next++ = '\0';
+
+ if (!strncasecmp(hdr, "Return-Path:", strlen("Return-Path:"))) {
+ hdr += strlen("Return-Path:");
+ while ((*hdr == ' ') || (*hdr == '\t'))
+ hdr++;
+
+ /* Don't allow multiline response here */
+ if ((s=strchr(hdr, '\r')) || (s=strchr(hdr, '\n')))
+ *s = '\0';
+
+ len = strlen(hdr);
+ if ((*hdr == '<') && (hdr[len-1] == '>')) {
+ hdr[len-1] = '\0';
+ hdr++;
+ }
+
+ return(hdr);
+ }
+ hdr = next;
+ }
+ return(NULL);
+}
+
+/* ====================================================================== */
+
+static void cmd_upload(struct mailbox *mailbox,
+ struct sync_message_list *message_list,
+ unsigned long new_last_uid, time_t last_appenddate,
+ int *restart)
+
+{
+ struct sync_upload_list *upload_list;
+ struct sync_upload_item *item;
+ struct sync_message *message;
+ static struct buf arg;
+ int c;
+ enum {MSG_SIMPLE, MSG_PARSED, MSG_COPY} msg_type;
+ int r = 0;
+ char *err;
+
+ *restart = 0;
+
+ if (!mailbox) {
+ eatline(sync_in,c);
+ prot_printf(sync_out, "NO Mailbox not selected\r\n");
+ return;
+ }
+
+ if ((r = sync_message_list_newstage(message_list, mailbox->name))) {
+ eatline(sync_in,c);
+ prot_printf(sync_out, "NO %s\r\n", error_message(r));
+ return;
+ }
+
+ upload_list = sync_upload_list_create(new_last_uid, mailbox->flagname);
+
+ do {
+ err = NULL;
+ item = sync_upload_list_add(upload_list);
+
+ /* Parse type */
+ if ((c = getastring(sync_in, sync_out, &arg)) != ' ') {
+ err = "Invalid type";
+ goto parse_err;
+ }
+
+ if (!strcasecmp(arg.s, "SIMPLE")) {
+ msg_type = MSG_SIMPLE;
+ } else if (!strcasecmp(arg.s, "PARSED")) {
+ msg_type = MSG_PARSED;
+ } else if (!strcasecmp(arg.s, "COPY")) {
+ msg_type = MSG_COPY;
+ } else {
+ err = "Invalid type";
+ goto parse_err;
+ }
+
+ /* Get Message-UUID */
+ if ((c = getastring(sync_in, sync_out, &arg)) != ' ') {
+ err = "Invalid sequence ID";
+ goto parse_err;
+ }
+ if (!strcmp(arg.s, "NIL"))
+ message_uuid_set_null(&item->uuid);
+ else if (!message_uuid_from_text(&item->uuid, arg.s)) {
+ err = "Invalid Message-UUID";
+ goto parse_err;
+ }
+
+ /* Parse UID */
+ if ((c = getastring(sync_in, sync_out, &arg)) != ' ') {
+ err = "Invalid UID";
+ goto parse_err;
+ }
+ item->uid = sync_atoul(arg.s);
+
+ /* Parse dates */
+ if (((c = getastring(sync_in, sync_out, &arg)) != ' ') ||
+ ((item->internaldate = sync_atoul(arg.s)) == 0)) {
+ err = "Invalid Internaldate";
+ goto parse_err;
+ }
+
+ if (((c = getastring(sync_in, sync_out, &arg)) != ' ') ||
+ ((item->sentdate = sync_atoul(arg.s)) == 0)) {
+ err = "Invalid Sentdate";
+ goto parse_err;
+ }
+
+ if (((c = getastring(sync_in, sync_out, &arg)) != ' ') ||
+ ((item->last_updated = sync_atoul(arg.s)) == 0)) {
+ err = "Invalid Last update";
+ goto parse_err;
+ }
+
+ /* Parse Flags */
+ c = sync_getflags(sync_in, &item->flags, &upload_list->meta);
+
+ switch (msg_type) {
+ case MSG_SIMPLE:
+ if (c != ' ') {
+ err = "Invalid flags";
+ goto parse_err;
+ }
+
+ if (message_list->cache_buffer_size > 0)
+ sync_message_list_cache_flush(message_list);
+
+ /* YYY Problem: sync_server needs source of Message-UUID for
+ new uploaded messages. Schema 2? */
+
+ message = sync_message_add(message_list, NULL /* YYY */);
+
+ r = sync_getsimple(sync_in, sync_out, message_list, message);
+
+ if (r != 0) {
+ err = "Invalid Message";
+ goto parse_err;
+ }
+ c = prot_getc(sync_in);
+ break;
+ case MSG_PARSED:
+ if (c != ' ') {
+ err = "Invalid flags";
+ goto parse_err;
+ }
+
+ message = sync_message_add(message_list, &item->uuid);
+
+ /* Parse Message (header size, content lines, cache, message body */
+ if ((c = getastring(sync_in, sync_out, &arg)) != ' ') {
+ err = "Invalid Header Size";
+ goto parse_err;
+ }
+ message->hdr_size = sync_atoul(arg.s);
+
+ if ((c = getastring(sync_in, sync_out, &arg)) != ' ') {
+ err = "Invalid Content Lines";
+ goto parse_err;
+ }
+ message->content_lines = sync_atoul(arg.s);
+
+ if ((r=sync_getcache(sync_in, sync_out, message_list, message)) != 0) {
+ err = "Invalid Cache entry";
+ goto parse_err;
+ }
+
+ r = sync_getmessage(sync_in, sync_out, message_list, message);
+
+ if (r != 0) {
+ err = "Invalid Message";
+ goto parse_err;
+ }
+ c = prot_getc(sync_in);
+
+ break;
+ case MSG_COPY:
+ if (!(message=sync_message_find(message_list, &item->uuid))) {
+ err = "Unknown Reserved message";
+ goto parse_err;
+ }
+ break;
+ default:
+ err = "Invalid type";
+ goto parse_err;
+ }
+
+ assert(message != NULL);
+ item->message = message;
+
+ /* if we see a SP, we're trying to upload more than one message */
+ } while (c == ' ');
+
+ if (c == EOF) {
+ err = "Unexpected end of sync_in at end of item";
+ goto parse_err;
+ }
+
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') {
+ err = "Invalid end of sequence";
+ goto parse_err;
+ }
+
+ /* Make sure cache data flushed to disk before we commit */
+ sync_message_fsync(message_list);
+ sync_message_list_cache_flush(message_list);
+
+ r=sync_upload_commit(mailbox, last_appenddate, upload_list, message_list);
+
+ if (r) {
+ prot_printf(sync_out, "NO Failed to commit message upload to %s: %s\r\n",
+ mailbox->name, error_message(r));
+ } else {
+ if ((*restart = sync_message_list_need_restart(message_list)))
+ syslog(LOG_INFO, "UPLOAD: issuing RESTART");
+
+ prot_printf(sync_out, "OK [%s] Upload %lu messages okay\r\n",
+ *restart ? "RESTART" : "CONTINUE", upload_list->count);
+ }
+
+ sync_upload_list_free(&upload_list);
+ return;
+
+ parse_err:
+ eatline(sync_in, c);
+ prot_printf(sync_out, "BAD Syntax error in Append at item %lu: %s\r\n",
+ upload_list->count, err);
+
+ sync_upload_list_free(&upload_list);
+}
+
+/* ====================================================================== */
+
+static void cmd_uidlast(struct mailbox *mailbox, unsigned long last_uid,
+ time_t last_appenddate)
+{
+ if (!mailbox) {
+ prot_printf(sync_out, "NO Mailbox not open\r\n");
+ return;
+ }
+
+ if (sync_uidlast_commit(mailbox, last_uid, last_appenddate) ||
+ mailbox_open_index(mailbox))
+ prot_printf(sync_out, "NO Uidlast failed\r\n");
+ else
+ prot_printf(sync_out, "OK Uidlast succeeded\r\n");
+}
+
+/* ====================================================================== */
+
+static void cmd_setflags(struct mailbox *mailbox)
+{
+ struct sync_flag_list *flag_list
+ = sync_flag_list_create(mailbox->flagname);
+ struct sync_flag_item *item;
+ static struct buf arg;
+ char *err = NULL;
+ int c;
+ int r = 0;
+
+ if (!mailbox) {
+ prot_printf(sync_out, "NO Mailbox not open\r\n");
+ return;
+ }
+
+ do {
+ item = sync_flag_list_add(flag_list);
+ err = NULL;
+
+ /* Parse UID */
+ if ((c = getastring(sync_in, sync_out, &arg)) == EOF)
+ goto bail;
+
+ if ((c != ' ') || ((item->uid = sync_atoul(arg.s)) == 0))
+ err = "Invalid UID";
+ else if (item->uid > mailbox->last_uid)
+ err = "UID out of range";
+ else if ((c=sync_getflags(sync_in,&item->flags,&flag_list->meta))==EOF) {
+ goto bail;
+ } else if ((c != ' ') && (c != '\r') && (c != '\n'))
+ err = "Invalid flags";
+
+ if (err != NULL) {
+ eatline(sync_in, c);
+ prot_printf(sync_out, "BAD Syntax error in Setflags: %s\r\n", err);
+ goto bail;
+ }
+ /* if we see a SP, we're trying to set more than one flag */
+ } while (c == ' ');
+
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') {
+ eatline(sync_in, c);
+ prot_printf(sync_out, "BAD Garbage at end of Setflags sequence\r\n");
+ goto bail;
+ }
+
+ r = sync_setflags_commit(mailbox, flag_list);
+
+ if (r) {
+ prot_printf(sync_out, "NO Failed to commit flag update for %s: %s\r\n",
+ mailbox->name, error_message(r));
+ } else {
+ prot_printf(sync_out, "OK Updated flags on %lu messages okay\r\n",
+ flag_list->count);
+ }
+
+ bail:
+ sync_flag_list_free(&flag_list);
+}
+
+static void cmd_setseen(struct mailbox **mailboxp, char *user, char *mboxname,
+ time_t lastread, unsigned int last_recent_uid,
+ time_t lastchange, char *seenuid)
+{
+ static struct mailbox seen_mailbox;
+ struct mailbox *mailbox = *mailboxp;
+ int r;
+ struct seen *seendb;
+ time_t lastread0, lastchange0;
+ unsigned int last_recent_uid0;
+ char *seenuid0;
+
+ if (mailbox && strcmp(mailbox->name, mboxname)) {
+ mailbox_close(mailbox);
+ mailbox = *mailboxp = NULL;
+ }
+
+ if (!mailbox) {
+ /* Open and lock mailbox */
+ r = mailbox_open_header(mboxname, 0, &seen_mailbox);
+
+ if (!r) mailbox = &seen_mailbox;
+ if (!r) r = mailbox_open_index(mailbox);
+
+ if (r) {
+ prot_printf(sync_out, "NO Failed to select mailbox \"%s\": %s\r\n",
+ mboxname, error_message(r));
+ if (mailbox) mailbox_close(mailbox);
+ *mailboxp = NULL;
+ return;
+ }
+
+ *mailboxp = mailbox;
+ }
+
+ r = seen_open(mailbox, user, SEEN_CREATE, &seendb);
+
+ if (r) {
+ prot_printf(sync_out,
+ "NO failed to open seen database for (%s, %s): %s\r\n",
+ mailbox->name, user, error_message(r));
+ }
+
+ r = seen_lockread(seendb, &lastread0, &last_recent_uid0,
+ &lastchange0, &seenuid0);
+
+ if (!r)
+ r = seen_write(seendb, lastread, last_recent_uid, lastchange, seenuid);
+ seen_close(seendb);
+
+ if (r)
+ prot_printf(sync_out, "NO Setseen Failed on %s %s: %s\r\n",
+ user, mailbox->name, error_message(r));
+ else
+ prot_printf(sync_out, "OK Setseen Suceeded\r\n");
+
+ free(seenuid0);
+}
+
+static void cmd_setseen_all(char *user, struct buf *data)
+{
+ int r = 0;
+ char *seen_file;
+ char fnamebuf[MAX_MAILBOX_PATH + 1024];
+ int filefd;
+
+ seen_file = seen_getpath(user);
+ snprintf(fnamebuf, sizeof(fnamebuf), "%s.%d", seen_file, getpid());
+
+ /* if we haven't opened it, do so */
+ filefd = open(fnamebuf, O_WRONLY|O_TRUNC|O_CREAT, 0640);
+ if (filefd == -1 && errno == ENOENT) {
+ if (cyrus_mkdir(fnamebuf, 0750) == 0) {
+ filefd = open(fnamebuf, O_WRONLY|O_TRUNC|O_CREAT, 0640);
+ }
+ }
+
+ if (filefd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebuf);
+ r = IMAP_IOERROR;
+ }
+
+ if (!r && write(filefd, data->s, data->len) == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
+ r = IMAP_IOERROR;
+ }
+
+ /* we were operating on the seen state, so merge it and cleanup */
+ if (!r) seen_merge(fnamebuf, seen_file);
+
+ free(seen_file);
+ unlink(fnamebuf);
+ if (filefd != -1) close(filefd);
+
+ if (r)
+ prot_printf(sync_out, "NO Setseen_all Failed on %s: %s\r\n",
+ user, error_message(r));
+ else
+ prot_printf(sync_out, "OK Setseen_all Suceeded\r\n");
+}
+
+static void cmd_setacl(char *name, char *acl)
+{
+ int r = mboxlist_sync_setacls(name, acl);
+
+ if (r)
+ prot_printf(sync_out,
+ "NO SetAcl Failed for %s: %s\r\n", name, error_message(r));
+ else
+ prot_printf(sync_out, "OK SetAcl Suceeded\r\n");
+}
+
+
+/* ====================================================================== */
+
+struct uid_list {
+ unsigned long *array;
+ unsigned long alloc;
+ unsigned long current;
+ unsigned long count;
+};
+
+static int cmd_expunge_decide(struct mailbox *mailbox __attribute__((unused)),
+ void *rock, char *indexbuf,
+ int expunge_flags __attribute__((unused)))
+{
+ struct uid_list *uids = (struct uid_list *)rock;
+ unsigned long uid = htonl(*((bit32 *)(indexbuf+OFFSET_UID)));
+ unsigned long first, last, middle, uid2;
+
+ /* Binary chop */
+ first = 0;
+ last = uids->count;
+
+ while (first < last) {
+ middle = (first + last) / 2;
+ uid2 = uids->array[middle];
+
+ if (uid == uid2)
+ return(1); /* Expunge this message */
+ else if (uid2 < uid)
+ first = middle + 1;
+ else
+ last = middle;
+ }
+ return(0);
+}
+
+static void cmd_expunge(struct mailbox *mailbox)
+{
+ static struct buf arg;
+ int c;
+ int r = 0;
+ struct uid_list uids;
+ unsigned long uid;
+
+ if (!mailbox) {
+ prot_printf(sync_out, "NO Mailbox not open\r\n");
+ return;
+ }
+
+ uids.count = 0;
+ uids.current = 0;
+ uids.alloc = 64;
+ uids.array = xmalloc(uids.alloc * sizeof(unsigned long));
+
+ do {
+ if ((c = getastring(sync_in, sync_out, &arg)) == EOF) {
+ free(uids.array);
+ return;
+ }
+ if (!imparse_isnumber(arg.s)) {
+ eatline(sync_in, c);
+ free(uids.array);
+ prot_printf(sync_out, "BAD Non integer argument\r\n");
+ return;
+ }
+ uid = sync_atoul(arg.s);
+
+ if (uids.count == uids.alloc) {
+ uids.alloc *= 2;
+ uids.array = xrealloc(uids.array,uids.alloc*sizeof(unsigned long));
+ }
+
+ if ((uids.count > 0) && (uids.array[uids.count-1] > uid)) {
+ eatline(sync_in, c);
+ free(uids.array);
+ prot_printf(sync_out, "BAD UID list out of order\r\n");
+ return;
+ }
+ uids.array[uids.count++] = uid;
+ } while (c == ' ');
+
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') {
+ prot_printf(sync_out, "BAD Unexpected arguments\r\n");
+ return;
+ }
+
+ if (uids.count > 0) {
+ /* Make sure that messages are removed immediately */
+ r = mailbox_expunge(mailbox, cmd_expunge_decide, (void *)&uids, 0);
+ }
+
+ if (r)
+ prot_printf(sync_out, "NO Expunge failed on %s: %s\r\n",
+ mailbox->name, error_message(r));
+ else
+ prot_printf(sync_out, "OK Expunge Complete\r\n");
+
+ free(uids.array);
+
+ /* Update index on open mailbox to reflect change */
+ r = mailbox_open_index(mailbox);
+ if (r) {
+ syslog(LOG_ERR,
+ "Failed to reopen mailbox %s after expunge: %s",
+ mailbox->name, error_message(r));
+ }
+}
+
+/* ====================================================================== */
+
+static int do_mailbox_single(char *name, int matchlen, int maycreate, void *rock)
+{
+ struct mailbox m;
+ int r;
+ int open = 0;
+ int *livep = (int *)rock;
+
+ r = mailbox_open_header(name, 0, &m);
+ if (!r) open = 1;
+ if (!r) r = mailbox_open_index(&m);
+ if (r) {
+ if (open) mailbox_close(&m);
+ return(r);
+ }
+
+ if (*livep) {
+ prot_printf(sync_out, "** ");
+ sync_printastring(sync_out, m.uniqueid);
+ prot_printf(sync_out, " ");
+ sync_printastring(sync_out, m.name);
+ prot_printf(sync_out, " ");
+ sync_printastring(sync_out, m.acl);
+ prot_printf(sync_out, " %lu", m.last_uid);
+ if (m.quota.root && !strcmp(name, m.quota.root) &&
+ !quota_read(&m.quota, NULL, 0)) {
+ prot_printf(sync_out, " %d", m.quota.limit);
+ }
+ prot_printf(sync_out, "\r\n");
+ cmd_status_work(&m);
+ } else
+ cmd_status_work_preload(&m);
+
+ mailbox_close(&m);
+ return(0);
+}
+
+
+/* ====================================================================== */
+
+static int do_lsub_all_single(char *name, int matchlen, int maycreate,
+ void *rock)
+{
+ prot_printf(sync_out, "*** ");
+ sync_printastring(sync_out, name);
+ prot_printf(sync_out, "\r\n");
+
+ return(0);
+}
+
+#define USER_DELTA (50)
+
+static void cmd_mailboxes()
+{
+ static struct buf arg;
+ int c = ' ';
+ int alloc = USER_DELTA, count = 0, i;
+ char **folder_name = xmalloc(alloc*sizeof(char *));
+ char *err;
+ int live = 1;
+ int r = 0;
+
+ /* Parse list of Folders */
+ do {
+ c = getastring(sync_in, sync_out, &arg);
+
+ if (alloc == count) {
+ alloc += USER_DELTA;
+ folder_name = xrealloc(folder_name, (alloc*sizeof(char *)));
+ }
+ folder_name[count++] = xstrdup(arg.s);
+
+ } while (c == ' ');
+
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') {
+ err = "Invalid end of sequence";
+ goto parse_err;
+ }
+
+ for (i = 0 ; i < count ; i++)
+ do_mailbox_single(folder_name[i], 0, 0, &live);
+
+ prot_printf(sync_out, "OK Mailboxes finished\r\n");
+
+ for (i = 0 ; i < count; i++) free(folder_name[i]);
+ free(folder_name);
+ return;
+
+ parse_err:
+ eatline(sync_in, c);
+ prot_printf(sync_out, "BAD Syntax error in Mailboxes at item %d: %s\r\n",
+ count, err);
+
+ for (i = 0 ; i < count; i++) free(folder_name[i]);
+ free(folder_name);
+}
+
+static void cmd_user(char *userid)
+{
+ char buf[MAX_MAILBOX_PATH];
+ int r;
+ int live = 0;
+ struct sync_sieve_list *sieve_list;
+ struct sync_sieve_item *sieve_item;
+
+ /* Dry run: load all index files into memory before we start
+ * generating sync_out: reduces latency */
+
+ live = 0;
+
+ /* inbox */
+ ((*sync_namespacep).mboxname_tointernal)(sync_namespacep, "INBOX",
+ userid, buf);
+ r = do_mailbox_single(buf, 0, 0, &live);
+
+ if (r) {
+ syslog(LOG_NOTICE, "Failed to access inbox for %s", userid);
+ prot_printf(sync_out,
+ ("NO IMAP_MAILBOX_NONEXISTENT "
+ "Failed to access inbox for %s: %s\r\n"),
+ userid, error_message(r));
+
+ return;
+ }
+
+ /* And then all folders */
+ strlcat(buf, ".*", sizeof(buf));
+ r = ((*sync_namespacep).mboxlist_findall)(sync_namespacep, buf,
+ sync_userisadmin,
+ userid, sync_authstate,
+ do_mailbox_single, &live);
+ if (r) {
+ syslog(LOG_NOTICE,
+ "Failed to enumerate mailboxes for %s", userid);
+ prot_printf(sync_out, "NO Failed to enumerate mailboxes for %s: %s\r\n",
+ userid, error_message(r));
+ return;
+ }
+ /* Live run */
+
+ live = 1;
+
+ /* inbox */
+ ((*sync_namespacep).mboxname_tointernal)(sync_namespacep, "INBOX",
+ userid, buf);
+ r = do_mailbox_single(buf, 0, 0, &live);
+
+ if (r) {
+ syslog(LOG_NOTICE, "Failed to access inbox for %s", userid);
+ prot_printf(sync_out,
+ ("NO IMAP_MAILBOX_NONEXISTENT "
+ "Failed to access inbox for %s: %s\r\n"),
+ userid, error_message(r));
+ return;
+ }
+
+ /* And then all folders */
+ strlcat(buf, ".*", sizeof(buf));
+ r = ((*sync_namespacep).mboxlist_findall)(sync_namespacep, buf,
+ sync_userisadmin,
+ userid, sync_authstate,
+ do_mailbox_single, &live);
+ if (r) {
+ syslog(LOG_NOTICE,
+ "Failed to enumerate mailboxes for %s", userid);
+ prot_printf(sync_out, "NO Failed to enumerate mailboxes for %s: %s\r\n",
+ userid, error_message(r));
+ return;
+ }
+
+ /* LSUB */
+ r = (((*sync_namespacep).mboxlist_findsub)(sync_namespacep, "*",
+ sync_userisadmin,
+ userid, sync_authstate,
+ do_lsub_all_single, NULL, 1));
+
+ if (r) {
+ syslog(LOG_NOTICE,
+ "Failed to enumerate mailboxes for %s", userid);
+ prot_printf(sync_out, "NO Failed to enumerate mailboxes for %s: %s\r\n",
+ userid, error_message(r));
+ return;
+ }
+
+ /* Sieve scripts. Make following subroutine? */
+ /* XXX Error handling here? */
+ if ((sieve_list = sync_sieve_list_generate(sync_userid))) {
+ sieve_item = sieve_list->head;
+ while (sieve_item) {
+ prot_printf(sync_out, "**** ");
+ sync_printastring(sync_out, sieve_item->name);
+ prot_printf(sync_out, " %lu", sieve_item->last_update);
+ if (sieve_item->active)
+ prot_printf(sync_out, " *");
+ prot_printf(sync_out, "\r\n");
+ sieve_item = sieve_item->next;
+ }
+ sync_sieve_list_free(&sieve_list);
+ }
+
+ prot_printf(sync_out, "OK User completed\r\n");
+}
+
+/* ====================================================================== */
+
+static void cmd_create(char *mailboxname, char *partition,
+ char *uniqueid, char *acl,
+ int mbtype, unsigned long uidvalidity)
+{
+ int r;
+ char buf[MAX_MAILBOX_PATH+1];
+ char aclbuf[128];
+ int size;
+
+ if (uniqueid && !strcasecmp(uniqueid, "NIL"))
+ uniqueid = NULL;
+
+ if (acl && !strcasecmp(acl, "NIL"))
+ acl = NULL;
+/* XXX Cambridge specific stuff */
+ if (acl == NULL) {
+ size = strlen(sync_userid) + strlen("\tlrswipcda\tanonymous\t0\t") + 1;
+
+ if (size > sizeof(aclbuf)) {
+ prot_printf(sync_out, "NO Create failed: Username too long\r\n");
+ return;
+ }
+
+ /* Create default ACL, including anonymous 0 flag for FUD */
+ sprintf(aclbuf, "%s\tlrswipcda\tanonymous\t0\t", sync_userid);
+ acl = aclbuf;
+ }
+
+ r = sync_create_commit(mailboxname, partition,
+ uniqueid, acl, mbtype, uidvalidity,
+ 1, sync_userid, sync_authstate);
+
+ if (r)
+ prot_printf(sync_out, "NO Create %s failed: %s\r\n",
+ mailboxname, error_message(r));
+ else
+ prot_printf(sync_out, "OK Create completed\r\n");
+}
+
+static void cmd_delete(char *name)
+{
+ int r;
+
+ /* Delete with admin priveleges */
+ r = mboxlist_deletemailbox(name, sync_userisadmin, sync_userid,
+ sync_authstate, 0, 0, 1);
+
+ if (r)
+ prot_printf(sync_out, "NO Failed to delete %s: %s\r\n",
+ name, error_message(r));
+ else
+ prot_printf(sync_out, "OK Delete completed\r\n");
+}
+
+static void cmd_rename(char *oldmailboxname, char *newmailboxname)
+{
+ int r;
+
+ r = mboxlist_renamemailbox(oldmailboxname, newmailboxname, NULL,
+ 1,sync_userid, sync_authstate);
+
+ if (r)
+ prot_printf(sync_out, "NO Rename failed %s -> %s: %s\r\n",
+ oldmailboxname, newmailboxname, error_message(r));
+ else
+ prot_printf(sync_out, "OK Rename completed\r\n");
+
+}
+
+static int do_lsub_single(char *name, int matchlen, int maycreate, void *rock)
+{
+ prot_printf(sync_out, "* ");
+ sync_printastring(sync_out, name);
+ prot_printf(sync_out, "\r\n");
+
+ return(0);
+}
+
+static void cmd_lsub(char *user)
+{
+ char buf[MAX_MAILBOX_PATH];
+ int r;
+
+ r = ((*sync_namespacep).mboxlist_findsub)(sync_namespacep, "*",
+ sync_userisadmin,
+ user, sync_authstate,
+ do_lsub_single, NULL, 1);
+
+ if (r) {
+ syslog(LOG_NOTICE,
+ "Failed to enumerate subscriptions for %s", user);
+ prot_printf(sync_out, "NO Failed to enumerate subscriptions for %s: %s\r\n",
+ user, error_message(r));
+ } else
+ prot_printf(sync_out, "OK Lsub completed\r\n");
+}
+
+static void cmd_changesub(char *user, char *name, int add)
+{
+ char mboxname[MAX_MAILBOX_PATH+1];
+ int r;
+
+ if (!strncasecmp(name, "inbox", 5)) {
+ ((*sync_namespacep).mboxname_tointernal)(sync_namespacep, "INBOX",
+ user, mboxname);
+ strlcat(mboxname, name+5, sizeof(mboxname));
+ }
+ else
+ strlcpy(mboxname, name, sizeof(mboxname));
+
+ r = mboxlist_changesub(mboxname, user, sync_authstate, add, add);
+
+ if (r) {
+ prot_printf(sync_out, "NO %s %s %s failed: %s\r\n",
+ add ? "Addsub" : "Delsub",
+ user, name, error_message(r));
+ } else
+ prot_printf(sync_out, "OK %s completed\r\n",
+ add ? "Addsub" : "Delsub");
+}
+
+/* ====================================================================== */
+
+static int find_cb(const char *mailbox __attribute__((unused)),
+ const char *entry, const char *userid,
+ struct annotation_data *attrib,
+ void *rock __attribute__((unused)))
+{
+ prot_printf(sync_out, "* ");
+ sync_printastring(sync_out, entry);
+ prot_printf(sync_out, " ");
+ sync_printastring(sync_out, userid);
+ prot_printf(sync_out, " ");
+ sync_printastring(sync_out, attrib->value);
+ prot_printf(sync_out, "\r\n");
+
+ return 0;
+}
+
+static void cmd_list_annotations(char *mailboxname)
+{
+ annotatemore_findall(mailboxname, "*", &find_cb, NULL, NULL);
+
+ prot_printf(sync_out, "OK List_annotations completed\r\n");
+}
+
+/* ====================================================================== */
+
+static void cmd_list_sieve(char *user)
+{
+ struct sync_sieve_list *list;
+ struct sync_sieve_item *item;
+
+ if(config_getswitch(IMAPOPT_SIEVEUSEHOMEDIR)) {
+ /* XXX No use to us */
+ prot_printf(sync_out, "OK List_sieve+sieveusehomedir not implemented\r\n");
+ return;
+ }
+
+ if (!(list = sync_sieve_list_generate(user))) {
+ prot_printf(sync_out, "OK No sieve scripts currently active\r\n");
+ return;
+ }
+
+ for (item = list->head ; item ; item = item->next) {
+ prot_printf(sync_out, "* ");
+ sync_printstring(sync_out, item->name);
+ prot_printf(sync_out, " %lu", item->last_update);
+ if (item->active)
+ prot_printf(sync_out, " *");
+ prot_printf(sync_out, "\r\n");
+ }
+ sync_sieve_list_free(&list);
+
+ prot_printf(sync_out, "OK List_sieve completed\r\n");
+}
+
+static void cmd_get_sieve(char *user, char *name)
+{
+ char *s, *sieve;
+ unsigned long size;
+
+ if ((sieve = sync_sieve_read(user, name, &size))) {
+ prot_printf(sync_out, "OK {%lu+}\r\n", size);
+
+ s = sieve;
+ while (size) {
+ prot_putc(*s, sync_out);
+ s++;
+ size--;
+ }
+ prot_printf(sync_out, "\r\n");
+ free(sieve);
+ } else
+ prot_printf(sync_out, "NO No such sieve file\r\n");
+}
+
+static void cmd_upload_sieve(char *user, char *name, unsigned long last_update)
+{
+ int r;
+ int c;
+
+ r = sync_sieve_upload(sync_in, sync_out, user, name, last_update);
+
+ c = prot_getc(sync_in);
+ if (c == '\r') c = prot_getc(sync_in);
+ if (c != '\n') {
+ prot_printf(sync_out, "BAD Unexpected arguments\r\n");
+ return;
+ }
+
+ if (r)
+ prot_printf(sync_out, "NO Upload_sieve failed: %s\r\n", error_message(r));
+ else
+ prot_printf(sync_out, "OK Upload_sieve completed\r\n");
+}
+
+static void cmd_activate_sieve(char *user, char *name)
+{
+ int r;
+
+ r = sync_sieve_activate(user, name);
+
+ if (r)
+ prot_printf(sync_out, "NO Activate_sieve %s failed: %s\r\n",
+ user, error_message(r));
+ else
+ prot_printf(sync_out, "OK Activate_sieve completed\r\n");
+}
+
+static void cmd_deactivate_sieve(char *user)
+{
+ int r;
+
+ r = sync_sieve_deactivate(user);
+
+ if (r) {
+ prot_printf(sync_out, "NO Deactivate_sieve %s failed: %s\r\n",
+ user, error_message(r));
+ } else {
+ prot_printf(sync_out, "OK Deactivate_sieve completed\r\n");
+ }
+}
+
+static void cmd_delete_sieve(char *user, char *name)
+{
+ int r;
+
+ r = sync_sieve_delete(user, name);
+
+ if (r)
+ prot_printf(sync_out, "NO Delete_sieve %s failed: %s\r\n",
+ user, error_message(r));
+ else
+ prot_printf(sync_out, "OK Delete_sieve completed\r\n");
+}
+
+/* ====================================================================== */
+
+static void cmd_set_annotation(char *mailboxname, char *entry, char *userid,
+ char *value)
+{
+ int r;
+ struct entryattlist *entryatts = NULL;
+ struct attvaluelist *attvalues = NULL;
+
+ appendattvalue(&attvalues, *userid ? "value.priv" : "value.shared", value);
+ appendentryatt(&entryatts, entry, attvalues);
+
+ /* annotatemore_store() expects external mailbox names,
+ so translate the separator character */
+ mboxname_hiersep_toexternal(sync_namespacep, mailboxname, 0);
+ r = annotatemore_store(mailboxname, entryatts, sync_namespacep,
+ sync_userisadmin, userid, sync_authstate);
+
+ freeentryatts(entryatts);
+
+ if (r) {
+ mboxname_hiersep_tointernal(sync_namespacep, mailboxname, 0);
+ prot_printf(sync_out, "NO Setannotation %s failed: %s %s %s %s\r\n",
+ mailboxname, entry, userid, value, error_message(r));
+ }
+ else
+ prot_printf(sync_out, "OK Setannotation completed\r\n");
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1912 @@
+/* sync_support.c -- Cyrus synchonization support functions
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_support.c,v 1.1.2.19 2006/06/14 18:03:24 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <syslog.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <utime.h>
+
+#include "global.h"
+#include "assert.h"
+#include "mboxlist.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "quota.h"
+#include "xmalloc.h"
+#include "acl.h"
+#include "seen.h"
+#include "mboxname.h"
+#include "map.h"
+#include "imapd.h"
+#include "imparse.h"
+#include "message.h"
+#include "util.h"
+#include "retry.h"
+#include "lock.h"
+#include "prot.h"
+#include "sync_support.h"
+#include "sync_commit.h"
+
+/* Parse routines */
+
+enum {
+ MAXQUOTED = 8192,
+ MAXWORD = 8192,
+ MAXLITERAL = INT_MAX / 20
+};
+
+/* Get a simple line (typically error text) */
+#define BUFGROWSIZE 100
+int sync_getline(struct protstream *in, struct buf *buf)
+{
+ int len = 0;
+ int c;
+
+ if (buf->alloc == 0) {
+ buf->alloc = BUFGROWSIZE;
+ buf->s = xmalloc(buf->alloc+1);
+ }
+
+ for (;;) {
+ c = prot_getc(in);
+
+ if (c == EOF || (c == '\r') || (c == '\n')) {
+ /* Munch optional LF after CR */
+ if (c == '\r' && ((c = prot_getc(in)) != EOF && c != '\n')) {
+ prot_ungetc(c, in);
+ c = '\r';
+ }
+ buf->s[len] = '\0';
+ buf->len = len;
+ return c;
+ }
+ if (len == buf->alloc) {
+ buf->alloc += BUFGROWSIZE;
+ buf->s = xrealloc(buf->s, buf->alloc+1);
+ if (len > MAXWORD) {
+ fatal("word too long", EC_IOERR);
+ }
+ }
+ buf->s[len++] = c;
+ }
+ return(c);
+}
+
+/*
+ * Eat lines up to next OK/NO/BAD response line
+ *
+ */
+
+int sync_eatlines_unsolicited(struct protstream *in, int c)
+{
+ static struct buf response; /* BSS */
+ static struct buf line; /* BSS */
+
+ if (c != '\n') {
+ sync_getline(in, &line); /* Partial line */
+ syslog(LOG_ERR, "Discarding: %s", line.s);
+ }
+
+ do {
+ if ((c = getword(in, &response)) == EOF)
+ return(IMAP_PROTOCOL_ERROR);
+
+ sync_getline(in, &line);
+ syslog(LOG_ERR, "Discarding: %s", line.s);
+ } while (response.s[0] == '*');
+
+ if (!strcmp(response.s, "OK") ||
+ !strcmp(response.s, "NO") ||
+ !strcmp(response.s, "BAD")) {
+ syslog(LOG_ERR, "sync_eatlines_unsolicited(): resynchronised okay");
+ return(0);
+ }
+
+ syslog(LOG_ERR, "sync_eatlines_unsolicited(): failed to resynchronise!");
+ return(IMAP_PROTOCOL_ERROR);
+}
+
+/* ====================================================================== */
+
+/*
+ * Print 's' as a quoted-string or literal (but not an atom)
+ */
+void sync_printstring(struct protstream *out, const char *s)
+{
+ const char *p;
+ int len = 0;
+
+ /* Look for any non-QCHAR characters */
+ for (p = s; *p && len < 1024; p++) {
+ len++;
+ if (*p & 0x80 || *p == '\r' || *p == '\n'
+ || *p == '\"' || *p == '%' || *p == '\\') break;
+ }
+
+ /* if it's too long, literal it */
+ if (*p || len >= 1024) {
+ prot_printf(out, "{%lu+}\r\n%s", strlen(s), s);
+ } else {
+ prot_printf(out, "\"%s\"", s);
+ }
+}
+
+/*
+ * Print 's' as an atom, quoted-string, or literal
+ */
+void sync_printastring(struct protstream *out, const char *s)
+{
+ const char *p;
+ int len = 0;
+
+ if (!s || !*s) {
+ prot_printf(out, "\"\"");
+ return;
+ }
+
+ if (imparse_isatom(s)) {
+ prot_printf(out, "%s", s);
+ return;
+ }
+
+ /* Look for any non-QCHAR characters */
+ for (p = s; *p && len < 1024; p++) {
+ len++;
+ if (*p & 0x80 || *p == '\r' || *p == '\n'
+ || *p == '\"' || *p == '%' || *p == '\\') break;
+ }
+
+ /* if it's too long, literal it */
+ if (*p || len >= 1024) {
+ prot_printf(out, "{%lu+}\r\n%s", strlen(s), s);
+ } else {
+ prot_printf(out, "\"%s\"", s);
+ }
+}
+
+void sync_flag_print(struct protstream *output, int *have_onep, char *value)
+{
+ if (*have_onep)
+ prot_putc(' ', output);
+
+ prot_printf(output, "%s", value);
+ *have_onep = 1;
+}
+
+/* ====================================================================== */
+
+int sync_parse_code(char *cmd, struct protstream *in, int eat,
+ int *unsolicitedp)
+{
+ static struct buf response; /* BSS */
+ static struct buf errmsg;
+ int c;
+ char *s;
+
+ if (unsolicitedp) *unsolicitedp = 0;
+
+ if ((c = getword(in, &response)) == EOF)
+ return(IMAP_PROTOCOL_ERROR);
+
+ if (c != ' ') goto parse_err;
+
+ if (!strcmp(response.s, "OK")) {
+ if (eat == SYNC_PARSE_EAT_OKLINE) eatline(in, c);
+ return(0);
+ } else if (!strcmp(response.s, "NO")) {
+ sync_getline(in, &errmsg);
+ syslog(LOG_ERR, "%s received NO response: %s", cmd, errmsg.s);
+
+ /* Slight hack to transform certain error strings into equivalent
+ * imap_err value so that caller has some idea of cause */
+ if (!strncmp(errmsg.s, "IMAP_INVALID_USER ",
+ strlen("IMAP_INVALID_USER ")))
+ return(IMAP_INVALID_USER);
+ else if (!strncmp(errmsg.s, "IMAP_MAILBOX_NONEXISTENT ",
+ strlen("IMAP_MAILBOX_NONEXISTENT ")))
+ return(IMAP_MAILBOX_NONEXISTENT);
+ else
+ return(IMAP_REMOTE_DENIED);
+ } else if (response.s[0] != '*')
+ goto parse_err;
+
+ /* Unsolicited response */
+ if (!unsolicitedp) goto parse_err;
+
+ for (s = response.s; *s ; s++)
+ if (*s != '*') goto parse_err;
+
+ *unsolicitedp = s - response.s;
+ return(0);
+
+ parse_err:
+ sync_getline(in, &errmsg);
+ syslog(LOG_ERR, "%s received %s response: %s",
+ cmd, response.s, errmsg.s);
+ return(IMAP_PROTOCOL_ERROR);
+}
+
+/* ====================================================================== */
+
+void sync_flags_clear(struct sync_flags *flags)
+{
+ memset(flags, 0, sizeof(struct sync_flags));
+}
+
+void sync_flags_meta_clear(struct sync_flags_meta *meta)
+{
+ memset(meta, 0, sizeof(struct sync_flags_meta));
+}
+
+void sync_flags_meta_free(struct sync_flags_meta *meta)
+{
+ int n;
+
+ for (n = 0; n < MAX_USER_FLAGS; n++) {
+ if (meta->flagname[n])
+ free(meta->flagname[n]);
+ }
+}
+
+static void sync_flags_meta_from_list(struct sync_flags_meta *meta,
+ char **flagname)
+{
+ int n;
+
+ for (n = 0; n < MAX_USER_FLAGS; n++) {
+ if (flagname[n])
+ meta->flagname[n] = xstrdup(flagname[n]);
+ else
+ meta->flagname[n] = NULL;
+ }
+
+ meta->newflags = 0;
+}
+
+void sync_flags_meta_to_list(struct sync_flags_meta *meta, char **flagname)
+{
+ int n;
+
+ for (n = 0; n < MAX_USER_FLAGS; n++) {
+ if (flagname[n] && meta->flagname[n] &&
+ !strcmp(flagname[n], meta->flagname[n]))
+ continue;
+
+ if (meta->flagname[n])
+ flagname[n] = xstrdup(meta->flagname[n]);
+ else
+ flagname[n] = NULL;
+ }
+
+ meta->newflags = 0;
+}
+
+int sync_getflags(struct protstream *input,
+ struct sync_flags *flags, struct sync_flags_meta *meta)
+{
+ static struct buf flagtoken; /* Relies on zeroed BSS */
+ int inlist = 0;
+ int flag = -1;
+ int empty = -1;
+ int c, i;
+ char *s;
+
+ sync_flags_clear(flags);
+
+ for (;;) {
+ if ((c = getword(input, &flagtoken)) == EOF)
+ return(EOF);
+
+ s = flagtoken.s;
+
+ if (c == '(' && !s[0] && !inlist) {
+ inlist = 1;
+ continue;
+ }
+ if (!s[0]) break;
+
+ if (s[0] == '\\') {
+ /* System flags */
+ lcase(s);
+ if (!strcmp(s, "\\seen")) {
+ /* flags->seen = 1; */
+ } else if (!strcasecmp(s, "\\answered")) {
+ flags->system_flags |= FLAG_ANSWERED;
+ } else if (!strcasecmp(s, "\\flagged")) {
+ flags->system_flags |= FLAG_FLAGGED;
+ } else if (!strcasecmp(s, "\\deleted")) {
+ flags->system_flags |= FLAG_DELETED;
+ } else if (!strcasecmp(s, "\\draft")) {
+ flags->system_flags |= FLAG_DRAFT;
+ } else {
+ syslog(LOG_ERR, "Unknown system flag: %s", s);
+ }
+ } else if (imparse_isatom(s)) {
+ flag = empty = (-1);
+ for (i = 0 ; i < MAX_USER_FLAGS ; i++) {
+ if (meta->flagname[i] && !strcmp(meta->flagname[i], s)) {
+ flag = i;
+ break;
+ }
+ if ((empty < 0) && (meta->flagname[i] == NULL))
+ empty = i;
+ }
+ if ((flag < 0) && (empty >= 0)) {
+ flag = empty;
+ meta->flagname[flag] = xstrdup(s);
+ meta->newflags = 1; /* Have new user flag */
+ }
+ if (flag >= 0) {
+ flags->user_flags[flag/32] |= 1<<(flag&31);
+ } else {
+ syslog(LOG_ERR, "Unable to record user flag: %s", s);
+ }
+ } else
+ return('-'); /* Force parse error */
+
+ if (c != ' ') break;
+ }
+
+ if (!inlist || (c != ')'))
+ return('-'); /* Force parse error */
+
+ return(prot_getc(input));
+}
+
+/* ====================================================================== */
+
+/* sync_msg stuff */
+
+struct sync_msg_list *sync_msg_list_create(char **flagname,
+ unsigned long last_uid)
+{
+ struct sync_msg_list *l = xzmalloc(sizeof (struct sync_msg_list));
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+ l->last_uid = last_uid;
+ sync_flags_meta_clear(&l->meta);
+
+ if (flagname)
+ sync_flags_meta_from_list(&l->meta, flagname);
+
+ return(l);
+}
+
+struct sync_msg *sync_msg_list_add(struct sync_msg_list *l)
+{
+ struct sync_msg *result = xzmalloc(sizeof(struct sync_msg));
+
+ if (l->tail)
+ l->tail = l->tail->next = result;
+ else
+ l->head = l->tail = result;
+
+ l->count++;
+
+ return(result);
+}
+
+void sync_msg_list_free(struct sync_msg_list **lp)
+{
+ struct sync_msg_list *l = *lp;
+ struct sync_msg *current, *next;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+ free(current);
+ current = next;
+ }
+ sync_flags_meta_free(&l->meta);
+ free(l);
+
+ *lp = NULL;
+}
+
+
+/* ====================================================================== */
+
+struct sync_msgid_list *sync_msgid_list_create(int hash_size)
+{
+ struct sync_msgid_list *l = xzmalloc(sizeof (struct sync_msgid_list));
+
+ /* Pick a sensible default if no size given */
+ if (hash_size == 0)
+ hash_size = 256;
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->hash_size = hash_size;
+ l->hash = xzmalloc(hash_size * sizeof(struct sync_msgid *));
+ l->count = 0;
+ l->reserved = 0;
+
+ return(l);
+}
+
+struct sync_msgid *sync_msgid_add(struct sync_msgid_list *l,
+ struct message_uuid *uuid)
+{
+ struct sync_msgid *result;
+ int offset;
+
+ if (message_uuid_isnull(uuid))
+ return(NULL);
+
+ result = xzmalloc(sizeof(struct sync_msgid));
+ offset = message_uuid_hash(uuid, l->hash_size);
+
+ message_uuid_copy(&result->uuid, uuid);
+
+ l->count++;
+ if (l->tail)
+ l->tail = l->tail->next = result;
+ else
+ l->head = l->tail = result;
+
+ /* Insert at start of list */
+ result->hash_next = l->hash[offset];
+ l->hash[offset] = result;
+
+ return(result);
+}
+
+void sync_msgid_list_free(struct sync_msgid_list **lp)
+{
+ struct sync_msgid_list *l = *lp;
+ struct sync_msgid *current, *next;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+ free(current);
+ current = next;
+ }
+ free(l->hash);
+ free(l);
+
+ *lp = NULL;
+}
+
+struct sync_msgid *sync_msgid_lookup(struct sync_msgid_list *l,
+ struct message_uuid *uuid)
+{
+ int offset = message_uuid_hash(uuid, l->hash_size);
+ struct sync_msgid *msgid;
+
+ if (message_uuid_isnull(uuid))
+ return(NULL);
+
+ for (msgid = l->hash[offset] ; msgid ; msgid = msgid->hash_next) {
+ if (message_uuid_compare(&msgid->uuid, uuid))
+ return(msgid);
+ }
+ return(NULL);
+}
+
+/* ====================================================================== */
+
+struct sync_folder_list *sync_folder_list_create(void)
+{
+ struct sync_folder_list *l = xzmalloc(sizeof (struct sync_folder_list));
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+
+ return(l);
+}
+
+struct sync_folder *sync_folder_list_add(struct sync_folder_list *l,
+ char *id, char *name, char *acl,
+ struct quota *quota)
+{
+ struct sync_folder *result = xzmalloc(sizeof(struct sync_folder));
+
+ if (l->tail)
+ l->tail = l->tail->next = result;
+ else
+ l->head = l->tail = result;
+
+ l->count++;
+
+ result->next = NULL;
+ result->msglist = NULL;
+ result->id = (id) ? xstrdup(id) : NULL;
+ result->name = (name) ? xstrdup(name) : NULL;
+ result->acl = (acl) ? xstrdup(acl) : NULL;
+ if (quota) {
+ result->quota.root = result->name;
+ result->quota.limit = quota->limit;
+ }
+ result->mark = 0;
+ result->reserve = 0;
+
+ return(result);
+}
+
+struct sync_folder *sync_folder_lookup(struct sync_folder_list *l, char *id)
+{
+ struct sync_folder *p;
+
+ for (p = l->head ; p ; p = p->next) {
+ if (!strcmp(p->id, id))
+ return(p);
+ }
+ return(NULL);
+}
+
+struct sync_folder *sync_folder_lookup_byname(struct sync_folder_list *l,
+ char *name)
+{
+ struct sync_folder *p;
+
+ for (p = l->head ; p ; p = p->next) {
+ if (!strcmp(p->name, name))
+ return(p);
+ }
+ return(NULL);
+}
+
+int sync_folder_mark(struct sync_folder_list *l, char *id)
+{
+ struct sync_folder *p;
+
+ for (p = l->head ; p ; p = p->next) {
+ if (!strcmp(p->id, id)) {
+ p->mark = 1;
+ return(1);
+ }
+ }
+ return(0);
+}
+
+void sync_folder_list_free(struct sync_folder_list **lp)
+{
+ struct sync_folder_list *l = *lp;
+ struct sync_folder *current, *next;
+
+ if (!l) return;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+
+ if (current->id) free(current->id);
+ if (current->name) free(current->name);
+ if (current->acl) free(current->acl);
+ if (current->msglist) sync_msg_list_free(¤t->msglist);
+
+ free(current);
+ current = next;
+ }
+ free(l);
+ *lp = NULL;
+}
+
+/* ====================================================================== */
+
+struct sync_rename_list *sync_rename_list_create(void)
+{
+ struct sync_rename_list *l = xzmalloc(sizeof (struct sync_rename_list));
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+ l->done = 0;
+
+ return(l);
+}
+
+struct sync_rename_item *sync_rename_list_add(struct sync_rename_list *l,
+ char *id, char *oldname,
+ char *newname)
+{
+ struct sync_rename_item *result
+ = xzmalloc(sizeof(struct sync_rename_item));
+
+ if (l->tail)
+ l->tail = l->tail->next = result;
+ else
+ l->head = l->tail = result;
+
+ l->count++;
+
+ result->next = NULL;
+ result->id = xstrdup(id);
+ result->oldname = xstrdup(oldname);
+ result->newname = xstrdup(newname);
+ result->done = 0;
+
+ return(result);
+}
+
+struct sync_rename_item *sync_rename_lookup(struct sync_rename_list *l,
+ char *oldname)
+{
+ struct sync_rename_item *p;
+
+ for (p = l->head ; p ; p = p->next) {
+ if (!strcmp(p->oldname, oldname))
+ return(p);
+ }
+ return(NULL);
+}
+
+void sync_rename_list_free(struct sync_rename_list **lp)
+{
+ struct sync_rename_list *l = *lp;
+ struct sync_rename_item *current, *next;
+
+ if (!l) return;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+
+ free(current->id);
+ free(current->oldname);
+ free(current->newname);
+ free(current);
+ current = next;
+ }
+ free(l);
+ *lp = NULL;
+}
+
+/* ====================================================================== */
+
+struct sync_user_list *sync_user_list_create(void)
+{
+ struct sync_user_list *l = xzmalloc(sizeof (struct sync_user_list));
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+
+ return(l);
+}
+
+struct sync_user *sync_user_list_add(struct sync_user_list *l, char *userid)
+{
+ struct sync_user *result = xzmalloc(sizeof(struct sync_user));
+
+ if (l->tail)
+ l->tail = l->tail->next = result;
+ else
+ l->head = l->tail = result;
+
+ l->count++;
+
+ result->next = NULL;
+ result->userid = xstrdup(userid);
+ result->folder_list = sync_folder_list_create();
+
+ return(result);
+}
+
+struct sync_user *sync_user_list_lookup(struct sync_user_list *l, char *userid)
+{
+ struct sync_user *p;
+
+ for (p = l->head ; p ; p = p->next) {
+ if (!strcmp(p->userid, userid))
+ return(p);
+ }
+ return(NULL);
+}
+
+
+void sync_user_list_free(struct sync_user_list **lp)
+{
+ struct sync_user_list *l = *lp;
+ struct sync_user *current, *next;
+
+ if (!l) return;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+
+ free(current->userid);
+ sync_folder_list_free(¤t->folder_list);
+
+ free(current);
+ current = next;
+ }
+ free(l);
+ *lp = NULL;
+}
+
+/* ====================================================================== */
+
+struct sync_message_list *sync_message_list_create(int hash_size, int file_max)
+{
+ struct sync_message_list *l = xzmalloc(sizeof (struct sync_message_list));
+ const char *root;
+
+ /* Pick a sensible default if no size given */
+ if (hash_size == 0)
+ hash_size = 256;
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->hash = xzmalloc(hash_size * sizeof(struct sync_msgid *));
+ l->hash_size = hash_size;
+ l->count = 0;
+
+ l->file = xzmalloc(file_max * sizeof(FILE *));
+ l->file_count = 0;
+ l->file_max = file_max;
+
+ /* Set up cache file */
+ root = config_partitiondir(config_defpartition);
+
+ snprintf(l->cache_name, sizeof(l->cache_name), "%s/sync./%lu.cache",
+ root, (unsigned long) getpid());
+
+ l->cache_fd = open(l->cache_name, O_RDWR|O_CREAT|O_TRUNC, 0666);
+ if (l->cache_fd < 0 && errno == ENOENT) {
+ if (!cyrus_mkdir(l->cache_name, 0755)) {
+ l->cache_fd = open(l->cache_name, O_RDWR|O_CREAT|O_TRUNC, 0666);
+ }
+ }
+ if (l->cache_fd < 0) {
+ syslog(LOG_ERR, "Failed to open %s: %m", l->cache_name);
+ return(NULL);
+ }
+ l->cache_base = 0;
+ l->cache_len = 0;
+
+ l->cache_buffer_size = 0;
+ l->cache_buffer_alloc = SYNC_MESSAGE_INIT_CACHE;
+ l->cache_buffer = xmalloc(l->cache_buffer_alloc);
+ return(l);
+}
+
+int sync_message_list_newstage(struct sync_message_list *l, char *mboxname)
+{
+ int r;
+ const char *root;
+ char *partition;
+
+ /* Find mailbox partition */
+ r = mboxlist_detail(mboxname, NULL, NULL, NULL, &partition, NULL, NULL);
+ if (!r) {
+ root = config_partitiondir(partition);
+ if (!root) r = IMAP_PARTITION_UNKNOWN;
+ }
+ if (r) {
+ syslog(LOG_ERR, "couldn't find sync stage directory for mbox: '%s': %s",
+ mboxname, error_message(r));
+ return r;
+ }
+
+ snprintf(l->stage_dir, sizeof(l->stage_dir), "%s/sync./%lu",
+ root, (unsigned long) getpid());
+
+ if (cyrus_mkdir(l->stage_dir, 0755) == -1) return IMAP_IOERROR;
+ if (mkdir(l->stage_dir, 0755) == -1 && errno != EEXIST) {
+ syslog(LOG_ERR, "Failed to create %s:%m", l->stage_dir);
+ return IMAP_IOERROR;
+ }
+
+ return 0;
+}
+
+void sync_message_list_cache(struct sync_message_list *l, char *entry, int size)
+{
+ if ((l->cache_buffer_size + size) > l->cache_buffer_alloc) {
+ if (size > l->cache_buffer_alloc)
+ l->cache_buffer_alloc = 2 * size; /* _Big_ cache entry! */
+ else
+ l->cache_buffer_alloc *= 2;
+
+ l->cache_buffer = xrealloc(l->cache_buffer, l->cache_buffer_alloc);
+ }
+ memcpy(l->cache_buffer+l->cache_buffer_size, entry, size);
+ l->cache_buffer_size += size;
+}
+
+int sync_message_list_cache_flush(struct sync_message_list *l)
+{
+ int n;
+
+ if (l->cache_buffer_size == 0)
+ return(0);
+
+ n = retry_write(l->cache_fd, l->cache_buffer, l->cache_buffer_size);
+
+ if (n < l->cache_buffer_size) {
+ syslog(LOG_ERR,
+ "sync_message_flush_cache(): failed to write %lu bytes: %m",
+ l->cache_buffer_size);
+
+ return(IMAP_IOERROR);
+ }
+
+ l->cache_buffer_size = 0;
+ return(0);
+}
+
+unsigned long sync_message_list_cache_offset(struct sync_message_list *l)
+{
+ return(lseek(l->cache_fd, 0, SEEK_CUR) + l->cache_buffer_size);
+}
+
+char *sync_message_next_path(struct sync_message_list *l)
+{
+ static char result[MAX_MAILBOX_PATH+1];
+
+ snprintf(result, sizeof(result), "%s/%lu.", l->stage_dir, l->count);
+
+ return(result);
+}
+
+struct sync_message *sync_message_add(struct sync_message_list *l,
+ struct message_uuid *uuid)
+{
+ struct sync_message *result;
+ int offset;
+
+ result = xzmalloc(sizeof(struct sync_message));
+ message_uuid_set_null(&result->uuid);
+
+ result->msg_path = xzmalloc(5 * (MAX_MAILBOX_PATH+1) * sizeof(char));
+ result->msg_path_end = result->msg_path +
+ 5 * (MAX_MAILBOX_PATH+1) * sizeof(char);
+
+ snprintf(result->stagename, sizeof(result->stagename), "%lu.", l->count);
+
+ snprintf(result->msg_path, MAX_MAILBOX_PATH,
+ "%s/%s", l->stage_dir, result->stagename);
+ /* make sure there's a NUL NUL at the end */
+ result->msg_path[strlen(result->msg_path) + 1] = '\0';
+
+ l->count++;
+ if (l->tail)
+ l->tail = l->tail->next = result;
+ else
+ l->head = l->tail = result;
+
+ if (uuid && !message_uuid_isnull(uuid)) {
+ /* Messages with UUIDs get fast hash lookup for duplicate copies */
+ message_uuid_copy(&result->uuid, uuid);
+ offset = message_uuid_hash(uuid, l->hash_size);
+
+ /* Insert at start of list */
+ result->hash_next = l->hash[offset];
+ l->hash[offset] = result;
+ }
+ return(result);
+}
+
+void sync_message_fsync(struct sync_message_list *l)
+{
+ int i;
+
+ if (l->file_count == 0)
+ return;
+
+ /* fsync() files in reverse order: ReiserFS FAQ indicates that this
+ * gives best potential for optimisation */
+ for (i = (l->file_count-1) ; i >= 0 ; i--) {
+ fsync(fileno(l->file[i]));
+ fclose(l->file[i]);
+ l->file[i] = NULL;
+ }
+ l->file_count = 0;
+}
+
+FILE *sync_message_open(struct sync_message_list *l,
+ struct sync_message *message)
+{
+ FILE *file;
+
+ if (l->file_count == l->file_max)
+ sync_message_fsync(l);
+
+ /* Open read/write so file can later be mmap()ed if needed */
+ if ((file=fopen(message->msg_path, "w+")) == NULL) {
+ syslog(LOG_ERR, "sync_message_open(): Unable to open %s: %m",
+ message->msg_path);
+ return(NULL);
+ }
+
+ l->file[l->file_count++] = file;
+
+ return(file);
+}
+
+int sync_message_copy_fromstage(struct sync_message *message,
+ struct mailbox *mailbox,
+ unsigned long uid)
+{
+ int r;
+ const char *root;
+ char *partition, stagefile[MAX_MAILBOX_PATH+1], *p;
+ size_t sflen;
+ char target[MAX_MAILBOX_PATH+1];
+
+ /* Find mailbox partition */
+ r = mboxlist_detail(mailbox->name, NULL, NULL, NULL, &partition, NULL, NULL);
+ if (!r) {
+ root = config_partitiondir(partition);
+ if (!root) r = IMAP_PARTITION_UNKNOWN;
+ }
+ if (r) {
+ syslog(LOG_ERR, "couldn't find sync stage directory for mbox: '%s': %s",
+ mailbox->name, error_message(r));
+ return r;
+ }
+
+ snprintf(stagefile, sizeof(stagefile), "%s/sync./%lu/%s",
+ root, (unsigned long) getpid(), message->stagename);
+ sflen = strlen(stagefile);
+
+ p = message->msg_path;
+ while (p < message->msg_path_end) {
+ int sl = strlen(p);
+
+ if (sl == 0) {
+ /* our partition isn't here */
+ break;
+ }
+ if (!strcmp(stagefile, p)) {
+ /* aha, this is us */
+ break;
+ }
+
+ p += sl + 1;
+ }
+
+ if (*p == '\0') {
+ /* ok, create this file, and copy the name of it into 'p'.
+ make sure not to overwrite message->msg_path_end */
+
+ /* create the new staging file from the first stage part */
+ r = mailbox_copyfile(message->msg_path, stagefile, 0);
+ if (r) {
+ /* maybe the directory doesn't exist? */
+ if (cyrus_mkdir(stagefile, 0755) == -1) {
+ syslog(LOG_ERR, "couldn't create sync stage directory for : %s: %m",
+ stagefile);
+ } else {
+ syslog(LOG_NOTICE, "created sync stage directory for %s",
+ stagefile);
+ r = mailbox_copyfile(message->msg_path, stagefile, 0);
+ }
+ }
+ if (r) {
+ /* oh well, we tried */
+
+ syslog(LOG_ERR, "IOERROR: creating message file %s: %m",
+ stagefile);
+ unlink(stagefile);
+ return r;
+ }
+
+ if (p + sflen > message->msg_path_end - 5) {
+ int cursize = message->msg_path_end - message->msg_path;
+ int curp = p - message->msg_path;
+
+ /* need more room; double the buffer */
+ message->msg_path = xrealloc(message->msg_path, 2 * cursize);
+ message->msg_path_end = message->msg_path + 2 * cursize;
+ p = message->msg_path + curp;
+ }
+ strcpy(p, stagefile);
+ /* make sure there's a NUL NUL at the end */
+ p[sflen + 1] = '\0';
+ }
+
+ /* 'p' contains the message and is on the same partition
+ as the mailbox we're looking at */
+
+ snprintf(target, MAX_MAILBOX_PATH, "%s/%lu.", mailbox->path, uid);
+
+ return mailbox_copyfile(p, target, 0);
+}
+
+void sync_message_list_free(struct sync_message_list **lp)
+{
+ struct sync_message_list *l = *lp;
+ struct sync_message *current, *next;
+
+ for (current = l->head; current ; current = next) {
+ next = current->next;
+
+ if (current->msg_path) {
+ char *p = current->msg_path;
+ while (*p != '\0' && p < current->msg_path_end) {
+ if (unlink(p) != 0) {
+ syslog(LOG_ERR, "IOERROR, error unlinking file %s: %m", p);
+ }
+ p += strlen(p) + 1;
+ }
+ free(current->msg_path);
+ }
+ free(current);
+ }
+ if (l->cache_base && (l->cache_len > 0))
+ map_free(&l->cache_base, &l->cache_len);
+ if (l->cache_fd) {
+ close(l->cache_fd);
+ unlink(l->cache_name);
+ }
+ rmdir(l->stage_dir);
+ free(l->cache_buffer);
+ free(l->hash);
+ free(l->file);
+ free(l);
+ *lp = NULL;
+}
+
+struct sync_message *sync_message_find(struct sync_message_list *l,
+ struct message_uuid *uuid)
+{
+ struct sync_message *current;
+ int offset = message_uuid_hash(uuid, l->hash_size);
+
+ if (message_uuid_isnull(uuid))
+ return(NULL);
+
+ for (current = l->hash[offset] ; current ; current = current->hash_next) {
+ if (message_uuid_compare(¤t->uuid, uuid))
+ return(current);
+ }
+ return(NULL);
+}
+
+int sync_message_list_need_restart(struct sync_message_list *l)
+{
+ return((l->count > 1000) ||
+ lseek(l->cache_fd, 0, SEEK_CUR) >= SYNC_MESSAGE_LIST_MAX_CACHE);
+}
+
+/* ====================================================================== */
+
+static int sync_getliteral_size(struct protstream *input,
+ struct protstream *output,
+ unsigned long *sizep)
+{
+ static struct buf arg; /* Relies on zeroed BSS */
+ unsigned long size = 0;
+ int sawdigit = 0;
+ int isnowait = 0;
+ int c = getword(input, &arg);
+ char *p = arg.s;
+
+ if (c == EOF) return(IMAP_IOERROR);
+
+ if ((p == NULL) || (*p != '{'))
+ return(IMAP_PROTOCOL_ERROR);
+
+ /* Read size from literal */
+ for (p = p + 1; *p && isdigit((int) *p); p++) {
+ sawdigit++;
+ size = (size*10) + *p - '0';
+ }
+ if (*p == '+') {
+ isnowait++;
+ p++;
+ }
+
+ if (c == '\r') c = prot_getc(input);
+
+ if (*p != '}' || p[1] || c != '\n' || !sawdigit)
+ return(IMAP_PROTOCOL_ERROR);
+
+ if (!isnowait) {
+ /* Tell client to send the message */
+ prot_printf(output, "+ go ahead\r\n");
+ prot_flush(output);
+ }
+ *sizep = size;
+ return(0);
+}
+
+int sync_getcache(struct protstream *input, struct protstream *output,
+ struct sync_message_list *list, struct sync_message *message)
+{
+ static char *cache_entry = NULL;
+ static unsigned long max_cache_size = 0;
+ unsigned long cache_size, size;
+ int c, r = 0;
+ static struct buf version;
+ char *p;
+ int n;
+
+ /* Parse Cache version number */
+ if ((c = getastring(input, output, &version)) != ' ')
+ return(IMAP_IOERROR);
+ message->cache_version = sync_atoul(version.s);
+
+ if ((r = sync_getliteral_size(input, output, &cache_size)))
+ return(r);
+
+ if (cache_size > max_cache_size) {
+ cache_entry = xrealloc(cache_entry, cache_size);
+ max_cache_size = cache_size;
+ }
+
+ p = cache_entry;
+ size = cache_size;
+ while (size) {
+ n = prot_read(input, p, size);
+ if (!n) {
+ syslog(LOG_ERR,
+ "IOERROR: reading cache entry: unexpected end of file");
+ return(IMAP_IOERROR);
+ }
+
+ p += n;
+ size -=n;
+ }
+ message->cache_offset = sync_message_list_cache_offset(list);
+ message->cache_size = cache_size;
+
+ sync_message_list_cache(list, cache_entry, cache_size);
+ return(0);
+}
+
+int sync_getmessage(struct protstream *input, struct protstream *output,
+ struct sync_message_list *list,
+ struct sync_message *message)
+{
+ FILE *file;
+ int r = 0;
+ unsigned long size;
+ char buf[8192+1];
+ int n;
+
+ if ((r = sync_getliteral_size(input, output, &message->msg_size)))
+ return(r);
+
+ if ((file=sync_message_open(list, message)) == NULL)
+ return(IMAP_IOERROR);
+
+ size = message->msg_size;
+ while (size) {
+ n = prot_read(input, buf, size > 8192 ? 8192 : size);
+ if (!n) {
+ syslog(LOG_ERR, "IOERROR: reading message: unexpected end of file");
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ size -= n;
+ fwrite(buf, 1, n, file);
+ }
+
+ /* fsync()/fclose() batched later */
+ return(r);
+}
+
+int sync_getsimple(struct protstream *input, struct protstream *output,
+ struct sync_message_list *list,
+ struct sync_message *message)
+{
+ FILE *file;
+ int r = 0;
+ unsigned long size;
+ const char *msg_base = 0;
+ unsigned long msg_len = 0;
+ struct index_record record;
+ char buf[8192+1];
+ int n;
+
+ /* If switching from PARSED to SIMPLE, need to flush cache. This is
+ * redundant as it duplicates code in cmd_upload() (which is the
+ * logical place for the code to go), but better safe than sorry. */
+ if (list->cache_buffer_size > 0)
+ sync_message_list_cache_flush(list);
+
+ if ((r = sync_getliteral_size(input, output, &message->msg_size)))
+ return(r);
+
+ /* Open read/write so file can later be mmap()ed */
+ if ((file=fopen(message->msg_path, "w+")) == NULL) {
+ syslog(LOG_ERR, "sync_getsimple(): Unable to open %s: %m",
+ message->msg_path);
+
+ r = IMAP_IOERROR;
+ }
+
+ size = message->msg_size;
+ while (size) {
+ n = prot_read(input, buf, size > 8192 ? 8192 : size);
+ if (!n) {
+ syslog(LOG_ERR,
+ "IOERROR: reading message: unexpected end of file");
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ size -= n;
+ fwrite(buf, 1, n, file);
+ }
+
+ if (r) {
+ fclose(file);
+ return(IMAP_IOERROR);
+ }
+
+ /* Make sure that message flushed to disk just incase mmap has problems */
+ fflush(file);
+ if (ferror(file)) {
+ fclose(file);
+ return(IMAP_IOERROR);
+ }
+
+ if (fsync(fileno(file)) < 0) {
+ fclose(file);
+ return(IMAP_IOERROR);
+ }
+
+ map_refresh(fileno(file), 1, &msg_base, &msg_len, message->msg_size,
+ "new message", "unknown");
+
+ r = message_parse_mapped_async(msg_base, msg_len,
+ MAILBOX_FORMAT_NORMAL,
+ list->cache_fd, &record);
+ map_free(&msg_base, &msg_len);
+
+ message->hdr_size = record.header_size;
+ message->cache_offset = record.cache_offset;
+ message->cache_size
+ = lseek(list->cache_fd, 0, SEEK_CUR) - record.cache_offset;
+
+ fclose(file);
+ return(r);
+}
+
+/* ====================================================================== */
+
+struct sync_upload_list *sync_upload_list_create(unsigned long new_last_uid,
+ char **flagname)
+{
+ struct sync_upload_list *l = xzmalloc(sizeof (struct sync_upload_list));
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+ l->new_last_uid = new_last_uid;
+
+ sync_flags_meta_clear(&l->meta);
+ sync_flags_meta_from_list(&l->meta, flagname);
+
+ return(l);
+}
+
+struct sync_upload_item *sync_upload_list_add(struct sync_upload_list *l)
+{
+ struct sync_upload_item *result
+ = xzmalloc(sizeof(struct sync_upload_item));
+
+ if (l->tail)
+ l->tail = l->tail->next = result;
+ else
+ l->head = l->tail = result;
+
+ l->count++;
+
+ return(result);
+}
+
+void sync_upload_list_free(struct sync_upload_list **lp)
+{
+ struct sync_upload_list *l = *lp;
+ struct sync_upload_item *current, *next;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+ free(current);
+ current = next;
+ }
+ sync_flags_meta_free(&l->meta);
+ free(l);
+ *lp = NULL;
+}
+
+/* ====================================================================== */
+
+struct sync_flag_list *sync_flag_list_create(char **flagname)
+{
+ struct sync_flag_list *l = xzmalloc(sizeof (struct sync_flag_list));
+
+ sync_flags_meta_clear(&l->meta);
+ sync_flags_meta_from_list(&l->meta, flagname);
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+ return(l);
+}
+
+struct sync_flag_item *sync_flag_list_add(struct sync_flag_list *l)
+{
+ struct sync_flag_item *result = xzmalloc(sizeof(struct sync_flag_item));
+
+ if (l->tail)
+ l->tail = l->tail->next = result;
+ else
+ l->head = l->tail = result;
+
+ l->count++;
+ return(result);
+}
+
+void sync_flag_list_free(struct sync_flag_list **lp)
+{
+ struct sync_flag_list *l = *lp;
+ struct sync_flag_item *current, *next;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+ free(current);
+ current = next;
+ }
+ sync_flags_meta_free(&l->meta);
+ free(l);
+ *lp = NULL;
+}
+
+/* ====================================================================== */
+
+char *sync_sieve_get_path(char *userid, char *sieve_path, size_t psize)
+{
+ char *domain;
+
+ if (config_getenum(IMAPOPT_VIRTDOMAINS) && (domain = strchr(userid, '@'))) {
+ char d = (char) dir_hash_c(domain+1);
+ *domain = '\0'; /* split user at domain */
+ snprintf(sieve_path, psize, "%s%s%c/%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR),
+ FNAME_DOMAINDIR, d, domain+1, dir_hash_c(userid), userid);
+ *domain = '@'; /* reassemble user at domain */
+ }
+ else {
+ snprintf(sieve_path, psize, "%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR), dir_hash_c(userid), userid);
+ }
+
+ return sieve_path;
+}
+
+
+struct sync_sieve_list *sync_sieve_list_create()
+{
+ struct sync_sieve_list *l = xzmalloc(sizeof (struct sync_sieve_list));
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+ return(l);
+}
+
+void sync_sieve_list_add(struct sync_sieve_list *l,
+ char *name, time_t last_update, int active)
+{
+ struct sync_sieve_item *item = xzmalloc(sizeof(struct sync_sieve_item));
+
+ item->name = xstrdup(name);
+ item->last_update = last_update;
+ item->active = active;
+ item->mark = 0;
+
+ if (l->tail)
+ l->tail = l->tail->next = item;
+ else
+ l->head = l->tail = item;
+
+ l->count++;
+}
+
+struct sync_sieve_item *sync_sieve_lookup(struct sync_sieve_list *l, char *name)
+{
+ struct sync_sieve_item *p;
+
+ for (p = l->head ; p ; p = p->next) {
+ if (!strcmp(p->name, name))
+ return(p);
+ }
+ return(NULL);
+}
+
+void sync_sieve_list_set_active(struct sync_sieve_list *l, char *name)
+{
+ struct sync_sieve_item *item;
+
+ for (item = l->head ; item ; item = item->next) {
+ if (!strcmp(item->name, name)) {
+ item->active = 1;
+ break;
+ }
+ }
+}
+
+void sync_sieve_list_free(struct sync_sieve_list **lp)
+{
+ struct sync_sieve_list *l = *lp;
+ struct sync_sieve_item *current, *next;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+ if (current->name)
+ free(current->name);
+ free(current);
+ current = next;
+ }
+ free(l);
+ *lp = NULL;
+}
+
+struct sync_sieve_list *sync_sieve_list_generate(char *userid)
+{
+ struct sync_sieve_list *list = sync_sieve_list_create();
+ char sieve_path[2048]; /* Follows existing code... */
+ char filename[2048];
+ char active[2048];
+ DIR *mbdir;
+ struct dirent *next = NULL;
+ struct stat sbuf;
+ int count;
+
+ list = sync_sieve_list_create();
+
+ sync_sieve_get_path(userid, sieve_path, sizeof(sieve_path));
+
+ if (!(mbdir = opendir(sieve_path)))
+ return(list);
+
+ active[0] = '\0';
+ while((next = readdir(mbdir)) != NULL) {
+ if(!strcmp(next->d_name, ".") || !strcmp(next->d_name, ".."))
+ continue;
+
+ snprintf(filename, sizeof(filename), "%s/%s",
+ sieve_path, next->d_name);
+
+ if (stat(filename, &sbuf) < 0)
+ continue;
+
+ if (!strcmp(next->d_name, "defaultbc")) {
+ if (sbuf.st_mode & S_IFLNK) {
+ count = readlink(filename, active, 2047);
+
+ if (count >= 0) {
+ active[count] = '\0';
+ } else {
+ /* XXX Report problem? */
+ }
+ }
+ continue;
+ }
+ sync_sieve_list_add(list, next->d_name, sbuf.st_mtime, 0);
+ }
+ closedir(mbdir);
+
+ if (active[0])
+ sync_sieve_list_set_active(list, active);
+
+ return(list);
+}
+
+char *sync_sieve_read(char *userid, char *name, unsigned long *sizep)
+{
+ char sieve_path[2048];
+ char filename[2048];
+ FILE *file;
+ struct stat sbuf;
+ char *result, *s;
+ unsigned long count;
+ int c;
+
+ if (sizep)
+ *sizep = 0;
+
+ sync_sieve_get_path(userid, sieve_path, sizeof(sieve_path));
+
+ snprintf(filename, sizeof(filename), "%s/%s", sieve_path, name);
+
+ file=fopen(filename, "r");
+
+ if ((file == NULL) || (fstat(fileno(file), &sbuf) < 0))
+ return(NULL);
+
+ count = sbuf.st_size;
+ s = result = xmalloc(count+1);
+
+ if (sizep)
+ *sizep = count;
+
+ while (count > 0) {
+ if ((c=fgetc(file)) == EOF)
+ break;
+ *s++ = c;
+ count--;
+ }
+ fclose(file);
+ *s = '\0';
+
+ return(result);
+}
+
+int sync_sieve_upload(struct protstream *input, struct protstream *output,
+ char *userid, char *name, unsigned long last_update)
+{
+ char sieve_path[2048];
+ char tmpname[2048];
+ char newname[2048];
+ FILE *file;
+ int r = 0;
+ unsigned long size;
+ struct stat sbuf;
+ struct utimbuf utimbuf;
+ char buf[8192+1];
+ int n;
+
+ sync_sieve_get_path(userid, sieve_path, sizeof(sieve_path));
+
+ if (stat(sieve_path, &sbuf) == -1 && errno == ENOENT) {
+ if (cyrus_mkdir(sieve_path, 0755) == -1) return IMAP_IOERROR;
+ if (mkdir(sieve_path, 0755) == -1 && errno != EEXIST) {
+ syslog(LOG_ERR, "Failed to create %s:%m", sieve_path);
+ return IMAP_IOERROR;
+ }
+ }
+
+ snprintf(tmpname, sizeof(tmpname), "%s/sync_tmp-%lu",
+ sieve_path, (unsigned long)getpid());
+ snprintf(newname, sizeof(newname), "%s/%s", sieve_path, name);
+
+ if ((r = sync_getliteral_size(input, output, &size)))
+ return(r);
+
+ if ((file=fopen(tmpname, "w")) == NULL) {
+ return(IMAP_IOERROR);
+ }
+
+ while (size) {
+ n = prot_read(input, buf, size > 8192 ? 8192 : size);
+ if (!n) {
+ syslog(LOG_ERR, "IOERROR: reading message: unexpected end of file");
+ r = IMAP_IOERROR;
+ break;
+ }
+
+ size -= n;
+ fwrite(buf, 1, n, file);
+ }
+
+ if ((fflush(file) != 0) || (fsync(fileno(file)) < 0))
+ r = IMAP_IOERROR;
+
+ fclose(file);
+
+ utimbuf.actime = time(NULL);
+ utimbuf.modtime = last_update;
+
+ if (!r && (utime(tmpname, &utimbuf) < 0))
+ r = IMAP_IOERROR;
+
+ if (!r && (rename(tmpname, newname) < 0))
+ r = IMAP_IOERROR;
+
+ return(r);
+}
+
+
+int sync_sieve_activate(char *userid, char *name)
+{
+ char sieve_path[2048];
+ char target[2048];
+ char active[2048];
+
+ sync_sieve_get_path(userid, sieve_path, sizeof(sieve_path));
+
+ snprintf(target, sizeof(target), "%s", name);
+ snprintf(active, sizeof(active), "%s/%s", sieve_path, "defaultbc");
+ unlink(active);
+
+ if (symlink(target, active) < 0)
+ return(IMAP_IOERROR);
+
+ return(0);
+}
+
+int sync_sieve_deactivate(char *userid)
+{
+ char sieve_path[2048];
+ char active[2048];
+
+ sync_sieve_get_path(userid, sieve_path, sizeof(sieve_path));
+
+ snprintf(active, sizeof(active), "%s/%s", sieve_path, "defaultbc");
+ unlink(active);
+
+ return(0);
+}
+
+int sync_sieve_delete(char *userid, char *name)
+{
+ char sieve_path[2048];
+ char filename[2048];
+ char active[2048];
+ DIR *mbdir;
+ struct dirent *next = NULL;
+ struct stat sbuf;
+ int is_default = 0;
+ int count;
+
+ sync_sieve_get_path(userid, sieve_path, sizeof(sieve_path));
+
+ if (!(mbdir = opendir(sieve_path)))
+ return(IMAP_IOERROR);
+
+ while((next = readdir(mbdir)) != NULL) {
+ if(!strcmp(next->d_name, ".") || !strcmp(next->d_name, ".."))
+ continue;
+
+ snprintf(filename, sizeof(filename), "%s/%s",
+ sieve_path, next->d_name);
+
+ if (stat(filename, &sbuf) < 0)
+ continue;
+
+ if (!strcmp(next->d_name, "defaultbc")) {
+ if (sbuf.st_mode & S_IFLNK) {
+ count = readlink(filename, active, 2047);
+
+ if (count >= 0) {
+ active[count] = '\0';
+ if (!strcmp(active, name))
+ is_default = 1;
+ }
+ }
+ continue;
+ }
+ }
+ closedir(mbdir);
+
+ if (is_default) {
+ snprintf(filename, sizeof(filename), "%s/defaultbc", sieve_path);
+ unlink(filename);
+ }
+
+ snprintf(filename, sizeof(filename), "%s/%s", sieve_path, name);
+ unlink(filename);
+
+ return(0);
+}
+
+/* ====================================================================== */
+
+struct sync_annot_list *sync_annot_list_create()
+{
+ struct sync_annot_list *l = xzmalloc(sizeof (struct sync_annot_list));
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+ return(l);
+}
+
+void sync_annot_list_add(struct sync_annot_list *l,
+ const char *entry, const char *userid,
+ const char *value)
+{
+ struct sync_annot_item *item = xzmalloc(sizeof(struct sync_annot_item));
+
+ item->entry = xstrdup(entry);
+ item->userid = xstrdup(userid);
+ item->value = xstrdup(value);
+ item->mark = 0;
+
+ if (l->tail)
+ l->tail = l->tail->next = item;
+ else
+ l->head = l->tail = item;
+
+ l->count++;
+}
+
+void sync_annot_list_free(struct sync_annot_list **lp)
+{
+ struct sync_annot_list *l = *lp;
+ struct sync_annot_item *current, *next;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+ if (current->entry) free(current->entry);
+ if (current->userid) free(current->userid);
+ if (current->value) free(current->value);
+ free(current);
+ current = next;
+ }
+ free(l);
+ *lp = NULL;
+}
+
+/* ====================================================================== */
+
+struct sync_action_list *sync_action_list_create(void)
+{
+ struct sync_action_list *l = xzmalloc(sizeof (struct sync_action_list));
+
+ l->head = NULL;
+ l->tail = NULL;
+ l->count = 0;
+
+ return(l);
+}
+
+void sync_action_list_add(struct sync_action_list *l, char *name, char *user)
+{
+ struct sync_action *current;
+
+ if (!name && !user) return;
+
+ for (current = l->head ; current ; current = current->next) {
+ if ((!name || (current->name && !strcmp(current->name, name))) &&
+ (!user || (current->user && !strcmp(current->user, user)))) {
+ current->active = 1; /* Make sure active */
+ return;
+ } else {
+ /* name and/or user don't match current: no match possible */
+ }
+ }
+
+ current = xzmalloc(sizeof(struct sync_action));
+ current->next = NULL;
+ current->name = (name) ? xstrdup(name) : NULL;
+ current->user = (user) ? xstrdup(user) : NULL;
+ current->active = 1;
+
+ if (l->tail)
+ l->tail = l->tail->next = current;
+ else
+ l->head = l->tail = current;
+
+ l->count++;
+
+}
+
+void sync_action_list_free(struct sync_action_list **lp)
+{
+ struct sync_action_list *l = *lp;
+ struct sync_action *current, *next;
+
+ current = l->head;
+ while (current) {
+ next = current->next;
+
+ if (current->name) free(current->name);
+ if (current->user) free(current->user);
+
+ free(current);
+ current = next;
+ }
+ free(l);
+ *lp = NULL;
+}
+
+/* ====================================================================== */
+
+void sync_lock_reset(struct sync_lock *lock)
+{
+ lock->fd = -1;
+ lock->count = 0;
+}
+
+int sync_unlock(struct sync_lock *lock)
+{
+ assert(lock->fd >= 0);
+ assert(lock->count != 0);
+
+ if (--lock->count == 0) {
+ lock_unlock(lock->fd);
+ close(lock->fd);
+ lock->fd = -1;
+ }
+
+ return(0);
+}
+
+int sync_lock(struct sync_lock *lock)
+{
+ static char lockfile[MAX_MAILBOX_PATH] = "";
+ int r = 0;
+
+ if (lock->count++) return 0;
+
+ if (!*lockfile) {
+ strlcpy(lockfile, config_dir, sizeof(lockfile));
+ strlcat(lockfile, "/sync/lock", sizeof(lockfile));
+ }
+
+ lock->fd = open(lockfile, O_WRONLY|O_CREAT, 0640);
+ if (lock->fd < 0 && errno == ENOENT) {
+ if (!cyrus_mkdir(lockfile, 0755)) {
+ lock->fd = open(lockfile, O_WRONLY|O_CREAT, 0640);
+ }
+ }
+ if (lock->fd < 0) {
+ syslog(LOG_ERR, "Unable to create file %s: %s",
+ lockfile, strerror(errno));
+ return(IMAP_IOERROR);
+ }
+
+ r = lock_blocking(lock->fd);
+ if (r) {
+ lock->count--;
+ syslog(LOG_ERR, "Unable to lock %s: %s", lockfile, strerror(errno));
+ }
+
+ return(r);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/sync_support.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,479 @@
+/* sync_support.h -- Cyrus synchonization support functions
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Original version written by David Carter <dpc22 at cam.ac.uk>
+ * Rewritten and integrated into Cyrus by Ken Murchison <ken at oceana.com>
+ *
+ * $Id: sync_support.h,v 1.1.2.9 2005/06/16 00:02:10 ken3 Exp $
+ */
+
+#ifndef INCLUDED_SYNC_SUPPORT_H
+#define INCLUDED_SYNC_SUPPORT_H
+
+#include "prot.h"
+
+#define SYNC_MSGID_LIST_HASH_SIZE (65536)
+#define SYNC_MESSAGE_LIST_HASH_SIZE (65536)
+#define SYNC_MESSAGE_LIST_MAX_OPEN_FILES (64)
+
+#define sync_atoul(s) strtoul(s, NULL, 10)
+
+int sync_eatlines_unsolicited(struct protstream *pin, int c);
+
+void sync_printstring(struct protstream *out, const char *s);
+
+void sync_printastring(struct protstream *out, const char *s);
+
+void sync_flag_print(struct protstream *output, int *have_onep, char *value);
+
+/* ====================================================================== */
+
+int sync_parse_code(char *cmd, struct protstream *in, int eat,
+ int *unsolicitedp);
+
+#define SYNC_PARSE_EAT_OKLINE (1)
+#define SYNC_PARSE_NOEAT_OKLINE (0)
+
+/* ====================================================================== */
+
+struct sync_flags {
+ bit32 system_flags;
+ bit32 user_flags[MAX_USER_FLAGS/32];
+};
+
+struct sync_flags_meta {
+ char *flagname[MAX_USER_FLAGS];
+ int newflags;
+};
+
+void sync_flags_clear(struct sync_flags *flags);
+
+void sync_flags_meta_clear(struct sync_flags_meta *meta);
+
+void sync_flags_meta_free(struct sync_flags_meta *meta);
+
+int sync_getflags(struct protstream *input,
+ struct sync_flags *flags, struct sync_flags_meta *meta);
+
+void sync_flags_meta_to_list(struct sync_flags_meta *meta, char **flagname);
+
+/* ====================================================================== */
+
+/* sync_msg_list records message lists in client */
+
+struct sync_msg {
+ struct sync_msg *next;
+ struct message_uuid uuid;
+ unsigned long uid;
+ struct sync_flags flags;
+};
+
+struct sync_msg_list {
+ struct sync_msg *head, *tail;
+ unsigned long count;
+ unsigned long last_uid;
+ struct sync_flags_meta meta;
+};
+
+struct sync_msg_list *sync_msg_list_create(char **flagname,
+ unsigned long last_uid);
+
+struct sync_msg *sync_msg_list_add(struct sync_msg_list *l);
+
+void sync_msg_list_free(struct sync_msg_list **lp);
+
+/* ====================================================================== */
+
+struct sync_msgid {
+ struct sync_msgid *next;
+ struct sync_msgid *hash_next;
+ struct message_uuid uuid;
+ int count;
+ int reserved;
+};
+
+struct sync_msgid_list {
+ struct sync_msgid *head;
+ struct sync_msgid *tail;
+ struct sync_msgid **hash;
+ int hash_size;
+ int count; /* Total number of messages in list */
+ int reserved; /* Number of reserved messages in list */
+};
+
+struct sync_msgid_list *sync_msgid_list_create(int hash_size);
+
+struct sync_msgid *sync_msgid_add(struct sync_msgid_list *list,
+ struct message_uuid *uuid);
+
+struct sync_msgid *sync_msgid_lookup(struct sync_msgid_list *list,
+ struct message_uuid *uuid);
+
+void sync_msgid_list_free(struct sync_msgid_list **list);
+
+/* ====================================================================== */
+
+struct sync_folder {
+ struct sync_folder *next;
+ struct sync_msg_list *msglist;
+ char *id;
+ char *name;
+ char *acl;
+ struct quota quota;
+ int mark;
+ int reserve; /* Folder has been processed by reserve operation */
+};
+
+struct sync_folder_list {
+ struct sync_folder *head, *tail;
+ unsigned long count;
+};
+
+struct sync_folder_list *sync_folder_list_create(void);
+
+
+struct sync_folder *sync_folder_list_add(struct sync_folder_list *l,
+ char *id, char *name, char *acl,
+ struct quota *quota);
+
+struct sync_folder *sync_folder_lookup(struct sync_folder_list *l, char *id);
+
+struct sync_folder *sync_folder_lookup_byname(struct sync_folder_list *l,
+ char *name);
+
+int sync_folder_mark(struct sync_folder_list *l, char *id);
+
+void sync_folder_list_free(struct sync_folder_list **lp);
+
+/* ====================================================================== */
+
+struct sync_rename_item {
+ struct sync_rename_item *next;
+ char *id;
+ char *oldname;
+ char *newname;
+ int done;
+};
+
+struct sync_rename_list {
+ struct sync_rename_item *head, *tail;
+ unsigned long count;
+ unsigned long done;
+};
+
+struct sync_rename_list *sync_rename_list_create(void);
+
+
+struct sync_rename_item *sync_rename_list_add(struct sync_rename_list *l,
+ char *id, char *name, char *acl);
+
+struct sync_rename_item *sync_rename_lookup(struct sync_rename_list *l,
+ char *oldname);
+
+void sync_rename_list_free(struct sync_rename_list **lp);
+
+/* ====================================================================== */
+
+struct sync_user {
+ struct sync_user *next;
+ struct sync_folder_list *folder_list;
+ char *userid;
+};
+
+struct sync_user_list {
+ struct sync_user *head, *tail;
+ unsigned long count;
+};
+
+struct sync_user_list *sync_user_list_create(void);
+
+struct sync_user *sync_user_list_add(struct sync_user_list *l, char *userid);
+
+struct sync_user *sync_user_list_lookup(struct sync_user_list *l, char *userid);
+
+void sync_user_list_free(struct sync_user_list **lp);
+
+/* ====================================================================== */
+
+#define SYNC_MESSAGE_INIT_CACHE (16384)
+
+/* Reset sync_message_list after 128 MBytes to avoid problems with large
+ * mmaped files on 32 bit platform */
+#define SYNC_MESSAGE_LIST_MAX_CACHE (128*1024*1024)
+
+struct sync_message {
+ struct sync_message *next;
+ struct sync_message *hash_next;
+ unsigned long hdr_size;
+ unsigned long cache_offset;
+ unsigned long cache_size;
+ unsigned long content_lines;
+ unsigned long cache_version;
+ struct message_uuid uuid;
+ char stagename[100];
+
+ /* the msg_path buffer consists of
+ /part1/sync./pid/file \0
+ /part2/sync./pid/file \0
+ ... \0
+ \0
+
+ the main invariant is double \0 at the end
+ */
+ char *msg_path; /* buffer of current stage parts */
+ char *msg_path_end; /* end of buffer */
+ unsigned long msg_size;
+};
+
+struct sync_message_list {
+ struct sync_message *head, *tail;
+ struct sync_message **hash;
+ int hash_size;
+ unsigned long count;
+ char stage_dir[MAX_MAILBOX_PATH+1];
+ FILE **file;
+ int file_count;
+ int file_max;
+
+ /* Cache structure associated with messages */
+ char cache_name[MAX_MAILBOX_PATH+1];
+ int cache_fd;
+ const char *cache_base;
+ unsigned long cache_len;
+ void *cache_buffer;
+ unsigned long cache_buffer_alloc;
+ unsigned long cache_buffer_size;
+};
+
+struct sync_message_list *sync_message_list_create(int hash_size, int file_max);
+
+void sync_message_list_cache(struct sync_message_list *l,
+ char *entry, int size);
+
+int sync_message_list_cache_flush(struct sync_message_list *l);
+
+unsigned long sync_message_list_cache_offset(struct sync_message_list *l);
+
+
+struct sync_message *sync_message_add(struct sync_message_list *l,
+ struct message_uuid *uuid);
+
+char *sync_message_next_path(struct sync_message_list *l);
+
+void sync_message_list_free(struct sync_message_list **lp);
+
+int sync_message_list_need_restart(struct sync_message_list *l);
+
+struct sync_message *sync_message_find(struct sync_message_list *l,
+ struct message_uuid *uuid);
+
+void sync_message_fsync(struct sync_message_list *l);
+
+FILE *sync_message_open(struct sync_message_list *l,
+ struct sync_message *message);
+
+int sync_message_copy_fromstage(struct sync_message *message,
+ struct mailbox *mailbox,
+ unsigned long uid);
+
+/* ====================================================================== */
+
+struct sync_upload_item {
+ struct sync_upload_item *next; /* Simple linked list should suffice */
+ bit32 uid;
+ time_t internaldate;
+ time_t sentdate;
+ time_t last_updated;
+ struct sync_flags flags;
+ struct message_uuid uuid;
+ struct sync_message *message;
+};
+
+struct sync_upload_list {
+ struct sync_upload_item *head;
+ struct sync_upload_item *tail;
+ unsigned long count;
+ struct sync_flags_meta meta;
+ unsigned long new_last_uid;
+};
+
+struct sync_upload_list *sync_upload_list_create(unsigned long new_last_uid,
+ char **flagname);
+
+struct sync_upload_item *sync_upload_list_add(struct sync_upload_list *l);
+
+void sync_upload_list_free(struct sync_upload_list **lp);
+
+/* ====================================================================== */
+
+int sync_getcache(struct protstream *input, struct protstream *output,
+ struct sync_message_list *list,
+ struct sync_message *message);
+
+
+int sync_getmessage(struct protstream *input, struct protstream *output,
+ struct sync_message_list *list,
+ struct sync_message *message);
+
+int sync_getsimple(struct protstream *input, struct protstream *output,
+ struct sync_message_list *list,
+ struct sync_message *message);
+
+/* ====================================================================== */
+
+struct sync_flag_item {
+ struct sync_flag_item *next;
+ unsigned long uid;
+ struct sync_flags flags;
+};
+
+struct sync_flag_list {
+ struct sync_flag_item *head;
+ struct sync_flag_item *tail;
+ struct sync_flags_meta meta;
+ unsigned long count;
+};
+
+struct sync_flag_list *sync_flag_list_create(char **flagname);
+
+struct sync_flag_item *sync_flag_list_add(struct sync_flag_list *l);
+
+void sync_flag_list_free(struct sync_flag_list **lp);
+
+/* ====================================================================== */
+
+struct sync_sieve_item {
+ struct sync_sieve_item *next;
+ char *name;
+ time_t last_update;
+ int active;
+ int mark;
+};
+
+struct sync_sieve_list {
+ struct sync_sieve_item *head;
+ struct sync_sieve_item *tail;
+ unsigned long count;
+};
+
+struct sync_sieve_list *sync_sieve_list_create(void);
+
+void sync_sieve_list_add(struct sync_sieve_list *l,
+ char *name, time_t last_update, int active);
+
+struct sync_sieve_item *sync_sieve_lookup(struct sync_sieve_list *l,
+ char *name);
+
+void sync_sieve_list_set_active(struct sync_sieve_list *l, char *name);
+
+void sync_sieve_list_free(struct sync_sieve_list **lp);
+
+struct sync_sieve_list *sync_sieve_list_generate(char *userid);
+
+char *sync_sieve_read(char *userid, char *name, unsigned long *sizep);
+
+int sync_sieve_upload(struct protstream *input, struct protstream *output,
+ char *userid, char *name, unsigned long last_update);
+
+int sync_sieve_activate(char *userid, char *name);
+
+int sync_sieve_deactivate(char *userid);
+
+int sync_sieve_delete(char *userid, char *name);
+
+/* ====================================================================== */
+
+struct sync_annot_item {
+ struct sync_annot_item *next;
+ char *entry;
+ char *userid;
+ char *value;
+ int mark;
+};
+
+struct sync_annot_list {
+ struct sync_annot_item *head;
+ struct sync_annot_item *tail;
+ unsigned long count;
+};
+
+struct sync_annot_list *sync_annot_list_create(void);
+
+void sync_annot_list_add(struct sync_annot_list *l,
+ const char *entry, const char *userid,
+ const char *value);
+
+void sync_annot_list_free(struct sync_annot_list **lp);
+
+/* ====================================================================== */
+
+struct sync_action {
+ struct sync_action *next;
+ int active;
+ char *name;
+ char *user;
+};
+
+struct sync_action_list {
+ struct sync_action *head, *tail;
+ unsigned long count;
+};
+
+struct sync_action_list *sync_action_list_create(void);
+
+void sync_action_list_add(struct sync_action_list *l, char *name,
+ char *user);
+
+void sync_action_list_free(struct sync_action_list **lp);
+
+/* ====================================================================== */
+
+struct sync_lock {
+ int fd;
+ int count;
+};
+
+void sync_lock_reset(struct sync_lock *sync_lock);
+
+int sync_lock(struct sync_lock *lock);
+
+int sync_user_unlock(struct sync_lock *lock);
+
+#endif /* INCLUDED_SYNC_SUPPORT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/syncnews.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/syncnews.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/syncnews.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/syncnews.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,274 @@
+/* syncnews.c -- program to synchronize active file with mailbox list
+ *
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * $Id: syncnews.c,v 1.24.2.2 2004/05/25 01:28:13 ken3 Exp $
+ */
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+
+#include "assert.h"
+#include "global.h"
+#include "xmalloc.h"
+#include "exitcodes.h"
+#include "imap_err.h"
+#include "mailbox.h"
+#include "mboxlist.h"
+#include "convert_code.h"
+
+extern int optind;
+extern char *optarg;
+
+int code = 0;
+
+void do_syncnews(void);
+
+char **group = 0;
+int *group_seen;
+int group_num = 0;
+int group_alloc = 0;
+
+/* Forward declarations */
+void readactive(char *active);
+
+void usage(void)
+{
+ fprintf(stderr, "usage: syncnews [-C <alt_config>] active\n");
+ exit(EC_USAGE);
+}
+
+int main(int argc, char **argv)
+{
+ int opt;
+ char *alt_config = NULL;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ cyrus_init(alt_config, "syncnews", 0);
+
+ if (!argv[optind] || argv[optind+1]) usage();
+
+ readactive(argv[optind]);
+ do_syncnews();
+
+ cyrus_done();
+
+ return code;
+}
+
+#define GROUPGROW 300
+
+/*
+ * comparison function for qsort() of the group list
+ */
+int compare_group(char **a,char **b)
+{
+ return strcmp(*a, *b);
+}
+
+/*
+ * Read a news active file, building the group list
+ */
+void readactive(char *active)
+{
+ FILE *active_file;
+ char buf[1024];
+ char *p;
+ const char *newsprefix;
+ int newsprefixlen = 0;
+ int lineno = 0;
+
+ newsprefix = config_getstring("newsprefix", 0);
+ if (newsprefix) {
+ newsprefixlen = strlen(newsprefix);
+ if (newsprefix[newsprefixlen-1] == '.') {
+ newsprefixlen--;
+ }
+ }
+
+ active_file = fopen(active, "r");
+ if (!active_file) {
+ perror(active);
+ syslog(LOG_ERR, "cannot read active file %s: %m", active);
+ cyrus_done();
+ exit(EC_NOINPUT);
+ }
+
+ while (fgets(buf, sizeof(buf), active_file)) {
+ lineno++;
+ p = strchr(buf, ' '); /* end of group */
+ if (!p) goto badactive;
+ *p++ = '\0';
+ p = strchr(p, ' '); /* start of min */
+ if (!p) goto badactive;
+ p = strchr(p+1, ' ');
+ if (!p) goto badactive;
+ p++;
+ if (*p == 'y' || *p == 'm' || *p == 'n') {
+ /* Add group to list */
+ if (group_num == group_alloc) {
+ /* Grow arrary */
+ group_alloc += GROUPGROW;
+ group = (char **) xrealloc((char *)group,
+ group_alloc * sizeof(char *));
+ group_seen = (int *) xrealloc((char *)group_seen,
+ group_alloc * sizeof(int));
+ }
+
+ if (newsprefixlen) {
+ group[group_num] = xmalloc(strlen(buf)+newsprefixlen+2);
+ strcpy(group[group_num], newsprefix);
+ group[group_num][newsprefixlen] = '.';
+ strcpy(group[group_num]+newsprefixlen+1, buf);
+ }
+ else {
+ group[group_num] = xstrdup(buf);
+ }
+ group_seen[group_num] = 0;
+ group_num++;
+ }
+ }
+
+ if (ferror(active_file)) {
+ fprintf(stderr, "syncnews: error reading active file\n");
+ syslog(LOG_ERR, "error reading active file");
+ cyrus_done();
+ exit(EC_DATAERR);
+ }
+ fclose(active_file);
+
+ if (group_num == 0) {
+ fprintf(stderr, "syncnews: no groups in active file\n");
+ syslog(LOG_ERR, "no groups in active file");
+ cyrus_done();
+ exit(EC_DATAERR);
+ }
+
+ qsort(group, group_num, sizeof(char *), (int (*)(const void *, const void *)) compare_group);
+ return;
+
+ badactive:
+ fprintf(stderr, "syncnews: bad line %d in active file\n", lineno);
+ syslog(LOG_ERR, "bad line %d in active file", lineno);
+ cyrus_done();
+ exit(EC_DATAERR);
+
+}
+
+/*
+ * Do the real work.
+ */
+void do_syncnews(void)
+{
+ int r;
+ int i;
+
+ /*
+ * call mboxlist_syncnews() to check our group list against
+ * the mailboxes file. mboxlist_syncnews() will remove any
+ * mailboxes that aren't in the group list.
+ */
+ r = mboxlist_syncnews(group_num, group, group_seen);
+ if (r) {
+ com_err("syncnews: resynchronizing", r,
+ (r == IMAP_IOERROR) ? error_message(errno) : NULL);
+ code = convert_code(r);
+ return;
+ }
+
+ /*
+ * Go through the group list creating mailboxes for
+ * those groups which were not found in the mailboxes file.
+ */
+ for (i = 0; i < group_num; i++) {
+ if (!group_seen[i]) {
+ r = mboxlist_createmailbox(group[i],
+ MBTYPE_NETNEWS, "news",
+ 1, "anonymous", NULL, 0, 0, 0);
+
+ if (r == IMAP_MAILBOX_BADNAME) {
+ printf("ignored %s\n", group[i]);
+ }
+ else if (r) {
+ fprintf(stderr, "syncnews: cannot creat %s: %s\n",
+ group[i], error_message(r));
+ syslog(LOG_ERR, "cannot create %s: %s",
+ group[i], error_message(r));
+ }
+ else {
+ printf("created %s\n", group[i]);
+ }
+ }
+ }
+ return;
+}
+
+void fatal(const char* s, int code)
+{
+ fprintf(stderr, "syncnews: %s\n", s);
+ cyrus_done();
+ exit(code);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,95 @@
+/* telemetry.c -- common server telemetry
+ * $Id: telemetry.c,v 1.8 2003/10/22 18:50:08 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+
+#include "prot.h"
+#include "global.h"
+
+/* create telemetry log; return fd of log */
+int telemetry_log(const char *userid, struct protstream *pin,
+ struct protstream *pout, int usetimestamp)
+{
+ char buf[1024];
+ int fd = -1;
+ time_t now;
+
+ if(usetimestamp) {
+ struct timeval tv;
+
+ gettimeofday(&tv, NULL);
+
+ /* use sec.clocks */
+ snprintf(buf, sizeof(buf), "%s%s%s/%lu.%lu",
+ config_dir, FNAME_LOGDIR, userid,
+ (unsigned long)tv.tv_sec, (unsigned long)tv.tv_usec);
+ } else {
+ /* use pid */
+ snprintf(buf, sizeof(buf), "%s%s%s/%lu",
+ config_dir, FNAME_LOGDIR, userid, (unsigned long)
+ getpid());
+ }
+
+ fd = open(buf, O_CREAT | O_APPEND | O_WRONLY, 0644);
+
+ if (fd != -1) {
+ now = time(NULL);
+ snprintf(buf, sizeof(buf), "---------- %s %s\n",
+ userid, ctime(&now));
+ write(fd, buf, strlen(buf));
+
+ prot_setlog(pin, fd);
+ prot_setlog(pout, fd);
+ }
+
+ return fd;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/telemetry.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,50 @@
+/* telemetry.h -- interface for telemetry
+ * $Id: telemetry.h,v 1.3 2003/07/22 19:17:20 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_TELEMETRY_H
+#define INCLUDED_TELEMETRY_H
+
+int telemetry_log(const char *userid, struct protstream *pin,
+ struct protstream *pout, int usetimestamp);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1244 @@
+/* tls.c - STARTTLS helper functions for imapd
+ * Tim Martin
+ * 9/21/99
+ *
+ * Based upon Lutz Jaenicke's TLS patches for postfix
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+* NAME
+* tls
+* SUMMARY
+* interface to openssl routines
+* SYNOPSIS
+* #include <tls.h>
+*
+* DESCRIPTION
+* This module is the interface between Cyrus Imapd and the OpenSSL library.
+* As of now only one filedescriptor can be handled, so only one
+* TLS channel can be open at a time.
+*
+* tls_init_serverengine() is called once when the server is started
+* in order to initialize as much of the TLS stuff as possible.
+* The certificate handling is also decided during the setup phase,
+* so that a peer specific handling is not possible.
+*
+* tls_start_servertls() activates the TLS feature for the
+* filedescriptor selected with tls_setfd() before. We expect
+* that all buffers are flushed and the TLS handshake can begin
+* immediately.
+*
+* tls_stop_servertls() sends the "close notify" alert via
+* SSL_shutdown() to the peer and resets all connection specific
+* TLS data. As RFC2487 does not specify a seperate shutdown, it
+* is supposed that the underlying TCP connection is shut down
+* immediately afterwards, so we don't care about additional data
+* coming through the channel.
+*
+* Once the TLS connection is initiated, information about the TLS
+* state is available:
+* tls_protocol holds the protocol name (SSLv2, SSLv3, TLSv1),
+* tls_cipher_name the cipher name (e.g. RC4/MD5),
+* tls_cipher_usebits the number of bits actually used (e.g. 40),
+* tls_cipher_algbits the number of bits the algorithm is based on
+* (e.g. 128).
+* The last two values may be different when talking to a crippled
+* - ahem - export controled peer (e.g. 40/128).
+*
+* xxx we need to offer a callback to do peer issuer certification.
+* data that should be available for inspection:
+* If the peer offered a certifcate _and_ the certificate could be
+* verified successfully, part of the certificate data are available as:
+* tls_peer_subject X509v3-oneline with the DN of the peer
+* pfixlts_peer_CN extracted CommonName of the peer
+* tls_peer_issuer X509v3-oneline with the DN of the issuer
+* pfixlts_peer_CN extracted CommonName of the issuer
+* tls_peer_fingerprint fingerprint of the certificate
+*
+*/
+
+/* $Id: tls.c,v 1.47.2.3 2005/10/28 14:51:18 ken3 Exp $ */
+
+#include <config.h>
+
+#ifdef HAVE_SSL
+
+/* System library. */
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <syslog.h>
+
+/* OpenSSL library. */
+
+#include <openssl/lhash.h>
+#include <openssl/bn.h>
+#include <openssl/err.h>
+#include <openssl/pem.h>
+#include <openssl/x509.h>
+#include <openssl/ssl.h>
+
+/* Application-specific. */
+#include "assert.h"
+#include "xmalloc.h"
+#include "tls.h"
+
+/* Session caching/reuse stuff */
+#include "global.h"
+#include "cyrusdb.h"
+
+#define DB (config_tlscache_db) /* sessions are binary -> MUST use DB3 */
+
+static struct db *sessdb = NULL;
+static int sess_dbopen = 0;
+
+/* We must keep some of the info available */
+static const char hexcodes[] = "0123456789ABCDEF";
+
+enum {
+ var_imapd_tls_loglevel = 0,
+ var_proxy_tls_loglevel = 0,
+ CCERT_BUFSIZ = 256
+};
+
+static int verify_depth = 5;
+static int verify_error = X509_V_OK;
+
+static SSL_CTX *s_ctx = NULL, *c_ctx = NULL;
+
+static int tls_serverengine = 0; /* server engine initialized? */
+static int tls_clientengine = 0; /* client engine initialized? */
+static int do_dump = 0; /* actively dumping protocol? */
+
+
+int tls_enabled(void)
+{
+ const char *val;
+
+ val = config_getstring(IMAPOPT_TLS_CERT_FILE);
+ if (!val || !strcasecmp(val, "disabled")) return 0;
+
+ val = config_getstring(IMAPOPT_TLS_KEY_FILE);
+ if (!val || !strcasecmp(val, "disabled")) return 0;
+
+ return 1;
+}
+
+/* taken from OpenSSL apps/s_cb.c
+ * tim - this seems to just be giving logging messages
+ */
+
+static void apps_ssl_info_callback(SSL * s, int where, int ret)
+{
+ char *str;
+ int w;
+
+ if (var_imapd_tls_loglevel==0) return;
+
+ w = where & ~SSL_ST_MASK;
+
+ if (w & SSL_ST_CONNECT)
+ str = "SSL_connect";
+ else if (w & SSL_ST_ACCEPT)
+ str = "SSL_accept";
+ else
+ str = "undefined";
+
+ if (where & SSL_CB_LOOP) {
+ if (tls_serverengine && (var_imapd_tls_loglevel >= 2))
+ syslog(LOG_DEBUG, "%s:%s", str, SSL_state_string_long(s));
+ } else if (where & SSL_CB_ALERT) {
+ str = (where & SSL_CB_READ) ? "read" : "write";
+ if ((tls_serverengine && (var_imapd_tls_loglevel >= 2)) ||
+ ((ret & 0xff) != SSL3_AD_CLOSE_NOTIFY))
+ syslog(LOG_DEBUG, "SSL3 alert %s:%s:%s", str,
+ SSL_alert_type_string_long(ret),
+ SSL_alert_desc_string_long(ret));
+ } else if (where & SSL_CB_EXIT) {
+ if (ret == 0)
+ syslog(LOG_DEBUG, "%s:failed in %s",
+ str, SSL_state_string_long(s));
+ else if (ret < 0) {
+ syslog(LOG_DEBUG, "%s:error in %s",
+ str, SSL_state_string_long(s));
+ }
+ }
+}
+
+/* taken from OpenSSL apps/s_cb.c
+ not thread safe! */
+static RSA *tmp_rsa_cb(SSL * s __attribute__((unused)),
+ int export __attribute__((unused)),
+ int keylength)
+{
+ static RSA *rsa_tmp = NULL;
+
+ if (rsa_tmp == NULL) {
+ rsa_tmp = RSA_generate_key(keylength, RSA_F4, NULL, NULL);
+ }
+ return (rsa_tmp);
+}
+
+/* taken from OpenSSL apps/s_cb.c */
+
+static int verify_callback(int ok, X509_STORE_CTX * ctx)
+{
+ char buf[256];
+ X509 *err_cert;
+ int err;
+ int depth;
+
+ syslog(LOG_ERR,"Doing a peer verify");
+
+ err_cert = X509_STORE_CTX_get_current_cert(ctx);
+ err = X509_STORE_CTX_get_error(ctx);
+ depth = X509_STORE_CTX_get_error_depth(ctx);
+
+ X509_NAME_oneline(X509_get_subject_name(err_cert), buf, sizeof(buf));
+ if (ok==0)
+ {
+ syslog(LOG_ERR, "verify error:num=%d:%s", err,
+ X509_verify_cert_error_string(err));
+
+ if (verify_depth >= depth) {
+ ok = 0;
+ verify_error = X509_V_OK;
+ } else {
+ ok = 0;
+ verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;
+ }
+ }
+ switch (ctx->error) {
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+ X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, sizeof(buf));
+ syslog(LOG_NOTICE, "issuer= %s", buf);
+ break;
+ case X509_V_ERR_CERT_NOT_YET_VALID:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
+ syslog(LOG_NOTICE, "cert not yet valid");
+ break;
+ case X509_V_ERR_CERT_HAS_EXPIRED:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
+ syslog(LOG_NOTICE, "cert has expired");
+ break;
+ }
+
+ return (ok);
+}
+
+
+/*
+ * taken from OpenSSL crypto/bio/b_dump.c, modified to save a lot of strcpy
+ * and strcat by Matti Aarnio.
+ */
+
+#define TRUNCATE
+#define DUMP_WIDTH 16
+
+static int tls_dump(const char *s, int len)
+{
+ int ret = 0;
+ char buf[160 + 1];
+ char *ss;
+ int i;
+ int j;
+ int rows;
+ int trunc;
+ unsigned char ch;
+
+ trunc = 0;
+
+#ifdef TRUNCATE
+ for (; (len > 0) && ((s[len - 1] == ' ') || (s[len - 1] == '\0')); len--)
+ trunc++;
+#endif
+
+ rows = (len / DUMP_WIDTH);
+ if ((rows * DUMP_WIDTH) < len)
+ rows++;
+
+ for (i = 0; i < rows; i++) {
+ unsigned int val;
+ buf[0] = '\0'; /* start with empty string */
+ ss = buf;
+
+ val = i * DUMP_WIDTH;
+ assert(val <= 0xFFFF);
+ sprintf(ss, "%04x ", i * DUMP_WIDTH);
+ ss += strlen(ss);
+
+ for (j = 0; j < DUMP_WIDTH; j++) {
+ if (((i * DUMP_WIDTH) + j) >= len) {
+ strcpy(ss, " ");
+ } else {
+ ch = ((unsigned char) *((char *) (s) + i * DUMP_WIDTH + j))
+ & 0xFF;
+
+ sprintf(ss, "%02x%c", ch, j == 7 ? '|' : ' ');
+ ss += 3;
+ }
+ }
+ ss += strlen(ss);
+ *ss+= ' ';
+ for (j = 0; j < DUMP_WIDTH; j++) {
+ if (((i * DUMP_WIDTH) + j) >= len)
+ break;
+ ch = ((unsigned char) *((char *) (s) + i * DUMP_WIDTH + j)) & 0xff;
+ *ss+= (((ch >= ' ') && (ch <= '~')) ? ch : '.');
+ if (j == 7) *ss+= ' ';
+ }
+ *ss = 0;
+ /*
+ * if this is the last call then update the ddt_dump thing so that
+ * we will move the selection point in the debug window
+ */
+ if (var_imapd_tls_loglevel>0)
+ syslog(LOG_DEBUG, "%s", buf);
+ ret += strlen(buf);
+ }
+#ifdef TRUNCATE
+ if (trunc > 0) {
+ snprintf(buf, sizeof(buf), "%04x - <SPACES/NULS>\n", len+ trunc);
+ if (var_imapd_tls_loglevel>0)
+ syslog(LOG_DEBUG, "%s", buf);
+ ret += strlen(buf);
+ }
+#endif
+ return (ret);
+}
+
+ /*
+ * Set up the cert things on the server side. We do need both the
+ * private key (in key_file) and the cert (in cert_file).
+ * Both files may be identical.
+ *
+ * This function is taken from OpenSSL apps/s_cb.c
+ */
+
+static int set_cert_stuff(SSL_CTX * ctx,
+ const char *cert_file, const char *key_file)
+{
+ if (cert_file != NULL) {
+ if (SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0) {
+ syslog(LOG_ERR, "unable to get certificate from '%s'", cert_file);
+ return (0);
+ }
+ if (key_file == NULL)
+ key_file = cert_file;
+ if (SSL_CTX_use_PrivateKey_file(ctx, key_file,
+ SSL_FILETYPE_PEM) <= 0) {
+ syslog(LOG_ERR, "unable to get private key from '%s'", key_file);
+ return (0);
+ }
+ /* Now we know that a key and cert have been set against
+ * the SSL context */
+ if (!SSL_CTX_check_private_key(ctx)) {
+ syslog(LOG_ERR,
+ "Private key does not match the certificate public key");
+ return (0);
+ }
+ }
+ return (1);
+}
+
+/*
+ * The new_session_cb() is called, whenever a new session has been
+ * negotiated and session caching is enabled. We save the session in
+ * a database so that we can share sessions between processes.
+ */
+static int new_session_cb(SSL *ssl __attribute__((unused)),
+ SSL_SESSION *sess)
+{
+ int len;
+ unsigned char *data = NULL, *asn;
+ time_t expire;
+ int ret = -1;
+
+ assert(sess);
+
+ if (!sess_dbopen) return 0;
+
+ /* find the size of the ASN1 representation of the session */
+ len = i2d_SSL_SESSION(sess, NULL);
+
+ /*
+ * create the data buffer. the data is stored as:
+ * <expire time><ASN1 data>
+ */
+ data = (unsigned char *) xmalloc(sizeof(time_t)+len*sizeof(unsigned char));
+
+ /* transform the session into its ASN1 representation */
+ if (data) {
+ asn = data + sizeof(time_t);
+ len = i2d_SSL_SESSION(sess, &asn);
+ if (!len) syslog(LOG_ERR, "i2d_SSL_SESSION failed");
+ }
+
+ /* set the expire time for the external cache, and prepend it to data */
+ expire = SSL_SESSION_get_time(sess) + SSL_SESSION_get_timeout(sess);
+ memcpy(data, &expire, sizeof(time_t));
+
+ if (data && len) {
+ /* store the session in our database */
+ do {
+ ret = DB->store(sessdb, sess->session_id,
+ sess->session_id_length,
+ data, len + sizeof(time_t), NULL);
+ } while (ret == CYRUSDB_AGAIN);
+ }
+
+ if (data) free(data);
+
+ /* log this transaction */
+ if (var_imapd_tls_loglevel > 0) {
+ unsigned int i;
+ char idstr[SSL_MAX_SSL_SESSION_ID_LENGTH*2 + 1];
+ for (i = 0; i < sess->session_id_length; i++) {
+ sprintf(idstr+i*2, "%02X", sess->session_id[i]);
+ }
+ syslog(LOG_DEBUG, "new TLS session: id=%s, expire=%s, status=%s",
+ idstr, ctime(&expire), ret ? "failed" : "ok");
+ }
+
+ return (ret == 0);
+}
+
+/*
+ * Function for removing a session from our database.
+ */
+static void remove_session(unsigned char *id, int idlen)
+{
+ int ret;
+
+ assert(id);
+ assert(idlen <= SSL_MAX_SSL_SESSION_ID_LENGTH);
+
+ if (!sess_dbopen) return;
+
+ do {
+ ret = DB->delete(sessdb, id, idlen, NULL, 1);
+ } while (ret == CYRUSDB_AGAIN);
+
+ /* log this transaction */
+ if (var_imapd_tls_loglevel > 0) {
+ int i;
+ char idstr[SSL_MAX_SSL_SESSION_ID_LENGTH*2 + 1];
+
+ for (i = 0; i < idlen; i++) {
+ sprintf(idstr+i*2, "%02X", id[i]);
+ }
+
+ syslog(LOG_DEBUG, "remove TLS session: id=%s", idstr);
+ }
+}
+
+/*
+ * The remove_session_cb() is called, whenever the SSL engine removes
+ * a session from the internal cache. This happens if the session is
+ * removed because it is expired or when a connection was not shutdown
+ * cleanly.
+ */
+static void remove_session_cb(SSL_CTX *ctx __attribute__((unused)),
+ SSL_SESSION *sess)
+{
+ assert(sess);
+
+ remove_session(sess->session_id, sess->session_id_length);
+}
+
+/*
+ * The get_session_cb() is only called on SSL/TLS servers with the
+ * session id proposed by the client. The get_session_cb() is always
+ * called, also when session caching was disabled. We lookup the
+ * session in our database in case it was stored by another process.
+ */
+static SSL_SESSION *get_session_cb(SSL *ssl __attribute__((unused)),
+ unsigned char *id, int idlen, int *copy)
+{
+ int ret;
+ const char *data = NULL;
+ unsigned char *asn;
+ int len = 0;
+ time_t expire = 0, now = time(0);
+ SSL_SESSION *sess = NULL;
+
+ assert(id);
+ assert(idlen <= SSL_MAX_SSL_SESSION_ID_LENGTH);
+
+ if (!sess_dbopen) return NULL;
+
+ do {
+ ret = DB->fetch(sessdb, id, idlen, &data, &len, NULL);
+ } while (ret == CYRUSDB_AGAIN);
+
+ if (!ret && data) {
+ assert(len >= (int) sizeof(time_t));
+
+ /* grab the expire time */
+ memcpy(&expire, data, sizeof(time_t));
+
+ /* check if the session has expired */
+ if (expire < now) {
+ remove_session(id, idlen);
+ }
+ else {
+ /* transform the ASN1 representation of the session
+ into an SSL_SESSION object */
+ asn = (unsigned char*) data + sizeof(time_t);
+ sess = d2i_SSL_SESSION(NULL, &asn, len - sizeof(time_t));
+ if (!sess) syslog(LOG_ERR, "d2i_SSL_SESSION failed: %m");
+ }
+ }
+
+ /* log this transaction */
+ if (var_imapd_tls_loglevel > 0) {
+ int i;
+ char idstr[SSL_MAX_SSL_SESSION_ID_LENGTH*2 + 1];
+ for (i = 0; i < idlen; i++)
+ sprintf(idstr+i*2, "%02X", id[i]);
+
+ syslog(LOG_DEBUG, "get TLS session: id=%s, expire=%s, status=%s",
+ idstr, ctime(&expire),
+ !data ? "not found" : expire < now ? "expired" : "ok");
+ }
+
+ *copy = 0;
+ return sess;
+}
+
+/*
+ * Seed the random number generator.
+ */
+static int tls_rand_init(void)
+{
+#ifdef EGD_SOCKET
+ return (RAND_egd(EGD_SOCKET));
+#else
+ /* otherwise let OpenSSL do it internally */
+ return 0;
+#endif
+}
+
+ /*
+ * This is the setup routine for the SSL server. As smtpd might be called
+ * more than once, we only want to do the initialization one time.
+ *
+ * The skeleton of this function is taken from OpenSSL apps/s_server.c.
+
+ * returns -1 on error
+ */
+
+/* must be called after cyrus_init */
+int tls_init_serverengine(const char *ident,
+ int verifydepth,
+ int askcert,
+ int tlsonly)
+{
+ int off = 0;
+ int verify_flags = SSL_VERIFY_NONE;
+ const char *cipher_list;
+ const char *CApath;
+ const char *CAfile;
+ const char *s_cert_file;
+ const char *s_key_file;
+ int requirecert;
+ int timeout;
+
+ if (tls_serverengine)
+ return (0); /* already running */
+
+ if (var_imapd_tls_loglevel >= 2)
+ syslog(LOG_DEBUG, "starting TLS server engine");
+
+ SSL_library_init();
+ SSL_load_error_strings();
+ if (tls_rand_init() == -1) {
+ syslog(LOG_ERR,"TLS server engine: cannot seed PRNG");
+ return -1;
+ }
+
+#if 0
+ if (tlsonly) {
+ s_ctx = SSL_CTX_new(TLSv1_server_method());
+ } else {
+ s_ctx = SSL_CTX_new(SSLv23_server_method());
+ }
+#endif
+ /* even if we want TLS only, we use SSLv23 server method so we can
+ deal with a client sending an SSLv2 greeting message */
+
+ s_ctx = SSL_CTX_new(SSLv23_server_method());
+ if (s_ctx == NULL) {
+ return (-1);
+ };
+
+ off |= SSL_OP_ALL; /* Work around all known bugs */
+ if (tlsonly) {
+ off |= SSL_OP_NO_SSLv2;
+ off |= SSL_OP_NO_SSLv3;
+ }
+ SSL_CTX_set_options(s_ctx, off);
+ SSL_CTX_set_info_callback(s_ctx, (void (*)()) apps_ssl_info_callback);
+
+ /* Don't use an internal session cache */
+ SSL_CTX_sess_set_cache_size(s_ctx, 1); /* 0 is unlimited, so use 1 */
+ SSL_CTX_set_session_cache_mode(s_ctx, SSL_SESS_CACHE_SERVER |
+ SSL_SESS_CACHE_NO_AUTO_CLEAR |
+ SSL_SESS_CACHE_NO_INTERNAL_LOOKUP);
+
+ /* Get the session timeout from the config file (in minutes) */
+ timeout = config_getint(IMAPOPT_TLS_SESSION_TIMEOUT);
+ if (timeout < 0) timeout = 0;
+ if (timeout > 1440) timeout = 1440; /* 24 hours max */
+
+ /* A timeout of zero disables session caching */
+ if (timeout) {
+ char dbdir[1024];
+ int r;
+
+ /* Set the context for session reuse -- use the service ident */
+ SSL_CTX_set_session_id_context(s_ctx, (void*) ident, strlen(ident));
+
+ /* Set the timeout for the internal/external cache (in seconds) */
+ SSL_CTX_set_timeout(s_ctx, timeout*60);
+
+ /* Set the callback functions for the external session cache */
+ SSL_CTX_sess_set_new_cb(s_ctx, new_session_cb);
+ SSL_CTX_sess_set_remove_cb(s_ctx, remove_session_cb);
+ SSL_CTX_sess_set_get_cb(s_ctx, get_session_cb);
+
+ /* create the name of the db file */
+ strlcpy(dbdir, config_dir, sizeof(dbdir));
+ strlcat(dbdir, FNAME_TLSSESSIONS, sizeof(dbdir));
+
+ r = DB->open(dbdir, CYRUSDB_CREATE, &sessdb);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: opening %s: %s",
+ dbdir, cyrusdb_strerror(ret));
+ }
+ else
+ sess_dbopen = 1;
+ }
+
+ cipher_list = config_getstring(IMAPOPT_TLS_CIPHER_LIST);
+ if (!SSL_CTX_set_cipher_list(s_ctx, cipher_list)) {
+ syslog(LOG_ERR,"TLS server engine: cannot load cipher list '%s'",
+ cipher_list);
+ return (-1);
+ }
+
+ CAfile = config_getstring(IMAPOPT_TLS_CA_FILE);
+ CApath = config_getstring(IMAPOPT_TLS_CA_PATH);
+
+ if ((!SSL_CTX_load_verify_locations(s_ctx, CAfile, CApath)) ||
+ (!SSL_CTX_set_default_verify_paths(s_ctx))) {
+ /* just a warning since this is only necessary for client auth */
+ syslog(LOG_NOTICE,"TLS server engine: cannot load CA data");
+ }
+
+ s_cert_file = config_getstring(IMAPOPT_TLS_CERT_FILE);
+ s_key_file = config_getstring(IMAPOPT_TLS_KEY_FILE);
+
+ if (!set_cert_stuff(s_ctx, s_cert_file, s_key_file)) {
+ syslog(LOG_ERR,"TLS server engine: cannot load cert/key data");
+ return (-1);
+ }
+ SSL_CTX_set_tmp_rsa_callback(s_ctx, tmp_rsa_cb);
+
+ verify_depth = verifydepth;
+ if (askcert!=0)
+ verify_flags |= SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE;
+
+ requirecert = config_getswitch(IMAPOPT_TLS_REQUIRE_CERT);
+ if (requirecert)
+ verify_flags |= SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT
+ | SSL_VERIFY_CLIENT_ONCE;
+ SSL_CTX_set_verify(s_ctx, verify_flags, verify_callback);
+
+ if (askcert || requirecert) {
+ if (CAfile == NULL) {
+ syslog(LOG_ERR,
+ "TLS server engine: No CA file specified. "
+ "Client side certs may not work");
+ } else {
+ SSL_CTX_set_client_CA_list(s_ctx, SSL_load_client_CA_file(CAfile));
+ }
+ }
+
+ tls_serverengine = 1;
+ return (0);
+}
+
+
+/* taken from OpenSSL apps/s_cb.c */
+
+static long bio_dump_cb(BIO * bio, int cmd, const char *argp, int argi,
+ long argl __attribute__((unused)), long ret)
+{
+ if (!do_dump)
+ return (ret);
+
+ if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) {
+ printf("read from %08X [%08lX] (%d bytes => %ld (0x%X))",
+ (unsigned int) bio, (long unsigned int) argp,
+ argi, ret, (unsigned int) ret);
+ tls_dump(argp, (int) ret);
+ return (ret);
+ } else if (cmd == (BIO_CB_WRITE | BIO_CB_RETURN)) {
+ printf("write to %08X [%08lX] (%d bytes => %ld (0x%X))",
+ (unsigned int) bio, (long unsigned int)argp,
+ argi, ret, (unsigned int) ret);
+ tls_dump(argp, (int) ret);
+ }
+ return (ret);
+}
+
+
+
+
+ /*
+ * This is the actual startup routine for the connection. We expect
+ * that the buffers are flushed and the "Ready to start TLS" was
+ * send to the client, so that we can immediately can start the TLS
+ * handshake process.
+ *
+ * 'layerbits' and 'authid' are filled in on success. authid is only
+ * filled in if the client authenticated. 'ret' is the SSL connection
+ * on success.
+ */
+int tls_start_servertls(int readfd, int writefd,
+ int *layerbits, char **authid, SSL **ret)
+{
+ int sts;
+ int j;
+ unsigned int n;
+ SSL_CIPHER *cipher;
+ X509 *peer;
+ const char *tls_protocol = NULL;
+ const char *tls_cipher_name = NULL;
+ int tls_cipher_usebits = 0;
+ int tls_cipher_algbits = 0;
+ SSL *tls_conn;
+ int r = 0;
+
+ assert(tls_serverengine);
+ assert(ret);
+ if (var_imapd_tls_loglevel >= 1)
+ syslog(LOG_DEBUG, "setting up TLS connection");
+
+ if (authid) *authid = NULL;
+
+ tls_conn = (SSL *) SSL_new(s_ctx);
+ if (tls_conn == NULL) {
+ *ret = NULL;
+ r = -1;
+ goto done;
+ }
+ SSL_clear(tls_conn);
+
+ /* set the file descriptors for SSL to use */
+ if ((SSL_set_rfd(tls_conn, readfd) == 0) ||
+ (SSL_set_wfd(tls_conn, writefd) == 0)) {
+ r = -1;
+ goto done;
+ }
+
+ /*
+ * This is the actual handshake routine. It will do all the negotiations
+ * and will check the client cert etc.
+ */
+ SSL_set_accept_state(tls_conn);
+
+ /*
+ * We do have an SSL_set_fd() and now suddenly a BIO_ routine is called?
+ * Well there is a BIO below the SSL routines that is automatically
+ * created for us, so we can use it for debugging purposes.
+ */
+ if (var_imapd_tls_loglevel >= 3)
+ BIO_set_callback(SSL_get_rbio(tls_conn), bio_dump_cb);
+
+ /* Dump the negotiation for loglevels 3 and 4*/
+ if (var_imapd_tls_loglevel >= 3)
+ do_dump = 1;
+
+ if ((sts = SSL_accept(tls_conn)) <= 0) {
+ SSL_SESSION *session = SSL_get_session(tls_conn);
+ if (session) {
+ SSL_CTX_remove_session(s_ctx, session);
+ }
+ r = -1;
+ goto done;
+ }
+ /* Only loglevel==4 dumps everything */
+ if (var_imapd_tls_loglevel < 4)
+ do_dump = 0;
+
+ /*
+ * Lets see, whether a peer certificate is available and what is
+ * the actual information. We want to save it for later use.
+ */
+ peer = SSL_get_peer_certificate(tls_conn);
+ if (peer != NULL) {
+ char fingerprint[EVP_MAX_MD_SIZE * 3];
+ char issuer_CN[CCERT_BUFSIZ];
+ char peer_issuer[CCERT_BUFSIZ];
+ char peer_CN[CCERT_BUFSIZ];
+ char peer_subject[CCERT_BUFSIZ];
+ unsigned char md[EVP_MAX_MD_SIZE];
+
+ syslog(LOG_DEBUG, "received client certificate");
+
+ X509_NAME_oneline(X509_get_subject_name(peer),
+ peer_subject, CCERT_BUFSIZ);
+ syslog(LOG_DEBUG, "subject=%s", peer_subject);
+ X509_NAME_oneline(X509_get_issuer_name(peer),
+ peer_issuer, CCERT_BUFSIZ);
+ if (var_imapd_tls_loglevel >= 2)
+ syslog(LOG_DEBUG, "issuer=%s", peer_issuer);
+
+ if (X509_digest(peer, EVP_md5(), md, &n)) {
+ for (j = 0; j < (int) n; j++)
+ {
+ fingerprint[j * 3] = hexcodes[(md[j] & 0xf0) >> 4];
+ fingerprint[(j * 3) + 1] = hexcodes[(md[j] & 0x0f)];
+ if (j + 1 != (int) n) {
+ fingerprint[(j * 3) + 2] = '_';
+ } else {
+ fingerprint[(j * 3) + 2] = '\0';
+ }
+ }
+ if (var_imapd_tls_loglevel >= 2)
+ syslog(LOG_DEBUG, "fingerprint=%s", fingerprint);
+ }
+ X509_NAME_get_text_by_NID(X509_get_subject_name(peer),
+ NID_commonName, peer_CN, CCERT_BUFSIZ);
+ X509_NAME_get_text_by_NID(X509_get_issuer_name(peer),
+ NID_commonName, issuer_CN, CCERT_BUFSIZ);
+ if (var_imapd_tls_loglevel >= 3)
+ syslog(LOG_DEBUG, "subject_CN=%s, issuer_CN=%s",
+ peer_CN, issuer_CN);
+
+ /* xxx verify that we like the peer_issuer/issuer_CN */
+
+ if (authid != NULL) {
+ /* save the peer id for our caller */
+ *authid = peer_CN ? xstrdup(peer_CN) : NULL;
+ }
+ X509_free(peer);
+ }
+ tls_protocol = SSL_get_version(tls_conn);
+ cipher = SSL_get_current_cipher(tls_conn);
+ tls_cipher_name = SSL_CIPHER_get_name(cipher);
+ tls_cipher_usebits = SSL_CIPHER_get_bits(cipher, &tls_cipher_algbits);
+
+ if (layerbits != NULL) {
+ *layerbits = tls_cipher_usebits;
+ }
+
+ if (authid && *authid) {
+ syslog(LOG_NOTICE, "starttls: %s with cipher %s (%d/%d bits %s)"
+ " authenticated as %s",
+ tls_protocol, tls_cipher_name,
+ tls_cipher_usebits, tls_cipher_algbits,
+ SSL_session_reused(tls_conn) ? "reused" : "new",
+ *authid);
+ } else {
+ syslog(LOG_NOTICE, "starttls: %s with cipher %s (%d/%d bits %s)"
+ " no authentication",
+ tls_protocol, tls_cipher_name,
+ tls_cipher_usebits, tls_cipher_algbits,
+ SSL_session_reused(tls_conn) ? "reused" : "new");
+ }
+
+ done:
+ if (r && tls_conn) {
+ /* error; clean up */
+ SSL_free(tls_conn);
+ tls_conn = NULL;
+ }
+ *ret = tls_conn;
+ return r;
+}
+
+int tls_reset_servertls(SSL **conn)
+{
+ int r = 0;
+
+ if (*conn) {
+ if (TLS_FAST_SHUTDOWN) {
+ /*
+ * Don't bother spending time closing the TLS session,
+ * but make sure its available for reuse.
+ */
+ SSL_set_shutdown(*conn,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
+ }
+ else {
+ /* Follow the TLS protocol and do a shutdown handshake */
+ r = SSL_shutdown(*conn);
+ if (r == 0) {
+ /* Just sent, now wait for peer to ack */
+ r = SSL_shutdown(*conn);
+ }
+ if (r == 0) r = -1;
+ }
+ SSL_free(*conn);
+ }
+
+ return r;
+}
+
+int tls_shutdown_serverengine(void)
+{
+ int r;
+
+ if (tls_serverengine && sess_dbopen) {
+ r = DB->close(sessdb);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing tlsdb: %s",
+ cyrusdb_strerror(r));
+ }
+ sessdb = NULL;
+ sess_dbopen = 0;
+ }
+
+ return 0;
+
+}
+
+/*
+ * Delete expired sessions.
+ */
+struct prunerock {
+ int count;
+ int deletions;
+};
+
+static int prune_p(void *rock, const char *id, int idlen,
+ const char *data, int datalen)
+{
+ struct prunerock *prock = (struct prunerock *) rock;
+ time_t expire;
+
+ prock->count++;
+
+ assert(datalen >= (int) sizeof(time_t));
+
+ /* grab the expire time */
+ memcpy(&expire, data, sizeof(time_t));
+
+ /* log this transaction */
+ if (var_imapd_tls_loglevel > 0) {
+ int i;
+ char idstr[SSL_MAX_SSL_SESSION_ID_LENGTH*2 + 1];
+
+ assert(idlen <= SSL_MAX_SSL_SESSION_ID_LENGTH);
+
+ for (i = 0; i < idlen; i++) {
+ sprintf(idstr+i*2, "%02X", (unsigned char) id[i]);
+ }
+
+ syslog(LOG_DEBUG, "found TLS session: id=%s, expire=%s",
+ idstr, ctime(&expire));
+ }
+
+ /* check if the session has expired */
+ return (expire < time(0));
+}
+
+static int prune_cb(void *rock, const char *id, int idlen,
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ struct prunerock *prock = (struct prunerock *) rock;
+
+ prock->deletions++;
+
+ remove_session((unsigned char*) id, idlen);
+
+ return 0;
+}
+
+/* must be called after cyrus_init */
+int tls_prune_sessions(void)
+{
+ char dbdir[1024];
+ int ret;
+ struct prunerock prock;
+
+ /* create the name of the db file */
+ strlcpy(dbdir, config_dir, sizeof(dbdir));
+ strlcat(dbdir, FNAME_TLSSESSIONS, sizeof(dbdir));
+
+ ret = DB->open(dbdir, CYRUSDB_CREATE, &sessdb);
+ if (ret != CYRUSDB_OK) {
+ syslog(LOG_ERR, "DBERROR: opening %s: %s",
+ dbdir, cyrusdb_strerror(ret));
+ return 1;
+ }
+ else {
+ /* check each session in our database */
+ sess_dbopen = 1;
+ prock.count = prock.deletions = 0;
+ DB->foreach(sessdb, "", 0, &prune_p, &prune_cb, &prock, NULL);
+ DB->close(sessdb);
+ sessdb = NULL;
+ sess_dbopen = 0;
+
+ syslog(LOG_NOTICE, "tls_prune: purged %d out of %d entries",
+ prock.deletions, prock.count);
+ }
+
+ return 0;
+}
+
+/* fill string buffer with info about tls connection */
+int tls_get_info(SSL *conn, char *buf, size_t len)
+{
+ int usebits = 0;
+ int algbits = 0;
+
+ usebits = SSL_get_cipher_bits(conn, &algbits);
+ snprintf(buf, len, "version=%s cipher=%s bits=%d/%d verify=%s",
+ SSL_get_cipher_version(conn), SSL_get_cipher_name(conn),
+ usebits, algbits,
+ SSL_get_verify_result(conn) == X509_V_OK ? "YES" : "NO");
+
+ return (strlen(buf));
+}
+
+int tls_init_clientengine(int verifydepth,
+ char *var_tls_cert_file,
+ char *var_tls_key_file)
+{
+ int off = 0;
+ int verify_flags = SSL_VERIFY_NONE;
+ const char *CApath;
+ const char *CAfile;
+ char *c_cert_file;
+ char *c_key_file;
+
+ if (tls_clientengine)
+ return (0); /* already running */
+
+ if (var_proxy_tls_loglevel >= 2)
+ syslog(LOG_DEBUG, "starting TLS client engine");
+
+ SSL_library_init();
+ SSL_load_error_strings();
+ if (tls_rand_init() == -1) {
+ printf("TLS client engine: cannot seed PRNG\n");
+ return -1;
+ }
+
+ c_ctx = SSL_CTX_new(TLSv1_client_method());
+ if (c_ctx == NULL) {
+ return (-1);
+ };
+
+ off |= SSL_OP_ALL; /* Work around all known bugs */
+ SSL_CTX_set_options(c_ctx, off);
+ SSL_CTX_set_info_callback(c_ctx, (void (*)()) apps_ssl_info_callback);
+
+ CAfile = config_getstring(IMAPOPT_TLS_CA_FILE);
+ CApath = config_getstring(IMAPOPT_TLS_CA_PATH);
+
+ if ((!SSL_CTX_load_verify_locations(c_ctx, CAfile, CApath)) ||
+ (!SSL_CTX_set_default_verify_paths(c_ctx))) {
+ /* just a warning since this is only necessary for client auth */
+ syslog(LOG_NOTICE,"TLS client engine: cannot load CA data");
+ }
+
+ if (strlen(var_tls_cert_file) == 0)
+ c_cert_file = NULL;
+ else
+ c_cert_file = var_tls_cert_file;
+ if (strlen(var_tls_key_file) == 0)
+ c_key_file = NULL;
+ else
+ c_key_file = var_tls_key_file;
+
+ if (c_cert_file || c_key_file) {
+ if (!set_cert_stuff(c_ctx, c_cert_file, c_key_file)) {
+ syslog(LOG_ERR,"TLS client engine: cannot load cert/key data");
+ return (-1);
+ }
+ }
+ SSL_CTX_set_tmp_rsa_callback(c_ctx, tmp_rsa_cb);
+
+ verify_depth = verifydepth;
+ SSL_CTX_set_verify(c_ctx, verify_flags, verify_callback);
+
+ tls_clientengine = 1;
+ return (0);
+}
+
+int tls_start_clienttls(int readfd, int writefd,
+ int *layerbits, char **authid, SSL **ret,
+ SSL_SESSION **sess)
+{
+ int sts;
+ SSL_CIPHER *cipher;
+ X509 *peer;
+ const char *tls_protocol = NULL;
+ const char *tls_cipher_name = NULL;
+ int tls_cipher_usebits = 0;
+ int tls_cipher_algbits = 0;
+ SSL *tls_conn;
+ int r = 0;
+
+ assert(tls_clientengine);
+ assert(ret);
+ if (var_proxy_tls_loglevel >= 1)
+ syslog(LOG_DEBUG, "setting up TLS connection");
+
+ if (authid) *authid = NULL;
+
+ tls_conn = (SSL *) SSL_new(c_ctx);
+ if (tls_conn == NULL) {
+ *ret = NULL;
+ r = -1;
+ goto done;
+ }
+ SSL_clear(tls_conn);
+
+ /* set the file descriptors for SSL to use */
+ if ((SSL_set_rfd(tls_conn, readfd) == 0) ||
+ (SSL_set_wfd(tls_conn, writefd) == 0)) {
+ r = -1;
+ goto done;
+ }
+
+ /*
+ * This is the actual handshake routine. It will do all the negotiations
+ * and will check the client cert etc.
+ */
+ SSL_set_connect_state(tls_conn);
+
+ /*
+ * We do have an SSL_set_fd() and now suddenly a BIO_ routine is called?
+ * Well there is a BIO below the SSL routines that is automatically
+ * created for us, so we can use it for debugging purposes.
+ */
+ if (var_proxy_tls_loglevel >= 3)
+ BIO_set_callback(SSL_get_rbio(tls_conn), bio_dump_cb);
+
+ /* Dump the negotiation for loglevels 3 and 4*/
+ if (var_proxy_tls_loglevel >= 3)
+ do_dump = 1;
+
+ if (sess && *sess) /* Reuse a session if we have one */
+ SSL_set_session(tls_conn, *sess);
+
+ if ((sts = SSL_connect(tls_conn)) <= 0) {
+ SSL_SESSION *session = SSL_get_session(tls_conn);
+ if (session) {
+ SSL_CTX_remove_session(c_ctx, session);
+ }
+ if (sess) *sess = NULL;
+ r = -1;
+ goto done;
+ }
+ if (sess) *sess = SSL_get_session(tls_conn);
+
+ /* Only loglevel==4 dumps everything */
+ if (var_proxy_tls_loglevel < 4)
+ do_dump = 0;
+
+ /*
+ * Lets see, whether a peer certificate is available and what is
+ * the actual information. We want to save it for later use.
+ */
+ peer = SSL_get_peer_certificate(tls_conn);
+ if (peer != NULL) {
+ char issuer_CN[CCERT_BUFSIZ];
+ char peer_CN[CCERT_BUFSIZ];
+
+ syslog(LOG_DEBUG, "received server certificate");
+
+ X509_NAME_get_text_by_NID(X509_get_subject_name(peer),
+ NID_commonName, peer_CN, CCERT_BUFSIZ);
+ X509_NAME_get_text_by_NID(X509_get_issuer_name(peer),
+ NID_commonName, issuer_CN, CCERT_BUFSIZ);
+ if (var_proxy_tls_loglevel >= 3)
+ syslog(LOG_DEBUG, "subject_CN=%s, issuer_CN=%s",
+ peer_CN, issuer_CN);
+
+ /* xxx verify that we like the peer_issuer/issuer_CN */
+
+ if (authid != NULL) {
+ /* save the peer id for our caller */
+ *authid = peer_CN ? xstrdup(peer_CN) : NULL;
+ }
+ X509_free(peer);
+ }
+ tls_protocol = SSL_get_version(tls_conn);
+ cipher = SSL_get_current_cipher(tls_conn);
+ tls_cipher_name = SSL_CIPHER_get_name(cipher);
+ tls_cipher_usebits = SSL_CIPHER_get_bits(cipher, &tls_cipher_algbits);
+
+ if (layerbits != NULL)
+ *layerbits = tls_cipher_usebits;
+
+ syslog(LOG_NOTICE, "starttls: %s with cipher %s (%d/%d bits %s)"
+ " no authentication",
+ tls_protocol, tls_cipher_name,
+ tls_cipher_usebits, tls_cipher_algbits,
+ SSL_session_reused(tls_conn) ? "reused" : "new");
+
+ done:
+ if (r && tls_conn) {
+ /* error; clean up */
+ SSL_free(tls_conn);
+ tls_conn = NULL;
+ }
+ *ret = tls_conn;
+ return r;
+
+}
+
+#else
+
+int tls_enabled(void)
+{
+ return 0;
+}
+
+#endif /* HAVE_SSL */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,93 @@
+/* tls.h - STARTTLS helper functions for imapd
+ * Tim Martin
+ * 9/21/99
+ *
+ * Based upon Lutz Jaenicke's TLS patches for postfix
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: tls.h,v 1.18 2003/10/22 18:50:09 rjs3 Exp $ */
+
+#ifndef INCLUDED_TLS_H
+#define INCLUDED_TLS_H
+
+/* is tls enabled? */
+int tls_enabled(void);
+
+/* name of the SSL/TLS sessions database */
+#define FNAME_TLSSESSIONS "/tls_sessions.db"
+
+#ifdef HAVE_SSL
+
+#include <openssl/ssl.h>
+
+/* init tls */
+int tls_init_serverengine(const char *ident,
+ int verifydepth, /* depth to verify */
+ int askcert, /* 1 = client auth */
+ int tlsonly);
+
+int tls_init_clientengine(int verifydepth,
+ char *var_tls_cert_file,
+ char *var_tls_key_file);
+
+/* start tls negotiation */
+int tls_start_servertls(int readfd, int writefd,
+ int *layerbits, char **authid, SSL **ret);
+
+int tls_start_clienttls(int readfd, int writefd,
+ int *layerbits, char **authid, SSL **ret,
+ SSL_SESSION **sess);
+
+/* reset tls */
+int tls_reset_servertls(SSL **conn);
+
+/* shutdown/cleanup tls */
+int tls_shutdown_serverengine(void);
+
+/* remove expired sessions from the external cache */
+int tls_prune_sessions(void);
+
+/* fill string buffer with info about tls connection */
+int tls_get_info(SSL *conn, char *buf, size_t len);
+
+#endif /* HAVE_SSL */
+
+#endif /* INCLUDED_TLS_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls_prune.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls_prune.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls_prune.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/tls_prune.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,91 @@
+/*
+ * tls_prune.c -- program to prune TLS session db of expired sessions
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: tls_prune.c,v 1.5.2.1 2004/01/27 23:13:51 ken3 Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <unistd.h>
+
+#include "exitcodes.h"
+#include "global.h"
+#include "tls.h"
+#include "xmalloc.h"
+
+/* global state */
+const int config_need_data = 0;
+
+void usage(void)
+{
+ fprintf(stderr, "tls_prune [-C <altconfig>]\n");
+ exit(-1);
+}
+
+int main(int argc, char *argv[])
+{
+ extern char *optarg;
+ int opt,r;
+ char *alt_config = NULL;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ default:
+ usage();
+ break;
+ }
+ }
+
+ cyrus_init(alt_config, "tls_prune", 0);
+
+ r = tls_prune_sessions();
+
+ cyrus_done();
+
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/unexpunge.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/unexpunge.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/unexpunge.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/unexpunge.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,614 @@
+/* unexpunge.c -- Program to unexpunge messages
+ *
+ * Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: unexpunge.c,v 1.1.2.5 2006/03/31 19:22:28 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <errno.h>
+#include <signal.h>
+
+#include "annotate.h"
+#include "cyrusdb.h"
+#include "duplicate.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "hash.h"
+#include "imap_err.h"
+#include "index.h"
+#include "libcyr_cfg.h"
+#include "mailbox.h"
+#include "mboxlist.h"
+#include "util.h"
+#include "xmalloc.h"
+
+/* global state */
+const int config_need_data = 0;
+
+int verbose = 0;
+
+void usage(void)
+{
+ fprintf(stderr,
+ "unexpunge [-C <altconfig>] -l <mailbox>\n"
+ "unexpunge [-C <altconfig>] -a [-d] [-v] <mailbox>\n"
+ "unexpunge [-C <altconfig>] -u [-d] [-v] <mailbox> <uid>...\n");
+ exit(-1);
+}
+
+enum {
+ MODE_UNKNOWN = -1,
+ MODE_LIST,
+ MODE_ALL,
+ MODE_UID
+};
+
+struct msg {
+ unsigned recno;
+ unsigned long uid;
+ int restore;
+};
+
+int compare_uid(const void *a, const void *b)
+{
+ return *((unsigned long *) a) - *((unsigned long *) b);
+}
+
+int compare_msg(const void *a, const void *b)
+{
+ return ((struct msg *) a)->uid - ((struct msg *) b)->uid;
+}
+
+void list_expunged(struct mailbox *mailbox,
+ struct msg *msgs, unsigned long exists,
+ const char *expunge_index_base)
+{
+ const char *rec;
+ unsigned msgno;
+ unsigned long uid, size, cache_offset;
+ time_t internaldate, sentdate, last_updated;
+ const char *cacheitem;
+
+ for (msgno = 0; msgno < exists; msgno++) {
+ /* Jump to index record for this message */
+ rec = expunge_index_base + mailbox->start_offset +
+ msgs[msgno].recno * mailbox->record_size;
+
+ uid = ntohl(*((bit32 *)(rec+OFFSET_UID)));
+ internaldate = ntohl(*((bit32 *)(rec+OFFSET_INTERNALDATE)));
+ sentdate = ntohl(*((bit32 *)(rec+OFFSET_SENTDATE)));
+ size = ntohl(*((bit32 *)(rec+OFFSET_SIZE)));
+ cache_offset = ntohl(*((bit32 *)(rec+OFFSET_CACHE_OFFSET)));
+ last_updated = ntohl(*((bit32 *)(rec+OFFSET_LAST_UPDATED)));
+
+ printf("UID: %lu\n", uid);
+ printf("\tSize: %lu\n", size);
+ printf("\tSent: %s", ctime(&sentdate));
+ printf("\tRecv: %s", ctime(&internaldate));
+ printf("\tExpg: %s", ctime(&last_updated));
+
+ cacheitem = mailbox->cache_base + cache_offset;
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip envelope */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body structure */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip body */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip binary body */
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip cached headers */
+
+ printf("\tFrom: %s\n", cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip from */
+ printf("\tTo : %s\n", cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip to */
+ printf("\tCc : %s\n", cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip cc */
+ printf("\tBcc : %s\n", cacheitem + CACHE_ITEM_SIZE_SKIP);
+ cacheitem = CACHE_ITEM_NEXT(cacheitem); /* skip bcc */
+ printf("\tSubj: %s\n\n", cacheitem + CACHE_ITEM_SIZE_SKIP);
+ }
+}
+
+int restore_expunged(struct mailbox *mailbox,
+ struct msg *msgs, unsigned long eexists,
+ const char *expunge_index_base,
+ unsigned *numrestored, int unsetdeleted)
+{
+ int r = 0;
+ const char *irec;
+ char buf[INDEX_HEADER_SIZE > INDEX_RECORD_SIZE ?
+ INDEX_HEADER_SIZE : INDEX_RECORD_SIZE];
+ char *path, fnamebuf[MAX_MAILBOX_PATH+1], fnamebufnew[MAX_MAILBOX_PATH+1];
+ FILE *newindex = NULL, *newexpungeindex = NULL;
+ unsigned emsgno, imsgno;
+ unsigned long iexists, euid, iuid;
+ uquota_t quotarestored = 0, newquotaused;
+ unsigned numansweredflag = 0, numdeletedflag = 0, numflaggedflag = 0;
+ unsigned newexists, newexpunged, newdeleted, newanswered, newflagged;
+ time_t now = time(NULL);
+ struct txn *tid = NULL;
+
+ /* Open new index/expunge files */
+ path = (mailbox->mpath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox->mpath : mailbox->path;
+
+ strlcpy(fnamebufnew, path, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, FNAME_INDEX, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ newindex = fopen(fnamebufnew, "w+");
+ if (!newindex) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebufnew);
+ return IMAP_IOERROR;
+ }
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_EXPUNGE)) ?
+ mailbox->mpath : mailbox->path;
+
+ strlcpy(fnamebufnew, path, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, FNAME_EXPUNGE_INDEX, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ newexpungeindex = fopen(fnamebufnew, "w+");
+ if (!newindex) {
+ syslog(LOG_ERR, "IOERROR: creating %s: %m", fnamebufnew);
+ fclose(newindex);
+ return IMAP_IOERROR;
+ }
+
+ /* Copy over index/expunge headers
+ *
+ * XXX do we want/need to bump the generation number?
+ */
+ fwrite(mailbox->index_base, 1, mailbox->start_offset, newindex);
+ fwrite(expunge_index_base, 1, mailbox->start_offset, newexpungeindex);
+
+ iexists = ntohl(*((bit32 *)(mailbox->index_base+OFFSET_EXISTS)));
+
+ for (imsgno = 0, emsgno = 0; emsgno < eexists; emsgno++) {
+ /* Copy expunge index record for this message */
+ memcpy(buf,
+ expunge_index_base + mailbox->start_offset +
+ msgs[emsgno].recno * mailbox->record_size,
+ mailbox->record_size);
+
+ euid = ntohl(*((bit32 *)(buf+OFFSET_UID)));
+
+ /* Write all cyrus.index records w/ iuid < euid to cyrus.index */
+ for (; imsgno < iexists; imsgno++) {
+ /* Jump to index record for this message */
+ irec = mailbox->index_base + mailbox->start_offset +
+ imsgno * mailbox->record_size;
+
+ iuid = ntohl(*((bit32 *)(irec+OFFSET_UID)));
+
+ if (iuid > euid) break;
+
+ fwrite(irec, 1, mailbox->record_size, newindex);
+ }
+
+ if (msgs[emsgno].restore) {
+ bit32 sysflags = ntohl(*((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)));
+
+ if (verbose) {
+ printf("\trestoring UID %ld\n", msgs[emsgno].uid);
+ syslog(LOG_INFO, "restoring UID %ld in mailbox '%s'",
+ msgs[emsgno].uid, mailbox->name);
+ }
+
+ /* Update counts */
+ (*numrestored)++;
+ quotarestored += ntohl(*((bit32 *)(buf+OFFSET_SIZE)));
+ if (sysflags & FLAG_ANSWERED) numansweredflag++;
+ if (sysflags & FLAG_FLAGGED) numflaggedflag++;
+ if (unsetdeleted) {
+ sysflags &= ~FLAG_DELETED;
+ *((bit32 *)(buf+OFFSET_SYSTEM_FLAGS)) = htonl(sysflags);
+ }
+ else if (sysflags & FLAG_DELETED) numdeletedflag++;
+
+ /* Write record to cyrus.index */
+ *((bit32 *)(buf+OFFSET_LAST_UPDATED)) = htonl(now);
+ fwrite(buf, 1, mailbox->record_size, newindex);
+ }
+ else {
+ /* Write record to cyrus.expunge */
+ fwrite(buf, 1, mailbox->record_size, newexpungeindex);
+ }
+ }
+
+ /* Write all remaining cyrus.index records to cyrus.index */
+ if (imsgno < iexists) {
+ /* Jump to index record for next message */
+ irec = mailbox->index_base + mailbox->start_offset +
+ imsgno * mailbox->record_size;
+
+ fwrite(irec, 1, (iexists - imsgno) * mailbox->record_size, newindex);
+ }
+
+ /* Fix up information in index header */
+ memcpy(buf, mailbox->index_base, mailbox->start_offset);
+
+ /* Update uidvalidity */
+ *((bit32 *)(buf+OFFSET_UIDVALIDITY)) = now;
+
+ /* Fix up exists */
+ newexists = ntohl(*((bit32 *)(buf+OFFSET_EXISTS))) + *numrestored;
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(newexists);
+
+ /* Fix up expunged count */
+ newexpunged = ntohl(*((bit32 *)(buf+OFFSET_LEAKED_CACHE))) - *numrestored;
+ *((bit32 *)(buf+OFFSET_LEAKED_CACHE)) = htonl(newexpunged);
+
+ /* Fix up other counts */
+ newanswered = ntohl(*((bit32 *)(buf+OFFSET_ANSWERED))) + numansweredflag;
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(newanswered);
+ newdeleted = ntohl(*((bit32 *)(buf+OFFSET_DELETED))) + numdeletedflag;
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(newdeleted);
+ newflagged = ntohl(*((bit32 *)(buf+OFFSET_FLAGGED))) + numflaggedflag;
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(newflagged);
+
+ /* Fix up quota_mailbox_used */
+#ifdef HAVE_LONG_LONG_INT
+ newquotaused =
+ ntohll(*((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64))) + quotarestored;
+ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonll(newquotaused);
+#else
+ /* Zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ newquotaused =
+ ntohl(*((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED))) + quotarestored;
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) = htonl(newquotaused);
+#endif
+
+ /* Write out new index header */
+ rewind(newindex);
+ fwrite(buf, 1, mailbox->start_offset, newindex);
+
+ /* Ensure everything made it to disk */
+ fflush(newindex);
+ fclose(newindex);
+
+ /* Fix up information in expunge index header */
+ memcpy(buf, expunge_index_base, mailbox->start_offset);
+
+ /* Update uidvalidity */
+ *((bit32 *)(buf+OFFSET_UIDVALIDITY)) = now;
+
+ /* Fix up exists */
+ newexists = ntohl(*((bit32 *)(buf+OFFSET_EXISTS))) - *numrestored;
+ *((bit32 *)(buf+OFFSET_EXISTS)) = htonl(newexists);
+
+ /* Fix up other counts */
+ newanswered = ntohl(*((bit32 *)(buf+OFFSET_ANSWERED))) - numansweredflag;
+ *((bit32 *)(buf+OFFSET_ANSWERED)) = htonl(newanswered);
+ /* XXX we use the numrestored count here because we may have unset
+ * the \Deleted flag when we copied the record to cyrus.index,
+ * but we know that any message that has to be restored had the
+ * \Deleted set in cyrus.expunge in the first place
+ */
+ newdeleted = ntohl(*((bit32 *)(buf+OFFSET_DELETED))) - *numrestored;
+ *((bit32 *)(buf+OFFSET_DELETED)) = htonl(newdeleted);
+ newflagged = ntohl(*((bit32 *)(buf+OFFSET_FLAGGED))) - numflaggedflag;
+ *((bit32 *)(buf+OFFSET_FLAGGED)) = htonl(newflagged);
+
+ /* Fix up quota_mailbox_used */
+#ifdef HAVE_LONG_LONG_INT
+ newquotaused =
+ ntohll(*((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64))) - quotarestored;
+ *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonll(newquotaused);
+#else
+ /* Zero the unused 32bits */
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonl(0);
+ newquotaused =
+ ntohl(*((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED))) - quotarestored;
+ *((bit32 *)(buf+OFFSET_QUOTA_MAILBOX_USED)) = htonl(newquotaused);
+#endif
+
+ /* Write out new expunge index header */
+ rewind(newexpungeindex);
+ fwrite(buf, 1, mailbox->start_offset, newexpungeindex);
+
+ /* Ensure everything made it to disk */
+ fflush(newexpungeindex);
+ fclose(newexpungeindex);
+
+ /* Rename our files */
+ path = (mailbox->mpath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_INDEX)) ?
+ mailbox->mpath : mailbox->path;
+
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_INDEX, sizeof(fnamebuf));
+
+ strlcpy(fnamebufnew, fnamebuf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ if (rename(fnamebufnew, fnamebuf)) {
+ syslog(LOG_ERR, "IOERROR: renaming index file for %s: %m",
+ mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ path = (mailbox->mpath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_EXPUNGE)) ?
+ mailbox->mpath : mailbox->path;
+
+ strlcpy(fnamebuf, path, sizeof(fnamebuf));
+ strlcat(fnamebuf, FNAME_EXPUNGE_INDEX, sizeof(fnamebuf));
+
+ strlcpy(fnamebufnew, fnamebuf, sizeof(fnamebufnew));
+ strlcat(fnamebufnew, ".NEW", sizeof(fnamebufnew));
+
+ if (rename(fnamebufnew, fnamebuf)) {
+ syslog(LOG_ERR, "IOERROR: renaming expunge index file for %s: %m",
+ mailbox->name);
+ return IMAP_IOERROR;
+ }
+
+ /* Record quota restore */
+ r = quota_read(&mailbox->quota, &tid, 1);
+ if (!r) {
+ mailbox->quota.used += quotarestored;
+ r = quota_write(&mailbox->quota, &tid);
+ if (!r) quota_commit(&tid);
+ else {
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record restore of " UQUOTA_T_FMT " bytes in quota %s",
+ quotarestored, mailbox->quota.root);
+ }
+ }
+ else if (r == IMAP_QUOTAROOT_NONEXISTENT) r = 0;
+
+ return r;
+}
+
+int main(int argc, char *argv[])
+{
+ extern char *optarg;
+ int opt, r = 0;
+ char *alt_config = NULL;
+ struct mailbox mailbox;
+ int doclose = 0, mode = MODE_UNKNOWN, unsetdeleted = 0;
+ char expunge_fname[MAX_MAILBOX_PATH+1];
+ int expunge_fd = -1;
+ struct stat sbuf;
+ const char *lockfailaction;
+ struct msg *msgs;
+ unsigned numrestored = 0;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "C:laudv")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+
+ case 'l':
+ if (mode != MODE_UNKNOWN) usage();
+ mode = MODE_LIST;
+ break;
+
+ case 'a':
+ if (mode != MODE_UNKNOWN) usage();
+ mode = MODE_ALL;
+ break;
+
+ case 'u':
+ if (mode != MODE_UNKNOWN) usage();
+ mode = MODE_UID;
+ break;
+
+ case 'd':
+ unsetdeleted = 1;
+ break;
+
+ case 'v':
+ verbose = 1;
+ break;
+
+ default:
+ usage();
+ break;
+ }
+ }
+
+ /* sanity check */
+ if (mode == MODE_UNKNOWN ||
+ (optind + (mode == MODE_UID ? 1 : 0)) >= argc) usage();
+
+ cyrus_init(alt_config, "unexpunge", 0);
+
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ quotadb_init(0);
+ quotadb_open(NULL);
+
+ /* Open/lock header */
+ r = mailbox_open_header(argv[optind++], 0, &mailbox);
+ if (!r && mailbox.header_fd != -1) {
+ doclose = 1;
+ (void) mailbox_lock_header(&mailbox);
+ mailbox.header_lock_count = 1;
+ }
+
+ /* Attempt to open/lock index */
+ if (!r) r = mailbox_open_index(&mailbox);
+ if (!r) {
+ (void) mailbox_lock_index(&mailbox);
+ mailbox.index_lock_count = 1;
+ }
+ if (!r) r = mailbox_lock_pop(&mailbox);
+
+ /* Open expunge index */
+ if (!r) {
+ char *path =
+ (mailbox.mpath &&
+ (config_metapartition_files & IMAP_ENUM_METAPARTITION_FILES_EXPUNGE)) ?
+ mailbox.mpath : mailbox.path;
+
+ strlcpy(expunge_fname, path, sizeof(expunge_fname));
+ strlcat(expunge_fname, FNAME_EXPUNGE_INDEX, sizeof(expunge_fname));
+
+ expunge_fd = open(expunge_fname, O_RDWR, 0666);
+ }
+
+ if (r || expunge_fd == -1) {
+ /* mailbox corrupt/nonexistent -- skip it */
+ syslog(LOG_WARNING, "unable to open/lock mailbox %s", argv[optind]);
+ if (doclose) mailbox_close(&mailbox);
+ return 0;
+ }
+
+ if ((r = lock_reopen(expunge_fd, expunge_fname, &sbuf, &lockfailaction))) {
+ syslog(LOG_ERR, "IOERROR: %s expunge index for %s: %m",
+ lockfailaction, mailbox.name);
+ }
+ if (!r) {
+ const char *expunge_index_base = NULL;
+ unsigned long expunge_index_len = 0; /* mapped size */
+ unsigned long exists, uid;
+ const char *rec;
+ unsigned msgno;
+ unsigned long *uids = NULL;
+ unsigned nuids;
+
+ map_refresh(expunge_fd, 1, &expunge_index_base,
+ &expunge_index_len, sbuf.st_size, "expunge",
+ mailbox.name);
+
+ exists = ntohl(*((bit32 *)(expunge_index_base+OFFSET_EXISTS)));
+
+ msgs = (struct msg *) xmalloc(exists * sizeof(struct msg));
+
+ /* Get UIDs of messages to restore */
+ if (mode == MODE_UID) {
+ int i;
+
+ nuids = argc - optind;
+ uids = (unsigned long *) xmalloc(nuids * sizeof(unsigned long));
+
+ for (i = 0; i < nuids; i++)
+ uids[i] = strtoul(argv[optind+i], NULL, 10);
+
+ /* Sort the UIDs so we can binary search */
+ qsort(uids, nuids, sizeof(unsigned long), compare_uid);
+ }
+
+ /* Get UIDs of expunged messages */
+ for (msgno = 0; msgno < exists; msgno++) {
+ /* Jump to index record for this message */
+ rec = expunge_index_base + mailbox.start_offset +
+ msgno * mailbox.record_size;
+
+ uid = ntohl(*((bit32 *)(rec+OFFSET_UID)));
+
+ msgs[msgno].recno = msgno;
+ msgs[msgno].uid = uid;
+ switch (mode) {
+ case MODE_LIST: msgs[msgno].restore = 0; break;
+ case MODE_ALL: msgs[msgno].restore = 1; break;
+ case MODE_UID:
+ /* see if this UID is in our list */
+ msgs[msgno].restore = bsearch(&uid, uids, nuids,
+ sizeof(unsigned long),
+ compare_uid) != NULL;
+ break;
+ }
+ }
+ if (uids) free(uids);
+
+ /* Sort msgs by UID */
+ qsort(msgs, exists, sizeof(struct msg), compare_msg);
+
+ if (mode == MODE_LIST)
+ list_expunged(&mailbox, msgs, exists, expunge_index_base);
+ else {
+ printf("restoring %sexpunged messages in mailbox '%s'\n",
+ mode == MODE_ALL ? "all " : "", mailbox.name);
+
+ r = restore_expunged(&mailbox, msgs, exists, expunge_index_base,
+ &numrestored, unsetdeleted);
+ if (!r) {
+ printf("restored %u out of %lu expunged messages\n",
+ numrestored, exists);
+ syslog(LOG_NOTICE,
+ "restored %u out of %lu expunged messages in mailbox '%s'",
+ numrestored, exists, mailbox.name);
+ }
+ }
+
+ map_free(&expunge_index_base, &expunge_index_len);
+ free(msgs);
+
+ if (lock_unlock(expunge_fd))
+ syslog(LOG_ERR,
+ "IOERROR: unlocking expunge index of %s: %m",
+ mailbox.name);
+ }
+ close(expunge_fd);
+
+ mailbox_unlock_pop(&mailbox);
+ mailbox_unlock_index(&mailbox);
+ mailbox_unlock_header(&mailbox);
+ mailbox_close(&mailbox);
+
+ quotadb_close();
+ quotadb_done();
+
+ mboxlist_close();
+ mboxlist_done();
+
+ cyrus_done();
+
+ exit(r);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,470 @@
+/* user.c -- User manipulation routines
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: user.c,v 1.17.2.5 2005/11/17 15:46:28 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <syslog.h>
+
+#if HAVE_DIRENT_H
+# include <dirent.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# if HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif
+# if HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif
+# if HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif
+
+#include "global.h"
+#include "user.h"
+#include "mboxkey.h"
+#include "mboxlist.h"
+#include "mailbox.h"
+#include "util.h"
+#include "seen.h"
+#include "quota.h"
+#include "xmalloc.h"
+
+#if 0
+static int user_deleteacl(char *name, int matchlen, int maycreate, void* rock)
+{
+ /* deleting all references to the user is too slow right now */
+
+ char *ident = (char *) rock;
+ int r;
+ char *acl;
+ char *rights, *nextid;
+
+ r = mboxlist_lookup(name, &acl, NULL);
+
+ while (!r && acl) {
+ rights = strchr(acl, '\t');
+ if (!rights) break;
+ *rights++ = '\0';
+
+ nextid = strchr(rights, '\t');
+ if (!nextid) break;
+ *nextid++ = '\0';
+
+ if (!strcmp(acl, ident)) {
+ /* delete ACL for ident */
+ if (!r) mboxlist_setacl(name, ident, (char *)0,
+ 1, ident, NULL);
+ }
+
+ acl = nextid;
+ }
+ return 0;
+}
+#endif
+
+static int user_deletesieve(char *user)
+{
+ char hash, *domain;
+ char sieve_path[2048];
+ char filename[2048];
+ DIR *mbdir;
+ struct dirent *next = NULL;
+
+ /* oh well */
+ if(config_getswitch(IMAPOPT_SIEVEUSEHOMEDIR)) return 0;
+
+ if (config_virtdomains && (domain = strchr(user, '@'))) {
+ char d = (char) dir_hash_c(domain+1);
+ *domain = '\0'; /* split user at domain */
+ hash = (char) dir_hash_c(user);
+ snprintf(sieve_path, sizeof(sieve_path), "%s%s%c/%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR),
+ FNAME_DOMAINDIR, d, domain+1, hash, user);
+ *domain = '@'; /* reassemble user at domain */
+ }
+ else {
+ hash = (char) dir_hash_c(user);
+
+ snprintf(sieve_path, sizeof(sieve_path), "%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR), hash, user);
+ }
+
+ mbdir=opendir(sieve_path);
+
+ if(mbdir) {
+ while((next = readdir(mbdir)) != NULL) {
+ if(!strcmp(next->d_name, ".")
+ || !strcmp(next->d_name, "..")) continue;
+
+ snprintf(filename, sizeof(filename), "%s/%s",
+ sieve_path, next->d_name);
+
+ unlink(filename);
+ }
+
+ closedir(mbdir);
+
+ /* remove mbdir */
+ rmdir(sieve_path);
+ }
+
+ return 0;
+}
+
+int user_deletedata(char *user, char *userid __attribute__((unused)),
+ struct auth_state *authstate __attribute__((unused)),
+ int wipe_user)
+{
+ char *fname;
+
+ /* delete seen state and mbox keys */
+ if(wipe_user) {
+ seen_delete_user(user);
+ /* XXX what do we do about multiple backends? */
+ mboxkey_delete_user(user);
+ }
+
+ /* delete subscriptions */
+ fname = mboxlist_hash_usersubs(user);
+ (void) unlink(fname);
+ free(fname);
+
+ /* delete quotas */
+ user_deletequotaroots(user);
+
+ /* delete ACLs - we're using the internal names here */
+#if 0
+ /* xxx no reason to do this if user_deleteacl is a stub anyway. */
+ if(wipe_user) {
+ const char pat[] = "*";
+ mboxlist_findall(NULL, pat, sizeof(pat), userid,
+ authstate, user_deleteacl,
+ user);
+ }
+#endif
+
+ /* delete sieve scripts */
+ user_deletesieve(user);
+
+ return 0;
+}
+
+struct rename_rock {
+ char *olduser;
+ char *newuser;
+ char *oldinbox;
+ char *newinbox;
+ int domainchange;
+};
+
+static int user_renamesub(char *name, int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)), void* rock)
+{
+ struct rename_rock *rrock = (struct rename_rock *) rock;
+ char newname[MAX_MAILBOX_NAME+1];
+
+ if (!strncasecmp(name, "INBOX", 5) &&
+ (name[5] == '\0' || name[5] == '.')) {
+ /* generate new name of personal mailbox */
+ snprintf(newname, sizeof(newname), "%s%s",
+ rrock->newinbox, name+5);
+ name = newname;
+ }
+ else if (!strncmp(name, rrock->oldinbox, strlen(rrock->oldinbox)) &&
+ (name[strlen(rrock->oldinbox)] == '\0' ||
+ name[strlen(rrock->oldinbox)] == '.')) {
+ /* generate new name of personal mailbox */
+ snprintf(newname, sizeof(newname), "%s%s",
+ rrock->newinbox, name+strlen(rrock->oldinbox));
+ name = newname;
+ }
+ else if (rrock->domainchange) {
+ /* if we're changing domains, don't subscribe to other mailboxes */
+ return 0;
+ }
+
+ mboxlist_changesub(name, rrock->newuser, NULL, 1, 1);
+
+ return 0;
+}
+
+static int user_renamesieve(char *olduser, char *newuser)
+{
+ char hash, *domain;
+ char oldpath[2048], newpath[2048];
+ int r;
+
+ /* oh well */
+ if(config_getswitch(IMAPOPT_SIEVEUSEHOMEDIR)) return 0;
+
+ if (config_virtdomains && (domain = strchr(olduser, '@'))) {
+ char d = (char) dir_hash_c(domain+1);
+ *domain = '\0'; /* split user at domain */
+ hash = (char) dir_hash_c(olduser);
+ snprintf(oldpath, sizeof(oldpath), "%s%s%c/%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR),
+ FNAME_DOMAINDIR, d, domain+1, hash, olduser);
+ *domain = '@'; /* reassemble user at domain */
+ }
+ else {
+ hash = (char) dir_hash_c(olduser);
+
+ snprintf(oldpath, sizeof(oldpath), "%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR), hash, olduser);
+ }
+
+ if (config_virtdomains && (domain = strchr(newuser, '@'))) {
+ char d = (char) dir_hash_c(domain+1);
+ *domain = '\0'; /* split user at domain */
+ hash = (char) dir_hash_c(newuser);
+ snprintf(newpath, sizeof(newpath), "%s%s%c/%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR),
+ FNAME_DOMAINDIR, d, domain+1, hash, newuser);
+ *domain = '@'; /* reassemble user at domain */
+ }
+ else {
+ hash = (char) dir_hash_c(newuser);
+
+ snprintf(newpath, sizeof(newpath), "%s/%c/%s",
+ config_getstring(IMAPOPT_SIEVEDIR), hash, newuser);
+ }
+
+ /* rename sieve directory
+ *
+ * XXX this doesn't rename sieve scripts
+ */
+ r = rename(oldpath, newpath);
+ if (r < 0) {
+ if (errno == ENOENT) {
+ syslog(LOG_WARNING, "error renaming %s to %s: %m",
+ oldpath, newpath);
+ /* but maybe the user doesn't have any scripts ? */
+ r = 0;
+ }
+ else if (errno == EXDEV) {
+ syslog(LOG_ERR, "error renaming %s to %s: different filesystems",
+ oldpath, newpath);
+ /* doh! need to copy entire directory tree */
+ }
+ else {
+ syslog(LOG_ERR, "error renaming %s to %s: %m", oldpath, newpath);
+ }
+ }
+
+ return r;
+}
+
+int user_renamedata(char *olduser, char *newuser,
+ char *userid __attribute__((unused)),
+ struct auth_state *authstate)
+{
+ struct namespace namespace;
+ char oldinbox[MAX_MAILBOX_NAME+1], newinbox[MAX_MAILBOX_NAME+1];
+ char *olddomain, *newdomain;
+ struct rename_rock rrock;
+ char pat[MAX_MAILBOX_NAME+1];
+ int r;
+
+ /* set namespace */
+ r = mboxname_init_namespace(&namespace, 0);
+
+ /* get olduser's INBOX */
+ if (!r) r = (*namespace.mboxname_tointernal)(&namespace, "INBOX",
+ olduser, oldinbox);
+
+ /* get newuser's INBOX */
+ if (!r) r = (*namespace.mboxname_tointernal)(&namespace, "INBOX",
+ newuser, newinbox);
+
+ if (!r) {
+ /* copy seen db */
+ seen_rename_user(olduser, newuser);
+ }
+
+ /* setup rock for find operations */
+ rrock.olduser = olduser;
+ rrock.newuser = newuser;
+ rrock.oldinbox = oldinbox;
+ rrock.newinbox = newinbox;
+
+ olddomain = strchr(oldinbox, '!');
+ newdomain = strchr(newinbox, '!');
+ if ((!olddomain && !newdomain) ||
+ (olddomain && newdomain &&
+ (olddomain - oldinbox) == (newdomain - newinbox) &&
+ !strncmp(oldinbox, newinbox, (olddomain - newdomain))))
+ rrock.domainchange = 0;
+ else
+ rrock.domainchange = 1;
+
+ if (!r) {
+ /* copy/rename subscriptions - we're using the internal names here */
+ strcpy(pat, "*");
+ mboxlist_findsub(NULL, pat, 1, olduser, authstate, user_renamesub,
+ &rrock, 1);
+ }
+
+ if (!r) {
+ /* move sieve scripts */
+ user_renamesieve(olduser, newuser);
+ }
+
+ return r;
+}
+
+int user_renameacl(char *name, char *olduser, char *newuser)
+{
+ int r = 0;
+ char *acl;
+ char *rights, *nextid;
+
+ r = mboxlist_lookup(name, &acl, NULL);
+
+ while (!r && acl) {
+ rights = strchr(acl, '\t');
+ if (!rights) break;
+ *rights++ = '\0';
+
+ nextid = strchr(rights, '\t');
+ if (!nextid) break;
+ *nextid++ = '\0';
+
+ if (!strcmp(acl, olduser)) {
+ /* copy ACL for olduser to newuser */
+ r = mboxlist_setacl(name, newuser, rights, 1, newuser, NULL);
+ /* delete ACL for olduser */
+ if (!r)
+ r = mboxlist_setacl(name, olduser, (char *)0, 1, newuser, NULL);
+ }
+
+ acl = nextid;
+ }
+
+ return r;
+}
+
+int user_copyquotaroot(char *oldname, char *newname)
+{
+ int r = 0;
+ struct quota quota;
+
+ quota.root = oldname;
+
+ r = quota_read("a, NULL, 0);
+ if (!r) mboxlist_setquota(newname, quota.limit, 0);
+
+ return r;
+}
+
+struct find_rock {
+ char *inboxname;
+ struct txn **tid;
+};
+
+static int find_p(void *rockp,
+ const char *key, int keylen,
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ char *inboxname = ((struct find_rock *) rockp)->inboxname;
+
+ return (!strncmp(key, inboxname, strlen(inboxname)) &&
+ (keylen == strlen(inboxname) || key[strlen(inboxname)] == '.'));
+}
+
+static int find_cb(void *rockp,
+ const char *key, int keylen,
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ struct quota quota_root;
+ struct txn **tid = ((struct find_rock *) rockp)->tid;
+ int r;
+
+ quota_root.root = (char *) xstrndup(key, keylen);
+ r = quota_delete("a_root, tid);
+ free(quota_root.root);
+ return r;
+}
+
+int user_deletequotaroots(const char *user)
+{
+ struct namespace namespace;
+ char buf[MAX_MAILBOX_NAME+1], *inboxname = buf;
+ struct txn *tid = NULL;
+ int r;
+
+ /* set namespace */
+ r = mboxname_init_namespace(&namespace, 0);
+
+ /* get user's toplevel quotaroot (INBOX) */
+ if (!r)
+ r = (*namespace.mboxname_tointernal)(&namespace, "INBOX",
+ user, inboxname);
+
+ if (!r) {
+ struct find_rock frock = { NULL, NULL };
+ frock.inboxname = inboxname;
+ frock.tid = &tid;
+ r = config_quota_db->foreach(qdb, inboxname, strlen(inboxname),
+ &find_p, &find_cb, &frock, &tid);
+ }
+
+ if (!r) quota_commit(&tid);
+
+ return r;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/user.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,74 @@
+/* user.h -- User manipulation routines
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: user.h,v 1.6 2003/10/22 18:50:09 rjs3 Exp $
+ */
+
+#ifndef INCLUDED_USER_H
+#define INCLUDED_USER_H
+
+#include "auth.h"
+
+/* Delete meta-data (seen state, subscriptions, ACLs, quotaroots,
+ * sieve scripts) for 'user'.
+ *
+ * wipe-user says to delete seen state also (remove the user from the murder)
+ */
+int user_deletedata(char *user, char *userid, struct auth_state *authstate,
+ int wipe_user);
+
+/* Rename/copy user meta-data (seen state, subscriptions, sieve scripts)
+ * from 'olduser' to 'newuser'.
+ */
+int user_renamedata(char *olduser, char *newuser, char *userid,
+ struct auth_state *authstate);
+
+/* Rename ACL for 'olduser' to 'newuser' on mailbox 'name'. */
+int user_renameacl(char *name, char *olduser, char *newuser);
+
+/* Copy a quotaroot from mailbox 'oldname' to 'newname' */
+int user_copyquotaroot(char *oldname, char *newname);
+
+/* Delete all quotaroots for 'user' */
+int user_deletequotaroots(const char *user);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,181 @@
+/* version.c: versioning functions
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: version.c,v 1.14.2.5 2005/02/16 21:06:19 shadow Exp $
+ */
+
+#include <config.h>
+
+#include <sasl/sasl.h>
+#include <sys/utsname.h>
+#ifdef HAVE_BDB
+#include <db.h>
+#endif
+#ifdef HAVE_KRB
+#include <krb.h>
+#endif
+#ifdef HAVE_UCDSNMP
+#include <ucd-snmp/version.h>
+#endif
+
+#include <string.h>
+#include "version.h"
+#include "xversion.h"
+#include "prot.h"
+#include "cyrusdb.h"
+#include "map.h"
+#include "lock.h"
+#include "nonblock.h"
+#include "idle.h"
+
+#ifdef USE_SIEVE
+#include "sieve_interface.h"
+#endif
+
+static char id_resp_command[MAXIDVALUELEN];
+static char id_resp_arguments[MAXIDVALUELEN] = "";
+
+/*
+ * Grab the command line args for the ID response.
+ */
+void id_getcmdline(int argc, char **argv)
+{
+ snprintf(id_resp_command, MAXIDVALUELEN, *argv);
+ while (--argc > 0) {
+ snprintf(id_resp_arguments + strlen(id_resp_arguments),
+ MAXIDVALUELEN - strlen(id_resp_arguments),
+ "%s%s", *++argv, (argc > 1) ? " " : "");
+ }
+}
+
+/*
+ * Output the ID response.
+ * We do NOT close the parameter list so other stuff can be added later.
+ */
+void id_response(struct protstream *pout)
+{
+ struct utsname os;
+ const char *sasl_imp;
+ int sasl_ver;
+ char env_buf[MAXIDVALUELEN+1];
+
+ prot_printf(pout, "* ID ("
+ "\"name\" \"Cyrus IMAPD\""
+ " \"version\" \"%s %s\""
+ " \"vendor\" \"Project Cyrus\""
+ " \"support-url\" \"http://asg.web.cmu.edu/cyrus\"",
+ CYRUS_VERSION, CYRUS_CVSDATE);
+
+ /* add the os info */
+ if (uname(&os) != -1)
+ prot_printf(pout,
+ " \"os\" \"%s\""
+ " \"os-version\" \"%s\"",
+ os.sysname, os.release);
+
+#ifdef ID_SAVE_CMDLINE
+ /* add the command line info */
+ prot_printf(pout, " \"command\" \"%s\"", id_resp_command);
+ if (strlen(id_resp_arguments)) {
+ prot_printf(pout, " \"arguments\" \"%s\"", id_resp_arguments);
+ } else {
+ prot_printf(pout, " \"arguments\" NIL");
+ }
+#endif
+
+ /* SASL information */
+ snprintf(env_buf, MAXIDVALUELEN,"Built w/Cyrus SASL %d.%d.%d",
+ SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP);
+
+ sasl_version(&sasl_imp, &sasl_ver);
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; Running w/%s %d.%d.%d", sasl_imp,
+ (sasl_ver & 0xFF000000) >> 24,
+ (sasl_ver & 0x00FF0000) >> 16,
+ (sasl_ver & 0x0000FFFF));
+
+ /* add the environment info */
+#ifdef DB_VERSION_STRING
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; Built w/%s", DB_VERSION_STRING);
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; Running w/%s", db_version(NULL, NULL, NULL));
+#endif
+#ifdef HAVE_SSL
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; Built w/%s", OPENSSL_VERSION_TEXT);
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; Running w/%s", SSLeay_version(SSLEAY_VERSION));
+#ifdef EGD_SOCKET
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ " (with EGD)");
+#endif
+#endif
+#ifdef USE_SIEVE
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; %s", SIEVE_VERSION);
+#endif
+#ifdef HAVE_LIBWRAP
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; TCP Wrappers");
+#endif
+#ifdef HAVE_UCDSNMP
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; UCD-SNMP %s", VersionInfo);
+#endif
+#ifdef HAVE_NETSNMP
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; NET-SNMP");
+#endif
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; mmap = %s", map_method_desc);
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; lock = %s", lock_method_desc);
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; nonblock = %s", nonblock_method_desc);
+#ifdef HAVE_KRB
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ " (%s)", krb4_version);
+#endif
+ if (idle_method_desc)
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; idle = %s", idle_method_desc);
+
+ prot_printf(pout, " \"environment\" \"%s\"", env_buf);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/version.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,81 @@
+/* version.h: the version number
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: version.h,v 1.128.2.17 2006/07/10 13:46:20 murch Exp $
+ */
+
+#define _CYRUS_VERSION "v2.3.7"
+
+/* EXTRA_IDENT is a hack to add some version information for which compile
+ * was used to build this version (at CMU, but we don't care what you do with
+ * it).
+ */
+
+#ifdef EXTRA_IDENT
+#define CYRUS_VERSION _CYRUS_VERSION "-" EXTRA_IDENT
+#else
+#define CYRUS_VERSION _CYRUS_VERSION
+#endif
+
+enum {
+ CAPA_PREAUTH = 0x1,
+ CAPA_POSTAUTH = 0x2
+};
+
+/* CAPABILITIES are defined here, not including TLS/SASL ones,
+ and those that are configurable */
+#define CAPA_PREAUTH_STRING "IMAP4 IMAP4rev1 LITERAL+ ID"
+
+#define CAPA_POSTAUTH_STRING " ACL RIGHTS=kxte QUOTA " \
+ "MAILBOX-REFERRALS NAMESPACE UIDPLUS " \
+ "NO_ATOMIC_RENAME UNSELECT " \
+ "CHILDREN MULTIAPPEND BINARY " \
+ "SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES " \
+ "ANNOTATEMORE CATENATE CONDSTORE"
+
+
+/* Values for ID processing */
+enum {
+ MAXIDFAILED = 3,
+ MAXIDLOG = 5,
+ MAXIDFIELDLEN = 30,
+ MAXIDVALUELEN = 1024,
+ MAXIDPAIRS = 30,
+ MAXIDLOGLEN = (MAXIDPAIRS * (MAXIDFIELDLEN + MAXIDVALUELEN + 6))
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/xversion.sh
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/xversion.sh?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/xversion.sh (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/xversion.sh Sat Aug 26 02:00:13 2006
@@ -1,0 +1,25 @@
+#!/bin/sh
+#
+# xversion.sh: extract the timestamp from the $Id: string
+# in every source file and use the most recent as the CYRUS_CVSDATE
+#
+# $Id: xversion.sh,v 1.7 2003/10/22 18:03:00 rjs3 Exp $
+
+if [ "$AWK" = "" ]; then
+ AWK=awk
+fi
+
+DATEPAT=[1-2][0-9][0-9][0-9]/[0-1][0-9]/[0-3][0-9]
+TIMEPAT=[0-2][0-9]:[0-5][0-9]:[0-5][0-9]
+
+printf "/* Generated automatically by xversion.sh */\n\n" > xversion.h
+
+printf "#define CYRUS_CVSDATE " >> xversion.h
+
+find .. -name '*.[chly]' -print | \
+ xargs egrep '\$Id: ' | \
+ $AWK ' # extract timestamp and surround with quotes
+ match ($0, pattern) {
+ printf "\"%s\"\n", substr($0, RSTART, RLENGTH)
+ }' pattern="$DATEPAT $TIMEPAT" | \
+ sort | tail -1 >> xversion.h
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imap/xversion.sh
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+Makefile
+makedepend.log
+imtest
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+/.cvsignore/1.3/Wed Oct 22 18:03:01 2003//Tcyrus-release-2-3-7
+/Makefile.in/1.25.2.5/Mon Feb 21 19:25:50 2005//Tcyrus-release-2-3-7
+/imtest.c/1.93.2.15/Thu May 25 15:21:49 2006//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/imtest
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,102 @@
+# Makefile for imtest
+#
+# @configure_input@
+#
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Makefile.in,v 1.25.2.5 2005/02/21 19:25:50 ken3 Exp $
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@ @LOCALDEFS@
+CPPFLAGS = -I.. -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+LIBS = @LIBS@
+IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@
+DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@ @COM_ERR_LDFLAGS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+PURIFY=/usr/local/bin/purify
+PUREOPT= -best-effort -windows=no -logfile=/tmp/pure/%v.%p.log -always_use_cache_dir
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+
+all: imtest
+
+install:
+ $(INSTALL) -s -m 755 imtest $(DESTDIR)$(exec_prefix)/bin
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/pop3test
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/nntptest
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/lmtptest
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/smtptest
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/mupdatetest
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/sivtest
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/synctest
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
+
+imtest: imtest.o $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o imtest imtest.o $(DEPLIBS) $(IMAP_LIBS)
+
+imtest.pure: imtest.o $(DEPLIBS)
+ $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o imtest $(OBJS) $(DEPLIBS) $(LIBS) $(IMAP_LIBS)
+
+clean:
+ rm -f *.o Makefile.bak makedepend.log imtest
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c 1> makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/imtest.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/imtest.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/imtest.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/imtest/imtest.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2634 @@
+/* imtest.c -- IMAP/POP3/NNTP/LMTP/SMTP/MUPDATE/MANAGESIEVE test client
+ * Ken Murchison (multi-protocol implementation)
+ * Tim Martin (SASL implementation)
+ * $Id: imtest.c,v 1.93.2.15 2006/05/25 15:21:49 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "config.h"
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+#include <limits.h>
+#include <unistd.h>
+
+#include <netinet/in.h>
+#include <sys/un.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include <pwd.h>
+
+#include "prot.h"
+#include "hash.h"
+#include "imparse.h"
+#include "iptostring.h"
+#include "xmalloc.h"
+
+#ifdef HAVE_SSL
+#include <openssl/ssl.h>
+#include <openssl/md5.h>
+
+static SSL_CTX *tls_ctx = NULL;
+static SSL *tls_conn = NULL;
+static SSL_SESSION *tls_sess = NULL;
+
+#else /* HAVE_SSL */
+#include <sasl/md5global.h>
+#include <sasl/md5.h>
+
+#define MD5_Init _sasl_MD5Init
+#define MD5_Update _sasl_MD5Update
+#define MD5_Final _sasl_MD5Final
+
+#endif /* HAVE_SSL */
+
+#define IMTEST_OK 0
+#define IMTEST_FAIL -1
+#define IMTEST_CLOSEME -2
+
+typedef enum {
+ STAT_CONT = 0,
+ STAT_NO = 1,
+ STAT_OK = 2
+} imt_stat;
+
+/* global vars */
+sasl_conn_t *conn;
+int sock; /* socket descriptor */
+
+int verbose=0;
+
+struct protstream *pout, *pin;
+
+static char *authname = NULL;
+static char *username = NULL;
+static char *realm = NULL;
+static char *cmdline_password = NULL;
+
+static char *output_socket = NULL;
+static int output_socket_opened = 0;
+static ino_t output_socket_ino = 0;
+
+#define CONFIGHASHSIZE 30 /* relatively small */
+
+static struct hash_table confighash;
+int mysasl_config(void*, const char*, const char*, const char**, unsigned*);
+
+extern int _sasl_debug;
+extern char *optarg;
+
+struct stringlist
+{
+ char *str;
+ struct stringlist *next;
+};
+
+struct stringlist *strlist_head = NULL;
+
+/* callbacks we support */
+static sasl_callback_t callbacks[] = {
+ {
+ SASL_CB_ECHOPROMPT, NULL, NULL
+ }, {
+ SASL_CB_NOECHOPROMPT, NULL, NULL
+ }, {
+#ifdef SASL_CB_GETREALM
+ SASL_CB_GETREALM, NULL, NULL
+ }, {
+#endif
+ SASL_CB_USER, NULL, NULL
+ }, {
+ SASL_CB_AUTHNAME, NULL, NULL
+ }, {
+ SASL_CB_PASS, NULL, NULL
+ }, {
+ SASL_CB_GETOPT, &mysasl_config, NULL
+ }, {
+ SASL_CB_LIST_END, NULL, NULL
+ }
+};
+
+struct protocol_t;
+
+struct banner_t {
+ int is_capa; /* banner is capability response */
+ char *resp; /* end of banner response */
+ void *(*parse_banner)(char *str);
+ /* [OPTIONAL] parse banner, returns 'rock' */
+};
+
+struct capa_cmd_t {
+ char *cmd; /* capability command string (NULL = no capa cmd) */
+ char *resp; /* end of capability response */
+ char *tls; /* [OPTIONAL] TLS capability string */
+ char *auth; /* [OPTIONAL] AUTH capability string */
+ char *(*parse_mechlist)(const char *str, struct protocol_t *prot);
+ /* [OPTIONAL] parse capability string,
+ returns space-separated list of mechs */
+};
+
+struct tls_cmd_t {
+ char *cmd; /* tls command string */
+ char *ok; /* start tls prompt */
+ char *fail; /* failure response */
+ int auto_capa; /* capa response given automatically after TLS */
+};
+
+struct sasl_cmd_t {
+ char *cmd; /* auth command string */
+ int maxlen; /* maximum command line length,
+ (0 = initial response unsupported by protocol) */
+ int quote; /* quote arguments (literal for base64 data) */
+ char *ok; /* success response string */
+ char *fail; /* failure response string */
+ char *cont; /* continue response string
+ (NULL = send/receive literals) */
+ char *cancel; /* cancel auth string */
+ char *(*parse_success)(char *str);
+ /* [OPTIONAL] parse response for success data */
+};
+
+struct logout_cmd_t {
+ char *cmd; /* logout command string */
+ char *resp; /* logout response */
+};
+
+struct protocol_t {
+ char *protocol; /* protocol service name */
+ char *sprotocol; /* SSL-wrapped service name (NULL = unsupported) */
+ char *service; /* SASL service name */
+ struct banner_t banner;
+ struct capa_cmd_t capa_cmd;
+ struct tls_cmd_t tls_cmd;
+ struct sasl_cmd_t sasl_cmd;
+ int (*do_auth)(struct sasl_cmd_t *sasl_cmd, void *rock,
+ char *mech, char *mechlist);
+ /* [OPTIONAL] perform protocol-specific
+ authentication; based on rock, mech, mechlist */
+ struct logout_cmd_t logout_cmd;
+
+ /* these 3 are used for maintaining connection state */
+ void *(*init_conn)(void); /* generate a context (if needed). This context
+ * must be malloc()ed and will be freed by
+ * interactive() as each connection is reused */
+ int (*pipe)(char *buf, int len, void *rock); /* pipe a buffer to pout
+ * may be necessary to keep
+ * connection state */
+ int (*reset)(void *rock); /* perform any protocol-specific reset when we
+ * lose connection on a unix domain socket
+ * during interactive mode. If this is NULL we
+ * assume that we should not attempt to reuse
+ * connections (and just die at the end of one)
+ */
+};
+
+
+void imtest_fatal(const char *msg, ...) __attribute__((noreturn));
+void imtest_fatal(const char *msg, ...)
+{
+ struct stat sbuf;
+ if (output_socket && output_socket_opened &&
+ stat(output_socket, &sbuf) != -1 &&
+ sbuf.st_ino == output_socket_ino) {
+ unlink(output_socket);
+ }
+ if (msg != NULL) {
+ va_list ap;
+ va_start(ap, msg);
+ fprintf(stderr, "failure: ");
+ vfprintf(stderr, msg, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+ }
+ exit(1);
+}
+
+/* libcyrus makes us define this */
+void fatal(const char *msg, int code __attribute__((unused)))
+{
+ imtest_fatal(msg);
+}
+
+int mysasl_config(void *context __attribute__((unused)),
+ const char *plugin_name,
+ const char *option,
+ const char **result,
+ unsigned *len)
+{
+ *result = NULL;
+
+ if (plugin_name) {
+ /* first try it with the plugin name */
+ char opt[1024];
+
+ strlcpy(opt, plugin_name, sizeof(opt));
+ strlcat(opt, "_", sizeof(opt));
+ strlcat(opt, option, sizeof(opt));
+ *result = hash_lookup(opt, &confighash);
+ }
+
+ if (*result == NULL) {
+ /* try without the plugin name */
+ *result = hash_lookup(option, &confighash);
+ }
+
+ if (*result != NULL) {
+ if (len) { *len = strlen(*result); }
+ return SASL_OK;
+ }
+
+ return SASL_FAIL;
+}
+
+#ifdef HAVE_SSL
+
+static int verify_depth;
+static int verify_error = X509_V_OK;
+static int do_dump = 0;
+
+#define CCERT_BUFSIZ 256
+static char peer_CN[CCERT_BUFSIZ];
+static char issuer_CN[CCERT_BUFSIZ];
+
+char *tls_peer_CN = NULL;
+char *tls_issuer_CN = NULL;
+
+const char *tls_protocol = NULL;
+const char *tls_cipher_name = NULL;
+int tls_cipher_usebits = 0;
+int tls_cipher_algbits = 0;
+
+/*
+ * Set up the cert things on the server side. We do need both the
+ * private key (in key_file) and the cert (in cert_file).
+ * Both files may be identical.
+ *
+ * This function is taken from OpenSSL apps/s_cb.c
+ */
+
+static int set_cert_stuff(SSL_CTX * ctx, char *cert_file, char *key_file)
+{
+ if (cert_file != NULL) {
+ if (SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0) {
+ printf("unable to get certificate from '%s'\n", cert_file);
+ return (0);
+ }
+ if (key_file == NULL)
+ key_file = cert_file;
+ if (SSL_CTX_use_PrivateKey_file(ctx, key_file,
+ SSL_FILETYPE_PEM) <= 0) {
+ printf("unable to get private key from '%s'\n", key_file);
+ return (0);
+ }
+ /* Now we know that a key and cert have been set against
+ * the SSL context */
+ if (!SSL_CTX_check_private_key(ctx)) {
+ printf("Private key does not match the certificate public key\n");
+ return (0);
+ }
+ }
+ return (1);
+}
+
+/* taken from OpenSSL apps/s_cb.c */
+
+static int verify_callback(int ok, X509_STORE_CTX * ctx)
+{
+ char buf[256];
+ X509 *err_cert;
+ int err;
+ int depth;
+
+ err_cert = X509_STORE_CTX_get_current_cert(ctx);
+ err = X509_STORE_CTX_get_error(ctx);
+ depth = X509_STORE_CTX_get_error_depth(ctx);
+
+ X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256);
+
+ if (verbose==1)
+ printf("Peer cert verify depth=%d %s\n", depth, buf);
+
+ if (!ok) {
+ printf("verify error:num=%d:%s\n", err,
+ X509_verify_cert_error_string(err));
+ if (verify_depth >= depth) {
+ ok = 1;
+ verify_error = X509_V_OK;
+ } else {
+ ok = 0;
+ verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;
+ }
+ }
+ switch (ctx->error) {
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+ X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
+ printf("issuer= %s\n", buf);
+ break;
+ case X509_V_ERR_CERT_NOT_YET_VALID:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
+ printf("cert not yet valid\n");
+ break;
+ case X509_V_ERR_CERT_HAS_EXPIRED:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
+ printf("cert has expired\n");
+ break;
+ }
+
+ if (verbose==1)
+ printf("verify return:%d\n", ok);
+
+ return (ok);
+}
+
+
+/* taken from OpenSSL apps/s_cb.c */
+
+static RSA *tmp_rsa_cb(SSL * s __attribute__((unused)),
+ int export __attribute__((unused)), int keylength)
+{
+ static RSA *rsa_tmp = NULL;
+
+ if (rsa_tmp == NULL) {
+ rsa_tmp = RSA_generate_key(keylength, RSA_F4, NULL, NULL);
+ }
+ return (rsa_tmp);
+}
+
+/* taken from OpenSSL apps/s_cb.c
+ * tim - this seems to just be giving logging messages
+ */
+
+static void apps_ssl_info_callback(SSL * s, int where, int ret)
+{
+ char *str;
+ int w;
+
+ if (verbose==0) return;
+
+ w = where & ~SSL_ST_MASK;
+
+ if (w & SSL_ST_CONNECT)
+ str = "SSL_connect";
+ else if (w & SSL_ST_ACCEPT)
+ str = "SSL_accept";
+ else
+ str = "undefined";
+
+ if (where & SSL_CB_LOOP) {
+ printf("%s:%s\n", str, SSL_state_string_long(s));
+ } else if (where & SSL_CB_ALERT) {
+ str = (where & SSL_CB_READ) ? "read" : "write";
+ if ((ret & 0xff) != SSL3_AD_CLOSE_NOTIFY)
+ printf("SSL3 alert %s:%s:%s\n", str,
+ SSL_alert_type_string_long(ret),
+ SSL_alert_desc_string_long(ret));
+ } else if (where & SSL_CB_EXIT) {
+ if (ret == 0)
+ printf("%s:failed in %s\n",
+ str, SSL_state_string_long(s));
+ else if (ret < 0) {
+ printf("%s:error in %s %i\n",
+ str, SSL_state_string_long(s),ret);
+ }
+ }
+}
+
+
+/*
+ * Seed the random number generator.
+ */
+static int tls_rand_init(void)
+{
+#ifdef EGD_SOCKET
+ return (RAND_egd(EGD_SOCKET));
+#else
+ /* otherwise let OpenSSL do it internally */
+ return 0;
+#endif
+}
+
+
+char *var_tls_CAfile="";
+char *var_tls_CApath="";
+/*
+ * This is the setup routine for the SSL client.
+ *
+ * The skeleton of this function is taken from OpenSSL apps/s_client.c.
+ */
+
+static int tls_init_clientengine(int verifydepth, char *var_tls_cert_file, char *var_tls_key_file)
+{
+ int off = 0;
+ int verify_flags = SSL_VERIFY_NONE;
+ char *CApath;
+ char *CAfile;
+ char *c_cert_file;
+ char *c_key_file;
+
+
+ if (verbose==1)
+ printf("starting TLS engine\n");
+
+ SSL_load_error_strings();
+ SSLeay_add_ssl_algorithms();
+ if (tls_rand_init() == -1) {
+ printf("TLS engine: cannot seed PRNG\n");
+ return IMTEST_FAIL;
+ }
+
+ tls_ctx = SSL_CTX_new(TLSv1_client_method());
+ if (tls_ctx == NULL) {
+ return IMTEST_FAIL;
+ };
+
+ off |= SSL_OP_ALL; /* Work around all known bugs */
+ SSL_CTX_set_options(tls_ctx, off);
+ SSL_CTX_set_info_callback(tls_ctx, (void (*)()) apps_ssl_info_callback);
+
+ if (strlen(var_tls_CAfile) == 0)
+ CAfile = NULL;
+ else
+ CAfile = var_tls_CAfile;
+ if (strlen(var_tls_CApath) == 0)
+ CApath = NULL;
+ else
+ CApath = var_tls_CApath;
+
+ if (CAfile || CApath)
+ if ((!SSL_CTX_load_verify_locations(tls_ctx, CAfile, CApath)) ||
+ (!SSL_CTX_set_default_verify_paths(tls_ctx))) {
+ printf("TLS engine: cannot load CA data\n");
+ return IMTEST_FAIL;
+ }
+ if (strlen(var_tls_cert_file) == 0)
+ c_cert_file = NULL;
+ else
+ c_cert_file = var_tls_cert_file;
+ if (strlen(var_tls_key_file) == 0)
+ c_key_file = NULL;
+ else
+ c_key_file = var_tls_key_file;
+
+ if (c_cert_file || c_key_file)
+ if (!set_cert_stuff(tls_ctx, c_cert_file, c_key_file)) {
+ printf("TLS engine: cannot load cert/key data\n");
+ return IMTEST_FAIL;
+ }
+ SSL_CTX_set_tmp_rsa_callback(tls_ctx, tmp_rsa_cb);
+
+ verify_depth = verifydepth;
+ SSL_CTX_set_verify(tls_ctx, verify_flags, verify_callback);
+
+ return IMTEST_OK;
+}
+
+/*
+ * taken from OpenSSL crypto/bio/b_dump.c, modified to save a lot of strcpy
+ * and strcat by Matti Aarnio.
+ */
+
+#define TRUNCATE
+#define DUMP_WIDTH 16
+
+static int tls_dump(const char *s, int len)
+{
+ int ret = 0;
+ char buf[160 + 1];
+ char *ss;
+ int i;
+ int j;
+ int rows;
+ int trunc;
+ unsigned char ch;
+
+ trunc = 0;
+
+#ifdef TRUNCATE
+ for (; (len > 0) && ((s[len - 1] == ' ') || (s[len - 1] == '\0')); len--)
+ trunc++;
+#endif
+
+ rows = (len / DUMP_WIDTH);
+ if ((rows * DUMP_WIDTH) < len)
+ rows++;
+
+ for (i = 0; i < rows; i++) {
+ buf[0] = '\0'; /* start with empty string */
+ ss = buf;
+
+ sprintf(ss, "%04x ", i * DUMP_WIDTH);
+ ss += strlen(ss);
+ for (j = 0; j < DUMP_WIDTH; j++) {
+ if (((i * DUMP_WIDTH) + j) >= len) {
+ strcpy(ss, " ");
+ } else {
+ ch = ((unsigned char) *((char *) (s) + i * DUMP_WIDTH + j))
+ & 0xff;
+ sprintf(ss, "%02x%c", ch, j == 7 ? '|' : ' ');
+ ss += 3;
+ }
+ }
+ ss += strlen(ss);
+ *ss+= ' ';
+ for (j = 0; j < DUMP_WIDTH; j++) {
+ if (((i * DUMP_WIDTH) + j) >= len)
+ break;
+ ch = ((unsigned char) *((char *) (s) + i * DUMP_WIDTH + j)) & 0xff;
+ *ss+= (((ch >= ' ') && (ch <= '~')) ? ch : '.');
+ if (j == 7) *ss+= ' ';
+ }
+ *ss = 0;
+ /*
+ * if this is the last call then update the ddt_dump thing so that
+ * we will move the selection point in the debug window
+ */
+ printf("%s\n", buf);
+ ret += strlen(buf);
+ }
+#ifdef TRUNCATE
+ if (trunc > 0) {
+ sprintf(buf, "%04x - <SPACES/NULS>\n", len+ trunc);
+ printf("%s\n", buf);
+ ret += strlen(buf);
+ }
+#endif
+ return (ret);
+}
+
+
+/* taken from OpenSSL apps/s_cb.c */
+
+static long bio_dump_cb(BIO * bio, int cmd, const char *argp, int argi,
+ long argl __attribute__((unused)), long ret)
+{
+ if (!do_dump)
+ return (ret);
+
+ if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) {
+ printf("read from %08X [%08lX] (%d bytes => %ld (0x%X))\n",
+ (unsigned int) bio, (long unsigned int) argp,
+ argi, ret, (unsigned int) ret);
+ tls_dump(argp, (int) ret);
+ return (ret);
+ } else if (cmd == (BIO_CB_WRITE | BIO_CB_RETURN)) {
+ printf("write to %08X [%08lX] (%d bytes => %ld (0x%X))\n",
+ (unsigned int) bio, (long unsigned int) argp,
+ argi, ret, (unsigned int) ret);
+ tls_dump(argp, (int) ret);
+ }
+ return (ret);
+}
+
+int tls_start_clienttls(unsigned *layer, char **authid)
+{
+ int sts;
+ SSL_CIPHER *cipher;
+ X509 *peer;
+
+ if (verbose==1)
+ printf("setting up TLS connection\n");
+
+ if (tls_conn == NULL) {
+ tls_conn = (SSL *) SSL_new(tls_ctx);
+ }
+ if (tls_conn == NULL) {
+ printf("Could not allocate 'con' with SSL_new()\n");
+ return IMTEST_FAIL;
+ }
+ SSL_clear(tls_conn);
+
+ if (!SSL_set_fd(tls_conn, sock)) {
+ printf("SSL_set_fd failed\n");
+ return IMTEST_FAIL;
+ }
+ /*
+ * This is the actual handshake routine. It will do all the negotiations
+ * and will check the client cert etc.
+ */
+ SSL_set_connect_state(tls_conn);
+
+
+ /*
+ * We do have an SSL_set_fd() and now suddenly a BIO_ routine is called?
+ * Well there is a BIO below the SSL routines that is automatically
+ * created for us, so we can use it for debugging purposes.
+ */
+ if (verbose==1)
+ BIO_set_callback(SSL_get_rbio(tls_conn), bio_dump_cb);
+
+ /* Dump the negotiation for loglevels 3 and 4 */
+ if (verbose==1)
+ do_dump = 1;
+
+ if (tls_sess) /* Reuse a session if we have one */
+ SSL_set_session(tls_conn, tls_sess);
+
+ if ((sts = SSL_connect(tls_conn)) <= 0) {
+ printf("SSL_connect error %d\n", sts);
+ tls_sess = SSL_get_session(tls_conn);
+ if (tls_sess) {
+ SSL_CTX_remove_session(tls_ctx, tls_sess);
+ tls_sess = NULL;
+ printf("SSL session removed\n");
+ }
+ if (tls_conn!=NULL)
+ SSL_free(tls_conn);
+ tls_conn = NULL;
+ return IMTEST_FAIL;
+ }
+
+ /*
+ * Lets see, whether a peer certificate is available and what is
+ * the actual information. We want to save it for later use.
+ */
+ peer = SSL_get_peer_certificate(tls_conn);
+ if (peer != NULL) {
+ X509_NAME_get_text_by_NID(X509_get_subject_name(peer),
+ NID_commonName, peer_CN, CCERT_BUFSIZ);
+ tls_peer_CN = peer_CN;
+ X509_NAME_get_text_by_NID(X509_get_issuer_name(peer),
+ NID_commonName, issuer_CN, CCERT_BUFSIZ);
+ if (verbose==1)
+ printf("subject_CN=%s, issuer_CN=%s\n", peer_CN, issuer_CN);
+ tls_issuer_CN = issuer_CN;
+
+ }
+ tls_protocol = SSL_get_version(tls_conn);
+ cipher = SSL_get_current_cipher(tls_conn);
+ tls_cipher_name = SSL_CIPHER_get_name(cipher);
+ tls_cipher_usebits = SSL_CIPHER_get_bits(cipher,
+ &tls_cipher_algbits);
+
+ if (layer!=NULL)
+ *layer = tls_cipher_usebits;
+
+ if (authid!=NULL)
+ *authid = tls_peer_CN;
+
+ printf("TLS connection established: %s with cipher %s (%d/%d bits)\n",
+ tls_protocol, tls_cipher_name,
+ tls_cipher_usebits, tls_cipher_algbits);
+ return IMTEST_OK;
+}
+
+void do_starttls(int ssl, char *keyfile, unsigned *ssf)
+{
+ int result;
+ char *auth_id;
+
+ result=tls_init_clientengine(10, keyfile, keyfile);
+ if (result!=IMTEST_OK)
+ {
+ if (ssl) {
+ imtest_fatal("Start TLS engine failed\n");
+ } else {
+ printf("Start TLS engine failed\n");
+ return;
+ }
+ } else {
+ result=tls_start_clienttls(ssf, &auth_id);
+
+ if (result!=IMTEST_OK)
+ imtest_fatal("TLS negotiation failed!\n");
+ }
+
+ /* TLS negotiation suceeded */
+ tls_sess = SSL_get_session(tls_conn); /* Save the session for reuse */
+
+ /* tell SASL about the negotiated layer */
+ result=sasl_setprop(conn,
+ SASL_SSF_EXTERNAL,
+ ssf);
+ if (result!=SASL_OK)
+ imtest_fatal("Error setting SASL property (external ssf)");
+
+ result=sasl_setprop(conn,
+ SASL_AUTH_EXTERNAL,
+ auth_id);
+ if (result!=SASL_OK)
+ imtest_fatal("Error setting SASL property (external auth_id)");
+
+ prot_settls (pin, tls_conn);
+ prot_settls (pout, tls_conn);
+}
+#endif /* HAVE_SSL */
+
+
+static sasl_security_properties_t *make_secprops(int min,int max)
+{
+ sasl_security_properties_t *ret=(sasl_security_properties_t *)
+ malloc(sizeof(sasl_security_properties_t));
+
+ ret->maxbufsize=1024;
+ ret->min_ssf=min;
+ ret->max_ssf=max;
+
+ ret->security_flags=0;
+ ret->property_names=NULL;
+ ret->property_values=NULL;
+
+ return ret;
+}
+
+/*
+ * Initialize SASL and set necessary options
+ */
+static int init_sasl(char *service, char *serverFQDN, int minssf, int maxssf,
+ unsigned flags)
+{
+ int saslresult;
+ sasl_security_properties_t *secprops=NULL;
+ socklen_t addrsize;
+ char localip[60], remoteip[60];
+ struct sockaddr_storage saddr_l;
+ struct sockaddr_storage saddr_r;
+
+ addrsize=sizeof(struct sockaddr_storage);
+ if (getpeername(sock,(struct sockaddr *)&saddr_r,&addrsize)!=0)
+ return IMTEST_FAIL;
+
+ addrsize=sizeof(struct sockaddr_storage);
+ if (getsockname(sock,(struct sockaddr *)&saddr_l,&addrsize)!=0)
+ return IMTEST_FAIL;
+
+ if(iptostring((struct sockaddr *)&saddr_l, addrsize, localip, 60))
+ return IMTEST_FAIL;
+
+ if(iptostring((struct sockaddr *)&saddr_r, addrsize, remoteip, 60))
+ return IMTEST_FAIL;
+
+
+ /* client new connection */
+ saslresult=sasl_client_new(service,
+ serverFQDN,
+ localip,
+ remoteip,
+ NULL,
+ flags,
+ &conn);
+
+ if (saslresult!=SASL_OK) return IMTEST_FAIL;
+
+ /* create a security structure and give it to sasl */
+ secprops = make_secprops(minssf, maxssf);
+ if (secprops != NULL)
+ {
+ sasl_setprop(conn, SASL_SEC_PROPS, secprops);
+ free(secprops);
+ }
+
+ return IMTEST_OK;
+}
+
+#define BUFSIZE 16384
+
+imt_stat getauthline(struct sasl_cmd_t *sasl_cmd, char **line, int *linelen)
+{
+ char buf[BUFSIZE];
+ int saslresult;
+ unsigned len;
+ char *str=(char *) buf;
+ int ret = STAT_CONT;
+
+ *line = NULL;
+ *linelen = 0;
+
+ do {
+ str = prot_fgets(str, BUFSIZE, pin);
+ if (str == NULL) imtest_fatal("prot layer failure");
+ printf("S: %s",str);
+ } while(str[0] == '*'); /* Ignore potential untagged responses */
+
+ if (!strncasecmp(str, sasl_cmd->ok, strlen(sasl_cmd->ok))) {
+ if (sasl_cmd->parse_success) {
+ str = sasl_cmd->parse_success(str);
+ if (!str) return STAT_OK;
+
+ ret = STAT_OK;
+ }
+ else {
+ return STAT_OK;
+ }
+ }
+ else if (!strncasecmp(str, sasl_cmd->fail, strlen(sasl_cmd->fail))) {
+ return STAT_NO;
+ }
+ else if (sasl_cmd->cont) {
+ str += strlen(sasl_cmd->cont); /* jump past the continuation */
+ }
+ else {
+ /* literal */
+ len = atoi(str+1);
+
+ str = prot_fgets(str, BUFSIZE, pin);
+ if (str == NULL || strlen(str) < len)
+ imtest_fatal("prot layer failure");
+ printf("S: %s", str);
+ }
+
+ if (*str != '\r') {
+ /* trim CRLF */
+ char *p = str + strlen(str) - 1;
+ if (p >= str && *p == '\n') *p-- = '\0';
+ if (p >= str && *p == '\r') *p-- = '\0';
+
+ /* alloc space for decoded response */
+ len = strlen(str) + 1;
+ *line = malloc(len);
+ if ((*line) == NULL) {
+ return STAT_NO;
+ }
+
+ /* decode this line */
+ saslresult = sasl_decode64(str, strlen(str),
+ *line, len, (unsigned *) linelen);
+ if (saslresult != SASL_OK) {
+ printf("base64 decoding error\n");
+ return STAT_NO;
+ }
+ } else {
+ /* this is a blank */
+ *line = NULL;
+ *linelen = 0;
+ }
+
+ return ret;
+}
+
+void interaction (int id, const char *challenge, const char *prompt,
+ char **tresult, unsigned int *tlen)
+{
+ char result[1024];
+
+ struct stringlist *cur;
+
+ cur = malloc(sizeof(struct stringlist));
+ if(!cur) {
+ *tlen=0;
+ *tresult=NULL;
+ return;
+ }
+
+ cur->str = NULL;
+ cur->next = strlist_head;
+ strlist_head = cur;
+
+ if (id==SASL_CB_PASS && !cmdline_password) {
+ printf("%s: ", prompt);
+ cur->str=strdup(getpass(""));
+ *tlen=strlen(cur->str);
+ *tresult = cur->str;
+ return;
+ } else if (id==SASL_CB_PASS && cmdline_password) {
+ strcpy(result, cmdline_password);
+ } else if (id==SASL_CB_USER) {
+ if (username != NULL) {
+ strcpy(result, username);
+ } else {
+ strcpy(result, "");
+ }
+ } else if (id==SASL_CB_AUTHNAME) {
+ if (authname != NULL) {
+ strcpy(result, authname);
+ } else {
+ strcpy(result, getpwuid(getuid())->pw_name);
+ }
+#ifdef SASL_CB_GETREALM
+ } else if ((id==SASL_CB_GETREALM) && (realm != NULL)) {
+ strcpy(result, realm);
+#endif
+ } else {
+ int c;
+
+ if (((id==SASL_CB_ECHOPROMPT) || (id=SASL_CB_NOECHOPROMPT)) &&
+ (challenge != NULL)) {
+ printf("Server challenge: %s\n", challenge);
+ }
+ printf("%s: ",prompt);
+ if (id==SASL_CB_NOECHOPROMPT) {
+ strcpy(result, getpass(""));
+ } else {
+ fgets(result, sizeof(result) - 1, stdin);
+ c = strlen(result);
+ result[c - 1] = '\0';
+ }
+ }
+
+ *tlen = strlen(result);
+ cur->str = (char *) malloc(*tlen+1);
+ if(!cur->str) {
+ *tresult = NULL;
+ return;
+ }
+ memset(cur->str, 0, *tlen+1);
+ memcpy(cur->str, result, *tlen);
+ *tresult = cur->str;
+}
+
+void fillin_interactions(sasl_interact_t *tlist)
+{
+ while (tlist->id!=SASL_CB_LIST_END)
+ {
+ interaction(tlist->id, tlist->challenge, tlist->prompt,
+ (void *) &(tlist->result),
+ &(tlist->len));
+ tlist++;
+ }
+
+}
+
+static char *waitfor(char *tag, char *tag2, int echo)
+{
+ static char str[1024];
+
+ do {
+ if (prot_fgets(str, sizeof(str), pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+ if(echo) printf("S: %s", str);
+ } while (strncmp(str, tag, strlen(tag)) &&
+ (tag2 ? strncmp(str, tag2, strlen(tag2)) : 1));
+
+ return str;
+}
+
+int auth_sasl(struct sasl_cmd_t *sasl_cmd, char *mechlist)
+{
+ sasl_interact_t *client_interact = NULL;
+ int saslresult;
+ const char *out = NULL;
+ unsigned int outlen = 0;
+ char *in;
+ int inlen;
+ const char *mechusing;
+ char inbase64[4096];
+ int inbase64len;
+ char cmdbuf[40];
+ int sendliteral = sasl_cmd->quote;
+ int initial_response = 1;
+ imt_stat status;
+
+ if (!sasl_cmd || !sasl_cmd->cmd) return IMTEST_FAIL;
+
+ do { /* start authentication */
+ saslresult = sasl_client_start(conn, mechlist, &client_interact,
+ /* do we support initial response? */
+ sasl_cmd->maxlen ? &out : NULL,
+ &outlen, &mechusing);
+
+ if (saslresult == SASL_INTERACT)
+ fillin_interactions(client_interact); /* fill in prompts */
+ } while (saslresult == SASL_INTERACT);
+
+ if ((saslresult != SASL_OK) && (saslresult != SASL_CONTINUE)) {
+ return saslresult;
+ }
+
+ /* build the auth command */
+ if (sasl_cmd->quote) {
+ sprintf(cmdbuf, "%s \"%s\"", sasl_cmd->cmd, mechusing);
+ }
+ else {
+ sprintf(cmdbuf, "%s %s", sasl_cmd->cmd, mechusing);
+ }
+ printf("C: %s", cmdbuf);
+ prot_printf(pout, "%s", cmdbuf);
+
+ if (out) { /* initial response */
+ if (!outlen) { /* empty initial response */
+ printf(" =");
+ prot_printf(pout, " =");
+
+ out = NULL;
+ }
+ else if (!sendliteral &&
+ ((strlen(cmdbuf) + outlen + 3) > sasl_cmd->maxlen)) {
+ /* initial response is too long for auth command,
+ so wait for a server challenge before sending it */
+ goto noinitresp;
+ }
+ else { /* full response -- encoded below */
+ printf(" ");
+ prot_printf(pout, " ");
+ }
+ } else {
+ goto noinitresp;
+ }
+
+ do {
+ if (out) { /* response */
+ /* convert to base64 */
+ saslresult = sasl_encode64(out, outlen, inbase64, 2048,
+ (unsigned *) &inbase64len);
+ if (saslresult != SASL_OK) return saslresult;
+
+ /* send to server */
+ if (sendliteral) {
+ printf("{%d+}\r\n", inbase64len);
+ prot_printf(pout, "{%d+}\r\n", inbase64len);
+ prot_flush(pout);
+ }
+ printf("%s%s", initial_response ? "" : "C: ", inbase64);
+ prot_write(pout, inbase64, inbase64len);
+
+ out = NULL;
+ } else if (sendliteral) {
+ /* If we had no response, we still need to send the
+ empty literal in this case */
+ printf("{0+}\r\nC: ");
+ prot_printf(pout, "{0+}\r\n");
+ } else if (!initial_response) {
+ printf("C: ");
+ }
+ noinitresp:
+ initial_response = 0;
+
+ printf("\r\n");
+ prot_printf(pout, "\r\n");
+ prot_flush(pout);
+
+ /* get challenge/reply from the server */
+ status = getauthline(sasl_cmd, &in, &inlen);
+
+ if ((status == STAT_CONT || (status == STAT_OK && in)) &&
+ (inlen || !out)) { /* no delayed initial response */
+ do { /* do the next step */
+ saslresult = sasl_client_step(conn, in, inlen,
+ &client_interact,
+ &out, &outlen);
+
+ if (saslresult == SASL_INTERACT)
+ fillin_interactions(client_interact); /* fill in prompts */
+ } while (saslresult == SASL_INTERACT);
+
+ if (in) free(in);
+ }
+
+ if ((saslresult != SASL_OK) && (saslresult != SASL_CONTINUE)) {
+ /* cancel the exchange */
+ printf("C: %s\r\n", sasl_cmd->cancel);
+ prot_printf(pout, "%s\r\n", sasl_cmd->cancel);
+ prot_flush(pout);
+
+ return saslresult;
+ }
+
+ sendliteral = !sasl_cmd->cont;
+
+ } while (status == STAT_CONT);
+
+ return (status == STAT_OK) ? IMTEST_OK : IMTEST_FAIL;
+}
+
+/* initialize the network */
+static int init_net(char *serverFQDN, char *port)
+{
+ struct addrinfo hints, *res0 = NULL, *res;
+ int err;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+ if ((err = getaddrinfo(serverFQDN, port, &hints, &res0)) != 0) {
+ fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(err));
+ return IMTEST_FAIL;
+ }
+
+ if (res0->ai_canonname)
+ strncpy(serverFQDN, res0->ai_canonname, 1023);
+ for (res = res0; res; res = res->ai_next) {
+ sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+ if (sock < 0)
+ continue;
+ if (connect(sock, res->ai_addr, res->ai_addrlen) >= 0)
+ break;
+ close(sock);
+ sock = -1;
+ }
+
+ freeaddrinfo(res0);
+ if(sock < 0) {
+ perror("connect");
+ return IMTEST_FAIL;
+ }
+
+ return IMTEST_OK;
+}
+
+static void logout(struct logout_cmd_t *logout_cmd, int wait)
+{
+ printf("C: %s\r\n", logout_cmd->cmd);
+ prot_printf(pout, "%s\r\n", logout_cmd->cmd);
+ prot_flush(pout);
+
+ /* only wait if we are explicitly told to */
+ if(wait) waitfor(logout_cmd->resp, NULL, 1);
+}
+
+static int gotsigint = 0;
+
+static void sigint_handler(int sig __attribute__((unused)))
+{
+ gotsigint = 1;
+}
+
+/* This needs to support 3 modes:
+ *
+ * 1. Terminal Interface Only
+ * 2. File input
+ * 3. Redirect to a unix socket - This mode needs to be sure that the
+ * IMAP session is in an unselected state whenever the unix socket is
+ * disconnected.
+ *
+ */
+static void interactive(struct protocol_t *protocol, char *filename)
+{
+ char buf[2048];
+ fd_set read_set, rset;
+ fd_set write_set, wset;
+ fd_set accept_set, aset;
+ int nfds;
+ int nfound;
+ int count;
+ int fd = 0, fd_out = 1, listen_sock = -1;
+ void *rock = NULL;
+ int donewritingfile = 0;
+
+ struct sockaddr_un sunsock;
+ int salen;
+
+ /* open the file if available */
+ if (filename != NULL) {
+ if ((fd = open(filename, O_RDONLY)) == -1) {
+ fprintf(stderr,"Unable to open file: %s:", filename);
+ perror("");
+ exit(1);
+ }
+ } else if(output_socket) {
+ struct timeval tv;
+ struct stat sbuf;
+
+ /* can't have this and a file for input */
+ sunsock.sun_family = AF_UNIX;
+ strcpy(sunsock.sun_path, output_socket);
+ unlink(output_socket);
+
+ listen_sock = socket(AF_UNIX, SOCK_STREAM, 0);
+ if(listen_sock < 0) imtest_fatal("could not create output socket");
+
+ salen = sizeof(sunsock.sun_family) + strlen(sunsock.sun_path) + 1;
+
+ if((bind(listen_sock, (struct sockaddr *)&sunsock, salen)) < 0) {
+ imtest_fatal("could not bind output socket");
+ }
+
+ if((listen(listen_sock, 5)) < 0) {
+ imtest_fatal("could not listen to output socket");
+ }
+
+ if(stat(output_socket, &sbuf) == -1) {
+ imtest_fatal("could not stat output socket");
+ }
+
+ output_socket_opened = 1;
+ output_socket_ino = sbuf.st_ino;
+
+ FD_ZERO(&accept_set);
+ FD_SET(listen_sock, &accept_set);
+
+ accept_again:
+ if(rock) {
+ free(rock);
+ rock = NULL;
+ }
+
+ tv.tv_sec = 600; /* 10 minute timeout - xxx protocol specific? */
+ tv.tv_usec = 0;
+
+ aset = accept_set;
+
+ /* Have the separate select so that signals will wake us up
+ * and we get a timeout to use on our own imap connection */
+ if(select(listen_sock + 1, &aset, NULL, NULL, &tv) <= 0) {
+ /* either we timed out or had an error */
+ goto cleanup;
+ }
+
+ fd = fd_out = accept(listen_sock, NULL, NULL);
+ if(fd < 0) imtest_fatal("accept failure");
+
+ if(protocol->init_conn) rock = protocol->init_conn();
+ }
+
+ FD_ZERO(&read_set);
+ FD_SET(fd, &read_set); /* In the terminal case fd == 0 */
+ FD_SET(sock, &read_set);
+
+ FD_ZERO(&write_set);
+ FD_SET(fd_out, &write_set);
+ FD_SET(sock, &write_set);
+
+ nfds = fd;
+ if (nfds < sock) nfds = sock;
+ if (nfds < fd_out) nfds = fd_out;
+ nfds++;
+
+ if (filename != NULL) {
+ donewritingfile = 0;
+ }
+
+ /* add handler for SIGINT */
+ signal(SIGINT, sigint_handler);
+
+ /* loop reading from network and from stdin as applicable */
+ while (1) {
+ rset = read_set;
+ wset = write_set;
+ nfound = select(nfds, &rset, &wset, NULL, NULL);
+ if (nfound < 0) {
+ perror("select");
+ imtest_fatal("select");
+ }
+
+ if (!output_socket &&
+ (FD_ISSET(0, &rset)) && (FD_ISSET(sock, &wset))) {
+ /* There is explicit terminal input -- note this is only possible
+ * if fd is 0 (and we are in terminal mode!).
+ * We need to use stream API for this, which is why it
+ * is different */
+ if (fgets(buf, sizeof (buf) - 1, stdin) == NULL) {
+ logout(&protocol->logout_cmd, 0);
+ FD_CLR(0, &read_set);
+ } else {
+ count = strlen(buf);
+ /* If we read a full line, translate the newline
+ * if necessary. */
+ if (buf[count - 1] == '\n' && (count < 2 || buf[count - 2] != '\r')) {
+ buf[count - 1] = '\r';
+ buf[count] = '\n';
+ buf[count + 1] = '\0';
+ count++;
+ }
+ prot_write(pout, buf, count);
+ }
+ prot_flush(pout);
+ } else if (FD_ISSET(sock, &rset) && (FD_ISSET(fd_out, &wset))) {
+ /* This does input from remote for all modes */
+ do {
+ count = prot_read(pin, buf, sizeof (buf) - 1);
+ if (count == 0) {
+ const char *str = prot_error(pin);
+ if (str && strcmp(str, PROT_EOF_STRING)) {
+ printf("Protection error: %s\n", prot_error(pin));
+ }
+ close(sock);
+ printf("Connection closed.\n");
+ return;
+ }
+ if (count < 0) {
+ perror("read");
+ imtest_fatal("prot_read");
+ }
+ if(output_socket)
+ write(fd_out, buf, count);
+ else {
+ /* use the stream API */
+ buf[count] = '\0';
+ printf("%s", buf);
+ }
+ } while (pin->cnt > 0);
+ } else if ((FD_ISSET(fd, &rset)) && (FD_ISSET(sock, &wset))
+ && (donewritingfile == 0)) {
+ /* This does input for both socket and file modes */
+ int numr = read(fd, buf, sizeof(buf));
+
+ /* and send out over wire */
+ if (numr < 0)
+ {
+ perror("read");
+ imtest_fatal("read");
+ } else if (numr==0) {
+ if(output_socket) {
+ if(protocol->reset) {
+ if(protocol->reset(rock) != IMTEST_OK)
+ goto cleanup;
+ } else
+ /* no protocol->reset, we're done */
+ goto cleanup;
+
+ close(fd);
+ fd = 0;
+ fd_out = 1;
+ goto accept_again;
+ } else {
+ /* we're done, cleanup */
+ donewritingfile = 1;
+
+ FD_CLR(fd,&read_set);
+
+ /* send LOGOUT */
+ logout(&protocol->logout_cmd, 0);
+ }
+ } else {
+ if (!output_socket) {
+ /* echo for the user - if not in socket mode */
+ write(1, buf, numr);
+ }
+
+ if (output_socket && protocol->pipe) {
+ if(protocol->pipe(buf, numr, rock) == IMTEST_CLOSEME) {
+ if(protocol->reset) {
+ if(protocol->reset(rock) != IMTEST_OK)
+ goto cleanup;
+ } else
+ /* no protocol->reset, we're done */
+ goto cleanup;
+
+ close(fd);
+ fd = 0;
+ fd_out = 1;
+ goto accept_again;
+ }
+ } else {
+ /* echo to remote */
+ prot_write(pout, buf, numr);
+ prot_flush(pout);
+ }
+ }
+ } else {
+ /* if can't do anything else sleep */
+ usleep(1000);
+ }
+
+ /* received interrupt signal, logout */
+ if (gotsigint) goto cleanup;
+ }
+
+ cleanup:
+ if(rock) free(rock);
+
+ if(output_socket && output_socket_opened) {
+ struct stat sbuf;
+
+ close(fd);
+ close(listen_sock);
+
+ if(stat(output_socket, &sbuf) != -1
+ && sbuf.st_ino == output_socket_ino) {
+ unlink(output_socket);
+ }
+ }
+
+ logout(&protocol->logout_cmd, 0);
+ close(sock);
+
+ printf("Connection closed.\n");
+
+ /* remove handler for SIGINT */
+ signal(SIGINT, SIG_DFL);
+ return;
+}
+
+static char *ask_capability(struct protocol_t *prot,
+ int *supports_starttls, int automatic)
+{
+ char str[1024];
+ char *ret = NULL, *tmp;
+
+ *supports_starttls = 0;
+
+ if (!automatic) {
+ /* no capability command */
+ if (!prot->capa_cmd.cmd) return NULL;
+
+ /* request capabilities of server */
+ printf("C: %s\r\n", prot->capa_cmd.cmd);
+ prot_printf(pout, "%s\r\n", prot->capa_cmd.cmd);
+ prot_flush(pout);
+ }
+
+ do { /* look for the end of the capabilities */
+ if (prot_fgets(str, sizeof(str), pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+ printf("S: %s", str);
+
+ /* check for starttls */
+ if (prot->capa_cmd.tls &&
+ strstr(str, prot->capa_cmd.tls) != NULL) {
+ *supports_starttls = 1;
+ }
+
+ /* check for auth */
+ if (prot->capa_cmd.auth &&
+ (tmp = strstr(str, prot->capa_cmd.auth)) != NULL) {
+ if (prot->capa_cmd.parse_mechlist)
+ ret = prot->capa_cmd.parse_mechlist(str, prot);
+ else
+ ret = strdup(tmp+strlen(prot->capa_cmd.auth));
+ }
+ } while (strncasecmp(str, prot->capa_cmd.resp, strlen(prot->capa_cmd.resp)));
+
+ return ret;
+}
+
+/* generic pipe functionality - break it into one line at a time, and
+ * pass that into a per-protocol pipe function. */
+struct generic_context_t
+{
+ int (*pipe_oneline)(char *buf, int len, void *rock);
+ void *rock;
+
+ /* Deal with half-finished lines */
+ char *midLine;
+ size_t midLineLen;
+};
+
+static int generic_pipe(char *buf, int len, void *rock)
+{
+ struct generic_context_t *text = (struct generic_context_t *)rock;
+ char *toWrite = NULL, *toSend = NULL;
+ int toWriteLen = 0;
+ char *lineEnd = NULL;
+ int ret = IMTEST_OK;
+
+ /* do we have leftovers? -- if so, we append the new stuff */
+ if(text->midLine) {
+ text->midLine =
+ (char *)xrealloc(text->midLine, text->midLineLen+len+1);
+ memcpy(text->midLine+text->midLineLen, buf, len);
+ text->midLineLen += len;
+ text->midLine[text->midLineLen] = '\0';
+
+ toWrite = text->midLine;
+ toWriteLen = text->midLineLen;
+ } else {
+ toWrite = buf;
+ toWriteLen = len;
+ }
+
+ /* one line at a time now */
+ while(toWrite && (lineEnd = memchr(toWrite, '\n', toWriteLen)) != NULL) {
+ size_t len_todo;
+
+ len_todo = lineEnd - toWrite + 1; /* +1 is to include the newline! */
+
+ toSend = (char *)xrealloc(toSend, len_todo + 1);
+
+ memcpy(toSend, toWrite, len_todo);
+ toSend[len_todo] = '\0';
+
+ ret = text->pipe_oneline(toSend, len_todo, text->rock);
+ if(ret != IMTEST_OK) break;
+
+ toWrite = lineEnd+1; /* +1 is to skip the newline! */
+ toWriteLen -= len_todo;
+
+ if(toWriteLen <= 0) toWrite = NULL;
+
+ }
+
+ if(toWrite && ret == IMTEST_OK) {
+ char *newMidLine;
+ /* we need to save the leftover for next time */
+ newMidLine = (char *)xmalloc(toWriteLen);
+ memcpy(newMidLine, toWrite, toWriteLen);
+ if(text->midLine) free(text->midLine);
+ text->midLine = newMidLine;
+ text->midLineLen = toWriteLen;
+ } else if (text->midLine || ret != IMTEST_OK) {
+ free(text->midLine);
+ text->midLine = NULL;
+ text->midLineLen = 0;
+ }
+
+ free(toSend);
+ return ret;
+}
+
+/*********************************** IMAP ************************************/
+
+/*
+ * Parse a mech list of the form: ... AUTH=foo AUTH=bar ...
+ *
+ * Return: string with mechs separated by spaces
+ *
+ */
+
+static char *imap_parse_mechlist(const char *str, struct protocol_t *prot)
+{
+ char *ret = xzmalloc(strlen(str)+1);
+ char *tmp;
+ int num = 0;
+
+ if (strstr(str, "SASL-IR")) {
+ /* server supports initial response in AUTHENTICATE command */
+ prot->sasl_cmd.maxlen = INT_MAX;
+ }
+
+ while ((tmp = strstr(str, " AUTH="))) {
+ char *end = (tmp += 6);
+
+ while((*end != ' ') && (*end != '\0')) end++;
+
+ /* add entry to list */
+ if (num++ > 0) strcat(ret, " ");
+ strlcat(ret, tmp, strlen(ret) + (end - tmp) + 1);
+
+ /* reset the string */
+ str = end + 1;
+ }
+
+ return ret;
+}
+
+static int auth_imap(void)
+{
+ char str[1024];
+ /* we need username and password to do "login" */
+ char *username;
+ unsigned int userlen;
+ char *pass;
+ unsigned int passlen;
+ char *tag = "L01 ";
+
+ interaction(SASL_CB_AUTHNAME, NULL, "Authname", &username, &userlen);
+ interaction(SASL_CB_PASS, NULL, "Please enter your password",
+ &pass, &passlen);
+
+ printf("C: %sLOGIN %s {%d}\r\n", tag, username, passlen);
+ prot_printf(pout,"%sLOGIN %s {%d}\r\n", tag, username, passlen);
+ prot_flush(pout);
+
+ if (!strncmp(waitfor("+", tag, 1), "+", 1)) {
+ printf("C: <omitted>\r\n");
+ prot_printf(pout,"%s\r\n", pass);
+ prot_flush(pout);
+
+ do {
+ if (prot_fgets(str, sizeof(str), pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+ printf("S: %s", str);
+ } while (strncmp(str, tag, strlen(tag)));
+ }
+
+ if (!strncasecmp(str+strlen(tag), "OK", 2)) {
+ return IMTEST_OK;
+ } else {
+ return IMTEST_FAIL;
+ }
+}
+
+static int imap_do_auth(struct sasl_cmd_t *sasl_cmd,
+ void *rock __attribute__((unused)),
+ char *mech, char *mechlist)
+{
+ int result = IMTEST_FAIL;
+
+ if (mech) {
+ if (!strcasecmp(mech, "login")) {
+ result = auth_imap();
+ } else {
+ result = auth_sasl(sasl_cmd, mech);
+ }
+ } else {
+ if (mechlist) {
+ result = auth_sasl(sasl_cmd, mechlist);
+ } else {
+ result = auth_imap();
+ }
+ }
+
+ return result;
+}
+
+struct imap_context_t
+{
+ int inLiteral;
+};
+
+static int imap_pipe_oneline(char *buf, int len, void *rock) {
+ struct imap_context_t *text = (struct imap_context_t *)rock;
+ int add_crlf = 0; /* hack for terminals */
+
+ if(text->inLiteral) {
+ if(len <= text->inLiteral) {
+ text->inLiteral -= len;
+ } else {
+ prot_write(pout, buf, text->inLiteral);
+ buf += text->inLiteral;
+ len -= text->inLiteral;
+ text->inLiteral = 0;
+ }
+ }
+
+ if(!text->inLiteral) {
+ char c, *tag, *cmd, *tmp, *sparebuf = (char *)xstrdup(buf);
+ int i;
+ tmp = sparebuf;
+
+ if(len > 4 &&
+ buf[len-1] == '\n' && buf[len-1] == '\r' && buf[len-2] == '}') {
+ /* possible literal, with \r */
+ i = len-4;
+ while(i > 0 && buf[i] != '{' && isdigit((int)buf[i])) i--;
+ if(buf[i] == '{') text->inLiteral = atoi(buf + i + 1);
+ } else if(len > 3 && buf[len-1] == '\n' && buf[len-2] == '}') {
+ /* possible literal, no \r -- hack for terminals*/
+ i = len-3;
+ while(i > 0 && buf[i] != '{' && isdigit((int)buf[i])) i--;
+ if(buf[i] == '{') text->inLiteral = atoi(buf + i + 1);
+ }
+
+ /* We could still have another special case! */
+ c = imparse_word(&tmp, &tag);
+ if(c == ' ') {
+ c = imparse_word(&tmp, &cmd);
+ if(c == '\n' || (c == '\r' && *tmp == '\n')){
+ /* Are we logging out? */
+ if(!strncasecmp(cmd, "LOGOUT", 6)) {
+ free(sparebuf);
+ return IMTEST_CLOSEME;
+ }
+ }
+ }
+
+ free(sparebuf);
+
+ /* If the remote is sending only \n, clean it up for them */
+ if((len == 1 && buf[0] == '\n') ||
+ (len >= 2 && buf[len-2] != '\r')) {
+ len -= 1; /* truncate \n */
+ add_crlf = 1;
+ }
+ }
+
+ prot_write(pout, buf, len);
+ if(add_crlf) prot_write(pout, "\r\n", 2);
+ prot_flush(pout);
+
+ return IMTEST_OK;
+}
+
+static void * imap_init_conn(void)
+{
+ struct generic_context_t *ret;
+
+ ret =
+ (void *)xmalloc(sizeof(struct generic_context_t));
+ memset(ret, 0, sizeof(struct generic_context_t));
+
+ ret->rock =
+ (void *)xmalloc(sizeof(struct imap_context_t));
+ memset(ret->rock, 0, sizeof(struct imap_context_t));
+
+ ret->pipe_oneline = &imap_pipe_oneline;
+
+ return ret;
+}
+
+static int imap_reset(void *rock)
+{
+ struct generic_context_t *gentext = (struct generic_context_t *)rock;
+ struct imap_context_t *text = (struct imap_context_t *)gentext->rock;
+ char tag[64];
+ static int i=0;
+
+ if(text->inLiteral || gentext->midLine) return IMTEST_FAIL;
+
+ snprintf(tag, sizeof(tag-1), "UN%d", i);
+ prot_printf(pout, "%s UNSELECT\r\n", tag);
+ prot_flush(pout);
+ waitfor(tag, NULL, 0);
+
+ return IMTEST_OK;
+}
+
+#define HEADERS "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)\r\n \
+From: Fred Foobar <foobar at Blurdybloop.COM>\r\n \
+Subject: afternoon meeting\r\n \
+To: mooch at owatagu.siam.edu\r\n \
+Message-Id: <B27397-0100000 at Blurdybloop.COM>\r\n \
+MIME-Version: 1.0\r\n \
+Content-Type: TEXT/PLAIN; CHARSET=US-ASCII\r\n\r\n"
+
+static int append_msg(char *mbox, int size)
+{
+ int lup;
+
+ prot_printf(pout,"A003 APPEND %s (\\Seen) {%u}\r\n",mbox,size+strlen(HEADERS));
+ /* do normal header foo */
+ prot_printf(pout,HEADERS);
+
+ for (lup=0;lup<size/10;lup++)
+ prot_printf(pout,"0123456789");
+ prot_printf(pout,"\r\n");
+
+ prot_flush(pout);
+
+ waitfor("A003", NULL, 1);
+
+ return IMTEST_OK;
+}
+
+/**************
+ *
+ * This tests throughput of IMAP server
+ *
+ * Steps:
+ * Creat mailbox
+ * Append message of 200 bytes, 2000 bytes, 20k, 200k, 2M
+ * Delete mailbox
+ *
+ *************/
+
+
+static void send_recv_test(void)
+{
+ char *mboxname="inbox.imtest";
+ time_t start, end;
+ int lup;
+
+ start=time(NULL);
+
+ for (lup=0;lup<10;lup++)
+ {
+ prot_printf(pout,"C01 CREATE %s\r\n",mboxname);
+ prot_flush(pout);
+ waitfor("C01", NULL, 1);
+
+ append_msg(mboxname,200);
+ append_msg(mboxname,2000);
+ append_msg(mboxname,20000);
+ append_msg(mboxname,200000);
+ append_msg(mboxname,2000000);
+
+ prot_printf(pout,"D01 DELETE %s\r\n",mboxname);
+ prot_flush(pout);
+ waitfor("D01", NULL, 1);
+ }
+
+ end=time(NULL);
+
+ printf("took %ld seconds\n", end - start);
+}
+
+/*********************************** POP3 ************************************/
+
+static void *pop3_parse_banner(char *str)
+{
+ char *cp, *start;
+ char *chal = NULL;
+
+ /* look for APOP challenge in banner '<... at ...>' */
+ cp = str+4;
+ while (cp && (start = strchr(cp, '<'))) {
+ cp = start + 1;
+ while (*cp && *cp != '@' && *cp != '<' && *cp != '>') cp++;
+ if (*cp != '@') continue;
+ while (*cp && *cp != '<' && *cp != '>') cp++;
+ if (*cp == '>') {
+ *(++cp) = '\0';
+ chal = strdup(start);
+ if (!chal) imtest_fatal("memory error");
+ break;
+ }
+ }
+
+ return chal;
+}
+
+static int auth_pop(void)
+{
+ char str[1024];
+ /* we need username and password to do USER/PASS */
+ char *username;
+ unsigned int userlen;
+ char *pass;
+ unsigned int passlen;
+
+ interaction(SASL_CB_AUTHNAME, NULL, "Authname", &username, &userlen);
+ interaction(SASL_CB_PASS, NULL, "Please enter your password",
+ &pass, &passlen);
+
+ printf("C: USER %s\r\n", username);
+ prot_printf(pout,"USER %s\r\n", username);
+ prot_flush(pout);
+
+ if (prot_fgets(str, 1024, pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+
+ printf("S: %s", str);
+
+ if (strncasecmp(str, "+OK ", 4)) return IMTEST_FAIL;
+
+ printf("C: PASS <omitted>\r\n");
+ prot_printf(pout,"PASS %s\r\n",pass);
+ prot_flush(pout);
+
+ if (prot_fgets(str, 1024, pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+
+ printf("S: %s", str);
+
+ if (!strncasecmp(str, "+OK ", 4)) {
+ return IMTEST_OK;
+ } else {
+ return IMTEST_FAIL;
+ }
+}
+
+static int auth_apop(char *apop_chal)
+{
+ char str[1024];
+ /* we need username and password to do "APOP" */
+ char *username;
+ unsigned int userlen;
+ char *pass;
+ unsigned int passlen;
+ int i;
+ MD5_CTX ctx;
+ unsigned char digest[16];
+ char digeststr[32];
+
+ if (!apop_chal) {
+ printf("[Server does not support APOP]\n");
+ return IMTEST_FAIL;
+ }
+
+ interaction(SASL_CB_AUTHNAME, NULL, "Authname", &username, &userlen);
+ interaction(SASL_CB_PASS,NULL, "Please enter your password",
+ &pass, &passlen);
+
+ MD5_Init(&ctx);
+ MD5_Update(&ctx,apop_chal,strlen(apop_chal));
+ MD5_Update(&ctx,pass,passlen);
+ MD5_Final(digest, &ctx);
+
+ /* convert digest from binary to ASCII hex */
+ for (i = 0; i < 16; i++)
+ sprintf(digeststr + (i*2), "%02x", digest[i]);
+
+ printf("C: APOP %s %s\r\n", username, digeststr);
+ prot_printf(pout,"APOP %s %s\r\n", username, digeststr);
+ prot_flush(pout);
+
+ if(prot_fgets(str, 1024, pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+
+ printf("S: %s", str);
+
+ if (!strncasecmp(str, "+OK ", 4)) {
+ return IMTEST_OK;
+ } else {
+ return IMTEST_FAIL;
+ }
+}
+
+static int pop3_do_auth(struct sasl_cmd_t *sasl_cmd, void *rock,
+ char *mech, char *mechlist)
+{
+ int result = IMTEST_FAIL;
+
+ if (mech) {
+ if (!strcasecmp(mech, "apop")) {
+ result = auth_apop((char *) rock);
+ } else if (!strcasecmp(mech, "user")) {
+ result = auth_pop();
+ } else {
+ result = auth_sasl(sasl_cmd, mech);
+ }
+ } else {
+ if (mechlist) {
+ result = auth_sasl(sasl_cmd, mechlist);
+ } else if (rock) {
+ result = auth_apop((char *) rock);
+ } else {
+ result = auth_pop();
+ }
+ }
+
+ return result;
+}
+
+/********************************** NNTP *************************************/
+
+static int auth_nntp(void)
+{
+ char str[1024];
+ /* we need username and password to do AUTHINFO USER/PASS */
+ char *username;
+ unsigned int userlen;
+ char *pass;
+ unsigned int passlen;
+
+ interaction(SASL_CB_AUTHNAME, NULL, "Authname", &username, &userlen);
+
+ printf("C: AUTHINFO USER %s\r\n", username);
+ prot_printf(pout,"AUTHINFO USER %s\r\n", username);
+ prot_flush(pout);
+
+ if (prot_fgets(str, 1024, pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+
+ printf("S: %s", str);
+
+ if (!strncmp(str, "381", 3)) {
+ interaction(SASL_CB_PASS, NULL, "Please enter your password",
+ &pass, &passlen);
+
+ printf("C: AUTHINFO PASS <omitted>\r\n");
+ prot_printf(pout,"AUTHINFO PASS %s\r\n",pass);
+ prot_flush(pout);
+
+ if (prot_fgets(str, 1024, pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+
+ printf("S: %s", str);
+ }
+
+ if (!strncmp(str, "281", 3)) {
+ return IMTEST_OK;
+ } else {
+ return IMTEST_FAIL;
+ }
+}
+
+static int nntp_do_auth(struct sasl_cmd_t *sasl_cmd,
+ void *rock __attribute__((unused)),
+ char *mech, char *mechlist)
+{
+ int result = IMTEST_OK;
+
+ if (mech) {
+ if (!strcasecmp(mech, "user")) {
+ result = auth_nntp();
+ } else {
+ result = auth_sasl(sasl_cmd, mech);
+ }
+ } else {
+ if (mechlist) {
+ result = auth_sasl(sasl_cmd, mechlist);
+ } else {
+ result = auth_nntp();
+ }
+ }
+
+ return result;
+}
+
+static char *nntp_parse_success(char *str)
+{
+ char *success = NULL, *tmp;
+
+ if (!strncmp(str, "283 ", 4)) {
+ success = str+4;
+ if ((tmp = strchr(success, ' ')))
+ *tmp = '\0'; /* clip trailing comment */
+ }
+
+ return success;
+}
+
+/******************************** LMTP/SMTP **********************************/
+
+static int xmtp_do_auth(struct sasl_cmd_t *sasl_cmd,
+ void *rock __attribute__((unused)),
+ char *mech, char *mechlist)
+{
+ int result = IMTEST_OK;
+
+ if (mech) {
+ result = auth_sasl(sasl_cmd, mech);
+ } else if (mechlist) {
+ result = auth_sasl(sasl_cmd, mechlist);
+ }
+
+ return result;
+}
+
+struct xmtp_context_t
+{
+ int inData;
+};
+
+/* This takes a NUL-terminated full line (including any trailing \r\n) */
+static int xmtp_pipe_oneline(char *buf, int len, void *rock) {
+ struct xmtp_context_t *text = (struct xmtp_context_t *)rock;
+
+ if(text->inData && len <= 3) {
+ if(buf[0] == '.' &&
+ (buf[1] == '\n' || (buf[1] == '\r' && buf[2] == '\n'))) {
+ text->inData = 0;
+ }
+ } else if(!text->inData && len > 4 && len <= 6) {
+ if(!strncasecmp(buf, "DATA", 4) &&
+ (buf[4] == '\n' || (buf[4] == '\r' && buf[5] == '\n'))) {
+ text->inData = 1;
+ } else if(!strncasecmp(buf, "QUIT", 4) &&
+ (buf[4] == '\n' || (buf[4] == '\r' && buf[5] == '\n'))) {
+ return IMTEST_CLOSEME;
+ }
+ }
+
+ prot_write(pout, buf, len);
+ prot_flush(pout);
+
+ return IMTEST_OK;
+}
+
+static void *xmtp_init_conn(void)
+{
+ struct generic_context_t *ret;
+
+ ret =
+ (void *)xmalloc(sizeof(struct generic_context_t));
+ memset(ret, 0, sizeof(struct generic_context_t));
+
+ ret->rock =
+ (void *)xmalloc(sizeof(struct xmtp_context_t));
+ memset(ret->rock, 0, sizeof(struct xmtp_context_t));
+
+ ret->pipe_oneline = &xmtp_pipe_oneline;
+
+ return ret;
+}
+
+static int xmtp_reset(void *rock)
+{
+ struct generic_context_t *gentext = (struct generic_context_t *)rock;
+ struct xmtp_context_t *text = (struct xmtp_context_t *)gentext->rock;
+
+ if(text->inData || gentext->midLine) return IMTEST_FAIL;
+
+ prot_printf(pout, "RSET\r\n");
+ prot_flush(pout);
+ waitfor("250", NULL, 1);
+
+ return IMTEST_OK;
+}
+
+
+/******************************** MUPDATE ************************************/
+
+
+/********************************* SIEVE *************************************/
+
+static char *sieve_parse_success(char *str)
+{
+ char *success = NULL, *tmp;
+
+ if (!strncmp(str, "OK (", 4) &&
+ (tmp = strstr(str+4, "SASL \"")) != NULL) {
+ success = tmp+6; /* skip SASL " */
+ tmp = strstr(success, "\"");
+ *tmp = '\0'; /* clip " */
+ }
+
+ return success;
+}
+
+/*****************************************************************************/
+
+/* didn't give correct parameters; let's exit */
+void usage(char *prog, char *prot)
+{
+ printf("Usage: %s [options] hostname\n", prog);
+ printf(" -p port : port to use (default=standard port for protocol)\n");
+ if (!strcasecmp(prot, "imap"))
+ printf(" -z : timing test\n");
+ printf(" -k # : minimum protection layer required\n");
+ printf(" -l # : max protection layer (0=none; 1=integrity; etc)\n");
+ printf(" -u user : authorization name to use\n");
+ printf(" -a user : authentication name to use\n");
+ printf(" -w pass : password to use (if not supplied, we will prompt)\n");
+ printf(" -v : verbose\n");
+ printf(" -m mech : SASL mechanism to use\n");
+ if (!strcasecmp(prot, "imap"))
+ printf(" (\"login\" for IMAP LOGIN)\n");
+ else if (!strcasecmp(prot, "pop3"))
+ printf(" (\"user\" for USER/PASS, \"apop\" for APOP)\n");
+ else if (!strcasecmp(prot, "nntp"))
+ printf(" (\"user\" for AUTHINFO USER/PASS\n");
+ printf(" -f file : pipe file into connection after authentication\n");
+ printf(" -r realm : realm\n");
+#ifdef HAVE_SSL
+ if (!strcasecmp(prot, "imap") || !strcasecmp(prot, "pop3") ||
+ !strcasecmp(prot, "nntp") || !strcasecmp(prot, "smtp"))
+ printf(" -s : Enable %s over SSL (%ss)\n", prot, prot);
+ if (strcasecmp(prot, "mupdate"))
+ printf(" -t file : Enable TLS. file has the TLS public and private keys\n"
+ " (specify \"\" to not use TLS for authentication)\n");
+#endif /* HAVE_SSL */
+ printf(" -c : enable challenge prompt callbacks\n"
+ " (enter one-time password instead of secret pass-phrase)\n");
+ printf(" -n : number of auth attempts (default=1)\n");
+ printf(" -I file : output my PID to (file) (useful with -X)\n");
+ printf(" -x file : open the named socket for the interactive portion\n");
+ printf(" -X file : same as -X, except close all file descriptors & dameonize\n");
+
+ exit(1);
+}
+
+
+static struct protocol_t protocols[] = {
+ { "imap", "imaps", "imap",
+ { 0, "* OK", NULL },
+ { "C01 CAPABILITY", "C01 ", " STARTTLS", " AUTH=", &imap_parse_mechlist },
+ { "S01 STARTTLS", "S01 OK", "S01 NO", 0 },
+ { "A01 AUTHENTICATE", 0, 0, "A01 OK", "A01 NO", "+ ", "*", NULL },
+ &imap_do_auth, { "Q01 LOGOUT", "Q01 " },
+ &imap_init_conn, &generic_pipe, &imap_reset
+ },
+ { "pop3", "pop3s", "pop",
+ { 0, "+OK ", &pop3_parse_banner },
+ { "CAPA", ".", "STLS", "SASL ", NULL },
+ { "STLS", "+OK", "-ERR", 0 },
+ { "AUTH", 255, 0, "+OK", "-ERR", "+ ", "*", NULL },
+ &pop3_do_auth, { "QUIT", "+OK" }, NULL, NULL, NULL
+ },
+ { "nntp", "nntps", "nntp",
+ { 0, "20", NULL },
+ { "CAPABILITIES", ".", "STARTTLS", "SASL ", NULL },
+ { "STARTTLS", "382", "580", 0 },
+ { "AUTHINFO SASL", 512, 0, "28", "48", "383 ", "*", &nntp_parse_success },
+ &nntp_do_auth, { "QUIT", "205" }, NULL, NULL, NULL
+ },
+ { "lmtp", NULL, "lmtp",
+ { 0, "220 ", NULL },
+ { "LHLO example.com", "250 ", "STARTTLS", "AUTH ", NULL },
+ { "STARTTLS", "220", "454", 0 },
+ { "AUTH", 512, 0, "235", "5", "334 ", "*", NULL },
+ &xmtp_do_auth, { "QUIT", "221" },
+ &xmtp_init_conn, &generic_pipe, &xmtp_reset
+ },
+ { "smtp", "smtps", "smtp",
+ { 0, "220 ", NULL },
+ { "EHLO example.com", "250 ", "STARTTLS", "AUTH ", NULL },
+ { "STARTTLS", "220", "454", 0 },
+ { "AUTH", 512, 0, "235", "5", "334 ", "*", NULL },
+ &xmtp_do_auth, { "QUIT", "221" },
+ &xmtp_init_conn, &generic_pipe, &xmtp_reset
+ },
+ { "mupdate", NULL, "mupdate",
+ { 1, "* OK", NULL },
+ { NULL , "* OK", "* STARTTLS", "* AUTH ", NULL },
+ { "S01 STARTTLS", "S01 OK", "S01 NO", 1 },
+ { "A01 AUTHENTICATE", INT_MAX, 1, "A01 OK", "A01 NO", "", "*", NULL },
+ NULL, { "Q01 LOGOUT", "Q01 " }, NULL, NULL, NULL
+ },
+ { "sieve", NULL, SIEVE_SERVICE_NAME,
+ { 1, "OK", NULL },
+ { "CAPABILITY", "OK", "\"STARTTLS\"", "\"SASL\" ", NULL },
+ { "STARTTLS", "OK", "NO", 0 },
+ { "AUTHENTICATE", INT_MAX, 1, "OK", "NO", NULL, "*", &sieve_parse_success },
+ NULL, { "LOGOUT", "OK" }, NULL, NULL, NULL
+ },
+ { "csync", NULL, "csync",
+ { 1, "* OK", NULL },
+ { NULL , "* OK", "* STARTTLS", "* SASL ", NULL },
+ { "STARTTLS", "OK", "NO", 1 },
+ { "AUTHENTICATE", INT_MAX, 0, "OK", "NO", "+ ", "*", NULL },
+ NULL, { "EXIT", "OK" }, NULL, NULL, NULL
+ },
+ { NULL, NULL, NULL,
+ { 0, NULL, NULL },
+ { NULL, NULL, NULL, NULL, NULL },
+ { NULL, NULL, NULL, 0 },
+ { NULL, 0, 0, NULL, NULL, NULL, NULL, NULL },
+ NULL, { NULL, NULL }, NULL, NULL, NULL
+ }
+};
+
+int main(int argc, char **argv)
+{
+ struct protocol_t *protocol;
+ char *mechanism = NULL;
+ char servername[1024];
+ char *filename=NULL;
+
+ char *mechlist;
+ unsigned ext_ssf = 0;
+ const int *ssfp;
+ int maxssf = 128;
+ int minssf = 0;
+ int c;
+ int result;
+ int errflg = 0;
+
+ char *prog;
+ char *tls_keyfile="";
+ char *port = "", *prot = "";
+ int run_stress_test=0;
+ int dotls=0, dossl=0;
+ int server_supports_tls;
+ char str[1024];
+ const char *pidfile = NULL;
+ void *rock = NULL;
+ int reauth = 1;
+ int dochallenge = 0, noinitresp = 0;
+ char *val;
+
+ struct stringlist *cur, *cur_next;
+
+ if (!construct_hash_table(&confighash, CONFIGHASHSIZE, 1)) {
+ imtest_fatal("could not construct config hash table");
+ }
+
+ /* do not buffer */
+ setbuf(stdin, NULL);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+
+ prog = strrchr(argv[0], '/') ? strrchr(argv[0], '/')+1 : argv[0];
+
+ /* look at all the extra args */
+ while ((c = getopt(argc, argv, "P:scizvk:l:p:u:a:m:f:r:t:n:I:x:X:w:o:?h")) != EOF)
+ switch (c) {
+ case 'P':
+ prot = optarg;
+ break;
+ case 's':
+#ifdef HAVE_SSL
+ dossl=1;
+#else
+ imtest_fatal("imtest was not compiled with SSL/TLS support\n");
+#endif
+ break;
+ case 'c':
+ dochallenge=1;
+ break;
+ case 'i':
+ noinitresp=1;
+ break;
+ case 'z':
+ run_stress_test=1;
+ break;
+ case 'v':
+ verbose=1;
+ break;
+ case 'k':
+ minssf=atoi(optarg);
+ break;
+ case 'l':
+ maxssf=atoi(optarg);
+ break;
+ case 'p':
+ port = optarg;
+ break;
+ case 'u':
+ username = optarg;
+ break;
+ case 'a':
+ authname = optarg;
+ break;
+ case 'w':
+ cmdline_password = optarg;
+ break;
+ case 'm':
+ mechanism=optarg;
+ break;
+ case 'f':
+ if(output_socket)
+ imtest_fatal("cannot pipe a file when using unix domain socket output");
+ filename=optarg;
+ break;
+ case 'r':
+ realm=optarg;
+ break;
+ case 't':
+#ifdef HAVE_SSL
+ dotls=1;
+ tls_keyfile=optarg;
+#else
+ imtest_fatal("imtest was not compiled with SSL/TLS support\n");
+#endif
+ break;
+ case 'n':
+ reauth = atoi(optarg);
+ if (reauth <= 0)
+ imtest_fatal("number of auth attempts must be > 0\n");
+ break;
+ case 'I':
+ pidfile = optarg;
+ break;
+ case 'X':
+ case 'x':
+ if(filename)
+ imtest_fatal("cannot pipe a file when using unix domain socket output");
+ if(output_socket)
+ imtest_fatal("cannot specify both -X and -x");
+
+ output_socket = optarg;
+
+ if(c == 'X'){
+ /* close all already-open file descriptors that are
+ * not stdin/stdout/stderr */
+ int i, dsize = getdtablesize();
+
+ /* close all file descriptors */
+ for(i=0; i<dsize; i++) close(i);
+
+ /* background ourselves and lose the process group info */
+ for(i=0;i<3;i++) if(fork()) exit(0);
+ }
+
+ break;
+
+ case 'o':
+ /* parse the opt=val string. if no value is given, assume '1' */
+ if ((val = strchr(optarg, '=')))
+ *val++ = '\0';
+ else
+ val = "1";
+
+ /* insert the opt/val pair into the hash table */
+ hash_insert(optarg, xstrdup(val), &confighash);
+ break;
+
+ case 'h':
+ case '?':
+ default:
+ errflg = 1;
+ break;
+ }
+
+ if (!*prot) {
+ if (!strcasecmp(prog, "imtest"))
+ prot = "imap";
+ else if (!strcasecmp(prog, "pop3test"))
+ prot = "pop3";
+ else if (!strcasecmp(prog, "nntptest"))
+ prot = "nntp";
+ else if (!strcasecmp(prog, "lmtptest"))
+ prot = "lmtp";
+ else if (!strcasecmp(prog, "smtptest"))
+ prot = "smtp";
+ else if (!strcasecmp(prog, "mupdatetest"))
+ prot = "mupdate";
+ else if (!strcasecmp(prog, "sivtest"))
+ prot = "sieve";
+ else if (!strcasecmp(prog, "synctest"))
+ prot = "csync";
+ }
+
+ protocol = protocols;
+ while (protocol->protocol && strcasecmp(prot, protocol->protocol))
+ protocol++;
+
+ if (!protocol->protocol)
+ imtest_fatal("unknown protocol\n");
+
+ if (dossl && !protocol->sprotocol)
+ imtest_fatal("protocol can not be SSL-wrapped\n");
+
+ if (run_stress_test && strcmp(protocol->protocol, "imap"))
+ imtest_fatal("stress test can only be run for IMAP\n");
+
+ if (errflg) {
+ usage(prog, protocol->protocol);
+ }
+
+ if (!*port) {
+ if (dossl) {
+ port=protocol->sprotocol;
+ } else {
+ port=protocol->protocol;
+ }
+ }
+
+ /* last arg is server name */
+ if (optind < argc)
+ strncpy(servername, argv[optind], 1023);
+ else {
+ fprintf(stderr, "WARNING: no hostname supplied, assuming localhost\n\n");
+ strncpy(servername, "localhost", 1023);
+ }
+
+ if(pidfile) {
+ FILE *pf;
+ pf = fopen(pidfile, "w");
+ if(!pf) {
+ fprintf(stderr, "could not open %s for writing\n",pidfile);
+ perror("error");
+ exit(1);
+ }
+ fprintf(pf, "%d", getpid());
+ fclose(pf);
+ }
+
+ /* attempt to start sasl */
+ if (sasl_client_init(callbacks+(!dochallenge ? 2 : 0)) != IMTEST_OK) {
+ imtest_fatal("SASL initialization");
+ }
+
+ conn = NULL;
+ do {
+ if (conn) {
+ /* send LOGOUT */
+ logout(&protocol->logout_cmd, 1);
+ printf("Connection closed.\n\n");
+
+ prot_free(pin);
+ prot_free(pout);
+
+ close(sock);
+
+ sasl_dispose(&conn);
+ }
+
+ if (init_net(servername, port) != IMTEST_OK) {
+ imtest_fatal("Network initialization - can not connect to %s:%s",
+ servername, port);
+ }
+
+ if (init_sasl(protocol->service, servername, minssf, maxssf,
+ protocol->sasl_cmd.parse_success ?
+ SASL_SUCCESS_DATA : 0) != IMTEST_OK) {
+ imtest_fatal("SASL initialization");
+ }
+
+ /* set up the prot layer */
+ pin = prot_new(sock, 0);
+ pout = prot_new(sock, 1);
+
+#ifdef HAVE_SSL
+ if (dossl==1) {
+ do_starttls(1, "", &ext_ssf);
+ }
+#endif /* HAVE_SSL */
+
+ if (protocol->banner.is_capa) {
+ mechlist = ask_capability(protocol, &server_supports_tls, 1);
+ }
+ else {
+ do { /* look for the banner response */
+ if (prot_fgets(str, sizeof(str), pin) == NULL) {
+ imtest_fatal("prot layer failure");
+ }
+ printf("S: %s", str);
+
+ /* parse it if need be */
+ if (protocol->banner.parse_banner)
+ rock = protocol->banner.parse_banner(str);
+ } while (strncasecmp(str, protocol->banner.resp,
+ strlen(protocol->banner.resp)));
+
+ mechlist = ask_capability(protocol, &server_supports_tls, 0);
+ }
+
+#ifdef HAVE_SSL
+ if ((dossl==0) && (dotls==1) && (server_supports_tls==1)) {
+ char *resp;
+
+ printf("C: %s\r\n", protocol->tls_cmd.cmd);
+ prot_printf(pout, "%s\r\n", protocol->tls_cmd.cmd);
+ prot_flush(pout);
+
+ resp = waitfor(protocol->tls_cmd.ok, protocol->tls_cmd.fail, 1);
+
+ if (!strncasecmp(resp, protocol->tls_cmd.ok,
+ strlen(protocol->tls_cmd.ok))) {
+
+ do_starttls(0, tls_keyfile, &ext_ssf);
+
+ /* ask for the capabilities again */
+ if (verbose==1)
+ printf("Asking for capabilities again "
+ "since they might have changed\n");
+ if (mechlist) free(mechlist);
+ mechlist = ask_capability(protocol, &server_supports_tls,
+ protocol->tls_cmd.auto_capa);
+ }
+
+ } else if ((dotls==1) && (server_supports_tls!=1)) {
+ imtest_fatal("STARTTLS not supported by the server!\n");
+ }
+#endif /* HAVE_SSL */
+
+ if (noinitresp) {
+ /* don't use an initial response, even if its supported */
+ protocol->sasl_cmd.maxlen = 0;
+ }
+
+ if (protocol->do_auth)
+ result = protocol->do_auth(&protocol->sasl_cmd, rock,
+ mechanism, mechlist);
+ else {
+ if (mechanism) {
+ result = auth_sasl(&protocol->sasl_cmd, mechanism);
+ } else if (mechlist) {
+ result = auth_sasl(&protocol->sasl_cmd, mechlist);
+ } else {
+ result = IMTEST_FAIL;
+ }
+ }
+
+ if (rock) free(rock);
+ if (mechlist) free(mechlist);
+
+ if (result == IMTEST_OK) {
+ printf("Authenticated.\n");
+
+ /* turn on layer if need be */
+ prot_setsasl(pin, conn);
+ prot_setsasl(pout, conn);
+ } else {
+ const char *s = sasl_errstring(result, NULL, NULL);
+
+ printf("Authentication failed. %s\n", s);
+ }
+
+ result = sasl_getprop(conn, SASL_SSF, (const void **)&ssfp);
+ if (result != SASL_OK) {
+ printf("SSF: unable to determine (SASL ERROR %d)\n", result);
+ } else {
+ printf("Security strength factor: %d\n", ext_ssf + *ssfp);
+ }
+
+ } while (--reauth);
+
+ if (run_stress_test == 1) {
+ send_recv_test();
+ } else {
+ /* else run in interactive mode or
+ pipe in a filename if applicable */
+ interactive(protocol, filename);
+ }
+
+ for (cur = strlist_head; cur; cur = cur_next) {
+ cur_next = cur->next;
+ free(cur->str);
+ free(cur);
+ }
+
+ free_hash_table(&confighash, free);
+
+ exit(0);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/install-sh
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/install-sh?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/install-sh (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/install-sh Sat Aug 26 02:00:13 2006
@@ -1,0 +1,238 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+tranformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/install-sh
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,13 @@
+/Makefile.in/1.13/Wed Oct 22 18:50:11 2003//Tcyrus-release-2-3-7
+/codes.h/1.4/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/exitcodes.h/1.4/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/installscript.c/1.29/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/isieve.c/1.5/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/isieve.h/1.5/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/lex.c/1.11/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/lex.h/1.8/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/mystring.c/1.6/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/mystring.h/1.6/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/request.c/1.19/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+/request.h/1.13/Thu Feb 13 20:15:37 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/installsieve
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,95 @@
+# Makefile.in - installsieve makefile
+# @configure_input@
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+# $Id: Makefile.in,v 1.13 2003/10/22 18:50:11 rjs3 Exp $
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@
+CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/../lib @CPPFLAGS@ @SASLFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+INSTALL = @INSTALL@
+
+MAKEDEPEND = @MAKEDEPEND@
+
+IMAP_LIBS = @IMAP_LIBS@
+LIBS =
+DEPLIBS= ../lib/libcyrus.a @DEPLIBS@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+
+all: installsieve
+
+install:
+ $(INSTALL) -s -m 755 installsieve $(DESTDIR)$(exec_prefix)/bin
+
+OBJS=lex.o mystring.o request.o isieve.o
+
+libinstallsieve.a: $(OBJS)
+ rm -f libinstallsieve.a
+ ar cr libinstallsieve.a $(OBJS)
+ $(RANLIB) libinstallsieve.a
+
+installsieve: libinstallsieve.a installscript.o $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o installsieve libinstallsieve.a installscript.o $(DEPLIBS) $(IMAP_LIBS)
+
+clean:
+ rm -f *.o *.a Makefile.bak makedepend.log
+
+distclean: clean
+ rm -f Makefile installsieve
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) -I. $(CFLAGS) \
+ $<
+
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/codes.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/codes.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/codes.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/codes.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,58 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: codes.h,v 1.4 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#ifndef _CODES_H_
+#define _CODES_H_
+
+
+
+#define SIEVE_OK 0
+#define SIEVE_FAIL -1
+
+#define SIEVE_BADPORT -5
+#define SIEVE_NOEXIST -6
+
+
+#define TRUE 1
+#define FALSE 0
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/exitcodes.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/exitcodes.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/exitcodes.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/exitcodes.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,86 @@
+/* exitcodes.h -- wrapper around sysextis.h
+ * $Id: exitcodes.h,v 1.4 2003/02/13 20:15:37 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* Sendmail has some weird ideas on what constitutes permenant failure. On
+ more than one occasion, we have gotten burned by this moving users around
+ through various inadvisable means, screwing up the mailboxes file,
+ whatever.
+
+ We don't want to fail out permenantly on things like EX_USAGE, EX_SOFTWARE,
+ etc., because that generally means someone was just screwing with the mail
+ store and we don't want to lose mail.
+
+ Instead, we map these EC_* codes to EX_* codes, thereby lying to Sendmail,
+ since we don't derive any benefit from Sendmail knowing what the error was.
+ We just want it to retry all the time anyway. This way, should sendmail's
+ behavior be different and we start deriving benefit from Sendmail knowing
+ stuff, we can easily change it back.
+
+ So other code uses the EC_* error, then we maybe change it to TEMPFAIL if
+ we don't agree on whether the error should be permenant or not.
+
+ Comments below stolen from sysexits.h. */
+
+#ifndef INCLUDED_EXITCODES_H
+#define INCLUDED_EXITCODES_H
+
+#include <sysexits.h>
+
+#define EC_OK 0 /* successful termination */
+
+#define EC_USAGE EX_TEMPFAIL /* command line usage error */
+#define EC_DATAERR EX_DATAERR /* data format error */
+#define EC_NOINPUT EX_TEMPFAIL /* cannot open input */
+#define EC_NOUSER EX_NOUSER /* addressee unknown */
+#define EC_NOHOST EX_TEMPFAIL /* host name unknown */
+#define EC_UNAVAILABLE EX_TEMPFAIL /* service unavailable */
+#define EC_SOFTWARE EX_TEMPFAIL /* internal software error */
+#define EC_OSERR EX_TEMPFAIL /* system error (e.g., can't fork) */
+#define EC_OSFILE EX_TEMPFAIL /* critical OS file missing */
+#define EC_CANTCREAT EX_TEMPFAIL /* can't create (user) output file */
+#define EC_IOERR EX_TEMPFAIL /* input/output error */
+#define EC_TEMPFAIL EX_TEMPFAIL /* user is invited to retry */
+#define EC_PROTOCOL EX_TEMPFAIL /* remote error in protocol */
+#define EC_NOPERM EX_TEMPFAIL /* permission denied */
+#define EC_CONFIG EX_TEMPFAIL /* configuration error */
+
+#endif /* INCLUDED_EXITCODES_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/installscript.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/installscript.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/installscript.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/installscript.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,712 @@
+/* installscrip.c -- command line program to install sieve scripts
+ * Tim Martin
+ * 9/21/99
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: installscript.c,v 1.29 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <unistd.h>
+
+#include <netinet/in.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include <pwd.h>
+
+#include "prot.h"
+#include "lex.h"
+#include "request.h"
+
+#define IMTEST_OK 0
+#define IMTEST_FAIL -1
+
+typedef enum {
+ STAT_CONT = 0,
+ STAT_NO = 1,
+ STAT_OK = 2
+} imt_stat;
+
+char *authname=NULL;
+char *username=NULL;
+char *realm=NULL;
+char *password=NULL;
+
+/* global vars */
+sasl_conn_t *conn;
+int sock; /* socket descriptor */
+
+struct protstream *pout, *pin;
+
+static int version;
+
+void imtest_fatal(char *msg)
+{
+ if (msg!=NULL)
+ printf("failure: %s\n",msg);
+ exit(1);
+}
+
+static int
+getsecret(sasl_conn_t *conn,
+ void *context __attribute__((unused)),
+ int id,
+ sasl_secret_t **psecret)
+{
+ char *password;
+ size_t len;
+
+ if (! conn || ! psecret || id != SASL_CB_PASS)
+ return SASL_BADPARAM;
+
+ printf("xxx todo\n");
+ return -1;
+
+ /* printf("Password: ", prompt);
+ *tresult=strdup(getpass(""));
+ *tlen=strlen(*tresult);
+ if (! password)
+ return SASL_FAIL; */
+
+ len = strlen(password);
+
+ *psecret = (sasl_secret_t *) malloc(sizeof(sasl_secret_t) + len);
+
+ if (! *psecret) {
+ memset(password, 0, len);
+ return SASL_NOMEM;
+ }
+
+ (*psecret)->len = len;
+ strcpy((*psecret)->data, password);
+ memset(password, 0, len);
+
+ return SASL_OK;
+}
+
+static int
+simple(void *context,
+ int id,
+ const char **result,
+ unsigned *len)
+{
+ const char *value = (const char *)context;
+ int l;
+
+ /* xxx */
+ printf("asking for %d\n",id);
+
+ if (! result)
+ return SASL_BADPARAM;
+
+ switch (id) {
+ case SASL_CB_USER:
+ printf("Username: ");
+ *result = xmalloc(1025);
+ fgets(*result, 1024, stdin);
+ l = strlen(*result);
+ (*result)[l - 1] = '\0';
+ if (len)
+ *len = strlen(*result);
+ break;
+ case SASL_CB_AUTHNAME:
+ *result = value;
+ if (len)
+ *len = value ? strlen(value) : 0;
+ break;
+ case SASL_CB_LANGUAGE:
+ *result = NULL;
+ if (len)
+ *len = 0;
+ break;
+ default:
+ return SASL_BADPARAM;
+ }
+ return SASL_OK;
+}
+
+void interaction (int id, const char *prompt,
+ char **tresult, unsigned int *tlen)
+{
+ char result[1024];
+
+ if (id==SASL_CB_PASS) {
+ if (password!=NULL) /* if specified on command line */
+ {
+ *tresult = strdup(password);
+ *tlen=strlen(*tresult);
+
+ /* wipe it out from memory now. we don't want to hold
+ onto the user's plaintext password */
+ memset(password, '\0', strlen(password));
+
+ } else {
+ printf("%s: ", prompt);
+ *tresult=strdup(getpass(""));
+ *tlen=strlen(*tresult);
+ }
+ return;
+ } else if ((id==SASL_CB_USER) || (id==SASL_CB_AUTHNAME)) {
+ if ((id==SASL_CB_USER) && (username!=NULL))
+ {
+ strcpy(result, username);
+ } else if (authname) {
+ strcpy(result, authname);
+ } else {
+ strcpy(result, getpwuid(getuid())->pw_name);
+ }
+#ifdef SASL_CB_GETREALM
+ } else if ((id==SASL_CB_GETREALM) && (realm!=NULL)) {
+ strcpy(result, realm);
+#endif
+ } else {
+ int c;
+
+ printf("%s: ",prompt);
+ fgets(result, 1023, stdin);
+ c = strlen(result);
+ result[c - 1] = '\0';
+ }
+
+ *tlen = strlen(result);
+ *tresult = (char *) malloc(*tlen+1);
+ memset(*tresult, 0, *tlen+1);
+ memcpy((char *) *tresult, result, *tlen);
+}
+
+void fillin_interactions(sasl_interact_t *tlist)
+{
+ while (tlist->id!=SASL_CB_LIST_END)
+ {
+ interaction(tlist->id, tlist->prompt,
+ (void *) &(tlist->result),
+ &(tlist->len));
+ tlist++;
+ }
+
+}
+
+/* callbacks we support */
+static sasl_callback_t callbacks[] = {
+ {
+ SASL_CB_GETREALM, &simple, NULL
+ }, {
+ SASL_CB_USER, &simple, NULL
+ }, {
+ SASL_CB_AUTHNAME, &simple, NULL
+ }, {
+ SASL_CB_PASS, &getsecret, NULL
+ }, {
+ SASL_CB_LIST_END, NULL, NULL
+ }
+};
+
+
+/* libcyrus makes us define this */
+void fatal(const char *s, int code)
+{
+ printf("Error: %s\n",s);
+ exit(code);
+}
+
+static sasl_security_properties_t *make_secprops(int min,int max)
+{
+ sasl_security_properties_t *ret=(sasl_security_properties_t *)
+ malloc(sizeof(sasl_security_properties_t));
+
+ ret->maxbufsize=1024;
+ ret->min_ssf=min;
+ ret->max_ssf=max;
+
+ ret->security_flags=0;
+ ret->property_names=NULL;
+ ret->property_values=NULL;
+
+ return ret;
+}
+
+
+/*
+ * Initialize SASL and set necessary options
+ */
+
+static int init_sasl(char *serverFQDN, int port, int ssf)
+{
+ int saslresult;
+ sasl_security_properties_t *secprops=NULL;
+ int addrsize=sizeof(struct sockaddr_in);
+ struct sockaddr_in *saddr_l=malloc(sizeof(struct sockaddr_in));
+ struct sockaddr_in *saddr_r=malloc(sizeof(struct sockaddr_in));
+
+ /* attempt to start sasl */
+ saslresult=sasl_client_init(callbacks);
+
+ if (saslresult!=SASL_OK) return IMTEST_FAIL;
+
+ /* client new connection */
+ saslresult=sasl_client_new(SIEVE_SERVICE_NAME,
+ serverFQDN,
+ NULL,
+ 0,
+ &conn);
+
+ if (saslresult!=SASL_OK) return IMTEST_FAIL;
+
+ /* create a security structure and give it to sasl */
+ secprops = make_secprops(0, ssf);
+ if (secprops != NULL)
+ {
+ sasl_setprop(conn, SASL_SEC_PROPS, secprops);
+ free(secprops);
+ }
+
+ if (getpeername(sock,(struct sockaddr *)saddr_r,&addrsize)!=0)
+ return IMTEST_FAIL;
+
+ if (sasl_setprop(conn, SASL_IP_REMOTE, saddr_r)!=SASL_OK)
+ return IMTEST_FAIL;
+
+ addrsize=sizeof(struct sockaddr_in);
+ if (getsockname(sock,(struct sockaddr *)saddr_l,&addrsize)!=0)
+ return IMTEST_FAIL;
+
+ /* set the port manually since getsockname is stupid and doesn't */
+ saddr_l->sin_port = htons(port);
+
+ if (sasl_setprop(conn, SASL_IP_LOCAL, saddr_l)!=SASL_OK)
+ return IMTEST_FAIL;
+
+
+ /* should be freed */
+ free(saddr_l);
+ free(saddr_r);
+
+ return IMTEST_OK;
+}
+
+
+int getauthline(char **line, unsigned int *linelen)
+{
+ lexstate_t state;
+ int res;
+ int ret;
+ mystring_t *errstr;
+
+ /* now let's see what the server said */
+ res=yylex(&state, pin);
+ if (res!=STRING)
+ {
+ ret = handle_response(res,version,
+ pin, &errstr);
+
+ if (res==TOKEN_OK) {
+ return STAT_OK;
+ } else { /* server said no */
+ printf("Authentication failed with: \"%s\"\n",string_DATAPTR(errstr));
+ return STAT_NO;
+ }
+ }
+
+ *line=(char *) malloc(state.str->len*2+1);
+
+ sasl_decode64(string_DATAPTR(state.str), state.str->len,
+ *line, linelen);
+
+ if (yylex(&state, pin)!=EOL)
+ parseerror("EOL");
+
+ return STAT_CONT;
+}
+
+int auth_sasl(int version, char *mechlist)
+{
+ sasl_interact_t *client_interact=NULL;
+ int saslresult=SASL_INTERACT;
+ char *out;
+ unsigned int outlen;
+ char *in;
+ unsigned int inlen;
+ const char *mechusing;
+ char inbase64[2048];
+ unsigned int inbase64len;
+
+ imt_stat status = STAT_CONT;
+
+ /* call sasl client start */
+ while (saslresult==SASL_INTERACT)
+ {
+ saslresult=sasl_client_start(conn, mechlist,
+ NULL, &client_interact,
+ &out, &outlen,
+ &mechusing);
+ if (saslresult==SASL_INTERACT)
+ fillin_interactions(client_interact); /* fill in prompts */
+
+ }
+
+ if ((saslresult!=SASL_OK) && (saslresult!=SASL_CONTINUE)) return saslresult;
+
+ if (out!=NULL)
+ {
+ prot_printf(pout,"AUTHENTICATE \"%s\" ",mechusing);
+
+ sasl_encode64(out, outlen,
+ inbase64, sizeof(inbase64), &inbase64len);
+
+ prot_printf(pout, "{%d+}\r\n",inbase64len);
+ prot_write(pout,inbase64,inbase64len);
+ prot_printf(pout,"\r\n");
+ } else {
+ prot_printf(pout,"AUTHENTICATE \"%s\"\r\n",mechusing);
+ }
+ prot_flush(pout);
+
+ inlen = 0;
+ status = getauthline(&in,&inlen);
+
+ while (status==STAT_CONT)
+ {
+ saslresult=SASL_INTERACT;
+ while (saslresult==SASL_INTERACT)
+ {
+ saslresult=sasl_client_step(conn,
+ in,
+ inlen,
+ &client_interact,
+ &out,
+ &outlen);
+
+ if (saslresult==SASL_INTERACT)
+ fillin_interactions(client_interact); /* fill in prompts */
+ }
+
+ /* check if sasl suceeded */
+ if (saslresult<SASL_OK)
+ {
+ printf("sasl result = %s\n",sasl_errstring(saslresult,NULL,NULL));
+ return saslresult;
+ }
+
+ /* send to server */
+
+ sasl_encode64(out, outlen,
+ inbase64, sizeof(inbase64), &inbase64len);
+
+ prot_printf(pout, "{%d+}\r\n",inbase64len);
+ prot_flush(pout);
+ prot_write(pout,inbase64,inbase64len);
+ prot_flush(pout);
+ prot_printf(pout,"\r\n");
+ prot_flush(pout);
+
+ /* get reply */
+ status=getauthline(&in,&inlen);
+ }
+
+ return (status == STAT_OK) ? IMTEST_OK : IMTEST_FAIL;
+}
+
+
+/* initialize the network */
+int init_net(char *serverFQDN, int port)
+{
+ struct sockaddr_in addr;
+ struct hostent *hp;
+
+ if ((hp = gethostbyname(serverFQDN)) == NULL) {
+ perror("gethostbyname");
+ return IMTEST_FAIL;
+ }
+
+ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+ perror("socket");
+ return IMTEST_FAIL;
+ }
+
+ addr.sin_family = AF_INET;
+ memcpy(&addr.sin_addr, hp->h_addr, hp->h_length);
+ addr.sin_port = htons(port);
+
+ if (connect(sock, (struct sockaddr *) &addr, sizeof (addr)) < 0) {
+ perror("connect");
+ return IMTEST_FAIL;
+ }
+
+ return IMTEST_OK;
+}
+
+char *read_capability(int *version)
+{
+ lexstate_t state;
+ char *cap = NULL;
+
+ *version = NEW_VERSION;
+
+ while (yylex(&state,pin)==STRING)
+ {
+ char *attr = string_DATAPTR(state.str);
+ char *val = NULL;
+
+
+ if (yylex(&state,pin)==' ')
+ {
+ if (yylex(&state,pin)!=STRING)
+ {
+ parseerror("STRING");
+ }
+ val = string_DATAPTR(state.str);
+ if (yylex(&state,pin)!=EOL)
+ {
+ parseerror("EOL1");
+ }
+ }
+
+ if (strcasecmp(attr,"SASL")==0)
+ {
+ cap = val;
+ } else if (strcasecmp(attr,"SIEVE")==0) {
+
+ } else if (strcasecmp(attr,"IMPLEMENTATION")==0) {
+
+ } else if (strncmp(val,"SASL=",5)==0) {
+ *version = OLD_VERSION;
+ cap = (char *) malloc(strlen(val));
+ memset(cap, '\0', strlen(val));
+ memcpy(cap, val+6, strlen(val)-7);
+
+ return cap;
+ } else {
+ /* unkown capability */
+ }
+ }
+
+ if (yylex(&state,pin)!=EOL)
+ {
+ parseerror("EOL2");
+ }
+
+ return cap;
+}
+
+void list_cb(char *name, int isactive)
+{
+ printf("name = %s active = %d\n",name,isactive);
+}
+
+
+void usage(void)
+{
+ printf("usage:\n");
+ printf(" installsieve [options] servername\n");
+ printf(" -v <name> view script\n");
+ printf(" -l list available scripts\n");
+ printf(" -p <port> port to connect to\n");
+ printf(" -i <file> filename of script to install\n");
+ printf(" -a <name> Set <name> as the active script\n");
+ printf(" -d <name> Delete <name> script from server\n");
+ printf(" -m <mech> Mechanism to use for authentication\n");
+ printf(" -g <name> Get script <name> and save to disk\n");
+ printf(" -u <user> Userid/Authname to use\n");
+ printf(" -t <user> Userid to use (for proxying)\n");
+ printf(" -w <passwd> Specify password (Should only be used for automated scripts)\n");
+ exit(1);
+}
+
+
+int main(int argc, char **argv)
+{
+ char c;
+ int dolist = 0;
+ int deflist = 1;
+
+ char *portstr = "sieve";
+ int port;
+ struct servent *serv;
+
+ char *mechanism=NULL;
+ char *installfile=NULL;
+ char *viewfile=NULL;
+ char *servername;
+ char *setactive=NULL;
+ char *deletescript=NULL;
+ char *getscriptname=NULL;
+ int ssf=0;
+
+ char *mechlist=NULL;
+
+ int result;
+
+ /* look at all the extra args */
+ while ((c = getopt(argc, argv, "a:d:g:lv:p:i:m:u:w:t:")) != EOF)
+ switch (c)
+ {
+ case 'a':
+ setactive=optarg;
+ deflist = 0;
+ break;
+ case 'd':
+ deletescript=optarg;
+ deflist = 0;
+ break;
+ case 'i':
+ installfile=optarg;
+ deflist = 0;
+ break;
+ case 'l':
+ dolist=1;
+ break;
+ case 'v':
+ viewfile=optarg;
+ deflist = 0;
+ break;
+ case 'p':
+ portstr=optarg;
+ break;
+ case 'm':
+ mechanism=optarg;
+ break;
+ case 'g':
+ getscriptname=optarg;
+ deflist = 0;
+ break;
+ case 'u':
+ authname = optarg;
+ break;
+ case 't':
+ username = optarg;
+ break;
+ case 'w':
+ password = optarg;
+ break;
+ default:
+ usage();
+ break;
+ }
+
+ if (optind != argc - 1) {
+ usage();
+ }
+
+ /* last arg is server name */
+ servername = argv[optind];
+
+ /* map port -> num */
+ serv = getservbyname(portstr, "tcp");
+ if (serv == NULL) {
+ port = atoi(portstr);
+ } else {
+ port = ntohs(serv->s_port);
+ }
+
+ if (init_net(servername, port) != IMTEST_OK) {
+ imtest_fatal("Network initialization");
+ }
+
+ if (init_sasl(servername, port, ssf) != IMTEST_OK) {
+ imtest_fatal("SASL initialization");
+ }
+
+ /* set up the prot layer */
+ pin = prot_new(sock, 0);
+ pout = prot_new(sock, 1);
+
+ mechlist=read_capability(&version);
+
+ if (mechanism!=NULL) {
+ result=auth_sasl(version,mechanism);
+ } else if (mechlist==NULL) {
+ printf("Error reading mechanism list from server\n");
+ exit(1);
+ } else {
+ result=auth_sasl(version,mechlist);
+ }
+
+ if (result!=IMTEST_OK) {
+ printf("Authentication failed.\n");
+ exit(1);
+ }
+
+ if (viewfile!=NULL)
+ {
+ getscript(version,pout,pin, viewfile,0);
+ }
+
+ if (installfile!=NULL)
+ {
+ installafile(version,pout,pin,installfile);
+ }
+
+ if (setactive!=NULL)
+ {
+ setscriptactive(version,pout,pin,setactive);
+ }
+
+ if (deletescript!=NULL)
+ {
+ deleteascript(version,pout, pin, deletescript);
+ }
+
+ if (getscriptname!=NULL)
+ {
+ getscript(version,pout,pin, getscriptname,1);
+ }
+
+ if (dolist || deflist) {
+ showlist(version,pout,pin);
+ }
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,412 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: isieve.c,v 1.5 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#include <netinet/in.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#include <sasl/sasl.h>
+
+#include "isieve.h"
+#include "lex.h"
+#include "request.h"
+
+#include <cyrus/prot.h>
+
+
+struct iseive_s {
+
+ char *serverFQDN;
+ int port;
+
+ int sock;
+
+ sasl_conn_t *conn;
+
+ int version;
+
+ struct protstream *pin;
+ struct protstream *pout;
+
+};
+
+/* initialize the network */
+int init_net(char *serverFQDN, int port, isieve_t **obj)
+{
+ struct sockaddr_in addr;
+ struct hostent *hp;
+ int sock;
+
+ if ((hp = gethostbyname(serverFQDN)) == NULL) {
+ perror("gethostbyname");
+ return -1;
+ }
+
+ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
+ perror("socket");
+ return -1;
+ }
+
+ addr.sin_family = AF_INET;
+ memcpy(&addr.sin_addr, hp->h_addr, hp->h_length);
+ addr.sin_port = htons(port);
+
+ if (connect(sock, (struct sockaddr *) &addr, sizeof (addr)) < 0) {
+ perror("connect");
+ return -1;
+ }
+
+ *obj = (isieve_t *) malloc(sizeof(isieve_t));
+ if (!*obj) return -1;
+
+ memset(*obj, '\0', sizeof(isieve_t));
+
+ (*obj)->sock = sock;
+ (*obj)->serverFQDN = serverFQDN;
+ (*obj)->port = port;
+
+ /* set up the prot layer */
+ (*obj)->pin = prot_new(sock, 0);
+ (*obj)->pout = prot_new(sock, 1);
+
+ return 0;
+}
+
+static sasl_security_properties_t *make_secprops(int min,int max)
+{
+ sasl_security_properties_t *ret=(sasl_security_properties_t *)
+ malloc(sizeof(sasl_security_properties_t));
+
+ ret->maxbufsize=1024;
+ ret->min_ssf=min;
+ ret->max_ssf=max;
+
+ ret->security_flags=0;
+ ret->property_names=NULL;
+ ret->property_values=NULL;
+
+ return ret;
+}
+
+/*
+ * Initialize SASL and set necessary options
+ */
+
+int init_sasl(isieve_t *obj,
+ int ssf,
+ sasl_callback_t *callbacks)
+{
+ int saslresult;
+ sasl_security_properties_t *secprops=NULL;
+ int addrsize=sizeof(struct sockaddr_in);
+ struct sockaddr_in *saddr_l=malloc(sizeof(struct sockaddr_in));
+ struct sockaddr_in *saddr_r=malloc(sizeof(struct sockaddr_in));
+
+ /* attempt to start sasl */
+ saslresult=sasl_client_init(callbacks);
+
+ if (saslresult!=SASL_OK) return -1;
+
+ /* client new connection */
+ saslresult=sasl_client_new("imap",
+ obj->serverFQDN,
+ NULL,
+ 0,
+ &obj->conn);
+
+ if (saslresult!=SASL_OK) return -1;
+
+ /* create a security structure and give it to sasl */
+ secprops = make_secprops(0, ssf);
+ if (secprops != NULL)
+ {
+ sasl_setprop(obj->conn, SASL_SEC_PROPS, secprops);
+ free(secprops);
+ }
+
+ if (getpeername(obj->sock,(struct sockaddr *)saddr_r,&addrsize)!=0)
+ return -1;
+
+ if (sasl_setprop(obj->conn, SASL_IP_REMOTE, saddr_r)!=SASL_OK)
+ return -1;
+
+ addrsize=sizeof(struct sockaddr_in);
+ if (getsockname(obj->sock,(struct sockaddr *)saddr_l,&addrsize)!=0)
+ return -1;
+
+ /* set the port manually since getsockname is stupid and doesn't */
+ saddr_l->sin_port = htons(obj->port);
+
+ if (sasl_setprop(obj->conn, SASL_IP_LOCAL, saddr_l)!=SASL_OK)
+ return -1;
+
+
+ /* should be freed */
+ free(saddr_l);
+ free(saddr_r);
+
+ return 0;
+}
+
+char * read_capability(isieve_t *obj)
+{
+ lexstate_t state;
+ char *cap = NULL;
+
+ obj->version = NEW_VERSION;
+
+ while (yylex(&state,obj->pin)==STRING)
+ {
+ char *attr = string_DATAPTR(state.str);
+ char *val = NULL;
+
+ printf("attr = %s\n",attr);
+
+ if (yylex(&state,obj->pin)==' ')
+ {
+ if (yylex(&state,obj->pin)!=STRING)
+ {
+ parseerror("STRING");
+ }
+ val = string_DATAPTR(state.str);
+ if (yylex(&state,obj->pin)!=EOL)
+ {
+ parseerror("EOL1");
+ }
+ }
+
+ if (strcasecmp(attr,"SASL")==0)
+ {
+ cap = val;
+ } else if (strcasecmp(attr,"SIEVE")==0) {
+
+ } else if (strcasecmp(attr,"IMPLEMENTATION")==0) {
+
+ } else if (strncmp(val,"SASL=",5)==0) {
+ obj->version = OLD_VERSION;
+ cap = (char *) malloc(strlen(val));
+ memset(cap, '\0', strlen(val));
+ memcpy(cap, val+6, strlen(val)-7);
+
+ return cap;
+ } else {
+ /* unkown capability */
+ }
+ }
+
+ if (yylex(&state,obj->pin)!=EOL)
+ {
+ parseerror("EOL2");
+ }
+
+ return cap;
+}
+
+static int getauthline(isieve_t *obj, char **line, unsigned int *linelen)
+{
+ lexstate_t state;
+ int res;
+ int ret;
+ mystring_t *errstr;
+
+ /* now let's see what the server said */
+ res=yylex(&state, obj->pin);
+ if (res!=STRING)
+ {
+ ret = handle_response(res,obj->version,
+ obj->pin, &errstr);
+
+ if (res==TOKEN_OK) {
+ return STAT_OK;
+ } else { /* server said no */
+ printf("Authentication failed with: \"%s\"\n",string_DATAPTR(errstr));
+ return STAT_NO;
+ }
+ }
+
+ *line=(char *) malloc(state.str->len*2+1);
+
+ sasl_decode64(string_DATAPTR(state.str), state.str->len,
+ *line, linelen);
+
+ if (yylex(&state, obj->pin)!=EOL)
+ return STAT_NO;
+
+ return STAT_CONT;
+}
+
+
+int auth_sasl(char *mechlist, isieve_t *obj)
+{
+ sasl_interact_t *client_interact=NULL;
+ int saslresult=SASL_INTERACT;
+ char *out;
+ unsigned int outlen;
+ char *in;
+ unsigned int inlen;
+ const char *mechusing;
+ char inbase64[2048];
+ unsigned int inbase64len;
+
+ imt_stat status = STAT_CONT;
+
+ /* call sasl client start */
+ while (saslresult==SASL_INTERACT)
+ {
+ saslresult=sasl_client_start(obj->conn, mechlist,
+ NULL, &client_interact,
+ &out, &outlen,
+ &mechusing);
+ if (saslresult==SASL_INTERACT)
+ fillin_interactions(client_interact); /* fill in prompts */
+
+ }
+
+ if ((saslresult!=SASL_OK) && (saslresult!=SASL_CONTINUE)) return saslresult;
+
+ if (out!=NULL)
+ {
+ prot_printf(obj->pout,"AUTHENTICATE \"%s\" ",mechusing);
+
+ sasl_encode64(out, outlen,
+ inbase64, sizeof(inbase64), &inbase64len);
+
+ prot_printf(obj->pout, "{%d+}\r\n",inbase64len);
+ prot_write(obj->pout,inbase64,inbase64len);
+ prot_printf(obj->pout,"\r\n");
+ } else {
+ prot_printf(obj->pout,"AUTHENTICATE \"%s\"\r\n",mechusing);
+ }
+ prot_flush(obj->pout);
+
+ inlen = 0;
+ status = getauthline(obj,&in,&inlen);
+
+ while (status==STAT_CONT)
+ {
+ saslresult=SASL_INTERACT;
+ while (saslresult==SASL_INTERACT)
+ {
+ saslresult=sasl_client_step(obj->conn,
+ in,
+ inlen,
+ &client_interact,
+ &out,
+ &outlen);
+
+ if (saslresult==SASL_INTERACT)
+ fillin_interactions(client_interact); /* fill in prompts */
+ }
+
+ /* check if sasl suceeded */
+ if (saslresult<SASL_OK)
+ {
+ printf("sasl result = %s\n",sasl_errstring(saslresult,NULL,NULL));
+ return saslresult;
+ }
+
+ /* send to server */
+
+ sasl_encode64(out, outlen,
+ inbase64, sizeof(inbase64), &inbase64len);
+
+ prot_printf(obj->pout, "{%d+}\r\n",inbase64len);
+ prot_flush(obj->pout);
+ prot_write(obj->pout,inbase64,inbase64len);
+ prot_flush(obj->pout);
+ prot_printf(obj->pout,"\r\n");
+ prot_flush(obj->pout);
+
+ /* get reply */
+ status=getauthline(obj,&in,&inlen);
+ }
+
+ return (status == STAT_OK) ? 0 : -1;
+}
+
+
+int isieve_put_file(isieve_t *obj, char *filename)
+{
+ return installafile(obj->version,
+ obj->pout, obj->pin,
+ filename);
+}
+
+int isieve_put(isieve_t *obj, char *name, char *data, int len)
+{
+ return installdata(obj->version,
+ obj->pout, obj->pin,
+ name, data, len);
+}
+
+int isieve_delete(isieve_t *obj, char *name)
+{
+ return deleteascript(obj->version,
+ obj->pout, obj->pin,
+ name);
+}
+
+int isieve_list(isieve_t *obj, isieve_listcb_t *cb,void *rock)
+{
+ return list_wcb(obj->version, obj->pout, obj->pin, cb, rock);
+}
+
+int isieve_activate(isieve_t *obj, char *name)
+{
+ return setscriptactive(obj->version,obj->pout, obj->pin, name);
+}
+
+int isieve_get(isieve_t *obj,char *name, char **output)
+{
+ int ret;
+ mystring_t *mystr;
+
+ ret = getscriptvalue(obj->version,obj->pout, obj->pin,
+ name, &mystr);
+
+ *output = string_DATAPTR(mystr);
+
+ return ret;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/isieve.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,83 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: isieve.h,v 1.5 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#ifndef ISIEVE_H_
+#define ISIEVE_H_
+
+#include <sasl/sasl.h>
+
+typedef struct iseive_s isieve_t;
+
+int init_net(char *serverFQDN, int port, isieve_t **obj);
+
+
+int init_sasl(isieve_t *obj,
+ int ssf,
+ sasl_callback_t *callbacks);
+
+char * read_capability(isieve_t *obj);
+
+typedef enum {
+ STAT_CONT = 0,
+ STAT_NO = 1,
+ STAT_OK = 2
+} imt_stat;
+
+int auth_sasl(char *mechlist, isieve_t *obj);
+
+
+int isieve_put_file(isieve_t *obj, char *filename);
+
+int isieve_put(isieve_t *obj, char *name, char *data, int len);
+
+int isieve_delete(isieve_t *obj, char *name);
+
+typedef void *isieve_listcb_t(char *name, int isactive, void *rock);
+
+int isieve_list(isieve_t *obj, isieve_listcb_t *cb,void *rock);
+
+int isieve_activate(isieve_t *obj, char *name);
+
+int isieve_get(isieve_t *obj,char *name, char **output);
+
+
+#endif /* ISIEVE_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,302 @@
+/* lex.c -- lexers for command line script installer
+ * Tim Martin
+ * $Id: lex.c,v 1.11 2003/02/13 20:15:37 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include "prot.h"
+
+#include "lex.h"
+
+#include "codes.h"
+
+/* current state the lexer is in */
+int lexer_state = LEXER_STATE_NORMAL;
+
+#define ACAP_MAX_QSTR_LEN 4096
+
+#define ERR() { \
+ lexer_state=LEXER_STATE_RECOVER; \
+ return SIEVE_FAIL; \
+ /* (result == DAEMON_ERR_EOF ? EOF : ERROR);*/ \
+ }
+
+#define ERR_PUSHBACK() { \
+ prot_ungetc(ch, stream); \
+ ERR(); \
+ }
+
+int token_lookup(char *str, int len)
+{
+ if (strcmp(str,"ok")==0) return TOKEN_OK;
+ if (strcmp(str,"no")==0) return TOKEN_NO;
+ if (strcmp(str,"active")==0) return TOKEN_ACTIVE;
+
+ return -1;
+}
+
+int yylex(lexstate_t * lvalp, void * client)
+{
+ int ch;
+ char buffer[ACAP_MAX_QSTR_LEN]; /* big enough for everything */
+
+ char *buff_ptr = buffer; /* ptr into the buffer */
+ char *buff_end = buffer + ACAP_MAX_QSTR_LEN -1;
+
+ unsigned long count=0;
+
+ int result = SIEVE_OK;
+
+ int synchronizing; /* wheather we are in the process of reading a
+ synchronizing string or not */
+
+ struct protstream *stream=(struct protstream *) client;
+
+ while (1)
+ {
+
+ /* get a character
+ this may block on a read if there is nothing
+ in the buffer */
+
+ ch = prot_getc(stream);
+
+ if (ch == -1) {
+ return SIEVE_FAIL;
+ }
+
+ switch (lexer_state)
+ {
+
+
+ case LEXER_STATE_RECOVER:
+ if (ch == '\r')
+ lexer_state=LEXER_STATE_RECOVER_CR;
+ break;
+ case LEXER_STATE_RECOVER_CR:
+ if (ch == '\n')
+ lexer_state=LEXER_STATE_NORMAL;
+ return EOL;
+ case LEXER_STATE_CR:
+ if (ch == '\n') {
+ lexer_state=LEXER_STATE_NORMAL;
+ return EOL;
+ }
+ /* otherwise, life is bad */
+ ERR_PUSHBACK();
+ case LEXER_STATE_QSTR:
+ if (ch == '\"') {
+ /* End of the string */
+ lvalp->str = NULL;
+ /* if (! client->recovering) { */
+ result = string_allocate(buff_ptr - buffer, buffer, &lvalp->str);
+ if (result != SIEVE_OK)
+ ERR_PUSHBACK();
+ /*} */
+ lexer_state=LEXER_STATE_NORMAL;
+ return STRING;
+ }
+ if (ch == '\0'
+ || 0x7F < ((unsigned char)ch))
+ ERR_PUSHBACK();
+ /* Otherwise, we're appending a character */
+ if (buff_end <= buff_ptr)
+ ERR_PUSHBACK(); /* too long! */
+ if (ch == '\\') {
+ ch=prot_getc(stream);
+
+ if (result != SIEVE_OK)
+ ERR();
+ if (ch != '\"' && ch != '\\')
+ ERR_PUSHBACK();
+ }
+ *buff_ptr++ = ch;
+ break;
+ case LEXER_STATE_LITERAL:
+ if (('0' <= ch) && (ch <= '9')) {
+ unsigned long newcount = count * 10 + (ch - '0');
+
+ if (newcount < count)
+ ERR_PUSHBACK(); /* overflow */
+ /*
+ * XXX This should be fatal if non-synchronizing.
+ */
+ count = newcount;
+ break;
+ }
+ synchronizing = FALSE;
+
+ if (ch != '}')
+ ERR_PUSHBACK();
+ ch=prot_getc(stream);
+ if (ch < 0)
+ ERR();
+ if (ch != '\r')
+ ERR_PUSHBACK();
+ ch=prot_getc(stream);
+ if (ch < 0)
+ ERR();
+ if (ch != '\n')
+ ERR_PUSHBACK();
+ if (synchronizing) {
+ /* static const char sync_reply[] = "+ \"Ready for data\"\r\n";*/
+
+ /* xxx if (client->recovering)
+ return EOL;*/
+ /* pthread_mutex_lock(client_OUTPUT_MUTEX(client));
+ conn_write(client_CONN(client), sync_reply, sizeof(sync_reply) - 1);
+ conn_flush(client_CONN(client));
+ pthread_mutex_unlock(client_OUTPUT_MUTEX(client));*/
+ }
+
+ lvalp->str = NULL;
+ result = string_allocate(count, NULL, &lvalp->str);
+ if (result != SIEVE_OK)
+ ERR_PUSHBACK();
+
+ /* there is a literal string on the wire. let's read it */
+ {
+ char *it = string_DATAPTR(lvalp->str),
+ *end = it + count;
+
+ while (it < end) {
+ *it=prot_getc(stream);
+ it++;
+ }
+ }
+ lexer_state=LEXER_STATE_NORMAL;
+ return STRING;
+ case LEXER_STATE_NUMBER:
+ if (('0' <= ch) && (ch <= '9')) {
+ unsigned long newcount = count * 10 + (ch - '0');
+
+ if (newcount < count)
+ ERR_PUSHBACK(); /* overflow */
+ count = newcount;
+ } else {
+ lvalp->number = count;
+ lexer_state=LEXER_STATE_NORMAL;
+ prot_ungetc(ch, stream);
+ return NUMBER;
+ }
+ break;
+ case LEXER_STATE_NORMAL:
+ if (isalpha((unsigned char) ch)) {
+ lexer_state=LEXER_STATE_ATOM;
+ *buff_ptr++ = tolower(ch);
+ break;
+ }
+ switch (ch) {
+ case '(':
+ return '(';
+ case ')':
+ return ')';
+ case ' ':
+ return ' ';
+ case '\"':
+ lexer_state=LEXER_STATE_QSTR;
+ break;
+ case '*':
+ return '*';
+ case '0': /* fall through all numbers */
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ count = ch - '0';
+ lexer_state=LEXER_STATE_NUMBER;
+ break;
+ case '{':
+ count = 0;
+ synchronizing = TRUE;
+ lexer_state=LEXER_STATE_LITERAL;
+ break;
+ case '\r':
+ lexer_state=LEXER_STATE_CR;
+ break;
+ case '\n':
+ lexer_state=LEXER_STATE_NORMAL;
+ return EOL;
+ break;
+ default:
+ ERR_PUSHBACK();
+ }
+ break;
+ case LEXER_STATE_ATOM:
+ if (!isalpha((unsigned char) ch)) {
+ int token;
+
+ buffer[ buff_ptr - buffer] = '\0';
+
+ /* We've got the atom. */
+ token = token_lookup((char *) buffer, (int) (buff_ptr - buffer));
+
+ if (token!=-1) {
+ lexer_state=LEXER_STATE_NORMAL;
+ prot_ungetc(ch, stream);
+
+ return token;
+ } else
+ ERR_PUSHBACK();
+ }
+ if (buff_end <= buff_ptr)
+ ERR_PUSHBACK(); /* atom too long */
+ *buff_ptr++ = tolower(ch);
+ break;
+ }
+
+
+
+ } /* while (1) */
+
+ return 0;
+}
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/lex.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+/* lex.h
+ * Tim Martin
+ * 9/21/99
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: lex.h,v 1.8 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#ifndef _LEX_H_
+#define _LEX_H_
+
+#include "mystring.h"
+
+typedef struct lexstate_s {
+ mystring_t *str;
+ int number;
+
+} lexstate_t;
+
+int yylex(lexstate_t * lvalp, void * client);
+
+#define TAG 258
+#define EOL 259
+#define STRING 260
+#define NUMBER 261
+
+#define TOKEN_OK 280
+#define TOKEN_NO 281
+#define TOKEN_ACTIVE 282
+
+
+#define LEXER_STATE_TAG 60
+#define LEXER_STATE_RECOVER 61
+#define LEXER_STATE_RECOVER_CR 62
+#define LEXER_STATE_CR 63
+#define LEXER_STATE_QSTR 64
+#define LEXER_STATE_LITERAL 65
+#define LEXER_STATE_NUMBER 66
+#define LEXER_STATE_NORMAL 67
+#define LEXER_STATE_ATOM 68
+
+
+
+#endif /* _LEX_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,214 @@
+/* mystring.c -- string utility
+ * Tim Martin
+ * 9/21/99
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mystring.c,v 1.6 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#include "mystring.h"
+
+#include "codes.h"
+
+#include <stdlib.h>
+
+#include <strings.h>
+
+int string_allocate(int length,
+ const char *buf, /* NULL => no copy */
+ mystring_t ** str)
+{
+ *str=(mystring_t *) malloc(sizeof(mystring_t)+length+1);
+
+ (*str)->len=length;
+
+ if (buf==NULL) return SIEVE_OK;
+
+ /* copy the data into the string object */
+ memcpy(((char *)(*str))+sizeof(mystring_t), buf, length);
+ ((char *) (*str))[sizeof(mystring_t)+length]='\0';
+
+ return SIEVE_OK;
+}
+
+
+int string_copy(mystring_t *oldstr,
+ mystring_t **newstr)
+{
+ int result;
+
+
+ result=string_allocate(oldstr->len,
+ string_DATAPTR(oldstr),
+ newstr);
+
+ return result;
+}
+
+
+void string_free(mystring_t **str)
+{
+ free(*str);
+}
+
+
+int string_compare(mystring_t *str1, mystring_t *str2)
+{
+ char *data1;
+ char *data2;
+ int lup;
+
+ if (str1->len!=str2->len) return SIEVE_FAIL;
+
+ data1=string_DATAPTR(str1);
+ data2=string_DATAPTR(str2);
+
+ for (lup=0;lup<str1->len;lup++)
+ if (data1[lup]!=data2[lup])
+ return SIEVE_FAIL;
+
+ return SIEVE_OK;
+}
+
+int string_compare_with(mystring_t *str1, mystring_t *str2, mystring_t *comp)
+{
+ char *data1;
+ char *data2;
+ int lup;
+
+ int len1=str1->len;
+ int len2=str2->len;
+
+ int low=len1;
+ if (len2<len1)
+ low=len2;
+
+ /* printf("comparing %s and %s\n",string_DATAPTR(str1),
+ string_DATAPTR(str2));*/
+
+ data1=string_DATAPTR(str1);
+ data2=string_DATAPTR(str2);
+
+ for (lup=0;lup<low;lup++)
+ if (data1[lup]<data2[lup])
+ {
+ return -1;
+ } else if (data1[lup]>data2[lup]) {
+ return 1;
+ } else {
+ /* continue */
+ }
+
+ if (len1==len2) return 0;
+
+ if (len1<len2)
+ return -1;
+
+ return 1;
+}
+
+int string_comparestr(mystring_t *str1, char *str2)
+{
+ int str2len=strlen(str2);
+ char *data1;
+ char *data2;
+ int lup;
+
+ if (str1->len!=str2len) return SIEVE_FAIL;
+
+ data1=string_DATAPTR(str1);
+ data2=str2;
+
+ for (lup=0;lup<str1->len;lup++)
+ if (data1[lup]!=data2[lup])
+ return SIEVE_FAIL;
+
+ return SIEVE_OK;
+}
+/*
+eq_result_t
+string_equal_cstr(const mystring_t * str, const char *cstr)
+{
+ int len;
+
+ I(str);
+ I(cstr);
+
+ len = strlen(cstr);
+ if (len != str->len)
+ return EQ_NOT_EQUAL;
+
+ if (memcmp(string_DATAPTR(str), cstr, len)==0)
+ return EQ_IS_EQUAL;
+
+
+ return EQ_NOT_EQUAL;
+}
+*/
+
+int safe_to_use_quoted(char *str, int len)
+{
+ char *end=str+len;
+
+ if (len > 4096)
+ return FALSE;
+
+ while (str < end) {
+ if (*str == '\0' /* check illegal chars... */
+ || *str == '\r'
+ || *str == '\n'
+
+#ifdef __CHAR_UNSIGNED__
+ || 0x7F < *str
+#else
+ || *str < 0
+#endif
+
+ )
+ return FALSE;
+ if (*str == '\"' /* check len, with \ escapes... */
+ || *str == '\\')
+ if (4096 < ++len)
+ return FALSE;
+ ++str;
+ }
+ return TRUE;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/mystring.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+/* mystring.h
+ * Tim Martin
+ * 9/21/99
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: mystring.h,v 1.6 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#include "codes.h"
+
+
+#ifndef INCLUDED_MYSTRING_H
+#define INCLUDED_MYSTRING_H
+
+typedef struct {
+ int len;
+ /* Data immediately following... */
+} mystring_t;
+
+
+int string_allocate(int length,
+ const char *buf, /* NULL => no copy */
+ mystring_t ** str);
+
+int string_copy(mystring_t *oldstr,
+ mystring_t **newstr);
+
+void string_free(mystring_t **str);
+
+int string_compare(mystring_t *str1, mystring_t *str2);
+
+int string_comparestr(mystring_t *str1, char *str2);
+
+int string_compare_with(mystring_t *str1, mystring_t *str2, mystring_t *comp);
+
+/*eq_result_t
+ string_equal_cstr(const mystring_t * str, const char *cstr);*/
+
+#define string_DATAPTR(s) (((char *) s)+sizeof(mystring_t))
+
+int safe_to_use_quoted(char *str, int len);
+
+
+#endif /* INCLUDED_MYSTRING_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,547 @@
+/* request.c -- request to execute functions on the timsieved server
+ * Tim Martin
+ * 9/21/99
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: request.c,v 1.19 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <sys/file.h>
+
+#include "request.h"
+
+#include "prot.h"
+#include "lex.h"
+#include "xmalloc.h"
+
+#define BLOCKSIZE 1024
+
+void parseerror(char *str)
+{
+ printf("Parse error:\n");
+
+ printf("client expected %s\n",str);
+ printf("exiting\n");
+
+ exit(2);
+}
+
+int handle_response(int res,int version,struct protstream *pin, mystring_t **errstr)
+{
+ lexstate_t state;
+
+ if ((res!=TOKEN_OK) && (res!=TOKEN_NO))
+ parseerror("ATOM");
+
+ if (res==TOKEN_NO) {
+
+ if (yylex(&state, pin)!=' ')
+ parseerror("expected space\n");
+
+ res = yylex(&state, pin);
+
+ /* additional error response */
+ if (res == '(') {
+ /* '(' string [SP string] ')' */
+
+ if (yylex(&state, pin)!=STRING)
+ parseerror("expected string\n");
+
+ if (strcmp(string_DATAPTR(state.str),"SASL")==0) {
+ if (yylex(&state, pin)!=' ')
+ parseerror("expected space\n");
+ if (yylex(&state, pin)!=STRING)
+ parseerror("expected string\n");
+ }
+
+ if (yylex(&state, pin)!=')')
+ parseerror("expected RPAREN\n");
+
+ res = yylex(&state, pin);
+ }
+
+ if (res !=' ')
+ parseerror("expected sp\n");
+
+ if (yylex(&state, pin)!=STRING)
+ parseerror("expected string\n");
+
+
+ if (errstr)
+ *errstr = state.str;
+
+ return -1;
+ }
+
+ /* old version of protocol had strings with ok responses too */
+ if (version == OLD_VERSION) {
+ if (yylex(&state, pin)!=' ')
+ parseerror("expected sp\n");
+
+ if (yylex(&state, pin)!=STRING)
+ parseerror("expected string\n");
+ }
+
+ if (yylex(&state, pin)!=EOL)
+ parseerror("expected string\n");
+
+ return 0;
+}
+
+int deleteascript(int version, struct protstream *pout, struct protstream *pin,char *name)
+{
+ lexstate_t state;
+ int res;
+ int ret;
+ mystring_t *errstr;
+
+ prot_printf(pout,"DELETESCRIPT \"%s\"\r\n",name);
+ prot_flush(pout);
+
+ res=yylex(&state, pin);
+
+ ret = handle_response(res,version,pin,&errstr);
+
+ if (ret!=0)
+ {
+ printf("Deletescript error: %s\n",string_DATAPTR(errstr));
+ return -1;
+ }
+
+ printf("Script %s deleted successfully\n",name);
+ return 0;
+}
+
+int installdata(int version,struct protstream *pout, struct protstream *pin,
+ char *scriptname, char *data, int len)
+{
+ int res;
+ int ret;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+
+ prot_printf(pout, "PUTSCRIPT \"%s\" ",scriptname);
+
+ prot_printf(pout, "{%d+}\r\n",len);
+
+ prot_write(pout, data, len);
+
+ prot_printf(pout,"\r\n");
+ prot_flush(pout);
+
+ /* now let's see what the server said */
+ res=yylex(&state,pin);
+
+ ret = handle_response(res,version,pin,&errstr);
+
+ /* if command failed */
+ if (ret!=0)
+ {
+ printf("Putting script failed with message: %s\n",string_DATAPTR(errstr));
+
+ return -1;
+ }
+
+ return setscriptactive(version,pout,pin,scriptname);
+}
+
+static char *getsievename(char *filename)
+{
+ char *ret, *ptr;
+
+ ret=(char *) xmalloc( strlen(filename) + 2);
+
+ /* just take the basename of the file */
+ ptr = strrchr(filename, '/');
+ if (ptr == NULL) {
+ ptr = filename;
+ } else {
+ ptr++;
+ }
+
+ strcpy(ret, ptr);
+
+ if ( strcmp( ret + strlen(ret) - 7,".script")==0)
+ {
+ ret[ strlen(ret) - 7] = '\0';
+ }
+
+ return ret;
+}
+
+
+int installafile(int version,struct protstream *pout, struct protstream *pin,char *filename)
+{
+ FILE *stream;
+ struct stat filestats; /* returned by stat */
+ int size; /* size of the file */
+ int result;
+ int cnt;
+ int res;
+ int ret;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+ char *sievename;
+
+ sievename=getsievename(filename);
+
+ result=stat(filename,&filestats);
+
+ if (result!=0)
+ {
+ perror("stat");
+ return -1;
+ }
+
+ size=filestats.st_size;
+
+ stream=fopen(filename, "r");
+
+ if (stream==NULL)
+ {
+ printf("Couldn't open file\n");
+ return -1;
+ }
+
+ prot_printf(pout, "PUTSCRIPT \"%s\" ",sievename);
+
+ prot_printf(pout, "{%d+}\r\n",size);
+
+ cnt=0;
+
+ while (cnt < size)
+ {
+ char buf[BLOCKSIZE];
+ int amount=BLOCKSIZE;
+
+ if (size-cnt < BLOCKSIZE)
+ amount=size-cnt;
+
+ fread(buf, 1, BLOCKSIZE, stream);
+
+ prot_write(pout, buf, amount);
+
+ cnt+=amount;
+ }
+
+ prot_printf(pout,"\r\n");
+ prot_flush(pout);
+
+ /* now let's see what the server said */
+ res=yylex(&state,pin);
+
+ ret = handle_response(res,version,pin,&errstr);
+
+ /* if command failed */
+ if (ret!=0)
+ {
+ printf("Putting script failed with message: %s\n",string_DATAPTR(errstr));
+ return -1;
+ }
+
+ return setscriptactive(version,pout,pin,sievename);
+}
+
+
+
+int showlist(int version, struct protstream *pout, struct protstream *pin)
+{
+ lexstate_t state;
+ int end=0;
+ int res;
+ int ret = 0;
+
+ printf("You have the following scripts on the server:\n");
+
+ prot_printf(pout, "LISTSCRIPTS\r\n");
+ prot_flush(pout);
+
+ do {
+
+ if ((res=yylex(&state, pin))==STRING)
+ {
+ char *str=string_DATAPTR(state.str);
+
+ if (yylex(&state, pin)==' ')
+ {
+ if (yylex(&state, pin)!=TOKEN_ACTIVE)
+ printf("Expected ACTIVE\n");
+ if (yylex(&state, pin)!=EOL)
+ printf("Expected EOL\n");
+
+ printf(" %s <- Active Sieve Script\n",str);
+ } else {
+
+ /* in old version we had that '*' means active script thing */
+ if (version == OLD_VERSION) {
+
+ if (str[strlen(str)-1]=='*') {
+ str[strlen(str)-1]='\0';
+ printf(" %s <- Active Sieve Script\n",str);
+ } else {
+ printf(" %s\n",str);
+ }
+
+ } else { /* NEW_VERSION */
+ /* assume it's a EOL */
+ printf(" %s\n",str);
+ }
+ }
+
+ } else {
+
+ ret = handle_response(res,version,pin,NULL);
+
+ end=1;
+ }
+
+
+
+ } while (end==0);
+
+ return ret;
+}
+
+int list_wcb(int version, struct protstream *pout, struct protstream *pin,isieve_listcb_t *cb ,void *rock)
+{
+ lexstate_t state;
+ int end=0;
+ int res;
+ int ret = 0;
+
+ printf("You have the following scripts on the server:\n");
+
+ prot_printf(pout, "LISTSCRIPTS\r\n");
+ prot_flush(pout);
+
+ do {
+
+ if ((res=yylex(&state, pin))==STRING)
+ {
+ char *str=string_DATAPTR(state.str);
+
+ if (yylex(&state, pin)==' ')
+ {
+ if (yylex(&state, pin)!=TOKEN_ACTIVE)
+ printf("Expected ACTIVE\n");
+ if (yylex(&state, pin)!=EOL)
+ printf("Expected EOL\n");
+
+ cb(str, 1, rock);
+ } else {
+
+ /* in old version we had that '*' means active script thing */
+ if (version == OLD_VERSION) {
+
+ if (str[strlen(str)-1]=='*') {
+ str[strlen(str)-1]='\0';
+ cb(str, 1, rock);
+ } else {
+ cb(str, 0, rock);
+ }
+
+ } else { /* NEW_VERSION */
+ /* assume it's a EOL */
+ cb(str, 0, rock);
+ }
+ }
+
+ } else {
+
+ ret = handle_response(res,version,pin,NULL);
+
+ end=1;
+ }
+
+
+
+ } while (end==0);
+
+ return ret;
+}
+
+int setscriptactive(int version, struct protstream *pout, struct protstream *pin,char *name)
+{
+ lexstate_t state;
+ int res;
+ int ret;
+ mystring_t *errstr=NULL;
+
+ /* tell server we want "name" to be the active script */
+ prot_printf(pout, "SETACTIVE \"%s\"\r\n",name);
+ prot_flush(pout);
+
+
+ /* now let's see what the server said */
+ res=yylex(&state, pin);
+
+ ret = handle_response(res,version,pin, &errstr);
+
+ /* if command failed */
+ if (ret!=0)
+ {
+ if (!strlen(name))
+ printf("Disabling active script failed with message: %s\n", string_DATAPTR(errstr));
+ else
+ printf("Setting script %s active failed with message: %s\n",name, string_DATAPTR(errstr));
+ return -1;
+ }
+
+ return 0;
+}
+
+static int viewafile(mystring_t *data, char *name)
+{
+ printf("%s\r\n", string_DATAPTR(data));
+
+ return 0;
+}
+
+static int writefile(mystring_t *data, char *name)
+{
+ FILE *stream;
+
+ char *scrname;
+
+ scrname=malloc(strlen(name)+10);
+ strcpy(scrname, name);
+ strcat(scrname, ".script");
+
+ stream=fopen(scrname,"w");
+
+ if (stream==NULL)
+ {
+ printf("Unable to open %s for writing\n",name);
+ return -1;
+ }
+
+ fwrite(string_DATAPTR(data), 1, data->len, stream);
+
+ fclose(stream);
+
+ return 0;
+}
+
+int getscript(int version, struct protstream *pout,
+ struct protstream *pin,char *name, int save)
+{
+ int res;
+ mystring_t *str=NULL;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+ int ret = 0;
+
+ prot_printf(pout,"GETSCRIPT \"%s\"\r\n",name);
+ prot_flush(pout);
+
+ res=yylex(&state,pin);
+
+ if (res==STRING)
+ {
+
+ if (save==1)
+ writefile(state.str, name);
+ else
+ viewafile(state.str, name);
+
+ if (yylex(&state, pin)!=EOL)
+ parseerror("EOL");
+
+ res=yylex(&state,pin);
+ }
+
+ ret = handle_response(res,version,pin, &errstr);
+
+ /* if command failed */
+ if (ret!=0)
+ {
+ printf("Getting script %s active failed with message: %s\n",name, string_DATAPTR(str));
+ }
+
+ return ret;
+
+}
+
+
+int getscriptvalue(int version, struct protstream *pout,
+ struct protstream *pin,char *name, mystring_t **data)
+{
+ int res;
+ int ret;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+
+ prot_printf(pout,"GETSCRIPT \"%s\"\r\n",name);
+ prot_flush(pout);
+
+ res=yylex(&state,pin);
+
+ if (res==STRING)
+ {
+ *data=state.str;
+
+ if (yylex(&state, pin)!=EOL)
+ parseerror("EOL");
+
+ res=yylex(&state,pin);
+ }
+
+ ret = handle_response(res,version,pin, &errstr);
+
+ /* if command failed */
+ if (ret!=0)
+ {
+ printf("Getting script %s active failed with message: %s\n",name, string_DATAPTR(errstr));
+ return -1;
+ }
+
+ return 0;
+
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/installsieve/request.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,90 @@
+/* request.h -- request to execute functions on the timsieved server
+ * Tim Martin
+ * 9/21/99
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: request.h,v 1.13 2003/02/13 20:15:37 rjs3 Exp $ */
+
+#ifndef _REQUEST_H_
+#define _REQUEST_H_
+
+#include "prot.h"
+#include "mystring.h"
+#include "isieve.h"
+
+/* old and new versions of the protocol */
+#define OLD_VERSION 4
+#define NEW_VERSION 5
+#define ACAP_VERSION 6
+
+int handle_response(int res,int version,struct protstream *pin, mystring_t **errstr);
+
+int deleteascript(int version,struct protstream *pout, struct protstream *pin,
+ char *name);
+
+int installafile(int version,struct protstream *pout, struct protstream *pin,
+ char *filename);
+
+int installdata(int version,struct protstream *pout, struct protstream *pin,
+ char *scriptname, char *data, int len);
+
+int showlist(int version, struct protstream *pout, struct protstream *pin);
+
+int list_wcb(int version, struct protstream *pout, struct protstream *pin,isieve_listcb_t *cb ,void *rock);
+
+int setscriptactive(int version,struct protstream *pout, struct protstream *pin,
+ char *name);
+
+/*
+ * Getscript. Save {0,1} wheather to save to disk or display on screen
+ */
+
+int getscript(int version, struct protstream *pout, struct protstream *pin,
+ char *name, int save);
+
+int getscriptvalue(int version,struct protstream *pout, struct protstream *pin,
+ char *name, mystring_t **data);
+
+void parseerror(char *str);
+
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Makefile
+makedepend.log
+chartable.c
+imapopts.c
+imapopts.h
+mkchartable
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,104 @@
+/.cvsignore/1.2/Wed Oct 22 18:03:03 2003//Tcyrus-release-2-3-7
+/Makefile.dist/1.2/Wed Oct 22 18:03:03 2003//Tcyrus-release-2-3-7
+/Makefile.in/1.55.2.9/Fri Mar 17 17:29:40 2006//Tcyrus-release-2-3-7
+/acl.c/1.10.4.1/Tue Dec 13 19:36:10 2005//Tcyrus-release-2-3-7
+/acl.h/1.14.4.2/Thu May 18 18:04:52 2006//Tcyrus-release-2-3-7
+/acl_afs.c/1.22.4.3/Thu Apr 13 18:33:22 2006//Tcyrus-release-2-3-7
+/assert.c/1.18/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/assert.h/1.10/Thu Feb 13 20:15:38 2003//Tcyrus-release-2-3-7
+/auth.c/1.1.2.1/Wed Feb 16 21:06:50 2005//Tcyrus-release-2-3-7
+/auth.h/1.15.2.1/Wed Feb 16 21:06:50 2005//Tcyrus-release-2-3-7
+/auth_krb.c/1.39.2.3/Wed Dec 14 13:52:09 2005//Tcyrus-release-2-3-7
+/auth_krb5.c/1.2.2.2/Wed Feb 16 21:06:50 2005//Tcyrus-release-2-3-7
+/auth_pts.c/1.2.2.7/Fri Mar 17 16:05:15 2006//Tcyrus-release-2-3-7
+/auth_pts.h/1.2.2.1/Tue Dec 13 13:35:06 2005//Tcyrus-release-2-3-7
+/auth_unix.c/1.37.2.2/Wed Feb 16 21:06:50 2005//Tcyrus-release-2-3-7
+/bsearch.c/1.19/Thu Feb 13 20:15:39 2003//Tcyrus-release-2-3-7
+/bsearch.h/1.7/Thu Feb 13 20:15:39 2003//Tcyrus-release-2-3-7
+/byteorder64.c/1.1.2.1/Mon Aug 9 18:51:21 2004//Tcyrus-release-2-3-7
+/byteorder64.h/1.1.2.2/Mon Aug 16 11:44:34 2004//Tcyrus-release-2-3-7
+/charset.c/1.44.2.3/Wed Jun 14 11:53:36 2006//Tcyrus-release-2-3-7
+/charset.h/1.19.2.1/Thu Mar 9 22:39:38 2006//Tcyrus-release-2-3-7
+/chartable.h/1.5/Thu Feb 13 20:15:39 2003//Tcyrus-release-2-3-7
+/cyrusdb.c/1.5.2.8/Wed Jan 4 02:14:14 2006//Tcyrus-release-2-3-7
+/cyrusdb.h/1.25.2.4/Wed Jan 4 02:14:14 2006//Tcyrus-release-2-3-7
+/cyrusdb_berkeley.c/1.2.2.12/Tue Feb 28 12:58:07 2006//Tcyrus-release-2-3-7
+/cyrusdb_flat.c/1.31.2.3/Wed Mar 24 19:53:14 2004//Tcyrus-release-2-3-7
+/cyrusdb_quotalegacy.c/1.1.2.9/Wed Apr 20 18:47:48 2005//Tcyrus-release-2-3-7
+/cyrusdb_skiplist.c/1.42.2.3/Wed Jun 9 19:42:47 2004//Tcyrus-release-2-3-7
+/exitcodes.h/1.5/Thu Feb 13 20:15:39 2003//Tcyrus-release-2-3-7
+/ftruncate.c/1.8/Thu Feb 13 20:15:39 2003//Tcyrus-release-2-3-7
+/gai.h/1.6/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/getaddrinfo.c/1.6/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/getdtablesize.c/1.7/Thu Feb 13 20:15:40 2003//Tcyrus-release-2-3-7
+/getnameinfo.c/1.6/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/glob.c/1.25.4.1/Fri Dec 19 18:33:42 2003//Tcyrus-release-2-3-7
+/glob.h/1.12/Thu Feb 13 20:15:40 2003//Tcyrus-release-2-3-7
+/gmtoff.h/1.6/Thu Feb 13 20:15:40 2003//Tcyrus-release-2-3-7
+/gmtoff_gmtime.c/1.11/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/gmtoff_tm.c/1.9.2.1/Fri Feb 27 21:17:39 2004//Tcyrus-release-2-3-7
+/hash.c/1.11.2.1/Tue May 25 01:28:14 2004//Tcyrus-release-2-3-7
+/hash.h/1.9/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/hmac-md5.h/1.1.2.1/Mon Feb 21 19:25:52 2005//Tcyrus-release-2-3-7
+/imapoptions/1.2.2.47/Tue Jun 27 15:58:42 2006//Tcyrus-release-2-3-7
+/imapurl.c/1.10.4.4/Thu Nov 17 15:46:30 2005//Tcyrus-release-2-3-7
+/imapurl.h/1.5.4.2/Thu Nov 17 15:46:30 2005//Tcyrus-release-2-3-7
+/imclient.c/1.84.2.2/Fri Oct 28 14:51:22 2005//Tcyrus-release-2-3-7
+/imclient.h/1.26.2.1/Mon Apr 11 05:48:05 2005//Tcyrus-release-2-3-7
+/imparse.c/1.12/Thu Feb 13 20:15:40 2003//Tcyrus-release-2-3-7
+/imparse.h/1.7/Thu Feb 13 20:15:40 2003//Tcyrus-release-2-3-7
+/iptostring.c/1.5.4.2/Wed Mar 24 19:53:15 2004//Tcyrus-release-2-3-7
+/iptostring.h/1.3/Thu Feb 13 20:15:40 2003//Tcyrus-release-2-3-7
+/libconfig.c/1.2.2.15/Sun Feb 20 05:22:29 2005//Tcyrus-release-2-3-7
+/libconfig.h/1.2.2.8/Sun Feb 20 03:23:45 2005//Tcyrus-release-2-3-7
+/libcyr_cfg.c/1.2.2.12/Tue Dec 13 19:36:12 2005//Tcyrus-release-2-3-7
+/libcyr_cfg.h/1.2.2.9/Tue Dec 13 19:36:12 2005//Tcyrus-release-2-3-7
+/lock.h/1.7/Thu Feb 13 20:15:40 2003//Tcyrus-release-2-3-7
+/lock_fcntl.c/1.16/Thu Feb 13 20:15:40 2003//Tcyrus-release-2-3-7
+/lock_flock.c/1.15/Thu Feb 13 20:15:41 2003//Tcyrus-release-2-3-7
+/lsort.c/1.2/Sat May 25 19:57:47 2002//Tcyrus-release-2-3-7
+/lsort.h/1.2/Sat May 25 19:57:47 2002//Tcyrus-release-2-3-7
+/map.h/1.12/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/map_nommap.c/1.23/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/map_shared.c/1.21/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/map_stupidshared.c/1.14/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/md5.c/1.1.2.1/Mon Feb 21 19:25:53 2005//Tcyrus-release-2-3-7
+/md5.h/1.1.2.1/Mon Feb 21 19:25:54 2005//Tcyrus-release-2-3-7
+/md5global.h/1.1.2.1/Mon Feb 21 19:25:54 2005//Tcyrus-release-2-3-7
+/memmove.c/1.8/Thu Feb 13 20:15:41 2003//Tcyrus-release-2-3-7
+/message_uuid.c/1.1.2.1/Mon Feb 21 19:25:54 2005//Tcyrus-release-2-3-7
+/message_uuid.h/1.1.2.1/Mon Feb 21 19:25:54 2005//Tcyrus-release-2-3-7
+/mkchartable.c/1.25/Wed May 14 18:56:34 2003//Tcyrus-release-2-3-7
+/mkgmtime.c/1.10/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/mkgmtime.h/1.5/Thu Feb 13 20:15:41 2003//Tcyrus-release-2-3-7
+/mpool.c/1.14.2.1/Mon Jan 16 15:39:09 2006//Tcyrus-release-2-3-7
+/mpool.h/1.10.2.1/Mon Jan 16 15:39:09 2006//Tcyrus-release-2-3-7
+/nonblock.h/1.8/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/nonblock_fcntl.c/1.15/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/nonblock_ioctl.c/1.11/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/parseaddr.c/1.17/Thu Feb 13 20:15:41 2003//Tcyrus-release-2-3-7
+/parseaddr.h/1.8/Thu Feb 13 20:15:41 2003//Tcyrus-release-2-3-7
+/prot.c/1.82.2.13/Mon Mar 13 20:05:04 2006//Tcyrus-release-2-3-7
+/prot.h/1.40.2.5/Wed Feb 1 19:25:42 2006//Tcyrus-release-2-3-7
+/retry.c/1.21.2.1/Thu Jan 15 20:24:38 2004//Tcyrus-release-2-3-7
+/retry.h/1.12/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/rfc822date.c/1.6/Wed Oct 22 18:50:12 2003//Tcyrus-release-2-3-7
+/rfc822date.h/1.3/Thu Feb 13 20:15:42 2003//Tcyrus-release-2-3-7
+/strcasecmp.c/1.6/Thu Feb 13 20:15:42 2003//Tcyrus-release-2-3-7
+/strerror.c/1.6/Thu Feb 13 20:15:42 2003//Tcyrus-release-2-3-7
+/strhash.c/1.2/Wed Oct 22 18:03:05 2003//Tcyrus-release-2-3-7
+/strhash.h/1.2/Wed Oct 22 18:03:05 2003//Tcyrus-release-2-3-7
+/stristr.c/1.3/Sat May 25 19:57:47 2002//Tcyrus-release-2-3-7
+/stristr.h/1.2/Sat May 25 19:57:47 2002//Tcyrus-release-2-3-7
+/sysexits.h/1.4/Thu Feb 13 20:15:42 2003//Tcyrus-release-2-3-7
+/util.c/1.27.2.3/Thu Sep 9 18:47:11 2004//Tcyrus-release-2-3-7
+/util.h/1.17.2.1/Fri Sep 10 13:51:12 2004//Tcyrus-release-2-3-7
+/wildmat.c/1.2/Wed Oct 22 18:03:05 2003//Tcyrus-release-2-3-7
+/wildmat.h/1.2/Wed Oct 22 18:03:05 2003//Tcyrus-release-2-3-7
+/xmalloc.c/1.29.4.1/Fri Mar 17 17:29:41 2006//Tcyrus-release-2-3-7
+/xmalloc.h/1.25.2.1/Fri Mar 17 17:29:41 2006//Tcyrus-release-2-3-7
+/xstrlcat.c/1.1.2.2/Wed Mar 22 21:38:48 2006//Tcyrus-release-2-3-7
+/xstrlcat.h/1.1.2.2/Wed Mar 22 21:38:48 2006//Tcyrus-release-2-3-7
+/xstrlcpy.c/1.1.2.2/Wed Mar 22 21:38:49 2006//Tcyrus-release-2-3-7
+/xstrlcpy.h/1.1.2.2/Wed Mar 22 21:38:49 2006//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+A D/charset////
+A D/test////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/lib
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.dist
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.dist?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.dist (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.dist Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+# $Id: Makefile.dist,v 1.2 2003/10/22 18:03:03 rjs3 Exp $
+# it would be nice to figure out how to make "Makefile" do an
+# 'include' of this file.
+
+BUILT_SOURCES = imapopts.c imapopts.h
+
+dist: $(BUILT_SOURCES)
+
+imapopts.c imapopts.h: imapoptions ../tools/config2header
+ ../tools/config2header imapopts.c imapopts.h < imapoptions
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,168 @@
+# Makefile for cyrus library
+#
+# @configure_input@
+#
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+# $Id: Makefile.in,v 1.55.2.9 2006/03/17 17:29:40 murch Exp $
+
+# Authorization namespace.
+AUTH=auth.o auth_krb.o auth_unix.o auth_krb5.o auth_pts.o
+
+# ACL interpretation. Only one choice for now:
+ACL=acl_afs.o
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@ @LOCALDEFS@
+CPPFLAGS = -I.. @CPPFLAGS@ @COM_ERR_CPPFLAGS@ @SASLFLAGS@
+LIBS = @LIBS@
+
+MAKEDEPEND_CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@
+LDFLAGS = @LDFLAGS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+
+libdir = @libdir@
+
+BUILTSOURCES = imapopts.h imapopts.c
+
+LIBCYR_HDRS = $(srcdir)/acl.h $(srcdir)/assert.h $(srcdir)/auth.h \
+ $(srcdir)/bsearch.h $(srcdir)/charset.h $(srcdir)/glob.h \
+ $(srcdir)/gmtoff.h $(srcdir)/imclient.h $(srcdir)/imparse.h \
+ $(srcdir)/lock.h $(srcdir)/map.h $(srcdir)/mkgmtime.h \
+ $(srcdir)/nonblock.h $(srcdir)/parseaddr.h $(srcdir)/prot.h \
+ $(srcdir)/retry.h $(srcdir)/sysexits.h $(srcdir)/strhash.h \
+ $(srcdir)/lsort.h $(srcdir)/stristr.h \
+ $(srcdir)/util.h $(srcdir)/xstrlcpy.h $(srcdir)/xstrlcat.h $(srcdir)/xmalloc.h $(srcdir)/imapurl.h \
+ $(srcdir)/cyrusdb.h $(srcdir)/iptostring.h $(srcdir)/rfc822date.h \
+ $(srcdir)/libcyr_cfg.h $(srcdir)/byteorder64.h \
+ $(srcdir)/message_uuid.h $(srcdir)/md5.h $(srcdir)/hmac-md5.h
+
+LIBCYR_OBJS = acl.o bsearch.o charset.o glob.o retry.o util.o \
+ libcyr_cfg.o mkgmtime.o prot.o parseaddr.o imclient.o imparse.o \
+ lsort.o stristr.o rfc822date.o cyrusdb.o strhash.o \
+ chartable.o imapurl.o nonblock_ at WITH_NONBLOCK@.o lock_ at WITH_LOCK@.o \
+ gmtoff_ at WITH_GMTOFF@.o map_ at WITH_MAP@.o $(ACL) $(AUTH) \
+ @LIBOBJS@ @CYRUSDB_OBJS@ @MD5OBJ@ \
+ iptostring.o xmalloc.o wildmat.o byteorder64.o \
+ message_uuid.o xstrlcat.o xstrlcpy.o
+
+LIBCYRM_HDRS = $(srcdir)/hash.h $(srcdir)/mpool.h $(srcdir)/xmalloc.h \
+ $(srcdir)/xstrlcat.h $(srcdir)/xstrlcpy.h \
+ $(srcdir)/strhash.o $(srcdir)/libconfig.h $(srcdir)/assert.h \
+ imapopts.h
+LIBCYRM_OBJS = libconfig.o imapopts.o hash.o mpool.o xmalloc.o strhash.o \
+ xstrlcat.o xstrlcpy.o assert.o @IPV6_OBJS@
+
+all: $(BUILTSOURCES) libcyrus_min.a libcyrus.a
+
+install:
+ $(srcdir)/../install-sh -d $(DESTDIR)$(libdir)
+ $(INSTALL) -m 644 libcyrus.a $(DESTDIR)$(libdir)
+ $(INSTALL) -m 644 libcyrus_min.a $(DESTDIR)$(libdir)
+ $(RANLIB) $(DESTDIR)$(libdir)/libcyrus.a
+ for file in $(LIBCYR_HDRS); \
+ do \
+ $(INSTALL) -m 644 $$file $(DESTDIR)$(prefix)/include/cyrus || exit 1; \
+ done
+ for file in $(LIBCYRM_HDRS); \
+ do \
+ $(INSTALL) -m 644 $$file $(DESTDIR)$(prefix)/include/cyrus || exit 1; \
+ done
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ $<
+
+libcyrus.a: $(LIBCYR_OBJS)
+ rm -f libcyrus.a
+ ar cr libcyrus.a $(LIBCYR_OBJS)
+ $(RANLIB) libcyrus.a
+
+libcyrus_min.a: $(LIBCYRM_OBJS)
+ rm -f libcyrus_min.a
+ ar cr libcyrus_min.a $(LIBCYRM_OBJS)
+ $(RANLIB) libcyrus_min.a
+
+imapopts.c: imapoptions $(srcdir)/../tools/config2header
+ $(srcdir)/../tools/config2header CC=$(CC) $(srcdir)/imapopts.c $(srcdir)/imapopts.h < $(srcdir)/imapoptions
+
+imapopts.h: imapopts.c
+
+chartable.c: mkchartable
+ @echo "### Building chartables..."
+ rm -f chartable.c
+ ./mkchartable \
+ -m $(srcdir)/charset/unifix.txt \
+ -m $(srcdir)/charset/unidata2.txt \
+ $(srcdir)/charset/*.t \
+ > chartable.c \
+ || (rm -f chartable.c && exit 1)
+ @echo "### Done building chartables."
+# ./mkchartable -m $(srcdir)/charset/unicode.map $(srcdir)/charset/*.t >x-chartables.h
+# mv x-chartables.h chartables.h
+
+mkchartable: mkchartable.o xstrlcpy.o xstrlcat.o xmalloc.o assert.o
+ $(CC) $(LDFLAGS) -o mkchartable mkchartable.o xstrlcpy.o xstrlcat.o xmalloc.o assert.o
+
+clean:
+ rm -f *.o *.a chartable.c Makefile.bak mkchartable makedepend.log \
+ $(BUILTSOURCES)
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) -I$(srcdir) $(MAKEDEPEND_CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,143 @@
+/* acl.c -- routines for access control lists
+ $Id: acl.c,v 1.10.4.1 2005/12/13 19:36:10 murch Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Chris Newman
+ * Start Date: 6/28/93
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include "acl.h"
+#include "libcyr_cfg.h"
+
+/* convert a string to an acl bit vector
+ */
+int cyrus_acl_strtomask(const char *str)
+{
+ const char *deleteright = libcyrus_config_getstring(CYRUSOPT_DELETERIGHT);
+ long result = 0;
+
+ while (*str) {
+ /* legacy DELETE right */
+ if (*str == *deleteright) result |= ACL_DELETEMBOX;
+
+ switch (*str++) {
+ case 'l': result |= ACL_LOOKUP; break;
+ case 'r': result |= ACL_READ; break;
+ case 's': result |= ACL_SEEN; break;
+ case 'w': result |= ACL_WRITE; break;
+ case 'i': result |= ACL_INSERT; break;
+ case 'p': result |= ACL_POST; break;
+ case 'c': /* legacy CREATE macro */
+ case 'k': result |= ACL_CREATE; break;
+ case 'x': result |= ACL_DELETEMBOX; break;
+ case 't': result |= ACL_DELETEMSG; break;
+ case 'e': result |= ACL_EXPUNGE; break;
+ case 'd': /* legacy DELETE macro */
+ result |= (ACL_DELETEMSG | ACL_EXPUNGE); break;
+ case 'a': result |= ACL_ADMIN; break;
+ case '0': result |= ACL_USER0; break;
+ case '1': result |= ACL_USER1; break;
+ case '2': result |= ACL_USER2; break;
+ case '3': result |= ACL_USER3; break;
+ case '4': result |= ACL_USER4; break;
+ case '5': result |= ACL_USER5; break;
+ case '6': result |= ACL_USER6; break;
+ case '7': result |= ACL_USER7; break;
+ case '8': result |= ACL_USER8; break;
+ case '9': result |= ACL_USER9; break;
+ }
+ }
+
+ return (result);
+}
+
+/* convert an acl bit vector to a string
+ *
+ * The 'legacy' parameter is used to control whether we return
+ * the legacy c/d macros when any of their member rights are set.
+ * 'legacy' is enabled (1) for GETACL/LISTRIGHTS/MYRIGHTS responses
+ * and disabled (0) for SETACL (when writing rights to disk).
+ */
+char *cyrus_acl_masktostr(int acl, char *str, int legacy)
+{
+ char *pos = str;
+ int legacy_create = 0, legacy_delete = 0;
+
+ if (legacy) {
+ const char *deleteright = libcyrus_config_getstring(CYRUSOPT_DELETERIGHT);
+ legacy_create = ACL_CREATE;
+ legacy_delete = (ACL_DELETEMSG | ACL_EXPUNGE);
+
+ switch (*deleteright) {
+ case 'c': legacy_create |= ACL_DELETEMBOX; break;
+ case 'd': legacy_delete |= ACL_DELETEMBOX; break;
+ default: /* XXX we have backwards compatibility problems */ break;
+ }
+ }
+
+ if (acl & ACL_LOOKUP) *pos++ = 'l';
+ if (acl & ACL_READ) *pos++ = 'r';
+ if (acl & ACL_SEEN) *pos++ = 's';
+ if (acl & ACL_WRITE) *pos++ = 'w';
+ if (acl & ACL_INSERT) *pos++ = 'i';
+ if (acl & ACL_POST) *pos++ = 'p';
+ if (acl & ACL_CREATE) *pos++ = 'k';
+ if (acl & ACL_DELETEMBOX) *pos++ = 'x';
+ if (acl & ACL_DELETEMSG) *pos++ = 't';
+ if (acl & ACL_EXPUNGE) *pos++ = 'e';
+ if (acl & legacy_create) *pos++ = 'c';
+ if (acl & legacy_delete) *pos++ = 'd';
+ if (acl & ACL_ADMIN) *pos++ = 'a';
+ if (acl & ACL_USER0) *pos++ = '0';
+ if (acl & ACL_USER1) *pos++ = '1';
+ if (acl & ACL_USER2) *pos++ = '2';
+ if (acl & ACL_USER3) *pos++ = '3';
+ if (acl & ACL_USER4) *pos++ = '4';
+ if (acl & ACL_USER5) *pos++ = '5';
+ if (acl & ACL_USER6) *pos++ = '6';
+ if (acl & ACL_USER7) *pos++ = '7';
+ if (acl & ACL_USER8) *pos++ = '8';
+ if (acl & ACL_USER9) *pos++ = '9';
+ *pos = '\0';
+
+ return (str);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,123 @@
+/* acl.h -- definitions for access control lists
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * Author: Chris Newman
+ * Start Date: 6/28/93
+ */
+
+/* $Id: acl.h,v 1.14.4.2 2006/05/18 18:04:52 murch Exp $ */
+
+#ifndef INCLUDED_ACL_H
+#define INCLUDED_ACL_H
+
+#include "auth.h"
+
+/* max length of an acl string */
+#define ACL_MAXSTR 32
+
+/* ACL bits */
+#define ACL_LOOKUP 0x000001L
+#define ACL_READ 0x000002L
+#define ACL_SEEN 0x000004L
+#define ACL_WRITE 0x000008L
+#define ACL_INSERT 0x000010L
+#define ACL_POST 0x000020L
+#define ACL_CREATE 0x000040L
+#define ACL_DELETEMBOX 0x000080L
+#define ACL_DELETEMSG 0x000100L
+#define ACL_EXPUNGE 0x000200L
+#define ACL_ADMIN 0x000400L
+#define ACL_ALL 0x0007FFL
+#define ACL_USER0 0x000800L
+#define ACL_USER1 0x001000L
+#define ACL_USER2 0x002000L
+#define ACL_USER3 0x004000L
+#define ACL_USER4 0x008000L
+#define ACL_USER5 0x010000L
+#define ACL_USER6 0x020000L
+#define ACL_USER7 0x040000L
+#define ACL_USER8 0x080000L
+#define ACL_USER9 0x100000L
+#define ACL_FULL 0x1FFFFFL
+
+#define ACL_READ_WRITE (ACL_SEEN|ACL_WRITE|ACL_INSERT|ACL_DELETEMSG|ACL_EXPUNGE)
+
+#define ACL_MODE_SET 0
+#define ACL_MODE_ADD 1
+#define ACL_MODE_REMOVE 2
+
+typedef int cyrus_acl_canonproc_t(void *rock, const char *identifier, int rights);
+
+/* convert a string to an acl bit vector */
+extern int cyrus_acl_strtomask(const char *str);
+
+/* cyrus_acl_masktostr(acl, dst)
+ * convert an acl bit vector to a string
+ * dst must have room for 32 characters (only 20 used currently)
+ * returns dst
+ */
+extern char *cyrus_acl_masktostr(int acl, char *str, int legacy);
+
+/* cyrus_acl_myrights(acl)
+ * Calculate the set of rights the user in 'auth_state' has in the ACL 'acl'.
+ * 'acl' must be writable, but is restored to its original condition.
+ */
+extern int cyrus_acl_myrights(struct auth_state *auth_state, char *acl);
+
+/* cyrus_acl_set(acl, identifier, mode, access, canonproc, canonrock) Modify the
+ * ACL pointed to by 'acl' to modify the rights granted to
+ * 'identifier' as specified by 'mode' and the set specified in the
+ * mask 'access'. 'mode' is one of ACL_MODE_SET, ACL_MODE_ADD, or
+ * ACL_MODE_REMOVE. The pointer pointed to by 'acl' must have been
+ * obtained from malloc(). returns -1 on error, 0 on success */
+
+extern int cyrus_acl_set(char **acl, const char *identifier,
+ int mode, int access,
+ cyrus_acl_canonproc_t *canonproc, void *canonrock);
+
+/* cyrus_acl_remove(acl, identifier, canonproc, canonrock)
+ * Remove any entry for 'identifier' in the ACL pointed to by 'acl'.
+ * The pointer pointed to by 'acl' must have been obtained from malloc().
+ * returns -1 on error, 0 on success
+ */
+extern int cyrus_acl_remove(char **acl, const char *identifier,
+ cyrus_acl_canonproc_t *canonproc, void *canonrock);
+
+#endif /* INCLUDED_ACL_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl_afs.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl_afs.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl_afs.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/acl_afs.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,228 @@
+/*
+ * AFS-style ACL interpretation
+ *
+ * The user gets the cumulative set of rights granted to identifiers
+ * of which they are a member. Then, the cumulative set of negative
+ * rights (rights granted to identifiers with '-' prepended to an
+ * identifier of which they are a member) are removed.
+ *
+ */
+/*
+ $Id: acl_afs.c,v 1.22.4.3 2006/04/13 18:33:22 murch Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "acl.h"
+#include "auth.h"
+#include "xmalloc.h"
+
+/*
+ * Calculate the set of rights the user in 'auth_state' has in the ACL 'acl'.
+ * 'acl' must be writable, but is restored to its original condition.
+ */
+int cyrus_acl_myrights(struct auth_state *auth_state, char *acl)
+{
+ char *thisid, *rights, *nextid;
+ long acl_positive = 0, acl_negative = 0;
+ long *acl_ptr;
+
+ for (thisid = acl; *thisid; thisid = nextid) {
+ acl_ptr = &acl_positive;
+ rights = strchr(thisid, '\t');
+ if (!rights) {
+ break;
+ }
+ *rights++ = '\0';
+
+ nextid = strchr(rights, '\t');
+ if (!nextid) {
+ rights[-1] = '\t';
+ break;
+ }
+ *nextid++ = '\0';
+
+ if (*thisid == '-') {
+ acl_ptr = &acl_negative;
+ thisid++;
+ }
+ if (auth_memberof(auth_state, thisid)) {
+ *acl_ptr |= cyrus_acl_strtomask(rights);
+ }
+
+ /* Put the delimiters back */
+ rights[-1] = '\t';
+ nextid[-1] = '\t';
+ }
+
+ return acl_positive & ~acl_negative;
+}
+
+/*
+ * Modify the ACL pointed to by 'acl' to make the rights granted to
+ * 'identifier' the set specified in the mask 'access'. The pointer
+ * pointed to by 'acl' must have been obtained from malloc().
+ */
+int cyrus_acl_set(acl, identifier, mode, access, canonproc, canonrock)
+char **acl;
+const char *identifier;
+int mode;
+int access;
+cyrus_acl_canonproc_t *canonproc;
+void *canonrock;
+{
+ const char *canonid;
+ char *newidentifier = 0;
+ char *newacl;
+ char *thisid, *nextid;
+ int oldaccess = 0;
+ char *rights;
+
+ /* Convert 'identifier' into canonical form */
+ if (*identifier == '-') {
+ canonid = auth_canonifyid(identifier+1, 0);
+ if (!canonid) {
+ if (access != 0L) {
+ return -1;
+ } else {
+ /* trying to delete invalid/non-existent identifier */
+ canonid = identifier+1;
+ }
+ }
+ newidentifier = xmalloc(strlen(canonid)+2);
+ newidentifier[0] = '-';
+ strcpy(newidentifier+1, canonid);
+ identifier = newidentifier;
+ if (canonproc) {
+ access = ~(canonproc(canonrock, canonid, ~access));
+ }
+ }
+ else {
+ canonid = auth_canonifyid(identifier, 0);
+ if (canonid) {
+ identifier = canonid;
+ } else if (access != 0L) {
+ return -1;
+ } else {
+ /* trying to delete invalid/non-existent identifier */
+ }
+ if (canonproc) {
+ access = canonproc(canonrock, identifier, access);
+ }
+ }
+
+ /* Find any existing entry for 'identifier' in 'acl' */
+ for (thisid = nextid = *acl; *thisid; thisid = nextid) {
+ rights = strchr(thisid, '\t');
+ if (!rights) {
+ /* ACK, nuke trailing garbage */
+ *thisid = '\0';
+ nextid = thisid;
+ break;
+ }
+ *rights++ = '\0';
+
+ nextid = strchr(rights, '\t');
+ if (!nextid) {
+ /* ACK, nuke trailing garbage */
+ *thisid = '\0';
+ nextid = thisid;
+ break;
+ }
+ *nextid++ = '\0';
+
+ if (strcmp(identifier, thisid) == 0) {
+ oldaccess = cyrus_acl_strtomask(rights);
+ break;
+ }
+ rights[-1] = '\t';
+ nextid[-1] = '\t';
+ }
+
+ switch (mode) {
+ case ACL_MODE_SET:
+ break;
+
+ case ACL_MODE_ADD:
+ access |= oldaccess;
+ break;
+
+ case ACL_MODE_REMOVE:
+ access = oldaccess & ~access;
+ break;
+ }
+
+ if (access == 0L) {
+ /* Remove any existing entry for 'identifier' */
+ strcpy(thisid, nextid);
+ }
+ else {
+ /* Replace any existing entry for 'identifier' */
+ newacl = xmalloc((thisid - *acl) + strlen(identifier) + 40 +
+ strlen(nextid));
+ strncpy(newacl, *acl, (thisid - *acl));
+ strcpy(newacl + (thisid - *acl), identifier);
+ strcat(newacl, "\t");
+ (void) cyrus_acl_masktostr(access, newacl + strlen(newacl), 0);
+ strcat(newacl, "\t");
+ strcat(newacl, nextid);
+ free(*acl);
+ *acl = newacl;
+ }
+
+ if (newidentifier) free(newidentifier);
+ return 0;
+}
+
+/*
+ * Remove any entry for 'identifier' in the ACL pointed to by 'acl'.
+ * The pointer pointed to by 'acl' must have been obtained from malloc().
+ */
+int cyrus_acl_remove(char **acl, const char *identifier,
+ cyrus_acl_canonproc_t canonproc, void *canonrock)
+{
+ return cyrus_acl_set(acl, identifier, ACL_MODE_SET, 0, canonproc, canonrock);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,62 @@
+/* assert.c -- handle assertion failures
+ * $Id: assert.c,v 1.18 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+#include <stdio.h>
+
+#include "xmalloc.h"
+#include "exitcodes.h"
+#include "assert.h"
+
+void
+assertionfailed(file, line, expr)
+const char *file;
+int line;
+const char *expr;
+{
+ char buf[1024];
+
+ snprintf(buf, sizeof(buf), "Internal error: assertion failed: %s: %d%s%s",
+ file, line, expr ? ": " : "", expr ? expr : "");
+ fatal(buf, EC_SOFTWARE);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/assert.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,54 @@
+/* assert.h -- assert() macro that can exit cleanly
+ $Id: assert.h,v 1.10 2003/02/13 20:15:38 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_ASSERT_H
+#define INCLUDED_ASSERT_H
+
+#ifdef __STDC__
+#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, #ex);}
+void assertionfailed(const char *file, int line, const char *expr);
+#else
+#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, (char*)0);}
+#endif
+
+#endif /* INCLUDED_ASSERT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,119 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: auth.c,v 1.1.2.1 2005/02/16 21:06:50 shadow Exp $ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "auth.h"
+#include "exitcodes.h"
+#include "libcyr_cfg.h"
+#include "xmalloc.h"
+
+struct auth_mech *auth_mechs[] = {
+ &auth_unix,
+ &auth_pts,
+#ifdef HAVE_KRB
+ &auth_krb,
+#endif
+#ifdef HAVE_GSSAPI_H
+ &auth_krb5,
+#endif
+ NULL };
+
+static struct auth_mech *auth_fromname()
+{
+ int i;
+ const char *name = libcyrus_config_getstring(CYRUSOPT_AUTH_MECH);
+ static struct auth_mech *auth = NULL;
+
+ if (auth)
+ return auth;
+
+ for (i = 0; auth_mechs[i]; i++) {
+ if (!strcmp(auth_mechs[i]->name, name)) {
+ auth = auth_mechs[i]; break;
+ }
+ }
+ if (!auth) {
+ char errbuf[1024];
+ snprintf(errbuf, sizeof(errbuf),
+ "Authorization mechanism %s not supported", name);
+ fatal(errbuf, EC_CONFIG);
+ }
+
+ return auth;
+}
+
+int auth_memberof(auth_state, identifier)
+struct auth_state *auth_state;
+const char *identifier;
+{
+ struct auth_mech *auth = auth_fromname();
+
+ return auth->memberof(auth_state, identifier);
+}
+
+char *auth_canonifyid(identifier, len)
+const char *identifier;
+size_t len;
+{
+ struct auth_mech *auth = auth_fromname();
+
+ return auth->canonifyid(identifier, len);
+}
+
+struct auth_state *auth_newstate(identifier)
+const char *identifier;
+{
+ struct auth_mech *auth = auth_fromname();
+
+ return auth->newstate(identifier);
+}
+
+void auth_freestate(auth_state)
+struct auth_state *auth_state;
+{
+ struct auth_mech *auth = auth_fromname();
+
+ auth->freestate(auth_state);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,80 @@
+/* auth.h -- Site authorization module
+ * $Id: auth.h,v 1.15.2.1 2005/02/16 21:06:50 shadow Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_AUTH_H
+#define INCLUDED_AUTH_H
+
+struct auth_state;
+
+struct auth_mech {
+ const char *name;
+
+ char *(*canonifyid)(const char *identifier, size_t len);
+ int (*memberof)(struct auth_state *auth_state,
+ const char *identifier);
+ struct auth_state *(*newstate)(const char *identifier);
+ void (*freestate)(struct auth_state *auth_state);
+};
+
+extern struct auth_mech *auth_mechs[];
+
+/* Note that some of these may be undefined symbols
+ * if libcyrus was not built with support for them */
+extern struct auth_mech auth_unix;
+extern struct auth_mech auth_pts;
+extern struct auth_mech auth_krb;
+extern struct auth_mech auth_krb5;
+
+/* auth_canonifyid: canonify the given identifier and return a pointer
+ * to a static buffer with the canonified ID, or NULL on
+ * failure */
+/* identifier: id to canonify */
+/* len: length of id, or 0 to do strlen(identifier) */
+char *auth_canonifyid(const char *identifier, size_t len);
+
+int auth_memberof(struct auth_state *auth_state,
+ const char *identifier);
+struct auth_state *auth_newstate(const char *identifier);
+void auth_freestate(struct auth_state *auth_state);
+
+#endif /* INCLUDED_AUTH_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,380 @@
+/* auth_krb.c -- Kerberos authorization
+ * $Id: auth_krb.c,v 1.39.2.3 2005/12/14 13:52:09 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+#include <stdlib.h>
+
+#include "auth.h"
+#include "exitcodes.h"
+
+#ifdef HAVE_KRB
+
+#include <limits.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include <krb.h>
+#ifdef HAVE_BDB
+#ifdef HAVE_DB_185_H
+#include <db_185.h>
+#else
+#include <db.h>
+#endif
+#else
+#include <ndbm.h>
+#endif
+#include <krb.h>
+
+#include "xmalloc.h"
+
+#ifndef KRB_MAPNAME
+#define KRB_MAPNAME (SYSCONFDIR "/krb.equiv")
+#endif
+
+struct auth_state {
+ char userid[MAX_K_NAME_SZ+1];
+ char aname[ANAME_SZ];
+ char inst[INST_SZ];
+ char realm[REALM_SZ];
+};
+
+static struct auth_state auth_anonymous = {
+ "anonymous", "anonymous", "", ""
+};
+
+
+
+static int parse_krbequiv_line (const char *src,
+ char *principal, char *localuser);
+static char *auth_map_krbid (const char *real_aname, const char *real_inst,
+ const char *real_realm);
+
+/*
+ * Determine if the user is a member of 'identifier'
+ * Returns one of:
+ * 0 User does not match identifier
+ * 1 identifier matches everybody
+ * 2 User is in the group that is identifier
+ * 3 User is identifer
+ */
+static int mymemberof(auth_state, identifier)
+struct auth_state *auth_state;
+const char *identifier;
+{
+ char aname[ANAME_SZ];
+ char inst[INST_SZ];
+ char realm[REALM_SZ];
+
+ if (!auth_state) auth_state = &auth_anonymous;
+
+ if (strcmp(identifier, "anyone") == 0) return 1;
+
+ if (strcmp(identifier, auth_state->userid) == 0) return 3;
+
+ /* "anonymous" is not a member of any group */
+ if (strcmp(auth_state->userid, "anonymous") == 0) return 0;
+
+ aname[0] = inst[0] = realm[0] = '\0';
+ if (kname_parse(aname, inst, realm, (char *) identifier) != 0) {
+ return 0;
+ }
+
+ if (strcmp(aname, auth_state->aname) != 0 && strcmp(aname, "*") != 0) {
+ return 0;
+ }
+ if (strcmp(inst, auth_state->inst) != 0 && strcmp(inst, "*") != 0) {
+ return 0;
+ }
+ if (strcmp(realm, auth_state->realm) != 0 && strcmp(realm, "*") != 0) {
+ return 0;
+ }
+ return 2;
+}
+
+/*
+ * Parse a line 'src' from an /etc/krb.equiv file.
+ * Sets the buffer pointed to by 'principal' to be the kerberos
+ * identity and sets the buffer pointed to by 'localuser' to
+ * be the local user. Both buffers must be of size one larger than
+ * MAX_K_NAME_SZ. Returns 1 on success, 0 on failure.
+ */
+static int
+parse_krbequiv_line(src, principal, localuser)
+const char *src;
+char *principal;
+char *localuser;
+{
+ int i;
+
+ while (isspace(*src)) src++;
+ if (!*src) return 0;
+
+ for (i = 0; *src && !isspace(*src); i++) {
+ if (i >= MAX_K_NAME_SZ) return 0;
+ *principal++ = *src++;
+ }
+ *principal = 0;
+
+ if (!isspace(*src)) return 0; /* Need at least one separator */
+ while (isspace(*src)) src++;
+ if (!*src) return 0;
+
+ for (i = 0; *src && !isspace(*src); i++) {
+ if (i >= MAX_K_NAME_SZ) return 0;
+ *localuser++ = *src++;
+ }
+ *localuser = 0;
+ return 1;
+}
+
+/*
+ * Map a remote kerberos principal to a local username. If a mapping
+ * is found, a pointer to the local username is returned. Otherwise,
+ * a NULL pointer is returned.
+ * Eventually, this may be more sophisticated than a simple file scan.
+ */
+static char *auth_map_krbid(real_aname, real_inst, real_realm)
+const char *real_aname;
+const char *real_inst;
+const char *real_realm;
+{
+ static char localuser[MAX_K_NAME_SZ + 1];
+ char principal[MAX_K_NAME_SZ + 1];
+ char aname[ANAME_SZ];
+ char inst[INST_SZ];
+ char realm[REALM_SZ];
+ char lrealm[REALM_SZ];
+ char krbhst[256];
+ char *p;
+ char buf[1024];
+ FILE *mapfile;
+
+ if (!(mapfile = fopen(KRB_MAPNAME, "r"))) {
+ /* If the file can't be opened, don't do mappings */
+ return 0;
+ }
+
+ for (;;) {
+ if (!fgets(buf, sizeof(buf), mapfile)) break;
+ if (parse_krbequiv_line(buf, principal, localuser) == 0 ||
+ kname_parse(aname, inst, realm, principal) != 0) {
+ /* Ignore badly formed lines */
+ continue;
+ }
+ if (!strcmp(aname, real_aname) && !strcmp(inst, real_inst) &&
+ !strcmp(realm, real_realm)) {
+ fclose(mapfile);
+
+ aname[0] = inst[0] = realm[0] = '\0';
+ if (kname_parse(aname, inst, realm, localuser) != 0) {
+ return 0;
+ }
+
+ /* Upcase realm name */
+ for (p = realm; *p; p++) {
+ if (islower(*p)) *p = toupper(*p);
+ }
+
+ if (*realm) {
+ if (krb_get_lrealm(lrealm,1) == 0 &&
+ strcmp(lrealm, realm) == 0) {
+ *realm = 0;
+ }
+ else if (krb_get_krbhst(krbhst, realm, 1)) {
+ return 0; /* Unknown realm */
+ }
+ }
+
+ strcpy(localuser, aname);
+ if (*inst) {
+ strcat(localuser, ".");
+ strcat(localuser, inst);
+ }
+ if (*realm) {
+ strcat(localuser, "@");
+ strcat(localuser, realm);
+ }
+
+ return localuser;
+ }
+ }
+
+ fclose(mapfile);
+ return 0;
+}
+
+/*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+ * or NULL if 'identifier' is invalid.
+ */
+static char *mycanonifyid(identifier, len)
+const char *identifier;
+size_t len;
+{
+ static char retbuf[MAX_K_NAME_SZ+1];
+ char aname[ANAME_SZ];
+ char inst[INST_SZ];
+ char realm[REALM_SZ];
+ char lrealm[REALM_SZ];
+ char krbhst[256];
+ char *canon_buf;
+ char *p;
+
+ if(!len) len = strlen(identifier);
+
+ canon_buf = malloc(len + 1);
+ if(!canon_buf) return 0;
+ memcpy(canon_buf, identifier, len);
+ canon_buf[len] = '\0';
+
+ aname[0] = inst[0] = realm[0] = '\0';
+ if (kname_parse(aname, inst, realm, canon_buf) != 0) {
+ free(canon_buf);
+ return 0;
+ }
+
+ free(canon_buf);
+
+ /* Upcase realm name */
+ for (p = realm; *p; p++) {
+ if (islower(*p)) *p = toupper(*p);
+ }
+
+ if (*realm) {
+ if (krb_get_lrealm(lrealm,1) == 0 &&
+ strcmp(lrealm, realm) == 0) {
+ *realm = 0;
+ }
+ else if (krb_get_krbhst(krbhst, realm, 1)) {
+ return 0; /* Unknown realm */
+ }
+ }
+
+ /* Check for krb.equiv remappings. */
+ if ((p = auth_map_krbid(aname, inst, realm)) ) {
+ strcpy(retbuf, p);
+ return retbuf;
+ }
+
+ strcpy(retbuf, aname);
+ if (*inst) {
+ strcat(retbuf, ".");
+ strcat(retbuf, inst);
+ }
+ if (*realm) {
+ strcat(retbuf, "@");
+ strcat(retbuf, realm);
+ }
+
+ return retbuf;
+}
+
+/*
+ * Set the current user to 'identifier'. 'cacheid', if non-null,
+ * points to a 16-byte binary key to cache identifier's information
+ * with.
+ */
+static struct auth_state *mynewstate(identifier)
+const char *identifier;
+{
+ struct auth_state *newstate;
+
+ identifier = auth_canonifyid(identifier, 0);
+ if (!identifier) return 0;
+
+ newstate = (struct auth_state *)xmalloc(sizeof(struct auth_state));
+
+ strcpy(newstate->userid, identifier);
+ newstate->aname[0] = newstate->inst[0] = newstate->realm[0] = '\0';
+ kname_parse(newstate->aname, newstate->inst, newstate->realm, (char *) identifier);
+
+ return newstate;
+}
+
+static void myfreestate(auth_state)
+struct auth_state *auth_state;
+{
+ free((char *)auth_state);
+}
+
+#else /* HAVE_KRB */
+
+static int mymemberof(
+ struct auth_state *auth_state __attribute__((unused)),
+ const char *identifier __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb) not compiled in", EC_CONFIG);
+}
+
+static char *mycanonifyid(
+ const char *identifier __attribute__((unused)),
+ size_t len __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb) not compiled in", EC_CONFIG);
+}
+
+static struct auth_state *mynewstate(
+ const char *identifier __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb) not compiled in", EC_CONFIG);
+}
+
+static void myfreestate(
+ struct auth_state *auth_state __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb) not compiled in", EC_CONFIG);
+}
+
+#endif
+
+struct auth_mech auth_krb =
+{
+ "krb", /* name */
+
+ &mycanonifyid,
+ &mymemberof,
+ &mynewstate,
+ &myfreestate,
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb5.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb5.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb5.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_krb5.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,238 @@
+/* auth_krb5.c -- Kerberos V authorization for Cyrus IMAP
+ * $Id: auth_krb5.c,v 1.2.2.2 2005/02/16 21:06:50 shadow Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+#include <stdlib.h>
+
+#include "auth.h"
+#include "exitcodes.h"
+
+#ifdef HAVE_GSSAPI_H
+
+#include <limits.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include <krb5.h>
+
+#include "auth.h"
+#include "xmalloc.h"
+
+struct auth_state {
+ char *userid; /* Canonified Userid */
+};
+
+/*
+ * Determine if the user is a member of 'identifier'
+ * Returns one of:
+ * 0 User does not match identifier
+ * 1 identifier matches everybody
+ * 2 User is in the group that is identifier
+ * 3 User is identifer
+ */
+static int mymemberof(struct auth_state *auth_state, const char *identifier)
+{
+ char *ident;
+ int ret=0;
+
+ if (strcmp(identifier,"anyone") == 0) return 1;
+ if (!auth_state && !strcmp(identifier, "anonymous")) return 3;
+ else if(!auth_state) return 0;
+ if (strcmp(identifier,auth_state->userid) == 0) return 3;
+ if (strcmp(auth_state->userid,"anonymous") == 0) return 0;
+
+ ident = auth_canonifyid(identifier,0);
+
+ if(!strcmp(ident, auth_state->userid)) {
+ ret = 3;
+ }
+
+ return ret;
+}
+
+/*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+ * or NULL if 'identifier' is invalid.
+ */
+static char *mycanonifyid(const char *identifier, size_t len)
+{
+ static char *retbuf = NULL;
+ krb5_context context;
+ krb5_principal princ, princ_dummy;
+ char *realm;
+ int striprealm = 0;
+
+ if(retbuf) free(retbuf);
+ retbuf = NULL;
+
+ if(!identifier) return NULL;
+ if(!len) len = strlen(identifier);
+
+ if (strcasecmp(identifier, "anonymous") == 0)
+ return "anonymous";
+
+ if (strcasecmp(identifier, "anyone") == 0)
+ return "anyone";
+
+ if (krb5_init_context(&context))
+ return NULL;
+
+ if (krb5_parse_name(context,identifier,&princ))
+ {
+ krb5_free_context(context);
+ return NULL;
+ }
+
+ /* get local realm */
+ if (krb5_get_default_realm(context,&realm))
+ {
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ return NULL;
+ }
+
+ /* build dummy princ to compare realms */
+ if (krb5_build_principal(context,&princ_dummy,
+ strlen(realm),realm,"dummy",0))
+ {
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ free(realm);
+ return NULL;
+ }
+
+ /* is this principal local ? */
+ if (krb5_realm_compare(context,princ,princ_dummy))
+ {
+ striprealm = 1;
+ }
+
+ /* done w/ dummy princ free it & realm */
+ krb5_free_principal(context,princ_dummy);
+ free(realm);
+
+ /* get the text version of princ */
+ if (krb5_unparse_name(context,princ,&retbuf))
+ {
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ return NULL;
+ }
+
+ /* we have the canonical name pointed to by p -- strip realm if local */
+ if (striprealm)
+ {
+ char *realmbegin = strrchr(retbuf, '@');
+ if(realmbegin) *realmbegin = '\0';
+ }
+
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ return retbuf;
+}
+
+/*
+ * Set the current user to 'identifier'.
+ */
+static struct auth_state *mynewstate(const char *identifier)
+{
+ struct auth_state *newstate;
+ char *ident;
+ ident = auth_canonifyid(identifier, 0);
+ if (!ident) return NULL;
+
+ newstate = (struct auth_state *)xmalloc(sizeof(struct auth_state));
+ newstate->userid = xstrdup(ident);
+
+ return newstate;
+}
+
+static void myfreestate(struct auth_state *auth_state)
+{
+ if(!auth_state) return;
+
+ free(auth_state->userid);
+ free(auth_state);
+}
+
+#else /* HAVE_GSSAPI_H */
+
+static int mymemberof(
+ struct auth_state *auth_state __attribute__((unused)),
+ const char *identifier __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb5) not compiled in", EC_CONFIG);
+}
+
+static char *mycanonifyid(
+ const char *identifier __attribute__((unused)),
+ size_t len __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb5) not compiled in", EC_CONFIG);
+}
+
+static struct auth_state *mynewstate(
+ const char *identifier __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb5) not compiled in", EC_CONFIG);
+}
+
+static void myfreestate(
+ struct auth_state *auth_state __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb5) not compiled in", EC_CONFIG);
+}
+
+#endif
+
+struct auth_mech auth_krb5 =
+{
+ "krb5", /* name */
+
+ &mycanonifyid,
+ &mymemberof,
+ &mynewstate,
+ &myfreestate,
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,514 @@
+/* auth_pts.c -- PTLOADER authorization
+ * $Id: auth_pts.c,v 1.2.2.7 2006/03/17 16:05:15 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+
+#include "auth.h"
+#include "auth_pts.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "libcyr_cfg.h"
+#include "lock.h"
+#include "retry.h"
+#include "strhash.h"
+#include "xmalloc.h"
+
+static char *canonuser_id = NULL;
+static struct auth_state *canonuser_cache = NULL;
+
+/* XXX should make this an imap option */
+#define PT_TIMEOUT_SEC 30
+
+#define TS_READ 1
+#define TS_WRITE 2
+#define TS_RW 3
+
+static int
+timeout_select (int sock, int op, int sec) {
+ struct timeval tv;
+ int r;
+ fd_set rfds, wfds, *rp, *wp;
+
+ FD_ZERO(&rfds);
+ FD_ZERO(&wfds);
+ rp = NULL;
+ wp = NULL;
+
+ switch (op) {
+ case TS_READ:
+ FD_SET(sock, &rfds);
+ rp = &rfds;
+ break;
+ case TS_WRITE:
+ FD_SET(sock, &wfds);
+ wp = &wfds;
+ break;
+ case TS_RW:
+ FD_SET(sock, &rfds);
+ FD_SET(sock, &wfds);
+ rp = &rfds;
+ wp = &wfds;
+ default: /* no action */
+ break;
+ }
+
+ tv.tv_sec = sec;
+ tv.tv_usec = 0;
+
+ syslog(LOG_DEBUG, "timeout_select: sock = %d, rp = 0x%x, wp = 0x%x, sec = %d",
+ sock, rp, wp, sec);
+
+ if ((r = select(sock+1, rp, wp, NULL, &tv)) == 0) {
+ /* r == 0 then timed out. we change this into an error */
+ errno = ETIMEDOUT;
+ r = -1;
+ }
+
+ syslog(LOG_DEBUG, "timeout_select exiting. r = %d; errno = %d", r, errno);
+ return r;
+}
+
+
+static int
+nb_connect(int s, struct sockaddr *sa, socklen_t slen, int sec) {
+ int flags, r, rc=0;
+
+ if ((flags = fcntl(s, F_GETFL,0)) == -1) {
+ syslog(LOG_ERR, "unable to get socket flags");
+ return -1;
+ }
+
+ if (fcntl(s, F_SETFL, flags|O_NONBLOCK) == -1) {
+ syslog(LOG_ERR, "unable to set socket to NON_BLOCK");
+ return -1;
+ }
+
+ if ((r = connect(s, sa, slen)) < 0) {
+ if (errno != EINPROGRESS) {
+ rc = -1;
+ goto done;
+ }
+ } else {
+ /* yay, it got through on the first shot. */
+ syslog(LOG_DEBUG, "connected with no delay");
+ rc = 0;
+ goto done;
+ }
+
+ syslog(LOG_DEBUG, "didn't immediately connect. waiting...");
+
+ if (timeout_select(s, TS_RW, sec) < 0) {
+ syslog(LOG_ERR, "timeoutselect: %m");
+ rc = -1;
+ goto done;
+ }
+
+ syslog(LOG_DEBUG, "connect: connected in time.");
+ rc = 0;
+
+ done:
+ /* set back to blocking so the reads/writes don't screw up), but why bother on an error... */
+ if (!rc && (fcntl(s, F_SETFL, flags) == -1)) {
+ syslog(LOG_ERR, "unable to set socket back to nonblocking: %m");
+ rc = -1;
+ }
+
+ return rc;
+}
+
+/* Returns 0 on successful connection to ptloader/valid cache entry,
+ * complete with allocated & filled in struct auth_state.
+ *
+ * state must be a NULL pointer when passed in */
+static int ptload(const char *identifier,struct auth_state **state);
+static void myfreestate(struct auth_state *auth_state);
+
+
+/*
+ * Determine if the user is a member of 'identifier'
+ * Returns one of:
+ * 0 User does not match identifier
+ * 1 identifier matches everybody
+ * 2 User is in the group that is identifier
+ * 3 User is identifer
+ */
+static int mymemberof(struct auth_state *auth_state,
+ const char *identifier)
+{
+ int i;
+ unsigned idhash = strhash(identifier);
+ static unsigned anyonehash = 0;
+
+ anyonehash = !anyonehash ? strhash("anyone") : anyonehash;
+
+ if (!auth_state) {
+ /* special case anonymous */
+ if (!strcmp(identifier, "anyone")) return 1;
+ else if (!strcmp(identifier, "anonymous")) return 3;
+
+ /* "anonymous" is not a member of any group */
+ else return 0;
+ }
+
+ /* is 'identifier' "anyone"? */
+ if (idhash == anyonehash &&
+ !strcmp(identifier, "anyone")) return 1;
+
+ /* is 'identifier' me? */
+ if (idhash == auth_state->userid.hash &&
+ !strcmp(identifier, auth_state->userid.id)) return 3;
+
+ /* is it a group i'm a member of ? */
+ for (i=0; i < auth_state->ngroups; i++)
+ if (idhash == auth_state->groups[i].hash &&
+ !strcmp(identifier, auth_state->groups[i].id))
+ return 2;
+
+ return 0;
+}
+
+/*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+ * or NULL if 'identifier' is invalid.
+ */
+static char *mycanonifyid(const char *identifier,
+ size_t len __attribute__((unused)))
+{
+ static char retbuf[PTS_DB_KEYSIZE];
+
+ if(canonuser_id &&
+ (!strcmp(identifier, canonuser_id) || !strcmp(identifier, retbuf))) {
+ /* It's the currently cached user, return the previous result */
+ return retbuf;
+ } else if(canonuser_id) {
+ /* We've got a new one, invalidate our cache */
+ free(canonuser_id);
+ myfreestate(canonuser_cache);
+
+ canonuser_id = NULL;
+ canonuser_cache = NULL;
+ }
+
+ if(!strcmp(identifier, "anyone") ||
+ !strcmp(identifier, "anonymous")) {
+ /* we can fill this in ourselves - no cacheing */
+ strlcpy(retbuf, identifier, sizeof(retbuf));
+ return retbuf;
+ }
+
+ canonuser_cache = NULL;
+ if(ptload(identifier, &canonuser_cache) < 0) {
+ if (canonuser_cache == NULL) {
+ syslog(LOG_ERR, "ptload completely failed: unable to canonify identifier: %s",
+ identifier);
+ return NULL;
+ } else {
+ syslog(LOG_ERR, "ptload failed: but canonified %s -> %s", identifier,
+ canonuser_cache->userid.id);
+ }
+ }
+
+ canonuser_id = xstrdup(identifier);
+ strlcpy(retbuf, canonuser_cache->userid.id, sizeof(retbuf));
+ syslog(LOG_DEBUG, "canonified %s -> %s", identifier, retbuf);
+ return retbuf;
+}
+
+/*
+ * Produce an auth_state structure for the given identifier
+ */
+static struct auth_state *mynewstate(const char *identifier)
+{
+ struct auth_state *output = NULL;
+
+ if(canonuser_id &&
+ (!strcmp(identifier, canonuser_id) ||
+ !strcmp(identifier, canonuser_cache->userid.id))) {
+ /* It's the currently cached user, return the previous result */
+ free(canonuser_id);
+ canonuser_id = NULL;
+
+ output = canonuser_cache;
+ canonuser_cache = NULL;
+ return output;
+ }
+
+ /*
+ * If anyone or anonymous, just pass through. Otherwise, try to load the
+ * groups the user is in
+ */
+ if(strcmp(identifier, "anyone") &&
+ strcmp(identifier, "anonymous")) {
+
+ if(ptload(identifier, &output) < 0) {
+ syslog(LOG_ERR, "ptload failed for %s", identifier);
+ /* Allowing this to go through is a problem if negative group access is
+ * used significantly. Allowing this to go through is a feature when
+ * the ptserver is having problems and the user wants to get to his
+ * inbox.
+ *
+ * note that even on a failure, output should either be NULL or a
+ * correct (enough) value.
+ */
+ }
+ }
+
+ if (output == NULL) {
+ output =
+ (struct auth_state *)xzmalloc(sizeof(struct auth_state));
+ strlcpy(output->userid.id, identifier,
+ sizeof(output->userid.id));
+ output->userid.hash = strhash(identifier);
+ syslog(LOG_DEBUG, "creating empty auth_state for %s", identifier);
+ } else {
+ syslog(LOG_DEBUG, "using ptloaded value of: %s", output->userid.id);
+ }
+
+ return output;
+}
+
+static struct cyrusdb_backend *the_ptscache_db = NULL;
+
+/* Returns 0 on success */
+static int ptload(const char *identifier, struct auth_state **state)
+{
+ struct auth_state *fetched = NULL;
+ size_t id_len;
+ const char *data = NULL;
+ int dsize;
+ char fnamebuf[1024];
+ struct db *ptdb;
+ int s;
+ struct sockaddr_un srvaddr;
+ int r, rc=0;
+ static char response[1024];
+ struct iovec iov[10];
+ int niov, n;
+ unsigned int start;
+ const char *config_dir =
+ libcyrus_config_getstring(CYRUSOPT_CONFIG_DIR);
+
+ /* xxx this sucks, but it seems to be the only way to satisfy the linker */
+ if(the_ptscache_db == NULL) {
+ the_ptscache_db =
+ cyrusdb_fromname(libcyrus_config_getstring(CYRUSOPT_PTSCACHE_DB));
+ }
+
+ if(!state || *state) {
+ fatal("bad state pointer passed to ptload()", EC_TEMPFAIL);
+ }
+
+ strcpy(fnamebuf, config_dir);
+ strcat(fnamebuf, PTS_DBFIL);
+ r = the_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: opening %s: %s", fnamebuf,
+ cyrusdb_strerror(ret));
+ *state = NULL;
+ return -1;
+ }
+
+ id_len = strlen(identifier);
+ if(id_len > PTS_DB_KEYSIZE) {
+ syslog(LOG_ERR, "identifier too long in auth_newstate");
+ *state = NULL;
+ return -1;
+ }
+
+ /* fetch the current record for the user */
+ r = the_ptscache_db->fetch(ptdb, identifier, id_len,
+ &data, &dsize, NULL);
+ if (r && r != CYRUSDB_NOTFOUND) {
+ syslog(LOG_ERR, "auth_newstate: error fetching record: %s",
+ cyrusdb_strerror(r));
+
+ rc = -1;
+ goto done;
+ }
+
+ /* if it's expired (or nonexistant),
+ * ask the ptloader to reload it and reread it */
+ fetched = (struct auth_state *) data;
+
+ if(fetched) {
+ time_t now = time(NULL);
+ int timeout = libcyrus_config_getint(CYRUSOPT_PTS_CACHE_TIMEOUT);
+
+ syslog(LOG_DEBUG,
+ "ptload(): fetched cache record (%s)" \
+ "(mark %ld, current %ld, limit %ld)", identifier,
+ fetched->mark, now, now - timeout);
+
+ if (fetched->mark > (now - timeout)) {
+ /* not expired; let's return it */
+ goto done;
+ }
+ }
+
+ syslog(LOG_DEBUG, "ptload(): pinging ptloader");
+
+ s = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (s == -1) {
+ syslog(LOG_ERR,
+ "ptload(): unable to create socket for ptloader: %m");
+ rc = -1;
+ goto done;
+ }
+
+ if (libcyrus_config_getstring(CYRUSOPT_PTLOADER_SOCK))
+ strcpy(fnamebuf, libcyrus_config_getstring(CYRUSOPT_PTLOADER_SOCK));
+ else {
+ strcpy(fnamebuf, config_dir);
+ strcat(fnamebuf, PTS_DBSOCKET);
+ }
+
+ memset((char *)&srvaddr, 0, sizeof(srvaddr));
+ srvaddr.sun_family = AF_UNIX;
+ strcpy(srvaddr.sun_path, fnamebuf);
+ r = nb_connect(s, (struct sockaddr *)&srvaddr, sizeof(srvaddr), PT_TIMEOUT_SEC);
+
+ if (r == -1) {
+ syslog(LOG_ERR, "ptload(): can't connect to ptloader server: %m");
+ close(s);
+ rc = -1;
+ goto done;
+ }
+
+ syslog(LOG_DEBUG, "ptload(): connected");
+ niov = 0;
+ WRITEV_ADD_TO_IOVEC(iov, niov, (char *) &id_len, sizeof(id_len));
+ WRITEV_ADD_TO_IOVEC(iov, niov, (char *) identifier, id_len);
+
+ if (timeout_select(s, TS_WRITE, PT_TIMEOUT_SEC) < 0) {
+ syslog(LOG_ERR, "timeoutselect: writing to ptloader %m");
+ rc = -1;
+ goto done;
+ }
+ retry_writev(s, iov, niov);
+ syslog(LOG_DEBUG, "ptload sent data");
+
+ start = 0;
+ while (start < sizeof(response) - 1) {
+ if (timeout_select(s, TS_READ, PT_TIMEOUT_SEC) < 0) {
+ syslog(LOG_ERR, "timeout_select: reading from ptloader: %m");
+ rc = -1;
+ goto done;
+ }
+ n = read(s, response+start, sizeof(response) - 1 - start);
+ if (n < 1) break;
+ start += n;
+ }
+
+ close(s);
+ syslog(LOG_DEBUG, "ptload read data back");
+
+ if (start <= 1 || strncmp(response, "OK", 2)) {
+ if(start > 1) {
+ syslog(LOG_ERR,
+ "ptload(): bad response from ptloader server: %s", response);
+ } else {
+ syslog(LOG_ERR, "ptload(): empty response from ptloader server");
+ }
+ rc = -1;
+ goto done;
+ }
+
+ /* fetch the current record for the user */
+ r = the_ptscache_db->fetch(ptdb, identifier, id_len,
+ &data, &dsize, NULL);
+ if (r != 0 || !data) {
+ syslog(LOG_ERR, "ptload(): error fetching record: %s"
+ "(did ptloader add the record?)",
+ cyrusdb_strerror(r));
+ data = NULL;
+ rc = -1;
+ goto done;
+ }
+
+ done:
+ /* ok, we got real data, let's use it */
+ if (data != NULL) {
+ fetched = (struct auth_state *) data;
+ }
+
+ if (fetched == NULL) {
+ *state = NULL;
+ syslog(LOG_DEBUG, "No data available at all from ptload()");
+ } else {
+ /* copy it into our structure */
+ *state = (struct auth_state *)xmalloc(dsize);
+ memcpy(*state, fetched, dsize);
+ syslog(LOG_DEBUG, "ptload returning data");
+ }
+
+ /* close and unlock the database */
+ the_ptscache_db->close(ptdb);
+
+ return rc;
+}
+
+static void myfreestate(struct auth_state *auth_state)
+{
+ free(auth_state);
+}
+
+struct auth_mech auth_pts =
+{
+ "pts", /* name */
+
+ &mycanonifyid,
+ &mymemberof,
+ &mynewstate,
+ &myfreestate,
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_pts.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,77 @@
+/* auth_pts.h -- PTLOADER authorization module.
+ $Id: auth_pts.h,v 1.2.2.1 2005/12/13 13:35:06 murch Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#ifndef INCLUDED_AUTH_PTS_H
+#define INCLUDED_AUTH_PTS_H
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/file.h>
+#include <errno.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#include <syslog.h>
+#include <ctype.h>
+
+#include "auth.h"
+
+#define PTS_DBFIL FNAME_PTSDB
+#define PTS_DBSOCKET "/ptclient/ptsock"
+#define PTS_DB_KEYSIZE 512
+
+struct auth_ident {
+ unsigned hash;
+ char id[PTS_DB_KEYSIZE];
+};
+
+struct auth_state {
+ struct auth_ident userid; /* the CANONICAL userid */
+ time_t mark;
+ int ngroups;
+ struct auth_ident groups[1]; /* variable sized */
+};
+
+#endif /* INCLUDED_AUTH_PTS_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_unix.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_unix.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_unix.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/auth_unix.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,276 @@
+/* auth_unix.c -- Unix passwd file authorization
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * $Id: auth_unix.c,v 1.37.2.2 2005/02/16 21:06:50 shadow Exp $
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <pwd.h>
+#include <grp.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "auth.h"
+#include "libcyr_cfg.h"
+#include "xmalloc.h"
+
+struct auth_state {
+ char userid[81];
+ char **group;
+ int ngroups;
+};
+
+static struct auth_state auth_anonymous = {
+ "anonymous", 0, 0
+};
+
+/*
+ * Determine if the user is a member of 'identifier'
+ * Returns one of:
+ * 0 User does not match identifier
+ * 1 identifier matches everybody
+ * 2 User is in the group that is identifier
+ * 3 User is identifer
+ */
+static int mymemberof(auth_state, identifier)
+struct auth_state *auth_state;
+const char *identifier;
+{
+ int i;
+
+ if (!auth_state) auth_state = &auth_anonymous;
+
+ if (strcmp(identifier, "anyone") == 0) return 1;
+
+ if (strcmp(identifier, auth_state->userid) == 0) return 3;
+
+ if (strncmp(identifier, "group:", 6) != 0) return 0;
+
+ for (i=0; i<auth_state->ngroups; i++) {
+ if (strcmp(identifier+6, auth_state->group[i]) == 0) return 2;
+ }
+ return 0;
+}
+
+/* Map of which characters are allowed by auth_canonifyid.
+ * Key: 0 -> not allowed (special, ctrl, or would confuse Unix or imapd)
+ * 1 -> allowed, but requires an alpha somewhere else in the string
+ * 2 -> allowed, and is an alpha
+ *
+ * At least one character must be an alpha.
+ *
+ * This may not be restrictive enough.
+ * Here are the reasons for the restrictions:
+ *
+ * & forbidden because of MUTF-7. (This could be fixed.)
+ * : forbidden because it's special in /etc/passwd
+ * / forbidden because it can't be used in a mailbox name
+ * * % forbidden because they're IMAP magic in the LIST/LSUB commands
+ * ? it just scares me
+ * ctrl chars, DEL
+ * can't send them as IMAP characters in plain folder names, I think
+ * 80-FF forbidden because you can't send them in IMAP anyway
+ * (and they're forbidden as folder names). (This could be fixed.)
+ *
+ * + and - are *allowed* although '+' is probably used for userid+detail
+ * subaddressing and qmail users use '-' for subaddressing.
+ *
+ * Identifiers don't require a digit, really, so that should probably be
+ * relaxed, too.
+ */
+static char allowedchars[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00-0F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10-1F */
+ 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, /* 20-2F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, /* 30-3F */
+
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 40-4F */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, /* 50-5F */
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 60-6F */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, /* 70-7F */
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+ * or NULL if 'identifier' is invalid.
+ *
+ * XXX If any of the characters marked with 0 are valid and are cropping up,
+ * the right thing to do is probably to canonicalize the identifier to two
+ * representations: one for getpwent calls and one for folder names. The
+ * latter canonicalizes to a MUTF7 representation.
+ */
+static char *mycanonifyid(identifier, len)
+const char *identifier;
+size_t len;
+{
+ static char retbuf[81];
+ struct group *grp;
+ char sawalpha;
+ char *p;
+ int username_tolower = 0;
+
+ if(!len) len = strlen(identifier);
+ if(len >= sizeof(retbuf)) return NULL;
+
+ memmove(retbuf, identifier, len);
+ retbuf[len] = '\0';
+
+ /* This used to be far more restrictive, but many sites seem to ignore the
+ * ye olde Unix conventions of username. Specifically, we used to
+ * - drop case on the buffer
+ * - disallow lots of non-alpha characters ('-', '_', others)
+ * Now we do neither of these, but impose a very different policy based on
+ * the character map above.
+ */
+
+ if (!strncmp(retbuf, "group:", 6)) {
+ grp = getgrnam(retbuf+6);
+ if (!grp) return 0;
+ strcpy(retbuf+6, grp->gr_name);
+ return retbuf;
+ }
+
+ /* Copy the string and look up values in the allowedchars array above.
+ * If we see any we don't like, reject the string.
+ * Lowercase usernames if requested.
+ */
+ username_tolower = libcyrus_config_getswitch(CYRUSOPT_USERNAME_TOLOWER);
+ sawalpha = 0;
+ for(p = retbuf; *p; p++) {
+ if (username_tolower && isupper((unsigned char)*p))
+ *p = tolower((unsigned char)*p);
+
+ switch (allowedchars[*(unsigned char*) p]) {
+ case 0:
+ return NULL;
+
+ case 2:
+ sawalpha = 1;
+ /* FALL THROUGH */
+
+ default:
+ ;
+ }
+ }
+
+ /* we used to enforce "has to be one alpha char" */
+ /* now we don't */
+ /* if (!sawalpha) return NULL; */
+
+ return retbuf;
+}
+
+/*
+ * Set the current user to 'identifier'. 'cacheid', if non-null,
+ * points to a 16-byte binary key to cache identifier's information
+ * with.
+ */
+static struct auth_state *mynewstate(const char *identifier)
+{
+ struct auth_state *newstate;
+ struct passwd *pwd;
+ struct group *grp;
+ char **mem;
+
+ identifier = mycanonifyid(identifier, 0);
+ if (!identifier) return 0;
+ if (!strncmp(identifier, "group:", 6)) return 0;
+
+ newstate = (struct auth_state *)xmalloc(sizeof(struct auth_state));
+
+ strcpy(newstate->userid, identifier);
+ newstate->ngroups = 0;
+ newstate->group = NULL;
+
+ if(!libcyrus_config_getswitch(CYRUSOPT_AUTH_UNIX_GROUP_ENABLE))
+ return newstate;
+
+ pwd = getpwnam(identifier);
+
+ setgrent();
+ while ((grp = getgrent())) {
+ for (mem = grp->gr_mem; *mem; mem++) {
+ if (!strcmp(*mem, identifier)) break;
+ }
+
+ if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
+ newstate->ngroups++;
+ newstate->group = (char **)xrealloc((char *)newstate->group,
+ newstate->ngroups * sizeof(char *));
+ newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name);
+ }
+ }
+ endgrent();
+ return newstate;
+}
+
+static void myfreestate(auth_state)
+struct auth_state *auth_state;
+{
+ if (auth_state->group) free((char *)auth_state->group);
+ free((char *)auth_state);
+}
+
+
+struct auth_mech auth_unix =
+{
+ "unix", /* name */
+
+ &mycanonifyid,
+ &mymemberof,
+ &mynewstate,
+ &myfreestate,
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,215 @@
+/* bsearch.c -- binary search newline-separated fields in memory
+ $Id: bsearch.c,v 1.19 2003/02/13 20:15:39 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+#include <string.h>
+
+#include "bsearch.h"
+#include "util.h" /* TOLOWER and convert_to_lowercase */
+
+/* Case-dependent comparison converter.
+ * Treats \r and \t as end-of-string and treats '.' lower than
+ * everything else.
+ */
+#define TOCOMPARE(c) (convert_to_compare[(unsigned char)(c)])
+static unsigned char convert_to_compare[256] = {
+ 0x00, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+ 0x0a, 0x01, 0x01, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x02, 0x2f,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+ 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+ 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
+ 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+ 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
+ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
+ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
+ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
+ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
+ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
+ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
+};
+
+/*
+ * Search for a line starting with 'word'. The search ignores case if
+ * 'caseSensitive' is nonzero. The search is performed in 'base',
+ * which is of length 'len'. 'hint' gives a idea of where to start
+ * looking.
+ *
+ * On success, the offset in 'base' of the found line is returned and
+ * the length of the found line is put in the unsigned long pointed to
+ * by 'linelenp'. On failure, the offset in 'base' of where a new line should
+ * be inserted is returned and zero is put in the unsigned long pointed to
+ * by 'linelenp'.
+ */
+int bsearch_mem(const char *word,
+ int caseSensitive,
+ const char *base,
+ unsigned long len,
+ unsigned long hint,
+ unsigned long *linelenp)
+{
+ int firstsearch = 1;
+ unsigned long start = 0, end = len - 1, mid, offset;
+ unsigned long linelen;
+ long n;
+ int cmp = 0;
+ const char *wordp, *p;
+
+ while (start < end + 1) {
+ if (firstsearch) {
+ /* Use hint supplied by caller */
+ firstsearch = 0;
+ mid = offset = hint;
+ if (mid <= start || mid > end) mid = offset = start;
+ }
+ else {
+ /* Calculate position of middle of this range */
+ offset = mid = (start + end)/2;
+ }
+
+ if (mid) {
+ p = memchr(base+mid, '\n', (end + 1) - mid);
+ if (!p) {
+ end = mid - 1;
+ continue;
+ }
+ offset = p - base + 1;
+ }
+
+ p = memchr(base+offset, '\n', len-offset);
+ if (p) {
+ linelen = p - (base+offset) + 1;
+ }
+ else {
+ end = mid - 1;
+ continue;
+ }
+
+ n = linelen;
+ wordp = word;
+ p = base+offset;
+
+ if (caseSensitive) {
+ while (n-- > 0 && (cmp = TOCOMPARE(*wordp) - TOCOMPARE(*p)) == 0) {
+ wordp++;
+ p++;
+ }
+ if (n >= 0 && !*wordp) {
+ cmp = TOCOMPARE('\t') - TOCOMPARE(*p);
+ }
+ else if (!cmp) {
+ cmp = 1;
+ }
+ }
+ else {
+ while (n-- > 0 && (cmp = TOLOWER(*wordp) - TOLOWER(*p)) == 0) {
+ wordp++;
+ p++;
+ }
+ if (n >= 0 && !*wordp) {
+ cmp = TOLOWER('\t') - TOLOWER(*p);
+ }
+ else if (!cmp) {
+ cmp = 1;
+ }
+ }
+
+ if (!cmp) {
+ if (linelenp) *linelenp = linelen;
+ return offset;
+ }
+
+ if (cmp < 0) {
+ if (mid == 0) break;
+ end = mid - 1;
+ }
+ else {
+ start = offset + 1;
+ }
+ }
+
+ /* Word was not found. Return offset where word should be inserted */
+ if (linelenp) *linelenp = 0;
+ if (start > len) return len;
+ if (!start) return 0;
+ p = memchr(base+start, '\n', len-start);
+ return p - base + 1;
+}
+
+int bsearch_compare(const char *s1, const char *s2)
+{
+ int cmp;
+ char c2;
+
+ for (;;) {
+ if ((c2 = *s2) == 0) {
+ return (unsigned char)*s1;
+ }
+ cmp = TOCOMPARE(*s1) - TOCOMPARE(c2);
+ if (cmp) return cmp;
+ if (TOCOMPARE(c2) == TOCOMPARE('\t')) {
+ return 0;
+ }
+ s1++;
+ s2++;
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/bsearch.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,54 @@
+/* bsearch.h -- binary search
+ $Id: bsearch.h,v 1.7 2003/02/13 20:15:39 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_BSEARCH_H
+#define INCLUDED_BSEARCH_H
+
+extern int bsearch_mem(const char *word, int caseSensitive,
+ const char *base, unsigned long len,
+ unsigned long hint,
+ unsigned long *linelenp);
+
+extern int bsearch_compare(const char *s1, const char *s2);
+
+#endif /* INCLUDED_BSEARCH_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,95 @@
+/* byteorder64.c -- convert 64-bit values between host and network byte order
+ *
+ * Copyright (c) 2004 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: byteorder64.c,v 1.1.2.1 2004/08/09 18:51:21 ken3 Exp $
+ */
+
+#include <config.h>
+
+#if defined(HAVE_LONG_LONG_INT) && !defined(WORDS_BIGENDIAN)
+
+#include <netinet/in.h>
+
+/* Structure used to swap the bytes in a 64-bit unsigned long long. */
+union byteswap_64_u {
+ unsigned long long a;
+ uint32_t b[2];
+};
+
+/* Function to byteswap 64bit unsigned integers on
+ * little endian machines to big endian network order.
+ * On big endian machines this will be a null macro.
+ * The macro htonll() is defined in byteorder64.h,
+ * and if needed refers to _htonll() here.
+ */
+unsigned long long _htonll(unsigned long long x)
+{
+ union byteswap_64_u u1;
+ union byteswap_64_u u2;
+
+ u1.a = x;
+
+ u2.b[0] = htonl(u1.b[1]);
+ u2.b[1] = htonl(u1.b[0]);
+
+ return u2.a;
+}
+
+
+/* Function to byteswap big endian 64bit unsigned integers
+ * back to little endian host order on little endian machines.
+ * As above, on big endian machines this will be a null macro.
+ * The macro ntohll() is defined in byteorder64.h, and if needed,
+ * refers to _ntohll() here.
+ */
+unsigned long long _ntohll(unsigned long long x)
+{
+ union byteswap_64_u u1;
+ union byteswap_64_u u2;
+
+ u1.a = x;
+
+ u2.b[1] = ntohl(u1.b[0]);
+ u2.b[0] = ntohl(u1.b[1]);
+
+ return u2.a;
+}
+
+#endif /* defined(HAVE_LONG_LONG_INT) && !defined(WORDS_BIGENDIAN) */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/byteorder64.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,65 @@
+/* byteorder64.h -- convert 64-bit values between host and network byte order
+ *
+ * Copyright (c) 2004 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: byteorder64.h,v 1.1.2.2 2004/08/16 11:44:34 ken3 Exp $
+ */
+
+#ifndef _BYTEORDER64_H
+#define _BYTEORDER64_H
+
+#include <config.h>
+
+#ifdef HAVE_LONG_LONG_INT
+
+/* 64-bit host/network byte-order swap macros */
+#ifdef WORDS_BIGENDIAN
+#define htonll(x) (x)
+#define ntohll(x) (x)
+#else
+#define htonll(x) _htonll(x)
+#define ntohll(x) _ntohll(x)
+
+/* little-endian 64-bit host/network byte-order swap functions */
+extern unsigned long long _htonll(unsigned long long);
+extern unsigned long long _ntohll(unsigned long long);
+
+#endif /* WORDS_BIGENDIAN */
+#endif /* HAVE_LONG_LONG_INT */
+#endif /* _BYTEORDER64_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1404 @@
+/* charset.c -- International character set support
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * $Id: charset.c,v 1.44.2.3 2006/06/14 11:53:36 murch Exp $
+ */
+#include <config.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "assert.h"
+#include "charset.h"
+#include "xmalloc.h"
+#include "chartable.h"
+#include "util.h"
+
+extern const unsigned char chartables_long_translations[];
+extern const int charset_max_translation;
+extern const unsigned char chartables_unicode_block[256];
+extern const unsigned char chartables_unicode[][256][4];
+extern const unsigned char chartables_us_ascii[][256][4];
+extern const struct charset chartables_charset_table[];
+extern const int chartables_num_charsets;
+
+struct decode_state {
+ const unsigned char (*curtable)[256][4];
+ const unsigned char (*lasttable)[256][4];
+ const unsigned char (*initialtable)[256][4];
+ unsigned utfcode;
+ unsigned num_bits;
+ unsigned b64_value;
+};
+#define START(state,table) \
+ ((state).curtable = (state.initialtable) = (table)); \
+ ((state).lasttable = NULL); \
+ ((state).utfcode = 0); \
+ ((state).num_bits = 0); \
+ ((state).b64_value = 0);
+
+
+static int xlate(int index, char *to);
+static int writeutf8(unsigned utfcode, char *to);
+
+#define TRANSLATE(state,c,ptr,idx) \
+{ \
+ unsigned char _ch; \
+ const unsigned char *_translation = (state).curtable[0][(unsigned char)(c) & 0xff]; \
+ for (;;) { \
+ switch (_ch = *_translation++) { \
+ case JSR: \
+ (state).lasttable = (state).curtable; \
+ /* FALL THROUGH */ \
+ case JMP: \
+ (state).curtable = ((state).initialtable + \
+ (_translation[0]<<8) + (_translation[1])); \
+ break; \
+ \
+ case RET: \
+ (state).curtable = (state).lasttable; \
+ /* FALL THROUGH */ \
+ case END: \
+ break; \
+\
+ case U7F: \
+ (state).b64_value = 0; \
+ (state).num_bits = 0; \
+ (state).curtable = ((state).initialtable + 1); \
+ /* FALL THROUGH */ \
+ case U7N: \
+ (state).b64_value <<= 6; \
+ (state).b64_value += index_64[(unsigned char)(c) & 0xff]; \
+ (state).num_bits += 6; \
+ if ((state).num_bits >= 16) { \
+ (state).num_bits -= 16; \
+ (state).utfcode = \
+ ((state).b64_value >> (state).num_bits) & 0x7fff; \
+ idx += writeutf8((state).utfcode, ptr+idx); \
+ } \
+ break; \
+\
+ case U83: \
+ (state).lasttable = (state).curtable; \
+ (state).utfcode = (c & 0x0f) << 12; \
+ (state).curtable = ((state).initialtable + 1); \
+ break; \
+\
+ case U83_2: \
+ (state).utfcode += (c & 0x3f) << 6; \
+ (state).curtable = ((state).initialtable + 2); \
+ break; \
+\
+ case U83_3: \
+ (state).utfcode += (c & 0x03f); \
+ (state).curtable = (state).initialtable; \
+ idx += writeutf8((state).utfcode, ptr+idx); \
+ break; \
+ \
+ case XLT: \
+ idx += xlate((_translation[0]<<8) + (_translation[1]), ptr+idx); \
+ _translation += 2; /* next translation is a RET or END */ \
+ continue; \
+ \
+ default: \
+ (ptr)[(idx)++] = _ch; \
+ continue; \
+ } \
+ break; \
+ } \
+}
+
+/* for a comp_pat, ascii[0x80] == 0 if there are any non-ascii characters
+ in the pattern */
+struct comp_pat_s {
+ int pat[256]; /* boyer-moore skip table */
+ int ascii[256]; /* case-mapped version of table */
+ int patlen;
+ int patlastchar; /* last character in the pattern */
+ int patotherlastchar; /* case-flip of the last character */
+};
+
+#define PATASCII(pat) (pat+256)
+#define PATLEN(pat) ((pat)[512])
+#define PATLASTCHAR(pat) ((pat)[513]) /* last character in the pattern */
+#define PATOTHERLASTCHAR(pat) ((pat)[514]) /* case-flip of the pattern */
+#define PATSIZE 515
+
+#define GROWSIZE 100
+
+#define XX 127
+/*
+ * Table for decoding hexadecimal in quoted-printable
+ */
+static const char index_hex[256] = {
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,XX,XX, XX,XX,XX,XX,
+ XX,10,11,12, 13,14,15,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,10,11,12, 13,14,15,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+};
+#define HEXCHAR(c) (index_hex[(unsigned char)(c)])
+
+/*
+ * Table for decoding base64
+ */
+static const char index_64[256] = {
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,62, XX,XX,XX,63,
+ 52,53,54,55, 56,57,58,59, 60,61,XX,XX, XX,XX,XX,XX,
+ XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
+ 15,16,17,18, 19,20,21,22, 23,24,25,XX, XX,XX,XX,XX,
+ XX,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
+ 41,42,43,44, 45,46,47,48, 49,50,51,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+};
+#define CHAR64(c) (index_64[(unsigned char)(c)])
+
+#define USASCII(c) (chartables_us_ascii[0][(unsigned char)(c)][0])
+
+/*
+ * Lookup the character set 'name'. Returns the character set number
+ * or -1 if there is no matching character set.
+ */
+int charset_lookupname(const char *name)
+{
+ int i;
+
+ for (i=0; i<chartables_num_charsets; i++) {
+ if (!strcasecmp(name, chartables_charset_table[i].name)) return i;
+ }
+ return -1;
+}
+
+/*
+ * Convert the string 's' in the character set numbered 'charset'
+ * into canonical searching form. Decodes into 'retval', which
+ * must be reallocable and currently at least size 'alloced'.
+ */
+char *charset_convert(const char *s, int charset, char *retval,
+ int alloced)
+{
+ int pos = 0;
+ struct decode_state state;
+
+ if (!s) return 0;
+
+ if (charset < 0 || charset >= chartables_num_charsets) return xstrdup(EMPTY_STRING);
+
+ START(state,chartables_charset_table[charset].table);
+
+ if (!alloced) {
+ alloced = GROWSIZE;
+ retval = xmalloc(alloced);
+ }
+ *retval = '\0';
+
+ while (*s) {
+ if (pos + charset_max_translation >= alloced) {
+ alloced += GROWSIZE;
+ retval = xrealloc(retval, alloced);
+ }
+ TRANSLATE(state, *s, retval, pos);
+ s++;
+ }
+
+ retval[pos] = '\0';
+ return retval;
+}
+
+/*
+ * Decode MIME strings (per RFC 2047) in 's'. It writes the decoded
+ * string to 'retval', calling realloc() as needed. (Thus retval may
+ * be NULL.) Returns retval, contining 's' in canonical searching form.
+ */
+char *charset_decode_mimeheader(const char *s, char *retval, int alloced)
+{
+ int eatspace = 0;
+ const char *start, *endcharset, *encoding, *end;
+ const char *p;
+ int i, c, c1, c2, c3, c4;
+ struct decode_state state;
+ int pos = 0;
+ int len;
+
+ if (!s) return 0;
+
+ START(state,chartables_charset_table[0].table); /* just for msvc lint */
+ start = s;
+ while ((start = (const char*) strchr(start, '=')) != 0) {
+ start++;
+ if (*start != '?') continue;
+ encoding = (const char*) strchr(start+1, '?');
+ if (!encoding) continue;
+ endcharset =
+ (const char*) strchr(start+1, '*'); /* Language code delimiter */
+ if (!endcharset || endcharset > encoding) endcharset = encoding;
+ if (encoding[1] != 'b' && encoding[1] != 'B' &&
+ encoding[1] != 'q' && encoding[1] != 'Q') continue;
+ if (encoding[2] != '?') continue;
+ end = (const char*) strchr(encoding+3, '?');
+ if (!end || end[1] != '=') continue;
+
+ /*
+ * We have recognized a valid 1522-word.
+ * Copy over leading text, unless it consists entirely of
+ * whitespace and is between two 1522-words.
+ */
+ if (eatspace) {
+ for (p = s; p < (start-1) && isspace((int) *p); p++);
+ if (p < (start-1)) eatspace = 0;
+ }
+ if (!eatspace) {
+ len = start - s - 1;
+ if (pos + len >= alloced) {
+ alloced += len + GROWSIZE;
+ retval = xrealloc(retval, alloced);
+ }
+ while (len--) {
+ c = USASCII(*s);
+ if (c != END) retval[pos++] = (char)c;
+ s++;
+ }
+ }
+
+ /*
+ * Get the 1522-word's character set
+ */
+ start++;
+ for (i=0; i<chartables_num_charsets; i++) {
+ if ((int)strlen(chartables_charset_table[i].name) == endcharset-start &&
+ !strncasecmp(start, chartables_charset_table[i].name, endcharset-start)) {
+ START(state,chartables_charset_table[i].table);
+ break;
+ }
+ }
+
+ if (i == chartables_num_charsets) {
+ /* Unrecognized charset, nothing will match here */
+ if (pos + 2 >= alloced) {
+ alloced += 2 + GROWSIZE;
+ retval = xrealloc(retval, alloced);
+ }
+ strcpy(retval+pos, EMPTY_STRING);
+ pos += 1;
+ }
+ else if (encoding[1] == 'q' || encoding[1] == 'Q') {
+ /* Decode 'Q' encoding */
+ p = encoding+3;
+ while (p < end) {
+ c = *p++;
+ if (c == '=') {
+ c = HEXCHAR(*p);
+ p++;
+ i = HEXCHAR(*p);
+ p++;
+ if (c == XX || i == XX) {
+ c = '\0';
+ }
+ else {
+ c = (char)((c << 4) + i);
+ }
+ }
+ else if (c == '_') c = ' ';
+
+ if (pos + charset_max_translation >= alloced) {
+ alloced += GROWSIZE;
+ retval = xrealloc(retval, alloced);
+ }
+ TRANSLATE(state, c, retval, pos);
+ }
+ }
+ else {
+ /* Decode 'B' encoding */
+ p = encoding+3;
+ while (p < end) {
+ if (pos + charset_max_translation*3 >= alloced) {
+ alloced += GROWSIZE;
+ retval = xrealloc(retval, alloced);
+ }
+ c1 = CHAR64(p[0]);
+ if (c1 == XX) break;
+ c2 = CHAR64(p[1]);
+ if (c2 == XX) break;
+ TRANSLATE(state,((c1<<2) | ((c2&0x30)>>4)), retval, pos);
+
+ c3 = CHAR64(p[2]);
+ if (c3 == XX) break;
+ TRANSLATE(state,(((c2&0XF)<<4) | ((c3&0x3C)>>2)), retval, pos);
+
+ c4 = CHAR64(p[3]);
+ if (c4 == XX) break;
+ TRANSLATE(state,(((c3&0x03) <<6) | c4), retval, pos);
+
+ p += 4;
+ }
+ }
+
+ /* Prepare for the next iteration */
+ s = start = end+2;
+ eatspace = 1;
+ }
+
+ /* Copy over the tail part of the input string */
+ len = strlen(s);
+ if (pos + len >= alloced) {
+ alloced += len + 1;
+ retval = xrealloc(retval, alloced);
+ }
+ while (len--) {
+ c = USASCII(*s);
+ if (c != END) retval[pos++] = (char)c;
+ s++;
+ }
+ retval[pos] = '\0';
+ return retval;
+}
+
+/*
+ * Compile the pattern 's' and return a pointer to the compiled form
+ */
+comp_pat *charset_compilepat(const char *s)
+{
+ comp_pat *pat;
+ int i, c, len;
+
+ pat = (comp_pat *)xmalloc(PATSIZE * sizeof(comp_pat));
+ PATLEN(pat) = len = strlen(s);
+ if (len) {
+ PATLASTCHAR(pat) = c = (unsigned char)s[len-1];
+ if (isupper(c)) PATOTHERLASTCHAR(pat) = TOLOWER(c);
+ else if (islower(c)) PATOTHERLASTCHAR(pat) = TOUPPER(c);
+ else PATOTHERLASTCHAR(pat) = c;
+ }
+ for (i=0; i<512; i++) pat[i] = len;
+ for (i=0; i<len; i++) {
+ c = (unsigned char)s[i];
+ PATASCII(pat)[c] = pat[c] = len-i-1;
+ if (c & 0x80) PATASCII(pat)[0x80] = 0;
+ }
+ for (i='A'; i<='Z'; i++) {
+ PATASCII(pat)[i] = PATASCII(pat)[i-'A'+'a'];
+ }
+ return pat;
+}
+
+/*
+ * Free the compiled pattern 'pat'
+ */
+void charset_freepat(comp_pat *pat)
+{
+ free((char *)pat);
+}
+
+/*
+ * Search for the string 'substr', with compiled pattern 'pat'
+ * in the string 's', with length 'len'. Return nonzero if match
+ */
+int charset_searchstring(const char *substr, comp_pat *pat,
+ const char *s, int len)
+{
+ int i, j, large;
+
+ assert(pat != NULL);
+ i = PATLEN(pat) - 1;
+ if (i < 0) return 1;
+ pat[PATLASTCHAR(pat)] = large = len + i + 2;
+ for (;;) {
+ /* Inner loop -- scan until last char match or end of string */
+ while (i < len) {
+ i += pat[(unsigned char)s[i]];
+ }
+
+ /* End of string */
+ if (i < large) return 0;
+
+ /* Last char match--back up and do compare */
+ i -= large + 1;
+ j = PATLEN(pat) - 2;
+ while (j >= 0 && s[i] == substr[j]) {
+ i--;
+ j--;
+ }
+ if (j < 0) return 1; /* Found match */
+ if (pat[(unsigned char)s[i]] == large ||
+ pat[(unsigned char)s[i]] < PATLEN(pat)-j) {
+ i += PATLEN(pat) - j;
+ }
+ else {
+ i += pat[(unsigned char)s[i]];
+ }
+ }
+}
+
+static int xlate(int index, char *to) {
+ const unsigned char *from = chartables_long_translations + index;
+ int i = 0;
+
+ while ((*to++ = *from++) != END) i++;
+ return i;
+}
+
+static int writeutf8(unsigned utfcode, char *to)
+{
+ int table = chartables_unicode_block[utfcode>>8];
+ int idx = 0;
+ struct decode_state state;
+
+ if (table == 255) {
+ /* No translations in this block */
+ if (utfcode > 0x7ff) {
+ to[0] = (char)(0xE0 + (utfcode >> 12));
+ to[1] = (char)(0x80 + ((utfcode >> 6) & 0x3f));
+ to[2] = (char)(0x80 + (utfcode & 0x3f));
+ return 3;
+ }
+ if (utfcode > 0x7f) {
+ to[0] = (char)(0xC0 + (utfcode >> 6));
+ to[1] = (char)(0x80 + (utfcode & 0x3f));
+ return 2;
+ }
+ to[0] = (char)utfcode;
+ return 1;
+ }
+
+ START(state, chartables_unicode + table);
+ TRANSLATE(state, (utfcode & 0xff), to, idx);
+
+ return idx;
+
+}
+
+/*
+ * The various charset_searchfile() helper functions
+ */
+struct input_state;
+typedef int rawproc_t(struct input_state *state, char *buf, int size);
+
+static int charset_readconvert(struct input_state *state, char *buf, int size);
+static rawproc_t charset_readplain;
+static rawproc_t charset_readplain_nospc;
+static rawproc_t charset_readmapnl;
+static rawproc_t charset_readqp;
+static rawproc_t charset_readqp_nospc;
+static rawproc_t charset_readqpmapnl;
+static rawproc_t charset_readbase64;
+static rawproc_t charset_readbase64_nospc;
+
+/*
+ * State for the various charset_searchfile() helper functions
+ */
+struct input_state {
+ rawproc_t *rawproc; /* Function to read and transfer-decode data */
+ const char *rawbase; /* Location in mapped file of raw data */
+ int rawlen; /* # bytes raw data left to read from file */
+ char decodebuf[2048]; /* Buffer of data deocded, but not converted
+ * into canonical searching form */
+ int decodestart, decodeleft; /* Location/count of decoded data */
+ struct decode_state decodestate; /* Charset state to convert decoded data
+ * into canonical searching form */
+};
+
+
+/*
+ * Search for the string 'substr' in the next 'len' bytes of
+ * 'msg_base'. If 'mapnl' is nonzero, then LF characters in the file
+ * map to CR LF and count as 2 bytes w.r.t. the value of 'len'.
+ * 'charset' and 'encoding' specify the character set and
+ * content transfer encoding of the data, respectively.
+ * Returns nonzero iff the string was found.
+ */
+int charset_searchfile(const char *substr, comp_pat *pat,
+ const char *msg_base, int mapnl, int len, int charset, int encoding)
+{
+ int substrlen = PATLEN(pat);
+ char *buf, smallbuf[2048];
+ int bufsize;
+ int n;
+ int i, j, large;
+ struct input_state state;
+
+ /* Initialize character set mapping */
+ if (charset < 0 || charset >= chartables_num_charsets) return 0;
+ START(state.decodestate, chartables_charset_table[charset].table);
+ state.decodeleft = 0;
+
+ /* check for trivial search */
+ if (substrlen == 0) return 1;
+
+ /*
+ * Select buffer to hold canonical searching fomat data to
+ * search
+ */
+ if (substrlen < sizeof(smallbuf)/2) {
+ bufsize = sizeof(smallbuf);
+ buf = smallbuf;
+ }
+ else {
+ bufsize = substrlen+sizeof(smallbuf);
+ buf = xmalloc(bufsize);
+ }
+
+ /* Optimized searching of us-ascii, using boyer-moore */
+ if (charset == 0) {
+ /* Initialize transfer-decoding */
+ state.rawbase = msg_base;
+ state.rawlen = len;
+ /* don't need to special case mapnl since all such chars will
+ be ignored, anyway */
+ switch (encoding) {
+ case ENCODING_NONE:
+ state.rawproc = charset_readplain_nospc;
+ break;
+
+ case ENCODING_QP:
+ state.rawproc = charset_readqp_nospc;
+ break;
+
+ case ENCODING_BASE64:
+ state.rawproc = charset_readbase64_nospc;
+ /* XXX have to have nl-mapping base64 in order to
+ * properly count \n as 2 raw characters
+ */
+ break;
+
+ default:
+ /* Don't know encoding--nothing can match */
+ return 0;
+ }
+
+ if (PATASCII(pat)[0x80] == 0) {
+ /* 8-bit chars in pattern--search must fail */
+ if (buf != smallbuf) free(buf);
+ return 0;
+ }
+
+ n = (*state.rawproc)(&state, buf, bufsize);
+ if (n < substrlen) {
+ if (buf != smallbuf) free(buf);
+ return 0;
+ }
+ i = substrlen - 1;
+ PATASCII(pat)[PATLASTCHAR(pat)] =
+ PATASCII(pat)[PATOTHERLASTCHAR(pat)] = large = bufsize + i + 2;
+
+ for (;;) {
+ /* Inner loop -- scan until last char match or end of buffer */
+ while (i < n) {
+ i += PATASCII(pat)[(unsigned char)buf[i]];
+ }
+
+ /* End of buffer */
+ if (i < large) {
+ /* Read in more stuff */
+ j = i-n;
+ strncpy(buf, buf+i-(substrlen-1), substrlen-1-j);
+ n = (*state.rawproc)(&state, buf+substrlen-1-j, bufsize-substrlen+1+j);
+ i = substrlen-1;
+ if (n > 0) {
+ n += i-j;
+ continue;
+ }
+ if (buf != smallbuf) free(buf);
+ return 0;
+ }
+
+ /* Last char match--back up and do compare */
+ i -= large + 1;
+ j = PATLEN(pat) - 2;
+ while (j >= 0 && TOLOWER(buf[i]) == TOLOWER(substr[j])) {
+ i--;
+ j--;
+ }
+ if (j < 0) {
+ /* Found match */
+ if (buf != smallbuf) free(buf);
+ return 1;
+ }
+ if (PATASCII(pat)[(unsigned char)buf[i]] == large ||
+ PATASCII(pat)[(unsigned char)buf[i]] < PATLEN(pat)-j) {
+ i += PATLEN(pat) - j;
+ }
+ else {
+ i += PATASCII(pat)[(unsigned char)buf[i]];
+ }
+ }
+ /* NOTREACHED */
+ }
+
+ /* Do the (generalized) search */
+
+ /* Initialize transfer-decoding */
+ state.rawbase = msg_base;
+ state.rawlen = len;
+ switch (encoding) {
+ case ENCODING_NONE:
+ state.rawproc = mapnl ? charset_readmapnl : charset_readplain;
+ break;
+
+ case ENCODING_QP:
+ state.rawproc = mapnl ? charset_readqpmapnl : charset_readqp;
+ break;
+
+ case ENCODING_BASE64:
+ state.rawproc = charset_readbase64;
+ /* XXX have to have nl-mapping base64 in order to
+ * properly count \n as 2 raw characters
+ */
+ break;
+
+ default:
+ /* Don't know encoding--nothing can match */
+ return 0;
+ }
+
+ n = charset_readconvert(&state, buf, bufsize);
+ if (n < substrlen) {
+ if (buf != smallbuf) free(buf);
+ return 0;
+ }
+ i = substrlen - 1;
+ pat[PATLASTCHAR(pat)] = large = bufsize + i + 2;
+ for (;;) {
+ /* Inner loop -- scan until last char match or end of buffer */
+ while (i < n) {
+ i += pat[(unsigned char)buf[i]];
+ }
+
+ /* End of buffer */
+ if (i < large) {
+ /* Read in more stuff */
+ j = i-n;
+ strncpy(buf, buf+i-(substrlen-1), substrlen-1-j);
+ n = charset_readconvert(&state, buf+substrlen-1-j,
+ bufsize-substrlen+1+j);
+ i = substrlen-1;
+ if (n > 0) {
+ n += i-j;
+ continue;
+ }
+ if (buf != smallbuf) free(buf);
+ return 0;
+ }
+
+ /* Last char match--back up and do compare */
+ i -= large + 1;
+ j = PATLEN(pat) - 2;
+ while (j >= 0 && buf[i] == substr[j]) {
+ i--;
+ j--;
+ }
+ if (j < 0) {
+ /* Found match */
+ if (buf != smallbuf) free(buf);
+ return 1;
+ }
+ if (pat[(unsigned char)buf[i]] == large ||
+ pat[(unsigned char)buf[i]] < PATLEN(pat)-j) {
+ i += PATLEN(pat) - j;
+ }
+ else {
+ i += pat[(unsigned char)buf[i]];
+ }
+ }
+}
+
+/* This is based on charset_searchfile above. */
+int charset_extractfile(index_search_text_receiver_t receiver,
+ void* rock, int uid, const char *msg_base, int mapnl, int len, int charset,
+ int encoding) {
+ char buf[2048];
+ int n;
+ struct input_state state;
+
+ /* Initialize character set mapping */
+ if (charset < 0 || charset >= chartables_num_charsets) return 0;
+ START(state.decodestate, chartables_charset_table[charset].table);
+ state.decodeleft = 0;
+
+ /* Initialize transfer-decoding */
+ state.rawbase = msg_base;
+ state.rawlen = len;
+ switch (encoding) {
+ case ENCODING_NONE:
+ state.rawproc = mapnl ? charset_readmapnl : charset_readplain;
+ break;
+
+ case ENCODING_QP:
+ state.rawproc = mapnl ? charset_readqpmapnl : charset_readqp;
+ break;
+
+ case ENCODING_BASE64:
+ state.rawproc = charset_readbase64;
+ /* XXX have to have nl-mapping base64 in order to
+ * properly count \n as 2 raw characters
+ */
+ break;
+
+ default:
+ /* Don't know encoding--nothing can match */
+ return 0;
+ }
+
+ /* We don't need to do anything tricky. Just read and convert each block of the
+ text, then hand the converted text down to the receiver. */
+ do {
+ n = charset_readconvert(&state, buf, sizeof(buf));
+ if (n > 0) {
+ receiver(uid, SEARCHINDEX_PART_BODY,
+ SEARCHINDEX_CMD_APPENDPART, buf, n, rock);
+ }
+ } while (n > 0);
+
+ return 1;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of converted
+ * (into canonical searching format) data into 'buf'. Returns
+ * the number of converted bytes, or 0 for end-of-data.
+ */
+static int charset_readconvert(struct input_state *state, char *buf, int size)
+{
+ int retval = 0;
+
+ if (state->decodeleft && state->decodestart != 0) {
+ memmove(state->decodebuf, state->decodebuf+state->decodestart,
+ state->decodeleft);
+ }
+ state->decodestart = 0;
+
+ state->decodeleft += (*state->rawproc)(state,
+ state->decodebuf+state->decodeleft,
+ sizeof(state->decodebuf)-state->decodeleft);
+
+ while (state->decodeleft) {
+ if (retval + charset_max_translation > size) {
+ return retval;
+ }
+ TRANSLATE(state->decodestate, state->decodebuf[state->decodestart], buf, retval);
+ state->decodestart++;
+ state->decodeleft--;
+ }
+ return retval;
+}
+
+/*
+ * Decode the MIME body part (per RFC 2045) of 'len' bytes located at
+ * 'msg_base' having the content transfer 'encoding'. Decodes into
+ * 'retval' (if necessary), which must be reallocable and currently at
+ * least size 'alloced'. Returns the number of decoded bytes in
+ * 'outlen'.
+ */
+char *charset_decode_mimebody(const char *msg_base, int len, int encoding,
+ char **retval, int alloced, int *outlen)
+{
+ struct input_state state;
+
+ /* Initialize transfer-decoding */
+ state.rawbase = msg_base;
+ state.rawlen = len;
+
+ switch (encoding) {
+ case ENCODING_NONE:
+ *outlen = len;
+ return (char *) msg_base;
+
+ case ENCODING_QP:
+ state.rawproc = charset_readqp;
+ break;
+
+ case ENCODING_BASE64:
+ state.rawproc = charset_readbase64;
+ break;
+
+ default:
+ /* Don't know encoding--nothing can match */
+ return NULL;
+ }
+
+ if (alloced < len+1) *retval = xrealloc(*retval, len+1);
+ *outlen = (*state.rawproc)(&state, *retval, len);
+ (*retval)[*outlen] = '\0';
+ return *retval;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of trivial
+ * transfer-decoded data into 'buf'. Returns the number of decoded
+ * bytes, or 0 for end-of-data.
+ */
+static int charset_readplain(struct input_state *state, char *buf, int size)
+{
+ if (size > state->rawlen) size = state->rawlen;
+ if (!size) return 0;
+
+ memcpy(buf, state->rawbase, size);
+ state->rawlen -= size;
+ state->rawbase += size;
+
+ return size;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of trivial
+ * transfer-decoded data into 'buf'. Removes any US-ASCII whitespace.
+ * Returns the number of decoded bytes, or 0 for end-of-data.
+ */
+static int charset_readplain_nospc(struct input_state *state,
+ char *buf, int size)
+{
+ int i;
+
+ for (i = 0; i < size; i++) {
+ /* remove any whitespace at the beginning of rawbase */
+ while (state->rawlen > 0 && USASCII(*state->rawbase) == END) {
+ state->rawlen--;
+ state->rawbase++;
+ }
+
+ if (state->rawlen == 0) break;
+
+ /* copy a char */
+ buf[i] = *state->rawbase++;
+ state->rawlen--;
+ }
+
+ return i;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of trivial newline-mapped
+ * transfer-decoded data into 'buf'. Returns the number of decoded
+ * bytes, or 0 for end-of-data.
+ */
+static int charset_readmapnl(struct input_state *state, char *buf, int size)
+{
+ int retval = 0;
+ char c;
+
+ while (size && state->rawlen > 0) {
+ c = *state->rawbase;
+ if (c == '\n') {
+ if (size < 2) {
+ return retval;
+ }
+ *buf++ = '\r';
+ retval++;
+ size--;
+ state->rawlen--;
+ }
+ *buf++ = c;
+ state->rawbase++;
+ state->rawlen--;
+ retval++;
+ size--;
+ }
+ return retval;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of quoted-printable
+ * transfer-decoded data into 'buf'. Returns the number of decoded
+ * bytes, or 0 for end-of-data.
+ */
+static int charset_readqp(struct input_state *state, char *buf, int size)
+{
+ int retval = 0;
+ int c, c1, c2;
+ const char *nextline, *endline;
+
+ nextline = endline = state->rawbase;
+
+ while (size && state->rawlen) {
+ if (state->rawbase >= nextline) {
+ /* Ignore trailing whitespace at end of line */
+
+ nextline =
+ (const char*) memchr(state->rawbase+1, '\r', state->rawlen-1);
+ if (!nextline) nextline = state->rawbase + state->rawlen;
+ endline = nextline;
+ while (endline > state->rawbase &&
+ (endline[-1] == ' ' || endline[-1] == '\t')) {
+ endline--;
+ }
+ }
+ if (state->rawbase >= endline) {
+ state->rawbase += nextline - endline;
+ state->rawlen -= nextline - endline;
+ continue;
+ }
+
+ c = state->rawbase[0];
+ if (c == '=') {
+ if (state->rawlen < 3) {
+ return retval;
+ }
+ c1 = state->rawbase[1];
+ c2 = state->rawbase[2];
+ state->rawbase += 3;
+ state->rawlen -= 3;
+ c1 = HEXCHAR(c1);
+ c2 = HEXCHAR(c2);
+ /* Following line also takes care of soft line breaks */
+ if (c1 == XX && c2 == XX) continue;
+ *buf++ = (char)((c1 << 4) + c2);
+ retval++;
+ size--;
+ }
+ else {
+ state->rawbase++;
+ state->rawlen--;
+ *buf++ = (char)c;
+ retval++;
+ size--;
+ }
+ }
+ return retval;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of quoted-printable
+ * transfer-decoded data into 'buf'. Returns the number of decoded
+ * bytes, or 0 for end-of-data. Removes any US-ASCII whitespace.
+ * Since it just throws out \r's anyway, it's simplier than paying
+ * attention to them
+ */
+static int charset_readqp_nospc(struct input_state *state, char *buf, int size)
+{
+ int retval = 0;
+ int c, c1, c2;
+ char dec;
+ const char *nextline, *endline;
+
+ nextline = endline = state->rawbase;
+
+ while (size && state->rawlen) {
+ if (state->rawbase >= nextline) {
+ /* Ignore trailing whitespace at end of line */
+
+ nextline =
+ (const char*) memchr(state->rawbase+1, '\n', state->rawlen-1);
+ if (!nextline) nextline = state->rawbase + state->rawlen;
+ endline = nextline;
+ while (endline > state->rawbase && (USASCII(endline[-1]) == END)) {
+ endline--;
+ }
+ }
+ if (state->rawbase >= endline) {
+ state->rawbase += nextline - endline;
+ state->rawlen -= nextline - endline;
+ continue;
+ }
+
+ c = state->rawbase[0];
+ if (c == '=') {
+ if (state->rawlen < 3) {
+ return retval;
+ }
+ c1 = state->rawbase[1];
+ c2 = state->rawbase[2];
+ state->rawbase += 3;
+ state->rawlen -= 3;
+ c1 = HEXCHAR(c1);
+ c2 = HEXCHAR(c2);
+ /* Following line also takes care of soft line breaks */
+ if (c1 == XX && c2 == XX) continue;
+ dec = (char)((c1 << 4) + c2);
+ if (USASCII(dec) != END) {
+ /* non-whitespace, take it */
+ *buf++ = (char)((c1 << 4) + c2);
+ retval++;
+ size--;
+ }
+ }
+ else {
+ state->rawbase++;
+ state->rawlen--;
+ if (USASCII(c) != END) {
+ /* non-whitespace, grab it */
+ *buf++ = (char)c;
+ retval++;
+ size--;
+ }
+ }
+ }
+ return retval;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of QP newline-mapped
+ * transfer-decoded data into 'buf'. Returns the number of decoded
+ * bytes, or 0 for end-of-data.
+ */
+static int charset_readqpmapnl(struct input_state *state, char *buf, int size)
+{
+ int retval = 0;
+ int c, c1, c2;
+ const char *nextline, *endline;
+
+ nextline = endline = state->rawbase;
+
+ while (size && state->rawlen > 0) {
+ if (state->rawbase >= nextline) {
+ /* Ignore trailing whitespace at end of line */
+
+ nextline = (const char*)
+ memchr(state->rawbase+1, '\n', state->rawlen - 1);
+ if (!nextline) nextline = state->rawbase + state->rawlen;
+ endline = nextline;
+ while (endline > state->rawbase &&
+ (endline[-1] == ' ' || endline[-1] == '\t')) {
+ endline--;
+ }
+ }
+ if (state->rawbase >= endline) {
+ state->rawbase += nextline - endline;
+ state->rawlen -= nextline - endline;
+ continue;
+ }
+
+ c = state->rawbase[0];
+ if (c == '=') {
+ if (state->rawbase+1 == endline) {
+ state->rawbase = nextline + 1;
+ state->rawlen -= 3 + (nextline - endline);
+
+ continue;
+ }
+ if (state->rawlen < 3) {
+ return retval;
+ }
+ c1 = state->rawbase[1];
+ c2 = state->rawbase[2];
+ state->rawbase += 3;
+ state->rawlen -= 3;
+ if (c2 == '\n') state->rawlen--;
+ c1 = HEXCHAR(c1);
+ c2 = HEXCHAR(c2);
+ if (c1 == XX && c2 == XX) continue;
+ *buf++ = (char)((c1 << 4) + c2);
+ retval++;
+ size--;
+ }
+ else if (c == '\n') {
+ if (size < 2) {
+ return retval;
+ }
+ state->rawbase++;
+ state->rawlen -= 2;
+ *buf++ = '\r';
+ *buf++ = '\n';
+ retval += 2;
+ size -= 2;
+ }
+ else {
+ state->rawbase++;
+ state->rawlen--;
+ *buf++ = (char)c;
+ retval++;
+ size--;
+ }
+ }
+ return retval;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of base64
+ * transfer-decoded data into 'buf'. Returns the number of decoded
+ * bytes, or 0 for end-of-data.
+ */
+static int charset_readbase64(struct input_state *state, char *buf, int size)
+{
+ int retval = 0;
+ int c1, c2, c3, c4;
+
+ while (size >= 3 && state->rawlen) {
+ do {
+ c1 = *state->rawbase++;
+ state->rawlen--;
+ if (c1 == '=') {
+ state->rawlen = 0;
+ return retval;
+ }
+ } while (state->rawlen && CHAR64(c1) == XX);
+ if (!state->rawlen) {
+ return retval;
+ }
+
+ do {
+ c2 = *state->rawbase++;
+ state->rawlen--;
+ if (c2 == '=') {
+ state->rawlen = 0;
+ return retval;
+ }
+ } while (state->rawlen && CHAR64(c2) == XX);
+ if (!state->rawlen) {
+ return retval;
+ }
+
+ do {
+ c3 = *state->rawbase++;
+ state->rawlen--;
+ if (c3 == '=') {
+ *buf++ = (char)((CHAR64(c1)<<2) | ((CHAR64(c2)&0x30)>>4));
+ retval++;
+ state->rawlen = 0;
+ return retval;
+ }
+ } while (state->rawlen && CHAR64(c3) == XX);
+ if (!state->rawlen) {
+ return retval;
+ }
+
+ do {
+ c4 = *state->rawbase++;
+ state->rawlen--;
+ if (c4 == '=') {
+ *buf++ = (char)((CHAR64(c1)<<2) | ((CHAR64(c2)&0x30)>>4));
+ *buf++ = (char)(((CHAR64(c2)&0xf)<<4) | ((CHAR64(c3)&0x3c)>>2));
+ retval += 2;
+ state->rawlen = 0;
+ return retval;
+ }
+ } while (state->rawlen && CHAR64(c4) == XX);
+ if (CHAR64(c4) == XX) {
+ return retval;
+ }
+
+ *buf++ = (char)((CHAR64(c1)<<2) | ((CHAR64(c2)&0x30)>>4));
+ *buf++ = (char)(((CHAR64(c2)&0xf)<<4) | ((CHAR64(c3)&0x3c)>>2));
+ *buf++ = (char)(((CHAR64(c3)&0x3)<<6) | CHAR64(c4));
+ retval += 3;
+ size -= 3;
+ }
+ return retval;
+}
+
+/*
+ * Helper function to read at most 'size' bytes of base64
+ * transfer-decoded data into 'buf'. Returns the number of decoded
+ * bytes, or 0 for end-of-data. Removes any US-ASCII whitespace.
+ */
+static int charset_readbase64_nospc(struct input_state *state,
+ char *buf, int size)
+{
+ int retval = 0;
+ int c1, c2, c3, c4;
+ char dec;
+
+ while (size >= 3 && state->rawlen) {
+ do {
+ c1 = *state->rawbase++;
+ state->rawlen--;
+ if (c1 == '=') {
+ state->rawlen = 0;
+ return retval;
+ }
+ } while (state->rawlen && CHAR64(c1) == XX);
+ if (!state->rawlen) {
+ return retval;
+ }
+
+ do {
+ c2 = *state->rawbase++;
+ state->rawlen--;
+ if (c2 == '=') {
+ state->rawlen = 0;
+ return retval;
+ }
+ } while (state->rawlen && CHAR64(c2) == XX);
+ if (!state->rawlen) {
+ return retval;
+ }
+
+ do {
+ c3 = *state->rawbase++;
+ state->rawlen--;
+ if (c3 == '=') {
+ dec = (char)((CHAR64(c1)<<2) | ((CHAR64(c2)&0x30)>>4));
+ if (USASCII(dec) != END) {
+ *buf++ = dec;
+ retval++;
+ }
+ state->rawlen = 0;
+ return retval;
+ }
+ } while (state->rawlen && CHAR64(c3) == XX);
+ if (!state->rawlen) {
+ return retval;
+ }
+
+ do {
+ c4 = *state->rawbase++;
+ state->rawlen--;
+ if (c4 == '=') {
+ dec = (char)((CHAR64(c1)<<2) | ((CHAR64(c2)&0x30)>>4));
+ if (USASCII(dec) != END) {
+ *buf++ = dec;
+ retval++;
+ }
+ dec = (char)(((CHAR64(c2)&0xf)<<4) | ((CHAR64(c3)&0x3c)>>2));
+ if (USASCII(dec) != END) {
+ *buf++ = dec;
+ retval++;
+ }
+ state->rawlen = 0;
+ return retval;
+ }
+ } while (state->rawlen && CHAR64(c4) == XX);
+ if (CHAR64(c4) == XX) {
+ return retval;
+ }
+
+ dec = (char)((CHAR64(c1)<<2) | ((CHAR64(c2)&0x30)>>4));
+ if (USASCII(dec) != END) {
+ *buf++ = dec;
+ retval++;
+ size--;
+ }
+ dec = (char)(((CHAR64(c2)&0xf)<<4) | ((CHAR64(c3)&0x3c)>>2));
+ if (USASCII(dec) != END) {
+ *buf++ = dec;
+ retval++;
+ size--;
+ }
+ dec = (char)(((CHAR64(c3)&0x3)<<6) | CHAR64(c4));
+ if (USASCII(dec) != END) {
+ *buf++ = dec;
+ retval++;
+ size--;
+ }
+ }
+ return retval;
+}
+
+/*
+ * Base64 encode the MIME body part (per RFC 2045) of 'len' bytes located at
+ * 'msg_base'. Encodes into 'retval' which must large enough to
+ * accomodate the encoded data. Returns the number of encoded bytes in
+ * 'outlen' and the number of encoded lines in 'outlines'.
+ *
+ * May be called with 'msg_base' as NULL to get the number of encoded
+ * bytes for allocating 'retval' of the proper size.
+ */
+#define BASE64_MAX_LINE_LEN 72
+
+static char base_64[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+char *charset_encode_mimebody(const char *msg_base, int len,
+ char *retval, int *outlen, int *outlines)
+{
+ const unsigned char *s;
+ unsigned char s0, s1, s2;
+ char *d;
+ int b64_len, b64_lines, cnt;
+
+ b64_len = ((len + 2) / 3) * 4;
+ b64_lines = (b64_len + BASE64_MAX_LINE_LEN - 1) / BASE64_MAX_LINE_LEN;
+
+ /* account for CRLF added to each line */
+ b64_len += 2 * b64_lines;
+
+ if (outlen) *outlen = b64_len;
+ if (outlines) *outlines = b64_lines;
+
+ if (!msg_base) return NULL;
+
+ for (s = (const unsigned char*) msg_base, d = retval, cnt = 0; len;
+ s += 3, d += 4, cnt += 4) { /* process tuplets */
+ if (cnt == BASE64_MAX_LINE_LEN) {
+ /* reset line len count, add CRLF */
+ cnt = 0;
+ *d++ = '\r';
+ *d++ = '\n';
+ }
+
+ s0 = s[0];
+ s1 = --len ? s[1] : 0;
+ /* byte 1: high 6 bits (1) */
+ d[0] = base_64[s0 >> 2];
+ /* byte 2: low 2 bits (1), high 4 bits (2) */
+ d[1] = base_64[((s0 & 0x3) << 4) | ((s1 & 0xf0) >> 4)];
+ if (len) {
+ s2 = --len ? s[2] : 0;
+ /* byte 3: low 4 bits (2), high 2 bits (3) */
+ d[2] = base_64[((s1 & 0xf) << 2) | ((s2 & 0xc0) >> 6)];
+ } else {
+ /* byte 3: pad */
+ d[2] = '=';
+ }
+ if (len) {
+ --len;
+ /* byte 4: low 6 bits (3) */
+ d[3] = base_64[s2 & 0x3f];
+ } else {
+ /* byte 4: pad */
+ d[3] = '=';
+ }
+ }
+
+ /* add final CRLF */
+ *d++ = '\r';
+ *d++ = '\n';
+
+ return (b64_len ? retval : NULL);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,128 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: charset.h,v 1.19.2.1 2006/03/09 22:39:38 murch Exp $
+ */
+
+#ifndef INCLUDED_CHARSET_H
+#define INCLUDED_CHARSET_H
+
+/* Marker to indicate characters that don't map to anything */
+#define EMPTY 'X'
+#define EMPTY_STRING "X"
+
+#define ENCODING_NONE 0
+#define ENCODING_QP 1
+#define ENCODING_BASE64 2
+#define ENCODING_UNKNOWN 255
+
+#define CHARSET_UNKNOWN_CHARSET (-1)
+
+typedef int comp_pat;
+typedef int charset_index;
+
+/* ensure up to MAXTRANSLATION times expansion into buf */
+extern char *charset_convert(const char *s, charset_index charset, char *buf,
+ int bufsz);
+extern char *charset_decode_mimeheader(const char *s, char *buf, int bufsz);
+
+extern charset_index charset_lookupname(const char *name);
+extern comp_pat *charset_compilepat(const char *s);
+extern void charset_freepat(comp_pat *pat);
+extern int charset_searchstring(const char *substr, comp_pat *pat,
+ const char *s, int len);
+extern int charset_searchfile(const char *substr, comp_pat *pat,
+ const char *msg_base, int mapnl, int len,
+ charset_index charset, int encoding);
+extern char *charset_decode_mimebody(const char *msg_base, int len,
+ int encoding, char **retval, int alloced,
+ int *outlen);
+extern char *charset_encode_mimebody(const char *msg_base, int len,
+ char *retval, int *outlen, int *outlines);
+
+/* Definitions for charset_extractfile */
+
+/* These constants are passed into the index_search_text_receiver_t callback to
+ tell it which part of the message is being sent down */
+#define SEARCHINDEX_PART_FROM 1
+#define SEARCHINDEX_PART_TO 2
+#define SEARCHINDEX_PART_CC 3
+#define SEARCHINDEX_PART_BCC 4
+#define SEARCHINDEX_PART_SUBJECT 5
+#define SEARCHINDEX_PART_HEADERS 6 /* headers OTHER than the above headers */
+#define SEARCHINDEX_PART_BODY 7
+
+/* These constants tell the index_search_text_receiver_t callback what is happening. */
+#define SEARCHINDEX_CMD_BEGINPART 0x01 /* starting a new part */
+#define SEARCHINDEX_CMD_APPENDPART 0x02 /* recording some text that belongs to the part */
+#define SEARCHINDEX_CMD_ENDPART 0x04 /* done with the part */
+#define SEARCHINDEX_CMD_STUFFPART 0x07 /* All of the above in one invocation */
+
+/* This function gets called at least once for each part of every message.
+ The invocations form a sequence:
+ CMD_BEGINPART <part1>
+ CMD_APPENDPART <part1, text, text_len> (1 or more times)
+ CMD_ENDPART <part1>
+ ...
+ CMD_BEGINPART <partN>
+ CMD_APPENDPART <partN, text, text_len> (1 or more times)
+ CMD_ENDPART <partN>
+ BEGIN, APPEND and/or END operations on the same part may be combined into one call by
+ ORing the 'cmds' flags.
+
+ The parts need not arrive in any particular order, but each part
+ can only participate in one BEGIN ... APPEND ... END sequence, and
+ the sequences for different parts cannot be interleaved.
+*/
+typedef void index_search_text_receiver_t(int UID, int part, int cmds,
+ char const* text, int text_len, void* rock);
+
+/* Extract the body text for the message denoted by 'uid', convert its
+ text to the canonical form for searching, and pass the converted
+ text down in a series of invocations to the callback function with
+ part=SEARCHINDEX_PART_BODY and cmds=CMD_APPENDPART. This is called
+ by index_getsearchtextmsg to extract the MIME body parts. */
+extern int charset_extractfile(index_search_text_receiver_t receiver,
+ void* rock, int uid, const char *msg_base,
+ int mapnl, int len, charset_index charset,
+ int encoding);
+
+#endif /* INCLUDED_CHARSET_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,21 @@
+/big5.t/1.1/Tue Mar 2 01:06:37 1999//Tcyrus-release-2-3-7
+/gb2312.t/1.1/Tue Mar 2 01:06:39 1999//Tcyrus-release-2-3-7
+/iso-2022-jp.t/1.5/Fri May 15 21:53:45 1998//Tcyrus-release-2-3-7
+/iso-2022-kr.t/1.1/Tue Mar 2 01:06:40 1999//Tcyrus-release-2-3-7
+/iso-8859-1.t/1.5/Fri May 15 21:53:49 1998//Tcyrus-release-2-3-7
+/iso-8859-15.t/1.2/Wed Jan 29 20:48:53 2003//Tcyrus-release-2-3-7
+/iso-8859-2.t/1.4/Fri May 15 21:53:53 1998//Tcyrus-release-2-3-7
+/iso-8859-3.t/1.4/Fri May 15 21:53:57 1998//Tcyrus-release-2-3-7
+/iso-8859-4.t/1.5/Fri May 15 21:54:00 1998//Tcyrus-release-2-3-7
+/iso-8859-5.t/1.4/Fri May 15 21:54:04 1998//Tcyrus-release-2-3-7
+/iso-8859-6.t/1.5/Fri May 15 21:54:07 1998//Tcyrus-release-2-3-7
+/iso-8859-7.t/1.5/Fri May 15 21:54:11 1998//Tcyrus-release-2-3-7
+/iso-8859-8.t/1.4/Fri May 15 21:54:14 1998//Tcyrus-release-2-3-7
+/iso-8859-9.t/1.5/Fri May 15 21:54:18 1998//Tcyrus-release-2-3-7
+/koi8-r.t/1.4/Fri May 15 21:54:21 1998//Tcyrus-release-2-3-7
+/unidata2.txt/1.1/Tue Mar 2 01:08:06 1999//Tcyrus-release-2-3-7
+/unifix.txt/1.2.18.1/Wed Mar 9 16:09:56 2005//Tcyrus-release-2-3-7
+/us-ascii.t/1.4/Fri May 15 21:54:29 1998//Tcyrus-release-2-3-7
+/windows-1252.t/1.2/Wed Jan 29 20:48:53 2003//Tcyrus-release-2-3-7
+/windows-1256.t/1.1/Wed May 14 18:56:36 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/lib/charset
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/big5.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/big5.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/big5.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/big5.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,13920 @@
+#
+# Name: BIG5 to Unicode table (complete)
+# Unicode version: 1.1
+# Table version: 0.0d3
+# Table format: Format A
+# Date: 11 February 1994
+# Authors: Glenn Adams <glenn at metis.com>
+# John H. Jenkins <John_Jenkins at taligent.com>
+#
+# Copyright (c) 1991-1994 Unicode, Inc. All Rights reserved.
+#
+# This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+# No claims are made as to fitness for any particular purpose. No
+# warranties of any kind are expressed or implied. The recipient
+# agrees to determine applicability of information provided. If this
+# file has been provided on magnetic media by Unicode, Inc., the sole
+# remedy for any claim will be exchange of defective media within 90
+# days of receipt.
+#
+# Recipient is granted the right to make copies in any form for
+# internal distribution and to freely use the information supplied
+# in the creation of products supporting Unicode. Unicode, Inc.
+# specifically excludes the right to re-distribute this file directly
+# to third parties or other organizations whether for profit or not.
+#
+# General notes:
+#
+# This table contains the data Metis and Taligent currently have on how
+# BIG5 characters map into Unicode.
+#
+# WARNING! It is currently impossible to provide round-trip compatibility
+# between BIG5 and Unicode.
+#
+# A number of characters are not currently mapped because
+# of conflicts with other mappings. They are as follows:
+#
+# BIG5 Description Comments
+#
+# 0xA1C3 SPACING HEAVY OVERSCORE not in Unicode
+# 0xA1C5 SPACING HEAVY UNDERSCORE not in Unicode
+#
+# We currently map all of these characters to U+FFFD REPLACEMENT CHARACTER.
+# It is also possible to map these characters to their duplicates, or to
+# the user zone.
+#
+# Notes:
+#
+# 1. In addition to the above, there is some uncertainty about the
+# mappings in the range C6A1 - C8FE, and F9DD - F9FE. The ETEN
+# version of BIG5 organizes the former range differently, and adds
+# additional characters in the latter range. The correct mappings
+# these ranges need to be determined.
+#
+# 2. There is an uncertainty in the mapping of the Big Five character
+# 0xA3BC. This character occurs within the Big Five block of tone marks
+# for bopomofo and is intended to be the tone mark for the first tone in
+# Mandarin Chinese. We have selected the mapping U+02C9 MODIFIER LETTER
+# MACRON (Mandarin Chinese first tone) to reflect this semantic.
+# However, because bopomofo uses the absense of a tone mark to indicate
+# the first Mandarin tone, most implementations of Big Five represent
+# this character with a blank space, and so a mapping such as U+2003 EM SPACE
+# might be preferred.
+#
+#
+#
+# Format: Three tab-separated columns
+# Column #1 is the BIG5 code (in hex as 0xXXXX)
+# Column #2 is the Unicode (in hex as 0xXXXX)
+# Column #3 is the Unicode name (follows a comment sign, '#')
+# The official names for Unicode characters U+4E00
+# to U+9FA5, inclusive, is "CJK UNIFIED IDEOGRAPH-XXXX",
+# where XXXX is the code point. Including all these
+# names in this file increases its size substantially
+# and needlessly. The token "<CJK>" is used for the
+# name of these characters. If necessary, it can be
+# expanded algorithmically by a parser or editor.
+#
+# The entries are in BIG5 order
+#
+# Any comments or problems, contact <John_Jenkins at taligent.com>
+#
+#
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+A140 3000 # IDEOGRAPHIC SPACE
+A141 FF0C # FULLWIDTH COMMA
+A142 3001 # IDEOGRAPHIC COMMA
+A143 3002 # IDEOGRAPHIC FULL STOP
+A144 FF0E # FULLWIDTH FULL STOP
+A145 2022 # BULLET
+A146 FF1B # FULLWIDTH SEMICOLON
+A147 FF1A # FULLWIDTH COLON
+A148 FF1F # FULLWIDTH QUESTION MARK
+A149 FF01 # FULLWIDTH EXCLAMATION MARK
+A14A FE30 # PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+A14B 2026 # HORIZONTAL ELLIPSIS
+A14C 2025 # TWO DOT LEADER
+A14D FE50 # SMALL COMMA
+A14E FF64 # HALFWIDTH IDEOGRAPHIC COMMA
+A14F FE52 # SMALL FULL STOP
+A150 00B7 # MIDDLE DOT
+A151 FE54 # SMALL SEMICOLON
+A152 FE55 # SMALL COLON
+A153 FE56 # SMALL QUESTION MARK
+A154 FE57 # SMALL EXCLAMATION MARK
+A155 FF5C # FULLWIDTH VERTICAL BAR
+A156 2013 # EN DASH
+A157 FE31 # PRESENTATION FORM FOR VERTICAL EM DASH
+A158 2014 # EM DASH
+A159 FE33 # PRESENTATION FORM FOR VERTICAL LOW LINE
+A15A FF3F # SPACING UNDERSCORE duplicates A1C4
+A15B FE34 # PRESENTATION FORM FOR VERTICAL WAVY LOW LINE
+A15C FE4F # WAVY LOW LINE
+A15D FF08 # FULLWIDTH LEFT PARENTHESIS
+A15E FF09 # FULLWIDTH RIGHT PARENTHESIS
+A15F FE35 # PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS
+A160 FE36 # PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
+A161 FF5B # FULLWIDTH LEFT CURLY BRACKET
+A162 FF5D # FULLWIDTH RIGHT CURLY BRACKET
+A163 FE37 # PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET
+A164 FE38 # PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
+A165 3014 # LEFT TORTOISE SHELL BRACKET
+A166 3015 # RIGHT TORTOISE SHELL BRACKET
+A167 FE39 # PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET
+A168 FE3A # PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET
+A169 3010 # LEFT BLACK LENTICULAR BRACKET
+A16A 3011 # RIGHT BLACK LENTICULAR BRACKET
+A16B FE3B # PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET
+A16C FE3C # PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET
+A16D 300A # LEFT DOUBLE ANGLE BRACKET
+A16E 300B # RIGHT DOUBLE ANGLE BRACKET
+A16F FE3D # PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET
+A170 FE3E # PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET
+A171 3008 # LEFT ANGLE BRACKET
+A172 3009 # RIGHT ANGLE BRACKET
+A173 FE3F # PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET
+A174 FE40 # PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET
+A175 300C # LEFT CORNER BRACKET
+A176 300D # RIGHT CORNER BRACKET
+A177 FE41 # PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET
+A178 FE42 # PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
+A179 300E # LEFT WHITE CORNER BRACKET
+A17A 300F # RIGHT WHITE CORNER BRACKET
+A17B FE43 # PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
+A17C FE44 # PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
+A17D FE59 # SMALL LEFT PARENTHESIS
+A17E FE5A # SMALL RIGHT PARENTHESIS
+A1A1 FE5B # SMALL LEFT CURLY BRACKET
+A1A2 FE5C # SMALL RIGHT CURLY BRACKET
+A1A3 FE5D # SMALL LEFT TORTOISE SHELL BRACKET
+A1A4 FE5E # SMALL RIGHT TORTOISE SHELL BRACKET
+A1A5 2018 # LEFT SINGLE QUOTATION MARK
+A1A6 2019 # RIGHT SINGLE QUOTATION MARK
+A1A7 201C # LEFT DOUBLE QUOTATION MARK
+A1A8 201D # RIGHT DOUBLE QUOTATION MARK
+A1A9 301D # REVERSED DOUBLE PRIME QUOTATION MARK
+A1AA 301E # DOUBLE PRIME QUOTATION MARK
+A1AB 2035 # REVERSED PRIME
+A1AC 2032 # PRIME
+A1AD FF03 # FULLWIDTH NUMBER SIGN
+A1AE FF06 # FULLWIDTH AMPERSAND
+A1AF FF0A # FULLWIDTH ASTERISK
+A1B0 203B # REFERENCE MARK
+A1B1 00A7 # SECTION SIGN
+A1B2 3003 # DITTO MARK
+A1B3 25CB # WHITE CIRCLE
+A1B4 25CF # BLACK CIRCLE
+A1B5 25B3 # WHITE UP-POINTING TRIANGLE
+A1B6 25B2 # BLACK UP-POINTING TRIANGLE
+A1B7 25CE # BULLSEYE
+A1B8 2606 # WHITE STAR
+A1B9 2605 # BLACK STAR
+A1BA 25C7 # WHITE DIAMOND
+A1BB 25C6 # BLACK DIAMOND
+A1BC 25A1 # WHITE SQUARE
+A1BD 25A0 # BLACK SQUARE
+A1BE 25BD # WHITE DOWN-POINTING TRIANGLE
+A1BF 25BC # BLACK DOWN-POINTING TRIANGLE
+A1C0 32A3 # CIRCLED IDEOGRAPH CORRECT
+A1C1 2105 # CARE OF
+A1C2 203E # OVERLINE
+A1C3 FFFD # *** NO MAPPING ***
+A1C4 FF3F # FULLWIDTH LOW LINE
+A1C5 FFFD # *** NO MAPPING ***
+A1C6 FE49 # DASHED OVERLINE
+A1C7 FE4A # CENTRELINE OVERLINE
+A1C8 FE4D # DASHED LOW LINE
+A1C9 FE4E # CENTRELINE LOW LINE
+A1CA FE4B # WAVY OVERLINE
+A1CB FE4C # DOUBLE WAVY OVERLINE
+A1CC FE5F # SMALL NUMBER SIGN
+A1CD FE60 # SMALL AMPERSAND
+A1CE FE61 # SMALL ASTERISK
+A1CF FF0B # FULLWIDTH PLUS SIGN
+A1D0 FF0D # FULLWIDTH HYPHEN-MINUS
+A1D1 00D7 # MULTIPLICATION SIGN
+A1D2 00F7 # DIVISION SIGN
+A1D3 00B1 # PLUS-MINUS SIGN
+A1D4 221A # SQUARE ROOT
+A1D5 FF1C # FULLWIDTH LESS-THAN SIGN
+A1D6 FF1E # FULLWIDTH GREATER-THAN SIGN
+A1D7 FF1D # FULLWIDTH EQUALS SIGN
+A1D8 2266 # LESS THAN OVER EQUAL TO
+A1D9 2267 # GREATER THAN OVER EQUAL TO
+A1DA 2260 # NOT EQUAL TO
+A1DB 221E # INFINITY
+A1DC 2252 # APPROXIMATELY EQUAL TO OR THE IMAGE OF
+A1DD 2261 # IDENTICAL TO
+A1DE FE62 # SMALL PLUS SIGN
+A1DF FE63 # SMALL HYPHEN-MINUS
+A1E0 FE64 # SMALL LESS-THAN SIGN
+A1E1 FE65 # SMALL GREATER-THAN SIGN
+A1E2 FE66 # SMALL EQUALS SIGN
+A1E3 223C # TILDE OPERATOR
+A1E4 2229 # INTERSECTION
+A1E5 222A # UNION
+A1E6 22A5 # UP TACK
+A1E7 2220 # ANGLE
+A1E8 221F # RIGHT ANGLE
+A1E9 22BF # RIGHT TRIANGLE
+A1EA 33D2 # SQUARE LOG
+A1EB 33D1 # SQUARE LN
+A1EC 222B # INTEGRAL
+A1ED 222E # CONTOUR INTEGRAL
+A1EE 2235 # BECAUSE
+A1EF 2234 # THEREFORE
+A1F0 2640 # FEMALE SIGN
+A1F1 2642 # MALE SIGN
+A1F2 2641 # EARTH
+A1F3 2609 # SUN
+A1F4 2191 # UPWARDS ARROW
+A1F5 2193 # DOWNWARDS ARROW
+A1F6 2190 # LEFTWARDS ARROW
+A1F7 2192 # RIGHTWARDS ARROW
+A1F8 2196 # NORTH WEST ARROW
+A1F9 2197 # NORTH EAST ARROW
+A1FA 2199 # SOUTH WEST ARROW
+A1FB 2198 # SOUTH EAST ARROW
+A1FC 2225 # PARALLEL TO
+A1FD 2223 # DIVIDES
+A1FE 2571 # LT DIAG UP RIGHT TO LOW LEFT duplicates A2AC
+A240 2572 # LT DIAG UP LEFT TO LOW RIGHT duplicates A2ADp
+A241 FF0F # FULLWIDTH SOLIDUS
+A242 FF3C # FULLWIDTH REVERSE SOLIDUS
+A243 FF04 # FULLWIDTH DOLLAR SIGN
+A244 00A5 # YEN SIGN
+A245 3012 # POSTAL MARK
+A246 00A2 # CENT SIGN
+A247 00A3 # POUND SIGN
+A248 FF05 # FULLWIDTH PERCENT SIGN
+A249 FF20 # FULLWIDTH COMMERCIAL AT
+A24A 2103 # DEGREE CELSIUS
+A24B 2109 # DEGREE FAHRENHEIT
+A24C FE69 # SMALL DOLLAR SIGN
+A24D FE6A # SMALL PERCENT SIGN
+A24E FE6B # SMALL COMMERCIAL AT
+A24F 33D5 # SQUARE MIL
+A250 339C # SQUARE MM
+A251 339D # SQUARE CM
+A252 339E # SQUARE KM
+A253 33CE # SQUARE KM CAPITAL
+A254 33A1 # SQUARE M SQUARED
+A255 338E # SQUARE MG
+A256 338F # SQUARE KG
+A257 33C4 # SQUARE CC
+A258 00B0 # DEGREE SIGN
+A259 5159 # <CJK>
+A25A 515B # <CJK>
+A25B 515E # <CJK>
+A25C 515D # <CJK>
+A25D 5161 # <CJK>
+A25E 5163 # <CJK>
+A25F 55E7 # <CJK>
+A260 74E9 # <CJK>
+A261 7CCE # <CJK>
+A262 2581 # LOWER ONE EIGHTH BLOCK
+A263 2582 # LOWER ONE QUARTER BLOCK
+A264 2583 # LOWER THREE EIGHTHS BLOCK
+A265 2584 # LOWER HALF BLOCK
+A266 2585 # LOWER FIVE EIGHTHS BLOCK
+A267 2586 # LOWER THREE QUARTERS BLOCK
+A268 2587 # LOWER SEVEN EIGHTHS BLOCK
+A269 2588 # FULL BLOCK
+A26A 258F # LEFT ONE EIGHTH BLOCK
+A26B 258E # LEFT ONE QUARTER BLOCK
+A26C 258D # LEFT THREE EIGHTHS BLOCK
+A26D 258C # LEFT HALF BLOCK
+A26E 258B # LEFT FIVE EIGHTHS BLOCK
+A26F 258A # LEFT THREE QUARTERS BLOCK
+A270 2589 # LEFT SEVEN EIGHTHS BLOCK
+A271 253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+A272 2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL
+A273 252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+A274 2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT
+A275 251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+A276 2594 # UPPER ONE EIGHTH BLOCK
+A277 2500 # BOX DRAWINGS LIGHT HORIZONTAL
+A278 2502 # BOX DRAWINGS LIGHT VERTICAL
+A279 2595 # RIGHT ONE EIGHTH BLOCK
+A27A 250C # BOX DRAWINGS LIGHT DOWN AND RIGHT
+A27B 2510 # BOX DRAWINGS LIGHT DOWN AND LEFT
+A27C 2514 # BOX DRAWINGS LIGHT UP AND RIGHT
+A27D 2518 # BOX DRAWINGS LIGHT UP AND LEFT
+A27E 256D # BOX DRAWINGS LIGHT ARC DOWN AND RIGHT
+A2A1 256E # BOX DRAWINGS LIGHT ARC DOWN AND LEFT
+A2A2 2570 # BOX DRAWINGS LIGHT ARC UP AND RIGHT
+A2A3 256F # BOX DRAWINGS LIGHT ARC UP AND LEFT
+A2A4 2550 # BOX DRAWINGS DOUBLE HORIZONTAL
+A2A5 255E # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
+A2A6 256A # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
+A2A7 2561 # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
+A2A8 25E2 # BLACK LOWER RIGHT TRIANGLE
+A2A9 25E3 # BLACK LOWER LEFT TRIANGLE
+A2AA 25E5 # BLACK UPPER RIGHT TRIANGLE
+A2AB 25E4 # BLACK UPPER LEFT TRIANGLE
+A2AC 2571 # BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT
+A2AD 2572 # BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT
+A2AE 2573 # BOX DRAWINGS LIGHT DIAGONAL CROSS
+A2AF FF10 # FULLWIDTH DIGIT ZERO
+A2B0 FF11 # FULLWIDTH DIGIT ONE
+A2B1 FF12 # FULLWIDTH DIGIT TWO
+A2B2 FF13 # FULLWIDTH DIGIT THREE
+A2B3 FF14 # FULLWIDTH DIGIT FOUR
+A2B4 FF15 # FULLWIDTH DIGIT FIVE
+A2B5 FF16 # FULLWIDTH DIGIT SIX
+A2B6 FF17 # FULLWIDTH DIGIT SEVEN
+A2B7 FF18 # FULLWIDTH DIGIT EIGHT
+A2B8 FF19 # FULLWIDTH DIGIT NINE
+A2B9 2160 # ROMAN NUMERAL ONE
+A2BA 2161 # ROMAN NUMERAL TWO
+A2BB 2162 # ROMAN NUMERAL THREE
+A2BC 2163 # ROMAN NUMERAL FOUR
+A2BD 2164 # ROMAN NUMERAL FIVE
+A2BE 2165 # ROMAN NUMERAL SIX
+A2BF 2166 # ROMAN NUMERAL SEVEN
+A2C0 2167 # ROMAN NUMERAL EIGHT
+A2C1 2168 # ROMAN NUMERAL NINE
+A2C2 2169 # ROMAN NUMERAL TEN
+A2C3 3021 # HANGZHOU NUMERAL ONE
+A2C4 3022 # HANGZHOU NUMERAL TWO
+A2C5 3023 # HANGZHOU NUMERAL THREE
+A2C6 3024 # HANGZHOU NUMERAL FOUR
+A2C7 3025 # HANGZHOU NUMERAL FIVE
+A2C8 3026 # HANGZHOU NUMERAL SIX
+A2C9 3027 # HANGZHOU NUMERAL SEVEN
+A2CA 3028 # HANGZHOU NUMERAL EIGHT
+A2CB 3029 # HANGZHOU NUMERAL NINE
+A2CC 5341 # HANGZHOU NUMERAL TEN conflicts with A451 mapping
+A2CD 5344 # <CJK>
+A2CE 5345 # HANGZHOU NUMERAL THIRTY conflicts with A4CA mapping
+A2CF FF21 # FULLWIDTH LATIN CAPITAL LETTER A
+A2D0 FF22 # FULLWIDTH LATIN CAPITAL LETTER B
+A2D1 FF23 # FULLWIDTH LATIN CAPITAL LETTER C
+A2D2 FF24 # FULLWIDTH LATIN CAPITAL LETTER D
+A2D3 FF25 # FULLWIDTH LATIN CAPITAL LETTER E
+A2D4 FF26 # FULLWIDTH LATIN CAPITAL LETTER F
+A2D5 FF27 # FULLWIDTH LATIN CAPITAL LETTER G
+A2D6 FF28 # FULLWIDTH LATIN CAPITAL LETTER H
+A2D7 FF29 # FULLWIDTH LATIN CAPITAL LETTER I
+A2D8 FF2A # FULLWIDTH LATIN CAPITAL LETTER J
+A2D9 FF2B # FULLWIDTH LATIN CAPITAL LETTER K
+A2DA FF2C # FULLWIDTH LATIN CAPITAL LETTER L
+A2DB FF2D # FULLWIDTH LATIN CAPITAL LETTER M
+A2DC FF2E # FULLWIDTH LATIN CAPITAL LETTER N
+A2DD FF2F # FULLWIDTH LATIN CAPITAL LETTER O
+A2DE FF30 # FULLWIDTH LATIN CAPITAL LETTER P
+A2DF FF31 # FULLWIDTH LATIN CAPITAL LETTER Q
+A2E0 FF32 # FULLWIDTH LATIN CAPITAL LETTER R
+A2E1 FF33 # FULLWIDTH LATIN CAPITAL LETTER S
+A2E2 FF34 # FULLWIDTH LATIN CAPITAL LETTER T
+A2E3 FF35 # FULLWIDTH LATIN CAPITAL LETTER U
+A2E4 FF36 # FULLWIDTH LATIN CAPITAL LETTER V
+A2E5 FF37 # FULLWIDTH LATIN CAPITAL LETTER W
+A2E6 FF38 # FULLWIDTH LATIN CAPITAL LETTER X
+A2E7 FF39 # FULLWIDTH LATIN CAPITAL LETTER Y
+A2E8 FF3A # FULLWIDTH LATIN CAPITAL LETTER Z
+A2E9 FF41 # FULLWIDTH LATIN SMALL LETTER A
+A2EA FF42 # FULLWIDTH LATIN SMALL LETTER B
+A2EB FF43 # FULLWIDTH LATIN SMALL LETTER C
+A2EC FF44 # FULLWIDTH LATIN SMALL LETTER D
+A2ED FF45 # FULLWIDTH LATIN SMALL LETTER E
+A2EE FF46 # FULLWIDTH LATIN SMALL LETTER F
+A2EF FF47 # FULLWIDTH LATIN SMALL LETTER G
+A2F0 FF48 # FULLWIDTH LATIN SMALL LETTER H
+A2F1 FF49 # FULLWIDTH LATIN SMALL LETTER I
+A2F2 FF4A # FULLWIDTH LATIN SMALL LETTER J
+A2F3 FF4B # FULLWIDTH LATIN SMALL LETTER K
+A2F4 FF4C # FULLWIDTH LATIN SMALL LETTER L
+A2F5 FF4D # FULLWIDTH LATIN SMALL LETTER M
+A2F6 FF4E # FULLWIDTH LATIN SMALL LETTER N
+A2F7 FF4F # FULLWIDTH LATIN SMALL LETTER O
+A2F8 FF50 # FULLWIDTH LATIN SMALL LETTER P
+A2F9 FF51 # FULLWIDTH LATIN SMALL LETTER Q
+A2FA FF52 # FULLWIDTH LATIN SMALL LETTER R
+A2FB FF53 # FULLWIDTH LATIN SMALL LETTER S
+A2FC FF54 # FULLWIDTH LATIN SMALL LETTER T
+A2FD FF55 # FULLWIDTH LATIN SMALL LETTER U
+A2FE FF56 # FULLWIDTH LATIN SMALL LETTER V
+A340 FF57 # FULLWIDTH LATIN SMALL LETTER W
+A341 FF58 # FULLWIDTH LATIN SMALL LETTER X
+A342 FF59 # FULLWIDTH LATIN SMALL LETTER Y
+A343 FF5A # FULLWIDTH LATIN SMALL LETTER Z
+A344 0391 # GREEK CAPITAL LETTER ALPHA
+A345 0392 # GREEK CAPITAL LETTER BETA
+A346 0393 # GREEK CAPITAL LETTER GAMMA
+A347 0394 # GREEK CAPITAL LETTER DELTA
+A348 0395 # GREEK CAPITAL LETTER EPSILON
+A349 0396 # GREEK CAPITAL LETTER ZETA
+A34A 0397 # GREEK CAPITAL LETTER ETA
+A34B 0398 # GREEK CAPITAL LETTER THETA
+A34C 0399 # GREEK CAPITAL LETTER IOTA
+A34D 039A # GREEK CAPITAL LETTER KAPPA
+A34E 039B # GREEK CAPITAL LETTER LAMDA
+A34F 039C # GREEK CAPITAL LETTER MU
+A350 039D # GREEK CAPITAL LETTER NU
+A351 039E # GREEK CAPITAL LETTER XI
+A352 039F # GREEK CAPITAL LETTER OMICRON
+A353 03A0 # GREEK CAPITAL LETTER PI
+A354 03A1 # GREEK CAPITAL LETTER RHO
+A355 03A3 # GREEK CAPITAL LETTER SIGMA
+A356 03A4 # GREEK CAPITAL LETTER TAU
+A357 03A5 # GREEK CAPITAL LETTER UPSILON
+A358 03A6 # GREEK CAPITAL LETTER PHI
+A359 03A7 # GREEK CAPITAL LETTER CHI
+A35A 03A8 # GREEK CAPITAL LETTER PSI
+A35B 03A9 # GREEK CAPITAL LETTER OMEGA
+A35C 03B1 # GREEK SMALL LETTER ALPHA
+A35D 03B2 # GREEK SMALL LETTER BETA
+A35E 03B3 # GREEK SMALL LETTER GAMMA
+A35F 03B4 # GREEK SMALL LETTER DELTA
+A360 03B5 # GREEK SMALL LETTER EPSILON
+A361 03B6 # GREEK SMALL LETTER ZETA
+A362 03B7 # GREEK SMALL LETTER ETA
+A363 03B8 # GREEK SMALL LETTER THETA
+A364 03B9 # GREEK SMALL LETTER IOTA
+A365 03BA # GREEK SMALL LETTER KAPPA
+A366 03BB # GREEK SMALL LETTER LAMDA
+A367 03BC # GREEK SMALL LETTER MU
+A368 03BD # GREEK SMALL LETTER NU
+A369 03BE # GREEK SMALL LETTER XI
+A36A 03BF # GREEK SMALL LETTER OMICRON
+A36B 03C0 # GREEK SMALL LETTER PI
+A36C 03C1 # GREEK SMALL LETTER RHO
+A36D 03C3 # GREEK SMALL LETTER SIGMA
+A36E 03C4 # GREEK SMALL LETTER TAU
+A36F 03C5 # GREEK SMALL LETTER UPSILON
+A370 03C6 # GREEK SMALL LETTER PHI
+A371 03C7 # GREEK SMALL LETTER CHI
+A372 03C8 # GREEK SMALL LETTER PSI
+A373 03C9 # GREEK SMALL LETTER OMEGA
+A374 3105 # BOPOMOFO LETTER B
+A375 3106 # BOPOMOFO LETTER P
+A376 3107 # BOPOMOFO LETTER M
+A377 3108 # BOPOMOFO LETTER F
+A378 3109 # BOPOMOFO LETTER D
+A379 310A # BOPOMOFO LETTER T
+A37A 310B # BOPOMOFO LETTER N
+A37B 310C # BOPOMOFO LETTER L
+A37C 310D # BOPOMOFO LETTER G
+A37D 310E # BOPOMOFO LETTER K
+A37E 310F # BOPOMOFO LETTER H
+A3A1 3110 # BOPOMOFO LETTER J
+A3A2 3111 # BOPOMOFO LETTER Q
+A3A3 3112 # BOPOMOFO LETTER X
+A3A4 3113 # BOPOMOFO LETTER ZH
+A3A5 3114 # BOPOMOFO LETTER CH
+A3A6 3115 # BOPOMOFO LETTER SH
+A3A7 3116 # BOPOMOFO LETTER R
+A3A8 3117 # BOPOMOFO LETTER Z
+A3A9 3118 # BOPOMOFO LETTER C
+A3AA 3119 # BOPOMOFO LETTER S
+A3AB 311A # BOPOMOFO LETTER A
+A3AC 311B # BOPOMOFO LETTER O
+A3AD 311C # BOPOMOFO LETTER E
+A3AE 311D # BOPOMOFO LETTER EH
+A3AF 311E # BOPOMOFO LETTER AI
+A3B0 311F # BOPOMOFO LETTER EI
+A3B1 3120 # BOPOMOFO LETTER AU
+A3B2 3121 # BOPOMOFO LETTER OU
+A3B3 3122 # BOPOMOFO LETTER AN
+A3B4 3123 # BOPOMOFO LETTER EN
+A3B5 3124 # BOPOMOFO LETTER ANG
+A3B6 3125 # BOPOMOFO LETTER ENG
+A3B7 3126 # BOPOMOFO LETTER ER
+A3B8 3127 # BOPOMOFO LETTER I
+A3B9 3128 # BOPOMOFO LETTER U
+A3BA 3129 # BOPOMOFO LETTER IU
+A3BB 02D9 # DOT ABOVE (Mandarin Chinese light tone)
+A3BC 02C9 # MODIFIER LETTER MACRON (Mandarin Chinese first tone)
+A3BD 02CA # MODIFIER LETTER ACUTE ACCENT (Mandarin Chinese second tone)
+A3BE 02C7 # CARON (Mandarin Chinese third tone)
+A3BF 02CB # MODIFIER LETTER GRAVE ACCENT (Mandarin Chinese fourth tone)
+A440 4E00 # <CJK>
+A441 4E59 # <CJK>
+A442 4E01 # <CJK>
+A443 4E03 # <CJK>
+A444 4E43 # <CJK>
+A445 4E5D # <CJK>
+A446 4E86 # <CJK>
+A447 4E8C # <CJK>
+A448 4EBA # <CJK>
+A449 513F # <CJK>
+A44A 5165 # <CJK>
+A44B 516B # <CJK>
+A44C 51E0 # <CJK>
+A44D 5200 # <CJK>
+A44E 5201 # <CJK>
+A44F 529B # <CJK>
+A450 5315 # <CJK>
+A451 5341 # <CJK>
+A452 535C # <CJK>
+A453 53C8 # <CJK>
+A454 4E09 # <CJK>
+A455 4E0B # <CJK>
+A456 4E08 # <CJK>
+A457 4E0A # <CJK>
+A458 4E2B # <CJK>
+A459 4E38 # <CJK>
+A45A 51E1 # <CJK>
+A45B 4E45 # <CJK>
+A45C 4E48 # <CJK>
+A45D 4E5F # <CJK>
+A45E 4E5E # <CJK>
+A45F 4E8E # <CJK>
+A460 4EA1 # <CJK>
+A461 5140 # <CJK>
+A462 5203 # <CJK>
+A463 52FA # <CJK>
+A464 5343 # <CJK>
+A465 53C9 # <CJK>
+A466 53E3 # <CJK>
+A467 571F # <CJK>
+A468 58EB # <CJK>
+A469 5915 # <CJK>
+A46A 5927 # <CJK>
+A46B 5973 # <CJK>
+A46C 5B50 # <CJK>
+A46D 5B51 # <CJK>
+A46E 5B53 # <CJK>
+A46F 5BF8 # <CJK>
+A470 5C0F # <CJK>
+A471 5C22 # <CJK>
+A472 5C38 # <CJK>
+A473 5C71 # <CJK>
+A474 5DDD # <CJK>
+A475 5DE5 # <CJK>
+A476 5DF1 # <CJK>
+A477 5DF2 # <CJK>
+A478 5DF3 # <CJK>
+A479 5DFE # <CJK>
+A47A 5E72 # <CJK>
+A47B 5EFE # <CJK>
+A47C 5F0B # <CJK>
+A47D 5F13 # <CJK>
+A47E 624D # <CJK>
+A4A1 4E11 # <CJK>
+A4A2 4E10 # <CJK>
+A4A3 4E0D # <CJK>
+A4A4 4E2D # <CJK>
+A4A5 4E30 # <CJK>
+A4A6 4E39 # <CJK>
+A4A7 4E4B # <CJK>
+A4A8 5C39 # <CJK>
+A4A9 4E88 # <CJK>
+A4AA 4E91 # <CJK>
+A4AB 4E95 # <CJK>
+A4AC 4E92 # <CJK>
+A4AD 4E94 # <CJK>
+A4AE 4EA2 # <CJK>
+A4AF 4EC1 # <CJK>
+A4B0 4EC0 # <CJK>
+A4B1 4EC3 # <CJK>
+A4B2 4EC6 # <CJK>
+A4B3 4EC7 # <CJK>
+A4B4 4ECD # <CJK>
+A4B5 4ECA # <CJK>
+A4B6 4ECB # <CJK>
+A4B7 4EC4 # <CJK>
+A4B8 5143 # <CJK>
+A4B9 5141 # <CJK>
+A4BA 5167 # <CJK>
+A4BB 516D # <CJK>
+A4BC 516E # <CJK>
+A4BD 516C # <CJK>
+A4BE 5197 # <CJK>
+A4BF 51F6 # <CJK>
+A4C0 5206 # <CJK>
+A4C1 5207 # <CJK>
+A4C2 5208 # <CJK>
+A4C3 52FB # <CJK>
+A4C4 52FE # <CJK>
+A4C5 52FF # <CJK>
+A4C6 5316 # <CJK>
+A4C7 5339 # <CJK>
+A4C8 5348 # <CJK>
+A4C9 5347 # <CJK>
+A4CA 5345 # <CJK>
+A4CB 535E # <CJK>
+A4CC 5384 # <CJK>
+A4CD 53CB # <CJK>
+A4CE 53CA # <CJK>
+A4CF 53CD # <CJK>
+A4D0 58EC # <CJK>
+A4D1 5929 # <CJK>
+A4D2 592B # <CJK>
+A4D3 592A # <CJK>
+A4D4 592D # <CJK>
+A4D5 5B54 # <CJK>
+A4D6 5C11 # <CJK>
+A4D7 5C24 # <CJK>
+A4D8 5C3A # <CJK>
+A4D9 5C6F # <CJK>
+A4DA 5DF4 # <CJK>
+A4DB 5E7B # <CJK>
+A4DC 5EFF # <CJK>
+A4DD 5F14 # <CJK>
+A4DE 5F15 # <CJK>
+A4DF 5FC3 # <CJK>
+A4E0 6208 # <CJK>
+A4E1 6236 # <CJK>
+A4E2 624B # <CJK>
+A4E3 624E # <CJK>
+A4E4 652F # <CJK>
+A4E5 6587 # <CJK>
+A4E6 6597 # <CJK>
+A4E7 65A4 # <CJK>
+A4E8 65B9 # <CJK>
+A4E9 65E5 # <CJK>
+A4EA 66F0 # <CJK>
+A4EB 6708 # <CJK>
+A4EC 6728 # <CJK>
+A4ED 6B20 # <CJK>
+A4EE 6B62 # <CJK>
+A4EF 6B79 # <CJK>
+A4F0 6BCB # <CJK>
+A4F1 6BD4 # <CJK>
+A4F2 6BDB # <CJK>
+A4F3 6C0F # <CJK>
+A4F4 6C34 # <CJK>
+A4F5 706B # <CJK>
+A4F6 722A # <CJK>
+A4F7 7236 # <CJK>
+A4F8 723B # <CJK>
+A4F9 7247 # <CJK>
+A4FA 7259 # <CJK>
+A4FB 725B # <CJK>
+A4FC 72AC # <CJK>
+A4FD 738B # <CJK>
+A4FE 4E19 # <CJK>
+A540 4E16 # <CJK>
+A541 4E15 # <CJK>
+A542 4E14 # <CJK>
+A543 4E18 # <CJK>
+A544 4E3B # <CJK>
+A545 4E4D # <CJK>
+A546 4E4F # <CJK>
+A547 4E4E # <CJK>
+A548 4EE5 # <CJK>
+A549 4ED8 # <CJK>
+A54A 4ED4 # <CJK>
+A54B 4ED5 # <CJK>
+A54C 4ED6 # <CJK>
+A54D 4ED7 # <CJK>
+A54E 4EE3 # <CJK>
+A54F 4EE4 # <CJK>
+A550 4ED9 # <CJK>
+A551 4EDE # <CJK>
+A552 5145 # <CJK>
+A553 5144 # <CJK>
+A554 5189 # <CJK>
+A555 518A # <CJK>
+A556 51AC # <CJK>
+A557 51F9 # <CJK>
+A558 51FA # <CJK>
+A559 51F8 # <CJK>
+A55A 520A # <CJK>
+A55B 52A0 # <CJK>
+A55C 529F # <CJK>
+A55D 5305 # <CJK>
+A55E 5306 # <CJK>
+A55F 5317 # <CJK>
+A560 531D # <CJK>
+A561 4EDF # <CJK>
+A562 534A # <CJK>
+A563 5349 # <CJK>
+A564 5361 # <CJK>
+A565 5360 # <CJK>
+A566 536F # <CJK>
+A567 536E # <CJK>
+A568 53BB # <CJK>
+A569 53EF # <CJK>
+A56A 53E4 # <CJK>
+A56B 53F3 # <CJK>
+A56C 53EC # <CJK>
+A56D 53EE # <CJK>
+A56E 53E9 # <CJK>
+A56F 53E8 # <CJK>
+A570 53FC # <CJK>
+A571 53F8 # <CJK>
+A572 53F5 # <CJK>
+A573 53EB # <CJK>
+A574 53E6 # <CJK>
+A575 53EA # <CJK>
+A576 53F2 # <CJK>
+A577 53F1 # <CJK>
+A578 53F0 # <CJK>
+A579 53E5 # <CJK>
+A57A 53ED # <CJK>
+A57B 53FB # <CJK>
+A57C 56DB # <CJK>
+A57D 56DA # <CJK>
+A57E 5916 # <CJK>
+A5A1 592E # <CJK>
+A5A2 5931 # <CJK>
+A5A3 5974 # <CJK>
+A5A4 5976 # <CJK>
+A5A5 5B55 # <CJK>
+A5A6 5B83 # <CJK>
+A5A7 5C3C # <CJK>
+A5A8 5DE8 # <CJK>
+A5A9 5DE7 # <CJK>
+A5AA 5DE6 # <CJK>
+A5AB 5E02 # <CJK>
+A5AC 5E03 # <CJK>
+A5AD 5E73 # <CJK>
+A5AE 5E7C # <CJK>
+A5AF 5F01 # <CJK>
+A5B0 5F18 # <CJK>
+A5B1 5F17 # <CJK>
+A5B2 5FC5 # <CJK>
+A5B3 620A # <CJK>
+A5B4 6253 # <CJK>
+A5B5 6254 # <CJK>
+A5B6 6252 # <CJK>
+A5B7 6251 # <CJK>
+A5B8 65A5 # <CJK>
+A5B9 65E6 # <CJK>
+A5BA 672E # <CJK>
+A5BB 672C # <CJK>
+A5BC 672A # <CJK>
+A5BD 672B # <CJK>
+A5BE 672D # <CJK>
+A5BF 6B63 # <CJK>
+A5C0 6BCD # <CJK>
+A5C1 6C11 # <CJK>
+A5C2 6C10 # <CJK>
+A5C3 6C38 # <CJK>
+A5C4 6C41 # <CJK>
+A5C5 6C40 # <CJK>
+A5C6 6C3E # <CJK>
+A5C7 72AF # <CJK>
+A5C8 7384 # <CJK>
+A5C9 7389 # <CJK>
+A5CA 74DC # <CJK>
+A5CB 74E6 # <CJK>
+A5CC 7518 # <CJK>
+A5CD 751F # <CJK>
+A5CE 7528 # <CJK>
+A5CF 7529 # <CJK>
+A5D0 7530 # <CJK>
+A5D1 7531 # <CJK>
+A5D2 7532 # <CJK>
+A5D3 7533 # <CJK>
+A5D4 758B # <CJK>
+A5D5 767D # <CJK>
+A5D6 76AE # <CJK>
+A5D7 76BF # <CJK>
+A5D8 76EE # <CJK>
+A5D9 77DB # <CJK>
+A5DA 77E2 # <CJK>
+A5DB 77F3 # <CJK>
+A5DC 793A # <CJK>
+A5DD 79BE # <CJK>
+A5DE 7A74 # <CJK>
+A5DF 7ACB # <CJK>
+A5E0 4E1E # <CJK>
+A5E1 4E1F # <CJK>
+A5E2 4E52 # <CJK>
+A5E3 4E53 # <CJK>
+A5E4 4E69 # <CJK>
+A5E5 4E99 # <CJK>
+A5E6 4EA4 # <CJK>
+A5E7 4EA6 # <CJK>
+A5E8 4EA5 # <CJK>
+A5E9 4EFF # <CJK>
+A5EA 4F09 # <CJK>
+A5EB 4F19 # <CJK>
+A5EC 4F0A # <CJK>
+A5ED 4F15 # <CJK>
+A5EE 4F0D # <CJK>
+A5EF 4F10 # <CJK>
+A5F0 4F11 # <CJK>
+A5F1 4F0F # <CJK>
+A5F2 4EF2 # <CJK>
+A5F3 4EF6 # <CJK>
+A5F4 4EFB # <CJK>
+A5F5 4EF0 # <CJK>
+A5F6 4EF3 # <CJK>
+A5F7 4EFD # <CJK>
+A5F8 4F01 # <CJK>
+A5F9 4F0B # <CJK>
+A5FA 5149 # <CJK>
+A5FB 5147 # <CJK>
+A5FC 5146 # <CJK>
+A5FD 5148 # <CJK>
+A5FE 5168 # <CJK>
+A640 5171 # <CJK>
+A641 518D # <CJK>
+A642 51B0 # <CJK>
+A643 5217 # <CJK>
+A644 5211 # <CJK>
+A645 5212 # <CJK>
+A646 520E # <CJK>
+A647 5216 # <CJK>
+A648 52A3 # <CJK>
+A649 5308 # <CJK>
+A64A 5321 # <CJK>
+A64B 5320 # <CJK>
+A64C 5370 # <CJK>
+A64D 5371 # <CJK>
+A64E 5409 # <CJK>
+A64F 540F # <CJK>
+A650 540C # <CJK>
+A651 540A # <CJK>
+A652 5410 # <CJK>
+A653 5401 # <CJK>
+A654 540B # <CJK>
+A655 5404 # <CJK>
+A656 5411 # <CJK>
+A657 540D # <CJK>
+A658 5408 # <CJK>
+A659 5403 # <CJK>
+A65A 540E # <CJK>
+A65B 5406 # <CJK>
+A65C 5412 # <CJK>
+A65D 56E0 # <CJK>
+A65E 56DE # <CJK>
+A65F 56DD # <CJK>
+A660 5733 # <CJK>
+A661 5730 # <CJK>
+A662 5728 # <CJK>
+A663 572D # <CJK>
+A664 572C # <CJK>
+A665 572F # <CJK>
+A666 5729 # <CJK>
+A667 5919 # <CJK>
+A668 591A # <CJK>
+A669 5937 # <CJK>
+A66A 5938 # <CJK>
+A66B 5984 # <CJK>
+A66C 5978 # <CJK>
+A66D 5983 # <CJK>
+A66E 597D # <CJK>
+A66F 5979 # <CJK>
+A670 5982 # <CJK>
+A671 5981 # <CJK>
+A672 5B57 # <CJK>
+A673 5B58 # <CJK>
+A674 5B87 # <CJK>
+A675 5B88 # <CJK>
+A676 5B85 # <CJK>
+A677 5B89 # <CJK>
+A678 5BFA # <CJK>
+A679 5C16 # <CJK>
+A67A 5C79 # <CJK>
+A67B 5DDE # <CJK>
+A67C 5E06 # <CJK>
+A67D 5E76 # <CJK>
+A67E 5E74 # <CJK>
+A6A1 5F0F # <CJK>
+A6A2 5F1B # <CJK>
+A6A3 5FD9 # <CJK>
+A6A4 5FD6 # <CJK>
+A6A5 620E # <CJK>
+A6A6 620C # <CJK>
+A6A7 620D # <CJK>
+A6A8 6210 # <CJK>
+A6A9 6263 # <CJK>
+A6AA 625B # <CJK>
+A6AB 6258 # <CJK>
+A6AC 6536 # <CJK>
+A6AD 65E9 # <CJK>
+A6AE 65E8 # <CJK>
+A6AF 65EC # <CJK>
+A6B0 65ED # <CJK>
+A6B1 66F2 # <CJK>
+A6B2 66F3 # <CJK>
+A6B3 6709 # <CJK>
+A6B4 673D # <CJK>
+A6B5 6734 # <CJK>
+A6B6 6731 # <CJK>
+A6B7 6735 # <CJK>
+A6B8 6B21 # <CJK>
+A6B9 6B64 # <CJK>
+A6BA 6B7B # <CJK>
+A6BB 6C16 # <CJK>
+A6BC 6C5D # <CJK>
+A6BD 6C57 # <CJK>
+A6BE 6C59 # <CJK>
+A6BF 6C5F # <CJK>
+A6C0 6C60 # <CJK>
+A6C1 6C50 # <CJK>
+A6C2 6C55 # <CJK>
+A6C3 6C61 # <CJK>
+A6C4 6C5B # <CJK>
+A6C5 6C4D # <CJK>
+A6C6 6C4E # <CJK>
+A6C7 7070 # <CJK>
+A6C8 725F # <CJK>
+A6C9 725D # <CJK>
+A6CA 767E # <CJK>
+A6CB 7AF9 # <CJK>
+A6CC 7C73 # <CJK>
+A6CD 7CF8 # <CJK>
+A6CE 7F36 # <CJK>
+A6CF 7F8A # <CJK>
+A6D0 7FBD # <CJK>
+A6D1 8001 # <CJK>
+A6D2 8003 # <CJK>
+A6D3 800C # <CJK>
+A6D4 8012 # <CJK>
+A6D5 8033 # <CJK>
+A6D6 807F # <CJK>
+A6D7 8089 # <CJK>
+A6D8 808B # <CJK>
+A6D9 808C # <CJK>
+A6DA 81E3 # <CJK>
+A6DB 81EA # <CJK>
+A6DC 81F3 # <CJK>
+A6DD 81FC # <CJK>
+A6DE 820C # <CJK>
+A6DF 821B # <CJK>
+A6E0 821F # <CJK>
+A6E1 826E # <CJK>
+A6E2 8272 # <CJK>
+A6E3 827E # <CJK>
+A6E4 866B # <CJK>
+A6E5 8840 # <CJK>
+A6E6 884C # <CJK>
+A6E7 8863 # <CJK>
+A6E8 897F # <CJK>
+A6E9 9621 # <CJK>
+A6EA 4E32 # <CJK>
+A6EB 4EA8 # <CJK>
+A6EC 4F4D # <CJK>
+A6ED 4F4F # <CJK>
+A6EE 4F47 # <CJK>
+A6EF 4F57 # <CJK>
+A6F0 4F5E # <CJK>
+A6F1 4F34 # <CJK>
+A6F2 4F5B # <CJK>
+A6F3 4F55 # <CJK>
+A6F4 4F30 # <CJK>
+A6F5 4F50 # <CJK>
+A6F6 4F51 # <CJK>
+A6F7 4F3D # <CJK>
+A6F8 4F3A # <CJK>
+A6F9 4F38 # <CJK>
+A6FA 4F43 # <CJK>
+A6FB 4F54 # <CJK>
+A6FC 4F3C # <CJK>
+A6FD 4F46 # <CJK>
+A6FE 4F63 # <CJK>
+A740 4F5C # <CJK>
+A741 4F60 # <CJK>
+A742 4F2F # <CJK>
+A743 4F4E # <CJK>
+A744 4F36 # <CJK>
+A745 4F59 # <CJK>
+A746 4F5D # <CJK>
+A747 4F48 # <CJK>
+A748 4F5A # <CJK>
+A749 514C # <CJK>
+A74A 514B # <CJK>
+A74B 514D # <CJK>
+A74C 5175 # <CJK>
+A74D 51B6 # <CJK>
+A74E 51B7 # <CJK>
+A74F 5225 # <CJK>
+A750 5224 # <CJK>
+A751 5229 # <CJK>
+A752 522A # <CJK>
+A753 5228 # <CJK>
+A754 52AB # <CJK>
+A755 52A9 # <CJK>
+A756 52AA # <CJK>
+A757 52AC # <CJK>
+A758 5323 # <CJK>
+A759 5373 # <CJK>
+A75A 5375 # <CJK>
+A75B 541D # <CJK>
+A75C 542D # <CJK>
+A75D 541E # <CJK>
+A75E 543E # <CJK>
+A75F 5426 # <CJK>
+A760 544E # <CJK>
+A761 5427 # <CJK>
+A762 5446 # <CJK>
+A763 5443 # <CJK>
+A764 5433 # <CJK>
+A765 5448 # <CJK>
+A766 5442 # <CJK>
+A767 541B # <CJK>
+A768 5429 # <CJK>
+A769 544A # <CJK>
+A76A 5439 # <CJK>
+A76B 543B # <CJK>
+A76C 5438 # <CJK>
+A76D 542E # <CJK>
+A76E 5435 # <CJK>
+A76F 5436 # <CJK>
+A770 5420 # <CJK>
+A771 543C # <CJK>
+A772 5440 # <CJK>
+A773 5431 # <CJK>
+A774 542B # <CJK>
+A775 541F # <CJK>
+A776 542C # <CJK>
+A777 56EA # <CJK>
+A778 56F0 # <CJK>
+A779 56E4 # <CJK>
+A77A 56EB # <CJK>
+A77B 574A # <CJK>
+A77C 5751 # <CJK>
+A77D 5740 # <CJK>
+A77E 574D # <CJK>
+A7A1 5747 # <CJK>
+A7A2 574E # <CJK>
+A7A3 573E # <CJK>
+A7A4 5750 # <CJK>
+A7A5 574F # <CJK>
+A7A6 573B # <CJK>
+A7A7 58EF # <CJK>
+A7A8 593E # <CJK>
+A7A9 599D # <CJK>
+A7AA 5992 # <CJK>
+A7AB 59A8 # <CJK>
+A7AC 599E # <CJK>
+A7AD 59A3 # <CJK>
+A7AE 5999 # <CJK>
+A7AF 5996 # <CJK>
+A7B0 598D # <CJK>
+A7B1 59A4 # <CJK>
+A7B2 5993 # <CJK>
+A7B3 598A # <CJK>
+A7B4 59A5 # <CJK>
+A7B5 5B5D # <CJK>
+A7B6 5B5C # <CJK>
+A7B7 5B5A # <CJK>
+A7B8 5B5B # <CJK>
+A7B9 5B8C # <CJK>
+A7BA 5B8B # <CJK>
+A7BB 5B8F # <CJK>
+A7BC 5C2C # <CJK>
+A7BD 5C40 # <CJK>
+A7BE 5C41 # <CJK>
+A7BF 5C3F # <CJK>
+A7C0 5C3E # <CJK>
+A7C1 5C90 # <CJK>
+A7C2 5C91 # <CJK>
+A7C3 5C94 # <CJK>
+A7C4 5C8C # <CJK>
+A7C5 5DEB # <CJK>
+A7C6 5E0C # <CJK>
+A7C7 5E8F # <CJK>
+A7C8 5E87 # <CJK>
+A7C9 5E8A # <CJK>
+A7CA 5EF7 # <CJK>
+A7CB 5F04 # <CJK>
+A7CC 5F1F # <CJK>
+A7CD 5F64 # <CJK>
+A7CE 5F62 # <CJK>
+A7CF 5F77 # <CJK>
+A7D0 5F79 # <CJK>
+A7D1 5FD8 # <CJK>
+A7D2 5FCC # <CJK>
+A7D3 5FD7 # <CJK>
+A7D4 5FCD # <CJK>
+A7D5 5FF1 # <CJK>
+A7D6 5FEB # <CJK>
+A7D7 5FF8 # <CJK>
+A7D8 5FEA # <CJK>
+A7D9 6212 # <CJK>
+A7DA 6211 # <CJK>
+A7DB 6284 # <CJK>
+A7DC 6297 # <CJK>
+A7DD 6296 # <CJK>
+A7DE 6280 # <CJK>
+A7DF 6276 # <CJK>
+A7E0 6289 # <CJK>
+A7E1 626D # <CJK>
+A7E2 628A # <CJK>
+A7E3 627C # <CJK>
+A7E4 627E # <CJK>
+A7E5 6279 # <CJK>
+A7E6 6273 # <CJK>
+A7E7 6292 # <CJK>
+A7E8 626F # <CJK>
+A7E9 6298 # <CJK>
+A7EA 626E # <CJK>
+A7EB 6295 # <CJK>
+A7EC 6293 # <CJK>
+A7ED 6291 # <CJK>
+A7EE 6286 # <CJK>
+A7EF 6539 # <CJK>
+A7F0 653B # <CJK>
+A7F1 6538 # <CJK>
+A7F2 65F1 # <CJK>
+A7F3 66F4 # <CJK>
+A7F4 675F # <CJK>
+A7F5 674E # <CJK>
+A7F6 674F # <CJK>
+A7F7 6750 # <CJK>
+A7F8 6751 # <CJK>
+A7F9 675C # <CJK>
+A7FA 6756 # <CJK>
+A7FB 675E # <CJK>
+A7FC 6749 # <CJK>
+A7FD 6746 # <CJK>
+A7FE 6760 # <CJK>
+A840 6753 # <CJK>
+A841 6757 # <CJK>
+A842 6B65 # <CJK>
+A843 6BCF # <CJK>
+A844 6C42 # <CJK>
+A845 6C5E # <CJK>
+A846 6C99 # <CJK>
+A847 6C81 # <CJK>
+A848 6C88 # <CJK>
+A849 6C89 # <CJK>
+A84A 6C85 # <CJK>
+A84B 6C9B # <CJK>
+A84C 6C6A # <CJK>
+A84D 6C7A # <CJK>
+A84E 6C90 # <CJK>
+A84F 6C70 # <CJK>
+A850 6C8C # <CJK>
+A851 6C68 # <CJK>
+A852 6C96 # <CJK>
+A853 6C92 # <CJK>
+A854 6C7D # <CJK>
+A855 6C83 # <CJK>
+A856 6C72 # <CJK>
+A857 6C7E # <CJK>
+A858 6C74 # <CJK>
+A859 6C86 # <CJK>
+A85A 6C76 # <CJK>
+A85B 6C8D # <CJK>
+A85C 6C94 # <CJK>
+A85D 6C98 # <CJK>
+A85E 6C82 # <CJK>
+A85F 7076 # <CJK>
+A860 707C # <CJK>
+A861 707D # <CJK>
+A862 7078 # <CJK>
+A863 7262 # <CJK>
+A864 7261 # <CJK>
+A865 7260 # <CJK>
+A866 72C4 # <CJK>
+A867 72C2 # <CJK>
+A868 7396 # <CJK>
+A869 752C # <CJK>
+A86A 752B # <CJK>
+A86B 7537 # <CJK>
+A86C 7538 # <CJK>
+A86D 7682 # <CJK>
+A86E 76EF # <CJK>
+A86F 77E3 # <CJK>
+A870 79C1 # <CJK>
+A871 79C0 # <CJK>
+A872 79BF # <CJK>
+A873 7A76 # <CJK>
+A874 7CFB # <CJK>
+A875 7F55 # <CJK>
+A876 8096 # <CJK>
+A877 8093 # <CJK>
+A878 809D # <CJK>
+A879 8098 # <CJK>
+A87A 809B # <CJK>
+A87B 809A # <CJK>
+A87C 80B2 # <CJK>
+A87D 826F # <CJK>
+A87E 8292 # <CJK>
+A8A1 828B # <CJK>
+A8A2 828D # <CJK>
+A8A3 898B # <CJK>
+A8A4 89D2 # <CJK>
+A8A5 8A00 # <CJK>
+A8A6 8C37 # <CJK>
+A8A7 8C46 # <CJK>
+A8A8 8C55 # <CJK>
+A8A9 8C9D # <CJK>
+A8AA 8D64 # <CJK>
+A8AB 8D70 # <CJK>
+A8AC 8DB3 # <CJK>
+A8AD 8EAB # <CJK>
+A8AE 8ECA # <CJK>
+A8AF 8F9B # <CJK>
+A8B0 8FB0 # <CJK>
+A8B1 8FC2 # <CJK>
+A8B2 8FC6 # <CJK>
+A8B3 8FC5 # <CJK>
+A8B4 8FC4 # <CJK>
+A8B5 5DE1 # <CJK>
+A8B6 9091 # <CJK>
+A8B7 90A2 # <CJK>
+A8B8 90AA # <CJK>
+A8B9 90A6 # <CJK>
+A8BA 90A3 # <CJK>
+A8BB 9149 # <CJK>
+A8BC 91C6 # <CJK>
+A8BD 91CC # <CJK>
+A8BE 9632 # <CJK>
+A8BF 962E # <CJK>
+A8C0 9631 # <CJK>
+A8C1 962A # <CJK>
+A8C2 962C # <CJK>
+A8C3 4E26 # <CJK>
+A8C4 4E56 # <CJK>
+A8C5 4E73 # <CJK>
+A8C6 4E8B # <CJK>
+A8C7 4E9B # <CJK>
+A8C8 4E9E # <CJK>
+A8C9 4EAB # <CJK>
+A8CA 4EAC # <CJK>
+A8CB 4F6F # <CJK>
+A8CC 4F9D # <CJK>
+A8CD 4F8D # <CJK>
+A8CE 4F73 # <CJK>
+A8CF 4F7F # <CJK>
+A8D0 4F6C # <CJK>
+A8D1 4F9B # <CJK>
+A8D2 4F8B # <CJK>
+A8D3 4F86 # <CJK>
+A8D4 4F83 # <CJK>
+A8D5 4F70 # <CJK>
+A8D6 4F75 # <CJK>
+A8D7 4F88 # <CJK>
+A8D8 4F69 # <CJK>
+A8D9 4F7B # <CJK>
+A8DA 4F96 # <CJK>
+A8DB 4F7E # <CJK>
+A8DC 4F8F # <CJK>
+A8DD 4F91 # <CJK>
+A8DE 4F7A # <CJK>
+A8DF 5154 # <CJK>
+A8E0 5152 # <CJK>
+A8E1 5155 # <CJK>
+A8E2 5169 # <CJK>
+A8E3 5177 # <CJK>
+A8E4 5176 # <CJK>
+A8E5 5178 # <CJK>
+A8E6 51BD # <CJK>
+A8E7 51FD # <CJK>
+A8E8 523B # <CJK>
+A8E9 5238 # <CJK>
+A8EA 5237 # <CJK>
+A8EB 523A # <CJK>
+A8EC 5230 # <CJK>
+A8ED 522E # <CJK>
+A8EE 5236 # <CJK>
+A8EF 5241 # <CJK>
+A8F0 52BE # <CJK>
+A8F1 52BB # <CJK>
+A8F2 5352 # <CJK>
+A8F3 5354 # <CJK>
+A8F4 5353 # <CJK>
+A8F5 5351 # <CJK>
+A8F6 5366 # <CJK>
+A8F7 5377 # <CJK>
+A8F8 5378 # <CJK>
+A8F9 5379 # <CJK>
+A8FA 53D6 # <CJK>
+A8FB 53D4 # <CJK>
+A8FC 53D7 # <CJK>
+A8FD 5473 # <CJK>
+A8FE 5475 # <CJK>
+A940 5496 # <CJK>
+A941 5478 # <CJK>
+A942 5495 # <CJK>
+A943 5480 # <CJK>
+A944 547B # <CJK>
+A945 5477 # <CJK>
+A946 5484 # <CJK>
+A947 5492 # <CJK>
+A948 5486 # <CJK>
+A949 547C # <CJK>
+A94A 5490 # <CJK>
+A94B 5471 # <CJK>
+A94C 5476 # <CJK>
+A94D 548C # <CJK>
+A94E 549A # <CJK>
+A94F 5462 # <CJK>
+A950 5468 # <CJK>
+A951 548B # <CJK>
+A952 547D # <CJK>
+A953 548E # <CJK>
+A954 56FA # <CJK>
+A955 5783 # <CJK>
+A956 5777 # <CJK>
+A957 576A # <CJK>
+A958 5769 # <CJK>
+A959 5761 # <CJK>
+A95A 5766 # <CJK>
+A95B 5764 # <CJK>
+A95C 577C # <CJK>
+A95D 591C # <CJK>
+A95E 5949 # <CJK>
+A95F 5947 # <CJK>
+A960 5948 # <CJK>
+A961 5944 # <CJK>
+A962 5954 # <CJK>
+A963 59BE # <CJK>
+A964 59BB # <CJK>
+A965 59D4 # <CJK>
+A966 59B9 # <CJK>
+A967 59AE # <CJK>
+A968 59D1 # <CJK>
+A969 59C6 # <CJK>
+A96A 59D0 # <CJK>
+A96B 59CD # <CJK>
+A96C 59CB # <CJK>
+A96D 59D3 # <CJK>
+A96E 59CA # <CJK>
+A96F 59AF # <CJK>
+A970 59B3 # <CJK>
+A971 59D2 # <CJK>
+A972 59C5 # <CJK>
+A973 5B5F # <CJK>
+A974 5B64 # <CJK>
+A975 5B63 # <CJK>
+A976 5B97 # <CJK>
+A977 5B9A # <CJK>
+A978 5B98 # <CJK>
+A979 5B9C # <CJK>
+A97A 5B99 # <CJK>
+A97B 5B9B # <CJK>
+A97C 5C1A # <CJK>
+A97D 5C48 # <CJK>
+A97E 5C45 # <CJK>
+A9A1 5C46 # <CJK>
+A9A2 5CB7 # <CJK>
+A9A3 5CA1 # <CJK>
+A9A4 5CB8 # <CJK>
+A9A5 5CA9 # <CJK>
+A9A6 5CAB # <CJK>
+A9A7 5CB1 # <CJK>
+A9A8 5CB3 # <CJK>
+A9A9 5E18 # <CJK>
+A9AA 5E1A # <CJK>
+A9AB 5E16 # <CJK>
+A9AC 5E15 # <CJK>
+A9AD 5E1B # <CJK>
+A9AE 5E11 # <CJK>
+A9AF 5E78 # <CJK>
+A9B0 5E9A # <CJK>
+A9B1 5E97 # <CJK>
+A9B2 5E9C # <CJK>
+A9B3 5E95 # <CJK>
+A9B4 5E96 # <CJK>
+A9B5 5EF6 # <CJK>
+A9B6 5F26 # <CJK>
+A9B7 5F27 # <CJK>
+A9B8 5F29 # <CJK>
+A9B9 5F80 # <CJK>
+A9BA 5F81 # <CJK>
+A9BB 5F7F # <CJK>
+A9BC 5F7C # <CJK>
+A9BD 5FDD # <CJK>
+A9BE 5FE0 # <CJK>
+A9BF 5FFD # <CJK>
+A9C0 5FF5 # <CJK>
+A9C1 5FFF # <CJK>
+A9C2 600F # <CJK>
+A9C3 6014 # <CJK>
+A9C4 602F # <CJK>
+A9C5 6035 # <CJK>
+A9C6 6016 # <CJK>
+A9C7 602A # <CJK>
+A9C8 6015 # <CJK>
+A9C9 6021 # <CJK>
+A9CA 6027 # <CJK>
+A9CB 6029 # <CJK>
+A9CC 602B # <CJK>
+A9CD 601B # <CJK>
+A9CE 6216 # <CJK>
+A9CF 6215 # <CJK>
+A9D0 623F # <CJK>
+A9D1 623E # <CJK>
+A9D2 6240 # <CJK>
+A9D3 627F # <CJK>
+A9D4 62C9 # <CJK>
+A9D5 62CC # <CJK>
+A9D6 62C4 # <CJK>
+A9D7 62BF # <CJK>
+A9D8 62C2 # <CJK>
+A9D9 62B9 # <CJK>
+A9DA 62D2 # <CJK>
+A9DB 62DB # <CJK>
+A9DC 62AB # <CJK>
+A9DD 62D3 # <CJK>
+A9DE 62D4 # <CJK>
+A9DF 62CB # <CJK>
+A9E0 62C8 # <CJK>
+A9E1 62A8 # <CJK>
+A9E2 62BD # <CJK>
+A9E3 62BC # <CJK>
+A9E4 62D0 # <CJK>
+A9E5 62D9 # <CJK>
+A9E6 62C7 # <CJK>
+A9E7 62CD # <CJK>
+A9E8 62B5 # <CJK>
+A9E9 62DA # <CJK>
+A9EA 62B1 # <CJK>
+A9EB 62D8 # <CJK>
+A9EC 62D6 # <CJK>
+A9ED 62D7 # <CJK>
+A9EE 62C6 # <CJK>
+A9EF 62AC # <CJK>
+A9F0 62CE # <CJK>
+A9F1 653E # <CJK>
+A9F2 65A7 # <CJK>
+A9F3 65BC # <CJK>
+A9F4 65FA # <CJK>
+A9F5 6614 # <CJK>
+A9F6 6613 # <CJK>
+A9F7 660C # <CJK>
+A9F8 6606 # <CJK>
+A9F9 6602 # <CJK>
+A9FA 660E # <CJK>
+A9FB 6600 # <CJK>
+A9FC 660F # <CJK>
+A9FD 6615 # <CJK>
+A9FE 660A # <CJK>
+AA40 6607 # <CJK>
+AA41 670D # <CJK>
+AA42 670B # <CJK>
+AA43 676D # <CJK>
+AA44 678B # <CJK>
+AA45 6795 # <CJK>
+AA46 6771 # <CJK>
+AA47 679C # <CJK>
+AA48 6773 # <CJK>
+AA49 6777 # <CJK>
+AA4A 6787 # <CJK>
+AA4B 679D # <CJK>
+AA4C 6797 # <CJK>
+AA4D 676F # <CJK>
+AA4E 6770 # <CJK>
+AA4F 677F # <CJK>
+AA50 6789 # <CJK>
+AA51 677E # <CJK>
+AA52 6790 # <CJK>
+AA53 6775 # <CJK>
+AA54 679A # <CJK>
+AA55 6793 # <CJK>
+AA56 677C # <CJK>
+AA57 676A # <CJK>
+AA58 6772 # <CJK>
+AA59 6B23 # <CJK>
+AA5A 6B66 # <CJK>
+AA5B 6B67 # <CJK>
+AA5C 6B7F # <CJK>
+AA5D 6C13 # <CJK>
+AA5E 6C1B # <CJK>
+AA5F 6CE3 # <CJK>
+AA60 6CE8 # <CJK>
+AA61 6CF3 # <CJK>
+AA62 6CB1 # <CJK>
+AA63 6CCC # <CJK>
+AA64 6CE5 # <CJK>
+AA65 6CB3 # <CJK>
+AA66 6CBD # <CJK>
+AA67 6CBE # <CJK>
+AA68 6CBC # <CJK>
+AA69 6CE2 # <CJK>
+AA6A 6CAB # <CJK>
+AA6B 6CD5 # <CJK>
+AA6C 6CD3 # <CJK>
+AA6D 6CB8 # <CJK>
+AA6E 6CC4 # <CJK>
+AA6F 6CB9 # <CJK>
+AA70 6CC1 # <CJK>
+AA71 6CAE # <CJK>
+AA72 6CD7 # <CJK>
+AA73 6CC5 # <CJK>
+AA74 6CF1 # <CJK>
+AA75 6CBF # <CJK>
+AA76 6CBB # <CJK>
+AA77 6CE1 # <CJK>
+AA78 6CDB # <CJK>
+AA79 6CCA # <CJK>
+AA7A 6CAC # <CJK>
+AA7B 6CEF # <CJK>
+AA7C 6CDC # <CJK>
+AA7D 6CD6 # <CJK>
+AA7E 6CE0 # <CJK>
+AAA1 7095 # <CJK>
+AAA2 708E # <CJK>
+AAA3 7092 # <CJK>
+AAA4 708A # <CJK>
+AAA5 7099 # <CJK>
+AAA6 722C # <CJK>
+AAA7 722D # <CJK>
+AAA8 7238 # <CJK>
+AAA9 7248 # <CJK>
+AAAA 7267 # <CJK>
+AAAB 7269 # <CJK>
+AAAC 72C0 # <CJK>
+AAAD 72CE # <CJK>
+AAAE 72D9 # <CJK>
+AAAF 72D7 # <CJK>
+AAB0 72D0 # <CJK>
+AAB1 73A9 # <CJK>
+AAB2 73A8 # <CJK>
+AAB3 739F # <CJK>
+AAB4 73AB # <CJK>
+AAB5 73A5 # <CJK>
+AAB6 753D # <CJK>
+AAB7 759D # <CJK>
+AAB8 7599 # <CJK>
+AAB9 759A # <CJK>
+AABA 7684 # <CJK>
+AABB 76C2 # <CJK>
+AABC 76F2 # <CJK>
+AABD 76F4 # <CJK>
+AABE 77E5 # <CJK>
+AABF 77FD # <CJK>
+AAC0 793E # <CJK>
+AAC1 7940 # <CJK>
+AAC2 7941 # <CJK>
+AAC3 79C9 # <CJK>
+AAC4 79C8 # <CJK>
+AAC5 7A7A # <CJK>
+AAC6 7A79 # <CJK>
+AAC7 7AFA # <CJK>
+AAC8 7CFE # <CJK>
+AAC9 7F54 # <CJK>
+AACA 7F8C # <CJK>
+AACB 7F8B # <CJK>
+AACC 8005 # <CJK>
+AACD 80BA # <CJK>
+AACE 80A5 # <CJK>
+AACF 80A2 # <CJK>
+AAD0 80B1 # <CJK>
+AAD1 80A1 # <CJK>
+AAD2 80AB # <CJK>
+AAD3 80A9 # <CJK>
+AAD4 80B4 # <CJK>
+AAD5 80AA # <CJK>
+AAD6 80AF # <CJK>
+AAD7 81E5 # <CJK>
+AAD8 81FE # <CJK>
+AAD9 820D # <CJK>
+AADA 82B3 # <CJK>
+AADB 829D # <CJK>
+AADC 8299 # <CJK>
+AADD 82AD # <CJK>
+AADE 82BD # <CJK>
+AADF 829F # <CJK>
+AAE0 82B9 # <CJK>
+AAE1 82B1 # <CJK>
+AAE2 82AC # <CJK>
+AAE3 82A5 # <CJK>
+AAE4 82AF # <CJK>
+AAE5 82B8 # <CJK>
+AAE6 82A3 # <CJK>
+AAE7 82B0 # <CJK>
+AAE8 82BE # <CJK>
+AAE9 82B7 # <CJK>
+AAEA 864E # <CJK>
+AAEB 8671 # <CJK>
+AAEC 521D # <CJK>
+AAED 8868 # <CJK>
+AAEE 8ECB # <CJK>
+AAEF 8FCE # <CJK>
+AAF0 8FD4 # <CJK>
+AAF1 8FD1 # <CJK>
+AAF2 90B5 # <CJK>
+AAF3 90B8 # <CJK>
+AAF4 90B1 # <CJK>
+AAF5 90B6 # <CJK>
+AAF6 91C7 # <CJK>
+AAF7 91D1 # <CJK>
+AAF8 9577 # <CJK>
+AAF9 9580 # <CJK>
+AAFA 961C # <CJK>
+AAFB 9640 # <CJK>
+AAFC 963F # <CJK>
+AAFD 963B # <CJK>
+AAFE 9644 # <CJK>
+AB40 9642 # <CJK>
+AB41 96B9 # <CJK>
+AB42 96E8 # <CJK>
+AB43 9752 # <CJK>
+AB44 975E # <CJK>
+AB45 4E9F # <CJK>
+AB46 4EAD # <CJK>
+AB47 4EAE # <CJK>
+AB48 4FE1 # <CJK>
+AB49 4FB5 # <CJK>
+AB4A 4FAF # <CJK>
+AB4B 4FBF # <CJK>
+AB4C 4FE0 # <CJK>
+AB4D 4FD1 # <CJK>
+AB4E 4FCF # <CJK>
+AB4F 4FDD # <CJK>
+AB50 4FC3 # <CJK>
+AB51 4FB6 # <CJK>
+AB52 4FD8 # <CJK>
+AB53 4FDF # <CJK>
+AB54 4FCA # <CJK>
+AB55 4FD7 # <CJK>
+AB56 4FAE # <CJK>
+AB57 4FD0 # <CJK>
+AB58 4FC4 # <CJK>
+AB59 4FC2 # <CJK>
+AB5A 4FDA # <CJK>
+AB5B 4FCE # <CJK>
+AB5C 4FDE # <CJK>
+AB5D 4FB7 # <CJK>
+AB5E 5157 # <CJK>
+AB5F 5192 # <CJK>
+AB60 5191 # <CJK>
+AB61 51A0 # <CJK>
+AB62 524E # <CJK>
+AB63 5243 # <CJK>
+AB64 524A # <CJK>
+AB65 524D # <CJK>
+AB66 524C # <CJK>
+AB67 524B # <CJK>
+AB68 5247 # <CJK>
+AB69 52C7 # <CJK>
+AB6A 52C9 # <CJK>
+AB6B 52C3 # <CJK>
+AB6C 52C1 # <CJK>
+AB6D 530D # <CJK>
+AB6E 5357 # <CJK>
+AB6F 537B # <CJK>
+AB70 539A # <CJK>
+AB71 53DB # <CJK>
+AB72 54AC # <CJK>
+AB73 54C0 # <CJK>
+AB74 54A8 # <CJK>
+AB75 54CE # <CJK>
+AB76 54C9 # <CJK>
+AB77 54B8 # <CJK>
+AB78 54A6 # <CJK>
+AB79 54B3 # <CJK>
+AB7A 54C7 # <CJK>
+AB7B 54C2 # <CJK>
+AB7C 54BD # <CJK>
+AB7D 54AA # <CJK>
+AB7E 54C1 # <CJK>
+ABA1 54C4 # <CJK>
+ABA2 54C8 # <CJK>
+ABA3 54AF # <CJK>
+ABA4 54AB # <CJK>
+ABA5 54B1 # <CJK>
+ABA6 54BB # <CJK>
+ABA7 54A9 # <CJK>
+ABA8 54A7 # <CJK>
+ABA9 54BF # <CJK>
+ABAA 56FF # <CJK>
+ABAB 5782 # <CJK>
+ABAC 578B # <CJK>
+ABAD 57A0 # <CJK>
+ABAE 57A3 # <CJK>
+ABAF 57A2 # <CJK>
+ABB0 57CE # <CJK>
+ABB1 57AE # <CJK>
+ABB2 5793 # <CJK>
+ABB3 5955 # <CJK>
+ABB4 5951 # <CJK>
+ABB5 594F # <CJK>
+ABB6 594E # <CJK>
+ABB7 5950 # <CJK>
+ABB8 59DC # <CJK>
+ABB9 59D8 # <CJK>
+ABBA 59FF # <CJK>
+ABBB 59E3 # <CJK>
+ABBC 59E8 # <CJK>
+ABBD 5A03 # <CJK>
+ABBE 59E5 # <CJK>
+ABBF 59EA # <CJK>
+ABC0 59DA # <CJK>
+ABC1 59E6 # <CJK>
+ABC2 5A01 # <CJK>
+ABC3 59FB # <CJK>
+ABC4 5B69 # <CJK>
+ABC5 5BA3 # <CJK>
+ABC6 5BA6 # <CJK>
+ABC7 5BA4 # <CJK>
+ABC8 5BA2 # <CJK>
+ABC9 5BA5 # <CJK>
+ABCA 5C01 # <CJK>
+ABCB 5C4E # <CJK>
+ABCC 5C4F # <CJK>
+ABCD 5C4D # <CJK>
+ABCE 5C4B # <CJK>
+ABCF 5CD9 # <CJK>
+ABD0 5CD2 # <CJK>
+ABD1 5DF7 # <CJK>
+ABD2 5E1D # <CJK>
+ABD3 5E25 # <CJK>
+ABD4 5E1F # <CJK>
+ABD5 5E7D # <CJK>
+ABD6 5EA0 # <CJK>
+ABD7 5EA6 # <CJK>
+ABD8 5EFA # <CJK>
+ABD9 5F08 # <CJK>
+ABDA 5F2D # <CJK>
+ABDB 5F65 # <CJK>
+ABDC 5F88 # <CJK>
+ABDD 5F85 # <CJK>
+ABDE 5F8A # <CJK>
+ABDF 5F8B # <CJK>
+ABE0 5F87 # <CJK>
+ABE1 5F8C # <CJK>
+ABE2 5F89 # <CJK>
+ABE3 6012 # <CJK>
+ABE4 601D # <CJK>
+ABE5 6020 # <CJK>
+ABE6 6025 # <CJK>
+ABE7 600E # <CJK>
+ABE8 6028 # <CJK>
+ABE9 604D # <CJK>
+ABEA 6070 # <CJK>
+ABEB 6068 # <CJK>
+ABEC 6062 # <CJK>
+ABED 6046 # <CJK>
+ABEE 6043 # <CJK>
+ABEF 606C # <CJK>
+ABF0 606B # <CJK>
+ABF1 606A # <CJK>
+ABF2 6064 # <CJK>
+ABF3 6241 # <CJK>
+ABF4 62DC # <CJK>
+ABF5 6316 # <CJK>
+ABF6 6309 # <CJK>
+ABF7 62FC # <CJK>
+ABF8 62ED # <CJK>
+ABF9 6301 # <CJK>
+ABFA 62EE # <CJK>
+ABFB 62FD # <CJK>
+ABFC 6307 # <CJK>
+ABFD 62F1 # <CJK>
+ABFE 62F7 # <CJK>
+AC40 62EF # <CJK>
+AC41 62EC # <CJK>
+AC42 62FE # <CJK>
+AC43 62F4 # <CJK>
+AC44 6311 # <CJK>
+AC45 6302 # <CJK>
+AC46 653F # <CJK>
+AC47 6545 # <CJK>
+AC48 65AB # <CJK>
+AC49 65BD # <CJK>
+AC4A 65E2 # <CJK>
+AC4B 6625 # <CJK>
+AC4C 662D # <CJK>
+AC4D 6620 # <CJK>
+AC4E 6627 # <CJK>
+AC4F 662F # <CJK>
+AC50 661F # <CJK>
+AC51 6628 # <CJK>
+AC52 6631 # <CJK>
+AC53 6624 # <CJK>
+AC54 66F7 # <CJK>
+AC55 67FF # <CJK>
+AC56 67D3 # <CJK>
+AC57 67F1 # <CJK>
+AC58 67D4 # <CJK>
+AC59 67D0 # <CJK>
+AC5A 67EC # <CJK>
+AC5B 67B6 # <CJK>
+AC5C 67AF # <CJK>
+AC5D 67F5 # <CJK>
+AC5E 67E9 # <CJK>
+AC5F 67EF # <CJK>
+AC60 67C4 # <CJK>
+AC61 67D1 # <CJK>
+AC62 67B4 # <CJK>
+AC63 67DA # <CJK>
+AC64 67E5 # <CJK>
+AC65 67B8 # <CJK>
+AC66 67CF # <CJK>
+AC67 67DE # <CJK>
+AC68 67F3 # <CJK>
+AC69 67B0 # <CJK>
+AC6A 67D9 # <CJK>
+AC6B 67E2 # <CJK>
+AC6C 67DD # <CJK>
+AC6D 67D2 # <CJK>
+AC6E 6B6A # <CJK>
+AC6F 6B83 # <CJK>
+AC70 6B86 # <CJK>
+AC71 6BB5 # <CJK>
+AC72 6BD2 # <CJK>
+AC73 6BD7 # <CJK>
+AC74 6C1F # <CJK>
+AC75 6CC9 # <CJK>
+AC76 6D0B # <CJK>
+AC77 6D32 # <CJK>
+AC78 6D2A # <CJK>
+AC79 6D41 # <CJK>
+AC7A 6D25 # <CJK>
+AC7B 6D0C # <CJK>
+AC7C 6D31 # <CJK>
+AC7D 6D1E # <CJK>
+AC7E 6D17 # <CJK>
+ACA1 6D3B # <CJK>
+ACA2 6D3D # <CJK>
+ACA3 6D3E # <CJK>
+ACA4 6D36 # <CJK>
+ACA5 6D1B # <CJK>
+ACA6 6CF5 # <CJK>
+ACA7 6D39 # <CJK>
+ACA8 6D27 # <CJK>
+ACA9 6D38 # <CJK>
+ACAA 6D29 # <CJK>
+ACAB 6D2E # <CJK>
+ACAC 6D35 # <CJK>
+ACAD 6D0E # <CJK>
+ACAE 6D2B # <CJK>
+ACAF 70AB # <CJK>
+ACB0 70BA # <CJK>
+ACB1 70B3 # <CJK>
+ACB2 70AC # <CJK>
+ACB3 70AF # <CJK>
+ACB4 70AD # <CJK>
+ACB5 70B8 # <CJK>
+ACB6 70AE # <CJK>
+ACB7 70A4 # <CJK>
+ACB8 7230 # <CJK>
+ACB9 7272 # <CJK>
+ACBA 726F # <CJK>
+ACBB 7274 # <CJK>
+ACBC 72E9 # <CJK>
+ACBD 72E0 # <CJK>
+ACBE 72E1 # <CJK>
+ACBF 73B7 # <CJK>
+ACC0 73CA # <CJK>
+ACC1 73BB # <CJK>
+ACC2 73B2 # <CJK>
+ACC3 73CD # <CJK>
+ACC4 73C0 # <CJK>
+ACC5 73B3 # <CJK>
+ACC6 751A # <CJK>
+ACC7 752D # <CJK>
+ACC8 754F # <CJK>
+ACC9 754C # <CJK>
+ACCA 754E # <CJK>
+ACCB 754B # <CJK>
+ACCC 75AB # <CJK>
+ACCD 75A4 # <CJK>
+ACCE 75A5 # <CJK>
+ACCF 75A2 # <CJK>
+ACD0 75A3 # <CJK>
+ACD1 7678 # <CJK>
+ACD2 7686 # <CJK>
+ACD3 7687 # <CJK>
+ACD4 7688 # <CJK>
+ACD5 76C8 # <CJK>
+ACD6 76C6 # <CJK>
+ACD7 76C3 # <CJK>
+ACD8 76C5 # <CJK>
+ACD9 7701 # <CJK>
+ACDA 76F9 # <CJK>
+ACDB 76F8 # <CJK>
+ACDC 7709 # <CJK>
+ACDD 770B # <CJK>
+ACDE 76FE # <CJK>
+ACDF 76FC # <CJK>
+ACE0 7707 # <CJK>
+ACE1 77DC # <CJK>
+ACE2 7802 # <CJK>
+ACE3 7814 # <CJK>
+ACE4 780C # <CJK>
+ACE5 780D # <CJK>
+ACE6 7946 # <CJK>
+ACE7 7949 # <CJK>
+ACE8 7948 # <CJK>
+ACE9 7947 # <CJK>
+ACEA 79B9 # <CJK>
+ACEB 79BA # <CJK>
+ACEC 79D1 # <CJK>
+ACED 79D2 # <CJK>
+ACEE 79CB # <CJK>
+ACEF 7A7F # <CJK>
+ACF0 7A81 # <CJK>
+ACF1 7AFF # <CJK>
+ACF2 7AFD # <CJK>
+ACF3 7C7D # <CJK>
+ACF4 7D02 # <CJK>
+ACF5 7D05 # <CJK>
+ACF6 7D00 # <CJK>
+ACF7 7D09 # <CJK>
+ACF8 7D07 # <CJK>
+ACF9 7D04 # <CJK>
+ACFA 7D06 # <CJK>
+ACFB 7F38 # <CJK>
+ACFC 7F8E # <CJK>
+ACFD 7FBF # <CJK>
+ACFE 8004 # <CJK>
+AD40 8010 # <CJK>
+AD41 800D # <CJK>
+AD42 8011 # <CJK>
+AD43 8036 # <CJK>
+AD44 80D6 # <CJK>
+AD45 80E5 # <CJK>
+AD46 80DA # <CJK>
+AD47 80C3 # <CJK>
+AD48 80C4 # <CJK>
+AD49 80CC # <CJK>
+AD4A 80E1 # <CJK>
+AD4B 80DB # <CJK>
+AD4C 80CE # <CJK>
+AD4D 80DE # <CJK>
+AD4E 80E4 # <CJK>
+AD4F 80DD # <CJK>
+AD50 81F4 # <CJK>
+AD51 8222 # <CJK>
+AD52 82E7 # <CJK>
+AD53 8303 # <CJK>
+AD54 8305 # <CJK>
+AD55 82E3 # <CJK>
+AD56 82DB # <CJK>
+AD57 82E6 # <CJK>
+AD58 8304 # <CJK>
+AD59 82E5 # <CJK>
+AD5A 8302 # <CJK>
+AD5B 8309 # <CJK>
+AD5C 82D2 # <CJK>
+AD5D 82D7 # <CJK>
+AD5E 82F1 # <CJK>
+AD5F 8301 # <CJK>
+AD60 82DC # <CJK>
+AD61 82D4 # <CJK>
+AD62 82D1 # <CJK>
+AD63 82DE # <CJK>
+AD64 82D3 # <CJK>
+AD65 82DF # <CJK>
+AD66 82EF # <CJK>
+AD67 8306 # <CJK>
+AD68 8650 # <CJK>
+AD69 8679 # <CJK>
+AD6A 867B # <CJK>
+AD6B 867A # <CJK>
+AD6C 884D # <CJK>
+AD6D 886B # <CJK>
+AD6E 8981 # <CJK>
+AD6F 89D4 # <CJK>
+AD70 8A08 # <CJK>
+AD71 8A02 # <CJK>
+AD72 8A03 # <CJK>
+AD73 8C9E # <CJK>
+AD74 8CA0 # <CJK>
+AD75 8D74 # <CJK>
+AD76 8D73 # <CJK>
+AD77 8DB4 # <CJK>
+AD78 8ECD # <CJK>
+AD79 8ECC # <CJK>
+AD7A 8FF0 # <CJK>
+AD7B 8FE6 # <CJK>
+AD7C 8FE2 # <CJK>
+AD7D 8FEA # <CJK>
+AD7E 8FE5 # <CJK>
+ADA1 8FED # <CJK>
+ADA2 8FEB # <CJK>
+ADA3 8FE4 # <CJK>
+ADA4 8FE8 # <CJK>
+ADA5 90CA # <CJK>
+ADA6 90CE # <CJK>
+ADA7 90C1 # <CJK>
+ADA8 90C3 # <CJK>
+ADA9 914B # <CJK>
+ADAA 914A # <CJK>
+ADAB 91CD # <CJK>
+ADAC 9582 # <CJK>
+ADAD 9650 # <CJK>
+ADAE 964B # <CJK>
+ADAF 964C # <CJK>
+ADB0 964D # <CJK>
+ADB1 9762 # <CJK>
+ADB2 9769 # <CJK>
+ADB3 97CB # <CJK>
+ADB4 97ED # <CJK>
+ADB5 97F3 # <CJK>
+ADB6 9801 # <CJK>
+ADB7 98A8 # <CJK>
+ADB8 98DB # <CJK>
+ADB9 98DF # <CJK>
+ADBA 9996 # <CJK>
+ADBB 9999 # <CJK>
+ADBC 4E58 # <CJK>
+ADBD 4EB3 # <CJK>
+ADBE 500C # <CJK>
+ADBF 500D # <CJK>
+ADC0 5023 # <CJK>
+ADC1 4FEF # <CJK>
+ADC2 5026 # <CJK>
+ADC3 5025 # <CJK>
+ADC4 4FF8 # <CJK>
+ADC5 5029 # <CJK>
+ADC6 5016 # <CJK>
+ADC7 5006 # <CJK>
+ADC8 503C # <CJK>
+ADC9 501F # <CJK>
+ADCA 501A # <CJK>
+ADCB 5012 # <CJK>
+ADCC 5011 # <CJK>
+ADCD 4FFA # <CJK>
+ADCE 5000 # <CJK>
+ADCF 5014 # <CJK>
+ADD0 5028 # <CJK>
+ADD1 4FF1 # <CJK>
+ADD2 5021 # <CJK>
+ADD3 500B # <CJK>
+ADD4 5019 # <CJK>
+ADD5 5018 # <CJK>
+ADD6 4FF3 # <CJK>
+ADD7 4FEE # <CJK>
+ADD8 502D # <CJK>
+ADD9 502A # <CJK>
+ADDA 4FFE # <CJK>
+ADDB 502B # <CJK>
+ADDC 5009 # <CJK>
+ADDD 517C # <CJK>
+ADDE 51A4 # <CJK>
+ADDF 51A5 # <CJK>
+ADE0 51A2 # <CJK>
+ADE1 51CD # <CJK>
+ADE2 51CC # <CJK>
+ADE3 51C6 # <CJK>
+ADE4 51CB # <CJK>
+ADE5 5256 # <CJK>
+ADE6 525C # <CJK>
+ADE7 5254 # <CJK>
+ADE8 525B # <CJK>
+ADE9 525D # <CJK>
+ADEA 532A # <CJK>
+ADEB 537F # <CJK>
+ADEC 539F # <CJK>
+ADED 539D # <CJK>
+ADEE 53DF # <CJK>
+ADEF 54E8 # <CJK>
+ADF0 5510 # <CJK>
+ADF1 5501 # <CJK>
+ADF2 5537 # <CJK>
+ADF3 54FC # <CJK>
+ADF4 54E5 # <CJK>
+ADF5 54F2 # <CJK>
+ADF6 5506 # <CJK>
+ADF7 54FA # <CJK>
+ADF8 5514 # <CJK>
+ADF9 54E9 # <CJK>
+ADFA 54ED # <CJK>
+ADFB 54E1 # <CJK>
+ADFC 5509 # <CJK>
+ADFD 54EE # <CJK>
+ADFE 54EA # <CJK>
+AE40 54E6 # <CJK>
+AE41 5527 # <CJK>
+AE42 5507 # <CJK>
+AE43 54FD # <CJK>
+AE44 550F # <CJK>
+AE45 5703 # <CJK>
+AE46 5704 # <CJK>
+AE47 57C2 # <CJK>
+AE48 57D4 # <CJK>
+AE49 57CB # <CJK>
+AE4A 57C3 # <CJK>
+AE4B 5809 # <CJK>
+AE4C 590F # <CJK>
+AE4D 5957 # <CJK>
+AE4E 5958 # <CJK>
+AE4F 595A # <CJK>
+AE50 5A11 # <CJK>
+AE51 5A18 # <CJK>
+AE52 5A1C # <CJK>
+AE53 5A1F # <CJK>
+AE54 5A1B # <CJK>
+AE55 5A13 # <CJK>
+AE56 59EC # <CJK>
+AE57 5A20 # <CJK>
+AE58 5A23 # <CJK>
+AE59 5A29 # <CJK>
+AE5A 5A25 # <CJK>
+AE5B 5A0C # <CJK>
+AE5C 5A09 # <CJK>
+AE5D 5B6B # <CJK>
+AE5E 5C58 # <CJK>
+AE5F 5BB0 # <CJK>
+AE60 5BB3 # <CJK>
+AE61 5BB6 # <CJK>
+AE62 5BB4 # <CJK>
+AE63 5BAE # <CJK>
+AE64 5BB5 # <CJK>
+AE65 5BB9 # <CJK>
+AE66 5BB8 # <CJK>
+AE67 5C04 # <CJK>
+AE68 5C51 # <CJK>
+AE69 5C55 # <CJK>
+AE6A 5C50 # <CJK>
+AE6B 5CED # <CJK>
+AE6C 5CFD # <CJK>
+AE6D 5CFB # <CJK>
+AE6E 5CEA # <CJK>
+AE6F 5CE8 # <CJK>
+AE70 5CF0 # <CJK>
+AE71 5CF6 # <CJK>
+AE72 5D01 # <CJK>
+AE73 5CF4 # <CJK>
+AE74 5DEE # <CJK>
+AE75 5E2D # <CJK>
+AE76 5E2B # <CJK>
+AE77 5EAB # <CJK>
+AE78 5EAD # <CJK>
+AE79 5EA7 # <CJK>
+AE7A 5F31 # <CJK>
+AE7B 5F92 # <CJK>
+AE7C 5F91 # <CJK>
+AE7D 5F90 # <CJK>
+AE7E 6059 # <CJK>
+AEA1 6063 # <CJK>
+AEA2 6065 # <CJK>
+AEA3 6050 # <CJK>
+AEA4 6055 # <CJK>
+AEA5 606D # <CJK>
+AEA6 6069 # <CJK>
+AEA7 606F # <CJK>
+AEA8 6084 # <CJK>
+AEA9 609F # <CJK>
+AEAA 609A # <CJK>
+AEAB 608D # <CJK>
+AEAC 6094 # <CJK>
+AEAD 608C # <CJK>
+AEAE 6085 # <CJK>
+AEAF 6096 # <CJK>
+AEB0 6247 # <CJK>
+AEB1 62F3 # <CJK>
+AEB2 6308 # <CJK>
+AEB3 62FF # <CJK>
+AEB4 634E # <CJK>
+AEB5 633E # <CJK>
+AEB6 632F # <CJK>
+AEB7 6355 # <CJK>
+AEB8 6342 # <CJK>
+AEB9 6346 # <CJK>
+AEBA 634F # <CJK>
+AEBB 6349 # <CJK>
+AEBC 633A # <CJK>
+AEBD 6350 # <CJK>
+AEBE 633D # <CJK>
+AEBF 632A # <CJK>
+AEC0 632B # <CJK>
+AEC1 6328 # <CJK>
+AEC2 634D # <CJK>
+AEC3 634C # <CJK>
+AEC4 6548 # <CJK>
+AEC5 6549 # <CJK>
+AEC6 6599 # <CJK>
+AEC7 65C1 # <CJK>
+AEC8 65C5 # <CJK>
+AEC9 6642 # <CJK>
+AECA 6649 # <CJK>
+AECB 664F # <CJK>
+AECC 6643 # <CJK>
+AECD 6652 # <CJK>
+AECE 664C # <CJK>
+AECF 6645 # <CJK>
+AED0 6641 # <CJK>
+AED1 66F8 # <CJK>
+AED2 6714 # <CJK>
+AED3 6715 # <CJK>
+AED4 6717 # <CJK>
+AED5 6821 # <CJK>
+AED6 6838 # <CJK>
+AED7 6848 # <CJK>
+AED8 6846 # <CJK>
+AED9 6853 # <CJK>
+AEDA 6839 # <CJK>
+AEDB 6842 # <CJK>
+AEDC 6854 # <CJK>
+AEDD 6829 # <CJK>
+AEDE 68B3 # <CJK>
+AEDF 6817 # <CJK>
+AEE0 684C # <CJK>
+AEE1 6851 # <CJK>
+AEE2 683D # <CJK>
+AEE3 67F4 # <CJK>
+AEE4 6850 # <CJK>
+AEE5 6840 # <CJK>
+AEE6 683C # <CJK>
+AEE7 6843 # <CJK>
+AEE8 682A # <CJK>
+AEE9 6845 # <CJK>
+AEEA 6813 # <CJK>
+AEEB 6818 # <CJK>
+AEEC 6841 # <CJK>
+AEED 6B8A # <CJK>
+AEEE 6B89 # <CJK>
+AEEF 6BB7 # <CJK>
+AEF0 6C23 # <CJK>
+AEF1 6C27 # <CJK>
+AEF2 6C28 # <CJK>
+AEF3 6C26 # <CJK>
+AEF4 6C24 # <CJK>
+AEF5 6CF0 # <CJK>
+AEF6 6D6A # <CJK>
+AEF7 6D95 # <CJK>
+AEF8 6D88 # <CJK>
+AEF9 6D87 # <CJK>
+AEFA 6D66 # <CJK>
+AEFB 6D78 # <CJK>
+AEFC 6D77 # <CJK>
+AEFD 6D59 # <CJK>
+AEFE 6D93 # <CJK>
+AF40 6D6C # <CJK>
+AF41 6D89 # <CJK>
+AF42 6D6E # <CJK>
+AF43 6D5A # <CJK>
+AF44 6D74 # <CJK>
+AF45 6D69 # <CJK>
+AF46 6D8C # <CJK>
+AF47 6D8A # <CJK>
+AF48 6D79 # <CJK>
+AF49 6D85 # <CJK>
+AF4A 6D65 # <CJK>
+AF4B 6D94 # <CJK>
+AF4C 70CA # <CJK>
+AF4D 70D8 # <CJK>
+AF4E 70E4 # <CJK>
+AF4F 70D9 # <CJK>
+AF50 70C8 # <CJK>
+AF51 70CF # <CJK>
+AF52 7239 # <CJK>
+AF53 7279 # <CJK>
+AF54 72FC # <CJK>
+AF55 72F9 # <CJK>
+AF56 72FD # <CJK>
+AF57 72F8 # <CJK>
+AF58 72F7 # <CJK>
+AF59 7386 # <CJK>
+AF5A 73ED # <CJK>
+AF5B 7409 # <CJK>
+AF5C 73EE # <CJK>
+AF5D 73E0 # <CJK>
+AF5E 73EA # <CJK>
+AF5F 73DE # <CJK>
+AF60 7554 # <CJK>
+AF61 755D # <CJK>
+AF62 755C # <CJK>
+AF63 755A # <CJK>
+AF64 7559 # <CJK>
+AF65 75BE # <CJK>
+AF66 75C5 # <CJK>
+AF67 75C7 # <CJK>
+AF68 75B2 # <CJK>
+AF69 75B3 # <CJK>
+AF6A 75BD # <CJK>
+AF6B 75BC # <CJK>
+AF6C 75B9 # <CJK>
+AF6D 75C2 # <CJK>
+AF6E 75B8 # <CJK>
+AF6F 768B # <CJK>
+AF70 76B0 # <CJK>
+AF71 76CA # <CJK>
+AF72 76CD # <CJK>
+AF73 76CE # <CJK>
+AF74 7729 # <CJK>
+AF75 771F # <CJK>
+AF76 7720 # <CJK>
+AF77 7728 # <CJK>
+AF78 77E9 # <CJK>
+AF79 7830 # <CJK>
+AF7A 7827 # <CJK>
+AF7B 7838 # <CJK>
+AF7C 781D # <CJK>
+AF7D 7834 # <CJK>
+AF7E 7837 # <CJK>
+AFA1 7825 # <CJK>
+AFA2 782D # <CJK>
+AFA3 7820 # <CJK>
+AFA4 781F # <CJK>
+AFA5 7832 # <CJK>
+AFA6 7955 # <CJK>
+AFA7 7950 # <CJK>
+AFA8 7960 # <CJK>
+AFA9 795F # <CJK>
+AFAA 7956 # <CJK>
+AFAB 795E # <CJK>
+AFAC 795D # <CJK>
+AFAD 7957 # <CJK>
+AFAE 795A # <CJK>
+AFAF 79E4 # <CJK>
+AFB0 79E3 # <CJK>
+AFB1 79E7 # <CJK>
+AFB2 79DF # <CJK>
+AFB3 79E6 # <CJK>
+AFB4 79E9 # <CJK>
+AFB5 79D8 # <CJK>
+AFB6 7A84 # <CJK>
+AFB7 7A88 # <CJK>
+AFB8 7AD9 # <CJK>
+AFB9 7B06 # <CJK>
+AFBA 7B11 # <CJK>
+AFBB 7C89 # <CJK>
+AFBC 7D21 # <CJK>
+AFBD 7D17 # <CJK>
+AFBE 7D0B # <CJK>
+AFBF 7D0A # <CJK>
+AFC0 7D20 # <CJK>
+AFC1 7D22 # <CJK>
+AFC2 7D14 # <CJK>
+AFC3 7D10 # <CJK>
+AFC4 7D15 # <CJK>
+AFC5 7D1A # <CJK>
+AFC6 7D1C # <CJK>
+AFC7 7D0D # <CJK>
+AFC8 7D19 # <CJK>
+AFC9 7D1B # <CJK>
+AFCA 7F3A # <CJK>
+AFCB 7F5F # <CJK>
+AFCC 7F94 # <CJK>
+AFCD 7FC5 # <CJK>
+AFCE 7FC1 # <CJK>
+AFCF 8006 # <CJK>
+AFD0 8018 # <CJK>
+AFD1 8015 # <CJK>
+AFD2 8019 # <CJK>
+AFD3 8017 # <CJK>
+AFD4 803D # <CJK>
+AFD5 803F # <CJK>
+AFD6 80F1 # <CJK>
+AFD7 8102 # <CJK>
+AFD8 80F0 # <CJK>
+AFD9 8105 # <CJK>
+AFDA 80ED # <CJK>
+AFDB 80F4 # <CJK>
+AFDC 8106 # <CJK>
+AFDD 80F8 # <CJK>
+AFDE 80F3 # <CJK>
+AFDF 8108 # <CJK>
+AFE0 80FD # <CJK>
+AFE1 810A # <CJK>
+AFE2 80FC # <CJK>
+AFE3 80EF # <CJK>
+AFE4 81ED # <CJK>
+AFE5 81EC # <CJK>
+AFE6 8200 # <CJK>
+AFE7 8210 # <CJK>
+AFE8 822A # <CJK>
+AFE9 822B # <CJK>
+AFEA 8228 # <CJK>
+AFEB 822C # <CJK>
+AFEC 82BB # <CJK>
+AFED 832B # <CJK>
+AFEE 8352 # <CJK>
+AFEF 8354 # <CJK>
+AFF0 834A # <CJK>
+AFF1 8338 # <CJK>
+AFF2 8350 # <CJK>
+AFF3 8349 # <CJK>
+AFF4 8335 # <CJK>
+AFF5 8334 # <CJK>
+AFF6 834F # <CJK>
+AFF7 8332 # <CJK>
+AFF8 8339 # <CJK>
+AFF9 8336 # <CJK>
+AFFA 8317 # <CJK>
+AFFB 8340 # <CJK>
+AFFC 8331 # <CJK>
+AFFD 8328 # <CJK>
+AFFE 8343 # <CJK>
+B040 8654 # <CJK>
+B041 868A # <CJK>
+B042 86AA # <CJK>
+B043 8693 # <CJK>
+B044 86A4 # <CJK>
+B045 86A9 # <CJK>
+B046 868C # <CJK>
+B047 86A3 # <CJK>
+B048 869C # <CJK>
+B049 8870 # <CJK>
+B04A 8877 # <CJK>
+B04B 8881 # <CJK>
+B04C 8882 # <CJK>
+B04D 887D # <CJK>
+B04E 8879 # <CJK>
+B04F 8A18 # <CJK>
+B050 8A10 # <CJK>
+B051 8A0E # <CJK>
+B052 8A0C # <CJK>
+B053 8A15 # <CJK>
+B054 8A0A # <CJK>
+B055 8A17 # <CJK>
+B056 8A13 # <CJK>
+B057 8A16 # <CJK>
+B058 8A0F # <CJK>
+B059 8A11 # <CJK>
+B05A 8C48 # <CJK>
+B05B 8C7A # <CJK>
+B05C 8C79 # <CJK>
+B05D 8CA1 # <CJK>
+B05E 8CA2 # <CJK>
+B05F 8D77 # <CJK>
+B060 8EAC # <CJK>
+B061 8ED2 # <CJK>
+B062 8ED4 # <CJK>
+B063 8ECF # <CJK>
+B064 8FB1 # <CJK>
+B065 9001 # <CJK>
+B066 9006 # <CJK>
+B067 8FF7 # <CJK>
+B068 9000 # <CJK>
+B069 8FFA # <CJK>
+B06A 8FF4 # <CJK>
+B06B 9003 # <CJK>
+B06C 8FFD # <CJK>
+B06D 9005 # <CJK>
+B06E 8FF8 # <CJK>
+B06F 9095 # <CJK>
+B070 90E1 # <CJK>
+B071 90DD # <CJK>
+B072 90E2 # <CJK>
+B073 9152 # <CJK>
+B074 914D # <CJK>
+B075 914C # <CJK>
+B076 91D8 # <CJK>
+B077 91DD # <CJK>
+B078 91D7 # <CJK>
+B079 91DC # <CJK>
+B07A 91D9 # <CJK>
+B07B 9583 # <CJK>
+B07C 9662 # <CJK>
+B07D 9663 # <CJK>
+B07E 9661 # <CJK>
+B0A1 965B # <CJK>
+B0A2 965D # <CJK>
+B0A3 9664 # <CJK>
+B0A4 9658 # <CJK>
+B0A5 965E # <CJK>
+B0A6 96BB # <CJK>
+B0A7 98E2 # <CJK>
+B0A8 99AC # <CJK>
+B0A9 9AA8 # <CJK>
+B0AA 9AD8 # <CJK>
+B0AB 9B25 # <CJK>
+B0AC 9B32 # <CJK>
+B0AD 9B3C # <CJK>
+B0AE 4E7E # <CJK>
+B0AF 507A # <CJK>
+B0B0 507D # <CJK>
+B0B1 505C # <CJK>
+B0B2 5047 # <CJK>
+B0B3 5043 # <CJK>
+B0B4 504C # <CJK>
+B0B5 505A # <CJK>
+B0B6 5049 # <CJK>
+B0B7 5065 # <CJK>
+B0B8 5076 # <CJK>
+B0B9 504E # <CJK>
+B0BA 5055 # <CJK>
+B0BB 5075 # <CJK>
+B0BC 5074 # <CJK>
+B0BD 5077 # <CJK>
+B0BE 504F # <CJK>
+B0BF 500F # <CJK>
+B0C0 506F # <CJK>
+B0C1 506D # <CJK>
+B0C2 515C # <CJK>
+B0C3 5195 # <CJK>
+B0C4 51F0 # <CJK>
+B0C5 526A # <CJK>
+B0C6 526F # <CJK>
+B0C7 52D2 # <CJK>
+B0C8 52D9 # <CJK>
+B0C9 52D8 # <CJK>
+B0CA 52D5 # <CJK>
+B0CB 5310 # <CJK>
+B0CC 530F # <CJK>
+B0CD 5319 # <CJK>
+B0CE 533F # <CJK>
+B0CF 5340 # <CJK>
+B0D0 533E # <CJK>
+B0D1 53C3 # <CJK>
+B0D2 66FC # <CJK>
+B0D3 5546 # <CJK>
+B0D4 556A # <CJK>
+B0D5 5566 # <CJK>
+B0D6 5544 # <CJK>
+B0D7 555E # <CJK>
+B0D8 5561 # <CJK>
+B0D9 5543 # <CJK>
+B0DA 554A # <CJK>
+B0DB 5531 # <CJK>
+B0DC 5556 # <CJK>
+B0DD 554F # <CJK>
+B0DE 5555 # <CJK>
+B0DF 552F # <CJK>
+B0E0 5564 # <CJK>
+B0E1 5538 # <CJK>
+B0E2 552E # <CJK>
+B0E3 555C # <CJK>
+B0E4 552C # <CJK>
+B0E5 5563 # <CJK>
+B0E6 5533 # <CJK>
+B0E7 5541 # <CJK>
+B0E8 5557 # <CJK>
+B0E9 5708 # <CJK>
+B0EA 570B # <CJK>
+B0EB 5709 # <CJK>
+B0EC 57DF # <CJK>
+B0ED 5805 # <CJK>
+B0EE 580A # <CJK>
+B0EF 5806 # <CJK>
+B0F0 57E0 # <CJK>
+B0F1 57E4 # <CJK>
+B0F2 57FA # <CJK>
+B0F3 5802 # <CJK>
+B0F4 5835 # <CJK>
+B0F5 57F7 # <CJK>
+B0F6 57F9 # <CJK>
+B0F7 5920 # <CJK>
+B0F8 5962 # <CJK>
+B0F9 5A36 # <CJK>
+B0FA 5A41 # <CJK>
+B0FB 5A49 # <CJK>
+B0FC 5A66 # <CJK>
+B0FD 5A6A # <CJK>
+B0FE 5A40 # <CJK>
+B140 5A3C # <CJK>
+B141 5A62 # <CJK>
+B142 5A5A # <CJK>
+B143 5A46 # <CJK>
+B144 5A4A # <CJK>
+B145 5B70 # <CJK>
+B146 5BC7 # <CJK>
+B147 5BC5 # <CJK>
+B148 5BC4 # <CJK>
+B149 5BC2 # <CJK>
+B14A 5BBF # <CJK>
+B14B 5BC6 # <CJK>
+B14C 5C09 # <CJK>
+B14D 5C08 # <CJK>
+B14E 5C07 # <CJK>
+B14F 5C60 # <CJK>
+B150 5C5C # <CJK>
+B151 5C5D # <CJK>
+B152 5D07 # <CJK>
+B153 5D06 # <CJK>
+B154 5D0E # <CJK>
+B155 5D1B # <CJK>
+B156 5D16 # <CJK>
+B157 5D22 # <CJK>
+B158 5D11 # <CJK>
+B159 5D29 # <CJK>
+B15A 5D14 # <CJK>
+B15B 5D19 # <CJK>
+B15C 5D24 # <CJK>
+B15D 5D27 # <CJK>
+B15E 5D17 # <CJK>
+B15F 5DE2 # <CJK>
+B160 5E38 # <CJK>
+B161 5E36 # <CJK>
+B162 5E33 # <CJK>
+B163 5E37 # <CJK>
+B164 5EB7 # <CJK>
+B165 5EB8 # <CJK>
+B166 5EB6 # <CJK>
+B167 5EB5 # <CJK>
+B168 5EBE # <CJK>
+B169 5F35 # <CJK>
+B16A 5F37 # <CJK>
+B16B 5F57 # <CJK>
+B16C 5F6C # <CJK>
+B16D 5F69 # <CJK>
+B16E 5F6B # <CJK>
+B16F 5F97 # <CJK>
+B170 5F99 # <CJK>
+B171 5F9E # <CJK>
+B172 5F98 # <CJK>
+B173 5FA1 # <CJK>
+B174 5FA0 # <CJK>
+B175 5F9C # <CJK>
+B176 607F # <CJK>
+B177 60A3 # <CJK>
+B178 6089 # <CJK>
+B179 60A0 # <CJK>
+B17A 60A8 # <CJK>
+B17B 60CB # <CJK>
+B17C 60B4 # <CJK>
+B17D 60E6 # <CJK>
+B17E 60BD # <CJK>
+B1A1 60C5 # <CJK>
+B1A2 60BB # <CJK>
+B1A3 60B5 # <CJK>
+B1A4 60DC # <CJK>
+B1A5 60BC # <CJK>
+B1A6 60D8 # <CJK>
+B1A7 60D5 # <CJK>
+B1A8 60C6 # <CJK>
+B1A9 60DF # <CJK>
+B1AA 60B8 # <CJK>
+B1AB 60DA # <CJK>
+B1AC 60C7 # <CJK>
+B1AD 621A # <CJK>
+B1AE 621B # <CJK>
+B1AF 6248 # <CJK>
+B1B0 63A0 # <CJK>
+B1B1 63A7 # <CJK>
+B1B2 6372 # <CJK>
+B1B3 6396 # <CJK>
+B1B4 63A2 # <CJK>
+B1B5 63A5 # <CJK>
+B1B6 6377 # <CJK>
+B1B7 6367 # <CJK>
+B1B8 6398 # <CJK>
+B1B9 63AA # <CJK>
+B1BA 6371 # <CJK>
+B1BB 63A9 # <CJK>
+B1BC 6389 # <CJK>
+B1BD 6383 # <CJK>
+B1BE 639B # <CJK>
+B1BF 636B # <CJK>
+B1C0 63A8 # <CJK>
+B1C1 6384 # <CJK>
+B1C2 6388 # <CJK>
+B1C3 6399 # <CJK>
+B1C4 63A1 # <CJK>
+B1C5 63AC # <CJK>
+B1C6 6392 # <CJK>
+B1C7 638F # <CJK>
+B1C8 6380 # <CJK>
+B1C9 637B # <CJK>
+B1CA 6369 # <CJK>
+B1CB 6368 # <CJK>
+B1CC 637A # <CJK>
+B1CD 655D # <CJK>
+B1CE 6556 # <CJK>
+B1CF 6551 # <CJK>
+B1D0 6559 # <CJK>
+B1D1 6557 # <CJK>
+B1D2 555F # <CJK>
+B1D3 654F # <CJK>
+B1D4 6558 # <CJK>
+B1D5 6555 # <CJK>
+B1D6 6554 # <CJK>
+B1D7 659C # <CJK>
+B1D8 659B # <CJK>
+B1D9 65AC # <CJK>
+B1DA 65CF # <CJK>
+B1DB 65CB # <CJK>
+B1DC 65CC # <CJK>
+B1DD 65CE # <CJK>
+B1DE 665D # <CJK>
+B1DF 665A # <CJK>
+B1E0 6664 # <CJK>
+B1E1 6668 # <CJK>
+B1E2 6666 # <CJK>
+B1E3 665E # <CJK>
+B1E4 66F9 # <CJK>
+B1E5 52D7 # <CJK>
+B1E6 671B # <CJK>
+B1E7 6881 # <CJK>
+B1E8 68AF # <CJK>
+B1E9 68A2 # <CJK>
+B1EA 6893 # <CJK>
+B1EB 68B5 # <CJK>
+B1EC 687F # <CJK>
+B1ED 6876 # <CJK>
+B1EE 68B1 # <CJK>
+B1EF 68A7 # <CJK>
+B1F0 6897 # <CJK>
+B1F1 68B0 # <CJK>
+B1F2 6883 # <CJK>
+B1F3 68C4 # <CJK>
+B1F4 68AD # <CJK>
+B1F5 6886 # <CJK>
+B1F6 6885 # <CJK>
+B1F7 6894 # <CJK>
+B1F8 689D # <CJK>
+B1F9 68A8 # <CJK>
+B1FA 689F # <CJK>
+B1FB 68A1 # <CJK>
+B1FC 6882 # <CJK>
+B1FD 6B32 # <CJK>
+B1FE 6BBA # <CJK>
+B240 6BEB # <CJK>
+B241 6BEC # <CJK>
+B242 6C2B # <CJK>
+B243 6D8E # <CJK>
+B244 6DBC # <CJK>
+B245 6DF3 # <CJK>
+B246 6DD9 # <CJK>
+B247 6DB2 # <CJK>
+B248 6DE1 # <CJK>
+B249 6DCC # <CJK>
+B24A 6DE4 # <CJK>
+B24B 6DFB # <CJK>
+B24C 6DFA # <CJK>
+B24D 6E05 # <CJK>
+B24E 6DC7 # <CJK>
+B24F 6DCB # <CJK>
+B250 6DAF # <CJK>
+B251 6DD1 # <CJK>
+B252 6DAE # <CJK>
+B253 6DDE # <CJK>
+B254 6DF9 # <CJK>
+B255 6DB8 # <CJK>
+B256 6DF7 # <CJK>
+B257 6DF5 # <CJK>
+B258 6DC5 # <CJK>
+B259 6DD2 # <CJK>
+B25A 6E1A # <CJK>
+B25B 6DB5 # <CJK>
+B25C 6DDA # <CJK>
+B25D 6DEB # <CJK>
+B25E 6DD8 # <CJK>
+B25F 6DEA # <CJK>
+B260 6DF1 # <CJK>
+B261 6DEE # <CJK>
+B262 6DE8 # <CJK>
+B263 6DC6 # <CJK>
+B264 6DC4 # <CJK>
+B265 6DAA # <CJK>
+B266 6DEC # <CJK>
+B267 6DBF # <CJK>
+B268 6DE6 # <CJK>
+B269 70F9 # <CJK>
+B26A 7109 # <CJK>
+B26B 710A # <CJK>
+B26C 70FD # <CJK>
+B26D 70EF # <CJK>
+B26E 723D # <CJK>
+B26F 727D # <CJK>
+B270 7281 # <CJK>
+B271 731C # <CJK>
+B272 731B # <CJK>
+B273 7316 # <CJK>
+B274 7313 # <CJK>
+B275 7319 # <CJK>
+B276 7387 # <CJK>
+B277 7405 # <CJK>
+B278 740A # <CJK>
+B279 7403 # <CJK>
+B27A 7406 # <CJK>
+B27B 73FE # <CJK>
+B27C 740D # <CJK>
+B27D 74E0 # <CJK>
+B27E 74F6 # <CJK>
+B2A1 74F7 # <CJK>
+B2A2 751C # <CJK>
+B2A3 7522 # <CJK>
+B2A4 7565 # <CJK>
+B2A5 7566 # <CJK>
+B2A6 7562 # <CJK>
+B2A7 7570 # <CJK>
+B2A8 758F # <CJK>
+B2A9 75D4 # <CJK>
+B2AA 75D5 # <CJK>
+B2AB 75B5 # <CJK>
+B2AC 75CA # <CJK>
+B2AD 75CD # <CJK>
+B2AE 768E # <CJK>
+B2AF 76D4 # <CJK>
+B2B0 76D2 # <CJK>
+B2B1 76DB # <CJK>
+B2B2 7737 # <CJK>
+B2B3 773E # <CJK>
+B2B4 773C # <CJK>
+B2B5 7736 # <CJK>
+B2B6 7738 # <CJK>
+B2B7 773A # <CJK>
+B2B8 786B # <CJK>
+B2B9 7843 # <CJK>
+B2BA 784E # <CJK>
+B2BB 7965 # <CJK>
+B2BC 7968 # <CJK>
+B2BD 796D # <CJK>
+B2BE 79FB # <CJK>
+B2BF 7A92 # <CJK>
+B2C0 7A95 # <CJK>
+B2C1 7B20 # <CJK>
+B2C2 7B28 # <CJK>
+B2C3 7B1B # <CJK>
+B2C4 7B2C # <CJK>
+B2C5 7B26 # <CJK>
+B2C6 7B19 # <CJK>
+B2C7 7B1E # <CJK>
+B2C8 7B2E # <CJK>
+B2C9 7C92 # <CJK>
+B2CA 7C97 # <CJK>
+B2CB 7C95 # <CJK>
+B2CC 7D46 # <CJK>
+B2CD 7D43 # <CJK>
+B2CE 7D71 # <CJK>
+B2CF 7D2E # <CJK>
+B2D0 7D39 # <CJK>
+B2D1 7D3C # <CJK>
+B2D2 7D40 # <CJK>
+B2D3 7D30 # <CJK>
+B2D4 7D33 # <CJK>
+B2D5 7D44 # <CJK>
+B2D6 7D2F # <CJK>
+B2D7 7D42 # <CJK>
+B2D8 7D32 # <CJK>
+B2D9 7D31 # <CJK>
+B2DA 7F3D # <CJK>
+B2DB 7F9E # <CJK>
+B2DC 7F9A # <CJK>
+B2DD 7FCC # <CJK>
+B2DE 7FCE # <CJK>
+B2DF 7FD2 # <CJK>
+B2E0 801C # <CJK>
+B2E1 804A # <CJK>
+B2E2 8046 # <CJK>
+B2E3 812F # <CJK>
+B2E4 8116 # <CJK>
+B2E5 8123 # <CJK>
+B2E6 812B # <CJK>
+B2E7 8129 # <CJK>
+B2E8 8130 # <CJK>
+B2E9 8124 # <CJK>
+B2EA 8202 # <CJK>
+B2EB 8235 # <CJK>
+B2EC 8237 # <CJK>
+B2ED 8236 # <CJK>
+B2EE 8239 # <CJK>
+B2EF 838E # <CJK>
+B2F0 839E # <CJK>
+B2F1 8398 # <CJK>
+B2F2 8378 # <CJK>
+B2F3 83A2 # <CJK>
+B2F4 8396 # <CJK>
+B2F5 83BD # <CJK>
+B2F6 83AB # <CJK>
+B2F7 8392 # <CJK>
+B2F8 838A # <CJK>
+B2F9 8393 # <CJK>
+B2FA 8389 # <CJK>
+B2FB 83A0 # <CJK>
+B2FC 8377 # <CJK>
+B2FD 837B # <CJK>
+B2FE 837C # <CJK>
+B340 8386 # <CJK>
+B341 83A7 # <CJK>
+B342 8655 # <CJK>
+B343 5F6A # <CJK>
+B344 86C7 # <CJK>
+B345 86C0 # <CJK>
+B346 86B6 # <CJK>
+B347 86C4 # <CJK>
+B348 86B5 # <CJK>
+B349 86C6 # <CJK>
+B34A 86CB # <CJK>
+B34B 86B1 # <CJK>
+B34C 86AF # <CJK>
+B34D 86C9 # <CJK>
+B34E 8853 # <CJK>
+B34F 889E # <CJK>
+B350 8888 # <CJK>
+B351 88AB # <CJK>
+B352 8892 # <CJK>
+B353 8896 # <CJK>
+B354 888D # <CJK>
+B355 888B # <CJK>
+B356 8993 # <CJK>
+B357 898F # <CJK>
+B358 8A2A # <CJK>
+B359 8A1D # <CJK>
+B35A 8A23 # <CJK>
+B35B 8A25 # <CJK>
+B35C 8A31 # <CJK>
+B35D 8A2D # <CJK>
+B35E 8A1F # <CJK>
+B35F 8A1B # <CJK>
+B360 8A22 # <CJK>
+B361 8C49 # <CJK>
+B362 8C5A # <CJK>
+B363 8CA9 # <CJK>
+B364 8CAC # <CJK>
+B365 8CAB # <CJK>
+B366 8CA8 # <CJK>
+B367 8CAA # <CJK>
+B368 8CA7 # <CJK>
+B369 8D67 # <CJK>
+B36A 8D66 # <CJK>
+B36B 8DBE # <CJK>
+B36C 8DBA # <CJK>
+B36D 8EDB # <CJK>
+B36E 8EDF # <CJK>
+B36F 9019 # <CJK>
+B370 900D # <CJK>
+B371 901A # <CJK>
+B372 9017 # <CJK>
+B373 9023 # <CJK>
+B374 901F # <CJK>
+B375 901D # <CJK>
+B376 9010 # <CJK>
+B377 9015 # <CJK>
+B378 901E # <CJK>
+B379 9020 # <CJK>
+B37A 900F # <CJK>
+B37B 9022 # <CJK>
+B37C 9016 # <CJK>
+B37D 901B # <CJK>
+B37E 9014 # <CJK>
+B3A1 90E8 # <CJK>
+B3A2 90ED # <CJK>
+B3A3 90FD # <CJK>
+B3A4 9157 # <CJK>
+B3A5 91CE # <CJK>
+B3A6 91F5 # <CJK>
+B3A7 91E6 # <CJK>
+B3A8 91E3 # <CJK>
+B3A9 91E7 # <CJK>
+B3AA 91ED # <CJK>
+B3AB 91E9 # <CJK>
+B3AC 9589 # <CJK>
+B3AD 966A # <CJK>
+B3AE 9675 # <CJK>
+B3AF 9673 # <CJK>
+B3B0 9678 # <CJK>
+B3B1 9670 # <CJK>
+B3B2 9674 # <CJK>
+B3B3 9676 # <CJK>
+B3B4 9677 # <CJK>
+B3B5 966C # <CJK>
+B3B6 96C0 # <CJK>
+B3B7 96EA # <CJK>
+B3B8 96E9 # <CJK>
+B3B9 7AE0 # <CJK>
+B3BA 7ADF # <CJK>
+B3BB 9802 # <CJK>
+B3BC 9803 # <CJK>
+B3BD 9B5A # <CJK>
+B3BE 9CE5 # <CJK>
+B3BF 9E75 # <CJK>
+B3C0 9E7F # <CJK>
+B3C1 9EA5 # <CJK>
+B3C2 9EBB # <CJK>
+B3C3 50A2 # <CJK>
+B3C4 508D # <CJK>
+B3C5 5085 # <CJK>
+B3C6 5099 # <CJK>
+B3C7 5091 # <CJK>
+B3C8 5080 # <CJK>
+B3C9 5096 # <CJK>
+B3CA 5098 # <CJK>
+B3CB 509A # <CJK>
+B3CC 6700 # <CJK>
+B3CD 51F1 # <CJK>
+B3CE 5272 # <CJK>
+B3CF 5274 # <CJK>
+B3D0 5275 # <CJK>
+B3D1 5269 # <CJK>
+B3D2 52DE # <CJK>
+B3D3 52DD # <CJK>
+B3D4 52DB # <CJK>
+B3D5 535A # <CJK>
+B3D6 53A5 # <CJK>
+B3D7 557B # <CJK>
+B3D8 5580 # <CJK>
+B3D9 55A7 # <CJK>
+B3DA 557C # <CJK>
+B3DB 558A # <CJK>
+B3DC 559D # <CJK>
+B3DD 5598 # <CJK>
+B3DE 5582 # <CJK>
+B3DF 559C # <CJK>
+B3E0 55AA # <CJK>
+B3E1 5594 # <CJK>
+B3E2 5587 # <CJK>
+B3E3 558B # <CJK>
+B3E4 5583 # <CJK>
+B3E5 55B3 # <CJK>
+B3E6 55AE # <CJK>
+B3E7 559F # <CJK>
+B3E8 553E # <CJK>
+B3E9 55B2 # <CJK>
+B3EA 559A # <CJK>
+B3EB 55BB # <CJK>
+B3EC 55AC # <CJK>
+B3ED 55B1 # <CJK>
+B3EE 557E # <CJK>
+B3EF 5589 # <CJK>
+B3F0 55AB # <CJK>
+B3F1 5599 # <CJK>
+B3F2 570D # <CJK>
+B3F3 582F # <CJK>
+B3F4 582A # <CJK>
+B3F5 5834 # <CJK>
+B3F6 5824 # <CJK>
+B3F7 5830 # <CJK>
+B3F8 5831 # <CJK>
+B3F9 5821 # <CJK>
+B3FA 581D # <CJK>
+B3FB 5820 # <CJK>
+B3FC 58F9 # <CJK>
+B3FD 58FA # <CJK>
+B3FE 5960 # <CJK>
+B440 5A77 # <CJK>
+B441 5A9A # <CJK>
+B442 5A7F # <CJK>
+B443 5A92 # <CJK>
+B444 5A9B # <CJK>
+B445 5AA7 # <CJK>
+B446 5B73 # <CJK>
+B447 5B71 # <CJK>
+B448 5BD2 # <CJK>
+B449 5BCC # <CJK>
+B44A 5BD3 # <CJK>
+B44B 5BD0 # <CJK>
+B44C 5C0A # <CJK>
+B44D 5C0B # <CJK>
+B44E 5C31 # <CJK>
+B44F 5D4C # <CJK>
+B450 5D50 # <CJK>
+B451 5D34 # <CJK>
+B452 5D47 # <CJK>
+B453 5DFD # <CJK>
+B454 5E45 # <CJK>
+B455 5E3D # <CJK>
+B456 5E40 # <CJK>
+B457 5E43 # <CJK>
+B458 5E7E # <CJK>
+B459 5ECA # <CJK>
+B45A 5EC1 # <CJK>
+B45B 5EC2 # <CJK>
+B45C 5EC4 # <CJK>
+B45D 5F3C # <CJK>
+B45E 5F6D # <CJK>
+B45F 5FA9 # <CJK>
+B460 5FAA # <CJK>
+B461 5FA8 # <CJK>
+B462 60D1 # <CJK>
+B463 60E1 # <CJK>
+B464 60B2 # <CJK>
+B465 60B6 # <CJK>
+B466 60E0 # <CJK>
+B467 611C # <CJK>
+B468 6123 # <CJK>
+B469 60FA # <CJK>
+B46A 6115 # <CJK>
+B46B 60F0 # <CJK>
+B46C 60FB # <CJK>
+B46D 60F4 # <CJK>
+B46E 6168 # <CJK>
+B46F 60F1 # <CJK>
+B470 610E # <CJK>
+B471 60F6 # <CJK>
+B472 6109 # <CJK>
+B473 6100 # <CJK>
+B474 6112 # <CJK>
+B475 621F # <CJK>
+B476 6249 # <CJK>
+B477 63A3 # <CJK>
+B478 638C # <CJK>
+B479 63CF # <CJK>
+B47A 63C0 # <CJK>
+B47B 63E9 # <CJK>
+B47C 63C9 # <CJK>
+B47D 63C6 # <CJK>
+B47E 63CD # <CJK>
+B4A1 63D2 # <CJK>
+B4A2 63E3 # <CJK>
+B4A3 63D0 # <CJK>
+B4A4 63E1 # <CJK>
+B4A5 63D6 # <CJK>
+B4A6 63ED # <CJK>
+B4A7 63EE # <CJK>
+B4A8 6376 # <CJK>
+B4A9 63F4 # <CJK>
+B4AA 63EA # <CJK>
+B4AB 63DB # <CJK>
+B4AC 6452 # <CJK>
+B4AD 63DA # <CJK>
+B4AE 63F9 # <CJK>
+B4AF 655E # <CJK>
+B4B0 6566 # <CJK>
+B4B1 6562 # <CJK>
+B4B2 6563 # <CJK>
+B4B3 6591 # <CJK>
+B4B4 6590 # <CJK>
+B4B5 65AF # <CJK>
+B4B6 666E # <CJK>
+B4B7 6670 # <CJK>
+B4B8 6674 # <CJK>
+B4B9 6676 # <CJK>
+B4BA 666F # <CJK>
+B4BB 6691 # <CJK>
+B4BC 667A # <CJK>
+B4BD 667E # <CJK>
+B4BE 6677 # <CJK>
+B4BF 66FE # <CJK>
+B4C0 66FF # <CJK>
+B4C1 671F # <CJK>
+B4C2 671D # <CJK>
+B4C3 68FA # <CJK>
+B4C4 68D5 # <CJK>
+B4C5 68E0 # <CJK>
+B4C6 68D8 # <CJK>
+B4C7 68D7 # <CJK>
+B4C8 6905 # <CJK>
+B4C9 68DF # <CJK>
+B4CA 68F5 # <CJK>
+B4CB 68EE # <CJK>
+B4CC 68E7 # <CJK>
+B4CD 68F9 # <CJK>
+B4CE 68D2 # <CJK>
+B4CF 68F2 # <CJK>
+B4D0 68E3 # <CJK>
+B4D1 68CB # <CJK>
+B4D2 68CD # <CJK>
+B4D3 690D # <CJK>
+B4D4 6912 # <CJK>
+B4D5 690E # <CJK>
+B4D6 68C9 # <CJK>
+B4D7 68DA # <CJK>
+B4D8 696E # <CJK>
+B4D9 68FB # <CJK>
+B4DA 6B3E # <CJK>
+B4DB 6B3A # <CJK>
+B4DC 6B3D # <CJK>
+B4DD 6B98 # <CJK>
+B4DE 6B96 # <CJK>
+B4DF 6BBC # <CJK>
+B4E0 6BEF # <CJK>
+B4E1 6C2E # <CJK>
+B4E2 6C2F # <CJK>
+B4E3 6C2C # <CJK>
+B4E4 6E2F # <CJK>
+B4E5 6E38 # <CJK>
+B4E6 6E54 # <CJK>
+B4E7 6E21 # <CJK>
+B4E8 6E32 # <CJK>
+B4E9 6E67 # <CJK>
+B4EA 6E4A # <CJK>
+B4EB 6E20 # <CJK>
+B4EC 6E25 # <CJK>
+B4ED 6E23 # <CJK>
+B4EE 6E1B # <CJK>
+B4EF 6E5B # <CJK>
+B4F0 6E58 # <CJK>
+B4F1 6E24 # <CJK>
+B4F2 6E56 # <CJK>
+B4F3 6E6E # <CJK>
+B4F4 6E2D # <CJK>
+B4F5 6E26 # <CJK>
+B4F6 6E6F # <CJK>
+B4F7 6E34 # <CJK>
+B4F8 6E4D # <CJK>
+B4F9 6E3A # <CJK>
+B4FA 6E2C # <CJK>
+B4FB 6E43 # <CJK>
+B4FC 6E1D # <CJK>
+B4FD 6E3E # <CJK>
+B4FE 6ECB # <CJK>
+B540 6E89 # <CJK>
+B541 6E19 # <CJK>
+B542 6E4E # <CJK>
+B543 6E63 # <CJK>
+B544 6E44 # <CJK>
+B545 6E72 # <CJK>
+B546 6E69 # <CJK>
+B547 6E5F # <CJK>
+B548 7119 # <CJK>
+B549 711A # <CJK>
+B54A 7126 # <CJK>
+B54B 7130 # <CJK>
+B54C 7121 # <CJK>
+B54D 7136 # <CJK>
+B54E 716E # <CJK>
+B54F 711C # <CJK>
+B550 724C # <CJK>
+B551 7284 # <CJK>
+B552 7280 # <CJK>
+B553 7336 # <CJK>
+B554 7325 # <CJK>
+B555 7334 # <CJK>
+B556 7329 # <CJK>
+B557 743A # <CJK>
+B558 742A # <CJK>
+B559 7433 # <CJK>
+B55A 7422 # <CJK>
+B55B 7425 # <CJK>
+B55C 7435 # <CJK>
+B55D 7436 # <CJK>
+B55E 7434 # <CJK>
+B55F 742F # <CJK>
+B560 741B # <CJK>
+B561 7426 # <CJK>
+B562 7428 # <CJK>
+B563 7525 # <CJK>
+B564 7526 # <CJK>
+B565 756B # <CJK>
+B566 756A # <CJK>
+B567 75E2 # <CJK>
+B568 75DB # <CJK>
+B569 75E3 # <CJK>
+B56A 75D9 # <CJK>
+B56B 75D8 # <CJK>
+B56C 75DE # <CJK>
+B56D 75E0 # <CJK>
+B56E 767B # <CJK>
+B56F 767C # <CJK>
+B570 7696 # <CJK>
+B571 7693 # <CJK>
+B572 76B4 # <CJK>
+B573 76DC # <CJK>
+B574 774F # <CJK>
+B575 77ED # <CJK>
+B576 785D # <CJK>
+B577 786C # <CJK>
+B578 786F # <CJK>
+B579 7A0D # <CJK>
+B57A 7A08 # <CJK>
+B57B 7A0B # <CJK>
+B57C 7A05 # <CJK>
+B57D 7A00 # <CJK>
+B57E 7A98 # <CJK>
+B5A1 7A97 # <CJK>
+B5A2 7A96 # <CJK>
+B5A3 7AE5 # <CJK>
+B5A4 7AE3 # <CJK>
+B5A5 7B49 # <CJK>
+B5A6 7B56 # <CJK>
+B5A7 7B46 # <CJK>
+B5A8 7B50 # <CJK>
+B5A9 7B52 # <CJK>
+B5AA 7B54 # <CJK>
+B5AB 7B4D # <CJK>
+B5AC 7B4B # <CJK>
+B5AD 7B4F # <CJK>
+B5AE 7B51 # <CJK>
+B5AF 7C9F # <CJK>
+B5B0 7CA5 # <CJK>
+B5B1 7D5E # <CJK>
+B5B2 7D50 # <CJK>
+B5B3 7D68 # <CJK>
+B5B4 7D55 # <CJK>
+B5B5 7D2B # <CJK>
+B5B6 7D6E # <CJK>
+B5B7 7D72 # <CJK>
+B5B8 7D61 # <CJK>
+B5B9 7D66 # <CJK>
+B5BA 7D62 # <CJK>
+B5BB 7D70 # <CJK>
+B5BC 7D73 # <CJK>
+B5BD 5584 # <CJK>
+B5BE 7FD4 # <CJK>
+B5BF 7FD5 # <CJK>
+B5C0 800B # <CJK>
+B5C1 8052 # <CJK>
+B5C2 8085 # <CJK>
+B5C3 8155 # <CJK>
+B5C4 8154 # <CJK>
+B5C5 814B # <CJK>
+B5C6 8151 # <CJK>
+B5C7 814E # <CJK>
+B5C8 8139 # <CJK>
+B5C9 8146 # <CJK>
+B5CA 813E # <CJK>
+B5CB 814C # <CJK>
+B5CC 8153 # <CJK>
+B5CD 8174 # <CJK>
+B5CE 8212 # <CJK>
+B5CF 821C # <CJK>
+B5D0 83E9 # <CJK>
+B5D1 8403 # <CJK>
+B5D2 83F8 # <CJK>
+B5D3 840D # <CJK>
+B5D4 83E0 # <CJK>
+B5D5 83C5 # <CJK>
+B5D6 840B # <CJK>
+B5D7 83C1 # <CJK>
+B5D8 83EF # <CJK>
+B5D9 83F1 # <CJK>
+B5DA 83F4 # <CJK>
+B5DB 8457 # <CJK>
+B5DC 840A # <CJK>
+B5DD 83F0 # <CJK>
+B5DE 840C # <CJK>
+B5DF 83CC # <CJK>
+B5E0 83FD # <CJK>
+B5E1 83F2 # <CJK>
+B5E2 83CA # <CJK>
+B5E3 8438 # <CJK>
+B5E4 840E # <CJK>
+B5E5 8404 # <CJK>
+B5E6 83DC # <CJK>
+B5E7 8407 # <CJK>
+B5E8 83D4 # <CJK>
+B5E9 83DF # <CJK>
+B5EA 865B # <CJK>
+B5EB 86DF # <CJK>
+B5EC 86D9 # <CJK>
+B5ED 86ED # <CJK>
+B5EE 86D4 # <CJK>
+B5EF 86DB # <CJK>
+B5F0 86E4 # <CJK>
+B5F1 86D0 # <CJK>
+B5F2 86DE # <CJK>
+B5F3 8857 # <CJK>
+B5F4 88C1 # <CJK>
+B5F5 88C2 # <CJK>
+B5F6 88B1 # <CJK>
+B5F7 8983 # <CJK>
+B5F8 8996 # <CJK>
+B5F9 8A3B # <CJK>
+B5FA 8A60 # <CJK>
+B5FB 8A55 # <CJK>
+B5FC 8A5E # <CJK>
+B5FD 8A3C # <CJK>
+B5FE 8A41 # <CJK>
+B640 8A54 # <CJK>
+B641 8A5B # <CJK>
+B642 8A50 # <CJK>
+B643 8A46 # <CJK>
+B644 8A34 # <CJK>
+B645 8A3A # <CJK>
+B646 8A36 # <CJK>
+B647 8A56 # <CJK>
+B648 8C61 # <CJK>
+B649 8C82 # <CJK>
+B64A 8CAF # <CJK>
+B64B 8CBC # <CJK>
+B64C 8CB3 # <CJK>
+B64D 8CBD # <CJK>
+B64E 8CC1 # <CJK>
+B64F 8CBB # <CJK>
+B650 8CC0 # <CJK>
+B651 8CB4 # <CJK>
+B652 8CB7 # <CJK>
+B653 8CB6 # <CJK>
+B654 8CBF # <CJK>
+B655 8CB8 # <CJK>
+B656 8D8A # <CJK>
+B657 8D85 # <CJK>
+B658 8D81 # <CJK>
+B659 8DCE # <CJK>
+B65A 8DDD # <CJK>
+B65B 8DCB # <CJK>
+B65C 8DDA # <CJK>
+B65D 8DD1 # <CJK>
+B65E 8DCC # <CJK>
+B65F 8DDB # <CJK>
+B660 8DC6 # <CJK>
+B661 8EFB # <CJK>
+B662 8EF8 # <CJK>
+B663 8EFC # <CJK>
+B664 8F9C # <CJK>
+B665 902E # <CJK>
+B666 9035 # <CJK>
+B667 9031 # <CJK>
+B668 9038 # <CJK>
+B669 9032 # <CJK>
+B66A 9036 # <CJK>
+B66B 9102 # <CJK>
+B66C 90F5 # <CJK>
+B66D 9109 # <CJK>
+B66E 90FE # <CJK>
+B66F 9163 # <CJK>
+B670 9165 # <CJK>
+B671 91CF # <CJK>
+B672 9214 # <CJK>
+B673 9215 # <CJK>
+B674 9223 # <CJK>
+B675 9209 # <CJK>
+B676 921E # <CJK>
+B677 920D # <CJK>
+B678 9210 # <CJK>
+B679 9207 # <CJK>
+B67A 9211 # <CJK>
+B67B 9594 # <CJK>
+B67C 958F # <CJK>
+B67D 958B # <CJK>
+B67E 9591 # <CJK>
+B6A1 9593 # <CJK>
+B6A2 9592 # <CJK>
+B6A3 958E # <CJK>
+B6A4 968A # <CJK>
+B6A5 968E # <CJK>
+B6A6 968B # <CJK>
+B6A7 967D # <CJK>
+B6A8 9685 # <CJK>
+B6A9 9686 # <CJK>
+B6AA 968D # <CJK>
+B6AB 9672 # <CJK>
+B6AC 9684 # <CJK>
+B6AD 96C1 # <CJK>
+B6AE 96C5 # <CJK>
+B6AF 96C4 # <CJK>
+B6B0 96C6 # <CJK>
+B6B1 96C7 # <CJK>
+B6B2 96EF # <CJK>
+B6B3 96F2 # <CJK>
+B6B4 97CC # <CJK>
+B6B5 9805 # <CJK>
+B6B6 9806 # <CJK>
+B6B7 9808 # <CJK>
+B6B8 98E7 # <CJK>
+B6B9 98EA # <CJK>
+B6BA 98EF # <CJK>
+B6BB 98E9 # <CJK>
+B6BC 98F2 # <CJK>
+B6BD 98ED # <CJK>
+B6BE 99AE # <CJK>
+B6BF 99AD # <CJK>
+B6C0 9EC3 # <CJK>
+B6C1 9ECD # <CJK>
+B6C2 9ED1 # <CJK>
+B6C3 4E82 # <CJK>
+B6C4 50AD # <CJK>
+B6C5 50B5 # <CJK>
+B6C6 50B2 # <CJK>
+B6C7 50B3 # <CJK>
+B6C8 50C5 # <CJK>
+B6C9 50BE # <CJK>
+B6CA 50AC # <CJK>
+B6CB 50B7 # <CJK>
+B6CC 50BB # <CJK>
+B6CD 50AF # <CJK>
+B6CE 50C7 # <CJK>
+B6CF 527F # <CJK>
+B6D0 5277 # <CJK>
+B6D1 527D # <CJK>
+B6D2 52DF # <CJK>
+B6D3 52E6 # <CJK>
+B6D4 52E4 # <CJK>
+B6D5 52E2 # <CJK>
+B6D6 52E3 # <CJK>
+B6D7 532F # <CJK>
+B6D8 55DF # <CJK>
+B6D9 55E8 # <CJK>
+B6DA 55D3 # <CJK>
+B6DB 55E6 # <CJK>
+B6DC 55CE # <CJK>
+B6DD 55DC # <CJK>
+B6DE 55C7 # <CJK>
+B6DF 55D1 # <CJK>
+B6E0 55E3 # <CJK>
+B6E1 55E4 # <CJK>
+B6E2 55EF # <CJK>
+B6E3 55DA # <CJK>
+B6E4 55E1 # <CJK>
+B6E5 55C5 # <CJK>
+B6E6 55C6 # <CJK>
+B6E7 55E5 # <CJK>
+B6E8 55C9 # <CJK>
+B6E9 5712 # <CJK>
+B6EA 5713 # <CJK>
+B6EB 585E # <CJK>
+B6EC 5851 # <CJK>
+B6ED 5858 # <CJK>
+B6EE 5857 # <CJK>
+B6EF 585A # <CJK>
+B6F0 5854 # <CJK>
+B6F1 586B # <CJK>
+B6F2 584C # <CJK>
+B6F3 586D # <CJK>
+B6F4 584A # <CJK>
+B6F5 5862 # <CJK>
+B6F6 5852 # <CJK>
+B6F7 584B # <CJK>
+B6F8 5967 # <CJK>
+B6F9 5AC1 # <CJK>
+B6FA 5AC9 # <CJK>
+B6FB 5ACC # <CJK>
+B6FC 5ABE # <CJK>
+B6FD 5ABD # <CJK>
+B6FE 5ABC # <CJK>
+B740 5AB3 # <CJK>
+B741 5AC2 # <CJK>
+B742 5AB2 # <CJK>
+B743 5D69 # <CJK>
+B744 5D6F # <CJK>
+B745 5E4C # <CJK>
+B746 5E79 # <CJK>
+B747 5EC9 # <CJK>
+B748 5EC8 # <CJK>
+B749 5F12 # <CJK>
+B74A 5F59 # <CJK>
+B74B 5FAC # <CJK>
+B74C 5FAE # <CJK>
+B74D 611A # <CJK>
+B74E 610F # <CJK>
+B74F 6148 # <CJK>
+B750 611F # <CJK>
+B751 60F3 # <CJK>
+B752 611B # <CJK>
+B753 60F9 # <CJK>
+B754 6101 # <CJK>
+B755 6108 # <CJK>
+B756 614E # <CJK>
+B757 614C # <CJK>
+B758 6144 # <CJK>
+B759 614D # <CJK>
+B75A 613E # <CJK>
+B75B 6134 # <CJK>
+B75C 6127 # <CJK>
+B75D 610D # <CJK>
+B75E 6106 # <CJK>
+B75F 6137 # <CJK>
+B760 6221 # <CJK>
+B761 6222 # <CJK>
+B762 6413 # <CJK>
+B763 643E # <CJK>
+B764 641E # <CJK>
+B765 642A # <CJK>
+B766 642D # <CJK>
+B767 643D # <CJK>
+B768 642C # <CJK>
+B769 640F # <CJK>
+B76A 641C # <CJK>
+B76B 6414 # <CJK>
+B76C 640D # <CJK>
+B76D 6436 # <CJK>
+B76E 6416 # <CJK>
+B76F 6417 # <CJK>
+B770 6406 # <CJK>
+B771 656C # <CJK>
+B772 659F # <CJK>
+B773 65B0 # <CJK>
+B774 6697 # <CJK>
+B775 6689 # <CJK>
+B776 6687 # <CJK>
+B777 6688 # <CJK>
+B778 6696 # <CJK>
+B779 6684 # <CJK>
+B77A 6698 # <CJK>
+B77B 668D # <CJK>
+B77C 6703 # <CJK>
+B77D 6994 # <CJK>
+B77E 696D # <CJK>
+B7A1 695A # <CJK>
+B7A2 6977 # <CJK>
+B7A3 6960 # <CJK>
+B7A4 6954 # <CJK>
+B7A5 6975 # <CJK>
+B7A6 6930 # <CJK>
+B7A7 6982 # <CJK>
+B7A8 694A # <CJK>
+B7A9 6968 # <CJK>
+B7AA 696B # <CJK>
+B7AB 695E # <CJK>
+B7AC 6953 # <CJK>
+B7AD 6979 # <CJK>
+B7AE 6986 # <CJK>
+B7AF 695D # <CJK>
+B7B0 6963 # <CJK>
+B7B1 695B # <CJK>
+B7B2 6B47 # <CJK>
+B7B3 6B72 # <CJK>
+B7B4 6BC0 # <CJK>
+B7B5 6BBF # <CJK>
+B7B6 6BD3 # <CJK>
+B7B7 6BFD # <CJK>
+B7B8 6EA2 # <CJK>
+B7B9 6EAF # <CJK>
+B7BA 6ED3 # <CJK>
+B7BB 6EB6 # <CJK>
+B7BC 6EC2 # <CJK>
+B7BD 6E90 # <CJK>
+B7BE 6E9D # <CJK>
+B7BF 6EC7 # <CJK>
+B7C0 6EC5 # <CJK>
+B7C1 6EA5 # <CJK>
+B7C2 6E98 # <CJK>
+B7C3 6EBC # <CJK>
+B7C4 6EBA # <CJK>
+B7C5 6EAB # <CJK>
+B7C6 6ED1 # <CJK>
+B7C7 6E96 # <CJK>
+B7C8 6E9C # <CJK>
+B7C9 6EC4 # <CJK>
+B7CA 6ED4 # <CJK>
+B7CB 6EAA # <CJK>
+B7CC 6EA7 # <CJK>
+B7CD 6EB4 # <CJK>
+B7CE 714E # <CJK>
+B7CF 7159 # <CJK>
+B7D0 7169 # <CJK>
+B7D1 7164 # <CJK>
+B7D2 7149 # <CJK>
+B7D3 7167 # <CJK>
+B7D4 715C # <CJK>
+B7D5 716C # <CJK>
+B7D6 7166 # <CJK>
+B7D7 714C # <CJK>
+B7D8 7165 # <CJK>
+B7D9 715E # <CJK>
+B7DA 7146 # <CJK>
+B7DB 7168 # <CJK>
+B7DC 7156 # <CJK>
+B7DD 723A # <CJK>
+B7DE 7252 # <CJK>
+B7DF 7337 # <CJK>
+B7E0 7345 # <CJK>
+B7E1 733F # <CJK>
+B7E2 733E # <CJK>
+B7E3 746F # <CJK>
+B7E4 745A # <CJK>
+B7E5 7455 # <CJK>
+B7E6 745F # <CJK>
+B7E7 745E # <CJK>
+B7E8 7441 # <CJK>
+B7E9 743F # <CJK>
+B7EA 7459 # <CJK>
+B7EB 745B # <CJK>
+B7EC 745C # <CJK>
+B7ED 7576 # <CJK>
+B7EE 7578 # <CJK>
+B7EF 7600 # <CJK>
+B7F0 75F0 # <CJK>
+B7F1 7601 # <CJK>
+B7F2 75F2 # <CJK>
+B7F3 75F1 # <CJK>
+B7F4 75FA # <CJK>
+B7F5 75FF # <CJK>
+B7F6 75F4 # <CJK>
+B7F7 75F3 # <CJK>
+B7F8 76DE # <CJK>
+B7F9 76DF # <CJK>
+B7FA 775B # <CJK>
+B7FB 776B # <CJK>
+B7FC 7766 # <CJK>
+B7FD 775E # <CJK>
+B7FE 7763 # <CJK>
+B840 7779 # <CJK>
+B841 776A # <CJK>
+B842 776C # <CJK>
+B843 775C # <CJK>
+B844 7765 # <CJK>
+B845 7768 # <CJK>
+B846 7762 # <CJK>
+B847 77EE # <CJK>
+B848 788E # <CJK>
+B849 78B0 # <CJK>
+B84A 7897 # <CJK>
+B84B 7898 # <CJK>
+B84C 788C # <CJK>
+B84D 7889 # <CJK>
+B84E 787C # <CJK>
+B84F 7891 # <CJK>
+B850 7893 # <CJK>
+B851 787F # <CJK>
+B852 797A # <CJK>
+B853 797F # <CJK>
+B854 7981 # <CJK>
+B855 842C # <CJK>
+B856 79BD # <CJK>
+B857 7A1C # <CJK>
+B858 7A1A # <CJK>
+B859 7A20 # <CJK>
+B85A 7A14 # <CJK>
+B85B 7A1F # <CJK>
+B85C 7A1E # <CJK>
+B85D 7A9F # <CJK>
+B85E 7AA0 # <CJK>
+B85F 7B77 # <CJK>
+B860 7BC0 # <CJK>
+B861 7B60 # <CJK>
+B862 7B6E # <CJK>
+B863 7B67 # <CJK>
+B864 7CB1 # <CJK>
+B865 7CB3 # <CJK>
+B866 7CB5 # <CJK>
+B867 7D93 # <CJK>
+B868 7D79 # <CJK>
+B869 7D91 # <CJK>
+B86A 7D81 # <CJK>
+B86B 7D8F # <CJK>
+B86C 7D5B # <CJK>
+B86D 7F6E # <CJK>
+B86E 7F69 # <CJK>
+B86F 7F6A # <CJK>
+B870 7F72 # <CJK>
+B871 7FA9 # <CJK>
+B872 7FA8 # <CJK>
+B873 7FA4 # <CJK>
+B874 8056 # <CJK>
+B875 8058 # <CJK>
+B876 8086 # <CJK>
+B877 8084 # <CJK>
+B878 8171 # <CJK>
+B879 8170 # <CJK>
+B87A 8178 # <CJK>
+B87B 8165 # <CJK>
+B87C 816E # <CJK>
+B87D 8173 # <CJK>
+B87E 816B # <CJK>
+B8A1 8179 # <CJK>
+B8A2 817A # <CJK>
+B8A3 8166 # <CJK>
+B8A4 8205 # <CJK>
+B8A5 8247 # <CJK>
+B8A6 8482 # <CJK>
+B8A7 8477 # <CJK>
+B8A8 843D # <CJK>
+B8A9 8431 # <CJK>
+B8AA 8475 # <CJK>
+B8AB 8466 # <CJK>
+B8AC 846B # <CJK>
+B8AD 8449 # <CJK>
+B8AE 846C # <CJK>
+B8AF 845B # <CJK>
+B8B0 843C # <CJK>
+B8B1 8435 # <CJK>
+B8B2 8461 # <CJK>
+B8B3 8463 # <CJK>
+B8B4 8469 # <CJK>
+B8B5 846D # <CJK>
+B8B6 8446 # <CJK>
+B8B7 865E # <CJK>
+B8B8 865C # <CJK>
+B8B9 865F # <CJK>
+B8BA 86F9 # <CJK>
+B8BB 8713 # <CJK>
+B8BC 8708 # <CJK>
+B8BD 8707 # <CJK>
+B8BE 8700 # <CJK>
+B8BF 86FE # <CJK>
+B8C0 86FB # <CJK>
+B8C1 8702 # <CJK>
+B8C2 8703 # <CJK>
+B8C3 8706 # <CJK>
+B8C4 870A # <CJK>
+B8C5 8859 # <CJK>
+B8C6 88DF # <CJK>
+B8C7 88D4 # <CJK>
+B8C8 88D9 # <CJK>
+B8C9 88DC # <CJK>
+B8CA 88D8 # <CJK>
+B8CB 88DD # <CJK>
+B8CC 88E1 # <CJK>
+B8CD 88CA # <CJK>
+B8CE 88D5 # <CJK>
+B8CF 88D2 # <CJK>
+B8D0 899C # <CJK>
+B8D1 89E3 # <CJK>
+B8D2 8A6B # <CJK>
+B8D3 8A72 # <CJK>
+B8D4 8A73 # <CJK>
+B8D5 8A66 # <CJK>
+B8D6 8A69 # <CJK>
+B8D7 8A70 # <CJK>
+B8D8 8A87 # <CJK>
+B8D9 8A7C # <CJK>
+B8DA 8A63 # <CJK>
+B8DB 8AA0 # <CJK>
+B8DC 8A71 # <CJK>
+B8DD 8A85 # <CJK>
+B8DE 8A6D # <CJK>
+B8DF 8A62 # <CJK>
+B8E0 8A6E # <CJK>
+B8E1 8A6C # <CJK>
+B8E2 8A79 # <CJK>
+B8E3 8A7B # <CJK>
+B8E4 8A3E # <CJK>
+B8E5 8A68 # <CJK>
+B8E6 8C62 # <CJK>
+B8E7 8C8A # <CJK>
+B8E8 8C89 # <CJK>
+B8E9 8CCA # <CJK>
+B8EA 8CC7 # <CJK>
+B8EB 8CC8 # <CJK>
+B8EC 8CC4 # <CJK>
+B8ED 8CB2 # <CJK>
+B8EE 8CC3 # <CJK>
+B8EF 8CC2 # <CJK>
+B8F0 8CC5 # <CJK>
+B8F1 8DE1 # <CJK>
+B8F2 8DDF # <CJK>
+B8F3 8DE8 # <CJK>
+B8F4 8DEF # <CJK>
+B8F5 8DF3 # <CJK>
+B8F6 8DFA # <CJK>
+B8F7 8DEA # <CJK>
+B8F8 8DE4 # <CJK>
+B8F9 8DE6 # <CJK>
+B8FA 8EB2 # <CJK>
+B8FB 8F03 # <CJK>
+B8FC 8F09 # <CJK>
+B8FD 8EFE # <CJK>
+B8FE 8F0A # <CJK>
+B940 8F9F # <CJK>
+B941 8FB2 # <CJK>
+B942 904B # <CJK>
+B943 904A # <CJK>
+B944 9053 # <CJK>
+B945 9042 # <CJK>
+B946 9054 # <CJK>
+B947 903C # <CJK>
+B948 9055 # <CJK>
+B949 9050 # <CJK>
+B94A 9047 # <CJK>
+B94B 904F # <CJK>
+B94C 904E # <CJK>
+B94D 904D # <CJK>
+B94E 9051 # <CJK>
+B94F 903E # <CJK>
+B950 9041 # <CJK>
+B951 9112 # <CJK>
+B952 9117 # <CJK>
+B953 916C # <CJK>
+B954 916A # <CJK>
+B955 9169 # <CJK>
+B956 91C9 # <CJK>
+B957 9237 # <CJK>
+B958 9257 # <CJK>
+B959 9238 # <CJK>
+B95A 923D # <CJK>
+B95B 9240 # <CJK>
+B95C 923E # <CJK>
+B95D 925B # <CJK>
+B95E 924B # <CJK>
+B95F 9264 # <CJK>
+B960 9251 # <CJK>
+B961 9234 # <CJK>
+B962 9249 # <CJK>
+B963 924D # <CJK>
+B964 9245 # <CJK>
+B965 9239 # <CJK>
+B966 923F # <CJK>
+B967 925A # <CJK>
+B968 9598 # <CJK>
+B969 9698 # <CJK>
+B96A 9694 # <CJK>
+B96B 9695 # <CJK>
+B96C 96CD # <CJK>
+B96D 96CB # <CJK>
+B96E 96C9 # <CJK>
+B96F 96CA # <CJK>
+B970 96F7 # <CJK>
+B971 96FB # <CJK>
+B972 96F9 # <CJK>
+B973 96F6 # <CJK>
+B974 9756 # <CJK>
+B975 9774 # <CJK>
+B976 9776 # <CJK>
+B977 9810 # <CJK>
+B978 9811 # <CJK>
+B979 9813 # <CJK>
+B97A 980A # <CJK>
+B97B 9812 # <CJK>
+B97C 980C # <CJK>
+B97D 98FC # <CJK>
+B97E 98F4 # <CJK>
+B9A1 98FD # <CJK>
+B9A2 98FE # <CJK>
+B9A3 99B3 # <CJK>
+B9A4 99B1 # <CJK>
+B9A5 99B4 # <CJK>
+B9A6 9AE1 # <CJK>
+B9A7 9CE9 # <CJK>
+B9A8 9E82 # <CJK>
+B9A9 9F0E # <CJK>
+B9AA 9F13 # <CJK>
+B9AB 9F20 # <CJK>
+B9AC 50E7 # <CJK>
+B9AD 50EE # <CJK>
+B9AE 50E5 # <CJK>
+B9AF 50D6 # <CJK>
+B9B0 50ED # <CJK>
+B9B1 50DA # <CJK>
+B9B2 50D5 # <CJK>
+B9B3 50CF # <CJK>
+B9B4 50D1 # <CJK>
+B9B5 50F1 # <CJK>
+B9B6 50CE # <CJK>
+B9B7 50E9 # <CJK>
+B9B8 5162 # <CJK>
+B9B9 51F3 # <CJK>
+B9BA 5283 # <CJK>
+B9BB 5282 # <CJK>
+B9BC 5331 # <CJK>
+B9BD 53AD # <CJK>
+B9BE 55FE # <CJK>
+B9BF 5600 # <CJK>
+B9C0 561B # <CJK>
+B9C1 5617 # <CJK>
+B9C2 55FD # <CJK>
+B9C3 5614 # <CJK>
+B9C4 5606 # <CJK>
+B9C5 5609 # <CJK>
+B9C6 560D # <CJK>
+B9C7 560E # <CJK>
+B9C8 55F7 # <CJK>
+B9C9 5616 # <CJK>
+B9CA 561F # <CJK>
+B9CB 5608 # <CJK>
+B9CC 5610 # <CJK>
+B9CD 55F6 # <CJK>
+B9CE 5718 # <CJK>
+B9CF 5716 # <CJK>
+B9D0 5875 # <CJK>
+B9D1 587E # <CJK>
+B9D2 5883 # <CJK>
+B9D3 5893 # <CJK>
+B9D4 588A # <CJK>
+B9D5 5879 # <CJK>
+B9D6 5885 # <CJK>
+B9D7 587D # <CJK>
+B9D8 58FD # <CJK>
+B9D9 5925 # <CJK>
+B9DA 5922 # <CJK>
+B9DB 5924 # <CJK>
+B9DC 596A # <CJK>
+B9DD 5969 # <CJK>
+B9DE 5AE1 # <CJK>
+B9DF 5AE6 # <CJK>
+B9E0 5AE9 # <CJK>
+B9E1 5AD7 # <CJK>
+B9E2 5AD6 # <CJK>
+B9E3 5AD8 # <CJK>
+B9E4 5AE3 # <CJK>
+B9E5 5B75 # <CJK>
+B9E6 5BDE # <CJK>
+B9E7 5BE7 # <CJK>
+B9E8 5BE1 # <CJK>
+B9E9 5BE5 # <CJK>
+B9EA 5BE6 # <CJK>
+B9EB 5BE8 # <CJK>
+B9EC 5BE2 # <CJK>
+B9ED 5BE4 # <CJK>
+B9EE 5BDF # <CJK>
+B9EF 5C0D # <CJK>
+B9F0 5C62 # <CJK>
+B9F1 5D84 # <CJK>
+B9F2 5D87 # <CJK>
+B9F3 5E5B # <CJK>
+B9F4 5E63 # <CJK>
+B9F5 5E55 # <CJK>
+B9F6 5E57 # <CJK>
+B9F7 5E54 # <CJK>
+B9F8 5ED3 # <CJK>
+B9F9 5ED6 # <CJK>
+B9FA 5F0A # <CJK>
+B9FB 5F46 # <CJK>
+B9FC 5F70 # <CJK>
+B9FD 5FB9 # <CJK>
+B9FE 6147 # <CJK>
+BA40 613F # <CJK>
+BA41 614B # <CJK>
+BA42 6177 # <CJK>
+BA43 6162 # <CJK>
+BA44 6163 # <CJK>
+BA45 615F # <CJK>
+BA46 615A # <CJK>
+BA47 6158 # <CJK>
+BA48 6175 # <CJK>
+BA49 622A # <CJK>
+BA4A 6487 # <CJK>
+BA4B 6458 # <CJK>
+BA4C 6454 # <CJK>
+BA4D 64A4 # <CJK>
+BA4E 6478 # <CJK>
+BA4F 645F # <CJK>
+BA50 647A # <CJK>
+BA51 6451 # <CJK>
+BA52 6467 # <CJK>
+BA53 6434 # <CJK>
+BA54 646D # <CJK>
+BA55 647B # <CJK>
+BA56 6572 # <CJK>
+BA57 65A1 # <CJK>
+BA58 65D7 # <CJK>
+BA59 65D6 # <CJK>
+BA5A 66A2 # <CJK>
+BA5B 66A8 # <CJK>
+BA5C 669D # <CJK>
+BA5D 699C # <CJK>
+BA5E 69A8 # <CJK>
+BA5F 6995 # <CJK>
+BA60 69C1 # <CJK>
+BA61 69AE # <CJK>
+BA62 69D3 # <CJK>
+BA63 69CB # <CJK>
+BA64 699B # <CJK>
+BA65 69B7 # <CJK>
+BA66 69BB # <CJK>
+BA67 69AB # <CJK>
+BA68 69B4 # <CJK>
+BA69 69D0 # <CJK>
+BA6A 69CD # <CJK>
+BA6B 69AD # <CJK>
+BA6C 69CC # <CJK>
+BA6D 69A6 # <CJK>
+BA6E 69C3 # <CJK>
+BA6F 69A3 # <CJK>
+BA70 6B49 # <CJK>
+BA71 6B4C # <CJK>
+BA72 6C33 # <CJK>
+BA73 6F33 # <CJK>
+BA74 6F14 # <CJK>
+BA75 6EFE # <CJK>
+BA76 6F13 # <CJK>
+BA77 6EF4 # <CJK>
+BA78 6F29 # <CJK>
+BA79 6F3E # <CJK>
+BA7A 6F20 # <CJK>
+BA7B 6F2C # <CJK>
+BA7C 6F0F # <CJK>
+BA7D 6F02 # <CJK>
+BA7E 6F22 # <CJK>
+BAA1 6EFF # <CJK>
+BAA2 6EEF # <CJK>
+BAA3 6F06 # <CJK>
+BAA4 6F31 # <CJK>
+BAA5 6F38 # <CJK>
+BAA6 6F32 # <CJK>
+BAA7 6F23 # <CJK>
+BAA8 6F15 # <CJK>
+BAA9 6F2B # <CJK>
+BAAA 6F2F # <CJK>
+BAAB 6F88 # <CJK>
+BAAC 6F2A # <CJK>
+BAAD 6EEC # <CJK>
+BAAE 6F01 # <CJK>
+BAAF 6EF2 # <CJK>
+BAB0 6ECC # <CJK>
+BAB1 6EF7 # <CJK>
+BAB2 7194 # <CJK>
+BAB3 7199 # <CJK>
+BAB4 717D # <CJK>
+BAB5 718A # <CJK>
+BAB6 7184 # <CJK>
+BAB7 7192 # <CJK>
+BAB8 723E # <CJK>
+BAB9 7292 # <CJK>
+BABA 7296 # <CJK>
+BABB 7344 # <CJK>
+BABC 7350 # <CJK>
+BABD 7464 # <CJK>
+BABE 7463 # <CJK>
+BABF 746A # <CJK>
+BAC0 7470 # <CJK>
+BAC1 746D # <CJK>
+BAC2 7504 # <CJK>
+BAC3 7591 # <CJK>
+BAC4 7627 # <CJK>
+BAC5 760D # <CJK>
+BAC6 760B # <CJK>
+BAC7 7609 # <CJK>
+BAC8 7613 # <CJK>
+BAC9 76E1 # <CJK>
+BACA 76E3 # <CJK>
+BACB 7784 # <CJK>
+BACC 777D # <CJK>
+BACD 777F # <CJK>
+BACE 7761 # <CJK>
+BACF 78C1 # <CJK>
+BAD0 789F # <CJK>
+BAD1 78A7 # <CJK>
+BAD2 78B3 # <CJK>
+BAD3 78A9 # <CJK>
+BAD4 78A3 # <CJK>
+BAD5 798E # <CJK>
+BAD6 798F # <CJK>
+BAD7 798D # <CJK>
+BAD8 7A2E # <CJK>
+BAD9 7A31 # <CJK>
+BADA 7AAA # <CJK>
+BADB 7AA9 # <CJK>
+BADC 7AED # <CJK>
+BADD 7AEF # <CJK>
+BADE 7BA1 # <CJK>
+BADF 7B95 # <CJK>
+BAE0 7B8B # <CJK>
+BAE1 7B75 # <CJK>
+BAE2 7B97 # <CJK>
+BAE3 7B9D # <CJK>
+BAE4 7B94 # <CJK>
+BAE5 7B8F # <CJK>
+BAE6 7BB8 # <CJK>
+BAE7 7B87 # <CJK>
+BAE8 7B84 # <CJK>
+BAE9 7CB9 # <CJK>
+BAEA 7CBD # <CJK>
+BAEB 7CBE # <CJK>
+BAEC 7DBB # <CJK>
+BAED 7DB0 # <CJK>
+BAEE 7D9C # <CJK>
+BAEF 7DBD # <CJK>
+BAF0 7DBE # <CJK>
+BAF1 7DA0 # <CJK>
+BAF2 7DCA # <CJK>
+BAF3 7DB4 # <CJK>
+BAF4 7DB2 # <CJK>
+BAF5 7DB1 # <CJK>
+BAF6 7DBA # <CJK>
+BAF7 7DA2 # <CJK>
+BAF8 7DBF # <CJK>
+BAF9 7DB5 # <CJK>
+BAFA 7DB8 # <CJK>
+BAFB 7DAD # <CJK>
+BAFC 7DD2 # <CJK>
+BAFD 7DC7 # <CJK>
+BAFE 7DAC # <CJK>
+BB40 7F70 # <CJK>
+BB41 7FE0 # <CJK>
+BB42 7FE1 # <CJK>
+BB43 7FDF # <CJK>
+BB44 805E # <CJK>
+BB45 805A # <CJK>
+BB46 8087 # <CJK>
+BB47 8150 # <CJK>
+BB48 8180 # <CJK>
+BB49 818F # <CJK>
+BB4A 8188 # <CJK>
+BB4B 818A # <CJK>
+BB4C 817F # <CJK>
+BB4D 8182 # <CJK>
+BB4E 81E7 # <CJK>
+BB4F 81FA # <CJK>
+BB50 8207 # <CJK>
+BB51 8214 # <CJK>
+BB52 821E # <CJK>
+BB53 824B # <CJK>
+BB54 84C9 # <CJK>
+BB55 84BF # <CJK>
+BB56 84C6 # <CJK>
+BB57 84C4 # <CJK>
+BB58 8499 # <CJK>
+BB59 849E # <CJK>
+BB5A 84B2 # <CJK>
+BB5B 849C # <CJK>
+BB5C 84CB # <CJK>
+BB5D 84B8 # <CJK>
+BB5E 84C0 # <CJK>
+BB5F 84D3 # <CJK>
+BB60 8490 # <CJK>
+BB61 84BC # <CJK>
+BB62 84D1 # <CJK>
+BB63 84CA # <CJK>
+BB64 873F # <CJK>
+BB65 871C # <CJK>
+BB66 873B # <CJK>
+BB67 8722 # <CJK>
+BB68 8725 # <CJK>
+BB69 8734 # <CJK>
+BB6A 8718 # <CJK>
+BB6B 8755 # <CJK>
+BB6C 8737 # <CJK>
+BB6D 8729 # <CJK>
+BB6E 88F3 # <CJK>
+BB6F 8902 # <CJK>
+BB70 88F4 # <CJK>
+BB71 88F9 # <CJK>
+BB72 88F8 # <CJK>
+BB73 88FD # <CJK>
+BB74 88E8 # <CJK>
+BB75 891A # <CJK>
+BB76 88EF # <CJK>
+BB77 8AA6 # <CJK>
+BB78 8A8C # <CJK>
+BB79 8A9E # <CJK>
+BB7A 8AA3 # <CJK>
+BB7B 8A8D # <CJK>
+BB7C 8AA1 # <CJK>
+BB7D 8A93 # <CJK>
+BB7E 8AA4 # <CJK>
+BBA1 8AAA # <CJK>
+BBA2 8AA5 # <CJK>
+BBA3 8AA8 # <CJK>
+BBA4 8A98 # <CJK>
+BBA5 8A91 # <CJK>
+BBA6 8A9A # <CJK>
+BBA7 8AA7 # <CJK>
+BBA8 8C6A # <CJK>
+BBA9 8C8D # <CJK>
+BBAA 8C8C # <CJK>
+BBAB 8CD3 # <CJK>
+BBAC 8CD1 # <CJK>
+BBAD 8CD2 # <CJK>
+BBAE 8D6B # <CJK>
+BBAF 8D99 # <CJK>
+BBB0 8D95 # <CJK>
+BBB1 8DFC # <CJK>
+BBB2 8F14 # <CJK>
+BBB3 8F12 # <CJK>
+BBB4 8F15 # <CJK>
+BBB5 8F13 # <CJK>
+BBB6 8FA3 # <CJK>
+BBB7 9060 # <CJK>
+BBB8 9058 # <CJK>
+BBB9 905C # <CJK>
+BBBA 9063 # <CJK>
+BBBB 9059 # <CJK>
+BBBC 905E # <CJK>
+BBBD 9062 # <CJK>
+BBBE 905D # <CJK>
+BBBF 905B # <CJK>
+BBC0 9119 # <CJK>
+BBC1 9118 # <CJK>
+BBC2 911E # <CJK>
+BBC3 9175 # <CJK>
+BBC4 9178 # <CJK>
+BBC5 9177 # <CJK>
+BBC6 9174 # <CJK>
+BBC7 9278 # <CJK>
+BBC8 9280 # <CJK>
+BBC9 9285 # <CJK>
+BBCA 9298 # <CJK>
+BBCB 9296 # <CJK>
+BBCC 927B # <CJK>
+BBCD 9293 # <CJK>
+BBCE 929C # <CJK>
+BBCF 92A8 # <CJK>
+BBD0 927C # <CJK>
+BBD1 9291 # <CJK>
+BBD2 95A1 # <CJK>
+BBD3 95A8 # <CJK>
+BBD4 95A9 # <CJK>
+BBD5 95A3 # <CJK>
+BBD6 95A5 # <CJK>
+BBD7 95A4 # <CJK>
+BBD8 9699 # <CJK>
+BBD9 969C # <CJK>
+BBDA 969B # <CJK>
+BBDB 96CC # <CJK>
+BBDC 96D2 # <CJK>
+BBDD 9700 # <CJK>
+BBDE 977C # <CJK>
+BBDF 9785 # <CJK>
+BBE0 97F6 # <CJK>
+BBE1 9817 # <CJK>
+BBE2 9818 # <CJK>
+BBE3 98AF # <CJK>
+BBE4 98B1 # <CJK>
+BBE5 9903 # <CJK>
+BBE6 9905 # <CJK>
+BBE7 990C # <CJK>
+BBE8 9909 # <CJK>
+BBE9 99C1 # <CJK>
+BBEA 9AAF # <CJK>
+BBEB 9AB0 # <CJK>
+BBEC 9AE6 # <CJK>
+BBED 9B41 # <CJK>
+BBEE 9B42 # <CJK>
+BBEF 9CF4 # <CJK>
+BBF0 9CF6 # <CJK>
+BBF1 9CF3 # <CJK>
+BBF2 9EBC # <CJK>
+BBF3 9F3B # <CJK>
+BBF4 9F4A # <CJK>
+BBF5 5104 # <CJK>
+BBF6 5100 # <CJK>
+BBF7 50FB # <CJK>
+BBF8 50F5 # <CJK>
+BBF9 50F9 # <CJK>
+BBFA 5102 # <CJK>
+BBFB 5108 # <CJK>
+BBFC 5109 # <CJK>
+BBFD 5105 # <CJK>
+BBFE 51DC # <CJK>
+BC40 5287 # <CJK>
+BC41 5288 # <CJK>
+BC42 5289 # <CJK>
+BC43 528D # <CJK>
+BC44 528A # <CJK>
+BC45 52F0 # <CJK>
+BC46 53B2 # <CJK>
+BC47 562E # <CJK>
+BC48 563B # <CJK>
+BC49 5639 # <CJK>
+BC4A 5632 # <CJK>
+BC4B 563F # <CJK>
+BC4C 5634 # <CJK>
+BC4D 5629 # <CJK>
+BC4E 5653 # <CJK>
+BC4F 564E # <CJK>
+BC50 5657 # <CJK>
+BC51 5674 # <CJK>
+BC52 5636 # <CJK>
+BC53 562F # <CJK>
+BC54 5630 # <CJK>
+BC55 5880 # <CJK>
+BC56 589F # <CJK>
+BC57 589E # <CJK>
+BC58 58B3 # <CJK>
+BC59 589C # <CJK>
+BC5A 58AE # <CJK>
+BC5B 58A9 # <CJK>
+BC5C 58A6 # <CJK>
+BC5D 596D # <CJK>
+BC5E 5B09 # <CJK>
+BC5F 5AFB # <CJK>
+BC60 5B0B # <CJK>
+BC61 5AF5 # <CJK>
+BC62 5B0C # <CJK>
+BC63 5B08 # <CJK>
+BC64 5BEE # <CJK>
+BC65 5BEC # <CJK>
+BC66 5BE9 # <CJK>
+BC67 5BEB # <CJK>
+BC68 5C64 # <CJK>
+BC69 5C65 # <CJK>
+BC6A 5D9D # <CJK>
+BC6B 5D94 # <CJK>
+BC6C 5E62 # <CJK>
+BC6D 5E5F # <CJK>
+BC6E 5E61 # <CJK>
+BC6F 5EE2 # <CJK>
+BC70 5EDA # <CJK>
+BC71 5EDF # <CJK>
+BC72 5EDD # <CJK>
+BC73 5EE3 # <CJK>
+BC74 5EE0 # <CJK>
+BC75 5F48 # <CJK>
+BC76 5F71 # <CJK>
+BC77 5FB7 # <CJK>
+BC78 5FB5 # <CJK>
+BC79 6176 # <CJK>
+BC7A 6167 # <CJK>
+BC7B 616E # <CJK>
+BC7C 615D # <CJK>
+BC7D 6155 # <CJK>
+BC7E 6182 # <CJK>
+BCA1 617C # <CJK>
+BCA2 6170 # <CJK>
+BCA3 616B # <CJK>
+BCA4 617E # <CJK>
+BCA5 61A7 # <CJK>
+BCA6 6190 # <CJK>
+BCA7 61AB # <CJK>
+BCA8 618E # <CJK>
+BCA9 61AC # <CJK>
+BCAA 619A # <CJK>
+BCAB 61A4 # <CJK>
+BCAC 6194 # <CJK>
+BCAD 61AE # <CJK>
+BCAE 622E # <CJK>
+BCAF 6469 # <CJK>
+BCB0 646F # <CJK>
+BCB1 6479 # <CJK>
+BCB2 649E # <CJK>
+BCB3 64B2 # <CJK>
+BCB4 6488 # <CJK>
+BCB5 6490 # <CJK>
+BCB6 64B0 # <CJK>
+BCB7 64A5 # <CJK>
+BCB8 6493 # <CJK>
+BCB9 6495 # <CJK>
+BCBA 64A9 # <CJK>
+BCBB 6492 # <CJK>
+BCBC 64AE # <CJK>
+BCBD 64AD # <CJK>
+BCBE 64AB # <CJK>
+BCBF 649A # <CJK>
+BCC0 64AC # <CJK>
+BCC1 6499 # <CJK>
+BCC2 64A2 # <CJK>
+BCC3 64B3 # <CJK>
+BCC4 6575 # <CJK>
+BCC5 6577 # <CJK>
+BCC6 6578 # <CJK>
+BCC7 66AE # <CJK>
+BCC8 66AB # <CJK>
+BCC9 66B4 # <CJK>
+BCCA 66B1 # <CJK>
+BCCB 6A23 # <CJK>
+BCCC 6A1F # <CJK>
+BCCD 69E8 # <CJK>
+BCCE 6A01 # <CJK>
+BCCF 6A1E # <CJK>
+BCD0 6A19 # <CJK>
+BCD1 69FD # <CJK>
+BCD2 6A21 # <CJK>
+BCD3 6A13 # <CJK>
+BCD4 6A0A # <CJK>
+BCD5 69F3 # <CJK>
+BCD6 6A02 # <CJK>
+BCD7 6A05 # <CJK>
+BCD8 69ED # <CJK>
+BCD9 6A11 # <CJK>
+BCDA 6B50 # <CJK>
+BCDB 6B4E # <CJK>
+BCDC 6BA4 # <CJK>
+BCDD 6BC5 # <CJK>
+BCDE 6BC6 # <CJK>
+BCDF 6F3F # <CJK>
+BCE0 6F7C # <CJK>
+BCE1 6F84 # <CJK>
+BCE2 6F51 # <CJK>
+BCE3 6F66 # <CJK>
+BCE4 6F54 # <CJK>
+BCE5 6F86 # <CJK>
+BCE6 6F6D # <CJK>
+BCE7 6F5B # <CJK>
+BCE8 6F78 # <CJK>
+BCE9 6F6E # <CJK>
+BCEA 6F8E # <CJK>
+BCEB 6F7A # <CJK>
+BCEC 6F70 # <CJK>
+BCED 6F64 # <CJK>
+BCEE 6F97 # <CJK>
+BCEF 6F58 # <CJK>
+BCF0 6ED5 # <CJK>
+BCF1 6F6F # <CJK>
+BCF2 6F60 # <CJK>
+BCF3 6F5F # <CJK>
+BCF4 719F # <CJK>
+BCF5 71AC # <CJK>
+BCF6 71B1 # <CJK>
+BCF7 71A8 # <CJK>
+BCF8 7256 # <CJK>
+BCF9 729B # <CJK>
+BCFA 734E # <CJK>
+BCFB 7357 # <CJK>
+BCFC 7469 # <CJK>
+BCFD 748B # <CJK>
+BCFE 7483 # <CJK>
+BD40 747E # <CJK>
+BD41 7480 # <CJK>
+BD42 757F # <CJK>
+BD43 7620 # <CJK>
+BD44 7629 # <CJK>
+BD45 761F # <CJK>
+BD46 7624 # <CJK>
+BD47 7626 # <CJK>
+BD48 7621 # <CJK>
+BD49 7622 # <CJK>
+BD4A 769A # <CJK>
+BD4B 76BA # <CJK>
+BD4C 76E4 # <CJK>
+BD4D 778E # <CJK>
+BD4E 7787 # <CJK>
+BD4F 778C # <CJK>
+BD50 7791 # <CJK>
+BD51 778B # <CJK>
+BD52 78CB # <CJK>
+BD53 78C5 # <CJK>
+BD54 78BA # <CJK>
+BD55 78CA # <CJK>
+BD56 78BE # <CJK>
+BD57 78D5 # <CJK>
+BD58 78BC # <CJK>
+BD59 78D0 # <CJK>
+BD5A 7A3F # <CJK>
+BD5B 7A3C # <CJK>
+BD5C 7A40 # <CJK>
+BD5D 7A3D # <CJK>
+BD5E 7A37 # <CJK>
+BD5F 7A3B # <CJK>
+BD60 7AAF # <CJK>
+BD61 7AAE # <CJK>
+BD62 7BAD # <CJK>
+BD63 7BB1 # <CJK>
+BD64 7BC4 # <CJK>
+BD65 7BB4 # <CJK>
+BD66 7BC6 # <CJK>
+BD67 7BC7 # <CJK>
+BD68 7BC1 # <CJK>
+BD69 7BA0 # <CJK>
+BD6A 7BCC # <CJK>
+BD6B 7CCA # <CJK>
+BD6C 7DE0 # <CJK>
+BD6D 7DF4 # <CJK>
+BD6E 7DEF # <CJK>
+BD6F 7DFB # <CJK>
+BD70 7DD8 # <CJK>
+BD71 7DEC # <CJK>
+BD72 7DDD # <CJK>
+BD73 7DE8 # <CJK>
+BD74 7DE3 # <CJK>
+BD75 7DDA # <CJK>
+BD76 7DDE # <CJK>
+BD77 7DE9 # <CJK>
+BD78 7D9E # <CJK>
+BD79 7DD9 # <CJK>
+BD7A 7DF2 # <CJK>
+BD7B 7DF9 # <CJK>
+BD7C 7F75 # <CJK>
+BD7D 7F77 # <CJK>
+BD7E 7FAF # <CJK>
+BDA1 7FE9 # <CJK>
+BDA2 8026 # <CJK>
+BDA3 819B # <CJK>
+BDA4 819C # <CJK>
+BDA5 819D # <CJK>
+BDA6 81A0 # <CJK>
+BDA7 819A # <CJK>
+BDA8 8198 # <CJK>
+BDA9 8517 # <CJK>
+BDAA 853D # <CJK>
+BDAB 851A # <CJK>
+BDAC 84EE # <CJK>
+BDAD 852C # <CJK>
+BDAE 852D # <CJK>
+BDAF 8513 # <CJK>
+BDB0 8511 # <CJK>
+BDB1 8523 # <CJK>
+BDB2 8521 # <CJK>
+BDB3 8514 # <CJK>
+BDB4 84EC # <CJK>
+BDB5 8525 # <CJK>
+BDB6 84FF # <CJK>
+BDB7 8506 # <CJK>
+BDB8 8782 # <CJK>
+BDB9 8774 # <CJK>
+BDBA 8776 # <CJK>
+BDBB 8760 # <CJK>
+BDBC 8766 # <CJK>
+BDBD 8778 # <CJK>
+BDBE 8768 # <CJK>
+BDBF 8759 # <CJK>
+BDC0 8757 # <CJK>
+BDC1 874C # <CJK>
+BDC2 8753 # <CJK>
+BDC3 885B # <CJK>
+BDC4 885D # <CJK>
+BDC5 8910 # <CJK>
+BDC6 8907 # <CJK>
+BDC7 8912 # <CJK>
+BDC8 8913 # <CJK>
+BDC9 8915 # <CJK>
+BDCA 890A # <CJK>
+BDCB 8ABC # <CJK>
+BDCC 8AD2 # <CJK>
+BDCD 8AC7 # <CJK>
+BDCE 8AC4 # <CJK>
+BDCF 8A95 # <CJK>
+BDD0 8ACB # <CJK>
+BDD1 8AF8 # <CJK>
+BDD2 8AB2 # <CJK>
+BDD3 8AC9 # <CJK>
+BDD4 8AC2 # <CJK>
+BDD5 8ABF # <CJK>
+BDD6 8AB0 # <CJK>
+BDD7 8AD6 # <CJK>
+BDD8 8ACD # <CJK>
+BDD9 8AB6 # <CJK>
+BDDA 8AB9 # <CJK>
+BDDB 8ADB # <CJK>
+BDDC 8C4C # <CJK>
+BDDD 8C4E # <CJK>
+BDDE 8C6C # <CJK>
+BDDF 8CE0 # <CJK>
+BDE0 8CDE # <CJK>
+BDE1 8CE6 # <CJK>
+BDE2 8CE4 # <CJK>
+BDE3 8CEC # <CJK>
+BDE4 8CED # <CJK>
+BDE5 8CE2 # <CJK>
+BDE6 8CE3 # <CJK>
+BDE7 8CDC # <CJK>
+BDE8 8CEA # <CJK>
+BDE9 8CE1 # <CJK>
+BDEA 8D6D # <CJK>
+BDEB 8D9F # <CJK>
+BDEC 8DA3 # <CJK>
+BDED 8E2B # <CJK>
+BDEE 8E10 # <CJK>
+BDEF 8E1D # <CJK>
+BDF0 8E22 # <CJK>
+BDF1 8E0F # <CJK>
+BDF2 8E29 # <CJK>
+BDF3 8E1F # <CJK>
+BDF4 8E21 # <CJK>
+BDF5 8E1E # <CJK>
+BDF6 8EBA # <CJK>
+BDF7 8F1D # <CJK>
+BDF8 8F1B # <CJK>
+BDF9 8F1F # <CJK>
+BDFA 8F29 # <CJK>
+BDFB 8F26 # <CJK>
+BDFC 8F2A # <CJK>
+BDFD 8F1C # <CJK>
+BDFE 8F1E # <CJK>
+BE40 8F25 # <CJK>
+BE41 9069 # <CJK>
+BE42 906E # <CJK>
+BE43 9068 # <CJK>
+BE44 906D # <CJK>
+BE45 9077 # <CJK>
+BE46 9130 # <CJK>
+BE47 912D # <CJK>
+BE48 9127 # <CJK>
+BE49 9131 # <CJK>
+BE4A 9187 # <CJK>
+BE4B 9189 # <CJK>
+BE4C 918B # <CJK>
+BE4D 9183 # <CJK>
+BE4E 92C5 # <CJK>
+BE4F 92BB # <CJK>
+BE50 92B7 # <CJK>
+BE51 92EA # <CJK>
+BE52 92AC # <CJK>
+BE53 92E4 # <CJK>
+BE54 92C1 # <CJK>
+BE55 92B3 # <CJK>
+BE56 92BC # <CJK>
+BE57 92D2 # <CJK>
+BE58 92C7 # <CJK>
+BE59 92F0 # <CJK>
+BE5A 92B2 # <CJK>
+BE5B 95AD # <CJK>
+BE5C 95B1 # <CJK>
+BE5D 9704 # <CJK>
+BE5E 9706 # <CJK>
+BE5F 9707 # <CJK>
+BE60 9709 # <CJK>
+BE61 9760 # <CJK>
+BE62 978D # <CJK>
+BE63 978B # <CJK>
+BE64 978F # <CJK>
+BE65 9821 # <CJK>
+BE66 982B # <CJK>
+BE67 981C # <CJK>
+BE68 98B3 # <CJK>
+BE69 990A # <CJK>
+BE6A 9913 # <CJK>
+BE6B 9912 # <CJK>
+BE6C 9918 # <CJK>
+BE6D 99DD # <CJK>
+BE6E 99D0 # <CJK>
+BE6F 99DF # <CJK>
+BE70 99DB # <CJK>
+BE71 99D1 # <CJK>
+BE72 99D5 # <CJK>
+BE73 99D2 # <CJK>
+BE74 99D9 # <CJK>
+BE75 9AB7 # <CJK>
+BE76 9AEE # <CJK>
+BE77 9AEF # <CJK>
+BE78 9B27 # <CJK>
+BE79 9B45 # <CJK>
+BE7A 9B44 # <CJK>
+BE7B 9B77 # <CJK>
+BE7C 9B6F # <CJK>
+BE7D 9D06 # <CJK>
+BE7E 9D09 # <CJK>
+BEA1 9D03 # <CJK>
+BEA2 9EA9 # <CJK>
+BEA3 9EBE # <CJK>
+BEA4 9ECE # <CJK>
+BEA5 58A8 # <CJK>
+BEA6 9F52 # <CJK>
+BEA7 5112 # <CJK>
+BEA8 5118 # <CJK>
+BEA9 5114 # <CJK>
+BEAA 5110 # <CJK>
+BEAB 5115 # <CJK>
+BEAC 5180 # <CJK>
+BEAD 51AA # <CJK>
+BEAE 51DD # <CJK>
+BEAF 5291 # <CJK>
+BEB0 5293 # <CJK>
+BEB1 52F3 # <CJK>
+BEB2 5659 # <CJK>
+BEB3 566B # <CJK>
+BEB4 5679 # <CJK>
+BEB5 5669 # <CJK>
+BEB6 5664 # <CJK>
+BEB7 5678 # <CJK>
+BEB8 566A # <CJK>
+BEB9 5668 # <CJK>
+BEBA 5665 # <CJK>
+BEBB 5671 # <CJK>
+BEBC 566F # <CJK>
+BEBD 566C # <CJK>
+BEBE 5662 # <CJK>
+BEBF 5676 # <CJK>
+BEC0 58C1 # <CJK>
+BEC1 58BE # <CJK>
+BEC2 58C7 # <CJK>
+BEC3 58C5 # <CJK>
+BEC4 596E # <CJK>
+BEC5 5B1D # <CJK>
+BEC6 5B34 # <CJK>
+BEC7 5B78 # <CJK>
+BEC8 5BF0 # <CJK>
+BEC9 5C0E # <CJK>
+BECA 5F4A # <CJK>
+BECB 61B2 # <CJK>
+BECC 6191 # <CJK>
+BECD 61A9 # <CJK>
+BECE 618A # <CJK>
+BECF 61CD # <CJK>
+BED0 61B6 # <CJK>
+BED1 61BE # <CJK>
+BED2 61CA # <CJK>
+BED3 61C8 # <CJK>
+BED4 6230 # <CJK>
+BED5 64C5 # <CJK>
+BED6 64C1 # <CJK>
+BED7 64CB # <CJK>
+BED8 64BB # <CJK>
+BED9 64BC # <CJK>
+BEDA 64DA # <CJK>
+BEDB 64C4 # <CJK>
+BEDC 64C7 # <CJK>
+BEDD 64C2 # <CJK>
+BEDE 64CD # <CJK>
+BEDF 64BF # <CJK>
+BEE0 64D2 # <CJK>
+BEE1 64D4 # <CJK>
+BEE2 64BE # <CJK>
+BEE3 6574 # <CJK>
+BEE4 66C6 # <CJK>
+BEE5 66C9 # <CJK>
+BEE6 66B9 # <CJK>
+BEE7 66C4 # <CJK>
+BEE8 66C7 # <CJK>
+BEE9 66B8 # <CJK>
+BEEA 6A3D # <CJK>
+BEEB 6A38 # <CJK>
+BEEC 6A3A # <CJK>
+BEED 6A59 # <CJK>
+BEEE 6A6B # <CJK>
+BEEF 6A58 # <CJK>
+BEF0 6A39 # <CJK>
+BEF1 6A44 # <CJK>
+BEF2 6A62 # <CJK>
+BEF3 6A61 # <CJK>
+BEF4 6A4B # <CJK>
+BEF5 6A47 # <CJK>
+BEF6 6A35 # <CJK>
+BEF7 6A5F # <CJK>
+BEF8 6A48 # <CJK>
+BEF9 6B59 # <CJK>
+BEFA 6B77 # <CJK>
+BEFB 6C05 # <CJK>
+BEFC 6FC2 # <CJK>
+BEFD 6FB1 # <CJK>
+BEFE 6FA1 # <CJK>
+BF40 6FC3 # <CJK>
+BF41 6FA4 # <CJK>
+BF42 6FC1 # <CJK>
+BF43 6FA7 # <CJK>
+BF44 6FB3 # <CJK>
+BF45 6FC0 # <CJK>
+BF46 6FB9 # <CJK>
+BF47 6FB6 # <CJK>
+BF48 6FA6 # <CJK>
+BF49 6FA0 # <CJK>
+BF4A 6FB4 # <CJK>
+BF4B 71BE # <CJK>
+BF4C 71C9 # <CJK>
+BF4D 71D0 # <CJK>
+BF4E 71D2 # <CJK>
+BF4F 71C8 # <CJK>
+BF50 71D5 # <CJK>
+BF51 71B9 # <CJK>
+BF52 71CE # <CJK>
+BF53 71D9 # <CJK>
+BF54 71DC # <CJK>
+BF55 71C3 # <CJK>
+BF56 71C4 # <CJK>
+BF57 7368 # <CJK>
+BF58 749C # <CJK>
+BF59 74A3 # <CJK>
+BF5A 7498 # <CJK>
+BF5B 749F # <CJK>
+BF5C 749E # <CJK>
+BF5D 74E2 # <CJK>
+BF5E 750C # <CJK>
+BF5F 750D # <CJK>
+BF60 7634 # <CJK>
+BF61 7638 # <CJK>
+BF62 763A # <CJK>
+BF63 76E7 # <CJK>
+BF64 76E5 # <CJK>
+BF65 77A0 # <CJK>
+BF66 779E # <CJK>
+BF67 779F # <CJK>
+BF68 77A5 # <CJK>
+BF69 78E8 # <CJK>
+BF6A 78DA # <CJK>
+BF6B 78EC # <CJK>
+BF6C 78E7 # <CJK>
+BF6D 79A6 # <CJK>
+BF6E 7A4D # <CJK>
+BF6F 7A4E # <CJK>
+BF70 7A46 # <CJK>
+BF71 7A4C # <CJK>
+BF72 7A4B # <CJK>
+BF73 7ABA # <CJK>
+BF74 7BD9 # <CJK>
+BF75 7C11 # <CJK>
+BF76 7BC9 # <CJK>
+BF77 7BE4 # <CJK>
+BF78 7BDB # <CJK>
+BF79 7BE1 # <CJK>
+BF7A 7BE9 # <CJK>
+BF7B 7BE6 # <CJK>
+BF7C 7CD5 # <CJK>
+BF7D 7CD6 # <CJK>
+BF7E 7E0A # <CJK>
+BFA1 7E11 # <CJK>
+BFA2 7E08 # <CJK>
+BFA3 7E1B # <CJK>
+BFA4 7E23 # <CJK>
+BFA5 7E1E # <CJK>
+BFA6 7E1D # <CJK>
+BFA7 7E09 # <CJK>
+BFA8 7E10 # <CJK>
+BFA9 7F79 # <CJK>
+BFAA 7FB2 # <CJK>
+BFAB 7FF0 # <CJK>
+BFAC 7FF1 # <CJK>
+BFAD 7FEE # <CJK>
+BFAE 8028 # <CJK>
+BFAF 81B3 # <CJK>
+BFB0 81A9 # <CJK>
+BFB1 81A8 # <CJK>
+BFB2 81FB # <CJK>
+BFB3 8208 # <CJK>
+BFB4 8258 # <CJK>
+BFB5 8259 # <CJK>
+BFB6 854A # <CJK>
+BFB7 8559 # <CJK>
+BFB8 8548 # <CJK>
+BFB9 8568 # <CJK>
+BFBA 8569 # <CJK>
+BFBB 8543 # <CJK>
+BFBC 8549 # <CJK>
+BFBD 856D # <CJK>
+BFBE 856A # <CJK>
+BFBF 855E # <CJK>
+BFC0 8783 # <CJK>
+BFC1 879F # <CJK>
+BFC2 879E # <CJK>
+BFC3 87A2 # <CJK>
+BFC4 878D # <CJK>
+BFC5 8861 # <CJK>
+BFC6 892A # <CJK>
+BFC7 8932 # <CJK>
+BFC8 8925 # <CJK>
+BFC9 892B # <CJK>
+BFCA 8921 # <CJK>
+BFCB 89AA # <CJK>
+BFCC 89A6 # <CJK>
+BFCD 8AE6 # <CJK>
+BFCE 8AFA # <CJK>
+BFCF 8AEB # <CJK>
+BFD0 8AF1 # <CJK>
+BFD1 8B00 # <CJK>
+BFD2 8ADC # <CJK>
+BFD3 8AE7 # <CJK>
+BFD4 8AEE # <CJK>
+BFD5 8AFE # <CJK>
+BFD6 8B01 # <CJK>
+BFD7 8B02 # <CJK>
+BFD8 8AF7 # <CJK>
+BFD9 8AED # <CJK>
+BFDA 8AF3 # <CJK>
+BFDB 8AF6 # <CJK>
+BFDC 8AFC # <CJK>
+BFDD 8C6B # <CJK>
+BFDE 8C6D # <CJK>
+BFDF 8C93 # <CJK>
+BFE0 8CF4 # <CJK>
+BFE1 8E44 # <CJK>
+BFE2 8E31 # <CJK>
+BFE3 8E34 # <CJK>
+BFE4 8E42 # <CJK>
+BFE5 8E39 # <CJK>
+BFE6 8E35 # <CJK>
+BFE7 8F3B # <CJK>
+BFE8 8F2F # <CJK>
+BFE9 8F38 # <CJK>
+BFEA 8F33 # <CJK>
+BFEB 8FA8 # <CJK>
+BFEC 8FA6 # <CJK>
+BFED 9075 # <CJK>
+BFEE 9074 # <CJK>
+BFEF 9078 # <CJK>
+BFF0 9072 # <CJK>
+BFF1 907C # <CJK>
+BFF2 907A # <CJK>
+BFF3 9134 # <CJK>
+BFF4 9192 # <CJK>
+BFF5 9320 # <CJK>
+BFF6 9336 # <CJK>
+BFF7 92F8 # <CJK>
+BFF8 9333 # <CJK>
+BFF9 932F # <CJK>
+BFFA 9322 # <CJK>
+BFFB 92FC # <CJK>
+BFFC 932B # <CJK>
+BFFD 9304 # <CJK>
+BFFE 931A # <CJK>
+C040 9310 # <CJK>
+C041 9326 # <CJK>
+C042 9321 # <CJK>
+C043 9315 # <CJK>
+C044 932E # <CJK>
+C045 9319 # <CJK>
+C046 95BB # <CJK>
+C047 96A7 # <CJK>
+C048 96A8 # <CJK>
+C049 96AA # <CJK>
+C04A 96D5 # <CJK>
+C04B 970E # <CJK>
+C04C 9711 # <CJK>
+C04D 9716 # <CJK>
+C04E 970D # <CJK>
+C04F 9713 # <CJK>
+C050 970F # <CJK>
+C051 975B # <CJK>
+C052 975C # <CJK>
+C053 9766 # <CJK>
+C054 9798 # <CJK>
+C055 9830 # <CJK>
+C056 9838 # <CJK>
+C057 983B # <CJK>
+C058 9837 # <CJK>
+C059 982D # <CJK>
+C05A 9839 # <CJK>
+C05B 9824 # <CJK>
+C05C 9910 # <CJK>
+C05D 9928 # <CJK>
+C05E 991E # <CJK>
+C05F 991B # <CJK>
+C060 9921 # <CJK>
+C061 991A # <CJK>
+C062 99ED # <CJK>
+C063 99E2 # <CJK>
+C064 99F1 # <CJK>
+C065 9AB8 # <CJK>
+C066 9ABC # <CJK>
+C067 9AFB # <CJK>
+C068 9AED # <CJK>
+C069 9B28 # <CJK>
+C06A 9B91 # <CJK>
+C06B 9D15 # <CJK>
+C06C 9D23 # <CJK>
+C06D 9D26 # <CJK>
+C06E 9D28 # <CJK>
+C06F 9D12 # <CJK>
+C070 9D1B # <CJK>
+C071 9ED8 # <CJK>
+C072 9ED4 # <CJK>
+C073 9F8D # <CJK>
+C074 9F9C # <CJK>
+C075 512A # <CJK>
+C076 511F # <CJK>
+C077 5121 # <CJK>
+C078 5132 # <CJK>
+C079 52F5 # <CJK>
+C07A 568E # <CJK>
+C07B 5680 # <CJK>
+C07C 5690 # <CJK>
+C07D 5685 # <CJK>
+C07E 5687 # <CJK>
+C0A1 568F # <CJK>
+C0A2 58D5 # <CJK>
+C0A3 58D3 # <CJK>
+C0A4 58D1 # <CJK>
+C0A5 58CE # <CJK>
+C0A6 5B30 # <CJK>
+C0A7 5B2A # <CJK>
+C0A8 5B24 # <CJK>
+C0A9 5B7A # <CJK>
+C0AA 5C37 # <CJK>
+C0AB 5C68 # <CJK>
+C0AC 5DBC # <CJK>
+C0AD 5DBA # <CJK>
+C0AE 5DBD # <CJK>
+C0AF 5DB8 # <CJK>
+C0B0 5E6B # <CJK>
+C0B1 5F4C # <CJK>
+C0B2 5FBD # <CJK>
+C0B3 61C9 # <CJK>
+C0B4 61C2 # <CJK>
+C0B5 61C7 # <CJK>
+C0B6 61E6 # <CJK>
+C0B7 61CB # <CJK>
+C0B8 6232 # <CJK>
+C0B9 6234 # <CJK>
+C0BA 64CE # <CJK>
+C0BB 64CA # <CJK>
+C0BC 64D8 # <CJK>
+C0BD 64E0 # <CJK>
+C0BE 64F0 # <CJK>
+C0BF 64E6 # <CJK>
+C0C0 64EC # <CJK>
+C0C1 64F1 # <CJK>
+C0C2 64E2 # <CJK>
+C0C3 64ED # <CJK>
+C0C4 6582 # <CJK>
+C0C5 6583 # <CJK>
+C0C6 66D9 # <CJK>
+C0C7 66D6 # <CJK>
+C0C8 6A80 # <CJK>
+C0C9 6A94 # <CJK>
+C0CA 6A84 # <CJK>
+C0CB 6AA2 # <CJK>
+C0CC 6A9C # <CJK>
+C0CD 6ADB # <CJK>
+C0CE 6AA3 # <CJK>
+C0CF 6A7E # <CJK>
+C0D0 6A97 # <CJK>
+C0D1 6A90 # <CJK>
+C0D2 6AA0 # <CJK>
+C0D3 6B5C # <CJK>
+C0D4 6BAE # <CJK>
+C0D5 6BDA # <CJK>
+C0D6 6C08 # <CJK>
+C0D7 6FD8 # <CJK>
+C0D8 6FF1 # <CJK>
+C0D9 6FDF # <CJK>
+C0DA 6FE0 # <CJK>
+C0DB 6FDB # <CJK>
+C0DC 6FE4 # <CJK>
+C0DD 6FEB # <CJK>
+C0DE 6FEF # <CJK>
+C0DF 6F80 # <CJK>
+C0E0 6FEC # <CJK>
+C0E1 6FE1 # <CJK>
+C0E2 6FE9 # <CJK>
+C0E3 6FD5 # <CJK>
+C0E4 6FEE # <CJK>
+C0E5 6FF0 # <CJK>
+C0E6 71E7 # <CJK>
+C0E7 71DF # <CJK>
+C0E8 71EE # <CJK>
+C0E9 71E6 # <CJK>
+C0EA 71E5 # <CJK>
+C0EB 71ED # <CJK>
+C0EC 71EC # <CJK>
+C0ED 71F4 # <CJK>
+C0EE 71E0 # <CJK>
+C0EF 7235 # <CJK>
+C0F0 7246 # <CJK>
+C0F1 7370 # <CJK>
+C0F2 7372 # <CJK>
+C0F3 74A9 # <CJK>
+C0F4 74B0 # <CJK>
+C0F5 74A6 # <CJK>
+C0F6 74A8 # <CJK>
+C0F7 7646 # <CJK>
+C0F8 7642 # <CJK>
+C0F9 764C # <CJK>
+C0FA 76EA # <CJK>
+C0FB 77B3 # <CJK>
+C0FC 77AA # <CJK>
+C0FD 77B0 # <CJK>
+C0FE 77AC # <CJK>
+C140 77A7 # <CJK>
+C141 77AD # <CJK>
+C142 77EF # <CJK>
+C143 78F7 # <CJK>
+C144 78FA # <CJK>
+C145 78F4 # <CJK>
+C146 78EF # <CJK>
+C147 7901 # <CJK>
+C148 79A7 # <CJK>
+C149 79AA # <CJK>
+C14A 7A57 # <CJK>
+C14B 7ABF # <CJK>
+C14C 7C07 # <CJK>
+C14D 7C0D # <CJK>
+C14E 7BFE # <CJK>
+C14F 7BF7 # <CJK>
+C150 7C0C # <CJK>
+C151 7BE0 # <CJK>
+C152 7CE0 # <CJK>
+C153 7CDC # <CJK>
+C154 7CDE # <CJK>
+C155 7CE2 # <CJK>
+C156 7CDF # <CJK>
+C157 7CD9 # <CJK>
+C158 7CDD # <CJK>
+C159 7E2E # <CJK>
+C15A 7E3E # <CJK>
+C15B 7E46 # <CJK>
+C15C 7E37 # <CJK>
+C15D 7E32 # <CJK>
+C15E 7E43 # <CJK>
+C15F 7E2B # <CJK>
+C160 7E3D # <CJK>
+C161 7E31 # <CJK>
+C162 7E45 # <CJK>
+C163 7E41 # <CJK>
+C164 7E34 # <CJK>
+C165 7E39 # <CJK>
+C166 7E48 # <CJK>
+C167 7E35 # <CJK>
+C168 7E3F # <CJK>
+C169 7E2F # <CJK>
+C16A 7F44 # <CJK>
+C16B 7FF3 # <CJK>
+C16C 7FFC # <CJK>
+C16D 8071 # <CJK>
+C16E 8072 # <CJK>
+C16F 8070 # <CJK>
+C170 806F # <CJK>
+C171 8073 # <CJK>
+C172 81C6 # <CJK>
+C173 81C3 # <CJK>
+C174 81BA # <CJK>
+C175 81C2 # <CJK>
+C176 81C0 # <CJK>
+C177 81BF # <CJK>
+C178 81BD # <CJK>
+C179 81C9 # <CJK>
+C17A 81BE # <CJK>
+C17B 81E8 # <CJK>
+C17C 8209 # <CJK>
+C17D 8271 # <CJK>
+C17E 85AA # <CJK>
+C1A1 8584 # <CJK>
+C1A2 857E # <CJK>
+C1A3 859C # <CJK>
+C1A4 8591 # <CJK>
+C1A5 8594 # <CJK>
+C1A6 85AF # <CJK>
+C1A7 859B # <CJK>
+C1A8 8587 # <CJK>
+C1A9 85A8 # <CJK>
+C1AA 858A # <CJK>
+C1AB 8667 # <CJK>
+C1AC 87C0 # <CJK>
+C1AD 87D1 # <CJK>
+C1AE 87B3 # <CJK>
+C1AF 87D2 # <CJK>
+C1B0 87C6 # <CJK>
+C1B1 87AB # <CJK>
+C1B2 87BB # <CJK>
+C1B3 87BA # <CJK>
+C1B4 87C8 # <CJK>
+C1B5 87CB # <CJK>
+C1B6 893B # <CJK>
+C1B7 8936 # <CJK>
+C1B8 8944 # <CJK>
+C1B9 8938 # <CJK>
+C1BA 893D # <CJK>
+C1BB 89AC # <CJK>
+C1BC 8B0E # <CJK>
+C1BD 8B17 # <CJK>
+C1BE 8B19 # <CJK>
+C1BF 8B1B # <CJK>
+C1C0 8B0A # <CJK>
+C1C1 8B20 # <CJK>
+C1C2 8B1D # <CJK>
+C1C3 8B04 # <CJK>
+C1C4 8B10 # <CJK>
+C1C5 8C41 # <CJK>
+C1C6 8C3F # <CJK>
+C1C7 8C73 # <CJK>
+C1C8 8CFA # <CJK>
+C1C9 8CFD # <CJK>
+C1CA 8CFC # <CJK>
+C1CB 8CF8 # <CJK>
+C1CC 8CFB # <CJK>
+C1CD 8DA8 # <CJK>
+C1CE 8E49 # <CJK>
+C1CF 8E4B # <CJK>
+C1D0 8E48 # <CJK>
+C1D1 8E4A # <CJK>
+C1D2 8F44 # <CJK>
+C1D3 8F3E # <CJK>
+C1D4 8F42 # <CJK>
+C1D5 8F45 # <CJK>
+C1D6 8F3F # <CJK>
+C1D7 907F # <CJK>
+C1D8 907D # <CJK>
+C1D9 9084 # <CJK>
+C1DA 9081 # <CJK>
+C1DB 9082 # <CJK>
+C1DC 9080 # <CJK>
+C1DD 9139 # <CJK>
+C1DE 91A3 # <CJK>
+C1DF 919E # <CJK>
+C1E0 919C # <CJK>
+C1E1 934D # <CJK>
+C1E2 9382 # <CJK>
+C1E3 9328 # <CJK>
+C1E4 9375 # <CJK>
+C1E5 934A # <CJK>
+C1E6 9365 # <CJK>
+C1E7 934B # <CJK>
+C1E8 9318 # <CJK>
+C1E9 937E # <CJK>
+C1EA 936C # <CJK>
+C1EB 935B # <CJK>
+C1EC 9370 # <CJK>
+C1ED 935A # <CJK>
+C1EE 9354 # <CJK>
+C1EF 95CA # <CJK>
+C1F0 95CB # <CJK>
+C1F1 95CC # <CJK>
+C1F2 95C8 # <CJK>
+C1F3 95C6 # <CJK>
+C1F4 96B1 # <CJK>
+C1F5 96B8 # <CJK>
+C1F6 96D6 # <CJK>
+C1F7 971C # <CJK>
+C1F8 971E # <CJK>
+C1F9 97A0 # <CJK>
+C1FA 97D3 # <CJK>
+C1FB 9846 # <CJK>
+C1FC 98B6 # <CJK>
+C1FD 9935 # <CJK>
+C1FE 9A01 # <CJK>
+C240 99FF # <CJK>
+C241 9BAE # <CJK>
+C242 9BAB # <CJK>
+C243 9BAA # <CJK>
+C244 9BAD # <CJK>
+C245 9D3B # <CJK>
+C246 9D3F # <CJK>
+C247 9E8B # <CJK>
+C248 9ECF # <CJK>
+C249 9EDE # <CJK>
+C24A 9EDC # <CJK>
+C24B 9EDD # <CJK>
+C24C 9EDB # <CJK>
+C24D 9F3E # <CJK>
+C24E 9F4B # <CJK>
+C24F 53E2 # <CJK>
+C250 5695 # <CJK>
+C251 56AE # <CJK>
+C252 58D9 # <CJK>
+C253 58D8 # <CJK>
+C254 5B38 # <CJK>
+C255 5F5D # <CJK>
+C256 61E3 # <CJK>
+C257 6233 # <CJK>
+C258 64F4 # <CJK>
+C259 64F2 # <CJK>
+C25A 64FE # <CJK>
+C25B 6506 # <CJK>
+C25C 64FA # <CJK>
+C25D 64FB # <CJK>
+C25E 64F7 # <CJK>
+C25F 65B7 # <CJK>
+C260 66DC # <CJK>
+C261 6726 # <CJK>
+C262 6AB3 # <CJK>
+C263 6AAC # <CJK>
+C264 6AC3 # <CJK>
+C265 6ABB # <CJK>
+C266 6AB8 # <CJK>
+C267 6AC2 # <CJK>
+C268 6AAE # <CJK>
+C269 6AAF # <CJK>
+C26A 6B5F # <CJK>
+C26B 6B78 # <CJK>
+C26C 6BAF # <CJK>
+C26D 7009 # <CJK>
+C26E 700B # <CJK>
+C26F 6FFE # <CJK>
+C270 7006 # <CJK>
+C271 6FFA # <CJK>
+C272 7011 # <CJK>
+C273 700F # <CJK>
+C274 71FB # <CJK>
+C275 71FC # <CJK>
+C276 71FE # <CJK>
+C277 71F8 # <CJK>
+C278 7377 # <CJK>
+C279 7375 # <CJK>
+C27A 74A7 # <CJK>
+C27B 74BF # <CJK>
+C27C 7515 # <CJK>
+C27D 7656 # <CJK>
+C27E 7658 # <CJK>
+C2A1 7652 # <CJK>
+C2A2 77BD # <CJK>
+C2A3 77BF # <CJK>
+C2A4 77BB # <CJK>
+C2A5 77BC # <CJK>
+C2A6 790E # <CJK>
+C2A7 79AE # <CJK>
+C2A8 7A61 # <CJK>
+C2A9 7A62 # <CJK>
+C2AA 7A60 # <CJK>
+C2AB 7AC4 # <CJK>
+C2AC 7AC5 # <CJK>
+C2AD 7C2B # <CJK>
+C2AE 7C27 # <CJK>
+C2AF 7C2A # <CJK>
+C2B0 7C1E # <CJK>
+C2B1 7C23 # <CJK>
+C2B2 7C21 # <CJK>
+C2B3 7CE7 # <CJK>
+C2B4 7E54 # <CJK>
+C2B5 7E55 # <CJK>
+C2B6 7E5E # <CJK>
+C2B7 7E5A # <CJK>
+C2B8 7E61 # <CJK>
+C2B9 7E52 # <CJK>
+C2BA 7E59 # <CJK>
+C2BB 7F48 # <CJK>
+C2BC 7FF9 # <CJK>
+C2BD 7FFB # <CJK>
+C2BE 8077 # <CJK>
+C2BF 8076 # <CJK>
+C2C0 81CD # <CJK>
+C2C1 81CF # <CJK>
+C2C2 820A # <CJK>
+C2C3 85CF # <CJK>
+C2C4 85A9 # <CJK>
+C2C5 85CD # <CJK>
+C2C6 85D0 # <CJK>
+C2C7 85C9 # <CJK>
+C2C8 85B0 # <CJK>
+C2C9 85BA # <CJK>
+C2CA 85B9 # <CJK>
+C2CB 85A6 # <CJK>
+C2CC 87EF # <CJK>
+C2CD 87EC # <CJK>
+C2CE 87F2 # <CJK>
+C2CF 87E0 # <CJK>
+C2D0 8986 # <CJK>
+C2D1 89B2 # <CJK>
+C2D2 89F4 # <CJK>
+C2D3 8B28 # <CJK>
+C2D4 8B39 # <CJK>
+C2D5 8B2C # <CJK>
+C2D6 8B2B # <CJK>
+C2D7 8C50 # <CJK>
+C2D8 8D05 # <CJK>
+C2D9 8E59 # <CJK>
+C2DA 8E63 # <CJK>
+C2DB 8E66 # <CJK>
+C2DC 8E64 # <CJK>
+C2DD 8E5F # <CJK>
+C2DE 8E55 # <CJK>
+C2DF 8EC0 # <CJK>
+C2E0 8F49 # <CJK>
+C2E1 8F4D # <CJK>
+C2E2 9087 # <CJK>
+C2E3 9083 # <CJK>
+C2E4 9088 # <CJK>
+C2E5 91AB # <CJK>
+C2E6 91AC # <CJK>
+C2E7 91D0 # <CJK>
+C2E8 9394 # <CJK>
+C2E9 938A # <CJK>
+C2EA 9396 # <CJK>
+C2EB 93A2 # <CJK>
+C2EC 93B3 # <CJK>
+C2ED 93AE # <CJK>
+C2EE 93AC # <CJK>
+C2EF 93B0 # <CJK>
+C2F0 9398 # <CJK>
+C2F1 939A # <CJK>
+C2F2 9397 # <CJK>
+C2F3 95D4 # <CJK>
+C2F4 95D6 # <CJK>
+C2F5 95D0 # <CJK>
+C2F6 95D5 # <CJK>
+C2F7 96E2 # <CJK>
+C2F8 96DC # <CJK>
+C2F9 96D9 # <CJK>
+C2FA 96DB # <CJK>
+C2FB 96DE # <CJK>
+C2FC 9724 # <CJK>
+C2FD 97A3 # <CJK>
+C2FE 97A6 # <CJK>
+C340 97AD # <CJK>
+C341 97F9 # <CJK>
+C342 984D # <CJK>
+C343 984F # <CJK>
+C344 984C # <CJK>
+C345 984E # <CJK>
+C346 9853 # <CJK>
+C347 98BA # <CJK>
+C348 993E # <CJK>
+C349 993F # <CJK>
+C34A 993D # <CJK>
+C34B 992E # <CJK>
+C34C 99A5 # <CJK>
+C34D 9A0E # <CJK>
+C34E 9AC1 # <CJK>
+C34F 9B03 # <CJK>
+C350 9B06 # <CJK>
+C351 9B4F # <CJK>
+C352 9B4E # <CJK>
+C353 9B4D # <CJK>
+C354 9BCA # <CJK>
+C355 9BC9 # <CJK>
+C356 9BFD # <CJK>
+C357 9BC8 # <CJK>
+C358 9BC0 # <CJK>
+C359 9D51 # <CJK>
+C35A 9D5D # <CJK>
+C35B 9D60 # <CJK>
+C35C 9EE0 # <CJK>
+C35D 9F15 # <CJK>
+C35E 9F2C # <CJK>
+C35F 5133 # <CJK>
+C360 56A5 # <CJK>
+C361 58DE # <CJK>
+C362 58DF # <CJK>
+C363 58E2 # <CJK>
+C364 5BF5 # <CJK>
+C365 9F90 # <CJK>
+C366 5EEC # <CJK>
+C367 61F2 # <CJK>
+C368 61F7 # <CJK>
+C369 61F6 # <CJK>
+C36A 61F5 # <CJK>
+C36B 6500 # <CJK>
+C36C 650F # <CJK>
+C36D 66E0 # <CJK>
+C36E 66DD # <CJK>
+C36F 6AE5 # <CJK>
+C370 6ADD # <CJK>
+C371 6ADA # <CJK>
+C372 6AD3 # <CJK>
+C373 701B # <CJK>
+C374 701F # <CJK>
+C375 7028 # <CJK>
+C376 701A # <CJK>
+C377 701D # <CJK>
+C378 7015 # <CJK>
+C379 7018 # <CJK>
+C37A 7206 # <CJK>
+C37B 720D # <CJK>
+C37C 7258 # <CJK>
+C37D 72A2 # <CJK>
+C37E 7378 # <CJK>
+C3A1 737A # <CJK>
+C3A2 74BD # <CJK>
+C3A3 74CA # <CJK>
+C3A4 74E3 # <CJK>
+C3A5 7587 # <CJK>
+C3A6 7586 # <CJK>
+C3A7 765F # <CJK>
+C3A8 7661 # <CJK>
+C3A9 77C7 # <CJK>
+C3AA 7919 # <CJK>
+C3AB 79B1 # <CJK>
+C3AC 7A6B # <CJK>
+C3AD 7A69 # <CJK>
+C3AE 7C3E # <CJK>
+C3AF 7C3F # <CJK>
+C3B0 7C38 # <CJK>
+C3B1 7C3D # <CJK>
+C3B2 7C37 # <CJK>
+C3B3 7C40 # <CJK>
+C3B4 7E6B # <CJK>
+C3B5 7E6D # <CJK>
+C3B6 7E79 # <CJK>
+C3B7 7E69 # <CJK>
+C3B8 7E6A # <CJK>
+C3B9 7F85 # <CJK>
+C3BA 7E73 # <CJK>
+C3BB 7FB6 # <CJK>
+C3BC 7FB9 # <CJK>
+C3BD 7FB8 # <CJK>
+C3BE 81D8 # <CJK>
+C3BF 85E9 # <CJK>
+C3C0 85DD # <CJK>
+C3C1 85EA # <CJK>
+C3C2 85D5 # <CJK>
+C3C3 85E4 # <CJK>
+C3C4 85E5 # <CJK>
+C3C5 85F7 # <CJK>
+C3C6 87FB # <CJK>
+C3C7 8805 # <CJK>
+C3C8 880D # <CJK>
+C3C9 87F9 # <CJK>
+C3CA 87FE # <CJK>
+C3CB 8960 # <CJK>
+C3CC 895F # <CJK>
+C3CD 8956 # <CJK>
+C3CE 895E # <CJK>
+C3CF 8B41 # <CJK>
+C3D0 8B5C # <CJK>
+C3D1 8B58 # <CJK>
+C3D2 8B49 # <CJK>
+C3D3 8B5A # <CJK>
+C3D4 8B4E # <CJK>
+C3D5 8B4F # <CJK>
+C3D6 8B46 # <CJK>
+C3D7 8B59 # <CJK>
+C3D8 8D08 # <CJK>
+C3D9 8D0A # <CJK>
+C3DA 8E7C # <CJK>
+C3DB 8E72 # <CJK>
+C3DC 8E87 # <CJK>
+C3DD 8E76 # <CJK>
+C3DE 8E6C # <CJK>
+C3DF 8E7A # <CJK>
+C3E0 8E74 # <CJK>
+C3E1 8F54 # <CJK>
+C3E2 8F4E # <CJK>
+C3E3 8FAD # <CJK>
+C3E4 908A # <CJK>
+C3E5 908B # <CJK>
+C3E6 91B1 # <CJK>
+C3E7 91AE # <CJK>
+C3E8 93E1 # <CJK>
+C3E9 93D1 # <CJK>
+C3EA 93DF # <CJK>
+C3EB 93C3 # <CJK>
+C3EC 93C8 # <CJK>
+C3ED 93DC # <CJK>
+C3EE 93DD # <CJK>
+C3EF 93D6 # <CJK>
+C3F0 93E2 # <CJK>
+C3F1 93CD # <CJK>
+C3F2 93D8 # <CJK>
+C3F3 93E4 # <CJK>
+C3F4 93D7 # <CJK>
+C3F5 93E8 # <CJK>
+C3F6 95DC # <CJK>
+C3F7 96B4 # <CJK>
+C3F8 96E3 # <CJK>
+C3F9 972A # <CJK>
+C3FA 9727 # <CJK>
+C3FB 9761 # <CJK>
+C3FC 97DC # <CJK>
+C3FD 97FB # <CJK>
+C3FE 985E # <CJK>
+C440 9858 # <CJK>
+C441 985B # <CJK>
+C442 98BC # <CJK>
+C443 9945 # <CJK>
+C444 9949 # <CJK>
+C445 9A16 # <CJK>
+C446 9A19 # <CJK>
+C447 9B0D # <CJK>
+C448 9BE8 # <CJK>
+C449 9BE7 # <CJK>
+C44A 9BD6 # <CJK>
+C44B 9BDB # <CJK>
+C44C 9D89 # <CJK>
+C44D 9D61 # <CJK>
+C44E 9D72 # <CJK>
+C44F 9D6A # <CJK>
+C450 9D6C # <CJK>
+C451 9E92 # <CJK>
+C452 9E97 # <CJK>
+C453 9E93 # <CJK>
+C454 9EB4 # <CJK>
+C455 52F8 # <CJK>
+C456 56A8 # <CJK>
+C457 56B7 # <CJK>
+C458 56B6 # <CJK>
+C459 56B4 # <CJK>
+C45A 56BC # <CJK>
+C45B 58E4 # <CJK>
+C45C 5B40 # <CJK>
+C45D 5B43 # <CJK>
+C45E 5B7D # <CJK>
+C45F 5BF6 # <CJK>
+C460 5DC9 # <CJK>
+C461 61F8 # <CJK>
+C462 61FA # <CJK>
+C463 6518 # <CJK>
+C464 6514 # <CJK>
+C465 6519 # <CJK>
+C466 66E6 # <CJK>
+C467 6727 # <CJK>
+C468 6AEC # <CJK>
+C469 703E # <CJK>
+C46A 7030 # <CJK>
+C46B 7032 # <CJK>
+C46C 7210 # <CJK>
+C46D 737B # <CJK>
+C46E 74CF # <CJK>
+C46F 7662 # <CJK>
+C470 7665 # <CJK>
+C471 7926 # <CJK>
+C472 792A # <CJK>
+C473 792C # <CJK>
+C474 792B # <CJK>
+C475 7AC7 # <CJK>
+C476 7AF6 # <CJK>
+C477 7C4C # <CJK>
+C478 7C43 # <CJK>
+C479 7C4D # <CJK>
+C47A 7CEF # <CJK>
+C47B 7CF0 # <CJK>
+C47C 8FAE # <CJK>
+C47D 7E7D # <CJK>
+C47E 7E7C # <CJK>
+C4A1 7E82 # <CJK>
+C4A2 7F4C # <CJK>
+C4A3 8000 # <CJK>
+C4A4 81DA # <CJK>
+C4A5 8266 # <CJK>
+C4A6 85FB # <CJK>
+C4A7 85F9 # <CJK>
+C4A8 8611 # <CJK>
+C4A9 85FA # <CJK>
+C4AA 8606 # <CJK>
+C4AB 860B # <CJK>
+C4AC 8607 # <CJK>
+C4AD 860A # <CJK>
+C4AE 8814 # <CJK>
+C4AF 8815 # <CJK>
+C4B0 8964 # <CJK>
+C4B1 89BA # <CJK>
+C4B2 89F8 # <CJK>
+C4B3 8B70 # <CJK>
+C4B4 8B6C # <CJK>
+C4B5 8B66 # <CJK>
+C4B6 8B6F # <CJK>
+C4B7 8B5F # <CJK>
+C4B8 8B6B # <CJK>
+C4B9 8D0F # <CJK>
+C4BA 8D0D # <CJK>
+C4BB 8E89 # <CJK>
+C4BC 8E81 # <CJK>
+C4BD 8E85 # <CJK>
+C4BE 8E82 # <CJK>
+C4BF 91B4 # <CJK>
+C4C0 91CB # <CJK>
+C4C1 9418 # <CJK>
+C4C2 9403 # <CJK>
+C4C3 93FD # <CJK>
+C4C4 95E1 # <CJK>
+C4C5 9730 # <CJK>
+C4C6 98C4 # <CJK>
+C4C7 9952 # <CJK>
+C4C8 9951 # <CJK>
+C4C9 99A8 # <CJK>
+C4CA 9A2B # <CJK>
+C4CB 9A30 # <CJK>
+C4CC 9A37 # <CJK>
+C4CD 9A35 # <CJK>
+C4CE 9C13 # <CJK>
+C4CF 9C0D # <CJK>
+C4D0 9E79 # <CJK>
+C4D1 9EB5 # <CJK>
+C4D2 9EE8 # <CJK>
+C4D3 9F2F # <CJK>
+C4D4 9F5F # <CJK>
+C4D5 9F63 # <CJK>
+C4D6 9F61 # <CJK>
+C4D7 5137 # <CJK>
+C4D8 5138 # <CJK>
+C4D9 56C1 # <CJK>
+C4DA 56C0 # <CJK>
+C4DB 56C2 # <CJK>
+C4DC 5914 # <CJK>
+C4DD 5C6C # <CJK>
+C4DE 5DCD # <CJK>
+C4DF 61FC # <CJK>
+C4E0 61FE # <CJK>
+C4E1 651D # <CJK>
+C4E2 651C # <CJK>
+C4E3 6595 # <CJK>
+C4E4 66E9 # <CJK>
+C4E5 6AFB # <CJK>
+C4E6 6B04 # <CJK>
+C4E7 6AFA # <CJK>
+C4E8 6BB2 # <CJK>
+C4E9 704C # <CJK>
+C4EA 721B # <CJK>
+C4EB 72A7 # <CJK>
+C4EC 74D6 # <CJK>
+C4ED 74D4 # <CJK>
+C4EE 7669 # <CJK>
+C4EF 77D3 # <CJK>
+C4F0 7C50 # <CJK>
+C4F1 7E8F # <CJK>
+C4F2 7E8C # <CJK>
+C4F3 7FBC # <CJK>
+C4F4 8617 # <CJK>
+C4F5 862D # <CJK>
+C4F6 861A # <CJK>
+C4F7 8823 # <CJK>
+C4F8 8822 # <CJK>
+C4F9 8821 # <CJK>
+C4FA 881F # <CJK>
+C4FB 896A # <CJK>
+C4FC 896C # <CJK>
+C4FD 89BD # <CJK>
+C4FE 8B74 # <CJK>
+C540 8B77 # <CJK>
+C541 8B7D # <CJK>
+C542 8D13 # <CJK>
+C543 8E8A # <CJK>
+C544 8E8D # <CJK>
+C545 8E8B # <CJK>
+C546 8F5F # <CJK>
+C547 8FAF # <CJK>
+C548 91BA # <CJK>
+C549 942E # <CJK>
+C54A 9433 # <CJK>
+C54B 9435 # <CJK>
+C54C 943A # <CJK>
+C54D 9438 # <CJK>
+C54E 9432 # <CJK>
+C54F 942B # <CJK>
+C550 95E2 # <CJK>
+C551 9738 # <CJK>
+C552 9739 # <CJK>
+C553 9732 # <CJK>
+C554 97FF # <CJK>
+C555 9867 # <CJK>
+C556 9865 # <CJK>
+C557 9957 # <CJK>
+C558 9A45 # <CJK>
+C559 9A43 # <CJK>
+C55A 9A40 # <CJK>
+C55B 9A3E # <CJK>
+C55C 9ACF # <CJK>
+C55D 9B54 # <CJK>
+C55E 9B51 # <CJK>
+C55F 9C2D # <CJK>
+C560 9C25 # <CJK>
+C561 9DAF # <CJK>
+C562 9DB4 # <CJK>
+C563 9DC2 # <CJK>
+C564 9DB8 # <CJK>
+C565 9E9D # <CJK>
+C566 9EEF # <CJK>
+C567 9F19 # <CJK>
+C568 9F5C # <CJK>
+C569 9F66 # <CJK>
+C56A 9F67 # <CJK>
+C56B 513C # <CJK>
+C56C 513B # <CJK>
+C56D 56C8 # <CJK>
+C56E 56CA # <CJK>
+C56F 56C9 # <CJK>
+C570 5B7F # <CJK>
+C571 5DD4 # <CJK>
+C572 5DD2 # <CJK>
+C573 5F4E # <CJK>
+C574 61FF # <CJK>
+C575 6524 # <CJK>
+C576 6B0A # <CJK>
+C577 6B61 # <CJK>
+C578 7051 # <CJK>
+C579 7058 # <CJK>
+C57A 7380 # <CJK>
+C57B 74E4 # <CJK>
+C57C 758A # <CJK>
+C57D 766E # <CJK>
+C57E 766C # <CJK>
+C5A1 79B3 # <CJK>
+C5A2 7C60 # <CJK>
+C5A3 7C5F # <CJK>
+C5A4 807E # <CJK>
+C5A5 807D # <CJK>
+C5A6 81DF # <CJK>
+C5A7 8972 # <CJK>
+C5A8 896F # <CJK>
+C5A9 89FC # <CJK>
+C5AA 8B80 # <CJK>
+C5AB 8D16 # <CJK>
+C5AC 8D17 # <CJK>
+C5AD 8E91 # <CJK>
+C5AE 8E93 # <CJK>
+C5AF 8F61 # <CJK>
+C5B0 9148 # <CJK>
+C5B1 9444 # <CJK>
+C5B2 9451 # <CJK>
+C5B3 9452 # <CJK>
+C5B4 973D # <CJK>
+C5B5 973E # <CJK>
+C5B6 97C3 # <CJK>
+C5B7 97C1 # <CJK>
+C5B8 986B # <CJK>
+C5B9 9955 # <CJK>
+C5BA 9A55 # <CJK>
+C5BB 9A4D # <CJK>
+C5BC 9AD2 # <CJK>
+C5BD 9B1A # <CJK>
+C5BE 9C49 # <CJK>
+C5BF 9C31 # <CJK>
+C5C0 9C3E # <CJK>
+C5C1 9C3B # <CJK>
+C5C2 9DD3 # <CJK>
+C5C3 9DD7 # <CJK>
+C5C4 9F34 # <CJK>
+C5C5 9F6C # <CJK>
+C5C6 9F6A # <CJK>
+C5C7 9F94 # <CJK>
+C5C8 56CC # <CJK>
+C5C9 5DD6 # <CJK>
+C5CA 6200 # <CJK>
+C5CB 6523 # <CJK>
+C5CC 652B # <CJK>
+C5CD 652A # <CJK>
+C5CE 66EC # <CJK>
+C5CF 6B10 # <CJK>
+C5D0 74DA # <CJK>
+C5D1 7ACA # <CJK>
+C5D2 7C64 # <CJK>
+C5D3 7C63 # <CJK>
+C5D4 7C65 # <CJK>
+C5D5 7E93 # <CJK>
+C5D6 7E96 # <CJK>
+C5D7 7E94 # <CJK>
+C5D8 81E2 # <CJK>
+C5D9 8638 # <CJK>
+C5DA 863F # <CJK>
+C5DB 8831 # <CJK>
+C5DC 8B8A # <CJK>
+C5DD 9090 # <CJK>
+C5DE 908F # <CJK>
+C5DF 9463 # <CJK>
+C5E0 9460 # <CJK>
+C5E1 9464 # <CJK>
+C5E2 9768 # <CJK>
+C5E3 986F # <CJK>
+C5E4 995C # <CJK>
+C5E5 9A5A # <CJK>
+C5E6 9A5B # <CJK>
+C5E7 9A57 # <CJK>
+C5E8 9AD3 # <CJK>
+C5E9 9AD4 # <CJK>
+C5EA 9AD1 # <CJK>
+C5EB 9C54 # <CJK>
+C5EC 9C57 # <CJK>
+C5ED 9C56 # <CJK>
+C5EE 9DE5 # <CJK>
+C5EF 9E9F # <CJK>
+C5F0 9EF4 # <CJK>
+C5F1 56D1 # <CJK>
+C5F2 58E9 # <CJK>
+C5F3 652C # <CJK>
+C5F4 705E # <CJK>
+C5F5 7671 # <CJK>
+C5F6 7672 # <CJK>
+C5F7 77D7 # <CJK>
+C5F8 7F50 # <CJK>
+C5F9 7F88 # <CJK>
+C5FA 8836 # <CJK>
+C5FB 8839 # <CJK>
+C5FC 8862 # <CJK>
+C5FD 8B93 # <CJK>
+C5FE 8B92 # <CJK>
+C640 8B96 # <CJK>
+C641 8277 # <CJK>
+C642 8D1B # <CJK>
+C643 91C0 # <CJK>
+C644 946A # <CJK>
+C645 9742 # <CJK>
+C646 9748 # <CJK>
+C647 9744 # <CJK>
+C648 97C6 # <CJK>
+C649 9870 # <CJK>
+C64A 9A5F # <CJK>
+C64B 9B22 # <CJK>
+C64C 9B58 # <CJK>
+C64D 9C5F # <CJK>
+C64E 9DF9 # <CJK>
+C64F 9DFA # <CJK>
+C650 9E7C # <CJK>
+C651 9E7D # <CJK>
+C652 9F07 # <CJK>
+C653 9F77 # <CJK>
+C654 9F72 # <CJK>
+C655 5EF3 # <CJK>
+C656 6B16 # <CJK>
+C657 7063 # <CJK>
+C658 7C6C # <CJK>
+C659 7C6E # <CJK>
+C65A 883B # <CJK>
+C65B 89C0 # <CJK>
+C65C 8EA1 # <CJK>
+C65D 91C1 # <CJK>
+C65E 9472 # <CJK>
+C65F 9470 # <CJK>
+C660 9871 # <CJK>
+C661 995E # <CJK>
+C662 9AD6 # <CJK>
+C663 9B23 # <CJK>
+C664 9ECC # <CJK>
+C665 7064 # <CJK>
+C666 77DA # <CJK>
+C667 8B9A # <CJK>
+C668 9477 # <CJK>
+C669 97C9 # <CJK>
+C66A 9A62 # <CJK>
+C66B 9A65 # <CJK>
+C66C 7E9C # <CJK>
+C66D 8B9C # <CJK>
+C66E 8EAA # <CJK>
+C66F 91C5 # <CJK>
+C670 947D # <CJK>
+C671 947E # <CJK>
+C672 947C # <CJK>
+C673 9C77 # <CJK>
+C674 9C78 # <CJK>
+C675 9EF7 # <CJK>
+C676 8C54 # <CJK>
+C677 947F # <CJK>
+C678 9E1A # <CJK>
+C679 7228 # <CJK>
+C67A 9A6A # <CJK>
+C67B 9B31 # <CJK>
+C67C 9E1B # <CJK>
+C67D 9E1E # <CJK>
+C67E 7C72 # <CJK>
+C6A1 30FE # KATAKANA VOICED ITERATION MARK
+C6A2 309D # HIRAGANA ITERATION MARK
+C6A3 309E # HIRAGANA VOICED ITERATION MARK
+C6A4 3005 # IDEOGRAPHIC ITERATION MARK
+C6A5 3041 # HIRAGANA LETTER SMALL A
+C6A6 3042 # HIRAGANA LETTER A
+C6A7 3043 # HIRAGANA LETTER SMALL I
+C6A8 3044 # HIRAGANA LETTER I
+C6A9 3045 # HIRAGANA LETTER SMALL U
+C6AA 3046 # HIRAGANA LETTER U
+C6AB 3047 # HIRAGANA LETTER SMALL E
+C6AC 3048 # HIRAGANA LETTER E
+C6AD 3049 # HIRAGANA LETTER SMALL O
+C6AE 304A # HIRAGANA LETTER O
+C6AF 304B # HIRAGANA LETTER KA
+C6B0 304C # HIRAGANA LETTER GA
+C6B1 304D # HIRAGANA LETTER KI
+C6B2 304E # HIRAGANA LETTER GI
+C6B3 304F # HIRAGANA LETTER KU
+C6B4 3050 # HIRAGANA LETTER GU
+C6B5 3051 # HIRAGANA LETTER KE
+C6B6 3052 # HIRAGANA LETTER GE
+C6B7 3053 # HIRAGANA LETTER KO
+C6B8 3054 # HIRAGANA LETTER GO
+C6B9 3055 # HIRAGANA LETTER SA
+C6BA 3056 # HIRAGANA LETTER ZA
+C6BB 3057 # HIRAGANA LETTER SI
+C6BC 3058 # HIRAGANA LETTER ZI
+C6BD 3059 # HIRAGANA LETTER SU
+C6BE 305A # HIRAGANA LETTER ZU
+C6BF 305B # HIRAGANA LETTER SE
+C6C0 305C # HIRAGANA LETTER ZE
+C6C1 305D # HIRAGANA LETTER SO
+C6C2 305E # HIRAGANA LETTER ZO
+C6C3 305F # HIRAGANA LETTER TA
+C6C4 3060 # HIRAGANA LETTER DA
+C6C5 3061 # HIRAGANA LETTER TI
+C6C6 3062 # HIRAGANA LETTER DI
+C6C7 3063 # HIRAGANA LETTER SMALL TU
+C6C8 3064 # HIRAGANA LETTER TU
+C6C9 3065 # HIRAGANA LETTER DU
+C6CA 3066 # HIRAGANA LETTER TE
+C6CB 3067 # HIRAGANA LETTER DE
+C6CC 3068 # HIRAGANA LETTER TO
+C6CD 3069 # HIRAGANA LETTER DO
+C6CE 306A # HIRAGANA LETTER NA
+C6CF 306B # HIRAGANA LETTER NI
+C6D0 306C # HIRAGANA LETTER NU
+C6D1 306D # HIRAGANA LETTER NE
+C6D2 306E # HIRAGANA LETTER NO
+C6D3 306F # HIRAGANA LETTER HA
+C6D4 3070 # HIRAGANA LETTER BA
+C6D5 3071 # HIRAGANA LETTER PA
+C6D6 3072 # HIRAGANA LETTER HI
+C6D7 3073 # HIRAGANA LETTER BI
+C6D8 3074 # HIRAGANA LETTER PI
+C6D9 3075 # HIRAGANA LETTER HU
+C6DA 3076 # HIRAGANA LETTER BU
+C6DB 3077 # HIRAGANA LETTER PU
+C6DC 3078 # HIRAGANA LETTER HE
+C6DD 3079 # HIRAGANA LETTER BE
+C6DE 307A # HIRAGANA LETTER PE
+C6DF 307B # HIRAGANA LETTER HO
+C6E0 307C # HIRAGANA LETTER BO
+C6E1 307D # HIRAGANA LETTER PO
+C6E2 307E # HIRAGANA LETTER MA
+C6E3 307F # HIRAGANA LETTER MI
+C6E4 3080 # HIRAGANA LETTER MU
+C6E5 3081 # HIRAGANA LETTER ME
+C6E6 3082 # HIRAGANA LETTER MO
+C6E7 3083 # HIRAGANA LETTER SMALL YA
+C6E8 3084 # HIRAGANA LETTER YA
+C6E9 3085 # HIRAGANA LETTER SMALL YU
+C6EA 3086 # HIRAGANA LETTER YU
+C6EB 3087 # HIRAGANA LETTER SMALL YO
+C6EC 3088 # HIRAGANA LETTER YO
+C6ED 3089 # HIRAGANA LETTER RA
+C6EE 308A # HIRAGANA LETTER RI
+C6EF 308B # HIRAGANA LETTER RU
+C6F0 308C # HIRAGANA LETTER RE
+C6F1 308D # HIRAGANA LETTER RO
+C6F2 308E # HIRAGANA LETTER SMALL WA
+C6F3 308F # HIRAGANA LETTER WA
+C6F4 3090 # HIRAGANA LETTER WI
+C6F5 3091 # HIRAGANA LETTER WE
+C6F6 3092 # HIRAGANA LETTER WO
+C6F7 3093 # HIRAGANA LETTER N
+C6F8 30A1 # KATAKANA LETTER SMALL A
+C6F9 30A2 # KATAKANA LETTER A
+C6FA 30A3 # KATAKANA LETTER SMALL I
+C6FB 30A4 # KATAKANA LETTER I
+C6FC 30A5 # KATAKANA LETTER SMALL U
+C6FD 30A6 # KATAKANA LETTER U
+C6FE 30A7 # KATAKANA LETTER SMALL E
+C740 30A8 # KATAKANA LETTER E
+C741 30A9 # KATAKANA LETTER SMALL O
+C742 30AA # KATAKANA LETTER O
+C743 30AB # KATAKANA LETTER KA
+C744 30AC # KATAKANA LETTER GA
+C745 30AD # KATAKANA LETTER KI
+C746 30AE # KATAKANA LETTER GI
+C747 30AF # KATAKANA LETTER KU
+C748 30B0 # KATAKANA LETTER GU
+C749 30B1 # KATAKANA LETTER KE
+C74A 30B2 # KATAKANA LETTER GE
+C74B 30B3 # KATAKANA LETTER KO
+C74C 30B4 # KATAKANA LETTER GO
+C74D 30B5 # KATAKANA LETTER SA
+C74E 30B6 # KATAKANA LETTER ZA
+C74F 30B7 # KATAKANA LETTER SI
+C750 30B8 # KATAKANA LETTER ZI
+C751 30B9 # KATAKANA LETTER SU
+C752 30BA # KATAKANA LETTER ZU
+C753 30BB # KATAKANA LETTER SE
+C754 30BC # KATAKANA LETTER ZE
+C755 30BD # KATAKANA LETTER SO
+C756 30BE # KATAKANA LETTER ZO
+C757 30BF # KATAKANA LETTER TA
+C758 30C0 # KATAKANA LETTER DA
+C759 30C1 # KATAKANA LETTER TI
+C75A 30C2 # KATAKANA LETTER DI
+C75B 30C3 # KATAKANA LETTER SMALL TU
+C75C 30C4 # KATAKANA LETTER TU
+C75D 30C5 # KATAKANA LETTER DU
+C75E 30C6 # KATAKANA LETTER TE
+C75F 30C7 # KATAKANA LETTER DE
+C760 30C8 # KATAKANA LETTER TO
+C761 30C9 # KATAKANA LETTER DO
+C762 30CA # KATAKANA LETTER NA
+C763 30CB # KATAKANA LETTER NI
+C764 30CC # KATAKANA LETTER NU
+C765 30CD # KATAKANA LETTER NE
+C766 30CE # KATAKANA LETTER NO
+C767 30CF # KATAKANA LETTER HA
+C768 30D0 # KATAKANA LETTER BA
+C769 30D1 # KATAKANA LETTER PA
+C76A 30D2 # KATAKANA LETTER HI
+C76B 30D3 # KATAKANA LETTER BI
+C76C 30D4 # KATAKANA LETTER PI
+C76D 30D5 # KATAKANA LETTER HU
+C76E 30D6 # KATAKANA LETTER BU
+C76F 30D7 # KATAKANA LETTER PU
+C770 30D8 # KATAKANA LETTER HE
+C771 30D9 # KATAKANA LETTER BE
+C772 30DA # KATAKANA LETTER PE
+C773 30DB # KATAKANA LETTER HO
+C774 30DC # KATAKANA LETTER BO
+C775 30DD # KATAKANA LETTER PO
+C776 30DE # KATAKANA LETTER MA
+C777 30DF # KATAKANA LETTER MI
+C778 30E0 # KATAKANA LETTER MU
+C779 30E1 # KATAKANA LETTER ME
+C77A 30E2 # KATAKANA LETTER MO
+C77B 30E3 # KATAKANA LETTER SMALL YA
+C77C 30E4 # KATAKANA LETTER YA
+C77D 30E5 # KATAKANA LETTER SMALL YU
+C77E 30E6 # KATAKANA LETTER YU
+C7A1 30E7 # KATAKANA LETTER SMALL YO
+C7A2 30E8 # KATAKANA LETTER YO
+C7A3 30E9 # KATAKANA LETTER RA
+C7A4 30EA # KATAKANA LETTER RI
+C7A5 30EB # KATAKANA LETTER RU
+C7A6 30EC # KATAKANA LETTER RE
+C7A7 30ED # KATAKANA LETTER RO
+C7A8 30EE # KATAKANA LETTER SMALL WA
+C7A9 30EF # KATAKANA LETTER WA
+C7AA 30F0 # KATAKANA LETTER WI
+C7AB 30F1 # KATAKANA LETTER WE
+C7AC 30F2 # KATAKANA LETTER WO
+C7AD 30F3 # KATAKANA LETTER N
+C7AE 30F4 # KATAKANA LETTER VU
+C7AF 30F5 # KATAKANA LETTER SMALL KA
+C7B0 30F6 # KATAKANA LETTER SMALL KE
+C7B1 0414 # CYRILLIC CAPITAL LETTER DE
+C7B2 0415 # CYRILLIC CAPITAL LETTER IE
+C7B3 0401 # CYRILLIC CAPITAL LETTER IO
+C7B4 0416 # CYRILLIC CAPITAL LETTER ZHE
+C7B5 0417 # CYRILLIC CAPITAL LETTER ZE
+C7B6 0418 # CYRILLIC CAPITAL LETTER I
+C7B7 0419 # CYRILLIC CAPITAL LETTER SHORT I
+C7B8 041A # CYRILLIC CAPITAL LETTER KA
+C7B9 041B # CYRILLIC CAPITAL LETTER EL
+C7BA 041C # CYRILLIC CAPITAL LETTER EM
+C7BB 0423 # CYRILLIC CAPITAL LETTER U
+C7BC 0424 # CYRILLIC CAPITAL LETTER EF
+C7BD 0425 # CYRILLIC CAPITAL LETTER HA
+C7BE 0426 # CYRILLIC CAPITAL LETTER TSE
+C7BF 0427 # CYRILLIC CAPITAL LETTER CHE
+C7C0 0428 # CYRILLIC CAPITAL LETTER SHA
+C7C1 0429 # CYRILLIC CAPITAL LETTER SHCHA
+C7C2 042A # CYRILLIC CAPITAL LETTER HARD SIGN
+C7C3 042B # CYRILLIC CAPITAL LETTER YERU
+C7C4 042C # CYRILLIC CAPITAL LETTER SOFT SIGN
+C7C5 042D # CYRILLIC CAPITAL LETTER E
+C7C6 042E # CYRILLIC CAPITAL LETTER YU
+C7C7 042F # CYRILLIC CAPITAL LETTER YA
+C7C8 0430 # CYRILLIC SMALL LETTER A
+C7C9 0431 # CYRILLIC SMALL LETTER BE
+C7CA 0432 # CYRILLIC SMALL LETTER VE
+C7CB 0433 # CYRILLIC SMALL LETTER GHE
+C7CC 0434 # CYRILLIC SMALL LETTER DE
+C7CD 0435 # CYRILLIC SMALL LETTER IE
+C7CE 0451 # CYRILLIC SMALL LETTER IO
+C7CF 0436 # CYRILLIC SMALL LETTER ZHE
+C7D0 0437 # CYRILLIC SMALL LETTER ZE
+C7D1 0438 # CYRILLIC SMALL LETTER I
+C7D2 0439 # CYRILLIC SMALL LETTER SHORT I
+C7D3 043A # CYRILLIC SMALL LETTER KA
+C7D4 043B # CYRILLIC SMALL LETTER EL
+C7D5 043C # CYRILLIC SMALL LETTER EM
+C7D6 043D # CYRILLIC SMALL LETTER EN
+C7D7 043E # CYRILLIC SMALL LETTER O
+C7D8 043F # CYRILLIC SMALL LETTER PE
+C7D9 0440 # CYRILLIC SMALL LETTER ER
+C7DA 0441 # CYRILLIC SMALL LETTER ES
+C7DB 0442 # CYRILLIC SMALL LETTER TE
+C7DC 0443 # CYRILLIC SMALL LETTER U
+C7DD 0444 # CYRILLIC SMALL LETTER EF
+C7DE 0445 # CYRILLIC SMALL LETTER HA
+C7DF 0446 # CYRILLIC SMALL LETTER TSE
+C7E0 0447 # CYRILLIC SMALL LETTER CHE
+C7E1 0448 # CYRILLIC SMALL LETTER SHA
+C7E2 0449 # CYRILLIC SMALL LETTER SHCHA
+C7E3 044A # CYRILLIC SMALL LETTER HARD SIGN
+C7E4 044B # CYRILLIC SMALL LETTER YERU
+C7E5 044C # CYRILLIC SMALL LETTER SOFT SIGN
+C7E6 044D # CYRILLIC SMALL LETTER E
+C7E7 044E # CYRILLIC SMALL LETTER YU
+C7E8 044F # CYRILLIC SMALL LETTER YA
+C7E9 2460 # CIRCLED DIGIT ONE
+C7EA 2461 # CIRCLED DIGIT TWO
+C7EB 2462 # CIRCLED DIGIT THREE
+C7EC 2463 # CIRCLED DIGIT FOUR
+C7ED 2464 # CIRCLED DIGIT FIVE
+C7EE 2465 # CIRCLED DIGIT SIX
+C7EF 2466 # CIRCLED DIGIT SEVEN
+C7F0 2467 # CIRCLED DIGIT EIGHT
+C7F1 2468 # CIRCLED DIGIT NINE
+C7F2 2469 # CIRCLED NUMBER TEN
+C7F3 2474 # PARENTHESIZED DIGIT ONE
+C7F4 2475 # PARENTHESIZED DIGIT TWO
+C7F5 2476 # PARENTHESIZED DIGIT THREE
+C7F6 2477 # PARENTHESIZED DIGIT FOUR
+C7F7 2478 # PARENTHESIZED DIGIT FIVE
+C7F8 2479 # PARENTHESIZED DIGIT SIX
+C7F9 247A # PARENTHESIZED DIGIT SEVEN
+C7FA 247B # PARENTHESIZED DIGIT EIGHT
+C7FB 247C # PARENTHESIZED DIGIT NINE
+C7FC 247D # PARENTHESIZED NUMBER TEN
+C940 4E42 # <CJK>
+C941 4E5C # <CJK>
+C942 51F5 # <CJK>
+C943 531A # <CJK>
+C944 5382 # <CJK>
+C945 4E07 # <CJK>
+C946 4E0C # <CJK>
+C947 4E47 # <CJK>
+C948 4E8D # <CJK>
+C949 56D7 # <CJK>
+C94A FA0C # CJK COMPATIBILITY IDEOGRAPH-FA0C
+C94B 5C6E # <CJK>
+C94C 5F73 # <CJK>
+C94D 4E0F # <CJK>
+C94E 5187 # <CJK>
+C94F 4E0E # <CJK>
+C950 4E2E # <CJK>
+C951 4E93 # <CJK>
+C952 4EC2 # <CJK>
+C953 4EC9 # <CJK>
+C954 4EC8 # <CJK>
+C955 5198 # <CJK>
+C956 52FC # <CJK>
+C957 536C # <CJK>
+C958 53B9 # <CJK>
+C959 5720 # <CJK>
+C95A 5903 # <CJK>
+C95B 592C # <CJK>
+C95C 5C10 # <CJK>
+C95D 5DFF # <CJK>
+C95E 65E1 # <CJK>
+C95F 6BB3 # <CJK>
+C960 6BCC # <CJK>
+C961 6C14 # <CJK>
+C962 723F # <CJK>
+C963 4E31 # <CJK>
+C964 4E3C # <CJK>
+C965 4EE8 # <CJK>
+C966 4EDC # <CJK>
+C967 4EE9 # <CJK>
+C968 4EE1 # <CJK>
+C969 4EDD # <CJK>
+C96A 4EDA # <CJK>
+C96B 520C # <CJK>
+C96C 531C # <CJK>
+C96D 534C # <CJK>
+C96E 5722 # <CJK>
+C96F 5723 # <CJK>
+C970 5917 # <CJK>
+C971 592F # <CJK>
+C972 5B81 # <CJK>
+C973 5B84 # <CJK>
+C974 5C12 # <CJK>
+C975 5C3B # <CJK>
+C976 5C74 # <CJK>
+C977 5C73 # <CJK>
+C978 5E04 # <CJK>
+C979 5E80 # <CJK>
+C97A 5E82 # <CJK>
+C97B 5FC9 # <CJK>
+C97C 6209 # <CJK>
+C97D 6250 # <CJK>
+C97E 6C15 # <CJK>
+C9A1 6C36 # <CJK>
+C9A2 6C43 # <CJK>
+C9A3 6C3F # <CJK>
+C9A4 6C3B # <CJK>
+C9A5 72AE # <CJK>
+C9A6 72B0 # <CJK>
+C9A7 738A # <CJK>
+C9A8 79B8 # <CJK>
+C9A9 808A # <CJK>
+C9AA 961E # <CJK>
+C9AB 4F0E # <CJK>
+C9AC 4F18 # <CJK>
+C9AD 4F2C # <CJK>
+C9AE 4EF5 # <CJK>
+C9AF 4F14 # <CJK>
+C9B0 4EF1 # <CJK>
+C9B1 4F00 # <CJK>
+C9B2 4EF7 # <CJK>
+C9B3 4F08 # <CJK>
+C9B4 4F1D # <CJK>
+C9B5 4F02 # <CJK>
+C9B6 4F05 # <CJK>
+C9B7 4F22 # <CJK>
+C9B8 4F13 # <CJK>
+C9B9 4F04 # <CJK>
+C9BA 4EF4 # <CJK>
+C9BB 4F12 # <CJK>
+C9BC 51B1 # <CJK>
+C9BD 5213 # <CJK>
+C9BE 5209 # <CJK>
+C9BF 5210 # <CJK>
+C9C0 52A6 # <CJK>
+C9C1 5322 # <CJK>
+C9C2 531F # <CJK>
+C9C3 534D # <CJK>
+C9C4 538A # <CJK>
+C9C5 5407 # <CJK>
+C9C6 56E1 # <CJK>
+C9C7 56DF # <CJK>
+C9C8 572E # <CJK>
+C9C9 572A # <CJK>
+C9CA 5734 # <CJK>
+C9CB 593C # <CJK>
+C9CC 5980 # <CJK>
+C9CD 597C # <CJK>
+C9CE 5985 # <CJK>
+C9CF 597B # <CJK>
+C9D0 597E # <CJK>
+C9D1 5977 # <CJK>
+C9D2 597F # <CJK>
+C9D3 5B56 # <CJK>
+C9D4 5C15 # <CJK>
+C9D5 5C25 # <CJK>
+C9D6 5C7C # <CJK>
+C9D7 5C7A # <CJK>
+C9D8 5C7B # <CJK>
+C9D9 5C7E # <CJK>
+C9DA 5DDF # <CJK>
+C9DB 5E75 # <CJK>
+C9DC 5E84 # <CJK>
+C9DD 5F02 # <CJK>
+C9DE 5F1A # <CJK>
+C9DF 5F74 # <CJK>
+C9E0 5FD5 # <CJK>
+C9E1 5FD4 # <CJK>
+C9E2 5FCF # <CJK>
+C9E3 625C # <CJK>
+C9E4 625E # <CJK>
+C9E5 6264 # <CJK>
+C9E6 6261 # <CJK>
+C9E7 6266 # <CJK>
+C9E8 6262 # <CJK>
+C9E9 6259 # <CJK>
+C9EA 6260 # <CJK>
+C9EB 625A # <CJK>
+C9EC 6265 # <CJK>
+C9ED 65EF # <CJK>
+C9EE 65EE # <CJK>
+C9EF 673E # <CJK>
+C9F0 6739 # <CJK>
+C9F1 6738 # <CJK>
+C9F2 673B # <CJK>
+C9F3 673A # <CJK>
+C9F4 673F # <CJK>
+C9F5 673C # <CJK>
+C9F6 6733 # <CJK>
+C9F7 6C18 # <CJK>
+C9F8 6C46 # <CJK>
+C9F9 6C52 # <CJK>
+C9FA 6C5C # <CJK>
+C9FB 6C4F # <CJK>
+C9FC 6C4A # <CJK>
+C9FD 6C54 # <CJK>
+C9FE 6C4B # <CJK>
+CA40 6C4C # <CJK>
+CA41 7071 # <CJK>
+CA42 725E # <CJK>
+CA43 72B4 # <CJK>
+CA44 72B5 # <CJK>
+CA45 738E # <CJK>
+CA46 752A # <CJK>
+CA47 767F # <CJK>
+CA48 7A75 # <CJK>
+CA49 7F51 # <CJK>
+CA4A 8278 # <CJK>
+CA4B 827C # <CJK>
+CA4C 8280 # <CJK>
+CA4D 827D # <CJK>
+CA4E 827F # <CJK>
+CA4F 864D # <CJK>
+CA50 897E # <CJK>
+CA51 9099 # <CJK>
+CA52 9097 # <CJK>
+CA53 9098 # <CJK>
+CA54 909B # <CJK>
+CA55 9094 # <CJK>
+CA56 9622 # <CJK>
+CA57 9624 # <CJK>
+CA58 9620 # <CJK>
+CA59 9623 # <CJK>
+CA5A 4F56 # <CJK>
+CA5B 4F3B # <CJK>
+CA5C 4F62 # <CJK>
+CA5D 4F49 # <CJK>
+CA5E 4F53 # <CJK>
+CA5F 4F64 # <CJK>
+CA60 4F3E # <CJK>
+CA61 4F67 # <CJK>
+CA62 4F52 # <CJK>
+CA63 4F5F # <CJK>
+CA64 4F41 # <CJK>
+CA65 4F58 # <CJK>
+CA66 4F2D # <CJK>
+CA67 4F33 # <CJK>
+CA68 4F3F # <CJK>
+CA69 4F61 # <CJK>
+CA6A 518F # <CJK>
+CA6B 51B9 # <CJK>
+CA6C 521C # <CJK>
+CA6D 521E # <CJK>
+CA6E 5221 # <CJK>
+CA6F 52AD # <CJK>
+CA70 52AE # <CJK>
+CA71 5309 # <CJK>
+CA72 5363 # <CJK>
+CA73 5372 # <CJK>
+CA74 538E # <CJK>
+CA75 538F # <CJK>
+CA76 5430 # <CJK>
+CA77 5437 # <CJK>
+CA78 542A # <CJK>
+CA79 5454 # <CJK>
+CA7A 5445 # <CJK>
+CA7B 5419 # <CJK>
+CA7C 541C # <CJK>
+CA7D 5425 # <CJK>
+CA7E 5418 # <CJK>
+CAA1 543D # <CJK>
+CAA2 544F # <CJK>
+CAA3 5441 # <CJK>
+CAA4 5428 # <CJK>
+CAA5 5424 # <CJK>
+CAA6 5447 # <CJK>
+CAA7 56EE # <CJK>
+CAA8 56E7 # <CJK>
+CAA9 56E5 # <CJK>
+CAAA 5741 # <CJK>
+CAAB 5745 # <CJK>
+CAAC 574C # <CJK>
+CAAD 5749 # <CJK>
+CAAE 574B # <CJK>
+CAAF 5752 # <CJK>
+CAB0 5906 # <CJK>
+CAB1 5940 # <CJK>
+CAB2 59A6 # <CJK>
+CAB3 5998 # <CJK>
+CAB4 59A0 # <CJK>
+CAB5 5997 # <CJK>
+CAB6 598E # <CJK>
+CAB7 59A2 # <CJK>
+CAB8 5990 # <CJK>
+CAB9 598F # <CJK>
+CABA 59A7 # <CJK>
+CABB 59A1 # <CJK>
+CABC 5B8E # <CJK>
+CABD 5B92 # <CJK>
+CABE 5C28 # <CJK>
+CABF 5C2A # <CJK>
+CAC0 5C8D # <CJK>
+CAC1 5C8F # <CJK>
+CAC2 5C88 # <CJK>
+CAC3 5C8B # <CJK>
+CAC4 5C89 # <CJK>
+CAC5 5C92 # <CJK>
+CAC6 5C8A # <CJK>
+CAC7 5C86 # <CJK>
+CAC8 5C93 # <CJK>
+CAC9 5C95 # <CJK>
+CACA 5DE0 # <CJK>
+CACB 5E0A # <CJK>
+CACC 5E0E # <CJK>
+CACD 5E8B # <CJK>
+CACE 5E89 # <CJK>
+CACF 5E8C # <CJK>
+CAD0 5E88 # <CJK>
+CAD1 5E8D # <CJK>
+CAD2 5F05 # <CJK>
+CAD3 5F1D # <CJK>
+CAD4 5F78 # <CJK>
+CAD5 5F76 # <CJK>
+CAD6 5FD2 # <CJK>
+CAD7 5FD1 # <CJK>
+CAD8 5FD0 # <CJK>
+CAD9 5FED # <CJK>
+CADA 5FE8 # <CJK>
+CADB 5FEE # <CJK>
+CADC 5FF3 # <CJK>
+CADD 5FE1 # <CJK>
+CADE 5FE4 # <CJK>
+CADF 5FE3 # <CJK>
+CAE0 5FFA # <CJK>
+CAE1 5FEF # <CJK>
+CAE2 5FF7 # <CJK>
+CAE3 5FFB # <CJK>
+CAE4 6000 # <CJK>
+CAE5 5FF4 # <CJK>
+CAE6 623A # <CJK>
+CAE7 6283 # <CJK>
+CAE8 628C # <CJK>
+CAE9 628E # <CJK>
+CAEA 628F # <CJK>
+CAEB 6294 # <CJK>
+CAEC 6287 # <CJK>
+CAED 6271 # <CJK>
+CAEE 627B # <CJK>
+CAEF 627A # <CJK>
+CAF0 6270 # <CJK>
+CAF1 6281 # <CJK>
+CAF2 6288 # <CJK>
+CAF3 6277 # <CJK>
+CAF4 627D # <CJK>
+CAF5 6272 # <CJK>
+CAF6 6274 # <CJK>
+CAF7 6537 # <CJK>
+CAF8 65F0 # <CJK>
+CAF9 65F4 # <CJK>
+CAFA 65F3 # <CJK>
+CAFB 65F2 # <CJK>
+CAFC 65F5 # <CJK>
+CAFD 6745 # <CJK>
+CAFE 6747 # <CJK>
+CB40 6759 # <CJK>
+CB41 6755 # <CJK>
+CB42 674C # <CJK>
+CB43 6748 # <CJK>
+CB44 675D # <CJK>
+CB45 674D # <CJK>
+CB46 675A # <CJK>
+CB47 674B # <CJK>
+CB48 6BD0 # <CJK>
+CB49 6C19 # <CJK>
+CB4A 6C1A # <CJK>
+CB4B 6C78 # <CJK>
+CB4C 6C67 # <CJK>
+CB4D 6C6B # <CJK>
+CB4E 6C84 # <CJK>
+CB4F 6C8B # <CJK>
+CB50 6C8F # <CJK>
+CB51 6C71 # <CJK>
+CB52 6C6F # <CJK>
+CB53 6C69 # <CJK>
+CB54 6C9A # <CJK>
+CB55 6C6D # <CJK>
+CB56 6C87 # <CJK>
+CB57 6C95 # <CJK>
+CB58 6C9C # <CJK>
+CB59 6C66 # <CJK>
+CB5A 6C73 # <CJK>
+CB5B 6C65 # <CJK>
+CB5C 6C7B # <CJK>
+CB5D 6C8E # <CJK>
+CB5E 7074 # <CJK>
+CB5F 707A # <CJK>
+CB60 7263 # <CJK>
+CB61 72BF # <CJK>
+CB62 72BD # <CJK>
+CB63 72C3 # <CJK>
+CB64 72C6 # <CJK>
+CB65 72C1 # <CJK>
+CB66 72BA # <CJK>
+CB67 72C5 # <CJK>
+CB68 7395 # <CJK>
+CB69 7397 # <CJK>
+CB6A 7393 # <CJK>
+CB6B 7394 # <CJK>
+CB6C 7392 # <CJK>
+CB6D 753A # <CJK>
+CB6E 7539 # <CJK>
+CB6F 7594 # <CJK>
+CB70 7595 # <CJK>
+CB71 7681 # <CJK>
+CB72 793D # <CJK>
+CB73 8034 # <CJK>
+CB74 8095 # <CJK>
+CB75 8099 # <CJK>
+CB76 8090 # <CJK>
+CB77 8092 # <CJK>
+CB78 809C # <CJK>
+CB79 8290 # <CJK>
+CB7A 828F # <CJK>
+CB7B 8285 # <CJK>
+CB7C 828E # <CJK>
+CB7D 8291 # <CJK>
+CB7E 8293 # <CJK>
+CBA1 828A # <CJK>
+CBA2 8283 # <CJK>
+CBA3 8284 # <CJK>
+CBA4 8C78 # <CJK>
+CBA5 8FC9 # <CJK>
+CBA6 8FBF # <CJK>
+CBA7 909F # <CJK>
+CBA8 90A1 # <CJK>
+CBA9 90A5 # <CJK>
+CBAA 909E # <CJK>
+CBAB 90A7 # <CJK>
+CBAC 90A0 # <CJK>
+CBAD 9630 # <CJK>
+CBAE 9628 # <CJK>
+CBAF 962F # <CJK>
+CBB0 962D # <CJK>
+CBB1 4E33 # <CJK>
+CBB2 4F98 # <CJK>
+CBB3 4F7C # <CJK>
+CBB4 4F85 # <CJK>
+CBB5 4F7D # <CJK>
+CBB6 4F80 # <CJK>
+CBB7 4F87 # <CJK>
+CBB8 4F76 # <CJK>
+CBB9 4F74 # <CJK>
+CBBA 4F89 # <CJK>
+CBBB 4F84 # <CJK>
+CBBC 4F77 # <CJK>
+CBBD 4F4C # <CJK>
+CBBE 4F97 # <CJK>
+CBBF 4F6A # <CJK>
+CBC0 4F9A # <CJK>
+CBC1 4F79 # <CJK>
+CBC2 4F81 # <CJK>
+CBC3 4F78 # <CJK>
+CBC4 4F90 # <CJK>
+CBC5 4F9C # <CJK>
+CBC6 4F94 # <CJK>
+CBC7 4F9E # <CJK>
+CBC8 4F92 # <CJK>
+CBC9 4F82 # <CJK>
+CBCA 4F95 # <CJK>
+CBCB 4F6B # <CJK>
+CBCC 4F6E # <CJK>
+CBCD 519E # <CJK>
+CBCE 51BC # <CJK>
+CBCF 51BE # <CJK>
+CBD0 5235 # <CJK>
+CBD1 5232 # <CJK>
+CBD2 5233 # <CJK>
+CBD3 5246 # <CJK>
+CBD4 5231 # <CJK>
+CBD5 52BC # <CJK>
+CBD6 530A # <CJK>
+CBD7 530B # <CJK>
+CBD8 533C # <CJK>
+CBD9 5392 # <CJK>
+CBDA 5394 # <CJK>
+CBDB 5487 # <CJK>
+CBDC 547F # <CJK>
+CBDD 5481 # <CJK>
+CBDE 5491 # <CJK>
+CBDF 5482 # <CJK>
+CBE0 5488 # <CJK>
+CBE1 546B # <CJK>
+CBE2 547A # <CJK>
+CBE3 547E # <CJK>
+CBE4 5465 # <CJK>
+CBE5 546C # <CJK>
+CBE6 5474 # <CJK>
+CBE7 5466 # <CJK>
+CBE8 548D # <CJK>
+CBE9 546F # <CJK>
+CBEA 5461 # <CJK>
+CBEB 5460 # <CJK>
+CBEC 5498 # <CJK>
+CBED 5463 # <CJK>
+CBEE 5467 # <CJK>
+CBEF 5464 # <CJK>
+CBF0 56F7 # <CJK>
+CBF1 56F9 # <CJK>
+CBF2 576F # <CJK>
+CBF3 5772 # <CJK>
+CBF4 576D # <CJK>
+CBF5 576B # <CJK>
+CBF6 5771 # <CJK>
+CBF7 5770 # <CJK>
+CBF8 5776 # <CJK>
+CBF9 5780 # <CJK>
+CBFA 5775 # <CJK>
+CBFB 577B # <CJK>
+CBFC 5773 # <CJK>
+CBFD 5774 # <CJK>
+CBFE 5762 # <CJK>
+CC40 5768 # <CJK>
+CC41 577D # <CJK>
+CC42 590C # <CJK>
+CC43 5945 # <CJK>
+CC44 59B5 # <CJK>
+CC45 59BA # <CJK>
+CC46 59CF # <CJK>
+CC47 59CE # <CJK>
+CC48 59B2 # <CJK>
+CC49 59CC # <CJK>
+CC4A 59C1 # <CJK>
+CC4B 59B6 # <CJK>
+CC4C 59BC # <CJK>
+CC4D 59C3 # <CJK>
+CC4E 59D6 # <CJK>
+CC4F 59B1 # <CJK>
+CC50 59BD # <CJK>
+CC51 59C0 # <CJK>
+CC52 59C8 # <CJK>
+CC53 59B4 # <CJK>
+CC54 59C7 # <CJK>
+CC55 5B62 # <CJK>
+CC56 5B65 # <CJK>
+CC57 5B93 # <CJK>
+CC58 5B95 # <CJK>
+CC59 5C44 # <CJK>
+CC5A 5C47 # <CJK>
+CC5B 5CAE # <CJK>
+CC5C 5CA4 # <CJK>
+CC5D 5CA0 # <CJK>
+CC5E 5CB5 # <CJK>
+CC5F 5CAF # <CJK>
+CC60 5CA8 # <CJK>
+CC61 5CAC # <CJK>
+CC62 5C9F # <CJK>
+CC63 5CA3 # <CJK>
+CC64 5CAD # <CJK>
+CC65 5CA2 # <CJK>
+CC66 5CAA # <CJK>
+CC67 5CA7 # <CJK>
+CC68 5C9D # <CJK>
+CC69 5CA5 # <CJK>
+CC6A 5CB6 # <CJK>
+CC6B 5CB0 # <CJK>
+CC6C 5CA6 # <CJK>
+CC6D 5E17 # <CJK>
+CC6E 5E14 # <CJK>
+CC6F 5E19 # <CJK>
+CC70 5F28 # <CJK>
+CC71 5F22 # <CJK>
+CC72 5F23 # <CJK>
+CC73 5F24 # <CJK>
+CC74 5F54 # <CJK>
+CC75 5F82 # <CJK>
+CC76 5F7E # <CJK>
+CC77 5F7D # <CJK>
+CC78 5FDE # <CJK>
+CC79 5FE5 # <CJK>
+CC7A 602D # <CJK>
+CC7B 6026 # <CJK>
+CC7C 6019 # <CJK>
+CC7D 6032 # <CJK>
+CC7E 600B # <CJK>
+CCA1 6034 # <CJK>
+CCA2 600A # <CJK>
+CCA3 6017 # <CJK>
+CCA4 6033 # <CJK>
+CCA5 601A # <CJK>
+CCA6 601E # <CJK>
+CCA7 602C # <CJK>
+CCA8 6022 # <CJK>
+CCA9 600D # <CJK>
+CCAA 6010 # <CJK>
+CCAB 602E # <CJK>
+CCAC 6013 # <CJK>
+CCAD 6011 # <CJK>
+CCAE 600C # <CJK>
+CCAF 6009 # <CJK>
+CCB0 601C # <CJK>
+CCB1 6214 # <CJK>
+CCB2 623D # <CJK>
+CCB3 62AD # <CJK>
+CCB4 62B4 # <CJK>
+CCB5 62D1 # <CJK>
+CCB6 62BE # <CJK>
+CCB7 62AA # <CJK>
+CCB8 62B6 # <CJK>
+CCB9 62CA # <CJK>
+CCBA 62AE # <CJK>
+CCBB 62B3 # <CJK>
+CCBC 62AF # <CJK>
+CCBD 62BB # <CJK>
+CCBE 62A9 # <CJK>
+CCBF 62B0 # <CJK>
+CCC0 62B8 # <CJK>
+CCC1 653D # <CJK>
+CCC2 65A8 # <CJK>
+CCC3 65BB # <CJK>
+CCC4 6609 # <CJK>
+CCC5 65FC # <CJK>
+CCC6 6604 # <CJK>
+CCC7 6612 # <CJK>
+CCC8 6608 # <CJK>
+CCC9 65FB # <CJK>
+CCCA 6603 # <CJK>
+CCCB 660B # <CJK>
+CCCC 660D # <CJK>
+CCCD 6605 # <CJK>
+CCCE 65FD # <CJK>
+CCCF 6611 # <CJK>
+CCD0 6610 # <CJK>
+CCD1 66F6 # <CJK>
+CCD2 670A # <CJK>
+CCD3 6785 # <CJK>
+CCD4 676C # <CJK>
+CCD5 678E # <CJK>
+CCD6 6792 # <CJK>
+CCD7 6776 # <CJK>
+CCD8 677B # <CJK>
+CCD9 6798 # <CJK>
+CCDA 6786 # <CJK>
+CCDB 6784 # <CJK>
+CCDC 6774 # <CJK>
+CCDD 678D # <CJK>
+CCDE 678C # <CJK>
+CCDF 677A # <CJK>
+CCE0 679F # <CJK>
+CCE1 6791 # <CJK>
+CCE2 6799 # <CJK>
+CCE3 6783 # <CJK>
+CCE4 677D # <CJK>
+CCE5 6781 # <CJK>
+CCE6 6778 # <CJK>
+CCE7 6779 # <CJK>
+CCE8 6794 # <CJK>
+CCE9 6B25 # <CJK>
+CCEA 6B80 # <CJK>
+CCEB 6B7E # <CJK>
+CCEC 6BDE # <CJK>
+CCED 6C1D # <CJK>
+CCEE 6C93 # <CJK>
+CCEF 6CEC # <CJK>
+CCF0 6CEB # <CJK>
+CCF1 6CEE # <CJK>
+CCF2 6CD9 # <CJK>
+CCF3 6CB6 # <CJK>
+CCF4 6CD4 # <CJK>
+CCF5 6CAD # <CJK>
+CCF6 6CE7 # <CJK>
+CCF7 6CB7 # <CJK>
+CCF8 6CD0 # <CJK>
+CCF9 6CC2 # <CJK>
+CCFA 6CBA # <CJK>
+CCFB 6CC3 # <CJK>
+CCFC 6CC6 # <CJK>
+CCFD 6CED # <CJK>
+CCFE 6CF2 # <CJK>
+CD40 6CD2 # <CJK>
+CD41 6CDD # <CJK>
+CD42 6CB4 # <CJK>
+CD43 6C8A # <CJK>
+CD44 6C9D # <CJK>
+CD45 6C80 # <CJK>
+CD46 6CDE # <CJK>
+CD47 6CC0 # <CJK>
+CD48 6D30 # <CJK>
+CD49 6CCD # <CJK>
+CD4A 6CC7 # <CJK>
+CD4B 6CB0 # <CJK>
+CD4C 6CF9 # <CJK>
+CD4D 6CCF # <CJK>
+CD4E 6CE9 # <CJK>
+CD4F 6CD1 # <CJK>
+CD50 7094 # <CJK>
+CD51 7098 # <CJK>
+CD52 7085 # <CJK>
+CD53 7093 # <CJK>
+CD54 7086 # <CJK>
+CD55 7084 # <CJK>
+CD56 7091 # <CJK>
+CD57 7096 # <CJK>
+CD58 7082 # <CJK>
+CD59 709A # <CJK>
+CD5A 7083 # <CJK>
+CD5B 726A # <CJK>
+CD5C 72D6 # <CJK>
+CD5D 72CB # <CJK>
+CD5E 72D8 # <CJK>
+CD5F 72C9 # <CJK>
+CD60 72DC # <CJK>
+CD61 72D2 # <CJK>
+CD62 72D4 # <CJK>
+CD63 72DA # <CJK>
+CD64 72CC # <CJK>
+CD65 72D1 # <CJK>
+CD66 73A4 # <CJK>
+CD67 73A1 # <CJK>
+CD68 73AD # <CJK>
+CD69 73A6 # <CJK>
+CD6A 73A2 # <CJK>
+CD6B 73A0 # <CJK>
+CD6C 73AC # <CJK>
+CD6D 739D # <CJK>
+CD6E 74DD # <CJK>
+CD6F 74E8 # <CJK>
+CD70 753F # <CJK>
+CD71 7540 # <CJK>
+CD72 753E # <CJK>
+CD73 758C # <CJK>
+CD74 7598 # <CJK>
+CD75 76AF # <CJK>
+CD76 76F3 # <CJK>
+CD77 76F1 # <CJK>
+CD78 76F0 # <CJK>
+CD79 76F5 # <CJK>
+CD7A 77F8 # <CJK>
+CD7B 77FC # <CJK>
+CD7C 77F9 # <CJK>
+CD7D 77FB # <CJK>
+CD7E 77FA # <CJK>
+CDA1 77F7 # <CJK>
+CDA2 7942 # <CJK>
+CDA3 793F # <CJK>
+CDA4 79C5 # <CJK>
+CDA5 7A78 # <CJK>
+CDA6 7A7B # <CJK>
+CDA7 7AFB # <CJK>
+CDA8 7C75 # <CJK>
+CDA9 7CFD # <CJK>
+CDAA 8035 # <CJK>
+CDAB 808F # <CJK>
+CDAC 80AE # <CJK>
+CDAD 80A3 # <CJK>
+CDAE 80B8 # <CJK>
+CDAF 80B5 # <CJK>
+CDB0 80AD # <CJK>
+CDB1 8220 # <CJK>
+CDB2 82A0 # <CJK>
+CDB3 82C0 # <CJK>
+CDB4 82AB # <CJK>
+CDB5 829A # <CJK>
+CDB6 8298 # <CJK>
+CDB7 829B # <CJK>
+CDB8 82B5 # <CJK>
+CDB9 82A7 # <CJK>
+CDBA 82AE # <CJK>
+CDBB 82BC # <CJK>
+CDBC 829E # <CJK>
+CDBD 82BA # <CJK>
+CDBE 82B4 # <CJK>
+CDBF 82A8 # <CJK>
+CDC0 82A1 # <CJK>
+CDC1 82A9 # <CJK>
+CDC2 82C2 # <CJK>
+CDC3 82A4 # <CJK>
+CDC4 82C3 # <CJK>
+CDC5 82B6 # <CJK>
+CDC6 82A2 # <CJK>
+CDC7 8670 # <CJK>
+CDC8 866F # <CJK>
+CDC9 866D # <CJK>
+CDCA 866E # <CJK>
+CDCB 8C56 # <CJK>
+CDCC 8FD2 # <CJK>
+CDCD 8FCB # <CJK>
+CDCE 8FD3 # <CJK>
+CDCF 8FCD # <CJK>
+CDD0 8FD6 # <CJK>
+CDD1 8FD5 # <CJK>
+CDD2 8FD7 # <CJK>
+CDD3 90B2 # <CJK>
+CDD4 90B4 # <CJK>
+CDD5 90AF # <CJK>
+CDD6 90B3 # <CJK>
+CDD7 90B0 # <CJK>
+CDD8 9639 # <CJK>
+CDD9 963D # <CJK>
+CDDA 963C # <CJK>
+CDDB 963A # <CJK>
+CDDC 9643 # <CJK>
+CDDD 4FCD # <CJK>
+CDDE 4FC5 # <CJK>
+CDDF 4FD3 # <CJK>
+CDE0 4FB2 # <CJK>
+CDE1 4FC9 # <CJK>
+CDE2 4FCB # <CJK>
+CDE3 4FC1 # <CJK>
+CDE4 4FD4 # <CJK>
+CDE5 4FDC # <CJK>
+CDE6 4FD9 # <CJK>
+CDE7 4FBB # <CJK>
+CDE8 4FB3 # <CJK>
+CDE9 4FDB # <CJK>
+CDEA 4FC7 # <CJK>
+CDEB 4FD6 # <CJK>
+CDEC 4FBA # <CJK>
+CDED 4FC0 # <CJK>
+CDEE 4FB9 # <CJK>
+CDEF 4FEC # <CJK>
+CDF0 5244 # <CJK>
+CDF1 5249 # <CJK>
+CDF2 52C0 # <CJK>
+CDF3 52C2 # <CJK>
+CDF4 533D # <CJK>
+CDF5 537C # <CJK>
+CDF6 5397 # <CJK>
+CDF7 5396 # <CJK>
+CDF8 5399 # <CJK>
+CDF9 5398 # <CJK>
+CDFA 54BA # <CJK>
+CDFB 54A1 # <CJK>
+CDFC 54AD # <CJK>
+CDFD 54A5 # <CJK>
+CDFE 54CF # <CJK>
+CE40 54C3 # <CJK>
+CE41 830D # <CJK>
+CE42 54B7 # <CJK>
+CE43 54AE # <CJK>
+CE44 54D6 # <CJK>
+CE45 54B6 # <CJK>
+CE46 54C5 # <CJK>
+CE47 54C6 # <CJK>
+CE48 54A0 # <CJK>
+CE49 5470 # <CJK>
+CE4A 54BC # <CJK>
+CE4B 54A2 # <CJK>
+CE4C 54BE # <CJK>
+CE4D 5472 # <CJK>
+CE4E 54DE # <CJK>
+CE4F 54B0 # <CJK>
+CE50 57B5 # <CJK>
+CE51 579E # <CJK>
+CE52 579F # <CJK>
+CE53 57A4 # <CJK>
+CE54 578C # <CJK>
+CE55 5797 # <CJK>
+CE56 579D # <CJK>
+CE57 579B # <CJK>
+CE58 5794 # <CJK>
+CE59 5798 # <CJK>
+CE5A 578F # <CJK>
+CE5B 5799 # <CJK>
+CE5C 57A5 # <CJK>
+CE5D 579A # <CJK>
+CE5E 5795 # <CJK>
+CE5F 58F4 # <CJK>
+CE60 590D # <CJK>
+CE61 5953 # <CJK>
+CE62 59E1 # <CJK>
+CE63 59DE # <CJK>
+CE64 59EE # <CJK>
+CE65 5A00 # <CJK>
+CE66 59F1 # <CJK>
+CE67 59DD # <CJK>
+CE68 59FA # <CJK>
+CE69 59FD # <CJK>
+CE6A 59FC # <CJK>
+CE6B 59F6 # <CJK>
+CE6C 59E4 # <CJK>
+CE6D 59F2 # <CJK>
+CE6E 59F7 # <CJK>
+CE6F 59DB # <CJK>
+CE70 59E9 # <CJK>
+CE71 59F3 # <CJK>
+CE72 59F5 # <CJK>
+CE73 59E0 # <CJK>
+CE74 59FE # <CJK>
+CE75 59F4 # <CJK>
+CE76 59ED # <CJK>
+CE77 5BA8 # <CJK>
+CE78 5C4C # <CJK>
+CE79 5CD0 # <CJK>
+CE7A 5CD8 # <CJK>
+CE7B 5CCC # <CJK>
+CE7C 5CD7 # <CJK>
+CE7D 5CCB # <CJK>
+CE7E 5CDB # <CJK>
+CEA1 5CDE # <CJK>
+CEA2 5CDA # <CJK>
+CEA3 5CC9 # <CJK>
+CEA4 5CC7 # <CJK>
+CEA5 5CCA # <CJK>
+CEA6 5CD6 # <CJK>
+CEA7 5CD3 # <CJK>
+CEA8 5CD4 # <CJK>
+CEA9 5CCF # <CJK>
+CEAA 5CC8 # <CJK>
+CEAB 5CC6 # <CJK>
+CEAC 5CCE # <CJK>
+CEAD 5CDF # <CJK>
+CEAE 5CF8 # <CJK>
+CEAF 5DF9 # <CJK>
+CEB0 5E21 # <CJK>
+CEB1 5E22 # <CJK>
+CEB2 5E23 # <CJK>
+CEB3 5E20 # <CJK>
+CEB4 5E24 # <CJK>
+CEB5 5EB0 # <CJK>
+CEB6 5EA4 # <CJK>
+CEB7 5EA2 # <CJK>
+CEB8 5E9B # <CJK>
+CEB9 5EA3 # <CJK>
+CEBA 5EA5 # <CJK>
+CEBB 5F07 # <CJK>
+CEBC 5F2E # <CJK>
+CEBD 5F56 # <CJK>
+CEBE 5F86 # <CJK>
+CEBF 6037 # <CJK>
+CEC0 6039 # <CJK>
+CEC1 6054 # <CJK>
+CEC2 6072 # <CJK>
+CEC3 605E # <CJK>
+CEC4 6045 # <CJK>
+CEC5 6053 # <CJK>
+CEC6 6047 # <CJK>
+CEC7 6049 # <CJK>
+CEC8 605B # <CJK>
+CEC9 604C # <CJK>
+CECA 6040 # <CJK>
+CECB 6042 # <CJK>
+CECC 605F # <CJK>
+CECD 6024 # <CJK>
+CECE 6044 # <CJK>
+CECF 6058 # <CJK>
+CED0 6066 # <CJK>
+CED1 606E # <CJK>
+CED2 6242 # <CJK>
+CED3 6243 # <CJK>
+CED4 62CF # <CJK>
+CED5 630D # <CJK>
+CED6 630B # <CJK>
+CED7 62F5 # <CJK>
+CED8 630E # <CJK>
+CED9 6303 # <CJK>
+CEDA 62EB # <CJK>
+CEDB 62F9 # <CJK>
+CEDC 630F # <CJK>
+CEDD 630C # <CJK>
+CEDE 62F8 # <CJK>
+CEDF 62F6 # <CJK>
+CEE0 6300 # <CJK>
+CEE1 6313 # <CJK>
+CEE2 6314 # <CJK>
+CEE3 62FA # <CJK>
+CEE4 6315 # <CJK>
+CEE5 62FB # <CJK>
+CEE6 62F0 # <CJK>
+CEE7 6541 # <CJK>
+CEE8 6543 # <CJK>
+CEE9 65AA # <CJK>
+CEEA 65BF # <CJK>
+CEEB 6636 # <CJK>
+CEEC 6621 # <CJK>
+CEED 6632 # <CJK>
+CEEE 6635 # <CJK>
+CEEF 661C # <CJK>
+CEF0 6626 # <CJK>
+CEF1 6622 # <CJK>
+CEF2 6633 # <CJK>
+CEF3 662B # <CJK>
+CEF4 663A # <CJK>
+CEF5 661D # <CJK>
+CEF6 6634 # <CJK>
+CEF7 6639 # <CJK>
+CEF8 662E # <CJK>
+CEF9 670F # <CJK>
+CEFA 6710 # <CJK>
+CEFB 67C1 # <CJK>
+CEFC 67F2 # <CJK>
+CEFD 67C8 # <CJK>
+CEFE 67BA # <CJK>
+CF40 67DC # <CJK>
+CF41 67BB # <CJK>
+CF42 67F8 # <CJK>
+CF43 67D8 # <CJK>
+CF44 67C0 # <CJK>
+CF45 67B7 # <CJK>
+CF46 67C5 # <CJK>
+CF47 67EB # <CJK>
+CF48 67E4 # <CJK>
+CF49 67DF # <CJK>
+CF4A 67B5 # <CJK>
+CF4B 67CD # <CJK>
+CF4C 67B3 # <CJK>
+CF4D 67F7 # <CJK>
+CF4E 67F6 # <CJK>
+CF4F 67EE # <CJK>
+CF50 67E3 # <CJK>
+CF51 67C2 # <CJK>
+CF52 67B9 # <CJK>
+CF53 67CE # <CJK>
+CF54 67E7 # <CJK>
+CF55 67F0 # <CJK>
+CF56 67B2 # <CJK>
+CF57 67FC # <CJK>
+CF58 67C6 # <CJK>
+CF59 67ED # <CJK>
+CF5A 67CC # <CJK>
+CF5B 67AE # <CJK>
+CF5C 67E6 # <CJK>
+CF5D 67DB # <CJK>
+CF5E 67FA # <CJK>
+CF5F 67C9 # <CJK>
+CF60 67CA # <CJK>
+CF61 67C3 # <CJK>
+CF62 67EA # <CJK>
+CF63 67CB # <CJK>
+CF64 6B28 # <CJK>
+CF65 6B82 # <CJK>
+CF66 6B84 # <CJK>
+CF67 6BB6 # <CJK>
+CF68 6BD6 # <CJK>
+CF69 6BD8 # <CJK>
+CF6A 6BE0 # <CJK>
+CF6B 6C20 # <CJK>
+CF6C 6C21 # <CJK>
+CF6D 6D28 # <CJK>
+CF6E 6D34 # <CJK>
+CF6F 6D2D # <CJK>
+CF70 6D1F # <CJK>
+CF71 6D3C # <CJK>
+CF72 6D3F # <CJK>
+CF73 6D12 # <CJK>
+CF74 6D0A # <CJK>
+CF75 6CDA # <CJK>
+CF76 6D33 # <CJK>
+CF77 6D04 # <CJK>
+CF78 6D19 # <CJK>
+CF79 6D3A # <CJK>
+CF7A 6D1A # <CJK>
+CF7B 6D11 # <CJK>
+CF7C 6D00 # <CJK>
+CF7D 6D1D # <CJK>
+CF7E 6D42 # <CJK>
+CFA1 6D01 # <CJK>
+CFA2 6D18 # <CJK>
+CFA3 6D37 # <CJK>
+CFA4 6D03 # <CJK>
+CFA5 6D0F # <CJK>
+CFA6 6D40 # <CJK>
+CFA7 6D07 # <CJK>
+CFA8 6D20 # <CJK>
+CFA9 6D2C # <CJK>
+CFAA 6D08 # <CJK>
+CFAB 6D22 # <CJK>
+CFAC 6D09 # <CJK>
+CFAD 6D10 # <CJK>
+CFAE 70B7 # <CJK>
+CFAF 709F # <CJK>
+CFB0 70BE # <CJK>
+CFB1 70B1 # <CJK>
+CFB2 70B0 # <CJK>
+CFB3 70A1 # <CJK>
+CFB4 70B4 # <CJK>
+CFB5 70B5 # <CJK>
+CFB6 70A9 # <CJK>
+CFB7 7241 # <CJK>
+CFB8 7249 # <CJK>
+CFB9 724A # <CJK>
+CFBA 726C # <CJK>
+CFBB 7270 # <CJK>
+CFBC 7273 # <CJK>
+CFBD 726E # <CJK>
+CFBE 72CA # <CJK>
+CFBF 72E4 # <CJK>
+CFC0 72E8 # <CJK>
+CFC1 72EB # <CJK>
+CFC2 72DF # <CJK>
+CFC3 72EA # <CJK>
+CFC4 72E6 # <CJK>
+CFC5 72E3 # <CJK>
+CFC6 7385 # <CJK>
+CFC7 73CC # <CJK>
+CFC8 73C2 # <CJK>
+CFC9 73C8 # <CJK>
+CFCA 73C5 # <CJK>
+CFCB 73B9 # <CJK>
+CFCC 73B6 # <CJK>
+CFCD 73B5 # <CJK>
+CFCE 73B4 # <CJK>
+CFCF 73EB # <CJK>
+CFD0 73BF # <CJK>
+CFD1 73C7 # <CJK>
+CFD2 73BE # <CJK>
+CFD3 73C3 # <CJK>
+CFD4 73C6 # <CJK>
+CFD5 73B8 # <CJK>
+CFD6 73CB # <CJK>
+CFD7 74EC # <CJK>
+CFD8 74EE # <CJK>
+CFD9 752E # <CJK>
+CFDA 7547 # <CJK>
+CFDB 7548 # <CJK>
+CFDC 75A7 # <CJK>
+CFDD 75AA # <CJK>
+CFDE 7679 # <CJK>
+CFDF 76C4 # <CJK>
+CFE0 7708 # <CJK>
+CFE1 7703 # <CJK>
+CFE2 7704 # <CJK>
+CFE3 7705 # <CJK>
+CFE4 770A # <CJK>
+CFE5 76F7 # <CJK>
+CFE6 76FB # <CJK>
+CFE7 76FA # <CJK>
+CFE8 77E7 # <CJK>
+CFE9 77E8 # <CJK>
+CFEA 7806 # <CJK>
+CFEB 7811 # <CJK>
+CFEC 7812 # <CJK>
+CFED 7805 # <CJK>
+CFEE 7810 # <CJK>
+CFEF 780F # <CJK>
+CFF0 780E # <CJK>
+CFF1 7809 # <CJK>
+CFF2 7803 # <CJK>
+CFF3 7813 # <CJK>
+CFF4 794A # <CJK>
+CFF5 794C # <CJK>
+CFF6 794B # <CJK>
+CFF7 7945 # <CJK>
+CFF8 7944 # <CJK>
+CFF9 79D5 # <CJK>
+CFFA 79CD # <CJK>
+CFFB 79CF # <CJK>
+CFFC 79D6 # <CJK>
+CFFD 79CE # <CJK>
+CFFE 7A80 # <CJK>
+D040 7A7E # <CJK>
+D041 7AD1 # <CJK>
+D042 7B00 # <CJK>
+D043 7B01 # <CJK>
+D044 7C7A # <CJK>
+D045 7C78 # <CJK>
+D046 7C79 # <CJK>
+D047 7C7F # <CJK>
+D048 7C80 # <CJK>
+D049 7C81 # <CJK>
+D04A 7D03 # <CJK>
+D04B 7D08 # <CJK>
+D04C 7D01 # <CJK>
+D04D 7F58 # <CJK>
+D04E 7F91 # <CJK>
+D04F 7F8D # <CJK>
+D050 7FBE # <CJK>
+D051 8007 # <CJK>
+D052 800E # <CJK>
+D053 800F # <CJK>
+D054 8014 # <CJK>
+D055 8037 # <CJK>
+D056 80D8 # <CJK>
+D057 80C7 # <CJK>
+D058 80E0 # <CJK>
+D059 80D1 # <CJK>
+D05A 80C8 # <CJK>
+D05B 80C2 # <CJK>
+D05C 80D0 # <CJK>
+D05D 80C5 # <CJK>
+D05E 80E3 # <CJK>
+D05F 80D9 # <CJK>
+D060 80DC # <CJK>
+D061 80CA # <CJK>
+D062 80D5 # <CJK>
+D063 80C9 # <CJK>
+D064 80CF # <CJK>
+D065 80D7 # <CJK>
+D066 80E6 # <CJK>
+D067 80CD # <CJK>
+D068 81FF # <CJK>
+D069 8221 # <CJK>
+D06A 8294 # <CJK>
+D06B 82D9 # <CJK>
+D06C 82FE # <CJK>
+D06D 82F9 # <CJK>
+D06E 8307 # <CJK>
+D06F 82E8 # <CJK>
+D070 8300 # <CJK>
+D071 82D5 # <CJK>
+D072 833A # <CJK>
+D073 82EB # <CJK>
+D074 82D6 # <CJK>
+D075 82F4 # <CJK>
+D076 82EC # <CJK>
+D077 82E1 # <CJK>
+D078 82F2 # <CJK>
+D079 82F5 # <CJK>
+D07A 830C # <CJK>
+D07B 82FB # <CJK>
+D07C 82F6 # <CJK>
+D07D 82F0 # <CJK>
+D07E 82EA # <CJK>
+D0A1 82E4 # <CJK>
+D0A2 82E0 # <CJK>
+D0A3 82FA # <CJK>
+D0A4 82F3 # <CJK>
+D0A5 82ED # <CJK>
+D0A6 8677 # <CJK>
+D0A7 8674 # <CJK>
+D0A8 867C # <CJK>
+D0A9 8673 # <CJK>
+D0AA 8841 # <CJK>
+D0AB 884E # <CJK>
+D0AC 8867 # <CJK>
+D0AD 886A # <CJK>
+D0AE 8869 # <CJK>
+D0AF 89D3 # <CJK>
+D0B0 8A04 # <CJK>
+D0B1 8A07 # <CJK>
+D0B2 8D72 # <CJK>
+D0B3 8FE3 # <CJK>
+D0B4 8FE1 # <CJK>
+D0B5 8FEE # <CJK>
+D0B6 8FE0 # <CJK>
+D0B7 90F1 # <CJK>
+D0B8 90BD # <CJK>
+D0B9 90BF # <CJK>
+D0BA 90D5 # <CJK>
+D0BB 90C5 # <CJK>
+D0BC 90BE # <CJK>
+D0BD 90C7 # <CJK>
+D0BE 90CB # <CJK>
+D0BF 90C8 # <CJK>
+D0C0 91D4 # <CJK>
+D0C1 91D3 # <CJK>
+D0C2 9654 # <CJK>
+D0C3 964F # <CJK>
+D0C4 9651 # <CJK>
+D0C5 9653 # <CJK>
+D0C6 964A # <CJK>
+D0C7 964E # <CJK>
+D0C8 501E # <CJK>
+D0C9 5005 # <CJK>
+D0CA 5007 # <CJK>
+D0CB 5013 # <CJK>
+D0CC 5022 # <CJK>
+D0CD 5030 # <CJK>
+D0CE 501B # <CJK>
+D0CF 4FF5 # <CJK>
+D0D0 4FF4 # <CJK>
+D0D1 5033 # <CJK>
+D0D2 5037 # <CJK>
+D0D3 502C # <CJK>
+D0D4 4FF6 # <CJK>
+D0D5 4FF7 # <CJK>
+D0D6 5017 # <CJK>
+D0D7 501C # <CJK>
+D0D8 5020 # <CJK>
+D0D9 5027 # <CJK>
+D0DA 5035 # <CJK>
+D0DB 502F # <CJK>
+D0DC 5031 # <CJK>
+D0DD 500E # <CJK>
+D0DE 515A # <CJK>
+D0DF 5194 # <CJK>
+D0E0 5193 # <CJK>
+D0E1 51CA # <CJK>
+D0E2 51C4 # <CJK>
+D0E3 51C5 # <CJK>
+D0E4 51C8 # <CJK>
+D0E5 51CE # <CJK>
+D0E6 5261 # <CJK>
+D0E7 525A # <CJK>
+D0E8 5252 # <CJK>
+D0E9 525E # <CJK>
+D0EA 525F # <CJK>
+D0EB 5255 # <CJK>
+D0EC 5262 # <CJK>
+D0ED 52CD # <CJK>
+D0EE 530E # <CJK>
+D0EF 539E # <CJK>
+D0F0 5526 # <CJK>
+D0F1 54E2 # <CJK>
+D0F2 5517 # <CJK>
+D0F3 5512 # <CJK>
+D0F4 54E7 # <CJK>
+D0F5 54F3 # <CJK>
+D0F6 54E4 # <CJK>
+D0F7 551A # <CJK>
+D0F8 54FF # <CJK>
+D0F9 5504 # <CJK>
+D0FA 5508 # <CJK>
+D0FB 54EB # <CJK>
+D0FC 5511 # <CJK>
+D0FD 5505 # <CJK>
+D0FE 54F1 # <CJK>
+D140 550A # <CJK>
+D141 54FB # <CJK>
+D142 54F7 # <CJK>
+D143 54F8 # <CJK>
+D144 54E0 # <CJK>
+D145 550E # <CJK>
+D146 5503 # <CJK>
+D147 550B # <CJK>
+D148 5701 # <CJK>
+D149 5702 # <CJK>
+D14A 57CC # <CJK>
+D14B 5832 # <CJK>
+D14C 57D5 # <CJK>
+D14D 57D2 # <CJK>
+D14E 57BA # <CJK>
+D14F 57C6 # <CJK>
+D150 57BD # <CJK>
+D151 57BC # <CJK>
+D152 57B8 # <CJK>
+D153 57B6 # <CJK>
+D154 57BF # <CJK>
+D155 57C7 # <CJK>
+D156 57D0 # <CJK>
+D157 57B9 # <CJK>
+D158 57C1 # <CJK>
+D159 590E # <CJK>
+D15A 594A # <CJK>
+D15B 5A19 # <CJK>
+D15C 5A16 # <CJK>
+D15D 5A2D # <CJK>
+D15E 5A2E # <CJK>
+D15F 5A15 # <CJK>
+D160 5A0F # <CJK>
+D161 5A17 # <CJK>
+D162 5A0A # <CJK>
+D163 5A1E # <CJK>
+D164 5A33 # <CJK>
+D165 5B6C # <CJK>
+D166 5BA7 # <CJK>
+D167 5BAD # <CJK>
+D168 5BAC # <CJK>
+D169 5C03 # <CJK>
+D16A 5C56 # <CJK>
+D16B 5C54 # <CJK>
+D16C 5CEC # <CJK>
+D16D 5CFF # <CJK>
+D16E 5CEE # <CJK>
+D16F 5CF1 # <CJK>
+D170 5CF7 # <CJK>
+D171 5D00 # <CJK>
+D172 5CF9 # <CJK>
+D173 5E29 # <CJK>
+D174 5E28 # <CJK>
+D175 5EA8 # <CJK>
+D176 5EAE # <CJK>
+D177 5EAA # <CJK>
+D178 5EAC # <CJK>
+D179 5F33 # <CJK>
+D17A 5F30 # <CJK>
+D17B 5F67 # <CJK>
+D17C 605D # <CJK>
+D17D 605A # <CJK>
+D17E 6067 # <CJK>
+D1A1 6041 # <CJK>
+D1A2 60A2 # <CJK>
+D1A3 6088 # <CJK>
+D1A4 6080 # <CJK>
+D1A5 6092 # <CJK>
+D1A6 6081 # <CJK>
+D1A7 609D # <CJK>
+D1A8 6083 # <CJK>
+D1A9 6095 # <CJK>
+D1AA 609B # <CJK>
+D1AB 6097 # <CJK>
+D1AC 6087 # <CJK>
+D1AD 609C # <CJK>
+D1AE 608E # <CJK>
+D1AF 6219 # <CJK>
+D1B0 6246 # <CJK>
+D1B1 62F2 # <CJK>
+D1B2 6310 # <CJK>
+D1B3 6356 # <CJK>
+D1B4 632C # <CJK>
+D1B5 6344 # <CJK>
+D1B6 6345 # <CJK>
+D1B7 6336 # <CJK>
+D1B8 6343 # <CJK>
+D1B9 63E4 # <CJK>
+D1BA 6339 # <CJK>
+D1BB 634B # <CJK>
+D1BC 634A # <CJK>
+D1BD 633C # <CJK>
+D1BE 6329 # <CJK>
+D1BF 6341 # <CJK>
+D1C0 6334 # <CJK>
+D1C1 6358 # <CJK>
+D1C2 6354 # <CJK>
+D1C3 6359 # <CJK>
+D1C4 632D # <CJK>
+D1C5 6347 # <CJK>
+D1C6 6333 # <CJK>
+D1C7 635A # <CJK>
+D1C8 6351 # <CJK>
+D1C9 6338 # <CJK>
+D1CA 6357 # <CJK>
+D1CB 6340 # <CJK>
+D1CC 6348 # <CJK>
+D1CD 654A # <CJK>
+D1CE 6546 # <CJK>
+D1CF 65C6 # <CJK>
+D1D0 65C3 # <CJK>
+D1D1 65C4 # <CJK>
+D1D2 65C2 # <CJK>
+D1D3 664A # <CJK>
+D1D4 665F # <CJK>
+D1D5 6647 # <CJK>
+D1D6 6651 # <CJK>
+D1D7 6712 # <CJK>
+D1D8 6713 # <CJK>
+D1D9 681F # <CJK>
+D1DA 681A # <CJK>
+D1DB 6849 # <CJK>
+D1DC 6832 # <CJK>
+D1DD 6833 # <CJK>
+D1DE 683B # <CJK>
+D1DF 684B # <CJK>
+D1E0 684F # <CJK>
+D1E1 6816 # <CJK>
+D1E2 6831 # <CJK>
+D1E3 681C # <CJK>
+D1E4 6835 # <CJK>
+D1E5 682B # <CJK>
+D1E6 682D # <CJK>
+D1E7 682F # <CJK>
+D1E8 684E # <CJK>
+D1E9 6844 # <CJK>
+D1EA 6834 # <CJK>
+D1EB 681D # <CJK>
+D1EC 6812 # <CJK>
+D1ED 6814 # <CJK>
+D1EE 6826 # <CJK>
+D1EF 6828 # <CJK>
+D1F0 682E # <CJK>
+D1F1 684D # <CJK>
+D1F2 683A # <CJK>
+D1F3 6825 # <CJK>
+D1F4 6820 # <CJK>
+D1F5 6B2C # <CJK>
+D1F6 6B2F # <CJK>
+D1F7 6B2D # <CJK>
+D1F8 6B31 # <CJK>
+D1F9 6B34 # <CJK>
+D1FA 6B6D # <CJK>
+D1FB 8082 # <CJK>
+D1FC 6B88 # <CJK>
+D1FD 6BE6 # <CJK>
+D1FE 6BE4 # <CJK>
+D240 6BE8 # <CJK>
+D241 6BE3 # <CJK>
+D242 6BE2 # <CJK>
+D243 6BE7 # <CJK>
+D244 6C25 # <CJK>
+D245 6D7A # <CJK>
+D246 6D63 # <CJK>
+D247 6D64 # <CJK>
+D248 6D76 # <CJK>
+D249 6D0D # <CJK>
+D24A 6D61 # <CJK>
+D24B 6D92 # <CJK>
+D24C 6D58 # <CJK>
+D24D 6D62 # <CJK>
+D24E 6D6D # <CJK>
+D24F 6D6F # <CJK>
+D250 6D91 # <CJK>
+D251 6D8D # <CJK>
+D252 6DEF # <CJK>
+D253 6D7F # <CJK>
+D254 6D86 # <CJK>
+D255 6D5E # <CJK>
+D256 6D67 # <CJK>
+D257 6D60 # <CJK>
+D258 6D97 # <CJK>
+D259 6D70 # <CJK>
+D25A 6D7C # <CJK>
+D25B 6D5F # <CJK>
+D25C 6D82 # <CJK>
+D25D 6D98 # <CJK>
+D25E 6D2F # <CJK>
+D25F 6D68 # <CJK>
+D260 6D8B # <CJK>
+D261 6D7E # <CJK>
+D262 6D80 # <CJK>
+D263 6D84 # <CJK>
+D264 6D16 # <CJK>
+D265 6D83 # <CJK>
+D266 6D7B # <CJK>
+D267 6D7D # <CJK>
+D268 6D75 # <CJK>
+D269 6D90 # <CJK>
+D26A 70DC # <CJK>
+D26B 70D3 # <CJK>
+D26C 70D1 # <CJK>
+D26D 70DD # <CJK>
+D26E 70CB # <CJK>
+D26F 7F39 # <CJK>
+D270 70E2 # <CJK>
+D271 70D7 # <CJK>
+D272 70D2 # <CJK>
+D273 70DE # <CJK>
+D274 70E0 # <CJK>
+D275 70D4 # <CJK>
+D276 70CD # <CJK>
+D277 70C5 # <CJK>
+D278 70C6 # <CJK>
+D279 70C7 # <CJK>
+D27A 70DA # <CJK>
+D27B 70CE # <CJK>
+D27C 70E1 # <CJK>
+D27D 7242 # <CJK>
+D27E 7278 # <CJK>
+D2A1 7277 # <CJK>
+D2A2 7276 # <CJK>
+D2A3 7300 # <CJK>
+D2A4 72FA # <CJK>
+D2A5 72F4 # <CJK>
+D2A6 72FE # <CJK>
+D2A7 72F6 # <CJK>
+D2A8 72F3 # <CJK>
+D2A9 72FB # <CJK>
+D2AA 7301 # <CJK>
+D2AB 73D3 # <CJK>
+D2AC 73D9 # <CJK>
+D2AD 73E5 # <CJK>
+D2AE 73D6 # <CJK>
+D2AF 73BC # <CJK>
+D2B0 73E7 # <CJK>
+D2B1 73E3 # <CJK>
+D2B2 73E9 # <CJK>
+D2B3 73DC # <CJK>
+D2B4 73D2 # <CJK>
+D2B5 73DB # <CJK>
+D2B6 73D4 # <CJK>
+D2B7 73DD # <CJK>
+D2B8 73DA # <CJK>
+D2B9 73D7 # <CJK>
+D2BA 73D8 # <CJK>
+D2BB 73E8 # <CJK>
+D2BC 74DE # <CJK>
+D2BD 74DF # <CJK>
+D2BE 74F4 # <CJK>
+D2BF 74F5 # <CJK>
+D2C0 7521 # <CJK>
+D2C1 755B # <CJK>
+D2C2 755F # <CJK>
+D2C3 75B0 # <CJK>
+D2C4 75C1 # <CJK>
+D2C5 75BB # <CJK>
+D2C6 75C4 # <CJK>
+D2C7 75C0 # <CJK>
+D2C8 75BF # <CJK>
+D2C9 75B6 # <CJK>
+D2CA 75BA # <CJK>
+D2CB 768A # <CJK>
+D2CC 76C9 # <CJK>
+D2CD 771D # <CJK>
+D2CE 771B # <CJK>
+D2CF 7710 # <CJK>
+D2D0 7713 # <CJK>
+D2D1 7712 # <CJK>
+D2D2 7723 # <CJK>
+D2D3 7711 # <CJK>
+D2D4 7715 # <CJK>
+D2D5 7719 # <CJK>
+D2D6 771A # <CJK>
+D2D7 7722 # <CJK>
+D2D8 7727 # <CJK>
+D2D9 7823 # <CJK>
+D2DA 782C # <CJK>
+D2DB 7822 # <CJK>
+D2DC 7835 # <CJK>
+D2DD 782F # <CJK>
+D2DE 7828 # <CJK>
+D2DF 782E # <CJK>
+D2E0 782B # <CJK>
+D2E1 7821 # <CJK>
+D2E2 7829 # <CJK>
+D2E3 7833 # <CJK>
+D2E4 782A # <CJK>
+D2E5 7831 # <CJK>
+D2E6 7954 # <CJK>
+D2E7 795B # <CJK>
+D2E8 794F # <CJK>
+D2E9 795C # <CJK>
+D2EA 7953 # <CJK>
+D2EB 7952 # <CJK>
+D2EC 7951 # <CJK>
+D2ED 79EB # <CJK>
+D2EE 79EC # <CJK>
+D2EF 79E0 # <CJK>
+D2F0 79EE # <CJK>
+D2F1 79ED # <CJK>
+D2F2 79EA # <CJK>
+D2F3 79DC # <CJK>
+D2F4 79DE # <CJK>
+D2F5 79DD # <CJK>
+D2F6 7A86 # <CJK>
+D2F7 7A89 # <CJK>
+D2F8 7A85 # <CJK>
+D2F9 7A8B # <CJK>
+D2FA 7A8C # <CJK>
+D2FB 7A8A # <CJK>
+D2FC 7A87 # <CJK>
+D2FD 7AD8 # <CJK>
+D2FE 7B10 # <CJK>
+D340 7B04 # <CJK>
+D341 7B13 # <CJK>
+D342 7B05 # <CJK>
+D343 7B0F # <CJK>
+D344 7B08 # <CJK>
+D345 7B0A # <CJK>
+D346 7B0E # <CJK>
+D347 7B09 # <CJK>
+D348 7B12 # <CJK>
+D349 7C84 # <CJK>
+D34A 7C91 # <CJK>
+D34B 7C8A # <CJK>
+D34C 7C8C # <CJK>
+D34D 7C88 # <CJK>
+D34E 7C8D # <CJK>
+D34F 7C85 # <CJK>
+D350 7D1E # <CJK>
+D351 7D1D # <CJK>
+D352 7D11 # <CJK>
+D353 7D0E # <CJK>
+D354 7D18 # <CJK>
+D355 7D16 # <CJK>
+D356 7D13 # <CJK>
+D357 7D1F # <CJK>
+D358 7D12 # <CJK>
+D359 7D0F # <CJK>
+D35A 7D0C # <CJK>
+D35B 7F5C # <CJK>
+D35C 7F61 # <CJK>
+D35D 7F5E # <CJK>
+D35E 7F60 # <CJK>
+D35F 7F5D # <CJK>
+D360 7F5B # <CJK>
+D361 7F96 # <CJK>
+D362 7F92 # <CJK>
+D363 7FC3 # <CJK>
+D364 7FC2 # <CJK>
+D365 7FC0 # <CJK>
+D366 8016 # <CJK>
+D367 803E # <CJK>
+D368 8039 # <CJK>
+D369 80FA # <CJK>
+D36A 80F2 # <CJK>
+D36B 80F9 # <CJK>
+D36C 80F5 # <CJK>
+D36D 8101 # <CJK>
+D36E 80FB # <CJK>
+D36F 8100 # <CJK>
+D370 8201 # <CJK>
+D371 822F # <CJK>
+D372 8225 # <CJK>
+D373 8333 # <CJK>
+D374 832D # <CJK>
+D375 8344 # <CJK>
+D376 8319 # <CJK>
+D377 8351 # <CJK>
+D378 8325 # <CJK>
+D379 8356 # <CJK>
+D37A 833F # <CJK>
+D37B 8341 # <CJK>
+D37C 8326 # <CJK>
+D37D 831C # <CJK>
+D37E 8322 # <CJK>
+D3A1 8342 # <CJK>
+D3A2 834E # <CJK>
+D3A3 831B # <CJK>
+D3A4 832A # <CJK>
+D3A5 8308 # <CJK>
+D3A6 833C # <CJK>
+D3A7 834D # <CJK>
+D3A8 8316 # <CJK>
+D3A9 8324 # <CJK>
+D3AA 8320 # <CJK>
+D3AB 8337 # <CJK>
+D3AC 832F # <CJK>
+D3AD 8329 # <CJK>
+D3AE 8347 # <CJK>
+D3AF 8345 # <CJK>
+D3B0 834C # <CJK>
+D3B1 8353 # <CJK>
+D3B2 831E # <CJK>
+D3B3 832C # <CJK>
+D3B4 834B # <CJK>
+D3B5 8327 # <CJK>
+D3B6 8348 # <CJK>
+D3B7 8653 # <CJK>
+D3B8 8652 # <CJK>
+D3B9 86A2 # <CJK>
+D3BA 86A8 # <CJK>
+D3BB 8696 # <CJK>
+D3BC 868D # <CJK>
+D3BD 8691 # <CJK>
+D3BE 869E # <CJK>
+D3BF 8687 # <CJK>
+D3C0 8697 # <CJK>
+D3C1 8686 # <CJK>
+D3C2 868B # <CJK>
+D3C3 869A # <CJK>
+D3C4 8685 # <CJK>
+D3C5 86A5 # <CJK>
+D3C6 8699 # <CJK>
+D3C7 86A1 # <CJK>
+D3C8 86A7 # <CJK>
+D3C9 8695 # <CJK>
+D3CA 8698 # <CJK>
+D3CB 868E # <CJK>
+D3CC 869D # <CJK>
+D3CD 8690 # <CJK>
+D3CE 8694 # <CJK>
+D3CF 8843 # <CJK>
+D3D0 8844 # <CJK>
+D3D1 886D # <CJK>
+D3D2 8875 # <CJK>
+D3D3 8876 # <CJK>
+D3D4 8872 # <CJK>
+D3D5 8880 # <CJK>
+D3D6 8871 # <CJK>
+D3D7 887F # <CJK>
+D3D8 886F # <CJK>
+D3D9 8883 # <CJK>
+D3DA 887E # <CJK>
+D3DB 8874 # <CJK>
+D3DC 887C # <CJK>
+D3DD 8A12 # <CJK>
+D3DE 8C47 # <CJK>
+D3DF 8C57 # <CJK>
+D3E0 8C7B # <CJK>
+D3E1 8CA4 # <CJK>
+D3E2 8CA3 # <CJK>
+D3E3 8D76 # <CJK>
+D3E4 8D78 # <CJK>
+D3E5 8DB5 # <CJK>
+D3E6 8DB7 # <CJK>
+D3E7 8DB6 # <CJK>
+D3E8 8ED1 # <CJK>
+D3E9 8ED3 # <CJK>
+D3EA 8FFE # <CJK>
+D3EB 8FF5 # <CJK>
+D3EC 9002 # <CJK>
+D3ED 8FFF # <CJK>
+D3EE 8FFB # <CJK>
+D3EF 9004 # <CJK>
+D3F0 8FFC # <CJK>
+D3F1 8FF6 # <CJK>
+D3F2 90D6 # <CJK>
+D3F3 90E0 # <CJK>
+D3F4 90D9 # <CJK>
+D3F5 90DA # <CJK>
+D3F6 90E3 # <CJK>
+D3F7 90DF # <CJK>
+D3F8 90E5 # <CJK>
+D3F9 90D8 # <CJK>
+D3FA 90DB # <CJK>
+D3FB 90D7 # <CJK>
+D3FC 90DC # <CJK>
+D3FD 90E4 # <CJK>
+D3FE 9150 # <CJK>
+D440 914E # <CJK>
+D441 914F # <CJK>
+D442 91D5 # <CJK>
+D443 91E2 # <CJK>
+D444 91DA # <CJK>
+D445 965C # <CJK>
+D446 965F # <CJK>
+D447 96BC # <CJK>
+D448 98E3 # <CJK>
+D449 9ADF # <CJK>
+D44A 9B2F # <CJK>
+D44B 4E7F # <CJK>
+D44C 5070 # <CJK>
+D44D 506A # <CJK>
+D44E 5061 # <CJK>
+D44F 505E # <CJK>
+D450 5060 # <CJK>
+D451 5053 # <CJK>
+D452 504B # <CJK>
+D453 505D # <CJK>
+D454 5072 # <CJK>
+D455 5048 # <CJK>
+D456 504D # <CJK>
+D457 5041 # <CJK>
+D458 505B # <CJK>
+D459 504A # <CJK>
+D45A 5062 # <CJK>
+D45B 5015 # <CJK>
+D45C 5045 # <CJK>
+D45D 505F # <CJK>
+D45E 5069 # <CJK>
+D45F 506B # <CJK>
+D460 5063 # <CJK>
+D461 5064 # <CJK>
+D462 5046 # <CJK>
+D463 5040 # <CJK>
+D464 506E # <CJK>
+D465 5073 # <CJK>
+D466 5057 # <CJK>
+D467 5051 # <CJK>
+D468 51D0 # <CJK>
+D469 526B # <CJK>
+D46A 526D # <CJK>
+D46B 526C # <CJK>
+D46C 526E # <CJK>
+D46D 52D6 # <CJK>
+D46E 52D3 # <CJK>
+D46F 532D # <CJK>
+D470 539C # <CJK>
+D471 5575 # <CJK>
+D472 5576 # <CJK>
+D473 553C # <CJK>
+D474 554D # <CJK>
+D475 5550 # <CJK>
+D476 5534 # <CJK>
+D477 552A # <CJK>
+D478 5551 # <CJK>
+D479 5562 # <CJK>
+D47A 5536 # <CJK>
+D47B 5535 # <CJK>
+D47C 5530 # <CJK>
+D47D 5552 # <CJK>
+D47E 5545 # <CJK>
+D4A1 550C # <CJK>
+D4A2 5532 # <CJK>
+D4A3 5565 # <CJK>
+D4A4 554E # <CJK>
+D4A5 5539 # <CJK>
+D4A6 5548 # <CJK>
+D4A7 552D # <CJK>
+D4A8 553B # <CJK>
+D4A9 5540 # <CJK>
+D4AA 554B # <CJK>
+D4AB 570A # <CJK>
+D4AC 5707 # <CJK>
+D4AD 57FB # <CJK>
+D4AE 5814 # <CJK>
+D4AF 57E2 # <CJK>
+D4B0 57F6 # <CJK>
+D4B1 57DC # <CJK>
+D4B2 57F4 # <CJK>
+D4B3 5800 # <CJK>
+D4B4 57ED # <CJK>
+D4B5 57FD # <CJK>
+D4B6 5808 # <CJK>
+D4B7 57F8 # <CJK>
+D4B8 580B # <CJK>
+D4B9 57F3 # <CJK>
+D4BA 57CF # <CJK>
+D4BB 5807 # <CJK>
+D4BC 57EE # <CJK>
+D4BD 57E3 # <CJK>
+D4BE 57F2 # <CJK>
+D4BF 57E5 # <CJK>
+D4C0 57EC # <CJK>
+D4C1 57E1 # <CJK>
+D4C2 580E # <CJK>
+D4C3 57FC # <CJK>
+D4C4 5810 # <CJK>
+D4C5 57E7 # <CJK>
+D4C6 5801 # <CJK>
+D4C7 580C # <CJK>
+D4C8 57F1 # <CJK>
+D4C9 57E9 # <CJK>
+D4CA 57F0 # <CJK>
+D4CB 580D # <CJK>
+D4CC 5804 # <CJK>
+D4CD 595C # <CJK>
+D4CE 5A60 # <CJK>
+D4CF 5A58 # <CJK>
+D4D0 5A55 # <CJK>
+D4D1 5A67 # <CJK>
+D4D2 5A5E # <CJK>
+D4D3 5A38 # <CJK>
+D4D4 5A35 # <CJK>
+D4D5 5A6D # <CJK>
+D4D6 5A50 # <CJK>
+D4D7 5A5F # <CJK>
+D4D8 5A65 # <CJK>
+D4D9 5A6C # <CJK>
+D4DA 5A53 # <CJK>
+D4DB 5A64 # <CJK>
+D4DC 5A57 # <CJK>
+D4DD 5A43 # <CJK>
+D4DE 5A5D # <CJK>
+D4DF 5A52 # <CJK>
+D4E0 5A44 # <CJK>
+D4E1 5A5B # <CJK>
+D4E2 5A48 # <CJK>
+D4E3 5A8E # <CJK>
+D4E4 5A3E # <CJK>
+D4E5 5A4D # <CJK>
+D4E6 5A39 # <CJK>
+D4E7 5A4C # <CJK>
+D4E8 5A70 # <CJK>
+D4E9 5A69 # <CJK>
+D4EA 5A47 # <CJK>
+D4EB 5A51 # <CJK>
+D4EC 5A56 # <CJK>
+D4ED 5A42 # <CJK>
+D4EE 5A5C # <CJK>
+D4EF 5B72 # <CJK>
+D4F0 5B6E # <CJK>
+D4F1 5BC1 # <CJK>
+D4F2 5BC0 # <CJK>
+D4F3 5C59 # <CJK>
+D4F4 5D1E # <CJK>
+D4F5 5D0B # <CJK>
+D4F6 5D1D # <CJK>
+D4F7 5D1A # <CJK>
+D4F8 5D20 # <CJK>
+D4F9 5D0C # <CJK>
+D4FA 5D28 # <CJK>
+D4FB 5D0D # <CJK>
+D4FC 5D26 # <CJK>
+D4FD 5D25 # <CJK>
+D4FE 5D0F # <CJK>
+D540 5D30 # <CJK>
+D541 5D12 # <CJK>
+D542 5D23 # <CJK>
+D543 5D1F # <CJK>
+D544 5D2E # <CJK>
+D545 5E3E # <CJK>
+D546 5E34 # <CJK>
+D547 5EB1 # <CJK>
+D548 5EB4 # <CJK>
+D549 5EB9 # <CJK>
+D54A 5EB2 # <CJK>
+D54B 5EB3 # <CJK>
+D54C 5F36 # <CJK>
+D54D 5F38 # <CJK>
+D54E 5F9B # <CJK>
+D54F 5F96 # <CJK>
+D550 5F9F # <CJK>
+D551 608A # <CJK>
+D552 6090 # <CJK>
+D553 6086 # <CJK>
+D554 60BE # <CJK>
+D555 60B0 # <CJK>
+D556 60BA # <CJK>
+D557 60D3 # <CJK>
+D558 60D4 # <CJK>
+D559 60CF # <CJK>
+D55A 60E4 # <CJK>
+D55B 60D9 # <CJK>
+D55C 60DD # <CJK>
+D55D 60C8 # <CJK>
+D55E 60B1 # <CJK>
+D55F 60DB # <CJK>
+D560 60B7 # <CJK>
+D561 60CA # <CJK>
+D562 60BF # <CJK>
+D563 60C3 # <CJK>
+D564 60CD # <CJK>
+D565 60C0 # <CJK>
+D566 6332 # <CJK>
+D567 6365 # <CJK>
+D568 638A # <CJK>
+D569 6382 # <CJK>
+D56A 637D # <CJK>
+D56B 63BD # <CJK>
+D56C 639E # <CJK>
+D56D 63AD # <CJK>
+D56E 639D # <CJK>
+D56F 6397 # <CJK>
+D570 63AB # <CJK>
+D571 638E # <CJK>
+D572 636F # <CJK>
+D573 6387 # <CJK>
+D574 6390 # <CJK>
+D575 636E # <CJK>
+D576 63AF # <CJK>
+D577 6375 # <CJK>
+D578 639C # <CJK>
+D579 636D # <CJK>
+D57A 63AE # <CJK>
+D57B 637C # <CJK>
+D57C 63A4 # <CJK>
+D57D 633B # <CJK>
+D57E 639F # <CJK>
+D5A1 6378 # <CJK>
+D5A2 6385 # <CJK>
+D5A3 6381 # <CJK>
+D5A4 6391 # <CJK>
+D5A5 638D # <CJK>
+D5A6 6370 # <CJK>
+D5A7 6553 # <CJK>
+D5A8 65CD # <CJK>
+D5A9 6665 # <CJK>
+D5AA 6661 # <CJK>
+D5AB 665B # <CJK>
+D5AC 6659 # <CJK>
+D5AD 665C # <CJK>
+D5AE 6662 # <CJK>
+D5AF 6718 # <CJK>
+D5B0 6879 # <CJK>
+D5B1 6887 # <CJK>
+D5B2 6890 # <CJK>
+D5B3 689C # <CJK>
+D5B4 686D # <CJK>
+D5B5 686E # <CJK>
+D5B6 68AE # <CJK>
+D5B7 68AB # <CJK>
+D5B8 6956 # <CJK>
+D5B9 686F # <CJK>
+D5BA 68A3 # <CJK>
+D5BB 68AC # <CJK>
+D5BC 68A9 # <CJK>
+D5BD 6875 # <CJK>
+D5BE 6874 # <CJK>
+D5BF 68B2 # <CJK>
+D5C0 688F # <CJK>
+D5C1 6877 # <CJK>
+D5C2 6892 # <CJK>
+D5C3 687C # <CJK>
+D5C4 686B # <CJK>
+D5C5 6872 # <CJK>
+D5C6 68AA # <CJK>
+D5C7 6880 # <CJK>
+D5C8 6871 # <CJK>
+D5C9 687E # <CJK>
+D5CA 689B # <CJK>
+D5CB 6896 # <CJK>
+D5CC 688B # <CJK>
+D5CD 68A0 # <CJK>
+D5CE 6889 # <CJK>
+D5CF 68A4 # <CJK>
+D5D0 6878 # <CJK>
+D5D1 687B # <CJK>
+D5D2 6891 # <CJK>
+D5D3 688C # <CJK>
+D5D4 688A # <CJK>
+D5D5 687D # <CJK>
+D5D6 6B36 # <CJK>
+D5D7 6B33 # <CJK>
+D5D8 6B37 # <CJK>
+D5D9 6B38 # <CJK>
+D5DA 6B91 # <CJK>
+D5DB 6B8F # <CJK>
+D5DC 6B8D # <CJK>
+D5DD 6B8E # <CJK>
+D5DE 6B8C # <CJK>
+D5DF 6C2A # <CJK>
+D5E0 6DC0 # <CJK>
+D5E1 6DAB # <CJK>
+D5E2 6DB4 # <CJK>
+D5E3 6DB3 # <CJK>
+D5E4 6E74 # <CJK>
+D5E5 6DAC # <CJK>
+D5E6 6DE9 # <CJK>
+D5E7 6DE2 # <CJK>
+D5E8 6DB7 # <CJK>
+D5E9 6DF6 # <CJK>
+D5EA 6DD4 # <CJK>
+D5EB 6E00 # <CJK>
+D5EC 6DC8 # <CJK>
+D5ED 6DE0 # <CJK>
+D5EE 6DDF # <CJK>
+D5EF 6DD6 # <CJK>
+D5F0 6DBE # <CJK>
+D5F1 6DE5 # <CJK>
+D5F2 6DDC # <CJK>
+D5F3 6DDD # <CJK>
+D5F4 6DDB # <CJK>
+D5F5 6DF4 # <CJK>
+D5F6 6DCA # <CJK>
+D5F7 6DBD # <CJK>
+D5F8 6DED # <CJK>
+D5F9 6DF0 # <CJK>
+D5FA 6DBA # <CJK>
+D5FB 6DD5 # <CJK>
+D5FC 6DC2 # <CJK>
+D5FD 6DCF # <CJK>
+D5FE 6DC9 # <CJK>
+D640 6DD0 # <CJK>
+D641 6DF2 # <CJK>
+D642 6DD3 # <CJK>
+D643 6DFD # <CJK>
+D644 6DD7 # <CJK>
+D645 6DCD # <CJK>
+D646 6DE3 # <CJK>
+D647 6DBB # <CJK>
+D648 70FA # <CJK>
+D649 710D # <CJK>
+D64A 70F7 # <CJK>
+D64B 7117 # <CJK>
+D64C 70F4 # <CJK>
+D64D 710C # <CJK>
+D64E 70F0 # <CJK>
+D64F 7104 # <CJK>
+D650 70F3 # <CJK>
+D651 7110 # <CJK>
+D652 70FC # <CJK>
+D653 70FF # <CJK>
+D654 7106 # <CJK>
+D655 7113 # <CJK>
+D656 7100 # <CJK>
+D657 70F8 # <CJK>
+D658 70F6 # <CJK>
+D659 710B # <CJK>
+D65A 7102 # <CJK>
+D65B 710E # <CJK>
+D65C 727E # <CJK>
+D65D 727B # <CJK>
+D65E 727C # <CJK>
+D65F 727F # <CJK>
+D660 731D # <CJK>
+D661 7317 # <CJK>
+D662 7307 # <CJK>
+D663 7311 # <CJK>
+D664 7318 # <CJK>
+D665 730A # <CJK>
+D666 7308 # <CJK>
+D667 72FF # <CJK>
+D668 730F # <CJK>
+D669 731E # <CJK>
+D66A 7388 # <CJK>
+D66B 73F6 # <CJK>
+D66C 73F8 # <CJK>
+D66D 73F5 # <CJK>
+D66E 7404 # <CJK>
+D66F 7401 # <CJK>
+D670 73FD # <CJK>
+D671 7407 # <CJK>
+D672 7400 # <CJK>
+D673 73FA # <CJK>
+D674 73FC # <CJK>
+D675 73FF # <CJK>
+D676 740C # <CJK>
+D677 740B # <CJK>
+D678 73F4 # <CJK>
+D679 7408 # <CJK>
+D67A 7564 # <CJK>
+D67B 7563 # <CJK>
+D67C 75CE # <CJK>
+D67D 75D2 # <CJK>
+D67E 75CF # <CJK>
+D6A1 75CB # <CJK>
+D6A2 75CC # <CJK>
+D6A3 75D1 # <CJK>
+D6A4 75D0 # <CJK>
+D6A5 768F # <CJK>
+D6A6 7689 # <CJK>
+D6A7 76D3 # <CJK>
+D6A8 7739 # <CJK>
+D6A9 772F # <CJK>
+D6AA 772D # <CJK>
+D6AB 7731 # <CJK>
+D6AC 7732 # <CJK>
+D6AD 7734 # <CJK>
+D6AE 7733 # <CJK>
+D6AF 773D # <CJK>
+D6B0 7725 # <CJK>
+D6B1 773B # <CJK>
+D6B2 7735 # <CJK>
+D6B3 7848 # <CJK>
+D6B4 7852 # <CJK>
+D6B5 7849 # <CJK>
+D6B6 784D # <CJK>
+D6B7 784A # <CJK>
+D6B8 784C # <CJK>
+D6B9 7826 # <CJK>
+D6BA 7845 # <CJK>
+D6BB 7850 # <CJK>
+D6BC 7964 # <CJK>
+D6BD 7967 # <CJK>
+D6BE 7969 # <CJK>
+D6BF 796A # <CJK>
+D6C0 7963 # <CJK>
+D6C1 796B # <CJK>
+D6C2 7961 # <CJK>
+D6C3 79BB # <CJK>
+D6C4 79FA # <CJK>
+D6C5 79F8 # <CJK>
+D6C6 79F6 # <CJK>
+D6C7 79F7 # <CJK>
+D6C8 7A8F # <CJK>
+D6C9 7A94 # <CJK>
+D6CA 7A90 # <CJK>
+D6CB 7B35 # <CJK>
+D6CC 7B47 # <CJK>
+D6CD 7B34 # <CJK>
+D6CE 7B25 # <CJK>
+D6CF 7B30 # <CJK>
+D6D0 7B22 # <CJK>
+D6D1 7B24 # <CJK>
+D6D2 7B33 # <CJK>
+D6D3 7B18 # <CJK>
+D6D4 7B2A # <CJK>
+D6D5 7B1D # <CJK>
+D6D6 7B31 # <CJK>
+D6D7 7B2B # <CJK>
+D6D8 7B2D # <CJK>
+D6D9 7B2F # <CJK>
+D6DA 7B32 # <CJK>
+D6DB 7B38 # <CJK>
+D6DC 7B1A # <CJK>
+D6DD 7B23 # <CJK>
+D6DE 7C94 # <CJK>
+D6DF 7C98 # <CJK>
+D6E0 7C96 # <CJK>
+D6E1 7CA3 # <CJK>
+D6E2 7D35 # <CJK>
+D6E3 7D3D # <CJK>
+D6E4 7D38 # <CJK>
+D6E5 7D36 # <CJK>
+D6E6 7D3A # <CJK>
+D6E7 7D45 # <CJK>
+D6E8 7D2C # <CJK>
+D6E9 7D29 # <CJK>
+D6EA 7D41 # <CJK>
+D6EB 7D47 # <CJK>
+D6EC 7D3E # <CJK>
+D6ED 7D3F # <CJK>
+D6EE 7D4A # <CJK>
+D6EF 7D3B # <CJK>
+D6F0 7D28 # <CJK>
+D6F1 7F63 # <CJK>
+D6F2 7F95 # <CJK>
+D6F3 7F9C # <CJK>
+D6F4 7F9D # <CJK>
+D6F5 7F9B # <CJK>
+D6F6 7FCA # <CJK>
+D6F7 7FCB # <CJK>
+D6F8 7FCD # <CJK>
+D6F9 7FD0 # <CJK>
+D6FA 7FD1 # <CJK>
+D6FB 7FC7 # <CJK>
+D6FC 7FCF # <CJK>
+D6FD 7FC9 # <CJK>
+D6FE 801F # <CJK>
+D740 801E # <CJK>
+D741 801B # <CJK>
+D742 8047 # <CJK>
+D743 8043 # <CJK>
+D744 8048 # <CJK>
+D745 8118 # <CJK>
+D746 8125 # <CJK>
+D747 8119 # <CJK>
+D748 811B # <CJK>
+D749 812D # <CJK>
+D74A 811F # <CJK>
+D74B 812C # <CJK>
+D74C 811E # <CJK>
+D74D 8121 # <CJK>
+D74E 8115 # <CJK>
+D74F 8127 # <CJK>
+D750 811D # <CJK>
+D751 8122 # <CJK>
+D752 8211 # <CJK>
+D753 8238 # <CJK>
+D754 8233 # <CJK>
+D755 823A # <CJK>
+D756 8234 # <CJK>
+D757 8232 # <CJK>
+D758 8274 # <CJK>
+D759 8390 # <CJK>
+D75A 83A3 # <CJK>
+D75B 83A8 # <CJK>
+D75C 838D # <CJK>
+D75D 837A # <CJK>
+D75E 8373 # <CJK>
+D75F 83A4 # <CJK>
+D760 8374 # <CJK>
+D761 838F # <CJK>
+D762 8381 # <CJK>
+D763 8395 # <CJK>
+D764 8399 # <CJK>
+D765 8375 # <CJK>
+D766 8394 # <CJK>
+D767 83A9 # <CJK>
+D768 837D # <CJK>
+D769 8383 # <CJK>
+D76A 838C # <CJK>
+D76B 839D # <CJK>
+D76C 839B # <CJK>
+D76D 83AA # <CJK>
+D76E 838B # <CJK>
+D76F 837E # <CJK>
+D770 83A5 # <CJK>
+D771 83AF # <CJK>
+D772 8388 # <CJK>
+D773 8397 # <CJK>
+D774 83B0 # <CJK>
+D775 837F # <CJK>
+D776 83A6 # <CJK>
+D777 8387 # <CJK>
+D778 83AE # <CJK>
+D779 8376 # <CJK>
+D77A 839A # <CJK>
+D77B 8659 # <CJK>
+D77C 8656 # <CJK>
+D77D 86BF # <CJK>
+D77E 86B7 # <CJK>
+D7A1 86C2 # <CJK>
+D7A2 86C1 # <CJK>
+D7A3 86C5 # <CJK>
+D7A4 86BA # <CJK>
+D7A5 86B0 # <CJK>
+D7A6 86C8 # <CJK>
+D7A7 86B9 # <CJK>
+D7A8 86B3 # <CJK>
+D7A9 86B8 # <CJK>
+D7AA 86CC # <CJK>
+D7AB 86B4 # <CJK>
+D7AC 86BB # <CJK>
+D7AD 86BC # <CJK>
+D7AE 86C3 # <CJK>
+D7AF 86BD # <CJK>
+D7B0 86BE # <CJK>
+D7B1 8852 # <CJK>
+D7B2 8889 # <CJK>
+D7B3 8895 # <CJK>
+D7B4 88A8 # <CJK>
+D7B5 88A2 # <CJK>
+D7B6 88AA # <CJK>
+D7B7 889A # <CJK>
+D7B8 8891 # <CJK>
+D7B9 88A1 # <CJK>
+D7BA 889F # <CJK>
+D7BB 8898 # <CJK>
+D7BC 88A7 # <CJK>
+D7BD 8899 # <CJK>
+D7BE 889B # <CJK>
+D7BF 8897 # <CJK>
+D7C0 88A4 # <CJK>
+D7C1 88AC # <CJK>
+D7C2 888C # <CJK>
+D7C3 8893 # <CJK>
+D7C4 888E # <CJK>
+D7C5 8982 # <CJK>
+D7C6 89D6 # <CJK>
+D7C7 89D9 # <CJK>
+D7C8 89D5 # <CJK>
+D7C9 8A30 # <CJK>
+D7CA 8A27 # <CJK>
+D7CB 8A2C # <CJK>
+D7CC 8A1E # <CJK>
+D7CD 8C39 # <CJK>
+D7CE 8C3B # <CJK>
+D7CF 8C5C # <CJK>
+D7D0 8C5D # <CJK>
+D7D1 8C7D # <CJK>
+D7D2 8CA5 # <CJK>
+D7D3 8D7D # <CJK>
+D7D4 8D7B # <CJK>
+D7D5 8D79 # <CJK>
+D7D6 8DBC # <CJK>
+D7D7 8DC2 # <CJK>
+D7D8 8DB9 # <CJK>
+D7D9 8DBF # <CJK>
+D7DA 8DC1 # <CJK>
+D7DB 8ED8 # <CJK>
+D7DC 8EDE # <CJK>
+D7DD 8EDD # <CJK>
+D7DE 8EDC # <CJK>
+D7DF 8ED7 # <CJK>
+D7E0 8EE0 # <CJK>
+D7E1 8EE1 # <CJK>
+D7E2 9024 # <CJK>
+D7E3 900B # <CJK>
+D7E4 9011 # <CJK>
+D7E5 901C # <CJK>
+D7E6 900C # <CJK>
+D7E7 9021 # <CJK>
+D7E8 90EF # <CJK>
+D7E9 90EA # <CJK>
+D7EA 90F0 # <CJK>
+D7EB 90F4 # <CJK>
+D7EC 90F2 # <CJK>
+D7ED 90F3 # <CJK>
+D7EE 90D4 # <CJK>
+D7EF 90EB # <CJK>
+D7F0 90EC # <CJK>
+D7F1 90E9 # <CJK>
+D7F2 9156 # <CJK>
+D7F3 9158 # <CJK>
+D7F4 915A # <CJK>
+D7F5 9153 # <CJK>
+D7F6 9155 # <CJK>
+D7F7 91EC # <CJK>
+D7F8 91F4 # <CJK>
+D7F9 91F1 # <CJK>
+D7FA 91F3 # <CJK>
+D7FB 91F8 # <CJK>
+D7FC 91E4 # <CJK>
+D7FD 91F9 # <CJK>
+D7FE 91EA # <CJK>
+D840 91EB # <CJK>
+D841 91F7 # <CJK>
+D842 91E8 # <CJK>
+D843 91EE # <CJK>
+D844 957A # <CJK>
+D845 9586 # <CJK>
+D846 9588 # <CJK>
+D847 967C # <CJK>
+D848 966D # <CJK>
+D849 966B # <CJK>
+D84A 9671 # <CJK>
+D84B 966F # <CJK>
+D84C 96BF # <CJK>
+D84D 976A # <CJK>
+D84E 9804 # <CJK>
+D84F 98E5 # <CJK>
+D850 9997 # <CJK>
+D851 509B # <CJK>
+D852 5095 # <CJK>
+D853 5094 # <CJK>
+D854 509E # <CJK>
+D855 508B # <CJK>
+D856 50A3 # <CJK>
+D857 5083 # <CJK>
+D858 508C # <CJK>
+D859 508E # <CJK>
+D85A 509D # <CJK>
+D85B 5068 # <CJK>
+D85C 509C # <CJK>
+D85D 5092 # <CJK>
+D85E 5082 # <CJK>
+D85F 5087 # <CJK>
+D860 515F # <CJK>
+D861 51D4 # <CJK>
+D862 5312 # <CJK>
+D863 5311 # <CJK>
+D864 53A4 # <CJK>
+D865 53A7 # <CJK>
+D866 5591 # <CJK>
+D867 55A8 # <CJK>
+D868 55A5 # <CJK>
+D869 55AD # <CJK>
+D86A 5577 # <CJK>
+D86B 5645 # <CJK>
+D86C 55A2 # <CJK>
+D86D 5593 # <CJK>
+D86E 5588 # <CJK>
+D86F 558F # <CJK>
+D870 55B5 # <CJK>
+D871 5581 # <CJK>
+D872 55A3 # <CJK>
+D873 5592 # <CJK>
+D874 55A4 # <CJK>
+D875 557D # <CJK>
+D876 558C # <CJK>
+D877 55A6 # <CJK>
+D878 557F # <CJK>
+D879 5595 # <CJK>
+D87A 55A1 # <CJK>
+D87B 558E # <CJK>
+D87C 570C # <CJK>
+D87D 5829 # <CJK>
+D87E 5837 # <CJK>
+D8A1 5819 # <CJK>
+D8A2 581E # <CJK>
+D8A3 5827 # <CJK>
+D8A4 5823 # <CJK>
+D8A5 5828 # <CJK>
+D8A6 57F5 # <CJK>
+D8A7 5848 # <CJK>
+D8A8 5825 # <CJK>
+D8A9 581C # <CJK>
+D8AA 581B # <CJK>
+D8AB 5833 # <CJK>
+D8AC 583F # <CJK>
+D8AD 5836 # <CJK>
+D8AE 582E # <CJK>
+D8AF 5839 # <CJK>
+D8B0 5838 # <CJK>
+D8B1 582D # <CJK>
+D8B2 582C # <CJK>
+D8B3 583B # <CJK>
+D8B4 5961 # <CJK>
+D8B5 5AAF # <CJK>
+D8B6 5A94 # <CJK>
+D8B7 5A9F # <CJK>
+D8B8 5A7A # <CJK>
+D8B9 5AA2 # <CJK>
+D8BA 5A9E # <CJK>
+D8BB 5A78 # <CJK>
+D8BC 5AA6 # <CJK>
+D8BD 5A7C # <CJK>
+D8BE 5AA5 # <CJK>
+D8BF 5AAC # <CJK>
+D8C0 5A95 # <CJK>
+D8C1 5AAE # <CJK>
+D8C2 5A37 # <CJK>
+D8C3 5A84 # <CJK>
+D8C4 5A8A # <CJK>
+D8C5 5A97 # <CJK>
+D8C6 5A83 # <CJK>
+D8C7 5A8B # <CJK>
+D8C8 5AA9 # <CJK>
+D8C9 5A7B # <CJK>
+D8CA 5A7D # <CJK>
+D8CB 5A8C # <CJK>
+D8CC 5A9C # <CJK>
+D8CD 5A8F # <CJK>
+D8CE 5A93 # <CJK>
+D8CF 5A9D # <CJK>
+D8D0 5BEA # <CJK>
+D8D1 5BCD # <CJK>
+D8D2 5BCB # <CJK>
+D8D3 5BD4 # <CJK>
+D8D4 5BD1 # <CJK>
+D8D5 5BCA # <CJK>
+D8D6 5BCE # <CJK>
+D8D7 5C0C # <CJK>
+D8D8 5C30 # <CJK>
+D8D9 5D37 # <CJK>
+D8DA 5D43 # <CJK>
+D8DB 5D6B # <CJK>
+D8DC 5D41 # <CJK>
+D8DD 5D4B # <CJK>
+D8DE 5D3F # <CJK>
+D8DF 5D35 # <CJK>
+D8E0 5D51 # <CJK>
+D8E1 5D4E # <CJK>
+D8E2 5D55 # <CJK>
+D8E3 5D33 # <CJK>
+D8E4 5D3A # <CJK>
+D8E5 5D52 # <CJK>
+D8E6 5D3D # <CJK>
+D8E7 5D31 # <CJK>
+D8E8 5D59 # <CJK>
+D8E9 5D42 # <CJK>
+D8EA 5D39 # <CJK>
+D8EB 5D49 # <CJK>
+D8EC 5D38 # <CJK>
+D8ED 5D3C # <CJK>
+D8EE 5D32 # <CJK>
+D8EF 5D36 # <CJK>
+D8F0 5D40 # <CJK>
+D8F1 5D45 # <CJK>
+D8F2 5E44 # <CJK>
+D8F3 5E41 # <CJK>
+D8F4 5F58 # <CJK>
+D8F5 5FA6 # <CJK>
+D8F6 5FA5 # <CJK>
+D8F7 5FAB # <CJK>
+D8F8 60C9 # <CJK>
+D8F9 60B9 # <CJK>
+D8FA 60CC # <CJK>
+D8FB 60E2 # <CJK>
+D8FC 60CE # <CJK>
+D8FD 60C4 # <CJK>
+D8FE 6114 # <CJK>
+D940 60F2 # <CJK>
+D941 610A # <CJK>
+D942 6116 # <CJK>
+D943 6105 # <CJK>
+D944 60F5 # <CJK>
+D945 6113 # <CJK>
+D946 60F8 # <CJK>
+D947 60FC # <CJK>
+D948 60FE # <CJK>
+D949 60C1 # <CJK>
+D94A 6103 # <CJK>
+D94B 6118 # <CJK>
+D94C 611D # <CJK>
+D94D 6110 # <CJK>
+D94E 60FF # <CJK>
+D94F 6104 # <CJK>
+D950 610B # <CJK>
+D951 624A # <CJK>
+D952 6394 # <CJK>
+D953 63B1 # <CJK>
+D954 63B0 # <CJK>
+D955 63CE # <CJK>
+D956 63E5 # <CJK>
+D957 63E8 # <CJK>
+D958 63EF # <CJK>
+D959 63C3 # <CJK>
+D95A 649D # <CJK>
+D95B 63F3 # <CJK>
+D95C 63CA # <CJK>
+D95D 63E0 # <CJK>
+D95E 63F6 # <CJK>
+D95F 63D5 # <CJK>
+D960 63F2 # <CJK>
+D961 63F5 # <CJK>
+D962 6461 # <CJK>
+D963 63DF # <CJK>
+D964 63BE # <CJK>
+D965 63DD # <CJK>
+D966 63DC # <CJK>
+D967 63C4 # <CJK>
+D968 63D8 # <CJK>
+D969 63D3 # <CJK>
+D96A 63C2 # <CJK>
+D96B 63C7 # <CJK>
+D96C 63CC # <CJK>
+D96D 63CB # <CJK>
+D96E 63C8 # <CJK>
+D96F 63F0 # <CJK>
+D970 63D7 # <CJK>
+D971 63D9 # <CJK>
+D972 6532 # <CJK>
+D973 6567 # <CJK>
+D974 656A # <CJK>
+D975 6564 # <CJK>
+D976 655C # <CJK>
+D977 6568 # <CJK>
+D978 6565 # <CJK>
+D979 658C # <CJK>
+D97A 659D # <CJK>
+D97B 659E # <CJK>
+D97C 65AE # <CJK>
+D97D 65D0 # <CJK>
+D97E 65D2 # <CJK>
+D9A1 667C # <CJK>
+D9A2 666C # <CJK>
+D9A3 667B # <CJK>
+D9A4 6680 # <CJK>
+D9A5 6671 # <CJK>
+D9A6 6679 # <CJK>
+D9A7 666A # <CJK>
+D9A8 6672 # <CJK>
+D9A9 6701 # <CJK>
+D9AA 690C # <CJK>
+D9AB 68D3 # <CJK>
+D9AC 6904 # <CJK>
+D9AD 68DC # <CJK>
+D9AE 692A # <CJK>
+D9AF 68EC # <CJK>
+D9B0 68EA # <CJK>
+D9B1 68F1 # <CJK>
+D9B2 690F # <CJK>
+D9B3 68D6 # <CJK>
+D9B4 68F7 # <CJK>
+D9B5 68EB # <CJK>
+D9B6 68E4 # <CJK>
+D9B7 68F6 # <CJK>
+D9B8 6913 # <CJK>
+D9B9 6910 # <CJK>
+D9BA 68F3 # <CJK>
+D9BB 68E1 # <CJK>
+D9BC 6907 # <CJK>
+D9BD 68CC # <CJK>
+D9BE 6908 # <CJK>
+D9BF 6970 # <CJK>
+D9C0 68B4 # <CJK>
+D9C1 6911 # <CJK>
+D9C2 68EF # <CJK>
+D9C3 68C6 # <CJK>
+D9C4 6914 # <CJK>
+D9C5 68F8 # <CJK>
+D9C6 68D0 # <CJK>
+D9C7 68FD # <CJK>
+D9C8 68FC # <CJK>
+D9C9 68E8 # <CJK>
+D9CA 690B # <CJK>
+D9CB 690A # <CJK>
+D9CC 6917 # <CJK>
+D9CD 68CE # <CJK>
+D9CE 68C8 # <CJK>
+D9CF 68DD # <CJK>
+D9D0 68DE # <CJK>
+D9D1 68E6 # <CJK>
+D9D2 68F4 # <CJK>
+D9D3 68D1 # <CJK>
+D9D4 6906 # <CJK>
+D9D5 68D4 # <CJK>
+D9D6 68E9 # <CJK>
+D9D7 6915 # <CJK>
+D9D8 6925 # <CJK>
+D9D9 68C7 # <CJK>
+D9DA 6B39 # <CJK>
+D9DB 6B3B # <CJK>
+D9DC 6B3F # <CJK>
+D9DD 6B3C # <CJK>
+D9DE 6B94 # <CJK>
+D9DF 6B97 # <CJK>
+D9E0 6B99 # <CJK>
+D9E1 6B95 # <CJK>
+D9E2 6BBD # <CJK>
+D9E3 6BF0 # <CJK>
+D9E4 6BF2 # <CJK>
+D9E5 6BF3 # <CJK>
+D9E6 6C30 # <CJK>
+D9E7 6DFC # <CJK>
+D9E8 6E46 # <CJK>
+D9E9 6E47 # <CJK>
+D9EA 6E1F # <CJK>
+D9EB 6E49 # <CJK>
+D9EC 6E88 # <CJK>
+D9ED 6E3C # <CJK>
+D9EE 6E3D # <CJK>
+D9EF 6E45 # <CJK>
+D9F0 6E62 # <CJK>
+D9F1 6E2B # <CJK>
+D9F2 6E3F # <CJK>
+D9F3 6E41 # <CJK>
+D9F4 6E5D # <CJK>
+D9F5 6E73 # <CJK>
+D9F6 6E1C # <CJK>
+D9F7 6E33 # <CJK>
+D9F8 6E4B # <CJK>
+D9F9 6E40 # <CJK>
+D9FA 6E51 # <CJK>
+D9FB 6E3B # <CJK>
+D9FC 6E03 # <CJK>
+D9FD 6E2E # <CJK>
+D9FE 6E5E # <CJK>
+DA40 6E68 # <CJK>
+DA41 6E5C # <CJK>
+DA42 6E61 # <CJK>
+DA43 6E31 # <CJK>
+DA44 6E28 # <CJK>
+DA45 6E60 # <CJK>
+DA46 6E71 # <CJK>
+DA47 6E6B # <CJK>
+DA48 6E39 # <CJK>
+DA49 6E22 # <CJK>
+DA4A 6E30 # <CJK>
+DA4B 6E53 # <CJK>
+DA4C 6E65 # <CJK>
+DA4D 6E27 # <CJK>
+DA4E 6E78 # <CJK>
+DA4F 6E64 # <CJK>
+DA50 6E77 # <CJK>
+DA51 6E55 # <CJK>
+DA52 6E79 # <CJK>
+DA53 6E52 # <CJK>
+DA54 6E66 # <CJK>
+DA55 6E35 # <CJK>
+DA56 6E36 # <CJK>
+DA57 6E5A # <CJK>
+DA58 7120 # <CJK>
+DA59 711E # <CJK>
+DA5A 712F # <CJK>
+DA5B 70FB # <CJK>
+DA5C 712E # <CJK>
+DA5D 7131 # <CJK>
+DA5E 7123 # <CJK>
+DA5F 7125 # <CJK>
+DA60 7122 # <CJK>
+DA61 7132 # <CJK>
+DA62 711F # <CJK>
+DA63 7128 # <CJK>
+DA64 713A # <CJK>
+DA65 711B # <CJK>
+DA66 724B # <CJK>
+DA67 725A # <CJK>
+DA68 7288 # <CJK>
+DA69 7289 # <CJK>
+DA6A 7286 # <CJK>
+DA6B 7285 # <CJK>
+DA6C 728B # <CJK>
+DA6D 7312 # <CJK>
+DA6E 730B # <CJK>
+DA6F 7330 # <CJK>
+DA70 7322 # <CJK>
+DA71 7331 # <CJK>
+DA72 7333 # <CJK>
+DA73 7327 # <CJK>
+DA74 7332 # <CJK>
+DA75 732D # <CJK>
+DA76 7326 # <CJK>
+DA77 7323 # <CJK>
+DA78 7335 # <CJK>
+DA79 730C # <CJK>
+DA7A 742E # <CJK>
+DA7B 742C # <CJK>
+DA7C 7430 # <CJK>
+DA7D 742B # <CJK>
+DA7E 7416 # <CJK>
+DAA1 741A # <CJK>
+DAA2 7421 # <CJK>
+DAA3 742D # <CJK>
+DAA4 7431 # <CJK>
+DAA5 7424 # <CJK>
+DAA6 7423 # <CJK>
+DAA7 741D # <CJK>
+DAA8 7429 # <CJK>
+DAA9 7420 # <CJK>
+DAAA 7432 # <CJK>
+DAAB 74FB # <CJK>
+DAAC 752F # <CJK>
+DAAD 756F # <CJK>
+DAAE 756C # <CJK>
+DAAF 75E7 # <CJK>
+DAB0 75DA # <CJK>
+DAB1 75E1 # <CJK>
+DAB2 75E6 # <CJK>
+DAB3 75DD # <CJK>
+DAB4 75DF # <CJK>
+DAB5 75E4 # <CJK>
+DAB6 75D7 # <CJK>
+DAB7 7695 # <CJK>
+DAB8 7692 # <CJK>
+DAB9 76DA # <CJK>
+DABA 7746 # <CJK>
+DABB 7747 # <CJK>
+DABC 7744 # <CJK>
+DABD 774D # <CJK>
+DABE 7745 # <CJK>
+DABF 774A # <CJK>
+DAC0 774E # <CJK>
+DAC1 774B # <CJK>
+DAC2 774C # <CJK>
+DAC3 77DE # <CJK>
+DAC4 77EC # <CJK>
+DAC5 7860 # <CJK>
+DAC6 7864 # <CJK>
+DAC7 7865 # <CJK>
+DAC8 785C # <CJK>
+DAC9 786D # <CJK>
+DACA 7871 # <CJK>
+DACB 786A # <CJK>
+DACC 786E # <CJK>
+DACD 7870 # <CJK>
+DACE 7869 # <CJK>
+DACF 7868 # <CJK>
+DAD0 785E # <CJK>
+DAD1 7862 # <CJK>
+DAD2 7974 # <CJK>
+DAD3 7973 # <CJK>
+DAD4 7972 # <CJK>
+DAD5 7970 # <CJK>
+DAD6 7A02 # <CJK>
+DAD7 7A0A # <CJK>
+DAD8 7A03 # <CJK>
+DAD9 7A0C # <CJK>
+DADA 7A04 # <CJK>
+DADB 7A99 # <CJK>
+DADC 7AE6 # <CJK>
+DADD 7AE4 # <CJK>
+DADE 7B4A # <CJK>
+DADF 7B3B # <CJK>
+DAE0 7B44 # <CJK>
+DAE1 7B48 # <CJK>
+DAE2 7B4C # <CJK>
+DAE3 7B4E # <CJK>
+DAE4 7B40 # <CJK>
+DAE5 7B58 # <CJK>
+DAE6 7B45 # <CJK>
+DAE7 7CA2 # <CJK>
+DAE8 7C9E # <CJK>
+DAE9 7CA8 # <CJK>
+DAEA 7CA1 # <CJK>
+DAEB 7D58 # <CJK>
+DAEC 7D6F # <CJK>
+DAED 7D63 # <CJK>
+DAEE 7D53 # <CJK>
+DAEF 7D56 # <CJK>
+DAF0 7D67 # <CJK>
+DAF1 7D6A # <CJK>
+DAF2 7D4F # <CJK>
+DAF3 7D6D # <CJK>
+DAF4 7D5C # <CJK>
+DAF5 7D6B # <CJK>
+DAF6 7D52 # <CJK>
+DAF7 7D54 # <CJK>
+DAF8 7D69 # <CJK>
+DAF9 7D51 # <CJK>
+DAFA 7D5F # <CJK>
+DAFB 7D4E # <CJK>
+DAFC 7F3E # <CJK>
+DAFD 7F3F # <CJK>
+DAFE 7F65 # <CJK>
+DB40 7F66 # <CJK>
+DB41 7FA2 # <CJK>
+DB42 7FA0 # <CJK>
+DB43 7FA1 # <CJK>
+DB44 7FD7 # <CJK>
+DB45 8051 # <CJK>
+DB46 804F # <CJK>
+DB47 8050 # <CJK>
+DB48 80FE # <CJK>
+DB49 80D4 # <CJK>
+DB4A 8143 # <CJK>
+DB4B 814A # <CJK>
+DB4C 8152 # <CJK>
+DB4D 814F # <CJK>
+DB4E 8147 # <CJK>
+DB4F 813D # <CJK>
+DB50 814D # <CJK>
+DB51 813A # <CJK>
+DB52 81E6 # <CJK>
+DB53 81EE # <CJK>
+DB54 81F7 # <CJK>
+DB55 81F8 # <CJK>
+DB56 81F9 # <CJK>
+DB57 8204 # <CJK>
+DB58 823C # <CJK>
+DB59 823D # <CJK>
+DB5A 823F # <CJK>
+DB5B 8275 # <CJK>
+DB5C 833B # <CJK>
+DB5D 83CF # <CJK>
+DB5E 83F9 # <CJK>
+DB5F 8423 # <CJK>
+DB60 83C0 # <CJK>
+DB61 83E8 # <CJK>
+DB62 8412 # <CJK>
+DB63 83E7 # <CJK>
+DB64 83E4 # <CJK>
+DB65 83FC # <CJK>
+DB66 83F6 # <CJK>
+DB67 8410 # <CJK>
+DB68 83C6 # <CJK>
+DB69 83C8 # <CJK>
+DB6A 83EB # <CJK>
+DB6B 83E3 # <CJK>
+DB6C 83BF # <CJK>
+DB6D 8401 # <CJK>
+DB6E 83DD # <CJK>
+DB6F 83E5 # <CJK>
+DB70 83D8 # <CJK>
+DB71 83FF # <CJK>
+DB72 83E1 # <CJK>
+DB73 83CB # <CJK>
+DB74 83CE # <CJK>
+DB75 83D6 # <CJK>
+DB76 83F5 # <CJK>
+DB77 83C9 # <CJK>
+DB78 8409 # <CJK>
+DB79 840F # <CJK>
+DB7A 83DE # <CJK>
+DB7B 8411 # <CJK>
+DB7C 8406 # <CJK>
+DB7D 83C2 # <CJK>
+DB7E 83F3 # <CJK>
+DBA1 83D5 # <CJK>
+DBA2 83FA # <CJK>
+DBA3 83C7 # <CJK>
+DBA4 83D1 # <CJK>
+DBA5 83EA # <CJK>
+DBA6 8413 # <CJK>
+DBA7 83C3 # <CJK>
+DBA8 83EC # <CJK>
+DBA9 83EE # <CJK>
+DBAA 83C4 # <CJK>
+DBAB 83FB # <CJK>
+DBAC 83D7 # <CJK>
+DBAD 83E2 # <CJK>
+DBAE 841B # <CJK>
+DBAF 83DB # <CJK>
+DBB0 83FE # <CJK>
+DBB1 86D8 # <CJK>
+DBB2 86E2 # <CJK>
+DBB3 86E6 # <CJK>
+DBB4 86D3 # <CJK>
+DBB5 86E3 # <CJK>
+DBB6 86DA # <CJK>
+DBB7 86EA # <CJK>
+DBB8 86DD # <CJK>
+DBB9 86EB # <CJK>
+DBBA 86DC # <CJK>
+DBBB 86EC # <CJK>
+DBBC 86E9 # <CJK>
+DBBD 86D7 # <CJK>
+DBBE 86E8 # <CJK>
+DBBF 86D1 # <CJK>
+DBC0 8848 # <CJK>
+DBC1 8856 # <CJK>
+DBC2 8855 # <CJK>
+DBC3 88BA # <CJK>
+DBC4 88D7 # <CJK>
+DBC5 88B9 # <CJK>
+DBC6 88B8 # <CJK>
+DBC7 88C0 # <CJK>
+DBC8 88BE # <CJK>
+DBC9 88B6 # <CJK>
+DBCA 88BC # <CJK>
+DBCB 88B7 # <CJK>
+DBCC 88BD # <CJK>
+DBCD 88B2 # <CJK>
+DBCE 8901 # <CJK>
+DBCF 88C9 # <CJK>
+DBD0 8995 # <CJK>
+DBD1 8998 # <CJK>
+DBD2 8997 # <CJK>
+DBD3 89DD # <CJK>
+DBD4 89DA # <CJK>
+DBD5 89DB # <CJK>
+DBD6 8A4E # <CJK>
+DBD7 8A4D # <CJK>
+DBD8 8A39 # <CJK>
+DBD9 8A59 # <CJK>
+DBDA 8A40 # <CJK>
+DBDB 8A57 # <CJK>
+DBDC 8A58 # <CJK>
+DBDD 8A44 # <CJK>
+DBDE 8A45 # <CJK>
+DBDF 8A52 # <CJK>
+DBE0 8A48 # <CJK>
+DBE1 8A51 # <CJK>
+DBE2 8A4A # <CJK>
+DBE3 8A4C # <CJK>
+DBE4 8A4F # <CJK>
+DBE5 8C5F # <CJK>
+DBE6 8C81 # <CJK>
+DBE7 8C80 # <CJK>
+DBE8 8CBA # <CJK>
+DBE9 8CBE # <CJK>
+DBEA 8CB0 # <CJK>
+DBEB 8CB9 # <CJK>
+DBEC 8CB5 # <CJK>
+DBED 8D84 # <CJK>
+DBEE 8D80 # <CJK>
+DBEF 8D89 # <CJK>
+DBF0 8DD8 # <CJK>
+DBF1 8DD3 # <CJK>
+DBF2 8DCD # <CJK>
+DBF3 8DC7 # <CJK>
+DBF4 8DD6 # <CJK>
+DBF5 8DDC # <CJK>
+DBF6 8DCF # <CJK>
+DBF7 8DD5 # <CJK>
+DBF8 8DD9 # <CJK>
+DBF9 8DC8 # <CJK>
+DBFA 8DD7 # <CJK>
+DBFB 8DC5 # <CJK>
+DBFC 8EEF # <CJK>
+DBFD 8EF7 # <CJK>
+DBFE 8EFA # <CJK>
+DC40 8EF9 # <CJK>
+DC41 8EE6 # <CJK>
+DC42 8EEE # <CJK>
+DC43 8EE5 # <CJK>
+DC44 8EF5 # <CJK>
+DC45 8EE7 # <CJK>
+DC46 8EE8 # <CJK>
+DC47 8EF6 # <CJK>
+DC48 8EEB # <CJK>
+DC49 8EF1 # <CJK>
+DC4A 8EEC # <CJK>
+DC4B 8EF4 # <CJK>
+DC4C 8EE9 # <CJK>
+DC4D 902D # <CJK>
+DC4E 9034 # <CJK>
+DC4F 902F # <CJK>
+DC50 9106 # <CJK>
+DC51 912C # <CJK>
+DC52 9104 # <CJK>
+DC53 90FF # <CJK>
+DC54 90FC # <CJK>
+DC55 9108 # <CJK>
+DC56 90F9 # <CJK>
+DC57 90FB # <CJK>
+DC58 9101 # <CJK>
+DC59 9100 # <CJK>
+DC5A 9107 # <CJK>
+DC5B 9105 # <CJK>
+DC5C 9103 # <CJK>
+DC5D 9161 # <CJK>
+DC5E 9164 # <CJK>
+DC5F 915F # <CJK>
+DC60 9162 # <CJK>
+DC61 9160 # <CJK>
+DC62 9201 # <CJK>
+DC63 920A # <CJK>
+DC64 9225 # <CJK>
+DC65 9203 # <CJK>
+DC66 921A # <CJK>
+DC67 9226 # <CJK>
+DC68 920F # <CJK>
+DC69 920C # <CJK>
+DC6A 9200 # <CJK>
+DC6B 9212 # <CJK>
+DC6C 91FF # <CJK>
+DC6D 91FD # <CJK>
+DC6E 9206 # <CJK>
+DC6F 9204 # <CJK>
+DC70 9227 # <CJK>
+DC71 9202 # <CJK>
+DC72 921C # <CJK>
+DC73 9224 # <CJK>
+DC74 9219 # <CJK>
+DC75 9217 # <CJK>
+DC76 9205 # <CJK>
+DC77 9216 # <CJK>
+DC78 957B # <CJK>
+DC79 958D # <CJK>
+DC7A 958C # <CJK>
+DC7B 9590 # <CJK>
+DC7C 9687 # <CJK>
+DC7D 967E # <CJK>
+DC7E 9688 # <CJK>
+DCA1 9689 # <CJK>
+DCA2 9683 # <CJK>
+DCA3 9680 # <CJK>
+DCA4 96C2 # <CJK>
+DCA5 96C8 # <CJK>
+DCA6 96C3 # <CJK>
+DCA7 96F1 # <CJK>
+DCA8 96F0 # <CJK>
+DCA9 976C # <CJK>
+DCAA 9770 # <CJK>
+DCAB 976E # <CJK>
+DCAC 9807 # <CJK>
+DCAD 98A9 # <CJK>
+DCAE 98EB # <CJK>
+DCAF 9CE6 # <CJK>
+DCB0 9EF9 # <CJK>
+DCB1 4E83 # <CJK>
+DCB2 4E84 # <CJK>
+DCB3 4EB6 # <CJK>
+DCB4 50BD # <CJK>
+DCB5 50BF # <CJK>
+DCB6 50C6 # <CJK>
+DCB7 50AE # <CJK>
+DCB8 50C4 # <CJK>
+DCB9 50CA # <CJK>
+DCBA 50B4 # <CJK>
+DCBB 50C8 # <CJK>
+DCBC 50C2 # <CJK>
+DCBD 50B0 # <CJK>
+DCBE 50C1 # <CJK>
+DCBF 50BA # <CJK>
+DCC0 50B1 # <CJK>
+DCC1 50CB # <CJK>
+DCC2 50C9 # <CJK>
+DCC3 50B6 # <CJK>
+DCC4 50B8 # <CJK>
+DCC5 51D7 # <CJK>
+DCC6 527A # <CJK>
+DCC7 5278 # <CJK>
+DCC8 527B # <CJK>
+DCC9 527C # <CJK>
+DCCA 55C3 # <CJK>
+DCCB 55DB # <CJK>
+DCCC 55CC # <CJK>
+DCCD 55D0 # <CJK>
+DCCE 55CB # <CJK>
+DCCF 55CA # <CJK>
+DCD0 55DD # <CJK>
+DCD1 55C0 # <CJK>
+DCD2 55D4 # <CJK>
+DCD3 55C4 # <CJK>
+DCD4 55E9 # <CJK>
+DCD5 55BF # <CJK>
+DCD6 55D2 # <CJK>
+DCD7 558D # <CJK>
+DCD8 55CF # <CJK>
+DCD9 55D5 # <CJK>
+DCDA 55E2 # <CJK>
+DCDB 55D6 # <CJK>
+DCDC 55C8 # <CJK>
+DCDD 55F2 # <CJK>
+DCDE 55CD # <CJK>
+DCDF 55D9 # <CJK>
+DCE0 55C2 # <CJK>
+DCE1 5714 # <CJK>
+DCE2 5853 # <CJK>
+DCE3 5868 # <CJK>
+DCE4 5864 # <CJK>
+DCE5 584F # <CJK>
+DCE6 584D # <CJK>
+DCE7 5849 # <CJK>
+DCE8 586F # <CJK>
+DCE9 5855 # <CJK>
+DCEA 584E # <CJK>
+DCEB 585D # <CJK>
+DCEC 5859 # <CJK>
+DCED 5865 # <CJK>
+DCEE 585B # <CJK>
+DCEF 583D # <CJK>
+DCF0 5863 # <CJK>
+DCF1 5871 # <CJK>
+DCF2 58FC # <CJK>
+DCF3 5AC7 # <CJK>
+DCF4 5AC4 # <CJK>
+DCF5 5ACB # <CJK>
+DCF6 5ABA # <CJK>
+DCF7 5AB8 # <CJK>
+DCF8 5AB1 # <CJK>
+DCF9 5AB5 # <CJK>
+DCFA 5AB0 # <CJK>
+DCFB 5ABF # <CJK>
+DCFC 5AC8 # <CJK>
+DCFD 5ABB # <CJK>
+DCFE 5AC6 # <CJK>
+DD40 5AB7 # <CJK>
+DD41 5AC0 # <CJK>
+DD42 5ACA # <CJK>
+DD43 5AB4 # <CJK>
+DD44 5AB6 # <CJK>
+DD45 5ACD # <CJK>
+DD46 5AB9 # <CJK>
+DD47 5A90 # <CJK>
+DD48 5BD6 # <CJK>
+DD49 5BD8 # <CJK>
+DD4A 5BD9 # <CJK>
+DD4B 5C1F # <CJK>
+DD4C 5C33 # <CJK>
+DD4D 5D71 # <CJK>
+DD4E 5D63 # <CJK>
+DD4F 5D4A # <CJK>
+DD50 5D65 # <CJK>
+DD51 5D72 # <CJK>
+DD52 5D6C # <CJK>
+DD53 5D5E # <CJK>
+DD54 5D68 # <CJK>
+DD55 5D67 # <CJK>
+DD56 5D62 # <CJK>
+DD57 5DF0 # <CJK>
+DD58 5E4F # <CJK>
+DD59 5E4E # <CJK>
+DD5A 5E4A # <CJK>
+DD5B 5E4D # <CJK>
+DD5C 5E4B # <CJK>
+DD5D 5EC5 # <CJK>
+DD5E 5ECC # <CJK>
+DD5F 5EC6 # <CJK>
+DD60 5ECB # <CJK>
+DD61 5EC7 # <CJK>
+DD62 5F40 # <CJK>
+DD63 5FAF # <CJK>
+DD64 5FAD # <CJK>
+DD65 60F7 # <CJK>
+DD66 6149 # <CJK>
+DD67 614A # <CJK>
+DD68 612B # <CJK>
+DD69 6145 # <CJK>
+DD6A 6136 # <CJK>
+DD6B 6132 # <CJK>
+DD6C 612E # <CJK>
+DD6D 6146 # <CJK>
+DD6E 612F # <CJK>
+DD6F 614F # <CJK>
+DD70 6129 # <CJK>
+DD71 6140 # <CJK>
+DD72 6220 # <CJK>
+DD73 9168 # <CJK>
+DD74 6223 # <CJK>
+DD75 6225 # <CJK>
+DD76 6224 # <CJK>
+DD77 63C5 # <CJK>
+DD78 63F1 # <CJK>
+DD79 63EB # <CJK>
+DD7A 6410 # <CJK>
+DD7B 6412 # <CJK>
+DD7C 6409 # <CJK>
+DD7D 6420 # <CJK>
+DD7E 6424 # <CJK>
+DDA1 6433 # <CJK>
+DDA2 6443 # <CJK>
+DDA3 641F # <CJK>
+DDA4 6415 # <CJK>
+DDA5 6418 # <CJK>
+DDA6 6439 # <CJK>
+DDA7 6437 # <CJK>
+DDA8 6422 # <CJK>
+DDA9 6423 # <CJK>
+DDAA 640C # <CJK>
+DDAB 6426 # <CJK>
+DDAC 6430 # <CJK>
+DDAD 6428 # <CJK>
+DDAE 6441 # <CJK>
+DDAF 6435 # <CJK>
+DDB0 642F # <CJK>
+DDB1 640A # <CJK>
+DDB2 641A # <CJK>
+DDB3 6440 # <CJK>
+DDB4 6425 # <CJK>
+DDB5 6427 # <CJK>
+DDB6 640B # <CJK>
+DDB7 63E7 # <CJK>
+DDB8 641B # <CJK>
+DDB9 642E # <CJK>
+DDBA 6421 # <CJK>
+DDBB 640E # <CJK>
+DDBC 656F # <CJK>
+DDBD 6592 # <CJK>
+DDBE 65D3 # <CJK>
+DDBF 6686 # <CJK>
+DDC0 668C # <CJK>
+DDC1 6695 # <CJK>
+DDC2 6690 # <CJK>
+DDC3 668B # <CJK>
+DDC4 668A # <CJK>
+DDC5 6699 # <CJK>
+DDC6 6694 # <CJK>
+DDC7 6678 # <CJK>
+DDC8 6720 # <CJK>
+DDC9 6966 # <CJK>
+DDCA 695F # <CJK>
+DDCB 6938 # <CJK>
+DDCC 694E # <CJK>
+DDCD 6962 # <CJK>
+DDCE 6971 # <CJK>
+DDCF 693F # <CJK>
+DDD0 6945 # <CJK>
+DDD1 696A # <CJK>
+DDD2 6939 # <CJK>
+DDD3 6942 # <CJK>
+DDD4 6957 # <CJK>
+DDD5 6959 # <CJK>
+DDD6 697A # <CJK>
+DDD7 6948 # <CJK>
+DDD8 6949 # <CJK>
+DDD9 6935 # <CJK>
+DDDA 696C # <CJK>
+DDDB 6933 # <CJK>
+DDDC 693D # <CJK>
+DDDD 6965 # <CJK>
+DDDE 68F0 # <CJK>
+DDDF 6978 # <CJK>
+DDE0 6934 # <CJK>
+DDE1 6969 # <CJK>
+DDE2 6940 # <CJK>
+DDE3 696F # <CJK>
+DDE4 6944 # <CJK>
+DDE5 6976 # <CJK>
+DDE6 6958 # <CJK>
+DDE7 6941 # <CJK>
+DDE8 6974 # <CJK>
+DDE9 694C # <CJK>
+DDEA 693B # <CJK>
+DDEB 694B # <CJK>
+DDEC 6937 # <CJK>
+DDED 695C # <CJK>
+DDEE 694F # <CJK>
+DDEF 6951 # <CJK>
+DDF0 6932 # <CJK>
+DDF1 6952 # <CJK>
+DDF2 692F # <CJK>
+DDF3 697B # <CJK>
+DDF4 693C # <CJK>
+DDF5 6B46 # <CJK>
+DDF6 6B45 # <CJK>
+DDF7 6B43 # <CJK>
+DDF8 6B42 # <CJK>
+DDF9 6B48 # <CJK>
+DDFA 6B41 # <CJK>
+DDFB 6B9B # <CJK>
+DDFC FA0D # CJK COMPATIBILITY IDEOGRAPH-FA0D
+DDFD 6BFB # <CJK>
+DDFE 6BFC # <CJK>
+DE40 6BF9 # <CJK>
+DE41 6BF7 # <CJK>
+DE42 6BF8 # <CJK>
+DE43 6E9B # <CJK>
+DE44 6ED6 # <CJK>
+DE45 6EC8 # <CJK>
+DE46 6E8F # <CJK>
+DE47 6EC0 # <CJK>
+DE48 6E9F # <CJK>
+DE49 6E93 # <CJK>
+DE4A 6E94 # <CJK>
+DE4B 6EA0 # <CJK>
+DE4C 6EB1 # <CJK>
+DE4D 6EB9 # <CJK>
+DE4E 6EC6 # <CJK>
+DE4F 6ED2 # <CJK>
+DE50 6EBD # <CJK>
+DE51 6EC1 # <CJK>
+DE52 6E9E # <CJK>
+DE53 6EC9 # <CJK>
+DE54 6EB7 # <CJK>
+DE55 6EB0 # <CJK>
+DE56 6ECD # <CJK>
+DE57 6EA6 # <CJK>
+DE58 6ECF # <CJK>
+DE59 6EB2 # <CJK>
+DE5A 6EBE # <CJK>
+DE5B 6EC3 # <CJK>
+DE5C 6EDC # <CJK>
+DE5D 6ED8 # <CJK>
+DE5E 6E99 # <CJK>
+DE5F 6E92 # <CJK>
+DE60 6E8E # <CJK>
+DE61 6E8D # <CJK>
+DE62 6EA4 # <CJK>
+DE63 6EA1 # <CJK>
+DE64 6EBF # <CJK>
+DE65 6EB3 # <CJK>
+DE66 6ED0 # <CJK>
+DE67 6ECA # <CJK>
+DE68 6E97 # <CJK>
+DE69 6EAE # <CJK>
+DE6A 6EA3 # <CJK>
+DE6B 7147 # <CJK>
+DE6C 7154 # <CJK>
+DE6D 7152 # <CJK>
+DE6E 7163 # <CJK>
+DE6F 7160 # <CJK>
+DE70 7141 # <CJK>
+DE71 715D # <CJK>
+DE72 7162 # <CJK>
+DE73 7172 # <CJK>
+DE74 7178 # <CJK>
+DE75 716A # <CJK>
+DE76 7161 # <CJK>
+DE77 7142 # <CJK>
+DE78 7158 # <CJK>
+DE79 7143 # <CJK>
+DE7A 714B # <CJK>
+DE7B 7170 # <CJK>
+DE7C 715F # <CJK>
+DE7D 7150 # <CJK>
+DE7E 7153 # <CJK>
+DEA1 7144 # <CJK>
+DEA2 714D # <CJK>
+DEA3 715A # <CJK>
+DEA4 724F # <CJK>
+DEA5 728D # <CJK>
+DEA6 728C # <CJK>
+DEA7 7291 # <CJK>
+DEA8 7290 # <CJK>
+DEA9 728E # <CJK>
+DEAA 733C # <CJK>
+DEAB 7342 # <CJK>
+DEAC 733B # <CJK>
+DEAD 733A # <CJK>
+DEAE 7340 # <CJK>
+DEAF 734A # <CJK>
+DEB0 7349 # <CJK>
+DEB1 7444 # <CJK>
+DEB2 744A # <CJK>
+DEB3 744B # <CJK>
+DEB4 7452 # <CJK>
+DEB5 7451 # <CJK>
+DEB6 7457 # <CJK>
+DEB7 7440 # <CJK>
+DEB8 744F # <CJK>
+DEB9 7450 # <CJK>
+DEBA 744E # <CJK>
+DEBB 7442 # <CJK>
+DEBC 7446 # <CJK>
+DEBD 744D # <CJK>
+DEBE 7454 # <CJK>
+DEBF 74E1 # <CJK>
+DEC0 74FF # <CJK>
+DEC1 74FE # <CJK>
+DEC2 74FD # <CJK>
+DEC3 751D # <CJK>
+DEC4 7579 # <CJK>
+DEC5 7577 # <CJK>
+DEC6 6983 # <CJK>
+DEC7 75EF # <CJK>
+DEC8 760F # <CJK>
+DEC9 7603 # <CJK>
+DECA 75F7 # <CJK>
+DECB 75FE # <CJK>
+DECC 75FC # <CJK>
+DECD 75F9 # <CJK>
+DECE 75F8 # <CJK>
+DECF 7610 # <CJK>
+DED0 75FB # <CJK>
+DED1 75F6 # <CJK>
+DED2 75ED # <CJK>
+DED3 75F5 # <CJK>
+DED4 75FD # <CJK>
+DED5 7699 # <CJK>
+DED6 76B5 # <CJK>
+DED7 76DD # <CJK>
+DED8 7755 # <CJK>
+DED9 775F # <CJK>
+DEDA 7760 # <CJK>
+DEDB 7752 # <CJK>
+DEDC 7756 # <CJK>
+DEDD 775A # <CJK>
+DEDE 7769 # <CJK>
+DEDF 7767 # <CJK>
+DEE0 7754 # <CJK>
+DEE1 7759 # <CJK>
+DEE2 776D # <CJK>
+DEE3 77E0 # <CJK>
+DEE4 7887 # <CJK>
+DEE5 789A # <CJK>
+DEE6 7894 # <CJK>
+DEE7 788F # <CJK>
+DEE8 7884 # <CJK>
+DEE9 7895 # <CJK>
+DEEA 7885 # <CJK>
+DEEB 7886 # <CJK>
+DEEC 78A1 # <CJK>
+DEED 7883 # <CJK>
+DEEE 7879 # <CJK>
+DEEF 7899 # <CJK>
+DEF0 7880 # <CJK>
+DEF1 7896 # <CJK>
+DEF2 787B # <CJK>
+DEF3 797C # <CJK>
+DEF4 7982 # <CJK>
+DEF5 797D # <CJK>
+DEF6 7979 # <CJK>
+DEF7 7A11 # <CJK>
+DEF8 7A18 # <CJK>
+DEF9 7A19 # <CJK>
+DEFA 7A12 # <CJK>
+DEFB 7A17 # <CJK>
+DEFC 7A15 # <CJK>
+DEFD 7A22 # <CJK>
+DEFE 7A13 # <CJK>
+DF40 7A1B # <CJK>
+DF41 7A10 # <CJK>
+DF42 7AA3 # <CJK>
+DF43 7AA2 # <CJK>
+DF44 7A9E # <CJK>
+DF45 7AEB # <CJK>
+DF46 7B66 # <CJK>
+DF47 7B64 # <CJK>
+DF48 7B6D # <CJK>
+DF49 7B74 # <CJK>
+DF4A 7B69 # <CJK>
+DF4B 7B72 # <CJK>
+DF4C 7B65 # <CJK>
+DF4D 7B73 # <CJK>
+DF4E 7B71 # <CJK>
+DF4F 7B70 # <CJK>
+DF50 7B61 # <CJK>
+DF51 7B78 # <CJK>
+DF52 7B76 # <CJK>
+DF53 7B63 # <CJK>
+DF54 7CB2 # <CJK>
+DF55 7CB4 # <CJK>
+DF56 7CAF # <CJK>
+DF57 7D88 # <CJK>
+DF58 7D86 # <CJK>
+DF59 7D80 # <CJK>
+DF5A 7D8D # <CJK>
+DF5B 7D7F # <CJK>
+DF5C 7D85 # <CJK>
+DF5D 7D7A # <CJK>
+DF5E 7D8E # <CJK>
+DF5F 7D7B # <CJK>
+DF60 7D83 # <CJK>
+DF61 7D7C # <CJK>
+DF62 7D8C # <CJK>
+DF63 7D94 # <CJK>
+DF64 7D84 # <CJK>
+DF65 7D7D # <CJK>
+DF66 7D92 # <CJK>
+DF67 7F6D # <CJK>
+DF68 7F6B # <CJK>
+DF69 7F67 # <CJK>
+DF6A 7F68 # <CJK>
+DF6B 7F6C # <CJK>
+DF6C 7FA6 # <CJK>
+DF6D 7FA5 # <CJK>
+DF6E 7FA7 # <CJK>
+DF6F 7FDB # <CJK>
+DF70 7FDC # <CJK>
+DF71 8021 # <CJK>
+DF72 8164 # <CJK>
+DF73 8160 # <CJK>
+DF74 8177 # <CJK>
+DF75 815C # <CJK>
+DF76 8169 # <CJK>
+DF77 815B # <CJK>
+DF78 8162 # <CJK>
+DF79 8172 # <CJK>
+DF7A 6721 # <CJK>
+DF7B 815E # <CJK>
+DF7C 8176 # <CJK>
+DF7D 8167 # <CJK>
+DF7E 816F # <CJK>
+DFA1 8144 # <CJK>
+DFA2 8161 # <CJK>
+DFA3 821D # <CJK>
+DFA4 8249 # <CJK>
+DFA5 8244 # <CJK>
+DFA6 8240 # <CJK>
+DFA7 8242 # <CJK>
+DFA8 8245 # <CJK>
+DFA9 84F1 # <CJK>
+DFAA 843F # <CJK>
+DFAB 8456 # <CJK>
+DFAC 8476 # <CJK>
+DFAD 8479 # <CJK>
+DFAE 848F # <CJK>
+DFAF 848D # <CJK>
+DFB0 8465 # <CJK>
+DFB1 8451 # <CJK>
+DFB2 8440 # <CJK>
+DFB3 8486 # <CJK>
+DFB4 8467 # <CJK>
+DFB5 8430 # <CJK>
+DFB6 844D # <CJK>
+DFB7 847D # <CJK>
+DFB8 845A # <CJK>
+DFB9 8459 # <CJK>
+DFBA 8474 # <CJK>
+DFBB 8473 # <CJK>
+DFBC 845D # <CJK>
+DFBD 8507 # <CJK>
+DFBE 845E # <CJK>
+DFBF 8437 # <CJK>
+DFC0 843A # <CJK>
+DFC1 8434 # <CJK>
+DFC2 847A # <CJK>
+DFC3 8443 # <CJK>
+DFC4 8478 # <CJK>
+DFC5 8432 # <CJK>
+DFC6 8445 # <CJK>
+DFC7 8429 # <CJK>
+DFC8 83D9 # <CJK>
+DFC9 844B # <CJK>
+DFCA 842F # <CJK>
+DFCB 8442 # <CJK>
+DFCC 842D # <CJK>
+DFCD 845F # <CJK>
+DFCE 8470 # <CJK>
+DFCF 8439 # <CJK>
+DFD0 844E # <CJK>
+DFD1 844C # <CJK>
+DFD2 8452 # <CJK>
+DFD3 846F # <CJK>
+DFD4 84C5 # <CJK>
+DFD5 848E # <CJK>
+DFD6 843B # <CJK>
+DFD7 8447 # <CJK>
+DFD8 8436 # <CJK>
+DFD9 8433 # <CJK>
+DFDA 8468 # <CJK>
+DFDB 847E # <CJK>
+DFDC 8444 # <CJK>
+DFDD 842B # <CJK>
+DFDE 8460 # <CJK>
+DFDF 8454 # <CJK>
+DFE0 846E # <CJK>
+DFE1 8450 # <CJK>
+DFE2 870B # <CJK>
+DFE3 8704 # <CJK>
+DFE4 86F7 # <CJK>
+DFE5 870C # <CJK>
+DFE6 86FA # <CJK>
+DFE7 86D6 # <CJK>
+DFE8 86F5 # <CJK>
+DFE9 874D # <CJK>
+DFEA 86F8 # <CJK>
+DFEB 870E # <CJK>
+DFEC 8709 # <CJK>
+DFED 8701 # <CJK>
+DFEE 86F6 # <CJK>
+DFEF 870D # <CJK>
+DFF0 8705 # <CJK>
+DFF1 88D6 # <CJK>
+DFF2 88CB # <CJK>
+DFF3 88CD # <CJK>
+DFF4 88CE # <CJK>
+DFF5 88DE # <CJK>
+DFF6 88DB # <CJK>
+DFF7 88DA # <CJK>
+DFF8 88CC # <CJK>
+DFF9 88D0 # <CJK>
+DFFA 8985 # <CJK>
+DFFB 899B # <CJK>
+DFFC 89DF # <CJK>
+DFFD 89E5 # <CJK>
+DFFE 89E4 # <CJK>
+E040 89E1 # <CJK>
+E041 89E0 # <CJK>
+E042 89E2 # <CJK>
+E043 89DC # <CJK>
+E044 89E6 # <CJK>
+E045 8A76 # <CJK>
+E046 8A86 # <CJK>
+E047 8A7F # <CJK>
+E048 8A61 # <CJK>
+E049 8A3F # <CJK>
+E04A 8A77 # <CJK>
+E04B 8A82 # <CJK>
+E04C 8A84 # <CJK>
+E04D 8A75 # <CJK>
+E04E 8A83 # <CJK>
+E04F 8A81 # <CJK>
+E050 8A74 # <CJK>
+E051 8A7A # <CJK>
+E052 8C3C # <CJK>
+E053 8C4B # <CJK>
+E054 8C4A # <CJK>
+E055 8C65 # <CJK>
+E056 8C64 # <CJK>
+E057 8C66 # <CJK>
+E058 8C86 # <CJK>
+E059 8C84 # <CJK>
+E05A 8C85 # <CJK>
+E05B 8CCC # <CJK>
+E05C 8D68 # <CJK>
+E05D 8D69 # <CJK>
+E05E 8D91 # <CJK>
+E05F 8D8C # <CJK>
+E060 8D8E # <CJK>
+E061 8D8F # <CJK>
+E062 8D8D # <CJK>
+E063 8D93 # <CJK>
+E064 8D94 # <CJK>
+E065 8D90 # <CJK>
+E066 8D92 # <CJK>
+E067 8DF0 # <CJK>
+E068 8DE0 # <CJK>
+E069 8DEC # <CJK>
+E06A 8DF1 # <CJK>
+E06B 8DEE # <CJK>
+E06C 8DD0 # <CJK>
+E06D 8DE9 # <CJK>
+E06E 8DE3 # <CJK>
+E06F 8DE2 # <CJK>
+E070 8DE7 # <CJK>
+E071 8DF2 # <CJK>
+E072 8DEB # <CJK>
+E073 8DF4 # <CJK>
+E074 8F06 # <CJK>
+E075 8EFF # <CJK>
+E076 8F01 # <CJK>
+E077 8F00 # <CJK>
+E078 8F05 # <CJK>
+E079 8F07 # <CJK>
+E07A 8F08 # <CJK>
+E07B 8F02 # <CJK>
+E07C 8F0B # <CJK>
+E07D 9052 # <CJK>
+E07E 903F # <CJK>
+E0A1 9044 # <CJK>
+E0A2 9049 # <CJK>
+E0A3 903D # <CJK>
+E0A4 9110 # <CJK>
+E0A5 910D # <CJK>
+E0A6 910F # <CJK>
+E0A7 9111 # <CJK>
+E0A8 9116 # <CJK>
+E0A9 9114 # <CJK>
+E0AA 910B # <CJK>
+E0AB 910E # <CJK>
+E0AC 916E # <CJK>
+E0AD 916F # <CJK>
+E0AE 9248 # <CJK>
+E0AF 9252 # <CJK>
+E0B0 9230 # <CJK>
+E0B1 923A # <CJK>
+E0B2 9266 # <CJK>
+E0B3 9233 # <CJK>
+E0B4 9265 # <CJK>
+E0B5 925E # <CJK>
+E0B6 9283 # <CJK>
+E0B7 922E # <CJK>
+E0B8 924A # <CJK>
+E0B9 9246 # <CJK>
+E0BA 926D # <CJK>
+E0BB 926C # <CJK>
+E0BC 924F # <CJK>
+E0BD 9260 # <CJK>
+E0BE 9267 # <CJK>
+E0BF 926F # <CJK>
+E0C0 9236 # <CJK>
+E0C1 9261 # <CJK>
+E0C2 9270 # <CJK>
+E0C3 9231 # <CJK>
+E0C4 9254 # <CJK>
+E0C5 9263 # <CJK>
+E0C6 9250 # <CJK>
+E0C7 9272 # <CJK>
+E0C8 924E # <CJK>
+E0C9 9253 # <CJK>
+E0CA 924C # <CJK>
+E0CB 9256 # <CJK>
+E0CC 9232 # <CJK>
+E0CD 959F # <CJK>
+E0CE 959C # <CJK>
+E0CF 959E # <CJK>
+E0D0 959B # <CJK>
+E0D1 9692 # <CJK>
+E0D2 9693 # <CJK>
+E0D3 9691 # <CJK>
+E0D4 9697 # <CJK>
+E0D5 96CE # <CJK>
+E0D6 96FA # <CJK>
+E0D7 96FD # <CJK>
+E0D8 96F8 # <CJK>
+E0D9 96F5 # <CJK>
+E0DA 9773 # <CJK>
+E0DB 9777 # <CJK>
+E0DC 9778 # <CJK>
+E0DD 9772 # <CJK>
+E0DE 980F # <CJK>
+E0DF 980D # <CJK>
+E0E0 980E # <CJK>
+E0E1 98AC # <CJK>
+E0E2 98F6 # <CJK>
+E0E3 98F9 # <CJK>
+E0E4 99AF # <CJK>
+E0E5 99B2 # <CJK>
+E0E6 99B0 # <CJK>
+E0E7 99B5 # <CJK>
+E0E8 9AAD # <CJK>
+E0E9 9AAB # <CJK>
+E0EA 9B5B # <CJK>
+E0EB 9CEA # <CJK>
+E0EC 9CED # <CJK>
+E0ED 9CE7 # <CJK>
+E0EE 9E80 # <CJK>
+E0EF 9EFD # <CJK>
+E0F0 50E6 # <CJK>
+E0F1 50D4 # <CJK>
+E0F2 50D7 # <CJK>
+E0F3 50E8 # <CJK>
+E0F4 50F3 # <CJK>
+E0F5 50DB # <CJK>
+E0F6 50EA # <CJK>
+E0F7 50DD # <CJK>
+E0F8 50E4 # <CJK>
+E0F9 50D3 # <CJK>
+E0FA 50EC # <CJK>
+E0FB 50F0 # <CJK>
+E0FC 50EF # <CJK>
+E0FD 50E3 # <CJK>
+E0FE 50E0 # <CJK>
+E140 51D8 # <CJK>
+E141 5280 # <CJK>
+E142 5281 # <CJK>
+E143 52E9 # <CJK>
+E144 52EB # <CJK>
+E145 5330 # <CJK>
+E146 53AC # <CJK>
+E147 5627 # <CJK>
+E148 5615 # <CJK>
+E149 560C # <CJK>
+E14A 5612 # <CJK>
+E14B 55FC # <CJK>
+E14C 560F # <CJK>
+E14D 561C # <CJK>
+E14E 5601 # <CJK>
+E14F 5613 # <CJK>
+E150 5602 # <CJK>
+E151 55FA # <CJK>
+E152 561D # <CJK>
+E153 5604 # <CJK>
+E154 55FF # <CJK>
+E155 55F9 # <CJK>
+E156 5889 # <CJK>
+E157 587C # <CJK>
+E158 5890 # <CJK>
+E159 5898 # <CJK>
+E15A 5886 # <CJK>
+E15B 5881 # <CJK>
+E15C 587F # <CJK>
+E15D 5874 # <CJK>
+E15E 588B # <CJK>
+E15F 587A # <CJK>
+E160 5887 # <CJK>
+E161 5891 # <CJK>
+E162 588E # <CJK>
+E163 5876 # <CJK>
+E164 5882 # <CJK>
+E165 5888 # <CJK>
+E166 587B # <CJK>
+E167 5894 # <CJK>
+E168 588F # <CJK>
+E169 58FE # <CJK>
+E16A 596B # <CJK>
+E16B 5ADC # <CJK>
+E16C 5AEE # <CJK>
+E16D 5AE5 # <CJK>
+E16E 5AD5 # <CJK>
+E16F 5AEA # <CJK>
+E170 5ADA # <CJK>
+E171 5AED # <CJK>
+E172 5AEB # <CJK>
+E173 5AF3 # <CJK>
+E174 5AE2 # <CJK>
+E175 5AE0 # <CJK>
+E176 5ADB # <CJK>
+E177 5AEC # <CJK>
+E178 5ADE # <CJK>
+E179 5ADD # <CJK>
+E17A 5AD9 # <CJK>
+E17B 5AE8 # <CJK>
+E17C 5ADF # <CJK>
+E17D 5B77 # <CJK>
+E17E 5BE0 # <CJK>
+E1A1 5BE3 # <CJK>
+E1A2 5C63 # <CJK>
+E1A3 5D82 # <CJK>
+E1A4 5D80 # <CJK>
+E1A5 5D7D # <CJK>
+E1A6 5D86 # <CJK>
+E1A7 5D7A # <CJK>
+E1A8 5D81 # <CJK>
+E1A9 5D77 # <CJK>
+E1AA 5D8A # <CJK>
+E1AB 5D89 # <CJK>
+E1AC 5D88 # <CJK>
+E1AD 5D7E # <CJK>
+E1AE 5D7C # <CJK>
+E1AF 5D8D # <CJK>
+E1B0 5D79 # <CJK>
+E1B1 5D7F # <CJK>
+E1B2 5E58 # <CJK>
+E1B3 5E59 # <CJK>
+E1B4 5E53 # <CJK>
+E1B5 5ED8 # <CJK>
+E1B6 5ED1 # <CJK>
+E1B7 5ED7 # <CJK>
+E1B8 5ECE # <CJK>
+E1B9 5EDC # <CJK>
+E1BA 5ED5 # <CJK>
+E1BB 5ED9 # <CJK>
+E1BC 5ED2 # <CJK>
+E1BD 5ED4 # <CJK>
+E1BE 5F44 # <CJK>
+E1BF 5F43 # <CJK>
+E1C0 5F6F # <CJK>
+E1C1 5FB6 # <CJK>
+E1C2 612C # <CJK>
+E1C3 6128 # <CJK>
+E1C4 6141 # <CJK>
+E1C5 615E # <CJK>
+E1C6 6171 # <CJK>
+E1C7 6173 # <CJK>
+E1C8 6152 # <CJK>
+E1C9 6153 # <CJK>
+E1CA 6172 # <CJK>
+E1CB 616C # <CJK>
+E1CC 6180 # <CJK>
+E1CD 6174 # <CJK>
+E1CE 6154 # <CJK>
+E1CF 617A # <CJK>
+E1D0 615B # <CJK>
+E1D1 6165 # <CJK>
+E1D2 613B # <CJK>
+E1D3 616A # <CJK>
+E1D4 6161 # <CJK>
+E1D5 6156 # <CJK>
+E1D6 6229 # <CJK>
+E1D7 6227 # <CJK>
+E1D8 622B # <CJK>
+E1D9 642B # <CJK>
+E1DA 644D # <CJK>
+E1DB 645B # <CJK>
+E1DC 645D # <CJK>
+E1DD 6474 # <CJK>
+E1DE 6476 # <CJK>
+E1DF 6472 # <CJK>
+E1E0 6473 # <CJK>
+E1E1 647D # <CJK>
+E1E2 6475 # <CJK>
+E1E3 6466 # <CJK>
+E1E4 64A6 # <CJK>
+E1E5 644E # <CJK>
+E1E6 6482 # <CJK>
+E1E7 645E # <CJK>
+E1E8 645C # <CJK>
+E1E9 644B # <CJK>
+E1EA 6453 # <CJK>
+E1EB 6460 # <CJK>
+E1EC 6450 # <CJK>
+E1ED 647F # <CJK>
+E1EE 643F # <CJK>
+E1EF 646C # <CJK>
+E1F0 646B # <CJK>
+E1F1 6459 # <CJK>
+E1F2 6465 # <CJK>
+E1F3 6477 # <CJK>
+E1F4 6573 # <CJK>
+E1F5 65A0 # <CJK>
+E1F6 66A1 # <CJK>
+E1F7 66A0 # <CJK>
+E1F8 669F # <CJK>
+E1F9 6705 # <CJK>
+E1FA 6704 # <CJK>
+E1FB 6722 # <CJK>
+E1FC 69B1 # <CJK>
+E1FD 69B6 # <CJK>
+E1FE 69C9 # <CJK>
+E240 69A0 # <CJK>
+E241 69CE # <CJK>
+E242 6996 # <CJK>
+E243 69B0 # <CJK>
+E244 69AC # <CJK>
+E245 69BC # <CJK>
+E246 6991 # <CJK>
+E247 6999 # <CJK>
+E248 698E # <CJK>
+E249 69A7 # <CJK>
+E24A 698D # <CJK>
+E24B 69A9 # <CJK>
+E24C 69BE # <CJK>
+E24D 69AF # <CJK>
+E24E 69BF # <CJK>
+E24F 69C4 # <CJK>
+E250 69BD # <CJK>
+E251 69A4 # <CJK>
+E252 69D4 # <CJK>
+E253 69B9 # <CJK>
+E254 69CA # <CJK>
+E255 699A # <CJK>
+E256 69CF # <CJK>
+E257 69B3 # <CJK>
+E258 6993 # <CJK>
+E259 69AA # <CJK>
+E25A 69A1 # <CJK>
+E25B 699E # <CJK>
+E25C 69D9 # <CJK>
+E25D 6997 # <CJK>
+E25E 6990 # <CJK>
+E25F 69C2 # <CJK>
+E260 69B5 # <CJK>
+E261 69A5 # <CJK>
+E262 69C6 # <CJK>
+E263 6B4A # <CJK>
+E264 6B4D # <CJK>
+E265 6B4B # <CJK>
+E266 6B9E # <CJK>
+E267 6B9F # <CJK>
+E268 6BA0 # <CJK>
+E269 6BC3 # <CJK>
+E26A 6BC4 # <CJK>
+E26B 6BFE # <CJK>
+E26C 6ECE # <CJK>
+E26D 6EF5 # <CJK>
+E26E 6EF1 # <CJK>
+E26F 6F03 # <CJK>
+E270 6F25 # <CJK>
+E271 6EF8 # <CJK>
+E272 6F37 # <CJK>
+E273 6EFB # <CJK>
+E274 6F2E # <CJK>
+E275 6F09 # <CJK>
+E276 6F4E # <CJK>
+E277 6F19 # <CJK>
+E278 6F1A # <CJK>
+E279 6F27 # <CJK>
+E27A 6F18 # <CJK>
+E27B 6F3B # <CJK>
+E27C 6F12 # <CJK>
+E27D 6EED # <CJK>
+E27E 6F0A # <CJK>
+E2A1 6F36 # <CJK>
+E2A2 6F73 # <CJK>
+E2A3 6EF9 # <CJK>
+E2A4 6EEE # <CJK>
+E2A5 6F2D # <CJK>
+E2A6 6F40 # <CJK>
+E2A7 6F30 # <CJK>
+E2A8 6F3C # <CJK>
+E2A9 6F35 # <CJK>
+E2AA 6EEB # <CJK>
+E2AB 6F07 # <CJK>
+E2AC 6F0E # <CJK>
+E2AD 6F43 # <CJK>
+E2AE 6F05 # <CJK>
+E2AF 6EFD # <CJK>
+E2B0 6EF6 # <CJK>
+E2B1 6F39 # <CJK>
+E2B2 6F1C # <CJK>
+E2B3 6EFC # <CJK>
+E2B4 6F3A # <CJK>
+E2B5 6F1F # <CJK>
+E2B6 6F0D # <CJK>
+E2B7 6F1E # <CJK>
+E2B8 6F08 # <CJK>
+E2B9 6F21 # <CJK>
+E2BA 7187 # <CJK>
+E2BB 7190 # <CJK>
+E2BC 7189 # <CJK>
+E2BD 7180 # <CJK>
+E2BE 7185 # <CJK>
+E2BF 7182 # <CJK>
+E2C0 718F # <CJK>
+E2C1 717B # <CJK>
+E2C2 7186 # <CJK>
+E2C3 7181 # <CJK>
+E2C4 7197 # <CJK>
+E2C5 7244 # <CJK>
+E2C6 7253 # <CJK>
+E2C7 7297 # <CJK>
+E2C8 7295 # <CJK>
+E2C9 7293 # <CJK>
+E2CA 7343 # <CJK>
+E2CB 734D # <CJK>
+E2CC 7351 # <CJK>
+E2CD 734C # <CJK>
+E2CE 7462 # <CJK>
+E2CF 7473 # <CJK>
+E2D0 7471 # <CJK>
+E2D1 7475 # <CJK>
+E2D2 7472 # <CJK>
+E2D3 7467 # <CJK>
+E2D4 746E # <CJK>
+E2D5 7500 # <CJK>
+E2D6 7502 # <CJK>
+E2D7 7503 # <CJK>
+E2D8 757D # <CJK>
+E2D9 7590 # <CJK>
+E2DA 7616 # <CJK>
+E2DB 7608 # <CJK>
+E2DC 760C # <CJK>
+E2DD 7615 # <CJK>
+E2DE 7611 # <CJK>
+E2DF 760A # <CJK>
+E2E0 7614 # <CJK>
+E2E1 76B8 # <CJK>
+E2E2 7781 # <CJK>
+E2E3 777C # <CJK>
+E2E4 7785 # <CJK>
+E2E5 7782 # <CJK>
+E2E6 776E # <CJK>
+E2E7 7780 # <CJK>
+E2E8 776F # <CJK>
+E2E9 777E # <CJK>
+E2EA 7783 # <CJK>
+E2EB 78B2 # <CJK>
+E2EC 78AA # <CJK>
+E2ED 78B4 # <CJK>
+E2EE 78AD # <CJK>
+E2EF 78A8 # <CJK>
+E2F0 787E # <CJK>
+E2F1 78AB # <CJK>
+E2F2 789E # <CJK>
+E2F3 78A5 # <CJK>
+E2F4 78A0 # <CJK>
+E2F5 78AC # <CJK>
+E2F6 78A2 # <CJK>
+E2F7 78A4 # <CJK>
+E2F8 7998 # <CJK>
+E2F9 798A # <CJK>
+E2FA 798B # <CJK>
+E2FB 7996 # <CJK>
+E2FC 7995 # <CJK>
+E2FD 7994 # <CJK>
+E2FE 7993 # <CJK>
+E340 7997 # <CJK>
+E341 7988 # <CJK>
+E342 7992 # <CJK>
+E343 7990 # <CJK>
+E344 7A2B # <CJK>
+E345 7A4A # <CJK>
+E346 7A30 # <CJK>
+E347 7A2F # <CJK>
+E348 7A28 # <CJK>
+E349 7A26 # <CJK>
+E34A 7AA8 # <CJK>
+E34B 7AAB # <CJK>
+E34C 7AAC # <CJK>
+E34D 7AEE # <CJK>
+E34E 7B88 # <CJK>
+E34F 7B9C # <CJK>
+E350 7B8A # <CJK>
+E351 7B91 # <CJK>
+E352 7B90 # <CJK>
+E353 7B96 # <CJK>
+E354 7B8D # <CJK>
+E355 7B8C # <CJK>
+E356 7B9B # <CJK>
+E357 7B8E # <CJK>
+E358 7B85 # <CJK>
+E359 7B98 # <CJK>
+E35A 5284 # <CJK>
+E35B 7B99 # <CJK>
+E35C 7BA4 # <CJK>
+E35D 7B82 # <CJK>
+E35E 7CBB # <CJK>
+E35F 7CBF # <CJK>
+E360 7CBC # <CJK>
+E361 7CBA # <CJK>
+E362 7DA7 # <CJK>
+E363 7DB7 # <CJK>
+E364 7DC2 # <CJK>
+E365 7DA3 # <CJK>
+E366 7DAA # <CJK>
+E367 7DC1 # <CJK>
+E368 7DC0 # <CJK>
+E369 7DC5 # <CJK>
+E36A 7D9D # <CJK>
+E36B 7DCE # <CJK>
+E36C 7DC4 # <CJK>
+E36D 7DC6 # <CJK>
+E36E 7DCB # <CJK>
+E36F 7DCC # <CJK>
+E370 7DAF # <CJK>
+E371 7DB9 # <CJK>
+E372 7D96 # <CJK>
+E373 7DBC # <CJK>
+E374 7D9F # <CJK>
+E375 7DA6 # <CJK>
+E376 7DAE # <CJK>
+E377 7DA9 # <CJK>
+E378 7DA1 # <CJK>
+E379 7DC9 # <CJK>
+E37A 7F73 # <CJK>
+E37B 7FE2 # <CJK>
+E37C 7FE3 # <CJK>
+E37D 7FE5 # <CJK>
+E37E 7FDE # <CJK>
+E3A1 8024 # <CJK>
+E3A2 805D # <CJK>
+E3A3 805C # <CJK>
+E3A4 8189 # <CJK>
+E3A5 8186 # <CJK>
+E3A6 8183 # <CJK>
+E3A7 8187 # <CJK>
+E3A8 818D # <CJK>
+E3A9 818C # <CJK>
+E3AA 818B # <CJK>
+E3AB 8215 # <CJK>
+E3AC 8497 # <CJK>
+E3AD 84A4 # <CJK>
+E3AE 84A1 # <CJK>
+E3AF 849F # <CJK>
+E3B0 84BA # <CJK>
+E3B1 84CE # <CJK>
+E3B2 84C2 # <CJK>
+E3B3 84AC # <CJK>
+E3B4 84AE # <CJK>
+E3B5 84AB # <CJK>
+E3B6 84B9 # <CJK>
+E3B7 84B4 # <CJK>
+E3B8 84C1 # <CJK>
+E3B9 84CD # <CJK>
+E3BA 84AA # <CJK>
+E3BB 849A # <CJK>
+E3BC 84B1 # <CJK>
+E3BD 84D0 # <CJK>
+E3BE 849D # <CJK>
+E3BF 84A7 # <CJK>
+E3C0 84BB # <CJK>
+E3C1 84A2 # <CJK>
+E3C2 8494 # <CJK>
+E3C3 84C7 # <CJK>
+E3C4 84CC # <CJK>
+E3C5 849B # <CJK>
+E3C6 84A9 # <CJK>
+E3C7 84AF # <CJK>
+E3C8 84A8 # <CJK>
+E3C9 84D6 # <CJK>
+E3CA 8498 # <CJK>
+E3CB 84B6 # <CJK>
+E3CC 84CF # <CJK>
+E3CD 84A0 # <CJK>
+E3CE 84D7 # <CJK>
+E3CF 84D4 # <CJK>
+E3D0 84D2 # <CJK>
+E3D1 84DB # <CJK>
+E3D2 84B0 # <CJK>
+E3D3 8491 # <CJK>
+E3D4 8661 # <CJK>
+E3D5 8733 # <CJK>
+E3D6 8723 # <CJK>
+E3D7 8728 # <CJK>
+E3D8 876B # <CJK>
+E3D9 8740 # <CJK>
+E3DA 872E # <CJK>
+E3DB 871E # <CJK>
+E3DC 8721 # <CJK>
+E3DD 8719 # <CJK>
+E3DE 871B # <CJK>
+E3DF 8743 # <CJK>
+E3E0 872C # <CJK>
+E3E1 8741 # <CJK>
+E3E2 873E # <CJK>
+E3E3 8746 # <CJK>
+E3E4 8720 # <CJK>
+E3E5 8732 # <CJK>
+E3E6 872A # <CJK>
+E3E7 872D # <CJK>
+E3E8 873C # <CJK>
+E3E9 8712 # <CJK>
+E3EA 873A # <CJK>
+E3EB 8731 # <CJK>
+E3EC 8735 # <CJK>
+E3ED 8742 # <CJK>
+E3EE 8726 # <CJK>
+E3EF 8727 # <CJK>
+E3F0 8738 # <CJK>
+E3F1 8724 # <CJK>
+E3F2 871A # <CJK>
+E3F3 8730 # <CJK>
+E3F4 8711 # <CJK>
+E3F5 88F7 # <CJK>
+E3F6 88E7 # <CJK>
+E3F7 88F1 # <CJK>
+E3F8 88F2 # <CJK>
+E3F9 88FA # <CJK>
+E3FA 88FE # <CJK>
+E3FB 88EE # <CJK>
+E3FC 88FC # <CJK>
+E3FD 88F6 # <CJK>
+E3FE 88FB # <CJK>
+E440 88F0 # <CJK>
+E441 88EC # <CJK>
+E442 88EB # <CJK>
+E443 899D # <CJK>
+E444 89A1 # <CJK>
+E445 899F # <CJK>
+E446 899E # <CJK>
+E447 89E9 # <CJK>
+E448 89EB # <CJK>
+E449 89E8 # <CJK>
+E44A 8AAB # <CJK>
+E44B 8A99 # <CJK>
+E44C 8A8B # <CJK>
+E44D 8A92 # <CJK>
+E44E 8A8F # <CJK>
+E44F 8A96 # <CJK>
+E450 8C3D # <CJK>
+E451 8C68 # <CJK>
+E452 8C69 # <CJK>
+E453 8CD5 # <CJK>
+E454 8CCF # <CJK>
+E455 8CD7 # <CJK>
+E456 8D96 # <CJK>
+E457 8E09 # <CJK>
+E458 8E02 # <CJK>
+E459 8DFF # <CJK>
+E45A 8E0D # <CJK>
+E45B 8DFD # <CJK>
+E45C 8E0A # <CJK>
+E45D 8E03 # <CJK>
+E45E 8E07 # <CJK>
+E45F 8E06 # <CJK>
+E460 8E05 # <CJK>
+E461 8DFE # <CJK>
+E462 8E00 # <CJK>
+E463 8E04 # <CJK>
+E464 8F10 # <CJK>
+E465 8F11 # <CJK>
+E466 8F0E # <CJK>
+E467 8F0D # <CJK>
+E468 9123 # <CJK>
+E469 911C # <CJK>
+E46A 9120 # <CJK>
+E46B 9122 # <CJK>
+E46C 911F # <CJK>
+E46D 911D # <CJK>
+E46E 911A # <CJK>
+E46F 9124 # <CJK>
+E470 9121 # <CJK>
+E471 911B # <CJK>
+E472 917A # <CJK>
+E473 9172 # <CJK>
+E474 9179 # <CJK>
+E475 9173 # <CJK>
+E476 92A5 # <CJK>
+E477 92A4 # <CJK>
+E478 9276 # <CJK>
+E479 929B # <CJK>
+E47A 927A # <CJK>
+E47B 92A0 # <CJK>
+E47C 9294 # <CJK>
+E47D 92AA # <CJK>
+E47E 928D # <CJK>
+E4A1 92A6 # <CJK>
+E4A2 929A # <CJK>
+E4A3 92AB # <CJK>
+E4A4 9279 # <CJK>
+E4A5 9297 # <CJK>
+E4A6 927F # <CJK>
+E4A7 92A3 # <CJK>
+E4A8 92EE # <CJK>
+E4A9 928E # <CJK>
+E4AA 9282 # <CJK>
+E4AB 9295 # <CJK>
+E4AC 92A2 # <CJK>
+E4AD 927D # <CJK>
+E4AE 9288 # <CJK>
+E4AF 92A1 # <CJK>
+E4B0 928A # <CJK>
+E4B1 9286 # <CJK>
+E4B2 928C # <CJK>
+E4B3 9299 # <CJK>
+E4B4 92A7 # <CJK>
+E4B5 927E # <CJK>
+E4B6 9287 # <CJK>
+E4B7 92A9 # <CJK>
+E4B8 929D # <CJK>
+E4B9 928B # <CJK>
+E4BA 922D # <CJK>
+E4BB 969E # <CJK>
+E4BC 96A1 # <CJK>
+E4BD 96FF # <CJK>
+E4BE 9758 # <CJK>
+E4BF 977D # <CJK>
+E4C0 977A # <CJK>
+E4C1 977E # <CJK>
+E4C2 9783 # <CJK>
+E4C3 9780 # <CJK>
+E4C4 9782 # <CJK>
+E4C5 977B # <CJK>
+E4C6 9784 # <CJK>
+E4C7 9781 # <CJK>
+E4C8 977F # <CJK>
+E4C9 97CE # <CJK>
+E4CA 97CD # <CJK>
+E4CB 9816 # <CJK>
+E4CC 98AD # <CJK>
+E4CD 98AE # <CJK>
+E4CE 9902 # <CJK>
+E4CF 9900 # <CJK>
+E4D0 9907 # <CJK>
+E4D1 999D # <CJK>
+E4D2 999C # <CJK>
+E4D3 99C3 # <CJK>
+E4D4 99B9 # <CJK>
+E4D5 99BB # <CJK>
+E4D6 99BA # <CJK>
+E4D7 99C2 # <CJK>
+E4D8 99BD # <CJK>
+E4D9 99C7 # <CJK>
+E4DA 9AB1 # <CJK>
+E4DB 9AE3 # <CJK>
+E4DC 9AE7 # <CJK>
+E4DD 9B3E # <CJK>
+E4DE 9B3F # <CJK>
+E4DF 9B60 # <CJK>
+E4E0 9B61 # <CJK>
+E4E1 9B5F # <CJK>
+E4E2 9CF1 # <CJK>
+E4E3 9CF2 # <CJK>
+E4E4 9CF5 # <CJK>
+E4E5 9EA7 # <CJK>
+E4E6 50FF # <CJK>
+E4E7 5103 # <CJK>
+E4E8 5130 # <CJK>
+E4E9 50F8 # <CJK>
+E4EA 5106 # <CJK>
+E4EB 5107 # <CJK>
+E4EC 50F6 # <CJK>
+E4ED 50FE # <CJK>
+E4EE 510B # <CJK>
+E4EF 510C # <CJK>
+E4F0 50FD # <CJK>
+E4F1 510A # <CJK>
+E4F2 528B # <CJK>
+E4F3 528C # <CJK>
+E4F4 52F1 # <CJK>
+E4F5 52EF # <CJK>
+E4F6 5648 # <CJK>
+E4F7 5642 # <CJK>
+E4F8 564C # <CJK>
+E4F9 5635 # <CJK>
+E4FA 5641 # <CJK>
+E4FB 564A # <CJK>
+E4FC 5649 # <CJK>
+E4FD 5646 # <CJK>
+E4FE 5658 # <CJK>
+E540 565A # <CJK>
+E541 5640 # <CJK>
+E542 5633 # <CJK>
+E543 563D # <CJK>
+E544 562C # <CJK>
+E545 563E # <CJK>
+E546 5638 # <CJK>
+E547 562A # <CJK>
+E548 563A # <CJK>
+E549 571A # <CJK>
+E54A 58AB # <CJK>
+E54B 589D # <CJK>
+E54C 58B1 # <CJK>
+E54D 58A0 # <CJK>
+E54E 58A3 # <CJK>
+E54F 58AF # <CJK>
+E550 58AC # <CJK>
+E551 58A5 # <CJK>
+E552 58A1 # <CJK>
+E553 58FF # <CJK>
+E554 5AFF # <CJK>
+E555 5AF4 # <CJK>
+E556 5AFD # <CJK>
+E557 5AF7 # <CJK>
+E558 5AF6 # <CJK>
+E559 5B03 # <CJK>
+E55A 5AF8 # <CJK>
+E55B 5B02 # <CJK>
+E55C 5AF9 # <CJK>
+E55D 5B01 # <CJK>
+E55E 5B07 # <CJK>
+E55F 5B05 # <CJK>
+E560 5B0F # <CJK>
+E561 5C67 # <CJK>
+E562 5D99 # <CJK>
+E563 5D97 # <CJK>
+E564 5D9F # <CJK>
+E565 5D92 # <CJK>
+E566 5DA2 # <CJK>
+E567 5D93 # <CJK>
+E568 5D95 # <CJK>
+E569 5DA0 # <CJK>
+E56A 5D9C # <CJK>
+E56B 5DA1 # <CJK>
+E56C 5D9A # <CJK>
+E56D 5D9E # <CJK>
+E56E 5E69 # <CJK>
+E56F 5E5D # <CJK>
+E570 5E60 # <CJK>
+E571 5E5C # <CJK>
+E572 7DF3 # <CJK>
+E573 5EDB # <CJK>
+E574 5EDE # <CJK>
+E575 5EE1 # <CJK>
+E576 5F49 # <CJK>
+E577 5FB2 # <CJK>
+E578 618B # <CJK>
+E579 6183 # <CJK>
+E57A 6179 # <CJK>
+E57B 61B1 # <CJK>
+E57C 61B0 # <CJK>
+E57D 61A2 # <CJK>
+E57E 6189 # <CJK>
+E5A1 619B # <CJK>
+E5A2 6193 # <CJK>
+E5A3 61AF # <CJK>
+E5A4 61AD # <CJK>
+E5A5 619F # <CJK>
+E5A6 6192 # <CJK>
+E5A7 61AA # <CJK>
+E5A8 61A1 # <CJK>
+E5A9 618D # <CJK>
+E5AA 6166 # <CJK>
+E5AB 61B3 # <CJK>
+E5AC 622D # <CJK>
+E5AD 646E # <CJK>
+E5AE 6470 # <CJK>
+E5AF 6496 # <CJK>
+E5B0 64A0 # <CJK>
+E5B1 6485 # <CJK>
+E5B2 6497 # <CJK>
+E5B3 649C # <CJK>
+E5B4 648F # <CJK>
+E5B5 648B # <CJK>
+E5B6 648A # <CJK>
+E5B7 648C # <CJK>
+E5B8 64A3 # <CJK>
+E5B9 649F # <CJK>
+E5BA 6468 # <CJK>
+E5BB 64B1 # <CJK>
+E5BC 6498 # <CJK>
+E5BD 6576 # <CJK>
+E5BE 657A # <CJK>
+E5BF 6579 # <CJK>
+E5C0 657B # <CJK>
+E5C1 65B2 # <CJK>
+E5C2 65B3 # <CJK>
+E5C3 66B5 # <CJK>
+E5C4 66B0 # <CJK>
+E5C5 66A9 # <CJK>
+E5C6 66B2 # <CJK>
+E5C7 66B7 # <CJK>
+E5C8 66AA # <CJK>
+E5C9 66AF # <CJK>
+E5CA 6A00 # <CJK>
+E5CB 6A06 # <CJK>
+E5CC 6A17 # <CJK>
+E5CD 69E5 # <CJK>
+E5CE 69F8 # <CJK>
+E5CF 6A15 # <CJK>
+E5D0 69F1 # <CJK>
+E5D1 69E4 # <CJK>
+E5D2 6A20 # <CJK>
+E5D3 69FF # <CJK>
+E5D4 69EC # <CJK>
+E5D5 69E2 # <CJK>
+E5D6 6A1B # <CJK>
+E5D7 6A1D # <CJK>
+E5D8 69FE # <CJK>
+E5D9 6A27 # <CJK>
+E5DA 69F2 # <CJK>
+E5DB 69EE # <CJK>
+E5DC 6A14 # <CJK>
+E5DD 69F7 # <CJK>
+E5DE 69E7 # <CJK>
+E5DF 6A40 # <CJK>
+E5E0 6A08 # <CJK>
+E5E1 69E6 # <CJK>
+E5E2 69FB # <CJK>
+E5E3 6A0D # <CJK>
+E5E4 69FC # <CJK>
+E5E5 69EB # <CJK>
+E5E6 6A09 # <CJK>
+E5E7 6A04 # <CJK>
+E5E8 6A18 # <CJK>
+E5E9 6A25 # <CJK>
+E5EA 6A0F # <CJK>
+E5EB 69F6 # <CJK>
+E5EC 6A26 # <CJK>
+E5ED 6A07 # <CJK>
+E5EE 69F4 # <CJK>
+E5EF 6A16 # <CJK>
+E5F0 6B51 # <CJK>
+E5F1 6BA5 # <CJK>
+E5F2 6BA3 # <CJK>
+E5F3 6BA2 # <CJK>
+E5F4 6BA6 # <CJK>
+E5F5 6C01 # <CJK>
+E5F6 6C00 # <CJK>
+E5F7 6BFF # <CJK>
+E5F8 6C02 # <CJK>
+E5F9 6F41 # <CJK>
+E5FA 6F26 # <CJK>
+E5FB 6F7E # <CJK>
+E5FC 6F87 # <CJK>
+E5FD 6FC6 # <CJK>
+E5FE 6F92 # <CJK>
+E640 6F8D # <CJK>
+E641 6F89 # <CJK>
+E642 6F8C # <CJK>
+E643 6F62 # <CJK>
+E644 6F4F # <CJK>
+E645 6F85 # <CJK>
+E646 6F5A # <CJK>
+E647 6F96 # <CJK>
+E648 6F76 # <CJK>
+E649 6F6C # <CJK>
+E64A 6F82 # <CJK>
+E64B 6F55 # <CJK>
+E64C 6F72 # <CJK>
+E64D 6F52 # <CJK>
+E64E 6F50 # <CJK>
+E64F 6F57 # <CJK>
+E650 6F94 # <CJK>
+E651 6F93 # <CJK>
+E652 6F5D # <CJK>
+E653 6F00 # <CJK>
+E654 6F61 # <CJK>
+E655 6F6B # <CJK>
+E656 6F7D # <CJK>
+E657 6F67 # <CJK>
+E658 6F90 # <CJK>
+E659 6F53 # <CJK>
+E65A 6F8B # <CJK>
+E65B 6F69 # <CJK>
+E65C 6F7F # <CJK>
+E65D 6F95 # <CJK>
+E65E 6F63 # <CJK>
+E65F 6F77 # <CJK>
+E660 6F6A # <CJK>
+E661 6F7B # <CJK>
+E662 71B2 # <CJK>
+E663 71AF # <CJK>
+E664 719B # <CJK>
+E665 71B0 # <CJK>
+E666 71A0 # <CJK>
+E667 719A # <CJK>
+E668 71A9 # <CJK>
+E669 71B5 # <CJK>
+E66A 719D # <CJK>
+E66B 71A5 # <CJK>
+E66C 719E # <CJK>
+E66D 71A4 # <CJK>
+E66E 71A1 # <CJK>
+E66F 71AA # <CJK>
+E670 719C # <CJK>
+E671 71A7 # <CJK>
+E672 71B3 # <CJK>
+E673 7298 # <CJK>
+E674 729A # <CJK>
+E675 7358 # <CJK>
+E676 7352 # <CJK>
+E677 735E # <CJK>
+E678 735F # <CJK>
+E679 7360 # <CJK>
+E67A 735D # <CJK>
+E67B 735B # <CJK>
+E67C 7361 # <CJK>
+E67D 735A # <CJK>
+E67E 7359 # <CJK>
+E6A1 7362 # <CJK>
+E6A2 7487 # <CJK>
+E6A3 7489 # <CJK>
+E6A4 748A # <CJK>
+E6A5 7486 # <CJK>
+E6A6 7481 # <CJK>
+E6A7 747D # <CJK>
+E6A8 7485 # <CJK>
+E6A9 7488 # <CJK>
+E6AA 747C # <CJK>
+E6AB 7479 # <CJK>
+E6AC 7508 # <CJK>
+E6AD 7507 # <CJK>
+E6AE 757E # <CJK>
+E6AF 7625 # <CJK>
+E6B0 761E # <CJK>
+E6B1 7619 # <CJK>
+E6B2 761D # <CJK>
+E6B3 761C # <CJK>
+E6B4 7623 # <CJK>
+E6B5 761A # <CJK>
+E6B6 7628 # <CJK>
+E6B7 761B # <CJK>
+E6B8 769C # <CJK>
+E6B9 769D # <CJK>
+E6BA 769E # <CJK>
+E6BB 769B # <CJK>
+E6BC 778D # <CJK>
+E6BD 778F # <CJK>
+E6BE 7789 # <CJK>
+E6BF 7788 # <CJK>
+E6C0 78CD # <CJK>
+E6C1 78BB # <CJK>
+E6C2 78CF # <CJK>
+E6C3 78CC # <CJK>
+E6C4 78D1 # <CJK>
+E6C5 78CE # <CJK>
+E6C6 78D4 # <CJK>
+E6C7 78C8 # <CJK>
+E6C8 78C3 # <CJK>
+E6C9 78C4 # <CJK>
+E6CA 78C9 # <CJK>
+E6CB 799A # <CJK>
+E6CC 79A1 # <CJK>
+E6CD 79A0 # <CJK>
+E6CE 799C # <CJK>
+E6CF 79A2 # <CJK>
+E6D0 799B # <CJK>
+E6D1 6B76 # <CJK>
+E6D2 7A39 # <CJK>
+E6D3 7AB2 # <CJK>
+E6D4 7AB4 # <CJK>
+E6D5 7AB3 # <CJK>
+E6D6 7BB7 # <CJK>
+E6D7 7BCB # <CJK>
+E6D8 7BBE # <CJK>
+E6D9 7BAC # <CJK>
+E6DA 7BCE # <CJK>
+E6DB 7BAF # <CJK>
+E6DC 7BB9 # <CJK>
+E6DD 7BCA # <CJK>
+E6DE 7BB5 # <CJK>
+E6DF 7CC5 # <CJK>
+E6E0 7CC8 # <CJK>
+E6E1 7CCC # <CJK>
+E6E2 7CCB # <CJK>
+E6E3 7DF7 # <CJK>
+E6E4 7DDB # <CJK>
+E6E5 7DEA # <CJK>
+E6E6 7DE7 # <CJK>
+E6E7 7DD7 # <CJK>
+E6E8 7DE1 # <CJK>
+E6E9 7E03 # <CJK>
+E6EA 7DFA # <CJK>
+E6EB 7DE6 # <CJK>
+E6EC 7DF6 # <CJK>
+E6ED 7DF1 # <CJK>
+E6EE 7DF0 # <CJK>
+E6EF 7DEE # <CJK>
+E6F0 7DDF # <CJK>
+E6F1 7F76 # <CJK>
+E6F2 7FAC # <CJK>
+E6F3 7FB0 # <CJK>
+E6F4 7FAD # <CJK>
+E6F5 7FED # <CJK>
+E6F6 7FEB # <CJK>
+E6F7 7FEA # <CJK>
+E6F8 7FEC # <CJK>
+E6F9 7FE6 # <CJK>
+E6FA 7FE8 # <CJK>
+E6FB 8064 # <CJK>
+E6FC 8067 # <CJK>
+E6FD 81A3 # <CJK>
+E6FE 819F # <CJK>
+E740 819E # <CJK>
+E741 8195 # <CJK>
+E742 81A2 # <CJK>
+E743 8199 # <CJK>
+E744 8197 # <CJK>
+E745 8216 # <CJK>
+E746 824F # <CJK>
+E747 8253 # <CJK>
+E748 8252 # <CJK>
+E749 8250 # <CJK>
+E74A 824E # <CJK>
+E74B 8251 # <CJK>
+E74C 8524 # <CJK>
+E74D 853B # <CJK>
+E74E 850F # <CJK>
+E74F 8500 # <CJK>
+E750 8529 # <CJK>
+E751 850E # <CJK>
+E752 8509 # <CJK>
+E753 850D # <CJK>
+E754 851F # <CJK>
+E755 850A # <CJK>
+E756 8527 # <CJK>
+E757 851C # <CJK>
+E758 84FB # <CJK>
+E759 852B # <CJK>
+E75A 84FA # <CJK>
+E75B 8508 # <CJK>
+E75C 850C # <CJK>
+E75D 84F4 # <CJK>
+E75E 852A # <CJK>
+E75F 84F2 # <CJK>
+E760 8515 # <CJK>
+E761 84F7 # <CJK>
+E762 84EB # <CJK>
+E763 84F3 # <CJK>
+E764 84FC # <CJK>
+E765 8512 # <CJK>
+E766 84EA # <CJK>
+E767 84E9 # <CJK>
+E768 8516 # <CJK>
+E769 84FE # <CJK>
+E76A 8528 # <CJK>
+E76B 851D # <CJK>
+E76C 852E # <CJK>
+E76D 8502 # <CJK>
+E76E 84FD # <CJK>
+E76F 851E # <CJK>
+E770 84F6 # <CJK>
+E771 8531 # <CJK>
+E772 8526 # <CJK>
+E773 84E7 # <CJK>
+E774 84E8 # <CJK>
+E775 84F0 # <CJK>
+E776 84EF # <CJK>
+E777 84F9 # <CJK>
+E778 8518 # <CJK>
+E779 8520 # <CJK>
+E77A 8530 # <CJK>
+E77B 850B # <CJK>
+E77C 8519 # <CJK>
+E77D 852F # <CJK>
+E77E 8662 # <CJK>
+E7A1 8756 # <CJK>
+E7A2 8763 # <CJK>
+E7A3 8764 # <CJK>
+E7A4 8777 # <CJK>
+E7A5 87E1 # <CJK>
+E7A6 8773 # <CJK>
+E7A7 8758 # <CJK>
+E7A8 8754 # <CJK>
+E7A9 875B # <CJK>
+E7AA 8752 # <CJK>
+E7AB 8761 # <CJK>
+E7AC 875A # <CJK>
+E7AD 8751 # <CJK>
+E7AE 875E # <CJK>
+E7AF 876D # <CJK>
+E7B0 876A # <CJK>
+E7B1 8750 # <CJK>
+E7B2 874E # <CJK>
+E7B3 875F # <CJK>
+E7B4 875D # <CJK>
+E7B5 876F # <CJK>
+E7B6 876C # <CJK>
+E7B7 877A # <CJK>
+E7B8 876E # <CJK>
+E7B9 875C # <CJK>
+E7BA 8765 # <CJK>
+E7BB 874F # <CJK>
+E7BC 877B # <CJK>
+E7BD 8775 # <CJK>
+E7BE 8762 # <CJK>
+E7BF 8767 # <CJK>
+E7C0 8769 # <CJK>
+E7C1 885A # <CJK>
+E7C2 8905 # <CJK>
+E7C3 890C # <CJK>
+E7C4 8914 # <CJK>
+E7C5 890B # <CJK>
+E7C6 8917 # <CJK>
+E7C7 8918 # <CJK>
+E7C8 8919 # <CJK>
+E7C9 8906 # <CJK>
+E7CA 8916 # <CJK>
+E7CB 8911 # <CJK>
+E7CC 890E # <CJK>
+E7CD 8909 # <CJK>
+E7CE 89A2 # <CJK>
+E7CF 89A4 # <CJK>
+E7D0 89A3 # <CJK>
+E7D1 89ED # <CJK>
+E7D2 89F0 # <CJK>
+E7D3 89EC # <CJK>
+E7D4 8ACF # <CJK>
+E7D5 8AC6 # <CJK>
+E7D6 8AB8 # <CJK>
+E7D7 8AD3 # <CJK>
+E7D8 8AD1 # <CJK>
+E7D9 8AD4 # <CJK>
+E7DA 8AD5 # <CJK>
+E7DB 8ABB # <CJK>
+E7DC 8AD7 # <CJK>
+E7DD 8ABE # <CJK>
+E7DE 8AC0 # <CJK>
+E7DF 8AC5 # <CJK>
+E7E0 8AD8 # <CJK>
+E7E1 8AC3 # <CJK>
+E7E2 8ABA # <CJK>
+E7E3 8ABD # <CJK>
+E7E4 8AD9 # <CJK>
+E7E5 8C3E # <CJK>
+E7E6 8C4D # <CJK>
+E7E7 8C8F # <CJK>
+E7E8 8CE5 # <CJK>
+E7E9 8CDF # <CJK>
+E7EA 8CD9 # <CJK>
+E7EB 8CE8 # <CJK>
+E7EC 8CDA # <CJK>
+E7ED 8CDD # <CJK>
+E7EE 8CE7 # <CJK>
+E7EF 8DA0 # <CJK>
+E7F0 8D9C # <CJK>
+E7F1 8DA1 # <CJK>
+E7F2 8D9B # <CJK>
+E7F3 8E20 # <CJK>
+E7F4 8E23 # <CJK>
+E7F5 8E25 # <CJK>
+E7F6 8E24 # <CJK>
+E7F7 8E2E # <CJK>
+E7F8 8E15 # <CJK>
+E7F9 8E1B # <CJK>
+E7FA 8E16 # <CJK>
+E7FB 8E11 # <CJK>
+E7FC 8E19 # <CJK>
+E7FD 8E26 # <CJK>
+E7FE 8E27 # <CJK>
+E840 8E14 # <CJK>
+E841 8E12 # <CJK>
+E842 8E18 # <CJK>
+E843 8E13 # <CJK>
+E844 8E1C # <CJK>
+E845 8E17 # <CJK>
+E846 8E1A # <CJK>
+E847 8F2C # <CJK>
+E848 8F24 # <CJK>
+E849 8F18 # <CJK>
+E84A 8F1A # <CJK>
+E84B 8F20 # <CJK>
+E84C 8F23 # <CJK>
+E84D 8F16 # <CJK>
+E84E 8F17 # <CJK>
+E84F 9073 # <CJK>
+E850 9070 # <CJK>
+E851 906F # <CJK>
+E852 9067 # <CJK>
+E853 906B # <CJK>
+E854 912F # <CJK>
+E855 912B # <CJK>
+E856 9129 # <CJK>
+E857 912A # <CJK>
+E858 9132 # <CJK>
+E859 9126 # <CJK>
+E85A 912E # <CJK>
+E85B 9185 # <CJK>
+E85C 9186 # <CJK>
+E85D 918A # <CJK>
+E85E 9181 # <CJK>
+E85F 9182 # <CJK>
+E860 9184 # <CJK>
+E861 9180 # <CJK>
+E862 92D0 # <CJK>
+E863 92C3 # <CJK>
+E864 92C4 # <CJK>
+E865 92C0 # <CJK>
+E866 92D9 # <CJK>
+E867 92B6 # <CJK>
+E868 92CF # <CJK>
+E869 92F1 # <CJK>
+E86A 92DF # <CJK>
+E86B 92D8 # <CJK>
+E86C 92E9 # <CJK>
+E86D 92D7 # <CJK>
+E86E 92DD # <CJK>
+E86F 92CC # <CJK>
+E870 92EF # <CJK>
+E871 92C2 # <CJK>
+E872 92E8 # <CJK>
+E873 92CA # <CJK>
+E874 92C8 # <CJK>
+E875 92CE # <CJK>
+E876 92E6 # <CJK>
+E877 92CD # <CJK>
+E878 92D5 # <CJK>
+E879 92C9 # <CJK>
+E87A 92E0 # <CJK>
+E87B 92DE # <CJK>
+E87C 92E7 # <CJK>
+E87D 92D1 # <CJK>
+E87E 92D3 # <CJK>
+E8A1 92B5 # <CJK>
+E8A2 92E1 # <CJK>
+E8A3 92C6 # <CJK>
+E8A4 92B4 # <CJK>
+E8A5 957C # <CJK>
+E8A6 95AC # <CJK>
+E8A7 95AB # <CJK>
+E8A8 95AE # <CJK>
+E8A9 95B0 # <CJK>
+E8AA 96A4 # <CJK>
+E8AB 96A2 # <CJK>
+E8AC 96D3 # <CJK>
+E8AD 9705 # <CJK>
+E8AE 9708 # <CJK>
+E8AF 9702 # <CJK>
+E8B0 975A # <CJK>
+E8B1 978A # <CJK>
+E8B2 978E # <CJK>
+E8B3 9788 # <CJK>
+E8B4 97D0 # <CJK>
+E8B5 97CF # <CJK>
+E8B6 981E # <CJK>
+E8B7 981D # <CJK>
+E8B8 9826 # <CJK>
+E8B9 9829 # <CJK>
+E8BA 9828 # <CJK>
+E8BB 9820 # <CJK>
+E8BC 981B # <CJK>
+E8BD 9827 # <CJK>
+E8BE 98B2 # <CJK>
+E8BF 9908 # <CJK>
+E8C0 98FA # <CJK>
+E8C1 9911 # <CJK>
+E8C2 9914 # <CJK>
+E8C3 9916 # <CJK>
+E8C4 9917 # <CJK>
+E8C5 9915 # <CJK>
+E8C6 99DC # <CJK>
+E8C7 99CD # <CJK>
+E8C8 99CF # <CJK>
+E8C9 99D3 # <CJK>
+E8CA 99D4 # <CJK>
+E8CB 99CE # <CJK>
+E8CC 99C9 # <CJK>
+E8CD 99D6 # <CJK>
+E8CE 99D8 # <CJK>
+E8CF 99CB # <CJK>
+E8D0 99D7 # <CJK>
+E8D1 99CC # <CJK>
+E8D2 9AB3 # <CJK>
+E8D3 9AEC # <CJK>
+E8D4 9AEB # <CJK>
+E8D5 9AF3 # <CJK>
+E8D6 9AF2 # <CJK>
+E8D7 9AF1 # <CJK>
+E8D8 9B46 # <CJK>
+E8D9 9B43 # <CJK>
+E8DA 9B67 # <CJK>
+E8DB 9B74 # <CJK>
+E8DC 9B71 # <CJK>
+E8DD 9B66 # <CJK>
+E8DE 9B76 # <CJK>
+E8DF 9B75 # <CJK>
+E8E0 9B70 # <CJK>
+E8E1 9B68 # <CJK>
+E8E2 9B64 # <CJK>
+E8E3 9B6C # <CJK>
+E8E4 9CFC # <CJK>
+E8E5 9CFA # <CJK>
+E8E6 9CFD # <CJK>
+E8E7 9CFF # <CJK>
+E8E8 9CF7 # <CJK>
+E8E9 9D07 # <CJK>
+E8EA 9D00 # <CJK>
+E8EB 9CF9 # <CJK>
+E8EC 9CFB # <CJK>
+E8ED 9D08 # <CJK>
+E8EE 9D05 # <CJK>
+E8EF 9D04 # <CJK>
+E8F0 9E83 # <CJK>
+E8F1 9ED3 # <CJK>
+E8F2 9F0F # <CJK>
+E8F3 9F10 # <CJK>
+E8F4 511C # <CJK>
+E8F5 5113 # <CJK>
+E8F6 5117 # <CJK>
+E8F7 511A # <CJK>
+E8F8 5111 # <CJK>
+E8F9 51DE # <CJK>
+E8FA 5334 # <CJK>
+E8FB 53E1 # <CJK>
+E8FC 5670 # <CJK>
+E8FD 5660 # <CJK>
+E8FE 566E # <CJK>
+E940 5673 # <CJK>
+E941 5666 # <CJK>
+E942 5663 # <CJK>
+E943 566D # <CJK>
+E944 5672 # <CJK>
+E945 565E # <CJK>
+E946 5677 # <CJK>
+E947 571C # <CJK>
+E948 571B # <CJK>
+E949 58C8 # <CJK>
+E94A 58BD # <CJK>
+E94B 58C9 # <CJK>
+E94C 58BF # <CJK>
+E94D 58BA # <CJK>
+E94E 58C2 # <CJK>
+E94F 58BC # <CJK>
+E950 58C6 # <CJK>
+E951 5B17 # <CJK>
+E952 5B19 # <CJK>
+E953 5B1B # <CJK>
+E954 5B21 # <CJK>
+E955 5B14 # <CJK>
+E956 5B13 # <CJK>
+E957 5B10 # <CJK>
+E958 5B16 # <CJK>
+E959 5B28 # <CJK>
+E95A 5B1A # <CJK>
+E95B 5B20 # <CJK>
+E95C 5B1E # <CJK>
+E95D 5BEF # <CJK>
+E95E 5DAC # <CJK>
+E95F 5DB1 # <CJK>
+E960 5DA9 # <CJK>
+E961 5DA7 # <CJK>
+E962 5DB5 # <CJK>
+E963 5DB0 # <CJK>
+E964 5DAE # <CJK>
+E965 5DAA # <CJK>
+E966 5DA8 # <CJK>
+E967 5DB2 # <CJK>
+E968 5DAD # <CJK>
+E969 5DAF # <CJK>
+E96A 5DB4 # <CJK>
+E96B 5E67 # <CJK>
+E96C 5E68 # <CJK>
+E96D 5E66 # <CJK>
+E96E 5E6F # <CJK>
+E96F 5EE9 # <CJK>
+E970 5EE7 # <CJK>
+E971 5EE6 # <CJK>
+E972 5EE8 # <CJK>
+E973 5EE5 # <CJK>
+E974 5F4B # <CJK>
+E975 5FBC # <CJK>
+E976 619D # <CJK>
+E977 61A8 # <CJK>
+E978 6196 # <CJK>
+E979 61C5 # <CJK>
+E97A 61B4 # <CJK>
+E97B 61C6 # <CJK>
+E97C 61C1 # <CJK>
+E97D 61CC # <CJK>
+E97E 61BA # <CJK>
+E9A1 61BF # <CJK>
+E9A2 61B8 # <CJK>
+E9A3 618C # <CJK>
+E9A4 64D7 # <CJK>
+E9A5 64D6 # <CJK>
+E9A6 64D0 # <CJK>
+E9A7 64CF # <CJK>
+E9A8 64C9 # <CJK>
+E9A9 64BD # <CJK>
+E9AA 6489 # <CJK>
+E9AB 64C3 # <CJK>
+E9AC 64DB # <CJK>
+E9AD 64F3 # <CJK>
+E9AE 64D9 # <CJK>
+E9AF 6533 # <CJK>
+E9B0 657F # <CJK>
+E9B1 657C # <CJK>
+E9B2 65A2 # <CJK>
+E9B3 66C8 # <CJK>
+E9B4 66BE # <CJK>
+E9B5 66C0 # <CJK>
+E9B6 66CA # <CJK>
+E9B7 66CB # <CJK>
+E9B8 66CF # <CJK>
+E9B9 66BD # <CJK>
+E9BA 66BB # <CJK>
+E9BB 66BA # <CJK>
+E9BC 66CC # <CJK>
+E9BD 6723 # <CJK>
+E9BE 6A34 # <CJK>
+E9BF 6A66 # <CJK>
+E9C0 6A49 # <CJK>
+E9C1 6A67 # <CJK>
+E9C2 6A32 # <CJK>
+E9C3 6A68 # <CJK>
+E9C4 6A3E # <CJK>
+E9C5 6A5D # <CJK>
+E9C6 6A6D # <CJK>
+E9C7 6A76 # <CJK>
+E9C8 6A5B # <CJK>
+E9C9 6A51 # <CJK>
+E9CA 6A28 # <CJK>
+E9CB 6A5A # <CJK>
+E9CC 6A3B # <CJK>
+E9CD 6A3F # <CJK>
+E9CE 6A41 # <CJK>
+E9CF 6A6A # <CJK>
+E9D0 6A64 # <CJK>
+E9D1 6A50 # <CJK>
+E9D2 6A4F # <CJK>
+E9D3 6A54 # <CJK>
+E9D4 6A6F # <CJK>
+E9D5 6A69 # <CJK>
+E9D6 6A60 # <CJK>
+E9D7 6A3C # <CJK>
+E9D8 6A5E # <CJK>
+E9D9 6A56 # <CJK>
+E9DA 6A55 # <CJK>
+E9DB 6A4D # <CJK>
+E9DC 6A4E # <CJK>
+E9DD 6A46 # <CJK>
+E9DE 6B55 # <CJK>
+E9DF 6B54 # <CJK>
+E9E0 6B56 # <CJK>
+E9E1 6BA7 # <CJK>
+E9E2 6BAA # <CJK>
+E9E3 6BAB # <CJK>
+E9E4 6BC8 # <CJK>
+E9E5 6BC7 # <CJK>
+E9E6 6C04 # <CJK>
+E9E7 6C03 # <CJK>
+E9E8 6C06 # <CJK>
+E9E9 6FAD # <CJK>
+E9EA 6FCB # <CJK>
+E9EB 6FA3 # <CJK>
+E9EC 6FC7 # <CJK>
+E9ED 6FBC # <CJK>
+E9EE 6FCE # <CJK>
+E9EF 6FC8 # <CJK>
+E9F0 6F5E # <CJK>
+E9F1 6FC4 # <CJK>
+E9F2 6FBD # <CJK>
+E9F3 6F9E # <CJK>
+E9F4 6FCA # <CJK>
+E9F5 6FA8 # <CJK>
+E9F6 7004 # <CJK>
+E9F7 6FA5 # <CJK>
+E9F8 6FAE # <CJK>
+E9F9 6FBA # <CJK>
+E9FA 6FAC # <CJK>
+E9FB 6FAA # <CJK>
+E9FC 6FCF # <CJK>
+E9FD 6FBF # <CJK>
+E9FE 6FB8 # <CJK>
+EA40 6FA2 # <CJK>
+EA41 6FC9 # <CJK>
+EA42 6FAB # <CJK>
+EA43 6FCD # <CJK>
+EA44 6FAF # <CJK>
+EA45 6FB2 # <CJK>
+EA46 6FB0 # <CJK>
+EA47 71C5 # <CJK>
+EA48 71C2 # <CJK>
+EA49 71BF # <CJK>
+EA4A 71B8 # <CJK>
+EA4B 71D6 # <CJK>
+EA4C 71C0 # <CJK>
+EA4D 71C1 # <CJK>
+EA4E 71CB # <CJK>
+EA4F 71D4 # <CJK>
+EA50 71CA # <CJK>
+EA51 71C7 # <CJK>
+EA52 71CF # <CJK>
+EA53 71BD # <CJK>
+EA54 71D8 # <CJK>
+EA55 71BC # <CJK>
+EA56 71C6 # <CJK>
+EA57 71DA # <CJK>
+EA58 71DB # <CJK>
+EA59 729D # <CJK>
+EA5A 729E # <CJK>
+EA5B 7369 # <CJK>
+EA5C 7366 # <CJK>
+EA5D 7367 # <CJK>
+EA5E 736C # <CJK>
+EA5F 7365 # <CJK>
+EA60 736B # <CJK>
+EA61 736A # <CJK>
+EA62 747F # <CJK>
+EA63 749A # <CJK>
+EA64 74A0 # <CJK>
+EA65 7494 # <CJK>
+EA66 7492 # <CJK>
+EA67 7495 # <CJK>
+EA68 74A1 # <CJK>
+EA69 750B # <CJK>
+EA6A 7580 # <CJK>
+EA6B 762F # <CJK>
+EA6C 762D # <CJK>
+EA6D 7631 # <CJK>
+EA6E 763D # <CJK>
+EA6F 7633 # <CJK>
+EA70 763C # <CJK>
+EA71 7635 # <CJK>
+EA72 7632 # <CJK>
+EA73 7630 # <CJK>
+EA74 76BB # <CJK>
+EA75 76E6 # <CJK>
+EA76 779A # <CJK>
+EA77 779D # <CJK>
+EA78 77A1 # <CJK>
+EA79 779C # <CJK>
+EA7A 779B # <CJK>
+EA7B 77A2 # <CJK>
+EA7C 77A3 # <CJK>
+EA7D 7795 # <CJK>
+EA7E 7799 # <CJK>
+EAA1 7797 # <CJK>
+EAA2 78DD # <CJK>
+EAA3 78E9 # <CJK>
+EAA4 78E5 # <CJK>
+EAA5 78EA # <CJK>
+EAA6 78DE # <CJK>
+EAA7 78E3 # <CJK>
+EAA8 78DB # <CJK>
+EAA9 78E1 # <CJK>
+EAAA 78E2 # <CJK>
+EAAB 78ED # <CJK>
+EAAC 78DF # <CJK>
+EAAD 78E0 # <CJK>
+EAAE 79A4 # <CJK>
+EAAF 7A44 # <CJK>
+EAB0 7A48 # <CJK>
+EAB1 7A47 # <CJK>
+EAB2 7AB6 # <CJK>
+EAB3 7AB8 # <CJK>
+EAB4 7AB5 # <CJK>
+EAB5 7AB1 # <CJK>
+EAB6 7AB7 # <CJK>
+EAB7 7BDE # <CJK>
+EAB8 7BE3 # <CJK>
+EAB9 7BE7 # <CJK>
+EABA 7BDD # <CJK>
+EABB 7BD5 # <CJK>
+EABC 7BE5 # <CJK>
+EABD 7BDA # <CJK>
+EABE 7BE8 # <CJK>
+EABF 7BF9 # <CJK>
+EAC0 7BD4 # <CJK>
+EAC1 7BEA # <CJK>
+EAC2 7BE2 # <CJK>
+EAC3 7BDC # <CJK>
+EAC4 7BEB # <CJK>
+EAC5 7BD8 # <CJK>
+EAC6 7BDF # <CJK>
+EAC7 7CD2 # <CJK>
+EAC8 7CD4 # <CJK>
+EAC9 7CD7 # <CJK>
+EACA 7CD0 # <CJK>
+EACB 7CD1 # <CJK>
+EACC 7E12 # <CJK>
+EACD 7E21 # <CJK>
+EACE 7E17 # <CJK>
+EACF 7E0C # <CJK>
+EAD0 7E1F # <CJK>
+EAD1 7E20 # <CJK>
+EAD2 7E13 # <CJK>
+EAD3 7E0E # <CJK>
+EAD4 7E1C # <CJK>
+EAD5 7E15 # <CJK>
+EAD6 7E1A # <CJK>
+EAD7 7E22 # <CJK>
+EAD8 7E0B # <CJK>
+EAD9 7E0F # <CJK>
+EADA 7E16 # <CJK>
+EADB 7E0D # <CJK>
+EADC 7E14 # <CJK>
+EADD 7E25 # <CJK>
+EADE 7E24 # <CJK>
+EADF 7F43 # <CJK>
+EAE0 7F7B # <CJK>
+EAE1 7F7C # <CJK>
+EAE2 7F7A # <CJK>
+EAE3 7FB1 # <CJK>
+EAE4 7FEF # <CJK>
+EAE5 802A # <CJK>
+EAE6 8029 # <CJK>
+EAE7 806C # <CJK>
+EAE8 81B1 # <CJK>
+EAE9 81A6 # <CJK>
+EAEA 81AE # <CJK>
+EAEB 81B9 # <CJK>
+EAEC 81B5 # <CJK>
+EAED 81AB # <CJK>
+EAEE 81B0 # <CJK>
+EAEF 81AC # <CJK>
+EAF0 81B4 # <CJK>
+EAF1 81B2 # <CJK>
+EAF2 81B7 # <CJK>
+EAF3 81A7 # <CJK>
+EAF4 81F2 # <CJK>
+EAF5 8255 # <CJK>
+EAF6 8256 # <CJK>
+EAF7 8257 # <CJK>
+EAF8 8556 # <CJK>
+EAF9 8545 # <CJK>
+EAFA 856B # <CJK>
+EAFB 854D # <CJK>
+EAFC 8553 # <CJK>
+EAFD 8561 # <CJK>
+EAFE 8558 # <CJK>
+EB40 8540 # <CJK>
+EB41 8546 # <CJK>
+EB42 8564 # <CJK>
+EB43 8541 # <CJK>
+EB44 8562 # <CJK>
+EB45 8544 # <CJK>
+EB46 8551 # <CJK>
+EB47 8547 # <CJK>
+EB48 8563 # <CJK>
+EB49 853E # <CJK>
+EB4A 855B # <CJK>
+EB4B 8571 # <CJK>
+EB4C 854E # <CJK>
+EB4D 856E # <CJK>
+EB4E 8575 # <CJK>
+EB4F 8555 # <CJK>
+EB50 8567 # <CJK>
+EB51 8560 # <CJK>
+EB52 858C # <CJK>
+EB53 8566 # <CJK>
+EB54 855D # <CJK>
+EB55 8554 # <CJK>
+EB56 8565 # <CJK>
+EB57 856C # <CJK>
+EB58 8663 # <CJK>
+EB59 8665 # <CJK>
+EB5A 8664 # <CJK>
+EB5B 879B # <CJK>
+EB5C 878F # <CJK>
+EB5D 8797 # <CJK>
+EB5E 8793 # <CJK>
+EB5F 8792 # <CJK>
+EB60 8788 # <CJK>
+EB61 8781 # <CJK>
+EB62 8796 # <CJK>
+EB63 8798 # <CJK>
+EB64 8779 # <CJK>
+EB65 8787 # <CJK>
+EB66 87A3 # <CJK>
+EB67 8785 # <CJK>
+EB68 8790 # <CJK>
+EB69 8791 # <CJK>
+EB6A 879D # <CJK>
+EB6B 8784 # <CJK>
+EB6C 8794 # <CJK>
+EB6D 879C # <CJK>
+EB6E 879A # <CJK>
+EB6F 8789 # <CJK>
+EB70 891E # <CJK>
+EB71 8926 # <CJK>
+EB72 8930 # <CJK>
+EB73 892D # <CJK>
+EB74 892E # <CJK>
+EB75 8927 # <CJK>
+EB76 8931 # <CJK>
+EB77 8922 # <CJK>
+EB78 8929 # <CJK>
+EB79 8923 # <CJK>
+EB7A 892F # <CJK>
+EB7B 892C # <CJK>
+EB7C 891F # <CJK>
+EB7D 89F1 # <CJK>
+EB7E 8AE0 # <CJK>
+EBA1 8AE2 # <CJK>
+EBA2 8AF2 # <CJK>
+EBA3 8AF4 # <CJK>
+EBA4 8AF5 # <CJK>
+EBA5 8ADD # <CJK>
+EBA6 8B14 # <CJK>
+EBA7 8AE4 # <CJK>
+EBA8 8ADF # <CJK>
+EBA9 8AF0 # <CJK>
+EBAA 8AC8 # <CJK>
+EBAB 8ADE # <CJK>
+EBAC 8AE1 # <CJK>
+EBAD 8AE8 # <CJK>
+EBAE 8AFF # <CJK>
+EBAF 8AEF # <CJK>
+EBB0 8AFB # <CJK>
+EBB1 8C91 # <CJK>
+EBB2 8C92 # <CJK>
+EBB3 8C90 # <CJK>
+EBB4 8CF5 # <CJK>
+EBB5 8CEE # <CJK>
+EBB6 8CF1 # <CJK>
+EBB7 8CF0 # <CJK>
+EBB8 8CF3 # <CJK>
+EBB9 8D6C # <CJK>
+EBBA 8D6E # <CJK>
+EBBB 8DA5 # <CJK>
+EBBC 8DA7 # <CJK>
+EBBD 8E33 # <CJK>
+EBBE 8E3E # <CJK>
+EBBF 8E38 # <CJK>
+EBC0 8E40 # <CJK>
+EBC1 8E45 # <CJK>
+EBC2 8E36 # <CJK>
+EBC3 8E3C # <CJK>
+EBC4 8E3D # <CJK>
+EBC5 8E41 # <CJK>
+EBC6 8E30 # <CJK>
+EBC7 8E3F # <CJK>
+EBC8 8EBD # <CJK>
+EBC9 8F36 # <CJK>
+EBCA 8F2E # <CJK>
+EBCB 8F35 # <CJK>
+EBCC 8F32 # <CJK>
+EBCD 8F39 # <CJK>
+EBCE 8F37 # <CJK>
+EBCF 8F34 # <CJK>
+EBD0 9076 # <CJK>
+EBD1 9079 # <CJK>
+EBD2 907B # <CJK>
+EBD3 9086 # <CJK>
+EBD4 90FA # <CJK>
+EBD5 9133 # <CJK>
+EBD6 9135 # <CJK>
+EBD7 9136 # <CJK>
+EBD8 9193 # <CJK>
+EBD9 9190 # <CJK>
+EBDA 9191 # <CJK>
+EBDB 918D # <CJK>
+EBDC 918F # <CJK>
+EBDD 9327 # <CJK>
+EBDE 931E # <CJK>
+EBDF 9308 # <CJK>
+EBE0 931F # <CJK>
+EBE1 9306 # <CJK>
+EBE2 930F # <CJK>
+EBE3 937A # <CJK>
+EBE4 9338 # <CJK>
+EBE5 933C # <CJK>
+EBE6 931B # <CJK>
+EBE7 9323 # <CJK>
+EBE8 9312 # <CJK>
+EBE9 9301 # <CJK>
+EBEA 9346 # <CJK>
+EBEB 932D # <CJK>
+EBEC 930E # <CJK>
+EBED 930D # <CJK>
+EBEE 92CB # <CJK>
+EBEF 931D # <CJK>
+EBF0 92FA # <CJK>
+EBF1 9325 # <CJK>
+EBF2 9313 # <CJK>
+EBF3 92F9 # <CJK>
+EBF4 92F7 # <CJK>
+EBF5 9334 # <CJK>
+EBF6 9302 # <CJK>
+EBF7 9324 # <CJK>
+EBF8 92FF # <CJK>
+EBF9 9329 # <CJK>
+EBFA 9339 # <CJK>
+EBFB 9335 # <CJK>
+EBFC 932A # <CJK>
+EBFD 9314 # <CJK>
+EBFE 930C # <CJK>
+EC40 930B # <CJK>
+EC41 92FE # <CJK>
+EC42 9309 # <CJK>
+EC43 9300 # <CJK>
+EC44 92FB # <CJK>
+EC45 9316 # <CJK>
+EC46 95BC # <CJK>
+EC47 95CD # <CJK>
+EC48 95BE # <CJK>
+EC49 95B9 # <CJK>
+EC4A 95BA # <CJK>
+EC4B 95B6 # <CJK>
+EC4C 95BF # <CJK>
+EC4D 95B5 # <CJK>
+EC4E 95BD # <CJK>
+EC4F 96A9 # <CJK>
+EC50 96D4 # <CJK>
+EC51 970B # <CJK>
+EC52 9712 # <CJK>
+EC53 9710 # <CJK>
+EC54 9799 # <CJK>
+EC55 9797 # <CJK>
+EC56 9794 # <CJK>
+EC57 97F0 # <CJK>
+EC58 97F8 # <CJK>
+EC59 9835 # <CJK>
+EC5A 982F # <CJK>
+EC5B 9832 # <CJK>
+EC5C 9924 # <CJK>
+EC5D 991F # <CJK>
+EC5E 9927 # <CJK>
+EC5F 9929 # <CJK>
+EC60 999E # <CJK>
+EC61 99EE # <CJK>
+EC62 99EC # <CJK>
+EC63 99E5 # <CJK>
+EC64 99E4 # <CJK>
+EC65 99F0 # <CJK>
+EC66 99E3 # <CJK>
+EC67 99EA # <CJK>
+EC68 99E9 # <CJK>
+EC69 99E7 # <CJK>
+EC6A 9AB9 # <CJK>
+EC6B 9ABF # <CJK>
+EC6C 9AB4 # <CJK>
+EC6D 9ABB # <CJK>
+EC6E 9AF6 # <CJK>
+EC6F 9AFA # <CJK>
+EC70 9AF9 # <CJK>
+EC71 9AF7 # <CJK>
+EC72 9B33 # <CJK>
+EC73 9B80 # <CJK>
+EC74 9B85 # <CJK>
+EC75 9B87 # <CJK>
+EC76 9B7C # <CJK>
+EC77 9B7E # <CJK>
+EC78 9B7B # <CJK>
+EC79 9B82 # <CJK>
+EC7A 9B93 # <CJK>
+EC7B 9B92 # <CJK>
+EC7C 9B90 # <CJK>
+EC7D 9B7A # <CJK>
+EC7E 9B95 # <CJK>
+ECA1 9B7D # <CJK>
+ECA2 9B88 # <CJK>
+ECA3 9D25 # <CJK>
+ECA4 9D17 # <CJK>
+ECA5 9D20 # <CJK>
+ECA6 9D1E # <CJK>
+ECA7 9D14 # <CJK>
+ECA8 9D29 # <CJK>
+ECA9 9D1D # <CJK>
+ECAA 9D18 # <CJK>
+ECAB 9D22 # <CJK>
+ECAC 9D10 # <CJK>
+ECAD 9D19 # <CJK>
+ECAE 9D1F # <CJK>
+ECAF 9E88 # <CJK>
+ECB0 9E86 # <CJK>
+ECB1 9E87 # <CJK>
+ECB2 9EAE # <CJK>
+ECB3 9EAD # <CJK>
+ECB4 9ED5 # <CJK>
+ECB5 9ED6 # <CJK>
+ECB6 9EFA # <CJK>
+ECB7 9F12 # <CJK>
+ECB8 9F3D # <CJK>
+ECB9 5126 # <CJK>
+ECBA 5125 # <CJK>
+ECBB 5122 # <CJK>
+ECBC 5124 # <CJK>
+ECBD 5120 # <CJK>
+ECBE 5129 # <CJK>
+ECBF 52F4 # <CJK>
+ECC0 5693 # <CJK>
+ECC1 568C # <CJK>
+ECC2 568D # <CJK>
+ECC3 5686 # <CJK>
+ECC4 5684 # <CJK>
+ECC5 5683 # <CJK>
+ECC6 567E # <CJK>
+ECC7 5682 # <CJK>
+ECC8 567F # <CJK>
+ECC9 5681 # <CJK>
+ECCA 58D6 # <CJK>
+ECCB 58D4 # <CJK>
+ECCC 58CF # <CJK>
+ECCD 58D2 # <CJK>
+ECCE 5B2D # <CJK>
+ECCF 5B25 # <CJK>
+ECD0 5B32 # <CJK>
+ECD1 5B23 # <CJK>
+ECD2 5B2C # <CJK>
+ECD3 5B27 # <CJK>
+ECD4 5B26 # <CJK>
+ECD5 5B2F # <CJK>
+ECD6 5B2E # <CJK>
+ECD7 5B7B # <CJK>
+ECD8 5BF1 # <CJK>
+ECD9 5BF2 # <CJK>
+ECDA 5DB7 # <CJK>
+ECDB 5E6C # <CJK>
+ECDC 5E6A # <CJK>
+ECDD 5FBE # <CJK>
+ECDE 5FBB # <CJK>
+ECDF 61C3 # <CJK>
+ECE0 61B5 # <CJK>
+ECE1 61BC # <CJK>
+ECE2 61E7 # <CJK>
+ECE3 61E0 # <CJK>
+ECE4 61E5 # <CJK>
+ECE5 61E4 # <CJK>
+ECE6 61E8 # <CJK>
+ECE7 61DE # <CJK>
+ECE8 64EF # <CJK>
+ECE9 64E9 # <CJK>
+ECEA 64E3 # <CJK>
+ECEB 64EB # <CJK>
+ECEC 64E4 # <CJK>
+ECED 64E8 # <CJK>
+ECEE 6581 # <CJK>
+ECEF 6580 # <CJK>
+ECF0 65B6 # <CJK>
+ECF1 65DA # <CJK>
+ECF2 66D2 # <CJK>
+ECF3 6A8D # <CJK>
+ECF4 6A96 # <CJK>
+ECF5 6A81 # <CJK>
+ECF6 6AA5 # <CJK>
+ECF7 6A89 # <CJK>
+ECF8 6A9F # <CJK>
+ECF9 6A9B # <CJK>
+ECFA 6AA1 # <CJK>
+ECFB 6A9E # <CJK>
+ECFC 6A87 # <CJK>
+ECFD 6A93 # <CJK>
+ECFE 6A8E # <CJK>
+ED40 6A95 # <CJK>
+ED41 6A83 # <CJK>
+ED42 6AA8 # <CJK>
+ED43 6AA4 # <CJK>
+ED44 6A91 # <CJK>
+ED45 6A7F # <CJK>
+ED46 6AA6 # <CJK>
+ED47 6A9A # <CJK>
+ED48 6A85 # <CJK>
+ED49 6A8C # <CJK>
+ED4A 6A92 # <CJK>
+ED4B 6B5B # <CJK>
+ED4C 6BAD # <CJK>
+ED4D 6C09 # <CJK>
+ED4E 6FCC # <CJK>
+ED4F 6FA9 # <CJK>
+ED50 6FF4 # <CJK>
+ED51 6FD4 # <CJK>
+ED52 6FE3 # <CJK>
+ED53 6FDC # <CJK>
+ED54 6FED # <CJK>
+ED55 6FE7 # <CJK>
+ED56 6FE6 # <CJK>
+ED57 6FDE # <CJK>
+ED58 6FF2 # <CJK>
+ED59 6FDD # <CJK>
+ED5A 6FE2 # <CJK>
+ED5B 6FE8 # <CJK>
+ED5C 71E1 # <CJK>
+ED5D 71F1 # <CJK>
+ED5E 71E8 # <CJK>
+ED5F 71F2 # <CJK>
+ED60 71E4 # <CJK>
+ED61 71F0 # <CJK>
+ED62 71E2 # <CJK>
+ED63 7373 # <CJK>
+ED64 736E # <CJK>
+ED65 736F # <CJK>
+ED66 7497 # <CJK>
+ED67 74B2 # <CJK>
+ED68 74AB # <CJK>
+ED69 7490 # <CJK>
+ED6A 74AA # <CJK>
+ED6B 74AD # <CJK>
+ED6C 74B1 # <CJK>
+ED6D 74A5 # <CJK>
+ED6E 74AF # <CJK>
+ED6F 7510 # <CJK>
+ED70 7511 # <CJK>
+ED71 7512 # <CJK>
+ED72 750F # <CJK>
+ED73 7584 # <CJK>
+ED74 7643 # <CJK>
+ED75 7648 # <CJK>
+ED76 7649 # <CJK>
+ED77 7647 # <CJK>
+ED78 76A4 # <CJK>
+ED79 76E9 # <CJK>
+ED7A 77B5 # <CJK>
+ED7B 77AB # <CJK>
+ED7C 77B2 # <CJK>
+ED7D 77B7 # <CJK>
+ED7E 77B6 # <CJK>
+EDA1 77B4 # <CJK>
+EDA2 77B1 # <CJK>
+EDA3 77A8 # <CJK>
+EDA4 77F0 # <CJK>
+EDA5 78F3 # <CJK>
+EDA6 78FD # <CJK>
+EDA7 7902 # <CJK>
+EDA8 78FB # <CJK>
+EDA9 78FC # <CJK>
+EDAA 78F2 # <CJK>
+EDAB 7905 # <CJK>
+EDAC 78F9 # <CJK>
+EDAD 78FE # <CJK>
+EDAE 7904 # <CJK>
+EDAF 79AB # <CJK>
+EDB0 79A8 # <CJK>
+EDB1 7A5C # <CJK>
+EDB2 7A5B # <CJK>
+EDB3 7A56 # <CJK>
+EDB4 7A58 # <CJK>
+EDB5 7A54 # <CJK>
+EDB6 7A5A # <CJK>
+EDB7 7ABE # <CJK>
+EDB8 7AC0 # <CJK>
+EDB9 7AC1 # <CJK>
+EDBA 7C05 # <CJK>
+EDBB 7C0F # <CJK>
+EDBC 7BF2 # <CJK>
+EDBD 7C00 # <CJK>
+EDBE 7BFF # <CJK>
+EDBF 7BFB # <CJK>
+EDC0 7C0E # <CJK>
+EDC1 7BF4 # <CJK>
+EDC2 7C0B # <CJK>
+EDC3 7BF3 # <CJK>
+EDC4 7C02 # <CJK>
+EDC5 7C09 # <CJK>
+EDC6 7C03 # <CJK>
+EDC7 7C01 # <CJK>
+EDC8 7BF8 # <CJK>
+EDC9 7BFD # <CJK>
+EDCA 7C06 # <CJK>
+EDCB 7BF0 # <CJK>
+EDCC 7BF1 # <CJK>
+EDCD 7C10 # <CJK>
+EDCE 7C0A # <CJK>
+EDCF 7CE8 # <CJK>
+EDD0 7E2D # <CJK>
+EDD1 7E3C # <CJK>
+EDD2 7E42 # <CJK>
+EDD3 7E33 # <CJK>
+EDD4 9848 # <CJK>
+EDD5 7E38 # <CJK>
+EDD6 7E2A # <CJK>
+EDD7 7E49 # <CJK>
+EDD8 7E40 # <CJK>
+EDD9 7E47 # <CJK>
+EDDA 7E29 # <CJK>
+EDDB 7E4C # <CJK>
+EDDC 7E30 # <CJK>
+EDDD 7E3B # <CJK>
+EDDE 7E36 # <CJK>
+EDDF 7E44 # <CJK>
+EDE0 7E3A # <CJK>
+EDE1 7F45 # <CJK>
+EDE2 7F7F # <CJK>
+EDE3 7F7E # <CJK>
+EDE4 7F7D # <CJK>
+EDE5 7FF4 # <CJK>
+EDE6 7FF2 # <CJK>
+EDE7 802C # <CJK>
+EDE8 81BB # <CJK>
+EDE9 81C4 # <CJK>
+EDEA 81CC # <CJK>
+EDEB 81CA # <CJK>
+EDEC 81C5 # <CJK>
+EDED 81C7 # <CJK>
+EDEE 81BC # <CJK>
+EDEF 81E9 # <CJK>
+EDF0 825B # <CJK>
+EDF1 825A # <CJK>
+EDF2 825C # <CJK>
+EDF3 8583 # <CJK>
+EDF4 8580 # <CJK>
+EDF5 858F # <CJK>
+EDF6 85A7 # <CJK>
+EDF7 8595 # <CJK>
+EDF8 85A0 # <CJK>
+EDF9 858B # <CJK>
+EDFA 85A3 # <CJK>
+EDFB 857B # <CJK>
+EDFC 85A4 # <CJK>
+EDFD 859A # <CJK>
+EDFE 859E # <CJK>
+EE40 8577 # <CJK>
+EE41 857C # <CJK>
+EE42 8589 # <CJK>
+EE43 85A1 # <CJK>
+EE44 857A # <CJK>
+EE45 8578 # <CJK>
+EE46 8557 # <CJK>
+EE47 858E # <CJK>
+EE48 8596 # <CJK>
+EE49 8586 # <CJK>
+EE4A 858D # <CJK>
+EE4B 8599 # <CJK>
+EE4C 859D # <CJK>
+EE4D 8581 # <CJK>
+EE4E 85A2 # <CJK>
+EE4F 8582 # <CJK>
+EE50 8588 # <CJK>
+EE51 8585 # <CJK>
+EE52 8579 # <CJK>
+EE53 8576 # <CJK>
+EE54 8598 # <CJK>
+EE55 8590 # <CJK>
+EE56 859F # <CJK>
+EE57 8668 # <CJK>
+EE58 87BE # <CJK>
+EE59 87AA # <CJK>
+EE5A 87AD # <CJK>
+EE5B 87C5 # <CJK>
+EE5C 87B0 # <CJK>
+EE5D 87AC # <CJK>
+EE5E 87B9 # <CJK>
+EE5F 87B5 # <CJK>
+EE60 87BC # <CJK>
+EE61 87AE # <CJK>
+EE62 87C9 # <CJK>
+EE63 87C3 # <CJK>
+EE64 87C2 # <CJK>
+EE65 87CC # <CJK>
+EE66 87B7 # <CJK>
+EE67 87AF # <CJK>
+EE68 87C4 # <CJK>
+EE69 87CA # <CJK>
+EE6A 87B4 # <CJK>
+EE6B 87B6 # <CJK>
+EE6C 87BF # <CJK>
+EE6D 87B8 # <CJK>
+EE6E 87BD # <CJK>
+EE6F 87DE # <CJK>
+EE70 87B2 # <CJK>
+EE71 8935 # <CJK>
+EE72 8933 # <CJK>
+EE73 893C # <CJK>
+EE74 893E # <CJK>
+EE75 8941 # <CJK>
+EE76 8952 # <CJK>
+EE77 8937 # <CJK>
+EE78 8942 # <CJK>
+EE79 89AD # <CJK>
+EE7A 89AF # <CJK>
+EE7B 89AE # <CJK>
+EE7C 89F2 # <CJK>
+EE7D 89F3 # <CJK>
+EE7E 8B1E # <CJK>
+EEA1 8B18 # <CJK>
+EEA2 8B16 # <CJK>
+EEA3 8B11 # <CJK>
+EEA4 8B05 # <CJK>
+EEA5 8B0B # <CJK>
+EEA6 8B22 # <CJK>
+EEA7 8B0F # <CJK>
+EEA8 8B12 # <CJK>
+EEA9 8B15 # <CJK>
+EEAA 8B07 # <CJK>
+EEAB 8B0D # <CJK>
+EEAC 8B08 # <CJK>
+EEAD 8B06 # <CJK>
+EEAE 8B1C # <CJK>
+EEAF 8B13 # <CJK>
+EEB0 8B1A # <CJK>
+EEB1 8C4F # <CJK>
+EEB2 8C70 # <CJK>
+EEB3 8C72 # <CJK>
+EEB4 8C71 # <CJK>
+EEB5 8C6F # <CJK>
+EEB6 8C95 # <CJK>
+EEB7 8C94 # <CJK>
+EEB8 8CF9 # <CJK>
+EEB9 8D6F # <CJK>
+EEBA 8E4E # <CJK>
+EEBB 8E4D # <CJK>
+EEBC 8E53 # <CJK>
+EEBD 8E50 # <CJK>
+EEBE 8E4C # <CJK>
+EEBF 8E47 # <CJK>
+EEC0 8F43 # <CJK>
+EEC1 8F40 # <CJK>
+EEC2 9085 # <CJK>
+EEC3 907E # <CJK>
+EEC4 9138 # <CJK>
+EEC5 919A # <CJK>
+EEC6 91A2 # <CJK>
+EEC7 919B # <CJK>
+EEC8 9199 # <CJK>
+EEC9 919F # <CJK>
+EECA 91A1 # <CJK>
+EECB 919D # <CJK>
+EECC 91A0 # <CJK>
+EECD 93A1 # <CJK>
+EECE 9383 # <CJK>
+EECF 93AF # <CJK>
+EED0 9364 # <CJK>
+EED1 9356 # <CJK>
+EED2 9347 # <CJK>
+EED3 937C # <CJK>
+EED4 9358 # <CJK>
+EED5 935C # <CJK>
+EED6 9376 # <CJK>
+EED7 9349 # <CJK>
+EED8 9350 # <CJK>
+EED9 9351 # <CJK>
+EEDA 9360 # <CJK>
+EEDB 936D # <CJK>
+EEDC 938F # <CJK>
+EEDD 934C # <CJK>
+EEDE 936A # <CJK>
+EEDF 9379 # <CJK>
+EEE0 9357 # <CJK>
+EEE1 9355 # <CJK>
+EEE2 9352 # <CJK>
+EEE3 934F # <CJK>
+EEE4 9371 # <CJK>
+EEE5 9377 # <CJK>
+EEE6 937B # <CJK>
+EEE7 9361 # <CJK>
+EEE8 935E # <CJK>
+EEE9 9363 # <CJK>
+EEEA 9367 # <CJK>
+EEEB 9380 # <CJK>
+EEEC 934E # <CJK>
+EEED 9359 # <CJK>
+EEEE 95C7 # <CJK>
+EEEF 95C0 # <CJK>
+EEF0 95C9 # <CJK>
+EEF1 95C3 # <CJK>
+EEF2 95C5 # <CJK>
+EEF3 95B7 # <CJK>
+EEF4 96AE # <CJK>
+EEF5 96B0 # <CJK>
+EEF6 96AC # <CJK>
+EEF7 9720 # <CJK>
+EEF8 971F # <CJK>
+EEF9 9718 # <CJK>
+EEFA 971D # <CJK>
+EEFB 9719 # <CJK>
+EEFC 979A # <CJK>
+EEFD 97A1 # <CJK>
+EEFE 979C # <CJK>
+EF40 979E # <CJK>
+EF41 979D # <CJK>
+EF42 97D5 # <CJK>
+EF43 97D4 # <CJK>
+EF44 97F1 # <CJK>
+EF45 9841 # <CJK>
+EF46 9844 # <CJK>
+EF47 984A # <CJK>
+EF48 9849 # <CJK>
+EF49 9845 # <CJK>
+EF4A 9843 # <CJK>
+EF4B 9925 # <CJK>
+EF4C 992B # <CJK>
+EF4D 992C # <CJK>
+EF4E 992A # <CJK>
+EF4F 9933 # <CJK>
+EF50 9932 # <CJK>
+EF51 992F # <CJK>
+EF52 992D # <CJK>
+EF53 9931 # <CJK>
+EF54 9930 # <CJK>
+EF55 9998 # <CJK>
+EF56 99A3 # <CJK>
+EF57 99A1 # <CJK>
+EF58 9A02 # <CJK>
+EF59 99FA # <CJK>
+EF5A 99F4 # <CJK>
+EF5B 99F7 # <CJK>
+EF5C 99F9 # <CJK>
+EF5D 99F8 # <CJK>
+EF5E 99F6 # <CJK>
+EF5F 99FB # <CJK>
+EF60 99FD # <CJK>
+EF61 99FE # <CJK>
+EF62 99FC # <CJK>
+EF63 9A03 # <CJK>
+EF64 9ABE # <CJK>
+EF65 9AFE # <CJK>
+EF66 9AFD # <CJK>
+EF67 9B01 # <CJK>
+EF68 9AFC # <CJK>
+EF69 9B48 # <CJK>
+EF6A 9B9A # <CJK>
+EF6B 9BA8 # <CJK>
+EF6C 9B9E # <CJK>
+EF6D 9B9B # <CJK>
+EF6E 9BA6 # <CJK>
+EF6F 9BA1 # <CJK>
+EF70 9BA5 # <CJK>
+EF71 9BA4 # <CJK>
+EF72 9B86 # <CJK>
+EF73 9BA2 # <CJK>
+EF74 9BA0 # <CJK>
+EF75 9BAF # <CJK>
+EF76 9D33 # <CJK>
+EF77 9D41 # <CJK>
+EF78 9D67 # <CJK>
+EF79 9D36 # <CJK>
+EF7A 9D2E # <CJK>
+EF7B 9D2F # <CJK>
+EF7C 9D31 # <CJK>
+EF7D 9D38 # <CJK>
+EF7E 9D30 # <CJK>
+EFA1 9D45 # <CJK>
+EFA2 9D42 # <CJK>
+EFA3 9D43 # <CJK>
+EFA4 9D3E # <CJK>
+EFA5 9D37 # <CJK>
+EFA6 9D40 # <CJK>
+EFA7 9D3D # <CJK>
+EFA8 7FF5 # <CJK>
+EFA9 9D2D # <CJK>
+EFAA 9E8A # <CJK>
+EFAB 9E89 # <CJK>
+EFAC 9E8D # <CJK>
+EFAD 9EB0 # <CJK>
+EFAE 9EC8 # <CJK>
+EFAF 9EDA # <CJK>
+EFB0 9EFB # <CJK>
+EFB1 9EFF # <CJK>
+EFB2 9F24 # <CJK>
+EFB3 9F23 # <CJK>
+EFB4 9F22 # <CJK>
+EFB5 9F54 # <CJK>
+EFB6 9FA0 # <CJK>
+EFB7 5131 # <CJK>
+EFB8 512D # <CJK>
+EFB9 512E # <CJK>
+EFBA 5698 # <CJK>
+EFBB 569C # <CJK>
+EFBC 5697 # <CJK>
+EFBD 569A # <CJK>
+EFBE 569D # <CJK>
+EFBF 5699 # <CJK>
+EFC0 5970 # <CJK>
+EFC1 5B3C # <CJK>
+EFC2 5C69 # <CJK>
+EFC3 5C6A # <CJK>
+EFC4 5DC0 # <CJK>
+EFC5 5E6D # <CJK>
+EFC6 5E6E # <CJK>
+EFC7 61D8 # <CJK>
+EFC8 61DF # <CJK>
+EFC9 61ED # <CJK>
+EFCA 61EE # <CJK>
+EFCB 61F1 # <CJK>
+EFCC 61EA # <CJK>
+EFCD 61F0 # <CJK>
+EFCE 61EB # <CJK>
+EFCF 61D6 # <CJK>
+EFD0 61E9 # <CJK>
+EFD1 64FF # <CJK>
+EFD2 6504 # <CJK>
+EFD3 64FD # <CJK>
+EFD4 64F8 # <CJK>
+EFD5 6501 # <CJK>
+EFD6 6503 # <CJK>
+EFD7 64FC # <CJK>
+EFD8 6594 # <CJK>
+EFD9 65DB # <CJK>
+EFDA 66DA # <CJK>
+EFDB 66DB # <CJK>
+EFDC 66D8 # <CJK>
+EFDD 6AC5 # <CJK>
+EFDE 6AB9 # <CJK>
+EFDF 6ABD # <CJK>
+EFE0 6AE1 # <CJK>
+EFE1 6AC6 # <CJK>
+EFE2 6ABA # <CJK>
+EFE3 6AB6 # <CJK>
+EFE4 6AB7 # <CJK>
+EFE5 6AC7 # <CJK>
+EFE6 6AB4 # <CJK>
+EFE7 6AAD # <CJK>
+EFE8 6B5E # <CJK>
+EFE9 6BC9 # <CJK>
+EFEA 6C0B # <CJK>
+EFEB 7007 # <CJK>
+EFEC 700C # <CJK>
+EFED 700D # <CJK>
+EFEE 7001 # <CJK>
+EFEF 7005 # <CJK>
+EFF0 7014 # <CJK>
+EFF1 700E # <CJK>
+EFF2 6FFF # <CJK>
+EFF3 7000 # <CJK>
+EFF4 6FFB # <CJK>
+EFF5 7026 # <CJK>
+EFF6 6FFC # <CJK>
+EFF7 6FF7 # <CJK>
+EFF8 700A # <CJK>
+EFF9 7201 # <CJK>
+EFFA 71FF # <CJK>
+EFFB 71F9 # <CJK>
+EFFC 7203 # <CJK>
+EFFD 71FD # <CJK>
+EFFE 7376 # <CJK>
+F040 74B8 # <CJK>
+F041 74C0 # <CJK>
+F042 74B5 # <CJK>
+F043 74C1 # <CJK>
+F044 74BE # <CJK>
+F045 74B6 # <CJK>
+F046 74BB # <CJK>
+F047 74C2 # <CJK>
+F048 7514 # <CJK>
+F049 7513 # <CJK>
+F04A 765C # <CJK>
+F04B 7664 # <CJK>
+F04C 7659 # <CJK>
+F04D 7650 # <CJK>
+F04E 7653 # <CJK>
+F04F 7657 # <CJK>
+F050 765A # <CJK>
+F051 76A6 # <CJK>
+F052 76BD # <CJK>
+F053 76EC # <CJK>
+F054 77C2 # <CJK>
+F055 77BA # <CJK>
+F056 78FF # <CJK>
+F057 790C # <CJK>
+F058 7913 # <CJK>
+F059 7914 # <CJK>
+F05A 7909 # <CJK>
+F05B 7910 # <CJK>
+F05C 7912 # <CJK>
+F05D 7911 # <CJK>
+F05E 79AD # <CJK>
+F05F 79AC # <CJK>
+F060 7A5F # <CJK>
+F061 7C1C # <CJK>
+F062 7C29 # <CJK>
+F063 7C19 # <CJK>
+F064 7C20 # <CJK>
+F065 7C1F # <CJK>
+F066 7C2D # <CJK>
+F067 7C1D # <CJK>
+F068 7C26 # <CJK>
+F069 7C28 # <CJK>
+F06A 7C22 # <CJK>
+F06B 7C25 # <CJK>
+F06C 7C30 # <CJK>
+F06D 7E5C # <CJK>
+F06E 7E50 # <CJK>
+F06F 7E56 # <CJK>
+F070 7E63 # <CJK>
+F071 7E58 # <CJK>
+F072 7E62 # <CJK>
+F073 7E5F # <CJK>
+F074 7E51 # <CJK>
+F075 7E60 # <CJK>
+F076 7E57 # <CJK>
+F077 7E53 # <CJK>
+F078 7FB5 # <CJK>
+F079 7FB3 # <CJK>
+F07A 7FF7 # <CJK>
+F07B 7FF8 # <CJK>
+F07C 8075 # <CJK>
+F07D 81D1 # <CJK>
+F07E 81D2 # <CJK>
+F0A1 81D0 # <CJK>
+F0A2 825F # <CJK>
+F0A3 825E # <CJK>
+F0A4 85B4 # <CJK>
+F0A5 85C6 # <CJK>
+F0A6 85C0 # <CJK>
+F0A7 85C3 # <CJK>
+F0A8 85C2 # <CJK>
+F0A9 85B3 # <CJK>
+F0AA 85B5 # <CJK>
+F0AB 85BD # <CJK>
+F0AC 85C7 # <CJK>
+F0AD 85C4 # <CJK>
+F0AE 85BF # <CJK>
+F0AF 85CB # <CJK>
+F0B0 85CE # <CJK>
+F0B1 85C8 # <CJK>
+F0B2 85C5 # <CJK>
+F0B3 85B1 # <CJK>
+F0B4 85B6 # <CJK>
+F0B5 85D2 # <CJK>
+F0B6 8624 # <CJK>
+F0B7 85B8 # <CJK>
+F0B8 85B7 # <CJK>
+F0B9 85BE # <CJK>
+F0BA 8669 # <CJK>
+F0BB 87E7 # <CJK>
+F0BC 87E6 # <CJK>
+F0BD 87E2 # <CJK>
+F0BE 87DB # <CJK>
+F0BF 87EB # <CJK>
+F0C0 87EA # <CJK>
+F0C1 87E5 # <CJK>
+F0C2 87DF # <CJK>
+F0C3 87F3 # <CJK>
+F0C4 87E4 # <CJK>
+F0C5 87D4 # <CJK>
+F0C6 87DC # <CJK>
+F0C7 87D3 # <CJK>
+F0C8 87ED # <CJK>
+F0C9 87D8 # <CJK>
+F0CA 87E3 # <CJK>
+F0CB 87A4 # <CJK>
+F0CC 87D7 # <CJK>
+F0CD 87D9 # <CJK>
+F0CE 8801 # <CJK>
+F0CF 87F4 # <CJK>
+F0D0 87E8 # <CJK>
+F0D1 87DD # <CJK>
+F0D2 8953 # <CJK>
+F0D3 894B # <CJK>
+F0D4 894F # <CJK>
+F0D5 894C # <CJK>
+F0D6 8946 # <CJK>
+F0D7 8950 # <CJK>
+F0D8 8951 # <CJK>
+F0D9 8949 # <CJK>
+F0DA 8B2A # <CJK>
+F0DB 8B27 # <CJK>
+F0DC 8B23 # <CJK>
+F0DD 8B33 # <CJK>
+F0DE 8B30 # <CJK>
+F0DF 8B35 # <CJK>
+F0E0 8B47 # <CJK>
+F0E1 8B2F # <CJK>
+F0E2 8B3C # <CJK>
+F0E3 8B3E # <CJK>
+F0E4 8B31 # <CJK>
+F0E5 8B25 # <CJK>
+F0E6 8B37 # <CJK>
+F0E7 8B26 # <CJK>
+F0E8 8B36 # <CJK>
+F0E9 8B2E # <CJK>
+F0EA 8B24 # <CJK>
+F0EB 8B3B # <CJK>
+F0EC 8B3D # <CJK>
+F0ED 8B3A # <CJK>
+F0EE 8C42 # <CJK>
+F0EF 8C75 # <CJK>
+F0F0 8C99 # <CJK>
+F0F1 8C98 # <CJK>
+F0F2 8C97 # <CJK>
+F0F3 8CFE # <CJK>
+F0F4 8D04 # <CJK>
+F0F5 8D02 # <CJK>
+F0F6 8D00 # <CJK>
+F0F7 8E5C # <CJK>
+F0F8 8E62 # <CJK>
+F0F9 8E60 # <CJK>
+F0FA 8E57 # <CJK>
+F0FB 8E56 # <CJK>
+F0FC 8E5E # <CJK>
+F0FD 8E65 # <CJK>
+F0FE 8E67 # <CJK>
+F140 8E5B # <CJK>
+F141 8E5A # <CJK>
+F142 8E61 # <CJK>
+F143 8E5D # <CJK>
+F144 8E69 # <CJK>
+F145 8E54 # <CJK>
+F146 8F46 # <CJK>
+F147 8F47 # <CJK>
+F148 8F48 # <CJK>
+F149 8F4B # <CJK>
+F14A 9128 # <CJK>
+F14B 913A # <CJK>
+F14C 913B # <CJK>
+F14D 913E # <CJK>
+F14E 91A8 # <CJK>
+F14F 91A5 # <CJK>
+F150 91A7 # <CJK>
+F151 91AF # <CJK>
+F152 91AA # <CJK>
+F153 93B5 # <CJK>
+F154 938C # <CJK>
+F155 9392 # <CJK>
+F156 93B7 # <CJK>
+F157 939B # <CJK>
+F158 939D # <CJK>
+F159 9389 # <CJK>
+F15A 93A7 # <CJK>
+F15B 938E # <CJK>
+F15C 93AA # <CJK>
+F15D 939E # <CJK>
+F15E 93A6 # <CJK>
+F15F 9395 # <CJK>
+F160 9388 # <CJK>
+F161 9399 # <CJK>
+F162 939F # <CJK>
+F163 938D # <CJK>
+F164 93B1 # <CJK>
+F165 9391 # <CJK>
+F166 93B2 # <CJK>
+F167 93A4 # <CJK>
+F168 93A8 # <CJK>
+F169 93B4 # <CJK>
+F16A 93A3 # <CJK>
+F16B 93A5 # <CJK>
+F16C 95D2 # <CJK>
+F16D 95D3 # <CJK>
+F16E 95D1 # <CJK>
+F16F 96B3 # <CJK>
+F170 96D7 # <CJK>
+F171 96DA # <CJK>
+F172 5DC2 # <CJK>
+F173 96DF # <CJK>
+F174 96D8 # <CJK>
+F175 96DD # <CJK>
+F176 9723 # <CJK>
+F177 9722 # <CJK>
+F178 9725 # <CJK>
+F179 97AC # <CJK>
+F17A 97AE # <CJK>
+F17B 97A8 # <CJK>
+F17C 97AB # <CJK>
+F17D 97A4 # <CJK>
+F17E 97AA # <CJK>
+F1A1 97A2 # <CJK>
+F1A2 97A5 # <CJK>
+F1A3 97D7 # <CJK>
+F1A4 97D9 # <CJK>
+F1A5 97D6 # <CJK>
+F1A6 97D8 # <CJK>
+F1A7 97FA # <CJK>
+F1A8 9850 # <CJK>
+F1A9 9851 # <CJK>
+F1AA 9852 # <CJK>
+F1AB 98B8 # <CJK>
+F1AC 9941 # <CJK>
+F1AD 993C # <CJK>
+F1AE 993A # <CJK>
+F1AF 9A0F # <CJK>
+F1B0 9A0B # <CJK>
+F1B1 9A09 # <CJK>
+F1B2 9A0D # <CJK>
+F1B3 9A04 # <CJK>
+F1B4 9A11 # <CJK>
+F1B5 9A0A # <CJK>
+F1B6 9A05 # <CJK>
+F1B7 9A07 # <CJK>
+F1B8 9A06 # <CJK>
+F1B9 9AC0 # <CJK>
+F1BA 9ADC # <CJK>
+F1BB 9B08 # <CJK>
+F1BC 9B04 # <CJK>
+F1BD 9B05 # <CJK>
+F1BE 9B29 # <CJK>
+F1BF 9B35 # <CJK>
+F1C0 9B4A # <CJK>
+F1C1 9B4C # <CJK>
+F1C2 9B4B # <CJK>
+F1C3 9BC7 # <CJK>
+F1C4 9BC6 # <CJK>
+F1C5 9BC3 # <CJK>
+F1C6 9BBF # <CJK>
+F1C7 9BC1 # <CJK>
+F1C8 9BB5 # <CJK>
+F1C9 9BB8 # <CJK>
+F1CA 9BD3 # <CJK>
+F1CB 9BB6 # <CJK>
+F1CC 9BC4 # <CJK>
+F1CD 9BB9 # <CJK>
+F1CE 9BBD # <CJK>
+F1CF 9D5C # <CJK>
+F1D0 9D53 # <CJK>
+F1D1 9D4F # <CJK>
+F1D2 9D4A # <CJK>
+F1D3 9D5B # <CJK>
+F1D4 9D4B # <CJK>
+F1D5 9D59 # <CJK>
+F1D6 9D56 # <CJK>
+F1D7 9D4C # <CJK>
+F1D8 9D57 # <CJK>
+F1D9 9D52 # <CJK>
+F1DA 9D54 # <CJK>
+F1DB 9D5F # <CJK>
+F1DC 9D58 # <CJK>
+F1DD 9D5A # <CJK>
+F1DE 9E8E # <CJK>
+F1DF 9E8C # <CJK>
+F1E0 9EDF # <CJK>
+F1E1 9F01 # <CJK>
+F1E2 9F00 # <CJK>
+F1E3 9F16 # <CJK>
+F1E4 9F25 # <CJK>
+F1E5 9F2B # <CJK>
+F1E6 9F2A # <CJK>
+F1E7 9F29 # <CJK>
+F1E8 9F28 # <CJK>
+F1E9 9F4C # <CJK>
+F1EA 9F55 # <CJK>
+F1EB 5134 # <CJK>
+F1EC 5135 # <CJK>
+F1ED 5296 # <CJK>
+F1EE 52F7 # <CJK>
+F1EF 53B4 # <CJK>
+F1F0 56AB # <CJK>
+F1F1 56AD # <CJK>
+F1F2 56A6 # <CJK>
+F1F3 56A7 # <CJK>
+F1F4 56AA # <CJK>
+F1F5 56AC # <CJK>
+F1F6 58DA # <CJK>
+F1F7 58DD # <CJK>
+F1F8 58DB # <CJK>
+F1F9 5912 # <CJK>
+F1FA 5B3D # <CJK>
+F1FB 5B3E # <CJK>
+F1FC 5B3F # <CJK>
+F1FD 5DC3 # <CJK>
+F1FE 5E70 # <CJK>
+F240 5FBF # <CJK>
+F241 61FB # <CJK>
+F242 6507 # <CJK>
+F243 6510 # <CJK>
+F244 650D # <CJK>
+F245 6509 # <CJK>
+F246 650C # <CJK>
+F247 650E # <CJK>
+F248 6584 # <CJK>
+F249 65DE # <CJK>
+F24A 65DD # <CJK>
+F24B 66DE # <CJK>
+F24C 6AE7 # <CJK>
+F24D 6AE0 # <CJK>
+F24E 6ACC # <CJK>
+F24F 6AD1 # <CJK>
+F250 6AD9 # <CJK>
+F251 6ACB # <CJK>
+F252 6ADF # <CJK>
+F253 6ADC # <CJK>
+F254 6AD0 # <CJK>
+F255 6AEB # <CJK>
+F256 6ACF # <CJK>
+F257 6ACD # <CJK>
+F258 6ADE # <CJK>
+F259 6B60 # <CJK>
+F25A 6BB0 # <CJK>
+F25B 6C0C # <CJK>
+F25C 7019 # <CJK>
+F25D 7027 # <CJK>
+F25E 7020 # <CJK>
+F25F 7016 # <CJK>
+F260 702B # <CJK>
+F261 7021 # <CJK>
+F262 7022 # <CJK>
+F263 7023 # <CJK>
+F264 7029 # <CJK>
+F265 7017 # <CJK>
+F266 7024 # <CJK>
+F267 701C # <CJK>
+F268 702A # <CJK>
+F269 720C # <CJK>
+F26A 720A # <CJK>
+F26B 7207 # <CJK>
+F26C 7202 # <CJK>
+F26D 7205 # <CJK>
+F26E 72A5 # <CJK>
+F26F 72A6 # <CJK>
+F270 72A4 # <CJK>
+F271 72A3 # <CJK>
+F272 72A1 # <CJK>
+F273 74CB # <CJK>
+F274 74C5 # <CJK>
+F275 74B7 # <CJK>
+F276 74C3 # <CJK>
+F277 7516 # <CJK>
+F278 7660 # <CJK>
+F279 77C9 # <CJK>
+F27A 77CA # <CJK>
+F27B 77C4 # <CJK>
+F27C 77F1 # <CJK>
+F27D 791D # <CJK>
+F27E 791B # <CJK>
+F2A1 7921 # <CJK>
+F2A2 791C # <CJK>
+F2A3 7917 # <CJK>
+F2A4 791E # <CJK>
+F2A5 79B0 # <CJK>
+F2A6 7A67 # <CJK>
+F2A7 7A68 # <CJK>
+F2A8 7C33 # <CJK>
+F2A9 7C3C # <CJK>
+F2AA 7C39 # <CJK>
+F2AB 7C2C # <CJK>
+F2AC 7C3B # <CJK>
+F2AD 7CEC # <CJK>
+F2AE 7CEA # <CJK>
+F2AF 7E76 # <CJK>
+F2B0 7E75 # <CJK>
+F2B1 7E78 # <CJK>
+F2B2 7E70 # <CJK>
+F2B3 7E77 # <CJK>
+F2B4 7E6F # <CJK>
+F2B5 7E7A # <CJK>
+F2B6 7E72 # <CJK>
+F2B7 7E74 # <CJK>
+F2B8 7E68 # <CJK>
+F2B9 7F4B # <CJK>
+F2BA 7F4A # <CJK>
+F2BB 7F83 # <CJK>
+F2BC 7F86 # <CJK>
+F2BD 7FB7 # <CJK>
+F2BE 7FFD # <CJK>
+F2BF 7FFE # <CJK>
+F2C0 8078 # <CJK>
+F2C1 81D7 # <CJK>
+F2C2 81D5 # <CJK>
+F2C3 8264 # <CJK>
+F2C4 8261 # <CJK>
+F2C5 8263 # <CJK>
+F2C6 85EB # <CJK>
+F2C7 85F1 # <CJK>
+F2C8 85ED # <CJK>
+F2C9 85D9 # <CJK>
+F2CA 85E1 # <CJK>
+F2CB 85E8 # <CJK>
+F2CC 85DA # <CJK>
+F2CD 85D7 # <CJK>
+F2CE 85EC # <CJK>
+F2CF 85F2 # <CJK>
+F2D0 85F8 # <CJK>
+F2D1 85D8 # <CJK>
+F2D2 85DF # <CJK>
+F2D3 85E3 # <CJK>
+F2D4 85DC # <CJK>
+F2D5 85D1 # <CJK>
+F2D6 85F0 # <CJK>
+F2D7 85E6 # <CJK>
+F2D8 85EF # <CJK>
+F2D9 85DE # <CJK>
+F2DA 85E2 # <CJK>
+F2DB 8800 # <CJK>
+F2DC 87FA # <CJK>
+F2DD 8803 # <CJK>
+F2DE 87F6 # <CJK>
+F2DF 87F7 # <CJK>
+F2E0 8809 # <CJK>
+F2E1 880C # <CJK>
+F2E2 880B # <CJK>
+F2E3 8806 # <CJK>
+F2E4 87FC # <CJK>
+F2E5 8808 # <CJK>
+F2E6 87FF # <CJK>
+F2E7 880A # <CJK>
+F2E8 8802 # <CJK>
+F2E9 8962 # <CJK>
+F2EA 895A # <CJK>
+F2EB 895B # <CJK>
+F2EC 8957 # <CJK>
+F2ED 8961 # <CJK>
+F2EE 895C # <CJK>
+F2EF 8958 # <CJK>
+F2F0 895D # <CJK>
+F2F1 8959 # <CJK>
+F2F2 8988 # <CJK>
+F2F3 89B7 # <CJK>
+F2F4 89B6 # <CJK>
+F2F5 89F6 # <CJK>
+F2F6 8B50 # <CJK>
+F2F7 8B48 # <CJK>
+F2F8 8B4A # <CJK>
+F2F9 8B40 # <CJK>
+F2FA 8B53 # <CJK>
+F2FB 8B56 # <CJK>
+F2FC 8B54 # <CJK>
+F2FD 8B4B # <CJK>
+F2FE 8B55 # <CJK>
+F340 8B51 # <CJK>
+F341 8B42 # <CJK>
+F342 8B52 # <CJK>
+F343 8B57 # <CJK>
+F344 8C43 # <CJK>
+F345 8C77 # <CJK>
+F346 8C76 # <CJK>
+F347 8C9A # <CJK>
+F348 8D06 # <CJK>
+F349 8D07 # <CJK>
+F34A 8D09 # <CJK>
+F34B 8DAC # <CJK>
+F34C 8DAA # <CJK>
+F34D 8DAD # <CJK>
+F34E 8DAB # <CJK>
+F34F 8E6D # <CJK>
+F350 8E78 # <CJK>
+F351 8E73 # <CJK>
+F352 8E6A # <CJK>
+F353 8E6F # <CJK>
+F354 8E7B # <CJK>
+F355 8EC2 # <CJK>
+F356 8F52 # <CJK>
+F357 8F51 # <CJK>
+F358 8F4F # <CJK>
+F359 8F50 # <CJK>
+F35A 8F53 # <CJK>
+F35B 8FB4 # <CJK>
+F35C 9140 # <CJK>
+F35D 913F # <CJK>
+F35E 91B0 # <CJK>
+F35F 91AD # <CJK>
+F360 93DE # <CJK>
+F361 93C7 # <CJK>
+F362 93CF # <CJK>
+F363 93C2 # <CJK>
+F364 93DA # <CJK>
+F365 93D0 # <CJK>
+F366 93F9 # <CJK>
+F367 93EC # <CJK>
+F368 93CC # <CJK>
+F369 93D9 # <CJK>
+F36A 93A9 # <CJK>
+F36B 93E6 # <CJK>
+F36C 93CA # <CJK>
+F36D 93D4 # <CJK>
+F36E 93EE # <CJK>
+F36F 93E3 # <CJK>
+F370 93D5 # <CJK>
+F371 93C4 # <CJK>
+F372 93CE # <CJK>
+F373 93C0 # <CJK>
+F374 93D2 # <CJK>
+F375 93E7 # <CJK>
+F376 957D # <CJK>
+F377 95DA # <CJK>
+F378 95DB # <CJK>
+F379 96E1 # <CJK>
+F37A 9729 # <CJK>
+F37B 972B # <CJK>
+F37C 972C # <CJK>
+F37D 9728 # <CJK>
+F37E 9726 # <CJK>
+F3A1 97B3 # <CJK>
+F3A2 97B7 # <CJK>
+F3A3 97B6 # <CJK>
+F3A4 97DD # <CJK>
+F3A5 97DE # <CJK>
+F3A6 97DF # <CJK>
+F3A7 985C # <CJK>
+F3A8 9859 # <CJK>
+F3A9 985D # <CJK>
+F3AA 9857 # <CJK>
+F3AB 98BF # <CJK>
+F3AC 98BD # <CJK>
+F3AD 98BB # <CJK>
+F3AE 98BE # <CJK>
+F3AF 9948 # <CJK>
+F3B0 9947 # <CJK>
+F3B1 9943 # <CJK>
+F3B2 99A6 # <CJK>
+F3B3 99A7 # <CJK>
+F3B4 9A1A # <CJK>
+F3B5 9A15 # <CJK>
+F3B6 9A25 # <CJK>
+F3B7 9A1D # <CJK>
+F3B8 9A24 # <CJK>
+F3B9 9A1B # <CJK>
+F3BA 9A22 # <CJK>
+F3BB 9A20 # <CJK>
+F3BC 9A27 # <CJK>
+F3BD 9A23 # <CJK>
+F3BE 9A1E # <CJK>
+F3BF 9A1C # <CJK>
+F3C0 9A14 # <CJK>
+F3C1 9AC2 # <CJK>
+F3C2 9B0B # <CJK>
+F3C3 9B0A # <CJK>
+F3C4 9B0E # <CJK>
+F3C5 9B0C # <CJK>
+F3C6 9B37 # <CJK>
+F3C7 9BEA # <CJK>
+F3C8 9BEB # <CJK>
+F3C9 9BE0 # <CJK>
+F3CA 9BDE # <CJK>
+F3CB 9BE4 # <CJK>
+F3CC 9BE6 # <CJK>
+F3CD 9BE2 # <CJK>
+F3CE 9BF0 # <CJK>
+F3CF 9BD4 # <CJK>
+F3D0 9BD7 # <CJK>
+F3D1 9BEC # <CJK>
+F3D2 9BDC # <CJK>
+F3D3 9BD9 # <CJK>
+F3D4 9BE5 # <CJK>
+F3D5 9BD5 # <CJK>
+F3D6 9BE1 # <CJK>
+F3D7 9BDA # <CJK>
+F3D8 9D77 # <CJK>
+F3D9 9D81 # <CJK>
+F3DA 9D8A # <CJK>
+F3DB 9D84 # <CJK>
+F3DC 9D88 # <CJK>
+F3DD 9D71 # <CJK>
+F3DE 9D80 # <CJK>
+F3DF 9D78 # <CJK>
+F3E0 9D86 # <CJK>
+F3E1 9D8B # <CJK>
+F3E2 9D8C # <CJK>
+F3E3 9D7D # <CJK>
+F3E4 9D6B # <CJK>
+F3E5 9D74 # <CJK>
+F3E6 9D75 # <CJK>
+F3E7 9D70 # <CJK>
+F3E8 9D69 # <CJK>
+F3E9 9D85 # <CJK>
+F3EA 9D73 # <CJK>
+F3EB 9D7B # <CJK>
+F3EC 9D82 # <CJK>
+F3ED 9D6F # <CJK>
+F3EE 9D79 # <CJK>
+F3EF 9D7F # <CJK>
+F3F0 9D87 # <CJK>
+F3F1 9D68 # <CJK>
+F3F2 9E94 # <CJK>
+F3F3 9E91 # <CJK>
+F3F4 9EC0 # <CJK>
+F3F5 9EFC # <CJK>
+F3F6 9F2D # <CJK>
+F3F7 9F40 # <CJK>
+F3F8 9F41 # <CJK>
+F3F9 9F4D # <CJK>
+F3FA 9F56 # <CJK>
+F3FB 9F57 # <CJK>
+F3FC 9F58 # <CJK>
+F3FD 5337 # <CJK>
+F3FE 56B2 # <CJK>
+F440 56B5 # <CJK>
+F441 56B3 # <CJK>
+F442 58E3 # <CJK>
+F443 5B45 # <CJK>
+F444 5DC6 # <CJK>
+F445 5DC7 # <CJK>
+F446 5EEE # <CJK>
+F447 5EEF # <CJK>
+F448 5FC0 # <CJK>
+F449 5FC1 # <CJK>
+F44A 61F9 # <CJK>
+F44B 6517 # <CJK>
+F44C 6516 # <CJK>
+F44D 6515 # <CJK>
+F44E 6513 # <CJK>
+F44F 65DF # <CJK>
+F450 66E8 # <CJK>
+F451 66E3 # <CJK>
+F452 66E4 # <CJK>
+F453 6AF3 # <CJK>
+F454 6AF0 # <CJK>
+F455 6AEA # <CJK>
+F456 6AE8 # <CJK>
+F457 6AF9 # <CJK>
+F458 6AF1 # <CJK>
+F459 6AEE # <CJK>
+F45A 6AEF # <CJK>
+F45B 703C # <CJK>
+F45C 7035 # <CJK>
+F45D 702F # <CJK>
+F45E 7037 # <CJK>
+F45F 7034 # <CJK>
+F460 7031 # <CJK>
+F461 7042 # <CJK>
+F462 7038 # <CJK>
+F463 703F # <CJK>
+F464 703A # <CJK>
+F465 7039 # <CJK>
+F466 7040 # <CJK>
+F467 703B # <CJK>
+F468 7033 # <CJK>
+F469 7041 # <CJK>
+F46A 7213 # <CJK>
+F46B 7214 # <CJK>
+F46C 72A8 # <CJK>
+F46D 737D # <CJK>
+F46E 737C # <CJK>
+F46F 74BA # <CJK>
+F470 76AB # <CJK>
+F471 76AA # <CJK>
+F472 76BE # <CJK>
+F473 76ED # <CJK>
+F474 77CC # <CJK>
+F475 77CE # <CJK>
+F476 77CF # <CJK>
+F477 77CD # <CJK>
+F478 77F2 # <CJK>
+F479 7925 # <CJK>
+F47A 7923 # <CJK>
+F47B 7927 # <CJK>
+F47C 7928 # <CJK>
+F47D 7924 # <CJK>
+F47E 7929 # <CJK>
+F4A1 79B2 # <CJK>
+F4A2 7A6E # <CJK>
+F4A3 7A6C # <CJK>
+F4A4 7A6D # <CJK>
+F4A5 7AF7 # <CJK>
+F4A6 7C49 # <CJK>
+F4A7 7C48 # <CJK>
+F4A8 7C4A # <CJK>
+F4A9 7C47 # <CJK>
+F4AA 7C45 # <CJK>
+F4AB 7CEE # <CJK>
+F4AC 7E7B # <CJK>
+F4AD 7E7E # <CJK>
+F4AE 7E81 # <CJK>
+F4AF 7E80 # <CJK>
+F4B0 7FBA # <CJK>
+F4B1 7FFF # <CJK>
+F4B2 8079 # <CJK>
+F4B3 81DB # <CJK>
+F4B4 81D9 # <CJK>
+F4B5 820B # <CJK>
+F4B6 8268 # <CJK>
+F4B7 8269 # <CJK>
+F4B8 8622 # <CJK>
+F4B9 85FF # <CJK>
+F4BA 8601 # <CJK>
+F4BB 85FE # <CJK>
+F4BC 861B # <CJK>
+F4BD 8600 # <CJK>
+F4BE 85F6 # <CJK>
+F4BF 8604 # <CJK>
+F4C0 8609 # <CJK>
+F4C1 8605 # <CJK>
+F4C2 860C # <CJK>
+F4C3 85FD # <CJK>
+F4C4 8819 # <CJK>
+F4C5 8810 # <CJK>
+F4C6 8811 # <CJK>
+F4C7 8817 # <CJK>
+F4C8 8813 # <CJK>
+F4C9 8816 # <CJK>
+F4CA 8963 # <CJK>
+F4CB 8966 # <CJK>
+F4CC 89B9 # <CJK>
+F4CD 89F7 # <CJK>
+F4CE 8B60 # <CJK>
+F4CF 8B6A # <CJK>
+F4D0 8B5D # <CJK>
+F4D1 8B68 # <CJK>
+F4D2 8B63 # <CJK>
+F4D3 8B65 # <CJK>
+F4D4 8B67 # <CJK>
+F4D5 8B6D # <CJK>
+F4D6 8DAE # <CJK>
+F4D7 8E86 # <CJK>
+F4D8 8E88 # <CJK>
+F4D9 8E84 # <CJK>
+F4DA 8F59 # <CJK>
+F4DB 8F56 # <CJK>
+F4DC 8F57 # <CJK>
+F4DD 8F55 # <CJK>
+F4DE 8F58 # <CJK>
+F4DF 8F5A # <CJK>
+F4E0 908D # <CJK>
+F4E1 9143 # <CJK>
+F4E2 9141 # <CJK>
+F4E3 91B7 # <CJK>
+F4E4 91B5 # <CJK>
+F4E5 91B2 # <CJK>
+F4E6 91B3 # <CJK>
+F4E7 940B # <CJK>
+F4E8 9413 # <CJK>
+F4E9 93FB # <CJK>
+F4EA 9420 # <CJK>
+F4EB 940F # <CJK>
+F4EC 9414 # <CJK>
+F4ED 93FE # <CJK>
+F4EE 9415 # <CJK>
+F4EF 9410 # <CJK>
+F4F0 9428 # <CJK>
+F4F1 9419 # <CJK>
+F4F2 940D # <CJK>
+F4F3 93F5 # <CJK>
+F4F4 9400 # <CJK>
+F4F5 93F7 # <CJK>
+F4F6 9407 # <CJK>
+F4F7 940E # <CJK>
+F4F8 9416 # <CJK>
+F4F9 9412 # <CJK>
+F4FA 93FA # <CJK>
+F4FB 9409 # <CJK>
+F4FC 93F8 # <CJK>
+F4FD 940A # <CJK>
+F4FE 93FF # <CJK>
+F540 93FC # <CJK>
+F541 940C # <CJK>
+F542 93F6 # <CJK>
+F543 9411 # <CJK>
+F544 9406 # <CJK>
+F545 95DE # <CJK>
+F546 95E0 # <CJK>
+F547 95DF # <CJK>
+F548 972E # <CJK>
+F549 972F # <CJK>
+F54A 97B9 # <CJK>
+F54B 97BB # <CJK>
+F54C 97FD # <CJK>
+F54D 97FE # <CJK>
+F54E 9860 # <CJK>
+F54F 9862 # <CJK>
+F550 9863 # <CJK>
+F551 985F # <CJK>
+F552 98C1 # <CJK>
+F553 98C2 # <CJK>
+F554 9950 # <CJK>
+F555 994E # <CJK>
+F556 9959 # <CJK>
+F557 994C # <CJK>
+F558 994B # <CJK>
+F559 9953 # <CJK>
+F55A 9A32 # <CJK>
+F55B 9A34 # <CJK>
+F55C 9A31 # <CJK>
+F55D 9A2C # <CJK>
+F55E 9A2A # <CJK>
+F55F 9A36 # <CJK>
+F560 9A29 # <CJK>
+F561 9A2E # <CJK>
+F562 9A38 # <CJK>
+F563 9A2D # <CJK>
+F564 9AC7 # <CJK>
+F565 9ACA # <CJK>
+F566 9AC6 # <CJK>
+F567 9B10 # <CJK>
+F568 9B12 # <CJK>
+F569 9B11 # <CJK>
+F56A 9C0B # <CJK>
+F56B 9C08 # <CJK>
+F56C 9BF7 # <CJK>
+F56D 9C05 # <CJK>
+F56E 9C12 # <CJK>
+F56F 9BF8 # <CJK>
+F570 9C40 # <CJK>
+F571 9C07 # <CJK>
+F572 9C0E # <CJK>
+F573 9C06 # <CJK>
+F574 9C17 # <CJK>
+F575 9C14 # <CJK>
+F576 9C09 # <CJK>
+F577 9D9F # <CJK>
+F578 9D99 # <CJK>
+F579 9DA4 # <CJK>
+F57A 9D9D # <CJK>
+F57B 9D92 # <CJK>
+F57C 9D98 # <CJK>
+F57D 9D90 # <CJK>
+F57E 9D9B # <CJK>
+F5A1 9DA0 # <CJK>
+F5A2 9D94 # <CJK>
+F5A3 9D9C # <CJK>
+F5A4 9DAA # <CJK>
+F5A5 9D97 # <CJK>
+F5A6 9DA1 # <CJK>
+F5A7 9D9A # <CJK>
+F5A8 9DA2 # <CJK>
+F5A9 9DA8 # <CJK>
+F5AA 9D9E # <CJK>
+F5AB 9DA3 # <CJK>
+F5AC 9DBF # <CJK>
+F5AD 9DA9 # <CJK>
+F5AE 9D96 # <CJK>
+F5AF 9DA6 # <CJK>
+F5B0 9DA7 # <CJK>
+F5B1 9E99 # <CJK>
+F5B2 9E9B # <CJK>
+F5B3 9E9A # <CJK>
+F5B4 9EE5 # <CJK>
+F5B5 9EE4 # <CJK>
+F5B6 9EE7 # <CJK>
+F5B7 9EE6 # <CJK>
+F5B8 9F30 # <CJK>
+F5B9 9F2E # <CJK>
+F5BA 9F5B # <CJK>
+F5BB 9F60 # <CJK>
+F5BC 9F5E # <CJK>
+F5BD 9F5D # <CJK>
+F5BE 9F59 # <CJK>
+F5BF 9F91 # <CJK>
+F5C0 513A # <CJK>
+F5C1 5139 # <CJK>
+F5C2 5298 # <CJK>
+F5C3 5297 # <CJK>
+F5C4 56C3 # <CJK>
+F5C5 56BD # <CJK>
+F5C6 56BE # <CJK>
+F5C7 5B48 # <CJK>
+F5C8 5B47 # <CJK>
+F5C9 5DCB # <CJK>
+F5CA 5DCF # <CJK>
+F5CB 5EF1 # <CJK>
+F5CC 61FD # <CJK>
+F5CD 651B # <CJK>
+F5CE 6B02 # <CJK>
+F5CF 6AFC # <CJK>
+F5D0 6B03 # <CJK>
+F5D1 6AF8 # <CJK>
+F5D2 6B00 # <CJK>
+F5D3 7043 # <CJK>
+F5D4 7044 # <CJK>
+F5D5 704A # <CJK>
+F5D6 7048 # <CJK>
+F5D7 7049 # <CJK>
+F5D8 7045 # <CJK>
+F5D9 7046 # <CJK>
+F5DA 721D # <CJK>
+F5DB 721A # <CJK>
+F5DC 7219 # <CJK>
+F5DD 737E # <CJK>
+F5DE 7517 # <CJK>
+F5DF 766A # <CJK>
+F5E0 77D0 # <CJK>
+F5E1 792D # <CJK>
+F5E2 7931 # <CJK>
+F5E3 792F # <CJK>
+F5E4 7C54 # <CJK>
+F5E5 7C53 # <CJK>
+F5E6 7CF2 # <CJK>
+F5E7 7E8A # <CJK>
+F5E8 7E87 # <CJK>
+F5E9 7E88 # <CJK>
+F5EA 7E8B # <CJK>
+F5EB 7E86 # <CJK>
+F5EC 7E8D # <CJK>
+F5ED 7F4D # <CJK>
+F5EE 7FBB # <CJK>
+F5EF 8030 # <CJK>
+F5F0 81DD # <CJK>
+F5F1 8618 # <CJK>
+F5F2 862A # <CJK>
+F5F3 8626 # <CJK>
+F5F4 861F # <CJK>
+F5F5 8623 # <CJK>
+F5F6 861C # <CJK>
+F5F7 8619 # <CJK>
+F5F8 8627 # <CJK>
+F5F9 862E # <CJK>
+F5FA 8621 # <CJK>
+F5FB 8620 # <CJK>
+F5FC 8629 # <CJK>
+F5FD 861E # <CJK>
+F5FE 8625 # <CJK>
+F640 8829 # <CJK>
+F641 881D # <CJK>
+F642 881B # <CJK>
+F643 8820 # <CJK>
+F644 8824 # <CJK>
+F645 881C # <CJK>
+F646 882B # <CJK>
+F647 884A # <CJK>
+F648 896D # <CJK>
+F649 8969 # <CJK>
+F64A 896E # <CJK>
+F64B 896B # <CJK>
+F64C 89FA # <CJK>
+F64D 8B79 # <CJK>
+F64E 8B78 # <CJK>
+F64F 8B45 # <CJK>
+F650 8B7A # <CJK>
+F651 8B7B # <CJK>
+F652 8D10 # <CJK>
+F653 8D14 # <CJK>
+F654 8DAF # <CJK>
+F655 8E8E # <CJK>
+F656 8E8C # <CJK>
+F657 8F5E # <CJK>
+F658 8F5B # <CJK>
+F659 8F5D # <CJK>
+F65A 9146 # <CJK>
+F65B 9144 # <CJK>
+F65C 9145 # <CJK>
+F65D 91B9 # <CJK>
+F65E 943F # <CJK>
+F65F 943B # <CJK>
+F660 9436 # <CJK>
+F661 9429 # <CJK>
+F662 943D # <CJK>
+F663 943C # <CJK>
+F664 9430 # <CJK>
+F665 9439 # <CJK>
+F666 942A # <CJK>
+F667 9437 # <CJK>
+F668 942C # <CJK>
+F669 9440 # <CJK>
+F66A 9431 # <CJK>
+F66B 95E5 # <CJK>
+F66C 95E4 # <CJK>
+F66D 95E3 # <CJK>
+F66E 9735 # <CJK>
+F66F 973A # <CJK>
+F670 97BF # <CJK>
+F671 97E1 # <CJK>
+F672 9864 # <CJK>
+F673 98C9 # <CJK>
+F674 98C6 # <CJK>
+F675 98C0 # <CJK>
+F676 9958 # <CJK>
+F677 9956 # <CJK>
+F678 9A39 # <CJK>
+F679 9A3D # <CJK>
+F67A 9A46 # <CJK>
+F67B 9A44 # <CJK>
+F67C 9A42 # <CJK>
+F67D 9A41 # <CJK>
+F67E 9A3A # <CJK>
+F6A1 9A3F # <CJK>
+F6A2 9ACD # <CJK>
+F6A3 9B15 # <CJK>
+F6A4 9B17 # <CJK>
+F6A5 9B18 # <CJK>
+F6A6 9B16 # <CJK>
+F6A7 9B3A # <CJK>
+F6A8 9B52 # <CJK>
+F6A9 9C2B # <CJK>
+F6AA 9C1D # <CJK>
+F6AB 9C1C # <CJK>
+F6AC 9C2C # <CJK>
+F6AD 9C23 # <CJK>
+F6AE 9C28 # <CJK>
+F6AF 9C29 # <CJK>
+F6B0 9C24 # <CJK>
+F6B1 9C21 # <CJK>
+F6B2 9DB7 # <CJK>
+F6B3 9DB6 # <CJK>
+F6B4 9DBC # <CJK>
+F6B5 9DC1 # <CJK>
+F6B6 9DC7 # <CJK>
+F6B7 9DCA # <CJK>
+F6B8 9DCF # <CJK>
+F6B9 9DBE # <CJK>
+F6BA 9DC5 # <CJK>
+F6BB 9DC3 # <CJK>
+F6BC 9DBB # <CJK>
+F6BD 9DB5 # <CJK>
+F6BE 9DCE # <CJK>
+F6BF 9DB9 # <CJK>
+F6C0 9DBA # <CJK>
+F6C1 9DAC # <CJK>
+F6C2 9DC8 # <CJK>
+F6C3 9DB1 # <CJK>
+F6C4 9DAD # <CJK>
+F6C5 9DCC # <CJK>
+F6C6 9DB3 # <CJK>
+F6C7 9DCD # <CJK>
+F6C8 9DB2 # <CJK>
+F6C9 9E7A # <CJK>
+F6CA 9E9C # <CJK>
+F6CB 9EEB # <CJK>
+F6CC 9EEE # <CJK>
+F6CD 9EED # <CJK>
+F6CE 9F1B # <CJK>
+F6CF 9F18 # <CJK>
+F6D0 9F1A # <CJK>
+F6D1 9F31 # <CJK>
+F6D2 9F4E # <CJK>
+F6D3 9F65 # <CJK>
+F6D4 9F64 # <CJK>
+F6D5 9F92 # <CJK>
+F6D6 4EB9 # <CJK>
+F6D7 56C6 # <CJK>
+F6D8 56C5 # <CJK>
+F6D9 56CB # <CJK>
+F6DA 5971 # <CJK>
+F6DB 5B4B # <CJK>
+F6DC 5B4C # <CJK>
+F6DD 5DD5 # <CJK>
+F6DE 5DD1 # <CJK>
+F6DF 5EF2 # <CJK>
+F6E0 6521 # <CJK>
+F6E1 6520 # <CJK>
+F6E2 6526 # <CJK>
+F6E3 6522 # <CJK>
+F6E4 6B0B # <CJK>
+F6E5 6B08 # <CJK>
+F6E6 6B09 # <CJK>
+F6E7 6C0D # <CJK>
+F6E8 7055 # <CJK>
+F6E9 7056 # <CJK>
+F6EA 7057 # <CJK>
+F6EB 7052 # <CJK>
+F6EC 721E # <CJK>
+F6ED 721F # <CJK>
+F6EE 72A9 # <CJK>
+F6EF 737F # <CJK>
+F6F0 74D8 # <CJK>
+F6F1 74D5 # <CJK>
+F6F2 74D9 # <CJK>
+F6F3 74D7 # <CJK>
+F6F4 766D # <CJK>
+F6F5 76AD # <CJK>
+F6F6 7935 # <CJK>
+F6F7 79B4 # <CJK>
+F6F8 7A70 # <CJK>
+F6F9 7A71 # <CJK>
+F6FA 7C57 # <CJK>
+F6FB 7C5C # <CJK>
+F6FC 7C59 # <CJK>
+F6FD 7C5B # <CJK>
+F6FE 7C5A # <CJK>
+F740 7CF4 # <CJK>
+F741 7CF1 # <CJK>
+F742 7E91 # <CJK>
+F743 7F4F # <CJK>
+F744 7F87 # <CJK>
+F745 81DE # <CJK>
+F746 826B # <CJK>
+F747 8634 # <CJK>
+F748 8635 # <CJK>
+F749 8633 # <CJK>
+F74A 862C # <CJK>
+F74B 8632 # <CJK>
+F74C 8636 # <CJK>
+F74D 882C # <CJK>
+F74E 8828 # <CJK>
+F74F 8826 # <CJK>
+F750 882A # <CJK>
+F751 8825 # <CJK>
+F752 8971 # <CJK>
+F753 89BF # <CJK>
+F754 89BE # <CJK>
+F755 89FB # <CJK>
+F756 8B7E # <CJK>
+F757 8B84 # <CJK>
+F758 8B82 # <CJK>
+F759 8B86 # <CJK>
+F75A 8B85 # <CJK>
+F75B 8B7F # <CJK>
+F75C 8D15 # <CJK>
+F75D 8E95 # <CJK>
+F75E 8E94 # <CJK>
+F75F 8E9A # <CJK>
+F760 8E92 # <CJK>
+F761 8E90 # <CJK>
+F762 8E96 # <CJK>
+F763 8E97 # <CJK>
+F764 8F60 # <CJK>
+F765 8F62 # <CJK>
+F766 9147 # <CJK>
+F767 944C # <CJK>
+F768 9450 # <CJK>
+F769 944A # <CJK>
+F76A 944B # <CJK>
+F76B 944F # <CJK>
+F76C 9447 # <CJK>
+F76D 9445 # <CJK>
+F76E 9448 # <CJK>
+F76F 9449 # <CJK>
+F770 9446 # <CJK>
+F771 973F # <CJK>
+F772 97E3 # <CJK>
+F773 986A # <CJK>
+F774 9869 # <CJK>
+F775 98CB # <CJK>
+F776 9954 # <CJK>
+F777 995B # <CJK>
+F778 9A4E # <CJK>
+F779 9A53 # <CJK>
+F77A 9A54 # <CJK>
+F77B 9A4C # <CJK>
+F77C 9A4F # <CJK>
+F77D 9A48 # <CJK>
+F77E 9A4A # <CJK>
+F7A1 9A49 # <CJK>
+F7A2 9A52 # <CJK>
+F7A3 9A50 # <CJK>
+F7A4 9AD0 # <CJK>
+F7A5 9B19 # <CJK>
+F7A6 9B2B # <CJK>
+F7A7 9B3B # <CJK>
+F7A8 9B56 # <CJK>
+F7A9 9B55 # <CJK>
+F7AA 9C46 # <CJK>
+F7AB 9C48 # <CJK>
+F7AC 9C3F # <CJK>
+F7AD 9C44 # <CJK>
+F7AE 9C39 # <CJK>
+F7AF 9C33 # <CJK>
+F7B0 9C41 # <CJK>
+F7B1 9C3C # <CJK>
+F7B2 9C37 # <CJK>
+F7B3 9C34 # <CJK>
+F7B4 9C32 # <CJK>
+F7B5 9C3D # <CJK>
+F7B6 9C36 # <CJK>
+F7B7 9DDB # <CJK>
+F7B8 9DD2 # <CJK>
+F7B9 9DDE # <CJK>
+F7BA 9DDA # <CJK>
+F7BB 9DCB # <CJK>
+F7BC 9DD0 # <CJK>
+F7BD 9DDC # <CJK>
+F7BE 9DD1 # <CJK>
+F7BF 9DDF # <CJK>
+F7C0 9DE9 # <CJK>
+F7C1 9DD9 # <CJK>
+F7C2 9DD8 # <CJK>
+F7C3 9DD6 # <CJK>
+F7C4 9DF5 # <CJK>
+F7C5 9DD5 # <CJK>
+F7C6 9DDD # <CJK>
+F7C7 9EB6 # <CJK>
+F7C8 9EF0 # <CJK>
+F7C9 9F35 # <CJK>
+F7CA 9F33 # <CJK>
+F7CB 9F32 # <CJK>
+F7CC 9F42 # <CJK>
+F7CD 9F6B # <CJK>
+F7CE 9F95 # <CJK>
+F7CF 9FA2 # <CJK>
+F7D0 513D # <CJK>
+F7D1 5299 # <CJK>
+F7D2 58E8 # <CJK>
+F7D3 58E7 # <CJK>
+F7D4 5972 # <CJK>
+F7D5 5B4D # <CJK>
+F7D6 5DD8 # <CJK>
+F7D7 882F # <CJK>
+F7D8 5F4F # <CJK>
+F7D9 6201 # <CJK>
+F7DA 6203 # <CJK>
+F7DB 6204 # <CJK>
+F7DC 6529 # <CJK>
+F7DD 6525 # <CJK>
+F7DE 6596 # <CJK>
+F7DF 66EB # <CJK>
+F7E0 6B11 # <CJK>
+F7E1 6B12 # <CJK>
+F7E2 6B0F # <CJK>
+F7E3 6BCA # <CJK>
+F7E4 705B # <CJK>
+F7E5 705A # <CJK>
+F7E6 7222 # <CJK>
+F7E7 7382 # <CJK>
+F7E8 7381 # <CJK>
+F7E9 7383 # <CJK>
+F7EA 7670 # <CJK>
+F7EB 77D4 # <CJK>
+F7EC 7C67 # <CJK>
+F7ED 7C66 # <CJK>
+F7EE 7E95 # <CJK>
+F7EF 826C # <CJK>
+F7F0 863A # <CJK>
+F7F1 8640 # <CJK>
+F7F2 8639 # <CJK>
+F7F3 863C # <CJK>
+F7F4 8631 # <CJK>
+F7F5 863B # <CJK>
+F7F6 863E # <CJK>
+F7F7 8830 # <CJK>
+F7F8 8832 # <CJK>
+F7F9 882E # <CJK>
+F7FA 8833 # <CJK>
+F7FB 8976 # <CJK>
+F7FC 8974 # <CJK>
+F7FD 8973 # <CJK>
+F7FE 89FE # <CJK>
+F840 8B8C # <CJK>
+F841 8B8E # <CJK>
+F842 8B8B # <CJK>
+F843 8B88 # <CJK>
+F844 8C45 # <CJK>
+F845 8D19 # <CJK>
+F846 8E98 # <CJK>
+F847 8F64 # <CJK>
+F848 8F63 # <CJK>
+F849 91BC # <CJK>
+F84A 9462 # <CJK>
+F84B 9455 # <CJK>
+F84C 945D # <CJK>
+F84D 9457 # <CJK>
+F84E 945E # <CJK>
+F84F 97C4 # <CJK>
+F850 97C5 # <CJK>
+F851 9800 # <CJK>
+F852 9A56 # <CJK>
+F853 9A59 # <CJK>
+F854 9B1E # <CJK>
+F855 9B1F # <CJK>
+F856 9B20 # <CJK>
+F857 9C52 # <CJK>
+F858 9C58 # <CJK>
+F859 9C50 # <CJK>
+F85A 9C4A # <CJK>
+F85B 9C4D # <CJK>
+F85C 9C4B # <CJK>
+F85D 9C55 # <CJK>
+F85E 9C59 # <CJK>
+F85F 9C4C # <CJK>
+F860 9C4E # <CJK>
+F861 9DFB # <CJK>
+F862 9DF7 # <CJK>
+F863 9DEF # <CJK>
+F864 9DE3 # <CJK>
+F865 9DEB # <CJK>
+F866 9DF8 # <CJK>
+F867 9DE4 # <CJK>
+F868 9DF6 # <CJK>
+F869 9DE1 # <CJK>
+F86A 9DEE # <CJK>
+F86B 9DE6 # <CJK>
+F86C 9DF2 # <CJK>
+F86D 9DF0 # <CJK>
+F86E 9DE2 # <CJK>
+F86F 9DEC # <CJK>
+F870 9DF4 # <CJK>
+F871 9DF3 # <CJK>
+F872 9DE8 # <CJK>
+F873 9DED # <CJK>
+F874 9EC2 # <CJK>
+F875 9ED0 # <CJK>
+F876 9EF2 # <CJK>
+F877 9EF3 # <CJK>
+F878 9F06 # <CJK>
+F879 9F1C # <CJK>
+F87A 9F38 # <CJK>
+F87B 9F37 # <CJK>
+F87C 9F36 # <CJK>
+F87D 9F43 # <CJK>
+F87E 9F4F # <CJK>
+F8A1 9F71 # <CJK>
+F8A2 9F70 # <CJK>
+F8A3 9F6E # <CJK>
+F8A4 9F6F # <CJK>
+F8A5 56D3 # <CJK>
+F8A6 56CD # <CJK>
+F8A7 5B4E # <CJK>
+F8A8 5C6D # <CJK>
+F8A9 652D # <CJK>
+F8AA 66ED # <CJK>
+F8AB 66EE # <CJK>
+F8AC 6B13 # <CJK>
+F8AD 705F # <CJK>
+F8AE 7061 # <CJK>
+F8AF 705D # <CJK>
+F8B0 7060 # <CJK>
+F8B1 7223 # <CJK>
+F8B2 74DB # <CJK>
+F8B3 74E5 # <CJK>
+F8B4 77D5 # <CJK>
+F8B5 7938 # <CJK>
+F8B6 79B7 # <CJK>
+F8B7 79B6 # <CJK>
+F8B8 7C6A # <CJK>
+F8B9 7E97 # <CJK>
+F8BA 7F89 # <CJK>
+F8BB 826D # <CJK>
+F8BC 8643 # <CJK>
+F8BD 8838 # <CJK>
+F8BE 8837 # <CJK>
+F8BF 8835 # <CJK>
+F8C0 884B # <CJK>
+F8C1 8B94 # <CJK>
+F8C2 8B95 # <CJK>
+F8C3 8E9E # <CJK>
+F8C4 8E9F # <CJK>
+F8C5 8EA0 # <CJK>
+F8C6 8E9D # <CJK>
+F8C7 91BE # <CJK>
+F8C8 91BD # <CJK>
+F8C9 91C2 # <CJK>
+F8CA 946B # <CJK>
+F8CB 9468 # <CJK>
+F8CC 9469 # <CJK>
+F8CD 96E5 # <CJK>
+F8CE 9746 # <CJK>
+F8CF 9743 # <CJK>
+F8D0 9747 # <CJK>
+F8D1 97C7 # <CJK>
+F8D2 97E5 # <CJK>
+F8D3 9A5E # <CJK>
+F8D4 9AD5 # <CJK>
+F8D5 9B59 # <CJK>
+F8D6 9C63 # <CJK>
+F8D7 9C67 # <CJK>
+F8D8 9C66 # <CJK>
+F8D9 9C62 # <CJK>
+F8DA 9C5E # <CJK>
+F8DB 9C60 # <CJK>
+F8DC 9E02 # <CJK>
+F8DD 9DFE # <CJK>
+F8DE 9E07 # <CJK>
+F8DF 9E03 # <CJK>
+F8E0 9E06 # <CJK>
+F8E1 9E05 # <CJK>
+F8E2 9E00 # <CJK>
+F8E3 9E01 # <CJK>
+F8E4 9E09 # <CJK>
+F8E5 9DFF # <CJK>
+F8E6 9DFD # <CJK>
+F8E7 9E04 # <CJK>
+F8E8 9EA0 # <CJK>
+F8E9 9F1E # <CJK>
+F8EA 9F46 # <CJK>
+F8EB 9F74 # <CJK>
+F8EC 9F75 # <CJK>
+F8ED 9F76 # <CJK>
+F8EE 56D4 # <CJK>
+F8EF 652E # <CJK>
+F8F0 65B8 # <CJK>
+F8F1 6B18 # <CJK>
+F8F2 6B19 # <CJK>
+F8F3 6B17 # <CJK>
+F8F4 6B1A # <CJK>
+F8F5 7062 # <CJK>
+F8F6 7226 # <CJK>
+F8F7 72AA # <CJK>
+F8F8 77D8 # <CJK>
+F8F9 77D9 # <CJK>
+F8FA 7939 # <CJK>
+F8FB 7C69 # <CJK>
+F8FC 7C6B # <CJK>
+F8FD 7CF6 # <CJK>
+F8FE 7E9A # <CJK>
+F940 7E98 # <CJK>
+F941 7E9B # <CJK>
+F942 7E99 # <CJK>
+F943 81E0 # <CJK>
+F944 81E1 # <CJK>
+F945 8646 # <CJK>
+F946 8647 # <CJK>
+F947 8648 # <CJK>
+F948 8979 # <CJK>
+F949 897A # <CJK>
+F94A 897C # <CJK>
+F94B 897B # <CJK>
+F94C 89FF # <CJK>
+F94D 8B98 # <CJK>
+F94E 8B99 # <CJK>
+F94F 8EA5 # <CJK>
+F950 8EA4 # <CJK>
+F951 8EA3 # <CJK>
+F952 946E # <CJK>
+F953 946D # <CJK>
+F954 946F # <CJK>
+F955 9471 # <CJK>
+F956 9473 # <CJK>
+F957 9749 # <CJK>
+F958 9872 # <CJK>
+F959 995F # <CJK>
+F95A 9C68 # <CJK>
+F95B 9C6E # <CJK>
+F95C 9C6D # <CJK>
+F95D 9E0B # <CJK>
+F95E 9E0D # <CJK>
+F95F 9E10 # <CJK>
+F960 9E0F # <CJK>
+F961 9E12 # <CJK>
+F962 9E11 # <CJK>
+F963 9EA1 # <CJK>
+F964 9EF5 # <CJK>
+F965 9F09 # <CJK>
+F966 9F47 # <CJK>
+F967 9F78 # <CJK>
+F968 9F7B # <CJK>
+F969 9F7A # <CJK>
+F96A 9F79 # <CJK>
+F96B 571E # <CJK>
+F96C 7066 # <CJK>
+F96D 7C6F # <CJK>
+F96E 883C # <CJK>
+F96F 8DB2 # <CJK>
+F970 8EA6 # <CJK>
+F971 91C3 # <CJK>
+F972 9474 # <CJK>
+F973 9478 # <CJK>
+F974 9476 # <CJK>
+F975 9475 # <CJK>
+F976 9A60 # <CJK>
+F977 9C74 # <CJK>
+F978 9C73 # <CJK>
+F979 9C71 # <CJK>
+F97A 9C75 # <CJK>
+F97B 9E14 # <CJK>
+F97C 9E13 # <CJK>
+F97D 9EF6 # <CJK>
+F97E 9F0A # <CJK>
+F9A1 9FA4 # <CJK>
+F9A2 7068 # <CJK>
+F9A3 7065 # <CJK>
+F9A4 7CF7 # <CJK>
+F9A5 866A # <CJK>
+F9A6 883E # <CJK>
+F9A7 883D # <CJK>
+F9A8 883F # <CJK>
+F9A9 8B9E # <CJK>
+F9AA 8C9C # <CJK>
+F9AB 8EA9 # <CJK>
+F9AC 8EC9 # <CJK>
+F9AD 974B # <CJK>
+F9AE 9873 # <CJK>
+F9AF 9874 # <CJK>
+F9B0 98CC # <CJK>
+F9B1 9961 # <CJK>
+F9B2 99AB # <CJK>
+F9B3 9A64 # <CJK>
+F9B4 9A66 # <CJK>
+F9B5 9A67 # <CJK>
+F9B6 9B24 # <CJK>
+F9B7 9E15 # <CJK>
+F9B8 9E17 # <CJK>
+F9B9 9F48 # <CJK>
+F9BA 6207 # <CJK>
+F9BB 6B1E # <CJK>
+F9BC 7227 # <CJK>
+F9BD 864C # <CJK>
+F9BE 8EA8 # <CJK>
+F9BF 9482 # <CJK>
+F9C0 9480 # <CJK>
+F9C1 9481 # <CJK>
+F9C2 9A69 # <CJK>
+F9C3 9A68 # <CJK>
+F9C4 9B2E # <CJK>
+F9C5 9E19 # <CJK>
+F9C6 7229 # <CJK>
+F9C7 864B # <CJK>
+F9C8 8B9F # <CJK>
+F9C9 9483 # <CJK>
+F9CA 9C79 # <CJK>
+F9CB 9EB7 # <CJK>
+F9CC 7675 # <CJK>
+F9CD 9A6B # <CJK>
+F9CE 9C7A # <CJK>
+F9CF 9E1D # <CJK>
+F9D0 7069 # <CJK>
+F9D1 706A # <CJK>
+F9D2 9EA4 # <CJK>
+F9D3 9F7E # <CJK>
+F9D4 9F49 # <CJK>
+F9D5 9F98 # <CJK>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/gb2312.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/gb2312.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/gb2312.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/gb2312.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,7573 @@
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+A1A1 3000 # IDEOGRAPHIC SPACE
+A1A2 3001 # IDEOGRAPHIC COMMA
+A1A3 3002 # IDEOGRAPHIC FULL STOP
+A1A4 30FB # KATAKANA MIDDLE DOT
+A1A5 02C9 # MODIFIER LETTER MACRON (Mandarin Chinese first tone)
+A1A6 02C7 # CARON (Mandarin Chinese third tone)
+A1A7 00A8 # DIAERESIS
+A1A8 3003 # DITTO MARK
+A1A9 3005 # IDEOGRAPHIC ITERATION MARK
+A1AA 2015 # HORIZONTAL BAR
+A1AB FF5E # FULLWIDTH TILDE
+A1AC 2225 # PARALLEL TO
+A1AD 2026 # HORIZONTAL ELLIPSIS
+A1AE 2018 # LEFT SINGLE QUOTATION MARK
+A1AF 2019 # RIGHT SINGLE QUOTATION MARK
+A1B0 201C # LEFT DOUBLE QUOTATION MARK
+A1B1 201D # RIGHT DOUBLE QUOTATION MARK
+A1B2 3014 # LEFT TORTOISE SHELL BRACKET
+A1B3 3015 # RIGHT TORTOISE SHELL BRACKET
+A1B4 3008 # LEFT ANGLE BRACKET
+A1B5 3009 # RIGHT ANGLE BRACKET
+A1B6 300A # LEFT DOUBLE ANGLE BRACKET
+A1B7 300B # RIGHT DOUBLE ANGLE BRACKET
+A1B8 300C # LEFT CORNER BRACKET
+A1B9 300D # RIGHT CORNER BRACKET
+A1BA 300E # LEFT WHITE CORNER BRACKET
+A1BB 300F # RIGHT WHITE CORNER BRACKET
+A1BC 3016 # LEFT WHITE LENTICULAR BRACKET
+A1BD 3017 # RIGHT WHITE LENTICULAR BRACKET
+A1BE 3010 # LEFT BLACK LENTICULAR BRACKET
+A1BF 3011 # RIGHT BLACK LENTICULAR BRACKET
+A1C0 00B1 # PLUS-MINUS SIGN
+A1C1 00D7 # MULTIPLICATION SIGN
+A1C2 00F7 # DIVISION SIGN
+A1C3 2236 # RATIO
+A1C4 2227 # LOGICAL AND
+A1C5 2228 # LOGICAL OR
+A1C6 2211 # N-ARY SUMMATION
+A1C7 220F # N-ARY PRODUCT
+A1C8 222A # UNION
+A1C9 2229 # INTERSECTION
+A1CA 2208 # ELEMENT OF
+A1CB 2237 # PROPORTION
+A1CC 221A # SQUARE ROOT
+A1CD 22A5 # UP TACK
+A1CE 2225 # PARALLEL TO
+A1CF 2220 # ANGLE
+A1D0 2312 # ARC
+A1D1 2299 # CIRCLED DOT OPERATOR
+A1D2 222B # INTEGRAL
+A1D3 222E # CONTOUR INTEGRAL
+A1D4 2261 # IDENTICAL TO
+A1D5 224C # ALL EQUAL TO
+A1D6 2248 # ALMOST EQUAL TO
+A1D7 223D # REVERSED TILDE
+A1D8 221D # PROPORTIONAL TO
+A1D9 2260 # NOT EQUAL TO
+A1DA 226E # NOT LESS-THAN
+A1DB 226F # NOT GREATER-THAN
+A1DC 2264 # LESS-THAN OR EQUAL TO
+A1DD 2265 # GREATER-THAN OR EQUAL TO
+A1DE 221E # INFINITY
+A1DF 2235 # BECAUSE
+A160 2234 # THEREFORE
+A161 2642 # MALE SIGN
+A162 2640 # FEMALE SIGN
+A163 00B0 # DEGREE SIGN
+A164 2032 # PRIME
+A165 2033 # DOUBLE PRIME
+A166 2103 # DEGREE CELSIUS
+A167 FF04 # FULLWIDTH DOLLAR SIGN
+A168 00A4 # CURRENCY SIGN
+A169 FFE0 # FULLWIDTH CENT SIGN
+A16A FFE1 # FULLWIDTH POUND SIGN
+A16B 2030 # PER MILLE SIGN
+A16C 00A7 # SECTION SIGN
+A16D 2116 # NUMERO SIGN
+A16E 2606 # WHITE STAR
+A16F 2605 # BLACK STAR
+A1F0 25CB # WHITE CIRCLE
+A1F1 25CF # BLACK CIRCLE
+A1F2 25CE # BULLSEYE
+A1F3 25C7 # WHITE DIAMOND
+A1F4 25C6 # BLACK DIAMOND
+A1F5 25A1 # WHITE SQUARE
+A1F6 25A0 # BLACK SQUARE
+A1F7 25B3 # WHITE UP-POINTING TRIANGLE
+A1F8 25B2 # BLACK UP-POINTING TRIANGLE
+A1F9 203B # REFERENCE MARK
+A1FA 2192 # RIGHTWARDS ARROW
+A1FB 2190 # LEFTWARDS ARROW
+A1FC 2191 # UPWARDS ARROW
+A1FD 2193 # DOWNWARDS ARROW
+A1FE 3013 # GETA MARK
+A2B1 2488 # DIGIT ONE FULL STOP
+A2B2 2489 # DIGIT TWO FULL STOP
+A2B3 248A # DIGIT THREE FULL STOP
+A2B4 248B # DIGIT FOUR FULL STOP
+A2B5 248C # DIGIT FIVE FULL STOP
+A2B6 248D # DIGIT SIX FULL STOP
+A2B7 248E # DIGIT SEVEN FULL STOP
+A2B8 248F # DIGIT EIGHT FULL STOP
+A2B9 2490 # DIGIT NINE FULL STOP
+A2BA 2491 # NUMBER TEN FULL STOP
+A2BB 2492 # NUMBER ELEVEN FULL STOP
+A2BC 2493 # NUMBER TWELVE FULL STOP
+A2BD 2494 # NUMBER THIRTEEN FULL STOP
+A2BE 2495 # NUMBER FOURTEEN FULL STOP
+A2BF 2496 # NUMBER FIFTEEN FULL STOP
+A2C0 2497 # NUMBER SIXTEEN FULL STOP
+A2C1 2498 # NUMBER SEVENTEEN FULL STOP
+A2C2 2499 # NUMBER EIGHTEEN FULL STOP
+A2C3 249A # NUMBER NINETEEN FULL STOP
+A2C4 249B # NUMBER TWENTY FULL STOP
+A2C5 2474 # PARENTHESIZED DIGIT ONE
+A2C6 2475 # PARENTHESIZED DIGIT TWO
+A2C7 2476 # PARENTHESIZED DIGIT THREE
+A2C8 2477 # PARENTHESIZED DIGIT FOUR
+A2C9 2478 # PARENTHESIZED DIGIT FIVE
+A2CA 2479 # PARENTHESIZED DIGIT SIX
+A2CB 247A # PARENTHESIZED DIGIT SEVEN
+A2CC 247B # PARENTHESIZED DIGIT EIGHT
+A2CD 247C # PARENTHESIZED DIGIT NINE
+A2CE 247D # PARENTHESIZED NUMBER TEN
+A2CF 247E # PARENTHESIZED NUMBER ELEVEN
+A2D0 247F # PARENTHESIZED NUMBER TWELVE
+A2D1 2480 # PARENTHESIZED NUMBER THIRTEEN
+A2D2 2481 # PARENTHESIZED NUMBER FOURTEEN
+A2D3 2482 # PARENTHESIZED NUMBER FIFTEEN
+A2D4 2483 # PARENTHESIZED NUMBER SIXTEEN
+A2D5 2484 # PARENTHESIZED NUMBER SEVENTEEN
+A2D6 2485 # PARENTHESIZED NUMBER EIGHTEEN
+A2D7 2486 # PARENTHESIZED NUMBER NINETEEN
+A2D8 2487 # PARENTHESIZED NUMBER TWENTY
+A2D9 2460 # CIRCLED DIGIT ONE
+A2DA 2461 # CIRCLED DIGIT TWO
+A2DB 2462 # CIRCLED DIGIT THREE
+A2DC 2463 # CIRCLED DIGIT FOUR
+A2DD 2464 # CIRCLED DIGIT FIVE
+A2DE 2465 # CIRCLED DIGIT SIX
+A2DF 2466 # CIRCLED DIGIT SEVEN
+A2E0 2467 # CIRCLED DIGIT EIGHT
+A2E1 2468 # CIRCLED DIGIT NINE
+A2E2 2469 # CIRCLED NUMBER TEN
+A2E5 3220 # PARENTHESIZED IDEOGRAPH ONE
+A2E6 3221 # PARENTHESIZED IDEOGRAPH TWO
+A2E7 3222 # PARENTHESIZED IDEOGRAPH THREE
+A2E8 3223 # PARENTHESIZED IDEOGRAPH FOUR
+A2E9 3224 # PARENTHESIZED IDEOGRAPH FIVE
+A2EA 3225 # PARENTHESIZED IDEOGRAPH SIX
+A2EB 3226 # PARENTHESIZED IDEOGRAPH SEVEN
+A2EC 3227 # PARENTHESIZED IDEOGRAPH EIGHT
+A2ED 3228 # PARENTHESIZED IDEOGRAPH NINE
+A2EE 3229 # PARENTHESIZED IDEOGRAPH TEN
+A2F1 2160 # ROMAN NUMERAL ONE
+A2F2 2161 # ROMAN NUMERAL TWO
+A2F3 2162 # ROMAN NUMERAL THREE
+A2F4 2163 # ROMAN NUMERAL FOUR
+A2F5 2164 # ROMAN NUMERAL FIVE
+A2F6 2165 # ROMAN NUMERAL SIX
+A2F7 2166 # ROMAN NUMERAL SEVEN
+A2F8 2167 # ROMAN NUMERAL EIGHT
+A2F9 2168 # ROMAN NUMERAL NINE
+A2FA 2169 # ROMAN NUMERAL TEN
+A2FB 216A # ROMAN NUMERAL ELEVEN
+A2FC 216B # ROMAN NUMERAL TWELVE
+A3A1 FF01 # FULLWIDTH EXCLAMATION MARK
+A3A2 FF02 # FULLWIDTH QUOTATION MARK
+A3A3 FF03 # FULLWIDTH NUMBER SIGN
+A3A4 FFE5 # FULLWIDTH YEN SIGN
+A3A5 FF05 # FULLWIDTH PERCENT SIGN
+A3A6 FF06 # FULLWIDTH AMPERSAND
+A3A7 FF07 # FULLWIDTH APOSTROPHE
+A3A8 FF08 # FULLWIDTH LEFT PARENTHESIS
+A3A9 FF09 # FULLWIDTH RIGHT PARENTHESIS
+A3AA FF0A # FULLWIDTH ASTERISK
+A3AB FF0B # FULLWIDTH PLUS SIGN
+A3AC FF0C # FULLWIDTH COMMA
+A3AD FF0D # FULLWIDTH HYPHEN-MINUS
+A3AE FF0E # FULLWIDTH FULL STOP
+A3AF FF0F # FULLWIDTH SOLIDUS
+A3B0 FF10 # FULLWIDTH DIGIT ZERO
+A3B1 FF11 # FULLWIDTH DIGIT ONE
+A3B2 FF12 # FULLWIDTH DIGIT TWO
+A3B3 FF13 # FULLWIDTH DIGIT THREE
+A3B4 FF14 # FULLWIDTH DIGIT FOUR
+A3B5 FF15 # FULLWIDTH DIGIT FIVE
+A3B6 FF16 # FULLWIDTH DIGIT SIX
+A3B7 FF17 # FULLWIDTH DIGIT SEVEN
+A3B8 FF18 # FULLWIDTH DIGIT EIGHT
+A3B9 FF19 # FULLWIDTH DIGIT NINE
+A3BA FF1A # FULLWIDTH COLON
+A3BB FF1B # FULLWIDTH SEMICOLON
+A3BC FF1C # FULLWIDTH LESS-THAN SIGN
+A3BD FF1D # FULLWIDTH EQUALS SIGN
+A3BE FF1E # FULLWIDTH GREATER-THAN SIGN
+A3BF FF1F # FULLWIDTH QUESTION MARK
+A3C0 FF20 # FULLWIDTH COMMERCIAL AT
+A3C1 FF21 # FULLWIDTH LATIN CAPITAL LETTER A
+A3C2 FF22 # FULLWIDTH LATIN CAPITAL LETTER B
+A3C3 FF23 # FULLWIDTH LATIN CAPITAL LETTER C
+A3C4 FF24 # FULLWIDTH LATIN CAPITAL LETTER D
+A3C5 FF25 # FULLWIDTH LATIN CAPITAL LETTER E
+A3C6 FF26 # FULLWIDTH LATIN CAPITAL LETTER F
+A3C7 FF27 # FULLWIDTH LATIN CAPITAL LETTER G
+A3C8 FF28 # FULLWIDTH LATIN CAPITAL LETTER H
+A3C9 FF29 # FULLWIDTH LATIN CAPITAL LETTER I
+A3CA FF2A # FULLWIDTH LATIN CAPITAL LETTER J
+A3CB FF2B # FULLWIDTH LATIN CAPITAL LETTER K
+A3CC FF2C # FULLWIDTH LATIN CAPITAL LETTER L
+A3CD FF2D # FULLWIDTH LATIN CAPITAL LETTER M
+A3CE FF2E # FULLWIDTH LATIN CAPITAL LETTER N
+A3CF FF2F # FULLWIDTH LATIN CAPITAL LETTER O
+A3D0 FF30 # FULLWIDTH LATIN CAPITAL LETTER P
+A3D1 FF31 # FULLWIDTH LATIN CAPITAL LETTER Q
+A3D2 FF32 # FULLWIDTH LATIN CAPITAL LETTER R
+A3D3 FF33 # FULLWIDTH LATIN CAPITAL LETTER S
+A3D4 FF34 # FULLWIDTH LATIN CAPITAL LETTER T
+A3D5 FF35 # FULLWIDTH LATIN CAPITAL LETTER U
+A3D6 FF36 # FULLWIDTH LATIN CAPITAL LETTER V
+A3D7 FF37 # FULLWIDTH LATIN CAPITAL LETTER W
+A3D8 FF38 # FULLWIDTH LATIN CAPITAL LETTER X
+A3D9 FF39 # FULLWIDTH LATIN CAPITAL LETTER Y
+A3DA FF3A # FULLWIDTH LATIN CAPITAL LETTER Z
+A3DB FF3B # FULLWIDTH LEFT SQUARE BRACKET
+A3DC FF3C # FULLWIDTH REVERSE SOLIDUS
+A3DD FF3D # FULLWIDTH RIGHT SQUARE BRACKET
+A3DE FF3E # FULLWIDTH CIRCUMFLEX ACCENT
+A3DF FF3F # FULLWIDTH LOW LINE
+A3E0 FF40 # FULLWIDTH GRAVE ACCENT
+A3E1 FF41 # FULLWIDTH LATIN SMALL LETTER A
+A3E2 FF42 # FULLWIDTH LATIN SMALL LETTER B
+A3E3 FF43 # FULLWIDTH LATIN SMALL LETTER C
+A3E4 FF44 # FULLWIDTH LATIN SMALL LETTER D
+A3E5 FF45 # FULLWIDTH LATIN SMALL LETTER E
+A3E6 FF46 # FULLWIDTH LATIN SMALL LETTER F
+A3E7 FF47 # FULLWIDTH LATIN SMALL LETTER G
+A3E8 FF48 # FULLWIDTH LATIN SMALL LETTER H
+A3E9 FF49 # FULLWIDTH LATIN SMALL LETTER I
+A3EA FF4A # FULLWIDTH LATIN SMALL LETTER J
+A3EB FF4B # FULLWIDTH LATIN SMALL LETTER K
+A3EC FF4C # FULLWIDTH LATIN SMALL LETTER L
+A3ED FF4D # FULLWIDTH LATIN SMALL LETTER M
+A3EE FF4E # FULLWIDTH LATIN SMALL LETTER N
+A3EF FF4F # FULLWIDTH LATIN SMALL LETTER O
+A3F0 FF50 # FULLWIDTH LATIN SMALL LETTER P
+A3F1 FF51 # FULLWIDTH LATIN SMALL LETTER Q
+A3F2 FF52 # FULLWIDTH LATIN SMALL LETTER R
+A3F3 FF53 # FULLWIDTH LATIN SMALL LETTER S
+A3F4 FF54 # FULLWIDTH LATIN SMALL LETTER T
+A3F5 FF55 # FULLWIDTH LATIN SMALL LETTER U
+A3F6 FF56 # FULLWIDTH LATIN SMALL LETTER V
+A3F7 FF57 # FULLWIDTH LATIN SMALL LETTER W
+A3F8 FF58 # FULLWIDTH LATIN SMALL LETTER X
+A3F9 FF59 # FULLWIDTH LATIN SMALL LETTER Y
+A3FA FF5A # FULLWIDTH LATIN SMALL LETTER Z
+A3FB FF5B # FULLWIDTH LEFT CURLY BRACKET
+A3FC FF5C # FULLWIDTH VERTICAL LINE
+A3FD FF5D # FULLWIDTH RIGHT CURLY BRACKET
+A3FE FFE3 # FULLWIDTH MACRON
+A4A1 3041 # HIRAGANA LETTER SMALL A
+A4A2 3042 # HIRAGANA LETTER A
+A4A3 3043 # HIRAGANA LETTER SMALL I
+A4A4 3044 # HIRAGANA LETTER I
+A4A5 3045 # HIRAGANA LETTER SMALL U
+A4A6 3046 # HIRAGANA LETTER U
+A4A7 3047 # HIRAGANA LETTER SMALL E
+A4A8 3048 # HIRAGANA LETTER E
+A4A9 3049 # HIRAGANA LETTER SMALL O
+A4AA 304A # HIRAGANA LETTER O
+A4AB 304B # HIRAGANA LETTER KA
+A4AC 304C # HIRAGANA LETTER GA
+A4AD 304D # HIRAGANA LETTER KI
+A4AE 304E # HIRAGANA LETTER GI
+A4AF 304F # HIRAGANA LETTER KU
+A4B0 3050 # HIRAGANA LETTER GU
+A4B1 3051 # HIRAGANA LETTER KE
+A4B2 3052 # HIRAGANA LETTER GE
+A4B3 3053 # HIRAGANA LETTER KO
+A4B4 3054 # HIRAGANA LETTER GO
+A4B5 3055 # HIRAGANA LETTER SA
+A4B6 3056 # HIRAGANA LETTER ZA
+A4B7 3057 # HIRAGANA LETTER SI
+A4B8 3058 # HIRAGANA LETTER ZI
+A4B9 3059 # HIRAGANA LETTER SU
+A4BA 305A # HIRAGANA LETTER ZU
+A4BB 305B # HIRAGANA LETTER SE
+A4BC 305C # HIRAGANA LETTER ZE
+A4BD 305D # HIRAGANA LETTER SO
+A4BE 305E # HIRAGANA LETTER ZO
+A4BF 305F # HIRAGANA LETTER TA
+A4C0 3060 # HIRAGANA LETTER DA
+A4C1 3061 # HIRAGANA LETTER TI
+A4C2 3062 # HIRAGANA LETTER DI
+A4C3 3063 # HIRAGANA LETTER SMALL TU
+A4C4 3064 # HIRAGANA LETTER TU
+A4C5 3065 # HIRAGANA LETTER DU
+A4C6 3066 # HIRAGANA LETTER TE
+A4C7 3067 # HIRAGANA LETTER DE
+A4C8 3068 # HIRAGANA LETTER TO
+A4C9 3069 # HIRAGANA LETTER DO
+A4CA 306A # HIRAGANA LETTER NA
+A4CB 306B # HIRAGANA LETTER NI
+A4CC 306C # HIRAGANA LETTER NU
+A4CD 306D # HIRAGANA LETTER NE
+A4CE 306E # HIRAGANA LETTER NO
+A4CF 306F # HIRAGANA LETTER HA
+A4D0 3070 # HIRAGANA LETTER BA
+A4D1 3071 # HIRAGANA LETTER PA
+A4D2 3072 # HIRAGANA LETTER HI
+A4D3 3073 # HIRAGANA LETTER BI
+A4D4 3074 # HIRAGANA LETTER PI
+A4D5 3075 # HIRAGANA LETTER HU
+A4D6 3076 # HIRAGANA LETTER BU
+A4D7 3077 # HIRAGANA LETTER PU
+A4D8 3078 # HIRAGANA LETTER HE
+A4D9 3079 # HIRAGANA LETTER BE
+A4DA 307A # HIRAGANA LETTER PE
+A4DB 307B # HIRAGANA LETTER HO
+A4DC 307C # HIRAGANA LETTER BO
+A4DD 307D # HIRAGANA LETTER PO
+A4DE 307E # HIRAGANA LETTER MA
+A4DF 307F # HIRAGANA LETTER MI
+A4E0 3080 # HIRAGANA LETTER MU
+A4E1 3081 # HIRAGANA LETTER ME
+A4E2 3082 # HIRAGANA LETTER MO
+A4E3 3083 # HIRAGANA LETTER SMALL YA
+A4E4 3084 # HIRAGANA LETTER YA
+A4E5 3085 # HIRAGANA LETTER SMALL YU
+A4E6 3086 # HIRAGANA LETTER YU
+A4E7 3087 # HIRAGANA LETTER SMALL YO
+A4E8 3088 # HIRAGANA LETTER YO
+A4E9 3089 # HIRAGANA LETTER RA
+A4EA 308A # HIRAGANA LETTER RI
+A4EB 308B # HIRAGANA LETTER RU
+A4EC 308C # HIRAGANA LETTER RE
+A4ED 308D # HIRAGANA LETTER RO
+A4EE 308E # HIRAGANA LETTER SMALL WA
+A4EF 308F # HIRAGANA LETTER WA
+A4F0 3090 # HIRAGANA LETTER WI
+A4F1 3091 # HIRAGANA LETTER WE
+A4F2 3092 # HIRAGANA LETTER WO
+A4F3 3093 # HIRAGANA LETTER N
+A5A1 30A1 # KATAKANA LETTER SMALL A
+A5A2 30A2 # KATAKANA LETTER A
+A5A3 30A3 # KATAKANA LETTER SMALL I
+A5A4 30A4 # KATAKANA LETTER I
+A5A5 30A5 # KATAKANA LETTER SMALL U
+A5A6 30A6 # KATAKANA LETTER U
+A5A7 30A7 # KATAKANA LETTER SMALL E
+A5A8 30A8 # KATAKANA LETTER E
+A5A9 30A9 # KATAKANA LETTER SMALL O
+A5AA 30AA # KATAKANA LETTER O
+A5AB 30AB # KATAKANA LETTER KA
+A5AC 30AC # KATAKANA LETTER GA
+A5AD 30AD # KATAKANA LETTER KI
+A5AE 30AE # KATAKANA LETTER GI
+A5AF 30AF # KATAKANA LETTER KU
+A5B0 30B0 # KATAKANA LETTER GU
+A5B1 30B1 # KATAKANA LETTER KE
+A5B2 30B2 # KATAKANA LETTER GE
+A5B3 30B3 # KATAKANA LETTER KO
+A5B4 30B4 # KATAKANA LETTER GO
+A5B5 30B5 # KATAKANA LETTER SA
+A5B6 30B6 # KATAKANA LETTER ZA
+A5B7 30B7 # KATAKANA LETTER SI
+A5B8 30B8 # KATAKANA LETTER ZI
+A5B9 30B9 # KATAKANA LETTER SU
+A5BA 30BA # KATAKANA LETTER ZU
+A5BB 30BB # KATAKANA LETTER SE
+A5BC 30BC # KATAKANA LETTER ZE
+A5BD 30BD # KATAKANA LETTER SO
+A5BE 30BE # KATAKANA LETTER ZO
+A5BF 30BF # KATAKANA LETTER TA
+A5C0 30C0 # KATAKANA LETTER DA
+A5C1 30C1 # KATAKANA LETTER TI
+A5C2 30C2 # KATAKANA LETTER DI
+A5C3 30C3 # KATAKANA LETTER SMALL TU
+A5C4 30C4 # KATAKANA LETTER TU
+A5C5 30C5 # KATAKANA LETTER DU
+A5C6 30C6 # KATAKANA LETTER TE
+A5C7 30C7 # KATAKANA LETTER DE
+A5C8 30C8 # KATAKANA LETTER TO
+A5C9 30C9 # KATAKANA LETTER DO
+A5CA 30CA # KATAKANA LETTER NA
+A5CB 30CB # KATAKANA LETTER NI
+A5CC 30CC # KATAKANA LETTER NU
+A5CD 30CD # KATAKANA LETTER NE
+A5CE 30CE # KATAKANA LETTER NO
+A5CF 30CF # KATAKANA LETTER HA
+A5D0 30D0 # KATAKANA LETTER BA
+A5D1 30D1 # KATAKANA LETTER PA
+A5D2 30D2 # KATAKANA LETTER HI
+A5D3 30D3 # KATAKANA LETTER BI
+A5D4 30D4 # KATAKANA LETTER PI
+A5D5 30D5 # KATAKANA LETTER HU
+A5D6 30D6 # KATAKANA LETTER BU
+A5D7 30D7 # KATAKANA LETTER PU
+A5D8 30D8 # KATAKANA LETTER HE
+A5D9 30D9 # KATAKANA LETTER BE
+A5DA 30DA # KATAKANA LETTER PE
+A5DB 30DB # KATAKANA LETTER HO
+A5DC 30DC # KATAKANA LETTER BO
+A5DD 30DD # KATAKANA LETTER PO
+A5DE 30DE # KATAKANA LETTER MA
+A5DF 30DF # KATAKANA LETTER MI
+A5E0 30E0 # KATAKANA LETTER MU
+A5E1 30E1 # KATAKANA LETTER ME
+A5E2 30E2 # KATAKANA LETTER MO
+A5E3 30E3 # KATAKANA LETTER SMALL YA
+A5E4 30E4 # KATAKANA LETTER YA
+A5E5 30E5 # KATAKANA LETTER SMALL YU
+A5E6 30E6 # KATAKANA LETTER YU
+A5E7 30E7 # KATAKANA LETTER SMALL YO
+A5E8 30E8 # KATAKANA LETTER YO
+A5E9 30E9 # KATAKANA LETTER RA
+A5EA 30EA # KATAKANA LETTER RI
+A5EB 30EB # KATAKANA LETTER RU
+A5EC 30EC # KATAKANA LETTER RE
+A5ED 30ED # KATAKANA LETTER RO
+A5EE 30EE # KATAKANA LETTER SMALL WA
+A5EF 30EF # KATAKANA LETTER WA
+A5F0 30F0 # KATAKANA LETTER WI
+A5F1 30F1 # KATAKANA LETTER WE
+A5F2 30F2 # KATAKANA LETTER WO
+A5F3 30F3 # KATAKANA LETTER N
+A5F4 30F4 # KATAKANA LETTER VU
+A5F5 30F5 # KATAKANA LETTER SMALL KA
+A5F6 30F6 # KATAKANA LETTER SMALL KE
+A6A1 0391 # GREEK CAPITAL LETTER ALPHA
+A6A2 0392 # GREEK CAPITAL LETTER BETA
+A6A3 0393 # GREEK CAPITAL LETTER GAMMA
+A6A4 0394 # GREEK CAPITAL LETTER DELTA
+A6A5 0395 # GREEK CAPITAL LETTER EPSILON
+A6A6 0396 # GREEK CAPITAL LETTER ZETA
+A6A7 0397 # GREEK CAPITAL LETTER ETA
+A6A8 0398 # GREEK CAPITAL LETTER THETA
+A6A9 0399 # GREEK CAPITAL LETTER IOTA
+A6AA 039A # GREEK CAPITAL LETTER KAPPA
+A6AB 039B # GREEK CAPITAL LETTER LAMDA
+A6AC 039C # GREEK CAPITAL LETTER MU
+A6AD 039D # GREEK CAPITAL LETTER NU
+A6AE 039E # GREEK CAPITAL LETTER XI
+A6AF 039F # GREEK CAPITAL LETTER OMICRON
+A6B0 03A0 # GREEK CAPITAL LETTER PI
+A6B1 03A1 # GREEK CAPITAL LETTER RHO
+A6B2 03A3 # GREEK CAPITAL LETTER SIGMA
+A6B3 03A4 # GREEK CAPITAL LETTER TAU
+A6B4 03A5 # GREEK CAPITAL LETTER UPSILON
+A6B5 03A6 # GREEK CAPITAL LETTER PHI
+A6B6 03A7 # GREEK CAPITAL LETTER CHI
+A6B7 03A8 # GREEK CAPITAL LETTER PSI
+A6B8 03A9 # GREEK CAPITAL LETTER OMEGA
+A6C1 03B1 # GREEK SMALL LETTER ALPHA
+A6C2 03B2 # GREEK SMALL LETTER BETA
+A6C3 03B3 # GREEK SMALL LETTER GAMMA
+A6C4 03B4 # GREEK SMALL LETTER DELTA
+A6C5 03B5 # GREEK SMALL LETTER EPSILON
+A6C6 03B6 # GREEK SMALL LETTER ZETA
+A6C7 03B7 # GREEK SMALL LETTER ETA
+A6C8 03B8 # GREEK SMALL LETTER THETA
+A6C9 03B9 # GREEK SMALL LETTER IOTA
+A6CA 03BA # GREEK SMALL LETTER KAPPA
+A6CB 03BB # GREEK SMALL LETTER LAMDA
+A6CC 03BC # GREEK SMALL LETTER MU
+A6CD 03BD # GREEK SMALL LETTER NU
+A6CE 03BE # GREEK SMALL LETTER XI
+A6CF 03BF # GREEK SMALL LETTER OMICRON
+A6D0 03C0 # GREEK SMALL LETTER PI
+A6D1 03C1 # GREEK SMALL LETTER RHO
+A6D2 03C3 # GREEK SMALL LETTER SIGMA
+A6D3 03C4 # GREEK SMALL LETTER TAU
+A6D4 03C5 # GREEK SMALL LETTER UPSILON
+A6D5 03C6 # GREEK SMALL LETTER PHI
+A6D6 03C7 # GREEK SMALL LETTER CHI
+A6D7 03C8 # GREEK SMALL LETTER PSI
+A6D8 03C9 # GREEK SMALL LETTER OMEGA
+A7A1 0410 # CYRILLIC CAPITAL LETTER A
+A7A2 0411 # CYRILLIC CAPITAL LETTER BE
+A7A3 0412 # CYRILLIC CAPITAL LETTER VE
+A7A4 0413 # CYRILLIC CAPITAL LETTER GHE
+A7A5 0414 # CYRILLIC CAPITAL LETTER DE
+A7A6 0415 # CYRILLIC CAPITAL LETTER IE
+A7A7 0401 # CYRILLIC CAPITAL LETTER IO
+A7A8 0416 # CYRILLIC CAPITAL LETTER ZHE
+A7A9 0417 # CYRILLIC CAPITAL LETTER ZE
+A7AA 0418 # CYRILLIC CAPITAL LETTER I
+A7AB 0419 # CYRILLIC CAPITAL LETTER SHORT I
+A7AC 041A # CYRILLIC CAPITAL LETTER KA
+A7AD 041B # CYRILLIC CAPITAL LETTER EL
+A7AE 041C # CYRILLIC CAPITAL LETTER EM
+A7AF 041D # CYRILLIC CAPITAL LETTER EN
+A7B0 041E # CYRILLIC CAPITAL LETTER O
+A7B1 041F # CYRILLIC CAPITAL LETTER PE
+A7B2 0420 # CYRILLIC CAPITAL LETTER ER
+A7B3 0421 # CYRILLIC CAPITAL LETTER ES
+A7B4 0422 # CYRILLIC CAPITAL LETTER TE
+A7B5 0423 # CYRILLIC CAPITAL LETTER U
+A7B6 0424 # CYRILLIC CAPITAL LETTER EF
+A7B7 0425 # CYRILLIC CAPITAL LETTER HA
+A7B8 0426 # CYRILLIC CAPITAL LETTER TSE
+A7B9 0427 # CYRILLIC CAPITAL LETTER CHE
+A7BA 0428 # CYRILLIC CAPITAL LETTER SHA
+A7BB 0429 # CYRILLIC CAPITAL LETTER SHCHA
+A7BC 042A # CYRILLIC CAPITAL LETTER HARD SIGN
+A7BD 042B # CYRILLIC CAPITAL LETTER YERU
+A7BE 042C # CYRILLIC CAPITAL LETTER SOFT SIGN
+A7BF 042D # CYRILLIC CAPITAL LETTER E
+A7C0 042E # CYRILLIC CAPITAL LETTER YU
+A7C1 042F # CYRILLIC CAPITAL LETTER YA
+A7D1 0430 # CYRILLIC SMALL LETTER A
+A7D2 0431 # CYRILLIC SMALL LETTER BE
+A7D3 0432 # CYRILLIC SMALL LETTER VE
+A7D4 0433 # CYRILLIC SMALL LETTER GHE
+A7D5 0434 # CYRILLIC SMALL LETTER DE
+A7D6 0435 # CYRILLIC SMALL LETTER IE
+A7D7 0451 # CYRILLIC SMALL LETTER IO
+A7D8 0436 # CYRILLIC SMALL LETTER ZHE
+A7D9 0437 # CYRILLIC SMALL LETTER ZE
+A7DA 0438 # CYRILLIC SMALL LETTER I
+A7DB 0439 # CYRILLIC SMALL LETTER SHORT I
+A7DC 043A # CYRILLIC SMALL LETTER KA
+A7DD 043B # CYRILLIC SMALL LETTER EL
+A7DE 043C # CYRILLIC SMALL LETTER EM
+A7DF 043D # CYRILLIC SMALL LETTER EN
+A7E0 043E # CYRILLIC SMALL LETTER O
+A7E1 043F # CYRILLIC SMALL LETTER PE
+A7E2 0440 # CYRILLIC SMALL LETTER ER
+A7E3 0441 # CYRILLIC SMALL LETTER ES
+A7E4 0442 # CYRILLIC SMALL LETTER TE
+A7E5 0443 # CYRILLIC SMALL LETTER U
+A7E6 0444 # CYRILLIC SMALL LETTER EF
+A7E7 0445 # CYRILLIC SMALL LETTER HA
+A7E8 0446 # CYRILLIC SMALL LETTER TSE
+A7E9 0447 # CYRILLIC SMALL LETTER CHE
+A7EA 0448 # CYRILLIC SMALL LETTER SHA
+A7EB 0449 # CYRILLIC SMALL LETTER SHCHA
+A7EC 044A # CYRILLIC SMALL LETTER HARD SIGN
+A7ED 044B # CYRILLIC SMALL LETTER YERU
+A7EE 044C # CYRILLIC SMALL LETTER SOFT SIGN
+A7EF 044D # CYRILLIC SMALL LETTER E
+A7F0 044E # CYRILLIC SMALL LETTER YU
+A7F1 044F # CYRILLIC SMALL LETTER YA
+A8A1 0101 # LATIN SMALL LETTER A WITH MACRON
+A8A2 00E1 # LATIN SMALL LETTER A WITH ACUTE
+A8A3 01CE # LATIN SMALL LETTER A WITH CARON
+A8A4 00E0 # LATIN SMALL LETTER A WITH GRAVE
+A8A5 0113 # LATIN SMALL LETTER E WITH MACRON
+A8A6 00E9 # LATIN SMALL LETTER E WITH ACUTE
+A8A7 011B # LATIN SMALL LETTER E WITH CARON
+A8A8 00E8 # LATIN SMALL LETTER E WITH GRAVE
+A8A9 012B # LATIN SMALL LETTER I WITH MACRON
+A8AA 00ED # LATIN SMALL LETTER I WITH ACUTE
+A8AB 01D0 # LATIN SMALL LETTER I WITH CARON
+A8AC 00EC # LATIN SMALL LETTER I WITH GRAVE
+A8AD 014D # LATIN SMALL LETTER O WITH MACRON
+A8AE 00F3 # LATIN SMALL LETTER O WITH ACUTE
+A8AF 01D2 # LATIN SMALL LETTER O WITH CARON
+A8B0 00F2 # LATIN SMALL LETTER O WITH GRAVE
+A8B1 016B # LATIN SMALL LETTER U WITH MACRON
+A8B2 00FA # LATIN SMALL LETTER U WITH ACUTE
+A8B3 01D4 # LATIN SMALL LETTER U WITH CARON
+A8B4 00F9 # LATIN SMALL LETTER U WITH GRAVE
+A8B5 01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON
+A8B6 01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE
+A8B7 01DA # LATIN SMALL LETTER U WITH DIAERESIS AND CARON
+A8B8 01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE
+A8B9 00FC # LATIN SMALL LETTER U WITH DIAERESIS
+A8BA 00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX
+A8C5 3105 # BOPOMOFO LETTER B
+A8C6 3106 # BOPOMOFO LETTER P
+A8C7 3107 # BOPOMOFO LETTER M
+A8C8 3108 # BOPOMOFO LETTER F
+A8C9 3109 # BOPOMOFO LETTER D
+A8CA 310A # BOPOMOFO LETTER T
+A8CB 310B # BOPOMOFO LETTER N
+A8CC 310C # BOPOMOFO LETTER L
+A8CD 310D # BOPOMOFO LETTER G
+A8CE 310E # BOPOMOFO LETTER K
+A8CF 310F # BOPOMOFO LETTER H
+A8D0 3110 # BOPOMOFO LETTER J
+A8D1 3111 # BOPOMOFO LETTER Q
+A8D2 3112 # BOPOMOFO LETTER X
+A8D3 3113 # BOPOMOFO LETTER ZH
+A8D4 3114 # BOPOMOFO LETTER CH
+A8D5 3115 # BOPOMOFO LETTER SH
+A8D6 3116 # BOPOMOFO LETTER R
+A8D7 3117 # BOPOMOFO LETTER Z
+A8D8 3118 # BOPOMOFO LETTER C
+A8D9 3119 # BOPOMOFO LETTER S
+A8DA 311A # BOPOMOFO LETTER A
+A8DB 311B # BOPOMOFO LETTER O
+A8DC 311C # BOPOMOFO LETTER E
+A8DD 311D # BOPOMOFO LETTER EH
+A8DE 311E # BOPOMOFO LETTER AI
+A8DF 311F # BOPOMOFO LETTER EI
+A8E0 3120 # BOPOMOFO LETTER AU
+A8E1 3121 # BOPOMOFO LETTER OU
+A8E2 3122 # BOPOMOFO LETTER AN
+A8E3 3123 # BOPOMOFO LETTER EN
+A8E4 3124 # BOPOMOFO LETTER ANG
+A8E5 3125 # BOPOMOFO LETTER ENG
+A8E6 3126 # BOPOMOFO LETTER ER
+A8E7 3127 # BOPOMOFO LETTER I
+A8E8 3128 # BOPOMOFO LETTER U
+A8E9 3129 # BOPOMOFO LETTER IU
+A9A4 2500 # BOX DRAWINGS LIGHT HORIZONTAL
+A9A5 2501 # BOX DRAWINGS HEAVY HORIZONTAL
+A9A6 2502 # BOX DRAWINGS LIGHT VERTICAL
+A9A7 2503 # BOX DRAWINGS HEAVY VERTICAL
+A9A8 2504 # BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL
+A9A9 2505 # BOX DRAWINGS HEAVY TRIPLE DASH HORIZONTAL
+A9AA 2506 # BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL
+A9AB 2507 # BOX DRAWINGS HEAVY TRIPLE DASH VERTICAL
+A9AC 2508 # BOX DRAWINGS LIGHT QUADRUPLE DASH HORIZONTAL
+A9AD 2509 # BOX DRAWINGS HEAVY QUADRUPLE DASH HORIZONTAL
+A9AE 250A # BOX DRAWINGS LIGHT QUADRUPLE DASH VERTICAL
+A9AF 250B # BOX DRAWINGS HEAVY QUADRUPLE DASH VERTICAL
+A9B0 250C # BOX DRAWINGS LIGHT DOWN AND RIGHT
+A9B1 250D # BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY
+A9B2 250E # BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT
+A9B3 250F # BOX DRAWINGS HEAVY DOWN AND RIGHT
+A9B4 2510 # BOX DRAWINGS LIGHT DOWN AND LEFT
+A9B5 2511 # BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY
+A9B6 2512 # BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT
+A9B7 2513 # BOX DRAWINGS HEAVY DOWN AND LEFT
+A9B8 2514 # BOX DRAWINGS LIGHT UP AND RIGHT
+A9B9 2515 # BOX DRAWINGS UP LIGHT AND RIGHT HEAVY
+A9BA 2516 # BOX DRAWINGS UP HEAVY AND RIGHT LIGHT
+A9BB 2517 # BOX DRAWINGS HEAVY UP AND RIGHT
+A9BC 2518 # BOX DRAWINGS LIGHT UP AND LEFT
+A9BD 2519 # BOX DRAWINGS UP LIGHT AND LEFT HEAVY
+A9BE 251A # BOX DRAWINGS UP HEAVY AND LEFT LIGHT
+A9BF 251B # BOX DRAWINGS HEAVY UP AND LEFT
+A9C0 251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+A9C1 251D # BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY
+A9C2 251E # BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT
+A9C3 251F # BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT
+A9C4 2520 # BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT
+A9C5 2521 # BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY
+A9C6 2522 # BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY
+A9C7 2523 # BOX DRAWINGS HEAVY VERTICAL AND RIGHT
+A9C8 2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT
+A9C9 2525 # BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY
+A9CA 2526 # BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT
+A9CB 2527 # BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT
+A9CC 2528 # BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT
+A9CD 2529 # BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY
+A9CE 252A # BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY
+A9CF 252B # BOX DRAWINGS HEAVY VERTICAL AND LEFT
+A9D0 252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+A9D1 252D # BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT
+A9D2 252E # BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT
+A9D3 252F # BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY
+A9D4 2530 # BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT
+A9D5 2531 # BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY
+A9D6 2532 # BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY
+A9D7 2533 # BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
+A9D8 2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL
+A9D9 2535 # BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT
+A9DA 2536 # BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT
+A9DB 2537 # BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY
+A9DC 2538 # BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT
+A9DD 2539 # BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY
+A9DE 253A # BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY
+A9DF 253B # BOX DRAWINGS HEAVY UP AND HORIZONTAL
+A9E0 253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+A9E1 253D # BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT
+A9E2 253E # BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT
+A9E3 253F # BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY
+A9E4 2540 # BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT
+A9E5 2541 # BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT
+A9E6 2542 # BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT
+A9E7 2543 # BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT
+A9E8 2544 # BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT
+A9E9 2545 # BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT
+A9EA 2546 # BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT
+A9EB 2547 # BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY
+A9EC 2548 # BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY
+A9ED 2549 # BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY
+A9EE 254A # BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY
+A9EF 254B # BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
+B0A1 554A # <CJK>
+B0A2 963F # <CJK>
+B0A3 57C3 # <CJK>
+B0A4 6328 # <CJK>
+B0A5 54CE # <CJK>
+B0A6 5509 # <CJK>
+B0A7 54C0 # <CJK>
+B0A8 7691 # <CJK>
+B0A9 764C # <CJK>
+B0AA 853C # <CJK>
+B0AB 77EE # <CJK>
+B0AC 827E # <CJK>
+B0AD 788D # <CJK>
+B0AE 7231 # <CJK>
+B0AF 9698 # <CJK>
+B0B0 978D # <CJK>
+B0B1 6C28 # <CJK>
+B0B2 5B89 # <CJK>
+B0B3 4FFA # <CJK>
+B0B4 6309 # <CJK>
+B0B5 6697 # <CJK>
+B0B6 5CB8 # <CJK>
+B0B7 80FA # <CJK>
+B0B8 6848 # <CJK>
+B0B9 80AE # <CJK>
+B0BA 6602 # <CJK>
+B0BB 76CE # <CJK>
+B0BC 51F9 # <CJK>
+B0BD 6556 # <CJK>
+B0BE 71AC # <CJK>
+B0BF 7FF1 # <CJK>
+B0C0 8884 # <CJK>
+B0C1 50B2 # <CJK>
+B0C2 5965 # <CJK>
+B0C3 61CA # <CJK>
+B0C4 6FB3 # <CJK>
+B0C5 82AD # <CJK>
+B0C6 634C # <CJK>
+B0C7 6252 # <CJK>
+B0C8 53ED # <CJK>
+B0C9 5427 # <CJK>
+B0CA 7B06 # <CJK>
+B0CB 516B # <CJK>
+B0CC 75A4 # <CJK>
+B0CD 5DF4 # <CJK>
+B0CE 62D4 # <CJK>
+B0CF 8DCB # <CJK>
+B0D0 9776 # <CJK>
+B0D1 628A # <CJK>
+B0D2 8019 # <CJK>
+B0D3 575D # <CJK>
+B0D4 9738 # <CJK>
+B0D5 7F62 # <CJK>
+B0D6 7238 # <CJK>
+B0D7 767D # <CJK>
+B0D8 67CF # <CJK>
+B0D9 767E # <CJK>
+B0DA 6446 # <CJK>
+B0DB 4F70 # <CJK>
+B0DC 8D25 # <CJK>
+B0DD 62DC # <CJK>
+B0DE 7A17 # <CJK>
+B0DF 6591 # <CJK>
+B0E0 73ED # <CJK>
+B0E1 642C # <CJK>
+B0E2 6273 # <CJK>
+B0E3 822C # <CJK>
+B0E4 9881 # <CJK>
+B0E5 677F # <CJK>
+B0E6 7248 # <CJK>
+B0E7 626E # <CJK>
+B0E8 62CC # <CJK>
+B0E9 4F34 # <CJK>
+B0EA 74E3 # <CJK>
+B0EB 534A # <CJK>
+B0EC 529E # <CJK>
+B0ED 7ECA # <CJK>
+B0EE 90A6 # <CJK>
+B0EF 5E2E # <CJK>
+B0F0 6886 # <CJK>
+B0F1 699C # <CJK>
+B0F2 8180 # <CJK>
+B0F3 7ED1 # <CJK>
+B0F4 68D2 # <CJK>
+B0F5 78C5 # <CJK>
+B0F6 868C # <CJK>
+B0F7 9551 # <CJK>
+B0F8 508D # <CJK>
+B0F9 8C24 # <CJK>
+B0FA 82DE # <CJK>
+B0FB 80DE # <CJK>
+B0FC 5305 # <CJK>
+B0FD 8912 # <CJK>
+B0FE 5265 # <CJK>
+B1A1 8584 # <CJK>
+B1A2 96F9 # <CJK>
+B1A3 4FDD # <CJK>
+B1A4 5821 # <CJK>
+B1A5 9971 # <CJK>
+B1A6 5B9D # <CJK>
+B1A7 62B1 # <CJK>
+B1A8 62A5 # <CJK>
+B1A9 66B4 # <CJK>
+B1AA 8C79 # <CJK>
+B1AB 9C8D # <CJK>
+B1AC 7206 # <CJK>
+B1AD 676F # <CJK>
+B1AE 7891 # <CJK>
+B1AF 60B2 # <CJK>
+B1B0 5351 # <CJK>
+B1B1 5317 # <CJK>
+B1B2 8F88 # <CJK>
+B1B3 80CC # <CJK>
+B1B4 8D1D # <CJK>
+B1B5 94A1 # <CJK>
+B1B6 500D # <CJK>
+B1B7 72C8 # <CJK>
+B1B8 5907 # <CJK>
+B1B9 60EB # <CJK>
+B1BA 7119 # <CJK>
+B1BB 88AB # <CJK>
+B1BC 5954 # <CJK>
+B1BD 82EF # <CJK>
+B1BE 672C # <CJK>
+B1BF 7B28 # <CJK>
+B1C0 5D29 # <CJK>
+B1C1 7EF7 # <CJK>
+B1C2 752D # <CJK>
+B1C3 6CF5 # <CJK>
+B1C4 8E66 # <CJK>
+B1C5 8FF8 # <CJK>
+B1C6 903C # <CJK>
+B1C7 9F3B # <CJK>
+B1C8 6BD4 # <CJK>
+B1C9 9119 # <CJK>
+B1CA 7B14 # <CJK>
+B1CB 5F7C # <CJK>
+B1CC 78A7 # <CJK>
+B1CD 84D6 # <CJK>
+B1CE 853D # <CJK>
+B1CF 6BD5 # <CJK>
+B1D0 6BD9 # <CJK>
+B1D1 6BD6 # <CJK>
+B1D2 5E01 # <CJK>
+B1D3 5E87 # <CJK>
+B1D4 75F9 # <CJK>
+B1D5 95ED # <CJK>
+B1D6 655D # <CJK>
+B1D7 5F0A # <CJK>
+B1D8 5FC5 # <CJK>
+B1D9 8F9F # <CJK>
+B1DA 58C1 # <CJK>
+B1DB 81C2 # <CJK>
+B1DC 907F # <CJK>
+B1DD 965B # <CJK>
+B1DE 97AD # <CJK>
+B1DF 8FB9 # <CJK>
+B1E0 7F16 # <CJK>
+B1E1 8D2C # <CJK>
+B1E2 6241 # <CJK>
+B1E3 4FBF # <CJK>
+B1E4 53D8 # <CJK>
+B1E5 535E # <CJK>
+B1E6 8FA8 # <CJK>
+B1E7 8FA9 # <CJK>
+B1E8 8FAB # <CJK>
+B1E9 904D # <CJK>
+B1EA 6807 # <CJK>
+B1EB 5F6A # <CJK>
+B1EC 8198 # <CJK>
+B1ED 8868 # <CJK>
+B1EE 9CD6 # <CJK>
+B1EF 618B # <CJK>
+B1F0 522B # <CJK>
+B1F1 762A # <CJK>
+B1F2 5F6C # <CJK>
+B1F3 658C # <CJK>
+B1F4 6FD2 # <CJK>
+B1F5 6EE8 # <CJK>
+B1F6 5BBE # <CJK>
+B1F7 6448 # <CJK>
+B1F8 5175 # <CJK>
+B1F9 51B0 # <CJK>
+B1FA 67C4 # <CJK>
+B1FB 4E19 # <CJK>
+B1FC 79C9 # <CJK>
+B1FD 997C # <CJK>
+B1FE 70B3 # <CJK>
+B2A1 75C5 # <CJK>
+B2A2 5E76 # <CJK>
+B2A3 73BB # <CJK>
+B2A4 83E0 # <CJK>
+B2A5 64AD # <CJK>
+B2A6 62E8 # <CJK>
+B2A7 94B5 # <CJK>
+B2A8 6CE2 # <CJK>
+B2A9 535A # <CJK>
+B2AA 52C3 # <CJK>
+B2AB 640F # <CJK>
+B2AC 94C2 # <CJK>
+B2AD 7B94 # <CJK>
+B2AE 4F2F # <CJK>
+B2AF 5E1B # <CJK>
+B2B0 8236 # <CJK>
+B2B1 8116 # <CJK>
+B2B2 818A # <CJK>
+B2B3 6E24 # <CJK>
+B2B4 6CCA # <CJK>
+B2B5 9A73 # <CJK>
+B2B6 6355 # <CJK>
+B2B7 535C # <CJK>
+B2B8 54FA # <CJK>
+B2B9 8865 # <CJK>
+B2BA 57E0 # <CJK>
+B2BB 4E0D # <CJK>
+B2BC 5E03 # <CJK>
+B2BD 6B65 # <CJK>
+B2BE 7C3F # <CJK>
+B2BF 90E8 # <CJK>
+B2C0 6016 # <CJK>
+B2C1 64E6 # <CJK>
+B2C2 731C # <CJK>
+B2C3 88C1 # <CJK>
+B2C4 6750 # <CJK>
+B2C5 624D # <CJK>
+B2C6 8D22 # <CJK>
+B2C7 776C # <CJK>
+B2C8 8E29 # <CJK>
+B2C9 91C7 # <CJK>
+B2CA 5F69 # <CJK>
+B2CB 83DC # <CJK>
+B2CC 8521 # <CJK>
+B2CD 9910 # <CJK>
+B2CE 53C2 # <CJK>
+B2CF 8695 # <CJK>
+B2D0 6B8B # <CJK>
+B2D1 60ED # <CJK>
+B2D2 60E8 # <CJK>
+B2D3 707F # <CJK>
+B2D4 82CD # <CJK>
+B2D5 8231 # <CJK>
+B2D6 4ED3 # <CJK>
+B2D7 6CA7 # <CJK>
+B2D8 85CF # <CJK>
+B2D9 64CD # <CJK>
+B2DA 7CD9 # <CJK>
+B2DB 69FD # <CJK>
+B2DC 66F9 # <CJK>
+B2DD 8349 # <CJK>
+B2DE 5395 # <CJK>
+B2DF 7B56 # <CJK>
+B2E0 4FA7 # <CJK>
+B2E1 518C # <CJK>
+B2E2 6D4B # <CJK>
+B2E3 5C42 # <CJK>
+B2E4 8E6D # <CJK>
+B2E5 63D2 # <CJK>
+B2E6 53C9 # <CJK>
+B2E7 832C # <CJK>
+B2E8 8336 # <CJK>
+B2E9 67E5 # <CJK>
+B2EA 78B4 # <CJK>
+B2EB 643D # <CJK>
+B2EC 5BDF # <CJK>
+B2ED 5C94 # <CJK>
+B2EE 5DEE # <CJK>
+B2EF 8BE7 # <CJK>
+B2F0 62C6 # <CJK>
+B2F1 67F4 # <CJK>
+B2F2 8C7A # <CJK>
+B2F3 6400 # <CJK>
+B2F4 63BA # <CJK>
+B2F5 8749 # <CJK>
+B2F6 998B # <CJK>
+B2F7 8C17 # <CJK>
+B2F8 7F20 # <CJK>
+B2F9 94F2 # <CJK>
+B2FA 4EA7 # <CJK>
+B2FB 9610 # <CJK>
+B2FC 98A4 # <CJK>
+B2FD 660C # <CJK>
+B2FE 7316 # <CJK>
+B3A1 573A # <CJK>
+B3A2 5C1D # <CJK>
+B3A3 5E38 # <CJK>
+B3A4 957F # <CJK>
+B3A5 507F # <CJK>
+B3A6 80A0 # <CJK>
+B3A7 5382 # <CJK>
+B3A8 655E # <CJK>
+B3A9 7545 # <CJK>
+B3AA 5531 # <CJK>
+B3AB 5021 # <CJK>
+B3AC 8D85 # <CJK>
+B3AD 6284 # <CJK>
+B3AE 949E # <CJK>
+B3AF 671D # <CJK>
+B3B0 5632 # <CJK>
+B3B1 6F6E # <CJK>
+B3B2 5DE2 # <CJK>
+B3B3 5435 # <CJK>
+B3B4 7092 # <CJK>
+B3B5 8F66 # <CJK>
+B3B6 626F # <CJK>
+B3B7 64A4 # <CJK>
+B3B8 63A3 # <CJK>
+B3B9 5F7B # <CJK>
+B3BA 6F88 # <CJK>
+B3BB 90F4 # <CJK>
+B3BC 81E3 # <CJK>
+B3BD 8FB0 # <CJK>
+B3BE 5C18 # <CJK>
+B3BF 6668 # <CJK>
+B3C0 5FF1 # <CJK>
+B3C1 6C89 # <CJK>
+B3C2 9648 # <CJK>
+B3C3 8D81 # <CJK>
+B3C4 886C # <CJK>
+B3C5 6491 # <CJK>
+B3C6 79F0 # <CJK>
+B3C7 57CE # <CJK>
+B3C8 6A59 # <CJK>
+B3C9 6210 # <CJK>
+B3CA 5448 # <CJK>
+B3CB 4E58 # <CJK>
+B3CC 7A0B # <CJK>
+B3CD 60E9 # <CJK>
+B3CE 6F84 # <CJK>
+B3CF 8BDA # <CJK>
+B3D0 627F # <CJK>
+B3D1 901E # <CJK>
+B3D2 9A8B # <CJK>
+B3D3 79E4 # <CJK>
+B3D4 5403 # <CJK>
+B3D5 75F4 # <CJK>
+B3D6 6301 # <CJK>
+B3D7 5319 # <CJK>
+B3D8 6C60 # <CJK>
+B3D9 8FDF # <CJK>
+B3DA 5F1B # <CJK>
+B3DB 9A70 # <CJK>
+B3DC 803B # <CJK>
+B3DD 9F7F # <CJK>
+B3DE 4F88 # <CJK>
+B3DF 5C3A # <CJK>
+B3E0 8D64 # <CJK>
+B3E1 7FC5 # <CJK>
+B3E2 65A5 # <CJK>
+B3E3 70BD # <CJK>
+B3E4 5145 # <CJK>
+B3E5 51B2 # <CJK>
+B3E6 866B # <CJK>
+B3E7 5D07 # <CJK>
+B3E8 5BA0 # <CJK>
+B3E9 62BD # <CJK>
+B3EA 916C # <CJK>
+B3EB 7574 # <CJK>
+B3EC 8E0C # <CJK>
+B3ED 7A20 # <CJK>
+B3EE 6101 # <CJK>
+B3EF 7B79 # <CJK>
+B3F0 4EC7 # <CJK>
+B3F1 7EF8 # <CJK>
+B3F2 7785 # <CJK>
+B3F3 4E11 # <CJK>
+B3F4 81ED # <CJK>
+B3F5 521D # <CJK>
+B3F6 51FA # <CJK>
+B3F7 6A71 # <CJK>
+B3F8 53A8 # <CJK>
+B3F9 8E87 # <CJK>
+B3FA 9504 # <CJK>
+B3FB 96CF # <CJK>
+B3FC 6EC1 # <CJK>
+B3FD 9664 # <CJK>
+B3FE 695A # <CJK>
+B4A1 7840 # <CJK>
+B4A2 50A8 # <CJK>
+B4A3 77D7 # <CJK>
+B4A4 6410 # <CJK>
+B4A5 89E6 # <CJK>
+B4A6 5904 # <CJK>
+B4A7 63E3 # <CJK>
+B4A8 5DDD # <CJK>
+B4A9 7A7F # <CJK>
+B4AA 693D # <CJK>
+B4AB 4F20 # <CJK>
+B4AC 8239 # <CJK>
+B4AD 5598 # <CJK>
+B4AE 4E32 # <CJK>
+B4AF 75AE # <CJK>
+B4B0 7A97 # <CJK>
+B4B1 5E62 # <CJK>
+B4B2 5E8A # <CJK>
+B4B3 95EF # <CJK>
+B4B4 521B # <CJK>
+B4B5 5439 # <CJK>
+B4B6 708A # <CJK>
+B4B7 6376 # <CJK>
+B4B8 9524 # <CJK>
+B4B9 5782 # <CJK>
+B4BA 6625 # <CJK>
+B4BB 693F # <CJK>
+B4BC 9187 # <CJK>
+B4BD 5507 # <CJK>
+B4BE 6DF3 # <CJK>
+B4BF 7EAF # <CJK>
+B4C0 8822 # <CJK>
+B4C1 6233 # <CJK>
+B4C2 7EF0 # <CJK>
+B4C3 75B5 # <CJK>
+B4C4 8328 # <CJK>
+B4C5 78C1 # <CJK>
+B4C6 96CC # <CJK>
+B4C7 8F9E # <CJK>
+B4C8 6148 # <CJK>
+B4C9 74F7 # <CJK>
+B4CA 8BCD # <CJK>
+B4CB 6B64 # <CJK>
+B4CC 523A # <CJK>
+B4CD 8D50 # <CJK>
+B4CE 6B21 # <CJK>
+B4CF 806A # <CJK>
+B4D0 8471 # <CJK>
+B4D1 56F1 # <CJK>
+B4D2 5306 # <CJK>
+B4D3 4ECE # <CJK>
+B4D4 4E1B # <CJK>
+B4D5 51D1 # <CJK>
+B4D6 7C97 # <CJK>
+B4D7 918B # <CJK>
+B4D8 7C07 # <CJK>
+B4D9 4FC3 # <CJK>
+B4DA 8E7F # <CJK>
+B4DB 7BE1 # <CJK>
+B4DC 7A9C # <CJK>
+B4DD 6467 # <CJK>
+B4DE 5D14 # <CJK>
+B4DF 50AC # <CJK>
+B4E0 8106 # <CJK>
+B4E1 7601 # <CJK>
+B4E2 7CB9 # <CJK>
+B4E3 6DEC # <CJK>
+B4E4 7FE0 # <CJK>
+B4E5 6751 # <CJK>
+B4E6 5B58 # <CJK>
+B4E7 5BF8 # <CJK>
+B4E8 78CB # <CJK>
+B4E9 64AE # <CJK>
+B4EA 6413 # <CJK>
+B4EB 63AA # <CJK>
+B4EC 632B # <CJK>
+B4ED 9519 # <CJK>
+B4EE 642D # <CJK>
+B4EF 8FBE # <CJK>
+B4F0 7B54 # <CJK>
+B4F1 7629 # <CJK>
+B4F2 6253 # <CJK>
+B4F3 5927 # <CJK>
+B4F4 5446 # <CJK>
+B4F5 6B79 # <CJK>
+B4F6 50A3 # <CJK>
+B4F7 6234 # <CJK>
+B4F8 5E26 # <CJK>
+B4F9 6B86 # <CJK>
+B4FA 4EE3 # <CJK>
+B4FB 8D37 # <CJK>
+B4FC 888B # <CJK>
+B4FD 5F85 # <CJK>
+B4FE 902E # <CJK>
+B5A1 6020 # <CJK>
+B5A2 803D # <CJK>
+B5A3 62C5 # <CJK>
+B5A4 4E39 # <CJK>
+B5A5 5355 # <CJK>
+B5A6 90F8 # <CJK>
+B5A7 63B8 # <CJK>
+B5A8 80C6 # <CJK>
+B5A9 65E6 # <CJK>
+B5AA 6C2E # <CJK>
+B5AB 4F46 # <CJK>
+B5AC 60EE # <CJK>
+B5AD 6DE1 # <CJK>
+B5AE 8BDE # <CJK>
+B5AF 5F39 # <CJK>
+B5B0 86CB # <CJK>
+B5B1 5F53 # <CJK>
+B5B2 6321 # <CJK>
+B5B3 515A # <CJK>
+B5B4 8361 # <CJK>
+B5B5 6863 # <CJK>
+B5B6 5200 # <CJK>
+B5B7 6363 # <CJK>
+B5B8 8E48 # <CJK>
+B5B9 5012 # <CJK>
+B5BA 5C9B # <CJK>
+B5BB 7977 # <CJK>
+B5BC 5BFC # <CJK>
+B5BD 5230 # <CJK>
+B5BE 7A3B # <CJK>
+B5BF 60BC # <CJK>
+B5C0 9053 # <CJK>
+B5C1 76D7 # <CJK>
+B5C2 5FB7 # <CJK>
+B5C3 5F97 # <CJK>
+B5C4 7684 # <CJK>
+B5C5 8E6C # <CJK>
+B5C6 706F # <CJK>
+B5C7 767B # <CJK>
+B5C8 7B49 # <CJK>
+B5C9 77AA # <CJK>
+B5CA 51F3 # <CJK>
+B5CB 9093 # <CJK>
+B5CC 5824 # <CJK>
+B5CD 4F4E # <CJK>
+B5CE 6EF4 # <CJK>
+B5CF 8FEA # <CJK>
+B5D0 654C # <CJK>
+B5D1 7B1B # <CJK>
+B5D2 72C4 # <CJK>
+B5D3 6DA4 # <CJK>
+B5D4 7FDF # <CJK>
+B5D5 5AE1 # <CJK>
+B5D6 62B5 # <CJK>
+B5D7 5E95 # <CJK>
+B5D8 5730 # <CJK>
+B5D9 8482 # <CJK>
+B5DA 7B2C # <CJK>
+B5DB 5E1D # <CJK>
+B5DC 5F1F # <CJK>
+B5DD 9012 # <CJK>
+B5DE 7F14 # <CJK>
+B5DF 98A0 # <CJK>
+B5E0 6382 # <CJK>
+B5E1 6EC7 # <CJK>
+B5E2 7898 # <CJK>
+B5E3 70B9 # <CJK>
+B5E4 5178 # <CJK>
+B5E5 975B # <CJK>
+B5E6 57AB # <CJK>
+B5E7 7535 # <CJK>
+B5E8 4F43 # <CJK>
+B5E9 7538 # <CJK>
+B5EA 5E97 # <CJK>
+B5EB 60E6 # <CJK>
+B5EC 5960 # <CJK>
+B5ED 6DC0 # <CJK>
+B5EE 6BBF # <CJK>
+B5EF 7889 # <CJK>
+B5F0 53FC # <CJK>
+B5F1 96D5 # <CJK>
+B5F2 51CB # <CJK>
+B5F3 5201 # <CJK>
+B5F4 6389 # <CJK>
+B5F5 540A # <CJK>
+B5F6 9493 # <CJK>
+B5F7 8C03 # <CJK>
+B5F8 8DCC # <CJK>
+B5F9 7239 # <CJK>
+B5FA 789F # <CJK>
+B5FB 8776 # <CJK>
+B5FC 8FED # <CJK>
+B5FD 8C0D # <CJK>
+B5FE 53E0 # <CJK>
+B6A1 4E01 # <CJK>
+B6A2 76EF # <CJK>
+B6A3 53EE # <CJK>
+B6A4 9489 # <CJK>
+B6A5 9876 # <CJK>
+B6A6 9F0E # <CJK>
+B6A7 952D # <CJK>
+B6A8 5B9A # <CJK>
+B6A9 8BA2 # <CJK>
+B6AA 4E22 # <CJK>
+B6AB 4E1C # <CJK>
+B6AC 51AC # <CJK>
+B6AD 8463 # <CJK>
+B6AE 61C2 # <CJK>
+B6AF 52A8 # <CJK>
+B6B0 680B # <CJK>
+B6B1 4F97 # <CJK>
+B6B2 606B # <CJK>
+B6B3 51BB # <CJK>
+B6B4 6D1E # <CJK>
+B6B5 515C # <CJK>
+B6B6 6296 # <CJK>
+B6B7 6597 # <CJK>
+B6B8 9661 # <CJK>
+B6B9 8C46 # <CJK>
+B6BA 9017 # <CJK>
+B6BB 75D8 # <CJK>
+B6BC 90FD # <CJK>
+B6BD 7763 # <CJK>
+B6BE 6BD2 # <CJK>
+B6BF 728A # <CJK>
+B6C0 72EC # <CJK>
+B6C1 8BFB # <CJK>
+B6C2 5835 # <CJK>
+B6C3 7779 # <CJK>
+B6C4 8D4C # <CJK>
+B6C5 675C # <CJK>
+B6C6 9540 # <CJK>
+B6C7 809A # <CJK>
+B6C8 5EA6 # <CJK>
+B6C9 6E21 # <CJK>
+B6CA 5992 # <CJK>
+B6CB 7AEF # <CJK>
+B6CC 77ED # <CJK>
+B6CD 953B # <CJK>
+B6CE 6BB5 # <CJK>
+B6CF 65AD # <CJK>
+B6D0 7F0E # <CJK>
+B6D1 5806 # <CJK>
+B6D2 5151 # <CJK>
+B6D3 961F # <CJK>
+B6D4 5BF9 # <CJK>
+B6D5 58A9 # <CJK>
+B6D6 5428 # <CJK>
+B6D7 8E72 # <CJK>
+B6D8 6566 # <CJK>
+B6D9 987F # <CJK>
+B6DA 56E4 # <CJK>
+B6DB 949D # <CJK>
+B6DC 76FE # <CJK>
+B6DD 9041 # <CJK>
+B6DE 6387 # <CJK>
+B6DF 54C6 # <CJK>
+B6E0 591A # <CJK>
+B6E1 593A # <CJK>
+B6E2 579B # <CJK>
+B6E3 8EB2 # <CJK>
+B6E4 6735 # <CJK>
+B6E5 8DFA # <CJK>
+B6E6 8235 # <CJK>
+B6E7 5241 # <CJK>
+B6E8 60F0 # <CJK>
+B6E9 5815 # <CJK>
+B6EA 86FE # <CJK>
+B6EB 5CE8 # <CJK>
+B6EC 9E45 # <CJK>
+B6ED 4FC4 # <CJK>
+B6EE 989D # <CJK>
+B6EF 8BB9 # <CJK>
+B6F0 5A25 # <CJK>
+B6F1 6076 # <CJK>
+B6F2 5384 # <CJK>
+B6F3 627C # <CJK>
+B6F4 904F # <CJK>
+B6F5 9102 # <CJK>
+B6F6 997F # <CJK>
+B6F7 6069 # <CJK>
+B6F8 800C # <CJK>
+B6F9 513F # <CJK>
+B6FA 8033 # <CJK>
+B6FB 5C14 # <CJK>
+B6FC 9975 # <CJK>
+B6FD 6D31 # <CJK>
+B6FE 4E8C # <CJK>
+B7A1 8D30 # <CJK>
+B7A2 53D1 # <CJK>
+B7A3 7F5A # <CJK>
+B7A4 7B4F # <CJK>
+B7A5 4F10 # <CJK>
+B7A6 4E4F # <CJK>
+B7A7 9600 # <CJK>
+B7A8 6CD5 # <CJK>
+B7A9 73D0 # <CJK>
+B7AA 85E9 # <CJK>
+B7AB 5E06 # <CJK>
+B7AC 756A # <CJK>
+B7AD 7FFB # <CJK>
+B7AE 6A0A # <CJK>
+B7AF 77FE # <CJK>
+B7B0 9492 # <CJK>
+B7B1 7E41 # <CJK>
+B7B2 51E1 # <CJK>
+B7B3 70E6 # <CJK>
+B7B4 53CD # <CJK>
+B7B5 8FD4 # <CJK>
+B7B6 8303 # <CJK>
+B7B7 8D29 # <CJK>
+B7B8 72AF # <CJK>
+B7B9 996D # <CJK>
+B7BA 6CDB # <CJK>
+B7BB 574A # <CJK>
+B7BC 82B3 # <CJK>
+B7BD 65B9 # <CJK>
+B7BE 80AA # <CJK>
+B7BF 623F # <CJK>
+B7C0 9632 # <CJK>
+B7C1 59A8 # <CJK>
+B7C2 4EFF # <CJK>
+B7C3 8BBF # <CJK>
+B7C4 7EBA # <CJK>
+B7C5 653E # <CJK>
+B7C6 83F2 # <CJK>
+B7C7 975E # <CJK>
+B7C8 5561 # <CJK>
+B7C9 98DE # <CJK>
+B7CA 80A5 # <CJK>
+B7CB 532A # <CJK>
+B7CC 8BFD # <CJK>
+B7CD 5420 # <CJK>
+B7CE 80BA # <CJK>
+B7CF 5E9F # <CJK>
+B7D0 6CB8 # <CJK>
+B7D1 8D39 # <CJK>
+B7D2 82AC # <CJK>
+B7D3 915A # <CJK>
+B7D4 5429 # <CJK>
+B7D5 6C1B # <CJK>
+B7D6 5206 # <CJK>
+B7D7 7EB7 # <CJK>
+B7D8 575F # <CJK>
+B7D9 711A # <CJK>
+B7DA 6C7E # <CJK>
+B7DB 7C89 # <CJK>
+B7DC 594B # <CJK>
+B7DD 4EFD # <CJK>
+B7DE 5FFF # <CJK>
+B7DF 6124 # <CJK>
+B7E0 7CAA # <CJK>
+B7E1 4E30 # <CJK>
+B7E2 5C01 # <CJK>
+B7E3 67AB # <CJK>
+B7E4 8702 # <CJK>
+B7E5 5CF0 # <CJK>
+B7E6 950B # <CJK>
+B7E7 98CE # <CJK>
+B7E8 75AF # <CJK>
+B7E9 70FD # <CJK>
+B7EA 9022 # <CJK>
+B7EB 51AF # <CJK>
+B7EC 7F1D # <CJK>
+B7ED 8BBD # <CJK>
+B7EE 5949 # <CJK>
+B7EF 51E4 # <CJK>
+B7F0 4F5B # <CJK>
+B7F1 5426 # <CJK>
+B7F2 592B # <CJK>
+B7F3 6577 # <CJK>
+B7F4 80A4 # <CJK>
+B7F5 5B75 # <CJK>
+B7F6 6276 # <CJK>
+B7F7 62C2 # <CJK>
+B7F8 8F90 # <CJK>
+B7F9 5E45 # <CJK>
+B7FA 6C1F # <CJK>
+B7FB 7B26 # <CJK>
+B7FC 4F0F # <CJK>
+B7FD 4FD8 # <CJK>
+B7FE 670D # <CJK>
+B8A1 6D6E # <CJK>
+B8A2 6DAA # <CJK>
+B8A3 798F # <CJK>
+B8A4 88B1 # <CJK>
+B8A5 5F17 # <CJK>
+B8A6 752B # <CJK>
+B8A7 629A # <CJK>
+B8A8 8F85 # <CJK>
+B8A9 4FEF # <CJK>
+B8AA 91DC # <CJK>
+B8AB 65A7 # <CJK>
+B8AC 812F # <CJK>
+B8AD 8151 # <CJK>
+B8AE 5E9C # <CJK>
+B8AF 8150 # <CJK>
+B8B0 8D74 # <CJK>
+B8B1 526F # <CJK>
+B8B2 8986 # <CJK>
+B8B3 8D4B # <CJK>
+B8B4 590D # <CJK>
+B8B5 5085 # <CJK>
+B8B6 4ED8 # <CJK>
+B8B7 961C # <CJK>
+B8B8 7236 # <CJK>
+B8B9 8179 # <CJK>
+B8BA 8D1F # <CJK>
+B8BB 5BCC # <CJK>
+B8BC 8BA3 # <CJK>
+B8BD 9644 # <CJK>
+B8BE 5987 # <CJK>
+B8BF 7F1A # <CJK>
+B8C0 5490 # <CJK>
+B8C1 5676 # <CJK>
+B8C2 560E # <CJK>
+B8C3 8BE5 # <CJK>
+B8C4 6539 # <CJK>
+B8C5 6982 # <CJK>
+B8C6 9499 # <CJK>
+B8C7 76D6 # <CJK>
+B8C8 6E89 # <CJK>
+B8C9 5E72 # <CJK>
+B8CA 7518 # <CJK>
+B8CB 6746 # <CJK>
+B8CC 67D1 # <CJK>
+B8CD 7AFF # <CJK>
+B8CE 809D # <CJK>
+B8CF 8D76 # <CJK>
+B8D0 611F # <CJK>
+B8D1 79C6 # <CJK>
+B8D2 6562 # <CJK>
+B8D3 8D63 # <CJK>
+B8D4 5188 # <CJK>
+B8D5 521A # <CJK>
+B8D6 94A2 # <CJK>
+B8D7 7F38 # <CJK>
+B8D8 809B # <CJK>
+B8D9 7EB2 # <CJK>
+B8DA 5C97 # <CJK>
+B8DB 6E2F # <CJK>
+B8DC 6760 # <CJK>
+B8DD 7BD9 # <CJK>
+B8DE 768B # <CJK>
+B8DF 9AD8 # <CJK>
+B8E0 818F # <CJK>
+B8E1 7F94 # <CJK>
+B8E2 7CD5 # <CJK>
+B8E3 641E # <CJK>
+B8E4 9550 # <CJK>
+B8E5 7A3F # <CJK>
+B8E6 544A # <CJK>
+B8E7 54E5 # <CJK>
+B8E8 6B4C # <CJK>
+B8E9 6401 # <CJK>
+B8EA 6208 # <CJK>
+B8EB 9E3D # <CJK>
+B8EC 80F3 # <CJK>
+B8ED 7599 # <CJK>
+B8EE 5272 # <CJK>
+B8EF 9769 # <CJK>
+B8F0 845B # <CJK>
+B8F1 683C # <CJK>
+B8F2 86E4 # <CJK>
+B8F3 9601 # <CJK>
+B8F4 9694 # <CJK>
+B8F5 94EC # <CJK>
+B8F6 4E2A # <CJK>
+B8F7 5404 # <CJK>
+B8F8 7ED9 # <CJK>
+B8F9 6839 # <CJK>
+B8FA 8DDF # <CJK>
+B8FB 8015 # <CJK>
+B8FC 66F4 # <CJK>
+B8FD 5E9A # <CJK>
+B8FE 7FB9 # <CJK>
+B9A1 57C2 # <CJK>
+B9A2 803F # <CJK>
+B9A3 6897 # <CJK>
+B9A4 5DE5 # <CJK>
+B9A5 653B # <CJK>
+B9A6 529F # <CJK>
+B9A7 606D # <CJK>
+B9A8 9F9A # <CJK>
+B9A9 4F9B # <CJK>
+B9AA 8EAC # <CJK>
+B9AB 516C # <CJK>
+B9AC 5BAB # <CJK>
+B9AD 5F13 # <CJK>
+B9AE 5DE9 # <CJK>
+B9AF 6C5E # <CJK>
+B9B0 62F1 # <CJK>
+B9B1 8D21 # <CJK>
+B9B2 5171 # <CJK>
+B9B3 94A9 # <CJK>
+B9B4 52FE # <CJK>
+B9B5 6C9F # <CJK>
+B9B6 82DF # <CJK>
+B9B7 72D7 # <CJK>
+B9B8 57A2 # <CJK>
+B9B9 6784 # <CJK>
+B9BA 8D2D # <CJK>
+B9BB 591F # <CJK>
+B9BC 8F9C # <CJK>
+B9BD 83C7 # <CJK>
+B9BE 5495 # <CJK>
+B9BF 7B8D # <CJK>
+B9C0 4F30 # <CJK>
+B9C1 6CBD # <CJK>
+B9C2 5B64 # <CJK>
+B9C3 59D1 # <CJK>
+B9C4 9F13 # <CJK>
+B9C5 53E4 # <CJK>
+B9C6 86CA # <CJK>
+B9C7 9AA8 # <CJK>
+B9C8 8C37 # <CJK>
+B9C9 80A1 # <CJK>
+B9CA 6545 # <CJK>
+B9CB 987E # <CJK>
+B9CC 56FA # <CJK>
+B9CD 96C7 # <CJK>
+B9CE 522E # <CJK>
+B9CF 74DC # <CJK>
+B9D0 5250 # <CJK>
+B9D1 5BE1 # <CJK>
+B9D2 6302 # <CJK>
+B9D3 8902 # <CJK>
+B9D4 4E56 # <CJK>
+B9D5 62D0 # <CJK>
+B9D6 602A # <CJK>
+B9D7 68FA # <CJK>
+B9D8 5173 # <CJK>
+B9D9 5B98 # <CJK>
+B9DA 51A0 # <CJK>
+B9DB 89C2 # <CJK>
+B9DC 7BA1 # <CJK>
+B9DD 9986 # <CJK>
+B9DE 7F50 # <CJK>
+B9DF 60EF # <CJK>
+B9E0 704C # <CJK>
+B9E1 8D2F # <CJK>
+B9E2 5149 # <CJK>
+B9E3 5E7F # <CJK>
+B9E4 901B # <CJK>
+B9E5 7470 # <CJK>
+B9E6 89C4 # <CJK>
+B9E7 572D # <CJK>
+B9E8 7845 # <CJK>
+B9E9 5F52 # <CJK>
+B9EA 9F9F # <CJK>
+B9EB 95FA # <CJK>
+B9EC 8F68 # <CJK>
+B9ED 9B3C # <CJK>
+B9EE 8BE1 # <CJK>
+B9EF 7678 # <CJK>
+B9F0 6842 # <CJK>
+B9F1 67DC # <CJK>
+B9F2 8DEA # <CJK>
+B9F3 8D35 # <CJK>
+B9F4 523D # <CJK>
+B9F5 8F8A # <CJK>
+B9F6 6EDA # <CJK>
+B9F7 68CD # <CJK>
+B9F8 9505 # <CJK>
+B9F9 90ED # <CJK>
+B9FA 56FD # <CJK>
+B9FB 679C # <CJK>
+B9FC 88F9 # <CJK>
+B9FD 8FC7 # <CJK>
+B9FE 54C8 # <CJK>
+BAA1 9AB8 # <CJK>
+BAA2 5B69 # <CJK>
+BAA3 6D77 # <CJK>
+BAA4 6C26 # <CJK>
+BAA5 4EA5 # <CJK>
+BAA6 5BB3 # <CJK>
+BAA7 9A87 # <CJK>
+BAA8 9163 # <CJK>
+BAA9 61A8 # <CJK>
+BAAA 90AF # <CJK>
+BAAB 97E9 # <CJK>
+BAAC 542B # <CJK>
+BAAD 6DB5 # <CJK>
+BAAE 5BD2 # <CJK>
+BAAF 51FD # <CJK>
+BAB0 558A # <CJK>
+BAB1 7F55 # <CJK>
+BAB2 7FF0 # <CJK>
+BAB3 64BC # <CJK>
+BAB4 634D # <CJK>
+BAB5 65F1 # <CJK>
+BAB6 61BE # <CJK>
+BAB7 608D # <CJK>
+BAB8 710A # <CJK>
+BAB9 6C57 # <CJK>
+BABA 6C49 # <CJK>
+BABB 592F # <CJK>
+BABC 676D # <CJK>
+BABD 822A # <CJK>
+BABE 58D5 # <CJK>
+BABF 568E # <CJK>
+BAC0 8C6A # <CJK>
+BAC1 6BEB # <CJK>
+BAC2 90DD # <CJK>
+BAC3 597D # <CJK>
+BAC4 8017 # <CJK>
+BAC5 53F7 # <CJK>
+BAC6 6D69 # <CJK>
+BAC7 5475 # <CJK>
+BAC8 559D # <CJK>
+BAC9 8377 # <CJK>
+BACA 83CF # <CJK>
+BACB 6838 # <CJK>
+BACC 79BE # <CJK>
+BACD 548C # <CJK>
+BACE 4F55 # <CJK>
+BACF 5408 # <CJK>
+BAD0 76D2 # <CJK>
+BAD1 8C89 # <CJK>
+BAD2 9602 # <CJK>
+BAD3 6CB3 # <CJK>
+BAD4 6DB8 # <CJK>
+BAD5 8D6B # <CJK>
+BAD6 8910 # <CJK>
+BAD7 9E64 # <CJK>
+BAD8 8D3A # <CJK>
+BAD9 563F # <CJK>
+BADA 9ED1 # <CJK>
+BADB 75D5 # <CJK>
+BADC 5F88 # <CJK>
+BADD 72E0 # <CJK>
+BADE 6068 # <CJK>
+BADF 54FC # <CJK>
+BAE0 4EA8 # <CJK>
+BAE1 6A2A # <CJK>
+BAE2 8861 # <CJK>
+BAE3 6052 # <CJK>
+BAE4 8F70 # <CJK>
+BAE5 54C4 # <CJK>
+BAE6 70D8 # <CJK>
+BAE7 8679 # <CJK>
+BAE8 9E3F # <CJK>
+BAE9 6D2A # <CJK>
+BAEA 5B8F # <CJK>
+BAEB 5F18 # <CJK>
+BAEC 7EA2 # <CJK>
+BAED 5589 # <CJK>
+BAEE 4FAF # <CJK>
+BAEF 7334 # <CJK>
+BAF0 543C # <CJK>
+BAF1 539A # <CJK>
+BAF2 5019 # <CJK>
+BAF3 540E # <CJK>
+BAF4 547C # <CJK>
+BAF5 4E4E # <CJK>
+BAF6 5FFD # <CJK>
+BAF7 745A # <CJK>
+BAF8 58F6 # <CJK>
+BAF9 846B # <CJK>
+BAFA 80E1 # <CJK>
+BAFB 8774 # <CJK>
+BAFC 72D0 # <CJK>
+BAFD 7CCA # <CJK>
+BAFE 6E56 # <CJK>
+BBA1 5F27 # <CJK>
+BBA2 864E # <CJK>
+BBA3 552C # <CJK>
+BBA4 62A4 # <CJK>
+BBA5 4E92 # <CJK>
+BBA6 6CAA # <CJK>
+BBA7 6237 # <CJK>
+BBA8 82B1 # <CJK>
+BBA9 54D7 # <CJK>
+BBAA 534E # <CJK>
+BBAB 733E # <CJK>
+BBAC 6ED1 # <CJK>
+BBAD 753B # <CJK>
+BBAE 5212 # <CJK>
+BBAF 5316 # <CJK>
+BBB0 8BDD # <CJK>
+BBB1 69D0 # <CJK>
+BBB2 5F8A # <CJK>
+BBB3 6000 # <CJK>
+BBB4 6DEE # <CJK>
+BBB5 574F # <CJK>
+BBB6 6B22 # <CJK>
+BBB7 73AF # <CJK>
+BBB8 6853 # <CJK>
+BBB9 8FD8 # <CJK>
+BBBA 7F13 # <CJK>
+BBBB 6362 # <CJK>
+BBBC 60A3 # <CJK>
+BBBD 5524 # <CJK>
+BBBE 75EA # <CJK>
+BBBF 8C62 # <CJK>
+BBC0 7115 # <CJK>
+BBC1 6DA3 # <CJK>
+BBC2 5BA6 # <CJK>
+BBC3 5E7B # <CJK>
+BBC4 8352 # <CJK>
+BBC5 614C # <CJK>
+BBC6 9EC4 # <CJK>
+BBC7 78FA # <CJK>
+BBC8 8757 # <CJK>
+BBC9 7C27 # <CJK>
+BBCA 7687 # <CJK>
+BBCB 51F0 # <CJK>
+BBCC 60F6 # <CJK>
+BBCD 714C # <CJK>
+BBCE 6643 # <CJK>
+BBCF 5E4C # <CJK>
+BBD0 604D # <CJK>
+BBD1 8C0E # <CJK>
+BBD2 7070 # <CJK>
+BBD3 6325 # <CJK>
+BBD4 8F89 # <CJK>
+BBD5 5FBD # <CJK>
+BBD6 6062 # <CJK>
+BBD7 86D4 # <CJK>
+BBD8 56DE # <CJK>
+BBD9 6BC1 # <CJK>
+BBDA 6094 # <CJK>
+BBDB 6167 # <CJK>
+BBDC 5349 # <CJK>
+BBDD 60E0 # <CJK>
+BBDE 6666 # <CJK>
+BBDF 8D3F # <CJK>
+BBE0 79FD # <CJK>
+BBE1 4F1A # <CJK>
+BBE2 70E9 # <CJK>
+BBE3 6C47 # <CJK>
+BBE4 8BB3 # <CJK>
+BBE5 8BF2 # <CJK>
+BBE6 7ED8 # <CJK>
+BBE7 8364 # <CJK>
+BBE8 660F # <CJK>
+BBE9 5A5A # <CJK>
+BBEA 9B42 # <CJK>
+BBEB 6D51 # <CJK>
+BBEC 6DF7 # <CJK>
+BBED 8C41 # <CJK>
+BBEE 6D3B # <CJK>
+BBEF 4F19 # <CJK>
+BBF0 706B # <CJK>
+BBF1 83B7 # <CJK>
+BBF2 6216 # <CJK>
+BBF3 60D1 # <CJK>
+BBF4 970D # <CJK>
+BBF5 8D27 # <CJK>
+BBF6 7978 # <CJK>
+BBF7 51FB # <CJK>
+BBF8 573E # <CJK>
+BBF9 57FA # <CJK>
+BBFA 673A # <CJK>
+BBFB 7578 # <CJK>
+BBFC 7A3D # <CJK>
+BBFD 79EF # <CJK>
+BBFE 7B95 # <CJK>
+BCA1 808C # <CJK>
+BCA2 9965 # <CJK>
+BCA3 8FF9 # <CJK>
+BCA4 6FC0 # <CJK>
+BCA5 8BA5 # <CJK>
+BCA6 9E21 # <CJK>
+BCA7 59EC # <CJK>
+BCA8 7EE9 # <CJK>
+BCA9 7F09 # <CJK>
+BCAA 5409 # <CJK>
+BCAB 6781 # <CJK>
+BCAC 68D8 # <CJK>
+BCAD 8F91 # <CJK>
+BCAE 7C4D # <CJK>
+BCAF 96C6 # <CJK>
+BCB0 53CA # <CJK>
+BCB1 6025 # <CJK>
+BCB2 75BE # <CJK>
+BCB3 6C72 # <CJK>
+BCB4 5373 # <CJK>
+BCB5 5AC9 # <CJK>
+BCB6 7EA7 # <CJK>
+BCB7 6324 # <CJK>
+BCB8 51E0 # <CJK>
+BCB9 810A # <CJK>
+BCBA 5DF1 # <CJK>
+BCBB 84DF # <CJK>
+BCBC 6280 # <CJK>
+BCBD 5180 # <CJK>
+BCBE 5B63 # <CJK>
+BCBF 4F0E # <CJK>
+BCC0 796D # <CJK>
+BCC1 5242 # <CJK>
+BCC2 60B8 # <CJK>
+BCC3 6D4E # <CJK>
+BCC4 5BC4 # <CJK>
+BCC5 5BC2 # <CJK>
+BCC6 8BA1 # <CJK>
+BCC7 8BB0 # <CJK>
+BCC8 65E2 # <CJK>
+BCC9 5FCC # <CJK>
+BCCA 9645 # <CJK>
+BCCB 5993 # <CJK>
+BCCC 7EE7 # <CJK>
+BCCD 7EAA # <CJK>
+BCCE 5609 # <CJK>
+BCCF 67B7 # <CJK>
+BCD0 5939 # <CJK>
+BCD1 4F73 # <CJK>
+BCD2 5BB6 # <CJK>
+BCD3 52A0 # <CJK>
+BCD4 835A # <CJK>
+BCD5 988A # <CJK>
+BCD6 8D3E # <CJK>
+BCD7 7532 # <CJK>
+BCD8 94BE # <CJK>
+BCD9 5047 # <CJK>
+BCDA 7A3C # <CJK>
+BCDB 4EF7 # <CJK>
+BCDC 67B6 # <CJK>
+BCDD 9A7E # <CJK>
+BCDE 5AC1 # <CJK>
+BCDF 6B7C # <CJK>
+BCE0 76D1 # <CJK>
+BCE1 575A # <CJK>
+BCE2 5C16 # <CJK>
+BCE3 7B3A # <CJK>
+BCE4 95F4 # <CJK>
+BCE5 714E # <CJK>
+BCE6 517C # <CJK>
+BCE7 80A9 # <CJK>
+BCE8 8270 # <CJK>
+BCE9 5978 # <CJK>
+BCEA 7F04 # <CJK>
+BCEB 8327 # <CJK>
+BCEC 68C0 # <CJK>
+BCED 67EC # <CJK>
+BCEE 78B1 # <CJK>
+BCEF 7877 # <CJK>
+BCF0 62E3 # <CJK>
+BCF1 6361 # <CJK>
+BCF2 7B80 # <CJK>
+BCF3 4FED # <CJK>
+BCF4 526A # <CJK>
+BCF5 51CF # <CJK>
+BCF6 8350 # <CJK>
+BCF7 69DB # <CJK>
+BCF8 9274 # <CJK>
+BCF9 8DF5 # <CJK>
+BCFA 8D31 # <CJK>
+BCFB 89C1 # <CJK>
+BCFC 952E # <CJK>
+BCFD 7BAD # <CJK>
+BCFE 4EF6 # <CJK>
+BDA1 5065 # <CJK>
+BDA2 8230 # <CJK>
+BDA3 5251 # <CJK>
+BDA4 996F # <CJK>
+BDA5 6E10 # <CJK>
+BDA6 6E85 # <CJK>
+BDA7 6DA7 # <CJK>
+BDA8 5EFA # <CJK>
+BDA9 50F5 # <CJK>
+BDAA 59DC # <CJK>
+BDAB 5C06 # <CJK>
+BDAC 6D46 # <CJK>
+BDAD 6C5F # <CJK>
+BDAE 7586 # <CJK>
+BDAF 848B # <CJK>
+BDB0 6868 # <CJK>
+BDB1 5956 # <CJK>
+BDB2 8BB2 # <CJK>
+BDB3 5320 # <CJK>
+BDB4 9171 # <CJK>
+BDB5 964D # <CJK>
+BDB6 8549 # <CJK>
+BDB7 6912 # <CJK>
+BDB8 7901 # <CJK>
+BDB9 7126 # <CJK>
+BDBA 80F6 # <CJK>
+BDBB 4EA4 # <CJK>
+BDBC 90CA # <CJK>
+BDBD 6D47 # <CJK>
+BDBE 9A84 # <CJK>
+BDBF 5A07 # <CJK>
+BDC0 56BC # <CJK>
+BDC1 6405 # <CJK>
+BDC2 94F0 # <CJK>
+BDC3 77EB # <CJK>
+BDC4 4FA5 # <CJK>
+BDC5 811A # <CJK>
+BDC6 72E1 # <CJK>
+BDC7 89D2 # <CJK>
+BDC8 997A # <CJK>
+BDC9 7F34 # <CJK>
+BDCA 7EDE # <CJK>
+BDCB 527F # <CJK>
+BDCC 6559 # <CJK>
+BDCD 9175 # <CJK>
+BDCE 8F7F # <CJK>
+BDCF 8F83 # <CJK>
+BDD0 53EB # <CJK>
+BDD1 7A96 # <CJK>
+BDD2 63ED # <CJK>
+BDD3 63A5 # <CJK>
+BDD4 7686 # <CJK>
+BDD5 79F8 # <CJK>
+BDD6 8857 # <CJK>
+BDD7 9636 # <CJK>
+BDD8 622A # <CJK>
+BDD9 52AB # <CJK>
+BDDA 8282 # <CJK>
+BDDB 6854 # <CJK>
+BDDC 6770 # <CJK>
+BDDD 6377 # <CJK>
+BDDE 776B # <CJK>
+BDDF 7AED # <CJK>
+BDE0 6D01 # <CJK>
+BDE1 7ED3 # <CJK>
+BDE2 89E3 # <CJK>
+BDE3 59D0 # <CJK>
+BDE4 6212 # <CJK>
+BDE5 85C9 # <CJK>
+BDE6 82A5 # <CJK>
+BDE7 754C # <CJK>
+BDE8 501F # <CJK>
+BDE9 4ECB # <CJK>
+BDEA 75A5 # <CJK>
+BDEB 8BEB # <CJK>
+BDEC 5C4A # <CJK>
+BDED 5DFE # <CJK>
+BDEE 7B4B # <CJK>
+BDEF 65A4 # <CJK>
+BDF0 91D1 # <CJK>
+BDF1 4ECA # <CJK>
+BDF2 6D25 # <CJK>
+BDF3 895F # <CJK>
+BDF4 7D27 # <CJK>
+BDF5 9526 # <CJK>
+BDF6 4EC5 # <CJK>
+BDF7 8C28 # <CJK>
+BDF8 8FDB # <CJK>
+BDF9 9773 # <CJK>
+BDFA 664B # <CJK>
+BDFB 7981 # <CJK>
+BDFC 8FD1 # <CJK>
+BDFD 70EC # <CJK>
+BDFE 6D78 # <CJK>
+BEA1 5C3D # <CJK>
+BEA2 52B2 # <CJK>
+BEA3 8346 # <CJK>
+BEA4 5162 # <CJK>
+BEA5 830E # <CJK>
+BEA6 775B # <CJK>
+BEA7 6676 # <CJK>
+BEA8 9CB8 # <CJK>
+BEA9 4EAC # <CJK>
+BEAA 60CA # <CJK>
+BEAB 7CBE # <CJK>
+BEAC 7CB3 # <CJK>
+BEAD 7ECF # <CJK>
+BEAE 4E95 # <CJK>
+BEAF 8B66 # <CJK>
+BEB0 666F # <CJK>
+BEB1 9888 # <CJK>
+BEB2 9759 # <CJK>
+BEB3 5883 # <CJK>
+BEB4 656C # <CJK>
+BEB5 955C # <CJK>
+BEB6 5F84 # <CJK>
+BEB7 75C9 # <CJK>
+BEB8 9756 # <CJK>
+BEB9 7ADF # <CJK>
+BEBA 7ADE # <CJK>
+BEBB 51C0 # <CJK>
+BEBC 70AF # <CJK>
+BEBD 7A98 # <CJK>
+BEBE 63EA # <CJK>
+BEBF 7A76 # <CJK>
+BEC0 7EA0 # <CJK>
+BEC1 7396 # <CJK>
+BEC2 97ED # <CJK>
+BEC3 4E45 # <CJK>
+BEC4 7078 # <CJK>
+BEC5 4E5D # <CJK>
+BEC6 9152 # <CJK>
+BEC7 53A9 # <CJK>
+BEC8 6551 # <CJK>
+BEC9 65E7 # <CJK>
+BECA 81FC # <CJK>
+BECB 8205 # <CJK>
+BECC 548E # <CJK>
+BECD 5C31 # <CJK>
+BECE 759A # <CJK>
+BECF 97A0 # <CJK>
+BED0 62D8 # <CJK>
+BED1 72D9 # <CJK>
+BED2 75BD # <CJK>
+BED3 5C45 # <CJK>
+BED4 9A79 # <CJK>
+BED5 83CA # <CJK>
+BED6 5C40 # <CJK>
+BED7 5480 # <CJK>
+BED8 77E9 # <CJK>
+BED9 4E3E # <CJK>
+BEDA 6CAE # <CJK>
+BEDB 805A # <CJK>
+BEDC 62D2 # <CJK>
+BEDD 636E # <CJK>
+BEDE 5DE8 # <CJK>
+BEDF 5177 # <CJK>
+BEE0 8DDD # <CJK>
+BEE1 8E1E # <CJK>
+BEE2 952F # <CJK>
+BEE3 4FF1 # <CJK>
+BEE4 53E5 # <CJK>
+BEE5 60E7 # <CJK>
+BEE6 70AC # <CJK>
+BEE7 5267 # <CJK>
+BEE8 6350 # <CJK>
+BEE9 9E43 # <CJK>
+BEEA 5A1F # <CJK>
+BEEB 5026 # <CJK>
+BEEC 7737 # <CJK>
+BEED 5377 # <CJK>
+BEEE 7EE2 # <CJK>
+BEEF 6485 # <CJK>
+BEF0 652B # <CJK>
+BEF1 6289 # <CJK>
+BEF2 6398 # <CJK>
+BEF3 5014 # <CJK>
+BEF4 7235 # <CJK>
+BEF5 89C9 # <CJK>
+BEF6 51B3 # <CJK>
+BEF7 8BC0 # <CJK>
+BEF8 7EDD # <CJK>
+BEF9 5747 # <CJK>
+BEFA 83CC # <CJK>
+BEFB 94A7 # <CJK>
+BEFC 519B # <CJK>
+BEFD 541B # <CJK>
+BEFE 5CFB # <CJK>
+BFA1 4FCA # <CJK>
+BFA2 7AE3 # <CJK>
+BFA3 6D5A # <CJK>
+BFA4 90E1 # <CJK>
+BFA5 9A8F # <CJK>
+BFA6 5580 # <CJK>
+BFA7 5496 # <CJK>
+BFA8 5361 # <CJK>
+BFA9 54AF # <CJK>
+BFAA 5F00 # <CJK>
+BFAB 63E9 # <CJK>
+BFAC 6977 # <CJK>
+BFAD 51EF # <CJK>
+BFAE 6168 # <CJK>
+BFAF 520A # <CJK>
+BFB0 582A # <CJK>
+BFB1 52D8 # <CJK>
+BFB2 574E # <CJK>
+BFB3 780D # <CJK>
+BFB4 770B # <CJK>
+BFB5 5EB7 # <CJK>
+BFB6 6177 # <CJK>
+BFB7 7CE0 # <CJK>
+BFB8 625B # <CJK>
+BFB9 6297 # <CJK>
+BFBA 4EA2 # <CJK>
+BFBB 7095 # <CJK>
+BFBC 8003 # <CJK>
+BFBD 62F7 # <CJK>
+BFBE 70E4 # <CJK>
+BFBF 9760 # <CJK>
+BFC0 5777 # <CJK>
+BFC1 82DB # <CJK>
+BFC2 67EF # <CJK>
+BFC3 68F5 # <CJK>
+BFC4 78D5 # <CJK>
+BFC5 9897 # <CJK>
+BFC6 79D1 # <CJK>
+BFC7 58F3 # <CJK>
+BFC8 54B3 # <CJK>
+BFC9 53EF # <CJK>
+BFCA 6E34 # <CJK>
+BFCB 514B # <CJK>
+BFCC 523B # <CJK>
+BFCD 5BA2 # <CJK>
+BFCE 8BFE # <CJK>
+BFCF 80AF # <CJK>
+BFD0 5543 # <CJK>
+BFD1 57A6 # <CJK>
+BFD2 6073 # <CJK>
+BFD3 5751 # <CJK>
+BFD4 542D # <CJK>
+BFD5 7A7A # <CJK>
+BFD6 6050 # <CJK>
+BFD7 5B54 # <CJK>
+BFD8 63A7 # <CJK>
+BFD9 62A0 # <CJK>
+BFDA 53E3 # <CJK>
+BFDB 6263 # <CJK>
+BFDC 5BC7 # <CJK>
+BFDD 67AF # <CJK>
+BFDE 54ED # <CJK>
+BFDF 7A9F # <CJK>
+BFE0 82E6 # <CJK>
+BFE1 9177 # <CJK>
+BFE2 5E93 # <CJK>
+BFE3 88E4 # <CJK>
+BFE4 5938 # <CJK>
+BFE5 57AE # <CJK>
+BFE6 630E # <CJK>
+BFE7 8DE8 # <CJK>
+BFE8 80EF # <CJK>
+BFE9 5757 # <CJK>
+BFEA 7B77 # <CJK>
+BFEB 4FA9 # <CJK>
+BFEC 5FEB # <CJK>
+BFED 5BBD # <CJK>
+BFEE 6B3E # <CJK>
+BFEF 5321 # <CJK>
+BFF0 7B50 # <CJK>
+BFF1 72C2 # <CJK>
+BFF2 6846 # <CJK>
+BFF3 77FF # <CJK>
+BFF4 7736 # <CJK>
+BFF5 65F7 # <CJK>
+BFF6 51B5 # <CJK>
+BFF7 4E8F # <CJK>
+BFF8 76D4 # <CJK>
+BFF9 5CBF # <CJK>
+BFFA 7AA5 # <CJK>
+BFFB 8475 # <CJK>
+BFFC 594E # <CJK>
+BFFD 9B41 # <CJK>
+BFFE 5080 # <CJK>
+C0A1 9988 # <CJK>
+C0A2 6127 # <CJK>
+C0A3 6E83 # <CJK>
+C0A4 5764 # <CJK>
+C0A5 6606 # <CJK>
+C0A6 6346 # <CJK>
+C0A7 56F0 # <CJK>
+C0A8 62EC # <CJK>
+C0A9 6269 # <CJK>
+C0AA 5ED3 # <CJK>
+C0AB 9614 # <CJK>
+C0AC 5783 # <CJK>
+C0AD 62C9 # <CJK>
+C0AE 5587 # <CJK>
+C0AF 8721 # <CJK>
+C0B0 814A # <CJK>
+C0B1 8FA3 # <CJK>
+C0B2 5566 # <CJK>
+C0B3 83B1 # <CJK>
+C0B4 6765 # <CJK>
+C0B5 8D56 # <CJK>
+C0B6 84DD # <CJK>
+C0B7 5A6A # <CJK>
+C0B8 680F # <CJK>
+C0B9 62E6 # <CJK>
+C0BA 7BEE # <CJK>
+C0BB 9611 # <CJK>
+C0BC 5170 # <CJK>
+C0BD 6F9C # <CJK>
+C0BE 8C30 # <CJK>
+C0BF 63FD # <CJK>
+C0C0 89C8 # <CJK>
+C0C1 61D2 # <CJK>
+C0C2 7F06 # <CJK>
+C0C3 70C2 # <CJK>
+C0C4 6EE5 # <CJK>
+C0C5 7405 # <CJK>
+C0C6 6994 # <CJK>
+C0C7 72FC # <CJK>
+C0C8 5ECA # <CJK>
+C0C9 90CE # <CJK>
+C0CA 6717 # <CJK>
+C0CB 6D6A # <CJK>
+C0CC 635E # <CJK>
+C0CD 52B3 # <CJK>
+C0CE 7262 # <CJK>
+C0CF 8001 # <CJK>
+C0D0 4F6C # <CJK>
+C0D1 59E5 # <CJK>
+C0D2 916A # <CJK>
+C0D3 70D9 # <CJK>
+C0D4 6D9D # <CJK>
+C0D5 52D2 # <CJK>
+C0D6 4E50 # <CJK>
+C0D7 96F7 # <CJK>
+C0D8 956D # <CJK>
+C0D9 857E # <CJK>
+C0DA 78CA # <CJK>
+C0DB 7D2F # <CJK>
+C0DC 5121 # <CJK>
+C0DD 5792 # <CJK>
+C0DE 64C2 # <CJK>
+C0DF 808B # <CJK>
+C0E0 7C7B # <CJK>
+C0E1 6CEA # <CJK>
+C0E2 68F1 # <CJK>
+C0E3 695E # <CJK>
+C0E4 51B7 # <CJK>
+C0E5 5398 # <CJK>
+C0E6 68A8 # <CJK>
+C0E7 7281 # <CJK>
+C0E8 9ECE # <CJK>
+C0E9 7BF1 # <CJK>
+C0EA 72F8 # <CJK>
+C0EB 79BB # <CJK>
+C0EC 6F13 # <CJK>
+C0ED 7406 # <CJK>
+C0EE 674E # <CJK>
+C0EF 91CC # <CJK>
+C0F0 9CA4 # <CJK>
+C0F1 793C # <CJK>
+C0F2 8389 # <CJK>
+C0F3 8354 # <CJK>
+C0F4 540F # <CJK>
+C0F5 6817 # <CJK>
+C0F6 4E3D # <CJK>
+C0F7 5389 # <CJK>
+C0F8 52B1 # <CJK>
+C0F9 783E # <CJK>
+C0FA 5386 # <CJK>
+C0FB 5229 # <CJK>
+C0FC 5088 # <CJK>
+C0FD 4F8B # <CJK>
+C0FE 4FD0 # <CJK>
+C1A1 75E2 # <CJK>
+C1A2 7ACB # <CJK>
+C1A3 7C92 # <CJK>
+C1A4 6CA5 # <CJK>
+C1A5 96B6 # <CJK>
+C1A6 529B # <CJK>
+C1A7 7483 # <CJK>
+C1A8 54E9 # <CJK>
+C1A9 4FE9 # <CJK>
+C1AA 8054 # <CJK>
+C1AB 83B2 # <CJK>
+C1AC 8FDE # <CJK>
+C1AD 9570 # <CJK>
+C1AE 5EC9 # <CJK>
+C1AF 601C # <CJK>
+C1B0 6D9F # <CJK>
+C1B1 5E18 # <CJK>
+C1B2 655B # <CJK>
+C1B3 8138 # <CJK>
+C1B4 94FE # <CJK>
+C1B5 604B # <CJK>
+C1B6 70BC # <CJK>
+C1B7 7EC3 # <CJK>
+C1B8 7CAE # <CJK>
+C1B9 51C9 # <CJK>
+C1BA 6881 # <CJK>
+C1BB 7CB1 # <CJK>
+C1BC 826F # <CJK>
+C1BD 4E24 # <CJK>
+C1BE 8F86 # <CJK>
+C1BF 91CF # <CJK>
+C1C0 667E # <CJK>
+C1C1 4EAE # <CJK>
+C1C2 8C05 # <CJK>
+C1C3 64A9 # <CJK>
+C1C4 804A # <CJK>
+C1C5 50DA # <CJK>
+C1C6 7597 # <CJK>
+C1C7 71CE # <CJK>
+C1C8 5BE5 # <CJK>
+C1C9 8FBD # <CJK>
+C1CA 6F66 # <CJK>
+C1CB 4E86 # <CJK>
+C1CC 6482 # <CJK>
+C1CD 9563 # <CJK>
+C1CE 5ED6 # <CJK>
+C1CF 6599 # <CJK>
+C1D0 5217 # <CJK>
+C1D1 88C2 # <CJK>
+C1D2 70C8 # <CJK>
+C1D3 52A3 # <CJK>
+C1D4 730E # <CJK>
+C1D5 7433 # <CJK>
+C1D6 6797 # <CJK>
+C1D7 78F7 # <CJK>
+C1D8 9716 # <CJK>
+C1D9 4E34 # <CJK>
+C1DA 90BB # <CJK>
+C1DB 9CDE # <CJK>
+C1DC 6DCB # <CJK>
+C1DD 51DB # <CJK>
+C1DE 8D41 # <CJK>
+C1DF 541D # <CJK>
+C1E0 62CE # <CJK>
+C1E1 73B2 # <CJK>
+C1E2 83F1 # <CJK>
+C1E3 96F6 # <CJK>
+C1E4 9F84 # <CJK>
+C1E5 94C3 # <CJK>
+C1E6 4F36 # <CJK>
+C1E7 7F9A # <CJK>
+C1E8 51CC # <CJK>
+C1E9 7075 # <CJK>
+C1EA 9675 # <CJK>
+C1EB 5CAD # <CJK>
+C1EC 9886 # <CJK>
+C1ED 53E6 # <CJK>
+C1EE 4EE4 # <CJK>
+C1EF 6E9C # <CJK>
+C1F0 7409 # <CJK>
+C1F1 69B4 # <CJK>
+C1F2 786B # <CJK>
+C1F3 998F # <CJK>
+C1F4 7559 # <CJK>
+C1F5 5218 # <CJK>
+C1F6 7624 # <CJK>
+C1F7 6D41 # <CJK>
+C1F8 67F3 # <CJK>
+C1F9 516D # <CJK>
+C1FA 9F99 # <CJK>
+C1FB 804B # <CJK>
+C1FC 5499 # <CJK>
+C1FD 7B3C # <CJK>
+C1FE 7ABF # <CJK>
+C2A1 9686 # <CJK>
+C2A2 5784 # <CJK>
+C2A3 62E2 # <CJK>
+C2A4 9647 # <CJK>
+C2A5 697C # <CJK>
+C2A6 5A04 # <CJK>
+C2A7 6402 # <CJK>
+C2A8 7BD3 # <CJK>
+C2A9 6F0F # <CJK>
+C2AA 964B # <CJK>
+C2AB 82A6 # <CJK>
+C2AC 5362 # <CJK>
+C2AD 9885 # <CJK>
+C2AE 5E90 # <CJK>
+C2AF 7089 # <CJK>
+C2B0 63B3 # <CJK>
+C2B1 5364 # <CJK>
+C2B2 864F # <CJK>
+C2B3 9C81 # <CJK>
+C2B4 9E93 # <CJK>
+C2B5 788C # <CJK>
+C2B6 9732 # <CJK>
+C2B7 8DEF # <CJK>
+C2B8 8D42 # <CJK>
+C2B9 9E7F # <CJK>
+C2BA 6F5E # <CJK>
+C2BB 7984 # <CJK>
+C2BC 5F55 # <CJK>
+C2BD 9646 # <CJK>
+C2BE 622E # <CJK>
+C2BF 9A74 # <CJK>
+C2C0 5415 # <CJK>
+C2C1 94DD # <CJK>
+C2C2 4FA3 # <CJK>
+C2C3 65C5 # <CJK>
+C2C4 5C65 # <CJK>
+C2C5 5C61 # <CJK>
+C2C6 7F15 # <CJK>
+C2C7 8651 # <CJK>
+C2C8 6C2F # <CJK>
+C2C9 5F8B # <CJK>
+C2CA 7387 # <CJK>
+C2CB 6EE4 # <CJK>
+C2CC 7EFF # <CJK>
+C2CD 5CE6 # <CJK>
+C2CE 631B # <CJK>
+C2CF 5B6A # <CJK>
+C2D0 6EE6 # <CJK>
+C2D1 5375 # <CJK>
+C2D2 4E71 # <CJK>
+C2D3 63A0 # <CJK>
+C2D4 7565 # <CJK>
+C2D5 62A1 # <CJK>
+C2D6 8F6E # <CJK>
+C2D7 4F26 # <CJK>
+C2D8 4ED1 # <CJK>
+C2D9 6CA6 # <CJK>
+C2DA 7EB6 # <CJK>
+C2DB 8BBA # <CJK>
+C2DC 841D # <CJK>
+C2DD 87BA # <CJK>
+C2DE 7F57 # <CJK>
+C2DF 903B # <CJK>
+C2E0 9523 # <CJK>
+C2E1 7BA9 # <CJK>
+C2E2 9AA1 # <CJK>
+C2E3 88F8 # <CJK>
+C2E4 843D # <CJK>
+C2E5 6D1B # <CJK>
+C2E6 9A86 # <CJK>
+C2E7 7EDC # <CJK>
+C2E8 5988 # <CJK>
+C2E9 9EBB # <CJK>
+C2EA 739B # <CJK>
+C2EB 7801 # <CJK>
+C2EC 8682 # <CJK>
+C2ED 9A6C # <CJK>
+C2EE 9A82 # <CJK>
+C2EF 561B # <CJK>
+C2F0 5417 # <CJK>
+C2F1 57CB # <CJK>
+C2F2 4E70 # <CJK>
+C2F3 9EA6 # <CJK>
+C2F4 5356 # <CJK>
+C2F5 8FC8 # <CJK>
+C2F6 8109 # <CJK>
+C2F7 7792 # <CJK>
+C2F8 9992 # <CJK>
+C2F9 86EE # <CJK>
+C2FA 6EE1 # <CJK>
+C2FB 8513 # <CJK>
+C2FC 66FC # <CJK>
+C2FD 6162 # <CJK>
+C2FE 6F2B # <CJK>
+C3A1 8C29 # <CJK>
+C3A2 8292 # <CJK>
+C3A3 832B # <CJK>
+C3A4 76F2 # <CJK>
+C3A5 6C13 # <CJK>
+C3A6 5FD9 # <CJK>
+C3A7 83BD # <CJK>
+C3A8 732B # <CJK>
+C3A9 8305 # <CJK>
+C3AA 951A # <CJK>
+C3AB 6BDB # <CJK>
+C3AC 77DB # <CJK>
+C3AD 94C6 # <CJK>
+C3AE 536F # <CJK>
+C3AF 8302 # <CJK>
+C3B0 5192 # <CJK>
+C3B1 5E3D # <CJK>
+C3B2 8C8C # <CJK>
+C3B3 8D38 # <CJK>
+C3B4 4E48 # <CJK>
+C3B5 73AB # <CJK>
+C3B6 679A # <CJK>
+C3B7 6885 # <CJK>
+C3B8 9176 # <CJK>
+C3B9 9709 # <CJK>
+C3BA 7164 # <CJK>
+C3BB 6CA1 # <CJK>
+C3BC 7709 # <CJK>
+C3BD 5A92 # <CJK>
+C3BE 9541 # <CJK>
+C3BF 6BCF # <CJK>
+C3C0 7F8E # <CJK>
+C3C1 6627 # <CJK>
+C3C2 5BD0 # <CJK>
+C3C3 59B9 # <CJK>
+C3C4 5A9A # <CJK>
+C3C5 95E8 # <CJK>
+C3C6 95F7 # <CJK>
+C3C7 4EEC # <CJK>
+C3C8 840C # <CJK>
+C3C9 8499 # <CJK>
+C3CA 6AAC # <CJK>
+C3CB 76DF # <CJK>
+C3CC 9530 # <CJK>
+C3CD 731B # <CJK>
+C3CE 68A6 # <CJK>
+C3CF 5B5F # <CJK>
+C3D0 772F # <CJK>
+C3D1 919A # <CJK>
+C3D2 9761 # <CJK>
+C3D3 7CDC # <CJK>
+C3D4 8FF7 # <CJK>
+C3D5 8C1C # <CJK>
+C3D6 5F25 # <CJK>
+C3D7 7C73 # <CJK>
+C3D8 79D8 # <CJK>
+C3D9 89C5 # <CJK>
+C3DA 6CCC # <CJK>
+C3DB 871C # <CJK>
+C3DC 5BC6 # <CJK>
+C3DD 5E42 # <CJK>
+C3DE 68C9 # <CJK>
+C3DF 7720 # <CJK>
+C3E0 7EF5 # <CJK>
+C3E1 5195 # <CJK>
+C3E2 514D # <CJK>
+C3E3 52C9 # <CJK>
+C3E4 5A29 # <CJK>
+C3E5 7F05 # <CJK>
+C3E6 9762 # <CJK>
+C3E7 82D7 # <CJK>
+C3E8 63CF # <CJK>
+C3E9 7784 # <CJK>
+C3EA 85D0 # <CJK>
+C3EB 79D2 # <CJK>
+C3EC 6E3A # <CJK>
+C3ED 5E99 # <CJK>
+C3EE 5999 # <CJK>
+C3EF 8511 # <CJK>
+C3F0 706D # <CJK>
+C3F1 6C11 # <CJK>
+C3F2 62BF # <CJK>
+C3F3 76BF # <CJK>
+C3F4 654F # <CJK>
+C3F5 60AF # <CJK>
+C3F6 95FD # <CJK>
+C3F7 660E # <CJK>
+C3F8 879F # <CJK>
+C3F9 9E23 # <CJK>
+C3FA 94ED # <CJK>
+C3FB 540D # <CJK>
+C3FC 547D # <CJK>
+C3FD 8C2C # <CJK>
+C3FE 6478 # <CJK>
+C4A1 6479 # <CJK>
+C4A2 8611 # <CJK>
+C4A3 6A21 # <CJK>
+C4A4 819C # <CJK>
+C4A5 78E8 # <CJK>
+C4A6 6469 # <CJK>
+C4A7 9B54 # <CJK>
+C4A8 62B9 # <CJK>
+C4A9 672B # <CJK>
+C4AA 83AB # <CJK>
+C4AB 58A8 # <CJK>
+C4AC 9ED8 # <CJK>
+C4AD 6CAB # <CJK>
+C4AE 6F20 # <CJK>
+C4AF 5BDE # <CJK>
+C4B0 964C # <CJK>
+C4B1 8C0B # <CJK>
+C4B2 725F # <CJK>
+C4B3 67D0 # <CJK>
+C4B4 62C7 # <CJK>
+C4B5 7261 # <CJK>
+C4B6 4EA9 # <CJK>
+C4B7 59C6 # <CJK>
+C4B8 6BCD # <CJK>
+C4B9 5893 # <CJK>
+C4BA 66AE # <CJK>
+C4BB 5E55 # <CJK>
+C4BC 52DF # <CJK>
+C4BD 6155 # <CJK>
+C4BE 6728 # <CJK>
+C4BF 76EE # <CJK>
+C4C0 7766 # <CJK>
+C4C1 7267 # <CJK>
+C4C2 7A46 # <CJK>
+C4C3 62FF # <CJK>
+C4C4 54EA # <CJK>
+C4C5 5450 # <CJK>
+C4C6 94A0 # <CJK>
+C4C7 90A3 # <CJK>
+C4C8 5A1C # <CJK>
+C4C9 7EB3 # <CJK>
+C4CA 6C16 # <CJK>
+C4CB 4E43 # <CJK>
+C4CC 5976 # <CJK>
+C4CD 8010 # <CJK>
+C4CE 5948 # <CJK>
+C4CF 5357 # <CJK>
+C4D0 7537 # <CJK>
+C4D1 96BE # <CJK>
+C4D2 56CA # <CJK>
+C4D3 6320 # <CJK>
+C4D4 8111 # <CJK>
+C4D5 607C # <CJK>
+C4D6 95F9 # <CJK>
+C4D7 6DD6 # <CJK>
+C4D8 5462 # <CJK>
+C4D9 9981 # <CJK>
+C4DA 5185 # <CJK>
+C4DB 5AE9 # <CJK>
+C4DC 80FD # <CJK>
+C4DD 59AE # <CJK>
+C4DE 9713 # <CJK>
+C4DF 502A # <CJK>
+C4E0 6CE5 # <CJK>
+C4E1 5C3C # <CJK>
+C4E2 62DF # <CJK>
+C4E3 4F60 # <CJK>
+C4E4 533F # <CJK>
+C4E5 817B # <CJK>
+C4E6 9006 # <CJK>
+C4E7 6EBA # <CJK>
+C4E8 852B # <CJK>
+C4E9 62C8 # <CJK>
+C4EA 5E74 # <CJK>
+C4EB 78BE # <CJK>
+C4EC 64B5 # <CJK>
+C4ED 637B # <CJK>
+C4EE 5FF5 # <CJK>
+C4EF 5A18 # <CJK>
+C4F0 917F # <CJK>
+C4F1 9E1F # <CJK>
+C4F2 5C3F # <CJK>
+C4F3 634F # <CJK>
+C4F4 8042 # <CJK>
+C4F5 5B7D # <CJK>
+C4F6 556E # <CJK>
+C4F7 954A # <CJK>
+C4F8 954D # <CJK>
+C4F9 6D85 # <CJK>
+C4FA 60A8 # <CJK>
+C4FB 67E0 # <CJK>
+C4FC 72DE # <CJK>
+C4FD 51DD # <CJK>
+C4FE 5B81 # <CJK>
+C5A1 62E7 # <CJK>
+C5A2 6CDE # <CJK>
+C5A3 725B # <CJK>
+C5A4 626D # <CJK>
+C5A5 94AE # <CJK>
+C5A6 7EBD # <CJK>
+C5A7 8113 # <CJK>
+C5A8 6D53 # <CJK>
+C5A9 519C # <CJK>
+C5AA 5F04 # <CJK>
+C5AB 5974 # <CJK>
+C5AC 52AA # <CJK>
+C5AD 6012 # <CJK>
+C5AE 5973 # <CJK>
+C5AF 6696 # <CJK>
+C5B0 8650 # <CJK>
+C5B1 759F # <CJK>
+C5B2 632A # <CJK>
+C5B3 61E6 # <CJK>
+C5B4 7CEF # <CJK>
+C5B5 8BFA # <CJK>
+C5B6 54E6 # <CJK>
+C5B7 6B27 # <CJK>
+C5B8 9E25 # <CJK>
+C5B9 6BB4 # <CJK>
+C5BA 85D5 # <CJK>
+C5BB 5455 # <CJK>
+C5BC 5076 # <CJK>
+C5BD 6CA4 # <CJK>
+C5BE 556A # <CJK>
+C5BF 8DB4 # <CJK>
+C5C0 722C # <CJK>
+C5C1 5E15 # <CJK>
+C5C2 6015 # <CJK>
+C5C3 7436 # <CJK>
+C5C4 62CD # <CJK>
+C5C5 6392 # <CJK>
+C5C6 724C # <CJK>
+C5C7 5F98 # <CJK>
+C5C8 6E43 # <CJK>
+C5C9 6D3E # <CJK>
+C5CA 6500 # <CJK>
+C5CB 6F58 # <CJK>
+C5CC 76D8 # <CJK>
+C5CD 78D0 # <CJK>
+C5CE 76FC # <CJK>
+C5CF 7554 # <CJK>
+C5D0 5224 # <CJK>
+C5D1 53DB # <CJK>
+C5D2 4E53 # <CJK>
+C5D3 5E9E # <CJK>
+C5D4 65C1 # <CJK>
+C5D5 802A # <CJK>
+C5D6 80D6 # <CJK>
+C5D7 629B # <CJK>
+C5D8 5486 # <CJK>
+C5D9 5228 # <CJK>
+C5DA 70AE # <CJK>
+C5DB 888D # <CJK>
+C5DC 8DD1 # <CJK>
+C5DD 6CE1 # <CJK>
+C5DE 5478 # <CJK>
+C5DF 80DA # <CJK>
+C5E0 57F9 # <CJK>
+C5E1 88F4 # <CJK>
+C5E2 8D54 # <CJK>
+C5E3 966A # <CJK>
+C5E4 914D # <CJK>
+C5E5 4F69 # <CJK>
+C5E6 6C9B # <CJK>
+C5E7 55B7 # <CJK>
+C5E8 76C6 # <CJK>
+C5E9 7830 # <CJK>
+C5EA 62A8 # <CJK>
+C5EB 70F9 # <CJK>
+C5EC 6F8E # <CJK>
+C5ED 5F6D # <CJK>
+C5EE 84EC # <CJK>
+C5EF 68DA # <CJK>
+C5F0 787C # <CJK>
+C5F1 7BF7 # <CJK>
+C5F2 81A8 # <CJK>
+C5F3 670B # <CJK>
+C5F4 9E4F # <CJK>
+C5F5 6367 # <CJK>
+C5F6 78B0 # <CJK>
+C5F7 576F # <CJK>
+C5F8 7812 # <CJK>
+C5F9 9739 # <CJK>
+C5FA 6279 # <CJK>
+C5FB 62AB # <CJK>
+C5FC 5288 # <CJK>
+C5FD 7435 # <CJK>
+C5FE 6BD7 # <CJK>
+C6A1 5564 # <CJK>
+C6A2 813E # <CJK>
+C6A3 75B2 # <CJK>
+C6A4 76AE # <CJK>
+C6A5 5339 # <CJK>
+C6A6 75DE # <CJK>
+C6A7 50FB # <CJK>
+C6A8 5C41 # <CJK>
+C6A9 8B6C # <CJK>
+C6AA 7BC7 # <CJK>
+C6AB 504F # <CJK>
+C6AC 7247 # <CJK>
+C6AD 9A97 # <CJK>
+C6AE 98D8 # <CJK>
+C6AF 6F02 # <CJK>
+C6B0 74E2 # <CJK>
+C6B1 7968 # <CJK>
+C6B2 6487 # <CJK>
+C6B3 77A5 # <CJK>
+C6B4 62FC # <CJK>
+C6B5 9891 # <CJK>
+C6B6 8D2B # <CJK>
+C6B7 54C1 # <CJK>
+C6B8 8058 # <CJK>
+C6B9 4E52 # <CJK>
+C6BA 576A # <CJK>
+C6BB 82F9 # <CJK>
+C6BC 840D # <CJK>
+C6BD 5E73 # <CJK>
+C6BE 51ED # <CJK>
+C6BF 74F6 # <CJK>
+C6C0 8BC4 # <CJK>
+C6C1 5C4F # <CJK>
+C6C2 5761 # <CJK>
+C6C3 6CFC # <CJK>
+C6C4 9887 # <CJK>
+C6C5 5A46 # <CJK>
+C6C6 7834 # <CJK>
+C6C7 9B44 # <CJK>
+C6C8 8FEB # <CJK>
+C6C9 7C95 # <CJK>
+C6CA 5256 # <CJK>
+C6CB 6251 # <CJK>
+C6CC 94FA # <CJK>
+C6CD 4EC6 # <CJK>
+C6CE 8386 # <CJK>
+C6CF 8461 # <CJK>
+C6D0 83E9 # <CJK>
+C6D1 84B2 # <CJK>
+C6D2 57D4 # <CJK>
+C6D3 6734 # <CJK>
+C6D4 5703 # <CJK>
+C6D5 666E # <CJK>
+C6D6 6D66 # <CJK>
+C6D7 8C31 # <CJK>
+C6D8 66DD # <CJK>
+C6D9 7011 # <CJK>
+C6DA 671F # <CJK>
+C6DB 6B3A # <CJK>
+C6DC 6816 # <CJK>
+C6DD 621A # <CJK>
+C6DE 59BB # <CJK>
+C6DF 4E03 # <CJK>
+C6E0 51C4 # <CJK>
+C6E1 6F06 # <CJK>
+C6E2 67D2 # <CJK>
+C6E3 6C8F # <CJK>
+C6E4 5176 # <CJK>
+C6E5 68CB # <CJK>
+C6E6 5947 # <CJK>
+C6E7 6B67 # <CJK>
+C6E8 7566 # <CJK>
+C6E9 5D0E # <CJK>
+C6EA 8110 # <CJK>
+C6EB 9F50 # <CJK>
+C6EC 65D7 # <CJK>
+C6ED 7948 # <CJK>
+C6EE 7941 # <CJK>
+C6EF 9A91 # <CJK>
+C6F0 8D77 # <CJK>
+C6F1 5C82 # <CJK>
+C6F2 4E5E # <CJK>
+C6F3 4F01 # <CJK>
+C6F4 542F # <CJK>
+C6F5 5951 # <CJK>
+C6F6 780C # <CJK>
+C6F7 5668 # <CJK>
+C6F8 6C14 # <CJK>
+C6F9 8FC4 # <CJK>
+C6FA 5F03 # <CJK>
+C6FB 6C7D # <CJK>
+C6FC 6CE3 # <CJK>
+C6FD 8BAB # <CJK>
+C6FE 6390 # <CJK>
+C7A1 6070 # <CJK>
+C7A2 6D3D # <CJK>
+C7A3 7275 # <CJK>
+C7A4 6266 # <CJK>
+C7A5 948E # <CJK>
+C7A6 94C5 # <CJK>
+C7A7 5343 # <CJK>
+C7A8 8FC1 # <CJK>
+C7A9 7B7E # <CJK>
+C7AA 4EDF # <CJK>
+C7AB 8C26 # <CJK>
+C7AC 4E7E # <CJK>
+C7AD 9ED4 # <CJK>
+C7AE 94B1 # <CJK>
+C7AF 94B3 # <CJK>
+C7B0 524D # <CJK>
+C7B1 6F5C # <CJK>
+C7B2 9063 # <CJK>
+C7B3 6D45 # <CJK>
+C7B4 8C34 # <CJK>
+C7B5 5811 # <CJK>
+C7B6 5D4C # <CJK>
+C7B7 6B20 # <CJK>
+C7B8 6B49 # <CJK>
+C7B9 67AA # <CJK>
+C7BA 545B # <CJK>
+C7BB 8154 # <CJK>
+C7BC 7F8C # <CJK>
+C7BD 5899 # <CJK>
+C7BE 8537 # <CJK>
+C7BF 5F3A # <CJK>
+C7C0 62A2 # <CJK>
+C7C1 6A47 # <CJK>
+C7C2 9539 # <CJK>
+C7C3 6572 # <CJK>
+C7C4 6084 # <CJK>
+C7C5 6865 # <CJK>
+C7C6 77A7 # <CJK>
+C7C7 4E54 # <CJK>
+C7C8 4FA8 # <CJK>
+C7C9 5DE7 # <CJK>
+C7CA 9798 # <CJK>
+C7CB 64AC # <CJK>
+C7CC 7FD8 # <CJK>
+C7CD 5CED # <CJK>
+C7CE 4FCF # <CJK>
+C7CF 7A8D # <CJK>
+C7D0 5207 # <CJK>
+C7D1 8304 # <CJK>
+C7D2 4E14 # <CJK>
+C7D3 602F # <CJK>
+C7D4 7A83 # <CJK>
+C7D5 94A6 # <CJK>
+C7D6 4FB5 # <CJK>
+C7D7 4EB2 # <CJK>
+C7D8 79E6 # <CJK>
+C7D9 7434 # <CJK>
+C7DA 52E4 # <CJK>
+C7DB 82B9 # <CJK>
+C7DC 64D2 # <CJK>
+C7DD 79BD # <CJK>
+C7DE 5BDD # <CJK>
+C7DF 6C81 # <CJK>
+C7E0 9752 # <CJK>
+C7E1 8F7B # <CJK>
+C7E2 6C22 # <CJK>
+C7E3 503E # <CJK>
+C7E4 537F # <CJK>
+C7E5 6E05 # <CJK>
+C7E6 64CE # <CJK>
+C7E7 6674 # <CJK>
+C7E8 6C30 # <CJK>
+C7E9 60C5 # <CJK>
+C7EA 9877 # <CJK>
+C7EB 8BF7 # <CJK>
+C7EC 5E86 # <CJK>
+C7ED 743C # <CJK>
+C7EE 7A77 # <CJK>
+C7EF 79CB # <CJK>
+C7F0 4E18 # <CJK>
+C7F1 90B1 # <CJK>
+C7F2 7403 # <CJK>
+C7F3 6C42 # <CJK>
+C7F4 56DA # <CJK>
+C7F5 914B # <CJK>
+C7F6 6CC5 # <CJK>
+C7F7 8D8B # <CJK>
+C7F8 533A # <CJK>
+C7F9 86C6 # <CJK>
+C7FA 66F2 # <CJK>
+C7FB 8EAF # <CJK>
+C7FC 5C48 # <CJK>
+C7FD 9A71 # <CJK>
+C7FE 6E20 # <CJK>
+C8A1 53D6 # <CJK>
+C8A2 5A36 # <CJK>
+C8A3 9F8B # <CJK>
+C8A4 8DA3 # <CJK>
+C8A5 53BB # <CJK>
+C8A6 5708 # <CJK>
+C8A7 98A7 # <CJK>
+C8A8 6743 # <CJK>
+C8A9 919B # <CJK>
+C8AA 6CC9 # <CJK>
+C8AB 5168 # <CJK>
+C8AC 75CA # <CJK>
+C8AD 62F3 # <CJK>
+C8AE 72AC # <CJK>
+C8AF 5238 # <CJK>
+C8B0 529D # <CJK>
+C8B1 7F3A # <CJK>
+C8B2 7094 # <CJK>
+C8B3 7638 # <CJK>
+C8B4 5374 # <CJK>
+C8B5 9E4A # <CJK>
+C8B6 69B7 # <CJK>
+C8B7 786E # <CJK>
+C8B8 96C0 # <CJK>
+C8B9 88D9 # <CJK>
+C8BA 7FA4 # <CJK>
+C8BB 7136 # <CJK>
+C8BC 71C3 # <CJK>
+C8BD 5189 # <CJK>
+C8BE 67D3 # <CJK>
+C8BF 74E4 # <CJK>
+C8C0 58E4 # <CJK>
+C8C1 6518 # <CJK>
+C8C2 56B7 # <CJK>
+C8C3 8BA9 # <CJK>
+C8C4 9976 # <CJK>
+C8C5 6270 # <CJK>
+C8C6 7ED5 # <CJK>
+C8C7 60F9 # <CJK>
+C8C8 70ED # <CJK>
+C8C9 58EC # <CJK>
+C8CA 4EC1 # <CJK>
+C8CB 4EBA # <CJK>
+C8CC 5FCD # <CJK>
+C8CD 97E7 # <CJK>
+C8CE 4EFB # <CJK>
+C8CF 8BA4 # <CJK>
+C8D0 5203 # <CJK>
+C8D1 598A # <CJK>
+C8D2 7EAB # <CJK>
+C8D3 6254 # <CJK>
+C8D4 4ECD # <CJK>
+C8D5 65E5 # <CJK>
+C8D6 620E # <CJK>
+C8D7 8338 # <CJK>
+C8D8 84C9 # <CJK>
+C8D9 8363 # <CJK>
+C8DA 878D # <CJK>
+C8DB 7194 # <CJK>
+C8DC 6EB6 # <CJK>
+C8DD 5BB9 # <CJK>
+C8DE 7ED2 # <CJK>
+C8DF 5197 # <CJK>
+C8E0 63C9 # <CJK>
+C8E1 67D4 # <CJK>
+C8E2 8089 # <CJK>
+C8E3 8339 # <CJK>
+C8E4 8815 # <CJK>
+C8E5 5112 # <CJK>
+C8E6 5B7A # <CJK>
+C8E7 5982 # <CJK>
+C8E8 8FB1 # <CJK>
+C8E9 4E73 # <CJK>
+C8EA 6C5D # <CJK>
+C8EB 5165 # <CJK>
+C8EC 8925 # <CJK>
+C8ED 8F6F # <CJK>
+C8EE 962E # <CJK>
+C8EF 854A # <CJK>
+C8F0 745E # <CJK>
+C8F1 9510 # <CJK>
+C8F2 95F0 # <CJK>
+C8F3 6DA6 # <CJK>
+C8F4 82E5 # <CJK>
+C8F5 5F31 # <CJK>
+C8F6 6492 # <CJK>
+C8F7 6D12 # <CJK>
+C8F8 8428 # <CJK>
+C8F9 816E # <CJK>
+C8FA 9CC3 # <CJK>
+C8FB 585E # <CJK>
+C8FC 8D5B # <CJK>
+C8FD 4E09 # <CJK>
+C8FE 53C1 # <CJK>
+C9A1 4F1E # <CJK>
+C9A2 6563 # <CJK>
+C9A3 6851 # <CJK>
+C9A4 55D3 # <CJK>
+C9A5 4E27 # <CJK>
+C9A6 6414 # <CJK>
+C9A7 9A9A # <CJK>
+C9A8 626B # <CJK>
+C9A9 5AC2 # <CJK>
+C9AA 745F # <CJK>
+C9AB 8272 # <CJK>
+C9AC 6DA9 # <CJK>
+C9AD 68EE # <CJK>
+C9AE 50E7 # <CJK>
+C9AF 838E # <CJK>
+C9B0 7802 # <CJK>
+C9B1 6740 # <CJK>
+C9B2 5239 # <CJK>
+C9B3 6C99 # <CJK>
+C9B4 7EB1 # <CJK>
+C9B5 50BB # <CJK>
+C9B6 5565 # <CJK>
+C9B7 715E # <CJK>
+C9B8 7B5B # <CJK>
+C9B9 6652 # <CJK>
+C9BA 73CA # <CJK>
+C9BB 82EB # <CJK>
+C9BC 6749 # <CJK>
+C9BD 5C71 # <CJK>
+C9BE 5220 # <CJK>
+C9BF 717D # <CJK>
+C9C0 886B # <CJK>
+C9C1 95EA # <CJK>
+C9C2 9655 # <CJK>
+C9C3 64C5 # <CJK>
+C9C4 8D61 # <CJK>
+C9C5 81B3 # <CJK>
+C9C6 5584 # <CJK>
+C9C7 6C55 # <CJK>
+C9C8 6247 # <CJK>
+C9C9 7F2E # <CJK>
+C9CA 5892 # <CJK>
+C9CB 4F24 # <CJK>
+C9CC 5546 # <CJK>
+C9CD 8D4F # <CJK>
+C9CE 664C # <CJK>
+C9CF 4E0A # <CJK>
+C9D0 5C1A # <CJK>
+C9D1 88F3 # <CJK>
+C9D2 68A2 # <CJK>
+C9D3 634E # <CJK>
+C9D4 7A0D # <CJK>
+C9D5 70E7 # <CJK>
+C9D6 828D # <CJK>
+C9D7 52FA # <CJK>
+C9D8 97F6 # <CJK>
+C9D9 5C11 # <CJK>
+C9DA 54E8 # <CJK>
+C9DB 90B5 # <CJK>
+C9DC 7ECD # <CJK>
+C9DD 5962 # <CJK>
+C9DE 8D4A # <CJK>
+C9DF 86C7 # <CJK>
+C9E0 820C # <CJK>
+C9E1 820D # <CJK>
+C9E2 8D66 # <CJK>
+C9E3 6444 # <CJK>
+C9E4 5C04 # <CJK>
+C9E5 6151 # <CJK>
+C9E6 6D89 # <CJK>
+C9E7 793E # <CJK>
+C9E8 8BBE # <CJK>
+C9E9 7837 # <CJK>
+C9EA 7533 # <CJK>
+C9EB 547B # <CJK>
+C9EC 4F38 # <CJK>
+C9ED 8EAB # <CJK>
+C9EE 6DF1 # <CJK>
+C9EF 5A20 # <CJK>
+C9F0 7EC5 # <CJK>
+C9F1 795E # <CJK>
+C9F2 6C88 # <CJK>
+C9F3 5BA1 # <CJK>
+C9F4 5A76 # <CJK>
+C9F5 751A # <CJK>
+C9F6 80BE # <CJK>
+C9F7 614E # <CJK>
+C9F8 6E17 # <CJK>
+C9F9 58F0 # <CJK>
+C9FA 751F # <CJK>
+C9FB 7525 # <CJK>
+C9FC 7272 # <CJK>
+C9FD 5347 # <CJK>
+C9FE 7EF3 # <CJK>
+CAA1 7701 # <CJK>
+CAA2 76DB # <CJK>
+CAA3 5269 # <CJK>
+CAA4 80DC # <CJK>
+CAA5 5723 # <CJK>
+CAA6 5E08 # <CJK>
+CAA7 5931 # <CJK>
+CAA8 72EE # <CJK>
+CAA9 65BD # <CJK>
+CAAA 6E7F # <CJK>
+CAAB 8BD7 # <CJK>
+CAAC 5C38 # <CJK>
+CAAD 8671 # <CJK>
+CAAE 5341 # <CJK>
+CAAF 77F3 # <CJK>
+CAB0 62FE # <CJK>
+CAB1 65F6 # <CJK>
+CAB2 4EC0 # <CJK>
+CAB3 98DF # <CJK>
+CAB4 8680 # <CJK>
+CAB5 5B9E # <CJK>
+CAB6 8BC6 # <CJK>
+CAB7 53F2 # <CJK>
+CAB8 77E2 # <CJK>
+CAB9 4F7F # <CJK>
+CABA 5C4E # <CJK>
+CABB 9A76 # <CJK>
+CABC 59CB # <CJK>
+CABD 5F0F # <CJK>
+CABE 793A # <CJK>
+CABF 58EB # <CJK>
+CAC0 4E16 # <CJK>
+CAC1 67FF # <CJK>
+CAC2 4E8B # <CJK>
+CAC3 62ED # <CJK>
+CAC4 8A93 # <CJK>
+CAC5 901D # <CJK>
+CAC6 52BF # <CJK>
+CAC7 662F # <CJK>
+CAC8 55DC # <CJK>
+CAC9 566C # <CJK>
+CACA 9002 # <CJK>
+CACB 4ED5 # <CJK>
+CACC 4F8D # <CJK>
+CACD 91CA # <CJK>
+CACE 9970 # <CJK>
+CACF 6C0F # <CJK>
+CAD0 5E02 # <CJK>
+CAD1 6043 # <CJK>
+CAD2 5BA4 # <CJK>
+CAD3 89C6 # <CJK>
+CAD4 8BD5 # <CJK>
+CAD5 6536 # <CJK>
+CAD6 624B # <CJK>
+CAD7 9996 # <CJK>
+CAD8 5B88 # <CJK>
+CAD9 5BFF # <CJK>
+CADA 6388 # <CJK>
+CADB 552E # <CJK>
+CADC 53D7 # <CJK>
+CADD 7626 # <CJK>
+CADE 517D # <CJK>
+CADF 852C # <CJK>
+CAE0 67A2 # <CJK>
+CAE1 68B3 # <CJK>
+CAE2 6B8A # <CJK>
+CAE3 6292 # <CJK>
+CAE4 8F93 # <CJK>
+CAE5 53D4 # <CJK>
+CAE6 8212 # <CJK>
+CAE7 6DD1 # <CJK>
+CAE8 758F # <CJK>
+CAE9 4E66 # <CJK>
+CAEA 8D4E # <CJK>
+CAEB 5B70 # <CJK>
+CAEC 719F # <CJK>
+CAED 85AF # <CJK>
+CAEE 6691 # <CJK>
+CAEF 66D9 # <CJK>
+CAF0 7F72 # <CJK>
+CAF1 8700 # <CJK>
+CAF2 9ECD # <CJK>
+CAF3 9F20 # <CJK>
+CAF4 5C5E # <CJK>
+CAF5 672F # <CJK>
+CAF6 8FF0 # <CJK>
+CAF7 6811 # <CJK>
+CAF8 675F # <CJK>
+CAF9 620D # <CJK>
+CAFA 7AD6 # <CJK>
+CAFB 5885 # <CJK>
+CAFC 5EB6 # <CJK>
+CAFD 6570 # <CJK>
+CAFE 6F31 # <CJK>
+CBA1 6055 # <CJK>
+CBA2 5237 # <CJK>
+CBA3 800D # <CJK>
+CBA4 6454 # <CJK>
+CBA5 8870 # <CJK>
+CBA6 7529 # <CJK>
+CBA7 5E05 # <CJK>
+CBA8 6813 # <CJK>
+CBA9 62F4 # <CJK>
+CBAA 971C # <CJK>
+CBAB 53CC # <CJK>
+CBAC 723D # <CJK>
+CBAD 8C01 # <CJK>
+CBAE 6C34 # <CJK>
+CBAF 7761 # <CJK>
+CBB0 7A0E # <CJK>
+CBB1 542E # <CJK>
+CBB2 77AC # <CJK>
+CBB3 987A # <CJK>
+CBB4 821C # <CJK>
+CBB5 8BF4 # <CJK>
+CBB6 7855 # <CJK>
+CBB7 6714 # <CJK>
+CBB8 70C1 # <CJK>
+CBB9 65AF # <CJK>
+CBBA 6495 # <CJK>
+CBBB 5636 # <CJK>
+CBBC 601D # <CJK>
+CBBD 79C1 # <CJK>
+CBBE 53F8 # <CJK>
+CBBF 4E1D # <CJK>
+CBC0 6B7B # <CJK>
+CBC1 8086 # <CJK>
+CBC2 5BFA # <CJK>
+CBC3 55E3 # <CJK>
+CBC4 56DB # <CJK>
+CBC5 4F3A # <CJK>
+CBC6 4F3C # <CJK>
+CBC7 9972 # <CJK>
+CBC8 5DF3 # <CJK>
+CBC9 677E # <CJK>
+CBCA 8038 # <CJK>
+CBCB 6002 # <CJK>
+CBCC 9882 # <CJK>
+CBCD 9001 # <CJK>
+CBCE 5B8B # <CJK>
+CBCF 8BBC # <CJK>
+CBD0 8BF5 # <CJK>
+CBD1 641C # <CJK>
+CBD2 8258 # <CJK>
+CBD3 64DE # <CJK>
+CBD4 55FD # <CJK>
+CBD5 82CF # <CJK>
+CBD6 9165 # <CJK>
+CBD7 4FD7 # <CJK>
+CBD8 7D20 # <CJK>
+CBD9 901F # <CJK>
+CBDA 7C9F # <CJK>
+CBDB 50F3 # <CJK>
+CBDC 5851 # <CJK>
+CBDD 6EAF # <CJK>
+CBDE 5BBF # <CJK>
+CBDF 8BC9 # <CJK>
+CBE0 8083 # <CJK>
+CBE1 9178 # <CJK>
+CBE2 849C # <CJK>
+CBE3 7B97 # <CJK>
+CBE4 867D # <CJK>
+CBE5 968B # <CJK>
+CBE6 968F # <CJK>
+CBE7 7EE5 # <CJK>
+CBE8 9AD3 # <CJK>
+CBE9 788E # <CJK>
+CBEA 5C81 # <CJK>
+CBEB 7A57 # <CJK>
+CBEC 9042 # <CJK>
+CBED 96A7 # <CJK>
+CBEE 795F # <CJK>
+CBEF 5B59 # <CJK>
+CBF0 635F # <CJK>
+CBF1 7B0B # <CJK>
+CBF2 84D1 # <CJK>
+CBF3 68AD # <CJK>
+CBF4 5506 # <CJK>
+CBF5 7F29 # <CJK>
+CBF6 7410 # <CJK>
+CBF7 7D22 # <CJK>
+CBF8 9501 # <CJK>
+CBF9 6240 # <CJK>
+CBFA 584C # <CJK>
+CBFB 4ED6 # <CJK>
+CBFC 5B83 # <CJK>
+CBFD 5979 # <CJK>
+CBFE 5854 # <CJK>
+CCA1 736D # <CJK>
+CCA2 631E # <CJK>
+CCA3 8E4B # <CJK>
+CCA4 8E0F # <CJK>
+CCA5 80CE # <CJK>
+CCA6 82D4 # <CJK>
+CCA7 62AC # <CJK>
+CCA8 53F0 # <CJK>
+CCA9 6CF0 # <CJK>
+CCAA 915E # <CJK>
+CCAB 592A # <CJK>
+CCAC 6001 # <CJK>
+CCAD 6C70 # <CJK>
+CCAE 574D # <CJK>
+CCAF 644A # <CJK>
+CCB0 8D2A # <CJK>
+CCB1 762B # <CJK>
+CCB2 6EE9 # <CJK>
+CCB3 575B # <CJK>
+CCB4 6A80 # <CJK>
+CCB5 75F0 # <CJK>
+CCB6 6F6D # <CJK>
+CCB7 8C2D # <CJK>
+CCB8 8C08 # <CJK>
+CCB9 5766 # <CJK>
+CCBA 6BEF # <CJK>
+CCBB 8892 # <CJK>
+CCBC 78B3 # <CJK>
+CCBD 63A2 # <CJK>
+CCBE 53F9 # <CJK>
+CCBF 70AD # <CJK>
+CCC0 6C64 # <CJK>
+CCC1 5858 # <CJK>
+CCC2 642A # <CJK>
+CCC3 5802 # <CJK>
+CCC4 68E0 # <CJK>
+CCC5 819B # <CJK>
+CCC6 5510 # <CJK>
+CCC7 7CD6 # <CJK>
+CCC8 5018 # <CJK>
+CCC9 8EBA # <CJK>
+CCCA 6DCC # <CJK>
+CCCB 8D9F # <CJK>
+CCCC 70EB # <CJK>
+CCCD 638F # <CJK>
+CCCE 6D9B # <CJK>
+CCCF 6ED4 # <CJK>
+CCD0 7EE6 # <CJK>
+CCD1 8404 # <CJK>
+CCD2 6843 # <CJK>
+CCD3 9003 # <CJK>
+CCD4 6DD8 # <CJK>
+CCD5 9676 # <CJK>
+CCD6 8BA8 # <CJK>
+CCD7 5957 # <CJK>
+CCD8 7279 # <CJK>
+CCD9 85E4 # <CJK>
+CCDA 817E # <CJK>
+CCDB 75BC # <CJK>
+CCDC 8A8A # <CJK>
+CCDD 68AF # <CJK>
+CCDE 5254 # <CJK>
+CCDF 8E22 # <CJK>
+CCE0 9511 # <CJK>
+CCE1 63D0 # <CJK>
+CCE2 9898 # <CJK>
+CCE3 8E44 # <CJK>
+CCE4 557C # <CJK>
+CCE5 4F53 # <CJK>
+CCE6 66FF # <CJK>
+CCE7 568F # <CJK>
+CCE8 60D5 # <CJK>
+CCE9 6D95 # <CJK>
+CCEA 5243 # <CJK>
+CCEB 5C49 # <CJK>
+CCEC 5929 # <CJK>
+CCED 6DFB # <CJK>
+CCEE 586B # <CJK>
+CCEF 7530 # <CJK>
+CCF0 751C # <CJK>
+CCF1 606C # <CJK>
+CCF2 8214 # <CJK>
+CCF3 8146 # <CJK>
+CCF4 6311 # <CJK>
+CCF5 6761 # <CJK>
+CCF6 8FE2 # <CJK>
+CCF7 773A # <CJK>
+CCF8 8DF3 # <CJK>
+CCF9 8D34 # <CJK>
+CCFA 94C1 # <CJK>
+CCFB 5E16 # <CJK>
+CCFC 5385 # <CJK>
+CCFD 542C # <CJK>
+CCFE 70C3 # <CJK>
+CDA1 6C40 # <CJK>
+CDA2 5EF7 # <CJK>
+CDA3 505C # <CJK>
+CDA4 4EAD # <CJK>
+CDA5 5EAD # <CJK>
+CDA6 633A # <CJK>
+CDA7 8247 # <CJK>
+CDA8 901A # <CJK>
+CDA9 6850 # <CJK>
+CDAA 916E # <CJK>
+CDAB 77B3 # <CJK>
+CDAC 540C # <CJK>
+CDAD 94DC # <CJK>
+CDAE 5F64 # <CJK>
+CDAF 7AE5 # <CJK>
+CDB0 6876 # <CJK>
+CDB1 6345 # <CJK>
+CDB2 7B52 # <CJK>
+CDB3 7EDF # <CJK>
+CDB4 75DB # <CJK>
+CDB5 5077 # <CJK>
+CDB6 6295 # <CJK>
+CDB7 5934 # <CJK>
+CDB8 900F # <CJK>
+CDB9 51F8 # <CJK>
+CDBA 79C3 # <CJK>
+CDBB 7A81 # <CJK>
+CDBC 56FE # <CJK>
+CDBD 5F92 # <CJK>
+CDBE 9014 # <CJK>
+CDBF 6D82 # <CJK>
+CDC0 5C60 # <CJK>
+CDC1 571F # <CJK>
+CDC2 5410 # <CJK>
+CDC3 5154 # <CJK>
+CDC4 6E4D # <CJK>
+CDC5 56E2 # <CJK>
+CDC6 63A8 # <CJK>
+CDC7 9893 # <CJK>
+CDC8 817F # <CJK>
+CDC9 8715 # <CJK>
+CDCA 892A # <CJK>
+CDCB 9000 # <CJK>
+CDCC 541E # <CJK>
+CDCD 5C6F # <CJK>
+CDCE 81C0 # <CJK>
+CDCF 62D6 # <CJK>
+CDD0 6258 # <CJK>
+CDD1 8131 # <CJK>
+CDD2 9E35 # <CJK>
+CDD3 9640 # <CJK>
+CDD4 9A6E # <CJK>
+CDD5 9A7C # <CJK>
+CDD6 692D # <CJK>
+CDD7 59A5 # <CJK>
+CDD8 62D3 # <CJK>
+CDD9 553E # <CJK>
+CDDA 6316 # <CJK>
+CDDB 54C7 # <CJK>
+CDDC 86D9 # <CJK>
+CDDD 6D3C # <CJK>
+CDDE 5A03 # <CJK>
+CDDF 74E6 # <CJK>
+CDE0 889C # <CJK>
+CDE1 6B6A # <CJK>
+CDE2 5916 # <CJK>
+CDE3 8C4C # <CJK>
+CDE4 5F2F # <CJK>
+CDE5 6E7E # <CJK>
+CDE6 73A9 # <CJK>
+CDE7 987D # <CJK>
+CDE8 4E38 # <CJK>
+CDE9 70F7 # <CJK>
+CDEA 5B8C # <CJK>
+CDEB 7897 # <CJK>
+CDEC 633D # <CJK>
+CDED 665A # <CJK>
+CDEE 7696 # <CJK>
+CDEF 60CB # <CJK>
+CDF0 5B9B # <CJK>
+CDF1 5A49 # <CJK>
+CDF2 4E07 # <CJK>
+CDF3 8155 # <CJK>
+CDF4 6C6A # <CJK>
+CDF5 738B # <CJK>
+CDF6 4EA1 # <CJK>
+CDF7 6789 # <CJK>
+CDF8 7F51 # <CJK>
+CDF9 5F80 # <CJK>
+CDFA 65FA # <CJK>
+CDFB 671B # <CJK>
+CDFC 5FD8 # <CJK>
+CDFD 5984 # <CJK>
+CDFE 5A01 # <CJK>
+CEA1 5DCD # <CJK>
+CEA2 5FAE # <CJK>
+CEA3 5371 # <CJK>
+CEA4 97E6 # <CJK>
+CEA5 8FDD # <CJK>
+CEA6 6845 # <CJK>
+CEA7 56F4 # <CJK>
+CEA8 552F # <CJK>
+CEA9 60DF # <CJK>
+CEAA 4E3A # <CJK>
+CEAB 6F4D # <CJK>
+CEAC 7EF4 # <CJK>
+CEAD 82C7 # <CJK>
+CEAE 840E # <CJK>
+CEAF 59D4 # <CJK>
+CEB0 4F1F # <CJK>
+CEB1 4F2A # <CJK>
+CEB2 5C3E # <CJK>
+CEB3 7EAC # <CJK>
+CEB4 672A # <CJK>
+CEB5 851A # <CJK>
+CEB6 5473 # <CJK>
+CEB7 754F # <CJK>
+CEB8 80C3 # <CJK>
+CEB9 5582 # <CJK>
+CEBA 9B4F # <CJK>
+CEBB 4F4D # <CJK>
+CEBC 6E2D # <CJK>
+CEBD 8C13 # <CJK>
+CEBE 5C09 # <CJK>
+CEBF 6170 # <CJK>
+CEC0 536B # <CJK>
+CEC1 761F # <CJK>
+CEC2 6E29 # <CJK>
+CEC3 868A # <CJK>
+CEC4 6587 # <CJK>
+CEC5 95FB # <CJK>
+CEC6 7EB9 # <CJK>
+CEC7 543B # <CJK>
+CEC8 7A33 # <CJK>
+CEC9 7D0A # <CJK>
+CECA 95EE # <CJK>
+CECB 55E1 # <CJK>
+CECC 7FC1 # <CJK>
+CECD 74EE # <CJK>
+CECE 631D # <CJK>
+CECF 8717 # <CJK>
+CED0 6DA1 # <CJK>
+CED1 7A9D # <CJK>
+CED2 6211 # <CJK>
+CED3 65A1 # <CJK>
+CED4 5367 # <CJK>
+CED5 63E1 # <CJK>
+CED6 6C83 # <CJK>
+CED7 5DEB # <CJK>
+CED8 545C # <CJK>
+CED9 94A8 # <CJK>
+CEDA 4E4C # <CJK>
+CEDB 6C61 # <CJK>
+CEDC 8BEC # <CJK>
+CEDD 5C4B # <CJK>
+CEDE 65E0 # <CJK>
+CEDF 829C # <CJK>
+CEE0 68A7 # <CJK>
+CEE1 543E # <CJK>
+CEE2 5434 # <CJK>
+CEE3 6BCB # <CJK>
+CEE4 6B66 # <CJK>
+CEE5 4E94 # <CJK>
+CEE6 6342 # <CJK>
+CEE7 5348 # <CJK>
+CEE8 821E # <CJK>
+CEE9 4F0D # <CJK>
+CEEA 4FAE # <CJK>
+CEEB 575E # <CJK>
+CEEC 620A # <CJK>
+CEED 96FE # <CJK>
+CEEE 6664 # <CJK>
+CEEF 7269 # <CJK>
+CEF0 52FF # <CJK>
+CEF1 52A1 # <CJK>
+CEF2 609F # <CJK>
+CEF3 8BEF # <CJK>
+CEF4 6614 # <CJK>
+CEF5 7199 # <CJK>
+CEF6 6790 # <CJK>
+CEF7 897F # <CJK>
+CEF8 7852 # <CJK>
+CEF9 77FD # <CJK>
+CEFA 6670 # <CJK>
+CEFB 563B # <CJK>
+CEFC 5438 # <CJK>
+CEFD 9521 # <CJK>
+CEFE 727A # <CJK>
+CFA1 7A00 # <CJK>
+CFA2 606F # <CJK>
+CFA3 5E0C # <CJK>
+CFA4 6089 # <CJK>
+CFA5 819D # <CJK>
+CFA6 5915 # <CJK>
+CFA7 60DC # <CJK>
+CFA8 7184 # <CJK>
+CFA9 70EF # <CJK>
+CFAA 6EAA # <CJK>
+CFAB 6C50 # <CJK>
+CFAC 7280 # <CJK>
+CFAD 6A84 # <CJK>
+CFAE 88AD # <CJK>
+CFAF 5E2D # <CJK>
+CFB0 4E60 # <CJK>
+CFB1 5AB3 # <CJK>
+CFB2 559C # <CJK>
+CFB3 94E3 # <CJK>
+CFB4 6D17 # <CJK>
+CFB5 7CFB # <CJK>
+CFB6 9699 # <CJK>
+CFB7 620F # <CJK>
+CFB8 7EC6 # <CJK>
+CFB9 778E # <CJK>
+CFBA 867E # <CJK>
+CFBB 5323 # <CJK>
+CFBC 971E # <CJK>
+CFBD 8F96 # <CJK>
+CFBE 6687 # <CJK>
+CFBF 5CE1 # <CJK>
+CFC0 4FA0 # <CJK>
+CFC1 72ED # <CJK>
+CFC2 4E0B # <CJK>
+CFC3 53A6 # <CJK>
+CFC4 590F # <CJK>
+CFC5 5413 # <CJK>
+CFC6 6380 # <CJK>
+CFC7 9528 # <CJK>
+CFC8 5148 # <CJK>
+CFC9 4ED9 # <CJK>
+CFCA 9C9C # <CJK>
+CFCB 7EA4 # <CJK>
+CFCC 54B8 # <CJK>
+CFCD 8D24 # <CJK>
+CFCE 8854 # <CJK>
+CFCF 8237 # <CJK>
+CFD0 95F2 # <CJK>
+CFD1 6D8E # <CJK>
+CFD2 5F26 # <CJK>
+CFD3 5ACC # <CJK>
+CFD4 663E # <CJK>
+CFD5 9669 # <CJK>
+CFD6 73B0 # <CJK>
+CFD7 732E # <CJK>
+CFD8 53BF # <CJK>
+CFD9 817A # <CJK>
+CFDA 9985 # <CJK>
+CFDB 7FA1 # <CJK>
+CFDC 5BAA # <CJK>
+CFDD 9677 # <CJK>
+CFDE 9650 # <CJK>
+CFDF 7EBF # <CJK>
+CFE0 76F8 # <CJK>
+CFE1 53A2 # <CJK>
+CFE2 9576 # <CJK>
+CFE3 9999 # <CJK>
+CFE4 7BB1 # <CJK>
+CFE5 8944 # <CJK>
+CFE6 6E58 # <CJK>
+CFE7 4E61 # <CJK>
+CFE8 7FD4 # <CJK>
+CFE9 7965 # <CJK>
+CFEA 8BE6 # <CJK>
+CFEB 60F3 # <CJK>
+CFEC 54CD # <CJK>
+CFED 4EAB # <CJK>
+CFEE 9879 # <CJK>
+CFEF 5DF7 # <CJK>
+CFF0 6A61 # <CJK>
+CFF1 50CF # <CJK>
+CFF2 5411 # <CJK>
+CFF3 8C61 # <CJK>
+CFF4 8427 # <CJK>
+CFF5 785D # <CJK>
+CFF6 9704 # <CJK>
+CFF7 524A # <CJK>
+CFF8 54EE # <CJK>
+CFF9 56A3 # <CJK>
+CFFA 9500 # <CJK>
+CFFB 6D88 # <CJK>
+CFFC 5BB5 # <CJK>
+CFFD 6DC6 # <CJK>
+CFFE 6653 # <CJK>
+D0A1 5C0F # <CJK>
+D0A2 5B5D # <CJK>
+D0A3 6821 # <CJK>
+D0A4 8096 # <CJK>
+D0A5 5578 # <CJK>
+D0A6 7B11 # <CJK>
+D0A7 6548 # <CJK>
+D0A8 6954 # <CJK>
+D0A9 4E9B # <CJK>
+D0AA 6B47 # <CJK>
+D0AB 874E # <CJK>
+D0AC 978B # <CJK>
+D0AD 534F # <CJK>
+D0AE 631F # <CJK>
+D0AF 643A # <CJK>
+D0B0 90AA # <CJK>
+D0B1 659C # <CJK>
+D0B2 80C1 # <CJK>
+D0B3 8C10 # <CJK>
+D0B4 5199 # <CJK>
+D0B5 68B0 # <CJK>
+D0B6 5378 # <CJK>
+D0B7 87F9 # <CJK>
+D0B8 61C8 # <CJK>
+D0B9 6CC4 # <CJK>
+D0BA 6CFB # <CJK>
+D0BB 8C22 # <CJK>
+D0BC 5C51 # <CJK>
+D0BD 85AA # <CJK>
+D0BE 82AF # <CJK>
+D0BF 950C # <CJK>
+D0C0 6B23 # <CJK>
+D0C1 8F9B # <CJK>
+D0C2 65B0 # <CJK>
+D0C3 5FFB # <CJK>
+D0C4 5FC3 # <CJK>
+D0C5 4FE1 # <CJK>
+D0C6 8845 # <CJK>
+D0C7 661F # <CJK>
+D0C8 8165 # <CJK>
+D0C9 7329 # <CJK>
+D0CA 60FA # <CJK>
+D0CB 5174 # <CJK>
+D0CC 5211 # <CJK>
+D0CD 578B # <CJK>
+D0CE 5F62 # <CJK>
+D0CF 90A2 # <CJK>
+D0D0 884C # <CJK>
+D0D1 9192 # <CJK>
+D0D2 5E78 # <CJK>
+D0D3 674F # <CJK>
+D0D4 6027 # <CJK>
+D0D5 59D3 # <CJK>
+D0D6 5144 # <CJK>
+D0D7 51F6 # <CJK>
+D0D8 80F8 # <CJK>
+D0D9 5308 # <CJK>
+D0DA 6C79 # <CJK>
+D0DB 96C4 # <CJK>
+D0DC 718A # <CJK>
+D0DD 4F11 # <CJK>
+D0DE 4FEE # <CJK>
+D0DF 7F9E # <CJK>
+D0E0 673D # <CJK>
+D0E1 55C5 # <CJK>
+D0E2 9508 # <CJK>
+D0E3 79C0 # <CJK>
+D0E4 8896 # <CJK>
+D0E5 7EE3 # <CJK>
+D0E6 589F # <CJK>
+D0E7 620C # <CJK>
+D0E8 9700 # <CJK>
+D0E9 865A # <CJK>
+D0EA 5618 # <CJK>
+D0EB 987B # <CJK>
+D0EC 5F90 # <CJK>
+D0ED 8BB8 # <CJK>
+D0EE 84C4 # <CJK>
+D0EF 9157 # <CJK>
+D0F0 53D9 # <CJK>
+D0F1 65ED # <CJK>
+D0F2 5E8F # <CJK>
+D0F3 755C # <CJK>
+D0F4 6064 # <CJK>
+D0F5 7D6E # <CJK>
+D0F6 5A7F # <CJK>
+D0F7 7EEA # <CJK>
+D0F8 7EED # <CJK>
+D0F9 8F69 # <CJK>
+D0FA 55A7 # <CJK>
+D0FB 5BA3 # <CJK>
+D0FC 60AC # <CJK>
+D0FD 65CB # <CJK>
+D0FE 7384 # <CJK>
+D1A1 9009 # <CJK>
+D1A2 7663 # <CJK>
+D1A3 7729 # <CJK>
+D1A4 7EDA # <CJK>
+D1A5 9774 # <CJK>
+D1A6 859B # <CJK>
+D1A7 5B66 # <CJK>
+D1A8 7A74 # <CJK>
+D1A9 96EA # <CJK>
+D1AA 8840 # <CJK>
+D1AB 52CB # <CJK>
+D1AC 718F # <CJK>
+D1AD 5FAA # <CJK>
+D1AE 65EC # <CJK>
+D1AF 8BE2 # <CJK>
+D1B0 5BFB # <CJK>
+D1B1 9A6F # <CJK>
+D1B2 5DE1 # <CJK>
+D1B3 6B89 # <CJK>
+D1B4 6C5B # <CJK>
+D1B5 8BAD # <CJK>
+D1B6 8BAF # <CJK>
+D1B7 900A # <CJK>
+D1B8 8FC5 # <CJK>
+D1B9 538B # <CJK>
+D1BA 62BC # <CJK>
+D1BB 9E26 # <CJK>
+D1BC 9E2D # <CJK>
+D1BD 5440 # <CJK>
+D1BE 4E2B # <CJK>
+D1BF 82BD # <CJK>
+D1C0 7259 # <CJK>
+D1C1 869C # <CJK>
+D1C2 5D16 # <CJK>
+D1C3 8859 # <CJK>
+D1C4 6DAF # <CJK>
+D1C5 96C5 # <CJK>
+D1C6 54D1 # <CJK>
+D1C7 4E9A # <CJK>
+D1C8 8BB6 # <CJK>
+D1C9 7109 # <CJK>
+D1CA 54BD # <CJK>
+D1CB 9609 # <CJK>
+D1CC 70DF # <CJK>
+D1CD 6DF9 # <CJK>
+D1CE 76D0 # <CJK>
+D1CF 4E25 # <CJK>
+D1D0 7814 # <CJK>
+D1D1 8712 # <CJK>
+D1D2 5CA9 # <CJK>
+D1D3 5EF6 # <CJK>
+D1D4 8A00 # <CJK>
+D1D5 989C # <CJK>
+D1D6 960E # <CJK>
+D1D7 708E # <CJK>
+D1D8 6CBF # <CJK>
+D1D9 5944 # <CJK>
+D1DA 63A9 # <CJK>
+D1DB 773C # <CJK>
+D1DC 884D # <CJK>
+D1DD 6F14 # <CJK>
+D1DE 8273 # <CJK>
+D1DF 5830 # <CJK>
+D1E0 71D5 # <CJK>
+D1E1 538C # <CJK>
+D1E2 781A # <CJK>
+D1E3 96C1 # <CJK>
+D1E4 5501 # <CJK>
+D1E5 5F66 # <CJK>
+D1E6 7130 # <CJK>
+D1E7 5BB4 # <CJK>
+D1E8 8C1A # <CJK>
+D1E9 9A8C # <CJK>
+D1EA 6B83 # <CJK>
+D1EB 592E # <CJK>
+D1EC 9E2F # <CJK>
+D1ED 79E7 # <CJK>
+D1EE 6768 # <CJK>
+D1EF 626C # <CJK>
+D1F0 4F6F # <CJK>
+D1F1 75A1 # <CJK>
+D1F2 7F8A # <CJK>
+D1F3 6D0B # <CJK>
+D1F4 9633 # <CJK>
+D1F5 6C27 # <CJK>
+D1F6 4EF0 # <CJK>
+D1F7 75D2 # <CJK>
+D1F8 517B # <CJK>
+D1F9 6837 # <CJK>
+D1FA 6F3E # <CJK>
+D1FB 9080 # <CJK>
+D1FC 8170 # <CJK>
+D1FD 5996 # <CJK>
+D1FE 7476 # <CJK>
+D2A1 6447 # <CJK>
+D2A2 5C27 # <CJK>
+D2A3 9065 # <CJK>
+D2A4 7A91 # <CJK>
+D2A5 8C23 # <CJK>
+D2A6 59DA # <CJK>
+D2A7 54AC # <CJK>
+D2A8 8200 # <CJK>
+D2A9 836F # <CJK>
+D2AA 8981 # <CJK>
+D2AB 8000 # <CJK>
+D2AC 6930 # <CJK>
+D2AD 564E # <CJK>
+D2AE 8036 # <CJK>
+D2AF 7237 # <CJK>
+D2B0 91CE # <CJK>
+D2B1 51B6 # <CJK>
+D2B2 4E5F # <CJK>
+D2B3 9875 # <CJK>
+D2B4 6396 # <CJK>
+D2B5 4E1A # <CJK>
+D2B6 53F6 # <CJK>
+D2B7 66F3 # <CJK>
+D2B8 814B # <CJK>
+D2B9 591C # <CJK>
+D2BA 6DB2 # <CJK>
+D2BB 4E00 # <CJK>
+D2BC 58F9 # <CJK>
+D2BD 533B # <CJK>
+D2BE 63D6 # <CJK>
+D2BF 94F1 # <CJK>
+D2C0 4F9D # <CJK>
+D2C1 4F0A # <CJK>
+D2C2 8863 # <CJK>
+D2C3 9890 # <CJK>
+D2C4 5937 # <CJK>
+D2C5 9057 # <CJK>
+D2C6 79FB # <CJK>
+D2C7 4EEA # <CJK>
+D2C8 80F0 # <CJK>
+D2C9 7591 # <CJK>
+D2CA 6C82 # <CJK>
+D2CB 5B9C # <CJK>
+D2CC 59E8 # <CJK>
+D2CD 5F5D # <CJK>
+D2CE 6905 # <CJK>
+D2CF 8681 # <CJK>
+D2D0 501A # <CJK>
+D2D1 5DF2 # <CJK>
+D2D2 4E59 # <CJK>
+D2D3 77E3 # <CJK>
+D2D4 4EE5 # <CJK>
+D2D5 827A # <CJK>
+D2D6 6291 # <CJK>
+D2D7 6613 # <CJK>
+D2D8 9091 # <CJK>
+D2D9 5C79 # <CJK>
+D2DA 4EBF # <CJK>
+D2DB 5F79 # <CJK>
+D2DC 81C6 # <CJK>
+D2DD 9038 # <CJK>
+D2DE 8084 # <CJK>
+D2DF 75AB # <CJK>
+D2E0 4EA6 # <CJK>
+D2E1 88D4 # <CJK>
+D2E2 610F # <CJK>
+D2E3 6BC5 # <CJK>
+D2E4 5FC6 # <CJK>
+D2E5 4E49 # <CJK>
+D2E6 76CA # <CJK>
+D2E7 6EA2 # <CJK>
+D2E8 8BE3 # <CJK>
+D2E9 8BAE # <CJK>
+D2EA 8C0A # <CJK>
+D2EB 8BD1 # <CJK>
+D2EC 5F02 # <CJK>
+D2ED 7FFC # <CJK>
+D2EE 7FCC # <CJK>
+D2EF 7ECE # <CJK>
+D2F0 8335 # <CJK>
+D2F1 836B # <CJK>
+D2F2 56E0 # <CJK>
+D2F3 6BB7 # <CJK>
+D2F4 97F3 # <CJK>
+D2F5 9634 # <CJK>
+D2F6 59FB # <CJK>
+D2F7 541F # <CJK>
+D2F8 94F6 # <CJK>
+D2F9 6DEB # <CJK>
+D2FA 5BC5 # <CJK>
+D2FB 996E # <CJK>
+D2FC 5C39 # <CJK>
+D2FD 5F15 # <CJK>
+D2FE 9690 # <CJK>
+D3A1 5370 # <CJK>
+D3A2 82F1 # <CJK>
+D3A3 6A31 # <CJK>
+D3A4 5A74 # <CJK>
+D3A5 9E70 # <CJK>
+D3A6 5E94 # <CJK>
+D3A7 7F28 # <CJK>
+D3A8 83B9 # <CJK>
+D3A9 8424 # <CJK>
+D3AA 8425 # <CJK>
+D3AB 8367 # <CJK>
+D3AC 8747 # <CJK>
+D3AD 8FCE # <CJK>
+D3AE 8D62 # <CJK>
+D3AF 76C8 # <CJK>
+D3B0 5F71 # <CJK>
+D3B1 9896 # <CJK>
+D3B2 786C # <CJK>
+D3B3 6620 # <CJK>
+D3B4 54DF # <CJK>
+D3B5 62E5 # <CJK>
+D3B6 4F63 # <CJK>
+D3B7 81C3 # <CJK>
+D3B8 75C8 # <CJK>
+D3B9 5EB8 # <CJK>
+D3BA 96CD # <CJK>
+D3BB 8E0A # <CJK>
+D3BC 86F9 # <CJK>
+D3BD 548F # <CJK>
+D3BE 6CF3 # <CJK>
+D3BF 6D8C # <CJK>
+D3C0 6C38 # <CJK>
+D3C1 607F # <CJK>
+D3C2 52C7 # <CJK>
+D3C3 7528 # <CJK>
+D3C4 5E7D # <CJK>
+D3C5 4F18 # <CJK>
+D3C6 60A0 # <CJK>
+D3C7 5FE7 # <CJK>
+D3C8 5C24 # <CJK>
+D3C9 7531 # <CJK>
+D3CA 90AE # <CJK>
+D3CB 94C0 # <CJK>
+D3CC 72B9 # <CJK>
+D3CD 6CB9 # <CJK>
+D3CE 6E38 # <CJK>
+D3CF 9149 # <CJK>
+D3D0 6709 # <CJK>
+D3D1 53CB # <CJK>
+D3D2 53F3 # <CJK>
+D3D3 4F51 # <CJK>
+D3D4 91C9 # <CJK>
+D3D5 8BF1 # <CJK>
+D3D6 53C8 # <CJK>
+D3D7 5E7C # <CJK>
+D3D8 8FC2 # <CJK>
+D3D9 6DE4 # <CJK>
+D3DA 4E8E # <CJK>
+D3DB 76C2 # <CJK>
+D3DC 6986 # <CJK>
+D3DD 865E # <CJK>
+D3DE 611A # <CJK>
+D3DF 8206 # <CJK>
+D3E0 4F59 # <CJK>
+D3E1 4FDE # <CJK>
+D3E2 903E # <CJK>
+D3E3 9C7C # <CJK>
+D3E4 6109 # <CJK>
+D3E5 6E1D # <CJK>
+D3E6 6E14 # <CJK>
+D3E7 9685 # <CJK>
+D3E8 4E88 # <CJK>
+D3E9 5A31 # <CJK>
+D3EA 96E8 # <CJK>
+D3EB 4E0E # <CJK>
+D3EC 5C7F # <CJK>
+D3ED 79B9 # <CJK>
+D3EE 5B87 # <CJK>
+D3EF 8BED # <CJK>
+D3F0 7FBD # <CJK>
+D3F1 7389 # <CJK>
+D3F2 57DF # <CJK>
+D3F3 828B # <CJK>
+D3F4 90C1 # <CJK>
+D3F5 5401 # <CJK>
+D3F6 9047 # <CJK>
+D3F7 55BB # <CJK>
+D3F8 5CEA # <CJK>
+D3F9 5FA1 # <CJK>
+D3FA 6108 # <CJK>
+D3FB 6B32 # <CJK>
+D3FC 72F1 # <CJK>
+D3FD 80B2 # <CJK>
+D3FE 8A89 # <CJK>
+D4A1 6D74 # <CJK>
+D4A2 5BD3 # <CJK>
+D4A3 88D5 # <CJK>
+D4A4 9884 # <CJK>
+D4A5 8C6B # <CJK>
+D4A6 9A6D # <CJK>
+D4A7 9E33 # <CJK>
+D4A8 6E0A # <CJK>
+D4A9 51A4 # <CJK>
+D4AA 5143 # <CJK>
+D4AB 57A3 # <CJK>
+D4AC 8881 # <CJK>
+D4AD 539F # <CJK>
+D4AE 63F4 # <CJK>
+D4AF 8F95 # <CJK>
+D4B0 56ED # <CJK>
+D4B1 5458 # <CJK>
+D4B2 5706 # <CJK>
+D4B3 733F # <CJK>
+D4B4 6E90 # <CJK>
+D4B5 7F18 # <CJK>
+D4B6 8FDC # <CJK>
+D4B7 82D1 # <CJK>
+D4B8 613F # <CJK>
+D4B9 6028 # <CJK>
+D4BA 9662 # <CJK>
+D4BB 66F0 # <CJK>
+D4BC 7EA6 # <CJK>
+D4BD 8D8A # <CJK>
+D4BE 8DC3 # <CJK>
+D4BF 94A5 # <CJK>
+D4C0 5CB3 # <CJK>
+D4C1 7CA4 # <CJK>
+D4C2 6708 # <CJK>
+D4C3 60A6 # <CJK>
+D4C4 9605 # <CJK>
+D4C5 8018 # <CJK>
+D4C6 4E91 # <CJK>
+D4C7 90E7 # <CJK>
+D4C8 5300 # <CJK>
+D4C9 9668 # <CJK>
+D4CA 5141 # <CJK>
+D4CB 8FD0 # <CJK>
+D4CC 8574 # <CJK>
+D4CD 915D # <CJK>
+D4CE 6655 # <CJK>
+D4CF 97F5 # <CJK>
+D4D0 5B55 # <CJK>
+D4D1 531D # <CJK>
+D4D2 7838 # <CJK>
+D4D3 6742 # <CJK>
+D4D4 683D # <CJK>
+D4D5 54C9 # <CJK>
+D4D6 707E # <CJK>
+D4D7 5BB0 # <CJK>
+D4D8 8F7D # <CJK>
+D4D9 518D # <CJK>
+D4DA 5728 # <CJK>
+D4DB 54B1 # <CJK>
+D4DC 6512 # <CJK>
+D4DD 6682 # <CJK>
+D4DE 8D5E # <CJK>
+D4DF 8D43 # <CJK>
+D4E0 810F # <CJK>
+D4E1 846C # <CJK>
+D4E2 906D # <CJK>
+D4E3 7CDF # <CJK>
+D4E4 51FF # <CJK>
+D4E5 85FB # <CJK>
+D4E6 67A3 # <CJK>
+D4E7 65E9 # <CJK>
+D4E8 6FA1 # <CJK>
+D4E9 86A4 # <CJK>
+D4EA 8E81 # <CJK>
+D4EB 566A # <CJK>
+D4EC 9020 # <CJK>
+D4ED 7682 # <CJK>
+D4EE 7076 # <CJK>
+D4EF 71E5 # <CJK>
+D4F0 8D23 # <CJK>
+D4F1 62E9 # <CJK>
+D4F2 5219 # <CJK>
+D4F3 6CFD # <CJK>
+D4F4 8D3C # <CJK>
+D4F5 600E # <CJK>
+D4F6 589E # <CJK>
+D4F7 618E # <CJK>
+D4F8 66FE # <CJK>
+D4F9 8D60 # <CJK>
+D4FA 624E # <CJK>
+D4FB 55B3 # <CJK>
+D4FC 6E23 # <CJK>
+D4FD 672D # <CJK>
+D4FE 8F67 # <CJK>
+D5A1 94E1 # <CJK>
+D5A2 95F8 # <CJK>
+D5A3 7728 # <CJK>
+D5A4 6805 # <CJK>
+D5A5 69A8 # <CJK>
+D5A6 548B # <CJK>
+D5A7 4E4D # <CJK>
+D5A8 70B8 # <CJK>
+D5A9 8BC8 # <CJK>
+D5AA 6458 # <CJK>
+D5AB 658B # <CJK>
+D5AC 5B85 # <CJK>
+D5AD 7A84 # <CJK>
+D5AE 503A # <CJK>
+D5AF 5BE8 # <CJK>
+D5B0 77BB # <CJK>
+D5B1 6BE1 # <CJK>
+D5B2 8A79 # <CJK>
+D5B3 7C98 # <CJK>
+D5B4 6CBE # <CJK>
+D5B5 76CF # <CJK>
+D5B6 65A9 # <CJK>
+D5B7 8F97 # <CJK>
+D5B8 5D2D # <CJK>
+D5B9 5C55 # <CJK>
+D5BA 8638 # <CJK>
+D5BB 6808 # <CJK>
+D5BC 5360 # <CJK>
+D5BD 6218 # <CJK>
+D5BE 7AD9 # <CJK>
+D5BF 6E5B # <CJK>
+D5C0 7EFD # <CJK>
+D5C1 6A1F # <CJK>
+D5C2 7AE0 # <CJK>
+D5C3 5F70 # <CJK>
+D5C4 6F33 # <CJK>
+D5C5 5F20 # <CJK>
+D5C6 638C # <CJK>
+D5C7 6DA8 # <CJK>
+D5C8 6756 # <CJK>
+D5C9 4E08 # <CJK>
+D5CA 5E10 # <CJK>
+D5CB 8D26 # <CJK>
+D5CC 4ED7 # <CJK>
+D5CD 80C0 # <CJK>
+D5CE 7634 # <CJK>
+D5CF 969C # <CJK>
+D5D0 62DB # <CJK>
+D5D1 662D # <CJK>
+D5D2 627E # <CJK>
+D5D3 6CBC # <CJK>
+D5D4 8D75 # <CJK>
+D5D5 7167 # <CJK>
+D5D6 7F69 # <CJK>
+D5D7 5146 # <CJK>
+D5D8 8087 # <CJK>
+D5D9 53EC # <CJK>
+D5DA 906E # <CJK>
+D5DB 6298 # <CJK>
+D5DC 54F2 # <CJK>
+D5DD 86F0 # <CJK>
+D5DE 8F99 # <CJK>
+D5DF 8005 # <CJK>
+D5E0 9517 # <CJK>
+D5E1 8517 # <CJK>
+D5E2 8FD9 # <CJK>
+D5E3 6D59 # <CJK>
+D5E4 73CD # <CJK>
+D5E5 659F # <CJK>
+D5E6 771F # <CJK>
+D5E7 7504 # <CJK>
+D5E8 7827 # <CJK>
+D5E9 81FB # <CJK>
+D5EA 8D1E # <CJK>
+D5EB 9488 # <CJK>
+D5EC 4FA6 # <CJK>
+D5ED 6795 # <CJK>
+D5EE 75B9 # <CJK>
+D5EF 8BCA # <CJK>
+D5F0 9707 # <CJK>
+D5F1 632F # <CJK>
+D5F2 9547 # <CJK>
+D5F3 9635 # <CJK>
+D5F4 84B8 # <CJK>
+D5F5 6323 # <CJK>
+D5F6 7741 # <CJK>
+D5F7 5F81 # <CJK>
+D5F8 72F0 # <CJK>
+D5F9 4E89 # <CJK>
+D5FA 6014 # <CJK>
+D5FB 6574 # <CJK>
+D5FC 62EF # <CJK>
+D5FD 6B63 # <CJK>
+D5FE 653F # <CJK>
+D6A1 5E27 # <CJK>
+D6A2 75C7 # <CJK>
+D6A3 90D1 # <CJK>
+D6A4 8BC1 # <CJK>
+D6A5 829D # <CJK>
+D6A6 679D # <CJK>
+D6A7 652F # <CJK>
+D6A8 5431 # <CJK>
+D6A9 8718 # <CJK>
+D6AA 77E5 # <CJK>
+D6AB 80A2 # <CJK>
+D6AC 8102 # <CJK>
+D6AD 6C41 # <CJK>
+D6AE 4E4B # <CJK>
+D6AF 7EC7 # <CJK>
+D6B0 804C # <CJK>
+D6B1 76F4 # <CJK>
+D6B2 690D # <CJK>
+D6B3 6B96 # <CJK>
+D6B4 6267 # <CJK>
+D6B5 503C # <CJK>
+D6B6 4F84 # <CJK>
+D6B7 5740 # <CJK>
+D6B8 6307 # <CJK>
+D6B9 6B62 # <CJK>
+D6BA 8DBE # <CJK>
+D6BB 53EA # <CJK>
+D6BC 65E8 # <CJK>
+D6BD 7EB8 # <CJK>
+D6BE 5FD7 # <CJK>
+D6BF 631A # <CJK>
+D6C0 63B7 # <CJK>
+D6C1 81F3 # <CJK>
+D6C2 81F4 # <CJK>
+D6C3 7F6E # <CJK>
+D6C4 5E1C # <CJK>
+D6C5 5CD9 # <CJK>
+D6C6 5236 # <CJK>
+D6C7 667A # <CJK>
+D6C8 79E9 # <CJK>
+D6C9 7A1A # <CJK>
+D6CA 8D28 # <CJK>
+D6CB 7099 # <CJK>
+D6CC 75D4 # <CJK>
+D6CD 6EDE # <CJK>
+D6CE 6CBB # <CJK>
+D6CF 7A92 # <CJK>
+D6D0 4E2D # <CJK>
+D6D1 76C5 # <CJK>
+D6D2 5FE0 # <CJK>
+D6D3 949F # <CJK>
+D6D4 8877 # <CJK>
+D6D5 7EC8 # <CJK>
+D6D6 79CD # <CJK>
+D6D7 80BF # <CJK>
+D6D8 91CD # <CJK>
+D6D9 4EF2 # <CJK>
+D6DA 4F17 # <CJK>
+D6DB 821F # <CJK>
+D6DC 5468 # <CJK>
+D6DD 5DDE # <CJK>
+D6DE 6D32 # <CJK>
+D6DF 8BCC # <CJK>
+D6E0 7CA5 # <CJK>
+D6E1 8F74 # <CJK>
+D6E2 8098 # <CJK>
+D6E3 5E1A # <CJK>
+D6E4 5492 # <CJK>
+D6E5 76B1 # <CJK>
+D6E6 5B99 # <CJK>
+D6E7 663C # <CJK>
+D6E8 9AA4 # <CJK>
+D6E9 73E0 # <CJK>
+D6EA 682A # <CJK>
+D6EB 86DB # <CJK>
+D6EC 6731 # <CJK>
+D6ED 732A # <CJK>
+D6EE 8BF8 # <CJK>
+D6EF 8BDB # <CJK>
+D6F0 9010 # <CJK>
+D6F1 7AF9 # <CJK>
+D6F2 70DB # <CJK>
+D6F3 716E # <CJK>
+D6F4 62C4 # <CJK>
+D6F5 77A9 # <CJK>
+D6F6 5631 # <CJK>
+D6F7 4E3B # <CJK>
+D6F8 8457 # <CJK>
+D6F9 67F1 # <CJK>
+D6FA 52A9 # <CJK>
+D6FB 86C0 # <CJK>
+D6FC 8D2E # <CJK>
+D6FD 94F8 # <CJK>
+D6FE 7B51 # <CJK>
+D7A1 4F4F # <CJK>
+D7A2 6CE8 # <CJK>
+D7A3 795D # <CJK>
+D7A4 9A7B # <CJK>
+D7A5 6293 # <CJK>
+D7A6 722A # <CJK>
+D7A7 62FD # <CJK>
+D7A8 4E13 # <CJK>
+D7A9 7816 # <CJK>
+D7AA 8F6C # <CJK>
+D7AB 64B0 # <CJK>
+D7AC 8D5A # <CJK>
+D7AD 7BC6 # <CJK>
+D7AE 6869 # <CJK>
+D7AF 5E84 # <CJK>
+D7B0 88C5 # <CJK>
+D7B1 5986 # <CJK>
+D7B2 649E # <CJK>
+D7B3 58EE # <CJK>
+D7B4 72B6 # <CJK>
+D7B5 690E # <CJK>
+D7B6 9525 # <CJK>
+D7B7 8FFD # <CJK>
+D7B8 8D58 # <CJK>
+D7B9 5760 # <CJK>
+D7BA 7F00 # <CJK>
+D7BB 8C06 # <CJK>
+D7BC 51C6 # <CJK>
+D7BD 6349 # <CJK>
+D7BE 62D9 # <CJK>
+D7BF 5353 # <CJK>
+D7C0 684C # <CJK>
+D7C1 7422 # <CJK>
+D7C2 8301 # <CJK>
+D7C3 914C # <CJK>
+D7C4 5544 # <CJK>
+D7C5 7740 # <CJK>
+D7C6 707C # <CJK>
+D7C7 6D4A # <CJK>
+D7C8 5179 # <CJK>
+D7C9 54A8 # <CJK>
+D7CA 8D44 # <CJK>
+D7CB 59FF # <CJK>
+D7CC 6ECB # <CJK>
+D7CD 6DC4 # <CJK>
+D7CE 5B5C # <CJK>
+D7CF 7D2B # <CJK>
+D7D0 4ED4 # <CJK>
+D7D1 7C7D # <CJK>
+D7D2 6ED3 # <CJK>
+D7D3 5B50 # <CJK>
+D7D4 81EA # <CJK>
+D7D5 6E0D # <CJK>
+D7D6 5B57 # <CJK>
+D7D7 9B03 # <CJK>
+D7D8 68D5 # <CJK>
+D7D9 8E2A # <CJK>
+D7DA 5B97 # <CJK>
+D7DB 7EFC # <CJK>
+D7DC 603B # <CJK>
+D7DD 7EB5 # <CJK>
+D7DE 90B9 # <CJK>
+D7DF 8D70 # <CJK>
+D7E0 594F # <CJK>
+D7E1 63CD # <CJK>
+D7E2 79DF # <CJK>
+D7E3 8DB3 # <CJK>
+D7E4 5352 # <CJK>
+D7E5 65CF # <CJK>
+D7E6 7956 # <CJK>
+D7E7 8BC5 # <CJK>
+D7E8 963B # <CJK>
+D7E9 7EC4 # <CJK>
+D7EA 94BB # <CJK>
+D7EB 7E82 # <CJK>
+D7EC 5634 # <CJK>
+D7ED 9189 # <CJK>
+D7EE 6700 # <CJK>
+D7EF 7F6A # <CJK>
+D7F0 5C0A # <CJK>
+D7F1 9075 # <CJK>
+D7F2 6628 # <CJK>
+D7F3 5DE6 # <CJK>
+D7F4 4F50 # <CJK>
+D7F5 67DE # <CJK>
+D7F6 505A # <CJK>
+D7F7 4F5C # <CJK>
+D7F8 5750 # <CJK>
+D7F9 5EA7 # <CJK>
+D8A1 4E8D # <CJK>
+D8A2 4E0C # <CJK>
+D8A3 5140 # <CJK>
+D8A4 4E10 # <CJK>
+D8A5 5EFF # <CJK>
+D8A6 5345 # <CJK>
+D8A7 4E15 # <CJK>
+D8A8 4E98 # <CJK>
+D8A9 4E1E # <CJK>
+D8AA 9B32 # <CJK>
+D8AB 5B6C # <CJK>
+D8AC 5669 # <CJK>
+D8AD 4E28 # <CJK>
+D8AE 79BA # <CJK>
+D8AF 4E3F # <CJK>
+D8B0 5315 # <CJK>
+D8B1 4E47 # <CJK>
+D8B2 592D # <CJK>
+D8B3 723B # <CJK>
+D8B4 536E # <CJK>
+D8B5 6C10 # <CJK>
+D8B6 56DF # <CJK>
+D8B7 80E4 # <CJK>
+D8B8 9997 # <CJK>
+D8B9 6BD3 # <CJK>
+D8BA 777E # <CJK>
+D8BB 9F17 # <CJK>
+D8BC 4E36 # <CJK>
+D8BD 4E9F # <CJK>
+D8BE 9F10 # <CJK>
+D8BF 4E5C # <CJK>
+D8C0 4E69 # <CJK>
+D8C1 4E93 # <CJK>
+D8C2 8288 # <CJK>
+D8C3 5B5B # <CJK>
+D8C4 556C # <CJK>
+D8C5 560F # <CJK>
+D8C6 4EC4 # <CJK>
+D8C7 538D # <CJK>
+D8C8 539D # <CJK>
+D8C9 53A3 # <CJK>
+D8CA 53A5 # <CJK>
+D8CB 53AE # <CJK>
+D8CC 9765 # <CJK>
+D8CD 8D5D # <CJK>
+D8CE 531A # <CJK>
+D8CF 53F5 # <CJK>
+D8D0 5326 # <CJK>
+D8D1 532E # <CJK>
+D8D2 533E # <CJK>
+D8D3 8D5C # <CJK>
+D8D4 5366 # <CJK>
+D8D5 5363 # <CJK>
+D8D6 5202 # <CJK>
+D8D7 5208 # <CJK>
+D8D8 520E # <CJK>
+D8D9 522D # <CJK>
+D8DA 5233 # <CJK>
+D8DB 523F # <CJK>
+D8DC 5240 # <CJK>
+D8DD 524C # <CJK>
+D8DE 525E # <CJK>
+D8DF 5261 # <CJK>
+D8E0 525C # <CJK>
+D8E1 84AF # <CJK>
+D8E2 527D # <CJK>
+D8E3 5282 # <CJK>
+D8E4 5281 # <CJK>
+D8E5 5290 # <CJK>
+D8E6 5293 # <CJK>
+D8E7 5182 # <CJK>
+D8E8 7F54 # <CJK>
+D8E9 4EBB # <CJK>
+D8EA 4EC3 # <CJK>
+D8EB 4EC9 # <CJK>
+D8EC 4EC2 # <CJK>
+D8ED 4EE8 # <CJK>
+D8EE 4EE1 # <CJK>
+D8EF 4EEB # <CJK>
+D8F0 4EDE # <CJK>
+D8F1 4F1B # <CJK>
+D8F2 4EF3 # <CJK>
+D8F3 4F22 # <CJK>
+D8F4 4F64 # <CJK>
+D8F5 4EF5 # <CJK>
+D8F6 4F25 # <CJK>
+D8F7 4F27 # <CJK>
+D8F8 4F09 # <CJK>
+D8F9 4F2B # <CJK>
+D8FA 4F5E # <CJK>
+D8FB 4F67 # <CJK>
+D8FC 6538 # <CJK>
+D8FD 4F5A # <CJK>
+D8FE 4F5D # <CJK>
+D9A1 4F5F # <CJK>
+D9A2 4F57 # <CJK>
+D9A3 4F32 # <CJK>
+D9A4 4F3D # <CJK>
+D9A5 4F76 # <CJK>
+D9A6 4F74 # <CJK>
+D9A7 4F91 # <CJK>
+D9A8 4F89 # <CJK>
+D9A9 4F83 # <CJK>
+D9AA 4F8F # <CJK>
+D9AB 4F7E # <CJK>
+D9AC 4F7B # <CJK>
+D9AD 4FAA # <CJK>
+D9AE 4F7C # <CJK>
+D9AF 4FAC # <CJK>
+D9B0 4F94 # <CJK>
+D9B1 4FE6 # <CJK>
+D9B2 4FE8 # <CJK>
+D9B3 4FEA # <CJK>
+D9B4 4FC5 # <CJK>
+D9B5 4FDA # <CJK>
+D9B6 4FE3 # <CJK>
+D9B7 4FDC # <CJK>
+D9B8 4FD1 # <CJK>
+D9B9 4FDF # <CJK>
+D9BA 4FF8 # <CJK>
+D9BB 5029 # <CJK>
+D9BC 504C # <CJK>
+D9BD 4FF3 # <CJK>
+D9BE 502C # <CJK>
+D9BF 500F # <CJK>
+D9C0 502E # <CJK>
+D9C1 502D # <CJK>
+D9C2 4FFE # <CJK>
+D9C3 501C # <CJK>
+D9C4 500C # <CJK>
+D9C5 5025 # <CJK>
+D9C6 5028 # <CJK>
+D9C7 507E # <CJK>
+D9C8 5043 # <CJK>
+D9C9 5055 # <CJK>
+D9CA 5048 # <CJK>
+D9CB 504E # <CJK>
+D9CC 506C # <CJK>
+D9CD 507B # <CJK>
+D9CE 50A5 # <CJK>
+D9CF 50A7 # <CJK>
+D9D0 50A9 # <CJK>
+D9D1 50BA # <CJK>
+D9D2 50D6 # <CJK>
+D9D3 5106 # <CJK>
+D9D4 50ED # <CJK>
+D9D5 50EC # <CJK>
+D9D6 50E6 # <CJK>
+D9D7 50EE # <CJK>
+D9D8 5107 # <CJK>
+D9D9 510B # <CJK>
+D9DA 4EDD # <CJK>
+D9DB 6C3D # <CJK>
+D9DC 4F58 # <CJK>
+D9DD 4F65 # <CJK>
+D9DE 4FCE # <CJK>
+D9DF 9FA0 # <CJK>
+D9E0 6C46 # <CJK>
+D9E1 7C74 # <CJK>
+D9E2 516E # <CJK>
+D9E3 5DFD # <CJK>
+D9E4 9EC9 # <CJK>
+D9E5 9998 # <CJK>
+D9E6 5181 # <CJK>
+D9E7 5914 # <CJK>
+D9E8 52F9 # <CJK>
+D9E9 530D # <CJK>
+D9EA 8A07 # <CJK>
+D9EB 5310 # <CJK>
+D9EC 51EB # <CJK>
+D9ED 5919 # <CJK>
+D9EE 5155 # <CJK>
+D9EF 4EA0 # <CJK>
+D9F0 5156 # <CJK>
+D9F1 4EB3 # <CJK>
+D9F2 886E # <CJK>
+D9F3 88A4 # <CJK>
+D9F4 4EB5 # <CJK>
+D9F5 8114 # <CJK>
+D9F6 88D2 # <CJK>
+D9F7 7980 # <CJK>
+D9F8 5B34 # <CJK>
+D9F9 8803 # <CJK>
+D9FA 7FB8 # <CJK>
+D9FB 51AB # <CJK>
+D9FC 51B1 # <CJK>
+D9FD 51BD # <CJK>
+D9FE 51BC # <CJK>
+DAA1 51C7 # <CJK>
+DAA2 5196 # <CJK>
+DAA3 51A2 # <CJK>
+DAA4 51A5 # <CJK>
+DAA5 8BA0 # <CJK>
+DAA6 8BA6 # <CJK>
+DAA7 8BA7 # <CJK>
+DAA8 8BAA # <CJK>
+DAA9 8BB4 # <CJK>
+DAAA 8BB5 # <CJK>
+DAAB 8BB7 # <CJK>
+DAAC 8BC2 # <CJK>
+DAAD 8BC3 # <CJK>
+DAAE 8BCB # <CJK>
+DAAF 8BCF # <CJK>
+DAB0 8BCE # <CJK>
+DAB1 8BD2 # <CJK>
+DAB2 8BD3 # <CJK>
+DAB3 8BD4 # <CJK>
+DAB4 8BD6 # <CJK>
+DAB5 8BD8 # <CJK>
+DAB6 8BD9 # <CJK>
+DAB7 8BDC # <CJK>
+DAB8 8BDF # <CJK>
+DAB9 8BE0 # <CJK>
+DABA 8BE4 # <CJK>
+DABB 8BE8 # <CJK>
+DABC 8BE9 # <CJK>
+DABD 8BEE # <CJK>
+DABE 8BF0 # <CJK>
+DABF 8BF3 # <CJK>
+DAC0 8BF6 # <CJK>
+DAC1 8BF9 # <CJK>
+DAC2 8BFC # <CJK>
+DAC3 8BFF # <CJK>
+DAC4 8C00 # <CJK>
+DAC5 8C02 # <CJK>
+DAC6 8C04 # <CJK>
+DAC7 8C07 # <CJK>
+DAC8 8C0C # <CJK>
+DAC9 8C0F # <CJK>
+DACA 8C11 # <CJK>
+DACB 8C12 # <CJK>
+DACC 8C14 # <CJK>
+DACD 8C15 # <CJK>
+DACE 8C16 # <CJK>
+DACF 8C19 # <CJK>
+DAD0 8C1B # <CJK>
+DAD1 8C18 # <CJK>
+DAD2 8C1D # <CJK>
+DAD3 8C1F # <CJK>
+DAD4 8C20 # <CJK>
+DAD5 8C21 # <CJK>
+DAD6 8C25 # <CJK>
+DAD7 8C27 # <CJK>
+DAD8 8C2A # <CJK>
+DAD9 8C2B # <CJK>
+DADA 8C2E # <CJK>
+DADB 8C2F # <CJK>
+DADC 8C32 # <CJK>
+DADD 8C33 # <CJK>
+DADE 8C35 # <CJK>
+DADF 8C36 # <CJK>
+DAE0 5369 # <CJK>
+DAE1 537A # <CJK>
+DAE2 961D # <CJK>
+DAE3 9622 # <CJK>
+DAE4 9621 # <CJK>
+DAE5 9631 # <CJK>
+DAE6 962A # <CJK>
+DAE7 963D # <CJK>
+DAE8 963C # <CJK>
+DAE9 9642 # <CJK>
+DAEA 9649 # <CJK>
+DAEB 9654 # <CJK>
+DAEC 965F # <CJK>
+DAED 9667 # <CJK>
+DAEE 966C # <CJK>
+DAEF 9672 # <CJK>
+DAF0 9674 # <CJK>
+DAF1 9688 # <CJK>
+DAF2 968D # <CJK>
+DAF3 9697 # <CJK>
+DAF4 96B0 # <CJK>
+DAF5 9097 # <CJK>
+DAF6 909B # <CJK>
+DAF7 909D # <CJK>
+DAF8 9099 # <CJK>
+DAF9 90AC # <CJK>
+DAFA 90A1 # <CJK>
+DAFB 90B4 # <CJK>
+DAFC 90B3 # <CJK>
+DAFD 90B6 # <CJK>
+DAFE 90BA # <CJK>
+DBA1 90B8 # <CJK>
+DBA2 90B0 # <CJK>
+DBA3 90CF # <CJK>
+DBA4 90C5 # <CJK>
+DBA5 90BE # <CJK>
+DBA6 90D0 # <CJK>
+DBA7 90C4 # <CJK>
+DBA8 90C7 # <CJK>
+DBA9 90D3 # <CJK>
+DBAA 90E6 # <CJK>
+DBAB 90E2 # <CJK>
+DBAC 90DC # <CJK>
+DBAD 90D7 # <CJK>
+DBAE 90DB # <CJK>
+DBAF 90EB # <CJK>
+DBB0 90EF # <CJK>
+DBB1 90FE # <CJK>
+DBB2 9104 # <CJK>
+DBB3 9122 # <CJK>
+DBB4 911E # <CJK>
+DBB5 9123 # <CJK>
+DBB6 9131 # <CJK>
+DBB7 912F # <CJK>
+DBB8 9139 # <CJK>
+DBB9 9143 # <CJK>
+DBBA 9146 # <CJK>
+DBBB 520D # <CJK>
+DBBC 5942 # <CJK>
+DBBD 52A2 # <CJK>
+DBBE 52AC # <CJK>
+DBBF 52AD # <CJK>
+DBC0 52BE # <CJK>
+DBC1 54FF # <CJK>
+DBC2 52D0 # <CJK>
+DBC3 52D6 # <CJK>
+DBC4 52F0 # <CJK>
+DBC5 53DF # <CJK>
+DBC6 71EE # <CJK>
+DBC7 77CD # <CJK>
+DBC8 5EF4 # <CJK>
+DBC9 51F5 # <CJK>
+DBCA 51FC # <CJK>
+DBCB 9B2F # <CJK>
+DBCC 53B6 # <CJK>
+DBCD 5F01 # <CJK>
+DBCE 755A # <CJK>
+DBCF 5DEF # <CJK>
+DBD0 574C # <CJK>
+DBD1 57A9 # <CJK>
+DBD2 57A1 # <CJK>
+DBD3 587E # <CJK>
+DBD4 58BC # <CJK>
+DBD5 58C5 # <CJK>
+DBD6 58D1 # <CJK>
+DBD7 5729 # <CJK>
+DBD8 572C # <CJK>
+DBD9 572A # <CJK>
+DBDA 5733 # <CJK>
+DBDB 5739 # <CJK>
+DBDC 572E # <CJK>
+DBDD 572F # <CJK>
+DBDE 575C # <CJK>
+DBDF 573B # <CJK>
+DBE0 5742 # <CJK>
+DBE1 5769 # <CJK>
+DBE2 5785 # <CJK>
+DBE3 576B # <CJK>
+DBE4 5786 # <CJK>
+DBE5 577C # <CJK>
+DBE6 577B # <CJK>
+DBE7 5768 # <CJK>
+DBE8 576D # <CJK>
+DBE9 5776 # <CJK>
+DBEA 5773 # <CJK>
+DBEB 57AD # <CJK>
+DBEC 57A4 # <CJK>
+DBED 578C # <CJK>
+DBEE 57B2 # <CJK>
+DBEF 57CF # <CJK>
+DBF0 57A7 # <CJK>
+DBF1 57B4 # <CJK>
+DBF2 5793 # <CJK>
+DBF3 57A0 # <CJK>
+DBF4 57D5 # <CJK>
+DBF5 57D8 # <CJK>
+DBF6 57DA # <CJK>
+DBF7 57D9 # <CJK>
+DBF8 57D2 # <CJK>
+DBF9 57B8 # <CJK>
+DBFA 57F4 # <CJK>
+DBFB 57EF # <CJK>
+DBFC 57F8 # <CJK>
+DBFD 57E4 # <CJK>
+DBFE 57DD # <CJK>
+DCA1 580B # <CJK>
+DCA2 580D # <CJK>
+DCA3 57FD # <CJK>
+DCA4 57ED # <CJK>
+DCA5 5800 # <CJK>
+DCA6 581E # <CJK>
+DCA7 5819 # <CJK>
+DCA8 5844 # <CJK>
+DCA9 5820 # <CJK>
+DCAA 5865 # <CJK>
+DCAB 586C # <CJK>
+DCAC 5881 # <CJK>
+DCAD 5889 # <CJK>
+DCAE 589A # <CJK>
+DCAF 5880 # <CJK>
+DCB0 99A8 # <CJK>
+DCB1 9F19 # <CJK>
+DCB2 61FF # <CJK>
+DCB3 8279 # <CJK>
+DCB4 827D # <CJK>
+DCB5 827F # <CJK>
+DCB6 828F # <CJK>
+DCB7 828A # <CJK>
+DCB8 82A8 # <CJK>
+DCB9 8284 # <CJK>
+DCBA 828E # <CJK>
+DCBB 8291 # <CJK>
+DCBC 8297 # <CJK>
+DCBD 8299 # <CJK>
+DCBE 82AB # <CJK>
+DCBF 82B8 # <CJK>
+DCC0 82BE # <CJK>
+DCC1 82B0 # <CJK>
+DCC2 82C8 # <CJK>
+DCC3 82CA # <CJK>
+DCC4 82E3 # <CJK>
+DCC5 8298 # <CJK>
+DCC6 82B7 # <CJK>
+DCC7 82AE # <CJK>
+DCC8 82CB # <CJK>
+DCC9 82CC # <CJK>
+DCCA 82C1 # <CJK>
+DCCB 82A9 # <CJK>
+DCCC 82B4 # <CJK>
+DCCD 82A1 # <CJK>
+DCCE 82AA # <CJK>
+DCCF 829F # <CJK>
+DCD0 82C4 # <CJK>
+DCD1 82CE # <CJK>
+DCD2 82A4 # <CJK>
+DCD3 82E1 # <CJK>
+DCD4 8309 # <CJK>
+DCD5 82F7 # <CJK>
+DCD6 82E4 # <CJK>
+DCD7 830F # <CJK>
+DCD8 8307 # <CJK>
+DCD9 82DC # <CJK>
+DCDA 82F4 # <CJK>
+DCDB 82D2 # <CJK>
+DCDC 82D8 # <CJK>
+DCDD 830C # <CJK>
+DCDE 82FB # <CJK>
+DCDF 82D3 # <CJK>
+DCE0 8311 # <CJK>
+DCE1 831A # <CJK>
+DCE2 8306 # <CJK>
+DCE3 8314 # <CJK>
+DCE4 8315 # <CJK>
+DCE5 82E0 # <CJK>
+DCE6 82D5 # <CJK>
+DCE7 831C # <CJK>
+DCE8 8351 # <CJK>
+DCE9 835B # <CJK>
+DCEA 835C # <CJK>
+DCEB 8308 # <CJK>
+DCEC 8392 # <CJK>
+DCED 833C # <CJK>
+DCEE 8334 # <CJK>
+DCEF 8331 # <CJK>
+DCF0 839B # <CJK>
+DCF1 835E # <CJK>
+DCF2 832F # <CJK>
+DCF3 834F # <CJK>
+DCF4 8347 # <CJK>
+DCF5 8343 # <CJK>
+DCF6 835F # <CJK>
+DCF7 8340 # <CJK>
+DCF8 8317 # <CJK>
+DCF9 8360 # <CJK>
+DCFA 832D # <CJK>
+DCFB 833A # <CJK>
+DCFC 8333 # <CJK>
+DCFD 8366 # <CJK>
+DCFE 8365 # <CJK>
+DDA1 8368 # <CJK>
+DDA2 831B # <CJK>
+DDA3 8369 # <CJK>
+DDA4 836C # <CJK>
+DDA5 836A # <CJK>
+DDA6 836D # <CJK>
+DDA7 836E # <CJK>
+DDA8 83B0 # <CJK>
+DDA9 8378 # <CJK>
+DDAA 83B3 # <CJK>
+DDAB 83B4 # <CJK>
+DDAC 83A0 # <CJK>
+DDAD 83AA # <CJK>
+DDAE 8393 # <CJK>
+DDAF 839C # <CJK>
+DDB0 8385 # <CJK>
+DDB1 837C # <CJK>
+DDB2 83B6 # <CJK>
+DDB3 83A9 # <CJK>
+DDB4 837D # <CJK>
+DDB5 83B8 # <CJK>
+DDB6 837B # <CJK>
+DDB7 8398 # <CJK>
+DDB8 839E # <CJK>
+DDB9 83A8 # <CJK>
+DDBA 83BA # <CJK>
+DDBB 83BC # <CJK>
+DDBC 83C1 # <CJK>
+DDBD 8401 # <CJK>
+DDBE 83E5 # <CJK>
+DDBF 83D8 # <CJK>
+DDC0 5807 # <CJK>
+DDC1 8418 # <CJK>
+DDC2 840B # <CJK>
+DDC3 83DD # <CJK>
+DDC4 83FD # <CJK>
+DDC5 83D6 # <CJK>
+DDC6 841C # <CJK>
+DDC7 8438 # <CJK>
+DDC8 8411 # <CJK>
+DDC9 8406 # <CJK>
+DDCA 83D4 # <CJK>
+DDCB 83DF # <CJK>
+DDCC 840F # <CJK>
+DDCD 8403 # <CJK>
+DDCE 83F8 # <CJK>
+DDCF 83F9 # <CJK>
+DDD0 83EA # <CJK>
+DDD1 83C5 # <CJK>
+DDD2 83C0 # <CJK>
+DDD3 8426 # <CJK>
+DDD4 83F0 # <CJK>
+DDD5 83E1 # <CJK>
+DDD6 845C # <CJK>
+DDD7 8451 # <CJK>
+DDD8 845A # <CJK>
+DDD9 8459 # <CJK>
+DDDA 8473 # <CJK>
+DDDB 8487 # <CJK>
+DDDC 8488 # <CJK>
+DDDD 847A # <CJK>
+DDDE 8489 # <CJK>
+DDDF 8478 # <CJK>
+DDE0 843C # <CJK>
+DDE1 8446 # <CJK>
+DDE2 8469 # <CJK>
+DDE3 8476 # <CJK>
+DDE4 848C # <CJK>
+DDE5 848E # <CJK>
+DDE6 8431 # <CJK>
+DDE7 846D # <CJK>
+DDE8 84C1 # <CJK>
+DDE9 84CD # <CJK>
+DDEA 84D0 # <CJK>
+DDEB 84E6 # <CJK>
+DDEC 84BD # <CJK>
+DDED 84D3 # <CJK>
+DDEE 84CA # <CJK>
+DDEF 84BF # <CJK>
+DDF0 84BA # <CJK>
+DDF1 84E0 # <CJK>
+DDF2 84A1 # <CJK>
+DDF3 84B9 # <CJK>
+DDF4 84B4 # <CJK>
+DDF5 8497 # <CJK>
+DDF6 84E5 # <CJK>
+DDF7 84E3 # <CJK>
+DDF8 850C # <CJK>
+DDF9 750D # <CJK>
+DDFA 8538 # <CJK>
+DDFB 84F0 # <CJK>
+DDFC 8539 # <CJK>
+DDFD 851F # <CJK>
+DDFE 853A # <CJK>
+DEA1 8556 # <CJK>
+DEA2 853B # <CJK>
+DEA3 84FF # <CJK>
+DEA4 84FC # <CJK>
+DEA5 8559 # <CJK>
+DEA6 8548 # <CJK>
+DEA7 8568 # <CJK>
+DEA8 8564 # <CJK>
+DEA9 855E # <CJK>
+DEAA 857A # <CJK>
+DEAB 77A2 # <CJK>
+DEAC 8543 # <CJK>
+DEAD 8572 # <CJK>
+DEAE 857B # <CJK>
+DEAF 85A4 # <CJK>
+DEB0 85A8 # <CJK>
+DEB1 8587 # <CJK>
+DEB2 858F # <CJK>
+DEB3 8579 # <CJK>
+DEB4 85AE # <CJK>
+DEB5 859C # <CJK>
+DEB6 8585 # <CJK>
+DEB7 85B9 # <CJK>
+DEB8 85B7 # <CJK>
+DEB9 85B0 # <CJK>
+DEBA 85D3 # <CJK>
+DEBB 85C1 # <CJK>
+DEBC 85DC # <CJK>
+DEBD 85FF # <CJK>
+DEBE 8627 # <CJK>
+DEBF 8605 # <CJK>
+DEC0 8629 # <CJK>
+DEC1 8616 # <CJK>
+DEC2 863C # <CJK>
+DEC3 5EFE # <CJK>
+DEC4 5F08 # <CJK>
+DEC5 593C # <CJK>
+DEC6 5941 # <CJK>
+DEC7 8037 # <CJK>
+DEC8 5955 # <CJK>
+DEC9 595A # <CJK>
+DECA 5958 # <CJK>
+DECB 530F # <CJK>
+DECC 5C22 # <CJK>
+DECD 5C25 # <CJK>
+DECE 5C2C # <CJK>
+DECF 5C34 # <CJK>
+DED0 624C # <CJK>
+DED1 626A # <CJK>
+DED2 629F # <CJK>
+DED3 62BB # <CJK>
+DED4 62CA # <CJK>
+DED5 62DA # <CJK>
+DED6 62D7 # <CJK>
+DED7 62EE # <CJK>
+DED8 6322 # <CJK>
+DED9 62F6 # <CJK>
+DEDA 6339 # <CJK>
+DEDB 634B # <CJK>
+DEDC 6343 # <CJK>
+DEDD 63AD # <CJK>
+DEDE 63F6 # <CJK>
+DEDF 6371 # <CJK>
+DEE0 637A # <CJK>
+DEE1 638E # <CJK>
+DEE2 63B4 # <CJK>
+DEE3 636D # <CJK>
+DEE4 63AC # <CJK>
+DEE5 638A # <CJK>
+DEE6 6369 # <CJK>
+DEE7 63AE # <CJK>
+DEE8 63BC # <CJK>
+DEE9 63F2 # <CJK>
+DEEA 63F8 # <CJK>
+DEEB 63E0 # <CJK>
+DEEC 63FF # <CJK>
+DEED 63C4 # <CJK>
+DEEE 63DE # <CJK>
+DEEF 63CE # <CJK>
+DEF0 6452 # <CJK>
+DEF1 63C6 # <CJK>
+DEF2 63BE # <CJK>
+DEF3 6445 # <CJK>
+DEF4 6441 # <CJK>
+DEF5 640B # <CJK>
+DEF6 641B # <CJK>
+DEF7 6420 # <CJK>
+DEF8 640C # <CJK>
+DEF9 6426 # <CJK>
+DEFA 6421 # <CJK>
+DEFB 645E # <CJK>
+DEFC 6484 # <CJK>
+DEFD 646D # <CJK>
+DEFE 6496 # <CJK>
+DFA1 647A # <CJK>
+DFA2 64B7 # <CJK>
+DFA3 64B8 # <CJK>
+DFA4 6499 # <CJK>
+DFA5 64BA # <CJK>
+DFA6 64C0 # <CJK>
+DFA7 64D0 # <CJK>
+DFA8 64D7 # <CJK>
+DFA9 64E4 # <CJK>
+DFAA 64E2 # <CJK>
+DFAB 6509 # <CJK>
+DFAC 6525 # <CJK>
+DFAD 652E # <CJK>
+DFAE 5F0B # <CJK>
+DFAF 5FD2 # <CJK>
+DFB0 7519 # <CJK>
+DFB1 5F11 # <CJK>
+DFB2 535F # <CJK>
+DFB3 53F1 # <CJK>
+DFB4 53FD # <CJK>
+DFB5 53E9 # <CJK>
+DFB6 53E8 # <CJK>
+DFB7 53FB # <CJK>
+DFB8 5412 # <CJK>
+DFB9 5416 # <CJK>
+DFBA 5406 # <CJK>
+DFBB 544B # <CJK>
+DFBC 5452 # <CJK>
+DFBD 5453 # <CJK>
+DFBE 5454 # <CJK>
+DFBF 5456 # <CJK>
+DFC0 5443 # <CJK>
+DFC1 5421 # <CJK>
+DFC2 5457 # <CJK>
+DFC3 5459 # <CJK>
+DFC4 5423 # <CJK>
+DFC5 5432 # <CJK>
+DFC6 5482 # <CJK>
+DFC7 5494 # <CJK>
+DFC8 5477 # <CJK>
+DFC9 5471 # <CJK>
+DFCA 5464 # <CJK>
+DFCB 549A # <CJK>
+DFCC 549B # <CJK>
+DFCD 5484 # <CJK>
+DFCE 5476 # <CJK>
+DFCF 5466 # <CJK>
+DFD0 549D # <CJK>
+DFD1 54D0 # <CJK>
+DFD2 54AD # <CJK>
+DFD3 54C2 # <CJK>
+DFD4 54B4 # <CJK>
+DFD5 54D2 # <CJK>
+DFD6 54A7 # <CJK>
+DFD7 54A6 # <CJK>
+DFD8 54D3 # <CJK>
+DFD9 54D4 # <CJK>
+DFDA 5472 # <CJK>
+DFDB 54A3 # <CJK>
+DFDC 54D5 # <CJK>
+DFDD 54BB # <CJK>
+DFDE 54BF # <CJK>
+DFDF 54CC # <CJK>
+DFE0 54D9 # <CJK>
+DFE1 54DA # <CJK>
+DFE2 54DC # <CJK>
+DFE3 54A9 # <CJK>
+DFE4 54AA # <CJK>
+DFE5 54A4 # <CJK>
+DFE6 54DD # <CJK>
+DFE7 54CF # <CJK>
+DFE8 54DE # <CJK>
+DFE9 551B # <CJK>
+DFEA 54E7 # <CJK>
+DFEB 5520 # <CJK>
+DFEC 54FD # <CJK>
+DFED 5514 # <CJK>
+DFEE 54F3 # <CJK>
+DFEF 5522 # <CJK>
+DFF0 5523 # <CJK>
+DFF1 550F # <CJK>
+DFF2 5511 # <CJK>
+DFF3 5527 # <CJK>
+DFF4 552A # <CJK>
+DFF5 5567 # <CJK>
+DFF6 558F # <CJK>
+DFF7 55B5 # <CJK>
+DFF8 5549 # <CJK>
+DFF9 556D # <CJK>
+DFFA 5541 # <CJK>
+DFFB 5555 # <CJK>
+DFFC 553F # <CJK>
+DFFD 5550 # <CJK>
+DFFE 553C # <CJK>
+E0A1 5537 # <CJK>
+E0A2 5556 # <CJK>
+E0A3 5575 # <CJK>
+E0A4 5576 # <CJK>
+E0A5 5577 # <CJK>
+E0A6 5533 # <CJK>
+E0A7 5530 # <CJK>
+E0A8 555C # <CJK>
+E0A9 558B # <CJK>
+E0AA 55D2 # <CJK>
+E0AB 5583 # <CJK>
+E0AC 55B1 # <CJK>
+E0AD 55B9 # <CJK>
+E0AE 5588 # <CJK>
+E0AF 5581 # <CJK>
+E0B0 559F # <CJK>
+E0B1 557E # <CJK>
+E0B2 55D6 # <CJK>
+E0B3 5591 # <CJK>
+E0B4 557B # <CJK>
+E0B5 55DF # <CJK>
+E0B6 55BD # <CJK>
+E0B7 55BE # <CJK>
+E0B8 5594 # <CJK>
+E0B9 5599 # <CJK>
+E0BA 55EA # <CJK>
+E0BB 55F7 # <CJK>
+E0BC 55C9 # <CJK>
+E0BD 561F # <CJK>
+E0BE 55D1 # <CJK>
+E0BF 55EB # <CJK>
+E0C0 55EC # <CJK>
+E0C1 55D4 # <CJK>
+E0C2 55E6 # <CJK>
+E0C3 55DD # <CJK>
+E0C4 55C4 # <CJK>
+E0C5 55EF # <CJK>
+E0C6 55E5 # <CJK>
+E0C7 55F2 # <CJK>
+E0C8 55F3 # <CJK>
+E0C9 55CC # <CJK>
+E0CA 55CD # <CJK>
+E0CB 55E8 # <CJK>
+E0CC 55F5 # <CJK>
+E0CD 55E4 # <CJK>
+E0CE 8F94 # <CJK>
+E0CF 561E # <CJK>
+E0D0 5608 # <CJK>
+E0D1 560C # <CJK>
+E0D2 5601 # <CJK>
+E0D3 5624 # <CJK>
+E0D4 5623 # <CJK>
+E0D5 55FE # <CJK>
+E0D6 5600 # <CJK>
+E0D7 5627 # <CJK>
+E0D8 562D # <CJK>
+E0D9 5658 # <CJK>
+E0DA 5639 # <CJK>
+E0DB 5657 # <CJK>
+E0DC 562C # <CJK>
+E0DD 564D # <CJK>
+E0DE 5662 # <CJK>
+E0DF 5659 # <CJK>
+E0E0 565C # <CJK>
+E0E1 564C # <CJK>
+E0E2 5654 # <CJK>
+E0E3 5686 # <CJK>
+E0E4 5664 # <CJK>
+E0E5 5671 # <CJK>
+E0E6 566B # <CJK>
+E0E7 567B # <CJK>
+E0E8 567C # <CJK>
+E0E9 5685 # <CJK>
+E0EA 5693 # <CJK>
+E0EB 56AF # <CJK>
+E0EC 56D4 # <CJK>
+E0ED 56D7 # <CJK>
+E0EE 56DD # <CJK>
+E0EF 56E1 # <CJK>
+E0F0 56F5 # <CJK>
+E0F1 56EB # <CJK>
+E0F2 56F9 # <CJK>
+E0F3 56FF # <CJK>
+E0F4 5704 # <CJK>
+E0F5 570A # <CJK>
+E0F6 5709 # <CJK>
+E0F7 571C # <CJK>
+E0F8 5E0F # <CJK>
+E0F9 5E19 # <CJK>
+E0FA 5E14 # <CJK>
+E0FB 5E11 # <CJK>
+E0FC 5E31 # <CJK>
+E0FD 5E3B # <CJK>
+E0FE 5E3C # <CJK>
+E1A1 5E37 # <CJK>
+E1A2 5E44 # <CJK>
+E1A3 5E54 # <CJK>
+E1A4 5E5B # <CJK>
+E1A5 5E5E # <CJK>
+E1A6 5E61 # <CJK>
+E1A7 5C8C # <CJK>
+E1A8 5C7A # <CJK>
+E1A9 5C8D # <CJK>
+E1AA 5C90 # <CJK>
+E1AB 5C96 # <CJK>
+E1AC 5C88 # <CJK>
+E1AD 5C98 # <CJK>
+E1AE 5C99 # <CJK>
+E1AF 5C91 # <CJK>
+E1B0 5C9A # <CJK>
+E1B1 5C9C # <CJK>
+E1B2 5CB5 # <CJK>
+E1B3 5CA2 # <CJK>
+E1B4 5CBD # <CJK>
+E1B5 5CAC # <CJK>
+E1B6 5CAB # <CJK>
+E1B7 5CB1 # <CJK>
+E1B8 5CA3 # <CJK>
+E1B9 5CC1 # <CJK>
+E1BA 5CB7 # <CJK>
+E1BB 5CC4 # <CJK>
+E1BC 5CD2 # <CJK>
+E1BD 5CE4 # <CJK>
+E1BE 5CCB # <CJK>
+E1BF 5CE5 # <CJK>
+E1C0 5D02 # <CJK>
+E1C1 5D03 # <CJK>
+E1C2 5D27 # <CJK>
+E1C3 5D26 # <CJK>
+E1C4 5D2E # <CJK>
+E1C5 5D24 # <CJK>
+E1C6 5D1E # <CJK>
+E1C7 5D06 # <CJK>
+E1C8 5D1B # <CJK>
+E1C9 5D58 # <CJK>
+E1CA 5D3E # <CJK>
+E1CB 5D34 # <CJK>
+E1CC 5D3D # <CJK>
+E1CD 5D6C # <CJK>
+E1CE 5D5B # <CJK>
+E1CF 5D6F # <CJK>
+E1D0 5D5D # <CJK>
+E1D1 5D6B # <CJK>
+E1D2 5D4B # <CJK>
+E1D3 5D4A # <CJK>
+E1D4 5D69 # <CJK>
+E1D5 5D74 # <CJK>
+E1D6 5D82 # <CJK>
+E1D7 5D99 # <CJK>
+E1D8 5D9D # <CJK>
+E1D9 8C73 # <CJK>
+E1DA 5DB7 # <CJK>
+E1DB 5DC5 # <CJK>
+E1DC 5F73 # <CJK>
+E1DD 5F77 # <CJK>
+E1DE 5F82 # <CJK>
+E1DF 5F87 # <CJK>
+E1E0 5F89 # <CJK>
+E1E1 5F8C # <CJK>
+E1E2 5F95 # <CJK>
+E1E3 5F99 # <CJK>
+E1E4 5F9C # <CJK>
+E1E5 5FA8 # <CJK>
+E1E6 5FAD # <CJK>
+E1E7 5FB5 # <CJK>
+E1E8 5FBC # <CJK>
+E1E9 8862 # <CJK>
+E1EA 5F61 # <CJK>
+E1EB 72AD # <CJK>
+E1EC 72B0 # <CJK>
+E1ED 72B4 # <CJK>
+E1EE 72B7 # <CJK>
+E1EF 72B8 # <CJK>
+E1F0 72C3 # <CJK>
+E1F1 72C1 # <CJK>
+E1F2 72CE # <CJK>
+E1F3 72CD # <CJK>
+E1F4 72D2 # <CJK>
+E1F5 72E8 # <CJK>
+E1F6 72EF # <CJK>
+E1F7 72E9 # <CJK>
+E1F8 72F2 # <CJK>
+E1F9 72F4 # <CJK>
+E1FA 72F7 # <CJK>
+E1FB 7301 # <CJK>
+E1FC 72F3 # <CJK>
+E1FD 7303 # <CJK>
+E1FE 72FA # <CJK>
+E2A1 72FB # <CJK>
+E2A2 7317 # <CJK>
+E2A3 7313 # <CJK>
+E2A4 7321 # <CJK>
+E2A5 730A # <CJK>
+E2A6 731E # <CJK>
+E2A7 731D # <CJK>
+E2A8 7315 # <CJK>
+E2A9 7322 # <CJK>
+E2AA 7339 # <CJK>
+E2AB 7325 # <CJK>
+E2AC 732C # <CJK>
+E2AD 7338 # <CJK>
+E2AE 7331 # <CJK>
+E2AF 7350 # <CJK>
+E2B0 734D # <CJK>
+E2B1 7357 # <CJK>
+E2B2 7360 # <CJK>
+E2B3 736C # <CJK>
+E2B4 736F # <CJK>
+E2B5 737E # <CJK>
+E2B6 821B # <CJK>
+E2B7 5925 # <CJK>
+E2B8 98E7 # <CJK>
+E2B9 5924 # <CJK>
+E2BA 5902 # <CJK>
+E2BB 9963 # <CJK>
+E2BC 9967 # <CJK>
+E2BD 9968 # <CJK>
+E2BE 9969 # <CJK>
+E2BF 996A # <CJK>
+E2C0 996B # <CJK>
+E2C1 996C # <CJK>
+E2C2 9974 # <CJK>
+E2C3 9977 # <CJK>
+E2C4 997D # <CJK>
+E2C5 9980 # <CJK>
+E2C6 9984 # <CJK>
+E2C7 9987 # <CJK>
+E2C8 998A # <CJK>
+E2C9 998D # <CJK>
+E2CA 9990 # <CJK>
+E2CB 9991 # <CJK>
+E2CC 9993 # <CJK>
+E2CD 9994 # <CJK>
+E2CE 9995 # <CJK>
+E2CF 5E80 # <CJK>
+E2D0 5E91 # <CJK>
+E2D1 5E8B # <CJK>
+E2D2 5E96 # <CJK>
+E2D3 5EA5 # <CJK>
+E2D4 5EA0 # <CJK>
+E2D5 5EB9 # <CJK>
+E2D6 5EB5 # <CJK>
+E2D7 5EBE # <CJK>
+E2D8 5EB3 # <CJK>
+E2D9 8D53 # <CJK>
+E2DA 5ED2 # <CJK>
+E2DB 5ED1 # <CJK>
+E2DC 5EDB # <CJK>
+E2DD 5EE8 # <CJK>
+E2DE 5EEA # <CJK>
+E2DF 81BA # <CJK>
+E2E0 5FC4 # <CJK>
+E2E1 5FC9 # <CJK>
+E2E2 5FD6 # <CJK>
+E2E3 5FCF # <CJK>
+E2E4 6003 # <CJK>
+E2E5 5FEE # <CJK>
+E2E6 6004 # <CJK>
+E2E7 5FE1 # <CJK>
+E2E8 5FE4 # <CJK>
+E2E9 5FFE # <CJK>
+E2EA 6005 # <CJK>
+E2EB 6006 # <CJK>
+E2EC 5FEA # <CJK>
+E2ED 5FED # <CJK>
+E2EE 5FF8 # <CJK>
+E2EF 6019 # <CJK>
+E2F0 6035 # <CJK>
+E2F1 6026 # <CJK>
+E2F2 601B # <CJK>
+E2F3 600F # <CJK>
+E2F4 600D # <CJK>
+E2F5 6029 # <CJK>
+E2F6 602B # <CJK>
+E2F7 600A # <CJK>
+E2F8 603F # <CJK>
+E2F9 6021 # <CJK>
+E2FA 6078 # <CJK>
+E2FB 6079 # <CJK>
+E2FC 607B # <CJK>
+E2FD 607A # <CJK>
+E2FE 6042 # <CJK>
+E3A1 606A # <CJK>
+E3A2 607D # <CJK>
+E3A3 6096 # <CJK>
+E3A4 609A # <CJK>
+E3A5 60AD # <CJK>
+E3A6 609D # <CJK>
+E3A7 6083 # <CJK>
+E3A8 6092 # <CJK>
+E3A9 608C # <CJK>
+E3AA 609B # <CJK>
+E3AB 60EC # <CJK>
+E3AC 60BB # <CJK>
+E3AD 60B1 # <CJK>
+E3AE 60DD # <CJK>
+E3AF 60D8 # <CJK>
+E3B0 60C6 # <CJK>
+E3B1 60DA # <CJK>
+E3B2 60B4 # <CJK>
+E3B3 6120 # <CJK>
+E3B4 6126 # <CJK>
+E3B5 6115 # <CJK>
+E3B6 6123 # <CJK>
+E3B7 60F4 # <CJK>
+E3B8 6100 # <CJK>
+E3B9 610E # <CJK>
+E3BA 612B # <CJK>
+E3BB 614A # <CJK>
+E3BC 6175 # <CJK>
+E3BD 61AC # <CJK>
+E3BE 6194 # <CJK>
+E3BF 61A7 # <CJK>
+E3C0 61B7 # <CJK>
+E3C1 61D4 # <CJK>
+E3C2 61F5 # <CJK>
+E3C3 5FDD # <CJK>
+E3C4 96B3 # <CJK>
+E3C5 95E9 # <CJK>
+E3C6 95EB # <CJK>
+E3C7 95F1 # <CJK>
+E3C8 95F3 # <CJK>
+E3C9 95F5 # <CJK>
+E3CA 95F6 # <CJK>
+E3CB 95FC # <CJK>
+E3CC 95FE # <CJK>
+E3CD 9603 # <CJK>
+E3CE 9604 # <CJK>
+E3CF 9606 # <CJK>
+E3D0 9608 # <CJK>
+E3D1 960A # <CJK>
+E3D2 960B # <CJK>
+E3D3 960C # <CJK>
+E3D4 960D # <CJK>
+E3D5 960F # <CJK>
+E3D6 9612 # <CJK>
+E3D7 9615 # <CJK>
+E3D8 9616 # <CJK>
+E3D9 9617 # <CJK>
+E3DA 9619 # <CJK>
+E3DB 961A # <CJK>
+E3DC 4E2C # <CJK>
+E3DD 723F # <CJK>
+E3DE 6215 # <CJK>
+E3DF 6C35 # <CJK>
+E3E0 6C54 # <CJK>
+E3E1 6C5C # <CJK>
+E3E2 6C4A # <CJK>
+E3E3 6CA3 # <CJK>
+E3E4 6C85 # <CJK>
+E3E5 6C90 # <CJK>
+E3E6 6C94 # <CJK>
+E3E7 6C8C # <CJK>
+E3E8 6C68 # <CJK>
+E3E9 6C69 # <CJK>
+E3EA 6C74 # <CJK>
+E3EB 6C76 # <CJK>
+E3EC 6C86 # <CJK>
+E3ED 6CA9 # <CJK>
+E3EE 6CD0 # <CJK>
+E3EF 6CD4 # <CJK>
+E3F0 6CAD # <CJK>
+E3F1 6CF7 # <CJK>
+E3F2 6CF8 # <CJK>
+E3F3 6CF1 # <CJK>
+E3F4 6CD7 # <CJK>
+E3F5 6CB2 # <CJK>
+E3F6 6CE0 # <CJK>
+E3F7 6CD6 # <CJK>
+E3F8 6CFA # <CJK>
+E3F9 6CEB # <CJK>
+E3FA 6CEE # <CJK>
+E3FB 6CB1 # <CJK>
+E3FC 6CD3 # <CJK>
+E3FD 6CEF # <CJK>
+E3FE 6CFE # <CJK>
+E4A1 6D39 # <CJK>
+E4A2 6D27 # <CJK>
+E4A3 6D0C # <CJK>
+E4A4 6D43 # <CJK>
+E4A5 6D48 # <CJK>
+E4A6 6D07 # <CJK>
+E4A7 6D04 # <CJK>
+E4A8 6D19 # <CJK>
+E4A9 6D0E # <CJK>
+E4AA 6D2B # <CJK>
+E4AB 6D4D # <CJK>
+E4AC 6D2E # <CJK>
+E4AD 6D35 # <CJK>
+E4AE 6D1A # <CJK>
+E4AF 6D4F # <CJK>
+E4B0 6D52 # <CJK>
+E4B1 6D54 # <CJK>
+E4B2 6D33 # <CJK>
+E4B3 6D91 # <CJK>
+E4B4 6D6F # <CJK>
+E4B5 6D9E # <CJK>
+E4B6 6DA0 # <CJK>
+E4B7 6D5E # <CJK>
+E4B8 6D93 # <CJK>
+E4B9 6D94 # <CJK>
+E4BA 6D5C # <CJK>
+E4BB 6D60 # <CJK>
+E4BC 6D7C # <CJK>
+E4BD 6D63 # <CJK>
+E4BE 6E1A # <CJK>
+E4BF 6DC7 # <CJK>
+E4C0 6DC5 # <CJK>
+E4C1 6DDE # <CJK>
+E4C2 6E0E # <CJK>
+E4C3 6DBF # <CJK>
+E4C4 6DE0 # <CJK>
+E4C5 6E11 # <CJK>
+E4C6 6DE6 # <CJK>
+E4C7 6DDD # <CJK>
+E4C8 6DD9 # <CJK>
+E4C9 6E16 # <CJK>
+E4CA 6DAB # <CJK>
+E4CB 6E0C # <CJK>
+E4CC 6DAE # <CJK>
+E4CD 6E2B # <CJK>
+E4CE 6E6E # <CJK>
+E4CF 6E4E # <CJK>
+E4D0 6E6B # <CJK>
+E4D1 6EB2 # <CJK>
+E4D2 6E5F # <CJK>
+E4D3 6E86 # <CJK>
+E4D4 6E53 # <CJK>
+E4D5 6E54 # <CJK>
+E4D6 6E32 # <CJK>
+E4D7 6E25 # <CJK>
+E4D8 6E44 # <CJK>
+E4D9 6EDF # <CJK>
+E4DA 6EB1 # <CJK>
+E4DB 6E98 # <CJK>
+E4DC 6EE0 # <CJK>
+E4DD 6F2D # <CJK>
+E4DE 6EE2 # <CJK>
+E4DF 6EA5 # <CJK>
+E4E0 6EA7 # <CJK>
+E4E1 6EBD # <CJK>
+E4E2 6EBB # <CJK>
+E4E3 6EB7 # <CJK>
+E4E4 6ED7 # <CJK>
+E4E5 6EB4 # <CJK>
+E4E6 6ECF # <CJK>
+E4E7 6E8F # <CJK>
+E4E8 6EC2 # <CJK>
+E4E9 6E9F # <CJK>
+E4EA 6F62 # <CJK>
+E4EB 6F46 # <CJK>
+E4EC 6F47 # <CJK>
+E4ED 6F24 # <CJK>
+E4EE 6F15 # <CJK>
+E4EF 6EF9 # <CJK>
+E4F0 6F2F # <CJK>
+E4F1 6F36 # <CJK>
+E4F2 6F4B # <CJK>
+E4F3 6F74 # <CJK>
+E4F4 6F2A # <CJK>
+E4F5 6F09 # <CJK>
+E4F6 6F29 # <CJK>
+E4F7 6F89 # <CJK>
+E4F8 6F8D # <CJK>
+E4F9 6F8C # <CJK>
+E4FA 6F78 # <CJK>
+E4FB 6F72 # <CJK>
+E4FC 6F7C # <CJK>
+E4FD 6F7A # <CJK>
+E4FE 6FD1 # <CJK>
+E5A1 6FC9 # <CJK>
+E5A2 6FA7 # <CJK>
+E5A3 6FB9 # <CJK>
+E5A4 6FB6 # <CJK>
+E5A5 6FC2 # <CJK>
+E5A6 6FE1 # <CJK>
+E5A7 6FEE # <CJK>
+E5A8 6FDE # <CJK>
+E5A9 6FE0 # <CJK>
+E5AA 6FEF # <CJK>
+E5AB 701A # <CJK>
+E5AC 7023 # <CJK>
+E5AD 701B # <CJK>
+E5AE 7039 # <CJK>
+E5AF 7035 # <CJK>
+E5B0 704F # <CJK>
+E5B1 705E # <CJK>
+E5B2 5B80 # <CJK>
+E5B3 5B84 # <CJK>
+E5B4 5B95 # <CJK>
+E5B5 5B93 # <CJK>
+E5B6 5BA5 # <CJK>
+E5B7 5BB8 # <CJK>
+E5B8 752F # <CJK>
+E5B9 9A9E # <CJK>
+E5BA 6434 # <CJK>
+E5BB 5BE4 # <CJK>
+E5BC 5BEE # <CJK>
+E5BD 8930 # <CJK>
+E5BE 5BF0 # <CJK>
+E5BF 8E47 # <CJK>
+E5C0 8B07 # <CJK>
+E5C1 8FB6 # <CJK>
+E5C2 8FD3 # <CJK>
+E5C3 8FD5 # <CJK>
+E5C4 8FE5 # <CJK>
+E5C5 8FEE # <CJK>
+E5C6 8FE4 # <CJK>
+E5C7 8FE9 # <CJK>
+E5C8 8FE6 # <CJK>
+E5C9 8FF3 # <CJK>
+E5CA 8FE8 # <CJK>
+E5CB 9005 # <CJK>
+E5CC 9004 # <CJK>
+E5CD 900B # <CJK>
+E5CE 9026 # <CJK>
+E5CF 9011 # <CJK>
+E5D0 900D # <CJK>
+E5D1 9016 # <CJK>
+E5D2 9021 # <CJK>
+E5D3 9035 # <CJK>
+E5D4 9036 # <CJK>
+E5D5 902D # <CJK>
+E5D6 902F # <CJK>
+E5D7 9044 # <CJK>
+E5D8 9051 # <CJK>
+E5D9 9052 # <CJK>
+E5DA 9050 # <CJK>
+E5DB 9068 # <CJK>
+E5DC 9058 # <CJK>
+E5DD 9062 # <CJK>
+E5DE 905B # <CJK>
+E5DF 66B9 # <CJK>
+E5E0 9074 # <CJK>
+E5E1 907D # <CJK>
+E5E2 9082 # <CJK>
+E5E3 9088 # <CJK>
+E5E4 9083 # <CJK>
+E5E5 908B # <CJK>
+E5E6 5F50 # <CJK>
+E5E7 5F57 # <CJK>
+E5E8 5F56 # <CJK>
+E5E9 5F58 # <CJK>
+E5EA 5C3B # <CJK>
+E5EB 54AB # <CJK>
+E5EC 5C50 # <CJK>
+E5ED 5C59 # <CJK>
+E5EE 5B71 # <CJK>
+E5EF 5C63 # <CJK>
+E5F0 5C66 # <CJK>
+E5F1 7FBC # <CJK>
+E5F2 5F2A # <CJK>
+E5F3 5F29 # <CJK>
+E5F4 5F2D # <CJK>
+E5F5 8274 # <CJK>
+E5F6 5F3C # <CJK>
+E5F7 9B3B # <CJK>
+E5F8 5C6E # <CJK>
+E5F9 5981 # <CJK>
+E5FA 5983 # <CJK>
+E5FB 598D # <CJK>
+E5FC 59A9 # <CJK>
+E5FD 59AA # <CJK>
+E5FE 59A3 # <CJK>
+E6A1 5997 # <CJK>
+E6A2 59CA # <CJK>
+E6A3 59AB # <CJK>
+E6A4 599E # <CJK>
+E6A5 59A4 # <CJK>
+E6A6 59D2 # <CJK>
+E6A7 59B2 # <CJK>
+E6A8 59AF # <CJK>
+E6A9 59D7 # <CJK>
+E6AA 59BE # <CJK>
+E6AB 5A05 # <CJK>
+E6AC 5A06 # <CJK>
+E6AD 59DD # <CJK>
+E6AE 5A08 # <CJK>
+E6AF 59E3 # <CJK>
+E6B0 59D8 # <CJK>
+E6B1 59F9 # <CJK>
+E6B2 5A0C # <CJK>
+E6B3 5A09 # <CJK>
+E6B4 5A32 # <CJK>
+E6B5 5A34 # <CJK>
+E6B6 5A11 # <CJK>
+E6B7 5A23 # <CJK>
+E6B8 5A13 # <CJK>
+E6B9 5A40 # <CJK>
+E6BA 5A67 # <CJK>
+E6BB 5A4A # <CJK>
+E6BC 5A55 # <CJK>
+E6BD 5A3C # <CJK>
+E6BE 5A62 # <CJK>
+E6BF 5A75 # <CJK>
+E6C0 80EC # <CJK>
+E6C1 5AAA # <CJK>
+E6C2 5A9B # <CJK>
+E6C3 5A77 # <CJK>
+E6C4 5A7A # <CJK>
+E6C5 5ABE # <CJK>
+E6C6 5AEB # <CJK>
+E6C7 5AB2 # <CJK>
+E6C8 5AD2 # <CJK>
+E6C9 5AD4 # <CJK>
+E6CA 5AB8 # <CJK>
+E6CB 5AE0 # <CJK>
+E6CC 5AE3 # <CJK>
+E6CD 5AF1 # <CJK>
+E6CE 5AD6 # <CJK>
+E6CF 5AE6 # <CJK>
+E6D0 5AD8 # <CJK>
+E6D1 5ADC # <CJK>
+E6D2 5B09 # <CJK>
+E6D3 5B17 # <CJK>
+E6D4 5B16 # <CJK>
+E6D5 5B32 # <CJK>
+E6D6 5B37 # <CJK>
+E6D7 5B40 # <CJK>
+E6D8 5C15 # <CJK>
+E6D9 5C1C # <CJK>
+E6DA 5B5A # <CJK>
+E6DB 5B65 # <CJK>
+E6DC 5B73 # <CJK>
+E6DD 5B51 # <CJK>
+E6DE 5B53 # <CJK>
+E6DF 5B62 # <CJK>
+E6E0 9A75 # <CJK>
+E6E1 9A77 # <CJK>
+E6E2 9A78 # <CJK>
+E6E3 9A7A # <CJK>
+E6E4 9A7F # <CJK>
+E6E5 9A7D # <CJK>
+E6E6 9A80 # <CJK>
+E6E7 9A81 # <CJK>
+E6E8 9A85 # <CJK>
+E6E9 9A88 # <CJK>
+E6EA 9A8A # <CJK>
+E6EB 9A90 # <CJK>
+E6EC 9A92 # <CJK>
+E6ED 9A93 # <CJK>
+E6EE 9A96 # <CJK>
+E6EF 9A98 # <CJK>
+E6F0 9A9B # <CJK>
+E6F1 9A9C # <CJK>
+E6F2 9A9D # <CJK>
+E6F3 9A9F # <CJK>
+E6F4 9AA0 # <CJK>
+E6F5 9AA2 # <CJK>
+E6F6 9AA3 # <CJK>
+E6F7 9AA5 # <CJK>
+E6F8 9AA7 # <CJK>
+E6F9 7E9F # <CJK>
+E6FA 7EA1 # <CJK>
+E6FB 7EA3 # <CJK>
+E6FC 7EA5 # <CJK>
+E6FD 7EA8 # <CJK>
+E6FE 7EA9 # <CJK>
+E7A1 7EAD # <CJK>
+E7A2 7EB0 # <CJK>
+E7A3 7EBE # <CJK>
+E7A4 7EC0 # <CJK>
+E7A5 7EC1 # <CJK>
+E7A6 7EC2 # <CJK>
+E7A7 7EC9 # <CJK>
+E7A8 7ECB # <CJK>
+E7A9 7ECC # <CJK>
+E7AA 7ED0 # <CJK>
+E7AB 7ED4 # <CJK>
+E7AC 7ED7 # <CJK>
+E7AD 7EDB # <CJK>
+E7AE 7EE0 # <CJK>
+E7AF 7EE1 # <CJK>
+E7B0 7EE8 # <CJK>
+E7B1 7EEB # <CJK>
+E7B2 7EEE # <CJK>
+E7B3 7EEF # <CJK>
+E7B4 7EF1 # <CJK>
+E7B5 7EF2 # <CJK>
+E7B6 7F0D # <CJK>
+E7B7 7EF6 # <CJK>
+E7B8 7EFA # <CJK>
+E7B9 7EFB # <CJK>
+E7BA 7EFE # <CJK>
+E7BB 7F01 # <CJK>
+E7BC 7F02 # <CJK>
+E7BD 7F03 # <CJK>
+E7BE 7F07 # <CJK>
+E7BF 7F08 # <CJK>
+E7C0 7F0B # <CJK>
+E7C1 7F0C # <CJK>
+E7C2 7F0F # <CJK>
+E7C3 7F11 # <CJK>
+E7C4 7F12 # <CJK>
+E7C5 7F17 # <CJK>
+E7C6 7F19 # <CJK>
+E7C7 7F1C # <CJK>
+E7C8 7F1B # <CJK>
+E7C9 7F1F # <CJK>
+E7CA 7F21 # <CJK>
+E7CB 7F22 # <CJK>
+E7CC 7F23 # <CJK>
+E7CD 7F24 # <CJK>
+E7CE 7F25 # <CJK>
+E7CF 7F26 # <CJK>
+E7D0 7F27 # <CJK>
+E7D1 7F2A # <CJK>
+E7D2 7F2B # <CJK>
+E7D3 7F2C # <CJK>
+E7D4 7F2D # <CJK>
+E7D5 7F2F # <CJK>
+E7D6 7F30 # <CJK>
+E7D7 7F31 # <CJK>
+E7D8 7F32 # <CJK>
+E7D9 7F33 # <CJK>
+E7DA 7F35 # <CJK>
+E7DB 5E7A # <CJK>
+E7DC 757F # <CJK>
+E7DD 5DDB # <CJK>
+E7DE 753E # <CJK>
+E7DF 9095 # <CJK>
+E7E0 738E # <CJK>
+E7E1 7391 # <CJK>
+E7E2 73AE # <CJK>
+E7E3 73A2 # <CJK>
+E7E4 739F # <CJK>
+E7E5 73CF # <CJK>
+E7E6 73C2 # <CJK>
+E7E7 73D1 # <CJK>
+E7E8 73B7 # <CJK>
+E7E9 73B3 # <CJK>
+E7EA 73C0 # <CJK>
+E7EB 73C9 # <CJK>
+E7EC 73C8 # <CJK>
+E7ED 73E5 # <CJK>
+E7EE 73D9 # <CJK>
+E7EF 987C # <CJK>
+E7F0 740A # <CJK>
+E7F1 73E9 # <CJK>
+E7F2 73E7 # <CJK>
+E7F3 73DE # <CJK>
+E7F4 73BA # <CJK>
+E7F5 73F2 # <CJK>
+E7F6 740F # <CJK>
+E7F7 742A # <CJK>
+E7F8 745B # <CJK>
+E7F9 7426 # <CJK>
+E7FA 7425 # <CJK>
+E7FB 7428 # <CJK>
+E7FC 7430 # <CJK>
+E7FD 742E # <CJK>
+E7FE 742C # <CJK>
+E8A1 741B # <CJK>
+E8A2 741A # <CJK>
+E8A3 7441 # <CJK>
+E8A4 745C # <CJK>
+E8A5 7457 # <CJK>
+E8A6 7455 # <CJK>
+E8A7 7459 # <CJK>
+E8A8 7477 # <CJK>
+E8A9 746D # <CJK>
+E8AA 747E # <CJK>
+E8AB 749C # <CJK>
+E8AC 748E # <CJK>
+E8AD 7480 # <CJK>
+E8AE 7481 # <CJK>
+E8AF 7487 # <CJK>
+E8B0 748B # <CJK>
+E8B1 749E # <CJK>
+E8B2 74A8 # <CJK>
+E8B3 74A9 # <CJK>
+E8B4 7490 # <CJK>
+E8B5 74A7 # <CJK>
+E8B6 74D2 # <CJK>
+E8B7 74BA # <CJK>
+E8B8 97EA # <CJK>
+E8B9 97EB # <CJK>
+E8BA 97EC # <CJK>
+E8BB 674C # <CJK>
+E8BC 6753 # <CJK>
+E8BD 675E # <CJK>
+E8BE 6748 # <CJK>
+E8BF 6769 # <CJK>
+E8C0 67A5 # <CJK>
+E8C1 6787 # <CJK>
+E8C2 676A # <CJK>
+E8C3 6773 # <CJK>
+E8C4 6798 # <CJK>
+E8C5 67A7 # <CJK>
+E8C6 6775 # <CJK>
+E8C7 67A8 # <CJK>
+E8C8 679E # <CJK>
+E8C9 67AD # <CJK>
+E8CA 678B # <CJK>
+E8CB 6777 # <CJK>
+E8CC 677C # <CJK>
+E8CD 67F0 # <CJK>
+E8CE 6809 # <CJK>
+E8CF 67D8 # <CJK>
+E8D0 680A # <CJK>
+E8D1 67E9 # <CJK>
+E8D2 67B0 # <CJK>
+E8D3 680C # <CJK>
+E8D4 67D9 # <CJK>
+E8D5 67B5 # <CJK>
+E8D6 67DA # <CJK>
+E8D7 67B3 # <CJK>
+E8D8 67DD # <CJK>
+E8D9 6800 # <CJK>
+E8DA 67C3 # <CJK>
+E8DB 67B8 # <CJK>
+E8DC 67E2 # <CJK>
+E8DD 680E # <CJK>
+E8DE 67C1 # <CJK>
+E8DF 67FD # <CJK>
+E8E0 6832 # <CJK>
+E8E1 6833 # <CJK>
+E8E2 6860 # <CJK>
+E8E3 6861 # <CJK>
+E8E4 684E # <CJK>
+E8E5 6862 # <CJK>
+E8E6 6844 # <CJK>
+E8E7 6864 # <CJK>
+E8E8 6883 # <CJK>
+E8E9 681D # <CJK>
+E8EA 6855 # <CJK>
+E8EB 6866 # <CJK>
+E8EC 6841 # <CJK>
+E8ED 6867 # <CJK>
+E8EE 6840 # <CJK>
+E8EF 683E # <CJK>
+E8F0 684A # <CJK>
+E8F1 6849 # <CJK>
+E8F2 6829 # <CJK>
+E8F3 68B5 # <CJK>
+E8F4 688F # <CJK>
+E8F5 6874 # <CJK>
+E8F6 6877 # <CJK>
+E8F7 6893 # <CJK>
+E8F8 686B # <CJK>
+E8F9 68C2 # <CJK>
+E8FA 696E # <CJK>
+E8FB 68FC # <CJK>
+E8FC 691F # <CJK>
+E8FD 6920 # <CJK>
+E8FE 68F9 # <CJK>
+E9A1 6924 # <CJK>
+E9A2 68F0 # <CJK>
+E9A3 690B # <CJK>
+E9A4 6901 # <CJK>
+E9A5 6957 # <CJK>
+E9A6 68E3 # <CJK>
+E9A7 6910 # <CJK>
+E9A8 6971 # <CJK>
+E9A9 6939 # <CJK>
+E9AA 6960 # <CJK>
+E9AB 6942 # <CJK>
+E9AC 695D # <CJK>
+E9AD 6984 # <CJK>
+E9AE 696B # <CJK>
+E9AF 6980 # <CJK>
+E9B0 6998 # <CJK>
+E9B1 6978 # <CJK>
+E9B2 6934 # <CJK>
+E9B3 69CC # <CJK>
+E9B4 6987 # <CJK>
+E9B5 6988 # <CJK>
+E9B6 69CE # <CJK>
+E9B7 6989 # <CJK>
+E9B8 6966 # <CJK>
+E9B9 6963 # <CJK>
+E9BA 6979 # <CJK>
+E9BB 699B # <CJK>
+E9BC 69A7 # <CJK>
+E9BD 69BB # <CJK>
+E9BE 69AB # <CJK>
+E9BF 69AD # <CJK>
+E9C0 69D4 # <CJK>
+E9C1 69B1 # <CJK>
+E9C2 69C1 # <CJK>
+E9C3 69CA # <CJK>
+E9C4 69DF # <CJK>
+E9C5 6995 # <CJK>
+E9C6 69E0 # <CJK>
+E9C7 698D # <CJK>
+E9C8 69FF # <CJK>
+E9C9 6A2F # <CJK>
+E9CA 69ED # <CJK>
+E9CB 6A17 # <CJK>
+E9CC 6A18 # <CJK>
+E9CD 6A65 # <CJK>
+E9CE 69F2 # <CJK>
+E9CF 6A44 # <CJK>
+E9D0 6A3E # <CJK>
+E9D1 6AA0 # <CJK>
+E9D2 6A50 # <CJK>
+E9D3 6A5B # <CJK>
+E9D4 6A35 # <CJK>
+E9D5 6A8E # <CJK>
+E9D6 6A79 # <CJK>
+E9D7 6A3D # <CJK>
+E9D8 6A28 # <CJK>
+E9D9 6A58 # <CJK>
+E9DA 6A7C # <CJK>
+E9DB 6A91 # <CJK>
+E9DC 6A90 # <CJK>
+E9DD 6AA9 # <CJK>
+E9DE 6A97 # <CJK>
+E9DF 6AAB # <CJK>
+E9E0 7337 # <CJK>
+E9E1 7352 # <CJK>
+E9E2 6B81 # <CJK>
+E9E3 6B82 # <CJK>
+E9E4 6B87 # <CJK>
+E9E5 6B84 # <CJK>
+E9E6 6B92 # <CJK>
+E9E7 6B93 # <CJK>
+E9E8 6B8D # <CJK>
+E9E9 6B9A # <CJK>
+E9EA 6B9B # <CJK>
+E9EB 6BA1 # <CJK>
+E9EC 6BAA # <CJK>
+E9ED 8F6B # <CJK>
+E9EE 8F6D # <CJK>
+E9EF 8F71 # <CJK>
+E9F0 8F72 # <CJK>
+E9F1 8F73 # <CJK>
+E9F2 8F75 # <CJK>
+E9F3 8F76 # <CJK>
+E9F4 8F78 # <CJK>
+E9F5 8F77 # <CJK>
+E9F6 8F79 # <CJK>
+E9F7 8F7A # <CJK>
+E9F8 8F7C # <CJK>
+E9F9 8F7E # <CJK>
+E9FA 8F81 # <CJK>
+E9FB 8F82 # <CJK>
+E9FC 8F84 # <CJK>
+E9FD 8F87 # <CJK>
+E9FE 8F8B # <CJK>
+EAA1 8F8D # <CJK>
+EAA2 8F8E # <CJK>
+EAA3 8F8F # <CJK>
+EAA4 8F98 # <CJK>
+EAA5 8F9A # <CJK>
+EAA6 8ECE # <CJK>
+EAA7 620B # <CJK>
+EAA8 6217 # <CJK>
+EAA9 621B # <CJK>
+EAAA 621F # <CJK>
+EAAB 6222 # <CJK>
+EAAC 6221 # <CJK>
+EAAD 6225 # <CJK>
+EAAE 6224 # <CJK>
+EAAF 622C # <CJK>
+EAB0 81E7 # <CJK>
+EAB1 74EF # <CJK>
+EAB2 74F4 # <CJK>
+EAB3 74FF # <CJK>
+EAB4 750F # <CJK>
+EAB5 7511 # <CJK>
+EAB6 7513 # <CJK>
+EAB7 6534 # <CJK>
+EAB8 65EE # <CJK>
+EAB9 65EF # <CJK>
+EABA 65F0 # <CJK>
+EABB 660A # <CJK>
+EABC 6619 # <CJK>
+EABD 6772 # <CJK>
+EABE 6603 # <CJK>
+EABF 6615 # <CJK>
+EAC0 6600 # <CJK>
+EAC1 7085 # <CJK>
+EAC2 66F7 # <CJK>
+EAC3 661D # <CJK>
+EAC4 6634 # <CJK>
+EAC5 6631 # <CJK>
+EAC6 6636 # <CJK>
+EAC7 6635 # <CJK>
+EAC8 8006 # <CJK>
+EAC9 665F # <CJK>
+EACA 6654 # <CJK>
+EACB 6641 # <CJK>
+EACC 664F # <CJK>
+EACD 6656 # <CJK>
+EACE 6661 # <CJK>
+EACF 6657 # <CJK>
+EAD0 6677 # <CJK>
+EAD1 6684 # <CJK>
+EAD2 668C # <CJK>
+EAD3 66A7 # <CJK>
+EAD4 669D # <CJK>
+EAD5 66BE # <CJK>
+EAD6 66DB # <CJK>
+EAD7 66DC # <CJK>
+EAD8 66E6 # <CJK>
+EAD9 66E9 # <CJK>
+EADA 8D32 # <CJK>
+EADB 8D33 # <CJK>
+EADC 8D36 # <CJK>
+EADD 8D3B # <CJK>
+EADE 8D3D # <CJK>
+EADF 8D40 # <CJK>
+EAE0 8D45 # <CJK>
+EAE1 8D46 # <CJK>
+EAE2 8D48 # <CJK>
+EAE3 8D49 # <CJK>
+EAE4 8D47 # <CJK>
+EAE5 8D4D # <CJK>
+EAE6 8D55 # <CJK>
+EAE7 8D59 # <CJK>
+EAE8 89C7 # <CJK>
+EAE9 89CA # <CJK>
+EAEA 89CB # <CJK>
+EAEB 89CC # <CJK>
+EAEC 89CE # <CJK>
+EAED 89CF # <CJK>
+EAEE 89D0 # <CJK>
+EAEF 89D1 # <CJK>
+EAF0 726E # <CJK>
+EAF1 729F # <CJK>
+EAF2 725D # <CJK>
+EAF3 7266 # <CJK>
+EAF4 726F # <CJK>
+EAF5 727E # <CJK>
+EAF6 727F # <CJK>
+EAF7 7284 # <CJK>
+EAF8 728B # <CJK>
+EAF9 728D # <CJK>
+EAFA 728F # <CJK>
+EAFB 7292 # <CJK>
+EAFC 6308 # <CJK>
+EAFD 6332 # <CJK>
+EAFE 63B0 # <CJK>
+EBA1 643F # <CJK>
+EBA2 64D8 # <CJK>
+EBA3 8004 # <CJK>
+EBA4 6BEA # <CJK>
+EBA5 6BF3 # <CJK>
+EBA6 6BFD # <CJK>
+EBA7 6BF5 # <CJK>
+EBA8 6BF9 # <CJK>
+EBA9 6C05 # <CJK>
+EBAA 6C07 # <CJK>
+EBAB 6C06 # <CJK>
+EBAC 6C0D # <CJK>
+EBAD 6C15 # <CJK>
+EBAE 6C18 # <CJK>
+EBAF 6C19 # <CJK>
+EBB0 6C1A # <CJK>
+EBB1 6C21 # <CJK>
+EBB2 6C29 # <CJK>
+EBB3 6C24 # <CJK>
+EBB4 6C2A # <CJK>
+EBB5 6C32 # <CJK>
+EBB6 6535 # <CJK>
+EBB7 6555 # <CJK>
+EBB8 656B # <CJK>
+EBB9 724D # <CJK>
+EBBA 7252 # <CJK>
+EBBB 7256 # <CJK>
+EBBC 7230 # <CJK>
+EBBD 8662 # <CJK>
+EBBE 5216 # <CJK>
+EBBF 809F # <CJK>
+EBC0 809C # <CJK>
+EBC1 8093 # <CJK>
+EBC2 80BC # <CJK>
+EBC3 670A # <CJK>
+EBC4 80BD # <CJK>
+EBC5 80B1 # <CJK>
+EBC6 80AB # <CJK>
+EBC7 80AD # <CJK>
+EBC8 80B4 # <CJK>
+EBC9 80B7 # <CJK>
+EBCA 80E7 # <CJK>
+EBCB 80E8 # <CJK>
+EBCC 80E9 # <CJK>
+EBCD 80EA # <CJK>
+EBCE 80DB # <CJK>
+EBCF 80C2 # <CJK>
+EBD0 80C4 # <CJK>
+EBD1 80D9 # <CJK>
+EBD2 80CD # <CJK>
+EBD3 80D7 # <CJK>
+EBD4 6710 # <CJK>
+EBD5 80DD # <CJK>
+EBD6 80EB # <CJK>
+EBD7 80F1 # <CJK>
+EBD8 80F4 # <CJK>
+EBD9 80ED # <CJK>
+EBDA 810D # <CJK>
+EBDB 810E # <CJK>
+EBDC 80F2 # <CJK>
+EBDD 80FC # <CJK>
+EBDE 6715 # <CJK>
+EBDF 8112 # <CJK>
+EBE0 8C5A # <CJK>
+EBE1 8136 # <CJK>
+EBE2 811E # <CJK>
+EBE3 812C # <CJK>
+EBE4 8118 # <CJK>
+EBE5 8132 # <CJK>
+EBE6 8148 # <CJK>
+EBE7 814C # <CJK>
+EBE8 8153 # <CJK>
+EBE9 8174 # <CJK>
+EBEA 8159 # <CJK>
+EBEB 815A # <CJK>
+EBEC 8171 # <CJK>
+EBED 8160 # <CJK>
+EBEE 8169 # <CJK>
+EBEF 817C # <CJK>
+EBF0 817D # <CJK>
+EBF1 816D # <CJK>
+EBF2 8167 # <CJK>
+EBF3 584D # <CJK>
+EBF4 5AB5 # <CJK>
+EBF5 8188 # <CJK>
+EBF6 8182 # <CJK>
+EBF7 8191 # <CJK>
+EBF8 6ED5 # <CJK>
+EBF9 81A3 # <CJK>
+EBFA 81AA # <CJK>
+EBFB 81CC # <CJK>
+EBFC 6726 # <CJK>
+EBFD 81CA # <CJK>
+EBFE 81BB # <CJK>
+ECA1 81C1 # <CJK>
+ECA2 81A6 # <CJK>
+ECA3 6B24 # <CJK>
+ECA4 6B37 # <CJK>
+ECA5 6B39 # <CJK>
+ECA6 6B43 # <CJK>
+ECA7 6B46 # <CJK>
+ECA8 6B59 # <CJK>
+ECA9 98D1 # <CJK>
+ECAA 98D2 # <CJK>
+ECAB 98D3 # <CJK>
+ECAC 98D5 # <CJK>
+ECAD 98D9 # <CJK>
+ECAE 98DA # <CJK>
+ECAF 6BB3 # <CJK>
+ECB0 5F40 # <CJK>
+ECB1 6BC2 # <CJK>
+ECB2 89F3 # <CJK>
+ECB3 6590 # <CJK>
+ECB4 9F51 # <CJK>
+ECB5 6593 # <CJK>
+ECB6 65BC # <CJK>
+ECB7 65C6 # <CJK>
+ECB8 65C4 # <CJK>
+ECB9 65C3 # <CJK>
+ECBA 65CC # <CJK>
+ECBB 65CE # <CJK>
+ECBC 65D2 # <CJK>
+ECBD 65D6 # <CJK>
+ECBE 7080 # <CJK>
+ECBF 709C # <CJK>
+ECC0 7096 # <CJK>
+ECC1 709D # <CJK>
+ECC2 70BB # <CJK>
+ECC3 70C0 # <CJK>
+ECC4 70B7 # <CJK>
+ECC5 70AB # <CJK>
+ECC6 70B1 # <CJK>
+ECC7 70E8 # <CJK>
+ECC8 70CA # <CJK>
+ECC9 7110 # <CJK>
+ECCA 7113 # <CJK>
+ECCB 7116 # <CJK>
+ECCC 712F # <CJK>
+ECCD 7131 # <CJK>
+ECCE 7173 # <CJK>
+ECCF 715C # <CJK>
+ECD0 7168 # <CJK>
+ECD1 7145 # <CJK>
+ECD2 7172 # <CJK>
+ECD3 714A # <CJK>
+ECD4 7178 # <CJK>
+ECD5 717A # <CJK>
+ECD6 7198 # <CJK>
+ECD7 71B3 # <CJK>
+ECD8 71B5 # <CJK>
+ECD9 71A8 # <CJK>
+ECDA 71A0 # <CJK>
+ECDB 71E0 # <CJK>
+ECDC 71D4 # <CJK>
+ECDD 71E7 # <CJK>
+ECDE 71F9 # <CJK>
+ECDF 721D # <CJK>
+ECE0 7228 # <CJK>
+ECE1 706C # <CJK>
+ECE2 7118 # <CJK>
+ECE3 7166 # <CJK>
+ECE4 71B9 # <CJK>
+ECE5 623E # <CJK>
+ECE6 623D # <CJK>
+ECE7 6243 # <CJK>
+ECE8 6248 # <CJK>
+ECE9 6249 # <CJK>
+ECEA 793B # <CJK>
+ECEB 7940 # <CJK>
+ECEC 7946 # <CJK>
+ECED 7949 # <CJK>
+ECEE 795B # <CJK>
+ECEF 795C # <CJK>
+ECF0 7953 # <CJK>
+ECF1 795A # <CJK>
+ECF2 7962 # <CJK>
+ECF3 7957 # <CJK>
+ECF4 7960 # <CJK>
+ECF5 796F # <CJK>
+ECF6 7967 # <CJK>
+ECF7 797A # <CJK>
+ECF8 7985 # <CJK>
+ECF9 798A # <CJK>
+ECFA 799A # <CJK>
+ECFB 79A7 # <CJK>
+ECFC 79B3 # <CJK>
+ECFD 5FD1 # <CJK>
+ECFE 5FD0 # <CJK>
+EDA1 603C # <CJK>
+EDA2 605D # <CJK>
+EDA3 605A # <CJK>
+EDA4 6067 # <CJK>
+EDA5 6041 # <CJK>
+EDA6 6059 # <CJK>
+EDA7 6063 # <CJK>
+EDA8 60AB # <CJK>
+EDA9 6106 # <CJK>
+EDAA 610D # <CJK>
+EDAB 615D # <CJK>
+EDAC 61A9 # <CJK>
+EDAD 619D # <CJK>
+EDAE 61CB # <CJK>
+EDAF 61D1 # <CJK>
+EDB0 6206 # <CJK>
+EDB1 8080 # <CJK>
+EDB2 807F # <CJK>
+EDB3 6C93 # <CJK>
+EDB4 6CF6 # <CJK>
+EDB5 6DFC # <CJK>
+EDB6 77F6 # <CJK>
+EDB7 77F8 # <CJK>
+EDB8 7800 # <CJK>
+EDB9 7809 # <CJK>
+EDBA 7817 # <CJK>
+EDBB 7818 # <CJK>
+EDBC 7811 # <CJK>
+EDBD 65AB # <CJK>
+EDBE 782D # <CJK>
+EDBF 781C # <CJK>
+EDC0 781D # <CJK>
+EDC1 7839 # <CJK>
+EDC2 783A # <CJK>
+EDC3 783B # <CJK>
+EDC4 781F # <CJK>
+EDC5 783C # <CJK>
+EDC6 7825 # <CJK>
+EDC7 782C # <CJK>
+EDC8 7823 # <CJK>
+EDC9 7829 # <CJK>
+EDCA 784E # <CJK>
+EDCB 786D # <CJK>
+EDCC 7856 # <CJK>
+EDCD 7857 # <CJK>
+EDCE 7826 # <CJK>
+EDCF 7850 # <CJK>
+EDD0 7847 # <CJK>
+EDD1 784C # <CJK>
+EDD2 786A # <CJK>
+EDD3 789B # <CJK>
+EDD4 7893 # <CJK>
+EDD5 789A # <CJK>
+EDD6 7887 # <CJK>
+EDD7 789C # <CJK>
+EDD8 78A1 # <CJK>
+EDD9 78A3 # <CJK>
+EDDA 78B2 # <CJK>
+EDDB 78B9 # <CJK>
+EDDC 78A5 # <CJK>
+EDDD 78D4 # <CJK>
+EDDE 78D9 # <CJK>
+EDDF 78C9 # <CJK>
+EDE0 78EC # <CJK>
+EDE1 78F2 # <CJK>
+EDE2 7905 # <CJK>
+EDE3 78F4 # <CJK>
+EDE4 7913 # <CJK>
+EDE5 7924 # <CJK>
+EDE6 791E # <CJK>
+EDE7 7934 # <CJK>
+EDE8 9F9B # <CJK>
+EDE9 9EF9 # <CJK>
+EDEA 9EFB # <CJK>
+EDEB 9EFC # <CJK>
+EDEC 76F1 # <CJK>
+EDED 7704 # <CJK>
+EDEE 770D # <CJK>
+EDEF 76F9 # <CJK>
+EDF0 7707 # <CJK>
+EDF1 7708 # <CJK>
+EDF2 771A # <CJK>
+EDF3 7722 # <CJK>
+EDF4 7719 # <CJK>
+EDF5 772D # <CJK>
+EDF6 7726 # <CJK>
+EDF7 7735 # <CJK>
+EDF8 7738 # <CJK>
+EDF9 7750 # <CJK>
+EDFA 7751 # <CJK>
+EDFB 7747 # <CJK>
+EDFC 7743 # <CJK>
+EDFD 775A # <CJK>
+EDFE 7768 # <CJK>
+EEA1 7762 # <CJK>
+EEA2 7765 # <CJK>
+EEA3 777F # <CJK>
+EEA4 778D # <CJK>
+EEA5 777D # <CJK>
+EEA6 7780 # <CJK>
+EEA7 778C # <CJK>
+EEA8 7791 # <CJK>
+EEA9 779F # <CJK>
+EEAA 77A0 # <CJK>
+EEAB 77B0 # <CJK>
+EEAC 77B5 # <CJK>
+EEAD 77BD # <CJK>
+EEAE 753A # <CJK>
+EEAF 7540 # <CJK>
+EEB0 754E # <CJK>
+EEB1 754B # <CJK>
+EEB2 7548 # <CJK>
+EEB3 755B # <CJK>
+EEB4 7572 # <CJK>
+EEB5 7579 # <CJK>
+EEB6 7583 # <CJK>
+EEB7 7F58 # <CJK>
+EEB8 7F61 # <CJK>
+EEB9 7F5F # <CJK>
+EEBA 8A48 # <CJK>
+EEBB 7F68 # <CJK>
+EEBC 7F74 # <CJK>
+EEBD 7F71 # <CJK>
+EEBE 7F79 # <CJK>
+EEBF 7F81 # <CJK>
+EEC0 7F7E # <CJK>
+EEC1 76CD # <CJK>
+EEC2 76E5 # <CJK>
+EEC3 8832 # <CJK>
+EEC4 9485 # <CJK>
+EEC5 9486 # <CJK>
+EEC6 9487 # <CJK>
+EEC7 948B # <CJK>
+EEC8 948A # <CJK>
+EEC9 948C # <CJK>
+EECA 948D # <CJK>
+EECB 948F # <CJK>
+EECC 9490 # <CJK>
+EECD 9494 # <CJK>
+EECE 9497 # <CJK>
+EECF 9495 # <CJK>
+EED0 949A # <CJK>
+EED1 949B # <CJK>
+EED2 949C # <CJK>
+EED3 94A3 # <CJK>
+EED4 94A4 # <CJK>
+EED5 94AB # <CJK>
+EED6 94AA # <CJK>
+EED7 94AD # <CJK>
+EED8 94AC # <CJK>
+EED9 94AF # <CJK>
+EEDA 94B0 # <CJK>
+EEDB 94B2 # <CJK>
+EEDC 94B4 # <CJK>
+EEDD 94B6 # <CJK>
+EEDE 94B7 # <CJK>
+EEDF 94B8 # <CJK>
+EEE0 94B9 # <CJK>
+EEE1 94BA # <CJK>
+EEE2 94BC # <CJK>
+EEE3 94BD # <CJK>
+EEE4 94BF # <CJK>
+EEE5 94C4 # <CJK>
+EEE6 94C8 # <CJK>
+EEE7 94C9 # <CJK>
+EEE8 94CA # <CJK>
+EEE9 94CB # <CJK>
+EEEA 94CC # <CJK>
+EEEB 94CD # <CJK>
+EEEC 94CE # <CJK>
+EEED 94D0 # <CJK>
+EEEE 94D1 # <CJK>
+EEEF 94D2 # <CJK>
+EEF0 94D5 # <CJK>
+EEF1 94D6 # <CJK>
+EEF2 94D7 # <CJK>
+EEF3 94D9 # <CJK>
+EEF4 94D8 # <CJK>
+EEF5 94DB # <CJK>
+EEF6 94DE # <CJK>
+EEF7 94DF # <CJK>
+EEF8 94E0 # <CJK>
+EEF9 94E2 # <CJK>
+EEFA 94E4 # <CJK>
+EEFB 94E5 # <CJK>
+EEFC 94E7 # <CJK>
+EEFD 94E8 # <CJK>
+EEFE 94EA # <CJK>
+EFA1 94E9 # <CJK>
+EFA2 94EB # <CJK>
+EFA3 94EE # <CJK>
+EFA4 94EF # <CJK>
+EFA5 94F3 # <CJK>
+EFA6 94F4 # <CJK>
+EFA7 94F5 # <CJK>
+EFA8 94F7 # <CJK>
+EFA9 94F9 # <CJK>
+EFAA 94FC # <CJK>
+EFAB 94FD # <CJK>
+EFAC 94FF # <CJK>
+EFAD 9503 # <CJK>
+EFAE 9502 # <CJK>
+EFAF 9506 # <CJK>
+EFB0 9507 # <CJK>
+EFB1 9509 # <CJK>
+EFB2 950A # <CJK>
+EFB3 950D # <CJK>
+EFB4 950E # <CJK>
+EFB5 950F # <CJK>
+EFB6 9512 # <CJK>
+EFB7 9513 # <CJK>
+EFB8 9514 # <CJK>
+EFB9 9515 # <CJK>
+EFBA 9516 # <CJK>
+EFBB 9518 # <CJK>
+EFBC 951B # <CJK>
+EFBD 951D # <CJK>
+EFBE 951E # <CJK>
+EFBF 951F # <CJK>
+EFC0 9522 # <CJK>
+EFC1 952A # <CJK>
+EFC2 952B # <CJK>
+EFC3 9529 # <CJK>
+EFC4 952C # <CJK>
+EFC5 9531 # <CJK>
+EFC6 9532 # <CJK>
+EFC7 9534 # <CJK>
+EFC8 9536 # <CJK>
+EFC9 9537 # <CJK>
+EFCA 9538 # <CJK>
+EFCB 953C # <CJK>
+EFCC 953E # <CJK>
+EFCD 953F # <CJK>
+EFCE 9542 # <CJK>
+EFCF 9535 # <CJK>
+EFD0 9544 # <CJK>
+EFD1 9545 # <CJK>
+EFD2 9546 # <CJK>
+EFD3 9549 # <CJK>
+EFD4 954C # <CJK>
+EFD5 954E # <CJK>
+EFD6 954F # <CJK>
+EFD7 9552 # <CJK>
+EFD8 9553 # <CJK>
+EFD9 9554 # <CJK>
+EFDA 9556 # <CJK>
+EFDB 9557 # <CJK>
+EFDC 9558 # <CJK>
+EFDD 9559 # <CJK>
+EFDE 955B # <CJK>
+EFDF 955E # <CJK>
+EFE0 955F # <CJK>
+EFE1 955D # <CJK>
+EFE2 9561 # <CJK>
+EFE3 9562 # <CJK>
+EFE4 9564 # <CJK>
+EFE5 9565 # <CJK>
+EFE6 9566 # <CJK>
+EFE7 9567 # <CJK>
+EFE8 9568 # <CJK>
+EFE9 9569 # <CJK>
+EFEA 956A # <CJK>
+EFEB 956B # <CJK>
+EFEC 956C # <CJK>
+EFED 956F # <CJK>
+EFEE 9571 # <CJK>
+EFEF 9572 # <CJK>
+EFF0 9573 # <CJK>
+EFF1 953A # <CJK>
+EFF2 77E7 # <CJK>
+EFF3 77EC # <CJK>
+EFF4 96C9 # <CJK>
+EFF5 79D5 # <CJK>
+EFF6 79ED # <CJK>
+EFF7 79E3 # <CJK>
+EFF8 79EB # <CJK>
+EFF9 7A06 # <CJK>
+EFFA 5D47 # <CJK>
+EFFB 7A03 # <CJK>
+EFFC 7A02 # <CJK>
+EFFD 7A1E # <CJK>
+EFFE 7A14 # <CJK>
+F0A1 7A39 # <CJK>
+F0A2 7A37 # <CJK>
+F0A3 7A51 # <CJK>
+F0A4 9ECF # <CJK>
+F0A5 99A5 # <CJK>
+F0A6 7A70 # <CJK>
+F0A7 7688 # <CJK>
+F0A8 768E # <CJK>
+F0A9 7693 # <CJK>
+F0AA 7699 # <CJK>
+F0AB 76A4 # <CJK>
+F0AC 74DE # <CJK>
+F0AD 74E0 # <CJK>
+F0AE 752C # <CJK>
+F0AF 9E20 # <CJK>
+F0B0 9E22 # <CJK>
+F0B1 9E28 # <CJK>
+F0B2 9E29 # <CJK>
+F0B3 9E2A # <CJK>
+F0B4 9E2B # <CJK>
+F0B5 9E2C # <CJK>
+F0B6 9E32 # <CJK>
+F0B7 9E31 # <CJK>
+F0B8 9E36 # <CJK>
+F0B9 9E38 # <CJK>
+F0BA 9E37 # <CJK>
+F0BB 9E39 # <CJK>
+F0BC 9E3A # <CJK>
+F0BD 9E3E # <CJK>
+F0BE 9E41 # <CJK>
+F0BF 9E42 # <CJK>
+F0C0 9E44 # <CJK>
+F0C1 9E46 # <CJK>
+F0C2 9E47 # <CJK>
+F0C3 9E48 # <CJK>
+F0C4 9E49 # <CJK>
+F0C5 9E4B # <CJK>
+F0C6 9E4C # <CJK>
+F0C7 9E4E # <CJK>
+F0C8 9E51 # <CJK>
+F0C9 9E55 # <CJK>
+F0CA 9E57 # <CJK>
+F0CB 9E5A # <CJK>
+F0CC 9E5B # <CJK>
+F0CD 9E5C # <CJK>
+F0CE 9E5E # <CJK>
+F0CF 9E63 # <CJK>
+F0D0 9E66 # <CJK>
+F0D1 9E67 # <CJK>
+F0D2 9E68 # <CJK>
+F0D3 9E69 # <CJK>
+F0D4 9E6A # <CJK>
+F0D5 9E6B # <CJK>
+F0D6 9E6C # <CJK>
+F0D7 9E71 # <CJK>
+F0D8 9E6D # <CJK>
+F0D9 9E73 # <CJK>
+F0DA 7592 # <CJK>
+F0DB 7594 # <CJK>
+F0DC 7596 # <CJK>
+F0DD 75A0 # <CJK>
+F0DE 759D # <CJK>
+F0DF 75AC # <CJK>
+F0E0 75A3 # <CJK>
+F0E1 75B3 # <CJK>
+F0E2 75B4 # <CJK>
+F0E3 75B8 # <CJK>
+F0E4 75C4 # <CJK>
+F0E5 75B1 # <CJK>
+F0E6 75B0 # <CJK>
+F0E7 75C3 # <CJK>
+F0E8 75C2 # <CJK>
+F0E9 75D6 # <CJK>
+F0EA 75CD # <CJK>
+F0EB 75E3 # <CJK>
+F0EC 75E8 # <CJK>
+F0ED 75E6 # <CJK>
+F0EE 75E4 # <CJK>
+F0EF 75EB # <CJK>
+F0F0 75E7 # <CJK>
+F0F1 7603 # <CJK>
+F0F2 75F1 # <CJK>
+F0F3 75FC # <CJK>
+F0F4 75FF # <CJK>
+F0F5 7610 # <CJK>
+F0F6 7600 # <CJK>
+F0F7 7605 # <CJK>
+F0F8 760C # <CJK>
+F0F9 7617 # <CJK>
+F0FA 760A # <CJK>
+F0FB 7625 # <CJK>
+F0FC 7618 # <CJK>
+F0FD 7615 # <CJK>
+F0FE 7619 # <CJK>
+F1A1 761B # <CJK>
+F1A2 763C # <CJK>
+F1A3 7622 # <CJK>
+F1A4 7620 # <CJK>
+F1A5 7640 # <CJK>
+F1A6 762D # <CJK>
+F1A7 7630 # <CJK>
+F1A8 763F # <CJK>
+F1A9 7635 # <CJK>
+F1AA 7643 # <CJK>
+F1AB 763E # <CJK>
+F1AC 7633 # <CJK>
+F1AD 764D # <CJK>
+F1AE 765E # <CJK>
+F1AF 7654 # <CJK>
+F1B0 765C # <CJK>
+F1B1 7656 # <CJK>
+F1B2 766B # <CJK>
+F1B3 766F # <CJK>
+F1B4 7FCA # <CJK>
+F1B5 7AE6 # <CJK>
+F1B6 7A78 # <CJK>
+F1B7 7A79 # <CJK>
+F1B8 7A80 # <CJK>
+F1B9 7A86 # <CJK>
+F1BA 7A88 # <CJK>
+F1BB 7A95 # <CJK>
+F1BC 7AA6 # <CJK>
+F1BD 7AA0 # <CJK>
+F1BE 7AAC # <CJK>
+F1BF 7AA8 # <CJK>
+F1C0 7AAD # <CJK>
+F1C1 7AB3 # <CJK>
+F1C2 8864 # <CJK>
+F1C3 8869 # <CJK>
+F1C4 8872 # <CJK>
+F1C5 887D # <CJK>
+F1C6 887F # <CJK>
+F1C7 8882 # <CJK>
+F1C8 88A2 # <CJK>
+F1C9 88C6 # <CJK>
+F1CA 88B7 # <CJK>
+F1CB 88BC # <CJK>
+F1CC 88C9 # <CJK>
+F1CD 88E2 # <CJK>
+F1CE 88CE # <CJK>
+F1CF 88E3 # <CJK>
+F1D0 88E5 # <CJK>
+F1D1 88F1 # <CJK>
+F1D2 891A # <CJK>
+F1D3 88FC # <CJK>
+F1D4 88E8 # <CJK>
+F1D5 88FE # <CJK>
+F1D6 88F0 # <CJK>
+F1D7 8921 # <CJK>
+F1D8 8919 # <CJK>
+F1D9 8913 # <CJK>
+F1DA 891B # <CJK>
+F1DB 890A # <CJK>
+F1DC 8934 # <CJK>
+F1DD 892B # <CJK>
+F1DE 8936 # <CJK>
+F1DF 8941 # <CJK>
+F1E0 8966 # <CJK>
+F1E1 897B # <CJK>
+F1E2 758B # <CJK>
+F1E3 80E5 # <CJK>
+F1E4 76B2 # <CJK>
+F1E5 76B4 # <CJK>
+F1E6 77DC # <CJK>
+F1E7 8012 # <CJK>
+F1E8 8014 # <CJK>
+F1E9 8016 # <CJK>
+F1EA 801C # <CJK>
+F1EB 8020 # <CJK>
+F1EC 8022 # <CJK>
+F1ED 8025 # <CJK>
+F1EE 8026 # <CJK>
+F1EF 8027 # <CJK>
+F1F0 8029 # <CJK>
+F1F1 8028 # <CJK>
+F1F2 8031 # <CJK>
+F1F3 800B # <CJK>
+F1F4 8035 # <CJK>
+F1F5 8043 # <CJK>
+F1F6 8046 # <CJK>
+F1F7 804D # <CJK>
+F1F8 8052 # <CJK>
+F1F9 8069 # <CJK>
+F1FA 8071 # <CJK>
+F1FB 8983 # <CJK>
+F1FC 9878 # <CJK>
+F1FD 9880 # <CJK>
+F1FE 9883 # <CJK>
+F2A1 9889 # <CJK>
+F2A2 988C # <CJK>
+F2A3 988D # <CJK>
+F2A4 988F # <CJK>
+F2A5 9894 # <CJK>
+F2A6 989A # <CJK>
+F2A7 989B # <CJK>
+F2A8 989E # <CJK>
+F2A9 989F # <CJK>
+F2AA 98A1 # <CJK>
+F2AB 98A2 # <CJK>
+F2AC 98A5 # <CJK>
+F2AD 98A6 # <CJK>
+F2AE 864D # <CJK>
+F2AF 8654 # <CJK>
+F2B0 866C # <CJK>
+F2B1 866E # <CJK>
+F2B2 867F # <CJK>
+F2B3 867A # <CJK>
+F2B4 867C # <CJK>
+F2B5 867B # <CJK>
+F2B6 86A8 # <CJK>
+F2B7 868D # <CJK>
+F2B8 868B # <CJK>
+F2B9 86AC # <CJK>
+F2BA 869D # <CJK>
+F2BB 86A7 # <CJK>
+F2BC 86A3 # <CJK>
+F2BD 86AA # <CJK>
+F2BE 8693 # <CJK>
+F2BF 86A9 # <CJK>
+F2C0 86B6 # <CJK>
+F2C1 86C4 # <CJK>
+F2C2 86B5 # <CJK>
+F2C3 86CE # <CJK>
+F2C4 86B0 # <CJK>
+F2C5 86BA # <CJK>
+F2C6 86B1 # <CJK>
+F2C7 86AF # <CJK>
+F2C8 86C9 # <CJK>
+F2C9 86CF # <CJK>
+F2CA 86B4 # <CJK>
+F2CB 86E9 # <CJK>
+F2CC 86F1 # <CJK>
+F2CD 86F2 # <CJK>
+F2CE 86ED # <CJK>
+F2CF 86F3 # <CJK>
+F2D0 86D0 # <CJK>
+F2D1 8713 # <CJK>
+F2D2 86DE # <CJK>
+F2D3 86F4 # <CJK>
+F2D4 86DF # <CJK>
+F2D5 86D8 # <CJK>
+F2D6 86D1 # <CJK>
+F2D7 8703 # <CJK>
+F2D8 8707 # <CJK>
+F2D9 86F8 # <CJK>
+F2DA 8708 # <CJK>
+F2DB 870A # <CJK>
+F2DC 870D # <CJK>
+F2DD 8709 # <CJK>
+F2DE 8723 # <CJK>
+F2DF 873B # <CJK>
+F2E0 871E # <CJK>
+F2E1 8725 # <CJK>
+F2E2 872E # <CJK>
+F2E3 871A # <CJK>
+F2E4 873E # <CJK>
+F2E5 8748 # <CJK>
+F2E6 8734 # <CJK>
+F2E7 8731 # <CJK>
+F2E8 8729 # <CJK>
+F2E9 8737 # <CJK>
+F2EA 873F # <CJK>
+F2EB 8782 # <CJK>
+F2EC 8722 # <CJK>
+F2ED 877D # <CJK>
+F2EE 877E # <CJK>
+F2EF 877B # <CJK>
+F2F0 8760 # <CJK>
+F2F1 8770 # <CJK>
+F2F2 874C # <CJK>
+F2F3 876E # <CJK>
+F2F4 878B # <CJK>
+F2F5 8753 # <CJK>
+F2F6 8763 # <CJK>
+F2F7 877C # <CJK>
+F2F8 8764 # <CJK>
+F2F9 8759 # <CJK>
+F2FA 8765 # <CJK>
+F2FB 8793 # <CJK>
+F2FC 87AF # <CJK>
+F2FD 87A8 # <CJK>
+F2FE 87D2 # <CJK>
+F3A1 87C6 # <CJK>
+F3A2 8788 # <CJK>
+F3A3 8785 # <CJK>
+F3A4 87AD # <CJK>
+F3A5 8797 # <CJK>
+F3A6 8783 # <CJK>
+F3A7 87AB # <CJK>
+F3A8 87E5 # <CJK>
+F3A9 87AC # <CJK>
+F3AA 87B5 # <CJK>
+F3AB 87B3 # <CJK>
+F3AC 87CB # <CJK>
+F3AD 87D3 # <CJK>
+F3AE 87BD # <CJK>
+F3AF 87D1 # <CJK>
+F3B0 87C0 # <CJK>
+F3B1 87CA # <CJK>
+F3B2 87DB # <CJK>
+F3B3 87EA # <CJK>
+F3B4 87E0 # <CJK>
+F3B5 87EE # <CJK>
+F3B6 8816 # <CJK>
+F3B7 8813 # <CJK>
+F3B8 87FE # <CJK>
+F3B9 880A # <CJK>
+F3BA 881B # <CJK>
+F3BB 8821 # <CJK>
+F3BC 8839 # <CJK>
+F3BD 883C # <CJK>
+F3BE 7F36 # <CJK>
+F3BF 7F42 # <CJK>
+F3C0 7F44 # <CJK>
+F3C1 7F45 # <CJK>
+F3C2 8210 # <CJK>
+F3C3 7AFA # <CJK>
+F3C4 7AFD # <CJK>
+F3C5 7B08 # <CJK>
+F3C6 7B03 # <CJK>
+F3C7 7B04 # <CJK>
+F3C8 7B15 # <CJK>
+F3C9 7B0A # <CJK>
+F3CA 7B2B # <CJK>
+F3CB 7B0F # <CJK>
+F3CC 7B47 # <CJK>
+F3CD 7B38 # <CJK>
+F3CE 7B2A # <CJK>
+F3CF 7B19 # <CJK>
+F3D0 7B2E # <CJK>
+F3D1 7B31 # <CJK>
+F3D2 7B20 # <CJK>
+F3D3 7B25 # <CJK>
+F3D4 7B24 # <CJK>
+F3D5 7B33 # <CJK>
+F3D6 7B3E # <CJK>
+F3D7 7B1E # <CJK>
+F3D8 7B58 # <CJK>
+F3D9 7B5A # <CJK>
+F3DA 7B45 # <CJK>
+F3DB 7B75 # <CJK>
+F3DC 7B4C # <CJK>
+F3DD 7B5D # <CJK>
+F3DE 7B60 # <CJK>
+F3DF 7B6E # <CJK>
+F3E0 7B7B # <CJK>
+F3E1 7B62 # <CJK>
+F3E2 7B72 # <CJK>
+F3E3 7B71 # <CJK>
+F3E4 7B90 # <CJK>
+F3E5 7BA6 # <CJK>
+F3E6 7BA7 # <CJK>
+F3E7 7BB8 # <CJK>
+F3E8 7BAC # <CJK>
+F3E9 7B9D # <CJK>
+F3EA 7BA8 # <CJK>
+F3EB 7B85 # <CJK>
+F3EC 7BAA # <CJK>
+F3ED 7B9C # <CJK>
+F3EE 7BA2 # <CJK>
+F3EF 7BAB # <CJK>
+F3F0 7BB4 # <CJK>
+F3F1 7BD1 # <CJK>
+F3F2 7BC1 # <CJK>
+F3F3 7BCC # <CJK>
+F3F4 7BDD # <CJK>
+F3F5 7BDA # <CJK>
+F3F6 7BE5 # <CJK>
+F3F7 7BE6 # <CJK>
+F3F8 7BEA # <CJK>
+F3F9 7C0C # <CJK>
+F3FA 7BFE # <CJK>
+F3FB 7BFC # <CJK>
+F3FC 7C0F # <CJK>
+F3FD 7C16 # <CJK>
+F3FE 7C0B # <CJK>
+F4A1 7C1F # <CJK>
+F4A2 7C2A # <CJK>
+F4A3 7C26 # <CJK>
+F4A4 7C38 # <CJK>
+F4A5 7C41 # <CJK>
+F4A6 7C40 # <CJK>
+F4A7 81FE # <CJK>
+F4A8 8201 # <CJK>
+F4A9 8202 # <CJK>
+F4AA 8204 # <CJK>
+F4AB 81EC # <CJK>
+F4AC 8844 # <CJK>
+F4AD 8221 # <CJK>
+F4AE 8222 # <CJK>
+F4AF 8223 # <CJK>
+F4B0 822D # <CJK>
+F4B1 822F # <CJK>
+F4B2 8228 # <CJK>
+F4B3 822B # <CJK>
+F4B4 8238 # <CJK>
+F4B5 823B # <CJK>
+F4B6 8233 # <CJK>
+F4B7 8234 # <CJK>
+F4B8 823E # <CJK>
+F4B9 8244 # <CJK>
+F4BA 8249 # <CJK>
+F4BB 824B # <CJK>
+F4BC 824F # <CJK>
+F4BD 825A # <CJK>
+F4BE 825F # <CJK>
+F4BF 8268 # <CJK>
+F4C0 887E # <CJK>
+F4C1 8885 # <CJK>
+F4C2 8888 # <CJK>
+F4C3 88D8 # <CJK>
+F4C4 88DF # <CJK>
+F4C5 895E # <CJK>
+F4C6 7F9D # <CJK>
+F4C7 7F9F # <CJK>
+F4C8 7FA7 # <CJK>
+F4C9 7FAF # <CJK>
+F4CA 7FB0 # <CJK>
+F4CB 7FB2 # <CJK>
+F4CC 7C7C # <CJK>
+F4CD 6549 # <CJK>
+F4CE 7C91 # <CJK>
+F4CF 7C9D # <CJK>
+F4D0 7C9C # <CJK>
+F4D1 7C9E # <CJK>
+F4D2 7CA2 # <CJK>
+F4D3 7CB2 # <CJK>
+F4D4 7CBC # <CJK>
+F4D5 7CBD # <CJK>
+F4D6 7CC1 # <CJK>
+F4D7 7CC7 # <CJK>
+F4D8 7CCC # <CJK>
+F4D9 7CCD # <CJK>
+F4DA 7CC8 # <CJK>
+F4DB 7CC5 # <CJK>
+F4DC 7CD7 # <CJK>
+F4DD 7CE8 # <CJK>
+F4DE 826E # <CJK>
+F4DF 66A8 # <CJK>
+F4E0 7FBF # <CJK>
+F4E1 7FCE # <CJK>
+F4E2 7FD5 # <CJK>
+F4E3 7FE5 # <CJK>
+F4E4 7FE1 # <CJK>
+F4E5 7FE6 # <CJK>
+F4E6 7FE9 # <CJK>
+F4E7 7FEE # <CJK>
+F4E8 7FF3 # <CJK>
+F4E9 7CF8 # <CJK>
+F4EA 7D77 # <CJK>
+F4EB 7DA6 # <CJK>
+F4EC 7DAE # <CJK>
+F4ED 7E47 # <CJK>
+F4EE 7E9B # <CJK>
+F4EF 9EB8 # <CJK>
+F4F0 9EB4 # <CJK>
+F4F1 8D73 # <CJK>
+F4F2 8D84 # <CJK>
+F4F3 8D94 # <CJK>
+F4F4 8D91 # <CJK>
+F4F5 8DB1 # <CJK>
+F4F6 8D67 # <CJK>
+F4F7 8D6D # <CJK>
+F4F8 8C47 # <CJK>
+F4F9 8C49 # <CJK>
+F4FA 914A # <CJK>
+F4FB 9150 # <CJK>
+F4FC 914E # <CJK>
+F4FD 914F # <CJK>
+F4FE 9164 # <CJK>
+F5A1 9162 # <CJK>
+F5A2 9161 # <CJK>
+F5A3 9170 # <CJK>
+F5A4 9169 # <CJK>
+F5A5 916F # <CJK>
+F5A6 917D # <CJK>
+F5A7 917E # <CJK>
+F5A8 9172 # <CJK>
+F5A9 9174 # <CJK>
+F5AA 9179 # <CJK>
+F5AB 918C # <CJK>
+F5AC 9185 # <CJK>
+F5AD 9190 # <CJK>
+F5AE 918D # <CJK>
+F5AF 9191 # <CJK>
+F5B0 91A2 # <CJK>
+F5B1 91A3 # <CJK>
+F5B2 91AA # <CJK>
+F5B3 91AD # <CJK>
+F5B4 91AE # <CJK>
+F5B5 91AF # <CJK>
+F5B6 91B5 # <CJK>
+F5B7 91B4 # <CJK>
+F5B8 91BA # <CJK>
+F5B9 8C55 # <CJK>
+F5BA 9E7E # <CJK>
+F5BB 8DB8 # <CJK>
+F5BC 8DEB # <CJK>
+F5BD 8E05 # <CJK>
+F5BE 8E59 # <CJK>
+F5BF 8E69 # <CJK>
+F5C0 8DB5 # <CJK>
+F5C1 8DBF # <CJK>
+F5C2 8DBC # <CJK>
+F5C3 8DBA # <CJK>
+F5C4 8DC4 # <CJK>
+F5C5 8DD6 # <CJK>
+F5C6 8DD7 # <CJK>
+F5C7 8DDA # <CJK>
+F5C8 8DDE # <CJK>
+F5C9 8DCE # <CJK>
+F5CA 8DCF # <CJK>
+F5CB 8DDB # <CJK>
+F5CC 8DC6 # <CJK>
+F5CD 8DEC # <CJK>
+F5CE 8DF7 # <CJK>
+F5CF 8DF8 # <CJK>
+F5D0 8DE3 # <CJK>
+F5D1 8DF9 # <CJK>
+F5D2 8DFB # <CJK>
+F5D3 8DE4 # <CJK>
+F5D4 8E09 # <CJK>
+F5D5 8DFD # <CJK>
+F5D6 8E14 # <CJK>
+F5D7 8E1D # <CJK>
+F5D8 8E1F # <CJK>
+F5D9 8E2C # <CJK>
+F5DA 8E2E # <CJK>
+F5DB 8E23 # <CJK>
+F5DC 8E2F # <CJK>
+F5DD 8E3A # <CJK>
+F5DE 8E40 # <CJK>
+F5DF 8E39 # <CJK>
+F5E0 8E35 # <CJK>
+F5E1 8E3D # <CJK>
+F5E2 8E31 # <CJK>
+F5E3 8E49 # <CJK>
+F5E4 8E41 # <CJK>
+F5E5 8E42 # <CJK>
+F5E6 8E51 # <CJK>
+F5E7 8E52 # <CJK>
+F5E8 8E4A # <CJK>
+F5E9 8E70 # <CJK>
+F5EA 8E76 # <CJK>
+F5EB 8E7C # <CJK>
+F5EC 8E6F # <CJK>
+F5ED 8E74 # <CJK>
+F5EE 8E85 # <CJK>
+F5EF 8E8F # <CJK>
+F5F0 8E94 # <CJK>
+F5F1 8E90 # <CJK>
+F5F2 8E9C # <CJK>
+F5F3 8E9E # <CJK>
+F5F4 8C78 # <CJK>
+F5F5 8C82 # <CJK>
+F5F6 8C8A # <CJK>
+F5F7 8C85 # <CJK>
+F5F8 8C98 # <CJK>
+F5F9 8C94 # <CJK>
+F5FA 659B # <CJK>
+F5FB 89D6 # <CJK>
+F5FC 89DE # <CJK>
+F5FD 89DA # <CJK>
+F5FE 89DC # <CJK>
+F6A1 89E5 # <CJK>
+F6A2 89EB # <CJK>
+F6A3 89EF # <CJK>
+F6A4 8A3E # <CJK>
+F6A5 8B26 # <CJK>
+F6A6 9753 # <CJK>
+F6A7 96E9 # <CJK>
+F6A8 96F3 # <CJK>
+F6A9 96EF # <CJK>
+F6AA 9706 # <CJK>
+F6AB 9701 # <CJK>
+F6AC 9708 # <CJK>
+F6AD 970F # <CJK>
+F6AE 970E # <CJK>
+F6AF 972A # <CJK>
+F6B0 972D # <CJK>
+F6B1 9730 # <CJK>
+F6B2 973E # <CJK>
+F6B3 9F80 # <CJK>
+F6B4 9F83 # <CJK>
+F6B5 9F85 # <CJK>
+F6B6 9F86 # <CJK>
+F6B7 9F87 # <CJK>
+F6B8 9F88 # <CJK>
+F6B9 9F89 # <CJK>
+F6BA 9F8A # <CJK>
+F6BB 9F8C # <CJK>
+F6BC 9EFE # <CJK>
+F6BD 9F0B # <CJK>
+F6BE 9F0D # <CJK>
+F6BF 96B9 # <CJK>
+F6C0 96BC # <CJK>
+F6C1 96BD # <CJK>
+F6C2 96CE # <CJK>
+F6C3 96D2 # <CJK>
+F6C4 77BF # <CJK>
+F6C5 96E0 # <CJK>
+F6C6 928E # <CJK>
+F6C7 92AE # <CJK>
+F6C8 92C8 # <CJK>
+F6C9 933E # <CJK>
+F6CA 936A # <CJK>
+F6CB 93CA # <CJK>
+F6CC 938F # <CJK>
+F6CD 943E # <CJK>
+F6CE 946B # <CJK>
+F6CF 9C7F # <CJK>
+F6D0 9C82 # <CJK>
+F6D1 9C85 # <CJK>
+F6D2 9C86 # <CJK>
+F6D3 9C87 # <CJK>
+F6D4 9C88 # <CJK>
+F6D5 7A23 # <CJK>
+F6D6 9C8B # <CJK>
+F6D7 9C8E # <CJK>
+F6D8 9C90 # <CJK>
+F6D9 9C91 # <CJK>
+F6DA 9C92 # <CJK>
+F6DB 9C94 # <CJK>
+F6DC 9C95 # <CJK>
+F6DD 9C9A # <CJK>
+F6DE 9C9B # <CJK>
+F6DF 9C9E # <CJK>
+F6E0 9C9F # <CJK>
+F6E1 9CA0 # <CJK>
+F6E2 9CA1 # <CJK>
+F6E3 9CA2 # <CJK>
+F6E4 9CA3 # <CJK>
+F6E5 9CA5 # <CJK>
+F6E6 9CA6 # <CJK>
+F6E7 9CA7 # <CJK>
+F6E8 9CA8 # <CJK>
+F6E9 9CA9 # <CJK>
+F6EA 9CAB # <CJK>
+F6EB 9CAD # <CJK>
+F6EC 9CAE # <CJK>
+F6ED 9CB0 # <CJK>
+F6EE 9CB1 # <CJK>
+F6EF 9CB2 # <CJK>
+F6F0 9CB3 # <CJK>
+F6F1 9CB4 # <CJK>
+F6F2 9CB5 # <CJK>
+F6F3 9CB6 # <CJK>
+F6F4 9CB7 # <CJK>
+F6F5 9CBA # <CJK>
+F6F6 9CBB # <CJK>
+F6F7 9CBC # <CJK>
+F6F8 9CBD # <CJK>
+F6F9 9CC4 # <CJK>
+F6FA 9CC5 # <CJK>
+F6FB 9CC6 # <CJK>
+F6FC 9CC7 # <CJK>
+F6FD 9CCA # <CJK>
+F6FE 9CCB # <CJK>
+F7A1 9CCC # <CJK>
+F7A2 9CCD # <CJK>
+F7A3 9CCE # <CJK>
+F7A4 9CCF # <CJK>
+F7A5 9CD0 # <CJK>
+F7A6 9CD3 # <CJK>
+F7A7 9CD4 # <CJK>
+F7A8 9CD5 # <CJK>
+F7A9 9CD7 # <CJK>
+F7AA 9CD8 # <CJK>
+F7AB 9CD9 # <CJK>
+F7AC 9CDC # <CJK>
+F7AD 9CDD # <CJK>
+F7AE 9CDF # <CJK>
+F7AF 9CE2 # <CJK>
+F7B0 977C # <CJK>
+F7B1 9785 # <CJK>
+F7B2 9791 # <CJK>
+F7B3 9792 # <CJK>
+F7B4 9794 # <CJK>
+F7B5 97AF # <CJK>
+F7B6 97AB # <CJK>
+F7B7 97A3 # <CJK>
+F7B8 97B2 # <CJK>
+F7B9 97B4 # <CJK>
+F7BA 9AB1 # <CJK>
+F7BB 9AB0 # <CJK>
+F7BC 9AB7 # <CJK>
+F7BD 9E58 # <CJK>
+F7BE 9AB6 # <CJK>
+F7BF 9ABA # <CJK>
+F7C0 9ABC # <CJK>
+F7C1 9AC1 # <CJK>
+F7C2 9AC0 # <CJK>
+F7C3 9AC5 # <CJK>
+F7C4 9AC2 # <CJK>
+F7C5 9ACB # <CJK>
+F7C6 9ACC # <CJK>
+F7C7 9AD1 # <CJK>
+F7C8 9B45 # <CJK>
+F7C9 9B43 # <CJK>
+F7CA 9B47 # <CJK>
+F7CB 9B49 # <CJK>
+F7CC 9B48 # <CJK>
+F7CD 9B4D # <CJK>
+F7CE 9B51 # <CJK>
+F7CF 98E8 # <CJK>
+F7D0 990D # <CJK>
+F7D1 992E # <CJK>
+F7D2 9955 # <CJK>
+F7D3 9954 # <CJK>
+F7D4 9ADF # <CJK>
+F7D5 9AE1 # <CJK>
+F7D6 9AE6 # <CJK>
+F7D7 9AEF # <CJK>
+F7D8 9AEB # <CJK>
+F7D9 9AFB # <CJK>
+F7DA 9AED # <CJK>
+F7DB 9AF9 # <CJK>
+F7DC 9B08 # <CJK>
+F7DD 9B0F # <CJK>
+F7DE 9B13 # <CJK>
+F7DF 9B1F # <CJK>
+F7E0 9B23 # <CJK>
+F7E1 9EBD # <CJK>
+F7E2 9EBE # <CJK>
+F7E3 7E3B # <CJK>
+F7E4 9E82 # <CJK>
+F7E5 9E87 # <CJK>
+F7E6 9E88 # <CJK>
+F7E7 9E8B # <CJK>
+F7E8 9E92 # <CJK>
+F7E9 93D6 # <CJK>
+F7EA 9E9D # <CJK>
+F7EB 9E9F # <CJK>
+F7EC 9EDB # <CJK>
+F7ED 9EDC # <CJK>
+F7EE 9EDD # <CJK>
+F7EF 9EE0 # <CJK>
+F7F0 9EDF # <CJK>
+F7F1 9EE2 # <CJK>
+F7F2 9EE9 # <CJK>
+F7F3 9EE7 # <CJK>
+F7F4 9EE5 # <CJK>
+F7F5 9EEA # <CJK>
+F7F6 9EEF # <CJK>
+F7F7 9F22 # <CJK>
+F7F8 9F2C # <CJK>
+F7F9 9F2F # <CJK>
+F7FA 9F39 # <CJK>
+F7FB 9F37 # <CJK>
+F7FC 9F3D # <CJK>
+F7FD 9F3E # <CJK>
+F7FE 9F44 # <CJK>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-jp.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-jp.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-jp.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-jp.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,7236 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+:US-ASCII
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B >ESC
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+
+:ESC <
+24 :ESC-$
+28 :ESC-(
+
+:ESC-( <
+42 :US-ASCII
+4A :JIS-0201
+
+:ESC-$ <
+40 :JIS-0208
+42 :JIS-0208
+
+:JIS-0201
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B >ESC
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002A ASTERISK
+2B 002B PLUS SIGN
+2C 002C COMMA
+2D 002D HYPHEN-MINUS
+2E 002E FULL STOP
+2F 002F SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003A COLON
+3B 003B SEMICOLON
+3C 003C LESS-THAN SIGN
+3D 003D EQUALS SIGN
+3E 003E GREATER-THAN SIGN
+3F 003F QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004A LATIN CAPITAL LETTER J
+4B 004B LATIN CAPITAL LETTER K
+4C 004C LATIN CAPITAL LETTER L
+4D 004D LATIN CAPITAL LETTER M
+4E 004E LATIN CAPITAL LETTER N
+4F 004F LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005A LATIN CAPITAL LETTER Z
+5B 005B LEFT SQUARE BRACKET
+5C 00A5 YEN SIGN
+5D 005D RIGHT SQUARE BRACKET
+5E 005E CIRCUMFLEX ACCENT
+5F 005F LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006A LATIN SMALL LETTER J
+6B 006B LATIN SMALL LETTER K
+6C 006C LATIN SMALL LETTER L
+6D 006D LATIN SMALL LETTER M
+6E 006E LATIN SMALL LETTER N
+6F 006F LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007A LATIN SMALL LETTER Z
+7B 007B LEFT CURLY BRACKET
+7C 007C VERTICAL LINE
+7D 007D RIGHT CURLY BRACKET
+7E 203E OVERLINE
+7F 007f DELETE (DEL)
+A0 3000 IDEOGRAPHIC SPACE
+A1 FF61 HALFWIDTH IDEOGRAPHIC FULL STOP
+A2 FF62 HALFWIDTH LEFT CORNER BRACKET
+A3 FF63 HALFWIDTH RIGHT CORNER BRACKET
+A4 FF64 HALFWIDTH IDEOGRAPHIC COMMA
+A5 FF65 HALFWIDTH KATAKANA MIDDLE DOT
+A6 FF66 HALFWIDTH KATAKANA LETTER WO
+A7 FF67 HALFWIDTH KATAKANA LETTER SMALL A
+A8 FF68 HALFWIDTH KATAKANA LETTER SMALL I
+A9 FF69 HALFWIDTH KATAKANA LETTER SMALL U
+AA FF6A HALFWIDTH KATAKANA LETTER SMALL E
+AB FF6B HALFWIDTH KATAKANA LETTER SMALL O
+AC FF6C HALFWIDTH KATAKANA LETTER SMALL YA
+AD FF6D HALFWIDTH KATAKANA LETTER SMALL YU
+AE FF6E HALFWIDTH KATAKANA LETTER SMALL YO
+AF FF6F HALFWIDTH KATAKANA LETTER SMALL TU
+B0 FF70 HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+B1 FF71 HALFWIDTH KATAKANA LETTER A
+B2 FF72 HALFWIDTH KATAKANA LETTER I
+B3 FF73 HALFWIDTH KATAKANA LETTER U
+B4 FF74 HALFWIDTH KATAKANA LETTER E
+B5 FF75 HALFWIDTH KATAKANA LETTER O
+B6 FF76 HALFWIDTH KATAKANA LETTER KA
+B7 FF77 HALFWIDTH KATAKANA LETTER KI
+B8 FF78 HALFWIDTH KATAKANA LETTER KU
+B9 FF79 HALFWIDTH KATAKANA LETTER KE
+BA FF7A HALFWIDTH KATAKANA LETTER KO
+BB FF7B HALFWIDTH KATAKANA LETTER SA
+BC FF7C HALFWIDTH KATAKANA LETTER SI
+BD FF7D HALFWIDTH KATAKANA LETTER SU
+BE FF7E HALFWIDTH KATAKANA LETTER SE
+BF FF7F HALFWIDTH KATAKANA LETTER SO
+C0 FF80 HALFWIDTH KATAKANA LETTER TA
+C1 FF81 HALFWIDTH KATAKANA LETTER TI
+C2 FF82 HALFWIDTH KATAKANA LETTER TU
+C3 FF83 HALFWIDTH KATAKANA LETTER TE
+C4 FF84 HALFWIDTH KATAKANA LETTER TO
+C5 FF85 HALFWIDTH KATAKANA LETTER NA
+C6 FF86 HALFWIDTH KATAKANA LETTER NI
+C7 FF87 HALFWIDTH KATAKANA LETTER NU
+C8 FF88 HALFWIDTH KATAKANA LETTER NE
+C9 FF89 HALFWIDTH KATAKANA LETTER NO
+CA FF8A HALFWIDTH KATAKANA LETTER HA
+CB FF8B HALFWIDTH KATAKANA LETTER HI
+CC FF8C HALFWIDTH KATAKANA LETTER HU
+CD FF8D HALFWIDTH KATAKANA LETTER HE
+CE FF8E HALFWIDTH KATAKANA LETTER HO
+CF FF8F HALFWIDTH KATAKANA LETTER MA
+D0 FF90 HALFWIDTH KATAKANA LETTER MI
+D1 FF91 HALFWIDTH KATAKANA LETTER MU
+D2 FF92 HALFWIDTH KATAKANA LETTER ME
+D3 FF93 HALFWIDTH KATAKANA LETTER MO
+D4 FF94 HALFWIDTH KATAKANA LETTER YA
+D5 FF95 HALFWIDTH KATAKANA LETTER YU
+D6 FF96 HALFWIDTH KATAKANA LETTER YO
+D7 FF97 HALFWIDTH KATAKANA LETTER RA
+D8 FF98 HALFWIDTH KATAKANA LETTER RI
+D9 FF99 HALFWIDTH KATAKANA LETTER RU
+DA FF9A HALFWIDTH KATAKANA LETTER RE
+DB FF9B HALFWIDTH KATAKANA LETTER RO
+DC FF9C HALFWIDTH KATAKANA LETTER WA
+DD FF9D HALFWIDTH KATAKANA LETTER N
+DE FF9E HALFWIDTH KATAKANA VOICED SOUND MARK
+DF FF9F HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+
+:JIS-0208
+1B >ESC
+2121 3000 IDEOGRAPHIC SPACE
+2122 3001 IDEOGRAPHIC COMMA
+2123 3002 IDEOGRAPHIC FULL STOP
+2124 FF0C FULLWIDTH COMMA
+2125 FF0E FULLWIDTH FULL STOP
+2126 30FB KATAKANA MIDDLE DOT
+2127 FF1A FULLWIDTH COLON
+2128 FF1B FULLWIDTH SEMICOLON
+2129 FF1F FULLWIDTH QUESTION MARK
+212A FF01 FULLWIDTH EXCLAMATION MARK
+212B 309B KATAKANA-HIRAGANA VOICED SOUND MARK
+212C 309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+212D 00B4 ACUTE ACCENT
+212E FF40 FULLWIDTH GRAVE ACCENT
+212F 00A8 DIAERESIS
+2130 FF3E FULLWIDTH CIRCUMFLEX ACCENT
+2131 FFE3 FULLWIDTH MACRON
+2132 FF3F FULLWIDTH LOW LINE
+2133 30FD KATAKANA ITERATION MARK
+2134 30FE KATAKANA VOICED ITERATION MARK
+2135 309D HIRAGANA ITERATION MARK
+2136 309E HIRAGANA VOICED ITERATION MARK
+2137 3003 DITTO MARK
+2138 4EDD <CJK>
+2139 3005 IDEOGRAPHIC ITERATION MARK
+213A 3006 IDEOGRAPHIC CLOSING MARK
+213B 3007 IDEOGRAPHIC NUMBER ZERO
+213C 30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK
+213D 2015 HORIZONTAL BAR
+213E 2010 HYPHEN
+213F FF0F FULLWIDTH SOLIDUS
+2140 005C REVERSE SOLIDUS
+2141 301C WAVE DASH
+2142 2016 DOUBLE VERTICAL LINE
+2143 FF5C FULLWIDTH VERTICAL LINE
+2144 2026 HORIZONTAL ELLIPSIS
+2145 2025 TWO DOT LEADER
+2146 2018 LEFT SINGLE QUOTATION MARK
+2147 2019 RIGHT SINGLE QUOTATION MARK
+2148 201C LEFT DOUBLE QUOTATION MARK
+2149 201D RIGHT DOUBLE QUOTATION MARK
+214A FF08 FULLWIDTH LEFT PARENTHESIS
+214B FF09 FULLWIDTH RIGHT PARENTHESIS
+214C 3014 LEFT TORTOISE SHELL BRACKET
+214D 3015 RIGHT TORTOISE SHELL BRACKET
+214E FF3B FULLWIDTH LEFT SQUARE BRACKET
+214F FF3D FULLWIDTH RIGHT SQUARE BRACKET
+2150 FF5B FULLWIDTH LEFT CURLY BRACKET
+2151 FF5D FULLWIDTH RIGHT CURLY BRACKET
+2152 3008 LEFT ANGLE BRACKET
+2153 3009 RIGHT ANGLE BRACKET
+2154 300A LEFT DOUBLE ANGLE BRACKET
+2155 300B RIGHT DOUBLE ANGLE BRACKET
+2156 300C LEFT CORNER BRACKET
+2157 300D RIGHT CORNER BRACKET
+2158 300E LEFT WHITE CORNER BRACKET
+2159 300F RIGHT WHITE CORNER BRACKET
+215A 3010 LEFT BLACK LENTICULAR BRACKET
+215B 3011 RIGHT BLACK LENTICULAR BRACKET
+215C FF0B FULLWIDTH PLUS SIGN
+215D 2212 MINUS SIGN
+215E 00B1 PLUS-MINUS SIGN
+215F 00D7 MULTIPLICATION SIGN
+2160 00F7 DIVISION SIGN
+2161 FF1D FULLWIDTH EQUALS SIGN
+2162 2260 NOT EQUAL TO
+2163 FF1C FULLWIDTH LESS-THAN SIGN
+2164 FF1E FULLWIDTH GREATER-THAN SIGN
+2165 2266 LESS-THAN OVER EQUAL TO
+2166 2267 GREATER-THAN OVER EQUAL TO
+2167 221E INFINITY
+2168 2234 THEREFORE
+2169 2642 MALE SIGN
+216A 2640 FEMALE SIGN
+216B 00B0 DEGREE SIGN
+216C 2032 PRIME
+216D 2033 DOUBLE PRIME
+216E 2103 DEGREE CELSIUS
+216F FFE5 FULLWIDTH YEN SIGN
+2170 FF04 FULLWIDTH DOLLAR SIGN
+2171 00A2 CENT SIGN
+2172 00A3 POUND SIGN
+2173 FF05 FULLWIDTH PERCENT SIGN
+2174 FF03 FULLWIDTH NUMBER SIGN
+2175 FF06 FULLWIDTH AMPERSAND
+2176 FF0A FULLWIDTH ASTERISK
+2177 FF20 FULLWIDTH COMMERCIAL AT
+2178 00A7 SECTION SIGN
+2179 2606 WHITE STAR
+217A 2605 BLACK STAR
+217B 25CB WHITE CIRCLE
+217C 25CF BLACK CIRCLE
+217D 25CE BULLSEYE
+217E 25C7 WHITE DIAMOND
+2221 25C6 BLACK DIAMOND
+2222 25A1 WHITE SQUARE
+2223 25A0 BLACK SQUARE
+2224 25B3 WHITE UP-POINTING TRIANGLE
+2225 25B2 BLACK UP-POINTING TRIANGLE
+2226 25BD WHITE DOWN-POINTING TRIANGLE
+2227 25BC BLACK DOWN-POINTING TRIANGLE
+2228 203B REFERENCE MARK
+2229 3012 POSTAL MARK
+222A 2192 RIGHTWARDS ARROW
+222B 2190 LEFTWARDS ARROW
+222C 2191 UPWARDS ARROW
+222D 2193 DOWNWARDS ARROW
+222E 3013 GETA MARK
+223A 2208 ELEMENT OF
+223B 220B CONTAINS AS MEMBER
+223C 2286 SUBSET OF OR EQUAL TO
+223D 2287 SUPERSET OF OR EQUAL TO
+223E 2282 SUBSET OF
+223F 2283 SUPERSET OF
+2240 222A UNION
+2241 2229 INTERSECTION
+224A 2227 LOGICAL AND
+224B 2228 LOGICAL OR
+224C 00AC NOT SIGN
+224D 21D2 RIGHTWARDS DOUBLE ARROW
+224E 21D4 LEFT RIGHT DOUBLE ARROW
+224F 2200 FOR ALL
+2250 2203 THERE EXISTS
+225C 2220 ANGLE
+225D 22A5 UP TACK
+225E 2312 ARC
+225F 2202 PARTIAL DIFFERENTIAL
+2260 2207 NABLA
+2261 2261 IDENTICAL TO
+2262 2252 APPROXIMATELY EQUAL TO OR THE IMAGE OF
+2263 226A MUCH LESS-THAN
+2264 226B MUCH GREATER-THAN
+2265 221A SQUARE ROOT
+2266 223D REVERSED TILDE
+2267 221D PROPORTIONAL TO
+2268 2235 BECAUSE
+2269 222B INTEGRAL
+226A 222C DOUBLE INTEGRAL
+2272 212B ANGSTROM SIGN
+2273 2030 PER MILLE SIGN
+2274 266F MUSIC SHARP SIGN
+2275 266D MUSIC FLAT SIGN
+2276 266A EIGHTH NOTE
+2277 2020 DAGGER
+2278 2021 DOUBLE DAGGER
+2279 00B6 PILCROW SIGN
+227E 25EF LARGE CIRCLE
+2330 FF10 FULLWIDTH DIGIT ZERO
+2331 FF11 FULLWIDTH DIGIT ONE
+2332 FF12 FULLWIDTH DIGIT TWO
+2333 FF13 FULLWIDTH DIGIT THREE
+2334 FF14 FULLWIDTH DIGIT FOUR
+2335 FF15 FULLWIDTH DIGIT FIVE
+2336 FF16 FULLWIDTH DIGIT SIX
+2337 FF17 FULLWIDTH DIGIT SEVEN
+2338 FF18 FULLWIDTH DIGIT EIGHT
+2339 FF19 FULLWIDTH DIGIT NINE
+2341 FF21 FULLWIDTH LATIN CAPITAL LETTER A
+2342 FF22 FULLWIDTH LATIN CAPITAL LETTER B
+2343 FF23 FULLWIDTH LATIN CAPITAL LETTER C
+2344 FF24 FULLWIDTH LATIN CAPITAL LETTER D
+2345 FF25 FULLWIDTH LATIN CAPITAL LETTER E
+2346 FF26 FULLWIDTH LATIN CAPITAL LETTER F
+2347 FF27 FULLWIDTH LATIN CAPITAL LETTER G
+2348 FF28 FULLWIDTH LATIN CAPITAL LETTER H
+2349 FF29 FULLWIDTH LATIN CAPITAL LETTER I
+234A FF2A FULLWIDTH LATIN CAPITAL LETTER J
+234B FF2B FULLWIDTH LATIN CAPITAL LETTER K
+234C FF2C FULLWIDTH LATIN CAPITAL LETTER L
+234D FF2D FULLWIDTH LATIN CAPITAL LETTER M
+234E FF2E FULLWIDTH LATIN CAPITAL LETTER N
+234F FF2F FULLWIDTH LATIN CAPITAL LETTER O
+2350 FF30 FULLWIDTH LATIN CAPITAL LETTER P
+2351 FF31 FULLWIDTH LATIN CAPITAL LETTER Q
+2352 FF32 FULLWIDTH LATIN CAPITAL LETTER R
+2353 FF33 FULLWIDTH LATIN CAPITAL LETTER S
+2354 FF34 FULLWIDTH LATIN CAPITAL LETTER T
+2355 FF35 FULLWIDTH LATIN CAPITAL LETTER U
+2356 FF36 FULLWIDTH LATIN CAPITAL LETTER V
+2357 FF37 FULLWIDTH LATIN CAPITAL LETTER W
+2358 FF38 FULLWIDTH LATIN CAPITAL LETTER X
+2359 FF39 FULLWIDTH LATIN CAPITAL LETTER Y
+235A FF3A FULLWIDTH LATIN CAPITAL LETTER Z
+2361 FF41 FULLWIDTH LATIN SMALL LETTER A
+2362 FF42 FULLWIDTH LATIN SMALL LETTER B
+2363 FF43 FULLWIDTH LATIN SMALL LETTER C
+2364 FF44 FULLWIDTH LATIN SMALL LETTER D
+2365 FF45 FULLWIDTH LATIN SMALL LETTER E
+2366 FF46 FULLWIDTH LATIN SMALL LETTER F
+2367 FF47 FULLWIDTH LATIN SMALL LETTER G
+2368 FF48 FULLWIDTH LATIN SMALL LETTER H
+2369 FF49 FULLWIDTH LATIN SMALL LETTER I
+236A FF4A FULLWIDTH LATIN SMALL LETTER J
+236B FF4B FULLWIDTH LATIN SMALL LETTER K
+236C FF4C FULLWIDTH LATIN SMALL LETTER L
+236D FF4D FULLWIDTH LATIN SMALL LETTER M
+236E FF4E FULLWIDTH LATIN SMALL LETTER N
+236F FF4F FULLWIDTH LATIN SMALL LETTER O
+2370 FF50 FULLWIDTH LATIN SMALL LETTER P
+2371 FF51 FULLWIDTH LATIN SMALL LETTER Q
+2372 FF52 FULLWIDTH LATIN SMALL LETTER R
+2373 FF53 FULLWIDTH LATIN SMALL LETTER S
+2374 FF54 FULLWIDTH LATIN SMALL LETTER T
+2375 FF55 FULLWIDTH LATIN SMALL LETTER U
+2376 FF56 FULLWIDTH LATIN SMALL LETTER V
+2377 FF57 FULLWIDTH LATIN SMALL LETTER W
+2378 FF58 FULLWIDTH LATIN SMALL LETTER X
+2379 FF59 FULLWIDTH LATIN SMALL LETTER Y
+237A FF5A FULLWIDTH LATIN SMALL LETTER Z
+2421 3041 HIRAGANA LETTER SMALL A
+2422 3042 HIRAGANA LETTER A
+2423 3043 HIRAGANA LETTER SMALL I
+2424 3044 HIRAGANA LETTER I
+2425 3045 HIRAGANA LETTER SMALL U
+2426 3046 HIRAGANA LETTER U
+2427 3047 HIRAGANA LETTER SMALL E
+2428 3048 HIRAGANA LETTER E
+2429 3049 HIRAGANA LETTER SMALL O
+242A 304A HIRAGANA LETTER O
+242B 304B HIRAGANA LETTER KA
+242C 304C HIRAGANA LETTER GA
+242D 304D HIRAGANA LETTER KI
+242E 304E HIRAGANA LETTER GI
+242F 304F HIRAGANA LETTER KU
+2430 3050 HIRAGANA LETTER GU
+2431 3051 HIRAGANA LETTER KE
+2432 3052 HIRAGANA LETTER GE
+2433 3053 HIRAGANA LETTER KO
+2434 3054 HIRAGANA LETTER GO
+2435 3055 HIRAGANA LETTER SA
+2436 3056 HIRAGANA LETTER ZA
+2437 3057 HIRAGANA LETTER SI
+2438 3058 HIRAGANA LETTER ZI
+2439 3059 HIRAGANA LETTER SU
+243A 305A HIRAGANA LETTER ZU
+243B 305B HIRAGANA LETTER SE
+243C 305C HIRAGANA LETTER ZE
+243D 305D HIRAGANA LETTER SO
+243E 305E HIRAGANA LETTER ZO
+243F 305F HIRAGANA LETTER TA
+2440 3060 HIRAGANA LETTER DA
+2441 3061 HIRAGANA LETTER TI
+2442 3062 HIRAGANA LETTER DI
+2443 3063 HIRAGANA LETTER SMALL TU
+2444 3064 HIRAGANA LETTER TU
+2445 3065 HIRAGANA LETTER DU
+2446 3066 HIRAGANA LETTER TE
+2447 3067 HIRAGANA LETTER DE
+2448 3068 HIRAGANA LETTER TO
+2449 3069 HIRAGANA LETTER DO
+244A 306A HIRAGANA LETTER NA
+244B 306B HIRAGANA LETTER NI
+244C 306C HIRAGANA LETTER NU
+244D 306D HIRAGANA LETTER NE
+244E 306E HIRAGANA LETTER NO
+244F 306F HIRAGANA LETTER HA
+2450 3070 HIRAGANA LETTER BA
+2451 3071 HIRAGANA LETTER PA
+2452 3072 HIRAGANA LETTER HI
+2453 3073 HIRAGANA LETTER BI
+2454 3074 HIRAGANA LETTER PI
+2455 3075 HIRAGANA LETTER HU
+2456 3076 HIRAGANA LETTER BU
+2457 3077 HIRAGANA LETTER PU
+2458 3078 HIRAGANA LETTER HE
+2459 3079 HIRAGANA LETTER BE
+245A 307A HIRAGANA LETTER PE
+245B 307B HIRAGANA LETTER HO
+245C 307C HIRAGANA LETTER BO
+245D 307D HIRAGANA LETTER PO
+245E 307E HIRAGANA LETTER MA
+245F 307F HIRAGANA LETTER MI
+2460 3080 HIRAGANA LETTER MU
+2461 3081 HIRAGANA LETTER ME
+2462 3082 HIRAGANA LETTER MO
+2463 3083 HIRAGANA LETTER SMALL YA
+2464 3084 HIRAGANA LETTER YA
+2465 3085 HIRAGANA LETTER SMALL YU
+2466 3086 HIRAGANA LETTER YU
+2467 3087 HIRAGANA LETTER SMALL YO
+2468 3088 HIRAGANA LETTER YO
+2469 3089 HIRAGANA LETTER RA
+246A 308A HIRAGANA LETTER RI
+246B 308B HIRAGANA LETTER RU
+246C 308C HIRAGANA LETTER RE
+246D 308D HIRAGANA LETTER RO
+246E 308E HIRAGANA LETTER SMALL WA
+246F 308F HIRAGANA LETTER WA
+2470 3090 HIRAGANA LETTER WI
+2471 3091 HIRAGANA LETTER WE
+2472 3092 HIRAGANA LETTER WO
+2473 3093 HIRAGANA LETTER N
+2521 30A1 KATAKANA LETTER SMALL A
+2522 30A2 KATAKANA LETTER A
+2523 30A3 KATAKANA LETTER SMALL I
+2524 30A4 KATAKANA LETTER I
+2525 30A5 KATAKANA LETTER SMALL U
+2526 30A6 KATAKANA LETTER U
+2527 30A7 KATAKANA LETTER SMALL E
+2528 30A8 KATAKANA LETTER E
+2529 30A9 KATAKANA LETTER SMALL O
+252A 30AA KATAKANA LETTER O
+252B 30AB KATAKANA LETTER KA
+252C 30AC KATAKANA LETTER GA
+252D 30AD KATAKANA LETTER KI
+252E 30AE KATAKANA LETTER GI
+252F 30AF KATAKANA LETTER KU
+2530 30B0 KATAKANA LETTER GU
+2531 30B1 KATAKANA LETTER KE
+2532 30B2 KATAKANA LETTER GE
+2533 30B3 KATAKANA LETTER KO
+2534 30B4 KATAKANA LETTER GO
+2535 30B5 KATAKANA LETTER SA
+2536 30B6 KATAKANA LETTER ZA
+2537 30B7 KATAKANA LETTER SI
+2538 30B8 KATAKANA LETTER ZI
+2539 30B9 KATAKANA LETTER SU
+253A 30BA KATAKANA LETTER ZU
+253B 30BB KATAKANA LETTER SE
+253C 30BC KATAKANA LETTER ZE
+253D 30BD KATAKANA LETTER SO
+253E 30BE KATAKANA LETTER ZO
+253F 30BF KATAKANA LETTER TA
+2540 30C0 KATAKANA LETTER DA
+2541 30C1 KATAKANA LETTER TI
+2542 30C2 KATAKANA LETTER DI
+2543 30C3 KATAKANA LETTER SMALL TU
+2544 30C4 KATAKANA LETTER TU
+2545 30C5 KATAKANA LETTER DU
+2546 30C6 KATAKANA LETTER TE
+2547 30C7 KATAKANA LETTER DE
+2548 30C8 KATAKANA LETTER TO
+2549 30C9 KATAKANA LETTER DO
+254A 30CA KATAKANA LETTER NA
+254B 30CB KATAKANA LETTER NI
+254C 30CC KATAKANA LETTER NU
+254D 30CD KATAKANA LETTER NE
+254E 30CE KATAKANA LETTER NO
+254F 30CF KATAKANA LETTER HA
+2550 30D0 KATAKANA LETTER BA
+2551 30D1 KATAKANA LETTER PA
+2552 30D2 KATAKANA LETTER HI
+2553 30D3 KATAKANA LETTER BI
+2554 30D4 KATAKANA LETTER PI
+2555 30D5 KATAKANA LETTER HU
+2556 30D6 KATAKANA LETTER BU
+2557 30D7 KATAKANA LETTER PU
+2558 30D8 KATAKANA LETTER HE
+2559 30D9 KATAKANA LETTER BE
+255A 30DA KATAKANA LETTER PE
+255B 30DB KATAKANA LETTER HO
+255C 30DC KATAKANA LETTER BO
+255D 30DD KATAKANA LETTER PO
+255E 30DE KATAKANA LETTER MA
+255F 30DF KATAKANA LETTER MI
+2560 30E0 KATAKANA LETTER MU
+2561 30E1 KATAKANA LETTER ME
+2562 30E2 KATAKANA LETTER MO
+2563 30E3 KATAKANA LETTER SMALL YA
+2564 30E4 KATAKANA LETTER YA
+2565 30E5 KATAKANA LETTER SMALL YU
+2566 30E6 KATAKANA LETTER YU
+2567 30E7 KATAKANA LETTER SMALL YO
+2568 30E8 KATAKANA LETTER YO
+2569 30E9 KATAKANA LETTER RA
+256A 30EA KATAKANA LETTER RI
+256B 30EB KATAKANA LETTER RU
+256C 30EC KATAKANA LETTER RE
+256D 30ED KATAKANA LETTER RO
+256E 30EE KATAKANA LETTER SMALL WA
+256F 30EF KATAKANA LETTER WA
+2570 30F0 KATAKANA LETTER WI
+2571 30F1 KATAKANA LETTER WE
+2572 30F2 KATAKANA LETTER WO
+2573 30F3 KATAKANA LETTER N
+2574 30F4 KATAKANA LETTER VU
+2575 30F5 KATAKANA LETTER SMALL KA
+2576 30F6 KATAKANA LETTER SMALL KE
+2621 0391 GREEK CAPITAL LETTER ALPHA
+2622 0392 GREEK CAPITAL LETTER BETA
+2623 0393 GREEK CAPITAL LETTER GAMMA
+2624 0394 GREEK CAPITAL LETTER DELTA
+2625 0395 GREEK CAPITAL LETTER EPSILON
+2626 0396 GREEK CAPITAL LETTER ZETA
+2627 0397 GREEK CAPITAL LETTER ETA
+2628 0398 GREEK CAPITAL LETTER THETA
+2629 0399 GREEK CAPITAL LETTER IOTA
+262A 039A GREEK CAPITAL LETTER KAPPA
+262B 039B GREEK CAPITAL LETTER LAMDA
+262C 039C GREEK CAPITAL LETTER MU
+262D 039D GREEK CAPITAL LETTER NU
+262E 039E GREEK CAPITAL LETTER XI
+262F 039F GREEK CAPITAL LETTER OMICRON
+2630 03A0 GREEK CAPITAL LETTER PI
+2631 03A1 GREEK CAPITAL LETTER RHO
+2632 03A3 GREEK CAPITAL LETTER SIGMA
+2633 03A4 GREEK CAPITAL LETTER TAU
+2634 03A5 GREEK CAPITAL LETTER UPSILON
+2635 03A6 GREEK CAPITAL LETTER PHI
+2636 03A7 GREEK CAPITAL LETTER CHI
+2637 03A8 GREEK CAPITAL LETTER PSI
+2638 03A9 GREEK CAPITAL LETTER OMEGA
+2641 03B1 GREEK SMALL LETTER ALPHA
+2642 03B2 GREEK SMALL LETTER BETA
+2643 03B3 GREEK SMALL LETTER GAMMA
+2644 03B4 GREEK SMALL LETTER DELTA
+2645 03B5 GREEK SMALL LETTER EPSILON
+2646 03B6 GREEK SMALL LETTER ZETA
+2647 03B7 GREEK SMALL LETTER ETA
+2648 03B8 GREEK SMALL LETTER THETA
+2649 03B9 GREEK SMALL LETTER IOTA
+264A 03BA GREEK SMALL LETTER KAPPA
+264B 03BB GREEK SMALL LETTER LAMDA
+264C 03BC GREEK SMALL LETTER MU
+264D 03BD GREEK SMALL LETTER NU
+264E 03BE GREEK SMALL LETTER XI
+264F 03BF GREEK SMALL LETTER OMICRON
+2650 03C0 GREEK SMALL LETTER PI
+2651 03C1 GREEK SMALL LETTER RHO
+2652 03C3 GREEK SMALL LETTER SIGMA
+2653 03C4 GREEK SMALL LETTER TAU
+2654 03C5 GREEK SMALL LETTER UPSILON
+2655 03C6 GREEK SMALL LETTER PHI
+2656 03C7 GREEK SMALL LETTER CHI
+2657 03C8 GREEK SMALL LETTER PSI
+2658 03C9 GREEK SMALL LETTER OMEGA
+2721 0410 CYRILLIC CAPITAL LETTER A
+2722 0411 CYRILLIC CAPITAL LETTER BE
+2723 0412 CYRILLIC CAPITAL LETTER VE
+2724 0413 CYRILLIC CAPITAL LETTER GHE
+2725 0414 CYRILLIC CAPITAL LETTER DE
+2726 0415 CYRILLIC CAPITAL LETTER IE
+2727 0401 CYRILLIC CAPITAL LETTER IO
+2728 0416 CYRILLIC CAPITAL LETTER ZHE
+2729 0417 CYRILLIC CAPITAL LETTER ZE
+272A 0418 CYRILLIC CAPITAL LETTER I
+272B 0419 CYRILLIC CAPITAL LETTER SHORT I
+272C 041A CYRILLIC CAPITAL LETTER KA
+272D 041B CYRILLIC CAPITAL LETTER EL
+272E 041C CYRILLIC CAPITAL LETTER EM
+272F 041D CYRILLIC CAPITAL LETTER EN
+2730 041E CYRILLIC CAPITAL LETTER O
+2731 041F CYRILLIC CAPITAL LETTER PE
+2732 0420 CYRILLIC CAPITAL LETTER ER
+2733 0421 CYRILLIC CAPITAL LETTER ES
+2734 0422 CYRILLIC CAPITAL LETTER TE
+2735 0423 CYRILLIC CAPITAL LETTER U
+2736 0424 CYRILLIC CAPITAL LETTER EF
+2737 0425 CYRILLIC CAPITAL LETTER HA
+2738 0426 CYRILLIC CAPITAL LETTER TSE
+2739 0427 CYRILLIC CAPITAL LETTER CHE
+273A 0428 CYRILLIC CAPITAL LETTER SHA
+273B 0429 CYRILLIC CAPITAL LETTER SHCHA
+273C 042A CYRILLIC CAPITAL LETTER HARD SIGN
+273D 042B CYRILLIC CAPITAL LETTER YERU
+273E 042C CYRILLIC CAPITAL LETTER SOFT SIGN
+273F 042D CYRILLIC CAPITAL LETTER E
+2740 042E CYRILLIC CAPITAL LETTER YU
+2741 042F CYRILLIC CAPITAL LETTER YA
+2751 0430 CYRILLIC SMALL LETTER A
+2752 0431 CYRILLIC SMALL LETTER BE
+2753 0432 CYRILLIC SMALL LETTER VE
+2754 0433 CYRILLIC SMALL LETTER GHE
+2755 0434 CYRILLIC SMALL LETTER DE
+2756 0435 CYRILLIC SMALL LETTER IE
+2757 0451 CYRILLIC SMALL LETTER IO
+2758 0436 CYRILLIC SMALL LETTER ZHE
+2759 0437 CYRILLIC SMALL LETTER ZE
+275A 0438 CYRILLIC SMALL LETTER I
+275B 0439 CYRILLIC SMALL LETTER SHORT I
+275C 043A CYRILLIC SMALL LETTER KA
+275D 043B CYRILLIC SMALL LETTER EL
+275E 043C CYRILLIC SMALL LETTER EM
+275F 043D CYRILLIC SMALL LETTER EN
+2760 043E CYRILLIC SMALL LETTER O
+2761 043F CYRILLIC SMALL LETTER PE
+2762 0440 CYRILLIC SMALL LETTER ER
+2763 0441 CYRILLIC SMALL LETTER ES
+2764 0442 CYRILLIC SMALL LETTER TE
+2765 0443 CYRILLIC SMALL LETTER U
+2766 0444 CYRILLIC SMALL LETTER EF
+2767 0445 CYRILLIC SMALL LETTER HA
+2768 0446 CYRILLIC SMALL LETTER TSE
+2769 0447 CYRILLIC SMALL LETTER CHE
+276A 0448 CYRILLIC SMALL LETTER SHA
+276B 0449 CYRILLIC SMALL LETTER SHCHA
+276C 044A CYRILLIC SMALL LETTER HARD SIGN
+276D 044B CYRILLIC SMALL LETTER YERU
+276E 044C CYRILLIC SMALL LETTER SOFT SIGN
+276F 044D CYRILLIC SMALL LETTER E
+2770 044E CYRILLIC SMALL LETTER YU
+2771 044F CYRILLIC SMALL LETTER YA
+2821 2500 BOX DRAWINGS LIGHT HORIZONTAL
+2822 2502 BOX DRAWINGS LIGHT VERTICAL
+2823 250C BOX DRAWINGS LIGHT DOWN AND RIGHT
+2824 2510 BOX DRAWINGS LIGHT DOWN AND LEFT
+2825 2518 BOX DRAWINGS LIGHT UP AND LEFT
+2826 2514 BOX DRAWINGS LIGHT UP AND RIGHT
+2827 251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+2828 252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+2829 2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT
+282A 2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL
+282B 253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+282C 2501 BOX DRAWINGS HEAVY HORIZONTAL
+282D 2503 BOX DRAWINGS HEAVY VERTICAL
+282E 250F BOX DRAWINGS HEAVY DOWN AND RIGHT
+282F 2513 BOX DRAWINGS HEAVY DOWN AND LEFT
+2830 251B BOX DRAWINGS HEAVY UP AND LEFT
+2831 2517 BOX DRAWINGS HEAVY UP AND RIGHT
+2832 2523 BOX DRAWINGS HEAVY VERTICAL AND RIGHT
+2833 2533 BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
+2834 252B BOX DRAWINGS HEAVY VERTICAL AND LEFT
+2835 253B BOX DRAWINGS HEAVY UP AND HORIZONTAL
+2836 254B BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
+2837 2520 BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT
+2838 252F BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY
+2839 2528 BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT
+283A 2537 BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY
+283B 253F BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY
+283C 251D BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY
+283D 2530 BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT
+283E 2525 BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY
+283F 2538 BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT
+2840 2542 BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT
+3021 4E9C <CJK>
+3022 5516 <CJK>
+3023 5A03 <CJK>
+3024 963F <CJK>
+3025 54C0 <CJK>
+3026 611B <CJK>
+3027 6328 <CJK>
+3028 59F6 <CJK>
+3029 9022 <CJK>
+302A 8475 <CJK>
+302B 831C <CJK>
+302C 7A50 <CJK>
+302D 60AA <CJK>
+302E 63E1 <CJK>
+302F 6E25 <CJK>
+3030 65ED <CJK>
+3031 8466 <CJK>
+3032 82A6 <CJK>
+3033 9BF5 <CJK>
+3034 6893 <CJK>
+3035 5727 <CJK>
+3036 65A1 <CJK>
+3037 6271 <CJK>
+3038 5B9B <CJK>
+3039 59D0 <CJK>
+303A 867B <CJK>
+303B 98F4 <CJK>
+303C 7D62 <CJK>
+303D 7DBE <CJK>
+303E 9B8E <CJK>
+303F 6216 <CJK>
+3040 7C9F <CJK>
+3041 88B7 <CJK>
+3042 5B89 <CJK>
+3043 5EB5 <CJK>
+3044 6309 <CJK>
+3045 6697 <CJK>
+3046 6848 <CJK>
+3047 95C7 <CJK>
+3048 978D <CJK>
+3049 674F <CJK>
+304A 4EE5 <CJK>
+304B 4F0A <CJK>
+304C 4F4D <CJK>
+304D 4F9D <CJK>
+304E 5049 <CJK>
+304F 56F2 <CJK>
+3050 5937 <CJK>
+3051 59D4 <CJK>
+3052 5A01 <CJK>
+3053 5C09 <CJK>
+3054 60DF <CJK>
+3055 610F <CJK>
+3056 6170 <CJK>
+3057 6613 <CJK>
+3058 6905 <CJK>
+3059 70BA <CJK>
+305A 754F <CJK>
+305B 7570 <CJK>
+305C 79FB <CJK>
+305D 7DAD <CJK>
+305E 7DEF <CJK>
+305F 80C3 <CJK>
+3060 840E <CJK>
+3061 8863 <CJK>
+3062 8B02 <CJK>
+3063 9055 <CJK>
+3064 907A <CJK>
+3065 533B <CJK>
+3066 4E95 <CJK>
+3067 4EA5 <CJK>
+3068 57DF <CJK>
+3069 80B2 <CJK>
+306A 90C1 <CJK>
+306B 78EF <CJK>
+306C 4E00 <CJK>
+306D 58F1 <CJK>
+306E 6EA2 <CJK>
+306F 9038 <CJK>
+3070 7A32 <CJK>
+3071 8328 <CJK>
+3072 828B <CJK>
+3073 9C2F <CJK>
+3074 5141 <CJK>
+3075 5370 <CJK>
+3076 54BD <CJK>
+3077 54E1 <CJK>
+3078 56E0 <CJK>
+3079 59FB <CJK>
+307A 5F15 <CJK>
+307B 98F2 <CJK>
+307C 6DEB <CJK>
+307D 80E4 <CJK>
+307E 852D <CJK>
+3121 9662 <CJK>
+3122 9670 <CJK>
+3123 96A0 <CJK>
+3124 97FB <CJK>
+3125 540B <CJK>
+3126 53F3 <CJK>
+3127 5B87 <CJK>
+3128 70CF <CJK>
+3129 7FBD <CJK>
+312A 8FC2 <CJK>
+312B 96E8 <CJK>
+312C 536F <CJK>
+312D 9D5C <CJK>
+312E 7ABA <CJK>
+312F 4E11 <CJK>
+3130 7893 <CJK>
+3131 81FC <CJK>
+3132 6E26 <CJK>
+3133 5618 <CJK>
+3134 5504 <CJK>
+3135 6B1D <CJK>
+3136 851A <CJK>
+3137 9C3B <CJK>
+3138 59E5 <CJK>
+3139 53A9 <CJK>
+313A 6D66 <CJK>
+313B 74DC <CJK>
+313C 958F <CJK>
+313D 5642 <CJK>
+313E 4E91 <CJK>
+313F 904B <CJK>
+3140 96F2 <CJK>
+3141 834F <CJK>
+3142 990C <CJK>
+3143 53E1 <CJK>
+3144 55B6 <CJK>
+3145 5B30 <CJK>
+3146 5F71 <CJK>
+3147 6620 <CJK>
+3148 66F3 <CJK>
+3149 6804 <CJK>
+314A 6C38 <CJK>
+314B 6CF3 <CJK>
+314C 6D29 <CJK>
+314D 745B <CJK>
+314E 76C8 <CJK>
+314F 7A4E <CJK>
+3150 9834 <CJK>
+3151 82F1 <CJK>
+3152 885B <CJK>
+3153 8A60 <CJK>
+3154 92ED <CJK>
+3155 6DB2 <CJK>
+3156 75AB <CJK>
+3157 76CA <CJK>
+3158 99C5 <CJK>
+3159 60A6 <CJK>
+315A 8B01 <CJK>
+315B 8D8A <CJK>
+315C 95B2 <CJK>
+315D 698E <CJK>
+315E 53AD <CJK>
+315F 5186 <CJK>
+3160 5712 <CJK>
+3161 5830 <CJK>
+3162 5944 <CJK>
+3163 5BB4 <CJK>
+3164 5EF6 <CJK>
+3165 6028 <CJK>
+3166 63A9 <CJK>
+3167 63F4 <CJK>
+3168 6CBF <CJK>
+3169 6F14 <CJK>
+316A 708E <CJK>
+316B 7114 <CJK>
+316C 7159 <CJK>
+316D 71D5 <CJK>
+316E 733F <CJK>
+316F 7E01 <CJK>
+3170 8276 <CJK>
+3171 82D1 <CJK>
+3172 8597 <CJK>
+3173 9060 <CJK>
+3174 925B <CJK>
+3175 9D1B <CJK>
+3176 5869 <CJK>
+3177 65BC <CJK>
+3178 6C5A <CJK>
+3179 7525 <CJK>
+317A 51F9 <CJK>
+317B 592E <CJK>
+317C 5965 <CJK>
+317D 5F80 <CJK>
+317E 5FDC <CJK>
+3221 62BC <CJK>
+3222 65FA <CJK>
+3223 6A2A <CJK>
+3224 6B27 <CJK>
+3225 6BB4 <CJK>
+3226 738B <CJK>
+3227 7FC1 <CJK>
+3228 8956 <CJK>
+3229 9D2C <CJK>
+322A 9D0E <CJK>
+322B 9EC4 <CJK>
+322C 5CA1 <CJK>
+322D 6C96 <CJK>
+322E 837B <CJK>
+322F 5104 <CJK>
+3230 5C4B <CJK>
+3231 61B6 <CJK>
+3232 81C6 <CJK>
+3233 6876 <CJK>
+3234 7261 <CJK>
+3235 4E59 <CJK>
+3236 4FFA <CJK>
+3237 5378 <CJK>
+3238 6069 <CJK>
+3239 6E29 <CJK>
+323A 7A4F <CJK>
+323B 97F3 <CJK>
+323C 4E0B <CJK>
+323D 5316 <CJK>
+323E 4EEE <CJK>
+323F 4F55 <CJK>
+3240 4F3D <CJK>
+3241 4FA1 <CJK>
+3242 4F73 <CJK>
+3243 52A0 <CJK>
+3244 53EF <CJK>
+3245 5609 <CJK>
+3246 590F <CJK>
+3247 5AC1 <CJK>
+3248 5BB6 <CJK>
+3249 5BE1 <CJK>
+324A 79D1 <CJK>
+324B 6687 <CJK>
+324C 679C <CJK>
+324D 67B6 <CJK>
+324E 6B4C <CJK>
+324F 6CB3 <CJK>
+3250 706B <CJK>
+3251 73C2 <CJK>
+3252 798D <CJK>
+3253 79BE <CJK>
+3254 7A3C <CJK>
+3255 7B87 <CJK>
+3256 82B1 <CJK>
+3257 82DB <CJK>
+3258 8304 <CJK>
+3259 8377 <CJK>
+325A 83EF <CJK>
+325B 83D3 <CJK>
+325C 8766 <CJK>
+325D 8AB2 <CJK>
+325E 5629 <CJK>
+325F 8CA8 <CJK>
+3260 8FE6 <CJK>
+3261 904E <CJK>
+3262 971E <CJK>
+3263 868A <CJK>
+3264 4FC4 <CJK>
+3265 5CE8 <CJK>
+3266 6211 <CJK>
+3267 7259 <CJK>
+3268 753B <CJK>
+3269 81E5 <CJK>
+326A 82BD <CJK>
+326B 86FE <CJK>
+326C 8CC0 <CJK>
+326D 96C5 <CJK>
+326E 9913 <CJK>
+326F 99D5 <CJK>
+3270 4ECB <CJK>
+3271 4F1A <CJK>
+3272 89E3 <CJK>
+3273 56DE <CJK>
+3274 584A <CJK>
+3275 58CA <CJK>
+3276 5EFB <CJK>
+3277 5FEB <CJK>
+3278 602A <CJK>
+3279 6094 <CJK>
+327A 6062 <CJK>
+327B 61D0 <CJK>
+327C 6212 <CJK>
+327D 62D0 <CJK>
+327E 6539 <CJK>
+3321 9B41 <CJK>
+3322 6666 <CJK>
+3323 68B0 <CJK>
+3324 6D77 <CJK>
+3325 7070 <CJK>
+3326 754C <CJK>
+3327 7686 <CJK>
+3328 7D75 <CJK>
+3329 82A5 <CJK>
+332A 87F9 <CJK>
+332B 958B <CJK>
+332C 968E <CJK>
+332D 8C9D <CJK>
+332E 51F1 <CJK>
+332F 52BE <CJK>
+3330 5916 <CJK>
+3331 54B3 <CJK>
+3332 5BB3 <CJK>
+3333 5D16 <CJK>
+3334 6168 <CJK>
+3335 6982 <CJK>
+3336 6DAF <CJK>
+3337 788D <CJK>
+3338 84CB <CJK>
+3339 8857 <CJK>
+333A 8A72 <CJK>
+333B 93A7 <CJK>
+333C 9AB8 <CJK>
+333D 6D6C <CJK>
+333E 99A8 <CJK>
+333F 86D9 <CJK>
+3340 57A3 <CJK>
+3341 67FF <CJK>
+3342 86CE <CJK>
+3343 920E <CJK>
+3344 5283 <CJK>
+3345 5687 <CJK>
+3346 5404 <CJK>
+3347 5ED3 <CJK>
+3348 62E1 <CJK>
+3349 64B9 <CJK>
+334A 683C <CJK>
+334B 6838 <CJK>
+334C 6BBB <CJK>
+334D 7372 <CJK>
+334E 78BA <CJK>
+334F 7A6B <CJK>
+3350 899A <CJK>
+3351 89D2 <CJK>
+3352 8D6B <CJK>
+3353 8F03 <CJK>
+3354 90ED <CJK>
+3355 95A3 <CJK>
+3356 9694 <CJK>
+3357 9769 <CJK>
+3358 5B66 <CJK>
+3359 5CB3 <CJK>
+335A 697D <CJK>
+335B 984D <CJK>
+335C 984E <CJK>
+335D 639B <CJK>
+335E 7B20 <CJK>
+335F 6A2B <CJK>
+3360 6A7F <CJK>
+3361 68B6 <CJK>
+3362 9C0D <CJK>
+3363 6F5F <CJK>
+3364 5272 <CJK>
+3365 559D <CJK>
+3366 6070 <CJK>
+3367 62EC <CJK>
+3368 6D3B <CJK>
+3369 6E07 <CJK>
+336A 6ED1 <CJK>
+336B 845B <CJK>
+336C 8910 <CJK>
+336D 8F44 <CJK>
+336E 4E14 <CJK>
+336F 9C39 <CJK>
+3370 53F6 <CJK>
+3371 691B <CJK>
+3372 6A3A <CJK>
+3373 9784 <CJK>
+3374 682A <CJK>
+3375 515C <CJK>
+3376 7AC3 <CJK>
+3377 84B2 <CJK>
+3378 91DC <CJK>
+3379 938C <CJK>
+337A 565B <CJK>
+337B 9D28 <CJK>
+337C 6822 <CJK>
+337D 8305 <CJK>
+337E 8431 <CJK>
+3421 7CA5 <CJK>
+3422 5208 <CJK>
+3423 82C5 <CJK>
+3424 74E6 <CJK>
+3425 4E7E <CJK>
+3426 4F83 <CJK>
+3427 51A0 <CJK>
+3428 5BD2 <CJK>
+3429 520A <CJK>
+342A 52D8 <CJK>
+342B 52E7 <CJK>
+342C 5DFB <CJK>
+342D 559A <CJK>
+342E 582A <CJK>
+342F 59E6 <CJK>
+3430 5B8C <CJK>
+3431 5B98 <CJK>
+3432 5BDB <CJK>
+3433 5E72 <CJK>
+3434 5E79 <CJK>
+3435 60A3 <CJK>
+3436 611F <CJK>
+3437 6163 <CJK>
+3438 61BE <CJK>
+3439 63DB <CJK>
+343A 6562 <CJK>
+343B 67D1 <CJK>
+343C 6853 <CJK>
+343D 68FA <CJK>
+343E 6B3E <CJK>
+343F 6B53 <CJK>
+3440 6C57 <CJK>
+3441 6F22 <CJK>
+3442 6F97 <CJK>
+3443 6F45 <CJK>
+3444 74B0 <CJK>
+3445 7518 <CJK>
+3446 76E3 <CJK>
+3447 770B <CJK>
+3448 7AFF <CJK>
+3449 7BA1 <CJK>
+344A 7C21 <CJK>
+344B 7DE9 <CJK>
+344C 7F36 <CJK>
+344D 7FF0 <CJK>
+344E 809D <CJK>
+344F 8266 <CJK>
+3450 839E <CJK>
+3451 89B3 <CJK>
+3452 8ACC <CJK>
+3453 8CAB <CJK>
+3454 9084 <CJK>
+3455 9451 <CJK>
+3456 9593 <CJK>
+3457 9591 <CJK>
+3458 95A2 <CJK>
+3459 9665 <CJK>
+345A 97D3 <CJK>
+345B 9928 <CJK>
+345C 8218 <CJK>
+345D 4E38 <CJK>
+345E 542B <CJK>
+345F 5CB8 <CJK>
+3460 5DCC <CJK>
+3461 73A9 <CJK>
+3462 764C <CJK>
+3463 773C <CJK>
+3464 5CA9 <CJK>
+3465 7FEB <CJK>
+3466 8D0B <CJK>
+3467 96C1 <CJK>
+3468 9811 <CJK>
+3469 9854 <CJK>
+346A 9858 <CJK>
+346B 4F01 <CJK>
+346C 4F0E <CJK>
+346D 5371 <CJK>
+346E 559C <CJK>
+346F 5668 <CJK>
+3470 57FA <CJK>
+3471 5947 <CJK>
+3472 5B09 <CJK>
+3473 5BC4 <CJK>
+3474 5C90 <CJK>
+3475 5E0C <CJK>
+3476 5E7E <CJK>
+3477 5FCC <CJK>
+3478 63EE <CJK>
+3479 673A <CJK>
+347A 65D7 <CJK>
+347B 65E2 <CJK>
+347C 671F <CJK>
+347D 68CB <CJK>
+347E 68C4 <CJK>
+3521 6A5F <CJK>
+3522 5E30 <CJK>
+3523 6BC5 <CJK>
+3524 6C17 <CJK>
+3525 6C7D <CJK>
+3526 757F <CJK>
+3527 7948 <CJK>
+3528 5B63 <CJK>
+3529 7A00 <CJK>
+352A 7D00 <CJK>
+352B 5FBD <CJK>
+352C 898F <CJK>
+352D 8A18 <CJK>
+352E 8CB4 <CJK>
+352F 8D77 <CJK>
+3530 8ECC <CJK>
+3531 8F1D <CJK>
+3532 98E2 <CJK>
+3533 9A0E <CJK>
+3534 9B3C <CJK>
+3535 4E80 <CJK>
+3536 507D <CJK>
+3537 5100 <CJK>
+3538 5993 <CJK>
+3539 5B9C <CJK>
+353A 622F <CJK>
+353B 6280 <CJK>
+353C 64EC <CJK>
+353D 6B3A <CJK>
+353E 72A0 <CJK>
+353F 7591 <CJK>
+3540 7947 <CJK>
+3541 7FA9 <CJK>
+3542 87FB <CJK>
+3543 8ABC <CJK>
+3544 8B70 <CJK>
+3545 63AC <CJK>
+3546 83CA <CJK>
+3547 97A0 <CJK>
+3548 5409 <CJK>
+3549 5403 <CJK>
+354A 55AB <CJK>
+354B 6854 <CJK>
+354C 6A58 <CJK>
+354D 8A70 <CJK>
+354E 7827 <CJK>
+354F 6775 <CJK>
+3550 9ECD <CJK>
+3551 5374 <CJK>
+3552 5BA2 <CJK>
+3553 811A <CJK>
+3554 8650 <CJK>
+3555 9006 <CJK>
+3556 4E18 <CJK>
+3557 4E45 <CJK>
+3558 4EC7 <CJK>
+3559 4F11 <CJK>
+355A 53CA <CJK>
+355B 5438 <CJK>
+355C 5BAE <CJK>
+355D 5F13 <CJK>
+355E 6025 <CJK>
+355F 6551 <CJK>
+3560 673D <CJK>
+3561 6C42 <CJK>
+3562 6C72 <CJK>
+3563 6CE3 <CJK>
+3564 7078 <CJK>
+3565 7403 <CJK>
+3566 7A76 <CJK>
+3567 7AAE <CJK>
+3568 7B08 <CJK>
+3569 7D1A <CJK>
+356A 7CFE <CJK>
+356B 7D66 <CJK>
+356C 65E7 <CJK>
+356D 725B <CJK>
+356E 53BB <CJK>
+356F 5C45 <CJK>
+3570 5DE8 <CJK>
+3571 62D2 <CJK>
+3572 62E0 <CJK>
+3573 6319 <CJK>
+3574 6E20 <CJK>
+3575 865A <CJK>
+3576 8A31 <CJK>
+3577 8DDD <CJK>
+3578 92F8 <CJK>
+3579 6F01 <CJK>
+357A 79A6 <CJK>
+357B 9B5A <CJK>
+357C 4EA8 <CJK>
+357D 4EAB <CJK>
+357E 4EAC <CJK>
+3621 4F9B <CJK>
+3622 4FA0 <CJK>
+3623 50D1 <CJK>
+3624 5147 <CJK>
+3625 7AF6 <CJK>
+3626 5171 <CJK>
+3627 51F6 <CJK>
+3628 5354 <CJK>
+3629 5321 <CJK>
+362A 537F <CJK>
+362B 53EB <CJK>
+362C 55AC <CJK>
+362D 5883 <CJK>
+362E 5CE1 <CJK>
+362F 5F37 <CJK>
+3630 5F4A <CJK>
+3631 602F <CJK>
+3632 6050 <CJK>
+3633 606D <CJK>
+3634 631F <CJK>
+3635 6559 <CJK>
+3636 6A4B <CJK>
+3637 6CC1 <CJK>
+3638 72C2 <CJK>
+3639 72ED <CJK>
+363A 77EF <CJK>
+363B 80F8 <CJK>
+363C 8105 <CJK>
+363D 8208 <CJK>
+363E 854E <CJK>
+363F 90F7 <CJK>
+3640 93E1 <CJK>
+3641 97FF <CJK>
+3642 9957 <CJK>
+3643 9A5A <CJK>
+3644 4EF0 <CJK>
+3645 51DD <CJK>
+3646 5C2D <CJK>
+3647 6681 <CJK>
+3648 696D <CJK>
+3649 5C40 <CJK>
+364A 66F2 <CJK>
+364B 6975 <CJK>
+364C 7389 <CJK>
+364D 6850 <CJK>
+364E 7C81 <CJK>
+364F 50C5 <CJK>
+3650 52E4 <CJK>
+3651 5747 <CJK>
+3652 5DFE <CJK>
+3653 9326 <CJK>
+3654 65A4 <CJK>
+3655 6B23 <CJK>
+3656 6B3D <CJK>
+3657 7434 <CJK>
+3658 7981 <CJK>
+3659 79BD <CJK>
+365A 7B4B <CJK>
+365B 7DCA <CJK>
+365C 82B9 <CJK>
+365D 83CC <CJK>
+365E 887F <CJK>
+365F 895F <CJK>
+3660 8B39 <CJK>
+3661 8FD1 <CJK>
+3662 91D1 <CJK>
+3663 541F <CJK>
+3664 9280 <CJK>
+3665 4E5D <CJK>
+3666 5036 <CJK>
+3667 53E5 <CJK>
+3668 533A <CJK>
+3669 72D7 <CJK>
+366A 7396 <CJK>
+366B 77E9 <CJK>
+366C 82E6 <CJK>
+366D 8EAF <CJK>
+366E 99C6 <CJK>
+366F 99C8 <CJK>
+3670 99D2 <CJK>
+3671 5177 <CJK>
+3672 611A <CJK>
+3673 865E <CJK>
+3674 55B0 <CJK>
+3675 7A7A <CJK>
+3676 5076 <CJK>
+3677 5BD3 <CJK>
+3678 9047 <CJK>
+3679 9685 <CJK>
+367A 4E32 <CJK>
+367B 6ADB <CJK>
+367C 91E7 <CJK>
+367D 5C51 <CJK>
+367E 5C48 <CJK>
+3721 6398 <CJK>
+3722 7A9F <CJK>
+3723 6C93 <CJK>
+3724 9774 <CJK>
+3725 8F61 <CJK>
+3726 7AAA <CJK>
+3727 718A <CJK>
+3728 9688 <CJK>
+3729 7C82 <CJK>
+372A 6817 <CJK>
+372B 7E70 <CJK>
+372C 6851 <CJK>
+372D 936C <CJK>
+372E 52F2 <CJK>
+372F 541B <CJK>
+3730 85AB <CJK>
+3731 8A13 <CJK>
+3732 7FA4 <CJK>
+3733 8ECD <CJK>
+3734 90E1 <CJK>
+3735 5366 <CJK>
+3736 8888 <CJK>
+3737 7941 <CJK>
+3738 4FC2 <CJK>
+3739 50BE <CJK>
+373A 5211 <CJK>
+373B 5144 <CJK>
+373C 5553 <CJK>
+373D 572D <CJK>
+373E 73EA <CJK>
+373F 578B <CJK>
+3740 5951 <CJK>
+3741 5F62 <CJK>
+3742 5F84 <CJK>
+3743 6075 <CJK>
+3744 6176 <CJK>
+3745 6167 <CJK>
+3746 61A9 <CJK>
+3747 63B2 <CJK>
+3748 643A <CJK>
+3749 656C <CJK>
+374A 666F <CJK>
+374B 6842 <CJK>
+374C 6E13 <CJK>
+374D 7566 <CJK>
+374E 7A3D <CJK>
+374F 7CFB <CJK>
+3750 7D4C <CJK>
+3751 7D99 <CJK>
+3752 7E4B <CJK>
+3753 7F6B <CJK>
+3754 830E <CJK>
+3755 834A <CJK>
+3756 86CD <CJK>
+3757 8A08 <CJK>
+3758 8A63 <CJK>
+3759 8B66 <CJK>
+375A 8EFD <CJK>
+375B 981A <CJK>
+375C 9D8F <CJK>
+375D 82B8 <CJK>
+375E 8FCE <CJK>
+375F 9BE8 <CJK>
+3760 5287 <CJK>
+3761 621F <CJK>
+3762 6483 <CJK>
+3763 6FC0 <CJK>
+3764 9699 <CJK>
+3765 6841 <CJK>
+3766 5091 <CJK>
+3767 6B20 <CJK>
+3768 6C7A <CJK>
+3769 6F54 <CJK>
+376A 7A74 <CJK>
+376B 7D50 <CJK>
+376C 8840 <CJK>
+376D 8A23 <CJK>
+376E 6708 <CJK>
+376F 4EF6 <CJK>
+3770 5039 <CJK>
+3771 5026 <CJK>
+3772 5065 <CJK>
+3773 517C <CJK>
+3774 5238 <CJK>
+3775 5263 <CJK>
+3776 55A7 <CJK>
+3777 570F <CJK>
+3778 5805 <CJK>
+3779 5ACC <CJK>
+377A 5EFA <CJK>
+377B 61B2 <CJK>
+377C 61F8 <CJK>
+377D 62F3 <CJK>
+377E 6372 <CJK>
+3821 691C <CJK>
+3822 6A29 <CJK>
+3823 727D <CJK>
+3824 72AC <CJK>
+3825 732E <CJK>
+3826 7814 <CJK>
+3827 786F <CJK>
+3828 7D79 <CJK>
+3829 770C <CJK>
+382A 80A9 <CJK>
+382B 898B <CJK>
+382C 8B19 <CJK>
+382D 8CE2 <CJK>
+382E 8ED2 <CJK>
+382F 9063 <CJK>
+3830 9375 <CJK>
+3831 967A <CJK>
+3832 9855 <CJK>
+3833 9A13 <CJK>
+3834 9E78 <CJK>
+3835 5143 <CJK>
+3836 539F <CJK>
+3837 53B3 <CJK>
+3838 5E7B <CJK>
+3839 5F26 <CJK>
+383A 6E1B <CJK>
+383B 6E90 <CJK>
+383C 7384 <CJK>
+383D 73FE <CJK>
+383E 7D43 <CJK>
+383F 8237 <CJK>
+3840 8A00 <CJK>
+3841 8AFA <CJK>
+3842 9650 <CJK>
+3843 4E4E <CJK>
+3844 500B <CJK>
+3845 53E4 <CJK>
+3846 547C <CJK>
+3847 56FA <CJK>
+3848 59D1 <CJK>
+3849 5B64 <CJK>
+384A 5DF1 <CJK>
+384B 5EAB <CJK>
+384C 5F27 <CJK>
+384D 6238 <CJK>
+384E 6545 <CJK>
+384F 67AF <CJK>
+3850 6E56 <CJK>
+3851 72D0 <CJK>
+3852 7CCA <CJK>
+3853 88B4 <CJK>
+3854 80A1 <CJK>
+3855 80E1 <CJK>
+3856 83F0 <CJK>
+3857 864E <CJK>
+3858 8A87 <CJK>
+3859 8DE8 <CJK>
+385A 9237 <CJK>
+385B 96C7 <CJK>
+385C 9867 <CJK>
+385D 9F13 <CJK>
+385E 4E94 <CJK>
+385F 4E92 <CJK>
+3860 4F0D <CJK>
+3861 5348 <CJK>
+3862 5449 <CJK>
+3863 543E <CJK>
+3864 5A2F <CJK>
+3865 5F8C <CJK>
+3866 5FA1 <CJK>
+3867 609F <CJK>
+3868 68A7 <CJK>
+3869 6A8E <CJK>
+386A 745A <CJK>
+386B 7881 <CJK>
+386C 8A9E <CJK>
+386D 8AA4 <CJK>
+386E 8B77 <CJK>
+386F 9190 <CJK>
+3870 4E5E <CJK>
+3871 9BC9 <CJK>
+3872 4EA4 <CJK>
+3873 4F7C <CJK>
+3874 4FAF <CJK>
+3875 5019 <CJK>
+3876 5016 <CJK>
+3877 5149 <CJK>
+3878 516C <CJK>
+3879 529F <CJK>
+387A 52B9 <CJK>
+387B 52FE <CJK>
+387C 539A <CJK>
+387D 53E3 <CJK>
+387E 5411 <CJK>
+3921 540E <CJK>
+3922 5589 <CJK>
+3923 5751 <CJK>
+3924 57A2 <CJK>
+3925 597D <CJK>
+3926 5B54 <CJK>
+3927 5B5D <CJK>
+3928 5B8F <CJK>
+3929 5DE5 <CJK>
+392A 5DE7 <CJK>
+392B 5DF7 <CJK>
+392C 5E78 <CJK>
+392D 5E83 <CJK>
+392E 5E9A <CJK>
+392F 5EB7 <CJK>
+3930 5F18 <CJK>
+3931 6052 <CJK>
+3932 614C <CJK>
+3933 6297 <CJK>
+3934 62D8 <CJK>
+3935 63A7 <CJK>
+3936 653B <CJK>
+3937 6602 <CJK>
+3938 6643 <CJK>
+3939 66F4 <CJK>
+393A 676D <CJK>
+393B 6821 <CJK>
+393C 6897 <CJK>
+393D 69CB <CJK>
+393E 6C5F <CJK>
+393F 6D2A <CJK>
+3940 6D69 <CJK>
+3941 6E2F <CJK>
+3942 6E9D <CJK>
+3943 7532 <CJK>
+3944 7687 <CJK>
+3945 786C <CJK>
+3946 7A3F <CJK>
+3947 7CE0 <CJK>
+3948 7D05 <CJK>
+3949 7D18 <CJK>
+394A 7D5E <CJK>
+394B 7DB1 <CJK>
+394C 8015 <CJK>
+394D 8003 <CJK>
+394E 80AF <CJK>
+394F 80B1 <CJK>
+3950 8154 <CJK>
+3951 818F <CJK>
+3952 822A <CJK>
+3953 8352 <CJK>
+3954 884C <CJK>
+3955 8861 <CJK>
+3956 8B1B <CJK>
+3957 8CA2 <CJK>
+3958 8CFC <CJK>
+3959 90CA <CJK>
+395A 9175 <CJK>
+395B 9271 <CJK>
+395C 783F <CJK>
+395D 92FC <CJK>
+395E 95A4 <CJK>
+395F 964D <CJK>
+3960 9805 <CJK>
+3961 9999 <CJK>
+3962 9AD8 <CJK>
+3963 9D3B <CJK>
+3964 525B <CJK>
+3965 52AB <CJK>
+3966 53F7 <CJK>
+3967 5408 <CJK>
+3968 58D5 <CJK>
+3969 62F7 <CJK>
+396A 6FE0 <CJK>
+396B 8C6A <CJK>
+396C 8F5F <CJK>
+396D 9EB9 <CJK>
+396E 514B <CJK>
+396F 523B <CJK>
+3970 544A <CJK>
+3971 56FD <CJK>
+3972 7A40 <CJK>
+3973 9177 <CJK>
+3974 9D60 <CJK>
+3975 9ED2 <CJK>
+3976 7344 <CJK>
+3977 6F09 <CJK>
+3978 8170 <CJK>
+3979 7511 <CJK>
+397A 5FFD <CJK>
+397B 60DA <CJK>
+397C 9AA8 <CJK>
+397D 72DB <CJK>
+397E 8FBC <CJK>
+3A21 6B64 <CJK>
+3A22 9803 <CJK>
+3A23 4ECA <CJK>
+3A24 56F0 <CJK>
+3A25 5764 <CJK>
+3A26 58BE <CJK>
+3A27 5A5A <CJK>
+3A28 6068 <CJK>
+3A29 61C7 <CJK>
+3A2A 660F <CJK>
+3A2B 6606 <CJK>
+3A2C 6839 <CJK>
+3A2D 68B1 <CJK>
+3A2E 6DF7 <CJK>
+3A2F 75D5 <CJK>
+3A30 7D3A <CJK>
+3A31 826E <CJK>
+3A32 9B42 <CJK>
+3A33 4E9B <CJK>
+3A34 4F50 <CJK>
+3A35 53C9 <CJK>
+3A36 5506 <CJK>
+3A37 5D6F <CJK>
+3A38 5DE6 <CJK>
+3A39 5DEE <CJK>
+3A3A 67FB <CJK>
+3A3B 6C99 <CJK>
+3A3C 7473 <CJK>
+3A3D 7802 <CJK>
+3A3E 8A50 <CJK>
+3A3F 9396 <CJK>
+3A40 88DF <CJK>
+3A41 5750 <CJK>
+3A42 5EA7 <CJK>
+3A43 632B <CJK>
+3A44 50B5 <CJK>
+3A45 50AC <CJK>
+3A46 518D <CJK>
+3A47 6700 <CJK>
+3A48 54C9 <CJK>
+3A49 585E <CJK>
+3A4A 59BB <CJK>
+3A4B 5BB0 <CJK>
+3A4C 5F69 <CJK>
+3A4D 624D <CJK>
+3A4E 63A1 <CJK>
+3A4F 683D <CJK>
+3A50 6B73 <CJK>
+3A51 6E08 <CJK>
+3A52 707D <CJK>
+3A53 91C7 <CJK>
+3A54 7280 <CJK>
+3A55 7815 <CJK>
+3A56 7826 <CJK>
+3A57 796D <CJK>
+3A58 658E <CJK>
+3A59 7D30 <CJK>
+3A5A 83DC <CJK>
+3A5B 88C1 <CJK>
+3A5C 8F09 <CJK>
+3A5D 969B <CJK>
+3A5E 5264 <CJK>
+3A5F 5728 <CJK>
+3A60 6750 <CJK>
+3A61 7F6A <CJK>
+3A62 8CA1 <CJK>
+3A63 51B4 <CJK>
+3A64 5742 <CJK>
+3A65 962A <CJK>
+3A66 583A <CJK>
+3A67 698A <CJK>
+3A68 80B4 <CJK>
+3A69 54B2 <CJK>
+3A6A 5D0E <CJK>
+3A6B 57FC <CJK>
+3A6C 7895 <CJK>
+3A6D 9DFA <CJK>
+3A6E 4F5C <CJK>
+3A6F 524A <CJK>
+3A70 548B <CJK>
+3A71 643E <CJK>
+3A72 6628 <CJK>
+3A73 6714 <CJK>
+3A74 67F5 <CJK>
+3A75 7A84 <CJK>
+3A76 7B56 <CJK>
+3A77 7D22 <CJK>
+3A78 932F <CJK>
+3A79 685C <CJK>
+3A7A 9BAD <CJK>
+3A7B 7B39 <CJK>
+3A7C 5319 <CJK>
+3A7D 518A <CJK>
+3A7E 5237 <CJK>
+3B21 5BDF <CJK>
+3B22 62F6 <CJK>
+3B23 64AE <CJK>
+3B24 64E6 <CJK>
+3B25 672D <CJK>
+3B26 6BBA <CJK>
+3B27 85A9 <CJK>
+3B28 96D1 <CJK>
+3B29 7690 <CJK>
+3B2A 9BD6 <CJK>
+3B2B 634C <CJK>
+3B2C 9306 <CJK>
+3B2D 9BAB <CJK>
+3B2E 76BF <CJK>
+3B2F 6652 <CJK>
+3B30 4E09 <CJK>
+3B31 5098 <CJK>
+3B32 53C2 <CJK>
+3B33 5C71 <CJK>
+3B34 60E8 <CJK>
+3B35 6492 <CJK>
+3B36 6563 <CJK>
+3B37 685F <CJK>
+3B38 71E6 <CJK>
+3B39 73CA <CJK>
+3B3A 7523 <CJK>
+3B3B 7B97 <CJK>
+3B3C 7E82 <CJK>
+3B3D 8695 <CJK>
+3B3E 8B83 <CJK>
+3B3F 8CDB <CJK>
+3B40 9178 <CJK>
+3B41 9910 <CJK>
+3B42 65AC <CJK>
+3B43 66AB <CJK>
+3B44 6B8B <CJK>
+3B45 4ED5 <CJK>
+3B46 4ED4 <CJK>
+3B47 4F3A <CJK>
+3B48 4F7F <CJK>
+3B49 523A <CJK>
+3B4A 53F8 <CJK>
+3B4B 53F2 <CJK>
+3B4C 55E3 <CJK>
+3B4D 56DB <CJK>
+3B4E 58EB <CJK>
+3B4F 59CB <CJK>
+3B50 59C9 <CJK>
+3B51 59FF <CJK>
+3B52 5B50 <CJK>
+3B53 5C4D <CJK>
+3B54 5E02 <CJK>
+3B55 5E2B <CJK>
+3B56 5FD7 <CJK>
+3B57 601D <CJK>
+3B58 6307 <CJK>
+3B59 652F <CJK>
+3B5A 5B5C <CJK>
+3B5B 65AF <CJK>
+3B5C 65BD <CJK>
+3B5D 65E8 <CJK>
+3B5E 679D <CJK>
+3B5F 6B62 <CJK>
+3B60 6B7B <CJK>
+3B61 6C0F <CJK>
+3B62 7345 <CJK>
+3B63 7949 <CJK>
+3B64 79C1 <CJK>
+3B65 7CF8 <CJK>
+3B66 7D19 <CJK>
+3B67 7D2B <CJK>
+3B68 80A2 <CJK>
+3B69 8102 <CJK>
+3B6A 81F3 <CJK>
+3B6B 8996 <CJK>
+3B6C 8A5E <CJK>
+3B6D 8A69 <CJK>
+3B6E 8A66 <CJK>
+3B6F 8A8C <CJK>
+3B70 8AEE <CJK>
+3B71 8CC7 <CJK>
+3B72 8CDC <CJK>
+3B73 96CC <CJK>
+3B74 98FC <CJK>
+3B75 6B6F <CJK>
+3B76 4E8B <CJK>
+3B77 4F3C <CJK>
+3B78 4F8D <CJK>
+3B79 5150 <CJK>
+3B7A 5B57 <CJK>
+3B7B 5BFA <CJK>
+3B7C 6148 <CJK>
+3B7D 6301 <CJK>
+3B7E 6642 <CJK>
+3C21 6B21 <CJK>
+3C22 6ECB <CJK>
+3C23 6CBB <CJK>
+3C24 723E <CJK>
+3C25 74BD <CJK>
+3C26 75D4 <CJK>
+3C27 78C1 <CJK>
+3C28 793A <CJK>
+3C29 800C <CJK>
+3C2A 8033 <CJK>
+3C2B 81EA <CJK>
+3C2C 8494 <CJK>
+3C2D 8F9E <CJK>
+3C2E 6C50 <CJK>
+3C2F 9E7F <CJK>
+3C30 5F0F <CJK>
+3C31 8B58 <CJK>
+3C32 9D2B <CJK>
+3C33 7AFA <CJK>
+3C34 8EF8 <CJK>
+3C35 5B8D <CJK>
+3C36 96EB <CJK>
+3C37 4E03 <CJK>
+3C38 53F1 <CJK>
+3C39 57F7 <CJK>
+3C3A 5931 <CJK>
+3C3B 5AC9 <CJK>
+3C3C 5BA4 <CJK>
+3C3D 6089 <CJK>
+3C3E 6E7F <CJK>
+3C3F 6F06 <CJK>
+3C40 75BE <CJK>
+3C41 8CEA <CJK>
+3C42 5B9F <CJK>
+3C43 8500 <CJK>
+3C44 7BE0 <CJK>
+3C45 5072 <CJK>
+3C46 67F4 <CJK>
+3C47 829D <CJK>
+3C48 5C61 <CJK>
+3C49 854A <CJK>
+3C4A 7E1E <CJK>
+3C4B 820E <CJK>
+3C4C 5199 <CJK>
+3C4D 5C04 <CJK>
+3C4E 6368 <CJK>
+3C4F 8D66 <CJK>
+3C50 659C <CJK>
+3C51 716E <CJK>
+3C52 793E <CJK>
+3C53 7D17 <CJK>
+3C54 8005 <CJK>
+3C55 8B1D <CJK>
+3C56 8ECA <CJK>
+3C57 906E <CJK>
+3C58 86C7 <CJK>
+3C59 90AA <CJK>
+3C5A 501F <CJK>
+3C5B 52FA <CJK>
+3C5C 5C3A <CJK>
+3C5D 6753 <CJK>
+3C5E 707C <CJK>
+3C5F 7235 <CJK>
+3C60 914C <CJK>
+3C61 91C8 <CJK>
+3C62 932B <CJK>
+3C63 82E5 <CJK>
+3C64 5BC2 <CJK>
+3C65 5F31 <CJK>
+3C66 60F9 <CJK>
+3C67 4E3B <CJK>
+3C68 53D6 <CJK>
+3C69 5B88 <CJK>
+3C6A 624B <CJK>
+3C6B 6731 <CJK>
+3C6C 6B8A <CJK>
+3C6D 72E9 <CJK>
+3C6E 73E0 <CJK>
+3C6F 7A2E <CJK>
+3C70 816B <CJK>
+3C71 8DA3 <CJK>
+3C72 9152 <CJK>
+3C73 9996 <CJK>
+3C74 5112 <CJK>
+3C75 53D7 <CJK>
+3C76 546A <CJK>
+3C77 5BFF <CJK>
+3C78 6388 <CJK>
+3C79 6A39 <CJK>
+3C7A 7DAC <CJK>
+3C7B 9700 <CJK>
+3C7C 56DA <CJK>
+3C7D 53CE <CJK>
+3C7E 5468 <CJK>
+3D21 5B97 <CJK>
+3D22 5C31 <CJK>
+3D23 5DDE <CJK>
+3D24 4FEE <CJK>
+3D25 6101 <CJK>
+3D26 62FE <CJK>
+3D27 6D32 <CJK>
+3D28 79C0 <CJK>
+3D29 79CB <CJK>
+3D2A 7D42 <CJK>
+3D2B 7E4D <CJK>
+3D2C 7FD2 <CJK>
+3D2D 81ED <CJK>
+3D2E 821F <CJK>
+3D2F 8490 <CJK>
+3D30 8846 <CJK>
+3D31 8972 <CJK>
+3D32 8B90 <CJK>
+3D33 8E74 <CJK>
+3D34 8F2F <CJK>
+3D35 9031 <CJK>
+3D36 914B <CJK>
+3D37 916C <CJK>
+3D38 96C6 <CJK>
+3D39 919C <CJK>
+3D3A 4EC0 <CJK>
+3D3B 4F4F <CJK>
+3D3C 5145 <CJK>
+3D3D 5341 <CJK>
+3D3E 5F93 <CJK>
+3D3F 620E <CJK>
+3D40 67D4 <CJK>
+3D41 6C41 <CJK>
+3D42 6E0B <CJK>
+3D43 7363 <CJK>
+3D44 7E26 <CJK>
+3D45 91CD <CJK>
+3D46 9283 <CJK>
+3D47 53D4 <CJK>
+3D48 5919 <CJK>
+3D49 5BBF <CJK>
+3D4A 6DD1 <CJK>
+3D4B 795D <CJK>
+3D4C 7E2E <CJK>
+3D4D 7C9B <CJK>
+3D4E 587E <CJK>
+3D4F 719F <CJK>
+3D50 51FA <CJK>
+3D51 8853 <CJK>
+3D52 8FF0 <CJK>
+3D53 4FCA <CJK>
+3D54 5CFB <CJK>
+3D55 6625 <CJK>
+3D56 77AC <CJK>
+3D57 7AE3 <CJK>
+3D58 821C <CJK>
+3D59 99FF <CJK>
+3D5A 51C6 <CJK>
+3D5B 5FAA <CJK>
+3D5C 65EC <CJK>
+3D5D 696F <CJK>
+3D5E 6B89 <CJK>
+3D5F 6DF3 <CJK>
+3D60 6E96 <CJK>
+3D61 6F64 <CJK>
+3D62 76FE <CJK>
+3D63 7D14 <CJK>
+3D64 5DE1 <CJK>
+3D65 9075 <CJK>
+3D66 9187 <CJK>
+3D67 9806 <CJK>
+3D68 51E6 <CJK>
+3D69 521D <CJK>
+3D6A 6240 <CJK>
+3D6B 6691 <CJK>
+3D6C 66D9 <CJK>
+3D6D 6E1A <CJK>
+3D6E 5EB6 <CJK>
+3D6F 7DD2 <CJK>
+3D70 7F72 <CJK>
+3D71 66F8 <CJK>
+3D72 85AF <CJK>
+3D73 85F7 <CJK>
+3D74 8AF8 <CJK>
+3D75 52A9 <CJK>
+3D76 53D9 <CJK>
+3D77 5973 <CJK>
+3D78 5E8F <CJK>
+3D79 5F90 <CJK>
+3D7A 6055 <CJK>
+3D7B 92E4 <CJK>
+3D7C 9664 <CJK>
+3D7D 50B7 <CJK>
+3D7E 511F <CJK>
+3E21 52DD <CJK>
+3E22 5320 <CJK>
+3E23 5347 <CJK>
+3E24 53EC <CJK>
+3E25 54E8 <CJK>
+3E26 5546 <CJK>
+3E27 5531 <CJK>
+3E28 5617 <CJK>
+3E29 5968 <CJK>
+3E2A 59BE <CJK>
+3E2B 5A3C <CJK>
+3E2C 5BB5 <CJK>
+3E2D 5C06 <CJK>
+3E2E 5C0F <CJK>
+3E2F 5C11 <CJK>
+3E30 5C1A <CJK>
+3E31 5E84 <CJK>
+3E32 5E8A <CJK>
+3E33 5EE0 <CJK>
+3E34 5F70 <CJK>
+3E35 627F <CJK>
+3E36 6284 <CJK>
+3E37 62DB <CJK>
+3E38 638C <CJK>
+3E39 6377 <CJK>
+3E3A 6607 <CJK>
+3E3B 660C <CJK>
+3E3C 662D <CJK>
+3E3D 6676 <CJK>
+3E3E 677E <CJK>
+3E3F 68A2 <CJK>
+3E40 6A1F <CJK>
+3E41 6A35 <CJK>
+3E42 6CBC <CJK>
+3E43 6D88 <CJK>
+3E44 6E09 <CJK>
+3E45 6E58 <CJK>
+3E46 713C <CJK>
+3E47 7126 <CJK>
+3E48 7167 <CJK>
+3E49 75C7 <CJK>
+3E4A 7701 <CJK>
+3E4B 785D <CJK>
+3E4C 7901 <CJK>
+3E4D 7965 <CJK>
+3E4E 79F0 <CJK>
+3E4F 7AE0 <CJK>
+3E50 7B11 <CJK>
+3E51 7CA7 <CJK>
+3E52 7D39 <CJK>
+3E53 8096 <CJK>
+3E54 83D6 <CJK>
+3E55 848B <CJK>
+3E56 8549 <CJK>
+3E57 885D <CJK>
+3E58 88F3 <CJK>
+3E59 8A1F <CJK>
+3E5A 8A3C <CJK>
+3E5B 8A54 <CJK>
+3E5C 8A73 <CJK>
+3E5D 8C61 <CJK>
+3E5E 8CDE <CJK>
+3E5F 91A4 <CJK>
+3E60 9266 <CJK>
+3E61 937E <CJK>
+3E62 9418 <CJK>
+3E63 969C <CJK>
+3E64 9798 <CJK>
+3E65 4E0A <CJK>
+3E66 4E08 <CJK>
+3E67 4E1E <CJK>
+3E68 4E57 <CJK>
+3E69 5197 <CJK>
+3E6A 5270 <CJK>
+3E6B 57CE <CJK>
+3E6C 5834 <CJK>
+3E6D 58CC <CJK>
+3E6E 5B22 <CJK>
+3E6F 5E38 <CJK>
+3E70 60C5 <CJK>
+3E71 64FE <CJK>
+3E72 6761 <CJK>
+3E73 6756 <CJK>
+3E74 6D44 <CJK>
+3E75 72B6 <CJK>
+3E76 7573 <CJK>
+3E77 7A63 <CJK>
+3E78 84B8 <CJK>
+3E79 8B72 <CJK>
+3E7A 91B8 <CJK>
+3E7B 9320 <CJK>
+3E7C 5631 <CJK>
+3E7D 57F4 <CJK>
+3E7E 98FE <CJK>
+3F21 62ED <CJK>
+3F22 690D <CJK>
+3F23 6B96 <CJK>
+3F24 71ED <CJK>
+3F25 7E54 <CJK>
+3F26 8077 <CJK>
+3F27 8272 <CJK>
+3F28 89E6 <CJK>
+3F29 98DF <CJK>
+3F2A 8755 <CJK>
+3F2B 8FB1 <CJK>
+3F2C 5C3B <CJK>
+3F2D 4F38 <CJK>
+3F2E 4FE1 <CJK>
+3F2F 4FB5 <CJK>
+3F30 5507 <CJK>
+3F31 5A20 <CJK>
+3F32 5BDD <CJK>
+3F33 5BE9 <CJK>
+3F34 5FC3 <CJK>
+3F35 614E <CJK>
+3F36 632F <CJK>
+3F37 65B0 <CJK>
+3F38 664B <CJK>
+3F39 68EE <CJK>
+3F3A 699B <CJK>
+3F3B 6D78 <CJK>
+3F3C 6DF1 <CJK>
+3F3D 7533 <CJK>
+3F3E 75B9 <CJK>
+3F3F 771F <CJK>
+3F40 795E <CJK>
+3F41 79E6 <CJK>
+3F42 7D33 <CJK>
+3F43 81E3 <CJK>
+3F44 82AF <CJK>
+3F45 85AA <CJK>
+3F46 89AA <CJK>
+3F47 8A3A <CJK>
+3F48 8EAB <CJK>
+3F49 8F9B <CJK>
+3F4A 9032 <CJK>
+3F4B 91DD <CJK>
+3F4C 9707 <CJK>
+3F4D 4EBA <CJK>
+3F4E 4EC1 <CJK>
+3F4F 5203 <CJK>
+3F50 5875 <CJK>
+3F51 58EC <CJK>
+3F52 5C0B <CJK>
+3F53 751A <CJK>
+3F54 5C3D <CJK>
+3F55 814E <CJK>
+3F56 8A0A <CJK>
+3F57 8FC5 <CJK>
+3F58 9663 <CJK>
+3F59 976D <CJK>
+3F5A 7B25 <CJK>
+3F5B 8ACF <CJK>
+3F5C 9808 <CJK>
+3F5D 9162 <CJK>
+3F5E 56F3 <CJK>
+3F5F 53A8 <CJK>
+3F60 9017 <CJK>
+3F61 5439 <CJK>
+3F62 5782 <CJK>
+3F63 5E25 <CJK>
+3F64 63A8 <CJK>
+3F65 6C34 <CJK>
+3F66 708A <CJK>
+3F67 7761 <CJK>
+3F68 7C8B <CJK>
+3F69 7FE0 <CJK>
+3F6A 8870 <CJK>
+3F6B 9042 <CJK>
+3F6C 9154 <CJK>
+3F6D 9310 <CJK>
+3F6E 9318 <CJK>
+3F6F 968F <CJK>
+3F70 745E <CJK>
+3F71 9AC4 <CJK>
+3F72 5D07 <CJK>
+3F73 5D69 <CJK>
+3F74 6570 <CJK>
+3F75 67A2 <CJK>
+3F76 8DA8 <CJK>
+3F77 96DB <CJK>
+3F78 636E <CJK>
+3F79 6749 <CJK>
+3F7A 6919 <CJK>
+3F7B 83C5 <CJK>
+3F7C 9817 <CJK>
+3F7D 96C0 <CJK>
+3F7E 88FE <CJK>
+4021 6F84 <CJK>
+4022 647A <CJK>
+4023 5BF8 <CJK>
+4024 4E16 <CJK>
+4025 702C <CJK>
+4026 755D <CJK>
+4027 662F <CJK>
+4028 51C4 <CJK>
+4029 5236 <CJK>
+402A 52E2 <CJK>
+402B 59D3 <CJK>
+402C 5F81 <CJK>
+402D 6027 <CJK>
+402E 6210 <CJK>
+402F 653F <CJK>
+4030 6574 <CJK>
+4031 661F <CJK>
+4032 6674 <CJK>
+4033 68F2 <CJK>
+4034 6816 <CJK>
+4035 6B63 <CJK>
+4036 6E05 <CJK>
+4037 7272 <CJK>
+4038 751F <CJK>
+4039 76DB <CJK>
+403A 7CBE <CJK>
+403B 8056 <CJK>
+403C 58F0 <CJK>
+403D 88FD <CJK>
+403E 897F <CJK>
+403F 8AA0 <CJK>
+4040 8A93 <CJK>
+4041 8ACB <CJK>
+4042 901D <CJK>
+4043 9192 <CJK>
+4044 9752 <CJK>
+4045 9759 <CJK>
+4046 6589 <CJK>
+4047 7A0E <CJK>
+4048 8106 <CJK>
+4049 96BB <CJK>
+404A 5E2D <CJK>
+404B 60DC <CJK>
+404C 621A <CJK>
+404D 65A5 <CJK>
+404E 6614 <CJK>
+404F 6790 <CJK>
+4050 77F3 <CJK>
+4051 7A4D <CJK>
+4052 7C4D <CJK>
+4053 7E3E <CJK>
+4054 810A <CJK>
+4055 8CAC <CJK>
+4056 8D64 <CJK>
+4057 8DE1 <CJK>
+4058 8E5F <CJK>
+4059 78A9 <CJK>
+405A 5207 <CJK>
+405B 62D9 <CJK>
+405C 63A5 <CJK>
+405D 6442 <CJK>
+405E 6298 <CJK>
+405F 8A2D <CJK>
+4060 7A83 <CJK>
+4061 7BC0 <CJK>
+4062 8AAC <CJK>
+4063 96EA <CJK>
+4064 7D76 <CJK>
+4065 820C <CJK>
+4066 8749 <CJK>
+4067 4ED9 <CJK>
+4068 5148 <CJK>
+4069 5343 <CJK>
+406A 5360 <CJK>
+406B 5BA3 <CJK>
+406C 5C02 <CJK>
+406D 5C16 <CJK>
+406E 5DDD <CJK>
+406F 6226 <CJK>
+4070 6247 <CJK>
+4071 64B0 <CJK>
+4072 6813 <CJK>
+4073 6834 <CJK>
+4074 6CC9 <CJK>
+4075 6D45 <CJK>
+4076 6D17 <CJK>
+4077 67D3 <CJK>
+4078 6F5C <CJK>
+4079 714E <CJK>
+407A 717D <CJK>
+407B 65CB <CJK>
+407C 7A7F <CJK>
+407D 7BAD <CJK>
+407E 7DDA <CJK>
+4121 7E4A <CJK>
+4122 7FA8 <CJK>
+4123 817A <CJK>
+4124 821B <CJK>
+4125 8239 <CJK>
+4126 85A6 <CJK>
+4127 8A6E <CJK>
+4128 8CCE <CJK>
+4129 8DF5 <CJK>
+412A 9078 <CJK>
+412B 9077 <CJK>
+412C 92AD <CJK>
+412D 9291 <CJK>
+412E 9583 <CJK>
+412F 9BAE <CJK>
+4130 524D <CJK>
+4131 5584 <CJK>
+4132 6F38 <CJK>
+4133 7136 <CJK>
+4134 5168 <CJK>
+4135 7985 <CJK>
+4136 7E55 <CJK>
+4137 81B3 <CJK>
+4138 7CCE <CJK>
+4139 564C <CJK>
+413A 5851 <CJK>
+413B 5CA8 <CJK>
+413C 63AA <CJK>
+413D 66FE <CJK>
+413E 66FD <CJK>
+413F 695A <CJK>
+4140 72D9 <CJK>
+4141 758F <CJK>
+4142 758E <CJK>
+4143 790E <CJK>
+4144 7956 <CJK>
+4145 79DF <CJK>
+4146 7C97 <CJK>
+4147 7D20 <CJK>
+4148 7D44 <CJK>
+4149 8607 <CJK>
+414A 8A34 <CJK>
+414B 963B <CJK>
+414C 9061 <CJK>
+414D 9F20 <CJK>
+414E 50E7 <CJK>
+414F 5275 <CJK>
+4150 53CC <CJK>
+4151 53E2 <CJK>
+4152 5009 <CJK>
+4153 55AA <CJK>
+4154 58EE <CJK>
+4155 594F <CJK>
+4156 723D <CJK>
+4157 5B8B <CJK>
+4158 5C64 <CJK>
+4159 531D <CJK>
+415A 60E3 <CJK>
+415B 60F3 <CJK>
+415C 635C <CJK>
+415D 6383 <CJK>
+415E 633F <CJK>
+415F 63BB <CJK>
+4160 64CD <CJK>
+4161 65E9 <CJK>
+4162 66F9 <CJK>
+4163 5DE3 <CJK>
+4164 69CD <CJK>
+4165 69FD <CJK>
+4166 6F15 <CJK>
+4167 71E5 <CJK>
+4168 4E89 <CJK>
+4169 75E9 <CJK>
+416A 76F8 <CJK>
+416B 7A93 <CJK>
+416C 7CDF <CJK>
+416D 7DCF <CJK>
+416E 7D9C <CJK>
+416F 8061 <CJK>
+4170 8349 <CJK>
+4171 8358 <CJK>
+4172 846C <CJK>
+4173 84BC <CJK>
+4174 85FB <CJK>
+4175 88C5 <CJK>
+4176 8D70 <CJK>
+4177 9001 <CJK>
+4178 906D <CJK>
+4179 9397 <CJK>
+417A 971C <CJK>
+417B 9A12 <CJK>
+417C 50CF <CJK>
+417D 5897 <CJK>
+417E 618E <CJK>
+4221 81D3 <CJK>
+4222 8535 <CJK>
+4223 8D08 <CJK>
+4224 9020 <CJK>
+4225 4FC3 <CJK>
+4226 5074 <CJK>
+4227 5247 <CJK>
+4228 5373 <CJK>
+4229 606F <CJK>
+422A 6349 <CJK>
+422B 675F <CJK>
+422C 6E2C <CJK>
+422D 8DB3 <CJK>
+422E 901F <CJK>
+422F 4FD7 <CJK>
+4230 5C5E <CJK>
+4231 8CCA <CJK>
+4232 65CF <CJK>
+4233 7D9A <CJK>
+4234 5352 <CJK>
+4235 8896 <CJK>
+4236 5176 <CJK>
+4237 63C3 <CJK>
+4238 5B58 <CJK>
+4239 5B6B <CJK>
+423A 5C0A <CJK>
+423B 640D <CJK>
+423C 6751 <CJK>
+423D 905C <CJK>
+423E 4ED6 <CJK>
+423F 591A <CJK>
+4240 592A <CJK>
+4241 6C70 <CJK>
+4242 8A51 <CJK>
+4243 553E <CJK>
+4244 5815 <CJK>
+4245 59A5 <CJK>
+4246 60F0 <CJK>
+4247 6253 <CJK>
+4248 67C1 <CJK>
+4249 8235 <CJK>
+424A 6955 <CJK>
+424B 9640 <CJK>
+424C 99C4 <CJK>
+424D 9A28 <CJK>
+424E 4F53 <CJK>
+424F 5806 <CJK>
+4250 5BFE <CJK>
+4251 8010 <CJK>
+4252 5CB1 <CJK>
+4253 5E2F <CJK>
+4254 5F85 <CJK>
+4255 6020 <CJK>
+4256 614B <CJK>
+4257 6234 <CJK>
+4258 66FF <CJK>
+4259 6CF0 <CJK>
+425A 6EDE <CJK>
+425B 80CE <CJK>
+425C 817F <CJK>
+425D 82D4 <CJK>
+425E 888B <CJK>
+425F 8CB8 <CJK>
+4260 9000 <CJK>
+4261 902E <CJK>
+4262 968A <CJK>
+4263 9EDB <CJK>
+4264 9BDB <CJK>
+4265 4EE3 <CJK>
+4266 53F0 <CJK>
+4267 5927 <CJK>
+4268 7B2C <CJK>
+4269 918D <CJK>
+426A 984C <CJK>
+426B 9DF9 <CJK>
+426C 6EDD <CJK>
+426D 7027 <CJK>
+426E 5353 <CJK>
+426F 5544 <CJK>
+4270 5B85 <CJK>
+4271 6258 <CJK>
+4272 629E <CJK>
+4273 62D3 <CJK>
+4274 6CA2 <CJK>
+4275 6FEF <CJK>
+4276 7422 <CJK>
+4277 8A17 <CJK>
+4278 9438 <CJK>
+4279 6FC1 <CJK>
+427A 8AFE <CJK>
+427B 8338 <CJK>
+427C 51E7 <CJK>
+427D 86F8 <CJK>
+427E 53EA <CJK>
+4321 53E9 <CJK>
+4322 4F46 <CJK>
+4323 9054 <CJK>
+4324 8FB0 <CJK>
+4325 596A <CJK>
+4326 8131 <CJK>
+4327 5DFD <CJK>
+4328 7AEA <CJK>
+4329 8FBF <CJK>
+432A 68DA <CJK>
+432B 8C37 <CJK>
+432C 72F8 <CJK>
+432D 9C48 <CJK>
+432E 6A3D <CJK>
+432F 8AB0 <CJK>
+4330 4E39 <CJK>
+4331 5358 <CJK>
+4332 5606 <CJK>
+4333 5766 <CJK>
+4334 62C5 <CJK>
+4335 63A2 <CJK>
+4336 65E6 <CJK>
+4337 6B4E <CJK>
+4338 6DE1 <CJK>
+4339 6E5B <CJK>
+433A 70AD <CJK>
+433B 77ED <CJK>
+433C 7AEF <CJK>
+433D 7BAA <CJK>
+433E 7DBB <CJK>
+433F 803D <CJK>
+4340 80C6 <CJK>
+4341 86CB <CJK>
+4342 8A95 <CJK>
+4343 935B <CJK>
+4344 56E3 <CJK>
+4345 58C7 <CJK>
+4346 5F3E <CJK>
+4347 65AD <CJK>
+4348 6696 <CJK>
+4349 6A80 <CJK>
+434A 6BB5 <CJK>
+434B 7537 <CJK>
+434C 8AC7 <CJK>
+434D 5024 <CJK>
+434E 77E5 <CJK>
+434F 5730 <CJK>
+4350 5F1B <CJK>
+4351 6065 <CJK>
+4352 667A <CJK>
+4353 6C60 <CJK>
+4354 75F4 <CJK>
+4355 7A1A <CJK>
+4356 7F6E <CJK>
+4357 81F4 <CJK>
+4358 8718 <CJK>
+4359 9045 <CJK>
+435A 99B3 <CJK>
+435B 7BC9 <CJK>
+435C 755C <CJK>
+435D 7AF9 <CJK>
+435E 7B51 <CJK>
+435F 84C4 <CJK>
+4360 9010 <CJK>
+4361 79E9 <CJK>
+4362 7A92 <CJK>
+4363 8336 <CJK>
+4364 5AE1 <CJK>
+4365 7740 <CJK>
+4366 4E2D <CJK>
+4367 4EF2 <CJK>
+4368 5B99 <CJK>
+4369 5FE0 <CJK>
+436A 62BD <CJK>
+436B 663C <CJK>
+436C 67F1 <CJK>
+436D 6CE8 <CJK>
+436E 866B <CJK>
+436F 8877 <CJK>
+4370 8A3B <CJK>
+4371 914E <CJK>
+4372 92F3 <CJK>
+4373 99D0 <CJK>
+4374 6A17 <CJK>
+4375 7026 <CJK>
+4376 732A <CJK>
+4377 82E7 <CJK>
+4378 8457 <CJK>
+4379 8CAF <CJK>
+437A 4E01 <CJK>
+437B 5146 <CJK>
+437C 51CB <CJK>
+437D 558B <CJK>
+437E 5BF5 <CJK>
+4421 5E16 <CJK>
+4422 5E33 <CJK>
+4423 5E81 <CJK>
+4424 5F14 <CJK>
+4425 5F35 <CJK>
+4426 5F6B <CJK>
+4427 5FB4 <CJK>
+4428 61F2 <CJK>
+4429 6311 <CJK>
+442A 66A2 <CJK>
+442B 671D <CJK>
+442C 6F6E <CJK>
+442D 7252 <CJK>
+442E 753A <CJK>
+442F 773A <CJK>
+4430 8074 <CJK>
+4431 8139 <CJK>
+4432 8178 <CJK>
+4433 8776 <CJK>
+4434 8ABF <CJK>
+4435 8ADC <CJK>
+4436 8D85 <CJK>
+4437 8DF3 <CJK>
+4438 929A <CJK>
+4439 9577 <CJK>
+443A 9802 <CJK>
+443B 9CE5 <CJK>
+443C 52C5 <CJK>
+443D 6357 <CJK>
+443E 76F4 <CJK>
+443F 6715 <CJK>
+4440 6C88 <CJK>
+4441 73CD <CJK>
+4442 8CC3 <CJK>
+4443 93AE <CJK>
+4444 9673 <CJK>
+4445 6D25 <CJK>
+4446 589C <CJK>
+4447 690E <CJK>
+4448 69CC <CJK>
+4449 8FFD <CJK>
+444A 939A <CJK>
+444B 75DB <CJK>
+444C 901A <CJK>
+444D 585A <CJK>
+444E 6802 <CJK>
+444F 63B4 <CJK>
+4450 69FB <CJK>
+4451 4F43 <CJK>
+4452 6F2C <CJK>
+4453 67D8 <CJK>
+4454 8FBB <CJK>
+4455 8526 <CJK>
+4456 7DB4 <CJK>
+4457 9354 <CJK>
+4458 693F <CJK>
+4459 6F70 <CJK>
+445A 576A <CJK>
+445B 58F7 <CJK>
+445C 5B2C <CJK>
+445D 7D2C <CJK>
+445E 722A <CJK>
+445F 540A <CJK>
+4460 91E3 <CJK>
+4461 9DB4 <CJK>
+4462 4EAD <CJK>
+4463 4F4E <CJK>
+4464 505C <CJK>
+4465 5075 <CJK>
+4466 5243 <CJK>
+4467 8C9E <CJK>
+4468 5448 <CJK>
+4469 5824 <CJK>
+446A 5B9A <CJK>
+446B 5E1D <CJK>
+446C 5E95 <CJK>
+446D 5EAD <CJK>
+446E 5EF7 <CJK>
+446F 5F1F <CJK>
+4470 608C <CJK>
+4471 62B5 <CJK>
+4472 633A <CJK>
+4473 63D0 <CJK>
+4474 68AF <CJK>
+4475 6C40 <CJK>
+4476 7887 <CJK>
+4477 798E <CJK>
+4478 7A0B <CJK>
+4479 7DE0 <CJK>
+447A 8247 <CJK>
+447B 8A02 <CJK>
+447C 8AE6 <CJK>
+447D 8E44 <CJK>
+447E 9013 <CJK>
+4521 90B8 <CJK>
+4522 912D <CJK>
+4523 91D8 <CJK>
+4524 9F0E <CJK>
+4525 6CE5 <CJK>
+4526 6458 <CJK>
+4527 64E2 <CJK>
+4528 6575 <CJK>
+4529 6EF4 <CJK>
+452A 7684 <CJK>
+452B 7B1B <CJK>
+452C 9069 <CJK>
+452D 93D1 <CJK>
+452E 6EBA <CJK>
+452F 54F2 <CJK>
+4530 5FB9 <CJK>
+4531 64A4 <CJK>
+4532 8F4D <CJK>
+4533 8FED <CJK>
+4534 9244 <CJK>
+4535 5178 <CJK>
+4536 586B <CJK>
+4537 5929 <CJK>
+4538 5C55 <CJK>
+4539 5E97 <CJK>
+453A 6DFB <CJK>
+453B 7E8F <CJK>
+453C 751C <CJK>
+453D 8CBC <CJK>
+453E 8EE2 <CJK>
+453F 985B <CJK>
+4540 70B9 <CJK>
+4541 4F1D <CJK>
+4542 6BBF <CJK>
+4543 6FB1 <CJK>
+4544 7530 <CJK>
+4545 96FB <CJK>
+4546 514E <CJK>
+4547 5410 <CJK>
+4548 5835 <CJK>
+4549 5857 <CJK>
+454A 59AC <CJK>
+454B 5C60 <CJK>
+454C 5F92 <CJK>
+454D 6597 <CJK>
+454E 675C <CJK>
+454F 6E21 <CJK>
+4550 767B <CJK>
+4551 83DF <CJK>
+4552 8CED <CJK>
+4553 9014 <CJK>
+4554 90FD <CJK>
+4555 934D <CJK>
+4556 7825 <CJK>
+4557 783A <CJK>
+4558 52AA <CJK>
+4559 5EA6 <CJK>
+455A 571F <CJK>
+455B 5974 <CJK>
+455C 6012 <CJK>
+455D 5012 <CJK>
+455E 515A <CJK>
+455F 51AC <CJK>
+4560 51CD <CJK>
+4561 5200 <CJK>
+4562 5510 <CJK>
+4563 5854 <CJK>
+4564 5858 <CJK>
+4565 5957 <CJK>
+4566 5B95 <CJK>
+4567 5CF6 <CJK>
+4568 5D8B <CJK>
+4569 60BC <CJK>
+456A 6295 <CJK>
+456B 642D <CJK>
+456C 6771 <CJK>
+456D 6843 <CJK>
+456E 68BC <CJK>
+456F 68DF <CJK>
+4570 76D7 <CJK>
+4571 6DD8 <CJK>
+4572 6E6F <CJK>
+4573 6D9B <CJK>
+4574 706F <CJK>
+4575 71C8 <CJK>
+4576 5F53 <CJK>
+4577 75D8 <CJK>
+4578 7977 <CJK>
+4579 7B49 <CJK>
+457A 7B54 <CJK>
+457B 7B52 <CJK>
+457C 7CD6 <CJK>
+457D 7D71 <CJK>
+457E 5230 <CJK>
+4621 8463 <CJK>
+4622 8569 <CJK>
+4623 85E4 <CJK>
+4624 8A0E <CJK>
+4625 8B04 <CJK>
+4626 8C46 <CJK>
+4627 8E0F <CJK>
+4628 9003 <CJK>
+4629 900F <CJK>
+462A 9419 <CJK>
+462B 9676 <CJK>
+462C 982D <CJK>
+462D 9A30 <CJK>
+462E 95D8 <CJK>
+462F 50CD <CJK>
+4630 52D5 <CJK>
+4631 540C <CJK>
+4632 5802 <CJK>
+4633 5C0E <CJK>
+4634 61A7 <CJK>
+4635 649E <CJK>
+4636 6D1E <CJK>
+4637 77B3 <CJK>
+4638 7AE5 <CJK>
+4639 80F4 <CJK>
+463A 8404 <CJK>
+463B 9053 <CJK>
+463C 9285 <CJK>
+463D 5CE0 <CJK>
+463E 9D07 <CJK>
+463F 533F <CJK>
+4640 5F97 <CJK>
+4641 5FB3 <CJK>
+4642 6D9C <CJK>
+4643 7279 <CJK>
+4644 7763 <CJK>
+4645 79BF <CJK>
+4646 7BE4 <CJK>
+4647 6BD2 <CJK>
+4648 72EC <CJK>
+4649 8AAD <CJK>
+464A 6803 <CJK>
+464B 6A61 <CJK>
+464C 51F8 <CJK>
+464D 7A81 <CJK>
+464E 6934 <CJK>
+464F 5C4A <CJK>
+4650 9CF6 <CJK>
+4651 82EB <CJK>
+4652 5BC5 <CJK>
+4653 9149 <CJK>
+4654 701E <CJK>
+4655 5678 <CJK>
+4656 5C6F <CJK>
+4657 60C7 <CJK>
+4658 6566 <CJK>
+4659 6C8C <CJK>
+465A 8C5A <CJK>
+465B 9041 <CJK>
+465C 9813 <CJK>
+465D 5451 <CJK>
+465E 66C7 <CJK>
+465F 920D <CJK>
+4660 5948 <CJK>
+4661 90A3 <CJK>
+4662 5185 <CJK>
+4663 4E4D <CJK>
+4664 51EA <CJK>
+4665 8599 <CJK>
+4666 8B0E <CJK>
+4667 7058 <CJK>
+4668 637A <CJK>
+4669 934B <CJK>
+466A 6962 <CJK>
+466B 99B4 <CJK>
+466C 7E04 <CJK>
+466D 7577 <CJK>
+466E 5357 <CJK>
+466F 6960 <CJK>
+4670 8EDF <CJK>
+4671 96E3 <CJK>
+4672 6C5D <CJK>
+4673 4E8C <CJK>
+4674 5C3C <CJK>
+4675 5F10 <CJK>
+4676 8FE9 <CJK>
+4677 5302 <CJK>
+4678 8CD1 <CJK>
+4679 8089 <CJK>
+467A 8679 <CJK>
+467B 5EFF <CJK>
+467C 65E5 <CJK>
+467D 4E73 <CJK>
+467E 5165 <CJK>
+4721 5982 <CJK>
+4722 5C3F <CJK>
+4723 97EE <CJK>
+4724 4EFB <CJK>
+4725 598A <CJK>
+4726 5FCD <CJK>
+4727 8A8D <CJK>
+4728 6FE1 <CJK>
+4729 79B0 <CJK>
+472A 7962 <CJK>
+472B 5BE7 <CJK>
+472C 8471 <CJK>
+472D 732B <CJK>
+472E 71B1 <CJK>
+472F 5E74 <CJK>
+4730 5FF5 <CJK>
+4731 637B <CJK>
+4732 649A <CJK>
+4733 71C3 <CJK>
+4734 7C98 <CJK>
+4735 4E43 <CJK>
+4736 5EFC <CJK>
+4737 4E4B <CJK>
+4738 57DC <CJK>
+4739 56A2 <CJK>
+473A 60A9 <CJK>
+473B 6FC3 <CJK>
+473C 7D0D <CJK>
+473D 80FD <CJK>
+473E 8133 <CJK>
+473F 81BF <CJK>
+4740 8FB2 <CJK>
+4741 8997 <CJK>
+4742 86A4 <CJK>
+4743 5DF4 <CJK>
+4744 628A <CJK>
+4745 64AD <CJK>
+4746 8987 <CJK>
+4747 6777 <CJK>
+4748 6CE2 <CJK>
+4749 6D3E <CJK>
+474A 7436 <CJK>
+474B 7834 <CJK>
+474C 5A46 <CJK>
+474D 7F75 <CJK>
+474E 82AD <CJK>
+474F 99AC <CJK>
+4750 4FF3 <CJK>
+4751 5EC3 <CJK>
+4752 62DD <CJK>
+4753 6392 <CJK>
+4754 6557 <CJK>
+4755 676F <CJK>
+4756 76C3 <CJK>
+4757 724C <CJK>
+4758 80CC <CJK>
+4759 80BA <CJK>
+475A 8F29 <CJK>
+475B 914D <CJK>
+475C 500D <CJK>
+475D 57F9 <CJK>
+475E 5A92 <CJK>
+475F 6885 <CJK>
+4760 6973 <CJK>
+4761 7164 <CJK>
+4762 72FD <CJK>
+4763 8CB7 <CJK>
+4764 58F2 <CJK>
+4765 8CE0 <CJK>
+4766 966A <CJK>
+4767 9019 <CJK>
+4768 877F <CJK>
+4769 79E4 <CJK>
+476A 77E7 <CJK>
+476B 8429 <CJK>
+476C 4F2F <CJK>
+476D 5265 <CJK>
+476E 535A <CJK>
+476F 62CD <CJK>
+4770 67CF <CJK>
+4771 6CCA <CJK>
+4772 767D <CJK>
+4773 7B94 <CJK>
+4774 7C95 <CJK>
+4775 8236 <CJK>
+4776 8584 <CJK>
+4777 8FEB <CJK>
+4778 66DD <CJK>
+4779 6F20 <CJK>
+477A 7206 <CJK>
+477B 7E1B <CJK>
+477C 83AB <CJK>
+477D 99C1 <CJK>
+477E 9EA6 <CJK>
+4821 51FD <CJK>
+4822 7BB1 <CJK>
+4823 7872 <CJK>
+4824 7BB8 <CJK>
+4825 8087 <CJK>
+4826 7B48 <CJK>
+4827 6AE8 <CJK>
+4828 5E61 <CJK>
+4829 808C <CJK>
+482A 7551 <CJK>
+482B 7560 <CJK>
+482C 516B <CJK>
+482D 9262 <CJK>
+482E 6E8C <CJK>
+482F 767A <CJK>
+4830 9197 <CJK>
+4831 9AEA <CJK>
+4832 4F10 <CJK>
+4833 7F70 <CJK>
+4834 629C <CJK>
+4835 7B4F <CJK>
+4836 95A5 <CJK>
+4837 9CE9 <CJK>
+4838 567A <CJK>
+4839 5859 <CJK>
+483A 86E4 <CJK>
+483B 96BC <CJK>
+483C 4F34 <CJK>
+483D 5224 <CJK>
+483E 534A <CJK>
+483F 53CD <CJK>
+4840 53DB <CJK>
+4841 5E06 <CJK>
+4842 642C <CJK>
+4843 6591 <CJK>
+4844 677F <CJK>
+4845 6C3E <CJK>
+4846 6C4E <CJK>
+4847 7248 <CJK>
+4848 72AF <CJK>
+4849 73ED <CJK>
+484A 7554 <CJK>
+484B 7E41 <CJK>
+484C 822C <CJK>
+484D 85E9 <CJK>
+484E 8CA9 <CJK>
+484F 7BC4 <CJK>
+4850 91C6 <CJK>
+4851 7169 <CJK>
+4852 9812 <CJK>
+4853 98EF <CJK>
+4854 633D <CJK>
+4855 6669 <CJK>
+4856 756A <CJK>
+4857 76E4 <CJK>
+4858 78D0 <CJK>
+4859 8543 <CJK>
+485A 86EE <CJK>
+485B 532A <CJK>
+485C 5351 <CJK>
+485D 5426 <CJK>
+485E 5983 <CJK>
+485F 5E87 <CJK>
+4860 5F7C <CJK>
+4861 60B2 <CJK>
+4862 6249 <CJK>
+4863 6279 <CJK>
+4864 62AB <CJK>
+4865 6590 <CJK>
+4866 6BD4 <CJK>
+4867 6CCC <CJK>
+4868 75B2 <CJK>
+4869 76AE <CJK>
+486A 7891 <CJK>
+486B 79D8 <CJK>
+486C 7DCB <CJK>
+486D 7F77 <CJK>
+486E 80A5 <CJK>
+486F 88AB <CJK>
+4870 8AB9 <CJK>
+4871 8CBB <CJK>
+4872 907F <CJK>
+4873 975E <CJK>
+4874 98DB <CJK>
+4875 6A0B <CJK>
+4876 7C38 <CJK>
+4877 5099 <CJK>
+4878 5C3E <CJK>
+4879 5FAE <CJK>
+487A 6787 <CJK>
+487B 6BD8 <CJK>
+487C 7435 <CJK>
+487D 7709 <CJK>
+487E 7F8E <CJK>
+4921 9F3B <CJK>
+4922 67CA <CJK>
+4923 7A17 <CJK>
+4924 5339 <CJK>
+4925 758B <CJK>
+4926 9AED <CJK>
+4927 5F66 <CJK>
+4928 819D <CJK>
+4929 83F1 <CJK>
+492A 8098 <CJK>
+492B 5F3C <CJK>
+492C 5FC5 <CJK>
+492D 7562 <CJK>
+492E 7B46 <CJK>
+492F 903C <CJK>
+4930 6867 <CJK>
+4931 59EB <CJK>
+4932 5A9B <CJK>
+4933 7D10 <CJK>
+4934 767E <CJK>
+4935 8B2C <CJK>
+4936 4FF5 <CJK>
+4937 5F6A <CJK>
+4938 6A19 <CJK>
+4939 6C37 <CJK>
+493A 6F02 <CJK>
+493B 74E2 <CJK>
+493C 7968 <CJK>
+493D 8868 <CJK>
+493E 8A55 <CJK>
+493F 8C79 <CJK>
+4940 5EDF <CJK>
+4941 63CF <CJK>
+4942 75C5 <CJK>
+4943 79D2 <CJK>
+4944 82D7 <CJK>
+4945 9328 <CJK>
+4946 92F2 <CJK>
+4947 849C <CJK>
+4948 86ED <CJK>
+4949 9C2D <CJK>
+494A 54C1 <CJK>
+494B 5F6C <CJK>
+494C 658C <CJK>
+494D 6D5C <CJK>
+494E 7015 <CJK>
+494F 8CA7 <CJK>
+4950 8CD3 <CJK>
+4951 983B <CJK>
+4952 654F <CJK>
+4953 74F6 <CJK>
+4954 4E0D <CJK>
+4955 4ED8 <CJK>
+4956 57E0 <CJK>
+4957 592B <CJK>
+4958 5A66 <CJK>
+4959 5BCC <CJK>
+495A 51A8 <CJK>
+495B 5E03 <CJK>
+495C 5E9C <CJK>
+495D 6016 <CJK>
+495E 6276 <CJK>
+495F 6577 <CJK>
+4960 65A7 <CJK>
+4961 666E <CJK>
+4962 6D6E <CJK>
+4963 7236 <CJK>
+4964 7B26 <CJK>
+4965 8150 <CJK>
+4966 819A <CJK>
+4967 8299 <CJK>
+4968 8B5C <CJK>
+4969 8CA0 <CJK>
+496A 8CE6 <CJK>
+496B 8D74 <CJK>
+496C 961C <CJK>
+496D 9644 <CJK>
+496E 4FAE <CJK>
+496F 64AB <CJK>
+4970 6B66 <CJK>
+4971 821E <CJK>
+4972 8461 <CJK>
+4973 856A <CJK>
+4974 90E8 <CJK>
+4975 5C01 <CJK>
+4976 6953 <CJK>
+4977 98A8 <CJK>
+4978 847A <CJK>
+4979 8557 <CJK>
+497A 4F0F <CJK>
+497B 526F <CJK>
+497C 5FA9 <CJK>
+497D 5E45 <CJK>
+497E 670D <CJK>
+4A21 798F <CJK>
+4A22 8179 <CJK>
+4A23 8907 <CJK>
+4A24 8986 <CJK>
+4A25 6DF5 <CJK>
+4A26 5F17 <CJK>
+4A27 6255 <CJK>
+4A28 6CB8 <CJK>
+4A29 4ECF <CJK>
+4A2A 7269 <CJK>
+4A2B 9B92 <CJK>
+4A2C 5206 <CJK>
+4A2D 543B <CJK>
+4A2E 5674 <CJK>
+4A2F 58B3 <CJK>
+4A30 61A4 <CJK>
+4A31 626E <CJK>
+4A32 711A <CJK>
+4A33 596E <CJK>
+4A34 7C89 <CJK>
+4A35 7CDE <CJK>
+4A36 7D1B <CJK>
+4A37 96F0 <CJK>
+4A38 6587 <CJK>
+4A39 805E <CJK>
+4A3A 4E19 <CJK>
+4A3B 4F75 <CJK>
+4A3C 5175 <CJK>
+4A3D 5840 <CJK>
+4A3E 5E63 <CJK>
+4A3F 5E73 <CJK>
+4A40 5F0A <CJK>
+4A41 67C4 <CJK>
+4A42 4E26 <CJK>
+4A43 853D <CJK>
+4A44 9589 <CJK>
+4A45 965B <CJK>
+4A46 7C73 <CJK>
+4A47 9801 <CJK>
+4A48 50FB <CJK>
+4A49 58C1 <CJK>
+4A4A 7656 <CJK>
+4A4B 78A7 <CJK>
+4A4C 5225 <CJK>
+4A4D 77A5 <CJK>
+4A4E 8511 <CJK>
+4A4F 7B86 <CJK>
+4A50 504F <CJK>
+4A51 5909 <CJK>
+4A52 7247 <CJK>
+4A53 7BC7 <CJK>
+4A54 7DE8 <CJK>
+4A55 8FBA <CJK>
+4A56 8FD4 <CJK>
+4A57 904D <CJK>
+4A58 4FBF <CJK>
+4A59 52C9 <CJK>
+4A5A 5A29 <CJK>
+4A5B 5F01 <CJK>
+4A5C 97AD <CJK>
+4A5D 4FDD <CJK>
+4A5E 8217 <CJK>
+4A5F 92EA <CJK>
+4A60 5703 <CJK>
+4A61 6355 <CJK>
+4A62 6B69 <CJK>
+4A63 752B <CJK>
+4A64 88DC <CJK>
+4A65 8F14 <CJK>
+4A66 7A42 <CJK>
+4A67 52DF <CJK>
+4A68 5893 <CJK>
+4A69 6155 <CJK>
+4A6A 620A <CJK>
+4A6B 66AE <CJK>
+4A6C 6BCD <CJK>
+4A6D 7C3F <CJK>
+4A6E 83E9 <CJK>
+4A6F 5023 <CJK>
+4A70 4FF8 <CJK>
+4A71 5305 <CJK>
+4A72 5446 <CJK>
+4A73 5831 <CJK>
+4A74 5949 <CJK>
+4A75 5B9D <CJK>
+4A76 5CF0 <CJK>
+4A77 5CEF <CJK>
+4A78 5D29 <CJK>
+4A79 5E96 <CJK>
+4A7A 62B1 <CJK>
+4A7B 6367 <CJK>
+4A7C 653E <CJK>
+4A7D 65B9 <CJK>
+4A7E 670B <CJK>
+4B21 6CD5 <CJK>
+4B22 6CE1 <CJK>
+4B23 70F9 <CJK>
+4B24 7832 <CJK>
+4B25 7E2B <CJK>
+4B26 80DE <CJK>
+4B27 82B3 <CJK>
+4B28 840C <CJK>
+4B29 84EC <CJK>
+4B2A 8702 <CJK>
+4B2B 8912 <CJK>
+4B2C 8A2A <CJK>
+4B2D 8C4A <CJK>
+4B2E 90A6 <CJK>
+4B2F 92D2 <CJK>
+4B30 98FD <CJK>
+4B31 9CF3 <CJK>
+4B32 9D6C <CJK>
+4B33 4E4F <CJK>
+4B34 4EA1 <CJK>
+4B35 508D <CJK>
+4B36 5256 <CJK>
+4B37 574A <CJK>
+4B38 59A8 <CJK>
+4B39 5E3D <CJK>
+4B3A 5FD8 <CJK>
+4B3B 5FD9 <CJK>
+4B3C 623F <CJK>
+4B3D 66B4 <CJK>
+4B3E 671B <CJK>
+4B3F 67D0 <CJK>
+4B40 68D2 <CJK>
+4B41 5192 <CJK>
+4B42 7D21 <CJK>
+4B43 80AA <CJK>
+4B44 81A8 <CJK>
+4B45 8B00 <CJK>
+4B46 8C8C <CJK>
+4B47 8CBF <CJK>
+4B48 927E <CJK>
+4B49 9632 <CJK>
+4B4A 5420 <CJK>
+4B4B 982C <CJK>
+4B4C 5317 <CJK>
+4B4D 50D5 <CJK>
+4B4E 535C <CJK>
+4B4F 58A8 <CJK>
+4B50 64B2 <CJK>
+4B51 6734 <CJK>
+4B52 7267 <CJK>
+4B53 7766 <CJK>
+4B54 7A46 <CJK>
+4B55 91E6 <CJK>
+4B56 52C3 <CJK>
+4B57 6CA1 <CJK>
+4B58 6B86 <CJK>
+4B59 5800 <CJK>
+4B5A 5E4C <CJK>
+4B5B 5954 <CJK>
+4B5C 672C <CJK>
+4B5D 7FFB <CJK>
+4B5E 51E1 <CJK>
+4B5F 76C6 <CJK>
+4B60 6469 <CJK>
+4B61 78E8 <CJK>
+4B62 9B54 <CJK>
+4B63 9EBB <CJK>
+4B64 57CB <CJK>
+4B65 59B9 <CJK>
+4B66 6627 <CJK>
+4B67 679A <CJK>
+4B68 6BCE <CJK>
+4B69 54E9 <CJK>
+4B6A 69D9 <CJK>
+4B6B 5E55 <CJK>
+4B6C 819C <CJK>
+4B6D 6795 <CJK>
+4B6E 9BAA <CJK>
+4B6F 67FE <CJK>
+4B70 9C52 <CJK>
+4B71 685D <CJK>
+4B72 4EA6 <CJK>
+4B73 4FE3 <CJK>
+4B74 53C8 <CJK>
+4B75 62B9 <CJK>
+4B76 672B <CJK>
+4B77 6CAB <CJK>
+4B78 8FC4 <CJK>
+4B79 4FAD <CJK>
+4B7A 7E6D <CJK>
+4B7B 9EBF <CJK>
+4B7C 4E07 <CJK>
+4B7D 6162 <CJK>
+4B7E 6E80 <CJK>
+4C21 6F2B <CJK>
+4C22 8513 <CJK>
+4C23 5473 <CJK>
+4C24 672A <CJK>
+4C25 9B45 <CJK>
+4C26 5DF3 <CJK>
+4C27 7B95 <CJK>
+4C28 5CAC <CJK>
+4C29 5BC6 <CJK>
+4C2A 871C <CJK>
+4C2B 6E4A <CJK>
+4C2C 84D1 <CJK>
+4C2D 7A14 <CJK>
+4C2E 8108 <CJK>
+4C2F 5999 <CJK>
+4C30 7C8D <CJK>
+4C31 6C11 <CJK>
+4C32 7720 <CJK>
+4C33 52D9 <CJK>
+4C34 5922 <CJK>
+4C35 7121 <CJK>
+4C36 725F <CJK>
+4C37 77DB <CJK>
+4C38 9727 <CJK>
+4C39 9D61 <CJK>
+4C3A 690B <CJK>
+4C3B 5A7F <CJK>
+4C3C 5A18 <CJK>
+4C3D 51A5 <CJK>
+4C3E 540D <CJK>
+4C3F 547D <CJK>
+4C40 660E <CJK>
+4C41 76DF <CJK>
+4C42 8FF7 <CJK>
+4C43 9298 <CJK>
+4C44 9CF4 <CJK>
+4C45 59EA <CJK>
+4C46 725D <CJK>
+4C47 6EC5 <CJK>
+4C48 514D <CJK>
+4C49 68C9 <CJK>
+4C4A 7DBF <CJK>
+4C4B 7DEC <CJK>
+4C4C 9762 <CJK>
+4C4D 9EBA <CJK>
+4C4E 6478 <CJK>
+4C4F 6A21 <CJK>
+4C50 8302 <CJK>
+4C51 5984 <CJK>
+4C52 5B5F <CJK>
+4C53 6BDB <CJK>
+4C54 731B <CJK>
+4C55 76F2 <CJK>
+4C56 7DB2 <CJK>
+4C57 8017 <CJK>
+4C58 8499 <CJK>
+4C59 5132 <CJK>
+4C5A 6728 <CJK>
+4C5B 9ED9 <CJK>
+4C5C 76EE <CJK>
+4C5D 6762 <CJK>
+4C5E 52FF <CJK>
+4C5F 9905 <CJK>
+4C60 5C24 <CJK>
+4C61 623B <CJK>
+4C62 7C7E <CJK>
+4C63 8CB0 <CJK>
+4C64 554F <CJK>
+4C65 60B6 <CJK>
+4C66 7D0B <CJK>
+4C67 9580 <CJK>
+4C68 5301 <CJK>
+4C69 4E5F <CJK>
+4C6A 51B6 <CJK>
+4C6B 591C <CJK>
+4C6C 723A <CJK>
+4C6D 8036 <CJK>
+4C6E 91CE <CJK>
+4C6F 5F25 <CJK>
+4C70 77E2 <CJK>
+4C71 5384 <CJK>
+4C72 5F79 <CJK>
+4C73 7D04 <CJK>
+4C74 85AC <CJK>
+4C75 8A33 <CJK>
+4C76 8E8D <CJK>
+4C77 9756 <CJK>
+4C78 67F3 <CJK>
+4C79 85AE <CJK>
+4C7A 9453 <CJK>
+4C7B 6109 <CJK>
+4C7C 6108 <CJK>
+4C7D 6CB9 <CJK>
+4C7E 7652 <CJK>
+4D21 8AED <CJK>
+4D22 8F38 <CJK>
+4D23 552F <CJK>
+4D24 4F51 <CJK>
+4D25 512A <CJK>
+4D26 52C7 <CJK>
+4D27 53CB <CJK>
+4D28 5BA5 <CJK>
+4D29 5E7D <CJK>
+4D2A 60A0 <CJK>
+4D2B 6182 <CJK>
+4D2C 63D6 <CJK>
+4D2D 6709 <CJK>
+4D2E 67DA <CJK>
+4D2F 6E67 <CJK>
+4D30 6D8C <CJK>
+4D31 7336 <CJK>
+4D32 7337 <CJK>
+4D33 7531 <CJK>
+4D34 7950 <CJK>
+4D35 88D5 <CJK>
+4D36 8A98 <CJK>
+4D37 904A <CJK>
+4D38 9091 <CJK>
+4D39 90F5 <CJK>
+4D3A 96C4 <CJK>
+4D3B 878D <CJK>
+4D3C 5915 <CJK>
+4D3D 4E88 <CJK>
+4D3E 4F59 <CJK>
+4D3F 4E0E <CJK>
+4D40 8A89 <CJK>
+4D41 8F3F <CJK>
+4D42 9810 <CJK>
+4D43 50AD <CJK>
+4D44 5E7C <CJK>
+4D45 5996 <CJK>
+4D46 5BB9 <CJK>
+4D47 5EB8 <CJK>
+4D48 63DA <CJK>
+4D49 63FA <CJK>
+4D4A 64C1 <CJK>
+4D4B 66DC <CJK>
+4D4C 694A <CJK>
+4D4D 69D8 <CJK>
+4D4E 6D0B <CJK>
+4D4F 6EB6 <CJK>
+4D50 7194 <CJK>
+4D51 7528 <CJK>
+4D52 7AAF <CJK>
+4D53 7F8A <CJK>
+4D54 8000 <CJK>
+4D55 8449 <CJK>
+4D56 84C9 <CJK>
+4D57 8981 <CJK>
+4D58 8B21 <CJK>
+4D59 8E0A <CJK>
+4D5A 9065 <CJK>
+4D5B 967D <CJK>
+4D5C 990A <CJK>
+4D5D 617E <CJK>
+4D5E 6291 <CJK>
+4D5F 6B32 <CJK>
+4D60 6C83 <CJK>
+4D61 6D74 <CJK>
+4D62 7FCC <CJK>
+4D63 7FFC <CJK>
+4D64 6DC0 <CJK>
+4D65 7F85 <CJK>
+4D66 87BA <CJK>
+4D67 88F8 <CJK>
+4D68 6765 <CJK>
+4D69 83B1 <CJK>
+4D6A 983C <CJK>
+4D6B 96F7 <CJK>
+4D6C 6D1B <CJK>
+4D6D 7D61 <CJK>
+4D6E 843D <CJK>
+4D6F 916A <CJK>
+4D70 4E71 <CJK>
+4D71 5375 <CJK>
+4D72 5D50 <CJK>
+4D73 6B04 <CJK>
+4D74 6FEB <CJK>
+4D75 85CD <CJK>
+4D76 862D <CJK>
+4D77 89A7 <CJK>
+4D78 5229 <CJK>
+4D79 540F <CJK>
+4D7A 5C65 <CJK>
+4D7B 674E <CJK>
+4D7C 68A8 <CJK>
+4D7D 7406 <CJK>
+4D7E 7483 <CJK>
+4E21 75E2 <CJK>
+4E22 88CF <CJK>
+4E23 88E1 <CJK>
+4E24 91CC <CJK>
+4E25 96E2 <CJK>
+4E26 9678 <CJK>
+4E27 5F8B <CJK>
+4E28 7387 <CJK>
+4E29 7ACB <CJK>
+4E2A 844E <CJK>
+4E2B 63A0 <CJK>
+4E2C 7565 <CJK>
+4E2D 5289 <CJK>
+4E2E 6D41 <CJK>
+4E2F 6E9C <CJK>
+4E30 7409 <CJK>
+4E31 7559 <CJK>
+4E32 786B <CJK>
+4E33 7C92 <CJK>
+4E34 9686 <CJK>
+4E35 7ADC <CJK>
+4E36 9F8D <CJK>
+4E37 4FB6 <CJK>
+4E38 616E <CJK>
+4E39 65C5 <CJK>
+4E3A 865C <CJK>
+4E3B 4E86 <CJK>
+4E3C 4EAE <CJK>
+4E3D 50DA <CJK>
+4E3E 4E21 <CJK>
+4E3F 51CC <CJK>
+4E40 5BEE <CJK>
+4E41 6599 <CJK>
+4E42 6881 <CJK>
+4E43 6DBC <CJK>
+4E44 731F <CJK>
+4E45 7642 <CJK>
+4E46 77AD <CJK>
+4E47 7A1C <CJK>
+4E48 7CE7 <CJK>
+4E49 826F <CJK>
+4E4A 8AD2 <CJK>
+4E4B 907C <CJK>
+4E4C 91CF <CJK>
+4E4D 9675 <CJK>
+4E4E 9818 <CJK>
+4E4F 529B <CJK>
+4E50 7DD1 <CJK>
+4E51 502B <CJK>
+4E52 5398 <CJK>
+4E53 6797 <CJK>
+4E54 6DCB <CJK>
+4E55 71D0 <CJK>
+4E56 7433 <CJK>
+4E57 81E8 <CJK>
+4E58 8F2A <CJK>
+4E59 96A3 <CJK>
+4E5A 9C57 <CJK>
+4E5B 9E9F <CJK>
+4E5C 7460 <CJK>
+4E5D 5841 <CJK>
+4E5E 6D99 <CJK>
+4E5F 7D2F <CJK>
+4E60 985E <CJK>
+4E61 4EE4 <CJK>
+4E62 4F36 <CJK>
+4E63 4F8B <CJK>
+4E64 51B7 <CJK>
+4E65 52B1 <CJK>
+4E66 5DBA <CJK>
+4E67 601C <CJK>
+4E68 73B2 <CJK>
+4E69 793C <CJK>
+4E6A 82D3 <CJK>
+4E6B 9234 <CJK>
+4E6C 96B7 <CJK>
+4E6D 96F6 <CJK>
+4E6E 970A <CJK>
+4E6F 9E97 <CJK>
+4E70 9F62 <CJK>
+4E71 66A6 <CJK>
+4E72 6B74 <CJK>
+4E73 5217 <CJK>
+4E74 52A3 <CJK>
+4E75 70C8 <CJK>
+4E76 88C2 <CJK>
+4E77 5EC9 <CJK>
+4E78 604B <CJK>
+4E79 6190 <CJK>
+4E7A 6F23 <CJK>
+4E7B 7149 <CJK>
+4E7C 7C3E <CJK>
+4E7D 7DF4 <CJK>
+4E7E 806F <CJK>
+4F21 84EE <CJK>
+4F22 9023 <CJK>
+4F23 932C <CJK>
+4F24 5442 <CJK>
+4F25 9B6F <CJK>
+4F26 6AD3 <CJK>
+4F27 7089 <CJK>
+4F28 8CC2 <CJK>
+4F29 8DEF <CJK>
+4F2A 9732 <CJK>
+4F2B 52B4 <CJK>
+4F2C 5A41 <CJK>
+4F2D 5ECA <CJK>
+4F2E 5F04 <CJK>
+4F2F 6717 <CJK>
+4F30 697C <CJK>
+4F31 6994 <CJK>
+4F32 6D6A <CJK>
+4F33 6F0F <CJK>
+4F34 7262 <CJK>
+4F35 72FC <CJK>
+4F36 7BED <CJK>
+4F37 8001 <CJK>
+4F38 807E <CJK>
+4F39 874B <CJK>
+4F3A 90CE <CJK>
+4F3B 516D <CJK>
+4F3C 9E93 <CJK>
+4F3D 7984 <CJK>
+4F3E 808B <CJK>
+4F3F 9332 <CJK>
+4F40 8AD6 <CJK>
+4F41 502D <CJK>
+4F42 548C <CJK>
+4F43 8A71 <CJK>
+4F44 6B6A <CJK>
+4F45 8CC4 <CJK>
+4F46 8107 <CJK>
+4F47 60D1 <CJK>
+4F48 67A0 <CJK>
+4F49 9DF2 <CJK>
+4F4A 4E99 <CJK>
+4F4B 4E98 <CJK>
+4F4C 9C10 <CJK>
+4F4D 8A6B <CJK>
+4F4E 85C1 <CJK>
+4F4F 8568 <CJK>
+4F50 6900 <CJK>
+4F51 6E7E <CJK>
+4F52 7897 <CJK>
+4F53 8155 <CJK>
+5021 5F0C <CJK>
+5022 4E10 <CJK>
+5023 4E15 <CJK>
+5024 4E2A <CJK>
+5025 4E31 <CJK>
+5026 4E36 <CJK>
+5027 4E3C <CJK>
+5028 4E3F <CJK>
+5029 4E42 <CJK>
+502A 4E56 <CJK>
+502B 4E58 <CJK>
+502C 4E82 <CJK>
+502D 4E85 <CJK>
+502E 8C6B <CJK>
+502F 4E8A <CJK>
+5030 8212 <CJK>
+5031 5F0D <CJK>
+5032 4E8E <CJK>
+5033 4E9E <CJK>
+5034 4E9F <CJK>
+5035 4EA0 <CJK>
+5036 4EA2 <CJK>
+5037 4EB0 <CJK>
+5038 4EB3 <CJK>
+5039 4EB6 <CJK>
+503A 4ECE <CJK>
+503B 4ECD <CJK>
+503C 4EC4 <CJK>
+503D 4EC6 <CJK>
+503E 4EC2 <CJK>
+503F 4ED7 <CJK>
+5040 4EDE <CJK>
+5041 4EED <CJK>
+5042 4EDF <CJK>
+5043 4EF7 <CJK>
+5044 4F09 <CJK>
+5045 4F5A <CJK>
+5046 4F30 <CJK>
+5047 4F5B <CJK>
+5048 4F5D <CJK>
+5049 4F57 <CJK>
+504A 4F47 <CJK>
+504B 4F76 <CJK>
+504C 4F88 <CJK>
+504D 4F8F <CJK>
+504E 4F98 <CJK>
+504F 4F7B <CJK>
+5050 4F69 <CJK>
+5051 4F70 <CJK>
+5052 4F91 <CJK>
+5053 4F6F <CJK>
+5054 4F86 <CJK>
+5055 4F96 <CJK>
+5056 5118 <CJK>
+5057 4FD4 <CJK>
+5058 4FDF <CJK>
+5059 4FCE <CJK>
+505A 4FD8 <CJK>
+505B 4FDB <CJK>
+505C 4FD1 <CJK>
+505D 4FDA <CJK>
+505E 4FD0 <CJK>
+505F 4FE4 <CJK>
+5060 4FE5 <CJK>
+5061 501A <CJK>
+5062 5028 <CJK>
+5063 5014 <CJK>
+5064 502A <CJK>
+5065 5025 <CJK>
+5066 5005 <CJK>
+5067 4F1C <CJK>
+5068 4FF6 <CJK>
+5069 5021 <CJK>
+506A 5029 <CJK>
+506B 502C <CJK>
+506C 4FFE <CJK>
+506D 4FEF <CJK>
+506E 5011 <CJK>
+506F 5006 <CJK>
+5070 5043 <CJK>
+5071 5047 <CJK>
+5072 6703 <CJK>
+5073 5055 <CJK>
+5074 5050 <CJK>
+5075 5048 <CJK>
+5076 505A <CJK>
+5077 5056 <CJK>
+5078 506C <CJK>
+5079 5078 <CJK>
+507A 5080 <CJK>
+507B 509A <CJK>
+507C 5085 <CJK>
+507D 50B4 <CJK>
+507E 50B2 <CJK>
+5121 50C9 <CJK>
+5122 50CA <CJK>
+5123 50B3 <CJK>
+5124 50C2 <CJK>
+5125 50D6 <CJK>
+5126 50DE <CJK>
+5127 50E5 <CJK>
+5128 50ED <CJK>
+5129 50E3 <CJK>
+512A 50EE <CJK>
+512B 50F9 <CJK>
+512C 50F5 <CJK>
+512D 5109 <CJK>
+512E 5101 <CJK>
+512F 5102 <CJK>
+5130 5116 <CJK>
+5131 5115 <CJK>
+5132 5114 <CJK>
+5133 511A <CJK>
+5134 5121 <CJK>
+5135 513A <CJK>
+5136 5137 <CJK>
+5137 513C <CJK>
+5138 513B <CJK>
+5139 513F <CJK>
+513A 5140 <CJK>
+513B 5152 <CJK>
+513C 514C <CJK>
+513D 5154 <CJK>
+513E 5162 <CJK>
+513F 7AF8 <CJK>
+5140 5169 <CJK>
+5141 516A <CJK>
+5142 516E <CJK>
+5143 5180 <CJK>
+5144 5182 <CJK>
+5145 56D8 <CJK>
+5146 518C <CJK>
+5147 5189 <CJK>
+5148 518F <CJK>
+5149 5191 <CJK>
+514A 5193 <CJK>
+514B 5195 <CJK>
+514C 5196 <CJK>
+514D 51A4 <CJK>
+514E 51A6 <CJK>
+514F 51A2 <CJK>
+5150 51A9 <CJK>
+5151 51AA <CJK>
+5152 51AB <CJK>
+5153 51B3 <CJK>
+5154 51B1 <CJK>
+5155 51B2 <CJK>
+5156 51B0 <CJK>
+5157 51B5 <CJK>
+5158 51BD <CJK>
+5159 51C5 <CJK>
+515A 51C9 <CJK>
+515B 51DB <CJK>
+515C 51E0 <CJK>
+515D 8655 <CJK>
+515E 51E9 <CJK>
+515F 51ED <CJK>
+5160 51F0 <CJK>
+5161 51F5 <CJK>
+5162 51FE <CJK>
+5163 5204 <CJK>
+5164 520B <CJK>
+5165 5214 <CJK>
+5166 520E <CJK>
+5167 5227 <CJK>
+5168 522A <CJK>
+5169 522E <CJK>
+516A 5233 <CJK>
+516B 5239 <CJK>
+516C 524F <CJK>
+516D 5244 <CJK>
+516E 524B <CJK>
+516F 524C <CJK>
+5170 525E <CJK>
+5171 5254 <CJK>
+5172 526A <CJK>
+5173 5274 <CJK>
+5174 5269 <CJK>
+5175 5273 <CJK>
+5176 527F <CJK>
+5177 527D <CJK>
+5178 528D <CJK>
+5179 5294 <CJK>
+517A 5292 <CJK>
+517B 5271 <CJK>
+517C 5288 <CJK>
+517D 5291 <CJK>
+517E 8FA8 <CJK>
+5221 8FA7 <CJK>
+5222 52AC <CJK>
+5223 52AD <CJK>
+5224 52BC <CJK>
+5225 52B5 <CJK>
+5226 52C1 <CJK>
+5227 52CD <CJK>
+5228 52D7 <CJK>
+5229 52DE <CJK>
+522A 52E3 <CJK>
+522B 52E6 <CJK>
+522C 98ED <CJK>
+522D 52E0 <CJK>
+522E 52F3 <CJK>
+522F 52F5 <CJK>
+5230 52F8 <CJK>
+5231 52F9 <CJK>
+5232 5306 <CJK>
+5233 5308 <CJK>
+5234 7538 <CJK>
+5235 530D <CJK>
+5236 5310 <CJK>
+5237 530F <CJK>
+5238 5315 <CJK>
+5239 531A <CJK>
+523A 5323 <CJK>
+523B 532F <CJK>
+523C 5331 <CJK>
+523D 5333 <CJK>
+523E 5338 <CJK>
+523F 5340 <CJK>
+5240 5346 <CJK>
+5241 5345 <CJK>
+5242 4E17 <CJK>
+5243 5349 <CJK>
+5244 534D <CJK>
+5245 51D6 <CJK>
+5246 535E <CJK>
+5247 5369 <CJK>
+5248 536E <CJK>
+5249 5918 <CJK>
+524A 537B <CJK>
+524B 5377 <CJK>
+524C 5382 <CJK>
+524D 5396 <CJK>
+524E 53A0 <CJK>
+524F 53A6 <CJK>
+5250 53A5 <CJK>
+5251 53AE <CJK>
+5252 53B0 <CJK>
+5253 53B6 <CJK>
+5254 53C3 <CJK>
+5255 7C12 <CJK>
+5256 96D9 <CJK>
+5257 53DF <CJK>
+5258 66FC <CJK>
+5259 71EE <CJK>
+525A 53EE <CJK>
+525B 53E8 <CJK>
+525C 53ED <CJK>
+525D 53FA <CJK>
+525E 5401 <CJK>
+525F 543D <CJK>
+5260 5440 <CJK>
+5261 542C <CJK>
+5262 542D <CJK>
+5263 543C <CJK>
+5264 542E <CJK>
+5265 5436 <CJK>
+5266 5429 <CJK>
+5267 541D <CJK>
+5268 544E <CJK>
+5269 548F <CJK>
+526A 5475 <CJK>
+526B 548E <CJK>
+526C 545F <CJK>
+526D 5471 <CJK>
+526E 5477 <CJK>
+526F 5470 <CJK>
+5270 5492 <CJK>
+5271 547B <CJK>
+5272 5480 <CJK>
+5273 5476 <CJK>
+5274 5484 <CJK>
+5275 5490 <CJK>
+5276 5486 <CJK>
+5277 54C7 <CJK>
+5278 54A2 <CJK>
+5279 54B8 <CJK>
+527A 54A5 <CJK>
+527B 54AC <CJK>
+527C 54C4 <CJK>
+527D 54C8 <CJK>
+527E 54A8 <CJK>
+5321 54AB <CJK>
+5322 54C2 <CJK>
+5323 54A4 <CJK>
+5324 54BE <CJK>
+5325 54BC <CJK>
+5326 54D8 <CJK>
+5327 54E5 <CJK>
+5328 54E6 <CJK>
+5329 550F <CJK>
+532A 5514 <CJK>
+532B 54FD <CJK>
+532C 54EE <CJK>
+532D 54ED <CJK>
+532E 54FA <CJK>
+532F 54E2 <CJK>
+5330 5539 <CJK>
+5331 5540 <CJK>
+5332 5563 <CJK>
+5333 554C <CJK>
+5334 552E <CJK>
+5335 555C <CJK>
+5336 5545 <CJK>
+5337 5556 <CJK>
+5338 5557 <CJK>
+5339 5538 <CJK>
+533A 5533 <CJK>
+533B 555D <CJK>
+533C 5599 <CJK>
+533D 5580 <CJK>
+533E 54AF <CJK>
+533F 558A <CJK>
+5340 559F <CJK>
+5341 557B <CJK>
+5342 557E <CJK>
+5343 5598 <CJK>
+5344 559E <CJK>
+5345 55AE <CJK>
+5346 557C <CJK>
+5347 5583 <CJK>
+5348 55A9 <CJK>
+5349 5587 <CJK>
+534A 55A8 <CJK>
+534B 55DA <CJK>
+534C 55C5 <CJK>
+534D 55DF <CJK>
+534E 55C4 <CJK>
+534F 55DC <CJK>
+5350 55E4 <CJK>
+5351 55D4 <CJK>
+5352 5614 <CJK>
+5353 55F7 <CJK>
+5354 5616 <CJK>
+5355 55FE <CJK>
+5356 55FD <CJK>
+5357 561B <CJK>
+5358 55F9 <CJK>
+5359 564E <CJK>
+535A 5650 <CJK>
+535B 71DF <CJK>
+535C 5634 <CJK>
+535D 5636 <CJK>
+535E 5632 <CJK>
+535F 5638 <CJK>
+5360 566B <CJK>
+5361 5664 <CJK>
+5362 562F <CJK>
+5363 566C <CJK>
+5364 566A <CJK>
+5365 5686 <CJK>
+5366 5680 <CJK>
+5367 568A <CJK>
+5368 56A0 <CJK>
+5369 5694 <CJK>
+536A 568F <CJK>
+536B 56A5 <CJK>
+536C 56AE <CJK>
+536D 56B6 <CJK>
+536E 56B4 <CJK>
+536F 56C2 <CJK>
+5370 56BC <CJK>
+5371 56C1 <CJK>
+5372 56C3 <CJK>
+5373 56C0 <CJK>
+5374 56C8 <CJK>
+5375 56CE <CJK>
+5376 56D1 <CJK>
+5377 56D3 <CJK>
+5378 56D7 <CJK>
+5379 56EE <CJK>
+537A 56F9 <CJK>
+537B 5700 <CJK>
+537C 56FF <CJK>
+537D 5704 <CJK>
+537E 5709 <CJK>
+5421 5708 <CJK>
+5422 570B <CJK>
+5423 570D <CJK>
+5424 5713 <CJK>
+5425 5718 <CJK>
+5426 5716 <CJK>
+5427 55C7 <CJK>
+5428 571C <CJK>
+5429 5726 <CJK>
+542A 5737 <CJK>
+542B 5738 <CJK>
+542C 574E <CJK>
+542D 573B <CJK>
+542E 5740 <CJK>
+542F 574F <CJK>
+5430 5769 <CJK>
+5431 57C0 <CJK>
+5432 5788 <CJK>
+5433 5761 <CJK>
+5434 577F <CJK>
+5435 5789 <CJK>
+5436 5793 <CJK>
+5437 57A0 <CJK>
+5438 57B3 <CJK>
+5439 57A4 <CJK>
+543A 57AA <CJK>
+543B 57B0 <CJK>
+543C 57C3 <CJK>
+543D 57C6 <CJK>
+543E 57D4 <CJK>
+543F 57D2 <CJK>
+5440 57D3 <CJK>
+5441 580A <CJK>
+5442 57D6 <CJK>
+5443 57E3 <CJK>
+5444 580B <CJK>
+5445 5819 <CJK>
+5446 581D <CJK>
+5447 5872 <CJK>
+5448 5821 <CJK>
+5449 5862 <CJK>
+544A 584B <CJK>
+544B 5870 <CJK>
+544C 6BC0 <CJK>
+544D 5852 <CJK>
+544E 583D <CJK>
+544F 5879 <CJK>
+5450 5885 <CJK>
+5451 58B9 <CJK>
+5452 589F <CJK>
+5453 58AB <CJK>
+5454 58BA <CJK>
+5455 58DE <CJK>
+5456 58BB <CJK>
+5457 58B8 <CJK>
+5458 58AE <CJK>
+5459 58C5 <CJK>
+545A 58D3 <CJK>
+545B 58D1 <CJK>
+545C 58D7 <CJK>
+545D 58D9 <CJK>
+545E 58D8 <CJK>
+545F 58E5 <CJK>
+5460 58DC <CJK>
+5461 58E4 <CJK>
+5462 58DF <CJK>
+5463 58EF <CJK>
+5464 58FA <CJK>
+5465 58F9 <CJK>
+5466 58FB <CJK>
+5467 58FC <CJK>
+5468 58FD <CJK>
+5469 5902 <CJK>
+546A 590A <CJK>
+546B 5910 <CJK>
+546C 591B <CJK>
+546D 68A6 <CJK>
+546E 5925 <CJK>
+546F 592C <CJK>
+5470 592D <CJK>
+5471 5932 <CJK>
+5472 5938 <CJK>
+5473 593E <CJK>
+5474 7AD2 <CJK>
+5475 5955 <CJK>
+5476 5950 <CJK>
+5477 594E <CJK>
+5478 595A <CJK>
+5479 5958 <CJK>
+547A 5962 <CJK>
+547B 5960 <CJK>
+547C 5967 <CJK>
+547D 596C <CJK>
+547E 5969 <CJK>
+5521 5978 <CJK>
+5522 5981 <CJK>
+5523 599D <CJK>
+5524 4F5E <CJK>
+5525 4FAB <CJK>
+5526 59A3 <CJK>
+5527 59B2 <CJK>
+5528 59C6 <CJK>
+5529 59E8 <CJK>
+552A 59DC <CJK>
+552B 598D <CJK>
+552C 59D9 <CJK>
+552D 59DA <CJK>
+552E 5A25 <CJK>
+552F 5A1F <CJK>
+5530 5A11 <CJK>
+5531 5A1C <CJK>
+5532 5A09 <CJK>
+5533 5A1A <CJK>
+5534 5A40 <CJK>
+5535 5A6C <CJK>
+5536 5A49 <CJK>
+5537 5A35 <CJK>
+5538 5A36 <CJK>
+5539 5A62 <CJK>
+553A 5A6A <CJK>
+553B 5A9A <CJK>
+553C 5ABC <CJK>
+553D 5ABE <CJK>
+553E 5ACB <CJK>
+553F 5AC2 <CJK>
+5540 5ABD <CJK>
+5541 5AE3 <CJK>
+5542 5AD7 <CJK>
+5543 5AE6 <CJK>
+5544 5AE9 <CJK>
+5545 5AD6 <CJK>
+5546 5AFA <CJK>
+5547 5AFB <CJK>
+5548 5B0C <CJK>
+5549 5B0B <CJK>
+554A 5B16 <CJK>
+554B 5B32 <CJK>
+554C 5AD0 <CJK>
+554D 5B2A <CJK>
+554E 5B36 <CJK>
+554F 5B3E <CJK>
+5550 5B43 <CJK>
+5551 5B45 <CJK>
+5552 5B40 <CJK>
+5553 5B51 <CJK>
+5554 5B55 <CJK>
+5555 5B5A <CJK>
+5556 5B5B <CJK>
+5557 5B65 <CJK>
+5558 5B69 <CJK>
+5559 5B70 <CJK>
+555A 5B73 <CJK>
+555B 5B75 <CJK>
+555C 5B78 <CJK>
+555D 6588 <CJK>
+555E 5B7A <CJK>
+555F 5B80 <CJK>
+5560 5B83 <CJK>
+5561 5BA6 <CJK>
+5562 5BB8 <CJK>
+5563 5BC3 <CJK>
+5564 5BC7 <CJK>
+5565 5BC9 <CJK>
+5566 5BD4 <CJK>
+5567 5BD0 <CJK>
+5568 5BE4 <CJK>
+5569 5BE6 <CJK>
+556A 5BE2 <CJK>
+556B 5BDE <CJK>
+556C 5BE5 <CJK>
+556D 5BEB <CJK>
+556E 5BF0 <CJK>
+556F 5BF6 <CJK>
+5570 5BF3 <CJK>
+5571 5C05 <CJK>
+5572 5C07 <CJK>
+5573 5C08 <CJK>
+5574 5C0D <CJK>
+5575 5C13 <CJK>
+5576 5C20 <CJK>
+5577 5C22 <CJK>
+5578 5C28 <CJK>
+5579 5C38 <CJK>
+557A 5C39 <CJK>
+557B 5C41 <CJK>
+557C 5C46 <CJK>
+557D 5C4E <CJK>
+557E 5C53 <CJK>
+5621 5C50 <CJK>
+5622 5C4F <CJK>
+5623 5B71 <CJK>
+5624 5C6C <CJK>
+5625 5C6E <CJK>
+5626 4E62 <CJK>
+5627 5C76 <CJK>
+5628 5C79 <CJK>
+5629 5C8C <CJK>
+562A 5C91 <CJK>
+562B 5C94 <CJK>
+562C 599B <CJK>
+562D 5CAB <CJK>
+562E 5CBB <CJK>
+562F 5CB6 <CJK>
+5630 5CBC <CJK>
+5631 5CB7 <CJK>
+5632 5CC5 <CJK>
+5633 5CBE <CJK>
+5634 5CC7 <CJK>
+5635 5CD9 <CJK>
+5636 5CE9 <CJK>
+5637 5CFD <CJK>
+5638 5CFA <CJK>
+5639 5CED <CJK>
+563A 5D8C <CJK>
+563B 5CEA <CJK>
+563C 5D0B <CJK>
+563D 5D15 <CJK>
+563E 5D17 <CJK>
+563F 5D5C <CJK>
+5640 5D1F <CJK>
+5641 5D1B <CJK>
+5642 5D11 <CJK>
+5643 5D14 <CJK>
+5644 5D22 <CJK>
+5645 5D1A <CJK>
+5646 5D19 <CJK>
+5647 5D18 <CJK>
+5648 5D4C <CJK>
+5649 5D52 <CJK>
+564A 5D4E <CJK>
+564B 5D4B <CJK>
+564C 5D6C <CJK>
+564D 5D73 <CJK>
+564E 5D76 <CJK>
+564F 5D87 <CJK>
+5650 5D84 <CJK>
+5651 5D82 <CJK>
+5652 5DA2 <CJK>
+5653 5D9D <CJK>
+5654 5DAC <CJK>
+5655 5DAE <CJK>
+5656 5DBD <CJK>
+5657 5D90 <CJK>
+5658 5DB7 <CJK>
+5659 5DBC <CJK>
+565A 5DC9 <CJK>
+565B 5DCD <CJK>
+565C 5DD3 <CJK>
+565D 5DD2 <CJK>
+565E 5DD6 <CJK>
+565F 5DDB <CJK>
+5660 5DEB <CJK>
+5661 5DF2 <CJK>
+5662 5DF5 <CJK>
+5663 5E0B <CJK>
+5664 5E1A <CJK>
+5665 5E19 <CJK>
+5666 5E11 <CJK>
+5667 5E1B <CJK>
+5668 5E36 <CJK>
+5669 5E37 <CJK>
+566A 5E44 <CJK>
+566B 5E43 <CJK>
+566C 5E40 <CJK>
+566D 5E4E <CJK>
+566E 5E57 <CJK>
+566F 5E54 <CJK>
+5670 5E5F <CJK>
+5671 5E62 <CJK>
+5672 5E64 <CJK>
+5673 5E47 <CJK>
+5674 5E75 <CJK>
+5675 5E76 <CJK>
+5676 5E7A <CJK>
+5677 9EBC <CJK>
+5678 5E7F <CJK>
+5679 5EA0 <CJK>
+567A 5EC1 <CJK>
+567B 5EC2 <CJK>
+567C 5EC8 <CJK>
+567D 5ED0 <CJK>
+567E 5ECF <CJK>
+5721 5ED6 <CJK>
+5722 5EE3 <CJK>
+5723 5EDD <CJK>
+5724 5EDA <CJK>
+5725 5EDB <CJK>
+5726 5EE2 <CJK>
+5727 5EE1 <CJK>
+5728 5EE8 <CJK>
+5729 5EE9 <CJK>
+572A 5EEC <CJK>
+572B 5EF1 <CJK>
+572C 5EF3 <CJK>
+572D 5EF0 <CJK>
+572E 5EF4 <CJK>
+572F 5EF8 <CJK>
+5730 5EFE <CJK>
+5731 5F03 <CJK>
+5732 5F09 <CJK>
+5733 5F5D <CJK>
+5734 5F5C <CJK>
+5735 5F0B <CJK>
+5736 5F11 <CJK>
+5737 5F16 <CJK>
+5738 5F29 <CJK>
+5739 5F2D <CJK>
+573A 5F38 <CJK>
+573B 5F41 <CJK>
+573C 5F48 <CJK>
+573D 5F4C <CJK>
+573E 5F4E <CJK>
+573F 5F2F <CJK>
+5740 5F51 <CJK>
+5741 5F56 <CJK>
+5742 5F57 <CJK>
+5743 5F59 <CJK>
+5744 5F61 <CJK>
+5745 5F6D <CJK>
+5746 5F73 <CJK>
+5747 5F77 <CJK>
+5748 5F83 <CJK>
+5749 5F82 <CJK>
+574A 5F7F <CJK>
+574B 5F8A <CJK>
+574C 5F88 <CJK>
+574D 5F91 <CJK>
+574E 5F87 <CJK>
+574F 5F9E <CJK>
+5750 5F99 <CJK>
+5751 5F98 <CJK>
+5752 5FA0 <CJK>
+5753 5FA8 <CJK>
+5754 5FAD <CJK>
+5755 5FBC <CJK>
+5756 5FD6 <CJK>
+5757 5FFB <CJK>
+5758 5FE4 <CJK>
+5759 5FF8 <CJK>
+575A 5FF1 <CJK>
+575B 5FDD <CJK>
+575C 60B3 <CJK>
+575D 5FFF <CJK>
+575E 6021 <CJK>
+575F 6060 <CJK>
+5760 6019 <CJK>
+5761 6010 <CJK>
+5762 6029 <CJK>
+5763 600E <CJK>
+5764 6031 <CJK>
+5765 601B <CJK>
+5766 6015 <CJK>
+5767 602B <CJK>
+5768 6026 <CJK>
+5769 600F <CJK>
+576A 603A <CJK>
+576B 605A <CJK>
+576C 6041 <CJK>
+576D 606A <CJK>
+576E 6077 <CJK>
+576F 605F <CJK>
+5770 604A <CJK>
+5771 6046 <CJK>
+5772 604D <CJK>
+5773 6063 <CJK>
+5774 6043 <CJK>
+5775 6064 <CJK>
+5776 6042 <CJK>
+5777 606C <CJK>
+5778 606B <CJK>
+5779 6059 <CJK>
+577A 6081 <CJK>
+577B 608D <CJK>
+577C 60E7 <CJK>
+577D 6083 <CJK>
+577E 609A <CJK>
+5821 6084 <CJK>
+5822 609B <CJK>
+5823 6096 <CJK>
+5824 6097 <CJK>
+5825 6092 <CJK>
+5826 60A7 <CJK>
+5827 608B <CJK>
+5828 60E1 <CJK>
+5829 60B8 <CJK>
+582A 60E0 <CJK>
+582B 60D3 <CJK>
+582C 60B4 <CJK>
+582D 5FF0 <CJK>
+582E 60BD <CJK>
+582F 60C6 <CJK>
+5830 60B5 <CJK>
+5831 60D8 <CJK>
+5832 614D <CJK>
+5833 6115 <CJK>
+5834 6106 <CJK>
+5835 60F6 <CJK>
+5836 60F7 <CJK>
+5837 6100 <CJK>
+5838 60F4 <CJK>
+5839 60FA <CJK>
+583A 6103 <CJK>
+583B 6121 <CJK>
+583C 60FB <CJK>
+583D 60F1 <CJK>
+583E 610D <CJK>
+583F 610E <CJK>
+5840 6147 <CJK>
+5841 613E <CJK>
+5842 6128 <CJK>
+5843 6127 <CJK>
+5844 614A <CJK>
+5845 613F <CJK>
+5846 613C <CJK>
+5847 612C <CJK>
+5848 6134 <CJK>
+5849 613D <CJK>
+584A 6142 <CJK>
+584B 6144 <CJK>
+584C 6173 <CJK>
+584D 6177 <CJK>
+584E 6158 <CJK>
+584F 6159 <CJK>
+5850 615A <CJK>
+5851 616B <CJK>
+5852 6174 <CJK>
+5853 616F <CJK>
+5854 6165 <CJK>
+5855 6171 <CJK>
+5856 615F <CJK>
+5857 615D <CJK>
+5858 6153 <CJK>
+5859 6175 <CJK>
+585A 6199 <CJK>
+585B 6196 <CJK>
+585C 6187 <CJK>
+585D 61AC <CJK>
+585E 6194 <CJK>
+585F 619A <CJK>
+5860 618A <CJK>
+5861 6191 <CJK>
+5862 61AB <CJK>
+5863 61AE <CJK>
+5864 61CC <CJK>
+5865 61CA <CJK>
+5866 61C9 <CJK>
+5867 61F7 <CJK>
+5868 61C8 <CJK>
+5869 61C3 <CJK>
+586A 61C6 <CJK>
+586B 61BA <CJK>
+586C 61CB <CJK>
+586D 7F79 <CJK>
+586E 61CD <CJK>
+586F 61E6 <CJK>
+5870 61E3 <CJK>
+5871 61F6 <CJK>
+5872 61FA <CJK>
+5873 61F4 <CJK>
+5874 61FF <CJK>
+5875 61FD <CJK>
+5876 61FC <CJK>
+5877 61FE <CJK>
+5878 6200 <CJK>
+5879 6208 <CJK>
+587A 6209 <CJK>
+587B 620D <CJK>
+587C 620C <CJK>
+587D 6214 <CJK>
+587E 621B <CJK>
+5921 621E <CJK>
+5922 6221 <CJK>
+5923 622A <CJK>
+5924 622E <CJK>
+5925 6230 <CJK>
+5926 6232 <CJK>
+5927 6233 <CJK>
+5928 6241 <CJK>
+5929 624E <CJK>
+592A 625E <CJK>
+592B 6263 <CJK>
+592C 625B <CJK>
+592D 6260 <CJK>
+592E 6268 <CJK>
+592F 627C <CJK>
+5930 6282 <CJK>
+5931 6289 <CJK>
+5932 627E <CJK>
+5933 6292 <CJK>
+5934 6293 <CJK>
+5935 6296 <CJK>
+5936 62D4 <CJK>
+5937 6283 <CJK>
+5938 6294 <CJK>
+5939 62D7 <CJK>
+593A 62D1 <CJK>
+593B 62BB <CJK>
+593C 62CF <CJK>
+593D 62FF <CJK>
+593E 62C6 <CJK>
+593F 64D4 <CJK>
+5940 62C8 <CJK>
+5941 62DC <CJK>
+5942 62CC <CJK>
+5943 62CA <CJK>
+5944 62C2 <CJK>
+5945 62C7 <CJK>
+5946 629B <CJK>
+5947 62C9 <CJK>
+5948 630C <CJK>
+5949 62EE <CJK>
+594A 62F1 <CJK>
+594B 6327 <CJK>
+594C 6302 <CJK>
+594D 6308 <CJK>
+594E 62EF <CJK>
+594F 62F5 <CJK>
+5950 6350 <CJK>
+5951 633E <CJK>
+5952 634D <CJK>
+5953 641C <CJK>
+5954 634F <CJK>
+5955 6396 <CJK>
+5956 638E <CJK>
+5957 6380 <CJK>
+5958 63AB <CJK>
+5959 6376 <CJK>
+595A 63A3 <CJK>
+595B 638F <CJK>
+595C 6389 <CJK>
+595D 639F <CJK>
+595E 63B5 <CJK>
+595F 636B <CJK>
+5960 6369 <CJK>
+5961 63BE <CJK>
+5962 63E9 <CJK>
+5963 63C0 <CJK>
+5964 63C6 <CJK>
+5965 63E3 <CJK>
+5966 63C9 <CJK>
+5967 63D2 <CJK>
+5968 63F6 <CJK>
+5969 63C4 <CJK>
+596A 6416 <CJK>
+596B 6434 <CJK>
+596C 6406 <CJK>
+596D 6413 <CJK>
+596E 6426 <CJK>
+596F 6436 <CJK>
+5970 651D <CJK>
+5971 6417 <CJK>
+5972 6428 <CJK>
+5973 640F <CJK>
+5974 6467 <CJK>
+5975 646F <CJK>
+5976 6476 <CJK>
+5977 644E <CJK>
+5978 652A <CJK>
+5979 6495 <CJK>
+597A 6493 <CJK>
+597B 64A5 <CJK>
+597C 64A9 <CJK>
+597D 6488 <CJK>
+597E 64BC <CJK>
+5A21 64DA <CJK>
+5A22 64D2 <CJK>
+5A23 64C5 <CJK>
+5A24 64C7 <CJK>
+5A25 64BB <CJK>
+5A26 64D8 <CJK>
+5A27 64C2 <CJK>
+5A28 64F1 <CJK>
+5A29 64E7 <CJK>
+5A2A 8209 <CJK>
+5A2B 64E0 <CJK>
+5A2C 64E1 <CJK>
+5A2D 62AC <CJK>
+5A2E 64E3 <CJK>
+5A2F 64EF <CJK>
+5A30 652C <CJK>
+5A31 64F6 <CJK>
+5A32 64F4 <CJK>
+5A33 64F2 <CJK>
+5A34 64FA <CJK>
+5A35 6500 <CJK>
+5A36 64FD <CJK>
+5A37 6518 <CJK>
+5A38 651C <CJK>
+5A39 6505 <CJK>
+5A3A 6524 <CJK>
+5A3B 6523 <CJK>
+5A3C 652B <CJK>
+5A3D 6534 <CJK>
+5A3E 6535 <CJK>
+5A3F 6537 <CJK>
+5A40 6536 <CJK>
+5A41 6538 <CJK>
+5A42 754B <CJK>
+5A43 6548 <CJK>
+5A44 6556 <CJK>
+5A45 6555 <CJK>
+5A46 654D <CJK>
+5A47 6558 <CJK>
+5A48 655E <CJK>
+5A49 655D <CJK>
+5A4A 6572 <CJK>
+5A4B 6578 <CJK>
+5A4C 6582 <CJK>
+5A4D 6583 <CJK>
+5A4E 8B8A <CJK>
+5A4F 659B <CJK>
+5A50 659F <CJK>
+5A51 65AB <CJK>
+5A52 65B7 <CJK>
+5A53 65C3 <CJK>
+5A54 65C6 <CJK>
+5A55 65C1 <CJK>
+5A56 65C4 <CJK>
+5A57 65CC <CJK>
+5A58 65D2 <CJK>
+5A59 65DB <CJK>
+5A5A 65D9 <CJK>
+5A5B 65E0 <CJK>
+5A5C 65E1 <CJK>
+5A5D 65F1 <CJK>
+5A5E 6772 <CJK>
+5A5F 660A <CJK>
+5A60 6603 <CJK>
+5A61 65FB <CJK>
+5A62 6773 <CJK>
+5A63 6635 <CJK>
+5A64 6636 <CJK>
+5A65 6634 <CJK>
+5A66 661C <CJK>
+5A67 664F <CJK>
+5A68 6644 <CJK>
+5A69 6649 <CJK>
+5A6A 6641 <CJK>
+5A6B 665E <CJK>
+5A6C 665D <CJK>
+5A6D 6664 <CJK>
+5A6E 6667 <CJK>
+5A6F 6668 <CJK>
+5A70 665F <CJK>
+5A71 6662 <CJK>
+5A72 6670 <CJK>
+5A73 6683 <CJK>
+5A74 6688 <CJK>
+5A75 668E <CJK>
+5A76 6689 <CJK>
+5A77 6684 <CJK>
+5A78 6698 <CJK>
+5A79 669D <CJK>
+5A7A 66C1 <CJK>
+5A7B 66B9 <CJK>
+5A7C 66C9 <CJK>
+5A7D 66BE <CJK>
+5A7E 66BC <CJK>
+5B21 66C4 <CJK>
+5B22 66B8 <CJK>
+5B23 66D6 <CJK>
+5B24 66DA <CJK>
+5B25 66E0 <CJK>
+5B26 663F <CJK>
+5B27 66E6 <CJK>
+5B28 66E9 <CJK>
+5B29 66F0 <CJK>
+5B2A 66F5 <CJK>
+5B2B 66F7 <CJK>
+5B2C 670F <CJK>
+5B2D 6716 <CJK>
+5B2E 671E <CJK>
+5B2F 6726 <CJK>
+5B30 6727 <CJK>
+5B31 9738 <CJK>
+5B32 672E <CJK>
+5B33 673F <CJK>
+5B34 6736 <CJK>
+5B35 6741 <CJK>
+5B36 6738 <CJK>
+5B37 6737 <CJK>
+5B38 6746 <CJK>
+5B39 675E <CJK>
+5B3A 6760 <CJK>
+5B3B 6759 <CJK>
+5B3C 6763 <CJK>
+5B3D 6764 <CJK>
+5B3E 6789 <CJK>
+5B3F 6770 <CJK>
+5B40 67A9 <CJK>
+5B41 677C <CJK>
+5B42 676A <CJK>
+5B43 678C <CJK>
+5B44 678B <CJK>
+5B45 67A6 <CJK>
+5B46 67A1 <CJK>
+5B47 6785 <CJK>
+5B48 67B7 <CJK>
+5B49 67EF <CJK>
+5B4A 67B4 <CJK>
+5B4B 67EC <CJK>
+5B4C 67B3 <CJK>
+5B4D 67E9 <CJK>
+5B4E 67B8 <CJK>
+5B4F 67E4 <CJK>
+5B50 67DE <CJK>
+5B51 67DD <CJK>
+5B52 67E2 <CJK>
+5B53 67EE <CJK>
+5B54 67B9 <CJK>
+5B55 67CE <CJK>
+5B56 67C6 <CJK>
+5B57 67E7 <CJK>
+5B58 6A9C <CJK>
+5B59 681E <CJK>
+5B5A 6846 <CJK>
+5B5B 6829 <CJK>
+5B5C 6840 <CJK>
+5B5D 684D <CJK>
+5B5E 6832 <CJK>
+5B5F 684E <CJK>
+5B60 68B3 <CJK>
+5B61 682B <CJK>
+5B62 6859 <CJK>
+5B63 6863 <CJK>
+5B64 6877 <CJK>
+5B65 687F <CJK>
+5B66 689F <CJK>
+5B67 688F <CJK>
+5B68 68AD <CJK>
+5B69 6894 <CJK>
+5B6A 689D <CJK>
+5B6B 689B <CJK>
+5B6C 6883 <CJK>
+5B6D 6AAE <CJK>
+5B6E 68B9 <CJK>
+5B6F 6874 <CJK>
+5B70 68B5 <CJK>
+5B71 68A0 <CJK>
+5B72 68BA <CJK>
+5B73 690F <CJK>
+5B74 688D <CJK>
+5B75 687E <CJK>
+5B76 6901 <CJK>
+5B77 68CA <CJK>
+5B78 6908 <CJK>
+5B79 68D8 <CJK>
+5B7A 6922 <CJK>
+5B7B 6926 <CJK>
+5B7C 68E1 <CJK>
+5B7D 690C <CJK>
+5B7E 68CD <CJK>
+5C21 68D4 <CJK>
+5C22 68E7 <CJK>
+5C23 68D5 <CJK>
+5C24 6936 <CJK>
+5C25 6912 <CJK>
+5C26 6904 <CJK>
+5C27 68D7 <CJK>
+5C28 68E3 <CJK>
+5C29 6925 <CJK>
+5C2A 68F9 <CJK>
+5C2B 68E0 <CJK>
+5C2C 68EF <CJK>
+5C2D 6928 <CJK>
+5C2E 692A <CJK>
+5C2F 691A <CJK>
+5C30 6923 <CJK>
+5C31 6921 <CJK>
+5C32 68C6 <CJK>
+5C33 6979 <CJK>
+5C34 6977 <CJK>
+5C35 695C <CJK>
+5C36 6978 <CJK>
+5C37 696B <CJK>
+5C38 6954 <CJK>
+5C39 697E <CJK>
+5C3A 696E <CJK>
+5C3B 6939 <CJK>
+5C3C 6974 <CJK>
+5C3D 693D <CJK>
+5C3E 6959 <CJK>
+5C3F 6930 <CJK>
+5C40 6961 <CJK>
+5C41 695E <CJK>
+5C42 695D <CJK>
+5C43 6981 <CJK>
+5C44 696A <CJK>
+5C45 69B2 <CJK>
+5C46 69AE <CJK>
+5C47 69D0 <CJK>
+5C48 69BF <CJK>
+5C49 69C1 <CJK>
+5C4A 69D3 <CJK>
+5C4B 69BE <CJK>
+5C4C 69CE <CJK>
+5C4D 5BE8 <CJK>
+5C4E 69CA <CJK>
+5C4F 69DD <CJK>
+5C50 69BB <CJK>
+5C51 69C3 <CJK>
+5C52 69A7 <CJK>
+5C53 6A2E <CJK>
+5C54 6991 <CJK>
+5C55 69A0 <CJK>
+5C56 699C <CJK>
+5C57 6995 <CJK>
+5C58 69B4 <CJK>
+5C59 69DE <CJK>
+5C5A 69E8 <CJK>
+5C5B 6A02 <CJK>
+5C5C 6A1B <CJK>
+5C5D 69FF <CJK>
+5C5E 6B0A <CJK>
+5C5F 69F9 <CJK>
+5C60 69F2 <CJK>
+5C61 69E7 <CJK>
+5C62 6A05 <CJK>
+5C63 69B1 <CJK>
+5C64 6A1E <CJK>
+5C65 69ED <CJK>
+5C66 6A14 <CJK>
+5C67 69EB <CJK>
+5C68 6A0A <CJK>
+5C69 6A12 <CJK>
+5C6A 6AC1 <CJK>
+5C6B 6A23 <CJK>
+5C6C 6A13 <CJK>
+5C6D 6A44 <CJK>
+5C6E 6A0C <CJK>
+5C6F 6A72 <CJK>
+5C70 6A36 <CJK>
+5C71 6A78 <CJK>
+5C72 6A47 <CJK>
+5C73 6A62 <CJK>
+5C74 6A59 <CJK>
+5C75 6A66 <CJK>
+5C76 6A48 <CJK>
+5C77 6A38 <CJK>
+5C78 6A22 <CJK>
+5C79 6A90 <CJK>
+5C7A 6A8D <CJK>
+5C7B 6AA0 <CJK>
+5C7C 6A84 <CJK>
+5C7D 6AA2 <CJK>
+5C7E 6AA3 <CJK>
+5D21 6A97 <CJK>
+5D22 8617 <CJK>
+5D23 6ABB <CJK>
+5D24 6AC3 <CJK>
+5D25 6AC2 <CJK>
+5D26 6AB8 <CJK>
+5D27 6AB3 <CJK>
+5D28 6AAC <CJK>
+5D29 6ADE <CJK>
+5D2A 6AD1 <CJK>
+5D2B 6ADF <CJK>
+5D2C 6AAA <CJK>
+5D2D 6ADA <CJK>
+5D2E 6AEA <CJK>
+5D2F 6AFB <CJK>
+5D30 6B05 <CJK>
+5D31 8616 <CJK>
+5D32 6AFA <CJK>
+5D33 6B12 <CJK>
+5D34 6B16 <CJK>
+5D35 9B31 <CJK>
+5D36 6B1F <CJK>
+5D37 6B38 <CJK>
+5D38 6B37 <CJK>
+5D39 76DC <CJK>
+5D3A 6B39 <CJK>
+5D3B 98EE <CJK>
+5D3C 6B47 <CJK>
+5D3D 6B43 <CJK>
+5D3E 6B49 <CJK>
+5D3F 6B50 <CJK>
+5D40 6B59 <CJK>
+5D41 6B54 <CJK>
+5D42 6B5B <CJK>
+5D43 6B5F <CJK>
+5D44 6B61 <CJK>
+5D45 6B78 <CJK>
+5D46 6B79 <CJK>
+5D47 6B7F <CJK>
+5D48 6B80 <CJK>
+5D49 6B84 <CJK>
+5D4A 6B83 <CJK>
+5D4B 6B8D <CJK>
+5D4C 6B98 <CJK>
+5D4D 6B95 <CJK>
+5D4E 6B9E <CJK>
+5D4F 6BA4 <CJK>
+5D50 6BAA <CJK>
+5D51 6BAB <CJK>
+5D52 6BAF <CJK>
+5D53 6BB2 <CJK>
+5D54 6BB1 <CJK>
+5D55 6BB3 <CJK>
+5D56 6BB7 <CJK>
+5D57 6BBC <CJK>
+5D58 6BC6 <CJK>
+5D59 6BCB <CJK>
+5D5A 6BD3 <CJK>
+5D5B 6BDF <CJK>
+5D5C 6BEC <CJK>
+5D5D 6BEB <CJK>
+5D5E 6BF3 <CJK>
+5D5F 6BEF <CJK>
+5D60 9EBE <CJK>
+5D61 6C08 <CJK>
+5D62 6C13 <CJK>
+5D63 6C14 <CJK>
+5D64 6C1B <CJK>
+5D65 6C24 <CJK>
+5D66 6C23 <CJK>
+5D67 6C5E <CJK>
+5D68 6C55 <CJK>
+5D69 6C62 <CJK>
+5D6A 6C6A <CJK>
+5D6B 6C82 <CJK>
+5D6C 6C8D <CJK>
+5D6D 6C9A <CJK>
+5D6E 6C81 <CJK>
+5D6F 6C9B <CJK>
+5D70 6C7E <CJK>
+5D71 6C68 <CJK>
+5D72 6C73 <CJK>
+5D73 6C92 <CJK>
+5D74 6C90 <CJK>
+5D75 6CC4 <CJK>
+5D76 6CF1 <CJK>
+5D77 6CD3 <CJK>
+5D78 6CBD <CJK>
+5D79 6CD7 <CJK>
+5D7A 6CC5 <CJK>
+5D7B 6CDD <CJK>
+5D7C 6CAE <CJK>
+5D7D 6CB1 <CJK>
+5D7E 6CBE <CJK>
+5E21 6CBA <CJK>
+5E22 6CDB <CJK>
+5E23 6CEF <CJK>
+5E24 6CD9 <CJK>
+5E25 6CEA <CJK>
+5E26 6D1F <CJK>
+5E27 884D <CJK>
+5E28 6D36 <CJK>
+5E29 6D2B <CJK>
+5E2A 6D3D <CJK>
+5E2B 6D38 <CJK>
+5E2C 6D19 <CJK>
+5E2D 6D35 <CJK>
+5E2E 6D33 <CJK>
+5E2F 6D12 <CJK>
+5E30 6D0C <CJK>
+5E31 6D63 <CJK>
+5E32 6D93 <CJK>
+5E33 6D64 <CJK>
+5E34 6D5A <CJK>
+5E35 6D79 <CJK>
+5E36 6D59 <CJK>
+5E37 6D8E <CJK>
+5E38 6D95 <CJK>
+5E39 6FE4 <CJK>
+5E3A 6D85 <CJK>
+5E3B 6DF9 <CJK>
+5E3C 6E15 <CJK>
+5E3D 6E0A <CJK>
+5E3E 6DB5 <CJK>
+5E3F 6DC7 <CJK>
+5E40 6DE6 <CJK>
+5E41 6DB8 <CJK>
+5E42 6DC6 <CJK>
+5E43 6DEC <CJK>
+5E44 6DDE <CJK>
+5E45 6DCC <CJK>
+5E46 6DE8 <CJK>
+5E47 6DD2 <CJK>
+5E48 6DC5 <CJK>
+5E49 6DFA <CJK>
+5E4A 6DD9 <CJK>
+5E4B 6DE4 <CJK>
+5E4C 6DD5 <CJK>
+5E4D 6DEA <CJK>
+5E4E 6DEE <CJK>
+5E4F 6E2D <CJK>
+5E50 6E6E <CJK>
+5E51 6E2E <CJK>
+5E52 6E19 <CJK>
+5E53 6E72 <CJK>
+5E54 6E5F <CJK>
+5E55 6E3E <CJK>
+5E56 6E23 <CJK>
+5E57 6E6B <CJK>
+5E58 6E2B <CJK>
+5E59 6E76 <CJK>
+5E5A 6E4D <CJK>
+5E5B 6E1F <CJK>
+5E5C 6E43 <CJK>
+5E5D 6E3A <CJK>
+5E5E 6E4E <CJK>
+5E5F 6E24 <CJK>
+5E60 6EFF <CJK>
+5E61 6E1D <CJK>
+5E62 6E38 <CJK>
+5E63 6E82 <CJK>
+5E64 6EAA <CJK>
+5E65 6E98 <CJK>
+5E66 6EC9 <CJK>
+5E67 6EB7 <CJK>
+5E68 6ED3 <CJK>
+5E69 6EBD <CJK>
+5E6A 6EAF <CJK>
+5E6B 6EC4 <CJK>
+5E6C 6EB2 <CJK>
+5E6D 6ED4 <CJK>
+5E6E 6ED5 <CJK>
+5E6F 6E8F <CJK>
+5E70 6EA5 <CJK>
+5E71 6EC2 <CJK>
+5E72 6E9F <CJK>
+5E73 6F41 <CJK>
+5E74 6F11 <CJK>
+5E75 704C <CJK>
+5E76 6EEC <CJK>
+5E77 6EF8 <CJK>
+5E78 6EFE <CJK>
+5E79 6F3F <CJK>
+5E7A 6EF2 <CJK>
+5E7B 6F31 <CJK>
+5E7C 6EEF <CJK>
+5E7D 6F32 <CJK>
+5E7E 6ECC <CJK>
+5F21 6F3E <CJK>
+5F22 6F13 <CJK>
+5F23 6EF7 <CJK>
+5F24 6F86 <CJK>
+5F25 6F7A <CJK>
+5F26 6F78 <CJK>
+5F27 6F81 <CJK>
+5F28 6F80 <CJK>
+5F29 6F6F <CJK>
+5F2A 6F5B <CJK>
+5F2B 6FF3 <CJK>
+5F2C 6F6D <CJK>
+5F2D 6F82 <CJK>
+5F2E 6F7C <CJK>
+5F2F 6F58 <CJK>
+5F30 6F8E <CJK>
+5F31 6F91 <CJK>
+5F32 6FC2 <CJK>
+5F33 6F66 <CJK>
+5F34 6FB3 <CJK>
+5F35 6FA3 <CJK>
+5F36 6FA1 <CJK>
+5F37 6FA4 <CJK>
+5F38 6FB9 <CJK>
+5F39 6FC6 <CJK>
+5F3A 6FAA <CJK>
+5F3B 6FDF <CJK>
+5F3C 6FD5 <CJK>
+5F3D 6FEC <CJK>
+5F3E 6FD4 <CJK>
+5F3F 6FD8 <CJK>
+5F40 6FF1 <CJK>
+5F41 6FEE <CJK>
+5F42 6FDB <CJK>
+5F43 7009 <CJK>
+5F44 700B <CJK>
+5F45 6FFA <CJK>
+5F46 7011 <CJK>
+5F47 7001 <CJK>
+5F48 700F <CJK>
+5F49 6FFE <CJK>
+5F4A 701B <CJK>
+5F4B 701A <CJK>
+5F4C 6F74 <CJK>
+5F4D 701D <CJK>
+5F4E 7018 <CJK>
+5F4F 701F <CJK>
+5F50 7030 <CJK>
+5F51 703E <CJK>
+5F52 7032 <CJK>
+5F53 7051 <CJK>
+5F54 7063 <CJK>
+5F55 7099 <CJK>
+5F56 7092 <CJK>
+5F57 70AF <CJK>
+5F58 70F1 <CJK>
+5F59 70AC <CJK>
+5F5A 70B8 <CJK>
+5F5B 70B3 <CJK>
+5F5C 70AE <CJK>
+5F5D 70DF <CJK>
+5F5E 70CB <CJK>
+5F5F 70DD <CJK>
+5F60 70D9 <CJK>
+5F61 7109 <CJK>
+5F62 70FD <CJK>
+5F63 711C <CJK>
+5F64 7119 <CJK>
+5F65 7165 <CJK>
+5F66 7155 <CJK>
+5F67 7188 <CJK>
+5F68 7166 <CJK>
+5F69 7162 <CJK>
+5F6A 714C <CJK>
+5F6B 7156 <CJK>
+5F6C 716C <CJK>
+5F6D 718F <CJK>
+5F6E 71FB <CJK>
+5F6F 7184 <CJK>
+5F70 7195 <CJK>
+5F71 71A8 <CJK>
+5F72 71AC <CJK>
+5F73 71D7 <CJK>
+5F74 71B9 <CJK>
+5F75 71BE <CJK>
+5F76 71D2 <CJK>
+5F77 71C9 <CJK>
+5F78 71D4 <CJK>
+5F79 71CE <CJK>
+5F7A 71E0 <CJK>
+5F7B 71EC <CJK>
+5F7C 71E7 <CJK>
+5F7D 71F5 <CJK>
+5F7E 71FC <CJK>
+6021 71F9 <CJK>
+6022 71FF <CJK>
+6023 720D <CJK>
+6024 7210 <CJK>
+6025 721B <CJK>
+6026 7228 <CJK>
+6027 722D <CJK>
+6028 722C <CJK>
+6029 7230 <CJK>
+602A 7232 <CJK>
+602B 723B <CJK>
+602C 723C <CJK>
+602D 723F <CJK>
+602E 7240 <CJK>
+602F 7246 <CJK>
+6030 724B <CJK>
+6031 7258 <CJK>
+6032 7274 <CJK>
+6033 727E <CJK>
+6034 7282 <CJK>
+6035 7281 <CJK>
+6036 7287 <CJK>
+6037 7292 <CJK>
+6038 7296 <CJK>
+6039 72A2 <CJK>
+603A 72A7 <CJK>
+603B 72B9 <CJK>
+603C 72B2 <CJK>
+603D 72C3 <CJK>
+603E 72C6 <CJK>
+603F 72C4 <CJK>
+6040 72CE <CJK>
+6041 72D2 <CJK>
+6042 72E2 <CJK>
+6043 72E0 <CJK>
+6044 72E1 <CJK>
+6045 72F9 <CJK>
+6046 72F7 <CJK>
+6047 500F <CJK>
+6048 7317 <CJK>
+6049 730A <CJK>
+604A 731C <CJK>
+604B 7316 <CJK>
+604C 731D <CJK>
+604D 7334 <CJK>
+604E 732F <CJK>
+604F 7329 <CJK>
+6050 7325 <CJK>
+6051 733E <CJK>
+6052 734E <CJK>
+6053 734F <CJK>
+6054 9ED8 <CJK>
+6055 7357 <CJK>
+6056 736A <CJK>
+6057 7368 <CJK>
+6058 7370 <CJK>
+6059 7378 <CJK>
+605A 7375 <CJK>
+605B 737B <CJK>
+605C 737A <CJK>
+605D 73C8 <CJK>
+605E 73B3 <CJK>
+605F 73CE <CJK>
+6060 73BB <CJK>
+6061 73C0 <CJK>
+6062 73E5 <CJK>
+6063 73EE <CJK>
+6064 73DE <CJK>
+6065 74A2 <CJK>
+6066 7405 <CJK>
+6067 746F <CJK>
+6068 7425 <CJK>
+6069 73F8 <CJK>
+606A 7432 <CJK>
+606B 743A <CJK>
+606C 7455 <CJK>
+606D 743F <CJK>
+606E 745F <CJK>
+606F 7459 <CJK>
+6070 7441 <CJK>
+6071 745C <CJK>
+6072 7469 <CJK>
+6073 7470 <CJK>
+6074 7463 <CJK>
+6075 746A <CJK>
+6076 7476 <CJK>
+6077 747E <CJK>
+6078 748B <CJK>
+6079 749E <CJK>
+607A 74A7 <CJK>
+607B 74CA <CJK>
+607C 74CF <CJK>
+607D 74D4 <CJK>
+607E 73F1 <CJK>
+6121 74E0 <CJK>
+6122 74E3 <CJK>
+6123 74E7 <CJK>
+6124 74E9 <CJK>
+6125 74EE <CJK>
+6126 74F2 <CJK>
+6127 74F0 <CJK>
+6128 74F1 <CJK>
+6129 74F8 <CJK>
+612A 74F7 <CJK>
+612B 7504 <CJK>
+612C 7503 <CJK>
+612D 7505 <CJK>
+612E 750C <CJK>
+612F 750E <CJK>
+6130 750D <CJK>
+6131 7515 <CJK>
+6132 7513 <CJK>
+6133 751E <CJK>
+6134 7526 <CJK>
+6135 752C <CJK>
+6136 753C <CJK>
+6137 7544 <CJK>
+6138 754D <CJK>
+6139 754A <CJK>
+613A 7549 <CJK>
+613B 755B <CJK>
+613C 7546 <CJK>
+613D 755A <CJK>
+613E 7569 <CJK>
+613F 7564 <CJK>
+6140 7567 <CJK>
+6141 756B <CJK>
+6142 756D <CJK>
+6143 7578 <CJK>
+6144 7576 <CJK>
+6145 7586 <CJK>
+6146 7587 <CJK>
+6147 7574 <CJK>
+6148 758A <CJK>
+6149 7589 <CJK>
+614A 7582 <CJK>
+614B 7594 <CJK>
+614C 759A <CJK>
+614D 759D <CJK>
+614E 75A5 <CJK>
+614F 75A3 <CJK>
+6150 75C2 <CJK>
+6151 75B3 <CJK>
+6152 75C3 <CJK>
+6153 75B5 <CJK>
+6154 75BD <CJK>
+6155 75B8 <CJK>
+6156 75BC <CJK>
+6157 75B1 <CJK>
+6158 75CD <CJK>
+6159 75CA <CJK>
+615A 75D2 <CJK>
+615B 75D9 <CJK>
+615C 75E3 <CJK>
+615D 75DE <CJK>
+615E 75FE <CJK>
+615F 75FF <CJK>
+6160 75FC <CJK>
+6161 7601 <CJK>
+6162 75F0 <CJK>
+6163 75FA <CJK>
+6164 75F2 <CJK>
+6165 75F3 <CJK>
+6166 760B <CJK>
+6167 760D <CJK>
+6168 7609 <CJK>
+6169 761F <CJK>
+616A 7627 <CJK>
+616B 7620 <CJK>
+616C 7621 <CJK>
+616D 7622 <CJK>
+616E 7624 <CJK>
+616F 7634 <CJK>
+6170 7630 <CJK>
+6171 763B <CJK>
+6172 7647 <CJK>
+6173 7648 <CJK>
+6174 7646 <CJK>
+6175 765C <CJK>
+6176 7658 <CJK>
+6177 7661 <CJK>
+6178 7662 <CJK>
+6179 7668 <CJK>
+617A 7669 <CJK>
+617B 766A <CJK>
+617C 7667 <CJK>
+617D 766C <CJK>
+617E 7670 <CJK>
+6221 7672 <CJK>
+6222 7676 <CJK>
+6223 7678 <CJK>
+6224 767C <CJK>
+6225 7680 <CJK>
+6226 7683 <CJK>
+6227 7688 <CJK>
+6228 768B <CJK>
+6229 768E <CJK>
+622A 7696 <CJK>
+622B 7693 <CJK>
+622C 7699 <CJK>
+622D 769A <CJK>
+622E 76B0 <CJK>
+622F 76B4 <CJK>
+6230 76B8 <CJK>
+6231 76B9 <CJK>
+6232 76BA <CJK>
+6233 76C2 <CJK>
+6234 76CD <CJK>
+6235 76D6 <CJK>
+6236 76D2 <CJK>
+6237 76DE <CJK>
+6238 76E1 <CJK>
+6239 76E5 <CJK>
+623A 76E7 <CJK>
+623B 76EA <CJK>
+623C 862F <CJK>
+623D 76FB <CJK>
+623E 7708 <CJK>
+623F 7707 <CJK>
+6240 7704 <CJK>
+6241 7729 <CJK>
+6242 7724 <CJK>
+6243 771E <CJK>
+6244 7725 <CJK>
+6245 7726 <CJK>
+6246 771B <CJK>
+6247 7737 <CJK>
+6248 7738 <CJK>
+6249 7747 <CJK>
+624A 775A <CJK>
+624B 7768 <CJK>
+624C 776B <CJK>
+624D 775B <CJK>
+624E 7765 <CJK>
+624F 777F <CJK>
+6250 777E <CJK>
+6251 7779 <CJK>
+6252 778E <CJK>
+6253 778B <CJK>
+6254 7791 <CJK>
+6255 77A0 <CJK>
+6256 779E <CJK>
+6257 77B0 <CJK>
+6258 77B6 <CJK>
+6259 77B9 <CJK>
+625A 77BF <CJK>
+625B 77BC <CJK>
+625C 77BD <CJK>
+625D 77BB <CJK>
+625E 77C7 <CJK>
+625F 77CD <CJK>
+6260 77D7 <CJK>
+6261 77DA <CJK>
+6262 77DC <CJK>
+6263 77E3 <CJK>
+6264 77EE <CJK>
+6265 77FC <CJK>
+6266 780C <CJK>
+6267 7812 <CJK>
+6268 7926 <CJK>
+6269 7820 <CJK>
+626A 792A <CJK>
+626B 7845 <CJK>
+626C 788E <CJK>
+626D 7874 <CJK>
+626E 7886 <CJK>
+626F 787C <CJK>
+6270 789A <CJK>
+6271 788C <CJK>
+6272 78A3 <CJK>
+6273 78B5 <CJK>
+6274 78AA <CJK>
+6275 78AF <CJK>
+6276 78D1 <CJK>
+6277 78C6 <CJK>
+6278 78CB <CJK>
+6279 78D4 <CJK>
+627A 78BE <CJK>
+627B 78BC <CJK>
+627C 78C5 <CJK>
+627D 78CA <CJK>
+627E 78EC <CJK>
+6321 78E7 <CJK>
+6322 78DA <CJK>
+6323 78FD <CJK>
+6324 78F4 <CJK>
+6325 7907 <CJK>
+6326 7912 <CJK>
+6327 7911 <CJK>
+6328 7919 <CJK>
+6329 792C <CJK>
+632A 792B <CJK>
+632B 7940 <CJK>
+632C 7960 <CJK>
+632D 7957 <CJK>
+632E 795F <CJK>
+632F 795A <CJK>
+6330 7955 <CJK>
+6331 7953 <CJK>
+6332 797A <CJK>
+6333 797F <CJK>
+6334 798A <CJK>
+6335 799D <CJK>
+6336 79A7 <CJK>
+6337 9F4B <CJK>
+6338 79AA <CJK>
+6339 79AE <CJK>
+633A 79B3 <CJK>
+633B 79B9 <CJK>
+633C 79BA <CJK>
+633D 79C9 <CJK>
+633E 79D5 <CJK>
+633F 79E7 <CJK>
+6340 79EC <CJK>
+6341 79E1 <CJK>
+6342 79E3 <CJK>
+6343 7A08 <CJK>
+6344 7A0D <CJK>
+6345 7A18 <CJK>
+6346 7A19 <CJK>
+6347 7A20 <CJK>
+6348 7A1F <CJK>
+6349 7980 <CJK>
+634A 7A31 <CJK>
+634B 7A3B <CJK>
+634C 7A3E <CJK>
+634D 7A37 <CJK>
+634E 7A43 <CJK>
+634F 7A57 <CJK>
+6350 7A49 <CJK>
+6351 7A61 <CJK>
+6352 7A62 <CJK>
+6353 7A69 <CJK>
+6354 9F9D <CJK>
+6355 7A70 <CJK>
+6356 7A79 <CJK>
+6357 7A7D <CJK>
+6358 7A88 <CJK>
+6359 7A97 <CJK>
+635A 7A95 <CJK>
+635B 7A98 <CJK>
+635C 7A96 <CJK>
+635D 7AA9 <CJK>
+635E 7AC8 <CJK>
+635F 7AB0 <CJK>
+6360 7AB6 <CJK>
+6361 7AC5 <CJK>
+6362 7AC4 <CJK>
+6363 7ABF <CJK>
+6364 9083 <CJK>
+6365 7AC7 <CJK>
+6366 7ACA <CJK>
+6367 7ACD <CJK>
+6368 7ACF <CJK>
+6369 7AD5 <CJK>
+636A 7AD3 <CJK>
+636B 7AD9 <CJK>
+636C 7ADA <CJK>
+636D 7ADD <CJK>
+636E 7AE1 <CJK>
+636F 7AE2 <CJK>
+6370 7AE6 <CJK>
+6371 7AED <CJK>
+6372 7AF0 <CJK>
+6373 7B02 <CJK>
+6374 7B0F <CJK>
+6375 7B0A <CJK>
+6376 7B06 <CJK>
+6377 7B33 <CJK>
+6378 7B18 <CJK>
+6379 7B19 <CJK>
+637A 7B1E <CJK>
+637B 7B35 <CJK>
+637C 7B28 <CJK>
+637D 7B36 <CJK>
+637E 7B50 <CJK>
+6421 7B7A <CJK>
+6422 7B04 <CJK>
+6423 7B4D <CJK>
+6424 7B0B <CJK>
+6425 7B4C <CJK>
+6426 7B45 <CJK>
+6427 7B75 <CJK>
+6428 7B65 <CJK>
+6429 7B74 <CJK>
+642A 7B67 <CJK>
+642B 7B70 <CJK>
+642C 7B71 <CJK>
+642D 7B6C <CJK>
+642E 7B6E <CJK>
+642F 7B9D <CJK>
+6430 7B98 <CJK>
+6431 7B9F <CJK>
+6432 7B8D <CJK>
+6433 7B9C <CJK>
+6434 7B9A <CJK>
+6435 7B8B <CJK>
+6436 7B92 <CJK>
+6437 7B8F <CJK>
+6438 7B5D <CJK>
+6439 7B99 <CJK>
+643A 7BCB <CJK>
+643B 7BC1 <CJK>
+643C 7BCC <CJK>
+643D 7BCF <CJK>
+643E 7BB4 <CJK>
+643F 7BC6 <CJK>
+6440 7BDD <CJK>
+6441 7BE9 <CJK>
+6442 7C11 <CJK>
+6443 7C14 <CJK>
+6444 7BE6 <CJK>
+6445 7BE5 <CJK>
+6446 7C60 <CJK>
+6447 7C00 <CJK>
+6448 7C07 <CJK>
+6449 7C13 <CJK>
+644A 7BF3 <CJK>
+644B 7BF7 <CJK>
+644C 7C17 <CJK>
+644D 7C0D <CJK>
+644E 7BF6 <CJK>
+644F 7C23 <CJK>
+6450 7C27 <CJK>
+6451 7C2A <CJK>
+6452 7C1F <CJK>
+6453 7C37 <CJK>
+6454 7C2B <CJK>
+6455 7C3D <CJK>
+6456 7C4C <CJK>
+6457 7C43 <CJK>
+6458 7C54 <CJK>
+6459 7C4F <CJK>
+645A 7C40 <CJK>
+645B 7C50 <CJK>
+645C 7C58 <CJK>
+645D 7C5F <CJK>
+645E 7C64 <CJK>
+645F 7C56 <CJK>
+6460 7C65 <CJK>
+6461 7C6C <CJK>
+6462 7C75 <CJK>
+6463 7C83 <CJK>
+6464 7C90 <CJK>
+6465 7CA4 <CJK>
+6466 7CAD <CJK>
+6467 7CA2 <CJK>
+6468 7CAB <CJK>
+6469 7CA1 <CJK>
+646A 7CA8 <CJK>
+646B 7CB3 <CJK>
+646C 7CB2 <CJK>
+646D 7CB1 <CJK>
+646E 7CAE <CJK>
+646F 7CB9 <CJK>
+6470 7CBD <CJK>
+6471 7CC0 <CJK>
+6472 7CC5 <CJK>
+6473 7CC2 <CJK>
+6474 7CD8 <CJK>
+6475 7CD2 <CJK>
+6476 7CDC <CJK>
+6477 7CE2 <CJK>
+6478 9B3B <CJK>
+6479 7CEF <CJK>
+647A 7CF2 <CJK>
+647B 7CF4 <CJK>
+647C 7CF6 <CJK>
+647D 7CFA <CJK>
+647E 7D06 <CJK>
+6521 7D02 <CJK>
+6522 7D1C <CJK>
+6523 7D15 <CJK>
+6524 7D0A <CJK>
+6525 7D45 <CJK>
+6526 7D4B <CJK>
+6527 7D2E <CJK>
+6528 7D32 <CJK>
+6529 7D3F <CJK>
+652A 7D35 <CJK>
+652B 7D46 <CJK>
+652C 7D73 <CJK>
+652D 7D56 <CJK>
+652E 7D4E <CJK>
+652F 7D72 <CJK>
+6530 7D68 <CJK>
+6531 7D6E <CJK>
+6532 7D4F <CJK>
+6533 7D63 <CJK>
+6534 7D93 <CJK>
+6535 7D89 <CJK>
+6536 7D5B <CJK>
+6537 7D8F <CJK>
+6538 7D7D <CJK>
+6539 7D9B <CJK>
+653A 7DBA <CJK>
+653B 7DAE <CJK>
+653C 7DA3 <CJK>
+653D 7DB5 <CJK>
+653E 7DC7 <CJK>
+653F 7DBD <CJK>
+6540 7DAB <CJK>
+6541 7E3D <CJK>
+6542 7DA2 <CJK>
+6543 7DAF <CJK>
+6544 7DDC <CJK>
+6545 7DB8 <CJK>
+6546 7D9F <CJK>
+6547 7DB0 <CJK>
+6548 7DD8 <CJK>
+6549 7DDD <CJK>
+654A 7DE4 <CJK>
+654B 7DDE <CJK>
+654C 7DFB <CJK>
+654D 7DF2 <CJK>
+654E 7DE1 <CJK>
+654F 7E05 <CJK>
+6550 7E0A <CJK>
+6551 7E23 <CJK>
+6552 7E21 <CJK>
+6553 7E12 <CJK>
+6554 7E31 <CJK>
+6555 7E1F <CJK>
+6556 7E09 <CJK>
+6557 7E0B <CJK>
+6558 7E22 <CJK>
+6559 7E46 <CJK>
+655A 7E66 <CJK>
+655B 7E3B <CJK>
+655C 7E35 <CJK>
+655D 7E39 <CJK>
+655E 7E43 <CJK>
+655F 7E37 <CJK>
+6560 7E32 <CJK>
+6561 7E3A <CJK>
+6562 7E67 <CJK>
+6563 7E5D <CJK>
+6564 7E56 <CJK>
+6565 7E5E <CJK>
+6566 7E59 <CJK>
+6567 7E5A <CJK>
+6568 7E79 <CJK>
+6569 7E6A <CJK>
+656A 7E69 <CJK>
+656B 7E7C <CJK>
+656C 7E7B <CJK>
+656D 7E83 <CJK>
+656E 7DD5 <CJK>
+656F 7E7D <CJK>
+6570 8FAE <CJK>
+6571 7E7F <CJK>
+6572 7E88 <CJK>
+6573 7E89 <CJK>
+6574 7E8C <CJK>
+6575 7E92 <CJK>
+6576 7E90 <CJK>
+6577 7E93 <CJK>
+6578 7E94 <CJK>
+6579 7E96 <CJK>
+657A 7E8E <CJK>
+657B 7E9B <CJK>
+657C 7E9C <CJK>
+657D 7F38 <CJK>
+657E 7F3A <CJK>
+6621 7F45 <CJK>
+6622 7F4C <CJK>
+6623 7F4D <CJK>
+6624 7F4E <CJK>
+6625 7F50 <CJK>
+6626 7F51 <CJK>
+6627 7F55 <CJK>
+6628 7F54 <CJK>
+6629 7F58 <CJK>
+662A 7F5F <CJK>
+662B 7F60 <CJK>
+662C 7F68 <CJK>
+662D 7F69 <CJK>
+662E 7F67 <CJK>
+662F 7F78 <CJK>
+6630 7F82 <CJK>
+6631 7F86 <CJK>
+6632 7F83 <CJK>
+6633 7F88 <CJK>
+6634 7F87 <CJK>
+6635 7F8C <CJK>
+6636 7F94 <CJK>
+6637 7F9E <CJK>
+6638 7F9D <CJK>
+6639 7F9A <CJK>
+663A 7FA3 <CJK>
+663B 7FAF <CJK>
+663C 7FB2 <CJK>
+663D 7FB9 <CJK>
+663E 7FAE <CJK>
+663F 7FB6 <CJK>
+6640 7FB8 <CJK>
+6641 8B71 <CJK>
+6642 7FC5 <CJK>
+6643 7FC6 <CJK>
+6644 7FCA <CJK>
+6645 7FD5 <CJK>
+6646 7FD4 <CJK>
+6647 7FE1 <CJK>
+6648 7FE6 <CJK>
+6649 7FE9 <CJK>
+664A 7FF3 <CJK>
+664B 7FF9 <CJK>
+664C 98DC <CJK>
+664D 8006 <CJK>
+664E 8004 <CJK>
+664F 800B <CJK>
+6650 8012 <CJK>
+6651 8018 <CJK>
+6652 8019 <CJK>
+6653 801C <CJK>
+6654 8021 <CJK>
+6655 8028 <CJK>
+6656 803F <CJK>
+6657 803B <CJK>
+6658 804A <CJK>
+6659 8046 <CJK>
+665A 8052 <CJK>
+665B 8058 <CJK>
+665C 805A <CJK>
+665D 805F <CJK>
+665E 8062 <CJK>
+665F 8068 <CJK>
+6660 8073 <CJK>
+6661 8072 <CJK>
+6662 8070 <CJK>
+6663 8076 <CJK>
+6664 8079 <CJK>
+6665 807D <CJK>
+6666 807F <CJK>
+6667 8084 <CJK>
+6668 8086 <CJK>
+6669 8085 <CJK>
+666A 809B <CJK>
+666B 8093 <CJK>
+666C 809A <CJK>
+666D 80AD <CJK>
+666E 5190 <CJK>
+666F 80AC <CJK>
+6670 80DB <CJK>
+6671 80E5 <CJK>
+6672 80D9 <CJK>
+6673 80DD <CJK>
+6674 80C4 <CJK>
+6675 80DA <CJK>
+6676 80D6 <CJK>
+6677 8109 <CJK>
+6678 80EF <CJK>
+6679 80F1 <CJK>
+667A 811B <CJK>
+667B 8129 <CJK>
+667C 8123 <CJK>
+667D 812F <CJK>
+667E 814B <CJK>
+6721 968B <CJK>
+6722 8146 <CJK>
+6723 813E <CJK>
+6724 8153 <CJK>
+6725 8151 <CJK>
+6726 80FC <CJK>
+6727 8171 <CJK>
+6728 816E <CJK>
+6729 8165 <CJK>
+672A 8166 <CJK>
+672B 8174 <CJK>
+672C 8183 <CJK>
+672D 8188 <CJK>
+672E 818A <CJK>
+672F 8180 <CJK>
+6730 8182 <CJK>
+6731 81A0 <CJK>
+6732 8195 <CJK>
+6733 81A4 <CJK>
+6734 81A3 <CJK>
+6735 815F <CJK>
+6736 8193 <CJK>
+6737 81A9 <CJK>
+6738 81B0 <CJK>
+6739 81B5 <CJK>
+673A 81BE <CJK>
+673B 81B8 <CJK>
+673C 81BD <CJK>
+673D 81C0 <CJK>
+673E 81C2 <CJK>
+673F 81BA <CJK>
+6740 81C9 <CJK>
+6741 81CD <CJK>
+6742 81D1 <CJK>
+6743 81D9 <CJK>
+6744 81D8 <CJK>
+6745 81C8 <CJK>
+6746 81DA <CJK>
+6747 81DF <CJK>
+6748 81E0 <CJK>
+6749 81E7 <CJK>
+674A 81FA <CJK>
+674B 81FB <CJK>
+674C 81FE <CJK>
+674D 8201 <CJK>
+674E 8202 <CJK>
+674F 8205 <CJK>
+6750 8207 <CJK>
+6751 820A <CJK>
+6752 820D <CJK>
+6753 8210 <CJK>
+6754 8216 <CJK>
+6755 8229 <CJK>
+6756 822B <CJK>
+6757 8238 <CJK>
+6758 8233 <CJK>
+6759 8240 <CJK>
+675A 8259 <CJK>
+675B 8258 <CJK>
+675C 825D <CJK>
+675D 825A <CJK>
+675E 825F <CJK>
+675F 8264 <CJK>
+6760 8262 <CJK>
+6761 8268 <CJK>
+6762 826A <CJK>
+6763 826B <CJK>
+6764 822E <CJK>
+6765 8271 <CJK>
+6766 8277 <CJK>
+6767 8278 <CJK>
+6768 827E <CJK>
+6769 828D <CJK>
+676A 8292 <CJK>
+676B 82AB <CJK>
+676C 829F <CJK>
+676D 82BB <CJK>
+676E 82AC <CJK>
+676F 82E1 <CJK>
+6770 82E3 <CJK>
+6771 82DF <CJK>
+6772 82D2 <CJK>
+6773 82F4 <CJK>
+6774 82F3 <CJK>
+6775 82FA <CJK>
+6776 8393 <CJK>
+6777 8303 <CJK>
+6778 82FB <CJK>
+6779 82F9 <CJK>
+677A 82DE <CJK>
+677B 8306 <CJK>
+677C 82DC <CJK>
+677D 8309 <CJK>
+677E 82D9 <CJK>
+6821 8335 <CJK>
+6822 8334 <CJK>
+6823 8316 <CJK>
+6824 8332 <CJK>
+6825 8331 <CJK>
+6826 8340 <CJK>
+6827 8339 <CJK>
+6828 8350 <CJK>
+6829 8345 <CJK>
+682A 832F <CJK>
+682B 832B <CJK>
+682C 8317 <CJK>
+682D 8318 <CJK>
+682E 8385 <CJK>
+682F 839A <CJK>
+6830 83AA <CJK>
+6831 839F <CJK>
+6832 83A2 <CJK>
+6833 8396 <CJK>
+6834 8323 <CJK>
+6835 838E <CJK>
+6836 8387 <CJK>
+6837 838A <CJK>
+6838 837C <CJK>
+6839 83B5 <CJK>
+683A 8373 <CJK>
+683B 8375 <CJK>
+683C 83A0 <CJK>
+683D 8389 <CJK>
+683E 83A8 <CJK>
+683F 83F4 <CJK>
+6840 8413 <CJK>
+6841 83EB <CJK>
+6842 83CE <CJK>
+6843 83FD <CJK>
+6844 8403 <CJK>
+6845 83D8 <CJK>
+6846 840B <CJK>
+6847 83C1 <CJK>
+6848 83F7 <CJK>
+6849 8407 <CJK>
+684A 83E0 <CJK>
+684B 83F2 <CJK>
+684C 840D <CJK>
+684D 8422 <CJK>
+684E 8420 <CJK>
+684F 83BD <CJK>
+6850 8438 <CJK>
+6851 8506 <CJK>
+6852 83FB <CJK>
+6853 846D <CJK>
+6854 842A <CJK>
+6855 843C <CJK>
+6856 855A <CJK>
+6857 8484 <CJK>
+6858 8477 <CJK>
+6859 846B <CJK>
+685A 84AD <CJK>
+685B 846E <CJK>
+685C 8482 <CJK>
+685D 8469 <CJK>
+685E 8446 <CJK>
+685F 842C <CJK>
+6860 846F <CJK>
+6861 8479 <CJK>
+6862 8435 <CJK>
+6863 84CA <CJK>
+6864 8462 <CJK>
+6865 84B9 <CJK>
+6866 84BF <CJK>
+6867 849F <CJK>
+6868 84D9 <CJK>
+6869 84CD <CJK>
+686A 84BB <CJK>
+686B 84DA <CJK>
+686C 84D0 <CJK>
+686D 84C1 <CJK>
+686E 84C6 <CJK>
+686F 84D6 <CJK>
+6870 84A1 <CJK>
+6871 8521 <CJK>
+6872 84FF <CJK>
+6873 84F4 <CJK>
+6874 8517 <CJK>
+6875 8518 <CJK>
+6876 852C <CJK>
+6877 851F <CJK>
+6878 8515 <CJK>
+6879 8514 <CJK>
+687A 84FC <CJK>
+687B 8540 <CJK>
+687C 8563 <CJK>
+687D 8558 <CJK>
+687E 8548 <CJK>
+6921 8541 <CJK>
+6922 8602 <CJK>
+6923 854B <CJK>
+6924 8555 <CJK>
+6925 8580 <CJK>
+6926 85A4 <CJK>
+6927 8588 <CJK>
+6928 8591 <CJK>
+6929 858A <CJK>
+692A 85A8 <CJK>
+692B 856D <CJK>
+692C 8594 <CJK>
+692D 859B <CJK>
+692E 85EA <CJK>
+692F 8587 <CJK>
+6930 859C <CJK>
+6931 8577 <CJK>
+6932 857E <CJK>
+6933 8590 <CJK>
+6934 85C9 <CJK>
+6935 85BA <CJK>
+6936 85CF <CJK>
+6937 85B9 <CJK>
+6938 85D0 <CJK>
+6939 85D5 <CJK>
+693A 85DD <CJK>
+693B 85E5 <CJK>
+693C 85DC <CJK>
+693D 85F9 <CJK>
+693E 860A <CJK>
+693F 8613 <CJK>
+6940 860B <CJK>
+6941 85FE <CJK>
+6942 85FA <CJK>
+6943 8606 <CJK>
+6944 8622 <CJK>
+6945 861A <CJK>
+6946 8630 <CJK>
+6947 863F <CJK>
+6948 864D <CJK>
+6949 4E55 <CJK>
+694A 8654 <CJK>
+694B 865F <CJK>
+694C 8667 <CJK>
+694D 8671 <CJK>
+694E 8693 <CJK>
+694F 86A3 <CJK>
+6950 86A9 <CJK>
+6951 86AA <CJK>
+6952 868B <CJK>
+6953 868C <CJK>
+6954 86B6 <CJK>
+6955 86AF <CJK>
+6956 86C4 <CJK>
+6957 86C6 <CJK>
+6958 86B0 <CJK>
+6959 86C9 <CJK>
+695A 8823 <CJK>
+695B 86AB <CJK>
+695C 86D4 <CJK>
+695D 86DE <CJK>
+695E 86E9 <CJK>
+695F 86EC <CJK>
+6960 86DF <CJK>
+6961 86DB <CJK>
+6962 86EF <CJK>
+6963 8712 <CJK>
+6964 8706 <CJK>
+6965 8708 <CJK>
+6966 8700 <CJK>
+6967 8703 <CJK>
+6968 86FB <CJK>
+6969 8711 <CJK>
+696A 8709 <CJK>
+696B 870D <CJK>
+696C 86F9 <CJK>
+696D 870A <CJK>
+696E 8734 <CJK>
+696F 873F <CJK>
+6970 8737 <CJK>
+6971 873B <CJK>
+6972 8725 <CJK>
+6973 8729 <CJK>
+6974 871A <CJK>
+6975 8760 <CJK>
+6976 875F <CJK>
+6977 8778 <CJK>
+6978 874C <CJK>
+6979 874E <CJK>
+697A 8774 <CJK>
+697B 8757 <CJK>
+697C 8768 <CJK>
+697D 876E <CJK>
+697E 8759 <CJK>
+6A21 8753 <CJK>
+6A22 8763 <CJK>
+6A23 876A <CJK>
+6A24 8805 <CJK>
+6A25 87A2 <CJK>
+6A26 879F <CJK>
+6A27 8782 <CJK>
+6A28 87AF <CJK>
+6A29 87CB <CJK>
+6A2A 87BD <CJK>
+6A2B 87C0 <CJK>
+6A2C 87D0 <CJK>
+6A2D 96D6 <CJK>
+6A2E 87AB <CJK>
+6A2F 87C4 <CJK>
+6A30 87B3 <CJK>
+6A31 87C7 <CJK>
+6A32 87C6 <CJK>
+6A33 87BB <CJK>
+6A34 87EF <CJK>
+6A35 87F2 <CJK>
+6A36 87E0 <CJK>
+6A37 880F <CJK>
+6A38 880D <CJK>
+6A39 87FE <CJK>
+6A3A 87F6 <CJK>
+6A3B 87F7 <CJK>
+6A3C 880E <CJK>
+6A3D 87D2 <CJK>
+6A3E 8811 <CJK>
+6A3F 8816 <CJK>
+6A40 8815 <CJK>
+6A41 8822 <CJK>
+6A42 8821 <CJK>
+6A43 8831 <CJK>
+6A44 8836 <CJK>
+6A45 8839 <CJK>
+6A46 8827 <CJK>
+6A47 883B <CJK>
+6A48 8844 <CJK>
+6A49 8842 <CJK>
+6A4A 8852 <CJK>
+6A4B 8859 <CJK>
+6A4C 885E <CJK>
+6A4D 8862 <CJK>
+6A4E 886B <CJK>
+6A4F 8881 <CJK>
+6A50 887E <CJK>
+6A51 889E <CJK>
+6A52 8875 <CJK>
+6A53 887D <CJK>
+6A54 88B5 <CJK>
+6A55 8872 <CJK>
+6A56 8882 <CJK>
+6A57 8897 <CJK>
+6A58 8892 <CJK>
+6A59 88AE <CJK>
+6A5A 8899 <CJK>
+6A5B 88A2 <CJK>
+6A5C 888D <CJK>
+6A5D 88A4 <CJK>
+6A5E 88B0 <CJK>
+6A5F 88BF <CJK>
+6A60 88B1 <CJK>
+6A61 88C3 <CJK>
+6A62 88C4 <CJK>
+6A63 88D4 <CJK>
+6A64 88D8 <CJK>
+6A65 88D9 <CJK>
+6A66 88DD <CJK>
+6A67 88F9 <CJK>
+6A68 8902 <CJK>
+6A69 88FC <CJK>
+6A6A 88F4 <CJK>
+6A6B 88E8 <CJK>
+6A6C 88F2 <CJK>
+6A6D 8904 <CJK>
+6A6E 890C <CJK>
+6A6F 890A <CJK>
+6A70 8913 <CJK>
+6A71 8943 <CJK>
+6A72 891E <CJK>
+6A73 8925 <CJK>
+6A74 892A <CJK>
+6A75 892B <CJK>
+6A76 8941 <CJK>
+6A77 8944 <CJK>
+6A78 893B <CJK>
+6A79 8936 <CJK>
+6A7A 8938 <CJK>
+6A7B 894C <CJK>
+6A7C 891D <CJK>
+6A7D 8960 <CJK>
+6A7E 895E <CJK>
+6B21 8966 <CJK>
+6B22 8964 <CJK>
+6B23 896D <CJK>
+6B24 896A <CJK>
+6B25 896F <CJK>
+6B26 8974 <CJK>
+6B27 8977 <CJK>
+6B28 897E <CJK>
+6B29 8983 <CJK>
+6B2A 8988 <CJK>
+6B2B 898A <CJK>
+6B2C 8993 <CJK>
+6B2D 8998 <CJK>
+6B2E 89A1 <CJK>
+6B2F 89A9 <CJK>
+6B30 89A6 <CJK>
+6B31 89AC <CJK>
+6B32 89AF <CJK>
+6B33 89B2 <CJK>
+6B34 89BA <CJK>
+6B35 89BD <CJK>
+6B36 89BF <CJK>
+6B37 89C0 <CJK>
+6B38 89DA <CJK>
+6B39 89DC <CJK>
+6B3A 89DD <CJK>
+6B3B 89E7 <CJK>
+6B3C 89F4 <CJK>
+6B3D 89F8 <CJK>
+6B3E 8A03 <CJK>
+6B3F 8A16 <CJK>
+6B40 8A10 <CJK>
+6B41 8A0C <CJK>
+6B42 8A1B <CJK>
+6B43 8A1D <CJK>
+6B44 8A25 <CJK>
+6B45 8A36 <CJK>
+6B46 8A41 <CJK>
+6B47 8A5B <CJK>
+6B48 8A52 <CJK>
+6B49 8A46 <CJK>
+6B4A 8A48 <CJK>
+6B4B 8A7C <CJK>
+6B4C 8A6D <CJK>
+6B4D 8A6C <CJK>
+6B4E 8A62 <CJK>
+6B4F 8A85 <CJK>
+6B50 8A82 <CJK>
+6B51 8A84 <CJK>
+6B52 8AA8 <CJK>
+6B53 8AA1 <CJK>
+6B54 8A91 <CJK>
+6B55 8AA5 <CJK>
+6B56 8AA6 <CJK>
+6B57 8A9A <CJK>
+6B58 8AA3 <CJK>
+6B59 8AC4 <CJK>
+6B5A 8ACD <CJK>
+6B5B 8AC2 <CJK>
+6B5C 8ADA <CJK>
+6B5D 8AEB <CJK>
+6B5E 8AF3 <CJK>
+6B5F 8AE7 <CJK>
+6B60 8AE4 <CJK>
+6B61 8AF1 <CJK>
+6B62 8B14 <CJK>
+6B63 8AE0 <CJK>
+6B64 8AE2 <CJK>
+6B65 8AF7 <CJK>
+6B66 8ADE <CJK>
+6B67 8ADB <CJK>
+6B68 8B0C <CJK>
+6B69 8B07 <CJK>
+6B6A 8B1A <CJK>
+6B6B 8AE1 <CJK>
+6B6C 8B16 <CJK>
+6B6D 8B10 <CJK>
+6B6E 8B17 <CJK>
+6B6F 8B20 <CJK>
+6B70 8B33 <CJK>
+6B71 97AB <CJK>
+6B72 8B26 <CJK>
+6B73 8B2B <CJK>
+6B74 8B3E <CJK>
+6B75 8B28 <CJK>
+6B76 8B41 <CJK>
+6B77 8B4C <CJK>
+6B78 8B4F <CJK>
+6B79 8B4E <CJK>
+6B7A 8B49 <CJK>
+6B7B 8B56 <CJK>
+6B7C 8B5B <CJK>
+6B7D 8B5A <CJK>
+6B7E 8B6B <CJK>
+6C21 8B5F <CJK>
+6C22 8B6C <CJK>
+6C23 8B6F <CJK>
+6C24 8B74 <CJK>
+6C25 8B7D <CJK>
+6C26 8B80 <CJK>
+6C27 8B8C <CJK>
+6C28 8B8E <CJK>
+6C29 8B92 <CJK>
+6C2A 8B93 <CJK>
+6C2B 8B96 <CJK>
+6C2C 8B99 <CJK>
+6C2D 8B9A <CJK>
+6C2E 8C3A <CJK>
+6C2F 8C41 <CJK>
+6C30 8C3F <CJK>
+6C31 8C48 <CJK>
+6C32 8C4C <CJK>
+6C33 8C4E <CJK>
+6C34 8C50 <CJK>
+6C35 8C55 <CJK>
+6C36 8C62 <CJK>
+6C37 8C6C <CJK>
+6C38 8C78 <CJK>
+6C39 8C7A <CJK>
+6C3A 8C82 <CJK>
+6C3B 8C89 <CJK>
+6C3C 8C85 <CJK>
+6C3D 8C8A <CJK>
+6C3E 8C8D <CJK>
+6C3F 8C8E <CJK>
+6C40 8C94 <CJK>
+6C41 8C7C <CJK>
+6C42 8C98 <CJK>
+6C43 621D <CJK>
+6C44 8CAD <CJK>
+6C45 8CAA <CJK>
+6C46 8CBD <CJK>
+6C47 8CB2 <CJK>
+6C48 8CB3 <CJK>
+6C49 8CAE <CJK>
+6C4A 8CB6 <CJK>
+6C4B 8CC8 <CJK>
+6C4C 8CC1 <CJK>
+6C4D 8CE4 <CJK>
+6C4E 8CE3 <CJK>
+6C4F 8CDA <CJK>
+6C50 8CFD <CJK>
+6C51 8CFA <CJK>
+6C52 8CFB <CJK>
+6C53 8D04 <CJK>
+6C54 8D05 <CJK>
+6C55 8D0A <CJK>
+6C56 8D07 <CJK>
+6C57 8D0F <CJK>
+6C58 8D0D <CJK>
+6C59 8D10 <CJK>
+6C5A 9F4E <CJK>
+6C5B 8D13 <CJK>
+6C5C 8CCD <CJK>
+6C5D 8D14 <CJK>
+6C5E 8D16 <CJK>
+6C5F 8D67 <CJK>
+6C60 8D6D <CJK>
+6C61 8D71 <CJK>
+6C62 8D73 <CJK>
+6C63 8D81 <CJK>
+6C64 8D99 <CJK>
+6C65 8DC2 <CJK>
+6C66 8DBE <CJK>
+6C67 8DBA <CJK>
+6C68 8DCF <CJK>
+6C69 8DDA <CJK>
+6C6A 8DD6 <CJK>
+6C6B 8DCC <CJK>
+6C6C 8DDB <CJK>
+6C6D 8DCB <CJK>
+6C6E 8DEA <CJK>
+6C6F 8DEB <CJK>
+6C70 8DDF <CJK>
+6C71 8DE3 <CJK>
+6C72 8DFC <CJK>
+6C73 8E08 <CJK>
+6C74 8E09 <CJK>
+6C75 8DFF <CJK>
+6C76 8E1D <CJK>
+6C77 8E1E <CJK>
+6C78 8E10 <CJK>
+6C79 8E1F <CJK>
+6C7A 8E42 <CJK>
+6C7B 8E35 <CJK>
+6C7C 8E30 <CJK>
+6C7D 8E34 <CJK>
+6C7E 8E4A <CJK>
+6D21 8E47 <CJK>
+6D22 8E49 <CJK>
+6D23 8E4C <CJK>
+6D24 8E50 <CJK>
+6D25 8E48 <CJK>
+6D26 8E59 <CJK>
+6D27 8E64 <CJK>
+6D28 8E60 <CJK>
+6D29 8E2A <CJK>
+6D2A 8E63 <CJK>
+6D2B 8E55 <CJK>
+6D2C 8E76 <CJK>
+6D2D 8E72 <CJK>
+6D2E 8E7C <CJK>
+6D2F 8E81 <CJK>
+6D30 8E87 <CJK>
+6D31 8E85 <CJK>
+6D32 8E84 <CJK>
+6D33 8E8B <CJK>
+6D34 8E8A <CJK>
+6D35 8E93 <CJK>
+6D36 8E91 <CJK>
+6D37 8E94 <CJK>
+6D38 8E99 <CJK>
+6D39 8EAA <CJK>
+6D3A 8EA1 <CJK>
+6D3B 8EAC <CJK>
+6D3C 8EB0 <CJK>
+6D3D 8EC6 <CJK>
+6D3E 8EB1 <CJK>
+6D3F 8EBE <CJK>
+6D40 8EC5 <CJK>
+6D41 8EC8 <CJK>
+6D42 8ECB <CJK>
+6D43 8EDB <CJK>
+6D44 8EE3 <CJK>
+6D45 8EFC <CJK>
+6D46 8EFB <CJK>
+6D47 8EEB <CJK>
+6D48 8EFE <CJK>
+6D49 8F0A <CJK>
+6D4A 8F05 <CJK>
+6D4B 8F15 <CJK>
+6D4C 8F12 <CJK>
+6D4D 8F19 <CJK>
+6D4E 8F13 <CJK>
+6D4F 8F1C <CJK>
+6D50 8F1F <CJK>
+6D51 8F1B <CJK>
+6D52 8F0C <CJK>
+6D53 8F26 <CJK>
+6D54 8F33 <CJK>
+6D55 8F3B <CJK>
+6D56 8F39 <CJK>
+6D57 8F45 <CJK>
+6D58 8F42 <CJK>
+6D59 8F3E <CJK>
+6D5A 8F4C <CJK>
+6D5B 8F49 <CJK>
+6D5C 8F46 <CJK>
+6D5D 8F4E <CJK>
+6D5E 8F57 <CJK>
+6D5F 8F5C <CJK>
+6D60 8F62 <CJK>
+6D61 8F63 <CJK>
+6D62 8F64 <CJK>
+6D63 8F9C <CJK>
+6D64 8F9F <CJK>
+6D65 8FA3 <CJK>
+6D66 8FAD <CJK>
+6D67 8FAF <CJK>
+6D68 8FB7 <CJK>
+6D69 8FDA <CJK>
+6D6A 8FE5 <CJK>
+6D6B 8FE2 <CJK>
+6D6C 8FEA <CJK>
+6D6D 8FEF <CJK>
+6D6E 9087 <CJK>
+6D6F 8FF4 <CJK>
+6D70 9005 <CJK>
+6D71 8FF9 <CJK>
+6D72 8FFA <CJK>
+6D73 9011 <CJK>
+6D74 9015 <CJK>
+6D75 9021 <CJK>
+6D76 900D <CJK>
+6D77 901E <CJK>
+6D78 9016 <CJK>
+6D79 900B <CJK>
+6D7A 9027 <CJK>
+6D7B 9036 <CJK>
+6D7C 9035 <CJK>
+6D7D 9039 <CJK>
+6D7E 8FF8 <CJK>
+6E21 904F <CJK>
+6E22 9050 <CJK>
+6E23 9051 <CJK>
+6E24 9052 <CJK>
+6E25 900E <CJK>
+6E26 9049 <CJK>
+6E27 903E <CJK>
+6E28 9056 <CJK>
+6E29 9058 <CJK>
+6E2A 905E <CJK>
+6E2B 9068 <CJK>
+6E2C 906F <CJK>
+6E2D 9076 <CJK>
+6E2E 96A8 <CJK>
+6E2F 9072 <CJK>
+6E30 9082 <CJK>
+6E31 907D <CJK>
+6E32 9081 <CJK>
+6E33 9080 <CJK>
+6E34 908A <CJK>
+6E35 9089 <CJK>
+6E36 908F <CJK>
+6E37 90A8 <CJK>
+6E38 90AF <CJK>
+6E39 90B1 <CJK>
+6E3A 90B5 <CJK>
+6E3B 90E2 <CJK>
+6E3C 90E4 <CJK>
+6E3D 6248 <CJK>
+6E3E 90DB <CJK>
+6E3F 9102 <CJK>
+6E40 9112 <CJK>
+6E41 9119 <CJK>
+6E42 9132 <CJK>
+6E43 9130 <CJK>
+6E44 914A <CJK>
+6E45 9156 <CJK>
+6E46 9158 <CJK>
+6E47 9163 <CJK>
+6E48 9165 <CJK>
+6E49 9169 <CJK>
+6E4A 9173 <CJK>
+6E4B 9172 <CJK>
+6E4C 918B <CJK>
+6E4D 9189 <CJK>
+6E4E 9182 <CJK>
+6E4F 91A2 <CJK>
+6E50 91AB <CJK>
+6E51 91AF <CJK>
+6E52 91AA <CJK>
+6E53 91B5 <CJK>
+6E54 91B4 <CJK>
+6E55 91BA <CJK>
+6E56 91C0 <CJK>
+6E57 91C1 <CJK>
+6E58 91C9 <CJK>
+6E59 91CB <CJK>
+6E5A 91D0 <CJK>
+6E5B 91D6 <CJK>
+6E5C 91DF <CJK>
+6E5D 91E1 <CJK>
+6E5E 91DB <CJK>
+6E5F 91FC <CJK>
+6E60 91F5 <CJK>
+6E61 91F6 <CJK>
+6E62 921E <CJK>
+6E63 91FF <CJK>
+6E64 9214 <CJK>
+6E65 922C <CJK>
+6E66 9215 <CJK>
+6E67 9211 <CJK>
+6E68 925E <CJK>
+6E69 9257 <CJK>
+6E6A 9245 <CJK>
+6E6B 9249 <CJK>
+6E6C 9264 <CJK>
+6E6D 9248 <CJK>
+6E6E 9295 <CJK>
+6E6F 923F <CJK>
+6E70 924B <CJK>
+6E71 9250 <CJK>
+6E72 929C <CJK>
+6E73 9296 <CJK>
+6E74 9293 <CJK>
+6E75 929B <CJK>
+6E76 925A <CJK>
+6E77 92CF <CJK>
+6E78 92B9 <CJK>
+6E79 92B7 <CJK>
+6E7A 92E9 <CJK>
+6E7B 930F <CJK>
+6E7C 92FA <CJK>
+6E7D 9344 <CJK>
+6E7E 932E <CJK>
+6F21 9319 <CJK>
+6F22 9322 <CJK>
+6F23 931A <CJK>
+6F24 9323 <CJK>
+6F25 933A <CJK>
+6F26 9335 <CJK>
+6F27 933B <CJK>
+6F28 935C <CJK>
+6F29 9360 <CJK>
+6F2A 937C <CJK>
+6F2B 936E <CJK>
+6F2C 9356 <CJK>
+6F2D 93B0 <CJK>
+6F2E 93AC <CJK>
+6F2F 93AD <CJK>
+6F30 9394 <CJK>
+6F31 93B9 <CJK>
+6F32 93D6 <CJK>
+6F33 93D7 <CJK>
+6F34 93E8 <CJK>
+6F35 93E5 <CJK>
+6F36 93D8 <CJK>
+6F37 93C3 <CJK>
+6F38 93DD <CJK>
+6F39 93D0 <CJK>
+6F3A 93C8 <CJK>
+6F3B 93E4 <CJK>
+6F3C 941A <CJK>
+6F3D 9414 <CJK>
+6F3E 9413 <CJK>
+6F3F 9403 <CJK>
+6F40 9407 <CJK>
+6F41 9410 <CJK>
+6F42 9436 <CJK>
+6F43 942B <CJK>
+6F44 9435 <CJK>
+6F45 9421 <CJK>
+6F46 943A <CJK>
+6F47 9441 <CJK>
+6F48 9452 <CJK>
+6F49 9444 <CJK>
+6F4A 945B <CJK>
+6F4B 9460 <CJK>
+6F4C 9462 <CJK>
+6F4D 945E <CJK>
+6F4E 946A <CJK>
+6F4F 9229 <CJK>
+6F50 9470 <CJK>
+6F51 9475 <CJK>
+6F52 9477 <CJK>
+6F53 947D <CJK>
+6F54 945A <CJK>
+6F55 947C <CJK>
+6F56 947E <CJK>
+6F57 9481 <CJK>
+6F58 947F <CJK>
+6F59 9582 <CJK>
+6F5A 9587 <CJK>
+6F5B 958A <CJK>
+6F5C 9594 <CJK>
+6F5D 9596 <CJK>
+6F5E 9598 <CJK>
+6F5F 9599 <CJK>
+6F60 95A0 <CJK>
+6F61 95A8 <CJK>
+6F62 95A7 <CJK>
+6F63 95AD <CJK>
+6F64 95BC <CJK>
+6F65 95BB <CJK>
+6F66 95B9 <CJK>
+6F67 95BE <CJK>
+6F68 95CA <CJK>
+6F69 6FF6 <CJK>
+6F6A 95C3 <CJK>
+6F6B 95CD <CJK>
+6F6C 95CC <CJK>
+6F6D 95D5 <CJK>
+6F6E 95D4 <CJK>
+6F6F 95D6 <CJK>
+6F70 95DC <CJK>
+6F71 95E1 <CJK>
+6F72 95E5 <CJK>
+6F73 95E2 <CJK>
+6F74 9621 <CJK>
+6F75 9628 <CJK>
+6F76 962E <CJK>
+6F77 962F <CJK>
+6F78 9642 <CJK>
+6F79 964C <CJK>
+6F7A 964F <CJK>
+6F7B 964B <CJK>
+6F7C 9677 <CJK>
+6F7D 965C <CJK>
+6F7E 965E <CJK>
+7021 965D <CJK>
+7022 965F <CJK>
+7023 9666 <CJK>
+7024 9672 <CJK>
+7025 966C <CJK>
+7026 968D <CJK>
+7027 9698 <CJK>
+7028 9695 <CJK>
+7029 9697 <CJK>
+702A 96AA <CJK>
+702B 96A7 <CJK>
+702C 96B1 <CJK>
+702D 96B2 <CJK>
+702E 96B0 <CJK>
+702F 96B4 <CJK>
+7030 96B6 <CJK>
+7031 96B8 <CJK>
+7032 96B9 <CJK>
+7033 96CE <CJK>
+7034 96CB <CJK>
+7035 96C9 <CJK>
+7036 96CD <CJK>
+7037 894D <CJK>
+7038 96DC <CJK>
+7039 970D <CJK>
+703A 96D5 <CJK>
+703B 96F9 <CJK>
+703C 9704 <CJK>
+703D 9706 <CJK>
+703E 9708 <CJK>
+703F 9713 <CJK>
+7040 970E <CJK>
+7041 9711 <CJK>
+7042 970F <CJK>
+7043 9716 <CJK>
+7044 9719 <CJK>
+7045 9724 <CJK>
+7046 972A <CJK>
+7047 9730 <CJK>
+7048 9739 <CJK>
+7049 973D <CJK>
+704A 973E <CJK>
+704B 9744 <CJK>
+704C 9746 <CJK>
+704D 9748 <CJK>
+704E 9742 <CJK>
+704F 9749 <CJK>
+7050 975C <CJK>
+7051 9760 <CJK>
+7052 9764 <CJK>
+7053 9766 <CJK>
+7054 9768 <CJK>
+7055 52D2 <CJK>
+7056 976B <CJK>
+7057 9771 <CJK>
+7058 9779 <CJK>
+7059 9785 <CJK>
+705A 977C <CJK>
+705B 9781 <CJK>
+705C 977A <CJK>
+705D 9786 <CJK>
+705E 978B <CJK>
+705F 978F <CJK>
+7060 9790 <CJK>
+7061 979C <CJK>
+7062 97A8 <CJK>
+7063 97A6 <CJK>
+7064 97A3 <CJK>
+7065 97B3 <CJK>
+7066 97B4 <CJK>
+7067 97C3 <CJK>
+7068 97C6 <CJK>
+7069 97C8 <CJK>
+706A 97CB <CJK>
+706B 97DC <CJK>
+706C 97ED <CJK>
+706D 9F4F <CJK>
+706E 97F2 <CJK>
+706F 7ADF <CJK>
+7070 97F6 <CJK>
+7071 97F5 <CJK>
+7072 980F <CJK>
+7073 980C <CJK>
+7074 9838 <CJK>
+7075 9824 <CJK>
+7076 9821 <CJK>
+7077 9837 <CJK>
+7078 983D <CJK>
+7079 9846 <CJK>
+707A 984F <CJK>
+707B 984B <CJK>
+707C 986B <CJK>
+707D 986F <CJK>
+707E 9870 <CJK>
+7121 9871 <CJK>
+7122 9874 <CJK>
+7123 9873 <CJK>
+7124 98AA <CJK>
+7125 98AF <CJK>
+7126 98B1 <CJK>
+7127 98B6 <CJK>
+7128 98C4 <CJK>
+7129 98C3 <CJK>
+712A 98C6 <CJK>
+712B 98E9 <CJK>
+712C 98EB <CJK>
+712D 9903 <CJK>
+712E 9909 <CJK>
+712F 9912 <CJK>
+7130 9914 <CJK>
+7131 9918 <CJK>
+7132 9921 <CJK>
+7133 991D <CJK>
+7134 991E <CJK>
+7135 9924 <CJK>
+7136 9920 <CJK>
+7137 992C <CJK>
+7138 992E <CJK>
+7139 993D <CJK>
+713A 993E <CJK>
+713B 9942 <CJK>
+713C 9949 <CJK>
+713D 9945 <CJK>
+713E 9950 <CJK>
+713F 994B <CJK>
+7140 9951 <CJK>
+7141 9952 <CJK>
+7142 994C <CJK>
+7143 9955 <CJK>
+7144 9997 <CJK>
+7145 9998 <CJK>
+7146 99A5 <CJK>
+7147 99AD <CJK>
+7148 99AE <CJK>
+7149 99BC <CJK>
+714A 99DF <CJK>
+714B 99DB <CJK>
+714C 99DD <CJK>
+714D 99D8 <CJK>
+714E 99D1 <CJK>
+714F 99ED <CJK>
+7150 99EE <CJK>
+7151 99F1 <CJK>
+7152 99F2 <CJK>
+7153 99FB <CJK>
+7154 99F8 <CJK>
+7155 9A01 <CJK>
+7156 9A0F <CJK>
+7157 9A05 <CJK>
+7158 99E2 <CJK>
+7159 9A19 <CJK>
+715A 9A2B <CJK>
+715B 9A37 <CJK>
+715C 9A45 <CJK>
+715D 9A42 <CJK>
+715E 9A40 <CJK>
+715F 9A43 <CJK>
+7160 9A3E <CJK>
+7161 9A55 <CJK>
+7162 9A4D <CJK>
+7163 9A5B <CJK>
+7164 9A57 <CJK>
+7165 9A5F <CJK>
+7166 9A62 <CJK>
+7167 9A65 <CJK>
+7168 9A64 <CJK>
+7169 9A69 <CJK>
+716A 9A6B <CJK>
+716B 9A6A <CJK>
+716C 9AAD <CJK>
+716D 9AB0 <CJK>
+716E 9ABC <CJK>
+716F 9AC0 <CJK>
+7170 9ACF <CJK>
+7171 9AD1 <CJK>
+7172 9AD3 <CJK>
+7173 9AD4 <CJK>
+7174 9ADE <CJK>
+7175 9ADF <CJK>
+7176 9AE2 <CJK>
+7177 9AE3 <CJK>
+7178 9AE6 <CJK>
+7179 9AEF <CJK>
+717A 9AEB <CJK>
+717B 9AEE <CJK>
+717C 9AF4 <CJK>
+717D 9AF1 <CJK>
+717E 9AF7 <CJK>
+7221 9AFB <CJK>
+7222 9B06 <CJK>
+7223 9B18 <CJK>
+7224 9B1A <CJK>
+7225 9B1F <CJK>
+7226 9B22 <CJK>
+7227 9B23 <CJK>
+7228 9B25 <CJK>
+7229 9B27 <CJK>
+722A 9B28 <CJK>
+722B 9B29 <CJK>
+722C 9B2A <CJK>
+722D 9B2E <CJK>
+722E 9B2F <CJK>
+722F 9B32 <CJK>
+7230 9B44 <CJK>
+7231 9B43 <CJK>
+7232 9B4F <CJK>
+7233 9B4D <CJK>
+7234 9B4E <CJK>
+7235 9B51 <CJK>
+7236 9B58 <CJK>
+7237 9B74 <CJK>
+7238 9B93 <CJK>
+7239 9B83 <CJK>
+723A 9B91 <CJK>
+723B 9B96 <CJK>
+723C 9B97 <CJK>
+723D 9B9F <CJK>
+723E 9BA0 <CJK>
+723F 9BA8 <CJK>
+7240 9BB4 <CJK>
+7241 9BC0 <CJK>
+7242 9BCA <CJK>
+7243 9BB9 <CJK>
+7244 9BC6 <CJK>
+7245 9BCF <CJK>
+7246 9BD1 <CJK>
+7247 9BD2 <CJK>
+7248 9BE3 <CJK>
+7249 9BE2 <CJK>
+724A 9BE4 <CJK>
+724B 9BD4 <CJK>
+724C 9BE1 <CJK>
+724D 9C3A <CJK>
+724E 9BF2 <CJK>
+724F 9BF1 <CJK>
+7250 9BF0 <CJK>
+7251 9C15 <CJK>
+7252 9C14 <CJK>
+7253 9C09 <CJK>
+7254 9C13 <CJK>
+7255 9C0C <CJK>
+7256 9C06 <CJK>
+7257 9C08 <CJK>
+7258 9C12 <CJK>
+7259 9C0A <CJK>
+725A 9C04 <CJK>
+725B 9C2E <CJK>
+725C 9C1B <CJK>
+725D 9C25 <CJK>
+725E 9C24 <CJK>
+725F 9C21 <CJK>
+7260 9C30 <CJK>
+7261 9C47 <CJK>
+7262 9C32 <CJK>
+7263 9C46 <CJK>
+7264 9C3E <CJK>
+7265 9C5A <CJK>
+7266 9C60 <CJK>
+7267 9C67 <CJK>
+7268 9C76 <CJK>
+7269 9C78 <CJK>
+726A 9CE7 <CJK>
+726B 9CEC <CJK>
+726C 9CF0 <CJK>
+726D 9D09 <CJK>
+726E 9D08 <CJK>
+726F 9CEB <CJK>
+7270 9D03 <CJK>
+7271 9D06 <CJK>
+7272 9D2A <CJK>
+7273 9D26 <CJK>
+7274 9DAF <CJK>
+7275 9D23 <CJK>
+7276 9D1F <CJK>
+7277 9D44 <CJK>
+7278 9D15 <CJK>
+7279 9D12 <CJK>
+727A 9D41 <CJK>
+727B 9D3F <CJK>
+727C 9D3E <CJK>
+727D 9D46 <CJK>
+727E 9D48 <CJK>
+7321 9D5D <CJK>
+7322 9D5E <CJK>
+7323 9D64 <CJK>
+7324 9D51 <CJK>
+7325 9D50 <CJK>
+7326 9D59 <CJK>
+7327 9D72 <CJK>
+7328 9D89 <CJK>
+7329 9D87 <CJK>
+732A 9DAB <CJK>
+732B 9D6F <CJK>
+732C 9D7A <CJK>
+732D 9D9A <CJK>
+732E 9DA4 <CJK>
+732F 9DA9 <CJK>
+7330 9DB2 <CJK>
+7331 9DC4 <CJK>
+7332 9DC1 <CJK>
+7333 9DBB <CJK>
+7334 9DB8 <CJK>
+7335 9DBA <CJK>
+7336 9DC6 <CJK>
+7337 9DCF <CJK>
+7338 9DC2 <CJK>
+7339 9DD9 <CJK>
+733A 9DD3 <CJK>
+733B 9DF8 <CJK>
+733C 9DE6 <CJK>
+733D 9DED <CJK>
+733E 9DEF <CJK>
+733F 9DFD <CJK>
+7340 9E1A <CJK>
+7341 9E1B <CJK>
+7342 9E1E <CJK>
+7343 9E75 <CJK>
+7344 9E79 <CJK>
+7345 9E7D <CJK>
+7346 9E81 <CJK>
+7347 9E88 <CJK>
+7348 9E8B <CJK>
+7349 9E8C <CJK>
+734A 9E92 <CJK>
+734B 9E95 <CJK>
+734C 9E91 <CJK>
+734D 9E9D <CJK>
+734E 9EA5 <CJK>
+734F 9EA9 <CJK>
+7350 9EB8 <CJK>
+7351 9EAA <CJK>
+7352 9EAD <CJK>
+7353 9761 <CJK>
+7354 9ECC <CJK>
+7355 9ECE <CJK>
+7356 9ECF <CJK>
+7357 9ED0 <CJK>
+7358 9ED4 <CJK>
+7359 9EDC <CJK>
+735A 9EDE <CJK>
+735B 9EDD <CJK>
+735C 9EE0 <CJK>
+735D 9EE5 <CJK>
+735E 9EE8 <CJK>
+735F 9EEF <CJK>
+7360 9EF4 <CJK>
+7361 9EF6 <CJK>
+7362 9EF7 <CJK>
+7363 9EF9 <CJK>
+7364 9EFB <CJK>
+7365 9EFC <CJK>
+7366 9EFD <CJK>
+7367 9F07 <CJK>
+7368 9F08 <CJK>
+7369 76B7 <CJK>
+736A 9F15 <CJK>
+736B 9F21 <CJK>
+736C 9F2C <CJK>
+736D 9F3E <CJK>
+736E 9F4A <CJK>
+736F 9F52 <CJK>
+7370 9F54 <CJK>
+7371 9F63 <CJK>
+7372 9F5F <CJK>
+7373 9F60 <CJK>
+7374 9F61 <CJK>
+7375 9F66 <CJK>
+7376 9F67 <CJK>
+7377 9F6C <CJK>
+7378 9F6A <CJK>
+7379 9F77 <CJK>
+737A 9F72 <CJK>
+737B 9F76 <CJK>
+737C 9F95 <CJK>
+737D 9F9C <CJK>
+737E 9FA0 <CJK>
+7421 582F <CJK>
+7422 69C7 <CJK>
+7423 9059 <CJK>
+7424 7464 <CJK>
+7425 51DC <CJK>
+7426 7199 <CJK>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-kr.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-kr.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-kr.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-2022-kr.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,17188 @@
+
+:US-ASCII
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E :KSC-5601
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B >ESC
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+
+:ESC <
+24 :ESC-$
+
+:ESC-$ <
+29 :ESC-$-)
+
+:ESC-$-) <
+43 :US-ASCII
+
+:KSC-5601
+0f :US-ASCII
+8141 AC02 # HANGUL SYLLABLE KIYEOK-A-SSANGKIYEOK
+8142 AC03 # HANGUL SYLLABLE KIYEOK-A-KIYEOKSIOS
+8143 AC05 # HANGUL SYLLABLE KIYEOK-A-NIEUNCIEUC
+8144 AC06 # HANGUL SYLLABLE KIYEOK-A-NIEUNHIEUH
+8145 AC0B # HANGUL SYLLABLE KIYEOK-A-RIEULPIEUP
+8146 AC0C # HANGUL SYLLABLE KIYEOK-A-RIEULSIOS
+8147 AC0D # HANGUL SYLLABLE KIYEOK-A-RIEULTHIEUTH
+8148 AC0E # HANGUL SYLLABLE KIYEOK-A-RIEULPHIEUPH
+8149 AC0F # HANGUL SYLLABLE KIYEOK-A-RIEULHIEUH
+814A AC18 # HANGUL SYLLABLE KIYEOK-A-KHIEUKH
+814B AC1E # HANGUL SYLLABLE KIYEOK-AE-SSANGKIYEOK
+814C AC1F # HANGUL SYLLABLE KIYEOK-AE-KIYEOKSIOS
+814D AC21 # HANGUL SYLLABLE KIYEOK-AE-NIEUNCIEUC
+814E AC22 # HANGUL SYLLABLE KIYEOK-AE-NIEUNHIEUH
+814F AC23 # HANGUL SYLLABLE KIYEOK-AE-TIKEUT
+8150 AC25 # HANGUL SYLLABLE KIYEOK-AE-RIEULKIYEOK
+8151 AC26 # HANGUL SYLLABLE KIYEOK-AE-RIEULMIEUM
+8152 AC27 # HANGUL SYLLABLE KIYEOK-AE-RIEULPIEUP
+8153 AC28 # HANGUL SYLLABLE KIYEOK-AE-RIEULSIOS
+8154 AC29 # HANGUL SYLLABLE KIYEOK-AE-RIEULTHIEUTH
+8155 AC2A # HANGUL SYLLABLE KIYEOK-AE-RIEULPHIEUPH
+8156 AC2B # HANGUL SYLLABLE KIYEOK-AE-RIEULHIEUH
+8157 AC2E # HANGUL SYLLABLE KIYEOK-AE-PIEUPSIOS
+8158 AC32 # HANGUL SYLLABLE KIYEOK-AE-CIEUC
+8159 AC33 # HANGUL SYLLABLE KIYEOK-AE-CHIEUCH
+815A AC34 # HANGUL SYLLABLE KIYEOK-AE-KHIEUKH
+8161 AC35 # HANGUL SYLLABLE KIYEOK-AE-THIEUTH
+8162 AC36 # HANGUL SYLLABLE KIYEOK-AE-PHIEUPH
+8163 AC37 # HANGUL SYLLABLE KIYEOK-AE-HIEUH
+8164 AC3A # HANGUL SYLLABLE KIYEOK-YA-SSANGKIYEOK
+8165 AC3B # HANGUL SYLLABLE KIYEOK-YA-KIYEOKSIOS
+8166 AC3D # HANGUL SYLLABLE KIYEOK-YA-NIEUNCIEUC
+8167 AC3E # HANGUL SYLLABLE KIYEOK-YA-NIEUNHIEUH
+8168 AC3F # HANGUL SYLLABLE KIYEOK-YA-TIKEUT
+8169 AC41 # HANGUL SYLLABLE KIYEOK-YA-RIEULKIYEOK
+816A AC42 # HANGUL SYLLABLE KIYEOK-YA-RIEULMIEUM
+816B AC43 # HANGUL SYLLABLE KIYEOK-YA-RIEULPIEUP
+816C AC44 # HANGUL SYLLABLE KIYEOK-YA-RIEULSIOS
+816D AC45 # HANGUL SYLLABLE KIYEOK-YA-RIEULTHIEUTH
+816E AC46 # HANGUL SYLLABLE KIYEOK-YA-RIEULPHIEUPH
+816F AC47 # HANGUL SYLLABLE KIYEOK-YA-RIEULHIEUH
+8170 AC48 # HANGUL SYLLABLE KIYEOK-YA-MIEUM
+8171 AC49 # HANGUL SYLLABLE KIYEOK-YA-PIEUP
+8172 AC4A # HANGUL SYLLABLE KIYEOK-YA-PIEUPSIOS
+8173 AC4C # HANGUL SYLLABLE KIYEOK-YA-SSANGSIOS
+8174 AC4E # HANGUL SYLLABLE KIYEOK-YA-CIEUC
+8175 AC4F # HANGUL SYLLABLE KIYEOK-YA-CHIEUCH
+8176 AC50 # HANGUL SYLLABLE KIYEOK-YA-KHIEUKH
+8177 AC51 # HANGUL SYLLABLE KIYEOK-YA-THIEUTH
+8178 AC52 # HANGUL SYLLABLE KIYEOK-YA-PHIEUPH
+8179 AC53 # HANGUL SYLLABLE KIYEOK-YA-HIEUH
+817A AC55 # HANGUL SYLLABLE KIYEOK-YAE-KIYEOK
+8181 AC56 # HANGUL SYLLABLE KIYEOK-YAE-SSANGKIYEOK
+8182 AC57 # HANGUL SYLLABLE KIYEOK-YAE-KIYEOKSIOS
+8183 AC59 # HANGUL SYLLABLE KIYEOK-YAE-NIEUNCIEUC
+8184 AC5A # HANGUL SYLLABLE KIYEOK-YAE-NIEUNHIEUH
+8185 AC5B # HANGUL SYLLABLE KIYEOK-YAE-TIKEUT
+8186 AC5D # HANGUL SYLLABLE KIYEOK-YAE-RIEULKIYEOK
+8187 AC5E # HANGUL SYLLABLE KIYEOK-YAE-RIEULMIEUM
+8188 AC5F # HANGUL SYLLABLE KIYEOK-YAE-RIEULPIEUP
+8189 AC60 # HANGUL SYLLABLE KIYEOK-YAE-RIEULSIOS
+818A AC61 # HANGUL SYLLABLE KIYEOK-YAE-RIEULTHIEUTH
+818B AC62 # HANGUL SYLLABLE KIYEOK-YAE-RIEULPHIEUPH
+818C AC63 # HANGUL SYLLABLE KIYEOK-YAE-RIEULHIEUH
+818D AC64 # HANGUL SYLLABLE KIYEOK-YAE-MIEUM
+818E AC65 # HANGUL SYLLABLE KIYEOK-YAE-PIEUP
+818F AC66 # HANGUL SYLLABLE KIYEOK-YAE-PIEUPSIOS
+8190 AC67 # HANGUL SYLLABLE KIYEOK-YAE-SIOS
+8191 AC68 # HANGUL SYLLABLE KIYEOK-YAE-SSANGSIOS
+8192 AC69 # HANGUL SYLLABLE KIYEOK-YAE-IEUNG
+8193 AC6A # HANGUL SYLLABLE KIYEOK-YAE-CIEUC
+8194 AC6B # HANGUL SYLLABLE KIYEOK-YAE-CHIEUCH
+8195 AC6C # HANGUL SYLLABLE KIYEOK-YAE-KHIEUKH
+8196 AC6D # HANGUL SYLLABLE KIYEOK-YAE-THIEUTH
+8197 AC6E # HANGUL SYLLABLE KIYEOK-YAE-PHIEUPH
+8198 AC6F # HANGUL SYLLABLE KIYEOK-YAE-HIEUH
+8199 AC72 # HANGUL SYLLABLE KIYEOK-EO-SSANGKIYEOK
+819A AC73 # HANGUL SYLLABLE KIYEOK-EO-KIYEOKSIOS
+819B AC75 # HANGUL SYLLABLE KIYEOK-EO-NIEUNCIEUC
+819C AC76 # HANGUL SYLLABLE KIYEOK-EO-NIEUNHIEUH
+819D AC79 # HANGUL SYLLABLE KIYEOK-EO-RIEULKIYEOK
+819E AC7B # HANGUL SYLLABLE KIYEOK-EO-RIEULPIEUP
+819F AC7C # HANGUL SYLLABLE KIYEOK-EO-RIEULSIOS
+81A0 AC7D # HANGUL SYLLABLE KIYEOK-EO-RIEULTHIEUTH
+81A1 AC7E # HANGUL SYLLABLE KIYEOK-EO-RIEULPHIEUPH
+81A2 AC7F # HANGUL SYLLABLE KIYEOK-EO-RIEULHIEUH
+81A3 AC82 # HANGUL SYLLABLE KIYEOK-EO-PIEUPSIOS
+81A4 AC87 # HANGUL SYLLABLE KIYEOK-EO-CHIEUCH
+81A5 AC88 # HANGUL SYLLABLE KIYEOK-EO-KHIEUKH
+81A6 AC8D # HANGUL SYLLABLE KIYEOK-E-KIYEOK
+81A7 AC8E # HANGUL SYLLABLE KIYEOK-E-SSANGKIYEOK
+81A8 AC8F # HANGUL SYLLABLE KIYEOK-E-KIYEOKSIOS
+81A9 AC91 # HANGUL SYLLABLE KIYEOK-E-NIEUNCIEUC
+81AA AC92 # HANGUL SYLLABLE KIYEOK-E-NIEUNHIEUH
+81AB AC93 # HANGUL SYLLABLE KIYEOK-E-TIKEUT
+81AC AC95 # HANGUL SYLLABLE KIYEOK-E-RIEULKIYEOK
+81AD AC96 # HANGUL SYLLABLE KIYEOK-E-RIEULMIEUM
+81AE AC97 # HANGUL SYLLABLE KIYEOK-E-RIEULPIEUP
+81AF AC98 # HANGUL SYLLABLE KIYEOK-E-RIEULSIOS
+81B0 AC99 # HANGUL SYLLABLE KIYEOK-E-RIEULTHIEUTH
+81B1 AC9A # HANGUL SYLLABLE KIYEOK-E-RIEULPHIEUPH
+81B2 AC9B # HANGUL SYLLABLE KIYEOK-E-RIEULHIEUH
+81B3 AC9E # HANGUL SYLLABLE KIYEOK-E-PIEUPSIOS
+81B4 ACA2 # HANGUL SYLLABLE KIYEOK-E-CIEUC
+81B5 ACA3 # HANGUL SYLLABLE KIYEOK-E-CHIEUCH
+81B6 ACA4 # HANGUL SYLLABLE KIYEOK-E-KHIEUKH
+81B7 ACA5 # HANGUL SYLLABLE KIYEOK-E-THIEUTH
+81B8 ACA6 # HANGUL SYLLABLE KIYEOK-E-PHIEUPH
+81B9 ACA7 # HANGUL SYLLABLE KIYEOK-E-HIEUH
+81BA ACAB # HANGUL SYLLABLE KIYEOK-YEO-KIYEOKSIOS
+81BB ACAD # HANGUL SYLLABLE KIYEOK-YEO-NIEUNCIEUC
+81BC ACAE # HANGUL SYLLABLE KIYEOK-YEO-NIEUNHIEUH
+81BD ACB1 # HANGUL SYLLABLE KIYEOK-YEO-RIEULKIYEOK
+81BE ACB2 # HANGUL SYLLABLE KIYEOK-YEO-RIEULMIEUM
+81BF ACB3 # HANGUL SYLLABLE KIYEOK-YEO-RIEULPIEUP
+81C0 ACB4 # HANGUL SYLLABLE KIYEOK-YEO-RIEULSIOS
+81C1 ACB5 # HANGUL SYLLABLE KIYEOK-YEO-RIEULTHIEUTH
+81C2 ACB6 # HANGUL SYLLABLE KIYEOK-YEO-RIEULPHIEUPH
+81C3 ACB7 # HANGUL SYLLABLE KIYEOK-YEO-RIEULHIEUH
+81C4 ACBA # HANGUL SYLLABLE KIYEOK-YEO-PIEUPSIOS
+81C5 ACBE # HANGUL SYLLABLE KIYEOK-YEO-CIEUC
+81C6 ACBF # HANGUL SYLLABLE KIYEOK-YEO-CHIEUCH
+81C7 ACC0 # HANGUL SYLLABLE KIYEOK-YEO-KHIEUKH
+81C8 ACC2 # HANGUL SYLLABLE KIYEOK-YEO-PHIEUPH
+81C9 ACC3 # HANGUL SYLLABLE KIYEOK-YEO-HIEUH
+81CA ACC5 # HANGUL SYLLABLE KIYEOK-YE-KIYEOK
+81CB ACC6 # HANGUL SYLLABLE KIYEOK-YE-SSANGKIYEOK
+81CC ACC7 # HANGUL SYLLABLE KIYEOK-YE-KIYEOKSIOS
+81CD ACC9 # HANGUL SYLLABLE KIYEOK-YE-NIEUNCIEUC
+81CE ACCA # HANGUL SYLLABLE KIYEOK-YE-NIEUNHIEUH
+81CF ACCB # HANGUL SYLLABLE KIYEOK-YE-TIKEUT
+81D0 ACCD # HANGUL SYLLABLE KIYEOK-YE-RIEULKIYEOK
+81D1 ACCE # HANGUL SYLLABLE KIYEOK-YE-RIEULMIEUM
+81D2 ACCF # HANGUL SYLLABLE KIYEOK-YE-RIEULPIEUP
+81D3 ACD0 # HANGUL SYLLABLE KIYEOK-YE-RIEULSIOS
+81D4 ACD1 # HANGUL SYLLABLE KIYEOK-YE-RIEULTHIEUTH
+81D5 ACD2 # HANGUL SYLLABLE KIYEOK-YE-RIEULPHIEUPH
+81D6 ACD3 # HANGUL SYLLABLE KIYEOK-YE-RIEULHIEUH
+81D7 ACD4 # HANGUL SYLLABLE KIYEOK-YE-MIEUM
+81D8 ACD6 # HANGUL SYLLABLE KIYEOK-YE-PIEUPSIOS
+81D9 ACD8 # HANGUL SYLLABLE KIYEOK-YE-SSANGSIOS
+81DA ACD9 # HANGUL SYLLABLE KIYEOK-YE-IEUNG
+81DB ACDA # HANGUL SYLLABLE KIYEOK-YE-CIEUC
+81DC ACDB # HANGUL SYLLABLE KIYEOK-YE-CHIEUCH
+81DD ACDC # HANGUL SYLLABLE KIYEOK-YE-KHIEUKH
+81DE ACDD # HANGUL SYLLABLE KIYEOK-YE-THIEUTH
+81DF ACDE # HANGUL SYLLABLE KIYEOK-YE-PHIEUPH
+81E0 ACDF # HANGUL SYLLABLE KIYEOK-YE-HIEUH
+81E1 ACE2 # HANGUL SYLLABLE KIYEOK-O-SSANGKIYEOK
+81E2 ACE3 # HANGUL SYLLABLE KIYEOK-O-KIYEOKSIOS
+81E3 ACE5 # HANGUL SYLLABLE KIYEOK-O-NIEUNCIEUC
+81E4 ACE6 # HANGUL SYLLABLE KIYEOK-O-NIEUNHIEUH
+81E5 ACE9 # HANGUL SYLLABLE KIYEOK-O-RIEULKIYEOK
+81E6 ACEB # HANGUL SYLLABLE KIYEOK-O-RIEULPIEUP
+81E7 ACED # HANGUL SYLLABLE KIYEOK-O-RIEULTHIEUTH
+81E8 ACEE # HANGUL SYLLABLE KIYEOK-O-RIEULPHIEUPH
+81E9 ACF2 # HANGUL SYLLABLE KIYEOK-O-PIEUPSIOS
+81EA ACF4 # HANGUL SYLLABLE KIYEOK-O-SSANGSIOS
+81EB ACF7 # HANGUL SYLLABLE KIYEOK-O-CHIEUCH
+81EC ACF8 # HANGUL SYLLABLE KIYEOK-O-KHIEUKH
+81ED ACF9 # HANGUL SYLLABLE KIYEOK-O-THIEUTH
+81EE ACFA # HANGUL SYLLABLE KIYEOK-O-PHIEUPH
+81EF ACFB # HANGUL SYLLABLE KIYEOK-O-HIEUH
+81F0 ACFE # HANGUL SYLLABLE KIYEOK-WA-SSANGKIYEOK
+81F1 ACFF # HANGUL SYLLABLE KIYEOK-WA-KIYEOKSIOS
+81F2 AD01 # HANGUL SYLLABLE KIYEOK-WA-NIEUNCIEUC
+81F3 AD02 # HANGUL SYLLABLE KIYEOK-WA-NIEUNHIEUH
+81F4 AD03 # HANGUL SYLLABLE KIYEOK-WA-TIKEUT
+81F5 AD05 # HANGUL SYLLABLE KIYEOK-WA-RIEULKIYEOK
+81F6 AD07 # HANGUL SYLLABLE KIYEOK-WA-RIEULPIEUP
+81F7 AD08 # HANGUL SYLLABLE KIYEOK-WA-RIEULSIOS
+81F8 AD09 # HANGUL SYLLABLE KIYEOK-WA-RIEULTHIEUTH
+81F9 AD0A # HANGUL SYLLABLE KIYEOK-WA-RIEULPHIEUPH
+81FA AD0B # HANGUL SYLLABLE KIYEOK-WA-RIEULHIEUH
+81FB AD0E # HANGUL SYLLABLE KIYEOK-WA-PIEUPSIOS
+81FC AD10 # HANGUL SYLLABLE KIYEOK-WA-SSANGSIOS
+81FD AD12 # HANGUL SYLLABLE KIYEOK-WA-CIEUC
+81FE AD13 # HANGUL SYLLABLE KIYEOK-WA-CHIEUCH
+8241 AD14 # HANGUL SYLLABLE KIYEOK-WA-KHIEUKH
+8242 AD15 # HANGUL SYLLABLE KIYEOK-WA-THIEUTH
+8243 AD16 # HANGUL SYLLABLE KIYEOK-WA-PHIEUPH
+8244 AD17 # HANGUL SYLLABLE KIYEOK-WA-HIEUH
+8245 AD19 # HANGUL SYLLABLE KIYEOK-WAE-KIYEOK
+8246 AD1A # HANGUL SYLLABLE KIYEOK-WAE-SSANGKIYEOK
+8247 AD1B # HANGUL SYLLABLE KIYEOK-WAE-KIYEOKSIOS
+8248 AD1D # HANGUL SYLLABLE KIYEOK-WAE-NIEUNCIEUC
+8249 AD1E # HANGUL SYLLABLE KIYEOK-WAE-NIEUNHIEUH
+824A AD1F # HANGUL SYLLABLE KIYEOK-WAE-TIKEUT
+824B AD21 # HANGUL SYLLABLE KIYEOK-WAE-RIEULKIYEOK
+824C AD22 # HANGUL SYLLABLE KIYEOK-WAE-RIEULMIEUM
+824D AD23 # HANGUL SYLLABLE KIYEOK-WAE-RIEULPIEUP
+824E AD24 # HANGUL SYLLABLE KIYEOK-WAE-RIEULSIOS
+824F AD25 # HANGUL SYLLABLE KIYEOK-WAE-RIEULTHIEUTH
+8250 AD26 # HANGUL SYLLABLE KIYEOK-WAE-RIEULPHIEUPH
+8251 AD27 # HANGUL SYLLABLE KIYEOK-WAE-RIEULHIEUH
+8252 AD28 # HANGUL SYLLABLE KIYEOK-WAE-MIEUM
+8253 AD2A # HANGUL SYLLABLE KIYEOK-WAE-PIEUPSIOS
+8254 AD2B # HANGUL SYLLABLE KIYEOK-WAE-SIOS
+8255 AD2E # HANGUL SYLLABLE KIYEOK-WAE-CIEUC
+8256 AD2F # HANGUL SYLLABLE KIYEOK-WAE-CHIEUCH
+8257 AD30 # HANGUL SYLLABLE KIYEOK-WAE-KHIEUKH
+8258 AD31 # HANGUL SYLLABLE KIYEOK-WAE-THIEUTH
+8259 AD32 # HANGUL SYLLABLE KIYEOK-WAE-PHIEUPH
+825A AD33 # HANGUL SYLLABLE KIYEOK-WAE-HIEUH
+8261 AD36 # HANGUL SYLLABLE KIYEOK-OE-SSANGKIYEOK
+8262 AD37 # HANGUL SYLLABLE KIYEOK-OE-KIYEOKSIOS
+8263 AD39 # HANGUL SYLLABLE KIYEOK-OE-NIEUNCIEUC
+8264 AD3A # HANGUL SYLLABLE KIYEOK-OE-NIEUNHIEUH
+8265 AD3B # HANGUL SYLLABLE KIYEOK-OE-TIKEUT
+8266 AD3D # HANGUL SYLLABLE KIYEOK-OE-RIEULKIYEOK
+8267 AD3E # HANGUL SYLLABLE KIYEOK-OE-RIEULMIEUM
+8268 AD3F # HANGUL SYLLABLE KIYEOK-OE-RIEULPIEUP
+8269 AD40 # HANGUL SYLLABLE KIYEOK-OE-RIEULSIOS
+826A AD41 # HANGUL SYLLABLE KIYEOK-OE-RIEULTHIEUTH
+826B AD42 # HANGUL SYLLABLE KIYEOK-OE-RIEULPHIEUPH
+826C AD43 # HANGUL SYLLABLE KIYEOK-OE-RIEULHIEUH
+826D AD46 # HANGUL SYLLABLE KIYEOK-OE-PIEUPSIOS
+826E AD48 # HANGUL SYLLABLE KIYEOK-OE-SSANGSIOS
+826F AD4A # HANGUL SYLLABLE KIYEOK-OE-CIEUC
+8270 AD4B # HANGUL SYLLABLE KIYEOK-OE-CHIEUCH
+8271 AD4C # HANGUL SYLLABLE KIYEOK-OE-KHIEUKH
+8272 AD4D # HANGUL SYLLABLE KIYEOK-OE-THIEUTH
+8273 AD4E # HANGUL SYLLABLE KIYEOK-OE-PHIEUPH
+8274 AD4F # HANGUL SYLLABLE KIYEOK-OE-HIEUH
+8275 AD51 # HANGUL SYLLABLE KIYEOK-YO-KIYEOK
+8276 AD52 # HANGUL SYLLABLE KIYEOK-YO-SSANGKIYEOK
+8277 AD53 # HANGUL SYLLABLE KIYEOK-YO-KIYEOKSIOS
+8278 AD55 # HANGUL SYLLABLE KIYEOK-YO-NIEUNCIEUC
+8279 AD56 # HANGUL SYLLABLE KIYEOK-YO-NIEUNHIEUH
+827A AD57 # HANGUL SYLLABLE KIYEOK-YO-TIKEUT
+8281 AD59 # HANGUL SYLLABLE KIYEOK-YO-RIEULKIYEOK
+8282 AD5A # HANGUL SYLLABLE KIYEOK-YO-RIEULMIEUM
+8283 AD5B # HANGUL SYLLABLE KIYEOK-YO-RIEULPIEUP
+8284 AD5C # HANGUL SYLLABLE KIYEOK-YO-RIEULSIOS
+8285 AD5D # HANGUL SYLLABLE KIYEOK-YO-RIEULTHIEUTH
+8286 AD5E # HANGUL SYLLABLE KIYEOK-YO-RIEULPHIEUPH
+8287 AD5F # HANGUL SYLLABLE KIYEOK-YO-RIEULHIEUH
+8288 AD60 # HANGUL SYLLABLE KIYEOK-YO-MIEUM
+8289 AD62 # HANGUL SYLLABLE KIYEOK-YO-PIEUPSIOS
+828A AD64 # HANGUL SYLLABLE KIYEOK-YO-SSANGSIOS
+828B AD65 # HANGUL SYLLABLE KIYEOK-YO-IEUNG
+828C AD66 # HANGUL SYLLABLE KIYEOK-YO-CIEUC
+828D AD67 # HANGUL SYLLABLE KIYEOK-YO-CHIEUCH
+828E AD68 # HANGUL SYLLABLE KIYEOK-YO-KHIEUKH
+828F AD69 # HANGUL SYLLABLE KIYEOK-YO-THIEUTH
+8290 AD6A # HANGUL SYLLABLE KIYEOK-YO-PHIEUPH
+8291 AD6B # HANGUL SYLLABLE KIYEOK-YO-HIEUH
+8292 AD6E # HANGUL SYLLABLE KIYEOK-U-SSANGKIYEOK
+8293 AD6F # HANGUL SYLLABLE KIYEOK-U-KIYEOKSIOS
+8294 AD71 # HANGUL SYLLABLE KIYEOK-U-NIEUNCIEUC
+8295 AD72 # HANGUL SYLLABLE KIYEOK-U-NIEUNHIEUH
+8296 AD77 # HANGUL SYLLABLE KIYEOK-U-RIEULPIEUP
+8297 AD78 # HANGUL SYLLABLE KIYEOK-U-RIEULSIOS
+8298 AD79 # HANGUL SYLLABLE KIYEOK-U-RIEULTHIEUTH
+8299 AD7A # HANGUL SYLLABLE KIYEOK-U-RIEULPHIEUPH
+829A AD7E # HANGUL SYLLABLE KIYEOK-U-PIEUPSIOS
+829B AD80 # HANGUL SYLLABLE KIYEOK-U-SSANGSIOS
+829C AD83 # HANGUL SYLLABLE KIYEOK-U-CHIEUCH
+829D AD84 # HANGUL SYLLABLE KIYEOK-U-KHIEUKH
+829E AD85 # HANGUL SYLLABLE KIYEOK-U-THIEUTH
+829F AD86 # HANGUL SYLLABLE KIYEOK-U-PHIEUPH
+82A0 AD87 # HANGUL SYLLABLE KIYEOK-U-HIEUH
+82A1 AD8A # HANGUL SYLLABLE KIYEOK-WEO-SSANGKIYEOK
+82A2 AD8B # HANGUL SYLLABLE KIYEOK-WEO-KIYEOKSIOS
+82A3 AD8D # HANGUL SYLLABLE KIYEOK-WEO-NIEUNCIEUC
+82A4 AD8E # HANGUL SYLLABLE KIYEOK-WEO-NIEUNHIEUH
+82A5 AD8F # HANGUL SYLLABLE KIYEOK-WEO-TIKEUT
+82A6 AD91 # HANGUL SYLLABLE KIYEOK-WEO-RIEULKIYEOK
+82A7 AD92 # HANGUL SYLLABLE KIYEOK-WEO-RIEULMIEUM
+82A8 AD93 # HANGUL SYLLABLE KIYEOK-WEO-RIEULPIEUP
+82A9 AD94 # HANGUL SYLLABLE KIYEOK-WEO-RIEULSIOS
+82AA AD95 # HANGUL SYLLABLE KIYEOK-WEO-RIEULTHIEUTH
+82AB AD96 # HANGUL SYLLABLE KIYEOK-WEO-RIEULPHIEUPH
+82AC AD97 # HANGUL SYLLABLE KIYEOK-WEO-RIEULHIEUH
+82AD AD98 # HANGUL SYLLABLE KIYEOK-WEO-MIEUM
+82AE AD99 # HANGUL SYLLABLE KIYEOK-WEO-PIEUP
+82AF AD9A # HANGUL SYLLABLE KIYEOK-WEO-PIEUPSIOS
+82B0 AD9B # HANGUL SYLLABLE KIYEOK-WEO-SIOS
+82B1 AD9E # HANGUL SYLLABLE KIYEOK-WEO-CIEUC
+82B2 AD9F # HANGUL SYLLABLE KIYEOK-WEO-CHIEUCH
+82B3 ADA0 # HANGUL SYLLABLE KIYEOK-WEO-KHIEUKH
+82B4 ADA1 # HANGUL SYLLABLE KIYEOK-WEO-THIEUTH
+82B5 ADA2 # HANGUL SYLLABLE KIYEOK-WEO-PHIEUPH
+82B6 ADA3 # HANGUL SYLLABLE KIYEOK-WEO-HIEUH
+82B7 ADA5 # HANGUL SYLLABLE KIYEOK-WE-KIYEOK
+82B8 ADA6 # HANGUL SYLLABLE KIYEOK-WE-SSANGKIYEOK
+82B9 ADA7 # HANGUL SYLLABLE KIYEOK-WE-KIYEOKSIOS
+82BA ADA8 # HANGUL SYLLABLE KIYEOK-WE-NIEUN
+82BB ADA9 # HANGUL SYLLABLE KIYEOK-WE-NIEUNCIEUC
+82BC ADAA # HANGUL SYLLABLE KIYEOK-WE-NIEUNHIEUH
+82BD ADAB # HANGUL SYLLABLE KIYEOK-WE-TIKEUT
+82BE ADAC # HANGUL SYLLABLE KIYEOK-WE-RIEUL
+82BF ADAD # HANGUL SYLLABLE KIYEOK-WE-RIEULKIYEOK
+82C0 ADAE # HANGUL SYLLABLE KIYEOK-WE-RIEULMIEUM
+82C1 ADAF # HANGUL SYLLABLE KIYEOK-WE-RIEULPIEUP
+82C2 ADB0 # HANGUL SYLLABLE KIYEOK-WE-RIEULSIOS
+82C3 ADB1 # HANGUL SYLLABLE KIYEOK-WE-RIEULTHIEUTH
+82C4 ADB2 # HANGUL SYLLABLE KIYEOK-WE-RIEULPHIEUPH
+82C5 ADB3 # HANGUL SYLLABLE KIYEOK-WE-RIEULHIEUH
+82C6 ADB4 # HANGUL SYLLABLE KIYEOK-WE-MIEUM
+82C7 ADB5 # HANGUL SYLLABLE KIYEOK-WE-PIEUP
+82C8 ADB6 # HANGUL SYLLABLE KIYEOK-WE-PIEUPSIOS
+82C9 ADB8 # HANGUL SYLLABLE KIYEOK-WE-SSANGSIOS
+82CA ADB9 # HANGUL SYLLABLE KIYEOK-WE-IEUNG
+82CB ADBA # HANGUL SYLLABLE KIYEOK-WE-CIEUC
+82CC ADBB # HANGUL SYLLABLE KIYEOK-WE-CHIEUCH
+82CD ADBC # HANGUL SYLLABLE KIYEOK-WE-KHIEUKH
+82CE ADBD # HANGUL SYLLABLE KIYEOK-WE-THIEUTH
+82CF ADBE # HANGUL SYLLABLE KIYEOK-WE-PHIEUPH
+82D0 ADBF # HANGUL SYLLABLE KIYEOK-WE-HIEUH
+82D1 ADC2 # HANGUL SYLLABLE KIYEOK-WI-SSANGKIYEOK
+82D2 ADC3 # HANGUL SYLLABLE KIYEOK-WI-KIYEOKSIOS
+82D3 ADC5 # HANGUL SYLLABLE KIYEOK-WI-NIEUNCIEUC
+82D4 ADC6 # HANGUL SYLLABLE KIYEOK-WI-NIEUNHIEUH
+82D5 ADC7 # HANGUL SYLLABLE KIYEOK-WI-TIKEUT
+82D6 ADC9 # HANGUL SYLLABLE KIYEOK-WI-RIEULKIYEOK
+82D7 ADCA # HANGUL SYLLABLE KIYEOK-WI-RIEULMIEUM
+82D8 ADCB # HANGUL SYLLABLE KIYEOK-WI-RIEULPIEUP
+82D9 ADCC # HANGUL SYLLABLE KIYEOK-WI-RIEULSIOS
+82DA ADCD # HANGUL SYLLABLE KIYEOK-WI-RIEULTHIEUTH
+82DB ADCE # HANGUL SYLLABLE KIYEOK-WI-RIEULPHIEUPH
+82DC ADCF # HANGUL SYLLABLE KIYEOK-WI-RIEULHIEUH
+82DD ADD2 # HANGUL SYLLABLE KIYEOK-WI-PIEUPSIOS
+82DE ADD4 # HANGUL SYLLABLE KIYEOK-WI-SSANGSIOS
+82DF ADD5 # HANGUL SYLLABLE KIYEOK-WI-IEUNG
+82E0 ADD6 # HANGUL SYLLABLE KIYEOK-WI-CIEUC
+82E1 ADD7 # HANGUL SYLLABLE KIYEOK-WI-CHIEUCH
+82E2 ADD8 # HANGUL SYLLABLE KIYEOK-WI-KHIEUKH
+82E3 ADD9 # HANGUL SYLLABLE KIYEOK-WI-THIEUTH
+82E4 ADDA # HANGUL SYLLABLE KIYEOK-WI-PHIEUPH
+82E5 ADDB # HANGUL SYLLABLE KIYEOK-WI-HIEUH
+82E6 ADDD # HANGUL SYLLABLE KIYEOK-YU-KIYEOK
+82E7 ADDE # HANGUL SYLLABLE KIYEOK-YU-SSANGKIYEOK
+82E8 ADDF # HANGUL SYLLABLE KIYEOK-YU-KIYEOKSIOS
+82E9 ADE1 # HANGUL SYLLABLE KIYEOK-YU-NIEUNCIEUC
+82EA ADE2 # HANGUL SYLLABLE KIYEOK-YU-NIEUNHIEUH
+82EB ADE3 # HANGUL SYLLABLE KIYEOK-YU-TIKEUT
+82EC ADE5 # HANGUL SYLLABLE KIYEOK-YU-RIEULKIYEOK
+82ED ADE6 # HANGUL SYLLABLE KIYEOK-YU-RIEULMIEUM
+82EE ADE7 # HANGUL SYLLABLE KIYEOK-YU-RIEULPIEUP
+82EF ADE8 # HANGUL SYLLABLE KIYEOK-YU-RIEULSIOS
+82F0 ADE9 # HANGUL SYLLABLE KIYEOK-YU-RIEULTHIEUTH
+82F1 ADEA # HANGUL SYLLABLE KIYEOK-YU-RIEULPHIEUPH
+82F2 ADEB # HANGUL SYLLABLE KIYEOK-YU-RIEULHIEUH
+82F3 ADEC # HANGUL SYLLABLE KIYEOK-YU-MIEUM
+82F4 ADED # HANGUL SYLLABLE KIYEOK-YU-PIEUP
+82F5 ADEE # HANGUL SYLLABLE KIYEOK-YU-PIEUPSIOS
+82F6 ADEF # HANGUL SYLLABLE KIYEOK-YU-SIOS
+82F7 ADF0 # HANGUL SYLLABLE KIYEOK-YU-SSANGSIOS
+82F8 ADF1 # HANGUL SYLLABLE KIYEOK-YU-IEUNG
+82F9 ADF2 # HANGUL SYLLABLE KIYEOK-YU-CIEUC
+82FA ADF3 # HANGUL SYLLABLE KIYEOK-YU-CHIEUCH
+82FB ADF4 # HANGUL SYLLABLE KIYEOK-YU-KHIEUKH
+82FC ADF5 # HANGUL SYLLABLE KIYEOK-YU-THIEUTH
+82FD ADF6 # HANGUL SYLLABLE KIYEOK-YU-PHIEUPH
+82FE ADF7 # HANGUL SYLLABLE KIYEOK-YU-HIEUH
+8341 ADFA # HANGUL SYLLABLE KIYEOK-EU-SSANGKIYEOK
+8342 ADFB # HANGUL SYLLABLE KIYEOK-EU-KIYEOKSIOS
+8343 ADFD # HANGUL SYLLABLE KIYEOK-EU-NIEUNCIEUC
+8344 ADFE # HANGUL SYLLABLE KIYEOK-EU-NIEUNHIEUH
+8345 AE02 # HANGUL SYLLABLE KIYEOK-EU-RIEULMIEUM
+8346 AE03 # HANGUL SYLLABLE KIYEOK-EU-RIEULPIEUP
+8347 AE04 # HANGUL SYLLABLE KIYEOK-EU-RIEULSIOS
+8348 AE05 # HANGUL SYLLABLE KIYEOK-EU-RIEULTHIEUTH
+8349 AE06 # HANGUL SYLLABLE KIYEOK-EU-RIEULPHIEUPH
+834A AE07 # HANGUL SYLLABLE KIYEOK-EU-RIEULHIEUH
+834B AE0A # HANGUL SYLLABLE KIYEOK-EU-PIEUPSIOS
+834C AE0C # HANGUL SYLLABLE KIYEOK-EU-SSANGSIOS
+834D AE0E # HANGUL SYLLABLE KIYEOK-EU-CIEUC
+834E AE0F # HANGUL SYLLABLE KIYEOK-EU-CHIEUCH
+834F AE10 # HANGUL SYLLABLE KIYEOK-EU-KHIEUKH
+8350 AE11 # HANGUL SYLLABLE KIYEOK-EU-THIEUTH
+8351 AE12 # HANGUL SYLLABLE KIYEOK-EU-PHIEUPH
+8352 AE13 # HANGUL SYLLABLE KIYEOK-EU-HIEUH
+8353 AE15 # HANGUL SYLLABLE KIYEOK-YI-KIYEOK
+8354 AE16 # HANGUL SYLLABLE KIYEOK-YI-SSANGKIYEOK
+8355 AE17 # HANGUL SYLLABLE KIYEOK-YI-KIYEOKSIOS
+8356 AE18 # HANGUL SYLLABLE KIYEOK-YI-NIEUN
+8357 AE19 # HANGUL SYLLABLE KIYEOK-YI-NIEUNCIEUC
+8358 AE1A # HANGUL SYLLABLE KIYEOK-YI-NIEUNHIEUH
+8359 AE1B # HANGUL SYLLABLE KIYEOK-YI-TIKEUT
+835A AE1C # HANGUL SYLLABLE KIYEOK-YI-RIEUL
+8361 AE1D # HANGUL SYLLABLE KIYEOK-YI-RIEULKIYEOK
+8362 AE1E # HANGUL SYLLABLE KIYEOK-YI-RIEULMIEUM
+8363 AE1F # HANGUL SYLLABLE KIYEOK-YI-RIEULPIEUP
+8364 AE20 # HANGUL SYLLABLE KIYEOK-YI-RIEULSIOS
+8365 AE21 # HANGUL SYLLABLE KIYEOK-YI-RIEULTHIEUTH
+8366 AE22 # HANGUL SYLLABLE KIYEOK-YI-RIEULPHIEUPH
+8367 AE23 # HANGUL SYLLABLE KIYEOK-YI-RIEULHIEUH
+8368 AE24 # HANGUL SYLLABLE KIYEOK-YI-MIEUM
+8369 AE25 # HANGUL SYLLABLE KIYEOK-YI-PIEUP
+836A AE26 # HANGUL SYLLABLE KIYEOK-YI-PIEUPSIOS
+836B AE27 # HANGUL SYLLABLE KIYEOK-YI-SIOS
+836C AE28 # HANGUL SYLLABLE KIYEOK-YI-SSANGSIOS
+836D AE29 # HANGUL SYLLABLE KIYEOK-YI-IEUNG
+836E AE2A # HANGUL SYLLABLE KIYEOK-YI-CIEUC
+836F AE2B # HANGUL SYLLABLE KIYEOK-YI-CHIEUCH
+8370 AE2C # HANGUL SYLLABLE KIYEOK-YI-KHIEUKH
+8371 AE2D # HANGUL SYLLABLE KIYEOK-YI-THIEUTH
+8372 AE2E # HANGUL SYLLABLE KIYEOK-YI-PHIEUPH
+8373 AE2F # HANGUL SYLLABLE KIYEOK-YI-HIEUH
+8374 AE32 # HANGUL SYLLABLE KIYEOK-I-SSANGKIYEOK
+8375 AE33 # HANGUL SYLLABLE KIYEOK-I-KIYEOKSIOS
+8376 AE35 # HANGUL SYLLABLE KIYEOK-I-NIEUNCIEUC
+8377 AE36 # HANGUL SYLLABLE KIYEOK-I-NIEUNHIEUH
+8378 AE39 # HANGUL SYLLABLE KIYEOK-I-RIEULKIYEOK
+8379 AE3B # HANGUL SYLLABLE KIYEOK-I-RIEULPIEUP
+837A AE3C # HANGUL SYLLABLE KIYEOK-I-RIEULSIOS
+8381 AE3D # HANGUL SYLLABLE KIYEOK-I-RIEULTHIEUTH
+8382 AE3E # HANGUL SYLLABLE KIYEOK-I-RIEULPHIEUPH
+8383 AE3F # HANGUL SYLLABLE KIYEOK-I-RIEULHIEUH
+8384 AE42 # HANGUL SYLLABLE KIYEOK-I-PIEUPSIOS
+8385 AE44 # HANGUL SYLLABLE KIYEOK-I-SSANGSIOS
+8386 AE47 # HANGUL SYLLABLE KIYEOK-I-CHIEUCH
+8387 AE48 # HANGUL SYLLABLE KIYEOK-I-KHIEUKH
+8388 AE49 # HANGUL SYLLABLE KIYEOK-I-THIEUTH
+8389 AE4B # HANGUL SYLLABLE KIYEOK-I-HIEUH
+838A AE4F # HANGUL SYLLABLE SSANGKIYEOK-A-KIYEOKSIOS
+838B AE51 # HANGUL SYLLABLE SSANGKIYEOK-A-NIEUNCIEUC
+838C AE52 # HANGUL SYLLABLE SSANGKIYEOK-A-NIEUNHIEUH
+838D AE53 # HANGUL SYLLABLE SSANGKIYEOK-A-TIKEUT
+838E AE55 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULKIYEOK
+838F AE57 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULPIEUP
+8390 AE58 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULSIOS
+8391 AE59 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULTHIEUTH
+8392 AE5A # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULPHIEUPH
+8393 AE5B # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULHIEUH
+8394 AE5E # HANGUL SYLLABLE SSANGKIYEOK-A-PIEUPSIOS
+8395 AE62 # HANGUL SYLLABLE SSANGKIYEOK-A-CIEUC
+8396 AE63 # HANGUL SYLLABLE SSANGKIYEOK-A-CHIEUCH
+8397 AE64 # HANGUL SYLLABLE SSANGKIYEOK-A-KHIEUKH
+8398 AE66 # HANGUL SYLLABLE SSANGKIYEOK-A-PHIEUPH
+8399 AE67 # HANGUL SYLLABLE SSANGKIYEOK-A-HIEUH
+839A AE6A # HANGUL SYLLABLE SSANGKIYEOK-AE-SSANGKIYEOK
+839B AE6B # HANGUL SYLLABLE SSANGKIYEOK-AE-KIYEOKSIOS
+839C AE6D # HANGUL SYLLABLE SSANGKIYEOK-AE-NIEUNCIEUC
+839D AE6E # HANGUL SYLLABLE SSANGKIYEOK-AE-NIEUNHIEUH
+839E AE6F # HANGUL SYLLABLE SSANGKIYEOK-AE-TIKEUT
+839F AE71 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULKIYEOK
+83A0 AE72 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULMIEUM
+83A1 AE73 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULPIEUP
+83A2 AE74 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULSIOS
+83A3 AE75 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULTHIEUTH
+83A4 AE76 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULPHIEUPH
+83A5 AE77 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULHIEUH
+83A6 AE7A # HANGUL SYLLABLE SSANGKIYEOK-AE-PIEUPSIOS
+83A7 AE7E # HANGUL SYLLABLE SSANGKIYEOK-AE-CIEUC
+83A8 AE7F # HANGUL SYLLABLE SSANGKIYEOK-AE-CHIEUCH
+83A9 AE80 # HANGUL SYLLABLE SSANGKIYEOK-AE-KHIEUKH
+83AA AE81 # HANGUL SYLLABLE SSANGKIYEOK-AE-THIEUTH
+83AB AE82 # HANGUL SYLLABLE SSANGKIYEOK-AE-PHIEUPH
+83AC AE83 # HANGUL SYLLABLE SSANGKIYEOK-AE-HIEUH
+83AD AE86 # HANGUL SYLLABLE SSANGKIYEOK-YA-SSANGKIYEOK
+83AE AE87 # HANGUL SYLLABLE SSANGKIYEOK-YA-KIYEOKSIOS
+83AF AE88 # HANGUL SYLLABLE SSANGKIYEOK-YA-NIEUN
+83B0 AE89 # HANGUL SYLLABLE SSANGKIYEOK-YA-NIEUNCIEUC
+83B1 AE8A # HANGUL SYLLABLE SSANGKIYEOK-YA-NIEUNHIEUH
+83B2 AE8B # HANGUL SYLLABLE SSANGKIYEOK-YA-TIKEUT
+83B3 AE8D # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULKIYEOK
+83B4 AE8E # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULMIEUM
+83B5 AE8F # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULPIEUP
+83B6 AE90 # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULSIOS
+83B7 AE91 # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULTHIEUTH
+83B8 AE92 # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULPHIEUPH
+83B9 AE93 # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULHIEUH
+83BA AE94 # HANGUL SYLLABLE SSANGKIYEOK-YA-MIEUM
+83BB AE95 # HANGUL SYLLABLE SSANGKIYEOK-YA-PIEUP
+83BC AE96 # HANGUL SYLLABLE SSANGKIYEOK-YA-PIEUPSIOS
+83BD AE97 # HANGUL SYLLABLE SSANGKIYEOK-YA-SIOS
+83BE AE98 # HANGUL SYLLABLE SSANGKIYEOK-YA-SSANGSIOS
+83BF AE99 # HANGUL SYLLABLE SSANGKIYEOK-YA-IEUNG
+83C0 AE9A # HANGUL SYLLABLE SSANGKIYEOK-YA-CIEUC
+83C1 AE9B # HANGUL SYLLABLE SSANGKIYEOK-YA-CHIEUCH
+83C2 AE9C # HANGUL SYLLABLE SSANGKIYEOK-YA-KHIEUKH
+83C3 AE9D # HANGUL SYLLABLE SSANGKIYEOK-YA-THIEUTH
+83C4 AE9E # HANGUL SYLLABLE SSANGKIYEOK-YA-PHIEUPH
+83C5 AE9F # HANGUL SYLLABLE SSANGKIYEOK-YA-HIEUH
+83C6 AEA0 # HANGUL SYLLABLE SSANGKIYEOK-YAE
+83C7 AEA1 # HANGUL SYLLABLE SSANGKIYEOK-YAE-KIYEOK
+83C8 AEA2 # HANGUL SYLLABLE SSANGKIYEOK-YAE-SSANGKIYEOK
+83C9 AEA3 # HANGUL SYLLABLE SSANGKIYEOK-YAE-KIYEOKSIOS
+83CA AEA4 # HANGUL SYLLABLE SSANGKIYEOK-YAE-NIEUN
+83CB AEA5 # HANGUL SYLLABLE SSANGKIYEOK-YAE-NIEUNCIEUC
+83CC AEA6 # HANGUL SYLLABLE SSANGKIYEOK-YAE-NIEUNHIEUH
+83CD AEA7 # HANGUL SYLLABLE SSANGKIYEOK-YAE-TIKEUT
+83CE AEA8 # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEUL
+83CF AEA9 # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULKIYEOK
+83D0 AEAA # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULMIEUM
+83D1 AEAB # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULPIEUP
+83D2 AEAC # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULSIOS
+83D3 AEAD # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULTHIEUTH
+83D4 AEAE # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULPHIEUPH
+83D5 AEAF # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULHIEUH
+83D6 AEB0 # HANGUL SYLLABLE SSANGKIYEOK-YAE-MIEUM
+83D7 AEB1 # HANGUL SYLLABLE SSANGKIYEOK-YAE-PIEUP
+83D8 AEB2 # HANGUL SYLLABLE SSANGKIYEOK-YAE-PIEUPSIOS
+83D9 AEB3 # HANGUL SYLLABLE SSANGKIYEOK-YAE-SIOS
+83DA AEB4 # HANGUL SYLLABLE SSANGKIYEOK-YAE-SSANGSIOS
+83DB AEB5 # HANGUL SYLLABLE SSANGKIYEOK-YAE-IEUNG
+83DC AEB6 # HANGUL SYLLABLE SSANGKIYEOK-YAE-CIEUC
+83DD AEB7 # HANGUL SYLLABLE SSANGKIYEOK-YAE-CHIEUCH
+83DE AEB8 # HANGUL SYLLABLE SSANGKIYEOK-YAE-KHIEUKH
+83DF AEB9 # HANGUL SYLLABLE SSANGKIYEOK-YAE-THIEUTH
+83E0 AEBA # HANGUL SYLLABLE SSANGKIYEOK-YAE-PHIEUPH
+83E1 AEBB # HANGUL SYLLABLE SSANGKIYEOK-YAE-HIEUH
+83E2 AEBF # HANGUL SYLLABLE SSANGKIYEOK-EO-KIYEOKSIOS
+83E3 AEC1 # HANGUL SYLLABLE SSANGKIYEOK-EO-NIEUNCIEUC
+83E4 AEC2 # HANGUL SYLLABLE SSANGKIYEOK-EO-NIEUNHIEUH
+83E5 AEC3 # HANGUL SYLLABLE SSANGKIYEOK-EO-TIKEUT
+83E6 AEC5 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULKIYEOK
+83E7 AEC6 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULMIEUM
+83E8 AEC7 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULPIEUP
+83E9 AEC8 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULSIOS
+83EA AEC9 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULTHIEUTH
+83EB AECA # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULPHIEUPH
+83EC AECB # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULHIEUH
+83ED AECE # HANGUL SYLLABLE SSANGKIYEOK-EO-PIEUPSIOS
+83EE AED2 # HANGUL SYLLABLE SSANGKIYEOK-EO-CIEUC
+83EF AED3 # HANGUL SYLLABLE SSANGKIYEOK-EO-CHIEUCH
+83F0 AED4 # HANGUL SYLLABLE SSANGKIYEOK-EO-KHIEUKH
+83F1 AED5 # HANGUL SYLLABLE SSANGKIYEOK-EO-THIEUTH
+83F2 AED6 # HANGUL SYLLABLE SSANGKIYEOK-EO-PHIEUPH
+83F3 AED7 # HANGUL SYLLABLE SSANGKIYEOK-EO-HIEUH
+83F4 AEDA # HANGUL SYLLABLE SSANGKIYEOK-E-SSANGKIYEOK
+83F5 AEDB # HANGUL SYLLABLE SSANGKIYEOK-E-KIYEOKSIOS
+83F6 AEDD # HANGUL SYLLABLE SSANGKIYEOK-E-NIEUNCIEUC
+83F7 AEDE # HANGUL SYLLABLE SSANGKIYEOK-E-NIEUNHIEUH
+83F8 AEDF # HANGUL SYLLABLE SSANGKIYEOK-E-TIKEUT
+83F9 AEE0 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEUL
+83FA AEE1 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULKIYEOK
+83FB AEE2 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULMIEUM
+83FC AEE3 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULPIEUP
+83FD AEE4 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULSIOS
+83FE AEE5 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULTHIEUTH
+8441 AEE6 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULPHIEUPH
+8442 AEE7 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULHIEUH
+8443 AEE9 # HANGUL SYLLABLE SSANGKIYEOK-E-PIEUP
+8444 AEEA # HANGUL SYLLABLE SSANGKIYEOK-E-PIEUPSIOS
+8445 AEEC # HANGUL SYLLABLE SSANGKIYEOK-E-SSANGSIOS
+8446 AEEE # HANGUL SYLLABLE SSANGKIYEOK-E-CIEUC
+8447 AEEF # HANGUL SYLLABLE SSANGKIYEOK-E-CHIEUCH
+8448 AEF0 # HANGUL SYLLABLE SSANGKIYEOK-E-KHIEUKH
+8449 AEF1 # HANGUL SYLLABLE SSANGKIYEOK-E-THIEUTH
+844A AEF2 # HANGUL SYLLABLE SSANGKIYEOK-E-PHIEUPH
+844B AEF3 # HANGUL SYLLABLE SSANGKIYEOK-E-HIEUH
+844C AEF5 # HANGUL SYLLABLE SSANGKIYEOK-YEO-KIYEOK
+844D AEF6 # HANGUL SYLLABLE SSANGKIYEOK-YEO-SSANGKIYEOK
+844E AEF7 # HANGUL SYLLABLE SSANGKIYEOK-YEO-KIYEOKSIOS
+844F AEF9 # HANGUL SYLLABLE SSANGKIYEOK-YEO-NIEUNCIEUC
+8450 AEFA # HANGUL SYLLABLE SSANGKIYEOK-YEO-NIEUNHIEUH
+8451 AEFB # HANGUL SYLLABLE SSANGKIYEOK-YEO-TIKEUT
+8452 AEFD # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULKIYEOK
+8453 AEFE # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULMIEUM
+8454 AEFF # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULPIEUP
+8455 AF00 # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULSIOS
+8456 AF01 # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULTHIEUTH
+8457 AF02 # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULPHIEUPH
+8458 AF03 # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULHIEUH
+8459 AF04 # HANGUL SYLLABLE SSANGKIYEOK-YEO-MIEUM
+845A AF05 # HANGUL SYLLABLE SSANGKIYEOK-YEO-PIEUP
+8461 AF06 # HANGUL SYLLABLE SSANGKIYEOK-YEO-PIEUPSIOS
+8462 AF09 # HANGUL SYLLABLE SSANGKIYEOK-YEO-IEUNG
+8463 AF0A # HANGUL SYLLABLE SSANGKIYEOK-YEO-CIEUC
+8464 AF0B # HANGUL SYLLABLE SSANGKIYEOK-YEO-CHIEUCH
+8465 AF0C # HANGUL SYLLABLE SSANGKIYEOK-YEO-KHIEUKH
+8466 AF0E # HANGUL SYLLABLE SSANGKIYEOK-YEO-PHIEUPH
+8467 AF0F # HANGUL SYLLABLE SSANGKIYEOK-YEO-HIEUH
+8468 AF11 # HANGUL SYLLABLE SSANGKIYEOK-YE-KIYEOK
+8469 AF12 # HANGUL SYLLABLE SSANGKIYEOK-YE-SSANGKIYEOK
+846A AF13 # HANGUL SYLLABLE SSANGKIYEOK-YE-KIYEOKSIOS
+846B AF14 # HANGUL SYLLABLE SSANGKIYEOK-YE-NIEUN
+846C AF15 # HANGUL SYLLABLE SSANGKIYEOK-YE-NIEUNCIEUC
+846D AF16 # HANGUL SYLLABLE SSANGKIYEOK-YE-NIEUNHIEUH
+846E AF17 # HANGUL SYLLABLE SSANGKIYEOK-YE-TIKEUT
+846F AF18 # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEUL
+8470 AF19 # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULKIYEOK
+8471 AF1A # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULMIEUM
+8472 AF1B # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULPIEUP
+8473 AF1C # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULSIOS
+8474 AF1D # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULTHIEUTH
+8475 AF1E # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULPHIEUPH
+8476 AF1F # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULHIEUH
+8477 AF20 # HANGUL SYLLABLE SSANGKIYEOK-YE-MIEUM
+8478 AF21 # HANGUL SYLLABLE SSANGKIYEOK-YE-PIEUP
+8479 AF22 # HANGUL SYLLABLE SSANGKIYEOK-YE-PIEUPSIOS
+847A AF23 # HANGUL SYLLABLE SSANGKIYEOK-YE-SIOS
+8481 AF24 # HANGUL SYLLABLE SSANGKIYEOK-YE-SSANGSIOS
+8482 AF25 # HANGUL SYLLABLE SSANGKIYEOK-YE-IEUNG
+8483 AF26 # HANGUL SYLLABLE SSANGKIYEOK-YE-CIEUC
+8484 AF27 # HANGUL SYLLABLE SSANGKIYEOK-YE-CHIEUCH
+8485 AF28 # HANGUL SYLLABLE SSANGKIYEOK-YE-KHIEUKH
+8486 AF29 # HANGUL SYLLABLE SSANGKIYEOK-YE-THIEUTH
+8487 AF2A # HANGUL SYLLABLE SSANGKIYEOK-YE-PHIEUPH
+8488 AF2B # HANGUL SYLLABLE SSANGKIYEOK-YE-HIEUH
+8489 AF2E # HANGUL SYLLABLE SSANGKIYEOK-O-SSANGKIYEOK
+848A AF2F # HANGUL SYLLABLE SSANGKIYEOK-O-KIYEOKSIOS
+848B AF31 # HANGUL SYLLABLE SSANGKIYEOK-O-NIEUNCIEUC
+848C AF33 # HANGUL SYLLABLE SSANGKIYEOK-O-TIKEUT
+848D AF35 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULKIYEOK
+848E AF36 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULMIEUM
+848F AF37 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULPIEUP
+8490 AF38 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULSIOS
+8491 AF39 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULTHIEUTH
+8492 AF3A # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULPHIEUPH
+8493 AF3B # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULHIEUH
+8494 AF3E # HANGUL SYLLABLE SSANGKIYEOK-O-PIEUPSIOS
+8495 AF40 # HANGUL SYLLABLE SSANGKIYEOK-O-SSANGSIOS
+8496 AF44 # HANGUL SYLLABLE SSANGKIYEOK-O-KHIEUKH
+8497 AF45 # HANGUL SYLLABLE SSANGKIYEOK-O-THIEUTH
+8498 AF46 # HANGUL SYLLABLE SSANGKIYEOK-O-PHIEUPH
+8499 AF47 # HANGUL SYLLABLE SSANGKIYEOK-O-HIEUH
+849A AF4A # HANGUL SYLLABLE SSANGKIYEOK-WA-SSANGKIYEOK
+849B AF4B # HANGUL SYLLABLE SSANGKIYEOK-WA-KIYEOKSIOS
+849C AF4C # HANGUL SYLLABLE SSANGKIYEOK-WA-NIEUN
+849D AF4D # HANGUL SYLLABLE SSANGKIYEOK-WA-NIEUNCIEUC
+849E AF4E # HANGUL SYLLABLE SSANGKIYEOK-WA-NIEUNHIEUH
+849F AF4F # HANGUL SYLLABLE SSANGKIYEOK-WA-TIKEUT
+84A0 AF51 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULKIYEOK
+84A1 AF52 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULMIEUM
+84A2 AF53 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULPIEUP
+84A3 AF54 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULSIOS
+84A4 AF55 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULTHIEUTH
+84A5 AF56 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULPHIEUPH
+84A6 AF57 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULHIEUH
+84A7 AF58 # HANGUL SYLLABLE SSANGKIYEOK-WA-MIEUM
+84A8 AF59 # HANGUL SYLLABLE SSANGKIYEOK-WA-PIEUP
+84A9 AF5A # HANGUL SYLLABLE SSANGKIYEOK-WA-PIEUPSIOS
+84AA AF5B # HANGUL SYLLABLE SSANGKIYEOK-WA-SIOS
+84AB AF5E # HANGUL SYLLABLE SSANGKIYEOK-WA-CIEUC
+84AC AF5F # HANGUL SYLLABLE SSANGKIYEOK-WA-CHIEUCH
+84AD AF60 # HANGUL SYLLABLE SSANGKIYEOK-WA-KHIEUKH
+84AE AF61 # HANGUL SYLLABLE SSANGKIYEOK-WA-THIEUTH
+84AF AF62 # HANGUL SYLLABLE SSANGKIYEOK-WA-PHIEUPH
+84B0 AF63 # HANGUL SYLLABLE SSANGKIYEOK-WA-HIEUH
+84B1 AF66 # HANGUL SYLLABLE SSANGKIYEOK-WAE-SSANGKIYEOK
+84B2 AF67 # HANGUL SYLLABLE SSANGKIYEOK-WAE-KIYEOKSIOS
+84B3 AF68 # HANGUL SYLLABLE SSANGKIYEOK-WAE-NIEUN
+84B4 AF69 # HANGUL SYLLABLE SSANGKIYEOK-WAE-NIEUNCIEUC
+84B5 AF6A # HANGUL SYLLABLE SSANGKIYEOK-WAE-NIEUNHIEUH
+84B6 AF6B # HANGUL SYLLABLE SSANGKIYEOK-WAE-TIKEUT
+84B7 AF6C # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEUL
+84B8 AF6D # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULKIYEOK
+84B9 AF6E # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULMIEUM
+84BA AF6F # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULPIEUP
+84BB AF70 # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULSIOS
+84BC AF71 # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULTHIEUTH
+84BD AF72 # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULPHIEUPH
+84BE AF73 # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULHIEUH
+84BF AF74 # HANGUL SYLLABLE SSANGKIYEOK-WAE-MIEUM
+84C0 AF75 # HANGUL SYLLABLE SSANGKIYEOK-WAE-PIEUP
+84C1 AF76 # HANGUL SYLLABLE SSANGKIYEOK-WAE-PIEUPSIOS
+84C2 AF77 # HANGUL SYLLABLE SSANGKIYEOK-WAE-SIOS
+84C3 AF78 # HANGUL SYLLABLE SSANGKIYEOK-WAE-SSANGSIOS
+84C4 AF7A # HANGUL SYLLABLE SSANGKIYEOK-WAE-CIEUC
+84C5 AF7B # HANGUL SYLLABLE SSANGKIYEOK-WAE-CHIEUCH
+84C6 AF7C # HANGUL SYLLABLE SSANGKIYEOK-WAE-KHIEUKH
+84C7 AF7D # HANGUL SYLLABLE SSANGKIYEOK-WAE-THIEUTH
+84C8 AF7E # HANGUL SYLLABLE SSANGKIYEOK-WAE-PHIEUPH
+84C9 AF7F # HANGUL SYLLABLE SSANGKIYEOK-WAE-HIEUH
+84CA AF81 # HANGUL SYLLABLE SSANGKIYEOK-OE-KIYEOK
+84CB AF82 # HANGUL SYLLABLE SSANGKIYEOK-OE-SSANGKIYEOK
+84CC AF83 # HANGUL SYLLABLE SSANGKIYEOK-OE-KIYEOKSIOS
+84CD AF85 # HANGUL SYLLABLE SSANGKIYEOK-OE-NIEUNCIEUC
+84CE AF86 # HANGUL SYLLABLE SSANGKIYEOK-OE-NIEUNHIEUH
+84CF AF87 # HANGUL SYLLABLE SSANGKIYEOK-OE-TIKEUT
+84D0 AF89 # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULKIYEOK
+84D1 AF8A # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULMIEUM
+84D2 AF8B # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULPIEUP
+84D3 AF8C # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULSIOS
+84D4 AF8D # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULTHIEUTH
+84D5 AF8E # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULPHIEUPH
+84D6 AF8F # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULHIEUH
+84D7 AF92 # HANGUL SYLLABLE SSANGKIYEOK-OE-PIEUPSIOS
+84D8 AF93 # HANGUL SYLLABLE SSANGKIYEOK-OE-SIOS
+84D9 AF94 # HANGUL SYLLABLE SSANGKIYEOK-OE-SSANGSIOS
+84DA AF96 # HANGUL SYLLABLE SSANGKIYEOK-OE-CIEUC
+84DB AF97 # HANGUL SYLLABLE SSANGKIYEOK-OE-CHIEUCH
+84DC AF98 # HANGUL SYLLABLE SSANGKIYEOK-OE-KHIEUKH
+84DD AF99 # HANGUL SYLLABLE SSANGKIYEOK-OE-THIEUTH
+84DE AF9A # HANGUL SYLLABLE SSANGKIYEOK-OE-PHIEUPH
+84DF AF9B # HANGUL SYLLABLE SSANGKIYEOK-OE-HIEUH
+84E0 AF9D # HANGUL SYLLABLE SSANGKIYEOK-YO-KIYEOK
+84E1 AF9E # HANGUL SYLLABLE SSANGKIYEOK-YO-SSANGKIYEOK
+84E2 AF9F # HANGUL SYLLABLE SSANGKIYEOK-YO-KIYEOKSIOS
+84E3 AFA0 # HANGUL SYLLABLE SSANGKIYEOK-YO-NIEUN
+84E4 AFA1 # HANGUL SYLLABLE SSANGKIYEOK-YO-NIEUNCIEUC
+84E5 AFA2 # HANGUL SYLLABLE SSANGKIYEOK-YO-NIEUNHIEUH
+84E6 AFA3 # HANGUL SYLLABLE SSANGKIYEOK-YO-TIKEUT
+84E7 AFA4 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEUL
+84E8 AFA5 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULKIYEOK
+84E9 AFA6 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULMIEUM
+84EA AFA7 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULPIEUP
+84EB AFA8 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULSIOS
+84EC AFA9 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULTHIEUTH
+84ED AFAA # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULPHIEUPH
+84EE AFAB # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULHIEUH
+84EF AFAC # HANGUL SYLLABLE SSANGKIYEOK-YO-MIEUM
+84F0 AFAD # HANGUL SYLLABLE SSANGKIYEOK-YO-PIEUP
+84F1 AFAE # HANGUL SYLLABLE SSANGKIYEOK-YO-PIEUPSIOS
+84F2 AFAF # HANGUL SYLLABLE SSANGKIYEOK-YO-SIOS
+84F3 AFB0 # HANGUL SYLLABLE SSANGKIYEOK-YO-SSANGSIOS
+84F4 AFB1 # HANGUL SYLLABLE SSANGKIYEOK-YO-IEUNG
+84F5 AFB2 # HANGUL SYLLABLE SSANGKIYEOK-YO-CIEUC
+84F6 AFB3 # HANGUL SYLLABLE SSANGKIYEOK-YO-CHIEUCH
+84F7 AFB4 # HANGUL SYLLABLE SSANGKIYEOK-YO-KHIEUKH
+84F8 AFB5 # HANGUL SYLLABLE SSANGKIYEOK-YO-THIEUTH
+84F9 AFB6 # HANGUL SYLLABLE SSANGKIYEOK-YO-PHIEUPH
+84FA AFB7 # HANGUL SYLLABLE SSANGKIYEOK-YO-HIEUH
+84FB AFBA # HANGUL SYLLABLE SSANGKIYEOK-U-SSANGKIYEOK
+84FC AFBB # HANGUL SYLLABLE SSANGKIYEOK-U-KIYEOKSIOS
+84FD AFBD # HANGUL SYLLABLE SSANGKIYEOK-U-NIEUNCIEUC
+84FE AFBE # HANGUL SYLLABLE SSANGKIYEOK-U-NIEUNHIEUH
+8541 AFBF # HANGUL SYLLABLE SSANGKIYEOK-U-TIKEUT
+8542 AFC1 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULKIYEOK
+8543 AFC2 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULMIEUM
+8544 AFC3 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULPIEUP
+8545 AFC4 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULSIOS
+8546 AFC5 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULTHIEUTH
+8547 AFC6 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULPHIEUPH
+8548 AFCA # HANGUL SYLLABLE SSANGKIYEOK-U-PIEUPSIOS
+8549 AFCC # HANGUL SYLLABLE SSANGKIYEOK-U-SSANGSIOS
+854A AFCF # HANGUL SYLLABLE SSANGKIYEOK-U-CHIEUCH
+854B AFD0 # HANGUL SYLLABLE SSANGKIYEOK-U-KHIEUKH
+854C AFD1 # HANGUL SYLLABLE SSANGKIYEOK-U-THIEUTH
+854D AFD2 # HANGUL SYLLABLE SSANGKIYEOK-U-PHIEUPH
+854E AFD3 # HANGUL SYLLABLE SSANGKIYEOK-U-HIEUH
+854F AFD5 # HANGUL SYLLABLE SSANGKIYEOK-WEO-KIYEOK
+8550 AFD6 # HANGUL SYLLABLE SSANGKIYEOK-WEO-SSANGKIYEOK
+8551 AFD7 # HANGUL SYLLABLE SSANGKIYEOK-WEO-KIYEOKSIOS
+8552 AFD8 # HANGUL SYLLABLE SSANGKIYEOK-WEO-NIEUN
+8553 AFD9 # HANGUL SYLLABLE SSANGKIYEOK-WEO-NIEUNCIEUC
+8554 AFDA # HANGUL SYLLABLE SSANGKIYEOK-WEO-NIEUNHIEUH
+8555 AFDB # HANGUL SYLLABLE SSANGKIYEOK-WEO-TIKEUT
+8556 AFDD # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULKIYEOK
+8557 AFDE # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULMIEUM
+8558 AFDF # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULPIEUP
+8559 AFE0 # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULSIOS
+855A AFE1 # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULTHIEUTH
+8561 AFE2 # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULPHIEUPH
+8562 AFE3 # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULHIEUH
+8563 AFE4 # HANGUL SYLLABLE SSANGKIYEOK-WEO-MIEUM
+8564 AFE5 # HANGUL SYLLABLE SSANGKIYEOK-WEO-PIEUP
+8565 AFE6 # HANGUL SYLLABLE SSANGKIYEOK-WEO-PIEUPSIOS
+8566 AFE7 # HANGUL SYLLABLE SSANGKIYEOK-WEO-SIOS
+8567 AFEA # HANGUL SYLLABLE SSANGKIYEOK-WEO-CIEUC
+8568 AFEB # HANGUL SYLLABLE SSANGKIYEOK-WEO-CHIEUCH
+8569 AFEC # HANGUL SYLLABLE SSANGKIYEOK-WEO-KHIEUKH
+856A AFED # HANGUL SYLLABLE SSANGKIYEOK-WEO-THIEUTH
+856B AFEE # HANGUL SYLLABLE SSANGKIYEOK-WEO-PHIEUPH
+856C AFEF # HANGUL SYLLABLE SSANGKIYEOK-WEO-HIEUH
+856D AFF2 # HANGUL SYLLABLE SSANGKIYEOK-WE-SSANGKIYEOK
+856E AFF3 # HANGUL SYLLABLE SSANGKIYEOK-WE-KIYEOKSIOS
+856F AFF5 # HANGUL SYLLABLE SSANGKIYEOK-WE-NIEUNCIEUC
+8570 AFF6 # HANGUL SYLLABLE SSANGKIYEOK-WE-NIEUNHIEUH
+8571 AFF7 # HANGUL SYLLABLE SSANGKIYEOK-WE-TIKEUT
+8572 AFF9 # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULKIYEOK
+8573 AFFA # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULMIEUM
+8574 AFFB # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULPIEUP
+8575 AFFC # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULSIOS
+8576 AFFD # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULTHIEUTH
+8577 AFFE # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULPHIEUPH
+8578 AFFF # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULHIEUH
+8579 B002 # HANGUL SYLLABLE SSANGKIYEOK-WE-PIEUPSIOS
+857A B003 # HANGUL SYLLABLE SSANGKIYEOK-WE-SIOS
+8581 B005 # HANGUL SYLLABLE SSANGKIYEOK-WE-IEUNG
+8582 B006 # HANGUL SYLLABLE SSANGKIYEOK-WE-CIEUC
+8583 B007 # HANGUL SYLLABLE SSANGKIYEOK-WE-CHIEUCH
+8584 B008 # HANGUL SYLLABLE SSANGKIYEOK-WE-KHIEUKH
+8585 B009 # HANGUL SYLLABLE SSANGKIYEOK-WE-THIEUTH
+8586 B00A # HANGUL SYLLABLE SSANGKIYEOK-WE-PHIEUPH
+8587 B00B # HANGUL SYLLABLE SSANGKIYEOK-WE-HIEUH
+8588 B00D # HANGUL SYLLABLE SSANGKIYEOK-WI-KIYEOK
+8589 B00E # HANGUL SYLLABLE SSANGKIYEOK-WI-SSANGKIYEOK
+858A B00F # HANGUL SYLLABLE SSANGKIYEOK-WI-KIYEOKSIOS
+858B B011 # HANGUL SYLLABLE SSANGKIYEOK-WI-NIEUNCIEUC
+858C B012 # HANGUL SYLLABLE SSANGKIYEOK-WI-NIEUNHIEUH
+858D B013 # HANGUL SYLLABLE SSANGKIYEOK-WI-TIKEUT
+858E B015 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULKIYEOK
+858F B016 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULMIEUM
+8590 B017 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULPIEUP
+8591 B018 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULSIOS
+8592 B019 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULTHIEUTH
+8593 B01A # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULPHIEUPH
+8594 B01B # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULHIEUH
+8595 B01E # HANGUL SYLLABLE SSANGKIYEOK-WI-PIEUPSIOS
+8596 B01F # HANGUL SYLLABLE SSANGKIYEOK-WI-SIOS
+8597 B020 # HANGUL SYLLABLE SSANGKIYEOK-WI-SSANGSIOS
+8598 B021 # HANGUL SYLLABLE SSANGKIYEOK-WI-IEUNG
+8599 B022 # HANGUL SYLLABLE SSANGKIYEOK-WI-CIEUC
+859A B023 # HANGUL SYLLABLE SSANGKIYEOK-WI-CHIEUCH
+859B B024 # HANGUL SYLLABLE SSANGKIYEOK-WI-KHIEUKH
+859C B025 # HANGUL SYLLABLE SSANGKIYEOK-WI-THIEUTH
+859D B026 # HANGUL SYLLABLE SSANGKIYEOK-WI-PHIEUPH
+859E B027 # HANGUL SYLLABLE SSANGKIYEOK-WI-HIEUH
+859F B029 # HANGUL SYLLABLE SSANGKIYEOK-YU-KIYEOK
+85A0 B02A # HANGUL SYLLABLE SSANGKIYEOK-YU-SSANGKIYEOK
+85A1 B02B # HANGUL SYLLABLE SSANGKIYEOK-YU-KIYEOKSIOS
+85A2 B02C # HANGUL SYLLABLE SSANGKIYEOK-YU-NIEUN
+85A3 B02D # HANGUL SYLLABLE SSANGKIYEOK-YU-NIEUNCIEUC
+85A4 B02E # HANGUL SYLLABLE SSANGKIYEOK-YU-NIEUNHIEUH
+85A5 B02F # HANGUL SYLLABLE SSANGKIYEOK-YU-TIKEUT
+85A6 B030 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEUL
+85A7 B031 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULKIYEOK
+85A8 B032 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULMIEUM
+85A9 B033 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULPIEUP
+85AA B034 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULSIOS
+85AB B035 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULTHIEUTH
+85AC B036 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULPHIEUPH
+85AD B037 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULHIEUH
+85AE B038 # HANGUL SYLLABLE SSANGKIYEOK-YU-MIEUM
+85AF B039 # HANGUL SYLLABLE SSANGKIYEOK-YU-PIEUP
+85B0 B03A # HANGUL SYLLABLE SSANGKIYEOK-YU-PIEUPSIOS
+85B1 B03B # HANGUL SYLLABLE SSANGKIYEOK-YU-SIOS
+85B2 B03C # HANGUL SYLLABLE SSANGKIYEOK-YU-SSANGSIOS
+85B3 B03D # HANGUL SYLLABLE SSANGKIYEOK-YU-IEUNG
+85B4 B03E # HANGUL SYLLABLE SSANGKIYEOK-YU-CIEUC
+85B5 B03F # HANGUL SYLLABLE SSANGKIYEOK-YU-CHIEUCH
+85B6 B040 # HANGUL SYLLABLE SSANGKIYEOK-YU-KHIEUKH
+85B7 B041 # HANGUL SYLLABLE SSANGKIYEOK-YU-THIEUTH
+85B8 B042 # HANGUL SYLLABLE SSANGKIYEOK-YU-PHIEUPH
+85B9 B043 # HANGUL SYLLABLE SSANGKIYEOK-YU-HIEUH
+85BA B046 # HANGUL SYLLABLE SSANGKIYEOK-EU-SSANGKIYEOK
+85BB B047 # HANGUL SYLLABLE SSANGKIYEOK-EU-KIYEOKSIOS
+85BC B049 # HANGUL SYLLABLE SSANGKIYEOK-EU-NIEUNCIEUC
+85BD B04B # HANGUL SYLLABLE SSANGKIYEOK-EU-TIKEUT
+85BE B04D # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULKIYEOK
+85BF B04F # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULPIEUP
+85C0 B050 # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULSIOS
+85C1 B051 # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULTHIEUTH
+85C2 B052 # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULPHIEUPH
+85C3 B056 # HANGUL SYLLABLE SSANGKIYEOK-EU-PIEUPSIOS
+85C4 B058 # HANGUL SYLLABLE SSANGKIYEOK-EU-SSANGSIOS
+85C5 B05A # HANGUL SYLLABLE SSANGKIYEOK-EU-CIEUC
+85C6 B05B # HANGUL SYLLABLE SSANGKIYEOK-EU-CHIEUCH
+85C7 B05C # HANGUL SYLLABLE SSANGKIYEOK-EU-KHIEUKH
+85C8 B05E # HANGUL SYLLABLE SSANGKIYEOK-EU-PHIEUPH
+85C9 B05F # HANGUL SYLLABLE SSANGKIYEOK-EU-HIEUH
+85CA B060 # HANGUL SYLLABLE SSANGKIYEOK-YI
+85CB B061 # HANGUL SYLLABLE SSANGKIYEOK-YI-KIYEOK
+85CC B062 # HANGUL SYLLABLE SSANGKIYEOK-YI-SSANGKIYEOK
+85CD B063 # HANGUL SYLLABLE SSANGKIYEOK-YI-KIYEOKSIOS
+85CE B064 # HANGUL SYLLABLE SSANGKIYEOK-YI-NIEUN
+85CF B065 # HANGUL SYLLABLE SSANGKIYEOK-YI-NIEUNCIEUC
+85D0 B066 # HANGUL SYLLABLE SSANGKIYEOK-YI-NIEUNHIEUH
+85D1 B067 # HANGUL SYLLABLE SSANGKIYEOK-YI-TIKEUT
+85D2 B068 # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEUL
+85D3 B069 # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULKIYEOK
+85D4 B06A # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULMIEUM
+85D5 B06B # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULPIEUP
+85D6 B06C # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULSIOS
+85D7 B06D # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULTHIEUTH
+85D8 B06E # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULPHIEUPH
+85D9 B06F # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULHIEUH
+85DA B070 # HANGUL SYLLABLE SSANGKIYEOK-YI-MIEUM
+85DB B071 # HANGUL SYLLABLE SSANGKIYEOK-YI-PIEUP
+85DC B072 # HANGUL SYLLABLE SSANGKIYEOK-YI-PIEUPSIOS
+85DD B073 # HANGUL SYLLABLE SSANGKIYEOK-YI-SIOS
+85DE B074 # HANGUL SYLLABLE SSANGKIYEOK-YI-SSANGSIOS
+85DF B075 # HANGUL SYLLABLE SSANGKIYEOK-YI-IEUNG
+85E0 B076 # HANGUL SYLLABLE SSANGKIYEOK-YI-CIEUC
+85E1 B077 # HANGUL SYLLABLE SSANGKIYEOK-YI-CHIEUCH
+85E2 B078 # HANGUL SYLLABLE SSANGKIYEOK-YI-KHIEUKH
+85E3 B079 # HANGUL SYLLABLE SSANGKIYEOK-YI-THIEUTH
+85E4 B07A # HANGUL SYLLABLE SSANGKIYEOK-YI-PHIEUPH
+85E5 B07B # HANGUL SYLLABLE SSANGKIYEOK-YI-HIEUH
+85E6 B07E # HANGUL SYLLABLE SSANGKIYEOK-I-SSANGKIYEOK
+85E7 B07F # HANGUL SYLLABLE SSANGKIYEOK-I-KIYEOKSIOS
+85E8 B081 # HANGUL SYLLABLE SSANGKIYEOK-I-NIEUNCIEUC
+85E9 B082 # HANGUL SYLLABLE SSANGKIYEOK-I-NIEUNHIEUH
+85EA B083 # HANGUL SYLLABLE SSANGKIYEOK-I-TIKEUT
+85EB B085 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULKIYEOK
+85EC B086 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULMIEUM
+85ED B087 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULPIEUP
+85EE B088 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULSIOS
+85EF B089 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULTHIEUTH
+85F0 B08A # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULPHIEUPH
+85F1 B08B # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULHIEUH
+85F2 B08E # HANGUL SYLLABLE SSANGKIYEOK-I-PIEUPSIOS
+85F3 B090 # HANGUL SYLLABLE SSANGKIYEOK-I-SSANGSIOS
+85F4 B092 # HANGUL SYLLABLE SSANGKIYEOK-I-CIEUC
+85F5 B093 # HANGUL SYLLABLE SSANGKIYEOK-I-CHIEUCH
+85F6 B094 # HANGUL SYLLABLE SSANGKIYEOK-I-KHIEUKH
+85F7 B095 # HANGUL SYLLABLE SSANGKIYEOK-I-THIEUTH
+85F8 B096 # HANGUL SYLLABLE SSANGKIYEOK-I-PHIEUPH
+85F9 B097 # HANGUL SYLLABLE SSANGKIYEOK-I-HIEUH
+85FA B09B # HANGUL SYLLABLE NIEUN-A-KIYEOKSIOS
+85FB B09D # HANGUL SYLLABLE NIEUN-A-NIEUNCIEUC
+85FC B09E # HANGUL SYLLABLE NIEUN-A-NIEUNHIEUH
+85FD B0A3 # HANGUL SYLLABLE NIEUN-A-RIEULPIEUP
+85FE B0A4 # HANGUL SYLLABLE NIEUN-A-RIEULSIOS
+8641 B0A5 # HANGUL SYLLABLE NIEUN-A-RIEULTHIEUTH
+8642 B0A6 # HANGUL SYLLABLE NIEUN-A-RIEULPHIEUPH
+8643 B0A7 # HANGUL SYLLABLE NIEUN-A-RIEULHIEUH
+8644 B0AA # HANGUL SYLLABLE NIEUN-A-PIEUPSIOS
+8645 B0B0 # HANGUL SYLLABLE NIEUN-A-KHIEUKH
+8646 B0B2 # HANGUL SYLLABLE NIEUN-A-PHIEUPH
+8647 B0B6 # HANGUL SYLLABLE NIEUN-AE-SSANGKIYEOK
+8648 B0B7 # HANGUL SYLLABLE NIEUN-AE-KIYEOKSIOS
+8649 B0B9 # HANGUL SYLLABLE NIEUN-AE-NIEUNCIEUC
+864A B0BA # HANGUL SYLLABLE NIEUN-AE-NIEUNHIEUH
+864B B0BB # HANGUL SYLLABLE NIEUN-AE-TIKEUT
+864C B0BD # HANGUL SYLLABLE NIEUN-AE-RIEULKIYEOK
+864D B0BE # HANGUL SYLLABLE NIEUN-AE-RIEULMIEUM
+864E B0BF # HANGUL SYLLABLE NIEUN-AE-RIEULPIEUP
+864F B0C0 # HANGUL SYLLABLE NIEUN-AE-RIEULSIOS
+8650 B0C1 # HANGUL SYLLABLE NIEUN-AE-RIEULTHIEUTH
+8651 B0C2 # HANGUL SYLLABLE NIEUN-AE-RIEULPHIEUPH
+8652 B0C3 # HANGUL SYLLABLE NIEUN-AE-RIEULHIEUH
+8653 B0C6 # HANGUL SYLLABLE NIEUN-AE-PIEUPSIOS
+8654 B0CA # HANGUL SYLLABLE NIEUN-AE-CIEUC
+8655 B0CB # HANGUL SYLLABLE NIEUN-AE-CHIEUCH
+8656 B0CC # HANGUL SYLLABLE NIEUN-AE-KHIEUKH
+8657 B0CD # HANGUL SYLLABLE NIEUN-AE-THIEUTH
+8658 B0CE # HANGUL SYLLABLE NIEUN-AE-PHIEUPH
+8659 B0CF # HANGUL SYLLABLE NIEUN-AE-HIEUH
+865A B0D2 # HANGUL SYLLABLE NIEUN-YA-SSANGKIYEOK
+8661 B0D3 # HANGUL SYLLABLE NIEUN-YA-KIYEOKSIOS
+8662 B0D5 # HANGUL SYLLABLE NIEUN-YA-NIEUNCIEUC
+8663 B0D6 # HANGUL SYLLABLE NIEUN-YA-NIEUNHIEUH
+8664 B0D7 # HANGUL SYLLABLE NIEUN-YA-TIKEUT
+8665 B0D9 # HANGUL SYLLABLE NIEUN-YA-RIEULKIYEOK
+8666 B0DA # HANGUL SYLLABLE NIEUN-YA-RIEULMIEUM
+8667 B0DB # HANGUL SYLLABLE NIEUN-YA-RIEULPIEUP
+8668 B0DC # HANGUL SYLLABLE NIEUN-YA-RIEULSIOS
+8669 B0DD # HANGUL SYLLABLE NIEUN-YA-RIEULTHIEUTH
+866A B0DE # HANGUL SYLLABLE NIEUN-YA-RIEULPHIEUPH
+866B B0DF # HANGUL SYLLABLE NIEUN-YA-RIEULHIEUH
+866C B0E1 # HANGUL SYLLABLE NIEUN-YA-PIEUP
+866D B0E2 # HANGUL SYLLABLE NIEUN-YA-PIEUPSIOS
+866E B0E3 # HANGUL SYLLABLE NIEUN-YA-SIOS
+866F B0E4 # HANGUL SYLLABLE NIEUN-YA-SSANGSIOS
+8670 B0E6 # HANGUL SYLLABLE NIEUN-YA-CIEUC
+8671 B0E7 # HANGUL SYLLABLE NIEUN-YA-CHIEUCH
+8672 B0E8 # HANGUL SYLLABLE NIEUN-YA-KHIEUKH
+8673 B0E9 # HANGUL SYLLABLE NIEUN-YA-THIEUTH
+8674 B0EA # HANGUL SYLLABLE NIEUN-YA-PHIEUPH
+8675 B0EB # HANGUL SYLLABLE NIEUN-YA-HIEUH
+8676 B0EC # HANGUL SYLLABLE NIEUN-YAE
+8677 B0ED # HANGUL SYLLABLE NIEUN-YAE-KIYEOK
+8678 B0EE # HANGUL SYLLABLE NIEUN-YAE-SSANGKIYEOK
+8679 B0EF # HANGUL SYLLABLE NIEUN-YAE-KIYEOKSIOS
+867A B0F0 # HANGUL SYLLABLE NIEUN-YAE-NIEUN
+8681 B0F1 # HANGUL SYLLABLE NIEUN-YAE-NIEUNCIEUC
+8682 B0F2 # HANGUL SYLLABLE NIEUN-YAE-NIEUNHIEUH
+8683 B0F3 # HANGUL SYLLABLE NIEUN-YAE-TIKEUT
+8684 B0F4 # HANGUL SYLLABLE NIEUN-YAE-RIEUL
+8685 B0F5 # HANGUL SYLLABLE NIEUN-YAE-RIEULKIYEOK
+8686 B0F6 # HANGUL SYLLABLE NIEUN-YAE-RIEULMIEUM
+8687 B0F7 # HANGUL SYLLABLE NIEUN-YAE-RIEULPIEUP
+8688 B0F8 # HANGUL SYLLABLE NIEUN-YAE-RIEULSIOS
+8689 B0F9 # HANGUL SYLLABLE NIEUN-YAE-RIEULTHIEUTH
+868A B0FA # HANGUL SYLLABLE NIEUN-YAE-RIEULPHIEUPH
+868B B0FB # HANGUL SYLLABLE NIEUN-YAE-RIEULHIEUH
+868C B0FC # HANGUL SYLLABLE NIEUN-YAE-MIEUM
+868D B0FD # HANGUL SYLLABLE NIEUN-YAE-PIEUP
+868E B0FE # HANGUL SYLLABLE NIEUN-YAE-PIEUPSIOS
+868F B0FF # HANGUL SYLLABLE NIEUN-YAE-SIOS
+8690 B100 # HANGUL SYLLABLE NIEUN-YAE-SSANGSIOS
+8691 B101 # HANGUL SYLLABLE NIEUN-YAE-IEUNG
+8692 B102 # HANGUL SYLLABLE NIEUN-YAE-CIEUC
+8693 B103 # HANGUL SYLLABLE NIEUN-YAE-CHIEUCH
+8694 B104 # HANGUL SYLLABLE NIEUN-YAE-KHIEUKH
+8695 B105 # HANGUL SYLLABLE NIEUN-YAE-THIEUTH
+8696 B106 # HANGUL SYLLABLE NIEUN-YAE-PHIEUPH
+8697 B107 # HANGUL SYLLABLE NIEUN-YAE-HIEUH
+8698 B10A # HANGUL SYLLABLE NIEUN-EO-SSANGKIYEOK
+8699 B10D # HANGUL SYLLABLE NIEUN-EO-NIEUNCIEUC
+869A B10E # HANGUL SYLLABLE NIEUN-EO-NIEUNHIEUH
+869B B10F # HANGUL SYLLABLE NIEUN-EO-TIKEUT
+869C B111 # HANGUL SYLLABLE NIEUN-EO-RIEULKIYEOK
+869D B114 # HANGUL SYLLABLE NIEUN-EO-RIEULSIOS
+869E B115 # HANGUL SYLLABLE NIEUN-EO-RIEULTHIEUTH
+869F B116 # HANGUL SYLLABLE NIEUN-EO-RIEULPHIEUPH
+86A0 B117 # HANGUL SYLLABLE NIEUN-EO-RIEULHIEUH
+86A1 B11A # HANGUL SYLLABLE NIEUN-EO-PIEUPSIOS
+86A2 B11E # HANGUL SYLLABLE NIEUN-EO-CIEUC
+86A3 B11F # HANGUL SYLLABLE NIEUN-EO-CHIEUCH
+86A4 B120 # HANGUL SYLLABLE NIEUN-EO-KHIEUKH
+86A5 B121 # HANGUL SYLLABLE NIEUN-EO-THIEUTH
+86A6 B122 # HANGUL SYLLABLE NIEUN-EO-PHIEUPH
+86A7 B126 # HANGUL SYLLABLE NIEUN-E-SSANGKIYEOK
+86A8 B127 # HANGUL SYLLABLE NIEUN-E-KIYEOKSIOS
+86A9 B129 # HANGUL SYLLABLE NIEUN-E-NIEUNCIEUC
+86AA B12A # HANGUL SYLLABLE NIEUN-E-NIEUNHIEUH
+86AB B12B # HANGUL SYLLABLE NIEUN-E-TIKEUT
+86AC B12D # HANGUL SYLLABLE NIEUN-E-RIEULKIYEOK
+86AD B12E # HANGUL SYLLABLE NIEUN-E-RIEULMIEUM
+86AE B12F # HANGUL SYLLABLE NIEUN-E-RIEULPIEUP
+86AF B130 # HANGUL SYLLABLE NIEUN-E-RIEULSIOS
+86B0 B131 # HANGUL SYLLABLE NIEUN-E-RIEULTHIEUTH
+86B1 B132 # HANGUL SYLLABLE NIEUN-E-RIEULPHIEUPH
+86B2 B133 # HANGUL SYLLABLE NIEUN-E-RIEULHIEUH
+86B3 B136 # HANGUL SYLLABLE NIEUN-E-PIEUPSIOS
+86B4 B13A # HANGUL SYLLABLE NIEUN-E-CIEUC
+86B5 B13B # HANGUL SYLLABLE NIEUN-E-CHIEUCH
+86B6 B13C # HANGUL SYLLABLE NIEUN-E-KHIEUKH
+86B7 B13D # HANGUL SYLLABLE NIEUN-E-THIEUTH
+86B8 B13E # HANGUL SYLLABLE NIEUN-E-PHIEUPH
+86B9 B13F # HANGUL SYLLABLE NIEUN-E-HIEUH
+86BA B142 # HANGUL SYLLABLE NIEUN-YEO-SSANGKIYEOK
+86BB B143 # HANGUL SYLLABLE NIEUN-YEO-KIYEOKSIOS
+86BC B145 # HANGUL SYLLABLE NIEUN-YEO-NIEUNCIEUC
+86BD B146 # HANGUL SYLLABLE NIEUN-YEO-NIEUNHIEUH
+86BE B147 # HANGUL SYLLABLE NIEUN-YEO-TIKEUT
+86BF B149 # HANGUL SYLLABLE NIEUN-YEO-RIEULKIYEOK
+86C0 B14A # HANGUL SYLLABLE NIEUN-YEO-RIEULMIEUM
+86C1 B14B # HANGUL SYLLABLE NIEUN-YEO-RIEULPIEUP
+86C2 B14C # HANGUL SYLLABLE NIEUN-YEO-RIEULSIOS
+86C3 B14D # HANGUL SYLLABLE NIEUN-YEO-RIEULTHIEUTH
+86C4 B14E # HANGUL SYLLABLE NIEUN-YEO-RIEULPHIEUPH
+86C5 B14F # HANGUL SYLLABLE NIEUN-YEO-RIEULHIEUH
+86C6 B152 # HANGUL SYLLABLE NIEUN-YEO-PIEUPSIOS
+86C7 B153 # HANGUL SYLLABLE NIEUN-YEO-SIOS
+86C8 B156 # HANGUL SYLLABLE NIEUN-YEO-CIEUC
+86C9 B157 # HANGUL SYLLABLE NIEUN-YEO-CHIEUCH
+86CA B159 # HANGUL SYLLABLE NIEUN-YEO-THIEUTH
+86CB B15A # HANGUL SYLLABLE NIEUN-YEO-PHIEUPH
+86CC B15B # HANGUL SYLLABLE NIEUN-YEO-HIEUH
+86CD B15D # HANGUL SYLLABLE NIEUN-YE-KIYEOK
+86CE B15E # HANGUL SYLLABLE NIEUN-YE-SSANGKIYEOK
+86CF B15F # HANGUL SYLLABLE NIEUN-YE-KIYEOKSIOS
+86D0 B161 # HANGUL SYLLABLE NIEUN-YE-NIEUNCIEUC
+86D1 B162 # HANGUL SYLLABLE NIEUN-YE-NIEUNHIEUH
+86D2 B163 # HANGUL SYLLABLE NIEUN-YE-TIKEUT
+86D3 B164 # HANGUL SYLLABLE NIEUN-YE-RIEUL
+86D4 B165 # HANGUL SYLLABLE NIEUN-YE-RIEULKIYEOK
+86D5 B166 # HANGUL SYLLABLE NIEUN-YE-RIEULMIEUM
+86D6 B167 # HANGUL SYLLABLE NIEUN-YE-RIEULPIEUP
+86D7 B168 # HANGUL SYLLABLE NIEUN-YE-RIEULSIOS
+86D8 B169 # HANGUL SYLLABLE NIEUN-YE-RIEULTHIEUTH
+86D9 B16A # HANGUL SYLLABLE NIEUN-YE-RIEULPHIEUPH
+86DA B16B # HANGUL SYLLABLE NIEUN-YE-RIEULHIEUH
+86DB B16C # HANGUL SYLLABLE NIEUN-YE-MIEUM
+86DC B16D # HANGUL SYLLABLE NIEUN-YE-PIEUP
+86DD B16E # HANGUL SYLLABLE NIEUN-YE-PIEUPSIOS
+86DE B16F # HANGUL SYLLABLE NIEUN-YE-SIOS
+86DF B170 # HANGUL SYLLABLE NIEUN-YE-SSANGSIOS
+86E0 B171 # HANGUL SYLLABLE NIEUN-YE-IEUNG
+86E1 B172 # HANGUL SYLLABLE NIEUN-YE-CIEUC
+86E2 B173 # HANGUL SYLLABLE NIEUN-YE-CHIEUCH
+86E3 B174 # HANGUL SYLLABLE NIEUN-YE-KHIEUKH
+86E4 B175 # HANGUL SYLLABLE NIEUN-YE-THIEUTH
+86E5 B176 # HANGUL SYLLABLE NIEUN-YE-PHIEUPH
+86E6 B177 # HANGUL SYLLABLE NIEUN-YE-HIEUH
+86E7 B17A # HANGUL SYLLABLE NIEUN-O-SSANGKIYEOK
+86E8 B17B # HANGUL SYLLABLE NIEUN-O-KIYEOKSIOS
+86E9 B17D # HANGUL SYLLABLE NIEUN-O-NIEUNCIEUC
+86EA B17E # HANGUL SYLLABLE NIEUN-O-NIEUNHIEUH
+86EB B17F # HANGUL SYLLABLE NIEUN-O-TIKEUT
+86EC B181 # HANGUL SYLLABLE NIEUN-O-RIEULKIYEOK
+86ED B183 # HANGUL SYLLABLE NIEUN-O-RIEULPIEUP
+86EE B184 # HANGUL SYLLABLE NIEUN-O-RIEULSIOS
+86EF B185 # HANGUL SYLLABLE NIEUN-O-RIEULTHIEUTH
+86F0 B186 # HANGUL SYLLABLE NIEUN-O-RIEULPHIEUPH
+86F1 B187 # HANGUL SYLLABLE NIEUN-O-RIEULHIEUH
+86F2 B18A # HANGUL SYLLABLE NIEUN-O-PIEUPSIOS
+86F3 B18C # HANGUL SYLLABLE NIEUN-O-SSANGSIOS
+86F4 B18E # HANGUL SYLLABLE NIEUN-O-CIEUC
+86F5 B18F # HANGUL SYLLABLE NIEUN-O-CHIEUCH
+86F6 B190 # HANGUL SYLLABLE NIEUN-O-KHIEUKH
+86F7 B191 # HANGUL SYLLABLE NIEUN-O-THIEUTH
+86F8 B195 # HANGUL SYLLABLE NIEUN-WA-KIYEOK
+86F9 B196 # HANGUL SYLLABLE NIEUN-WA-SSANGKIYEOK
+86FA B197 # HANGUL SYLLABLE NIEUN-WA-KIYEOKSIOS
+86FB B199 # HANGUL SYLLABLE NIEUN-WA-NIEUNCIEUC
+86FC B19A # HANGUL SYLLABLE NIEUN-WA-NIEUNHIEUH
+86FD B19B # HANGUL SYLLABLE NIEUN-WA-TIKEUT
+86FE B19D # HANGUL SYLLABLE NIEUN-WA-RIEULKIYEOK
+8741 B19E # HANGUL SYLLABLE NIEUN-WA-RIEULMIEUM
+8742 B19F # HANGUL SYLLABLE NIEUN-WA-RIEULPIEUP
+8743 B1A0 # HANGUL SYLLABLE NIEUN-WA-RIEULSIOS
+8744 B1A1 # HANGUL SYLLABLE NIEUN-WA-RIEULTHIEUTH
+8745 B1A2 # HANGUL SYLLABLE NIEUN-WA-RIEULPHIEUPH
+8746 B1A3 # HANGUL SYLLABLE NIEUN-WA-RIEULHIEUH
+8747 B1A4 # HANGUL SYLLABLE NIEUN-WA-MIEUM
+8748 B1A5 # HANGUL SYLLABLE NIEUN-WA-PIEUP
+8749 B1A6 # HANGUL SYLLABLE NIEUN-WA-PIEUPSIOS
+874A B1A7 # HANGUL SYLLABLE NIEUN-WA-SIOS
+874B B1A9 # HANGUL SYLLABLE NIEUN-WA-IEUNG
+874C B1AA # HANGUL SYLLABLE NIEUN-WA-CIEUC
+874D B1AB # HANGUL SYLLABLE NIEUN-WA-CHIEUCH
+874E B1AC # HANGUL SYLLABLE NIEUN-WA-KHIEUKH
+874F B1AD # HANGUL SYLLABLE NIEUN-WA-THIEUTH
+8750 B1AE # HANGUL SYLLABLE NIEUN-WA-PHIEUPH
+8751 B1AF # HANGUL SYLLABLE NIEUN-WA-HIEUH
+8752 B1B0 # HANGUL SYLLABLE NIEUN-WAE
+8753 B1B1 # HANGUL SYLLABLE NIEUN-WAE-KIYEOK
+8754 B1B2 # HANGUL SYLLABLE NIEUN-WAE-SSANGKIYEOK
+8755 B1B3 # HANGUL SYLLABLE NIEUN-WAE-KIYEOKSIOS
+8756 B1B4 # HANGUL SYLLABLE NIEUN-WAE-NIEUN
+8757 B1B5 # HANGUL SYLLABLE NIEUN-WAE-NIEUNCIEUC
+8758 B1B6 # HANGUL SYLLABLE NIEUN-WAE-NIEUNHIEUH
+8759 B1B7 # HANGUL SYLLABLE NIEUN-WAE-TIKEUT
+875A B1B8 # HANGUL SYLLABLE NIEUN-WAE-RIEUL
+8761 B1B9 # HANGUL SYLLABLE NIEUN-WAE-RIEULKIYEOK
+8762 B1BA # HANGUL SYLLABLE NIEUN-WAE-RIEULMIEUM
+8763 B1BB # HANGUL SYLLABLE NIEUN-WAE-RIEULPIEUP
+8764 B1BC # HANGUL SYLLABLE NIEUN-WAE-RIEULSIOS
+8765 B1BD # HANGUL SYLLABLE NIEUN-WAE-RIEULTHIEUTH
+8766 B1BE # HANGUL SYLLABLE NIEUN-WAE-RIEULPHIEUPH
+8767 B1BF # HANGUL SYLLABLE NIEUN-WAE-RIEULHIEUH
+8768 B1C0 # HANGUL SYLLABLE NIEUN-WAE-MIEUM
+8769 B1C1 # HANGUL SYLLABLE NIEUN-WAE-PIEUP
+876A B1C2 # HANGUL SYLLABLE NIEUN-WAE-PIEUPSIOS
+876B B1C3 # HANGUL SYLLABLE NIEUN-WAE-SIOS
+876C B1C4 # HANGUL SYLLABLE NIEUN-WAE-SSANGSIOS
+876D B1C5 # HANGUL SYLLABLE NIEUN-WAE-IEUNG
+876E B1C6 # HANGUL SYLLABLE NIEUN-WAE-CIEUC
+876F B1C7 # HANGUL SYLLABLE NIEUN-WAE-CHIEUCH
+8770 B1C8 # HANGUL SYLLABLE NIEUN-WAE-KHIEUKH
+8771 B1C9 # HANGUL SYLLABLE NIEUN-WAE-THIEUTH
+8772 B1CA # HANGUL SYLLABLE NIEUN-WAE-PHIEUPH
+8773 B1CB # HANGUL SYLLABLE NIEUN-WAE-HIEUH
+8774 B1CD # HANGUL SYLLABLE NIEUN-OE-KIYEOK
+8775 B1CE # HANGUL SYLLABLE NIEUN-OE-SSANGKIYEOK
+8776 B1CF # HANGUL SYLLABLE NIEUN-OE-KIYEOKSIOS
+8777 B1D1 # HANGUL SYLLABLE NIEUN-OE-NIEUNCIEUC
+8778 B1D2 # HANGUL SYLLABLE NIEUN-OE-NIEUNHIEUH
+8779 B1D3 # HANGUL SYLLABLE NIEUN-OE-TIKEUT
+877A B1D5 # HANGUL SYLLABLE NIEUN-OE-RIEULKIYEOK
+8781 B1D6 # HANGUL SYLLABLE NIEUN-OE-RIEULMIEUM
+8782 B1D7 # HANGUL SYLLABLE NIEUN-OE-RIEULPIEUP
+8783 B1D8 # HANGUL SYLLABLE NIEUN-OE-RIEULSIOS
+8784 B1D9 # HANGUL SYLLABLE NIEUN-OE-RIEULTHIEUTH
+8785 B1DA # HANGUL SYLLABLE NIEUN-OE-RIEULPHIEUPH
+8786 B1DB # HANGUL SYLLABLE NIEUN-OE-RIEULHIEUH
+8787 B1DE # HANGUL SYLLABLE NIEUN-OE-PIEUPSIOS
+8788 B1E0 # HANGUL SYLLABLE NIEUN-OE-SSANGSIOS
+8789 B1E1 # HANGUL SYLLABLE NIEUN-OE-IEUNG
+878A B1E2 # HANGUL SYLLABLE NIEUN-OE-CIEUC
+878B B1E3 # HANGUL SYLLABLE NIEUN-OE-CHIEUCH
+878C B1E4 # HANGUL SYLLABLE NIEUN-OE-KHIEUKH
+878D B1E5 # HANGUL SYLLABLE NIEUN-OE-THIEUTH
+878E B1E6 # HANGUL SYLLABLE NIEUN-OE-PHIEUPH
+878F B1E7 # HANGUL SYLLABLE NIEUN-OE-HIEUH
+8790 B1EA # HANGUL SYLLABLE NIEUN-YO-SSANGKIYEOK
+8791 B1EB # HANGUL SYLLABLE NIEUN-YO-KIYEOKSIOS
+8792 B1ED # HANGUL SYLLABLE NIEUN-YO-NIEUNCIEUC
+8793 B1EE # HANGUL SYLLABLE NIEUN-YO-NIEUNHIEUH
+8794 B1EF # HANGUL SYLLABLE NIEUN-YO-TIKEUT
+8795 B1F1 # HANGUL SYLLABLE NIEUN-YO-RIEULKIYEOK
+8796 B1F2 # HANGUL SYLLABLE NIEUN-YO-RIEULMIEUM
+8797 B1F3 # HANGUL SYLLABLE NIEUN-YO-RIEULPIEUP
+8798 B1F4 # HANGUL SYLLABLE NIEUN-YO-RIEULSIOS
+8799 B1F5 # HANGUL SYLLABLE NIEUN-YO-RIEULTHIEUTH
+879A B1F6 # HANGUL SYLLABLE NIEUN-YO-RIEULPHIEUPH
+879B B1F7 # HANGUL SYLLABLE NIEUN-YO-RIEULHIEUH
+879C B1F8 # HANGUL SYLLABLE NIEUN-YO-MIEUM
+879D B1FA # HANGUL SYLLABLE NIEUN-YO-PIEUPSIOS
+879E B1FC # HANGUL SYLLABLE NIEUN-YO-SSANGSIOS
+879F B1FE # HANGUL SYLLABLE NIEUN-YO-CIEUC
+87A0 B1FF # HANGUL SYLLABLE NIEUN-YO-CHIEUCH
+87A1 B200 # HANGUL SYLLABLE NIEUN-YO-KHIEUKH
+87A2 B201 # HANGUL SYLLABLE NIEUN-YO-THIEUTH
+87A3 B202 # HANGUL SYLLABLE NIEUN-YO-PHIEUPH
+87A4 B203 # HANGUL SYLLABLE NIEUN-YO-HIEUH
+87A5 B206 # HANGUL SYLLABLE NIEUN-U-SSANGKIYEOK
+87A6 B207 # HANGUL SYLLABLE NIEUN-U-KIYEOKSIOS
+87A7 B209 # HANGUL SYLLABLE NIEUN-U-NIEUNCIEUC
+87A8 B20A # HANGUL SYLLABLE NIEUN-U-NIEUNHIEUH
+87A9 B20D # HANGUL SYLLABLE NIEUN-U-RIEULKIYEOK
+87AA B20E # HANGUL SYLLABLE NIEUN-U-RIEULMIEUM
+87AB B20F # HANGUL SYLLABLE NIEUN-U-RIEULPIEUP
+87AC B210 # HANGUL SYLLABLE NIEUN-U-RIEULSIOS
+87AD B211 # HANGUL SYLLABLE NIEUN-U-RIEULTHIEUTH
+87AE B212 # HANGUL SYLLABLE NIEUN-U-RIEULPHIEUPH
+87AF B213 # HANGUL SYLLABLE NIEUN-U-RIEULHIEUH
+87B0 B216 # HANGUL SYLLABLE NIEUN-U-PIEUPSIOS
+87B1 B218 # HANGUL SYLLABLE NIEUN-U-SSANGSIOS
+87B2 B21A # HANGUL SYLLABLE NIEUN-U-CIEUC
+87B3 B21B # HANGUL SYLLABLE NIEUN-U-CHIEUCH
+87B4 B21C # HANGUL SYLLABLE NIEUN-U-KHIEUKH
+87B5 B21D # HANGUL SYLLABLE NIEUN-U-THIEUTH
+87B6 B21E # HANGUL SYLLABLE NIEUN-U-PHIEUPH
+87B7 B21F # HANGUL SYLLABLE NIEUN-U-HIEUH
+87B8 B221 # HANGUL SYLLABLE NIEUN-WEO-KIYEOK
+87B9 B222 # HANGUL SYLLABLE NIEUN-WEO-SSANGKIYEOK
+87BA B223 # HANGUL SYLLABLE NIEUN-WEO-KIYEOKSIOS
+87BB B224 # HANGUL SYLLABLE NIEUN-WEO-NIEUN
+87BC B225 # HANGUL SYLLABLE NIEUN-WEO-NIEUNCIEUC
+87BD B226 # HANGUL SYLLABLE NIEUN-WEO-NIEUNHIEUH
+87BE B227 # HANGUL SYLLABLE NIEUN-WEO-TIKEUT
+87BF B228 # HANGUL SYLLABLE NIEUN-WEO-RIEUL
+87C0 B229 # HANGUL SYLLABLE NIEUN-WEO-RIEULKIYEOK
+87C1 B22A # HANGUL SYLLABLE NIEUN-WEO-RIEULMIEUM
+87C2 B22B # HANGUL SYLLABLE NIEUN-WEO-RIEULPIEUP
+87C3 B22C # HANGUL SYLLABLE NIEUN-WEO-RIEULSIOS
+87C4 B22D # HANGUL SYLLABLE NIEUN-WEO-RIEULTHIEUTH
+87C5 B22E # HANGUL SYLLABLE NIEUN-WEO-RIEULPHIEUPH
+87C6 B22F # HANGUL SYLLABLE NIEUN-WEO-RIEULHIEUH
+87C7 B230 # HANGUL SYLLABLE NIEUN-WEO-MIEUM
+87C8 B231 # HANGUL SYLLABLE NIEUN-WEO-PIEUP
+87C9 B232 # HANGUL SYLLABLE NIEUN-WEO-PIEUPSIOS
+87CA B233 # HANGUL SYLLABLE NIEUN-WEO-SIOS
+87CB B235 # HANGUL SYLLABLE NIEUN-WEO-IEUNG
+87CC B236 # HANGUL SYLLABLE NIEUN-WEO-CIEUC
+87CD B237 # HANGUL SYLLABLE NIEUN-WEO-CHIEUCH
+87CE B238 # HANGUL SYLLABLE NIEUN-WEO-KHIEUKH
+87CF B239 # HANGUL SYLLABLE NIEUN-WEO-THIEUTH
+87D0 B23A # HANGUL SYLLABLE NIEUN-WEO-PHIEUPH
+87D1 B23B # HANGUL SYLLABLE NIEUN-WEO-HIEUH
+87D2 B23D # HANGUL SYLLABLE NIEUN-WE-KIYEOK
+87D3 B23E # HANGUL SYLLABLE NIEUN-WE-SSANGKIYEOK
+87D4 B23F # HANGUL SYLLABLE NIEUN-WE-KIYEOKSIOS
+87D5 B240 # HANGUL SYLLABLE NIEUN-WE-NIEUN
+87D6 B241 # HANGUL SYLLABLE NIEUN-WE-NIEUNCIEUC
+87D7 B242 # HANGUL SYLLABLE NIEUN-WE-NIEUNHIEUH
+87D8 B243 # HANGUL SYLLABLE NIEUN-WE-TIKEUT
+87D9 B244 # HANGUL SYLLABLE NIEUN-WE-RIEUL
+87DA B245 # HANGUL SYLLABLE NIEUN-WE-RIEULKIYEOK
+87DB B246 # HANGUL SYLLABLE NIEUN-WE-RIEULMIEUM
+87DC B247 # HANGUL SYLLABLE NIEUN-WE-RIEULPIEUP
+87DD B248 # HANGUL SYLLABLE NIEUN-WE-RIEULSIOS
+87DE B249 # HANGUL SYLLABLE NIEUN-WE-RIEULTHIEUTH
+87DF B24A # HANGUL SYLLABLE NIEUN-WE-RIEULPHIEUPH
+87E0 B24B # HANGUL SYLLABLE NIEUN-WE-RIEULHIEUH
+87E1 B24C # HANGUL SYLLABLE NIEUN-WE-MIEUM
+87E2 B24D # HANGUL SYLLABLE NIEUN-WE-PIEUP
+87E3 B24E # HANGUL SYLLABLE NIEUN-WE-PIEUPSIOS
+87E4 B24F # HANGUL SYLLABLE NIEUN-WE-SIOS
+87E5 B250 # HANGUL SYLLABLE NIEUN-WE-SSANGSIOS
+87E6 B251 # HANGUL SYLLABLE NIEUN-WE-IEUNG
+87E7 B252 # HANGUL SYLLABLE NIEUN-WE-CIEUC
+87E8 B253 # HANGUL SYLLABLE NIEUN-WE-CHIEUCH
+87E9 B254 # HANGUL SYLLABLE NIEUN-WE-KHIEUKH
+87EA B255 # HANGUL SYLLABLE NIEUN-WE-THIEUTH
+87EB B256 # HANGUL SYLLABLE NIEUN-WE-PHIEUPH
+87EC B257 # HANGUL SYLLABLE NIEUN-WE-HIEUH
+87ED B259 # HANGUL SYLLABLE NIEUN-WI-KIYEOK
+87EE B25A # HANGUL SYLLABLE NIEUN-WI-SSANGKIYEOK
+87EF B25B # HANGUL SYLLABLE NIEUN-WI-KIYEOKSIOS
+87F0 B25D # HANGUL SYLLABLE NIEUN-WI-NIEUNCIEUC
+87F1 B25E # HANGUL SYLLABLE NIEUN-WI-NIEUNHIEUH
+87F2 B25F # HANGUL SYLLABLE NIEUN-WI-TIKEUT
+87F3 B261 # HANGUL SYLLABLE NIEUN-WI-RIEULKIYEOK
+87F4 B262 # HANGUL SYLLABLE NIEUN-WI-RIEULMIEUM
+87F5 B263 # HANGUL SYLLABLE NIEUN-WI-RIEULPIEUP
+87F6 B264 # HANGUL SYLLABLE NIEUN-WI-RIEULSIOS
+87F7 B265 # HANGUL SYLLABLE NIEUN-WI-RIEULTHIEUTH
+87F8 B266 # HANGUL SYLLABLE NIEUN-WI-RIEULPHIEUPH
+87F9 B267 # HANGUL SYLLABLE NIEUN-WI-RIEULHIEUH
+87FA B26A # HANGUL SYLLABLE NIEUN-WI-PIEUPSIOS
+87FB B26B # HANGUL SYLLABLE NIEUN-WI-SIOS
+87FC B26C # HANGUL SYLLABLE NIEUN-WI-SSANGSIOS
+87FD B26D # HANGUL SYLLABLE NIEUN-WI-IEUNG
+87FE B26E # HANGUL SYLLABLE NIEUN-WI-CIEUC
+8841 B26F # HANGUL SYLLABLE NIEUN-WI-CHIEUCH
+8842 B270 # HANGUL SYLLABLE NIEUN-WI-KHIEUKH
+8843 B271 # HANGUL SYLLABLE NIEUN-WI-THIEUTH
+8844 B272 # HANGUL SYLLABLE NIEUN-WI-PHIEUPH
+8845 B273 # HANGUL SYLLABLE NIEUN-WI-HIEUH
+8846 B276 # HANGUL SYLLABLE NIEUN-YU-SSANGKIYEOK
+8847 B277 # HANGUL SYLLABLE NIEUN-YU-KIYEOKSIOS
+8848 B278 # HANGUL SYLLABLE NIEUN-YU-NIEUN
+8849 B279 # HANGUL SYLLABLE NIEUN-YU-NIEUNCIEUC
+884A B27A # HANGUL SYLLABLE NIEUN-YU-NIEUNHIEUH
+884B B27B # HANGUL SYLLABLE NIEUN-YU-TIKEUT
+884C B27D # HANGUL SYLLABLE NIEUN-YU-RIEULKIYEOK
+884D B27E # HANGUL SYLLABLE NIEUN-YU-RIEULMIEUM
+884E B27F # HANGUL SYLLABLE NIEUN-YU-RIEULPIEUP
+884F B280 # HANGUL SYLLABLE NIEUN-YU-RIEULSIOS
+8850 B281 # HANGUL SYLLABLE NIEUN-YU-RIEULTHIEUTH
+8851 B282 # HANGUL SYLLABLE NIEUN-YU-RIEULPHIEUPH
+8852 B283 # HANGUL SYLLABLE NIEUN-YU-RIEULHIEUH
+8853 B286 # HANGUL SYLLABLE NIEUN-YU-PIEUPSIOS
+8854 B287 # HANGUL SYLLABLE NIEUN-YU-SIOS
+8855 B288 # HANGUL SYLLABLE NIEUN-YU-SSANGSIOS
+8856 B28A # HANGUL SYLLABLE NIEUN-YU-CIEUC
+8857 B28B # HANGUL SYLLABLE NIEUN-YU-CHIEUCH
+8858 B28C # HANGUL SYLLABLE NIEUN-YU-KHIEUKH
+8859 B28D # HANGUL SYLLABLE NIEUN-YU-THIEUTH
+885A B28E # HANGUL SYLLABLE NIEUN-YU-PHIEUPH
+8861 B28F # HANGUL SYLLABLE NIEUN-YU-HIEUH
+8862 B292 # HANGUL SYLLABLE NIEUN-EU-SSANGKIYEOK
+8863 B293 # HANGUL SYLLABLE NIEUN-EU-KIYEOKSIOS
+8864 B295 # HANGUL SYLLABLE NIEUN-EU-NIEUNCIEUC
+8865 B296 # HANGUL SYLLABLE NIEUN-EU-NIEUNHIEUH
+8866 B297 # HANGUL SYLLABLE NIEUN-EU-TIKEUT
+8867 B29B # HANGUL SYLLABLE NIEUN-EU-RIEULPIEUP
+8868 B29C # HANGUL SYLLABLE NIEUN-EU-RIEULSIOS
+8869 B29D # HANGUL SYLLABLE NIEUN-EU-RIEULTHIEUTH
+886A B29E # HANGUL SYLLABLE NIEUN-EU-RIEULPHIEUPH
+886B B29F # HANGUL SYLLABLE NIEUN-EU-RIEULHIEUH
+886C B2A2 # HANGUL SYLLABLE NIEUN-EU-PIEUPSIOS
+886D B2A4 # HANGUL SYLLABLE NIEUN-EU-SSANGSIOS
+886E B2A7 # HANGUL SYLLABLE NIEUN-EU-CHIEUCH
+886F B2A8 # HANGUL SYLLABLE NIEUN-EU-KHIEUKH
+8870 B2A9 # HANGUL SYLLABLE NIEUN-EU-THIEUTH
+8871 B2AB # HANGUL SYLLABLE NIEUN-EU-HIEUH
+8872 B2AD # HANGUL SYLLABLE NIEUN-YI-KIYEOK
+8873 B2AE # HANGUL SYLLABLE NIEUN-YI-SSANGKIYEOK
+8874 B2AF # HANGUL SYLLABLE NIEUN-YI-KIYEOKSIOS
+8875 B2B1 # HANGUL SYLLABLE NIEUN-YI-NIEUNCIEUC
+8876 B2B2 # HANGUL SYLLABLE NIEUN-YI-NIEUNHIEUH
+8877 B2B3 # HANGUL SYLLABLE NIEUN-YI-TIKEUT
+8878 B2B5 # HANGUL SYLLABLE NIEUN-YI-RIEULKIYEOK
+8879 B2B6 # HANGUL SYLLABLE NIEUN-YI-RIEULMIEUM
+887A B2B7 # HANGUL SYLLABLE NIEUN-YI-RIEULPIEUP
+8881 B2B8 # HANGUL SYLLABLE NIEUN-YI-RIEULSIOS
+8882 B2B9 # HANGUL SYLLABLE NIEUN-YI-RIEULTHIEUTH
+8883 B2BA # HANGUL SYLLABLE NIEUN-YI-RIEULPHIEUPH
+8884 B2BB # HANGUL SYLLABLE NIEUN-YI-RIEULHIEUH
+8885 B2BC # HANGUL SYLLABLE NIEUN-YI-MIEUM
+8886 B2BD # HANGUL SYLLABLE NIEUN-YI-PIEUP
+8887 B2BE # HANGUL SYLLABLE NIEUN-YI-PIEUPSIOS
+8888 B2BF # HANGUL SYLLABLE NIEUN-YI-SIOS
+8889 B2C0 # HANGUL SYLLABLE NIEUN-YI-SSANGSIOS
+888A B2C1 # HANGUL SYLLABLE NIEUN-YI-IEUNG
+888B B2C2 # HANGUL SYLLABLE NIEUN-YI-CIEUC
+888C B2C3 # HANGUL SYLLABLE NIEUN-YI-CHIEUCH
+888D B2C4 # HANGUL SYLLABLE NIEUN-YI-KHIEUKH
+888E B2C5 # HANGUL SYLLABLE NIEUN-YI-THIEUTH
+888F B2C6 # HANGUL SYLLABLE NIEUN-YI-PHIEUPH
+8890 B2C7 # HANGUL SYLLABLE NIEUN-YI-HIEUH
+8891 B2CA # HANGUL SYLLABLE NIEUN-I-SSANGKIYEOK
+8892 B2CB # HANGUL SYLLABLE NIEUN-I-KIYEOKSIOS
+8893 B2CD # HANGUL SYLLABLE NIEUN-I-NIEUNCIEUC
+8894 B2CE # HANGUL SYLLABLE NIEUN-I-NIEUNHIEUH
+8895 B2CF # HANGUL SYLLABLE NIEUN-I-TIKEUT
+8896 B2D1 # HANGUL SYLLABLE NIEUN-I-RIEULKIYEOK
+8897 B2D3 # HANGUL SYLLABLE NIEUN-I-RIEULPIEUP--<3/22/95>
+8898 B2D4 # HANGUL SYLLABLE NIEUN-I-RIEULSIOS---<3/22/95>
+8899 B2D5 # HANGUL SYLLABLE NIEUN-I-RIEULTHIEUTH<3/22/95>
+889A B2D6 # HANGUL SYLLABLE NIEUN-I-RIEULPHIEUPH<3/22/95>
+889B B2D7 # HANGUL SYLLABLE NIEUN-I-RIEULHIEUH
+889C B2DA # HANGUL SYLLABLE NIEUN-I-PIEUPSIOS
+889D B2DC # HANGUL SYLLABLE NIEUN-I-SSANGSIOS
+889E B2DE # HANGUL SYLLABLE NIEUN-I-CIEUC
+889F B2DF # HANGUL SYLLABLE NIEUN-I-CHIEUCH
+88A0 B2E0 # HANGUL SYLLABLE NIEUN-I-KHIEUKH
+88A1 B2E1 # HANGUL SYLLABLE NIEUN-I-THIEUTH
+88A2 B2E3 # HANGUL SYLLABLE NIEUN-I-HIEUH
+88A3 B2E7 # HANGUL SYLLABLE TIKEUT-A-KIYEOKSIOS
+88A4 B2E9 # HANGUL SYLLABLE TIKEUT-A-NIEUNCIEUC
+88A5 B2EA # HANGUL SYLLABLE TIKEUT-A-NIEUNHIEUH
+88A6 B2F0 # HANGUL SYLLABLE TIKEUT-A-RIEULSIOS
+88A7 B2F1 # HANGUL SYLLABLE TIKEUT-A-RIEULTHIEUTH
+88A8 B2F2 # HANGUL SYLLABLE TIKEUT-A-RIEULPHIEUPH
+88A9 B2F6 # HANGUL SYLLABLE TIKEUT-A-PIEUPSIOS
+88AA B2FC # HANGUL SYLLABLE TIKEUT-A-KHIEUKH
+88AB B2FD # HANGUL SYLLABLE TIKEUT-A-THIEUTH
+88AC B2FE # HANGUL SYLLABLE TIKEUT-A-PHIEUPH
+88AD B302 # HANGUL SYLLABLE TIKEUT-AE-SSANGKIYEOK
+88AE B303 # HANGUL SYLLABLE TIKEUT-AE-KIYEOKSIOS
+88AF B305 # HANGUL SYLLABLE TIKEUT-AE-NIEUNCIEUC
+88B0 B306 # HANGUL SYLLABLE TIKEUT-AE-NIEUNHIEUH
+88B1 B307 # HANGUL SYLLABLE TIKEUT-AE-TIKEUT
+88B2 B309 # HANGUL SYLLABLE TIKEUT-AE-RIEULKIYEOK
+88B3 B30A # HANGUL SYLLABLE TIKEUT-AE-RIEULMIEUM
+88B4 B30B # HANGUL SYLLABLE TIKEUT-AE-RIEULPIEUP
+88B5 B30C # HANGUL SYLLABLE TIKEUT-AE-RIEULSIOS
+88B6 B30D # HANGUL SYLLABLE TIKEUT-AE-RIEULTHIEUTH
+88B7 B30E # HANGUL SYLLABLE TIKEUT-AE-RIEULPHIEUPH
+88B8 B30F # HANGUL SYLLABLE TIKEUT-AE-RIEULHIEUH
+88B9 B312 # HANGUL SYLLABLE TIKEUT-AE-PIEUPSIOS
+88BA B316 # HANGUL SYLLABLE TIKEUT-AE-CIEUC
+88BB B317 # HANGUL SYLLABLE TIKEUT-AE-CHIEUCH
+88BC B318 # HANGUL SYLLABLE TIKEUT-AE-KHIEUKH
+88BD B319 # HANGUL SYLLABLE TIKEUT-AE-THIEUTH
+88BE B31A # HANGUL SYLLABLE TIKEUT-AE-PHIEUPH
+88BF B31B # HANGUL SYLLABLE TIKEUT-AE-HIEUH
+88C0 B31D # HANGUL SYLLABLE TIKEUT-YA-KIYEOK
+88C1 B31E # HANGUL SYLLABLE TIKEUT-YA-SSANGKIYEOK
+88C2 B31F # HANGUL SYLLABLE TIKEUT-YA-KIYEOKSIOS
+88C3 B320 # HANGUL SYLLABLE TIKEUT-YA-NIEUN
+88C4 B321 # HANGUL SYLLABLE TIKEUT-YA-NIEUNCIEUC
+88C5 B322 # HANGUL SYLLABLE TIKEUT-YA-NIEUNHIEUH
+88C6 B323 # HANGUL SYLLABLE TIKEUT-YA-TIKEUT
+88C7 B324 # HANGUL SYLLABLE TIKEUT-YA-RIEUL
+88C8 B325 # HANGUL SYLLABLE TIKEUT-YA-RIEULKIYEOK
+88C9 B326 # HANGUL SYLLABLE TIKEUT-YA-RIEULMIEUM
+88CA B327 # HANGUL SYLLABLE TIKEUT-YA-RIEULPIEUP
+88CB B328 # HANGUL SYLLABLE TIKEUT-YA-RIEULSIOS
+88CC B329 # HANGUL SYLLABLE TIKEUT-YA-RIEULTHIEUTH
+88CD B32A # HANGUL SYLLABLE TIKEUT-YA-RIEULPHIEUPH
+88CE B32B # HANGUL SYLLABLE TIKEUT-YA-RIEULHIEUH
+88CF B32C # HANGUL SYLLABLE TIKEUT-YA-MIEUM
+88D0 B32D # HANGUL SYLLABLE TIKEUT-YA-PIEUP
+88D1 B32E # HANGUL SYLLABLE TIKEUT-YA-PIEUPSIOS
+88D2 B32F # HANGUL SYLLABLE TIKEUT-YA-SIOS
+88D3 B330 # HANGUL SYLLABLE TIKEUT-YA-SSANGSIOS
+88D4 B331 # HANGUL SYLLABLE TIKEUT-YA-IEUNG
+88D5 B332 # HANGUL SYLLABLE TIKEUT-YA-CIEUC
+88D6 B333 # HANGUL SYLLABLE TIKEUT-YA-CHIEUCH
+88D7 B334 # HANGUL SYLLABLE TIKEUT-YA-KHIEUKH
+88D8 B335 # HANGUL SYLLABLE TIKEUT-YA-THIEUTH
+88D9 B336 # HANGUL SYLLABLE TIKEUT-YA-PHIEUPH
+88DA B337 # HANGUL SYLLABLE TIKEUT-YA-HIEUH
+88DB B338 # HANGUL SYLLABLE TIKEUT-YAE
+88DC B339 # HANGUL SYLLABLE TIKEUT-YAE-KIYEOK
+88DD B33A # HANGUL SYLLABLE TIKEUT-YAE-SSANGKIYEOK
+88DE B33B # HANGUL SYLLABLE TIKEUT-YAE-KIYEOKSIOS
+88DF B33C # HANGUL SYLLABLE TIKEUT-YAE-NIEUN
+88E0 B33D # HANGUL SYLLABLE TIKEUT-YAE-NIEUNCIEUC
+88E1 B33E # HANGUL SYLLABLE TIKEUT-YAE-NIEUNHIEUH
+88E2 B33F # HANGUL SYLLABLE TIKEUT-YAE-TIKEUT
+88E3 B340 # HANGUL SYLLABLE TIKEUT-YAE-RIEUL
+88E4 B341 # HANGUL SYLLABLE TIKEUT-YAE-RIEULKIYEOK
+88E5 B342 # HANGUL SYLLABLE TIKEUT-YAE-RIEULMIEUM
+88E6 B343 # HANGUL SYLLABLE TIKEUT-YAE-RIEULPIEUP
+88E7 B344 # HANGUL SYLLABLE TIKEUT-YAE-RIEULSIOS
+88E8 B345 # HANGUL SYLLABLE TIKEUT-YAE-RIEULTHIEUTH
+88E9 B346 # HANGUL SYLLABLE TIKEUT-YAE-RIEULPHIEUPH
+88EA B347 # HANGUL SYLLABLE TIKEUT-YAE-RIEULHIEUH
+88EB B348 # HANGUL SYLLABLE TIKEUT-YAE-MIEUM
+88EC B349 # HANGUL SYLLABLE TIKEUT-YAE-PIEUP
+88ED B34A # HANGUL SYLLABLE TIKEUT-YAE-PIEUPSIOS
+88EE B34B # HANGUL SYLLABLE TIKEUT-YAE-SIOS
+88EF B34C # HANGUL SYLLABLE TIKEUT-YAE-SSANGSIOS
+88F0 B34D # HANGUL SYLLABLE TIKEUT-YAE-IEUNG
+88F1 B34E # HANGUL SYLLABLE TIKEUT-YAE-CIEUC
+88F2 B34F # HANGUL SYLLABLE TIKEUT-YAE-CHIEUCH
+88F3 B350 # HANGUL SYLLABLE TIKEUT-YAE-KHIEUKH
+88F4 B351 # HANGUL SYLLABLE TIKEUT-YAE-THIEUTH
+88F5 B352 # HANGUL SYLLABLE TIKEUT-YAE-PHIEUPH
+88F6 B353 # HANGUL SYLLABLE TIKEUT-YAE-HIEUH
+88F7 B357 # HANGUL SYLLABLE TIKEUT-EO-KIYEOKSIOS
+88F8 B359 # HANGUL SYLLABLE TIKEUT-EO-NIEUNCIEUC
+88F9 B35A # HANGUL SYLLABLE TIKEUT-EO-NIEUNHIEUH
+88FA B35D # HANGUL SYLLABLE TIKEUT-EO-RIEULKIYEOK
+88FB B360 # HANGUL SYLLABLE TIKEUT-EO-RIEULSIOS
+88FC B361 # HANGUL SYLLABLE TIKEUT-EO-RIEULTHIEUTH
+88FD B362 # HANGUL SYLLABLE TIKEUT-EO-RIEULPHIEUPH
+88FE B363 # HANGUL SYLLABLE TIKEUT-EO-RIEULHIEUH
+8941 B366 # HANGUL SYLLABLE TIKEUT-EO-PIEUPSIOS
+8942 B368 # HANGUL SYLLABLE TIKEUT-EO-SSANGSIOS
+8943 B36A # HANGUL SYLLABLE TIKEUT-EO-CIEUC
+8944 B36C # HANGUL SYLLABLE TIKEUT-EO-KHIEUKH
+8945 B36D # HANGUL SYLLABLE TIKEUT-EO-THIEUTH
+8946 B36F # HANGUL SYLLABLE TIKEUT-EO-HIEUH
+8947 B372 # HANGUL SYLLABLE TIKEUT-E-SSANGKIYEOK
+8948 B373 # HANGUL SYLLABLE TIKEUT-E-KIYEOKSIOS
+8949 B375 # HANGUL SYLLABLE TIKEUT-E-NIEUNCIEUC
+894A B376 # HANGUL SYLLABLE TIKEUT-E-NIEUNHIEUH
+894B B377 # HANGUL SYLLABLE TIKEUT-E-TIKEUT
+894C B379 # HANGUL SYLLABLE TIKEUT-E-RIEULKIYEOK
+894D B37A # HANGUL SYLLABLE TIKEUT-E-RIEULMIEUM
+894E B37B # HANGUL SYLLABLE TIKEUT-E-RIEULPIEUP
+894F B37C # HANGUL SYLLABLE TIKEUT-E-RIEULSIOS
+8950 B37D # HANGUL SYLLABLE TIKEUT-E-RIEULTHIEUTH
+8951 B37E # HANGUL SYLLABLE TIKEUT-E-RIEULPHIEUPH
+8952 B37F # HANGUL SYLLABLE TIKEUT-E-RIEULHIEUH
+8953 B382 # HANGUL SYLLABLE TIKEUT-E-PIEUPSIOS
+8954 B386 # HANGUL SYLLABLE TIKEUT-E-CIEUC
+8955 B387 # HANGUL SYLLABLE TIKEUT-E-CHIEUCH
+8956 B388 # HANGUL SYLLABLE TIKEUT-E-KHIEUKH
+8957 B389 # HANGUL SYLLABLE TIKEUT-E-THIEUTH
+8958 B38A # HANGUL SYLLABLE TIKEUT-E-PHIEUPH
+8959 B38B # HANGUL SYLLABLE TIKEUT-E-HIEUH
+895A B38D # HANGUL SYLLABLE TIKEUT-YEO-KIYEOK
+8961 B38E # HANGUL SYLLABLE TIKEUT-YEO-SSANGKIYEOK
+8962 B38F # HANGUL SYLLABLE TIKEUT-YEO-KIYEOKSIOS
+8963 B391 # HANGUL SYLLABLE TIKEUT-YEO-NIEUNCIEUC
+8964 B392 # HANGUL SYLLABLE TIKEUT-YEO-NIEUNHIEUH
+8965 B393 # HANGUL SYLLABLE TIKEUT-YEO-TIKEUT
+8966 B395 # HANGUL SYLLABLE TIKEUT-YEO-RIEULKIYEOK
+8967 B396 # HANGUL SYLLABLE TIKEUT-YEO-RIEULMIEUM
+8968 B397 # HANGUL SYLLABLE TIKEUT-YEO-RIEULPIEUP
+8969 B398 # HANGUL SYLLABLE TIKEUT-YEO-RIEULSIOS
+896A B399 # HANGUL SYLLABLE TIKEUT-YEO-RIEULTHIEUTH
+896B B39A # HANGUL SYLLABLE TIKEUT-YEO-RIEULPHIEUPH
+896C B39B # HANGUL SYLLABLE TIKEUT-YEO-RIEULHIEUH
+896D B39C # HANGUL SYLLABLE TIKEUT-YEO-MIEUM
+896E B39D # HANGUL SYLLABLE TIKEUT-YEO-PIEUP
+896F B39E # HANGUL SYLLABLE TIKEUT-YEO-PIEUPSIOS
+8970 B39F # HANGUL SYLLABLE TIKEUT-YEO-SIOS
+8971 B3A2 # HANGUL SYLLABLE TIKEUT-YEO-CIEUC
+8972 B3A3 # HANGUL SYLLABLE TIKEUT-YEO-CHIEUCH
+8973 B3A4 # HANGUL SYLLABLE TIKEUT-YEO-KHIEUKH
+8974 B3A5 # HANGUL SYLLABLE TIKEUT-YEO-THIEUTH
+8975 B3A6 # HANGUL SYLLABLE TIKEUT-YEO-PHIEUPH
+8976 B3A7 # HANGUL SYLLABLE TIKEUT-YEO-HIEUH
+8977 B3A9 # HANGUL SYLLABLE TIKEUT-YE-KIYEOK
+8978 B3AA # HANGUL SYLLABLE TIKEUT-YE-SSANGKIYEOK
+8979 B3AB # HANGUL SYLLABLE TIKEUT-YE-KIYEOKSIOS
+897A B3AD # HANGUL SYLLABLE TIKEUT-YE-NIEUNCIEUC
+8981 B3AE # HANGUL SYLLABLE TIKEUT-YE-NIEUNHIEUH
+8982 B3AF # HANGUL SYLLABLE TIKEUT-YE-TIKEUT
+8983 B3B0 # HANGUL SYLLABLE TIKEUT-YE-RIEUL
+8984 B3B1 # HANGUL SYLLABLE TIKEUT-YE-RIEULKIYEOK
+8985 B3B2 # HANGUL SYLLABLE TIKEUT-YE-RIEULMIEUM
+8986 B3B3 # HANGUL SYLLABLE TIKEUT-YE-RIEULPIEUP
+8987 B3B4 # HANGUL SYLLABLE TIKEUT-YE-RIEULSIOS
+8988 B3B5 # HANGUL SYLLABLE TIKEUT-YE-RIEULTHIEUTH
+8989 B3B6 # HANGUL SYLLABLE TIKEUT-YE-RIEULPHIEUPH
+898A B3B7 # HANGUL SYLLABLE TIKEUT-YE-RIEULHIEUH
+898B B3B8 # HANGUL SYLLABLE TIKEUT-YE-MIEUM
+898C B3B9 # HANGUL SYLLABLE TIKEUT-YE-PIEUP
+898D B3BA # HANGUL SYLLABLE TIKEUT-YE-PIEUPSIOS
+898E B3BB # HANGUL SYLLABLE TIKEUT-YE-SIOS
+898F B3BC # HANGUL SYLLABLE TIKEUT-YE-SSANGSIOS
+8990 B3BD # HANGUL SYLLABLE TIKEUT-YE-IEUNG
+8991 B3BE # HANGUL SYLLABLE TIKEUT-YE-CIEUC
+8992 B3BF # HANGUL SYLLABLE TIKEUT-YE-CHIEUCH
+8993 B3C0 # HANGUL SYLLABLE TIKEUT-YE-KHIEUKH
+8994 B3C1 # HANGUL SYLLABLE TIKEUT-YE-THIEUTH
+8995 B3C2 # HANGUL SYLLABLE TIKEUT-YE-PHIEUPH
+8996 B3C3 # HANGUL SYLLABLE TIKEUT-YE-HIEUH
+8997 B3C6 # HANGUL SYLLABLE TIKEUT-O-SSANGKIYEOK
+8998 B3C7 # HANGUL SYLLABLE TIKEUT-O-KIYEOKSIOS
+8999 B3C9 # HANGUL SYLLABLE TIKEUT-O-NIEUNCIEUC
+899A B3CA # HANGUL SYLLABLE TIKEUT-O-NIEUNHIEUH
+899B B3CD # HANGUL SYLLABLE TIKEUT-O-RIEULKIYEOK
+899C B3CF # HANGUL SYLLABLE TIKEUT-O-RIEULPIEUP
+899D B3D1 # HANGUL SYLLABLE TIKEUT-O-RIEULTHIEUTH
+899E B3D2 # HANGUL SYLLABLE TIKEUT-O-RIEULPHIEUPH
+899F B3D3 # HANGUL SYLLABLE TIKEUT-O-RIEULHIEUH
+89A0 B3D6 # HANGUL SYLLABLE TIKEUT-O-PIEUPSIOS
+89A1 B3D8 # HANGUL SYLLABLE TIKEUT-O-SSANGSIOS
+89A2 B3DA # HANGUL SYLLABLE TIKEUT-O-CIEUC
+89A3 B3DC # HANGUL SYLLABLE TIKEUT-O-KHIEUKH
+89A4 B3DE # HANGUL SYLLABLE TIKEUT-O-PHIEUPH
+89A5 B3DF # HANGUL SYLLABLE TIKEUT-O-HIEUH
+89A6 B3E1 # HANGUL SYLLABLE TIKEUT-WA-KIYEOK
+89A7 B3E2 # HANGUL SYLLABLE TIKEUT-WA-SSANGKIYEOK
+89A8 B3E3 # HANGUL SYLLABLE TIKEUT-WA-KIYEOKSIOS
+89A9 B3E5 # HANGUL SYLLABLE TIKEUT-WA-NIEUNCIEUC
+89AA B3E6 # HANGUL SYLLABLE TIKEUT-WA-NIEUNHIEUH
+89AB B3E7 # HANGUL SYLLABLE TIKEUT-WA-TIKEUT
+89AC B3E9 # HANGUL SYLLABLE TIKEUT-WA-RIEULKIYEOK
+89AD B3EA # HANGUL SYLLABLE TIKEUT-WA-RIEULMIEUM
+89AE B3EB # HANGUL SYLLABLE TIKEUT-WA-RIEULPIEUP
+89AF B3EC # HANGUL SYLLABLE TIKEUT-WA-RIEULSIOS
+89B0 B3ED # HANGUL SYLLABLE TIKEUT-WA-RIEULTHIEUTH
+89B1 B3EE # HANGUL SYLLABLE TIKEUT-WA-RIEULPHIEUPH
+89B2 B3EF # HANGUL SYLLABLE TIKEUT-WA-RIEULHIEUH
+89B3 B3F0 # HANGUL SYLLABLE TIKEUT-WA-MIEUM
+89B4 B3F1 # HANGUL SYLLABLE TIKEUT-WA-PIEUP
+89B5 B3F2 # HANGUL SYLLABLE TIKEUT-WA-PIEUPSIOS
+89B6 B3F3 # HANGUL SYLLABLE TIKEUT-WA-SIOS
+89B7 B3F4 # HANGUL SYLLABLE TIKEUT-WA-SSANGSIOS
+89B8 B3F5 # HANGUL SYLLABLE TIKEUT-WA-IEUNG
+89B9 B3F6 # HANGUL SYLLABLE TIKEUT-WA-CIEUC
+89BA B3F7 # HANGUL SYLLABLE TIKEUT-WA-CHIEUCH
+89BB B3F8 # HANGUL SYLLABLE TIKEUT-WA-KHIEUKH
+89BC B3F9 # HANGUL SYLLABLE TIKEUT-WA-THIEUTH
+89BD B3FA # HANGUL SYLLABLE TIKEUT-WA-PHIEUPH
+89BE B3FB # HANGUL SYLLABLE TIKEUT-WA-HIEUH
+89BF B3FD # HANGUL SYLLABLE TIKEUT-WAE-KIYEOK
+89C0 B3FE # HANGUL SYLLABLE TIKEUT-WAE-SSANGKIYEOK
+89C1 B3FF # HANGUL SYLLABLE TIKEUT-WAE-KIYEOKSIOS
+89C2 B400 # HANGUL SYLLABLE TIKEUT-WAE-NIEUN
+89C3 B401 # HANGUL SYLLABLE TIKEUT-WAE-NIEUNCIEUC
+89C4 B402 # HANGUL SYLLABLE TIKEUT-WAE-NIEUNHIEUH
+89C5 B403 # HANGUL SYLLABLE TIKEUT-WAE-TIKEUT
+89C6 B404 # HANGUL SYLLABLE TIKEUT-WAE-RIEUL
+89C7 B405 # HANGUL SYLLABLE TIKEUT-WAE-RIEULKIYEOK
+89C8 B406 # HANGUL SYLLABLE TIKEUT-WAE-RIEULMIEUM
+89C9 B407 # HANGUL SYLLABLE TIKEUT-WAE-RIEULPIEUP
+89CA B408 # HANGUL SYLLABLE TIKEUT-WAE-RIEULSIOS
+89CB B409 # HANGUL SYLLABLE TIKEUT-WAE-RIEULTHIEUTH
+89CC B40A # HANGUL SYLLABLE TIKEUT-WAE-RIEULPHIEUPH
+89CD B40B # HANGUL SYLLABLE TIKEUT-WAE-RIEULHIEUH
+89CE B40C # HANGUL SYLLABLE TIKEUT-WAE-MIEUM
+89CF B40D # HANGUL SYLLABLE TIKEUT-WAE-PIEUP
+89D0 B40E # HANGUL SYLLABLE TIKEUT-WAE-PIEUPSIOS
+89D1 B40F # HANGUL SYLLABLE TIKEUT-WAE-SIOS
+89D2 B411 # HANGUL SYLLABLE TIKEUT-WAE-IEUNG
+89D3 B412 # HANGUL SYLLABLE TIKEUT-WAE-CIEUC
+89D4 B413 # HANGUL SYLLABLE TIKEUT-WAE-CHIEUCH
+89D5 B414 # HANGUL SYLLABLE TIKEUT-WAE-KHIEUKH
+89D6 B415 # HANGUL SYLLABLE TIKEUT-WAE-THIEUTH
+89D7 B416 # HANGUL SYLLABLE TIKEUT-WAE-PHIEUPH
+89D8 B417 # HANGUL SYLLABLE TIKEUT-WAE-HIEUH
+89D9 B419 # HANGUL SYLLABLE TIKEUT-OE-KIYEOK
+89DA B41A # HANGUL SYLLABLE TIKEUT-OE-SSANGKIYEOK
+89DB B41B # HANGUL SYLLABLE TIKEUT-OE-KIYEOKSIOS
+89DC B41D # HANGUL SYLLABLE TIKEUT-OE-NIEUNCIEUC
+89DD B41E # HANGUL SYLLABLE TIKEUT-OE-NIEUNHIEUH
+89DE B41F # HANGUL SYLLABLE TIKEUT-OE-TIKEUT
+89DF B421 # HANGUL SYLLABLE TIKEUT-OE-RIEULKIYEOK
+89E0 B422 # HANGUL SYLLABLE TIKEUT-OE-RIEULMIEUM
+89E1 B423 # HANGUL SYLLABLE TIKEUT-OE-RIEULPIEUP
+89E2 B424 # HANGUL SYLLABLE TIKEUT-OE-RIEULSIOS
+89E3 B425 # HANGUL SYLLABLE TIKEUT-OE-RIEULTHIEUTH
+89E4 B426 # HANGUL SYLLABLE TIKEUT-OE-RIEULPHIEUPH
+89E5 B427 # HANGUL SYLLABLE TIKEUT-OE-RIEULHIEUH
+89E6 B42A # HANGUL SYLLABLE TIKEUT-OE-PIEUPSIOS
+89E7 B42C # HANGUL SYLLABLE TIKEUT-OE-SSANGSIOS
+89E8 B42D # HANGUL SYLLABLE TIKEUT-OE-IEUNG
+89E9 B42E # HANGUL SYLLABLE TIKEUT-OE-CIEUC
+89EA B42F # HANGUL SYLLABLE TIKEUT-OE-CHIEUCH
+89EB B430 # HANGUL SYLLABLE TIKEUT-OE-KHIEUKH
+89EC B431 # HANGUL SYLLABLE TIKEUT-OE-THIEUTH
+89ED B432 # HANGUL SYLLABLE TIKEUT-OE-PHIEUPH
+89EE B433 # HANGUL SYLLABLE TIKEUT-OE-HIEUH
+89EF B435 # HANGUL SYLLABLE TIKEUT-YO-KIYEOK
+89F0 B436 # HANGUL SYLLABLE TIKEUT-YO-SSANGKIYEOK
+89F1 B437 # HANGUL SYLLABLE TIKEUT-YO-KIYEOKSIOS
+89F2 B438 # HANGUL SYLLABLE TIKEUT-YO-NIEUN
+89F3 B439 # HANGUL SYLLABLE TIKEUT-YO-NIEUNCIEUC
+89F4 B43A # HANGUL SYLLABLE TIKEUT-YO-NIEUNHIEUH
+89F5 B43B # HANGUL SYLLABLE TIKEUT-YO-TIKEUT
+89F6 B43C # HANGUL SYLLABLE TIKEUT-YO-RIEUL
+89F7 B43D # HANGUL SYLLABLE TIKEUT-YO-RIEULKIYEOK
+89F8 B43E # HANGUL SYLLABLE TIKEUT-YO-RIEULMIEUM
+89F9 B43F # HANGUL SYLLABLE TIKEUT-YO-RIEULPIEUP
+89FA B440 # HANGUL SYLLABLE TIKEUT-YO-RIEULSIOS
+89FB B441 # HANGUL SYLLABLE TIKEUT-YO-RIEULTHIEUTH
+89FC B442 # HANGUL SYLLABLE TIKEUT-YO-RIEULPHIEUPH
+89FD B443 # HANGUL SYLLABLE TIKEUT-YO-RIEULHIEUH
+89FE B444 # HANGUL SYLLABLE TIKEUT-YO-MIEUM
+8A41 B445 # HANGUL SYLLABLE TIKEUT-YO-PIEUP
+8A42 B446 # HANGUL SYLLABLE TIKEUT-YO-PIEUPSIOS
+8A43 B447 # HANGUL SYLLABLE TIKEUT-YO-SIOS
+8A44 B448 # HANGUL SYLLABLE TIKEUT-YO-SSANGSIOS
+8A45 B449 # HANGUL SYLLABLE TIKEUT-YO-IEUNG
+8A46 B44A # HANGUL SYLLABLE TIKEUT-YO-CIEUC
+8A47 B44B # HANGUL SYLLABLE TIKEUT-YO-CHIEUCH
+8A48 B44C # HANGUL SYLLABLE TIKEUT-YO-KHIEUKH
+8A49 B44D # HANGUL SYLLABLE TIKEUT-YO-THIEUTH
+8A4A B44E # HANGUL SYLLABLE TIKEUT-YO-PHIEUPH
+8A4B B44F # HANGUL SYLLABLE TIKEUT-YO-HIEUH
+8A4C B452 # HANGUL SYLLABLE TIKEUT-U-SSANGKIYEOK
+8A4D B453 # HANGUL SYLLABLE TIKEUT-U-KIYEOKSIOS
+8A4E B455 # HANGUL SYLLABLE TIKEUT-U-NIEUNCIEUC
+8A4F B456 # HANGUL SYLLABLE TIKEUT-U-NIEUNHIEUH
+8A50 B457 # HANGUL SYLLABLE TIKEUT-U-TIKEUT
+8A51 B459 # HANGUL SYLLABLE TIKEUT-U-RIEULKIYEOK
+8A52 B45A # HANGUL SYLLABLE TIKEUT-U-RIEULMIEUM
+8A53 B45B # HANGUL SYLLABLE TIKEUT-U-RIEULPIEUP
+8A54 B45C # HANGUL SYLLABLE TIKEUT-U-RIEULSIOS
+8A55 B45D # HANGUL SYLLABLE TIKEUT-U-RIEULTHIEUTH
+8A56 B45E # HANGUL SYLLABLE TIKEUT-U-RIEULPHIEUPH
+8A57 B45F # HANGUL SYLLABLE TIKEUT-U-RIEULHIEUH
+8A58 B462 # HANGUL SYLLABLE TIKEUT-U-PIEUPSIOS
+8A59 B464 # HANGUL SYLLABLE TIKEUT-U-SSANGSIOS
+8A5A B466 # HANGUL SYLLABLE TIKEUT-U-CIEUC
+8A61 B467 # HANGUL SYLLABLE TIKEUT-U-CHIEUCH
+8A62 B468 # HANGUL SYLLABLE TIKEUT-U-KHIEUKH
+8A63 B469 # HANGUL SYLLABLE TIKEUT-U-THIEUTH
+8A64 B46A # HANGUL SYLLABLE TIKEUT-U-PHIEUPH
+8A65 B46B # HANGUL SYLLABLE TIKEUT-U-HIEUH
+8A66 B46D # HANGUL SYLLABLE TIKEUT-WEO-KIYEOK
+8A67 B46E # HANGUL SYLLABLE TIKEUT-WEO-SSANGKIYEOK
+8A68 B46F # HANGUL SYLLABLE TIKEUT-WEO-KIYEOKSIOS
+8A69 B470 # HANGUL SYLLABLE TIKEUT-WEO-NIEUN
+8A6A B471 # HANGUL SYLLABLE TIKEUT-WEO-NIEUNCIEUC
+8A6B B472 # HANGUL SYLLABLE TIKEUT-WEO-NIEUNHIEUH
+8A6C B473 # HANGUL SYLLABLE TIKEUT-WEO-TIKEUT
+8A6D B474 # HANGUL SYLLABLE TIKEUT-WEO-RIEUL
+8A6E B475 # HANGUL SYLLABLE TIKEUT-WEO-RIEULKIYEOK
+8A6F B476 # HANGUL SYLLABLE TIKEUT-WEO-RIEULMIEUM
+8A70 B477 # HANGUL SYLLABLE TIKEUT-WEO-RIEULPIEUP
+8A71 B478 # HANGUL SYLLABLE TIKEUT-WEO-RIEULSIOS
+8A72 B479 # HANGUL SYLLABLE TIKEUT-WEO-RIEULTHIEUTH
+8A73 B47A # HANGUL SYLLABLE TIKEUT-WEO-RIEULPHIEUPH
+8A74 B47B # HANGUL SYLLABLE TIKEUT-WEO-RIEULHIEUH
+8A75 B47C # HANGUL SYLLABLE TIKEUT-WEO-MIEUM
+8A76 B47D # HANGUL SYLLABLE TIKEUT-WEO-PIEUP
+8A77 B47E # HANGUL SYLLABLE TIKEUT-WEO-PIEUPSIOS
+8A78 B47F # HANGUL SYLLABLE TIKEUT-WEO-SIOS
+8A79 B481 # HANGUL SYLLABLE TIKEUT-WEO-IEUNG
+8A7A B482 # HANGUL SYLLABLE TIKEUT-WEO-CIEUC
+8A81 B483 # HANGUL SYLLABLE TIKEUT-WEO-CHIEUCH
+8A82 B484 # HANGUL SYLLABLE TIKEUT-WEO-KHIEUKH
+8A83 B485 # HANGUL SYLLABLE TIKEUT-WEO-THIEUTH
+8A84 B486 # HANGUL SYLLABLE TIKEUT-WEO-PHIEUPH
+8A85 B487 # HANGUL SYLLABLE TIKEUT-WEO-HIEUH
+8A86 B489 # HANGUL SYLLABLE TIKEUT-WE-KIYEOK
+8A87 B48A # HANGUL SYLLABLE TIKEUT-WE-SSANGKIYEOK
+8A88 B48B # HANGUL SYLLABLE TIKEUT-WE-KIYEOKSIOS
+8A89 B48C # HANGUL SYLLABLE TIKEUT-WE-NIEUN
+8A8A B48D # HANGUL SYLLABLE TIKEUT-WE-NIEUNCIEUC
+8A8B B48E # HANGUL SYLLABLE TIKEUT-WE-NIEUNHIEUH
+8A8C B48F # HANGUL SYLLABLE TIKEUT-WE-TIKEUT
+8A8D B490 # HANGUL SYLLABLE TIKEUT-WE-RIEUL
+8A8E B491 # HANGUL SYLLABLE TIKEUT-WE-RIEULKIYEOK
+8A8F B492 # HANGUL SYLLABLE TIKEUT-WE-RIEULMIEUM
+8A90 B493 # HANGUL SYLLABLE TIKEUT-WE-RIEULPIEUP
+8A91 B494 # HANGUL SYLLABLE TIKEUT-WE-RIEULSIOS
+8A92 B495 # HANGUL SYLLABLE TIKEUT-WE-RIEULTHIEUTH
+8A93 B496 # HANGUL SYLLABLE TIKEUT-WE-RIEULPHIEUPH
+8A94 B497 # HANGUL SYLLABLE TIKEUT-WE-RIEULHIEUH
+8A95 B498 # HANGUL SYLLABLE TIKEUT-WE-MIEUM
+8A96 B499 # HANGUL SYLLABLE TIKEUT-WE-PIEUP
+8A97 B49A # HANGUL SYLLABLE TIKEUT-WE-PIEUPSIOS
+8A98 B49B # HANGUL SYLLABLE TIKEUT-WE-SIOS
+8A99 B49C # HANGUL SYLLABLE TIKEUT-WE-SSANGSIOS
+8A9A B49E # HANGUL SYLLABLE TIKEUT-WE-CIEUC
+8A9B B49F # HANGUL SYLLABLE TIKEUT-WE-CHIEUCH
+8A9C B4A0 # HANGUL SYLLABLE TIKEUT-WE-KHIEUKH
+8A9D B4A1 # HANGUL SYLLABLE TIKEUT-WE-THIEUTH
+8A9E B4A2 # HANGUL SYLLABLE TIKEUT-WE-PHIEUPH
+8A9F B4A3 # HANGUL SYLLABLE TIKEUT-WE-HIEUH
+8AA0 B4A5 # HANGUL SYLLABLE TIKEUT-WI-KIYEOK
+8AA1 B4A6 # HANGUL SYLLABLE TIKEUT-WI-SSANGKIYEOK
+8AA2 B4A7 # HANGUL SYLLABLE TIKEUT-WI-KIYEOKSIOS
+8AA3 B4A9 # HANGUL SYLLABLE TIKEUT-WI-NIEUNCIEUC
+8AA4 B4AA # HANGUL SYLLABLE TIKEUT-WI-NIEUNHIEUH
+8AA5 B4AB # HANGUL SYLLABLE TIKEUT-WI-TIKEUT
+8AA6 B4AD # HANGUL SYLLABLE TIKEUT-WI-RIEULKIYEOK
+8AA7 B4AE # HANGUL SYLLABLE TIKEUT-WI-RIEULMIEUM
+8AA8 B4AF # HANGUL SYLLABLE TIKEUT-WI-RIEULPIEUP
+8AA9 B4B0 # HANGUL SYLLABLE TIKEUT-WI-RIEULSIOS
+8AAA B4B1 # HANGUL SYLLABLE TIKEUT-WI-RIEULTHIEUTH
+8AAB B4B2 # HANGUL SYLLABLE TIKEUT-WI-RIEULPHIEUPH
+8AAC B4B3 # HANGUL SYLLABLE TIKEUT-WI-RIEULHIEUH
+8AAD B4B4 # HANGUL SYLLABLE TIKEUT-WI-MIEUM
+8AAE B4B6 # HANGUL SYLLABLE TIKEUT-WI-PIEUPSIOS
+8AAF B4B8 # HANGUL SYLLABLE TIKEUT-WI-SSANGSIOS
+8AB0 B4BA # HANGUL SYLLABLE TIKEUT-WI-CIEUC
+8AB1 B4BB # HANGUL SYLLABLE TIKEUT-WI-CHIEUCH
+8AB2 B4BC # HANGUL SYLLABLE TIKEUT-WI-KHIEUKH
+8AB3 B4BD # HANGUL SYLLABLE TIKEUT-WI-THIEUTH
+8AB4 B4BE # HANGUL SYLLABLE TIKEUT-WI-PHIEUPH
+8AB5 B4BF # HANGUL SYLLABLE TIKEUT-WI-HIEUH
+8AB6 B4C1 # HANGUL SYLLABLE TIKEUT-YU-KIYEOK
+8AB7 B4C2 # HANGUL SYLLABLE TIKEUT-YU-SSANGKIYEOK
+8AB8 B4C3 # HANGUL SYLLABLE TIKEUT-YU-KIYEOKSIOS
+8AB9 B4C5 # HANGUL SYLLABLE TIKEUT-YU-NIEUNCIEUC
+8ABA B4C6 # HANGUL SYLLABLE TIKEUT-YU-NIEUNHIEUH
+8ABB B4C7 # HANGUL SYLLABLE TIKEUT-YU-TIKEUT
+8ABC B4C9 # HANGUL SYLLABLE TIKEUT-YU-RIEULKIYEOK
+8ABD B4CA # HANGUL SYLLABLE TIKEUT-YU-RIEULMIEUM
+8ABE B4CB # HANGUL SYLLABLE TIKEUT-YU-RIEULPIEUP
+8ABF B4CC # HANGUL SYLLABLE TIKEUT-YU-RIEULSIOS
+8AC0 B4CD # HANGUL SYLLABLE TIKEUT-YU-RIEULTHIEUTH
+8AC1 B4CE # HANGUL SYLLABLE TIKEUT-YU-RIEULPHIEUPH
+8AC2 B4CF # HANGUL SYLLABLE TIKEUT-YU-RIEULHIEUH
+8AC3 B4D1 # HANGUL SYLLABLE TIKEUT-YU-PIEUP
+8AC4 B4D2 # HANGUL SYLLABLE TIKEUT-YU-PIEUPSIOS
+8AC5 B4D3 # HANGUL SYLLABLE TIKEUT-YU-SIOS
+8AC6 B4D4 # HANGUL SYLLABLE TIKEUT-YU-SSANGSIOS
+8AC7 B4D6 # HANGUL SYLLABLE TIKEUT-YU-CIEUC
+8AC8 B4D7 # HANGUL SYLLABLE TIKEUT-YU-CHIEUCH
+8AC9 B4D8 # HANGUL SYLLABLE TIKEUT-YU-KHIEUKH
+8ACA B4D9 # HANGUL SYLLABLE TIKEUT-YU-THIEUTH
+8ACB B4DA # HANGUL SYLLABLE TIKEUT-YU-PHIEUPH
+8ACC B4DB # HANGUL SYLLABLE TIKEUT-YU-HIEUH
+8ACD B4DE # HANGUL SYLLABLE TIKEUT-EU-SSANGKIYEOK
+8ACE B4DF # HANGUL SYLLABLE TIKEUT-EU-KIYEOKSIOS
+8ACF B4E1 # HANGUL SYLLABLE TIKEUT-EU-NIEUNCIEUC
+8AD0 B4E2 # HANGUL SYLLABLE TIKEUT-EU-NIEUNHIEUH
+8AD1 B4E5 # HANGUL SYLLABLE TIKEUT-EU-RIEULKIYEOK
+8AD2 B4E7 # HANGUL SYLLABLE TIKEUT-EU-RIEULPIEUP
+8AD3 B4E8 # HANGUL SYLLABLE TIKEUT-EU-RIEULSIOS
+8AD4 B4E9 # HANGUL SYLLABLE TIKEUT-EU-RIEULTHIEUTH
+8AD5 B4EA # HANGUL SYLLABLE TIKEUT-EU-RIEULPHIEUPH
+8AD6 B4EB # HANGUL SYLLABLE TIKEUT-EU-RIEULHIEUH
+8AD7 B4EE # HANGUL SYLLABLE TIKEUT-EU-PIEUPSIOS
+8AD8 B4F0 # HANGUL SYLLABLE TIKEUT-EU-SSANGSIOS
+8AD9 B4F2 # HANGUL SYLLABLE TIKEUT-EU-CIEUC
+8ADA B4F3 # HANGUL SYLLABLE TIKEUT-EU-CHIEUCH
+8ADB B4F4 # HANGUL SYLLABLE TIKEUT-EU-KHIEUKH
+8ADC B4F5 # HANGUL SYLLABLE TIKEUT-EU-THIEUTH
+8ADD B4F6 # HANGUL SYLLABLE TIKEUT-EU-PHIEUPH
+8ADE B4F7 # HANGUL SYLLABLE TIKEUT-EU-HIEUH
+8ADF B4F9 # HANGUL SYLLABLE TIKEUT-YI-KIYEOK
+8AE0 B4FA # HANGUL SYLLABLE TIKEUT-YI-SSANGKIYEOK
+8AE1 B4FB # HANGUL SYLLABLE TIKEUT-YI-KIYEOKSIOS
+8AE2 B4FC # HANGUL SYLLABLE TIKEUT-YI-NIEUN
+8AE3 B4FD # HANGUL SYLLABLE TIKEUT-YI-NIEUNCIEUC
+8AE4 B4FE # HANGUL SYLLABLE TIKEUT-YI-NIEUNHIEUH
+8AE5 B4FF # HANGUL SYLLABLE TIKEUT-YI-TIKEUT
+8AE6 B500 # HANGUL SYLLABLE TIKEUT-YI-RIEUL
+8AE7 B501 # HANGUL SYLLABLE TIKEUT-YI-RIEULKIYEOK
+8AE8 B502 # HANGUL SYLLABLE TIKEUT-YI-RIEULMIEUM
+8AE9 B503 # HANGUL SYLLABLE TIKEUT-YI-RIEULPIEUP
+8AEA B504 # HANGUL SYLLABLE TIKEUT-YI-RIEULSIOS
+8AEB B505 # HANGUL SYLLABLE TIKEUT-YI-RIEULTHIEUTH
+8AEC B506 # HANGUL SYLLABLE TIKEUT-YI-RIEULPHIEUPH
+8AED B507 # HANGUL SYLLABLE TIKEUT-YI-RIEULHIEUH
+8AEE B508 # HANGUL SYLLABLE TIKEUT-YI-MIEUM
+8AEF B509 # HANGUL SYLLABLE TIKEUT-YI-PIEUP
+8AF0 B50A # HANGUL SYLLABLE TIKEUT-YI-PIEUPSIOS
+8AF1 B50B # HANGUL SYLLABLE TIKEUT-YI-SIOS
+8AF2 B50C # HANGUL SYLLABLE TIKEUT-YI-SSANGSIOS
+8AF3 B50D # HANGUL SYLLABLE TIKEUT-YI-IEUNG
+8AF4 B50E # HANGUL SYLLABLE TIKEUT-YI-CIEUC
+8AF5 B50F # HANGUL SYLLABLE TIKEUT-YI-CHIEUCH
+8AF6 B510 # HANGUL SYLLABLE TIKEUT-YI-KHIEUKH
+8AF7 B511 # HANGUL SYLLABLE TIKEUT-YI-THIEUTH
+8AF8 B512 # HANGUL SYLLABLE TIKEUT-YI-PHIEUPH
+8AF9 B513 # HANGUL SYLLABLE TIKEUT-YI-HIEUH
+8AFA B516 # HANGUL SYLLABLE TIKEUT-I-SSANGKIYEOK
+8AFB B517 # HANGUL SYLLABLE TIKEUT-I-KIYEOKSIOS
+8AFC B519 # HANGUL SYLLABLE TIKEUT-I-NIEUNCIEUC
+8AFD B51A # HANGUL SYLLABLE TIKEUT-I-NIEUNHIEUH
+8AFE B51D # HANGUL SYLLABLE TIKEUT-I-RIEULKIYEOK
+8B41 B51E # HANGUL SYLLABLE TIKEUT-I-RIEULMIEUM
+8B42 B51F # HANGUL SYLLABLE TIKEUT-I-RIEULPIEUP
+8B43 B520 # HANGUL SYLLABLE TIKEUT-I-RIEULSIOS
+8B44 B521 # HANGUL SYLLABLE TIKEUT-I-RIEULTHIEUTH
+8B45 B522 # HANGUL SYLLABLE TIKEUT-I-RIEULPHIEUPH
+8B46 B523 # HANGUL SYLLABLE TIKEUT-I-RIEULHIEUH
+8B47 B526 # HANGUL SYLLABLE TIKEUT-I-PIEUPSIOS
+8B48 B52B # HANGUL SYLLABLE TIKEUT-I-CHIEUCH
+8B49 B52C # HANGUL SYLLABLE TIKEUT-I-KHIEUKH
+8B4A B52D # HANGUL SYLLABLE TIKEUT-I-THIEUTH
+8B4B B52E # HANGUL SYLLABLE TIKEUT-I-PHIEUPH
+8B4C B52F # HANGUL SYLLABLE TIKEUT-I-HIEUH
+8B4D B532 # HANGUL SYLLABLE SSANGTIKEUT-A-SSANGKIYEOK
+8B4E B533 # HANGUL SYLLABLE SSANGTIKEUT-A-KIYEOKSIOS
+8B4F B535 # HANGUL SYLLABLE SSANGTIKEUT-A-NIEUNCIEUC
+8B50 B536 # HANGUL SYLLABLE SSANGTIKEUT-A-NIEUNHIEUH
+8B51 B537 # HANGUL SYLLABLE SSANGTIKEUT-A-TIKEUT
+8B52 B539 # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULKIYEOK
+8B53 B53A # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULMIEUM
+8B54 B53B # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULPIEUP
+8B55 B53C # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULSIOS
+8B56 B53D # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULTHIEUTH
+8B57 B53E # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULPHIEUPH
+8B58 B53F # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULHIEUH
+8B59 B542 # HANGUL SYLLABLE SSANGTIKEUT-A-PIEUPSIOS
+8B5A B546 # HANGUL SYLLABLE SSANGTIKEUT-A-CIEUC
+8B61 B547 # HANGUL SYLLABLE SSANGTIKEUT-A-CHIEUCH
+8B62 B548 # HANGUL SYLLABLE SSANGTIKEUT-A-KHIEUKH
+8B63 B549 # HANGUL SYLLABLE SSANGTIKEUT-A-THIEUTH
+8B64 B54A # HANGUL SYLLABLE SSANGTIKEUT-A-PHIEUPH
+8B65 B54E # HANGUL SYLLABLE SSANGTIKEUT-AE-SSANGKIYEOK
+8B66 B54F # HANGUL SYLLABLE SSANGTIKEUT-AE-KIYEOKSIOS
+8B67 B551 # HANGUL SYLLABLE SSANGTIKEUT-AE-NIEUNCIEUC
+8B68 B552 # HANGUL SYLLABLE SSANGTIKEUT-AE-NIEUNHIEUH
+8B69 B553 # HANGUL SYLLABLE SSANGTIKEUT-AE-TIKEUT
+8B6A B555 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULKIYEOK
+8B6B B556 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULMIEUM
+8B6C B557 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULPIEUP
+8B6D B558 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULSIOS
+8B6E B559 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULTHIEUTH
+8B6F B55A # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULPHIEUPH
+8B70 B55B # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULHIEUH
+8B71 B55E # HANGUL SYLLABLE SSANGTIKEUT-AE-PIEUPSIOS
+8B72 B562 # HANGUL SYLLABLE SSANGTIKEUT-AE-CIEUC
+8B73 B563 # HANGUL SYLLABLE SSANGTIKEUT-AE-CHIEUCH
+8B74 B564 # HANGUL SYLLABLE SSANGTIKEUT-AE-KHIEUKH
+8B75 B565 # HANGUL SYLLABLE SSANGTIKEUT-AE-THIEUTH
+8B76 B566 # HANGUL SYLLABLE SSANGTIKEUT-AE-PHIEUPH
+8B77 B567 # HANGUL SYLLABLE SSANGTIKEUT-AE-HIEUH
+8B78 B568 # HANGUL SYLLABLE SSANGTIKEUT-YA
+8B79 B569 # HANGUL SYLLABLE SSANGTIKEUT-YA-KIYEOK
+8B7A B56A # HANGUL SYLLABLE SSANGTIKEUT-YA-SSANGKIYEOK
+8B81 B56B # HANGUL SYLLABLE SSANGTIKEUT-YA-KIYEOKSIOS
+8B82 B56C # HANGUL SYLLABLE SSANGTIKEUT-YA-NIEUN
+8B83 B56D # HANGUL SYLLABLE SSANGTIKEUT-YA-NIEUNCIEUC
+8B84 B56E # HANGUL SYLLABLE SSANGTIKEUT-YA-NIEUNHIEUH
+8B85 B56F # HANGUL SYLLABLE SSANGTIKEUT-YA-TIKEUT
+8B86 B570 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEUL
+8B87 B571 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULKIYEOK
+8B88 B572 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULMIEUM
+8B89 B573 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULPIEUP
+8B8A B574 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULSIOS
+8B8B B575 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULTHIEUTH
+8B8C B576 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULPHIEUPH
+8B8D B577 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULHIEUH
+8B8E B578 # HANGUL SYLLABLE SSANGTIKEUT-YA-MIEUM
+8B8F B579 # HANGUL SYLLABLE SSANGTIKEUT-YA-PIEUP
+8B90 B57A # HANGUL SYLLABLE SSANGTIKEUT-YA-PIEUPSIOS
+8B91 B57B # HANGUL SYLLABLE SSANGTIKEUT-YA-SIOS
+8B92 B57C # HANGUL SYLLABLE SSANGTIKEUT-YA-SSANGSIOS
+8B93 B57D # HANGUL SYLLABLE SSANGTIKEUT-YA-IEUNG
+8B94 B57E # HANGUL SYLLABLE SSANGTIKEUT-YA-CIEUC
+8B95 B57F # HANGUL SYLLABLE SSANGTIKEUT-YA-CHIEUCH
+8B96 B580 # HANGUL SYLLABLE SSANGTIKEUT-YA-KHIEUKH
+8B97 B581 # HANGUL SYLLABLE SSANGTIKEUT-YA-THIEUTH
+8B98 B582 # HANGUL SYLLABLE SSANGTIKEUT-YA-PHIEUPH
+8B99 B583 # HANGUL SYLLABLE SSANGTIKEUT-YA-HIEUH
+8B9A B584 # HANGUL SYLLABLE SSANGTIKEUT-YAE
+8B9B B585 # HANGUL SYLLABLE SSANGTIKEUT-YAE-KIYEOK
+8B9C B586 # HANGUL SYLLABLE SSANGTIKEUT-YAE-SSANGKIYEOK
+8B9D B587 # HANGUL SYLLABLE SSANGTIKEUT-YAE-KIYEOKSIOS
+8B9E B588 # HANGUL SYLLABLE SSANGTIKEUT-YAE-NIEUN
+8B9F B589 # HANGUL SYLLABLE SSANGTIKEUT-YAE-NIEUNCIEUC
+8BA0 B58A # HANGUL SYLLABLE SSANGTIKEUT-YAE-NIEUNHIEUH
+8BA1 B58B # HANGUL SYLLABLE SSANGTIKEUT-YAE-TIKEUT
+8BA2 B58C # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEUL
+8BA3 B58D # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULKIYEOK
+8BA4 B58E # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULMIEUM
+8BA5 B58F # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULPIEUP
+8BA6 B590 # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULSIOS
+8BA7 B591 # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULTHIEUTH
+8BA8 B592 # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULPHIEUPH
+8BA9 B593 # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULHIEUH
+8BAA B594 # HANGUL SYLLABLE SSANGTIKEUT-YAE-MIEUM
+8BAB B595 # HANGUL SYLLABLE SSANGTIKEUT-YAE-PIEUP
+8BAC B596 # HANGUL SYLLABLE SSANGTIKEUT-YAE-PIEUPSIOS
+8BAD B597 # HANGUL SYLLABLE SSANGTIKEUT-YAE-SIOS
+8BAE B598 # HANGUL SYLLABLE SSANGTIKEUT-YAE-SSANGSIOS
+8BAF B599 # HANGUL SYLLABLE SSANGTIKEUT-YAE-IEUNG
+8BB0 B59A # HANGUL SYLLABLE SSANGTIKEUT-YAE-CIEUC
+8BB1 B59B # HANGUL SYLLABLE SSANGTIKEUT-YAE-CHIEUCH
+8BB2 B59C # HANGUL SYLLABLE SSANGTIKEUT-YAE-KHIEUKH
+8BB3 B59D # HANGUL SYLLABLE SSANGTIKEUT-YAE-THIEUTH
+8BB4 B59E # HANGUL SYLLABLE SSANGTIKEUT-YAE-PHIEUPH
+8BB5 B59F # HANGUL SYLLABLE SSANGTIKEUT-YAE-HIEUH
+8BB6 B5A2 # HANGUL SYLLABLE SSANGTIKEUT-EO-SSANGKIYEOK
+8BB7 B5A3 # HANGUL SYLLABLE SSANGTIKEUT-EO-KIYEOKSIOS
+8BB8 B5A5 # HANGUL SYLLABLE SSANGTIKEUT-EO-NIEUNCIEUC
+8BB9 B5A6 # HANGUL SYLLABLE SSANGTIKEUT-EO-NIEUNHIEUH
+8BBA B5A7 # HANGUL SYLLABLE SSANGTIKEUT-EO-TIKEUT
+8BBB B5A9 # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULKIYEOK
+8BBC B5AC # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULSIOS
+8BBD B5AD # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULTHIEUTH
+8BBE B5AE # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULPHIEUPH
+8BBF B5AF # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULHIEUH
+8BC0 B5B2 # HANGUL SYLLABLE SSANGTIKEUT-EO-PIEUPSIOS
+8BC1 B5B6 # HANGUL SYLLABLE SSANGTIKEUT-EO-CIEUC
+8BC2 B5B7 # HANGUL SYLLABLE SSANGTIKEUT-EO-CHIEUCH
+8BC3 B5B8 # HANGUL SYLLABLE SSANGTIKEUT-EO-KHIEUKH
+8BC4 B5B9 # HANGUL SYLLABLE SSANGTIKEUT-EO-THIEUTH
+8BC5 B5BA # HANGUL SYLLABLE SSANGTIKEUT-EO-PHIEUPH
+8BC6 B5BE # HANGUL SYLLABLE SSANGTIKEUT-E-SSANGKIYEOK
+8BC7 B5BF # HANGUL SYLLABLE SSANGTIKEUT-E-KIYEOKSIOS
+8BC8 B5C1 # HANGUL SYLLABLE SSANGTIKEUT-E-NIEUNCIEUC
+8BC9 B5C2 # HANGUL SYLLABLE SSANGTIKEUT-E-NIEUNHIEUH
+8BCA B5C3 # HANGUL SYLLABLE SSANGTIKEUT-E-TIKEUT
+8BCB B5C5 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULKIYEOK
+8BCC B5C6 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULMIEUM
+8BCD B5C7 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULPIEUP
+8BCE B5C8 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULSIOS
+8BCF B5C9 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULTHIEUTH
+8BD0 B5CA # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULPHIEUPH
+8BD1 B5CB # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULHIEUH
+8BD2 B5CE # HANGUL SYLLABLE SSANGTIKEUT-E-PIEUPSIOS
+8BD3 B5D2 # HANGUL SYLLABLE SSANGTIKEUT-E-CIEUC
+8BD4 B5D3 # HANGUL SYLLABLE SSANGTIKEUT-E-CHIEUCH
+8BD5 B5D4 # HANGUL SYLLABLE SSANGTIKEUT-E-KHIEUKH
+8BD6 B5D5 # HANGUL SYLLABLE SSANGTIKEUT-E-THIEUTH
+8BD7 B5D6 # HANGUL SYLLABLE SSANGTIKEUT-E-PHIEUPH
+8BD8 B5D7 # HANGUL SYLLABLE SSANGTIKEUT-E-HIEUH
+8BD9 B5D9 # HANGUL SYLLABLE SSANGTIKEUT-YEO-KIYEOK
+8BDA B5DA # HANGUL SYLLABLE SSANGTIKEUT-YEO-SSANGKIYEOK
+8BDB B5DB # HANGUL SYLLABLE SSANGTIKEUT-YEO-KIYEOKSIOS
+8BDC B5DC # HANGUL SYLLABLE SSANGTIKEUT-YEO-NIEUN
+8BDD B5DD # HANGUL SYLLABLE SSANGTIKEUT-YEO-NIEUNCIEUC
+8BDE B5DE # HANGUL SYLLABLE SSANGTIKEUT-YEO-NIEUNHIEUH
+8BDF B5DF # HANGUL SYLLABLE SSANGTIKEUT-YEO-TIKEUT
+8BE0 B5E0 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEUL
+8BE1 B5E1 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULKIYEOK
+8BE2 B5E2 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULMIEUM
+8BE3 B5E3 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULPIEUP
+8BE4 B5E4 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULSIOS
+8BE5 B5E5 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULTHIEUTH
+8BE6 B5E6 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULPHIEUPH
+8BE7 B5E7 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULHIEUH
+8BE8 B5E8 # HANGUL SYLLABLE SSANGTIKEUT-YEO-MIEUM
+8BE9 B5E9 # HANGUL SYLLABLE SSANGTIKEUT-YEO-PIEUP
+8BEA B5EA # HANGUL SYLLABLE SSANGTIKEUT-YEO-PIEUPSIOS
+8BEB B5EB # HANGUL SYLLABLE SSANGTIKEUT-YEO-SIOS
+8BEC B5ED # HANGUL SYLLABLE SSANGTIKEUT-YEO-IEUNG
+8BED B5EE # HANGUL SYLLABLE SSANGTIKEUT-YEO-CIEUC
+8BEE B5EF # HANGUL SYLLABLE SSANGTIKEUT-YEO-CHIEUCH
+8BEF B5F0 # HANGUL SYLLABLE SSANGTIKEUT-YEO-KHIEUKH
+8BF0 B5F1 # HANGUL SYLLABLE SSANGTIKEUT-YEO-THIEUTH
+8BF1 B5F2 # HANGUL SYLLABLE SSANGTIKEUT-YEO-PHIEUPH
+8BF2 B5F3 # HANGUL SYLLABLE SSANGTIKEUT-YEO-HIEUH
+8BF3 B5F4 # HANGUL SYLLABLE SSANGTIKEUT-YE
+8BF4 B5F5 # HANGUL SYLLABLE SSANGTIKEUT-YE-KIYEOK
+8BF5 B5F6 # HANGUL SYLLABLE SSANGTIKEUT-YE-SSANGKIYEOK
+8BF6 B5F7 # HANGUL SYLLABLE SSANGTIKEUT-YE-KIYEOKSIOS
+8BF7 B5F8 # HANGUL SYLLABLE SSANGTIKEUT-YE-NIEUN
+8BF8 B5F9 # HANGUL SYLLABLE SSANGTIKEUT-YE-NIEUNCIEUC
+8BF9 B5FA # HANGUL SYLLABLE SSANGTIKEUT-YE-NIEUNHIEUH
+8BFA B5FB # HANGUL SYLLABLE SSANGTIKEUT-YE-TIKEUT
+8BFB B5FC # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEUL
+8BFC B5FD # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULKIYEOK
+8BFD B5FE # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULMIEUM
+8BFE B5FF # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULPIEUP
+8C41 B600 # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULSIOS
+8C42 B601 # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULTHIEUTH
+8C43 B602 # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULPHIEUPH
+8C44 B603 # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULHIEUH
+8C45 B604 # HANGUL SYLLABLE SSANGTIKEUT-YE-MIEUM
+8C46 B605 # HANGUL SYLLABLE SSANGTIKEUT-YE-PIEUP
+8C47 B606 # HANGUL SYLLABLE SSANGTIKEUT-YE-PIEUPSIOS
+8C48 B607 # HANGUL SYLLABLE SSANGTIKEUT-YE-SIOS
+8C49 B608 # HANGUL SYLLABLE SSANGTIKEUT-YE-SSANGSIOS
+8C4A B609 # HANGUL SYLLABLE SSANGTIKEUT-YE-IEUNG
+8C4B B60A # HANGUL SYLLABLE SSANGTIKEUT-YE-CIEUC
+8C4C B60B # HANGUL SYLLABLE SSANGTIKEUT-YE-CHIEUCH
+8C4D B60C # HANGUL SYLLABLE SSANGTIKEUT-YE-KHIEUKH
+8C4E B60D # HANGUL SYLLABLE SSANGTIKEUT-YE-THIEUTH
+8C4F B60E # HANGUL SYLLABLE SSANGTIKEUT-YE-PHIEUPH
+8C50 B60F # HANGUL SYLLABLE SSANGTIKEUT-YE-HIEUH
+8C51 B612 # HANGUL SYLLABLE SSANGTIKEUT-O-SSANGKIYEOK
+8C52 B613 # HANGUL SYLLABLE SSANGTIKEUT-O-KIYEOKSIOS
+8C53 B615 # HANGUL SYLLABLE SSANGTIKEUT-O-NIEUNCIEUC
+8C54 B616 # HANGUL SYLLABLE SSANGTIKEUT-O-NIEUNHIEUH
+8C55 B617 # HANGUL SYLLABLE SSANGTIKEUT-O-TIKEUT
+8C56 B619 # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULKIYEOK
+8C57 B61A # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULMIEUM
+8C58 B61B # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULPIEUP
+8C59 B61C # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULSIOS
+8C5A B61D # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULTHIEUTH
+8C61 B61E # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULPHIEUPH
+8C62 B61F # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULHIEUH
+8C63 B620 # HANGUL SYLLABLE SSANGTIKEUT-O-MIEUM
+8C64 B621 # HANGUL SYLLABLE SSANGTIKEUT-O-PIEUP
+8C65 B622 # HANGUL SYLLABLE SSANGTIKEUT-O-PIEUPSIOS
+8C66 B623 # HANGUL SYLLABLE SSANGTIKEUT-O-SIOS
+8C67 B624 # HANGUL SYLLABLE SSANGTIKEUT-O-SSANGSIOS
+8C68 B626 # HANGUL SYLLABLE SSANGTIKEUT-O-CIEUC
+8C69 B627 # HANGUL SYLLABLE SSANGTIKEUT-O-CHIEUCH
+8C6A B628 # HANGUL SYLLABLE SSANGTIKEUT-O-KHIEUKH
+8C6B B629 # HANGUL SYLLABLE SSANGTIKEUT-O-THIEUTH
+8C6C B62A # HANGUL SYLLABLE SSANGTIKEUT-O-PHIEUPH
+8C6D B62B # HANGUL SYLLABLE SSANGTIKEUT-O-HIEUH
+8C6E B62D # HANGUL SYLLABLE SSANGTIKEUT-WA-KIYEOK
+8C6F B62E # HANGUL SYLLABLE SSANGTIKEUT-WA-SSANGKIYEOK
+8C70 B62F # HANGUL SYLLABLE SSANGTIKEUT-WA-KIYEOKSIOS
+8C71 B630 # HANGUL SYLLABLE SSANGTIKEUT-WA-NIEUN
+8C72 B631 # HANGUL SYLLABLE SSANGTIKEUT-WA-NIEUNCIEUC
+8C73 B632 # HANGUL SYLLABLE SSANGTIKEUT-WA-NIEUNHIEUH
+8C74 B633 # HANGUL SYLLABLE SSANGTIKEUT-WA-TIKEUT
+8C75 B635 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULKIYEOK
+8C76 B636 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULMIEUM
+8C77 B637 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULPIEUP
+8C78 B638 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULSIOS
+8C79 B639 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULTHIEUTH
+8C7A B63A # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULPHIEUPH
+8C81 B63B # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULHIEUH
+8C82 B63C # HANGUL SYLLABLE SSANGTIKEUT-WA-MIEUM
+8C83 B63D # HANGUL SYLLABLE SSANGTIKEUT-WA-PIEUP
+8C84 B63E # HANGUL SYLLABLE SSANGTIKEUT-WA-PIEUPSIOS
+8C85 B63F # HANGUL SYLLABLE SSANGTIKEUT-WA-SIOS
+8C86 B640 # HANGUL SYLLABLE SSANGTIKEUT-WA-SSANGSIOS
+8C87 B641 # HANGUL SYLLABLE SSANGTIKEUT-WA-IEUNG
+8C88 B642 # HANGUL SYLLABLE SSANGTIKEUT-WA-CIEUC
+8C89 B643 # HANGUL SYLLABLE SSANGTIKEUT-WA-CHIEUCH
+8C8A B644 # HANGUL SYLLABLE SSANGTIKEUT-WA-KHIEUKH
+8C8B B645 # HANGUL SYLLABLE SSANGTIKEUT-WA-THIEUTH
+8C8C B646 # HANGUL SYLLABLE SSANGTIKEUT-WA-PHIEUPH
+8C8D B647 # HANGUL SYLLABLE SSANGTIKEUT-WA-HIEUH
+8C8E B649 # HANGUL SYLLABLE SSANGTIKEUT-WAE-KIYEOK
+8C8F B64A # HANGUL SYLLABLE SSANGTIKEUT-WAE-SSANGKIYEOK
+8C90 B64B # HANGUL SYLLABLE SSANGTIKEUT-WAE-KIYEOKSIOS
+8C91 B64C # HANGUL SYLLABLE SSANGTIKEUT-WAE-NIEUN
+8C92 B64D # HANGUL SYLLABLE SSANGTIKEUT-WAE-NIEUNCIEUC
+8C93 B64E # HANGUL SYLLABLE SSANGTIKEUT-WAE-NIEUNHIEUH
+8C94 B64F # HANGUL SYLLABLE SSANGTIKEUT-WAE-TIKEUT
+8C95 B650 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEUL
+8C96 B651 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULKIYEOK
+8C97 B652 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULMIEUM
+8C98 B653 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULPIEUP
+8C99 B654 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULSIOS
+8C9A B655 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULTHIEUTH
+8C9B B656 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULPHIEUPH
+8C9C B657 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULHIEUH
+8C9D B658 # HANGUL SYLLABLE SSANGTIKEUT-WAE-MIEUM
+8C9E B659 # HANGUL SYLLABLE SSANGTIKEUT-WAE-PIEUP
+8C9F B65A # HANGUL SYLLABLE SSANGTIKEUT-WAE-PIEUPSIOS
+8CA0 B65B # HANGUL SYLLABLE SSANGTIKEUT-WAE-SIOS
+8CA1 B65C # HANGUL SYLLABLE SSANGTIKEUT-WAE-SSANGSIOS
+8CA2 B65D # HANGUL SYLLABLE SSANGTIKEUT-WAE-IEUNG
+8CA3 B65E # HANGUL SYLLABLE SSANGTIKEUT-WAE-CIEUC
+8CA4 B65F # HANGUL SYLLABLE SSANGTIKEUT-WAE-CHIEUCH
+8CA5 B660 # HANGUL SYLLABLE SSANGTIKEUT-WAE-KHIEUKH
+8CA6 B661 # HANGUL SYLLABLE SSANGTIKEUT-WAE-THIEUTH
+8CA7 B662 # HANGUL SYLLABLE SSANGTIKEUT-WAE-PHIEUPH
+8CA8 B663 # HANGUL SYLLABLE SSANGTIKEUT-WAE-HIEUH
+8CA9 B665 # HANGUL SYLLABLE SSANGTIKEUT-OE-KIYEOK
+8CAA B666 # HANGUL SYLLABLE SSANGTIKEUT-OE-SSANGKIYEOK
+8CAB B667 # HANGUL SYLLABLE SSANGTIKEUT-OE-KIYEOKSIOS
+8CAC B669 # HANGUL SYLLABLE SSANGTIKEUT-OE-NIEUNCIEUC
+8CAD B66A # HANGUL SYLLABLE SSANGTIKEUT-OE-NIEUNHIEUH
+8CAE B66B # HANGUL SYLLABLE SSANGTIKEUT-OE-TIKEUT
+8CAF B66C # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEUL
+8CB0 B66D # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULKIYEOK
+8CB1 B66E # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULMIEUM
+8CB2 B66F # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULPIEUP
+8CB3 B670 # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULSIOS
+8CB4 B671 # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULTHIEUTH
+8CB5 B672 # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULPHIEUPH
+8CB6 B673 # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULHIEUH
+8CB7 B674 # HANGUL SYLLABLE SSANGTIKEUT-OE-MIEUM
+8CB8 B675 # HANGUL SYLLABLE SSANGTIKEUT-OE-PIEUP
+8CB9 B676 # HANGUL SYLLABLE SSANGTIKEUT-OE-PIEUPSIOS
+8CBA B677 # HANGUL SYLLABLE SSANGTIKEUT-OE-SIOS
+8CBB B678 # HANGUL SYLLABLE SSANGTIKEUT-OE-SSANGSIOS
+8CBC B679 # HANGUL SYLLABLE SSANGTIKEUT-OE-IEUNG
+8CBD B67A # HANGUL SYLLABLE SSANGTIKEUT-OE-CIEUC
+8CBE B67B # HANGUL SYLLABLE SSANGTIKEUT-OE-CHIEUCH
+8CBF B67C # HANGUL SYLLABLE SSANGTIKEUT-OE-KHIEUKH
+8CC0 B67D # HANGUL SYLLABLE SSANGTIKEUT-OE-THIEUTH
+8CC1 B67E # HANGUL SYLLABLE SSANGTIKEUT-OE-PHIEUPH
+8CC2 B67F # HANGUL SYLLABLE SSANGTIKEUT-OE-HIEUH
+8CC3 B680 # HANGUL SYLLABLE SSANGTIKEUT-YO
+8CC4 B681 # HANGUL SYLLABLE SSANGTIKEUT-YO-KIYEOK
+8CC5 B682 # HANGUL SYLLABLE SSANGTIKEUT-YO-SSANGKIYEOK
+8CC6 B683 # HANGUL SYLLABLE SSANGTIKEUT-YO-KIYEOKSIOS
+8CC7 B684 # HANGUL SYLLABLE SSANGTIKEUT-YO-NIEUN
+8CC8 B685 # HANGUL SYLLABLE SSANGTIKEUT-YO-NIEUNCIEUC
+8CC9 B686 # HANGUL SYLLABLE SSANGTIKEUT-YO-NIEUNHIEUH
+8CCA B687 # HANGUL SYLLABLE SSANGTIKEUT-YO-TIKEUT
+8CCB B688 # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEUL
+8CCC B689 # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULKIYEOK
+8CCD B68A # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULMIEUM
+8CCE B68B # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULPIEUP
+8CCF B68C # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULSIOS
+8CD0 B68D # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULTHIEUTH
+8CD1 B68E # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULPHIEUPH
+8CD2 B68F # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULHIEUH
+8CD3 B690 # HANGUL SYLLABLE SSANGTIKEUT-YO-MIEUM
+8CD4 B691 # HANGUL SYLLABLE SSANGTIKEUT-YO-PIEUP
+8CD5 B692 # HANGUL SYLLABLE SSANGTIKEUT-YO-PIEUPSIOS
+8CD6 B693 # HANGUL SYLLABLE SSANGTIKEUT-YO-SIOS
+8CD7 B694 # HANGUL SYLLABLE SSANGTIKEUT-YO-SSANGSIOS
+8CD8 B695 # HANGUL SYLLABLE SSANGTIKEUT-YO-IEUNG
+8CD9 B696 # HANGUL SYLLABLE SSANGTIKEUT-YO-CIEUC
+8CDA B697 # HANGUL SYLLABLE SSANGTIKEUT-YO-CHIEUCH
+8CDB B698 # HANGUL SYLLABLE SSANGTIKEUT-YO-KHIEUKH
+8CDC B699 # HANGUL SYLLABLE SSANGTIKEUT-YO-THIEUTH
+8CDD B69A # HANGUL SYLLABLE SSANGTIKEUT-YO-PHIEUPH
+8CDE B69B # HANGUL SYLLABLE SSANGTIKEUT-YO-HIEUH
+8CDF B69E # HANGUL SYLLABLE SSANGTIKEUT-U-SSANGKIYEOK
+8CE0 B69F # HANGUL SYLLABLE SSANGTIKEUT-U-KIYEOKSIOS
+8CE1 B6A1 # HANGUL SYLLABLE SSANGTIKEUT-U-NIEUNCIEUC
+8CE2 B6A2 # HANGUL SYLLABLE SSANGTIKEUT-U-NIEUNHIEUH
+8CE3 B6A3 # HANGUL SYLLABLE SSANGTIKEUT-U-TIKEUT
+8CE4 B6A5 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULKIYEOK
+8CE5 B6A6 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULMIEUM
+8CE6 B6A7 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULPIEUP
+8CE7 B6A8 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULSIOS
+8CE8 B6A9 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULTHIEUTH
+8CE9 B6AA # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULPHIEUPH
+8CEA B6AD # HANGUL SYLLABLE SSANGTIKEUT-U-PIEUP
+8CEB B6AE # HANGUL SYLLABLE SSANGTIKEUT-U-PIEUPSIOS
+8CEC B6AF # HANGUL SYLLABLE SSANGTIKEUT-U-SIOS
+8CED B6B0 # HANGUL SYLLABLE SSANGTIKEUT-U-SSANGSIOS
+8CEE B6B2 # HANGUL SYLLABLE SSANGTIKEUT-U-CIEUC
+8CEF B6B3 # HANGUL SYLLABLE SSANGTIKEUT-U-CHIEUCH
+8CF0 B6B4 # HANGUL SYLLABLE SSANGTIKEUT-U-KHIEUKH
+8CF1 B6B5 # HANGUL SYLLABLE SSANGTIKEUT-U-THIEUTH
+8CF2 B6B6 # HANGUL SYLLABLE SSANGTIKEUT-U-PHIEUPH
+8CF3 B6B7 # HANGUL SYLLABLE SSANGTIKEUT-U-HIEUH
+8CF4 B6B8 # HANGUL SYLLABLE SSANGTIKEUT-WEO
+8CF5 B6B9 # HANGUL SYLLABLE SSANGTIKEUT-WEO-KIYEOK
+8CF6 B6BA # HANGUL SYLLABLE SSANGTIKEUT-WEO-SSANGKIYEOK
+8CF7 B6BB # HANGUL SYLLABLE SSANGTIKEUT-WEO-KIYEOKSIOS
+8CF8 B6BC # HANGUL SYLLABLE SSANGTIKEUT-WEO-NIEUN
+8CF9 B6BD # HANGUL SYLLABLE SSANGTIKEUT-WEO-NIEUNCIEUC
+8CFA B6BE # HANGUL SYLLABLE SSANGTIKEUT-WEO-NIEUNHIEUH
+8CFB B6BF # HANGUL SYLLABLE SSANGTIKEUT-WEO-TIKEUT
+8CFC B6C0 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEUL
+8CFD B6C1 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULKIYEOK
+8CFE B6C2 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULMIEUM
+8D41 B6C3 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULPIEUP
+8D42 B6C4 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULSIOS
+8D43 B6C5 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULTHIEUTH
+8D44 B6C6 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULPHIEUPH
+8D45 B6C7 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULHIEUH
+8D46 B6C8 # HANGUL SYLLABLE SSANGTIKEUT-WEO-MIEUM
+8D47 B6C9 # HANGUL SYLLABLE SSANGTIKEUT-WEO-PIEUP
+8D48 B6CA # HANGUL SYLLABLE SSANGTIKEUT-WEO-PIEUPSIOS
+8D49 B6CB # HANGUL SYLLABLE SSANGTIKEUT-WEO-SIOS
+8D4A B6CC # HANGUL SYLLABLE SSANGTIKEUT-WEO-SSANGSIOS
+8D4B B6CD # HANGUL SYLLABLE SSANGTIKEUT-WEO-IEUNG
+8D4C B6CE # HANGUL SYLLABLE SSANGTIKEUT-WEO-CIEUC
+8D4D B6CF # HANGUL SYLLABLE SSANGTIKEUT-WEO-CHIEUCH
+8D4E B6D0 # HANGUL SYLLABLE SSANGTIKEUT-WEO-KHIEUKH
+8D4F B6D1 # HANGUL SYLLABLE SSANGTIKEUT-WEO-THIEUTH
+8D50 B6D2 # HANGUL SYLLABLE SSANGTIKEUT-WEO-PHIEUPH
+8D51 B6D3 # HANGUL SYLLABLE SSANGTIKEUT-WEO-HIEUH
+8D52 B6D5 # HANGUL SYLLABLE SSANGTIKEUT-WE-KIYEOK
+8D53 B6D6 # HANGUL SYLLABLE SSANGTIKEUT-WE-SSANGKIYEOK
+8D54 B6D7 # HANGUL SYLLABLE SSANGTIKEUT-WE-KIYEOKSIOS
+8D55 B6D8 # HANGUL SYLLABLE SSANGTIKEUT-WE-NIEUN
+8D56 B6D9 # HANGUL SYLLABLE SSANGTIKEUT-WE-NIEUNCIEUC
+8D57 B6DA # HANGUL SYLLABLE SSANGTIKEUT-WE-NIEUNHIEUH
+8D58 B6DB # HANGUL SYLLABLE SSANGTIKEUT-WE-TIKEUT
+8D59 B6DC # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEUL
+8D5A B6DD # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULKIYEOK
+8D61 B6DE # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULMIEUM
+8D62 B6DF # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULPIEUP
+8D63 B6E0 # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULSIOS
+8D64 B6E1 # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULTHIEUTH
+8D65 B6E2 # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULPHIEUPH
+8D66 B6E3 # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULHIEUH
+8D67 B6E4 # HANGUL SYLLABLE SSANGTIKEUT-WE-MIEUM
+8D68 B6E5 # HANGUL SYLLABLE SSANGTIKEUT-WE-PIEUP
+8D69 B6E6 # HANGUL SYLLABLE SSANGTIKEUT-WE-PIEUPSIOS
+8D6A B6E7 # HANGUL SYLLABLE SSANGTIKEUT-WE-SIOS
+8D6B B6E8 # HANGUL SYLLABLE SSANGTIKEUT-WE-SSANGSIOS
+8D6C B6E9 # HANGUL SYLLABLE SSANGTIKEUT-WE-IEUNG
+8D6D B6EA # HANGUL SYLLABLE SSANGTIKEUT-WE-CIEUC
+8D6E B6EB # HANGUL SYLLABLE SSANGTIKEUT-WE-CHIEUCH
+8D6F B6EC # HANGUL SYLLABLE SSANGTIKEUT-WE-KHIEUKH
+8D70 B6ED # HANGUL SYLLABLE SSANGTIKEUT-WE-THIEUTH
+8D71 B6EE # HANGUL SYLLABLE SSANGTIKEUT-WE-PHIEUPH
+8D72 B6EF # HANGUL SYLLABLE SSANGTIKEUT-WE-HIEUH
+8D73 B6F1 # HANGUL SYLLABLE SSANGTIKEUT-WI-KIYEOK
+8D74 B6F2 # HANGUL SYLLABLE SSANGTIKEUT-WI-SSANGKIYEOK
+8D75 B6F3 # HANGUL SYLLABLE SSANGTIKEUT-WI-KIYEOKSIOS
+8D76 B6F5 # HANGUL SYLLABLE SSANGTIKEUT-WI-NIEUNCIEUC
+8D77 B6F6 # HANGUL SYLLABLE SSANGTIKEUT-WI-NIEUNHIEUH
+8D78 B6F7 # HANGUL SYLLABLE SSANGTIKEUT-WI-TIKEUT
+8D79 B6F9 # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULKIYEOK
+8D7A B6FA # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULMIEUM
+8D81 B6FB # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULPIEUP
+8D82 B6FC # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULSIOS
+8D83 B6FD # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULTHIEUTH
+8D84 B6FE # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULPHIEUPH
+8D85 B6FF # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULHIEUH
+8D86 B702 # HANGUL SYLLABLE SSANGTIKEUT-WI-PIEUPSIOS
+8D87 B703 # HANGUL SYLLABLE SSANGTIKEUT-WI-SIOS
+8D88 B704 # HANGUL SYLLABLE SSANGTIKEUT-WI-SSANGSIOS
+8D89 B706 # HANGUL SYLLABLE SSANGTIKEUT-WI-CIEUC
+8D8A B707 # HANGUL SYLLABLE SSANGTIKEUT-WI-CHIEUCH
+8D8B B708 # HANGUL SYLLABLE SSANGTIKEUT-WI-KHIEUKH
+8D8C B709 # HANGUL SYLLABLE SSANGTIKEUT-WI-THIEUTH
+8D8D B70A # HANGUL SYLLABLE SSANGTIKEUT-WI-PHIEUPH
+8D8E B70B # HANGUL SYLLABLE SSANGTIKEUT-WI-HIEUH
+8D8F B70C # HANGUL SYLLABLE SSANGTIKEUT-YU
+8D90 B70D # HANGUL SYLLABLE SSANGTIKEUT-YU-KIYEOK
+8D91 B70E # HANGUL SYLLABLE SSANGTIKEUT-YU-SSANGKIYEOK
+8D92 B70F # HANGUL SYLLABLE SSANGTIKEUT-YU-KIYEOKSIOS
+8D93 B710 # HANGUL SYLLABLE SSANGTIKEUT-YU-NIEUN
+8D94 B711 # HANGUL SYLLABLE SSANGTIKEUT-YU-NIEUNCIEUC
+8D95 B712 # HANGUL SYLLABLE SSANGTIKEUT-YU-NIEUNHIEUH
+8D96 B713 # HANGUL SYLLABLE SSANGTIKEUT-YU-TIKEUT
+8D97 B714 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEUL
+8D98 B715 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULKIYEOK
+8D99 B716 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULMIEUM
+8D9A B717 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULPIEUP
+8D9B B718 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULSIOS
+8D9C B719 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULTHIEUTH
+8D9D B71A # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULPHIEUPH
+8D9E B71B # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULHIEUH
+8D9F B71C # HANGUL SYLLABLE SSANGTIKEUT-YU-MIEUM
+8DA0 B71D # HANGUL SYLLABLE SSANGTIKEUT-YU-PIEUP
+8DA1 B71E # HANGUL SYLLABLE SSANGTIKEUT-YU-PIEUPSIOS
+8DA2 B71F # HANGUL SYLLABLE SSANGTIKEUT-YU-SIOS
+8DA3 B720 # HANGUL SYLLABLE SSANGTIKEUT-YU-SSANGSIOS
+8DA4 B721 # HANGUL SYLLABLE SSANGTIKEUT-YU-IEUNG
+8DA5 B722 # HANGUL SYLLABLE SSANGTIKEUT-YU-CIEUC
+8DA6 B723 # HANGUL SYLLABLE SSANGTIKEUT-YU-CHIEUCH
+8DA7 B724 # HANGUL SYLLABLE SSANGTIKEUT-YU-KHIEUKH
+8DA8 B725 # HANGUL SYLLABLE SSANGTIKEUT-YU-THIEUTH
+8DA9 B726 # HANGUL SYLLABLE SSANGTIKEUT-YU-PHIEUPH
+8DAA B727 # HANGUL SYLLABLE SSANGTIKEUT-YU-HIEUH
+8DAB B72A # HANGUL SYLLABLE SSANGTIKEUT-EU-SSANGKIYEOK
+8DAC B72B # HANGUL SYLLABLE SSANGTIKEUT-EU-KIYEOKSIOS
+8DAD B72D # HANGUL SYLLABLE SSANGTIKEUT-EU-NIEUNCIEUC
+8DAE B72E # HANGUL SYLLABLE SSANGTIKEUT-EU-NIEUNHIEUH
+8DAF B731 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULKIYEOK
+8DB0 B732 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULMIEUM
+8DB1 B733 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULPIEUP
+8DB2 B734 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULSIOS
+8DB3 B735 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULTHIEUTH
+8DB4 B736 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULPHIEUPH
+8DB5 B737 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULHIEUH
+8DB6 B73A # HANGUL SYLLABLE SSANGTIKEUT-EU-PIEUPSIOS
+8DB7 B73C # HANGUL SYLLABLE SSANGTIKEUT-EU-SSANGSIOS
+8DB8 B73D # HANGUL SYLLABLE SSANGTIKEUT-EU-IEUNG
+8DB9 B73E # HANGUL SYLLABLE SSANGTIKEUT-EU-CIEUC
+8DBA B73F # HANGUL SYLLABLE SSANGTIKEUT-EU-CHIEUCH
+8DBB B740 # HANGUL SYLLABLE SSANGTIKEUT-EU-KHIEUKH
+8DBC B741 # HANGUL SYLLABLE SSANGTIKEUT-EU-THIEUTH
+8DBD B742 # HANGUL SYLLABLE SSANGTIKEUT-EU-PHIEUPH
+8DBE B743 # HANGUL SYLLABLE SSANGTIKEUT-EU-HIEUH
+8DBF B745 # HANGUL SYLLABLE SSANGTIKEUT-YI-KIYEOK
+8DC0 B746 # HANGUL SYLLABLE SSANGTIKEUT-YI-SSANGKIYEOK
+8DC1 B747 # HANGUL SYLLABLE SSANGTIKEUT-YI-KIYEOKSIOS
+8DC2 B749 # HANGUL SYLLABLE SSANGTIKEUT-YI-NIEUNCIEUC
+8DC3 B74A # HANGUL SYLLABLE SSANGTIKEUT-YI-NIEUNHIEUH
+8DC4 B74B # HANGUL SYLLABLE SSANGTIKEUT-YI-TIKEUT
+8DC5 B74D # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULKIYEOK
+8DC6 B74E # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULMIEUM
+8DC7 B74F # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULPIEUP
+8DC8 B750 # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULSIOS
+8DC9 B751 # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULTHIEUTH
+8DCA B752 # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULPHIEUPH
+8DCB B753 # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULHIEUH
+8DCC B756 # HANGUL SYLLABLE SSANGTIKEUT-YI-PIEUPSIOS
+8DCD B757 # HANGUL SYLLABLE SSANGTIKEUT-YI-SIOS
+8DCE B758 # HANGUL SYLLABLE SSANGTIKEUT-YI-SSANGSIOS
+8DCF B759 # HANGUL SYLLABLE SSANGTIKEUT-YI-IEUNG
+8DD0 B75A # HANGUL SYLLABLE SSANGTIKEUT-YI-CIEUC
+8DD1 B75B # HANGUL SYLLABLE SSANGTIKEUT-YI-CHIEUCH
+8DD2 B75C # HANGUL SYLLABLE SSANGTIKEUT-YI-KHIEUKH
+8DD3 B75D # HANGUL SYLLABLE SSANGTIKEUT-YI-THIEUTH
+8DD4 B75E # HANGUL SYLLABLE SSANGTIKEUT-YI-PHIEUPH
+8DD5 B75F # HANGUL SYLLABLE SSANGTIKEUT-YI-HIEUH
+8DD6 B761 # HANGUL SYLLABLE SSANGTIKEUT-I-KIYEOK
+8DD7 B762 # HANGUL SYLLABLE SSANGTIKEUT-I-SSANGKIYEOK
+8DD8 B763 # HANGUL SYLLABLE SSANGTIKEUT-I-KIYEOKSIOS
+8DD9 B765 # HANGUL SYLLABLE SSANGTIKEUT-I-NIEUNCIEUC
+8DDA B766 # HANGUL SYLLABLE SSANGTIKEUT-I-NIEUNHIEUH
+8DDB B767 # HANGUL SYLLABLE SSANGTIKEUT-I-TIKEUT
+8DDC B769 # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULKIYEOK
+8DDD B76A # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULMIEUM
+8DDE B76B # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULPIEUP
+8DDF B76C # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULSIOS
+8DE0 B76D # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULTHIEUTH
+8DE1 B76E # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULPHIEUPH
+8DE2 B76F # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULHIEUH
+8DE3 B772 # HANGUL SYLLABLE SSANGTIKEUT-I-PIEUPSIOS
+8DE4 B774 # HANGUL SYLLABLE SSANGTIKEUT-I-SSANGSIOS
+8DE5 B776 # HANGUL SYLLABLE SSANGTIKEUT-I-CIEUC
+8DE6 B777 # HANGUL SYLLABLE SSANGTIKEUT-I-CHIEUCH
+8DE7 B778 # HANGUL SYLLABLE SSANGTIKEUT-I-KHIEUKH
+8DE8 B779 # HANGUL SYLLABLE SSANGTIKEUT-I-THIEUTH
+8DE9 B77A # HANGUL SYLLABLE SSANGTIKEUT-I-PHIEUPH
+8DEA B77B # HANGUL SYLLABLE SSANGTIKEUT-I-HIEUH
+8DEB B77E # HANGUL SYLLABLE RIEUL-A-SSANGKIYEOK
+8DEC B77F # HANGUL SYLLABLE RIEUL-A-KIYEOKSIOS
+8DED B781 # HANGUL SYLLABLE RIEUL-A-NIEUNCIEUC
+8DEE B782 # HANGUL SYLLABLE RIEUL-A-NIEUNHIEUH
+8DEF B783 # HANGUL SYLLABLE RIEUL-A-TIKEUT
+8DF0 B785 # HANGUL SYLLABLE RIEUL-A-RIEULKIYEOK
+8DF1 B786 # HANGUL SYLLABLE RIEUL-A-RIEULMIEUM
+8DF2 B787 # HANGUL SYLLABLE RIEUL-A-RIEULPIEUP
+8DF3 B788 # HANGUL SYLLABLE RIEUL-A-RIEULSIOS
+8DF4 B789 # HANGUL SYLLABLE RIEUL-A-RIEULTHIEUTH
+8DF5 B78A # HANGUL SYLLABLE RIEUL-A-RIEULPHIEUPH
+8DF6 B78B # HANGUL SYLLABLE RIEUL-A-RIEULHIEUH
+8DF7 B78E # HANGUL SYLLABLE RIEUL-A-PIEUPSIOS
+8DF8 B793 # HANGUL SYLLABLE RIEUL-A-CHIEUCH
+8DF9 B794 # HANGUL SYLLABLE RIEUL-A-KHIEUKH
+8DFA B795 # HANGUL SYLLABLE RIEUL-A-THIEUTH
+8DFB B79A # HANGUL SYLLABLE RIEUL-AE-SSANGKIYEOK
+8DFC B79B # HANGUL SYLLABLE RIEUL-AE-KIYEOKSIOS
+8DFD B79D # HANGUL SYLLABLE RIEUL-AE-NIEUNCIEUC
+8DFE B79E # HANGUL SYLLABLE RIEUL-AE-NIEUNHIEUH
+8E41 B79F # HANGUL SYLLABLE RIEUL-AE-TIKEUT
+8E42 B7A1 # HANGUL SYLLABLE RIEUL-AE-RIEULKIYEOK
+8E43 B7A2 # HANGUL SYLLABLE RIEUL-AE-RIEULMIEUM
+8E44 B7A3 # HANGUL SYLLABLE RIEUL-AE-RIEULPIEUP
+8E45 B7A4 # HANGUL SYLLABLE RIEUL-AE-RIEULSIOS
+8E46 B7A5 # HANGUL SYLLABLE RIEUL-AE-RIEULTHIEUTH
+8E47 B7A6 # HANGUL SYLLABLE RIEUL-AE-RIEULPHIEUPH
+8E48 B7A7 # HANGUL SYLLABLE RIEUL-AE-RIEULHIEUH
+8E49 B7AA # HANGUL SYLLABLE RIEUL-AE-PIEUPSIOS
+8E4A B7AE # HANGUL SYLLABLE RIEUL-AE-CIEUC
+8E4B B7AF # HANGUL SYLLABLE RIEUL-AE-CHIEUCH
+8E4C B7B0 # HANGUL SYLLABLE RIEUL-AE-KHIEUKH
+8E4D B7B1 # HANGUL SYLLABLE RIEUL-AE-THIEUTH
+8E4E B7B2 # HANGUL SYLLABLE RIEUL-AE-PHIEUPH
+8E4F B7B3 # HANGUL SYLLABLE RIEUL-AE-HIEUH
+8E50 B7B6 # HANGUL SYLLABLE RIEUL-YA-SSANGKIYEOK
+8E51 B7B7 # HANGUL SYLLABLE RIEUL-YA-KIYEOKSIOS
+8E52 B7B9 # HANGUL SYLLABLE RIEUL-YA-NIEUNCIEUC
+8E53 B7BA # HANGUL SYLLABLE RIEUL-YA-NIEUNHIEUH
+8E54 B7BB # HANGUL SYLLABLE RIEUL-YA-TIKEUT
+8E55 B7BC # HANGUL SYLLABLE RIEUL-YA-RIEUL
+8E56 B7BD # HANGUL SYLLABLE RIEUL-YA-RIEULKIYEOK
+8E57 B7BE # HANGUL SYLLABLE RIEUL-YA-RIEULMIEUM
+8E58 B7BF # HANGUL SYLLABLE RIEUL-YA-RIEULPIEUP
+8E59 B7C0 # HANGUL SYLLABLE RIEUL-YA-RIEULSIOS
+8E5A B7C1 # HANGUL SYLLABLE RIEUL-YA-RIEULTHIEUTH
+8E61 B7C2 # HANGUL SYLLABLE RIEUL-YA-RIEULPHIEUPH
+8E62 B7C3 # HANGUL SYLLABLE RIEUL-YA-RIEULHIEUH
+8E63 B7C4 # HANGUL SYLLABLE RIEUL-YA-MIEUM
+8E64 B7C5 # HANGUL SYLLABLE RIEUL-YA-PIEUP
+8E65 B7C6 # HANGUL SYLLABLE RIEUL-YA-PIEUPSIOS
+8E66 B7C8 # HANGUL SYLLABLE RIEUL-YA-SSANGSIOS
+8E67 B7CA # HANGUL SYLLABLE RIEUL-YA-CIEUC
+8E68 B7CB # HANGUL SYLLABLE RIEUL-YA-CHIEUCH
+8E69 B7CC # HANGUL SYLLABLE RIEUL-YA-KHIEUKH
+8E6A B7CD # HANGUL SYLLABLE RIEUL-YA-THIEUTH
+8E6B B7CE # HANGUL SYLLABLE RIEUL-YA-PHIEUPH
+8E6C B7CF # HANGUL SYLLABLE RIEUL-YA-HIEUH
+8E6D B7D0 # HANGUL SYLLABLE RIEUL-YAE
+8E6E B7D1 # HANGUL SYLLABLE RIEUL-YAE-KIYEOK
+8E6F B7D2 # HANGUL SYLLABLE RIEUL-YAE-SSANGKIYEOK
+8E70 B7D3 # HANGUL SYLLABLE RIEUL-YAE-KIYEOKSIOS
+8E71 B7D4 # HANGUL SYLLABLE RIEUL-YAE-NIEUN
+8E72 B7D5 # HANGUL SYLLABLE RIEUL-YAE-NIEUNCIEUC
+8E73 B7D6 # HANGUL SYLLABLE RIEUL-YAE-NIEUNHIEUH
+8E74 B7D7 # HANGUL SYLLABLE RIEUL-YAE-TIKEUT
+8E75 B7D8 # HANGUL SYLLABLE RIEUL-YAE-RIEUL
+8E76 B7D9 # HANGUL SYLLABLE RIEUL-YAE-RIEULKIYEOK
+8E77 B7DA # HANGUL SYLLABLE RIEUL-YAE-RIEULMIEUM
+8E78 B7DB # HANGUL SYLLABLE RIEUL-YAE-RIEULPIEUP
+8E79 B7DC # HANGUL SYLLABLE RIEUL-YAE-RIEULSIOS
+8E7A B7DD # HANGUL SYLLABLE RIEUL-YAE-RIEULTHIEUTH
+8E81 B7DE # HANGUL SYLLABLE RIEUL-YAE-RIEULPHIEUPH
+8E82 B7DF # HANGUL SYLLABLE RIEUL-YAE-RIEULHIEUH
+8E83 B7E0 # HANGUL SYLLABLE RIEUL-YAE-MIEUM
+8E84 B7E1 # HANGUL SYLLABLE RIEUL-YAE-PIEUP
+8E85 B7E2 # HANGUL SYLLABLE RIEUL-YAE-PIEUPSIOS
+8E86 B7E3 # HANGUL SYLLABLE RIEUL-YAE-SIOS
+8E87 B7E4 # HANGUL SYLLABLE RIEUL-YAE-SSANGSIOS
+8E88 B7E5 # HANGUL SYLLABLE RIEUL-YAE-IEUNG
+8E89 B7E6 # HANGUL SYLLABLE RIEUL-YAE-CIEUC
+8E8A B7E7 # HANGUL SYLLABLE RIEUL-YAE-CHIEUCH
+8E8B B7E8 # HANGUL SYLLABLE RIEUL-YAE-KHIEUKH
+8E8C B7E9 # HANGUL SYLLABLE RIEUL-YAE-THIEUTH
+8E8D B7EA # HANGUL SYLLABLE RIEUL-YAE-PHIEUPH
+8E8E B7EB # HANGUL SYLLABLE RIEUL-YAE-HIEUH
+8E8F B7EE # HANGUL SYLLABLE RIEUL-EO-SSANGKIYEOK
+8E90 B7EF # HANGUL SYLLABLE RIEUL-EO-KIYEOKSIOS
+8E91 B7F1 # HANGUL SYLLABLE RIEUL-EO-NIEUNCIEUC
+8E92 B7F2 # HANGUL SYLLABLE RIEUL-EO-NIEUNHIEUH
+8E93 B7F3 # HANGUL SYLLABLE RIEUL-EO-TIKEUT
+8E94 B7F5 # HANGUL SYLLABLE RIEUL-EO-RIEULKIYEOK
+8E95 B7F6 # HANGUL SYLLABLE RIEUL-EO-RIEULMIEUM
+8E96 B7F7 # HANGUL SYLLABLE RIEUL-EO-RIEULPIEUP
+8E97 B7F8 # HANGUL SYLLABLE RIEUL-EO-RIEULSIOS
+8E98 B7F9 # HANGUL SYLLABLE RIEUL-EO-RIEULTHIEUTH
+8E99 B7FA # HANGUL SYLLABLE RIEUL-EO-RIEULPHIEUPH
+8E9A B7FB # HANGUL SYLLABLE RIEUL-EO-RIEULHIEUH
+8E9B B7FE # HANGUL SYLLABLE RIEUL-EO-PIEUPSIOS
+8E9C B802 # HANGUL SYLLABLE RIEUL-EO-CIEUC
+8E9D B803 # HANGUL SYLLABLE RIEUL-EO-CHIEUCH
+8E9E B804 # HANGUL SYLLABLE RIEUL-EO-KHIEUKH
+8E9F B805 # HANGUL SYLLABLE RIEUL-EO-THIEUTH
+8EA0 B806 # HANGUL SYLLABLE RIEUL-EO-PHIEUPH
+8EA1 B80A # HANGUL SYLLABLE RIEUL-E-SSANGKIYEOK
+8EA2 B80B # HANGUL SYLLABLE RIEUL-E-KIYEOKSIOS
+8EA3 B80D # HANGUL SYLLABLE RIEUL-E-NIEUNCIEUC
+8EA4 B80E # HANGUL SYLLABLE RIEUL-E-NIEUNHIEUH
+8EA5 B80F # HANGUL SYLLABLE RIEUL-E-TIKEUT
+8EA6 B811 # HANGUL SYLLABLE RIEUL-E-RIEULKIYEOK
+8EA7 B812 # HANGUL SYLLABLE RIEUL-E-RIEULMIEUM
+8EA8 B813 # HANGUL SYLLABLE RIEUL-E-RIEULPIEUP
+8EA9 B814 # HANGUL SYLLABLE RIEUL-E-RIEULSIOS
+8EAA B815 # HANGUL SYLLABLE RIEUL-E-RIEULTHIEUTH
+8EAB B816 # HANGUL SYLLABLE RIEUL-E-RIEULPHIEUPH
+8EAC B817 # HANGUL SYLLABLE RIEUL-E-RIEULHIEUH
+8EAD B81A # HANGUL SYLLABLE RIEUL-E-PIEUPSIOS
+8EAE B81C # HANGUL SYLLABLE RIEUL-E-SSANGSIOS
+8EAF B81E # HANGUL SYLLABLE RIEUL-E-CIEUC
+8EB0 B81F # HANGUL SYLLABLE RIEUL-E-CHIEUCH
+8EB1 B820 # HANGUL SYLLABLE RIEUL-E-KHIEUKH
+8EB2 B821 # HANGUL SYLLABLE RIEUL-E-THIEUTH
+8EB3 B822 # HANGUL SYLLABLE RIEUL-E-PHIEUPH
+8EB4 B823 # HANGUL SYLLABLE RIEUL-E-HIEUH
+8EB5 B826 # HANGUL SYLLABLE RIEUL-YEO-SSANGKIYEOK
+8EB6 B827 # HANGUL SYLLABLE RIEUL-YEO-KIYEOKSIOS
+8EB7 B829 # HANGUL SYLLABLE RIEUL-YEO-NIEUNCIEUC
+8EB8 B82A # HANGUL SYLLABLE RIEUL-YEO-NIEUNHIEUH
+8EB9 B82B # HANGUL SYLLABLE RIEUL-YEO-TIKEUT
+8EBA B82D # HANGUL SYLLABLE RIEUL-YEO-RIEULKIYEOK
+8EBB B82E # HANGUL SYLLABLE RIEUL-YEO-RIEULMIEUM
+8EBC B82F # HANGUL SYLLABLE RIEUL-YEO-RIEULPIEUP
+8EBD B830 # HANGUL SYLLABLE RIEUL-YEO-RIEULSIOS
+8EBE B831 # HANGUL SYLLABLE RIEUL-YEO-RIEULTHIEUTH
+8EBF B832 # HANGUL SYLLABLE RIEUL-YEO-RIEULPHIEUPH
+8EC0 B833 # HANGUL SYLLABLE RIEUL-YEO-RIEULHIEUH
+8EC1 B836 # HANGUL SYLLABLE RIEUL-YEO-PIEUPSIOS
+8EC2 B83A # HANGUL SYLLABLE RIEUL-YEO-CIEUC
+8EC3 B83B # HANGUL SYLLABLE RIEUL-YEO-CHIEUCH
+8EC4 B83C # HANGUL SYLLABLE RIEUL-YEO-KHIEUKH
+8EC5 B83D # HANGUL SYLLABLE RIEUL-YEO-THIEUTH
+8EC6 B83E # HANGUL SYLLABLE RIEUL-YEO-PHIEUPH
+8EC7 B83F # HANGUL SYLLABLE RIEUL-YEO-HIEUH
+8EC8 B841 # HANGUL SYLLABLE RIEUL-YE-KIYEOK
+8EC9 B842 # HANGUL SYLLABLE RIEUL-YE-SSANGKIYEOK
+8ECA B843 # HANGUL SYLLABLE RIEUL-YE-KIYEOKSIOS
+8ECB B845 # HANGUL SYLLABLE RIEUL-YE-NIEUNCIEUC
+8ECC B846 # HANGUL SYLLABLE RIEUL-YE-NIEUNHIEUH
+8ECD B847 # HANGUL SYLLABLE RIEUL-YE-TIKEUT
+8ECE B848 # HANGUL SYLLABLE RIEUL-YE-RIEUL
+8ECF B849 # HANGUL SYLLABLE RIEUL-YE-RIEULKIYEOK
+8ED0 B84A # HANGUL SYLLABLE RIEUL-YE-RIEULMIEUM
+8ED1 B84B # HANGUL SYLLABLE RIEUL-YE-RIEULPIEUP
+8ED2 B84C # HANGUL SYLLABLE RIEUL-YE-RIEULSIOS
+8ED3 B84D # HANGUL SYLLABLE RIEUL-YE-RIEULTHIEUTH
+8ED4 B84E # HANGUL SYLLABLE RIEUL-YE-RIEULPHIEUPH
+8ED5 B84F # HANGUL SYLLABLE RIEUL-YE-RIEULHIEUH
+8ED6 B850 # HANGUL SYLLABLE RIEUL-YE-MIEUM
+8ED7 B852 # HANGUL SYLLABLE RIEUL-YE-PIEUPSIOS
+8ED8 B854 # HANGUL SYLLABLE RIEUL-YE-SSANGSIOS
+8ED9 B855 # HANGUL SYLLABLE RIEUL-YE-IEUNG
+8EDA B856 # HANGUL SYLLABLE RIEUL-YE-CIEUC
+8EDB B857 # HANGUL SYLLABLE RIEUL-YE-CHIEUCH
+8EDC B858 # HANGUL SYLLABLE RIEUL-YE-KHIEUKH
+8EDD B859 # HANGUL SYLLABLE RIEUL-YE-THIEUTH
+8EDE B85A # HANGUL SYLLABLE RIEUL-YE-PHIEUPH
+8EDF B85B # HANGUL SYLLABLE RIEUL-YE-HIEUH
+8EE0 B85E # HANGUL SYLLABLE RIEUL-O-SSANGKIYEOK
+8EE1 B85F # HANGUL SYLLABLE RIEUL-O-KIYEOKSIOS
+8EE2 B861 # HANGUL SYLLABLE RIEUL-O-NIEUNCIEUC
+8EE3 B862 # HANGUL SYLLABLE RIEUL-O-NIEUNHIEUH
+8EE4 B863 # HANGUL SYLLABLE RIEUL-O-TIKEUT
+8EE5 B865 # HANGUL SYLLABLE RIEUL-O-RIEULKIYEOK
+8EE6 B866 # HANGUL SYLLABLE RIEUL-O-RIEULMIEUM
+8EE7 B867 # HANGUL SYLLABLE RIEUL-O-RIEULPIEUP
+8EE8 B868 # HANGUL SYLLABLE RIEUL-O-RIEULSIOS
+8EE9 B869 # HANGUL SYLLABLE RIEUL-O-RIEULTHIEUTH
+8EEA B86A # HANGUL SYLLABLE RIEUL-O-RIEULPHIEUPH
+8EEB B86B # HANGUL SYLLABLE RIEUL-O-RIEULHIEUH
+8EEC B86E # HANGUL SYLLABLE RIEUL-O-PIEUPSIOS
+8EED B870 # HANGUL SYLLABLE RIEUL-O-SSANGSIOS
+8EEE B872 # HANGUL SYLLABLE RIEUL-O-CIEUC
+8EEF B873 # HANGUL SYLLABLE RIEUL-O-CHIEUCH
+8EF0 B874 # HANGUL SYLLABLE RIEUL-O-KHIEUKH
+8EF1 B875 # HANGUL SYLLABLE RIEUL-O-THIEUTH
+8EF2 B876 # HANGUL SYLLABLE RIEUL-O-PHIEUPH
+8EF3 B877 # HANGUL SYLLABLE RIEUL-O-HIEUH
+8EF4 B879 # HANGUL SYLLABLE RIEUL-WA-KIYEOK
+8EF5 B87A # HANGUL SYLLABLE RIEUL-WA-SSANGKIYEOK
+8EF6 B87B # HANGUL SYLLABLE RIEUL-WA-KIYEOKSIOS
+8EF7 B87D # HANGUL SYLLABLE RIEUL-WA-NIEUNCIEUC
+8EF8 B87E # HANGUL SYLLABLE RIEUL-WA-NIEUNHIEUH
+8EF9 B87F # HANGUL SYLLABLE RIEUL-WA-TIKEUT
+8EFA B880 # HANGUL SYLLABLE RIEUL-WA-RIEUL
+8EFB B881 # HANGUL SYLLABLE RIEUL-WA-RIEULKIYEOK
+8EFC B882 # HANGUL SYLLABLE RIEUL-WA-RIEULMIEUM
+8EFD B883 # HANGUL SYLLABLE RIEUL-WA-RIEULPIEUP
+8EFE B884 # HANGUL SYLLABLE RIEUL-WA-RIEULSIOS
+8F41 B885 # HANGUL SYLLABLE RIEUL-WA-RIEULTHIEUTH
+8F42 B886 # HANGUL SYLLABLE RIEUL-WA-RIEULPHIEUPH
+8F43 B887 # HANGUL SYLLABLE RIEUL-WA-RIEULHIEUH
+8F44 B888 # HANGUL SYLLABLE RIEUL-WA-MIEUM
+8F45 B889 # HANGUL SYLLABLE RIEUL-WA-PIEUP
+8F46 B88A # HANGUL SYLLABLE RIEUL-WA-PIEUPSIOS
+8F47 B88B # HANGUL SYLLABLE RIEUL-WA-SIOS
+8F48 B88C # HANGUL SYLLABLE RIEUL-WA-SSANGSIOS
+8F49 B88E # HANGUL SYLLABLE RIEUL-WA-CIEUC
+8F4A B88F # HANGUL SYLLABLE RIEUL-WA-CHIEUCH
+8F4B B890 # HANGUL SYLLABLE RIEUL-WA-KHIEUKH
+8F4C B891 # HANGUL SYLLABLE RIEUL-WA-THIEUTH
+8F4D B892 # HANGUL SYLLABLE RIEUL-WA-PHIEUPH
+8F4E B893 # HANGUL SYLLABLE RIEUL-WA-HIEUH
+8F4F B894 # HANGUL SYLLABLE RIEUL-WAE
+8F50 B895 # HANGUL SYLLABLE RIEUL-WAE-KIYEOK
+8F51 B896 # HANGUL SYLLABLE RIEUL-WAE-SSANGKIYEOK
+8F52 B897 # HANGUL SYLLABLE RIEUL-WAE-KIYEOKSIOS
+8F53 B898 # HANGUL SYLLABLE RIEUL-WAE-NIEUN
+8F54 B899 # HANGUL SYLLABLE RIEUL-WAE-NIEUNCIEUC
+8F55 B89A # HANGUL SYLLABLE RIEUL-WAE-NIEUNHIEUH
+8F56 B89B # HANGUL SYLLABLE RIEUL-WAE-TIKEUT
+8F57 B89C # HANGUL SYLLABLE RIEUL-WAE-RIEUL
+8F58 B89D # HANGUL SYLLABLE RIEUL-WAE-RIEULKIYEOK
+8F59 B89E # HANGUL SYLLABLE RIEUL-WAE-RIEULMIEUM
+8F5A B89F # HANGUL SYLLABLE RIEUL-WAE-RIEULPIEUP
+8F61 B8A0 # HANGUL SYLLABLE RIEUL-WAE-RIEULSIOS
+8F62 B8A1 # HANGUL SYLLABLE RIEUL-WAE-RIEULTHIEUTH
+8F63 B8A2 # HANGUL SYLLABLE RIEUL-WAE-RIEULPHIEUPH
+8F64 B8A3 # HANGUL SYLLABLE RIEUL-WAE-RIEULHIEUH
+8F65 B8A4 # HANGUL SYLLABLE RIEUL-WAE-MIEUM
+8F66 B8A5 # HANGUL SYLLABLE RIEUL-WAE-PIEUP
+8F67 B8A6 # HANGUL SYLLABLE RIEUL-WAE-PIEUPSIOS
+8F68 B8A7 # HANGUL SYLLABLE RIEUL-WAE-SIOS
+8F69 B8A9 # HANGUL SYLLABLE RIEUL-WAE-IEUNG
+8F6A B8AA # HANGUL SYLLABLE RIEUL-WAE-CIEUC
+8F6B B8AB # HANGUL SYLLABLE RIEUL-WAE-CHIEUCH
+8F6C B8AC # HANGUL SYLLABLE RIEUL-WAE-KHIEUKH
+8F6D B8AD # HANGUL SYLLABLE RIEUL-WAE-THIEUTH
+8F6E B8AE # HANGUL SYLLABLE RIEUL-WAE-PHIEUPH
+8F6F B8AF # HANGUL SYLLABLE RIEUL-WAE-HIEUH
+8F70 B8B1 # HANGUL SYLLABLE RIEUL-OE-KIYEOK
+8F71 B8B2 # HANGUL SYLLABLE RIEUL-OE-SSANGKIYEOK
+8F72 B8B3 # HANGUL SYLLABLE RIEUL-OE-KIYEOKSIOS
+8F73 B8B5 # HANGUL SYLLABLE RIEUL-OE-NIEUNCIEUC
+8F74 B8B6 # HANGUL SYLLABLE RIEUL-OE-NIEUNHIEUH
+8F75 B8B7 # HANGUL SYLLABLE RIEUL-OE-TIKEUT
+8F76 B8B9 # HANGUL SYLLABLE RIEUL-OE-RIEULKIYEOK
+8F77 B8BA # HANGUL SYLLABLE RIEUL-OE-RIEULMIEUM
+8F78 B8BB # HANGUL SYLLABLE RIEUL-OE-RIEULPIEUP
+8F79 B8BC # HANGUL SYLLABLE RIEUL-OE-RIEULSIOS
+8F7A B8BD # HANGUL SYLLABLE RIEUL-OE-RIEULTHIEUTH
+8F81 B8BE # HANGUL SYLLABLE RIEUL-OE-RIEULPHIEUPH
+8F82 B8BF # HANGUL SYLLABLE RIEUL-OE-RIEULHIEUH
+8F83 B8C2 # HANGUL SYLLABLE RIEUL-OE-PIEUPSIOS
+8F84 B8C4 # HANGUL SYLLABLE RIEUL-OE-SSANGSIOS
+8F85 B8C6 # HANGUL SYLLABLE RIEUL-OE-CIEUC
+8F86 B8C7 # HANGUL SYLLABLE RIEUL-OE-CHIEUCH
+8F87 B8C8 # HANGUL SYLLABLE RIEUL-OE-KHIEUKH
+8F88 B8C9 # HANGUL SYLLABLE RIEUL-OE-THIEUTH
+8F89 B8CA # HANGUL SYLLABLE RIEUL-OE-PHIEUPH
+8F8A B8CB # HANGUL SYLLABLE RIEUL-OE-HIEUH
+8F8B B8CD # HANGUL SYLLABLE RIEUL-YO-KIYEOK
+8F8C B8CE # HANGUL SYLLABLE RIEUL-YO-SSANGKIYEOK
+8F8D B8CF # HANGUL SYLLABLE RIEUL-YO-KIYEOKSIOS
+8F8E B8D1 # HANGUL SYLLABLE RIEUL-YO-NIEUNCIEUC
+8F8F B8D2 # HANGUL SYLLABLE RIEUL-YO-NIEUNHIEUH
+8F90 B8D3 # HANGUL SYLLABLE RIEUL-YO-TIKEUT
+8F91 B8D5 # HANGUL SYLLABLE RIEUL-YO-RIEULKIYEOK
+8F92 B8D6 # HANGUL SYLLABLE RIEUL-YO-RIEULMIEUM
+8F93 B8D7 # HANGUL SYLLABLE RIEUL-YO-RIEULPIEUP
+8F94 B8D8 # HANGUL SYLLABLE RIEUL-YO-RIEULSIOS
+8F95 B8D9 # HANGUL SYLLABLE RIEUL-YO-RIEULTHIEUTH
+8F96 B8DA # HANGUL SYLLABLE RIEUL-YO-RIEULPHIEUPH
+8F97 B8DB # HANGUL SYLLABLE RIEUL-YO-RIEULHIEUH
+8F98 B8DC # HANGUL SYLLABLE RIEUL-YO-MIEUM
+8F99 B8DE # HANGUL SYLLABLE RIEUL-YO-PIEUPSIOS
+8F9A B8E0 # HANGUL SYLLABLE RIEUL-YO-SSANGSIOS
+8F9B B8E2 # HANGUL SYLLABLE RIEUL-YO-CIEUC
+8F9C B8E3 # HANGUL SYLLABLE RIEUL-YO-CHIEUCH
+8F9D B8E4 # HANGUL SYLLABLE RIEUL-YO-KHIEUKH
+8F9E B8E5 # HANGUL SYLLABLE RIEUL-YO-THIEUTH
+8F9F B8E6 # HANGUL SYLLABLE RIEUL-YO-PHIEUPH
+8FA0 B8E7 # HANGUL SYLLABLE RIEUL-YO-HIEUH
+8FA1 B8EA # HANGUL SYLLABLE RIEUL-U-SSANGKIYEOK
+8FA2 B8EB # HANGUL SYLLABLE RIEUL-U-KIYEOKSIOS
+8FA3 B8ED # HANGUL SYLLABLE RIEUL-U-NIEUNCIEUC
+8FA4 B8EE # HANGUL SYLLABLE RIEUL-U-NIEUNHIEUH
+8FA5 B8EF # HANGUL SYLLABLE RIEUL-U-TIKEUT
+8FA6 B8F1 # HANGUL SYLLABLE RIEUL-U-RIEULKIYEOK
+8FA7 B8F2 # HANGUL SYLLABLE RIEUL-U-RIEULMIEUM
+8FA8 B8F3 # HANGUL SYLLABLE RIEUL-U-RIEULPIEUP
+8FA9 B8F4 # HANGUL SYLLABLE RIEUL-U-RIEULSIOS
+8FAA B8F5 # HANGUL SYLLABLE RIEUL-U-RIEULTHIEUTH
+8FAB B8F6 # HANGUL SYLLABLE RIEUL-U-RIEULPHIEUPH
+8FAC B8F7 # HANGUL SYLLABLE RIEUL-U-RIEULHIEUH
+8FAD B8FA # HANGUL SYLLABLE RIEUL-U-PIEUPSIOS
+8FAE B8FC # HANGUL SYLLABLE RIEUL-U-SSANGSIOS
+8FAF B8FE # HANGUL SYLLABLE RIEUL-U-CIEUC
+8FB0 B8FF # HANGUL SYLLABLE RIEUL-U-CHIEUCH
+8FB1 B900 # HANGUL SYLLABLE RIEUL-U-KHIEUKH
+8FB2 B901 # HANGUL SYLLABLE RIEUL-U-THIEUTH
+8FB3 B902 # HANGUL SYLLABLE RIEUL-U-PHIEUPH
+8FB4 B903 # HANGUL SYLLABLE RIEUL-U-HIEUH
+8FB5 B905 # HANGUL SYLLABLE RIEUL-WEO-KIYEOK
+8FB6 B906 # HANGUL SYLLABLE RIEUL-WEO-SSANGKIYEOK
+8FB7 B907 # HANGUL SYLLABLE RIEUL-WEO-KIYEOKSIOS
+8FB8 B908 # HANGUL SYLLABLE RIEUL-WEO-NIEUN
+8FB9 B909 # HANGUL SYLLABLE RIEUL-WEO-NIEUNCIEUC
+8FBA B90A # HANGUL SYLLABLE RIEUL-WEO-NIEUNHIEUH
+8FBB B90B # HANGUL SYLLABLE RIEUL-WEO-TIKEUT
+8FBC B90C # HANGUL SYLLABLE RIEUL-WEO-RIEUL
+8FBD B90D # HANGUL SYLLABLE RIEUL-WEO-RIEULKIYEOK
+8FBE B90E # HANGUL SYLLABLE RIEUL-WEO-RIEULMIEUM
+8FBF B90F # HANGUL SYLLABLE RIEUL-WEO-RIEULPIEUP
+8FC0 B910 # HANGUL SYLLABLE RIEUL-WEO-RIEULSIOS
+8FC1 B911 # HANGUL SYLLABLE RIEUL-WEO-RIEULTHIEUTH
+8FC2 B912 # HANGUL SYLLABLE RIEUL-WEO-RIEULPHIEUPH
+8FC3 B913 # HANGUL SYLLABLE RIEUL-WEO-RIEULHIEUH
+8FC4 B914 # HANGUL SYLLABLE RIEUL-WEO-MIEUM
+8FC5 B915 # HANGUL SYLLABLE RIEUL-WEO-PIEUP
+8FC6 B916 # HANGUL SYLLABLE RIEUL-WEO-PIEUPSIOS
+8FC7 B917 # HANGUL SYLLABLE RIEUL-WEO-SIOS
+8FC8 B919 # HANGUL SYLLABLE RIEUL-WEO-IEUNG
+8FC9 B91A # HANGUL SYLLABLE RIEUL-WEO-CIEUC
+8FCA B91B # HANGUL SYLLABLE RIEUL-WEO-CHIEUCH
+8FCB B91C # HANGUL SYLLABLE RIEUL-WEO-KHIEUKH
+8FCC B91D # HANGUL SYLLABLE RIEUL-WEO-THIEUTH
+8FCD B91E # HANGUL SYLLABLE RIEUL-WEO-PHIEUPH
+8FCE B91F # HANGUL SYLLABLE RIEUL-WEO-HIEUH
+8FCF B921 # HANGUL SYLLABLE RIEUL-WE-KIYEOK
+8FD0 B922 # HANGUL SYLLABLE RIEUL-WE-SSANGKIYEOK
+8FD1 B923 # HANGUL SYLLABLE RIEUL-WE-KIYEOKSIOS
+8FD2 B924 # HANGUL SYLLABLE RIEUL-WE-NIEUN
+8FD3 B925 # HANGUL SYLLABLE RIEUL-WE-NIEUNCIEUC
+8FD4 B926 # HANGUL SYLLABLE RIEUL-WE-NIEUNHIEUH
+8FD5 B927 # HANGUL SYLLABLE RIEUL-WE-TIKEUT
+8FD6 B928 # HANGUL SYLLABLE RIEUL-WE-RIEUL
+8FD7 B929 # HANGUL SYLLABLE RIEUL-WE-RIEULKIYEOK
+8FD8 B92A # HANGUL SYLLABLE RIEUL-WE-RIEULMIEUM
+8FD9 B92B # HANGUL SYLLABLE RIEUL-WE-RIEULPIEUP
+8FDA B92C # HANGUL SYLLABLE RIEUL-WE-RIEULSIOS
+8FDB B92D # HANGUL SYLLABLE RIEUL-WE-RIEULTHIEUTH
+8FDC B92E # HANGUL SYLLABLE RIEUL-WE-RIEULPHIEUPH
+8FDD B92F # HANGUL SYLLABLE RIEUL-WE-RIEULHIEUH
+8FDE B930 # HANGUL SYLLABLE RIEUL-WE-MIEUM
+8FDF B931 # HANGUL SYLLABLE RIEUL-WE-PIEUP
+8FE0 B932 # HANGUL SYLLABLE RIEUL-WE-PIEUPSIOS
+8FE1 B933 # HANGUL SYLLABLE RIEUL-WE-SIOS
+8FE2 B934 # HANGUL SYLLABLE RIEUL-WE-SSANGSIOS
+8FE3 B935 # HANGUL SYLLABLE RIEUL-WE-IEUNG
+8FE4 B936 # HANGUL SYLLABLE RIEUL-WE-CIEUC
+8FE5 B937 # HANGUL SYLLABLE RIEUL-WE-CHIEUCH
+8FE6 B938 # HANGUL SYLLABLE RIEUL-WE-KHIEUKH
+8FE7 B939 # HANGUL SYLLABLE RIEUL-WE-THIEUTH
+8FE8 B93A # HANGUL SYLLABLE RIEUL-WE-PHIEUPH
+8FE9 B93B # HANGUL SYLLABLE RIEUL-WE-HIEUH
+8FEA B93E # HANGUL SYLLABLE RIEUL-WI-SSANGKIYEOK
+8FEB B93F # HANGUL SYLLABLE RIEUL-WI-KIYEOKSIOS
+8FEC B941 # HANGUL SYLLABLE RIEUL-WI-NIEUNCIEUC
+8FED B942 # HANGUL SYLLABLE RIEUL-WI-NIEUNHIEUH
+8FEE B943 # HANGUL SYLLABLE RIEUL-WI-TIKEUT
+8FEF B945 # HANGUL SYLLABLE RIEUL-WI-RIEULKIYEOK
+8FF0 B946 # HANGUL SYLLABLE RIEUL-WI-RIEULMIEUM
+8FF1 B947 # HANGUL SYLLABLE RIEUL-WI-RIEULPIEUP
+8FF2 B948 # HANGUL SYLLABLE RIEUL-WI-RIEULSIOS
+8FF3 B949 # HANGUL SYLLABLE RIEUL-WI-RIEULTHIEUTH
+8FF4 B94A # HANGUL SYLLABLE RIEUL-WI-RIEULPHIEUPH
+8FF5 B94B # HANGUL SYLLABLE RIEUL-WI-RIEULHIEUH
+8FF6 B94D # HANGUL SYLLABLE RIEUL-WI-PIEUP
+8FF7 B94E # HANGUL SYLLABLE RIEUL-WI-PIEUPSIOS
+8FF8 B950 # HANGUL SYLLABLE RIEUL-WI-SSANGSIOS
+8FF9 B952 # HANGUL SYLLABLE RIEUL-WI-CIEUC
+8FFA B953 # HANGUL SYLLABLE RIEUL-WI-CHIEUCH
+8FFB B954 # HANGUL SYLLABLE RIEUL-WI-KHIEUKH
+8FFC B955 # HANGUL SYLLABLE RIEUL-WI-THIEUTH
+8FFD B956 # HANGUL SYLLABLE RIEUL-WI-PHIEUPH
+8FFE B957 # HANGUL SYLLABLE RIEUL-WI-HIEUH
+9041 B95A # HANGUL SYLLABLE RIEUL-YU-SSANGKIYEOK
+9042 B95B # HANGUL SYLLABLE RIEUL-YU-KIYEOKSIOS
+9043 B95D # HANGUL SYLLABLE RIEUL-YU-NIEUNCIEUC
+9044 B95E # HANGUL SYLLABLE RIEUL-YU-NIEUNHIEUH
+9045 B95F # HANGUL SYLLABLE RIEUL-YU-TIKEUT
+9046 B961 # HANGUL SYLLABLE RIEUL-YU-RIEULKIYEOK
+9047 B962 # HANGUL SYLLABLE RIEUL-YU-RIEULMIEUM
+9048 B963 # HANGUL SYLLABLE RIEUL-YU-RIEULPIEUP
+9049 B964 # HANGUL SYLLABLE RIEUL-YU-RIEULSIOS
+904A B965 # HANGUL SYLLABLE RIEUL-YU-RIEULTHIEUTH
+904B B966 # HANGUL SYLLABLE RIEUL-YU-RIEULPHIEUPH
+904C B967 # HANGUL SYLLABLE RIEUL-YU-RIEULHIEUH
+904D B96A # HANGUL SYLLABLE RIEUL-YU-PIEUPSIOS
+904E B96C # HANGUL SYLLABLE RIEUL-YU-SSANGSIOS
+904F B96E # HANGUL SYLLABLE RIEUL-YU-CIEUC
+9050 B96F # HANGUL SYLLABLE RIEUL-YU-CHIEUCH
+9051 B970 # HANGUL SYLLABLE RIEUL-YU-KHIEUKH
+9052 B971 # HANGUL SYLLABLE RIEUL-YU-THIEUTH
+9053 B972 # HANGUL SYLLABLE RIEUL-YU-PHIEUPH
+9054 B973 # HANGUL SYLLABLE RIEUL-YU-HIEUH
+9055 B976 # HANGUL SYLLABLE RIEUL-EU-SSANGKIYEOK
+9056 B977 # HANGUL SYLLABLE RIEUL-EU-KIYEOKSIOS
+9057 B979 # HANGUL SYLLABLE RIEUL-EU-NIEUNCIEUC
+9058 B97A # HANGUL SYLLABLE RIEUL-EU-NIEUNHIEUH
+9059 B97B # HANGUL SYLLABLE RIEUL-EU-TIKEUT
+905A B97D # HANGUL SYLLABLE RIEUL-EU-RIEULKIYEOK
+9061 B97E # HANGUL SYLLABLE RIEUL-EU-RIEULMIEUM
+9062 B97F # HANGUL SYLLABLE RIEUL-EU-RIEULPIEUP
+9063 B980 # HANGUL SYLLABLE RIEUL-EU-RIEULSIOS
+9064 B981 # HANGUL SYLLABLE RIEUL-EU-RIEULTHIEUTH
+9065 B982 # HANGUL SYLLABLE RIEUL-EU-RIEULPHIEUPH
+9066 B983 # HANGUL SYLLABLE RIEUL-EU-RIEULHIEUH
+9067 B986 # HANGUL SYLLABLE RIEUL-EU-PIEUPSIOS
+9068 B988 # HANGUL SYLLABLE RIEUL-EU-SSANGSIOS
+9069 B98B # HANGUL SYLLABLE RIEUL-EU-CHIEUCH
+906A B98C # HANGUL SYLLABLE RIEUL-EU-KHIEUKH
+906B B98F # HANGUL SYLLABLE RIEUL-EU-HIEUH
+906C B990 # HANGUL SYLLABLE RIEUL-YI
+906D B991 # HANGUL SYLLABLE RIEUL-YI-KIYEOK
+906E B992 # HANGUL SYLLABLE RIEUL-YI-SSANGKIYEOK
+906F B993 # HANGUL SYLLABLE RIEUL-YI-KIYEOKSIOS
+9070 B994 # HANGUL SYLLABLE RIEUL-YI-NIEUN
+9071 B995 # HANGUL SYLLABLE RIEUL-YI-NIEUNCIEUC
+9072 B996 # HANGUL SYLLABLE RIEUL-YI-NIEUNHIEUH
+9073 B997 # HANGUL SYLLABLE RIEUL-YI-TIKEUT
+9074 B998 # HANGUL SYLLABLE RIEUL-YI-RIEUL
+9075 B999 # HANGUL SYLLABLE RIEUL-YI-RIEULKIYEOK
+9076 B99A # HANGUL SYLLABLE RIEUL-YI-RIEULMIEUM
+9077 B99B # HANGUL SYLLABLE RIEUL-YI-RIEULPIEUP
+9078 B99C # HANGUL SYLLABLE RIEUL-YI-RIEULSIOS
+9079 B99D # HANGUL SYLLABLE RIEUL-YI-RIEULTHIEUTH
+907A B99E # HANGUL SYLLABLE RIEUL-YI-RIEULPHIEUPH
+9081 B99F # HANGUL SYLLABLE RIEUL-YI-RIEULHIEUH
+9082 B9A0 # HANGUL SYLLABLE RIEUL-YI-MIEUM
+9083 B9A1 # HANGUL SYLLABLE RIEUL-YI-PIEUP
+9084 B9A2 # HANGUL SYLLABLE RIEUL-YI-PIEUPSIOS
+9085 B9A3 # HANGUL SYLLABLE RIEUL-YI-SIOS
+9086 B9A4 # HANGUL SYLLABLE RIEUL-YI-SSANGSIOS
+9087 B9A5 # HANGUL SYLLABLE RIEUL-YI-IEUNG
+9088 B9A6 # HANGUL SYLLABLE RIEUL-YI-CIEUC
+9089 B9A7 # HANGUL SYLLABLE RIEUL-YI-CHIEUCH
+908A B9A8 # HANGUL SYLLABLE RIEUL-YI-KHIEUKH
+908B B9A9 # HANGUL SYLLABLE RIEUL-YI-THIEUTH
+908C B9AA # HANGUL SYLLABLE RIEUL-YI-PHIEUPH
+908D B9AB # HANGUL SYLLABLE RIEUL-YI-HIEUH
+908E B9AE # HANGUL SYLLABLE RIEUL-I-SSANGKIYEOK
+908F B9AF # HANGUL SYLLABLE RIEUL-I-KIYEOKSIOS
+9090 B9B1 # HANGUL SYLLABLE RIEUL-I-NIEUNCIEUC
+9091 B9B2 # HANGUL SYLLABLE RIEUL-I-NIEUNHIEUH
+9092 B9B3 # HANGUL SYLLABLE RIEUL-I-TIKEUT
+9093 B9B5 # HANGUL SYLLABLE RIEUL-I-RIEULKIYEOK
+9094 B9B6 # HANGUL SYLLABLE RIEUL-I-RIEULMIEUM
+9095 B9B7 # HANGUL SYLLABLE RIEUL-I-RIEULPIEUP
+9096 B9B8 # HANGUL SYLLABLE RIEUL-I-RIEULSIOS
+9097 B9B9 # HANGUL SYLLABLE RIEUL-I-RIEULTHIEUTH
+9098 B9BA # HANGUL SYLLABLE RIEUL-I-RIEULPHIEUPH
+9099 B9BB # HANGUL SYLLABLE RIEUL-I-RIEULHIEUH
+909A B9BE # HANGUL SYLLABLE RIEUL-I-PIEUPSIOS
+909B B9C0 # HANGUL SYLLABLE RIEUL-I-SSANGSIOS
+909C B9C2 # HANGUL SYLLABLE RIEUL-I-CIEUC
+909D B9C3 # HANGUL SYLLABLE RIEUL-I-CHIEUCH
+909E B9C4 # HANGUL SYLLABLE RIEUL-I-KHIEUKH
+909F B9C5 # HANGUL SYLLABLE RIEUL-I-THIEUTH
+90A0 B9C6 # HANGUL SYLLABLE RIEUL-I-PHIEUPH
+90A1 B9C7 # HANGUL SYLLABLE RIEUL-I-HIEUH
+90A2 B9CA # HANGUL SYLLABLE MIEUM-A-SSANGKIYEOK
+90A3 B9CB # HANGUL SYLLABLE MIEUM-A-KIYEOKSIOS
+90A4 B9CD # HANGUL SYLLABLE MIEUM-A-NIEUNCIEUC
+90A5 B9D3 # HANGUL SYLLABLE MIEUM-A-RIEULPIEUP
+90A6 B9D4 # HANGUL SYLLABLE MIEUM-A-RIEULSIOS
+90A7 B9D5 # HANGUL SYLLABLE MIEUM-A-RIEULTHIEUTH
+90A8 B9D6 # HANGUL SYLLABLE MIEUM-A-RIEULPHIEUPH
+90A9 B9D7 # HANGUL SYLLABLE MIEUM-A-RIEULHIEUH
+90AA B9DA # HANGUL SYLLABLE MIEUM-A-PIEUPSIOS
+90AB B9DC # HANGUL SYLLABLE MIEUM-A-SSANGSIOS
+90AC B9DF # HANGUL SYLLABLE MIEUM-A-CHIEUCH
+90AD B9E0 # HANGUL SYLLABLE MIEUM-A-KHIEUKH
+90AE B9E2 # HANGUL SYLLABLE MIEUM-A-PHIEUPH
+90AF B9E6 # HANGUL SYLLABLE MIEUM-AE-SSANGKIYEOK
+90B0 B9E7 # HANGUL SYLLABLE MIEUM-AE-KIYEOKSIOS
+90B1 B9E9 # HANGUL SYLLABLE MIEUM-AE-NIEUNCIEUC
+90B2 B9EA # HANGUL SYLLABLE MIEUM-AE-NIEUNHIEUH
+90B3 B9EB # HANGUL SYLLABLE MIEUM-AE-TIKEUT
+90B4 B9ED # HANGUL SYLLABLE MIEUM-AE-RIEULKIYEOK
+90B5 B9EE # HANGUL SYLLABLE MIEUM-AE-RIEULMIEUM
+90B6 B9EF # HANGUL SYLLABLE MIEUM-AE-RIEULPIEUP
+90B7 B9F0 # HANGUL SYLLABLE MIEUM-AE-RIEULSIOS
+90B8 B9F1 # HANGUL SYLLABLE MIEUM-AE-RIEULTHIEUTH
+90B9 B9F2 # HANGUL SYLLABLE MIEUM-AE-RIEULPHIEUPH
+90BA B9F3 # HANGUL SYLLABLE MIEUM-AE-RIEULHIEUH
+90BB B9F6 # HANGUL SYLLABLE MIEUM-AE-PIEUPSIOS
+90BC B9FB # HANGUL SYLLABLE MIEUM-AE-CHIEUCH
+90BD B9FC # HANGUL SYLLABLE MIEUM-AE-KHIEUKH
+90BE B9FD # HANGUL SYLLABLE MIEUM-AE-THIEUTH
+90BF B9FE # HANGUL SYLLABLE MIEUM-AE-PHIEUPH
+90C0 B9FF # HANGUL SYLLABLE MIEUM-AE-HIEUH
+90C1 BA02 # HANGUL SYLLABLE MIEUM-YA-SSANGKIYEOK
+90C2 BA03 # HANGUL SYLLABLE MIEUM-YA-KIYEOKSIOS
+90C3 BA04 # HANGUL SYLLABLE MIEUM-YA-NIEUN
+90C4 BA05 # HANGUL SYLLABLE MIEUM-YA-NIEUNCIEUC
+90C5 BA06 # HANGUL SYLLABLE MIEUM-YA-NIEUNHIEUH
+90C6 BA07 # HANGUL SYLLABLE MIEUM-YA-TIKEUT
+90C7 BA09 # HANGUL SYLLABLE MIEUM-YA-RIEULKIYEOK
+90C8 BA0A # HANGUL SYLLABLE MIEUM-YA-RIEULMIEUM
+90C9 BA0B # HANGUL SYLLABLE MIEUM-YA-RIEULPIEUP
+90CA BA0C # HANGUL SYLLABLE MIEUM-YA-RIEULSIOS
+90CB BA0D # HANGUL SYLLABLE MIEUM-YA-RIEULTHIEUTH
+90CC BA0E # HANGUL SYLLABLE MIEUM-YA-RIEULPHIEUPH
+90CD BA0F # HANGUL SYLLABLE MIEUM-YA-RIEULHIEUH
+90CE BA10 # HANGUL SYLLABLE MIEUM-YA-MIEUM
+90CF BA11 # HANGUL SYLLABLE MIEUM-YA-PIEUP
+90D0 BA12 # HANGUL SYLLABLE MIEUM-YA-PIEUPSIOS
+90D1 BA13 # HANGUL SYLLABLE MIEUM-YA-SIOS
+90D2 BA14 # HANGUL SYLLABLE MIEUM-YA-SSANGSIOS
+90D3 BA16 # HANGUL SYLLABLE MIEUM-YA-CIEUC
+90D4 BA17 # HANGUL SYLLABLE MIEUM-YA-CHIEUCH
+90D5 BA18 # HANGUL SYLLABLE MIEUM-YA-KHIEUKH
+90D6 BA19 # HANGUL SYLLABLE MIEUM-YA-THIEUTH
+90D7 BA1A # HANGUL SYLLABLE MIEUM-YA-PHIEUPH
+90D8 BA1B # HANGUL SYLLABLE MIEUM-YA-HIEUH
+90D9 BA1C # HANGUL SYLLABLE MIEUM-YAE
+90DA BA1D # HANGUL SYLLABLE MIEUM-YAE-KIYEOK
+90DB BA1E # HANGUL SYLLABLE MIEUM-YAE-SSANGKIYEOK
+90DC BA1F # HANGUL SYLLABLE MIEUM-YAE-KIYEOKSIOS
+90DD BA20 # HANGUL SYLLABLE MIEUM-YAE-NIEUN
+90DE BA21 # HANGUL SYLLABLE MIEUM-YAE-NIEUNCIEUC
+90DF BA22 # HANGUL SYLLABLE MIEUM-YAE-NIEUNHIEUH
+90E0 BA23 # HANGUL SYLLABLE MIEUM-YAE-TIKEUT
+90E1 BA24 # HANGUL SYLLABLE MIEUM-YAE-RIEUL
+90E2 BA25 # HANGUL SYLLABLE MIEUM-YAE-RIEULKIYEOK
+90E3 BA26 # HANGUL SYLLABLE MIEUM-YAE-RIEULMIEUM
+90E4 BA27 # HANGUL SYLLABLE MIEUM-YAE-RIEULPIEUP
+90E5 BA28 # HANGUL SYLLABLE MIEUM-YAE-RIEULSIOS
+90E6 BA29 # HANGUL SYLLABLE MIEUM-YAE-RIEULTHIEUTH
+90E7 BA2A # HANGUL SYLLABLE MIEUM-YAE-RIEULPHIEUPH
+90E8 BA2B # HANGUL SYLLABLE MIEUM-YAE-RIEULHIEUH
+90E9 BA2C # HANGUL SYLLABLE MIEUM-YAE-MIEUM
+90EA BA2D # HANGUL SYLLABLE MIEUM-YAE-PIEUP
+90EB BA2E # HANGUL SYLLABLE MIEUM-YAE-PIEUPSIOS
+90EC BA2F # HANGUL SYLLABLE MIEUM-YAE-SIOS
+90ED BA30 # HANGUL SYLLABLE MIEUM-YAE-SSANGSIOS
+90EE BA31 # HANGUL SYLLABLE MIEUM-YAE-IEUNG
+90EF BA32 # HANGUL SYLLABLE MIEUM-YAE-CIEUC
+90F0 BA33 # HANGUL SYLLABLE MIEUM-YAE-CHIEUCH
+90F1 BA34 # HANGUL SYLLABLE MIEUM-YAE-KHIEUKH
+90F2 BA35 # HANGUL SYLLABLE MIEUM-YAE-THIEUTH
+90F3 BA36 # HANGUL SYLLABLE MIEUM-YAE-PHIEUPH
+90F4 BA37 # HANGUL SYLLABLE MIEUM-YAE-HIEUH
+90F5 BA3A # HANGUL SYLLABLE MIEUM-EO-SSANGKIYEOK
+90F6 BA3B # HANGUL SYLLABLE MIEUM-EO-KIYEOKSIOS
+90F7 BA3D # HANGUL SYLLABLE MIEUM-EO-NIEUNCIEUC
+90F8 BA3E # HANGUL SYLLABLE MIEUM-EO-NIEUNHIEUH
+90F9 BA3F # HANGUL SYLLABLE MIEUM-EO-TIKEUT
+90FA BA41 # HANGUL SYLLABLE MIEUM-EO-RIEULKIYEOK
+90FB BA43 # HANGUL SYLLABLE MIEUM-EO-RIEULPIEUP
+90FC BA44 # HANGUL SYLLABLE MIEUM-EO-RIEULSIOS
+90FD BA45 # HANGUL SYLLABLE MIEUM-EO-RIEULTHIEUTH
+90FE BA46 # HANGUL SYLLABLE MIEUM-EO-RIEULPHIEUPH
+9141 BA47 # HANGUL SYLLABLE MIEUM-EO-RIEULHIEUH
+9142 BA4A # HANGUL SYLLABLE MIEUM-EO-PIEUPSIOS
+9143 BA4C # HANGUL SYLLABLE MIEUM-EO-SSANGSIOS
+9144 BA4F # HANGUL SYLLABLE MIEUM-EO-CHIEUCH
+9145 BA50 # HANGUL SYLLABLE MIEUM-EO-KHIEUKH
+9146 BA51 # HANGUL SYLLABLE MIEUM-EO-THIEUTH
+9147 BA52 # HANGUL SYLLABLE MIEUM-EO-PHIEUPH
+9148 BA56 # HANGUL SYLLABLE MIEUM-E-SSANGKIYEOK
+9149 BA57 # HANGUL SYLLABLE MIEUM-E-KIYEOKSIOS
+914A BA59 # HANGUL SYLLABLE MIEUM-E-NIEUNCIEUC
+914B BA5A # HANGUL SYLLABLE MIEUM-E-NIEUNHIEUH
+914C BA5B # HANGUL SYLLABLE MIEUM-E-TIKEUT
+914D BA5D # HANGUL SYLLABLE MIEUM-E-RIEULKIYEOK
+914E BA5E # HANGUL SYLLABLE MIEUM-E-RIEULMIEUM
+914F BA5F # HANGUL SYLLABLE MIEUM-E-RIEULPIEUP
+9150 BA60 # HANGUL SYLLABLE MIEUM-E-RIEULSIOS
+9151 BA61 # HANGUL SYLLABLE MIEUM-E-RIEULTHIEUTH
+9152 BA62 # HANGUL SYLLABLE MIEUM-E-RIEULPHIEUPH
+9153 BA63 # HANGUL SYLLABLE MIEUM-E-RIEULHIEUH
+9154 BA66 # HANGUL SYLLABLE MIEUM-E-PIEUPSIOS
+9155 BA6A # HANGUL SYLLABLE MIEUM-E-CIEUC
+9156 BA6B # HANGUL SYLLABLE MIEUM-E-CHIEUCH
+9157 BA6C # HANGUL SYLLABLE MIEUM-E-KHIEUKH
+9158 BA6D # HANGUL SYLLABLE MIEUM-E-THIEUTH
+9159 BA6E # HANGUL SYLLABLE MIEUM-E-PHIEUPH
+915A BA6F # HANGUL SYLLABLE MIEUM-E-HIEUH
+9161 BA72 # HANGUL SYLLABLE MIEUM-YEO-SSANGKIYEOK
+9162 BA73 # HANGUL SYLLABLE MIEUM-YEO-KIYEOKSIOS
+9163 BA75 # HANGUL SYLLABLE MIEUM-YEO-NIEUNCIEUC
+9164 BA76 # HANGUL SYLLABLE MIEUM-YEO-NIEUNHIEUH
+9165 BA77 # HANGUL SYLLABLE MIEUM-YEO-TIKEUT
+9166 BA79 # HANGUL SYLLABLE MIEUM-YEO-RIEULKIYEOK
+9167 BA7A # HANGUL SYLLABLE MIEUM-YEO-RIEULMIEUM
+9168 BA7B # HANGUL SYLLABLE MIEUM-YEO-RIEULPIEUP
+9169 BA7C # HANGUL SYLLABLE MIEUM-YEO-RIEULSIOS
+916A BA7D # HANGUL SYLLABLE MIEUM-YEO-RIEULTHIEUTH
+916B BA7E # HANGUL SYLLABLE MIEUM-YEO-RIEULPHIEUPH
+916C BA7F # HANGUL SYLLABLE MIEUM-YEO-RIEULHIEUH
+916D BA80 # HANGUL SYLLABLE MIEUM-YEO-MIEUM
+916E BA81 # HANGUL SYLLABLE MIEUM-YEO-PIEUP
+916F BA82 # HANGUL SYLLABLE MIEUM-YEO-PIEUPSIOS
+9170 BA86 # HANGUL SYLLABLE MIEUM-YEO-CIEUC
+9171 BA88 # HANGUL SYLLABLE MIEUM-YEO-KHIEUKH
+9172 BA89 # HANGUL SYLLABLE MIEUM-YEO-THIEUTH
+9173 BA8A # HANGUL SYLLABLE MIEUM-YEO-PHIEUPH
+9174 BA8B # HANGUL SYLLABLE MIEUM-YEO-HIEUH
+9175 BA8D # HANGUL SYLLABLE MIEUM-YE-KIYEOK
+9176 BA8E # HANGUL SYLLABLE MIEUM-YE-SSANGKIYEOK
+9177 BA8F # HANGUL SYLLABLE MIEUM-YE-KIYEOKSIOS
+9178 BA90 # HANGUL SYLLABLE MIEUM-YE-NIEUN
+9179 BA91 # HANGUL SYLLABLE MIEUM-YE-NIEUNCIEUC
+917A BA92 # HANGUL SYLLABLE MIEUM-YE-NIEUNHIEUH
+9181 BA93 # HANGUL SYLLABLE MIEUM-YE-TIKEUT
+9182 BA94 # HANGUL SYLLABLE MIEUM-YE-RIEUL
+9183 BA95 # HANGUL SYLLABLE MIEUM-YE-RIEULKIYEOK
+9184 BA96 # HANGUL SYLLABLE MIEUM-YE-RIEULMIEUM
+9185 BA97 # HANGUL SYLLABLE MIEUM-YE-RIEULPIEUP
+9186 BA98 # HANGUL SYLLABLE MIEUM-YE-RIEULSIOS
+9187 BA99 # HANGUL SYLLABLE MIEUM-YE-RIEULTHIEUTH
+9188 BA9A # HANGUL SYLLABLE MIEUM-YE-RIEULPHIEUPH
+9189 BA9B # HANGUL SYLLABLE MIEUM-YE-RIEULHIEUH
+918A BA9C # HANGUL SYLLABLE MIEUM-YE-MIEUM
+918B BA9D # HANGUL SYLLABLE MIEUM-YE-PIEUP
+918C BA9E # HANGUL SYLLABLE MIEUM-YE-PIEUPSIOS
+918D BA9F # HANGUL SYLLABLE MIEUM-YE-SIOS
+918E BAA0 # HANGUL SYLLABLE MIEUM-YE-SSANGSIOS
+918F BAA1 # HANGUL SYLLABLE MIEUM-YE-IEUNG
+9190 BAA2 # HANGUL SYLLABLE MIEUM-YE-CIEUC
+9191 BAA3 # HANGUL SYLLABLE MIEUM-YE-CHIEUCH
+9192 BAA4 # HANGUL SYLLABLE MIEUM-YE-KHIEUKH
+9193 BAA5 # HANGUL SYLLABLE MIEUM-YE-THIEUTH
+9194 BAA6 # HANGUL SYLLABLE MIEUM-YE-PHIEUPH
+9195 BAA7 # HANGUL SYLLABLE MIEUM-YE-HIEUH
+9196 BAAA # HANGUL SYLLABLE MIEUM-O-SSANGKIYEOK
+9197 BAAD # HANGUL SYLLABLE MIEUM-O-NIEUNCIEUC
+9198 BAAE # HANGUL SYLLABLE MIEUM-O-NIEUNHIEUH
+9199 BAAF # HANGUL SYLLABLE MIEUM-O-TIKEUT
+919A BAB1 # HANGUL SYLLABLE MIEUM-O-RIEULKIYEOK
+919B BAB3 # HANGUL SYLLABLE MIEUM-O-RIEULPIEUP
+919C BAB4 # HANGUL SYLLABLE MIEUM-O-RIEULSIOS
+919D BAB5 # HANGUL SYLLABLE MIEUM-O-RIEULTHIEUTH
+919E BAB6 # HANGUL SYLLABLE MIEUM-O-RIEULPHIEUPH
+919F BAB7 # HANGUL SYLLABLE MIEUM-O-RIEULHIEUH
+91A0 BABA # HANGUL SYLLABLE MIEUM-O-PIEUPSIOS
+91A1 BABC # HANGUL SYLLABLE MIEUM-O-SSANGSIOS
+91A2 BABE # HANGUL SYLLABLE MIEUM-O-CIEUC
+91A3 BABF # HANGUL SYLLABLE MIEUM-O-CHIEUCH
+91A4 BAC0 # HANGUL SYLLABLE MIEUM-O-KHIEUKH
+91A5 BAC1 # HANGUL SYLLABLE MIEUM-O-THIEUTH
+91A6 BAC2 # HANGUL SYLLABLE MIEUM-O-PHIEUPH
+91A7 BAC3 # HANGUL SYLLABLE MIEUM-O-HIEUH
+91A8 BAC5 # HANGUL SYLLABLE MIEUM-WA-KIYEOK
+91A9 BAC6 # HANGUL SYLLABLE MIEUM-WA-SSANGKIYEOK
+91AA BAC7 # HANGUL SYLLABLE MIEUM-WA-KIYEOKSIOS
+91AB BAC9 # HANGUL SYLLABLE MIEUM-WA-NIEUNCIEUC
+91AC BACA # HANGUL SYLLABLE MIEUM-WA-NIEUNHIEUH
+91AD BACB # HANGUL SYLLABLE MIEUM-WA-TIKEUT
+91AE BACC # HANGUL SYLLABLE MIEUM-WA-RIEUL
+91AF BACD # HANGUL SYLLABLE MIEUM-WA-RIEULKIYEOK
+91B0 BACE # HANGUL SYLLABLE MIEUM-WA-RIEULMIEUM
+91B1 BACF # HANGUL SYLLABLE MIEUM-WA-RIEULPIEUP
+91B2 BAD0 # HANGUL SYLLABLE MIEUM-WA-RIEULSIOS
+91B3 BAD1 # HANGUL SYLLABLE MIEUM-WA-RIEULTHIEUTH
+91B4 BAD2 # HANGUL SYLLABLE MIEUM-WA-RIEULPHIEUPH
+91B5 BAD3 # HANGUL SYLLABLE MIEUM-WA-RIEULHIEUH
+91B6 BAD4 # HANGUL SYLLABLE MIEUM-WA-MIEUM
+91B7 BAD5 # HANGUL SYLLABLE MIEUM-WA-PIEUP
+91B8 BAD6 # HANGUL SYLLABLE MIEUM-WA-PIEUPSIOS
+91B9 BAD7 # HANGUL SYLLABLE MIEUM-WA-SIOS
+91BA BADA # HANGUL SYLLABLE MIEUM-WA-CIEUC
+91BB BADB # HANGUL SYLLABLE MIEUM-WA-CHIEUCH
+91BC BADC # HANGUL SYLLABLE MIEUM-WA-KHIEUKH
+91BD BADD # HANGUL SYLLABLE MIEUM-WA-THIEUTH
+91BE BADE # HANGUL SYLLABLE MIEUM-WA-PHIEUPH
+91BF BADF # HANGUL SYLLABLE MIEUM-WA-HIEUH
+91C0 BAE0 # HANGUL SYLLABLE MIEUM-WAE
+91C1 BAE1 # HANGUL SYLLABLE MIEUM-WAE-KIYEOK
+91C2 BAE2 # HANGUL SYLLABLE MIEUM-WAE-SSANGKIYEOK
+91C3 BAE3 # HANGUL SYLLABLE MIEUM-WAE-KIYEOKSIOS
+91C4 BAE4 # HANGUL SYLLABLE MIEUM-WAE-NIEUN
+91C5 BAE5 # HANGUL SYLLABLE MIEUM-WAE-NIEUNCIEUC
+91C6 BAE6 # HANGUL SYLLABLE MIEUM-WAE-NIEUNHIEUH
+91C7 BAE7 # HANGUL SYLLABLE MIEUM-WAE-TIKEUT
+91C8 BAE8 # HANGUL SYLLABLE MIEUM-WAE-RIEUL
+91C9 BAE9 # HANGUL SYLLABLE MIEUM-WAE-RIEULKIYEOK
+91CA BAEA # HANGUL SYLLABLE MIEUM-WAE-RIEULMIEUM
+91CB BAEB # HANGUL SYLLABLE MIEUM-WAE-RIEULPIEUP
+91CC BAEC # HANGUL SYLLABLE MIEUM-WAE-RIEULSIOS
+91CD BAED # HANGUL SYLLABLE MIEUM-WAE-RIEULTHIEUTH
+91CE BAEE # HANGUL SYLLABLE MIEUM-WAE-RIEULPHIEUPH
+91CF BAEF # HANGUL SYLLABLE MIEUM-WAE-RIEULHIEUH
+91D0 BAF0 # HANGUL SYLLABLE MIEUM-WAE-MIEUM
+91D1 BAF1 # HANGUL SYLLABLE MIEUM-WAE-PIEUP
+91D2 BAF2 # HANGUL SYLLABLE MIEUM-WAE-PIEUPSIOS
+91D3 BAF3 # HANGUL SYLLABLE MIEUM-WAE-SIOS
+91D4 BAF4 # HANGUL SYLLABLE MIEUM-WAE-SSANGSIOS
+91D5 BAF5 # HANGUL SYLLABLE MIEUM-WAE-IEUNG
+91D6 BAF6 # HANGUL SYLLABLE MIEUM-WAE-CIEUC
+91D7 BAF7 # HANGUL SYLLABLE MIEUM-WAE-CHIEUCH
+91D8 BAF8 # HANGUL SYLLABLE MIEUM-WAE-KHIEUKH
+91D9 BAF9 # HANGUL SYLLABLE MIEUM-WAE-THIEUTH
+91DA BAFA # HANGUL SYLLABLE MIEUM-WAE-PHIEUPH
+91DB BAFB # HANGUL SYLLABLE MIEUM-WAE-HIEUH
+91DC BAFD # HANGUL SYLLABLE MIEUM-OE-KIYEOK
+91DD BAFE # HANGUL SYLLABLE MIEUM-OE-SSANGKIYEOK
+91DE BAFF # HANGUL SYLLABLE MIEUM-OE-KIYEOKSIOS
+91DF BB01 # HANGUL SYLLABLE MIEUM-OE-NIEUNCIEUC
+91E0 BB02 # HANGUL SYLLABLE MIEUM-OE-NIEUNHIEUH
+91E1 BB03 # HANGUL SYLLABLE MIEUM-OE-TIKEUT
+91E2 BB05 # HANGUL SYLLABLE MIEUM-OE-RIEULKIYEOK
+91E3 BB06 # HANGUL SYLLABLE MIEUM-OE-RIEULMIEUM
+91E4 BB07 # HANGUL SYLLABLE MIEUM-OE-RIEULPIEUP
+91E5 BB08 # HANGUL SYLLABLE MIEUM-OE-RIEULSIOS
+91E6 BB09 # HANGUL SYLLABLE MIEUM-OE-RIEULTHIEUTH
+91E7 BB0A # HANGUL SYLLABLE MIEUM-OE-RIEULPHIEUPH
+91E8 BB0B # HANGUL SYLLABLE MIEUM-OE-RIEULHIEUH
+91E9 BB0C # HANGUL SYLLABLE MIEUM-OE-MIEUM
+91EA BB0E # HANGUL SYLLABLE MIEUM-OE-PIEUPSIOS
+91EB BB10 # HANGUL SYLLABLE MIEUM-OE-SSANGSIOS
+91EC BB12 # HANGUL SYLLABLE MIEUM-OE-CIEUC
+91ED BB13 # HANGUL SYLLABLE MIEUM-OE-CHIEUCH
+91EE BB14 # HANGUL SYLLABLE MIEUM-OE-KHIEUKH
+91EF BB15 # HANGUL SYLLABLE MIEUM-OE-THIEUTH
+91F0 BB16 # HANGUL SYLLABLE MIEUM-OE-PHIEUPH
+91F1 BB17 # HANGUL SYLLABLE MIEUM-OE-HIEUH
+91F2 BB19 # HANGUL SYLLABLE MIEUM-YO-KIYEOK
+91F3 BB1A # HANGUL SYLLABLE MIEUM-YO-SSANGKIYEOK
+91F4 BB1B # HANGUL SYLLABLE MIEUM-YO-KIYEOKSIOS
+91F5 BB1D # HANGUL SYLLABLE MIEUM-YO-NIEUNCIEUC
+91F6 BB1E # HANGUL SYLLABLE MIEUM-YO-NIEUNHIEUH
+91F7 BB1F # HANGUL SYLLABLE MIEUM-YO-TIKEUT
+91F8 BB21 # HANGUL SYLLABLE MIEUM-YO-RIEULKIYEOK
+91F9 BB22 # HANGUL SYLLABLE MIEUM-YO-RIEULMIEUM
+91FA BB23 # HANGUL SYLLABLE MIEUM-YO-RIEULPIEUP
+91FB BB24 # HANGUL SYLLABLE MIEUM-YO-RIEULSIOS
+91FC BB25 # HANGUL SYLLABLE MIEUM-YO-RIEULTHIEUTH
+91FD BB26 # HANGUL SYLLABLE MIEUM-YO-RIEULPHIEUPH
+91FE BB27 # HANGUL SYLLABLE MIEUM-YO-RIEULHIEUH
+9241 BB28 # HANGUL SYLLABLE MIEUM-YO-MIEUM
+9242 BB2A # HANGUL SYLLABLE MIEUM-YO-PIEUPSIOS
+9243 BB2C # HANGUL SYLLABLE MIEUM-YO-SSANGSIOS
+9244 BB2D # HANGUL SYLLABLE MIEUM-YO-IEUNG
+9245 BB2E # HANGUL SYLLABLE MIEUM-YO-CIEUC
+9246 BB2F # HANGUL SYLLABLE MIEUM-YO-CHIEUCH
+9247 BB30 # HANGUL SYLLABLE MIEUM-YO-KHIEUKH
+9248 BB31 # HANGUL SYLLABLE MIEUM-YO-THIEUTH
+9249 BB32 # HANGUL SYLLABLE MIEUM-YO-PHIEUPH
+924A BB33 # HANGUL SYLLABLE MIEUM-YO-HIEUH
+924B BB37 # HANGUL SYLLABLE MIEUM-U-KIYEOKSIOS
+924C BB39 # HANGUL SYLLABLE MIEUM-U-NIEUNCIEUC
+924D BB3A # HANGUL SYLLABLE MIEUM-U-NIEUNHIEUH
+924E BB3F # HANGUL SYLLABLE MIEUM-U-RIEULPIEUP
+924F BB40 # HANGUL SYLLABLE MIEUM-U-RIEULSIOS
+9250 BB41 # HANGUL SYLLABLE MIEUM-U-RIEULTHIEUTH
+9251 BB42 # HANGUL SYLLABLE MIEUM-U-RIEULPHIEUPH
+9252 BB43 # HANGUL SYLLABLE MIEUM-U-RIEULHIEUH
+9253 BB46 # HANGUL SYLLABLE MIEUM-U-PIEUPSIOS
+9254 BB48 # HANGUL SYLLABLE MIEUM-U-SSANGSIOS
+9255 BB4A # HANGUL SYLLABLE MIEUM-U-CIEUC
+9256 BB4B # HANGUL SYLLABLE MIEUM-U-CHIEUCH
+9257 BB4C # HANGUL SYLLABLE MIEUM-U-KHIEUKH
+9258 BB4E # HANGUL SYLLABLE MIEUM-U-PHIEUPH
+9259 BB51 # HANGUL SYLLABLE MIEUM-WEO-KIYEOK
+925A BB52 # HANGUL SYLLABLE MIEUM-WEO-SSANGKIYEOK
+9261 BB53 # HANGUL SYLLABLE MIEUM-WEO-KIYEOKSIOS
+9262 BB55 # HANGUL SYLLABLE MIEUM-WEO-NIEUNCIEUC
+9263 BB56 # HANGUL SYLLABLE MIEUM-WEO-NIEUNHIEUH
+9264 BB57 # HANGUL SYLLABLE MIEUM-WEO-TIKEUT
+9265 BB59 # HANGUL SYLLABLE MIEUM-WEO-RIEULKIYEOK
+9266 BB5A # HANGUL SYLLABLE MIEUM-WEO-RIEULMIEUM
+9267 BB5B # HANGUL SYLLABLE MIEUM-WEO-RIEULPIEUP
+9268 BB5C # HANGUL SYLLABLE MIEUM-WEO-RIEULSIOS
+9269 BB5D # HANGUL SYLLABLE MIEUM-WEO-RIEULTHIEUTH
+926A BB5E # HANGUL SYLLABLE MIEUM-WEO-RIEULPHIEUPH
+926B BB5F # HANGUL SYLLABLE MIEUM-WEO-RIEULHIEUH
+926C BB60 # HANGUL SYLLABLE MIEUM-WEO-MIEUM
+926D BB62 # HANGUL SYLLABLE MIEUM-WEO-PIEUPSIOS
+926E BB64 # HANGUL SYLLABLE MIEUM-WEO-SSANGSIOS
+926F BB65 # HANGUL SYLLABLE MIEUM-WEO-IEUNG
+9270 BB66 # HANGUL SYLLABLE MIEUM-WEO-CIEUC
+9271 BB67 # HANGUL SYLLABLE MIEUM-WEO-CHIEUCH
+9272 BB68 # HANGUL SYLLABLE MIEUM-WEO-KHIEUKH
+9273 BB69 # HANGUL SYLLABLE MIEUM-WEO-THIEUTH
+9274 BB6A # HANGUL SYLLABLE MIEUM-WEO-PHIEUPH
+9275 BB6B # HANGUL SYLLABLE MIEUM-WEO-HIEUH
+9276 BB6D # HANGUL SYLLABLE MIEUM-WE-KIYEOK
+9277 BB6E # HANGUL SYLLABLE MIEUM-WE-SSANGKIYEOK
+9278 BB6F # HANGUL SYLLABLE MIEUM-WE-KIYEOKSIOS
+9279 BB70 # HANGUL SYLLABLE MIEUM-WE-NIEUN
+927A BB71 # HANGUL SYLLABLE MIEUM-WE-NIEUNCIEUC
+9281 BB72 # HANGUL SYLLABLE MIEUM-WE-NIEUNHIEUH
+9282 BB73 # HANGUL SYLLABLE MIEUM-WE-TIKEUT
+9283 BB74 # HANGUL SYLLABLE MIEUM-WE-RIEUL
+9284 BB75 # HANGUL SYLLABLE MIEUM-WE-RIEULKIYEOK
+9285 BB76 # HANGUL SYLLABLE MIEUM-WE-RIEULMIEUM
+9286 BB77 # HANGUL SYLLABLE MIEUM-WE-RIEULPIEUP
+9287 BB78 # HANGUL SYLLABLE MIEUM-WE-RIEULSIOS
+9288 BB79 # HANGUL SYLLABLE MIEUM-WE-RIEULTHIEUTH
+9289 BB7A # HANGUL SYLLABLE MIEUM-WE-RIEULPHIEUPH
+928A BB7B # HANGUL SYLLABLE MIEUM-WE-RIEULHIEUH
+928B BB7C # HANGUL SYLLABLE MIEUM-WE-MIEUM
+928C BB7D # HANGUL SYLLABLE MIEUM-WE-PIEUP
+928D BB7E # HANGUL SYLLABLE MIEUM-WE-PIEUPSIOS
+928E BB7F # HANGUL SYLLABLE MIEUM-WE-SIOS
+928F BB80 # HANGUL SYLLABLE MIEUM-WE-SSANGSIOS
+9290 BB81 # HANGUL SYLLABLE MIEUM-WE-IEUNG
+9291 BB82 # HANGUL SYLLABLE MIEUM-WE-CIEUC
+9292 BB83 # HANGUL SYLLABLE MIEUM-WE-CHIEUCH
+9293 BB84 # HANGUL SYLLABLE MIEUM-WE-KHIEUKH
+9294 BB85 # HANGUL SYLLABLE MIEUM-WE-THIEUTH
+9295 BB86 # HANGUL SYLLABLE MIEUM-WE-PHIEUPH
+9296 BB87 # HANGUL SYLLABLE MIEUM-WE-HIEUH
+9297 BB89 # HANGUL SYLLABLE MIEUM-WI-KIYEOK
+9298 BB8A # HANGUL SYLLABLE MIEUM-WI-SSANGKIYEOK
+9299 BB8B # HANGUL SYLLABLE MIEUM-WI-KIYEOKSIOS
+929A BB8D # HANGUL SYLLABLE MIEUM-WI-NIEUNCIEUC
+929B BB8E # HANGUL SYLLABLE MIEUM-WI-NIEUNHIEUH
+929C BB8F # HANGUL SYLLABLE MIEUM-WI-TIKEUT
+929D BB91 # HANGUL SYLLABLE MIEUM-WI-RIEULKIYEOK
+929E BB92 # HANGUL SYLLABLE MIEUM-WI-RIEULMIEUM
+929F BB93 # HANGUL SYLLABLE MIEUM-WI-RIEULPIEUP
+92A0 BB94 # HANGUL SYLLABLE MIEUM-WI-RIEULSIOS
+92A1 BB95 # HANGUL SYLLABLE MIEUM-WI-RIEULTHIEUTH
+92A2 BB96 # HANGUL SYLLABLE MIEUM-WI-RIEULPHIEUPH
+92A3 BB97 # HANGUL SYLLABLE MIEUM-WI-RIEULHIEUH
+92A4 BB98 # HANGUL SYLLABLE MIEUM-WI-MIEUM
+92A5 BB99 # HANGUL SYLLABLE MIEUM-WI-PIEUP
+92A6 BB9A # HANGUL SYLLABLE MIEUM-WI-PIEUPSIOS
+92A7 BB9B # HANGUL SYLLABLE MIEUM-WI-SIOS
+92A8 BB9C # HANGUL SYLLABLE MIEUM-WI-SSANGSIOS
+92A9 BB9D # HANGUL SYLLABLE MIEUM-WI-IEUNG
+92AA BB9E # HANGUL SYLLABLE MIEUM-WI-CIEUC
+92AB BB9F # HANGUL SYLLABLE MIEUM-WI-CHIEUCH
+92AC BBA0 # HANGUL SYLLABLE MIEUM-WI-KHIEUKH
+92AD BBA1 # HANGUL SYLLABLE MIEUM-WI-THIEUTH
+92AE BBA2 # HANGUL SYLLABLE MIEUM-WI-PHIEUPH
+92AF BBA3 # HANGUL SYLLABLE MIEUM-WI-HIEUH
+92B0 BBA5 # HANGUL SYLLABLE MIEUM-YU-KIYEOK
+92B1 BBA6 # HANGUL SYLLABLE MIEUM-YU-SSANGKIYEOK
+92B2 BBA7 # HANGUL SYLLABLE MIEUM-YU-KIYEOKSIOS
+92B3 BBA9 # HANGUL SYLLABLE MIEUM-YU-NIEUNCIEUC
+92B4 BBAA # HANGUL SYLLABLE MIEUM-YU-NIEUNHIEUH
+92B5 BBAB # HANGUL SYLLABLE MIEUM-YU-TIKEUT
+92B6 BBAD # HANGUL SYLLABLE MIEUM-YU-RIEULKIYEOK
+92B7 BBAE # HANGUL SYLLABLE MIEUM-YU-RIEULMIEUM
+92B8 BBAF # HANGUL SYLLABLE MIEUM-YU-RIEULPIEUP
+92B9 BBB0 # HANGUL SYLLABLE MIEUM-YU-RIEULSIOS
+92BA BBB1 # HANGUL SYLLABLE MIEUM-YU-RIEULTHIEUTH
+92BB BBB2 # HANGUL SYLLABLE MIEUM-YU-RIEULPHIEUPH
+92BC BBB3 # HANGUL SYLLABLE MIEUM-YU-RIEULHIEUH
+92BD BBB5 # HANGUL SYLLABLE MIEUM-YU-PIEUP
+92BE BBB6 # HANGUL SYLLABLE MIEUM-YU-PIEUPSIOS
+92BF BBB8 # HANGUL SYLLABLE MIEUM-YU-SSANGSIOS
+92C0 BBB9 # HANGUL SYLLABLE MIEUM-YU-IEUNG
+92C1 BBBA # HANGUL SYLLABLE MIEUM-YU-CIEUC
+92C2 BBBB # HANGUL SYLLABLE MIEUM-YU-CHIEUCH
+92C3 BBBC # HANGUL SYLLABLE MIEUM-YU-KHIEUKH
+92C4 BBBD # HANGUL SYLLABLE MIEUM-YU-THIEUTH
+92C5 BBBE # HANGUL SYLLABLE MIEUM-YU-PHIEUPH
+92C6 BBBF # HANGUL SYLLABLE MIEUM-YU-HIEUH
+92C7 BBC1 # HANGUL SYLLABLE MIEUM-EU-KIYEOK
+92C8 BBC2 # HANGUL SYLLABLE MIEUM-EU-SSANGKIYEOK
+92C9 BBC3 # HANGUL SYLLABLE MIEUM-EU-KIYEOKSIOS
+92CA BBC5 # HANGUL SYLLABLE MIEUM-EU-NIEUNCIEUC
+92CB BBC6 # HANGUL SYLLABLE MIEUM-EU-NIEUNHIEUH
+92CC BBC7 # HANGUL SYLLABLE MIEUM-EU-TIKEUT
+92CD BBC9 # HANGUL SYLLABLE MIEUM-EU-RIEULKIYEOK
+92CE BBCA # HANGUL SYLLABLE MIEUM-EU-RIEULMIEUM
+92CF BBCB # HANGUL SYLLABLE MIEUM-EU-RIEULPIEUP
+92D0 BBCC # HANGUL SYLLABLE MIEUM-EU-RIEULSIOS
+92D1 BBCD # HANGUL SYLLABLE MIEUM-EU-RIEULTHIEUTH
+92D2 BBCE # HANGUL SYLLABLE MIEUM-EU-RIEULPHIEUPH
+92D3 BBCF # HANGUL SYLLABLE MIEUM-EU-RIEULHIEUH
+92D4 BBD1 # HANGUL SYLLABLE MIEUM-EU-PIEUP
+92D5 BBD2 # HANGUL SYLLABLE MIEUM-EU-PIEUPSIOS
+92D6 BBD4 # HANGUL SYLLABLE MIEUM-EU-SSANGSIOS
+92D7 BBD5 # HANGUL SYLLABLE MIEUM-EU-IEUNG
+92D8 BBD6 # HANGUL SYLLABLE MIEUM-EU-CIEUC
+92D9 BBD7 # HANGUL SYLLABLE MIEUM-EU-CHIEUCH
+92DA BBD8 # HANGUL SYLLABLE MIEUM-EU-KHIEUKH
+92DB BBD9 # HANGUL SYLLABLE MIEUM-EU-THIEUTH
+92DC BBDA # HANGUL SYLLABLE MIEUM-EU-PHIEUPH
+92DD BBDB # HANGUL SYLLABLE MIEUM-EU-HIEUH
+92DE BBDC # HANGUL SYLLABLE MIEUM-YI
+92DF BBDD # HANGUL SYLLABLE MIEUM-YI-KIYEOK
+92E0 BBDE # HANGUL SYLLABLE MIEUM-YI-SSANGKIYEOK
+92E1 BBDF # HANGUL SYLLABLE MIEUM-YI-KIYEOKSIOS
+92E2 BBE0 # HANGUL SYLLABLE MIEUM-YI-NIEUN
+92E3 BBE1 # HANGUL SYLLABLE MIEUM-YI-NIEUNCIEUC
+92E4 BBE2 # HANGUL SYLLABLE MIEUM-YI-NIEUNHIEUH
+92E5 BBE3 # HANGUL SYLLABLE MIEUM-YI-TIKEUT
+92E6 BBE4 # HANGUL SYLLABLE MIEUM-YI-RIEUL
+92E7 BBE5 # HANGUL SYLLABLE MIEUM-YI-RIEULKIYEOK
+92E8 BBE6 # HANGUL SYLLABLE MIEUM-YI-RIEULMIEUM
+92E9 BBE7 # HANGUL SYLLABLE MIEUM-YI-RIEULPIEUP
+92EA BBE8 # HANGUL SYLLABLE MIEUM-YI-RIEULSIOS
+92EB BBE9 # HANGUL SYLLABLE MIEUM-YI-RIEULTHIEUTH
+92EC BBEA # HANGUL SYLLABLE MIEUM-YI-RIEULPHIEUPH
+92ED BBEB # HANGUL SYLLABLE MIEUM-YI-RIEULHIEUH
+92EE BBEC # HANGUL SYLLABLE MIEUM-YI-MIEUM
+92EF BBED # HANGUL SYLLABLE MIEUM-YI-PIEUP
+92F0 BBEE # HANGUL SYLLABLE MIEUM-YI-PIEUPSIOS
+92F1 BBEF # HANGUL SYLLABLE MIEUM-YI-SIOS
+92F2 BBF0 # HANGUL SYLLABLE MIEUM-YI-SSANGSIOS
+92F3 BBF1 # HANGUL SYLLABLE MIEUM-YI-IEUNG
+92F4 BBF2 # HANGUL SYLLABLE MIEUM-YI-CIEUC
+92F5 BBF3 # HANGUL SYLLABLE MIEUM-YI-CHIEUCH
+92F6 BBF4 # HANGUL SYLLABLE MIEUM-YI-KHIEUKH
+92F7 BBF5 # HANGUL SYLLABLE MIEUM-YI-THIEUTH
+92F8 BBF6 # HANGUL SYLLABLE MIEUM-YI-PHIEUPH
+92F9 BBF7 # HANGUL SYLLABLE MIEUM-YI-HIEUH
+92FA BBFA # HANGUL SYLLABLE MIEUM-I-SSANGKIYEOK
+92FB BBFB # HANGUL SYLLABLE MIEUM-I-KIYEOKSIOS
+92FC BBFD # HANGUL SYLLABLE MIEUM-I-NIEUNCIEUC
+92FD BBFE # HANGUL SYLLABLE MIEUM-I-NIEUNHIEUH
+92FE BC01 # HANGUL SYLLABLE MIEUM-I-RIEULKIYEOK
+9341 BC03 # HANGUL SYLLABLE MIEUM-I-RIEULPIEUP
+9342 BC04 # HANGUL SYLLABLE MIEUM-I-RIEULSIOS
+9343 BC05 # HANGUL SYLLABLE MIEUM-I-RIEULTHIEUTH
+9344 BC06 # HANGUL SYLLABLE MIEUM-I-RIEULPHIEUPH
+9345 BC07 # HANGUL SYLLABLE MIEUM-I-RIEULHIEUH
+9346 BC0A # HANGUL SYLLABLE MIEUM-I-PIEUPSIOS
+9347 BC0E # HANGUL SYLLABLE MIEUM-I-CIEUC
+9348 BC10 # HANGUL SYLLABLE MIEUM-I-KHIEUKH
+9349 BC12 # HANGUL SYLLABLE MIEUM-I-PHIEUPH
+934A BC13 # HANGUL SYLLABLE MIEUM-I-HIEUH
+934B BC19 # HANGUL SYLLABLE PIEUP-A-NIEUNCIEUC
+934C BC1A # HANGUL SYLLABLE PIEUP-A-NIEUNHIEUH
+934D BC20 # HANGUL SYLLABLE PIEUP-A-RIEULSIOS
+934E BC21 # HANGUL SYLLABLE PIEUP-A-RIEULTHIEUTH
+934F BC22 # HANGUL SYLLABLE PIEUP-A-RIEULPHIEUPH
+9350 BC23 # HANGUL SYLLABLE PIEUP-A-RIEULHIEUH
+9351 BC26 # HANGUL SYLLABLE PIEUP-A-PIEUPSIOS
+9352 BC28 # HANGUL SYLLABLE PIEUP-A-SSANGSIOS
+9353 BC2A # HANGUL SYLLABLE PIEUP-A-CIEUC
+9354 BC2B # HANGUL SYLLABLE PIEUP-A-CHIEUCH
+9355 BC2C # HANGUL SYLLABLE PIEUP-A-KHIEUKH
+9356 BC2E # HANGUL SYLLABLE PIEUP-A-PHIEUPH
+9357 BC2F # HANGUL SYLLABLE PIEUP-A-HIEUH
+9358 BC32 # HANGUL SYLLABLE PIEUP-AE-SSANGKIYEOK
+9359 BC33 # HANGUL SYLLABLE PIEUP-AE-KIYEOKSIOS
+935A BC35 # HANGUL SYLLABLE PIEUP-AE-NIEUNCIEUC
+9361 BC36 # HANGUL SYLLABLE PIEUP-AE-NIEUNHIEUH
+9362 BC37 # HANGUL SYLLABLE PIEUP-AE-TIKEUT
+9363 BC39 # HANGUL SYLLABLE PIEUP-AE-RIEULKIYEOK
+9364 BC3A # HANGUL SYLLABLE PIEUP-AE-RIEULMIEUM
+9365 BC3B # HANGUL SYLLABLE PIEUP-AE-RIEULPIEUP
+9366 BC3C # HANGUL SYLLABLE PIEUP-AE-RIEULSIOS
+9367 BC3D # HANGUL SYLLABLE PIEUP-AE-RIEULTHIEUTH
+9368 BC3E # HANGUL SYLLABLE PIEUP-AE-RIEULPHIEUPH
+9369 BC3F # HANGUL SYLLABLE PIEUP-AE-RIEULHIEUH
+936A BC42 # HANGUL SYLLABLE PIEUP-AE-PIEUPSIOS
+936B BC46 # HANGUL SYLLABLE PIEUP-AE-CIEUC
+936C BC47 # HANGUL SYLLABLE PIEUP-AE-CHIEUCH
+936D BC48 # HANGUL SYLLABLE PIEUP-AE-KHIEUKH
+936E BC4A # HANGUL SYLLABLE PIEUP-AE-PHIEUPH
+936F BC4B # HANGUL SYLLABLE PIEUP-AE-HIEUH
+9370 BC4E # HANGUL SYLLABLE PIEUP-YA-SSANGKIYEOK
+9371 BC4F # HANGUL SYLLABLE PIEUP-YA-KIYEOKSIOS
+9372 BC51 # HANGUL SYLLABLE PIEUP-YA-NIEUNCIEUC
+9373 BC52 # HANGUL SYLLABLE PIEUP-YA-NIEUNHIEUH
+9374 BC53 # HANGUL SYLLABLE PIEUP-YA-TIKEUT
+9375 BC54 # HANGUL SYLLABLE PIEUP-YA-RIEUL
+9376 BC55 # HANGUL SYLLABLE PIEUP-YA-RIEULKIYEOK
+9377 BC56 # HANGUL SYLLABLE PIEUP-YA-RIEULMIEUM
+9378 BC57 # HANGUL SYLLABLE PIEUP-YA-RIEULPIEUP
+9379 BC58 # HANGUL SYLLABLE PIEUP-YA-RIEULSIOS
+937A BC59 # HANGUL SYLLABLE PIEUP-YA-RIEULTHIEUTH
+9381 BC5A # HANGUL SYLLABLE PIEUP-YA-RIEULPHIEUPH
+9382 BC5B # HANGUL SYLLABLE PIEUP-YA-RIEULHIEUH
+9383 BC5C # HANGUL SYLLABLE PIEUP-YA-MIEUM
+9384 BC5E # HANGUL SYLLABLE PIEUP-YA-PIEUPSIOS
+9385 BC5F # HANGUL SYLLABLE PIEUP-YA-SIOS
+9386 BC60 # HANGUL SYLLABLE PIEUP-YA-SSANGSIOS
+9387 BC61 # HANGUL SYLLABLE PIEUP-YA-IEUNG
+9388 BC62 # HANGUL SYLLABLE PIEUP-YA-CIEUC
+9389 BC63 # HANGUL SYLLABLE PIEUP-YA-CHIEUCH
+938A BC64 # HANGUL SYLLABLE PIEUP-YA-KHIEUKH
+938B BC65 # HANGUL SYLLABLE PIEUP-YA-THIEUTH
+938C BC66 # HANGUL SYLLABLE PIEUP-YA-PHIEUPH
+938D BC67 # HANGUL SYLLABLE PIEUP-YA-HIEUH
+938E BC68 # HANGUL SYLLABLE PIEUP-YAE
+938F BC69 # HANGUL SYLLABLE PIEUP-YAE-KIYEOK
+9390 BC6A # HANGUL SYLLABLE PIEUP-YAE-SSANGKIYEOK
+9391 BC6B # HANGUL SYLLABLE PIEUP-YAE-KIYEOKSIOS
+9392 BC6C # HANGUL SYLLABLE PIEUP-YAE-NIEUN
+9393 BC6D # HANGUL SYLLABLE PIEUP-YAE-NIEUNCIEUC
+9394 BC6E # HANGUL SYLLABLE PIEUP-YAE-NIEUNHIEUH
+9395 BC6F # HANGUL SYLLABLE PIEUP-YAE-TIKEUT
+9396 BC70 # HANGUL SYLLABLE PIEUP-YAE-RIEUL
+9397 BC71 # HANGUL SYLLABLE PIEUP-YAE-RIEULKIYEOK
+9398 BC72 # HANGUL SYLLABLE PIEUP-YAE-RIEULMIEUM
+9399 BC73 # HANGUL SYLLABLE PIEUP-YAE-RIEULPIEUP
+939A BC74 # HANGUL SYLLABLE PIEUP-YAE-RIEULSIOS
+939B BC75 # HANGUL SYLLABLE PIEUP-YAE-RIEULTHIEUTH
+939C BC76 # HANGUL SYLLABLE PIEUP-YAE-RIEULPHIEUPH
+939D BC77 # HANGUL SYLLABLE PIEUP-YAE-RIEULHIEUH
+939E BC78 # HANGUL SYLLABLE PIEUP-YAE-MIEUM
+939F BC79 # HANGUL SYLLABLE PIEUP-YAE-PIEUP
+93A0 BC7A # HANGUL SYLLABLE PIEUP-YAE-PIEUPSIOS
+93A1 BC7B # HANGUL SYLLABLE PIEUP-YAE-SIOS
+93A2 BC7C # HANGUL SYLLABLE PIEUP-YAE-SSANGSIOS
+93A3 BC7D # HANGUL SYLLABLE PIEUP-YAE-IEUNG
+93A4 BC7E # HANGUL SYLLABLE PIEUP-YAE-CIEUC
+93A5 BC7F # HANGUL SYLLABLE PIEUP-YAE-CHIEUCH
+93A6 BC80 # HANGUL SYLLABLE PIEUP-YAE-KHIEUKH
+93A7 BC81 # HANGUL SYLLABLE PIEUP-YAE-THIEUTH
+93A8 BC82 # HANGUL SYLLABLE PIEUP-YAE-PHIEUPH
+93A9 BC83 # HANGUL SYLLABLE PIEUP-YAE-HIEUH
+93AA BC86 # HANGUL SYLLABLE PIEUP-EO-SSANGKIYEOK
+93AB BC87 # HANGUL SYLLABLE PIEUP-EO-KIYEOKSIOS
+93AC BC89 # HANGUL SYLLABLE PIEUP-EO-NIEUNCIEUC
+93AD BC8A # HANGUL SYLLABLE PIEUP-EO-NIEUNHIEUH
+93AE BC8D # HANGUL SYLLABLE PIEUP-EO-RIEULKIYEOK
+93AF BC8F # HANGUL SYLLABLE PIEUP-EO-RIEULPIEUP
+93B0 BC90 # HANGUL SYLLABLE PIEUP-EO-RIEULSIOS
+93B1 BC91 # HANGUL SYLLABLE PIEUP-EO-RIEULTHIEUTH
+93B2 BC92 # HANGUL SYLLABLE PIEUP-EO-RIEULPHIEUPH
+93B3 BC93 # HANGUL SYLLABLE PIEUP-EO-RIEULHIEUH
+93B4 BC96 # HANGUL SYLLABLE PIEUP-EO-PIEUPSIOS
+93B5 BC98 # HANGUL SYLLABLE PIEUP-EO-SSANGSIOS
+93B6 BC9B # HANGUL SYLLABLE PIEUP-EO-CHIEUCH
+93B7 BC9C # HANGUL SYLLABLE PIEUP-EO-KHIEUKH
+93B8 BC9D # HANGUL SYLLABLE PIEUP-EO-THIEUTH
+93B9 BC9E # HANGUL SYLLABLE PIEUP-EO-PHIEUPH
+93BA BC9F # HANGUL SYLLABLE PIEUP-EO-HIEUH
+93BB BCA2 # HANGUL SYLLABLE PIEUP-E-SSANGKIYEOK
+93BC BCA3 # HANGUL SYLLABLE PIEUP-E-KIYEOKSIOS
+93BD BCA5 # HANGUL SYLLABLE PIEUP-E-NIEUNCIEUC
+93BE BCA6 # HANGUL SYLLABLE PIEUP-E-NIEUNHIEUH
+93BF BCA9 # HANGUL SYLLABLE PIEUP-E-RIEULKIYEOK
+93C0 BCAA # HANGUL SYLLABLE PIEUP-E-RIEULMIEUM
+93C1 BCAB # HANGUL SYLLABLE PIEUP-E-RIEULPIEUP
+93C2 BCAC # HANGUL SYLLABLE PIEUP-E-RIEULSIOS
+93C3 BCAD # HANGUL SYLLABLE PIEUP-E-RIEULTHIEUTH
+93C4 BCAE # HANGUL SYLLABLE PIEUP-E-RIEULPHIEUPH
+93C5 BCAF # HANGUL SYLLABLE PIEUP-E-RIEULHIEUH
+93C6 BCB2 # HANGUL SYLLABLE PIEUP-E-PIEUPSIOS
+93C7 BCB6 # HANGUL SYLLABLE PIEUP-E-CIEUC
+93C8 BCB7 # HANGUL SYLLABLE PIEUP-E-CHIEUCH
+93C9 BCB8 # HANGUL SYLLABLE PIEUP-E-KHIEUKH
+93CA BCB9 # HANGUL SYLLABLE PIEUP-E-THIEUTH
+93CB BCBA # HANGUL SYLLABLE PIEUP-E-PHIEUPH
+93CC BCBB # HANGUL SYLLABLE PIEUP-E-HIEUH
+93CD BCBE # HANGUL SYLLABLE PIEUP-YEO-SSANGKIYEOK
+93CE BCBF # HANGUL SYLLABLE PIEUP-YEO-KIYEOKSIOS
+93CF BCC1 # HANGUL SYLLABLE PIEUP-YEO-NIEUNCIEUC
+93D0 BCC2 # HANGUL SYLLABLE PIEUP-YEO-NIEUNHIEUH
+93D1 BCC3 # HANGUL SYLLABLE PIEUP-YEO-TIKEUT
+93D2 BCC5 # HANGUL SYLLABLE PIEUP-YEO-RIEULKIYEOK
+93D3 BCC6 # HANGUL SYLLABLE PIEUP-YEO-RIEULMIEUM
+93D4 BCC7 # HANGUL SYLLABLE PIEUP-YEO-RIEULPIEUP
+93D5 BCC8 # HANGUL SYLLABLE PIEUP-YEO-RIEULSIOS
+93D6 BCC9 # HANGUL SYLLABLE PIEUP-YEO-RIEULTHIEUTH
+93D7 BCCA # HANGUL SYLLABLE PIEUP-YEO-RIEULPHIEUPH
+93D8 BCCB # HANGUL SYLLABLE PIEUP-YEO-RIEULHIEUH
+93D9 BCCC # HANGUL SYLLABLE PIEUP-YEO-MIEUM
+93DA BCCE # HANGUL SYLLABLE PIEUP-YEO-PIEUPSIOS
+93DB BCD2 # HANGUL SYLLABLE PIEUP-YEO-CIEUC
+93DC BCD3 # HANGUL SYLLABLE PIEUP-YEO-CHIEUCH
+93DD BCD4 # HANGUL SYLLABLE PIEUP-YEO-KHIEUKH
+93DE BCD6 # HANGUL SYLLABLE PIEUP-YEO-PHIEUPH
+93DF BCD7 # HANGUL SYLLABLE PIEUP-YEO-HIEUH
+93E0 BCD9 # HANGUL SYLLABLE PIEUP-YE-KIYEOK
+93E1 BCDA # HANGUL SYLLABLE PIEUP-YE-SSANGKIYEOK
+93E2 BCDB # HANGUL SYLLABLE PIEUP-YE-KIYEOKSIOS
+93E3 BCDD # HANGUL SYLLABLE PIEUP-YE-NIEUNCIEUC
+93E4 BCDE # HANGUL SYLLABLE PIEUP-YE-NIEUNHIEUH
+93E5 BCDF # HANGUL SYLLABLE PIEUP-YE-TIKEUT
+93E6 BCE0 # HANGUL SYLLABLE PIEUP-YE-RIEUL
+93E7 BCE1 # HANGUL SYLLABLE PIEUP-YE-RIEULKIYEOK
+93E8 BCE2 # HANGUL SYLLABLE PIEUP-YE-RIEULMIEUM
+93E9 BCE3 # HANGUL SYLLABLE PIEUP-YE-RIEULPIEUP
+93EA BCE4 # HANGUL SYLLABLE PIEUP-YE-RIEULSIOS
+93EB BCE5 # HANGUL SYLLABLE PIEUP-YE-RIEULTHIEUTH
+93EC BCE6 # HANGUL SYLLABLE PIEUP-YE-RIEULPHIEUPH
+93ED BCE7 # HANGUL SYLLABLE PIEUP-YE-RIEULHIEUH
+93EE BCE8 # HANGUL SYLLABLE PIEUP-YE-MIEUM
+93EF BCE9 # HANGUL SYLLABLE PIEUP-YE-PIEUP
+93F0 BCEA # HANGUL SYLLABLE PIEUP-YE-PIEUPSIOS
+93F1 BCEB # HANGUL SYLLABLE PIEUP-YE-SIOS
+93F2 BCEC # HANGUL SYLLABLE PIEUP-YE-SSANGSIOS
+93F3 BCED # HANGUL SYLLABLE PIEUP-YE-IEUNG
+93F4 BCEE # HANGUL SYLLABLE PIEUP-YE-CIEUC
+93F5 BCEF # HANGUL SYLLABLE PIEUP-YE-CHIEUCH
+93F6 BCF0 # HANGUL SYLLABLE PIEUP-YE-KHIEUKH
+93F7 BCF1 # HANGUL SYLLABLE PIEUP-YE-THIEUTH
+93F8 BCF2 # HANGUL SYLLABLE PIEUP-YE-PHIEUPH
+93F9 BCF3 # HANGUL SYLLABLE PIEUP-YE-HIEUH
+93FA BCF7 # HANGUL SYLLABLE PIEUP-O-KIYEOKSIOS
+93FB BCF9 # HANGUL SYLLABLE PIEUP-O-NIEUNCIEUC
+93FC BCFA # HANGUL SYLLABLE PIEUP-O-NIEUNHIEUH
+93FD BCFB # HANGUL SYLLABLE PIEUP-O-TIKEUT
+93FE BCFD # HANGUL SYLLABLE PIEUP-O-RIEULKIYEOK
+9441 BCFE # HANGUL SYLLABLE PIEUP-O-RIEULMIEUM
+9442 BCFF # HANGUL SYLLABLE PIEUP-O-RIEULPIEUP
+9443 BD00 # HANGUL SYLLABLE PIEUP-O-RIEULSIOS
+9444 BD01 # HANGUL SYLLABLE PIEUP-O-RIEULTHIEUTH
+9445 BD02 # HANGUL SYLLABLE PIEUP-O-RIEULPHIEUPH
+9446 BD03 # HANGUL SYLLABLE PIEUP-O-RIEULHIEUH
+9447 BD06 # HANGUL SYLLABLE PIEUP-O-PIEUPSIOS
+9448 BD08 # HANGUL SYLLABLE PIEUP-O-SSANGSIOS
+9449 BD0A # HANGUL SYLLABLE PIEUP-O-CIEUC
+944A BD0B # HANGUL SYLLABLE PIEUP-O-CHIEUCH
+944B BD0C # HANGUL SYLLABLE PIEUP-O-KHIEUKH
+944C BD0D # HANGUL SYLLABLE PIEUP-O-THIEUTH
+944D BD0E # HANGUL SYLLABLE PIEUP-O-PHIEUPH
+944E BD0F # HANGUL SYLLABLE PIEUP-O-HIEUH
+944F BD11 # HANGUL SYLLABLE PIEUP-WA-KIYEOK
+9450 BD12 # HANGUL SYLLABLE PIEUP-WA-SSANGKIYEOK
+9451 BD13 # HANGUL SYLLABLE PIEUP-WA-KIYEOKSIOS
+9452 BD15 # HANGUL SYLLABLE PIEUP-WA-NIEUNCIEUC
+9453 BD16 # HANGUL SYLLABLE PIEUP-WA-NIEUNHIEUH
+9454 BD17 # HANGUL SYLLABLE PIEUP-WA-TIKEUT
+9455 BD18 # HANGUL SYLLABLE PIEUP-WA-RIEUL
+9456 BD19 # HANGUL SYLLABLE PIEUP-WA-RIEULKIYEOK
+9457 BD1A # HANGUL SYLLABLE PIEUP-WA-RIEULMIEUM
+9458 BD1B # HANGUL SYLLABLE PIEUP-WA-RIEULPIEUP
+9459 BD1C # HANGUL SYLLABLE PIEUP-WA-RIEULSIOS
+945A BD1D # HANGUL SYLLABLE PIEUP-WA-RIEULTHIEUTH
+9461 BD1E # HANGUL SYLLABLE PIEUP-WA-RIEULPHIEUPH
+9462 BD1F # HANGUL SYLLABLE PIEUP-WA-RIEULHIEUH
+9463 BD20 # HANGUL SYLLABLE PIEUP-WA-MIEUM
+9464 BD21 # HANGUL SYLLABLE PIEUP-WA-PIEUP
+9465 BD22 # HANGUL SYLLABLE PIEUP-WA-PIEUPSIOS
+9466 BD23 # HANGUL SYLLABLE PIEUP-WA-SIOS
+9467 BD25 # HANGUL SYLLABLE PIEUP-WA-IEUNG
+9468 BD26 # HANGUL SYLLABLE PIEUP-WA-CIEUC
+9469 BD27 # HANGUL SYLLABLE PIEUP-WA-CHIEUCH
+946A BD28 # HANGUL SYLLABLE PIEUP-WA-KHIEUKH
+946B BD29 # HANGUL SYLLABLE PIEUP-WA-THIEUTH
+946C BD2A # HANGUL SYLLABLE PIEUP-WA-PHIEUPH
+946D BD2B # HANGUL SYLLABLE PIEUP-WA-HIEUH
+946E BD2D # HANGUL SYLLABLE PIEUP-WAE-KIYEOK
+946F BD2E # HANGUL SYLLABLE PIEUP-WAE-SSANGKIYEOK
+9470 BD2F # HANGUL SYLLABLE PIEUP-WAE-KIYEOKSIOS
+9471 BD30 # HANGUL SYLLABLE PIEUP-WAE-NIEUN
+9472 BD31 # HANGUL SYLLABLE PIEUP-WAE-NIEUNCIEUC
+9473 BD32 # HANGUL SYLLABLE PIEUP-WAE-NIEUNHIEUH
+9474 BD33 # HANGUL SYLLABLE PIEUP-WAE-TIKEUT
+9475 BD34 # HANGUL SYLLABLE PIEUP-WAE-RIEUL
+9476 BD35 # HANGUL SYLLABLE PIEUP-WAE-RIEULKIYEOK
+9477 BD36 # HANGUL SYLLABLE PIEUP-WAE-RIEULMIEUM
+9478 BD37 # HANGUL SYLLABLE PIEUP-WAE-RIEULPIEUP
+9479 BD38 # HANGUL SYLLABLE PIEUP-WAE-RIEULSIOS
+947A BD39 # HANGUL SYLLABLE PIEUP-WAE-RIEULTHIEUTH
+9481 BD3A # HANGUL SYLLABLE PIEUP-WAE-RIEULPHIEUPH
+9482 BD3B # HANGUL SYLLABLE PIEUP-WAE-RIEULHIEUH
+9483 BD3C # HANGUL SYLLABLE PIEUP-WAE-MIEUM
+9484 BD3D # HANGUL SYLLABLE PIEUP-WAE-PIEUP
+9485 BD3E # HANGUL SYLLABLE PIEUP-WAE-PIEUPSIOS
+9486 BD3F # HANGUL SYLLABLE PIEUP-WAE-SIOS
+9487 BD41 # HANGUL SYLLABLE PIEUP-WAE-IEUNG
+9488 BD42 # HANGUL SYLLABLE PIEUP-WAE-CIEUC
+9489 BD43 # HANGUL SYLLABLE PIEUP-WAE-CHIEUCH
+948A BD44 # HANGUL SYLLABLE PIEUP-WAE-KHIEUKH
+948B BD45 # HANGUL SYLLABLE PIEUP-WAE-THIEUTH
+948C BD46 # HANGUL SYLLABLE PIEUP-WAE-PHIEUPH
+948D BD47 # HANGUL SYLLABLE PIEUP-WAE-HIEUH
+948E BD4A # HANGUL SYLLABLE PIEUP-OE-SSANGKIYEOK
+948F BD4B # HANGUL SYLLABLE PIEUP-OE-KIYEOKSIOS
+9490 BD4D # HANGUL SYLLABLE PIEUP-OE-NIEUNCIEUC
+9491 BD4E # HANGUL SYLLABLE PIEUP-OE-NIEUNHIEUH
+9492 BD4F # HANGUL SYLLABLE PIEUP-OE-TIKEUT
+9493 BD51 # HANGUL SYLLABLE PIEUP-OE-RIEULKIYEOK
+9494 BD52 # HANGUL SYLLABLE PIEUP-OE-RIEULMIEUM
+9495 BD53 # HANGUL SYLLABLE PIEUP-OE-RIEULPIEUP
+9496 BD54 # HANGUL SYLLABLE PIEUP-OE-RIEULSIOS
+9497 BD55 # HANGUL SYLLABLE PIEUP-OE-RIEULTHIEUTH
+9498 BD56 # HANGUL SYLLABLE PIEUP-OE-RIEULPHIEUPH
+9499 BD57 # HANGUL SYLLABLE PIEUP-OE-RIEULHIEUH
+949A BD5A # HANGUL SYLLABLE PIEUP-OE-PIEUPSIOS
+949B BD5B # HANGUL SYLLABLE PIEUP-OE-SIOS
+949C BD5C # HANGUL SYLLABLE PIEUP-OE-SSANGSIOS
+949D BD5D # HANGUL SYLLABLE PIEUP-OE-IEUNG
+949E BD5E # HANGUL SYLLABLE PIEUP-OE-CIEUC
+949F BD5F # HANGUL SYLLABLE PIEUP-OE-CHIEUCH
+94A0 BD60 # HANGUL SYLLABLE PIEUP-OE-KHIEUKH
+94A1 BD61 # HANGUL SYLLABLE PIEUP-OE-THIEUTH
+94A2 BD62 # HANGUL SYLLABLE PIEUP-OE-PHIEUPH
+94A3 BD63 # HANGUL SYLLABLE PIEUP-OE-HIEUH
+94A4 BD65 # HANGUL SYLLABLE PIEUP-YO-KIYEOK
+94A5 BD66 # HANGUL SYLLABLE PIEUP-YO-SSANGKIYEOK
+94A6 BD67 # HANGUL SYLLABLE PIEUP-YO-KIYEOKSIOS
+94A7 BD69 # HANGUL SYLLABLE PIEUP-YO-NIEUNCIEUC
+94A8 BD6A # HANGUL SYLLABLE PIEUP-YO-NIEUNHIEUH
+94A9 BD6B # HANGUL SYLLABLE PIEUP-YO-TIKEUT
+94AA BD6C # HANGUL SYLLABLE PIEUP-YO-RIEUL
+94AB BD6D # HANGUL SYLLABLE PIEUP-YO-RIEULKIYEOK
+94AC BD6E # HANGUL SYLLABLE PIEUP-YO-RIEULMIEUM
+94AD BD6F # HANGUL SYLLABLE PIEUP-YO-RIEULPIEUP
+94AE BD70 # HANGUL SYLLABLE PIEUP-YO-RIEULSIOS
+94AF BD71 # HANGUL SYLLABLE PIEUP-YO-RIEULTHIEUTH
+94B0 BD72 # HANGUL SYLLABLE PIEUP-YO-RIEULPHIEUPH
+94B1 BD73 # HANGUL SYLLABLE PIEUP-YO-RIEULHIEUH
+94B2 BD74 # HANGUL SYLLABLE PIEUP-YO-MIEUM
+94B3 BD75 # HANGUL SYLLABLE PIEUP-YO-PIEUP
+94B4 BD76 # HANGUL SYLLABLE PIEUP-YO-PIEUPSIOS
+94B5 BD77 # HANGUL SYLLABLE PIEUP-YO-SIOS
+94B6 BD78 # HANGUL SYLLABLE PIEUP-YO-SSANGSIOS
+94B7 BD79 # HANGUL SYLLABLE PIEUP-YO-IEUNG
+94B8 BD7A # HANGUL SYLLABLE PIEUP-YO-CIEUC
+94B9 BD7B # HANGUL SYLLABLE PIEUP-YO-CHIEUCH
+94BA BD7C # HANGUL SYLLABLE PIEUP-YO-KHIEUKH
+94BB BD7D # HANGUL SYLLABLE PIEUP-YO-THIEUTH
+94BC BD7E # HANGUL SYLLABLE PIEUP-YO-PHIEUPH
+94BD BD7F # HANGUL SYLLABLE PIEUP-YO-HIEUH
+94BE BD82 # HANGUL SYLLABLE PIEUP-U-SSANGKIYEOK
+94BF BD83 # HANGUL SYLLABLE PIEUP-U-KIYEOKSIOS
+94C0 BD85 # HANGUL SYLLABLE PIEUP-U-NIEUNCIEUC
+94C1 BD86 # HANGUL SYLLABLE PIEUP-U-NIEUNHIEUH
+94C2 BD8B # HANGUL SYLLABLE PIEUP-U-RIEULPIEUP
+94C3 BD8C # HANGUL SYLLABLE PIEUP-U-RIEULSIOS
+94C4 BD8D # HANGUL SYLLABLE PIEUP-U-RIEULTHIEUTH
+94C5 BD8E # HANGUL SYLLABLE PIEUP-U-RIEULPHIEUPH
+94C6 BD8F # HANGUL SYLLABLE PIEUP-U-RIEULHIEUH
+94C7 BD92 # HANGUL SYLLABLE PIEUP-U-PIEUPSIOS
+94C8 BD94 # HANGUL SYLLABLE PIEUP-U-SSANGSIOS
+94C9 BD96 # HANGUL SYLLABLE PIEUP-U-CIEUC
+94CA BD97 # HANGUL SYLLABLE PIEUP-U-CHIEUCH
+94CB BD98 # HANGUL SYLLABLE PIEUP-U-KHIEUKH
+94CC BD9B # HANGUL SYLLABLE PIEUP-U-HIEUH
+94CD BD9D # HANGUL SYLLABLE PIEUP-WEO-KIYEOK
+94CE BD9E # HANGUL SYLLABLE PIEUP-WEO-SSANGKIYEOK
+94CF BD9F # HANGUL SYLLABLE PIEUP-WEO-KIYEOKSIOS
+94D0 BDA0 # HANGUL SYLLABLE PIEUP-WEO-NIEUN
+94D1 BDA1 # HANGUL SYLLABLE PIEUP-WEO-NIEUNCIEUC
+94D2 BDA2 # HANGUL SYLLABLE PIEUP-WEO-NIEUNHIEUH
+94D3 BDA3 # HANGUL SYLLABLE PIEUP-WEO-TIKEUT
+94D4 BDA5 # HANGUL SYLLABLE PIEUP-WEO-RIEULKIYEOK
+94D5 BDA6 # HANGUL SYLLABLE PIEUP-WEO-RIEULMIEUM
+94D6 BDA7 # HANGUL SYLLABLE PIEUP-WEO-RIEULPIEUP
+94D7 BDA8 # HANGUL SYLLABLE PIEUP-WEO-RIEULSIOS
+94D8 BDA9 # HANGUL SYLLABLE PIEUP-WEO-RIEULTHIEUTH
+94D9 BDAA # HANGUL SYLLABLE PIEUP-WEO-RIEULPHIEUPH
+94DA BDAB # HANGUL SYLLABLE PIEUP-WEO-RIEULHIEUH
+94DB BDAC # HANGUL SYLLABLE PIEUP-WEO-MIEUM
+94DC BDAD # HANGUL SYLLABLE PIEUP-WEO-PIEUP
+94DD BDAE # HANGUL SYLLABLE PIEUP-WEO-PIEUPSIOS
+94DE BDAF # HANGUL SYLLABLE PIEUP-WEO-SIOS
+94DF BDB1 # HANGUL SYLLABLE PIEUP-WEO-IEUNG
+94E0 BDB2 # HANGUL SYLLABLE PIEUP-WEO-CIEUC
+94E1 BDB3 # HANGUL SYLLABLE PIEUP-WEO-CHIEUCH
+94E2 BDB4 # HANGUL SYLLABLE PIEUP-WEO-KHIEUKH
+94E3 BDB5 # HANGUL SYLLABLE PIEUP-WEO-THIEUTH
+94E4 BDB6 # HANGUL SYLLABLE PIEUP-WEO-PHIEUPH
+94E5 BDB7 # HANGUL SYLLABLE PIEUP-WEO-HIEUH
+94E6 BDB9 # HANGUL SYLLABLE PIEUP-WE-KIYEOK
+94E7 BDBA # HANGUL SYLLABLE PIEUP-WE-SSANGKIYEOK
+94E8 BDBB # HANGUL SYLLABLE PIEUP-WE-KIYEOKSIOS
+94E9 BDBC # HANGUL SYLLABLE PIEUP-WE-NIEUN
+94EA BDBD # HANGUL SYLLABLE PIEUP-WE-NIEUNCIEUC
+94EB BDBE # HANGUL SYLLABLE PIEUP-WE-NIEUNHIEUH
+94EC BDBF # HANGUL SYLLABLE PIEUP-WE-TIKEUT
+94ED BDC0 # HANGUL SYLLABLE PIEUP-WE-RIEUL
+94EE BDC1 # HANGUL SYLLABLE PIEUP-WE-RIEULKIYEOK
+94EF BDC2 # HANGUL SYLLABLE PIEUP-WE-RIEULMIEUM
+94F0 BDC3 # HANGUL SYLLABLE PIEUP-WE-RIEULPIEUP
+94F1 BDC4 # HANGUL SYLLABLE PIEUP-WE-RIEULSIOS
+94F2 BDC5 # HANGUL SYLLABLE PIEUP-WE-RIEULTHIEUTH
+94F3 BDC6 # HANGUL SYLLABLE PIEUP-WE-RIEULPHIEUPH
+94F4 BDC7 # HANGUL SYLLABLE PIEUP-WE-RIEULHIEUH
+94F5 BDC8 # HANGUL SYLLABLE PIEUP-WE-MIEUM
+94F6 BDC9 # HANGUL SYLLABLE PIEUP-WE-PIEUP
+94F7 BDCA # HANGUL SYLLABLE PIEUP-WE-PIEUPSIOS
+94F8 BDCB # HANGUL SYLLABLE PIEUP-WE-SIOS
+94F9 BDCC # HANGUL SYLLABLE PIEUP-WE-SSANGSIOS
+94FA BDCD # HANGUL SYLLABLE PIEUP-WE-IEUNG
+94FB BDCE # HANGUL SYLLABLE PIEUP-WE-CIEUC
+94FC BDCF # HANGUL SYLLABLE PIEUP-WE-CHIEUCH
+94FD BDD0 # HANGUL SYLLABLE PIEUP-WE-KHIEUKH
+94FE BDD1 # HANGUL SYLLABLE PIEUP-WE-THIEUTH
+9541 BDD2 # HANGUL SYLLABLE PIEUP-WE-PHIEUPH
+9542 BDD3 # HANGUL SYLLABLE PIEUP-WE-HIEUH
+9543 BDD6 # HANGUL SYLLABLE PIEUP-WI-SSANGKIYEOK
+9544 BDD7 # HANGUL SYLLABLE PIEUP-WI-KIYEOKSIOS
+9545 BDD9 # HANGUL SYLLABLE PIEUP-WI-NIEUNCIEUC
+9546 BDDA # HANGUL SYLLABLE PIEUP-WI-NIEUNHIEUH
+9547 BDDB # HANGUL SYLLABLE PIEUP-WI-TIKEUT
+9548 BDDD # HANGUL SYLLABLE PIEUP-WI-RIEULKIYEOK
+9549 BDDE # HANGUL SYLLABLE PIEUP-WI-RIEULMIEUM
+954A BDDF # HANGUL SYLLABLE PIEUP-WI-RIEULPIEUP
+954B BDE0 # HANGUL SYLLABLE PIEUP-WI-RIEULSIOS
+954C BDE1 # HANGUL SYLLABLE PIEUP-WI-RIEULTHIEUTH
+954D BDE2 # HANGUL SYLLABLE PIEUP-WI-RIEULPHIEUPH
+954E BDE3 # HANGUL SYLLABLE PIEUP-WI-RIEULHIEUH
+954F BDE4 # HANGUL SYLLABLE PIEUP-WI-MIEUM
+9550 BDE5 # HANGUL SYLLABLE PIEUP-WI-PIEUP
+9551 BDE6 # HANGUL SYLLABLE PIEUP-WI-PIEUPSIOS
+9552 BDE7 # HANGUL SYLLABLE PIEUP-WI-SIOS
+9553 BDE8 # HANGUL SYLLABLE PIEUP-WI-SSANGSIOS
+9554 BDEA # HANGUL SYLLABLE PIEUP-WI-CIEUC
+9555 BDEB # HANGUL SYLLABLE PIEUP-WI-CHIEUCH
+9556 BDEC # HANGUL SYLLABLE PIEUP-WI-KHIEUKH
+9557 BDED # HANGUL SYLLABLE PIEUP-WI-THIEUTH
+9558 BDEE # HANGUL SYLLABLE PIEUP-WI-PHIEUPH
+9559 BDEF # HANGUL SYLLABLE PIEUP-WI-HIEUH
+955A BDF1 # HANGUL SYLLABLE PIEUP-YU-KIYEOK
+9561 BDF2 # HANGUL SYLLABLE PIEUP-YU-SSANGKIYEOK
+9562 BDF3 # HANGUL SYLLABLE PIEUP-YU-KIYEOKSIOS
+9563 BDF5 # HANGUL SYLLABLE PIEUP-YU-NIEUNCIEUC
+9564 BDF6 # HANGUL SYLLABLE PIEUP-YU-NIEUNHIEUH
+9565 BDF7 # HANGUL SYLLABLE PIEUP-YU-TIKEUT
+9566 BDF9 # HANGUL SYLLABLE PIEUP-YU-RIEULKIYEOK
+9567 BDFA # HANGUL SYLLABLE PIEUP-YU-RIEULMIEUM
+9568 BDFB # HANGUL SYLLABLE PIEUP-YU-RIEULPIEUP
+9569 BDFC # HANGUL SYLLABLE PIEUP-YU-RIEULSIOS
+956A BDFD # HANGUL SYLLABLE PIEUP-YU-RIEULTHIEUTH
+956B BDFE # HANGUL SYLLABLE PIEUP-YU-RIEULPHIEUPH
+956C BDFF # HANGUL SYLLABLE PIEUP-YU-RIEULHIEUH
+956D BE01 # HANGUL SYLLABLE PIEUP-YU-PIEUP
+956E BE02 # HANGUL SYLLABLE PIEUP-YU-PIEUPSIOS
+956F BE04 # HANGUL SYLLABLE PIEUP-YU-SSANGSIOS
+9570 BE06 # HANGUL SYLLABLE PIEUP-YU-CIEUC
+9571 BE07 # HANGUL SYLLABLE PIEUP-YU-CHIEUCH
+9572 BE08 # HANGUL SYLLABLE PIEUP-YU-KHIEUKH
+9573 BE09 # HANGUL SYLLABLE PIEUP-YU-THIEUTH
+9574 BE0A # HANGUL SYLLABLE PIEUP-YU-PHIEUPH
+9575 BE0B # HANGUL SYLLABLE PIEUP-YU-HIEUH
+9576 BE0E # HANGUL SYLLABLE PIEUP-EU-SSANGKIYEOK
+9577 BE0F # HANGUL SYLLABLE PIEUP-EU-KIYEOKSIOS
+9578 BE11 # HANGUL SYLLABLE PIEUP-EU-NIEUNCIEUC
+9579 BE12 # HANGUL SYLLABLE PIEUP-EU-NIEUNHIEUH
+957A BE13 # HANGUL SYLLABLE PIEUP-EU-TIKEUT
+9581 BE15 # HANGUL SYLLABLE PIEUP-EU-RIEULKIYEOK
+9582 BE16 # HANGUL SYLLABLE PIEUP-EU-RIEULMIEUM
+9583 BE17 # HANGUL SYLLABLE PIEUP-EU-RIEULPIEUP
+9584 BE18 # HANGUL SYLLABLE PIEUP-EU-RIEULSIOS
+9585 BE19 # HANGUL SYLLABLE PIEUP-EU-RIEULTHIEUTH
+9586 BE1A # HANGUL SYLLABLE PIEUP-EU-RIEULPHIEUPH
+9587 BE1B # HANGUL SYLLABLE PIEUP-EU-RIEULHIEUH
+9588 BE1E # HANGUL SYLLABLE PIEUP-EU-PIEUPSIOS
+9589 BE20 # HANGUL SYLLABLE PIEUP-EU-SSANGSIOS
+958A BE21 # HANGUL SYLLABLE PIEUP-EU-IEUNG
+958B BE22 # HANGUL SYLLABLE PIEUP-EU-CIEUC
+958C BE23 # HANGUL SYLLABLE PIEUP-EU-CHIEUCH
+958D BE24 # HANGUL SYLLABLE PIEUP-EU-KHIEUKH
+958E BE25 # HANGUL SYLLABLE PIEUP-EU-THIEUTH
+958F BE26 # HANGUL SYLLABLE PIEUP-EU-PHIEUPH
+9590 BE27 # HANGUL SYLLABLE PIEUP-EU-HIEUH
+9591 BE28 # HANGUL SYLLABLE PIEUP-YI
+9592 BE29 # HANGUL SYLLABLE PIEUP-YI-KIYEOK
+9593 BE2A # HANGUL SYLLABLE PIEUP-YI-SSANGKIYEOK
+9594 BE2B # HANGUL SYLLABLE PIEUP-YI-KIYEOKSIOS
+9595 BE2C # HANGUL SYLLABLE PIEUP-YI-NIEUN
+9596 BE2D # HANGUL SYLLABLE PIEUP-YI-NIEUNCIEUC
+9597 BE2E # HANGUL SYLLABLE PIEUP-YI-NIEUNHIEUH
+9598 BE2F # HANGUL SYLLABLE PIEUP-YI-TIKEUT
+9599 BE30 # HANGUL SYLLABLE PIEUP-YI-RIEUL
+959A BE31 # HANGUL SYLLABLE PIEUP-YI-RIEULKIYEOK
+959B BE32 # HANGUL SYLLABLE PIEUP-YI-RIEULMIEUM
+959C BE33 # HANGUL SYLLABLE PIEUP-YI-RIEULPIEUP
+959D BE34 # HANGUL SYLLABLE PIEUP-YI-RIEULSIOS
+959E BE35 # HANGUL SYLLABLE PIEUP-YI-RIEULTHIEUTH
+959F BE36 # HANGUL SYLLABLE PIEUP-YI-RIEULPHIEUPH
+95A0 BE37 # HANGUL SYLLABLE PIEUP-YI-RIEULHIEUH
+95A1 BE38 # HANGUL SYLLABLE PIEUP-YI-MIEUM
+95A2 BE39 # HANGUL SYLLABLE PIEUP-YI-PIEUP
+95A3 BE3A # HANGUL SYLLABLE PIEUP-YI-PIEUPSIOS
+95A4 BE3B # HANGUL SYLLABLE PIEUP-YI-SIOS
+95A5 BE3C # HANGUL SYLLABLE PIEUP-YI-SSANGSIOS
+95A6 BE3D # HANGUL SYLLABLE PIEUP-YI-IEUNG
+95A7 BE3E # HANGUL SYLLABLE PIEUP-YI-CIEUC
+95A8 BE3F # HANGUL SYLLABLE PIEUP-YI-CHIEUCH
+95A9 BE40 # HANGUL SYLLABLE PIEUP-YI-KHIEUKH
+95AA BE41 # HANGUL SYLLABLE PIEUP-YI-THIEUTH
+95AB BE42 # HANGUL SYLLABLE PIEUP-YI-PHIEUPH
+95AC BE43 # HANGUL SYLLABLE PIEUP-YI-HIEUH
+95AD BE46 # HANGUL SYLLABLE PIEUP-I-SSANGKIYEOK
+95AE BE47 # HANGUL SYLLABLE PIEUP-I-KIYEOKSIOS
+95AF BE49 # HANGUL SYLLABLE PIEUP-I-NIEUNCIEUC
+95B0 BE4A # HANGUL SYLLABLE PIEUP-I-NIEUNHIEUH
+95B1 BE4B # HANGUL SYLLABLE PIEUP-I-TIKEUT
+95B2 BE4D # HANGUL SYLLABLE PIEUP-I-RIEULKIYEOK
+95B3 BE4F # HANGUL SYLLABLE PIEUP-I-RIEULPIEUP
+95B4 BE50 # HANGUL SYLLABLE PIEUP-I-RIEULSIOS
+95B5 BE51 # HANGUL SYLLABLE PIEUP-I-RIEULTHIEUTH
+95B6 BE52 # HANGUL SYLLABLE PIEUP-I-RIEULPHIEUPH
+95B7 BE53 # HANGUL SYLLABLE PIEUP-I-RIEULHIEUH
+95B8 BE56 # HANGUL SYLLABLE PIEUP-I-PIEUPSIOS
+95B9 BE58 # HANGUL SYLLABLE PIEUP-I-SSANGSIOS
+95BA BE5C # HANGUL SYLLABLE PIEUP-I-KHIEUKH
+95BB BE5D # HANGUL SYLLABLE PIEUP-I-THIEUTH
+95BC BE5E # HANGUL SYLLABLE PIEUP-I-PHIEUPH
+95BD BE5F # HANGUL SYLLABLE PIEUP-I-HIEUH
+95BE BE62 # HANGUL SYLLABLE SSANGPIEUP-A-SSANGKIYEOK
+95BF BE63 # HANGUL SYLLABLE SSANGPIEUP-A-KIYEOKSIOS
+95C0 BE65 # HANGUL SYLLABLE SSANGPIEUP-A-NIEUNCIEUC
+95C1 BE66 # HANGUL SYLLABLE SSANGPIEUP-A-NIEUNHIEUH
+95C2 BE67 # HANGUL SYLLABLE SSANGPIEUP-A-TIKEUT
+95C3 BE69 # HANGUL SYLLABLE SSANGPIEUP-A-RIEULKIYEOK
+95C4 BE6B # HANGUL SYLLABLE SSANGPIEUP-A-RIEULPIEUP
+95C5 BE6C # HANGUL SYLLABLE SSANGPIEUP-A-RIEULSIOS
+95C6 BE6D # HANGUL SYLLABLE SSANGPIEUP-A-RIEULTHIEUTH
+95C7 BE6E # HANGUL SYLLABLE SSANGPIEUP-A-RIEULPHIEUPH
+95C8 BE6F # HANGUL SYLLABLE SSANGPIEUP-A-RIEULHIEUH
+95C9 BE72 # HANGUL SYLLABLE SSANGPIEUP-A-PIEUPSIOS
+95CA BE76 # HANGUL SYLLABLE SSANGPIEUP-A-CIEUC
+95CB BE77 # HANGUL SYLLABLE SSANGPIEUP-A-CHIEUCH
+95CC BE78 # HANGUL SYLLABLE SSANGPIEUP-A-KHIEUKH
+95CD BE79 # HANGUL SYLLABLE SSANGPIEUP-A-THIEUTH
+95CE BE7A # HANGUL SYLLABLE SSANGPIEUP-A-PHIEUPH
+95CF BE7E # HANGUL SYLLABLE SSANGPIEUP-AE-SSANGKIYEOK
+95D0 BE7F # HANGUL SYLLABLE SSANGPIEUP-AE-KIYEOKSIOS
+95D1 BE81 # HANGUL SYLLABLE SSANGPIEUP-AE-NIEUNCIEUC
+95D2 BE82 # HANGUL SYLLABLE SSANGPIEUP-AE-NIEUNHIEUH
+95D3 BE83 # HANGUL SYLLABLE SSANGPIEUP-AE-TIKEUT
+95D4 BE85 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULKIYEOK
+95D5 BE86 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULMIEUM
+95D6 BE87 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULPIEUP
+95D7 BE88 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULSIOS
+95D8 BE89 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULTHIEUTH
+95D9 BE8A # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULPHIEUPH
+95DA BE8B # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULHIEUH
+95DB BE8E # HANGUL SYLLABLE SSANGPIEUP-AE-PIEUPSIOS
+95DC BE92 # HANGUL SYLLABLE SSANGPIEUP-AE-CIEUC
+95DD BE93 # HANGUL SYLLABLE SSANGPIEUP-AE-CHIEUCH
+95DE BE94 # HANGUL SYLLABLE SSANGPIEUP-AE-KHIEUKH
+95DF BE95 # HANGUL SYLLABLE SSANGPIEUP-AE-THIEUTH
+95E0 BE96 # HANGUL SYLLABLE SSANGPIEUP-AE-PHIEUPH
+95E1 BE97 # HANGUL SYLLABLE SSANGPIEUP-AE-HIEUH
+95E2 BE9A # HANGUL SYLLABLE SSANGPIEUP-YA-SSANGKIYEOK
+95E3 BE9B # HANGUL SYLLABLE SSANGPIEUP-YA-KIYEOKSIOS
+95E4 BE9C # HANGUL SYLLABLE SSANGPIEUP-YA-NIEUN
+95E5 BE9D # HANGUL SYLLABLE SSANGPIEUP-YA-NIEUNCIEUC
+95E6 BE9E # HANGUL SYLLABLE SSANGPIEUP-YA-NIEUNHIEUH
+95E7 BE9F # HANGUL SYLLABLE SSANGPIEUP-YA-TIKEUT
+95E8 BEA0 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEUL
+95E9 BEA1 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULKIYEOK
+95EA BEA2 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULMIEUM
+95EB BEA3 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULPIEUP
+95EC BEA4 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULSIOS
+95ED BEA5 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULTHIEUTH
+95EE BEA6 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULPHIEUPH
+95EF BEA7 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULHIEUH
+95F0 BEA9 # HANGUL SYLLABLE SSANGPIEUP-YA-PIEUP
+95F1 BEAA # HANGUL SYLLABLE SSANGPIEUP-YA-PIEUPSIOS
+95F2 BEAB # HANGUL SYLLABLE SSANGPIEUP-YA-SIOS
+95F3 BEAC # HANGUL SYLLABLE SSANGPIEUP-YA-SSANGSIOS
+95F4 BEAD # HANGUL SYLLABLE SSANGPIEUP-YA-IEUNG
+95F5 BEAE # HANGUL SYLLABLE SSANGPIEUP-YA-CIEUC
+95F6 BEAF # HANGUL SYLLABLE SSANGPIEUP-YA-CHIEUCH
+95F7 BEB0 # HANGUL SYLLABLE SSANGPIEUP-YA-KHIEUKH
+95F8 BEB1 # HANGUL SYLLABLE SSANGPIEUP-YA-THIEUTH
+95F9 BEB2 # HANGUL SYLLABLE SSANGPIEUP-YA-PHIEUPH
+95FA BEB3 # HANGUL SYLLABLE SSANGPIEUP-YA-HIEUH
+95FB BEB4 # HANGUL SYLLABLE SSANGPIEUP-YAE
+95FC BEB5 # HANGUL SYLLABLE SSANGPIEUP-YAE-KIYEOK
+95FD BEB6 # HANGUL SYLLABLE SSANGPIEUP-YAE-SSANGKIYEOK
+95FE BEB7 # HANGUL SYLLABLE SSANGPIEUP-YAE-KIYEOKSIOS
+9641 BEB8 # HANGUL SYLLABLE SSANGPIEUP-YAE-NIEUN
+9642 BEB9 # HANGUL SYLLABLE SSANGPIEUP-YAE-NIEUNCIEUC
+9643 BEBA # HANGUL SYLLABLE SSANGPIEUP-YAE-NIEUNHIEUH
+9644 BEBB # HANGUL SYLLABLE SSANGPIEUP-YAE-TIKEUT
+9645 BEBC # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEUL
+9646 BEBD # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULKIYEOK
+9647 BEBE # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULMIEUM
+9648 BEBF # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULPIEUP
+9649 BEC0 # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULSIOS
+964A BEC1 # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULTHIEUTH
+964B BEC2 # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULPHIEUPH
+964C BEC3 # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULHIEUH
+964D BEC4 # HANGUL SYLLABLE SSANGPIEUP-YAE-MIEUM
+964E BEC5 # HANGUL SYLLABLE SSANGPIEUP-YAE-PIEUP
+964F BEC6 # HANGUL SYLLABLE SSANGPIEUP-YAE-PIEUPSIOS
+9650 BEC7 # HANGUL SYLLABLE SSANGPIEUP-YAE-SIOS
+9651 BEC8 # HANGUL SYLLABLE SSANGPIEUP-YAE-SSANGSIOS
+9652 BEC9 # HANGUL SYLLABLE SSANGPIEUP-YAE-IEUNG
+9653 BECA # HANGUL SYLLABLE SSANGPIEUP-YAE-CIEUC
+9654 BECB # HANGUL SYLLABLE SSANGPIEUP-YAE-CHIEUCH
+9655 BECC # HANGUL SYLLABLE SSANGPIEUP-YAE-KHIEUKH
+9656 BECD # HANGUL SYLLABLE SSANGPIEUP-YAE-THIEUTH
+9657 BECE # HANGUL SYLLABLE SSANGPIEUP-YAE-PHIEUPH
+9658 BECF # HANGUL SYLLABLE SSANGPIEUP-YAE-HIEUH
+9659 BED2 # HANGUL SYLLABLE SSANGPIEUP-EO-SSANGKIYEOK
+965A BED3 # HANGUL SYLLABLE SSANGPIEUP-EO-KIYEOKSIOS
+9661 BED5 # HANGUL SYLLABLE SSANGPIEUP-EO-NIEUNCIEUC
+9662 BED6 # HANGUL SYLLABLE SSANGPIEUP-EO-NIEUNHIEUH
+9663 BED9 # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULKIYEOK
+9664 BEDA # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULMIEUM
+9665 BEDB # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULPIEUP
+9666 BEDC # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULSIOS
+9667 BEDD # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULTHIEUTH
+9668 BEDE # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULPHIEUPH
+9669 BEDF # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULHIEUH
+966A BEE1 # HANGUL SYLLABLE SSANGPIEUP-EO-PIEUP
+966B BEE2 # HANGUL SYLLABLE SSANGPIEUP-EO-PIEUPSIOS
+966C BEE6 # HANGUL SYLLABLE SSANGPIEUP-EO-CIEUC
+966D BEE7 # HANGUL SYLLABLE SSANGPIEUP-EO-CHIEUCH
+966E BEE8 # HANGUL SYLLABLE SSANGPIEUP-EO-KHIEUKH
+966F BEE9 # HANGUL SYLLABLE SSANGPIEUP-EO-THIEUTH
+9670 BEEA # HANGUL SYLLABLE SSANGPIEUP-EO-PHIEUPH
+9671 BEEB # HANGUL SYLLABLE SSANGPIEUP-EO-HIEUH
+9672 BEED # HANGUL SYLLABLE SSANGPIEUP-E-KIYEOK
+9673 BEEE # HANGUL SYLLABLE SSANGPIEUP-E-SSANGKIYEOK
+9674 BEEF # HANGUL SYLLABLE SSANGPIEUP-E-KIYEOKSIOS
+9675 BEF0 # HANGUL SYLLABLE SSANGPIEUP-E-NIEUN
+9676 BEF1 # HANGUL SYLLABLE SSANGPIEUP-E-NIEUNCIEUC
+9677 BEF2 # HANGUL SYLLABLE SSANGPIEUP-E-NIEUNHIEUH
+9678 BEF3 # HANGUL SYLLABLE SSANGPIEUP-E-TIKEUT
+9679 BEF4 # HANGUL SYLLABLE SSANGPIEUP-E-RIEUL
+967A BEF5 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULKIYEOK
+9681 BEF6 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULMIEUM
+9682 BEF7 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULPIEUP
+9683 BEF8 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULSIOS
+9684 BEF9 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULTHIEUTH
+9685 BEFA # HANGUL SYLLABLE SSANGPIEUP-E-RIEULPHIEUPH
+9686 BEFB # HANGUL SYLLABLE SSANGPIEUP-E-RIEULHIEUH
+9687 BEFC # HANGUL SYLLABLE SSANGPIEUP-E-MIEUM
+9688 BEFD # HANGUL SYLLABLE SSANGPIEUP-E-PIEUP
+9689 BEFE # HANGUL SYLLABLE SSANGPIEUP-E-PIEUPSIOS
+968A BEFF # HANGUL SYLLABLE SSANGPIEUP-E-SIOS
+968B BF00 # HANGUL SYLLABLE SSANGPIEUP-E-SSANGSIOS
+968C BF02 # HANGUL SYLLABLE SSANGPIEUP-E-CIEUC
+968D BF03 # HANGUL SYLLABLE SSANGPIEUP-E-CHIEUCH
+968E BF04 # HANGUL SYLLABLE SSANGPIEUP-E-KHIEUKH
+968F BF05 # HANGUL SYLLABLE SSANGPIEUP-E-THIEUTH
+9690 BF06 # HANGUL SYLLABLE SSANGPIEUP-E-PHIEUPH
+9691 BF07 # HANGUL SYLLABLE SSANGPIEUP-E-HIEUH
+9692 BF0A # HANGUL SYLLABLE SSANGPIEUP-YEO-SSANGKIYEOK
+9693 BF0B # HANGUL SYLLABLE SSANGPIEUP-YEO-KIYEOKSIOS
+9694 BF0C # HANGUL SYLLABLE SSANGPIEUP-YEO-NIEUN
+9695 BF0D # HANGUL SYLLABLE SSANGPIEUP-YEO-NIEUNCIEUC
+9696 BF0E # HANGUL SYLLABLE SSANGPIEUP-YEO-NIEUNHIEUH
+9697 BF0F # HANGUL SYLLABLE SSANGPIEUP-YEO-TIKEUT
+9698 BF10 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEUL
+9699 BF11 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULKIYEOK
+969A BF12 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULMIEUM
+969B BF13 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULPIEUP
+969C BF14 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULSIOS
+969D BF15 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULTHIEUTH
+969E BF16 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULPHIEUPH
+969F BF17 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULHIEUH
+96A0 BF1A # HANGUL SYLLABLE SSANGPIEUP-YEO-PIEUPSIOS
+96A1 BF1E # HANGUL SYLLABLE SSANGPIEUP-YEO-CIEUC
+96A2 BF1F # HANGUL SYLLABLE SSANGPIEUP-YEO-CHIEUCH
+96A3 BF20 # HANGUL SYLLABLE SSANGPIEUP-YEO-KHIEUKH
+96A4 BF21 # HANGUL SYLLABLE SSANGPIEUP-YEO-THIEUTH
+96A5 BF22 # HANGUL SYLLABLE SSANGPIEUP-YEO-PHIEUPH
+96A6 BF23 # HANGUL SYLLABLE SSANGPIEUP-YEO-HIEUH
+96A7 BF24 # HANGUL SYLLABLE SSANGPIEUP-YE
+96A8 BF25 # HANGUL SYLLABLE SSANGPIEUP-YE-KIYEOK
+96A9 BF26 # HANGUL SYLLABLE SSANGPIEUP-YE-SSANGKIYEOK
+96AA BF27 # HANGUL SYLLABLE SSANGPIEUP-YE-KIYEOKSIOS
+96AB BF28 # HANGUL SYLLABLE SSANGPIEUP-YE-NIEUN
+96AC BF29 # HANGUL SYLLABLE SSANGPIEUP-YE-NIEUNCIEUC
+96AD BF2A # HANGUL SYLLABLE SSANGPIEUP-YE-NIEUNHIEUH
+96AE BF2B # HANGUL SYLLABLE SSANGPIEUP-YE-TIKEUT
+96AF BF2C # HANGUL SYLLABLE SSANGPIEUP-YE-RIEUL
+96B0 BF2D # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULKIYEOK
+96B1 BF2E # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULMIEUM
+96B2 BF2F # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULPIEUP
+96B3 BF30 # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULSIOS
+96B4 BF31 # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULTHIEUTH
+96B5 BF32 # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULPHIEUPH
+96B6 BF33 # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULHIEUH
+96B7 BF34 # HANGUL SYLLABLE SSANGPIEUP-YE-MIEUM
+96B8 BF35 # HANGUL SYLLABLE SSANGPIEUP-YE-PIEUP
+96B9 BF36 # HANGUL SYLLABLE SSANGPIEUP-YE-PIEUPSIOS
+96BA BF37 # HANGUL SYLLABLE SSANGPIEUP-YE-SIOS
+96BB BF38 # HANGUL SYLLABLE SSANGPIEUP-YE-SSANGSIOS
+96BC BF39 # HANGUL SYLLABLE SSANGPIEUP-YE-IEUNG
+96BD BF3A # HANGUL SYLLABLE SSANGPIEUP-YE-CIEUC
+96BE BF3B # HANGUL SYLLABLE SSANGPIEUP-YE-CHIEUCH
+96BF BF3C # HANGUL SYLLABLE SSANGPIEUP-YE-KHIEUKH
+96C0 BF3D # HANGUL SYLLABLE SSANGPIEUP-YE-THIEUTH
+96C1 BF3E # HANGUL SYLLABLE SSANGPIEUP-YE-PHIEUPH
+96C2 BF3F # HANGUL SYLLABLE SSANGPIEUP-YE-HIEUH
+96C3 BF42 # HANGUL SYLLABLE SSANGPIEUP-O-SSANGKIYEOK
+96C4 BF43 # HANGUL SYLLABLE SSANGPIEUP-O-KIYEOKSIOS
+96C5 BF45 # HANGUL SYLLABLE SSANGPIEUP-O-NIEUNCIEUC
+96C6 BF46 # HANGUL SYLLABLE SSANGPIEUP-O-NIEUNHIEUH
+96C7 BF47 # HANGUL SYLLABLE SSANGPIEUP-O-TIKEUT
+96C8 BF49 # HANGUL SYLLABLE SSANGPIEUP-O-RIEULKIYEOK
+96C9 BF4A # HANGUL SYLLABLE SSANGPIEUP-O-RIEULMIEUM
+96CA BF4B # HANGUL SYLLABLE SSANGPIEUP-O-RIEULPIEUP
+96CB BF4C # HANGUL SYLLABLE SSANGPIEUP-O-RIEULSIOS
+96CC BF4D # HANGUL SYLLABLE SSANGPIEUP-O-RIEULTHIEUTH
+96CD BF4E # HANGUL SYLLABLE SSANGPIEUP-O-RIEULPHIEUPH
+96CE BF4F # HANGUL SYLLABLE SSANGPIEUP-O-RIEULHIEUH
+96CF BF52 # HANGUL SYLLABLE SSANGPIEUP-O-PIEUPSIOS
+96D0 BF53 # HANGUL SYLLABLE SSANGPIEUP-O-SIOS
+96D1 BF54 # HANGUL SYLLABLE SSANGPIEUP-O-SSANGSIOS
+96D2 BF56 # HANGUL SYLLABLE SSANGPIEUP-O-CIEUC
+96D3 BF57 # HANGUL SYLLABLE SSANGPIEUP-O-CHIEUCH
+96D4 BF58 # HANGUL SYLLABLE SSANGPIEUP-O-KHIEUKH
+96D5 BF59 # HANGUL SYLLABLE SSANGPIEUP-O-THIEUTH
+96D6 BF5A # HANGUL SYLLABLE SSANGPIEUP-O-PHIEUPH
+96D7 BF5B # HANGUL SYLLABLE SSANGPIEUP-O-HIEUH
+96D8 BF5C # HANGUL SYLLABLE SSANGPIEUP-WA
+96D9 BF5D # HANGUL SYLLABLE SSANGPIEUP-WA-KIYEOK
+96DA BF5E # HANGUL SYLLABLE SSANGPIEUP-WA-SSANGKIYEOK
+96DB BF5F # HANGUL SYLLABLE SSANGPIEUP-WA-KIYEOKSIOS
+96DC BF60 # HANGUL SYLLABLE SSANGPIEUP-WA-NIEUN
+96DD BF61 # HANGUL SYLLABLE SSANGPIEUP-WA-NIEUNCIEUC
+96DE BF62 # HANGUL SYLLABLE SSANGPIEUP-WA-NIEUNHIEUH
+96DF BF63 # HANGUL SYLLABLE SSANGPIEUP-WA-TIKEUT
+96E0 BF64 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEUL
+96E1 BF65 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULKIYEOK
+96E2 BF66 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULMIEUM
+96E3 BF67 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULPIEUP
+96E4 BF68 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULSIOS
+96E5 BF69 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULTHIEUTH
+96E6 BF6A # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULPHIEUPH
+96E7 BF6B # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULHIEUH
+96E8 BF6C # HANGUL SYLLABLE SSANGPIEUP-WA-MIEUM
+96E9 BF6D # HANGUL SYLLABLE SSANGPIEUP-WA-PIEUP
+96EA BF6E # HANGUL SYLLABLE SSANGPIEUP-WA-PIEUPSIOS
+96EB BF6F # HANGUL SYLLABLE SSANGPIEUP-WA-SIOS
+96EC BF70 # HANGUL SYLLABLE SSANGPIEUP-WA-SSANGSIOS
+96ED BF71 # HANGUL SYLLABLE SSANGPIEUP-WA-IEUNG
+96EE BF72 # HANGUL SYLLABLE SSANGPIEUP-WA-CIEUC
+96EF BF73 # HANGUL SYLLABLE SSANGPIEUP-WA-CHIEUCH
+96F0 BF74 # HANGUL SYLLABLE SSANGPIEUP-WA-KHIEUKH
+96F1 BF75 # HANGUL SYLLABLE SSANGPIEUP-WA-THIEUTH
+96F2 BF76 # HANGUL SYLLABLE SSANGPIEUP-WA-PHIEUPH
+96F3 BF77 # HANGUL SYLLABLE SSANGPIEUP-WA-HIEUH
+96F4 BF78 # HANGUL SYLLABLE SSANGPIEUP-WAE
+96F5 BF79 # HANGUL SYLLABLE SSANGPIEUP-WAE-KIYEOK
+96F6 BF7A # HANGUL SYLLABLE SSANGPIEUP-WAE-SSANGKIYEOK
+96F7 BF7B # HANGUL SYLLABLE SSANGPIEUP-WAE-KIYEOKSIOS
+96F8 BF7C # HANGUL SYLLABLE SSANGPIEUP-WAE-NIEUN
+96F9 BF7D # HANGUL SYLLABLE SSANGPIEUP-WAE-NIEUNCIEUC
+96FA BF7E # HANGUL SYLLABLE SSANGPIEUP-WAE-NIEUNHIEUH
+96FB BF7F # HANGUL SYLLABLE SSANGPIEUP-WAE-TIKEUT
+96FC BF80 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEUL
+96FD BF81 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULKIYEOK
+96FE BF82 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULMIEUM
+9741 BF83 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULPIEUP
+9742 BF84 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULSIOS
+9743 BF85 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULTHIEUTH
+9744 BF86 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULPHIEUPH
+9745 BF87 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULHIEUH
+9746 BF88 # HANGUL SYLLABLE SSANGPIEUP-WAE-MIEUM
+9747 BF89 # HANGUL SYLLABLE SSANGPIEUP-WAE-PIEUP
+9748 BF8A # HANGUL SYLLABLE SSANGPIEUP-WAE-PIEUPSIOS
+9749 BF8B # HANGUL SYLLABLE SSANGPIEUP-WAE-SIOS
+974A BF8C # HANGUL SYLLABLE SSANGPIEUP-WAE-SSANGSIOS
+974B BF8D # HANGUL SYLLABLE SSANGPIEUP-WAE-IEUNG
+974C BF8E # HANGUL SYLLABLE SSANGPIEUP-WAE-CIEUC
+974D BF8F # HANGUL SYLLABLE SSANGPIEUP-WAE-CHIEUCH
+974E BF90 # HANGUL SYLLABLE SSANGPIEUP-WAE-KHIEUKH
+974F BF91 # HANGUL SYLLABLE SSANGPIEUP-WAE-THIEUTH
+9750 BF92 # HANGUL SYLLABLE SSANGPIEUP-WAE-PHIEUPH
+9751 BF93 # HANGUL SYLLABLE SSANGPIEUP-WAE-HIEUH
+9752 BF95 # HANGUL SYLLABLE SSANGPIEUP-OE-KIYEOK
+9753 BF96 # HANGUL SYLLABLE SSANGPIEUP-OE-SSANGKIYEOK
+9754 BF97 # HANGUL SYLLABLE SSANGPIEUP-OE-KIYEOKSIOS
+9755 BF98 # HANGUL SYLLABLE SSANGPIEUP-OE-NIEUN
+9756 BF99 # HANGUL SYLLABLE SSANGPIEUP-OE-NIEUNCIEUC
+9757 BF9A # HANGUL SYLLABLE SSANGPIEUP-OE-NIEUNHIEUH
+9758 BF9B # HANGUL SYLLABLE SSANGPIEUP-OE-TIKEUT
+9759 BF9C # HANGUL SYLLABLE SSANGPIEUP-OE-RIEUL
+975A BF9D # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULKIYEOK
+9761 BF9E # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULMIEUM
+9762 BF9F # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULPIEUP
+9763 BFA0 # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULSIOS
+9764 BFA1 # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULTHIEUTH
+9765 BFA2 # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULPHIEUPH
+9766 BFA3 # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULHIEUH
+9767 BFA4 # HANGUL SYLLABLE SSANGPIEUP-OE-MIEUM
+9768 BFA5 # HANGUL SYLLABLE SSANGPIEUP-OE-PIEUP
+9769 BFA6 # HANGUL SYLLABLE SSANGPIEUP-OE-PIEUPSIOS
+976A BFA7 # HANGUL SYLLABLE SSANGPIEUP-OE-SIOS
+976B BFA8 # HANGUL SYLLABLE SSANGPIEUP-OE-SSANGSIOS
+976C BFA9 # HANGUL SYLLABLE SSANGPIEUP-OE-IEUNG
+976D BFAA # HANGUL SYLLABLE SSANGPIEUP-OE-CIEUC
+976E BFAB # HANGUL SYLLABLE SSANGPIEUP-OE-CHIEUCH
+976F BFAC # HANGUL SYLLABLE SSANGPIEUP-OE-KHIEUKH
+9770 BFAD # HANGUL SYLLABLE SSANGPIEUP-OE-THIEUTH
+9771 BFAE # HANGUL SYLLABLE SSANGPIEUP-OE-PHIEUPH
+9772 BFAF # HANGUL SYLLABLE SSANGPIEUP-OE-HIEUH
+9773 BFB1 # HANGUL SYLLABLE SSANGPIEUP-YO-KIYEOK
+9774 BFB2 # HANGUL SYLLABLE SSANGPIEUP-YO-SSANGKIYEOK
+9775 BFB3 # HANGUL SYLLABLE SSANGPIEUP-YO-KIYEOKSIOS
+9776 BFB4 # HANGUL SYLLABLE SSANGPIEUP-YO-NIEUN
+9777 BFB5 # HANGUL SYLLABLE SSANGPIEUP-YO-NIEUNCIEUC
+9778 BFB6 # HANGUL SYLLABLE SSANGPIEUP-YO-NIEUNHIEUH
+9779 BFB7 # HANGUL SYLLABLE SSANGPIEUP-YO-TIKEUT
+977A BFB8 # HANGUL SYLLABLE SSANGPIEUP-YO-RIEUL
+9781 BFB9 # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULKIYEOK
+9782 BFBA # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULMIEUM
+9783 BFBB # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULPIEUP
+9784 BFBC # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULSIOS
+9785 BFBD # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULTHIEUTH
+9786 BFBE # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULPHIEUPH
+9787 BFBF # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULHIEUH
+9788 BFC0 # HANGUL SYLLABLE SSANGPIEUP-YO-MIEUM
+9789 BFC1 # HANGUL SYLLABLE SSANGPIEUP-YO-PIEUP
+978A BFC2 # HANGUL SYLLABLE SSANGPIEUP-YO-PIEUPSIOS
+978B BFC3 # HANGUL SYLLABLE SSANGPIEUP-YO-SIOS
+978C BFC4 # HANGUL SYLLABLE SSANGPIEUP-YO-SSANGSIOS
+978D BFC6 # HANGUL SYLLABLE SSANGPIEUP-YO-CIEUC
+978E BFC7 # HANGUL SYLLABLE SSANGPIEUP-YO-CHIEUCH
+978F BFC8 # HANGUL SYLLABLE SSANGPIEUP-YO-KHIEUKH
+9790 BFC9 # HANGUL SYLLABLE SSANGPIEUP-YO-THIEUTH
+9791 BFCA # HANGUL SYLLABLE SSANGPIEUP-YO-PHIEUPH
+9792 BFCB # HANGUL SYLLABLE SSANGPIEUP-YO-HIEUH
+9793 BFCE # HANGUL SYLLABLE SSANGPIEUP-U-SSANGKIYEOK
+9794 BFCF # HANGUL SYLLABLE SSANGPIEUP-U-KIYEOKSIOS
+9795 BFD1 # HANGUL SYLLABLE SSANGPIEUP-U-NIEUNCIEUC
+9796 BFD2 # HANGUL SYLLABLE SSANGPIEUP-U-NIEUNHIEUH
+9797 BFD3 # HANGUL SYLLABLE SSANGPIEUP-U-TIKEUT
+9798 BFD5 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULKIYEOK
+9799 BFD6 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULMIEUM
+979A BFD7 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULPIEUP
+979B BFD8 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULSIOS
+979C BFD9 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULTHIEUTH
+979D BFDA # HANGUL SYLLABLE SSANGPIEUP-U-RIEULPHIEUPH
+979E BFDB # HANGUL SYLLABLE SSANGPIEUP-U-RIEULHIEUH
+979F BFDD # HANGUL SYLLABLE SSANGPIEUP-U-PIEUP
+97A0 BFDE # HANGUL SYLLABLE SSANGPIEUP-U-PIEUPSIOS
+97A1 BFE0 # HANGUL SYLLABLE SSANGPIEUP-U-SSANGSIOS
+97A2 BFE2 # HANGUL SYLLABLE SSANGPIEUP-U-CIEUC
+97A3 BFE3 # HANGUL SYLLABLE SSANGPIEUP-U-CHIEUCH
+97A4 BFE4 # HANGUL SYLLABLE SSANGPIEUP-U-KHIEUKH
+97A5 BFE5 # HANGUL SYLLABLE SSANGPIEUP-U-THIEUTH
+97A6 BFE6 # HANGUL SYLLABLE SSANGPIEUP-U-PHIEUPH
+97A7 BFE7 # HANGUL SYLLABLE SSANGPIEUP-U-HIEUH
+97A8 BFE8 # HANGUL SYLLABLE SSANGPIEUP-WEO
+97A9 BFE9 # HANGUL SYLLABLE SSANGPIEUP-WEO-KIYEOK
+97AA BFEA # HANGUL SYLLABLE SSANGPIEUP-WEO-SSANGKIYEOK
+97AB BFEB # HANGUL SYLLABLE SSANGPIEUP-WEO-KIYEOKSIOS
+97AC BFEC # HANGUL SYLLABLE SSANGPIEUP-WEO-NIEUN
+97AD BFED # HANGUL SYLLABLE SSANGPIEUP-WEO-NIEUNCIEUC
+97AE BFEE # HANGUL SYLLABLE SSANGPIEUP-WEO-NIEUNHIEUH
+97AF BFEF # HANGUL SYLLABLE SSANGPIEUP-WEO-TIKEUT
+97B0 BFF0 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEUL
+97B1 BFF1 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULKIYEOK
+97B2 BFF2 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULMIEUM
+97B3 BFF3 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULPIEUP
+97B4 BFF4 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULSIOS
+97B5 BFF5 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULTHIEUTH
+97B6 BFF6 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULPHIEUPH
+97B7 BFF7 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULHIEUH
+97B8 BFF8 # HANGUL SYLLABLE SSANGPIEUP-WEO-MIEUM
+97B9 BFF9 # HANGUL SYLLABLE SSANGPIEUP-WEO-PIEUP
+97BA BFFA # HANGUL SYLLABLE SSANGPIEUP-WEO-PIEUPSIOS
+97BB BFFB # HANGUL SYLLABLE SSANGPIEUP-WEO-SIOS
+97BC BFFC # HANGUL SYLLABLE SSANGPIEUP-WEO-SSANGSIOS
+97BD BFFD # HANGUL SYLLABLE SSANGPIEUP-WEO-IEUNG
+97BE BFFE # HANGUL SYLLABLE SSANGPIEUP-WEO-CIEUC
+97BF BFFF # HANGUL SYLLABLE SSANGPIEUP-WEO-CHIEUCH
+97C0 C000 # HANGUL SYLLABLE SSANGPIEUP-WEO-KHIEUKH
+97C1 C001 # HANGUL SYLLABLE SSANGPIEUP-WEO-THIEUTH
+97C2 C002 # HANGUL SYLLABLE SSANGPIEUP-WEO-PHIEUPH
+97C3 C003 # HANGUL SYLLABLE SSANGPIEUP-WEO-HIEUH
+97C4 C004 # HANGUL SYLLABLE SSANGPIEUP-WE
+97C5 C005 # HANGUL SYLLABLE SSANGPIEUP-WE-KIYEOK
+97C6 C006 # HANGUL SYLLABLE SSANGPIEUP-WE-SSANGKIYEOK
+97C7 C007 # HANGUL SYLLABLE SSANGPIEUP-WE-KIYEOKSIOS
+97C8 C008 # HANGUL SYLLABLE SSANGPIEUP-WE-NIEUN
+97C9 C009 # HANGUL SYLLABLE SSANGPIEUP-WE-NIEUNCIEUC
+97CA C00A # HANGUL SYLLABLE SSANGPIEUP-WE-NIEUNHIEUH
+97CB C00B # HANGUL SYLLABLE SSANGPIEUP-WE-TIKEUT
+97CC C00C # HANGUL SYLLABLE SSANGPIEUP-WE-RIEUL
+97CD C00D # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULKIYEOK
+97CE C00E # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULMIEUM
+97CF C00F # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULPIEUP
+97D0 C010 # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULSIOS
+97D1 C011 # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULTHIEUTH
+97D2 C012 # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULPHIEUPH
+97D3 C013 # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULHIEUH
+97D4 C014 # HANGUL SYLLABLE SSANGPIEUP-WE-MIEUM
+97D5 C015 # HANGUL SYLLABLE SSANGPIEUP-WE-PIEUP
+97D6 C016 # HANGUL SYLLABLE SSANGPIEUP-WE-PIEUPSIOS
+97D7 C017 # HANGUL SYLLABLE SSANGPIEUP-WE-SIOS
+97D8 C018 # HANGUL SYLLABLE SSANGPIEUP-WE-SSANGSIOS
+97D9 C019 # HANGUL SYLLABLE SSANGPIEUP-WE-IEUNG
+97DA C01A # HANGUL SYLLABLE SSANGPIEUP-WE-CIEUC
+97DB C01B # HANGUL SYLLABLE SSANGPIEUP-WE-CHIEUCH
+97DC C01C # HANGUL SYLLABLE SSANGPIEUP-WE-KHIEUKH
+97DD C01D # HANGUL SYLLABLE SSANGPIEUP-WE-THIEUTH
+97DE C01E # HANGUL SYLLABLE SSANGPIEUP-WE-PHIEUPH
+97DF C01F # HANGUL SYLLABLE SSANGPIEUP-WE-HIEUH
+97E0 C020 # HANGUL SYLLABLE SSANGPIEUP-WI
+97E1 C021 # HANGUL SYLLABLE SSANGPIEUP-WI-KIYEOK
+97E2 C022 # HANGUL SYLLABLE SSANGPIEUP-WI-SSANGKIYEOK
+97E3 C023 # HANGUL SYLLABLE SSANGPIEUP-WI-KIYEOKSIOS
+97E4 C024 # HANGUL SYLLABLE SSANGPIEUP-WI-NIEUN
+97E5 C025 # HANGUL SYLLABLE SSANGPIEUP-WI-NIEUNCIEUC
+97E6 C026 # HANGUL SYLLABLE SSANGPIEUP-WI-NIEUNHIEUH
+97E7 C027 # HANGUL SYLLABLE SSANGPIEUP-WI-TIKEUT
+97E8 C028 # HANGUL SYLLABLE SSANGPIEUP-WI-RIEUL
+97E9 C029 # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULKIYEOK
+97EA C02A # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULMIEUM
+97EB C02B # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULPIEUP
+97EC C02C # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULSIOS
+97ED C02D # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULTHIEUTH
+97EE C02E # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULPHIEUPH
+97EF C02F # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULHIEUH
+97F0 C030 # HANGUL SYLLABLE SSANGPIEUP-WI-MIEUM
+97F1 C031 # HANGUL SYLLABLE SSANGPIEUP-WI-PIEUP
+97F2 C032 # HANGUL SYLLABLE SSANGPIEUP-WI-PIEUPSIOS
+97F3 C033 # HANGUL SYLLABLE SSANGPIEUP-WI-SIOS
+97F4 C034 # HANGUL SYLLABLE SSANGPIEUP-WI-SSANGSIOS
+97F5 C035 # HANGUL SYLLABLE SSANGPIEUP-WI-IEUNG
+97F6 C036 # HANGUL SYLLABLE SSANGPIEUP-WI-CIEUC
+97F7 C037 # HANGUL SYLLABLE SSANGPIEUP-WI-CHIEUCH
+97F8 C038 # HANGUL SYLLABLE SSANGPIEUP-WI-KHIEUKH
+97F9 C039 # HANGUL SYLLABLE SSANGPIEUP-WI-THIEUTH
+97FA C03A # HANGUL SYLLABLE SSANGPIEUP-WI-PHIEUPH
+97FB C03B # HANGUL SYLLABLE SSANGPIEUP-WI-HIEUH
+97FC C03D # HANGUL SYLLABLE SSANGPIEUP-YU-KIYEOK
+97FD C03E # HANGUL SYLLABLE SSANGPIEUP-YU-SSANGKIYEOK
+97FE C03F # HANGUL SYLLABLE SSANGPIEUP-YU-KIYEOKSIOS
+9841 C040 # HANGUL SYLLABLE SSANGPIEUP-YU-NIEUN
+9842 C041 # HANGUL SYLLABLE SSANGPIEUP-YU-NIEUNCIEUC
+9843 C042 # HANGUL SYLLABLE SSANGPIEUP-YU-NIEUNHIEUH
+9844 C043 # HANGUL SYLLABLE SSANGPIEUP-YU-TIKEUT
+9845 C044 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEUL
+9846 C045 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULKIYEOK
+9847 C046 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULMIEUM
+9848 C047 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULPIEUP
+9849 C048 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULSIOS
+984A C049 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULTHIEUTH
+984B C04A # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULPHIEUPH
+984C C04B # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULHIEUH
+984D C04C # HANGUL SYLLABLE SSANGPIEUP-YU-MIEUM
+984E C04D # HANGUL SYLLABLE SSANGPIEUP-YU-PIEUP
+984F C04E # HANGUL SYLLABLE SSANGPIEUP-YU-PIEUPSIOS
+9850 C04F # HANGUL SYLLABLE SSANGPIEUP-YU-SIOS
+9851 C050 # HANGUL SYLLABLE SSANGPIEUP-YU-SSANGSIOS
+9852 C052 # HANGUL SYLLABLE SSANGPIEUP-YU-CIEUC
+9853 C053 # HANGUL SYLLABLE SSANGPIEUP-YU-CHIEUCH
+9854 C054 # HANGUL SYLLABLE SSANGPIEUP-YU-KHIEUKH
+9855 C055 # HANGUL SYLLABLE SSANGPIEUP-YU-THIEUTH
+9856 C056 # HANGUL SYLLABLE SSANGPIEUP-YU-PHIEUPH
+9857 C057 # HANGUL SYLLABLE SSANGPIEUP-YU-HIEUH
+9858 C059 # HANGUL SYLLABLE SSANGPIEUP-EU-KIYEOK
+9859 C05A # HANGUL SYLLABLE SSANGPIEUP-EU-SSANGKIYEOK
+985A C05B # HANGUL SYLLABLE SSANGPIEUP-EU-KIYEOKSIOS
+9861 C05D # HANGUL SYLLABLE SSANGPIEUP-EU-NIEUNCIEUC
+9862 C05E # HANGUL SYLLABLE SSANGPIEUP-EU-NIEUNHIEUH
+9863 C05F # HANGUL SYLLABLE SSANGPIEUP-EU-TIKEUT
+9864 C061 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULKIYEOK
+9865 C062 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULMIEUM
+9866 C063 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULPIEUP
+9867 C064 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULSIOS
+9868 C065 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULTHIEUTH
+9869 C066 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULPHIEUPH
+986A C067 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULHIEUH
+986B C06A # HANGUL SYLLABLE SSANGPIEUP-EU-PIEUPSIOS
+986C C06B # HANGUL SYLLABLE SSANGPIEUP-EU-SIOS
+986D C06C # HANGUL SYLLABLE SSANGPIEUP-EU-SSANGSIOS
+986E C06D # HANGUL SYLLABLE SSANGPIEUP-EU-IEUNG
+986F C06E # HANGUL SYLLABLE SSANGPIEUP-EU-CIEUC
+9870 C06F # HANGUL SYLLABLE SSANGPIEUP-EU-CHIEUCH
+9871 C070 # HANGUL SYLLABLE SSANGPIEUP-EU-KHIEUKH
+9872 C071 # HANGUL SYLLABLE SSANGPIEUP-EU-THIEUTH
+9873 C072 # HANGUL SYLLABLE SSANGPIEUP-EU-PHIEUPH
+9874 C073 # HANGUL SYLLABLE SSANGPIEUP-EU-HIEUH
+9875 C074 # HANGUL SYLLABLE SSANGPIEUP-YI
+9876 C075 # HANGUL SYLLABLE SSANGPIEUP-YI-KIYEOK
+9877 C076 # HANGUL SYLLABLE SSANGPIEUP-YI-SSANGKIYEOK
+9878 C077 # HANGUL SYLLABLE SSANGPIEUP-YI-KIYEOKSIOS
+9879 C078 # HANGUL SYLLABLE SSANGPIEUP-YI-NIEUN
+987A C079 # HANGUL SYLLABLE SSANGPIEUP-YI-NIEUNCIEUC
+9881 C07A # HANGUL SYLLABLE SSANGPIEUP-YI-NIEUNHIEUH
+9882 C07B # HANGUL SYLLABLE SSANGPIEUP-YI-TIKEUT
+9883 C07C # HANGUL SYLLABLE SSANGPIEUP-YI-RIEUL
+9884 C07D # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULKIYEOK
+9885 C07E # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULMIEUM
+9886 C07F # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULPIEUP
+9887 C080 # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULSIOS
+9888 C081 # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULTHIEUTH
+9889 C082 # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULPHIEUPH
+988A C083 # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULHIEUH
+988B C084 # HANGUL SYLLABLE SSANGPIEUP-YI-MIEUM
+988C C085 # HANGUL SYLLABLE SSANGPIEUP-YI-PIEUP
+988D C086 # HANGUL SYLLABLE SSANGPIEUP-YI-PIEUPSIOS
+988E C087 # HANGUL SYLLABLE SSANGPIEUP-YI-SIOS
+988F C088 # HANGUL SYLLABLE SSANGPIEUP-YI-SSANGSIOS
+9890 C089 # HANGUL SYLLABLE SSANGPIEUP-YI-IEUNG
+9891 C08A # HANGUL SYLLABLE SSANGPIEUP-YI-CIEUC
+9892 C08B # HANGUL SYLLABLE SSANGPIEUP-YI-CHIEUCH
+9893 C08C # HANGUL SYLLABLE SSANGPIEUP-YI-KHIEUKH
+9894 C08D # HANGUL SYLLABLE SSANGPIEUP-YI-THIEUTH
+9895 C08E # HANGUL SYLLABLE SSANGPIEUP-YI-PHIEUPH
+9896 C08F # HANGUL SYLLABLE SSANGPIEUP-YI-HIEUH
+9897 C092 # HANGUL SYLLABLE SSANGPIEUP-I-SSANGKIYEOK
+9898 C093 # HANGUL SYLLABLE SSANGPIEUP-I-KIYEOKSIOS
+9899 C095 # HANGUL SYLLABLE SSANGPIEUP-I-NIEUNCIEUC
+989A C096 # HANGUL SYLLABLE SSANGPIEUP-I-NIEUNHIEUH
+989B C097 # HANGUL SYLLABLE SSANGPIEUP-I-TIKEUT
+989C C099 # HANGUL SYLLABLE SSANGPIEUP-I-RIEULKIYEOK
+989D C09A # HANGUL SYLLABLE SSANGPIEUP-I-RIEULMIEUM
+989E C09B # HANGUL SYLLABLE SSANGPIEUP-I-RIEULPIEUP
+989F C09C # HANGUL SYLLABLE SSANGPIEUP-I-RIEULSIOS
+98A0 C09D # HANGUL SYLLABLE SSANGPIEUP-I-RIEULTHIEUTH
+98A1 C09E # HANGUL SYLLABLE SSANGPIEUP-I-RIEULPHIEUPH
+98A2 C09F # HANGUL SYLLABLE SSANGPIEUP-I-RIEULHIEUH
+98A3 C0A2 # HANGUL SYLLABLE SSANGPIEUP-I-PIEUPSIOS
+98A4 C0A4 # HANGUL SYLLABLE SSANGPIEUP-I-SSANGSIOS
+98A5 C0A6 # HANGUL SYLLABLE SSANGPIEUP-I-CIEUC
+98A6 C0A7 # HANGUL SYLLABLE SSANGPIEUP-I-CHIEUCH
+98A7 C0A8 # HANGUL SYLLABLE SSANGPIEUP-I-KHIEUKH
+98A8 C0A9 # HANGUL SYLLABLE SSANGPIEUP-I-THIEUTH
+98A9 C0AA # HANGUL SYLLABLE SSANGPIEUP-I-PHIEUPH
+98AA C0AB # HANGUL SYLLABLE SSANGPIEUP-I-HIEUH
+98AB C0AE # HANGUL SYLLABLE SIOS-A-SSANGKIYEOK
+98AC C0B1 # HANGUL SYLLABLE SIOS-A-NIEUNCIEUC
+98AD C0B2 # HANGUL SYLLABLE SIOS-A-NIEUNHIEUH
+98AE C0B7 # HANGUL SYLLABLE SIOS-A-RIEULPIEUP
+98AF C0B8 # HANGUL SYLLABLE SIOS-A-RIEULSIOS
+98B0 C0B9 # HANGUL SYLLABLE SIOS-A-RIEULTHIEUTH
+98B1 C0BA # HANGUL SYLLABLE SIOS-A-RIEULPHIEUPH
+98B2 C0BB # HANGUL SYLLABLE SIOS-A-RIEULHIEUH
+98B3 C0BE # HANGUL SYLLABLE SIOS-A-PIEUPSIOS
+98B4 C0C2 # HANGUL SYLLABLE SIOS-A-CIEUC
+98B5 C0C3 # HANGUL SYLLABLE SIOS-A-CHIEUCH
+98B6 C0C4 # HANGUL SYLLABLE SIOS-A-KHIEUKH
+98B7 C0C6 # HANGUL SYLLABLE SIOS-A-PHIEUPH
+98B8 C0C7 # HANGUL SYLLABLE SIOS-A-HIEUH
+98B9 C0CA # HANGUL SYLLABLE SIOS-AE-SSANGKIYEOK
+98BA C0CB # HANGUL SYLLABLE SIOS-AE-KIYEOKSIOS
+98BB C0CD # HANGUL SYLLABLE SIOS-AE-NIEUNCIEUC
+98BC C0CE # HANGUL SYLLABLE SIOS-AE-NIEUNHIEUH
+98BD C0CF # HANGUL SYLLABLE SIOS-AE-TIKEUT
+98BE C0D1 # HANGUL SYLLABLE SIOS-AE-RIEULKIYEOK
+98BF C0D2 # HANGUL SYLLABLE SIOS-AE-RIEULMIEUM
+98C0 C0D3 # HANGUL SYLLABLE SIOS-AE-RIEULPIEUP
+98C1 C0D4 # HANGUL SYLLABLE SIOS-AE-RIEULSIOS
+98C2 C0D5 # HANGUL SYLLABLE SIOS-AE-RIEULTHIEUTH
+98C3 C0D6 # HANGUL SYLLABLE SIOS-AE-RIEULPHIEUPH
+98C4 C0D7 # HANGUL SYLLABLE SIOS-AE-RIEULHIEUH
+98C5 C0DA # HANGUL SYLLABLE SIOS-AE-PIEUPSIOS
+98C6 C0DE # HANGUL SYLLABLE SIOS-AE-CIEUC
+98C7 C0DF # HANGUL SYLLABLE SIOS-AE-CHIEUCH
+98C8 C0E0 # HANGUL SYLLABLE SIOS-AE-KHIEUKH
+98C9 C0E1 # HANGUL SYLLABLE SIOS-AE-THIEUTH
+98CA C0E2 # HANGUL SYLLABLE SIOS-AE-PHIEUPH
+98CB C0E3 # HANGUL SYLLABLE SIOS-AE-HIEUH
+98CC C0E6 # HANGUL SYLLABLE SIOS-YA-SSANGKIYEOK
+98CD C0E7 # HANGUL SYLLABLE SIOS-YA-KIYEOKSIOS
+98CE C0E9 # HANGUL SYLLABLE SIOS-YA-NIEUNCIEUC
+98CF C0EA # HANGUL SYLLABLE SIOS-YA-NIEUNHIEUH
+98D0 C0EB # HANGUL SYLLABLE SIOS-YA-TIKEUT
+98D1 C0ED # HANGUL SYLLABLE SIOS-YA-RIEULKIYEOK
+98D2 C0EE # HANGUL SYLLABLE SIOS-YA-RIEULMIEUM
+98D3 C0EF # HANGUL SYLLABLE SIOS-YA-RIEULPIEUP
+98D4 C0F0 # HANGUL SYLLABLE SIOS-YA-RIEULSIOS
+98D5 C0F1 # HANGUL SYLLABLE SIOS-YA-RIEULTHIEUTH
+98D6 C0F2 # HANGUL SYLLABLE SIOS-YA-RIEULPHIEUPH
+98D7 C0F3 # HANGUL SYLLABLE SIOS-YA-RIEULHIEUH
+98D8 C0F6 # HANGUL SYLLABLE SIOS-YA-PIEUPSIOS
+98D9 C0F8 # HANGUL SYLLABLE SIOS-YA-SSANGSIOS
+98DA C0FA # HANGUL SYLLABLE SIOS-YA-CIEUC
+98DB C0FB # HANGUL SYLLABLE SIOS-YA-CHIEUCH
+98DC C0FC # HANGUL SYLLABLE SIOS-YA-KHIEUKH
+98DD C0FD # HANGUL SYLLABLE SIOS-YA-THIEUTH
+98DE C0FE # HANGUL SYLLABLE SIOS-YA-PHIEUPH
+98DF C0FF # HANGUL SYLLABLE SIOS-YA-HIEUH
+98E0 C101 # HANGUL SYLLABLE SIOS-YAE-KIYEOK
+98E1 C102 # HANGUL SYLLABLE SIOS-YAE-SSANGKIYEOK
+98E2 C103 # HANGUL SYLLABLE SIOS-YAE-KIYEOKSIOS
+98E3 C105 # HANGUL SYLLABLE SIOS-YAE-NIEUNCIEUC
+98E4 C106 # HANGUL SYLLABLE SIOS-YAE-NIEUNHIEUH
+98E5 C107 # HANGUL SYLLABLE SIOS-YAE-TIKEUT
+98E6 C109 # HANGUL SYLLABLE SIOS-YAE-RIEULKIYEOK
+98E7 C10A # HANGUL SYLLABLE SIOS-YAE-RIEULMIEUM
+98E8 C10B # HANGUL SYLLABLE SIOS-YAE-RIEULPIEUP
+98E9 C10C # HANGUL SYLLABLE SIOS-YAE-RIEULSIOS
+98EA C10D # HANGUL SYLLABLE SIOS-YAE-RIEULTHIEUTH
+98EB C10E # HANGUL SYLLABLE SIOS-YAE-RIEULPHIEUPH
+98EC C10F # HANGUL SYLLABLE SIOS-YAE-RIEULHIEUH
+98ED C111 # HANGUL SYLLABLE SIOS-YAE-PIEUP
+98EE C112 # HANGUL SYLLABLE SIOS-YAE-PIEUPSIOS
+98EF C113 # HANGUL SYLLABLE SIOS-YAE-SIOS
+98F0 C114 # HANGUL SYLLABLE SIOS-YAE-SSANGSIOS
+98F1 C116 # HANGUL SYLLABLE SIOS-YAE-CIEUC
+98F2 C117 # HANGUL SYLLABLE SIOS-YAE-CHIEUCH
+98F3 C118 # HANGUL SYLLABLE SIOS-YAE-KHIEUKH
+98F4 C119 # HANGUL SYLLABLE SIOS-YAE-THIEUTH
+98F5 C11A # HANGUL SYLLABLE SIOS-YAE-PHIEUPH
+98F6 C11B # HANGUL SYLLABLE SIOS-YAE-HIEUH
+98F7 C121 # HANGUL SYLLABLE SIOS-EO-NIEUNCIEUC
+98F8 C122 # HANGUL SYLLABLE SIOS-EO-NIEUNHIEUH
+98F9 C125 # HANGUL SYLLABLE SIOS-EO-RIEULKIYEOK
+98FA C128 # HANGUL SYLLABLE SIOS-EO-RIEULSIOS
+98FB C129 # HANGUL SYLLABLE SIOS-EO-RIEULTHIEUTH
+98FC C12A # HANGUL SYLLABLE SIOS-EO-RIEULPHIEUPH
+98FD C12B # HANGUL SYLLABLE SIOS-EO-RIEULHIEUH
+98FE C12E # HANGUL SYLLABLE SIOS-EO-PIEUPSIOS
+9941 C132 # HANGUL SYLLABLE SIOS-EO-CIEUC
+9942 C133 # HANGUL SYLLABLE SIOS-EO-CHIEUCH
+9943 C134 # HANGUL SYLLABLE SIOS-EO-KHIEUKH
+9944 C135 # HANGUL SYLLABLE SIOS-EO-THIEUTH
+9945 C137 # HANGUL SYLLABLE SIOS-EO-HIEUH
+9946 C13A # HANGUL SYLLABLE SIOS-E-SSANGKIYEOK
+9947 C13B # HANGUL SYLLABLE SIOS-E-KIYEOKSIOS
+9948 C13D # HANGUL SYLLABLE SIOS-E-NIEUNCIEUC
+9949 C13E # HANGUL SYLLABLE SIOS-E-NIEUNHIEUH
+994A C13F # HANGUL SYLLABLE SIOS-E-TIKEUT
+994B C141 # HANGUL SYLLABLE SIOS-E-RIEULKIYEOK
+994C C142 # HANGUL SYLLABLE SIOS-E-RIEULMIEUM
+994D C143 # HANGUL SYLLABLE SIOS-E-RIEULPIEUP
+994E C144 # HANGUL SYLLABLE SIOS-E-RIEULSIOS
+994F C145 # HANGUL SYLLABLE SIOS-E-RIEULTHIEUTH
+9950 C146 # HANGUL SYLLABLE SIOS-E-RIEULPHIEUPH
+9951 C147 # HANGUL SYLLABLE SIOS-E-RIEULHIEUH
+9952 C14A # HANGUL SYLLABLE SIOS-E-PIEUPSIOS
+9953 C14E # HANGUL SYLLABLE SIOS-E-CIEUC
+9954 C14F # HANGUL SYLLABLE SIOS-E-CHIEUCH
+9955 C150 # HANGUL SYLLABLE SIOS-E-KHIEUKH
+9956 C151 # HANGUL SYLLABLE SIOS-E-THIEUTH
+9957 C152 # HANGUL SYLLABLE SIOS-E-PHIEUPH
+9958 C153 # HANGUL SYLLABLE SIOS-E-HIEUH
+9959 C156 # HANGUL SYLLABLE SIOS-YEO-SSANGKIYEOK
+995A C157 # HANGUL SYLLABLE SIOS-YEO-KIYEOKSIOS
+9961 C159 # HANGUL SYLLABLE SIOS-YEO-NIEUNCIEUC
+9962 C15A # HANGUL SYLLABLE SIOS-YEO-NIEUNHIEUH
+9963 C15B # HANGUL SYLLABLE SIOS-YEO-TIKEUT
+9964 C15D # HANGUL SYLLABLE SIOS-YEO-RIEULKIYEOK
+9965 C15E # HANGUL SYLLABLE SIOS-YEO-RIEULMIEUM
+9966 C15F # HANGUL SYLLABLE SIOS-YEO-RIEULPIEUP
+9967 C160 # HANGUL SYLLABLE SIOS-YEO-RIEULSIOS
+9968 C161 # HANGUL SYLLABLE SIOS-YEO-RIEULTHIEUTH
+9969 C162 # HANGUL SYLLABLE SIOS-YEO-RIEULPHIEUPH
+996A C163 # HANGUL SYLLABLE SIOS-YEO-RIEULHIEUH
+996B C166 # HANGUL SYLLABLE SIOS-YEO-PIEUPSIOS
+996C C16A # HANGUL SYLLABLE SIOS-YEO-CIEUC
+996D C16B # HANGUL SYLLABLE SIOS-YEO-CHIEUCH
+996E C16C # HANGUL SYLLABLE SIOS-YEO-KHIEUKH
+996F C16D # HANGUL SYLLABLE SIOS-YEO-THIEUTH
+9970 C16E # HANGUL SYLLABLE SIOS-YEO-PHIEUPH
+9971 C16F # HANGUL SYLLABLE SIOS-YEO-HIEUH
+9972 C171 # HANGUL SYLLABLE SIOS-YE-KIYEOK
+9973 C172 # HANGUL SYLLABLE SIOS-YE-SSANGKIYEOK
+9974 C173 # HANGUL SYLLABLE SIOS-YE-KIYEOKSIOS
+9975 C175 # HANGUL SYLLABLE SIOS-YE-NIEUNCIEUC
+9976 C176 # HANGUL SYLLABLE SIOS-YE-NIEUNHIEUH
+9977 C177 # HANGUL SYLLABLE SIOS-YE-TIKEUT
+9978 C179 # HANGUL SYLLABLE SIOS-YE-RIEULKIYEOK
+9979 C17A # HANGUL SYLLABLE SIOS-YE-RIEULMIEUM
+997A C17B # HANGUL SYLLABLE SIOS-YE-RIEULPIEUP
+9981 C17C # HANGUL SYLLABLE SIOS-YE-RIEULSIOS
+9982 C17D # HANGUL SYLLABLE SIOS-YE-RIEULTHIEUTH
+9983 C17E # HANGUL SYLLABLE SIOS-YE-RIEULPHIEUPH
+9984 C17F # HANGUL SYLLABLE SIOS-YE-RIEULHIEUH
+9985 C180 # HANGUL SYLLABLE SIOS-YE-MIEUM
+9986 C181 # HANGUL SYLLABLE SIOS-YE-PIEUP
+9987 C182 # HANGUL SYLLABLE SIOS-YE-PIEUPSIOS
+9988 C183 # HANGUL SYLLABLE SIOS-YE-SIOS
+9989 C184 # HANGUL SYLLABLE SIOS-YE-SSANGSIOS
+998A C186 # HANGUL SYLLABLE SIOS-YE-CIEUC
+998B C187 # HANGUL SYLLABLE SIOS-YE-CHIEUCH
+998C C188 # HANGUL SYLLABLE SIOS-YE-KHIEUKH
+998D C189 # HANGUL SYLLABLE SIOS-YE-THIEUTH
+998E C18A # HANGUL SYLLABLE SIOS-YE-PHIEUPH
+998F C18B # HANGUL SYLLABLE SIOS-YE-HIEUH
+9990 C18F # HANGUL SYLLABLE SIOS-O-KIYEOKSIOS
+9991 C191 # HANGUL SYLLABLE SIOS-O-NIEUNCIEUC
+9992 C192 # HANGUL SYLLABLE SIOS-O-NIEUNHIEUH
+9993 C193 # HANGUL SYLLABLE SIOS-O-TIKEUT
+9994 C195 # HANGUL SYLLABLE SIOS-O-RIEULKIYEOK
+9995 C197 # HANGUL SYLLABLE SIOS-O-RIEULPIEUP
+9996 C198 # HANGUL SYLLABLE SIOS-O-RIEULSIOS
+9997 C199 # HANGUL SYLLABLE SIOS-O-RIEULTHIEUTH
+9998 C19A # HANGUL SYLLABLE SIOS-O-RIEULPHIEUPH
+9999 C19B # HANGUL SYLLABLE SIOS-O-RIEULHIEUH
+999A C19E # HANGUL SYLLABLE SIOS-O-PIEUPSIOS
+999B C1A0 # HANGUL SYLLABLE SIOS-O-SSANGSIOS
+999C C1A2 # HANGUL SYLLABLE SIOS-O-CIEUC
+999D C1A3 # HANGUL SYLLABLE SIOS-O-CHIEUCH
+999E C1A4 # HANGUL SYLLABLE SIOS-O-KHIEUKH
+999F C1A6 # HANGUL SYLLABLE SIOS-O-PHIEUPH
+99A0 C1A7 # HANGUL SYLLABLE SIOS-O-HIEUH
+99A1 C1AA # HANGUL SYLLABLE SIOS-WA-SSANGKIYEOK
+99A2 C1AB # HANGUL SYLLABLE SIOS-WA-KIYEOKSIOS
+99A3 C1AD # HANGUL SYLLABLE SIOS-WA-NIEUNCIEUC
+99A4 C1AE # HANGUL SYLLABLE SIOS-WA-NIEUNHIEUH
+99A5 C1AF # HANGUL SYLLABLE SIOS-WA-TIKEUT
+99A6 C1B1 # HANGUL SYLLABLE SIOS-WA-RIEULKIYEOK
+99A7 C1B2 # HANGUL SYLLABLE SIOS-WA-RIEULMIEUM
+99A8 C1B3 # HANGUL SYLLABLE SIOS-WA-RIEULPIEUP
+99A9 C1B4 # HANGUL SYLLABLE SIOS-WA-RIEULSIOS
+99AA C1B5 # HANGUL SYLLABLE SIOS-WA-RIEULTHIEUTH
+99AB C1B6 # HANGUL SYLLABLE SIOS-WA-RIEULPHIEUPH
+99AC C1B7 # HANGUL SYLLABLE SIOS-WA-RIEULHIEUH
+99AD C1B8 # HANGUL SYLLABLE SIOS-WA-MIEUM
+99AE C1B9 # HANGUL SYLLABLE SIOS-WA-PIEUP
+99AF C1BA # HANGUL SYLLABLE SIOS-WA-PIEUPSIOS
+99B0 C1BB # HANGUL SYLLABLE SIOS-WA-SIOS
+99B1 C1BC # HANGUL SYLLABLE SIOS-WA-SSANGSIOS
+99B2 C1BE # HANGUL SYLLABLE SIOS-WA-CIEUC
+99B3 C1BF # HANGUL SYLLABLE SIOS-WA-CHIEUCH
+99B4 C1C0 # HANGUL SYLLABLE SIOS-WA-KHIEUKH
+99B5 C1C1 # HANGUL SYLLABLE SIOS-WA-THIEUTH
+99B6 C1C2 # HANGUL SYLLABLE SIOS-WA-PHIEUPH
+99B7 C1C3 # HANGUL SYLLABLE SIOS-WA-HIEUH
+99B8 C1C5 # HANGUL SYLLABLE SIOS-WAE-KIYEOK
+99B9 C1C6 # HANGUL SYLLABLE SIOS-WAE-SSANGKIYEOK
+99BA C1C7 # HANGUL SYLLABLE SIOS-WAE-KIYEOKSIOS
+99BB C1C9 # HANGUL SYLLABLE SIOS-WAE-NIEUNCIEUC
+99BC C1CA # HANGUL SYLLABLE SIOS-WAE-NIEUNHIEUH
+99BD C1CB # HANGUL SYLLABLE SIOS-WAE-TIKEUT
+99BE C1CD # HANGUL SYLLABLE SIOS-WAE-RIEULKIYEOK
+99BF C1CE # HANGUL SYLLABLE SIOS-WAE-RIEULMIEUM
+99C0 C1CF # HANGUL SYLLABLE SIOS-WAE-RIEULPIEUP
+99C1 C1D0 # HANGUL SYLLABLE SIOS-WAE-RIEULSIOS
+99C2 C1D1 # HANGUL SYLLABLE SIOS-WAE-RIEULTHIEUTH
+99C3 C1D2 # HANGUL SYLLABLE SIOS-WAE-RIEULPHIEUPH
+99C4 C1D3 # HANGUL SYLLABLE SIOS-WAE-RIEULHIEUH
+99C5 C1D5 # HANGUL SYLLABLE SIOS-WAE-PIEUP
+99C6 C1D6 # HANGUL SYLLABLE SIOS-WAE-PIEUPSIOS
+99C7 C1D9 # HANGUL SYLLABLE SIOS-WAE-IEUNG
+99C8 C1DA # HANGUL SYLLABLE SIOS-WAE-CIEUC
+99C9 C1DB # HANGUL SYLLABLE SIOS-WAE-CHIEUCH
+99CA C1DC # HANGUL SYLLABLE SIOS-WAE-KHIEUKH
+99CB C1DD # HANGUL SYLLABLE SIOS-WAE-THIEUTH
+99CC C1DE # HANGUL SYLLABLE SIOS-WAE-PHIEUPH
+99CD C1DF # HANGUL SYLLABLE SIOS-WAE-HIEUH
+99CE C1E1 # HANGUL SYLLABLE SIOS-OE-KIYEOK
+99CF C1E2 # HANGUL SYLLABLE SIOS-OE-SSANGKIYEOK
+99D0 C1E3 # HANGUL SYLLABLE SIOS-OE-KIYEOKSIOS
+99D1 C1E5 # HANGUL SYLLABLE SIOS-OE-NIEUNCIEUC
+99D2 C1E6 # HANGUL SYLLABLE SIOS-OE-NIEUNHIEUH
+99D3 C1E7 # HANGUL SYLLABLE SIOS-OE-TIKEUT
+99D4 C1E9 # HANGUL SYLLABLE SIOS-OE-RIEULKIYEOK
+99D5 C1EA # HANGUL SYLLABLE SIOS-OE-RIEULMIEUM
+99D6 C1EB # HANGUL SYLLABLE SIOS-OE-RIEULPIEUP
+99D7 C1EC # HANGUL SYLLABLE SIOS-OE-RIEULSIOS
+99D8 C1ED # HANGUL SYLLABLE SIOS-OE-RIEULTHIEUTH
+99D9 C1EE # HANGUL SYLLABLE SIOS-OE-RIEULPHIEUPH
+99DA C1EF # HANGUL SYLLABLE SIOS-OE-RIEULHIEUH
+99DB C1F2 # HANGUL SYLLABLE SIOS-OE-PIEUPSIOS
+99DC C1F4 # HANGUL SYLLABLE SIOS-OE-SSANGSIOS
+99DD C1F5 # HANGUL SYLLABLE SIOS-OE-IEUNG
+99DE C1F6 # HANGUL SYLLABLE SIOS-OE-CIEUC
+99DF C1F7 # HANGUL SYLLABLE SIOS-OE-CHIEUCH
+99E0 C1F8 # HANGUL SYLLABLE SIOS-OE-KHIEUKH
+99E1 C1F9 # HANGUL SYLLABLE SIOS-OE-THIEUTH
+99E2 C1FA # HANGUL SYLLABLE SIOS-OE-PHIEUPH
+99E3 C1FB # HANGUL SYLLABLE SIOS-OE-HIEUH
+99E4 C1FE # HANGUL SYLLABLE SIOS-YO-SSANGKIYEOK
+99E5 C1FF # HANGUL SYLLABLE SIOS-YO-KIYEOKSIOS
+99E6 C201 # HANGUL SYLLABLE SIOS-YO-NIEUNCIEUC
+99E7 C202 # HANGUL SYLLABLE SIOS-YO-NIEUNHIEUH
+99E8 C203 # HANGUL SYLLABLE SIOS-YO-TIKEUT
+99E9 C205 # HANGUL SYLLABLE SIOS-YO-RIEULKIYEOK
+99EA C206 # HANGUL SYLLABLE SIOS-YO-RIEULMIEUM
+99EB C207 # HANGUL SYLLABLE SIOS-YO-RIEULPIEUP
+99EC C208 # HANGUL SYLLABLE SIOS-YO-RIEULSIOS
+99ED C209 # HANGUL SYLLABLE SIOS-YO-RIEULTHIEUTH
+99EE C20A # HANGUL SYLLABLE SIOS-YO-RIEULPHIEUPH
+99EF C20B # HANGUL SYLLABLE SIOS-YO-RIEULHIEUH
+99F0 C20E # HANGUL SYLLABLE SIOS-YO-PIEUPSIOS
+99F1 C210 # HANGUL SYLLABLE SIOS-YO-SSANGSIOS
+99F2 C212 # HANGUL SYLLABLE SIOS-YO-CIEUC
+99F3 C213 # HANGUL SYLLABLE SIOS-YO-CHIEUCH
+99F4 C214 # HANGUL SYLLABLE SIOS-YO-KHIEUKH
+99F5 C215 # HANGUL SYLLABLE SIOS-YO-THIEUTH
+99F6 C216 # HANGUL SYLLABLE SIOS-YO-PHIEUPH
+99F7 C217 # HANGUL SYLLABLE SIOS-YO-HIEUH
+99F8 C21A # HANGUL SYLLABLE SIOS-U-SSANGKIYEOK
+99F9 C21B # HANGUL SYLLABLE SIOS-U-KIYEOKSIOS
+99FA C21D # HANGUL SYLLABLE SIOS-U-NIEUNCIEUC
+99FB C21E # HANGUL SYLLABLE SIOS-U-NIEUNHIEUH
+99FC C221 # HANGUL SYLLABLE SIOS-U-RIEULKIYEOK
+99FD C222 # HANGUL SYLLABLE SIOS-U-RIEULMIEUM
+99FE C223 # HANGUL SYLLABLE SIOS-U-RIEULPIEUP
+9A41 C224 # HANGUL SYLLABLE SIOS-U-RIEULSIOS
+9A42 C225 # HANGUL SYLLABLE SIOS-U-RIEULTHIEUTH
+9A43 C226 # HANGUL SYLLABLE SIOS-U-RIEULPHIEUPH
+9A44 C227 # HANGUL SYLLABLE SIOS-U-RIEULHIEUH
+9A45 C22A # HANGUL SYLLABLE SIOS-U-PIEUPSIOS
+9A46 C22C # HANGUL SYLLABLE SIOS-U-SSANGSIOS
+9A47 C22E # HANGUL SYLLABLE SIOS-U-CIEUC
+9A48 C230 # HANGUL SYLLABLE SIOS-U-KHIEUKH
+9A49 C233 # HANGUL SYLLABLE SIOS-U-HIEUH
+9A4A C235 # HANGUL SYLLABLE SIOS-WEO-KIYEOK
+9A4B C236 # HANGUL SYLLABLE SIOS-WEO-SSANGKIYEOK
+9A4C C237 # HANGUL SYLLABLE SIOS-WEO-KIYEOKSIOS
+9A4D C238 # HANGUL SYLLABLE SIOS-WEO-NIEUN
+9A4E C239 # HANGUL SYLLABLE SIOS-WEO-NIEUNCIEUC
+9A4F C23A # HANGUL SYLLABLE SIOS-WEO-NIEUNHIEUH
+9A50 C23B # HANGUL SYLLABLE SIOS-WEO-TIKEUT
+9A51 C23C # HANGUL SYLLABLE SIOS-WEO-RIEUL
+9A52 C23D # HANGUL SYLLABLE SIOS-WEO-RIEULKIYEOK
+9A53 C23E # HANGUL SYLLABLE SIOS-WEO-RIEULMIEUM
+9A54 C23F # HANGUL SYLLABLE SIOS-WEO-RIEULPIEUP
+9A55 C240 # HANGUL SYLLABLE SIOS-WEO-RIEULSIOS
+9A56 C241 # HANGUL SYLLABLE SIOS-WEO-RIEULTHIEUTH
+9A57 C242 # HANGUL SYLLABLE SIOS-WEO-RIEULPHIEUPH
+9A58 C243 # HANGUL SYLLABLE SIOS-WEO-RIEULHIEUH
+9A59 C244 # HANGUL SYLLABLE SIOS-WEO-MIEUM
+9A5A C245 # HANGUL SYLLABLE SIOS-WEO-PIEUP
+9A61 C246 # HANGUL SYLLABLE SIOS-WEO-PIEUPSIOS
+9A62 C247 # HANGUL SYLLABLE SIOS-WEO-SIOS
+9A63 C249 # HANGUL SYLLABLE SIOS-WEO-IEUNG
+9A64 C24A # HANGUL SYLLABLE SIOS-WEO-CIEUC
+9A65 C24B # HANGUL SYLLABLE SIOS-WEO-CHIEUCH
+9A66 C24C # HANGUL SYLLABLE SIOS-WEO-KHIEUKH
+9A67 C24D # HANGUL SYLLABLE SIOS-WEO-THIEUTH
+9A68 C24E # HANGUL SYLLABLE SIOS-WEO-PHIEUPH
+9A69 C24F # HANGUL SYLLABLE SIOS-WEO-HIEUH
+9A6A C252 # HANGUL SYLLABLE SIOS-WE-SSANGKIYEOK
+9A6B C253 # HANGUL SYLLABLE SIOS-WE-KIYEOKSIOS
+9A6C C255 # HANGUL SYLLABLE SIOS-WE-NIEUNCIEUC
+9A6D C256 # HANGUL SYLLABLE SIOS-WE-NIEUNHIEUH
+9A6E C257 # HANGUL SYLLABLE SIOS-WE-TIKEUT
+9A6F C259 # HANGUL SYLLABLE SIOS-WE-RIEULKIYEOK
+9A70 C25A # HANGUL SYLLABLE SIOS-WE-RIEULMIEUM
+9A71 C25B # HANGUL SYLLABLE SIOS-WE-RIEULPIEUP
+9A72 C25C # HANGUL SYLLABLE SIOS-WE-RIEULSIOS
+9A73 C25D # HANGUL SYLLABLE SIOS-WE-RIEULTHIEUTH
+9A74 C25E # HANGUL SYLLABLE SIOS-WE-RIEULPHIEUPH
+9A75 C25F # HANGUL SYLLABLE SIOS-WE-RIEULHIEUH
+9A76 C261 # HANGUL SYLLABLE SIOS-WE-PIEUP
+9A77 C262 # HANGUL SYLLABLE SIOS-WE-PIEUPSIOS
+9A78 C263 # HANGUL SYLLABLE SIOS-WE-SIOS
+9A79 C264 # HANGUL SYLLABLE SIOS-WE-SSANGSIOS
+9A7A C266 # HANGUL SYLLABLE SIOS-WE-CIEUC
+9A81 C267 # HANGUL SYLLABLE SIOS-WE-CHIEUCH
+9A82 C268 # HANGUL SYLLABLE SIOS-WE-KHIEUKH
+9A83 C269 # HANGUL SYLLABLE SIOS-WE-THIEUTH
+9A84 C26A # HANGUL SYLLABLE SIOS-WE-PHIEUPH
+9A85 C26B # HANGUL SYLLABLE SIOS-WE-HIEUH
+9A86 C26E # HANGUL SYLLABLE SIOS-WI-SSANGKIYEOK
+9A87 C26F # HANGUL SYLLABLE SIOS-WI-KIYEOKSIOS
+9A88 C271 # HANGUL SYLLABLE SIOS-WI-NIEUNCIEUC
+9A89 C272 # HANGUL SYLLABLE SIOS-WI-NIEUNHIEUH
+9A8A C273 # HANGUL SYLLABLE SIOS-WI-TIKEUT
+9A8B C275 # HANGUL SYLLABLE SIOS-WI-RIEULKIYEOK
+9A8C C276 # HANGUL SYLLABLE SIOS-WI-RIEULMIEUM
+9A8D C277 # HANGUL SYLLABLE SIOS-WI-RIEULPIEUP
+9A8E C278 # HANGUL SYLLABLE SIOS-WI-RIEULSIOS
+9A8F C279 # HANGUL SYLLABLE SIOS-WI-RIEULTHIEUTH
+9A90 C27A # HANGUL SYLLABLE SIOS-WI-RIEULPHIEUPH
+9A91 C27B # HANGUL SYLLABLE SIOS-WI-RIEULHIEUH
+9A92 C27E # HANGUL SYLLABLE SIOS-WI-PIEUPSIOS
+9A93 C280 # HANGUL SYLLABLE SIOS-WI-SSANGSIOS
+9A94 C282 # HANGUL SYLLABLE SIOS-WI-CIEUC
+9A95 C283 # HANGUL SYLLABLE SIOS-WI-CHIEUCH
+9A96 C284 # HANGUL SYLLABLE SIOS-WI-KHIEUKH
+9A97 C285 # HANGUL SYLLABLE SIOS-WI-THIEUTH
+9A98 C286 # HANGUL SYLLABLE SIOS-WI-PHIEUPH
+9A99 C287 # HANGUL SYLLABLE SIOS-WI-HIEUH
+9A9A C28A # HANGUL SYLLABLE SIOS-YU-SSANGKIYEOK
+9A9B C28B # HANGUL SYLLABLE SIOS-YU-KIYEOKSIOS
+9A9C C28C # HANGUL SYLLABLE SIOS-YU-NIEUN
+9A9D C28D # HANGUL SYLLABLE SIOS-YU-NIEUNCIEUC
+9A9E C28E # HANGUL SYLLABLE SIOS-YU-NIEUNHIEUH
+9A9F C28F # HANGUL SYLLABLE SIOS-YU-TIKEUT
+9AA0 C291 # HANGUL SYLLABLE SIOS-YU-RIEULKIYEOK
+9AA1 C292 # HANGUL SYLLABLE SIOS-YU-RIEULMIEUM
+9AA2 C293 # HANGUL SYLLABLE SIOS-YU-RIEULPIEUP
+9AA3 C294 # HANGUL SYLLABLE SIOS-YU-RIEULSIOS
+9AA4 C295 # HANGUL SYLLABLE SIOS-YU-RIEULTHIEUTH
+9AA5 C296 # HANGUL SYLLABLE SIOS-YU-RIEULPHIEUPH
+9AA6 C297 # HANGUL SYLLABLE SIOS-YU-RIEULHIEUH
+9AA7 C299 # HANGUL SYLLABLE SIOS-YU-PIEUP
+9AA8 C29A # HANGUL SYLLABLE SIOS-YU-PIEUPSIOS
+9AA9 C29C # HANGUL SYLLABLE SIOS-YU-SSANGSIOS
+9AAA C29E # HANGUL SYLLABLE SIOS-YU-CIEUC
+9AAB C29F # HANGUL SYLLABLE SIOS-YU-CHIEUCH
+9AAC C2A0 # HANGUL SYLLABLE SIOS-YU-KHIEUKH
+9AAD C2A1 # HANGUL SYLLABLE SIOS-YU-THIEUTH
+9AAE C2A2 # HANGUL SYLLABLE SIOS-YU-PHIEUPH
+9AAF C2A3 # HANGUL SYLLABLE SIOS-YU-HIEUH
+9AB0 C2A6 # HANGUL SYLLABLE SIOS-EU-SSANGKIYEOK
+9AB1 C2A7 # HANGUL SYLLABLE SIOS-EU-KIYEOKSIOS
+9AB2 C2A9 # HANGUL SYLLABLE SIOS-EU-NIEUNCIEUC
+9AB3 C2AA # HANGUL SYLLABLE SIOS-EU-NIEUNHIEUH
+9AB4 C2AB # HANGUL SYLLABLE SIOS-EU-TIKEUT
+9AB5 C2AE # HANGUL SYLLABLE SIOS-EU-RIEULMIEUM
+9AB6 C2AF # HANGUL SYLLABLE SIOS-EU-RIEULPIEUP
+9AB7 C2B0 # HANGUL SYLLABLE SIOS-EU-RIEULSIOS
+9AB8 C2B1 # HANGUL SYLLABLE SIOS-EU-RIEULTHIEUTH
+9AB9 C2B2 # HANGUL SYLLABLE SIOS-EU-RIEULPHIEUPH
+9ABA C2B3 # HANGUL SYLLABLE SIOS-EU-RIEULHIEUH
+9ABB C2B6 # HANGUL SYLLABLE SIOS-EU-PIEUPSIOS
+9ABC C2B8 # HANGUL SYLLABLE SIOS-EU-SSANGSIOS
+9ABD C2BA # HANGUL SYLLABLE SIOS-EU-CIEUC
+9ABE C2BB # HANGUL SYLLABLE SIOS-EU-CHIEUCH
+9ABF C2BC # HANGUL SYLLABLE SIOS-EU-KHIEUKH
+9AC0 C2BD # HANGUL SYLLABLE SIOS-EU-THIEUTH
+9AC1 C2BE # HANGUL SYLLABLE SIOS-EU-PHIEUPH
+9AC2 C2BF # HANGUL SYLLABLE SIOS-EU-HIEUH
+9AC3 C2C0 # HANGUL SYLLABLE SIOS-YI
+9AC4 C2C1 # HANGUL SYLLABLE SIOS-YI-KIYEOK
+9AC5 C2C2 # HANGUL SYLLABLE SIOS-YI-SSANGKIYEOK
+9AC6 C2C3 # HANGUL SYLLABLE SIOS-YI-KIYEOKSIOS
+9AC7 C2C4 # HANGUL SYLLABLE SIOS-YI-NIEUN
+9AC8 C2C5 # HANGUL SYLLABLE SIOS-YI-NIEUNCIEUC
+9AC9 C2C6 # HANGUL SYLLABLE SIOS-YI-NIEUNHIEUH
+9ACA C2C7 # HANGUL SYLLABLE SIOS-YI-TIKEUT
+9ACB C2C8 # HANGUL SYLLABLE SIOS-YI-RIEUL
+9ACC C2C9 # HANGUL SYLLABLE SIOS-YI-RIEULKIYEOK
+9ACD C2CA # HANGUL SYLLABLE SIOS-YI-RIEULMIEUM
+9ACE C2CB # HANGUL SYLLABLE SIOS-YI-RIEULPIEUP
+9ACF C2CC # HANGUL SYLLABLE SIOS-YI-RIEULSIOS
+9AD0 C2CD # HANGUL SYLLABLE SIOS-YI-RIEULTHIEUTH
+9AD1 C2CE # HANGUL SYLLABLE SIOS-YI-RIEULPHIEUPH
+9AD2 C2CF # HANGUL SYLLABLE SIOS-YI-RIEULHIEUH
+9AD3 C2D0 # HANGUL SYLLABLE SIOS-YI-MIEUM
+9AD4 C2D1 # HANGUL SYLLABLE SIOS-YI-PIEUP
+9AD5 C2D2 # HANGUL SYLLABLE SIOS-YI-PIEUPSIOS
+9AD6 C2D3 # HANGUL SYLLABLE SIOS-YI-SIOS
+9AD7 C2D4 # HANGUL SYLLABLE SIOS-YI-SSANGSIOS
+9AD8 C2D5 # HANGUL SYLLABLE SIOS-YI-IEUNG
+9AD9 C2D6 # HANGUL SYLLABLE SIOS-YI-CIEUC
+9ADA C2D7 # HANGUL SYLLABLE SIOS-YI-CHIEUCH
+9ADB C2D8 # HANGUL SYLLABLE SIOS-YI-KHIEUKH
+9ADC C2D9 # HANGUL SYLLABLE SIOS-YI-THIEUTH
+9ADD C2DA # HANGUL SYLLABLE SIOS-YI-PHIEUPH
+9ADE C2DB # HANGUL SYLLABLE SIOS-YI-HIEUH
+9ADF C2DE # HANGUL SYLLABLE SIOS-I-SSANGKIYEOK
+9AE0 C2DF # HANGUL SYLLABLE SIOS-I-KIYEOKSIOS
+9AE1 C2E1 # HANGUL SYLLABLE SIOS-I-NIEUNCIEUC
+9AE2 C2E2 # HANGUL SYLLABLE SIOS-I-NIEUNHIEUH
+9AE3 C2E5 # HANGUL SYLLABLE SIOS-I-RIEULKIYEOK
+9AE4 C2E6 # HANGUL SYLLABLE SIOS-I-RIEULMIEUM
+9AE5 C2E7 # HANGUL SYLLABLE SIOS-I-RIEULPIEUP
+9AE6 C2E8 # HANGUL SYLLABLE SIOS-I-RIEULSIOS
+9AE7 C2E9 # HANGUL SYLLABLE SIOS-I-RIEULTHIEUTH
+9AE8 C2EA # HANGUL SYLLABLE SIOS-I-RIEULPHIEUPH
+9AE9 C2EE # HANGUL SYLLABLE SIOS-I-PIEUPSIOS
+9AEA C2F0 # HANGUL SYLLABLE SIOS-I-SSANGSIOS
+9AEB C2F2 # HANGUL SYLLABLE SIOS-I-CIEUC
+9AEC C2F3 # HANGUL SYLLABLE SIOS-I-CHIEUCH
+9AED C2F4 # HANGUL SYLLABLE SIOS-I-KHIEUKH
+9AEE C2F5 # HANGUL SYLLABLE SIOS-I-THIEUTH
+9AEF C2F7 # HANGUL SYLLABLE SIOS-I-HIEUH
+9AF0 C2FA # HANGUL SYLLABLE SSANGSIOS-A-SSANGKIYEOK
+9AF1 C2FD # HANGUL SYLLABLE SSANGSIOS-A-NIEUNCIEUC
+9AF2 C2FE # HANGUL SYLLABLE SSANGSIOS-A-NIEUNHIEUH
+9AF3 C2FF # HANGUL SYLLABLE SSANGSIOS-A-TIKEUT
+9AF4 C301 # HANGUL SYLLABLE SSANGSIOS-A-RIEULKIYEOK
+9AF5 C302 # HANGUL SYLLABLE SSANGSIOS-A-RIEULMIEUM
+9AF6 C303 # HANGUL SYLLABLE SSANGSIOS-A-RIEULPIEUP
+9AF7 C304 # HANGUL SYLLABLE SSANGSIOS-A-RIEULSIOS
+9AF8 C305 # HANGUL SYLLABLE SSANGSIOS-A-RIEULTHIEUTH
+9AF9 C306 # HANGUL SYLLABLE SSANGSIOS-A-RIEULPHIEUPH
+9AFA C307 # HANGUL SYLLABLE SSANGSIOS-A-RIEULHIEUH
+9AFB C30A # HANGUL SYLLABLE SSANGSIOS-A-PIEUPSIOS
+9AFC C30B # HANGUL SYLLABLE SSANGSIOS-A-SIOS
+9AFD C30E # HANGUL SYLLABLE SSANGSIOS-A-CIEUC
+9AFE C30F # HANGUL SYLLABLE SSANGSIOS-A-CHIEUCH
+9B41 C310 # HANGUL SYLLABLE SSANGSIOS-A-KHIEUKH
+9B42 C311 # HANGUL SYLLABLE SSANGSIOS-A-THIEUTH
+9B43 C312 # HANGUL SYLLABLE SSANGSIOS-A-PHIEUPH
+9B44 C316 # HANGUL SYLLABLE SSANGSIOS-AE-SSANGKIYEOK
+9B45 C317 # HANGUL SYLLABLE SSANGSIOS-AE-KIYEOKSIOS
+9B46 C319 # HANGUL SYLLABLE SSANGSIOS-AE-NIEUNCIEUC
+9B47 C31A # HANGUL SYLLABLE SSANGSIOS-AE-NIEUNHIEUH
+9B48 C31B # HANGUL SYLLABLE SSANGSIOS-AE-TIKEUT
+9B49 C31D # HANGUL SYLLABLE SSANGSIOS-AE-RIEULKIYEOK
+9B4A C31E # HANGUL SYLLABLE SSANGSIOS-AE-RIEULMIEUM
+9B4B C31F # HANGUL SYLLABLE SSANGSIOS-AE-RIEULPIEUP
+9B4C C320 # HANGUL SYLLABLE SSANGSIOS-AE-RIEULSIOS
+9B4D C321 # HANGUL SYLLABLE SSANGSIOS-AE-RIEULTHIEUTH
+9B4E C322 # HANGUL SYLLABLE SSANGSIOS-AE-RIEULPHIEUPH
+9B4F C323 # HANGUL SYLLABLE SSANGSIOS-AE-RIEULHIEUH
+9B50 C326 # HANGUL SYLLABLE SSANGSIOS-AE-PIEUPSIOS
+9B51 C327 # HANGUL SYLLABLE SSANGSIOS-AE-SIOS
+9B52 C32A # HANGUL SYLLABLE SSANGSIOS-AE-CIEUC
+9B53 C32B # HANGUL SYLLABLE SSANGSIOS-AE-CHIEUCH
+9B54 C32C # HANGUL SYLLABLE SSANGSIOS-AE-KHIEUKH
+9B55 C32D # HANGUL SYLLABLE SSANGSIOS-AE-THIEUTH
+9B56 C32E # HANGUL SYLLABLE SSANGSIOS-AE-PHIEUPH
+9B57 C32F # HANGUL SYLLABLE SSANGSIOS-AE-HIEUH
+9B58 C330 # HANGUL SYLLABLE SSANGSIOS-YA
+9B59 C331 # HANGUL SYLLABLE SSANGSIOS-YA-KIYEOK
+9B5A C332 # HANGUL SYLLABLE SSANGSIOS-YA-SSANGKIYEOK
+9B61 C333 # HANGUL SYLLABLE SSANGSIOS-YA-KIYEOKSIOS
+9B62 C334 # HANGUL SYLLABLE SSANGSIOS-YA-NIEUN
+9B63 C335 # HANGUL SYLLABLE SSANGSIOS-YA-NIEUNCIEUC
+9B64 C336 # HANGUL SYLLABLE SSANGSIOS-YA-NIEUNHIEUH
+9B65 C337 # HANGUL SYLLABLE SSANGSIOS-YA-TIKEUT
+9B66 C338 # HANGUL SYLLABLE SSANGSIOS-YA-RIEUL
+9B67 C339 # HANGUL SYLLABLE SSANGSIOS-YA-RIEULKIYEOK
+9B68 C33A # HANGUL SYLLABLE SSANGSIOS-YA-RIEULMIEUM
+9B69 C33B # HANGUL SYLLABLE SSANGSIOS-YA-RIEULPIEUP
+9B6A C33C # HANGUL SYLLABLE SSANGSIOS-YA-RIEULSIOS
+9B6B C33D # HANGUL SYLLABLE SSANGSIOS-YA-RIEULTHIEUTH
+9B6C C33E # HANGUL SYLLABLE SSANGSIOS-YA-RIEULPHIEUPH
+9B6D C33F # HANGUL SYLLABLE SSANGSIOS-YA-RIEULHIEUH
+9B6E C340 # HANGUL SYLLABLE SSANGSIOS-YA-MIEUM
+9B6F C341 # HANGUL SYLLABLE SSANGSIOS-YA-PIEUP
+9B70 C342 # HANGUL SYLLABLE SSANGSIOS-YA-PIEUPSIOS
+9B71 C343 # HANGUL SYLLABLE SSANGSIOS-YA-SIOS
+9B72 C344 # HANGUL SYLLABLE SSANGSIOS-YA-SSANGSIOS
+9B73 C346 # HANGUL SYLLABLE SSANGSIOS-YA-CIEUC
+9B74 C347 # HANGUL SYLLABLE SSANGSIOS-YA-CHIEUCH
+9B75 C348 # HANGUL SYLLABLE SSANGSIOS-YA-KHIEUKH
+9B76 C349 # HANGUL SYLLABLE SSANGSIOS-YA-THIEUTH
+9B77 C34A # HANGUL SYLLABLE SSANGSIOS-YA-PHIEUPH
+9B78 C34B # HANGUL SYLLABLE SSANGSIOS-YA-HIEUH
+9B79 C34C # HANGUL SYLLABLE SSANGSIOS-YAE
+9B7A C34D # HANGUL SYLLABLE SSANGSIOS-YAE-KIYEOK
+9B81 C34E # HANGUL SYLLABLE SSANGSIOS-YAE-SSANGKIYEOK
+9B82 C34F # HANGUL SYLLABLE SSANGSIOS-YAE-KIYEOKSIOS
+9B83 C350 # HANGUL SYLLABLE SSANGSIOS-YAE-NIEUN
+9B84 C351 # HANGUL SYLLABLE SSANGSIOS-YAE-NIEUNCIEUC
+9B85 C352 # HANGUL SYLLABLE SSANGSIOS-YAE-NIEUNHIEUH
+9B86 C353 # HANGUL SYLLABLE SSANGSIOS-YAE-TIKEUT
+9B87 C354 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEUL
+9B88 C355 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULKIYEOK
+9B89 C356 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULMIEUM
+9B8A C357 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULPIEUP
+9B8B C358 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULSIOS
+9B8C C359 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULTHIEUTH
+9B8D C35A # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULPHIEUPH
+9B8E C35B # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULHIEUH
+9B8F C35C # HANGUL SYLLABLE SSANGSIOS-YAE-MIEUM
+9B90 C35D # HANGUL SYLLABLE SSANGSIOS-YAE-PIEUP
+9B91 C35E # HANGUL SYLLABLE SSANGSIOS-YAE-PIEUPSIOS
+9B92 C35F # HANGUL SYLLABLE SSANGSIOS-YAE-SIOS
+9B93 C360 # HANGUL SYLLABLE SSANGSIOS-YAE-SSANGSIOS
+9B94 C361 # HANGUL SYLLABLE SSANGSIOS-YAE-IEUNG
+9B95 C362 # HANGUL SYLLABLE SSANGSIOS-YAE-CIEUC
+9B96 C363 # HANGUL SYLLABLE SSANGSIOS-YAE-CHIEUCH
+9B97 C364 # HANGUL SYLLABLE SSANGSIOS-YAE-KHIEUKH
+9B98 C365 # HANGUL SYLLABLE SSANGSIOS-YAE-THIEUTH
+9B99 C366 # HANGUL SYLLABLE SSANGSIOS-YAE-PHIEUPH
+9B9A C367 # HANGUL SYLLABLE SSANGSIOS-YAE-HIEUH
+9B9B C36A # HANGUL SYLLABLE SSANGSIOS-EO-SSANGKIYEOK
+9B9C C36B # HANGUL SYLLABLE SSANGSIOS-EO-KIYEOKSIOS
+9B9D C36D # HANGUL SYLLABLE SSANGSIOS-EO-NIEUNCIEUC
+9B9E C36E # HANGUL SYLLABLE SSANGSIOS-EO-NIEUNHIEUH
+9B9F C36F # HANGUL SYLLABLE SSANGSIOS-EO-TIKEUT
+9BA0 C371 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULKIYEOK
+9BA1 C373 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULPIEUP
+9BA2 C374 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULSIOS
+9BA3 C375 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULTHIEUTH
+9BA4 C376 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULPHIEUPH
+9BA5 C377 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULHIEUH
+9BA6 C37A # HANGUL SYLLABLE SSANGSIOS-EO-PIEUPSIOS
+9BA7 C37B # HANGUL SYLLABLE SSANGSIOS-EO-SIOS
+9BA8 C37E # HANGUL SYLLABLE SSANGSIOS-EO-CIEUC
+9BA9 C37F # HANGUL SYLLABLE SSANGSIOS-EO-CHIEUCH
+9BAA C380 # HANGUL SYLLABLE SSANGSIOS-EO-KHIEUKH
+9BAB C381 # HANGUL SYLLABLE SSANGSIOS-EO-THIEUTH
+9BAC C382 # HANGUL SYLLABLE SSANGSIOS-EO-PHIEUPH
+9BAD C383 # HANGUL SYLLABLE SSANGSIOS-EO-HIEUH
+9BAE C385 # HANGUL SYLLABLE SSANGSIOS-E-KIYEOK
+9BAF C386 # HANGUL SYLLABLE SSANGSIOS-E-SSANGKIYEOK
+9BB0 C387 # HANGUL SYLLABLE SSANGSIOS-E-KIYEOKSIOS
+9BB1 C389 # HANGUL SYLLABLE SSANGSIOS-E-NIEUNCIEUC
+9BB2 C38A # HANGUL SYLLABLE SSANGSIOS-E-NIEUNHIEUH
+9BB3 C38B # HANGUL SYLLABLE SSANGSIOS-E-TIKEUT
+9BB4 C38D # HANGUL SYLLABLE SSANGSIOS-E-RIEULKIYEOK
+9BB5 C38E # HANGUL SYLLABLE SSANGSIOS-E-RIEULMIEUM
+9BB6 C38F # HANGUL SYLLABLE SSANGSIOS-E-RIEULPIEUP
+9BB7 C390 # HANGUL SYLLABLE SSANGSIOS-E-RIEULSIOS
+9BB8 C391 # HANGUL SYLLABLE SSANGSIOS-E-RIEULTHIEUTH
+9BB9 C392 # HANGUL SYLLABLE SSANGSIOS-E-RIEULPHIEUPH
+9BBA C393 # HANGUL SYLLABLE SSANGSIOS-E-RIEULHIEUH
+9BBB C394 # HANGUL SYLLABLE SSANGSIOS-E-MIEUM
+9BBC C395 # HANGUL SYLLABLE SSANGSIOS-E-PIEUP
+9BBD C396 # HANGUL SYLLABLE SSANGSIOS-E-PIEUPSIOS
+9BBE C397 # HANGUL SYLLABLE SSANGSIOS-E-SIOS
+9BBF C398 # HANGUL SYLLABLE SSANGSIOS-E-SSANGSIOS
+9BC0 C399 # HANGUL SYLLABLE SSANGSIOS-E-IEUNG
+9BC1 C39A # HANGUL SYLLABLE SSANGSIOS-E-CIEUC
+9BC2 C39B # HANGUL SYLLABLE SSANGSIOS-E-CHIEUCH
+9BC3 C39C # HANGUL SYLLABLE SSANGSIOS-E-KHIEUKH
+9BC4 C39D # HANGUL SYLLABLE SSANGSIOS-E-THIEUTH
+9BC5 C39E # HANGUL SYLLABLE SSANGSIOS-E-PHIEUPH
+9BC6 C39F # HANGUL SYLLABLE SSANGSIOS-E-HIEUH
+9BC7 C3A0 # HANGUL SYLLABLE SSANGSIOS-YEO
+9BC8 C3A1 # HANGUL SYLLABLE SSANGSIOS-YEO-KIYEOK
+9BC9 C3A2 # HANGUL SYLLABLE SSANGSIOS-YEO-SSANGKIYEOK
+9BCA C3A3 # HANGUL SYLLABLE SSANGSIOS-YEO-KIYEOKSIOS
+9BCB C3A4 # HANGUL SYLLABLE SSANGSIOS-YEO-NIEUN
+9BCC C3A5 # HANGUL SYLLABLE SSANGSIOS-YEO-NIEUNCIEUC
+9BCD C3A6 # HANGUL SYLLABLE SSANGSIOS-YEO-NIEUNHIEUH
+9BCE C3A7 # HANGUL SYLLABLE SSANGSIOS-YEO-TIKEUT
+9BCF C3A8 # HANGUL SYLLABLE SSANGSIOS-YEO-RIEUL
+9BD0 C3A9 # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULKIYEOK
+9BD1 C3AA # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULMIEUM
+9BD2 C3AB # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULPIEUP
+9BD3 C3AC # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULSIOS
+9BD4 C3AD # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULTHIEUTH
+9BD5 C3AE # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULPHIEUPH
+9BD6 C3AF # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULHIEUH
+9BD7 C3B0 # HANGUL SYLLABLE SSANGSIOS-YEO-MIEUM
+9BD8 C3B1 # HANGUL SYLLABLE SSANGSIOS-YEO-PIEUP
+9BD9 C3B2 # HANGUL SYLLABLE SSANGSIOS-YEO-PIEUPSIOS
+9BDA C3B3 # HANGUL SYLLABLE SSANGSIOS-YEO-SIOS
+9BDB C3B4 # HANGUL SYLLABLE SSANGSIOS-YEO-SSANGSIOS
+9BDC C3B5 # HANGUL SYLLABLE SSANGSIOS-YEO-IEUNG
+9BDD C3B6 # HANGUL SYLLABLE SSANGSIOS-YEO-CIEUC
+9BDE C3B7 # HANGUL SYLLABLE SSANGSIOS-YEO-CHIEUCH
+9BDF C3B8 # HANGUL SYLLABLE SSANGSIOS-YEO-KHIEUKH
+9BE0 C3B9 # HANGUL SYLLABLE SSANGSIOS-YEO-THIEUTH
+9BE1 C3BA # HANGUL SYLLABLE SSANGSIOS-YEO-PHIEUPH
+9BE2 C3BB # HANGUL SYLLABLE SSANGSIOS-YEO-HIEUH
+9BE3 C3BC # HANGUL SYLLABLE SSANGSIOS-YE
+9BE4 C3BD # HANGUL SYLLABLE SSANGSIOS-YE-KIYEOK
+9BE5 C3BE # HANGUL SYLLABLE SSANGSIOS-YE-SSANGKIYEOK
+9BE6 C3BF # HANGUL SYLLABLE SSANGSIOS-YE-KIYEOKSIOS
+9BE7 C3C1 # HANGUL SYLLABLE SSANGSIOS-YE-NIEUNCIEUC
+9BE8 C3C2 # HANGUL SYLLABLE SSANGSIOS-YE-NIEUNHIEUH
+9BE9 C3C3 # HANGUL SYLLABLE SSANGSIOS-YE-TIKEUT
+9BEA C3C4 # HANGUL SYLLABLE SSANGSIOS-YE-RIEUL
+9BEB C3C5 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULKIYEOK
+9BEC C3C6 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULMIEUM
+9BED C3C7 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULPIEUP
+9BEE C3C8 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULSIOS
+9BEF C3C9 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULTHIEUTH
+9BF0 C3CA # HANGUL SYLLABLE SSANGSIOS-YE-RIEULPHIEUPH
+9BF1 C3CB # HANGUL SYLLABLE SSANGSIOS-YE-RIEULHIEUH
+9BF2 C3CC # HANGUL SYLLABLE SSANGSIOS-YE-MIEUM
+9BF3 C3CD # HANGUL SYLLABLE SSANGSIOS-YE-PIEUP
+9BF4 C3CE # HANGUL SYLLABLE SSANGSIOS-YE-PIEUPSIOS
+9BF5 C3CF # HANGUL SYLLABLE SSANGSIOS-YE-SIOS
+9BF6 C3D0 # HANGUL SYLLABLE SSANGSIOS-YE-SSANGSIOS
+9BF7 C3D1 # HANGUL SYLLABLE SSANGSIOS-YE-IEUNG
+9BF8 C3D2 # HANGUL SYLLABLE SSANGSIOS-YE-CIEUC
+9BF9 C3D3 # HANGUL SYLLABLE SSANGSIOS-YE-CHIEUCH
+9BFA C3D4 # HANGUL SYLLABLE SSANGSIOS-YE-KHIEUKH
+9BFB C3D5 # HANGUL SYLLABLE SSANGSIOS-YE-THIEUTH
+9BFC C3D6 # HANGUL SYLLABLE SSANGSIOS-YE-PHIEUPH
+9BFD C3D7 # HANGUL SYLLABLE SSANGSIOS-YE-HIEUH
+9BFE C3DA # HANGUL SYLLABLE SSANGSIOS-O-SSANGKIYEOK
+9C41 C3DB # HANGUL SYLLABLE SSANGSIOS-O-KIYEOKSIOS
+9C42 C3DD # HANGUL SYLLABLE SSANGSIOS-O-NIEUNCIEUC
+9C43 C3DE # HANGUL SYLLABLE SSANGSIOS-O-NIEUNHIEUH
+9C44 C3E1 # HANGUL SYLLABLE SSANGSIOS-O-RIEULKIYEOK
+9C45 C3E3 # HANGUL SYLLABLE SSANGSIOS-O-RIEULPIEUP
+9C46 C3E4 # HANGUL SYLLABLE SSANGSIOS-O-RIEULSIOS
+9C47 C3E5 # HANGUL SYLLABLE SSANGSIOS-O-RIEULTHIEUTH
+9C48 C3E6 # HANGUL SYLLABLE SSANGSIOS-O-RIEULPHIEUPH
+9C49 C3E7 # HANGUL SYLLABLE SSANGSIOS-O-RIEULHIEUH
+9C4A C3EA # HANGUL SYLLABLE SSANGSIOS-O-PIEUPSIOS
+9C4B C3EB # HANGUL SYLLABLE SSANGSIOS-O-SIOS
+9C4C C3EC # HANGUL SYLLABLE SSANGSIOS-O-SSANGSIOS
+9C4D C3EE # HANGUL SYLLABLE SSANGSIOS-O-CIEUC
+9C4E C3EF # HANGUL SYLLABLE SSANGSIOS-O-CHIEUCH
+9C4F C3F0 # HANGUL SYLLABLE SSANGSIOS-O-KHIEUKH
+9C50 C3F1 # HANGUL SYLLABLE SSANGSIOS-O-THIEUTH
+9C51 C3F2 # HANGUL SYLLABLE SSANGSIOS-O-PHIEUPH
+9C52 C3F3 # HANGUL SYLLABLE SSANGSIOS-O-HIEUH
+9C53 C3F6 # HANGUL SYLLABLE SSANGSIOS-WA-SSANGKIYEOK
+9C54 C3F7 # HANGUL SYLLABLE SSANGSIOS-WA-KIYEOKSIOS
+9C55 C3F9 # HANGUL SYLLABLE SSANGSIOS-WA-NIEUNCIEUC
+9C56 C3FA # HANGUL SYLLABLE SSANGSIOS-WA-NIEUNHIEUH
+9C57 C3FB # HANGUL SYLLABLE SSANGSIOS-WA-TIKEUT
+9C58 C3FC # HANGUL SYLLABLE SSANGSIOS-WA-RIEUL
+9C59 C3FD # HANGUL SYLLABLE SSANGSIOS-WA-RIEULKIYEOK
+9C5A C3FE # HANGUL SYLLABLE SSANGSIOS-WA-RIEULMIEUM
+9C61 C3FF # HANGUL SYLLABLE SSANGSIOS-WA-RIEULPIEUP
+9C62 C400 # HANGUL SYLLABLE SSANGSIOS-WA-RIEULSIOS
+9C63 C401 # HANGUL SYLLABLE SSANGSIOS-WA-RIEULTHIEUTH
+9C64 C402 # HANGUL SYLLABLE SSANGSIOS-WA-RIEULPHIEUPH
+9C65 C403 # HANGUL SYLLABLE SSANGSIOS-WA-RIEULHIEUH
+9C66 C404 # HANGUL SYLLABLE SSANGSIOS-WA-MIEUM
+9C67 C405 # HANGUL SYLLABLE SSANGSIOS-WA-PIEUP
+9C68 C406 # HANGUL SYLLABLE SSANGSIOS-WA-PIEUPSIOS
+9C69 C407 # HANGUL SYLLABLE SSANGSIOS-WA-SIOS
+9C6A C409 # HANGUL SYLLABLE SSANGSIOS-WA-IEUNG
+9C6B C40A # HANGUL SYLLABLE SSANGSIOS-WA-CIEUC
+9C6C C40B # HANGUL SYLLABLE SSANGSIOS-WA-CHIEUCH
+9C6D C40C # HANGUL SYLLABLE SSANGSIOS-WA-KHIEUKH
+9C6E C40D # HANGUL SYLLABLE SSANGSIOS-WA-THIEUTH
+9C6F C40E # HANGUL SYLLABLE SSANGSIOS-WA-PHIEUPH
+9C70 C40F # HANGUL SYLLABLE SSANGSIOS-WA-HIEUH
+9C71 C411 # HANGUL SYLLABLE SSANGSIOS-WAE-KIYEOK
+9C72 C412 # HANGUL SYLLABLE SSANGSIOS-WAE-SSANGKIYEOK
+9C73 C413 # HANGUL SYLLABLE SSANGSIOS-WAE-KIYEOKSIOS
+9C74 C414 # HANGUL SYLLABLE SSANGSIOS-WAE-NIEUN
+9C75 C415 # HANGUL SYLLABLE SSANGSIOS-WAE-NIEUNCIEUC
+9C76 C416 # HANGUL SYLLABLE SSANGSIOS-WAE-NIEUNHIEUH
+9C77 C417 # HANGUL SYLLABLE SSANGSIOS-WAE-TIKEUT
+9C78 C418 # HANGUL SYLLABLE SSANGSIOS-WAE-RIEUL
+9C79 C419 # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULKIYEOK
+9C7A C41A # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULMIEUM
+9C81 C41B # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULPIEUP
+9C82 C41C # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULSIOS
+9C83 C41D # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULTHIEUTH
+9C84 C41E # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULPHIEUPH
+9C85 C41F # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULHIEUH
+9C86 C420 # HANGUL SYLLABLE SSANGSIOS-WAE-MIEUM
+9C87 C421 # HANGUL SYLLABLE SSANGSIOS-WAE-PIEUP
+9C88 C422 # HANGUL SYLLABLE SSANGSIOS-WAE-PIEUPSIOS
+9C89 C423 # HANGUL SYLLABLE SSANGSIOS-WAE-SIOS
+9C8A C425 # HANGUL SYLLABLE SSANGSIOS-WAE-IEUNG
+9C8B C426 # HANGUL SYLLABLE SSANGSIOS-WAE-CIEUC
+9C8C C427 # HANGUL SYLLABLE SSANGSIOS-WAE-CHIEUCH
+9C8D C428 # HANGUL SYLLABLE SSANGSIOS-WAE-KHIEUKH
+9C8E C429 # HANGUL SYLLABLE SSANGSIOS-WAE-THIEUTH
+9C8F C42A # HANGUL SYLLABLE SSANGSIOS-WAE-PHIEUPH
+9C90 C42B # HANGUL SYLLABLE SSANGSIOS-WAE-HIEUH
+9C91 C42D # HANGUL SYLLABLE SSANGSIOS-OE-KIYEOK
+9C92 C42E # HANGUL SYLLABLE SSANGSIOS-OE-SSANGKIYEOK
+9C93 C42F # HANGUL SYLLABLE SSANGSIOS-OE-KIYEOKSIOS
+9C94 C431 # HANGUL SYLLABLE SSANGSIOS-OE-NIEUNCIEUC
+9C95 C432 # HANGUL SYLLABLE SSANGSIOS-OE-NIEUNHIEUH
+9C96 C433 # HANGUL SYLLABLE SSANGSIOS-OE-TIKEUT
+9C97 C435 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULKIYEOK
+9C98 C436 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULMIEUM
+9C99 C437 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULPIEUP
+9C9A C438 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULSIOS
+9C9B C439 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULTHIEUTH
+9C9C C43A # HANGUL SYLLABLE SSANGSIOS-OE-RIEULPHIEUPH
+9C9D C43B # HANGUL SYLLABLE SSANGSIOS-OE-RIEULHIEUH
+9C9E C43E # HANGUL SYLLABLE SSANGSIOS-OE-PIEUPSIOS
+9C9F C43F # HANGUL SYLLABLE SSANGSIOS-OE-SIOS
+9CA0 C440 # HANGUL SYLLABLE SSANGSIOS-OE-SSANGSIOS
+9CA1 C441 # HANGUL SYLLABLE SSANGSIOS-OE-IEUNG
+9CA2 C442 # HANGUL SYLLABLE SSANGSIOS-OE-CIEUC
+9CA3 C443 # HANGUL SYLLABLE SSANGSIOS-OE-CHIEUCH
+9CA4 C444 # HANGUL SYLLABLE SSANGSIOS-OE-KHIEUKH
+9CA5 C445 # HANGUL SYLLABLE SSANGSIOS-OE-THIEUTH
+9CA6 C446 # HANGUL SYLLABLE SSANGSIOS-OE-PHIEUPH
+9CA7 C447 # HANGUL SYLLABLE SSANGSIOS-OE-HIEUH
+9CA8 C449 # HANGUL SYLLABLE SSANGSIOS-YO-KIYEOK
+9CA9 C44A # HANGUL SYLLABLE SSANGSIOS-YO-SSANGKIYEOK
+9CAA C44B # HANGUL SYLLABLE SSANGSIOS-YO-KIYEOKSIOS
+9CAB C44C # HANGUL SYLLABLE SSANGSIOS-YO-NIEUN
+9CAC C44D # HANGUL SYLLABLE SSANGSIOS-YO-NIEUNCIEUC
+9CAD C44E # HANGUL SYLLABLE SSANGSIOS-YO-NIEUNHIEUH
+9CAE C44F # HANGUL SYLLABLE SSANGSIOS-YO-TIKEUT
+9CAF C450 # HANGUL SYLLABLE SSANGSIOS-YO-RIEUL
+9CB0 C451 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULKIYEOK
+9CB1 C452 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULMIEUM
+9CB2 C453 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULPIEUP
+9CB3 C454 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULSIOS
+9CB4 C455 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULTHIEUTH
+9CB5 C456 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULPHIEUPH
+9CB6 C457 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULHIEUH
+9CB7 C458 # HANGUL SYLLABLE SSANGSIOS-YO-MIEUM
+9CB8 C459 # HANGUL SYLLABLE SSANGSIOS-YO-PIEUP
+9CB9 C45A # HANGUL SYLLABLE SSANGSIOS-YO-PIEUPSIOS
+9CBA C45B # HANGUL SYLLABLE SSANGSIOS-YO-SIOS
+9CBB C45C # HANGUL SYLLABLE SSANGSIOS-YO-SSANGSIOS
+9CBC C45D # HANGUL SYLLABLE SSANGSIOS-YO-IEUNG
+9CBD C45E # HANGUL SYLLABLE SSANGSIOS-YO-CIEUC
+9CBE C45F # HANGUL SYLLABLE SSANGSIOS-YO-CHIEUCH
+9CBF C460 # HANGUL SYLLABLE SSANGSIOS-YO-KHIEUKH
+9CC0 C461 # HANGUL SYLLABLE SSANGSIOS-YO-THIEUTH
+9CC1 C462 # HANGUL SYLLABLE SSANGSIOS-YO-PHIEUPH
+9CC2 C463 # HANGUL SYLLABLE SSANGSIOS-YO-HIEUH
+9CC3 C466 # HANGUL SYLLABLE SSANGSIOS-U-SSANGKIYEOK
+9CC4 C467 # HANGUL SYLLABLE SSANGSIOS-U-KIYEOKSIOS
+9CC5 C469 # HANGUL SYLLABLE SSANGSIOS-U-NIEUNCIEUC
+9CC6 C46A # HANGUL SYLLABLE SSANGSIOS-U-NIEUNHIEUH
+9CC7 C46B # HANGUL SYLLABLE SSANGSIOS-U-TIKEUT
+9CC8 C46D # HANGUL SYLLABLE SSANGSIOS-U-RIEULKIYEOK
+9CC9 C46E # HANGUL SYLLABLE SSANGSIOS-U-RIEULMIEUM
+9CCA C46F # HANGUL SYLLABLE SSANGSIOS-U-RIEULPIEUP
+9CCB C470 # HANGUL SYLLABLE SSANGSIOS-U-RIEULSIOS
+9CCC C471 # HANGUL SYLLABLE SSANGSIOS-U-RIEULTHIEUTH
+9CCD C472 # HANGUL SYLLABLE SSANGSIOS-U-RIEULPHIEUPH
+9CCE C473 # HANGUL SYLLABLE SSANGSIOS-U-RIEULHIEUH
+9CCF C476 # HANGUL SYLLABLE SSANGSIOS-U-PIEUPSIOS
+9CD0 C477 # HANGUL SYLLABLE SSANGSIOS-U-SIOS
+9CD1 C478 # HANGUL SYLLABLE SSANGSIOS-U-SSANGSIOS
+9CD2 C47A # HANGUL SYLLABLE SSANGSIOS-U-CIEUC
+9CD3 C47B # HANGUL SYLLABLE SSANGSIOS-U-CHIEUCH
+9CD4 C47C # HANGUL SYLLABLE SSANGSIOS-U-KHIEUKH
+9CD5 C47D # HANGUL SYLLABLE SSANGSIOS-U-THIEUTH
+9CD6 C47E # HANGUL SYLLABLE SSANGSIOS-U-PHIEUPH
+9CD7 C47F # HANGUL SYLLABLE SSANGSIOS-U-HIEUH
+9CD8 C481 # HANGUL SYLLABLE SSANGSIOS-WEO-KIYEOK
+9CD9 C482 # HANGUL SYLLABLE SSANGSIOS-WEO-SSANGKIYEOK
+9CDA C483 # HANGUL SYLLABLE SSANGSIOS-WEO-KIYEOKSIOS
+9CDB C484 # HANGUL SYLLABLE SSANGSIOS-WEO-NIEUN
+9CDC C485 # HANGUL SYLLABLE SSANGSIOS-WEO-NIEUNCIEUC
+9CDD C486 # HANGUL SYLLABLE SSANGSIOS-WEO-NIEUNHIEUH
+9CDE C487 # HANGUL SYLLABLE SSANGSIOS-WEO-TIKEUT
+9CDF C488 # HANGUL SYLLABLE SSANGSIOS-WEO-RIEUL
+9CE0 C489 # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULKIYEOK
+9CE1 C48A # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULMIEUM
+9CE2 C48B # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULPIEUP
+9CE3 C48C # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULSIOS
+9CE4 C48D # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULTHIEUTH
+9CE5 C48E # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULPHIEUPH
+9CE6 C48F # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULHIEUH
+9CE7 C490 # HANGUL SYLLABLE SSANGSIOS-WEO-MIEUM
+9CE8 C491 # HANGUL SYLLABLE SSANGSIOS-WEO-PIEUP
+9CE9 C492 # HANGUL SYLLABLE SSANGSIOS-WEO-PIEUPSIOS
+9CEA C493 # HANGUL SYLLABLE SSANGSIOS-WEO-SIOS
+9CEB C495 # HANGUL SYLLABLE SSANGSIOS-WEO-IEUNG
+9CEC C496 # HANGUL SYLLABLE SSANGSIOS-WEO-CIEUC
+9CED C497 # HANGUL SYLLABLE SSANGSIOS-WEO-CHIEUCH
+9CEE C498 # HANGUL SYLLABLE SSANGSIOS-WEO-KHIEUKH
+9CEF C499 # HANGUL SYLLABLE SSANGSIOS-WEO-THIEUTH
+9CF0 C49A # HANGUL SYLLABLE SSANGSIOS-WEO-PHIEUPH
+9CF1 C49B # HANGUL SYLLABLE SSANGSIOS-WEO-HIEUH
+9CF2 C49D # HANGUL SYLLABLE SSANGSIOS-WE-KIYEOK
+9CF3 C49E # HANGUL SYLLABLE SSANGSIOS-WE-SSANGKIYEOK
+9CF4 C49F # HANGUL SYLLABLE SSANGSIOS-WE-KIYEOKSIOS
+9CF5 C4A0 # HANGUL SYLLABLE SSANGSIOS-WE-NIEUN
+9CF6 C4A1 # HANGUL SYLLABLE SSANGSIOS-WE-NIEUNCIEUC
+9CF7 C4A2 # HANGUL SYLLABLE SSANGSIOS-WE-NIEUNHIEUH
+9CF8 C4A3 # HANGUL SYLLABLE SSANGSIOS-WE-TIKEUT
+9CF9 C4A4 # HANGUL SYLLABLE SSANGSIOS-WE-RIEUL
+9CFA C4A5 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULKIYEOK
+9CFB C4A6 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULMIEUM
+9CFC C4A7 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULPIEUP
+9CFD C4A8 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULSIOS
+9CFE C4A9 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULTHIEUTH
+9D41 C4AA # HANGUL SYLLABLE SSANGSIOS-WE-RIEULPHIEUPH
+9D42 C4AB # HANGUL SYLLABLE SSANGSIOS-WE-RIEULHIEUH
+9D43 C4AC # HANGUL SYLLABLE SSANGSIOS-WE-MIEUM
+9D44 C4AD # HANGUL SYLLABLE SSANGSIOS-WE-PIEUP
+9D45 C4AE # HANGUL SYLLABLE SSANGSIOS-WE-PIEUPSIOS
+9D46 C4AF # HANGUL SYLLABLE SSANGSIOS-WE-SIOS
+9D47 C4B0 # HANGUL SYLLABLE SSANGSIOS-WE-SSANGSIOS
+9D48 C4B1 # HANGUL SYLLABLE SSANGSIOS-WE-IEUNG
+9D49 C4B2 # HANGUL SYLLABLE SSANGSIOS-WE-CIEUC
+9D4A C4B3 # HANGUL SYLLABLE SSANGSIOS-WE-CHIEUCH
+9D4B C4B4 # HANGUL SYLLABLE SSANGSIOS-WE-KHIEUKH
+9D4C C4B5 # HANGUL SYLLABLE SSANGSIOS-WE-THIEUTH
+9D4D C4B6 # HANGUL SYLLABLE SSANGSIOS-WE-PHIEUPH
+9D4E C4B7 # HANGUL SYLLABLE SSANGSIOS-WE-HIEUH
+9D4F C4B9 # HANGUL SYLLABLE SSANGSIOS-WI-KIYEOK
+9D50 C4BA # HANGUL SYLLABLE SSANGSIOS-WI-SSANGKIYEOK
+9D51 C4BB # HANGUL SYLLABLE SSANGSIOS-WI-KIYEOKSIOS
+9D52 C4BD # HANGUL SYLLABLE SSANGSIOS-WI-NIEUNCIEUC
+9D53 C4BE # HANGUL SYLLABLE SSANGSIOS-WI-NIEUNHIEUH
+9D54 C4BF # HANGUL SYLLABLE SSANGSIOS-WI-TIKEUT
+9D55 C4C0 # HANGUL SYLLABLE SSANGSIOS-WI-RIEUL
+9D56 C4C1 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULKIYEOK
+9D57 C4C2 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULMIEUM
+9D58 C4C3 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULPIEUP
+9D59 C4C4 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULSIOS
+9D5A C4C5 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULTHIEUTH
+9D61 C4C6 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULPHIEUPH
+9D62 C4C7 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULHIEUH
+9D63 C4C8 # HANGUL SYLLABLE SSANGSIOS-WI-MIEUM
+9D64 C4C9 # HANGUL SYLLABLE SSANGSIOS-WI-PIEUP
+9D65 C4CA # HANGUL SYLLABLE SSANGSIOS-WI-PIEUPSIOS
+9D66 C4CB # HANGUL SYLLABLE SSANGSIOS-WI-SIOS
+9D67 C4CC # HANGUL SYLLABLE SSANGSIOS-WI-SSANGSIOS
+9D68 C4CD # HANGUL SYLLABLE SSANGSIOS-WI-IEUNG
+9D69 C4CE # HANGUL SYLLABLE SSANGSIOS-WI-CIEUC
+9D6A C4CF # HANGUL SYLLABLE SSANGSIOS-WI-CHIEUCH
+9D6B C4D0 # HANGUL SYLLABLE SSANGSIOS-WI-KHIEUKH
+9D6C C4D1 # HANGUL SYLLABLE SSANGSIOS-WI-THIEUTH
+9D6D C4D2 # HANGUL SYLLABLE SSANGSIOS-WI-PHIEUPH
+9D6E C4D3 # HANGUL SYLLABLE SSANGSIOS-WI-HIEUH
+9D6F C4D4 # HANGUL SYLLABLE SSANGSIOS-YU
+9D70 C4D5 # HANGUL SYLLABLE SSANGSIOS-YU-KIYEOK
+9D71 C4D6 # HANGUL SYLLABLE SSANGSIOS-YU-SSANGKIYEOK
+9D72 C4D7 # HANGUL SYLLABLE SSANGSIOS-YU-KIYEOKSIOS
+9D73 C4D8 # HANGUL SYLLABLE SSANGSIOS-YU-NIEUN
+9D74 C4D9 # HANGUL SYLLABLE SSANGSIOS-YU-NIEUNCIEUC
+9D75 C4DA # HANGUL SYLLABLE SSANGSIOS-YU-NIEUNHIEUH
+9D76 C4DB # HANGUL SYLLABLE SSANGSIOS-YU-TIKEUT
+9D77 C4DC # HANGUL SYLLABLE SSANGSIOS-YU-RIEUL
+9D78 C4DD # HANGUL SYLLABLE SSANGSIOS-YU-RIEULKIYEOK
+9D79 C4DE # HANGUL SYLLABLE SSANGSIOS-YU-RIEULMIEUM
+9D7A C4DF # HANGUL SYLLABLE SSANGSIOS-YU-RIEULPIEUP
+9D81 C4E0 # HANGUL SYLLABLE SSANGSIOS-YU-RIEULSIOS
+9D82 C4E1 # HANGUL SYLLABLE SSANGSIOS-YU-RIEULTHIEUTH
+9D83 C4E2 # HANGUL SYLLABLE SSANGSIOS-YU-RIEULPHIEUPH
+9D84 C4E3 # HANGUL SYLLABLE SSANGSIOS-YU-RIEULHIEUH
+9D85 C4E4 # HANGUL SYLLABLE SSANGSIOS-YU-MIEUM
+9D86 C4E5 # HANGUL SYLLABLE SSANGSIOS-YU-PIEUP
+9D87 C4E6 # HANGUL SYLLABLE SSANGSIOS-YU-PIEUPSIOS
+9D88 C4E7 # HANGUL SYLLABLE SSANGSIOS-YU-SIOS
+9D89 C4E8 # HANGUL SYLLABLE SSANGSIOS-YU-SSANGSIOS
+9D8A C4EA # HANGUL SYLLABLE SSANGSIOS-YU-CIEUC
+9D8B C4EB # HANGUL SYLLABLE SSANGSIOS-YU-CHIEUCH
+9D8C C4EC # HANGUL SYLLABLE SSANGSIOS-YU-KHIEUKH
+9D8D C4ED # HANGUL SYLLABLE SSANGSIOS-YU-THIEUTH
+9D8E C4EE # HANGUL SYLLABLE SSANGSIOS-YU-PHIEUPH
+9D8F C4EF # HANGUL SYLLABLE SSANGSIOS-YU-HIEUH
+9D90 C4F2 # HANGUL SYLLABLE SSANGSIOS-EU-SSANGKIYEOK
+9D91 C4F3 # HANGUL SYLLABLE SSANGSIOS-EU-KIYEOKSIOS
+9D92 C4F5 # HANGUL SYLLABLE SSANGSIOS-EU-NIEUNCIEUC
+9D93 C4F6 # HANGUL SYLLABLE SSANGSIOS-EU-NIEUNHIEUH
+9D94 C4F7 # HANGUL SYLLABLE SSANGSIOS-EU-TIKEUT
+9D95 C4F9 # HANGUL SYLLABLE SSANGSIOS-EU-RIEULKIYEOK
+9D96 C4FB # HANGUL SYLLABLE SSANGSIOS-EU-RIEULPIEUP
+9D97 C4FC # HANGUL SYLLABLE SSANGSIOS-EU-RIEULSIOS
+9D98 C4FD # HANGUL SYLLABLE SSANGSIOS-EU-RIEULTHIEUTH
+9D99 C4FE # HANGUL SYLLABLE SSANGSIOS-EU-RIEULPHIEUPH
+9D9A C502 # HANGUL SYLLABLE SSANGSIOS-EU-PIEUPSIOS
+9D9B C503 # HANGUL SYLLABLE SSANGSIOS-EU-SIOS
+9D9C C504 # HANGUL SYLLABLE SSANGSIOS-EU-SSANGSIOS
+9D9D C505 # HANGUL SYLLABLE SSANGSIOS-EU-IEUNG
+9D9E C506 # HANGUL SYLLABLE SSANGSIOS-EU-CIEUC
+9D9F C507 # HANGUL SYLLABLE SSANGSIOS-EU-CHIEUCH
+9DA0 C508 # HANGUL SYLLABLE SSANGSIOS-EU-KHIEUKH
+9DA1 C509 # HANGUL SYLLABLE SSANGSIOS-EU-THIEUTH
+9DA2 C50A # HANGUL SYLLABLE SSANGSIOS-EU-PHIEUPH
+9DA3 C50B # HANGUL SYLLABLE SSANGSIOS-EU-HIEUH
+9DA4 C50D # HANGUL SYLLABLE SSANGSIOS-YI-KIYEOK
+9DA5 C50E # HANGUL SYLLABLE SSANGSIOS-YI-SSANGKIYEOK
+9DA6 C50F # HANGUL SYLLABLE SSANGSIOS-YI-KIYEOKSIOS
+9DA7 C511 # HANGUL SYLLABLE SSANGSIOS-YI-NIEUNCIEUC
+9DA8 C512 # HANGUL SYLLABLE SSANGSIOS-YI-NIEUNHIEUH
+9DA9 C513 # HANGUL SYLLABLE SSANGSIOS-YI-TIKEUT
+9DAA C515 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULKIYEOK
+9DAB C516 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULMIEUM
+9DAC C517 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULPIEUP
+9DAD C518 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULSIOS
+9DAE C519 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULTHIEUTH
+9DAF C51A # HANGUL SYLLABLE SSANGSIOS-YI-RIEULPHIEUPH
+9DB0 C51B # HANGUL SYLLABLE SSANGSIOS-YI-RIEULHIEUH
+9DB1 C51D # HANGUL SYLLABLE SSANGSIOS-YI-PIEUP
+9DB2 C51E # HANGUL SYLLABLE SSANGSIOS-YI-PIEUPSIOS
+9DB3 C51F # HANGUL SYLLABLE SSANGSIOS-YI-SIOS
+9DB4 C520 # HANGUL SYLLABLE SSANGSIOS-YI-SSANGSIOS
+9DB5 C521 # HANGUL SYLLABLE SSANGSIOS-YI-IEUNG
+9DB6 C522 # HANGUL SYLLABLE SSANGSIOS-YI-CIEUC
+9DB7 C523 # HANGUL SYLLABLE SSANGSIOS-YI-CHIEUCH
+9DB8 C524 # HANGUL SYLLABLE SSANGSIOS-YI-KHIEUKH
+9DB9 C525 # HANGUL SYLLABLE SSANGSIOS-YI-THIEUTH
+9DBA C526 # HANGUL SYLLABLE SSANGSIOS-YI-PHIEUPH
+9DBB C527 # HANGUL SYLLABLE SSANGSIOS-YI-HIEUH
+9DBC C52A # HANGUL SYLLABLE SSANGSIOS-I-SSANGKIYEOK
+9DBD C52B # HANGUL SYLLABLE SSANGSIOS-I-KIYEOKSIOS
+9DBE C52D # HANGUL SYLLABLE SSANGSIOS-I-NIEUNCIEUC
+9DBF C52E # HANGUL SYLLABLE SSANGSIOS-I-NIEUNHIEUH
+9DC0 C52F # HANGUL SYLLABLE SSANGSIOS-I-TIKEUT
+9DC1 C531 # HANGUL SYLLABLE SSANGSIOS-I-RIEULKIYEOK
+9DC2 C532 # HANGUL SYLLABLE SSANGSIOS-I-RIEULMIEUM
+9DC3 C533 # HANGUL SYLLABLE SSANGSIOS-I-RIEULPIEUP
+9DC4 C534 # HANGUL SYLLABLE SSANGSIOS-I-RIEULSIOS
+9DC5 C535 # HANGUL SYLLABLE SSANGSIOS-I-RIEULTHIEUTH
+9DC6 C536 # HANGUL SYLLABLE SSANGSIOS-I-RIEULPHIEUPH
+9DC7 C537 # HANGUL SYLLABLE SSANGSIOS-I-RIEULHIEUH
+9DC8 C53A # HANGUL SYLLABLE SSANGSIOS-I-PIEUPSIOS
+9DC9 C53C # HANGUL SYLLABLE SSANGSIOS-I-SSANGSIOS
+9DCA C53E # HANGUL SYLLABLE SSANGSIOS-I-CIEUC
+9DCB C53F # HANGUL SYLLABLE SSANGSIOS-I-CHIEUCH
+9DCC C540 # HANGUL SYLLABLE SSANGSIOS-I-KHIEUKH
+9DCD C541 # HANGUL SYLLABLE SSANGSIOS-I-THIEUTH
+9DCE C542 # HANGUL SYLLABLE SSANGSIOS-I-PHIEUPH
+9DCF C543 # HANGUL SYLLABLE SSANGSIOS-I-HIEUH
+9DD0 C546 # HANGUL SYLLABLE IEUNG-A-SSANGKIYEOK
+9DD1 C547 # HANGUL SYLLABLE IEUNG-A-KIYEOKSIOS
+9DD2 C54B # HANGUL SYLLABLE IEUNG-A-TIKEUT
+9DD3 C54F # HANGUL SYLLABLE IEUNG-A-RIEULPIEUP
+9DD4 C550 # HANGUL SYLLABLE IEUNG-A-RIEULSIOS
+9DD5 C551 # HANGUL SYLLABLE IEUNG-A-RIEULTHIEUTH
+9DD6 C552 # HANGUL SYLLABLE IEUNG-A-RIEULPHIEUPH
+9DD7 C556 # HANGUL SYLLABLE IEUNG-A-PIEUPSIOS
+9DD8 C55A # HANGUL SYLLABLE IEUNG-A-CIEUC
+9DD9 C55B # HANGUL SYLLABLE IEUNG-A-CHIEUCH
+9DDA C55C # HANGUL SYLLABLE IEUNG-A-KHIEUKH
+9DDB C55F # HANGUL SYLLABLE IEUNG-A-HIEUH
+9DDC C562 # HANGUL SYLLABLE IEUNG-AE-SSANGKIYEOK
+9DDD C563 # HANGUL SYLLABLE IEUNG-AE-KIYEOKSIOS
+9DDE C565 # HANGUL SYLLABLE IEUNG-AE-NIEUNCIEUC
+9DDF C566 # HANGUL SYLLABLE IEUNG-AE-NIEUNHIEUH
+9DE0 C567 # HANGUL SYLLABLE IEUNG-AE-TIKEUT
+9DE1 C569 # HANGUL SYLLABLE IEUNG-AE-RIEULKIYEOK
+9DE2 C56A # HANGUL SYLLABLE IEUNG-AE-RIEULMIEUM
+9DE3 C56B # HANGUL SYLLABLE IEUNG-AE-RIEULPIEUP
+9DE4 C56C # HANGUL SYLLABLE IEUNG-AE-RIEULSIOS
+9DE5 C56D # HANGUL SYLLABLE IEUNG-AE-RIEULTHIEUTH
+9DE6 C56E # HANGUL SYLLABLE IEUNG-AE-RIEULPHIEUPH
+9DE7 C56F # HANGUL SYLLABLE IEUNG-AE-RIEULHIEUH
+9DE8 C572 # HANGUL SYLLABLE IEUNG-AE-PIEUPSIOS
+9DE9 C576 # HANGUL SYLLABLE IEUNG-AE-CIEUC
+9DEA C577 # HANGUL SYLLABLE IEUNG-AE-CHIEUCH
+9DEB C578 # HANGUL SYLLABLE IEUNG-AE-KHIEUKH
+9DEC C579 # HANGUL SYLLABLE IEUNG-AE-THIEUTH
+9DED C57A # HANGUL SYLLABLE IEUNG-AE-PHIEUPH
+9DEE C57B # HANGUL SYLLABLE IEUNG-AE-HIEUH
+9DEF C57E # HANGUL SYLLABLE IEUNG-YA-SSANGKIYEOK
+9DF0 C57F # HANGUL SYLLABLE IEUNG-YA-KIYEOKSIOS
+9DF1 C581 # HANGUL SYLLABLE IEUNG-YA-NIEUNCIEUC
+9DF2 C582 # HANGUL SYLLABLE IEUNG-YA-NIEUNHIEUH
+9DF3 C583 # HANGUL SYLLABLE IEUNG-YA-TIKEUT
+9DF4 C585 # HANGUL SYLLABLE IEUNG-YA-RIEULKIYEOK
+9DF5 C586 # HANGUL SYLLABLE IEUNG-YA-RIEULMIEUM
+9DF6 C588 # HANGUL SYLLABLE IEUNG-YA-RIEULSIOS
+9DF7 C589 # HANGUL SYLLABLE IEUNG-YA-RIEULTHIEUTH
+9DF8 C58A # HANGUL SYLLABLE IEUNG-YA-RIEULPHIEUPH
+9DF9 C58B # HANGUL SYLLABLE IEUNG-YA-RIEULHIEUH
+9DFA C58E # HANGUL SYLLABLE IEUNG-YA-PIEUPSIOS
+9DFB C590 # HANGUL SYLLABLE IEUNG-YA-SSANGSIOS
+9DFC C592 # HANGUL SYLLABLE IEUNG-YA-CIEUC
+9DFD C593 # HANGUL SYLLABLE IEUNG-YA-CHIEUCH
+9DFE C594 # HANGUL SYLLABLE IEUNG-YA-KHIEUKH
+9E41 C596 # HANGUL SYLLABLE IEUNG-YA-PHIEUPH
+9E42 C599 # HANGUL SYLLABLE IEUNG-YAE-KIYEOK
+9E43 C59A # HANGUL SYLLABLE IEUNG-YAE-SSANGKIYEOK
+9E44 C59B # HANGUL SYLLABLE IEUNG-YAE-KIYEOKSIOS
+9E45 C59D # HANGUL SYLLABLE IEUNG-YAE-NIEUNCIEUC
+9E46 C59E # HANGUL SYLLABLE IEUNG-YAE-NIEUNHIEUH
+9E47 C59F # HANGUL SYLLABLE IEUNG-YAE-TIKEUT
+9E48 C5A1 # HANGUL SYLLABLE IEUNG-YAE-RIEULKIYEOK
+9E49 C5A2 # HANGUL SYLLABLE IEUNG-YAE-RIEULMIEUM
+9E4A C5A3 # HANGUL SYLLABLE IEUNG-YAE-RIEULPIEUP
+9E4B C5A4 # HANGUL SYLLABLE IEUNG-YAE-RIEULSIOS
+9E4C C5A5 # HANGUL SYLLABLE IEUNG-YAE-RIEULTHIEUTH
+9E4D C5A6 # HANGUL SYLLABLE IEUNG-YAE-RIEULPHIEUPH
+9E4E C5A7 # HANGUL SYLLABLE IEUNG-YAE-RIEULHIEUH
+9E4F C5A8 # HANGUL SYLLABLE IEUNG-YAE-MIEUM
+9E50 C5AA # HANGUL SYLLABLE IEUNG-YAE-PIEUPSIOS
+9E51 C5AB # HANGUL SYLLABLE IEUNG-YAE-SIOS
+9E52 C5AC # HANGUL SYLLABLE IEUNG-YAE-SSANGSIOS
+9E53 C5AD # HANGUL SYLLABLE IEUNG-YAE-IEUNG
+9E54 C5AE # HANGUL SYLLABLE IEUNG-YAE-CIEUC
+9E55 C5AF # HANGUL SYLLABLE IEUNG-YAE-CHIEUCH
+9E56 C5B0 # HANGUL SYLLABLE IEUNG-YAE-KHIEUKH
+9E57 C5B1 # HANGUL SYLLABLE IEUNG-YAE-THIEUTH
+9E58 C5B2 # HANGUL SYLLABLE IEUNG-YAE-PHIEUPH
+9E59 C5B3 # HANGUL SYLLABLE IEUNG-YAE-HIEUH
+9E5A C5B6 # HANGUL SYLLABLE IEUNG-EO-SSANGKIYEOK
+9E61 C5B7 # HANGUL SYLLABLE IEUNG-EO-KIYEOKSIOS
+9E62 C5BA # HANGUL SYLLABLE IEUNG-EO-NIEUNHIEUH
+9E63 C5BF # HANGUL SYLLABLE IEUNG-EO-RIEULPIEUP
+9E64 C5C0 # HANGUL SYLLABLE IEUNG-EO-RIEULSIOS
+9E65 C5C1 # HANGUL SYLLABLE IEUNG-EO-RIEULTHIEUTH
+9E66 C5C2 # HANGUL SYLLABLE IEUNG-EO-RIEULPHIEUPH
+9E67 C5C3 # HANGUL SYLLABLE IEUNG-EO-RIEULHIEUH
+9E68 C5CB # HANGUL SYLLABLE IEUNG-EO-CHIEUCH
+9E69 C5CD # HANGUL SYLLABLE IEUNG-EO-THIEUTH
+9E6A C5CF # HANGUL SYLLABLE IEUNG-EO-HIEUH
+9E6B C5D2 # HANGUL SYLLABLE IEUNG-E-SSANGKIYEOK
+9E6C C5D3 # HANGUL SYLLABLE IEUNG-E-KIYEOKSIOS
+9E6D C5D5 # HANGUL SYLLABLE IEUNG-E-NIEUNCIEUC
+9E6E C5D6 # HANGUL SYLLABLE IEUNG-E-NIEUNHIEUH
+9E6F C5D7 # HANGUL SYLLABLE IEUNG-E-TIKEUT
+9E70 C5D9 # HANGUL SYLLABLE IEUNG-E-RIEULKIYEOK
+9E71 C5DA # HANGUL SYLLABLE IEUNG-E-RIEULMIEUM
+9E72 C5DB # HANGUL SYLLABLE IEUNG-E-RIEULPIEUP
+9E73 C5DC # HANGUL SYLLABLE IEUNG-E-RIEULSIOS
+9E74 C5DD # HANGUL SYLLABLE IEUNG-E-RIEULTHIEUTH
+9E75 C5DE # HANGUL SYLLABLE IEUNG-E-RIEULPHIEUPH
+9E76 C5DF # HANGUL SYLLABLE IEUNG-E-RIEULHIEUH
+9E77 C5E2 # HANGUL SYLLABLE IEUNG-E-PIEUPSIOS
+9E78 C5E4 # HANGUL SYLLABLE IEUNG-E-SSANGSIOS
+9E79 C5E6 # HANGUL SYLLABLE IEUNG-E-CIEUC
+9E7A C5E7 # HANGUL SYLLABLE IEUNG-E-CHIEUCH
+9E81 C5E8 # HANGUL SYLLABLE IEUNG-E-KHIEUKH
+9E82 C5E9 # HANGUL SYLLABLE IEUNG-E-THIEUTH
+9E83 C5EA # HANGUL SYLLABLE IEUNG-E-PHIEUPH
+9E84 C5EB # HANGUL SYLLABLE IEUNG-E-HIEUH
+9E85 C5EF # HANGUL SYLLABLE IEUNG-YEO-KIYEOKSIOS
+9E86 C5F1 # HANGUL SYLLABLE IEUNG-YEO-NIEUNCIEUC
+9E87 C5F2 # HANGUL SYLLABLE IEUNG-YEO-NIEUNHIEUH
+9E88 C5F3 # HANGUL SYLLABLE IEUNG-YEO-TIKEUT
+9E89 C5F5 # HANGUL SYLLABLE IEUNG-YEO-RIEULKIYEOK
+9E8A C5F8 # HANGUL SYLLABLE IEUNG-YEO-RIEULSIOS
+9E8B C5F9 # HANGUL SYLLABLE IEUNG-YEO-RIEULTHIEUTH
+9E8C C5FA # HANGUL SYLLABLE IEUNG-YEO-RIEULPHIEUPH
+9E8D C5FB # HANGUL SYLLABLE IEUNG-YEO-RIEULHIEUH
+9E8E C602 # HANGUL SYLLABLE IEUNG-YEO-CIEUC
+9E8F C603 # HANGUL SYLLABLE IEUNG-YEO-CHIEUCH
+9E90 C604 # HANGUL SYLLABLE IEUNG-YEO-KHIEUKH
+9E91 C609 # HANGUL SYLLABLE IEUNG-YE-KIYEOK
+9E92 C60A # HANGUL SYLLABLE IEUNG-YE-SSANGKIYEOK
+9E93 C60B # HANGUL SYLLABLE IEUNG-YE-KIYEOKSIOS
+9E94 C60D # HANGUL SYLLABLE IEUNG-YE-NIEUNCIEUC
+9E95 C60E # HANGUL SYLLABLE IEUNG-YE-NIEUNHIEUH
+9E96 C60F # HANGUL SYLLABLE IEUNG-YE-TIKEUT
+9E97 C611 # HANGUL SYLLABLE IEUNG-YE-RIEULKIYEOK
+9E98 C612 # HANGUL SYLLABLE IEUNG-YE-RIEULMIEUM
+9E99 C613 # HANGUL SYLLABLE IEUNG-YE-RIEULPIEUP
+9E9A C614 # HANGUL SYLLABLE IEUNG-YE-RIEULSIOS
+9E9B C615 # HANGUL SYLLABLE IEUNG-YE-RIEULTHIEUTH
+9E9C C616 # HANGUL SYLLABLE IEUNG-YE-RIEULPHIEUPH
+9E9D C617 # HANGUL SYLLABLE IEUNG-YE-RIEULHIEUH
+9E9E C61A # HANGUL SYLLABLE IEUNG-YE-PIEUPSIOS
+9E9F C61D # HANGUL SYLLABLE IEUNG-YE-IEUNG
+9EA0 C61E # HANGUL SYLLABLE IEUNG-YE-CIEUC
+9EA1 C61F # HANGUL SYLLABLE IEUNG-YE-CHIEUCH
+9EA2 C620 # HANGUL SYLLABLE IEUNG-YE-KHIEUKH
+9EA3 C621 # HANGUL SYLLABLE IEUNG-YE-THIEUTH
+9EA4 C622 # HANGUL SYLLABLE IEUNG-YE-PHIEUPH
+9EA5 C623 # HANGUL SYLLABLE IEUNG-YE-HIEUH
+9EA6 C626 # HANGUL SYLLABLE IEUNG-O-SSANGKIYEOK
+9EA7 C627 # HANGUL SYLLABLE IEUNG-O-KIYEOKSIOS
+9EA8 C629 # HANGUL SYLLABLE IEUNG-O-NIEUNCIEUC
+9EA9 C62A # HANGUL SYLLABLE IEUNG-O-NIEUNHIEUH
+9EAA C62B # HANGUL SYLLABLE IEUNG-O-TIKEUT
+9EAB C62F # HANGUL SYLLABLE IEUNG-O-RIEULPIEUP
+9EAC C631 # HANGUL SYLLABLE IEUNG-O-RIEULTHIEUTH
+9EAD C632 # HANGUL SYLLABLE IEUNG-O-RIEULPHIEUPH
+9EAE C636 # HANGUL SYLLABLE IEUNG-O-PIEUPSIOS
+9EAF C638 # HANGUL SYLLABLE IEUNG-O-SSANGSIOS
+9EB0 C63A # HANGUL SYLLABLE IEUNG-O-CIEUC
+9EB1 C63C # HANGUL SYLLABLE IEUNG-O-KHIEUKH
+9EB2 C63D # HANGUL SYLLABLE IEUNG-O-THIEUTH
+9EB3 C63E # HANGUL SYLLABLE IEUNG-O-PHIEUPH
+9EB4 C63F # HANGUL SYLLABLE IEUNG-O-HIEUH
+9EB5 C642 # HANGUL SYLLABLE IEUNG-WA-SSANGKIYEOK
+9EB6 C643 # HANGUL SYLLABLE IEUNG-WA-KIYEOKSIOS
+9EB7 C645 # HANGUL SYLLABLE IEUNG-WA-NIEUNCIEUC
+9EB8 C646 # HANGUL SYLLABLE IEUNG-WA-NIEUNHIEUH
+9EB9 C647 # HANGUL SYLLABLE IEUNG-WA-TIKEUT
+9EBA C649 # HANGUL SYLLABLE IEUNG-WA-RIEULKIYEOK
+9EBB C64A # HANGUL SYLLABLE IEUNG-WA-RIEULMIEUM
+9EBC C64B # HANGUL SYLLABLE IEUNG-WA-RIEULPIEUP
+9EBD C64C # HANGUL SYLLABLE IEUNG-WA-RIEULSIOS
+9EBE C64D # HANGUL SYLLABLE IEUNG-WA-RIEULTHIEUTH
+9EBF C64E # HANGUL SYLLABLE IEUNG-WA-RIEULPHIEUPH
+9EC0 C64F # HANGUL SYLLABLE IEUNG-WA-RIEULHIEUH
+9EC1 C652 # HANGUL SYLLABLE IEUNG-WA-PIEUPSIOS
+9EC2 C656 # HANGUL SYLLABLE IEUNG-WA-CIEUC
+9EC3 C657 # HANGUL SYLLABLE IEUNG-WA-CHIEUCH
+9EC4 C658 # HANGUL SYLLABLE IEUNG-WA-KHIEUKH
+9EC5 C659 # HANGUL SYLLABLE IEUNG-WA-THIEUTH
+9EC6 C65A # HANGUL SYLLABLE IEUNG-WA-PHIEUPH
+9EC7 C65B # HANGUL SYLLABLE IEUNG-WA-HIEUH
+9EC8 C65E # HANGUL SYLLABLE IEUNG-WAE-SSANGKIYEOK
+9EC9 C65F # HANGUL SYLLABLE IEUNG-WAE-KIYEOKSIOS
+9ECA C661 # HANGUL SYLLABLE IEUNG-WAE-NIEUNCIEUC
+9ECB C662 # HANGUL SYLLABLE IEUNG-WAE-NIEUNHIEUH
+9ECC C663 # HANGUL SYLLABLE IEUNG-WAE-TIKEUT
+9ECD C664 # HANGUL SYLLABLE IEUNG-WAE-RIEUL
+9ECE C665 # HANGUL SYLLABLE IEUNG-WAE-RIEULKIYEOK
+9ECF C666 # HANGUL SYLLABLE IEUNG-WAE-RIEULMIEUM
+9ED0 C667 # HANGUL SYLLABLE IEUNG-WAE-RIEULPIEUP
+9ED1 C668 # HANGUL SYLLABLE IEUNG-WAE-RIEULSIOS
+9ED2 C669 # HANGUL SYLLABLE IEUNG-WAE-RIEULTHIEUTH
+9ED3 C66A # HANGUL SYLLABLE IEUNG-WAE-RIEULPHIEUPH
+9ED4 C66B # HANGUL SYLLABLE IEUNG-WAE-RIEULHIEUH
+9ED5 C66D # HANGUL SYLLABLE IEUNG-WAE-PIEUP
+9ED6 C66E # HANGUL SYLLABLE IEUNG-WAE-PIEUPSIOS
+9ED7 C670 # HANGUL SYLLABLE IEUNG-WAE-SSANGSIOS
+9ED8 C672 # HANGUL SYLLABLE IEUNG-WAE-CIEUC
+9ED9 C673 # HANGUL SYLLABLE IEUNG-WAE-CHIEUCH
+9EDA C674 # HANGUL SYLLABLE IEUNG-WAE-KHIEUKH
+9EDB C675 # HANGUL SYLLABLE IEUNG-WAE-THIEUTH
+9EDC C676 # HANGUL SYLLABLE IEUNG-WAE-PHIEUPH
+9EDD C677 # HANGUL SYLLABLE IEUNG-WAE-HIEUH
+9EDE C67A # HANGUL SYLLABLE IEUNG-OE-SSANGKIYEOK
+9EDF C67B # HANGUL SYLLABLE IEUNG-OE-KIYEOKSIOS
+9EE0 C67D # HANGUL SYLLABLE IEUNG-OE-NIEUNCIEUC
+9EE1 C67E # HANGUL SYLLABLE IEUNG-OE-NIEUNHIEUH
+9EE2 C67F # HANGUL SYLLABLE IEUNG-OE-TIKEUT
+9EE3 C681 # HANGUL SYLLABLE IEUNG-OE-RIEULKIYEOK
+9EE4 C682 # HANGUL SYLLABLE IEUNG-OE-RIEULMIEUM
+9EE5 C683 # HANGUL SYLLABLE IEUNG-OE-RIEULPIEUP
+9EE6 C684 # HANGUL SYLLABLE IEUNG-OE-RIEULSIOS
+9EE7 C685 # HANGUL SYLLABLE IEUNG-OE-RIEULTHIEUTH
+9EE8 C686 # HANGUL SYLLABLE IEUNG-OE-RIEULPHIEUPH
+9EE9 C687 # HANGUL SYLLABLE IEUNG-OE-RIEULHIEUH
+9EEA C68A # HANGUL SYLLABLE IEUNG-OE-PIEUPSIOS
+9EEB C68C # HANGUL SYLLABLE IEUNG-OE-SSANGSIOS
+9EEC C68E # HANGUL SYLLABLE IEUNG-OE-CIEUC
+9EED C68F # HANGUL SYLLABLE IEUNG-OE-CHIEUCH
+9EEE C690 # HANGUL SYLLABLE IEUNG-OE-KHIEUKH
+9EEF C691 # HANGUL SYLLABLE IEUNG-OE-THIEUTH
+9EF0 C692 # HANGUL SYLLABLE IEUNG-OE-PHIEUPH
+9EF1 C693 # HANGUL SYLLABLE IEUNG-OE-HIEUH
+9EF2 C696 # HANGUL SYLLABLE IEUNG-YO-SSANGKIYEOK
+9EF3 C697 # HANGUL SYLLABLE IEUNG-YO-KIYEOKSIOS
+9EF4 C699 # HANGUL SYLLABLE IEUNG-YO-NIEUNCIEUC
+9EF5 C69A # HANGUL SYLLABLE IEUNG-YO-NIEUNHIEUH
+9EF6 C69B # HANGUL SYLLABLE IEUNG-YO-TIKEUT
+9EF7 C69D # HANGUL SYLLABLE IEUNG-YO-RIEULKIYEOK
+9EF8 C69E # HANGUL SYLLABLE IEUNG-YO-RIEULMIEUM
+9EF9 C69F # HANGUL SYLLABLE IEUNG-YO-RIEULPIEUP
+9EFA C6A0 # HANGUL SYLLABLE IEUNG-YO-RIEULSIOS
+9EFB C6A1 # HANGUL SYLLABLE IEUNG-YO-RIEULTHIEUTH
+9EFC C6A2 # HANGUL SYLLABLE IEUNG-YO-RIEULPHIEUPH
+9EFD C6A3 # HANGUL SYLLABLE IEUNG-YO-RIEULHIEUH
+9EFE C6A6 # HANGUL SYLLABLE IEUNG-YO-PIEUPSIOS
+9F41 C6A8 # HANGUL SYLLABLE IEUNG-YO-SSANGSIOS
+9F42 C6AA # HANGUL SYLLABLE IEUNG-YO-CIEUC
+9F43 C6AB # HANGUL SYLLABLE IEUNG-YO-CHIEUCH
+9F44 C6AC # HANGUL SYLLABLE IEUNG-YO-KHIEUKH
+9F45 C6AD # HANGUL SYLLABLE IEUNG-YO-THIEUTH
+9F46 C6AE # HANGUL SYLLABLE IEUNG-YO-PHIEUPH
+9F47 C6AF # HANGUL SYLLABLE IEUNG-YO-HIEUH
+9F48 C6B2 # HANGUL SYLLABLE IEUNG-U-SSANGKIYEOK
+9F49 C6B3 # HANGUL SYLLABLE IEUNG-U-KIYEOKSIOS
+9F4A C6B5 # HANGUL SYLLABLE IEUNG-U-NIEUNCIEUC
+9F4B C6B6 # HANGUL SYLLABLE IEUNG-U-NIEUNHIEUH
+9F4C C6B7 # HANGUL SYLLABLE IEUNG-U-TIKEUT
+9F4D C6BB # HANGUL SYLLABLE IEUNG-U-RIEULPIEUP
+9F4E C6BC # HANGUL SYLLABLE IEUNG-U-RIEULSIOS
+9F4F C6BD # HANGUL SYLLABLE IEUNG-U-RIEULTHIEUTH
+9F50 C6BE # HANGUL SYLLABLE IEUNG-U-RIEULPHIEUPH
+9F51 C6BF # HANGUL SYLLABLE IEUNG-U-RIEULHIEUH
+9F52 C6C2 # HANGUL SYLLABLE IEUNG-U-PIEUPSIOS
+9F53 C6C4 # HANGUL SYLLABLE IEUNG-U-SSANGSIOS
+9F54 C6C6 # HANGUL SYLLABLE IEUNG-U-CIEUC
+9F55 C6C7 # HANGUL SYLLABLE IEUNG-U-CHIEUCH
+9F56 C6C8 # HANGUL SYLLABLE IEUNG-U-KHIEUKH
+9F57 C6C9 # HANGUL SYLLABLE IEUNG-U-THIEUTH
+9F58 C6CA # HANGUL SYLLABLE IEUNG-U-PHIEUPH
+9F59 C6CB # HANGUL SYLLABLE IEUNG-U-HIEUH
+9F5A C6CE # HANGUL SYLLABLE IEUNG-WEO-SSANGKIYEOK
+9F61 C6CF # HANGUL SYLLABLE IEUNG-WEO-KIYEOKSIOS
+9F62 C6D1 # HANGUL SYLLABLE IEUNG-WEO-NIEUNCIEUC
+9F63 C6D2 # HANGUL SYLLABLE IEUNG-WEO-NIEUNHIEUH
+9F64 C6D3 # HANGUL SYLLABLE IEUNG-WEO-TIKEUT
+9F65 C6D5 # HANGUL SYLLABLE IEUNG-WEO-RIEULKIYEOK
+9F66 C6D6 # HANGUL SYLLABLE IEUNG-WEO-RIEULMIEUM
+9F67 C6D7 # HANGUL SYLLABLE IEUNG-WEO-RIEULPIEUP
+9F68 C6D8 # HANGUL SYLLABLE IEUNG-WEO-RIEULSIOS
+9F69 C6D9 # HANGUL SYLLABLE IEUNG-WEO-RIEULTHIEUTH
+9F6A C6DA # HANGUL SYLLABLE IEUNG-WEO-RIEULPHIEUPH
+9F6B C6DB # HANGUL SYLLABLE IEUNG-WEO-RIEULHIEUH
+9F6C C6DE # HANGUL SYLLABLE IEUNG-WEO-PIEUPSIOS
+9F6D C6DF # HANGUL SYLLABLE IEUNG-WEO-SIOS
+9F6E C6E2 # HANGUL SYLLABLE IEUNG-WEO-CIEUC
+9F6F C6E3 # HANGUL SYLLABLE IEUNG-WEO-CHIEUCH
+9F70 C6E4 # HANGUL SYLLABLE IEUNG-WEO-KHIEUKH
+9F71 C6E5 # HANGUL SYLLABLE IEUNG-WEO-THIEUTH
+9F72 C6E6 # HANGUL SYLLABLE IEUNG-WEO-PHIEUPH
+9F73 C6E7 # HANGUL SYLLABLE IEUNG-WEO-HIEUH
+9F74 C6EA # HANGUL SYLLABLE IEUNG-WE-SSANGKIYEOK
+9F75 C6EB # HANGUL SYLLABLE IEUNG-WE-KIYEOKSIOS
+9F76 C6ED # HANGUL SYLLABLE IEUNG-WE-NIEUNCIEUC
+9F77 C6EE # HANGUL SYLLABLE IEUNG-WE-NIEUNHIEUH
+9F78 C6EF # HANGUL SYLLABLE IEUNG-WE-TIKEUT
+9F79 C6F1 # HANGUL SYLLABLE IEUNG-WE-RIEULKIYEOK
+9F7A C6F2 # HANGUL SYLLABLE IEUNG-WE-RIEULMIEUM
+9F81 C6F3 # HANGUL SYLLABLE IEUNG-WE-RIEULPIEUP
+9F82 C6F4 # HANGUL SYLLABLE IEUNG-WE-RIEULSIOS
+9F83 C6F5 # HANGUL SYLLABLE IEUNG-WE-RIEULTHIEUTH
+9F84 C6F6 # HANGUL SYLLABLE IEUNG-WE-RIEULPHIEUPH
+9F85 C6F7 # HANGUL SYLLABLE IEUNG-WE-RIEULHIEUH
+9F86 C6FA # HANGUL SYLLABLE IEUNG-WE-PIEUPSIOS
+9F87 C6FB # HANGUL SYLLABLE IEUNG-WE-SIOS
+9F88 C6FC # HANGUL SYLLABLE IEUNG-WE-SSANGSIOS
+9F89 C6FE # HANGUL SYLLABLE IEUNG-WE-CIEUC
+9F8A C6FF # HANGUL SYLLABLE IEUNG-WE-CHIEUCH
+9F8B C700 # HANGUL SYLLABLE IEUNG-WE-KHIEUKH
+9F8C C701 # HANGUL SYLLABLE IEUNG-WE-THIEUTH
+9F8D C702 # HANGUL SYLLABLE IEUNG-WE-PHIEUPH
+9F8E C703 # HANGUL SYLLABLE IEUNG-WE-HIEUH
+9F8F C706 # HANGUL SYLLABLE IEUNG-WI-SSANGKIYEOK
+9F90 C707 # HANGUL SYLLABLE IEUNG-WI-KIYEOKSIOS
+9F91 C709 # HANGUL SYLLABLE IEUNG-WI-NIEUNCIEUC
+9F92 C70A # HANGUL SYLLABLE IEUNG-WI-NIEUNHIEUH
+9F93 C70B # HANGUL SYLLABLE IEUNG-WI-TIKEUT
+9F94 C70D # HANGUL SYLLABLE IEUNG-WI-RIEULKIYEOK
+9F95 C70E # HANGUL SYLLABLE IEUNG-WI-RIEULMIEUM
+9F96 C70F # HANGUL SYLLABLE IEUNG-WI-RIEULPIEUP
+9F97 C710 # HANGUL SYLLABLE IEUNG-WI-RIEULSIOS
+9F98 C711 # HANGUL SYLLABLE IEUNG-WI-RIEULTHIEUTH
+9F99 C712 # HANGUL SYLLABLE IEUNG-WI-RIEULPHIEUPH
+9F9A C713 # HANGUL SYLLABLE IEUNG-WI-RIEULHIEUH
+9F9B C716 # HANGUL SYLLABLE IEUNG-WI-PIEUPSIOS
+9F9C C718 # HANGUL SYLLABLE IEUNG-WI-SSANGSIOS
+9F9D C71A # HANGUL SYLLABLE IEUNG-WI-CIEUC
+9F9E C71B # HANGUL SYLLABLE IEUNG-WI-CHIEUCH
+9F9F C71C # HANGUL SYLLABLE IEUNG-WI-KHIEUKH
+9FA0 C71D # HANGUL SYLLABLE IEUNG-WI-THIEUTH
+9FA1 C71E # HANGUL SYLLABLE IEUNG-WI-PHIEUPH
+9FA2 C71F # HANGUL SYLLABLE IEUNG-WI-HIEUH
+9FA3 C722 # HANGUL SYLLABLE IEUNG-YU-SSANGKIYEOK
+9FA4 C723 # HANGUL SYLLABLE IEUNG-YU-KIYEOKSIOS
+9FA5 C725 # HANGUL SYLLABLE IEUNG-YU-NIEUNCIEUC
+9FA6 C726 # HANGUL SYLLABLE IEUNG-YU-NIEUNHIEUH
+9FA7 C727 # HANGUL SYLLABLE IEUNG-YU-TIKEUT
+9FA8 C729 # HANGUL SYLLABLE IEUNG-YU-RIEULKIYEOK
+9FA9 C72A # HANGUL SYLLABLE IEUNG-YU-RIEULMIEUM
+9FAA C72B # HANGUL SYLLABLE IEUNG-YU-RIEULPIEUP
+9FAB C72C # HANGUL SYLLABLE IEUNG-YU-RIEULSIOS
+9FAC C72D # HANGUL SYLLABLE IEUNG-YU-RIEULTHIEUTH
+9FAD C72E # HANGUL SYLLABLE IEUNG-YU-RIEULPHIEUPH
+9FAE C72F # HANGUL SYLLABLE IEUNG-YU-RIEULHIEUH
+9FAF C732 # HANGUL SYLLABLE IEUNG-YU-PIEUPSIOS
+9FB0 C734 # HANGUL SYLLABLE IEUNG-YU-SSANGSIOS
+9FB1 C736 # HANGUL SYLLABLE IEUNG-YU-CIEUC
+9FB2 C738 # HANGUL SYLLABLE IEUNG-YU-KHIEUKH
+9FB3 C739 # HANGUL SYLLABLE IEUNG-YU-THIEUTH
+9FB4 C73A # HANGUL SYLLABLE IEUNG-YU-PHIEUPH
+9FB5 C73B # HANGUL SYLLABLE IEUNG-YU-HIEUH
+9FB6 C73E # HANGUL SYLLABLE IEUNG-EU-SSANGKIYEOK
+9FB7 C73F # HANGUL SYLLABLE IEUNG-EU-KIYEOKSIOS
+9FB8 C741 # HANGUL SYLLABLE IEUNG-EU-NIEUNCIEUC
+9FB9 C742 # HANGUL SYLLABLE IEUNG-EU-NIEUNHIEUH
+9FBA C743 # HANGUL SYLLABLE IEUNG-EU-TIKEUT
+9FBB C745 # HANGUL SYLLABLE IEUNG-EU-RIEULKIYEOK
+9FBC C746 # HANGUL SYLLABLE IEUNG-EU-RIEULMIEUM
+9FBD C747 # HANGUL SYLLABLE IEUNG-EU-RIEULPIEUP
+9FBE C748 # HANGUL SYLLABLE IEUNG-EU-RIEULSIOS
+9FBF C749 # HANGUL SYLLABLE IEUNG-EU-RIEULTHIEUTH
+9FC0 C74B # HANGUL SYLLABLE IEUNG-EU-RIEULHIEUH
+9FC1 C74E # HANGUL SYLLABLE IEUNG-EU-PIEUPSIOS
+9FC2 C750 # HANGUL SYLLABLE IEUNG-EU-SSANGSIOS
+9FC3 C759 # HANGUL SYLLABLE IEUNG-YI-KIYEOK
+9FC4 C75A # HANGUL SYLLABLE IEUNG-YI-SSANGKIYEOK
+9FC5 C75B # HANGUL SYLLABLE IEUNG-YI-KIYEOKSIOS
+9FC6 C75D # HANGUL SYLLABLE IEUNG-YI-NIEUNCIEUC
+9FC7 C75E # HANGUL SYLLABLE IEUNG-YI-NIEUNHIEUH
+9FC8 C75F # HANGUL SYLLABLE IEUNG-YI-TIKEUT
+9FC9 C761 # HANGUL SYLLABLE IEUNG-YI-RIEULKIYEOK
+9FCA C762 # HANGUL SYLLABLE IEUNG-YI-RIEULMIEUM
+9FCB C763 # HANGUL SYLLABLE IEUNG-YI-RIEULPIEUP
+9FCC C764 # HANGUL SYLLABLE IEUNG-YI-RIEULSIOS
+9FCD C765 # HANGUL SYLLABLE IEUNG-YI-RIEULTHIEUTH
+9FCE C766 # HANGUL SYLLABLE IEUNG-YI-RIEULPHIEUPH
+9FCF C767 # HANGUL SYLLABLE IEUNG-YI-RIEULHIEUH
+9FD0 C769 # HANGUL SYLLABLE IEUNG-YI-PIEUP
+9FD1 C76A # HANGUL SYLLABLE IEUNG-YI-PIEUPSIOS
+9FD2 C76C # HANGUL SYLLABLE IEUNG-YI-SSANGSIOS
+9FD3 C76D # HANGUL SYLLABLE IEUNG-YI-IEUNG
+9FD4 C76E # HANGUL SYLLABLE IEUNG-YI-CIEUC
+9FD5 C76F # HANGUL SYLLABLE IEUNG-YI-CHIEUCH
+9FD6 C770 # HANGUL SYLLABLE IEUNG-YI-KHIEUKH
+9FD7 C771 # HANGUL SYLLABLE IEUNG-YI-THIEUTH
+9FD8 C772 # HANGUL SYLLABLE IEUNG-YI-PHIEUPH
+9FD9 C773 # HANGUL SYLLABLE IEUNG-YI-HIEUH
+9FDA C776 # HANGUL SYLLABLE IEUNG-I-SSANGKIYEOK
+9FDB C777 # HANGUL SYLLABLE IEUNG-I-KIYEOKSIOS
+9FDC C779 # HANGUL SYLLABLE IEUNG-I-NIEUNCIEUC
+9FDD C77A # HANGUL SYLLABLE IEUNG-I-NIEUNHIEUH
+9FDE C77B # HANGUL SYLLABLE IEUNG-I-TIKEUT
+9FDF C77F # HANGUL SYLLABLE IEUNG-I-RIEULPIEUP
+9FE0 C780 # HANGUL SYLLABLE IEUNG-I-RIEULSIOS
+9FE1 C781 # HANGUL SYLLABLE IEUNG-I-RIEULTHIEUTH
+9FE2 C782 # HANGUL SYLLABLE IEUNG-I-RIEULPHIEUPH
+9FE3 C786 # HANGUL SYLLABLE IEUNG-I-PIEUPSIOS
+9FE4 C78B # HANGUL SYLLABLE IEUNG-I-CHIEUCH
+9FE5 C78C # HANGUL SYLLABLE IEUNG-I-KHIEUKH
+9FE6 C78D # HANGUL SYLLABLE IEUNG-I-THIEUTH
+9FE7 C78F # HANGUL SYLLABLE IEUNG-I-HIEUH
+9FE8 C792 # HANGUL SYLLABLE CIEUC-A-SSANGKIYEOK
+9FE9 C793 # HANGUL SYLLABLE CIEUC-A-KIYEOKSIOS
+9FEA C795 # HANGUL SYLLABLE CIEUC-A-NIEUNCIEUC
+9FEB C799 # HANGUL SYLLABLE CIEUC-A-RIEULKIYEOK
+9FEC C79B # HANGUL SYLLABLE CIEUC-A-RIEULPIEUP
+9FED C79C # HANGUL SYLLABLE CIEUC-A-RIEULSIOS
+9FEE C79D # HANGUL SYLLABLE CIEUC-A-RIEULTHIEUTH
+9FEF C79E # HANGUL SYLLABLE CIEUC-A-RIEULPHIEUPH
+9FF0 C79F # HANGUL SYLLABLE CIEUC-A-RIEULHIEUH
+9FF1 C7A2 # HANGUL SYLLABLE CIEUC-A-PIEUPSIOS
+9FF2 C7A7 # HANGUL SYLLABLE CIEUC-A-CHIEUCH
+9FF3 C7A8 # HANGUL SYLLABLE CIEUC-A-KHIEUKH
+9FF4 C7A9 # HANGUL SYLLABLE CIEUC-A-THIEUTH
+9FF5 C7AA # HANGUL SYLLABLE CIEUC-A-PHIEUPH
+9FF6 C7AB # HANGUL SYLLABLE CIEUC-A-HIEUH
+9FF7 C7AE # HANGUL SYLLABLE CIEUC-AE-SSANGKIYEOK
+9FF8 C7AF # HANGUL SYLLABLE CIEUC-AE-KIYEOKSIOS
+9FF9 C7B1 # HANGUL SYLLABLE CIEUC-AE-NIEUNCIEUC
+9FFA C7B2 # HANGUL SYLLABLE CIEUC-AE-NIEUNHIEUH
+9FFB C7B3 # HANGUL SYLLABLE CIEUC-AE-TIKEUT
+9FFC C7B5 # HANGUL SYLLABLE CIEUC-AE-RIEULKIYEOK
+9FFD C7B6 # HANGUL SYLLABLE CIEUC-AE-RIEULMIEUM
+9FFE C7B7 # HANGUL SYLLABLE CIEUC-AE-RIEULPIEUP
+A041 C7B8 # HANGUL SYLLABLE CIEUC-AE-RIEULSIOS
+A042 C7B9 # HANGUL SYLLABLE CIEUC-AE-RIEULTHIEUTH
+A043 C7BA # HANGUL SYLLABLE CIEUC-AE-RIEULPHIEUPH
+A044 C7BB # HANGUL SYLLABLE CIEUC-AE-RIEULHIEUH
+A045 C7BE # HANGUL SYLLABLE CIEUC-AE-PIEUPSIOS
+A046 C7C2 # HANGUL SYLLABLE CIEUC-AE-CIEUC
+A047 C7C3 # HANGUL SYLLABLE CIEUC-AE-CHIEUCH
+A048 C7C4 # HANGUL SYLLABLE CIEUC-AE-KHIEUKH
+A049 C7C5 # HANGUL SYLLABLE CIEUC-AE-THIEUTH
+A04A C7C6 # HANGUL SYLLABLE CIEUC-AE-PHIEUPH
+A04B C7C7 # HANGUL SYLLABLE CIEUC-AE-HIEUH
+A04C C7CA # HANGUL SYLLABLE CIEUC-YA-SSANGKIYEOK
+A04D C7CB # HANGUL SYLLABLE CIEUC-YA-KIYEOKSIOS
+A04E C7CD # HANGUL SYLLABLE CIEUC-YA-NIEUNCIEUC
+A04F C7CF # HANGUL SYLLABLE CIEUC-YA-TIKEUT
+A050 C7D1 # HANGUL SYLLABLE CIEUC-YA-RIEULKIYEOK
+A051 C7D2 # HANGUL SYLLABLE CIEUC-YA-RIEULMIEUM
+A052 C7D3 # HANGUL SYLLABLE CIEUC-YA-RIEULPIEUP
+A053 C7D4 # HANGUL SYLLABLE CIEUC-YA-RIEULSIOS
+A054 C7D5 # HANGUL SYLLABLE CIEUC-YA-RIEULTHIEUTH
+A055 C7D6 # HANGUL SYLLABLE CIEUC-YA-RIEULPHIEUPH
+A056 C7D7 # HANGUL SYLLABLE CIEUC-YA-RIEULHIEUH
+A057 C7D9 # HANGUL SYLLABLE CIEUC-YA-PIEUP
+A058 C7DA # HANGUL SYLLABLE CIEUC-YA-PIEUPSIOS
+A059 C7DB # HANGUL SYLLABLE CIEUC-YA-SIOS
+A05A C7DC # HANGUL SYLLABLE CIEUC-YA-SSANGSIOS
+A061 C7DE # HANGUL SYLLABLE CIEUC-YA-CIEUC
+A062 C7DF # HANGUL SYLLABLE CIEUC-YA-CHIEUCH
+A063 C7E0 # HANGUL SYLLABLE CIEUC-YA-KHIEUKH
+A064 C7E1 # HANGUL SYLLABLE CIEUC-YA-THIEUTH
+A065 C7E2 # HANGUL SYLLABLE CIEUC-YA-PHIEUPH
+A066 C7E3 # HANGUL SYLLABLE CIEUC-YA-HIEUH
+A067 C7E5 # HANGUL SYLLABLE CIEUC-YAE-KIYEOK
+A068 C7E6 # HANGUL SYLLABLE CIEUC-YAE-SSANGKIYEOK
+A069 C7E7 # HANGUL SYLLABLE CIEUC-YAE-KIYEOKSIOS
+A06A C7E9 # HANGUL SYLLABLE CIEUC-YAE-NIEUNCIEUC
+A06B C7EA # HANGUL SYLLABLE CIEUC-YAE-NIEUNHIEUH
+A06C C7EB # HANGUL SYLLABLE CIEUC-YAE-TIKEUT
+A06D C7ED # HANGUL SYLLABLE CIEUC-YAE-RIEULKIYEOK
+A06E C7EE # HANGUL SYLLABLE CIEUC-YAE-RIEULMIEUM
+A06F C7EF # HANGUL SYLLABLE CIEUC-YAE-RIEULPIEUP
+A070 C7F0 # HANGUL SYLLABLE CIEUC-YAE-RIEULSIOS
+A071 C7F1 # HANGUL SYLLABLE CIEUC-YAE-RIEULTHIEUTH
+A072 C7F2 # HANGUL SYLLABLE CIEUC-YAE-RIEULPHIEUPH
+A073 C7F3 # HANGUL SYLLABLE CIEUC-YAE-RIEULHIEUH
+A074 C7F4 # HANGUL SYLLABLE CIEUC-YAE-MIEUM
+A075 C7F5 # HANGUL SYLLABLE CIEUC-YAE-PIEUP
+A076 C7F6 # HANGUL SYLLABLE CIEUC-YAE-PIEUPSIOS
+A077 C7F7 # HANGUL SYLLABLE CIEUC-YAE-SIOS
+A078 C7F8 # HANGUL SYLLABLE CIEUC-YAE-SSANGSIOS
+A079 C7F9 # HANGUL SYLLABLE CIEUC-YAE-IEUNG
+A07A C7FA # HANGUL SYLLABLE CIEUC-YAE-CIEUC
+A081 C7FB # HANGUL SYLLABLE CIEUC-YAE-CHIEUCH
+A082 C7FC # HANGUL SYLLABLE CIEUC-YAE-KHIEUKH
+A083 C7FD # HANGUL SYLLABLE CIEUC-YAE-THIEUTH
+A084 C7FE # HANGUL SYLLABLE CIEUC-YAE-PHIEUPH
+A085 C7FF # HANGUL SYLLABLE CIEUC-YAE-HIEUH
+A086 C802 # HANGUL SYLLABLE CIEUC-EO-SSANGKIYEOK
+A087 C803 # HANGUL SYLLABLE CIEUC-EO-KIYEOKSIOS
+A088 C805 # HANGUL SYLLABLE CIEUC-EO-NIEUNCIEUC
+A089 C806 # HANGUL SYLLABLE CIEUC-EO-NIEUNHIEUH
+A08A C807 # HANGUL SYLLABLE CIEUC-EO-TIKEUT
+A08B C809 # HANGUL SYLLABLE CIEUC-EO-RIEULKIYEOK
+A08C C80B # HANGUL SYLLABLE CIEUC-EO-RIEULPIEUP
+A08D C80C # HANGUL SYLLABLE CIEUC-EO-RIEULSIOS
+A08E C80D # HANGUL SYLLABLE CIEUC-EO-RIEULTHIEUTH
+A08F C80E # HANGUL SYLLABLE CIEUC-EO-RIEULPHIEUPH
+A090 C80F # HANGUL SYLLABLE CIEUC-EO-RIEULHIEUH
+A091 C812 # HANGUL SYLLABLE CIEUC-EO-PIEUPSIOS
+A092 C814 # HANGUL SYLLABLE CIEUC-EO-SSANGSIOS
+A093 C817 # HANGUL SYLLABLE CIEUC-EO-CHIEUCH
+A094 C818 # HANGUL SYLLABLE CIEUC-EO-KHIEUKH
+A095 C819 # HANGUL SYLLABLE CIEUC-EO-THIEUTH
+A096 C81A # HANGUL SYLLABLE CIEUC-EO-PHIEUPH
+A097 C81B # HANGUL SYLLABLE CIEUC-EO-HIEUH
+A098 C81E # HANGUL SYLLABLE CIEUC-E-SSANGKIYEOK
+A099 C81F # HANGUL SYLLABLE CIEUC-E-KIYEOKSIOS
+A09A C821 # HANGUL SYLLABLE CIEUC-E-NIEUNCIEUC
+A09B C822 # HANGUL SYLLABLE CIEUC-E-NIEUNHIEUH
+A09C C823 # HANGUL SYLLABLE CIEUC-E-TIKEUT
+A09D C825 # HANGUL SYLLABLE CIEUC-E-RIEULKIYEOK
+A09E C826 # HANGUL SYLLABLE CIEUC-E-RIEULMIEUM
+A09F C827 # HANGUL SYLLABLE CIEUC-E-RIEULPIEUP
+A0A0 C828 # HANGUL SYLLABLE CIEUC-E-RIEULSIOS
+A0A1 C829 # HANGUL SYLLABLE CIEUC-E-RIEULTHIEUTH
+A0A2 C82A # HANGUL SYLLABLE CIEUC-E-RIEULPHIEUPH
+A0A3 C82B # HANGUL SYLLABLE CIEUC-E-RIEULHIEUH
+A0A4 C82E # HANGUL SYLLABLE CIEUC-E-PIEUPSIOS
+A0A5 C830 # HANGUL SYLLABLE CIEUC-E-SSANGSIOS
+A0A6 C832 # HANGUL SYLLABLE CIEUC-E-CIEUC
+A0A7 C833 # HANGUL SYLLABLE CIEUC-E-CHIEUCH
+A0A8 C834 # HANGUL SYLLABLE CIEUC-E-KHIEUKH
+A0A9 C835 # HANGUL SYLLABLE CIEUC-E-THIEUTH
+A0AA C836 # HANGUL SYLLABLE CIEUC-E-PHIEUPH
+A0AB C837 # HANGUL SYLLABLE CIEUC-E-HIEUH
+A0AC C839 # HANGUL SYLLABLE CIEUC-YEO-KIYEOK
+A0AD C83A # HANGUL SYLLABLE CIEUC-YEO-SSANGKIYEOK
+A0AE C83B # HANGUL SYLLABLE CIEUC-YEO-KIYEOKSIOS
+A0AF C83D # HANGUL SYLLABLE CIEUC-YEO-NIEUNCIEUC
+A0B0 C83E # HANGUL SYLLABLE CIEUC-YEO-NIEUNHIEUH
+A0B1 C83F # HANGUL SYLLABLE CIEUC-YEO-TIKEUT
+A0B2 C841 # HANGUL SYLLABLE CIEUC-YEO-RIEULKIYEOK
+A0B3 C842 # HANGUL SYLLABLE CIEUC-YEO-RIEULMIEUM
+A0B4 C843 # HANGUL SYLLABLE CIEUC-YEO-RIEULPIEUP
+A0B5 C844 # HANGUL SYLLABLE CIEUC-YEO-RIEULSIOS
+A0B6 C845 # HANGUL SYLLABLE CIEUC-YEO-RIEULTHIEUTH
+A0B7 C846 # HANGUL SYLLABLE CIEUC-YEO-RIEULPHIEUPH
+A0B8 C847 # HANGUL SYLLABLE CIEUC-YEO-RIEULHIEUH
+A0B9 C84A # HANGUL SYLLABLE CIEUC-YEO-PIEUPSIOS
+A0BA C84B # HANGUL SYLLABLE CIEUC-YEO-SIOS
+A0BB C84E # HANGUL SYLLABLE CIEUC-YEO-CIEUC
+A0BC C84F # HANGUL SYLLABLE CIEUC-YEO-CHIEUCH
+A0BD C850 # HANGUL SYLLABLE CIEUC-YEO-KHIEUKH
+A0BE C851 # HANGUL SYLLABLE CIEUC-YEO-THIEUTH
+A0BF C852 # HANGUL SYLLABLE CIEUC-YEO-PHIEUPH
+A0C0 C853 # HANGUL SYLLABLE CIEUC-YEO-HIEUH
+A0C1 C855 # HANGUL SYLLABLE CIEUC-YE-KIYEOK
+A0C2 C856 # HANGUL SYLLABLE CIEUC-YE-SSANGKIYEOK
+A0C3 C857 # HANGUL SYLLABLE CIEUC-YE-KIYEOKSIOS
+A0C4 C858 # HANGUL SYLLABLE CIEUC-YE-NIEUN
+A0C5 C859 # HANGUL SYLLABLE CIEUC-YE-NIEUNCIEUC
+A0C6 C85A # HANGUL SYLLABLE CIEUC-YE-NIEUNHIEUH
+A0C7 C85B # HANGUL SYLLABLE CIEUC-YE-TIKEUT
+A0C8 C85C # HANGUL SYLLABLE CIEUC-YE-RIEUL
+A0C9 C85D # HANGUL SYLLABLE CIEUC-YE-RIEULKIYEOK
+A0CA C85E # HANGUL SYLLABLE CIEUC-YE-RIEULMIEUM
+A0CB C85F # HANGUL SYLLABLE CIEUC-YE-RIEULPIEUP
+A0CC C860 # HANGUL SYLLABLE CIEUC-YE-RIEULSIOS
+A0CD C861 # HANGUL SYLLABLE CIEUC-YE-RIEULTHIEUTH
+A0CE C862 # HANGUL SYLLABLE CIEUC-YE-RIEULPHIEUPH
+A0CF C863 # HANGUL SYLLABLE CIEUC-YE-RIEULHIEUH
+A0D0 C864 # HANGUL SYLLABLE CIEUC-YE-MIEUM
+A0D1 C865 # HANGUL SYLLABLE CIEUC-YE-PIEUP
+A0D2 C866 # HANGUL SYLLABLE CIEUC-YE-PIEUPSIOS
+A0D3 C867 # HANGUL SYLLABLE CIEUC-YE-SIOS
+A0D4 C868 # HANGUL SYLLABLE CIEUC-YE-SSANGSIOS
+A0D5 C869 # HANGUL SYLLABLE CIEUC-YE-IEUNG
+A0D6 C86A # HANGUL SYLLABLE CIEUC-YE-CIEUC
+A0D7 C86B # HANGUL SYLLABLE CIEUC-YE-CHIEUCH
+A0D8 C86C # HANGUL SYLLABLE CIEUC-YE-KHIEUKH
+A0D9 C86D # HANGUL SYLLABLE CIEUC-YE-THIEUTH
+A0DA C86E # HANGUL SYLLABLE CIEUC-YE-PHIEUPH
+A0DB C86F # HANGUL SYLLABLE CIEUC-YE-HIEUH
+A0DC C872 # HANGUL SYLLABLE CIEUC-O-SSANGKIYEOK
+A0DD C873 # HANGUL SYLLABLE CIEUC-O-KIYEOKSIOS
+A0DE C875 # HANGUL SYLLABLE CIEUC-O-NIEUNCIEUC
+A0DF C876 # HANGUL SYLLABLE CIEUC-O-NIEUNHIEUH
+A0E0 C877 # HANGUL SYLLABLE CIEUC-O-TIKEUT
+A0E1 C879 # HANGUL SYLLABLE CIEUC-O-RIEULKIYEOK
+A0E2 C87B # HANGUL SYLLABLE CIEUC-O-RIEULPIEUP
+A0E3 C87C # HANGUL SYLLABLE CIEUC-O-RIEULSIOS
+A0E4 C87D # HANGUL SYLLABLE CIEUC-O-RIEULTHIEUTH
+A0E5 C87E # HANGUL SYLLABLE CIEUC-O-RIEULPHIEUPH
+A0E6 C87F # HANGUL SYLLABLE CIEUC-O-RIEULHIEUH
+A0E7 C882 # HANGUL SYLLABLE CIEUC-O-PIEUPSIOS
+A0E8 C884 # HANGUL SYLLABLE CIEUC-O-SSANGSIOS
+A0E9 C888 # HANGUL SYLLABLE CIEUC-O-KHIEUKH
+A0EA C889 # HANGUL SYLLABLE CIEUC-O-THIEUTH
+A0EB C88A # HANGUL SYLLABLE CIEUC-O-PHIEUPH
+A0EC C88E # HANGUL SYLLABLE CIEUC-WA-SSANGKIYEOK
+A0ED C88F # HANGUL SYLLABLE CIEUC-WA-KIYEOKSIOS
+A0EE C890 # HANGUL SYLLABLE CIEUC-WA-NIEUN
+A0EF C891 # HANGUL SYLLABLE CIEUC-WA-NIEUNCIEUC
+A0F0 C892 # HANGUL SYLLABLE CIEUC-WA-NIEUNHIEUH
+A0F1 C893 # HANGUL SYLLABLE CIEUC-WA-TIKEUT
+A0F2 C895 # HANGUL SYLLABLE CIEUC-WA-RIEULKIYEOK
+A0F3 C896 # HANGUL SYLLABLE CIEUC-WA-RIEULMIEUM
+A0F4 C897 # HANGUL SYLLABLE CIEUC-WA-RIEULPIEUP
+A0F5 C898 # HANGUL SYLLABLE CIEUC-WA-RIEULSIOS
+A0F6 C899 # HANGUL SYLLABLE CIEUC-WA-RIEULTHIEUTH
+A0F7 C89A # HANGUL SYLLABLE CIEUC-WA-RIEULPHIEUPH
+A0F8 C89B # HANGUL SYLLABLE CIEUC-WA-RIEULHIEUH
+A0F9 C89C # HANGUL SYLLABLE CIEUC-WA-MIEUM
+A0FA C89E # HANGUL SYLLABLE CIEUC-WA-PIEUPSIOS
+A0FB C8A0 # HANGUL SYLLABLE CIEUC-WA-SSANGSIOS
+A0FC C8A2 # HANGUL SYLLABLE CIEUC-WA-CIEUC
+A0FD C8A3 # HANGUL SYLLABLE CIEUC-WA-CHIEUCH
+A0FE C8A4 # HANGUL SYLLABLE CIEUC-WA-KHIEUKH
+A141 C8A5 # HANGUL SYLLABLE CIEUC-WA-THIEUTH
+A142 C8A6 # HANGUL SYLLABLE CIEUC-WA-PHIEUPH
+A143 C8A7 # HANGUL SYLLABLE CIEUC-WA-HIEUH
+A144 C8A9 # HANGUL SYLLABLE CIEUC-WAE-KIYEOK
+A145 C8AA # HANGUL SYLLABLE CIEUC-WAE-SSANGKIYEOK
+A146 C8AB # HANGUL SYLLABLE CIEUC-WAE-KIYEOKSIOS
+A147 C8AC # HANGUL SYLLABLE CIEUC-WAE-NIEUN
+A148 C8AD # HANGUL SYLLABLE CIEUC-WAE-NIEUNCIEUC
+A149 C8AE # HANGUL SYLLABLE CIEUC-WAE-NIEUNHIEUH
+A14A C8AF # HANGUL SYLLABLE CIEUC-WAE-TIKEUT
+A14B C8B0 # HANGUL SYLLABLE CIEUC-WAE-RIEUL
+A14C C8B1 # HANGUL SYLLABLE CIEUC-WAE-RIEULKIYEOK
+A14D C8B2 # HANGUL SYLLABLE CIEUC-WAE-RIEULMIEUM
+A14E C8B3 # HANGUL SYLLABLE CIEUC-WAE-RIEULPIEUP
+A14F C8B4 # HANGUL SYLLABLE CIEUC-WAE-RIEULSIOS
+A150 C8B5 # HANGUL SYLLABLE CIEUC-WAE-RIEULTHIEUTH
+A151 C8B6 # HANGUL SYLLABLE CIEUC-WAE-RIEULPHIEUPH
+A152 C8B7 # HANGUL SYLLABLE CIEUC-WAE-RIEULHIEUH
+A153 C8B8 # HANGUL SYLLABLE CIEUC-WAE-MIEUM
+A154 C8B9 # HANGUL SYLLABLE CIEUC-WAE-PIEUP
+A155 C8BA # HANGUL SYLLABLE CIEUC-WAE-PIEUPSIOS
+A156 C8BB # HANGUL SYLLABLE CIEUC-WAE-SIOS
+A157 C8BE # HANGUL SYLLABLE CIEUC-WAE-CIEUC
+A158 C8BF # HANGUL SYLLABLE CIEUC-WAE-CHIEUCH
+A159 C8C0 # HANGUL SYLLABLE CIEUC-WAE-KHIEUKH
+A15A C8C1 # HANGUL SYLLABLE CIEUC-WAE-THIEUTH
+A161 C8C2 # HANGUL SYLLABLE CIEUC-WAE-PHIEUPH
+A162 C8C3 # HANGUL SYLLABLE CIEUC-WAE-HIEUH
+A163 C8C5 # HANGUL SYLLABLE CIEUC-OE-KIYEOK
+A164 C8C6 # HANGUL SYLLABLE CIEUC-OE-SSANGKIYEOK
+A165 C8C7 # HANGUL SYLLABLE CIEUC-OE-KIYEOKSIOS
+A166 C8C9 # HANGUL SYLLABLE CIEUC-OE-NIEUNCIEUC
+A167 C8CA # HANGUL SYLLABLE CIEUC-OE-NIEUNHIEUH
+A168 C8CB # HANGUL SYLLABLE CIEUC-OE-TIKEUT
+A169 C8CD # HANGUL SYLLABLE CIEUC-OE-RIEULKIYEOK
+A16A C8CE # HANGUL SYLLABLE CIEUC-OE-RIEULMIEUM
+A16B C8CF # HANGUL SYLLABLE CIEUC-OE-RIEULPIEUP
+A16C C8D0 # HANGUL SYLLABLE CIEUC-OE-RIEULSIOS
+A16D C8D1 # HANGUL SYLLABLE CIEUC-OE-RIEULTHIEUTH
+A16E C8D2 # HANGUL SYLLABLE CIEUC-OE-RIEULPHIEUPH
+A16F C8D3 # HANGUL SYLLABLE CIEUC-OE-RIEULHIEUH
+A170 C8D6 # HANGUL SYLLABLE CIEUC-OE-PIEUPSIOS
+A171 C8D8 # HANGUL SYLLABLE CIEUC-OE-SSANGSIOS
+A172 C8DA # HANGUL SYLLABLE CIEUC-OE-CIEUC
+A173 C8DB # HANGUL SYLLABLE CIEUC-OE-CHIEUCH
+A174 C8DC # HANGUL SYLLABLE CIEUC-OE-KHIEUKH
+A175 C8DD # HANGUL SYLLABLE CIEUC-OE-THIEUTH
+A176 C8DE # HANGUL SYLLABLE CIEUC-OE-PHIEUPH
+A177 C8DF # HANGUL SYLLABLE CIEUC-OE-HIEUH
+A178 C8E2 # HANGUL SYLLABLE CIEUC-YO-SSANGKIYEOK
+A179 C8E3 # HANGUL SYLLABLE CIEUC-YO-KIYEOKSIOS
+A17A C8E5 # HANGUL SYLLABLE CIEUC-YO-NIEUNCIEUC
+A181 C8E6 # HANGUL SYLLABLE CIEUC-YO-NIEUNHIEUH
+A182 C8E7 # HANGUL SYLLABLE CIEUC-YO-TIKEUT
+A183 C8E8 # HANGUL SYLLABLE CIEUC-YO-RIEUL
+A184 C8E9 # HANGUL SYLLABLE CIEUC-YO-RIEULKIYEOK
+A185 C8EA # HANGUL SYLLABLE CIEUC-YO-RIEULMIEUM
+A186 C8EB # HANGUL SYLLABLE CIEUC-YO-RIEULPIEUP
+A187 C8EC # HANGUL SYLLABLE CIEUC-YO-RIEULSIOS
+A188 C8ED # HANGUL SYLLABLE CIEUC-YO-RIEULTHIEUTH
+A189 C8EE # HANGUL SYLLABLE CIEUC-YO-RIEULPHIEUPH
+A18A C8EF # HANGUL SYLLABLE CIEUC-YO-RIEULHIEUH
+A18B C8F0 # HANGUL SYLLABLE CIEUC-YO-MIEUM
+A18C C8F1 # HANGUL SYLLABLE CIEUC-YO-PIEUP
+A18D C8F2 # HANGUL SYLLABLE CIEUC-YO-PIEUPSIOS
+A18E C8F3 # HANGUL SYLLABLE CIEUC-YO-SIOS
+A18F C8F4 # HANGUL SYLLABLE CIEUC-YO-SSANGSIOS
+A190 C8F6 # HANGUL SYLLABLE CIEUC-YO-CIEUC
+A191 C8F7 # HANGUL SYLLABLE CIEUC-YO-CHIEUCH
+A192 C8F8 # HANGUL SYLLABLE CIEUC-YO-KHIEUKH
+A193 C8F9 # HANGUL SYLLABLE CIEUC-YO-THIEUTH
+A194 C8FA # HANGUL SYLLABLE CIEUC-YO-PHIEUPH
+A195 C8FB # HANGUL SYLLABLE CIEUC-YO-HIEUH
+A196 C8FE # HANGUL SYLLABLE CIEUC-U-SSANGKIYEOK
+A197 C8FF # HANGUL SYLLABLE CIEUC-U-KIYEOKSIOS
+A198 C901 # HANGUL SYLLABLE CIEUC-U-NIEUNCIEUC
+A199 C902 # HANGUL SYLLABLE CIEUC-U-NIEUNHIEUH
+A19A C903 # HANGUL SYLLABLE CIEUC-U-TIKEUT
+A19B C907 # HANGUL SYLLABLE CIEUC-U-RIEULPIEUP
+A19C C908 # HANGUL SYLLABLE CIEUC-U-RIEULSIOS
+A19D C909 # HANGUL SYLLABLE CIEUC-U-RIEULTHIEUTH
+A19E C90A # HANGUL SYLLABLE CIEUC-U-RIEULPHIEUPH
+A19F C90B # HANGUL SYLLABLE CIEUC-U-RIEULHIEUH
+A1A0 C90E # HANGUL SYLLABLE CIEUC-U-PIEUPSIOS
+A1A1 3000 # IDEOGRAPHIC SPACE
+A1A2 3001 # IDEOGRAPHIC COMMA
+A1A3 3002 # IDEOGRAPHIC FULL STOP
+A1A4 00B7 # MIDDLE DOT
+A1A5 2025 # TWO DOT LEADER
+A1A6 2026 # HORIZONTAL ELLIPSIS
+A1A7 00A8 # DIAERESIS
+A1A8 3003 # DITTO MARK
+A1A9 00AD # SOFT HYPHEN
+A1AA 2015 # HORIZONTAL BAR
+A1AB 2225 # PARALLEL TO
+A1AC FF3C # FULLWIDTH REVERSE SOLIDUS
+A1AD 223C # TILDE OPERATOR
+A1AE 2018 # LEFT SINGLE QUOTATION MARK
+A1AF 2019 # RIGHT SINGLE QUOTATION MARK
+A1B0 201C # LEFT DOUBLE QUOTATION MARK
+A1B1 201D # RIGHT DOUBLE QUOTATION MARK
+A1B2 3014 # LEFT TORTOISE SHELL BRACKET
+A1B3 3015 # RIGHT TORTOISE SHELL BRACKET
+A1B4 3008 # LEFT ANGLE BRACKET
+A1B5 3009 # RIGHT ANGLE BRACKET
+A1B6 300A # LEFT DOUBLE ANGLE BRACKET
+A1B7 300B # RIGHT DOUBLE ANGLE BRACKET
+A1B8 300C # LEFT CORNER BRACKET
+A1B9 300D # RIGHT CORNER BRACKET
+A1BA 300E # LEFT WHITE CORNER BRACKET
+A1BB 300F # RIGHT WHITE CORNER BRACKET
+A1BC 3010 # LEFT BLACK LENTICULAR BRACKET
+A1BD 3011 # RIGHT BLACK LENTICULAR BRACKET
+A1BE 00B1 # PLUS-MINUS SIGN
+A1BF 00D7 # MULTIPLICATION SIGN
+A1C0 00F7 # DIVISION SIGN
+A1C1 2260 # NOT EQUAL TO
+A1C2 2264 # LESS-THAN OR EQUAL TO
+A1C3 2265 # GREATER-THAN OR EQUAL TO
+A1C4 221E # INFINITY
+A1C5 2234 # THEREFORE
+A1C6 00B0 # DEGREE SIGN
+A1C7 2032 # PRIME
+A1C8 2033 # DOUBLE PRIME
+A1C9 2103 # DEGREE CELSIUS
+A1CA 212B # ANGSTROM SIGN
+A1CB FFE0 # FULLWIDTH CENT SIGN
+A1CC FFE1 # FULLWIDTH POUND SIGN
+A1CD FFE5 # FULLWIDTH YEN SIGN
+A1CE 2642 # MALE SIGN
+A1CF 2640 # FEMALE SIGN
+A1D0 2220 # ANGLE
+A1D1 22A5 # UP TACK
+A1D2 2312 # ARC
+A1D3 2202 # PARTIAL DIFFERENTIAL
+A1D4 2207 # NABLA
+A1D5 2261 # IDENTICAL TO
+A1D6 2252 # APPROXIMATELY EQUAL TO OR THE IMAGE OF
+A1D7 00A7 # SECTION SIGN
+A1D8 203B # REFERENCE MARK
+A1D9 2606 # WHITE STAR
+A1DA 2605 # BLACK STAR
+A1DB 25CB # WHITE CIRCLE
+A1DC 25CF # BLACK CIRCLE
+A1DD 25CE # BULLSEYE
+A1DE 25C7 # WHITE DIAMOND
+A1DF 25C6 # BLACK DIAMOND
+A1E0 25A1 # WHITE SQUARE
+A1E1 25A0 # BLACK SQUARE
+A1E2 25B3 # WHITE UP-POINTING TRIANGLE
+A1E3 25B2 # BLACK UP-POINTING TRIANGLE
+A1E4 25BD # WHITE DOWN-POINTING TRIANGLE
+A1E5 25BC # BLACK DOWN-POINTING TRIANGLE
+A1E6 2192 # RIGHTWARDS ARROW
+A1E7 2190 # LEFTWARDS ARROW
+A1E8 2191 # UPWARDS ARROW
+A1E9 2193 # DOWNWARDS ARROW
+A1EA 2194 # LEFT RIGHT ARROW
+A1EB 3013 # GETA MARK
+A1EC 226A # MUCH LESS-THAN
+A1ED 226B # MUCH GREATER-THAN
+A1EE 221A # SQUARE ROOT
+A1EF 223D # REVERSED TILDE
+A1F0 221D # PROPORTIONAL TO
+A1F1 2235 # BECAUSE
+A1F2 222B # INTEGRAL
+A1F3 222C # DOUBLE INTEGRAL
+A1F4 2208 # ELEMENT OF
+A1F5 220B # CONTAINS AS MEMBER
+A1F6 2286 # SUBSET OF OR EQUAL TO
+A1F7 2287 # SUPERSET OF OR EQUAL TO
+A1F8 2282 # SUBSET OF
+A1F9 2283 # SUPERSET OF
+A1FA 222A # UNION
+A1FB 2229 # INTERSECTION
+A1FC 2227 # LOGICAL AND
+A1FD 2228 # LOGICAL OR
+A1FE FFE2 # FULLWIDTH NOT SIGN
+A241 C910 # HANGUL SYLLABLE CIEUC-U-SSANGSIOS
+A242 C912 # HANGUL SYLLABLE CIEUC-U-CIEUC
+A243 C913 # HANGUL SYLLABLE CIEUC-U-CHIEUCH
+A244 C914 # HANGUL SYLLABLE CIEUC-U-KHIEUKH
+A245 C915 # HANGUL SYLLABLE CIEUC-U-THIEUTH
+A246 C916 # HANGUL SYLLABLE CIEUC-U-PHIEUPH
+A247 C917 # HANGUL SYLLABLE CIEUC-U-HIEUH
+A248 C919 # HANGUL SYLLABLE CIEUC-WEO-KIYEOK
+A249 C91A # HANGUL SYLLABLE CIEUC-WEO-SSANGKIYEOK
+A24A C91B # HANGUL SYLLABLE CIEUC-WEO-KIYEOKSIOS
+A24B C91C # HANGUL SYLLABLE CIEUC-WEO-NIEUN
+A24C C91D # HANGUL SYLLABLE CIEUC-WEO-NIEUNCIEUC
+A24D C91E # HANGUL SYLLABLE CIEUC-WEO-NIEUNHIEUH
+A24E C91F # HANGUL SYLLABLE CIEUC-WEO-TIKEUT
+A24F C920 # HANGUL SYLLABLE CIEUC-WEO-RIEUL
+A250 C921 # HANGUL SYLLABLE CIEUC-WEO-RIEULKIYEOK
+A251 C922 # HANGUL SYLLABLE CIEUC-WEO-RIEULMIEUM
+A252 C923 # HANGUL SYLLABLE CIEUC-WEO-RIEULPIEUP
+A253 C924 # HANGUL SYLLABLE CIEUC-WEO-RIEULSIOS
+A254 C925 # HANGUL SYLLABLE CIEUC-WEO-RIEULTHIEUTH
+A255 C926 # HANGUL SYLLABLE CIEUC-WEO-RIEULPHIEUPH
+A256 C927 # HANGUL SYLLABLE CIEUC-WEO-RIEULHIEUH
+A257 C928 # HANGUL SYLLABLE CIEUC-WEO-MIEUM
+A258 C929 # HANGUL SYLLABLE CIEUC-WEO-PIEUP
+A259 C92A # HANGUL SYLLABLE CIEUC-WEO-PIEUPSIOS
+A25A C92B # HANGUL SYLLABLE CIEUC-WEO-SIOS
+A261 C92D # HANGUL SYLLABLE CIEUC-WEO-IEUNG
+A262 C92E # HANGUL SYLLABLE CIEUC-WEO-CIEUC
+A263 C92F # HANGUL SYLLABLE CIEUC-WEO-CHIEUCH
+A264 C930 # HANGUL SYLLABLE CIEUC-WEO-KHIEUKH
+A265 C931 # HANGUL SYLLABLE CIEUC-WEO-THIEUTH
+A266 C932 # HANGUL SYLLABLE CIEUC-WEO-PHIEUPH
+A267 C933 # HANGUL SYLLABLE CIEUC-WEO-HIEUH
+A268 C935 # HANGUL SYLLABLE CIEUC-WE-KIYEOK
+A269 C936 # HANGUL SYLLABLE CIEUC-WE-SSANGKIYEOK
+A26A C937 # HANGUL SYLLABLE CIEUC-WE-KIYEOKSIOS
+A26B C938 # HANGUL SYLLABLE CIEUC-WE-NIEUN
+A26C C939 # HANGUL SYLLABLE CIEUC-WE-NIEUNCIEUC
+A26D C93A # HANGUL SYLLABLE CIEUC-WE-NIEUNHIEUH
+A26E C93B # HANGUL SYLLABLE CIEUC-WE-TIKEUT
+A26F C93C # HANGUL SYLLABLE CIEUC-WE-RIEUL
+A270 C93D # HANGUL SYLLABLE CIEUC-WE-RIEULKIYEOK
+A271 C93E # HANGUL SYLLABLE CIEUC-WE-RIEULMIEUM
+A272 C93F # HANGUL SYLLABLE CIEUC-WE-RIEULPIEUP
+A273 C940 # HANGUL SYLLABLE CIEUC-WE-RIEULSIOS
+A274 C941 # HANGUL SYLLABLE CIEUC-WE-RIEULTHIEUTH
+A275 C942 # HANGUL SYLLABLE CIEUC-WE-RIEULPHIEUPH
+A276 C943 # HANGUL SYLLABLE CIEUC-WE-RIEULHIEUH
+A277 C944 # HANGUL SYLLABLE CIEUC-WE-MIEUM
+A278 C945 # HANGUL SYLLABLE CIEUC-WE-PIEUP
+A279 C946 # HANGUL SYLLABLE CIEUC-WE-PIEUPSIOS
+A27A C947 # HANGUL SYLLABLE CIEUC-WE-SIOS
+A281 C948 # HANGUL SYLLABLE CIEUC-WE-SSANGSIOS
+A282 C949 # HANGUL SYLLABLE CIEUC-WE-IEUNG
+A283 C94A # HANGUL SYLLABLE CIEUC-WE-CIEUC
+A284 C94B # HANGUL SYLLABLE CIEUC-WE-CHIEUCH
+A285 C94C # HANGUL SYLLABLE CIEUC-WE-KHIEUKH
+A286 C94D # HANGUL SYLLABLE CIEUC-WE-THIEUTH
+A287 C94E # HANGUL SYLLABLE CIEUC-WE-PHIEUPH
+A288 C94F # HANGUL SYLLABLE CIEUC-WE-HIEUH
+A289 C952 # HANGUL SYLLABLE CIEUC-WI-SSANGKIYEOK
+A28A C953 # HANGUL SYLLABLE CIEUC-WI-KIYEOKSIOS
+A28B C955 # HANGUL SYLLABLE CIEUC-WI-NIEUNCIEUC
+A28C C956 # HANGUL SYLLABLE CIEUC-WI-NIEUNHIEUH
+A28D C957 # HANGUL SYLLABLE CIEUC-WI-TIKEUT
+A28E C959 # HANGUL SYLLABLE CIEUC-WI-RIEULKIYEOK
+A28F C95A # HANGUL SYLLABLE CIEUC-WI-RIEULMIEUM
+A290 C95B # HANGUL SYLLABLE CIEUC-WI-RIEULPIEUP
+A291 C95C # HANGUL SYLLABLE CIEUC-WI-RIEULSIOS
+A292 C95D # HANGUL SYLLABLE CIEUC-WI-RIEULTHIEUTH
+A293 C95E # HANGUL SYLLABLE CIEUC-WI-RIEULPHIEUPH
+A294 C95F # HANGUL SYLLABLE CIEUC-WI-RIEULHIEUH
+A295 C962 # HANGUL SYLLABLE CIEUC-WI-PIEUPSIOS
+A296 C964 # HANGUL SYLLABLE CIEUC-WI-SSANGSIOS
+A297 C965 # HANGUL SYLLABLE CIEUC-WI-IEUNG
+A298 C966 # HANGUL SYLLABLE CIEUC-WI-CIEUC
+A299 C967 # HANGUL SYLLABLE CIEUC-WI-CHIEUCH
+A29A C968 # HANGUL SYLLABLE CIEUC-WI-KHIEUKH
+A29B C969 # HANGUL SYLLABLE CIEUC-WI-THIEUTH
+A29C C96A # HANGUL SYLLABLE CIEUC-WI-PHIEUPH
+A29D C96B # HANGUL SYLLABLE CIEUC-WI-HIEUH
+A29E C96D # HANGUL SYLLABLE CIEUC-YU-KIYEOK
+A29F C96E # HANGUL SYLLABLE CIEUC-YU-SSANGKIYEOK
+A2A0 C96F # HANGUL SYLLABLE CIEUC-YU-KIYEOKSIOS
+A2A1 21D2 # RIGHTWARDS DOUBLE ARROW
+A2A2 21D4 # LEFT RIGHT DOUBLE ARROW
+A2A3 2200 # FOR ALL
+A2A4 2203 # THERE EXISTS
+A2A5 00B4 # ACUTE ACCENT
+A2A6 FF5E # FULLWIDTH TILDE
+A2A7 02C7 # CARON
+A2A8 02D8 # BREVE
+A2A9 02DD # DOUBLE ACUTE ACCENT
+A2AA 02DA # RING ABOVE
+A2AB 02D9 # DOT ABOVE
+A2AC 00B8 # CEDILLA
+A2AD 02DB # OGONEK
+A2AE 00A1 # INVERTED EXCLAMATION MARK
+A2AF 00BF # INVERTED QUESTION MARK
+A2B0 02D0 # MODIFIER LETTER TRIANGULAR COLON
+A2B1 222E # CONTOUR INTEGRAL
+A2B2 2211 # N-ARY SUMMATION
+A2B3 220F # N-ARY PRODUCT
+A2B4 00A4 # CURRENCY SIGN
+A2B5 2109 # DEGREE FAHRENHEIT
+A2B6 2030 # PER MILLE SIGN
+A2B7 25C1 # WHITE LEFT-POINTING TRIANGLE
+A2B8 25C0 # BLACK LEFT-POINTING TRIANGLE
+A2B9 25B7 # WHITE RIGHT-POINTING TRIANGLE
+A2BA 25B6 # BLACK RIGHT-POINTING TRIANGLE
+A2BB 2664 # WHITE SPADE SUIT
+A2BC 2660 # BLACK SPADE SUIT
+A2BD 2661 # WHITE HEART SUIT
+A2BE 2665 # BLACK HEART SUIT
+A2BF 2667 # WHITE CLUB SUIT
+A2C0 2663 # BLACK CLUB SUIT
+A2C1 2299 # CIRCLED DOT OPERATOR
+A2C2 25C8 # WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND
+A2C3 25A3 # WHITE SQUARE CONTAINING BLACK SMALL SQUARE
+A2C4 25D0 # CIRCLE WITH LEFT HALF BLACK
+A2C5 25D1 # CIRCLE WITH RIGHT HALF BLACK
+A2C6 2592 # MEDIUM SHADE
+A2C7 25A4 # SQUARE WITH HORIZONTAL FILL
+A2C8 25A5 # SQUARE WITH VERTICAL FILL
+A2C9 25A8 # SQUARE WITH UPPER RIGHT TO LOWER LEFT FILL
+A2CA 25A7 # SQUARE WITH UPPER LEFT TO LOWER RIGHT FILL
+A2CB 25A6 # SQUARE WITH ORTHOGONAL CROSSHATCH FILL
+A2CC 25A9 # SQUARE WITH DIAGONAL CROSSHATCH FILL
+A2CD 2668 # HOT SPRINGS
+A2CE 260F # WHITE TELEPHONE
+A2CF 260E # BLACK TELEPHONE
+A2D0 261C # WHITE LEFT POINTING INDEX
+A2D1 261E # WHITE RIGHT POINTING INDEX
+A2D2 00B6 # PILCROW SIGN
+A2D3 2020 # DAGGER
+A2D4 2021 # DOUBLE DAGGER
+A2D5 2195 # UP DOWN ARROW
+A2D6 2197 # NORTH EAST ARROW
+A2D7 2199 # SOUTH WEST ARROW
+A2D8 2196 # NORTH WEST ARROW
+A2D9 2198 # SOUTH EAST ARROW
+A2DA 266D # MUSIC FLAT SIGN
+A2DB 2669 # QUARTER NOTE
+A2DC 266A # EIGHTH NOTE
+A2DD 266C # BEAMED SIXTEENTH NOTES
+A2DE 327F # KOREAN STANDARD SYMBOL
+A2DF 321C # PARENTHESIZED HANGUL CIEUC U
+A2E0 2116 # NUMERO SIGN
+A2E1 33C7 # SQUARE CO
+A2E2 2122 # TRADE MARK SIGN
+A2E3 33C2 # SQUARE AM
+A2E4 33D8 # SQUARE PM
+A2E5 2121 # TELEPHONE SIGN
+A341 C971 # HANGUL SYLLABLE CIEUC-YU-NIEUNCIEUC
+A342 C972 # HANGUL SYLLABLE CIEUC-YU-NIEUNHIEUH
+A343 C973 # HANGUL SYLLABLE CIEUC-YU-TIKEUT
+A344 C975 # HANGUL SYLLABLE CIEUC-YU-RIEULKIYEOK
+A345 C976 # HANGUL SYLLABLE CIEUC-YU-RIEULMIEUM
+A346 C977 # HANGUL SYLLABLE CIEUC-YU-RIEULPIEUP
+A347 C978 # HANGUL SYLLABLE CIEUC-YU-RIEULSIOS
+A348 C979 # HANGUL SYLLABLE CIEUC-YU-RIEULTHIEUTH
+A349 C97A # HANGUL SYLLABLE CIEUC-YU-RIEULPHIEUPH
+A34A C97B # HANGUL SYLLABLE CIEUC-YU-RIEULHIEUH
+A34B C97D # HANGUL SYLLABLE CIEUC-YU-PIEUP
+A34C C97E # HANGUL SYLLABLE CIEUC-YU-PIEUPSIOS
+A34D C97F # HANGUL SYLLABLE CIEUC-YU-SIOS
+A34E C980 # HANGUL SYLLABLE CIEUC-YU-SSANGSIOS
+A34F C981 # HANGUL SYLLABLE CIEUC-YU-IEUNG
+A350 C982 # HANGUL SYLLABLE CIEUC-YU-CIEUC
+A351 C983 # HANGUL SYLLABLE CIEUC-YU-CHIEUCH
+A352 C984 # HANGUL SYLLABLE CIEUC-YU-KHIEUKH
+A353 C985 # HANGUL SYLLABLE CIEUC-YU-THIEUTH
+A354 C986 # HANGUL SYLLABLE CIEUC-YU-PHIEUPH
+A355 C987 # HANGUL SYLLABLE CIEUC-YU-HIEUH
+A356 C98A # HANGUL SYLLABLE CIEUC-EU-SSANGKIYEOK
+A357 C98B # HANGUL SYLLABLE CIEUC-EU-KIYEOKSIOS
+A358 C98D # HANGUL SYLLABLE CIEUC-EU-NIEUNCIEUC
+A359 C98E # HANGUL SYLLABLE CIEUC-EU-NIEUNHIEUH
+A35A C98F # HANGUL SYLLABLE CIEUC-EU-TIKEUT
+A361 C991 # HANGUL SYLLABLE CIEUC-EU-RIEULKIYEOK
+A362 C992 # HANGUL SYLLABLE CIEUC-EU-RIEULMIEUM
+A363 C993 # HANGUL SYLLABLE CIEUC-EU-RIEULPIEUP
+A364 C994 # HANGUL SYLLABLE CIEUC-EU-RIEULSIOS
+A365 C995 # HANGUL SYLLABLE CIEUC-EU-RIEULTHIEUTH
+A366 C996 # HANGUL SYLLABLE CIEUC-EU-RIEULPHIEUPH
+A367 C997 # HANGUL SYLLABLE CIEUC-EU-RIEULHIEUH
+A368 C99A # HANGUL SYLLABLE CIEUC-EU-PIEUPSIOS
+A369 C99C # HANGUL SYLLABLE CIEUC-EU-SSANGSIOS
+A36A C99E # HANGUL SYLLABLE CIEUC-EU-CIEUC
+A36B C99F # HANGUL SYLLABLE CIEUC-EU-CHIEUCH
+A36C C9A0 # HANGUL SYLLABLE CIEUC-EU-KHIEUKH
+A36D C9A1 # HANGUL SYLLABLE CIEUC-EU-THIEUTH
+A36E C9A2 # HANGUL SYLLABLE CIEUC-EU-PHIEUPH
+A36F C9A3 # HANGUL SYLLABLE CIEUC-EU-HIEUH
+A370 C9A4 # HANGUL SYLLABLE CIEUC-YI
+A371 C9A5 # HANGUL SYLLABLE CIEUC-YI-KIYEOK
+A372 C9A6 # HANGUL SYLLABLE CIEUC-YI-SSANGKIYEOK
+A373 C9A7 # HANGUL SYLLABLE CIEUC-YI-KIYEOKSIOS
+A374 C9A8 # HANGUL SYLLABLE CIEUC-YI-NIEUN
+A375 C9A9 # HANGUL SYLLABLE CIEUC-YI-NIEUNCIEUC
+A376 C9AA # HANGUL SYLLABLE CIEUC-YI-NIEUNHIEUH
+A377 C9AB # HANGUL SYLLABLE CIEUC-YI-TIKEUT
+A378 C9AC # HANGUL SYLLABLE CIEUC-YI-RIEUL
+A379 C9AD # HANGUL SYLLABLE CIEUC-YI-RIEULKIYEOK
+A37A C9AE # HANGUL SYLLABLE CIEUC-YI-RIEULMIEUM
+A381 C9AF # HANGUL SYLLABLE CIEUC-YI-RIEULPIEUP
+A382 C9B0 # HANGUL SYLLABLE CIEUC-YI-RIEULSIOS
+A383 C9B1 # HANGUL SYLLABLE CIEUC-YI-RIEULTHIEUTH
+A384 C9B2 # HANGUL SYLLABLE CIEUC-YI-RIEULPHIEUPH
+A385 C9B3 # HANGUL SYLLABLE CIEUC-YI-RIEULHIEUH
+A386 C9B4 # HANGUL SYLLABLE CIEUC-YI-MIEUM
+A387 C9B5 # HANGUL SYLLABLE CIEUC-YI-PIEUP
+A388 C9B6 # HANGUL SYLLABLE CIEUC-YI-PIEUPSIOS
+A389 C9B7 # HANGUL SYLLABLE CIEUC-YI-SIOS
+A38A C9B8 # HANGUL SYLLABLE CIEUC-YI-SSANGSIOS
+A38B C9B9 # HANGUL SYLLABLE CIEUC-YI-IEUNG
+A38C C9BA # HANGUL SYLLABLE CIEUC-YI-CIEUC
+A38D C9BB # HANGUL SYLLABLE CIEUC-YI-CHIEUCH
+A38E C9BC # HANGUL SYLLABLE CIEUC-YI-KHIEUKH
+A38F C9BD # HANGUL SYLLABLE CIEUC-YI-THIEUTH
+A390 C9BE # HANGUL SYLLABLE CIEUC-YI-PHIEUPH
+A391 C9BF # HANGUL SYLLABLE CIEUC-YI-HIEUH
+A392 C9C2 # HANGUL SYLLABLE CIEUC-I-SSANGKIYEOK
+A393 C9C3 # HANGUL SYLLABLE CIEUC-I-KIYEOKSIOS
+A394 C9C5 # HANGUL SYLLABLE CIEUC-I-NIEUNCIEUC
+A395 C9C6 # HANGUL SYLLABLE CIEUC-I-NIEUNHIEUH
+A396 C9C9 # HANGUL SYLLABLE CIEUC-I-RIEULKIYEOK
+A397 C9CB # HANGUL SYLLABLE CIEUC-I-RIEULPIEUP
+A398 C9CC # HANGUL SYLLABLE CIEUC-I-RIEULSIOS
+A399 C9CD # HANGUL SYLLABLE CIEUC-I-RIEULTHIEUTH
+A39A C9CE # HANGUL SYLLABLE CIEUC-I-RIEULPHIEUPH
+A39B C9CF # HANGUL SYLLABLE CIEUC-I-RIEULHIEUH
+A39C C9D2 # HANGUL SYLLABLE CIEUC-I-PIEUPSIOS
+A39D C9D4 # HANGUL SYLLABLE CIEUC-I-SSANGSIOS
+A39E C9D7 # HANGUL SYLLABLE CIEUC-I-CHIEUCH
+A39F C9D8 # HANGUL SYLLABLE CIEUC-I-KHIEUKH
+A3A0 C9DB # HANGUL SYLLABLE CIEUC-I-HIEUH
+A3A1 FF01 # FULLWIDTH EXCLAMATION MARK
+A3A2 FF02 # FULLWIDTH QUOTATION MARK
+A3A3 FF03 # FULLWIDTH NUMBER SIGN
+A3A4 FF04 # FULLWIDTH DOLLAR SIGN
+A3A5 FF05 # FULLWIDTH PERCENT SIGN
+A3A6 FF06 # FULLWIDTH AMPERSAND
+A3A7 FF07 # FULLWIDTH APOSTROPHE
+A3A8 FF08 # FULLWIDTH LEFT PARENTHESIS
+A3A9 FF09 # FULLWIDTH RIGHT PARENTHESIS
+A3AA FF0A # FULLWIDTH ASTERISK
+A3AB FF0B # FULLWIDTH PLUS SIGN
+A3AC FF0C # FULLWIDTH COMMA
+A3AD FF0D # FULLWIDTH HYPHEN-MINUS
+A3AE FF0E # FULLWIDTH FULL STOP
+A3AF FF0F # FULLWIDTH SOLIDUS
+A3B0 FF10 # FULLWIDTH DIGIT ZERO
+A3B1 FF11 # FULLWIDTH DIGIT ONE
+A3B2 FF12 # FULLWIDTH DIGIT TWO
+A3B3 FF13 # FULLWIDTH DIGIT THREE
+A3B4 FF14 # FULLWIDTH DIGIT FOUR
+A3B5 FF15 # FULLWIDTH DIGIT FIVE
+A3B6 FF16 # FULLWIDTH DIGIT SIX
+A3B7 FF17 # FULLWIDTH DIGIT SEVEN
+A3B8 FF18 # FULLWIDTH DIGIT EIGHT
+A3B9 FF19 # FULLWIDTH DIGIT NINE
+A3BA FF1A # FULLWIDTH COLON
+A3BB FF1B # FULLWIDTH SEMICOLON
+A3BC FF1C # FULLWIDTH LESS-THAN SIGN
+A3BD FF1D # FULLWIDTH EQUALS SIGN
+A3BE FF1E # FULLWIDTH GREATER-THAN SIGN
+A3BF FF1F # FULLWIDTH QUESTION MARK
+A3C0 FF20 # FULLWIDTH COMMERCIAL AT
+A3C1 FF21 # FULLWIDTH LATIN CAPITAL LETTER A
+A3C2 FF22 # FULLWIDTH LATIN CAPITAL LETTER B
+A3C3 FF23 # FULLWIDTH LATIN CAPITAL LETTER C
+A3C4 FF24 # FULLWIDTH LATIN CAPITAL LETTER D
+A3C5 FF25 # FULLWIDTH LATIN CAPITAL LETTER E
+A3C6 FF26 # FULLWIDTH LATIN CAPITAL LETTER F
+A3C7 FF27 # FULLWIDTH LATIN CAPITAL LETTER G
+A3C8 FF28 # FULLWIDTH LATIN CAPITAL LETTER H
+A3C9 FF29 # FULLWIDTH LATIN CAPITAL LETTER I
+A3CA FF2A # FULLWIDTH LATIN CAPITAL LETTER J
+A3CB FF2B # FULLWIDTH LATIN CAPITAL LETTER K
+A3CC FF2C # FULLWIDTH LATIN CAPITAL LETTER L
+A3CD FF2D # FULLWIDTH LATIN CAPITAL LETTER M
+A3CE FF2E # FULLWIDTH LATIN CAPITAL LETTER N
+A3CF FF2F # FULLWIDTH LATIN CAPITAL LETTER O
+A3D0 FF30 # FULLWIDTH LATIN CAPITAL LETTER P
+A3D1 FF31 # FULLWIDTH LATIN CAPITAL LETTER Q
+A3D2 FF32 # FULLWIDTH LATIN CAPITAL LETTER R
+A3D3 FF33 # FULLWIDTH LATIN CAPITAL LETTER S
+A3D4 FF34 # FULLWIDTH LATIN CAPITAL LETTER T
+A3D5 FF35 # FULLWIDTH LATIN CAPITAL LETTER U
+A3D6 FF36 # FULLWIDTH LATIN CAPITAL LETTER V
+A3D7 FF37 # FULLWIDTH LATIN CAPITAL LETTER W
+A3D8 FF38 # FULLWIDTH LATIN CAPITAL LETTER X
+A3D9 FF39 # FULLWIDTH LATIN CAPITAL LETTER Y
+A3DA FF3A # FULLWIDTH LATIN CAPITAL LETTER Z
+A3DB FF3B # FULLWIDTH LEFT SQUARE BRACKET
+A3DC FFE6 # FULLWIDTH WON SIGN
+A3DD FF3D # FULLWIDTH RIGHT SQUARE BRACKET
+A3DE FF3E # FULLWIDTH CIRCUMFLEX ACCENT
+A3DF FF3F # FULLWIDTH LOW LINE
+A3E0 FF40 # FULLWIDTH GRAVE ACCENT
+A3E1 FF41 # FULLWIDTH LATIN SMALL LETTER A
+A3E2 FF42 # FULLWIDTH LATIN SMALL LETTER B
+A3E3 FF43 # FULLWIDTH LATIN SMALL LETTER C
+A3E4 FF44 # FULLWIDTH LATIN SMALL LETTER D
+A3E5 FF45 # FULLWIDTH LATIN SMALL LETTER E
+A3E6 FF46 # FULLWIDTH LATIN SMALL LETTER F
+A3E7 FF47 # FULLWIDTH LATIN SMALL LETTER G
+A3E8 FF48 # FULLWIDTH LATIN SMALL LETTER H
+A3E9 FF49 # FULLWIDTH LATIN SMALL LETTER I
+A3EA FF4A # FULLWIDTH LATIN SMALL LETTER J
+A3EB FF4B # FULLWIDTH LATIN SMALL LETTER K
+A3EC FF4C # FULLWIDTH LATIN SMALL LETTER L
+A3ED FF4D # FULLWIDTH LATIN SMALL LETTER M
+A3EE FF4E # FULLWIDTH LATIN SMALL LETTER N
+A3EF FF4F # FULLWIDTH LATIN SMALL LETTER O
+A3F0 FF50 # FULLWIDTH LATIN SMALL LETTER P
+A3F1 FF51 # FULLWIDTH LATIN SMALL LETTER Q
+A3F2 FF52 # FULLWIDTH LATIN SMALL LETTER R
+A3F3 FF53 # FULLWIDTH LATIN SMALL LETTER S
+A3F4 FF54 # FULLWIDTH LATIN SMALL LETTER T
+A3F5 FF55 # FULLWIDTH LATIN SMALL LETTER U
+A3F6 FF56 # FULLWIDTH LATIN SMALL LETTER V
+A3F7 FF57 # FULLWIDTH LATIN SMALL LETTER W
+A3F8 FF58 # FULLWIDTH LATIN SMALL LETTER X
+A3F9 FF59 # FULLWIDTH LATIN SMALL LETTER Y
+A3FA FF5A # FULLWIDTH LATIN SMALL LETTER Z
+A3FB FF5B # FULLWIDTH LEFT CURLY BRACKET
+A3FC FF5C # FULLWIDTH VERTICAL LINE
+A3FD FF5D # FULLWIDTH RIGHT CURLY BRACKET
+A3FE FFE3 # FULLWIDTH MACRON
+A441 C9DE # HANGUL SYLLABLE SSANGCIEUC-A-SSANGKIYEOK
+A442 C9DF # HANGUL SYLLABLE SSANGCIEUC-A-KIYEOKSIOS
+A443 C9E1 # HANGUL SYLLABLE SSANGCIEUC-A-NIEUNCIEUC
+A444 C9E3 # HANGUL SYLLABLE SSANGCIEUC-A-TIKEUT
+A445 C9E5 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULKIYEOK
+A446 C9E6 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULMIEUM
+A447 C9E8 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULSIOS
+A448 C9E9 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULTHIEUTH
+A449 C9EA # HANGUL SYLLABLE SSANGCIEUC-A-RIEULPHIEUPH
+A44A C9EB # HANGUL SYLLABLE SSANGCIEUC-A-RIEULHIEUH
+A44B C9EE # HANGUL SYLLABLE SSANGCIEUC-A-PIEUPSIOS
+A44C C9F2 # HANGUL SYLLABLE SSANGCIEUC-A-CIEUC
+A44D C9F3 # HANGUL SYLLABLE SSANGCIEUC-A-CHIEUCH
+A44E C9F4 # HANGUL SYLLABLE SSANGCIEUC-A-KHIEUKH
+A44F C9F5 # HANGUL SYLLABLE SSANGCIEUC-A-THIEUTH
+A450 C9F6 # HANGUL SYLLABLE SSANGCIEUC-A-PHIEUPH
+A451 C9F7 # HANGUL SYLLABLE SSANGCIEUC-A-HIEUH
+A452 C9FA # HANGUL SYLLABLE SSANGCIEUC-AE-SSANGKIYEOK
+A453 C9FB # HANGUL SYLLABLE SSANGCIEUC-AE-KIYEOKSIOS
+A454 C9FD # HANGUL SYLLABLE SSANGCIEUC-AE-NIEUNCIEUC
+A455 C9FE # HANGUL SYLLABLE SSANGCIEUC-AE-NIEUNHIEUH
+A456 C9FF # HANGUL SYLLABLE SSANGCIEUC-AE-TIKEUT
+A457 CA01 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULKIYEOK
+A458 CA02 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULMIEUM
+A459 CA03 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULPIEUP
+A45A CA04 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULSIOS
+A461 CA05 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULTHIEUTH
+A462 CA06 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULPHIEUPH
+A463 CA07 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULHIEUH
+A464 CA0A # HANGUL SYLLABLE SSANGCIEUC-AE-PIEUPSIOS
+A465 CA0E # HANGUL SYLLABLE SSANGCIEUC-AE-CIEUC
+A466 CA0F # HANGUL SYLLABLE SSANGCIEUC-AE-CHIEUCH
+A467 CA10 # HANGUL SYLLABLE SSANGCIEUC-AE-KHIEUKH
+A468 CA11 # HANGUL SYLLABLE SSANGCIEUC-AE-THIEUTH
+A469 CA12 # HANGUL SYLLABLE SSANGCIEUC-AE-PHIEUPH
+A46A CA13 # HANGUL SYLLABLE SSANGCIEUC-AE-HIEUH
+A46B CA15 # HANGUL SYLLABLE SSANGCIEUC-YA-KIYEOK
+A46C CA16 # HANGUL SYLLABLE SSANGCIEUC-YA-SSANGKIYEOK
+A46D CA17 # HANGUL SYLLABLE SSANGCIEUC-YA-KIYEOKSIOS
+A46E CA19 # HANGUL SYLLABLE SSANGCIEUC-YA-NIEUNCIEUC
+A46F CA1A # HANGUL SYLLABLE SSANGCIEUC-YA-NIEUNHIEUH
+A470 CA1B # HANGUL SYLLABLE SSANGCIEUC-YA-TIKEUT
+A471 CA1C # HANGUL SYLLABLE SSANGCIEUC-YA-RIEUL
+A472 CA1D # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULKIYEOK
+A473 CA1E # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULMIEUM
+A474 CA1F # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULPIEUP
+A475 CA20 # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULSIOS
+A476 CA21 # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULTHIEUTH
+A477 CA22 # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULPHIEUPH
+A478 CA23 # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULHIEUH
+A479 CA24 # HANGUL SYLLABLE SSANGCIEUC-YA-MIEUM
+A47A CA25 # HANGUL SYLLABLE SSANGCIEUC-YA-PIEUP
+A481 CA26 # HANGUL SYLLABLE SSANGCIEUC-YA-PIEUPSIOS
+A482 CA27 # HANGUL SYLLABLE SSANGCIEUC-YA-SIOS
+A483 CA28 # HANGUL SYLLABLE SSANGCIEUC-YA-SSANGSIOS
+A484 CA2A # HANGUL SYLLABLE SSANGCIEUC-YA-CIEUC
+A485 CA2B # HANGUL SYLLABLE SSANGCIEUC-YA-CHIEUCH
+A486 CA2C # HANGUL SYLLABLE SSANGCIEUC-YA-KHIEUKH
+A487 CA2D # HANGUL SYLLABLE SSANGCIEUC-YA-THIEUTH
+A488 CA2E # HANGUL SYLLABLE SSANGCIEUC-YA-PHIEUPH
+A489 CA2F # HANGUL SYLLABLE SSANGCIEUC-YA-HIEUH
+A48A CA30 # HANGUL SYLLABLE SSANGCIEUC-YAE
+A48B CA31 # HANGUL SYLLABLE SSANGCIEUC-YAE-KIYEOK
+A48C CA32 # HANGUL SYLLABLE SSANGCIEUC-YAE-SSANGKIYEOK
+A48D CA33 # HANGUL SYLLABLE SSANGCIEUC-YAE-KIYEOKSIOS
+A48E CA34 # HANGUL SYLLABLE SSANGCIEUC-YAE-NIEUN
+A48F CA35 # HANGUL SYLLABLE SSANGCIEUC-YAE-NIEUNCIEUC
+A490 CA36 # HANGUL SYLLABLE SSANGCIEUC-YAE-NIEUNHIEUH
+A491 CA37 # HANGUL SYLLABLE SSANGCIEUC-YAE-TIKEUT
+A492 CA38 # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEUL
+A493 CA39 # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULKIYEOK
+A494 CA3A # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULMIEUM
+A495 CA3B # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULPIEUP
+A496 CA3C # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULSIOS
+A497 CA3D # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULTHIEUTH
+A498 CA3E # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULPHIEUPH
+A499 CA3F # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULHIEUH
+A49A CA40 # HANGUL SYLLABLE SSANGCIEUC-YAE-MIEUM
+A49B CA41 # HANGUL SYLLABLE SSANGCIEUC-YAE-PIEUP
+A49C CA42 # HANGUL SYLLABLE SSANGCIEUC-YAE-PIEUPSIOS
+A49D CA43 # HANGUL SYLLABLE SSANGCIEUC-YAE-SIOS
+A49E CA44 # HANGUL SYLLABLE SSANGCIEUC-YAE-SSANGSIOS
+A49F CA45 # HANGUL SYLLABLE SSANGCIEUC-YAE-IEUNG
+A4A0 CA46 # HANGUL SYLLABLE SSANGCIEUC-YAE-CIEUC
+A4A1 3131 # HANGUL LETTER KIYEOK
+A4A2 3132 # HANGUL LETTER SSANGKIYEOK
+A4A3 3133 # HANGUL LETTER KIYEOK-SIOS
+A4A4 3134 # HANGUL LETTER NIEUN
+A4A5 3135 # HANGUL LETTER NIEUN-CIEUC
+A4A6 3136 # HANGUL LETTER NIEUN-HIEUH
+A4A7 3137 # HANGUL LETTER TIKEUT
+A4A8 3138 # HANGUL LETTER SSANGTIKEUT
+A4A9 3139 # HANGUL LETTER RIEUL
+A4AA 313A # HANGUL LETTER RIEUL-KIYEOK
+A4AB 313B # HANGUL LETTER RIEUL-MIEUM
+A4AC 313C # HANGUL LETTER RIEUL-PIEUP
+A4AD 313D # HANGUL LETTER RIEUL-SIOS
+A4AE 313E # HANGUL LETTER RIEUL-THIEUTH
+A4AF 313F # HANGUL LETTER RIEUL-PHIEUPH
+A4B0 3140 # HANGUL LETTER RIEUL-HIEUH
+A4B1 3141 # HANGUL LETTER MIEUM
+A4B2 3142 # HANGUL LETTER PIEUP
+A4B3 3143 # HANGUL LETTER SSANGPIEUP
+A4B4 3144 # HANGUL LETTER PIEUP-SIOS
+A4B5 3145 # HANGUL LETTER SIOS
+A4B6 3146 # HANGUL LETTER SSANGSIOS
+A4B7 3147 # HANGUL LETTER IEUNG
+A4B8 3148 # HANGUL LETTER CIEUC
+A4B9 3149 # HANGUL LETTER SSANGCIEUC
+A4BA 314A # HANGUL LETTER CHIEUCH
+A4BB 314B # HANGUL LETTER KHIEUKH
+A4BC 314C # HANGUL LETTER THIEUTH
+A4BD 314D # HANGUL LETTER PHIEUPH
+A4BE 314E # HANGUL LETTER HIEUH
+A4BF 314F # HANGUL LETTER A
+A4C0 3150 # HANGUL LETTER AE
+A4C1 3151 # HANGUL LETTER YA
+A4C2 3152 # HANGUL LETTER YAE
+A4C3 3153 # HANGUL LETTER EO
+A4C4 3154 # HANGUL LETTER E
+A4C5 3155 # HANGUL LETTER YEO
+A4C6 3156 # HANGUL LETTER YE
+A4C7 3157 # HANGUL LETTER O
+A4C8 3158 # HANGUL LETTER WA
+A4C9 3159 # HANGUL LETTER WAE
+A4CA 315A # HANGUL LETTER OE
+A4CB 315B # HANGUL LETTER YO
+A4CC 315C # HANGUL LETTER U
+A4CD 315D # HANGUL LETTER WEO
+A4CE 315E # HANGUL LETTER WE
+A4CF 315F # HANGUL LETTER WI
+A4D0 3160 # HANGUL LETTER YU
+A4D1 3161 # HANGUL LETTER EU
+A4D2 3162 # HANGUL LETTER YI
+A4D3 3163 # HANGUL LETTER I
+A4D4 3164 # HANGUL FILLER
+A4D5 3165 # HANGUL LETTER SSANGNIEUN
+A4D6 3166 # HANGUL LETTER NIEUN-TIKEUT
+A4D7 3167 # HANGUL LETTER NIEUN-SIOS
+A4D8 3168 # HANGUL LETTER NIEUN-PANSIOS
+A4D9 3169 # HANGUL LETTER RIEUL-KIYEOK-SIOS
+A4DA 316A # HANGUL LETTER RIEUL-TIKEUT
+A4DB 316B # HANGUL LETTER RIEUL-PIEUP-SIOS
+A4DC 316C # HANGUL LETTER RIEUL-PANSIOS
+A4DD 316D # HANGUL LETTER RIEUL-YEORINHIEUH
+A4DE 316E # HANGUL LETTER MIEUM-PIEUP
+A4DF 316F # HANGUL LETTER MIEUM-SIOS
+A4E0 3170 # HANGUL LETTER MIEUM-PANSIOS
+A4E1 3171 # HANGUL LETTER KAPYEOUNMIEUM
+A4E2 3172 # HANGUL LETTER PIEUP-KIYEOK
+A4E3 3173 # HANGUL LETTER PIEUP-TIKEUT
+A4E4 3174 # HANGUL LETTER PIEUP-SIOS-KIYEOK
+A4E5 3175 # HANGUL LETTER PIEUP-SIOS-TIKEUT
+A4E6 3176 # HANGUL LETTER PIEUP-CIEUC
+A4E7 3177 # HANGUL LETTER PIEUP-THIEUTH
+A4E8 3178 # HANGUL LETTER KAPYEOUNPIEUP
+A4E9 3179 # HANGUL LETTER KAPYEOUNSSANGPIEUP
+A4EA 317A # HANGUL LETTER SIOS-KIYEOK
+A4EB 317B # HANGUL LETTER SIOS-NIEUN
+A4EC 317C # HANGUL LETTER SIOS-TIKEUT
+A4ED 317D # HANGUL LETTER SIOS-PIEUP
+A4EE 317E # HANGUL LETTER SIOS-CIEUC
+A4EF 317F # HANGUL LETTER PANSIOS
+A4F0 3180 # HANGUL LETTER SSANGIEUNG
+A4F1 3181 # HANGUL LETTER YESIEUNG
+A4F2 3182 # HANGUL LETTER YESIEUNG-SIOS
+A4F3 3183 # HANGUL LETTER YESIEUNG-PANSIOS
+A4F4 3184 # HANGUL LETTER KAPYEOUNPHIEUPH
+A4F5 3185 # HANGUL LETTER SSANGHIEUH
+A4F6 3186 # HANGUL LETTER YEORINHIEUH
+A4F7 3187 # HANGUL LETTER YO-YA
+A4F8 3188 # HANGUL LETTER YO-YAE
+A4F9 3189 # HANGUL LETTER YO-I
+A4FA 318A # HANGUL LETTER YU-YEO
+A4FB 318B # HANGUL LETTER YU-YE
+A4FC 318C # HANGUL LETTER YU-I
+A4FD 318D # HANGUL LETTER ARAEA
+A4FE 318E # HANGUL LETTER ARAEAE
+A541 CA47 # HANGUL SYLLABLE SSANGCIEUC-YAE-CHIEUCH
+A542 CA48 # HANGUL SYLLABLE SSANGCIEUC-YAE-KHIEUKH
+A543 CA49 # HANGUL SYLLABLE SSANGCIEUC-YAE-THIEUTH
+A544 CA4A # HANGUL SYLLABLE SSANGCIEUC-YAE-PHIEUPH
+A545 CA4B # HANGUL SYLLABLE SSANGCIEUC-YAE-HIEUH
+A546 CA4E # HANGUL SYLLABLE SSANGCIEUC-EO-SSANGKIYEOK
+A547 CA4F # HANGUL SYLLABLE SSANGCIEUC-EO-KIYEOKSIOS
+A548 CA51 # HANGUL SYLLABLE SSANGCIEUC-EO-NIEUNCIEUC
+A549 CA52 # HANGUL SYLLABLE SSANGCIEUC-EO-NIEUNHIEUH
+A54A CA53 # HANGUL SYLLABLE SSANGCIEUC-EO-TIKEUT
+A54B CA55 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULKIYEOK
+A54C CA56 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULMIEUM
+A54D CA57 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULPIEUP
+A54E CA58 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULSIOS
+A54F CA59 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULTHIEUTH
+A550 CA5A # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULPHIEUPH
+A551 CA5B # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULHIEUH
+A552 CA5E # HANGUL SYLLABLE SSANGCIEUC-EO-PIEUPSIOS
+A553 CA62 # HANGUL SYLLABLE SSANGCIEUC-EO-CIEUC
+A554 CA63 # HANGUL SYLLABLE SSANGCIEUC-EO-CHIEUCH
+A555 CA64 # HANGUL SYLLABLE SSANGCIEUC-EO-KHIEUKH
+A556 CA65 # HANGUL SYLLABLE SSANGCIEUC-EO-THIEUTH
+A557 CA66 # HANGUL SYLLABLE SSANGCIEUC-EO-PHIEUPH
+A558 CA67 # HANGUL SYLLABLE SSANGCIEUC-EO-HIEUH
+A559 CA69 # HANGUL SYLLABLE SSANGCIEUC-E-KIYEOK
+A55A CA6A # HANGUL SYLLABLE SSANGCIEUC-E-SSANGKIYEOK
+A561 CA6B # HANGUL SYLLABLE SSANGCIEUC-E-KIYEOKSIOS
+A562 CA6C # HANGUL SYLLABLE SSANGCIEUC-E-NIEUN
+A563 CA6D # HANGUL SYLLABLE SSANGCIEUC-E-NIEUNCIEUC
+A564 CA6E # HANGUL SYLLABLE SSANGCIEUC-E-NIEUNHIEUH
+A565 CA6F # HANGUL SYLLABLE SSANGCIEUC-E-TIKEUT
+A566 CA70 # HANGUL SYLLABLE SSANGCIEUC-E-RIEUL
+A567 CA71 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULKIYEOK
+A568 CA72 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULMIEUM
+A569 CA73 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULPIEUP
+A56A CA74 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULSIOS
+A56B CA75 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULTHIEUTH
+A56C CA76 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULPHIEUPH
+A56D CA77 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULHIEUH
+A56E CA78 # HANGUL SYLLABLE SSANGCIEUC-E-MIEUM
+A56F CA79 # HANGUL SYLLABLE SSANGCIEUC-E-PIEUP
+A570 CA7A # HANGUL SYLLABLE SSANGCIEUC-E-PIEUPSIOS
+A571 CA7B # HANGUL SYLLABLE SSANGCIEUC-E-SIOS
+A572 CA7C # HANGUL SYLLABLE SSANGCIEUC-E-SSANGSIOS
+A573 CA7E # HANGUL SYLLABLE SSANGCIEUC-E-CIEUC
+A574 CA7F # HANGUL SYLLABLE SSANGCIEUC-E-CHIEUCH
+A575 CA80 # HANGUL SYLLABLE SSANGCIEUC-E-KHIEUKH
+A576 CA81 # HANGUL SYLLABLE SSANGCIEUC-E-THIEUTH
+A577 CA82 # HANGUL SYLLABLE SSANGCIEUC-E-PHIEUPH
+A578 CA83 # HANGUL SYLLABLE SSANGCIEUC-E-HIEUH
+A579 CA85 # HANGUL SYLLABLE SSANGCIEUC-YEO-KIYEOK
+A57A CA86 # HANGUL SYLLABLE SSANGCIEUC-YEO-SSANGKIYEOK
+A581 CA87 # HANGUL SYLLABLE SSANGCIEUC-YEO-KIYEOKSIOS
+A582 CA88 # HANGUL SYLLABLE SSANGCIEUC-YEO-NIEUN
+A583 CA89 # HANGUL SYLLABLE SSANGCIEUC-YEO-NIEUNCIEUC
+A584 CA8A # HANGUL SYLLABLE SSANGCIEUC-YEO-NIEUNHIEUH
+A585 CA8B # HANGUL SYLLABLE SSANGCIEUC-YEO-TIKEUT
+A586 CA8C # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEUL
+A587 CA8D # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULKIYEOK
+A588 CA8E # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULMIEUM
+A589 CA8F # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULPIEUP
+A58A CA90 # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULSIOS
+A58B CA91 # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULTHIEUTH
+A58C CA92 # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULPHIEUPH
+A58D CA93 # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULHIEUH
+A58E CA94 # HANGUL SYLLABLE SSANGCIEUC-YEO-MIEUM
+A58F CA95 # HANGUL SYLLABLE SSANGCIEUC-YEO-PIEUP
+A590 CA96 # HANGUL SYLLABLE SSANGCIEUC-YEO-PIEUPSIOS
+A591 CA97 # HANGUL SYLLABLE SSANGCIEUC-YEO-SIOS
+A592 CA99 # HANGUL SYLLABLE SSANGCIEUC-YEO-IEUNG
+A593 CA9A # HANGUL SYLLABLE SSANGCIEUC-YEO-CIEUC
+A594 CA9B # HANGUL SYLLABLE SSANGCIEUC-YEO-CHIEUCH
+A595 CA9C # HANGUL SYLLABLE SSANGCIEUC-YEO-KHIEUKH
+A596 CA9D # HANGUL SYLLABLE SSANGCIEUC-YEO-THIEUTH
+A597 CA9E # HANGUL SYLLABLE SSANGCIEUC-YEO-PHIEUPH
+A598 CA9F # HANGUL SYLLABLE SSANGCIEUC-YEO-HIEUH
+A599 CAA0 # HANGUL SYLLABLE SSANGCIEUC-YE
+A59A CAA1 # HANGUL SYLLABLE SSANGCIEUC-YE-KIYEOK
+A59B CAA2 # HANGUL SYLLABLE SSANGCIEUC-YE-SSANGKIYEOK
+A59C CAA3 # HANGUL SYLLABLE SSANGCIEUC-YE-KIYEOKSIOS
+A59D CAA4 # HANGUL SYLLABLE SSANGCIEUC-YE-NIEUN
+A59E CAA5 # HANGUL SYLLABLE SSANGCIEUC-YE-NIEUNCIEUC
+A59F CAA6 # HANGUL SYLLABLE SSANGCIEUC-YE-NIEUNHIEUH
+A5A0 CAA7 # HANGUL SYLLABLE SSANGCIEUC-YE-TIKEUT
+A5A1 2170 # SMALL ROMAN NUMERAL ONE
+A5A2 2171 # SMALL ROMAN NUMERAL TWO
+A5A3 2172 # SMALL ROMAN NUMERAL THREE
+A5A4 2173 # SMALL ROMAN NUMERAL FOUR
+A5A5 2174 # SMALL ROMAN NUMERAL FIVE
+A5A6 2175 # SMALL ROMAN NUMERAL SIX
+A5A7 2176 # SMALL ROMAN NUMERAL SEVEN
+A5A8 2177 # SMALL ROMAN NUMERAL EIGHT
+A5A9 2178 # SMALL ROMAN NUMERAL NINE
+A5AA 2179 # SMALL ROMAN NUMERAL TEN
+A5B0 2160 # ROMAN NUMERAL ONE
+A5B1 2161 # ROMAN NUMERAL TWO
+A5B2 2162 # ROMAN NUMERAL THREE
+A5B3 2163 # ROMAN NUMERAL FOUR
+A5B4 2164 # ROMAN NUMERAL FIVE
+A5B5 2165 # ROMAN NUMERAL SIX
+A5B6 2166 # ROMAN NUMERAL SEVEN
+A5B7 2167 # ROMAN NUMERAL EIGHT
+A5B8 2168 # ROMAN NUMERAL NINE
+A5B9 2169 # ROMAN NUMERAL TEN
+A5C1 0391 # GREEK CAPITAL LETTER ALPHA
+A5C2 0392 # GREEK CAPITAL LETTER BETA
+A5C3 0393 # GREEK CAPITAL LETTER GAMMA
+A5C4 0394 # GREEK CAPITAL LETTER DELTA
+A5C5 0395 # GREEK CAPITAL LETTER EPSILON
+A5C6 0396 # GREEK CAPITAL LETTER ZETA
+A5C7 0397 # GREEK CAPITAL LETTER ETA
+A5C8 0398 # GREEK CAPITAL LETTER THETA
+A5C9 0399 # GREEK CAPITAL LETTER IOTA
+A5CA 039A # GREEK CAPITAL LETTER KAPPA
+A5CB 039B # GREEK CAPITAL LETTER LAMDA
+A5CC 039C # GREEK CAPITAL LETTER MU
+A5CD 039D # GREEK CAPITAL LETTER NU
+A5CE 039E # GREEK CAPITAL LETTER XI
+A5CF 039F # GREEK CAPITAL LETTER OMICRON
+A5D0 03A0 # GREEK CAPITAL LETTER PI
+A5D1 03A1 # GREEK CAPITAL LETTER RHO
+A5D2 03A3 # GREEK CAPITAL LETTER SIGMA
+A5D3 03A4 # GREEK CAPITAL LETTER TAU
+A5D4 03A5 # GREEK CAPITAL LETTER UPSILON
+A5D5 03A6 # GREEK CAPITAL LETTER PHI
+A5D6 03A7 # GREEK CAPITAL LETTER CHI
+A5D7 03A8 # GREEK CAPITAL LETTER PSI
+A5D8 03A9 # GREEK CAPITAL LETTER OMEGA
+A5E1 03B1 # GREEK SMALL LETTER ALPHA
+A5E2 03B2 # GREEK SMALL LETTER BETA
+A5E3 03B3 # GREEK SMALL LETTER GAMMA
+A5E4 03B4 # GREEK SMALL LETTER DELTA
+A5E5 03B5 # GREEK SMALL LETTER EPSILON
+A5E6 03B6 # GREEK SMALL LETTER ZETA
+A5E7 03B7 # GREEK SMALL LETTER ETA
+A5E8 03B8 # GREEK SMALL LETTER THETA
+A5E9 03B9 # GREEK SMALL LETTER IOTA
+A5EA 03BA # GREEK SMALL LETTER KAPPA
+A5EB 03BB # GREEK SMALL LETTER LAMDA
+A5EC 03BC # GREEK SMALL LETTER MU
+A5ED 03BD # GREEK SMALL LETTER NU
+A5EE 03BE # GREEK SMALL LETTER XI
+A5EF 03BF # GREEK SMALL LETTER OMICRON
+A5F0 03C0 # GREEK SMALL LETTER PI
+A5F1 03C1 # GREEK SMALL LETTER RHO
+A5F2 03C3 # GREEK SMALL LETTER SIGMA
+A5F3 03C4 # GREEK SMALL LETTER TAU
+A5F4 03C5 # GREEK SMALL LETTER UPSILON
+A5F5 03C6 # GREEK SMALL LETTER PHI
+A5F6 03C7 # GREEK SMALL LETTER CHI
+A5F7 03C8 # GREEK SMALL LETTER PSI
+A5F8 03C9 # GREEK SMALL LETTER OMEGA
+A641 CAA8 # HANGUL SYLLABLE SSANGCIEUC-YE-RIEUL
+A642 CAA9 # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULKIYEOK
+A643 CAAA # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULMIEUM
+A644 CAAB # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULPIEUP
+A645 CAAC # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULSIOS
+A646 CAAD # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULTHIEUTH
+A647 CAAE # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULPHIEUPH
+A648 CAAF # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULHIEUH
+A649 CAB0 # HANGUL SYLLABLE SSANGCIEUC-YE-MIEUM
+A64A CAB1 # HANGUL SYLLABLE SSANGCIEUC-YE-PIEUP
+A64B CAB2 # HANGUL SYLLABLE SSANGCIEUC-YE-PIEUPSIOS
+A64C CAB3 # HANGUL SYLLABLE SSANGCIEUC-YE-SIOS
+A64D CAB4 # HANGUL SYLLABLE SSANGCIEUC-YE-SSANGSIOS
+A64E CAB5 # HANGUL SYLLABLE SSANGCIEUC-YE-IEUNG
+A64F CAB6 # HANGUL SYLLABLE SSANGCIEUC-YE-CIEUC
+A650 CAB7 # HANGUL SYLLABLE SSANGCIEUC-YE-CHIEUCH
+A651 CAB8 # HANGUL SYLLABLE SSANGCIEUC-YE-KHIEUKH
+A652 CAB9 # HANGUL SYLLABLE SSANGCIEUC-YE-THIEUTH
+A653 CABA # HANGUL SYLLABLE SSANGCIEUC-YE-PHIEUPH
+A654 CABB # HANGUL SYLLABLE SSANGCIEUC-YE-HIEUH
+A655 CABE # HANGUL SYLLABLE SSANGCIEUC-O-SSANGKIYEOK
+A656 CABF # HANGUL SYLLABLE SSANGCIEUC-O-KIYEOKSIOS
+A657 CAC1 # HANGUL SYLLABLE SSANGCIEUC-O-NIEUNCIEUC
+A658 CAC2 # HANGUL SYLLABLE SSANGCIEUC-O-NIEUNHIEUH
+A659 CAC3 # HANGUL SYLLABLE SSANGCIEUC-O-TIKEUT
+A65A CAC5 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULKIYEOK
+A661 CAC6 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULMIEUM
+A662 CAC7 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULPIEUP
+A663 CAC8 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULSIOS
+A664 CAC9 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULTHIEUTH
+A665 CACA # HANGUL SYLLABLE SSANGCIEUC-O-RIEULPHIEUPH
+A666 CACB # HANGUL SYLLABLE SSANGCIEUC-O-RIEULHIEUH
+A667 CACE # HANGUL SYLLABLE SSANGCIEUC-O-PIEUPSIOS
+A668 CAD0 # HANGUL SYLLABLE SSANGCIEUC-O-SSANGSIOS
+A669 CAD2 # HANGUL SYLLABLE SSANGCIEUC-O-CIEUC
+A66A CAD4 # HANGUL SYLLABLE SSANGCIEUC-O-KHIEUKH
+A66B CAD5 # HANGUL SYLLABLE SSANGCIEUC-O-THIEUTH
+A66C CAD6 # HANGUL SYLLABLE SSANGCIEUC-O-PHIEUPH
+A66D CAD7 # HANGUL SYLLABLE SSANGCIEUC-O-HIEUH
+A66E CADA # HANGUL SYLLABLE SSANGCIEUC-WA-SSANGKIYEOK
+A66F CADB # HANGUL SYLLABLE SSANGCIEUC-WA-KIYEOKSIOS
+A670 CADC # HANGUL SYLLABLE SSANGCIEUC-WA-NIEUN
+A671 CADD # HANGUL SYLLABLE SSANGCIEUC-WA-NIEUNCIEUC
+A672 CADE # HANGUL SYLLABLE SSANGCIEUC-WA-NIEUNHIEUH
+A673 CADF # HANGUL SYLLABLE SSANGCIEUC-WA-TIKEUT
+A674 CAE1 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULKIYEOK
+A675 CAE2 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULMIEUM
+A676 CAE3 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULPIEUP
+A677 CAE4 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULSIOS
+A678 CAE5 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULTHIEUTH
+A679 CAE6 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULPHIEUPH
+A67A CAE7 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULHIEUH
+A681 CAE8 # HANGUL SYLLABLE SSANGCIEUC-WA-MIEUM
+A682 CAE9 # HANGUL SYLLABLE SSANGCIEUC-WA-PIEUP
+A683 CAEA # HANGUL SYLLABLE SSANGCIEUC-WA-PIEUPSIOS
+A684 CAEB # HANGUL SYLLABLE SSANGCIEUC-WA-SIOS
+A685 CAED # HANGUL SYLLABLE SSANGCIEUC-WA-IEUNG
+A686 CAEE # HANGUL SYLLABLE SSANGCIEUC-WA-CIEUC
+A687 CAEF # HANGUL SYLLABLE SSANGCIEUC-WA-CHIEUCH
+A688 CAF0 # HANGUL SYLLABLE SSANGCIEUC-WA-KHIEUKH
+A689 CAF1 # HANGUL SYLLABLE SSANGCIEUC-WA-THIEUTH
+A68A CAF2 # HANGUL SYLLABLE SSANGCIEUC-WA-PHIEUPH
+A68B CAF3 # HANGUL SYLLABLE SSANGCIEUC-WA-HIEUH
+A68C CAF5 # HANGUL SYLLABLE SSANGCIEUC-WAE-KIYEOK
+A68D CAF6 # HANGUL SYLLABLE SSANGCIEUC-WAE-SSANGKIYEOK
+A68E CAF7 # HANGUL SYLLABLE SSANGCIEUC-WAE-KIYEOKSIOS
+A68F CAF8 # HANGUL SYLLABLE SSANGCIEUC-WAE-NIEUN
+A690 CAF9 # HANGUL SYLLABLE SSANGCIEUC-WAE-NIEUNCIEUC
+A691 CAFA # HANGUL SYLLABLE SSANGCIEUC-WAE-NIEUNHIEUH
+A692 CAFB # HANGUL SYLLABLE SSANGCIEUC-WAE-TIKEUT
+A693 CAFC # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEUL
+A694 CAFD # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULKIYEOK
+A695 CAFE # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULMIEUM
+A696 CAFF # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULPIEUP
+A697 CB00 # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULSIOS
+A698 CB01 # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULTHIEUTH
+A699 CB02 # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULPHIEUPH
+A69A CB03 # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULHIEUH
+A69B CB04 # HANGUL SYLLABLE SSANGCIEUC-WAE-MIEUM
+A69C CB05 # HANGUL SYLLABLE SSANGCIEUC-WAE-PIEUP
+A69D CB06 # HANGUL SYLLABLE SSANGCIEUC-WAE-PIEUPSIOS
+A69E CB07 # HANGUL SYLLABLE SSANGCIEUC-WAE-SIOS
+A69F CB09 # HANGUL SYLLABLE SSANGCIEUC-WAE-IEUNG
+A6A0 CB0A # HANGUL SYLLABLE SSANGCIEUC-WAE-CIEUC
+A6A1 2500 # BOX DRAWINGS LIGHT HORIZONTAL
+A6A2 2502 # BOX DRAWINGS LIGHT VERTICAL
+A6A3 250C # BOX DRAWINGS LIGHT DOWN AND RIGHT
+A6A4 2510 # BOX DRAWINGS LIGHT DOWN AND LEFT
+A6A5 2518 # BOX DRAWINGS LIGHT UP AND LEFT
+A6A6 2514 # BOX DRAWINGS LIGHT UP AND RIGHT
+A6A7 251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+A6A8 252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+A6A9 2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT
+A6AA 2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL
+A6AB 253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+A6AC 2501 # BOX DRAWINGS HEAVY HORIZONTAL
+A6AD 2503 # BOX DRAWINGS HEAVY VERTICAL
+A6AE 250F # BOX DRAWINGS HEAVY DOWN AND RIGHT
+A6AF 2513 # BOX DRAWINGS HEAVY DOWN AND LEFT
+A6B0 251B # BOX DRAWINGS HEAVY UP AND LEFT
+A6B1 2517 # BOX DRAWINGS HEAVY UP AND RIGHT
+A6B2 2523 # BOX DRAWINGS HEAVY VERTICAL AND RIGHT
+A6B3 2533 # BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
+A6B4 252B # BOX DRAWINGS HEAVY VERTICAL AND LEFT
+A6B5 253B # BOX DRAWINGS HEAVY UP AND HORIZONTAL
+A6B6 254B # BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
+A6B7 2520 # BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT
+A6B8 252F # BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY
+A6B9 2528 # BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT
+A6BA 2537 # BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY
+A6BB 253F # BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY
+A6BC 251D # BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY
+A6BD 2530 # BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT
+A6BE 2525 # BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY
+A6BF 2538 # BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT
+A6C0 2542 # BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT
+A6C1 2512 # BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT
+A6C2 2511 # BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY
+A6C3 251A # BOX DRAWINGS UP HEAVY AND LEFT LIGHT
+A6C4 2519 # BOX DRAWINGS UP LIGHT AND LEFT HEAVY
+A6C5 2516 # BOX DRAWINGS UP HEAVY AND RIGHT LIGHT
+A6C6 2515 # BOX DRAWINGS UP LIGHT AND RIGHT HEAVY
+A6C7 250E # BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT
+A6C8 250D # BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY
+A6C9 251E # BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT
+A6CA 251F # BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT
+A6CB 2521 # BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY
+A6CC 2522 # BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY
+A6CD 2526 # BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT
+A6CE 2527 # BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT
+A6CF 2529 # BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY
+A6D0 252A # BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY
+A6D1 252D # BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT
+A6D2 252E # BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT
+A6D3 2531 # BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY
+A6D4 2532 # BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY
+A6D5 2535 # BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT
+A6D6 2536 # BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT
+A6D7 2539 # BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY
+A6D8 253A # BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY
+A6D9 253D # BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT
+A6DA 253E # BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT
+A6DB 2540 # BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT
+A6DC 2541 # BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT
+A6DD 2543 # BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT
+A6DE 2544 # BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT
+A6DF 2545 # BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT
+A6E0 2546 # BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT
+A6E1 2547 # BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY
+A6E2 2548 # BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY
+A6E3 2549 # BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY
+A6E4 254A # BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY
+A741 CB0B # HANGUL SYLLABLE SSANGCIEUC-WAE-CHIEUCH
+A742 CB0C # HANGUL SYLLABLE SSANGCIEUC-WAE-KHIEUKH
+A743 CB0D # HANGUL SYLLABLE SSANGCIEUC-WAE-THIEUTH
+A744 CB0E # HANGUL SYLLABLE SSANGCIEUC-WAE-PHIEUPH
+A745 CB0F # HANGUL SYLLABLE SSANGCIEUC-WAE-HIEUH
+A746 CB11 # HANGUL SYLLABLE SSANGCIEUC-OE-KIYEOK
+A747 CB12 # HANGUL SYLLABLE SSANGCIEUC-OE-SSANGKIYEOK
+A748 CB13 # HANGUL SYLLABLE SSANGCIEUC-OE-KIYEOKSIOS
+A749 CB15 # HANGUL SYLLABLE SSANGCIEUC-OE-NIEUNCIEUC
+A74A CB16 # HANGUL SYLLABLE SSANGCIEUC-OE-NIEUNHIEUH
+A74B CB17 # HANGUL SYLLABLE SSANGCIEUC-OE-TIKEUT
+A74C CB19 # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULKIYEOK
+A74D CB1A # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULMIEUM
+A74E CB1B # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULPIEUP
+A74F CB1C # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULSIOS
+A750 CB1D # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULTHIEUTH
+A751 CB1E # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULPHIEUPH
+A752 CB1F # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULHIEUH
+A753 CB22 # HANGUL SYLLABLE SSANGCIEUC-OE-PIEUPSIOS
+A754 CB23 # HANGUL SYLLABLE SSANGCIEUC-OE-SIOS
+A755 CB24 # HANGUL SYLLABLE SSANGCIEUC-OE-SSANGSIOS
+A756 CB25 # HANGUL SYLLABLE SSANGCIEUC-OE-IEUNG
+A757 CB26 # HANGUL SYLLABLE SSANGCIEUC-OE-CIEUC
+A758 CB27 # HANGUL SYLLABLE SSANGCIEUC-OE-CHIEUCH
+A759 CB28 # HANGUL SYLLABLE SSANGCIEUC-OE-KHIEUKH
+A75A CB29 # HANGUL SYLLABLE SSANGCIEUC-OE-THIEUTH
+A761 CB2A # HANGUL SYLLABLE SSANGCIEUC-OE-PHIEUPH
+A762 CB2B # HANGUL SYLLABLE SSANGCIEUC-OE-HIEUH
+A763 CB2C # HANGUL SYLLABLE SSANGCIEUC-YO
+A764 CB2D # HANGUL SYLLABLE SSANGCIEUC-YO-KIYEOK
+A765 CB2E # HANGUL SYLLABLE SSANGCIEUC-YO-SSANGKIYEOK
+A766 CB2F # HANGUL SYLLABLE SSANGCIEUC-YO-KIYEOKSIOS
+A767 CB30 # HANGUL SYLLABLE SSANGCIEUC-YO-NIEUN
+A768 CB31 # HANGUL SYLLABLE SSANGCIEUC-YO-NIEUNCIEUC
+A769 CB32 # HANGUL SYLLABLE SSANGCIEUC-YO-NIEUNHIEUH
+A76A CB33 # HANGUL SYLLABLE SSANGCIEUC-YO-TIKEUT
+A76B CB34 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEUL
+A76C CB35 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULKIYEOK
+A76D CB36 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULMIEUM
+A76E CB37 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULPIEUP
+A76F CB38 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULSIOS
+A770 CB39 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULTHIEUTH
+A771 CB3A # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULPHIEUPH
+A772 CB3B # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULHIEUH
+A773 CB3C # HANGUL SYLLABLE SSANGCIEUC-YO-MIEUM
+A774 CB3D # HANGUL SYLLABLE SSANGCIEUC-YO-PIEUP
+A775 CB3E # HANGUL SYLLABLE SSANGCIEUC-YO-PIEUPSIOS
+A776 CB3F # HANGUL SYLLABLE SSANGCIEUC-YO-SIOS
+A777 CB40 # HANGUL SYLLABLE SSANGCIEUC-YO-SSANGSIOS
+A778 CB42 # HANGUL SYLLABLE SSANGCIEUC-YO-CIEUC
+A779 CB43 # HANGUL SYLLABLE SSANGCIEUC-YO-CHIEUCH
+A77A CB44 # HANGUL SYLLABLE SSANGCIEUC-YO-KHIEUKH
+A781 CB45 # HANGUL SYLLABLE SSANGCIEUC-YO-THIEUTH
+A782 CB46 # HANGUL SYLLABLE SSANGCIEUC-YO-PHIEUPH
+A783 CB47 # HANGUL SYLLABLE SSANGCIEUC-YO-HIEUH
+A784 CB4A # HANGUL SYLLABLE SSANGCIEUC-U-SSANGKIYEOK
+A785 CB4B # HANGUL SYLLABLE SSANGCIEUC-U-KIYEOKSIOS
+A786 CB4D # HANGUL SYLLABLE SSANGCIEUC-U-NIEUNCIEUC
+A787 CB4E # HANGUL SYLLABLE SSANGCIEUC-U-NIEUNHIEUH
+A788 CB4F # HANGUL SYLLABLE SSANGCIEUC-U-TIKEUT
+A789 CB51 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULKIYEOK
+A78A CB52 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULMIEUM
+A78B CB53 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULPIEUP
+A78C CB54 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULSIOS
+A78D CB55 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULTHIEUTH
+A78E CB56 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULPHIEUPH
+A78F CB57 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULHIEUH
+A790 CB5A # HANGUL SYLLABLE SSANGCIEUC-U-PIEUPSIOS
+A791 CB5B # HANGUL SYLLABLE SSANGCIEUC-U-SIOS
+A792 CB5C # HANGUL SYLLABLE SSANGCIEUC-U-SSANGSIOS
+A793 CB5E # HANGUL SYLLABLE SSANGCIEUC-U-CIEUC
+A794 CB5F # HANGUL SYLLABLE SSANGCIEUC-U-CHIEUCH
+A795 CB60 # HANGUL SYLLABLE SSANGCIEUC-U-KHIEUKH
+A796 CB61 # HANGUL SYLLABLE SSANGCIEUC-U-THIEUTH
+A797 CB62 # HANGUL SYLLABLE SSANGCIEUC-U-PHIEUPH
+A798 CB63 # HANGUL SYLLABLE SSANGCIEUC-U-HIEUH
+A799 CB65 # HANGUL SYLLABLE SSANGCIEUC-WEO-KIYEOK
+A79A CB66 # HANGUL SYLLABLE SSANGCIEUC-WEO-SSANGKIYEOK
+A79B CB67 # HANGUL SYLLABLE SSANGCIEUC-WEO-KIYEOKSIOS
+A79C CB68 # HANGUL SYLLABLE SSANGCIEUC-WEO-NIEUN
+A79D CB69 # HANGUL SYLLABLE SSANGCIEUC-WEO-NIEUNCIEUC
+A79E CB6A # HANGUL SYLLABLE SSANGCIEUC-WEO-NIEUNHIEUH
+A79F CB6B # HANGUL SYLLABLE SSANGCIEUC-WEO-TIKEUT
+A7A0 CB6C # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEUL
+A7A1 3395 # SQUARE MU L
+A7A2 3396 # SQUARE ML
+A7A3 3397 # SQUARE DL
+A7A4 2113 # SCRIPT SMALL L
+A7A5 3398 # SQUARE KL
+A7A6 33C4 # SQUARE CC
+A7A7 33A3 # SQUARE MM CUBED
+A7A8 33A4 # SQUARE CM CUBED
+A7A9 33A5 # SQUARE M CUBED
+A7AA 33A6 # SQUARE KM CUBED
+A7AB 3399 # SQUARE FM
+A7AC 339A # SQUARE NM
+A7AD 339B # SQUARE MU M
+A7AE 339C # SQUARE MM
+A7AF 339D # SQUARE CM
+A7B0 339E # SQUARE KM
+A7B1 339F # SQUARE MM SQUARED
+A7B2 33A0 # SQUARE CM SQUARED
+A7B3 33A1 # SQUARE M SQUARED
+A7B4 33A2 # SQUARE KM SQUARED
+A7B5 33CA # SQUARE HA
+A7B6 338D # SQUARE MU G
+A7B7 338E # SQUARE MG
+A7B8 338F # SQUARE KG
+A7B9 33CF # SQUARE KT
+A7BA 3388 # SQUARE CAL
+A7BB 3389 # SQUARE KCAL
+A7BC 33C8 # SQUARE DB
+A7BD 33A7 # SQUARE M OVER S
+A7BE 33A8 # SQUARE M OVER S SQUARED
+A7BF 33B0 # SQUARE PS
+A7C0 33B1 # SQUARE NS
+A7C1 33B2 # SQUARE MU S
+A7C2 33B3 # SQUARE MS
+A7C3 33B4 # SQUARE PV
+A7C4 33B5 # SQUARE NV
+A7C5 33B6 # SQUARE MU V
+A7C6 33B7 # SQUARE MV
+A7C7 33B8 # SQUARE KV
+A7C8 33B9 # SQUARE MV MEGA
+A7C9 3380 # SQUARE PA AMPS
+A7CA 3381 # SQUARE NA
+A7CB 3382 # SQUARE MU A
+A7CC 3383 # SQUARE MA
+A7CD 3384 # SQUARE KA
+A7CE 33BA # SQUARE PW
+A7CF 33BB # SQUARE NW
+A7D0 33BC # SQUARE MU W
+A7D1 33BD # SQUARE MW
+A7D2 33BE # SQUARE KW
+A7D3 33BF # SQUARE MW MEGA
+A7D4 3390 # SQUARE HZ
+A7D5 3391 # SQUARE KHZ
+A7D6 3392 # SQUARE MHZ
+A7D7 3393 # SQUARE GHZ
+A7D8 3394 # SQUARE THZ
+A7D9 2126 # OHM SIGN
+A7DA 33C0 # SQUARE K OHM
+A7DB 33C1 # SQUARE M OHM
+A7DC 338A # SQUARE PF
+A7DD 338B # SQUARE NF
+A7DE 338C # SQUARE MU F
+A7DF 33D6 # SQUARE MOL
+A7E0 33C5 # SQUARE CD
+A7E1 33AD # SQUARE RAD
+A7E2 33AE # SQUARE RAD OVER S
+A7E3 33AF # SQUARE RAD OVER S SQUARED
+A7E4 33DB # SQUARE SR
+A7E5 33A9 # SQUARE PA
+A7E6 33AA # SQUARE KPA
+A7E7 33AB # SQUARE MPA
+A7E8 33AC # SQUARE GPA
+A7E9 33DD # SQUARE WB
+A7EA 33D0 # SQUARE LM
+A7EB 33D3 # SQUARE LX
+A7EC 33C3 # SQUARE BQ
+A7ED 33C9 # SQUARE GY
+A7EE 33DC # SQUARE SV
+A7EF 33C6 # SQUARE C OVER KG
+A841 CB6D # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULKIYEOK
+A842 CB6E # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULMIEUM
+A843 CB6F # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULPIEUP
+A844 CB70 # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULSIOS
+A845 CB71 # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULTHIEUTH
+A846 CB72 # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULPHIEUPH
+A847 CB73 # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULHIEUH
+A848 CB74 # HANGUL SYLLABLE SSANGCIEUC-WEO-MIEUM
+A849 CB75 # HANGUL SYLLABLE SSANGCIEUC-WEO-PIEUP
+A84A CB76 # HANGUL SYLLABLE SSANGCIEUC-WEO-PIEUPSIOS
+A84B CB77 # HANGUL SYLLABLE SSANGCIEUC-WEO-SIOS
+A84C CB7A # HANGUL SYLLABLE SSANGCIEUC-WEO-CIEUC
+A84D CB7B # HANGUL SYLLABLE SSANGCIEUC-WEO-CHIEUCH
+A84E CB7C # HANGUL SYLLABLE SSANGCIEUC-WEO-KHIEUKH
+A84F CB7D # HANGUL SYLLABLE SSANGCIEUC-WEO-THIEUTH
+A850 CB7E # HANGUL SYLLABLE SSANGCIEUC-WEO-PHIEUPH
+A851 CB7F # HANGUL SYLLABLE SSANGCIEUC-WEO-HIEUH
+A852 CB80 # HANGUL SYLLABLE SSANGCIEUC-WE
+A853 CB81 # HANGUL SYLLABLE SSANGCIEUC-WE-KIYEOK
+A854 CB82 # HANGUL SYLLABLE SSANGCIEUC-WE-SSANGKIYEOK
+A855 CB83 # HANGUL SYLLABLE SSANGCIEUC-WE-KIYEOKSIOS
+A856 CB84 # HANGUL SYLLABLE SSANGCIEUC-WE-NIEUN
+A857 CB85 # HANGUL SYLLABLE SSANGCIEUC-WE-NIEUNCIEUC
+A858 CB86 # HANGUL SYLLABLE SSANGCIEUC-WE-NIEUNHIEUH
+A859 CB87 # HANGUL SYLLABLE SSANGCIEUC-WE-TIKEUT
+A85A CB88 # HANGUL SYLLABLE SSANGCIEUC-WE-RIEUL
+A861 CB89 # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULKIYEOK
+A862 CB8A # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULMIEUM
+A863 CB8B # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULPIEUP
+A864 CB8C # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULSIOS
+A865 CB8D # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULTHIEUTH
+A866 CB8E # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULPHIEUPH
+A867 CB8F # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULHIEUH
+A868 CB90 # HANGUL SYLLABLE SSANGCIEUC-WE-MIEUM
+A869 CB91 # HANGUL SYLLABLE SSANGCIEUC-WE-PIEUP
+A86A CB92 # HANGUL SYLLABLE SSANGCIEUC-WE-PIEUPSIOS
+A86B CB93 # HANGUL SYLLABLE SSANGCIEUC-WE-SIOS
+A86C CB94 # HANGUL SYLLABLE SSANGCIEUC-WE-SSANGSIOS
+A86D CB95 # HANGUL SYLLABLE SSANGCIEUC-WE-IEUNG
+A86E CB96 # HANGUL SYLLABLE SSANGCIEUC-WE-CIEUC
+A86F CB97 # HANGUL SYLLABLE SSANGCIEUC-WE-CHIEUCH
+A870 CB98 # HANGUL SYLLABLE SSANGCIEUC-WE-KHIEUKH
+A871 CB99 # HANGUL SYLLABLE SSANGCIEUC-WE-THIEUTH
+A872 CB9A # HANGUL SYLLABLE SSANGCIEUC-WE-PHIEUPH
+A873 CB9B # HANGUL SYLLABLE SSANGCIEUC-WE-HIEUH
+A874 CB9D # HANGUL SYLLABLE SSANGCIEUC-WI-KIYEOK
+A875 CB9E # HANGUL SYLLABLE SSANGCIEUC-WI-SSANGKIYEOK
+A876 CB9F # HANGUL SYLLABLE SSANGCIEUC-WI-KIYEOKSIOS
+A877 CBA0 # HANGUL SYLLABLE SSANGCIEUC-WI-NIEUN
+A878 CBA1 # HANGUL SYLLABLE SSANGCIEUC-WI-NIEUNCIEUC
+A879 CBA2 # HANGUL SYLLABLE SSANGCIEUC-WI-NIEUNHIEUH
+A87A CBA3 # HANGUL SYLLABLE SSANGCIEUC-WI-TIKEUT
+A881 CBA4 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEUL
+A882 CBA5 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULKIYEOK
+A883 CBA6 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULMIEUM
+A884 CBA7 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULPIEUP
+A885 CBA8 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULSIOS
+A886 CBA9 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULTHIEUTH
+A887 CBAA # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULPHIEUPH
+A888 CBAB # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULHIEUH
+A889 CBAC # HANGUL SYLLABLE SSANGCIEUC-WI-MIEUM
+A88A CBAD # HANGUL SYLLABLE SSANGCIEUC-WI-PIEUP
+A88B CBAE # HANGUL SYLLABLE SSANGCIEUC-WI-PIEUPSIOS
+A88C CBAF # HANGUL SYLLABLE SSANGCIEUC-WI-SIOS
+A88D CBB0 # HANGUL SYLLABLE SSANGCIEUC-WI-SSANGSIOS
+A88E CBB1 # HANGUL SYLLABLE SSANGCIEUC-WI-IEUNG
+A88F CBB2 # HANGUL SYLLABLE SSANGCIEUC-WI-CIEUC
+A890 CBB3 # HANGUL SYLLABLE SSANGCIEUC-WI-CHIEUCH
+A891 CBB4 # HANGUL SYLLABLE SSANGCIEUC-WI-KHIEUKH
+A892 CBB5 # HANGUL SYLLABLE SSANGCIEUC-WI-THIEUTH
+A893 CBB6 # HANGUL SYLLABLE SSANGCIEUC-WI-PHIEUPH
+A894 CBB7 # HANGUL SYLLABLE SSANGCIEUC-WI-HIEUH
+A895 CBB9 # HANGUL SYLLABLE SSANGCIEUC-YU-KIYEOK
+A896 CBBA # HANGUL SYLLABLE SSANGCIEUC-YU-SSANGKIYEOK
+A897 CBBB # HANGUL SYLLABLE SSANGCIEUC-YU-KIYEOKSIOS
+A898 CBBC # HANGUL SYLLABLE SSANGCIEUC-YU-NIEUN
+A899 CBBD # HANGUL SYLLABLE SSANGCIEUC-YU-NIEUNCIEUC
+A89A CBBE # HANGUL SYLLABLE SSANGCIEUC-YU-NIEUNHIEUH
+A89B CBBF # HANGUL SYLLABLE SSANGCIEUC-YU-TIKEUT
+A89C CBC0 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEUL
+A89D CBC1 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULKIYEOK
+A89E CBC2 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULMIEUM
+A89F CBC3 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULPIEUP
+A8A0 CBC4 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULSIOS
+A8A1 00C6 # LATIN CAPITAL LIGATURE AE
+A8A2 00D0 # LATIN CAPITAL LETTER ETH
+A8A3 00AA # FEMININE ORDINAL INDICATOR
+A8A4 0126 # LATIN CAPITAL LETTER H WITH STROKE
+A8A6 0132 # LATIN CAPITAL LIGATURE IJ
+A8A8 013F # LATIN CAPITAL LETTER L WITH MIDDLE DOT
+A8A9 0141 # LATIN CAPITAL LETTER L WITH STROKE
+A8AA 00D8 # LATIN CAPITAL LETTER O WITH STROKE
+A8AB 0152 # LATIN CAPITAL LIGATURE OE
+A8AC 00BA # MASCULINE ORDINAL INDICATOR
+A8AD 00DE # LATIN CAPITAL LETTER THORN
+A8AE 0166 # LATIN CAPITAL LETTER T WITH STROKE
+A8AF 014A # LATIN CAPITAL LETTER ENG
+A8B1 3260 # CIRCLED HANGUL KIYEOK
+A8B2 3261 # CIRCLED HANGUL NIEUN
+A8B3 3262 # CIRCLED HANGUL TIKEUT
+A8B4 3263 # CIRCLED HANGUL RIEUL
+A8B5 3264 # CIRCLED HANGUL MIEUM
+A8B6 3265 # CIRCLED HANGUL PIEUP
+A8B7 3266 # CIRCLED HANGUL SIOS
+A8B8 3267 # CIRCLED HANGUL IEUNG
+A8B9 3268 # CIRCLED HANGUL CIEUC
+A8BA 3269 # CIRCLED HANGUL CHIEUCH
+A8BB 326A # CIRCLED HANGUL KHIEUKH
+A8BC 326B # CIRCLED HANGUL THIEUTH
+A8BD 326C # CIRCLED HANGUL PHIEUPH
+A8BE 326D # CIRCLED HANGUL HIEUH
+A8BF 326E # CIRCLED HANGUL KIYEOK A
+A8C0 326F # CIRCLED HANGUL NIEUN A
+A8C1 3270 # CIRCLED HANGUL TIKEUT A
+A8C2 3271 # CIRCLED HANGUL RIEUL A
+A8C3 3272 # CIRCLED HANGUL MIEUM A
+A8C4 3273 # CIRCLED HANGUL PIEUP A
+A8C5 3274 # CIRCLED HANGUL SIOS A
+A8C6 3275 # CIRCLED HANGUL IEUNG A
+A8C7 3276 # CIRCLED HANGUL CIEUC A
+A8C8 3277 # CIRCLED HANGUL CHIEUCH A
+A8C9 3278 # CIRCLED HANGUL KHIEUKH A
+A8CA 3279 # CIRCLED HANGUL THIEUTH A
+A8CB 327A # CIRCLED HANGUL PHIEUPH A
+A8CC 327B # CIRCLED HANGUL HIEUH A
+A8CD 24D0 # CIRCLED LATIN SMALL LETTER A
+A8CE 24D1 # CIRCLED LATIN SMALL LETTER B
+A8CF 24D2 # CIRCLED LATIN SMALL LETTER C
+A8D0 24D3 # CIRCLED LATIN SMALL LETTER D
+A8D1 24D4 # CIRCLED LATIN SMALL LETTER E
+A8D2 24D5 # CIRCLED LATIN SMALL LETTER F
+A8D3 24D6 # CIRCLED LATIN SMALL LETTER G
+A8D4 24D7 # CIRCLED LATIN SMALL LETTER H
+A8D5 24D8 # CIRCLED LATIN SMALL LETTER I
+A8D6 24D9 # CIRCLED LATIN SMALL LETTER J
+A8D7 24DA # CIRCLED LATIN SMALL LETTER K
+A8D8 24DB # CIRCLED LATIN SMALL LETTER L
+A8D9 24DC # CIRCLED LATIN SMALL LETTER M
+A8DA 24DD # CIRCLED LATIN SMALL LETTER N
+A8DB 24DE # CIRCLED LATIN SMALL LETTER O
+A8DC 24DF # CIRCLED LATIN SMALL LETTER P
+A8DD 24E0 # CIRCLED LATIN SMALL LETTER Q
+A8DE 24E1 # CIRCLED LATIN SMALL LETTER R
+A8DF 24E2 # CIRCLED LATIN SMALL LETTER S
+A8E0 24E3 # CIRCLED LATIN SMALL LETTER T
+A8E1 24E4 # CIRCLED LATIN SMALL LETTER U
+A8E2 24E5 # CIRCLED LATIN SMALL LETTER V
+A8E3 24E6 # CIRCLED LATIN SMALL LETTER W
+A8E4 24E7 # CIRCLED LATIN SMALL LETTER X
+A8E5 24E8 # CIRCLED LATIN SMALL LETTER Y
+A8E6 24E9 # CIRCLED LATIN SMALL LETTER Z
+A8E7 2460 # CIRCLED DIGIT ONE
+A8E8 2461 # CIRCLED DIGIT TWO
+A8E9 2462 # CIRCLED DIGIT THREE
+A8EA 2463 # CIRCLED DIGIT FOUR
+A8EB 2464 # CIRCLED DIGIT FIVE
+A8EC 2465 # CIRCLED DIGIT SIX
+A8ED 2466 # CIRCLED DIGIT SEVEN
+A8EE 2467 # CIRCLED DIGIT EIGHT
+A8EF 2468 # CIRCLED DIGIT NINE
+A8F0 2469 # CIRCLED NUMBER TEN
+A8F1 246A # CIRCLED NUMBER ELEVEN
+A8F2 246B # CIRCLED NUMBER TWELVE
+A8F3 246C # CIRCLED NUMBER THIRTEEN
+A8F4 246D # CIRCLED NUMBER FOURTEEN
+A8F5 246E # CIRCLED NUMBER FIFTEEN
+A8F6 00BD # VULGAR FRACTION ONE HALF
+A8F7 2153 # VULGAR FRACTION ONE THIRD
+A8F8 2154 # VULGAR FRACTION TWO THIRDS
+A8F9 00BC # VULGAR FRACTION ONE QUARTER
+A8FA 00BE # VULGAR FRACTION THREE QUARTERS
+A8FB 215B # VULGAR FRACTION ONE EIGHTH
+A8FC 215C # VULGAR FRACTION THREE EIGHTHS
+A8FD 215D # VULGAR FRACTION FIVE EIGHTHS
+A8FE 215E # VULGAR FRACTION SEVEN EIGHTHS
+A941 CBC5 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULTHIEUTH
+A942 CBC6 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULPHIEUPH
+A943 CBC7 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULHIEUH
+A944 CBC8 # HANGUL SYLLABLE SSANGCIEUC-YU-MIEUM
+A945 CBC9 # HANGUL SYLLABLE SSANGCIEUC-YU-PIEUP
+A946 CBCA # HANGUL SYLLABLE SSANGCIEUC-YU-PIEUPSIOS
+A947 CBCB # HANGUL SYLLABLE SSANGCIEUC-YU-SIOS
+A948 CBCC # HANGUL SYLLABLE SSANGCIEUC-YU-SSANGSIOS
+A949 CBCD # HANGUL SYLLABLE SSANGCIEUC-YU-IEUNG
+A94A CBCE # HANGUL SYLLABLE SSANGCIEUC-YU-CIEUC
+A94B CBCF # HANGUL SYLLABLE SSANGCIEUC-YU-CHIEUCH
+A94C CBD0 # HANGUL SYLLABLE SSANGCIEUC-YU-KHIEUKH
+A94D CBD1 # HANGUL SYLLABLE SSANGCIEUC-YU-THIEUTH
+A94E CBD2 # HANGUL SYLLABLE SSANGCIEUC-YU-PHIEUPH
+A94F CBD3 # HANGUL SYLLABLE SSANGCIEUC-YU-HIEUH
+A950 CBD5 # HANGUL SYLLABLE SSANGCIEUC-EU-KIYEOK
+A951 CBD6 # HANGUL SYLLABLE SSANGCIEUC-EU-SSANGKIYEOK
+A952 CBD7 # HANGUL SYLLABLE SSANGCIEUC-EU-KIYEOKSIOS
+A953 CBD8 # HANGUL SYLLABLE SSANGCIEUC-EU-NIEUN
+A954 CBD9 # HANGUL SYLLABLE SSANGCIEUC-EU-NIEUNCIEUC
+A955 CBDA # HANGUL SYLLABLE SSANGCIEUC-EU-NIEUNHIEUH
+A956 CBDB # HANGUL SYLLABLE SSANGCIEUC-EU-TIKEUT
+A957 CBDC # HANGUL SYLLABLE SSANGCIEUC-EU-RIEUL
+A958 CBDD # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULKIYEOK
+A959 CBDE # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULMIEUM
+A95A CBDF # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULPIEUP
+A961 CBE0 # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULSIOS
+A962 CBE1 # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULTHIEUTH
+A963 CBE2 # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULPHIEUPH
+A964 CBE3 # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULHIEUH
+A965 CBE5 # HANGUL SYLLABLE SSANGCIEUC-EU-PIEUP
+A966 CBE6 # HANGUL SYLLABLE SSANGCIEUC-EU-PIEUPSIOS
+A967 CBE8 # HANGUL SYLLABLE SSANGCIEUC-EU-SSANGSIOS
+A968 CBEA # HANGUL SYLLABLE SSANGCIEUC-EU-CIEUC
+A969 CBEB # HANGUL SYLLABLE SSANGCIEUC-EU-CHIEUCH
+A96A CBEC # HANGUL SYLLABLE SSANGCIEUC-EU-KHIEUKH
+A96B CBED # HANGUL SYLLABLE SSANGCIEUC-EU-THIEUTH
+A96C CBEE # HANGUL SYLLABLE SSANGCIEUC-EU-PHIEUPH
+A96D CBEF # HANGUL SYLLABLE SSANGCIEUC-EU-HIEUH
+A96E CBF0 # HANGUL SYLLABLE SSANGCIEUC-YI
+A96F CBF1 # HANGUL SYLLABLE SSANGCIEUC-YI-KIYEOK
+A970 CBF2 # HANGUL SYLLABLE SSANGCIEUC-YI-SSANGKIYEOK
+A971 CBF3 # HANGUL SYLLABLE SSANGCIEUC-YI-KIYEOKSIOS
+A972 CBF4 # HANGUL SYLLABLE SSANGCIEUC-YI-NIEUN
+A973 CBF5 # HANGUL SYLLABLE SSANGCIEUC-YI-NIEUNCIEUC
+A974 CBF6 # HANGUL SYLLABLE SSANGCIEUC-YI-NIEUNHIEUH
+A975 CBF7 # HANGUL SYLLABLE SSANGCIEUC-YI-TIKEUT
+A976 CBF8 # HANGUL SYLLABLE SSANGCIEUC-YI-RIEUL
+A977 CBF9 # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULKIYEOK
+A978 CBFA # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULMIEUM
+A979 CBFB # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULPIEUP
+A97A CBFC # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULSIOS
+A981 CBFD # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULTHIEUTH
+A982 CBFE # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULPHIEUPH
+A983 CBFF # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULHIEUH
+A984 CC00 # HANGUL SYLLABLE SSANGCIEUC-YI-MIEUM
+A985 CC01 # HANGUL SYLLABLE SSANGCIEUC-YI-PIEUP
+A986 CC02 # HANGUL SYLLABLE SSANGCIEUC-YI-PIEUPSIOS
+A987 CC03 # HANGUL SYLLABLE SSANGCIEUC-YI-SIOS
+A988 CC04 # HANGUL SYLLABLE SSANGCIEUC-YI-SSANGSIOS
+A989 CC05 # HANGUL SYLLABLE SSANGCIEUC-YI-IEUNG
+A98A CC06 # HANGUL SYLLABLE SSANGCIEUC-YI-CIEUC
+A98B CC07 # HANGUL SYLLABLE SSANGCIEUC-YI-CHIEUCH
+A98C CC08 # HANGUL SYLLABLE SSANGCIEUC-YI-KHIEUKH
+A98D CC09 # HANGUL SYLLABLE SSANGCIEUC-YI-THIEUTH
+A98E CC0A # HANGUL SYLLABLE SSANGCIEUC-YI-PHIEUPH
+A98F CC0B # HANGUL SYLLABLE SSANGCIEUC-YI-HIEUH
+A990 CC0E # HANGUL SYLLABLE SSANGCIEUC-I-SSANGKIYEOK
+A991 CC0F # HANGUL SYLLABLE SSANGCIEUC-I-KIYEOKSIOS
+A992 CC11 # HANGUL SYLLABLE SSANGCIEUC-I-NIEUNCIEUC
+A993 CC12 # HANGUL SYLLABLE SSANGCIEUC-I-NIEUNHIEUH
+A994 CC13 # HANGUL SYLLABLE SSANGCIEUC-I-TIKEUT
+A995 CC15 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULKIYEOK
+A996 CC16 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULMIEUM
+A997 CC17 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULPIEUP
+A998 CC18 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULSIOS
+A999 CC19 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULTHIEUTH
+A99A CC1A # HANGUL SYLLABLE SSANGCIEUC-I-RIEULPHIEUPH
+A99B CC1B # HANGUL SYLLABLE SSANGCIEUC-I-RIEULHIEUH
+A99C CC1E # HANGUL SYLLABLE SSANGCIEUC-I-PIEUPSIOS
+A99D CC1F # HANGUL SYLLABLE SSANGCIEUC-I-SIOS
+A99E CC20 # HANGUL SYLLABLE SSANGCIEUC-I-SSANGSIOS
+A99F CC23 # HANGUL SYLLABLE SSANGCIEUC-I-CHIEUCH
+A9A0 CC24 # HANGUL SYLLABLE SSANGCIEUC-I-KHIEUKH
+A9A1 00E6 # LATIN SMALL LIGATURE AE
+A9A2 0111 # LATIN SMALL LETTER D WITH STROKE
+A9A3 00F0 # LATIN SMALL LETTER ETH
+A9A4 0127 # LATIN SMALL LETTER H WITH STROKE
+A9A5 0131 # LATIN SMALL LETTER DOTLESS I
+A9A6 0133 # LATIN SMALL LIGATURE IJ
+A9A7 0138 # LATIN SMALL LETTER KRA
+A9A8 0140 # LATIN SMALL LETTER L WITH MIDDLE DOT
+A9A9 0142 # LATIN SMALL LETTER L WITH STROKE
+A9AA 00F8 # LATIN SMALL LETTER O WITH STROKE
+A9AB 0153 # LATIN SMALL LIGATURE OE
+A9AC 00DF # LATIN SMALL LETTER SHARP S
+A9AD 00FE # LATIN SMALL LETTER THORN
+A9AE 0167 # LATIN SMALL LETTER T WITH STROKE
+A9AF 014B # LATIN SMALL LETTER ENG
+A9B0 0149 # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+A9B1 3200 # PARENTHESIZED HANGUL KIYEOK
+A9B2 3201 # PARENTHESIZED HANGUL NIEUN
+A9B3 3202 # PARENTHESIZED HANGUL TIKEUT
+A9B4 3203 # PARENTHESIZED HANGUL RIEUL
+A9B5 3204 # PARENTHESIZED HANGUL MIEUM
+A9B6 3205 # PARENTHESIZED HANGUL PIEUP
+A9B7 3206 # PARENTHESIZED HANGUL SIOS
+A9B8 3207 # PARENTHESIZED HANGUL IEUNG
+A9B9 3208 # PARENTHESIZED HANGUL CIEUC
+A9BA 3209 # PARENTHESIZED HANGUL CHIEUCH
+A9BB 320A # PARENTHESIZED HANGUL KHIEUKH
+A9BC 320B # PARENTHESIZED HANGUL THIEUTH
+A9BD 320C # PARENTHESIZED HANGUL PHIEUPH
+A9BE 320D # PARENTHESIZED HANGUL HIEUH
+A9BF 320E # PARENTHESIZED HANGUL KIYEOK A
+A9C0 320F # PARENTHESIZED HANGUL NIEUN A
+A9C1 3210 # PARENTHESIZED HANGUL TIKEUT A
+A9C2 3211 # PARENTHESIZED HANGUL RIEUL A
+A9C3 3212 # PARENTHESIZED HANGUL MIEUM A
+A9C4 3213 # PARENTHESIZED HANGUL PIEUP A
+A9C5 3214 # PARENTHESIZED HANGUL SIOS A
+A9C6 3215 # PARENTHESIZED HANGUL IEUNG A
+A9C7 3216 # PARENTHESIZED HANGUL CIEUC A
+A9C8 3217 # PARENTHESIZED HANGUL CHIEUCH A
+A9C9 3218 # PARENTHESIZED HANGUL KHIEUKH A
+A9CA 3219 # PARENTHESIZED HANGUL THIEUTH A
+A9CB 321A # PARENTHESIZED HANGUL PHIEUPH A
+A9CC 321B # PARENTHESIZED HANGUL HIEUH A
+A9CD 249C # PARENTHESIZED LATIN SMALL LETTER A
+A9CE 249D # PARENTHESIZED LATIN SMALL LETTER B
+A9CF 249E # PARENTHESIZED LATIN SMALL LETTER C
+A9D0 249F # PARENTHESIZED LATIN SMALL LETTER D
+A9D1 24A0 # PARENTHESIZED LATIN SMALL LETTER E
+A9D2 24A1 # PARENTHESIZED LATIN SMALL LETTER F
+A9D3 24A2 # PARENTHESIZED LATIN SMALL LETTER G
+A9D4 24A3 # PARENTHESIZED LATIN SMALL LETTER H
+A9D5 24A4 # PARENTHESIZED LATIN SMALL LETTER I
+A9D6 24A5 # PARENTHESIZED LATIN SMALL LETTER J
+A9D7 24A6 # PARENTHESIZED LATIN SMALL LETTER K
+A9D8 24A7 # PARENTHESIZED LATIN SMALL LETTER L
+A9D9 24A8 # PARENTHESIZED LATIN SMALL LETTER M
+A9DA 24A9 # PARENTHESIZED LATIN SMALL LETTER N
+A9DB 24AA # PARENTHESIZED LATIN SMALL LETTER O
+A9DC 24AB # PARENTHESIZED LATIN SMALL LETTER P
+A9DD 24AC # PARENTHESIZED LATIN SMALL LETTER Q
+A9DE 24AD # PARENTHESIZED LATIN SMALL LETTER R
+A9DF 24AE # PARENTHESIZED LATIN SMALL LETTER S
+A9E0 24AF # PARENTHESIZED LATIN SMALL LETTER T
+A9E1 24B0 # PARENTHESIZED LATIN SMALL LETTER U
+A9E2 24B1 # PARENTHESIZED LATIN SMALL LETTER V
+A9E3 24B2 # PARENTHESIZED LATIN SMALL LETTER W
+A9E4 24B3 # PARENTHESIZED LATIN SMALL LETTER X
+A9E5 24B4 # PARENTHESIZED LATIN SMALL LETTER Y
+A9E6 24B5 # PARENTHESIZED LATIN SMALL LETTER Z
+A9E7 2474 # PARENTHESIZED DIGIT ONE
+A9E8 2475 # PARENTHESIZED DIGIT TWO
+A9E9 2476 # PARENTHESIZED DIGIT THREE
+A9EA 2477 # PARENTHESIZED DIGIT FOUR
+A9EB 2478 # PARENTHESIZED DIGIT FIVE
+A9EC 2479 # PARENTHESIZED DIGIT SIX
+A9ED 247A # PARENTHESIZED DIGIT SEVEN
+A9EE 247B # PARENTHESIZED DIGIT EIGHT
+A9EF 247C # PARENTHESIZED DIGIT NINE
+A9F0 247D # PARENTHESIZED NUMBER TEN
+A9F1 247E # PARENTHESIZED NUMBER ELEVEN
+A9F2 247F # PARENTHESIZED NUMBER TWELVE
+A9F3 2480 # PARENTHESIZED NUMBER THIRTEEN
+A9F4 2481 # PARENTHESIZED NUMBER FOURTEEN
+A9F5 2482 # PARENTHESIZED NUMBER FIFTEEN
+A9F6 00B9 # SUPERSCRIPT ONE
+A9F7 00B2 # SUPERSCRIPT TWO
+A9F8 00B3 # SUPERSCRIPT THREE
+A9F9 2074 # SUPERSCRIPT FOUR
+A9FA 207F # SUPERSCRIPT LATIN SMALL LETTER N
+A9FB 2081 # SUBSCRIPT ONE
+A9FC 2082 # SUBSCRIPT TWO
+A9FD 2083 # SUBSCRIPT THREE
+A9FE 2084 # SUBSCRIPT FOUR
+AA41 CC25 # HANGUL SYLLABLE SSANGCIEUC-I-THIEUTH
+AA42 CC26 # HANGUL SYLLABLE SSANGCIEUC-I-PHIEUPH
+AA43 CC2A # HANGUL SYLLABLE CHIEUCH-A-SSANGKIYEOK
+AA44 CC2B # HANGUL SYLLABLE CHIEUCH-A-KIYEOKSIOS
+AA45 CC2D # HANGUL SYLLABLE CHIEUCH-A-NIEUNCIEUC
+AA46 CC2F # HANGUL SYLLABLE CHIEUCH-A-TIKEUT
+AA47 CC31 # HANGUL SYLLABLE CHIEUCH-A-RIEULKIYEOK
+AA48 CC32 # HANGUL SYLLABLE CHIEUCH-A-RIEULMIEUM
+AA49 CC33 # HANGUL SYLLABLE CHIEUCH-A-RIEULPIEUP
+AA4A CC34 # HANGUL SYLLABLE CHIEUCH-A-RIEULSIOS
+AA4B CC35 # HANGUL SYLLABLE CHIEUCH-A-RIEULTHIEUTH
+AA4C CC36 # HANGUL SYLLABLE CHIEUCH-A-RIEULPHIEUPH
+AA4D CC37 # HANGUL SYLLABLE CHIEUCH-A-RIEULHIEUH
+AA4E CC3A # HANGUL SYLLABLE CHIEUCH-A-PIEUPSIOS
+AA4F CC3F # HANGUL SYLLABLE CHIEUCH-A-CHIEUCH
+AA50 CC40 # HANGUL SYLLABLE CHIEUCH-A-KHIEUKH
+AA51 CC41 # HANGUL SYLLABLE CHIEUCH-A-THIEUTH
+AA52 CC42 # HANGUL SYLLABLE CHIEUCH-A-PHIEUPH
+AA53 CC43 # HANGUL SYLLABLE CHIEUCH-A-HIEUH
+AA54 CC46 # HANGUL SYLLABLE CHIEUCH-AE-SSANGKIYEOK
+AA55 CC47 # HANGUL SYLLABLE CHIEUCH-AE-KIYEOKSIOS
+AA56 CC49 # HANGUL SYLLABLE CHIEUCH-AE-NIEUNCIEUC
+AA57 CC4A # HANGUL SYLLABLE CHIEUCH-AE-NIEUNHIEUH
+AA58 CC4B # HANGUL SYLLABLE CHIEUCH-AE-TIKEUT
+AA59 CC4D # HANGUL SYLLABLE CHIEUCH-AE-RIEULKIYEOK
+AA5A CC4E # HANGUL SYLLABLE CHIEUCH-AE-RIEULMIEUM
+AA61 CC4F # HANGUL SYLLABLE CHIEUCH-AE-RIEULPIEUP
+AA62 CC50 # HANGUL SYLLABLE CHIEUCH-AE-RIEULSIOS
+AA63 CC51 # HANGUL SYLLABLE CHIEUCH-AE-RIEULTHIEUTH
+AA64 CC52 # HANGUL SYLLABLE CHIEUCH-AE-RIEULPHIEUPH
+AA65 CC53 # HANGUL SYLLABLE CHIEUCH-AE-RIEULHIEUH
+AA66 CC56 # HANGUL SYLLABLE CHIEUCH-AE-PIEUPSIOS
+AA67 CC5A # HANGUL SYLLABLE CHIEUCH-AE-CIEUC
+AA68 CC5B # HANGUL SYLLABLE CHIEUCH-AE-CHIEUCH
+AA69 CC5C # HANGUL SYLLABLE CHIEUCH-AE-KHIEUKH
+AA6A CC5D # HANGUL SYLLABLE CHIEUCH-AE-THIEUTH
+AA6B CC5E # HANGUL SYLLABLE CHIEUCH-AE-PHIEUPH
+AA6C CC5F # HANGUL SYLLABLE CHIEUCH-AE-HIEUH
+AA6D CC61 # HANGUL SYLLABLE CHIEUCH-YA-KIYEOK
+AA6E CC62 # HANGUL SYLLABLE CHIEUCH-YA-SSANGKIYEOK
+AA6F CC63 # HANGUL SYLLABLE CHIEUCH-YA-KIYEOKSIOS
+AA70 CC65 # HANGUL SYLLABLE CHIEUCH-YA-NIEUNCIEUC
+AA71 CC67 # HANGUL SYLLABLE CHIEUCH-YA-TIKEUT
+AA72 CC69 # HANGUL SYLLABLE CHIEUCH-YA-RIEULKIYEOK
+AA73 CC6A # HANGUL SYLLABLE CHIEUCH-YA-RIEULMIEUM
+AA74 CC6B # HANGUL SYLLABLE CHIEUCH-YA-RIEULPIEUP
+AA75 CC6C # HANGUL SYLLABLE CHIEUCH-YA-RIEULSIOS
+AA76 CC6D # HANGUL SYLLABLE CHIEUCH-YA-RIEULTHIEUTH
+AA77 CC6E # HANGUL SYLLABLE CHIEUCH-YA-RIEULPHIEUPH
+AA78 CC6F # HANGUL SYLLABLE CHIEUCH-YA-RIEULHIEUH
+AA79 CC71 # HANGUL SYLLABLE CHIEUCH-YA-PIEUP
+AA7A CC72 # HANGUL SYLLABLE CHIEUCH-YA-PIEUPSIOS
+AA81 CC73 # HANGUL SYLLABLE CHIEUCH-YA-SIOS
+AA82 CC74 # HANGUL SYLLABLE CHIEUCH-YA-SSANGSIOS
+AA83 CC76 # HANGUL SYLLABLE CHIEUCH-YA-CIEUC
+AA84 CC77 # HANGUL SYLLABLE CHIEUCH-YA-CHIEUCH
+AA85 CC78 # HANGUL SYLLABLE CHIEUCH-YA-KHIEUKH
+AA86 CC79 # HANGUL SYLLABLE CHIEUCH-YA-THIEUTH
+AA87 CC7A # HANGUL SYLLABLE CHIEUCH-YA-PHIEUPH
+AA88 CC7B # HANGUL SYLLABLE CHIEUCH-YA-HIEUH
+AA89 CC7C # HANGUL SYLLABLE CHIEUCH-YAE
+AA8A CC7D # HANGUL SYLLABLE CHIEUCH-YAE-KIYEOK
+AA8B CC7E # HANGUL SYLLABLE CHIEUCH-YAE-SSANGKIYEOK
+AA8C CC7F # HANGUL SYLLABLE CHIEUCH-YAE-KIYEOKSIOS
+AA8D CC80 # HANGUL SYLLABLE CHIEUCH-YAE-NIEUN
+AA8E CC81 # HANGUL SYLLABLE CHIEUCH-YAE-NIEUNCIEUC
+AA8F CC82 # HANGUL SYLLABLE CHIEUCH-YAE-NIEUNHIEUH
+AA90 CC83 # HANGUL SYLLABLE CHIEUCH-YAE-TIKEUT
+AA91 CC84 # HANGUL SYLLABLE CHIEUCH-YAE-RIEUL
+AA92 CC85 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULKIYEOK
+AA93 CC86 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULMIEUM
+AA94 CC87 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULPIEUP
+AA95 CC88 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULSIOS
+AA96 CC89 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULTHIEUTH
+AA97 CC8A # HANGUL SYLLABLE CHIEUCH-YAE-RIEULPHIEUPH
+AA98 CC8B # HANGUL SYLLABLE CHIEUCH-YAE-RIEULHIEUH
+AA99 CC8C # HANGUL SYLLABLE CHIEUCH-YAE-MIEUM
+AA9A CC8D # HANGUL SYLLABLE CHIEUCH-YAE-PIEUP
+AA9B CC8E # HANGUL SYLLABLE CHIEUCH-YAE-PIEUPSIOS
+AA9C CC8F # HANGUL SYLLABLE CHIEUCH-YAE-SIOS
+AA9D CC90 # HANGUL SYLLABLE CHIEUCH-YAE-SSANGSIOS
+AA9E CC91 # HANGUL SYLLABLE CHIEUCH-YAE-IEUNG
+AA9F CC92 # HANGUL SYLLABLE CHIEUCH-YAE-CIEUC
+AAA0 CC93 # HANGUL SYLLABLE CHIEUCH-YAE-CHIEUCH
+AAA1 3041 # HIRAGANA LETTER SMALL A
+AAA2 3042 # HIRAGANA LETTER A
+AAA3 3043 # HIRAGANA LETTER SMALL I
+AAA4 3044 # HIRAGANA LETTER I
+AAA5 3045 # HIRAGANA LETTER SMALL U
+AAA6 3046 # HIRAGANA LETTER U
+AAA7 3047 # HIRAGANA LETTER SMALL E
+AAA8 3048 # HIRAGANA LETTER E
+AAA9 3049 # HIRAGANA LETTER SMALL O
+AAAA 304A # HIRAGANA LETTER O
+AAAB 304B # HIRAGANA LETTER KA
+AAAC 304C # HIRAGANA LETTER GA
+AAAD 304D # HIRAGANA LETTER KI
+AAAE 304E # HIRAGANA LETTER GI
+AAAF 304F # HIRAGANA LETTER KU
+AAB0 3050 # HIRAGANA LETTER GU
+AAB1 3051 # HIRAGANA LETTER KE
+AAB2 3052 # HIRAGANA LETTER GE
+AAB3 3053 # HIRAGANA LETTER KO
+AAB4 3054 # HIRAGANA LETTER GO
+AAB5 3055 # HIRAGANA LETTER SA
+AAB6 3056 # HIRAGANA LETTER ZA
+AAB7 3057 # HIRAGANA LETTER SI
+AAB8 3058 # HIRAGANA LETTER ZI
+AAB9 3059 # HIRAGANA LETTER SU
+AABA 305A # HIRAGANA LETTER ZU
+AABB 305B # HIRAGANA LETTER SE
+AABC 305C # HIRAGANA LETTER ZE
+AABD 305D # HIRAGANA LETTER SO
+AABE 305E # HIRAGANA LETTER ZO
+AABF 305F # HIRAGANA LETTER TA
+AAC0 3060 # HIRAGANA LETTER DA
+AAC1 3061 # HIRAGANA LETTER TI
+AAC2 3062 # HIRAGANA LETTER DI
+AAC3 3063 # HIRAGANA LETTER SMALL TU
+AAC4 3064 # HIRAGANA LETTER TU
+AAC5 3065 # HIRAGANA LETTER DU
+AAC6 3066 # HIRAGANA LETTER TE
+AAC7 3067 # HIRAGANA LETTER DE
+AAC8 3068 # HIRAGANA LETTER TO
+AAC9 3069 # HIRAGANA LETTER DO
+AACA 306A # HIRAGANA LETTER NA
+AACB 306B # HIRAGANA LETTER NI
+AACC 306C # HIRAGANA LETTER NU
+AACD 306D # HIRAGANA LETTER NE
+AACE 306E # HIRAGANA LETTER NO
+AACF 306F # HIRAGANA LETTER HA
+AAD0 3070 # HIRAGANA LETTER BA
+AAD1 3071 # HIRAGANA LETTER PA
+AAD2 3072 # HIRAGANA LETTER HI
+AAD3 3073 # HIRAGANA LETTER BI
+AAD4 3074 # HIRAGANA LETTER PI
+AAD5 3075 # HIRAGANA LETTER HU
+AAD6 3076 # HIRAGANA LETTER BU
+AAD7 3077 # HIRAGANA LETTER PU
+AAD8 3078 # HIRAGANA LETTER HE
+AAD9 3079 # HIRAGANA LETTER BE
+AADA 307A # HIRAGANA LETTER PE
+AADB 307B # HIRAGANA LETTER HO
+AADC 307C # HIRAGANA LETTER BO
+AADD 307D # HIRAGANA LETTER PO
+AADE 307E # HIRAGANA LETTER MA
+AADF 307F # HIRAGANA LETTER MI
+AAE0 3080 # HIRAGANA LETTER MU
+AAE1 3081 # HIRAGANA LETTER ME
+AAE2 3082 # HIRAGANA LETTER MO
+AAE3 3083 # HIRAGANA LETTER SMALL YA
+AAE4 3084 # HIRAGANA LETTER YA
+AAE5 3085 # HIRAGANA LETTER SMALL YU
+AAE6 3086 # HIRAGANA LETTER YU
+AAE7 3087 # HIRAGANA LETTER SMALL YO
+AAE8 3088 # HIRAGANA LETTER YO
+AAE9 3089 # HIRAGANA LETTER RA
+AAEA 308A # HIRAGANA LETTER RI
+AAEB 308B # HIRAGANA LETTER RU
+AAEC 308C # HIRAGANA LETTER RE
+AAED 308D # HIRAGANA LETTER RO
+AAEE 308E # HIRAGANA LETTER SMALL WA
+AAEF 308F # HIRAGANA LETTER WA
+AAF0 3090 # HIRAGANA LETTER WI
+AAF1 3091 # HIRAGANA LETTER WE
+AAF2 3092 # HIRAGANA LETTER WO
+AAF3 3093 # HIRAGANA LETTER N
+AB41 CC94 # HANGUL SYLLABLE CHIEUCH-YAE-KHIEUKH
+AB42 CC95 # HANGUL SYLLABLE CHIEUCH-YAE-THIEUTH
+AB43 CC96 # HANGUL SYLLABLE CHIEUCH-YAE-PHIEUPH
+AB44 CC97 # HANGUL SYLLABLE CHIEUCH-YAE-HIEUH
+AB45 CC9A # HANGUL SYLLABLE CHIEUCH-EO-SSANGKIYEOK
+AB46 CC9B # HANGUL SYLLABLE CHIEUCH-EO-KIYEOKSIOS
+AB47 CC9D # HANGUL SYLLABLE CHIEUCH-EO-NIEUNCIEUC
+AB48 CC9E # HANGUL SYLLABLE CHIEUCH-EO-NIEUNHIEUH
+AB49 CC9F # HANGUL SYLLABLE CHIEUCH-EO-TIKEUT
+AB4A CCA1 # HANGUL SYLLABLE CHIEUCH-EO-RIEULKIYEOK
+AB4B CCA2 # HANGUL SYLLABLE CHIEUCH-EO-RIEULMIEUM
+AB4C CCA3 # HANGUL SYLLABLE CHIEUCH-EO-RIEULPIEUP
+AB4D CCA4 # HANGUL SYLLABLE CHIEUCH-EO-RIEULSIOS
+AB4E CCA5 # HANGUL SYLLABLE CHIEUCH-EO-RIEULTHIEUTH
+AB4F CCA6 # HANGUL SYLLABLE CHIEUCH-EO-RIEULPHIEUPH
+AB50 CCA7 # HANGUL SYLLABLE CHIEUCH-EO-RIEULHIEUH
+AB51 CCAA # HANGUL SYLLABLE CHIEUCH-EO-PIEUPSIOS
+AB52 CCAE # HANGUL SYLLABLE CHIEUCH-EO-CIEUC
+AB53 CCAF # HANGUL SYLLABLE CHIEUCH-EO-CHIEUCH
+AB54 CCB0 # HANGUL SYLLABLE CHIEUCH-EO-KHIEUKH
+AB55 CCB1 # HANGUL SYLLABLE CHIEUCH-EO-THIEUTH
+AB56 CCB2 # HANGUL SYLLABLE CHIEUCH-EO-PHIEUPH
+AB57 CCB3 # HANGUL SYLLABLE CHIEUCH-EO-HIEUH
+AB58 CCB6 # HANGUL SYLLABLE CHIEUCH-E-SSANGKIYEOK
+AB59 CCB7 # HANGUL SYLLABLE CHIEUCH-E-KIYEOKSIOS
+AB5A CCB9 # HANGUL SYLLABLE CHIEUCH-E-NIEUNCIEUC
+AB61 CCBA # HANGUL SYLLABLE CHIEUCH-E-NIEUNHIEUH
+AB62 CCBB # HANGUL SYLLABLE CHIEUCH-E-TIKEUT
+AB63 CCBD # HANGUL SYLLABLE CHIEUCH-E-RIEULKIYEOK
+AB64 CCBE # HANGUL SYLLABLE CHIEUCH-E-RIEULMIEUM
+AB65 CCBF # HANGUL SYLLABLE CHIEUCH-E-RIEULPIEUP
+AB66 CCC0 # HANGUL SYLLABLE CHIEUCH-E-RIEULSIOS
+AB67 CCC1 # HANGUL SYLLABLE CHIEUCH-E-RIEULTHIEUTH
+AB68 CCC2 # HANGUL SYLLABLE CHIEUCH-E-RIEULPHIEUPH
+AB69 CCC3 # HANGUL SYLLABLE CHIEUCH-E-RIEULHIEUH
+AB6A CCC6 # HANGUL SYLLABLE CHIEUCH-E-PIEUPSIOS
+AB6B CCC8 # HANGUL SYLLABLE CHIEUCH-E-SSANGSIOS
+AB6C CCCA # HANGUL SYLLABLE CHIEUCH-E-CIEUC
+AB6D CCCB # HANGUL SYLLABLE CHIEUCH-E-CHIEUCH
+AB6E CCCC # HANGUL SYLLABLE CHIEUCH-E-KHIEUKH
+AB6F CCCD # HANGUL SYLLABLE CHIEUCH-E-THIEUTH
+AB70 CCCE # HANGUL SYLLABLE CHIEUCH-E-PHIEUPH
+AB71 CCCF # HANGUL SYLLABLE CHIEUCH-E-HIEUH
+AB72 CCD1 # HANGUL SYLLABLE CHIEUCH-YEO-KIYEOK
+AB73 CCD2 # HANGUL SYLLABLE CHIEUCH-YEO-SSANGKIYEOK
+AB74 CCD3 # HANGUL SYLLABLE CHIEUCH-YEO-KIYEOKSIOS
+AB75 CCD5 # HANGUL SYLLABLE CHIEUCH-YEO-NIEUNCIEUC
+AB76 CCD6 # HANGUL SYLLABLE CHIEUCH-YEO-NIEUNHIEUH
+AB77 CCD7 # HANGUL SYLLABLE CHIEUCH-YEO-TIKEUT
+AB78 CCD8 # HANGUL SYLLABLE CHIEUCH-YEO-RIEUL
+AB79 CCD9 # HANGUL SYLLABLE CHIEUCH-YEO-RIEULKIYEOK
+AB7A CCDA # HANGUL SYLLABLE CHIEUCH-YEO-RIEULMIEUM
+AB81 CCDB # HANGUL SYLLABLE CHIEUCH-YEO-RIEULPIEUP
+AB82 CCDC # HANGUL SYLLABLE CHIEUCH-YEO-RIEULSIOS
+AB83 CCDD # HANGUL SYLLABLE CHIEUCH-YEO-RIEULTHIEUTH
+AB84 CCDE # HANGUL SYLLABLE CHIEUCH-YEO-RIEULPHIEUPH
+AB85 CCDF # HANGUL SYLLABLE CHIEUCH-YEO-RIEULHIEUH
+AB86 CCE0 # HANGUL SYLLABLE CHIEUCH-YEO-MIEUM
+AB87 CCE1 # HANGUL SYLLABLE CHIEUCH-YEO-PIEUP
+AB88 CCE2 # HANGUL SYLLABLE CHIEUCH-YEO-PIEUPSIOS
+AB89 CCE3 # HANGUL SYLLABLE CHIEUCH-YEO-SIOS
+AB8A CCE5 # HANGUL SYLLABLE CHIEUCH-YEO-IEUNG
+AB8B CCE6 # HANGUL SYLLABLE CHIEUCH-YEO-CIEUC
+AB8C CCE7 # HANGUL SYLLABLE CHIEUCH-YEO-CHIEUCH
+AB8D CCE8 # HANGUL SYLLABLE CHIEUCH-YEO-KHIEUKH
+AB8E CCE9 # HANGUL SYLLABLE CHIEUCH-YEO-THIEUTH
+AB8F CCEA # HANGUL SYLLABLE CHIEUCH-YEO-PHIEUPH
+AB90 CCEB # HANGUL SYLLABLE CHIEUCH-YEO-HIEUH
+AB91 CCED # HANGUL SYLLABLE CHIEUCH-YE-KIYEOK
+AB92 CCEE # HANGUL SYLLABLE CHIEUCH-YE-SSANGKIYEOK
+AB93 CCEF # HANGUL SYLLABLE CHIEUCH-YE-KIYEOKSIOS
+AB94 CCF1 # HANGUL SYLLABLE CHIEUCH-YE-NIEUNCIEUC
+AB95 CCF2 # HANGUL SYLLABLE CHIEUCH-YE-NIEUNHIEUH
+AB96 CCF3 # HANGUL SYLLABLE CHIEUCH-YE-TIKEUT
+AB97 CCF4 # HANGUL SYLLABLE CHIEUCH-YE-RIEUL
+AB98 CCF5 # HANGUL SYLLABLE CHIEUCH-YE-RIEULKIYEOK
+AB99 CCF6 # HANGUL SYLLABLE CHIEUCH-YE-RIEULMIEUM
+AB9A CCF7 # HANGUL SYLLABLE CHIEUCH-YE-RIEULPIEUP
+AB9B CCF8 # HANGUL SYLLABLE CHIEUCH-YE-RIEULSIOS
+AB9C CCF9 # HANGUL SYLLABLE CHIEUCH-YE-RIEULTHIEUTH
+AB9D CCFA # HANGUL SYLLABLE CHIEUCH-YE-RIEULPHIEUPH
+AB9E CCFB # HANGUL SYLLABLE CHIEUCH-YE-RIEULHIEUH
+AB9F CCFC # HANGUL SYLLABLE CHIEUCH-YE-MIEUM
+ABA0 CCFD # HANGUL SYLLABLE CHIEUCH-YE-PIEUP
+ABA1 30A1 # KATAKANA LETTER SMALL A
+ABA2 30A2 # KATAKANA LETTER A
+ABA3 30A3 # KATAKANA LETTER SMALL I
+ABA4 30A4 # KATAKANA LETTER I
+ABA5 30A5 # KATAKANA LETTER SMALL U
+ABA6 30A6 # KATAKANA LETTER U
+ABA7 30A7 # KATAKANA LETTER SMALL E
+ABA8 30A8 # KATAKANA LETTER E
+ABA9 30A9 # KATAKANA LETTER SMALL O
+ABAA 30AA # KATAKANA LETTER O
+ABAB 30AB # KATAKANA LETTER KA
+ABAC 30AC # KATAKANA LETTER GA
+ABAD 30AD # KATAKANA LETTER KI
+ABAE 30AE # KATAKANA LETTER GI
+ABAF 30AF # KATAKANA LETTER KU
+ABB0 30B0 # KATAKANA LETTER GU
+ABB1 30B1 # KATAKANA LETTER KE
+ABB2 30B2 # KATAKANA LETTER GE
+ABB3 30B3 # KATAKANA LETTER KO
+ABB4 30B4 # KATAKANA LETTER GO
+ABB5 30B5 # KATAKANA LETTER SA
+ABB6 30B6 # KATAKANA LETTER ZA
+ABB7 30B7 # KATAKANA LETTER SI
+ABB8 30B8 # KATAKANA LETTER ZI
+ABB9 30B9 # KATAKANA LETTER SU
+ABBA 30BA # KATAKANA LETTER ZU
+ABBB 30BB # KATAKANA LETTER SE
+ABBC 30BC # KATAKANA LETTER ZE
+ABBD 30BD # KATAKANA LETTER SO
+ABBE 30BE # KATAKANA LETTER ZO
+ABBF 30BF # KATAKANA LETTER TA
+ABC0 30C0 # KATAKANA LETTER DA
+ABC1 30C1 # KATAKANA LETTER TI
+ABC2 30C2 # KATAKANA LETTER DI
+ABC3 30C3 # KATAKANA LETTER SMALL TU
+ABC4 30C4 # KATAKANA LETTER TU
+ABC5 30C5 # KATAKANA LETTER DU
+ABC6 30C6 # KATAKANA LETTER TE
+ABC7 30C7 # KATAKANA LETTER DE
+ABC8 30C8 # KATAKANA LETTER TO
+ABC9 30C9 # KATAKANA LETTER DO
+ABCA 30CA # KATAKANA LETTER NA
+ABCB 30CB # KATAKANA LETTER NI
+ABCC 30CC # KATAKANA LETTER NU
+ABCD 30CD # KATAKANA LETTER NE
+ABCE 30CE # KATAKANA LETTER NO
+ABCF 30CF # KATAKANA LETTER HA
+ABD0 30D0 # KATAKANA LETTER BA
+ABD1 30D1 # KATAKANA LETTER PA
+ABD2 30D2 # KATAKANA LETTER HI
+ABD3 30D3 # KATAKANA LETTER BI
+ABD4 30D4 # KATAKANA LETTER PI
+ABD5 30D5 # KATAKANA LETTER HU
+ABD6 30D6 # KATAKANA LETTER BU
+ABD7 30D7 # KATAKANA LETTER PU
+ABD8 30D8 # KATAKANA LETTER HE
+ABD9 30D9 # KATAKANA LETTER BE
+ABDA 30DA # KATAKANA LETTER PE
+ABDB 30DB # KATAKANA LETTER HO
+ABDC 30DC # KATAKANA LETTER BO
+ABDD 30DD # KATAKANA LETTER PO
+ABDE 30DE # KATAKANA LETTER MA
+ABDF 30DF # KATAKANA LETTER MI
+ABE0 30E0 # KATAKANA LETTER MU
+ABE1 30E1 # KATAKANA LETTER ME
+ABE2 30E2 # KATAKANA LETTER MO
+ABE3 30E3 # KATAKANA LETTER SMALL YA
+ABE4 30E4 # KATAKANA LETTER YA
+ABE5 30E5 # KATAKANA LETTER SMALL YU
+ABE6 30E6 # KATAKANA LETTER YU
+ABE7 30E7 # KATAKANA LETTER SMALL YO
+ABE8 30E8 # KATAKANA LETTER YO
+ABE9 30E9 # KATAKANA LETTER RA
+ABEA 30EA # KATAKANA LETTER RI
+ABEB 30EB # KATAKANA LETTER RU
+ABEC 30EC # KATAKANA LETTER RE
+ABED 30ED # KATAKANA LETTER RO
+ABEE 30EE # KATAKANA LETTER SMALL WA
+ABEF 30EF # KATAKANA LETTER WA
+ABF0 30F0 # KATAKANA LETTER WI
+ABF1 30F1 # KATAKANA LETTER WE
+ABF2 30F2 # KATAKANA LETTER WO
+ABF3 30F3 # KATAKANA LETTER N
+ABF4 30F4 # KATAKANA LETTER VU
+ABF5 30F5 # KATAKANA LETTER SMALL KA
+ABF6 30F6 # KATAKANA LETTER SMALL KE
+AC41 CCFE # HANGUL SYLLABLE CHIEUCH-YE-PIEUPSIOS
+AC42 CCFF # HANGUL SYLLABLE CHIEUCH-YE-SIOS
+AC43 CD00 # HANGUL SYLLABLE CHIEUCH-YE-SSANGSIOS
+AC44 CD02 # HANGUL SYLLABLE CHIEUCH-YE-CIEUC
+AC45 CD03 # HANGUL SYLLABLE CHIEUCH-YE-CHIEUCH
+AC46 CD04 # HANGUL SYLLABLE CHIEUCH-YE-KHIEUKH
+AC47 CD05 # HANGUL SYLLABLE CHIEUCH-YE-THIEUTH
+AC48 CD06 # HANGUL SYLLABLE CHIEUCH-YE-PHIEUPH
+AC49 CD07 # HANGUL SYLLABLE CHIEUCH-YE-HIEUH
+AC4A CD0A # HANGUL SYLLABLE CHIEUCH-O-SSANGKIYEOK
+AC4B CD0B # HANGUL SYLLABLE CHIEUCH-O-KIYEOKSIOS
+AC4C CD0D # HANGUL SYLLABLE CHIEUCH-O-NIEUNCIEUC
+AC4D CD0E # HANGUL SYLLABLE CHIEUCH-O-NIEUNHIEUH
+AC4E CD0F # HANGUL SYLLABLE CHIEUCH-O-TIKEUT
+AC4F CD11 # HANGUL SYLLABLE CHIEUCH-O-RIEULKIYEOK
+AC50 CD12 # HANGUL SYLLABLE CHIEUCH-O-RIEULMIEUM
+AC51 CD13 # HANGUL SYLLABLE CHIEUCH-O-RIEULPIEUP
+AC52 CD14 # HANGUL SYLLABLE CHIEUCH-O-RIEULSIOS
+AC53 CD15 # HANGUL SYLLABLE CHIEUCH-O-RIEULTHIEUTH
+AC54 CD16 # HANGUL SYLLABLE CHIEUCH-O-RIEULPHIEUPH
+AC55 CD17 # HANGUL SYLLABLE CHIEUCH-O-RIEULHIEUH
+AC56 CD1A # HANGUL SYLLABLE CHIEUCH-O-PIEUPSIOS
+AC57 CD1C # HANGUL SYLLABLE CHIEUCH-O-SSANGSIOS
+AC58 CD1E # HANGUL SYLLABLE CHIEUCH-O-CIEUC
+AC59 CD1F # HANGUL SYLLABLE CHIEUCH-O-CHIEUCH
+AC5A CD20 # HANGUL SYLLABLE CHIEUCH-O-KHIEUKH
+AC61 CD21 # HANGUL SYLLABLE CHIEUCH-O-THIEUTH
+AC62 CD22 # HANGUL SYLLABLE CHIEUCH-O-PHIEUPH
+AC63 CD23 # HANGUL SYLLABLE CHIEUCH-O-HIEUH
+AC64 CD25 # HANGUL SYLLABLE CHIEUCH-WA-KIYEOK
+AC65 CD26 # HANGUL SYLLABLE CHIEUCH-WA-SSANGKIYEOK
+AC66 CD27 # HANGUL SYLLABLE CHIEUCH-WA-KIYEOKSIOS
+AC67 CD29 # HANGUL SYLLABLE CHIEUCH-WA-NIEUNCIEUC
+AC68 CD2A # HANGUL SYLLABLE CHIEUCH-WA-NIEUNHIEUH
+AC69 CD2B # HANGUL SYLLABLE CHIEUCH-WA-TIKEUT
+AC6A CD2D # HANGUL SYLLABLE CHIEUCH-WA-RIEULKIYEOK
+AC6B CD2E # HANGUL SYLLABLE CHIEUCH-WA-RIEULMIEUM
+AC6C CD2F # HANGUL SYLLABLE CHIEUCH-WA-RIEULPIEUP
+AC6D CD30 # HANGUL SYLLABLE CHIEUCH-WA-RIEULSIOS
+AC6E CD31 # HANGUL SYLLABLE CHIEUCH-WA-RIEULTHIEUTH
+AC6F CD32 # HANGUL SYLLABLE CHIEUCH-WA-RIEULPHIEUPH
+AC70 CD33 # HANGUL SYLLABLE CHIEUCH-WA-RIEULHIEUH
+AC71 CD34 # HANGUL SYLLABLE CHIEUCH-WA-MIEUM
+AC72 CD35 # HANGUL SYLLABLE CHIEUCH-WA-PIEUP
+AC73 CD36 # HANGUL SYLLABLE CHIEUCH-WA-PIEUPSIOS
+AC74 CD37 # HANGUL SYLLABLE CHIEUCH-WA-SIOS
+AC75 CD38 # HANGUL SYLLABLE CHIEUCH-WA-SSANGSIOS
+AC76 CD3A # HANGUL SYLLABLE CHIEUCH-WA-CIEUC
+AC77 CD3B # HANGUL SYLLABLE CHIEUCH-WA-CHIEUCH
+AC78 CD3C # HANGUL SYLLABLE CHIEUCH-WA-KHIEUKH
+AC79 CD3D # HANGUL SYLLABLE CHIEUCH-WA-THIEUTH
+AC7A CD3E # HANGUL SYLLABLE CHIEUCH-WA-PHIEUPH
+AC81 CD3F # HANGUL SYLLABLE CHIEUCH-WA-HIEUH
+AC82 CD40 # HANGUL SYLLABLE CHIEUCH-WAE
+AC83 CD41 # HANGUL SYLLABLE CHIEUCH-WAE-KIYEOK
+AC84 CD42 # HANGUL SYLLABLE CHIEUCH-WAE-SSANGKIYEOK
+AC85 CD43 # HANGUL SYLLABLE CHIEUCH-WAE-KIYEOKSIOS
+AC86 CD44 # HANGUL SYLLABLE CHIEUCH-WAE-NIEUN
+AC87 CD45 # HANGUL SYLLABLE CHIEUCH-WAE-NIEUNCIEUC
+AC88 CD46 # HANGUL SYLLABLE CHIEUCH-WAE-NIEUNHIEUH
+AC89 CD47 # HANGUL SYLLABLE CHIEUCH-WAE-TIKEUT
+AC8A CD48 # HANGUL SYLLABLE CHIEUCH-WAE-RIEUL
+AC8B CD49 # HANGUL SYLLABLE CHIEUCH-WAE-RIEULKIYEOK
+AC8C CD4A # HANGUL SYLLABLE CHIEUCH-WAE-RIEULMIEUM
+AC8D CD4B # HANGUL SYLLABLE CHIEUCH-WAE-RIEULPIEUP
+AC8E CD4C # HANGUL SYLLABLE CHIEUCH-WAE-RIEULSIOS
+AC8F CD4D # HANGUL SYLLABLE CHIEUCH-WAE-RIEULTHIEUTH
+AC90 CD4E # HANGUL SYLLABLE CHIEUCH-WAE-RIEULPHIEUPH
+AC91 CD4F # HANGUL SYLLABLE CHIEUCH-WAE-RIEULHIEUH
+AC92 CD50 # HANGUL SYLLABLE CHIEUCH-WAE-MIEUM
+AC93 CD51 # HANGUL SYLLABLE CHIEUCH-WAE-PIEUP
+AC94 CD52 # HANGUL SYLLABLE CHIEUCH-WAE-PIEUPSIOS
+AC95 CD53 # HANGUL SYLLABLE CHIEUCH-WAE-SIOS
+AC96 CD54 # HANGUL SYLLABLE CHIEUCH-WAE-SSANGSIOS
+AC97 CD55 # HANGUL SYLLABLE CHIEUCH-WAE-IEUNG
+AC98 CD56 # HANGUL SYLLABLE CHIEUCH-WAE-CIEUC
+AC99 CD57 # HANGUL SYLLABLE CHIEUCH-WAE-CHIEUCH
+AC9A CD58 # HANGUL SYLLABLE CHIEUCH-WAE-KHIEUKH
+AC9B CD59 # HANGUL SYLLABLE CHIEUCH-WAE-THIEUTH
+AC9C CD5A # HANGUL SYLLABLE CHIEUCH-WAE-PHIEUPH
+AC9D CD5B # HANGUL SYLLABLE CHIEUCH-WAE-HIEUH
+AC9E CD5D # HANGUL SYLLABLE CHIEUCH-OE-KIYEOK
+AC9F CD5E # HANGUL SYLLABLE CHIEUCH-OE-SSANGKIYEOK
+ACA0 CD5F # HANGUL SYLLABLE CHIEUCH-OE-KIYEOKSIOS
+ACA1 0410 # CYRILLIC CAPITAL LETTER A
+ACA2 0411 # CYRILLIC CAPITAL LETTER BE
+ACA3 0412 # CYRILLIC CAPITAL LETTER VE
+ACA4 0413 # CYRILLIC CAPITAL LETTER GHE
+ACA5 0414 # CYRILLIC CAPITAL LETTER DE
+ACA6 0415 # CYRILLIC CAPITAL LETTER IE
+ACA7 0401 # CYRILLIC CAPITAL LETTER IO
+ACA8 0416 # CYRILLIC CAPITAL LETTER ZHE
+ACA9 0417 # CYRILLIC CAPITAL LETTER ZE
+ACAA 0418 # CYRILLIC CAPITAL LETTER I
+ACAB 0419 # CYRILLIC CAPITAL LETTER SHORT I
+ACAC 041A # CYRILLIC CAPITAL LETTER KA
+ACAD 041B # CYRILLIC CAPITAL LETTER EL
+ACAE 041C # CYRILLIC CAPITAL LETTER EM
+ACAF 041D # CYRILLIC CAPITAL LETTER EN
+ACB0 041E # CYRILLIC CAPITAL LETTER O
+ACB1 041F # CYRILLIC CAPITAL LETTER PE
+ACB2 0420 # CYRILLIC CAPITAL LETTER ER
+ACB3 0421 # CYRILLIC CAPITAL LETTER ES
+ACB4 0422 # CYRILLIC CAPITAL LETTER TE
+ACB5 0423 # CYRILLIC CAPITAL LETTER U
+ACB6 0424 # CYRILLIC CAPITAL LETTER EF
+ACB7 0425 # CYRILLIC CAPITAL LETTER HA
+ACB8 0426 # CYRILLIC CAPITAL LETTER TSE
+ACB9 0427 # CYRILLIC CAPITAL LETTER CHE
+ACBA 0428 # CYRILLIC CAPITAL LETTER SHA
+ACBB 0429 # CYRILLIC CAPITAL LETTER SHCHA
+ACBC 042A # CYRILLIC CAPITAL LETTER HARD SIGN
+ACBD 042B # CYRILLIC CAPITAL LETTER YERU
+ACBE 042C # CYRILLIC CAPITAL LETTER SOFT SIGN
+ACBF 042D # CYRILLIC CAPITAL LETTER E
+ACC0 042E # CYRILLIC CAPITAL LETTER YU
+ACC1 042F # CYRILLIC CAPITAL LETTER YA
+ACD1 0430 # CYRILLIC SMALL LETTER A
+ACD2 0431 # CYRILLIC SMALL LETTER BE
+ACD3 0432 # CYRILLIC SMALL LETTER VE
+ACD4 0433 # CYRILLIC SMALL LETTER GHE
+ACD5 0434 # CYRILLIC SMALL LETTER DE
+ACD6 0435 # CYRILLIC SMALL LETTER IE
+ACD7 0451 # CYRILLIC SMALL LETTER IO
+ACD8 0436 # CYRILLIC SMALL LETTER ZHE
+ACD9 0437 # CYRILLIC SMALL LETTER ZE
+ACDA 0438 # CYRILLIC SMALL LETTER I
+ACDB 0439 # CYRILLIC SMALL LETTER SHORT I
+ACDC 043A # CYRILLIC SMALL LETTER KA
+ACDD 043B # CYRILLIC SMALL LETTER EL
+ACDE 043C # CYRILLIC SMALL LETTER EM
+ACDF 043D # CYRILLIC SMALL LETTER EN
+ACE0 043E # CYRILLIC SMALL LETTER O
+ACE1 043F # CYRILLIC SMALL LETTER PE
+ACE2 0440 # CYRILLIC SMALL LETTER ER
+ACE3 0441 # CYRILLIC SMALL LETTER ES
+ACE4 0442 # CYRILLIC SMALL LETTER TE
+ACE5 0443 # CYRILLIC SMALL LETTER U
+ACE6 0444 # CYRILLIC SMALL LETTER EF
+ACE7 0445 # CYRILLIC SMALL LETTER HA
+ACE8 0446 # CYRILLIC SMALL LETTER TSE
+ACE9 0447 # CYRILLIC SMALL LETTER CHE
+ACEA 0448 # CYRILLIC SMALL LETTER SHA
+ACEB 0449 # CYRILLIC SMALL LETTER SHCHA
+ACEC 044A # CYRILLIC SMALL LETTER HARD SIGN
+ACED 044B # CYRILLIC SMALL LETTER YERU
+ACEE 044C # CYRILLIC SMALL LETTER SOFT SIGN
+ACEF 044D # CYRILLIC SMALL LETTER E
+ACF0 044E # CYRILLIC SMALL LETTER YU
+ACF1 044F # CYRILLIC SMALL LETTER YA
+AD41 CD61 # HANGUL SYLLABLE CHIEUCH-OE-NIEUNCIEUC
+AD42 CD62 # HANGUL SYLLABLE CHIEUCH-OE-NIEUNHIEUH
+AD43 CD63 # HANGUL SYLLABLE CHIEUCH-OE-TIKEUT
+AD44 CD65 # HANGUL SYLLABLE CHIEUCH-OE-RIEULKIYEOK
+AD45 CD66 # HANGUL SYLLABLE CHIEUCH-OE-RIEULMIEUM
+AD46 CD67 # HANGUL SYLLABLE CHIEUCH-OE-RIEULPIEUP
+AD47 CD68 # HANGUL SYLLABLE CHIEUCH-OE-RIEULSIOS
+AD48 CD69 # HANGUL SYLLABLE CHIEUCH-OE-RIEULTHIEUTH
+AD49 CD6A # HANGUL SYLLABLE CHIEUCH-OE-RIEULPHIEUPH
+AD4A CD6B # HANGUL SYLLABLE CHIEUCH-OE-RIEULHIEUH
+AD4B CD6E # HANGUL SYLLABLE CHIEUCH-OE-PIEUPSIOS
+AD4C CD70 # HANGUL SYLLABLE CHIEUCH-OE-SSANGSIOS
+AD4D CD72 # HANGUL SYLLABLE CHIEUCH-OE-CIEUC
+AD4E CD73 # HANGUL SYLLABLE CHIEUCH-OE-CHIEUCH
+AD4F CD74 # HANGUL SYLLABLE CHIEUCH-OE-KHIEUKH
+AD50 CD75 # HANGUL SYLLABLE CHIEUCH-OE-THIEUTH
+AD51 CD76 # HANGUL SYLLABLE CHIEUCH-OE-PHIEUPH
+AD52 CD77 # HANGUL SYLLABLE CHIEUCH-OE-HIEUH
+AD53 CD79 # HANGUL SYLLABLE CHIEUCH-YO-KIYEOK
+AD54 CD7A # HANGUL SYLLABLE CHIEUCH-YO-SSANGKIYEOK
+AD55 CD7B # HANGUL SYLLABLE CHIEUCH-YO-KIYEOKSIOS
+AD56 CD7C # HANGUL SYLLABLE CHIEUCH-YO-NIEUN
+AD57 CD7D # HANGUL SYLLABLE CHIEUCH-YO-NIEUNCIEUC
+AD58 CD7E # HANGUL SYLLABLE CHIEUCH-YO-NIEUNHIEUH
+AD59 CD7F # HANGUL SYLLABLE CHIEUCH-YO-TIKEUT
+AD5A CD80 # HANGUL SYLLABLE CHIEUCH-YO-RIEUL
+AD61 CD81 # HANGUL SYLLABLE CHIEUCH-YO-RIEULKIYEOK
+AD62 CD82 # HANGUL SYLLABLE CHIEUCH-YO-RIEULMIEUM
+AD63 CD83 # HANGUL SYLLABLE CHIEUCH-YO-RIEULPIEUP
+AD64 CD84 # HANGUL SYLLABLE CHIEUCH-YO-RIEULSIOS
+AD65 CD85 # HANGUL SYLLABLE CHIEUCH-YO-RIEULTHIEUTH
+AD66 CD86 # HANGUL SYLLABLE CHIEUCH-YO-RIEULPHIEUPH
+AD67 CD87 # HANGUL SYLLABLE CHIEUCH-YO-RIEULHIEUH
+AD68 CD89 # HANGUL SYLLABLE CHIEUCH-YO-PIEUP
+AD69 CD8A # HANGUL SYLLABLE CHIEUCH-YO-PIEUPSIOS
+AD6A CD8B # HANGUL SYLLABLE CHIEUCH-YO-SIOS
+AD6B CD8C # HANGUL SYLLABLE CHIEUCH-YO-SSANGSIOS
+AD6C CD8D # HANGUL SYLLABLE CHIEUCH-YO-IEUNG
+AD6D CD8E # HANGUL SYLLABLE CHIEUCH-YO-CIEUC
+AD6E CD8F # HANGUL SYLLABLE CHIEUCH-YO-CHIEUCH
+AD6F CD90 # HANGUL SYLLABLE CHIEUCH-YO-KHIEUKH
+AD70 CD91 # HANGUL SYLLABLE CHIEUCH-YO-THIEUTH
+AD71 CD92 # HANGUL SYLLABLE CHIEUCH-YO-PHIEUPH
+AD72 CD93 # HANGUL SYLLABLE CHIEUCH-YO-HIEUH
+AD73 CD96 # HANGUL SYLLABLE CHIEUCH-U-SSANGKIYEOK
+AD74 CD97 # HANGUL SYLLABLE CHIEUCH-U-KIYEOKSIOS
+AD75 CD99 # HANGUL SYLLABLE CHIEUCH-U-NIEUNCIEUC
+AD76 CD9A # HANGUL SYLLABLE CHIEUCH-U-NIEUNHIEUH
+AD77 CD9B # HANGUL SYLLABLE CHIEUCH-U-TIKEUT
+AD78 CD9D # HANGUL SYLLABLE CHIEUCH-U-RIEULKIYEOK
+AD79 CD9E # HANGUL SYLLABLE CHIEUCH-U-RIEULMIEUM
+AD7A CD9F # HANGUL SYLLABLE CHIEUCH-U-RIEULPIEUP
+AD81 CDA0 # HANGUL SYLLABLE CHIEUCH-U-RIEULSIOS
+AD82 CDA1 # HANGUL SYLLABLE CHIEUCH-U-RIEULTHIEUTH
+AD83 CDA2 # HANGUL SYLLABLE CHIEUCH-U-RIEULPHIEUPH
+AD84 CDA3 # HANGUL SYLLABLE CHIEUCH-U-RIEULHIEUH
+AD85 CDA6 # HANGUL SYLLABLE CHIEUCH-U-PIEUPSIOS
+AD86 CDA8 # HANGUL SYLLABLE CHIEUCH-U-SSANGSIOS
+AD87 CDAA # HANGUL SYLLABLE CHIEUCH-U-CIEUC
+AD88 CDAB # HANGUL SYLLABLE CHIEUCH-U-CHIEUCH
+AD89 CDAC # HANGUL SYLLABLE CHIEUCH-U-KHIEUKH
+AD8A CDAD # HANGUL SYLLABLE CHIEUCH-U-THIEUTH
+AD8B CDAE # HANGUL SYLLABLE CHIEUCH-U-PHIEUPH
+AD8C CDAF # HANGUL SYLLABLE CHIEUCH-U-HIEUH
+AD8D CDB1 # HANGUL SYLLABLE CHIEUCH-WEO-KIYEOK
+AD8E CDB2 # HANGUL SYLLABLE CHIEUCH-WEO-SSANGKIYEOK
+AD8F CDB3 # HANGUL SYLLABLE CHIEUCH-WEO-KIYEOKSIOS
+AD90 CDB4 # HANGUL SYLLABLE CHIEUCH-WEO-NIEUN
+AD91 CDB5 # HANGUL SYLLABLE CHIEUCH-WEO-NIEUNCIEUC
+AD92 CDB6 # HANGUL SYLLABLE CHIEUCH-WEO-NIEUNHIEUH
+AD93 CDB7 # HANGUL SYLLABLE CHIEUCH-WEO-TIKEUT
+AD94 CDB8 # HANGUL SYLLABLE CHIEUCH-WEO-RIEUL
+AD95 CDB9 # HANGUL SYLLABLE CHIEUCH-WEO-RIEULKIYEOK
+AD96 CDBA # HANGUL SYLLABLE CHIEUCH-WEO-RIEULMIEUM
+AD97 CDBB # HANGUL SYLLABLE CHIEUCH-WEO-RIEULPIEUP
+AD98 CDBC # HANGUL SYLLABLE CHIEUCH-WEO-RIEULSIOS
+AD99 CDBD # HANGUL SYLLABLE CHIEUCH-WEO-RIEULTHIEUTH
+AD9A CDBE # HANGUL SYLLABLE CHIEUCH-WEO-RIEULPHIEUPH
+AD9B CDBF # HANGUL SYLLABLE CHIEUCH-WEO-RIEULHIEUH
+AD9C CDC0 # HANGUL SYLLABLE CHIEUCH-WEO-MIEUM
+AD9D CDC1 # HANGUL SYLLABLE CHIEUCH-WEO-PIEUP
+AD9E CDC2 # HANGUL SYLLABLE CHIEUCH-WEO-PIEUPSIOS
+AD9F CDC3 # HANGUL SYLLABLE CHIEUCH-WEO-SIOS
+ADA0 CDC5 # HANGUL SYLLABLE CHIEUCH-WEO-IEUNG
+AE41 CDC6 # HANGUL SYLLABLE CHIEUCH-WEO-CIEUC
+AE42 CDC7 # HANGUL SYLLABLE CHIEUCH-WEO-CHIEUCH
+AE43 CDC8 # HANGUL SYLLABLE CHIEUCH-WEO-KHIEUKH
+AE44 CDC9 # HANGUL SYLLABLE CHIEUCH-WEO-THIEUTH
+AE45 CDCA # HANGUL SYLLABLE CHIEUCH-WEO-PHIEUPH
+AE46 CDCB # HANGUL SYLLABLE CHIEUCH-WEO-HIEUH
+AE47 CDCD # HANGUL SYLLABLE CHIEUCH-WE-KIYEOK
+AE48 CDCE # HANGUL SYLLABLE CHIEUCH-WE-SSANGKIYEOK
+AE49 CDCF # HANGUL SYLLABLE CHIEUCH-WE-KIYEOKSIOS
+AE4A CDD1 # HANGUL SYLLABLE CHIEUCH-WE-NIEUNCIEUC
+AE4B CDD2 # HANGUL SYLLABLE CHIEUCH-WE-NIEUNHIEUH
+AE4C CDD3 # HANGUL SYLLABLE CHIEUCH-WE-TIKEUT
+AE4D CDD4 # HANGUL SYLLABLE CHIEUCH-WE-RIEUL
+AE4E CDD5 # HANGUL SYLLABLE CHIEUCH-WE-RIEULKIYEOK
+AE4F CDD6 # HANGUL SYLLABLE CHIEUCH-WE-RIEULMIEUM
+AE50 CDD7 # HANGUL SYLLABLE CHIEUCH-WE-RIEULPIEUP
+AE51 CDD8 # HANGUL SYLLABLE CHIEUCH-WE-RIEULSIOS
+AE52 CDD9 # HANGUL SYLLABLE CHIEUCH-WE-RIEULTHIEUTH
+AE53 CDDA # HANGUL SYLLABLE CHIEUCH-WE-RIEULPHIEUPH
+AE54 CDDB # HANGUL SYLLABLE CHIEUCH-WE-RIEULHIEUH
+AE55 CDDC # HANGUL SYLLABLE CHIEUCH-WE-MIEUM
+AE56 CDDD # HANGUL SYLLABLE CHIEUCH-WE-PIEUP
+AE57 CDDE # HANGUL SYLLABLE CHIEUCH-WE-PIEUPSIOS
+AE58 CDDF # HANGUL SYLLABLE CHIEUCH-WE-SIOS
+AE59 CDE0 # HANGUL SYLLABLE CHIEUCH-WE-SSANGSIOS
+AE5A CDE1 # HANGUL SYLLABLE CHIEUCH-WE-IEUNG
+AE61 CDE2 # HANGUL SYLLABLE CHIEUCH-WE-CIEUC
+AE62 CDE3 # HANGUL SYLLABLE CHIEUCH-WE-CHIEUCH
+AE63 CDE4 # HANGUL SYLLABLE CHIEUCH-WE-KHIEUKH
+AE64 CDE5 # HANGUL SYLLABLE CHIEUCH-WE-THIEUTH
+AE65 CDE6 # HANGUL SYLLABLE CHIEUCH-WE-PHIEUPH
+AE66 CDE7 # HANGUL SYLLABLE CHIEUCH-WE-HIEUH
+AE67 CDE9 # HANGUL SYLLABLE CHIEUCH-WI-KIYEOK
+AE68 CDEA # HANGUL SYLLABLE CHIEUCH-WI-SSANGKIYEOK
+AE69 CDEB # HANGUL SYLLABLE CHIEUCH-WI-KIYEOKSIOS
+AE6A CDED # HANGUL SYLLABLE CHIEUCH-WI-NIEUNCIEUC
+AE6B CDEE # HANGUL SYLLABLE CHIEUCH-WI-NIEUNHIEUH
+AE6C CDEF # HANGUL SYLLABLE CHIEUCH-WI-TIKEUT
+AE6D CDF1 # HANGUL SYLLABLE CHIEUCH-WI-RIEULKIYEOK
+AE6E CDF2 # HANGUL SYLLABLE CHIEUCH-WI-RIEULMIEUM
+AE6F CDF3 # HANGUL SYLLABLE CHIEUCH-WI-RIEULPIEUP
+AE70 CDF4 # HANGUL SYLLABLE CHIEUCH-WI-RIEULSIOS
+AE71 CDF5 # HANGUL SYLLABLE CHIEUCH-WI-RIEULTHIEUTH
+AE72 CDF6 # HANGUL SYLLABLE CHIEUCH-WI-RIEULPHIEUPH
+AE73 CDF7 # HANGUL SYLLABLE CHIEUCH-WI-RIEULHIEUH
+AE74 CDFA # HANGUL SYLLABLE CHIEUCH-WI-PIEUPSIOS
+AE75 CDFC # HANGUL SYLLABLE CHIEUCH-WI-SSANGSIOS
+AE76 CDFE # HANGUL SYLLABLE CHIEUCH-WI-CIEUC
+AE77 CDFF # HANGUL SYLLABLE CHIEUCH-WI-CHIEUCH
+AE78 CE00 # HANGUL SYLLABLE CHIEUCH-WI-KHIEUKH
+AE79 CE01 # HANGUL SYLLABLE CHIEUCH-WI-THIEUTH
+AE7A CE02 # HANGUL SYLLABLE CHIEUCH-WI-PHIEUPH
+AE81 CE03 # HANGUL SYLLABLE CHIEUCH-WI-HIEUH
+AE82 CE05 # HANGUL SYLLABLE CHIEUCH-YU-KIYEOK
+AE83 CE06 # HANGUL SYLLABLE CHIEUCH-YU-SSANGKIYEOK
+AE84 CE07 # HANGUL SYLLABLE CHIEUCH-YU-KIYEOKSIOS
+AE85 CE09 # HANGUL SYLLABLE CHIEUCH-YU-NIEUNCIEUC
+AE86 CE0A # HANGUL SYLLABLE CHIEUCH-YU-NIEUNHIEUH
+AE87 CE0B # HANGUL SYLLABLE CHIEUCH-YU-TIKEUT
+AE88 CE0D # HANGUL SYLLABLE CHIEUCH-YU-RIEULKIYEOK
+AE89 CE0E # HANGUL SYLLABLE CHIEUCH-YU-RIEULMIEUM
+AE8A CE0F # HANGUL SYLLABLE CHIEUCH-YU-RIEULPIEUP
+AE8B CE10 # HANGUL SYLLABLE CHIEUCH-YU-RIEULSIOS
+AE8C CE11 # HANGUL SYLLABLE CHIEUCH-YU-RIEULTHIEUTH
+AE8D CE12 # HANGUL SYLLABLE CHIEUCH-YU-RIEULPHIEUPH
+AE8E CE13 # HANGUL SYLLABLE CHIEUCH-YU-RIEULHIEUH
+AE8F CE15 # HANGUL SYLLABLE CHIEUCH-YU-PIEUP
+AE90 CE16 # HANGUL SYLLABLE CHIEUCH-YU-PIEUPSIOS
+AE91 CE17 # HANGUL SYLLABLE CHIEUCH-YU-SIOS
+AE92 CE18 # HANGUL SYLLABLE CHIEUCH-YU-SSANGSIOS
+AE93 CE1A # HANGUL SYLLABLE CHIEUCH-YU-CIEUC
+AE94 CE1B # HANGUL SYLLABLE CHIEUCH-YU-CHIEUCH
+AE95 CE1C # HANGUL SYLLABLE CHIEUCH-YU-KHIEUKH
+AE96 CE1D # HANGUL SYLLABLE CHIEUCH-YU-THIEUTH
+AE97 CE1E # HANGUL SYLLABLE CHIEUCH-YU-PHIEUPH
+AE98 CE1F # HANGUL SYLLABLE CHIEUCH-YU-HIEUH
+AE99 CE22 # HANGUL SYLLABLE CHIEUCH-EU-SSANGKIYEOK
+AE9A CE23 # HANGUL SYLLABLE CHIEUCH-EU-KIYEOKSIOS
+AE9B CE25 # HANGUL SYLLABLE CHIEUCH-EU-NIEUNCIEUC
+AE9C CE26 # HANGUL SYLLABLE CHIEUCH-EU-NIEUNHIEUH
+AE9D CE27 # HANGUL SYLLABLE CHIEUCH-EU-TIKEUT
+AE9E CE29 # HANGUL SYLLABLE CHIEUCH-EU-RIEULKIYEOK
+AE9F CE2A # HANGUL SYLLABLE CHIEUCH-EU-RIEULMIEUM
+AEA0 CE2B # HANGUL SYLLABLE CHIEUCH-EU-RIEULPIEUP
+AF41 CE2C # HANGUL SYLLABLE CHIEUCH-EU-RIEULSIOS
+AF42 CE2D # HANGUL SYLLABLE CHIEUCH-EU-RIEULTHIEUTH
+AF43 CE2E # HANGUL SYLLABLE CHIEUCH-EU-RIEULPHIEUPH
+AF44 CE2F # HANGUL SYLLABLE CHIEUCH-EU-RIEULHIEUH
+AF45 CE32 # HANGUL SYLLABLE CHIEUCH-EU-PIEUPSIOS
+AF46 CE34 # HANGUL SYLLABLE CHIEUCH-EU-SSANGSIOS
+AF47 CE36 # HANGUL SYLLABLE CHIEUCH-EU-CIEUC
+AF48 CE37 # HANGUL SYLLABLE CHIEUCH-EU-CHIEUCH
+AF49 CE38 # HANGUL SYLLABLE CHIEUCH-EU-KHIEUKH
+AF4A CE39 # HANGUL SYLLABLE CHIEUCH-EU-THIEUTH
+AF4B CE3A # HANGUL SYLLABLE CHIEUCH-EU-PHIEUPH
+AF4C CE3B # HANGUL SYLLABLE CHIEUCH-EU-HIEUH
+AF4D CE3C # HANGUL SYLLABLE CHIEUCH-YI
+AF4E CE3D # HANGUL SYLLABLE CHIEUCH-YI-KIYEOK
+AF4F CE3E # HANGUL SYLLABLE CHIEUCH-YI-SSANGKIYEOK
+AF50 CE3F # HANGUL SYLLABLE CHIEUCH-YI-KIYEOKSIOS
+AF51 CE40 # HANGUL SYLLABLE CHIEUCH-YI-NIEUN
+AF52 CE41 # HANGUL SYLLABLE CHIEUCH-YI-NIEUNCIEUC
+AF53 CE42 # HANGUL SYLLABLE CHIEUCH-YI-NIEUNHIEUH
+AF54 CE43 # HANGUL SYLLABLE CHIEUCH-YI-TIKEUT
+AF55 CE44 # HANGUL SYLLABLE CHIEUCH-YI-RIEUL
+AF56 CE45 # HANGUL SYLLABLE CHIEUCH-YI-RIEULKIYEOK
+AF57 CE46 # HANGUL SYLLABLE CHIEUCH-YI-RIEULMIEUM
+AF58 CE47 # HANGUL SYLLABLE CHIEUCH-YI-RIEULPIEUP
+AF59 CE48 # HANGUL SYLLABLE CHIEUCH-YI-RIEULSIOS
+AF5A CE49 # HANGUL SYLLABLE CHIEUCH-YI-RIEULTHIEUTH
+AF61 CE4A # HANGUL SYLLABLE CHIEUCH-YI-RIEULPHIEUPH
+AF62 CE4B # HANGUL SYLLABLE CHIEUCH-YI-RIEULHIEUH
+AF63 CE4C # HANGUL SYLLABLE CHIEUCH-YI-MIEUM
+AF64 CE4D # HANGUL SYLLABLE CHIEUCH-YI-PIEUP
+AF65 CE4E # HANGUL SYLLABLE CHIEUCH-YI-PIEUPSIOS
+AF66 CE4F # HANGUL SYLLABLE CHIEUCH-YI-SIOS
+AF67 CE50 # HANGUL SYLLABLE CHIEUCH-YI-SSANGSIOS
+AF68 CE51 # HANGUL SYLLABLE CHIEUCH-YI-IEUNG
+AF69 CE52 # HANGUL SYLLABLE CHIEUCH-YI-CIEUC
+AF6A CE53 # HANGUL SYLLABLE CHIEUCH-YI-CHIEUCH
+AF6B CE54 # HANGUL SYLLABLE CHIEUCH-YI-KHIEUKH
+AF6C CE55 # HANGUL SYLLABLE CHIEUCH-YI-THIEUTH
+AF6D CE56 # HANGUL SYLLABLE CHIEUCH-YI-PHIEUPH
+AF6E CE57 # HANGUL SYLLABLE CHIEUCH-YI-HIEUH
+AF6F CE5A # HANGUL SYLLABLE CHIEUCH-I-SSANGKIYEOK
+AF70 CE5B # HANGUL SYLLABLE CHIEUCH-I-KIYEOKSIOS
+AF71 CE5D # HANGUL SYLLABLE CHIEUCH-I-NIEUNCIEUC
+AF72 CE5E # HANGUL SYLLABLE CHIEUCH-I-NIEUNHIEUH
+AF73 CE62 # HANGUL SYLLABLE CHIEUCH-I-RIEULMIEUM
+AF74 CE63 # HANGUL SYLLABLE CHIEUCH-I-RIEULPIEUP
+AF75 CE64 # HANGUL SYLLABLE CHIEUCH-I-RIEULSIOS
+AF76 CE65 # HANGUL SYLLABLE CHIEUCH-I-RIEULTHIEUTH
+AF77 CE66 # HANGUL SYLLABLE CHIEUCH-I-RIEULPHIEUPH
+AF78 CE67 # HANGUL SYLLABLE CHIEUCH-I-RIEULHIEUH
+AF79 CE6A # HANGUL SYLLABLE CHIEUCH-I-PIEUPSIOS
+AF7A CE6C # HANGUL SYLLABLE CHIEUCH-I-SSANGSIOS
+AF81 CE6E # HANGUL SYLLABLE CHIEUCH-I-CIEUC
+AF82 CE6F # HANGUL SYLLABLE CHIEUCH-I-CHIEUCH
+AF83 CE70 # HANGUL SYLLABLE CHIEUCH-I-KHIEUKH
+AF84 CE71 # HANGUL SYLLABLE CHIEUCH-I-THIEUTH
+AF85 CE72 # HANGUL SYLLABLE CHIEUCH-I-PHIEUPH
+AF86 CE73 # HANGUL SYLLABLE CHIEUCH-I-HIEUH
+AF87 CE76 # HANGUL SYLLABLE KHIEUKH-A-SSANGKIYEOK
+AF88 CE77 # HANGUL SYLLABLE KHIEUKH-A-KIYEOKSIOS
+AF89 CE79 # HANGUL SYLLABLE KHIEUKH-A-NIEUNCIEUC
+AF8A CE7A # HANGUL SYLLABLE KHIEUKH-A-NIEUNHIEUH
+AF8B CE7B # HANGUL SYLLABLE KHIEUKH-A-TIKEUT
+AF8C CE7D # HANGUL SYLLABLE KHIEUKH-A-RIEULKIYEOK
+AF8D CE7E # HANGUL SYLLABLE KHIEUKH-A-RIEULMIEUM
+AF8E CE7F # HANGUL SYLLABLE KHIEUKH-A-RIEULPIEUP
+AF8F CE80 # HANGUL SYLLABLE KHIEUKH-A-RIEULSIOS
+AF90 CE81 # HANGUL SYLLABLE KHIEUKH-A-RIEULTHIEUTH
+AF91 CE82 # HANGUL SYLLABLE KHIEUKH-A-RIEULPHIEUPH
+AF92 CE83 # HANGUL SYLLABLE KHIEUKH-A-RIEULHIEUH
+AF93 CE86 # HANGUL SYLLABLE KHIEUKH-A-PIEUPSIOS
+AF94 CE88 # HANGUL SYLLABLE KHIEUKH-A-SSANGSIOS
+AF95 CE8A # HANGUL SYLLABLE KHIEUKH-A-CIEUC
+AF96 CE8B # HANGUL SYLLABLE KHIEUKH-A-CHIEUCH
+AF97 CE8C # HANGUL SYLLABLE KHIEUKH-A-KHIEUKH
+AF98 CE8D # HANGUL SYLLABLE KHIEUKH-A-THIEUTH
+AF99 CE8E # HANGUL SYLLABLE KHIEUKH-A-PHIEUPH
+AF9A CE8F # HANGUL SYLLABLE KHIEUKH-A-HIEUH
+AF9B CE92 # HANGUL SYLLABLE KHIEUKH-AE-SSANGKIYEOK
+AF9C CE93 # HANGUL SYLLABLE KHIEUKH-AE-KIYEOKSIOS
+AF9D CE95 # HANGUL SYLLABLE KHIEUKH-AE-NIEUNCIEUC
+AF9E CE96 # HANGUL SYLLABLE KHIEUKH-AE-NIEUNHIEUH
+AF9F CE97 # HANGUL SYLLABLE KHIEUKH-AE-TIKEUT
+AFA0 CE99 # HANGUL SYLLABLE KHIEUKH-AE-RIEULKIYEOK
+B041 CE9A # HANGUL SYLLABLE KHIEUKH-AE-RIEULMIEUM
+B042 CE9B # HANGUL SYLLABLE KHIEUKH-AE-RIEULPIEUP
+B043 CE9C # HANGUL SYLLABLE KHIEUKH-AE-RIEULSIOS
+B044 CE9D # HANGUL SYLLABLE KHIEUKH-AE-RIEULTHIEUTH
+B045 CE9E # HANGUL SYLLABLE KHIEUKH-AE-RIEULPHIEUPH
+B046 CE9F # HANGUL SYLLABLE KHIEUKH-AE-RIEULHIEUH
+B047 CEA2 # HANGUL SYLLABLE KHIEUKH-AE-PIEUPSIOS
+B048 CEA6 # HANGUL SYLLABLE KHIEUKH-AE-CIEUC
+B049 CEA7 # HANGUL SYLLABLE KHIEUKH-AE-CHIEUCH
+B04A CEA8 # HANGUL SYLLABLE KHIEUKH-AE-KHIEUKH
+B04B CEA9 # HANGUL SYLLABLE KHIEUKH-AE-THIEUTH
+B04C CEAA # HANGUL SYLLABLE KHIEUKH-AE-PHIEUPH
+B04D CEAB # HANGUL SYLLABLE KHIEUKH-AE-HIEUH
+B04E CEAE # HANGUL SYLLABLE KHIEUKH-YA-SSANGKIYEOK
+B04F CEAF # HANGUL SYLLABLE KHIEUKH-YA-KIYEOKSIOS
+B050 CEB0 # HANGUL SYLLABLE KHIEUKH-YA-NIEUN
+B051 CEB1 # HANGUL SYLLABLE KHIEUKH-YA-NIEUNCIEUC
+B052 CEB2 # HANGUL SYLLABLE KHIEUKH-YA-NIEUNHIEUH
+B053 CEB3 # HANGUL SYLLABLE KHIEUKH-YA-TIKEUT
+B054 CEB4 # HANGUL SYLLABLE KHIEUKH-YA-RIEUL
+B055 CEB5 # HANGUL SYLLABLE KHIEUKH-YA-RIEULKIYEOK
+B056 CEB6 # HANGUL SYLLABLE KHIEUKH-YA-RIEULMIEUM
+B057 CEB7 # HANGUL SYLLABLE KHIEUKH-YA-RIEULPIEUP
+B058 CEB8 # HANGUL SYLLABLE KHIEUKH-YA-RIEULSIOS
+B059 CEB9 # HANGUL SYLLABLE KHIEUKH-YA-RIEULTHIEUTH
+B05A CEBA # HANGUL SYLLABLE KHIEUKH-YA-RIEULPHIEUPH
+B061 CEBB # HANGUL SYLLABLE KHIEUKH-YA-RIEULHIEUH
+B062 CEBC # HANGUL SYLLABLE KHIEUKH-YA-MIEUM
+B063 CEBD # HANGUL SYLLABLE KHIEUKH-YA-PIEUP
+B064 CEBE # HANGUL SYLLABLE KHIEUKH-YA-PIEUPSIOS
+B065 CEBF # HANGUL SYLLABLE KHIEUKH-YA-SIOS
+B066 CEC0 # HANGUL SYLLABLE KHIEUKH-YA-SSANGSIOS
+B067 CEC2 # HANGUL SYLLABLE KHIEUKH-YA-CIEUC
+B068 CEC3 # HANGUL SYLLABLE KHIEUKH-YA-CHIEUCH
+B069 CEC4 # HANGUL SYLLABLE KHIEUKH-YA-KHIEUKH
+B06A CEC5 # HANGUL SYLLABLE KHIEUKH-YA-THIEUTH
+B06B CEC6 # HANGUL SYLLABLE KHIEUKH-YA-PHIEUPH
+B06C CEC7 # HANGUL SYLLABLE KHIEUKH-YA-HIEUH
+B06D CEC8 # HANGUL SYLLABLE KHIEUKH-YAE
+B06E CEC9 # HANGUL SYLLABLE KHIEUKH-YAE-KIYEOK
+B06F CECA # HANGUL SYLLABLE KHIEUKH-YAE-SSANGKIYEOK
+B070 CECB # HANGUL SYLLABLE KHIEUKH-YAE-KIYEOKSIOS
+B071 CECC # HANGUL SYLLABLE KHIEUKH-YAE-NIEUN
+B072 CECD # HANGUL SYLLABLE KHIEUKH-YAE-NIEUNCIEUC
+B073 CECE # HANGUL SYLLABLE KHIEUKH-YAE-NIEUNHIEUH
+B074 CECF # HANGUL SYLLABLE KHIEUKH-YAE-TIKEUT
+B075 CED0 # HANGUL SYLLABLE KHIEUKH-YAE-RIEUL
+B076 CED1 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULKIYEOK
+B077 CED2 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULMIEUM
+B078 CED3 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULPIEUP
+B079 CED4 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULSIOS
+B07A CED5 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULTHIEUTH
+B081 CED6 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULPHIEUPH
+B082 CED7 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULHIEUH
+B083 CED8 # HANGUL SYLLABLE KHIEUKH-YAE-MIEUM
+B084 CED9 # HANGUL SYLLABLE KHIEUKH-YAE-PIEUP
+B085 CEDA # HANGUL SYLLABLE KHIEUKH-YAE-PIEUPSIOS
+B086 CEDB # HANGUL SYLLABLE KHIEUKH-YAE-SIOS
+B087 CEDC # HANGUL SYLLABLE KHIEUKH-YAE-SSANGSIOS
+B088 CEDD # HANGUL SYLLABLE KHIEUKH-YAE-IEUNG
+B089 CEDE # HANGUL SYLLABLE KHIEUKH-YAE-CIEUC
+B08A CEDF # HANGUL SYLLABLE KHIEUKH-YAE-CHIEUCH
+B08B CEE0 # HANGUL SYLLABLE KHIEUKH-YAE-KHIEUKH
+B08C CEE1 # HANGUL SYLLABLE KHIEUKH-YAE-THIEUTH
+B08D CEE2 # HANGUL SYLLABLE KHIEUKH-YAE-PHIEUPH
+B08E CEE3 # HANGUL SYLLABLE KHIEUKH-YAE-HIEUH
+B08F CEE6 # HANGUL SYLLABLE KHIEUKH-EO-SSANGKIYEOK
+B090 CEE7 # HANGUL SYLLABLE KHIEUKH-EO-KIYEOKSIOS
+B091 CEE9 # HANGUL SYLLABLE KHIEUKH-EO-NIEUNCIEUC
+B092 CEEA # HANGUL SYLLABLE KHIEUKH-EO-NIEUNHIEUH
+B093 CEED # HANGUL SYLLABLE KHIEUKH-EO-RIEULKIYEOK
+B094 CEEE # HANGUL SYLLABLE KHIEUKH-EO-RIEULMIEUM
+B095 CEEF # HANGUL SYLLABLE KHIEUKH-EO-RIEULPIEUP
+B096 CEF0 # HANGUL SYLLABLE KHIEUKH-EO-RIEULSIOS
+B097 CEF1 # HANGUL SYLLABLE KHIEUKH-EO-RIEULTHIEUTH
+B098 CEF2 # HANGUL SYLLABLE KHIEUKH-EO-RIEULPHIEUPH
+B099 CEF3 # HANGUL SYLLABLE KHIEUKH-EO-RIEULHIEUH
+B09A CEF6 # HANGUL SYLLABLE KHIEUKH-EO-PIEUPSIOS
+B09B CEFA # HANGUL SYLLABLE KHIEUKH-EO-CIEUC
+B09C CEFB # HANGUL SYLLABLE KHIEUKH-EO-CHIEUCH
+B09D CEFC # HANGUL SYLLABLE KHIEUKH-EO-KHIEUKH
+B09E CEFD # HANGUL SYLLABLE KHIEUKH-EO-THIEUTH
+B09F CEFE # HANGUL SYLLABLE KHIEUKH-EO-PHIEUPH
+B0A0 CEFF # HANGUL SYLLABLE KHIEUKH-EO-HIEUH
+B0A1 AC00 # HANGUL SYLLABLE KIYEOK-A
+B0A2 AC01 # HANGUL SYLLABLE KIYEOK-A-KIYEOK
+B0A3 AC04 # HANGUL SYLLABLE KIYEOK-A-NIEUN
+B0A4 AC07 # HANGUL SYLLABLE KIYEOK-A-TIKEUT
+B0A5 AC08 # HANGUL SYLLABLE KIYEOK-A-RIEUL
+B0A6 AC09 # HANGUL SYLLABLE KIYEOK-A-RIEULKIYEOK
+B0A7 AC0A # HANGUL SYLLABLE KIYEOK-A-RIEULMIEUM
+B0A8 AC10 # HANGUL SYLLABLE KIYEOK-A-MIEUM
+B0A9 AC11 # HANGUL SYLLABLE KIYEOK-A-PIEUP
+B0AA AC12 # HANGUL SYLLABLE KIYEOK-A-PIEUPSIOS
+B0AB AC13 # HANGUL SYLLABLE KIYEOK-A-SIOS
+B0AC AC14 # HANGUL SYLLABLE KIYEOK-A-SSANGSIOS
+B0AD AC15 # HANGUL SYLLABLE KIYEOK-A-IEUNG
+B0AE AC16 # HANGUL SYLLABLE KIYEOK-A-CIEUC
+B0AF AC17 # HANGUL SYLLABLE KIYEOK-A-CHIEUCH
+B0B0 AC19 # HANGUL SYLLABLE KIYEOK-A-THIEUTH
+B0B1 AC1A # HANGUL SYLLABLE KIYEOK-A-PHIEUPH
+B0B2 AC1B # HANGUL SYLLABLE KIYEOK-A-HIEUH
+B0B3 AC1C # HANGUL SYLLABLE KIYEOK-AE
+B0B4 AC1D # HANGUL SYLLABLE KIYEOK-AE-KIYEOK
+B0B5 AC20 # HANGUL SYLLABLE KIYEOK-AE-NIEUN
+B0B6 AC24 # HANGUL SYLLABLE KIYEOK-AE-RIEUL
+B0B7 AC2C # HANGUL SYLLABLE KIYEOK-AE-MIEUM
+B0B8 AC2D # HANGUL SYLLABLE KIYEOK-AE-PIEUP
+B0B9 AC2F # HANGUL SYLLABLE KIYEOK-AE-SIOS
+B0BA AC30 # HANGUL SYLLABLE KIYEOK-AE-SSANGSIOS
+B0BB AC31 # HANGUL SYLLABLE KIYEOK-AE-IEUNG
+B0BC AC38 # HANGUL SYLLABLE KIYEOK-YA
+B0BD AC39 # HANGUL SYLLABLE KIYEOK-YA-KIYEOK
+B0BE AC3C # HANGUL SYLLABLE KIYEOK-YA-NIEUN
+B0BF AC40 # HANGUL SYLLABLE KIYEOK-YA-RIEUL
+B0C0 AC4B # HANGUL SYLLABLE KIYEOK-YA-SIOS
+B0C1 AC4D # HANGUL SYLLABLE KIYEOK-YA-IEUNG
+B0C2 AC54 # HANGUL SYLLABLE KIYEOK-YAE
+B0C3 AC58 # HANGUL SYLLABLE KIYEOK-YAE-NIEUN
+B0C4 AC5C # HANGUL SYLLABLE KIYEOK-YAE-RIEUL
+B0C5 AC70 # HANGUL SYLLABLE KIYEOK-EO
+B0C6 AC71 # HANGUL SYLLABLE KIYEOK-EO-KIYEOK
+B0C7 AC74 # HANGUL SYLLABLE KIYEOK-EO-NIEUN
+B0C8 AC77 # HANGUL SYLLABLE KIYEOK-EO-TIKEUT
+B0C9 AC78 # HANGUL SYLLABLE KIYEOK-EO-RIEUL
+B0CA AC7A # HANGUL SYLLABLE KIYEOK-EO-RIEULMIEUM
+B0CB AC80 # HANGUL SYLLABLE KIYEOK-EO-MIEUM
+B0CC AC81 # HANGUL SYLLABLE KIYEOK-EO-PIEUP
+B0CD AC83 # HANGUL SYLLABLE KIYEOK-EO-SIOS
+B0CE AC84 # HANGUL SYLLABLE KIYEOK-EO-SSANGSIOS
+B0CF AC85 # HANGUL SYLLABLE KIYEOK-EO-IEUNG
+B0D0 AC86 # HANGUL SYLLABLE KIYEOK-EO-CIEUC
+B0D1 AC89 # HANGUL SYLLABLE KIYEOK-EO-THIEUTH
+B0D2 AC8A # HANGUL SYLLABLE KIYEOK-EO-PHIEUPH
+B0D3 AC8B # HANGUL SYLLABLE KIYEOK-EO-HIEUH
+B0D4 AC8C # HANGUL SYLLABLE KIYEOK-E
+B0D5 AC90 # HANGUL SYLLABLE KIYEOK-E-NIEUN
+B0D6 AC94 # HANGUL SYLLABLE KIYEOK-E-RIEUL
+B0D7 AC9C # HANGUL SYLLABLE KIYEOK-E-MIEUM
+B0D8 AC9D # HANGUL SYLLABLE KIYEOK-E-PIEUP
+B0D9 AC9F # HANGUL SYLLABLE KIYEOK-E-SIOS
+B0DA ACA0 # HANGUL SYLLABLE KIYEOK-E-SSANGSIOS
+B0DB ACA1 # HANGUL SYLLABLE KIYEOK-E-IEUNG
+B0DC ACA8 # HANGUL SYLLABLE KIYEOK-YEO
+B0DD ACA9 # HANGUL SYLLABLE KIYEOK-YEO-KIYEOK
+B0DE ACAA # HANGUL SYLLABLE KIYEOK-YEO-SSANGKIYEOK
+B0DF ACAC # HANGUL SYLLABLE KIYEOK-YEO-NIEUN
+B0E0 ACAF # HANGUL SYLLABLE KIYEOK-YEO-TIKEUT
+B0E1 ACB0 # HANGUL SYLLABLE KIYEOK-YEO-RIEUL
+B0E2 ACB8 # HANGUL SYLLABLE KIYEOK-YEO-MIEUM
+B0E3 ACB9 # HANGUL SYLLABLE KIYEOK-YEO-PIEUP
+B0E4 ACBB # HANGUL SYLLABLE KIYEOK-YEO-SIOS
+B0E5 ACBC # HANGUL SYLLABLE KIYEOK-YEO-SSANGSIOS
+B0E6 ACBD # HANGUL SYLLABLE KIYEOK-YEO-IEUNG
+B0E7 ACC1 # HANGUL SYLLABLE KIYEOK-YEO-THIEUTH
+B0E8 ACC4 # HANGUL SYLLABLE KIYEOK-YE
+B0E9 ACC8 # HANGUL SYLLABLE KIYEOK-YE-NIEUN
+B0EA ACCC # HANGUL SYLLABLE KIYEOK-YE-RIEUL
+B0EB ACD5 # HANGUL SYLLABLE KIYEOK-YE-PIEUP
+B0EC ACD7 # HANGUL SYLLABLE KIYEOK-YE-SIOS
+B0ED ACE0 # HANGUL SYLLABLE KIYEOK-O
+B0EE ACE1 # HANGUL SYLLABLE KIYEOK-O-KIYEOK
+B0EF ACE4 # HANGUL SYLLABLE KIYEOK-O-NIEUN
+B0F0 ACE7 # HANGUL SYLLABLE KIYEOK-O-TIKEUT
+B0F1 ACE8 # HANGUL SYLLABLE KIYEOK-O-RIEUL
+B0F2 ACEA # HANGUL SYLLABLE KIYEOK-O-RIEULMIEUM
+B0F3 ACEC # HANGUL SYLLABLE KIYEOK-O-RIEULSIOS
+B0F4 ACEF # HANGUL SYLLABLE KIYEOK-O-RIEULHIEUH
+B0F5 ACF0 # HANGUL SYLLABLE KIYEOK-O-MIEUM
+B0F6 ACF1 # HANGUL SYLLABLE KIYEOK-O-PIEUP
+B0F7 ACF3 # HANGUL SYLLABLE KIYEOK-O-SIOS
+B0F8 ACF5 # HANGUL SYLLABLE KIYEOK-O-IEUNG
+B0F9 ACF6 # HANGUL SYLLABLE KIYEOK-O-CIEUC
+B0FA ACFC # HANGUL SYLLABLE KIYEOK-WA
+B0FB ACFD # HANGUL SYLLABLE KIYEOK-WA-KIYEOK
+B0FC AD00 # HANGUL SYLLABLE KIYEOK-WA-NIEUN
+B0FD AD04 # HANGUL SYLLABLE KIYEOK-WA-RIEUL
+B0FE AD06 # HANGUL SYLLABLE KIYEOK-WA-RIEULMIEUM
+B141 CF02 # HANGUL SYLLABLE KHIEUKH-E-SSANGKIYEOK
+B142 CF03 # HANGUL SYLLABLE KHIEUKH-E-KIYEOKSIOS
+B143 CF05 # HANGUL SYLLABLE KHIEUKH-E-NIEUNCIEUC
+B144 CF06 # HANGUL SYLLABLE KHIEUKH-E-NIEUNHIEUH
+B145 CF07 # HANGUL SYLLABLE KHIEUKH-E-TIKEUT
+B146 CF09 # HANGUL SYLLABLE KHIEUKH-E-RIEULKIYEOK
+B147 CF0A # HANGUL SYLLABLE KHIEUKH-E-RIEULMIEUM
+B148 CF0B # HANGUL SYLLABLE KHIEUKH-E-RIEULPIEUP
+B149 CF0C # HANGUL SYLLABLE KHIEUKH-E-RIEULSIOS
+B14A CF0D # HANGUL SYLLABLE KHIEUKH-E-RIEULTHIEUTH
+B14B CF0E # HANGUL SYLLABLE KHIEUKH-E-RIEULPHIEUPH
+B14C CF0F # HANGUL SYLLABLE KHIEUKH-E-RIEULHIEUH
+B14D CF12 # HANGUL SYLLABLE KHIEUKH-E-PIEUPSIOS
+B14E CF14 # HANGUL SYLLABLE KHIEUKH-E-SSANGSIOS
+B14F CF16 # HANGUL SYLLABLE KHIEUKH-E-CIEUC
+B150 CF17 # HANGUL SYLLABLE KHIEUKH-E-CHIEUCH
+B151 CF18 # HANGUL SYLLABLE KHIEUKH-E-KHIEUKH
+B152 CF19 # HANGUL SYLLABLE KHIEUKH-E-THIEUTH
+B153 CF1A # HANGUL SYLLABLE KHIEUKH-E-PHIEUPH
+B154 CF1B # HANGUL SYLLABLE KHIEUKH-E-HIEUH
+B155 CF1D # HANGUL SYLLABLE KHIEUKH-YEO-KIYEOK
+B156 CF1E # HANGUL SYLLABLE KHIEUKH-YEO-SSANGKIYEOK
+B157 CF1F # HANGUL SYLLABLE KHIEUKH-YEO-KIYEOKSIOS
+B158 CF21 # HANGUL SYLLABLE KHIEUKH-YEO-NIEUNCIEUC
+B159 CF22 # HANGUL SYLLABLE KHIEUKH-YEO-NIEUNHIEUH
+B15A CF23 # HANGUL SYLLABLE KHIEUKH-YEO-TIKEUT
+B161 CF25 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULKIYEOK
+B162 CF26 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULMIEUM
+B163 CF27 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULPIEUP
+B164 CF28 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULSIOS
+B165 CF29 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULTHIEUTH
+B166 CF2A # HANGUL SYLLABLE KHIEUKH-YEO-RIEULPHIEUPH
+B167 CF2B # HANGUL SYLLABLE KHIEUKH-YEO-RIEULHIEUH
+B168 CF2E # HANGUL SYLLABLE KHIEUKH-YEO-PIEUPSIOS
+B169 CF32 # HANGUL SYLLABLE KHIEUKH-YEO-CIEUC
+B16A CF33 # HANGUL SYLLABLE KHIEUKH-YEO-CHIEUCH
+B16B CF34 # HANGUL SYLLABLE KHIEUKH-YEO-KHIEUKH
+B16C CF35 # HANGUL SYLLABLE KHIEUKH-YEO-THIEUTH
+B16D CF36 # HANGUL SYLLABLE KHIEUKH-YEO-PHIEUPH
+B16E CF37 # HANGUL SYLLABLE KHIEUKH-YEO-HIEUH
+B16F CF39 # HANGUL SYLLABLE KHIEUKH-YE-KIYEOK
+B170 CF3A # HANGUL SYLLABLE KHIEUKH-YE-SSANGKIYEOK
+B171 CF3B # HANGUL SYLLABLE KHIEUKH-YE-KIYEOKSIOS
+B172 CF3C # HANGUL SYLLABLE KHIEUKH-YE-NIEUN
+B173 CF3D # HANGUL SYLLABLE KHIEUKH-YE-NIEUNCIEUC
+B174 CF3E # HANGUL SYLLABLE KHIEUKH-YE-NIEUNHIEUH
+B175 CF3F # HANGUL SYLLABLE KHIEUKH-YE-TIKEUT
+B176 CF40 # HANGUL SYLLABLE KHIEUKH-YE-RIEUL
+B177 CF41 # HANGUL SYLLABLE KHIEUKH-YE-RIEULKIYEOK
+B178 CF42 # HANGUL SYLLABLE KHIEUKH-YE-RIEULMIEUM
+B179 CF43 # HANGUL SYLLABLE KHIEUKH-YE-RIEULPIEUP
+B17A CF44 # HANGUL SYLLABLE KHIEUKH-YE-RIEULSIOS
+B181 CF45 # HANGUL SYLLABLE KHIEUKH-YE-RIEULTHIEUTH
+B182 CF46 # HANGUL SYLLABLE KHIEUKH-YE-RIEULPHIEUPH
+B183 CF47 # HANGUL SYLLABLE KHIEUKH-YE-RIEULHIEUH
+B184 CF48 # HANGUL SYLLABLE KHIEUKH-YE-MIEUM
+B185 CF49 # HANGUL SYLLABLE KHIEUKH-YE-PIEUP
+B186 CF4A # HANGUL SYLLABLE KHIEUKH-YE-PIEUPSIOS
+B187 CF4B # HANGUL SYLLABLE KHIEUKH-YE-SIOS
+B188 CF4C # HANGUL SYLLABLE KHIEUKH-YE-SSANGSIOS
+B189 CF4D # HANGUL SYLLABLE KHIEUKH-YE-IEUNG
+B18A CF4E # HANGUL SYLLABLE KHIEUKH-YE-CIEUC
+B18B CF4F # HANGUL SYLLABLE KHIEUKH-YE-CHIEUCH
+B18C CF50 # HANGUL SYLLABLE KHIEUKH-YE-KHIEUKH
+B18D CF51 # HANGUL SYLLABLE KHIEUKH-YE-THIEUTH
+B18E CF52 # HANGUL SYLLABLE KHIEUKH-YE-PHIEUPH
+B18F CF53 # HANGUL SYLLABLE KHIEUKH-YE-HIEUH
+B190 CF56 # HANGUL SYLLABLE KHIEUKH-O-SSANGKIYEOK
+B191 CF57 # HANGUL SYLLABLE KHIEUKH-O-KIYEOKSIOS
+B192 CF59 # HANGUL SYLLABLE KHIEUKH-O-NIEUNCIEUC
+B193 CF5A # HANGUL SYLLABLE KHIEUKH-O-NIEUNHIEUH
+B194 CF5B # HANGUL SYLLABLE KHIEUKH-O-TIKEUT
+B195 CF5D # HANGUL SYLLABLE KHIEUKH-O-RIEULKIYEOK
+B196 CF5E # HANGUL SYLLABLE KHIEUKH-O-RIEULMIEUM
+B197 CF5F # HANGUL SYLLABLE KHIEUKH-O-RIEULPIEUP
+B198 CF60 # HANGUL SYLLABLE KHIEUKH-O-RIEULSIOS
+B199 CF61 # HANGUL SYLLABLE KHIEUKH-O-RIEULTHIEUTH
+B19A CF62 # HANGUL SYLLABLE KHIEUKH-O-RIEULPHIEUPH
+B19B CF63 # HANGUL SYLLABLE KHIEUKH-O-RIEULHIEUH
+B19C CF66 # HANGUL SYLLABLE KHIEUKH-O-PIEUPSIOS
+B19D CF68 # HANGUL SYLLABLE KHIEUKH-O-SSANGSIOS
+B19E CF6A # HANGUL SYLLABLE KHIEUKH-O-CIEUC
+B19F CF6B # HANGUL SYLLABLE KHIEUKH-O-CHIEUCH
+B1A0 CF6C # HANGUL SYLLABLE KHIEUKH-O-KHIEUKH
+B1A1 AD0C # HANGUL SYLLABLE KIYEOK-WA-MIEUM
+B1A2 AD0D # HANGUL SYLLABLE KIYEOK-WA-PIEUP
+B1A3 AD0F # HANGUL SYLLABLE KIYEOK-WA-SIOS
+B1A4 AD11 # HANGUL SYLLABLE KIYEOK-WA-IEUNG
+B1A5 AD18 # HANGUL SYLLABLE KIYEOK-WAE
+B1A6 AD1C # HANGUL SYLLABLE KIYEOK-WAE-NIEUN
+B1A7 AD20 # HANGUL SYLLABLE KIYEOK-WAE-RIEUL
+B1A8 AD29 # HANGUL SYLLABLE KIYEOK-WAE-PIEUP
+B1A9 AD2C # HANGUL SYLLABLE KIYEOK-WAE-SSANGSIOS
+B1AA AD2D # HANGUL SYLLABLE KIYEOK-WAE-IEUNG
+B1AB AD34 # HANGUL SYLLABLE KIYEOK-OE
+B1AC AD35 # HANGUL SYLLABLE KIYEOK-OE-KIYEOK
+B1AD AD38 # HANGUL SYLLABLE KIYEOK-OE-NIEUN
+B1AE AD3C # HANGUL SYLLABLE KIYEOK-OE-RIEUL
+B1AF AD44 # HANGUL SYLLABLE KIYEOK-OE-MIEUM
+B1B0 AD45 # HANGUL SYLLABLE KIYEOK-OE-PIEUP
+B1B1 AD47 # HANGUL SYLLABLE KIYEOK-OE-SIOS
+B1B2 AD49 # HANGUL SYLLABLE KIYEOK-OE-IEUNG
+B1B3 AD50 # HANGUL SYLLABLE KIYEOK-YO
+B1B4 AD54 # HANGUL SYLLABLE KIYEOK-YO-NIEUN
+B1B5 AD58 # HANGUL SYLLABLE KIYEOK-YO-RIEUL
+B1B6 AD61 # HANGUL SYLLABLE KIYEOK-YO-PIEUP
+B1B7 AD63 # HANGUL SYLLABLE KIYEOK-YO-SIOS
+B1B8 AD6C # HANGUL SYLLABLE KIYEOK-U
+B1B9 AD6D # HANGUL SYLLABLE KIYEOK-U-KIYEOK
+B1BA AD70 # HANGUL SYLLABLE KIYEOK-U-NIEUN
+B1BB AD73 # HANGUL SYLLABLE KIYEOK-U-TIKEUT
+B1BC AD74 # HANGUL SYLLABLE KIYEOK-U-RIEUL
+B1BD AD75 # HANGUL SYLLABLE KIYEOK-U-RIEULKIYEOK
+B1BE AD76 # HANGUL SYLLABLE KIYEOK-U-RIEULMIEUM
+B1BF AD7B # HANGUL SYLLABLE KIYEOK-U-RIEULHIEUH
+B1C0 AD7C # HANGUL SYLLABLE KIYEOK-U-MIEUM
+B1C1 AD7D # HANGUL SYLLABLE KIYEOK-U-PIEUP
+B1C2 AD7F # HANGUL SYLLABLE KIYEOK-U-SIOS
+B1C3 AD81 # HANGUL SYLLABLE KIYEOK-U-IEUNG
+B1C4 AD82 # HANGUL SYLLABLE KIYEOK-U-CIEUC
+B1C5 AD88 # HANGUL SYLLABLE KIYEOK-WEO
+B1C6 AD89 # HANGUL SYLLABLE KIYEOK-WEO-KIYEOK
+B1C7 AD8C # HANGUL SYLLABLE KIYEOK-WEO-NIEUN
+B1C8 AD90 # HANGUL SYLLABLE KIYEOK-WEO-RIEUL
+B1C9 AD9C # HANGUL SYLLABLE KIYEOK-WEO-SSANGSIOS
+B1CA AD9D # HANGUL SYLLABLE KIYEOK-WEO-IEUNG
+B1CB ADA4 # HANGUL SYLLABLE KIYEOK-WE
+B1CC ADB7 # HANGUL SYLLABLE KIYEOK-WE-SIOS
+B1CD ADC0 # HANGUL SYLLABLE KIYEOK-WI
+B1CE ADC1 # HANGUL SYLLABLE KIYEOK-WI-KIYEOK
+B1CF ADC4 # HANGUL SYLLABLE KIYEOK-WI-NIEUN
+B1D0 ADC8 # HANGUL SYLLABLE KIYEOK-WI-RIEUL
+B1D1 ADD0 # HANGUL SYLLABLE KIYEOK-WI-MIEUM
+B1D2 ADD1 # HANGUL SYLLABLE KIYEOK-WI-PIEUP
+B1D3 ADD3 # HANGUL SYLLABLE KIYEOK-WI-SIOS
+B1D4 ADDC # HANGUL SYLLABLE KIYEOK-YU
+B1D5 ADE0 # HANGUL SYLLABLE KIYEOK-YU-NIEUN
+B1D6 ADE4 # HANGUL SYLLABLE KIYEOK-YU-RIEUL
+B1D7 ADF8 # HANGUL SYLLABLE KIYEOK-EU
+B1D8 ADF9 # HANGUL SYLLABLE KIYEOK-EU-KIYEOK
+B1D9 ADFC # HANGUL SYLLABLE KIYEOK-EU-NIEUN
+B1DA ADFF # HANGUL SYLLABLE KIYEOK-EU-TIKEUT
+B1DB AE00 # HANGUL SYLLABLE KIYEOK-EU-RIEUL
+B1DC AE01 # HANGUL SYLLABLE KIYEOK-EU-RIEULKIYEOK
+B1DD AE08 # HANGUL SYLLABLE KIYEOK-EU-MIEUM
+B1DE AE09 # HANGUL SYLLABLE KIYEOK-EU-PIEUP
+B1DF AE0B # HANGUL SYLLABLE KIYEOK-EU-SIOS
+B1E0 AE0D # HANGUL SYLLABLE KIYEOK-EU-IEUNG
+B1E1 AE14 # HANGUL SYLLABLE KIYEOK-YI
+B1E2 AE30 # HANGUL SYLLABLE KIYEOK-I
+B1E3 AE31 # HANGUL SYLLABLE KIYEOK-I-KIYEOK
+B1E4 AE34 # HANGUL SYLLABLE KIYEOK-I-NIEUN
+B1E5 AE37 # HANGUL SYLLABLE KIYEOK-I-TIKEUT
+B1E6 AE38 # HANGUL SYLLABLE KIYEOK-I-RIEUL
+B1E7 AE3A # HANGUL SYLLABLE KIYEOK-I-RIEULMIEUM
+B1E8 AE40 # HANGUL SYLLABLE KIYEOK-I-MIEUM
+B1E9 AE41 # HANGUL SYLLABLE KIYEOK-I-PIEUP
+B1EA AE43 # HANGUL SYLLABLE KIYEOK-I-SIOS
+B1EB AE45 # HANGUL SYLLABLE KIYEOK-I-IEUNG
+B1EC AE46 # HANGUL SYLLABLE KIYEOK-I-CIEUC
+B1ED AE4A # HANGUL SYLLABLE KIYEOK-I-PHIEUPH
+B1EE AE4C # HANGUL SYLLABLE SSANGKIYEOK-A
+B1EF AE4D # HANGUL SYLLABLE SSANGKIYEOK-A-KIYEOK
+B1F0 AE4E # HANGUL SYLLABLE SSANGKIYEOK-A-SSANGKIYEOK
+B1F1 AE50 # HANGUL SYLLABLE SSANGKIYEOK-A-NIEUN
+B1F2 AE54 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEUL
+B1F3 AE56 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULMIEUM
+B1F4 AE5C # HANGUL SYLLABLE SSANGKIYEOK-A-MIEUM
+B1F5 AE5D # HANGUL SYLLABLE SSANGKIYEOK-A-PIEUP
+B1F6 AE5F # HANGUL SYLLABLE SSANGKIYEOK-A-SIOS
+B1F7 AE60 # HANGUL SYLLABLE SSANGKIYEOK-A-SSANGSIOS
+B1F8 AE61 # HANGUL SYLLABLE SSANGKIYEOK-A-IEUNG
+B1F9 AE65 # HANGUL SYLLABLE SSANGKIYEOK-A-THIEUTH
+B1FA AE68 # HANGUL SYLLABLE SSANGKIYEOK-AE
+B1FB AE69 # HANGUL SYLLABLE SSANGKIYEOK-AE-KIYEOK
+B1FC AE6C # HANGUL SYLLABLE SSANGKIYEOK-AE-NIEUN
+B1FD AE70 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEUL
+B1FE AE78 # HANGUL SYLLABLE SSANGKIYEOK-AE-MIEUM
+B241 CF6D # HANGUL SYLLABLE KHIEUKH-O-THIEUTH
+B242 CF6E # HANGUL SYLLABLE KHIEUKH-O-PHIEUPH
+B243 CF6F # HANGUL SYLLABLE KHIEUKH-O-HIEUH
+B244 CF72 # HANGUL SYLLABLE KHIEUKH-WA-SSANGKIYEOK
+B245 CF73 # HANGUL SYLLABLE KHIEUKH-WA-KIYEOKSIOS
+B246 CF75 # HANGUL SYLLABLE KHIEUKH-WA-NIEUNCIEUC
+B247 CF76 # HANGUL SYLLABLE KHIEUKH-WA-NIEUNHIEUH
+B248 CF77 # HANGUL SYLLABLE KHIEUKH-WA-TIKEUT
+B249 CF79 # HANGUL SYLLABLE KHIEUKH-WA-RIEULKIYEOK
+B24A CF7A # HANGUL SYLLABLE KHIEUKH-WA-RIEULMIEUM
+B24B CF7B # HANGUL SYLLABLE KHIEUKH-WA-RIEULPIEUP
+B24C CF7C # HANGUL SYLLABLE KHIEUKH-WA-RIEULSIOS
+B24D CF7D # HANGUL SYLLABLE KHIEUKH-WA-RIEULTHIEUTH
+B24E CF7E # HANGUL SYLLABLE KHIEUKH-WA-RIEULPHIEUPH
+B24F CF7F # HANGUL SYLLABLE KHIEUKH-WA-RIEULHIEUH
+B250 CF81 # HANGUL SYLLABLE KHIEUKH-WA-PIEUP
+B251 CF82 # HANGUL SYLLABLE KHIEUKH-WA-PIEUPSIOS
+B252 CF83 # HANGUL SYLLABLE KHIEUKH-WA-SIOS
+B253 CF84 # HANGUL SYLLABLE KHIEUKH-WA-SSANGSIOS
+B254 CF86 # HANGUL SYLLABLE KHIEUKH-WA-CIEUC
+B255 CF87 # HANGUL SYLLABLE KHIEUKH-WA-CHIEUCH
+B256 CF88 # HANGUL SYLLABLE KHIEUKH-WA-KHIEUKH
+B257 CF89 # HANGUL SYLLABLE KHIEUKH-WA-THIEUTH
+B258 CF8A # HANGUL SYLLABLE KHIEUKH-WA-PHIEUPH
+B259 CF8B # HANGUL SYLLABLE KHIEUKH-WA-HIEUH
+B25A CF8D # HANGUL SYLLABLE KHIEUKH-WAE-KIYEOK
+B261 CF8E # HANGUL SYLLABLE KHIEUKH-WAE-SSANGKIYEOK
+B262 CF8F # HANGUL SYLLABLE KHIEUKH-WAE-KIYEOKSIOS
+B263 CF90 # HANGUL SYLLABLE KHIEUKH-WAE-NIEUN
+B264 CF91 # HANGUL SYLLABLE KHIEUKH-WAE-NIEUNCIEUC
+B265 CF92 # HANGUL SYLLABLE KHIEUKH-WAE-NIEUNHIEUH
+B266 CF93 # HANGUL SYLLABLE KHIEUKH-WAE-TIKEUT
+B267 CF94 # HANGUL SYLLABLE KHIEUKH-WAE-RIEUL
+B268 CF95 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULKIYEOK
+B269 CF96 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULMIEUM
+B26A CF97 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULPIEUP
+B26B CF98 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULSIOS
+B26C CF99 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULTHIEUTH
+B26D CF9A # HANGUL SYLLABLE KHIEUKH-WAE-RIEULPHIEUPH
+B26E CF9B # HANGUL SYLLABLE KHIEUKH-WAE-RIEULHIEUH
+B26F CF9C # HANGUL SYLLABLE KHIEUKH-WAE-MIEUM
+B270 CF9D # HANGUL SYLLABLE KHIEUKH-WAE-PIEUP
+B271 CF9E # HANGUL SYLLABLE KHIEUKH-WAE-PIEUPSIOS
+B272 CF9F # HANGUL SYLLABLE KHIEUKH-WAE-SIOS
+B273 CFA0 # HANGUL SYLLABLE KHIEUKH-WAE-SSANGSIOS
+B274 CFA2 # HANGUL SYLLABLE KHIEUKH-WAE-CIEUC
+B275 CFA3 # HANGUL SYLLABLE KHIEUKH-WAE-CHIEUCH
+B276 CFA4 # HANGUL SYLLABLE KHIEUKH-WAE-KHIEUKH
+B277 CFA5 # HANGUL SYLLABLE KHIEUKH-WAE-THIEUTH
+B278 CFA6 # HANGUL SYLLABLE KHIEUKH-WAE-PHIEUPH
+B279 CFA7 # HANGUL SYLLABLE KHIEUKH-WAE-HIEUH
+B27A CFA9 # HANGUL SYLLABLE KHIEUKH-OE-KIYEOK
+B281 CFAA # HANGUL SYLLABLE KHIEUKH-OE-SSANGKIYEOK
+B282 CFAB # HANGUL SYLLABLE KHIEUKH-OE-KIYEOKSIOS
+B283 CFAC # HANGUL SYLLABLE KHIEUKH-OE-NIEUN
+B284 CFAD # HANGUL SYLLABLE KHIEUKH-OE-NIEUNCIEUC
+B285 CFAE # HANGUL SYLLABLE KHIEUKH-OE-NIEUNHIEUH
+B286 CFAF # HANGUL SYLLABLE KHIEUKH-OE-TIKEUT
+B287 CFB1 # HANGUL SYLLABLE KHIEUKH-OE-RIEULKIYEOK
+B288 CFB2 # HANGUL SYLLABLE KHIEUKH-OE-RIEULMIEUM
+B289 CFB3 # HANGUL SYLLABLE KHIEUKH-OE-RIEULPIEUP
+B28A CFB4 # HANGUL SYLLABLE KHIEUKH-OE-RIEULSIOS
+B28B CFB5 # HANGUL SYLLABLE KHIEUKH-OE-RIEULTHIEUTH
+B28C CFB6 # HANGUL SYLLABLE KHIEUKH-OE-RIEULPHIEUPH
+B28D CFB7 # HANGUL SYLLABLE KHIEUKH-OE-RIEULHIEUH
+B28E CFB8 # HANGUL SYLLABLE KHIEUKH-OE-MIEUM
+B28F CFB9 # HANGUL SYLLABLE KHIEUKH-OE-PIEUP
+B290 CFBA # HANGUL SYLLABLE KHIEUKH-OE-PIEUPSIOS
+B291 CFBB # HANGUL SYLLABLE KHIEUKH-OE-SIOS
+B292 CFBC # HANGUL SYLLABLE KHIEUKH-OE-SSANGSIOS
+B293 CFBD # HANGUL SYLLABLE KHIEUKH-OE-IEUNG
+B294 CFBE # HANGUL SYLLABLE KHIEUKH-OE-CIEUC
+B295 CFBF # HANGUL SYLLABLE KHIEUKH-OE-CHIEUCH
+B296 CFC0 # HANGUL SYLLABLE KHIEUKH-OE-KHIEUKH
+B297 CFC1 # HANGUL SYLLABLE KHIEUKH-OE-THIEUTH
+B298 CFC2 # HANGUL SYLLABLE KHIEUKH-OE-PHIEUPH
+B299 CFC3 # HANGUL SYLLABLE KHIEUKH-OE-HIEUH
+B29A CFC5 # HANGUL SYLLABLE KHIEUKH-YO-KIYEOK
+B29B CFC6 # HANGUL SYLLABLE KHIEUKH-YO-SSANGKIYEOK
+B29C CFC7 # HANGUL SYLLABLE KHIEUKH-YO-KIYEOKSIOS
+B29D CFC8 # HANGUL SYLLABLE KHIEUKH-YO-NIEUN
+B29E CFC9 # HANGUL SYLLABLE KHIEUKH-YO-NIEUNCIEUC
+B29F CFCA # HANGUL SYLLABLE KHIEUKH-YO-NIEUNHIEUH
+B2A0 CFCB # HANGUL SYLLABLE KHIEUKH-YO-TIKEUT
+B2A1 AE79 # HANGUL SYLLABLE SSANGKIYEOK-AE-PIEUP
+B2A2 AE7B # HANGUL SYLLABLE SSANGKIYEOK-AE-SIOS
+B2A3 AE7C # HANGUL SYLLABLE SSANGKIYEOK-AE-SSANGSIOS
+B2A4 AE7D # HANGUL SYLLABLE SSANGKIYEOK-AE-IEUNG
+B2A5 AE84 # HANGUL SYLLABLE SSANGKIYEOK-YA
+B2A6 AE85 # HANGUL SYLLABLE SSANGKIYEOK-YA-KIYEOK
+B2A7 AE8C # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEUL
+B2A8 AEBC # HANGUL SYLLABLE SSANGKIYEOK-EO
+B2A9 AEBD # HANGUL SYLLABLE SSANGKIYEOK-EO-KIYEOK
+B2AA AEBE # HANGUL SYLLABLE SSANGKIYEOK-EO-SSANGKIYEOK
+B2AB AEC0 # HANGUL SYLLABLE SSANGKIYEOK-EO-NIEUN
+B2AC AEC4 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEUL
+B2AD AECC # HANGUL SYLLABLE SSANGKIYEOK-EO-MIEUM
+B2AE AECD # HANGUL SYLLABLE SSANGKIYEOK-EO-PIEUP
+B2AF AECF # HANGUL SYLLABLE SSANGKIYEOK-EO-SIOS
+B2B0 AED0 # HANGUL SYLLABLE SSANGKIYEOK-EO-SSANGSIOS
+B2B1 AED1 # HANGUL SYLLABLE SSANGKIYEOK-EO-IEUNG
+B2B2 AED8 # HANGUL SYLLABLE SSANGKIYEOK-E
+B2B3 AED9 # HANGUL SYLLABLE SSANGKIYEOK-E-KIYEOK
+B2B4 AEDC # HANGUL SYLLABLE SSANGKIYEOK-E-NIEUN
+B2B5 AEE8 # HANGUL SYLLABLE SSANGKIYEOK-E-MIEUM
+B2B6 AEEB # HANGUL SYLLABLE SSANGKIYEOK-E-SIOS
+B2B7 AEED # HANGUL SYLLABLE SSANGKIYEOK-E-IEUNG
+B2B8 AEF4 # HANGUL SYLLABLE SSANGKIYEOK-YEO
+B2B9 AEF8 # HANGUL SYLLABLE SSANGKIYEOK-YEO-NIEUN
+B2BA AEFC # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEUL
+B2BB AF07 # HANGUL SYLLABLE SSANGKIYEOK-YEO-SIOS
+B2BC AF08 # HANGUL SYLLABLE SSANGKIYEOK-YEO-SSANGSIOS
+B2BD AF0D # HANGUL SYLLABLE SSANGKIYEOK-YEO-THIEUTH
+B2BE AF10 # HANGUL SYLLABLE SSANGKIYEOK-YE
+B2BF AF2C # HANGUL SYLLABLE SSANGKIYEOK-O
+B2C0 AF2D # HANGUL SYLLABLE SSANGKIYEOK-O-KIYEOK
+B2C1 AF30 # HANGUL SYLLABLE SSANGKIYEOK-O-NIEUN
+B2C2 AF32 # HANGUL SYLLABLE SSANGKIYEOK-O-NIEUNHIEUH
+B2C3 AF34 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEUL
+B2C4 AF3C # HANGUL SYLLABLE SSANGKIYEOK-O-MIEUM
+B2C5 AF3D # HANGUL SYLLABLE SSANGKIYEOK-O-PIEUP
+B2C6 AF3F # HANGUL SYLLABLE SSANGKIYEOK-O-SIOS
+B2C7 AF41 # HANGUL SYLLABLE SSANGKIYEOK-O-IEUNG
+B2C8 AF42 # HANGUL SYLLABLE SSANGKIYEOK-O-CIEUC
+B2C9 AF43 # HANGUL SYLLABLE SSANGKIYEOK-O-CHIEUCH
+B2CA AF48 # HANGUL SYLLABLE SSANGKIYEOK-WA
+B2CB AF49 # HANGUL SYLLABLE SSANGKIYEOK-WA-KIYEOK
+B2CC AF50 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEUL
+B2CD AF5C # HANGUL SYLLABLE SSANGKIYEOK-WA-SSANGSIOS
+B2CE AF5D # HANGUL SYLLABLE SSANGKIYEOK-WA-IEUNG
+B2CF AF64 # HANGUL SYLLABLE SSANGKIYEOK-WAE
+B2D0 AF65 # HANGUL SYLLABLE SSANGKIYEOK-WAE-KIYEOK
+B2D1 AF79 # HANGUL SYLLABLE SSANGKIYEOK-WAE-IEUNG
+B2D2 AF80 # HANGUL SYLLABLE SSANGKIYEOK-OE
+B2D3 AF84 # HANGUL SYLLABLE SSANGKIYEOK-OE-NIEUN
+B2D4 AF88 # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEUL
+B2D5 AF90 # HANGUL SYLLABLE SSANGKIYEOK-OE-MIEUM
+B2D6 AF91 # HANGUL SYLLABLE SSANGKIYEOK-OE-PIEUP
+B2D7 AF95 # HANGUL SYLLABLE SSANGKIYEOK-OE-IEUNG
+B2D8 AF9C # HANGUL SYLLABLE SSANGKIYEOK-YO
+B2D9 AFB8 # HANGUL SYLLABLE SSANGKIYEOK-U
+B2DA AFB9 # HANGUL SYLLABLE SSANGKIYEOK-U-KIYEOK
+B2DB AFBC # HANGUL SYLLABLE SSANGKIYEOK-U-NIEUN
+B2DC AFC0 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEUL
+B2DD AFC7 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULHIEUH
+B2DE AFC8 # HANGUL SYLLABLE SSANGKIYEOK-U-MIEUM
+B2DF AFC9 # HANGUL SYLLABLE SSANGKIYEOK-U-PIEUP
+B2E0 AFCB # HANGUL SYLLABLE SSANGKIYEOK-U-SIOS
+B2E1 AFCD # HANGUL SYLLABLE SSANGKIYEOK-U-IEUNG
+B2E2 AFCE # HANGUL SYLLABLE SSANGKIYEOK-U-CIEUC
+B2E3 AFD4 # HANGUL SYLLABLE SSANGKIYEOK-WEO
+B2E4 AFDC # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEUL
+B2E5 AFE8 # HANGUL SYLLABLE SSANGKIYEOK-WEO-SSANGSIOS
+B2E6 AFE9 # HANGUL SYLLABLE SSANGKIYEOK-WEO-IEUNG
+B2E7 AFF0 # HANGUL SYLLABLE SSANGKIYEOK-WE
+B2E8 AFF1 # HANGUL SYLLABLE SSANGKIYEOK-WE-KIYEOK
+B2E9 AFF4 # HANGUL SYLLABLE SSANGKIYEOK-WE-NIEUN
+B2EA AFF8 # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEUL
+B2EB B000 # HANGUL SYLLABLE SSANGKIYEOK-WE-MIEUM
+B2EC B001 # HANGUL SYLLABLE SSANGKIYEOK-WE-PIEUP
+B2ED B004 # HANGUL SYLLABLE SSANGKIYEOK-WE-SSANGSIOS
+B2EE B00C # HANGUL SYLLABLE SSANGKIYEOK-WI
+B2EF B010 # HANGUL SYLLABLE SSANGKIYEOK-WI-NIEUN
+B2F0 B014 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEUL
+B2F1 B01C # HANGUL SYLLABLE SSANGKIYEOK-WI-MIEUM
+B2F2 B01D # HANGUL SYLLABLE SSANGKIYEOK-WI-PIEUP
+B2F3 B028 # HANGUL SYLLABLE SSANGKIYEOK-YU
+B2F4 B044 # HANGUL SYLLABLE SSANGKIYEOK-EU
+B2F5 B045 # HANGUL SYLLABLE SSANGKIYEOK-EU-KIYEOK
+B2F6 B048 # HANGUL SYLLABLE SSANGKIYEOK-EU-NIEUN
+B2F7 B04A # HANGUL SYLLABLE SSANGKIYEOK-EU-NIEUNHIEUH
+B2F8 B04C # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEUL
+B2F9 B04E # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULMIEUM
+B2FA B053 # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULHIEUH
+B2FB B054 # HANGUL SYLLABLE SSANGKIYEOK-EU-MIEUM
+B2FC B055 # HANGUL SYLLABLE SSANGKIYEOK-EU-PIEUP
+B2FD B057 # HANGUL SYLLABLE SSANGKIYEOK-EU-SIOS
+B2FE B059 # HANGUL SYLLABLE SSANGKIYEOK-EU-IEUNG
+B341 CFCC # HANGUL SYLLABLE KHIEUKH-YO-RIEUL
+B342 CFCD # HANGUL SYLLABLE KHIEUKH-YO-RIEULKIYEOK
+B343 CFCE # HANGUL SYLLABLE KHIEUKH-YO-RIEULMIEUM
+B344 CFCF # HANGUL SYLLABLE KHIEUKH-YO-RIEULPIEUP
+B345 CFD0 # HANGUL SYLLABLE KHIEUKH-YO-RIEULSIOS
+B346 CFD1 # HANGUL SYLLABLE KHIEUKH-YO-RIEULTHIEUTH
+B347 CFD2 # HANGUL SYLLABLE KHIEUKH-YO-RIEULPHIEUPH
+B348 CFD3 # HANGUL SYLLABLE KHIEUKH-YO-RIEULHIEUH
+B349 CFD4 # HANGUL SYLLABLE KHIEUKH-YO-MIEUM
+B34A CFD5 # HANGUL SYLLABLE KHIEUKH-YO-PIEUP
+B34B CFD6 # HANGUL SYLLABLE KHIEUKH-YO-PIEUPSIOS
+B34C CFD7 # HANGUL SYLLABLE KHIEUKH-YO-SIOS
+B34D CFD8 # HANGUL SYLLABLE KHIEUKH-YO-SSANGSIOS
+B34E CFD9 # HANGUL SYLLABLE KHIEUKH-YO-IEUNG
+B34F CFDA # HANGUL SYLLABLE KHIEUKH-YO-CIEUC
+B350 CFDB # HANGUL SYLLABLE KHIEUKH-YO-CHIEUCH
+B351 CFDC # HANGUL SYLLABLE KHIEUKH-YO-KHIEUKH
+B352 CFDD # HANGUL SYLLABLE KHIEUKH-YO-THIEUTH
+B353 CFDE # HANGUL SYLLABLE KHIEUKH-YO-PHIEUPH
+B354 CFDF # HANGUL SYLLABLE KHIEUKH-YO-HIEUH
+B355 CFE2 # HANGUL SYLLABLE KHIEUKH-U-SSANGKIYEOK
+B356 CFE3 # HANGUL SYLLABLE KHIEUKH-U-KIYEOKSIOS
+B357 CFE5 # HANGUL SYLLABLE KHIEUKH-U-NIEUNCIEUC
+B358 CFE6 # HANGUL SYLLABLE KHIEUKH-U-NIEUNHIEUH
+B359 CFE7 # HANGUL SYLLABLE KHIEUKH-U-TIKEUT
+B35A CFE9 # HANGUL SYLLABLE KHIEUKH-U-RIEULKIYEOK
+B361 CFEA # HANGUL SYLLABLE KHIEUKH-U-RIEULMIEUM
+B362 CFEB # HANGUL SYLLABLE KHIEUKH-U-RIEULPIEUP
+B363 CFEC # HANGUL SYLLABLE KHIEUKH-U-RIEULSIOS
+B364 CFED # HANGUL SYLLABLE KHIEUKH-U-RIEULTHIEUTH
+B365 CFEE # HANGUL SYLLABLE KHIEUKH-U-RIEULPHIEUPH
+B366 CFEF # HANGUL SYLLABLE KHIEUKH-U-RIEULHIEUH
+B367 CFF2 # HANGUL SYLLABLE KHIEUKH-U-PIEUPSIOS
+B368 CFF4 # HANGUL SYLLABLE KHIEUKH-U-SSANGSIOS
+B369 CFF6 # HANGUL SYLLABLE KHIEUKH-U-CIEUC
+B36A CFF7 # HANGUL SYLLABLE KHIEUKH-U-CHIEUCH
+B36B CFF8 # HANGUL SYLLABLE KHIEUKH-U-KHIEUKH
+B36C CFF9 # HANGUL SYLLABLE KHIEUKH-U-THIEUTH
+B36D CFFA # HANGUL SYLLABLE KHIEUKH-U-PHIEUPH
+B36E CFFB # HANGUL SYLLABLE KHIEUKH-U-HIEUH
+B36F CFFD # HANGUL SYLLABLE KHIEUKH-WEO-KIYEOK
+B370 CFFE # HANGUL SYLLABLE KHIEUKH-WEO-SSANGKIYEOK
+B371 CFFF # HANGUL SYLLABLE KHIEUKH-WEO-KIYEOKSIOS
+B372 D001 # HANGUL SYLLABLE KHIEUKH-WEO-NIEUNCIEUC
+B373 D002 # HANGUL SYLLABLE KHIEUKH-WEO-NIEUNHIEUH
+B374 D003 # HANGUL SYLLABLE KHIEUKH-WEO-TIKEUT
+B375 D005 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULKIYEOK
+B376 D006 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULMIEUM
+B377 D007 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULPIEUP
+B378 D008 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULSIOS
+B379 D009 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULTHIEUTH
+B37A D00A # HANGUL SYLLABLE KHIEUKH-WEO-RIEULPHIEUPH
+B381 D00B # HANGUL SYLLABLE KHIEUKH-WEO-RIEULHIEUH
+B382 D00C # HANGUL SYLLABLE KHIEUKH-WEO-MIEUM
+B383 D00D # HANGUL SYLLABLE KHIEUKH-WEO-PIEUP
+B384 D00E # HANGUL SYLLABLE KHIEUKH-WEO-PIEUPSIOS
+B385 D00F # HANGUL SYLLABLE KHIEUKH-WEO-SIOS
+B386 D010 # HANGUL SYLLABLE KHIEUKH-WEO-SSANGSIOS
+B387 D012 # HANGUL SYLLABLE KHIEUKH-WEO-CIEUC
+B388 D013 # HANGUL SYLLABLE KHIEUKH-WEO-CHIEUCH
+B389 D014 # HANGUL SYLLABLE KHIEUKH-WEO-KHIEUKH
+B38A D015 # HANGUL SYLLABLE KHIEUKH-WEO-THIEUTH
+B38B D016 # HANGUL SYLLABLE KHIEUKH-WEO-PHIEUPH
+B38C D017 # HANGUL SYLLABLE KHIEUKH-WEO-HIEUH
+B38D D019 # HANGUL SYLLABLE KHIEUKH-WE-KIYEOK
+B38E D01A # HANGUL SYLLABLE KHIEUKH-WE-SSANGKIYEOK
+B38F D01B # HANGUL SYLLABLE KHIEUKH-WE-KIYEOKSIOS
+B390 D01C # HANGUL SYLLABLE KHIEUKH-WE-NIEUN
+B391 D01D # HANGUL SYLLABLE KHIEUKH-WE-NIEUNCIEUC
+B392 D01E # HANGUL SYLLABLE KHIEUKH-WE-NIEUNHIEUH
+B393 D01F # HANGUL SYLLABLE KHIEUKH-WE-TIKEUT
+B394 D020 # HANGUL SYLLABLE KHIEUKH-WE-RIEUL
+B395 D021 # HANGUL SYLLABLE KHIEUKH-WE-RIEULKIYEOK
+B396 D022 # HANGUL SYLLABLE KHIEUKH-WE-RIEULMIEUM
+B397 D023 # HANGUL SYLLABLE KHIEUKH-WE-RIEULPIEUP
+B398 D024 # HANGUL SYLLABLE KHIEUKH-WE-RIEULSIOS
+B399 D025 # HANGUL SYLLABLE KHIEUKH-WE-RIEULTHIEUTH
+B39A D026 # HANGUL SYLLABLE KHIEUKH-WE-RIEULPHIEUPH
+B39B D027 # HANGUL SYLLABLE KHIEUKH-WE-RIEULHIEUH
+B39C D028 # HANGUL SYLLABLE KHIEUKH-WE-MIEUM
+B39D D029 # HANGUL SYLLABLE KHIEUKH-WE-PIEUP
+B39E D02A # HANGUL SYLLABLE KHIEUKH-WE-PIEUPSIOS
+B39F D02B # HANGUL SYLLABLE KHIEUKH-WE-SIOS
+B3A0 D02C # HANGUL SYLLABLE KHIEUKH-WE-SSANGSIOS
+B3A1 B05D # HANGUL SYLLABLE SSANGKIYEOK-EU-THIEUTH
+B3A2 B07C # HANGUL SYLLABLE SSANGKIYEOK-I
+B3A3 B07D # HANGUL SYLLABLE SSANGKIYEOK-I-KIYEOK
+B3A4 B080 # HANGUL SYLLABLE SSANGKIYEOK-I-NIEUN
+B3A5 B084 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEUL
+B3A6 B08C # HANGUL SYLLABLE SSANGKIYEOK-I-MIEUM
+B3A7 B08D # HANGUL SYLLABLE SSANGKIYEOK-I-PIEUP
+B3A8 B08F # HANGUL SYLLABLE SSANGKIYEOK-I-SIOS
+B3A9 B091 # HANGUL SYLLABLE SSANGKIYEOK-I-IEUNG
+B3AA B098 # HANGUL SYLLABLE NIEUN-A
+B3AB B099 # HANGUL SYLLABLE NIEUN-A-KIYEOK
+B3AC B09A # HANGUL SYLLABLE NIEUN-A-SSANGKIYEOK
+B3AD B09C # HANGUL SYLLABLE NIEUN-A-NIEUN
+B3AE B09F # HANGUL SYLLABLE NIEUN-A-TIKEUT
+B3AF B0A0 # HANGUL SYLLABLE NIEUN-A-RIEUL
+B3B0 B0A1 # HANGUL SYLLABLE NIEUN-A-RIEULKIYEOK
+B3B1 B0A2 # HANGUL SYLLABLE NIEUN-A-RIEULMIEUM
+B3B2 B0A8 # HANGUL SYLLABLE NIEUN-A-MIEUM
+B3B3 B0A9 # HANGUL SYLLABLE NIEUN-A-PIEUP
+B3B4 B0AB # HANGUL SYLLABLE NIEUN-A-SIOS
+B3B5 B0AC # HANGUL SYLLABLE NIEUN-A-SSANGSIOS
+B3B6 B0AD # HANGUL SYLLABLE NIEUN-A-IEUNG
+B3B7 B0AE # HANGUL SYLLABLE NIEUN-A-CIEUC
+B3B8 B0AF # HANGUL SYLLABLE NIEUN-A-CHIEUCH
+B3B9 B0B1 # HANGUL SYLLABLE NIEUN-A-THIEUTH
+B3BA B0B3 # HANGUL SYLLABLE NIEUN-A-HIEUH
+B3BB B0B4 # HANGUL SYLLABLE NIEUN-AE
+B3BC B0B5 # HANGUL SYLLABLE NIEUN-AE-KIYEOK
+B3BD B0B8 # HANGUL SYLLABLE NIEUN-AE-NIEUN
+B3BE B0BC # HANGUL SYLLABLE NIEUN-AE-RIEUL
+B3BF B0C4 # HANGUL SYLLABLE NIEUN-AE-MIEUM
+B3C0 B0C5 # HANGUL SYLLABLE NIEUN-AE-PIEUP
+B3C1 B0C7 # HANGUL SYLLABLE NIEUN-AE-SIOS
+B3C2 B0C8 # HANGUL SYLLABLE NIEUN-AE-SSANGSIOS
+B3C3 B0C9 # HANGUL SYLLABLE NIEUN-AE-IEUNG
+B3C4 B0D0 # HANGUL SYLLABLE NIEUN-YA
+B3C5 B0D1 # HANGUL SYLLABLE NIEUN-YA-KIYEOK
+B3C6 B0D4 # HANGUL SYLLABLE NIEUN-YA-NIEUN
+B3C7 B0D8 # HANGUL SYLLABLE NIEUN-YA-RIEUL
+B3C8 B0E0 # HANGUL SYLLABLE NIEUN-YA-MIEUM
+B3C9 B0E5 # HANGUL SYLLABLE NIEUN-YA-IEUNG
+B3CA B108 # HANGUL SYLLABLE NIEUN-EO
+B3CB B109 # HANGUL SYLLABLE NIEUN-EO-KIYEOK
+B3CC B10B # HANGUL SYLLABLE NIEUN-EO-KIYEOKSIOS
+B3CD B10C # HANGUL SYLLABLE NIEUN-EO-NIEUN
+B3CE B110 # HANGUL SYLLABLE NIEUN-EO-RIEUL
+B3CF B112 # HANGUL SYLLABLE NIEUN-EO-RIEULMIEUM
+B3D0 B113 # HANGUL SYLLABLE NIEUN-EO-RIEULPIEUP
+B3D1 B118 # HANGUL SYLLABLE NIEUN-EO-MIEUM
+B3D2 B119 # HANGUL SYLLABLE NIEUN-EO-PIEUP
+B3D3 B11B # HANGUL SYLLABLE NIEUN-EO-SIOS
+B3D4 B11C # HANGUL SYLLABLE NIEUN-EO-SSANGSIOS
+B3D5 B11D # HANGUL SYLLABLE NIEUN-EO-IEUNG
+B3D6 B123 # HANGUL SYLLABLE NIEUN-EO-HIEUH
+B3D7 B124 # HANGUL SYLLABLE NIEUN-E
+B3D8 B125 # HANGUL SYLLABLE NIEUN-E-KIYEOK
+B3D9 B128 # HANGUL SYLLABLE NIEUN-E-NIEUN
+B3DA B12C # HANGUL SYLLABLE NIEUN-E-RIEUL
+B3DB B134 # HANGUL SYLLABLE NIEUN-E-MIEUM
+B3DC B135 # HANGUL SYLLABLE NIEUN-E-PIEUP
+B3DD B137 # HANGUL SYLLABLE NIEUN-E-SIOS
+B3DE B138 # HANGUL SYLLABLE NIEUN-E-SSANGSIOS
+B3DF B139 # HANGUL SYLLABLE NIEUN-E-IEUNG
+B3E0 B140 # HANGUL SYLLABLE NIEUN-YEO
+B3E1 B141 # HANGUL SYLLABLE NIEUN-YEO-KIYEOK
+B3E2 B144 # HANGUL SYLLABLE NIEUN-YEO-NIEUN
+B3E3 B148 # HANGUL SYLLABLE NIEUN-YEO-RIEUL
+B3E4 B150 # HANGUL SYLLABLE NIEUN-YEO-MIEUM
+B3E5 B151 # HANGUL SYLLABLE NIEUN-YEO-PIEUP
+B3E6 B154 # HANGUL SYLLABLE NIEUN-YEO-SSANGSIOS
+B3E7 B155 # HANGUL SYLLABLE NIEUN-YEO-IEUNG
+B3E8 B158 # HANGUL SYLLABLE NIEUN-YEO-KHIEUKH
+B3E9 B15C # HANGUL SYLLABLE NIEUN-YE
+B3EA B160 # HANGUL SYLLABLE NIEUN-YE-NIEUN
+B3EB B178 # HANGUL SYLLABLE NIEUN-O
+B3EC B179 # HANGUL SYLLABLE NIEUN-O-KIYEOK
+B3ED B17C # HANGUL SYLLABLE NIEUN-O-NIEUN
+B3EE B180 # HANGUL SYLLABLE NIEUN-O-RIEUL
+B3EF B182 # HANGUL SYLLABLE NIEUN-O-RIEULMIEUM
+B3F0 B188 # HANGUL SYLLABLE NIEUN-O-MIEUM
+B3F1 B189 # HANGUL SYLLABLE NIEUN-O-PIEUP
+B3F2 B18B # HANGUL SYLLABLE NIEUN-O-SIOS
+B3F3 B18D # HANGUL SYLLABLE NIEUN-O-IEUNG
+B3F4 B192 # HANGUL SYLLABLE NIEUN-O-PHIEUPH
+B3F5 B193 # HANGUL SYLLABLE NIEUN-O-HIEUH
+B3F6 B194 # HANGUL SYLLABLE NIEUN-WA
+B3F7 B198 # HANGUL SYLLABLE NIEUN-WA-NIEUN
+B3F8 B19C # HANGUL SYLLABLE NIEUN-WA-RIEUL
+B3F9 B1A8 # HANGUL SYLLABLE NIEUN-WA-SSANGSIOS
+B3FA B1CC # HANGUL SYLLABLE NIEUN-OE
+B3FB B1D0 # HANGUL SYLLABLE NIEUN-OE-NIEUN
+B3FC B1D4 # HANGUL SYLLABLE NIEUN-OE-RIEUL
+B3FD B1DC # HANGUL SYLLABLE NIEUN-OE-MIEUM
+B3FE B1DD # HANGUL SYLLABLE NIEUN-OE-PIEUP
+B441 D02E # HANGUL SYLLABLE KHIEUKH-WE-CIEUC
+B442 D02F # HANGUL SYLLABLE KHIEUKH-WE-CHIEUCH
+B443 D030 # HANGUL SYLLABLE KHIEUKH-WE-KHIEUKH
+B444 D031 # HANGUL SYLLABLE KHIEUKH-WE-THIEUTH
+B445 D032 # HANGUL SYLLABLE KHIEUKH-WE-PHIEUPH
+B446 D033 # HANGUL SYLLABLE KHIEUKH-WE-HIEUH
+B447 D036 # HANGUL SYLLABLE KHIEUKH-WI-SSANGKIYEOK
+B448 D037 # HANGUL SYLLABLE KHIEUKH-WI-KIYEOKSIOS
+B449 D039 # HANGUL SYLLABLE KHIEUKH-WI-NIEUNCIEUC
+B44A D03A # HANGUL SYLLABLE KHIEUKH-WI-NIEUNHIEUH
+B44B D03B # HANGUL SYLLABLE KHIEUKH-WI-TIKEUT
+B44C D03D # HANGUL SYLLABLE KHIEUKH-WI-RIEULKIYEOK
+B44D D03E # HANGUL SYLLABLE KHIEUKH-WI-RIEULMIEUM
+B44E D03F # HANGUL SYLLABLE KHIEUKH-WI-RIEULPIEUP
+B44F D040 # HANGUL SYLLABLE KHIEUKH-WI-RIEULSIOS
+B450 D041 # HANGUL SYLLABLE KHIEUKH-WI-RIEULTHIEUTH
+B451 D042 # HANGUL SYLLABLE KHIEUKH-WI-RIEULPHIEUPH
+B452 D043 # HANGUL SYLLABLE KHIEUKH-WI-RIEULHIEUH
+B453 D046 # HANGUL SYLLABLE KHIEUKH-WI-PIEUPSIOS
+B454 D048 # HANGUL SYLLABLE KHIEUKH-WI-SSANGSIOS
+B455 D04A # HANGUL SYLLABLE KHIEUKH-WI-CIEUC
+B456 D04B # HANGUL SYLLABLE KHIEUKH-WI-CHIEUCH
+B457 D04C # HANGUL SYLLABLE KHIEUKH-WI-KHIEUKH
+B458 D04D # HANGUL SYLLABLE KHIEUKH-WI-THIEUTH
+B459 D04E # HANGUL SYLLABLE KHIEUKH-WI-PHIEUPH
+B45A D04F # HANGUL SYLLABLE KHIEUKH-WI-HIEUH
+B461 D051 # HANGUL SYLLABLE KHIEUKH-YU-KIYEOK
+B462 D052 # HANGUL SYLLABLE KHIEUKH-YU-SSANGKIYEOK
+B463 D053 # HANGUL SYLLABLE KHIEUKH-YU-KIYEOKSIOS
+B464 D055 # HANGUL SYLLABLE KHIEUKH-YU-NIEUNCIEUC
+B465 D056 # HANGUL SYLLABLE KHIEUKH-YU-NIEUNHIEUH
+B466 D057 # HANGUL SYLLABLE KHIEUKH-YU-TIKEUT
+B467 D059 # HANGUL SYLLABLE KHIEUKH-YU-RIEULKIYEOK
+B468 D05A # HANGUL SYLLABLE KHIEUKH-YU-RIEULMIEUM
+B469 D05B # HANGUL SYLLABLE KHIEUKH-YU-RIEULPIEUP
+B46A D05C # HANGUL SYLLABLE KHIEUKH-YU-RIEULSIOS
+B46B D05D # HANGUL SYLLABLE KHIEUKH-YU-RIEULTHIEUTH
+B46C D05E # HANGUL SYLLABLE KHIEUKH-YU-RIEULPHIEUPH
+B46D D05F # HANGUL SYLLABLE KHIEUKH-YU-RIEULHIEUH
+B46E D061 # HANGUL SYLLABLE KHIEUKH-YU-PIEUP
+B46F D062 # HANGUL SYLLABLE KHIEUKH-YU-PIEUPSIOS
+B470 D063 # HANGUL SYLLABLE KHIEUKH-YU-SIOS
+B471 D064 # HANGUL SYLLABLE KHIEUKH-YU-SSANGSIOS
+B472 D065 # HANGUL SYLLABLE KHIEUKH-YU-IEUNG
+B473 D066 # HANGUL SYLLABLE KHIEUKH-YU-CIEUC
+B474 D067 # HANGUL SYLLABLE KHIEUKH-YU-CHIEUCH
+B475 D068 # HANGUL SYLLABLE KHIEUKH-YU-KHIEUKH
+B476 D069 # HANGUL SYLLABLE KHIEUKH-YU-THIEUTH
+B477 D06A # HANGUL SYLLABLE KHIEUKH-YU-PHIEUPH
+B478 D06B # HANGUL SYLLABLE KHIEUKH-YU-HIEUH
+B479 D06E # HANGUL SYLLABLE KHIEUKH-EU-SSANGKIYEOK
+B47A D06F # HANGUL SYLLABLE KHIEUKH-EU-KIYEOKSIOS
+B481 D071 # HANGUL SYLLABLE KHIEUKH-EU-NIEUNCIEUC
+B482 D072 # HANGUL SYLLABLE KHIEUKH-EU-NIEUNHIEUH
+B483 D073 # HANGUL SYLLABLE KHIEUKH-EU-TIKEUT
+B484 D075 # HANGUL SYLLABLE KHIEUKH-EU-RIEULKIYEOK
+B485 D076 # HANGUL SYLLABLE KHIEUKH-EU-RIEULMIEUM
+B486 D077 # HANGUL SYLLABLE KHIEUKH-EU-RIEULPIEUP
+B487 D078 # HANGUL SYLLABLE KHIEUKH-EU-RIEULSIOS
+B488 D079 # HANGUL SYLLABLE KHIEUKH-EU-RIEULTHIEUTH
+B489 D07A # HANGUL SYLLABLE KHIEUKH-EU-RIEULPHIEUPH
+B48A D07B # HANGUL SYLLABLE KHIEUKH-EU-RIEULHIEUH
+B48B D07E # HANGUL SYLLABLE KHIEUKH-EU-PIEUPSIOS
+B48C D07F # HANGUL SYLLABLE KHIEUKH-EU-SIOS
+B48D D080 # HANGUL SYLLABLE KHIEUKH-EU-SSANGSIOS
+B48E D082 # HANGUL SYLLABLE KHIEUKH-EU-CIEUC
+B48F D083 # HANGUL SYLLABLE KHIEUKH-EU-CHIEUCH
+B490 D084 # HANGUL SYLLABLE KHIEUKH-EU-KHIEUKH
+B491 D085 # HANGUL SYLLABLE KHIEUKH-EU-THIEUTH
+B492 D086 # HANGUL SYLLABLE KHIEUKH-EU-PHIEUPH
+B493 D087 # HANGUL SYLLABLE KHIEUKH-EU-HIEUH
+B494 D088 # HANGUL SYLLABLE KHIEUKH-YI
+B495 D089 # HANGUL SYLLABLE KHIEUKH-YI-KIYEOK
+B496 D08A # HANGUL SYLLABLE KHIEUKH-YI-SSANGKIYEOK
+B497 D08B # HANGUL SYLLABLE KHIEUKH-YI-KIYEOKSIOS
+B498 D08C # HANGUL SYLLABLE KHIEUKH-YI-NIEUN
+B499 D08D # HANGUL SYLLABLE KHIEUKH-YI-NIEUNCIEUC
+B49A D08E # HANGUL SYLLABLE KHIEUKH-YI-NIEUNHIEUH
+B49B D08F # HANGUL SYLLABLE KHIEUKH-YI-TIKEUT
+B49C D090 # HANGUL SYLLABLE KHIEUKH-YI-RIEUL
+B49D D091 # HANGUL SYLLABLE KHIEUKH-YI-RIEULKIYEOK
+B49E D092 # HANGUL SYLLABLE KHIEUKH-YI-RIEULMIEUM
+B49F D093 # HANGUL SYLLABLE KHIEUKH-YI-RIEULPIEUP
+B4A0 D094 # HANGUL SYLLABLE KHIEUKH-YI-RIEULSIOS
+B4A1 B1DF # HANGUL SYLLABLE NIEUN-OE-SIOS
+B4A2 B1E8 # HANGUL SYLLABLE NIEUN-YO
+B4A3 B1E9 # HANGUL SYLLABLE NIEUN-YO-KIYEOK
+B4A4 B1EC # HANGUL SYLLABLE NIEUN-YO-NIEUN
+B4A5 B1F0 # HANGUL SYLLABLE NIEUN-YO-RIEUL
+B4A6 B1F9 # HANGUL SYLLABLE NIEUN-YO-PIEUP
+B4A7 B1FB # HANGUL SYLLABLE NIEUN-YO-SIOS
+B4A8 B1FD # HANGUL SYLLABLE NIEUN-YO-IEUNG
+B4A9 B204 # HANGUL SYLLABLE NIEUN-U
+B4AA B205 # HANGUL SYLLABLE NIEUN-U-KIYEOK
+B4AB B208 # HANGUL SYLLABLE NIEUN-U-NIEUN
+B4AC B20B # HANGUL SYLLABLE NIEUN-U-TIKEUT
+B4AD B20C # HANGUL SYLLABLE NIEUN-U-RIEUL
+B4AE B214 # HANGUL SYLLABLE NIEUN-U-MIEUM
+B4AF B215 # HANGUL SYLLABLE NIEUN-U-PIEUP
+B4B0 B217 # HANGUL SYLLABLE NIEUN-U-SIOS
+B4B1 B219 # HANGUL SYLLABLE NIEUN-U-IEUNG
+B4B2 B220 # HANGUL SYLLABLE NIEUN-WEO
+B4B3 B234 # HANGUL SYLLABLE NIEUN-WEO-SSANGSIOS
+B4B4 B23C # HANGUL SYLLABLE NIEUN-WE
+B4B5 B258 # HANGUL SYLLABLE NIEUN-WI
+B4B6 B25C # HANGUL SYLLABLE NIEUN-WI-NIEUN
+B4B7 B260 # HANGUL SYLLABLE NIEUN-WI-RIEUL
+B4B8 B268 # HANGUL SYLLABLE NIEUN-WI-MIEUM
+B4B9 B269 # HANGUL SYLLABLE NIEUN-WI-PIEUP
+B4BA B274 # HANGUL SYLLABLE NIEUN-YU
+B4BB B275 # HANGUL SYLLABLE NIEUN-YU-KIYEOK
+B4BC B27C # HANGUL SYLLABLE NIEUN-YU-RIEUL
+B4BD B284 # HANGUL SYLLABLE NIEUN-YU-MIEUM
+B4BE B285 # HANGUL SYLLABLE NIEUN-YU-PIEUP
+B4BF B289 # HANGUL SYLLABLE NIEUN-YU-IEUNG
+B4C0 B290 # HANGUL SYLLABLE NIEUN-EU
+B4C1 B291 # HANGUL SYLLABLE NIEUN-EU-KIYEOK
+B4C2 B294 # HANGUL SYLLABLE NIEUN-EU-NIEUN
+B4C3 B298 # HANGUL SYLLABLE NIEUN-EU-RIEUL
+B4C4 B299 # HANGUL SYLLABLE NIEUN-EU-RIEULKIYEOK
+B4C5 B29A # HANGUL SYLLABLE NIEUN-EU-RIEULMIEUM
+B4C6 B2A0 # HANGUL SYLLABLE NIEUN-EU-MIEUM
+B4C7 B2A1 # HANGUL SYLLABLE NIEUN-EU-PIEUP
+B4C8 B2A3 # HANGUL SYLLABLE NIEUN-EU-SIOS
+B4C9 B2A5 # HANGUL SYLLABLE NIEUN-EU-IEUNG
+B4CA B2A6 # HANGUL SYLLABLE NIEUN-EU-CIEUC
+B4CB B2AA # HANGUL SYLLABLE NIEUN-EU-PHIEUPH
+B4CC B2AC # HANGUL SYLLABLE NIEUN-YI
+B4CD B2B0 # HANGUL SYLLABLE NIEUN-YI-NIEUN
+B4CE B2B4 # HANGUL SYLLABLE NIEUN-YI-RIEUL
+B4CF B2C8 # HANGUL SYLLABLE NIEUN-I
+B4D0 B2C9 # HANGUL SYLLABLE NIEUN-I-KIYEOK
+B4D1 B2CC # HANGUL SYLLABLE NIEUN-I-NIEUN
+B4D2 B2D0 # HANGUL SYLLABLE NIEUN-I-RIEUL
+B4D3 B2D2 # HANGUL SYLLABLE NIEUN-I-RIEULMIEUM-<3/22/95>
+B4D4 B2D8 # HANGUL SYLLABLE NIEUN-I-MIEUM
+B4D5 B2D9 # HANGUL SYLLABLE NIEUN-I-PIEUP
+B4D6 B2DB # HANGUL SYLLABLE NIEUN-I-SIOS
+B4D7 B2DD # HANGUL SYLLABLE NIEUN-I-IEUNG
+B4D8 B2E2 # HANGUL SYLLABLE NIEUN-I-PHIEUPH
+B4D9 B2E4 # HANGUL SYLLABLE TIKEUT-A
+B4DA B2E5 # HANGUL SYLLABLE TIKEUT-A-KIYEOK
+B4DB B2E6 # HANGUL SYLLABLE TIKEUT-A-SSANGKIYEOK
+B4DC B2E8 # HANGUL SYLLABLE TIKEUT-A-NIEUN
+B4DD B2EB # HANGUL SYLLABLE TIKEUT-A-TIKEUT
+B4DE B2EC # HANGUL SYLLABLE TIKEUT-A-RIEUL
+B4DF B2ED # HANGUL SYLLABLE TIKEUT-A-RIEULKIYEOK
+B4E0 B2EE # HANGUL SYLLABLE TIKEUT-A-RIEULMIEUM
+B4E1 B2EF # HANGUL SYLLABLE TIKEUT-A-RIEULPIEUP
+B4E2 B2F3 # HANGUL SYLLABLE TIKEUT-A-RIEULHIEUH
+B4E3 B2F4 # HANGUL SYLLABLE TIKEUT-A-MIEUM
+B4E4 B2F5 # HANGUL SYLLABLE TIKEUT-A-PIEUP
+B4E5 B2F7 # HANGUL SYLLABLE TIKEUT-A-SIOS
+B4E6 B2F8 # HANGUL SYLLABLE TIKEUT-A-SSANGSIOS
+B4E7 B2F9 # HANGUL SYLLABLE TIKEUT-A-IEUNG
+B4E8 B2FA # HANGUL SYLLABLE TIKEUT-A-CIEUC
+B4E9 B2FB # HANGUL SYLLABLE TIKEUT-A-CHIEUCH
+B4EA B2FF # HANGUL SYLLABLE TIKEUT-A-HIEUH
+B4EB B300 # HANGUL SYLLABLE TIKEUT-AE
+B4EC B301 # HANGUL SYLLABLE TIKEUT-AE-KIYEOK
+B4ED B304 # HANGUL SYLLABLE TIKEUT-AE-NIEUN
+B4EE B308 # HANGUL SYLLABLE TIKEUT-AE-RIEUL
+B4EF B310 # HANGUL SYLLABLE TIKEUT-AE-MIEUM
+B4F0 B311 # HANGUL SYLLABLE TIKEUT-AE-PIEUP
+B4F1 B313 # HANGUL SYLLABLE TIKEUT-AE-SIOS
+B4F2 B314 # HANGUL SYLLABLE TIKEUT-AE-SSANGSIOS
+B4F3 B315 # HANGUL SYLLABLE TIKEUT-AE-IEUNG
+B4F4 B31C # HANGUL SYLLABLE TIKEUT-YA
+B4F5 B354 # HANGUL SYLLABLE TIKEUT-EO
+B4F6 B355 # HANGUL SYLLABLE TIKEUT-EO-KIYEOK
+B4F7 B356 # HANGUL SYLLABLE TIKEUT-EO-SSANGKIYEOK
+B4F8 B358 # HANGUL SYLLABLE TIKEUT-EO-NIEUN
+B4F9 B35B # HANGUL SYLLABLE TIKEUT-EO-TIKEUT
+B4FA B35C # HANGUL SYLLABLE TIKEUT-EO-RIEUL
+B4FB B35E # HANGUL SYLLABLE TIKEUT-EO-RIEULMIEUM
+B4FC B35F # HANGUL SYLLABLE TIKEUT-EO-RIEULPIEUP
+B4FD B364 # HANGUL SYLLABLE TIKEUT-EO-MIEUM
+B4FE B365 # HANGUL SYLLABLE TIKEUT-EO-PIEUP
+B541 D095 # HANGUL SYLLABLE KHIEUKH-YI-RIEULTHIEUTH
+B542 D096 # HANGUL SYLLABLE KHIEUKH-YI-RIEULPHIEUPH
+B543 D097 # HANGUL SYLLABLE KHIEUKH-YI-RIEULHIEUH
+B544 D098 # HANGUL SYLLABLE KHIEUKH-YI-MIEUM
+B545 D099 # HANGUL SYLLABLE KHIEUKH-YI-PIEUP
+B546 D09A # HANGUL SYLLABLE KHIEUKH-YI-PIEUPSIOS
+B547 D09B # HANGUL SYLLABLE KHIEUKH-YI-SIOS
+B548 D09C # HANGUL SYLLABLE KHIEUKH-YI-SSANGSIOS
+B549 D09D # HANGUL SYLLABLE KHIEUKH-YI-IEUNG
+B54A D09E # HANGUL SYLLABLE KHIEUKH-YI-CIEUC
+B54B D09F # HANGUL SYLLABLE KHIEUKH-YI-CHIEUCH
+B54C D0A0 # HANGUL SYLLABLE KHIEUKH-YI-KHIEUKH
+B54D D0A1 # HANGUL SYLLABLE KHIEUKH-YI-THIEUTH
+B54E D0A2 # HANGUL SYLLABLE KHIEUKH-YI-PHIEUPH
+B54F D0A3 # HANGUL SYLLABLE KHIEUKH-YI-HIEUH
+B550 D0A6 # HANGUL SYLLABLE KHIEUKH-I-SSANGKIYEOK
+B551 D0A7 # HANGUL SYLLABLE KHIEUKH-I-KIYEOKSIOS
+B552 D0A9 # HANGUL SYLLABLE KHIEUKH-I-NIEUNCIEUC
+B553 D0AA # HANGUL SYLLABLE KHIEUKH-I-NIEUNHIEUH
+B554 D0AB # HANGUL SYLLABLE KHIEUKH-I-TIKEUT
+B555 D0AD # HANGUL SYLLABLE KHIEUKH-I-RIEULKIYEOK
+B556 D0AE # HANGUL SYLLABLE KHIEUKH-I-RIEULMIEUM
+B557 D0AF # HANGUL SYLLABLE KHIEUKH-I-RIEULPIEUP
+B558 D0B0 # HANGUL SYLLABLE KHIEUKH-I-RIEULSIOS
+B559 D0B1 # HANGUL SYLLABLE KHIEUKH-I-RIEULTHIEUTH
+B55A D0B2 # HANGUL SYLLABLE KHIEUKH-I-RIEULPHIEUPH
+B561 D0B3 # HANGUL SYLLABLE KHIEUKH-I-RIEULHIEUH
+B562 D0B6 # HANGUL SYLLABLE KHIEUKH-I-PIEUPSIOS
+B563 D0B8 # HANGUL SYLLABLE KHIEUKH-I-SSANGSIOS
+B564 D0BA # HANGUL SYLLABLE KHIEUKH-I-CIEUC
+B565 D0BB # HANGUL SYLLABLE KHIEUKH-I-CHIEUCH
+B566 D0BC # HANGUL SYLLABLE KHIEUKH-I-KHIEUKH
+B567 D0BD # HANGUL SYLLABLE KHIEUKH-I-THIEUTH
+B568 D0BE # HANGUL SYLLABLE KHIEUKH-I-PHIEUPH
+B569 D0BF # HANGUL SYLLABLE KHIEUKH-I-HIEUH
+B56A D0C2 # HANGUL SYLLABLE THIEUTH-A-SSANGKIYEOK
+B56B D0C3 # HANGUL SYLLABLE THIEUTH-A-KIYEOKSIOS
+B56C D0C5 # HANGUL SYLLABLE THIEUTH-A-NIEUNCIEUC
+B56D D0C6 # HANGUL SYLLABLE THIEUTH-A-NIEUNHIEUH
+B56E D0C7 # HANGUL SYLLABLE THIEUTH-A-TIKEUT
+B56F D0CA # HANGUL SYLLABLE THIEUTH-A-RIEULMIEUM
+B570 D0CB # HANGUL SYLLABLE THIEUTH-A-RIEULPIEUP
+B571 D0CC # HANGUL SYLLABLE THIEUTH-A-RIEULSIOS
+B572 D0CD # HANGUL SYLLABLE THIEUTH-A-RIEULTHIEUTH
+B573 D0CE # HANGUL SYLLABLE THIEUTH-A-RIEULPHIEUPH
+B574 D0CF # HANGUL SYLLABLE THIEUTH-A-RIEULHIEUH
+B575 D0D2 # HANGUL SYLLABLE THIEUTH-A-PIEUPSIOS
+B576 D0D6 # HANGUL SYLLABLE THIEUTH-A-CIEUC
+B577 D0D7 # HANGUL SYLLABLE THIEUTH-A-CHIEUCH
+B578 D0D8 # HANGUL SYLLABLE THIEUTH-A-KHIEUKH
+B579 D0D9 # HANGUL SYLLABLE THIEUTH-A-THIEUTH
+B57A D0DA # HANGUL SYLLABLE THIEUTH-A-PHIEUPH
+B581 D0DB # HANGUL SYLLABLE THIEUTH-A-HIEUH
+B582 D0DE # HANGUL SYLLABLE THIEUTH-AE-SSANGKIYEOK
+B583 D0DF # HANGUL SYLLABLE THIEUTH-AE-KIYEOKSIOS
+B584 D0E1 # HANGUL SYLLABLE THIEUTH-AE-NIEUNCIEUC
+B585 D0E2 # HANGUL SYLLABLE THIEUTH-AE-NIEUNHIEUH
+B586 D0E3 # HANGUL SYLLABLE THIEUTH-AE-TIKEUT
+B587 D0E5 # HANGUL SYLLABLE THIEUTH-AE-RIEULKIYEOK
+B588 D0E6 # HANGUL SYLLABLE THIEUTH-AE-RIEULMIEUM
+B589 D0E7 # HANGUL SYLLABLE THIEUTH-AE-RIEULPIEUP
+B58A D0E8 # HANGUL SYLLABLE THIEUTH-AE-RIEULSIOS
+B58B D0E9 # HANGUL SYLLABLE THIEUTH-AE-RIEULTHIEUTH
+B58C D0EA # HANGUL SYLLABLE THIEUTH-AE-RIEULPHIEUPH
+B58D D0EB # HANGUL SYLLABLE THIEUTH-AE-RIEULHIEUH
+B58E D0EE # HANGUL SYLLABLE THIEUTH-AE-PIEUPSIOS
+B58F D0F2 # HANGUL SYLLABLE THIEUTH-AE-CIEUC
+B590 D0F3 # HANGUL SYLLABLE THIEUTH-AE-CHIEUCH
+B591 D0F4 # HANGUL SYLLABLE THIEUTH-AE-KHIEUKH
+B592 D0F5 # HANGUL SYLLABLE THIEUTH-AE-THIEUTH
+B593 D0F6 # HANGUL SYLLABLE THIEUTH-AE-PHIEUPH
+B594 D0F7 # HANGUL SYLLABLE THIEUTH-AE-HIEUH
+B595 D0F9 # HANGUL SYLLABLE THIEUTH-YA-KIYEOK
+B596 D0FA # HANGUL SYLLABLE THIEUTH-YA-SSANGKIYEOK
+B597 D0FB # HANGUL SYLLABLE THIEUTH-YA-KIYEOKSIOS
+B598 D0FC # HANGUL SYLLABLE THIEUTH-YA-NIEUN
+B599 D0FD # HANGUL SYLLABLE THIEUTH-YA-NIEUNCIEUC
+B59A D0FE # HANGUL SYLLABLE THIEUTH-YA-NIEUNHIEUH
+B59B D0FF # HANGUL SYLLABLE THIEUTH-YA-TIKEUT
+B59C D100 # HANGUL SYLLABLE THIEUTH-YA-RIEUL
+B59D D101 # HANGUL SYLLABLE THIEUTH-YA-RIEULKIYEOK
+B59E D102 # HANGUL SYLLABLE THIEUTH-YA-RIEULMIEUM
+B59F D103 # HANGUL SYLLABLE THIEUTH-YA-RIEULPIEUP
+B5A0 D104 # HANGUL SYLLABLE THIEUTH-YA-RIEULSIOS
+B5A1 B367 # HANGUL SYLLABLE TIKEUT-EO-SIOS
+B5A2 B369 # HANGUL SYLLABLE TIKEUT-EO-IEUNG
+B5A3 B36B # HANGUL SYLLABLE TIKEUT-EO-CHIEUCH
+B5A4 B36E # HANGUL SYLLABLE TIKEUT-EO-PHIEUPH
+B5A5 B370 # HANGUL SYLLABLE TIKEUT-E
+B5A6 B371 # HANGUL SYLLABLE TIKEUT-E-KIYEOK
+B5A7 B374 # HANGUL SYLLABLE TIKEUT-E-NIEUN
+B5A8 B378 # HANGUL SYLLABLE TIKEUT-E-RIEUL
+B5A9 B380 # HANGUL SYLLABLE TIKEUT-E-MIEUM
+B5AA B381 # HANGUL SYLLABLE TIKEUT-E-PIEUP
+B5AB B383 # HANGUL SYLLABLE TIKEUT-E-SIOS
+B5AC B384 # HANGUL SYLLABLE TIKEUT-E-SSANGSIOS
+B5AD B385 # HANGUL SYLLABLE TIKEUT-E-IEUNG
+B5AE B38C # HANGUL SYLLABLE TIKEUT-YEO
+B5AF B390 # HANGUL SYLLABLE TIKEUT-YEO-NIEUN
+B5B0 B394 # HANGUL SYLLABLE TIKEUT-YEO-RIEUL
+B5B1 B3A0 # HANGUL SYLLABLE TIKEUT-YEO-SSANGSIOS
+B5B2 B3A1 # HANGUL SYLLABLE TIKEUT-YEO-IEUNG
+B5B3 B3A8 # HANGUL SYLLABLE TIKEUT-YE
+B5B4 B3AC # HANGUL SYLLABLE TIKEUT-YE-NIEUN
+B5B5 B3C4 # HANGUL SYLLABLE TIKEUT-O
+B5B6 B3C5 # HANGUL SYLLABLE TIKEUT-O-KIYEOK
+B5B7 B3C8 # HANGUL SYLLABLE TIKEUT-O-NIEUN
+B5B8 B3CB # HANGUL SYLLABLE TIKEUT-O-TIKEUT
+B5B9 B3CC # HANGUL SYLLABLE TIKEUT-O-RIEUL
+B5BA B3CE # HANGUL SYLLABLE TIKEUT-O-RIEULMIEUM
+B5BB B3D0 # HANGUL SYLLABLE TIKEUT-O-RIEULSIOS
+B5BC B3D4 # HANGUL SYLLABLE TIKEUT-O-MIEUM
+B5BD B3D5 # HANGUL SYLLABLE TIKEUT-O-PIEUP
+B5BE B3D7 # HANGUL SYLLABLE TIKEUT-O-SIOS
+B5BF B3D9 # HANGUL SYLLABLE TIKEUT-O-IEUNG
+B5C0 B3DB # HANGUL SYLLABLE TIKEUT-O-CHIEUCH
+B5C1 B3DD # HANGUL SYLLABLE TIKEUT-O-THIEUTH
+B5C2 B3E0 # HANGUL SYLLABLE TIKEUT-WA
+B5C3 B3E4 # HANGUL SYLLABLE TIKEUT-WA-NIEUN
+B5C4 B3E8 # HANGUL SYLLABLE TIKEUT-WA-RIEUL
+B5C5 B3FC # HANGUL SYLLABLE TIKEUT-WAE
+B5C6 B410 # HANGUL SYLLABLE TIKEUT-WAE-SSANGSIOS
+B5C7 B418 # HANGUL SYLLABLE TIKEUT-OE
+B5C8 B41C # HANGUL SYLLABLE TIKEUT-OE-NIEUN
+B5C9 B420 # HANGUL SYLLABLE TIKEUT-OE-RIEUL
+B5CA B428 # HANGUL SYLLABLE TIKEUT-OE-MIEUM
+B5CB B429 # HANGUL SYLLABLE TIKEUT-OE-PIEUP
+B5CC B42B # HANGUL SYLLABLE TIKEUT-OE-SIOS
+B5CD B434 # HANGUL SYLLABLE TIKEUT-YO
+B5CE B450 # HANGUL SYLLABLE TIKEUT-U
+B5CF B451 # HANGUL SYLLABLE TIKEUT-U-KIYEOK
+B5D0 B454 # HANGUL SYLLABLE TIKEUT-U-NIEUN
+B5D1 B458 # HANGUL SYLLABLE TIKEUT-U-RIEUL
+B5D2 B460 # HANGUL SYLLABLE TIKEUT-U-MIEUM
+B5D3 B461 # HANGUL SYLLABLE TIKEUT-U-PIEUP
+B5D4 B463 # HANGUL SYLLABLE TIKEUT-U-SIOS
+B5D5 B465 # HANGUL SYLLABLE TIKEUT-U-IEUNG
+B5D6 B46C # HANGUL SYLLABLE TIKEUT-WEO
+B5D7 B480 # HANGUL SYLLABLE TIKEUT-WEO-SSANGSIOS
+B5D8 B488 # HANGUL SYLLABLE TIKEUT-WE
+B5D9 B49D # HANGUL SYLLABLE TIKEUT-WE-IEUNG
+B5DA B4A4 # HANGUL SYLLABLE TIKEUT-WI
+B5DB B4A8 # HANGUL SYLLABLE TIKEUT-WI-NIEUN
+B5DC B4AC # HANGUL SYLLABLE TIKEUT-WI-RIEUL
+B5DD B4B5 # HANGUL SYLLABLE TIKEUT-WI-PIEUP
+B5DE B4B7 # HANGUL SYLLABLE TIKEUT-WI-SIOS
+B5DF B4B9 # HANGUL SYLLABLE TIKEUT-WI-IEUNG
+B5E0 B4C0 # HANGUL SYLLABLE TIKEUT-YU
+B5E1 B4C4 # HANGUL SYLLABLE TIKEUT-YU-NIEUN
+B5E2 B4C8 # HANGUL SYLLABLE TIKEUT-YU-RIEUL
+B5E3 B4D0 # HANGUL SYLLABLE TIKEUT-YU-MIEUM
+B5E4 B4D5 # HANGUL SYLLABLE TIKEUT-YU-IEUNG
+B5E5 B4DC # HANGUL SYLLABLE TIKEUT-EU
+B5E6 B4DD # HANGUL SYLLABLE TIKEUT-EU-KIYEOK
+B5E7 B4E0 # HANGUL SYLLABLE TIKEUT-EU-NIEUN
+B5E8 B4E3 # HANGUL SYLLABLE TIKEUT-EU-TIKEUT
+B5E9 B4E4 # HANGUL SYLLABLE TIKEUT-EU-RIEUL
+B5EA B4E6 # HANGUL SYLLABLE TIKEUT-EU-RIEULMIEUM
+B5EB B4EC # HANGUL SYLLABLE TIKEUT-EU-MIEUM
+B5EC B4ED # HANGUL SYLLABLE TIKEUT-EU-PIEUP
+B5ED B4EF # HANGUL SYLLABLE TIKEUT-EU-SIOS
+B5EE B4F1 # HANGUL SYLLABLE TIKEUT-EU-IEUNG
+B5EF B4F8 # HANGUL SYLLABLE TIKEUT-YI
+B5F0 B514 # HANGUL SYLLABLE TIKEUT-I
+B5F1 B515 # HANGUL SYLLABLE TIKEUT-I-KIYEOK
+B5F2 B518 # HANGUL SYLLABLE TIKEUT-I-NIEUN
+B5F3 B51B # HANGUL SYLLABLE TIKEUT-I-TIKEUT
+B5F4 B51C # HANGUL SYLLABLE TIKEUT-I-RIEUL
+B5F5 B524 # HANGUL SYLLABLE TIKEUT-I-MIEUM
+B5F6 B525 # HANGUL SYLLABLE TIKEUT-I-PIEUP
+B5F7 B527 # HANGUL SYLLABLE TIKEUT-I-SIOS
+B5F8 B528 # HANGUL SYLLABLE TIKEUT-I-SSANGSIOS
+B5F9 B529 # HANGUL SYLLABLE TIKEUT-I-IEUNG
+B5FA B52A # HANGUL SYLLABLE TIKEUT-I-CIEUC
+B5FB B530 # HANGUL SYLLABLE SSANGTIKEUT-A
+B5FC B531 # HANGUL SYLLABLE SSANGTIKEUT-A-KIYEOK
+B5FD B534 # HANGUL SYLLABLE SSANGTIKEUT-A-NIEUN
+B5FE B538 # HANGUL SYLLABLE SSANGTIKEUT-A-RIEUL
+B641 D105 # HANGUL SYLLABLE THIEUTH-YA-RIEULTHIEUTH
+B642 D106 # HANGUL SYLLABLE THIEUTH-YA-RIEULPHIEUPH
+B643 D107 # HANGUL SYLLABLE THIEUTH-YA-RIEULHIEUH
+B644 D108 # HANGUL SYLLABLE THIEUTH-YA-MIEUM
+B645 D109 # HANGUL SYLLABLE THIEUTH-YA-PIEUP
+B646 D10A # HANGUL SYLLABLE THIEUTH-YA-PIEUPSIOS
+B647 D10B # HANGUL SYLLABLE THIEUTH-YA-SIOS
+B648 D10C # HANGUL SYLLABLE THIEUTH-YA-SSANGSIOS
+B649 D10E # HANGUL SYLLABLE THIEUTH-YA-CIEUC
+B64A D10F # HANGUL SYLLABLE THIEUTH-YA-CHIEUCH
+B64B D110 # HANGUL SYLLABLE THIEUTH-YA-KHIEUKH
+B64C D111 # HANGUL SYLLABLE THIEUTH-YA-THIEUTH
+B64D D112 # HANGUL SYLLABLE THIEUTH-YA-PHIEUPH
+B64E D113 # HANGUL SYLLABLE THIEUTH-YA-HIEUH
+B64F D114 # HANGUL SYLLABLE THIEUTH-YAE
+B650 D115 # HANGUL SYLLABLE THIEUTH-YAE-KIYEOK
+B651 D116 # HANGUL SYLLABLE THIEUTH-YAE-SSANGKIYEOK
+B652 D117 # HANGUL SYLLABLE THIEUTH-YAE-KIYEOKSIOS
+B653 D118 # HANGUL SYLLABLE THIEUTH-YAE-NIEUN
+B654 D119 # HANGUL SYLLABLE THIEUTH-YAE-NIEUNCIEUC
+B655 D11A # HANGUL SYLLABLE THIEUTH-YAE-NIEUNHIEUH
+B656 D11B # HANGUL SYLLABLE THIEUTH-YAE-TIKEUT
+B657 D11C # HANGUL SYLLABLE THIEUTH-YAE-RIEUL
+B658 D11D # HANGUL SYLLABLE THIEUTH-YAE-RIEULKIYEOK
+B659 D11E # HANGUL SYLLABLE THIEUTH-YAE-RIEULMIEUM
+B65A D11F # HANGUL SYLLABLE THIEUTH-YAE-RIEULPIEUP
+B661 D120 # HANGUL SYLLABLE THIEUTH-YAE-RIEULSIOS
+B662 D121 # HANGUL SYLLABLE THIEUTH-YAE-RIEULTHIEUTH
+B663 D122 # HANGUL SYLLABLE THIEUTH-YAE-RIEULPHIEUPH
+B664 D123 # HANGUL SYLLABLE THIEUTH-YAE-RIEULHIEUH
+B665 D124 # HANGUL SYLLABLE THIEUTH-YAE-MIEUM
+B666 D125 # HANGUL SYLLABLE THIEUTH-YAE-PIEUP
+B667 D126 # HANGUL SYLLABLE THIEUTH-YAE-PIEUPSIOS
+B668 D127 # HANGUL SYLLABLE THIEUTH-YAE-SIOS
+B669 D128 # HANGUL SYLLABLE THIEUTH-YAE-SSANGSIOS
+B66A D129 # HANGUL SYLLABLE THIEUTH-YAE-IEUNG
+B66B D12A # HANGUL SYLLABLE THIEUTH-YAE-CIEUC
+B66C D12B # HANGUL SYLLABLE THIEUTH-YAE-CHIEUCH
+B66D D12C # HANGUL SYLLABLE THIEUTH-YAE-KHIEUKH
+B66E D12D # HANGUL SYLLABLE THIEUTH-YAE-THIEUTH
+B66F D12E # HANGUL SYLLABLE THIEUTH-YAE-PHIEUPH
+B670 D12F # HANGUL SYLLABLE THIEUTH-YAE-HIEUH
+B671 D132 # HANGUL SYLLABLE THIEUTH-EO-SSANGKIYEOK
+B672 D133 # HANGUL SYLLABLE THIEUTH-EO-KIYEOKSIOS
+B673 D135 # HANGUL SYLLABLE THIEUTH-EO-NIEUNCIEUC
+B674 D136 # HANGUL SYLLABLE THIEUTH-EO-NIEUNHIEUH
+B675 D137 # HANGUL SYLLABLE THIEUTH-EO-TIKEUT
+B676 D139 # HANGUL SYLLABLE THIEUTH-EO-RIEULKIYEOK
+B677 D13B # HANGUL SYLLABLE THIEUTH-EO-RIEULPIEUP
+B678 D13C # HANGUL SYLLABLE THIEUTH-EO-RIEULSIOS
+B679 D13D # HANGUL SYLLABLE THIEUTH-EO-RIEULTHIEUTH
+B67A D13E # HANGUL SYLLABLE THIEUTH-EO-RIEULPHIEUPH
+B681 D13F # HANGUL SYLLABLE THIEUTH-EO-RIEULHIEUH
+B682 D142 # HANGUL SYLLABLE THIEUTH-EO-PIEUPSIOS
+B683 D146 # HANGUL SYLLABLE THIEUTH-EO-CIEUC
+B684 D147 # HANGUL SYLLABLE THIEUTH-EO-CHIEUCH
+B685 D148 # HANGUL SYLLABLE THIEUTH-EO-KHIEUKH
+B686 D149 # HANGUL SYLLABLE THIEUTH-EO-THIEUTH
+B687 D14A # HANGUL SYLLABLE THIEUTH-EO-PHIEUPH
+B688 D14B # HANGUL SYLLABLE THIEUTH-EO-HIEUH
+B689 D14E # HANGUL SYLLABLE THIEUTH-E-SSANGKIYEOK
+B68A D14F # HANGUL SYLLABLE THIEUTH-E-KIYEOKSIOS
+B68B D151 # HANGUL SYLLABLE THIEUTH-E-NIEUNCIEUC
+B68C D152 # HANGUL SYLLABLE THIEUTH-E-NIEUNHIEUH
+B68D D153 # HANGUL SYLLABLE THIEUTH-E-TIKEUT
+B68E D155 # HANGUL SYLLABLE THIEUTH-E-RIEULKIYEOK
+B68F D156 # HANGUL SYLLABLE THIEUTH-E-RIEULMIEUM
+B690 D157 # HANGUL SYLLABLE THIEUTH-E-RIEULPIEUP
+B691 D158 # HANGUL SYLLABLE THIEUTH-E-RIEULSIOS
+B692 D159 # HANGUL SYLLABLE THIEUTH-E-RIEULTHIEUTH
+B693 D15A # HANGUL SYLLABLE THIEUTH-E-RIEULPHIEUPH
+B694 D15B # HANGUL SYLLABLE THIEUTH-E-RIEULHIEUH
+B695 D15E # HANGUL SYLLABLE THIEUTH-E-PIEUPSIOS
+B696 D160 # HANGUL SYLLABLE THIEUTH-E-SSANGSIOS
+B697 D162 # HANGUL SYLLABLE THIEUTH-E-CIEUC
+B698 D163 # HANGUL SYLLABLE THIEUTH-E-CHIEUCH
+B699 D164 # HANGUL SYLLABLE THIEUTH-E-KHIEUKH
+B69A D165 # HANGUL SYLLABLE THIEUTH-E-THIEUTH
+B69B D166 # HANGUL SYLLABLE THIEUTH-E-PHIEUPH
+B69C D167 # HANGUL SYLLABLE THIEUTH-E-HIEUH
+B69D D169 # HANGUL SYLLABLE THIEUTH-YEO-KIYEOK
+B69E D16A # HANGUL SYLLABLE THIEUTH-YEO-SSANGKIYEOK
+B69F D16B # HANGUL SYLLABLE THIEUTH-YEO-KIYEOKSIOS
+B6A0 D16D # HANGUL SYLLABLE THIEUTH-YEO-NIEUNCIEUC
+B6A1 B540 # HANGUL SYLLABLE SSANGTIKEUT-A-MIEUM
+B6A2 B541 # HANGUL SYLLABLE SSANGTIKEUT-A-PIEUP
+B6A3 B543 # HANGUL SYLLABLE SSANGTIKEUT-A-SIOS
+B6A4 B544 # HANGUL SYLLABLE SSANGTIKEUT-A-SSANGSIOS
+B6A5 B545 # HANGUL SYLLABLE SSANGTIKEUT-A-IEUNG
+B6A6 B54B # HANGUL SYLLABLE SSANGTIKEUT-A-HIEUH
+B6A7 B54C # HANGUL SYLLABLE SSANGTIKEUT-AE
+B6A8 B54D # HANGUL SYLLABLE SSANGTIKEUT-AE-KIYEOK
+B6A9 B550 # HANGUL SYLLABLE SSANGTIKEUT-AE-NIEUN
+B6AA B554 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEUL
+B6AB B55C # HANGUL SYLLABLE SSANGTIKEUT-AE-MIEUM
+B6AC B55D # HANGUL SYLLABLE SSANGTIKEUT-AE-PIEUP
+B6AD B55F # HANGUL SYLLABLE SSANGTIKEUT-AE-SIOS
+B6AE B560 # HANGUL SYLLABLE SSANGTIKEUT-AE-SSANGSIOS
+B6AF B561 # HANGUL SYLLABLE SSANGTIKEUT-AE-IEUNG
+B6B0 B5A0 # HANGUL SYLLABLE SSANGTIKEUT-EO
+B6B1 B5A1 # HANGUL SYLLABLE SSANGTIKEUT-EO-KIYEOK
+B6B2 B5A4 # HANGUL SYLLABLE SSANGTIKEUT-EO-NIEUN
+B6B3 B5A8 # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEUL
+B6B4 B5AA # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULMIEUM
+B6B5 B5AB # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULPIEUP
+B6B6 B5B0 # HANGUL SYLLABLE SSANGTIKEUT-EO-MIEUM
+B6B7 B5B1 # HANGUL SYLLABLE SSANGTIKEUT-EO-PIEUP
+B6B8 B5B3 # HANGUL SYLLABLE SSANGTIKEUT-EO-SIOS
+B6B9 B5B4 # HANGUL SYLLABLE SSANGTIKEUT-EO-SSANGSIOS
+B6BA B5B5 # HANGUL SYLLABLE SSANGTIKEUT-EO-IEUNG
+B6BB B5BB # HANGUL SYLLABLE SSANGTIKEUT-EO-HIEUH
+B6BC B5BC # HANGUL SYLLABLE SSANGTIKEUT-E
+B6BD B5BD # HANGUL SYLLABLE SSANGTIKEUT-E-KIYEOK
+B6BE B5C0 # HANGUL SYLLABLE SSANGTIKEUT-E-NIEUN
+B6BF B5C4 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEUL
+B6C0 B5CC # HANGUL SYLLABLE SSANGTIKEUT-E-MIEUM
+B6C1 B5CD # HANGUL SYLLABLE SSANGTIKEUT-E-PIEUP
+B6C2 B5CF # HANGUL SYLLABLE SSANGTIKEUT-E-SIOS
+B6C3 B5D0 # HANGUL SYLLABLE SSANGTIKEUT-E-SSANGSIOS
+B6C4 B5D1 # HANGUL SYLLABLE SSANGTIKEUT-E-IEUNG
+B6C5 B5D8 # HANGUL SYLLABLE SSANGTIKEUT-YEO
+B6C6 B5EC # HANGUL SYLLABLE SSANGTIKEUT-YEO-SSANGSIOS
+B6C7 B610 # HANGUL SYLLABLE SSANGTIKEUT-O
+B6C8 B611 # HANGUL SYLLABLE SSANGTIKEUT-O-KIYEOK
+B6C9 B614 # HANGUL SYLLABLE SSANGTIKEUT-O-NIEUN
+B6CA B618 # HANGUL SYLLABLE SSANGTIKEUT-O-RIEUL
+B6CB B625 # HANGUL SYLLABLE SSANGTIKEUT-O-IEUNG
+B6CC B62C # HANGUL SYLLABLE SSANGTIKEUT-WA
+B6CD B634 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEUL
+B6CE B648 # HANGUL SYLLABLE SSANGTIKEUT-WAE
+B6CF B664 # HANGUL SYLLABLE SSANGTIKEUT-OE
+B6D0 B668 # HANGUL SYLLABLE SSANGTIKEUT-OE-NIEUN
+B6D1 B69C # HANGUL SYLLABLE SSANGTIKEUT-U
+B6D2 B69D # HANGUL SYLLABLE SSANGTIKEUT-U-KIYEOK
+B6D3 B6A0 # HANGUL SYLLABLE SSANGTIKEUT-U-NIEUN
+B6D4 B6A4 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEUL
+B6D5 B6AB # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULHIEUH
+B6D6 B6AC # HANGUL SYLLABLE SSANGTIKEUT-U-MIEUM
+B6D7 B6B1 # HANGUL SYLLABLE SSANGTIKEUT-U-IEUNG
+B6D8 B6D4 # HANGUL SYLLABLE SSANGTIKEUT-WE
+B6D9 B6F0 # HANGUL SYLLABLE SSANGTIKEUT-WI
+B6DA B6F4 # HANGUL SYLLABLE SSANGTIKEUT-WI-NIEUN
+B6DB B6F8 # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEUL
+B6DC B700 # HANGUL SYLLABLE SSANGTIKEUT-WI-MIEUM
+B6DD B701 # HANGUL SYLLABLE SSANGTIKEUT-WI-PIEUP
+B6DE B705 # HANGUL SYLLABLE SSANGTIKEUT-WI-IEUNG
+B6DF B728 # HANGUL SYLLABLE SSANGTIKEUT-EU
+B6E0 B729 # HANGUL SYLLABLE SSANGTIKEUT-EU-KIYEOK
+B6E1 B72C # HANGUL SYLLABLE SSANGTIKEUT-EU-NIEUN
+B6E2 B72F # HANGUL SYLLABLE SSANGTIKEUT-EU-TIKEUT
+B6E3 B730 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEUL
+B6E4 B738 # HANGUL SYLLABLE SSANGTIKEUT-EU-MIEUM
+B6E5 B739 # HANGUL SYLLABLE SSANGTIKEUT-EU-PIEUP
+B6E6 B73B # HANGUL SYLLABLE SSANGTIKEUT-EU-SIOS
+B6E7 B744 # HANGUL SYLLABLE SSANGTIKEUT-YI
+B6E8 B748 # HANGUL SYLLABLE SSANGTIKEUT-YI-NIEUN
+B6E9 B74C # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEUL
+B6EA B754 # HANGUL SYLLABLE SSANGTIKEUT-YI-MIEUM
+B6EB B755 # HANGUL SYLLABLE SSANGTIKEUT-YI-PIEUP
+B6EC B760 # HANGUL SYLLABLE SSANGTIKEUT-I
+B6ED B764 # HANGUL SYLLABLE SSANGTIKEUT-I-NIEUN
+B6EE B768 # HANGUL SYLLABLE SSANGTIKEUT-I-RIEUL
+B6EF B770 # HANGUL SYLLABLE SSANGTIKEUT-I-MIEUM
+B6F0 B771 # HANGUL SYLLABLE SSANGTIKEUT-I-PIEUP
+B6F1 B773 # HANGUL SYLLABLE SSANGTIKEUT-I-SIOS
+B6F2 B775 # HANGUL SYLLABLE SSANGTIKEUT-I-IEUNG
+B6F3 B77C # HANGUL SYLLABLE RIEUL-A
+B6F4 B77D # HANGUL SYLLABLE RIEUL-A-KIYEOK
+B6F5 B780 # HANGUL SYLLABLE RIEUL-A-NIEUN
+B6F6 B784 # HANGUL SYLLABLE RIEUL-A-RIEUL
+B6F7 B78C # HANGUL SYLLABLE RIEUL-A-MIEUM
+B6F8 B78D # HANGUL SYLLABLE RIEUL-A-PIEUP
+B6F9 B78F # HANGUL SYLLABLE RIEUL-A-SIOS
+B6FA B790 # HANGUL SYLLABLE RIEUL-A-SSANGSIOS
+B6FB B791 # HANGUL SYLLABLE RIEUL-A-IEUNG
+B6FC B792 # HANGUL SYLLABLE RIEUL-A-CIEUC
+B6FD B796 # HANGUL SYLLABLE RIEUL-A-PHIEUPH
+B6FE B797 # HANGUL SYLLABLE RIEUL-A-HIEUH
+B741 D16E # HANGUL SYLLABLE THIEUTH-YEO-NIEUNHIEUH
+B742 D16F # HANGUL SYLLABLE THIEUTH-YEO-TIKEUT
+B743 D170 # HANGUL SYLLABLE THIEUTH-YEO-RIEUL
+B744 D171 # HANGUL SYLLABLE THIEUTH-YEO-RIEULKIYEOK
+B745 D172 # HANGUL SYLLABLE THIEUTH-YEO-RIEULMIEUM
+B746 D173 # HANGUL SYLLABLE THIEUTH-YEO-RIEULPIEUP
+B747 D174 # HANGUL SYLLABLE THIEUTH-YEO-RIEULSIOS
+B748 D175 # HANGUL SYLLABLE THIEUTH-YEO-RIEULTHIEUTH
+B749 D176 # HANGUL SYLLABLE THIEUTH-YEO-RIEULPHIEUPH
+B74A D177 # HANGUL SYLLABLE THIEUTH-YEO-RIEULHIEUH
+B74B D178 # HANGUL SYLLABLE THIEUTH-YEO-MIEUM
+B74C D179 # HANGUL SYLLABLE THIEUTH-YEO-PIEUP
+B74D D17A # HANGUL SYLLABLE THIEUTH-YEO-PIEUPSIOS
+B74E D17B # HANGUL SYLLABLE THIEUTH-YEO-SIOS
+B74F D17D # HANGUL SYLLABLE THIEUTH-YEO-IEUNG
+B750 D17E # HANGUL SYLLABLE THIEUTH-YEO-CIEUC
+B751 D17F # HANGUL SYLLABLE THIEUTH-YEO-CHIEUCH
+B752 D180 # HANGUL SYLLABLE THIEUTH-YEO-KHIEUKH
+B753 D181 # HANGUL SYLLABLE THIEUTH-YEO-THIEUTH
+B754 D182 # HANGUL SYLLABLE THIEUTH-YEO-PHIEUPH
+B755 D183 # HANGUL SYLLABLE THIEUTH-YEO-HIEUH
+B756 D185 # HANGUL SYLLABLE THIEUTH-YE-KIYEOK
+B757 D186 # HANGUL SYLLABLE THIEUTH-YE-SSANGKIYEOK
+B758 D187 # HANGUL SYLLABLE THIEUTH-YE-KIYEOKSIOS
+B759 D189 # HANGUL SYLLABLE THIEUTH-YE-NIEUNCIEUC
+B75A D18A # HANGUL SYLLABLE THIEUTH-YE-NIEUNHIEUH
+B761 D18B # HANGUL SYLLABLE THIEUTH-YE-TIKEUT
+B762 D18C # HANGUL SYLLABLE THIEUTH-YE-RIEUL
+B763 D18D # HANGUL SYLLABLE THIEUTH-YE-RIEULKIYEOK
+B764 D18E # HANGUL SYLLABLE THIEUTH-YE-RIEULMIEUM
+B765 D18F # HANGUL SYLLABLE THIEUTH-YE-RIEULPIEUP
+B766 D190 # HANGUL SYLLABLE THIEUTH-YE-RIEULSIOS
+B767 D191 # HANGUL SYLLABLE THIEUTH-YE-RIEULTHIEUTH
+B768 D192 # HANGUL SYLLABLE THIEUTH-YE-RIEULPHIEUPH
+B769 D193 # HANGUL SYLLABLE THIEUTH-YE-RIEULHIEUH
+B76A D194 # HANGUL SYLLABLE THIEUTH-YE-MIEUM
+B76B D195 # HANGUL SYLLABLE THIEUTH-YE-PIEUP
+B76C D196 # HANGUL SYLLABLE THIEUTH-YE-PIEUPSIOS
+B76D D197 # HANGUL SYLLABLE THIEUTH-YE-SIOS
+B76E D198 # HANGUL SYLLABLE THIEUTH-YE-SSANGSIOS
+B76F D199 # HANGUL SYLLABLE THIEUTH-YE-IEUNG
+B770 D19A # HANGUL SYLLABLE THIEUTH-YE-CIEUC
+B771 D19B # HANGUL SYLLABLE THIEUTH-YE-CHIEUCH
+B772 D19C # HANGUL SYLLABLE THIEUTH-YE-KHIEUKH
+B773 D19D # HANGUL SYLLABLE THIEUTH-YE-THIEUTH
+B774 D19E # HANGUL SYLLABLE THIEUTH-YE-PHIEUPH
+B775 D19F # HANGUL SYLLABLE THIEUTH-YE-HIEUH
+B776 D1A2 # HANGUL SYLLABLE THIEUTH-O-SSANGKIYEOK
+B777 D1A3 # HANGUL SYLLABLE THIEUTH-O-KIYEOKSIOS
+B778 D1A5 # HANGUL SYLLABLE THIEUTH-O-NIEUNCIEUC
+B779 D1A6 # HANGUL SYLLABLE THIEUTH-O-NIEUNHIEUH
+B77A D1A7 # HANGUL SYLLABLE THIEUTH-O-TIKEUT
+B781 D1A9 # HANGUL SYLLABLE THIEUTH-O-RIEULKIYEOK
+B782 D1AA # HANGUL SYLLABLE THIEUTH-O-RIEULMIEUM
+B783 D1AB # HANGUL SYLLABLE THIEUTH-O-RIEULPIEUP
+B784 D1AC # HANGUL SYLLABLE THIEUTH-O-RIEULSIOS
+B785 D1AD # HANGUL SYLLABLE THIEUTH-O-RIEULTHIEUTH
+B786 D1AE # HANGUL SYLLABLE THIEUTH-O-RIEULPHIEUPH
+B787 D1AF # HANGUL SYLLABLE THIEUTH-O-RIEULHIEUH
+B788 D1B2 # HANGUL SYLLABLE THIEUTH-O-PIEUPSIOS
+B789 D1B4 # HANGUL SYLLABLE THIEUTH-O-SSANGSIOS
+B78A D1B6 # HANGUL SYLLABLE THIEUTH-O-CIEUC
+B78B D1B7 # HANGUL SYLLABLE THIEUTH-O-CHIEUCH
+B78C D1B8 # HANGUL SYLLABLE THIEUTH-O-KHIEUKH
+B78D D1B9 # HANGUL SYLLABLE THIEUTH-O-THIEUTH
+B78E D1BB # HANGUL SYLLABLE THIEUTH-O-HIEUH
+B78F D1BD # HANGUL SYLLABLE THIEUTH-WA-KIYEOK
+B790 D1BE # HANGUL SYLLABLE THIEUTH-WA-SSANGKIYEOK
+B791 D1BF # HANGUL SYLLABLE THIEUTH-WA-KIYEOKSIOS
+B792 D1C1 # HANGUL SYLLABLE THIEUTH-WA-NIEUNCIEUC
+B793 D1C2 # HANGUL SYLLABLE THIEUTH-WA-NIEUNHIEUH
+B794 D1C3 # HANGUL SYLLABLE THIEUTH-WA-TIKEUT
+B795 D1C4 # HANGUL SYLLABLE THIEUTH-WA-RIEUL
+B796 D1C5 # HANGUL SYLLABLE THIEUTH-WA-RIEULKIYEOK
+B797 D1C6 # HANGUL SYLLABLE THIEUTH-WA-RIEULMIEUM
+B798 D1C7 # HANGUL SYLLABLE THIEUTH-WA-RIEULPIEUP
+B799 D1C8 # HANGUL SYLLABLE THIEUTH-WA-RIEULSIOS
+B79A D1C9 # HANGUL SYLLABLE THIEUTH-WA-RIEULTHIEUTH
+B79B D1CA # HANGUL SYLLABLE THIEUTH-WA-RIEULPHIEUPH
+B79C D1CB # HANGUL SYLLABLE THIEUTH-WA-RIEULHIEUH
+B79D D1CC # HANGUL SYLLABLE THIEUTH-WA-MIEUM
+B79E D1CD # HANGUL SYLLABLE THIEUTH-WA-PIEUP
+B79F D1CE # HANGUL SYLLABLE THIEUTH-WA-PIEUPSIOS
+B7A0 D1CF # HANGUL SYLLABLE THIEUTH-WA-SIOS
+B7A1 B798 # HANGUL SYLLABLE RIEUL-AE
+B7A2 B799 # HANGUL SYLLABLE RIEUL-AE-KIYEOK
+B7A3 B79C # HANGUL SYLLABLE RIEUL-AE-NIEUN
+B7A4 B7A0 # HANGUL SYLLABLE RIEUL-AE-RIEUL
+B7A5 B7A8 # HANGUL SYLLABLE RIEUL-AE-MIEUM
+B7A6 B7A9 # HANGUL SYLLABLE RIEUL-AE-PIEUP
+B7A7 B7AB # HANGUL SYLLABLE RIEUL-AE-SIOS
+B7A8 B7AC # HANGUL SYLLABLE RIEUL-AE-SSANGSIOS
+B7A9 B7AD # HANGUL SYLLABLE RIEUL-AE-IEUNG
+B7AA B7B4 # HANGUL SYLLABLE RIEUL-YA
+B7AB B7B5 # HANGUL SYLLABLE RIEUL-YA-KIYEOK
+B7AC B7B8 # HANGUL SYLLABLE RIEUL-YA-NIEUN
+B7AD B7C7 # HANGUL SYLLABLE RIEUL-YA-SIOS
+B7AE B7C9 # HANGUL SYLLABLE RIEUL-YA-IEUNG
+B7AF B7EC # HANGUL SYLLABLE RIEUL-EO
+B7B0 B7ED # HANGUL SYLLABLE RIEUL-EO-KIYEOK
+B7B1 B7F0 # HANGUL SYLLABLE RIEUL-EO-NIEUN
+B7B2 B7F4 # HANGUL SYLLABLE RIEUL-EO-RIEUL
+B7B3 B7FC # HANGUL SYLLABLE RIEUL-EO-MIEUM
+B7B4 B7FD # HANGUL SYLLABLE RIEUL-EO-PIEUP
+B7B5 B7FF # HANGUL SYLLABLE RIEUL-EO-SIOS
+B7B6 B800 # HANGUL SYLLABLE RIEUL-EO-SSANGSIOS
+B7B7 B801 # HANGUL SYLLABLE RIEUL-EO-IEUNG
+B7B8 B807 # HANGUL SYLLABLE RIEUL-EO-HIEUH
+B7B9 B808 # HANGUL SYLLABLE RIEUL-E
+B7BA B809 # HANGUL SYLLABLE RIEUL-E-KIYEOK
+B7BB B80C # HANGUL SYLLABLE RIEUL-E-NIEUN
+B7BC B810 # HANGUL SYLLABLE RIEUL-E-RIEUL
+B7BD B818 # HANGUL SYLLABLE RIEUL-E-MIEUM
+B7BE B819 # HANGUL SYLLABLE RIEUL-E-PIEUP
+B7BF B81B # HANGUL SYLLABLE RIEUL-E-SIOS
+B7C0 B81D # HANGUL SYLLABLE RIEUL-E-IEUNG
+B7C1 B824 # HANGUL SYLLABLE RIEUL-YEO
+B7C2 B825 # HANGUL SYLLABLE RIEUL-YEO-KIYEOK
+B7C3 B828 # HANGUL SYLLABLE RIEUL-YEO-NIEUN
+B7C4 B82C # HANGUL SYLLABLE RIEUL-YEO-RIEUL
+B7C5 B834 # HANGUL SYLLABLE RIEUL-YEO-MIEUM
+B7C6 B835 # HANGUL SYLLABLE RIEUL-YEO-PIEUP
+B7C7 B837 # HANGUL SYLLABLE RIEUL-YEO-SIOS
+B7C8 B838 # HANGUL SYLLABLE RIEUL-YEO-SSANGSIOS
+B7C9 B839 # HANGUL SYLLABLE RIEUL-YEO-IEUNG
+B7CA B840 # HANGUL SYLLABLE RIEUL-YE
+B7CB B844 # HANGUL SYLLABLE RIEUL-YE-NIEUN
+B7CC B851 # HANGUL SYLLABLE RIEUL-YE-PIEUP
+B7CD B853 # HANGUL SYLLABLE RIEUL-YE-SIOS
+B7CE B85C # HANGUL SYLLABLE RIEUL-O
+B7CF B85D # HANGUL SYLLABLE RIEUL-O-KIYEOK
+B7D0 B860 # HANGUL SYLLABLE RIEUL-O-NIEUN
+B7D1 B864 # HANGUL SYLLABLE RIEUL-O-RIEUL
+B7D2 B86C # HANGUL SYLLABLE RIEUL-O-MIEUM
+B7D3 B86D # HANGUL SYLLABLE RIEUL-O-PIEUP
+B7D4 B86F # HANGUL SYLLABLE RIEUL-O-SIOS
+B7D5 B871 # HANGUL SYLLABLE RIEUL-O-IEUNG
+B7D6 B878 # HANGUL SYLLABLE RIEUL-WA
+B7D7 B87C # HANGUL SYLLABLE RIEUL-WA-NIEUN
+B7D8 B88D # HANGUL SYLLABLE RIEUL-WA-IEUNG
+B7D9 B8A8 # HANGUL SYLLABLE RIEUL-WAE-SSANGSIOS
+B7DA B8B0 # HANGUL SYLLABLE RIEUL-OE
+B7DB B8B4 # HANGUL SYLLABLE RIEUL-OE-NIEUN
+B7DC B8B8 # HANGUL SYLLABLE RIEUL-OE-RIEUL
+B7DD B8C0 # HANGUL SYLLABLE RIEUL-OE-MIEUM
+B7DE B8C1 # HANGUL SYLLABLE RIEUL-OE-PIEUP
+B7DF B8C3 # HANGUL SYLLABLE RIEUL-OE-SIOS
+B7E0 B8C5 # HANGUL SYLLABLE RIEUL-OE-IEUNG
+B7E1 B8CC # HANGUL SYLLABLE RIEUL-YO
+B7E2 B8D0 # HANGUL SYLLABLE RIEUL-YO-NIEUN
+B7E3 B8D4 # HANGUL SYLLABLE RIEUL-YO-RIEUL
+B7E4 B8DD # HANGUL SYLLABLE RIEUL-YO-PIEUP
+B7E5 B8DF # HANGUL SYLLABLE RIEUL-YO-SIOS
+B7E6 B8E1 # HANGUL SYLLABLE RIEUL-YO-IEUNG
+B7E7 B8E8 # HANGUL SYLLABLE RIEUL-U
+B7E8 B8E9 # HANGUL SYLLABLE RIEUL-U-KIYEOK
+B7E9 B8EC # HANGUL SYLLABLE RIEUL-U-NIEUN
+B7EA B8F0 # HANGUL SYLLABLE RIEUL-U-RIEUL
+B7EB B8F8 # HANGUL SYLLABLE RIEUL-U-MIEUM
+B7EC B8F9 # HANGUL SYLLABLE RIEUL-U-PIEUP
+B7ED B8FB # HANGUL SYLLABLE RIEUL-U-SIOS
+B7EE B8FD # HANGUL SYLLABLE RIEUL-U-IEUNG
+B7EF B904 # HANGUL SYLLABLE RIEUL-WEO
+B7F0 B918 # HANGUL SYLLABLE RIEUL-WEO-SSANGSIOS
+B7F1 B920 # HANGUL SYLLABLE RIEUL-WE
+B7F2 B93C # HANGUL SYLLABLE RIEUL-WI
+B7F3 B93D # HANGUL SYLLABLE RIEUL-WI-KIYEOK
+B7F4 B940 # HANGUL SYLLABLE RIEUL-WI-NIEUN
+B7F5 B944 # HANGUL SYLLABLE RIEUL-WI-RIEUL
+B7F6 B94C # HANGUL SYLLABLE RIEUL-WI-MIEUM
+B7F7 B94F # HANGUL SYLLABLE RIEUL-WI-SIOS
+B7F8 B951 # HANGUL SYLLABLE RIEUL-WI-IEUNG
+B7F9 B958 # HANGUL SYLLABLE RIEUL-YU
+B7FA B959 # HANGUL SYLLABLE RIEUL-YU-KIYEOK
+B7FB B95C # HANGUL SYLLABLE RIEUL-YU-NIEUN
+B7FC B960 # HANGUL SYLLABLE RIEUL-YU-RIEUL
+B7FD B968 # HANGUL SYLLABLE RIEUL-YU-MIEUM
+B7FE B969 # HANGUL SYLLABLE RIEUL-YU-PIEUP
+B841 D1D0 # HANGUL SYLLABLE THIEUTH-WA-SSANGSIOS
+B842 D1D1 # HANGUL SYLLABLE THIEUTH-WA-IEUNG
+B843 D1D2 # HANGUL SYLLABLE THIEUTH-WA-CIEUC
+B844 D1D3 # HANGUL SYLLABLE THIEUTH-WA-CHIEUCH
+B845 D1D4 # HANGUL SYLLABLE THIEUTH-WA-KHIEUKH
+B846 D1D5 # HANGUL SYLLABLE THIEUTH-WA-THIEUTH
+B847 D1D6 # HANGUL SYLLABLE THIEUTH-WA-PHIEUPH
+B848 D1D7 # HANGUL SYLLABLE THIEUTH-WA-HIEUH
+B849 D1D9 # HANGUL SYLLABLE THIEUTH-WAE-KIYEOK
+B84A D1DA # HANGUL SYLLABLE THIEUTH-WAE-SSANGKIYEOK
+B84B D1DB # HANGUL SYLLABLE THIEUTH-WAE-KIYEOKSIOS
+B84C D1DC # HANGUL SYLLABLE THIEUTH-WAE-NIEUN
+B84D D1DD # HANGUL SYLLABLE THIEUTH-WAE-NIEUNCIEUC
+B84E D1DE # HANGUL SYLLABLE THIEUTH-WAE-NIEUNHIEUH
+B84F D1DF # HANGUL SYLLABLE THIEUTH-WAE-TIKEUT
+B850 D1E0 # HANGUL SYLLABLE THIEUTH-WAE-RIEUL
+B851 D1E1 # HANGUL SYLLABLE THIEUTH-WAE-RIEULKIYEOK
+B852 D1E2 # HANGUL SYLLABLE THIEUTH-WAE-RIEULMIEUM
+B853 D1E3 # HANGUL SYLLABLE THIEUTH-WAE-RIEULPIEUP
+B854 D1E4 # HANGUL SYLLABLE THIEUTH-WAE-RIEULSIOS
+B855 D1E5 # HANGUL SYLLABLE THIEUTH-WAE-RIEULTHIEUTH
+B856 D1E6 # HANGUL SYLLABLE THIEUTH-WAE-RIEULPHIEUPH
+B857 D1E7 # HANGUL SYLLABLE THIEUTH-WAE-RIEULHIEUH
+B858 D1E8 # HANGUL SYLLABLE THIEUTH-WAE-MIEUM
+B859 D1E9 # HANGUL SYLLABLE THIEUTH-WAE-PIEUP
+B85A D1EA # HANGUL SYLLABLE THIEUTH-WAE-PIEUPSIOS
+B861 D1EB # HANGUL SYLLABLE THIEUTH-WAE-SIOS
+B862 D1EC # HANGUL SYLLABLE THIEUTH-WAE-SSANGSIOS
+B863 D1ED # HANGUL SYLLABLE THIEUTH-WAE-IEUNG
+B864 D1EE # HANGUL SYLLABLE THIEUTH-WAE-CIEUC
+B865 D1EF # HANGUL SYLLABLE THIEUTH-WAE-CHIEUCH
+B866 D1F0 # HANGUL SYLLABLE THIEUTH-WAE-KHIEUKH
+B867 D1F1 # HANGUL SYLLABLE THIEUTH-WAE-THIEUTH
+B868 D1F2 # HANGUL SYLLABLE THIEUTH-WAE-PHIEUPH
+B869 D1F3 # HANGUL SYLLABLE THIEUTH-WAE-HIEUH
+B86A D1F5 # HANGUL SYLLABLE THIEUTH-OE-KIYEOK
+B86B D1F6 # HANGUL SYLLABLE THIEUTH-OE-SSANGKIYEOK
+B86C D1F7 # HANGUL SYLLABLE THIEUTH-OE-KIYEOKSIOS
+B86D D1F9 # HANGUL SYLLABLE THIEUTH-OE-NIEUNCIEUC
+B86E D1FA # HANGUL SYLLABLE THIEUTH-OE-NIEUNHIEUH
+B86F D1FB # HANGUL SYLLABLE THIEUTH-OE-TIKEUT
+B870 D1FC # HANGUL SYLLABLE THIEUTH-OE-RIEUL
+B871 D1FD # HANGUL SYLLABLE THIEUTH-OE-RIEULKIYEOK
+B872 D1FE # HANGUL SYLLABLE THIEUTH-OE-RIEULMIEUM
+B873 D1FF # HANGUL SYLLABLE THIEUTH-OE-RIEULPIEUP
+B874 D200 # HANGUL SYLLABLE THIEUTH-OE-RIEULSIOS
+B875 D201 # HANGUL SYLLABLE THIEUTH-OE-RIEULTHIEUTH
+B876 D202 # HANGUL SYLLABLE THIEUTH-OE-RIEULPHIEUPH
+B877 D203 # HANGUL SYLLABLE THIEUTH-OE-RIEULHIEUH
+B878 D204 # HANGUL SYLLABLE THIEUTH-OE-MIEUM
+B879 D205 # HANGUL SYLLABLE THIEUTH-OE-PIEUP
+B87A D206 # HANGUL SYLLABLE THIEUTH-OE-PIEUPSIOS
+B881 D208 # HANGUL SYLLABLE THIEUTH-OE-SSANGSIOS
+B882 D20A # HANGUL SYLLABLE THIEUTH-OE-CIEUC
+B883 D20B # HANGUL SYLLABLE THIEUTH-OE-CHIEUCH
+B884 D20C # HANGUL SYLLABLE THIEUTH-OE-KHIEUKH
+B885 D20D # HANGUL SYLLABLE THIEUTH-OE-THIEUTH
+B886 D20E # HANGUL SYLLABLE THIEUTH-OE-PHIEUPH
+B887 D20F # HANGUL SYLLABLE THIEUTH-OE-HIEUH
+B888 D211 # HANGUL SYLLABLE THIEUTH-YO-KIYEOK
+B889 D212 # HANGUL SYLLABLE THIEUTH-YO-SSANGKIYEOK
+B88A D213 # HANGUL SYLLABLE THIEUTH-YO-KIYEOKSIOS
+B88B D214 # HANGUL SYLLABLE THIEUTH-YO-NIEUN
+B88C D215 # HANGUL SYLLABLE THIEUTH-YO-NIEUNCIEUC
+B88D D216 # HANGUL SYLLABLE THIEUTH-YO-NIEUNHIEUH
+B88E D217 # HANGUL SYLLABLE THIEUTH-YO-TIKEUT
+B88F D218 # HANGUL SYLLABLE THIEUTH-YO-RIEUL
+B890 D219 # HANGUL SYLLABLE THIEUTH-YO-RIEULKIYEOK
+B891 D21A # HANGUL SYLLABLE THIEUTH-YO-RIEULMIEUM
+B892 D21B # HANGUL SYLLABLE THIEUTH-YO-RIEULPIEUP
+B893 D21C # HANGUL SYLLABLE THIEUTH-YO-RIEULSIOS
+B894 D21D # HANGUL SYLLABLE THIEUTH-YO-RIEULTHIEUTH
+B895 D21E # HANGUL SYLLABLE THIEUTH-YO-RIEULPHIEUPH
+B896 D21F # HANGUL SYLLABLE THIEUTH-YO-RIEULHIEUH
+B897 D220 # HANGUL SYLLABLE THIEUTH-YO-MIEUM
+B898 D221 # HANGUL SYLLABLE THIEUTH-YO-PIEUP
+B899 D222 # HANGUL SYLLABLE THIEUTH-YO-PIEUPSIOS
+B89A D223 # HANGUL SYLLABLE THIEUTH-YO-SIOS
+B89B D224 # HANGUL SYLLABLE THIEUTH-YO-SSANGSIOS
+B89C D225 # HANGUL SYLLABLE THIEUTH-YO-IEUNG
+B89D D226 # HANGUL SYLLABLE THIEUTH-YO-CIEUC
+B89E D227 # HANGUL SYLLABLE THIEUTH-YO-CHIEUCH
+B89F D228 # HANGUL SYLLABLE THIEUTH-YO-KHIEUKH
+B8A0 D229 # HANGUL SYLLABLE THIEUTH-YO-THIEUTH
+B8A1 B96B # HANGUL SYLLABLE RIEUL-YU-SIOS
+B8A2 B96D # HANGUL SYLLABLE RIEUL-YU-IEUNG
+B8A3 B974 # HANGUL SYLLABLE RIEUL-EU
+B8A4 B975 # HANGUL SYLLABLE RIEUL-EU-KIYEOK
+B8A5 B978 # HANGUL SYLLABLE RIEUL-EU-NIEUN
+B8A6 B97C # HANGUL SYLLABLE RIEUL-EU-RIEUL
+B8A7 B984 # HANGUL SYLLABLE RIEUL-EU-MIEUM
+B8A8 B985 # HANGUL SYLLABLE RIEUL-EU-PIEUP
+B8A9 B987 # HANGUL SYLLABLE RIEUL-EU-SIOS
+B8AA B989 # HANGUL SYLLABLE RIEUL-EU-IEUNG
+B8AB B98A # HANGUL SYLLABLE RIEUL-EU-CIEUC
+B8AC B98D # HANGUL SYLLABLE RIEUL-EU-THIEUTH
+B8AD B98E # HANGUL SYLLABLE RIEUL-EU-PHIEUPH
+B8AE B9AC # HANGUL SYLLABLE RIEUL-I
+B8AF B9AD # HANGUL SYLLABLE RIEUL-I-KIYEOK
+B8B0 B9B0 # HANGUL SYLLABLE RIEUL-I-NIEUN
+B8B1 B9B4 # HANGUL SYLLABLE RIEUL-I-RIEUL
+B8B2 B9BC # HANGUL SYLLABLE RIEUL-I-MIEUM
+B8B3 B9BD # HANGUL SYLLABLE RIEUL-I-PIEUP
+B8B4 B9BF # HANGUL SYLLABLE RIEUL-I-SIOS
+B8B5 B9C1 # HANGUL SYLLABLE RIEUL-I-IEUNG
+B8B6 B9C8 # HANGUL SYLLABLE MIEUM-A
+B8B7 B9C9 # HANGUL SYLLABLE MIEUM-A-KIYEOK
+B8B8 B9CC # HANGUL SYLLABLE MIEUM-A-NIEUN
+B8B9 B9CE # HANGUL SYLLABLE MIEUM-A-NIEUNHIEUH
+B8BA B9CF # HANGUL SYLLABLE MIEUM-A-TIKEUT
+B8BB B9D0 # HANGUL SYLLABLE MIEUM-A-RIEUL
+B8BC B9D1 # HANGUL SYLLABLE MIEUM-A-RIEULKIYEOK
+B8BD B9D2 # HANGUL SYLLABLE MIEUM-A-RIEULMIEUM
+B8BE B9D8 # HANGUL SYLLABLE MIEUM-A-MIEUM
+B8BF B9D9 # HANGUL SYLLABLE MIEUM-A-PIEUP
+B8C0 B9DB # HANGUL SYLLABLE MIEUM-A-SIOS
+B8C1 B9DD # HANGUL SYLLABLE MIEUM-A-IEUNG
+B8C2 B9DE # HANGUL SYLLABLE MIEUM-A-CIEUC
+B8C3 B9E1 # HANGUL SYLLABLE MIEUM-A-THIEUTH
+B8C4 B9E3 # HANGUL SYLLABLE MIEUM-A-HIEUH
+B8C5 B9E4 # HANGUL SYLLABLE MIEUM-AE
+B8C6 B9E5 # HANGUL SYLLABLE MIEUM-AE-KIYEOK
+B8C7 B9E8 # HANGUL SYLLABLE MIEUM-AE-NIEUN
+B8C8 B9EC # HANGUL SYLLABLE MIEUM-AE-RIEUL
+B8C9 B9F4 # HANGUL SYLLABLE MIEUM-AE-MIEUM
+B8CA B9F5 # HANGUL SYLLABLE MIEUM-AE-PIEUP
+B8CB B9F7 # HANGUL SYLLABLE MIEUM-AE-SIOS
+B8CC B9F8 # HANGUL SYLLABLE MIEUM-AE-SSANGSIOS
+B8CD B9F9 # HANGUL SYLLABLE MIEUM-AE-IEUNG
+B8CE B9FA # HANGUL SYLLABLE MIEUM-AE-CIEUC
+B8CF BA00 # HANGUL SYLLABLE MIEUM-YA
+B8D0 BA01 # HANGUL SYLLABLE MIEUM-YA-KIYEOK
+B8D1 BA08 # HANGUL SYLLABLE MIEUM-YA-RIEUL
+B8D2 BA15 # HANGUL SYLLABLE MIEUM-YA-IEUNG
+B8D3 BA38 # HANGUL SYLLABLE MIEUM-EO
+B8D4 BA39 # HANGUL SYLLABLE MIEUM-EO-KIYEOK
+B8D5 BA3C # HANGUL SYLLABLE MIEUM-EO-NIEUN
+B8D6 BA40 # HANGUL SYLLABLE MIEUM-EO-RIEUL
+B8D7 BA42 # HANGUL SYLLABLE MIEUM-EO-RIEULMIEUM
+B8D8 BA48 # HANGUL SYLLABLE MIEUM-EO-MIEUM
+B8D9 BA49 # HANGUL SYLLABLE MIEUM-EO-PIEUP
+B8DA BA4B # HANGUL SYLLABLE MIEUM-EO-SIOS
+B8DB BA4D # HANGUL SYLLABLE MIEUM-EO-IEUNG
+B8DC BA4E # HANGUL SYLLABLE MIEUM-EO-CIEUC
+B8DD BA53 # HANGUL SYLLABLE MIEUM-EO-HIEUH
+B8DE BA54 # HANGUL SYLLABLE MIEUM-E
+B8DF BA55 # HANGUL SYLLABLE MIEUM-E-KIYEOK
+B8E0 BA58 # HANGUL SYLLABLE MIEUM-E-NIEUN
+B8E1 BA5C # HANGUL SYLLABLE MIEUM-E-RIEUL
+B8E2 BA64 # HANGUL SYLLABLE MIEUM-E-MIEUM
+B8E3 BA65 # HANGUL SYLLABLE MIEUM-E-PIEUP
+B8E4 BA67 # HANGUL SYLLABLE MIEUM-E-SIOS
+B8E5 BA68 # HANGUL SYLLABLE MIEUM-E-SSANGSIOS
+B8E6 BA69 # HANGUL SYLLABLE MIEUM-E-IEUNG
+B8E7 BA70 # HANGUL SYLLABLE MIEUM-YEO
+B8E8 BA71 # HANGUL SYLLABLE MIEUM-YEO-KIYEOK
+B8E9 BA74 # HANGUL SYLLABLE MIEUM-YEO-NIEUN
+B8EA BA78 # HANGUL SYLLABLE MIEUM-YEO-RIEUL
+B8EB BA83 # HANGUL SYLLABLE MIEUM-YEO-SIOS
+B8EC BA84 # HANGUL SYLLABLE MIEUM-YEO-SSANGSIOS
+B8ED BA85 # HANGUL SYLLABLE MIEUM-YEO-IEUNG
+B8EE BA87 # HANGUL SYLLABLE MIEUM-YEO-CHIEUCH
+B8EF BA8C # HANGUL SYLLABLE MIEUM-YE
+B8F0 BAA8 # HANGUL SYLLABLE MIEUM-O
+B8F1 BAA9 # HANGUL SYLLABLE MIEUM-O-KIYEOK
+B8F2 BAAB # HANGUL SYLLABLE MIEUM-O-KIYEOKSIOS
+B8F3 BAAC # HANGUL SYLLABLE MIEUM-O-NIEUN
+B8F4 BAB0 # HANGUL SYLLABLE MIEUM-O-RIEUL
+B8F5 BAB2 # HANGUL SYLLABLE MIEUM-O-RIEULMIEUM
+B8F6 BAB8 # HANGUL SYLLABLE MIEUM-O-MIEUM
+B8F7 BAB9 # HANGUL SYLLABLE MIEUM-O-PIEUP
+B8F8 BABB # HANGUL SYLLABLE MIEUM-O-SIOS
+B8F9 BABD # HANGUL SYLLABLE MIEUM-O-IEUNG
+B8FA BAC4 # HANGUL SYLLABLE MIEUM-WA
+B8FB BAC8 # HANGUL SYLLABLE MIEUM-WA-NIEUN
+B8FC BAD8 # HANGUL SYLLABLE MIEUM-WA-SSANGSIOS
+B8FD BAD9 # HANGUL SYLLABLE MIEUM-WA-IEUNG
+B8FE BAFC # HANGUL SYLLABLE MIEUM-OE
+B941 D22A # HANGUL SYLLABLE THIEUTH-YO-PHIEUPH
+B942 D22B # HANGUL SYLLABLE THIEUTH-YO-HIEUH
+B943 D22E # HANGUL SYLLABLE THIEUTH-U-SSANGKIYEOK
+B944 D22F # HANGUL SYLLABLE THIEUTH-U-KIYEOKSIOS
+B945 D231 # HANGUL SYLLABLE THIEUTH-U-NIEUNCIEUC
+B946 D232 # HANGUL SYLLABLE THIEUTH-U-NIEUNHIEUH
+B947 D233 # HANGUL SYLLABLE THIEUTH-U-TIKEUT
+B948 D235 # HANGUL SYLLABLE THIEUTH-U-RIEULKIYEOK
+B949 D236 # HANGUL SYLLABLE THIEUTH-U-RIEULMIEUM
+B94A D237 # HANGUL SYLLABLE THIEUTH-U-RIEULPIEUP
+B94B D238 # HANGUL SYLLABLE THIEUTH-U-RIEULSIOS
+B94C D239 # HANGUL SYLLABLE THIEUTH-U-RIEULTHIEUTH
+B94D D23A # HANGUL SYLLABLE THIEUTH-U-RIEULPHIEUPH
+B94E D23B # HANGUL SYLLABLE THIEUTH-U-RIEULHIEUH
+B94F D23E # HANGUL SYLLABLE THIEUTH-U-PIEUPSIOS
+B950 D240 # HANGUL SYLLABLE THIEUTH-U-SSANGSIOS
+B951 D242 # HANGUL SYLLABLE THIEUTH-U-CIEUC
+B952 D243 # HANGUL SYLLABLE THIEUTH-U-CHIEUCH
+B953 D244 # HANGUL SYLLABLE THIEUTH-U-KHIEUKH
+B954 D245 # HANGUL SYLLABLE THIEUTH-U-THIEUTH
+B955 D246 # HANGUL SYLLABLE THIEUTH-U-PHIEUPH
+B956 D247 # HANGUL SYLLABLE THIEUTH-U-HIEUH
+B957 D249 # HANGUL SYLLABLE THIEUTH-WEO-KIYEOK
+B958 D24A # HANGUL SYLLABLE THIEUTH-WEO-SSANGKIYEOK
+B959 D24B # HANGUL SYLLABLE THIEUTH-WEO-KIYEOKSIOS
+B95A D24C # HANGUL SYLLABLE THIEUTH-WEO-NIEUN
+B961 D24D # HANGUL SYLLABLE THIEUTH-WEO-NIEUNCIEUC
+B962 D24E # HANGUL SYLLABLE THIEUTH-WEO-NIEUNHIEUH
+B963 D24F # HANGUL SYLLABLE THIEUTH-WEO-TIKEUT
+B964 D250 # HANGUL SYLLABLE THIEUTH-WEO-RIEUL
+B965 D251 # HANGUL SYLLABLE THIEUTH-WEO-RIEULKIYEOK
+B966 D252 # HANGUL SYLLABLE THIEUTH-WEO-RIEULMIEUM
+B967 D253 # HANGUL SYLLABLE THIEUTH-WEO-RIEULPIEUP
+B968 D254 # HANGUL SYLLABLE THIEUTH-WEO-RIEULSIOS
+B969 D255 # HANGUL SYLLABLE THIEUTH-WEO-RIEULTHIEUTH
+B96A D256 # HANGUL SYLLABLE THIEUTH-WEO-RIEULPHIEUPH
+B96B D257 # HANGUL SYLLABLE THIEUTH-WEO-RIEULHIEUH
+B96C D258 # HANGUL SYLLABLE THIEUTH-WEO-MIEUM
+B96D D259 # HANGUL SYLLABLE THIEUTH-WEO-PIEUP
+B96E D25A # HANGUL SYLLABLE THIEUTH-WEO-PIEUPSIOS
+B96F D25B # HANGUL SYLLABLE THIEUTH-WEO-SIOS
+B970 D25D # HANGUL SYLLABLE THIEUTH-WEO-IEUNG
+B971 D25E # HANGUL SYLLABLE THIEUTH-WEO-CIEUC
+B972 D25F # HANGUL SYLLABLE THIEUTH-WEO-CHIEUCH
+B973 D260 # HANGUL SYLLABLE THIEUTH-WEO-KHIEUKH
+B974 D261 # HANGUL SYLLABLE THIEUTH-WEO-THIEUTH
+B975 D262 # HANGUL SYLLABLE THIEUTH-WEO-PHIEUPH
+B976 D263 # HANGUL SYLLABLE THIEUTH-WEO-HIEUH
+B977 D265 # HANGUL SYLLABLE THIEUTH-WE-KIYEOK
+B978 D266 # HANGUL SYLLABLE THIEUTH-WE-SSANGKIYEOK
+B979 D267 # HANGUL SYLLABLE THIEUTH-WE-KIYEOKSIOS
+B97A D268 # HANGUL SYLLABLE THIEUTH-WE-NIEUN
+B981 D269 # HANGUL SYLLABLE THIEUTH-WE-NIEUNCIEUC
+B982 D26A # HANGUL SYLLABLE THIEUTH-WE-NIEUNHIEUH
+B983 D26B # HANGUL SYLLABLE THIEUTH-WE-TIKEUT
+B984 D26C # HANGUL SYLLABLE THIEUTH-WE-RIEUL
+B985 D26D # HANGUL SYLLABLE THIEUTH-WE-RIEULKIYEOK
+B986 D26E # HANGUL SYLLABLE THIEUTH-WE-RIEULMIEUM
+B987 D26F # HANGUL SYLLABLE THIEUTH-WE-RIEULPIEUP
+B988 D270 # HANGUL SYLLABLE THIEUTH-WE-RIEULSIOS
+B989 D271 # HANGUL SYLLABLE THIEUTH-WE-RIEULTHIEUTH
+B98A D272 # HANGUL SYLLABLE THIEUTH-WE-RIEULPHIEUPH
+B98B D273 # HANGUL SYLLABLE THIEUTH-WE-RIEULHIEUH
+B98C D274 # HANGUL SYLLABLE THIEUTH-WE-MIEUM
+B98D D275 # HANGUL SYLLABLE THIEUTH-WE-PIEUP
+B98E D276 # HANGUL SYLLABLE THIEUTH-WE-PIEUPSIOS
+B98F D277 # HANGUL SYLLABLE THIEUTH-WE-SIOS
+B990 D278 # HANGUL SYLLABLE THIEUTH-WE-SSANGSIOS
+B991 D279 # HANGUL SYLLABLE THIEUTH-WE-IEUNG
+B992 D27A # HANGUL SYLLABLE THIEUTH-WE-CIEUC
+B993 D27B # HANGUL SYLLABLE THIEUTH-WE-CHIEUCH
+B994 D27C # HANGUL SYLLABLE THIEUTH-WE-KHIEUKH
+B995 D27D # HANGUL SYLLABLE THIEUTH-WE-THIEUTH
+B996 D27E # HANGUL SYLLABLE THIEUTH-WE-PHIEUPH
+B997 D27F # HANGUL SYLLABLE THIEUTH-WE-HIEUH
+B998 D282 # HANGUL SYLLABLE THIEUTH-WI-SSANGKIYEOK
+B999 D283 # HANGUL SYLLABLE THIEUTH-WI-KIYEOKSIOS
+B99A D285 # HANGUL SYLLABLE THIEUTH-WI-NIEUNCIEUC
+B99B D286 # HANGUL SYLLABLE THIEUTH-WI-NIEUNHIEUH
+B99C D287 # HANGUL SYLLABLE THIEUTH-WI-TIKEUT
+B99D D289 # HANGUL SYLLABLE THIEUTH-WI-RIEULKIYEOK
+B99E D28A # HANGUL SYLLABLE THIEUTH-WI-RIEULMIEUM
+B99F D28B # HANGUL SYLLABLE THIEUTH-WI-RIEULPIEUP
+B9A0 D28C # HANGUL SYLLABLE THIEUTH-WI-RIEULSIOS
+B9A1 BB00 # HANGUL SYLLABLE MIEUM-OE-NIEUN
+B9A2 BB04 # HANGUL SYLLABLE MIEUM-OE-RIEUL
+B9A3 BB0D # HANGUL SYLLABLE MIEUM-OE-PIEUP
+B9A4 BB0F # HANGUL SYLLABLE MIEUM-OE-SIOS
+B9A5 BB11 # HANGUL SYLLABLE MIEUM-OE-IEUNG
+B9A6 BB18 # HANGUL SYLLABLE MIEUM-YO
+B9A7 BB1C # HANGUL SYLLABLE MIEUM-YO-NIEUN
+B9A8 BB20 # HANGUL SYLLABLE MIEUM-YO-RIEUL
+B9A9 BB29 # HANGUL SYLLABLE MIEUM-YO-PIEUP
+B9AA BB2B # HANGUL SYLLABLE MIEUM-YO-SIOS
+B9AB BB34 # HANGUL SYLLABLE MIEUM-U
+B9AC BB35 # HANGUL SYLLABLE MIEUM-U-KIYEOK
+B9AD BB36 # HANGUL SYLLABLE MIEUM-U-SSANGKIYEOK
+B9AE BB38 # HANGUL SYLLABLE MIEUM-U-NIEUN
+B9AF BB3B # HANGUL SYLLABLE MIEUM-U-TIKEUT
+B9B0 BB3C # HANGUL SYLLABLE MIEUM-U-RIEUL
+B9B1 BB3D # HANGUL SYLLABLE MIEUM-U-RIEULKIYEOK
+B9B2 BB3E # HANGUL SYLLABLE MIEUM-U-RIEULMIEUM
+B9B3 BB44 # HANGUL SYLLABLE MIEUM-U-MIEUM
+B9B4 BB45 # HANGUL SYLLABLE MIEUM-U-PIEUP
+B9B5 BB47 # HANGUL SYLLABLE MIEUM-U-SIOS
+B9B6 BB49 # HANGUL SYLLABLE MIEUM-U-IEUNG
+B9B7 BB4D # HANGUL SYLLABLE MIEUM-U-THIEUTH
+B9B8 BB4F # HANGUL SYLLABLE MIEUM-U-HIEUH
+B9B9 BB50 # HANGUL SYLLABLE MIEUM-WEO
+B9BA BB54 # HANGUL SYLLABLE MIEUM-WEO-NIEUN
+B9BB BB58 # HANGUL SYLLABLE MIEUM-WEO-RIEUL
+B9BC BB61 # HANGUL SYLLABLE MIEUM-WEO-PIEUP
+B9BD BB63 # HANGUL SYLLABLE MIEUM-WEO-SIOS
+B9BE BB6C # HANGUL SYLLABLE MIEUM-WE
+B9BF BB88 # HANGUL SYLLABLE MIEUM-WI
+B9C0 BB8C # HANGUL SYLLABLE MIEUM-WI-NIEUN
+B9C1 BB90 # HANGUL SYLLABLE MIEUM-WI-RIEUL
+B9C2 BBA4 # HANGUL SYLLABLE MIEUM-YU
+B9C3 BBA8 # HANGUL SYLLABLE MIEUM-YU-NIEUN
+B9C4 BBAC # HANGUL SYLLABLE MIEUM-YU-RIEUL
+B9C5 BBB4 # HANGUL SYLLABLE MIEUM-YU-MIEUM
+B9C6 BBB7 # HANGUL SYLLABLE MIEUM-YU-SIOS
+B9C7 BBC0 # HANGUL SYLLABLE MIEUM-EU
+B9C8 BBC4 # HANGUL SYLLABLE MIEUM-EU-NIEUN
+B9C9 BBC8 # HANGUL SYLLABLE MIEUM-EU-RIEUL
+B9CA BBD0 # HANGUL SYLLABLE MIEUM-EU-MIEUM
+B9CB BBD3 # HANGUL SYLLABLE MIEUM-EU-SIOS
+B9CC BBF8 # HANGUL SYLLABLE MIEUM-I
+B9CD BBF9 # HANGUL SYLLABLE MIEUM-I-KIYEOK
+B9CE BBFC # HANGUL SYLLABLE MIEUM-I-NIEUN
+B9CF BBFF # HANGUL SYLLABLE MIEUM-I-TIKEUT
+B9D0 BC00 # HANGUL SYLLABLE MIEUM-I-RIEUL
+B9D1 BC02 # HANGUL SYLLABLE MIEUM-I-RIEULMIEUM
+B9D2 BC08 # HANGUL SYLLABLE MIEUM-I-MIEUM
+B9D3 BC09 # HANGUL SYLLABLE MIEUM-I-PIEUP
+B9D4 BC0B # HANGUL SYLLABLE MIEUM-I-SIOS
+B9D5 BC0C # HANGUL SYLLABLE MIEUM-I-SSANGSIOS
+B9D6 BC0D # HANGUL SYLLABLE MIEUM-I-IEUNG
+B9D7 BC0F # HANGUL SYLLABLE MIEUM-I-CHIEUCH
+B9D8 BC11 # HANGUL SYLLABLE MIEUM-I-THIEUTH
+B9D9 BC14 # HANGUL SYLLABLE PIEUP-A
+B9DA BC15 # HANGUL SYLLABLE PIEUP-A-KIYEOK
+B9DB BC16 # HANGUL SYLLABLE PIEUP-A-SSANGKIYEOK
+B9DC BC17 # HANGUL SYLLABLE PIEUP-A-KIYEOKSIOS
+B9DD BC18 # HANGUL SYLLABLE PIEUP-A-NIEUN
+B9DE BC1B # HANGUL SYLLABLE PIEUP-A-TIKEUT
+B9DF BC1C # HANGUL SYLLABLE PIEUP-A-RIEUL
+B9E0 BC1D # HANGUL SYLLABLE PIEUP-A-RIEULKIYEOK
+B9E1 BC1E # HANGUL SYLLABLE PIEUP-A-RIEULMIEUM
+B9E2 BC1F # HANGUL SYLLABLE PIEUP-A-RIEULPIEUP
+B9E3 BC24 # HANGUL SYLLABLE PIEUP-A-MIEUM
+B9E4 BC25 # HANGUL SYLLABLE PIEUP-A-PIEUP
+B9E5 BC27 # HANGUL SYLLABLE PIEUP-A-SIOS
+B9E6 BC29 # HANGUL SYLLABLE PIEUP-A-IEUNG
+B9E7 BC2D # HANGUL SYLLABLE PIEUP-A-THIEUTH
+B9E8 BC30 # HANGUL SYLLABLE PIEUP-AE
+B9E9 BC31 # HANGUL SYLLABLE PIEUP-AE-KIYEOK
+B9EA BC34 # HANGUL SYLLABLE PIEUP-AE-NIEUN
+B9EB BC38 # HANGUL SYLLABLE PIEUP-AE-RIEUL
+B9EC BC40 # HANGUL SYLLABLE PIEUP-AE-MIEUM
+B9ED BC41 # HANGUL SYLLABLE PIEUP-AE-PIEUP
+B9EE BC43 # HANGUL SYLLABLE PIEUP-AE-SIOS
+B9EF BC44 # HANGUL SYLLABLE PIEUP-AE-SSANGSIOS
+B9F0 BC45 # HANGUL SYLLABLE PIEUP-AE-IEUNG
+B9F1 BC49 # HANGUL SYLLABLE PIEUP-AE-THIEUTH
+B9F2 BC4C # HANGUL SYLLABLE PIEUP-YA
+B9F3 BC4D # HANGUL SYLLABLE PIEUP-YA-KIYEOK
+B9F4 BC50 # HANGUL SYLLABLE PIEUP-YA-NIEUN
+B9F5 BC5D # HANGUL SYLLABLE PIEUP-YA-PIEUP
+B9F6 BC84 # HANGUL SYLLABLE PIEUP-EO
+B9F7 BC85 # HANGUL SYLLABLE PIEUP-EO-KIYEOK
+B9F8 BC88 # HANGUL SYLLABLE PIEUP-EO-NIEUN
+B9F9 BC8B # HANGUL SYLLABLE PIEUP-EO-TIKEUT
+B9FA BC8C # HANGUL SYLLABLE PIEUP-EO-RIEUL
+B9FB BC8E # HANGUL SYLLABLE PIEUP-EO-RIEULMIEUM
+B9FC BC94 # HANGUL SYLLABLE PIEUP-EO-MIEUM
+B9FD BC95 # HANGUL SYLLABLE PIEUP-EO-PIEUP
+B9FE BC97 # HANGUL SYLLABLE PIEUP-EO-SIOS
+BA41 D28D # HANGUL SYLLABLE THIEUTH-WI-RIEULTHIEUTH
+BA42 D28E # HANGUL SYLLABLE THIEUTH-WI-RIEULPHIEUPH
+BA43 D28F # HANGUL SYLLABLE THIEUTH-WI-RIEULHIEUH
+BA44 D292 # HANGUL SYLLABLE THIEUTH-WI-PIEUPSIOS
+BA45 D293 # HANGUL SYLLABLE THIEUTH-WI-SIOS
+BA46 D294 # HANGUL SYLLABLE THIEUTH-WI-SSANGSIOS
+BA47 D296 # HANGUL SYLLABLE THIEUTH-WI-CIEUC
+BA48 D297 # HANGUL SYLLABLE THIEUTH-WI-CHIEUCH
+BA49 D298 # HANGUL SYLLABLE THIEUTH-WI-KHIEUKH
+BA4A D299 # HANGUL SYLLABLE THIEUTH-WI-THIEUTH
+BA4B D29A # HANGUL SYLLABLE THIEUTH-WI-PHIEUPH
+BA4C D29B # HANGUL SYLLABLE THIEUTH-WI-HIEUH
+BA4D D29D # HANGUL SYLLABLE THIEUTH-YU-KIYEOK
+BA4E D29E # HANGUL SYLLABLE THIEUTH-YU-SSANGKIYEOK
+BA4F D29F # HANGUL SYLLABLE THIEUTH-YU-KIYEOKSIOS
+BA50 D2A1 # HANGUL SYLLABLE THIEUTH-YU-NIEUNCIEUC
+BA51 D2A2 # HANGUL SYLLABLE THIEUTH-YU-NIEUNHIEUH
+BA52 D2A3 # HANGUL SYLLABLE THIEUTH-YU-TIKEUT
+BA53 D2A5 # HANGUL SYLLABLE THIEUTH-YU-RIEULKIYEOK
+BA54 D2A6 # HANGUL SYLLABLE THIEUTH-YU-RIEULMIEUM
+BA55 D2A7 # HANGUL SYLLABLE THIEUTH-YU-RIEULPIEUP
+BA56 D2A8 # HANGUL SYLLABLE THIEUTH-YU-RIEULSIOS
+BA57 D2A9 # HANGUL SYLLABLE THIEUTH-YU-RIEULTHIEUTH
+BA58 D2AA # HANGUL SYLLABLE THIEUTH-YU-RIEULPHIEUPH
+BA59 D2AB # HANGUL SYLLABLE THIEUTH-YU-RIEULHIEUH
+BA5A D2AD # HANGUL SYLLABLE THIEUTH-YU-PIEUP
+BA61 D2AE # HANGUL SYLLABLE THIEUTH-YU-PIEUPSIOS
+BA62 D2AF # HANGUL SYLLABLE THIEUTH-YU-SIOS
+BA63 D2B0 # HANGUL SYLLABLE THIEUTH-YU-SSANGSIOS
+BA64 D2B2 # HANGUL SYLLABLE THIEUTH-YU-CIEUC
+BA65 D2B3 # HANGUL SYLLABLE THIEUTH-YU-CHIEUCH
+BA66 D2B4 # HANGUL SYLLABLE THIEUTH-YU-KHIEUKH
+BA67 D2B5 # HANGUL SYLLABLE THIEUTH-YU-THIEUTH
+BA68 D2B6 # HANGUL SYLLABLE THIEUTH-YU-PHIEUPH
+BA69 D2B7 # HANGUL SYLLABLE THIEUTH-YU-HIEUH
+BA6A D2BA # HANGUL SYLLABLE THIEUTH-EU-SSANGKIYEOK
+BA6B D2BB # HANGUL SYLLABLE THIEUTH-EU-KIYEOKSIOS
+BA6C D2BD # HANGUL SYLLABLE THIEUTH-EU-NIEUNCIEUC
+BA6D D2BE # HANGUL SYLLABLE THIEUTH-EU-NIEUNHIEUH
+BA6E D2C1 # HANGUL SYLLABLE THIEUTH-EU-RIEULKIYEOK
+BA6F D2C3 # HANGUL SYLLABLE THIEUTH-EU-RIEULPIEUP
+BA70 D2C4 # HANGUL SYLLABLE THIEUTH-EU-RIEULSIOS
+BA71 D2C5 # HANGUL SYLLABLE THIEUTH-EU-RIEULTHIEUTH
+BA72 D2C6 # HANGUL SYLLABLE THIEUTH-EU-RIEULPHIEUPH
+BA73 D2C7 # HANGUL SYLLABLE THIEUTH-EU-RIEULHIEUH
+BA74 D2CA # HANGUL SYLLABLE THIEUTH-EU-PIEUPSIOS
+BA75 D2CC # HANGUL SYLLABLE THIEUTH-EU-SSANGSIOS
+BA76 D2CD # HANGUL SYLLABLE THIEUTH-EU-IEUNG
+BA77 D2CE # HANGUL SYLLABLE THIEUTH-EU-CIEUC
+BA78 D2CF # HANGUL SYLLABLE THIEUTH-EU-CHIEUCH
+BA79 D2D0 # HANGUL SYLLABLE THIEUTH-EU-KHIEUKH
+BA7A D2D1 # HANGUL SYLLABLE THIEUTH-EU-THIEUTH
+BA81 D2D2 # HANGUL SYLLABLE THIEUTH-EU-PHIEUPH
+BA82 D2D3 # HANGUL SYLLABLE THIEUTH-EU-HIEUH
+BA83 D2D5 # HANGUL SYLLABLE THIEUTH-YI-KIYEOK
+BA84 D2D6 # HANGUL SYLLABLE THIEUTH-YI-SSANGKIYEOK
+BA85 D2D7 # HANGUL SYLLABLE THIEUTH-YI-KIYEOKSIOS
+BA86 D2D9 # HANGUL SYLLABLE THIEUTH-YI-NIEUNCIEUC
+BA87 D2DA # HANGUL SYLLABLE THIEUTH-YI-NIEUNHIEUH
+BA88 D2DB # HANGUL SYLLABLE THIEUTH-YI-TIKEUT
+BA89 D2DD # HANGUL SYLLABLE THIEUTH-YI-RIEULKIYEOK
+BA8A D2DE # HANGUL SYLLABLE THIEUTH-YI-RIEULMIEUM
+BA8B D2DF # HANGUL SYLLABLE THIEUTH-YI-RIEULPIEUP
+BA8C D2E0 # HANGUL SYLLABLE THIEUTH-YI-RIEULSIOS
+BA8D D2E1 # HANGUL SYLLABLE THIEUTH-YI-RIEULTHIEUTH
+BA8E D2E2 # HANGUL SYLLABLE THIEUTH-YI-RIEULPHIEUPH
+BA8F D2E3 # HANGUL SYLLABLE THIEUTH-YI-RIEULHIEUH
+BA90 D2E6 # HANGUL SYLLABLE THIEUTH-YI-PIEUPSIOS
+BA91 D2E7 # HANGUL SYLLABLE THIEUTH-YI-SIOS
+BA92 D2E8 # HANGUL SYLLABLE THIEUTH-YI-SSANGSIOS
+BA93 D2E9 # HANGUL SYLLABLE THIEUTH-YI-IEUNG
+BA94 D2EA # HANGUL SYLLABLE THIEUTH-YI-CIEUC
+BA95 D2EB # HANGUL SYLLABLE THIEUTH-YI-CHIEUCH
+BA96 D2EC # HANGUL SYLLABLE THIEUTH-YI-KHIEUKH
+BA97 D2ED # HANGUL SYLLABLE THIEUTH-YI-THIEUTH
+BA98 D2EE # HANGUL SYLLABLE THIEUTH-YI-PHIEUPH
+BA99 D2EF # HANGUL SYLLABLE THIEUTH-YI-HIEUH
+BA9A D2F2 # HANGUL SYLLABLE THIEUTH-I-SSANGKIYEOK
+BA9B D2F3 # HANGUL SYLLABLE THIEUTH-I-KIYEOKSIOS
+BA9C D2F5 # HANGUL SYLLABLE THIEUTH-I-NIEUNCIEUC
+BA9D D2F6 # HANGUL SYLLABLE THIEUTH-I-NIEUNHIEUH
+BA9E D2F7 # HANGUL SYLLABLE THIEUTH-I-TIKEUT
+BA9F D2F9 # HANGUL SYLLABLE THIEUTH-I-RIEULKIYEOK
+BAA0 D2FA # HANGUL SYLLABLE THIEUTH-I-RIEULMIEUM
+BAA1 BC99 # HANGUL SYLLABLE PIEUP-EO-IEUNG
+BAA2 BC9A # HANGUL SYLLABLE PIEUP-EO-CIEUC
+BAA3 BCA0 # HANGUL SYLLABLE PIEUP-E
+BAA4 BCA1 # HANGUL SYLLABLE PIEUP-E-KIYEOK
+BAA5 BCA4 # HANGUL SYLLABLE PIEUP-E-NIEUN
+BAA6 BCA7 # HANGUL SYLLABLE PIEUP-E-TIKEUT
+BAA7 BCA8 # HANGUL SYLLABLE PIEUP-E-RIEUL
+BAA8 BCB0 # HANGUL SYLLABLE PIEUP-E-MIEUM
+BAA9 BCB1 # HANGUL SYLLABLE PIEUP-E-PIEUP
+BAAA BCB3 # HANGUL SYLLABLE PIEUP-E-SIOS
+BAAB BCB4 # HANGUL SYLLABLE PIEUP-E-SSANGSIOS
+BAAC BCB5 # HANGUL SYLLABLE PIEUP-E-IEUNG
+BAAD BCBC # HANGUL SYLLABLE PIEUP-YEO
+BAAE BCBD # HANGUL SYLLABLE PIEUP-YEO-KIYEOK
+BAAF BCC0 # HANGUL SYLLABLE PIEUP-YEO-NIEUN
+BAB0 BCC4 # HANGUL SYLLABLE PIEUP-YEO-RIEUL
+BAB1 BCCD # HANGUL SYLLABLE PIEUP-YEO-PIEUP
+BAB2 BCCF # HANGUL SYLLABLE PIEUP-YEO-SIOS
+BAB3 BCD0 # HANGUL SYLLABLE PIEUP-YEO-SSANGSIOS
+BAB4 BCD1 # HANGUL SYLLABLE PIEUP-YEO-IEUNG
+BAB5 BCD5 # HANGUL SYLLABLE PIEUP-YEO-THIEUTH
+BAB6 BCD8 # HANGUL SYLLABLE PIEUP-YE
+BAB7 BCDC # HANGUL SYLLABLE PIEUP-YE-NIEUN
+BAB8 BCF4 # HANGUL SYLLABLE PIEUP-O
+BAB9 BCF5 # HANGUL SYLLABLE PIEUP-O-KIYEOK
+BABA BCF6 # HANGUL SYLLABLE PIEUP-O-SSANGKIYEOK
+BABB BCF8 # HANGUL SYLLABLE PIEUP-O-NIEUN
+BABC BCFC # HANGUL SYLLABLE PIEUP-O-RIEUL
+BABD BD04 # HANGUL SYLLABLE PIEUP-O-MIEUM
+BABE BD05 # HANGUL SYLLABLE PIEUP-O-PIEUP
+BABF BD07 # HANGUL SYLLABLE PIEUP-O-SIOS
+BAC0 BD09 # HANGUL SYLLABLE PIEUP-O-IEUNG
+BAC1 BD10 # HANGUL SYLLABLE PIEUP-WA
+BAC2 BD14 # HANGUL SYLLABLE PIEUP-WA-NIEUN
+BAC3 BD24 # HANGUL SYLLABLE PIEUP-WA-SSANGSIOS
+BAC4 BD2C # HANGUL SYLLABLE PIEUP-WAE
+BAC5 BD40 # HANGUL SYLLABLE PIEUP-WAE-SSANGSIOS
+BAC6 BD48 # HANGUL SYLLABLE PIEUP-OE
+BAC7 BD49 # HANGUL SYLLABLE PIEUP-OE-KIYEOK
+BAC8 BD4C # HANGUL SYLLABLE PIEUP-OE-NIEUN
+BAC9 BD50 # HANGUL SYLLABLE PIEUP-OE-RIEUL
+BACA BD58 # HANGUL SYLLABLE PIEUP-OE-MIEUM
+BACB BD59 # HANGUL SYLLABLE PIEUP-OE-PIEUP
+BACC BD64 # HANGUL SYLLABLE PIEUP-YO
+BACD BD68 # HANGUL SYLLABLE PIEUP-YO-NIEUN
+BACE BD80 # HANGUL SYLLABLE PIEUP-U
+BACF BD81 # HANGUL SYLLABLE PIEUP-U-KIYEOK
+BAD0 BD84 # HANGUL SYLLABLE PIEUP-U-NIEUN
+BAD1 BD87 # HANGUL SYLLABLE PIEUP-U-TIKEUT
+BAD2 BD88 # HANGUL SYLLABLE PIEUP-U-RIEUL
+BAD3 BD89 # HANGUL SYLLABLE PIEUP-U-RIEULKIYEOK
+BAD4 BD8A # HANGUL SYLLABLE PIEUP-U-RIEULMIEUM
+BAD5 BD90 # HANGUL SYLLABLE PIEUP-U-MIEUM
+BAD6 BD91 # HANGUL SYLLABLE PIEUP-U-PIEUP
+BAD7 BD93 # HANGUL SYLLABLE PIEUP-U-SIOS
+BAD8 BD95 # HANGUL SYLLABLE PIEUP-U-IEUNG
+BAD9 BD99 # HANGUL SYLLABLE PIEUP-U-THIEUTH
+BADA BD9A # HANGUL SYLLABLE PIEUP-U-PHIEUPH
+BADB BD9C # HANGUL SYLLABLE PIEUP-WEO
+BADC BDA4 # HANGUL SYLLABLE PIEUP-WEO-RIEUL
+BADD BDB0 # HANGUL SYLLABLE PIEUP-WEO-SSANGSIOS
+BADE BDB8 # HANGUL SYLLABLE PIEUP-WE
+BADF BDD4 # HANGUL SYLLABLE PIEUP-WI
+BAE0 BDD5 # HANGUL SYLLABLE PIEUP-WI-KIYEOK
+BAE1 BDD8 # HANGUL SYLLABLE PIEUP-WI-NIEUN
+BAE2 BDDC # HANGUL SYLLABLE PIEUP-WI-RIEUL
+BAE3 BDE9 # HANGUL SYLLABLE PIEUP-WI-IEUNG
+BAE4 BDF0 # HANGUL SYLLABLE PIEUP-YU
+BAE5 BDF4 # HANGUL SYLLABLE PIEUP-YU-NIEUN
+BAE6 BDF8 # HANGUL SYLLABLE PIEUP-YU-RIEUL
+BAE7 BE00 # HANGUL SYLLABLE PIEUP-YU-MIEUM
+BAE8 BE03 # HANGUL SYLLABLE PIEUP-YU-SIOS
+BAE9 BE05 # HANGUL SYLLABLE PIEUP-YU-IEUNG
+BAEA BE0C # HANGUL SYLLABLE PIEUP-EU
+BAEB BE0D # HANGUL SYLLABLE PIEUP-EU-KIYEOK
+BAEC BE10 # HANGUL SYLLABLE PIEUP-EU-NIEUN
+BAED BE14 # HANGUL SYLLABLE PIEUP-EU-RIEUL
+BAEE BE1C # HANGUL SYLLABLE PIEUP-EU-MIEUM
+BAEF BE1D # HANGUL SYLLABLE PIEUP-EU-PIEUP
+BAF0 BE1F # HANGUL SYLLABLE PIEUP-EU-SIOS
+BAF1 BE44 # HANGUL SYLLABLE PIEUP-I
+BAF2 BE45 # HANGUL SYLLABLE PIEUP-I-KIYEOK
+BAF3 BE48 # HANGUL SYLLABLE PIEUP-I-NIEUN
+BAF4 BE4C # HANGUL SYLLABLE PIEUP-I-RIEUL
+BAF5 BE4E # HANGUL SYLLABLE PIEUP-I-RIEULMIEUM
+BAF6 BE54 # HANGUL SYLLABLE PIEUP-I-MIEUM
+BAF7 BE55 # HANGUL SYLLABLE PIEUP-I-PIEUP
+BAF8 BE57 # HANGUL SYLLABLE PIEUP-I-SIOS
+BAF9 BE59 # HANGUL SYLLABLE PIEUP-I-IEUNG
+BAFA BE5A # HANGUL SYLLABLE PIEUP-I-CIEUC
+BAFB BE5B # HANGUL SYLLABLE PIEUP-I-CHIEUCH
+BAFC BE60 # HANGUL SYLLABLE SSANGPIEUP-A
+BAFD BE61 # HANGUL SYLLABLE SSANGPIEUP-A-KIYEOK
+BAFE BE64 # HANGUL SYLLABLE SSANGPIEUP-A-NIEUN
+BB41 D2FB # HANGUL SYLLABLE THIEUTH-I-RIEULPIEUP
+BB42 D2FC # HANGUL SYLLABLE THIEUTH-I-RIEULSIOS
+BB43 D2FD # HANGUL SYLLABLE THIEUTH-I-RIEULTHIEUTH
+BB44 D2FE # HANGUL SYLLABLE THIEUTH-I-RIEULPHIEUPH
+BB45 D2FF # HANGUL SYLLABLE THIEUTH-I-RIEULHIEUH
+BB46 D302 # HANGUL SYLLABLE THIEUTH-I-PIEUPSIOS
+BB47 D304 # HANGUL SYLLABLE THIEUTH-I-SSANGSIOS
+BB48 D306 # HANGUL SYLLABLE THIEUTH-I-CIEUC
+BB49 D307 # HANGUL SYLLABLE THIEUTH-I-CHIEUCH
+BB4A D308 # HANGUL SYLLABLE THIEUTH-I-KHIEUKH
+BB4B D309 # HANGUL SYLLABLE THIEUTH-I-THIEUTH
+BB4C D30A # HANGUL SYLLABLE THIEUTH-I-PHIEUPH
+BB4D D30B # HANGUL SYLLABLE THIEUTH-I-HIEUH
+BB4E D30F # HANGUL SYLLABLE PHIEUPH-A-KIYEOKSIOS
+BB4F D311 # HANGUL SYLLABLE PHIEUPH-A-NIEUNCIEUC
+BB50 D312 # HANGUL SYLLABLE PHIEUPH-A-NIEUNHIEUH
+BB51 D313 # HANGUL SYLLABLE PHIEUPH-A-TIKEUT
+BB52 D315 # HANGUL SYLLABLE PHIEUPH-A-RIEULKIYEOK
+BB53 D317 # HANGUL SYLLABLE PHIEUPH-A-RIEULPIEUP
+BB54 D318 # HANGUL SYLLABLE PHIEUPH-A-RIEULSIOS
+BB55 D319 # HANGUL SYLLABLE PHIEUPH-A-RIEULTHIEUTH
+BB56 D31A # HANGUL SYLLABLE PHIEUPH-A-RIEULPHIEUPH
+BB57 D31B # HANGUL SYLLABLE PHIEUPH-A-RIEULHIEUH
+BB58 D31E # HANGUL SYLLABLE PHIEUPH-A-PIEUPSIOS
+BB59 D322 # HANGUL SYLLABLE PHIEUPH-A-CIEUC
+BB5A D323 # HANGUL SYLLABLE PHIEUPH-A-CHIEUCH
+BB61 D324 # HANGUL SYLLABLE PHIEUPH-A-KHIEUKH
+BB62 D326 # HANGUL SYLLABLE PHIEUPH-A-PHIEUPH
+BB63 D327 # HANGUL SYLLABLE PHIEUPH-A-HIEUH
+BB64 D32A # HANGUL SYLLABLE PHIEUPH-AE-SSANGKIYEOK
+BB65 D32B # HANGUL SYLLABLE PHIEUPH-AE-KIYEOKSIOS
+BB66 D32D # HANGUL SYLLABLE PHIEUPH-AE-NIEUNCIEUC
+BB67 D32E # HANGUL SYLLABLE PHIEUPH-AE-NIEUNHIEUH
+BB68 D32F # HANGUL SYLLABLE PHIEUPH-AE-TIKEUT
+BB69 D331 # HANGUL SYLLABLE PHIEUPH-AE-RIEULKIYEOK
+BB6A D332 # HANGUL SYLLABLE PHIEUPH-AE-RIEULMIEUM
+BB6B D333 # HANGUL SYLLABLE PHIEUPH-AE-RIEULPIEUP
+BB6C D334 # HANGUL SYLLABLE PHIEUPH-AE-RIEULSIOS
+BB6D D335 # HANGUL SYLLABLE PHIEUPH-AE-RIEULTHIEUTH
+BB6E D336 # HANGUL SYLLABLE PHIEUPH-AE-RIEULPHIEUPH
+BB6F D337 # HANGUL SYLLABLE PHIEUPH-AE-RIEULHIEUH
+BB70 D33A # HANGUL SYLLABLE PHIEUPH-AE-PIEUPSIOS
+BB71 D33E # HANGUL SYLLABLE PHIEUPH-AE-CIEUC
+BB72 D33F # HANGUL SYLLABLE PHIEUPH-AE-CHIEUCH
+BB73 D340 # HANGUL SYLLABLE PHIEUPH-AE-KHIEUKH
+BB74 D341 # HANGUL SYLLABLE PHIEUPH-AE-THIEUTH
+BB75 D342 # HANGUL SYLLABLE PHIEUPH-AE-PHIEUPH
+BB76 D343 # HANGUL SYLLABLE PHIEUPH-AE-HIEUH
+BB77 D346 # HANGUL SYLLABLE PHIEUPH-YA-SSANGKIYEOK
+BB78 D347 # HANGUL SYLLABLE PHIEUPH-YA-KIYEOKSIOS
+BB79 D348 # HANGUL SYLLABLE PHIEUPH-YA-NIEUN
+BB7A D349 # HANGUL SYLLABLE PHIEUPH-YA-NIEUNCIEUC
+BB81 D34A # HANGUL SYLLABLE PHIEUPH-YA-NIEUNHIEUH
+BB82 D34B # HANGUL SYLLABLE PHIEUPH-YA-TIKEUT
+BB83 D34C # HANGUL SYLLABLE PHIEUPH-YA-RIEUL
+BB84 D34D # HANGUL SYLLABLE PHIEUPH-YA-RIEULKIYEOK
+BB85 D34E # HANGUL SYLLABLE PHIEUPH-YA-RIEULMIEUM
+BB86 D34F # HANGUL SYLLABLE PHIEUPH-YA-RIEULPIEUP
+BB87 D350 # HANGUL SYLLABLE PHIEUPH-YA-RIEULSIOS
+BB88 D351 # HANGUL SYLLABLE PHIEUPH-YA-RIEULTHIEUTH
+BB89 D352 # HANGUL SYLLABLE PHIEUPH-YA-RIEULPHIEUPH
+BB8A D353 # HANGUL SYLLABLE PHIEUPH-YA-RIEULHIEUH
+BB8B D354 # HANGUL SYLLABLE PHIEUPH-YA-MIEUM
+BB8C D355 # HANGUL SYLLABLE PHIEUPH-YA-PIEUP
+BB8D D356 # HANGUL SYLLABLE PHIEUPH-YA-PIEUPSIOS
+BB8E D357 # HANGUL SYLLABLE PHIEUPH-YA-SIOS
+BB8F D358 # HANGUL SYLLABLE PHIEUPH-YA-SSANGSIOS
+BB90 D359 # HANGUL SYLLABLE PHIEUPH-YA-IEUNG
+BB91 D35A # HANGUL SYLLABLE PHIEUPH-YA-CIEUC
+BB92 D35B # HANGUL SYLLABLE PHIEUPH-YA-CHIEUCH
+BB93 D35C # HANGUL SYLLABLE PHIEUPH-YA-KHIEUKH
+BB94 D35D # HANGUL SYLLABLE PHIEUPH-YA-THIEUTH
+BB95 D35E # HANGUL SYLLABLE PHIEUPH-YA-PHIEUPH
+BB96 D35F # HANGUL SYLLABLE PHIEUPH-YA-HIEUH
+BB97 D360 # HANGUL SYLLABLE PHIEUPH-YAE
+BB98 D361 # HANGUL SYLLABLE PHIEUPH-YAE-KIYEOK
+BB99 D362 # HANGUL SYLLABLE PHIEUPH-YAE-SSANGKIYEOK
+BB9A D363 # HANGUL SYLLABLE PHIEUPH-YAE-KIYEOKSIOS
+BB9B D364 # HANGUL SYLLABLE PHIEUPH-YAE-NIEUN
+BB9C D365 # HANGUL SYLLABLE PHIEUPH-YAE-NIEUNCIEUC
+BB9D D366 # HANGUL SYLLABLE PHIEUPH-YAE-NIEUNHIEUH
+BB9E D367 # HANGUL SYLLABLE PHIEUPH-YAE-TIKEUT
+BB9F D368 # HANGUL SYLLABLE PHIEUPH-YAE-RIEUL
+BBA0 D369 # HANGUL SYLLABLE PHIEUPH-YAE-RIEULKIYEOK
+BBA1 BE68 # HANGUL SYLLABLE SSANGPIEUP-A-RIEUL
+BBA2 BE6A # HANGUL SYLLABLE SSANGPIEUP-A-RIEULMIEUM
+BBA3 BE70 # HANGUL SYLLABLE SSANGPIEUP-A-MIEUM
+BBA4 BE71 # HANGUL SYLLABLE SSANGPIEUP-A-PIEUP
+BBA5 BE73 # HANGUL SYLLABLE SSANGPIEUP-A-SIOS
+BBA6 BE74 # HANGUL SYLLABLE SSANGPIEUP-A-SSANGSIOS
+BBA7 BE75 # HANGUL SYLLABLE SSANGPIEUP-A-IEUNG
+BBA8 BE7B # HANGUL SYLLABLE SSANGPIEUP-A-HIEUH
+BBA9 BE7C # HANGUL SYLLABLE SSANGPIEUP-AE
+BBAA BE7D # HANGUL SYLLABLE SSANGPIEUP-AE-KIYEOK
+BBAB BE80 # HANGUL SYLLABLE SSANGPIEUP-AE-NIEUN
+BBAC BE84 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEUL
+BBAD BE8C # HANGUL SYLLABLE SSANGPIEUP-AE-MIEUM
+BBAE BE8D # HANGUL SYLLABLE SSANGPIEUP-AE-PIEUP
+BBAF BE8F # HANGUL SYLLABLE SSANGPIEUP-AE-SIOS
+BBB0 BE90 # HANGUL SYLLABLE SSANGPIEUP-AE-SSANGSIOS
+BBB1 BE91 # HANGUL SYLLABLE SSANGPIEUP-AE-IEUNG
+BBB2 BE98 # HANGUL SYLLABLE SSANGPIEUP-YA
+BBB3 BE99 # HANGUL SYLLABLE SSANGPIEUP-YA-KIYEOK
+BBB4 BEA8 # HANGUL SYLLABLE SSANGPIEUP-YA-MIEUM
+BBB5 BED0 # HANGUL SYLLABLE SSANGPIEUP-EO
+BBB6 BED1 # HANGUL SYLLABLE SSANGPIEUP-EO-KIYEOK
+BBB7 BED4 # HANGUL SYLLABLE SSANGPIEUP-EO-NIEUN
+BBB8 BED7 # HANGUL SYLLABLE SSANGPIEUP-EO-TIKEUT
+BBB9 BED8 # HANGUL SYLLABLE SSANGPIEUP-EO-RIEUL
+BBBA BEE0 # HANGUL SYLLABLE SSANGPIEUP-EO-MIEUM
+BBBB BEE3 # HANGUL SYLLABLE SSANGPIEUP-EO-SIOS
+BBBC BEE4 # HANGUL SYLLABLE SSANGPIEUP-EO-SSANGSIOS
+BBBD BEE5 # HANGUL SYLLABLE SSANGPIEUP-EO-IEUNG
+BBBE BEEC # HANGUL SYLLABLE SSANGPIEUP-E
+BBBF BF01 # HANGUL SYLLABLE SSANGPIEUP-E-IEUNG
+BBC0 BF08 # HANGUL SYLLABLE SSANGPIEUP-YEO
+BBC1 BF09 # HANGUL SYLLABLE SSANGPIEUP-YEO-KIYEOK
+BBC2 BF18 # HANGUL SYLLABLE SSANGPIEUP-YEO-MIEUM
+BBC3 BF19 # HANGUL SYLLABLE SSANGPIEUP-YEO-PIEUP
+BBC4 BF1B # HANGUL SYLLABLE SSANGPIEUP-YEO-SIOS
+BBC5 BF1C # HANGUL SYLLABLE SSANGPIEUP-YEO-SSANGSIOS
+BBC6 BF1D # HANGUL SYLLABLE SSANGPIEUP-YEO-IEUNG
+BBC7 BF40 # HANGUL SYLLABLE SSANGPIEUP-O
+BBC8 BF41 # HANGUL SYLLABLE SSANGPIEUP-O-KIYEOK
+BBC9 BF44 # HANGUL SYLLABLE SSANGPIEUP-O-NIEUN
+BBCA BF48 # HANGUL SYLLABLE SSANGPIEUP-O-RIEUL
+BBCB BF50 # HANGUL SYLLABLE SSANGPIEUP-O-MIEUM
+BBCC BF51 # HANGUL SYLLABLE SSANGPIEUP-O-PIEUP
+BBCD BF55 # HANGUL SYLLABLE SSANGPIEUP-O-IEUNG
+BBCE BF94 # HANGUL SYLLABLE SSANGPIEUP-OE
+BBCF BFB0 # HANGUL SYLLABLE SSANGPIEUP-YO
+BBD0 BFC5 # HANGUL SYLLABLE SSANGPIEUP-YO-IEUNG
+BBD1 BFCC # HANGUL SYLLABLE SSANGPIEUP-U
+BBD2 BFCD # HANGUL SYLLABLE SSANGPIEUP-U-KIYEOK
+BBD3 BFD0 # HANGUL SYLLABLE SSANGPIEUP-U-NIEUN
+BBD4 BFD4 # HANGUL SYLLABLE SSANGPIEUP-U-RIEUL
+BBD5 BFDC # HANGUL SYLLABLE SSANGPIEUP-U-MIEUM
+BBD6 BFDF # HANGUL SYLLABLE SSANGPIEUP-U-SIOS
+BBD7 BFE1 # HANGUL SYLLABLE SSANGPIEUP-U-IEUNG
+BBD8 C03C # HANGUL SYLLABLE SSANGPIEUP-YU
+BBD9 C051 # HANGUL SYLLABLE SSANGPIEUP-YU-IEUNG
+BBDA C058 # HANGUL SYLLABLE SSANGPIEUP-EU
+BBDB C05C # HANGUL SYLLABLE SSANGPIEUP-EU-NIEUN
+BBDC C060 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEUL
+BBDD C068 # HANGUL SYLLABLE SSANGPIEUP-EU-MIEUM
+BBDE C069 # HANGUL SYLLABLE SSANGPIEUP-EU-PIEUP
+BBDF C090 # HANGUL SYLLABLE SSANGPIEUP-I
+BBE0 C091 # HANGUL SYLLABLE SSANGPIEUP-I-KIYEOK
+BBE1 C094 # HANGUL SYLLABLE SSANGPIEUP-I-NIEUN
+BBE2 C098 # HANGUL SYLLABLE SSANGPIEUP-I-RIEUL
+BBE3 C0A0 # HANGUL SYLLABLE SSANGPIEUP-I-MIEUM
+BBE4 C0A1 # HANGUL SYLLABLE SSANGPIEUP-I-PIEUP
+BBE5 C0A3 # HANGUL SYLLABLE SSANGPIEUP-I-SIOS
+BBE6 C0A5 # HANGUL SYLLABLE SSANGPIEUP-I-IEUNG
+BBE7 C0AC # HANGUL SYLLABLE SIOS-A
+BBE8 C0AD # HANGUL SYLLABLE SIOS-A-KIYEOK
+BBE9 C0AF # HANGUL SYLLABLE SIOS-A-KIYEOKSIOS
+BBEA C0B0 # HANGUL SYLLABLE SIOS-A-NIEUN
+BBEB C0B3 # HANGUL SYLLABLE SIOS-A-TIKEUT
+BBEC C0B4 # HANGUL SYLLABLE SIOS-A-RIEUL
+BBED C0B5 # HANGUL SYLLABLE SIOS-A-RIEULKIYEOK
+BBEE C0B6 # HANGUL SYLLABLE SIOS-A-RIEULMIEUM
+BBEF C0BC # HANGUL SYLLABLE SIOS-A-MIEUM
+BBF0 C0BD # HANGUL SYLLABLE SIOS-A-PIEUP
+BBF1 C0BF # HANGUL SYLLABLE SIOS-A-SIOS
+BBF2 C0C0 # HANGUL SYLLABLE SIOS-A-SSANGSIOS
+BBF3 C0C1 # HANGUL SYLLABLE SIOS-A-IEUNG
+BBF4 C0C5 # HANGUL SYLLABLE SIOS-A-THIEUTH
+BBF5 C0C8 # HANGUL SYLLABLE SIOS-AE
+BBF6 C0C9 # HANGUL SYLLABLE SIOS-AE-KIYEOK
+BBF7 C0CC # HANGUL SYLLABLE SIOS-AE-NIEUN
+BBF8 C0D0 # HANGUL SYLLABLE SIOS-AE-RIEUL
+BBF9 C0D8 # HANGUL SYLLABLE SIOS-AE-MIEUM
+BBFA C0D9 # HANGUL SYLLABLE SIOS-AE-PIEUP
+BBFB C0DB # HANGUL SYLLABLE SIOS-AE-SIOS
+BBFC C0DC # HANGUL SYLLABLE SIOS-AE-SSANGSIOS
+BBFD C0DD # HANGUL SYLLABLE SIOS-AE-IEUNG
+BBFE C0E4 # HANGUL SYLLABLE SIOS-YA
+BC41 D36A # HANGUL SYLLABLE PHIEUPH-YAE-RIEULMIEUM
+BC42 D36B # HANGUL SYLLABLE PHIEUPH-YAE-RIEULPIEUP
+BC43 D36C # HANGUL SYLLABLE PHIEUPH-YAE-RIEULSIOS
+BC44 D36D # HANGUL SYLLABLE PHIEUPH-YAE-RIEULTHIEUTH
+BC45 D36E # HANGUL SYLLABLE PHIEUPH-YAE-RIEULPHIEUPH
+BC46 D36F # HANGUL SYLLABLE PHIEUPH-YAE-RIEULHIEUH
+BC47 D370 # HANGUL SYLLABLE PHIEUPH-YAE-MIEUM
+BC48 D371 # HANGUL SYLLABLE PHIEUPH-YAE-PIEUP
+BC49 D372 # HANGUL SYLLABLE PHIEUPH-YAE-PIEUPSIOS
+BC4A D373 # HANGUL SYLLABLE PHIEUPH-YAE-SIOS
+BC4B D374 # HANGUL SYLLABLE PHIEUPH-YAE-SSANGSIOS
+BC4C D375 # HANGUL SYLLABLE PHIEUPH-YAE-IEUNG
+BC4D D376 # HANGUL SYLLABLE PHIEUPH-YAE-CIEUC
+BC4E D377 # HANGUL SYLLABLE PHIEUPH-YAE-CHIEUCH
+BC4F D378 # HANGUL SYLLABLE PHIEUPH-YAE-KHIEUKH
+BC50 D379 # HANGUL SYLLABLE PHIEUPH-YAE-THIEUTH
+BC51 D37A # HANGUL SYLLABLE PHIEUPH-YAE-PHIEUPH
+BC52 D37B # HANGUL SYLLABLE PHIEUPH-YAE-HIEUH
+BC53 D37E # HANGUL SYLLABLE PHIEUPH-EO-SSANGKIYEOK
+BC54 D37F # HANGUL SYLLABLE PHIEUPH-EO-KIYEOKSIOS
+BC55 D381 # HANGUL SYLLABLE PHIEUPH-EO-NIEUNCIEUC
+BC56 D382 # HANGUL SYLLABLE PHIEUPH-EO-NIEUNHIEUH
+BC57 D383 # HANGUL SYLLABLE PHIEUPH-EO-TIKEUT
+BC58 D385 # HANGUL SYLLABLE PHIEUPH-EO-RIEULKIYEOK
+BC59 D386 # HANGUL SYLLABLE PHIEUPH-EO-RIEULMIEUM
+BC5A D387 # HANGUL SYLLABLE PHIEUPH-EO-RIEULPIEUP
+BC61 D388 # HANGUL SYLLABLE PHIEUPH-EO-RIEULSIOS
+BC62 D389 # HANGUL SYLLABLE PHIEUPH-EO-RIEULTHIEUTH
+BC63 D38A # HANGUL SYLLABLE PHIEUPH-EO-RIEULPHIEUPH
+BC64 D38B # HANGUL SYLLABLE PHIEUPH-EO-RIEULHIEUH
+BC65 D38E # HANGUL SYLLABLE PHIEUPH-EO-PIEUPSIOS
+BC66 D392 # HANGUL SYLLABLE PHIEUPH-EO-CIEUC
+BC67 D393 # HANGUL SYLLABLE PHIEUPH-EO-CHIEUCH
+BC68 D394 # HANGUL SYLLABLE PHIEUPH-EO-KHIEUKH
+BC69 D395 # HANGUL SYLLABLE PHIEUPH-EO-THIEUTH
+BC6A D396 # HANGUL SYLLABLE PHIEUPH-EO-PHIEUPH
+BC6B D397 # HANGUL SYLLABLE PHIEUPH-EO-HIEUH
+BC6C D39A # HANGUL SYLLABLE PHIEUPH-E-SSANGKIYEOK
+BC6D D39B # HANGUL SYLLABLE PHIEUPH-E-KIYEOKSIOS
+BC6E D39D # HANGUL SYLLABLE PHIEUPH-E-NIEUNCIEUC
+BC6F D39E # HANGUL SYLLABLE PHIEUPH-E-NIEUNHIEUH
+BC70 D39F # HANGUL SYLLABLE PHIEUPH-E-TIKEUT
+BC71 D3A1 # HANGUL SYLLABLE PHIEUPH-E-RIEULKIYEOK
+BC72 D3A2 # HANGUL SYLLABLE PHIEUPH-E-RIEULMIEUM
+BC73 D3A3 # HANGUL SYLLABLE PHIEUPH-E-RIEULPIEUP
+BC74 D3A4 # HANGUL SYLLABLE PHIEUPH-E-RIEULSIOS
+BC75 D3A5 # HANGUL SYLLABLE PHIEUPH-E-RIEULTHIEUTH
+BC76 D3A6 # HANGUL SYLLABLE PHIEUPH-E-RIEULPHIEUPH
+BC77 D3A7 # HANGUL SYLLABLE PHIEUPH-E-RIEULHIEUH
+BC78 D3AA # HANGUL SYLLABLE PHIEUPH-E-PIEUPSIOS
+BC79 D3AC # HANGUL SYLLABLE PHIEUPH-E-SSANGSIOS
+BC7A D3AE # HANGUL SYLLABLE PHIEUPH-E-CIEUC
+BC81 D3AF # HANGUL SYLLABLE PHIEUPH-E-CHIEUCH
+BC82 D3B0 # HANGUL SYLLABLE PHIEUPH-E-KHIEUKH
+BC83 D3B1 # HANGUL SYLLABLE PHIEUPH-E-THIEUTH
+BC84 D3B2 # HANGUL SYLLABLE PHIEUPH-E-PHIEUPH
+BC85 D3B3 # HANGUL SYLLABLE PHIEUPH-E-HIEUH
+BC86 D3B5 # HANGUL SYLLABLE PHIEUPH-YEO-KIYEOK
+BC87 D3B6 # HANGUL SYLLABLE PHIEUPH-YEO-SSANGKIYEOK
+BC88 D3B7 # HANGUL SYLLABLE PHIEUPH-YEO-KIYEOKSIOS
+BC89 D3B9 # HANGUL SYLLABLE PHIEUPH-YEO-NIEUNCIEUC
+BC8A D3BA # HANGUL SYLLABLE PHIEUPH-YEO-NIEUNHIEUH
+BC8B D3BB # HANGUL SYLLABLE PHIEUPH-YEO-TIKEUT
+BC8C D3BD # HANGUL SYLLABLE PHIEUPH-YEO-RIEULKIYEOK
+BC8D D3BE # HANGUL SYLLABLE PHIEUPH-YEO-RIEULMIEUM
+BC8E D3BF # HANGUL SYLLABLE PHIEUPH-YEO-RIEULPIEUP
+BC8F D3C0 # HANGUL SYLLABLE PHIEUPH-YEO-RIEULSIOS
+BC90 D3C1 # HANGUL SYLLABLE PHIEUPH-YEO-RIEULTHIEUTH
+BC91 D3C2 # HANGUL SYLLABLE PHIEUPH-YEO-RIEULPHIEUPH
+BC92 D3C3 # HANGUL SYLLABLE PHIEUPH-YEO-RIEULHIEUH
+BC93 D3C6 # HANGUL SYLLABLE PHIEUPH-YEO-PIEUPSIOS
+BC94 D3C7 # HANGUL SYLLABLE PHIEUPH-YEO-SIOS
+BC95 D3CA # HANGUL SYLLABLE PHIEUPH-YEO-CIEUC
+BC96 D3CB # HANGUL SYLLABLE PHIEUPH-YEO-CHIEUCH
+BC97 D3CC # HANGUL SYLLABLE PHIEUPH-YEO-KHIEUKH
+BC98 D3CD # HANGUL SYLLABLE PHIEUPH-YEO-THIEUTH
+BC99 D3CE # HANGUL SYLLABLE PHIEUPH-YEO-PHIEUPH
+BC9A D3CF # HANGUL SYLLABLE PHIEUPH-YEO-HIEUH
+BC9B D3D1 # HANGUL SYLLABLE PHIEUPH-YE-KIYEOK
+BC9C D3D2 # HANGUL SYLLABLE PHIEUPH-YE-SSANGKIYEOK
+BC9D D3D3 # HANGUL SYLLABLE PHIEUPH-YE-KIYEOKSIOS
+BC9E D3D4 # HANGUL SYLLABLE PHIEUPH-YE-NIEUN
+BC9F D3D5 # HANGUL SYLLABLE PHIEUPH-YE-NIEUNCIEUC
+BCA0 D3D6 # HANGUL SYLLABLE PHIEUPH-YE-NIEUNHIEUH
+BCA1 C0E5 # HANGUL SYLLABLE SIOS-YA-KIYEOK
+BCA2 C0E8 # HANGUL SYLLABLE SIOS-YA-NIEUN
+BCA3 C0EC # HANGUL SYLLABLE SIOS-YA-RIEUL
+BCA4 C0F4 # HANGUL SYLLABLE SIOS-YA-MIEUM
+BCA5 C0F5 # HANGUL SYLLABLE SIOS-YA-PIEUP
+BCA6 C0F7 # HANGUL SYLLABLE SIOS-YA-SIOS
+BCA7 C0F9 # HANGUL SYLLABLE SIOS-YA-IEUNG
+BCA8 C100 # HANGUL SYLLABLE SIOS-YAE
+BCA9 C104 # HANGUL SYLLABLE SIOS-YAE-NIEUN
+BCAA C108 # HANGUL SYLLABLE SIOS-YAE-RIEUL
+BCAB C110 # HANGUL SYLLABLE SIOS-YAE-MIEUM
+BCAC C115 # HANGUL SYLLABLE SIOS-YAE-IEUNG
+BCAD C11C # HANGUL SYLLABLE SIOS-EO
+BCAE C11D # HANGUL SYLLABLE SIOS-EO-KIYEOK
+BCAF C11E # HANGUL SYLLABLE SIOS-EO-SSANGKIYEOK
+BCB0 C11F # HANGUL SYLLABLE SIOS-EO-KIYEOKSIOS
+BCB1 C120 # HANGUL SYLLABLE SIOS-EO-NIEUN
+BCB2 C123 # HANGUL SYLLABLE SIOS-EO-TIKEUT
+BCB3 C124 # HANGUL SYLLABLE SIOS-EO-RIEUL
+BCB4 C126 # HANGUL SYLLABLE SIOS-EO-RIEULMIEUM
+BCB5 C127 # HANGUL SYLLABLE SIOS-EO-RIEULPIEUP
+BCB6 C12C # HANGUL SYLLABLE SIOS-EO-MIEUM
+BCB7 C12D # HANGUL SYLLABLE SIOS-EO-PIEUP
+BCB8 C12F # HANGUL SYLLABLE SIOS-EO-SIOS
+BCB9 C130 # HANGUL SYLLABLE SIOS-EO-SSANGSIOS
+BCBA C131 # HANGUL SYLLABLE SIOS-EO-IEUNG
+BCBB C136 # HANGUL SYLLABLE SIOS-EO-PHIEUPH
+BCBC C138 # HANGUL SYLLABLE SIOS-E
+BCBD C139 # HANGUL SYLLABLE SIOS-E-KIYEOK
+BCBE C13C # HANGUL SYLLABLE SIOS-E-NIEUN
+BCBF C140 # HANGUL SYLLABLE SIOS-E-RIEUL
+BCC0 C148 # HANGUL SYLLABLE SIOS-E-MIEUM
+BCC1 C149 # HANGUL SYLLABLE SIOS-E-PIEUP
+BCC2 C14B # HANGUL SYLLABLE SIOS-E-SIOS
+BCC3 C14C # HANGUL SYLLABLE SIOS-E-SSANGSIOS
+BCC4 C14D # HANGUL SYLLABLE SIOS-E-IEUNG
+BCC5 C154 # HANGUL SYLLABLE SIOS-YEO
+BCC6 C155 # HANGUL SYLLABLE SIOS-YEO-KIYEOK
+BCC7 C158 # HANGUL SYLLABLE SIOS-YEO-NIEUN
+BCC8 C15C # HANGUL SYLLABLE SIOS-YEO-RIEUL
+BCC9 C164 # HANGUL SYLLABLE SIOS-YEO-MIEUM
+BCCA C165 # HANGUL SYLLABLE SIOS-YEO-PIEUP
+BCCB C167 # HANGUL SYLLABLE SIOS-YEO-SIOS
+BCCC C168 # HANGUL SYLLABLE SIOS-YEO-SSANGSIOS
+BCCD C169 # HANGUL SYLLABLE SIOS-YEO-IEUNG
+BCCE C170 # HANGUL SYLLABLE SIOS-YE
+BCCF C174 # HANGUL SYLLABLE SIOS-YE-NIEUN
+BCD0 C178 # HANGUL SYLLABLE SIOS-YE-RIEUL
+BCD1 C185 # HANGUL SYLLABLE SIOS-YE-IEUNG
+BCD2 C18C # HANGUL SYLLABLE SIOS-O
+BCD3 C18D # HANGUL SYLLABLE SIOS-O-KIYEOK
+BCD4 C18E # HANGUL SYLLABLE SIOS-O-SSANGKIYEOK
+BCD5 C190 # HANGUL SYLLABLE SIOS-O-NIEUN
+BCD6 C194 # HANGUL SYLLABLE SIOS-O-RIEUL
+BCD7 C196 # HANGUL SYLLABLE SIOS-O-RIEULMIEUM
+BCD8 C19C # HANGUL SYLLABLE SIOS-O-MIEUM
+BCD9 C19D # HANGUL SYLLABLE SIOS-O-PIEUP
+BCDA C19F # HANGUL SYLLABLE SIOS-O-SIOS
+BCDB C1A1 # HANGUL SYLLABLE SIOS-O-IEUNG
+BCDC C1A5 # HANGUL SYLLABLE SIOS-O-THIEUTH
+BCDD C1A8 # HANGUL SYLLABLE SIOS-WA
+BCDE C1A9 # HANGUL SYLLABLE SIOS-WA-KIYEOK
+BCDF C1AC # HANGUL SYLLABLE SIOS-WA-NIEUN
+BCE0 C1B0 # HANGUL SYLLABLE SIOS-WA-RIEUL
+BCE1 C1BD # HANGUL SYLLABLE SIOS-WA-IEUNG
+BCE2 C1C4 # HANGUL SYLLABLE SIOS-WAE
+BCE3 C1C8 # HANGUL SYLLABLE SIOS-WAE-NIEUN
+BCE4 C1CC # HANGUL SYLLABLE SIOS-WAE-RIEUL
+BCE5 C1D4 # HANGUL SYLLABLE SIOS-WAE-MIEUM
+BCE6 C1D7 # HANGUL SYLLABLE SIOS-WAE-SIOS
+BCE7 C1D8 # HANGUL SYLLABLE SIOS-WAE-SSANGSIOS
+BCE8 C1E0 # HANGUL SYLLABLE SIOS-OE
+BCE9 C1E4 # HANGUL SYLLABLE SIOS-OE-NIEUN
+BCEA C1E8 # HANGUL SYLLABLE SIOS-OE-RIEUL
+BCEB C1F0 # HANGUL SYLLABLE SIOS-OE-MIEUM
+BCEC C1F1 # HANGUL SYLLABLE SIOS-OE-PIEUP
+BCED C1F3 # HANGUL SYLLABLE SIOS-OE-SIOS
+BCEE C1FC # HANGUL SYLLABLE SIOS-YO
+BCEF C1FD # HANGUL SYLLABLE SIOS-YO-KIYEOK
+BCF0 C200 # HANGUL SYLLABLE SIOS-YO-NIEUN
+BCF1 C204 # HANGUL SYLLABLE SIOS-YO-RIEUL
+BCF2 C20C # HANGUL SYLLABLE SIOS-YO-MIEUM
+BCF3 C20D # HANGUL SYLLABLE SIOS-YO-PIEUP
+BCF4 C20F # HANGUL SYLLABLE SIOS-YO-SIOS
+BCF5 C211 # HANGUL SYLLABLE SIOS-YO-IEUNG
+BCF6 C218 # HANGUL SYLLABLE SIOS-U
+BCF7 C219 # HANGUL SYLLABLE SIOS-U-KIYEOK
+BCF8 C21C # HANGUL SYLLABLE SIOS-U-NIEUN
+BCF9 C21F # HANGUL SYLLABLE SIOS-U-TIKEUT
+BCFA C220 # HANGUL SYLLABLE SIOS-U-RIEUL
+BCFB C228 # HANGUL SYLLABLE SIOS-U-MIEUM
+BCFC C229 # HANGUL SYLLABLE SIOS-U-PIEUP
+BCFD C22B # HANGUL SYLLABLE SIOS-U-SIOS
+BCFE C22D # HANGUL SYLLABLE SIOS-U-IEUNG
+BD41 D3D7 # HANGUL SYLLABLE PHIEUPH-YE-TIKEUT
+BD42 D3D9 # HANGUL SYLLABLE PHIEUPH-YE-RIEULKIYEOK
+BD43 D3DA # HANGUL SYLLABLE PHIEUPH-YE-RIEULMIEUM
+BD44 D3DB # HANGUL SYLLABLE PHIEUPH-YE-RIEULPIEUP
+BD45 D3DC # HANGUL SYLLABLE PHIEUPH-YE-RIEULSIOS
+BD46 D3DD # HANGUL SYLLABLE PHIEUPH-YE-RIEULTHIEUTH
+BD47 D3DE # HANGUL SYLLABLE PHIEUPH-YE-RIEULPHIEUPH
+BD48 D3DF # HANGUL SYLLABLE PHIEUPH-YE-RIEULHIEUH
+BD49 D3E0 # HANGUL SYLLABLE PHIEUPH-YE-MIEUM
+BD4A D3E2 # HANGUL SYLLABLE PHIEUPH-YE-PIEUPSIOS
+BD4B D3E4 # HANGUL SYLLABLE PHIEUPH-YE-SSANGSIOS
+BD4C D3E5 # HANGUL SYLLABLE PHIEUPH-YE-IEUNG
+BD4D D3E6 # HANGUL SYLLABLE PHIEUPH-YE-CIEUC
+BD4E D3E7 # HANGUL SYLLABLE PHIEUPH-YE-CHIEUCH
+BD4F D3E8 # HANGUL SYLLABLE PHIEUPH-YE-KHIEUKH
+BD50 D3E9 # HANGUL SYLLABLE PHIEUPH-YE-THIEUTH
+BD51 D3EA # HANGUL SYLLABLE PHIEUPH-YE-PHIEUPH
+BD52 D3EB # HANGUL SYLLABLE PHIEUPH-YE-HIEUH
+BD53 D3EE # HANGUL SYLLABLE PHIEUPH-O-SSANGKIYEOK
+BD54 D3EF # HANGUL SYLLABLE PHIEUPH-O-KIYEOKSIOS
+BD55 D3F1 # HANGUL SYLLABLE PHIEUPH-O-NIEUNCIEUC
+BD56 D3F2 # HANGUL SYLLABLE PHIEUPH-O-NIEUNHIEUH
+BD57 D3F3 # HANGUL SYLLABLE PHIEUPH-O-TIKEUT
+BD58 D3F5 # HANGUL SYLLABLE PHIEUPH-O-RIEULKIYEOK
+BD59 D3F6 # HANGUL SYLLABLE PHIEUPH-O-RIEULMIEUM
+BD5A D3F7 # HANGUL SYLLABLE PHIEUPH-O-RIEULPIEUP
+BD61 D3F8 # HANGUL SYLLABLE PHIEUPH-O-RIEULSIOS
+BD62 D3F9 # HANGUL SYLLABLE PHIEUPH-O-RIEULTHIEUTH
+BD63 D3FA # HANGUL SYLLABLE PHIEUPH-O-RIEULPHIEUPH
+BD64 D3FB # HANGUL SYLLABLE PHIEUPH-O-RIEULHIEUH
+BD65 D3FE # HANGUL SYLLABLE PHIEUPH-O-PIEUPSIOS
+BD66 D400 # HANGUL SYLLABLE PHIEUPH-O-SSANGSIOS
+BD67 D402 # HANGUL SYLLABLE PHIEUPH-O-CIEUC
+BD68 D403 # HANGUL SYLLABLE PHIEUPH-O-CHIEUCH
+BD69 D404 # HANGUL SYLLABLE PHIEUPH-O-KHIEUKH
+BD6A D405 # HANGUL SYLLABLE PHIEUPH-O-THIEUTH
+BD6B D406 # HANGUL SYLLABLE PHIEUPH-O-PHIEUPH
+BD6C D407 # HANGUL SYLLABLE PHIEUPH-O-HIEUH
+BD6D D409 # HANGUL SYLLABLE PHIEUPH-WA-KIYEOK
+BD6E D40A # HANGUL SYLLABLE PHIEUPH-WA-SSANGKIYEOK
+BD6F D40B # HANGUL SYLLABLE PHIEUPH-WA-KIYEOKSIOS
+BD70 D40C # HANGUL SYLLABLE PHIEUPH-WA-NIEUN
+BD71 D40D # HANGUL SYLLABLE PHIEUPH-WA-NIEUNCIEUC
+BD72 D40E # HANGUL SYLLABLE PHIEUPH-WA-NIEUNHIEUH
+BD73 D40F # HANGUL SYLLABLE PHIEUPH-WA-TIKEUT
+BD74 D410 # HANGUL SYLLABLE PHIEUPH-WA-RIEUL
+BD75 D411 # HANGUL SYLLABLE PHIEUPH-WA-RIEULKIYEOK
+BD76 D412 # HANGUL SYLLABLE PHIEUPH-WA-RIEULMIEUM
+BD77 D413 # HANGUL SYLLABLE PHIEUPH-WA-RIEULPIEUP
+BD78 D414 # HANGUL SYLLABLE PHIEUPH-WA-RIEULSIOS
+BD79 D415 # HANGUL SYLLABLE PHIEUPH-WA-RIEULTHIEUTH
+BD7A D416 # HANGUL SYLLABLE PHIEUPH-WA-RIEULPHIEUPH
+BD81 D417 # HANGUL SYLLABLE PHIEUPH-WA-RIEULHIEUH
+BD82 D418 # HANGUL SYLLABLE PHIEUPH-WA-MIEUM
+BD83 D419 # HANGUL SYLLABLE PHIEUPH-WA-PIEUP
+BD84 D41A # HANGUL SYLLABLE PHIEUPH-WA-PIEUPSIOS
+BD85 D41B # HANGUL SYLLABLE PHIEUPH-WA-SIOS
+BD86 D41C # HANGUL SYLLABLE PHIEUPH-WA-SSANGSIOS
+BD87 D41E # HANGUL SYLLABLE PHIEUPH-WA-CIEUC
+BD88 D41F # HANGUL SYLLABLE PHIEUPH-WA-CHIEUCH
+BD89 D420 # HANGUL SYLLABLE PHIEUPH-WA-KHIEUKH
+BD8A D421 # HANGUL SYLLABLE PHIEUPH-WA-THIEUTH
+BD8B D422 # HANGUL SYLLABLE PHIEUPH-WA-PHIEUPH
+BD8C D423 # HANGUL SYLLABLE PHIEUPH-WA-HIEUH
+BD8D D424 # HANGUL SYLLABLE PHIEUPH-WAE
+BD8E D425 # HANGUL SYLLABLE PHIEUPH-WAE-KIYEOK
+BD8F D426 # HANGUL SYLLABLE PHIEUPH-WAE-SSANGKIYEOK
+BD90 D427 # HANGUL SYLLABLE PHIEUPH-WAE-KIYEOKSIOS
+BD91 D428 # HANGUL SYLLABLE PHIEUPH-WAE-NIEUN
+BD92 D429 # HANGUL SYLLABLE PHIEUPH-WAE-NIEUNCIEUC
+BD93 D42A # HANGUL SYLLABLE PHIEUPH-WAE-NIEUNHIEUH
+BD94 D42B # HANGUL SYLLABLE PHIEUPH-WAE-TIKEUT
+BD95 D42C # HANGUL SYLLABLE PHIEUPH-WAE-RIEUL
+BD96 D42D # HANGUL SYLLABLE PHIEUPH-WAE-RIEULKIYEOK
+BD97 D42E # HANGUL SYLLABLE PHIEUPH-WAE-RIEULMIEUM
+BD98 D42F # HANGUL SYLLABLE PHIEUPH-WAE-RIEULPIEUP
+BD99 D430 # HANGUL SYLLABLE PHIEUPH-WAE-RIEULSIOS
+BD9A D431 # HANGUL SYLLABLE PHIEUPH-WAE-RIEULTHIEUTH
+BD9B D432 # HANGUL SYLLABLE PHIEUPH-WAE-RIEULPHIEUPH
+BD9C D433 # HANGUL SYLLABLE PHIEUPH-WAE-RIEULHIEUH
+BD9D D434 # HANGUL SYLLABLE PHIEUPH-WAE-MIEUM
+BD9E D435 # HANGUL SYLLABLE PHIEUPH-WAE-PIEUP
+BD9F D436 # HANGUL SYLLABLE PHIEUPH-WAE-PIEUPSIOS
+BDA0 D437 # HANGUL SYLLABLE PHIEUPH-WAE-SIOS
+BDA1 C22F # HANGUL SYLLABLE SIOS-U-CHIEUCH
+BDA2 C231 # HANGUL SYLLABLE SIOS-U-THIEUTH
+BDA3 C232 # HANGUL SYLLABLE SIOS-U-PHIEUPH
+BDA4 C234 # HANGUL SYLLABLE SIOS-WEO
+BDA5 C248 # HANGUL SYLLABLE SIOS-WEO-SSANGSIOS
+BDA6 C250 # HANGUL SYLLABLE SIOS-WE
+BDA7 C251 # HANGUL SYLLABLE SIOS-WE-KIYEOK
+BDA8 C254 # HANGUL SYLLABLE SIOS-WE-NIEUN
+BDA9 C258 # HANGUL SYLLABLE SIOS-WE-RIEUL
+BDAA C260 # HANGUL SYLLABLE SIOS-WE-MIEUM
+BDAB C265 # HANGUL SYLLABLE SIOS-WE-IEUNG
+BDAC C26C # HANGUL SYLLABLE SIOS-WI
+BDAD C26D # HANGUL SYLLABLE SIOS-WI-KIYEOK
+BDAE C270 # HANGUL SYLLABLE SIOS-WI-NIEUN
+BDAF C274 # HANGUL SYLLABLE SIOS-WI-RIEUL
+BDB0 C27C # HANGUL SYLLABLE SIOS-WI-MIEUM
+BDB1 C27D # HANGUL SYLLABLE SIOS-WI-PIEUP
+BDB2 C27F # HANGUL SYLLABLE SIOS-WI-SIOS
+BDB3 C281 # HANGUL SYLLABLE SIOS-WI-IEUNG
+BDB4 C288 # HANGUL SYLLABLE SIOS-YU
+BDB5 C289 # HANGUL SYLLABLE SIOS-YU-KIYEOK
+BDB6 C290 # HANGUL SYLLABLE SIOS-YU-RIEUL
+BDB7 C298 # HANGUL SYLLABLE SIOS-YU-MIEUM
+BDB8 C29B # HANGUL SYLLABLE SIOS-YU-SIOS
+BDB9 C29D # HANGUL SYLLABLE SIOS-YU-IEUNG
+BDBA C2A4 # HANGUL SYLLABLE SIOS-EU
+BDBB C2A5 # HANGUL SYLLABLE SIOS-EU-KIYEOK
+BDBC C2A8 # HANGUL SYLLABLE SIOS-EU-NIEUN
+BDBD C2AC # HANGUL SYLLABLE SIOS-EU-RIEUL
+BDBE C2AD # HANGUL SYLLABLE SIOS-EU-RIEULKIYEOK
+BDBF C2B4 # HANGUL SYLLABLE SIOS-EU-MIEUM
+BDC0 C2B5 # HANGUL SYLLABLE SIOS-EU-PIEUP
+BDC1 C2B7 # HANGUL SYLLABLE SIOS-EU-SIOS
+BDC2 C2B9 # HANGUL SYLLABLE SIOS-EU-IEUNG
+BDC3 C2DC # HANGUL SYLLABLE SIOS-I
+BDC4 C2DD # HANGUL SYLLABLE SIOS-I-KIYEOK
+BDC5 C2E0 # HANGUL SYLLABLE SIOS-I-NIEUN
+BDC6 C2E3 # HANGUL SYLLABLE SIOS-I-TIKEUT
+BDC7 C2E4 # HANGUL SYLLABLE SIOS-I-RIEUL
+BDC8 C2EB # HANGUL SYLLABLE SIOS-I-RIEULHIEUH
+BDC9 C2EC # HANGUL SYLLABLE SIOS-I-MIEUM
+BDCA C2ED # HANGUL SYLLABLE SIOS-I-PIEUP
+BDCB C2EF # HANGUL SYLLABLE SIOS-I-SIOS
+BDCC C2F1 # HANGUL SYLLABLE SIOS-I-IEUNG
+BDCD C2F6 # HANGUL SYLLABLE SIOS-I-PHIEUPH
+BDCE C2F8 # HANGUL SYLLABLE SSANGSIOS-A
+BDCF C2F9 # HANGUL SYLLABLE SSANGSIOS-A-KIYEOK
+BDD0 C2FB # HANGUL SYLLABLE SSANGSIOS-A-KIYEOKSIOS
+BDD1 C2FC # HANGUL SYLLABLE SSANGSIOS-A-NIEUN
+BDD2 C300 # HANGUL SYLLABLE SSANGSIOS-A-RIEUL
+BDD3 C308 # HANGUL SYLLABLE SSANGSIOS-A-MIEUM
+BDD4 C309 # HANGUL SYLLABLE SSANGSIOS-A-PIEUP
+BDD5 C30C # HANGUL SYLLABLE SSANGSIOS-A-SSANGSIOS
+BDD6 C30D # HANGUL SYLLABLE SSANGSIOS-A-IEUNG
+BDD7 C313 # HANGUL SYLLABLE SSANGSIOS-A-HIEUH
+BDD8 C314 # HANGUL SYLLABLE SSANGSIOS-AE
+BDD9 C315 # HANGUL SYLLABLE SSANGSIOS-AE-KIYEOK
+BDDA C318 # HANGUL SYLLABLE SSANGSIOS-AE-NIEUN
+BDDB C31C # HANGUL SYLLABLE SSANGSIOS-AE-RIEUL
+BDDC C324 # HANGUL SYLLABLE SSANGSIOS-AE-MIEUM
+BDDD C325 # HANGUL SYLLABLE SSANGSIOS-AE-PIEUP
+BDDE C328 # HANGUL SYLLABLE SSANGSIOS-AE-SSANGSIOS
+BDDF C329 # HANGUL SYLLABLE SSANGSIOS-AE-IEUNG
+BDE0 C345 # HANGUL SYLLABLE SSANGSIOS-YA-IEUNG
+BDE1 C368 # HANGUL SYLLABLE SSANGSIOS-EO
+BDE2 C369 # HANGUL SYLLABLE SSANGSIOS-EO-KIYEOK
+BDE3 C36C # HANGUL SYLLABLE SSANGSIOS-EO-NIEUN
+BDE4 C370 # HANGUL SYLLABLE SSANGSIOS-EO-RIEUL
+BDE5 C372 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULMIEUM
+BDE6 C378 # HANGUL SYLLABLE SSANGSIOS-EO-MIEUM
+BDE7 C379 # HANGUL SYLLABLE SSANGSIOS-EO-PIEUP
+BDE8 C37C # HANGUL SYLLABLE SSANGSIOS-EO-SSANGSIOS
+BDE9 C37D # HANGUL SYLLABLE SSANGSIOS-EO-IEUNG
+BDEA C384 # HANGUL SYLLABLE SSANGSIOS-E
+BDEB C388 # HANGUL SYLLABLE SSANGSIOS-E-NIEUN
+BDEC C38C # HANGUL SYLLABLE SSANGSIOS-E-RIEUL
+BDED C3C0 # HANGUL SYLLABLE SSANGSIOS-YE-NIEUN
+BDEE C3D8 # HANGUL SYLLABLE SSANGSIOS-O
+BDEF C3D9 # HANGUL SYLLABLE SSANGSIOS-O-KIYEOK
+BDF0 C3DC # HANGUL SYLLABLE SSANGSIOS-O-NIEUN
+BDF1 C3DF # HANGUL SYLLABLE SSANGSIOS-O-TIKEUT
+BDF2 C3E0 # HANGUL SYLLABLE SSANGSIOS-O-RIEUL
+BDF3 C3E2 # HANGUL SYLLABLE SSANGSIOS-O-RIEULMIEUM
+BDF4 C3E8 # HANGUL SYLLABLE SSANGSIOS-O-MIEUM
+BDF5 C3E9 # HANGUL SYLLABLE SSANGSIOS-O-PIEUP
+BDF6 C3ED # HANGUL SYLLABLE SSANGSIOS-O-IEUNG
+BDF7 C3F4 # HANGUL SYLLABLE SSANGSIOS-WA
+BDF8 C3F5 # HANGUL SYLLABLE SSANGSIOS-WA-KIYEOK
+BDF9 C3F8 # HANGUL SYLLABLE SSANGSIOS-WA-NIEUN
+BDFA C408 # HANGUL SYLLABLE SSANGSIOS-WA-SSANGSIOS
+BDFB C410 # HANGUL SYLLABLE SSANGSIOS-WAE
+BDFC C424 # HANGUL SYLLABLE SSANGSIOS-WAE-SSANGSIOS
+BDFD C42C # HANGUL SYLLABLE SSANGSIOS-OE
+BDFE C430 # HANGUL SYLLABLE SSANGSIOS-OE-NIEUN
+BE41 D438 # HANGUL SYLLABLE PHIEUPH-WAE-SSANGSIOS
+BE42 D439 # HANGUL SYLLABLE PHIEUPH-WAE-IEUNG
+BE43 D43A # HANGUL SYLLABLE PHIEUPH-WAE-CIEUC
+BE44 D43B # HANGUL SYLLABLE PHIEUPH-WAE-CHIEUCH
+BE45 D43C # HANGUL SYLLABLE PHIEUPH-WAE-KHIEUKH
+BE46 D43D # HANGUL SYLLABLE PHIEUPH-WAE-THIEUTH
+BE47 D43E # HANGUL SYLLABLE PHIEUPH-WAE-PHIEUPH
+BE48 D43F # HANGUL SYLLABLE PHIEUPH-WAE-HIEUH
+BE49 D441 # HANGUL SYLLABLE PHIEUPH-OE-KIYEOK
+BE4A D442 # HANGUL SYLLABLE PHIEUPH-OE-SSANGKIYEOK
+BE4B D443 # HANGUL SYLLABLE PHIEUPH-OE-KIYEOKSIOS
+BE4C D445 # HANGUL SYLLABLE PHIEUPH-OE-NIEUNCIEUC
+BE4D D446 # HANGUL SYLLABLE PHIEUPH-OE-NIEUNHIEUH
+BE4E D447 # HANGUL SYLLABLE PHIEUPH-OE-TIKEUT
+BE4F D448 # HANGUL SYLLABLE PHIEUPH-OE-RIEUL
+BE50 D449 # HANGUL SYLLABLE PHIEUPH-OE-RIEULKIYEOK
+BE51 D44A # HANGUL SYLLABLE PHIEUPH-OE-RIEULMIEUM
+BE52 D44B # HANGUL SYLLABLE PHIEUPH-OE-RIEULPIEUP
+BE53 D44C # HANGUL SYLLABLE PHIEUPH-OE-RIEULSIOS
+BE54 D44D # HANGUL SYLLABLE PHIEUPH-OE-RIEULTHIEUTH
+BE55 D44E # HANGUL SYLLABLE PHIEUPH-OE-RIEULPHIEUPH
+BE56 D44F # HANGUL SYLLABLE PHIEUPH-OE-RIEULHIEUH
+BE57 D450 # HANGUL SYLLABLE PHIEUPH-OE-MIEUM
+BE58 D451 # HANGUL SYLLABLE PHIEUPH-OE-PIEUP
+BE59 D452 # HANGUL SYLLABLE PHIEUPH-OE-PIEUPSIOS
+BE5A D453 # HANGUL SYLLABLE PHIEUPH-OE-SIOS
+BE61 D454 # HANGUL SYLLABLE PHIEUPH-OE-SSANGSIOS
+BE62 D455 # HANGUL SYLLABLE PHIEUPH-OE-IEUNG
+BE63 D456 # HANGUL SYLLABLE PHIEUPH-OE-CIEUC
+BE64 D457 # HANGUL SYLLABLE PHIEUPH-OE-CHIEUCH
+BE65 D458 # HANGUL SYLLABLE PHIEUPH-OE-KHIEUKH
+BE66 D459 # HANGUL SYLLABLE PHIEUPH-OE-THIEUTH
+BE67 D45A # HANGUL SYLLABLE PHIEUPH-OE-PHIEUPH
+BE68 D45B # HANGUL SYLLABLE PHIEUPH-OE-HIEUH
+BE69 D45D # HANGUL SYLLABLE PHIEUPH-YO-KIYEOK
+BE6A D45E # HANGUL SYLLABLE PHIEUPH-YO-SSANGKIYEOK
+BE6B D45F # HANGUL SYLLABLE PHIEUPH-YO-KIYEOKSIOS
+BE6C D461 # HANGUL SYLLABLE PHIEUPH-YO-NIEUNCIEUC
+BE6D D462 # HANGUL SYLLABLE PHIEUPH-YO-NIEUNHIEUH
+BE6E D463 # HANGUL SYLLABLE PHIEUPH-YO-TIKEUT
+BE6F D465 # HANGUL SYLLABLE PHIEUPH-YO-RIEULKIYEOK
+BE70 D466 # HANGUL SYLLABLE PHIEUPH-YO-RIEULMIEUM
+BE71 D467 # HANGUL SYLLABLE PHIEUPH-YO-RIEULPIEUP
+BE72 D468 # HANGUL SYLLABLE PHIEUPH-YO-RIEULSIOS
+BE73 D469 # HANGUL SYLLABLE PHIEUPH-YO-RIEULTHIEUTH
+BE74 D46A # HANGUL SYLLABLE PHIEUPH-YO-RIEULPHIEUPH
+BE75 D46B # HANGUL SYLLABLE PHIEUPH-YO-RIEULHIEUH
+BE76 D46C # HANGUL SYLLABLE PHIEUPH-YO-MIEUM
+BE77 D46E # HANGUL SYLLABLE PHIEUPH-YO-PIEUPSIOS
+BE78 D470 # HANGUL SYLLABLE PHIEUPH-YO-SSANGSIOS
+BE79 D471 # HANGUL SYLLABLE PHIEUPH-YO-IEUNG
+BE7A D472 # HANGUL SYLLABLE PHIEUPH-YO-CIEUC
+BE81 D473 # HANGUL SYLLABLE PHIEUPH-YO-CHIEUCH
+BE82 D474 # HANGUL SYLLABLE PHIEUPH-YO-KHIEUKH
+BE83 D475 # HANGUL SYLLABLE PHIEUPH-YO-THIEUTH
+BE84 D476 # HANGUL SYLLABLE PHIEUPH-YO-PHIEUPH
+BE85 D477 # HANGUL SYLLABLE PHIEUPH-YO-HIEUH
+BE86 D47A # HANGUL SYLLABLE PHIEUPH-U-SSANGKIYEOK
+BE87 D47B # HANGUL SYLLABLE PHIEUPH-U-KIYEOKSIOS
+BE88 D47D # HANGUL SYLLABLE PHIEUPH-U-NIEUNCIEUC
+BE89 D47E # HANGUL SYLLABLE PHIEUPH-U-NIEUNHIEUH
+BE8A D481 # HANGUL SYLLABLE PHIEUPH-U-RIEULKIYEOK
+BE8B D483 # HANGUL SYLLABLE PHIEUPH-U-RIEULPIEUP
+BE8C D484 # HANGUL SYLLABLE PHIEUPH-U-RIEULSIOS
+BE8D D485 # HANGUL SYLLABLE PHIEUPH-U-RIEULTHIEUTH
+BE8E D486 # HANGUL SYLLABLE PHIEUPH-U-RIEULPHIEUPH
+BE8F D487 # HANGUL SYLLABLE PHIEUPH-U-RIEULHIEUH
+BE90 D48A # HANGUL SYLLABLE PHIEUPH-U-PIEUPSIOS
+BE91 D48C # HANGUL SYLLABLE PHIEUPH-U-SSANGSIOS
+BE92 D48E # HANGUL SYLLABLE PHIEUPH-U-CIEUC
+BE93 D48F # HANGUL SYLLABLE PHIEUPH-U-CHIEUCH
+BE94 D490 # HANGUL SYLLABLE PHIEUPH-U-KHIEUKH
+BE95 D491 # HANGUL SYLLABLE PHIEUPH-U-THIEUTH
+BE96 D492 # HANGUL SYLLABLE PHIEUPH-U-PHIEUPH
+BE97 D493 # HANGUL SYLLABLE PHIEUPH-U-HIEUH
+BE98 D495 # HANGUL SYLLABLE PHIEUPH-WEO-KIYEOK
+BE99 D496 # HANGUL SYLLABLE PHIEUPH-WEO-SSANGKIYEOK
+BE9A D497 # HANGUL SYLLABLE PHIEUPH-WEO-KIYEOKSIOS
+BE9B D498 # HANGUL SYLLABLE PHIEUPH-WEO-NIEUN
+BE9C D499 # HANGUL SYLLABLE PHIEUPH-WEO-NIEUNCIEUC
+BE9D D49A # HANGUL SYLLABLE PHIEUPH-WEO-NIEUNHIEUH
+BE9E D49B # HANGUL SYLLABLE PHIEUPH-WEO-TIKEUT
+BE9F D49C # HANGUL SYLLABLE PHIEUPH-WEO-RIEUL
+BEA0 D49D # HANGUL SYLLABLE PHIEUPH-WEO-RIEULKIYEOK
+BEA1 C434 # HANGUL SYLLABLE SSANGSIOS-OE-RIEUL
+BEA2 C43C # HANGUL SYLLABLE SSANGSIOS-OE-MIEUM
+BEA3 C43D # HANGUL SYLLABLE SSANGSIOS-OE-PIEUP
+BEA4 C448 # HANGUL SYLLABLE SSANGSIOS-YO
+BEA5 C464 # HANGUL SYLLABLE SSANGSIOS-U
+BEA6 C465 # HANGUL SYLLABLE SSANGSIOS-U-KIYEOK
+BEA7 C468 # HANGUL SYLLABLE SSANGSIOS-U-NIEUN
+BEA8 C46C # HANGUL SYLLABLE SSANGSIOS-U-RIEUL
+BEA9 C474 # HANGUL SYLLABLE SSANGSIOS-U-MIEUM
+BEAA C475 # HANGUL SYLLABLE SSANGSIOS-U-PIEUP
+BEAB C479 # HANGUL SYLLABLE SSANGSIOS-U-IEUNG
+BEAC C480 # HANGUL SYLLABLE SSANGSIOS-WEO
+BEAD C494 # HANGUL SYLLABLE SSANGSIOS-WEO-SSANGSIOS
+BEAE C49C # HANGUL SYLLABLE SSANGSIOS-WE
+BEAF C4B8 # HANGUL SYLLABLE SSANGSIOS-WI
+BEB0 C4BC # HANGUL SYLLABLE SSANGSIOS-WI-NIEUN
+BEB1 C4E9 # HANGUL SYLLABLE SSANGSIOS-YU-IEUNG
+BEB2 C4F0 # HANGUL SYLLABLE SSANGSIOS-EU
+BEB3 C4F1 # HANGUL SYLLABLE SSANGSIOS-EU-KIYEOK
+BEB4 C4F4 # HANGUL SYLLABLE SSANGSIOS-EU-NIEUN
+BEB5 C4F8 # HANGUL SYLLABLE SSANGSIOS-EU-RIEUL
+BEB6 C4FA # HANGUL SYLLABLE SSANGSIOS-EU-RIEULMIEUM
+BEB7 C4FF # HANGUL SYLLABLE SSANGSIOS-EU-RIEULHIEUH
+BEB8 C500 # HANGUL SYLLABLE SSANGSIOS-EU-MIEUM
+BEB9 C501 # HANGUL SYLLABLE SSANGSIOS-EU-PIEUP
+BEBA C50C # HANGUL SYLLABLE SSANGSIOS-YI
+BEBB C510 # HANGUL SYLLABLE SSANGSIOS-YI-NIEUN
+BEBC C514 # HANGUL SYLLABLE SSANGSIOS-YI-RIEUL
+BEBD C51C # HANGUL SYLLABLE SSANGSIOS-YI-MIEUM
+BEBE C528 # HANGUL SYLLABLE SSANGSIOS-I
+BEBF C529 # HANGUL SYLLABLE SSANGSIOS-I-KIYEOK
+BEC0 C52C # HANGUL SYLLABLE SSANGSIOS-I-NIEUN
+BEC1 C530 # HANGUL SYLLABLE SSANGSIOS-I-RIEUL
+BEC2 C538 # HANGUL SYLLABLE SSANGSIOS-I-MIEUM
+BEC3 C539 # HANGUL SYLLABLE SSANGSIOS-I-PIEUP
+BEC4 C53B # HANGUL SYLLABLE SSANGSIOS-I-SIOS
+BEC5 C53D # HANGUL SYLLABLE SSANGSIOS-I-IEUNG
+BEC6 C544 # HANGUL SYLLABLE IEUNG-A
+BEC7 C545 # HANGUL SYLLABLE IEUNG-A-KIYEOK
+BEC8 C548 # HANGUL SYLLABLE IEUNG-A-NIEUN
+BEC9 C549 # HANGUL SYLLABLE IEUNG-A-NIEUNCIEUC
+BECA C54A # HANGUL SYLLABLE IEUNG-A-NIEUNHIEUH
+BECB C54C # HANGUL SYLLABLE IEUNG-A-RIEUL
+BECC C54D # HANGUL SYLLABLE IEUNG-A-RIEULKIYEOK
+BECD C54E # HANGUL SYLLABLE IEUNG-A-RIEULMIEUM
+BECE C553 # HANGUL SYLLABLE IEUNG-A-RIEULHIEUH
+BECF C554 # HANGUL SYLLABLE IEUNG-A-MIEUM
+BED0 C555 # HANGUL SYLLABLE IEUNG-A-PIEUP
+BED1 C557 # HANGUL SYLLABLE IEUNG-A-SIOS
+BED2 C558 # HANGUL SYLLABLE IEUNG-A-SSANGSIOS
+BED3 C559 # HANGUL SYLLABLE IEUNG-A-IEUNG
+BED4 C55D # HANGUL SYLLABLE IEUNG-A-THIEUTH
+BED5 C55E # HANGUL SYLLABLE IEUNG-A-PHIEUPH
+BED6 C560 # HANGUL SYLLABLE IEUNG-AE
+BED7 C561 # HANGUL SYLLABLE IEUNG-AE-KIYEOK
+BED8 C564 # HANGUL SYLLABLE IEUNG-AE-NIEUN
+BED9 C568 # HANGUL SYLLABLE IEUNG-AE-RIEUL
+BEDA C570 # HANGUL SYLLABLE IEUNG-AE-MIEUM
+BEDB C571 # HANGUL SYLLABLE IEUNG-AE-PIEUP
+BEDC C573 # HANGUL SYLLABLE IEUNG-AE-SIOS
+BEDD C574 # HANGUL SYLLABLE IEUNG-AE-SSANGSIOS
+BEDE C575 # HANGUL SYLLABLE IEUNG-AE-IEUNG
+BEDF C57C # HANGUL SYLLABLE IEUNG-YA
+BEE0 C57D # HANGUL SYLLABLE IEUNG-YA-KIYEOK
+BEE1 C580 # HANGUL SYLLABLE IEUNG-YA-NIEUN
+BEE2 C584 # HANGUL SYLLABLE IEUNG-YA-RIEUL
+BEE3 C587 # HANGUL SYLLABLE IEUNG-YA-RIEULPIEUP
+BEE4 C58C # HANGUL SYLLABLE IEUNG-YA-MIEUM
+BEE5 C58D # HANGUL SYLLABLE IEUNG-YA-PIEUP
+BEE6 C58F # HANGUL SYLLABLE IEUNG-YA-SIOS
+BEE7 C591 # HANGUL SYLLABLE IEUNG-YA-IEUNG
+BEE8 C595 # HANGUL SYLLABLE IEUNG-YA-THIEUTH
+BEE9 C597 # HANGUL SYLLABLE IEUNG-YA-HIEUH
+BEEA C598 # HANGUL SYLLABLE IEUNG-YAE
+BEEB C59C # HANGUL SYLLABLE IEUNG-YAE-NIEUN
+BEEC C5A0 # HANGUL SYLLABLE IEUNG-YAE-RIEUL
+BEED C5A9 # HANGUL SYLLABLE IEUNG-YAE-PIEUP
+BEEE C5B4 # HANGUL SYLLABLE IEUNG-EO
+BEEF C5B5 # HANGUL SYLLABLE IEUNG-EO-KIYEOK
+BEF0 C5B8 # HANGUL SYLLABLE IEUNG-EO-NIEUN
+BEF1 C5B9 # HANGUL SYLLABLE IEUNG-EO-NIEUNCIEUC
+BEF2 C5BB # HANGUL SYLLABLE IEUNG-EO-TIKEUT
+BEF3 C5BC # HANGUL SYLLABLE IEUNG-EO-RIEUL
+BEF4 C5BD # HANGUL SYLLABLE IEUNG-EO-RIEULKIYEOK
+BEF5 C5BE # HANGUL SYLLABLE IEUNG-EO-RIEULMIEUM
+BEF6 C5C4 # HANGUL SYLLABLE IEUNG-EO-MIEUM
+BEF7 C5C5 # HANGUL SYLLABLE IEUNG-EO-PIEUP
+BEF8 C5C6 # HANGUL SYLLABLE IEUNG-EO-PIEUPSIOS
+BEF9 C5C7 # HANGUL SYLLABLE IEUNG-EO-SIOS
+BEFA C5C8 # HANGUL SYLLABLE IEUNG-EO-SSANGSIOS
+BEFB C5C9 # HANGUL SYLLABLE IEUNG-EO-IEUNG
+BEFC C5CA # HANGUL SYLLABLE IEUNG-EO-CIEUC
+BEFD C5CC # HANGUL SYLLABLE IEUNG-EO-KHIEUKH
+BEFE C5CE # HANGUL SYLLABLE IEUNG-EO-PHIEUPH
+BF41 D49E # HANGUL SYLLABLE PHIEUPH-WEO-RIEULMIEUM
+BF42 D49F # HANGUL SYLLABLE PHIEUPH-WEO-RIEULPIEUP
+BF43 D4A0 # HANGUL SYLLABLE PHIEUPH-WEO-RIEULSIOS
+BF44 D4A1 # HANGUL SYLLABLE PHIEUPH-WEO-RIEULTHIEUTH
+BF45 D4A2 # HANGUL SYLLABLE PHIEUPH-WEO-RIEULPHIEUPH
+BF46 D4A3 # HANGUL SYLLABLE PHIEUPH-WEO-RIEULHIEUH
+BF47 D4A4 # HANGUL SYLLABLE PHIEUPH-WEO-MIEUM
+BF48 D4A5 # HANGUL SYLLABLE PHIEUPH-WEO-PIEUP
+BF49 D4A6 # HANGUL SYLLABLE PHIEUPH-WEO-PIEUPSIOS
+BF4A D4A7 # HANGUL SYLLABLE PHIEUPH-WEO-SIOS
+BF4B D4A8 # HANGUL SYLLABLE PHIEUPH-WEO-SSANGSIOS
+BF4C D4AA # HANGUL SYLLABLE PHIEUPH-WEO-CIEUC
+BF4D D4AB # HANGUL SYLLABLE PHIEUPH-WEO-CHIEUCH
+BF4E D4AC # HANGUL SYLLABLE PHIEUPH-WEO-KHIEUKH
+BF4F D4AD # HANGUL SYLLABLE PHIEUPH-WEO-THIEUTH
+BF50 D4AE # HANGUL SYLLABLE PHIEUPH-WEO-PHIEUPH
+BF51 D4AF # HANGUL SYLLABLE PHIEUPH-WEO-HIEUH
+BF52 D4B0 # HANGUL SYLLABLE PHIEUPH-WE
+BF53 D4B1 # HANGUL SYLLABLE PHIEUPH-WE-KIYEOK
+BF54 D4B2 # HANGUL SYLLABLE PHIEUPH-WE-SSANGKIYEOK
+BF55 D4B3 # HANGUL SYLLABLE PHIEUPH-WE-KIYEOKSIOS
+BF56 D4B4 # HANGUL SYLLABLE PHIEUPH-WE-NIEUN
+BF57 D4B5 # HANGUL SYLLABLE PHIEUPH-WE-NIEUNCIEUC
+BF58 D4B6 # HANGUL SYLLABLE PHIEUPH-WE-NIEUNHIEUH
+BF59 D4B7 # HANGUL SYLLABLE PHIEUPH-WE-TIKEUT
+BF5A D4B8 # HANGUL SYLLABLE PHIEUPH-WE-RIEUL
+BF61 D4B9 # HANGUL SYLLABLE PHIEUPH-WE-RIEULKIYEOK
+BF62 D4BA # HANGUL SYLLABLE PHIEUPH-WE-RIEULMIEUM
+BF63 D4BB # HANGUL SYLLABLE PHIEUPH-WE-RIEULPIEUP
+BF64 D4BC # HANGUL SYLLABLE PHIEUPH-WE-RIEULSIOS
+BF65 D4BD # HANGUL SYLLABLE PHIEUPH-WE-RIEULTHIEUTH
+BF66 D4BE # HANGUL SYLLABLE PHIEUPH-WE-RIEULPHIEUPH
+BF67 D4BF # HANGUL SYLLABLE PHIEUPH-WE-RIEULHIEUH
+BF68 D4C0 # HANGUL SYLLABLE PHIEUPH-WE-MIEUM
+BF69 D4C1 # HANGUL SYLLABLE PHIEUPH-WE-PIEUP
+BF6A D4C2 # HANGUL SYLLABLE PHIEUPH-WE-PIEUPSIOS
+BF6B D4C3 # HANGUL SYLLABLE PHIEUPH-WE-SIOS
+BF6C D4C4 # HANGUL SYLLABLE PHIEUPH-WE-SSANGSIOS
+BF6D D4C5 # HANGUL SYLLABLE PHIEUPH-WE-IEUNG
+BF6E D4C6 # HANGUL SYLLABLE PHIEUPH-WE-CIEUC
+BF6F D4C7 # HANGUL SYLLABLE PHIEUPH-WE-CHIEUCH
+BF70 D4C8 # HANGUL SYLLABLE PHIEUPH-WE-KHIEUKH
+BF71 D4C9 # HANGUL SYLLABLE PHIEUPH-WE-THIEUTH
+BF72 D4CA # HANGUL SYLLABLE PHIEUPH-WE-PHIEUPH
+BF73 D4CB # HANGUL SYLLABLE PHIEUPH-WE-HIEUH
+BF74 D4CD # HANGUL SYLLABLE PHIEUPH-WI-KIYEOK
+BF75 D4CE # HANGUL SYLLABLE PHIEUPH-WI-SSANGKIYEOK
+BF76 D4CF # HANGUL SYLLABLE PHIEUPH-WI-KIYEOKSIOS
+BF77 D4D1 # HANGUL SYLLABLE PHIEUPH-WI-NIEUNCIEUC
+BF78 D4D2 # HANGUL SYLLABLE PHIEUPH-WI-NIEUNHIEUH
+BF79 D4D3 # HANGUL SYLLABLE PHIEUPH-WI-TIKEUT
+BF7A D4D5 # HANGUL SYLLABLE PHIEUPH-WI-RIEULKIYEOK
+BF81 D4D6 # HANGUL SYLLABLE PHIEUPH-WI-RIEULMIEUM
+BF82 D4D7 # HANGUL SYLLABLE PHIEUPH-WI-RIEULPIEUP
+BF83 D4D8 # HANGUL SYLLABLE PHIEUPH-WI-RIEULSIOS
+BF84 D4D9 # HANGUL SYLLABLE PHIEUPH-WI-RIEULTHIEUTH
+BF85 D4DA # HANGUL SYLLABLE PHIEUPH-WI-RIEULPHIEUPH
+BF86 D4DB # HANGUL SYLLABLE PHIEUPH-WI-RIEULHIEUH
+BF87 D4DD # HANGUL SYLLABLE PHIEUPH-WI-PIEUP
+BF88 D4DE # HANGUL SYLLABLE PHIEUPH-WI-PIEUPSIOS
+BF89 D4E0 # HANGUL SYLLABLE PHIEUPH-WI-SSANGSIOS
+BF8A D4E1 # HANGUL SYLLABLE PHIEUPH-WI-IEUNG
+BF8B D4E2 # HANGUL SYLLABLE PHIEUPH-WI-CIEUC
+BF8C D4E3 # HANGUL SYLLABLE PHIEUPH-WI-CHIEUCH
+BF8D D4E4 # HANGUL SYLLABLE PHIEUPH-WI-KHIEUKH
+BF8E D4E5 # HANGUL SYLLABLE PHIEUPH-WI-THIEUTH
+BF8F D4E6 # HANGUL SYLLABLE PHIEUPH-WI-PHIEUPH
+BF90 D4E7 # HANGUL SYLLABLE PHIEUPH-WI-HIEUH
+BF91 D4E9 # HANGUL SYLLABLE PHIEUPH-YU-KIYEOK
+BF92 D4EA # HANGUL SYLLABLE PHIEUPH-YU-SSANGKIYEOK
+BF93 D4EB # HANGUL SYLLABLE PHIEUPH-YU-KIYEOKSIOS
+BF94 D4ED # HANGUL SYLLABLE PHIEUPH-YU-NIEUNCIEUC
+BF95 D4EE # HANGUL SYLLABLE PHIEUPH-YU-NIEUNHIEUH
+BF96 D4EF # HANGUL SYLLABLE PHIEUPH-YU-TIKEUT
+BF97 D4F1 # HANGUL SYLLABLE PHIEUPH-YU-RIEULKIYEOK
+BF98 D4F2 # HANGUL SYLLABLE PHIEUPH-YU-RIEULMIEUM
+BF99 D4F3 # HANGUL SYLLABLE PHIEUPH-YU-RIEULPIEUP
+BF9A D4F4 # HANGUL SYLLABLE PHIEUPH-YU-RIEULSIOS
+BF9B D4F5 # HANGUL SYLLABLE PHIEUPH-YU-RIEULTHIEUTH
+BF9C D4F6 # HANGUL SYLLABLE PHIEUPH-YU-RIEULPHIEUPH
+BF9D D4F7 # HANGUL SYLLABLE PHIEUPH-YU-RIEULHIEUH
+BF9E D4F9 # HANGUL SYLLABLE PHIEUPH-YU-PIEUP
+BF9F D4FA # HANGUL SYLLABLE PHIEUPH-YU-PIEUPSIOS
+BFA0 D4FC # HANGUL SYLLABLE PHIEUPH-YU-SSANGSIOS
+BFA1 C5D0 # HANGUL SYLLABLE IEUNG-E
+BFA2 C5D1 # HANGUL SYLLABLE IEUNG-E-KIYEOK
+BFA3 C5D4 # HANGUL SYLLABLE IEUNG-E-NIEUN
+BFA4 C5D8 # HANGUL SYLLABLE IEUNG-E-RIEUL
+BFA5 C5E0 # HANGUL SYLLABLE IEUNG-E-MIEUM
+BFA6 C5E1 # HANGUL SYLLABLE IEUNG-E-PIEUP
+BFA7 C5E3 # HANGUL SYLLABLE IEUNG-E-SIOS
+BFA8 C5E5 # HANGUL SYLLABLE IEUNG-E-IEUNG
+BFA9 C5EC # HANGUL SYLLABLE IEUNG-YEO
+BFAA C5ED # HANGUL SYLLABLE IEUNG-YEO-KIYEOK
+BFAB C5EE # HANGUL SYLLABLE IEUNG-YEO-SSANGKIYEOK
+BFAC C5F0 # HANGUL SYLLABLE IEUNG-YEO-NIEUN
+BFAD C5F4 # HANGUL SYLLABLE IEUNG-YEO-RIEUL
+BFAE C5F6 # HANGUL SYLLABLE IEUNG-YEO-RIEULMIEUM
+BFAF C5F7 # HANGUL SYLLABLE IEUNG-YEO-RIEULPIEUP
+BFB0 C5FC # HANGUL SYLLABLE IEUNG-YEO-MIEUM
+BFB1 C5FD # HANGUL SYLLABLE IEUNG-YEO-PIEUP
+BFB2 C5FE # HANGUL SYLLABLE IEUNG-YEO-PIEUPSIOS
+BFB3 C5FF # HANGUL SYLLABLE IEUNG-YEO-SIOS
+BFB4 C600 # HANGUL SYLLABLE IEUNG-YEO-SSANGSIOS
+BFB5 C601 # HANGUL SYLLABLE IEUNG-YEO-IEUNG
+BFB6 C605 # HANGUL SYLLABLE IEUNG-YEO-THIEUTH
+BFB7 C606 # HANGUL SYLLABLE IEUNG-YEO-PHIEUPH
+BFB8 C607 # HANGUL SYLLABLE IEUNG-YEO-HIEUH
+BFB9 C608 # HANGUL SYLLABLE IEUNG-YE
+BFBA C60C # HANGUL SYLLABLE IEUNG-YE-NIEUN
+BFBB C610 # HANGUL SYLLABLE IEUNG-YE-RIEUL
+BFBC C618 # HANGUL SYLLABLE IEUNG-YE-MIEUM
+BFBD C619 # HANGUL SYLLABLE IEUNG-YE-PIEUP
+BFBE C61B # HANGUL SYLLABLE IEUNG-YE-SIOS
+BFBF C61C # HANGUL SYLLABLE IEUNG-YE-SSANGSIOS
+BFC0 C624 # HANGUL SYLLABLE IEUNG-O
+BFC1 C625 # HANGUL SYLLABLE IEUNG-O-KIYEOK
+BFC2 C628 # HANGUL SYLLABLE IEUNG-O-NIEUN
+BFC3 C62C # HANGUL SYLLABLE IEUNG-O-RIEUL
+BFC4 C62D # HANGUL SYLLABLE IEUNG-O-RIEULKIYEOK
+BFC5 C62E # HANGUL SYLLABLE IEUNG-O-RIEULMIEUM
+BFC6 C630 # HANGUL SYLLABLE IEUNG-O-RIEULSIOS
+BFC7 C633 # HANGUL SYLLABLE IEUNG-O-RIEULHIEUH
+BFC8 C634 # HANGUL SYLLABLE IEUNG-O-MIEUM
+BFC9 C635 # HANGUL SYLLABLE IEUNG-O-PIEUP
+BFCA C637 # HANGUL SYLLABLE IEUNG-O-SIOS
+BFCB C639 # HANGUL SYLLABLE IEUNG-O-IEUNG
+BFCC C63B # HANGUL SYLLABLE IEUNG-O-CHIEUCH
+BFCD C640 # HANGUL SYLLABLE IEUNG-WA
+BFCE C641 # HANGUL SYLLABLE IEUNG-WA-KIYEOK
+BFCF C644 # HANGUL SYLLABLE IEUNG-WA-NIEUN
+BFD0 C648 # HANGUL SYLLABLE IEUNG-WA-RIEUL
+BFD1 C650 # HANGUL SYLLABLE IEUNG-WA-MIEUM
+BFD2 C651 # HANGUL SYLLABLE IEUNG-WA-PIEUP
+BFD3 C653 # HANGUL SYLLABLE IEUNG-WA-SIOS
+BFD4 C654 # HANGUL SYLLABLE IEUNG-WA-SSANGSIOS
+BFD5 C655 # HANGUL SYLLABLE IEUNG-WA-IEUNG
+BFD6 C65C # HANGUL SYLLABLE IEUNG-WAE
+BFD7 C65D # HANGUL SYLLABLE IEUNG-WAE-KIYEOK
+BFD8 C660 # HANGUL SYLLABLE IEUNG-WAE-NIEUN
+BFD9 C66C # HANGUL SYLLABLE IEUNG-WAE-MIEUM
+BFDA C66F # HANGUL SYLLABLE IEUNG-WAE-SIOS
+BFDB C671 # HANGUL SYLLABLE IEUNG-WAE-IEUNG
+BFDC C678 # HANGUL SYLLABLE IEUNG-OE
+BFDD C679 # HANGUL SYLLABLE IEUNG-OE-KIYEOK
+BFDE C67C # HANGUL SYLLABLE IEUNG-OE-NIEUN
+BFDF C680 # HANGUL SYLLABLE IEUNG-OE-RIEUL
+BFE0 C688 # HANGUL SYLLABLE IEUNG-OE-MIEUM
+BFE1 C689 # HANGUL SYLLABLE IEUNG-OE-PIEUP
+BFE2 C68B # HANGUL SYLLABLE IEUNG-OE-SIOS
+BFE3 C68D # HANGUL SYLLABLE IEUNG-OE-IEUNG
+BFE4 C694 # HANGUL SYLLABLE IEUNG-YO
+BFE5 C695 # HANGUL SYLLABLE IEUNG-YO-KIYEOK
+BFE6 C698 # HANGUL SYLLABLE IEUNG-YO-NIEUN
+BFE7 C69C # HANGUL SYLLABLE IEUNG-YO-RIEUL
+BFE8 C6A4 # HANGUL SYLLABLE IEUNG-YO-MIEUM
+BFE9 C6A5 # HANGUL SYLLABLE IEUNG-YO-PIEUP
+BFEA C6A7 # HANGUL SYLLABLE IEUNG-YO-SIOS
+BFEB C6A9 # HANGUL SYLLABLE IEUNG-YO-IEUNG
+BFEC C6B0 # HANGUL SYLLABLE IEUNG-U
+BFED C6B1 # HANGUL SYLLABLE IEUNG-U-KIYEOK
+BFEE C6B4 # HANGUL SYLLABLE IEUNG-U-NIEUN
+BFEF C6B8 # HANGUL SYLLABLE IEUNG-U-RIEUL
+BFF0 C6B9 # HANGUL SYLLABLE IEUNG-U-RIEULKIYEOK
+BFF1 C6BA # HANGUL SYLLABLE IEUNG-U-RIEULMIEUM
+BFF2 C6C0 # HANGUL SYLLABLE IEUNG-U-MIEUM
+BFF3 C6C1 # HANGUL SYLLABLE IEUNG-U-PIEUP
+BFF4 C6C3 # HANGUL SYLLABLE IEUNG-U-SIOS
+BFF5 C6C5 # HANGUL SYLLABLE IEUNG-U-IEUNG
+BFF6 C6CC # HANGUL SYLLABLE IEUNG-WEO
+BFF7 C6CD # HANGUL SYLLABLE IEUNG-WEO-KIYEOK
+BFF8 C6D0 # HANGUL SYLLABLE IEUNG-WEO-NIEUN
+BFF9 C6D4 # HANGUL SYLLABLE IEUNG-WEO-RIEUL
+BFFA C6DC # HANGUL SYLLABLE IEUNG-WEO-MIEUM
+BFFB C6DD # HANGUL SYLLABLE IEUNG-WEO-PIEUP
+BFFC C6E0 # HANGUL SYLLABLE IEUNG-WEO-SSANGSIOS
+BFFD C6E1 # HANGUL SYLLABLE IEUNG-WEO-IEUNG
+BFFE C6E8 # HANGUL SYLLABLE IEUNG-WE
+C041 D4FE # HANGUL SYLLABLE PHIEUPH-YU-CIEUC
+C042 D4FF # HANGUL SYLLABLE PHIEUPH-YU-CHIEUCH
+C043 D500 # HANGUL SYLLABLE PHIEUPH-YU-KHIEUKH
+C044 D501 # HANGUL SYLLABLE PHIEUPH-YU-THIEUTH
+C045 D502 # HANGUL SYLLABLE PHIEUPH-YU-PHIEUPH
+C046 D503 # HANGUL SYLLABLE PHIEUPH-YU-HIEUH
+C047 D505 # HANGUL SYLLABLE PHIEUPH-EU-KIYEOK
+C048 D506 # HANGUL SYLLABLE PHIEUPH-EU-SSANGKIYEOK
+C049 D507 # HANGUL SYLLABLE PHIEUPH-EU-KIYEOKSIOS
+C04A D509 # HANGUL SYLLABLE PHIEUPH-EU-NIEUNCIEUC
+C04B D50A # HANGUL SYLLABLE PHIEUPH-EU-NIEUNHIEUH
+C04C D50B # HANGUL SYLLABLE PHIEUPH-EU-TIKEUT
+C04D D50D # HANGUL SYLLABLE PHIEUPH-EU-RIEULKIYEOK
+C04E D50E # HANGUL SYLLABLE PHIEUPH-EU-RIEULMIEUM
+C04F D50F # HANGUL SYLLABLE PHIEUPH-EU-RIEULPIEUP
+C050 D510 # HANGUL SYLLABLE PHIEUPH-EU-RIEULSIOS
+C051 D511 # HANGUL SYLLABLE PHIEUPH-EU-RIEULTHIEUTH
+C052 D512 # HANGUL SYLLABLE PHIEUPH-EU-RIEULPHIEUPH
+C053 D513 # HANGUL SYLLABLE PHIEUPH-EU-RIEULHIEUH
+C054 D516 # HANGUL SYLLABLE PHIEUPH-EU-PIEUPSIOS
+C055 D518 # HANGUL SYLLABLE PHIEUPH-EU-SSANGSIOS
+C056 D519 # HANGUL SYLLABLE PHIEUPH-EU-IEUNG
+C057 D51A # HANGUL SYLLABLE PHIEUPH-EU-CIEUC
+C058 D51B # HANGUL SYLLABLE PHIEUPH-EU-CHIEUCH
+C059 D51C # HANGUL SYLLABLE PHIEUPH-EU-KHIEUKH
+C05A D51D # HANGUL SYLLABLE PHIEUPH-EU-THIEUTH
+C061 D51E # HANGUL SYLLABLE PHIEUPH-EU-PHIEUPH
+C062 D51F # HANGUL SYLLABLE PHIEUPH-EU-HIEUH
+C063 D520 # HANGUL SYLLABLE PHIEUPH-YI
+C064 D521 # HANGUL SYLLABLE PHIEUPH-YI-KIYEOK
+C065 D522 # HANGUL SYLLABLE PHIEUPH-YI-SSANGKIYEOK
+C066 D523 # HANGUL SYLLABLE PHIEUPH-YI-KIYEOKSIOS
+C067 D524 # HANGUL SYLLABLE PHIEUPH-YI-NIEUN
+C068 D525 # HANGUL SYLLABLE PHIEUPH-YI-NIEUNCIEUC
+C069 D526 # HANGUL SYLLABLE PHIEUPH-YI-NIEUNHIEUH
+C06A D527 # HANGUL SYLLABLE PHIEUPH-YI-TIKEUT
+C06B D528 # HANGUL SYLLABLE PHIEUPH-YI-RIEUL
+C06C D529 # HANGUL SYLLABLE PHIEUPH-YI-RIEULKIYEOK
+C06D D52A # HANGUL SYLLABLE PHIEUPH-YI-RIEULMIEUM
+C06E D52B # HANGUL SYLLABLE PHIEUPH-YI-RIEULPIEUP
+C06F D52C # HANGUL SYLLABLE PHIEUPH-YI-RIEULSIOS
+C070 D52D # HANGUL SYLLABLE PHIEUPH-YI-RIEULTHIEUTH
+C071 D52E # HANGUL SYLLABLE PHIEUPH-YI-RIEULPHIEUPH
+C072 D52F # HANGUL SYLLABLE PHIEUPH-YI-RIEULHIEUH
+C073 D530 # HANGUL SYLLABLE PHIEUPH-YI-MIEUM
+C074 D531 # HANGUL SYLLABLE PHIEUPH-YI-PIEUP
+C075 D532 # HANGUL SYLLABLE PHIEUPH-YI-PIEUPSIOS
+C076 D533 # HANGUL SYLLABLE PHIEUPH-YI-SIOS
+C077 D534 # HANGUL SYLLABLE PHIEUPH-YI-SSANGSIOS
+C078 D535 # HANGUL SYLLABLE PHIEUPH-YI-IEUNG
+C079 D536 # HANGUL SYLLABLE PHIEUPH-YI-CIEUC
+C07A D537 # HANGUL SYLLABLE PHIEUPH-YI-CHIEUCH
+C081 D538 # HANGUL SYLLABLE PHIEUPH-YI-KHIEUKH
+C082 D539 # HANGUL SYLLABLE PHIEUPH-YI-THIEUTH
+C083 D53A # HANGUL SYLLABLE PHIEUPH-YI-PHIEUPH
+C084 D53B # HANGUL SYLLABLE PHIEUPH-YI-HIEUH
+C085 D53E # HANGUL SYLLABLE PHIEUPH-I-SSANGKIYEOK
+C086 D53F # HANGUL SYLLABLE PHIEUPH-I-KIYEOKSIOS
+C087 D541 # HANGUL SYLLABLE PHIEUPH-I-NIEUNCIEUC
+C088 D542 # HANGUL SYLLABLE PHIEUPH-I-NIEUNHIEUH
+C089 D543 # HANGUL SYLLABLE PHIEUPH-I-TIKEUT
+C08A D545 # HANGUL SYLLABLE PHIEUPH-I-RIEULKIYEOK
+C08B D546 # HANGUL SYLLABLE PHIEUPH-I-RIEULMIEUM
+C08C D547 # HANGUL SYLLABLE PHIEUPH-I-RIEULPIEUP
+C08D D548 # HANGUL SYLLABLE PHIEUPH-I-RIEULSIOS
+C08E D549 # HANGUL SYLLABLE PHIEUPH-I-RIEULTHIEUTH
+C08F D54A # HANGUL SYLLABLE PHIEUPH-I-RIEULPHIEUPH
+C090 D54B # HANGUL SYLLABLE PHIEUPH-I-RIEULHIEUH
+C091 D54E # HANGUL SYLLABLE PHIEUPH-I-PIEUPSIOS
+C092 D550 # HANGUL SYLLABLE PHIEUPH-I-SSANGSIOS
+C093 D552 # HANGUL SYLLABLE PHIEUPH-I-CIEUC
+C094 D553 # HANGUL SYLLABLE PHIEUPH-I-CHIEUCH
+C095 D554 # HANGUL SYLLABLE PHIEUPH-I-KHIEUKH
+C096 D555 # HANGUL SYLLABLE PHIEUPH-I-THIEUTH
+C097 D556 # HANGUL SYLLABLE PHIEUPH-I-PHIEUPH
+C098 D557 # HANGUL SYLLABLE PHIEUPH-I-HIEUH
+C099 D55A # HANGUL SYLLABLE HIEUH-A-SSANGKIYEOK
+C09A D55B # HANGUL SYLLABLE HIEUH-A-KIYEOKSIOS
+C09B D55D # HANGUL SYLLABLE HIEUH-A-NIEUNCIEUC
+C09C D55E # HANGUL SYLLABLE HIEUH-A-NIEUNHIEUH
+C09D D55F # HANGUL SYLLABLE HIEUH-A-TIKEUT
+C09E D561 # HANGUL SYLLABLE HIEUH-A-RIEULKIYEOK
+C09F D562 # HANGUL SYLLABLE HIEUH-A-RIEULMIEUM
+C0A0 D563 # HANGUL SYLLABLE HIEUH-A-RIEULPIEUP
+C0A1 C6E9 # HANGUL SYLLABLE IEUNG-WE-KIYEOK
+C0A2 C6EC # HANGUL SYLLABLE IEUNG-WE-NIEUN
+C0A3 C6F0 # HANGUL SYLLABLE IEUNG-WE-RIEUL
+C0A4 C6F8 # HANGUL SYLLABLE IEUNG-WE-MIEUM
+C0A5 C6F9 # HANGUL SYLLABLE IEUNG-WE-PIEUP
+C0A6 C6FD # HANGUL SYLLABLE IEUNG-WE-IEUNG
+C0A7 C704 # HANGUL SYLLABLE IEUNG-WI
+C0A8 C705 # HANGUL SYLLABLE IEUNG-WI-KIYEOK
+C0A9 C708 # HANGUL SYLLABLE IEUNG-WI-NIEUN
+C0AA C70C # HANGUL SYLLABLE IEUNG-WI-RIEUL
+C0AB C714 # HANGUL SYLLABLE IEUNG-WI-MIEUM
+C0AC C715 # HANGUL SYLLABLE IEUNG-WI-PIEUP
+C0AD C717 # HANGUL SYLLABLE IEUNG-WI-SIOS
+C0AE C719 # HANGUL SYLLABLE IEUNG-WI-IEUNG
+C0AF C720 # HANGUL SYLLABLE IEUNG-YU
+C0B0 C721 # HANGUL SYLLABLE IEUNG-YU-KIYEOK
+C0B1 C724 # HANGUL SYLLABLE IEUNG-YU-NIEUN
+C0B2 C728 # HANGUL SYLLABLE IEUNG-YU-RIEUL
+C0B3 C730 # HANGUL SYLLABLE IEUNG-YU-MIEUM
+C0B4 C731 # HANGUL SYLLABLE IEUNG-YU-PIEUP
+C0B5 C733 # HANGUL SYLLABLE IEUNG-YU-SIOS
+C0B6 C735 # HANGUL SYLLABLE IEUNG-YU-IEUNG
+C0B7 C737 # HANGUL SYLLABLE IEUNG-YU-CHIEUCH
+C0B8 C73C # HANGUL SYLLABLE IEUNG-EU
+C0B9 C73D # HANGUL SYLLABLE IEUNG-EU-KIYEOK
+C0BA C740 # HANGUL SYLLABLE IEUNG-EU-NIEUN
+C0BB C744 # HANGUL SYLLABLE IEUNG-EU-RIEUL
+C0BC C74A # HANGUL SYLLABLE IEUNG-EU-RIEULPHIEUPH
+C0BD C74C # HANGUL SYLLABLE IEUNG-EU-MIEUM
+C0BE C74D # HANGUL SYLLABLE IEUNG-EU-PIEUP
+C0BF C74F # HANGUL SYLLABLE IEUNG-EU-SIOS
+C0C0 C751 # HANGUL SYLLABLE IEUNG-EU-IEUNG
+C0C1 C752 # HANGUL SYLLABLE IEUNG-EU-CIEUC
+C0C2 C753 # HANGUL SYLLABLE IEUNG-EU-CHIEUCH
+C0C3 C754 # HANGUL SYLLABLE IEUNG-EU-KHIEUKH
+C0C4 C755 # HANGUL SYLLABLE IEUNG-EU-THIEUTH
+C0C5 C756 # HANGUL SYLLABLE IEUNG-EU-PHIEUPH
+C0C6 C757 # HANGUL SYLLABLE IEUNG-EU-HIEUH
+C0C7 C758 # HANGUL SYLLABLE IEUNG-YI
+C0C8 C75C # HANGUL SYLLABLE IEUNG-YI-NIEUN
+C0C9 C760 # HANGUL SYLLABLE IEUNG-YI-RIEUL
+C0CA C768 # HANGUL SYLLABLE IEUNG-YI-MIEUM
+C0CB C76B # HANGUL SYLLABLE IEUNG-YI-SIOS
+C0CC C774 # HANGUL SYLLABLE IEUNG-I
+C0CD C775 # HANGUL SYLLABLE IEUNG-I-KIYEOK
+C0CE C778 # HANGUL SYLLABLE IEUNG-I-NIEUN
+C0CF C77C # HANGUL SYLLABLE IEUNG-I-RIEUL
+C0D0 C77D # HANGUL SYLLABLE IEUNG-I-RIEULKIYEOK
+C0D1 C77E # HANGUL SYLLABLE IEUNG-I-RIEULMIEUM
+C0D2 C783 # HANGUL SYLLABLE IEUNG-I-RIEULHIEUH
+C0D3 C784 # HANGUL SYLLABLE IEUNG-I-MIEUM
+C0D4 C785 # HANGUL SYLLABLE IEUNG-I-PIEUP
+C0D5 C787 # HANGUL SYLLABLE IEUNG-I-SIOS
+C0D6 C788 # HANGUL SYLLABLE IEUNG-I-SSANGSIOS
+C0D7 C789 # HANGUL SYLLABLE IEUNG-I-IEUNG
+C0D8 C78A # HANGUL SYLLABLE IEUNG-I-CIEUC
+C0D9 C78E # HANGUL SYLLABLE IEUNG-I-PHIEUPH
+C0DA C790 # HANGUL SYLLABLE CIEUC-A
+C0DB C791 # HANGUL SYLLABLE CIEUC-A-KIYEOK
+C0DC C794 # HANGUL SYLLABLE CIEUC-A-NIEUN
+C0DD C796 # HANGUL SYLLABLE CIEUC-A-NIEUNHIEUH
+C0DE C797 # HANGUL SYLLABLE CIEUC-A-TIKEUT
+C0DF C798 # HANGUL SYLLABLE CIEUC-A-RIEUL
+C0E0 C79A # HANGUL SYLLABLE CIEUC-A-RIEULMIEUM
+C0E1 C7A0 # HANGUL SYLLABLE CIEUC-A-MIEUM
+C0E2 C7A1 # HANGUL SYLLABLE CIEUC-A-PIEUP
+C0E3 C7A3 # HANGUL SYLLABLE CIEUC-A-SIOS
+C0E4 C7A4 # HANGUL SYLLABLE CIEUC-A-SSANGSIOS
+C0E5 C7A5 # HANGUL SYLLABLE CIEUC-A-IEUNG
+C0E6 C7A6 # HANGUL SYLLABLE CIEUC-A-CIEUC
+C0E7 C7AC # HANGUL SYLLABLE CIEUC-AE
+C0E8 C7AD # HANGUL SYLLABLE CIEUC-AE-KIYEOK
+C0E9 C7B0 # HANGUL SYLLABLE CIEUC-AE-NIEUN
+C0EA C7B4 # HANGUL SYLLABLE CIEUC-AE-RIEUL
+C0EB C7BC # HANGUL SYLLABLE CIEUC-AE-MIEUM
+C0EC C7BD # HANGUL SYLLABLE CIEUC-AE-PIEUP
+C0ED C7BF # HANGUL SYLLABLE CIEUC-AE-SIOS
+C0EE C7C0 # HANGUL SYLLABLE CIEUC-AE-SSANGSIOS
+C0EF C7C1 # HANGUL SYLLABLE CIEUC-AE-IEUNG
+C0F0 C7C8 # HANGUL SYLLABLE CIEUC-YA
+C0F1 C7C9 # HANGUL SYLLABLE CIEUC-YA-KIYEOK
+C0F2 C7CC # HANGUL SYLLABLE CIEUC-YA-NIEUN
+C0F3 C7CE # HANGUL SYLLABLE CIEUC-YA-NIEUNHIEUH
+C0F4 C7D0 # HANGUL SYLLABLE CIEUC-YA-RIEUL
+C0F5 C7D8 # HANGUL SYLLABLE CIEUC-YA-MIEUM
+C0F6 C7DD # HANGUL SYLLABLE CIEUC-YA-IEUNG
+C0F7 C7E4 # HANGUL SYLLABLE CIEUC-YAE
+C0F8 C7E8 # HANGUL SYLLABLE CIEUC-YAE-NIEUN
+C0F9 C7EC # HANGUL SYLLABLE CIEUC-YAE-RIEUL
+C0FA C800 # HANGUL SYLLABLE CIEUC-EO
+C0FB C801 # HANGUL SYLLABLE CIEUC-EO-KIYEOK
+C0FC C804 # HANGUL SYLLABLE CIEUC-EO-NIEUN
+C0FD C808 # HANGUL SYLLABLE CIEUC-EO-RIEUL
+C0FE C80A # HANGUL SYLLABLE CIEUC-EO-RIEULMIEUM
+C141 D564 # HANGUL SYLLABLE HIEUH-A-RIEULSIOS
+C142 D566 # HANGUL SYLLABLE HIEUH-A-RIEULPHIEUPH
+C143 D567 # HANGUL SYLLABLE HIEUH-A-RIEULHIEUH
+C144 D56A # HANGUL SYLLABLE HIEUH-A-PIEUPSIOS
+C145 D56C # HANGUL SYLLABLE HIEUH-A-SSANGSIOS
+C146 D56E # HANGUL SYLLABLE HIEUH-A-CIEUC
+C147 D56F # HANGUL SYLLABLE HIEUH-A-CHIEUCH
+C148 D570 # HANGUL SYLLABLE HIEUH-A-KHIEUKH
+C149 D571 # HANGUL SYLLABLE HIEUH-A-THIEUTH
+C14A D572 # HANGUL SYLLABLE HIEUH-A-PHIEUPH
+C14B D573 # HANGUL SYLLABLE HIEUH-A-HIEUH
+C14C D576 # HANGUL SYLLABLE HIEUH-AE-SSANGKIYEOK
+C14D D577 # HANGUL SYLLABLE HIEUH-AE-KIYEOKSIOS
+C14E D579 # HANGUL SYLLABLE HIEUH-AE-NIEUNCIEUC
+C14F D57A # HANGUL SYLLABLE HIEUH-AE-NIEUNHIEUH
+C150 D57B # HANGUL SYLLABLE HIEUH-AE-TIKEUT
+C151 D57D # HANGUL SYLLABLE HIEUH-AE-RIEULKIYEOK
+C152 D57E # HANGUL SYLLABLE HIEUH-AE-RIEULMIEUM
+C153 D57F # HANGUL SYLLABLE HIEUH-AE-RIEULPIEUP
+C154 D580 # HANGUL SYLLABLE HIEUH-AE-RIEULSIOS
+C155 D581 # HANGUL SYLLABLE HIEUH-AE-RIEULTHIEUTH
+C156 D582 # HANGUL SYLLABLE HIEUH-AE-RIEULPHIEUPH
+C157 D583 # HANGUL SYLLABLE HIEUH-AE-RIEULHIEUH
+C158 D586 # HANGUL SYLLABLE HIEUH-AE-PIEUPSIOS
+C159 D58A # HANGUL SYLLABLE HIEUH-AE-CIEUC
+C15A D58B # HANGUL SYLLABLE HIEUH-AE-CHIEUCH
+C161 D58C # HANGUL SYLLABLE HIEUH-AE-KHIEUKH
+C162 D58D # HANGUL SYLLABLE HIEUH-AE-THIEUTH
+C163 D58E # HANGUL SYLLABLE HIEUH-AE-PHIEUPH
+C164 D58F # HANGUL SYLLABLE HIEUH-AE-HIEUH
+C165 D591 # HANGUL SYLLABLE HIEUH-YA-KIYEOK
+C166 D592 # HANGUL SYLLABLE HIEUH-YA-SSANGKIYEOK
+C167 D593 # HANGUL SYLLABLE HIEUH-YA-KIYEOKSIOS
+C168 D594 # HANGUL SYLLABLE HIEUH-YA-NIEUN
+C169 D595 # HANGUL SYLLABLE HIEUH-YA-NIEUNCIEUC
+C16A D596 # HANGUL SYLLABLE HIEUH-YA-NIEUNHIEUH
+C16B D597 # HANGUL SYLLABLE HIEUH-YA-TIKEUT
+C16C D598 # HANGUL SYLLABLE HIEUH-YA-RIEUL
+C16D D599 # HANGUL SYLLABLE HIEUH-YA-RIEULKIYEOK
+C16E D59A # HANGUL SYLLABLE HIEUH-YA-RIEULMIEUM
+C16F D59B # HANGUL SYLLABLE HIEUH-YA-RIEULPIEUP
+C170 D59C # HANGUL SYLLABLE HIEUH-YA-RIEULSIOS
+C171 D59D # HANGUL SYLLABLE HIEUH-YA-RIEULTHIEUTH
+C172 D59E # HANGUL SYLLABLE HIEUH-YA-RIEULPHIEUPH
+C173 D59F # HANGUL SYLLABLE HIEUH-YA-RIEULHIEUH
+C174 D5A0 # HANGUL SYLLABLE HIEUH-YA-MIEUM
+C175 D5A1 # HANGUL SYLLABLE HIEUH-YA-PIEUP
+C176 D5A2 # HANGUL SYLLABLE HIEUH-YA-PIEUPSIOS
+C177 D5A3 # HANGUL SYLLABLE HIEUH-YA-SIOS
+C178 D5A4 # HANGUL SYLLABLE HIEUH-YA-SSANGSIOS
+C179 D5A6 # HANGUL SYLLABLE HIEUH-YA-CIEUC
+C17A D5A7 # HANGUL SYLLABLE HIEUH-YA-CHIEUCH
+C181 D5A8 # HANGUL SYLLABLE HIEUH-YA-KHIEUKH
+C182 D5A9 # HANGUL SYLLABLE HIEUH-YA-THIEUTH
+C183 D5AA # HANGUL SYLLABLE HIEUH-YA-PHIEUPH
+C184 D5AB # HANGUL SYLLABLE HIEUH-YA-HIEUH
+C185 D5AC # HANGUL SYLLABLE HIEUH-YAE
+C186 D5AD # HANGUL SYLLABLE HIEUH-YAE-KIYEOK
+C187 D5AE # HANGUL SYLLABLE HIEUH-YAE-SSANGKIYEOK
+C188 D5AF # HANGUL SYLLABLE HIEUH-YAE-KIYEOKSIOS
+C189 D5B0 # HANGUL SYLLABLE HIEUH-YAE-NIEUN
+C18A D5B1 # HANGUL SYLLABLE HIEUH-YAE-NIEUNCIEUC
+C18B D5B2 # HANGUL SYLLABLE HIEUH-YAE-NIEUNHIEUH
+C18C D5B3 # HANGUL SYLLABLE HIEUH-YAE-TIKEUT
+C18D D5B4 # HANGUL SYLLABLE HIEUH-YAE-RIEUL
+C18E D5B5 # HANGUL SYLLABLE HIEUH-YAE-RIEULKIYEOK
+C18F D5B6 # HANGUL SYLLABLE HIEUH-YAE-RIEULMIEUM
+C190 D5B7 # HANGUL SYLLABLE HIEUH-YAE-RIEULPIEUP
+C191 D5B8 # HANGUL SYLLABLE HIEUH-YAE-RIEULSIOS
+C192 D5B9 # HANGUL SYLLABLE HIEUH-YAE-RIEULTHIEUTH
+C193 D5BA # HANGUL SYLLABLE HIEUH-YAE-RIEULPHIEUPH
+C194 D5BB # HANGUL SYLLABLE HIEUH-YAE-RIEULHIEUH
+C195 D5BC # HANGUL SYLLABLE HIEUH-YAE-MIEUM
+C196 D5BD # HANGUL SYLLABLE HIEUH-YAE-PIEUP
+C197 D5BE # HANGUL SYLLABLE HIEUH-YAE-PIEUPSIOS
+C198 D5BF # HANGUL SYLLABLE HIEUH-YAE-SIOS
+C199 D5C0 # HANGUL SYLLABLE HIEUH-YAE-SSANGSIOS
+C19A D5C1 # HANGUL SYLLABLE HIEUH-YAE-IEUNG
+C19B D5C2 # HANGUL SYLLABLE HIEUH-YAE-CIEUC
+C19C D5C3 # HANGUL SYLLABLE HIEUH-YAE-CHIEUCH
+C19D D5C4 # HANGUL SYLLABLE HIEUH-YAE-KHIEUKH
+C19E D5C5 # HANGUL SYLLABLE HIEUH-YAE-THIEUTH
+C19F D5C6 # HANGUL SYLLABLE HIEUH-YAE-PHIEUPH
+C1A0 D5C7 # HANGUL SYLLABLE HIEUH-YAE-HIEUH
+C1A1 C810 # HANGUL SYLLABLE CIEUC-EO-MIEUM
+C1A2 C811 # HANGUL SYLLABLE CIEUC-EO-PIEUP
+C1A3 C813 # HANGUL SYLLABLE CIEUC-EO-SIOS
+C1A4 C815 # HANGUL SYLLABLE CIEUC-EO-IEUNG
+C1A5 C816 # HANGUL SYLLABLE CIEUC-EO-CIEUC
+C1A6 C81C # HANGUL SYLLABLE CIEUC-E
+C1A7 C81D # HANGUL SYLLABLE CIEUC-E-KIYEOK
+C1A8 C820 # HANGUL SYLLABLE CIEUC-E-NIEUN
+C1A9 C824 # HANGUL SYLLABLE CIEUC-E-RIEUL
+C1AA C82C # HANGUL SYLLABLE CIEUC-E-MIEUM
+C1AB C82D # HANGUL SYLLABLE CIEUC-E-PIEUP
+C1AC C82F # HANGUL SYLLABLE CIEUC-E-SIOS
+C1AD C831 # HANGUL SYLLABLE CIEUC-E-IEUNG
+C1AE C838 # HANGUL SYLLABLE CIEUC-YEO
+C1AF C83C # HANGUL SYLLABLE CIEUC-YEO-NIEUN
+C1B0 C840 # HANGUL SYLLABLE CIEUC-YEO-RIEUL
+C1B1 C848 # HANGUL SYLLABLE CIEUC-YEO-MIEUM
+C1B2 C849 # HANGUL SYLLABLE CIEUC-YEO-PIEUP
+C1B3 C84C # HANGUL SYLLABLE CIEUC-YEO-SSANGSIOS
+C1B4 C84D # HANGUL SYLLABLE CIEUC-YEO-IEUNG
+C1B5 C854 # HANGUL SYLLABLE CIEUC-YE
+C1B6 C870 # HANGUL SYLLABLE CIEUC-O
+C1B7 C871 # HANGUL SYLLABLE CIEUC-O-KIYEOK
+C1B8 C874 # HANGUL SYLLABLE CIEUC-O-NIEUN
+C1B9 C878 # HANGUL SYLLABLE CIEUC-O-RIEUL
+C1BA C87A # HANGUL SYLLABLE CIEUC-O-RIEULMIEUM
+C1BB C880 # HANGUL SYLLABLE CIEUC-O-MIEUM
+C1BC C881 # HANGUL SYLLABLE CIEUC-O-PIEUP
+C1BD C883 # HANGUL SYLLABLE CIEUC-O-SIOS
+C1BE C885 # HANGUL SYLLABLE CIEUC-O-IEUNG
+C1BF C886 # HANGUL SYLLABLE CIEUC-O-CIEUC
+C1C0 C887 # HANGUL SYLLABLE CIEUC-O-CHIEUCH
+C1C1 C88B # HANGUL SYLLABLE CIEUC-O-HIEUH
+C1C2 C88C # HANGUL SYLLABLE CIEUC-WA
+C1C3 C88D # HANGUL SYLLABLE CIEUC-WA-KIYEOK
+C1C4 C894 # HANGUL SYLLABLE CIEUC-WA-RIEUL
+C1C5 C89D # HANGUL SYLLABLE CIEUC-WA-PIEUP
+C1C6 C89F # HANGUL SYLLABLE CIEUC-WA-SIOS
+C1C7 C8A1 # HANGUL SYLLABLE CIEUC-WA-IEUNG
+C1C8 C8A8 # HANGUL SYLLABLE CIEUC-WAE
+C1C9 C8BC # HANGUL SYLLABLE CIEUC-WAE-SSANGSIOS
+C1CA C8BD # HANGUL SYLLABLE CIEUC-WAE-IEUNG
+C1CB C8C4 # HANGUL SYLLABLE CIEUC-OE
+C1CC C8C8 # HANGUL SYLLABLE CIEUC-OE-NIEUN
+C1CD C8CC # HANGUL SYLLABLE CIEUC-OE-RIEUL
+C1CE C8D4 # HANGUL SYLLABLE CIEUC-OE-MIEUM
+C1CF C8D5 # HANGUL SYLLABLE CIEUC-OE-PIEUP
+C1D0 C8D7 # HANGUL SYLLABLE CIEUC-OE-SIOS
+C1D1 C8D9 # HANGUL SYLLABLE CIEUC-OE-IEUNG
+C1D2 C8E0 # HANGUL SYLLABLE CIEUC-YO
+C1D3 C8E1 # HANGUL SYLLABLE CIEUC-YO-KIYEOK
+C1D4 C8E4 # HANGUL SYLLABLE CIEUC-YO-NIEUN
+C1D5 C8F5 # HANGUL SYLLABLE CIEUC-YO-IEUNG
+C1D6 C8FC # HANGUL SYLLABLE CIEUC-U
+C1D7 C8FD # HANGUL SYLLABLE CIEUC-U-KIYEOK
+C1D8 C900 # HANGUL SYLLABLE CIEUC-U-NIEUN
+C1D9 C904 # HANGUL SYLLABLE CIEUC-U-RIEUL
+C1DA C905 # HANGUL SYLLABLE CIEUC-U-RIEULKIYEOK
+C1DB C906 # HANGUL SYLLABLE CIEUC-U-RIEULMIEUM
+C1DC C90C # HANGUL SYLLABLE CIEUC-U-MIEUM
+C1DD C90D # HANGUL SYLLABLE CIEUC-U-PIEUP
+C1DE C90F # HANGUL SYLLABLE CIEUC-U-SIOS
+C1DF C911 # HANGUL SYLLABLE CIEUC-U-IEUNG
+C1E0 C918 # HANGUL SYLLABLE CIEUC-WEO
+C1E1 C92C # HANGUL SYLLABLE CIEUC-WEO-SSANGSIOS
+C1E2 C934 # HANGUL SYLLABLE CIEUC-WE
+C1E3 C950 # HANGUL SYLLABLE CIEUC-WI
+C1E4 C951 # HANGUL SYLLABLE CIEUC-WI-KIYEOK
+C1E5 C954 # HANGUL SYLLABLE CIEUC-WI-NIEUN
+C1E6 C958 # HANGUL SYLLABLE CIEUC-WI-RIEUL
+C1E7 C960 # HANGUL SYLLABLE CIEUC-WI-MIEUM
+C1E8 C961 # HANGUL SYLLABLE CIEUC-WI-PIEUP
+C1E9 C963 # HANGUL SYLLABLE CIEUC-WI-SIOS
+C1EA C96C # HANGUL SYLLABLE CIEUC-YU
+C1EB C970 # HANGUL SYLLABLE CIEUC-YU-NIEUN
+C1EC C974 # HANGUL SYLLABLE CIEUC-YU-RIEUL
+C1ED C97C # HANGUL SYLLABLE CIEUC-YU-MIEUM
+C1EE C988 # HANGUL SYLLABLE CIEUC-EU
+C1EF C989 # HANGUL SYLLABLE CIEUC-EU-KIYEOK
+C1F0 C98C # HANGUL SYLLABLE CIEUC-EU-NIEUN
+C1F1 C990 # HANGUL SYLLABLE CIEUC-EU-RIEUL
+C1F2 C998 # HANGUL SYLLABLE CIEUC-EU-MIEUM
+C1F3 C999 # HANGUL SYLLABLE CIEUC-EU-PIEUP
+C1F4 C99B # HANGUL SYLLABLE CIEUC-EU-SIOS
+C1F5 C99D # HANGUL SYLLABLE CIEUC-EU-IEUNG
+C1F6 C9C0 # HANGUL SYLLABLE CIEUC-I
+C1F7 C9C1 # HANGUL SYLLABLE CIEUC-I-KIYEOK
+C1F8 C9C4 # HANGUL SYLLABLE CIEUC-I-NIEUN
+C1F9 C9C7 # HANGUL SYLLABLE CIEUC-I-TIKEUT
+C1FA C9C8 # HANGUL SYLLABLE CIEUC-I-RIEUL
+C1FB C9CA # HANGUL SYLLABLE CIEUC-I-RIEULMIEUM
+C1FC C9D0 # HANGUL SYLLABLE CIEUC-I-MIEUM
+C1FD C9D1 # HANGUL SYLLABLE CIEUC-I-PIEUP
+C1FE C9D3 # HANGUL SYLLABLE CIEUC-I-SIOS
+C241 D5CA # HANGUL SYLLABLE HIEUH-EO-SSANGKIYEOK
+C242 D5CB # HANGUL SYLLABLE HIEUH-EO-KIYEOKSIOS
+C243 D5CD # HANGUL SYLLABLE HIEUH-EO-NIEUNCIEUC
+C244 D5CE # HANGUL SYLLABLE HIEUH-EO-NIEUNHIEUH
+C245 D5CF # HANGUL SYLLABLE HIEUH-EO-TIKEUT
+C246 D5D1 # HANGUL SYLLABLE HIEUH-EO-RIEULKIYEOK
+C247 D5D3 # HANGUL SYLLABLE HIEUH-EO-RIEULPIEUP
+C248 D5D4 # HANGUL SYLLABLE HIEUH-EO-RIEULSIOS
+C249 D5D5 # HANGUL SYLLABLE HIEUH-EO-RIEULTHIEUTH
+C24A D5D6 # HANGUL SYLLABLE HIEUH-EO-RIEULPHIEUPH
+C24B D5D7 # HANGUL SYLLABLE HIEUH-EO-RIEULHIEUH
+C24C D5DA # HANGUL SYLLABLE HIEUH-EO-PIEUPSIOS
+C24D D5DC # HANGUL SYLLABLE HIEUH-EO-SSANGSIOS
+C24E D5DE # HANGUL SYLLABLE HIEUH-EO-CIEUC
+C24F D5DF # HANGUL SYLLABLE HIEUH-EO-CHIEUCH
+C250 D5E0 # HANGUL SYLLABLE HIEUH-EO-KHIEUKH
+C251 D5E1 # HANGUL SYLLABLE HIEUH-EO-THIEUTH
+C252 D5E2 # HANGUL SYLLABLE HIEUH-EO-PHIEUPH
+C253 D5E3 # HANGUL SYLLABLE HIEUH-EO-HIEUH
+C254 D5E6 # HANGUL SYLLABLE HIEUH-E-SSANGKIYEOK
+C255 D5E7 # HANGUL SYLLABLE HIEUH-E-KIYEOKSIOS
+C256 D5E9 # HANGUL SYLLABLE HIEUH-E-NIEUNCIEUC
+C257 D5EA # HANGUL SYLLABLE HIEUH-E-NIEUNHIEUH
+C258 D5EB # HANGUL SYLLABLE HIEUH-E-TIKEUT
+C259 D5ED # HANGUL SYLLABLE HIEUH-E-RIEULKIYEOK
+C25A D5EE # HANGUL SYLLABLE HIEUH-E-RIEULMIEUM
+C261 D5EF # HANGUL SYLLABLE HIEUH-E-RIEULPIEUP
+C262 D5F0 # HANGUL SYLLABLE HIEUH-E-RIEULSIOS
+C263 D5F1 # HANGUL SYLLABLE HIEUH-E-RIEULTHIEUTH
+C264 D5F2 # HANGUL SYLLABLE HIEUH-E-RIEULPHIEUPH
+C265 D5F3 # HANGUL SYLLABLE HIEUH-E-RIEULHIEUH
+C266 D5F6 # HANGUL SYLLABLE HIEUH-E-PIEUPSIOS
+C267 D5F8 # HANGUL SYLLABLE HIEUH-E-SSANGSIOS
+C268 D5FA # HANGUL SYLLABLE HIEUH-E-CIEUC
+C269 D5FB # HANGUL SYLLABLE HIEUH-E-CHIEUCH
+C26A D5FC # HANGUL SYLLABLE HIEUH-E-KHIEUKH
+C26B D5FD # HANGUL SYLLABLE HIEUH-E-THIEUTH
+C26C D5FE # HANGUL SYLLABLE HIEUH-E-PHIEUPH
+C26D D5FF # HANGUL SYLLABLE HIEUH-E-HIEUH
+C26E D602 # HANGUL SYLLABLE HIEUH-YEO-SSANGKIYEOK
+C26F D603 # HANGUL SYLLABLE HIEUH-YEO-KIYEOKSIOS
+C270 D605 # HANGUL SYLLABLE HIEUH-YEO-NIEUNCIEUC
+C271 D606 # HANGUL SYLLABLE HIEUH-YEO-NIEUNHIEUH
+C272 D607 # HANGUL SYLLABLE HIEUH-YEO-TIKEUT
+C273 D609 # HANGUL SYLLABLE HIEUH-YEO-RIEULKIYEOK
+C274 D60A # HANGUL SYLLABLE HIEUH-YEO-RIEULMIEUM
+C275 D60B # HANGUL SYLLABLE HIEUH-YEO-RIEULPIEUP
+C276 D60C # HANGUL SYLLABLE HIEUH-YEO-RIEULSIOS
+C277 D60D # HANGUL SYLLABLE HIEUH-YEO-RIEULTHIEUTH
+C278 D60E # HANGUL SYLLABLE HIEUH-YEO-RIEULPHIEUPH
+C279 D60F # HANGUL SYLLABLE HIEUH-YEO-RIEULHIEUH
+C27A D612 # HANGUL SYLLABLE HIEUH-YEO-PIEUPSIOS
+C281 D616 # HANGUL SYLLABLE HIEUH-YEO-CIEUC
+C282 D617 # HANGUL SYLLABLE HIEUH-YEO-CHIEUCH
+C283 D618 # HANGUL SYLLABLE HIEUH-YEO-KHIEUKH
+C284 D619 # HANGUL SYLLABLE HIEUH-YEO-THIEUTH
+C285 D61A # HANGUL SYLLABLE HIEUH-YEO-PHIEUPH
+C286 D61B # HANGUL SYLLABLE HIEUH-YEO-HIEUH
+C287 D61D # HANGUL SYLLABLE HIEUH-YE-KIYEOK
+C288 D61E # HANGUL SYLLABLE HIEUH-YE-SSANGKIYEOK
+C289 D61F # HANGUL SYLLABLE HIEUH-YE-KIYEOKSIOS
+C28A D621 # HANGUL SYLLABLE HIEUH-YE-NIEUNCIEUC
+C28B D622 # HANGUL SYLLABLE HIEUH-YE-NIEUNHIEUH
+C28C D623 # HANGUL SYLLABLE HIEUH-YE-TIKEUT
+C28D D625 # HANGUL SYLLABLE HIEUH-YE-RIEULKIYEOK
+C28E D626 # HANGUL SYLLABLE HIEUH-YE-RIEULMIEUM
+C28F D627 # HANGUL SYLLABLE HIEUH-YE-RIEULPIEUP
+C290 D628 # HANGUL SYLLABLE HIEUH-YE-RIEULSIOS
+C291 D629 # HANGUL SYLLABLE HIEUH-YE-RIEULTHIEUTH
+C292 D62A # HANGUL SYLLABLE HIEUH-YE-RIEULPHIEUPH
+C293 D62B # HANGUL SYLLABLE HIEUH-YE-RIEULHIEUH
+C294 D62C # HANGUL SYLLABLE HIEUH-YE-MIEUM
+C295 D62E # HANGUL SYLLABLE HIEUH-YE-PIEUPSIOS
+C296 D62F # HANGUL SYLLABLE HIEUH-YE-SIOS
+C297 D630 # HANGUL SYLLABLE HIEUH-YE-SSANGSIOS
+C298 D631 # HANGUL SYLLABLE HIEUH-YE-IEUNG
+C299 D632 # HANGUL SYLLABLE HIEUH-YE-CIEUC
+C29A D633 # HANGUL SYLLABLE HIEUH-YE-CHIEUCH
+C29B D634 # HANGUL SYLLABLE HIEUH-YE-KHIEUKH
+C29C D635 # HANGUL SYLLABLE HIEUH-YE-THIEUTH
+C29D D636 # HANGUL SYLLABLE HIEUH-YE-PHIEUPH
+C29E D637 # HANGUL SYLLABLE HIEUH-YE-HIEUH
+C29F D63A # HANGUL SYLLABLE HIEUH-O-SSANGKIYEOK
+C2A0 D63B # HANGUL SYLLABLE HIEUH-O-KIYEOKSIOS
+C2A1 C9D5 # HANGUL SYLLABLE CIEUC-I-IEUNG
+C2A2 C9D6 # HANGUL SYLLABLE CIEUC-I-CIEUC
+C2A3 C9D9 # HANGUL SYLLABLE CIEUC-I-THIEUTH
+C2A4 C9DA # HANGUL SYLLABLE CIEUC-I-PHIEUPH
+C2A5 C9DC # HANGUL SYLLABLE SSANGCIEUC-A
+C2A6 C9DD # HANGUL SYLLABLE SSANGCIEUC-A-KIYEOK
+C2A7 C9E0 # HANGUL SYLLABLE SSANGCIEUC-A-NIEUN
+C2A8 C9E2 # HANGUL SYLLABLE SSANGCIEUC-A-NIEUNHIEUH
+C2A9 C9E4 # HANGUL SYLLABLE SSANGCIEUC-A-RIEUL
+C2AA C9E7 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULPIEUP
+C2AB C9EC # HANGUL SYLLABLE SSANGCIEUC-A-MIEUM
+C2AC C9ED # HANGUL SYLLABLE SSANGCIEUC-A-PIEUP
+C2AD C9EF # HANGUL SYLLABLE SSANGCIEUC-A-SIOS
+C2AE C9F0 # HANGUL SYLLABLE SSANGCIEUC-A-SSANGSIOS
+C2AF C9F1 # HANGUL SYLLABLE SSANGCIEUC-A-IEUNG
+C2B0 C9F8 # HANGUL SYLLABLE SSANGCIEUC-AE
+C2B1 C9F9 # HANGUL SYLLABLE SSANGCIEUC-AE-KIYEOK
+C2B2 C9FC # HANGUL SYLLABLE SSANGCIEUC-AE-NIEUN
+C2B3 CA00 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEUL
+C2B4 CA08 # HANGUL SYLLABLE SSANGCIEUC-AE-MIEUM
+C2B5 CA09 # HANGUL SYLLABLE SSANGCIEUC-AE-PIEUP
+C2B6 CA0B # HANGUL SYLLABLE SSANGCIEUC-AE-SIOS
+C2B7 CA0C # HANGUL SYLLABLE SSANGCIEUC-AE-SSANGSIOS
+C2B8 CA0D # HANGUL SYLLABLE SSANGCIEUC-AE-IEUNG
+C2B9 CA14 # HANGUL SYLLABLE SSANGCIEUC-YA
+C2BA CA18 # HANGUL SYLLABLE SSANGCIEUC-YA-NIEUN
+C2BB CA29 # HANGUL SYLLABLE SSANGCIEUC-YA-IEUNG
+C2BC CA4C # HANGUL SYLLABLE SSANGCIEUC-EO
+C2BD CA4D # HANGUL SYLLABLE SSANGCIEUC-EO-KIYEOK
+C2BE CA50 # HANGUL SYLLABLE SSANGCIEUC-EO-NIEUN
+C2BF CA54 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEUL
+C2C0 CA5C # HANGUL SYLLABLE SSANGCIEUC-EO-MIEUM
+C2C1 CA5D # HANGUL SYLLABLE SSANGCIEUC-EO-PIEUP
+C2C2 CA5F # HANGUL SYLLABLE SSANGCIEUC-EO-SIOS
+C2C3 CA60 # HANGUL SYLLABLE SSANGCIEUC-EO-SSANGSIOS
+C2C4 CA61 # HANGUL SYLLABLE SSANGCIEUC-EO-IEUNG
+C2C5 CA68 # HANGUL SYLLABLE SSANGCIEUC-E
+C2C6 CA7D # HANGUL SYLLABLE SSANGCIEUC-E-IEUNG
+C2C7 CA84 # HANGUL SYLLABLE SSANGCIEUC-YEO
+C2C8 CA98 # HANGUL SYLLABLE SSANGCIEUC-YEO-SSANGSIOS
+C2C9 CABC # HANGUL SYLLABLE SSANGCIEUC-O
+C2CA CABD # HANGUL SYLLABLE SSANGCIEUC-O-KIYEOK
+C2CB CAC0 # HANGUL SYLLABLE SSANGCIEUC-O-NIEUN
+C2CC CAC4 # HANGUL SYLLABLE SSANGCIEUC-O-RIEUL
+C2CD CACC # HANGUL SYLLABLE SSANGCIEUC-O-MIEUM
+C2CE CACD # HANGUL SYLLABLE SSANGCIEUC-O-PIEUP
+C2CF CACF # HANGUL SYLLABLE SSANGCIEUC-O-SIOS
+C2D0 CAD1 # HANGUL SYLLABLE SSANGCIEUC-O-IEUNG
+C2D1 CAD3 # HANGUL SYLLABLE SSANGCIEUC-O-CHIEUCH
+C2D2 CAD8 # HANGUL SYLLABLE SSANGCIEUC-WA
+C2D3 CAD9 # HANGUL SYLLABLE SSANGCIEUC-WA-KIYEOK
+C2D4 CAE0 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEUL
+C2D5 CAEC # HANGUL SYLLABLE SSANGCIEUC-WA-SSANGSIOS
+C2D6 CAF4 # HANGUL SYLLABLE SSANGCIEUC-WAE
+C2D7 CB08 # HANGUL SYLLABLE SSANGCIEUC-WAE-SSANGSIOS
+C2D8 CB10 # HANGUL SYLLABLE SSANGCIEUC-OE
+C2D9 CB14 # HANGUL SYLLABLE SSANGCIEUC-OE-NIEUN
+C2DA CB18 # HANGUL SYLLABLE SSANGCIEUC-OE-RIEUL
+C2DB CB20 # HANGUL SYLLABLE SSANGCIEUC-OE-MIEUM
+C2DC CB21 # HANGUL SYLLABLE SSANGCIEUC-OE-PIEUP
+C2DD CB41 # HANGUL SYLLABLE SSANGCIEUC-YO-IEUNG
+C2DE CB48 # HANGUL SYLLABLE SSANGCIEUC-U
+C2DF CB49 # HANGUL SYLLABLE SSANGCIEUC-U-KIYEOK
+C2E0 CB4C # HANGUL SYLLABLE SSANGCIEUC-U-NIEUN
+C2E1 CB50 # HANGUL SYLLABLE SSANGCIEUC-U-RIEUL
+C2E2 CB58 # HANGUL SYLLABLE SSANGCIEUC-U-MIEUM
+C2E3 CB59 # HANGUL SYLLABLE SSANGCIEUC-U-PIEUP
+C2E4 CB5D # HANGUL SYLLABLE SSANGCIEUC-U-IEUNG
+C2E5 CB64 # HANGUL SYLLABLE SSANGCIEUC-WEO
+C2E6 CB78 # HANGUL SYLLABLE SSANGCIEUC-WEO-SSANGSIOS
+C2E7 CB79 # HANGUL SYLLABLE SSANGCIEUC-WEO-IEUNG
+C2E8 CB9C # HANGUL SYLLABLE SSANGCIEUC-WI
+C2E9 CBB8 # HANGUL SYLLABLE SSANGCIEUC-YU
+C2EA CBD4 # HANGUL SYLLABLE SSANGCIEUC-EU
+C2EB CBE4 # HANGUL SYLLABLE SSANGCIEUC-EU-MIEUM
+C2EC CBE7 # HANGUL SYLLABLE SSANGCIEUC-EU-SIOS
+C2ED CBE9 # HANGUL SYLLABLE SSANGCIEUC-EU-IEUNG
+C2EE CC0C # HANGUL SYLLABLE SSANGCIEUC-I
+C2EF CC0D # HANGUL SYLLABLE SSANGCIEUC-I-KIYEOK
+C2F0 CC10 # HANGUL SYLLABLE SSANGCIEUC-I-NIEUN
+C2F1 CC14 # HANGUL SYLLABLE SSANGCIEUC-I-RIEUL
+C2F2 CC1C # HANGUL SYLLABLE SSANGCIEUC-I-MIEUM
+C2F3 CC1D # HANGUL SYLLABLE SSANGCIEUC-I-PIEUP
+C2F4 CC21 # HANGUL SYLLABLE SSANGCIEUC-I-IEUNG
+C2F5 CC22 # HANGUL SYLLABLE SSANGCIEUC-I-CIEUC
+C2F6 CC27 # HANGUL SYLLABLE SSANGCIEUC-I-HIEUH
+C2F7 CC28 # HANGUL SYLLABLE CHIEUCH-A
+C2F8 CC29 # HANGUL SYLLABLE CHIEUCH-A-KIYEOK
+C2F9 CC2C # HANGUL SYLLABLE CHIEUCH-A-NIEUN
+C2FA CC2E # HANGUL SYLLABLE CHIEUCH-A-NIEUNHIEUH
+C2FB CC30 # HANGUL SYLLABLE CHIEUCH-A-RIEUL
+C2FC CC38 # HANGUL SYLLABLE CHIEUCH-A-MIEUM
+C2FD CC39 # HANGUL SYLLABLE CHIEUCH-A-PIEUP
+C2FE CC3B # HANGUL SYLLABLE CHIEUCH-A-SIOS
+C341 D63D # HANGUL SYLLABLE HIEUH-O-NIEUNCIEUC
+C342 D63E # HANGUL SYLLABLE HIEUH-O-NIEUNHIEUH
+C343 D63F # HANGUL SYLLABLE HIEUH-O-TIKEUT
+C344 D641 # HANGUL SYLLABLE HIEUH-O-RIEULKIYEOK
+C345 D642 # HANGUL SYLLABLE HIEUH-O-RIEULMIEUM
+C346 D643 # HANGUL SYLLABLE HIEUH-O-RIEULPIEUP
+C347 D644 # HANGUL SYLLABLE HIEUH-O-RIEULSIOS
+C348 D646 # HANGUL SYLLABLE HIEUH-O-RIEULPHIEUPH
+C349 D647 # HANGUL SYLLABLE HIEUH-O-RIEULHIEUH
+C34A D64A # HANGUL SYLLABLE HIEUH-O-PIEUPSIOS
+C34B D64C # HANGUL SYLLABLE HIEUH-O-SSANGSIOS
+C34C D64E # HANGUL SYLLABLE HIEUH-O-CIEUC
+C34D D64F # HANGUL SYLLABLE HIEUH-O-CHIEUCH
+C34E D650 # HANGUL SYLLABLE HIEUH-O-KHIEUKH
+C34F D652 # HANGUL SYLLABLE HIEUH-O-PHIEUPH
+C350 D653 # HANGUL SYLLABLE HIEUH-O-HIEUH
+C351 D656 # HANGUL SYLLABLE HIEUH-WA-SSANGKIYEOK
+C352 D657 # HANGUL SYLLABLE HIEUH-WA-KIYEOKSIOS
+C353 D659 # HANGUL SYLLABLE HIEUH-WA-NIEUNCIEUC
+C354 D65A # HANGUL SYLLABLE HIEUH-WA-NIEUNHIEUH
+C355 D65B # HANGUL SYLLABLE HIEUH-WA-TIKEUT
+C356 D65D # HANGUL SYLLABLE HIEUH-WA-RIEULKIYEOK
+C357 D65E # HANGUL SYLLABLE HIEUH-WA-RIEULMIEUM
+C358 D65F # HANGUL SYLLABLE HIEUH-WA-RIEULPIEUP
+C359 D660 # HANGUL SYLLABLE HIEUH-WA-RIEULSIOS
+C35A D661 # HANGUL SYLLABLE HIEUH-WA-RIEULTHIEUTH
+C361 D662 # HANGUL SYLLABLE HIEUH-WA-RIEULPHIEUPH
+C362 D663 # HANGUL SYLLABLE HIEUH-WA-RIEULHIEUH
+C363 D664 # HANGUL SYLLABLE HIEUH-WA-MIEUM
+C364 D665 # HANGUL SYLLABLE HIEUH-WA-PIEUP
+C365 D666 # HANGUL SYLLABLE HIEUH-WA-PIEUPSIOS
+C366 D668 # HANGUL SYLLABLE HIEUH-WA-SSANGSIOS
+C367 D66A # HANGUL SYLLABLE HIEUH-WA-CIEUC
+C368 D66B # HANGUL SYLLABLE HIEUH-WA-CHIEUCH
+C369 D66C # HANGUL SYLLABLE HIEUH-WA-KHIEUKH
+C36A D66D # HANGUL SYLLABLE HIEUH-WA-THIEUTH
+C36B D66E # HANGUL SYLLABLE HIEUH-WA-PHIEUPH
+C36C D66F # HANGUL SYLLABLE HIEUH-WA-HIEUH
+C36D D672 # HANGUL SYLLABLE HIEUH-WAE-SSANGKIYEOK
+C36E D673 # HANGUL SYLLABLE HIEUH-WAE-KIYEOKSIOS
+C36F D675 # HANGUL SYLLABLE HIEUH-WAE-NIEUNCIEUC
+C370 D676 # HANGUL SYLLABLE HIEUH-WAE-NIEUNHIEUH
+C371 D677 # HANGUL SYLLABLE HIEUH-WAE-TIKEUT
+C372 D678 # HANGUL SYLLABLE HIEUH-WAE-RIEUL
+C373 D679 # HANGUL SYLLABLE HIEUH-WAE-RIEULKIYEOK
+C374 D67A # HANGUL SYLLABLE HIEUH-WAE-RIEULMIEUM
+C375 D67B # HANGUL SYLLABLE HIEUH-WAE-RIEULPIEUP
+C376 D67C # HANGUL SYLLABLE HIEUH-WAE-RIEULSIOS
+C377 D67D # HANGUL SYLLABLE HIEUH-WAE-RIEULTHIEUTH
+C378 D67E # HANGUL SYLLABLE HIEUH-WAE-RIEULPHIEUPH
+C379 D67F # HANGUL SYLLABLE HIEUH-WAE-RIEULHIEUH
+C37A D680 # HANGUL SYLLABLE HIEUH-WAE-MIEUM
+C381 D681 # HANGUL SYLLABLE HIEUH-WAE-PIEUP
+C382 D682 # HANGUL SYLLABLE HIEUH-WAE-PIEUPSIOS
+C383 D684 # HANGUL SYLLABLE HIEUH-WAE-SSANGSIOS
+C384 D686 # HANGUL SYLLABLE HIEUH-WAE-CIEUC
+C385 D687 # HANGUL SYLLABLE HIEUH-WAE-CHIEUCH
+C386 D688 # HANGUL SYLLABLE HIEUH-WAE-KHIEUKH
+C387 D689 # HANGUL SYLLABLE HIEUH-WAE-THIEUTH
+C388 D68A # HANGUL SYLLABLE HIEUH-WAE-PHIEUPH
+C389 D68B # HANGUL SYLLABLE HIEUH-WAE-HIEUH
+C38A D68E # HANGUL SYLLABLE HIEUH-OE-SSANGKIYEOK
+C38B D68F # HANGUL SYLLABLE HIEUH-OE-KIYEOKSIOS
+C38C D691 # HANGUL SYLLABLE HIEUH-OE-NIEUNCIEUC
+C38D D692 # HANGUL SYLLABLE HIEUH-OE-NIEUNHIEUH
+C38E D693 # HANGUL SYLLABLE HIEUH-OE-TIKEUT
+C38F D695 # HANGUL SYLLABLE HIEUH-OE-RIEULKIYEOK
+C390 D696 # HANGUL SYLLABLE HIEUH-OE-RIEULMIEUM
+C391 D697 # HANGUL SYLLABLE HIEUH-OE-RIEULPIEUP
+C392 D698 # HANGUL SYLLABLE HIEUH-OE-RIEULSIOS
+C393 D699 # HANGUL SYLLABLE HIEUH-OE-RIEULTHIEUTH
+C394 D69A # HANGUL SYLLABLE HIEUH-OE-RIEULPHIEUPH
+C395 D69B # HANGUL SYLLABLE HIEUH-OE-RIEULHIEUH
+C396 D69C # HANGUL SYLLABLE HIEUH-OE-MIEUM
+C397 D69E # HANGUL SYLLABLE HIEUH-OE-PIEUPSIOS
+C398 D6A0 # HANGUL SYLLABLE HIEUH-OE-SSANGSIOS
+C399 D6A2 # HANGUL SYLLABLE HIEUH-OE-CIEUC
+C39A D6A3 # HANGUL SYLLABLE HIEUH-OE-CHIEUCH
+C39B D6A4 # HANGUL SYLLABLE HIEUH-OE-KHIEUKH
+C39C D6A5 # HANGUL SYLLABLE HIEUH-OE-THIEUTH
+C39D D6A6 # HANGUL SYLLABLE HIEUH-OE-PHIEUPH
+C39E D6A7 # HANGUL SYLLABLE HIEUH-OE-HIEUH
+C39F D6A9 # HANGUL SYLLABLE HIEUH-YO-KIYEOK
+C3A0 D6AA # HANGUL SYLLABLE HIEUH-YO-SSANGKIYEOK
+C3A1 CC3C # HANGUL SYLLABLE CHIEUCH-A-SSANGSIOS
+C3A2 CC3D # HANGUL SYLLABLE CHIEUCH-A-IEUNG
+C3A3 CC3E # HANGUL SYLLABLE CHIEUCH-A-CIEUC
+C3A4 CC44 # HANGUL SYLLABLE CHIEUCH-AE
+C3A5 CC45 # HANGUL SYLLABLE CHIEUCH-AE-KIYEOK
+C3A6 CC48 # HANGUL SYLLABLE CHIEUCH-AE-NIEUN
+C3A7 CC4C # HANGUL SYLLABLE CHIEUCH-AE-RIEUL
+C3A8 CC54 # HANGUL SYLLABLE CHIEUCH-AE-MIEUM
+C3A9 CC55 # HANGUL SYLLABLE CHIEUCH-AE-PIEUP
+C3AA CC57 # HANGUL SYLLABLE CHIEUCH-AE-SIOS
+C3AB CC58 # HANGUL SYLLABLE CHIEUCH-AE-SSANGSIOS
+C3AC CC59 # HANGUL SYLLABLE CHIEUCH-AE-IEUNG
+C3AD CC60 # HANGUL SYLLABLE CHIEUCH-YA
+C3AE CC64 # HANGUL SYLLABLE CHIEUCH-YA-NIEUN
+C3AF CC66 # HANGUL SYLLABLE CHIEUCH-YA-NIEUNHIEUH
+C3B0 CC68 # HANGUL SYLLABLE CHIEUCH-YA-RIEUL
+C3B1 CC70 # HANGUL SYLLABLE CHIEUCH-YA-MIEUM
+C3B2 CC75 # HANGUL SYLLABLE CHIEUCH-YA-IEUNG
+C3B3 CC98 # HANGUL SYLLABLE CHIEUCH-EO
+C3B4 CC99 # HANGUL SYLLABLE CHIEUCH-EO-KIYEOK
+C3B5 CC9C # HANGUL SYLLABLE CHIEUCH-EO-NIEUN
+C3B6 CCA0 # HANGUL SYLLABLE CHIEUCH-EO-RIEUL
+C3B7 CCA8 # HANGUL SYLLABLE CHIEUCH-EO-MIEUM
+C3B8 CCA9 # HANGUL SYLLABLE CHIEUCH-EO-PIEUP
+C3B9 CCAB # HANGUL SYLLABLE CHIEUCH-EO-SIOS
+C3BA CCAC # HANGUL SYLLABLE CHIEUCH-EO-SSANGSIOS
+C3BB CCAD # HANGUL SYLLABLE CHIEUCH-EO-IEUNG
+C3BC CCB4 # HANGUL SYLLABLE CHIEUCH-E
+C3BD CCB5 # HANGUL SYLLABLE CHIEUCH-E-KIYEOK
+C3BE CCB8 # HANGUL SYLLABLE CHIEUCH-E-NIEUN
+C3BF CCBC # HANGUL SYLLABLE CHIEUCH-E-RIEUL
+C3C0 CCC4 # HANGUL SYLLABLE CHIEUCH-E-MIEUM
+C3C1 CCC5 # HANGUL SYLLABLE CHIEUCH-E-PIEUP
+C3C2 CCC7 # HANGUL SYLLABLE CHIEUCH-E-SIOS
+C3C3 CCC9 # HANGUL SYLLABLE CHIEUCH-E-IEUNG
+C3C4 CCD0 # HANGUL SYLLABLE CHIEUCH-YEO
+C3C5 CCD4 # HANGUL SYLLABLE CHIEUCH-YEO-NIEUN
+C3C6 CCE4 # HANGUL SYLLABLE CHIEUCH-YEO-SSANGSIOS
+C3C7 CCEC # HANGUL SYLLABLE CHIEUCH-YE
+C3C8 CCF0 # HANGUL SYLLABLE CHIEUCH-YE-NIEUN
+C3C9 CD01 # HANGUL SYLLABLE CHIEUCH-YE-IEUNG
+C3CA CD08 # HANGUL SYLLABLE CHIEUCH-O
+C3CB CD09 # HANGUL SYLLABLE CHIEUCH-O-KIYEOK
+C3CC CD0C # HANGUL SYLLABLE CHIEUCH-O-NIEUN
+C3CD CD10 # HANGUL SYLLABLE CHIEUCH-O-RIEUL
+C3CE CD18 # HANGUL SYLLABLE CHIEUCH-O-MIEUM
+C3CF CD19 # HANGUL SYLLABLE CHIEUCH-O-PIEUP
+C3D0 CD1B # HANGUL SYLLABLE CHIEUCH-O-SIOS
+C3D1 CD1D # HANGUL SYLLABLE CHIEUCH-O-IEUNG
+C3D2 CD24 # HANGUL SYLLABLE CHIEUCH-WA
+C3D3 CD28 # HANGUL SYLLABLE CHIEUCH-WA-NIEUN
+C3D4 CD2C # HANGUL SYLLABLE CHIEUCH-WA-RIEUL
+C3D5 CD39 # HANGUL SYLLABLE CHIEUCH-WA-IEUNG
+C3D6 CD5C # HANGUL SYLLABLE CHIEUCH-OE
+C3D7 CD60 # HANGUL SYLLABLE CHIEUCH-OE-NIEUN
+C3D8 CD64 # HANGUL SYLLABLE CHIEUCH-OE-RIEUL
+C3D9 CD6C # HANGUL SYLLABLE CHIEUCH-OE-MIEUM
+C3DA CD6D # HANGUL SYLLABLE CHIEUCH-OE-PIEUP
+C3DB CD6F # HANGUL SYLLABLE CHIEUCH-OE-SIOS
+C3DC CD71 # HANGUL SYLLABLE CHIEUCH-OE-IEUNG
+C3DD CD78 # HANGUL SYLLABLE CHIEUCH-YO
+C3DE CD88 # HANGUL SYLLABLE CHIEUCH-YO-MIEUM
+C3DF CD94 # HANGUL SYLLABLE CHIEUCH-U
+C3E0 CD95 # HANGUL SYLLABLE CHIEUCH-U-KIYEOK
+C3E1 CD98 # HANGUL SYLLABLE CHIEUCH-U-NIEUN
+C3E2 CD9C # HANGUL SYLLABLE CHIEUCH-U-RIEUL
+C3E3 CDA4 # HANGUL SYLLABLE CHIEUCH-U-MIEUM
+C3E4 CDA5 # HANGUL SYLLABLE CHIEUCH-U-PIEUP
+C3E5 CDA7 # HANGUL SYLLABLE CHIEUCH-U-SIOS
+C3E6 CDA9 # HANGUL SYLLABLE CHIEUCH-U-IEUNG
+C3E7 CDB0 # HANGUL SYLLABLE CHIEUCH-WEO
+C3E8 CDC4 # HANGUL SYLLABLE CHIEUCH-WEO-SSANGSIOS
+C3E9 CDCC # HANGUL SYLLABLE CHIEUCH-WE
+C3EA CDD0 # HANGUL SYLLABLE CHIEUCH-WE-NIEUN
+C3EB CDE8 # HANGUL SYLLABLE CHIEUCH-WI
+C3EC CDEC # HANGUL SYLLABLE CHIEUCH-WI-NIEUN
+C3ED CDF0 # HANGUL SYLLABLE CHIEUCH-WI-RIEUL
+C3EE CDF8 # HANGUL SYLLABLE CHIEUCH-WI-MIEUM
+C3EF CDF9 # HANGUL SYLLABLE CHIEUCH-WI-PIEUP
+C3F0 CDFB # HANGUL SYLLABLE CHIEUCH-WI-SIOS
+C3F1 CDFD # HANGUL SYLLABLE CHIEUCH-WI-IEUNG
+C3F2 CE04 # HANGUL SYLLABLE CHIEUCH-YU
+C3F3 CE08 # HANGUL SYLLABLE CHIEUCH-YU-NIEUN
+C3F4 CE0C # HANGUL SYLLABLE CHIEUCH-YU-RIEUL
+C3F5 CE14 # HANGUL SYLLABLE CHIEUCH-YU-MIEUM
+C3F6 CE19 # HANGUL SYLLABLE CHIEUCH-YU-IEUNG
+C3F7 CE20 # HANGUL SYLLABLE CHIEUCH-EU
+C3F8 CE21 # HANGUL SYLLABLE CHIEUCH-EU-KIYEOK
+C3F9 CE24 # HANGUL SYLLABLE CHIEUCH-EU-NIEUN
+C3FA CE28 # HANGUL SYLLABLE CHIEUCH-EU-RIEUL
+C3FB CE30 # HANGUL SYLLABLE CHIEUCH-EU-MIEUM
+C3FC CE31 # HANGUL SYLLABLE CHIEUCH-EU-PIEUP
+C3FD CE33 # HANGUL SYLLABLE CHIEUCH-EU-SIOS
+C3FE CE35 # HANGUL SYLLABLE CHIEUCH-EU-IEUNG
+C441 D6AB # HANGUL SYLLABLE HIEUH-YO-KIYEOKSIOS
+C442 D6AD # HANGUL SYLLABLE HIEUH-YO-NIEUNCIEUC
+C443 D6AE # HANGUL SYLLABLE HIEUH-YO-NIEUNHIEUH
+C444 D6AF # HANGUL SYLLABLE HIEUH-YO-TIKEUT
+C445 D6B1 # HANGUL SYLLABLE HIEUH-YO-RIEULKIYEOK
+C446 D6B2 # HANGUL SYLLABLE HIEUH-YO-RIEULMIEUM
+C447 D6B3 # HANGUL SYLLABLE HIEUH-YO-RIEULPIEUP
+C448 D6B4 # HANGUL SYLLABLE HIEUH-YO-RIEULSIOS
+C449 D6B5 # HANGUL SYLLABLE HIEUH-YO-RIEULTHIEUTH
+C44A D6B6 # HANGUL SYLLABLE HIEUH-YO-RIEULPHIEUPH
+C44B D6B7 # HANGUL SYLLABLE HIEUH-YO-RIEULHIEUH
+C44C D6B8 # HANGUL SYLLABLE HIEUH-YO-MIEUM
+C44D D6BA # HANGUL SYLLABLE HIEUH-YO-PIEUPSIOS
+C44E D6BC # HANGUL SYLLABLE HIEUH-YO-SSANGSIOS
+C44F D6BD # HANGUL SYLLABLE HIEUH-YO-IEUNG
+C450 D6BE # HANGUL SYLLABLE HIEUH-YO-CIEUC
+C451 D6BF # HANGUL SYLLABLE HIEUH-YO-CHIEUCH
+C452 D6C0 # HANGUL SYLLABLE HIEUH-YO-KHIEUKH
+C453 D6C1 # HANGUL SYLLABLE HIEUH-YO-THIEUTH
+C454 D6C2 # HANGUL SYLLABLE HIEUH-YO-PHIEUPH
+C455 D6C3 # HANGUL SYLLABLE HIEUH-YO-HIEUH
+C456 D6C6 # HANGUL SYLLABLE HIEUH-U-SSANGKIYEOK
+C457 D6C7 # HANGUL SYLLABLE HIEUH-U-KIYEOKSIOS
+C458 D6C9 # HANGUL SYLLABLE HIEUH-U-NIEUNCIEUC
+C459 D6CA # HANGUL SYLLABLE HIEUH-U-NIEUNHIEUH
+C45A D6CB # HANGUL SYLLABLE HIEUH-U-TIKEUT
+C461 D6CD # HANGUL SYLLABLE HIEUH-U-RIEULKIYEOK
+C462 D6CE # HANGUL SYLLABLE HIEUH-U-RIEULMIEUM
+C463 D6CF # HANGUL SYLLABLE HIEUH-U-RIEULPIEUP
+C464 D6D0 # HANGUL SYLLABLE HIEUH-U-RIEULSIOS
+C465 D6D2 # HANGUL SYLLABLE HIEUH-U-RIEULPHIEUPH
+C466 D6D3 # HANGUL SYLLABLE HIEUH-U-RIEULHIEUH
+C467 D6D5 # HANGUL SYLLABLE HIEUH-U-PIEUP
+C468 D6D6 # HANGUL SYLLABLE HIEUH-U-PIEUPSIOS
+C469 D6D8 # HANGUL SYLLABLE HIEUH-U-SSANGSIOS
+C46A D6DA # HANGUL SYLLABLE HIEUH-U-CIEUC
+C46B D6DB # HANGUL SYLLABLE HIEUH-U-CHIEUCH
+C46C D6DC # HANGUL SYLLABLE HIEUH-U-KHIEUKH
+C46D D6DD # HANGUL SYLLABLE HIEUH-U-THIEUTH
+C46E D6DE # HANGUL SYLLABLE HIEUH-U-PHIEUPH
+C46F D6DF # HANGUL SYLLABLE HIEUH-U-HIEUH
+C470 D6E1 # HANGUL SYLLABLE HIEUH-WEO-KIYEOK
+C471 D6E2 # HANGUL SYLLABLE HIEUH-WEO-SSANGKIYEOK
+C472 D6E3 # HANGUL SYLLABLE HIEUH-WEO-KIYEOKSIOS
+C473 D6E5 # HANGUL SYLLABLE HIEUH-WEO-NIEUNCIEUC
+C474 D6E6 # HANGUL SYLLABLE HIEUH-WEO-NIEUNHIEUH
+C475 D6E7 # HANGUL SYLLABLE HIEUH-WEO-TIKEUT
+C476 D6E9 # HANGUL SYLLABLE HIEUH-WEO-RIEULKIYEOK
+C477 D6EA # HANGUL SYLLABLE HIEUH-WEO-RIEULMIEUM
+C478 D6EB # HANGUL SYLLABLE HIEUH-WEO-RIEULPIEUP
+C479 D6EC # HANGUL SYLLABLE HIEUH-WEO-RIEULSIOS
+C47A D6ED # HANGUL SYLLABLE HIEUH-WEO-RIEULTHIEUTH
+C481 D6EE # HANGUL SYLLABLE HIEUH-WEO-RIEULPHIEUPH
+C482 D6EF # HANGUL SYLLABLE HIEUH-WEO-RIEULHIEUH
+C483 D6F1 # HANGUL SYLLABLE HIEUH-WEO-PIEUP
+C484 D6F2 # HANGUL SYLLABLE HIEUH-WEO-PIEUPSIOS
+C485 D6F3 # HANGUL SYLLABLE HIEUH-WEO-SIOS
+C486 D6F4 # HANGUL SYLLABLE HIEUH-WEO-SSANGSIOS
+C487 D6F6 # HANGUL SYLLABLE HIEUH-WEO-CIEUC
+C488 D6F7 # HANGUL SYLLABLE HIEUH-WEO-CHIEUCH
+C489 D6F8 # HANGUL SYLLABLE HIEUH-WEO-KHIEUKH
+C48A D6F9 # HANGUL SYLLABLE HIEUH-WEO-THIEUTH
+C48B D6FA # HANGUL SYLLABLE HIEUH-WEO-PHIEUPH
+C48C D6FB # HANGUL SYLLABLE HIEUH-WEO-HIEUH
+C48D D6FE # HANGUL SYLLABLE HIEUH-WE-SSANGKIYEOK
+C48E D6FF # HANGUL SYLLABLE HIEUH-WE-KIYEOKSIOS
+C48F D701 # HANGUL SYLLABLE HIEUH-WE-NIEUNCIEUC
+C490 D702 # HANGUL SYLLABLE HIEUH-WE-NIEUNHIEUH
+C491 D703 # HANGUL SYLLABLE HIEUH-WE-TIKEUT
+C492 D705 # HANGUL SYLLABLE HIEUH-WE-RIEULKIYEOK
+C493 D706 # HANGUL SYLLABLE HIEUH-WE-RIEULMIEUM
+C494 D707 # HANGUL SYLLABLE HIEUH-WE-RIEULPIEUP
+C495 D708 # HANGUL SYLLABLE HIEUH-WE-RIEULSIOS
+C496 D709 # HANGUL SYLLABLE HIEUH-WE-RIEULTHIEUTH
+C497 D70A # HANGUL SYLLABLE HIEUH-WE-RIEULPHIEUPH
+C498 D70B # HANGUL SYLLABLE HIEUH-WE-RIEULHIEUH
+C499 D70C # HANGUL SYLLABLE HIEUH-WE-MIEUM
+C49A D70D # HANGUL SYLLABLE HIEUH-WE-PIEUP
+C49B D70E # HANGUL SYLLABLE HIEUH-WE-PIEUPSIOS
+C49C D70F # HANGUL SYLLABLE HIEUH-WE-SIOS
+C49D D710 # HANGUL SYLLABLE HIEUH-WE-SSANGSIOS
+C49E D712 # HANGUL SYLLABLE HIEUH-WE-CIEUC
+C49F D713 # HANGUL SYLLABLE HIEUH-WE-CHIEUCH
+C4A0 D714 # HANGUL SYLLABLE HIEUH-WE-KHIEUKH
+C4A1 CE58 # HANGUL SYLLABLE CHIEUCH-I
+C4A2 CE59 # HANGUL SYLLABLE CHIEUCH-I-KIYEOK
+C4A3 CE5C # HANGUL SYLLABLE CHIEUCH-I-NIEUN
+C4A4 CE5F # HANGUL SYLLABLE CHIEUCH-I-TIKEUT
+C4A5 CE60 # HANGUL SYLLABLE CHIEUCH-I-RIEUL
+C4A6 CE61 # HANGUL SYLLABLE CHIEUCH-I-RIEULKIYEOK
+C4A7 CE68 # HANGUL SYLLABLE CHIEUCH-I-MIEUM
+C4A8 CE69 # HANGUL SYLLABLE CHIEUCH-I-PIEUP
+C4A9 CE6B # HANGUL SYLLABLE CHIEUCH-I-SIOS
+C4AA CE6D # HANGUL SYLLABLE CHIEUCH-I-IEUNG
+C4AB CE74 # HANGUL SYLLABLE KHIEUKH-A
+C4AC CE75 # HANGUL SYLLABLE KHIEUKH-A-KIYEOK
+C4AD CE78 # HANGUL SYLLABLE KHIEUKH-A-NIEUN
+C4AE CE7C # HANGUL SYLLABLE KHIEUKH-A-RIEUL
+C4AF CE84 # HANGUL SYLLABLE KHIEUKH-A-MIEUM
+C4B0 CE85 # HANGUL SYLLABLE KHIEUKH-A-PIEUP
+C4B1 CE87 # HANGUL SYLLABLE KHIEUKH-A-SIOS
+C4B2 CE89 # HANGUL SYLLABLE KHIEUKH-A-IEUNG
+C4B3 CE90 # HANGUL SYLLABLE KHIEUKH-AE
+C4B4 CE91 # HANGUL SYLLABLE KHIEUKH-AE-KIYEOK
+C4B5 CE94 # HANGUL SYLLABLE KHIEUKH-AE-NIEUN
+C4B6 CE98 # HANGUL SYLLABLE KHIEUKH-AE-RIEUL
+C4B7 CEA0 # HANGUL SYLLABLE KHIEUKH-AE-MIEUM
+C4B8 CEA1 # HANGUL SYLLABLE KHIEUKH-AE-PIEUP
+C4B9 CEA3 # HANGUL SYLLABLE KHIEUKH-AE-SIOS
+C4BA CEA4 # HANGUL SYLLABLE KHIEUKH-AE-SSANGSIOS
+C4BB CEA5 # HANGUL SYLLABLE KHIEUKH-AE-IEUNG
+C4BC CEAC # HANGUL SYLLABLE KHIEUKH-YA
+C4BD CEAD # HANGUL SYLLABLE KHIEUKH-YA-KIYEOK
+C4BE CEC1 # HANGUL SYLLABLE KHIEUKH-YA-IEUNG
+C4BF CEE4 # HANGUL SYLLABLE KHIEUKH-EO
+C4C0 CEE5 # HANGUL SYLLABLE KHIEUKH-EO-KIYEOK
+C4C1 CEE8 # HANGUL SYLLABLE KHIEUKH-EO-NIEUN
+C4C2 CEEB # HANGUL SYLLABLE KHIEUKH-EO-TIKEUT
+C4C3 CEEC # HANGUL SYLLABLE KHIEUKH-EO-RIEUL
+C4C4 CEF4 # HANGUL SYLLABLE KHIEUKH-EO-MIEUM
+C4C5 CEF5 # HANGUL SYLLABLE KHIEUKH-EO-PIEUP
+C4C6 CEF7 # HANGUL SYLLABLE KHIEUKH-EO-SIOS
+C4C7 CEF8 # HANGUL SYLLABLE KHIEUKH-EO-SSANGSIOS
+C4C8 CEF9 # HANGUL SYLLABLE KHIEUKH-EO-IEUNG
+C4C9 CF00 # HANGUL SYLLABLE KHIEUKH-E
+C4CA CF01 # HANGUL SYLLABLE KHIEUKH-E-KIYEOK
+C4CB CF04 # HANGUL SYLLABLE KHIEUKH-E-NIEUN
+C4CC CF08 # HANGUL SYLLABLE KHIEUKH-E-RIEUL
+C4CD CF10 # HANGUL SYLLABLE KHIEUKH-E-MIEUM
+C4CE CF11 # HANGUL SYLLABLE KHIEUKH-E-PIEUP
+C4CF CF13 # HANGUL SYLLABLE KHIEUKH-E-SIOS
+C4D0 CF15 # HANGUL SYLLABLE KHIEUKH-E-IEUNG
+C4D1 CF1C # HANGUL SYLLABLE KHIEUKH-YEO
+C4D2 CF20 # HANGUL SYLLABLE KHIEUKH-YEO-NIEUN
+C4D3 CF24 # HANGUL SYLLABLE KHIEUKH-YEO-RIEUL
+C4D4 CF2C # HANGUL SYLLABLE KHIEUKH-YEO-MIEUM
+C4D5 CF2D # HANGUL SYLLABLE KHIEUKH-YEO-PIEUP
+C4D6 CF2F # HANGUL SYLLABLE KHIEUKH-YEO-SIOS
+C4D7 CF30 # HANGUL SYLLABLE KHIEUKH-YEO-SSANGSIOS
+C4D8 CF31 # HANGUL SYLLABLE KHIEUKH-YEO-IEUNG
+C4D9 CF38 # HANGUL SYLLABLE KHIEUKH-YE
+C4DA CF54 # HANGUL SYLLABLE KHIEUKH-O
+C4DB CF55 # HANGUL SYLLABLE KHIEUKH-O-KIYEOK
+C4DC CF58 # HANGUL SYLLABLE KHIEUKH-O-NIEUN
+C4DD CF5C # HANGUL SYLLABLE KHIEUKH-O-RIEUL
+C4DE CF64 # HANGUL SYLLABLE KHIEUKH-O-MIEUM
+C4DF CF65 # HANGUL SYLLABLE KHIEUKH-O-PIEUP
+C4E0 CF67 # HANGUL SYLLABLE KHIEUKH-O-SIOS
+C4E1 CF69 # HANGUL SYLLABLE KHIEUKH-O-IEUNG
+C4E2 CF70 # HANGUL SYLLABLE KHIEUKH-WA
+C4E3 CF71 # HANGUL SYLLABLE KHIEUKH-WA-KIYEOK
+C4E4 CF74 # HANGUL SYLLABLE KHIEUKH-WA-NIEUN
+C4E5 CF78 # HANGUL SYLLABLE KHIEUKH-WA-RIEUL
+C4E6 CF80 # HANGUL SYLLABLE KHIEUKH-WA-MIEUM
+C4E7 CF85 # HANGUL SYLLABLE KHIEUKH-WA-IEUNG
+C4E8 CF8C # HANGUL SYLLABLE KHIEUKH-WAE
+C4E9 CFA1 # HANGUL SYLLABLE KHIEUKH-WAE-IEUNG
+C4EA CFA8 # HANGUL SYLLABLE KHIEUKH-OE
+C4EB CFB0 # HANGUL SYLLABLE KHIEUKH-OE-RIEUL
+C4EC CFC4 # HANGUL SYLLABLE KHIEUKH-YO
+C4ED CFE0 # HANGUL SYLLABLE KHIEUKH-U
+C4EE CFE1 # HANGUL SYLLABLE KHIEUKH-U-KIYEOK
+C4EF CFE4 # HANGUL SYLLABLE KHIEUKH-U-NIEUN
+C4F0 CFE8 # HANGUL SYLLABLE KHIEUKH-U-RIEUL
+C4F1 CFF0 # HANGUL SYLLABLE KHIEUKH-U-MIEUM
+C4F2 CFF1 # HANGUL SYLLABLE KHIEUKH-U-PIEUP
+C4F3 CFF3 # HANGUL SYLLABLE KHIEUKH-U-SIOS
+C4F4 CFF5 # HANGUL SYLLABLE KHIEUKH-U-IEUNG
+C4F5 CFFC # HANGUL SYLLABLE KHIEUKH-WEO
+C4F6 D000 # HANGUL SYLLABLE KHIEUKH-WEO-NIEUN
+C4F7 D004 # HANGUL SYLLABLE KHIEUKH-WEO-RIEUL
+C4F8 D011 # HANGUL SYLLABLE KHIEUKH-WEO-IEUNG
+C4F9 D018 # HANGUL SYLLABLE KHIEUKH-WE
+C4FA D02D # HANGUL SYLLABLE KHIEUKH-WE-IEUNG
+C4FB D034 # HANGUL SYLLABLE KHIEUKH-WI
+C4FC D035 # HANGUL SYLLABLE KHIEUKH-WI-KIYEOK
+C4FD D038 # HANGUL SYLLABLE KHIEUKH-WI-NIEUN
+C4FE D03C # HANGUL SYLLABLE KHIEUKH-WI-RIEUL
+C541 D715 # HANGUL SYLLABLE HIEUH-WE-THIEUTH
+C542 D716 # HANGUL SYLLABLE HIEUH-WE-PHIEUPH
+C543 D717 # HANGUL SYLLABLE HIEUH-WE-HIEUH
+C544 D71A # HANGUL SYLLABLE HIEUH-WI-SSANGKIYEOK
+C545 D71B # HANGUL SYLLABLE HIEUH-WI-KIYEOKSIOS
+C546 D71D # HANGUL SYLLABLE HIEUH-WI-NIEUNCIEUC
+C547 D71E # HANGUL SYLLABLE HIEUH-WI-NIEUNHIEUH
+C548 D71F # HANGUL SYLLABLE HIEUH-WI-TIKEUT
+C549 D721 # HANGUL SYLLABLE HIEUH-WI-RIEULKIYEOK
+C54A D722 # HANGUL SYLLABLE HIEUH-WI-RIEULMIEUM
+C54B D723 # HANGUL SYLLABLE HIEUH-WI-RIEULPIEUP
+C54C D724 # HANGUL SYLLABLE HIEUH-WI-RIEULSIOS
+C54D D725 # HANGUL SYLLABLE HIEUH-WI-RIEULTHIEUTH
+C54E D726 # HANGUL SYLLABLE HIEUH-WI-RIEULPHIEUPH
+C54F D727 # HANGUL SYLLABLE HIEUH-WI-RIEULHIEUH
+C550 D72A # HANGUL SYLLABLE HIEUH-WI-PIEUPSIOS
+C551 D72C # HANGUL SYLLABLE HIEUH-WI-SSANGSIOS
+C552 D72E # HANGUL SYLLABLE HIEUH-WI-CIEUC
+C553 D72F # HANGUL SYLLABLE HIEUH-WI-CHIEUCH
+C554 D730 # HANGUL SYLLABLE HIEUH-WI-KHIEUKH
+C555 D731 # HANGUL SYLLABLE HIEUH-WI-THIEUTH
+C556 D732 # HANGUL SYLLABLE HIEUH-WI-PHIEUPH
+C557 D733 # HANGUL SYLLABLE HIEUH-WI-HIEUH
+C558 D736 # HANGUL SYLLABLE HIEUH-YU-SSANGKIYEOK
+C559 D737 # HANGUL SYLLABLE HIEUH-YU-KIYEOKSIOS
+C55A D739 # HANGUL SYLLABLE HIEUH-YU-NIEUNCIEUC
+C561 D73A # HANGUL SYLLABLE HIEUH-YU-NIEUNHIEUH
+C562 D73B # HANGUL SYLLABLE HIEUH-YU-TIKEUT
+C563 D73D # HANGUL SYLLABLE HIEUH-YU-RIEULKIYEOK
+C564 D73E # HANGUL SYLLABLE HIEUH-YU-RIEULMIEUM
+C565 D73F # HANGUL SYLLABLE HIEUH-YU-RIEULPIEUP
+C566 D740 # HANGUL SYLLABLE HIEUH-YU-RIEULSIOS
+C567 D741 # HANGUL SYLLABLE HIEUH-YU-RIEULTHIEUTH
+C568 D742 # HANGUL SYLLABLE HIEUH-YU-RIEULPHIEUPH
+C569 D743 # HANGUL SYLLABLE HIEUH-YU-RIEULHIEUH
+C56A D745 # HANGUL SYLLABLE HIEUH-YU-PIEUP
+C56B D746 # HANGUL SYLLABLE HIEUH-YU-PIEUPSIOS
+C56C D748 # HANGUL SYLLABLE HIEUH-YU-SSANGSIOS
+C56D D74A # HANGUL SYLLABLE HIEUH-YU-CIEUC
+C56E D74B # HANGUL SYLLABLE HIEUH-YU-CHIEUCH
+C56F D74C # HANGUL SYLLABLE HIEUH-YU-KHIEUKH
+C570 D74D # HANGUL SYLLABLE HIEUH-YU-THIEUTH
+C571 D74E # HANGUL SYLLABLE HIEUH-YU-PHIEUPH
+C572 D74F # HANGUL SYLLABLE HIEUH-YU-HIEUH
+C573 D752 # HANGUL SYLLABLE HIEUH-EU-SSANGKIYEOK
+C574 D753 # HANGUL SYLLABLE HIEUH-EU-KIYEOKSIOS
+C575 D755 # HANGUL SYLLABLE HIEUH-EU-NIEUNCIEUC
+C576 D75A # HANGUL SYLLABLE HIEUH-EU-RIEULMIEUM
+C577 D75B # HANGUL SYLLABLE HIEUH-EU-RIEULPIEUP
+C578 D75C # HANGUL SYLLABLE HIEUH-EU-RIEULSIOS
+C579 D75D # HANGUL SYLLABLE HIEUH-EU-RIEULTHIEUTH
+C57A D75E # HANGUL SYLLABLE HIEUH-EU-RIEULPHIEUPH
+C581 D75F # HANGUL SYLLABLE HIEUH-EU-RIEULHIEUH
+C582 D762 # HANGUL SYLLABLE HIEUH-EU-PIEUPSIOS
+C583 D764 # HANGUL SYLLABLE HIEUH-EU-SSANGSIOS
+C584 D766 # HANGUL SYLLABLE HIEUH-EU-CIEUC
+C585 D767 # HANGUL SYLLABLE HIEUH-EU-CHIEUCH
+C586 D768 # HANGUL SYLLABLE HIEUH-EU-KHIEUKH
+C587 D76A # HANGUL SYLLABLE HIEUH-EU-PHIEUPH
+C588 D76B # HANGUL SYLLABLE HIEUH-EU-HIEUH
+C589 D76D # HANGUL SYLLABLE HIEUH-YI-KIYEOK
+C58A D76E # HANGUL SYLLABLE HIEUH-YI-SSANGKIYEOK
+C58B D76F # HANGUL SYLLABLE HIEUH-YI-KIYEOKSIOS
+C58C D771 # HANGUL SYLLABLE HIEUH-YI-NIEUNCIEUC
+C58D D772 # HANGUL SYLLABLE HIEUH-YI-NIEUNHIEUH
+C58E D773 # HANGUL SYLLABLE HIEUH-YI-TIKEUT
+C58F D775 # HANGUL SYLLABLE HIEUH-YI-RIEULKIYEOK
+C590 D776 # HANGUL SYLLABLE HIEUH-YI-RIEULMIEUM
+C591 D777 # HANGUL SYLLABLE HIEUH-YI-RIEULPIEUP
+C592 D778 # HANGUL SYLLABLE HIEUH-YI-RIEULSIOS
+C593 D779 # HANGUL SYLLABLE HIEUH-YI-RIEULTHIEUTH
+C594 D77A # HANGUL SYLLABLE HIEUH-YI-RIEULPHIEUPH
+C595 D77B # HANGUL SYLLABLE HIEUH-YI-RIEULHIEUH
+C596 D77E # HANGUL SYLLABLE HIEUH-YI-PIEUPSIOS
+C597 D77F # HANGUL SYLLABLE HIEUH-YI-SIOS
+C598 D780 # HANGUL SYLLABLE HIEUH-YI-SSANGSIOS
+C599 D782 # HANGUL SYLLABLE HIEUH-YI-CIEUC
+C59A D783 # HANGUL SYLLABLE HIEUH-YI-CHIEUCH
+C59B D784 # HANGUL SYLLABLE HIEUH-YI-KHIEUKH
+C59C D785 # HANGUL SYLLABLE HIEUH-YI-THIEUTH
+C59D D786 # HANGUL SYLLABLE HIEUH-YI-PHIEUPH
+C59E D787 # HANGUL SYLLABLE HIEUH-YI-HIEUH
+C59F D78A # HANGUL SYLLABLE HIEUH-I-SSANGKIYEOK
+C5A0 D78B # HANGUL SYLLABLE HIEUH-I-KIYEOKSIOS
+C5A1 D044 # HANGUL SYLLABLE KHIEUKH-WI-MIEUM
+C5A2 D045 # HANGUL SYLLABLE KHIEUKH-WI-PIEUP
+C5A3 D047 # HANGUL SYLLABLE KHIEUKH-WI-SIOS
+C5A4 D049 # HANGUL SYLLABLE KHIEUKH-WI-IEUNG
+C5A5 D050 # HANGUL SYLLABLE KHIEUKH-YU
+C5A6 D054 # HANGUL SYLLABLE KHIEUKH-YU-NIEUN
+C5A7 D058 # HANGUL SYLLABLE KHIEUKH-YU-RIEUL
+C5A8 D060 # HANGUL SYLLABLE KHIEUKH-YU-MIEUM
+C5A9 D06C # HANGUL SYLLABLE KHIEUKH-EU
+C5AA D06D # HANGUL SYLLABLE KHIEUKH-EU-KIYEOK
+C5AB D070 # HANGUL SYLLABLE KHIEUKH-EU-NIEUN
+C5AC D074 # HANGUL SYLLABLE KHIEUKH-EU-RIEUL
+C5AD D07C # HANGUL SYLLABLE KHIEUKH-EU-MIEUM
+C5AE D07D # HANGUL SYLLABLE KHIEUKH-EU-PIEUP
+C5AF D081 # HANGUL SYLLABLE KHIEUKH-EU-IEUNG
+C5B0 D0A4 # HANGUL SYLLABLE KHIEUKH-I
+C5B1 D0A5 # HANGUL SYLLABLE KHIEUKH-I-KIYEOK
+C5B2 D0A8 # HANGUL SYLLABLE KHIEUKH-I-NIEUN
+C5B3 D0AC # HANGUL SYLLABLE KHIEUKH-I-RIEUL
+C5B4 D0B4 # HANGUL SYLLABLE KHIEUKH-I-MIEUM
+C5B5 D0B5 # HANGUL SYLLABLE KHIEUKH-I-PIEUP
+C5B6 D0B7 # HANGUL SYLLABLE KHIEUKH-I-SIOS
+C5B7 D0B9 # HANGUL SYLLABLE KHIEUKH-I-IEUNG
+C5B8 D0C0 # HANGUL SYLLABLE THIEUTH-A
+C5B9 D0C1 # HANGUL SYLLABLE THIEUTH-A-KIYEOK
+C5BA D0C4 # HANGUL SYLLABLE THIEUTH-A-NIEUN
+C5BB D0C8 # HANGUL SYLLABLE THIEUTH-A-RIEUL
+C5BC D0C9 # HANGUL SYLLABLE THIEUTH-A-RIEULKIYEOK
+C5BD D0D0 # HANGUL SYLLABLE THIEUTH-A-MIEUM
+C5BE D0D1 # HANGUL SYLLABLE THIEUTH-A-PIEUP
+C5BF D0D3 # HANGUL SYLLABLE THIEUTH-A-SIOS
+C5C0 D0D4 # HANGUL SYLLABLE THIEUTH-A-SSANGSIOS
+C5C1 D0D5 # HANGUL SYLLABLE THIEUTH-A-IEUNG
+C5C2 D0DC # HANGUL SYLLABLE THIEUTH-AE
+C5C3 D0DD # HANGUL SYLLABLE THIEUTH-AE-KIYEOK
+C5C4 D0E0 # HANGUL SYLLABLE THIEUTH-AE-NIEUN
+C5C5 D0E4 # HANGUL SYLLABLE THIEUTH-AE-RIEUL
+C5C6 D0EC # HANGUL SYLLABLE THIEUTH-AE-MIEUM
+C5C7 D0ED # HANGUL SYLLABLE THIEUTH-AE-PIEUP
+C5C8 D0EF # HANGUL SYLLABLE THIEUTH-AE-SIOS
+C5C9 D0F0 # HANGUL SYLLABLE THIEUTH-AE-SSANGSIOS
+C5CA D0F1 # HANGUL SYLLABLE THIEUTH-AE-IEUNG
+C5CB D0F8 # HANGUL SYLLABLE THIEUTH-YA
+C5CC D10D # HANGUL SYLLABLE THIEUTH-YA-IEUNG
+C5CD D130 # HANGUL SYLLABLE THIEUTH-EO
+C5CE D131 # HANGUL SYLLABLE THIEUTH-EO-KIYEOK
+C5CF D134 # HANGUL SYLLABLE THIEUTH-EO-NIEUN
+C5D0 D138 # HANGUL SYLLABLE THIEUTH-EO-RIEUL
+C5D1 D13A # HANGUL SYLLABLE THIEUTH-EO-RIEULMIEUM
+C5D2 D140 # HANGUL SYLLABLE THIEUTH-EO-MIEUM
+C5D3 D141 # HANGUL SYLLABLE THIEUTH-EO-PIEUP
+C5D4 D143 # HANGUL SYLLABLE THIEUTH-EO-SIOS
+C5D5 D144 # HANGUL SYLLABLE THIEUTH-EO-SSANGSIOS
+C5D6 D145 # HANGUL SYLLABLE THIEUTH-EO-IEUNG
+C5D7 D14C # HANGUL SYLLABLE THIEUTH-E
+C5D8 D14D # HANGUL SYLLABLE THIEUTH-E-KIYEOK
+C5D9 D150 # HANGUL SYLLABLE THIEUTH-E-NIEUN
+C5DA D154 # HANGUL SYLLABLE THIEUTH-E-RIEUL
+C5DB D15C # HANGUL SYLLABLE THIEUTH-E-MIEUM
+C5DC D15D # HANGUL SYLLABLE THIEUTH-E-PIEUP
+C5DD D15F # HANGUL SYLLABLE THIEUTH-E-SIOS
+C5DE D161 # HANGUL SYLLABLE THIEUTH-E-IEUNG
+C5DF D168 # HANGUL SYLLABLE THIEUTH-YEO
+C5E0 D16C # HANGUL SYLLABLE THIEUTH-YEO-NIEUN
+C5E1 D17C # HANGUL SYLLABLE THIEUTH-YEO-SSANGSIOS
+C5E2 D184 # HANGUL SYLLABLE THIEUTH-YE
+C5E3 D188 # HANGUL SYLLABLE THIEUTH-YE-NIEUN
+C5E4 D1A0 # HANGUL SYLLABLE THIEUTH-O
+C5E5 D1A1 # HANGUL SYLLABLE THIEUTH-O-KIYEOK
+C5E6 D1A4 # HANGUL SYLLABLE THIEUTH-O-NIEUN
+C5E7 D1A8 # HANGUL SYLLABLE THIEUTH-O-RIEUL
+C5E8 D1B0 # HANGUL SYLLABLE THIEUTH-O-MIEUM
+C5E9 D1B1 # HANGUL SYLLABLE THIEUTH-O-PIEUP
+C5EA D1B3 # HANGUL SYLLABLE THIEUTH-O-SIOS
+C5EB D1B5 # HANGUL SYLLABLE THIEUTH-O-IEUNG
+C5EC D1BA # HANGUL SYLLABLE THIEUTH-O-PHIEUPH
+C5ED D1BC # HANGUL SYLLABLE THIEUTH-WA
+C5EE D1C0 # HANGUL SYLLABLE THIEUTH-WA-NIEUN
+C5EF D1D8 # HANGUL SYLLABLE THIEUTH-WAE
+C5F0 D1F4 # HANGUL SYLLABLE THIEUTH-OE
+C5F1 D1F8 # HANGUL SYLLABLE THIEUTH-OE-NIEUN
+C5F2 D207 # HANGUL SYLLABLE THIEUTH-OE-SIOS
+C5F3 D209 # HANGUL SYLLABLE THIEUTH-OE-IEUNG
+C5F4 D210 # HANGUL SYLLABLE THIEUTH-YO
+C5F5 D22C # HANGUL SYLLABLE THIEUTH-U
+C5F6 D22D # HANGUL SYLLABLE THIEUTH-U-KIYEOK
+C5F7 D230 # HANGUL SYLLABLE THIEUTH-U-NIEUN
+C5F8 D234 # HANGUL SYLLABLE THIEUTH-U-RIEUL
+C5F9 D23C # HANGUL SYLLABLE THIEUTH-U-MIEUM
+C5FA D23D # HANGUL SYLLABLE THIEUTH-U-PIEUP
+C5FB D23F # HANGUL SYLLABLE THIEUTH-U-SIOS
+C5FC D241 # HANGUL SYLLABLE THIEUTH-U-IEUNG
+C5FD D248 # HANGUL SYLLABLE THIEUTH-WEO
+C5FE D25C # HANGUL SYLLABLE THIEUTH-WEO-SSANGSIOS
+C641 D78D # HANGUL SYLLABLE HIEUH-I-NIEUNCIEUC
+C642 D78E # HANGUL SYLLABLE HIEUH-I-NIEUNHIEUH
+C643 D78F # HANGUL SYLLABLE HIEUH-I-TIKEUT
+C644 D791 # HANGUL SYLLABLE HIEUH-I-RIEULKIYEOK
+C645 D792 # HANGUL SYLLABLE HIEUH-I-RIEULMIEUM
+C646 D793 # HANGUL SYLLABLE HIEUH-I-RIEULPIEUP
+C647 D794 # HANGUL SYLLABLE HIEUH-I-RIEULSIOS
+C648 D795 # HANGUL SYLLABLE HIEUH-I-RIEULTHIEUTH
+C649 D796 # HANGUL SYLLABLE HIEUH-I-RIEULPHIEUPH
+C64A D797 # HANGUL SYLLABLE HIEUH-I-RIEULHIEUH
+C64B D79A # HANGUL SYLLABLE HIEUH-I-PIEUPSIOS
+C64C D79C # HANGUL SYLLABLE HIEUH-I-SSANGSIOS
+C64D D79E # HANGUL SYLLABLE HIEUH-I-CIEUC
+C64E D79F # HANGUL SYLLABLE HIEUH-I-CHIEUCH
+C64F D7A0 # HANGUL SYLLABLE HIEUH-I-KHIEUKH
+C650 D7A1 # HANGUL SYLLABLE HIEUH-I-THIEUTH
+C651 D7A2 # HANGUL SYLLABLE HIEUH-I-PHIEUPH
+C652 D7A3 # HANGUL SYLLABLE HIEUH-I-HIEUH
+C6A1 D264 # HANGUL SYLLABLE THIEUTH-WE
+C6A2 D280 # HANGUL SYLLABLE THIEUTH-WI
+C6A3 D281 # HANGUL SYLLABLE THIEUTH-WI-KIYEOK
+C6A4 D284 # HANGUL SYLLABLE THIEUTH-WI-NIEUN
+C6A5 D288 # HANGUL SYLLABLE THIEUTH-WI-RIEUL
+C6A6 D290 # HANGUL SYLLABLE THIEUTH-WI-MIEUM
+C6A7 D291 # HANGUL SYLLABLE THIEUTH-WI-PIEUP
+C6A8 D295 # HANGUL SYLLABLE THIEUTH-WI-IEUNG
+C6A9 D29C # HANGUL SYLLABLE THIEUTH-YU
+C6AA D2A0 # HANGUL SYLLABLE THIEUTH-YU-NIEUN
+C6AB D2A4 # HANGUL SYLLABLE THIEUTH-YU-RIEUL
+C6AC D2AC # HANGUL SYLLABLE THIEUTH-YU-MIEUM
+C6AD D2B1 # HANGUL SYLLABLE THIEUTH-YU-IEUNG
+C6AE D2B8 # HANGUL SYLLABLE THIEUTH-EU
+C6AF D2B9 # HANGUL SYLLABLE THIEUTH-EU-KIYEOK
+C6B0 D2BC # HANGUL SYLLABLE THIEUTH-EU-NIEUN
+C6B1 D2BF # HANGUL SYLLABLE THIEUTH-EU-TIKEUT
+C6B2 D2C0 # HANGUL SYLLABLE THIEUTH-EU-RIEUL
+C6B3 D2C2 # HANGUL SYLLABLE THIEUTH-EU-RIEULMIEUM
+C6B4 D2C8 # HANGUL SYLLABLE THIEUTH-EU-MIEUM
+C6B5 D2C9 # HANGUL SYLLABLE THIEUTH-EU-PIEUP
+C6B6 D2CB # HANGUL SYLLABLE THIEUTH-EU-SIOS
+C6B7 D2D4 # HANGUL SYLLABLE THIEUTH-YI
+C6B8 D2D8 # HANGUL SYLLABLE THIEUTH-YI-NIEUN
+C6B9 D2DC # HANGUL SYLLABLE THIEUTH-YI-RIEUL
+C6BA D2E4 # HANGUL SYLLABLE THIEUTH-YI-MIEUM
+C6BB D2E5 # HANGUL SYLLABLE THIEUTH-YI-PIEUP
+C6BC D2F0 # HANGUL SYLLABLE THIEUTH-I
+C6BD D2F1 # HANGUL SYLLABLE THIEUTH-I-KIYEOK
+C6BE D2F4 # HANGUL SYLLABLE THIEUTH-I-NIEUN
+C6BF D2F8 # HANGUL SYLLABLE THIEUTH-I-RIEUL
+C6C0 D300 # HANGUL SYLLABLE THIEUTH-I-MIEUM
+C6C1 D301 # HANGUL SYLLABLE THIEUTH-I-PIEUP
+C6C2 D303 # HANGUL SYLLABLE THIEUTH-I-SIOS
+C6C3 D305 # HANGUL SYLLABLE THIEUTH-I-IEUNG
+C6C4 D30C # HANGUL SYLLABLE PHIEUPH-A
+C6C5 D30D # HANGUL SYLLABLE PHIEUPH-A-KIYEOK
+C6C6 D30E # HANGUL SYLLABLE PHIEUPH-A-SSANGKIYEOK
+C6C7 D310 # HANGUL SYLLABLE PHIEUPH-A-NIEUN
+C6C8 D314 # HANGUL SYLLABLE PHIEUPH-A-RIEUL
+C6C9 D316 # HANGUL SYLLABLE PHIEUPH-A-RIEULMIEUM
+C6CA D31C # HANGUL SYLLABLE PHIEUPH-A-MIEUM
+C6CB D31D # HANGUL SYLLABLE PHIEUPH-A-PIEUP
+C6CC D31F # HANGUL SYLLABLE PHIEUPH-A-SIOS
+C6CD D320 # HANGUL SYLLABLE PHIEUPH-A-SSANGSIOS
+C6CE D321 # HANGUL SYLLABLE PHIEUPH-A-IEUNG
+C6CF D325 # HANGUL SYLLABLE PHIEUPH-A-THIEUTH
+C6D0 D328 # HANGUL SYLLABLE PHIEUPH-AE
+C6D1 D329 # HANGUL SYLLABLE PHIEUPH-AE-KIYEOK
+C6D2 D32C # HANGUL SYLLABLE PHIEUPH-AE-NIEUN
+C6D3 D330 # HANGUL SYLLABLE PHIEUPH-AE-RIEUL
+C6D4 D338 # HANGUL SYLLABLE PHIEUPH-AE-MIEUM
+C6D5 D339 # HANGUL SYLLABLE PHIEUPH-AE-PIEUP
+C6D6 D33B # HANGUL SYLLABLE PHIEUPH-AE-SIOS
+C6D7 D33C # HANGUL SYLLABLE PHIEUPH-AE-SSANGSIOS
+C6D8 D33D # HANGUL SYLLABLE PHIEUPH-AE-IEUNG
+C6D9 D344 # HANGUL SYLLABLE PHIEUPH-YA
+C6DA D345 # HANGUL SYLLABLE PHIEUPH-YA-KIYEOK
+C6DB D37C # HANGUL SYLLABLE PHIEUPH-EO
+C6DC D37D # HANGUL SYLLABLE PHIEUPH-EO-KIYEOK
+C6DD D380 # HANGUL SYLLABLE PHIEUPH-EO-NIEUN
+C6DE D384 # HANGUL SYLLABLE PHIEUPH-EO-RIEUL
+C6DF D38C # HANGUL SYLLABLE PHIEUPH-EO-MIEUM
+C6E0 D38D # HANGUL SYLLABLE PHIEUPH-EO-PIEUP
+C6E1 D38F # HANGUL SYLLABLE PHIEUPH-EO-SIOS
+C6E2 D390 # HANGUL SYLLABLE PHIEUPH-EO-SSANGSIOS
+C6E3 D391 # HANGUL SYLLABLE PHIEUPH-EO-IEUNG
+C6E4 D398 # HANGUL SYLLABLE PHIEUPH-E
+C6E5 D399 # HANGUL SYLLABLE PHIEUPH-E-KIYEOK
+C6E6 D39C # HANGUL SYLLABLE PHIEUPH-E-NIEUN
+C6E7 D3A0 # HANGUL SYLLABLE PHIEUPH-E-RIEUL
+C6E8 D3A8 # HANGUL SYLLABLE PHIEUPH-E-MIEUM
+C6E9 D3A9 # HANGUL SYLLABLE PHIEUPH-E-PIEUP
+C6EA D3AB # HANGUL SYLLABLE PHIEUPH-E-SIOS
+C6EB D3AD # HANGUL SYLLABLE PHIEUPH-E-IEUNG
+C6EC D3B4 # HANGUL SYLLABLE PHIEUPH-YEO
+C6ED D3B8 # HANGUL SYLLABLE PHIEUPH-YEO-NIEUN
+C6EE D3BC # HANGUL SYLLABLE PHIEUPH-YEO-RIEUL
+C6EF D3C4 # HANGUL SYLLABLE PHIEUPH-YEO-MIEUM
+C6F0 D3C5 # HANGUL SYLLABLE PHIEUPH-YEO-PIEUP
+C6F1 D3C8 # HANGUL SYLLABLE PHIEUPH-YEO-SSANGSIOS
+C6F2 D3C9 # HANGUL SYLLABLE PHIEUPH-YEO-IEUNG
+C6F3 D3D0 # HANGUL SYLLABLE PHIEUPH-YE
+C6F4 D3D8 # HANGUL SYLLABLE PHIEUPH-YE-RIEUL
+C6F5 D3E1 # HANGUL SYLLABLE PHIEUPH-YE-PIEUP
+C6F6 D3E3 # HANGUL SYLLABLE PHIEUPH-YE-SIOS
+C6F7 D3EC # HANGUL SYLLABLE PHIEUPH-O
+C6F8 D3ED # HANGUL SYLLABLE PHIEUPH-O-KIYEOK
+C6F9 D3F0 # HANGUL SYLLABLE PHIEUPH-O-NIEUN
+C6FA D3F4 # HANGUL SYLLABLE PHIEUPH-O-RIEUL
+C6FB D3FC # HANGUL SYLLABLE PHIEUPH-O-MIEUM
+C6FC D3FD # HANGUL SYLLABLE PHIEUPH-O-PIEUP
+C6FD D3FF # HANGUL SYLLABLE PHIEUPH-O-SIOS
+C6FE D401 # HANGUL SYLLABLE PHIEUPH-O-IEUNG
+C7A1 D408 # HANGUL SYLLABLE PHIEUPH-WA
+C7A2 D41D # HANGUL SYLLABLE PHIEUPH-WA-IEUNG
+C7A3 D440 # HANGUL SYLLABLE PHIEUPH-OE
+C7A4 D444 # HANGUL SYLLABLE PHIEUPH-OE-NIEUN
+C7A5 D45C # HANGUL SYLLABLE PHIEUPH-YO
+C7A6 D460 # HANGUL SYLLABLE PHIEUPH-YO-NIEUN
+C7A7 D464 # HANGUL SYLLABLE PHIEUPH-YO-RIEUL
+C7A8 D46D # HANGUL SYLLABLE PHIEUPH-YO-PIEUP
+C7A9 D46F # HANGUL SYLLABLE PHIEUPH-YO-SIOS
+C7AA D478 # HANGUL SYLLABLE PHIEUPH-U
+C7AB D479 # HANGUL SYLLABLE PHIEUPH-U-KIYEOK
+C7AC D47C # HANGUL SYLLABLE PHIEUPH-U-NIEUN
+C7AD D47F # HANGUL SYLLABLE PHIEUPH-U-TIKEUT
+C7AE D480 # HANGUL SYLLABLE PHIEUPH-U-RIEUL
+C7AF D482 # HANGUL SYLLABLE PHIEUPH-U-RIEULMIEUM
+C7B0 D488 # HANGUL SYLLABLE PHIEUPH-U-MIEUM
+C7B1 D489 # HANGUL SYLLABLE PHIEUPH-U-PIEUP
+C7B2 D48B # HANGUL SYLLABLE PHIEUPH-U-SIOS
+C7B3 D48D # HANGUL SYLLABLE PHIEUPH-U-IEUNG
+C7B4 D494 # HANGUL SYLLABLE PHIEUPH-WEO
+C7B5 D4A9 # HANGUL SYLLABLE PHIEUPH-WEO-IEUNG
+C7B6 D4CC # HANGUL SYLLABLE PHIEUPH-WI
+C7B7 D4D0 # HANGUL SYLLABLE PHIEUPH-WI-NIEUN
+C7B8 D4D4 # HANGUL SYLLABLE PHIEUPH-WI-RIEUL
+C7B9 D4DC # HANGUL SYLLABLE PHIEUPH-WI-MIEUM
+C7BA D4DF # HANGUL SYLLABLE PHIEUPH-WI-SIOS
+C7BB D4E8 # HANGUL SYLLABLE PHIEUPH-YU
+C7BC D4EC # HANGUL SYLLABLE PHIEUPH-YU-NIEUN
+C7BD D4F0 # HANGUL SYLLABLE PHIEUPH-YU-RIEUL
+C7BE D4F8 # HANGUL SYLLABLE PHIEUPH-YU-MIEUM
+C7BF D4FB # HANGUL SYLLABLE PHIEUPH-YU-SIOS
+C7C0 D4FD # HANGUL SYLLABLE PHIEUPH-YU-IEUNG
+C7C1 D504 # HANGUL SYLLABLE PHIEUPH-EU
+C7C2 D508 # HANGUL SYLLABLE PHIEUPH-EU-NIEUN
+C7C3 D50C # HANGUL SYLLABLE PHIEUPH-EU-RIEUL
+C7C4 D514 # HANGUL SYLLABLE PHIEUPH-EU-MIEUM
+C7C5 D515 # HANGUL SYLLABLE PHIEUPH-EU-PIEUP
+C7C6 D517 # HANGUL SYLLABLE PHIEUPH-EU-SIOS
+C7C7 D53C # HANGUL SYLLABLE PHIEUPH-I
+C7C8 D53D # HANGUL SYLLABLE PHIEUPH-I-KIYEOK
+C7C9 D540 # HANGUL SYLLABLE PHIEUPH-I-NIEUN
+C7CA D544 # HANGUL SYLLABLE PHIEUPH-I-RIEUL
+C7CB D54C # HANGUL SYLLABLE PHIEUPH-I-MIEUM
+C7CC D54D # HANGUL SYLLABLE PHIEUPH-I-PIEUP
+C7CD D54F # HANGUL SYLLABLE PHIEUPH-I-SIOS
+C7CE D551 # HANGUL SYLLABLE PHIEUPH-I-IEUNG
+C7CF D558 # HANGUL SYLLABLE HIEUH-A
+C7D0 D559 # HANGUL SYLLABLE HIEUH-A-KIYEOK
+C7D1 D55C # HANGUL SYLLABLE HIEUH-A-NIEUN
+C7D2 D560 # HANGUL SYLLABLE HIEUH-A-RIEUL
+C7D3 D565 # HANGUL SYLLABLE HIEUH-A-RIEULTHIEUTH
+C7D4 D568 # HANGUL SYLLABLE HIEUH-A-MIEUM
+C7D5 D569 # HANGUL SYLLABLE HIEUH-A-PIEUP
+C7D6 D56B # HANGUL SYLLABLE HIEUH-A-SIOS
+C7D7 D56D # HANGUL SYLLABLE HIEUH-A-IEUNG
+C7D8 D574 # HANGUL SYLLABLE HIEUH-AE
+C7D9 D575 # HANGUL SYLLABLE HIEUH-AE-KIYEOK
+C7DA D578 # HANGUL SYLLABLE HIEUH-AE-NIEUN
+C7DB D57C # HANGUL SYLLABLE HIEUH-AE-RIEUL
+C7DC D584 # HANGUL SYLLABLE HIEUH-AE-MIEUM
+C7DD D585 # HANGUL SYLLABLE HIEUH-AE-PIEUP
+C7DE D587 # HANGUL SYLLABLE HIEUH-AE-SIOS
+C7DF D588 # HANGUL SYLLABLE HIEUH-AE-SSANGSIOS
+C7E0 D589 # HANGUL SYLLABLE HIEUH-AE-IEUNG
+C7E1 D590 # HANGUL SYLLABLE HIEUH-YA
+C7E2 D5A5 # HANGUL SYLLABLE HIEUH-YA-IEUNG
+C7E3 D5C8 # HANGUL SYLLABLE HIEUH-EO
+C7E4 D5C9 # HANGUL SYLLABLE HIEUH-EO-KIYEOK
+C7E5 D5CC # HANGUL SYLLABLE HIEUH-EO-NIEUN
+C7E6 D5D0 # HANGUL SYLLABLE HIEUH-EO-RIEUL
+C7E7 D5D2 # HANGUL SYLLABLE HIEUH-EO-RIEULMIEUM
+C7E8 D5D8 # HANGUL SYLLABLE HIEUH-EO-MIEUM
+C7E9 D5D9 # HANGUL SYLLABLE HIEUH-EO-PIEUP
+C7EA D5DB # HANGUL SYLLABLE HIEUH-EO-SIOS
+C7EB D5DD # HANGUL SYLLABLE HIEUH-EO-IEUNG
+C7EC D5E4 # HANGUL SYLLABLE HIEUH-E
+C7ED D5E5 # HANGUL SYLLABLE HIEUH-E-KIYEOK
+C7EE D5E8 # HANGUL SYLLABLE HIEUH-E-NIEUN
+C7EF D5EC # HANGUL SYLLABLE HIEUH-E-RIEUL
+C7F0 D5F4 # HANGUL SYLLABLE HIEUH-E-MIEUM
+C7F1 D5F5 # HANGUL SYLLABLE HIEUH-E-PIEUP
+C7F2 D5F7 # HANGUL SYLLABLE HIEUH-E-SIOS
+C7F3 D5F9 # HANGUL SYLLABLE HIEUH-E-IEUNG
+C7F4 D600 # HANGUL SYLLABLE HIEUH-YEO
+C7F5 D601 # HANGUL SYLLABLE HIEUH-YEO-KIYEOK
+C7F6 D604 # HANGUL SYLLABLE HIEUH-YEO-NIEUN
+C7F7 D608 # HANGUL SYLLABLE HIEUH-YEO-RIEUL
+C7F8 D610 # HANGUL SYLLABLE HIEUH-YEO-MIEUM
+C7F9 D611 # HANGUL SYLLABLE HIEUH-YEO-PIEUP
+C7FA D613 # HANGUL SYLLABLE HIEUH-YEO-SIOS
+C7FB D614 # HANGUL SYLLABLE HIEUH-YEO-SSANGSIOS
+C7FC D615 # HANGUL SYLLABLE HIEUH-YEO-IEUNG
+C7FD D61C # HANGUL SYLLABLE HIEUH-YE
+C7FE D620 # HANGUL SYLLABLE HIEUH-YE-NIEUN
+C8A1 D624 # HANGUL SYLLABLE HIEUH-YE-RIEUL
+C8A2 D62D # HANGUL SYLLABLE HIEUH-YE-PIEUP
+C8A3 D638 # HANGUL SYLLABLE HIEUH-O
+C8A4 D639 # HANGUL SYLLABLE HIEUH-O-KIYEOK
+C8A5 D63C # HANGUL SYLLABLE HIEUH-O-NIEUN
+C8A6 D640 # HANGUL SYLLABLE HIEUH-O-RIEUL
+C8A7 D645 # HANGUL SYLLABLE HIEUH-O-RIEULTHIEUTH
+C8A8 D648 # HANGUL SYLLABLE HIEUH-O-MIEUM
+C8A9 D649 # HANGUL SYLLABLE HIEUH-O-PIEUP
+C8AA D64B # HANGUL SYLLABLE HIEUH-O-SIOS
+C8AB D64D # HANGUL SYLLABLE HIEUH-O-IEUNG
+C8AC D651 # HANGUL SYLLABLE HIEUH-O-THIEUTH
+C8AD D654 # HANGUL SYLLABLE HIEUH-WA
+C8AE D655 # HANGUL SYLLABLE HIEUH-WA-KIYEOK
+C8AF D658 # HANGUL SYLLABLE HIEUH-WA-NIEUN
+C8B0 D65C # HANGUL SYLLABLE HIEUH-WA-RIEUL
+C8B1 D667 # HANGUL SYLLABLE HIEUH-WA-SIOS
+C8B2 D669 # HANGUL SYLLABLE HIEUH-WA-IEUNG
+C8B3 D670 # HANGUL SYLLABLE HIEUH-WAE
+C8B4 D671 # HANGUL SYLLABLE HIEUH-WAE-KIYEOK
+C8B5 D674 # HANGUL SYLLABLE HIEUH-WAE-NIEUN
+C8B6 D683 # HANGUL SYLLABLE HIEUH-WAE-SIOS
+C8B7 D685 # HANGUL SYLLABLE HIEUH-WAE-IEUNG
+C8B8 D68C # HANGUL SYLLABLE HIEUH-OE
+C8B9 D68D # HANGUL SYLLABLE HIEUH-OE-KIYEOK
+C8BA D690 # HANGUL SYLLABLE HIEUH-OE-NIEUN
+C8BB D694 # HANGUL SYLLABLE HIEUH-OE-RIEUL
+C8BC D69D # HANGUL SYLLABLE HIEUH-OE-PIEUP
+C8BD D69F # HANGUL SYLLABLE HIEUH-OE-SIOS
+C8BE D6A1 # HANGUL SYLLABLE HIEUH-OE-IEUNG
+C8BF D6A8 # HANGUL SYLLABLE HIEUH-YO
+C8C0 D6AC # HANGUL SYLLABLE HIEUH-YO-NIEUN
+C8C1 D6B0 # HANGUL SYLLABLE HIEUH-YO-RIEUL
+C8C2 D6B9 # HANGUL SYLLABLE HIEUH-YO-PIEUP
+C8C3 D6BB # HANGUL SYLLABLE HIEUH-YO-SIOS
+C8C4 D6C4 # HANGUL SYLLABLE HIEUH-U
+C8C5 D6C5 # HANGUL SYLLABLE HIEUH-U-KIYEOK
+C8C6 D6C8 # HANGUL SYLLABLE HIEUH-U-NIEUN
+C8C7 D6CC # HANGUL SYLLABLE HIEUH-U-RIEUL
+C8C8 D6D1 # HANGUL SYLLABLE HIEUH-U-RIEULTHIEUTH
+C8C9 D6D4 # HANGUL SYLLABLE HIEUH-U-MIEUM
+C8CA D6D7 # HANGUL SYLLABLE HIEUH-U-SIOS
+C8CB D6D9 # HANGUL SYLLABLE HIEUH-U-IEUNG
+C8CC D6E0 # HANGUL SYLLABLE HIEUH-WEO
+C8CD D6E4 # HANGUL SYLLABLE HIEUH-WEO-NIEUN
+C8CE D6E8 # HANGUL SYLLABLE HIEUH-WEO-RIEUL
+C8CF D6F0 # HANGUL SYLLABLE HIEUH-WEO-MIEUM
+C8D0 D6F5 # HANGUL SYLLABLE HIEUH-WEO-IEUNG
+C8D1 D6FC # HANGUL SYLLABLE HIEUH-WE
+C8D2 D6FD # HANGUL SYLLABLE HIEUH-WE-KIYEOK
+C8D3 D700 # HANGUL SYLLABLE HIEUH-WE-NIEUN
+C8D4 D704 # HANGUL SYLLABLE HIEUH-WE-RIEUL
+C8D5 D711 # HANGUL SYLLABLE HIEUH-WE-IEUNG
+C8D6 D718 # HANGUL SYLLABLE HIEUH-WI
+C8D7 D719 # HANGUL SYLLABLE HIEUH-WI-KIYEOK
+C8D8 D71C # HANGUL SYLLABLE HIEUH-WI-NIEUN
+C8D9 D720 # HANGUL SYLLABLE HIEUH-WI-RIEUL
+C8DA D728 # HANGUL SYLLABLE HIEUH-WI-MIEUM
+C8DB D729 # HANGUL SYLLABLE HIEUH-WI-PIEUP
+C8DC D72B # HANGUL SYLLABLE HIEUH-WI-SIOS
+C8DD D72D # HANGUL SYLLABLE HIEUH-WI-IEUNG
+C8DE D734 # HANGUL SYLLABLE HIEUH-YU
+C8DF D735 # HANGUL SYLLABLE HIEUH-YU-KIYEOK
+C8E0 D738 # HANGUL SYLLABLE HIEUH-YU-NIEUN
+C8E1 D73C # HANGUL SYLLABLE HIEUH-YU-RIEUL
+C8E2 D744 # HANGUL SYLLABLE HIEUH-YU-MIEUM
+C8E3 D747 # HANGUL SYLLABLE HIEUH-YU-SIOS
+C8E4 D749 # HANGUL SYLLABLE HIEUH-YU-IEUNG
+C8E5 D750 # HANGUL SYLLABLE HIEUH-EU
+C8E6 D751 # HANGUL SYLLABLE HIEUH-EU-KIYEOK
+C8E7 D754 # HANGUL SYLLABLE HIEUH-EU-NIEUN
+C8E8 D756 # HANGUL SYLLABLE HIEUH-EU-NIEUNHIEUH
+C8E9 D757 # HANGUL SYLLABLE HIEUH-EU-TIKEUT
+C8EA D758 # HANGUL SYLLABLE HIEUH-EU-RIEUL
+C8EB D759 # HANGUL SYLLABLE HIEUH-EU-RIEULKIYEOK
+C8EC D760 # HANGUL SYLLABLE HIEUH-EU-MIEUM
+C8ED D761 # HANGUL SYLLABLE HIEUH-EU-PIEUP
+C8EE D763 # HANGUL SYLLABLE HIEUH-EU-SIOS
+C8EF D765 # HANGUL SYLLABLE HIEUH-EU-IEUNG
+C8F0 D769 # HANGUL SYLLABLE HIEUH-EU-THIEUTH
+C8F1 D76C # HANGUL SYLLABLE HIEUH-YI
+C8F2 D770 # HANGUL SYLLABLE HIEUH-YI-NIEUN
+C8F3 D774 # HANGUL SYLLABLE HIEUH-YI-RIEUL
+C8F4 D77C # HANGUL SYLLABLE HIEUH-YI-MIEUM
+C8F5 D77D # HANGUL SYLLABLE HIEUH-YI-PIEUP
+C8F6 D781 # HANGUL SYLLABLE HIEUH-YI-IEUNG
+C8F7 D788 # HANGUL SYLLABLE HIEUH-I
+C8F8 D789 # HANGUL SYLLABLE HIEUH-I-KIYEOK
+C8F9 D78C # HANGUL SYLLABLE HIEUH-I-NIEUN
+C8FA D790 # HANGUL SYLLABLE HIEUH-I-RIEUL
+C8FB D798 # HANGUL SYLLABLE HIEUH-I-MIEUM
+C8FC D799 # HANGUL SYLLABLE HIEUH-I-PIEUP
+C8FD D79B # HANGUL SYLLABLE HIEUH-I-SIOS
+C8FE D79D # HANGUL SYLLABLE HIEUH-I-IEUNG
+CAA1 4F3D # <CJK>
+CAA2 4F73 # <CJK>
+CAA3 5047 # <CJK>
+CAA4 50F9 # <CJK>
+CAA5 52A0 # <CJK>
+CAA6 53EF # <CJK>
+CAA7 5475 # <CJK>
+CAA8 54E5 # <CJK>
+CAA9 5609 # <CJK>
+CAAA 5AC1 # <CJK>
+CAAB 5BB6 # <CJK>
+CAAC 6687 # <CJK>
+CAAD 67B6 # <CJK>
+CAAE 67B7 # <CJK>
+CAAF 67EF # <CJK>
+CAB0 6B4C # <CJK>
+CAB1 73C2 # <CJK>
+CAB2 75C2 # <CJK>
+CAB3 7A3C # <CJK>
+CAB4 82DB # <CJK>
+CAB5 8304 # <CJK>
+CAB6 8857 # <CJK>
+CAB7 8888 # <CJK>
+CAB8 8A36 # <CJK>
+CAB9 8CC8 # <CJK>
+CABA 8DCF # <CJK>
+CABB 8EFB # <CJK>
+CABC 8FE6 # <CJK>
+CABD 99D5 # <CJK>
+CABE 523B # <CJK>
+CABF 5374 # <CJK>
+CAC0 5404 # <CJK>
+CAC1 606A # <CJK>
+CAC2 6164 # <CJK>
+CAC3 6BBC # <CJK>
+CAC4 73CF # <CJK>
+CAC5 811A # <CJK>
+CAC6 89BA # <CJK>
+CAC7 89D2 # <CJK>
+CAC8 95A3 # <CJK>
+CAC9 4F83 # <CJK>
+CACA 520A # <CJK>
+CACB 58BE # <CJK>
+CACC 5978 # <CJK>
+CACD 59E6 # <CJK>
+CACE 5E72 # <CJK>
+CACF 5E79 # <CJK>
+CAD0 61C7 # <CJK>
+CAD1 63C0 # <CJK>
+CAD2 6746 # <CJK>
+CAD3 67EC # <CJK>
+CAD4 687F # <CJK>
+CAD5 6F97 # <CJK>
+CAD6 764E # <CJK>
+CAD7 770B # <CJK>
+CAD8 78F5 # <CJK>
+CAD9 7A08 # <CJK>
+CADA 7AFF # <CJK>
+CADB 7C21 # <CJK>
+CADC 809D # <CJK>
+CADD 826E # <CJK>
+CADE 8271 # <CJK>
+CADF 8AEB # <CJK>
+CAE0 9593 # <CJK>
+CAE1 4E6B # <CJK>
+CAE2 559D # <CJK>
+CAE3 66F7 # <CJK>
+CAE4 6E34 # <CJK>
+CAE5 78A3 # <CJK>
+CAE6 7AED # <CJK>
+CAE7 845B # <CJK>
+CAE8 8910 # <CJK>
+CAE9 874E # <CJK>
+CAEA 97A8 # <CJK>
+CAEB 52D8 # <CJK>
+CAEC 574E # <CJK>
+CAED 582A # <CJK>
+CAEE 5D4C # <CJK>
+CAEF 611F # <CJK>
+CAF0 61BE # <CJK>
+CAF1 6221 # <CJK>
+CAF2 6562 # <CJK>
+CAF3 67D1 # <CJK>
+CAF4 6A44 # <CJK>
+CAF5 6E1B # <CJK>
+CAF6 7518 # <CJK>
+CAF7 75B3 # <CJK>
+CAF8 76E3 # <CJK>
+CAF9 77B0 # <CJK>
+CAFA 7D3A # <CJK>
+CAFB 90AF # <CJK>
+CAFC 9451 # <CJK>
+CAFD 9452 # <CJK>
+CAFE 9F95 # <CJK>
+CBA1 5323 # <CJK>
+CBA2 5CAC # <CJK>
+CBA3 7532 # <CJK>
+CBA4 80DB # <CJK>
+CBA5 9240 # <CJK>
+CBA6 9598 # <CJK>
+CBA7 525B # <CJK>
+CBA8 5808 # <CJK>
+CBA9 59DC # <CJK>
+CBAA 5CA1 # <CJK>
+CBAB 5D17 # <CJK>
+CBAC 5EB7 # <CJK>
+CBAD 5F3A # <CJK>
+CBAE 5F4A # <CJK>
+CBAF 6177 # <CJK>
+CBB0 6C5F # <CJK>
+CBB1 757A # <CJK>
+CBB2 7586 # <CJK>
+CBB3 7CE0 # <CJK>
+CBB4 7D73 # <CJK>
+CBB5 7DB1 # <CJK>
+CBB6 7F8C # <CJK>
+CBB7 8154 # <CJK>
+CBB8 8221 # <CJK>
+CBB9 8591 # <CJK>
+CBBA 8941 # <CJK>
+CBBB 8B1B # <CJK>
+CBBC 92FC # <CJK>
+CBBD 964D # <CJK>
+CBBE 9C47 # <CJK>
+CBBF 4ECB # <CJK>
+CBC0 4EF7 # <CJK>
+CBC1 500B # <CJK>
+CBC2 51F1 # <CJK>
+CBC3 584F # <CJK>
+CBC4 6137 # <CJK>
+CBC5 613E # <CJK>
+CBC6 6168 # <CJK>
+CBC7 6539 # <CJK>
+CBC8 69EA # <CJK>
+CBC9 6F11 # <CJK>
+CBCA 75A5 # <CJK>
+CBCB 7686 # <CJK>
+CBCC 76D6 # <CJK>
+CBCD 7B87 # <CJK>
+CBCE 82A5 # <CJK>
+CBCF 84CB # <CJK>
+CBD0 F900 # <CJK>
+CBD1 93A7 # <CJK>
+CBD2 958B # <CJK>
+CBD3 5580 # <CJK>
+CBD4 5BA2 # <CJK>
+CBD5 5751 # <CJK>
+CBD6 F901 # <CJK>
+CBD7 7CB3 # <CJK>
+CBD8 7FB9 # <CJK>
+CBD9 91B5 # <CJK>
+CBDA 5028 # <CJK>
+CBDB 53BB # <CJK>
+CBDC 5C45 # <CJK>
+CBDD 5DE8 # <CJK>
+CBDE 62D2 # <CJK>
+CBDF 636E # <CJK>
+CBE0 64DA # <CJK>
+CBE1 64E7 # <CJK>
+CBE2 6E20 # <CJK>
+CBE3 70AC # <CJK>
+CBE4 795B # <CJK>
+CBE5 8DDD # <CJK>
+CBE6 8E1E # <CJK>
+CBE7 F902 # <CJK>
+CBE8 907D # <CJK>
+CBE9 9245 # <CJK>
+CBEA 92F8 # <CJK>
+CBEB 4E7E # <CJK>
+CBEC 4EF6 # <CJK>
+CBED 5065 # <CJK>
+CBEE 5DFE # <CJK>
+CBEF 5EFA # <CJK>
+CBF0 6106 # <CJK>
+CBF1 6957 # <CJK>
+CBF2 8171 # <CJK>
+CBF3 8654 # <CJK>
+CBF4 8E47 # <CJK>
+CBF5 9375 # <CJK>
+CBF6 9A2B # <CJK>
+CBF7 4E5E # <CJK>
+CBF8 5091 # <CJK>
+CBF9 6770 # <CJK>
+CBFA 6840 # <CJK>
+CBFB 5109 # <CJK>
+CBFC 528D # <CJK>
+CBFD 5292 # <CJK>
+CBFE 6AA2 # <CJK>
+CCA1 77BC # <CJK>
+CCA2 9210 # <CJK>
+CCA3 9ED4 # <CJK>
+CCA4 52AB # <CJK>
+CCA5 602F # <CJK>
+CCA6 8FF2 # <CJK>
+CCA7 5048 # <CJK>
+CCA8 61A9 # <CJK>
+CCA9 63ED # <CJK>
+CCAA 64CA # <CJK>
+CCAB 683C # <CJK>
+CCAC 6A84 # <CJK>
+CCAD 6FC0 # <CJK>
+CCAE 8188 # <CJK>
+CCAF 89A1 # <CJK>
+CCB0 9694 # <CJK>
+CCB1 5805 # <CJK>
+CCB2 727D # <CJK>
+CCB3 72AC # <CJK>
+CCB4 7504 # <CJK>
+CCB5 7D79 # <CJK>
+CCB6 7E6D # <CJK>
+CCB7 80A9 # <CJK>
+CCB8 898B # <CJK>
+CCB9 8B74 # <CJK>
+CCBA 9063 # <CJK>
+CCBB 9D51 # <CJK>
+CCBC 6289 # <CJK>
+CCBD 6C7A # <CJK>
+CCBE 6F54 # <CJK>
+CCBF 7D50 # <CJK>
+CCC0 7F3A # <CJK>
+CCC1 8A23 # <CJK>
+CCC2 517C # <CJK>
+CCC3 614A # <CJK>
+CCC4 7B9D # <CJK>
+CCC5 8B19 # <CJK>
+CCC6 9257 # <CJK>
+CCC7 938C # <CJK>
+CCC8 4EAC # <CJK>
+CCC9 4FD3 # <CJK>
+CCCA 501E # <CJK>
+CCCB 50BE # <CJK>
+CCCC 5106 # <CJK>
+CCCD 52C1 # <CJK>
+CCCE 52CD # <CJK>
+CCCF 537F # <CJK>
+CCD0 5770 # <CJK>
+CCD1 5883 # <CJK>
+CCD2 5E9A # <CJK>
+CCD3 5F91 # <CJK>
+CCD4 6176 # <CJK>
+CCD5 61AC # <CJK>
+CCD6 64CE # <CJK>
+CCD7 656C # <CJK>
+CCD8 666F # <CJK>
+CCD9 66BB # <CJK>
+CCDA 66F4 # <CJK>
+CCDB 6897 # <CJK>
+CCDC 6D87 # <CJK>
+CCDD 7085 # <CJK>
+CCDE 70F1 # <CJK>
+CCDF 749F # <CJK>
+CCE0 74A5 # <CJK>
+CCE1 74CA # <CJK>
+CCE2 75D9 # <CJK>
+CCE3 786C # <CJK>
+CCE4 78EC # <CJK>
+CCE5 7ADF # <CJK>
+CCE6 7AF6 # <CJK>
+CCE7 7D45 # <CJK>
+CCE8 7D93 # <CJK>
+CCE9 8015 # <CJK>
+CCEA 803F # <CJK>
+CCEB 811B # <CJK>
+CCEC 8396 # <CJK>
+CCED 8B66 # <CJK>
+CCEE 8F15 # <CJK>
+CCEF 9015 # <CJK>
+CCF0 93E1 # <CJK>
+CCF1 9803 # <CJK>
+CCF2 9838 # <CJK>
+CCF3 9A5A # <CJK>
+CCF4 9BE8 # <CJK>
+CCF5 4FC2 # <CJK>
+CCF6 5553 # <CJK>
+CCF7 583A # <CJK>
+CCF8 5951 # <CJK>
+CCF9 5B63 # <CJK>
+CCFA 5C46 # <CJK>
+CCFB 60B8 # <CJK>
+CCFC 6212 # <CJK>
+CCFD 6842 # <CJK>
+CCFE 68B0 # <CJK>
+CDA1 68E8 # <CJK>
+CDA2 6EAA # <CJK>
+CDA3 754C # <CJK>
+CDA4 7678 # <CJK>
+CDA5 78CE # <CJK>
+CDA6 7A3D # <CJK>
+CDA7 7CFB # <CJK>
+CDA8 7E6B # <CJK>
+CDA9 7E7C # <CJK>
+CDAA 8A08 # <CJK>
+CDAB 8AA1 # <CJK>
+CDAC 8C3F # <CJK>
+CDAD 968E # <CJK>
+CDAE 9DC4 # <CJK>
+CDAF 53E4 # <CJK>
+CDB0 53E9 # <CJK>
+CDB1 544A # <CJK>
+CDB2 5471 # <CJK>
+CDB3 56FA # <CJK>
+CDB4 59D1 # <CJK>
+CDB5 5B64 # <CJK>
+CDB6 5C3B # <CJK>
+CDB7 5EAB # <CJK>
+CDB8 62F7 # <CJK>
+CDB9 6537 # <CJK>
+CDBA 6545 # <CJK>
+CDBB 6572 # <CJK>
+CDBC 66A0 # <CJK>
+CDBD 67AF # <CJK>
+CDBE 69C1 # <CJK>
+CDBF 6CBD # <CJK>
+CDC0 75FC # <CJK>
+CDC1 7690 # <CJK>
+CDC2 777E # <CJK>
+CDC3 7A3F # <CJK>
+CDC4 7F94 # <CJK>
+CDC5 8003 # <CJK>
+CDC6 80A1 # <CJK>
+CDC7 818F # <CJK>
+CDC8 82E6 # <CJK>
+CDC9 82FD # <CJK>
+CDCA 83F0 # <CJK>
+CDCB 85C1 # <CJK>
+CDCC 8831 # <CJK>
+CDCD 88B4 # <CJK>
+CDCE 8AA5 # <CJK>
+CDCF F903 # <CJK>
+CDD0 8F9C # <CJK>
+CDD1 932E # <CJK>
+CDD2 96C7 # <CJK>
+CDD3 9867 # <CJK>
+CDD4 9AD8 # <CJK>
+CDD5 9F13 # <CJK>
+CDD6 54ED # <CJK>
+CDD7 659B # <CJK>
+CDD8 66F2 # <CJK>
+CDD9 688F # <CJK>
+CDDA 7A40 # <CJK>
+CDDB 8C37 # <CJK>
+CDDC 9D60 # <CJK>
+CDDD 56F0 # <CJK>
+CDDE 5764 # <CJK>
+CDDF 5D11 # <CJK>
+CDE0 6606 # <CJK>
+CDE1 68B1 # <CJK>
+CDE2 68CD # <CJK>
+CDE3 6EFE # <CJK>
+CDE4 7428 # <CJK>
+CDE5 889E # <CJK>
+CDE6 9BE4 # <CJK>
+CDE7 6C68 # <CJK>
+CDE8 F904 # <CJK>
+CDE9 9AA8 # <CJK>
+CDEA 4F9B # <CJK>
+CDEB 516C # <CJK>
+CDEC 5171 # <CJK>
+CDED 529F # <CJK>
+CDEE 5B54 # <CJK>
+CDEF 5DE5 # <CJK>
+CDF0 6050 # <CJK>
+CDF1 606D # <CJK>
+CDF2 62F1 # <CJK>
+CDF3 63A7 # <CJK>
+CDF4 653B # <CJK>
+CDF5 73D9 # <CJK>
+CDF6 7A7A # <CJK>
+CDF7 86A3 # <CJK>
+CDF8 8CA2 # <CJK>
+CDF9 978F # <CJK>
+CDFA 4E32 # <CJK>
+CDFB 5BE1 # <CJK>
+CDFC 6208 # <CJK>
+CDFD 679C # <CJK>
+CDFE 74DC # <CJK>
+CEA1 79D1 # <CJK>
+CEA2 83D3 # <CJK>
+CEA3 8A87 # <CJK>
+CEA4 8AB2 # <CJK>
+CEA5 8DE8 # <CJK>
+CEA6 904E # <CJK>
+CEA7 934B # <CJK>
+CEA8 9846 # <CJK>
+CEA9 5ED3 # <CJK>
+CEAA 69E8 # <CJK>
+CEAB 85FF # <CJK>
+CEAC 90ED # <CJK>
+CEAD F905 # <CJK>
+CEAE 51A0 # <CJK>
+CEAF 5B98 # <CJK>
+CEB0 5BEC # <CJK>
+CEB1 6163 # <CJK>
+CEB2 68FA # <CJK>
+CEB3 6B3E # <CJK>
+CEB4 704C # <CJK>
+CEB5 742F # <CJK>
+CEB6 74D8 # <CJK>
+CEB7 7BA1 # <CJK>
+CEB8 7F50 # <CJK>
+CEB9 83C5 # <CJK>
+CEBA 89C0 # <CJK>
+CEBB 8CAB # <CJK>
+CEBC 95DC # <CJK>
+CEBD 9928 # <CJK>
+CEBE 522E # <CJK>
+CEBF 605D # <CJK>
+CEC0 62EC # <CJK>
+CEC1 9002 # <CJK>
+CEC2 4F8A # <CJK>
+CEC3 5149 # <CJK>
+CEC4 5321 # <CJK>
+CEC5 58D9 # <CJK>
+CEC6 5EE3 # <CJK>
+CEC7 66E0 # <CJK>
+CEC8 6D38 # <CJK>
+CEC9 709A # <CJK>
+CECA 72C2 # <CJK>
+CECB 73D6 # <CJK>
+CECC 7B50 # <CJK>
+CECD 80F1 # <CJK>
+CECE 945B # <CJK>
+CECF 5366 # <CJK>
+CED0 639B # <CJK>
+CED1 7F6B # <CJK>
+CED2 4E56 # <CJK>
+CED3 5080 # <CJK>
+CED4 584A # <CJK>
+CED5 58DE # <CJK>
+CED6 602A # <CJK>
+CED7 6127 # <CJK>
+CED8 62D0 # <CJK>
+CED9 69D0 # <CJK>
+CEDA 9B41 # <CJK>
+CEDB 5B8F # <CJK>
+CEDC 7D18 # <CJK>
+CEDD 80B1 # <CJK>
+CEDE 8F5F # <CJK>
+CEDF 4EA4 # <CJK>
+CEE0 50D1 # <CJK>
+CEE1 54AC # <CJK>
+CEE2 55AC # <CJK>
+CEE3 5B0C # <CJK>
+CEE4 5DA0 # <CJK>
+CEE5 5DE7 # <CJK>
+CEE6 652A # <CJK>
+CEE7 654E # <CJK>
+CEE8 6821 # <CJK>
+CEE9 6A4B # <CJK>
+CEEA 72E1 # <CJK>
+CEEB 768E # <CJK>
+CEEC 77EF # <CJK>
+CEED 7D5E # <CJK>
+CEEE 7FF9 # <CJK>
+CEEF 81A0 # <CJK>
+CEF0 854E # <CJK>
+CEF1 86DF # <CJK>
+CEF2 8F03 # <CJK>
+CEF3 8F4E # <CJK>
+CEF4 90CA # <CJK>
+CEF5 9903 # <CJK>
+CEF6 9A55 # <CJK>
+CEF7 9BAB # <CJK>
+CEF8 4E18 # <CJK>
+CEF9 4E45 # <CJK>
+CEFA 4E5D # <CJK>
+CEFB 4EC7 # <CJK>
+CEFC 4FF1 # <CJK>
+CEFD 5177 # <CJK>
+CEFE 52FE # <CJK>
+CFA1 5340 # <CJK>
+CFA2 53E3 # <CJK>
+CFA3 53E5 # <CJK>
+CFA4 548E # <CJK>
+CFA5 5614 # <CJK>
+CFA6 5775 # <CJK>
+CFA7 57A2 # <CJK>
+CFA8 5BC7 # <CJK>
+CFA9 5D87 # <CJK>
+CFAA 5ED0 # <CJK>
+CFAB 61FC # <CJK>
+CFAC 62D8 # <CJK>
+CFAD 6551 # <CJK>
+CFAE 67B8 # <CJK>
+CFAF 67E9 # <CJK>
+CFB0 69CB # <CJK>
+CFB1 6B50 # <CJK>
+CFB2 6BC6 # <CJK>
+CFB3 6BEC # <CJK>
+CFB4 6C42 # <CJK>
+CFB5 6E9D # <CJK>
+CFB6 7078 # <CJK>
+CFB7 72D7 # <CJK>
+CFB8 7396 # <CJK>
+CFB9 7403 # <CJK>
+CFBA 77BF # <CJK>
+CFBB 77E9 # <CJK>
+CFBC 7A76 # <CJK>
+CFBD 7D7F # <CJK>
+CFBE 8009 # <CJK>
+CFBF 81FC # <CJK>
+CFC0 8205 # <CJK>
+CFC1 820A # <CJK>
+CFC2 82DF # <CJK>
+CFC3 8862 # <CJK>
+CFC4 8B33 # <CJK>
+CFC5 8CFC # <CJK>
+CFC6 8EC0 # <CJK>
+CFC7 9011 # <CJK>
+CFC8 90B1 # <CJK>
+CFC9 9264 # <CJK>
+CFCA 92B6 # <CJK>
+CFCB 99D2 # <CJK>
+CFCC 9A45 # <CJK>
+CFCD 9CE9 # <CJK>
+CFCE 9DD7 # <CJK>
+CFCF 9F9C # <CJK>
+CFD0 570B # <CJK>
+CFD1 5C40 # <CJK>
+CFD2 83CA # <CJK>
+CFD3 97A0 # <CJK>
+CFD4 97AB # <CJK>
+CFD5 9EB4 # <CJK>
+CFD6 541B # <CJK>
+CFD7 7A98 # <CJK>
+CFD8 7FA4 # <CJK>
+CFD9 88D9 # <CJK>
+CFDA 8ECD # <CJK>
+CFDB 90E1 # <CJK>
+CFDC 5800 # <CJK>
+CFDD 5C48 # <CJK>
+CFDE 6398 # <CJK>
+CFDF 7A9F # <CJK>
+CFE0 5BAE # <CJK>
+CFE1 5F13 # <CJK>
+CFE2 7A79 # <CJK>
+CFE3 7AAE # <CJK>
+CFE4 828E # <CJK>
+CFE5 8EAC # <CJK>
+CFE6 5026 # <CJK>
+CFE7 5238 # <CJK>
+CFE8 52F8 # <CJK>
+CFE9 5377 # <CJK>
+CFEA 5708 # <CJK>
+CFEB 62F3 # <CJK>
+CFEC 6372 # <CJK>
+CFED 6B0A # <CJK>
+CFEE 6DC3 # <CJK>
+CFEF 7737 # <CJK>
+CFF0 53A5 # <CJK>
+CFF1 7357 # <CJK>
+CFF2 8568 # <CJK>
+CFF3 8E76 # <CJK>
+CFF4 95D5 # <CJK>
+CFF5 673A # <CJK>
+CFF6 6AC3 # <CJK>
+CFF7 6F70 # <CJK>
+CFF8 8A6D # <CJK>
+CFF9 8ECC # <CJK>
+CFFA 994B # <CJK>
+CFFB F906 # <CJK>
+CFFC 6677 # <CJK>
+CFFD 6B78 # <CJK>
+CFFE 8CB4 # <CJK>
+D0A1 9B3C # <CJK>
+D0A2 F907 # <CJK>
+D0A3 53EB # <CJK>
+D0A4 572D # <CJK>
+D0A5 594E # <CJK>
+D0A6 63C6 # <CJK>
+D0A7 69FB # <CJK>
+D0A8 73EA # <CJK>
+D0A9 7845 # <CJK>
+D0AA 7ABA # <CJK>
+D0AB 7AC5 # <CJK>
+D0AC 7CFE # <CJK>
+D0AD 8475 # <CJK>
+D0AE 898F # <CJK>
+D0AF 8D73 # <CJK>
+D0B0 9035 # <CJK>
+D0B1 95A8 # <CJK>
+D0B2 52FB # <CJK>
+D0B3 5747 # <CJK>
+D0B4 7547 # <CJK>
+D0B5 7B60 # <CJK>
+D0B6 83CC # <CJK>
+D0B7 921E # <CJK>
+D0B8 F908 # <CJK>
+D0B9 6A58 # <CJK>
+D0BA 514B # <CJK>
+D0BB 524B # <CJK>
+D0BC 5287 # <CJK>
+D0BD 621F # <CJK>
+D0BE 68D8 # <CJK>
+D0BF 6975 # <CJK>
+D0C0 9699 # <CJK>
+D0C1 50C5 # <CJK>
+D0C2 52A4 # <CJK>
+D0C3 52E4 # <CJK>
+D0C4 61C3 # <CJK>
+D0C5 65A4 # <CJK>
+D0C6 6839 # <CJK>
+D0C7 69FF # <CJK>
+D0C8 747E # <CJK>
+D0C9 7B4B # <CJK>
+D0CA 82B9 # <CJK>
+D0CB 83EB # <CJK>
+D0CC 89B2 # <CJK>
+D0CD 8B39 # <CJK>
+D0CE 8FD1 # <CJK>
+D0CF 9949 # <CJK>
+D0D0 F909 # <CJK>
+D0D1 4ECA # <CJK>
+D0D2 5997 # <CJK>
+D0D3 64D2 # <CJK>
+D0D4 6611 # <CJK>
+D0D5 6A8E # <CJK>
+D0D6 7434 # <CJK>
+D0D7 7981 # <CJK>
+D0D8 79BD # <CJK>
+D0D9 82A9 # <CJK>
+D0DA 887E # <CJK>
+D0DB 887F # <CJK>
+D0DC 895F # <CJK>
+D0DD F90A # <CJK>
+D0DE 9326 # <CJK>
+D0DF 4F0B # <CJK>
+D0E0 53CA # <CJK>
+D0E1 6025 # <CJK>
+D0E2 6271 # <CJK>
+D0E3 6C72 # <CJK>
+D0E4 7D1A # <CJK>
+D0E5 7D66 # <CJK>
+D0E6 4E98 # <CJK>
+D0E7 5162 # <CJK>
+D0E8 77DC # <CJK>
+D0E9 80AF # <CJK>
+D0EA 4F01 # <CJK>
+D0EB 4F0E # <CJK>
+D0EC 5176 # <CJK>
+D0ED 5180 # <CJK>
+D0EE 55DC # <CJK>
+D0EF 5668 # <CJK>
+D0F0 573B # <CJK>
+D0F1 57FA # <CJK>
+D0F2 57FC # <CJK>
+D0F3 5914 # <CJK>
+D0F4 5947 # <CJK>
+D0F5 5993 # <CJK>
+D0F6 5BC4 # <CJK>
+D0F7 5C90 # <CJK>
+D0F8 5D0E # <CJK>
+D0F9 5DF1 # <CJK>
+D0FA 5E7E # <CJK>
+D0FB 5FCC # <CJK>
+D0FC 6280 # <CJK>
+D0FD 65D7 # <CJK>
+D0FE 65E3 # <CJK>
+D1A1 671E # <CJK>
+D1A2 671F # <CJK>
+D1A3 675E # <CJK>
+D1A4 68CB # <CJK>
+D1A5 68C4 # <CJK>
+D1A6 6A5F # <CJK>
+D1A7 6B3A # <CJK>
+D1A8 6C23 # <CJK>
+D1A9 6C7D # <CJK>
+D1AA 6C82 # <CJK>
+D1AB 6DC7 # <CJK>
+D1AC 7398 # <CJK>
+D1AD 7426 # <CJK>
+D1AE 742A # <CJK>
+D1AF 7482 # <CJK>
+D1B0 74A3 # <CJK>
+D1B1 7578 # <CJK>
+D1B2 757F # <CJK>
+D1B3 7881 # <CJK>
+D1B4 78EF # <CJK>
+D1B5 7941 # <CJK>
+D1B6 7947 # <CJK>
+D1B7 7948 # <CJK>
+D1B8 797A # <CJK>
+D1B9 7B95 # <CJK>
+D1BA 7D00 # <CJK>
+D1BB 7DBA # <CJK>
+D1BC 7F88 # <CJK>
+D1BD 8006 # <CJK>
+D1BE 802D # <CJK>
+D1BF 808C # <CJK>
+D1C0 8A18 # <CJK>
+D1C1 8B4F # <CJK>
+D1C2 8C48 # <CJK>
+D1C3 8D77 # <CJK>
+D1C4 9321 # <CJK>
+D1C5 9324 # <CJK>
+D1C6 98E2 # <CJK>
+D1C7 9951 # <CJK>
+D1C8 9A0E # <CJK>
+D1C9 9A0F # <CJK>
+D1CA 9A65 # <CJK>
+D1CB 9E92 # <CJK>
+D1CC 7DCA # <CJK>
+D1CD 4F76 # <CJK>
+D1CE 5409 # <CJK>
+D1CF 62EE # <CJK>
+D1D0 6854 # <CJK>
+D1D1 91D1 # <CJK>
+D1D2 55AB # <CJK>
+D1D3 513A # <CJK>
+D1D4 F90B # <CJK>
+D1D5 F90C # <CJK>
+D1D6 5A1C # <CJK>
+D1D7 61E6 # <CJK>
+D1D8 F90D # <CJK>
+D1D9 62CF # <CJK>
+D1DA 62FF # <CJK>
+D1DB F90E # <CJK>
+D1DC F90F # <CJK>
+D1DD F910 # <CJK>
+D1DE F911 # <CJK>
+D1DF F912 # <CJK>
+D1E0 F913 # <CJK>
+D1E1 90A3 # <CJK>
+D1E2 F914 # <CJK>
+D1E3 F915 # <CJK>
+D1E4 F916 # <CJK>
+D1E5 F917 # <CJK>
+D1E6 F918 # <CJK>
+D1E7 8AFE # <CJK>
+D1E8 F919 # <CJK>
+D1E9 F91A # <CJK>
+D1EA F91B # <CJK>
+D1EB F91C # <CJK>
+D1EC 6696 # <CJK>
+D1ED F91D # <CJK>
+D1EE 7156 # <CJK>
+D1EF F91E # <CJK>
+D1F0 F91F # <CJK>
+D1F1 96E3 # <CJK>
+D1F2 F920 # <CJK>
+D1F3 634F # <CJK>
+D1F4 637A # <CJK>
+D1F5 5357 # <CJK>
+D1F6 F921 # <CJK>
+D1F7 678F # <CJK>
+D1F8 6960 # <CJK>
+D1F9 6E73 # <CJK>
+D1FA F922 # <CJK>
+D1FB 7537 # <CJK>
+D1FC F923 # <CJK>
+D1FD F924 # <CJK>
+D1FE F925 # <CJK>
+D2A1 7D0D # <CJK>
+D2A2 F926 # <CJK>
+D2A3 F927 # <CJK>
+D2A4 8872 # <CJK>
+D2A5 56CA # <CJK>
+D2A6 5A18 # <CJK>
+D2A7 F928 # <CJK>
+D2A8 F929 # <CJK>
+D2A9 F92A # <CJK>
+D2AA F92B # <CJK>
+D2AB F92C # <CJK>
+D2AC 4E43 # <CJK>
+D2AD F92D # <CJK>
+D2AE 5167 # <CJK>
+D2AF 5948 # <CJK>
+D2B0 67F0 # <CJK>
+D2B1 8010 # <CJK>
+D2B2 F92E # <CJK>
+D2B3 5973 # <CJK>
+D2B4 5E74 # <CJK>
+D2B5 649A # <CJK>
+D2B6 79CA # <CJK>
+D2B7 5FF5 # <CJK>
+D2B8 606C # <CJK>
+D2B9 62C8 # <CJK>
+D2BA 637B # <CJK>
+D2BB 5BE7 # <CJK>
+D2BC 5BD7 # <CJK>
+D2BD 52AA # <CJK>
+D2BE F92F # <CJK>
+D2BF 5974 # <CJK>
+D2C0 5F29 # <CJK>
+D2C1 6012 # <CJK>
+D2C2 F930 # <CJK>
+D2C3 F931 # <CJK>
+D2C4 F932 # <CJK>
+D2C5 7459 # <CJK>
+D2C6 F933 # <CJK>
+D2C7 F934 # <CJK>
+D2C8 F935 # <CJK>
+D2C9 F936 # <CJK>
+D2CA F937 # <CJK>
+D2CB F938 # <CJK>
+D2CC 99D1 # <CJK>
+D2CD F939 # <CJK>
+D2CE F93A # <CJK>
+D2CF F93B # <CJK>
+D2D0 F93C # <CJK>
+D2D1 F93D # <CJK>
+D2D2 F93E # <CJK>
+D2D3 F93F # <CJK>
+D2D4 F940 # <CJK>
+D2D5 F941 # <CJK>
+D2D6 F942 # <CJK>
+D2D7 F943 # <CJK>
+D2D8 6FC3 # <CJK>
+D2D9 F944 # <CJK>
+D2DA F945 # <CJK>
+D2DB 81BF # <CJK>
+D2DC 8FB2 # <CJK>
+D2DD 60F1 # <CJK>
+D2DE F946 # <CJK>
+D2DF F947 # <CJK>
+D2E0 8166 # <CJK>
+D2E1 F948 # <CJK>
+D2E2 F949 # <CJK>
+D2E3 5C3F # <CJK>
+D2E4 F94A # <CJK>
+D2E5 F94B # <CJK>
+D2E6 F94C # <CJK>
+D2E7 F94D # <CJK>
+D2E8 F94E # <CJK>
+D2E9 F94F # <CJK>
+D2EA F950 # <CJK>
+D2EB F951 # <CJK>
+D2EC 5AE9 # <CJK>
+D2ED 8A25 # <CJK>
+D2EE 677B # <CJK>
+D2EF 7D10 # <CJK>
+D2F0 F952 # <CJK>
+D2F1 F953 # <CJK>
+D2F2 F954 # <CJK>
+D2F3 F955 # <CJK>
+D2F4 F956 # <CJK>
+D2F5 F957 # <CJK>
+D2F6 80FD # <CJK>
+D2F7 F958 # <CJK>
+D2F8 F959 # <CJK>
+D2F9 5C3C # <CJK>
+D2FA 6CE5 # <CJK>
+D2FB 533F # <CJK>
+D2FC 6EBA # <CJK>
+D2FD 591A # <CJK>
+D2FE 8336 # <CJK>
+D3A1 4E39 # <CJK>
+D3A2 4EB6 # <CJK>
+D3A3 4F46 # <CJK>
+D3A4 55AE # <CJK>
+D3A5 5718 # <CJK>
+D3A6 58C7 # <CJK>
+D3A7 5F56 # <CJK>
+D3A8 65B7 # <CJK>
+D3A9 65E6 # <CJK>
+D3AA 6A80 # <CJK>
+D3AB 6BB5 # <CJK>
+D3AC 6E4D # <CJK>
+D3AD 77ED # <CJK>
+D3AE 7AEF # <CJK>
+D3AF 7C1E # <CJK>
+D3B0 7DDE # <CJK>
+D3B1 86CB # <CJK>
+D3B2 8892 # <CJK>
+D3B3 9132 # <CJK>
+D3B4 935B # <CJK>
+D3B5 64BB # <CJK>
+D3B6 6FBE # <CJK>
+D3B7 737A # <CJK>
+D3B8 75B8 # <CJK>
+D3B9 9054 # <CJK>
+D3BA 5556 # <CJK>
+D3BB 574D # <CJK>
+D3BC 61BA # <CJK>
+D3BD 64D4 # <CJK>
+D3BE 66C7 # <CJK>
+D3BF 6DE1 # <CJK>
+D3C0 6E5B # <CJK>
+D3C1 6F6D # <CJK>
+D3C2 6FB9 # <CJK>
+D3C3 75F0 # <CJK>
+D3C4 8043 # <CJK>
+D3C5 81BD # <CJK>
+D3C6 8541 # <CJK>
+D3C7 8983 # <CJK>
+D3C8 8AC7 # <CJK>
+D3C9 8B5A # <CJK>
+D3CA 931F # <CJK>
+D3CB 6C93 # <CJK>
+D3CC 7553 # <CJK>
+D3CD 7B54 # <CJK>
+D3CE 8E0F # <CJK>
+D3CF 905D # <CJK>
+D3D0 5510 # <CJK>
+D3D1 5802 # <CJK>
+D3D2 5858 # <CJK>
+D3D3 5E62 # <CJK>
+D3D4 6207 # <CJK>
+D3D5 649E # <CJK>
+D3D6 68E0 # <CJK>
+D3D7 7576 # <CJK>
+D3D8 7CD6 # <CJK>
+D3D9 87B3 # <CJK>
+D3DA 9EE8 # <CJK>
+D3DB 4EE3 # <CJK>
+D3DC 5788 # <CJK>
+D3DD 576E # <CJK>
+D3DE 5927 # <CJK>
+D3DF 5C0D # <CJK>
+D3E0 5CB1 # <CJK>
+D3E1 5E36 # <CJK>
+D3E2 5F85 # <CJK>
+D3E3 6234 # <CJK>
+D3E4 64E1 # <CJK>
+D3E5 73B3 # <CJK>
+D3E6 81FA # <CJK>
+D3E7 888B # <CJK>
+D3E8 8CB8 # <CJK>
+D3E9 968A # <CJK>
+D3EA 9EDB # <CJK>
+D3EB 5B85 # <CJK>
+D3EC 5FB7 # <CJK>
+D3ED 60B3 # <CJK>
+D3EE 5012 # <CJK>
+D3EF 5200 # <CJK>
+D3F0 5230 # <CJK>
+D3F1 5716 # <CJK>
+D3F2 5835 # <CJK>
+D3F3 5857 # <CJK>
+D3F4 5C0E # <CJK>
+D3F5 5C60 # <CJK>
+D3F6 5CF6 # <CJK>
+D3F7 5D8B # <CJK>
+D3F8 5EA6 # <CJK>
+D3F9 5F92 # <CJK>
+D3FA 60BC # <CJK>
+D3FB 6311 # <CJK>
+D3FC 6389 # <CJK>
+D3FD 6417 # <CJK>
+D3FE 6843 # <CJK>
+D4A1 68F9 # <CJK>
+D4A2 6AC2 # <CJK>
+D4A3 6DD8 # <CJK>
+D4A4 6E21 # <CJK>
+D4A5 6ED4 # <CJK>
+D4A6 6FE4 # <CJK>
+D4A7 71FE # <CJK>
+D4A8 76DC # <CJK>
+D4A9 7779 # <CJK>
+D4AA 79B1 # <CJK>
+D4AB 7A3B # <CJK>
+D4AC 8404 # <CJK>
+D4AD 89A9 # <CJK>
+D4AE 8CED # <CJK>
+D4AF 8DF3 # <CJK>
+D4B0 8E48 # <CJK>
+D4B1 9003 # <CJK>
+D4B2 9014 # <CJK>
+D4B3 9053 # <CJK>
+D4B4 90FD # <CJK>
+D4B5 934D # <CJK>
+D4B6 9676 # <CJK>
+D4B7 97DC # <CJK>
+D4B8 6BD2 # <CJK>
+D4B9 7006 # <CJK>
+D4BA 7258 # <CJK>
+D4BB 72A2 # <CJK>
+D4BC 7368 # <CJK>
+D4BD 7763 # <CJK>
+D4BE 79BF # <CJK>
+D4BF 7BE4 # <CJK>
+D4C0 7E9B # <CJK>
+D4C1 8B80 # <CJK>
+D4C2 58A9 # <CJK>
+D4C3 60C7 # <CJK>
+D4C4 6566 # <CJK>
+D4C5 65FD # <CJK>
+D4C6 66BE # <CJK>
+D4C7 6C8C # <CJK>
+D4C8 711E # <CJK>
+D4C9 71C9 # <CJK>
+D4CA 8C5A # <CJK>
+D4CB 9813 # <CJK>
+D4CC 4E6D # <CJK>
+D4CD 7A81 # <CJK>
+D4CE 4EDD # <CJK>
+D4CF 51AC # <CJK>
+D4D0 51CD # <CJK>
+D4D1 52D5 # <CJK>
+D4D2 540C # <CJK>
+D4D3 61A7 # <CJK>
+D4D4 6771 # <CJK>
+D4D5 6850 # <CJK>
+D4D6 68DF # <CJK>
+D4D7 6D1E # <CJK>
+D4D8 6F7C # <CJK>
+D4D9 75BC # <CJK>
+D4DA 77B3 # <CJK>
+D4DB 7AE5 # <CJK>
+D4DC 80F4 # <CJK>
+D4DD 8463 # <CJK>
+D4DE 9285 # <CJK>
+D4DF 515C # <CJK>
+D4E0 6597 # <CJK>
+D4E1 675C # <CJK>
+D4E2 6793 # <CJK>
+D4E3 75D8 # <CJK>
+D4E4 7AC7 # <CJK>
+D4E5 8373 # <CJK>
+D4E6 F95A # <CJK>
+D4E7 8C46 # <CJK>
+D4E8 9017 # <CJK>
+D4E9 982D # <CJK>
+D4EA 5C6F # <CJK>
+D4EB 81C0 # <CJK>
+D4EC 829A # <CJK>
+D4ED 9041 # <CJK>
+D4EE 906F # <CJK>
+D4EF 920D # <CJK>
+D4F0 5F97 # <CJK>
+D4F1 5D9D # <CJK>
+D4F2 6A59 # <CJK>
+D4F3 71C8 # <CJK>
+D4F4 767B # <CJK>
+D4F5 7B49 # <CJK>
+D4F6 85E4 # <CJK>
+D4F7 8B04 # <CJK>
+D4F8 9127 # <CJK>
+D4F9 9A30 # <CJK>
+D4FA 5587 # <CJK>
+D4FB 61F6 # <CJK>
+D4FC F95B # <CJK>
+D4FD 7669 # <CJK>
+D4FE 7F85 # <CJK>
+D5A1 863F # <CJK>
+D5A2 87BA # <CJK>
+D5A3 88F8 # <CJK>
+D5A4 908F # <CJK>
+D5A5 F95C # <CJK>
+D5A6 6D1B # <CJK>
+D5A7 70D9 # <CJK>
+D5A8 73DE # <CJK>
+D5A9 7D61 # <CJK>
+D5AA 843D # <CJK>
+D5AB F95D # <CJK>
+D5AC 916A # <CJK>
+D5AD 99F1 # <CJK>
+D5AE F95E # <CJK>
+D5AF 4E82 # <CJK>
+D5B0 5375 # <CJK>
+D5B1 6B04 # <CJK>
+D5B2 6B12 # <CJK>
+D5B3 703E # <CJK>
+D5B4 721B # <CJK>
+D5B5 862D # <CJK>
+D5B6 9E1E # <CJK>
+D5B7 524C # <CJK>
+D5B8 8FA3 # <CJK>
+D5B9 5D50 # <CJK>
+D5BA 64E5 # <CJK>
+D5BB 652C # <CJK>
+D5BC 6B16 # <CJK>
+D5BD 6FEB # <CJK>
+D5BE 7C43 # <CJK>
+D5BF 7E9C # <CJK>
+D5C0 85CD # <CJK>
+D5C1 8964 # <CJK>
+D5C2 89BD # <CJK>
+D5C3 62C9 # <CJK>
+D5C4 81D8 # <CJK>
+D5C5 881F # <CJK>
+D5C6 5ECA # <CJK>
+D5C7 6717 # <CJK>
+D5C8 6D6A # <CJK>
+D5C9 72FC # <CJK>
+D5CA 7405 # <CJK>
+D5CB 746F # <CJK>
+D5CC 8782 # <CJK>
+D5CD 90DE # <CJK>
+D5CE 4F86 # <CJK>
+D5CF 5D0D # <CJK>
+D5D0 5FA0 # <CJK>
+D5D1 840A # <CJK>
+D5D2 51B7 # <CJK>
+D5D3 63A0 # <CJK>
+D5D4 7565 # <CJK>
+D5D5 4EAE # <CJK>
+D5D6 5006 # <CJK>
+D5D7 5169 # <CJK>
+D5D8 51C9 # <CJK>
+D5D9 6881 # <CJK>
+D5DA 6A11 # <CJK>
+D5DB 7CAE # <CJK>
+D5DC 7CB1 # <CJK>
+D5DD 7CE7 # <CJK>
+D5DE 826F # <CJK>
+D5DF 8AD2 # <CJK>
+D5E0 8F1B # <CJK>
+D5E1 91CF # <CJK>
+D5E2 4FB6 # <CJK>
+D5E3 5137 # <CJK>
+D5E4 52F5 # <CJK>
+D5E5 5442 # <CJK>
+D5E6 5EEC # <CJK>
+D5E7 616E # <CJK>
+D5E8 623E # <CJK>
+D5E9 65C5 # <CJK>
+D5EA 6ADA # <CJK>
+D5EB 6FFE # <CJK>
+D5EC 792A # <CJK>
+D5ED 85DC # <CJK>
+D5EE 8823 # <CJK>
+D5EF 95AD # <CJK>
+D5F0 9A62 # <CJK>
+D5F1 9A6A # <CJK>
+D5F2 9E97 # <CJK>
+D5F3 9ECE # <CJK>
+D5F4 529B # <CJK>
+D5F5 66C6 # <CJK>
+D5F6 6B77 # <CJK>
+D5F7 701D # <CJK>
+D5F8 792B # <CJK>
+D5F9 8F62 # <CJK>
+D5FA 9742 # <CJK>
+D5FB 6190 # <CJK>
+D5FC 6200 # <CJK>
+D5FD 6523 # <CJK>
+D5FE 6F23 # <CJK>
+D6A1 7149 # <CJK>
+D6A2 7489 # <CJK>
+D6A3 7DF4 # <CJK>
+D6A4 806F # <CJK>
+D6A5 84EE # <CJK>
+D6A6 8F26 # <CJK>
+D6A7 9023 # <CJK>
+D6A8 934A # <CJK>
+D6A9 51BD # <CJK>
+D6AA 5217 # <CJK>
+D6AB 52A3 # <CJK>
+D6AC 6D0C # <CJK>
+D6AD 70C8 # <CJK>
+D6AE 88C2 # <CJK>
+D6AF 5EC9 # <CJK>
+D6B0 6582 # <CJK>
+D6B1 6BAE # <CJK>
+D6B2 6FC2 # <CJK>
+D6B3 7C3E # <CJK>
+D6B4 7375 # <CJK>
+D6B5 4EE4 # <CJK>
+D6B6 4F36 # <CJK>
+D6B7 56F9 # <CJK>
+D6B8 F95F # <CJK>
+D6B9 5CBA # <CJK>
+D6BA 5DBA # <CJK>
+D6BB 601C # <CJK>
+D6BC 73B2 # <CJK>
+D6BD 7B2D # <CJK>
+D6BE 7F9A # <CJK>
+D6BF 7FCE # <CJK>
+D6C0 8046 # <CJK>
+D6C1 901E # <CJK>
+D6C2 9234 # <CJK>
+D6C3 96F6 # <CJK>
+D6C4 9748 # <CJK>
+D6C5 9818 # <CJK>
+D6C6 9F61 # <CJK>
+D6C7 4F8B # <CJK>
+D6C8 6FA7 # <CJK>
+D6C9 79AE # <CJK>
+D6CA 91B4 # <CJK>
+D6CB 96B7 # <CJK>
+D6CC 52DE # <CJK>
+D6CD F960 # <CJK>
+D6CE 6488 # <CJK>
+D6CF 64C4 # <CJK>
+D6D0 6AD3 # <CJK>
+D6D1 6F5E # <CJK>
+D6D2 7018 # <CJK>
+D6D3 7210 # <CJK>
+D6D4 76E7 # <CJK>
+D6D5 8001 # <CJK>
+D6D6 8606 # <CJK>
+D6D7 865C # <CJK>
+D6D8 8DEF # <CJK>
+D6D9 8F05 # <CJK>
+D6DA 9732 # <CJK>
+D6DB 9B6F # <CJK>
+D6DC 9DFA # <CJK>
+D6DD 9E75 # <CJK>
+D6DE 788C # <CJK>
+D6DF 797F # <CJK>
+D6E0 7DA0 # <CJK>
+D6E1 83C9 # <CJK>
+D6E2 9304 # <CJK>
+D6E3 9E7F # <CJK>
+D6E4 9E93 # <CJK>
+D6E5 8AD6 # <CJK>
+D6E6 58DF # <CJK>
+D6E7 5F04 # <CJK>
+D6E8 6727 # <CJK>
+D6E9 7027 # <CJK>
+D6EA 74CF # <CJK>
+D6EB 7C60 # <CJK>
+D6EC 807E # <CJK>
+D6ED 5121 # <CJK>
+D6EE 7028 # <CJK>
+D6EF 7262 # <CJK>
+D6F0 78CA # <CJK>
+D6F1 8CC2 # <CJK>
+D6F2 8CDA # <CJK>
+D6F3 8CF4 # <CJK>
+D6F4 96F7 # <CJK>
+D6F5 4E86 # <CJK>
+D6F6 50DA # <CJK>
+D6F7 5BEE # <CJK>
+D6F8 5ED6 # <CJK>
+D6F9 6599 # <CJK>
+D6FA 71CE # <CJK>
+D6FB 7642 # <CJK>
+D6FC 77AD # <CJK>
+D6FD 804A # <CJK>
+D6FE 84FC # <CJK>
+D7A1 907C # <CJK>
+D7A2 9B27 # <CJK>
+D7A3 9F8D # <CJK>
+D7A4 58D8 # <CJK>
+D7A5 5A41 # <CJK>
+D7A6 5C62 # <CJK>
+D7A7 6A13 # <CJK>
+D7A8 6DDA # <CJK>
+D7A9 6F0F # <CJK>
+D7AA 763B # <CJK>
+D7AB 7D2F # <CJK>
+D7AC 7E37 # <CJK>
+D7AD 851E # <CJK>
+D7AE 8938 # <CJK>
+D7AF 93E4 # <CJK>
+D7B0 964B # <CJK>
+D7B1 5289 # <CJK>
+D7B2 65D2 # <CJK>
+D7B3 67F3 # <CJK>
+D7B4 69B4 # <CJK>
+D7B5 6D41 # <CJK>
+D7B6 6E9C # <CJK>
+D7B7 700F # <CJK>
+D7B8 7409 # <CJK>
+D7B9 7460 # <CJK>
+D7BA 7559 # <CJK>
+D7BB 7624 # <CJK>
+D7BC 786B # <CJK>
+D7BD 8B2C # <CJK>
+D7BE 985E # <CJK>
+D7BF 516D # <CJK>
+D7C0 622E # <CJK>
+D7C1 9678 # <CJK>
+D7C2 4F96 # <CJK>
+D7C3 502B # <CJK>
+D7C4 5D19 # <CJK>
+D7C5 6DEA # <CJK>
+D7C6 7DB8 # <CJK>
+D7C7 8F2A # <CJK>
+D7C8 5F8B # <CJK>
+D7C9 6144 # <CJK>
+D7CA 6817 # <CJK>
+D7CB F961 # <CJK>
+D7CC 9686 # <CJK>
+D7CD 52D2 # <CJK>
+D7CE 808B # <CJK>
+D7CF 51DC # <CJK>
+D7D0 51CC # <CJK>
+D7D1 695E # <CJK>
+D7D2 7A1C # <CJK>
+D7D3 7DBE # <CJK>
+D7D4 83F1 # <CJK>
+D7D5 9675 # <CJK>
+D7D6 4FDA # <CJK>
+D7D7 5229 # <CJK>
+D7D8 5398 # <CJK>
+D7D9 540F # <CJK>
+D7DA 550E # <CJK>
+D7DB 5C65 # <CJK>
+D7DC 60A7 # <CJK>
+D7DD 674E # <CJK>
+D7DE 68A8 # <CJK>
+D7DF 6D6C # <CJK>
+D7E0 7281 # <CJK>
+D7E1 72F8 # <CJK>
+D7E2 7406 # <CJK>
+D7E3 7483 # <CJK>
+D7E4 F962 # <CJK>
+D7E5 75E2 # <CJK>
+D7E6 7C6C # <CJK>
+D7E7 7F79 # <CJK>
+D7E8 7FB8 # <CJK>
+D7E9 8389 # <CJK>
+D7EA 88CF # <CJK>
+D7EB 88E1 # <CJK>
+D7EC 91CC # <CJK>
+D7ED 91D0 # <CJK>
+D7EE 96E2 # <CJK>
+D7EF 9BC9 # <CJK>
+D7F0 541D # <CJK>
+D7F1 6F7E # <CJK>
+D7F2 71D0 # <CJK>
+D7F3 7498 # <CJK>
+D7F4 85FA # <CJK>
+D7F5 8EAA # <CJK>
+D7F6 96A3 # <CJK>
+D7F7 9C57 # <CJK>
+D7F8 9E9F # <CJK>
+D7F9 6797 # <CJK>
+D7FA 6DCB # <CJK>
+D7FB 7433 # <CJK>
+D7FC 81E8 # <CJK>
+D7FD 9716 # <CJK>
+D7FE 782C # <CJK>
+D8A1 7ACB # <CJK>
+D8A2 7B20 # <CJK>
+D8A3 7C92 # <CJK>
+D8A4 6469 # <CJK>
+D8A5 746A # <CJK>
+D8A6 75F2 # <CJK>
+D8A7 78BC # <CJK>
+D8A8 78E8 # <CJK>
+D8A9 99AC # <CJK>
+D8AA 9B54 # <CJK>
+D8AB 9EBB # <CJK>
+D8AC 5BDE # <CJK>
+D8AD 5E55 # <CJK>
+D8AE 6F20 # <CJK>
+D8AF 819C # <CJK>
+D8B0 83AB # <CJK>
+D8B1 9088 # <CJK>
+D8B2 4E07 # <CJK>
+D8B3 534D # <CJK>
+D8B4 5A29 # <CJK>
+D8B5 5DD2 # <CJK>
+D8B6 5F4E # <CJK>
+D8B7 6162 # <CJK>
+D8B8 633D # <CJK>
+D8B9 6669 # <CJK>
+D8BA 66FC # <CJK>
+D8BB 6EFF # <CJK>
+D8BC 6F2B # <CJK>
+D8BD 7063 # <CJK>
+D8BE 779E # <CJK>
+D8BF 842C # <CJK>
+D8C0 8513 # <CJK>
+D8C1 883B # <CJK>
+D8C2 8F13 # <CJK>
+D8C3 9945 # <CJK>
+D8C4 9C3B # <CJK>
+D8C5 551C # <CJK>
+D8C6 62B9 # <CJK>
+D8C7 672B # <CJK>
+D8C8 6CAB # <CJK>
+D8C9 8309 # <CJK>
+D8CA 896A # <CJK>
+D8CB 977A # <CJK>
+D8CC 4EA1 # <CJK>
+D8CD 5984 # <CJK>
+D8CE 5FD8 # <CJK>
+D8CF 5FD9 # <CJK>
+D8D0 671B # <CJK>
+D8D1 7DB2 # <CJK>
+D8D2 7F54 # <CJK>
+D8D3 8292 # <CJK>
+D8D4 832B # <CJK>
+D8D5 83BD # <CJK>
+D8D6 8F1E # <CJK>
+D8D7 9099 # <CJK>
+D8D8 57CB # <CJK>
+D8D9 59B9 # <CJK>
+D8DA 5A92 # <CJK>
+D8DB 5BD0 # <CJK>
+D8DC 6627 # <CJK>
+D8DD 679A # <CJK>
+D8DE 6885 # <CJK>
+D8DF 6BCF # <CJK>
+D8E0 7164 # <CJK>
+D8E1 7F75 # <CJK>
+D8E2 8CB7 # <CJK>
+D8E3 8CE3 # <CJK>
+D8E4 9081 # <CJK>
+D8E5 9B45 # <CJK>
+D8E6 8108 # <CJK>
+D8E7 8C8A # <CJK>
+D8E8 964C # <CJK>
+D8E9 9A40 # <CJK>
+D8EA 9EA5 # <CJK>
+D8EB 5B5F # <CJK>
+D8EC 6C13 # <CJK>
+D8ED 731B # <CJK>
+D8EE 76F2 # <CJK>
+D8EF 76DF # <CJK>
+D8F0 840C # <CJK>
+D8F1 51AA # <CJK>
+D8F2 8993 # <CJK>
+D8F3 514D # <CJK>
+D8F4 5195 # <CJK>
+D8F5 52C9 # <CJK>
+D8F6 68C9 # <CJK>
+D8F7 6C94 # <CJK>
+D8F8 7704 # <CJK>
+D8F9 7720 # <CJK>
+D8FA 7DBF # <CJK>
+D8FB 7DEC # <CJK>
+D8FC 9762 # <CJK>
+D8FD 9EB5 # <CJK>
+D8FE 6EC5 # <CJK>
+D9A1 8511 # <CJK>
+D9A2 51A5 # <CJK>
+D9A3 540D # <CJK>
+D9A4 547D # <CJK>
+D9A5 660E # <CJK>
+D9A6 669D # <CJK>
+D9A7 6927 # <CJK>
+D9A8 6E9F # <CJK>
+D9A9 76BF # <CJK>
+D9AA 7791 # <CJK>
+D9AB 8317 # <CJK>
+D9AC 84C2 # <CJK>
+D9AD 879F # <CJK>
+D9AE 9169 # <CJK>
+D9AF 9298 # <CJK>
+D9B0 9CF4 # <CJK>
+D9B1 8882 # <CJK>
+D9B2 4FAE # <CJK>
+D9B3 5192 # <CJK>
+D9B4 52DF # <CJK>
+D9B5 59C6 # <CJK>
+D9B6 5E3D # <CJK>
+D9B7 6155 # <CJK>
+D9B8 6478 # <CJK>
+D9B9 6479 # <CJK>
+D9BA 66AE # <CJK>
+D9BB 67D0 # <CJK>
+D9BC 6A21 # <CJK>
+D9BD 6BCD # <CJK>
+D9BE 6BDB # <CJK>
+D9BF 725F # <CJK>
+D9C0 7261 # <CJK>
+D9C1 7441 # <CJK>
+D9C2 7738 # <CJK>
+D9C3 77DB # <CJK>
+D9C4 8017 # <CJK>
+D9C5 82BC # <CJK>
+D9C6 8305 # <CJK>
+D9C7 8B00 # <CJK>
+D9C8 8B28 # <CJK>
+D9C9 8C8C # <CJK>
+D9CA 6728 # <CJK>
+D9CB 6C90 # <CJK>
+D9CC 7267 # <CJK>
+D9CD 76EE # <CJK>
+D9CE 7766 # <CJK>
+D9CF 7A46 # <CJK>
+D9D0 9DA9 # <CJK>
+D9D1 6B7F # <CJK>
+D9D2 6C92 # <CJK>
+D9D3 5922 # <CJK>
+D9D4 6726 # <CJK>
+D9D5 8499 # <CJK>
+D9D6 536F # <CJK>
+D9D7 5893 # <CJK>
+D9D8 5999 # <CJK>
+D9D9 5EDF # <CJK>
+D9DA 63CF # <CJK>
+D9DB 6634 # <CJK>
+D9DC 6773 # <CJK>
+D9DD 6E3A # <CJK>
+D9DE 732B # <CJK>
+D9DF 7AD7 # <CJK>
+D9E0 82D7 # <CJK>
+D9E1 9328 # <CJK>
+D9E2 52D9 # <CJK>
+D9E3 5DEB # <CJK>
+D9E4 61AE # <CJK>
+D9E5 61CB # <CJK>
+D9E6 620A # <CJK>
+D9E7 62C7 # <CJK>
+D9E8 64AB # <CJK>
+D9E9 65E0 # <CJK>
+D9EA 6959 # <CJK>
+D9EB 6B66 # <CJK>
+D9EC 6BCB # <CJK>
+D9ED 7121 # <CJK>
+D9EE 73F7 # <CJK>
+D9EF 755D # <CJK>
+D9F0 7E46 # <CJK>
+D9F1 821E # <CJK>
+D9F2 8302 # <CJK>
+D9F3 856A # <CJK>
+D9F4 8AA3 # <CJK>
+D9F5 8CBF # <CJK>
+D9F6 9727 # <CJK>
+D9F7 9D61 # <CJK>
+D9F8 58A8 # <CJK>
+D9F9 9ED8 # <CJK>
+D9FA 5011 # <CJK>
+D9FB 520E # <CJK>
+D9FC 543B # <CJK>
+D9FD 554F # <CJK>
+D9FE 6587 # <CJK>
+DAA1 6C76 # <CJK>
+DAA2 7D0A # <CJK>
+DAA3 7D0B # <CJK>
+DAA4 805E # <CJK>
+DAA5 868A # <CJK>
+DAA6 9580 # <CJK>
+DAA7 96EF # <CJK>
+DAA8 52FF # <CJK>
+DAA9 6C95 # <CJK>
+DAAA 7269 # <CJK>
+DAAB 5473 # <CJK>
+DAAC 5A9A # <CJK>
+DAAD 5C3E # <CJK>
+DAAE 5D4B # <CJK>
+DAAF 5F4C # <CJK>
+DAB0 5FAE # <CJK>
+DAB1 672A # <CJK>
+DAB2 68B6 # <CJK>
+DAB3 6963 # <CJK>
+DAB4 6E3C # <CJK>
+DAB5 6E44 # <CJK>
+DAB6 7709 # <CJK>
+DAB7 7C73 # <CJK>
+DAB8 7F8E # <CJK>
+DAB9 8587 # <CJK>
+DABA 8B0E # <CJK>
+DABB 8FF7 # <CJK>
+DABC 9761 # <CJK>
+DABD 9EF4 # <CJK>
+DABE 5CB7 # <CJK>
+DABF 60B6 # <CJK>
+DAC0 610D # <CJK>
+DAC1 61AB # <CJK>
+DAC2 654F # <CJK>
+DAC3 65FB # <CJK>
+DAC4 65FC # <CJK>
+DAC5 6C11 # <CJK>
+DAC6 6CEF # <CJK>
+DAC7 739F # <CJK>
+DAC8 73C9 # <CJK>
+DAC9 7DE1 # <CJK>
+DACA 9594 # <CJK>
+DACB 5BC6 # <CJK>
+DACC 871C # <CJK>
+DACD 8B10 # <CJK>
+DACE 525D # <CJK>
+DACF 535A # <CJK>
+DAD0 62CD # <CJK>
+DAD1 640F # <CJK>
+DAD2 64B2 # <CJK>
+DAD3 6734 # <CJK>
+DAD4 6A38 # <CJK>
+DAD5 6CCA # <CJK>
+DAD6 73C0 # <CJK>
+DAD7 749E # <CJK>
+DAD8 7B94 # <CJK>
+DAD9 7C95 # <CJK>
+DADA 7E1B # <CJK>
+DADB 818A # <CJK>
+DADC 8236 # <CJK>
+DADD 8584 # <CJK>
+DADE 8FEB # <CJK>
+DADF 96F9 # <CJK>
+DAE0 99C1 # <CJK>
+DAE1 4F34 # <CJK>
+DAE2 534A # <CJK>
+DAE3 53CD # <CJK>
+DAE4 53DB # <CJK>
+DAE5 62CC # <CJK>
+DAE6 642C # <CJK>
+DAE7 6500 # <CJK>
+DAE8 6591 # <CJK>
+DAE9 69C3 # <CJK>
+DAEA 6CEE # <CJK>
+DAEB 6F58 # <CJK>
+DAEC 73ED # <CJK>
+DAED 7554 # <CJK>
+DAEE 7622 # <CJK>
+DAEF 76E4 # <CJK>
+DAF0 76FC # <CJK>
+DAF1 78D0 # <CJK>
+DAF2 78FB # <CJK>
+DAF3 792C # <CJK>
+DAF4 7D46 # <CJK>
+DAF5 822C # <CJK>
+DAF6 87E0 # <CJK>
+DAF7 8FD4 # <CJK>
+DAF8 9812 # <CJK>
+DAF9 98EF # <CJK>
+DAFA 52C3 # <CJK>
+DAFB 62D4 # <CJK>
+DAFC 64A5 # <CJK>
+DAFD 6E24 # <CJK>
+DAFE 6F51 # <CJK>
+DBA1 767C # <CJK>
+DBA2 8DCB # <CJK>
+DBA3 91B1 # <CJK>
+DBA4 9262 # <CJK>
+DBA5 9AEE # <CJK>
+DBA6 9B43 # <CJK>
+DBA7 5023 # <CJK>
+DBA8 508D # <CJK>
+DBA9 574A # <CJK>
+DBAA 59A8 # <CJK>
+DBAB 5C28 # <CJK>
+DBAC 5E47 # <CJK>
+DBAD 5F77 # <CJK>
+DBAE 623F # <CJK>
+DBAF 653E # <CJK>
+DBB0 65B9 # <CJK>
+DBB1 65C1 # <CJK>
+DBB2 6609 # <CJK>
+DBB3 678B # <CJK>
+DBB4 699C # <CJK>
+DBB5 6EC2 # <CJK>
+DBB6 78C5 # <CJK>
+DBB7 7D21 # <CJK>
+DBB8 80AA # <CJK>
+DBB9 8180 # <CJK>
+DBBA 822B # <CJK>
+DBBB 82B3 # <CJK>
+DBBC 84A1 # <CJK>
+DBBD 868C # <CJK>
+DBBE 8A2A # <CJK>
+DBBF 8B17 # <CJK>
+DBC0 90A6 # <CJK>
+DBC1 9632 # <CJK>
+DBC2 9F90 # <CJK>
+DBC3 500D # <CJK>
+DBC4 4FF3 # <CJK>
+DBC5 F963 # <CJK>
+DBC6 57F9 # <CJK>
+DBC7 5F98 # <CJK>
+DBC8 62DC # <CJK>
+DBC9 6392 # <CJK>
+DBCA 676F # <CJK>
+DBCB 6E43 # <CJK>
+DBCC 7119 # <CJK>
+DBCD 76C3 # <CJK>
+DBCE 80CC # <CJK>
+DBCF 80DA # <CJK>
+DBD0 88F4 # <CJK>
+DBD1 88F5 # <CJK>
+DBD2 8919 # <CJK>
+DBD3 8CE0 # <CJK>
+DBD4 8F29 # <CJK>
+DBD5 914D # <CJK>
+DBD6 966A # <CJK>
+DBD7 4F2F # <CJK>
+DBD8 4F70 # <CJK>
+DBD9 5E1B # <CJK>
+DBDA 67CF # <CJK>
+DBDB 6822 # <CJK>
+DBDC 767D # <CJK>
+DBDD 767E # <CJK>
+DBDE 9B44 # <CJK>
+DBDF 5E61 # <CJK>
+DBE0 6A0A # <CJK>
+DBE1 7169 # <CJK>
+DBE2 71D4 # <CJK>
+DBE3 756A # <CJK>
+DBE4 F964 # <CJK>
+DBE5 7E41 # <CJK>
+DBE6 8543 # <CJK>
+DBE7 85E9 # <CJK>
+DBE8 98DC # <CJK>
+DBE9 4F10 # <CJK>
+DBEA 7B4F # <CJK>
+DBEB 7F70 # <CJK>
+DBEC 95A5 # <CJK>
+DBED 51E1 # <CJK>
+DBEE 5E06 # <CJK>
+DBEF 68B5 # <CJK>
+DBF0 6C3E # <CJK>
+DBF1 6C4E # <CJK>
+DBF2 6CDB # <CJK>
+DBF3 72AF # <CJK>
+DBF4 7BC4 # <CJK>
+DBF5 8303 # <CJK>
+DBF6 6CD5 # <CJK>
+DBF7 743A # <CJK>
+DBF8 50FB # <CJK>
+DBF9 5288 # <CJK>
+DBFA 58C1 # <CJK>
+DBFB 64D8 # <CJK>
+DBFC 6A97 # <CJK>
+DBFD 74A7 # <CJK>
+DBFE 7656 # <CJK>
+DCA1 78A7 # <CJK>
+DCA2 8617 # <CJK>
+DCA3 95E2 # <CJK>
+DCA4 9739 # <CJK>
+DCA5 F965 # <CJK>
+DCA6 535E # <CJK>
+DCA7 5F01 # <CJK>
+DCA8 8B8A # <CJK>
+DCA9 8FA8 # <CJK>
+DCAA 8FAF # <CJK>
+DCAB 908A # <CJK>
+DCAC 5225 # <CJK>
+DCAD 77A5 # <CJK>
+DCAE 9C49 # <CJK>
+DCAF 9F08 # <CJK>
+DCB0 4E19 # <CJK>
+DCB1 5002 # <CJK>
+DCB2 5175 # <CJK>
+DCB3 5C5B # <CJK>
+DCB4 5E77 # <CJK>
+DCB5 661E # <CJK>
+DCB6 663A # <CJK>
+DCB7 67C4 # <CJK>
+DCB8 68C5 # <CJK>
+DCB9 70B3 # <CJK>
+DCBA 7501 # <CJK>
+DCBB 75C5 # <CJK>
+DCBC 79C9 # <CJK>
+DCBD 7ADD # <CJK>
+DCBE 8F27 # <CJK>
+DCBF 9920 # <CJK>
+DCC0 9A08 # <CJK>
+DCC1 4FDD # <CJK>
+DCC2 5821 # <CJK>
+DCC3 5831 # <CJK>
+DCC4 5BF6 # <CJK>
+DCC5 666E # <CJK>
+DCC6 6B65 # <CJK>
+DCC7 6D11 # <CJK>
+DCC8 6E7A # <CJK>
+DCC9 6F7D # <CJK>
+DCCA 73E4 # <CJK>
+DCCB 752B # <CJK>
+DCCC 83E9 # <CJK>
+DCCD 88DC # <CJK>
+DCCE 8913 # <CJK>
+DCCF 8B5C # <CJK>
+DCD0 8F14 # <CJK>
+DCD1 4F0F # <CJK>
+DCD2 50D5 # <CJK>
+DCD3 5310 # <CJK>
+DCD4 535C # <CJK>
+DCD5 5B93 # <CJK>
+DCD6 5FA9 # <CJK>
+DCD7 670D # <CJK>
+DCD8 798F # <CJK>
+DCD9 8179 # <CJK>
+DCDA 832F # <CJK>
+DCDB 8514 # <CJK>
+DCDC 8907 # <CJK>
+DCDD 8986 # <CJK>
+DCDE 8F39 # <CJK>
+DCDF 8F3B # <CJK>
+DCE0 99A5 # <CJK>
+DCE1 9C12 # <CJK>
+DCE2 672C # <CJK>
+DCE3 4E76 # <CJK>
+DCE4 4FF8 # <CJK>
+DCE5 5949 # <CJK>
+DCE6 5C01 # <CJK>
+DCE7 5CEF # <CJK>
+DCE8 5CF0 # <CJK>
+DCE9 6367 # <CJK>
+DCEA 68D2 # <CJK>
+DCEB 70FD # <CJK>
+DCEC 71A2 # <CJK>
+DCED 742B # <CJK>
+DCEE 7E2B # <CJK>
+DCEF 84EC # <CJK>
+DCF0 8702 # <CJK>
+DCF1 9022 # <CJK>
+DCF2 92D2 # <CJK>
+DCF3 9CF3 # <CJK>
+DCF4 4E0D # <CJK>
+DCF5 4ED8 # <CJK>
+DCF6 4FEF # <CJK>
+DCF7 5085 # <CJK>
+DCF8 5256 # <CJK>
+DCF9 526F # <CJK>
+DCFA 5426 # <CJK>
+DCFB 5490 # <CJK>
+DCFC 57E0 # <CJK>
+DCFD 592B # <CJK>
+DCFE 5A66 # <CJK>
+DDA1 5B5A # <CJK>
+DDA2 5B75 # <CJK>
+DDA3 5BCC # <CJK>
+DDA4 5E9C # <CJK>
+DDA5 F966 # <CJK>
+DDA6 6276 # <CJK>
+DDA7 6577 # <CJK>
+DDA8 65A7 # <CJK>
+DDA9 6D6E # <CJK>
+DDAA 6EA5 # <CJK>
+DDAB 7236 # <CJK>
+DDAC 7B26 # <CJK>
+DDAD 7C3F # <CJK>
+DDAE 7F36 # <CJK>
+DDAF 8150 # <CJK>
+DDB0 8151 # <CJK>
+DDB1 819A # <CJK>
+DDB2 8240 # <CJK>
+DDB3 8299 # <CJK>
+DDB4 83A9 # <CJK>
+DDB5 8A03 # <CJK>
+DDB6 8CA0 # <CJK>
+DDB7 8CE6 # <CJK>
+DDB8 8CFB # <CJK>
+DDB9 8D74 # <CJK>
+DDBA 8DBA # <CJK>
+DDBB 90E8 # <CJK>
+DDBC 91DC # <CJK>
+DDBD 961C # <CJK>
+DDBE 9644 # <CJK>
+DDBF 99D9 # <CJK>
+DDC0 9CE7 # <CJK>
+DDC1 5317 # <CJK>
+DDC2 5206 # <CJK>
+DDC3 5429 # <CJK>
+DDC4 5674 # <CJK>
+DDC5 58B3 # <CJK>
+DDC6 5954 # <CJK>
+DDC7 596E # <CJK>
+DDC8 5FFF # <CJK>
+DDC9 61A4 # <CJK>
+DDCA 626E # <CJK>
+DDCB 6610 # <CJK>
+DDCC 6C7E # <CJK>
+DDCD 711A # <CJK>
+DDCE 76C6 # <CJK>
+DDCF 7C89 # <CJK>
+DDD0 7CDE # <CJK>
+DDD1 7D1B # <CJK>
+DDD2 82AC # <CJK>
+DDD3 8CC1 # <CJK>
+DDD4 96F0 # <CJK>
+DDD5 F967 # <CJK>
+DDD6 4F5B # <CJK>
+DDD7 5F17 # <CJK>
+DDD8 5F7F # <CJK>
+DDD9 62C2 # <CJK>
+DDDA 5D29 # <CJK>
+DDDB 670B # <CJK>
+DDDC 68DA # <CJK>
+DDDD 787C # <CJK>
+DDDE 7E43 # <CJK>
+DDDF 9D6C # <CJK>
+DDE0 4E15 # <CJK>
+DDE1 5099 # <CJK>
+DDE2 5315 # <CJK>
+DDE3 532A # <CJK>
+DDE4 5351 # <CJK>
+DDE5 5983 # <CJK>
+DDE6 5A62 # <CJK>
+DDE7 5E87 # <CJK>
+DDE8 60B2 # <CJK>
+DDE9 618A # <CJK>
+DDEA 6249 # <CJK>
+DDEB 6279 # <CJK>
+DDEC 6590 # <CJK>
+DDED 6787 # <CJK>
+DDEE 69A7 # <CJK>
+DDEF 6BD4 # <CJK>
+DDF0 6BD6 # <CJK>
+DDF1 6BD7 # <CJK>
+DDF2 6BD8 # <CJK>
+DDF3 6CB8 # <CJK>
+DDF4 F968 # <CJK>
+DDF5 7435 # <CJK>
+DDF6 75FA # <CJK>
+DDF7 7812 # <CJK>
+DDF8 7891 # <CJK>
+DDF9 79D5 # <CJK>
+DDFA 79D8 # <CJK>
+DDFB 7C83 # <CJK>
+DDFC 7DCB # <CJK>
+DDFD 7FE1 # <CJK>
+DDFE 80A5 # <CJK>
+DEA1 813E # <CJK>
+DEA2 81C2 # <CJK>
+DEA3 83F2 # <CJK>
+DEA4 871A # <CJK>
+DEA5 88E8 # <CJK>
+DEA6 8AB9 # <CJK>
+DEA7 8B6C # <CJK>
+DEA8 8CBB # <CJK>
+DEA9 9119 # <CJK>
+DEAA 975E # <CJK>
+DEAB 98DB # <CJK>
+DEAC 9F3B # <CJK>
+DEAD 56AC # <CJK>
+DEAE 5B2A # <CJK>
+DEAF 5F6C # <CJK>
+DEB0 658C # <CJK>
+DEB1 6AB3 # <CJK>
+DEB2 6BAF # <CJK>
+DEB3 6D5C # <CJK>
+DEB4 6FF1 # <CJK>
+DEB5 7015 # <CJK>
+DEB6 725D # <CJK>
+DEB7 73AD # <CJK>
+DEB8 8CA7 # <CJK>
+DEB9 8CD3 # <CJK>
+DEBA 983B # <CJK>
+DEBB 6191 # <CJK>
+DEBC 6C37 # <CJK>
+DEBD 8058 # <CJK>
+DEBE 9A01 # <CJK>
+DEBF 4E4D # <CJK>
+DEC0 4E8B # <CJK>
+DEC1 4E9B # <CJK>
+DEC2 4ED5 # <CJK>
+DEC3 4F3A # <CJK>
+DEC4 4F3C # <CJK>
+DEC5 4F7F # <CJK>
+DEC6 4FDF # <CJK>
+DEC7 50FF # <CJK>
+DEC8 53F2 # <CJK>
+DEC9 53F8 # <CJK>
+DECA 5506 # <CJK>
+DECB 55E3 # <CJK>
+DECC 56DB # <CJK>
+DECD 58EB # <CJK>
+DECE 5962 # <CJK>
+DECF 5A11 # <CJK>
+DED0 5BEB # <CJK>
+DED1 5BFA # <CJK>
+DED2 5C04 # <CJK>
+DED3 5DF3 # <CJK>
+DED4 5E2B # <CJK>
+DED5 5F99 # <CJK>
+DED6 601D # <CJK>
+DED7 6368 # <CJK>
+DED8 659C # <CJK>
+DED9 65AF # <CJK>
+DEDA 67F6 # <CJK>
+DEDB 67FB # <CJK>
+DEDC 68AD # <CJK>
+DEDD 6B7B # <CJK>
+DEDE 6C99 # <CJK>
+DEDF 6CD7 # <CJK>
+DEE0 6E23 # <CJK>
+DEE1 7009 # <CJK>
+DEE2 7345 # <CJK>
+DEE3 7802 # <CJK>
+DEE4 793E # <CJK>
+DEE5 7940 # <CJK>
+DEE6 7960 # <CJK>
+DEE7 79C1 # <CJK>
+DEE8 7BE9 # <CJK>
+DEE9 7D17 # <CJK>
+DEEA 7D72 # <CJK>
+DEEB 8086 # <CJK>
+DEEC 820D # <CJK>
+DEED 838E # <CJK>
+DEEE 84D1 # <CJK>
+DEEF 86C7 # <CJK>
+DEF0 88DF # <CJK>
+DEF1 8A50 # <CJK>
+DEF2 8A5E # <CJK>
+DEF3 8B1D # <CJK>
+DEF4 8CDC # <CJK>
+DEF5 8D66 # <CJK>
+DEF6 8FAD # <CJK>
+DEF7 90AA # <CJK>
+DEF8 98FC # <CJK>
+DEF9 99DF # <CJK>
+DEFA 9E9D # <CJK>
+DEFB 524A # <CJK>
+DEFC F969 # <CJK>
+DEFD 6714 # <CJK>
+DEFE F96A # <CJK>
+DFA1 5098 # <CJK>
+DFA2 522A # <CJK>
+DFA3 5C71 # <CJK>
+DFA4 6563 # <CJK>
+DFA5 6C55 # <CJK>
+DFA6 73CA # <CJK>
+DFA7 7523 # <CJK>
+DFA8 759D # <CJK>
+DFA9 7B97 # <CJK>
+DFAA 849C # <CJK>
+DFAB 9178 # <CJK>
+DFAC 9730 # <CJK>
+DFAD 4E77 # <CJK>
+DFAE 6492 # <CJK>
+DFAF 6BBA # <CJK>
+DFB0 715E # <CJK>
+DFB1 85A9 # <CJK>
+DFB2 4E09 # <CJK>
+DFB3 F96B # <CJK>
+DFB4 6749 # <CJK>
+DFB5 68EE # <CJK>
+DFB6 6E17 # <CJK>
+DFB7 829F # <CJK>
+DFB8 8518 # <CJK>
+DFB9 886B # <CJK>
+DFBA 63F7 # <CJK>
+DFBB 6F81 # <CJK>
+DFBC 9212 # <CJK>
+DFBD 98AF # <CJK>
+DFBE 4E0A # <CJK>
+DFBF 50B7 # <CJK>
+DFC0 50CF # <CJK>
+DFC1 511F # <CJK>
+DFC2 5546 # <CJK>
+DFC3 55AA # <CJK>
+DFC4 5617 # <CJK>
+DFC5 5B40 # <CJK>
+DFC6 5C19 # <CJK>
+DFC7 5CE0 # <CJK>
+DFC8 5E38 # <CJK>
+DFC9 5E8A # <CJK>
+DFCA 5EA0 # <CJK>
+DFCB 5EC2 # <CJK>
+DFCC 60F3 # <CJK>
+DFCD 6851 # <CJK>
+DFCE 6A61 # <CJK>
+DFCF 6E58 # <CJK>
+DFD0 723D # <CJK>
+DFD1 7240 # <CJK>
+DFD2 72C0 # <CJK>
+DFD3 76F8 # <CJK>
+DFD4 7965 # <CJK>
+DFD5 7BB1 # <CJK>
+DFD6 7FD4 # <CJK>
+DFD7 88F3 # <CJK>
+DFD8 89F4 # <CJK>
+DFD9 8A73 # <CJK>
+DFDA 8C61 # <CJK>
+DFDB 8CDE # <CJK>
+DFDC 971C # <CJK>
+DFDD 585E # <CJK>
+DFDE 74BD # <CJK>
+DFDF 8CFD # <CJK>
+DFE0 55C7 # <CJK>
+DFE1 F96C # <CJK>
+DFE2 7A61 # <CJK>
+DFE3 7D22 # <CJK>
+DFE4 8272 # <CJK>
+DFE5 7272 # <CJK>
+DFE6 751F # <CJK>
+DFE7 7525 # <CJK>
+DFE8 F96D # <CJK>
+DFE9 7B19 # <CJK>
+DFEA 5885 # <CJK>
+DFEB 58FB # <CJK>
+DFEC 5DBC # <CJK>
+DFED 5E8F # <CJK>
+DFEE 5EB6 # <CJK>
+DFEF 5F90 # <CJK>
+DFF0 6055 # <CJK>
+DFF1 6292 # <CJK>
+DFF2 637F # <CJK>
+DFF3 654D # <CJK>
+DFF4 6691 # <CJK>
+DFF5 66D9 # <CJK>
+DFF6 66F8 # <CJK>
+DFF7 6816 # <CJK>
+DFF8 68F2 # <CJK>
+DFF9 7280 # <CJK>
+DFFA 745E # <CJK>
+DFFB 7B6E # <CJK>
+DFFC 7D6E # <CJK>
+DFFD 7DD6 # <CJK>
+DFFE 7F72 # <CJK>
+E0A1 80E5 # <CJK>
+E0A2 8212 # <CJK>
+E0A3 85AF # <CJK>
+E0A4 897F # <CJK>
+E0A5 8A93 # <CJK>
+E0A6 901D # <CJK>
+E0A7 92E4 # <CJK>
+E0A8 9ECD # <CJK>
+E0A9 9F20 # <CJK>
+E0AA 5915 # <CJK>
+E0AB 596D # <CJK>
+E0AC 5E2D # <CJK>
+E0AD 60DC # <CJK>
+E0AE 6614 # <CJK>
+E0AF 6673 # <CJK>
+E0B0 6790 # <CJK>
+E0B1 6C50 # <CJK>
+E0B2 6DC5 # <CJK>
+E0B3 6F5F # <CJK>
+E0B4 77F3 # <CJK>
+E0B5 78A9 # <CJK>
+E0B6 84C6 # <CJK>
+E0B7 91CB # <CJK>
+E0B8 932B # <CJK>
+E0B9 4ED9 # <CJK>
+E0BA 50CA # <CJK>
+E0BB 5148 # <CJK>
+E0BC 5584 # <CJK>
+E0BD 5B0B # <CJK>
+E0BE 5BA3 # <CJK>
+E0BF 6247 # <CJK>
+E0C0 657E # <CJK>
+E0C1 65CB # <CJK>
+E0C2 6E32 # <CJK>
+E0C3 717D # <CJK>
+E0C4 7401 # <CJK>
+E0C5 7444 # <CJK>
+E0C6 7487 # <CJK>
+E0C7 74BF # <CJK>
+E0C8 766C # <CJK>
+E0C9 79AA # <CJK>
+E0CA 7DDA # <CJK>
+E0CB 7E55 # <CJK>
+E0CC 7FA8 # <CJK>
+E0CD 817A # <CJK>
+E0CE 81B3 # <CJK>
+E0CF 8239 # <CJK>
+E0D0 861A # <CJK>
+E0D1 87EC # <CJK>
+E0D2 8A75 # <CJK>
+E0D3 8DE3 # <CJK>
+E0D4 9078 # <CJK>
+E0D5 9291 # <CJK>
+E0D6 9425 # <CJK>
+E0D7 994D # <CJK>
+E0D8 9BAE # <CJK>
+E0D9 5368 # <CJK>
+E0DA 5C51 # <CJK>
+E0DB 6954 # <CJK>
+E0DC 6CC4 # <CJK>
+E0DD 6D29 # <CJK>
+E0DE 6E2B # <CJK>
+E0DF 820C # <CJK>
+E0E0 859B # <CJK>
+E0E1 893B # <CJK>
+E0E2 8A2D # <CJK>
+E0E3 8AAA # <CJK>
+E0E4 96EA # <CJK>
+E0E5 9F67 # <CJK>
+E0E6 5261 # <CJK>
+E0E7 66B9 # <CJK>
+E0E8 6BB2 # <CJK>
+E0E9 7E96 # <CJK>
+E0EA 87FE # <CJK>
+E0EB 8D0D # <CJK>
+E0EC 9583 # <CJK>
+E0ED 965D # <CJK>
+E0EE 651D # <CJK>
+E0EF 6D89 # <CJK>
+E0F0 71EE # <CJK>
+E0F1 F96E # <CJK>
+E0F2 57CE # <CJK>
+E0F3 59D3 # <CJK>
+E0F4 5BAC # <CJK>
+E0F5 6027 # <CJK>
+E0F6 60FA # <CJK>
+E0F7 6210 # <CJK>
+E0F8 661F # <CJK>
+E0F9 665F # <CJK>
+E0FA 7329 # <CJK>
+E0FB 73F9 # <CJK>
+E0FC 76DB # <CJK>
+E0FD 7701 # <CJK>
+E0FE 7B6C # <CJK>
+E1A1 8056 # <CJK>
+E1A2 8072 # <CJK>
+E1A3 8165 # <CJK>
+E1A4 8AA0 # <CJK>
+E1A5 9192 # <CJK>
+E1A6 4E16 # <CJK>
+E1A7 52E2 # <CJK>
+E1A8 6B72 # <CJK>
+E1A9 6D17 # <CJK>
+E1AA 7A05 # <CJK>
+E1AB 7B39 # <CJK>
+E1AC 7D30 # <CJK>
+E1AD F96F # <CJK>
+E1AE 8CB0 # <CJK>
+E1AF 53EC # <CJK>
+E1B0 562F # <CJK>
+E1B1 5851 # <CJK>
+E1B2 5BB5 # <CJK>
+E1B3 5C0F # <CJK>
+E1B4 5C11 # <CJK>
+E1B5 5DE2 # <CJK>
+E1B6 6240 # <CJK>
+E1B7 6383 # <CJK>
+E1B8 6414 # <CJK>
+E1B9 662D # <CJK>
+E1BA 68B3 # <CJK>
+E1BB 6CBC # <CJK>
+E1BC 6D88 # <CJK>
+E1BD 6EAF # <CJK>
+E1BE 701F # <CJK>
+E1BF 70A4 # <CJK>
+E1C0 71D2 # <CJK>
+E1C1 7526 # <CJK>
+E1C2 758F # <CJK>
+E1C3 758E # <CJK>
+E1C4 7619 # <CJK>
+E1C5 7B11 # <CJK>
+E1C6 7BE0 # <CJK>
+E1C7 7C2B # <CJK>
+E1C8 7D20 # <CJK>
+E1C9 7D39 # <CJK>
+E1CA 852C # <CJK>
+E1CB 856D # <CJK>
+E1CC 8607 # <CJK>
+E1CD 8A34 # <CJK>
+E1CE 900D # <CJK>
+E1CF 9061 # <CJK>
+E1D0 90B5 # <CJK>
+E1D1 92B7 # <CJK>
+E1D2 97F6 # <CJK>
+E1D3 9A37 # <CJK>
+E1D4 4FD7 # <CJK>
+E1D5 5C6C # <CJK>
+E1D6 675F # <CJK>
+E1D7 6D91 # <CJK>
+E1D8 7C9F # <CJK>
+E1D9 7E8C # <CJK>
+E1DA 8B16 # <CJK>
+E1DB 8D16 # <CJK>
+E1DC 901F # <CJK>
+E1DD 5B6B # <CJK>
+E1DE 5DFD # <CJK>
+E1DF 640D # <CJK>
+E1E0 84C0 # <CJK>
+E1E1 905C # <CJK>
+E1E2 98E1 # <CJK>
+E1E3 7387 # <CJK>
+E1E4 5B8B # <CJK>
+E1E5 609A # <CJK>
+E1E6 677E # <CJK>
+E1E7 6DDE # <CJK>
+E1E8 8A1F # <CJK>
+E1E9 8AA6 # <CJK>
+E1EA 9001 # <CJK>
+E1EB 980C # <CJK>
+E1EC 5237 # <CJK>
+E1ED F970 # <CJK>
+E1EE 7051 # <CJK>
+E1EF 788E # <CJK>
+E1F0 9396 # <CJK>
+E1F1 8870 # <CJK>
+E1F2 91D7 # <CJK>
+E1F3 4FEE # <CJK>
+E1F4 53D7 # <CJK>
+E1F5 55FD # <CJK>
+E1F6 56DA # <CJK>
+E1F7 5782 # <CJK>
+E1F8 58FD # <CJK>
+E1F9 5AC2 # <CJK>
+E1FA 5B88 # <CJK>
+E1FB 5CAB # <CJK>
+E1FC 5CC0 # <CJK>
+E1FD 5E25 # <CJK>
+E1FE 6101 # <CJK>
+E2A1 620D # <CJK>
+E2A2 624B # <CJK>
+E2A3 6388 # <CJK>
+E2A4 641C # <CJK>
+E2A5 6536 # <CJK>
+E2A6 6578 # <CJK>
+E2A7 6A39 # <CJK>
+E2A8 6B8A # <CJK>
+E2A9 6C34 # <CJK>
+E2AA 6D19 # <CJK>
+E2AB 6F31 # <CJK>
+E2AC 71E7 # <CJK>
+E2AD 72E9 # <CJK>
+E2AE 7378 # <CJK>
+E2AF 7407 # <CJK>
+E2B0 74B2 # <CJK>
+E2B1 7626 # <CJK>
+E2B2 7761 # <CJK>
+E2B3 79C0 # <CJK>
+E2B4 7A57 # <CJK>
+E2B5 7AEA # <CJK>
+E2B6 7CB9 # <CJK>
+E2B7 7D8F # <CJK>
+E2B8 7DAC # <CJK>
+E2B9 7E61 # <CJK>
+E2BA 7F9E # <CJK>
+E2BB 8129 # <CJK>
+E2BC 8331 # <CJK>
+E2BD 8490 # <CJK>
+E2BE 84DA # <CJK>
+E2BF 85EA # <CJK>
+E2C0 8896 # <CJK>
+E2C1 8AB0 # <CJK>
+E2C2 8B90 # <CJK>
+E2C3 8F38 # <CJK>
+E2C4 9042 # <CJK>
+E2C5 9083 # <CJK>
+E2C6 916C # <CJK>
+E2C7 9296 # <CJK>
+E2C8 92B9 # <CJK>
+E2C9 968B # <CJK>
+E2CA 96A7 # <CJK>
+E2CB 96A8 # <CJK>
+E2CC 96D6 # <CJK>
+E2CD 9700 # <CJK>
+E2CE 9808 # <CJK>
+E2CF 9996 # <CJK>
+E2D0 9AD3 # <CJK>
+E2D1 9B1A # <CJK>
+E2D2 53D4 # <CJK>
+E2D3 587E # <CJK>
+E2D4 5919 # <CJK>
+E2D5 5B70 # <CJK>
+E2D6 5BBF # <CJK>
+E2D7 6DD1 # <CJK>
+E2D8 6F5A # <CJK>
+E2D9 719F # <CJK>
+E2DA 7421 # <CJK>
+E2DB 74B9 # <CJK>
+E2DC 8085 # <CJK>
+E2DD 83FD # <CJK>
+E2DE 5DE1 # <CJK>
+E2DF 5F87 # <CJK>
+E2E0 5FAA # <CJK>
+E2E1 6042 # <CJK>
+E2E2 65EC # <CJK>
+E2E3 6812 # <CJK>
+E2E4 696F # <CJK>
+E2E5 6A53 # <CJK>
+E2E6 6B89 # <CJK>
+E2E7 6D35 # <CJK>
+E2E8 6DF3 # <CJK>
+E2E9 73E3 # <CJK>
+E2EA 76FE # <CJK>
+E2EB 77AC # <CJK>
+E2EC 7B4D # <CJK>
+E2ED 7D14 # <CJK>
+E2EE 8123 # <CJK>
+E2EF 821C # <CJK>
+E2F0 8340 # <CJK>
+E2F1 84F4 # <CJK>
+E2F2 8563 # <CJK>
+E2F3 8A62 # <CJK>
+E2F4 8AC4 # <CJK>
+E2F5 9187 # <CJK>
+E2F6 931E # <CJK>
+E2F7 9806 # <CJK>
+E2F8 99B4 # <CJK>
+E2F9 620C # <CJK>
+E2FA 8853 # <CJK>
+E2FB 8FF0 # <CJK>
+E2FC 9265 # <CJK>
+E2FD 5D07 # <CJK>
+E2FE 5D27 # <CJK>
+E3A1 5D69 # <CJK>
+E3A2 745F # <CJK>
+E3A3 819D # <CJK>
+E3A4 8768 # <CJK>
+E3A5 6FD5 # <CJK>
+E3A6 62FE # <CJK>
+E3A7 7FD2 # <CJK>
+E3A8 8936 # <CJK>
+E3A9 8972 # <CJK>
+E3AA 4E1E # <CJK>
+E3AB 4E58 # <CJK>
+E3AC 50E7 # <CJK>
+E3AD 52DD # <CJK>
+E3AE 5347 # <CJK>
+E3AF 627F # <CJK>
+E3B0 6607 # <CJK>
+E3B1 7E69 # <CJK>
+E3B2 8805 # <CJK>
+E3B3 965E # <CJK>
+E3B4 4F8D # <CJK>
+E3B5 5319 # <CJK>
+E3B6 5636 # <CJK>
+E3B7 59CB # <CJK>
+E3B8 5AA4 # <CJK>
+E3B9 5C38 # <CJK>
+E3BA 5C4E # <CJK>
+E3BB 5C4D # <CJK>
+E3BC 5E02 # <CJK>
+E3BD 5F11 # <CJK>
+E3BE 6043 # <CJK>
+E3BF 65BD # <CJK>
+E3C0 662F # <CJK>
+E3C1 6642 # <CJK>
+E3C2 67BE # <CJK>
+E3C3 67F4 # <CJK>
+E3C4 731C # <CJK>
+E3C5 77E2 # <CJK>
+E3C6 793A # <CJK>
+E3C7 7FC5 # <CJK>
+E3C8 8494 # <CJK>
+E3C9 84CD # <CJK>
+E3CA 8996 # <CJK>
+E3CB 8A66 # <CJK>
+E3CC 8A69 # <CJK>
+E3CD 8AE1 # <CJK>
+E3CE 8C55 # <CJK>
+E3CF 8C7A # <CJK>
+E3D0 57F4 # <CJK>
+E3D1 5BD4 # <CJK>
+E3D2 5F0F # <CJK>
+E3D3 606F # <CJK>
+E3D4 62ED # <CJK>
+E3D5 690D # <CJK>
+E3D6 6B96 # <CJK>
+E3D7 6E5C # <CJK>
+E3D8 7184 # <CJK>
+E3D9 7BD2 # <CJK>
+E3DA 8755 # <CJK>
+E3DB 8B58 # <CJK>
+E3DC 8EFE # <CJK>
+E3DD 98DF # <CJK>
+E3DE 98FE # <CJK>
+E3DF 4F38 # <CJK>
+E3E0 4F81 # <CJK>
+E3E1 4FE1 # <CJK>
+E3E2 547B # <CJK>
+E3E3 5A20 # <CJK>
+E3E4 5BB8 # <CJK>
+E3E5 613C # <CJK>
+E3E6 65B0 # <CJK>
+E3E7 6668 # <CJK>
+E3E8 71FC # <CJK>
+E3E9 7533 # <CJK>
+E3EA 795E # <CJK>
+E3EB 7D33 # <CJK>
+E3EC 814E # <CJK>
+E3ED 81E3 # <CJK>
+E3EE 8398 # <CJK>
+E3EF 85AA # <CJK>
+E3F0 85CE # <CJK>
+E3F1 8703 # <CJK>
+E3F2 8A0A # <CJK>
+E3F3 8EAB # <CJK>
+E3F4 8F9B # <CJK>
+E3F5 F971 # <CJK>
+E3F6 8FC5 # <CJK>
+E3F7 5931 # <CJK>
+E3F8 5BA4 # <CJK>
+E3F9 5BE6 # <CJK>
+E3FA 6089 # <CJK>
+E3FB 5BE9 # <CJK>
+E3FC 5C0B # <CJK>
+E3FD 5FC3 # <CJK>
+E3FE 6C81 # <CJK>
+E4A1 F972 # <CJK>
+E4A2 6DF1 # <CJK>
+E4A3 700B # <CJK>
+E4A4 751A # <CJK>
+E4A5 82AF # <CJK>
+E4A6 8AF6 # <CJK>
+E4A7 4EC0 # <CJK>
+E4A8 5341 # <CJK>
+E4A9 F973 # <CJK>
+E4AA 96D9 # <CJK>
+E4AB 6C0F # <CJK>
+E4AC 4E9E # <CJK>
+E4AD 4FC4 # <CJK>
+E4AE 5152 # <CJK>
+E4AF 555E # <CJK>
+E4B0 5A25 # <CJK>
+E4B1 5CE8 # <CJK>
+E4B2 6211 # <CJK>
+E4B3 7259 # <CJK>
+E4B4 82BD # <CJK>
+E4B5 83AA # <CJK>
+E4B6 86FE # <CJK>
+E4B7 8859 # <CJK>
+E4B8 8A1D # <CJK>
+E4B9 963F # <CJK>
+E4BA 96C5 # <CJK>
+E4BB 9913 # <CJK>
+E4BC 9D09 # <CJK>
+E4BD 9D5D # <CJK>
+E4BE 580A # <CJK>
+E4BF 5CB3 # <CJK>
+E4C0 5DBD # <CJK>
+E4C1 5E44 # <CJK>
+E4C2 60E1 # <CJK>
+E4C3 6115 # <CJK>
+E4C4 63E1 # <CJK>
+E4C5 6A02 # <CJK>
+E4C6 6E25 # <CJK>
+E4C7 9102 # <CJK>
+E4C8 9354 # <CJK>
+E4C9 984E # <CJK>
+E4CA 9C10 # <CJK>
+E4CB 9F77 # <CJK>
+E4CC 5B89 # <CJK>
+E4CD 5CB8 # <CJK>
+E4CE 6309 # <CJK>
+E4CF 664F # <CJK>
+E4D0 6848 # <CJK>
+E4D1 773C # <CJK>
+E4D2 96C1 # <CJK>
+E4D3 978D # <CJK>
+E4D4 9854 # <CJK>
+E4D5 9B9F # <CJK>
+E4D6 65A1 # <CJK>
+E4D7 8B01 # <CJK>
+E4D8 8ECB # <CJK>
+E4D9 95BC # <CJK>
+E4DA 5535 # <CJK>
+E4DB 5CA9 # <CJK>
+E4DC 5DD6 # <CJK>
+E4DD 5EB5 # <CJK>
+E4DE 6697 # <CJK>
+E4DF 764C # <CJK>
+E4E0 83F4 # <CJK>
+E4E1 95C7 # <CJK>
+E4E2 58D3 # <CJK>
+E4E3 62BC # <CJK>
+E4E4 72CE # <CJK>
+E4E5 9D28 # <CJK>
+E4E6 4EF0 # <CJK>
+E4E7 592E # <CJK>
+E4E8 600F # <CJK>
+E4E9 663B # <CJK>
+E4EA 6B83 # <CJK>
+E4EB 79E7 # <CJK>
+E4EC 9D26 # <CJK>
+E4ED 5393 # <CJK>
+E4EE 54C0 # <CJK>
+E4EF 57C3 # <CJK>
+E4F0 5D16 # <CJK>
+E4F1 611B # <CJK>
+E4F2 66D6 # <CJK>
+E4F3 6DAF # <CJK>
+E4F4 788D # <CJK>
+E4F5 827E # <CJK>
+E4F6 9698 # <CJK>
+E4F7 9744 # <CJK>
+E4F8 5384 # <CJK>
+E4F9 627C # <CJK>
+E4FA 6396 # <CJK>
+E4FB 6DB2 # <CJK>
+E4FC 7E0A # <CJK>
+E4FD 814B # <CJK>
+E4FE 984D # <CJK>
+E5A1 6AFB # <CJK>
+E5A2 7F4C # <CJK>
+E5A3 9DAF # <CJK>
+E5A4 9E1A # <CJK>
+E5A5 4E5F # <CJK>
+E5A6 503B # <CJK>
+E5A7 51B6 # <CJK>
+E5A8 591C # <CJK>
+E5A9 60F9 # <CJK>
+E5AA 63F6 # <CJK>
+E5AB 6930 # <CJK>
+E5AC 723A # <CJK>
+E5AD 8036 # <CJK>
+E5AE F974 # <CJK>
+E5AF 91CE # <CJK>
+E5B0 5F31 # <CJK>
+E5B1 F975 # <CJK>
+E5B2 F976 # <CJK>
+E5B3 7D04 # <CJK>
+E5B4 82E5 # <CJK>
+E5B5 846F # <CJK>
+E5B6 84BB # <CJK>
+E5B7 85E5 # <CJK>
+E5B8 8E8D # <CJK>
+E5B9 F977 # <CJK>
+E5BA 4F6F # <CJK>
+E5BB F978 # <CJK>
+E5BC F979 # <CJK>
+E5BD 58E4 # <CJK>
+E5BE 5B43 # <CJK>
+E5BF 6059 # <CJK>
+E5C0 63DA # <CJK>
+E5C1 6518 # <CJK>
+E5C2 656D # <CJK>
+E5C3 6698 # <CJK>
+E5C4 F97A # <CJK>
+E5C5 694A # <CJK>
+E5C6 6A23 # <CJK>
+E5C7 6D0B # <CJK>
+E5C8 7001 # <CJK>
+E5C9 716C # <CJK>
+E5CA 75D2 # <CJK>
+E5CB 760D # <CJK>
+E5CC 79B3 # <CJK>
+E5CD 7A70 # <CJK>
+E5CE F97B # <CJK>
+E5CF 7F8A # <CJK>
+E5D0 F97C # <CJK>
+E5D1 8944 # <CJK>
+E5D2 F97D # <CJK>
+E5D3 8B93 # <CJK>
+E5D4 91C0 # <CJK>
+E5D5 967D # <CJK>
+E5D6 F97E # <CJK>
+E5D7 990A # <CJK>
+E5D8 5704 # <CJK>
+E5D9 5FA1 # <CJK>
+E5DA 65BC # <CJK>
+E5DB 6F01 # <CJK>
+E5DC 7600 # <CJK>
+E5DD 79A6 # <CJK>
+E5DE 8A9E # <CJK>
+E5DF 99AD # <CJK>
+E5E0 9B5A # <CJK>
+E5E1 9F6C # <CJK>
+E5E2 5104 # <CJK>
+E5E3 61B6 # <CJK>
+E5E4 6291 # <CJK>
+E5E5 6A8D # <CJK>
+E5E6 81C6 # <CJK>
+E5E7 5043 # <CJK>
+E5E8 5830 # <CJK>
+E5E9 5F66 # <CJK>
+E5EA 7109 # <CJK>
+E5EB 8A00 # <CJK>
+E5EC 8AFA # <CJK>
+E5ED 5B7C # <CJK>
+E5EE 8616 # <CJK>
+E5EF 4FFA # <CJK>
+E5F0 513C # <CJK>
+E5F1 56B4 # <CJK>
+E5F2 5944 # <CJK>
+E5F3 63A9 # <CJK>
+E5F4 6DF9 # <CJK>
+E5F5 5DAA # <CJK>
+E5F6 696D # <CJK>
+E5F7 5186 # <CJK>
+E5F8 4E88 # <CJK>
+E5F9 4F59 # <CJK>
+E5FA F97F # <CJK>
+E5FB F980 # <CJK>
+E5FC F981 # <CJK>
+E5FD 5982 # <CJK>
+E5FE F982 # <CJK>
+E6A1 F983 # <CJK>
+E6A2 6B5F # <CJK>
+E6A3 6C5D # <CJK>
+E6A4 F984 # <CJK>
+E6A5 74B5 # <CJK>
+E6A6 7916 # <CJK>
+E6A7 F985 # <CJK>
+E6A8 8207 # <CJK>
+E6A9 8245 # <CJK>
+E6AA 8339 # <CJK>
+E6AB 8F3F # <CJK>
+E6AC 8F5D # <CJK>
+E6AD F986 # <CJK>
+E6AE 9918 # <CJK>
+E6AF F987 # <CJK>
+E6B0 F988 # <CJK>
+E6B1 F989 # <CJK>
+E6B2 4EA6 # <CJK>
+E6B3 F98A # <CJK>
+E6B4 57DF # <CJK>
+E6B5 5F79 # <CJK>
+E6B6 6613 # <CJK>
+E6B7 F98B # <CJK>
+E6B8 F98C # <CJK>
+E6B9 75AB # <CJK>
+E6BA 7E79 # <CJK>
+E6BB 8B6F # <CJK>
+E6BC F98D # <CJK>
+E6BD 9006 # <CJK>
+E6BE 9A5B # <CJK>
+E6BF 56A5 # <CJK>
+E6C0 5827 # <CJK>
+E6C1 59F8 # <CJK>
+E6C2 5A1F # <CJK>
+E6C3 5BB4 # <CJK>
+E6C4 F98E # <CJK>
+E6C5 5EF6 # <CJK>
+E6C6 F98F # <CJK>
+E6C7 F990 # <CJK>
+E6C8 6350 # <CJK>
+E6C9 633B # <CJK>
+E6CA F991 # <CJK>
+E6CB 693D # <CJK>
+E6CC 6C87 # <CJK>
+E6CD 6CBF # <CJK>
+E6CE 6D8E # <CJK>
+E6CF 6D93 # <CJK>
+E6D0 6DF5 # <CJK>
+E6D1 6F14 # <CJK>
+E6D2 F992 # <CJK>
+E6D3 70DF # <CJK>
+E6D4 7136 # <CJK>
+E6D5 7159 # <CJK>
+E6D6 F993 # <CJK>
+E6D7 71C3 # <CJK>
+E6D8 71D5 # <CJK>
+E6D9 F994 # <CJK>
+E6DA 784F # <CJK>
+E6DB 786F # <CJK>
+E6DC F995 # <CJK>
+E6DD 7B75 # <CJK>
+E6DE 7DE3 # <CJK>
+E6DF F996 # <CJK>
+E6E0 7E2F # <CJK>
+E6E1 F997 # <CJK>
+E6E2 884D # <CJK>
+E6E3 8EDF # <CJK>
+E6E4 F998 # <CJK>
+E6E5 F999 # <CJK>
+E6E6 F99A # <CJK>
+E6E7 925B # <CJK>
+E6E8 F99B # <CJK>
+E6E9 9CF6 # <CJK>
+E6EA F99C # <CJK>
+E6EB F99D # <CJK>
+E6EC F99E # <CJK>
+E6ED 6085 # <CJK>
+E6EE 6D85 # <CJK>
+E6EF F99F # <CJK>
+E6F0 71B1 # <CJK>
+E6F1 F9A0 # <CJK>
+E6F2 F9A1 # <CJK>
+E6F3 95B1 # <CJK>
+E6F4 53AD # <CJK>
+E6F5 F9A2 # <CJK>
+E6F6 F9A3 # <CJK>
+E6F7 F9A4 # <CJK>
+E6F8 67D3 # <CJK>
+E6F9 F9A5 # <CJK>
+E6FA 708E # <CJK>
+E6FB 7130 # <CJK>
+E6FC 7430 # <CJK>
+E6FD 8276 # <CJK>
+E6FE 82D2 # <CJK>
+E7A1 F9A6 # <CJK>
+E7A2 95BB # <CJK>
+E7A3 9AE5 # <CJK>
+E7A4 9E7D # <CJK>
+E7A5 66C4 # <CJK>
+E7A6 F9A7 # <CJK>
+E7A7 71C1 # <CJK>
+E7A8 8449 # <CJK>
+E7A9 F9A8 # <CJK>
+E7AA F9A9 # <CJK>
+E7AB 584B # <CJK>
+E7AC F9AA # <CJK>
+E7AD F9AB # <CJK>
+E7AE 5DB8 # <CJK>
+E7AF 5F71 # <CJK>
+E7B0 F9AC # <CJK>
+E7B1 6620 # <CJK>
+E7B2 668E # <CJK>
+E7B3 6979 # <CJK>
+E7B4 69AE # <CJK>
+E7B5 6C38 # <CJK>
+E7B6 6CF3 # <CJK>
+E7B7 6E36 # <CJK>
+E7B8 6F41 # <CJK>
+E7B9 6FDA # <CJK>
+E7BA 701B # <CJK>
+E7BB 702F # <CJK>
+E7BC 7150 # <CJK>
+E7BD 71DF # <CJK>
+E7BE 7370 # <CJK>
+E7BF F9AD # <CJK>
+E7C0 745B # <CJK>
+E7C1 F9AE # <CJK>
+E7C2 74D4 # <CJK>
+E7C3 76C8 # <CJK>
+E7C4 7A4E # <CJK>
+E7C5 7E93 # <CJK>
+E7C6 F9AF # <CJK>
+E7C7 F9B0 # <CJK>
+E7C8 82F1 # <CJK>
+E7C9 8A60 # <CJK>
+E7CA 8FCE # <CJK>
+E7CB F9B1 # <CJK>
+E7CC 9348 # <CJK>
+E7CD F9B2 # <CJK>
+E7CE 9719 # <CJK>
+E7CF F9B3 # <CJK>
+E7D0 F9B4 # <CJK>
+E7D1 4E42 # <CJK>
+E7D2 502A # <CJK>
+E7D3 F9B5 # <CJK>
+E7D4 5208 # <CJK>
+E7D5 53E1 # <CJK>
+E7D6 66F3 # <CJK>
+E7D7 6C6D # <CJK>
+E7D8 6FCA # <CJK>
+E7D9 730A # <CJK>
+E7DA 777F # <CJK>
+E7DB 7A62 # <CJK>
+E7DC 82AE # <CJK>
+E7DD 85DD # <CJK>
+E7DE 8602 # <CJK>
+E7DF F9B6 # <CJK>
+E7E0 88D4 # <CJK>
+E7E1 8A63 # <CJK>
+E7E2 8B7D # <CJK>
+E7E3 8C6B # <CJK>
+E7E4 F9B7 # <CJK>
+E7E5 92B3 # <CJK>
+E7E6 F9B8 # <CJK>
+E7E7 9713 # <CJK>
+E7E8 9810 # <CJK>
+E7E9 4E94 # <CJK>
+E7EA 4F0D # <CJK>
+E7EB 4FC9 # <CJK>
+E7EC 50B2 # <CJK>
+E7ED 5348 # <CJK>
+E7EE 543E # <CJK>
+E7EF 5433 # <CJK>
+E7F0 55DA # <CJK>
+E7F1 5862 # <CJK>
+E7F2 58BA # <CJK>
+E7F3 5967 # <CJK>
+E7F4 5A1B # <CJK>
+E7F5 5BE4 # <CJK>
+E7F6 609F # <CJK>
+E7F7 F9B9 # <CJK>
+E7F8 61CA # <CJK>
+E7F9 6556 # <CJK>
+E7FA 65FF # <CJK>
+E7FB 6664 # <CJK>
+E7FC 68A7 # <CJK>
+E7FD 6C5A # <CJK>
+E7FE 6FB3 # <CJK>
+E8A1 70CF # <CJK>
+E8A2 71AC # <CJK>
+E8A3 7352 # <CJK>
+E8A4 7B7D # <CJK>
+E8A5 8708 # <CJK>
+E8A6 8AA4 # <CJK>
+E8A7 9C32 # <CJK>
+E8A8 9F07 # <CJK>
+E8A9 5C4B # <CJK>
+E8AA 6C83 # <CJK>
+E8AB 7344 # <CJK>
+E8AC 7389 # <CJK>
+E8AD 923A # <CJK>
+E8AE 6EAB # <CJK>
+E8AF 7465 # <CJK>
+E8B0 761F # <CJK>
+E8B1 7A69 # <CJK>
+E8B2 7E15 # <CJK>
+E8B3 860A # <CJK>
+E8B4 5140 # <CJK>
+E8B5 58C5 # <CJK>
+E8B6 64C1 # <CJK>
+E8B7 74EE # <CJK>
+E8B8 7515 # <CJK>
+E8B9 7670 # <CJK>
+E8BA 7FC1 # <CJK>
+E8BB 9095 # <CJK>
+E8BC 96CD # <CJK>
+E8BD 9954 # <CJK>
+E8BE 6E26 # <CJK>
+E8BF 74E6 # <CJK>
+E8C0 7AA9 # <CJK>
+E8C1 7AAA # <CJK>
+E8C2 81E5 # <CJK>
+E8C3 86D9 # <CJK>
+E8C4 8778 # <CJK>
+E8C5 8A1B # <CJK>
+E8C6 5A49 # <CJK>
+E8C7 5B8C # <CJK>
+E8C8 5B9B # <CJK>
+E8C9 68A1 # <CJK>
+E8CA 6900 # <CJK>
+E8CB 6D63 # <CJK>
+E8CC 73A9 # <CJK>
+E8CD 7413 # <CJK>
+E8CE 742C # <CJK>
+E8CF 7897 # <CJK>
+E8D0 7DE9 # <CJK>
+E8D1 7FEB # <CJK>
+E8D2 8118 # <CJK>
+E8D3 8155 # <CJK>
+E8D4 839E # <CJK>
+E8D5 8C4C # <CJK>
+E8D6 962E # <CJK>
+E8D7 9811 # <CJK>
+E8D8 66F0 # <CJK>
+E8D9 5F80 # <CJK>
+E8DA 65FA # <CJK>
+E8DB 6789 # <CJK>
+E8DC 6C6A # <CJK>
+E8DD 738B # <CJK>
+E8DE 502D # <CJK>
+E8DF 5A03 # <CJK>
+E8E0 6B6A # <CJK>
+E8E1 77EE # <CJK>
+E8E2 5916 # <CJK>
+E8E3 5D6C # <CJK>
+E8E4 5DCD # <CJK>
+E8E5 7325 # <CJK>
+E8E6 754F # <CJK>
+E8E7 F9BA # <CJK>
+E8E8 F9BB # <CJK>
+E8E9 50E5 # <CJK>
+E8EA 51F9 # <CJK>
+E8EB 582F # <CJK>
+E8EC 592D # <CJK>
+E8ED 5996 # <CJK>
+E8EE 59DA # <CJK>
+E8EF 5BE5 # <CJK>
+E8F0 F9BC # <CJK>
+E8F1 F9BD # <CJK>
+E8F2 5DA2 # <CJK>
+E8F3 62D7 # <CJK>
+E8F4 6416 # <CJK>
+E8F5 6493 # <CJK>
+E8F6 64FE # <CJK>
+E8F7 F9BE # <CJK>
+E8F8 66DC # <CJK>
+E8F9 F9BF # <CJK>
+E8FA 6A48 # <CJK>
+E8FB F9C0 # <CJK>
+E8FC 71FF # <CJK>
+E8FD 7464 # <CJK>
+E8FE F9C1 # <CJK>
+E9A1 7A88 # <CJK>
+E9A2 7AAF # <CJK>
+E9A3 7E47 # <CJK>
+E9A4 7E5E # <CJK>
+E9A5 8000 # <CJK>
+E9A6 8170 # <CJK>
+E9A7 F9C2 # <CJK>
+E9A8 87EF # <CJK>
+E9A9 8981 # <CJK>
+E9AA 8B20 # <CJK>
+E9AB 9059 # <CJK>
+E9AC F9C3 # <CJK>
+E9AD 9080 # <CJK>
+E9AE 9952 # <CJK>
+E9AF 617E # <CJK>
+E9B0 6B32 # <CJK>
+E9B1 6D74 # <CJK>
+E9B2 7E1F # <CJK>
+E9B3 8925 # <CJK>
+E9B4 8FB1 # <CJK>
+E9B5 4FD1 # <CJK>
+E9B6 50AD # <CJK>
+E9B7 5197 # <CJK>
+E9B8 52C7 # <CJK>
+E9B9 57C7 # <CJK>
+E9BA 5889 # <CJK>
+E9BB 5BB9 # <CJK>
+E9BC 5EB8 # <CJK>
+E9BD 6142 # <CJK>
+E9BE 6995 # <CJK>
+E9BF 6D8C # <CJK>
+E9C0 6E67 # <CJK>
+E9C1 6EB6 # <CJK>
+E9C2 7194 # <CJK>
+E9C3 7462 # <CJK>
+E9C4 7528 # <CJK>
+E9C5 752C # <CJK>
+E9C6 8073 # <CJK>
+E9C7 8338 # <CJK>
+E9C8 84C9 # <CJK>
+E9C9 8E0A # <CJK>
+E9CA 9394 # <CJK>
+E9CB 93DE # <CJK>
+E9CC F9C4 # <CJK>
+E9CD 4E8E # <CJK>
+E9CE 4F51 # <CJK>
+E9CF 5076 # <CJK>
+E9D0 512A # <CJK>
+E9D1 53C8 # <CJK>
+E9D2 53CB # <CJK>
+E9D3 53F3 # <CJK>
+E9D4 5B87 # <CJK>
+E9D5 5BD3 # <CJK>
+E9D6 5C24 # <CJK>
+E9D7 611A # <CJK>
+E9D8 6182 # <CJK>
+E9D9 65F4 # <CJK>
+E9DA 725B # <CJK>
+E9DB 7397 # <CJK>
+E9DC 7440 # <CJK>
+E9DD 76C2 # <CJK>
+E9DE 7950 # <CJK>
+E9DF 7991 # <CJK>
+E9E0 79B9 # <CJK>
+E9E1 7D06 # <CJK>
+E9E2 7FBD # <CJK>
+E9E3 828B # <CJK>
+E9E4 85D5 # <CJK>
+E9E5 865E # <CJK>
+E9E6 8FC2 # <CJK>
+E9E7 9047 # <CJK>
+E9E8 90F5 # <CJK>
+E9E9 91EA # <CJK>
+E9EA 9685 # <CJK>
+E9EB 96E8 # <CJK>
+E9EC 96E9 # <CJK>
+E9ED 52D6 # <CJK>
+E9EE 5F67 # <CJK>
+E9EF 65ED # <CJK>
+E9F0 6631 # <CJK>
+E9F1 682F # <CJK>
+E9F2 715C # <CJK>
+E9F3 7A36 # <CJK>
+E9F4 90C1 # <CJK>
+E9F5 980A # <CJK>
+E9F6 4E91 # <CJK>
+E9F7 F9C5 # <CJK>
+E9F8 6A52 # <CJK>
+E9F9 6B9E # <CJK>
+E9FA 6F90 # <CJK>
+E9FB 7189 # <CJK>
+E9FC 8018 # <CJK>
+E9FD 82B8 # <CJK>
+E9FE 8553 # <CJK>
+EAA1 904B # <CJK>
+EAA2 9695 # <CJK>
+EAA3 96F2 # <CJK>
+EAA4 97FB # <CJK>
+EAA5 851A # <CJK>
+EAA6 9B31 # <CJK>
+EAA7 4E90 # <CJK>
+EAA8 718A # <CJK>
+EAA9 96C4 # <CJK>
+EAAA 5143 # <CJK>
+EAAB 539F # <CJK>
+EAAC 54E1 # <CJK>
+EAAD 5713 # <CJK>
+EAAE 5712 # <CJK>
+EAAF 57A3 # <CJK>
+EAB0 5A9B # <CJK>
+EAB1 5AC4 # <CJK>
+EAB2 5BC3 # <CJK>
+EAB3 6028 # <CJK>
+EAB4 613F # <CJK>
+EAB5 63F4 # <CJK>
+EAB6 6C85 # <CJK>
+EAB7 6D39 # <CJK>
+EAB8 6E72 # <CJK>
+EAB9 6E90 # <CJK>
+EABA 7230 # <CJK>
+EABB 733F # <CJK>
+EABC 7457 # <CJK>
+EABD 82D1 # <CJK>
+EABE 8881 # <CJK>
+EABF 8F45 # <CJK>
+EAC0 9060 # <CJK>
+EAC1 F9C6 # <CJK>
+EAC2 9662 # <CJK>
+EAC3 9858 # <CJK>
+EAC4 9D1B # <CJK>
+EAC5 6708 # <CJK>
+EAC6 8D8A # <CJK>
+EAC7 925E # <CJK>
+EAC8 4F4D # <CJK>
+EAC9 5049 # <CJK>
+EACA 50DE # <CJK>
+EACB 5371 # <CJK>
+EACC 570D # <CJK>
+EACD 59D4 # <CJK>
+EACE 5A01 # <CJK>
+EACF 5C09 # <CJK>
+EAD0 6170 # <CJK>
+EAD1 6690 # <CJK>
+EAD2 6E2D # <CJK>
+EAD3 7232 # <CJK>
+EAD4 744B # <CJK>
+EAD5 7DEF # <CJK>
+EAD6 80C3 # <CJK>
+EAD7 840E # <CJK>
+EAD8 8466 # <CJK>
+EAD9 853F # <CJK>
+EADA 875F # <CJK>
+EADB 885B # <CJK>
+EADC 8918 # <CJK>
+EADD 8B02 # <CJK>
+EADE 9055 # <CJK>
+EADF 97CB # <CJK>
+EAE0 9B4F # <CJK>
+EAE1 4E73 # <CJK>
+EAE2 4F91 # <CJK>
+EAE3 5112 # <CJK>
+EAE4 516A # <CJK>
+EAE5 F9C7 # <CJK>
+EAE6 552F # <CJK>
+EAE7 55A9 # <CJK>
+EAE8 5B7A # <CJK>
+EAE9 5BA5 # <CJK>
+EAEA 5E7C # <CJK>
+EAEB 5E7D # <CJK>
+EAEC 5EBE # <CJK>
+EAED 60A0 # <CJK>
+EAEE 60DF # <CJK>
+EAEF 6108 # <CJK>
+EAF0 6109 # <CJK>
+EAF1 63C4 # <CJK>
+EAF2 6538 # <CJK>
+EAF3 6709 # <CJK>
+EAF4 F9C8 # <CJK>
+EAF5 67D4 # <CJK>
+EAF6 67DA # <CJK>
+EAF7 F9C9 # <CJK>
+EAF8 6961 # <CJK>
+EAF9 6962 # <CJK>
+EAFA 6CB9 # <CJK>
+EAFB 6D27 # <CJK>
+EAFC F9CA # <CJK>
+EAFD 6E38 # <CJK>
+EAFE F9CB # <CJK>
+EBA1 6FE1 # <CJK>
+EBA2 7336 # <CJK>
+EBA3 7337 # <CJK>
+EBA4 F9CC # <CJK>
+EBA5 745C # <CJK>
+EBA6 7531 # <CJK>
+EBA7 F9CD # <CJK>
+EBA8 7652 # <CJK>
+EBA9 F9CE # <CJK>
+EBAA F9CF # <CJK>
+EBAB 7DAD # <CJK>
+EBAC 81FE # <CJK>
+EBAD 8438 # <CJK>
+EBAE 88D5 # <CJK>
+EBAF 8A98 # <CJK>
+EBB0 8ADB # <CJK>
+EBB1 8AED # <CJK>
+EBB2 8E30 # <CJK>
+EBB3 8E42 # <CJK>
+EBB4 904A # <CJK>
+EBB5 903E # <CJK>
+EBB6 907A # <CJK>
+EBB7 9149 # <CJK>
+EBB8 91C9 # <CJK>
+EBB9 936E # <CJK>
+EBBA F9D0 # <CJK>
+EBBB F9D1 # <CJK>
+EBBC 5809 # <CJK>
+EBBD F9D2 # <CJK>
+EBBE 6BD3 # <CJK>
+EBBF 8089 # <CJK>
+EBC0 80B2 # <CJK>
+EBC1 F9D3 # <CJK>
+EBC2 F9D4 # <CJK>
+EBC3 5141 # <CJK>
+EBC4 596B # <CJK>
+EBC5 5C39 # <CJK>
+EBC6 F9D5 # <CJK>
+EBC7 F9D6 # <CJK>
+EBC8 6F64 # <CJK>
+EBC9 73A7 # <CJK>
+EBCA 80E4 # <CJK>
+EBCB 8D07 # <CJK>
+EBCC F9D7 # <CJK>
+EBCD 9217 # <CJK>
+EBCE 958F # <CJK>
+EBCF F9D8 # <CJK>
+EBD0 F9D9 # <CJK>
+EBD1 F9DA # <CJK>
+EBD2 F9DB # <CJK>
+EBD3 807F # <CJK>
+EBD4 620E # <CJK>
+EBD5 701C # <CJK>
+EBD6 7D68 # <CJK>
+EBD7 878D # <CJK>
+EBD8 F9DC # <CJK>
+EBD9 57A0 # <CJK>
+EBDA 6069 # <CJK>
+EBDB 6147 # <CJK>
+EBDC 6BB7 # <CJK>
+EBDD 8ABE # <CJK>
+EBDE 9280 # <CJK>
+EBDF 96B1 # <CJK>
+EBE0 4E59 # <CJK>
+EBE1 541F # <CJK>
+EBE2 6DEB # <CJK>
+EBE3 852D # <CJK>
+EBE4 9670 # <CJK>
+EBE5 97F3 # <CJK>
+EBE6 98EE # <CJK>
+EBE7 63D6 # <CJK>
+EBE8 6CE3 # <CJK>
+EBE9 9091 # <CJK>
+EBEA 51DD # <CJK>
+EBEB 61C9 # <CJK>
+EBEC 81BA # <CJK>
+EBED 9DF9 # <CJK>
+EBEE 4F9D # <CJK>
+EBEF 501A # <CJK>
+EBF0 5100 # <CJK>
+EBF1 5B9C # <CJK>
+EBF2 610F # <CJK>
+EBF3 61FF # <CJK>
+EBF4 64EC # <CJK>
+EBF5 6905 # <CJK>
+EBF6 6BC5 # <CJK>
+EBF7 7591 # <CJK>
+EBF8 77E3 # <CJK>
+EBF9 7FA9 # <CJK>
+EBFA 8264 # <CJK>
+EBFB 858F # <CJK>
+EBFC 87FB # <CJK>
+EBFD 8863 # <CJK>
+EBFE 8ABC # <CJK>
+ECA1 8B70 # <CJK>
+ECA2 91AB # <CJK>
+ECA3 4E8C # <CJK>
+ECA4 4EE5 # <CJK>
+ECA5 4F0A # <CJK>
+ECA6 F9DD # <CJK>
+ECA7 F9DE # <CJK>
+ECA8 5937 # <CJK>
+ECA9 59E8 # <CJK>
+ECAA F9DF # <CJK>
+ECAB 5DF2 # <CJK>
+ECAC 5F1B # <CJK>
+ECAD 5F5B # <CJK>
+ECAE 6021 # <CJK>
+ECAF F9E0 # <CJK>
+ECB0 F9E1 # <CJK>
+ECB1 F9E2 # <CJK>
+ECB2 F9E3 # <CJK>
+ECB3 723E # <CJK>
+ECB4 73E5 # <CJK>
+ECB5 F9E4 # <CJK>
+ECB6 7570 # <CJK>
+ECB7 75CD # <CJK>
+ECB8 F9E5 # <CJK>
+ECB9 79FB # <CJK>
+ECBA F9E6 # <CJK>
+ECBB 800C # <CJK>
+ECBC 8033 # <CJK>
+ECBD 8084 # <CJK>
+ECBE 82E1 # <CJK>
+ECBF 8351 # <CJK>
+ECC0 F9E7 # <CJK>
+ECC1 F9E8 # <CJK>
+ECC2 8CBD # <CJK>
+ECC3 8CB3 # <CJK>
+ECC4 9087 # <CJK>
+ECC5 F9E9 # <CJK>
+ECC6 F9EA # <CJK>
+ECC7 98F4 # <CJK>
+ECC8 990C # <CJK>
+ECC9 F9EB # <CJK>
+ECCA F9EC # <CJK>
+ECCB 7037 # <CJK>
+ECCC 76CA # <CJK>
+ECCD 7FCA # <CJK>
+ECCE 7FCC # <CJK>
+ECCF 7FFC # <CJK>
+ECD0 8B1A # <CJK>
+ECD1 4EBA # <CJK>
+ECD2 4EC1 # <CJK>
+ECD3 5203 # <CJK>
+ECD4 5370 # <CJK>
+ECD5 F9ED # <CJK>
+ECD6 54BD # <CJK>
+ECD7 56E0 # <CJK>
+ECD8 59FB # <CJK>
+ECD9 5BC5 # <CJK>
+ECDA 5F15 # <CJK>
+ECDB 5FCD # <CJK>
+ECDC 6E6E # <CJK>
+ECDD F9EE # <CJK>
+ECDE F9EF # <CJK>
+ECDF 7D6A # <CJK>
+ECE0 8335 # <CJK>
+ECE1 F9F0 # <CJK>
+ECE2 8693 # <CJK>
+ECE3 8A8D # <CJK>
+ECE4 F9F1 # <CJK>
+ECE5 976D # <CJK>
+ECE6 9777 # <CJK>
+ECE7 F9F2 # <CJK>
+ECE8 F9F3 # <CJK>
+ECE9 4E00 # <CJK>
+ECEA 4F5A # <CJK>
+ECEB 4F7E # <CJK>
+ECEC 58F9 # <CJK>
+ECED 65E5 # <CJK>
+ECEE 6EA2 # <CJK>
+ECEF 9038 # <CJK>
+ECF0 93B0 # <CJK>
+ECF1 99B9 # <CJK>
+ECF2 4EFB # <CJK>
+ECF3 58EC # <CJK>
+ECF4 598A # <CJK>
+ECF5 59D9 # <CJK>
+ECF6 6041 # <CJK>
+ECF7 F9F4 # <CJK>
+ECF8 F9F5 # <CJK>
+ECF9 7A14 # <CJK>
+ECFA F9F6 # <CJK>
+ECFB 834F # <CJK>
+ECFC 8CC3 # <CJK>
+ECFD 5165 # <CJK>
+ECFE 5344 # <CJK>
+EDA1 F9F7 # <CJK>
+EDA2 F9F8 # <CJK>
+EDA3 F9F9 # <CJK>
+EDA4 4ECD # <CJK>
+EDA5 5269 # <CJK>
+EDA6 5B55 # <CJK>
+EDA7 82BF # <CJK>
+EDA8 4ED4 # <CJK>
+EDA9 523A # <CJK>
+EDAA 54A8 # <CJK>
+EDAB 59C9 # <CJK>
+EDAC 59FF # <CJK>
+EDAD 5B50 # <CJK>
+EDAE 5B57 # <CJK>
+EDAF 5B5C # <CJK>
+EDB0 6063 # <CJK>
+EDB1 6148 # <CJK>
+EDB2 6ECB # <CJK>
+EDB3 7099 # <CJK>
+EDB4 716E # <CJK>
+EDB5 7386 # <CJK>
+EDB6 74F7 # <CJK>
+EDB7 75B5 # <CJK>
+EDB8 78C1 # <CJK>
+EDB9 7D2B # <CJK>
+EDBA 8005 # <CJK>
+EDBB 81EA # <CJK>
+EDBC 8328 # <CJK>
+EDBD 8517 # <CJK>
+EDBE 85C9 # <CJK>
+EDBF 8AEE # <CJK>
+EDC0 8CC7 # <CJK>
+EDC1 96CC # <CJK>
+EDC2 4F5C # <CJK>
+EDC3 52FA # <CJK>
+EDC4 56BC # <CJK>
+EDC5 65AB # <CJK>
+EDC6 6628 # <CJK>
+EDC7 707C # <CJK>
+EDC8 70B8 # <CJK>
+EDC9 7235 # <CJK>
+EDCA 7DBD # <CJK>
+EDCB 828D # <CJK>
+EDCC 914C # <CJK>
+EDCD 96C0 # <CJK>
+EDCE 9D72 # <CJK>
+EDCF 5B71 # <CJK>
+EDD0 68E7 # <CJK>
+EDD1 6B98 # <CJK>
+EDD2 6F7A # <CJK>
+EDD3 76DE # <CJK>
+EDD4 5C91 # <CJK>
+EDD5 66AB # <CJK>
+EDD6 6F5B # <CJK>
+EDD7 7BB4 # <CJK>
+EDD8 7C2A # <CJK>
+EDD9 8836 # <CJK>
+EDDA 96DC # <CJK>
+EDDB 4E08 # <CJK>
+EDDC 4ED7 # <CJK>
+EDDD 5320 # <CJK>
+EDDE 5834 # <CJK>
+EDDF 58BB # <CJK>
+EDE0 58EF # <CJK>
+EDE1 596C # <CJK>
+EDE2 5C07 # <CJK>
+EDE3 5E33 # <CJK>
+EDE4 5E84 # <CJK>
+EDE5 5F35 # <CJK>
+EDE6 638C # <CJK>
+EDE7 66B2 # <CJK>
+EDE8 6756 # <CJK>
+EDE9 6A1F # <CJK>
+EDEA 6AA3 # <CJK>
+EDEB 6B0C # <CJK>
+EDEC 6F3F # <CJK>
+EDED 7246 # <CJK>
+EDEE F9FA # <CJK>
+EDEF 7350 # <CJK>
+EDF0 748B # <CJK>
+EDF1 7AE0 # <CJK>
+EDF2 7CA7 # <CJK>
+EDF3 8178 # <CJK>
+EDF4 81DF # <CJK>
+EDF5 81E7 # <CJK>
+EDF6 838A # <CJK>
+EDF7 846C # <CJK>
+EDF8 8523 # <CJK>
+EDF9 8594 # <CJK>
+EDFA 85CF # <CJK>
+EDFB 88DD # <CJK>
+EDFC 8D13 # <CJK>
+EDFD 91AC # <CJK>
+EDFE 9577 # <CJK>
+EEA1 969C # <CJK>
+EEA2 518D # <CJK>
+EEA3 54C9 # <CJK>
+EEA4 5728 # <CJK>
+EEA5 5BB0 # <CJK>
+EEA6 624D # <CJK>
+EEA7 6750 # <CJK>
+EEA8 683D # <CJK>
+EEA9 6893 # <CJK>
+EEAA 6E3D # <CJK>
+EEAB 6ED3 # <CJK>
+EEAC 707D # <CJK>
+EEAD 7E21 # <CJK>
+EEAE 88C1 # <CJK>
+EEAF 8CA1 # <CJK>
+EEB0 8F09 # <CJK>
+EEB1 9F4B # <CJK>
+EEB2 9F4E # <CJK>
+EEB3 722D # <CJK>
+EEB4 7B8F # <CJK>
+EEB5 8ACD # <CJK>
+EEB6 931A # <CJK>
+EEB7 4F47 # <CJK>
+EEB8 4F4E # <CJK>
+EEB9 5132 # <CJK>
+EEBA 5480 # <CJK>
+EEBB 59D0 # <CJK>
+EEBC 5E95 # <CJK>
+EEBD 62B5 # <CJK>
+EEBE 6775 # <CJK>
+EEBF 696E # <CJK>
+EEC0 6A17 # <CJK>
+EEC1 6CAE # <CJK>
+EEC2 6E1A # <CJK>
+EEC3 72D9 # <CJK>
+EEC4 732A # <CJK>
+EEC5 75BD # <CJK>
+EEC6 7BB8 # <CJK>
+EEC7 7D35 # <CJK>
+EEC8 82E7 # <CJK>
+EEC9 83F9 # <CJK>
+EECA 8457 # <CJK>
+EECB 85F7 # <CJK>
+EECC 8A5B # <CJK>
+EECD 8CAF # <CJK>
+EECE 8E87 # <CJK>
+EECF 9019 # <CJK>
+EED0 90B8 # <CJK>
+EED1 96CE # <CJK>
+EED2 9F5F # <CJK>
+EED3 52E3 # <CJK>
+EED4 540A # <CJK>
+EED5 5AE1 # <CJK>
+EED6 5BC2 # <CJK>
+EED7 6458 # <CJK>
+EED8 6575 # <CJK>
+EED9 6EF4 # <CJK>
+EEDA 72C4 # <CJK>
+EEDB F9FB # <CJK>
+EEDC 7684 # <CJK>
+EEDD 7A4D # <CJK>
+EEDE 7B1B # <CJK>
+EEDF 7C4D # <CJK>
+EEE0 7E3E # <CJK>
+EEE1 7FDF # <CJK>
+EEE2 837B # <CJK>
+EEE3 8B2B # <CJK>
+EEE4 8CCA # <CJK>
+EEE5 8D64 # <CJK>
+EEE6 8DE1 # <CJK>
+EEE7 8E5F # <CJK>
+EEE8 8FEA # <CJK>
+EEE9 8FF9 # <CJK>
+EEEA 9069 # <CJK>
+EEEB 93D1 # <CJK>
+EEEC 4F43 # <CJK>
+EEED 4F7A # <CJK>
+EEEE 50B3 # <CJK>
+EEEF 5168 # <CJK>
+EEF0 5178 # <CJK>
+EEF1 524D # <CJK>
+EEF2 526A # <CJK>
+EEF3 5861 # <CJK>
+EEF4 587C # <CJK>
+EEF5 5960 # <CJK>
+EEF6 5C08 # <CJK>
+EEF7 5C55 # <CJK>
+EEF8 5EDB # <CJK>
+EEF9 609B # <CJK>
+EEFA 6230 # <CJK>
+EEFB 6813 # <CJK>
+EEFC 6BBF # <CJK>
+EEFD 6C08 # <CJK>
+EEFE 6FB1 # <CJK>
+EFA1 714E # <CJK>
+EFA2 7420 # <CJK>
+EFA3 7530 # <CJK>
+EFA4 7538 # <CJK>
+EFA5 7551 # <CJK>
+EFA6 7672 # <CJK>
+EFA7 7B4C # <CJK>
+EFA8 7B8B # <CJK>
+EFA9 7BAD # <CJK>
+EFAA 7BC6 # <CJK>
+EFAB 7E8F # <CJK>
+EFAC 8A6E # <CJK>
+EFAD 8F3E # <CJK>
+EFAE 8F49 # <CJK>
+EFAF 923F # <CJK>
+EFB0 9293 # <CJK>
+EFB1 9322 # <CJK>
+EFB2 942B # <CJK>
+EFB3 96FB # <CJK>
+EFB4 985A # <CJK>
+EFB5 986B # <CJK>
+EFB6 991E # <CJK>
+EFB7 5207 # <CJK>
+EFB8 622A # <CJK>
+EFB9 6298 # <CJK>
+EFBA 6D59 # <CJK>
+EFBB 7664 # <CJK>
+EFBC 7ACA # <CJK>
+EFBD 7BC0 # <CJK>
+EFBE 7D76 # <CJK>
+EFBF 5360 # <CJK>
+EFC0 5CBE # <CJK>
+EFC1 5E97 # <CJK>
+EFC2 6F38 # <CJK>
+EFC3 70B9 # <CJK>
+EFC4 7C98 # <CJK>
+EFC5 9711 # <CJK>
+EFC6 9B8E # <CJK>
+EFC7 9EDE # <CJK>
+EFC8 63A5 # <CJK>
+EFC9 647A # <CJK>
+EFCA 8776 # <CJK>
+EFCB 4E01 # <CJK>
+EFCC 4E95 # <CJK>
+EFCD 4EAD # <CJK>
+EFCE 505C # <CJK>
+EFCF 5075 # <CJK>
+EFD0 5448 # <CJK>
+EFD1 59C3 # <CJK>
+EFD2 5B9A # <CJK>
+EFD3 5E40 # <CJK>
+EFD4 5EAD # <CJK>
+EFD5 5EF7 # <CJK>
+EFD6 5F81 # <CJK>
+EFD7 60C5 # <CJK>
+EFD8 633A # <CJK>
+EFD9 653F # <CJK>
+EFDA 6574 # <CJK>
+EFDB 65CC # <CJK>
+EFDC 6676 # <CJK>
+EFDD 6678 # <CJK>
+EFDE 67FE # <CJK>
+EFDF 6968 # <CJK>
+EFE0 6A89 # <CJK>
+EFE1 6B63 # <CJK>
+EFE2 6C40 # <CJK>
+EFE3 6DC0 # <CJK>
+EFE4 6DE8 # <CJK>
+EFE5 6E1F # <CJK>
+EFE6 6E5E # <CJK>
+EFE7 701E # <CJK>
+EFE8 70A1 # <CJK>
+EFE9 738E # <CJK>
+EFEA 73FD # <CJK>
+EFEB 753A # <CJK>
+EFEC 775B # <CJK>
+EFED 7887 # <CJK>
+EFEE 798E # <CJK>
+EFEF 7A0B # <CJK>
+EFF0 7A7D # <CJK>
+EFF1 7CBE # <CJK>
+EFF2 7D8E # <CJK>
+EFF3 8247 # <CJK>
+EFF4 8A02 # <CJK>
+EFF5 8AEA # <CJK>
+EFF6 8C9E # <CJK>
+EFF7 912D # <CJK>
+EFF8 914A # <CJK>
+EFF9 91D8 # <CJK>
+EFFA 9266 # <CJK>
+EFFB 92CC # <CJK>
+EFFC 9320 # <CJK>
+EFFD 9706 # <CJK>
+EFFE 9756 # <CJK>
+F0A1 975C # <CJK>
+F0A2 9802 # <CJK>
+F0A3 9F0E # <CJK>
+F0A4 5236 # <CJK>
+F0A5 5291 # <CJK>
+F0A6 557C # <CJK>
+F0A7 5824 # <CJK>
+F0A8 5E1D # <CJK>
+F0A9 5F1F # <CJK>
+F0AA 608C # <CJK>
+F0AB 63D0 # <CJK>
+F0AC 68AF # <CJK>
+F0AD 6FDF # <CJK>
+F0AE 796D # <CJK>
+F0AF 7B2C # <CJK>
+F0B0 81CD # <CJK>
+F0B1 85BA # <CJK>
+F0B2 88FD # <CJK>
+F0B3 8AF8 # <CJK>
+F0B4 8E44 # <CJK>
+F0B5 918D # <CJK>
+F0B6 9664 # <CJK>
+F0B7 969B # <CJK>
+F0B8 973D # <CJK>
+F0B9 984C # <CJK>
+F0BA 9F4A # <CJK>
+F0BB 4FCE # <CJK>
+F0BC 5146 # <CJK>
+F0BD 51CB # <CJK>
+F0BE 52A9 # <CJK>
+F0BF 5632 # <CJK>
+F0C0 5F14 # <CJK>
+F0C1 5F6B # <CJK>
+F0C2 63AA # <CJK>
+F0C3 64CD # <CJK>
+F0C4 65E9 # <CJK>
+F0C5 6641 # <CJK>
+F0C6 66FA # <CJK>
+F0C7 66F9 # <CJK>
+F0C8 671D # <CJK>
+F0C9 689D # <CJK>
+F0CA 68D7 # <CJK>
+F0CB 69FD # <CJK>
+F0CC 6F15 # <CJK>
+F0CD 6F6E # <CJK>
+F0CE 7167 # <CJK>
+F0CF 71E5 # <CJK>
+F0D0 722A # <CJK>
+F0D1 74AA # <CJK>
+F0D2 773A # <CJK>
+F0D3 7956 # <CJK>
+F0D4 795A # <CJK>
+F0D5 79DF # <CJK>
+F0D6 7A20 # <CJK>
+F0D7 7A95 # <CJK>
+F0D8 7C97 # <CJK>
+F0D9 7CDF # <CJK>
+F0DA 7D44 # <CJK>
+F0DB 7E70 # <CJK>
+F0DC 8087 # <CJK>
+F0DD 85FB # <CJK>
+F0DE 86A4 # <CJK>
+F0DF 8A54 # <CJK>
+F0E0 8ABF # <CJK>
+F0E1 8D99 # <CJK>
+F0E2 8E81 # <CJK>
+F0E3 9020 # <CJK>
+F0E4 906D # <CJK>
+F0E5 91E3 # <CJK>
+F0E6 963B # <CJK>
+F0E7 96D5 # <CJK>
+F0E8 9CE5 # <CJK>
+F0E9 65CF # <CJK>
+F0EA 7C07 # <CJK>
+F0EB 8DB3 # <CJK>
+F0EC 93C3 # <CJK>
+F0ED 5B58 # <CJK>
+F0EE 5C0A # <CJK>
+F0EF 5352 # <CJK>
+F0F0 62D9 # <CJK>
+F0F1 731D # <CJK>
+F0F2 5027 # <CJK>
+F0F3 5B97 # <CJK>
+F0F4 5F9E # <CJK>
+F0F5 60B0 # <CJK>
+F0F6 616B # <CJK>
+F0F7 68D5 # <CJK>
+F0F8 6DD9 # <CJK>
+F0F9 742E # <CJK>
+F0FA 7A2E # <CJK>
+F0FB 7D42 # <CJK>
+F0FC 7D9C # <CJK>
+F0FD 7E31 # <CJK>
+F0FE 816B # <CJK>
+F1A1 8E2A # <CJK>
+F1A2 8E35 # <CJK>
+F1A3 937E # <CJK>
+F1A4 9418 # <CJK>
+F1A5 4F50 # <CJK>
+F1A6 5750 # <CJK>
+F1A7 5DE6 # <CJK>
+F1A8 5EA7 # <CJK>
+F1A9 632B # <CJK>
+F1AA 7F6A # <CJK>
+F1AB 4E3B # <CJK>
+F1AC 4F4F # <CJK>
+F1AD 4F8F # <CJK>
+F1AE 505A # <CJK>
+F1AF 59DD # <CJK>
+F1B0 80C4 # <CJK>
+F1B1 546A # <CJK>
+F1B2 5468 # <CJK>
+F1B3 55FE # <CJK>
+F1B4 594F # <CJK>
+F1B5 5B99 # <CJK>
+F1B6 5DDE # <CJK>
+F1B7 5EDA # <CJK>
+F1B8 665D # <CJK>
+F1B9 6731 # <CJK>
+F1BA 67F1 # <CJK>
+F1BB 682A # <CJK>
+F1BC 6CE8 # <CJK>
+F1BD 6D32 # <CJK>
+F1BE 6E4A # <CJK>
+F1BF 6F8D # <CJK>
+F1C0 70B7 # <CJK>
+F1C1 73E0 # <CJK>
+F1C2 7587 # <CJK>
+F1C3 7C4C # <CJK>
+F1C4 7D02 # <CJK>
+F1C5 7D2C # <CJK>
+F1C6 7DA2 # <CJK>
+F1C7 821F # <CJK>
+F1C8 86DB # <CJK>
+F1C9 8A3B # <CJK>
+F1CA 8A85 # <CJK>
+F1CB 8D70 # <CJK>
+F1CC 8E8A # <CJK>
+F1CD 8F33 # <CJK>
+F1CE 9031 # <CJK>
+F1CF 914E # <CJK>
+F1D0 9152 # <CJK>
+F1D1 9444 # <CJK>
+F1D2 99D0 # <CJK>
+F1D3 7AF9 # <CJK>
+F1D4 7CA5 # <CJK>
+F1D5 4FCA # <CJK>
+F1D6 5101 # <CJK>
+F1D7 51C6 # <CJK>
+F1D8 57C8 # <CJK>
+F1D9 5BEF # <CJK>
+F1DA 5CFB # <CJK>
+F1DB 6659 # <CJK>
+F1DC 6A3D # <CJK>
+F1DD 6D5A # <CJK>
+F1DE 6E96 # <CJK>
+F1DF 6FEC # <CJK>
+F1E0 710C # <CJK>
+F1E1 756F # <CJK>
+F1E2 7AE3 # <CJK>
+F1E3 8822 # <CJK>
+F1E4 9021 # <CJK>
+F1E5 9075 # <CJK>
+F1E6 96CB # <CJK>
+F1E7 99FF # <CJK>
+F1E8 8301 # <CJK>
+F1E9 4E2D # <CJK>
+F1EA 4EF2 # <CJK>
+F1EB 8846 # <CJK>
+F1EC 91CD # <CJK>
+F1ED 537D # <CJK>
+F1EE 6ADB # <CJK>
+F1EF 696B # <CJK>
+F1F0 6C41 # <CJK>
+F1F1 847A # <CJK>
+F1F2 589E # <CJK>
+F1F3 618E # <CJK>
+F1F4 66FE # <CJK>
+F1F5 62EF # <CJK>
+F1F6 70DD # <CJK>
+F1F7 7511 # <CJK>
+F1F8 75C7 # <CJK>
+F1F9 7E52 # <CJK>
+F1FA 84B8 # <CJK>
+F1FB 8B49 # <CJK>
+F1FC 8D08 # <CJK>
+F1FD 4E4B # <CJK>
+F1FE 53EA # <CJK>
+F2A1 54AB # <CJK>
+F2A2 5730 # <CJK>
+F2A3 5740 # <CJK>
+F2A4 5FD7 # <CJK>
+F2A5 6301 # <CJK>
+F2A6 6307 # <CJK>
+F2A7 646F # <CJK>
+F2A8 652F # <CJK>
+F2A9 65E8 # <CJK>
+F2AA 667A # <CJK>
+F2AB 679D # <CJK>
+F2AC 67B3 # <CJK>
+F2AD 6B62 # <CJK>
+F2AE 6C60 # <CJK>
+F2AF 6C9A # <CJK>
+F2B0 6F2C # <CJK>
+F2B1 77E5 # <CJK>
+F2B2 7825 # <CJK>
+F2B3 7949 # <CJK>
+F2B4 7957 # <CJK>
+F2B5 7D19 # <CJK>
+F2B6 80A2 # <CJK>
+F2B7 8102 # <CJK>
+F2B8 81F3 # <CJK>
+F2B9 829D # <CJK>
+F2BA 82B7 # <CJK>
+F2BB 8718 # <CJK>
+F2BC 8A8C # <CJK>
+F2BD F9FC # <CJK>
+F2BE 8D04 # <CJK>
+F2BF 8DBE # <CJK>
+F2C0 9072 # <CJK>
+F2C1 76F4 # <CJK>
+F2C2 7A19 # <CJK>
+F2C3 7A37 # <CJK>
+F2C4 7E54 # <CJK>
+F2C5 8077 # <CJK>
+F2C6 5507 # <CJK>
+F2C7 55D4 # <CJK>
+F2C8 5875 # <CJK>
+F2C9 632F # <CJK>
+F2CA 6422 # <CJK>
+F2CB 6649 # <CJK>
+F2CC 664B # <CJK>
+F2CD 686D # <CJK>
+F2CE 699B # <CJK>
+F2CF 6B84 # <CJK>
+F2D0 6D25 # <CJK>
+F2D1 6EB1 # <CJK>
+F2D2 73CD # <CJK>
+F2D3 7468 # <CJK>
+F2D4 74A1 # <CJK>
+F2D5 755B # <CJK>
+F2D6 75B9 # <CJK>
+F2D7 76E1 # <CJK>
+F2D8 771E # <CJK>
+F2D9 778B # <CJK>
+F2DA 79E6 # <CJK>
+F2DB 7E09 # <CJK>
+F2DC 7E1D # <CJK>
+F2DD 81FB # <CJK>
+F2DE 852F # <CJK>
+F2DF 8897 # <CJK>
+F2E0 8A3A # <CJK>
+F2E1 8CD1 # <CJK>
+F2E2 8EEB # <CJK>
+F2E3 8FB0 # <CJK>
+F2E4 9032 # <CJK>
+F2E5 93AD # <CJK>
+F2E6 9663 # <CJK>
+F2E7 9673 # <CJK>
+F2E8 9707 # <CJK>
+F2E9 4F84 # <CJK>
+F2EA 53F1 # <CJK>
+F2EB 59EA # <CJK>
+F2EC 5AC9 # <CJK>
+F2ED 5E19 # <CJK>
+F2EE 684E # <CJK>
+F2EF 74C6 # <CJK>
+F2F0 75BE # <CJK>
+F2F1 79E9 # <CJK>
+F2F2 7A92 # <CJK>
+F2F3 81A3 # <CJK>
+F2F4 86ED # <CJK>
+F2F5 8CEA # <CJK>
+F2F6 8DCC # <CJK>
+F2F7 8FED # <CJK>
+F2F8 659F # <CJK>
+F2F9 6715 # <CJK>
+F2FA F9FD # <CJK>
+F2FB 57F7 # <CJK>
+F2FC 6F57 # <CJK>
+F2FD 7DDD # <CJK>
+F2FE 8F2F # <CJK>
+F3A1 93F6 # <CJK>
+F3A2 96C6 # <CJK>
+F3A3 5FB5 # <CJK>
+F3A4 61F2 # <CJK>
+F3A5 6F84 # <CJK>
+F3A6 4E14 # <CJK>
+F3A7 4F98 # <CJK>
+F3A8 501F # <CJK>
+F3A9 53C9 # <CJK>
+F3AA 55DF # <CJK>
+F3AB 5D6F # <CJK>
+F3AC 5DEE # <CJK>
+F3AD 6B21 # <CJK>
+F3AE 6B64 # <CJK>
+F3AF 78CB # <CJK>
+F3B0 7B9A # <CJK>
+F3B1 F9FE # <CJK>
+F3B2 8E49 # <CJK>
+F3B3 8ECA # <CJK>
+F3B4 906E # <CJK>
+F3B5 6349 # <CJK>
+F3B6 643E # <CJK>
+F3B7 7740 # <CJK>
+F3B8 7A84 # <CJK>
+F3B9 932F # <CJK>
+F3BA 947F # <CJK>
+F3BB 9F6A # <CJK>
+F3BC 64B0 # <CJK>
+F3BD 6FAF # <CJK>
+F3BE 71E6 # <CJK>
+F3BF 74A8 # <CJK>
+F3C0 74DA # <CJK>
+F3C1 7AC4 # <CJK>
+F3C2 7C12 # <CJK>
+F3C3 7E82 # <CJK>
+F3C4 7CB2 # <CJK>
+F3C5 7E98 # <CJK>
+F3C6 8B9A # <CJK>
+F3C7 8D0A # <CJK>
+F3C8 947D # <CJK>
+F3C9 9910 # <CJK>
+F3CA 994C # <CJK>
+F3CB 5239 # <CJK>
+F3CC 5BDF # <CJK>
+F3CD 64E6 # <CJK>
+F3CE 672D # <CJK>
+F3CF 7D2E # <CJK>
+F3D0 50ED # <CJK>
+F3D1 53C3 # <CJK>
+F3D2 5879 # <CJK>
+F3D3 6158 # <CJK>
+F3D4 6159 # <CJK>
+F3D5 61FA # <CJK>
+F3D6 65AC # <CJK>
+F3D7 7AD9 # <CJK>
+F3D8 8B92 # <CJK>
+F3D9 8B96 # <CJK>
+F3DA 5009 # <CJK>
+F3DB 5021 # <CJK>
+F3DC 5275 # <CJK>
+F3DD 5531 # <CJK>
+F3DE 5A3C # <CJK>
+F3DF 5EE0 # <CJK>
+F3E0 5F70 # <CJK>
+F3E1 6134 # <CJK>
+F3E2 655E # <CJK>
+F3E3 660C # <CJK>
+F3E4 6636 # <CJK>
+F3E5 66A2 # <CJK>
+F3E6 69CD # <CJK>
+F3E7 6EC4 # <CJK>
+F3E8 6F32 # <CJK>
+F3E9 7316 # <CJK>
+F3EA 7621 # <CJK>
+F3EB 7A93 # <CJK>
+F3EC 8139 # <CJK>
+F3ED 8259 # <CJK>
+F3EE 83D6 # <CJK>
+F3EF 84BC # <CJK>
+F3F0 50B5 # <CJK>
+F3F1 57F0 # <CJK>
+F3F2 5BC0 # <CJK>
+F3F3 5BE8 # <CJK>
+F3F4 5F69 # <CJK>
+F3F5 63A1 # <CJK>
+F3F6 7826 # <CJK>
+F3F7 7DB5 # <CJK>
+F3F8 83DC # <CJK>
+F3F9 8521 # <CJK>
+F3FA 91C7 # <CJK>
+F3FB 91F5 # <CJK>
+F3FC 518A # <CJK>
+F3FD 67F5 # <CJK>
+F3FE 7B56 # <CJK>
+F4A1 8CAC # <CJK>
+F4A2 51C4 # <CJK>
+F4A3 59BB # <CJK>
+F4A4 60BD # <CJK>
+F4A5 8655 # <CJK>
+F4A6 501C # <CJK>
+F4A7 F9FF # <CJK>
+F4A8 5254 # <CJK>
+F4A9 5C3A # <CJK>
+F4AA 617D # <CJK>
+F4AB 621A # <CJK>
+F4AC 62D3 # <CJK>
+F4AD 64F2 # <CJK>
+F4AE 65A5 # <CJK>
+F4AF 6ECC # <CJK>
+F4B0 7620 # <CJK>
+F4B1 810A # <CJK>
+F4B2 8E60 # <CJK>
+F4B3 965F # <CJK>
+F4B4 96BB # <CJK>
+F4B5 4EDF # <CJK>
+F4B6 5343 # <CJK>
+F4B7 5598 # <CJK>
+F4B8 5929 # <CJK>
+F4B9 5DDD # <CJK>
+F4BA 64C5 # <CJK>
+F4BB 6CC9 # <CJK>
+F4BC 6DFA # <CJK>
+F4BD 7394 # <CJK>
+F4BE 7A7F # <CJK>
+F4BF 821B # <CJK>
+F4C0 85A6 # <CJK>
+F4C1 8CE4 # <CJK>
+F4C2 8E10 # <CJK>
+F4C3 9077 # <CJK>
+F4C4 91E7 # <CJK>
+F4C5 95E1 # <CJK>
+F4C6 9621 # <CJK>
+F4C7 97C6 # <CJK>
+F4C8 51F8 # <CJK>
+F4C9 54F2 # <CJK>
+F4CA 5586 # <CJK>
+F4CB 5FB9 # <CJK>
+F4CC 64A4 # <CJK>
+F4CD 6F88 # <CJK>
+F4CE 7DB4 # <CJK>
+F4CF 8F1F # <CJK>
+F4D0 8F4D # <CJK>
+F4D1 9435 # <CJK>
+F4D2 50C9 # <CJK>
+F4D3 5C16 # <CJK>
+F4D4 6CBE # <CJK>
+F4D5 6DFB # <CJK>
+F4D6 751B # <CJK>
+F4D7 77BB # <CJK>
+F4D8 7C3D # <CJK>
+F4D9 7C64 # <CJK>
+F4DA 8A79 # <CJK>
+F4DB 8AC2 # <CJK>
+F4DC 581E # <CJK>
+F4DD 59BE # <CJK>
+F4DE 5E16 # <CJK>
+F4DF 6377 # <CJK>
+F4E0 7252 # <CJK>
+F4E1 758A # <CJK>
+F4E2 776B # <CJK>
+F4E3 8ADC # <CJK>
+F4E4 8CBC # <CJK>
+F4E5 8F12 # <CJK>
+F4E6 5EF3 # <CJK>
+F4E7 6674 # <CJK>
+F4E8 6DF8 # <CJK>
+F4E9 807D # <CJK>
+F4EA 83C1 # <CJK>
+F4EB 8ACB # <CJK>
+F4EC 9751 # <CJK>
+F4ED 9BD6 # <CJK>
+F4EE FA00 # <CJK>
+F4EF 5243 # <CJK>
+F4F0 66FF # <CJK>
+F4F1 6D95 # <CJK>
+F4F2 6EEF # <CJK>
+F4F3 7DE0 # <CJK>
+F4F4 8AE6 # <CJK>
+F4F5 902E # <CJK>
+F4F6 905E # <CJK>
+F4F7 9AD4 # <CJK>
+F4F8 521D # <CJK>
+F4F9 527F # <CJK>
+F4FA 54E8 # <CJK>
+F4FB 6194 # <CJK>
+F4FC 6284 # <CJK>
+F4FD 62DB # <CJK>
+F4FE 68A2 # <CJK>
+F5A1 6912 # <CJK>
+F5A2 695A # <CJK>
+F5A3 6A35 # <CJK>
+F5A4 7092 # <CJK>
+F5A5 7126 # <CJK>
+F5A6 785D # <CJK>
+F5A7 7901 # <CJK>
+F5A8 790E # <CJK>
+F5A9 79D2 # <CJK>
+F5AA 7A0D # <CJK>
+F5AB 8096 # <CJK>
+F5AC 8278 # <CJK>
+F5AD 82D5 # <CJK>
+F5AE 8349 # <CJK>
+F5AF 8549 # <CJK>
+F5B0 8C82 # <CJK>
+F5B1 8D85 # <CJK>
+F5B2 9162 # <CJK>
+F5B3 918B # <CJK>
+F5B4 91AE # <CJK>
+F5B5 4FC3 # <CJK>
+F5B6 56D1 # <CJK>
+F5B7 71ED # <CJK>
+F5B8 77D7 # <CJK>
+F5B9 8700 # <CJK>
+F5BA 89F8 # <CJK>
+F5BB 5BF8 # <CJK>
+F5BC 5FD6 # <CJK>
+F5BD 6751 # <CJK>
+F5BE 90A8 # <CJK>
+F5BF 53E2 # <CJK>
+F5C0 585A # <CJK>
+F5C1 5BF5 # <CJK>
+F5C2 60A4 # <CJK>
+F5C3 6181 # <CJK>
+F5C4 6460 # <CJK>
+F5C5 7E3D # <CJK>
+F5C6 8070 # <CJK>
+F5C7 8525 # <CJK>
+F5C8 9283 # <CJK>
+F5C9 64AE # <CJK>
+F5CA 50AC # <CJK>
+F5CB 5D14 # <CJK>
+F5CC 6700 # <CJK>
+F5CD 589C # <CJK>
+F5CE 62BD # <CJK>
+F5CF 63A8 # <CJK>
+F5D0 690E # <CJK>
+F5D1 6978 # <CJK>
+F5D2 6A1E # <CJK>
+F5D3 6E6B # <CJK>
+F5D4 76BA # <CJK>
+F5D5 79CB # <CJK>
+F5D6 82BB # <CJK>
+F5D7 8429 # <CJK>
+F5D8 8ACF # <CJK>
+F5D9 8DA8 # <CJK>
+F5DA 8FFD # <CJK>
+F5DB 9112 # <CJK>
+F5DC 914B # <CJK>
+F5DD 919C # <CJK>
+F5DE 9310 # <CJK>
+F5DF 9318 # <CJK>
+F5E0 939A # <CJK>
+F5E1 96DB # <CJK>
+F5E2 9A36 # <CJK>
+F5E3 9C0D # <CJK>
+F5E4 4E11 # <CJK>
+F5E5 755C # <CJK>
+F5E6 795D # <CJK>
+F5E7 7AFA # <CJK>
+F5E8 7B51 # <CJK>
+F5E9 7BC9 # <CJK>
+F5EA 7E2E # <CJK>
+F5EB 84C4 # <CJK>
+F5EC 8E59 # <CJK>
+F5ED 8E74 # <CJK>
+F5EE 8EF8 # <CJK>
+F5EF 9010 # <CJK>
+F5F0 6625 # <CJK>
+F5F1 693F # <CJK>
+F5F2 7443 # <CJK>
+F5F3 51FA # <CJK>
+F5F4 672E # <CJK>
+F5F5 9EDC # <CJK>
+F5F6 5145 # <CJK>
+F5F7 5FE0 # <CJK>
+F5F8 6C96 # <CJK>
+F5F9 87F2 # <CJK>
+F5FA 885D # <CJK>
+F5FB 8877 # <CJK>
+F5FC 60B4 # <CJK>
+F5FD 81B5 # <CJK>
+F5FE 8403 # <CJK>
+F6A1 8D05 # <CJK>
+F6A2 53D6 # <CJK>
+F6A3 5439 # <CJK>
+F6A4 5634 # <CJK>
+F6A5 5A36 # <CJK>
+F6A6 5C31 # <CJK>
+F6A7 708A # <CJK>
+F6A8 7FE0 # <CJK>
+F6A9 805A # <CJK>
+F6AA 8106 # <CJK>
+F6AB 81ED # <CJK>
+F6AC 8DA3 # <CJK>
+F6AD 9189 # <CJK>
+F6AE 9A5F # <CJK>
+F6AF 9DF2 # <CJK>
+F6B0 5074 # <CJK>
+F6B1 4EC4 # <CJK>
+F6B2 53A0 # <CJK>
+F6B3 60FB # <CJK>
+F6B4 6E2C # <CJK>
+F6B5 5C64 # <CJK>
+F6B6 4F88 # <CJK>
+F6B7 5024 # <CJK>
+F6B8 55E4 # <CJK>
+F6B9 5CD9 # <CJK>
+F6BA 5E5F # <CJK>
+F6BB 6065 # <CJK>
+F6BC 6894 # <CJK>
+F6BD 6CBB # <CJK>
+F6BE 6DC4 # <CJK>
+F6BF 71BE # <CJK>
+F6C0 75D4 # <CJK>
+F6C1 75F4 # <CJK>
+F6C2 7661 # <CJK>
+F6C3 7A1A # <CJK>
+F6C4 7A49 # <CJK>
+F6C5 7DC7 # <CJK>
+F6C6 7DFB # <CJK>
+F6C7 7F6E # <CJK>
+F6C8 81F4 # <CJK>
+F6C9 86A9 # <CJK>
+F6CA 8F1C # <CJK>
+F6CB 96C9 # <CJK>
+F6CC 99B3 # <CJK>
+F6CD 9F52 # <CJK>
+F6CE 5247 # <CJK>
+F6CF 52C5 # <CJK>
+F6D0 98ED # <CJK>
+F6D1 89AA # <CJK>
+F6D2 4E03 # <CJK>
+F6D3 67D2 # <CJK>
+F6D4 6F06 # <CJK>
+F6D5 4FB5 # <CJK>
+F6D6 5BE2 # <CJK>
+F6D7 6795 # <CJK>
+F6D8 6C88 # <CJK>
+F6D9 6D78 # <CJK>
+F6DA 741B # <CJK>
+F6DB 7827 # <CJK>
+F6DC 91DD # <CJK>
+F6DD 937C # <CJK>
+F6DE 87C4 # <CJK>
+F6DF 79E4 # <CJK>
+F6E0 7A31 # <CJK>
+F6E1 5FEB # <CJK>
+F6E2 4ED6 # <CJK>
+F6E3 54A4 # <CJK>
+F6E4 553E # <CJK>
+F6E5 58AE # <CJK>
+F6E6 59A5 # <CJK>
+F6E7 60F0 # <CJK>
+F6E8 6253 # <CJK>
+F6E9 62D6 # <CJK>
+F6EA 6736 # <CJK>
+F6EB 6955 # <CJK>
+F6EC 8235 # <CJK>
+F6ED 9640 # <CJK>
+F6EE 99B1 # <CJK>
+F6EF 99DD # <CJK>
+F6F0 502C # <CJK>
+F6F1 5353 # <CJK>
+F6F2 5544 # <CJK>
+F6F3 577C # <CJK>
+F6F4 FA01 # <CJK>
+F6F5 6258 # <CJK>
+F6F6 FA02 # <CJK>
+F6F7 64E2 # <CJK>
+F6F8 666B # <CJK>
+F6F9 67DD # <CJK>
+F6FA 6FC1 # <CJK>
+F6FB 6FEF # <CJK>
+F6FC 7422 # <CJK>
+F6FD 7438 # <CJK>
+F6FE 8A17 # <CJK>
+F7A1 9438 # <CJK>
+F7A2 5451 # <CJK>
+F7A3 5606 # <CJK>
+F7A4 5766 # <CJK>
+F7A5 5F48 # <CJK>
+F7A6 619A # <CJK>
+F7A7 6B4E # <CJK>
+F7A8 7058 # <CJK>
+F7A9 70AD # <CJK>
+F7AA 7DBB # <CJK>
+F7AB 8A95 # <CJK>
+F7AC 596A # <CJK>
+F7AD 812B # <CJK>
+F7AE 63A2 # <CJK>
+F7AF 7708 # <CJK>
+F7B0 803D # <CJK>
+F7B1 8CAA # <CJK>
+F7B2 5854 # <CJK>
+F7B3 642D # <CJK>
+F7B4 69BB # <CJK>
+F7B5 5B95 # <CJK>
+F7B6 5E11 # <CJK>
+F7B7 6E6F # <CJK>
+F7B8 FA03 # <CJK>
+F7B9 8569 # <CJK>
+F7BA 514C # <CJK>
+F7BB 53F0 # <CJK>
+F7BC 592A # <CJK>
+F7BD 6020 # <CJK>
+F7BE 614B # <CJK>
+F7BF 6B86 # <CJK>
+F7C0 6C70 # <CJK>
+F7C1 6CF0 # <CJK>
+F7C2 7B1E # <CJK>
+F7C3 80CE # <CJK>
+F7C4 82D4 # <CJK>
+F7C5 8DC6 # <CJK>
+F7C6 90B0 # <CJK>
+F7C7 98B1 # <CJK>
+F7C8 FA04 # <CJK>
+F7C9 64C7 # <CJK>
+F7CA 6FA4 # <CJK>
+F7CB 6491 # <CJK>
+F7CC 6504 # <CJK>
+F7CD 514E # <CJK>
+F7CE 5410 # <CJK>
+F7CF 571F # <CJK>
+F7D0 8A0E # <CJK>
+F7D1 615F # <CJK>
+F7D2 6876 # <CJK>
+F7D3 FA05 # <CJK>
+F7D4 75DB # <CJK>
+F7D5 7B52 # <CJK>
+F7D6 7D71 # <CJK>
+F7D7 901A # <CJK>
+F7D8 5806 # <CJK>
+F7D9 69CC # <CJK>
+F7DA 817F # <CJK>
+F7DB 892A # <CJK>
+F7DC 9000 # <CJK>
+F7DD 9839 # <CJK>
+F7DE 5078 # <CJK>
+F7DF 5957 # <CJK>
+F7E0 59AC # <CJK>
+F7E1 6295 # <CJK>
+F7E2 900F # <CJK>
+F7E3 9B2A # <CJK>
+F7E4 615D # <CJK>
+F7E5 7279 # <CJK>
+F7E6 95D6 # <CJK>
+F7E7 5761 # <CJK>
+F7E8 5A46 # <CJK>
+F7E9 5DF4 # <CJK>
+F7EA 628A # <CJK>
+F7EB 64AD # <CJK>
+F7EC 64FA # <CJK>
+F7ED 6777 # <CJK>
+F7EE 6CE2 # <CJK>
+F7EF 6D3E # <CJK>
+F7F0 722C # <CJK>
+F7F1 7436 # <CJK>
+F7F2 7834 # <CJK>
+F7F3 7F77 # <CJK>
+F7F4 82AD # <CJK>
+F7F5 8DDB # <CJK>
+F7F6 9817 # <CJK>
+F7F7 5224 # <CJK>
+F7F8 5742 # <CJK>
+F7F9 677F # <CJK>
+F7FA 7248 # <CJK>
+F7FB 74E3 # <CJK>
+F7FC 8CA9 # <CJK>
+F7FD 8FA6 # <CJK>
+F7FE 9211 # <CJK>
+F8A1 962A # <CJK>
+F8A2 516B # <CJK>
+F8A3 53ED # <CJK>
+F8A4 634C # <CJK>
+F8A5 4F69 # <CJK>
+F8A6 5504 # <CJK>
+F8A7 6096 # <CJK>
+F8A8 6557 # <CJK>
+F8A9 6C9B # <CJK>
+F8AA 6D7F # <CJK>
+F8AB 724C # <CJK>
+F8AC 72FD # <CJK>
+F8AD 7A17 # <CJK>
+F8AE 8987 # <CJK>
+F8AF 8C9D # <CJK>
+F8B0 5F6D # <CJK>
+F8B1 6F8E # <CJK>
+F8B2 70F9 # <CJK>
+F8B3 81A8 # <CJK>
+F8B4 610E # <CJK>
+F8B5 4FBF # <CJK>
+F8B6 504F # <CJK>
+F8B7 6241 # <CJK>
+F8B8 7247 # <CJK>
+F8B9 7BC7 # <CJK>
+F8BA 7DE8 # <CJK>
+F8BB 7FE9 # <CJK>
+F8BC 904D # <CJK>
+F8BD 97AD # <CJK>
+F8BE 9A19 # <CJK>
+F8BF 8CB6 # <CJK>
+F8C0 576A # <CJK>
+F8C1 5E73 # <CJK>
+F8C2 67B0 # <CJK>
+F8C3 840D # <CJK>
+F8C4 8A55 # <CJK>
+F8C5 5420 # <CJK>
+F8C6 5B16 # <CJK>
+F8C7 5E63 # <CJK>
+F8C8 5EE2 # <CJK>
+F8C9 5F0A # <CJK>
+F8CA 6583 # <CJK>
+F8CB 80BA # <CJK>
+F8CC 853D # <CJK>
+F8CD 9589 # <CJK>
+F8CE 965B # <CJK>
+F8CF 4F48 # <CJK>
+F8D0 5305 # <CJK>
+F8D1 530D # <CJK>
+F8D2 530F # <CJK>
+F8D3 5486 # <CJK>
+F8D4 54FA # <CJK>
+F8D5 5703 # <CJK>
+F8D6 5E03 # <CJK>
+F8D7 6016 # <CJK>
+F8D8 629B # <CJK>
+F8D9 62B1 # <CJK>
+F8DA 6355 # <CJK>
+F8DB FA06 # <CJK>
+F8DC 6CE1 # <CJK>
+F8DD 6D66 # <CJK>
+F8DE 75B1 # <CJK>
+F8DF 7832 # <CJK>
+F8E0 80DE # <CJK>
+F8E1 812F # <CJK>
+F8E2 82DE # <CJK>
+F8E3 8461 # <CJK>
+F8E4 84B2 # <CJK>
+F8E5 888D # <CJK>
+F8E6 8912 # <CJK>
+F8E7 900B # <CJK>
+F8E8 92EA # <CJK>
+F8E9 98FD # <CJK>
+F8EA 9B91 # <CJK>
+F8EB 5E45 # <CJK>
+F8EC 66B4 # <CJK>
+F8ED 66DD # <CJK>
+F8EE 7011 # <CJK>
+F8EF 7206 # <CJK>
+F8F0 FA07 # <CJK>
+F8F1 4FF5 # <CJK>
+F8F2 527D # <CJK>
+F8F3 5F6A # <CJK>
+F8F4 6153 # <CJK>
+F8F5 6753 # <CJK>
+F8F6 6A19 # <CJK>
+F8F7 6F02 # <CJK>
+F8F8 74E2 # <CJK>
+F8F9 7968 # <CJK>
+F8FA 8868 # <CJK>
+F8FB 8C79 # <CJK>
+F8FC 98C7 # <CJK>
+F8FD 98C4 # <CJK>
+F8FE 9A43 # <CJK>
+F9A1 54C1 # <CJK>
+F9A2 7A1F # <CJK>
+F9A3 6953 # <CJK>
+F9A4 8AF7 # <CJK>
+F9A5 8C4A # <CJK>
+F9A6 98A8 # <CJK>
+F9A7 99AE # <CJK>
+F9A8 5F7C # <CJK>
+F9A9 62AB # <CJK>
+F9AA 75B2 # <CJK>
+F9AB 76AE # <CJK>
+F9AC 88AB # <CJK>
+F9AD 907F # <CJK>
+F9AE 9642 # <CJK>
+F9AF 5339 # <CJK>
+F9B0 5F3C # <CJK>
+F9B1 5FC5 # <CJK>
+F9B2 6CCC # <CJK>
+F9B3 73CC # <CJK>
+F9B4 7562 # <CJK>
+F9B5 758B # <CJK>
+F9B6 7B46 # <CJK>
+F9B7 82FE # <CJK>
+F9B8 999D # <CJK>
+F9B9 4E4F # <CJK>
+F9BA 903C # <CJK>
+F9BB 4E0B # <CJK>
+F9BC 4F55 # <CJK>
+F9BD 53A6 # <CJK>
+F9BE 590F # <CJK>
+F9BF 5EC8 # <CJK>
+F9C0 6630 # <CJK>
+F9C1 6CB3 # <CJK>
+F9C2 7455 # <CJK>
+F9C3 8377 # <CJK>
+F9C4 8766 # <CJK>
+F9C5 8CC0 # <CJK>
+F9C6 9050 # <CJK>
+F9C7 971E # <CJK>
+F9C8 9C15 # <CJK>
+F9C9 58D1 # <CJK>
+F9CA 5B78 # <CJK>
+F9CB 8650 # <CJK>
+F9CC 8B14 # <CJK>
+F9CD 9DB4 # <CJK>
+F9CE 5BD2 # <CJK>
+F9CF 6068 # <CJK>
+F9D0 608D # <CJK>
+F9D1 65F1 # <CJK>
+F9D2 6C57 # <CJK>
+F9D3 6F22 # <CJK>
+F9D4 6FA3 # <CJK>
+F9D5 701A # <CJK>
+F9D6 7F55 # <CJK>
+F9D7 7FF0 # <CJK>
+F9D8 9591 # <CJK>
+F9D9 9592 # <CJK>
+F9DA 9650 # <CJK>
+F9DB 97D3 # <CJK>
+F9DC 5272 # <CJK>
+F9DD 8F44 # <CJK>
+F9DE 51FD # <CJK>
+F9DF 542B # <CJK>
+F9E0 54B8 # <CJK>
+F9E1 5563 # <CJK>
+F9E2 558A # <CJK>
+F9E3 6ABB # <CJK>
+F9E4 6DB5 # <CJK>
+F9E5 7DD8 # <CJK>
+F9E6 8266 # <CJK>
+F9E7 929C # <CJK>
+F9E8 9677 # <CJK>
+F9E9 9E79 # <CJK>
+F9EA 5408 # <CJK>
+F9EB 54C8 # <CJK>
+F9EC 76D2 # <CJK>
+F9ED 86E4 # <CJK>
+F9EE 95A4 # <CJK>
+F9EF 95D4 # <CJK>
+F9F0 965C # <CJK>
+F9F1 4EA2 # <CJK>
+F9F2 4F09 # <CJK>
+F9F3 59EE # <CJK>
+F9F4 5AE6 # <CJK>
+F9F5 5DF7 # <CJK>
+F9F6 6052 # <CJK>
+F9F7 6297 # <CJK>
+F9F8 676D # <CJK>
+F9F9 6841 # <CJK>
+F9FA 6C86 # <CJK>
+F9FB 6E2F # <CJK>
+F9FC 7F38 # <CJK>
+F9FD 809B # <CJK>
+F9FE 822A # <CJK>
+FAA1 FA08 # <CJK>
+FAA2 FA09 # <CJK>
+FAA3 9805 # <CJK>
+FAA4 4EA5 # <CJK>
+FAA5 5055 # <CJK>
+FAA6 54B3 # <CJK>
+FAA7 5793 # <CJK>
+FAA8 595A # <CJK>
+FAA9 5B69 # <CJK>
+FAAA 5BB3 # <CJK>
+FAAB 61C8 # <CJK>
+FAAC 6977 # <CJK>
+FAAD 6D77 # <CJK>
+FAAE 7023 # <CJK>
+FAAF 87F9 # <CJK>
+FAB0 89E3 # <CJK>
+FAB1 8A72 # <CJK>
+FAB2 8AE7 # <CJK>
+FAB3 9082 # <CJK>
+FAB4 99ED # <CJK>
+FAB5 9AB8 # <CJK>
+FAB6 52BE # <CJK>
+FAB7 6838 # <CJK>
+FAB8 5016 # <CJK>
+FAB9 5E78 # <CJK>
+FABA 674F # <CJK>
+FABB 8347 # <CJK>
+FABC 884C # <CJK>
+FABD 4EAB # <CJK>
+FABE 5411 # <CJK>
+FABF 56AE # <CJK>
+FAC0 73E6 # <CJK>
+FAC1 9115 # <CJK>
+FAC2 97FF # <CJK>
+FAC3 9909 # <CJK>
+FAC4 9957 # <CJK>
+FAC5 9999 # <CJK>
+FAC6 5653 # <CJK>
+FAC7 589F # <CJK>
+FAC8 865B # <CJK>
+FAC9 8A31 # <CJK>
+FACA 61B2 # <CJK>
+FACB 6AF6 # <CJK>
+FACC 737B # <CJK>
+FACD 8ED2 # <CJK>
+FACE 6B47 # <CJK>
+FACF 96AA # <CJK>
+FAD0 9A57 # <CJK>
+FAD1 5955 # <CJK>
+FAD2 7200 # <CJK>
+FAD3 8D6B # <CJK>
+FAD4 9769 # <CJK>
+FAD5 4FD4 # <CJK>
+FAD6 5CF4 # <CJK>
+FAD7 5F26 # <CJK>
+FAD8 61F8 # <CJK>
+FAD9 665B # <CJK>
+FADA 6CEB # <CJK>
+FADB 70AB # <CJK>
+FADC 7384 # <CJK>
+FADD 73B9 # <CJK>
+FADE 73FE # <CJK>
+FADF 7729 # <CJK>
+FAE0 774D # <CJK>
+FAE1 7D43 # <CJK>
+FAE2 7D62 # <CJK>
+FAE3 7E23 # <CJK>
+FAE4 8237 # <CJK>
+FAE5 8852 # <CJK>
+FAE6 FA0A # <CJK>
+FAE7 8CE2 # <CJK>
+FAE8 9249 # <CJK>
+FAE9 986F # <CJK>
+FAEA 5B51 # <CJK>
+FAEB 7A74 # <CJK>
+FAEC 8840 # <CJK>
+FAED 9801 # <CJK>
+FAEE 5ACC # <CJK>
+FAEF 4FE0 # <CJK>
+FAF0 5354 # <CJK>
+FAF1 593E # <CJK>
+FAF2 5CFD # <CJK>
+FAF3 633E # <CJK>
+FAF4 6D79 # <CJK>
+FAF5 72F9 # <CJK>
+FAF6 8105 # <CJK>
+FAF7 8107 # <CJK>
+FAF8 83A2 # <CJK>
+FAF9 92CF # <CJK>
+FAFA 9830 # <CJK>
+FAFB 4EA8 # <CJK>
+FAFC 5144 # <CJK>
+FAFD 5211 # <CJK>
+FAFE 578B # <CJK>
+FBA1 5F62 # <CJK>
+FBA2 6CC2 # <CJK>
+FBA3 6ECE # <CJK>
+FBA4 7005 # <CJK>
+FBA5 7050 # <CJK>
+FBA6 70AF # <CJK>
+FBA7 7192 # <CJK>
+FBA8 73E9 # <CJK>
+FBA9 7469 # <CJK>
+FBAA 834A # <CJK>
+FBAB 87A2 # <CJK>
+FBAC 8861 # <CJK>
+FBAD 9008 # <CJK>
+FBAE 90A2 # <CJK>
+FBAF 93A3 # <CJK>
+FBB0 99A8 # <CJK>
+FBB1 516E # <CJK>
+FBB2 5F57 # <CJK>
+FBB3 60E0 # <CJK>
+FBB4 6167 # <CJK>
+FBB5 66B3 # <CJK>
+FBB6 8559 # <CJK>
+FBB7 8E4A # <CJK>
+FBB8 91AF # <CJK>
+FBB9 978B # <CJK>
+FBBA 4E4E # <CJK>
+FBBB 4E92 # <CJK>
+FBBC 547C # <CJK>
+FBBD 58D5 # <CJK>
+FBBE 58FA # <CJK>
+FBBF 597D # <CJK>
+FBC0 5CB5 # <CJK>
+FBC1 5F27 # <CJK>
+FBC2 6236 # <CJK>
+FBC3 6248 # <CJK>
+FBC4 660A # <CJK>
+FBC5 6667 # <CJK>
+FBC6 6BEB # <CJK>
+FBC7 6D69 # <CJK>
+FBC8 6DCF # <CJK>
+FBC9 6E56 # <CJK>
+FBCA 6EF8 # <CJK>
+FBCB 6F94 # <CJK>
+FBCC 6FE0 # <CJK>
+FBCD 6FE9 # <CJK>
+FBCE 705D # <CJK>
+FBCF 72D0 # <CJK>
+FBD0 7425 # <CJK>
+FBD1 745A # <CJK>
+FBD2 74E0 # <CJK>
+FBD3 7693 # <CJK>
+FBD4 795C # <CJK>
+FBD5 7CCA # <CJK>
+FBD6 7E1E # <CJK>
+FBD7 80E1 # <CJK>
+FBD8 82A6 # <CJK>
+FBD9 846B # <CJK>
+FBDA 84BF # <CJK>
+FBDB 864E # <CJK>
+FBDC 865F # <CJK>
+FBDD 8774 # <CJK>
+FBDE 8B77 # <CJK>
+FBDF 8C6A # <CJK>
+FBE0 93AC # <CJK>
+FBE1 9800 # <CJK>
+FBE2 9865 # <CJK>
+FBE3 60D1 # <CJK>
+FBE4 6216 # <CJK>
+FBE5 9177 # <CJK>
+FBE6 5A5A # <CJK>
+FBE7 660F # <CJK>
+FBE8 6DF7 # <CJK>
+FBE9 6E3E # <CJK>
+FBEA 743F # <CJK>
+FBEB 9B42 # <CJK>
+FBEC 5FFD # <CJK>
+FBED 60DA # <CJK>
+FBEE 7B0F # <CJK>
+FBEF 54C4 # <CJK>
+FBF0 5F18 # <CJK>
+FBF1 6C5E # <CJK>
+FBF2 6CD3 # <CJK>
+FBF3 6D2A # <CJK>
+FBF4 70D8 # <CJK>
+FBF5 7D05 # <CJK>
+FBF6 8679 # <CJK>
+FBF7 8A0C # <CJK>
+FBF8 9D3B # <CJK>
+FBF9 5316 # <CJK>
+FBFA 548C # <CJK>
+FBFB 5B05 # <CJK>
+FBFC 6A3A # <CJK>
+FBFD 706B # <CJK>
+FBFE 7575 # <CJK>
+FCA1 798D # <CJK>
+FCA2 79BE # <CJK>
+FCA3 82B1 # <CJK>
+FCA4 83EF # <CJK>
+FCA5 8A71 # <CJK>
+FCA6 8B41 # <CJK>
+FCA7 8CA8 # <CJK>
+FCA8 9774 # <CJK>
+FCA9 FA0B # <CJK>
+FCAA 64F4 # <CJK>
+FCAB 652B # <CJK>
+FCAC 78BA # <CJK>
+FCAD 78BB # <CJK>
+FCAE 7A6B # <CJK>
+FCAF 4E38 # <CJK>
+FCB0 559A # <CJK>
+FCB1 5950 # <CJK>
+FCB2 5BA6 # <CJK>
+FCB3 5E7B # <CJK>
+FCB4 60A3 # <CJK>
+FCB5 63DB # <CJK>
+FCB6 6B61 # <CJK>
+FCB7 6665 # <CJK>
+FCB8 6853 # <CJK>
+FCB9 6E19 # <CJK>
+FCBA 7165 # <CJK>
+FCBB 74B0 # <CJK>
+FCBC 7D08 # <CJK>
+FCBD 9084 # <CJK>
+FCBE 9A69 # <CJK>
+FCBF 9C25 # <CJK>
+FCC0 6D3B # <CJK>
+FCC1 6ED1 # <CJK>
+FCC2 733E # <CJK>
+FCC3 8C41 # <CJK>
+FCC4 95CA # <CJK>
+FCC5 51F0 # <CJK>
+FCC6 5E4C # <CJK>
+FCC7 5FA8 # <CJK>
+FCC8 604D # <CJK>
+FCC9 60F6 # <CJK>
+FCCA 6130 # <CJK>
+FCCB 614C # <CJK>
+FCCC 6643 # <CJK>
+FCCD 6644 # <CJK>
+FCCE 69A5 # <CJK>
+FCCF 6CC1 # <CJK>
+FCD0 6E5F # <CJK>
+FCD1 6EC9 # <CJK>
+FCD2 6F62 # <CJK>
+FCD3 714C # <CJK>
+FCD4 749C # <CJK>
+FCD5 7687 # <CJK>
+FCD6 7BC1 # <CJK>
+FCD7 7C27 # <CJK>
+FCD8 8352 # <CJK>
+FCD9 8757 # <CJK>
+FCDA 9051 # <CJK>
+FCDB 968D # <CJK>
+FCDC 9EC3 # <CJK>
+FCDD 532F # <CJK>
+FCDE 56DE # <CJK>
+FCDF 5EFB # <CJK>
+FCE0 5F8A # <CJK>
+FCE1 6062 # <CJK>
+FCE2 6094 # <CJK>
+FCE3 61F7 # <CJK>
+FCE4 6666 # <CJK>
+FCE5 6703 # <CJK>
+FCE6 6A9C # <CJK>
+FCE7 6DEE # <CJK>
+FCE8 6FAE # <CJK>
+FCE9 7070 # <CJK>
+FCEA 736A # <CJK>
+FCEB 7E6A # <CJK>
+FCEC 81BE # <CJK>
+FCED 8334 # <CJK>
+FCEE 86D4 # <CJK>
+FCEF 8AA8 # <CJK>
+FCF0 8CC4 # <CJK>
+FCF1 5283 # <CJK>
+FCF2 7372 # <CJK>
+FCF3 5B96 # <CJK>
+FCF4 6A6B # <CJK>
+FCF5 9404 # <CJK>
+FCF6 54EE # <CJK>
+FCF7 5686 # <CJK>
+FCF8 5B5D # <CJK>
+FCF9 6548 # <CJK>
+FCFA 6585 # <CJK>
+FCFB 66C9 # <CJK>
+FCFC 689F # <CJK>
+FCFD 6D8D # <CJK>
+FCFE 6DC6 # <CJK>
+FDA1 723B # <CJK>
+FDA2 80B4 # <CJK>
+FDA3 9175 # <CJK>
+FDA4 9A4D # <CJK>
+FDA5 4FAF # <CJK>
+FDA6 5019 # <CJK>
+FDA7 539A # <CJK>
+FDA8 540E # <CJK>
+FDA9 543C # <CJK>
+FDAA 5589 # <CJK>
+FDAB 55C5 # <CJK>
+FDAC 5E3F # <CJK>
+FDAD 5F8C # <CJK>
+FDAE 673D # <CJK>
+FDAF 7166 # <CJK>
+FDB0 73DD # <CJK>
+FDB1 9005 # <CJK>
+FDB2 52DB # <CJK>
+FDB3 52F3 # <CJK>
+FDB4 5864 # <CJK>
+FDB5 58CE # <CJK>
+FDB6 7104 # <CJK>
+FDB7 718F # <CJK>
+FDB8 71FB # <CJK>
+FDB9 85B0 # <CJK>
+FDBA 8A13 # <CJK>
+FDBB 6688 # <CJK>
+FDBC 85A8 # <CJK>
+FDBD 55A7 # <CJK>
+FDBE 6684 # <CJK>
+FDBF 714A # <CJK>
+FDC0 8431 # <CJK>
+FDC1 5349 # <CJK>
+FDC2 5599 # <CJK>
+FDC3 6BC1 # <CJK>
+FDC4 5F59 # <CJK>
+FDC5 5FBD # <CJK>
+FDC6 63EE # <CJK>
+FDC7 6689 # <CJK>
+FDC8 7147 # <CJK>
+FDC9 8AF1 # <CJK>
+FDCA 8F1D # <CJK>
+FDCB 9EBE # <CJK>
+FDCC 4F11 # <CJK>
+FDCD 643A # <CJK>
+FDCE 70CB # <CJK>
+FDCF 7566 # <CJK>
+FDD0 8667 # <CJK>
+FDD1 6064 # <CJK>
+FDD2 8B4E # <CJK>
+FDD3 9DF8 # <CJK>
+FDD4 5147 # <CJK>
+FDD5 51F6 # <CJK>
+FDD6 5308 # <CJK>
+FDD7 6D36 # <CJK>
+FDD8 80F8 # <CJK>
+FDD9 9ED1 # <CJK>
+FDDA 6615 # <CJK>
+FDDB 6B23 # <CJK>
+FDDC 7098 # <CJK>
+FDDD 75D5 # <CJK>
+FDDE 5403 # <CJK>
+FDDF 5C79 # <CJK>
+FDE0 7D07 # <CJK>
+FDE1 8A16 # <CJK>
+FDE2 6B20 # <CJK>
+FDE3 6B3D # <CJK>
+FDE4 6B46 # <CJK>
+FDE5 5438 # <CJK>
+FDE6 6070 # <CJK>
+FDE7 6D3D # <CJK>
+FDE8 7FD5 # <CJK>
+FDE9 8208 # <CJK>
+FDEA 50D6 # <CJK>
+FDEB 51DE # <CJK>
+FDEC 559C # <CJK>
+FDED 566B # <CJK>
+FDEE 56CD # <CJK>
+FDEF 59EC # <CJK>
+FDF0 5B09 # <CJK>
+FDF1 5E0C # <CJK>
+FDF2 6199 # <CJK>
+FDF3 6198 # <CJK>
+FDF4 6231 # <CJK>
+FDF5 665E # <CJK>
+FDF6 66E6 # <CJK>
+FDF7 7199 # <CJK>
+FDF8 71B9 # <CJK>
+FDF9 71BA # <CJK>
+FDFA 72A7 # <CJK>
+FDFB 79A7 # <CJK>
+FDFC 7A00 # <CJK>
+FDFD 7FB2 # <CJK>
+FDFE 8A70 # <CJK>
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-1.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-1.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-1.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-1.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 00a1 INVERTED EXCLAMATION MARK
+A2 00a2 CENT SIGN
+A3 00a3 POUND SIGN
+A4 00a4 CURRENCY SIGN
+A5 00a5 YEN SIGN
+A6 00a6 BROKEN BAR
+A7 00a7 SECTION SIGN
+A8 00a8 DIAERESIS
+A9 00a9 COPYRIGHT SIGN
+AA 00aa FEMININE ORDINAL INDICATOR
+AB 00ab LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+AC 00ac NOT SIGN
+AD 00ad SOFT HYPHEN
+AE 00ae REGISTERED SIGN
+AF 00af MACRON
+B0 00b0 DEGREE SIGN
+B1 00b1 PLUS-MINUS SIGN
+B2 00b2 SUPERSCRIPT TWO
+B3 00b3 SUPERSCRIPT THREE
+B4 00b4 ACUTE ACCENT
+B5 00b5 MICRO SIGN
+B6 00b6 PILCROW SIGN
+B7 00b7 MIDDLE DOT
+B8 00b8 CEDILLA
+B9 00b9 SUPERSCRIPT ONE
+BA 00ba MASCULINE ORDINAL INDICATOR
+BB 00bb RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+BC 00bc VULGAR FRACTION ONE QUARTER
+BD 00bd VULGAR FRACTION ONE HALF
+BE 00be VULGAR FRACTION THREE QUARTERS
+BF 00bf INVERTED QUESTION MARK
+C0 00c0 LATIN CAPITAL LETTER A WITH GRAVE
+C1 00c1 LATIN CAPITAL LETTER A WITH ACUTE
+C2 00c2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+C3 00c3 LATIN CAPITAL LETTER A WITH TILDE
+C4 00c4 LATIN CAPITAL LETTER A WITH DIAERESIS
+C5 00c5 LATIN CAPITAL LETTER A WITH RING ABOVE
+C6 00c6 LATIN CAPITAL LETTER AE
+C7 00c7 LATIN CAPITAL LETTER C WITH CEDILLA
+C8 00c8 LATIN CAPITAL LETTER E WITH GRAVE
+C9 00c9 LATIN CAPITAL LETTER E WITH ACUTE
+CA 00ca LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+CB 00cb LATIN CAPITAL LETTER E WITH DIAERESIS
+CC 00cc LATIN CAPITAL LETTER I WITH GRAVE
+CD 00cd LATIN CAPITAL LETTER I WITH ACUTE
+CE 00ce LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+CF 00cf LATIN CAPITAL LETTER I WITH DIAERESIS
+D0 00d0 LATIN CAPITAL LETTER ETH (Icelandic)
+D1 00d1 LATIN CAPITAL LETTER N WITH TILDE
+D2 00d2 LATIN CAPITAL LETTER O WITH GRAVE
+D3 00d3 LATIN CAPITAL LETTER O WITH ACUTE
+D4 00d4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+D5 00d5 LATIN CAPITAL LETTER O WITH TILDE
+D6 00d6 LATIN CAPITAL LETTER O WITH DIAERESIS
+D7 00d7 MULTIPLICATION SIGN
+D8 00d8 LATIN CAPITAL LETTER O WITH STROKE
+D9 00d9 LATIN CAPITAL LETTER U WITH GRAVE
+DA 00da LATIN CAPITAL LETTER U WITH ACUTE
+DB 00db LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+DC 00dc LATIN CAPITAL LETTER U WITH DIAERESIS
+DD 00dd LATIN CAPITAL LETTER Y WITH ACUTE
+DE 00de LATIN CAPITAL LETTER THORN (Icelandic)
+DF 00df LATIN SMALL LETTER SHARP S (German)
+E0 00e0 LATIN SMALL LETTER A WITH GRAVE
+E1 00e1 LATIN SMALL LETTER A WITH ACUTE
+E2 00e2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+E3 00e3 LATIN SMALL LETTER A WITH TILDE
+E4 00e4 LATIN SMALL LETTER A WITH DIAERESIS
+E5 00e5 LATIN SMALL LETTER A WITH RING ABOVE
+E6 00e6 LATIN SMALL LETTER AE
+E7 00e7 LATIN SMALL LETTER C WITH CEDILLA
+E8 00e8 LATIN SMALL LETTER E WITH GRAVE
+E9 00e9 LATIN SMALL LETTER E WITH ACUTE
+EA 00ea LATIN SMALL LETTER E WITH CIRCUMFLEX
+EB 00eb LATIN SMALL LETTER E WITH DIAERESIS
+EC 00ec LATIN SMALL LETTER I WITH GRAVE
+ED 00ed LATIN SMALL LETTER I WITH ACUTE
+EE 00ee LATIN SMALL LETTER I WITH CIRCUMFLEX
+EF 00ef LATIN SMALL LETTER I WITH DIAERESIS
+F0 00f0 LATIN SMALL LETTER ETH (Icelandic)
+F1 00f1 LATIN SMALL LETTER N WITH TILDE
+F2 00f2 LATIN SMALL LETTER O WITH GRAVE
+F3 00f3 LATIN SMALL LETTER O WITH ACUTE
+F4 00f4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+F5 00f5 LATIN SMALL LETTER O WITH TILDE
+F6 00f6 LATIN SMALL LETTER O WITH DIAERESIS
+F7 00f7 DIVISION SIGN
+F8 00f8 LATIN SMALL LETTER O WITH STROKE
+F9 00f9 LATIN SMALL LETTER U WITH GRAVE
+FA 00fa LATIN SMALL LETTER U WITH ACUTE
+FB 00fb LATIN SMALL LETTER U WITH CIRCUMFLEX
+FC 00fc LATIN SMALL LETTER U WITH DIAERESIS
+FD 00fd LATIN SMALL LETTER Y WITH ACUTE
+FE 00fe LATIN SMALL LETTER THORN (Icelandic)
+FF 00ff LATIN SMALL LETTER Y WITH DIAERESIS
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-15.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-15.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-15.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-15.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,278 @@
+# Copyright 2002 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+#
+# Charset put together by Ewald Dieterich <ewald.dieterich at fun.de>
+# Reference: http://www.iana.org/assignments/charset-reg/ISO-8859-15
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 00a1 INVERTED EXCLAMATION MARK
+A2 00a2 CENT SIGN
+A3 00a3 POUND SIGN
+A4 20ac EURO SIGN
+A5 00a5 YEN SIGN
+A6 0160 LATIN CAPITAL LETTER S WITH CARON
+A7 00a7 SECTION SIGN
+A8 0161 LATIN SMALL LETTER S WITH CARON
+A9 00a9 COPYRIGHT SIGN
+AA 00aa FEMININE ORDINAL INDICATOR
+AB 00ab LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+AC 00ac NOT SIGN
+AD 00ad SOFT HYPHEN
+AE 00ae REGISTERED SIGN
+AF 00af MACRON
+B0 00b0 DEGREE SIGN
+B1 00b1 PLUS-MINUS SIGN
+B2 00b2 SUPERSCRIPT TWO
+B3 00b3 SUPERSCRIPT THREE
+B4 017d LATIN CAPITAL LETTER Z WITH CARON
+B5 00b5 MICRO SIGN
+B6 00b6 PILCROW SIGN
+B7 00b7 MIDDLE DOT
+B8 017e LATIN SMALL LETTER Z WITH CARON
+B9 00b9 SUPERSCRIPT ONE
+BA 00ba MASCULINE ORDINAL INDICATOR
+BB 00bb RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+BC 0152 LATIN CAPITAL LIGATURE OE
+BD 0153 LATIN SMALL LIGATURE OE
+BE 0178 LATIN CAPITAL LETTER Y WITH DIAERESIS
+BF 00bf INVERTED QUESTION MARK
+C0 00c0 LATIN CAPITAL LETTER A WITH GRAVE
+C1 00c1 LATIN CAPITAL LETTER A WITH ACUTE
+C2 00c2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+C3 00c3 LATIN CAPITAL LETTER A WITH TILDE
+C4 00c4 LATIN CAPITAL LETTER A WITH DIAERESIS
+C5 00c5 LATIN CAPITAL LETTER A WITH RING ABOVE
+C6 00c6 LATIN CAPITAL LETTER AE
+C7 00c7 LATIN CAPITAL LETTER C WITH CEDILLA
+C8 00c8 LATIN CAPITAL LETTER E WITH GRAVE
+C9 00c9 LATIN CAPITAL LETTER E WITH ACUTE
+CA 00ca LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+CB 00cb LATIN CAPITAL LETTER E WITH DIAERESIS
+CC 00cc LATIN CAPITAL LETTER I WITH GRAVE
+CD 00cd LATIN CAPITAL LETTER I WITH ACUTE
+CE 00ce LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+CF 00cf LATIN CAPITAL LETTER I WITH DIAERESIS
+D0 00d0 LATIN CAPITAL LETTER ETH (Icelandic)
+D1 00d1 LATIN CAPITAL LETTER N WITH TILDE
+D2 00d2 LATIN CAPITAL LETTER O WITH GRAVE
+D3 00d3 LATIN CAPITAL LETTER O WITH ACUTE
+D4 00d4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+D5 00d5 LATIN CAPITAL LETTER O WITH TILDE
+D6 00d6 LATIN CAPITAL LETTER O WITH DIAERESIS
+D7 00d7 MULTIPLICATION SIGN
+D8 00d8 LATIN CAPITAL LETTER O WITH STROKE
+D9 00d9 LATIN CAPITAL LETTER U WITH GRAVE
+DA 00da LATIN CAPITAL LETTER U WITH ACUTE
+DB 00db LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+DC 00dc LATIN CAPITAL LETTER U WITH DIAERESIS
+DD 00dd LATIN CAPITAL LETTER Y WITH ACUTE
+DE 00de LATIN CAPITAL LETTER THORN (Icelandic)
+DF 00df LATIN SMALL LETTER SHARP S (German)
+E0 00e0 LATIN SMALL LETTER A WITH GRAVE
+E1 00e1 LATIN SMALL LETTER A WITH ACUTE
+E2 00e2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+E3 00e3 LATIN SMALL LETTER A WITH TILDE
+E4 00e4 LATIN SMALL LETTER A WITH DIAERESIS
+E5 00e5 LATIN SMALL LETTER A WITH RING ABOVE
+E6 00e6 LATIN SMALL LETTER AE
+E7 00e7 LATIN SMALL LETTER C WITH CEDILLA
+E8 00e8 LATIN SMALL LETTER E WITH GRAVE
+E9 00e9 LATIN SMALL LETTER E WITH ACUTE
+EA 00ea LATIN SMALL LETTER E WITH CIRCUMFLEX
+EB 00eb LATIN SMALL LETTER E WITH DIAERESIS
+EC 00ec LATIN SMALL LETTER I WITH GRAVE
+ED 00ed LATIN SMALL LETTER I WITH ACUTE
+EE 00ee LATIN SMALL LETTER I WITH CIRCUMFLEX
+EF 00ef LATIN SMALL LETTER I WITH DIAERESIS
+F0 00f0 LATIN SMALL LETTER ETH (Icelandic)
+F1 00f1 LATIN SMALL LETTER N WITH TILDE
+F2 00f2 LATIN SMALL LETTER O WITH GRAVE
+F3 00f3 LATIN SMALL LETTER O WITH ACUTE
+F4 00f4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+F5 00f5 LATIN SMALL LETTER O WITH TILDE
+F6 00f6 LATIN SMALL LETTER O WITH DIAERESIS
+F7 00f7 DIVISION SIGN
+F8 00f8 LATIN SMALL LETTER O WITH STROKE
+F9 00f9 LATIN SMALL LETTER U WITH GRAVE
+FA 00fa LATIN SMALL LETTER U WITH ACUTE
+FB 00fb LATIN SMALL LETTER U WITH CIRCUMFLEX
+FC 00fc LATIN SMALL LETTER U WITH DIAERESIS
+FD 00fd LATIN SMALL LETTER Y WITH ACUTE
+FE 00fe LATIN SMALL LETTER THORN (Icelandic)
+FF 00ff LATIN SMALL LETTER Y WITH DIAERESIS
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-2.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-2.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-2.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-2.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 0104 LATIN CAPITAL LETTER A WITH OGONEK
+A2 02d8 BREVE
+A3 0141 LATIN CAPITAL LETTER L WITH STROKE
+A4 00a4 CURRENCY SIGN
+A5 013d LATIN CAPITAL LETTER L WITH CARON
+A6 015a LATIN CAPITAL LETTER S WITH ACUTE
+A7 00a7 SECTION SIGN
+A8 00a8 DIAERESIS
+A9 0160 LATIN CAPITAL LETTER S WITH CARON
+AA 015e LATIN CAPITAL LETTER S WITH CEDILLA
+AB 0164 LATIN CAPITAL LETTER T WITH CARON
+AC 0179 LATIN CAPITAL LETTER Z WITH ACUTE
+AD 00ad SOFT HYPHEN
+AE 017d LATIN CAPITAL LETTER Z WITH CARON
+AF 017b LATIN CAPITAL LETTER Z WITH DOT ABOVE
+B0 00b0 DEGREE SIGN
+B1 0105 LATIN SMALL LETTER A WITH OGONEK
+B2 02db OGONEK
+B3 0142 LATIN SMALL LETTER L WITH STROKE
+B4 00b4 ACUTE ACCENT
+B5 013e LATIN SMALL LETTER L WITH CARON
+B6 015b LATIN SMALL LETTER S WITH ACUTE
+B7 02c7 CARON
+B8 00b8 CEDILLA
+B9 0161 LATIN SMALL LETTER S WITH CARON
+BA 015f LATIN SMALL LETTER S WITH CEDILLA
+BB 0165 LATIN SMALL LETTER T WITH CARON
+BC 017a LATIN SMALL LETTER Z WITH ACUTE
+BD 02dd DOUBLE ACUTE ACCENT
+BE 017e LATIN SMALL LETTER Z WITH CARON
+BF 017c LATIN SMALL LETTER Z WITH DOT ABOVE
+C0 0154 LATIN CAPITAL LETTER R WITH ACUTE
+C1 00c1 LATIN CAPITAL LETTER A WITH ACUTE
+C2 00c2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+C3 0102 LATIN CAPITAL LETTER A WITH BREVE
+C4 00c4 LATIN CAPITAL LETTER A WITH DIAERESIS
+C5 0139 LATIN CAPITAL LETTER L WITH ACUTE
+C6 0106 LATIN CAPITAL LETTER C WITH ACUTE
+C7 00c7 LATIN CAPITAL LETTER C WITH CEDILLA
+C8 010c LATIN CAPITAL LETTER C WITH CARON
+C9 00c9 LATIN CAPITAL LETTER E WITH ACUTE
+CA 0118 LATIN CAPITAL LETTER E WITH OGONEK
+CB 00cb LATIN CAPITAL LETTER E WITH DIAERESIS
+CC 011a LATIN CAPITAL LETTER E WITH CARON
+CD 00cd LATIN CAPITAL LETTER I WITH ACUTE
+CE 00ce LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+CF 010e LATIN CAPITAL LETTER D WITH CARON
+D0 0110 LATIN CAPITAL LETTER D WITH STROKE
+D1 0143 LATIN CAPITAL LETTER N WITH ACUTE
+D2 0147 LATIN CAPITAL LETTER N WITH CARON
+D3 00d3 LATIN CAPITAL LETTER O WITH ACUTE
+D4 00d4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+D5 0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
+D6 00d6 LATIN CAPITAL LETTER O WITH DIAERESIS
+D7 00d7 MULTIPLICATION SIGN
+D8 0158 LATIN CAPITAL LETTER R WITH CARON
+D9 016e LATIN CAPITAL LETTER U WITH RING ABOVE
+DA 00da LATIN CAPITAL LETTER U WITH ACUTE
+DB 0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
+DC 00dc LATIN CAPITAL LETTER U WITH DIAERESIS
+DD 00dd LATIN CAPITAL LETTER Y WITH ACUTE
+DE 0162 LATIN CAPITAL LETTER T WITH CEDILLA
+DF 00df LATIN SMALL LETTER SHARP S (German)
+E0 0155 LATIN SMALL LETTER R WITH ACUTE
+E1 00e1 LATIN SMALL LETTER A WITH ACUTE
+E2 00e2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+E3 0103 LATIN SMALL LETTER A WITH BREVE
+E4 00e4 LATIN SMALL LETTER A WITH DIAERESIS
+E5 013a LATIN SMALL LETTER L WITH ACUTE
+E6 0107 LATIN SMALL LETTER C WITH ACUTE
+E7 00e7 LATIN SMALL LETTER C WITH CEDILLA
+E8 010d LATIN SMALL LETTER C WITH CARON
+E9 00e9 LATIN SMALL LETTER E WITH ACUTE
+EA 0119 LATIN SMALL LETTER E WITH OGONEK
+EB 00eb LATIN SMALL LETTER E WITH DIAERESIS
+EC 011b LATIN SMALL LETTER E WITH CARON
+ED 00ed LATIN SMALL LETTER I WITH ACUTE
+EE 00ee LATIN SMALL LETTER I WITH CIRCUMFLEX
+EF 010f LATIN SMALL LETTER D WITH CARON
+F0 0111 LATIN SMALL LETTER D WITH STROKE
+F1 0144 LATIN SMALL LETTER N WITH ACUTE
+F2 0148 LATIN SMALL LETTER N WITH CARON
+F3 00f3 LATIN SMALL LETTER O WITH ACUTE
+F4 00f4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+F5 0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE
+F6 00f6 LATIN SMALL LETTER O WITH DIAERESIS
+F7 00f7 DIVISION SIGN
+F8 0159 LATIN SMALL LETTER R WITH CARON
+F9 016f LATIN SMALL LETTER U WITH RING ABOVE
+FA 00fa LATIN SMALL LETTER U WITH ACUTE
+FB 0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE
+FC 00fc LATIN SMALL LETTER U WITH DIAERESIS
+FD 00fd LATIN SMALL LETTER Y WITH ACUTE
+FE 0163 LATIN SMALL LETTER T WITH CEDILLA
+FF 02d9 DOT ABOVE
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-3.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-3.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-3.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-3.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 0126 LATIN CAPITAL LETTER H WITH STROKE
+A2 02d8 BREVE
+A3 00a3 POUND SIGN
+A4 00a4 CURRENCY SIGN
+A5 ???? EMPTY
+A6 0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX
+A7 00a7 SECTION SIGN
+A8 00a8 DIAERESIS
+A9 0130 LATIN CAPITAL LETTER I WITH DOT ABOVE
+AA 015e LATIN CAPITAL LETTER S WITH CEDILLA
+AB 011e LATIN CAPITAL LETTER G WITH BREVE
+AC 0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX
+AD 00ad SOFT HYPHEN
+AE ???? EMPTY
+AF 017b LATIN CAPITAL LETTER Z WITH DOT ABOVE
+B0 00b0 DEGREE SIGN
+B1 0127 LATIN SMALL LETTER H WITH STROKE
+B2 00b2 SUPERSCRIPT TWO
+B3 00b3 SUPERSCRIPT THREE
+B4 00b4 ACUTE ACCENT
+B5 00b5 MICRO SIGN
+B6 0125 LATIN SMALL LETTER H WITH CIRCUMFLEX
+B7 00b7 MIDDLE DOT
+B8 00b8 CEDILLA
+B9 0131 LATIN SMALL LETTER I DOTLESS
+BA 015f LATIN SMALL LETTER S WITH CEDILLA
+BB 011f LATIN SMALL LETTER G WITH BREVE
+BC 0135 LATIN SMALL LETTER J WITH CIRCUMFLEX
+BD 00bd VULGAR FRACTION ONE HALF
+BE ???? EMPTY
+BF 017c LATIN SMALL LETTER Z WITH DOT ABOVE
+C0 00c0 LATIN CAPITAL LETTER A WITH GRAVE
+C1 00c1 LATIN CAPITAL LETTER A WITH ACUTE
+C2 00c2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+C3 ???? EMPTY
+C4 00c4 LATIN CAPITAL LETTER A WITH DIAERESIS
+C5 010a LATIN CAPITAL LETTER C WITH DOT ABOVE
+C6 0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX
+C7 00c7 LATIN CAPITAL LETTER C WITH CEDILLA
+C8 00c8 LATIN CAPITAL LETTER E WITH GRAVE
+C9 00c9 LATIN CAPITAL LETTER E WITH ACUTE
+CA 00ca LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+CB 00cb LATIN CAPITAL LETTER E WITH DIAERESIS
+CC 00cc LATIN CAPITAL LETTER I WITH GRAVE
+CD 00cd LATIN CAPITAL LETTER I WITH ACUTE
+CE 00ce LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+CF 00cf LATIN CAPITAL LETTER I WITH DIAERESIS
+D0 ???? EMPTY
+D1 00d1 LATIN CAPITAL LETTER N WITH TILDE
+D2 00d2 LATIN CAPITAL LETTER O WITH GRAVE
+D3 00d3 LATIN CAPITAL LETTER O WITH ACUTE
+D4 00d4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+D5 0120 LATIN CAPITAL LETTER G WITH DOT ABOVE
+D6 00d6 LATIN CAPITAL LETTER O WITH DIAERESIS
+D7 00d7 MULTIPLICATION SIGN
+D8 011c LATIN CAPITAL LETTER G WITH CIRCUMFLEX
+D9 00d9 LATIN CAPITAL LETTER U WITH GRAVE
+DA 00da LATIN CAPITAL LETTER U WITH ACUTE
+DB 00db LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+DC 00dc LATIN CAPITAL LETTER U WITH DIAERESIS
+DD 016c LATIN CAPITAL LETTER U WITH BREVE
+DE 015c LATIN CAPITAL LETTER S WITH CIRCUMFLEX
+DF 00df LATIN SMALL LETTER SHARP S (German)
+E0 00e0 LATIN SMALL LETTER A WITH GRAVE
+E1 00e1 LATIN SMALL LETTER A WITH ACUTE
+E2 00e2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+E3 ???? EMPTY
+E4 00e4 LATIN SMALL LETTER A WITH DIAERESIS
+E5 010b LATIN SMALL LETTER C WITH DOT ABOVE
+E6 0109 LATIN SMALL LETTER C WITH CIRCUMFLEX
+E7 00e7 LATIN SMALL LETTER C WITH CEDILLA
+E8 00e8 LATIN SMALL LETTER E WITH GRAVE
+E9 00e9 LATIN SMALL LETTER E WITH ACUTE
+EA 00ea LATIN SMALL LETTER E WITH CIRCUMFLEX
+EB 00eb LATIN SMALL LETTER E WITH DIAERESIS
+EC 00ec LATIN SMALL LETTER I WITH GRAVE
+ED 00ed LATIN SMALL LETTER I WITH ACUTE
+EE 00ee LATIN SMALL LETTER I WITH CIRCUMFLEX
+EF 00ef LATIN SMALL LETTER I WITH DIAERESIS
+F0 ???? EMPTY
+F1 00f1 LATIN SMALL LETTER N WITH TILDE
+F2 00f2 LATIN SMALL LETTER O WITH GRAVE
+F3 00f3 LATIN SMALL LETTER O WITH ACUTE
+F4 00f4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+F5 0121 LATIN SMALL LETTER G WITH DOT ABOVE
+F6 00f6 LATIN SMALL LETTER O WITH DIAERESIS
+F7 00f7 DIVISION SIGN
+F8 011d LATIN SMALL LETTER G WITH CIRCUMFLEX
+F9 00f9 LATIN SMALL LETTER U WITH GRAVE
+FA 00fa LATIN SMALL LETTER U WITH ACUTE
+FB 00fb LATIN SMALL LETTER U WITH CIRCUMFLEX
+FC 00fc LATIN SMALL LETTER U WITH DIAERESIS
+FD 016d LATIN SMALL LETTER U WITH BREVE
+FE 015d LATIN SMALL LETTER S WITH CIRCUMFLEX
+FF 02d9 DOT ABOVE
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-4.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-4.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-4.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-4.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 0104 LATIN CAPITAL LETTER A WITH OGONEK
+A2 0138 LATIN SMALL LETTER KRA (Greenlandic)
+A3 0156 LATIN CAPITAL LETTER R WITH CEDILLA
+A4 00a4 CURRENCY SIGN
+A5 0128 LATIN CAPITAL LETTER I WITH TILDE
+A6 013b LATIN CAPITAL LETTER L WITH CEDILLA
+A7 00a7 SECTION SIGN
+A8 00a8 DIAERESIS
+A9 0160 LATIN CAPITAL LETTER S WITH CARON
+AA 0112 LATIN CAPITAL LETTER E WITH MACRON
+AB 0122 LATIN CAPITAL LETTER G WITH CEDILLA
+AC 0166 LATIN CAPITAL LETTER T WITH STROKE
+AD 00ad SOFT HYPHEN
+AE 017d LATIN CAPITAL LETTER Z WITH CARON
+AF 00af MACRON
+B0 00b0 DEGREE SIGN
+B1 0105 LATIN SMALL LETTER A WITH OGONEK
+B2 02db OGONEK
+B3 0157 LATIN SMALL LETTER R WITH CEDILLA
+B4 00b4 ACUTE ACCENT
+B5 0129 LATIN SMALL LETTER I WITH TILDE
+B6 013c LATIN SMALL LETTER L WITH CEDILLA
+B7 02c7 CARON
+B8 00b8 CEDILLA
+B9 0161 LATIN SMALL LETTER S WITH CARON
+BA 0113 LATIN SMALL LETTER E WITH MACRON
+BB 0123 LATIN SMALL LETTER G WITH CEDILLA
+BC 0167 LATIN SMALL LETTER T WITH STROKE
+BD 014a LATIN CAPITAL LETTER ENG (Lappish)
+BE 017e LATIN SMALL LETTER Z WITH CARON
+BF 014b LATIN SMALL LETTER ENG (Lappish)
+C0 0100 LATIN CAPITAL LETTER A WITH MACRON
+C1 00c1 LATIN CAPITAL LETTER A WITH ACUTE
+C2 00c2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+C3 00c3 LATIN CAPITAL LETTER A WITH TILDE
+C4 00c4 LATIN CAPITAL LETTER A WITH DIAERESIS
+C5 00c5 LATIN CAPITAL LETTER A WITH RING ABOVE
+C6 00c6 LATIN CAPITAL LETTER AE
+C7 012e LATIN CAPITAL LETTER I WITH OGONEK
+C8 010c LATIN CAPITAL LETTER C WITH CARON
+C9 00c9 LATIN CAPITAL LETTER E WITH ACUTE
+CA 0118 LATIN CAPITAL LETTER E WITH OGONEK
+CB 00cb LATIN CAPITAL LETTER E WITH DIAERESIS
+CC 0116 LATIN CAPITAL LETTER E WITH DOT ABOVE
+CD 00cd LATIN CAPITAL LETTER I WITH ACUTE
+CE 00ce LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+CF 012a LATIN CAPITAL LETTER I WITH MACRON
+D0 0110 LATIN CAPITAL LETTER D WITH STROKE
+D1 0145 LATIN CAPITAL LETTER N WITH CEDILLA
+D2 014c LATIN CAPITAL LETTER O WITH MACRON
+D3 0136 LATIN CAPITAL LETTER K WITH CEDILLA
+D4 00d4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+D5 00d5 LATIN CAPITAL LETTER O WITH TILDE
+D6 00d6 LATIN CAPITAL LETTER O WITH DIAERESIS
+D7 00d7 MULTIPLICATION SIGN
+D8 00d8 LATIN CAPITAL LETTER O WITH STROKE
+D9 0172 LATIN CAPITAL LETTER U WITH OGONEK
+DA 00da LATIN CAPITAL LETTER U WITH ACUTE
+DB 00db LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+DC 00dc LATIN CAPITAL LETTER U WITH DIAERESIS
+DD 0168 LATIN CAPITAL LETTER U WITH TILDE
+DE 016a LATIN CAPITAL LETTER U WITH MACRON
+DF 00df LATIN SMALL LETTER SHARP S (German)
+E0 0101 LATIN SMALL LETTER A WITH MACRON
+E1 00e1 LATIN SMALL LETTER A WITH ACUTE
+E2 00e2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+E3 00e3 LATIN SMALL LETTER A WITH TILDE
+E4 00e4 LATIN SMALL LETTER A WITH DIAERESIS
+E5 00e5 LATIN SMALL LETTER A WITH RING ABOVE
+E6 00e6 LATIN SMALL LETTER AE
+E7 012f LATIN SMALL LETTER I WITH OGONEK
+E8 010d LATIN SMALL LETTER C WITH CARON
+E9 00e9 LATIN SMALL LETTER E WITH ACUTE
+EA 0119 LATIN SMALL LETTER E WITH OGONEK
+EB 00eb LATIN SMALL LETTER E WITH DIAERESIS
+EC 0117 LATIN SMALL LETTER E WITH DOT ABOVE
+ED 00ed LATIN SMALL LETTER I WITH ACUTE
+EE 00ee LATIN SMALL LETTER I WITH CIRCUMFLEX
+EF 012b LATIN SMALL LETTER I WITH MACRON
+F0 0111 LATIN SMALL LETTER D WITH STROKE
+F1 0146 LATIN SMALL LETTER N WITH CEDILLA
+F2 014d LATIN SMALL LETTER O WITH MACRON
+F3 0137 LATIN SMALL LETTER K WITH CEDILLA
+F4 00f4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+F5 00f5 LATIN SMALL LETTER O WITH TILDE
+F6 00f6 LATIN SMALL LETTER O WITH DIAERESIS
+F7 00f7 DIVISION SIGN
+F8 00f8 LATIN SMALL LETTER O WITH STROKE
+F9 0173 LATIN SMALL LETTER U WITH OGONEK
+FA 00fa LATIN SMALL LETTER U WITH ACUTE
+FB 00fb LATIN SMALL LETTER U WITH CIRCUMFLEX
+FC 00fc LATIN SMALL LETTER U WITH DIAERESIS
+FD 0169 LATIN SMALL LETTER U WITH TILDE
+FE 016b LATIN SMALL LETTER U WITH MACRON
+FF 02d9 DOT ABOVE
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-5.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-5.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-5.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-5.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 0401 CYRILLIC CAPITAL LETTER IO
+A2 0402 CYRILLIC CAPITAL LETTER DJE (Serbocroatian)
+A3 0403 CYRILLIC CAPITAL LETTER GJE (Macedonian)
+A4 0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE
+A5 0405 CYRILLIC CAPITAL LETTER DZE (Macedonian)
+A6 0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
+A7 0407 CYRILLIC CAPITAL LETTER YI (Ukrainian)
+A8 0408 CYRILLIC CAPITAL LETTER JE
+A9 0409 CYRILLIC CAPITAL LETTER LJE
+AA 040a CYRILLIC CAPITAL LETTER NJE
+AB 040b CYRILLIC CAPITAL LETTER TSHE (Serbocroatian)
+AC 040c CYRILLIC CAPITAL LETTER KJE (Macedonian)
+AD 00ad SOFT HYPHEN
+AE 040e CYRILLIC CAPITAL LETTER SHORT U (Byelorussian)
+AF 040f CYRILLIC CAPITAL LETTER DZHE
+B0 0410 CYRILLIC CAPITAL LETTER A
+B1 0411 CYRILLIC CAPITAL LETTER BE
+B2 0412 CYRILLIC CAPITAL LETTER VE
+B3 0413 CYRILLIC CAPITAL LETTER GHE
+B4 0414 CYRILLIC CAPITAL LETTER DE
+B5 0415 CYRILLIC CAPITAL LETTER IE
+B6 0416 CYRILLIC CAPITAL LETTER ZHE
+B7 0417 CYRILLIC CAPITAL LETTER ZE
+B8 0418 CYRILLIC CAPITAL LETTER I
+B9 0419 CYRILLIC CAPITAL LETTER SHORT I
+BA 041a CYRILLIC CAPITAL LETTER KA
+BB 041b CYRILLIC CAPITAL LETTER EL
+BC 041c CYRILLIC CAPITAL LETTER EM
+BD 041d CYRILLIC CAPITAL LETTER EN
+BE 041e CYRILLIC CAPITAL LETTER O
+BF 041f CYRILLIC CAPITAL LETTER PE
+C0 0420 CYRILLIC CAPITAL LETTER ER
+C1 0421 CYRILLIC CAPITAL LETTER ES
+C2 0422 CYRILLIC CAPITAL LETTER TE
+C3 0423 CYRILLIC CAPITAL LETTER U
+C4 0424 CYRILLIC CAPITAL LETTER EF
+C5 0425 CYRILLIC CAPITAL LETTER HA
+C6 0426 CYRILLIC CAPITAL LETTER TSE
+C7 0427 CYRILLIC CAPITAL LETTER CHE
+C8 0428 CYRILLIC CAPITAL LETTER SHA
+C9 0429 CYRILLIC CAPITAL LETTER SHCHA
+CA 042a CYRILLIC CAPITAL LETTER HARD SIGN
+CB 042b CYRILLIC CAPITAL LETTER YERU
+CC 042c CYRILLIC CAPITAL LETTER SOFT SIGN
+CD 042d CYRILLIC CAPITAL LETTER E
+CE 042e CYRILLIC CAPITAL LETTER YU
+CF 042f CYRILLIC CAPITAL LETTER YA
+D0 0430 CYRILLIC SMALL LETTER A
+D1 0431 CYRILLIC SMALL LETTER BE
+D2 0432 CYRILLIC SMALL LETTER VE
+D3 0433 CYRILLIC SMALL LETTER GHE
+D4 0434 CYRILLIC SMALL LETTER DE
+D5 0435 CYRILLIC SMALL LETTER IE
+D6 0436 CYRILLIC SMALL LETTER ZHE
+D7 0437 CYRILLIC SMALL LETTER ZE
+D8 0438 CYRILLIC SMALL LETTER I
+D9 0439 CYRILLIC SMALL LETTER SHORT I
+DA 043a CYRILLIC SMALL LETTER KA
+DB 043b CYRILLIC SMALL LETTER EL
+DC 043c CYRILLIC SMALL LETTER EM
+DD 043d CYRILLIC SMALL LETTER EN
+DE 043e CYRILLIC SMALL LETTER O
+DF 043f CYRILLIC SMALL LETTER PE
+E0 0440 CYRILLIC SMALL LETTER ER
+E1 0441 CYRILLIC SMALL LETTER ES
+E2 0442 CYRILLIC SMALL LETTER TE
+E3 0443 CYRILLIC SMALL LETTER U
+E4 0444 CYRILLIC SMALL LETTER EF
+E5 0445 CYRILLIC SMALL LETTER HA
+E6 0446 CYRILLIC SMALL LETTER TSE
+E7 0447 CYRILLIC SMALL LETTER CHE
+E8 0448 CYRILLIC SMALL LETTER SHA
+E9 0449 CYRILLIC SMALL LETTER SHCHA
+EA 044a CYRILLIC SMALL LETTER HARD SIGN
+EB 044b CYRILLIC SMALL LETTER YERU
+EC 044c CYRILLIC SMALL LETTER SOFT SIGN
+ED 044d CYRILLIC SMALL LETTER E
+EE 044e CYRILLIC SMALL LETTER YU
+EF 044f CYRILLIC SMALL LETTER YA
+F0 2116 NUMERO SIGN
+F1 0451 CYRILLIC SMALL LETTER IO
+F2 0452 CYRILLIC SMALL LETTER DJE (Serbocroatian)
+F3 0453 CYRILLIC SMALL LETTER GJE (Macedonian)
+F4 0454 CYRILLIC SMALL LETTER UKRAINIAN IE
+F5 0455 CYRILLIC SMALL LETTER DZE (Macedonian)
+F6 0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
+F7 0457 CYRILLIC SMALL LETTER YI (Ukrainian)
+F8 0458 CYRILLIC SMALL LETTER JE
+F9 0459 CYRILLIC SMALL LETTER LJE
+FA 045a CYRILLIC SMALL LETTER NJE
+FB 045b CYRILLIC SMALL LETTER TSHE (Serbocroatian)
+FC 045c CYRILLIC SMALL LETTER KJE (Macedonian)
+FD 00a7 SECTION SIGN
+FE 045e CYRILLIC SMALL LETTER SHORT U (Byelorussian)
+FF 045f CYRILLIC SMALL LETTER DZHE
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-6.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-6.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-6.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-6.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0660 ARABIC-INDIC DIGIT ZERO
+31 0661 ARABIC-INDIC DIGIT ONE
+32 0662 ARABIC-INDIC DIGIT TWO
+33 0663 ARABIC-INDIC DIGIT THREE
+34 0664 ARABIC-INDIC DIGIT FOUR
+35 0665 ARABIC-INDIC DIGIT FIVE
+36 0666 ARABIC-INDIC DIGIT SIX
+37 0667 ARABIC-INDIC DIGIT SEVEN
+38 0668 ARABIC-INDIC DIGIT EIGHT
+39 0669 ARABIC-INDIC DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 ???? EMPTY
+A2 ???? EMPTY
+A3 ???? EMPTY
+A4 00a4 CURRENCY SIGN
+A5 ???? EMPTY
+A6 ???? EMPTY
+A7 ???? EMPTY
+A8 ???? EMPTY
+A9 ???? EMPTY
+AA ???? EMPTY
+AB ???? EMPTY
+AC 060c ARABIC COMMA
+AD 00ad SOFT HYPHEN
+AE ???? EMPTY
+AF ???? EMPTY
+B0 ???? EMPTY
+B1 ???? EMPTY
+B2 ???? EMPTY
+B3 ???? EMPTY
+B4 ???? EMPTY
+B5 ???? EMPTY
+B6 ???? EMPTY
+B7 ???? EMPTY
+B8 ???? EMPTY
+B9 ???? EMPTY
+BA ???? EMPTY
+BB 061b ARABIC SEMICOLON
+BC ???? EMPTY
+BD ???? EMPTY
+BE ???? EMPTY
+BF 061f ARABIC QUESTION MARK
+C0 ???? EMPTY
+C1 0621 ARABIC LETTER HAMZA
+C2 0622 ARABIC LETTER ALEF WITH MADDA ABOVE
+C3 0623 ARABIC LETTER ALEF WITH HAMZA ABOVE
+C4 0624 ARABIC LETTER WAW WITH HAMZA ABOVE
+C5 0625 ARABIC LETTER ALEF WITH HAMZA BELOW
+C6 0626 ARABIC LETTER YEH WITH HAMZA ABOVE
+C7 0627 ARABIC LETTER ALEF
+C8 0628 ARABIC LETTER BEH
+C9 0629 ARABIC LETTER TEH MARBUTA
+CA 062a ARABIC LETTER TEH
+CB 062b ARABIC LETTER THEH
+CC 062c ARABIC LETTER JEEM
+CD 062d ARABIC LETTER HAH
+CE 062e ARABIC LETTER KHAH
+CF 062f ARABIC LETTER DAL
+D0 0630 ARABIC LETTER THAL
+D1 0631 ARABIC LETTER REH
+D2 0632 ARABIC LETTER ZAIN
+D3 0633 ARABIC LETTER SEEN
+D4 0634 ARABIC LETTER SHEEN
+D5 0635 ARABIC LETTER SAD
+D6 0636 ARABIC LETTER DAD
+D7 0637 ARABIC LETTER TAH
+D8 0638 ARABIC LETTER ZAH
+D9 0639 ARABIC LETTER AIN
+DA 063a ARABIC LETTER GHAIN
+DB ???? EMPTY
+DC ???? EMPTY
+DD ???? EMPTY
+DE ???? EMPTY
+DF ???? EMPTY
+E0 0640 ARABIC TATWEEL
+E1 0641 ARABIC LETTER FEH
+E2 0642 ARABIC LETTER QAF
+E3 0643 ARABIC LETTER KAF
+E4 0644 ARABIC LETTER LAM
+E5 0645 ARABIC LETTER MEEM
+E6 0646 ARABIC LETTER NOON
+E7 0647 ARABIC LETTER HEH
+E8 0648 ARABIC LETTER WAW
+E9 0649 ARABIC LETTER ALEF MAKSURA
+EA 064a ARABIC LETTER YEH
+EB 064b ARABIC FATHATAN
+EC 064c ARABIC DAMMATAN
+ED 064d ARABIC KASRATAN
+EE 064e ARABIC FATHA
+EF 064f ARABIC DAMMA
+F0 0650 ARABIC KASRA
+F1 0651 ARABIC SHADDA
+F2 0652 ARABIC SUKUN
+F3 ???? EMPTY
+F4 ???? EMPTY
+F5 ???? EMPTY
+F6 ???? EMPTY
+F7 ???? EMPTY
+F8 ???? EMPTY
+F9 ???? EMPTY
+FA ???? EMPTY
+FB ???? EMPTY
+FC ???? EMPTY
+FD ???? EMPTY
+FE ???? EMPTY
+FF ???? EMPTY
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-7.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-7.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-7.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-7.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 02bd MODIFIER LETTER REVERSED COMMA
+A2 02bc MODIFIER LETTER APOSTROPHE
+A3 00a3 POUND SIGN
+A4 ???? EMPTY
+A5 ???? EMPTY
+A6 00a6 BROKEN BAR
+A7 00a7 SECTION SIGN
+A8 00a8 DIAERESIS
+A9 00a9 COPYRIGHT SIGN
+AA ???? EMPTY
+AB 00ab LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+AC 00ac NOT SIGN
+AD 00ad SOFT HYPHEN
+AE ???? EMPTY
+AF 2015 HORIZONTAL BAR
+B0 00b0 DEGREE SIGN
+B1 00b1 PLUS-MINUS SIGN
+B2 00b2 SUPERSCRIPT TWO
+B3 00b3 SUPERSCRIPT THREE
+B4 0384 GREEK TONOS
+B5 0385 GREEK DIALYTIKA TONOS
+B6 0386 GREEK CAPITAL LETTER ALPHA WITH TONOS
+B7 00b7 MIDDLE DOT
+B8 0388 GREEK CAPITAL LETTER EPSILON WITH TONOS
+B9 0389 GREEK CAPITAL LETTER ETA WITH TONOS
+BA 038a GREEK CAPITAL LETTER IOTA WITH TONOS
+BB 00bb RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+BC 038c GREEK CAPITAL LETTER OMICRON WITH TONOS
+BD 00bd VULGAR FRACTION ONE HALF
+BE 038e GREEK CAPITAL LETTER UPSILON WITH TONOS
+BF 038f GREEK CAPITAL LETTER OMEGA WITH TONOS
+C0 0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
+C1 0391 GREEK CAPITAL LETTER ALPHA
+C2 0392 GREEK CAPITAL LETTER BETA
+C3 0393 GREEK CAPITAL LETTER GAMMA
+C4 0394 GREEK CAPITAL LETTER DELTA
+C5 0395 GREEK CAPITAL LETTER EPSILON
+C6 0396 GREEK CAPITAL LETTER ZETA
+C7 0397 GREEK CAPITAL LETTER ETA
+C8 0398 GREEK CAPITAL LETTER THETA
+C9 0399 GREEK CAPITAL LETTER IOTA
+CA 039a GREEK CAPITAL LETTER KAPPA
+CB 039b GREEK CAPITAL LETTER LAMDA
+CC 039c GREEK CAPITAL LETTER MU
+CD 039d GREEK CAPITAL LETTER NU
+CE 039e GREEK CAPITAL LETTER XI
+CF 039f GREEK CAPITAL LETTER OMICRON
+D0 03a0 GREEK CAPITAL LETTER PI
+D1 03a1 GREEK CAPITAL LETTER RHO
+D2 ???? EMPTY
+D3 03a3 GREEK CAPITAL LETTER SIGMA
+D4 03a4 GREEK CAPITAL LETTER TAU
+D5 03a5 GREEK CAPITAL LETTER UPSILON
+D6 03a6 GREEK CAPITAL LETTER PHI
+D7 03a7 GREEK CAPITAL LETTER CHI
+D8 03a8 GREEK CAPITAL LETTER PSI
+D9 03a9 GREEK CAPITAL LETTER OMEGA
+DA 03aa GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
+DB 03ab GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
+DC 03ac GREEK SMALL LETTER ALPHA WITH TONOS
+DD 03ad GREEK SMALL LETTER EPSILON WITH TONOS
+DE 03ae GREEK SMALL LETTER ETA WITH TONOS
+DF 03af GREEK SMALL LETTER IOTA WITH TONOS
+E0 03b0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
+E1 03b1 GREEK SMALL LETTER ALPHA
+E2 03b2 GREEK SMALL LETTER BETA
+E3 03b3 GREEK SMALL LETTER GAMMA
+E4 03b4 GREEK SMALL LETTER DELTA
+E5 03b5 GREEK SMALL LETTER EPSILON
+E6 03b6 GREEK SMALL LETTER ZETA
+E7 03b7 GREEK SMALL LETTER ETA
+E8 03b8 GREEK SMALL LETTER THETA
+E9 03b9 GREEK SMALL LETTER IOTA
+EA 03ba GREEK SMALL LETTER KAPPA
+EB 03bb GREEK SMALL LETTER LAMDA
+EC 03bc GREEK SMALL LETTER MU
+ED 03bd GREEK SMALL LETTER NU
+EE 03be GREEK SMALL LETTER XI
+EF 03bf GREEK SMALL LETTER OMICRON
+F0 03c0 GREEK SMALL LETTER PI
+F1 03c1 GREEK SMALL LETTER RHO
+F2 03c2 GREEK SMALL LETTER FINAL SIGMA
+F3 03c3 GREEK SMALL LETTER SIGMA
+F4 03c4 GREEK SMALL LETTER TAU
+F5 03c5 GREEK SMALL LETTER UPSILON
+F6 03c6 GREEK SMALL LETTER PHI
+F7 03c7 GREEK SMALL LETTER CHI
+F8 03c8 GREEK SMALL LETTER PSI
+F9 03c9 GREEK SMALL LETTER OMEGA
+FA 03ca GREEK SMALL LETTER IOTA WITH DIALYTIKA
+FB 03cb GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+FC 03cc GREEK SMALL LETTER OMICRON WITH TONOS
+FD 03cd GREEK SMALL LETTER UPSILON WITH TONOS
+FE 03ce GREEK SMALL LETTER OMEGA WITH TONOS
+FF ???? EMPTY
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-8.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-8.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-8.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-8.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 ???? EMPTY
+A2 00a2 CENT SIGN
+A3 00a3 POUND SIGN
+A4 00a4 CURRENCY SIGN
+A5 00a5 YEN SIGN
+A6 00a6 BROKEN BAR
+A7 00a7 SECTION SIGN
+A8 00a8 DIAERESIS
+A9 00a9 COPYRIGHT SIGN
+AA 00d7 MULTIPLICATION SIGN
+AB 00ab LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+AC 00ac NOT SIGN
+AD 00ad SOFT HYPHEN
+AE 00ae REGISTERED SIGN
+AF 203e OVERLINE
+B0 00b0 DEGREE SIGN
+B1 00b1 PLUS-MINUS SIGN
+B2 00b2 SUPERSCRIPT TWO
+B3 00b3 SUPERSCRIPT THREE
+B4 00b4 ACUTE ACCENT
+B5 00b5 MICRO SIGN
+B6 00b6 PILCROW SIGN
+B7 00b7 MIDDLE DOT
+B8 00b8 CEDILLA
+B9 00b9 SUPERSCRIPT ONE
+BA 00f7 DIVISION SIGN
+BB 00bb RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+BC 00bc VULGAR FRACTION ONE QUARTER
+BD 00bd VULGAR FRACTION ONE HALF
+BE 00be VULGAR FRACTION THREE QUARTERS
+BF ???? EMPTY
+C0 ???? EMPTY
+C1 ???? EMPTY
+C2 ???? EMPTY
+C3 ???? EMPTY
+C4 ???? EMPTY
+C5 ???? EMPTY
+C6 ???? EMPTY
+C7 ???? EMPTY
+C8 ???? EMPTY
+C9 ???? EMPTY
+CA ???? EMPTY
+CB ???? EMPTY
+CC ???? EMPTY
+CD ???? EMPTY
+CE ???? EMPTY
+CF ???? EMPTY
+D0 ???? EMPTY
+D1 ???? EMPTY
+D2 ???? EMPTY
+D3 ???? EMPTY
+D4 ???? EMPTY
+D5 ???? EMPTY
+D6 ???? EMPTY
+D7 ???? EMPTY
+D8 ???? EMPTY
+D9 ???? EMPTY
+DA ???? EMPTY
+DB ???? EMPTY
+DC ???? EMPTY
+DD ???? EMPTY
+DE ???? EMPTY
+DF 2017 DOUBLE LOW LINE
+E0 05d0 HEBREW LETTER ALEF
+E1 05d1 HEBREW LETTER BET
+E2 05d2 HEBREW LETTER GIMEL
+E3 05d3 HEBREW LETTER DALET
+E4 05d4 HEBREW LETTER HE
+E5 05d5 HEBREW LETTER VAV
+E6 05d6 HEBREW LETTER ZAYIN
+E7 05d7 HEBREW LETTER HET
+E8 05d8 HEBREW LETTER TET
+E9 05d9 HEBREW LETTER YOD
+EA 05da HEBREW LETTER FINAL KAF
+EB 05db HEBREW LETTER KAF
+EC 05dc HEBREW LETTER LAMED
+ED 05dd HEBREW LETTER FINAL MEM
+EE 05de HEBREW LETTER MEM
+EF 05df HEBREW LETTER FINAL NUN
+F0 05e0 HEBREW LETTER NUN
+F1 05e1 HEBREW LETTER SAMEKH
+F2 05e2 HEBREW LETTER AYIN
+F3 05e3 HEBREW LETTER FINAL PE
+F4 05e4 HEBREW LETTER PE
+F5 05e5 HEBREW LETTER FINAL TSADI
+F6 05e6 HEBREW LETTER TSADI
+F7 05e7 HEBREW LETTER QOF
+F8 05e8 HEBREW LETTER RESH
+F9 05e9 HEBREW LETTER SHIN
+FA 05ea HEBREW LETTER TAV
+FB ???? EMPTY
+FC ???? EMPTY
+FD ???? EMPTY
+FE ???? EMPTY
+FF ???? EMPTY
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-9.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-9.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-9.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/iso-8859-9.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 0080 PADDING CHARACTER (PAD)
+81 0081 HIGH OCTET PRESET (HOP)
+82 0082 BREAK PERMITTED HERE (BPH)
+83 0083 NO BREAK HERE (NBH)
+84 0084 INDEX (IND)
+85 0085 NEXT LINE (NEL)
+86 0086 START OF SELECTED AREA (SSA)
+87 0087 END OF SELECTED AREA (ESA)
+88 0088 CHARACTER TABULATION SET (HTS)
+89 0089 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
+8A 008a LINE TABULATION SET (VTS)
+8B 008b PARTIAL LINE FORWARD (PLD)
+8C 008c PARTIAL LINE BACKWARD (PLU)
+8D 008d REVERSE LINE FEED (RI)
+8E 008e SINGLE-SHIFT TWO (SS2)
+8F 008f SINGLE-SHIFT THREE (SS3)
+90 0090 DEVICE CONTROL STRING (DCS)
+91 0091 PRIVATE USE ONE (PU1)
+92 0092 PRIVATE USE TWO (PU2)
+93 0093 SET TRANSMIT STATE (STS)
+94 0094 CANCEL CHARACTER (CCH)
+95 0095 MESSAGE WAITING (MW)
+96 0096 START OF GUARDED AREA (SPA)
+97 0097 END OF GUARDED AREA (EPA)
+98 0098 START OF STRING (SOS)
+99 0099 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
+9A 009a SINGLE CHARACTER INTRODUCER (SCI)
+9B 009b CONTROL SEQUENCE INTRODUCER (CSI)
+9C 009c STRING TERMINATOR (ST)
+9D 009d OPERATING SYSTEM COMMAND (OSC)
+9E 009e PRIVACY MESSAGE (PM)
+9F 009f APPLICATION PROGRAM COMMAND (APC)
+A0 00a0 NO-BREAK SPACE
+A1 00a1 INVERTED EXCLAMATION MARK
+A2 00a2 CENT SIGN
+A3 00a3 POUND SIGN
+A4 00a4 CURRENCY SIGN
+A5 00a5 YEN SIGN
+A6 00a6 BROKEN BAR
+A7 00a7 SECTION SIGN
+A8 00a8 DIAERESIS
+A9 00a9 COPYRIGHT SIGN
+AA 00aa FEMININE ORDINAL INDICATOR
+AB 00ab LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+AC 00ac NOT SIGN
+AD 00ad SOFT HYPHEN
+AE 00ae REGISTERED SIGN
+AF 00af MACRON
+B0 00b0 DEGREE SIGN
+B1 00b1 PLUS-MINUS SIGN
+B2 00b2 SUPERSCRIPT TWO
+B3 00b3 SUPERSCRIPT THREE
+B4 00b4 ACUTE ACCENT
+B5 00b5 MICRO SIGN
+B6 00b6 PILCROW SIGN
+B7 00b7 MIDDLE DOT
+B8 00b8 CEDILLA
+B9 00b9 SUPERSCRIPT ONE
+BA 00ba MASCULINE ORDINAL INDICATOR
+BB 00bb RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+BC 00bc VULGAR FRACTION ONE QUARTER
+BD 00bd VULGAR FRACTION ONE HALF
+BE 00be VULGAR FRACTION THREE QUARTERS
+BF 00bf INVERTED QUESTION MARK
+C0 00c0 LATIN CAPITAL LETTER A WITH GRAVE
+C1 00c1 LATIN CAPITAL LETTER A WITH ACUTE
+C2 00c2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+C3 00c3 LATIN CAPITAL LETTER A WITH TILDE
+C4 00c4 LATIN CAPITAL LETTER A WITH DIAERESIS
+C5 00c5 LATIN CAPITAL LETTER A WITH RING ABOVE
+C6 00c6 LATIN CAPITAL LETTER AE
+C7 00c7 LATIN CAPITAL LETTER C WITH CEDILLA
+C8 00c8 LATIN CAPITAL LETTER E WITH GRAVE
+C9 00c9 LATIN CAPITAL LETTER E WITH ACUTE
+CA 00ca LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+CB 00cb LATIN CAPITAL LETTER E WITH DIAERESIS
+CC 00cc LATIN CAPITAL LETTER I WITH GRAVE
+CD 00cd LATIN CAPITAL LETTER I WITH ACUTE
+CE 00ce LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+CF 00cf LATIN CAPITAL LETTER I WITH DIAERESIS
+D0 011e LATIN CAPITAL LETTER G WITH BREVE
+D1 00d1 LATIN CAPITAL LETTER N WITH TILDE
+D2 00d2 LATIN CAPITAL LETTER O WITH GRAVE
+D3 00d3 LATIN CAPITAL LETTER O WITH ACUTE
+D4 00d4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+D5 00d5 LATIN CAPITAL LETTER O WITH TILDE
+D6 00d6 LATIN CAPITAL LETTER O WITH DIAERESIS
+D7 00d7 MULTIPLICATION SIGN
+D8 00d8 LATIN CAPITAL LETTER O WITH STROKE
+D9 00d9 LATIN CAPITAL LETTER U WITH GRAVE
+DA 00da LATIN CAPITAL LETTER U WITH ACUTE
+DB 00db LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+DC 00dc LATIN CAPITAL LETTER U WITH DIAERESIS
+DD 0130 LATIN CAPITAL LETTER I WITH DOT ABOVE
+DE 015e LATIN CAPITAL LETTER S WITH CEDILLA
+DF 00df LATIN SMALL LETTER SHARP S (German)
+E0 00e0 LATIN SMALL LETTER A WITH GRAVE
+E1 00e1 LATIN SMALL LETTER A WITH ACUTE
+E2 00e2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+E3 00e3 LATIN SMALL LETTER A WITH TILDE
+E4 00e4 LATIN SMALL LETTER A WITH DIAERESIS
+E5 00e5 LATIN SMALL LETTER A WITH RING ABOVE
+E6 00e6 LATIN SMALL LETTER AE
+E7 00e7 LATIN SMALL LETTER C WITH CEDILLA
+E8 00e8 LATIN SMALL LETTER E WITH GRAVE
+E9 00e9 LATIN SMALL LETTER E WITH ACUTE
+EA 00ea LATIN SMALL LETTER E WITH CIRCUMFLEX
+EB 00eb LATIN SMALL LETTER E WITH DIAERESIS
+EC 00ec LATIN SMALL LETTER I WITH GRAVE
+ED 00ed LATIN SMALL LETTER I WITH ACUTE
+EE 00ee LATIN SMALL LETTER I WITH CIRCUMFLEX
+EF 00ef LATIN SMALL LETTER I WITH DIAERESIS
+F0 011f LATIN SMALL LETTER G WITH BREVE
+F1 00f1 LATIN SMALL LETTER N WITH TILDE
+F2 00f2 LATIN SMALL LETTER O WITH GRAVE
+F3 00f3 LATIN SMALL LETTER O WITH ACUTE
+F4 00f4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+F5 00f5 LATIN SMALL LETTER O WITH TILDE
+F6 00f6 LATIN SMALL LETTER O WITH DIAERESIS
+F7 00f7 DIVISION SIGN
+F8 00f8 LATIN SMALL LETTER O WITH STROKE
+F9 00f9 LATIN SMALL LETTER U WITH GRAVE
+FA 00fa LATIN SMALL LETTER U WITH ACUTE
+FB 00fb LATIN SMALL LETTER U WITH CIRCUMFLEX
+FC 00fc LATIN SMALL LETTER U WITH DIAERESIS
+FD 0131 LATIN SMALL LETTER I DOTLESS
+FE 015f LATIN SMALL LETTER S WITH CEDILLA
+FF 00ff LATIN SMALL LETTER Y WITH DIAERESIS
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/koi8-r.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/koi8-r.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/koi8-r.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/koi8-r.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 2500 FORMS LIGHT HORIZONTAL
+81 2502 FORMS LIGHT VERTICAL
+82 250c FORMS LIGHT DOWN AND RIGHT
+83 2510 FORMS LIGHT DOWN AND LEFT
+84 2514 FORMS LIGHT UP
+85 2518 FORMS LIGHT UP AND LEFT
+86 251c FORMS LIGHT VERTICAL AND RIGHT
+87 2524 FORMS LIGHT VERTICAL AND LEFT
+88 252c FORMS LIGHT DOWN AND HORIZONTAL
+89 2534 FORMS LIGHT UP AND HORIZONTAL
+8A 253c FORMS LIGHT VERTICAL AND HORIZONTAL
+8B 2580 UPPER HALF BLOCK
+8C 2584 LOWER HALF BLOCK
+8D 2588 FULL BLOCK
+8E 258c LEFT HALF BLOCK
+8F 2590 RIGHT HALF BLOCK
+90 2591 LIGHT SHADE
+91 2592 MEDIUM SHADE
+92 2593 DARK SHADE
+93 2320 TOP HALF INTEGRAL
+94 25a0 BLACK SMALL SQUARE
+95 2219 BULLET OPERATOR
+96 221a SQUARE ROOT
+97 2248 ALMOST EQUAL TO
+98 2264 LESS THAN OR EQUAL TO
+99 2265 GREATER THAN OR EQUAL TO
+9A 00a0 NON-BREAKING SPACE
+9B 2321 BOTTOM HALF INTEGRAL
+9C 00b0 DEGREE SIGN
+9D 00b2 SUPERSCRIPT DIGIT TWO
+9E 00b7 MIDDLE DOT
+9F 00f7 DIVISION SIGN
+A0 2550 FORMS DOUBLE HORIZONTAL
+A1 2551 FORMS DOUBLE VERTICAL
+A2 2552 FORMS DOWN SINGLE AND RIGHT DOUBLE
+A3 0451 CYRILLIC SMALL LETTER IO
+A4 2553 FORMS DOWN DOUBLE AND RIGHT SINGLE
+A5 2554 FORMS DOUBLE DOWN AND RIGHT
+A6 2555 FORMS DOWN SINGLE AND LEFT DOUBLE
+A7 2556 FORMS DOWN DOUBLE AND LEFT SINGLE
+A8 2557 FORMS DOUBLE DOWN AND LEFT
+A9 2558 FORMS UP SINGLE AND RIGHT DOUBLE
+AA 2559 FORMS UP DOUBLE AND RIGHT SINGLE
+AB 255a FORMS DOUBLE UP AND RIGHT
+AC 255b FORMS UP SINGLE AND LEFT DOUBLE
+AD 255c FORMS UP DOUBLE AND LEFT SINGLE
+AE 255d FORMS DOUBLE UP AND LEFT
+AF 255e FORMS VERTICAL SINGLE AND RIGHT DOUBLE
+B0 255f FORMS VERTICAL DOUBLE AND RIGHT SINGLE
+B1 2560 FORMS DOUBLE VERTICAL AND RIGHT
+B2 2561 FORMS VERTICAL SINGLE AND LEFT DOUBLE
+B3 0401 CYRILLIC CAPITAL LETTER IO
+B4 2562 FORMS VERTICAL DOUBLE AND LEFT SINGLE
+B5 2563 FORMS DOUBLE VERTICAL AND LEFT
+B6 2564 FORMS DOWN SINGLE AND HORIZONTAL DOUBLE
+B7 2565 FORMS DOWN DOUBLE AND HORIZONTAL SINGLE
+B8 2566 FORMS DOUBLE DOWN AND HORIZONTAL
+B9 2567 FORMS UP SINGLE AND HORIZONTAL DOUBLE
+BA 2568 FORMS UP DOUBLE AND HORIZONTAL SINGLE
+BB 2569 FORMS DOUBLE UP AND HORIZONTAL
+BC 256a FORMS VERTICAL SINGLE AND HORIZONTAL DOUBLE
+BD 256b FORMS VERTICAL DOUBLE AND HORIZONTAL SINGLE
+BE 256c FORMS DOUBLE VERTICAL AND HORIZONTAL
+BF 00a9 COPYRIGHT SIGN
+C0 044e CYRILLIC SMALL LETTER IU
+C1 0430 CYRILLIC SMALL LETTER A
+C2 0431 CYRILLIC SMALL LETTER BE
+C3 0446 CYRILLIC SMALL LETTER TSE
+C4 0434 CYRILLIC SMALL LETTER DE
+C5 0435 CYRILLIC SMALL LETTER IE
+C6 0444 CYRILLIC SMALL LETTER EF
+C7 0433 CYRILLIC SMALL LETTER GE
+C8 0445 CYRILLIC SMALL LETTER KHA
+C9 0438 CYRILLIC SMALL LETTER II
+CA 0439 CYRILLIC SMALL LETTER SHORT II
+CB 043a CYRILLIC SMALL LETTER KA
+CC 043b CYRILLIC SMALL LETTER EL
+CD 043c CYRILLIC SMALL LETTER EM
+CE 043d CYRILLIC SMALL LETTER EN
+CF 043e CYRILLIC SMALL LETTER O
+D0 043f CYRILLIC SMALL LETTER PE
+D1 044f CYRILLIC SMALL LETTER IA
+D2 0440 CYRILLIC SMALL LETTER ER
+D3 0441 CYRILLIC SMALL LETTER ES
+D4 0442 CYRILLIC SMALL LETTER TE
+D5 0443 CYRILLIC SMALL LETTER U
+D6 0436 CYRILLIC SMALL LETTER ZHE
+D7 0432 CYRILLIC SMALL LETTER VE
+D8 044c CYRILLIC SMALL LETTER SOFT SIGN
+D9 044b CYRILLIC SMALL LETTER YERI
+DA 0437 CYRILLIC SMALL LETTER ZE
+DB 0448 CYRILLIC SMALL LETTER SHA
+DC 044d CYRILLIC SMALL LETTER REVERSED E
+DD 0449 CYRILLIC SMALL LETTER SHCHA
+DE 0447 CYRILLIC SMALL LETTER CHE
+DF 044a CYRILLIC SMALL LETTER HARD SIGN
+E0 042e CYRILLIC CAPITAL LETTER IU
+E1 0410 CYRILLIC CAPITAL LETTER A
+E2 0411 CYRILLIC CAPITAL LETTER BE
+E3 0426 CYRILLIC CAPITAL LETTER TSE
+E4 0414 CYRILLIC CAPITAL LETTER DE
+E5 0415 CYRILLIC CAPITAL LETTER IE
+E6 0424 CYRILLIC CAPITAL LETTER EF
+E7 0413 CYRILLIC CAPITAL LETTER GE
+E8 0425 CYRILLIC CAPITAL LETTER KHA
+E9 0418 CYRILLIC CAPITAL LETTER II
+EA 0419 CYRILLIC CAPITAL LETTER SHORT II
+EB 041a CYRILLIC CAPITAL LETTER KA
+EC 041b CYRILLIC CAPITAL LETTER EL
+ED 041c CYRILLIC CAPITAL LETTER EM
+EE 041d CYRILLIC CAPITAL LETTER EN
+EF 041e CYRILLIC CAPITAL LETTER O
+F0 041f CYRILLIC CAPITAL LETTER PE
+F1 042f CYRILLIC CAPITAL LETTER IA
+F2 0420 CYRILLIC CAPITAL LETTER ER
+F3 0421 CYRILLIC CAPITAL LETTER ES
+F4 0422 CYRILLIC CAPITAL LETTER TE
+F5 0423 CYRILLIC CAPITAL LETTER U
+F6 0416 CYRILLIC CAPITAL LETTER ZHE
+F7 0412 CYRILLIC CAPITAL LETTER VE
+F8 042c CYRILLIC CAPITAL LETTER SOFT SIGN
+F9 042b CYRILLIC CAPITAL LETTER YERI
+FA 0417 CYRILLIC CAPITAL LETTER ZE
+FB 0428 CYRILLIC CAPITAL LETTER SHA
+FC 042d CYRILLIC CAPITAL LETTER REVERSED E
+FD 0429 CYRILLIC CAPITAL LETTER SHCHA
+FE 0427 CYRILLIC CAPITAL LETTER CHE
+FF 042a CYRILLIC CAPITAL LETTER HARD SIGN
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unidata2.txt
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unidata2.txt?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unidata2.txt (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unidata2.txt Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6588 @@
+0000;<control>;Cc;0;ON;;;;;N;NULL;;;;
+0001;<control>;Cc;0;ON;;;;;N;START OF HEADING;;;;
+0002;<control>;Cc;0;ON;;;;;N;START OF TEXT;;;;
+0003;<control>;Cc;0;ON;;;;;N;END OF TEXT;;;;
+0004;<control>;Cc;0;ON;;;;;N;END OF TRANSMISSION;;;;
+0005;<control>;Cc;0;ON;;;;;N;ENQUIRY;;;;
+0006;<control>;Cc;0;ON;;;;;N;ACKNOWLEDGE;;;;
+0007;<control>;Cc;0;ON;;;;;N;BELL;;;;
+0008;<control>;Cc;0;ON;;;;;N;BACKSPACE;;;;
+0009;<control>;Cc;0;ON;;;;;N;HORIZONTAL TABULATION;;;;
+000A;<control>;Cc;0;ON;;;;;N;LINE FEED;;;;
+000B;<control>;Cc;0;ON;;;;;N;VERTICAL TABULATION;;;;
+000C;<control>;Cc;0;ON;;;;;N;FORM FEED;;;;
+000D;<control>;Cc;0;ON;;;;;N;CARRIAGE RETURN;;;;
+000E;<control>;Cc;0;ON;;;;;N;SHIFT OUT;;;;
+000F;<control>;Cc;0;ON;;;;;N;SHIFT IN;;;;
+0010;<control>;Cc;0;ON;;;;;N;DATA LINK ESCAPE;;;;
+0011;<control>;Cc;0;ON;;;;;N;DEVICE CONTROL ONE;;;;
+0012;<control>;Cc;0;ON;;;;;N;DEVICE CONTROL TWO;;;;
+0013;<control>;Cc;0;ON;;;;;N;DEVICE CONTROL THREE;;;;
+0014;<control>;Cc;0;ON;;;;;N;DEVICE CONTROL FOUR;;;;
+0015;<control>;Cc;0;ON;;;;;N;NEGATIVE ACKNOWLEDGE;;;;
+0016;<control>;Cc;0;ON;;;;;N;SYNCHRONOUS IDLE;;;;
+0017;<control>;Cc;0;ON;;;;;N;END OF TRANSMISSION BLOCK;;;;
+0018;<control>;Cc;0;ON;;;;;N;CANCEL;;;;
+0019;<control>;Cc;0;ON;;;;;N;END OF MEDIUM;;;;
+001A;<control>;Cc;0;ON;;;;;N;SUBSTITUTE;;;;
+001B;<control>;Cc;0;ON;;;;;N;ESCAPE;;;;
+001C;<control>;Cc;0;ON;;;;;N;FILE SEPARATOR;;;;
+001D;<control>;Cc;0;ON;;;;;N;GROUP SEPARATOR;;;;
+001E;<control>;Cc;0;ON;;;;;N;RECORD SEPARATOR;;;;
+001F;<control>;Cc;0;ON;;;;;N;UNIT SEPARATOR;;;;
+0020;SPACE;Zs;0;WS;;;;;N;;;;;
+0021;EXCLAMATION MARK;Po;0;ON;;;;;N;;;;;
+0022;QUOTATION MARK;Po;0;ON;;;;;N;;;;;
+0023;NUMBER SIGN;So;0;ET;;;;;N;;;;;
+0024;DOLLAR SIGN;Sc;0;ET;;;;;N;;;;;
+0025;PERCENT SIGN;Po;0;ET;;;;;N;;;;;
+0026;AMPERSAND;So;0;L;;;;;N;;;;;
+0027;APOSTROPHE;Po;0;ON;;;;;N;APOSTROPHE-QUOTE;;;;
+0028;LEFT PARENTHESIS;Ps;0;ON;;;;;Y;OPENING PARENTHESIS;;;;
+0029;RIGHT PARENTHESIS;Pe;0;ON;;;;;Y;CLOSING PARENTHESIS;;;;
+002A;ASTERISK;So;0;ON;;;;;N;;;;;
+002B;PLUS SIGN;Sm;0;ET;;;;;N;;;;;
+002C;COMMA;Po;0;CS;;;;;N;;;;;
+002D;HYPHEN-MINUS;Pd;0;ET;;;;;N;;;;;
+002E;FULL STOP;Po;0;ES;;;;;N;PERIOD;;;;
+002F;SOLIDUS;Po;0;ES;;;;;N;SLASH;;;;
+0030;DIGIT ZERO;Nd;0;EN;;0;0;0;N;;;;;
+0031;DIGIT ONE;Nd;0;EN;;1;1;1;N;;;;;
+0032;DIGIT TWO;Nd;0;EN;;2;2;2;N;;;;;
+0033;DIGIT THREE;Nd;0;EN;;3;3;3;N;;;;;
+0034;DIGIT FOUR;Nd;0;EN;;4;4;4;N;;;;;
+0035;DIGIT FIVE;Nd;0;EN;;5;5;5;N;;;;;
+0036;DIGIT SIX;Nd;0;EN;;6;6;6;N;;;;;
+0037;DIGIT SEVEN;Nd;0;EN;;7;7;7;N;;;;;
+0038;DIGIT EIGHT;Nd;0;EN;;8;8;8;N;;;;;
+0039;DIGIT NINE;Nd;0;EN;;9;9;9;N;;;;;
+003A;COLON;Po;0;CS;;;;;N;;;;;
+003B;SEMICOLON;Po;0;ON;;;;;N;;;;;
+003C;LESS-THAN SIGN;Sm;0;ON;;;;;Y;;;;;
+003D;EQUALS SIGN;Sm;0;ON;;;;;N;;;;;
+003E;GREATER-THAN SIGN;Sm;0;ON;;;;;Y;;;;;
+003F;QUESTION MARK;Po;0;ON;;;;;N;;;;;
+0040;COMMERCIAL AT;So;0;L;;;;;N;;;;;
+0041;LATIN CAPITAL LETTER A;Lu;0;L;;;;;N;;;;0061;
+0042;LATIN CAPITAL LETTER B;Lu;0;L;;;;;N;;;;0062;
+0043;LATIN CAPITAL LETTER C;Lu;0;L;;;;;N;;;;0063;
+0044;LATIN CAPITAL LETTER D;Lu;0;L;;;;;N;;;;0064;
+0045;LATIN CAPITAL LETTER E;Lu;0;L;;;;;N;;;;0065;
+0046;LATIN CAPITAL LETTER F;Lu;0;L;;;;;N;;;;0066;
+0047;LATIN CAPITAL LETTER G;Lu;0;L;;;;;N;;;;0067;
+0048;LATIN CAPITAL LETTER H;Lu;0;L;;;;;N;;;;0068;
+0049;LATIN CAPITAL LETTER I;Lu;0;L;;;;;N;;;;0069;
+004A;LATIN CAPITAL LETTER J;Lu;0;L;;;;;N;;;;006A;
+004B;LATIN CAPITAL LETTER K;Lu;0;L;;;;;N;;;;006B;
+004C;LATIN CAPITAL LETTER L;Lu;0;L;;;;;N;;;;006C;
+004D;LATIN CAPITAL LETTER M;Lu;0;L;;;;;N;;;;006D;
+004E;LATIN CAPITAL LETTER N;Lu;0;L;;;;;N;;;;006E;
+004F;LATIN CAPITAL LETTER O;Lu;0;L;;;;;N;;;;006F;
+0050;LATIN CAPITAL LETTER P;Lu;0;L;;;;;N;;;;0070;
+0051;LATIN CAPITAL LETTER Q;Lu;0;L;;;;;N;;;;0071;
+0052;LATIN CAPITAL LETTER R;Lu;0;L;;;;;N;;;;0072;
+0053;LATIN CAPITAL LETTER S;Lu;0;L;;;;;N;;;;0073;
+0054;LATIN CAPITAL LETTER T;Lu;0;L;;;;;N;;;;0074;
+0055;LATIN CAPITAL LETTER U;Lu;0;L;;;;;N;;;;0075;
+0056;LATIN CAPITAL LETTER V;Lu;0;L;;;;;N;;;;0076;
+0057;LATIN CAPITAL LETTER W;Lu;0;L;;;;;N;;;;0077;
+0058;LATIN CAPITAL LETTER X;Lu;0;L;;;;;N;;;;0078;
+0059;LATIN CAPITAL LETTER Y;Lu;0;L;;;;;N;;;;0079;
+005A;LATIN CAPITAL LETTER Z;Lu;0;L;;;;;N;;;;007A;
+005B;LEFT SQUARE BRACKET;Ps;0;ON;;;;;Y;OPENING SQUARE BRACKET;;;;
+005C;REVERSE SOLIDUS;Po;0;ON;;;;;N;BACKSLASH;;;;
+005D;RIGHT SQUARE BRACKET;Pe;0;ON;;;;;Y;CLOSING SQUARE BRACKET;;;;
+005E;CIRCUMFLEX ACCENT;Lm;0;ON;<compat> 0020 0302;;;;N;SPACING CIRCUMFLEX;;;;
+005F;LOW LINE;So;0;ON;<compat> 0020 0332;;;;N;SPACING UNDERSCORE;;;;
+0060;GRAVE ACCENT;Lm;0;ON;<compat> 0020 0300;;;;N;SPACING GRAVE;;;;
+0061;LATIN SMALL LETTER A;Ll;0;L;;;;;N;;;0041;;0041
+0062;LATIN SMALL LETTER B;Ll;0;L;;;;;N;;;0042;;0042
+0063;LATIN SMALL LETTER C;Ll;0;L;;;;;N;;;0043;;0043
+0064;LATIN SMALL LETTER D;Ll;0;L;;;;;N;;;0044;;0044
+0065;LATIN SMALL LETTER E;Ll;0;L;;;;;N;;;0045;;0045
+0066;LATIN SMALL LETTER F;Ll;0;L;;;;;N;;;0046;;0046
+0067;LATIN SMALL LETTER G;Ll;0;L;;;;;N;;;0047;;0047
+0068;LATIN SMALL LETTER H;Ll;0;L;;;;;N;;;0048;;0048
+0069;LATIN SMALL LETTER I;Ll;0;L;;;;;N;;;0049;;0049
+006A;LATIN SMALL LETTER J;Ll;0;L;;;;;N;;;004A;;004A
+006B;LATIN SMALL LETTER K;Ll;0;L;;;;;N;;;004B;;004B
+006C;LATIN SMALL LETTER L;Ll;0;L;;;;;N;;;004C;;004C
+006D;LATIN SMALL LETTER M;Ll;0;L;;;;;N;;;004D;;004D
+006E;LATIN SMALL LETTER N;Ll;0;L;;;;;N;;;004E;;004E
+006F;LATIN SMALL LETTER O;Ll;0;L;;;;;N;;;004F;;004F
+0070;LATIN SMALL LETTER P;Ll;0;L;;;;;N;;;0050;;0050
+0071;LATIN SMALL LETTER Q;Ll;0;L;;;;;N;;;0051;;0051
+0072;LATIN SMALL LETTER R;Ll;0;L;;;;;N;;;0052;;0052
+0073;LATIN SMALL LETTER S;Ll;0;L;;;;;N;;;0053;;0053
+0074;LATIN SMALL LETTER T;Ll;0;L;;;;;N;;;0054;;0054
+0075;LATIN SMALL LETTER U;Ll;0;L;;;;;N;;;0055;;0055
+0076;LATIN SMALL LETTER V;Ll;0;L;;;;;N;;;0056;;0056
+0077;LATIN SMALL LETTER W;Ll;0;L;;;;;N;;;0057;;0057
+0078;LATIN SMALL LETTER X;Ll;0;L;;;;;N;;;0058;;0058
+0079;LATIN SMALL LETTER Y;Ll;0;L;;;;;N;;;0059;;0059
+007A;LATIN SMALL LETTER Z;Ll;0;L;;;;;N;;;005A;;005A
+007B;LEFT CURLY BRACKET;Ps;0;ON;;;;;Y;OPENING CURLY BRACKET;;;;
+007C;VERTICAL LINE;So;0;ON;;;;;N;VERTICAL BAR;;;;
+007D;RIGHT CURLY BRACKET;Pe;0;ON;;;;;Y;CLOSING CURLY BRACKET;;;;
+007E;TILDE;So;0;ON;;;;;N;;;;;
+007F;<control>;Cc;0;ON;;;;;N;DELETE;;;;
+0080;<control>;Cc;0;ON;;;;;N;;;;;
+0081;<control>;Cc;0;ON;;;;;N;;;;;
+0082;<control>;Cc;0;ON;;;;;N;;;;;
+0083;<control>;Cc;0;ON;;;;;N;;;;;
+0084;<control>;Cc;0;ON;;;;;N;;;;;
+0085;<control>;Cc;0;ON;;;;;N;;;;;
+0086;<control>;Cc;0;ON;;;;;N;;;;;
+0087;<control>;Cc;0;ON;;;;;N;;;;;
+0088;<control>;Cc;0;ON;;;;;N;;;;;
+0089;<control>;Cc;0;ON;;;;;N;;;;;
+008A;<control>;Cc;0;ON;;;;;N;;;;;
+008B;<control>;Cc;0;ON;;;;;N;;;;;
+008C;<control>;Cc;0;ON;;;;;N;;;;;
+008D;<control>;Cc;0;ON;;;;;N;;;;;
+008E;<control>;Cc;0;ON;;;;;N;;;;;
+008F;<control>;Cc;0;ON;;;;;N;;;;;
+0090;<control>;Cc;0;ON;;;;;N;;;;;
+0091;<control>;Cc;0;ON;;;;;N;;;;;
+0092;<control>;Cc;0;ON;;;;;N;;;;;
+0093;<control>;Cc;0;ON;;;;;N;;;;;
+0094;<control>;Cc;0;ON;;;;;N;;;;;
+0095;<control>;Cc;0;ON;;;;;N;;;;;
+0096;<control>;Cc;0;ON;;;;;N;;;;;
+0097;<control>;Cc;0;ON;;;;;N;;;;;
+0098;<control>;Cc;0;ON;;;;;N;;;;;
+0099;<control>;Cc;0;ON;;;;;N;;;;;
+009A;<control>;Cc;0;ON;;;;;N;;;;;
+009B;<control>;Cc;0;ON;;;;;N;;;;;
+009C;<control>;Cc;0;ON;;;;;N;;;;;
+009D;<control>;Cc;0;ON;;;;;N;;;;;
+009E;<control>;Cc;0;ON;;;;;N;;;;;
+009F;<control>;Cc;0;ON;;;;;N;;;;;
+00A0;NO-BREAK SPACE;Zs;0;WS;<noBreak> 0020;;;;N;NON-BREAKING SPACE;;;;
+00A1;INVERTED EXCLAMATION MARK;Po;0;ON;;;;;N;;;;;
+00A2;CENT SIGN;Sc;0;ET;;;;;N;;;;;
+00A3;POUND SIGN;Sc;0;ET;;;;;N;;;;;
+00A4;CURRENCY SIGN;Sc;0;ET;;;;;N;;;;;
+00A5;YEN SIGN;Sc;0;ET;;;;;N;;;;;
+00A6;BROKEN BAR;So;0;ON;;;;;N;BROKEN VERTICAL BAR;;;;
+00A7;SECTION SIGN;So;0;ON;;;;;N;;;;;
+00A8;DIAERESIS;Lm;0;ON;<compat> 0020 0308;;;;N;SPACING DIAERESIS;;;;
+00A9;COPYRIGHT SIGN;So;0;ON;;;;;N;;;;;
+00AA;FEMININE ORDINAL INDICATOR;Ll;0;ON;<super> 0061;;;;N;;;;;
+00AB;LEFT-POINTING DOUBLE ANGLE QUOTATION MARK;Ps;0;ON;;;;;N;LEFT POINTING GUILLEMET;;;;
+00AC;NOT SIGN;Sm;0;ON;;;;;N;;;;;
+00AD;SOFT HYPHEN;Po;0;ON;;;;;N;;;;;
+00AE;REGISTERED SIGN;So;0;ON;;;;;N;REGISTERED TRADE MARK SIGN;;;;
+00AF;MACRON;Lm;0;ON;<compat> 0020 0304;;;;N;SPACING MACRON;;;;
+00B0;DEGREE SIGN;So;0;ET;;;;;N;;;;;
+00B1;PLUS-MINUS SIGN;Sm;0;ET;;;;;N;PLUS-OR-MINUS SIGN;;;;
+00B2;SUPERSCRIPT TWO;Nd;0;EN;<super> 0032;2;2;2;N;SUPERSCRIPT DIGIT TWO;;;;
+00B3;SUPERSCRIPT THREE;Nd;0;EN;<super> 0033;3;3;3;N;SUPERSCRIPT DIGIT THREE;;;;
+00B4;ACUTE ACCENT;Lm;0;ON;<compat> 0020 0301;;;;N;SPACING ACUTE;;;;
+00B5;MICRO SIGN;Ll;0;ON;<compat> 03BC;;;;N;;;;;
+00B6;PILCROW SIGN;So;0;ON;;;;;N;PARAGRAPH SIGN;;;;
+00B7;MIDDLE DOT;Po;0;ON;;;;;N;;;;;
+00B8;CEDILLA;Lm;0;ON;<compat> 0020 0327;;;;N;SPACING CEDILLA;;;;
+00B9;SUPERSCRIPT ONE;Nd;0;EN;<super> 0031;1;1;1;N;SUPERSCRIPT DIGIT ONE;;;;
+00BA;MASCULINE ORDINAL INDICATOR;Ll;0;ON;<super> 006F;;;;N;;;;;
+00BB;RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK;Pe;0;ON;;;;;N;RIGHT POINTING GUILLEMET;;;;
+00BC;VULGAR FRACTION ONE QUARTER;No;0;ON;<fraction> 0031 2044 0034;;;1/4;N;FRACTION ONE QUARTER;;;;
+00BD;VULGAR FRACTION ONE HALF;No;0;ON;<fraction> 0031 2044 0032;;;1/2;N;FRACTION ONE HALF;;;;
+00BE;VULGAR FRACTION THREE QUARTERS;No;0;ON;<fraction> 0033 2044 0034;;;3/4;N;FRACTION THREE QUARTERS;;;;
+00BF;INVERTED QUESTION MARK;Po;0;ON;;;;;N;;;;;
+00C0;LATIN CAPITAL LETTER A WITH GRAVE;Lu;0;L;0041 0300;;;;N;LATIN CAPITAL LETTER A GRAVE;;;00E0;
+00C1;LATIN CAPITAL LETTER A WITH ACUTE;Lu;0;L;0041 0301;;;;N;LATIN CAPITAL LETTER A ACUTE;;;00E1;
+00C2;LATIN CAPITAL LETTER A WITH CIRCUMFLEX;Lu;0;L;0041 0302;;;;N;LATIN CAPITAL LETTER A CIRCUMFLEX;;;00E2;
+00C3;LATIN CAPITAL LETTER A WITH TILDE;Lu;0;L;0041 0303;;;;N;LATIN CAPITAL LETTER A TILDE;;;00E3;
+00C4;LATIN CAPITAL LETTER A WITH DIAERESIS;Lu;0;L;0041 0308;;;;N;LATIN CAPITAL LETTER A DIAERESIS;;;00E4;
+00C5;LATIN CAPITAL LETTER A WITH RING ABOVE;Lu;0;L;0041 030A;;;;N;LATIN CAPITAL LETTER A RING;;;00E5;
+00C6;LATIN CAPITAL LETTER AE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER A E;;;00E6;
+00C7;LATIN CAPITAL LETTER C WITH CEDILLA;Lu;0;L;0043 0327;;;;N;LATIN CAPITAL LETTER C CEDILLA;;;00E7;
+00C8;LATIN CAPITAL LETTER E WITH GRAVE;Lu;0;L;0045 0300;;;;N;LATIN CAPITAL LETTER E GRAVE;;;00E8;
+00C9;LATIN CAPITAL LETTER E WITH ACUTE;Lu;0;L;0045 0301;;;;N;LATIN CAPITAL LETTER E ACUTE;;;00E9;
+00CA;LATIN CAPITAL LETTER E WITH CIRCUMFLEX;Lu;0;L;0045 0302;;;;N;LATIN CAPITAL LETTER E CIRCUMFLEX;;;00EA;
+00CB;LATIN CAPITAL LETTER E WITH DIAERESIS;Lu;0;L;0045 0308;;;;N;LATIN CAPITAL LETTER E DIAERESIS;;;00EB;
+00CC;LATIN CAPITAL LETTER I WITH GRAVE;Lu;0;L;0049 0300;;;;N;LATIN CAPITAL LETTER I GRAVE;;;00EC;
+00CD;LATIN CAPITAL LETTER I WITH ACUTE;Lu;0;L;0049 0301;;;;N;LATIN CAPITAL LETTER I ACUTE;;;00ED;
+00CE;LATIN CAPITAL LETTER I WITH CIRCUMFLEX;Lu;0;L;0049 0302;;;;N;LATIN CAPITAL LETTER I CIRCUMFLEX;;;00EE;
+00CF;LATIN CAPITAL LETTER I WITH DIAERESIS;Lu;0;L;0049 0308;;;;N;LATIN CAPITAL LETTER I DIAERESIS;;;00EF;
+00D0;LATIN CAPITAL LETTER ETH;Lu;0;L;;;;;N;;Icelandic;;00F0;
+00D1;LATIN CAPITAL LETTER N WITH TILDE;Lu;0;L;004E 0303;;;;N;LATIN CAPITAL LETTER N TILDE;;;00F1;
+00D2;LATIN CAPITAL LETTER O WITH GRAVE;Lu;0;L;004F 0300;;;;N;LATIN CAPITAL LETTER O GRAVE;;;00F2;
+00D3;LATIN CAPITAL LETTER O WITH ACUTE;Lu;0;L;004F 0301;;;;N;LATIN CAPITAL LETTER O ACUTE;;;00F3;
+00D4;LATIN CAPITAL LETTER O WITH CIRCUMFLEX;Lu;0;L;004F 0302;;;;N;LATIN CAPITAL LETTER O CIRCUMFLEX;;;00F4;
+00D5;LATIN CAPITAL LETTER O WITH TILDE;Lu;0;L;004F 0303;;;;N;LATIN CAPITAL LETTER O TILDE;;;00F5;
+00D6;LATIN CAPITAL LETTER O WITH DIAERESIS;Lu;0;L;004F 0308;;;;N;LATIN CAPITAL LETTER O DIAERESIS;;;00F6;
+00D7;MULTIPLICATION SIGN;Sm;0;ON;;;;;N;;;;;
+00D8;LATIN CAPITAL LETTER O WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O SLASH;;;00F8;
+00D9;LATIN CAPITAL LETTER U WITH GRAVE;Lu;0;L;0055 0300;;;;N;LATIN CAPITAL LETTER U GRAVE;;;00F9;
+00DA;LATIN CAPITAL LETTER U WITH ACUTE;Lu;0;L;0055 0301;;;;N;LATIN CAPITAL LETTER U ACUTE;;;00FA;
+00DB;LATIN CAPITAL LETTER U WITH CIRCUMFLEX;Lu;0;L;0055 0302;;;;N;LATIN CAPITAL LETTER U CIRCUMFLEX;;;00FB;
+00DC;LATIN CAPITAL LETTER U WITH DIAERESIS;Lu;0;L;0055 0308;;;;N;LATIN CAPITAL LETTER U DIAERESIS;;;00FC;
+00DD;LATIN CAPITAL LETTER Y WITH ACUTE;Lu;0;L;0059 0301;;;;N;LATIN CAPITAL LETTER Y ACUTE;;;00FD;
+00DE;LATIN CAPITAL LETTER THORN;Lu;0;L;;;;;N;;Icelandic;;00FE;
+00DF;LATIN SMALL LETTER SHARP S;Ll;0;L;;;;;N;;German;;;
+00E0;LATIN SMALL LETTER A WITH GRAVE;Ll;0;L;0061 0300;;;;N;LATIN SMALL LETTER A GRAVE;;00C0;;00C0
+00E1;LATIN SMALL LETTER A WITH ACUTE;Ll;0;L;0061 0301;;;;N;LATIN SMALL LETTER A ACUTE;;00C1;;00C1
+00E2;LATIN SMALL LETTER A WITH CIRCUMFLEX;Ll;0;L;0061 0302;;;;N;LATIN SMALL LETTER A CIRCUMFLEX;;00C2;;00C2
+00E3;LATIN SMALL LETTER A WITH TILDE;Ll;0;L;0061 0303;;;;N;LATIN SMALL LETTER A TILDE;;00C3;;00C3
+00E4;LATIN SMALL LETTER A WITH DIAERESIS;Ll;0;L;0061 0308;;;;N;LATIN SMALL LETTER A DIAERESIS;;00C4;;00C4
+00E5;LATIN SMALL LETTER A WITH RING ABOVE;Ll;0;L;0061 030A;;;;N;LATIN SMALL LETTER A RING;;00C5;;00C5
+00E6;LATIN SMALL LETTER AE;Ll;0;L;;;;;N;LATIN SMALL LETTER A E;;00C6;;00C6
+00E7;LATIN SMALL LETTER C WITH CEDILLA;Ll;0;L;0063 0327;;;;N;LATIN SMALL LETTER C CEDILLA;;00C7;;00C7
+00E8;LATIN SMALL LETTER E WITH GRAVE;Ll;0;L;0065 0300;;;;N;LATIN SMALL LETTER E GRAVE;;00C8;;00C8
+00E9;LATIN SMALL LETTER E WITH ACUTE;Ll;0;L;0065 0301;;;;N;LATIN SMALL LETTER E ACUTE;;00C9;;00C9
+00EA;LATIN SMALL LETTER E WITH CIRCUMFLEX;Ll;0;L;0065 0302;;;;N;LATIN SMALL LETTER E CIRCUMFLEX;;00CA;;00CA
+00EB;LATIN SMALL LETTER E WITH DIAERESIS;Ll;0;L;0065 0308;;;;N;LATIN SMALL LETTER E DIAERESIS;;00CB;;00CB
+00EC;LATIN SMALL LETTER I WITH GRAVE;Ll;0;L;0069 0300;;;;N;LATIN SMALL LETTER I GRAVE;;00CC;;00CC
+00ED;LATIN SMALL LETTER I WITH ACUTE;Ll;0;L;0069 0301;;;;N;LATIN SMALL LETTER I ACUTE;;00CD;;00CD
+00EE;LATIN SMALL LETTER I WITH CIRCUMFLEX;Ll;0;L;0069 0302;;;;N;LATIN SMALL LETTER I CIRCUMFLEX;;00CE;;00CE
+00EF;LATIN SMALL LETTER I WITH DIAERESIS;Ll;0;L;0069 0308;;;;N;LATIN SMALL LETTER I DIAERESIS;;00CF;;00CF
+00F0;LATIN SMALL LETTER ETH;Ll;0;L;;;;;N;;Icelandic;00D0;;00D0
+00F1;LATIN SMALL LETTER N WITH TILDE;Ll;0;L;006E 0303;;;;N;LATIN SMALL LETTER N TILDE;;00D1;;00D1
+00F2;LATIN SMALL LETTER O WITH GRAVE;Ll;0;L;006F 0300;;;;N;LATIN SMALL LETTER O GRAVE;;00D2;;00D2
+00F3;LATIN SMALL LETTER O WITH ACUTE;Ll;0;L;006F 0301;;;;N;LATIN SMALL LETTER O ACUTE;;00D3;;00D3
+00F4;LATIN SMALL LETTER O WITH CIRCUMFLEX;Ll;0;L;006F 0302;;;;N;LATIN SMALL LETTER O CIRCUMFLEX;;00D4;;00D4
+00F5;LATIN SMALL LETTER O WITH TILDE;Ll;0;L;006F 0303;;;;N;LATIN SMALL LETTER O TILDE;;00D5;;00D5
+00F6;LATIN SMALL LETTER O WITH DIAERESIS;Ll;0;L;006F 0308;;;;N;LATIN SMALL LETTER O DIAERESIS;;00D6;;00D6
+00F7;DIVISION SIGN;Sm;0;ON;;;;;N;;;;;
+00F8;LATIN SMALL LETTER O WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER O SLASH;;00D8;;00D8
+00F9;LATIN SMALL LETTER U WITH GRAVE;Ll;0;L;0075 0300;;;;N;LATIN SMALL LETTER U GRAVE;;00D9;;00D9
+00FA;LATIN SMALL LETTER U WITH ACUTE;Ll;0;L;0075 0301;;;;N;LATIN SMALL LETTER U ACUTE;;00DA;;00DA
+00FB;LATIN SMALL LETTER U WITH CIRCUMFLEX;Ll;0;L;0075 0302;;;;N;LATIN SMALL LETTER U CIRCUMFLEX;;00DB;;00DB
+00FC;LATIN SMALL LETTER U WITH DIAERESIS;Ll;0;L;0075 0308;;;;N;LATIN SMALL LETTER U DIAERESIS;;00DC;;00DC
+00FD;LATIN SMALL LETTER Y WITH ACUTE;Ll;0;L;0079 0301;;;;N;LATIN SMALL LETTER Y ACUTE;;00DD;;00DD
+00FE;LATIN SMALL LETTER THORN;Ll;0;L;;;;;N;;Icelandic;00DE;;00DE
+00FF;LATIN SMALL LETTER Y WITH DIAERESIS;Ll;0;L;0079 0308;;;;N;LATIN SMALL LETTER Y DIAERESIS;;0178;;0178
+0100;LATIN CAPITAL LETTER A WITH MACRON;Lu;0;L;0041 0304;;;;N;LATIN CAPITAL LETTER A MACRON;;;0101;
+0101;LATIN SMALL LETTER A WITH MACRON;Ll;0;L;0061 0304;;;;N;LATIN SMALL LETTER A MACRON;;0100;;0100
+0102;LATIN CAPITAL LETTER A WITH BREVE;Lu;0;L;0041 0306;;;;N;LATIN CAPITAL LETTER A BREVE;;;0103;
+0103;LATIN SMALL LETTER A WITH BREVE;Ll;0;L;0061 0306;;;;N;LATIN SMALL LETTER A BREVE;;0102;;0102
+0104;LATIN CAPITAL LETTER A WITH OGONEK;Lu;0;L;0041 0328;;;;N;LATIN CAPITAL LETTER A OGONEK;;;0105;
+0105;LATIN SMALL LETTER A WITH OGONEK;Ll;0;L;0061 0328;;;;N;LATIN SMALL LETTER A OGONEK;;0104;;0104
+0106;LATIN CAPITAL LETTER C WITH ACUTE;Lu;0;L;0043 0301;;;;N;LATIN CAPITAL LETTER C ACUTE;;;0107;
+0107;LATIN SMALL LETTER C WITH ACUTE;Ll;0;L;0063 0301;;;;N;LATIN SMALL LETTER C ACUTE;;0106;;0106
+0108;LATIN CAPITAL LETTER C WITH CIRCUMFLEX;Lu;0;L;0043 0302;;;;N;LATIN CAPITAL LETTER C CIRCUMFLEX;;;0109;
+0109;LATIN SMALL LETTER C WITH CIRCUMFLEX;Ll;0;L;0063 0302;;;;N;LATIN SMALL LETTER C CIRCUMFLEX;;0108;;0108
+010A;LATIN CAPITAL LETTER C WITH DOT ABOVE;Lu;0;L;0043 0307;;;;N;LATIN CAPITAL LETTER C DOT;;;010B;
+010B;LATIN SMALL LETTER C WITH DOT ABOVE;Ll;0;L;0063 0307;;;;N;LATIN SMALL LETTER C DOT;;010A;;010A
+010C;LATIN CAPITAL LETTER C WITH CARON;Lu;0;L;0043 030C;;;;N;LATIN CAPITAL LETTER C HACEK;;;010D;
+010D;LATIN SMALL LETTER C WITH CARON;Ll;0;L;0063 030C;;;;N;LATIN SMALL LETTER C HACEK;;010C;;010C
+010E;LATIN CAPITAL LETTER D WITH CARON;Lu;0;L;0044 030C;;;;N;LATIN CAPITAL LETTER D HACEK;;;010F;
+010F;LATIN SMALL LETTER D WITH CARON;Ll;0;L;0064 030C;;;;N;LATIN SMALL LETTER D HACEK;;010E;;010E
+0110;LATIN CAPITAL LETTER D WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D BAR;;;0111;
+0111;LATIN SMALL LETTER D WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER D BAR;;0110;;0110
+0112;LATIN CAPITAL LETTER E WITH MACRON;Lu;0;L;0045 0304;;;;N;LATIN CAPITAL LETTER E MACRON;;;0113;
+0113;LATIN SMALL LETTER E WITH MACRON;Ll;0;L;0065 0304;;;;N;LATIN SMALL LETTER E MACRON;;0112;;0112
+0114;LATIN CAPITAL LETTER E WITH BREVE;Lu;0;L;0045 0306;;;;N;LATIN CAPITAL LETTER E BREVE;;;0115;
+0115;LATIN SMALL LETTER E WITH BREVE;Ll;0;L;0065 0306;;;;N;LATIN SMALL LETTER E BREVE;;0114;;0114
+0116;LATIN CAPITAL LETTER E WITH DOT ABOVE;Lu;0;L;0045 0307;;;;N;LATIN CAPITAL LETTER E DOT;;;0117;
+0117;LATIN SMALL LETTER E WITH DOT ABOVE;Ll;0;L;0065 0307;;;;N;LATIN SMALL LETTER E DOT;;0116;;0116
+0118;LATIN CAPITAL LETTER E WITH OGONEK;Lu;0;L;0045 0328;;;;N;LATIN CAPITAL LETTER E OGONEK;;;0119;
+0119;LATIN SMALL LETTER E WITH OGONEK;Ll;0;L;0065 0328;;;;N;LATIN SMALL LETTER E OGONEK;;0118;;0118
+011A;LATIN CAPITAL LETTER E WITH CARON;Lu;0;L;0045 030C;;;;N;LATIN CAPITAL LETTER E HACEK;;;011B;
+011B;LATIN SMALL LETTER E WITH CARON;Ll;0;L;0065 030C;;;;N;LATIN SMALL LETTER E HACEK;;011A;;011A
+011C;LATIN CAPITAL LETTER G WITH CIRCUMFLEX;Lu;0;L;0047 0302;;;;N;LATIN CAPITAL LETTER G CIRCUMFLEX;;;011D;
+011D;LATIN SMALL LETTER G WITH CIRCUMFLEX;Ll;0;L;0067 0302;;;;N;LATIN SMALL LETTER G CIRCUMFLEX;;011C;;011C
+011E;LATIN CAPITAL LETTER G WITH BREVE;Lu;0;L;0047 0306;;;;N;LATIN CAPITAL LETTER G BREVE;;;011F;
+011F;LATIN SMALL LETTER G WITH BREVE;Ll;0;L;0067 0306;;;;N;LATIN SMALL LETTER G BREVE;;011E;;011E
+0120;LATIN CAPITAL LETTER G WITH DOT ABOVE;Lu;0;L;0047 0307;;;;N;LATIN CAPITAL LETTER G DOT;;;0121;
+0121;LATIN SMALL LETTER G WITH DOT ABOVE;Ll;0;L;0067 0307;;;;N;LATIN SMALL LETTER G DOT;;0120;;0120
+0122;LATIN CAPITAL LETTER G WITH CEDILLA;Lu;0;L;0047 0327;;;;N;LATIN CAPITAL LETTER G CEDILLA;;;0123;
+0123;LATIN SMALL LETTER G WITH CEDILLA;Ll;0;L;0067 0327;;;;N;LATIN SMALL LETTER G CEDILLA;;0122;;0122
+0124;LATIN CAPITAL LETTER H WITH CIRCUMFLEX;Lu;0;L;0048 0302;;;;N;LATIN CAPITAL LETTER H CIRCUMFLEX;;;0125;
+0125;LATIN SMALL LETTER H WITH CIRCUMFLEX;Ll;0;L;0068 0302;;;;N;LATIN SMALL LETTER H CIRCUMFLEX;;0124;;0124
+0126;LATIN CAPITAL LETTER H WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER H BAR;;;0127;
+0127;LATIN SMALL LETTER H WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER H BAR;;0126;;0126
+0128;LATIN CAPITAL LETTER I WITH TILDE;Lu;0;L;0049 0303;;;;N;LATIN CAPITAL LETTER I TILDE;;;0129;
+0129;LATIN SMALL LETTER I WITH TILDE;Ll;0;L;0069 0303;;;;N;LATIN SMALL LETTER I TILDE;;0128;;0128
+012A;LATIN CAPITAL LETTER I WITH MACRON;Lu;0;L;0049 0304;;;;N;LATIN CAPITAL LETTER I MACRON;;;012B;
+012B;LATIN SMALL LETTER I WITH MACRON;Ll;0;L;0069 0304;;;;N;LATIN SMALL LETTER I MACRON;;012A;;012A
+012C;LATIN CAPITAL LETTER I WITH BREVE;Lu;0;L;0049 0306;;;;N;LATIN CAPITAL LETTER I BREVE;;;012D;
+012D;LATIN SMALL LETTER I WITH BREVE;Ll;0;L;0069 0306;;;;N;LATIN SMALL LETTER I BREVE;;012C;;012C
+012E;LATIN CAPITAL LETTER I WITH OGONEK;Lu;0;L;0049 0328;;;;N;LATIN CAPITAL LETTER I OGONEK;;;012F;
+012F;LATIN SMALL LETTER I WITH OGONEK;Ll;0;L;0069 0328;;;;N;LATIN SMALL LETTER I OGONEK;;012E;;012E
+0130;LATIN CAPITAL LETTER I WITH DOT ABOVE;Lu;0;L;0049 0307;;;;N;LATIN CAPITAL LETTER I DOT;;;0069;
+0131;LATIN SMALL LETTER DOTLESS I;Ll;0;L;;;;;N;;;0049;;0049
+0132;LATIN CAPITAL LIGATURE IJ;Lu;0;L;<compat> 0049 004A;;;;N;LATIN CAPITAL LETTER I J;;;0133;
+0133;LATIN SMALL LIGATURE IJ;Ll;0;L;<compat> 0069 006A;;;;N;LATIN SMALL LETTER I J;;0132;;0132
+0134;LATIN CAPITAL LETTER J WITH CIRCUMFLEX;Lu;0;L;004A 0302;;;;N;LATIN CAPITAL LETTER J CIRCUMFLEX;;;0135;
+0135;LATIN SMALL LETTER J WITH CIRCUMFLEX;Ll;0;L;006A 0302;;;;N;LATIN SMALL LETTER J CIRCUMFLEX;;0134;;0134
+0136;LATIN CAPITAL LETTER K WITH CEDILLA;Lu;0;L;004B 0327;;;;N;LATIN CAPITAL LETTER K CEDILLA;;;0137;
+0137;LATIN SMALL LETTER K WITH CEDILLA;Ll;0;L;006B 0327;;;;N;LATIN SMALL LETTER K CEDILLA;;0136;;0136
+0138;LATIN SMALL LETTER KRA;Ll;0;L;;;;;N;;Greenlandic;;;
+0139;LATIN CAPITAL LETTER L WITH ACUTE;Lu;0;L;004C 0301;;;;N;LATIN CAPITAL LETTER L ACUTE;;;013A;
+013A;LATIN SMALL LETTER L WITH ACUTE;Ll;0;L;006C 0301;;;;N;LATIN SMALL LETTER L ACUTE;;0139;;0139
+013B;LATIN CAPITAL LETTER L WITH CEDILLA;Lu;0;L;004C 0327;;;;N;LATIN CAPITAL LETTER L CEDILLA;;;013C;
+013C;LATIN SMALL LETTER L WITH CEDILLA;Ll;0;L;006C 0327;;;;N;LATIN SMALL LETTER L CEDILLA;;013B;;013B
+013D;LATIN CAPITAL LETTER L WITH CARON;Lu;0;L;004C 030C;;;;N;LATIN CAPITAL LETTER L HACEK;;;013E;
+013E;LATIN SMALL LETTER L WITH CARON;Ll;0;L;006C 030C;;;;N;LATIN SMALL LETTER L HACEK;;013D;;013D
+013F;LATIN CAPITAL LETTER L WITH MIDDLE DOT;Lu;0;L;<compat> 004C 00B7;;;;N;;;;0140;
+0140;LATIN SMALL LETTER L WITH MIDDLE DOT;Ll;0;L;<compat> 006C 00B7;;;;N;;;013F;;013F
+0141;LATIN CAPITAL LETTER L WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER L SLASH;;;0142;
+0142;LATIN SMALL LETTER L WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER L SLASH;;0141;;0141
+0143;LATIN CAPITAL LETTER N WITH ACUTE;Lu;0;L;004E 0301;;;;N;LATIN CAPITAL LETTER N ACUTE;;;0144;
+0144;LATIN SMALL LETTER N WITH ACUTE;Ll;0;L;006E 0301;;;;N;LATIN SMALL LETTER N ACUTE;;0143;;0143
+0145;LATIN CAPITAL LETTER N WITH CEDILLA;Lu;0;L;004E 0327;;;;N;LATIN CAPITAL LETTER N CEDILLA;;;0146;
+0146;LATIN SMALL LETTER N WITH CEDILLA;Ll;0;L;006E 0327;;;;N;LATIN SMALL LETTER N CEDILLA;;0145;;0145
+0147;LATIN CAPITAL LETTER N WITH CARON;Lu;0;L;004E 030C;;;;N;LATIN CAPITAL LETTER N HACEK;;;0148;
+0148;LATIN SMALL LETTER N WITH CARON;Ll;0;L;006E 030C;;;;N;LATIN SMALL LETTER N HACEK;;0147;;0147
+0149;LATIN SMALL LETTER N PRECEDED BY APOSTROPHE;Ll;0;L;<compat> 02BC 006E;;;;N;LATIN SMALL LETTER APOSTROPHE N;;;;
+014A;LATIN CAPITAL LETTER ENG;Lu;0;L;;;;;N;;Sami;;014B;
+014B;LATIN SMALL LETTER ENG;Ll;0;L;;;;;N;;Sami;014A;;014A
+014C;LATIN CAPITAL LETTER O WITH MACRON;Lu;0;L;004F 0304;;;;N;LATIN CAPITAL LETTER O MACRON;;;014D;
+014D;LATIN SMALL LETTER O WITH MACRON;Ll;0;L;006F 0304;;;;N;LATIN SMALL LETTER O MACRON;;014C;;014C
+014E;LATIN CAPITAL LETTER O WITH BREVE;Lu;0;L;004F 0306;;;;N;LATIN CAPITAL LETTER O BREVE;;;014F;
+014F;LATIN SMALL LETTER O WITH BREVE;Ll;0;L;006F 0306;;;;N;LATIN SMALL LETTER O BREVE;;014E;;014E
+0150;LATIN CAPITAL LETTER O WITH DOUBLE ACUTE;Lu;0;L;004F 030B;;;;N;LATIN CAPITAL LETTER O DOUBLE ACUTE;;;0151;
+0151;LATIN SMALL LETTER O WITH DOUBLE ACUTE;Ll;0;L;006F 030B;;;;N;LATIN SMALL LETTER O DOUBLE ACUTE;;0150;;0150
+0152;LATIN CAPITAL LIGATURE OE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O E;;;0153;
+0153;LATIN SMALL LIGATURE OE;Ll;0;L;;;;;N;LATIN SMALL LETTER O E;;0152;;0152
+0154;LATIN CAPITAL LETTER R WITH ACUTE;Lu;0;L;0052 0301;;;;N;LATIN CAPITAL LETTER R ACUTE;;;0155;
+0155;LATIN SMALL LETTER R WITH ACUTE;Ll;0;L;0072 0301;;;;N;LATIN SMALL LETTER R ACUTE;;0154;;0154
+0156;LATIN CAPITAL LETTER R WITH CEDILLA;Lu;0;L;0052 0327;;;;N;LATIN CAPITAL LETTER R CEDILLA;;;0157;
+0157;LATIN SMALL LETTER R WITH CEDILLA;Ll;0;L;0072 0327;;;;N;LATIN SMALL LETTER R CEDILLA;;0156;;0156
+0158;LATIN CAPITAL LETTER R WITH CARON;Lu;0;L;0052 030C;;;;N;LATIN CAPITAL LETTER R HACEK;;;0159;
+0159;LATIN SMALL LETTER R WITH CARON;Ll;0;L;0072 030C;;;;N;LATIN SMALL LETTER R HACEK;;0158;;0158
+015A;LATIN CAPITAL LETTER S WITH ACUTE;Lu;0;L;0053 0301;;;;N;LATIN CAPITAL LETTER S ACUTE;;;015B;
+015B;LATIN SMALL LETTER S WITH ACUTE;Ll;0;L;0073 0301;;;;N;LATIN SMALL LETTER S ACUTE;;015A;;015A
+015C;LATIN CAPITAL LETTER S WITH CIRCUMFLEX;Lu;0;L;0053 0302;;;;N;LATIN CAPITAL LETTER S CIRCUMFLEX;;;015D;
+015D;LATIN SMALL LETTER S WITH CIRCUMFLEX;Ll;0;L;0073 0302;;;;N;LATIN SMALL LETTER S CIRCUMFLEX;;015C;;015C
+015E;LATIN CAPITAL LETTER S WITH CEDILLA;Lu;0;L;0053 0327;;;;N;LATIN CAPITAL LETTER S CEDILLA;;;015F;
+015F;LATIN SMALL LETTER S WITH CEDILLA;Ll;0;L;0073 0327;;;;N;LATIN SMALL LETTER S CEDILLA;;015E;;015E
+0160;LATIN CAPITAL LETTER S WITH CARON;Lu;0;L;0053 030C;;;;N;LATIN CAPITAL LETTER S HACEK;;;0161;
+0161;LATIN SMALL LETTER S WITH CARON;Ll;0;L;0073 030C;;;;N;LATIN SMALL LETTER S HACEK;;0160;;0160
+0162;LATIN CAPITAL LETTER T WITH CEDILLA;Lu;0;L;0054 0327;;;;N;LATIN CAPITAL LETTER T CEDILLA;;;0163;
+0163;LATIN SMALL LETTER T WITH CEDILLA;Ll;0;L;0074 0327;;;;N;LATIN SMALL LETTER T CEDILLA;;0162;;0162
+0164;LATIN CAPITAL LETTER T WITH CARON;Lu;0;L;0054 030C;;;;N;LATIN CAPITAL LETTER T HACEK;;;0165;
+0165;LATIN SMALL LETTER T WITH CARON;Ll;0;L;0074 030C;;;;N;LATIN SMALL LETTER T HACEK;;0164;;0164
+0166;LATIN CAPITAL LETTER T WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T BAR;;;0167;
+0167;LATIN SMALL LETTER T WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER T BAR;;0166;;0166
+0168;LATIN CAPITAL LETTER U WITH TILDE;Lu;0;L;0055 0303;;;;N;LATIN CAPITAL LETTER U TILDE;;;0169;
+0169;LATIN SMALL LETTER U WITH TILDE;Ll;0;L;0075 0303;;;;N;LATIN SMALL LETTER U TILDE;;0168;;0168
+016A;LATIN CAPITAL LETTER U WITH MACRON;Lu;0;L;0055 0304;;;;N;LATIN CAPITAL LETTER U MACRON;;;016B;
+016B;LATIN SMALL LETTER U WITH MACRON;Ll;0;L;0075 0304;;;;N;LATIN SMALL LETTER U MACRON;;016A;;016A
+016C;LATIN CAPITAL LETTER U WITH BREVE;Lu;0;L;0055 0306;;;;N;LATIN CAPITAL LETTER U BREVE;;;016D;
+016D;LATIN SMALL LETTER U WITH BREVE;Ll;0;L;0075 0306;;;;N;LATIN SMALL LETTER U BREVE;;016C;;016C
+016E;LATIN CAPITAL LETTER U WITH RING ABOVE;Lu;0;L;0055 030A;;;;N;LATIN CAPITAL LETTER U RING;;;016F;
+016F;LATIN SMALL LETTER U WITH RING ABOVE;Ll;0;L;0075 030A;;;;N;LATIN SMALL LETTER U RING;;016E;;016E
+0170;LATIN CAPITAL LETTER U WITH DOUBLE ACUTE;Lu;0;L;0055 030B;;;;N;LATIN CAPITAL LETTER U DOUBLE ACUTE;;;0171;
+0171;LATIN SMALL LETTER U WITH DOUBLE ACUTE;Ll;0;L;0075 030B;;;;N;LATIN SMALL LETTER U DOUBLE ACUTE;;0170;;0170
+0172;LATIN CAPITAL LETTER U WITH OGONEK;Lu;0;L;0055 0328;;;;N;LATIN CAPITAL LETTER U OGONEK;;;0173;
+0173;LATIN SMALL LETTER U WITH OGONEK;Ll;0;L;0075 0328;;;;N;LATIN SMALL LETTER U OGONEK;;0172;;0172
+0174;LATIN CAPITAL LETTER W WITH CIRCUMFLEX;Lu;0;L;0057 0302;;;;N;LATIN CAPITAL LETTER W CIRCUMFLEX;;;0175;
+0175;LATIN SMALL LETTER W WITH CIRCUMFLEX;Ll;0;L;0077 0302;;;;N;LATIN SMALL LETTER W CIRCUMFLEX;;0174;;0174
+0176;LATIN CAPITAL LETTER Y WITH CIRCUMFLEX;Lu;0;L;0059 0302;;;;N;LATIN CAPITAL LETTER Y CIRCUMFLEX;;;0177;
+0177;LATIN SMALL LETTER Y WITH CIRCUMFLEX;Ll;0;L;0079 0302;;;;N;LATIN SMALL LETTER Y CIRCUMFLEX;;0176;;0176
+0178;LATIN CAPITAL LETTER Y WITH DIAERESIS;Lu;0;L;0059 0308;;;;N;LATIN CAPITAL LETTER Y DIAERESIS;;;00FF;
+0179;LATIN CAPITAL LETTER Z WITH ACUTE;Lu;0;L;005A 0301;;;;N;LATIN CAPITAL LETTER Z ACUTE;;;017A;
+017A;LATIN SMALL LETTER Z WITH ACUTE;Ll;0;L;007A 0301;;;;N;LATIN SMALL LETTER Z ACUTE;;0179;;0179
+017B;LATIN CAPITAL LETTER Z WITH DOT ABOVE;Lu;0;L;005A 0307;;;;N;LATIN CAPITAL LETTER Z DOT;;;017C;
+017C;LATIN SMALL LETTER Z WITH DOT ABOVE;Ll;0;L;007A 0307;;;;N;LATIN SMALL LETTER Z DOT;;017B;;017B
+017D;LATIN CAPITAL LETTER Z WITH CARON;Lu;0;L;005A 030C;;;;N;LATIN CAPITAL LETTER Z HACEK;;;017E;
+017E;LATIN SMALL LETTER Z WITH CARON;Ll;0;L;007A 030C;;;;N;LATIN SMALL LETTER Z HACEK;;017D;;017D
+017F;LATIN SMALL LETTER LONG S;Ll;0;L;<compat> 0073;;;;N;;;0053;;0053
+0180;LATIN SMALL LETTER B WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER B BAR;;;;
+0181;LATIN CAPITAL LETTER B WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER B HOOK;;;0253;
+0182;LATIN CAPITAL LETTER B WITH TOPBAR;Lu;0;L;;;;;N;LATIN CAPITAL LETTER B TOPBAR;;;0183;
+0183;LATIN SMALL LETTER B WITH TOPBAR;Ll;0;L;;;;;N;LATIN SMALL LETTER B TOPBAR;;0182;;0182
+0184;LATIN CAPITAL LETTER TONE SIX;Lu;0;L;;;;;N;;;;0185;
+0185;LATIN SMALL LETTER TONE SIX;Ll;0;L;;;;;N;;;0184;;0184
+0186;LATIN CAPITAL LETTER OPEN O;Lu;0;L;;;;;N;;;;0254;
+0187;LATIN CAPITAL LETTER C WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER C HOOK;;;0188;
+0188;LATIN SMALL LETTER C WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER C HOOK;;0187;;0187
+0189;LATIN CAPITAL LETTER AFRICAN D;Lu;0;L;;;;;N;;;;0256;
+018A;LATIN CAPITAL LETTER D WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D HOOK;;;0257;
+018B;LATIN CAPITAL LETTER D WITH TOPBAR;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D TOPBAR;;;018C;
+018C;LATIN SMALL LETTER D WITH TOPBAR;Ll;0;L;;;;;N;LATIN SMALL LETTER D TOPBAR;;018B;;018B
+018D;LATIN SMALL LETTER TURNED DELTA;Ll;0;L;;;;;N;;;;;
+018E;LATIN CAPITAL LETTER REVERSED E;Lu;0;L;;;;;N;LATIN CAPITAL LETTER TURNED E;;;0258;
+018F;LATIN CAPITAL LETTER SCHWA;Lu;0;L;;;;;N;;;;0259;
+0190;LATIN CAPITAL LETTER OPEN E;Lu;0;L;;;;;N;LATIN CAPITAL LETTER EPSILON;;;025B;
+0191;LATIN CAPITAL LETTER F WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER F HOOK;;;0192;
+0192;LATIN SMALL LETTER F WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT F;;0191;;0191
+0193;LATIN CAPITAL LETTER G WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER G HOOK;;;0260;
+0194;LATIN CAPITAL LETTER GAMMA;Lu;0;L;;;;;N;;;;0263;
+0195;LATIN SMALL LETTER HV;Ll;0;L;;;;;N;LATIN SMALL LETTER H V;;;;
+0196;LATIN CAPITAL LETTER IOTA;Lu;0;L;;;;;N;;;;0269;
+0197;LATIN CAPITAL LETTER I WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER BARRED I;;;0268;
+0198;LATIN CAPITAL LETTER K WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER K HOOK;;;0199;
+0199;LATIN SMALL LETTER K WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER K HOOK;;0198;;0198
+019A;LATIN SMALL LETTER L WITH BAR;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED L;;;;
+019B;LATIN SMALL LETTER LAMBDA WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED LAMBDA;;;;
+019C;LATIN CAPITAL LETTER TURNED M;Lu;0;L;;;;;N;;;;026F;
+019D;LATIN CAPITAL LETTER N WITH LEFT HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER N HOOK;;;0272;
+019E;LATIN SMALL LETTER N WITH LONG RIGHT LEG;Ll;0;L;;;;;N;;;;;
+019F;LATIN CAPITAL LETTER O WITH MIDDLE TILDE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER BARRED O;;;;
+01A0;LATIN CAPITAL LETTER O WITH HORN;Lu;0;L;004F 031B;;;;N;LATIN CAPITAL LETTER O HORN;;;01A1;
+01A1;LATIN SMALL LETTER O WITH HORN;Ll;0;L;006F 031B;;;;N;LATIN SMALL LETTER O HORN;;01A0;;01A0
+01A2;LATIN CAPITAL LETTER OI;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O I;;;01A3;
+01A3;LATIN SMALL LETTER OI;Ll;0;L;;;;;N;LATIN SMALL LETTER O I;;01A2;;01A2
+01A4;LATIN CAPITAL LETTER P WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER P HOOK;;;01A5;
+01A5;LATIN SMALL LETTER P WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER P HOOK;;01A4;;01A4
+01A6;LATIN LETTER YR;Lu;0;L;;;;;N;LATIN LETTER Y R;;;;
+01A7;LATIN CAPITAL LETTER TONE TWO;Lu;0;L;;;;;N;;;;01A8;
+01A8;LATIN SMALL LETTER TONE TWO;Ll;0;L;;;;;N;;;01A7;;01A7
+01A9;LATIN CAPITAL LETTER ESH;Lu;0;L;;;;;N;;;;0283;
+01AA;LATIN LETTER REVERSED ESH LOOP;Lo;0;L;;;;;N;;;;;
+01AB;LATIN SMALL LETTER T WITH PALATAL HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T PALATAL HOOK;;;;
+01AC;LATIN CAPITAL LETTER T WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T HOOK;;;01AD;
+01AD;LATIN SMALL LETTER T WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T HOOK;;01AC;;01AC
+01AE;LATIN CAPITAL LETTER T WITH RETROFLEX HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T RETROFLEX HOOK;;;0288;
+01AF;LATIN CAPITAL LETTER U WITH HORN;Lu;0;L;0055 031B;;;;N;LATIN CAPITAL LETTER U HORN;;;01B0;
+01B0;LATIN SMALL LETTER U WITH HORN;Ll;0;L;0075 031B;;;;N;LATIN SMALL LETTER U HORN;;01AF;;01AF
+01B1;LATIN CAPITAL LETTER UPSILON;Lu;0;L;;;;;N;;;;028A;
+01B2;LATIN CAPITAL LETTER V WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER SCRIPT V;;;028B;
+01B3;LATIN CAPITAL LETTER Y WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER Y HOOK;;;01B4;
+01B4;LATIN SMALL LETTER Y WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Y HOOK;;01B3;;01B3
+01B5;LATIN CAPITAL LETTER Z WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER Z BAR;;;01B6;
+01B6;LATIN SMALL LETTER Z WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER Z BAR;;01B5;;01B5
+01B7;LATIN CAPITAL LETTER EZH;Lu;0;L;;;;;N;LATIN CAPITAL LETTER YOGH;;;0292;
+01B8;LATIN CAPITAL LETTER EZH REVERSED;Lu;0;L;;;;;N;LATIN CAPITAL LETTER REVERSED YOGH;;;01B9;
+01B9;LATIN SMALL LETTER EZH REVERSED;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED YOGH;;01B8;;01B8
+01BA;LATIN SMALL LETTER EZH WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH WITH TAIL;;;;
+01BB;LATIN LETTER TWO WITH STROKE;Lo;0;L;;;;;N;LATIN LETTER TWO BAR;;;;
+01BC;LATIN CAPITAL LETTER TONE FIVE;Lu;0;L;;;;;N;;;;01BD;
+01BD;LATIN SMALL LETTER TONE FIVE;Ll;0;L;;;;;N;;;01BC;;01BC
+01BE;LATIN LETTER INVERTED GLOTTAL STOP WITH STROKE;Lo;0;L;;;;;N;LATIN LETTER INVERTED GLOTTAL STOP BAR;;;;
+01BF;LATIN LETTER WYNN;Lo;0;L;;;;;N;;;;;
+01C0;LATIN LETTER DENTAL CLICK;Lo;0;L;;;;;N;LATIN LETTER PIPE;;;;
+01C1;LATIN LETTER LATERAL CLICK;Lo;0;L;;;;;N;LATIN LETTER DOUBLE PIPE;;;;
+01C2;LATIN LETTER ALVEOLAR CLICK;Lo;0;L;;;;;N;LATIN LETTER PIPE DOUBLE BAR;;;;
+01C3;LATIN LETTER RETROFLEX CLICK;Lo;0;L;;;;;N;LATIN LETTER EXCLAMATION MARK;;;;
+01C4;LATIN CAPITAL LETTER DZ WITH CARON;Lu;0;L;<compat> 0044 017D;;;;N;LATIN CAPITAL LETTER D Z HACEK;;;01C6;01C5
+01C5;LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON;Lt;0;L;<compat> 0044 017E;;;;N;LATIN LETTER CAPITAL D SMALL Z HACEK;;01C4;01C6;
+01C6;LATIN SMALL LETTER DZ WITH CARON;Ll;0;L;<compat> 0064 017E;;;;N;LATIN SMALL LETTER D Z HACEK;;01C4;;01C5
+01C7;LATIN CAPITAL LETTER LJ;Lu;0;L;<compat> 004C 004A;;;;N;LATIN CAPITAL LETTER L J;;;01C9;01C8
+01C8;LATIN CAPITAL LETTER L WITH SMALL LETTER J;Lt;0;L;<compat> 004C 006A;;;;N;LATIN LETTER CAPITAL L SMALL J;;01C7;01C9;
+01C9;LATIN SMALL LETTER LJ;Ll;0;L;<compat> 006C 006A;;;;N;LATIN SMALL LETTER L J;;01C7;;01C8
+01CA;LATIN CAPITAL LETTER NJ;Lu;0;L;<compat> 004E 004A;;;;N;LATIN CAPITAL LETTER N J;;;01CC;01CB
+01CB;LATIN CAPITAL LETTER N WITH SMALL LETTER J;Lt;0;L;<compat> 004E 006A;;;;N;LATIN LETTER CAPITAL N SMALL J;;01CA;01CC;
+01CC;LATIN SMALL LETTER NJ;Ll;0;L;<compat> 006E 006A;;;;N;LATIN SMALL LETTER N J;;01CA;;01CB
+01CD;LATIN CAPITAL LETTER A WITH CARON;Lu;0;L;0041 030C;;;;N;LATIN CAPITAL LETTER A HACEK;;;01CE;
+01CE;LATIN SMALL LETTER A WITH CARON;Ll;0;L;0061 030C;;;;N;LATIN SMALL LETTER A HACEK;;01CD;;01CD
+01CF;LATIN CAPITAL LETTER I WITH CARON;Lu;0;L;0049 030C;;;;N;LATIN CAPITAL LETTER I HACEK;;;01D0;
+01D0;LATIN SMALL LETTER I WITH CARON;Ll;0;L;0069 030C;;;;N;LATIN SMALL LETTER I HACEK;;01CF;;01CF
+01D1;LATIN CAPITAL LETTER O WITH CARON;Lu;0;L;004F 030C;;;;N;LATIN CAPITAL LETTER O HACEK;;;01D2;
+01D2;LATIN SMALL LETTER O WITH CARON;Ll;0;L;006F 030C;;;;N;LATIN SMALL LETTER O HACEK;;01D1;;01D1
+01D3;LATIN CAPITAL LETTER U WITH CARON;Lu;0;L;0055 030C;;;;N;LATIN CAPITAL LETTER U HACEK;;;01D4;
+01D4;LATIN SMALL LETTER U WITH CARON;Ll;0;L;0075 030C;;;;N;LATIN SMALL LETTER U HACEK;;01D3;;01D3
+01D5;LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON;Lu;0;L;00DC 0304;;;;N;LATIN CAPITAL LETTER U DIAERESIS MACRON;;;01D6;
+01D6;LATIN SMALL LETTER U WITH DIAERESIS AND MACRON;Ll;0;L;00FC 0304;;;;N;LATIN SMALL LETTER U DIAERESIS MACRON;;01D5;;01D5
+01D7;LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE;Lu;0;L;00DC 0301;;;;N;LATIN CAPITAL LETTER U DIAERESIS ACUTE;;;01D8;
+01D8;LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE;Ll;0;L;00FC 0301;;;;N;LATIN SMALL LETTER U DIAERESIS ACUTE;;01D7;;01D7
+01D9;LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON;Lu;0;L;00DC 030C;;;;N;LATIN CAPITAL LETTER U DIAERESIS HACEK;;;01DA;
+01DA;LATIN SMALL LETTER U WITH DIAERESIS AND CARON;Ll;0;L;00FC 030C;;;;N;LATIN SMALL LETTER U DIAERESIS HACEK;;01D9;;01D9
+01DB;LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE;Lu;0;L;00DC 0300;;;;N;LATIN CAPITAL LETTER U DIAERESIS GRAVE;;;01DC;
+01DC;LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE;Ll;0;L;00FC 0300;;;;N;LATIN SMALL LETTER U DIAERESIS GRAVE;;01DB;;01DB
+01DD;LATIN SMALL LETTER TURNED E;Ll;0;L;;;;;N;;;;;
+01DE;LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON;Lu;0;L;00C4 0304;;;;N;LATIN CAPITAL LETTER A DIAERESIS MACRON;;;01DF;
+01DF;LATIN SMALL LETTER A WITH DIAERESIS AND MACRON;Ll;0;L;00E4 0304;;;;N;LATIN SMALL LETTER A DIAERESIS MACRON;;01DE;;01DE
+01E0;LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON;Lu;0;L;0041 0307 0304;;;;N;LATIN CAPITAL LETTER A DOT MACRON;;;01E1;
+01E1;LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON;Ll;0;L;0061 0307 0304;;;;N;LATIN SMALL LETTER A DOT MACRON;;01E0;;01E0
+01E2;LATIN CAPITAL LETTER AE WITH MACRON;Lu;0;L;00C6 0304;;;;N;LATIN CAPITAL LETTER A E MACRON;;;01E3;
+01E3;LATIN SMALL LETTER AE WITH MACRON;Ll;0;L;00E6 0304;;;;N;LATIN SMALL LETTER A E MACRON;;01E2;;01E2
+01E4;LATIN CAPITAL LETTER G WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER G BAR;;;01E5;
+01E5;LATIN SMALL LETTER G WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER G BAR;;01E4;;01E4
+01E6;LATIN CAPITAL LETTER G WITH CARON;Lu;0;L;0047 030C;;;;N;LATIN CAPITAL LETTER G HACEK;;;01E7;
+01E7;LATIN SMALL LETTER G WITH CARON;Ll;0;L;0067 030C;;;;N;LATIN SMALL LETTER G HACEK;;01E6;;01E6
+01E8;LATIN CAPITAL LETTER K WITH CARON;Lu;0;L;004B 030C;;;;N;LATIN CAPITAL LETTER K HACEK;;;01E9;
+01E9;LATIN SMALL LETTER K WITH CARON;Ll;0;L;006B 030C;;;;N;LATIN SMALL LETTER K HACEK;;01E8;;01E8
+01EA;LATIN CAPITAL LETTER O WITH OGONEK;Lu;0;L;004F 0328;;;;N;LATIN CAPITAL LETTER O OGONEK;;;01EB;
+01EB;LATIN SMALL LETTER O WITH OGONEK;Ll;0;L;006F 0328;;;;N;LATIN SMALL LETTER O OGONEK;;01EA;;01EA
+01EC;LATIN CAPITAL LETTER O WITH OGONEK AND MACRON;Lu;0;L;01EA 0304;;;;N;LATIN CAPITAL LETTER O OGONEK MACRON;;;01ED;
+01ED;LATIN SMALL LETTER O WITH OGONEK AND MACRON;Ll;0;L;01EB 0304;;;;N;LATIN SMALL LETTER O OGONEK MACRON;;01EC;;01EC
+01EE;LATIN CAPITAL LETTER EZH WITH CARON;Lu;0;L;01B7 030C;;;;N;LATIN CAPITAL LETTER YOGH HACEK;;;01EF;
+01EF;LATIN SMALL LETTER EZH WITH CARON;Ll;0;L;0292 030C;;;;N;LATIN SMALL LETTER YOGH HACEK;;01EE;;01EE
+01F0;LATIN SMALL LETTER J WITH CARON;Ll;0;L;006A 030C;;;;N;LATIN SMALL LETTER J HACEK;;;;
+01F1;LATIN CAPITAL LETTER DZ;Lu;0;L;<compat> 0044 005A;;;;N;;;;01F3;01F2
+01F2;LATIN CAPITAL LETTER D WITH SMALL LETTER Z;Lt;0;L;<compat> 0044 007A;;;;N;;;01F1;01F3;
+01F3;LATIN SMALL LETTER DZ;Ll;0;L;<compat> 0064 007A;;;;N;;;01F1;;01F2
+01F4;LATIN CAPITAL LETTER G WITH ACUTE;Lu;0;L;0047 0301;;;;N;;;;01F5;
+01F5;LATIN SMALL LETTER G WITH ACUTE;Ll;0;L;0067 0301;;;;N;;;01F4;;01F4
+01FA;LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE;Lu;0;L;00C5 0301;;;;N;;;;01FB;
+01FB;LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE;Ll;0;L;00E5 0301;;;;N;;;01FA;;01FA
+01FC;LATIN CAPITAL LETTER AE WITH ACUTE;Lu;0;L;00C6 0301;;;;N;;;;01FD;
+01FD;LATIN SMALL LETTER AE WITH ACUTE;Ll;0;L;00E6 0301;;;;N;;;01FC;;01FC
+01FE;LATIN CAPITAL LETTER O WITH STROKE AND ACUTE;Lu;0;L;00D8 0301;;;;N;;;;01FF;
+01FF;LATIN SMALL LETTER O WITH STROKE AND ACUTE;Ll;0;L;00F8 0301;;;;N;;;01FE;;01FE
+0200;LATIN CAPITAL LETTER A WITH DOUBLE GRAVE;Lu;0;L;0041 030F;;;;N;;;;0201;
+0201;LATIN SMALL LETTER A WITH DOUBLE GRAVE;Ll;0;L;0061 030F;;;;N;;;0200;;0200
+0202;LATIN CAPITAL LETTER A WITH INVERTED BREVE;Lu;0;L;0041 0311;;;;N;;;;0203;
+0203;LATIN SMALL LETTER A WITH INVERTED BREVE;Ll;0;L;0061 0311;;;;N;;;0202;;0202
+0204;LATIN CAPITAL LETTER E WITH DOUBLE GRAVE;Lu;0;L;0045 030F;;;;N;;;;0205;
+0205;LATIN SMALL LETTER E WITH DOUBLE GRAVE;Ll;0;L;0065 030F;;;;N;;;0204;;0204
+0206;LATIN CAPITAL LETTER E WITH INVERTED BREVE;Lu;0;L;0045 0311;;;;N;;;;0207;
+0207;LATIN SMALL LETTER E WITH INVERTED BREVE;Ll;0;L;0065 0311;;;;N;;;0206;;0206
+0208;LATIN CAPITAL LETTER I WITH DOUBLE GRAVE;Lu;0;L;0049 030F;;;;N;;;;0209;
+0209;LATIN SMALL LETTER I WITH DOUBLE GRAVE;Ll;0;L;0069 030F;;;;N;;;0208;;0208
+020A;LATIN CAPITAL LETTER I WITH INVERTED BREVE;Lu;0;L;0049 0311;;;;N;;;;020B;
+020B;LATIN SMALL LETTER I WITH INVERTED BREVE;Ll;0;L;0069 0311;;;;N;;;020A;;020A
+020C;LATIN CAPITAL LETTER O WITH DOUBLE GRAVE;Lu;0;L;004F 030F;;;;N;;;;020D;
+020D;LATIN SMALL LETTER O WITH DOUBLE GRAVE;Ll;0;L;006F 030F;;;;N;;;020C;;020C
+020E;LATIN CAPITAL LETTER O WITH INVERTED BREVE;Lu;0;L;004F 0311;;;;N;;;;020F;
+020F;LATIN SMALL LETTER O WITH INVERTED BREVE;Ll;0;L;006F 0311;;;;N;;;020E;;020E
+0210;LATIN CAPITAL LETTER R WITH DOUBLE GRAVE;Lu;0;L;0052 030F;;;;N;;;;0211;
+0211;LATIN SMALL LETTER R WITH DOUBLE GRAVE;Ll;0;L;0072 030F;;;;N;;;0210;;0210
+0212;LATIN CAPITAL LETTER R WITH INVERTED BREVE;Lu;0;L;0052 0311;;;;N;;;;0213;
+0213;LATIN SMALL LETTER R WITH INVERTED BREVE;Ll;0;L;0072 0311;;;;N;;;0212;;0212
+0214;LATIN CAPITAL LETTER U WITH DOUBLE GRAVE;Lu;0;L;0055 030F;;;;N;;;;0215;
+0215;LATIN SMALL LETTER U WITH DOUBLE GRAVE;Ll;0;L;0075 030F;;;;N;;;0214;;0214
+0216;LATIN CAPITAL LETTER U WITH INVERTED BREVE;Lu;0;L;0055 0311;;;;N;;;;0217;
+0217;LATIN SMALL LETTER U WITH INVERTED BREVE;Ll;0;L;0075 0311;;;;N;;;0216;;0216
+0250;LATIN SMALL LETTER TURNED A;Ll;0;L;;;;;N;;;;;
+0251;LATIN SMALL LETTER ALPHA;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT A;;;;
+0252;LATIN SMALL LETTER TURNED ALPHA;Ll;0;L;;;;;N;LATIN SMALL LETTER TURNED SCRIPT A;;;;
+0253;LATIN SMALL LETTER B WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER B HOOK;;0181;;0181
+0254;LATIN SMALL LETTER OPEN O;Ll;0;L;;;;;N;;;0186;;0186
+0255;LATIN SMALL LETTER C WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER C CURL;;;;
+0256;LATIN SMALL LETTER D WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER D RETROFLEX HOOK;;0189;;0189
+0257;LATIN SMALL LETTER D WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER D HOOK;;018A;;018A
+0258;LATIN SMALL LETTER REVERSED E;Ll;0;L;;;;;N;;;018E;;018E
+0259;LATIN SMALL LETTER SCHWA;Ll;0;L;;;;;N;;;018F;;018F
+025A;LATIN SMALL LETTER SCHWA WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCHWA HOOK;;;;
+025B;LATIN SMALL LETTER OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER EPSILON;;0190;;0190
+025C;LATIN SMALL LETTER REVERSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED EPSILON;;;;
+025D;LATIN SMALL LETTER REVERSED OPEN E WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED EPSILON HOOK;;;;
+025E;LATIN SMALL LETTER CLOSED REVERSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER CLOSED REVERSED EPSILON;;;;
+025F;LATIN SMALL LETTER DOTLESS J WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER DOTLESS J BAR;;;;
+0260;LATIN SMALL LETTER G WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER G HOOK;;0193;;0193
+0261;LATIN SMALL LETTER SCRIPT G;Ll;0;L;;;;;N;;;;;
+0262;LATIN LETTER SMALL CAPITAL G;Ll;0;L;;;;;N;;;;;
+0263;LATIN SMALL LETTER GAMMA;Ll;0;L;;;;;N;;;0194;;0194
+0264;LATIN SMALL LETTER RAMS HORN;Ll;0;L;;;;;N;LATIN SMALL LETTER BABY GAMMA;;;;
+0265;LATIN SMALL LETTER TURNED H;Ll;0;L;;;;;N;;;;;
+0266;LATIN SMALL LETTER H WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER H HOOK;;;;
+0267;LATIN SMALL LETTER HENG WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER HENG HOOK;;;;
+0268;LATIN SMALL LETTER I WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED I;;0197;;0197
+0269;LATIN SMALL LETTER IOTA;Ll;0;L;;;;;N;;;0196;;0196
+026A;LATIN LETTER SMALL CAPITAL I;Ll;0;L;;;;;N;;;;;
+026B;LATIN SMALL LETTER L WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;;
+026C;LATIN SMALL LETTER L WITH BELT;Ll;0;L;;;;;N;LATIN SMALL LETTER L BELT;;;;
+026D;LATIN SMALL LETTER L WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER L RETROFLEX HOOK;;;;
+026E;LATIN SMALL LETTER LEZH;Ll;0;L;;;;;N;LATIN SMALL LETTER L YOGH;;;;
+026F;LATIN SMALL LETTER TURNED M;Ll;0;L;;;;;N;;;019C;;019C
+0270;LATIN SMALL LETTER TURNED M WITH LONG LEG;Ll;0;L;;;;;N;;;;;
+0271;LATIN SMALL LETTER M WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER M HOOK;;;;
+0272;LATIN SMALL LETTER N WITH LEFT HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER N HOOK;;019D;;019D
+0273;LATIN SMALL LETTER N WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER N RETROFLEX HOOK;;;;
+0274;LATIN LETTER SMALL CAPITAL N;Ll;0;L;;;;;N;;;;;
+0275;LATIN SMALL LETTER BARRED O;Ll;0;L;;;;;N;;;;;
+0276;LATIN LETTER SMALL CAPITAL OE;Ll;0;L;;;;;N;LATIN LETTER SMALL CAPITAL O E;;;;
+0277;LATIN SMALL LETTER CLOSED OMEGA;Ll;0;L;;;;;N;;;;;
+0278;LATIN SMALL LETTER PHI;Ll;0;L;;;;;N;;;;;
+0279;LATIN SMALL LETTER TURNED R;Ll;0;L;;;;;N;;;;;
+027A;LATIN SMALL LETTER TURNED R WITH LONG LEG;Ll;0;L;;;;;N;;;;;
+027B;LATIN SMALL LETTER TURNED R WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER TURNED R HOOK;;;;
+027C;LATIN SMALL LETTER R WITH LONG LEG;Ll;0;L;;;;;N;;;;;
+027D;LATIN SMALL LETTER R WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER R HOOK;;;;
+027E;LATIN SMALL LETTER R WITH FISHHOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER FISHHOOK R;;;;
+027F;LATIN SMALL LETTER REVERSED R WITH FISHHOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED FISHHOOK R;;;;
+0280;LATIN LETTER SMALL CAPITAL R;Ll;0;L;;;;;N;;;;;
+0281;LATIN LETTER SMALL CAPITAL INVERTED R;Ll;0;L;;;;;N;;;;;
+0282;LATIN SMALL LETTER S WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER S HOOK;;;;
+0283;LATIN SMALL LETTER ESH;Ll;0;L;;;;;N;;;01A9;;01A9
+0284;LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER DOTLESS J BAR HOOK;;;;
+0285;LATIN SMALL LETTER SQUAT REVERSED ESH;Ll;0;L;;;;;N;;;;;
+0286;LATIN SMALL LETTER ESH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER ESH CURL;;;;
+0287;LATIN SMALL LETTER TURNED T;Ll;0;L;;;;;N;;;;;
+0288;LATIN SMALL LETTER T WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T RETROFLEX HOOK;;01AE;;01AE
+0289;LATIN SMALL LETTER U BAR;Ll;0;L;;;;;N;;;;;
+028A;LATIN SMALL LETTER UPSILON;Ll;0;L;;;;;N;;;01B1;;01B1
+028B;LATIN SMALL LETTER V WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT V;;01B2;;01B2
+028C;LATIN SMALL LETTER TURNED V;Ll;0;L;;;;;N;;;;;
+028D;LATIN SMALL LETTER TURNED W;Ll;0;L;;;;;N;;;;;
+028E;LATIN SMALL LETTER TURNED Y;Ll;0;L;;;;;N;;;;;
+028F;LATIN LETTER SMALL CAPITAL Y;Ll;0;L;;;;;N;;;;;
+0290;LATIN SMALL LETTER Z WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Z RETROFLEX HOOK;;;;
+0291;LATIN SMALL LETTER Z WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER Z CURL;;;;
+0292;LATIN SMALL LETTER EZH;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH;;01B7;;01B7
+0293;LATIN SMALL LETTER EZH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH CURL;;;;
+0294;LATIN LETTER GLOTTAL STOP;Ll;0;L;;;;;N;;;;;
+0295;LATIN LETTER PHARYNGEAL VOICED FRICATIVE;Ll;0;L;;;;;N;LATIN LETTER REVERSED GLOTTAL STOP;;;;
+0296;LATIN LETTER INVERTED GLOTTAL STOP;Ll;0;L;;;;;N;;;;;
+0297;LATIN LETTER STRETCHED C;Ll;0;L;;;;;N;;;;;
+0298;LATIN LETTER BILABIAL CLICK;Ll;0;L;;;;;N;LATIN LETTER BULLSEYE;;;;
+0299;LATIN LETTER SMALL CAPITAL B;Ll;0;L;;;;;N;;;;;
+029A;LATIN SMALL LETTER CLOSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER CLOSED EPSILON;;;;
+029B;LATIN LETTER SMALL CAPITAL G WITH HOOK;Ll;0;L;;;;;N;LATIN LETTER SMALL CAPITAL G HOOK;;;;
+029C;LATIN LETTER SMALL CAPITAL H;Ll;0;L;;;;;N;;;;;
+029D;LATIN SMALL LETTER J WITH CROSSED-TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER CROSSED-TAIL J;;;;
+029E;LATIN SMALL LETTER TURNED K;Ll;0;L;;;;;N;;;;;
+029F;LATIN LETTER SMALL CAPITAL L;Ll;0;L;;;;;N;;;;;
+02A0;LATIN SMALL LETTER Q WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Q HOOK;;;;
+02A1;LATIN LETTER GLOTTAL STOP WITH STROKE;Ll;0;L;;;;;N;LATIN LETTER GLOTTAL STOP BAR;;;;
+02A2;LATIN LETTER REVERSED GLOTTAL STOP WITH STROKE;Ll;0;L;;;;;N;LATIN LETTER REVERSED GLOTTAL STOP BAR;;;;
+02A3;LATIN SMALL LETTER DZ DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER D Z;;;;
+02A4;LATIN SMALL LETTER DEZH DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER D YOGH;;;;
+02A5;LATIN SMALL LETTER DZ DIGRAPH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER D Z CURL;;;;
+02A6;LATIN SMALL LETTER TS DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER T S;;;;
+02A7;LATIN SMALL LETTER TESH DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER T ESH;;;;
+02A8;LATIN SMALL LETTER TC DIGRAPH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER T C CURL;;;;
+02B0;MODIFIER LETTER SMALL H;Lm;0;L;<super> 0068;;;;N;;;;;
+02B1;MODIFIER LETTER SMALL H WITH HOOK;Lm;0;L;<super> 0266;;;;N;MODIFIER LETTER SMALL H HOOK;;;;
+02B2;MODIFIER LETTER SMALL J;Lm;0;L;<super> 006A;;;;N;;;;;
+02B3;MODIFIER LETTER SMALL R;Lm;0;L;<super> 0072;;;;N;;;;;
+02B4;MODIFIER LETTER SMALL TURNED R;Lm;0;L;<super> 0279;;;;N;;;;;
+02B5;MODIFIER LETTER SMALL TURNED R WITH HOOK;Lm;0;L;<super> 027B;;;;N;MODIFIER LETTER SMALL TURNED R HOOK;;;;
+02B6;MODIFIER LETTER SMALL CAPITAL INVERTED R;Lm;0;L;<super> 0281;;;;N;;;;;
+02B7;MODIFIER LETTER SMALL W;Lm;0;L;<super> 0077;;;;N;;;;;
+02B8;MODIFIER LETTER SMALL Y;Lm;0;L;<super> 0079;;;;N;;;;;
+02B9;MODIFIER LETTER PRIME;Lm;0;L;;;;;N;;;;;
+02BA;MODIFIER LETTER DOUBLE PRIME;Lm;0;L;;;;;N;;;;;
+02BB;MODIFIER LETTER TURNED COMMA;Lm;0;L;;;;;N;;;;;
+02BC;MODIFIER LETTER APOSTROPHE;Lm;0;L;;;;;N;;;;;
+02BD;MODIFIER LETTER REVERSED COMMA;Lm;0;L;;;;;N;;;;;
+02BE;MODIFIER LETTER RIGHT HALF RING;Lm;0;L;;;;;N;;;;;
+02BF;MODIFIER LETTER LEFT HALF RING;Lm;0;L;;;;;N;;;;;
+02C0;MODIFIER LETTER GLOTTAL STOP;Lm;0;L;;;;;N;;;;;
+02C1;MODIFIER LETTER REVERSED GLOTTAL STOP;Lm;0;L;;;;;N;;;;;
+02C2;MODIFIER LETTER LEFT ARROWHEAD;Lm;0;L;;;;;N;;;;;
+02C3;MODIFIER LETTER RIGHT ARROWHEAD;Lm;0;L;;;;;N;;;;;
+02C4;MODIFIER LETTER UP ARROWHEAD;Lm;0;L;;;;;N;;;;;
+02C5;MODIFIER LETTER DOWN ARROWHEAD;Lm;0;L;;;;;N;;;;;
+02C6;MODIFIER LETTER CIRCUMFLEX ACCENT;Lm;0;L;;;;;N;MODIFIER LETTER CIRCUMFLEX;;;;
+02C7;CARON;Lm;0;L;;;;;N;MODIFIER LETTER HACEK;Mandarin Chinese third tone;;;
+02C8;MODIFIER LETTER VERTICAL LINE;Lm;0;L;;;;;N;;;;;
+02C9;MODIFIER LETTER MACRON;Lm;0;L;;;;;N;;Mandarin Chinese first tone;;;
+02CA;MODIFIER LETTER ACUTE ACCENT;Lm;0;L;;;;;N;MODIFIER LETTER ACUTE;Mandarin Chinese second tone;;;
+02CB;MODIFIER LETTER GRAVE ACCENT;Lm;0;L;;;;;N;MODIFIER LETTER GRAVE;Mandarin Chinese fourth tone;;;
+02CC;MODIFIER LETTER LOW VERTICAL LINE;Lm;0;L;;;;;N;;;;;
+02CD;MODIFIER LETTER LOW MACRON;Lm;0;L;;;;;N;;;;;
+02CE;MODIFIER LETTER LOW GRAVE ACCENT;Lm;0;L;;;;;N;MODIFIER LETTER LOW GRAVE;;;;
+02CF;MODIFIER LETTER LOW ACUTE ACCENT;Lm;0;L;;;;;N;MODIFIER LETTER LOW ACUTE;;;;
+02D0;MODIFIER LETTER TRIANGULAR COLON;Lm;0;L;;;;;N;;;;;
+02D1;MODIFIER LETTER HALF TRIANGULAR COLON;Lm;0;L;;;;;N;;;;;
+02D2;MODIFIER LETTER CENTRED RIGHT HALF RING;Lm;0;L;;;;;N;MODIFIER LETTER CENTERED RIGHT HALF RING;;;;
+02D3;MODIFIER LETTER CENTRED LEFT HALF RING;Lm;0;L;;;;;N;MODIFIER LETTER CENTERED LEFT HALF RING;;;;
+02D4;MODIFIER LETTER UP TACK;Lm;0;L;;;;;N;;;;;
+02D5;MODIFIER LETTER DOWN TACK;Lm;0;L;;;;;N;;;;;
+02D6;MODIFIER LETTER PLUS SIGN;Lm;0;L;;;;;N;;;;;
+02D7;MODIFIER LETTER MINUS SIGN;Lm;0;L;;;;;N;;;;;
+02D8;BREVE;Lm;0;L;<compat> 0020 0306;;;;N;SPACING BREVE;;;;
+02D9;DOT ABOVE;Lm;0;L;<compat> 0020 0307;;;;N;SPACING DOT ABOVE;Mandarin Chinese light tone;;;
+02DA;RING ABOVE;Lm;0;L;<compat> 0020 030A;;;;N;SPACING RING ABOVE;;;;
+02DB;OGONEK;Lm;0;L;<compat> 0020 0328;;;;N;SPACING OGONEK;;;;
+02DC;SMALL TILDE;Lm;0;L;<compat> 0020 0303;;;;N;SPACING TILDE;;;;
+02DD;DOUBLE ACUTE ACCENT;Lm;0;L;<compat> 0020 030B;;;;N;SPACING DOUBLE ACUTE;;;;
+02DE;MODIFIER LETTER RHOTIC HOOK;Lm;0;L;;;;;N;;;;;
+02E0;MODIFIER LETTER SMALL GAMMA;Lm;0;L;<super> 0263;;;;N;;;;;
+02E1;MODIFIER LETTER SMALL L;Lm;0;L;<super> 006C;;;;N;;;;;
+02E2;MODIFIER LETTER SMALL S;Lm;0;L;<super> 0073;;;;N;;;;;
+02E3;MODIFIER LETTER SMALL X;Lm;0;L;<super> 0078;;;;N;;;;;
+02E4;MODIFIER LETTER SMALL REVERSED GLOTTAL STOP;Lm;0;L;<super> 0295;;;;N;;;;;
+02E5;MODIFIER LETTER EXTRA-HIGH TONE BAR;Lm;0;L;;;;;N;;;;;
+02E6;MODIFIER LETTER HIGH TONE BAR;Lm;0;L;;;;;N;;;;;
+02E7;MODIFIER LETTER MID TONE BAR;Lm;0;L;;;;;N;;;;;
+02E8;MODIFIER LETTER LOW TONE BAR;Lm;0;L;;;;;N;;;;;
+02E9;MODIFIER LETTER EXTRA-LOW TONE BAR;Lm;0;L;;;;;N;;;;;
+0300;COMBINING GRAVE ACCENT;Mn;230;L;;;;;N;NON-SPACING GRAVE;Varia;;;
+0301;COMBINING ACUTE ACCENT;Mn;230;L;;;;;N;NON-SPACING ACUTE;Oxia;;;
+0302;COMBINING CIRCUMFLEX ACCENT;Mn;230;L;;;;;N;NON-SPACING CIRCUMFLEX;;;;
+0303;COMBINING TILDE;Mn;230;L;;;;;N;NON-SPACING TILDE;;;;
+0304;COMBINING MACRON;Mn;230;L;;;;;N;NON-SPACING MACRON;;;;
+0305;COMBINING OVERLINE;Mn;230;L;;;;;N;NON-SPACING OVERSCORE;;;;
+0306;COMBINING BREVE;Mn;230;L;;;;;N;NON-SPACING BREVE;Vrachy;;;
+0307;COMBINING DOT ABOVE;Mn;230;L;;;;;N;NON-SPACING DOT ABOVE;;;;
+0308;COMBINING DIAERESIS;Mn;230;L;;;;;N;NON-SPACING DIAERESIS;Dialytika;;;
+0309;COMBINING HOOK ABOVE;Mn;230;L;;;;;N;NON-SPACING HOOK ABOVE;;;;
+030A;COMBINING RING ABOVE;Mn;230;L;;;;;N;NON-SPACING RING ABOVE;;;;
+030B;COMBINING DOUBLE ACUTE ACCENT;Mn;230;L;;;;;N;NON-SPACING DOUBLE ACUTE;;;;
+030C;COMBINING CARON;Mn;230;L;;;;;N;NON-SPACING HACEK;;;;
+030D;COMBINING VERTICAL LINE ABOVE;Mn;230;L;;;;;N;NON-SPACING VERTICAL LINE ABOVE;Tonos;;;
+030E;COMBINING DOUBLE VERTICAL LINE ABOVE;Mn;230;L;;;;;N;NON-SPACING DOUBLE VERTICAL LINE ABOVE;;;;
+030F;COMBINING DOUBLE GRAVE ACCENT;Mn;230;L;;;;;N;NON-SPACING DOUBLE GRAVE;;;;
+0310;COMBINING CANDRABINDU;Mn;230;L;0306 0307;;;;N;NON-SPACING CANDRABINDU;;;;
+0311;COMBINING INVERTED BREVE;Mn;230;L;;;;;N;NON-SPACING INVERTED BREVE;;;;
+0312;COMBINING TURNED COMMA ABOVE;Mn;230;L;;;;;N;NON-SPACING TURNED COMMA ABOVE;;;;
+0313;COMBINING COMMA ABOVE;Mn;230;L;;;;;N;NON-SPACING COMMA ABOVE;Psili;;;
+0314;COMBINING REVERSED COMMA ABOVE;Mn;230;L;;;;;N;NON-SPACING REVERSED COMMA ABOVE;Dasia;;;
+0315;COMBINING COMMA ABOVE RIGHT;Mn;232;L;;;;;N;NON-SPACING COMMA ABOVE RIGHT;;;;
+0316;COMBINING GRAVE ACCENT BELOW;Mn;220;L;;;;;N;NON-SPACING GRAVE BELOW;;;;
+0317;COMBINING ACUTE ACCENT BELOW;Mn;220;L;;;;;N;NON-SPACING ACUTE BELOW;;;;
+0318;COMBINING LEFT TACK BELOW;Mn;220;L;;;;;N;NON-SPACING LEFT TACK BELOW;;;;
+0319;COMBINING RIGHT TACK BELOW;Mn;220;L;;;;;N;NON-SPACING RIGHT TACK BELOW;;;;
+031A;COMBINING LEFT ANGLE ABOVE;Mn;232;L;;;;;N;NON-SPACING LEFT ANGLE ABOVE;;;;
+031B;COMBINING HORN;Mn;216;L;;;;;N;NON-SPACING HORN;;;;
+031C;COMBINING LEFT HALF RING BELOW;Mn;220;L;;;;;N;NON-SPACING LEFT HALF RING BELOW;;;;
+031D;COMBINING UP TACK BELOW;Mn;220;L;;;;;N;NON-SPACING UP TACK BELOW;;;;
+031E;COMBINING DOWN TACK BELOW;Mn;220;L;;;;;N;NON-SPACING DOWN TACK BELOW;;;;
+031F;COMBINING PLUS SIGN BELOW;Mn;220;L;;;;;N;NON-SPACING PLUS SIGN BELOW;;;;
+0320;COMBINING MINUS SIGN BELOW;Mn;220;L;;;;;N;NON-SPACING MINUS SIGN BELOW;;;;
+0321;COMBINING PALATALIZED HOOK BELOW;Mn;202;L;;;;;N;NON-SPACING PALATALIZED HOOK BELOW;;;;
+0322;COMBINING RETROFLEX HOOK BELOW;Mn;202;L;;;;;N;NON-SPACING RETROFLEX HOOK BELOW;;;;
+0323;COMBINING DOT BELOW;Mn;220;L;;;;;N;NON-SPACING DOT BELOW;;;;
+0324;COMBINING DIAERESIS BELOW;Mn;220;L;;;;;N;NON-SPACING DOUBLE DOT BELOW;;;;
+0325;COMBINING RING BELOW;Mn;220;L;;;;;N;NON-SPACING RING BELOW;;;;
+0326;COMBINING COMMA BELOW;Mn;220;L;;;;;N;NON-SPACING COMMA BELOW;;;;
+0327;COMBINING CEDILLA;Mn;202;L;;;;;N;NON-SPACING CEDILLA;;;;
+0328;COMBINING OGONEK;Mn;202;L;;;;;N;NON-SPACING OGONEK;;;;
+0329;COMBINING VERTICAL LINE BELOW;Mn;220;L;;;;;N;NON-SPACING VERTICAL LINE BELOW;;;;
+032A;COMBINING BRIDGE BELOW;Mn;220;L;;;;;N;NON-SPACING BRIDGE BELOW;;;;
+032B;COMBINING INVERTED DOUBLE ARCH BELOW;Mn;220;L;;;;;N;NON-SPACING INVERTED DOUBLE ARCH BELOW;;;;
+032C;COMBINING CARON BELOW;Mn;220;L;;;;;N;NON-SPACING HACEK BELOW;;;;
+032D;COMBINING CIRCUMFLEX ACCENT BELOW;Mn;220;L;;;;;N;NON-SPACING CIRCUMFLEX BELOW;;;;
+032E;COMBINING BREVE BELOW;Mn;220;L;;;;;N;NON-SPACING BREVE BELOW;;;;
+032F;COMBINING INVERTED BREVE BELOW;Mn;220;L;;;;;N;NON-SPACING INVERTED BREVE BELOW;;;;
+0330;COMBINING TILDE BELOW;Mn;220;L;;;;;N;NON-SPACING TILDE BELOW;;;;
+0331;COMBINING MACRON BELOW;Mn;220;L;;;;;N;NON-SPACING MACRON BELOW;;;;
+0332;COMBINING LOW LINE;Mn;220;L;;;;;N;NON-SPACING UNDERSCORE;;;;
+0333;COMBINING DOUBLE LOW LINE;Mn;220;L;;;;;N;NON-SPACING DOUBLE UNDERSCORE;;;;
+0334;COMBINING TILDE OVERLAY;Mn;1;L;;;;;N;NON-SPACING TILDE OVERLAY;;;;
+0335;COMBINING SHORT STROKE OVERLAY;Mn;1;L;;;;;N;NON-SPACING SHORT BAR OVERLAY;;;;
+0336;COMBINING LONG STROKE OVERLAY;Mn;1;L;;;;;N;NON-SPACING LONG BAR OVERLAY;;;;
+0337;COMBINING SHORT SOLIDUS OVERLAY;Mn;1;L;;;;;N;NON-SPACING SHORT SLASH OVERLAY;;;;
+0338;COMBINING LONG SOLIDUS OVERLAY;Mn;1;L;;;;;N;NON-SPACING LONG SLASH OVERLAY;;;;
+0339;COMBINING RIGHT HALF RING BELOW;Mn;220;L;;;;;N;NON-SPACING RIGHT HALF RING BELOW;;;;
+033A;COMBINING INVERTED BRIDGE BELOW;Mn;220;L;;;;;N;NON-SPACING INVERTED BRIDGE BELOW;;;;
+033B;COMBINING SQUARE BELOW;Mn;220;L;;;;;N;NON-SPACING SQUARE BELOW;;;;
+033C;COMBINING SEAGULL BELOW;Mn;220;L;;;;;N;NON-SPACING SEAGULL BELOW;;;;
+033D;COMBINING X ABOVE;Mn;230;L;;;;;N;NON-SPACING X ABOVE;;;;
+033E;COMBINING VERTICAL TILDE;Mn;230;L;;;;;N;NON-SPACING VERTICAL TILDE;;;;
+033F;COMBINING DOUBLE OVERLINE;Mn;230;L;;;;;N;NON-SPACING DOUBLE OVERSCORE;;;;
+0340;COMBINING GRAVE TONE MARK;Mn;230;L;0300;;;;N;NON-SPACING GRAVE TONE MARK;Vietnamese;;;
+0341;COMBINING ACUTE TONE MARK;Mn;230;L;0301;;;;N;NON-SPACING ACUTE TONE MARK;Vietnamese;;;
+0342;COMBINING GREEK PERISPOMENI;Mn;230;L;;;;;N;;;;;
+0343;COMBINING GREEK KORONIS;Mn;230;L;0313;;;;N;;;;;
+0344;COMBINING GREEK DIALYTIKA TONOS;Mn;230;L;0308 030D;;;;N;GREEK NON-SPACING DIAERESIS TONOS;;;;
+0345;COMBINING GREEK YPOGEGRAMMENI;Mn;220;L;;;;;N;GREEK NON-SPACING IOTA BELOW;;;;
+0360;COMBINING DOUBLE TILDE;Mn;234;L;;;;;N;;;;;
+0361;COMBINING DOUBLE INVERTED BREVE;Mn;234;L;;;;;N;;;;;
+0374;GREEK NUMERAL SIGN;Lm;0;L;02B9;;;;N;GREEK UPPER NUMERAL SIGN;Dexia keraia;;;
+0375;GREEK LOWER NUMERAL SIGN;So;0;L;;;;;N;;Aristeri keraia;;;
+037A;GREEK YPOGEGRAMMENI;Lm;0;L;<compat> 0020 0345;;;;N;GREEK SPACING IOTA BELOW;;;;
+037E;GREEK QUESTION MARK;Po;0;L;003B;;;;N;;Erotimatiko;;;
+0384;GREEK TONOS;Lm;0;L;<compat> 0020 030D;;;;N;GREEK SPACING TONOS;;;;
+0385;GREEK DIALYTIKA TONOS;Lm;0;L;00A8 030D;;;;N;GREEK SPACING DIAERESIS TONOS;;;;
+0386;GREEK CAPITAL LETTER ALPHA WITH TONOS;Lu;0;L;0391 030D;;;;N;GREEK CAPITAL LETTER ALPHA TONOS;;;03AC;
+0387;GREEK ANO TELEIA;Po;0;L;00B7;;;;N;;;;;
+0388;GREEK CAPITAL LETTER EPSILON WITH TONOS;Lu;0;L;0395 030D;;;;N;GREEK CAPITAL LETTER EPSILON TONOS;;;03AD;
+0389;GREEK CAPITAL LETTER ETA WITH TONOS;Lu;0;L;0397 030D;;;;N;GREEK CAPITAL LETTER ETA TONOS;;;03AE;
+038A;GREEK CAPITAL LETTER IOTA WITH TONOS;Lu;0;L;0399 030D;;;;N;GREEK CAPITAL LETTER IOTA TONOS;;;03AF;
+038C;GREEK CAPITAL LETTER OMICRON WITH TONOS;Lu;0;L;039F 030D;;;;N;GREEK CAPITAL LETTER OMICRON TONOS;;;03CC;
+038E;GREEK CAPITAL LETTER UPSILON WITH TONOS;Lu;0;L;03A5 030D;;;;N;GREEK CAPITAL LETTER UPSILON TONOS;;;03CD;
+038F;GREEK CAPITAL LETTER OMEGA WITH TONOS;Lu;0;L;03A9 030D;;;;N;GREEK CAPITAL LETTER OMEGA TONOS;;;03CE;
+0390;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS;Ll;0;L;03B9 0344;;;;N;GREEK SMALL LETTER IOTA DIAERESIS TONOS;;;;
+0391;GREEK CAPITAL LETTER ALPHA;Lu;0;L;;;;;N;;;;03B1;
+0392;GREEK CAPITAL LETTER BETA;Lu;0;L;;;;;N;;;;03B2;
+0393;GREEK CAPITAL LETTER GAMMA;Lu;0;L;;;;;N;;;;03B3;
+0394;GREEK CAPITAL LETTER DELTA;Lu;0;L;;;;;N;;;;03B4;
+0395;GREEK CAPITAL LETTER EPSILON;Lu;0;L;;;;;N;;;;03B5;
+0396;GREEK CAPITAL LETTER ZETA;Lu;0;L;;;;;N;;;;03B6;
+0397;GREEK CAPITAL LETTER ETA;Lu;0;L;;;;;N;;;;03B7;
+0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;
+0399;GREEK CAPITAL LETTER IOTA;Lu;0;L;;;;;N;;;;03B9;
+039A;GREEK CAPITAL LETTER KAPPA;Lu;0;L;;;;;N;;;;03BA;
+039B;GREEK CAPITAL LETTER LAMDA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER LAMBDA;;;03BB;
+039C;GREEK CAPITAL LETTER MU;Lu;0;L;;;;;N;;;;03BC;
+039D;GREEK CAPITAL LETTER NU;Lu;0;L;;;;;N;;;;03BD;
+039E;GREEK CAPITAL LETTER XI;Lu;0;L;;;;;N;;;;03BE;
+039F;GREEK CAPITAL LETTER OMICRON;Lu;0;L;;;;;N;;;;03BF;
+03A0;GREEK CAPITAL LETTER PI;Lu;0;L;;;;;N;;;;03C0;
+03A1;GREEK CAPITAL LETTER RHO;Lu;0;L;;;;;N;;;;03C1;
+03A3;GREEK CAPITAL LETTER SIGMA;Lu;0;L;;;;;N;;;;03C3;
+03A4;GREEK CAPITAL LETTER TAU;Lu;0;L;;;;;N;;;;03C4;
+03A5;GREEK CAPITAL LETTER UPSILON;Lu;0;L;;;;;N;;;;03C5;
+03A6;GREEK CAPITAL LETTER PHI;Lu;0;L;;;;;N;;;;03C6;
+03A7;GREEK CAPITAL LETTER CHI;Lu;0;L;;;;;N;;;;03C7;
+03A8;GREEK CAPITAL LETTER PSI;Lu;0;L;;;;;N;;;;03C8;
+03A9;GREEK CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;03C9;
+03AA;GREEK CAPITAL LETTER IOTA WITH DIALYTIKA;Lu;0;L;0399 0308;;;;N;GREEK CAPITAL LETTER IOTA DIAERESIS;;;03CA;
+03AB;GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA;Lu;0;L;03A5 0308;;;;N;GREEK CAPITAL LETTER UPSILON DIAERESIS;;;03CB;
+03AC;GREEK SMALL LETTER ALPHA WITH TONOS;Ll;0;L;03B1 030D;;;;N;GREEK SMALL LETTER ALPHA TONOS;;0386;;0386
+03AD;GREEK SMALL LETTER EPSILON WITH TONOS;Ll;0;L;03B5 030D;;;;N;GREEK SMALL LETTER EPSILON TONOS;;0388;;0388
+03AE;GREEK SMALL LETTER ETA WITH TONOS;Ll;0;L;03B7 030D;;;;N;GREEK SMALL LETTER ETA TONOS;;0389;;0389
+03AF;GREEK SMALL LETTER IOTA WITH TONOS;Ll;0;L;03B9 030D;;;;N;GREEK SMALL LETTER IOTA TONOS;;038A;;038A
+03B0;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS;Ll;0;L;03C5 0344;;;;N;GREEK SMALL LETTER UPSILON DIAERESIS TONOS;;;;
+03B1;GREEK SMALL LETTER ALPHA;Ll;0;L;;;;;N;;;0391;;0391
+03B2;GREEK SMALL LETTER BETA;Ll;0;L;;;;;N;;;0392;;0392
+03B3;GREEK SMALL LETTER GAMMA;Ll;0;L;;;;;N;;;0393;;0393
+03B4;GREEK SMALL LETTER DELTA;Ll;0;L;;;;;N;;;0394;;0394
+03B5;GREEK SMALL LETTER EPSILON;Ll;0;L;;;;;N;;;0395;;0395
+03B6;GREEK SMALL LETTER ZETA;Ll;0;L;;;;;N;;;0396;;0396
+03B7;GREEK SMALL LETTER ETA;Ll;0;L;;;;;N;;;0397;;0397
+03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398
+03B9;GREEK SMALL LETTER IOTA;Ll;0;L;;;;;N;;;0399;;0399
+03BA;GREEK SMALL LETTER KAPPA;Ll;0;L;;;;;N;;;039A;;039A
+03BB;GREEK SMALL LETTER LAMDA;Ll;0;L;;;;;N;GREEK SMALL LETTER LAMBDA;;039B;;039B
+03BC;GREEK SMALL LETTER MU;Ll;0;L;;;;;N;;;039C;;039C
+03BD;GREEK SMALL LETTER NU;Ll;0;L;;;;;N;;;039D;;039D
+03BE;GREEK SMALL LETTER XI;Ll;0;L;;;;;N;;;039E;;039E
+03BF;GREEK SMALL LETTER OMICRON;Ll;0;L;;;;;N;;;039F;;039F
+03C0;GREEK SMALL LETTER PI;Ll;0;L;;;;;N;;;03A0;;03A0
+03C1;GREEK SMALL LETTER RHO;Ll;0;L;;;;;N;;;03A1;;03A1
+03C2;GREEK SMALL LETTER FINAL SIGMA;Ll;0;L;;;;;N;;;;;
+03C3;GREEK SMALL LETTER SIGMA;Ll;0;L;;;;;N;;;03A3;;03A3
+03C4;GREEK SMALL LETTER TAU;Ll;0;L;;;;;N;;;03A4;;03A4
+03C5;GREEK SMALL LETTER UPSILON;Ll;0;L;;;;;N;;;03A5;;03A5
+03C6;GREEK SMALL LETTER PHI;Ll;0;L;;;;;N;;;03A6;;03A6
+03C7;GREEK SMALL LETTER CHI;Ll;0;L;;;;;N;;;03A7;;03A7
+03C8;GREEK SMALL LETTER PSI;Ll;0;L;;;;;N;;;03A8;;03A8
+03C9;GREEK SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;03A9;;03A9
+03CA;GREEK SMALL LETTER IOTA WITH DIALYTIKA;Ll;0;L;03B9 0308;;;;N;GREEK SMALL LETTER IOTA DIAERESIS;;03AA;;03AA
+03CB;GREEK SMALL LETTER UPSILON WITH DIALYTIKA;Ll;0;L;03C5 0308;;;;N;GREEK SMALL LETTER UPSILON DIAERESIS;;03AB;;03AB
+03CC;GREEK SMALL LETTER OMICRON WITH TONOS;Ll;0;L;03BF 030D;;;;N;GREEK SMALL LETTER OMICRON TONOS;;038C;;038C
+03CD;GREEK SMALL LETTER UPSILON WITH TONOS;Ll;0;L;03C5 030D;;;;N;GREEK SMALL LETTER UPSILON TONOS;;038E;;038E
+03CE;GREEK SMALL LETTER OMEGA WITH TONOS;Ll;0;L;03C9 030D;;;;N;GREEK SMALL LETTER OMEGA TONOS;;038F;;038F
+03D0;GREEK BETA SYMBOL;Ll;0;L;;;;;N;GREEK SMALL LETTER CURLED BETA;;0392;;
+03D1;GREEK THETA SYMBOL;Ll;0;L;;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;
+03D2;GREEK UPSILON WITH HOOK SYMBOL;Lu;0;L;;;;;N;GREEK CAPITAL LETTER UPSILON HOOK;;;;
+03D3;GREEK UPSILON WITH ACUTE AND HOOK SYMBOL;Lu;0;L;03D2 030D;;;;N;GREEK CAPITAL LETTER UPSILON HOOK TONOS;;;;
+03D4;GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL;Lu;0;L;03D2 0308;;;;N;GREEK CAPITAL LETTER UPSILON HOOK DIAERESIS;;;;
+03D5;GREEK PHI SYMBOL;Ll;0;L;;;;;N;GREEK SMALL LETTER SCRIPT PHI;;03A6;;
+03D6;GREEK PI SYMBOL;Ll;0;L;;;;;N;GREEK SMALL LETTER OMEGA PI;;03A0;;
+03DA;GREEK LETTER STIGMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER STIGMA;;;;
+03DC;GREEK LETTER DIGAMMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER DIGAMMA;;;;
+03DE;GREEK LETTER KOPPA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER KOPPA;;;;
+03E0;GREEK LETTER SAMPI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SAMPI;;;;
+03E2;COPTIC CAPITAL LETTER SHEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SHEI;;;03E3;
+03E3;COPTIC SMALL LETTER SHEI;Ll;0;L;;;;;N;GREEK SMALL LETTER SHEI;;03E2;;03E2
+03E4;COPTIC CAPITAL LETTER FEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER FEI;;;03E5;
+03E5;COPTIC SMALL LETTER FEI;Ll;0;L;;;;;N;GREEK SMALL LETTER FEI;;03E4;;03E4
+03E6;COPTIC CAPITAL LETTER KHEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER KHEI;;;03E7;
+03E7;COPTIC SMALL LETTER KHEI;Ll;0;L;;;;;N;GREEK SMALL LETTER KHEI;;03E6;;03E6
+03E8;COPTIC CAPITAL LETTER HORI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER HORI;;;03E9;
+03E9;COPTIC SMALL LETTER HORI;Ll;0;L;;;;;N;GREEK SMALL LETTER HORI;;03E8;;03E8
+03EA;COPTIC CAPITAL LETTER GANGIA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER GANGIA;;;03EB;
+03EB;COPTIC SMALL LETTER GANGIA;Ll;0;L;;;;;N;GREEK SMALL LETTER GANGIA;;03EA;;03EA
+03EC;COPTIC CAPITAL LETTER SHIMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SHIMA;;;03ED;
+03ED;COPTIC SMALL LETTER SHIMA;Ll;0;L;;;;;N;GREEK SMALL LETTER SHIMA;;03EC;;03EC
+03EE;COPTIC CAPITAL LETTER DEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER DEI;;;03EF;
+03EF;COPTIC SMALL LETTER DEI;Ll;0;L;;;;;N;GREEK SMALL LETTER DEI;;03EE;;03EE
+03F0;GREEK KAPPA SYMBOL;Ll;0;L;;;;;N;GREEK SMALL LETTER SCRIPT KAPPA;;039A;;
+03F1;GREEK RHO SYMBOL;Ll;0;L;;;;;N;GREEK SMALL LETTER TAILED RHO;;03A1;;
+03F2;GREEK LUNATE SIGMA SYMBOL;Ll;0;L;;;;;N;GREEK SMALL LETTER LUNATE SIGMA;;;;
+03F3;GREEK LETTER YOT;Lo;0;L;;;;;N;;;;;
+0401;CYRILLIC CAPITAL LETTER IO;Lu;0;L;0415 0308;;;;N;;;;0451;
+0402;CYRILLIC CAPITAL LETTER DJE;Lu;0;L;;;;;N;;Serbocroatian;;0452;
+0403;CYRILLIC CAPITAL LETTER GJE;Lu;0;L;0413 0301;;;;N;;;;0453;
+0404;CYRILLIC CAPITAL LETTER UKRAINIAN IE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER E;;;0454;
+0405;CYRILLIC CAPITAL LETTER DZE;Lu;0;L;;;;;N;;;;0455;
+0406;CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER I;;;0456;
+0407;CYRILLIC CAPITAL LETTER YI;Lu;0;L;0406 0308;;;;N;;Ukrainian;;0457;
+0408;CYRILLIC CAPITAL LETTER JE;Lu;0;L;;;;;N;;;;0458;
+0409;CYRILLIC CAPITAL LETTER LJE;Lu;0;L;;;;;N;;;;0459;
+040A;CYRILLIC CAPITAL LETTER NJE;Lu;0;L;;;;;N;;;;045A;
+040B;CYRILLIC CAPITAL LETTER TSHE;Lu;0;L;;;;;N;;Serbocroatian;;045B;
+040C;CYRILLIC CAPITAL LETTER KJE;Lu;0;L;041A 0301;;;;N;;;;045C;
+040E;CYRILLIC CAPITAL LETTER SHORT U;Lu;0;L;0423 0306;;;;N;;Byelorussian;;045E;
+040F;CYRILLIC CAPITAL LETTER DZHE;Lu;0;L;;;;;N;;;;045F;
+0410;CYRILLIC CAPITAL LETTER A;Lu;0;L;;;;;N;;;;0430;
+0411;CYRILLIC CAPITAL LETTER BE;Lu;0;L;;;;;N;;;;0431;
+0412;CYRILLIC CAPITAL LETTER VE;Lu;0;L;;;;;N;;;;0432;
+0413;CYRILLIC CAPITAL LETTER GHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE;;;0433;
+0414;CYRILLIC CAPITAL LETTER DE;Lu;0;L;;;;;N;;;;0434;
+0415;CYRILLIC CAPITAL LETTER IE;Lu;0;L;;;;;N;;;;0435;
+0416;CYRILLIC CAPITAL LETTER ZHE;Lu;0;L;;;;;N;;;;0436;
+0417;CYRILLIC CAPITAL LETTER ZE;Lu;0;L;;;;;N;;;;0437;
+0418;CYRILLIC CAPITAL LETTER I;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER II;;;0438;
+0419;CYRILLIC CAPITAL LETTER SHORT I;Lu;0;L;0418 0306;;;;N;CYRILLIC CAPITAL LETTER SHORT II;;;0439;
+041A;CYRILLIC CAPITAL LETTER KA;Lu;0;L;;;;;N;;;;043A;
+041B;CYRILLIC CAPITAL LETTER EL;Lu;0;L;;;;;N;;;;043B;
+041C;CYRILLIC CAPITAL LETTER EM;Lu;0;L;;;;;N;;;;043C;
+041D;CYRILLIC CAPITAL LETTER EN;Lu;0;L;;;;;N;;;;043D;
+041E;CYRILLIC CAPITAL LETTER O;Lu;0;L;;;;;N;;;;043E;
+041F;CYRILLIC CAPITAL LETTER PE;Lu;0;L;;;;;N;;;;043F;
+0420;CYRILLIC CAPITAL LETTER ER;Lu;0;L;;;;;N;;;;0440;
+0421;CYRILLIC CAPITAL LETTER ES;Lu;0;L;;;;;N;;;;0441;
+0422;CYRILLIC CAPITAL LETTER TE;Lu;0;L;;;;;N;;;;0442;
+0423;CYRILLIC CAPITAL LETTER U;Lu;0;L;;;;;N;;;;0443;
+0424;CYRILLIC CAPITAL LETTER EF;Lu;0;L;;;;;N;;;;0444;
+0425;CYRILLIC CAPITAL LETTER HA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KHA;;;0445;
+0426;CYRILLIC CAPITAL LETTER TSE;Lu;0;L;;;;;N;;;;0446;
+0427;CYRILLIC CAPITAL LETTER CHE;Lu;0;L;;;;;N;;;;0447;
+0428;CYRILLIC CAPITAL LETTER SHA;Lu;0;L;;;;;N;;;;0448;
+0429;CYRILLIC CAPITAL LETTER SHCHA;Lu;0;L;;;;;N;;;;0449;
+042A;CYRILLIC CAPITAL LETTER HARD SIGN;Lu;0;L;;;;;N;;;;044A;
+042B;CYRILLIC CAPITAL LETTER YERU;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER YERI;;;044B;
+042C;CYRILLIC CAPITAL LETTER SOFT SIGN;Lu;0;L;;;;;N;;;;044C;
+042D;CYRILLIC CAPITAL LETTER E;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER REVERSED E;;;044D;
+042E;CYRILLIC CAPITAL LETTER YU;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IU;;;044E;
+042F;CYRILLIC CAPITAL LETTER YA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IA;;;044F;
+0430;CYRILLIC SMALL LETTER A;Ll;0;L;;;;;N;;;0410;;0410
+0431;CYRILLIC SMALL LETTER BE;Ll;0;L;;;;;N;;;0411;;0411
+0432;CYRILLIC SMALL LETTER VE;Ll;0;L;;;;;N;;;0412;;0412
+0433;CYRILLIC SMALL LETTER GHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE;;0413;;0413
+0434;CYRILLIC SMALL LETTER DE;Ll;0;L;;;;;N;;;0414;;0414
+0435;CYRILLIC SMALL LETTER IE;Ll;0;L;;;;;N;;;0415;;0415
+0436;CYRILLIC SMALL LETTER ZHE;Ll;0;L;;;;;N;;;0416;;0416
+0437;CYRILLIC SMALL LETTER ZE;Ll;0;L;;;;;N;;;0417;;0417
+0438;CYRILLIC SMALL LETTER I;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER II;;0418;;0418
+0439;CYRILLIC SMALL LETTER SHORT I;Ll;0;L;0438 0306;;;;N;CYRILLIC SMALL LETTER SHORT II;;0419;;0419
+043A;CYRILLIC SMALL LETTER KA;Ll;0;L;;;;;N;;;041A;;041A
+043B;CYRILLIC SMALL LETTER EL;Ll;0;L;;;;;N;;;041B;;041B
+043C;CYRILLIC SMALL LETTER EM;Ll;0;L;;;;;N;;;041C;;041C
+043D;CYRILLIC SMALL LETTER EN;Ll;0;L;;;;;N;;;041D;;041D
+043E;CYRILLIC SMALL LETTER O;Ll;0;L;;;;;N;;;041E;;041E
+043F;CYRILLIC SMALL LETTER PE;Ll;0;L;;;;;N;;;041F;;041F
+0440;CYRILLIC SMALL LETTER ER;Ll;0;L;;;;;N;;;0420;;0420
+0441;CYRILLIC SMALL LETTER ES;Ll;0;L;;;;;N;;;0421;;0421
+0442;CYRILLIC SMALL LETTER TE;Ll;0;L;;;;;N;;;0422;;0422
+0443;CYRILLIC SMALL LETTER U;Ll;0;L;;;;;N;;;0423;;0423
+0444;CYRILLIC SMALL LETTER EF;Ll;0;L;;;;;N;;;0424;;0424
+0445;CYRILLIC SMALL LETTER HA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KHA;;0425;;0425
+0446;CYRILLIC SMALL LETTER TSE;Ll;0;L;;;;;N;;;0426;;0426
+0447;CYRILLIC SMALL LETTER CHE;Ll;0;L;;;;;N;;;0427;;0427
+0448;CYRILLIC SMALL LETTER SHA;Ll;0;L;;;;;N;;;0428;;0428
+0449;CYRILLIC SMALL LETTER SHCHA;Ll;0;L;;;;;N;;;0429;;0429
+044A;CYRILLIC SMALL LETTER HARD SIGN;Ll;0;L;;;;;N;;;042A;;042A
+044B;CYRILLIC SMALL LETTER YERU;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER YERI;;042B;;042B
+044C;CYRILLIC SMALL LETTER SOFT SIGN;Ll;0;L;;;;;N;;;042C;;042C
+044D;CYRILLIC SMALL LETTER E;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER REVERSED E;;042D;;042D
+044E;CYRILLIC SMALL LETTER YU;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IU;;042E;;042E
+044F;CYRILLIC SMALL LETTER YA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IA;;042F;;042F
+0451;CYRILLIC SMALL LETTER IO;Ll;0;L;0435 0308;;;;N;;;0401;;0401
+0452;CYRILLIC SMALL LETTER DJE;Ll;0;L;;;;;N;;Serbocroatian;0402;;0402
+0453;CYRILLIC SMALL LETTER GJE;Ll;0;L;0433 0301;;;;N;;;0403;;0403
+0454;CYRILLIC SMALL LETTER UKRAINIAN IE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER E;;0404;;0404
+0455;CYRILLIC SMALL LETTER DZE;Ll;0;L;;;;;N;;;0405;;0405
+0456;CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER I;;0406;;0406
+0457;CYRILLIC SMALL LETTER YI;Ll;0;L;0456 0308;;;;N;;Ukrainian;0407;;0407
+0458;CYRILLIC SMALL LETTER JE;Ll;0;L;;;;;N;;;0408;;0408
+0459;CYRILLIC SMALL LETTER LJE;Ll;0;L;;;;;N;;;0409;;0409
+045A;CYRILLIC SMALL LETTER NJE;Ll;0;L;;;;;N;;;040A;;040A
+045B;CYRILLIC SMALL LETTER TSHE;Ll;0;L;;;;;N;;Serbocroatian;040B;;040B
+045C;CYRILLIC SMALL LETTER KJE;Ll;0;L;043A 0301;;;;N;;;040C;;040C
+045E;CYRILLIC SMALL LETTER SHORT U;Ll;0;L;0443 0306;;;;N;;Byelorussian;040E;;040E
+045F;CYRILLIC SMALL LETTER DZHE;Ll;0;L;;;;;N;;;040F;;040F
+0460;CYRILLIC CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;0461;
+0461;CYRILLIC SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;0460;;0460
+0462;CYRILLIC CAPITAL LETTER YAT;Lu;0;L;;;;;N;;;;0463;
+0463;CYRILLIC SMALL LETTER YAT;Ll;0;L;;;;;N;;;0462;;0462
+0464;CYRILLIC CAPITAL LETTER IOTIFIED E;Lu;0;L;;;;;N;;;;0465;
+0465;CYRILLIC SMALL LETTER IOTIFIED E;Ll;0;L;;;;;N;;;0464;;0464
+0466;CYRILLIC CAPITAL LETTER LITTLE YUS;Lu;0;L;;;;;N;;;;0467;
+0467;CYRILLIC SMALL LETTER LITTLE YUS;Ll;0;L;;;;;N;;;0466;;0466
+0468;CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS;Lu;0;L;;;;;N;;;;0469;
+0469;CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS;Ll;0;L;;;;;N;;;0468;;0468
+046A;CYRILLIC CAPITAL LETTER BIG YUS;Lu;0;L;;;;;N;;;;046B;
+046B;CYRILLIC SMALL LETTER BIG YUS;Ll;0;L;;;;;N;;;046A;;046A
+046C;CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS;Lu;0;L;;;;;N;;;;046D;
+046D;CYRILLIC SMALL LETTER IOTIFIED BIG YUS;Ll;0;L;;;;;N;;;046C;;046C
+046E;CYRILLIC CAPITAL LETTER KSI;Lu;0;L;;;;;N;;;;046F;
+046F;CYRILLIC SMALL LETTER KSI;Ll;0;L;;;;;N;;;046E;;046E
+0470;CYRILLIC CAPITAL LETTER PSI;Lu;0;L;;;;;N;;;;0471;
+0471;CYRILLIC SMALL LETTER PSI;Ll;0;L;;;;;N;;;0470;;0470
+0472;CYRILLIC CAPITAL LETTER FITA;Lu;0;L;;;;;N;;;;0473;
+0473;CYRILLIC SMALL LETTER FITA;Ll;0;L;;;;;N;;;0472;;0472
+0474;CYRILLIC CAPITAL LETTER IZHITSA;Lu;0;L;;;;;N;;;;0475;
+0475;CYRILLIC SMALL LETTER IZHITSA;Ll;0;L;;;;;N;;;0474;;0474
+0476;CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT;Lu;0;L;0474 030F;;;;N;CYRILLIC CAPITAL LETTER IZHITSA DOUBLE GRAVE;;;0477;
+0477;CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT;Ll;0;L;0475 030F;;;;N;CYRILLIC SMALL LETTER IZHITSA DOUBLE GRAVE;;0476;;0476
+0478;CYRILLIC CAPITAL LETTER UK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER UK DIGRAPH;;;0479;
+0479;CYRILLIC SMALL LETTER UK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER UK DIGRAPH;;0478;;0478
+047A;CYRILLIC CAPITAL LETTER ROUND OMEGA;Lu;0;L;;;;;N;;;;047B;
+047B;CYRILLIC SMALL LETTER ROUND OMEGA;Ll;0;L;;;;;N;;;047A;;047A
+047C;CYRILLIC CAPITAL LETTER OMEGA WITH TITLO;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER OMEGA TITLO;;;047D;
+047D;CYRILLIC SMALL LETTER OMEGA WITH TITLO;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER OMEGA TITLO;;047C;;047C
+047E;CYRILLIC CAPITAL LETTER OT;Lu;0;L;;;;;N;;;;047F;
+047F;CYRILLIC SMALL LETTER OT;Ll;0;L;;;;;N;;;047E;;047E
+0480;CYRILLIC CAPITAL LETTER KOPPA;Lu;0;L;;;;;N;;;;0481;
+0481;CYRILLIC SMALL LETTER KOPPA;Ll;0;L;;;;;N;;;0480;;0480
+0482;CYRILLIC THOUSANDS SIGN;So;0;L;;;;;N;;;;;
+0483;COMBINING CYRILLIC TITLO;Mn;230;L;;;;;N;CYRILLIC NON-SPACING TITLO;;;;
+0484;COMBINING CYRILLIC PALATALIZATION;Mn;230;L;;;;;N;CYRILLIC NON-SPACING PALATALIZATION;;;;
+0485;COMBINING CYRILLIC DASIA PNEUMATA;Mn;230;L;;;;;N;CYRILLIC NON-SPACING DASIA PNEUMATA;;;;
+0486;COMBINING CYRILLIC PSILI PNEUMATA;Mn;230;L;;;;;N;CYRILLIC NON-SPACING PSILI PNEUMATA;;;;
+0490;CYRILLIC CAPITAL LETTER GHE WITH UPTURN;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE WITH UPTURN;;;0491;
+0491;CYRILLIC SMALL LETTER GHE WITH UPTURN;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE WITH UPTURN;;0490;;0490
+0492;CYRILLIC CAPITAL LETTER GHE WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE BAR;;;0493;
+0493;CYRILLIC SMALL LETTER GHE WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE BAR;;0492;;0492
+0494;CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE HOOK;;;0495;
+0495;CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE HOOK;;0494;;0494
+0496;CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ZHE WITH RIGHT DESCENDER;;;0497;
+0497;CYRILLIC SMALL LETTER ZHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ZHE WITH RIGHT DESCENDER;;0496;;0496
+0498;CYRILLIC CAPITAL LETTER ZE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ZE CEDILLA;;;0499;
+0499;CYRILLIC SMALL LETTER ZE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ZE CEDILLA;;0498;;0498
+049A;CYRILLIC CAPITAL LETTER KA WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA WITH RIGHT DESCENDER;;;049B;
+049B;CYRILLIC SMALL LETTER KA WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA WITH RIGHT DESCENDER;;049A;;049A
+049C;CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA VERTICAL BAR;;;049D;
+049D;CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA VERTICAL BAR;;049C;;049C
+049E;CYRILLIC CAPITAL LETTER KA WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA BAR;;;049F;
+049F;CYRILLIC SMALL LETTER KA WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA BAR;;049E;;049E
+04A0;CYRILLIC CAPITAL LETTER BASHKIR KA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER REVERSED GE KA;;;04A1;
+04A1;CYRILLIC SMALL LETTER BASHKIR KA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER REVERSED GE KA;;04A0;;04A0
+04A2;CYRILLIC CAPITAL LETTER EN WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN WITH RIGHT DESCENDER;;;04A3;
+04A3;CYRILLIC SMALL LETTER EN WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN WITH RIGHT DESCENDER;;04A2;;04A2
+04A4;CYRILLIC CAPITAL LIGATURE EN GHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN GE;;;04A5;
+04A5;CYRILLIC SMALL LIGATURE EN GHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN GE;;04A4;;04A4
+04A6;CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER PE HOOK;Abkhasian;;04A7;
+04A7;CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER PE HOOK;Abkhasian;04A6;;04A6
+04A8;CYRILLIC CAPITAL LETTER ABKHASIAN HA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER O HOOK;;;04A9;
+04A9;CYRILLIC SMALL LETTER ABKHASIAN HA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER O HOOK;;04A8;;04A8
+04AA;CYRILLIC CAPITAL LETTER ES WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ES CEDILLA;;;04AB;
+04AB;CYRILLIC SMALL LETTER ES WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ES CEDILLA;;04AA;;04AA
+04AC;CYRILLIC CAPITAL LETTER TE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER TE WITH RIGHT DESCENDER;;;04AD;
+04AD;CYRILLIC SMALL LETTER TE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER TE WITH RIGHT DESCENDER;;04AC;;04AC
+04AE;CYRILLIC CAPITAL LETTER STRAIGHT U;Lu;0;L;;;;;N;;;;04AF;
+04AF;CYRILLIC SMALL LETTER STRAIGHT U;Ll;0;L;;;;;N;;;04AE;;04AE
+04B0;CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER STRAIGHT U BAR;;;04B1;
+04B1;CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER STRAIGHT U BAR;;04B0;;04B0
+04B2;CYRILLIC CAPITAL LETTER HA WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KHA WITH RIGHT DESCENDER;;;04B3;
+04B3;CYRILLIC SMALL LETTER HA WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KHA WITH RIGHT DESCENDER;;04B2;;04B2
+04B4;CYRILLIC CAPITAL LIGATURE TE TSE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER TE TSE;Abkhasian;;04B5;
+04B5;CYRILLIC SMALL LIGATURE TE TSE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER TE TSE;Abkhasian;04B4;;04B4
+04B6;CYRILLIC CAPITAL LETTER CHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE WITH RIGHT DESCENDER;;;04B7;
+04B7;CYRILLIC SMALL LETTER CHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE WITH RIGHT DESCENDER;;04B6;;04B6
+04B8;CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE VERTICAL BAR;;;04B9;
+04B9;CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE VERTICAL BAR;;04B8;;04B8
+04BA;CYRILLIC CAPITAL LETTER SHHA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER H;;;04BB;
+04BB;CYRILLIC SMALL LETTER SHHA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER H;;04BA;;04BA
+04BC;CYRILLIC CAPITAL LETTER ABKHASIAN CHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IE HOOK;;;04BD;
+04BD;CYRILLIC SMALL LETTER ABKHASIAN CHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IE HOOK;;04BC;;04BC
+04BE;CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IE HOOK OGONEK;;;04BF;
+04BF;CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IE HOOK OGONEK;;04BE;;04BE
+04C0;CYRILLIC LETTER PALOCHKA;Lo;0;L;;;;;N;CYRILLIC LETTER I;;;;
+04C1;CYRILLIC CAPITAL LETTER ZHE WITH BREVE;Lu;0;L;0416 0306;;;;N;CYRILLIC CAPITAL LETTER SHORT ZHE;;;04C2;
+04C2;CYRILLIC SMALL LETTER ZHE WITH BREVE;Ll;0;L;0436 0306;;;;N;CYRILLIC SMALL LETTER SHORT ZHE;;04C1;;04C1
+04C3;CYRILLIC CAPITAL LETTER KA WITH HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA HOOK;;;04C4;
+04C4;CYRILLIC SMALL LETTER KA WITH HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA HOOK;;04C3;;04C3
+04C7;CYRILLIC CAPITAL LETTER EN WITH HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN HOOK;;;04C8;
+04C8;CYRILLIC SMALL LETTER EN WITH HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN HOOK;;04C7;;04C7
+04CB;CYRILLIC CAPITAL LETTER KHAKASSIAN CHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE WITH LEFT DESCENDER;;;04CC;
+04CC;CYRILLIC SMALL LETTER KHAKASSIAN CHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE WITH LEFT DESCENDER;;04CB;;04CB
+04D0;CYRILLIC CAPITAL LETTER A WITH BREVE;Lu;0;L;0410 0306;;;;N;;;;04D1;
+04D1;CYRILLIC SMALL LETTER A WITH BREVE;Ll;0;L;0430 0306;;;;N;;;04D0;;04D0
+04D2;CYRILLIC CAPITAL LETTER A WITH DIAERESIS;Lu;0;L;0410 0308;;;;N;;;;04D3;
+04D3;CYRILLIC SMALL LETTER A WITH DIAERESIS;Ll;0;L;0430 0308;;;;N;;;04D2;;04D2
+04D4;CYRILLIC CAPITAL LIGATURE A IE;Lu;0;L;00C6;;;;N;;;;04D5;
+04D5;CYRILLIC SMALL LIGATURE A IE;Ll;0;L;00E6;;;;N;;;04D4;;04D4
+04D6;CYRILLIC CAPITAL LETTER IE WITH BREVE;Lu;0;L;0415 0306;;;;N;;;;04D7;
+04D7;CYRILLIC SMALL LETTER IE WITH BREVE;Ll;0;L;0435 0306;;;;N;;;04D6;;04D6
+04D8;CYRILLIC CAPITAL LETTER SCHWA;Lu;0;L;018F;;;;N;;;;04D9;
+04D9;CYRILLIC SMALL LETTER SCHWA;Ll;0;L;0259;;;;N;;;04D8;;04D8
+04DA;CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS;Lu;0;L;018F 0308;;;;N;;;;04DB;
+04DB;CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS;Ll;0;L;0259 0308;;;;N;;;04DA;;04DA
+04DC;CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS;Lu;0;L;0416 0308;;;;N;;;;04DD;
+04DD;CYRILLIC SMALL LETTER ZHE WITH DIAERESIS;Ll;0;L;0436 0308;;;;N;;;04DC;;04DC
+04DE;CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS;Lu;0;L;0417 0308;;;;N;;;;04DF;
+04DF;CYRILLIC SMALL LETTER ZE WITH DIAERESIS;Ll;0;L;0437 0308;;;;N;;;04DE;;04DE
+04E0;CYRILLIC CAPITAL LETTER ABKHASIAN DZE;Lu;0;L;01B7;;;;N;;;;04E1;
+04E1;CYRILLIC SMALL LETTER ABKHASIAN DZE;Ll;0;L;0292;;;;N;;;04E0;;04E0
+04E2;CYRILLIC CAPITAL LETTER I WITH MACRON;Lu;0;L;0418 0304;;;;N;;;;04E3;
+04E3;CYRILLIC SMALL LETTER I WITH MACRON;Ll;0;L;0438 0304;;;;N;;;04E2;;04E2
+04E4;CYRILLIC CAPITAL LETTER I WITH DIAERESIS;Lu;0;L;0418 0308;;;;N;;;;04E5;
+04E5;CYRILLIC SMALL LETTER I WITH DIAERESIS;Ll;0;L;0438 0308;;;;N;;;04E4;;04E4
+04E6;CYRILLIC CAPITAL LETTER O WITH DIAERESIS;Lu;0;L;041E 0308;;;;N;;;;04E7;
+04E7;CYRILLIC SMALL LETTER O WITH DIAERESIS;Ll;0;L;043E 0308;;;;N;;;04E6;;04E6
+04E8;CYRILLIC CAPITAL LETTER BARRED O;Lu;0;L;019F;;;;N;;;;04E9;
+04E9;CYRILLIC SMALL LETTER BARRED O;Ll;0;L;0275;;;;N;;;04E8;;04E8
+04EA;CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS;Lu;0;L;019F 0308;;;;N;;;;04EB;
+04EB;CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS;Ll;0;L;0275 0308;;;;N;;;04EA;;04EA
+04EE;CYRILLIC CAPITAL LETTER U WITH MACRON;Lu;0;L;0423 0304;;;;N;;;;04EF;
+04EF;CYRILLIC SMALL LETTER U WITH MACRON;Ll;0;L;0443 0304;;;;N;;;04EE;;04EE
+04F0;CYRILLIC CAPITAL LETTER U WITH DIAERESIS;Lu;0;L;0423 0308;;;;N;;;;04F1;
+04F1;CYRILLIC SMALL LETTER U WITH DIAERESIS;Ll;0;L;0443 0308;;;;N;;;04F0;;04F0
+04F2;CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE;Lu;0;L;0423 030B;;;;N;;;;04F3;
+04F3;CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE;Ll;0;L;0443 030B;;;;N;;;04F2;;04F2
+04F4;CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS;Lu;0;L;0427 0308;;;;N;;;;04F5;
+04F5;CYRILLIC SMALL LETTER CHE WITH DIAERESIS;Ll;0;L;0447 0308;;;;N;;;04F4;;04F4
+04F8;CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS;Lu;0;L;042B 0308;;;;N;;;;04F9;
+04F9;CYRILLIC SMALL LETTER YERU WITH DIAERESIS;Ll;0;L;044B 0308;;;;N;;;04F8;;04F8
+0531;ARMENIAN CAPITAL LETTER AYB;Lu;0;L;;;;;N;;;;0561;
+0532;ARMENIAN CAPITAL LETTER BEN;Lu;0;L;;;;;N;;;;0562;
+0533;ARMENIAN CAPITAL LETTER GIM;Lu;0;L;;;;;N;;;;0563;
+0534;ARMENIAN CAPITAL LETTER DA;Lu;0;L;;;;;N;;;;0564;
+0535;ARMENIAN CAPITAL LETTER ECH;Lu;0;L;;;;;N;;;;0565;
+0536;ARMENIAN CAPITAL LETTER ZA;Lu;0;L;;;;;N;;;;0566;
+0537;ARMENIAN CAPITAL LETTER EH;Lu;0;L;;;;;N;;;;0567;
+0538;ARMENIAN CAPITAL LETTER ET;Lu;0;L;;;;;N;;;;0568;
+0539;ARMENIAN CAPITAL LETTER TO;Lu;0;L;;;;;N;;;;0569;
+053A;ARMENIAN CAPITAL LETTER ZHE;Lu;0;L;;;;;N;;;;056A;
+053B;ARMENIAN CAPITAL LETTER INI;Lu;0;L;;;;;N;;;;056B;
+053C;ARMENIAN CAPITAL LETTER LIWN;Lu;0;L;;;;;N;;;;056C;
+053D;ARMENIAN CAPITAL LETTER XEH;Lu;0;L;;;;;N;;;;056D;
+053E;ARMENIAN CAPITAL LETTER CA;Lu;0;L;;;;;N;;;;056E;
+053F;ARMENIAN CAPITAL LETTER KEN;Lu;0;L;;;;;N;;;;056F;
+0540;ARMENIAN CAPITAL LETTER HO;Lu;0;L;;;;;N;;;;0570;
+0541;ARMENIAN CAPITAL LETTER JA;Lu;0;L;;;;;N;;;;0571;
+0542;ARMENIAN CAPITAL LETTER GHAD;Lu;0;L;;;;;N;ARMENIAN CAPITAL LETTER LAD;;;0572;
+0543;ARMENIAN CAPITAL LETTER CHEH;Lu;0;L;;;;;N;;;;0573;
+0544;ARMENIAN CAPITAL LETTER MEN;Lu;0;L;;;;;N;;;;0574;
+0545;ARMENIAN CAPITAL LETTER YI;Lu;0;L;;;;;N;;;;0575;
+0546;ARMENIAN CAPITAL LETTER NOW;Lu;0;L;;;;;N;;;;0576;
+0547;ARMENIAN CAPITAL LETTER SHA;Lu;0;L;;;;;N;;;;0577;
+0548;ARMENIAN CAPITAL LETTER VO;Lu;0;L;;;;;N;;;;0578;
+0549;ARMENIAN CAPITAL LETTER CHA;Lu;0;L;;;;;N;;;;0579;
+054A;ARMENIAN CAPITAL LETTER PEH;Lu;0;L;;;;;N;;;;057A;
+054B;ARMENIAN CAPITAL LETTER JHEH;Lu;0;L;;;;;N;;;;057B;
+054C;ARMENIAN CAPITAL LETTER RA;Lu;0;L;;;;;N;;;;057C;
+054D;ARMENIAN CAPITAL LETTER SEH;Lu;0;L;;;;;N;;;;057D;
+054E;ARMENIAN CAPITAL LETTER VEW;Lu;0;L;;;;;N;;;;057E;
+054F;ARMENIAN CAPITAL LETTER TIWN;Lu;0;L;;;;;N;;;;057F;
+0550;ARMENIAN CAPITAL LETTER REH;Lu;0;L;;;;;N;;;;0580;
+0551;ARMENIAN CAPITAL LETTER CO;Lu;0;L;;;;;N;;;;0581;
+0552;ARMENIAN CAPITAL LETTER YIWN;Lu;0;L;;;;;N;;;;0582;
+0553;ARMENIAN CAPITAL LETTER PIWR;Lu;0;L;;;;;N;;;;0583;
+0554;ARMENIAN CAPITAL LETTER KEH;Lu;0;L;;;;;N;;;;0584;
+0555;ARMENIAN CAPITAL LETTER OH;Lu;0;L;;;;;N;;;;0585;
+0556;ARMENIAN CAPITAL LETTER FEH;Lu;0;L;;;;;N;;;;0586;
+0559;ARMENIAN MODIFIER LETTER LEFT HALF RING;Lm;0;L;;;;;N;;;;;
+055A;ARMENIAN APOSTROPHE;Po;0;L;;;;;N;ARMENIAN MODIFIER LETTER RIGHT HALF RING;;;;
+055B;ARMENIAN EMPHASIS MARK;Po;0;L;;;;;N;;;;;
+055C;ARMENIAN EXCLAMATION MARK;Po;0;L;;;;;N;;;;;
+055D;ARMENIAN COMMA;Po;0;L;;;;;N;;;;;
+055E;ARMENIAN QUESTION MARK;Po;0;L;;;;;N;;;;;
+055F;ARMENIAN ABBREVIATION MARK;Po;0;L;;;;;N;;;;;
+0561;ARMENIAN SMALL LETTER AYB;Ll;0;L;;;;;N;;;0531;;0531
+0562;ARMENIAN SMALL LETTER BEN;Ll;0;L;;;;;N;;;0532;;0532
+0563;ARMENIAN SMALL LETTER GIM;Ll;0;L;;;;;N;;;0533;;0533
+0564;ARMENIAN SMALL LETTER DA;Ll;0;L;;;;;N;;;0534;;0534
+0565;ARMENIAN SMALL LETTER ECH;Ll;0;L;;;;;N;;;0535;;0535
+0566;ARMENIAN SMALL LETTER ZA;Ll;0;L;;;;;N;;;0536;;0536
+0567;ARMENIAN SMALL LETTER EH;Ll;0;L;;;;;N;;;0537;;0537
+0568;ARMENIAN SMALL LETTER ET;Ll;0;L;;;;;N;;;0538;;0538
+0569;ARMENIAN SMALL LETTER TO;Ll;0;L;;;;;N;;;0539;;0539
+056A;ARMENIAN SMALL LETTER ZHE;Ll;0;L;;;;;N;;;053A;;053A
+056B;ARMENIAN SMALL LETTER INI;Ll;0;L;;;;;N;;;053B;;053B
+056C;ARMENIAN SMALL LETTER LIWN;Ll;0;L;;;;;N;;;053C;;053C
+056D;ARMENIAN SMALL LETTER XEH;Ll;0;L;;;;;N;;;053D;;053D
+056E;ARMENIAN SMALL LETTER CA;Ll;0;L;;;;;N;;;053E;;053E
+056F;ARMENIAN SMALL LETTER KEN;Ll;0;L;;;;;N;;;053F;;053F
+0570;ARMENIAN SMALL LETTER HO;Ll;0;L;;;;;N;;;0540;;0540
+0571;ARMENIAN SMALL LETTER JA;Ll;0;L;;;;;N;;;0541;;0541
+0572;ARMENIAN SMALL LETTER GHAD;Ll;0;L;;;;;N;ARMENIAN SMALL LETTER LAD;;0542;;0542
+0573;ARMENIAN SMALL LETTER CHEH;Ll;0;L;;;;;N;;;0543;;0543
+0574;ARMENIAN SMALL LETTER MEN;Ll;0;L;;;;;N;;;0544;;0544
+0575;ARMENIAN SMALL LETTER YI;Ll;0;L;;;;;N;;;0545;;0545
+0576;ARMENIAN SMALL LETTER NOW;Ll;0;L;;;;;N;;;0546;;0546
+0577;ARMENIAN SMALL LETTER SHA;Ll;0;L;;;;;N;;;0547;;0547
+0578;ARMENIAN SMALL LETTER VO;Ll;0;L;;;;;N;;;0548;;0548
+0579;ARMENIAN SMALL LETTER CHA;Ll;0;L;;;;;N;;;0549;;0549
+057A;ARMENIAN SMALL LETTER PEH;Ll;0;L;;;;;N;;;054A;;054A
+057B;ARMENIAN SMALL LETTER JHEH;Ll;0;L;;;;;N;;;054B;;054B
+057C;ARMENIAN SMALL LETTER RA;Ll;0;L;;;;;N;;;054C;;054C
+057D;ARMENIAN SMALL LETTER SEH;Ll;0;L;;;;;N;;;054D;;054D
+057E;ARMENIAN SMALL LETTER VEW;Ll;0;L;;;;;N;;;054E;;054E
+057F;ARMENIAN SMALL LETTER TIWN;Ll;0;L;;;;;N;;;054F;;054F
+0580;ARMENIAN SMALL LETTER REH;Ll;0;L;;;;;N;;;0550;;0550
+0581;ARMENIAN SMALL LETTER CO;Ll;0;L;;;;;N;;;0551;;0551
+0582;ARMENIAN SMALL LETTER YIWN;Ll;0;L;;;;;N;;;0552;;0552
+0583;ARMENIAN SMALL LETTER PIWR;Ll;0;L;;;;;N;;;0553;;0553
+0584;ARMENIAN SMALL LETTER KEH;Ll;0;L;;;;;N;;;0554;;0554
+0585;ARMENIAN SMALL LETTER OH;Ll;0;L;;;;;N;;;0555;;0555
+0586;ARMENIAN SMALL LETTER FEH;Ll;0;L;;;;;N;;;0556;;0556
+0587;ARMENIAN SMALL LIGATURE ECH YIWN;Ll;0;L;<compat> 0565 0582;;;;N;;;;;
+0589;ARMENIAN FULL STOP;Po;0;L;;;;;N;ARMENIAN PERIOD;;;;
+0591;HEBREW ACCENT ETNAHTA;Mn;220;R;;;;;N;;;;;
+0592;HEBREW ACCENT SEGOL;Mn;230;R;;;;;N;;;;;
+0593;HEBREW ACCENT SHALSHELET;Mn;230;R;;;;;N;;;;;
+0594;HEBREW ACCENT ZAQEF QATAN;Mn;230;R;;;;;N;;;;;
+0595;HEBREW ACCENT ZAQEF GADOL;Mn;230;R;;;;;N;;;;;
+0596;HEBREW ACCENT TIPEHA;Mn;220;R;;;;;N;;;;;
+0597;HEBREW ACCENT REVIA;Mn;230;R;;;;;N;;;;;
+0598;HEBREW ACCENT ZARQA;Mn;230;R;;;;;N;;;;;
+0599;HEBREW ACCENT PASHTA;Mn;230;R;;;;;N;;;;;
+059A;HEBREW ACCENT YETIV;Mn;222;R;;;;;N;;;;;
+059B;HEBREW ACCENT TEVIR;Mn;220;R;;;;;N;;;;;
+059C;HEBREW ACCENT GERESH;Mn;230;R;;;;;N;;;;;
+059D;HEBREW ACCENT GERESH MUQDAM;Mn;230;R;;;;;N;;;;;
+059E;HEBREW ACCENT GERSHAYIM;Mn;230;R;;;;;N;;;;;
+059F;HEBREW ACCENT QARNEY PARA;Mn;230;R;;;;;N;;;;;
+05A0;HEBREW ACCENT TELISHA GEDOLA;Mn;230;R;;;;;N;;;;;
+05A1;HEBREW ACCENT PAZER;Mn;230;R;;;;;N;;;;;
+05A3;HEBREW ACCENT MUNAH;Mn;220;R;;;;;N;;;;;
+05A4;HEBREW ACCENT MAHAPAKH;Mn;220;R;;;;;N;;;;;
+05A5;HEBREW ACCENT MERKHA;Mn;220;R;;;;;N;;;;;
+05A6;HEBREW ACCENT MERKHA KEFULA;Mn;220;R;;;;;N;;;;;
+05A7;HEBREW ACCENT DARGA;Mn;220;R;;;;;N;;;;;
+05A8;HEBREW ACCENT QADMA;Mn;230;R;;;;;N;;;;;
+05A9;HEBREW ACCENT TELISHA QETANA;Mn;230;R;;;;;N;;;;;
+05AA;HEBREW ACCENT YERAH BEN YOMO;Mn;220;R;;;;;N;;;;;
+05AB;HEBREW ACCENT OLE;Mn;230;R;;;;;N;;;;;
+05AC;HEBREW ACCENT ILUY;Mn;230;R;;;;;N;;;;;
+05AD;HEBREW ACCENT DEHI;Mn;222;R;;;;;N;;;;;
+05AE;HEBREW ACCENT ZINOR;Mn;230;R;;;;;N;;;;;
+05AF;HEBREW MARK MASORA CIRCLE;Mn;230;R;;;;;N;;;;;
+05B0;HEBREW POINT SHEVA;Mn;10;R;;;;;N;;;;;
+05B1;HEBREW POINT HATAF SEGOL;Mn;11;R;;;;;N;;;;;
+05B2;HEBREW POINT HATAF PATAH;Mn;12;R;;;;;N;;;;;
+05B3;HEBREW POINT HATAF QAMATS;Mn;13;R;;;;;N;;;;;
+05B4;HEBREW POINT HIRIQ;Mn;14;R;;;;;N;;;;;
+05B5;HEBREW POINT TSERE;Mn;15;R;;;;;N;;;;;
+05B6;HEBREW POINT SEGOL;Mn;16;R;;;;;N;;;;;
+05B7;HEBREW POINT PATAH;Mn;17;R;;;;;N;;;;;
+05B8;HEBREW POINT QAMATS;Mn;18;R;;;;;N;;;;;
+05B9;HEBREW POINT HOLAM;Mn;19;R;;;;;N;;;;;
+05BB;HEBREW POINT QUBUTS;Mn;20;R;;;;;N;;;;;
+05BC;HEBREW POINT DAGESH OR MAPIQ;Mn;21;R;;;;;N;HEBREW POINT DAGESH;;;;
+05BD;HEBREW POINT METEG;Mn;22;R;;;;;N;;;;;
+05BE;HEBREW PUNCTUATION MAQAF;Po;0;R;;;;;N;;;;;
+05BF;HEBREW POINT RAFE;Mn;23;R;;;;;N;;;;;
+05C0;HEBREW PUNCTUATION PASEQ;Po;0;R;;;;;N;HEBREW POINT PASEQ;;;;
+05C1;HEBREW POINT SHIN DOT;Mn;24;R;;;;;N;;;;;
+05C2;HEBREW POINT SIN DOT;Mn;25;R;;;;;N;;;;;
+05C3;HEBREW PUNCTUATION SOF PASUQ;Po;0;R;;;;;N;;;;;
+05C4;HEBREW MARK UPPER DOT;Mn;230;R;;;;;N;;;;;
+05D0;HEBREW LETTER ALEF;Lo;0;R;;;;;N;;;;;
+05D1;HEBREW LETTER BET;Lo;0;R;;;;;N;;;;;
+05D2;HEBREW LETTER GIMEL;Lo;0;R;;;;;N;;;;;
+05D3;HEBREW LETTER DALET;Lo;0;R;;;;;N;;;;;
+05D4;HEBREW LETTER HE;Lo;0;R;;;;;N;;;;;
+05D5;HEBREW LETTER VAV;Lo;0;R;;;;;N;;;;;
+05D6;HEBREW LETTER ZAYIN;Lo;0;R;;;;;N;;;;;
+05D7;HEBREW LETTER HET;Lo;0;R;;;;;N;;;;;
+05D8;HEBREW LETTER TET;Lo;0;R;;;;;N;;;;;
+05D9;HEBREW LETTER YOD;Lo;0;R;;;;;N;;;;;
+05DA;HEBREW LETTER FINAL KAF;Lo;0;R;;;;;N;;;;;
+05DB;HEBREW LETTER KAF;Lo;0;R;;;;;N;;;;;
+05DC;HEBREW LETTER LAMED;Lo;0;R;;;;;N;;;;;
+05DD;HEBREW LETTER FINAL MEM;Lo;0;R;;;;;N;;;;;
+05DE;HEBREW LETTER MEM;Lo;0;R;;;;;N;;;;;
+05DF;HEBREW LETTER FINAL NUN;Lo;0;R;;;;;N;;;;;
+05E0;HEBREW LETTER NUN;Lo;0;R;;;;;N;;;;;
+05E1;HEBREW LETTER SAMEKH;Lo;0;R;;;;;N;;;;;
+05E2;HEBREW LETTER AYIN;Lo;0;R;;;;;N;;;;;
+05E3;HEBREW LETTER FINAL PE;Lo;0;R;;;;;N;;;;;
+05E4;HEBREW LETTER PE;Lo;0;R;;;;;N;;;;;
+05E5;HEBREW LETTER FINAL TSADI;Lo;0;R;;;;;N;;;;;
+05E6;HEBREW LETTER TSADI;Lo;0;R;;;;;N;;;;;
+05E7;HEBREW LETTER QOF;Lo;0;R;;;;;N;;;;;
+05E8;HEBREW LETTER RESH;Lo;0;R;;;;;N;;;;;
+05E9;HEBREW LETTER SHIN;Lo;0;R;;;;;N;;;;;
+05EA;HEBREW LETTER TAV;Lo;0;R;;;;;N;;;;;
+05F0;HEBREW LIGATURE YIDDISH DOUBLE VAV;Lo;0;R;;;;;N;HEBREW LETTER DOUBLE VAV;;;;
+05F1;HEBREW LIGATURE YIDDISH VAV YOD;Lo;0;R;;;;;N;HEBREW LETTER VAV YOD;;;;
+05F2;HEBREW LIGATURE YIDDISH DOUBLE YOD;Lo;0;R;;;;;N;HEBREW LETTER DOUBLE YOD;;;;
+05F3;HEBREW PUNCTUATION GERESH;Po;0;R;;;;;N;;;;;
+05F4;HEBREW PUNCTUATION GERSHAYIM;Po;0;R;;;;;N;;;;;
+060C;ARABIC COMMA;Po;0;R;;;;;N;;;;;
+061B;ARABIC SEMICOLON;Po;0;R;;;;;N;;;;;
+061F;ARABIC QUESTION MARK;Po;0;R;;;;;N;;;;;
+0621;ARABIC LETTER HAMZA;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH;;;;
+0622;ARABIC LETTER ALEF WITH MADDA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER MADDAH ON ALEF;;;;
+0623;ARABIC LETTER ALEF WITH HAMZA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH ON ALEF;;;;
+0624;ARABIC LETTER WAW WITH HAMZA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH ON WAW;;;;
+0625;ARABIC LETTER ALEF WITH HAMZA BELOW;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH UNDER ALEF;;;;
+0626;ARABIC LETTER YEH WITH HAMZA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH ON YA;;;;
+0627;ARABIC LETTER ALEF;Lo;0;R;;;;;N;;;;;
+0628;ARABIC LETTER BEH;Lo;0;R;;;;;N;ARABIC LETTER BAA;;;;
+0629;ARABIC LETTER TEH MARBUTA;Lo;0;R;;;;;N;ARABIC LETTER TAA MARBUTAH;;;;
+062A;ARABIC LETTER TEH;Lo;0;R;;;;;N;ARABIC LETTER TAA;;;;
+062B;ARABIC LETTER THEH;Lo;0;R;;;;;N;ARABIC LETTER THAA;;;;
+062C;ARABIC LETTER JEEM;Lo;0;R;;;;;N;;;;;
+062D;ARABIC LETTER HAH;Lo;0;R;;;;;N;ARABIC LETTER HAA;;;;
+062E;ARABIC LETTER KHAH;Lo;0;R;;;;;N;ARABIC LETTER KHAA;;;;
+062F;ARABIC LETTER DAL;Lo;0;R;;;;;N;;;;;
+0630;ARABIC LETTER THAL;Lo;0;R;;;;;N;;;;;
+0631;ARABIC LETTER REH;Lo;0;R;;;;;N;ARABIC LETTER RA;;;;
+0632;ARABIC LETTER ZAIN;Lo;0;R;;;;;N;;;;;
+0633;ARABIC LETTER SEEN;Lo;0;R;;;;;N;;;;;
+0634;ARABIC LETTER SHEEN;Lo;0;R;;;;;N;;;;;
+0635;ARABIC LETTER SAD;Lo;0;R;;;;;N;;;;;
+0636;ARABIC LETTER DAD;Lo;0;R;;;;;N;;;;;
+0637;ARABIC LETTER TAH;Lo;0;R;;;;;N;;;;;
+0638;ARABIC LETTER ZAH;Lo;0;R;;;;;N;ARABIC LETTER DHAH;;;;
+0639;ARABIC LETTER AIN;Lo;0;R;;;;;N;;;;;
+063A;ARABIC LETTER GHAIN;Lo;0;R;;;;;N;;;;;
+0640;ARABIC TATWEEL;Lo;0;R;;;;;N;;;;;
+0641;ARABIC LETTER FEH;Lo;0;R;;;;;N;ARABIC LETTER FA;;;;
+0642;ARABIC LETTER QAF;Lo;0;R;;;;;N;;;;;
+0643;ARABIC LETTER KAF;Lo;0;R;;;;;N;ARABIC LETTER CAF;;;;
+0644;ARABIC LETTER LAM;Lo;0;R;;;;;N;;;;;
+0645;ARABIC LETTER MEEM;Lo;0;R;;;;;N;;;;;
+0646;ARABIC LETTER NOON;Lo;0;R;;;;;N;;;;;
+0647;ARABIC LETTER HEH;Lo;0;R;;;;;N;ARABIC LETTER HA;;;;
+0648;ARABIC LETTER WAW;Lo;0;R;;;;;N;;;;;
+0649;ARABIC LETTER ALEF MAKSURA;Lo;0;R;;;;;N;ARABIC LETTER ALEF MAQSURAH;;;;
+064A;ARABIC LETTER YEH;Lo;0;R;;;;;N;ARABIC LETTER YA;;;;
+064B;ARABIC FATHATAN;Mn;27;R;;;;;N;;;;;
+064C;ARABIC DAMMATAN;Mn;28;R;;;;;N;;;;;
+064D;ARABIC KASRATAN;Mn;29;R;;;;;N;;;;;
+064E;ARABIC FATHA;Mn;30;R;;;;;N;ARABIC FATHAH;;;;
+064F;ARABIC DAMMA;Mn;31;R;;;;;N;ARABIC DAMMAH;;;;
+0650;ARABIC KASRA;Mn;32;R;;;;;N;ARABIC KASRAH;;;;
+0651;ARABIC SHADDA;Mn;33;R;;;;;N;ARABIC SHADDAH;;;;
+0652;ARABIC SUKUN;Mn;34;R;;;;;N;;;;;
+0660;ARABIC-INDIC DIGIT ZERO;Nd;0;AN;;0;0;0;N;;;;;
+0661;ARABIC-INDIC DIGIT ONE;Nd;0;AN;;1;1;1;N;;;;;
+0662;ARABIC-INDIC DIGIT TWO;Nd;0;AN;;2;2;2;N;;;;;
+0663;ARABIC-INDIC DIGIT THREE;Nd;0;AN;;3;3;3;N;;;;;
+0664;ARABIC-INDIC DIGIT FOUR;Nd;0;AN;;4;4;4;N;;;;;
+0665;ARABIC-INDIC DIGIT FIVE;Nd;0;AN;;5;5;5;N;;;;;
+0666;ARABIC-INDIC DIGIT SIX;Nd;0;AN;;6;6;6;N;;;;;
+0667;ARABIC-INDIC DIGIT SEVEN;Nd;0;AN;;7;7;7;N;;;;;
+0668;ARABIC-INDIC DIGIT EIGHT;Nd;0;AN;;8;8;8;N;;;;;
+0669;ARABIC-INDIC DIGIT NINE;Nd;0;AN;;9;9;9;N;;;;;
+066A;ARABIC PERCENT SIGN;So;0;ET;;;;;N;;;;;
+066B;ARABIC DECIMAL SEPARATOR;So;0;AN;;;;;N;;;;;
+066C;ARABIC THOUSANDS SEPARATOR;So;0;AN;;;;;N;;;;;
+066D;ARABIC FIVE POINTED STAR;So;0;R;;;;;N;;;;;
+0670;ARABIC LETTER SUPERSCRIPT ALEF;Mn;35;R;;;;;N;ARABIC ALEF ABOVE;;;;
+0671;ARABIC LETTER ALEF WASLA;Lo;0;R;;;;;N;ARABIC LETTER HAMZAT WASL ON ALEF;;;;
+0672;ARABIC LETTER ALEF WITH WAVY HAMZA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER WAVY HAMZAH ON ALEF;;;;
+0673;ARABIC LETTER ALEF WITH WAVY HAMZA BELOW;Lo;0;R;;;;;N;ARABIC LETTER WAVY HAMZAH UNDER ALEF;;;;
+0674;ARABIC LETTER HIGH HAMZA;Lo;0;R;;;;;N;ARABIC LETTER HIGH HAMZAH;;;;
+0675;ARABIC LETTER HIGH HAMZA ALEF;Lo;0;R;;;;;N;ARABIC LETTER HIGH HAMZAH ALEF;;;;
+0676;ARABIC LETTER HIGH HAMZA WAW;Lo;0;R;;;;;N;ARABIC LETTER HIGH HAMZAH WAW;;;;
+0677;ARABIC LETTER U WITH HAMZA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HIGH HAMZAH WAW WITH DAMMAH;;;;
+0678;ARABIC LETTER HIGH HAMZA YEH;Lo;0;R;;;;;N;ARABIC LETTER HIGH HAMZAH YA;;;;
+0679;ARABIC LETTER TTEH;Lo;0;R;;;;;N;ARABIC LETTER TAA WITH SMALL TAH;;;;
+067A;ARABIC LETTER TTEHEH;Lo;0;R;;;;;N;ARABIC LETTER TAA WITH TWO DOTS VERTICAL ABOVE;;;;
+067B;ARABIC LETTER BEEH;Lo;0;R;;;;;N;ARABIC LETTER BAA WITH TWO DOTS VERTICAL BELOW;;;;
+067C;ARABIC LETTER TEH WITH RING;Lo;0;R;;;;;N;ARABIC LETTER TAA WITH RING;;;;
+067D;ARABIC LETTER TEH WITH THREE DOTS ABOVE DOWNWARDS;Lo;0;R;;;;;N;ARABIC LETTER TAA WITH THREE DOTS ABOVE DOWNWARD;;;;
+067E;ARABIC LETTER PEH;Lo;0;R;;;;;N;ARABIC LETTER TAA WITH THREE DOTS BELOW;;;;
+067F;ARABIC LETTER TEHEH;Lo;0;R;;;;;N;ARABIC LETTER TAA WITH FOUR DOTS ABOVE;;;;
+0680;ARABIC LETTER BEHEH;Lo;0;R;;;;;N;ARABIC LETTER BAA WITH FOUR DOTS BELOW;;;;
+0681;ARABIC LETTER HAH WITH HAMZA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH ON HAA;;;;
+0682;ARABIC LETTER HAH WITH TWO DOTS VERTICAL ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAA WITH TWO DOTS VERTICAL ABOVE;;;;
+0683;ARABIC LETTER NYEH;Lo;0;R;;;;;N;ARABIC LETTER HAA WITH MIDDLE TWO DOTS;;;;
+0684;ARABIC LETTER DYEH;Lo;0;R;;;;;N;ARABIC LETTER HAA WITH MIDDLE TWO DOTS VERTICAL;;;;
+0685;ARABIC LETTER HAH WITH THREE DOTS ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAA WITH THREE DOTS ABOVE;;;;
+0686;ARABIC LETTER TCHEH;Lo;0;R;;;;;N;ARABIC LETTER HAA WITH MIDDLE THREE DOTS DOWNWARD;;;;
+0687;ARABIC LETTER TCHEHEH;Lo;0;R;;;;;N;ARABIC LETTER HAA WITH MIDDLE FOUR DOTS;;;;
+0688;ARABIC LETTER DDAL;Lo;0;R;;;;;N;ARABIC LETTER DAL WITH SMALL TAH;;;;
+0689;ARABIC LETTER DAL WITH RING;Lo;0;R;;;;;N;;;;;
+068A;ARABIC LETTER DAL WITH DOT BELOW;Lo;0;R;;;;;N;;;;;
+068B;ARABIC LETTER DAL WITH DOT BELOW AND SMALL TAH;Lo;0;R;;;;;N;;;;;
+068C;ARABIC LETTER DAHAL;Lo;0;R;;;;;N;ARABIC LETTER DAL WITH TWO DOTS ABOVE;;;;
+068D;ARABIC LETTER DDAHAL;Lo;0;R;;;;;N;ARABIC LETTER DAL WITH TWO DOTS BELOW;;;;
+068E;ARABIC LETTER DUL;Lo;0;R;;;;;N;ARABIC LETTER DAL WITH THREE DOTS ABOVE;;;;
+068F;ARABIC LETTER DAL WITH THREE DOTS ABOVE DOWNWARDS;Lo;0;R;;;;;N;ARABIC LETTER DAL WITH THREE DOTS ABOVE DOWNWARD;;;;
+0690;ARABIC LETTER DAL WITH FOUR DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+0691;ARABIC LETTER RREH;Lo;0;R;;;;;N;ARABIC LETTER RA WITH SMALL TAH;;;;
+0692;ARABIC LETTER REH WITH SMALL V;Lo;0;R;;;;;N;ARABIC LETTER RA WITH SMALL V;;;;
+0693;ARABIC LETTER REH WITH RING;Lo;0;R;;;;;N;ARABIC LETTER RA WITH RING;;;;
+0694;ARABIC LETTER REH WITH DOT BELOW;Lo;0;R;;;;;N;ARABIC LETTER RA WITH DOT BELOW;;;;
+0695;ARABIC LETTER REH WITH SMALL V BELOW;Lo;0;R;;;;;N;ARABIC LETTER RA WITH SMALL V BELOW;;;;
+0696;ARABIC LETTER REH WITH DOT BELOW AND DOT ABOVE;Lo;0;R;;;;;N;ARABIC LETTER RA WITH DOT BELOW AND DOT ABOVE;;;;
+0697;ARABIC LETTER REH WITH TWO DOTS ABOVE;Lo;0;R;;;;;N;ARABIC LETTER RA WITH TWO DOTS ABOVE;;;;
+0698;ARABIC LETTER JEH;Lo;0;R;;;;;N;ARABIC LETTER RA WITH THREE DOTS ABOVE;;;;
+0699;ARABIC LETTER REH WITH FOUR DOTS ABOVE;Lo;0;R;;;;;N;ARABIC LETTER RA WITH FOUR DOTS ABOVE;;;;
+069A;ARABIC LETTER SEEN WITH DOT BELOW AND DOT ABOVE;Lo;0;R;;;;;N;;;;;
+069B;ARABIC LETTER SEEN WITH THREE DOTS BELOW;Lo;0;R;;;;;N;;;;;
+069C;ARABIC LETTER SEEN WITH THREE DOTS BELOW AND THREE DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+069D;ARABIC LETTER SAD WITH TWO DOTS BELOW;Lo;0;R;;;;;N;;;;;
+069E;ARABIC LETTER SAD WITH THREE DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+069F;ARABIC LETTER TAH WITH THREE DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+06A0;ARABIC LETTER AIN WITH THREE DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+06A1;ARABIC LETTER DOTLESS FEH;Lo;0;R;;;;;N;ARABIC LETTER DOTLESS FA;;;;
+06A2;ARABIC LETTER FEH WITH DOT MOVED BELOW;Lo;0;R;;;;;N;ARABIC LETTER FA WITH DOT MOVED BELOW;;;;
+06A3;ARABIC LETTER FEH WITH DOT BELOW;Lo;0;R;;;;;N;ARABIC LETTER FA WITH DOT BELOW;;;;
+06A4;ARABIC LETTER VEH;Lo;0;R;;;;;N;ARABIC LETTER FA WITH THREE DOTS ABOVE;;;;
+06A5;ARABIC LETTER FEH WITH THREE DOTS BELOW;Lo;0;R;;;;;N;ARABIC LETTER FA WITH THREE DOTS BELOW;;;;
+06A6;ARABIC LETTER PEHEH;Lo;0;R;;;;;N;ARABIC LETTER FA WITH FOUR DOTS ABOVE;;;;
+06A7;ARABIC LETTER QAF WITH DOT ABOVE;Lo;0;R;;;;;N;;;;;
+06A8;ARABIC LETTER QAF WITH THREE DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+06A9;ARABIC LETTER KEHEH;Lo;0;R;;;;;N;ARABIC LETTER OPEN CAF;;;;
+06AA;ARABIC LETTER SWASH KAF;Lo;0;R;;;;;N;ARABIC LETTER SWASH CAF;;;;
+06AB;ARABIC LETTER KAF WITH RING;Lo;0;R;;;;;N;ARABIC LETTER CAF WITH RING;;;;
+06AC;ARABIC LETTER KAF WITH DOT ABOVE;Lo;0;R;;;;;N;ARABIC LETTER CAF WITH DOT ABOVE;;;;
+06AD;ARABIC LETTER NG;Lo;0;R;;;;;N;ARABIC LETTER CAF WITH THREE DOTS ABOVE;;;;
+06AE;ARABIC LETTER KAF WITH THREE DOTS BELOW;Lo;0;R;;;;;N;ARABIC LETTER CAF WITH THREE DOTS BELOW;;;;
+06AF;ARABIC LETTER GAF;Lo;0;R;;;;;N;;;;;
+06B0;ARABIC LETTER GAF WITH RING;Lo;0;R;;;;;N;;;;;
+06B1;ARABIC LETTER NGOEH;Lo;0;R;;;;;N;ARABIC LETTER GAF WITH TWO DOTS ABOVE;;;;
+06B2;ARABIC LETTER GAF WITH TWO DOTS BELOW;Lo;0;R;;;;;N;;;;;
+06B3;ARABIC LETTER GUEH;Lo;0;R;;;;;N;ARABIC LETTER GAF WITH TWO DOTS VERTICAL BELOW;;;;
+06B4;ARABIC LETTER GAF WITH THREE DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+06B5;ARABIC LETTER LAM WITH SMALL V;Lo;0;R;;;;;N;;;;;
+06B6;ARABIC LETTER LAM WITH DOT ABOVE;Lo;0;R;;;;;N;;;;;
+06B7;ARABIC LETTER LAM WITH THREE DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+06BA;ARABIC LETTER NOON GHUNNA;Lo;0;R;;;;;N;ARABIC LETTER DOTLESS NOON;;;;
+06BB;ARABIC LETTER RNOON;Lo;0;R;;;;;N;ARABIC LETTER DOTLESS NOON WITH SMALL TAH;;;;
+06BC;ARABIC LETTER NOON WITH RING;Lo;0;R;;;;;N;;;;;
+06BD;ARABIC LETTER NOON WITH THREE DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+06BE;ARABIC LETTER HEH DOACHASHMEE;Lo;0;R;;;;;N;ARABIC LETTER KNOTTED HA;;;;
+06C0;ARABIC LETTER HEH WITH YEH ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH ON HA;;;;
+06C1;ARABIC LETTER HEH GOAL;Lo;0;R;;;;;N;ARABIC LETTER HA GOAL;;;;
+06C2;ARABIC LETTER HEH GOAL WITH HAMZA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH ON HA GOAL;;;;
+06C3;ARABIC LETTER TEH MARBUTA GOAL;Lo;0;R;;;;;N;ARABIC LETTER TAA MARBUTAH GOAL;;;;
+06C4;ARABIC LETTER WAW WITH RING;Lo;0;R;;;;;N;;;;;
+06C5;ARABIC LETTER KIRGHIZ OE;Lo;0;R;;;;;N;ARABIC LETTER WAW WITH BAR;;;;
+06C6;ARABIC LETTER OE;Lo;0;R;;;;;N;ARABIC LETTER WAW WITH SMALL V;;;;
+06C7;ARABIC LETTER U;Lo;0;R;;;;;N;ARABIC LETTER WAW WITH DAMMAH;;;;
+06C8;ARABIC LETTER YU;Lo;0;R;;;;;N;ARABIC LETTER WAW WITH ALEF ABOVE;;;;
+06C9;ARABIC LETTER KIRGHIZ YU;Lo;0;R;;;;;N;ARABIC LETTER WAW WITH INVERTED SMALL V;;;;
+06CA;ARABIC LETTER WAW WITH TWO DOTS ABOVE;Lo;0;R;;;;;N;;;;;
+06CB;ARABIC LETTER VE;Lo;0;R;;;;;N;ARABIC LETTER WAW WITH THREE DOTS ABOVE;;;;
+06CC;ARABIC LETTER FARSI YEH;Lo;0;R;;;;;N;ARABIC LETTER DOTLESS YA;;;;
+06CD;ARABIC LETTER YEH WITH TAIL;Lo;0;R;;;;;N;ARABIC LETTER YA WITH TAIL;;;;
+06CE;ARABIC LETTER YEH WITH SMALL V;Lo;0;R;;;;;N;ARABIC LETTER YA WITH SMALL V;;;;
+06D0;ARABIC LETTER E;Lo;0;R;;;;;N;ARABIC LETTER YA WITH TWO DOTS VERTICAL BELOW;;;;
+06D1;ARABIC LETTER YEH WITH THREE DOTS BELOW;Lo;0;R;;;;;N;ARABIC LETTER YA WITH THREE DOTS BELOW;;;;
+06D2;ARABIC LETTER YEH BARREE;Lo;0;R;;;;;N;ARABIC LETTER YA BARREE;;;;
+06D3;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE;Lo;0;R;;;;;N;ARABIC LETTER HAMZAH ON YA BARREE;;;;
+06D4;ARABIC FULL STOP;Po;0;R;;;;;N;ARABIC PERIOD;;;;
+06D5;ARABIC LETTER AE;Lo;0;R;;;;;N;;;;;
+06D6;ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA;Mn;230;R;;;;;N;;;;;
+06D7;ARABIC SMALL HIGH LIGATURE QAF WITH LAM WITH ALEF MAKSURA;Mn;230;R;;;;;N;;;;;
+06D8;ARABIC SMALL HIGH MEEM INITIAL FORM;Mn;230;R;;;;;N;;;;;
+06D9;ARABIC SMALL HIGH LAM ALEF;Mn;230;R;;;;;N;;;;;
+06DA;ARABIC SMALL HIGH JEEM;Mn;230;R;;;;;N;;;;;
+06DB;ARABIC SMALL HIGH THREE DOTS;Mn;230;R;;;;;N;;;;;
+06DC;ARABIC SMALL HIGH SEEN;Mn;230;R;;;;;N;;;;;
+06DD;ARABIC END OF AYAH;Mn;0;R;;;;;N;;;;;
+06DE;ARABIC START OF RUB EL HIZB;Mn;0;R;;;;;N;;;;;
+06DF;ARABIC SMALL HIGH ROUNDED ZERO;Mn;230;R;;;;;N;;;;;
+06E0;ARABIC SMALL HIGH UPRIGHT RECTANGULAR ZERO;Mn;230;R;;;;;N;;;;;
+06E1;ARABIC SMALL HIGH DOTLESS HEAD OF KHAH;Mn;230;R;;;;;N;;;;;
+06E2;ARABIC SMALL HIGH MEEM ISOLATED FORM;Mn;230;R;;;;;N;;;;;
+06E3;ARABIC SMALL LOW SEEN;Mn;220;R;;;;;N;;;;;
+06E4;ARABIC SMALL HIGH MADDA;Mn;230;R;;;;;N;;;;;
+06E5;ARABIC SMALL WAW;Lm;0;R;;;;;N;;;;;
+06E6;ARABIC SMALL YEH;Lm;0;R;;;;;N;;;;;
+06E7;ARABIC SMALL HIGH YEH;Mn;230;R;;;;;N;;;;;
+06E8;ARABIC SMALL HIGH NOON;Mn;230;R;;;;;N;;;;;
+06E9;ARABIC PLACE OF SAJDAH;So;0;R;;;;;N;;;;;
+06EA;ARABIC EMPTY CENTRE LOW STOP;Mn;220;R;;;;;N;;;;;
+06EB;ARABIC EMPTY CENTRE HIGH STOP;Mn;230;R;;;;;N;;;;;
+06EC;ARABIC ROUNDED HIGH STOP WITH FILLED CENTRE;Mn;230;R;;;;;N;;;;;
+06ED;ARABIC SMALL LOW MEEM;Mn;220;R;;;;;N;;;;;
+06F0;EXTENDED ARABIC-INDIC DIGIT ZERO;Nd;0;EN;;0;0;0;N;EASTERN ARABIC-INDIC DIGIT ZERO;;;;
+06F1;EXTENDED ARABIC-INDIC DIGIT ONE;Nd;0;EN;;1;1;1;N;EASTERN ARABIC-INDIC DIGIT ONE;;;;
+06F2;EXTENDED ARABIC-INDIC DIGIT TWO;Nd;0;EN;;2;2;2;N;EASTERN ARABIC-INDIC DIGIT TWO;;;;
+06F3;EXTENDED ARABIC-INDIC DIGIT THREE;Nd;0;EN;;3;3;3;N;EASTERN ARABIC-INDIC DIGIT THREE;;;;
+06F4;EXTENDED ARABIC-INDIC DIGIT FOUR;Nd;0;EN;;4;4;4;N;EASTERN ARABIC-INDIC DIGIT FOUR;;;;
+06F5;EXTENDED ARABIC-INDIC DIGIT FIVE;Nd;0;EN;;5;5;5;N;EASTERN ARABIC-INDIC DIGIT FIVE;;;;
+06F6;EXTENDED ARABIC-INDIC DIGIT SIX;Nd;0;EN;;6;6;6;N;EASTERN ARABIC-INDIC DIGIT SIX;;;;
+06F7;EXTENDED ARABIC-INDIC DIGIT SEVEN;Nd;0;EN;;7;7;7;N;EASTERN ARABIC-INDIC DIGIT SEVEN;;;;
+06F8;EXTENDED ARABIC-INDIC DIGIT EIGHT;Nd;0;EN;;8;8;8;N;EASTERN ARABIC-INDIC DIGIT EIGHT;;;;
+06F9;EXTENDED ARABIC-INDIC DIGIT NINE;Nd;0;EN;;9;9;9;N;EASTERN ARABIC-INDIC DIGIT NINE;;;;
+0901;DEVANAGARI SIGN CANDRABINDU;Mn;37;L;;;;;N;;;;;
+0902;DEVANAGARI SIGN ANUSVARA;Mn;36;L;;;;;N;;;;;
+0903;DEVANAGARI SIGN VISARGA;Mc;0;L;;;;;N;;;;;
+0905;DEVANAGARI LETTER A;Lo;0;L;;;;;N;;;;;
+0906;DEVANAGARI LETTER AA;Lo;0;L;;;;;N;;;;;
+0907;DEVANAGARI LETTER I;Lo;0;L;;;;;N;;;;;
+0908;DEVANAGARI LETTER II;Lo;0;L;;;;;N;;;;;
+0909;DEVANAGARI LETTER U;Lo;0;L;;;;;N;;;;;
+090A;DEVANAGARI LETTER UU;Lo;0;L;;;;;N;;;;;
+090B;DEVANAGARI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;;
+090C;DEVANAGARI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;;
+090D;DEVANAGARI LETTER CANDRA E;Lo;0;L;;;;;N;;;;;
+090E;DEVANAGARI LETTER SHORT E;Lo;0;L;;;;;N;;;;;
+090F;DEVANAGARI LETTER E;Lo;0;L;;;;;N;;;;;
+0910;DEVANAGARI LETTER AI;Lo;0;L;;;;;N;;;;;
+0911;DEVANAGARI LETTER CANDRA O;Lo;0;L;;;;;N;;;;;
+0912;DEVANAGARI LETTER SHORT O;Lo;0;L;;;;;N;;;;;
+0913;DEVANAGARI LETTER O;Lo;0;L;;;;;N;;;;;
+0914;DEVANAGARI LETTER AU;Lo;0;L;;;;;N;;;;;
+0915;DEVANAGARI LETTER KA;Lo;0;L;;;;;N;;;;;
+0916;DEVANAGARI LETTER KHA;Lo;0;L;;;;;N;;;;;
+0917;DEVANAGARI LETTER GA;Lo;0;L;;;;;N;;;;;
+0918;DEVANAGARI LETTER GHA;Lo;0;L;;;;;N;;;;;
+0919;DEVANAGARI LETTER NGA;Lo;0;L;;;;;N;;;;;
+091A;DEVANAGARI LETTER CA;Lo;0;L;;;;;N;;;;;
+091B;DEVANAGARI LETTER CHA;Lo;0;L;;;;;N;;;;;
+091C;DEVANAGARI LETTER JA;Lo;0;L;;;;;N;;;;;
+091D;DEVANAGARI LETTER JHA;Lo;0;L;;;;;N;;;;;
+091E;DEVANAGARI LETTER NYA;Lo;0;L;;;;;N;;;;;
+091F;DEVANAGARI LETTER TTA;Lo;0;L;;;;;N;;;;;
+0920;DEVANAGARI LETTER TTHA;Lo;0;L;;;;;N;;;;;
+0921;DEVANAGARI LETTER DDA;Lo;0;L;;;;;N;;;;;
+0922;DEVANAGARI LETTER DDHA;Lo;0;L;;;;;N;;;;;
+0923;DEVANAGARI LETTER NNA;Lo;0;L;;;;;N;;;;;
+0924;DEVANAGARI LETTER TA;Lo;0;L;;;;;N;;;;;
+0925;DEVANAGARI LETTER THA;Lo;0;L;;;;;N;;;;;
+0926;DEVANAGARI LETTER DA;Lo;0;L;;;;;N;;;;;
+0927;DEVANAGARI LETTER DHA;Lo;0;L;;;;;N;;;;;
+0928;DEVANAGARI LETTER NA;Lo;0;L;;;;;N;;;;;
+0929;DEVANAGARI LETTER NNNA;Lo;0;L;0928 093C;;;;N;;;;;
+092A;DEVANAGARI LETTER PA;Lo;0;L;;;;;N;;;;;
+092B;DEVANAGARI LETTER PHA;Lo;0;L;;;;;N;;;;;
+092C;DEVANAGARI LETTER BA;Lo;0;L;;;;;N;;;;;
+092D;DEVANAGARI LETTER BHA;Lo;0;L;;;;;N;;;;;
+092E;DEVANAGARI LETTER MA;Lo;0;L;;;;;N;;;;;
+092F;DEVANAGARI LETTER YA;Lo;0;L;;;;;N;;;;;
+0930;DEVANAGARI LETTER RA;Lo;0;L;;;;;N;;;;;
+0931;DEVANAGARI LETTER RRA;Lo;0;L;0930 093C;;;;N;;;;;
+0932;DEVANAGARI LETTER LA;Lo;0;L;;;;;N;;;;;
+0933;DEVANAGARI LETTER LLA;Lo;0;L;;;;;N;;;;;
+0934;DEVANAGARI LETTER LLLA;Lo;0;L;0933 093C;;;;N;;;;;
+0935;DEVANAGARI LETTER VA;Lo;0;L;;;;;N;;;;;
+0936;DEVANAGARI LETTER SHA;Lo;0;L;;;;;N;;;;;
+0937;DEVANAGARI LETTER SSA;Lo;0;L;;;;;N;;;;;
+0938;DEVANAGARI LETTER SA;Lo;0;L;;;;;N;;;;;
+0939;DEVANAGARI LETTER HA;Lo;0;L;;;;;N;;;;;
+093C;DEVANAGARI SIGN NUKTA;Mn;7;L;;;;;N;;;;;
+093D;DEVANAGARI SIGN AVAGRAHA;Po;0;L;;;;;N;;;;;
+093E;DEVANAGARI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+093F;DEVANAGARI VOWEL SIGN I;Mc;0;L;;;;;N;;;;;
+0940;DEVANAGARI VOWEL SIGN II;Mc;0;L;;;;;N;;;;;
+0941;DEVANAGARI VOWEL SIGN U;Mn;38;L;;;;;N;;;;;
+0942;DEVANAGARI VOWEL SIGN UU;Mn;39;L;;;;;N;;;;;
+0943;DEVANAGARI VOWEL SIGN VOCALIC R;Mn;40;L;;;;;N;;;;;
+0944;DEVANAGARI VOWEL SIGN VOCALIC RR;Mn;41;L;;;;;N;;;;;
+0945;DEVANAGARI VOWEL SIGN CANDRA E;Mn;42;L;;;;;N;;;;;
+0946;DEVANAGARI VOWEL SIGN SHORT E;Mn;43;L;;;;;N;;;;;
+0947;DEVANAGARI VOWEL SIGN E;Mn;44;L;;;;;N;;;;;
+0948;DEVANAGARI VOWEL SIGN AI;Mn;45;L;;;;;N;;;;;
+0949;DEVANAGARI VOWEL SIGN CANDRA O;Mc;0;L;;;;;N;;;;;
+094A;DEVANAGARI VOWEL SIGN SHORT O;Mc;0;L;;;;;N;;;;;
+094B;DEVANAGARI VOWEL SIGN O;Mc;0;L;;;;;N;;;;;
+094C;DEVANAGARI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;;
+094D;DEVANAGARI SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+0950;DEVANAGARI OM;So;0;L;;;;;N;;;;;
+0951;DEVANAGARI STRESS SIGN UDATTA;Mn;46;L;;;;;N;;;;;
+0952;DEVANAGARI STRESS SIGN ANUDATTA;Mn;47;L;;;;;N;;;;;
+0953;DEVANAGARI GRAVE ACCENT;Mn;230;L;;;;;N;;;;;
+0954;DEVANAGARI ACUTE ACCENT;Mn;230;L;;;;;N;;;;;
+0958;DEVANAGARI LETTER QA;Lo;0;L;0915 093C;;;;N;;;;;
+0959;DEVANAGARI LETTER KHHA;Lo;0;L;0916 093C;;;;N;;;;;
+095A;DEVANAGARI LETTER GHHA;Lo;0;L;0917 093C;;;;N;;;;;
+095B;DEVANAGARI LETTER ZA;Lo;0;L;091C 093C;;;;N;;;;;
+095C;DEVANAGARI LETTER DDDHA;Lo;0;L;0921 093C;;;;N;;;;;
+095D;DEVANAGARI LETTER RHA;Lo;0;L;0922 093C;;;;N;;;;;
+095E;DEVANAGARI LETTER FA;Lo;0;L;092B 093C;;;;N;;;;;
+095F;DEVANAGARI LETTER YYA;Lo;0;L;092F 093C;;;;N;;;;;
+0960;DEVANAGARI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
+0961;DEVANAGARI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
+0962;DEVANAGARI VOWEL SIGN VOCALIC L;Mn;48;L;;;;;N;;;;;
+0963;DEVANAGARI VOWEL SIGN VOCALIC LL;Mn;49;L;;;;;N;;;;;
+0964;DEVANAGARI DANDA;So;0;L;;;;;N;;;;;
+0965;DEVANAGARI DOUBLE DANDA;So;0;L;;;;;N;;;;;
+0966;DEVANAGARI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0967;DEVANAGARI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0968;DEVANAGARI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0969;DEVANAGARI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+096A;DEVANAGARI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+096B;DEVANAGARI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+096C;DEVANAGARI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+096D;DEVANAGARI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+096E;DEVANAGARI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+096F;DEVANAGARI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0970;DEVANAGARI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
+0981;BENGALI SIGN CANDRABINDU;Mn;50;L;;;;;N;;;;;
+0982;BENGALI SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
+0983;BENGALI SIGN VISARGA;Mc;0;L;;;;;N;;;;;
+0985;BENGALI LETTER A;Lo;0;L;;;;;N;;;;;
+0986;BENGALI LETTER AA;Lo;0;L;;;;;N;;;;;
+0987;BENGALI LETTER I;Lo;0;L;;;;;N;;;;;
+0988;BENGALI LETTER II;Lo;0;L;;;;;N;;;;;
+0989;BENGALI LETTER U;Lo;0;L;;;;;N;;;;;
+098A;BENGALI LETTER UU;Lo;0;L;;;;;N;;;;;
+098B;BENGALI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;;
+098C;BENGALI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;;
+098F;BENGALI LETTER E;Lo;0;L;;;;;N;;;;;
+0990;BENGALI LETTER AI;Lo;0;L;;;;;N;;;;;
+0993;BENGALI LETTER O;Lo;0;L;;;;;N;;;;;
+0994;BENGALI LETTER AU;Lo;0;L;;;;;N;;;;;
+0995;BENGALI LETTER KA;Lo;0;L;;;;;N;;;;;
+0996;BENGALI LETTER KHA;Lo;0;L;;;;;N;;;;;
+0997;BENGALI LETTER GA;Lo;0;L;;;;;N;;;;;
+0998;BENGALI LETTER GHA;Lo;0;L;;;;;N;;;;;
+0999;BENGALI LETTER NGA;Lo;0;L;;;;;N;;;;;
+099A;BENGALI LETTER CA;Lo;0;L;;;;;N;;;;;
+099B;BENGALI LETTER CHA;Lo;0;L;;;;;N;;;;;
+099C;BENGALI LETTER JA;Lo;0;L;;;;;N;;;;;
+099D;BENGALI LETTER JHA;Lo;0;L;;;;;N;;;;;
+099E;BENGALI LETTER NYA;Lo;0;L;;;;;N;;;;;
+099F;BENGALI LETTER TTA;Lo;0;L;;;;;N;;;;;
+09A0;BENGALI LETTER TTHA;Lo;0;L;;;;;N;;;;;
+09A1;BENGALI LETTER DDA;Lo;0;L;;;;;N;;;;;
+09A2;BENGALI LETTER DDHA;Lo;0;L;;;;;N;;;;;
+09A3;BENGALI LETTER NNA;Lo;0;L;;;;;N;;;;;
+09A4;BENGALI LETTER TA;Lo;0;L;;;;;N;;;;;
+09A5;BENGALI LETTER THA;Lo;0;L;;;;;N;;;;;
+09A6;BENGALI LETTER DA;Lo;0;L;;;;;N;;;;;
+09A7;BENGALI LETTER DHA;Lo;0;L;;;;;N;;;;;
+09A8;BENGALI LETTER NA;Lo;0;L;;;;;N;;;;;
+09AA;BENGALI LETTER PA;Lo;0;L;;;;;N;;;;;
+09AB;BENGALI LETTER PHA;Lo;0;L;;;;;N;;;;;
+09AC;BENGALI LETTER BA;Lo;0;L;;;;;N;;;;;
+09AD;BENGALI LETTER BHA;Lo;0;L;;;;;N;;;;;
+09AE;BENGALI LETTER MA;Lo;0;L;;;;;N;;;;;
+09AF;BENGALI LETTER YA;Lo;0;L;;;;;N;;;;;
+09B0;BENGALI LETTER RA;Lo;0;L;09AC 09BC;;;;N;;;;;
+09B2;BENGALI LETTER LA;Lo;0;L;;;;;N;;;;;
+09B6;BENGALI LETTER SHA;Lo;0;L;;;;;N;;;;;
+09B7;BENGALI LETTER SSA;Lo;0;L;;;;;N;;;;;
+09B8;BENGALI LETTER SA;Lo;0;L;;;;;N;;;;;
+09B9;BENGALI LETTER HA;Lo;0;L;;;;;N;;;;;
+09BC;BENGALI SIGN NUKTA;Mn;7;L;;;;;N;;;;;
+09BE;BENGALI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+09BF;BENGALI VOWEL SIGN I;Mc;0;L;;;;;N;;;;;
+09C0;BENGALI VOWEL SIGN II;Mc;0;L;;;;;N;;;;;
+09C1;BENGALI VOWEL SIGN U;Mn;51;L;;;;;N;;;;;
+09C2;BENGALI VOWEL SIGN UU;Mn;52;L;;;;;N;;;;;
+09C3;BENGALI VOWEL SIGN VOCALIC R;Mn;53;L;;;;;N;;;;;
+09C4;BENGALI VOWEL SIGN VOCALIC RR;Mn;54;L;;;;;N;;;;;
+09C7;BENGALI VOWEL SIGN E;Mc;0;L;;;;;N;;;;;
+09C8;BENGALI VOWEL SIGN AI;Mc;0;L;;;;;N;;;;;
+09CB;BENGALI VOWEL SIGN O;Mc;0;L;09C7 09BE;;;;N;;;;;
+09CC;BENGALI VOWEL SIGN AU;Mc;0;L;09C7 09D7;;;;N;;;;;
+09CD;BENGALI SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+09D7;BENGALI AU LENGTH MARK;Mc;0;L;;;;;N;;;;;
+09DC;BENGALI LETTER RRA;Lo;0;L;09A1 09BC;;;;N;;;;;
+09DD;BENGALI LETTER RHA;Lo;0;L;09A2 09BC;;;;N;;;;;
+09DF;BENGALI LETTER YYA;Lo;0;L;09AF 09BC;;;;N;;;;;
+09E0;BENGALI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
+09E1;BENGALI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
+09E2;BENGALI VOWEL SIGN VOCALIC L;Mn;55;L;;;;;N;;;;;
+09E3;BENGALI VOWEL SIGN VOCALIC LL;Mn;56;L;;;;;N;;;;;
+09E6;BENGALI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+09E7;BENGALI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+09E8;BENGALI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+09E9;BENGALI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+09EA;BENGALI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+09EB;BENGALI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+09EC;BENGALI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+09ED;BENGALI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+09EE;BENGALI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+09EF;BENGALI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+09F0;BENGALI LETTER RA WITH MIDDLE DIAGONAL;Lo;0;L;;;;;N;;Assamese;;;
+09F1;BENGALI LETTER RA WITH LOWER DIAGONAL;Lo;0;L;;;;;N;BENGALI LETTER VA WITH LOWER DIAGONAL;Assamese;;;
+09F2;BENGALI RUPEE MARK;So;0;L;;;;;N;;;;;
+09F3;BENGALI RUPEE SIGN;So;0;L;;;;;N;;;;;
+09F4;BENGALI CURRENCY NUMERATOR ONE;No;0;L;;;;1;N;;;;;
+09F5;BENGALI CURRENCY NUMERATOR TWO;No;0;L;;;;2;N;;;;;
+09F6;BENGALI CURRENCY NUMERATOR THREE;No;0;L;;;;3;N;;;;;
+09F7;BENGALI CURRENCY NUMERATOR FOUR;No;0;L;;;;4;N;;;;;
+09F8;BENGALI CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR;No;0;L;;;;-1;N;;;;;
+09F9;BENGALI CURRENCY DENOMINATOR SIXTEEN;No;0;L;;;;16;N;;;;;
+09FA;BENGALI ISSHAR;So;0;L;;;;;N;;;;;
+0A02;GURMUKHI SIGN BINDI;Mn;57;L;;;;;N;;;;;
+0A05;GURMUKHI LETTER A;Lo;0;L;;;;;N;;;;;
+0A06;GURMUKHI LETTER AA;Lo;0;L;;;;;N;;;;;
+0A07;GURMUKHI LETTER I;Lo;0;L;;;;;N;;;;;
+0A08;GURMUKHI LETTER II;Lo;0;L;;;;;N;;;;;
+0A09;GURMUKHI LETTER U;Lo;0;L;;;;;N;;;;;
+0A0A;GURMUKHI LETTER UU;Lo;0;L;;;;;N;;;;;
+0A0F;GURMUKHI LETTER EE;Lo;0;L;;;;;N;;;;;
+0A10;GURMUKHI LETTER AI;Lo;0;L;;;;;N;;;;;
+0A13;GURMUKHI LETTER OO;Lo;0;L;;;;;N;;;;;
+0A14;GURMUKHI LETTER AU;Lo;0;L;;;;;N;;;;;
+0A15;GURMUKHI LETTER KA;Lo;0;L;;;;;N;;;;;
+0A16;GURMUKHI LETTER KHA;Lo;0;L;;;;;N;;;;;
+0A17;GURMUKHI LETTER GA;Lo;0;L;;;;;N;;;;;
+0A18;GURMUKHI LETTER GHA;Lo;0;L;;;;;N;;;;;
+0A19;GURMUKHI LETTER NGA;Lo;0;L;;;;;N;;;;;
+0A1A;GURMUKHI LETTER CA;Lo;0;L;;;;;N;;;;;
+0A1B;GURMUKHI LETTER CHA;Lo;0;L;;;;;N;;;;;
+0A1C;GURMUKHI LETTER JA;Lo;0;L;;;;;N;;;;;
+0A1D;GURMUKHI LETTER JHA;Lo;0;L;;;;;N;;;;;
+0A1E;GURMUKHI LETTER NYA;Lo;0;L;;;;;N;;;;;
+0A1F;GURMUKHI LETTER TTA;Lo;0;L;;;;;N;;;;;
+0A20;GURMUKHI LETTER TTHA;Lo;0;L;;;;;N;;;;;
+0A21;GURMUKHI LETTER DDA;Lo;0;L;;;;;N;;;;;
+0A22;GURMUKHI LETTER DDHA;Lo;0;L;;;;;N;;;;;
+0A23;GURMUKHI LETTER NNA;Lo;0;L;;;;;N;;;;;
+0A24;GURMUKHI LETTER TA;Lo;0;L;;;;;N;;;;;
+0A25;GURMUKHI LETTER THA;Lo;0;L;;;;;N;;;;;
+0A26;GURMUKHI LETTER DA;Lo;0;L;;;;;N;;;;;
+0A27;GURMUKHI LETTER DHA;Lo;0;L;;;;;N;;;;;
+0A28;GURMUKHI LETTER NA;Lo;0;L;;;;;N;;;;;
+0A2A;GURMUKHI LETTER PA;Lo;0;L;;;;;N;;;;;
+0A2B;GURMUKHI LETTER PHA;Lo;0;L;;;;;N;;;;;
+0A2C;GURMUKHI LETTER BA;Lo;0;L;;;;;N;;;;;
+0A2D;GURMUKHI LETTER BHA;Lo;0;L;;;;;N;;;;;
+0A2E;GURMUKHI LETTER MA;Lo;0;L;;;;;N;;;;;
+0A2F;GURMUKHI LETTER YA;Lo;0;L;;;;;N;;;;;
+0A30;GURMUKHI LETTER RA;Lo;0;L;;;;;N;;;;;
+0A32;GURMUKHI LETTER LA;Lo;0;L;;;;;N;;;;;
+0A33;GURMUKHI LETTER LLA;Lo;0;L;;;;;N;;;;;
+0A35;GURMUKHI LETTER VA;Lo;0;L;;;;;N;;;;;
+0A36;GURMUKHI LETTER SHA;Lo;0;L;;;;;N;;;;;
+0A38;GURMUKHI LETTER SA;Lo;0;L;;;;;N;;;;;
+0A39;GURMUKHI LETTER HA;Lo;0;L;;;;;N;;;;;
+0A3C;GURMUKHI SIGN NUKTA;Mn;7;L;;;;;N;;;;;
+0A3E;GURMUKHI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+0A3F;GURMUKHI VOWEL SIGN I;Mc;0;L;;;;;N;;;;;
+0A40;GURMUKHI VOWEL SIGN II;Mc;0;L;;;;;N;;;;;
+0A41;GURMUKHI VOWEL SIGN U;Mn;58;L;;;;;N;;;;;
+0A42;GURMUKHI VOWEL SIGN UU;Mn;59;L;;;;;N;;;;;
+0A47;GURMUKHI VOWEL SIGN EE;Mn;60;L;;;;;N;;;;;
+0A48;GURMUKHI VOWEL SIGN AI;Mn;61;L;;;;;N;;;;;
+0A4B;GURMUKHI VOWEL SIGN OO;Mn;62;L;;;;;N;;;;;
+0A4C;GURMUKHI VOWEL SIGN AU;Mn;63;L;;;;;N;;;;;
+0A4D;GURMUKHI SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+0A59;GURMUKHI LETTER KHHA;Lo;0;L;0A16 0A3C;;;;N;;;;;
+0A5A;GURMUKHI LETTER GHHA;Lo;0;L;0A17 0A3C;;;;N;;;;;
+0A5B;GURMUKHI LETTER ZA;Lo;0;L;0A1C 0A3C;;;;N;;;;;
+0A5C;GURMUKHI LETTER RRA;Lo;0;L;0A21 0A3C;;;;N;;;;;
+0A5E;GURMUKHI LETTER FA;Lo;0;L;0A2B 0A3C;;;;N;;;;;
+0A66;GURMUKHI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0A67;GURMUKHI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0A68;GURMUKHI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0A69;GURMUKHI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0A6A;GURMUKHI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0A6B;GURMUKHI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0A6C;GURMUKHI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0A6D;GURMUKHI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0A6E;GURMUKHI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0A6F;GURMUKHI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0A70;GURMUKHI TIPPI;Mn;64;L;;;;;N;;;;;
+0A71;GURMUKHI ADDAK;Mn;65;L;;;;;N;;;;;
+0A72;GURMUKHI IRI;So;0;L;;;;;N;;;;;
+0A73;GURMUKHI URA;So;0;L;;;;;N;;;;;
+0A74;GURMUKHI EK ONKAR;So;0;L;;;;;N;;;;;
+0A81;GUJARATI SIGN CANDRABINDU;Mn;67;L;;;;;N;;;;;
+0A82;GUJARATI SIGN ANUSVARA;Mn;66;L;;;;;N;;;;;
+0A83;GUJARATI SIGN VISARGA;Mc;0;L;;;;;N;;;;;
+0A85;GUJARATI LETTER A;Lo;0;L;;;;;N;;;;;
+0A86;GUJARATI LETTER AA;Lo;0;L;;;;;N;;;;;
+0A87;GUJARATI LETTER I;Lo;0;L;;;;;N;;;;;
+0A88;GUJARATI LETTER II;Lo;0;L;;;;;N;;;;;
+0A89;GUJARATI LETTER U;Lo;0;L;;;;;N;;;;;
+0A8A;GUJARATI LETTER UU;Lo;0;L;;;;;N;;;;;
+0A8B;GUJARATI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;;
+0A8D;GUJARATI VOWEL CANDRA E;Lo;0;L;;;;;N;;;;;
+0A8F;GUJARATI LETTER E;Lo;0;L;;;;;N;;;;;
+0A90;GUJARATI LETTER AI;Lo;0;L;;;;;N;;;;;
+0A91;GUJARATI VOWEL CANDRA O;Lo;0;L;;;;;N;;;;;
+0A93;GUJARATI LETTER O;Lo;0;L;;;;;N;;;;;
+0A94;GUJARATI LETTER AU;Lo;0;L;;;;;N;;;;;
+0A95;GUJARATI LETTER KA;Lo;0;L;;;;;N;;;;;
+0A96;GUJARATI LETTER KHA;Lo;0;L;;;;;N;;;;;
+0A97;GUJARATI LETTER GA;Lo;0;L;;;;;N;;;;;
+0A98;GUJARATI LETTER GHA;Lo;0;L;;;;;N;;;;;
+0A99;GUJARATI LETTER NGA;Lo;0;L;;;;;N;;;;;
+0A9A;GUJARATI LETTER CA;Lo;0;L;;;;;N;;;;;
+0A9B;GUJARATI LETTER CHA;Lo;0;L;;;;;N;;;;;
+0A9C;GUJARATI LETTER JA;Lo;0;L;;;;;N;;;;;
+0A9D;GUJARATI LETTER JHA;Lo;0;L;;;;;N;;;;;
+0A9E;GUJARATI LETTER NYA;Lo;0;L;;;;;N;;;;;
+0A9F;GUJARATI LETTER TTA;Lo;0;L;;;;;N;;;;;
+0AA0;GUJARATI LETTER TTHA;Lo;0;L;;;;;N;;;;;
+0AA1;GUJARATI LETTER DDA;Lo;0;L;;;;;N;;;;;
+0AA2;GUJARATI LETTER DDHA;Lo;0;L;;;;;N;;;;;
+0AA3;GUJARATI LETTER NNA;Lo;0;L;;;;;N;;;;;
+0AA4;GUJARATI LETTER TA;Lo;0;L;;;;;N;;;;;
+0AA5;GUJARATI LETTER THA;Lo;0;L;;;;;N;;;;;
+0AA6;GUJARATI LETTER DA;Lo;0;L;;;;;N;;;;;
+0AA7;GUJARATI LETTER DHA;Lo;0;L;;;;;N;;;;;
+0AA8;GUJARATI LETTER NA;Lo;0;L;;;;;N;;;;;
+0AAA;GUJARATI LETTER PA;Lo;0;L;;;;;N;;;;;
+0AAB;GUJARATI LETTER PHA;Lo;0;L;;;;;N;;;;;
+0AAC;GUJARATI LETTER BA;Lo;0;L;;;;;N;;;;;
+0AAD;GUJARATI LETTER BHA;Lo;0;L;;;;;N;;;;;
+0AAE;GUJARATI LETTER MA;Lo;0;L;;;;;N;;;;;
+0AAF;GUJARATI LETTER YA;Lo;0;L;;;;;N;;;;;
+0AB0;GUJARATI LETTER RA;Lo;0;L;;;;;N;;;;;
+0AB2;GUJARATI LETTER LA;Lo;0;L;;;;;N;;;;;
+0AB3;GUJARATI LETTER LLA;Lo;0;L;;;;;N;;;;;
+0AB5;GUJARATI LETTER VA;Lo;0;L;;;;;N;;;;;
+0AB6;GUJARATI LETTER SHA;Lo;0;L;;;;;N;;;;;
+0AB7;GUJARATI LETTER SSA;Lo;0;L;;;;;N;;;;;
+0AB8;GUJARATI LETTER SA;Lo;0;L;;;;;N;;;;;
+0AB9;GUJARATI LETTER HA;Lo;0;L;;;;;N;;;;;
+0ABC;GUJARATI SIGN NUKTA;Mn;7;L;;;;;N;;;;;
+0ABD;GUJARATI SIGN AVAGRAHA;Po;0;L;;;;;N;;;;;
+0ABE;GUJARATI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+0ABF;GUJARATI VOWEL SIGN I;Mc;0;L;;;;;N;;;;;
+0AC0;GUJARATI VOWEL SIGN II;Mc;0;L;;;;;N;;;;;
+0AC1;GUJARATI VOWEL SIGN U;Mn;68;L;;;;;N;;;;;
+0AC2;GUJARATI VOWEL SIGN UU;Mn;69;L;;;;;N;;;;;
+0AC3;GUJARATI VOWEL SIGN VOCALIC R;Mn;70;L;;;;;N;;;;;
+0AC4;GUJARATI VOWEL SIGN VOCALIC RR;Mn;71;L;;;;;N;;;;;
+0AC5;GUJARATI VOWEL SIGN CANDRA E;Mn;72;L;;;;;N;;;;;
+0AC7;GUJARATI VOWEL SIGN E;Mn;73;L;;;;;N;;;;;
+0AC8;GUJARATI VOWEL SIGN AI;Mn;74;L;;;;;N;;;;;
+0AC9;GUJARATI VOWEL SIGN CANDRA O;Mc;0;L;;;;;N;;;;;
+0ACB;GUJARATI VOWEL SIGN O;Mc;0;L;;;;;N;;;;;
+0ACC;GUJARATI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;;
+0ACD;GUJARATI SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+0AD0;GUJARATI OM;So;0;L;;;;;N;;;;;
+0AE0;GUJARATI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
+0AE6;GUJARATI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0AE7;GUJARATI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0AE8;GUJARATI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0AE9;GUJARATI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0AEA;GUJARATI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0AEB;GUJARATI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0AEC;GUJARATI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0AED;GUJARATI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0AEE;GUJARATI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0AEF;GUJARATI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0B01;ORIYA SIGN CANDRABINDU;Mn;75;L;;;;;N;;;;;
+0B02;ORIYA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
+0B03;ORIYA SIGN VISARGA;Mc;0;L;;;;;N;;;;;
+0B05;ORIYA LETTER A;Lo;0;L;;;;;N;;;;;
+0B06;ORIYA LETTER AA;Lo;0;L;;;;;N;;;;;
+0B07;ORIYA LETTER I;Lo;0;L;;;;;N;;;;;
+0B08;ORIYA LETTER II;Lo;0;L;;;;;N;;;;;
+0B09;ORIYA LETTER U;Lo;0;L;;;;;N;;;;;
+0B0A;ORIYA LETTER UU;Lo;0;L;;;;;N;;;;;
+0B0B;ORIYA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;;
+0B0C;ORIYA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;;
+0B0F;ORIYA LETTER E;Lo;0;L;;;;;N;;;;;
+0B10;ORIYA LETTER AI;Lo;0;L;;;;;N;;;;;
+0B13;ORIYA LETTER O;Lo;0;L;;;;;N;;;;;
+0B14;ORIYA LETTER AU;Lo;0;L;;;;;N;;;;;
+0B15;ORIYA LETTER KA;Lo;0;L;;;;;N;;;;;
+0B16;ORIYA LETTER KHA;Lo;0;L;;;;;N;;;;;
+0B17;ORIYA LETTER GA;Lo;0;L;;;;;N;;;;;
+0B18;ORIYA LETTER GHA;Lo;0;L;;;;;N;;;;;
+0B19;ORIYA LETTER NGA;Lo;0;L;;;;;N;;;;;
+0B1A;ORIYA LETTER CA;Lo;0;L;;;;;N;;;;;
+0B1B;ORIYA LETTER CHA;Lo;0;L;;;;;N;;;;;
+0B1C;ORIYA LETTER JA;Lo;0;L;;;;;N;;;;;
+0B1D;ORIYA LETTER JHA;Lo;0;L;;;;;N;;;;;
+0B1E;ORIYA LETTER NYA;Lo;0;L;;;;;N;;;;;
+0B1F;ORIYA LETTER TTA;Lo;0;L;;;;;N;;;;;
+0B20;ORIYA LETTER TTHA;Lo;0;L;;;;;N;;;;;
+0B21;ORIYA LETTER DDA;Lo;0;L;;;;;N;;;;;
+0B22;ORIYA LETTER DDHA;Lo;0;L;;;;;N;;;;;
+0B23;ORIYA LETTER NNA;Lo;0;L;;;;;N;;;;;
+0B24;ORIYA LETTER TA;Lo;0;L;;;;;N;;;;;
+0B25;ORIYA LETTER THA;Lo;0;L;;;;;N;;;;;
+0B26;ORIYA LETTER DA;Lo;0;L;;;;;N;;;;;
+0B27;ORIYA LETTER DHA;Lo;0;L;;;;;N;;;;;
+0B28;ORIYA LETTER NA;Lo;0;L;;;;;N;;;;;
+0B2A;ORIYA LETTER PA;Lo;0;L;;;;;N;;;;;
+0B2B;ORIYA LETTER PHA;Lo;0;L;;;;;N;;;;;
+0B2C;ORIYA LETTER BA;Lo;0;L;;;;;N;;;;;
+0B2D;ORIYA LETTER BHA;Lo;0;L;;;;;N;;;;;
+0B2E;ORIYA LETTER MA;Lo;0;L;;;;;N;;;;;
+0B2F;ORIYA LETTER YA;Lo;0;L;;;;;N;;;;;
+0B30;ORIYA LETTER RA;Lo;0;L;;;;;N;;;;;
+0B32;ORIYA LETTER LA;Lo;0;L;;;;;N;;;;;
+0B33;ORIYA LETTER LLA;Lo;0;L;;;;;N;;;;;
+0B36;ORIYA LETTER SHA;Lo;0;L;;;;;N;;;;;
+0B37;ORIYA LETTER SSA;Lo;0;L;;;;;N;;;;;
+0B38;ORIYA LETTER SA;Lo;0;L;;;;;N;;;;;
+0B39;ORIYA LETTER HA;Lo;0;L;;;;;N;;;;;
+0B3C;ORIYA SIGN NUKTA;Mn;7;L;;;;;N;;;;;
+0B3D;ORIYA SIGN AVAGRAHA;Po;0;L;;;;;N;;;;;
+0B3E;ORIYA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+0B3F;ORIYA VOWEL SIGN I;Mn;76;L;;;;;N;;;;;
+0B40;ORIYA VOWEL SIGN II;Mc;0;L;;;;;N;;;;;
+0B41;ORIYA VOWEL SIGN U;Mn;77;L;;;;;N;;;;;
+0B42;ORIYA VOWEL SIGN UU;Mn;78;L;;;;;N;;;;;
+0B43;ORIYA VOWEL SIGN VOCALIC R;Mn;79;L;;;;;N;;;;;
+0B47;ORIYA VOWEL SIGN E;Mc;0;L;;;;;N;;;;;
+0B48;ORIYA VOWEL SIGN AI;Mc;0;L;0B47 0B56;;;;N;;;;;
+0B4B;ORIYA VOWEL SIGN O;Mc;0;L;0B47 0B3E;;;;N;;;;;
+0B4C;ORIYA VOWEL SIGN AU;Mc;0;L;0B47 0B57;;;;N;;;;;
+0B4D;ORIYA SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+0B56;ORIYA AI LENGTH MARK;Mn;230;L;;;;;N;;;;;
+0B57;ORIYA AU LENGTH MARK;Mc;0;L;;;;;N;;;;;
+0B5C;ORIYA LETTER RRA;Lo;0;L;0B21 0B3C;;;;N;;;;;
+0B5D;ORIYA LETTER RHA;Lo;0;L;0B22 0B3C;;;;N;;;;;
+0B5F;ORIYA LETTER YYA;Lo;0;L;0B2F 0B3C;;;;N;;;;;
+0B60;ORIYA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
+0B61;ORIYA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
+0B66;ORIYA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0B67;ORIYA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0B68;ORIYA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0B69;ORIYA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0B6A;ORIYA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0B6B;ORIYA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0B6C;ORIYA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0B6D;ORIYA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0B6E;ORIYA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0B6F;ORIYA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0B70;ORIYA ISSHAR;So;0;L;;;;;N;;;;;
+0B82;TAMIL SIGN ANUSVARA;Mn;0;L;;;;;N;;;;;
+0B83;TAMIL SIGN VISARGA;Mc;0;L;;;;;N;;;;;
+0B85;TAMIL LETTER A;Lo;0;L;;;;;N;;;;;
+0B86;TAMIL LETTER AA;Lo;0;L;;;;;N;;;;;
+0B87;TAMIL LETTER I;Lo;0;L;;;;;N;;;;;
+0B88;TAMIL LETTER II;Lo;0;L;;;;;N;;;;;
+0B89;TAMIL LETTER U;Lo;0;L;;;;;N;;;;;
+0B8A;TAMIL LETTER UU;Lo;0;L;;;;;N;;;;;
+0B8E;TAMIL LETTER E;Lo;0;L;;;;;N;;;;;
+0B8F;TAMIL LETTER EE;Lo;0;L;;;;;N;;;;;
+0B90;TAMIL LETTER AI;Lo;0;L;;;;;N;;;;;
+0B92;TAMIL LETTER O;Lo;0;L;;;;;N;;;;;
+0B93;TAMIL LETTER OO;Lo;0;L;;;;;N;;;;;
+0B94;TAMIL LETTER AU;Lo;0;L;0B92 0BD7;;;;N;;;;;
+0B95;TAMIL LETTER KA;Lo;0;L;;;;;N;;;;;
+0B99;TAMIL LETTER NGA;Lo;0;L;;;;;N;;;;;
+0B9A;TAMIL LETTER CA;Lo;0;L;;;;;N;;;;;
+0B9C;TAMIL LETTER JA;Lo;0;L;;;;;N;;;;;
+0B9E;TAMIL LETTER NYA;Lo;0;L;;;;;N;;;;;
+0B9F;TAMIL LETTER TTA;Lo;0;L;;;;;N;;;;;
+0BA3;TAMIL LETTER NNA;Lo;0;L;;;;;N;;;;;
+0BA4;TAMIL LETTER TA;Lo;0;L;;;;;N;;;;;
+0BA8;TAMIL LETTER NA;Lo;0;L;;;;;N;;;;;
+0BA9;TAMIL LETTER NNNA;Lo;0;L;;;;;N;;;;;
+0BAA;TAMIL LETTER PA;Lo;0;L;;;;;N;;;;;
+0BAE;TAMIL LETTER MA;Lo;0;L;;;;;N;;;;;
+0BAF;TAMIL LETTER YA;Lo;0;L;;;;;N;;;;;
+0BB0;TAMIL LETTER RA;Lo;0;L;;;;;N;;;;;
+0BB1;TAMIL LETTER RRA;Lo;0;L;;;;;N;;;;;
+0BB2;TAMIL LETTER LA;Lo;0;L;;;;;N;;;;;
+0BB3;TAMIL LETTER LLA;Lo;0;L;;;;;N;;;;;
+0BB4;TAMIL LETTER LLLA;Lo;0;L;;;;;N;;;;;
+0BB5;TAMIL LETTER VA;Lo;0;L;;;;;N;;;;;
+0BB7;TAMIL LETTER SSA;Lo;0;L;;;;;N;;;;;
+0BB8;TAMIL LETTER SA;Lo;0;L;;;;;N;;;;;
+0BB9;TAMIL LETTER HA;Lo;0;L;;;;;N;;;;;
+0BBE;TAMIL VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+0BBF;TAMIL VOWEL SIGN I;Mc;0;L;;;;;N;;;;;
+0BC0;TAMIL VOWEL SIGN II;Mn;80;L;;;;;N;;;;;
+0BC1;TAMIL VOWEL SIGN U;Mc;0;L;;;;;N;;;;;
+0BC2;TAMIL VOWEL SIGN UU;Mc;0;L;;;;;N;;;;;
+0BC6;TAMIL VOWEL SIGN E;Mc;0;L;;;;;N;;;;;
+0BC7;TAMIL VOWEL SIGN EE;Mc;0;L;;;;;N;;;;;
+0BC8;TAMIL VOWEL SIGN AI;Mc;0;L;;;;;N;;;;;
+0BCA;TAMIL VOWEL SIGN O;Mc;0;L;0BC6 0BBE;;;;N;;;;;
+0BCB;TAMIL VOWEL SIGN OO;Mc;0;L;0BC7 0BBE;;;;N;;;;;
+0BCC;TAMIL VOWEL SIGN AU;Mc;0;L;0BC6 0BD7;;;;N;;;;;
+0BCD;TAMIL SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+0BD7;TAMIL AU LENGTH MARK;Mc;0;L;;;;;N;;;;;
+0BE7;TAMIL DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0BE8;TAMIL DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0BE9;TAMIL DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0BEA;TAMIL DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0BEB;TAMIL DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0BEC;TAMIL DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0BED;TAMIL DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0BEE;TAMIL DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0BEF;TAMIL DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0BF0;TAMIL NUMBER TEN;No;0;L;;;;10;N;;;;;
+0BF1;TAMIL NUMBER ONE HUNDRED;No;0;L;;;;100;N;;;;;
+0BF2;TAMIL NUMBER ONE THOUSAND;No;0;L;;;;1000;N;;;;;
+0C01;TELUGU SIGN CANDRABINDU;Mc;0;L;;;;;N;;;;;
+0C02;TELUGU SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
+0C03;TELUGU SIGN VISARGA;Mc;0;L;;;;;N;;;;;
+0C05;TELUGU LETTER A;Lo;0;L;;;;;N;;;;;
+0C06;TELUGU LETTER AA;Lo;0;L;;;;;N;;;;;
+0C07;TELUGU LETTER I;Lo;0;L;;;;;N;;;;;
+0C08;TELUGU LETTER II;Lo;0;L;;;;;N;;;;;
+0C09;TELUGU LETTER U;Lo;0;L;;;;;N;;;;;
+0C0A;TELUGU LETTER UU;Lo;0;L;;;;;N;;;;;
+0C0B;TELUGU LETTER VOCALIC R;Lo;0;L;;;;;N;;;;;
+0C0C;TELUGU LETTER VOCALIC L;Lo;0;L;;;;;N;;;;;
+0C0E;TELUGU LETTER E;Lo;0;L;;;;;N;;;;;
+0C0F;TELUGU LETTER EE;Lo;0;L;;;;;N;;;;;
+0C10;TELUGU LETTER AI;Lo;0;L;;;;;N;;;;;
+0C12;TELUGU LETTER O;Lo;0;L;;;;;N;;;;;
+0C13;TELUGU LETTER OO;Lo;0;L;;;;;N;;;;;
+0C14;TELUGU LETTER AU;Lo;0;L;;;;;N;;;;;
+0C15;TELUGU LETTER KA;Lo;0;L;;;;;N;;;;;
+0C16;TELUGU LETTER KHA;Lo;0;L;;;;;N;;;;;
+0C17;TELUGU LETTER GA;Lo;0;L;;;;;N;;;;;
+0C18;TELUGU LETTER GHA;Lo;0;L;;;;;N;;;;;
+0C19;TELUGU LETTER NGA;Lo;0;L;;;;;N;;;;;
+0C1A;TELUGU LETTER CA;Lo;0;L;;;;;N;;;;;
+0C1B;TELUGU LETTER CHA;Lo;0;L;;;;;N;;;;;
+0C1C;TELUGU LETTER JA;Lo;0;L;;;;;N;;;;;
+0C1D;TELUGU LETTER JHA;Lo;0;L;;;;;N;;;;;
+0C1E;TELUGU LETTER NYA;Lo;0;L;;;;;N;;;;;
+0C1F;TELUGU LETTER TTA;Lo;0;L;;;;;N;;;;;
+0C20;TELUGU LETTER TTHA;Lo;0;L;;;;;N;;;;;
+0C21;TELUGU LETTER DDA;Lo;0;L;;;;;N;;;;;
+0C22;TELUGU LETTER DDHA;Lo;0;L;;;;;N;;;;;
+0C23;TELUGU LETTER NNA;Lo;0;L;;;;;N;;;;;
+0C24;TELUGU LETTER TA;Lo;0;L;;;;;N;;;;;
+0C25;TELUGU LETTER THA;Lo;0;L;;;;;N;;;;;
+0C26;TELUGU LETTER DA;Lo;0;L;;;;;N;;;;;
+0C27;TELUGU LETTER DHA;Lo;0;L;;;;;N;;;;;
+0C28;TELUGU LETTER NA;Lo;0;L;;;;;N;;;;;
+0C2A;TELUGU LETTER PA;Lo;0;L;;;;;N;;;;;
+0C2B;TELUGU LETTER PHA;Lo;0;L;;;;;N;;;;;
+0C2C;TELUGU LETTER BA;Lo;0;L;;;;;N;;;;;
+0C2D;TELUGU LETTER BHA;Lo;0;L;;;;;N;;;;;
+0C2E;TELUGU LETTER MA;Lo;0;L;;;;;N;;;;;
+0C2F;TELUGU LETTER YA;Lo;0;L;;;;;N;;;;;
+0C30;TELUGU LETTER RA;Lo;0;L;;;;;N;;;;;
+0C31;TELUGU LETTER RRA;Lo;0;L;;;;;N;;;;;
+0C32;TELUGU LETTER LA;Lo;0;L;;;;;N;;;;;
+0C33;TELUGU LETTER LLA;Lo;0;L;;;;;N;;;;;
+0C35;TELUGU LETTER VA;Lo;0;L;;;;;N;;;;;
+0C36;TELUGU LETTER SHA;Lo;0;L;;;;;N;;;;;
+0C37;TELUGU LETTER SSA;Lo;0;L;;;;;N;;;;;
+0C38;TELUGU LETTER SA;Lo;0;L;;;;;N;;;;;
+0C39;TELUGU LETTER HA;Lo;0;L;;;;;N;;;;;
+0C3E;TELUGU VOWEL SIGN AA;Mn;81;L;;;;;N;;;;;
+0C3F;TELUGU VOWEL SIGN I;Mn;82;L;;;;;N;;;;;
+0C40;TELUGU VOWEL SIGN II;Mn;83;L;;;;;N;;;;;
+0C41;TELUGU VOWEL SIGN U;Mc;0;L;;;;;N;;;;;
+0C42;TELUGU VOWEL SIGN UU;Mc;0;L;;;;;N;;;;;
+0C43;TELUGU VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;;
+0C44;TELUGU VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;;
+0C46;TELUGU VOWEL SIGN E;Mn;84;L;;;;;N;;;;;
+0C47;TELUGU VOWEL SIGN EE;Mn;85;L;;;;;N;;;;;
+0C48;TELUGU VOWEL SIGN AI;Mn;86;L;0C46 0C56;;;;N;;;;;
+0C4A;TELUGU VOWEL SIGN O;Mn;87;L;;;;;N;;;;;
+0C4B;TELUGU VOWEL SIGN OO;Mn;88;L;;;;;N;;;;;
+0C4C;TELUGU VOWEL SIGN AU;Mn;89;L;;;;;N;;;;;
+0C4D;TELUGU SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+0C55;TELUGU LENGTH MARK;Mn;90;L;;;;;N;;;;;
+0C56;TELUGU AI LENGTH MARK;Mn;91;L;;;;;N;;;;;
+0C60;TELUGU LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
+0C61;TELUGU LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
+0C66;TELUGU DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0C67;TELUGU DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0C68;TELUGU DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0C69;TELUGU DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0C6A;TELUGU DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0C6B;TELUGU DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0C6C;TELUGU DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0C6D;TELUGU DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0C6E;TELUGU DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0C6F;TELUGU DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0C82;KANNADA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
+0C83;KANNADA SIGN VISARGA;Mc;0;L;;;;;N;;;;;
+0C85;KANNADA LETTER A;Lo;0;L;;;;;N;;;;;
+0C86;KANNADA LETTER AA;Lo;0;L;;;;;N;;;;;
+0C87;KANNADA LETTER I;Lo;0;L;;;;;N;;;;;
+0C88;KANNADA LETTER II;Lo;0;L;;;;;N;;;;;
+0C89;KANNADA LETTER U;Lo;0;L;;;;;N;;;;;
+0C8A;KANNADA LETTER UU;Lo;0;L;;;;;N;;;;;
+0C8B;KANNADA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;;
+0C8C;KANNADA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;;
+0C8E;KANNADA LETTER E;Lo;0;L;;;;;N;;;;;
+0C8F;KANNADA LETTER EE;Lo;0;L;;;;;N;;;;;
+0C90;KANNADA LETTER AI;Lo;0;L;;;;;N;;;;;
+0C92;KANNADA LETTER O;Lo;0;L;;;;;N;;;;;
+0C93;KANNADA LETTER OO;Lo;0;L;;;;;N;;;;;
+0C94;KANNADA LETTER AU;Lo;0;L;;;;;N;;;;;
+0C95;KANNADA LETTER KA;Lo;0;L;;;;;N;;;;;
+0C96;KANNADA LETTER KHA;Lo;0;L;;;;;N;;;;;
+0C97;KANNADA LETTER GA;Lo;0;L;;;;;N;;;;;
+0C98;KANNADA LETTER GHA;Lo;0;L;;;;;N;;;;;
+0C99;KANNADA LETTER NGA;Lo;0;L;;;;;N;;;;;
+0C9A;KANNADA LETTER CA;Lo;0;L;;;;;N;;;;;
+0C9B;KANNADA LETTER CHA;Lo;0;L;;;;;N;;;;;
+0C9C;KANNADA LETTER JA;Lo;0;L;;;;;N;;;;;
+0C9D;KANNADA LETTER JHA;Lo;0;L;;;;;N;;;;;
+0C9E;KANNADA LETTER NYA;Lo;0;L;;;;;N;;;;;
+0C9F;KANNADA LETTER TTA;Lo;0;L;;;;;N;;;;;
+0CA0;KANNADA LETTER TTHA;Lo;0;L;;;;;N;;;;;
+0CA1;KANNADA LETTER DDA;Lo;0;L;;;;;N;;;;;
+0CA2;KANNADA LETTER DDHA;Lo;0;L;;;;;N;;;;;
+0CA3;KANNADA LETTER NNA;Lo;0;L;;;;;N;;;;;
+0CA4;KANNADA LETTER TA;Lo;0;L;;;;;N;;;;;
+0CA5;KANNADA LETTER THA;Lo;0;L;;;;;N;;;;;
+0CA6;KANNADA LETTER DA;Lo;0;L;;;;;N;;;;;
+0CA7;KANNADA LETTER DHA;Lo;0;L;;;;;N;;;;;
+0CA8;KANNADA LETTER NA;Lo;0;L;;;;;N;;;;;
+0CAA;KANNADA LETTER PA;Lo;0;L;;;;;N;;;;;
+0CAB;KANNADA LETTER PHA;Lo;0;L;;;;;N;;;;;
+0CAC;KANNADA LETTER BA;Lo;0;L;;;;;N;;;;;
+0CAD;KANNADA LETTER BHA;Lo;0;L;;;;;N;;;;;
+0CAE;KANNADA LETTER MA;Lo;0;L;;;;;N;;;;;
+0CAF;KANNADA LETTER YA;Lo;0;L;;;;;N;;;;;
+0CB0;KANNADA LETTER RA;Lo;0;L;;;;;N;;;;;
+0CB1;KANNADA LETTER RRA;Lo;0;L;;;;;N;;;;;
+0CB2;KANNADA LETTER LA;Lo;0;L;;;;;N;;;;;
+0CB3;KANNADA LETTER LLA;Lo;0;L;;;;;N;;;;;
+0CB5;KANNADA LETTER VA;Lo;0;L;;;;;N;;;;;
+0CB6;KANNADA LETTER SHA;Lo;0;L;;;;;N;;;;;
+0CB7;KANNADA LETTER SSA;Lo;0;L;;;;;N;;;;;
+0CB8;KANNADA LETTER SA;Lo;0;L;;;;;N;;;;;
+0CB9;KANNADA LETTER HA;Lo;0;L;;;;;N;;;;;
+0CBE;KANNADA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+0CBF;KANNADA VOWEL SIGN I;Mn;92;L;;;;;N;;;;;
+0CC0;KANNADA VOWEL SIGN II;Mc;0;L;0CBF 0CD5;;;;N;;;;;
+0CC1;KANNADA VOWEL SIGN U;Mc;0;L;;;;;N;;;;;
+0CC2;KANNADA VOWEL SIGN UU;Mc;0;L;;;;;N;;;;;
+0CC3;KANNADA VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;;
+0CC4;KANNADA VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;;
+0CC6;KANNADA VOWEL SIGN E;Mn;93;L;;;;;N;;;;;
+0CC7;KANNADA VOWEL SIGN EE;Mc;0;L;0CC6 0CD5;;;;N;;;;;
+0CC8;KANNADA VOWEL SIGN AI;Mc;0;L;0CC6 0CD6;;;;N;;;;;
+0CCA;KANNADA VOWEL SIGN O;Mc;0;L;0CC6 0CC2;;;;N;;;;;
+0CCB;KANNADA VOWEL SIGN OO;Mc;0;L;0CC6 0CC2 0CD5;;;;N;;;;;
+0CCC;KANNADA VOWEL SIGN AU;Mn;94;L;;;;;N;;;;;
+0CCD;KANNADA SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+0CD5;KANNADA LENGTH MARK;Mc;0;L;;;;;N;;;;;
+0CD6;KANNADA AI LENGTH MARK;Mc;0;L;;;;;N;;;;;
+0CDE;KANNADA LETTER FA;Lo;0;L;;;;;N;;;;;
+0CE0;KANNADA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
+0CE1;KANNADA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
+0CE6;KANNADA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0CE7;KANNADA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0CE8;KANNADA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0CE9;KANNADA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0CEA;KANNADA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0CEB;KANNADA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0CEC;KANNADA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0CED;KANNADA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0CEE;KANNADA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0CEF;KANNADA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0D02;MALAYALAM SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
+0D03;MALAYALAM SIGN VISARGA;Mc;0;L;;;;;N;;;;;
+0D05;MALAYALAM LETTER A;Lo;0;L;;;;;N;;;;;
+0D06;MALAYALAM LETTER AA;Lo;0;L;;;;;N;;;;;
+0D07;MALAYALAM LETTER I;Lo;0;L;;;;;N;;;;;
+0D08;MALAYALAM LETTER II;Lo;0;L;;;;;N;;;;;
+0D09;MALAYALAM LETTER U;Lo;0;L;;;;;N;;;;;
+0D0A;MALAYALAM LETTER UU;Lo;0;L;;;;;N;;;;;
+0D0B;MALAYALAM LETTER VOCALIC R;Lo;0;L;;;;;N;;;;;
+0D0C;MALAYALAM LETTER VOCALIC L;Lo;0;L;;;;;N;;;;;
+0D0E;MALAYALAM LETTER E;Lo;0;L;;;;;N;;;;;
+0D0F;MALAYALAM LETTER EE;Lo;0;L;;;;;N;;;;;
+0D10;MALAYALAM LETTER AI;Lo;0;L;;;;;N;;;;;
+0D12;MALAYALAM LETTER O;Lo;0;L;;;;;N;;;;;
+0D13;MALAYALAM LETTER OO;Lo;0;L;;;;;N;;;;;
+0D14;MALAYALAM LETTER AU;Lo;0;L;;;;;N;;;;;
+0D15;MALAYALAM LETTER KA;Lo;0;L;;;;;N;;;;;
+0D16;MALAYALAM LETTER KHA;Lo;0;L;;;;;N;;;;;
+0D17;MALAYALAM LETTER GA;Lo;0;L;;;;;N;;;;;
+0D18;MALAYALAM LETTER GHA;Lo;0;L;;;;;N;;;;;
+0D19;MALAYALAM LETTER NGA;Lo;0;L;;;;;N;;;;;
+0D1A;MALAYALAM LETTER CA;Lo;0;L;;;;;N;;;;;
+0D1B;MALAYALAM LETTER CHA;Lo;0;L;;;;;N;;;;;
+0D1C;MALAYALAM LETTER JA;Lo;0;L;;;;;N;;;;;
+0D1D;MALAYALAM LETTER JHA;Lo;0;L;;;;;N;;;;;
+0D1E;MALAYALAM LETTER NYA;Lo;0;L;;;;;N;;;;;
+0D1F;MALAYALAM LETTER TTA;Lo;0;L;;;;;N;;;;;
+0D20;MALAYALAM LETTER TTHA;Lo;0;L;;;;;N;;;;;
+0D21;MALAYALAM LETTER DDA;Lo;0;L;;;;;N;;;;;
+0D22;MALAYALAM LETTER DDHA;Lo;0;L;;;;;N;;;;;
+0D23;MALAYALAM LETTER NNA;Lo;0;L;;;;;N;;;;;
+0D24;MALAYALAM LETTER TA;Lo;0;L;;;;;N;;;;;
+0D25;MALAYALAM LETTER THA;Lo;0;L;;;;;N;;;;;
+0D26;MALAYALAM LETTER DA;Lo;0;L;;;;;N;;;;;
+0D27;MALAYALAM LETTER DHA;Lo;0;L;;;;;N;;;;;
+0D28;MALAYALAM LETTER NA;Lo;0;L;;;;;N;;;;;
+0D2A;MALAYALAM LETTER PA;Lo;0;L;;;;;N;;;;;
+0D2B;MALAYALAM LETTER PHA;Lo;0;L;;;;;N;;;;;
+0D2C;MALAYALAM LETTER BA;Lo;0;L;;;;;N;;;;;
+0D2D;MALAYALAM LETTER BHA;Lo;0;L;;;;;N;;;;;
+0D2E;MALAYALAM LETTER MA;Lo;0;L;;;;;N;;;;;
+0D2F;MALAYALAM LETTER YA;Lo;0;L;;;;;N;;;;;
+0D30;MALAYALAM LETTER RA;Lo;0;L;;;;;N;;;;;
+0D31;MALAYALAM LETTER RRA;Lo;0;L;;;;;N;;;;;
+0D32;MALAYALAM LETTER LA;Lo;0;L;;;;;N;;;;;
+0D33;MALAYALAM LETTER LLA;Lo;0;L;;;;;N;;;;;
+0D34;MALAYALAM LETTER LLLA;Lo;0;L;;;;;N;;;;;
+0D35;MALAYALAM LETTER VA;Lo;0;L;;;;;N;;;;;
+0D36;MALAYALAM LETTER SHA;Lo;0;L;;;;;N;;;;;
+0D37;MALAYALAM LETTER SSA;Lo;0;L;;;;;N;;;;;
+0D38;MALAYALAM LETTER SA;Lo;0;L;;;;;N;;;;;
+0D39;MALAYALAM LETTER HA;Lo;0;L;;;;;N;;;;;
+0D3E;MALAYALAM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+0D3F;MALAYALAM VOWEL SIGN I;Mc;0;L;;;;;N;;;;;
+0D40;MALAYALAM VOWEL SIGN II;Mc;0;L;;;;;N;;;;;
+0D41;MALAYALAM VOWEL SIGN U;Mn;95;L;;;;;N;;;;;
+0D42;MALAYALAM VOWEL SIGN UU;Mn;96;L;;;;;N;;;;;
+0D43;MALAYALAM VOWEL SIGN VOCALIC R;Mn;97;L;;;;;N;;;;;
+0D46;MALAYALAM VOWEL SIGN E;Mc;0;L;;;;;N;;;;;
+0D47;MALAYALAM VOWEL SIGN EE;Mc;0;L;;;;;N;;;;;
+0D48;MALAYALAM VOWEL SIGN AI;Mc;0;L;;;;;N;;;;;
+0D4A;MALAYALAM VOWEL SIGN O;Mc;0;L;0D46 0D3E;;;;N;;;;;
+0D4B;MALAYALAM VOWEL SIGN OO;Mc;0;L;0D47 0D3E;;;;N;;;;;
+0D4C;MALAYALAM VOWEL SIGN AU;Mc;0;L;0D46 0D57;;;;N;;;;;
+0D4D;MALAYALAM SIGN VIRAMA;Mn;9;L;;;;;N;;;;;
+0D57;MALAYALAM AU LENGTH MARK;Mc;0;L;;;;;N;;;;;
+0D60;MALAYALAM LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
+0D61;MALAYALAM LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
+0D66;MALAYALAM DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0D67;MALAYALAM DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0D68;MALAYALAM DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0D69;MALAYALAM DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0D6A;MALAYALAM DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0D6B;MALAYALAM DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0D6C;MALAYALAM DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0D6D;MALAYALAM DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0D6E;MALAYALAM DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0D6F;MALAYALAM DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0E01;THAI CHARACTER KO KAI;Lo;0;L;;;;;N;THAI LETTER KO KAI;;;;
+0E02;THAI CHARACTER KHO KHAI;Lo;0;L;;;;;N;THAI LETTER KHO KHAI;;;;
+0E03;THAI CHARACTER KHO KHUAT;Lo;0;L;;;;;N;THAI LETTER KHO KHUAT;;;;
+0E04;THAI CHARACTER KHO KHWAI;Lo;0;L;;;;;N;THAI LETTER KHO KHWAI;;;;
+0E05;THAI CHARACTER KHO KHON;Lo;0;L;;;;;N;THAI LETTER KHO KHON;;;;
+0E06;THAI CHARACTER KHO RAKHANG;Lo;0;L;;;;;N;THAI LETTER KHO RAKHANG;;;;
+0E07;THAI CHARACTER NGO NGU;Lo;0;L;;;;;N;THAI LETTER NGO NGU;;;;
+0E08;THAI CHARACTER CHO CHAN;Lo;0;L;;;;;N;THAI LETTER CHO CHAN;;;;
+0E09;THAI CHARACTER CHO CHING;Lo;0;L;;;;;N;THAI LETTER CHO CHING;;;;
+0E0A;THAI CHARACTER CHO CHANG;Lo;0;L;;;;;N;THAI LETTER CHO CHANG;;;;
+0E0B;THAI CHARACTER SO SO;Lo;0;L;;;;;N;THAI LETTER SO SO;;;;
+0E0C;THAI CHARACTER CHO CHOE;Lo;0;L;;;;;N;THAI LETTER CHO CHOE;;;;
+0E0D;THAI CHARACTER YO YING;Lo;0;L;;;;;N;THAI LETTER YO YING;;;;
+0E0E;THAI CHARACTER DO CHADA;Lo;0;L;;;;;N;THAI LETTER DO CHADA;;;;
+0E0F;THAI CHARACTER TO PATAK;Lo;0;L;;;;;N;THAI LETTER TO PATAK;;;;
+0E10;THAI CHARACTER THO THAN;Lo;0;L;;;;;N;THAI LETTER THO THAN;;;;
+0E11;THAI CHARACTER THO NANGMONTHO;Lo;0;L;;;;;N;THAI LETTER THO NANGMONTHO;;;;
+0E12;THAI CHARACTER THO PHUTHAO;Lo;0;L;;;;;N;THAI LETTER THO PHUTHAO;;;;
+0E13;THAI CHARACTER NO NEN;Lo;0;L;;;;;N;THAI LETTER NO NEN;;;;
+0E14;THAI CHARACTER DO DEK;Lo;0;L;;;;;N;THAI LETTER DO DEK;;;;
+0E15;THAI CHARACTER TO TAO;Lo;0;L;;;;;N;THAI LETTER TO TAO;;;;
+0E16;THAI CHARACTER THO THUNG;Lo;0;L;;;;;N;THAI LETTER THO THUNG;;;;
+0E17;THAI CHARACTER THO THAHAN;Lo;0;L;;;;;N;THAI LETTER THO THAHAN;;;;
+0E18;THAI CHARACTER THO THONG;Lo;0;L;;;;;N;THAI LETTER THO THONG;;;;
+0E19;THAI CHARACTER NO NU;Lo;0;L;;;;;N;THAI LETTER NO NU;;;;
+0E1A;THAI CHARACTER BO BAIMAI;Lo;0;L;;;;;N;THAI LETTER BO BAIMAI;;;;
+0E1B;THAI CHARACTER PO PLA;Lo;0;L;;;;;N;THAI LETTER PO PLA;;;;
+0E1C;THAI CHARACTER PHO PHUNG;Lo;0;L;;;;;N;THAI LETTER PHO PHUNG;;;;
+0E1D;THAI CHARACTER FO FA;Lo;0;L;;;;;N;THAI LETTER FO FA;;;;
+0E1E;THAI CHARACTER PHO PHAN;Lo;0;L;;;;;N;THAI LETTER PHO PHAN;;;;
+0E1F;THAI CHARACTER FO FAN;Lo;0;L;;;;;N;THAI LETTER FO FAN;;;;
+0E20;THAI CHARACTER PHO SAMPHAO;Lo;0;L;;;;;N;THAI LETTER PHO SAMPHAO;;;;
+0E21;THAI CHARACTER MO MA;Lo;0;L;;;;;N;THAI LETTER MO MA;;;;
+0E22;THAI CHARACTER YO YAK;Lo;0;L;;;;;N;THAI LETTER YO YAK;;;;
+0E23;THAI CHARACTER RO RUA;Lo;0;L;;;;;N;THAI LETTER RO RUA;;;;
+0E24;THAI CHARACTER RU;Lo;0;L;;;;;N;THAI LETTER RU;;;;
+0E25;THAI CHARACTER LO LING;Lo;0;L;;;;;N;THAI LETTER LO LING;;;;
+0E26;THAI CHARACTER LU;Lo;0;L;;;;;N;THAI LETTER LU;;;;
+0E27;THAI CHARACTER WO WAEN;Lo;0;L;;;;;N;THAI LETTER WO WAEN;;;;
+0E28;THAI CHARACTER SO SALA;Lo;0;L;;;;;N;THAI LETTER SO SALA;;;;
+0E29;THAI CHARACTER SO RUSI;Lo;0;L;;;;;N;THAI LETTER SO RUSI;;;;
+0E2A;THAI CHARACTER SO SUA;Lo;0;L;;;;;N;THAI LETTER SO SUA;;;;
+0E2B;THAI CHARACTER HO HIP;Lo;0;L;;;;;N;THAI LETTER HO HIP;;;;
+0E2C;THAI CHARACTER LO CHULA;Lo;0;L;;;;;N;THAI LETTER LO CHULA;;;;
+0E2D;THAI CHARACTER O ANG;Lo;0;L;;;;;N;THAI LETTER O ANG;;;;
+0E2E;THAI CHARACTER HO NOKHUK;Lo;0;L;;;;;N;THAI LETTER HO NOK HUK;;;;
+0E2F;THAI CHARACTER PAIYANNOI;Lo;0;L;;;;;N;THAI PAI YAN NOI;;;;
+0E30;THAI CHARACTER SARA A;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA A;;;;
+0E31;THAI CHARACTER MAI HAN-AKAT;Mn;98;L;;;;;N;THAI VOWEL SIGN MAI HAN-AKAT;;;;
+0E32;THAI CHARACTER SARA AA;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA AA;;;;
+0E33;THAI CHARACTER SARA AM;Lo;0;L;0E4D 0E32;;;;N;THAI VOWEL SIGN SARA AM;;;;
+0E34;THAI CHARACTER SARA I;Mn;99;L;;;;;N;THAI VOWEL SIGN SARA I;;;;
+0E35;THAI CHARACTER SARA II;Mn;100;L;;;;;N;THAI VOWEL SIGN SARA II;;;;
+0E36;THAI CHARACTER SARA UE;Mn;101;L;;;;;N;THAI VOWEL SIGN SARA UE;;;;
+0E37;THAI CHARACTER SARA UEE;Mn;102;L;;;;;N;THAI VOWEL SIGN SARA UEE;;;;
+0E38;THAI CHARACTER SARA U;Mn;103;L;;;;;N;THAI VOWEL SIGN SARA U;;;;
+0E39;THAI CHARACTER SARA UU;Mn;104;L;;;;;N;THAI VOWEL SIGN SARA UU;;;;
+0E3A;THAI CHARACTER PHINTHU;Mn;105;L;;;;;N;THAI VOWEL SIGN PHINTHU;;;;
+0E3F;THAI CURRENCY SYMBOL BAHT;Sc;0;L;;;;;N;THAI BAHT SIGN;;;;
+0E40;THAI CHARACTER SARA E;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA E;;;;
+0E41;THAI CHARACTER SARA AE;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA AE;;;;
+0E42;THAI CHARACTER SARA O;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA O;;;;
+0E43;THAI CHARACTER SARA AI MAIMUAN;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA MAI MUAN;;;;
+0E44;THAI CHARACTER SARA AI MAIMALAI;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA MAI MALAI;;;;
+0E45;THAI CHARACTER LAKKHANGYAO;Lo;0;L;;;;;N;THAI LAK KHANG YAO;;;;
+0E46;THAI CHARACTER MAIYAMOK;Lo;0;L;;;;;N;THAI MAI YAMOK;;;;
+0E47;THAI CHARACTER MAITAIKHU;Mn;106;L;;;;;N;THAI VOWEL SIGN MAI TAI KHU;;;;
+0E48;THAI CHARACTER MAI EK;Mn;107;L;;;;;N;THAI TONE MAI EK;;;;
+0E49;THAI CHARACTER MAI THO;Mn;108;L;;;;;N;THAI TONE MAI THO;;;;
+0E4A;THAI CHARACTER MAI TRI;Mn;109;L;;;;;N;THAI TONE MAI TRI;;;;
+0E4B;THAI CHARACTER MAI CHATTAWA;Mn;110;L;;;;;N;THAI TONE MAI CHATTAWA;;;;
+0E4C;THAI CHARACTER THANTHAKHAT;Mn;111;L;;;;;N;THAI THANTHAKHAT;;;;
+0E4D;THAI CHARACTER NIKHAHIT;Mn;112;L;;;;;N;THAI NIKKHAHIT;;;;
+0E4E;THAI CHARACTER YAMAKKAN;Mn;128;L;;;;;N;THAI YAMAKKAN;;;;
+0E4F;THAI CHARACTER FONGMAN;Lo;0;L;;;;;N;THAI FONGMAN;;;;
+0E50;THAI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0E51;THAI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0E52;THAI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0E53;THAI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0E54;THAI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0E55;THAI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0E56;THAI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0E57;THAI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0E58;THAI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0E59;THAI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0E5A;THAI CHARACTER ANGKHANKHU;Lo;0;L;;;;;N;THAI ANGKHANKHU;;;;
+0E5B;THAI CHARACTER KHOMUT;Lo;0;L;;;;;N;THAI KHOMUT;;;;
+0E81;LAO LETTER KO;Lo;0;L;;;;;N;;;;;
+0E82;LAO LETTER KHO SUNG;Lo;0;L;;;;;N;;;;;
+0E84;LAO LETTER KHO TAM;Lo;0;L;;;;;N;;;;;
+0E87;LAO LETTER NGO;Lo;0;L;;;;;N;;;;;
+0E88;LAO LETTER CO;Lo;0;L;;;;;N;;;;;
+0E8A;LAO LETTER SO TAM;Lo;0;L;;;;;N;;;;;
+0E8D;LAO LETTER NYO;Lo;0;L;;;;;N;;;;;
+0E94;LAO LETTER DO;Lo;0;L;;;;;N;;;;;
+0E95;LAO LETTER TO;Lo;0;L;;;;;N;;;;;
+0E96;LAO LETTER THO SUNG;Lo;0;L;;;;;N;;;;;
+0E97;LAO LETTER THO TAM;Lo;0;L;;;;;N;;;;;
+0E99;LAO LETTER NO;Lo;0;L;;;;;N;;;;;
+0E9A;LAO LETTER BO;Lo;0;L;;;;;N;;;;;
+0E9B;LAO LETTER PO;Lo;0;L;;;;;N;;;;;
+0E9C;LAO LETTER PHO SUNG;Lo;0;L;;;;;N;;;;;
+0E9D;LAO LETTER FO TAM;Lo;0;L;;;;;N;;;;;
+0E9E;LAO LETTER PHO TAM;Lo;0;L;;;;;N;;;;;
+0E9F;LAO LETTER FO SUNG;Lo;0;L;;;;;N;;;;;
+0EA1;LAO LETTER MO;Lo;0;L;;;;;N;;;;;
+0EA2;LAO LETTER YO;Lo;0;L;;;;;N;;;;;
+0EA3;LAO LETTER LO LING;Lo;0;L;;;;;N;;;;;
+0EA5;LAO LETTER LO LOOT;Lo;0;L;;;;;N;;;;;
+0EA7;LAO LETTER WO;Lo;0;L;;;;;N;;;;;
+0EAA;LAO LETTER SO SUNG;Lo;0;L;;;;;N;;;;;
+0EAB;LAO LETTER HO SUNG;Lo;0;L;;;;;N;;;;;
+0EAD;LAO LETTER O;Lo;0;L;;;;;N;;;;;
+0EAE;LAO LETTER HO TAM;Lo;0;L;;;;;N;;;;;
+0EAF;LAO ELLIPSIS;Po;0;L;;;;;N;;;;;
+0EB0;LAO VOWEL SIGN A;Lo;0;L;;;;;N;;;;;
+0EB1;LAO VOWEL SIGN MAI KAN;Mn;113;L;;;;;N;;;;;
+0EB2;LAO VOWEL SIGN AA;Lo;0;L;;;;;N;;;;;
+0EB3;LAO VOWEL SIGN AM;Lo;0;L;0ECD 0EB2;;;;N;;;;;
+0EB4;LAO VOWEL SIGN I;Mn;114;L;;;;;N;;;;;
+0EB5;LAO VOWEL SIGN II;Mn;115;L;;;;;N;;;;;
+0EB6;LAO VOWEL SIGN Y;Mn;116;L;;;;;N;;;;;
+0EB7;LAO VOWEL SIGN YY;Mn;117;L;;;;;N;;;;;
+0EB8;LAO VOWEL SIGN U;Mn;118;L;;;;;N;;;;;
+0EB9;LAO VOWEL SIGN UU;Mn;119;L;;;;;N;;;;;
+0EBB;LAO VOWEL SIGN MAI KON;Mn;120;L;;;;;N;;;;;
+0EBC;LAO SEMIVOWEL SIGN LO;Mn;121;L;;;;;N;;;;;
+0EBD;LAO SEMIVOWEL SIGN NYO;Lo;0;L;;;;;N;;;;;
+0EC0;LAO VOWEL SIGN E;Lo;0;L;;;;;N;;;;;
+0EC1;LAO VOWEL SIGN EI;Lo;0;L;;;;;N;;;;;
+0EC2;LAO VOWEL SIGN O;Lo;0;L;;;;;N;;;;;
+0EC3;LAO VOWEL SIGN AY;Lo;0;L;;;;;N;;;;;
+0EC4;LAO VOWEL SIGN AI;Lo;0;L;;;;;N;;;;;
+0EC6;LAO KO LA;So;0;L;;;;;N;;;;;
+0EC8;LAO TONE MAI EK;Mn;122;L;;;;;N;;;;;
+0EC9;LAO TONE MAI THO;Mn;123;L;;;;;N;;;;;
+0ECA;LAO TONE MAI TI;Mn;124;L;;;;;N;;;;;
+0ECB;LAO TONE MAI CATAWA;Mn;125;L;;;;;N;;;;;
+0ECC;LAO CANCELLATION MARK;Mn;126;L;;;;;N;;;;;
+0ECD;LAO NIGGAHITA;Mn;127;L;;;;;N;;;;;
+0ED0;LAO DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0ED1;LAO DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0ED2;LAO DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0ED3;LAO DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0ED4;LAO DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0ED5;LAO DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0ED6;LAO DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0ED7;LAO DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0ED8;LAO DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0ED9;LAO DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0EDC;LAO HO NO;Lo;0;L;<compat> 0EAB 0E99;;;;N;;;;;
+0EDD;LAO HO MO;Lo;0;L;<compat> 0EAB 0EA1;;;;N;;;;;
+0F00;TIBETAN SYLLABLE OM;So;0;L;;;;;N;;;;;
+0F01;TIBETAN MARK GTER YIG MGO TRUNCATED A;So;0;L;;;;;N;;ter yik go a thung;;;
+0F02;TIBETAN MARK GTER YIG MGO -UM RNAM BCAD MA;So;0;L;;;;;N;;ter yik go wum nam chey ma;;;
+0F03;TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA;So;0;L;;;;;N;;ter yik go wum ter tsek ma;;;
+0F04;TIBETAN MARK INITIAL YIG MGO MDUN MA;Po;0;L;;;;;N;;yik go dun ma;;;
+0F05;TIBETAN MARK CLOSING YIG MGO SGAB MA;Po;0;L;;;;;N;;yik go kab ma;;;
+0F06;TIBETAN MARK CARET YIG MGO PHUR SHAD MA;Po;0;L;;;;;N;;yik go pur shey ma;;;
+0F07;TIBETAN MARK YIG MGO TSHEG SHAD MA;Po;0;L;;;;;N;;yik go tsek shey ma;;;
+0F08;TIBETAN MARK SBRUL SHAD;Po;0;L;;;;;N;;drul shey;;;
+0F09;TIBETAN MARK BSKUR YIG MGO;Po;0;L;;;;;N;;kur yik go;;;
+0F0A;TIBETAN MARK BKA- SHOG YIG MGO;Po;0;L;;;;;N;;ka sho yik go;;;
+0F0B;TIBETAN MARK INTERSYLLABIC TSHEG;Po;0;L;;;;;N;;tsek;;;
+0F0C;TIBETAN MARK DELIMITER TSHEG BSTAR;Po;0;L;;;;;N;;tsek tar;;;
+0F0D;TIBETAN MARK SHAD;Po;0;L;;;;;N;;shey;;;
+0F0E;TIBETAN MARK NYIS SHAD;Po;0;L;;;;;N;;nyi shey;;;
+0F0F;TIBETAN MARK TSHEG SHAD;Po;0;L;;;;;N;;tsek shey;;;
+0F10;TIBETAN MARK NYIS TSHEG SHAD;Po;0;L;;;;;N;;nyi tsek shey;;;
+0F11;TIBETAN MARK RIN CHEN SPUNGS SHAD;Po;0;L;;;;;N;;rinchen pung shey;;;
+0F12;TIBETAN MARK RGYA GRAM SHAD;Po;0;L;;;;;N;;gya tram shey;;;
+0F13;TIBETAN MARK CARET -DZUD RTAGS ME LONG CAN;So;0;L;;;;;N;;dzu ta me long chen;;;
+0F14;TIBETAN MARK GTER TSHEG;So;0;L;;;;;N;;ter tsek;;;
+0F15;TIBETAN LOGOTYPE SIGN CHAD RTAGS;So;0;L;;;;;N;;che ta;;;
+0F16;TIBETAN LOGOTYPE SIGN LHAG RTAGS;So;0;L;;;;;N;;hlak ta;;;
+0F17;TIBETAN ASTROLOGICAL SIGN SGRA GCAN -CHAR RTAGS;So;0;L;;;;;N;;trachen char ta;;;
+0F18;TIBETAN ASTROLOGICAL SIGN -KHYUD PA;Lo;220;L;;;;;N;;kyu pa;;;
+0F19;TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS;Lo;220;L;;;;;N;;dong tsu;;;
+0F1A;TIBETAN SIGN RDEL DKAR GCIG;So;0;L;;;;;N;;deka chig;;;
+0F1B;TIBETAN SIGN RDEL DKAR GNYIS;So;0;L;;;;;N;;deka nyi;;;
+0F1C;TIBETAN SIGN RDEL DKAR GSUM;So;0;L;;;;;N;;deka sum;;;
+0F1D;TIBETAN SIGN RDEL NAG GCIG;So;0;L;;;;;N;;dena chig;;;
+0F1E;TIBETAN SIGN RDEL NAG GNYIS;So;0;L;;;;;N;;dena nyi;;;
+0F1F;TIBETAN SIGN RDEL DKAR RDEL NAG;So;0;L;;;;;N;;deka dena;;;
+0F20;TIBETAN DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+0F21;TIBETAN DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+0F22;TIBETAN DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+0F23;TIBETAN DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+0F24;TIBETAN DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+0F25;TIBETAN DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+0F26;TIBETAN DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+0F27;TIBETAN DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+0F28;TIBETAN DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+0F29;TIBETAN DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+0F2A;TIBETAN DIGIT HALF ONE;No;0;L;;;;;N;;;;;
+0F2B;TIBETAN DIGIT HALF TWO;No;0;L;;;;;N;;;;;
+0F2C;TIBETAN DIGIT HALF THREE;No;0;L;;;;;N;;;;;
+0F2D;TIBETAN DIGIT HALF FOUR;No;0;L;;;;;N;;;;;
+0F2E;TIBETAN DIGIT HALF FIVE;No;0;L;;;;;N;;;;;
+0F2F;TIBETAN DIGIT HALF SIX;No;0;L;;;;;N;;;;;
+0F30;TIBETAN DIGIT HALF SEVEN;No;0;L;;;;;N;;;;;
+0F31;TIBETAN DIGIT HALF EIGHT;No;0;L;;;;;N;;;;;
+0F32;TIBETAN DIGIT HALF NINE;No;0;L;;;;;N;;;;;
+0F33;TIBETAN DIGIT HALF ZERO;No;0;L;;;;;N;;;;;
+0F34;TIBETAN MARK BSDUS RTAGS;So;0;L;;;;;N;;du ta;;;
+0F35;TIBETAN MARK NGAS BZUNG NYI ZLA;Mc;230;L;;;;;N;;nge zung nyi da;;;
+0F36;TIBETAN MARK CARET -DZUD RTAGS BZHI MIG CAN;So;0;L;;;;;N;;dzu ta shi mig chen;;;
+0F37;TIBETAN MARK NGAS BZUNG SGOR RTAGS;Mn;230;L;;;;;N;;nge zung gor ta;;;
+0F38;TIBETAN MARK CHE MGO;So;0;L;;;;;N;;che go;;;
+0F39;TIBETAN MARK TSA -PHRU;Mc;216;L;;;;;N;;tsa tru;;;
+0F3A;TIBETAN MARK GUG RTAGS GYON;Ps;0;L;;;;;N;;gug ta yun;;;
+0F3B;TIBETAN MARK GUG RTAGS GYAS;Pe;0;L;;;;;N;;gug ta ye;;;
+0F3C;TIBETAN MARK ANG KHANG GYON;Ps;0;L;;;;;N;;ang kang yun;;;
+0F3D;TIBETAN MARK ANG KHANG GYAS;Pe;0;L;;;;;N;;ang kang ye;;;
+0F3E;TIBETAN SIGN YAR TSHES;Mc;220;L;;;;;N;;yar tse;;;
+0F3F;TIBETAN SIGN MAR TSHES;Mc;220;L;;;;;N;;mar tse;;;
+0F40;TIBETAN LETTER KA;Lo;0;L;;;;;N;;;;;
+0F41;TIBETAN LETTER KHA;Lo;0;L;;;;;N;;;;;
+0F42;TIBETAN LETTER GA;Lo;0;L;;;;;N;;;;;
+0F43;TIBETAN LETTER GHA;Lo;0;L;0F42 0FB7;;;;N;;;;;
+0F44;TIBETAN LETTER NGA;Lo;0;L;;;;;N;;;;;
+0F45;TIBETAN LETTER CA;Lo;0;L;;;;;N;;;;;
+0F46;TIBETAN LETTER CHA;Lo;0;L;;;;;N;;;;;
+0F47;TIBETAN LETTER JA;Lo;0;L;;;;;N;;;;;
+0F49;TIBETAN LETTER NYA;Lo;0;L;;;;;N;;;;;
+0F4A;TIBETAN LETTER TTA;Lo;0;L;;;;;N;;;;;
+0F4B;TIBETAN LETTER TTHA;Lo;0;L;;;;;N;;;;;
+0F4C;TIBETAN LETTER DDA;Lo;0;L;;;;;N;;;;;
+0F4D;TIBETAN LETTER DDHA;Lo;0;L;0F4C 0FB7;;;;N;;;;;
+0F4E;TIBETAN LETTER NNA;Lo;0;L;;;;;N;;;;;
+0F4F;TIBETAN LETTER TA;Lo;0;L;;;;;N;;;;;
+0F50;TIBETAN LETTER THA;Lo;0;L;;;;;N;;;;;
+0F51;TIBETAN LETTER DA;Lo;0;L;;;;;N;;;;;
+0F52;TIBETAN LETTER DHA;Lo;0;L;0F51 0FB7;;;;N;;;;;
+0F53;TIBETAN LETTER NA;Lo;0;L;;;;;N;;;;;
+0F54;TIBETAN LETTER PA;Lo;0;L;;;;;N;;;;;
+0F55;TIBETAN LETTER PHA;Lo;0;L;;;;;N;;;;;
+0F56;TIBETAN LETTER BA;Lo;0;L;;;;;N;;;;;
+0F57;TIBETAN LETTER BHA;Lo;0;L;0F56 0FB7;;;;N;;;;;
+0F58;TIBETAN LETTER MA;Lo;0;L;;;;;N;;;;;
+0F59;TIBETAN LETTER TSA;Lo;0;L;;;;;N;;;;;
+0F5A;TIBETAN LETTER TSHA;Lo;0;L;;;;;N;;;;;
+0F5B;TIBETAN LETTER DZA;Lo;0;L;;;;;N;;;;;
+0F5C;TIBETAN LETTER DZHA;Lo;0;L;0F5B 0FB7;;;;N;;;;;
+0F5D;TIBETAN LETTER WA;Lo;0;L;;;;;N;;;;;
+0F5E;TIBETAN LETTER ZHA;Lo;0;L;;;;;N;;;;;
+0F5F;TIBETAN LETTER ZA;Lo;0;L;;;;;N;;;;;
+0F60;TIBETAN LETTER -A;Lo;0;L;;;;;N;;;;;
+0F61;TIBETAN LETTER YA;Lo;0;L;;;;;N;;;;;
+0F62;TIBETAN LETTER RA;Lo;0;L;;;;;N;;;;;
+0F63;TIBETAN LETTER LA;Lo;0;L;;;;;N;;;;;
+0F64;TIBETAN LETTER SHA;Lo;0;L;;;;;N;;;;;
+0F65;TIBETAN LETTER SSA;Lo;0;L;;;;;N;;;;;
+0F66;TIBETAN LETTER SA;Lo;0;L;;;;;N;;;;;
+0F67;TIBETAN LETTER HA;Lo;0;L;;;;;N;;;;;
+0F68;TIBETAN LETTER A;Lo;0;L;;;;;N;;;;;
+0F69;TIBETAN LETTER KSSA;Lo;0;L;0F40 0FB5;;;;N;;;;;
+0F71;TIBETAN VOWEL SIGN AA;Mn;129;L;;;;;N;;;;;
+0F72;TIBETAN VOWEL SIGN I;Mn;130;L;;;;;N;;;;;
+0F73;TIBETAN VOWEL SIGN II;Mn;131;L;0F71 0F72;;;;N;;;;;
+0F74;TIBETAN VOWEL SIGN U;Mn;132;L;;;;;N;;;;;
+0F75;TIBETAN VOWEL SIGN UU;Mn;133;L;0F74 0F71;;;;N;;;;;
+0F76;TIBETAN VOWEL SIGN VOCALIC R;Mn;134;L;0FB2 0F80;;;;N;;;;;
+0F77;TIBETAN VOWEL SIGN VOCALIC RR;Mn;135;L;0F76 0F71;;;;N;;;;;
+0F78;TIBETAN VOWEL SIGN VOCALIC L;Mn;136;L;0FB3 0F80;;;;N;;;;;
+0F79;TIBETAN VOWEL SIGN VOCALIC LL;Mn;137;L;0F78 0F71;;;;N;;;;;
+0F7A;TIBETAN VOWEL SIGN E;Mn;138;L;;;;;N;;;;;
+0F7B;TIBETAN VOWEL SIGN EE;Mn;139;L;;;;;N;;;;;
+0F7C;TIBETAN VOWEL SIGN O;Mn;140;L;;;;;N;;;;;
+0F7D;TIBETAN VOWEL SIGN OO;Mn;141;L;;;;;N;;;;;
+0F7E;TIBETAN SIGN RJES SU NGA RO;Mn;142;L;;;;;N;;je su nga ro;;;
+0F7F;TIBETAN SIGN RNAM BCAD;Mc;0;L;;;;;N;;nam chey;;;
+0F80;TIBETAN VOWEL SIGN REVERSED I;Mn;143;L;;;;;N;;;;;
+0F81;TIBETAN VOWEL SIGN REVERSED II;Mn;144;L;0F80 0F71;;;;N;;;;;
+0F82;TIBETAN SIGN NYI ZLA NAA DA;Mn;230;L;;;;;N;;nyi da na da;;;
+0F83;TIBETAN SIGN SNA LDAN;Mn;230;L;;;;;N;;nan de;;;
+0F84;TIBETAN MARK HALANTA;Mn;9;L;;;;;N;;;;;
+0F85;TIBETAN MARK PALUTA;Po;0;L;;;;;N;;;;;
+0F86;TIBETAN SIGN LCI RTAGS;Mn;230;L;;;;;N;;ji ta;;;
+0F87;TIBETAN SIGN YANG RTAGS;Mn;230;L;;;;;N;;yang ta;;;
+0F88;TIBETAN SIGN LCE TSA CAN;Mn;230;L;;;;;N;;che tsa chen;;;
+0F89;TIBETAN SIGN MCHU CAN;Mn;230;L;;;;;N;;chu chen;;;
+0F8A;TIBETAN SIGN GRU CAN RGYINGS;Mn;230;L;;;;;N;;tru chen ging;;;
+0F8B;TIBETAN SIGN GRU MED RGYINGS;Mn;230;L;;;;;N;;tru me ging;;;
+0F90;TIBETAN SUBJOINED LETTER KA;Mn;6;L;;;;;N;;;;;
+0F91;TIBETAN SUBJOINED LETTER KHA;Mn;6;L;;;;;N;;;;;
+0F92;TIBETAN SUBJOINED LETTER GA;Mn;6;L;;;;;N;;;;;
+0F93;TIBETAN SUBJOINED LETTER GHA;Mn;6;L;0F92 0FB7;;;;N;;;;;
+0F94;TIBETAN SUBJOINED LETTER NGA;Mn;6;L;;;;;N;;;;;
+0F95;TIBETAN SUBJOINED LETTER CA;Mn;6;L;;;;;N;;;;;
+0F97;TIBETAN SUBJOINED LETTER JA;Mn;6;L;;;;;N;;;;;
+0F99;TIBETAN SUBJOINED LETTER NYA;Mn;6;L;;;;;N;;;;;
+0F9A;TIBETAN SUBJOINED LETTER TTA;Mn;6;L;;;;;N;;;;;
+0F9B;TIBETAN SUBJOINED LETTER TTHA;Mn;6;L;;;;;N;;;;;
+0F9C;TIBETAN SUBJOINED LETTER DDA;Mn;6;L;;;;;N;;;;;
+0F9D;TIBETAN SUBJOINED LETTER DDHA;Mn;6;L;0F9C 0FB7;;;;N;;;;;
+0F9E;TIBETAN SUBJOINED LETTER NNA;Mn;6;L;;;;;N;;;;;
+0F9F;TIBETAN SUBJOINED LETTER TA;Mn;6;L;;;;;N;;;;;
+0FA0;TIBETAN SUBJOINED LETTER THA;Mn;6;L;;;;;N;;;;;
+0FA1;TIBETAN SUBJOINED LETTER DA;Mn;6;L;;;;;N;;;;;
+0FA2;TIBETAN SUBJOINED LETTER DHA;Mn;6;L;0FA1 0FB7;;;;N;;;;;
+0FA3;TIBETAN SUBJOINED LETTER NA;Mn;6;L;;;;;N;;;;;
+0FA4;TIBETAN SUBJOINED LETTER PA;Mn;6;L;;;;;N;;;;;
+0FA5;TIBETAN SUBJOINED LETTER PHA;Mn;6;L;;;;;N;;;;;
+0FA6;TIBETAN SUBJOINED LETTER BA;Mn;6;L;;;;;N;;;;;
+0FA7;TIBETAN SUBJOINED LETTER BHA;Mn;6;L;0FA6 0FB7;;;;N;;;;;
+0FA8;TIBETAN SUBJOINED LETTER MA;Mn;6;L;;;;;N;;;;;
+0FA9;TIBETAN SUBJOINED LETTER TSA;Mn;6;L;;;;;N;;;;;
+0FAA;TIBETAN SUBJOINED LETTER TSHA;Mn;6;L;;;;;N;;;;;
+0FAB;TIBETAN SUBJOINED LETTER DZA;Mn;6;L;;;;;N;;;;;
+0FAC;TIBETAN SUBJOINED LETTER DZHA;Mn;6;L;0FAB 0FB7;;;;N;;;;;
+0FAD;TIBETAN SUBJOINED LETTER WA;Mn;6;L;;;;;N;;;;;
+0FB1;TIBETAN SUBJOINED LETTER YA;Mn;6;L;;;;;N;;;;;
+0FB2;TIBETAN SUBJOINED LETTER RA;Mn;6;L;;;;;N;;;;;
+0FB3;TIBETAN SUBJOINED LETTER LA;Mn;6;L;;;;;N;;;;;
+0FB4;TIBETAN SUBJOINED LETTER SHA;Mn;6;L;;;;;N;;;;;
+0FB5;TIBETAN SUBJOINED LETTER SSA;Mn;6;L;;;;;N;;;;;
+0FB6;TIBETAN SUBJOINED LETTER SA;Mn;6;L;;;;;N;;;;;
+0FB7;TIBETAN SUBJOINED LETTER HA;Mn;6;L;;;;;N;;;;;
+0FB9;TIBETAN SUBJOINED LETTER KSSA;Mn;6;L;0F90 0FB5;;;;N;;;;;
+10A0;GEORGIAN CAPITAL LETTER AN;Lu;0;L;;;;;N;;Khutsuri;;10D0;
+10A1;GEORGIAN CAPITAL LETTER BAN;Lu;0;L;;;;;N;;Khutsuri;;10D1;
+10A2;GEORGIAN CAPITAL LETTER GAN;Lu;0;L;;;;;N;;Khutsuri;;10D2;
+10A3;GEORGIAN CAPITAL LETTER DON;Lu;0;L;;;;;N;;Khutsuri;;10D3;
+10A4;GEORGIAN CAPITAL LETTER EN;Lu;0;L;;;;;N;;Khutsuri;;10D4;
+10A5;GEORGIAN CAPITAL LETTER VIN;Lu;0;L;;;;;N;;Khutsuri;;10D5;
+10A6;GEORGIAN CAPITAL LETTER ZEN;Lu;0;L;;;;;N;;Khutsuri;;10D6;
+10A7;GEORGIAN CAPITAL LETTER TAN;Lu;0;L;;;;;N;;Khutsuri;;10D7;
+10A8;GEORGIAN CAPITAL LETTER IN;Lu;0;L;;;;;N;;Khutsuri;;10D8;
+10A9;GEORGIAN CAPITAL LETTER KAN;Lu;0;L;;;;;N;;Khutsuri;;10D9;
+10AA;GEORGIAN CAPITAL LETTER LAS;Lu;0;L;;;;;N;;Khutsuri;;10DA;
+10AB;GEORGIAN CAPITAL LETTER MAN;Lu;0;L;;;;;N;;Khutsuri;;10DB;
+10AC;GEORGIAN CAPITAL LETTER NAR;Lu;0;L;;;;;N;;Khutsuri;;10DC;
+10AD;GEORGIAN CAPITAL LETTER ON;Lu;0;L;;;;;N;;Khutsuri;;10DD;
+10AE;GEORGIAN CAPITAL LETTER PAR;Lu;0;L;;;;;N;;Khutsuri;;10DE;
+10AF;GEORGIAN CAPITAL LETTER ZHAR;Lu;0;L;;;;;N;;Khutsuri;;10DF;
+10B0;GEORGIAN CAPITAL LETTER RAE;Lu;0;L;;;;;N;;Khutsuri;;10E0;
+10B1;GEORGIAN CAPITAL LETTER SAN;Lu;0;L;;;;;N;;Khutsuri;;10E1;
+10B2;GEORGIAN CAPITAL LETTER TAR;Lu;0;L;;;;;N;;Khutsuri;;10E2;
+10B3;GEORGIAN CAPITAL LETTER UN;Lu;0;L;;;;;N;;Khutsuri;;10E3;
+10B4;GEORGIAN CAPITAL LETTER PHAR;Lu;0;L;;;;;N;;Khutsuri;;10E4;
+10B5;GEORGIAN CAPITAL LETTER KHAR;Lu;0;L;;;;;N;;Khutsuri;;10E5;
+10B6;GEORGIAN CAPITAL LETTER GHAN;Lu;0;L;;;;;N;;Khutsuri;;10E6;
+10B7;GEORGIAN CAPITAL LETTER QAR;Lu;0;L;;;;;N;;Khutsuri;;10E7;
+10B8;GEORGIAN CAPITAL LETTER SHIN;Lu;0;L;;;;;N;;Khutsuri;;10E8;
+10B9;GEORGIAN CAPITAL LETTER CHIN;Lu;0;L;;;;;N;;Khutsuri;;10E9;
+10BA;GEORGIAN CAPITAL LETTER CAN;Lu;0;L;;;;;N;;Khutsuri;;10EA;
+10BB;GEORGIAN CAPITAL LETTER JIL;Lu;0;L;;;;;N;;Khutsuri;;10EB;
+10BC;GEORGIAN CAPITAL LETTER CIL;Lu;0;L;;;;;N;;Khutsuri;;10EC;
+10BD;GEORGIAN CAPITAL LETTER CHAR;Lu;0;L;;;;;N;;Khutsuri;;10ED;
+10BE;GEORGIAN CAPITAL LETTER XAN;Lu;0;L;;;;;N;;Khutsuri;;10EE;
+10BF;GEORGIAN CAPITAL LETTER JHAN;Lu;0;L;;;;;N;;Khutsuri;;10EF;
+10C0;GEORGIAN CAPITAL LETTER HAE;Lu;0;L;;;;;N;;Khutsuri;;10F0;
+10C1;GEORGIAN CAPITAL LETTER HE;Lu;0;L;;;;;N;;Khutsuri;;10F1;
+10C2;GEORGIAN CAPITAL LETTER HIE;Lu;0;L;;;;;N;;Khutsuri;;10F2;
+10C3;GEORGIAN CAPITAL LETTER WE;Lu;0;L;;;;;N;;Khutsuri;;10F3;
+10C4;GEORGIAN CAPITAL LETTER HAR;Lu;0;L;;;;;N;;Khutsuri;;10F4;
+10C5;GEORGIAN CAPITAL LETTER HOE;Lu;0;L;;;;;N;;Khutsuri;;10F5;
+10D0;GEORGIAN LETTER AN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER AN;;;;
+10D1;GEORGIAN LETTER BAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER BAN;;;;
+10D2;GEORGIAN LETTER GAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER GAN;;;;
+10D3;GEORGIAN LETTER DON;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER DON;;;;
+10D4;GEORGIAN LETTER EN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER EN;;;;
+10D5;GEORGIAN LETTER VIN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER VIN;;;;
+10D6;GEORGIAN LETTER ZEN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER ZEN;;;;
+10D7;GEORGIAN LETTER TAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER TAN;;;;
+10D8;GEORGIAN LETTER IN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER IN;;;;
+10D9;GEORGIAN LETTER KAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER KAN;;;;
+10DA;GEORGIAN LETTER LAS;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER LAS;;;;
+10DB;GEORGIAN LETTER MAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER MAN;;;;
+10DC;GEORGIAN LETTER NAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER NAR;;;;
+10DD;GEORGIAN LETTER ON;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER ON;;;;
+10DE;GEORGIAN LETTER PAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER PAR;;;;
+10DF;GEORGIAN LETTER ZHAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER ZHAR;;;;
+10E0;GEORGIAN LETTER RAE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER RAE;;;;
+10E1;GEORGIAN LETTER SAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER SAN;;;;
+10E2;GEORGIAN LETTER TAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER TAR;;;;
+10E3;GEORGIAN LETTER UN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER UN;;;;
+10E4;GEORGIAN LETTER PHAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER PHAR;;;;
+10E5;GEORGIAN LETTER KHAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER KHAR;;;;
+10E6;GEORGIAN LETTER GHAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER GHAN;;;;
+10E7;GEORGIAN LETTER QAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER QAR;;;;
+10E8;GEORGIAN LETTER SHIN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER SHIN;;;;
+10E9;GEORGIAN LETTER CHIN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER CHIN;;;;
+10EA;GEORGIAN LETTER CAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER CAN;;;;
+10EB;GEORGIAN LETTER JIL;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER JIL;;;;
+10EC;GEORGIAN LETTER CIL;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER CIL;;;;
+10ED;GEORGIAN LETTER CHAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER CHAR;;;;
+10EE;GEORGIAN LETTER XAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER XAN;;;;
+10EF;GEORGIAN LETTER JHAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER JHAN;;;;
+10F0;GEORGIAN LETTER HAE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HAE;;;;
+10F1;GEORGIAN LETTER HE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HE;;;;
+10F2;GEORGIAN LETTER HIE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HIE;;;;
+10F3;GEORGIAN LETTER WE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER WE;;;;
+10F4;GEORGIAN LETTER HAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HAR;;;;
+10F5;GEORGIAN LETTER HOE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HOE;;;;
+10F6;GEORGIAN LETTER FI;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER FI;;;;
+10FB;GEORGIAN PARAGRAPH SEPARATOR;Po;0;L;;;;;N;;;;;
+1100;HANGUL CHOSEONG KIYEOK;Lo;0;L;;;;;N;;;;;
+1101;HANGUL CHOSEONG SSANGKIYEOK;Lo;0;L;<compat> 1100 1100;;;;N;;;;;
+1102;HANGUL CHOSEONG NIEUN;Lo;0;L;;;;;N;;;;;
+1103;HANGUL CHOSEONG TIKEUT;Lo;0;L;;;;;N;;;;;
+1104;HANGUL CHOSEONG SSANGTIKEUT;Lo;0;L;<compat> 1103 1103;;;;N;;;;;
+1105;HANGUL CHOSEONG RIEUL;Lo;0;L;;;;;N;;;;;
+1106;HANGUL CHOSEONG MIEUM;Lo;0;L;;;;;N;;;;;
+1107;HANGUL CHOSEONG PIEUP;Lo;0;L;;;;;N;;;;;
+1108;HANGUL CHOSEONG SSANGPIEUP;Lo;0;L;<compat> 1107 1107;;;;N;;;;;
+1109;HANGUL CHOSEONG SIOS;Lo;0;L;;;;;N;;;;;
+110A;HANGUL CHOSEONG SSANGSIOS;Lo;0;L;<compat> 1109 1109;;;;N;;;;;
+110B;HANGUL CHOSEONG IEUNG;Lo;0;L;;;;;N;;;;;
+110C;HANGUL CHOSEONG CIEUC;Lo;0;L;;;;;N;;;;;
+110D;HANGUL CHOSEONG SSANGCIEUC;Lo;0;L;<compat> 110C 110C;;;;N;;;;;
+110E;HANGUL CHOSEONG CHIEUCH;Lo;0;L;;;;;N;;;;;
+110F;HANGUL CHOSEONG KHIEUKH;Lo;0;L;;;;;N;;;;;
+1110;HANGUL CHOSEONG THIEUTH;Lo;0;L;;;;;N;;;;;
+1111;HANGUL CHOSEONG PHIEUPH;Lo;0;L;;;;;N;;;;;
+1112;HANGUL CHOSEONG HIEUH;Lo;0;L;;;;;N;;;;;
+1113;HANGUL CHOSEONG NIEUN-KIYEOK;Lo;0;L;<compat> 1102 1100;;;;N;;;;;
+1114;HANGUL CHOSEONG SSANGNIEUN;Lo;0;L;<compat> 1102 1102;;;;N;;;;;
+1115;HANGUL CHOSEONG NIEUN-TIKEUT;Lo;0;L;<compat> 1102 1103;;;;N;;;;;
+1116;HANGUL CHOSEONG NIEUN-PIEUP;Lo;0;L;<compat> 1102 1107;;;;N;;;;;
+1117;HANGUL CHOSEONG TIKEUT-KIYEOK;Lo;0;L;<compat> 1103 1100;;;;N;;;;;
+1118;HANGUL CHOSEONG RIEUL-NIEUN;Lo;0;L;<compat> 1105 1102;;;;N;;;;;
+1119;HANGUL CHOSEONG SSANGRIEUL;Lo;0;L;<compat> 1105 1105;;;;N;;;;;
+111A;HANGUL CHOSEONG RIEUL-HIEUH;Lo;0;L;<compat> 1105 1112;;;;N;;;;;
+111B;HANGUL CHOSEONG KAPYEOUNRIEUL;Lo;0;L;<compat> 1105 110B;;;;N;;;;;
+111C;HANGUL CHOSEONG MIEUM-PIEUP;Lo;0;L;<compat> 1106 1107;;;;N;;;;;
+111D;HANGUL CHOSEONG KAPYEOUNMIEUM;Lo;0;L;<compat> 1106 110B;;;;N;;;;;
+111E;HANGUL CHOSEONG PIEUP-KIYEOK;Lo;0;L;<compat> 1107 1100;;;;N;;;;;
+111F;HANGUL CHOSEONG PIEUP-NIEUN;Lo;0;L;<compat> 1107 1102;;;;N;;;;;
+1120;HANGUL CHOSEONG PIEUP-TIKEUT;Lo;0;L;<compat> 1107 1103;;;;N;;;;;
+1121;HANGUL CHOSEONG PIEUP-SIOS;Lo;0;L;<compat> 1107 1109;;;;N;;;;;
+1122;HANGUL CHOSEONG PIEUP-SIOS-KIYEOK;Lo;0;L;<compat> 1107 1109 1100;;;;N;;;;;
+1123;HANGUL CHOSEONG PIEUP-SIOS-TIKEUT;Lo;0;L;<compat> 1107 1109 1103;;;;N;;;;;
+1124;HANGUL CHOSEONG PIEUP-SIOS-PIEUP;Lo;0;L;<compat> 1107 1109 1107;;;;N;;;;;
+1125;HANGUL CHOSEONG PIEUP-SSANGSIOS;Lo;0;L;<compat> 1107 1109 1109;;;;N;;;;;
+1126;HANGUL CHOSEONG PIEUP-SIOS-CIEUC;Lo;0;L;<compat> 1107 1109 110C;;;;N;;;;;
+1127;HANGUL CHOSEONG PIEUP-CIEUC;Lo;0;L;<compat> 1107 110C;;;;N;;;;;
+1128;HANGUL CHOSEONG PIEUP-CHIEUCH;Lo;0;L;<compat> 1107 110E;;;;N;;;;;
+1129;HANGUL CHOSEONG PIEUP-THIEUTH;Lo;0;L;<compat> 1107 1110;;;;N;;;;;
+112A;HANGUL CHOSEONG PIEUP-PHIEUPH;Lo;0;L;<compat> 1107 1111;;;;N;;;;;
+112B;HANGUL CHOSEONG KAPYEOUNPIEUP;Lo;0;L;<compat> 1107 110B;;;;N;;;;;
+112C;HANGUL CHOSEONG KAPYEOUNSSANGPIEUP;Lo;0;L;<compat> 1107 1107 110B;;;;N;;;;;
+112D;HANGUL CHOSEONG SIOS-KIYEOK;Lo;0;L;<compat> 1109 1100;;;;N;;;;;
+112E;HANGUL CHOSEONG SIOS-NIEUN;Lo;0;L;<compat> 1109 1102;;;;N;;;;;
+112F;HANGUL CHOSEONG SIOS-TIKEUT;Lo;0;L;<compat> 1109 1103;;;;N;;;;;
+1130;HANGUL CHOSEONG SIOS-RIEUL;Lo;0;L;<compat> 1109 1105;;;;N;;;;;
+1131;HANGUL CHOSEONG SIOS-MIEUM;Lo;0;L;<compat> 1109 1106;;;;N;;;;;
+1132;HANGUL CHOSEONG SIOS-PIEUP;Lo;0;L;<compat> 1109 1107;;;;N;;;;;
+1133;HANGUL CHOSEONG SIOS-PIEUP-KIYEOK;Lo;0;L;<compat> 1109 1107 1100;;;;N;;;;;
+1134;HANGUL CHOSEONG SIOS-SSANGSIOS;Lo;0;L;<compat> 1109 1109 1109;;;;N;;;;;
+1135;HANGUL CHOSEONG SIOS-IEUNG;Lo;0;L;<compat> 1109 110B;;;;N;;;;;
+1136;HANGUL CHOSEONG SIOS-CIEUC;Lo;0;L;<compat> 1109 110C;;;;N;;;;;
+1137;HANGUL CHOSEONG SIOS-CHIEUCH;Lo;0;L;<compat> 1109 110E;;;;N;;;;;
+1138;HANGUL CHOSEONG SIOS-KHIEUKH;Lo;0;L;<compat> 1109 110F;;;;N;;;;;
+1139;HANGUL CHOSEONG SIOS-THIEUTH;Lo;0;L;<compat> 1109 1110;;;;N;;;;;
+113A;HANGUL CHOSEONG SIOS-PHIEUPH;Lo;0;L;<compat> 1109 1111;;;;N;;;;;
+113B;HANGUL CHOSEONG SIOS-HIEUH;Lo;0;L;<compat> 1109 1112;;;;N;;;;;
+113C;HANGUL CHOSEONG CHITUEUMSIOS;Lo;0;L;;;;;N;;;;;
+113D;HANGUL CHOSEONG CHITUEUMSSANGSIOS;Lo;0;L;<compat> 113C 113C;;;;N;;;;;
+113E;HANGUL CHOSEONG CEONGCHIEUMSIOS;Lo;0;L;;;;;N;;;;;
+113F;HANGUL CHOSEONG CEONGCHIEUMSSANGSIOS;Lo;0;L;<compat> 113E 113E;;;;N;;;;;
+1140;HANGUL CHOSEONG PANSIOS;Lo;0;L;;;;;N;;;;;
+1141;HANGUL CHOSEONG IEUNG-KIYEOK;Lo;0;L;<compat> 110B 1100;;;;N;;;;;
+1142;HANGUL CHOSEONG IEUNG-TIKEUT;Lo;0;L;<compat> 110B 1103;;;;N;;;;;
+1143;HANGUL CHOSEONG IEUNG-MIEUM;Lo;0;L;<compat> 110B 1106;;;;N;;;;;
+1144;HANGUL CHOSEONG IEUNG-PIEUP;Lo;0;L;<compat> 110B 1107;;;;N;;;;;
+1145;HANGUL CHOSEONG IEUNG-SIOS;Lo;0;L;<compat> 110B 1109;;;;N;;;;;
+1146;HANGUL CHOSEONG IEUNG-PANSIOS;Lo;0;L;<compat> 110B 1140;;;;N;;;;;
+1147;HANGUL CHOSEONG SSANGIEUNG;Lo;0;L;<compat> 110B 110B;;;;N;;;;;
+1148;HANGUL CHOSEONG IEUNG-CIEUC;Lo;0;L;<compat> 110B 110C;;;;N;;;;;
+1149;HANGUL CHOSEONG IEUNG-CHIEUCH;Lo;0;L;<compat> 110B 110E;;;;N;;;;;
+114A;HANGUL CHOSEONG IEUNG-THIEUTH;Lo;0;L;<compat> 110B 1110;;;;N;;;;;
+114B;HANGUL CHOSEONG IEUNG-PHIEUPH;Lo;0;L;<compat> 110B 1111;;;;N;;;;;
+114C;HANGUL CHOSEONG YESIEUNG;Lo;0;L;;;;;N;;;;;
+114D;HANGUL CHOSEONG CIEUC-IEUNG;Lo;0;L;<compat> 110C 110B;;;;N;;;;;
+114E;HANGUL CHOSEONG CHITUEUMCIEUC;Lo;0;L;;;;;N;;;;;
+114F;HANGUL CHOSEONG CHITUEUMSSANGCIEUC;Lo;0;L;<compat> 114E 114E;;;;N;;;;;
+1150;HANGUL CHOSEONG CEONGCHIEUMCIEUC;Lo;0;L;;;;;N;;;;;
+1151;HANGUL CHOSEONG CEONGCHIEUMSSANGCIEUC;Lo;0;L;<compat> 1150 1150;;;;N;;;;;
+1152;HANGUL CHOSEONG CHIEUCH-KHIEUKH;Lo;0;L;<compat> 110E 110F;;;;N;;;;;
+1153;HANGUL CHOSEONG CHIEUCH-HIEUH;Lo;0;L;<compat> 110E 1112;;;;N;;;;;
+1154;HANGUL CHOSEONG CHITUEUMCHIEUCH;Lo;0;L;;;;;N;;;;;
+1155;HANGUL CHOSEONG CEONGCHIEUMCHIEUCH;Lo;0;L;;;;;N;;;;;
+1156;HANGUL CHOSEONG PHIEUPH-PIEUP;Lo;0;L;<compat> 1111 1107;;;;N;;;;;
+1157;HANGUL CHOSEONG KAPYEOUNPHIEUPH;Lo;0;L;<compat> 1111 110B;;;;N;;;;;
+1158;HANGUL CHOSEONG SSANGHIEUH;Lo;0;L;<compat> 1112 1112;;;;N;;;;;
+1159;HANGUL CHOSEONG YEORINHIEUH;Lo;0;L;;;;;N;;;;;
+115F;HANGUL CHOSEONG FILLER;Lo;0;L;;;;;N;;;;;
+1160;HANGUL JUNGSEONG FILLER;Lo;0;L;;;;;N;;;;;
+1161;HANGUL JUNGSEONG A;Lo;0;L;;;;;N;;;;;
+1162;HANGUL JUNGSEONG AE;Lo;0;L;<compat> 1161 1175;;;;N;;;;;
+1163;HANGUL JUNGSEONG YA;Lo;0;L;;;;;N;;;;;
+1164;HANGUL JUNGSEONG YAE;Lo;0;L;<compat> 1163 1175;;;;N;;;;;
+1165;HANGUL JUNGSEONG EO;Lo;0;L;;;;;N;;;;;
+1166;HANGUL JUNGSEONG E;Lo;0;L;<compat> 1165 1175;;;;N;;;;;
+1167;HANGUL JUNGSEONG YEO;Lo;0;L;;;;;N;;;;;
+1168;HANGUL JUNGSEONG YE;Lo;0;L;<compat> 1167 1175;;;;N;;;;;
+1169;HANGUL JUNGSEONG O;Lo;0;L;;;;;N;;;;;
+116A;HANGUL JUNGSEONG WA;Lo;0;L;<compat> 1169 1161;;;;N;;;;;
+116B;HANGUL JUNGSEONG WAE;Lo;0;L;<compat> 1169 1161 1175;;;;N;;;;;
+116C;HANGUL JUNGSEONG OE;Lo;0;L;<compat> 1169 1175;;;;N;;;;;
+116D;HANGUL JUNGSEONG YO;Lo;0;L;;;;;N;;;;;
+116E;HANGUL JUNGSEONG U;Lo;0;L;;;;;N;;;;;
+116F;HANGUL JUNGSEONG WEO;Lo;0;L;<compat> 116E 1165;;;;N;;;;;
+1170;HANGUL JUNGSEONG WE;Lo;0;L;<compat> 116E 1165 1175;;;;N;;;;;
+1171;HANGUL JUNGSEONG WI;Lo;0;L;<compat> 116E 1175;;;;N;;;;;
+1172;HANGUL JUNGSEONG YU;Lo;0;L;;;;;N;;;;;
+1173;HANGUL JUNGSEONG EU;Lo;0;L;;;;;N;;;;;
+1174;HANGUL JUNGSEONG YI;Lo;0;L;<compat> 1173 1175;;;;N;;;;;
+1175;HANGUL JUNGSEONG I;Lo;0;L;;;;;N;;;;;
+1176;HANGUL JUNGSEONG A-O;Lo;0;L;<compat> 1161 1169;;;;N;;;;;
+1177;HANGUL JUNGSEONG A-U;Lo;0;L;<compat> 1161 116E;;;;N;;;;;
+1178;HANGUL JUNGSEONG YA-O;Lo;0;L;<compat> 1163 1169;;;;N;;;;;
+1179;HANGUL JUNGSEONG YA-YO;Lo;0;L;<compat> 1163 116D;;;;N;;;;;
+117A;HANGUL JUNGSEONG EO-O;Lo;0;L;<compat> 1165 1169;;;;N;;;;;
+117B;HANGUL JUNGSEONG EO-U;Lo;0;L;<compat> 1165 116E;;;;N;;;;;
+117C;HANGUL JUNGSEONG EO-EU;Lo;0;L;<compat> 1165 1173;;;;N;;;;;
+117D;HANGUL JUNGSEONG YEO-O;Lo;0;L;<compat> 1167 1169;;;;N;;;;;
+117E;HANGUL JUNGSEONG YEO-U;Lo;0;L;<compat> 1167 116E;;;;N;;;;;
+117F;HANGUL JUNGSEONG O-EO;Lo;0;L;<compat> 1169 1165;;;;N;;;;;
+1180;HANGUL JUNGSEONG O-E;Lo;0;L;<compat> 1169 1166;;;;N;;;;;
+1181;HANGUL JUNGSEONG O-YE;Lo;0;L;<compat> 1169 1168;;;;N;;;;;
+1182;HANGUL JUNGSEONG O-O;Lo;0;L;<compat> 1169 1169;;;;N;;;;;
+1183;HANGUL JUNGSEONG O-U;Lo;0;L;<compat> 1169 116E;;;;N;;;;;
+1184;HANGUL JUNGSEONG YO-YA;Lo;0;L;<compat> 116D 1163;;;;N;;;;;
+1185;HANGUL JUNGSEONG YO-YAE;Lo;0;L;<compat> 116D 1164;;;;N;;;;;
+1186;HANGUL JUNGSEONG YO-YEO;Lo;0;L;<compat> 116D 1167;;;;N;;;;;
+1187;HANGUL JUNGSEONG YO-O;Lo;0;L;<compat> 116D 1169;;;;N;;;;;
+1188;HANGUL JUNGSEONG YO-I;Lo;0;L;<compat> 116D 1175;;;;N;;;;;
+1189;HANGUL JUNGSEONG U-A;Lo;0;L;<compat> 116E 1161;;;;N;;;;;
+118A;HANGUL JUNGSEONG U-AE;Lo;0;L;<compat> 116E 1162;;;;N;;;;;
+118B;HANGUL JUNGSEONG U-EO-EU;Lo;0;L;<compat> 116E 1165 1173;;;;N;;;;;
+118C;HANGUL JUNGSEONG U-YE;Lo;0;L;<compat> 116E 1168;;;;N;;;;;
+118D;HANGUL JUNGSEONG U-U;Lo;0;L;<compat> 116E 116E;;;;N;;;;;
+118E;HANGUL JUNGSEONG YU-A;Lo;0;L;<compat> 1172 1161;;;;N;;;;;
+118F;HANGUL JUNGSEONG YU-EO;Lo;0;L;<compat> 1172 1165;;;;N;;;;;
+1190;HANGUL JUNGSEONG YU-E;Lo;0;L;<compat> 1172 1166;;;;N;;;;;
+1191;HANGUL JUNGSEONG YU-YEO;Lo;0;L;<compat> 1172 1167;;;;N;;;;;
+1192;HANGUL JUNGSEONG YU-YE;Lo;0;L;<compat> 1172 1168;;;;N;;;;;
+1193;HANGUL JUNGSEONG YU-U;Lo;0;L;<compat> 1172 116E;;;;N;;;;;
+1194;HANGUL JUNGSEONG YU-I;Lo;0;L;<compat> 1172 1175;;;;N;;;;;
+1195;HANGUL JUNGSEONG EU-U;Lo;0;L;<compat> 1173 116E;;;;N;;;;;
+1196;HANGUL JUNGSEONG EU-EU;Lo;0;L;<compat> 1173 1173;;;;N;;;;;
+1197;HANGUL JUNGSEONG YI-U;Lo;0;L;<compat> 1174 116E;;;;N;;;;;
+1198;HANGUL JUNGSEONG I-A;Lo;0;L;<compat> 1175 1161;;;;N;;;;;
+1199;HANGUL JUNGSEONG I-YA;Lo;0;L;<compat> 1175 1163;;;;N;;;;;
+119A;HANGUL JUNGSEONG I-O;Lo;0;L;<compat> 1175 1169;;;;N;;;;;
+119B;HANGUL JUNGSEONG I-U;Lo;0;L;<compat> 1175 116E;;;;N;;;;;
+119C;HANGUL JUNGSEONG I-EU;Lo;0;L;<compat> 1175 1173;;;;N;;;;;
+119D;HANGUL JUNGSEONG I-ARAEA;Lo;0;L;<compat> 1175 119E;;;;N;;;;;
+119E;HANGUL JUNGSEONG ARAEA;Lo;0;L;;;;;N;;;;;
+119F;HANGUL JUNGSEONG ARAEA-EO;Lo;0;L;<compat> 119E 1165;;;;N;;;;;
+11A0;HANGUL JUNGSEONG ARAEA-U;Lo;0;L;<compat> 119E 116E;;;;N;;;;;
+11A1;HANGUL JUNGSEONG ARAEA-I;Lo;0;L;<compat> 119E 1175;;;;N;;;;;
+11A2;HANGUL JUNGSEONG SSANGARAEA;Lo;0;L;<compat> 119E 119E;;;;N;;;;;
+11A8;HANGUL JONGSEONG KIYEOK;Lo;0;L;;;;;N;;;;;
+11A9;HANGUL JONGSEONG SSANGKIYEOK;Lo;0;L;<compat> 11A8 11A8;;;;N;;;;;
+11AA;HANGUL JONGSEONG KIYEOK-SIOS;Lo;0;L;<compat> 11A8 11BA;;;;N;;;;;
+11AB;HANGUL JONGSEONG NIEUN;Lo;0;L;;;;;N;;;;;
+11AC;HANGUL JONGSEONG NIEUN-CIEUC;Lo;0;L;<compat> 11AB 11BD;;;;N;;;;;
+11AD;HANGUL JONGSEONG NIEUN-HIEUH;Lo;0;L;<compat> 11AB 11C2;;;;N;;;;;
+11AE;HANGUL JONGSEONG TIKEUT;Lo;0;L;;;;;N;;;;;
+11AF;HANGUL JONGSEONG RIEUL;Lo;0;L;;;;;N;;;;;
+11B0;HANGUL JONGSEONG RIEUL-KIYEOK;Lo;0;L;<compat> 11AF 11A8;;;;N;;;;;
+11B1;HANGUL JONGSEONG RIEUL-MIEUM;Lo;0;L;<compat> 11AF 11B7;;;;N;;;;;
+11B2;HANGUL JONGSEONG RIEUL-PIEUP;Lo;0;L;<compat> 11AF 11B8;;;;N;;;;;
+11B3;HANGUL JONGSEONG RIEUL-SIOS;Lo;0;L;<compat> 11AF 11BA;;;;N;;;;;
+11B4;HANGUL JONGSEONG RIEUL-THIEUTH;Lo;0;L;<compat> 11AF 11C0;;;;N;;;;;
+11B5;HANGUL JONGSEONG RIEUL-PHIEUPH;Lo;0;L;<compat> 11AF 11C1;;;;N;;;;;
+11B6;HANGUL JONGSEONG RIEUL-HIEUH;Lo;0;L;<compat> 11AF 11C2;;;;N;;;;;
+11B7;HANGUL JONGSEONG MIEUM;Lo;0;L;;;;;N;;;;;
+11B8;HANGUL JONGSEONG PIEUP;Lo;0;L;;;;;N;;;;;
+11B9;HANGUL JONGSEONG PIEUP-SIOS;Lo;0;L;<compat> 11B8 11BA;;;;N;;;;;
+11BA;HANGUL JONGSEONG SIOS;Lo;0;L;;;;;N;;;;;
+11BB;HANGUL JONGSEONG SSANGSIOS;Lo;0;L;<compat> 11BA 11BA;;;;N;;;;;
+11BC;HANGUL JONGSEONG IEUNG;Lo;0;L;;;;;N;;;;;
+11BD;HANGUL JONGSEONG CIEUC;Lo;0;L;;;;;N;;;;;
+11BE;HANGUL JONGSEONG CHIEUCH;Lo;0;L;;;;;N;;;;;
+11BF;HANGUL JONGSEONG KHIEUKH;Lo;0;L;;;;;N;;;;;
+11C0;HANGUL JONGSEONG THIEUTH;Lo;0;L;;;;;N;;;;;
+11C1;HANGUL JONGSEONG PHIEUPH;Lo;0;L;;;;;N;;;;;
+11C2;HANGUL JONGSEONG HIEUH;Lo;0;L;;;;;N;;;;;
+11C3;HANGUL JONGSEONG KIYEOK-RIEUL;Lo;0;L;<compat> 11A8 11AF;;;;N;;;;;
+11C4;HANGUL JONGSEONG KIYEOK-SIOS-KIYEOK;Lo;0;L;<compat> 11A8 11BA 11A8;;;;N;;;;;
+11C5;HANGUL JONGSEONG NIEUN-KIYEOK;Lo;0;L;<compat> 11AB 11A8;;;;N;;;;;
+11C6;HANGUL JONGSEONG NIEUN-TIKEUT;Lo;0;L;<compat> 11AB 11AE;;;;N;;;;;
+11C7;HANGUL JONGSEONG NIEUN-SIOS;Lo;0;L;<compat> 11AB 11BA;;;;N;;;;;
+11C8;HANGUL JONGSEONG NIEUN-PANSIOS;Lo;0;L;<compat> 11AB 11EB;;;;N;;;;;
+11C9;HANGUL JONGSEONG NIEUN-THIEUTH;Lo;0;L;<compat> 11AB 11C0;;;;N;;;;;
+11CA;HANGUL JONGSEONG TIKEUT-KIYEOK;Lo;0;L;<compat> 11AE 11A8;;;;N;;;;;
+11CB;HANGUL JONGSEONG TIKEUT-RIEUL;Lo;0;L;<compat> 11AE 11AF;;;;N;;;;;
+11CC;HANGUL JONGSEONG RIEUL-KIYEOK-SIOS;Lo;0;L;<compat> 11AF 11A8 11BA;;;;N;;;;;
+11CD;HANGUL JONGSEONG RIEUL-NIEUN;Lo;0;L;<compat> 11AF 11AB;;;;N;;;;;
+11CE;HANGUL JONGSEONG RIEUL-TIKEUT;Lo;0;L;<compat> 11AF 11AE;;;;N;;;;;
+11CF;HANGUL JONGSEONG RIEUL-TIKEUT-HIEUH;Lo;0;L;<compat> 11AF 11AE 11C2;;;;N;;;;;
+11D0;HANGUL JONGSEONG SSANGRIEUL;Lo;0;L;<compat> 11AF 11AF;;;;N;;;;;
+11D1;HANGUL JONGSEONG RIEUL-MIEUM-KIYEOK;Lo;0;L;<compat> 11AF 11B7 11A8;;;;N;;;;;
+11D2;HANGUL JONGSEONG RIEUL-MIEUM-SIOS;Lo;0;L;<compat> 11AF 11B7 11BA;;;;N;;;;;
+11D3;HANGUL JONGSEONG RIEUL-PIEUP-SIOS;Lo;0;L;<compat> 11AF 11B8 11BA;;;;N;;;;;
+11D4;HANGUL JONGSEONG RIEUL-PIEUP-HIEUH;Lo;0;L;<compat> 11AF 11B8 11C2;;;;N;;;;;
+11D5;HANGUL JONGSEONG RIEUL-KAPYEOUNPIEUP;Lo;0;L;<compat> 11AF 11B8 11BC;;;;N;;;;;
+11D6;HANGUL JONGSEONG RIEUL-SSANGSIOS;Lo;0;L;<compat> 11AF 11BA 11BA;;;;N;;;;;
+11D7;HANGUL JONGSEONG RIEUL-PANSIOS;Lo;0;L;<compat> 11AF 11EB;;;;N;;;;;
+11D8;HANGUL JONGSEONG RIEUL-KHIEUKH;Lo;0;L;<compat> 11AF 11BF;;;;N;;;;;
+11D9;HANGUL JONGSEONG RIEUL-YEORINHIEUH;Lo;0;L;<compat> 11AF 11F9;;;;N;;;;;
+11DA;HANGUL JONGSEONG MIEUM-KIYEOK;Lo;0;L;<compat> 11B7 11A8;;;;N;;;;;
+11DB;HANGUL JONGSEONG MIEUM-RIEUL;Lo;0;L;<compat> 11B7 11AF;;;;N;;;;;
+11DC;HANGUL JONGSEONG MIEUM-PIEUP;Lo;0;L;<compat> 11B7 11B8;;;;N;;;;;
+11DD;HANGUL JONGSEONG MIEUM-SIOS;Lo;0;L;<compat> 11B7 11BA;;;;N;;;;;
+11DE;HANGUL JONGSEONG MIEUM-SSANGSIOS;Lo;0;L;<compat> 11B7 11BA 11BA;;;;N;;;;;
+11DF;HANGUL JONGSEONG MIEUM-PANSIOS;Lo;0;L;<compat> 11B7 11EB;;;;N;;;;;
+11E0;HANGUL JONGSEONG MIEUM-CHIEUCH;Lo;0;L;<compat> 11B7 11BE;;;;N;;;;;
+11E1;HANGUL JONGSEONG MIEUM-HIEUH;Lo;0;L;<compat> 11B7 11C2;;;;N;;;;;
+11E2;HANGUL JONGSEONG KAPYEOUNMIEUM;Lo;0;L;<compat> 11B7 11BC;;;;N;;;;;
+11E3;HANGUL JONGSEONG PIEUP-RIEUL;Lo;0;L;<compat> 11B8 11AF;;;;N;;;;;
+11E4;HANGUL JONGSEONG PIEUP-PHIEUPH;Lo;0;L;<compat> 11B8 11C1;;;;N;;;;;
+11E5;HANGUL JONGSEONG PIEUP-HIEUH;Lo;0;L;<compat> 11B8 11C2;;;;N;;;;;
+11E6;HANGUL JONGSEONG KAPYEOUNPIEUP;Lo;0;L;<compat> 11B8 11BC;;;;N;;;;;
+11E7;HANGUL JONGSEONG SIOS-KIYEOK;Lo;0;L;<compat> 11BA 11A8;;;;N;;;;;
+11E8;HANGUL JONGSEONG SIOS-TIKEUT;Lo;0;L;<compat> 11BA 11AE;;;;N;;;;;
+11E9;HANGUL JONGSEONG SIOS-RIEUL;Lo;0;L;<compat> 11BA 11AF;;;;N;;;;;
+11EA;HANGUL JONGSEONG SIOS-PIEUP;Lo;0;L;<compat> 11BA 11B8;;;;N;;;;;
+11EB;HANGUL JONGSEONG PANSIOS;Lo;0;L;;;;;N;;;;;
+11EC;HANGUL JONGSEONG IEUNG-KIYEOK;Lo;0;L;<compat> 11BC 11A8;;;;N;;;;;
+11ED;HANGUL JONGSEONG IEUNG-SSANGKIYEOK;Lo;0;L;<compat> 11BC 11A8 11A8;;;;N;;;;;
+11EE;HANGUL JONGSEONG SSANGIEUNG;Lo;0;L;<compat> 11BC 11BC;;;;N;;;;;
+11EF;HANGUL JONGSEONG IEUNG-KHIEUKH;Lo;0;L;<compat> 11BC 11BF;;;;N;;;;;
+11F0;HANGUL JONGSEONG YESIEUNG;Lo;0;L;;;;;N;;;;;
+11F1;HANGUL JONGSEONG YESIEUNG-SIOS;Lo;0;L;<compat> 11F0 11BA;;;;N;;;;;
+11F2;HANGUL JONGSEONG YESIEUNG-PANSIOS;Lo;0;L;<compat> 11F0 11EB;;;;N;;;;;
+11F3;HANGUL JONGSEONG PHIEUPH-PIEUP;Lo;0;L;<compat> 11C1 11B8;;;;N;;;;;
+11F4;HANGUL JONGSEONG KAPYEOUNPHIEUPH;Lo;0;L;<compat> 11C1 11BC;;;;N;;;;;
+11F5;HANGUL JONGSEONG HIEUH-NIEUN;Lo;0;L;<compat> 11C2 11AB;;;;N;;;;;
+11F6;HANGUL JONGSEONG HIEUH-RIEUL;Lo;0;L;<compat> 11C2 11AF;;;;N;;;;;
+11F7;HANGUL JONGSEONG HIEUH-MIEUM;Lo;0;L;<compat> 11C2 11B7;;;;N;;;;;
+11F8;HANGUL JONGSEONG HIEUH-PIEUP;Lo;0;L;<compat> 11C2 11B8;;;;N;;;;;
+11F9;HANGUL JONGSEONG YEORINHIEUH;Lo;0;L;;;;;N;;;;;
+1E00;LATIN CAPITAL LETTER A WITH RING BELOW;Lu;0;L;0041 0325;;;;N;;;;1E01;
+1E01;LATIN SMALL LETTER A WITH RING BELOW;Ll;0;L;0061 0325;;;;N;;;1E00;;1E00
+1E02;LATIN CAPITAL LETTER B WITH DOT ABOVE;Lu;0;L;0042 0307;;;;N;;;;1E03;
+1E03;LATIN SMALL LETTER B WITH DOT ABOVE;Ll;0;L;0062 0307;;;;N;;;1E02;;1E02
+1E04;LATIN CAPITAL LETTER B WITH DOT BELOW;Lu;0;L;0042 0323;;;;N;;;;1E05;
+1E05;LATIN SMALL LETTER B WITH DOT BELOW;Ll;0;L;0062 0323;;;;N;;;1E04;;1E04
+1E06;LATIN CAPITAL LETTER B WITH LINE BELOW;Lu;0;L;0042 0331;;;;N;;;;1E07;
+1E07;LATIN SMALL LETTER B WITH LINE BELOW;Ll;0;L;0062 0331;;;;N;;;1E06;;1E06
+1E08;LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE;Lu;0;L;00C7 0301;;;;N;;;;1E09;
+1E09;LATIN SMALL LETTER C WITH CEDILLA AND ACUTE;Ll;0;L;00E7 0301;;;;N;;;1E08;;1E08
+1E0A;LATIN CAPITAL LETTER D WITH DOT ABOVE;Lu;0;L;0044 0307;;;;N;;;;1E0B;
+1E0B;LATIN SMALL LETTER D WITH DOT ABOVE;Ll;0;L;0064 0307;;;;N;;;1E0A;;1E0A
+1E0C;LATIN CAPITAL LETTER D WITH DOT BELOW;Lu;0;L;0044 0323;;;;N;;;;1E0D;
+1E0D;LATIN SMALL LETTER D WITH DOT BELOW;Ll;0;L;0064 0323;;;;N;;;1E0C;;1E0C
+1E0E;LATIN CAPITAL LETTER D WITH LINE BELOW;Lu;0;L;0044 0331;;;;N;;;;1E0F;
+1E0F;LATIN SMALL LETTER D WITH LINE BELOW;Ll;0;L;0064 0331;;;;N;;;1E0E;;1E0E
+1E10;LATIN CAPITAL LETTER D WITH CEDILLA;Lu;0;L;0044 0327;;;;N;;;;1E11;
+1E11;LATIN SMALL LETTER D WITH CEDILLA;Ll;0;L;0064 0327;;;;N;;;1E10;;1E10
+1E12;LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW;Lu;0;L;0044 032D;;;;N;;;;1E13;
+1E13;LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW;Ll;0;L;0064 032D;;;;N;;;1E12;;1E12
+1E14;LATIN CAPITAL LETTER E WITH MACRON AND GRAVE;Lu;0;L;0112 0300;;;;N;;;;1E15;
+1E15;LATIN SMALL LETTER E WITH MACRON AND GRAVE;Ll;0;L;0113 0300;;;;N;;;1E14;;1E14
+1E16;LATIN CAPITAL LETTER E WITH MACRON AND ACUTE;Lu;0;L;0112 0301;;;;N;;;;1E17;
+1E17;LATIN SMALL LETTER E WITH MACRON AND ACUTE;Ll;0;L;0113 0301;;;;N;;;1E16;;1E16
+1E18;LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW;Lu;0;L;0045 032D;;;;N;;;;1E19;
+1E19;LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW;Ll;0;L;0065 032D;;;;N;;;1E18;;1E18
+1E1A;LATIN CAPITAL LETTER E WITH TILDE BELOW;Lu;0;L;0045 0330;;;;N;;;;1E1B;
+1E1B;LATIN SMALL LETTER E WITH TILDE BELOW;Ll;0;L;0065 0330;;;;N;;;1E1A;;1E1A
+1E1C;LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE;Lu;0;L;0114 0327;;;;N;;;;1E1D;
+1E1D;LATIN SMALL LETTER E WITH CEDILLA AND BREVE;Ll;0;L;0115 0327;;;;N;;;1E1C;;1E1C
+1E1E;LATIN CAPITAL LETTER F WITH DOT ABOVE;Lu;0;L;0046 0307;;;;N;;;;1E1F;
+1E1F;LATIN SMALL LETTER F WITH DOT ABOVE;Ll;0;L;0066 0307;;;;N;;;1E1E;;1E1E
+1E20;LATIN CAPITAL LETTER G WITH MACRON;Lu;0;L;0047 0304;;;;N;;;;1E21;
+1E21;LATIN SMALL LETTER G WITH MACRON;Ll;0;L;0067 0304;;;;N;;;1E20;;1E20
+1E22;LATIN CAPITAL LETTER H WITH DOT ABOVE;Lu;0;L;0048 0307;;;;N;;;;1E23;
+1E23;LATIN SMALL LETTER H WITH DOT ABOVE;Ll;0;L;0068 0307;;;;N;;;1E22;;1E22
+1E24;LATIN CAPITAL LETTER H WITH DOT BELOW;Lu;0;L;0048 0323;;;;N;;;;1E25;
+1E25;LATIN SMALL LETTER H WITH DOT BELOW;Ll;0;L;0068 0323;;;;N;;;1E24;;1E24
+1E26;LATIN CAPITAL LETTER H WITH DIAERESIS;Lu;0;L;0048 0308;;;;N;;;;1E27;
+1E27;LATIN SMALL LETTER H WITH DIAERESIS;Ll;0;L;0068 0308;;;;N;;;1E26;;1E26
+1E28;LATIN CAPITAL LETTER H WITH CEDILLA;Lu;0;L;0048 0327;;;;N;;;;1E29;
+1E29;LATIN SMALL LETTER H WITH CEDILLA;Ll;0;L;0068 0327;;;;N;;;1E28;;1E28
+1E2A;LATIN CAPITAL LETTER H WITH BREVE BELOW;Lu;0;L;0048 032E;;;;N;;;;1E2B;
+1E2B;LATIN SMALL LETTER H WITH BREVE BELOW;Ll;0;L;0068 032E;;;;N;;;1E2A;;1E2A
+1E2C;LATIN CAPITAL LETTER I WITH TILDE BELOW;Lu;0;L;0049 0330;;;;N;;;;1E2D;
+1E2D;LATIN SMALL LETTER I WITH TILDE BELOW;Ll;0;L;0069 0330;;;;N;;;1E2C;;1E2C
+1E2E;LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE;Lu;0;L;00CF 0301;;;;N;;;;1E2F;
+1E2F;LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE;Ll;0;L;00EF 0301;;;;N;;;1E2E;;1E2E
+1E30;LATIN CAPITAL LETTER K WITH ACUTE;Lu;0;L;004B 0301;;;;N;;;;1E31;
+1E31;LATIN SMALL LETTER K WITH ACUTE;Ll;0;L;006B 0301;;;;N;;;1E30;;1E30
+1E32;LATIN CAPITAL LETTER K WITH DOT BELOW;Lu;0;L;004B 0323;;;;N;;;;1E33;
+1E33;LATIN SMALL LETTER K WITH DOT BELOW;Ll;0;L;006B 0323;;;;N;;;1E32;;1E32
+1E34;LATIN CAPITAL LETTER K WITH LINE BELOW;Lu;0;L;004B 0331;;;;N;;;;1E35;
+1E35;LATIN SMALL LETTER K WITH LINE BELOW;Ll;0;L;006B 0331;;;;N;;;1E34;;1E34
+1E36;LATIN CAPITAL LETTER L WITH DOT BELOW;Lu;0;L;004C 0323;;;;N;;;;1E37;
+1E37;LATIN SMALL LETTER L WITH DOT BELOW;Ll;0;L;006C 0323;;;;N;;;1E36;;1E36
+1E38;LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON;Lu;0;L;1E36 0304;;;;N;;;;1E39;
+1E39;LATIN SMALL LETTER L WITH DOT BELOW AND MACRON;Ll;0;L;1E37 0304;;;;N;;;1E38;;1E38
+1E3A;LATIN CAPITAL LETTER L WITH LINE BELOW;Lu;0;L;004C 0331;;;;N;;;;1E3B;
+1E3B;LATIN SMALL LETTER L WITH LINE BELOW;Ll;0;L;006C 0331;;;;N;;;1E3A;;1E3A
+1E3C;LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW;Lu;0;L;004C 032D;;;;N;;;;1E3D;
+1E3D;LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW;Ll;0;L;006C 032D;;;;N;;;1E3C;;1E3C
+1E3E;LATIN CAPITAL LETTER M WITH ACUTE;Lu;0;L;004D 0301;;;;N;;;;1E3F;
+1E3F;LATIN SMALL LETTER M WITH ACUTE;Ll;0;L;006D 0301;;;;N;;;1E3E;;1E3E
+1E40;LATIN CAPITAL LETTER M WITH DOT ABOVE;Lu;0;L;004D 0307;;;;N;;;;1E41;
+1E41;LATIN SMALL LETTER M WITH DOT ABOVE;Ll;0;L;006D 0307;;;;N;;;1E40;;1E40
+1E42;LATIN CAPITAL LETTER M WITH DOT BELOW;Lu;0;L;004D 0323;;;;N;;;;1E43;
+1E43;LATIN SMALL LETTER M WITH DOT BELOW;Ll;0;L;006D 0323;;;;N;;;1E42;;1E42
+1E44;LATIN CAPITAL LETTER N WITH DOT ABOVE;Lu;0;L;004E 0307;;;;N;;;;1E45;
+1E45;LATIN SMALL LETTER N WITH DOT ABOVE;Ll;0;L;006E 0307;;;;N;;;1E44;;1E44
+1E46;LATIN CAPITAL LETTER N WITH DOT BELOW;Lu;0;L;004E 0323;;;;N;;;;1E47;
+1E47;LATIN SMALL LETTER N WITH DOT BELOW;Ll;0;L;006E 0323;;;;N;;;1E46;;1E46
+1E48;LATIN CAPITAL LETTER N WITH LINE BELOW;Lu;0;L;004E 0331;;;;N;;;;1E49;
+1E49;LATIN SMALL LETTER N WITH LINE BELOW;Ll;0;L;006E 0331;;;;N;;;1E48;;1E48
+1E4A;LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW;Lu;0;L;004E 032D;;;;N;;;;1E4B;
+1E4B;LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW;Ll;0;L;006E 032D;;;;N;;;1E4A;;1E4A
+1E4C;LATIN CAPITAL LETTER O WITH TILDE AND ACUTE;Lu;0;L;00D5 0301;;;;N;;;;1E4D;
+1E4D;LATIN SMALL LETTER O WITH TILDE AND ACUTE;Ll;0;L;00F5 0301;;;;N;;;1E4C;;1E4C
+1E4E;LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS;Lu;0;L;00D5 0308;;;;N;;;;1E4F;
+1E4F;LATIN SMALL LETTER O WITH TILDE AND DIAERESIS;Ll;0;L;00F5 0308;;;;N;;;1E4E;;1E4E
+1E50;LATIN CAPITAL LETTER O WITH MACRON AND GRAVE;Lu;0;L;014C 0300;;;;N;;;;1E51;
+1E51;LATIN SMALL LETTER O WITH MACRON AND GRAVE;Ll;0;L;014D 0300;;;;N;;;1E50;;1E50
+1E52;LATIN CAPITAL LETTER O WITH MACRON AND ACUTE;Lu;0;L;014C 0301;;;;N;;;;1E53;
+1E53;LATIN SMALL LETTER O WITH MACRON AND ACUTE;Ll;0;L;014D 0301;;;;N;;;1E52;;1E52
+1E54;LATIN CAPITAL LETTER P WITH ACUTE;Lu;0;L;0050 0301;;;;N;;;;1E55;
+1E55;LATIN SMALL LETTER P WITH ACUTE;Ll;0;L;0070 0301;;;;N;;;1E54;;1E54
+1E56;LATIN CAPITAL LETTER P WITH DOT ABOVE;Lu;0;L;0050 0307;;;;N;;;;1E57;
+1E57;LATIN SMALL LETTER P WITH DOT ABOVE;Ll;0;L;0070 0307;;;;N;;;1E56;;1E56
+1E58;LATIN CAPITAL LETTER R WITH DOT ABOVE;Lu;0;L;0052 0307;;;;N;;;;1E59;
+1E59;LATIN SMALL LETTER R WITH DOT ABOVE;Ll;0;L;0072 0307;;;;N;;;1E58;;1E58
+1E5A;LATIN CAPITAL LETTER R WITH DOT BELOW;Lu;0;L;0052 0323;;;;N;;;;1E5B;
+1E5B;LATIN SMALL LETTER R WITH DOT BELOW;Ll;0;L;0072 0323;;;;N;;;1E5A;;1E5A
+1E5C;LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON;Lu;0;L;1E5A 0304;;;;N;;;;1E5D;
+1E5D;LATIN SMALL LETTER R WITH DOT BELOW AND MACRON;Ll;0;L;1E5B 0304;;;;N;;;1E5C;;1E5C
+1E5E;LATIN CAPITAL LETTER R WITH LINE BELOW;Lu;0;L;0052 0331;;;;N;;;;1E5F;
+1E5F;LATIN SMALL LETTER R WITH LINE BELOW;Ll;0;L;0072 0331;;;;N;;;1E5E;;1E5E
+1E60;LATIN CAPITAL LETTER S WITH DOT ABOVE;Lu;0;L;0053 0307;;;;N;;;;1E61;
+1E61;LATIN SMALL LETTER S WITH DOT ABOVE;Ll;0;L;0073 0307;;;;N;;;1E60;;1E60
+1E62;LATIN CAPITAL LETTER S WITH DOT BELOW;Lu;0;L;0053 0323;;;;N;;;;1E63;
+1E63;LATIN SMALL LETTER S WITH DOT BELOW;Ll;0;L;0073 0323;;;;N;;;1E62;;1E62
+1E64;LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE;Lu;0;L;015A 0307;;;;N;;;;1E65;
+1E65;LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE;Ll;0;L;015B 0307;;;;N;;;1E64;;1E64
+1E66;LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE;Lu;0;L;0160 0307;;;;N;;;;1E67;
+1E67;LATIN SMALL LETTER S WITH CARON AND DOT ABOVE;Ll;0;L;0161 0307;;;;N;;;1E66;;1E66
+1E68;LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE;Lu;0;L;1E62 0307;;;;N;;;;1E69;
+1E69;LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE;Ll;0;L;1E63 0307;;;;N;;;1E68;;1E68
+1E6A;LATIN CAPITAL LETTER T WITH DOT ABOVE;Lu;0;L;0054 0307;;;;N;;;;1E6B;
+1E6B;LATIN SMALL LETTER T WITH DOT ABOVE;Ll;0;L;0074 0307;;;;N;;;1E6A;;1E6A
+1E6C;LATIN CAPITAL LETTER T WITH DOT BELOW;Lu;0;L;0054 0323;;;;N;;;;1E6D;
+1E6D;LATIN SMALL LETTER T WITH DOT BELOW;Ll;0;L;0074 0323;;;;N;;;1E6C;;1E6C
+1E6E;LATIN CAPITAL LETTER T WITH LINE BELOW;Lu;0;L;0054 0331;;;;N;;;;1E6F;
+1E6F;LATIN SMALL LETTER T WITH LINE BELOW;Ll;0;L;0074 0331;;;;N;;;1E6E;;1E6E
+1E70;LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW;Lu;0;L;0054 032D;;;;N;;;;1E71;
+1E71;LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW;Ll;0;L;0074 032D;;;;N;;;1E70;;1E70
+1E72;LATIN CAPITAL LETTER U WITH DIAERESIS BELOW;Lu;0;L;0055 0324;;;;N;;;;1E73;
+1E73;LATIN SMALL LETTER U WITH DIAERESIS BELOW;Ll;0;L;0075 0324;;;;N;;;1E72;;1E72
+1E74;LATIN CAPITAL LETTER U WITH TILDE BELOW;Lu;0;L;0055 0330;;;;N;;;;1E75;
+1E75;LATIN SMALL LETTER U WITH TILDE BELOW;Ll;0;L;0075 0330;;;;N;;;1E74;;1E74
+1E76;LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW;Lu;0;L;0055 032D;;;;N;;;;1E77;
+1E77;LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW;Ll;0;L;0075 032D;;;;N;;;1E76;;1E76
+1E78;LATIN CAPITAL LETTER U WITH TILDE AND ACUTE;Lu;0;L;0168 0301;;;;N;;;;1E79;
+1E79;LATIN SMALL LETTER U WITH TILDE AND ACUTE;Ll;0;L;0169 0301;;;;N;;;1E78;;1E78
+1E7A;LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS;Lu;0;L;016A 0308;;;;N;;;;1E7B;
+1E7B;LATIN SMALL LETTER U WITH MACRON AND DIAERESIS;Ll;0;L;016B 0308;;;;N;;;1E7A;;1E7A
+1E7C;LATIN CAPITAL LETTER V WITH TILDE;Lu;0;L;0056 0303;;;;N;;;;1E7D;
+1E7D;LATIN SMALL LETTER V WITH TILDE;Ll;0;L;0076 0303;;;;N;;;1E7C;;1E7C
+1E7E;LATIN CAPITAL LETTER V WITH DOT BELOW;Lu;0;L;0056 0323;;;;N;;;;1E7F;
+1E7F;LATIN SMALL LETTER V WITH DOT BELOW;Ll;0;L;0076 0323;;;;N;;;1E7E;;1E7E
+1E80;LATIN CAPITAL LETTER W WITH GRAVE;Lu;0;L;0057 0300;;;;N;;;;1E81;
+1E81;LATIN SMALL LETTER W WITH GRAVE;Ll;0;L;0077 0300;;;;N;;;1E80;;1E80
+1E82;LATIN CAPITAL LETTER W WITH ACUTE;Lu;0;L;0057 0301;;;;N;;;;1E83;
+1E83;LATIN SMALL LETTER W WITH ACUTE;Ll;0;L;0077 0301;;;;N;;;1E82;;1E82
+1E84;LATIN CAPITAL LETTER W WITH DIAERESIS;Lu;0;L;0057 0308;;;;N;;;;1E85;
+1E85;LATIN SMALL LETTER W WITH DIAERESIS;Ll;0;L;0077 0308;;;;N;;;1E84;;1E84
+1E86;LATIN CAPITAL LETTER W WITH DOT ABOVE;Lu;0;L;0057 0307;;;;N;;;;1E87;
+1E87;LATIN SMALL LETTER W WITH DOT ABOVE;Ll;0;L;0077 0307;;;;N;;;1E86;;1E86
+1E88;LATIN CAPITAL LETTER W WITH DOT BELOW;Lu;0;L;0057 0323;;;;N;;;;1E89;
+1E89;LATIN SMALL LETTER W WITH DOT BELOW;Ll;0;L;0077 0323;;;;N;;;1E88;;1E88
+1E8A;LATIN CAPITAL LETTER X WITH DOT ABOVE;Lu;0;L;0058 0307;;;;N;;;;1E8B;
+1E8B;LATIN SMALL LETTER X WITH DOT ABOVE;Ll;0;L;0078 0307;;;;N;;;1E8A;;1E8A
+1E8C;LATIN CAPITAL LETTER X WITH DIAERESIS;Lu;0;L;0058 0308;;;;N;;;;1E8D;
+1E8D;LATIN SMALL LETTER X WITH DIAERESIS;Ll;0;L;0078 0308;;;;N;;;1E8C;;1E8C
+1E8E;LATIN CAPITAL LETTER Y WITH DOT ABOVE;Lu;0;L;0059 0307;;;;N;;;;1E8F;
+1E8F;LATIN SMALL LETTER Y WITH DOT ABOVE;Ll;0;L;0079 0307;;;;N;;;1E8E;;1E8E
+1E90;LATIN CAPITAL LETTER Z WITH CIRCUMFLEX;Lu;0;L;005A 0302;;;;N;;;;1E91;
+1E91;LATIN SMALL LETTER Z WITH CIRCUMFLEX;Ll;0;L;007A 0302;;;;N;;;1E90;;1E90
+1E92;LATIN CAPITAL LETTER Z WITH DOT BELOW;Lu;0;L;005A 0323;;;;N;;;;1E93;
+1E93;LATIN SMALL LETTER Z WITH DOT BELOW;Ll;0;L;007A 0323;;;;N;;;1E92;;1E92
+1E94;LATIN CAPITAL LETTER Z WITH LINE BELOW;Lu;0;L;005A 0331;;;;N;;;;1E95;
+1E95;LATIN SMALL LETTER Z WITH LINE BELOW;Ll;0;L;007A 0331;;;;N;;;1E94;;1E94
+1E96;LATIN SMALL LETTER H WITH LINE BELOW;Ll;0;L;0068 0331;;;;N;;;;;
+1E97;LATIN SMALL LETTER T WITH DIAERESIS;Ll;0;L;0074 0308;;;;N;;;;;
+1E98;LATIN SMALL LETTER W WITH RING ABOVE;Ll;0;L;0077 030A;;;;N;;;;;
+1E99;LATIN SMALL LETTER Y WITH RING ABOVE;Ll;0;L;0079 030A;;;;N;;;;;
+1E9A;LATIN SMALL LETTER A WITH RIGHT HALF RING;Ll;0;L;;;;;N;;;;;
+1E9B;LATIN SMALL LETTER LONG S WITH DOT ABOVE;Ll;0;L;017F 0307;;;;N;;;;;
+1EA0;LATIN CAPITAL LETTER A WITH DOT BELOW;Lu;0;L;0041 0323;;;;N;;;;1EA1;
+1EA1;LATIN SMALL LETTER A WITH DOT BELOW;Ll;0;L;0061 0323;;;;N;;;1EA0;;1EA0
+1EA2;LATIN CAPITAL LETTER A WITH HOOK ABOVE;Lu;0;L;0041 0309;;;;N;;;;1EA3;
+1EA3;LATIN SMALL LETTER A WITH HOOK ABOVE;Ll;0;L;0061 0309;;;;N;;;1EA2;;1EA2
+1EA4;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00C2 0301;;;;N;;;;1EA5;
+1EA5;LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00E2 0301;;;;N;;;1EA4;;1EA4
+1EA6;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00C2 0300;;;;N;;;;1EA7;
+1EA7;LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00E2 0300;;;;N;;;1EA6;;1EA6
+1EA8;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00C2 0309;;;;N;;;;1EA9;
+1EA9;LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00E2 0309;;;;N;;;1EA8;;1EA8
+1EAA;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE;Lu;0;L;00C2 0303;;;;N;;;;1EAB;
+1EAB;LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE;Ll;0;L;00E2 0303;;;;N;;;1EAA;;1EAA
+1EAC;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;00C2 0323;;;;N;;;;1EAD;
+1EAD;LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;00E2 0323;;;;N;;;1EAC;;1EAC
+1EAE;LATIN CAPITAL LETTER A WITH BREVE AND ACUTE;Lu;0;L;0102 0301;;;;N;;;;1EAF;
+1EAF;LATIN SMALL LETTER A WITH BREVE AND ACUTE;Ll;0;L;0103 0301;;;;N;;;1EAE;;1EAE
+1EB0;LATIN CAPITAL LETTER A WITH BREVE AND GRAVE;Lu;0;L;0102 0300;;;;N;;;;1EB1;
+1EB1;LATIN SMALL LETTER A WITH BREVE AND GRAVE;Ll;0;L;0103 0300;;;;N;;;1EB0;;1EB0
+1EB2;LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE;Lu;0;L;0102 0309;;;;N;;;;1EB3;
+1EB3;LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE;Ll;0;L;0103 0309;;;;N;;;1EB2;;1EB2
+1EB4;LATIN CAPITAL LETTER A WITH BREVE AND TILDE;Lu;0;L;0102 0303;;;;N;;;;1EB5;
+1EB5;LATIN SMALL LETTER A WITH BREVE AND TILDE;Ll;0;L;0103 0303;;;;N;;;1EB4;;1EB4
+1EB6;LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW;Lu;0;L;0102 0323;;;;N;;;;1EB7;
+1EB7;LATIN SMALL LETTER A WITH BREVE AND DOT BELOW;Ll;0;L;0103 0323;;;;N;;;1EB6;;1EB6
+1EB8;LATIN CAPITAL LETTER E WITH DOT BELOW;Lu;0;L;0045 0323;;;;N;;;;1EB9;
+1EB9;LATIN SMALL LETTER E WITH DOT BELOW;Ll;0;L;0065 0323;;;;N;;;1EB8;;1EB8
+1EBA;LATIN CAPITAL LETTER E WITH HOOK ABOVE;Lu;0;L;0045 0309;;;;N;;;;1EBB;
+1EBB;LATIN SMALL LETTER E WITH HOOK ABOVE;Ll;0;L;0065 0309;;;;N;;;1EBA;;1EBA
+1EBC;LATIN CAPITAL LETTER E WITH TILDE;Lu;0;L;0045 0303;;;;N;;;;1EBD;
+1EBD;LATIN SMALL LETTER E WITH TILDE;Ll;0;L;0065 0303;;;;N;;;1EBC;;1EBC
+1EBE;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00CA 0301;;;;N;;;;1EBF;
+1EBF;LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00EA 0301;;;;N;;;1EBE;;1EBE
+1EC0;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00CA 0300;;;;N;;;;1EC1;
+1EC1;LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00EA 0300;;;;N;;;1EC0;;1EC0
+1EC2;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00CA 0309;;;;N;;;;1EC3;
+1EC3;LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00EA 0309;;;;N;;;1EC2;;1EC2
+1EC4;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE;Lu;0;L;00CA 0303;;;;N;;;;1EC5;
+1EC5;LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE;Ll;0;L;00EA 0303;;;;N;;;1EC4;;1EC4
+1EC6;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;00CA 0323;;;;N;;;;1EC7;
+1EC7;LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;00EA 0323;;;;N;;;1EC6;;1EC6
+1EC8;LATIN CAPITAL LETTER I WITH HOOK ABOVE;Lu;0;L;0049 0309;;;;N;;;;1EC9;
+1EC9;LATIN SMALL LETTER I WITH HOOK ABOVE;Ll;0;L;0069 0309;;;;N;;;1EC8;;1EC8
+1ECA;LATIN CAPITAL LETTER I WITH DOT BELOW;Lu;0;L;0049 0323;;;;N;;;;1ECB;
+1ECB;LATIN SMALL LETTER I WITH DOT BELOW;Ll;0;L;0069 0323;;;;N;;;1ECA;;1ECA
+1ECC;LATIN CAPITAL LETTER O WITH DOT BELOW;Lu;0;L;004F 0323;;;;N;;;;1ECD;
+1ECD;LATIN SMALL LETTER O WITH DOT BELOW;Ll;0;L;006F 0323;;;;N;;;1ECC;;1ECC
+1ECE;LATIN CAPITAL LETTER O WITH HOOK ABOVE;Lu;0;L;004F 0309;;;;N;;;;1ECF;
+1ECF;LATIN SMALL LETTER O WITH HOOK ABOVE;Ll;0;L;006F 0309;;;;N;;;1ECE;;1ECE
+1ED0;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00D4 0301;;;;N;;;;1ED1;
+1ED1;LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00F4 0301;;;;N;;;1ED0;;1ED0
+1ED2;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00D4 0300;;;;N;;;;1ED3;
+1ED3;LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00F4 0300;;;;N;;;1ED2;;1ED2
+1ED4;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00D4 0309;;;;N;;;;1ED5;
+1ED5;LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00F4 0309;;;;N;;;1ED4;;1ED4
+1ED6;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE;Lu;0;L;00D4 0303;;;;N;;;;1ED7;
+1ED7;LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE;Ll;0;L;00F4 0303;;;;N;;;1ED6;;1ED6
+1ED8;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;00D4 0323;;;;N;;;;1ED9;
+1ED9;LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;00F4 0323;;;;N;;;1ED8;;1ED8
+1EDA;LATIN CAPITAL LETTER O WITH HORN AND ACUTE;Lu;0;L;01A0 0301;;;;N;;;;1EDB;
+1EDB;LATIN SMALL LETTER O WITH HORN AND ACUTE;Ll;0;L;01A1 0301;;;;N;;;1EDA;;1EDA
+1EDC;LATIN CAPITAL LETTER O WITH HORN AND GRAVE;Lu;0;L;01A0 0300;;;;N;;;;1EDD;
+1EDD;LATIN SMALL LETTER O WITH HORN AND GRAVE;Ll;0;L;01A1 0300;;;;N;;;1EDC;;1EDC
+1EDE;LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE;Lu;0;L;01A0 0309;;;;N;;;;1EDF;
+1EDF;LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE;Ll;0;L;01A1 0309;;;;N;;;1EDE;;1EDE
+1EE0;LATIN CAPITAL LETTER O WITH HORN AND TILDE;Lu;0;L;01A0 0303;;;;N;;;;1EE1;
+1EE1;LATIN SMALL LETTER O WITH HORN AND TILDE;Ll;0;L;01A1 0303;;;;N;;;1EE0;;1EE0
+1EE2;LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW;Lu;0;L;01A0 0323;;;;N;;;;1EE3;
+1EE3;LATIN SMALL LETTER O WITH HORN AND DOT BELOW;Ll;0;L;01A1 0323;;;;N;;;1EE2;;1EE2
+1EE4;LATIN CAPITAL LETTER U WITH DOT BELOW;Lu;0;L;0055 0323;;;;N;;;;1EE5;
+1EE5;LATIN SMALL LETTER U WITH DOT BELOW;Ll;0;L;0075 0323;;;;N;;;1EE4;;1EE4
+1EE6;LATIN CAPITAL LETTER U WITH HOOK ABOVE;Lu;0;L;0055 0309;;;;N;;;;1EE7;
+1EE7;LATIN SMALL LETTER U WITH HOOK ABOVE;Ll;0;L;0075 0309;;;;N;;;1EE6;;1EE6
+1EE8;LATIN CAPITAL LETTER U WITH HORN AND ACUTE;Lu;0;L;01AF 0301;;;;N;;;;1EE9;
+1EE9;LATIN SMALL LETTER U WITH HORN AND ACUTE;Ll;0;L;01B0 0301;;;;N;;;1EE8;;1EE8
+1EEA;LATIN CAPITAL LETTER U WITH HORN AND GRAVE;Lu;0;L;01AF 0300;;;;N;;;;1EEB;
+1EEB;LATIN SMALL LETTER U WITH HORN AND GRAVE;Ll;0;L;01B0 0300;;;;N;;;1EEA;;1EEA
+1EEC;LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE;Lu;0;L;01AF 0309;;;;N;;;;1EED;
+1EED;LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE;Ll;0;L;01B0 0309;;;;N;;;1EEC;;1EEC
+1EEE;LATIN CAPITAL LETTER U WITH HORN AND TILDE;Lu;0;L;01AF 0303;;;;N;;;;1EEF;
+1EEF;LATIN SMALL LETTER U WITH HORN AND TILDE;Ll;0;L;01B0 0303;;;;N;;;1EEE;;1EEE
+1EF0;LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW;Lu;0;L;01AF 0323;;;;N;;;;1EF1;
+1EF1;LATIN SMALL LETTER U WITH HORN AND DOT BELOW;Ll;0;L;01B0 0323;;;;N;;;1EF0;;1EF0
+1EF2;LATIN CAPITAL LETTER Y WITH GRAVE;Lu;0;L;0059 0300;;;;N;;;;1EF3;
+1EF3;LATIN SMALL LETTER Y WITH GRAVE;Ll;0;L;0079 0300;;;;N;;;1EF2;;1EF2
+1EF4;LATIN CAPITAL LETTER Y WITH DOT BELOW;Lu;0;L;0059 0323;;;;N;;;;1EF5;
+1EF5;LATIN SMALL LETTER Y WITH DOT BELOW;Ll;0;L;0079 0323;;;;N;;;1EF4;;1EF4
+1EF6;LATIN CAPITAL LETTER Y WITH HOOK ABOVE;Lu;0;L;0059 0309;;;;N;;;;1EF7;
+1EF7;LATIN SMALL LETTER Y WITH HOOK ABOVE;Ll;0;L;0079 0309;;;;N;;;1EF6;;1EF6
+1EF8;LATIN CAPITAL LETTER Y WITH TILDE;Lu;0;L;0059 0303;;;;N;;;;1EF9;
+1EF9;LATIN SMALL LETTER Y WITH TILDE;Ll;0;L;0079 0303;;;;N;;;1EF8;;1EF8
+1F00;GREEK SMALL LETTER ALPHA WITH PSILI;Ll;0;L;03B1 0313;;;;N;;;1F08;;1F08
+1F01;GREEK SMALL LETTER ALPHA WITH DASIA;Ll;0;L;03B1 0314;;;;N;;;1F09;;1F09
+1F02;GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA;Ll;0;L;1F00 0300;;;;N;;;1F0A;;1F0A
+1F03;GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA;Ll;0;L;1F01 0300;;;;N;;;1F0B;;1F0B
+1F04;GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA;Ll;0;L;1F00 0301;;;;N;;;1F0C;;1F0C
+1F05;GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA;Ll;0;L;1F01 0301;;;;N;;;1F0D;;1F0D
+1F06;GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI;Ll;0;L;1F00 0342;;;;N;;;1F0E;;1F0E
+1F07;GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI;Ll;0;L;1F01 0342;;;;N;;;1F0F;;1F0F
+1F08;GREEK CAPITAL LETTER ALPHA WITH PSILI;Lu;0;L;0391 0313;;;;N;;;;1F00;
+1F09;GREEK CAPITAL LETTER ALPHA WITH DASIA;Lu;0;L;0391 0314;;;;N;;;;1F01;
+1F0A;GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA;Lu;0;L;1F08 0300;;;;N;;;;1F02;
+1F0B;GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA;Lu;0;L;1F09 0300;;;;N;;;;1F03;
+1F0C;GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA;Lu;0;L;1F08 0301;;;;N;;;;1F04;
+1F0D;GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA;Lu;0;L;1F09 0301;;;;N;;;;1F05;
+1F0E;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI;Lu;0;L;1F08 0342;;;;N;;;;1F06;
+1F0F;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI;Lu;0;L;1F09 0342;;;;N;;;;1F07;
+1F10;GREEK SMALL LETTER EPSILON WITH PSILI;Ll;0;L;03B5 0313;;;;N;;;1F18;;1F18
+1F11;GREEK SMALL LETTER EPSILON WITH DASIA;Ll;0;L;03B5 0314;;;;N;;;1F19;;1F19
+1F12;GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA;Ll;0;L;1F10 0300;;;;N;;;1F1A;;1F1A
+1F13;GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA;Ll;0;L;1F11 0300;;;;N;;;1F1B;;1F1B
+1F14;GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA;Ll;0;L;1F10 0301;;;;N;;;1F1C;;1F1C
+1F15;GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA;Ll;0;L;1F11 0301;;;;N;;;1F1D;;1F1D
+1F18;GREEK CAPITAL LETTER EPSILON WITH PSILI;Lu;0;L;0395 0313;;;;N;;;;1F10;
+1F19;GREEK CAPITAL LETTER EPSILON WITH DASIA;Lu;0;L;0395 0314;;;;N;;;;1F11;
+1F1A;GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA;Lu;0;L;1F18 0300;;;;N;;;;1F12;
+1F1B;GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA;Lu;0;L;1F19 0300;;;;N;;;;1F13;
+1F1C;GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA;Lu;0;L;1F18 0301;;;;N;;;;1F14;
+1F1D;GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA;Lu;0;L;1F19 0301;;;;N;;;;1F15;
+1F20;GREEK SMALL LETTER ETA WITH PSILI;Ll;0;L;03B7 0313;;;;N;;;1F28;;1F28
+1F21;GREEK SMALL LETTER ETA WITH DASIA;Ll;0;L;03B7 0314;;;;N;;;1F29;;1F29
+1F22;GREEK SMALL LETTER ETA WITH PSILI AND VARIA;Ll;0;L;1F20 0300;;;;N;;;1F2A;;1F2A
+1F23;GREEK SMALL LETTER ETA WITH DASIA AND VARIA;Ll;0;L;1F21 0300;;;;N;;;1F2B;;1F2B
+1F24;GREEK SMALL LETTER ETA WITH PSILI AND OXIA;Ll;0;L;1F20 0301;;;;N;;;1F2C;;1F2C
+1F25;GREEK SMALL LETTER ETA WITH DASIA AND OXIA;Ll;0;L;1F21 0301;;;;N;;;1F2D;;1F2D
+1F26;GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI;Ll;0;L;1F20 0342;;;;N;;;1F2E;;1F2E
+1F27;GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI;Ll;0;L;1F21 0342;;;;N;;;1F2F;;1F2F
+1F28;GREEK CAPITAL LETTER ETA WITH PSILI;Lu;0;L;0397 0313;;;;N;;;;1F20;
+1F29;GREEK CAPITAL LETTER ETA WITH DASIA;Lu;0;L;0397 0314;;;;N;;;;1F21;
+1F2A;GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA;Lu;0;L;1F28 0300;;;;N;;;;1F22;
+1F2B;GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA;Lu;0;L;1F29 0300;;;;N;;;;1F23;
+1F2C;GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA;Lu;0;L;1F28 0301;;;;N;;;;1F24;
+1F2D;GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA;Lu;0;L;1F29 0301;;;;N;;;;1F25;
+1F2E;GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI;Lu;0;L;1F28 0342;;;;N;;;;1F26;
+1F2F;GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI;Lu;0;L;1F29 0342;;;;N;;;;1F27;
+1F30;GREEK SMALL LETTER IOTA WITH PSILI;Ll;0;L;03B9 0313;;;;N;;;1F38;;1F38
+1F31;GREEK SMALL LETTER IOTA WITH DASIA;Ll;0;L;03B9 0314;;;;N;;;1F39;;1F39
+1F32;GREEK SMALL LETTER IOTA WITH PSILI AND VARIA;Ll;0;L;1F30 0300;;;;N;;;1F3A;;1F3A
+1F33;GREEK SMALL LETTER IOTA WITH DASIA AND VARIA;Ll;0;L;1F31 0300;;;;N;;;1F3B;;1F3B
+1F34;GREEK SMALL LETTER IOTA WITH PSILI AND OXIA;Ll;0;L;1F30 0301;;;;N;;;1F3C;;1F3C
+1F35;GREEK SMALL LETTER IOTA WITH DASIA AND OXIA;Ll;0;L;1F31 0301;;;;N;;;1F3D;;1F3D
+1F36;GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI;Ll;0;L;1F30 0342;;;;N;;;1F3E;;1F3E
+1F37;GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI;Ll;0;L;1F31 0342;;;;N;;;1F3F;;1F3F
+1F38;GREEK CAPITAL LETTER IOTA WITH PSILI;Lu;0;L;0399 0313;;;;N;;;;1F30;
+1F39;GREEK CAPITAL LETTER IOTA WITH DASIA;Lu;0;L;0399 0314;;;;N;;;;1F31;
+1F3A;GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA;Lu;0;L;1F38 0300;;;;N;;;;1F32;
+1F3B;GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA;Lu;0;L;1F39 0300;;;;N;;;;1F33;
+1F3C;GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA;Lu;0;L;1F38 0301;;;;N;;;;1F34;
+1F3D;GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA;Lu;0;L;1F39 0301;;;;N;;;;1F35;
+1F3E;GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI;Lu;0;L;1F38 0342;;;;N;;;;1F36;
+1F3F;GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI;Lu;0;L;1F39 0342;;;;N;;;;1F37;
+1F40;GREEK SMALL LETTER OMICRON WITH PSILI;Ll;0;L;03BF 0313;;;;N;;;1F48;;1F48
+1F41;GREEK SMALL LETTER OMICRON WITH DASIA;Ll;0;L;03BF 0314;;;;N;;;1F49;;1F49
+1F42;GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA;Ll;0;L;1F40 0300;;;;N;;;1F4A;;1F4A
+1F43;GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA;Ll;0;L;1F41 0300;;;;N;;;1F4B;;1F4B
+1F44;GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA;Ll;0;L;1F40 0301;;;;N;;;1F4C;;1F4C
+1F45;GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA;Ll;0;L;1F41 0301;;;;N;;;1F4D;;1F4D
+1F48;GREEK CAPITAL LETTER OMICRON WITH PSILI;Lu;0;L;039F 0313;;;;N;;;;1F40;
+1F49;GREEK CAPITAL LETTER OMICRON WITH DASIA;Lu;0;L;039F 0314;;;;N;;;;1F41;
+1F4A;GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA;Lu;0;L;1F48 0300;;;;N;;;;1F42;
+1F4B;GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA;Lu;0;L;1F49 0300;;;;N;;;;1F43;
+1F4C;GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA;Lu;0;L;1F48 0301;;;;N;;;;1F44;
+1F4D;GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA;Lu;0;L;1F49 0301;;;;N;;;;1F45;
+1F50;GREEK SMALL LETTER UPSILON WITH PSILI;Ll;0;L;03C5 0313;;;;N;;;;;
+1F51;GREEK SMALL LETTER UPSILON WITH DASIA;Ll;0;L;03C5 0314;;;;N;;;1F59;;1F59
+1F52;GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA;Ll;0;L;1F50 0300;;;;N;;;;;
+1F53;GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA;Ll;0;L;1F51 0300;;;;N;;;1F5B;;1F5B
+1F54;GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA;Ll;0;L;1F50 0301;;;;N;;;;;
+1F55;GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA;Ll;0;L;1F51 0301;;;;N;;;1F5D;;1F5D
+1F56;GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI;Ll;0;L;1F50 0342;;;;N;;;;;
+1F57;GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI;Ll;0;L;1F51 0342;;;;N;;;1F5F;;1F5F
+1F59;GREEK CAPITAL LETTER UPSILON WITH DASIA;Lu;0;L;03A5 0314;;;;N;;;;1F51;
+1F5B;GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA;Lu;0;L;1F59 0300;;;;N;;;;1F53;
+1F5D;GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA;Lu;0;L;1F59 0301;;;;N;;;;1F55;
+1F5F;GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI;Lu;0;L;1F59 0342;;;;N;;;;1F57;
+1F60;GREEK SMALL LETTER OMEGA WITH PSILI;Ll;0;L;03C9 0313;;;;N;;;1F68;;1F68
+1F61;GREEK SMALL LETTER OMEGA WITH DASIA;Ll;0;L;03C9 0314;;;;N;;;1F69;;1F69
+1F62;GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA;Ll;0;L;1F60 0300;;;;N;;;1F6A;;1F6A
+1F63;GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA;Ll;0;L;1F61 0300;;;;N;;;1F6B;;1F6B
+1F64;GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA;Ll;0;L;1F60 0301;;;;N;;;1F6C;;1F6C
+1F65;GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA;Ll;0;L;1F61 0301;;;;N;;;1F6D;;1F6D
+1F66;GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI;Ll;0;L;1F60 0342;;;;N;;;1F6E;;1F6E
+1F67;GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI;Ll;0;L;1F61 0342;;;;N;;;1F6F;;1F6F
+1F68;GREEK CAPITAL LETTER OMEGA WITH PSILI;Lu;0;L;03A9 0313;;;;N;;;;1F60;
+1F69;GREEK CAPITAL LETTER OMEGA WITH DASIA;Lu;0;L;03A9 0314;;;;N;;;;1F61;
+1F6A;GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA;Lu;0;L;1F68 0300;;;;N;;;;1F62;
+1F6B;GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA;Lu;0;L;1F69 0300;;;;N;;;;1F63;
+1F6C;GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA;Lu;0;L;1F68 0301;;;;N;;;;1F64;
+1F6D;GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA;Lu;0;L;1F69 0301;;;;N;;;;1F65;
+1F6E;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI;Lu;0;L;1F68 0342;;;;N;;;;1F66;
+1F6F;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI;Lu;0;L;1F69 0342;;;;N;;;;1F67;
+1F70;GREEK SMALL LETTER ALPHA WITH VARIA;Ll;0;L;03B1 0300;;;;N;;;1FBA;;1FBA
+1F71;GREEK SMALL LETTER ALPHA WITH OXIA;Ll;0;L;03B1 0301;;;;N;;;1FBB;;1FBB
+1F72;GREEK SMALL LETTER EPSILON WITH VARIA;Ll;0;L;03B5 0300;;;;N;;;1FC8;;1FC8
+1F73;GREEK SMALL LETTER EPSILON WITH OXIA;Ll;0;L;03B5 0301;;;;N;;;1FC9;;1FC9
+1F74;GREEK SMALL LETTER ETA WITH VARIA;Ll;0;L;03B7 0300;;;;N;;;1FCA;;1FCA
+1F75;GREEK SMALL LETTER ETA WITH OXIA;Ll;0;L;03B7 0301;;;;N;;;1FCB;;1FCB
+1F76;GREEK SMALL LETTER IOTA WITH VARIA;Ll;0;L;03B9 0300;;;;N;;;1FDA;;1FDA
+1F77;GREEK SMALL LETTER IOTA WITH OXIA;Ll;0;L;03B9 0301;;;;N;;;1FDB;;1FDB
+1F78;GREEK SMALL LETTER OMICRON WITH VARIA;Ll;0;L;03BF 0300;;;;N;;;1FF8;;1FF8
+1F79;GREEK SMALL LETTER OMICRON WITH OXIA;Ll;0;L;03BF 0301;;;;N;;;1FF9;;1FF9
+1F7A;GREEK SMALL LETTER UPSILON WITH VARIA;Ll;0;L;03C5 0300;;;;N;;;1FEA;;1FEA
+1F7B;GREEK SMALL LETTER UPSILON WITH OXIA;Ll;0;L;03C5 0301;;;;N;;;1FEB;;1FEB
+1F7C;GREEK SMALL LETTER OMEGA WITH VARIA;Ll;0;L;03C9 0300;;;;N;;;1FFA;;1FFA
+1F7D;GREEK SMALL LETTER OMEGA WITH OXIA;Ll;0;L;03C9 0301;;;;N;;;1FFB;;1FFB
+1F80;GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F00 0345;;;;N;;;1F88;;1F88
+1F81;GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F01 0345;;;;N;;;1F89;;1F89
+1F82;GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F02 0345;;;;N;;;1F8A;;1F8A
+1F83;GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F03 0345;;;;N;;;1F8B;;1F8B
+1F84;GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F04 0345;;;;N;;;1F8C;;1F8C
+1F85;GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F05 0345;;;;N;;;1F8D;;1F8D
+1F86;GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F06 0345;;;;N;;;1F8E;;1F8E
+1F87;GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F07 0345;;;;N;;;1F8F;;1F8F
+1F88;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI;Lu;0;L;1F08 0345;;;;N;;;;1F80;
+1F89;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI;Lu;0;L;1F09 0345;;;;N;;;;1F81;
+1F8A;GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lu;0;L;1F0A 0345;;;;N;;;;1F82;
+1F8B;GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lu;0;L;1F0B 0345;;;;N;;;;1F83;
+1F8C;GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lu;0;L;1F0C 0345;;;;N;;;;1F84;
+1F8D;GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lu;0;L;1F0D 0345;;;;N;;;;1F85;
+1F8E;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lu;0;L;1F0E 0345;;;;N;;;;1F86;
+1F8F;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lu;0;L;1F0F 0345;;;;N;;;;1F87;
+1F90;GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F20 0345;;;;N;;;1F98;;1F98
+1F91;GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F21 0345;;;;N;;;1F99;;1F99
+1F92;GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F22 0345;;;;N;;;1F9A;;1F9A
+1F93;GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F23 0345;;;;N;;;1F9B;;1F9B
+1F94;GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F24 0345;;;;N;;;1F9C;;1F9C
+1F95;GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F25 0345;;;;N;;;1F9D;;1F9D
+1F96;GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F26 0345;;;;N;;;1F9E;;1F9E
+1F97;GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F27 0345;;;;N;;;1F9F;;1F9F
+1F98;GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI;Lu;0;L;1F28 0345;;;;N;;;;1F90;
+1F99;GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI;Lu;0;L;1F29 0345;;;;N;;;;1F91;
+1F9A;GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lu;0;L;1F2A 0345;;;;N;;;;1F92;
+1F9B;GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lu;0;L;1F2B 0345;;;;N;;;;1F93;
+1F9C;GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lu;0;L;1F2C 0345;;;;N;;;;1F94;
+1F9D;GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lu;0;L;1F2D 0345;;;;N;;;;1F95;
+1F9E;GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lu;0;L;1F2E 0345;;;;N;;;;1F96;
+1F9F;GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lu;0;L;1F2F 0345;;;;N;;;;1F97;
+1FA0;GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F60 0345;;;;N;;;1FA8;;1FA8
+1FA1;GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F61 0345;;;;N;;;1FA9;;1FA9
+1FA2;GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F62 0345;;;;N;;;1FAA;;1FAA
+1FA3;GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F63 0345;;;;N;;;1FAB;;1FAB
+1FA4;GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F64 0345;;;;N;;;1FAC;;1FAC
+1FA5;GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F65 0345;;;;N;;;1FAD;;1FAD
+1FA6;GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F66 0345;;;;N;;;1FAE;;1FAE
+1FA7;GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F67 0345;;;;N;;;1FAF;;1FAF
+1FA8;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI;Lu;0;L;1F68 0345;;;;N;;;;1FA0;
+1FA9;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI;Lu;0;L;1F69 0345;;;;N;;;;1FA1;
+1FAA;GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lu;0;L;1F6A 0345;;;;N;;;;1FA2;
+1FAB;GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lu;0;L;1F6B 0345;;;;N;;;;1FA3;
+1FAC;GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lu;0;L;1F6C 0345;;;;N;;;;1FA4;
+1FAD;GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lu;0;L;1F6D 0345;;;;N;;;;1FA5;
+1FAE;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lu;0;L;1F6E 0345;;;;N;;;;1FA6;
+1FAF;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lu;0;L;1F6F 0345;;;;N;;;;1FA7;
+1FB0;GREEK SMALL LETTER ALPHA WITH VRACHY;Ll;0;L;03B1 0306;;;;N;;;1FB8;;1FB8
+1FB1;GREEK SMALL LETTER ALPHA WITH MACRON;Ll;0;L;03B1 0304;;;;N;;;1FB9;;1FB9
+1FB2;GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F70 0345;;;;N;;;;;
+1FB3;GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI;Ll;0;L;03B1 0345;;;;N;;;1FBC;;1FBC
+1FB4;GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;1F71 0345;;;;N;;;;;
+1FB6;GREEK SMALL LETTER ALPHA WITH PERISPOMENI;Ll;0;L;03B1 0342;;;;N;;;;;
+1FB7;GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FB6 0345;;;;N;;;;;
+1FB8;GREEK CAPITAL LETTER ALPHA WITH VRACHY;Lu;0;L;0391 0306;;;;N;;;;1FB0;
+1FB9;GREEK CAPITAL LETTER ALPHA WITH MACRON;Lu;0;L;0391 0304;;;;N;;;;1FB1;
+1FBA;GREEK CAPITAL LETTER ALPHA WITH VARIA;Lu;0;L;0391 0300;;;;N;;;;1F70;
+1FBB;GREEK CAPITAL LETTER ALPHA WITH OXIA;Lu;0;L;0391 0301;;;;N;;;;1F71;
+1FBC;GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI;Lu;0;L;0391 0345;;;;N;;;;1FB3;
+1FBD;GREEK KORONIS;Lm;0;L;<compat> 0020 0313;;;;N;;;;;
+1FBE;GREEK PROSGEGRAMMENI;Lu;0;L;0399;;;;N;;;;;
+1FBF;GREEK PSILI;Lm;0;L;<compat> 0020 0313;;;;N;;;;;
+1FC0;GREEK PERISPOMENI;Lm;0;L;<compat> 0020 0342;;;;N;;;;;
+1FC1;GREEK DIALYTIKA AND PERISPOMENI;Lm;0;L;00A8 0342;;;;N;;;;;
+1FC2;GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F74 0345;;;;N;;;;;
+1FC3;GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI;Ll;0;L;03B7 0345;;;;N;;;1FCC;;1FCC
+1FC4;GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;1F75 0345;;;;N;;;;;
+1FC6;GREEK SMALL LETTER ETA WITH PERISPOMENI;Ll;0;L;03B7 0342;;;;N;;;;;
+1FC7;GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FC6 0345;;;;N;;;;;
+1FC8;GREEK CAPITAL LETTER EPSILON WITH VARIA;Lu;0;L;0395 0300;;;;N;;;;1F72;
+1FC9;GREEK CAPITAL LETTER EPSILON WITH OXIA;Lu;0;L;0395 0301;;;;N;;;;1F73;
+1FCA;GREEK CAPITAL LETTER ETA WITH VARIA;Lu;0;L;0397 0300;;;;N;;;;1F74;
+1FCB;GREEK CAPITAL LETTER ETA WITH OXIA;Lu;0;L;0397 0301;;;;N;;;;1F75;
+1FCC;GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI;Lu;0;L;0397 0345;;;;N;;;;1FC3;
+1FCD;GREEK PSILI AND VARIA;Lm;0;L;1FBF 0300;;;;N;;;;;
+1FCE;GREEK PSILI AND OXIA;Lm;0;L;1FBF 0301;;;;N;;;;;
+1FCF;GREEK PSILI AND PERISPOMENI;Lm;0;L;1FBF 0342;;;;N;;;;;
+1FD0;GREEK SMALL LETTER IOTA WITH VRACHY;Ll;0;L;03B9 0306;;;;N;;;1FD8;;1FD8
+1FD1;GREEK SMALL LETTER IOTA WITH MACRON;Ll;0;L;03B9 0304;;;;N;;;1FD9;;1FD9
+1FD2;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA;Ll;0;L;03CA 0300;;;;N;;;;;
+1FD3;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA;Ll;0;L;03CA 0301;;;;N;;;;;
+1FD6;GREEK SMALL LETTER IOTA WITH PERISPOMENI;Ll;0;L;03B9 0342;;;;N;;;;;
+1FD7;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI;Ll;0;L;03CA 0342;;;;N;;;;;
+1FD8;GREEK CAPITAL LETTER IOTA WITH VRACHY;Lu;0;L;0399 0306;;;;N;;;;1FD0;
+1FD9;GREEK CAPITAL LETTER IOTA WITH MACRON;Lu;0;L;0399 0304;;;;N;;;;1FD1;
+1FDA;GREEK CAPITAL LETTER IOTA WITH VARIA;Lu;0;L;0399 0300;;;;N;;;;1F76;
+1FDB;GREEK CAPITAL LETTER IOTA WITH OXIA;Lu;0;L;0399 0301;;;;N;;;;1F77;
+1FDD;GREEK DASIA AND VARIA;Lm;0;L;1FFE 0300;;;;N;;;;;
+1FDE;GREEK DASIA AND OXIA;Lm;0;L;1FFE 0301;;;;N;;;;;
+1FDF;GREEK DASIA AND PERISPOMENI;Lm;0;L;1FFE 0342;;;;N;;;;;
+1FE0;GREEK SMALL LETTER UPSILON WITH VRACHY;Ll;0;L;03C5 0306;;;;N;;;1FE8;;1FE8
+1FE1;GREEK SMALL LETTER UPSILON WITH MACRON;Ll;0;L;03C5 0304;;;;N;;;1FE9;;1FE9
+1FE2;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA;Ll;0;L;03CB 0300;;;;N;;;;;
+1FE3;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA;Ll;0;L;03CB 0301;;;;N;;;;;
+1FE4;GREEK SMALL LETTER RHO WITH PSILI;Ll;0;L;03C1 0313;;;;N;;;;;
+1FE5;GREEK SMALL LETTER RHO WITH DASIA;Ll;0;L;03C1 0314;;;;N;;;1FEC;;1FEC
+1FE6;GREEK SMALL LETTER UPSILON WITH PERISPOMENI;Ll;0;L;03C5 0342;;;;N;;;;;
+1FE7;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI;Ll;0;L;03CB 0342;;;;N;;;;;
+1FE8;GREEK CAPITAL LETTER UPSILON WITH VRACHY;Lu;0;L;03A5 0306;;;;N;;;;1FE0;
+1FE9;GREEK CAPITAL LETTER UPSILON WITH MACRON;Lu;0;L;03A5 0304;;;;N;;;;1FE1;
+1FEA;GREEK CAPITAL LETTER UPSILON WITH VARIA;Lu;0;L;03A5 0300;;;;N;;;;1F7A;
+1FEB;GREEK CAPITAL LETTER UPSILON WITH OXIA;Lu;0;L;03A5 0301;;;;N;;;;1F7B;
+1FEC;GREEK CAPITAL LETTER RHO WITH DASIA;Lu;0;L;03A1 0314;;;;N;;;;1FE5;
+1FED;GREEK DIALYTIKA AND VARIA;Lm;0;L;00A8 0300;;;;N;;;;;
+1FEE;GREEK DIALYTIKA AND OXIA;Lm;0;L;00A8 0301;;;;N;;;;;
+1FEF;GREEK VARIA;Lm;0;L;0060;;;;N;;;;;
+1FF2;GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F7C 0345;;;;N;;;;;
+1FF3;GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI;Ll;0;L;03C9 0345;;;;N;;;1FFC;;1FFC
+1FF4;GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;1F79 0345;;;;N;;;;;
+1FF6;GREEK SMALL LETTER OMEGA WITH PERISPOMENI;Ll;0;L;03C9 0342;;;;N;;;;;
+1FF7;GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FF6 0345;;;;N;;;;;
+1FF8;GREEK CAPITAL LETTER OMICRON WITH VARIA;Lu;0;L;039F 0300;;;;N;;;;1F78;
+1FF9;GREEK CAPITAL LETTER OMICRON WITH OXIA;Lu;0;L;039F 0301;;;;N;;;;1F79;
+1FFA;GREEK CAPITAL LETTER OMEGA WITH VARIA;Lu;0;L;03A9 0300;;;;N;;;;1F7C;
+1FFB;GREEK CAPITAL LETTER OMEGA WITH OXIA;Lu;0;L;03A9 0301;;;;N;;;;1F7D;
+1FFC;GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI;Lu;0;L;03A9 0345;;;;N;;;;1FF3;
+1FFD;GREEK OXIA;Lm;0;L;00B4;;;;N;;;;;
+1FFE;GREEK DASIA;Lm;0;L;<compat> 0020 0314;;;;N;;;;;
+2000;EN QUAD;Zs;0;WS;2002;;;;N;;;;;
+2001;EM QUAD;Zs;0;WS;2003;;;;N;;;;;
+2002;EN SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;;
+2003;EM SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;;
+2004;THREE-PER-EM SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;;
+2005;FOUR-PER-EM SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;;
+2006;SIX-PER-EM SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;;
+2007;FIGURE SPACE;Zs;0;ES;<noBreak> 0020;;;;N;;;;;
+2008;PUNCTUATION SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;;
+2009;THIN SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;;
+200A;HAIR SPACE;Zs;0;WS;<compat> 0020;;;;N;;;;;
+200B;ZERO WIDTH SPACE;Zs;0;WS;;;;;N;;;;;
+200C;ZERO WIDTH NON-JOINER;Cc;0;ON;;;;;N;;;;;
+200D;ZERO WIDTH JOINER;Cc;0;ON;;;;;N;;;;;
+200E;LEFT-TO-RIGHT MARK;Cc;0;L;;;;;N;;;;;
+200F;RIGHT-TO-LEFT MARK;Cc;0;R;;;;;N;;;;;
+2010;HYPHEN;Pd;0;ON;;;;;N;;;;;
+2011;NON-BREAKING HYPHEN;Pd;0;ON;<noBreak> 2010;;;;N;;;;;
+2012;FIGURE DASH;Pd;0;ON;;;;;N;;;;;
+2013;EN DASH;Pd;0;ON;;;;;N;;;;;
+2014;EM DASH;Pd;0;ON;;;;;N;;;;;
+2015;HORIZONTAL BAR;Pd;0;ON;;;;;N;QUOTATION DASH;;;;
+2016;DOUBLE VERTICAL LINE;Po;0;ON;;;;;N;DOUBLE VERTICAL BAR;;;;
+2017;DOUBLE LOW LINE;Po;0;ON;<compat> 0020 0333;;;;N;SPACING DOUBLE UNDERSCORE;;;;
+2018;LEFT SINGLE QUOTATION MARK;Ps;0;ON;;;;;N;SINGLE TURNED COMMA QUOTATION MARK;;;;
+2019;RIGHT SINGLE QUOTATION MARK;Pe;0;ON;;;;;N;SINGLE COMMA QUOTATION MARK;;;;
+201A;SINGLE LOW-9 QUOTATION MARK;Po;0;ON;;;;;N;LOW SINGLE COMMA QUOTATION MARK;;;;
+201B;SINGLE HIGH-REVERSED-9 QUOTATION MARK;Po;0;ON;;;;;N;SINGLE REVERSED COMMA QUOTATION MARK;;;;
+201C;LEFT DOUBLE QUOTATION MARK;Ps;0;ON;;;;;N;DOUBLE TURNED COMMA QUOTATION MARK;;;;
+201D;RIGHT DOUBLE QUOTATION MARK;Pe;0;ON;;;;;N;DOUBLE COMMA QUOTATION MARK;;;;
+201E;DOUBLE LOW-9 QUOTATION MARK;Po;0;ON;;;;;N;LOW DOUBLE COMMA QUOTATION MARK;;;;
+201F;DOUBLE HIGH-REVERSED-9 QUOTATION MARK;Po;0;ON;;;;;N;DOUBLE REVERSED COMMA QUOTATION MARK;;;;
+2020;DAGGER;Po;0;ON;;;;;N;;;;;
+2021;DOUBLE DAGGER;Po;0;ON;;;;;N;;;;;
+2022;BULLET;Po;0;ON;;;;;N;;;;;
+2023;TRIANGULAR BULLET;Po;0;ON;;;;;N;;;;;
+2024;ONE DOT LEADER;Po;0;ON;<compat> 002E;;;;N;;;;;
+2025;TWO DOT LEADER;Po;0;ON;<compat> 002E 002E;;;;N;;;;;
+2026;HORIZONTAL ELLIPSIS;Po;0;ON;<compat> 002E 002E 002E;;;;N;;;;;
+2027;HYPHENATION POINT;Po;0;ON;;;;;N;;;;;
+2028;LINE SEPARATOR;Zl;0;B;;;;;N;;;;;
+2029;PARAGRAPH SEPARATOR;Zp;0;B;;;;;N;;;;;
+202A;LEFT-TO-RIGHT EMBEDDING;Cc;0;ON;;;;;N;;;;;
+202B;RIGHT-TO-LEFT EMBEDDING;Cc;0;ON;;;;;N;;;;;
+202C;POP DIRECTIONAL FORMATTING;Cc;0;ON;;;;;N;;;;;
+202D;LEFT-TO-RIGHT OVERRIDE;Cc;0;ON;;;;;N;;;;;
+202E;RIGHT-TO-LEFT OVERRIDE;Cc;0;ON;;;;;N;;;;;
+2030;PER MILLE SIGN;Po;0;ET;;;;;N;;;;;
+2031;PER TEN THOUSAND SIGN;Po;0;ET;;;;;N;;;;;
+2032;PRIME;Po;0;ET;;;;;N;;;;;
+2033;DOUBLE PRIME;Po;0;ET;<compat> 2032 2032;;;;N;;;;;
+2034;TRIPLE PRIME;Po;0;ET;<compat> 2032 2032 2032;;;;N;;;;;
+2035;REVERSED PRIME;Po;0;ON;;;;;N;;;;;
+2036;REVERSED DOUBLE PRIME;Po;0;ON;<compat> 2035 2035;;;;N;;;;;
+2037;REVERSED TRIPLE PRIME;Po;0;ON;<compat> 2035 2035 2035;;;;N;;;;;
+2038;CARET;Po;0;ON;;;;;N;;;;;
+2039;SINGLE LEFT-POINTING ANGLE QUOTATION MARK;Ps;0;ON;;;;;N;LEFT POINTING SINGLE GUILLEMET;;;;
+203A;SINGLE RIGHT-POINTING ANGLE QUOTATION MARK;Pe;0;ON;;;;;N;RIGHT POINTING SINGLE GUILLEMET;;;;
+203B;REFERENCE MARK;Po;0;ON;;;;;N;;;;;
+203C;DOUBLE EXCLAMATION MARK;Po;0;ON;<compat> 0021 0021;;;;N;;;;;
+203D;INTERROBANG;So;0;ON;;;;;N;;;;;
+203E;OVERLINE;So;0;ON;<compat> 0020 0305;;;;N;SPACING OVERSCORE;;;;
+203F;UNDERTIE;So;0;ON;;;;;N;;Enotikon;;;
+2040;CHARACTER TIE;So;0;ON;;;;;N;;;;;
+2041;CARET INSERTION POINT;So;0;ON;;;;;N;;;;;
+2042;ASTERISM;So;0;ON;;;;;N;;;;;
+2043;HYPHEN BULLET;So;0;ON;;;;;N;;;;;
+2044;FRACTION SLASH;Sm;0;ON;;;;;N;;;;;
+2045;LEFT SQUARE BRACKET WITH QUILL;Ps;0;ON;;;;;Y;;;;;
+2046;RIGHT SQUARE BRACKET WITH QUILL;Pe;0;ON;;;;;Y;;;;;
+206A;INHIBIT SYMMETRIC SWAPPING;Cc;0;ON;;;;;N;;;;;
+206B;ACTIVATE SYMMETRIC SWAPPING;Cc;0;ON;;;;;N;;;;;
+206C;INHIBIT ARABIC FORM SHAPING;Cc;0;ON;;;;;N;;;;;
+206D;ACTIVATE ARABIC FORM SHAPING;Cc;0;ON;;;;;N;;;;;
+206E;NATIONAL DIGIT SHAPES;Cc;0;ON;;;;;N;;;;;
+206F;NOMINAL DIGIT SHAPES;Cc;0;ON;;;;;N;;;;;
+2070;SUPERSCRIPT ZERO;Nd;0;EN;<super> 0030;0;0;0;N;SUPERSCRIPT DIGIT ZERO;;;;
+2074;SUPERSCRIPT FOUR;Nd;0;EN;<super> 0034;4;4;4;N;SUPERSCRIPT DIGIT FOUR;;;;
+2075;SUPERSCRIPT FIVE;Nd;0;EN;<super> 0035;5;5;5;N;SUPERSCRIPT DIGIT FIVE;;;;
+2076;SUPERSCRIPT SIX;Nd;0;EN;<super> 0036;6;6;6;N;SUPERSCRIPT DIGIT SIX;;;;
+2077;SUPERSCRIPT SEVEN;Nd;0;EN;<super> 0037;7;7;7;N;SUPERSCRIPT DIGIT SEVEN;;;;
+2078;SUPERSCRIPT EIGHT;Nd;0;EN;<super> 0038;8;8;8;N;SUPERSCRIPT DIGIT EIGHT;;;;
+2079;SUPERSCRIPT NINE;Nd;0;EN;<super> 0039;9;9;9;N;SUPERSCRIPT DIGIT NINE;;;;
+207A;SUPERSCRIPT PLUS SIGN;Sm;0;ET;<super> 002B;;;;N;;;;;
+207B;SUPERSCRIPT MINUS;Sm;0;ET;<super> 2212;;;;N;SUPERSCRIPT HYPHEN-MINUS;;;;
+207C;SUPERSCRIPT EQUALS SIGN;Sm;0;ON;<super> 003D;;;;N;;;;;
+207D;SUPERSCRIPT LEFT PARENTHESIS;Ps;0;ON;<super> 0028;;;;Y;SUPERSCRIPT OPENING PARENTHESIS;;;;
+207E;SUPERSCRIPT RIGHT PARENTHESIS;Pe;0;ON;<super> 0029;;;;Y;SUPERSCRIPT CLOSING PARENTHESIS;;;;
+207F;SUPERSCRIPT LATIN SMALL LETTER N;Ll;0;ON;<super> 006E;;;;N;;;;;
+2080;SUBSCRIPT ZERO;Nd;0;EN;<sub> 0030;0;0;0;N;SUBSCRIPT DIGIT ZERO;;;;
+2081;SUBSCRIPT ONE;Nd;0;EN;<sub> 0031;1;1;1;N;SUBSCRIPT DIGIT ONE;;;;
+2082;SUBSCRIPT TWO;Nd;0;EN;<sub> 0032;2;2;2;N;SUBSCRIPT DIGIT TWO;;;;
+2083;SUBSCRIPT THREE;Nd;0;EN;<sub> 0033;3;3;3;N;SUBSCRIPT DIGIT THREE;;;;
+2084;SUBSCRIPT FOUR;Nd;0;EN;<sub> 0034;4;4;4;N;SUBSCRIPT DIGIT FOUR;;;;
+2085;SUBSCRIPT FIVE;Nd;0;EN;<sub> 0035;5;5;5;N;SUBSCRIPT DIGIT FIVE;;;;
+2086;SUBSCRIPT SIX;Nd;0;EN;<sub> 0036;6;6;6;N;SUBSCRIPT DIGIT SIX;;;;
+2087;SUBSCRIPT SEVEN;Nd;0;EN;<sub> 0037;7;7;7;N;SUBSCRIPT DIGIT SEVEN;;;;
+2088;SUBSCRIPT EIGHT;Nd;0;EN;<sub> 0038;8;8;8;N;SUBSCRIPT DIGIT EIGHT;;;;
+2089;SUBSCRIPT NINE;Nd;0;EN;<sub> 0039;9;9;9;N;SUBSCRIPT DIGIT NINE;;;;
+208A;SUBSCRIPT PLUS SIGN;Sm;0;ET;<sub> 002B;;;;N;;;;;
+208B;SUBSCRIPT MINUS;Sm;0;ET;<sub> 2212;;;;N;SUBSCRIPT HYPHEN-MINUS;;;;
+208C;SUBSCRIPT EQUALS SIGN;Sm;0;ON;<sub> 003D;;;;N;;;;;
+208D;SUBSCRIPT LEFT PARENTHESIS;Ps;0;ON;<sub> 0028;;;;Y;SUBSCRIPT OPENING PARENTHESIS;;;;
+208E;SUBSCRIPT RIGHT PARENTHESIS;Pe;0;ON;<sub> 0029;;;;Y;SUBSCRIPT CLOSING PARENTHESIS;;;;
+20A0;EURO-CURRENCY SIGN;Sc;0;ET;;;;;N;;;;;
+20A1;COLON SIGN;Sc;0;ET;;;;;N;;;;;
+20A2;CRUZEIRO SIGN;Sc;0;ET;;;;;N;;;;;
+20A3;FRENCH FRANC SIGN;Sc;0;ET;;;;;N;;;;;
+20A4;LIRA SIGN;Sc;0;ET;;;;;N;;;;;
+20A5;MILL SIGN;Sc;0;ET;;;;;N;;;;;
+20A6;NAIRA SIGN;Sc;0;ET;;;;;N;;;;;
+20A7;PESETA SIGN;Sc;0;ET;;;;;N;;;;;
+20A8;RUPEE SIGN;Lt;0;ET;<compat> 0052 0073;;;;N;;;;;
+20A9;WON SIGN;Sc;0;ET;;;;;N;;;;;
+20AA;NEW SHEQEL SIGN;Sc;0;ET;;;;;N;;;;;
+20AB;DONG SIGN;Sc;0;ET;;;;;N;;;;;
+20D0;COMBINING LEFT HARPOON ABOVE;Mn;230;L;;;;;N;NON-SPACING LEFT HARPOON ABOVE;;;;
+20D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;L;;;;;N;NON-SPACING RIGHT HARPOON ABOVE;;;;
+20D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;L;;;;;N;NON-SPACING LONG VERTICAL BAR OVERLAY;;;;
+20D3;COMBINING SHORT VERTICAL LINE OVERLAY;Mn;1;L;;;;;N;NON-SPACING SHORT VERTICAL BAR OVERLAY;;;;
+20D4;COMBINING ANTICLOCKWISE ARROW ABOVE;Mn;230;L;;;;;N;NON-SPACING ANTICLOCKWISE ARROW ABOVE;;;;
+20D5;COMBINING CLOCKWISE ARROW ABOVE;Mn;230;L;;;;;N;NON-SPACING CLOCKWISE ARROW ABOVE;;;;
+20D6;COMBINING LEFT ARROW ABOVE;Mn;230;L;;;;;N;NON-SPACING LEFT ARROW ABOVE;;;;
+20D7;COMBINING RIGHT ARROW ABOVE;Mn;230;L;;;;;N;NON-SPACING RIGHT ARROW ABOVE;;;;
+20D8;COMBINING RING OVERLAY;Mn;1;L;;;;;N;NON-SPACING RING OVERLAY;;;;
+20D9;COMBINING CLOCKWISE RING OVERLAY;Mn;1;L;;;;;N;NON-SPACING CLOCKWISE RING OVERLAY;;;;
+20DA;COMBINING ANTICLOCKWISE RING OVERLAY;Mn;1;L;;;;;N;NON-SPACING ANTICLOCKWISE RING OVERLAY;;;;
+20DB;COMBINING THREE DOTS ABOVE;Mn;230;L;;;;;N;NON-SPACING THREE DOTS ABOVE;;;;
+20DC;COMBINING FOUR DOTS ABOVE;Mn;230;L;;;;;N;NON-SPACING FOUR DOTS ABOVE;;;;
+20DD;COMBINING ENCLOSING CIRCLE;Mn;0;L;;;;;N;ENCLOSING CIRCLE;;;;
+20DE;COMBINING ENCLOSING SQUARE;Mn;0;L;;;;;N;ENCLOSING SQUARE;;;;
+20DF;COMBINING ENCLOSING DIAMOND;Mn;0;L;;;;;N;ENCLOSING DIAMOND;;;;
+20E0;COMBINING ENCLOSING CIRCLE BACKSLASH;Mn;0;L;;;;;N;ENCLOSING CIRCLE SLASH;;;;
+20E1;COMBINING LEFT RIGHT ARROW ABOVE;Mn;1;L;;;;;N;NON-SPACING LEFT RIGHT ARROW ABOVE;;;;
+2100;ACCOUNT OF;So;0;ON;;;;;N;;;;;
+2101;ADDRESSED TO THE SUBJECT;So;0;ON;;;;;N;;;;;
+2102;DOUBLE-STRUCK CAPITAL C;Lu;0;ON;<font> 0043;;;;N;DOUBLE-STRUCK C;;;;
+2103;DEGREE CELSIUS;So;0;ON;<compat> 00B0 0043;;;;N;DEGREES CENTIGRADE;;;;
+2104;CENTRE LINE SYMBOL;So;0;ON;;;;;N;C L SYMBOL;;;;
+2105;CARE OF;So;0;ON;;;;;N;;;;;
+2106;CADA UNA;So;0;ON;;;;;N;;;;;
+2107;EULER CONSTANT;Lu;0;ON;<compat> 0190;;;;N;EULERS;;;;
+2108;SCRUPLE;So;0;ON;;;;;N;;;;;
+2109;DEGREE FAHRENHEIT;So;0;ON;<compat> 00B0 0046;;;;N;DEGREES FAHRENHEIT;;;;
+210A;SCRIPT SMALL G;Ll;0;ON;<font> 0067;;;;N;;;;;
+210B;SCRIPT CAPITAL H;Lu;0;ON;<font> 0048;;;;N;SCRIPT H;;;;
+210C;BLACK-LETTER CAPITAL H;Lu;0;ON;<font> 0048;;;;N;BLACK-LETTER H;;;;
+210D;DOUBLE-STRUCK CAPITAL H;Lu;0;ON;<font> 0048;;;;N;DOUBLE-STRUCK H;;;;
+210E;PLANCK CONSTANT;Ll;0;ON;<font> 0068;;;;N;;;;;
+210F;PLANCK CONSTANT OVER TWO PI;Ll;0;ON;<font> 0127;;;;N;PLANCK CONSTANT OVER 2 PI;;;;
+2110;SCRIPT CAPITAL I;Lu;0;ON;<font> 0049;;;;N;SCRIPT I;;;;
+2111;BLACK-LETTER CAPITAL I;Lu;0;ON;<font> 0049;;;;N;BLACK-LETTER I;;;;
+2112;SCRIPT CAPITAL L;Lu;0;ON;<font> 004C;;;;N;SCRIPT L;;;;
+2113;SCRIPT SMALL L;Ll;0;ON;<font> 006C;;;;N;;;;;
+2114;L B BAR SYMBOL;So;0;ON;;;;;N;;;;;
+2115;DOUBLE-STRUCK CAPITAL N;Lu;0;ON;<font> 004E;;;;N;DOUBLE-STRUCK N;;;;
+2116;NUMERO SIGN;Lt;0;ON;<compat> 004E 006F;;;;N;NUMERO;;;;
+2117;SOUND RECORDING COPYRIGHT;Lu;0;ON;;;;;N;;;;;
+2118;SCRIPT CAPITAL P;Lu;0;ON;<font> 0050;;;;N;SCRIPT P;;;;
+2119;DOUBLE-STRUCK CAPITAL P;Lu;0;ON;<font> 0050;;;;N;DOUBLE-STRUCK P;;;;
+211A;DOUBLE-STRUCK CAPITAL Q;Lu;0;ON;<font> 0051;;;;N;DOUBLE-STRUCK Q;;;;
+211B;SCRIPT CAPITAL R;Lu;0;ON;<font> 0052;;;;N;SCRIPT R;;;;
+211C;BLACK-LETTER CAPITAL R;Lu;0;ON;<font> 0052;;;;N;BLACK-LETTER R;;;;
+211D;DOUBLE-STRUCK CAPITAL R;Lu;0;ON;<font> 0052;;;;N;DOUBLE-STRUCK R;;;;
+211E;PRESCRIPTION TAKE;So;0;ON;;;;;N;;;;;
+211F;RESPONSE;So;0;ON;;;;;N;;;;;
+2120;SERVICE MARK;Lu;0;ON;<super> 0053 004D;;;;N;;;;;
+2121;TELEPHONE SIGN;Lu;0;ON;<super> 0054 0045 004C;;;;N;T E L SYMBOL;;;;
+2122;TRADE MARK SIGN;Lu;0;ON;<super> 0054 004D;;;;N;TRADEMARK;;;;
+2123;VERSICLE;So;0;ON;;;;;N;;;;;
+2124;DOUBLE-STRUCK CAPITAL Z;Lu;0;ON;<font> 005A;;;;N;DOUBLE-STRUCK Z;;;;
+2125;OUNCE SIGN;So;0;ON;;;;;N;OUNCE;;;;
+2126;OHM SIGN;Lu;0;ON;03A9;;;;N;OHM;;;;
+2127;INVERTED OHM SIGN;So;0;ON;;;;;N;MHO;;;;
+2128;BLACK-LETTER CAPITAL Z;Lu;0;ON;<font> 005A;;;;N;BLACK-LETTER Z;;;;
+2129;TURNED GREEK SMALL LETTER IOTA;So;0;ON;;;;;N;;;;;
+212A;KELVIN SIGN;Lu;0;ON;004B;;;;N;DEGREES KELVIN;;;;
+212B;ANGSTROM SIGN;Lu;0;ON;00C5;;;;N;ANGSTROM UNIT;;;;
+212C;SCRIPT CAPITAL B;Lu;0;ON;<font> 0042;;;;N;SCRIPT B;;;;
+212D;BLACK-LETTER CAPITAL C;Lu;0;ON;<font> 0043;;;;N;BLACK-LETTER C;;;;
+212E;ESTIMATED SYMBOL;Ll;0;ON;;;;;N;;;;;
+212F;SCRIPT SMALL E;Ll;0;ON;<font> 0065;;;;N;;;;;
+2130;SCRIPT CAPITAL E;Lu;0;ON;<font> 0045;;;;N;SCRIPT E;;;;
+2131;SCRIPT CAPITAL F;Lu;0;ON;<font> 0046;;;;N;SCRIPT F;;;;
+2132;TURNED CAPITAL F;So;0;ON;;;;;N;TURNED F;;;;
+2133;SCRIPT CAPITAL M;Lu;0;ON;<font> 004D;;;;N;SCRIPT M;;;;
+2134;SCRIPT SMALL O;Ll;0;ON;<font> 006F;;;;N;;;;;
+2135;ALEF SYMBOL;Lo;0;ON;<compat> 05D0;;;;N;FIRST TRANSFINITE CARDINAL;;;;
+2136;BET SYMBOL;Lo;0;ON;<compat> 05D1;;;;N;SECOND TRANSFINITE CARDINAL;;;;
+2137;GIMEL SYMBOL;Lo;0;ON;<compat> 05D2;;;;N;THIRD TRANSFINITE CARDINAL;;;;
+2138;DALET SYMBOL;Lo;0;ON;<compat> 05D3;;;;N;FOURTH TRANSFINITE CARDINAL;;;;
+2153;VULGAR FRACTION ONE THIRD;No;0;ON;<fraction> 0031 2044 0033;;;1/3;N;FRACTION ONE THIRD;;;;
+2154;VULGAR FRACTION TWO THIRDS;No;0;ON;<fraction> 0032 2044 0033;;;2/3;N;FRACTION TWO THIRDS;;;;
+2155;VULGAR FRACTION ONE FIFTH;No;0;ON;<fraction> 0031 2044 0035;;;1/5;N;FRACTION ONE FIFTH;;;;
+2156;VULGAR FRACTION TWO FIFTHS;No;0;ON;<fraction> 0032 2044 0035;;;2/5;N;FRACTION TWO FIFTHS;;;;
+2157;VULGAR FRACTION THREE FIFTHS;No;0;ON;<fraction> 0033 2044 0035;;;3/5;N;FRACTION THREE FIFTHS;;;;
+2158;VULGAR FRACTION FOUR FIFTHS;No;0;ON;<fraction> 0034 2044 0035;;;4/5;N;FRACTION FOUR FIFTHS;;;;
+2159;VULGAR FRACTION ONE SIXTH;No;0;ON;<fraction> 0031 2044 0036;;;1/6;N;FRACTION ONE SIXTH;;;;
+215A;VULGAR FRACTION FIVE SIXTHS;No;0;ON;<fraction> 0035 2044 0036;;;5/6;N;FRACTION FIVE SIXTHS;;;;
+215B;VULGAR FRACTION ONE EIGHTH;No;0;ON;<fraction> 0031 2044 0038;;;1/8;N;FRACTION ONE EIGHTH;;;;
+215C;VULGAR FRACTION THREE EIGHTHS;No;0;ON;<fraction> 0033 2044 0038;;;3/8;N;FRACTION THREE EIGHTHS;;;;
+215D;VULGAR FRACTION FIVE EIGHTHS;No;0;ON;<fraction> 0035 2044 0038;;;5/8;N;FRACTION FIVE EIGHTHS;;;;
+215E;VULGAR FRACTION SEVEN EIGHTHS;No;0;ON;<fraction> 0037 2044 0038;;;7/8;N;FRACTION SEVEN EIGHTHS;;;;
+215F;FRACTION NUMERATOR ONE;No;0;ON;<fraction> 0031 2044;;;1;N;;;;;
+2160;ROMAN NUMERAL ONE;No;0;L;<compat> 0049;;;1;N;;;;2170;
+2161;ROMAN NUMERAL TWO;No;0;L;<compat> 0049 0049;;;2;N;;;;2171;
+2162;ROMAN NUMERAL THREE;No;0;L;<compat> 0049 0049 0049;;;3;N;;;;2172;
+2163;ROMAN NUMERAL FOUR;No;0;L;<compat> 0049 0056;;;4;N;;;;2173;
+2164;ROMAN NUMERAL FIVE;No;0;L;<compat> 0056;;;5;N;;;;2174;
+2165;ROMAN NUMERAL SIX;No;0;L;<compat> 0056 0049;;;6;N;;;;2175;
+2166;ROMAN NUMERAL SEVEN;No;0;L;<compat> 0056 0049 0049;;;7;N;;;;2176;
+2167;ROMAN NUMERAL EIGHT;No;0;L;<compat> 0056 0049 0049 0049;;;8;N;;;;2177;
+2168;ROMAN NUMERAL NINE;No;0;L;<compat> 0049 0058;;;9;N;;;;2178;
+2169;ROMAN NUMERAL TEN;No;0;L;<compat> 0058;;;10;N;;;;2179;
+216A;ROMAN NUMERAL ELEVEN;No;0;L;<compat> 0058 0049;;;11;N;;;;217A;
+216B;ROMAN NUMERAL TWELVE;No;0;L;<compat> 0058 0049 0049;;;12;N;;;;217B;
+216C;ROMAN NUMERAL FIFTY;No;0;L;<compat> 004C;;;50;N;;;;217C;
+216D;ROMAN NUMERAL ONE HUNDRED;No;0;L;<compat> 0043;;;100;N;;;;217D;
+216E;ROMAN NUMERAL FIVE HUNDRED;No;0;L;<compat> 0044;;;500;N;;;;217E;
+216F;ROMAN NUMERAL ONE THOUSAND;No;0;L;<compat> 004D;;;1000;N;;;;217F;
+2170;SMALL ROMAN NUMERAL ONE;No;0;L;<compat> 0069;;;1;N;;;2160;;2160
+2171;SMALL ROMAN NUMERAL TWO;No;0;L;<compat> 0069 0069;;;2;N;;;2161;;2161
+2172;SMALL ROMAN NUMERAL THREE;No;0;L;<compat> 0069 0069 0069;;;3;N;;;2162;;2162
+2173;SMALL ROMAN NUMERAL FOUR;No;0;L;<compat> 0069 0076;;;4;N;;;2163;;2163
+2174;SMALL ROMAN NUMERAL FIVE;No;0;L;<compat> 0076;;;5;N;;;2164;;2164
+2175;SMALL ROMAN NUMERAL SIX;No;0;L;<compat> 0076 0069;;;6;N;;;2165;;2165
+2176;SMALL ROMAN NUMERAL SEVEN;No;0;L;<compat> 0076 0069 0069;;;7;N;;;2166;;2166
+2177;SMALL ROMAN NUMERAL EIGHT;No;0;L;<compat> 0076 0069 0069 0069;;;8;N;;;2167;;2167
+2178;SMALL ROMAN NUMERAL NINE;No;0;L;<compat> 0069 0078;;;9;N;;;2168;;2168
+2179;SMALL ROMAN NUMERAL TEN;No;0;L;<compat> 0078;;;10;N;;;2169;;2169
+217A;SMALL ROMAN NUMERAL ELEVEN;No;0;L;<compat> 0078 0069;;;11;N;;;216A;;216A
+217B;SMALL ROMAN NUMERAL TWELVE;No;0;L;<compat> 0078 0069 0069;;;12;N;;;216B;;216B
+217C;SMALL ROMAN NUMERAL FIFTY;No;0;L;<compat> 006C;;;50;N;;;216C;;216C
+217D;SMALL ROMAN NUMERAL ONE HUNDRED;No;0;L;<compat> 0063;;;100;N;;;216D;;216D
+217E;SMALL ROMAN NUMERAL FIVE HUNDRED;No;0;L;<compat> 0064;;;500;N;;;216E;;216E
+217F;SMALL ROMAN NUMERAL ONE THOUSAND;No;0;L;<compat> 006D;;;1000;N;;;216F;;216F
+2180;ROMAN NUMERAL ONE THOUSAND C D;No;0;L;;;;1000;N;;;;;
+2181;ROMAN NUMERAL FIVE THOUSAND;No;0;L;;;;5000;N;;;;;
+2182;ROMAN NUMERAL TEN THOUSAND;No;0;L;;;;10000;N;;;;;
+2190;LEFTWARDS ARROW;So;0;ON;;;;;N;LEFT ARROW;;;;
+2191;UPWARDS ARROW;So;0;ON;;;;;N;UP ARROW;;;;
+2192;RIGHTWARDS ARROW;So;0;ON;;;;;N;RIGHT ARROW;;;;
+2193;DOWNWARDS ARROW;So;0;ON;;;;;N;DOWN ARROW;;;;
+2194;LEFT RIGHT ARROW;So;0;ON;;;;;N;;;;;
+2195;UP DOWN ARROW;So;0;ON;;;;;N;;;;;
+2196;NORTH WEST ARROW;So;0;ON;;;;;N;UPPER LEFT ARROW;;;;
+2197;NORTH EAST ARROW;So;0;ON;;;;;N;UPPER RIGHT ARROW;;;;
+2198;SOUTH EAST ARROW;So;0;ON;;;;;N;LOWER RIGHT ARROW;;;;
+2199;SOUTH WEST ARROW;So;0;ON;;;;;N;LOWER LEFT ARROW;;;;
+219A;LEFTWARDS ARROW WITH STROKE;So;0;ON;;;;;N;LEFT ARROW WITH STROKE;;;;
+219B;RIGHTWARDS ARROW WITH STROKE;So;0;ON;;;;;N;RIGHT ARROW WITH STROKE;;;;
+219C;LEFTWARDS WAVE ARROW;So;0;ON;;;;;N;LEFT WAVE ARROW;;;;
+219D;RIGHTWARDS WAVE ARROW;So;0;ON;;;;;N;RIGHT WAVE ARROW;;;;
+219E;LEFTWARDS TWO HEADED ARROW;So;0;ON;;;;;N;LEFT TWO HEADED ARROW;;;;
+219F;UPWARDS TWO HEADED ARROW;So;0;ON;;;;;N;UP TWO HEADED ARROW;;;;
+21A0;RIGHTWARDS TWO HEADED ARROW;So;0;ON;;;;;N;RIGHT TWO HEADED ARROW;;;;
+21A1;DOWNWARDS TWO HEADED ARROW;So;0;ON;;;;;N;DOWN TWO HEADED ARROW;;;;
+21A2;LEFTWARDS ARROW WITH TAIL;So;0;ON;;;;;N;LEFT ARROW WITH TAIL;;;;
+21A3;RIGHTWARDS ARROW WITH TAIL;So;0;ON;;;;;N;RIGHT ARROW WITH TAIL;;;;
+21A4;LEFTWARDS ARROW FROM BAR;So;0;ON;;;;;N;LEFT ARROW FROM BAR;;;;
+21A5;UPWARDS ARROW FROM BAR;So;0;ON;;;;;N;UP ARROW FROM BAR;;;;
+21A6;RIGHTWARDS ARROW FROM BAR;So;0;ON;;;;;N;RIGHT ARROW FROM BAR;;;;
+21A7;DOWNWARDS ARROW FROM BAR;So;0;ON;;;;;N;DOWN ARROW FROM BAR;;;;
+21A8;UP DOWN ARROW WITH BASE;So;0;ON;;;;;N;;;;;
+21A9;LEFTWARDS ARROW WITH HOOK;So;0;ON;;;;;N;LEFT ARROW WITH HOOK;;;;
+21AA;RIGHTWARDS ARROW WITH HOOK;So;0;ON;;;;;N;RIGHT ARROW WITH HOOK;;;;
+21AB;LEFTWARDS ARROW WITH LOOP;So;0;ON;;;;;N;LEFT ARROW WITH LOOP;;;;
+21AC;RIGHTWARDS ARROW WITH LOOP;So;0;ON;;;;;N;RIGHT ARROW WITH LOOP;;;;
+21AD;LEFT RIGHT WAVE ARROW;So;0;ON;;;;;N;;;;;
+21AE;LEFT RIGHT ARROW WITH STROKE;So;0;ON;;;;;N;;;;;
+21AF;DOWNWARDS ZIGZAG ARROW;So;0;ON;;;;;N;DOWN ZIGZAG ARROW;;;;
+21B0;UPWARDS ARROW WITH TIP LEFTWARDS;So;0;ON;;;;;N;UP ARROW WITH TIP LEFT;;;;
+21B1;UPWARDS ARROW WITH TIP RIGHTWARDS;So;0;ON;;;;;N;UP ARROW WITH TIP RIGHT;;;;
+21B2;DOWNWARDS ARROW WITH TIP LEFTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH TIP LEFT;;;;
+21B3;DOWNWARDS ARROW WITH TIP RIGHTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH TIP RIGHT;;;;
+21B4;RIGHTWARDS ARROW WITH CORNER DOWNWARDS;So;0;ON;;;;;N;RIGHT ARROW WITH CORNER DOWN;;;;
+21B5;DOWNWARDS ARROW WITH CORNER LEFTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH CORNER LEFT;;;;
+21B6;ANTICLOCKWISE TOP SEMICIRCLE ARROW;So;0;ON;;;;;N;;;;;
+21B7;CLOCKWISE TOP SEMICIRCLE ARROW;So;0;ON;;;;;N;;;;;
+21B8;NORTH WEST ARROW TO LONG BAR;So;0;ON;;;;;N;UPPER LEFT ARROW TO LONG BAR;;;;
+21B9;LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR;So;0;ON;;;;;N;LEFT ARROW TO BAR OVER RIGHT ARROW TO BAR;;;;
+21BA;ANTICLOCKWISE OPEN CIRCLE ARROW;So;0;ON;;;;;N;;;;;
+21BB;CLOCKWISE OPEN CIRCLE ARROW;So;0;ON;;;;;N;;;;;
+21BC;LEFTWARDS HARPOON WITH BARB UPWARDS;So;0;ON;;;;;N;LEFT HARPOON WITH BARB UP;;;;
+21BD;LEFTWARDS HARPOON WITH BARB DOWNWARDS;So;0;ON;;;;;N;LEFT HARPOON WITH BARB DOWN;;;;
+21BE;UPWARDS HARPOON WITH BARB RIGHTWARDS;So;0;ON;;;;;N;UP HARPOON WITH BARB RIGHT;;;;
+21BF;UPWARDS HARPOON WITH BARB LEFTWARDS;So;0;ON;;;;;N;UP HARPOON WITH BARB LEFT;;;;
+21C0;RIGHTWARDS HARPOON WITH BARB UPWARDS;So;0;ON;;;;;N;RIGHT HARPOON WITH BARB UP;;;;
+21C1;RIGHTWARDS HARPOON WITH BARB DOWNWARDS;So;0;ON;;;;;N;RIGHT HARPOON WITH BARB DOWN;;;;
+21C2;DOWNWARDS HARPOON WITH BARB RIGHTWARDS;So;0;ON;;;;;N;DOWN HARPOON WITH BARB RIGHT;;;;
+21C3;DOWNWARDS HARPOON WITH BARB LEFTWARDS;So;0;ON;;;;;N;DOWN HARPOON WITH BARB LEFT;;;;
+21C4;RIGHTWARDS ARROW OVER LEFTWARDS ARROW;So;0;ON;;;;;N;RIGHT ARROW OVER LEFT ARROW;;;;
+21C5;UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW;So;0;ON;;;;;N;UP ARROW LEFT OF DOWN ARROW;;;;
+21C6;LEFTWARDS ARROW OVER RIGHTWARDS ARROW;So;0;ON;;;;;N;LEFT ARROW OVER RIGHT ARROW;;;;
+21C7;LEFTWARDS PAIRED ARROWS;So;0;ON;;;;;N;LEFT PAIRED ARROWS;;;;
+21C8;UPWARDS PAIRED ARROWS;So;0;ON;;;;;N;UP PAIRED ARROWS;;;;
+21C9;RIGHTWARDS PAIRED ARROWS;So;0;ON;;;;;N;RIGHT PAIRED ARROWS;;;;
+21CA;DOWNWARDS PAIRED ARROWS;So;0;ON;;;;;N;DOWN PAIRED ARROWS;;;;
+21CB;LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON;So;0;ON;;;;;N;LEFT HARPOON OVER RIGHT HARPOON;;;;
+21CC;RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON;So;0;ON;;;;;N;RIGHT HARPOON OVER LEFT HARPOON;;;;
+21CD;LEFTWARDS DOUBLE ARROW WITH STROKE;So;0;ON;;;;;N;LEFT DOUBLE ARROW WITH STROKE;;;;
+21CE;LEFT RIGHT DOUBLE ARROW WITH STROKE;So;0;ON;;;;;N;;;;;
+21CF;RIGHTWARDS DOUBLE ARROW WITH STROKE;So;0;ON;;;;;N;RIGHT DOUBLE ARROW WITH STROKE;;;;
+21D0;LEFTWARDS DOUBLE ARROW;So;0;ON;;;;;N;LEFT DOUBLE ARROW;;;;
+21D1;UPWARDS DOUBLE ARROW;So;0;ON;;;;;N;UP DOUBLE ARROW;;;;
+21D2;RIGHTWARDS DOUBLE ARROW;So;0;ON;;;;;N;RIGHT DOUBLE ARROW;;;;
+21D3;DOWNWARDS DOUBLE ARROW;So;0;ON;;;;;N;DOWN DOUBLE ARROW;;;;
+21D4;LEFT RIGHT DOUBLE ARROW;So;0;ON;;;;;N;;;;;
+21D5;UP DOWN DOUBLE ARROW;So;0;ON;;;;;N;;;;;
+21D6;NORTH WEST DOUBLE ARROW;So;0;ON;;;;;N;UPPER LEFT DOUBLE ARROW;;;;
+21D7;NORTH EAST DOUBLE ARROW;So;0;ON;;;;;N;UPPER RIGHT DOUBLE ARROW;;;;
+21D8;SOUTH EAST DOUBLE ARROW;So;0;ON;;;;;N;LOWER RIGHT DOUBLE ARROW;;;;
+21D9;SOUTH WEST DOUBLE ARROW;So;0;ON;;;;;N;LOWER LEFT DOUBLE ARROW;;;;
+21DA;LEFTWARDS TRIPLE ARROW;So;0;ON;;;;;N;LEFT TRIPLE ARROW;;;;
+21DB;RIGHTWARDS TRIPLE ARROW;So;0;ON;;;;;N;RIGHT TRIPLE ARROW;;;;
+21DC;LEFTWARDS SQUIGGLE ARROW;So;0;ON;;;;;N;LEFT SQUIGGLE ARROW;;;;
+21DD;RIGHTWARDS SQUIGGLE ARROW;So;0;ON;;;;;N;RIGHT SQUIGGLE ARROW;;;;
+21DE;UPWARDS ARROW WITH DOUBLE STROKE;So;0;ON;;;;;N;UP ARROW WITH DOUBLE STROKE;;;;
+21DF;DOWNWARDS ARROW WITH DOUBLE STROKE;So;0;ON;;;;;N;DOWN ARROW WITH DOUBLE STROKE;;;;
+21E0;LEFTWARDS DASHED ARROW;So;0;ON;;;;;N;LEFT DASHED ARROW;;;;
+21E1;UPWARDS DASHED ARROW;So;0;ON;;;;;N;UP DASHED ARROW;;;;
+21E2;RIGHTWARDS DASHED ARROW;So;0;ON;;;;;N;RIGHT DASHED ARROW;;;;
+21E3;DOWNWARDS DASHED ARROW;So;0;ON;;;;;N;DOWN DASHED ARROW;;;;
+21E4;LEFTWARDS ARROW TO BAR;So;0;ON;;;;;N;LEFT ARROW TO BAR;;;;
+21E5;RIGHTWARDS ARROW TO BAR;So;0;ON;;;;;N;RIGHT ARROW TO BAR;;;;
+21E6;LEFTWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE LEFT ARROW;;;;
+21E7;UPWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE UP ARROW;;;;
+21E8;RIGHTWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE RIGHT ARROW;;;;
+21E9;DOWNWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE DOWN ARROW;;;;
+21EA;UPWARDS WHITE ARROW FROM BAR;So;0;ON;;;;;N;WHITE UP ARROW FROM BAR;;;;
+2200;FOR ALL;Sm;0;ON;;;;;N;;;;;
+2201;COMPLEMENT;Sm;0;ON;;;;;Y;;;;;
+2202;PARTIAL DIFFERENTIAL;Sm;0;ON;;;;;Y;;;;;
+2203;THERE EXISTS;Sm;0;ON;;;;;Y;;;;;
+2204;THERE DOES NOT EXIST;Sm;0;ON;2203 0338;;;;Y;;;;;
+2205;EMPTY SET;Sm;0;ON;;;;;N;;;;;
+2206;INCREMENT;Sm;0;ON;;;;;N;;;;;
+2207;NABLA;Sm;0;ON;;;;;N;;;;;
+2208;ELEMENT OF;Sm;0;ON;;;;;Y;;;;;
+2209;NOT AN ELEMENT OF;Sm;0;ON;2208 0338;;;;Y;;;;;
+220A;SMALL ELEMENT OF;Sm;0;ON;;;;;Y;;;;;
+220B;CONTAINS AS MEMBER;Sm;0;ON;;;;;Y;;;;;
+220C;DOES NOT CONTAIN AS MEMBER;Sm;0;ON;220B 0338;;;;Y;;;;;
+220D;SMALL CONTAINS AS MEMBER;Sm;0;ON;;;;;Y;;;;;
+220E;END OF PROOF;Sm;0;ON;;;;;N;;;;;
+220F;N-ARY PRODUCT;Sm;0;ON;;;;;N;;;;;
+2210;N-ARY COPRODUCT;Sm;0;ON;;;;;N;;;;;
+2211;N-ARY SUMMATION;Sm;0;ON;;;;;Y;;;;;
+2212;MINUS SIGN;Sm;0;ET;;;;;N;;;;;
+2213;MINUS-OR-PLUS SIGN;Sm;0;ET;;;;;N;;;;;
+2214;DOT PLUS;Sm;0;ON;;;;;N;;;;;
+2215;DIVISION SLASH;Sm;0;ON;;;;;Y;;;;;
+2216;SET MINUS;Sm;0;ON;;;;;Y;;;;;
+2217;ASTERISK OPERATOR;Sm;0;ON;;;;;N;;;;;
+2218;RING OPERATOR;Sm;0;ON;;;;;N;;;;;
+2219;BULLET OPERATOR;Sm;0;ON;;;;;N;;;;;
+221A;SQUARE ROOT;Sm;0;ON;;;;;Y;;;;;
+221B;CUBE ROOT;Sm;0;ON;;;;;Y;;;;;
+221C;FOURTH ROOT;Sm;0;ON;;;;;Y;;;;;
+221D;PROPORTIONAL TO;Sm;0;ON;;;;;Y;;;;;
+221E;INFINITY;Sm;0;ON;;;;;N;;;;;
+221F;RIGHT ANGLE;Sm;0;ON;;;;;Y;;;;;
+2220;ANGLE;Sm;0;ON;;;;;Y;;;;;
+2221;MEASURED ANGLE;Sm;0;ON;;;;;Y;;;;;
+2222;SPHERICAL ANGLE;Sm;0;ON;;;;;Y;;;;;
+2223;DIVIDES;Sm;0;ON;;;;;N;;;;;
+2224;DOES NOT DIVIDE;Sm;0;ON;2223 0338;;;;Y;;;;;
+2225;PARALLEL TO;Sm;0;ON;;;;;N;;;;;
+2226;NOT PARALLEL TO;Sm;0;ON;2225 0338;;;;Y;;;;;
+2227;LOGICAL AND;Sm;0;ON;;;;;N;;;;;
+2228;LOGICAL OR;Sm;0;ON;;;;;N;;;;;
+2229;INTERSECTION;Sm;0;ON;;;;;N;;;;;
+222A;UNION;Sm;0;ON;;;;;N;;;;;
+222B;INTEGRAL;Sm;0;ON;;;;;Y;;;;;
+222C;DOUBLE INTEGRAL;Sm;0;ON;<compat> 222B 222B;;;;Y;;;;;
+222D;TRIPLE INTEGRAL;Sm;0;ON;<compat> 222B 222B 222B;;;;Y;;;;;
+222E;CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;;
+222F;SURFACE INTEGRAL;Sm;0;ON;<compat> 222E 222E;;;;Y;;;;;
+2230;VOLUME INTEGRAL;Sm;0;ON;<compat> 222E 222E 222E;;;;Y;;;;;
+2231;CLOCKWISE INTEGRAL;Sm;0;ON;;;;;Y;;;;;
+2232;CLOCKWISE CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;;
+2233;ANTICLOCKWISE CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;;
+2234;THEREFORE;Sm;0;ON;;;;;N;;;;;
+2235;BECAUSE;Sm;0;ON;;;;;N;;;;;
+2236;RATIO;Sm;0;ON;;;;;N;;;;;
+2237;PROPORTION;Sm;0;ON;;;;;N;;;;;
+2238;DOT MINUS;Sm;0;ON;;;;;N;;;;;
+2239;EXCESS;Sm;0;ON;;;;;Y;;;;;
+223A;GEOMETRIC PROPORTION;Sm;0;ON;;;;;N;;;;;
+223B;HOMOTHETIC;Sm;0;ON;;;;;Y;;;;;
+223C;TILDE OPERATOR;Sm;0;ON;;;;;Y;;;;;
+223D;REVERSED TILDE;Sm;0;ON;;;;;Y;;;;;
+223E;INVERTED LAZY S;Sm;0;ON;;;;;Y;;;;;
+223F;SINE WAVE;Sm;0;ON;;;;;Y;;;;;
+2240;WREATH PRODUCT;Sm;0;ON;;;;;Y;;;;;
+2241;NOT TILDE;Sm;0;ON;007E 0338;;;;Y;;;;;
+2242;MINUS TILDE;Sm;0;ON;;;;;Y;;;;;
+2243;ASYMPTOTICALLY EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2244;NOT ASYMPTOTICALLY EQUAL TO;Sm;0;ON;2243 0338;;;;Y;;;;;
+2245;APPROXIMATELY EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2246;APPROXIMATELY BUT NOT ACTUALLY EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2247;NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO;Sm;0;ON;2245 0338;;;;Y;;;;;
+2248;ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2249;NOT ALMOST EQUAL TO;Sm;0;ON;2248 0338;;;;Y;;;;;
+224A;ALMOST EQUAL OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+224B;TRIPLE TILDE;Sm;0;ON;;;;;Y;;;;;
+224C;ALL EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+224D;EQUIVALENT TO;Sm;0;ON;;;;;N;;;;;
+224E;GEOMETRICALLY EQUIVALENT TO;Sm;0;ON;;;;;N;;;;;
+224F;DIFFERENCE BETWEEN;Sm;0;ON;;;;;N;;;;;
+2250;APPROACHES THE LIMIT;Sm;0;ON;;;;;N;;;;;
+2251;GEOMETRICALLY EQUAL TO;Sm;0;ON;;;;;N;;;;;
+2252;APPROXIMATELY EQUAL TO OR THE IMAGE OF;Sm;0;ON;;;;;Y;;;;;
+2253;IMAGE OF OR APPROXIMATELY EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2254;COLON EQUALS;Sm;0;ON;;;;;Y;COLON EQUAL;;;;
+2255;EQUALS COLON;Sm;0;ON;;;;;Y;EQUAL COLON;;;;
+2256;RING IN EQUAL TO;Sm;0;ON;;;;;N;;;;;
+2257;RING EQUAL TO;Sm;0;ON;;;;;N;;;;;
+2258;CORRESPONDS TO;Sm;0;ON;;;;;N;;;;;
+2259;ESTIMATES;Sm;0;ON;;;;;N;;;;;
+225A;EQUIANGULAR TO;Sm;0;ON;;;;;N;;;;;
+225B;STAR EQUALS;Sm;0;ON;;;;;N;;;;;
+225C;DELTA EQUAL TO;Sm;0;ON;;;;;N;;;;;
+225D;EQUAL TO BY DEFINITION;Sm;0;ON;;;;;N;;;;;
+225E;MEASURED BY;Sm;0;ON;;;;;N;;;;;
+225F;QUESTIONED EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2260;NOT EQUAL TO;Sm;0;ON;003D 0338;;;;Y;;;;;
+2261;IDENTICAL TO;Sm;0;ON;;;;;N;;;;;
+2262;NOT IDENTICAL TO;Sm;0;ON;2261 0338;;;;Y;;;;;
+2263;STRICTLY EQUIVALENT TO;Sm;0;ON;;;;;N;;;;;
+2264;LESS-THAN OR EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN OR EQUAL TO;;;;
+2265;GREATER-THAN OR EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN OR EQUAL TO;;;;
+2266;LESS-THAN OVER EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN OVER EQUAL TO;;;;
+2267;GREATER-THAN OVER EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN OVER EQUAL TO;;;;
+2268;LESS-THAN BUT NOT EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN BUT NOT EQUAL TO;;;;
+2269;GREATER-THAN BUT NOT EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN BUT NOT EQUAL TO;;;;
+226A;MUCH LESS-THAN;Sm;0;ON;;;;;Y;MUCH LESS THAN;;;;
+226B;MUCH GREATER-THAN;Sm;0;ON;;;;;Y;MUCH GREATER THAN;;;;
+226C;BETWEEN;Sm;0;ON;;;;;N;;;;;
+226D;NOT EQUIVALENT TO;Sm;0;ON;224D 0338;;;;N;;;;;
+226E;NOT LESS-THAN;Sm;0;ON;003C 0338;;;;Y;NOT LESS THAN;;;;
+226F;NOT GREATER-THAN;Sm;0;ON;003E 0338;;;;Y;NOT GREATER THAN;;;;
+2270;NEITHER LESS-THAN NOR EQUAL TO;Sm;0;ON;2264 0338;;;;Y;NEITHER LESS THAN NOR EQUAL TO;;;;
+2271;NEITHER GREATER-THAN NOR EQUAL TO;Sm;0;ON;2265 0338;;;;Y;NEITHER GREATER THAN NOR EQUAL TO;;;;
+2272;LESS-THAN OR EQUIVALENT TO;Sm;0;ON;;;;;Y;LESS THAN OR EQUIVALENT TO;;;;
+2273;GREATER-THAN OR EQUIVALENT TO;Sm;0;ON;;;;;Y;GREATER THAN OR EQUIVALENT TO;;;;
+2274;NEITHER LESS-THAN NOR EQUIVALENT TO;Sm;0;ON;2272 0338;;;;Y;NEITHER LESS THAN NOR EQUIVALENT TO;;;;
+2275;NEITHER GREATER-THAN NOR EQUIVALENT TO;Sm;0;ON;2273 0338;;;;Y;NEITHER GREATER THAN NOR EQUIVALENT TO;;;;
+2276;LESS-THAN OR GREATER-THAN;Sm;0;ON;;;;;Y;LESS THAN OR GREATER THAN;;;;
+2277;GREATER-THAN OR LESS-THAN;Sm;0;ON;;;;;Y;GREATER THAN OR LESS THAN;;;;
+2278;NEITHER LESS-THAN NOR GREATER-THAN;Sm;0;ON;2276 0338;;;;Y;NEITHER LESS THAN NOR GREATER THAN;;;;
+2279;NEITHER GREATER-THAN NOR LESS-THAN;Sm;0;ON;2277 0338;;;;Y;NEITHER GREATER THAN NOR LESS THAN;;;;
+227A;PRECEDES;Sm;0;ON;;;;;Y;;;;;
+227B;SUCCEEDS;Sm;0;ON;;;;;Y;;;;;
+227C;PRECEDES OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+227D;SUCCEEDS OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+227E;PRECEDES OR EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;;
+227F;SUCCEEDS OR EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;;
+2280;DOES NOT PRECEDE;Sm;0;ON;227A 0338;;;;Y;;;;;
+2281;DOES NOT SUCCEED;Sm;0;ON;227B 0338;;;;Y;;;;;
+2282;SUBSET OF;Sm;0;ON;;;;;Y;;;;;
+2283;SUPERSET OF;Sm;0;ON;;;;;Y;;;;;
+2284;NOT A SUBSET OF;Sm;0;ON;2282 0338;;;;Y;;;;;
+2285;NOT A SUPERSET OF;Sm;0;ON;2283 0338;;;;Y;;;;;
+2286;SUBSET OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2287;SUPERSET OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2288;NEITHER A SUBSET OF NOR EQUAL TO;Sm;0;ON;2286 0338;;;;Y;;;;;
+2289;NEITHER A SUPERSET OF NOR EQUAL TO;Sm;0;ON;2287 0338;;;;Y;;;;;
+228A;SUBSET OF WITH NOT EQUAL TO;Sm;0;ON;;;;;Y;SUBSET OF OR NOT EQUAL TO;;;;
+228B;SUPERSET OF WITH NOT EQUAL TO;Sm;0;ON;;;;;Y;SUPERSET OF OR NOT EQUAL TO;;;;
+228C;MULTISET;Sm;0;ON;;;;;Y;;;;;
+228D;MULTISET MULTIPLICATION;Sm;0;ON;;;;;N;;;;;
+228E;MULTISET UNION;Sm;0;ON;;;;;N;;;;;
+228F;SQUARE IMAGE OF;Sm;0;ON;;;;;Y;;;;;
+2290;SQUARE ORIGINAL OF;Sm;0;ON;;;;;Y;;;;;
+2291;SQUARE IMAGE OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2292;SQUARE ORIGINAL OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+2293;SQUARE CAP;Sm;0;ON;;;;;N;;;;;
+2294;SQUARE CUP;Sm;0;ON;;;;;N;;;;;
+2295;CIRCLED PLUS;Sm;0;ON;;;;;N;;;;;
+2296;CIRCLED MINUS;Sm;0;ON;;;;;N;;;;;
+2297;CIRCLED TIMES;Sm;0;ON;;;;;N;;;;;
+2298;CIRCLED DIVISION SLASH;Sm;0;ON;;;;;Y;;;;;
+2299;CIRCLED DOT OPERATOR;Sm;0;ON;;;;;N;;;;;
+229A;CIRCLED RING OPERATOR;Sm;0;ON;;;;;N;;;;;
+229B;CIRCLED ASTERISK OPERATOR;Sm;0;ON;;;;;N;;;;;
+229C;CIRCLED EQUALS;Sm;0;ON;;;;;N;;;;;
+229D;CIRCLED DASH;Sm;0;ON;;;;;N;;;;;
+229E;SQUARED PLUS;Sm;0;ON;;;;;N;;;;;
+229F;SQUARED MINUS;Sm;0;ON;;;;;N;;;;;
+22A0;SQUARED TIMES;Sm;0;ON;;;;;N;;;;;
+22A1;SQUARED DOT OPERATOR;Sm;0;ON;;;;;N;;;;;
+22A2;RIGHT TACK;Sm;0;ON;;;;;Y;;;;;
+22A3;LEFT TACK;Sm;0;ON;;;;;Y;;;;;
+22A4;DOWN TACK;Sm;0;ON;;;;;N;;;;;
+22A5;UP TACK;Sm;0;ON;;;;;N;;;;;
+22A6;ASSERTION;Sm;0;ON;;;;;Y;;;;;
+22A7;MODELS;Sm;0;ON;;;;;Y;;;;;
+22A8;TRUE;Sm;0;ON;;;;;Y;;;;;
+22A9;FORCES;Sm;0;ON;;;;;Y;;;;;
+22AA;TRIPLE VERTICAL BAR RIGHT TURNSTILE;Sm;0;ON;;;;;Y;;;;;
+22AB;DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE;Sm;0;ON;;;;;Y;;;;;
+22AC;DOES NOT PROVE;Sm;0;ON;22A2 0338;;;;Y;;;;;
+22AD;NOT TRUE;Sm;0;ON;22A8 0338;;;;Y;;;;;
+22AE;DOES NOT FORCE;Sm;0;ON;22A9 0338;;;;Y;;;;;
+22AF;NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE;Sm;0;ON;22AB 0338;;;;Y;;;;;
+22B0;PRECEDES UNDER RELATION;Sm;0;ON;;;;;Y;;;;;
+22B1;SUCCEEDS UNDER RELATION;Sm;0;ON;;;;;Y;;;;;
+22B2;NORMAL SUBGROUP OF;Sm;0;ON;;;;;Y;;;;;
+22B3;CONTAINS AS NORMAL SUBGROUP;Sm;0;ON;;;;;Y;;;;;
+22B4;NORMAL SUBGROUP OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+22B5;CONTAINS AS NORMAL SUBGROUP OR EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+22B6;ORIGINAL OF;Sm;0;ON;;;;;Y;;;;;
+22B7;IMAGE OF;Sm;0;ON;;;;;Y;;;;;
+22B8;MULTIMAP;Sm;0;ON;;;;;Y;;;;;
+22B9;HERMITIAN CONJUGATE MATRIX;Sm;0;ON;;;;;N;;;;;
+22BA;INTERCALATE;Sm;0;ON;;;;;N;;;;;
+22BB;XOR;Sm;0;ON;;;;;N;;;;;
+22BC;NAND;Sm;0;ON;;;;;N;;;;;
+22BD;NOR;Sm;0;ON;;;;;N;;;;;
+22BE;RIGHT ANGLE WITH ARC;Sm;0;ON;;;;;Y;;;;;
+22BF;RIGHT TRIANGLE;Sm;0;ON;;;;;Y;;;;;
+22C0;N-ARY LOGICAL AND;Sm;0;ON;;;;;N;;;;;
+22C1;N-ARY LOGICAL OR;Sm;0;ON;;;;;N;;;;;
+22C2;N-ARY INTERSECTION;Sm;0;ON;;;;;N;;;;;
+22C3;N-ARY UNION;Sm;0;ON;;;;;N;;;;;
+22C4;DIAMOND OPERATOR;Sm;0;ON;;;;;N;;;;;
+22C5;DOT OPERATOR;Sm;0;ON;;;;;N;;;;;
+22C6;STAR OPERATOR;Sm;0;ON;;;;;N;;;;;
+22C7;DIVISION TIMES;Sm;0;ON;;;;;N;;;;;
+22C8;BOWTIE;Sm;0;ON;;;;;N;;;;;
+22C9;LEFT NORMAL FACTOR SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;;
+22CA;RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;;
+22CB;LEFT SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;;
+22CC;RIGHT SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;;
+22CD;REVERSED TILDE EQUALS;Sm;0;ON;;;;;Y;;;;;
+22CE;CURLY LOGICAL OR;Sm;0;ON;;;;;N;;;;;
+22CF;CURLY LOGICAL AND;Sm;0;ON;;;;;N;;;;;
+22D0;DOUBLE SUBSET;Sm;0;ON;;;;;Y;;;;;
+22D1;DOUBLE SUPERSET;Sm;0;ON;;;;;Y;;;;;
+22D2;DOUBLE INTERSECTION;Sm;0;ON;;;;;N;;;;;
+22D3;DOUBLE UNION;Sm;0;ON;;;;;N;;;;;
+22D4;PITCHFORK;Sm;0;ON;;;;;N;;;;;
+22D5;EQUAL AND PARALLEL TO;Sm;0;ON;;;;;N;;;;;
+22D6;LESS-THAN WITH DOT;Sm;0;ON;;;;;Y;LESS THAN WITH DOT;;;;
+22D7;GREATER-THAN WITH DOT;Sm;0;ON;;;;;Y;GREATER THAN WITH DOT;;;;
+22D8;VERY MUCH LESS-THAN;Sm;0;ON;;;;;Y;VERY MUCH LESS THAN;;;;
+22D9;VERY MUCH GREATER-THAN;Sm;0;ON;;;;;Y;VERY MUCH GREATER THAN;;;;
+22DA;LESS-THAN EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;LESS THAN EQUAL TO OR GREATER THAN;;;;
+22DB;GREATER-THAN EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;GREATER THAN EQUAL TO OR LESS THAN;;;;
+22DC;EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;EQUAL TO OR LESS THAN;;;;
+22DD;EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;EQUAL TO OR GREATER THAN;;;;
+22DE;EQUAL TO OR PRECEDES;Sm;0;ON;;;;;Y;;;;;
+22DF;EQUAL TO OR SUCCEEDS;Sm;0;ON;;;;;Y;;;;;
+22E0;DOES NOT PRECEDE OR EQUAL;Sm;0;ON;227C 0338;;;;Y;;;;;
+22E1;DOES NOT SUCCEED OR EQUAL;Sm;0;ON;227D 0338;;;;Y;;;;;
+22E2;NOT SQUARE IMAGE OF OR EQUAL TO;Sm;0;ON;2291 0338;;;;Y;;;;;
+22E3;NOT SQUARE ORIGINAL OF OR EQUAL TO;Sm;0;ON;2292 0338;;;;Y;;;;;
+22E4;SQUARE IMAGE OF OR NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+22E5;SQUARE ORIGINAL OF OR NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;;
+22E6;LESS-THAN BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;LESS THAN BUT NOT EQUIVALENT TO;;;;
+22E7;GREATER-THAN BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;GREATER THAN BUT NOT EQUIVALENT TO;;;;
+22E8;PRECEDES BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;;
+22E9;SUCCEEDS BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;;
+22EA;NOT NORMAL SUBGROUP OF;Sm;0;ON;22B2 0338;;;;Y;;;;;
+22EB;DOES NOT CONTAIN AS NORMAL SUBGROUP;Sm;0;ON;22B3 0338;;;;Y;;;;;
+22EC;NOT NORMAL SUBGROUP OF OR EQUAL TO;Sm;0;ON;22B4 0338;;;;Y;;;;;
+22ED;DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL;Sm;0;ON;22B5 0338;;;;Y;;;;;
+22EE;VERTICAL ELLIPSIS;Sm;0;ON;;;;;N;;;;;
+22EF;MIDLINE HORIZONTAL ELLIPSIS;Sm;0;ON;;;;;N;;;;;
+22F0;UP RIGHT DIAGONAL ELLIPSIS;Sm;0;ON;;;;;Y;;;;;
+22F1;DOWN RIGHT DIAGONAL ELLIPSIS;Sm;0;ON;;;;;Y;;;;;
+2300;DIAMETER SIGN;So;0;ON;;;;;N;;;;;
+2302;HOUSE;So;0;ON;;;;;N;;;;;
+2303;UP ARROWHEAD;So;0;ON;;;;;N;;;;;
+2304;DOWN ARROWHEAD;So;0;ON;;;;;N;;;;;
+2305;PROJECTIVE;So;0;ON;;;;;N;;;;;
+2306;PERSPECTIVE;So;0;ON;;;;;N;;;;;
+2307;WAVY LINE;So;0;ON;;;;;N;;;;;
+2308;LEFT CEILING;So;0;ON;;;;;Y;;;;;
+2309;RIGHT CEILING;So;0;ON;;;;;Y;;;;;
+230A;LEFT FLOOR;So;0;ON;;;;;Y;;;;;
+230B;RIGHT FLOOR;So;0;ON;;;;;Y;;;;;
+230C;BOTTOM RIGHT CROP;So;0;ON;;;;;N;;;;;
+230D;BOTTOM LEFT CROP;So;0;ON;;;;;N;;;;;
+230E;TOP RIGHT CROP;So;0;ON;;;;;N;;;;;
+230F;TOP LEFT CROP;So;0;ON;;;;;N;;;;;
+2310;REVERSED NOT SIGN;So;0;ON;;;;;N;;;;;
+2311;SQUARE LOZENGE;So;0;ON;;;;;N;;;;;
+2312;ARC;So;0;ON;;;;;N;;;;;
+2313;SEGMENT;So;0;ON;;;;;N;;;;;
+2314;SECTOR;So;0;ON;;;;;N;;;;;
+2315;TELEPHONE RECORDER;So;0;ON;;;;;N;;;;;
+2316;POSITION INDICATOR;So;0;ON;;;;;N;;;;;
+2317;VIEWDATA SQUARE;So;0;ON;;;;;N;;;;;
+2318;PLACE OF INTEREST SIGN;So;0;ON;;;;;N;COMMAND KEY;;;;
+2319;TURNED NOT SIGN;So;0;ON;;;;;N;;;;;
+231A;WATCH;So;0;ON;;;;;N;;;;;
+231B;HOURGLASS;So;0;ON;;;;;N;;;;;
+231C;TOP LEFT CORNER;So;0;ON;;;;;N;;;;;
+231D;TOP RIGHT CORNER;So;0;ON;;;;;N;;;;;
+231E;BOTTOM LEFT CORNER;So;0;ON;;;;;N;;;;;
+231F;BOTTOM RIGHT CORNER;So;0;ON;;;;;N;;;;;
+2320;TOP HALF INTEGRAL;So;0;ON;;;;;Y;;;;;
+2321;BOTTOM HALF INTEGRAL;So;0;ON;;;;;Y;;;;;
+2322;FROWN;So;0;ON;;;;;N;;;;;
+2323;SMILE;So;0;ON;;;;;N;;;;;
+2324;UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS;So;0;ON;;;;;N;ENTER KEY;;;;
+2325;OPTION KEY;So;0;ON;;;;;N;;;;;
+2326;ERASE TO THE RIGHT;So;0;ON;;;;;N;DELETE TO THE RIGHT KEY;;;;
+2327;X IN A RECTANGLE BOX;So;0;ON;;;;;N;CLEAR KEY;;;;
+2328;KEYBOARD;So;0;ON;;;;;N;;;;;
+2329;LEFT-POINTING ANGLE BRACKET;Ps;0;ON;3008;;;;Y;BRA;;;;
+232A;RIGHT-POINTING ANGLE BRACKET;Pe;0;ON;3009;;;;Y;KET;;;;
+232B;ERASE TO THE LEFT;So;0;ON;;;;;N;DELETE TO THE LEFT KEY;;;;
+232C;BENZENE RING;So;0;ON;;;;;N;;;;;
+232D;CYLINDRICITY;So;0;ON;;;;;N;;;;;
+232E;ALL AROUND-PROFILE;So;0;ON;;;;;N;;;;;
+232F;SYMMETRY;So;0;ON;;;;;N;;;;;
+2330;TOTAL RUNOUT;So;0;ON;;;;;N;;;;;
+2331;DIMENSION ORIGIN;So;0;ON;;;;;N;;;;;
+2332;CONICAL TAPER;So;0;ON;;;;;N;;;;;
+2333;SLOPE;So;0;ON;;;;;N;;;;;
+2334;COUNTERBORE;So;0;ON;;;;;N;;;;;
+2335;COUNTERSINK;So;0;ON;;;;;N;;;;;
+2336;APL FUNCTIONAL SYMBOL I-BEAM;So;0;L;;;;;N;;;;;
+2337;APL FUNCTIONAL SYMBOL SQUISH QUAD;So;0;L;;;;;N;;;;;
+2338;APL FUNCTIONAL SYMBOL QUAD EQUAL;So;0;L;;;;;N;;;;;
+2339;APL FUNCTIONAL SYMBOL QUAD DIVIDE;So;0;L;;;;;N;;;;;
+233A;APL FUNCTIONAL SYMBOL QUAD DIAMOND;So;0;L;;;;;N;;;;;
+233B;APL FUNCTIONAL SYMBOL QUAD JOT;So;0;L;;;;;N;;;;;
+233C;APL FUNCTIONAL SYMBOL QUAD CIRCLE;So;0;L;;;;;N;;;;;
+233D;APL FUNCTIONAL SYMBOL CIRCLE STILE;So;0;L;;;;;N;;;;;
+233E;APL FUNCTIONAL SYMBOL CIRCLE JOT;So;0;L;;;;;N;;;;;
+233F;APL FUNCTIONAL SYMBOL SLASH BAR;So;0;L;;;;;N;;;;;
+2340;APL FUNCTIONAL SYMBOL BACKSLASH BAR;So;0;L;;;;;N;;;;;
+2341;APL FUNCTIONAL SYMBOL QUAD SLASH;So;0;L;;;;;N;;;;;
+2342;APL FUNCTIONAL SYMBOL QUAD BACKSLASH;So;0;L;;;;;N;;;;;
+2343;APL FUNCTIONAL SYMBOL QUAD LESS-THAN;So;0;L;;;;;N;;;;;
+2344;APL FUNCTIONAL SYMBOL QUAD GREATER-THAN;So;0;L;;;;;N;;;;;
+2345;APL FUNCTIONAL SYMBOL LEFTWARDS VANE;So;0;L;;;;;N;;;;;
+2346;APL FUNCTIONAL SYMBOL RIGHTWARDS VANE;So;0;L;;;;;N;;;;;
+2347;APL FUNCTIONAL SYMBOL QUAD LEFTWARDS ARROW;So;0;L;;;;;N;;;;;
+2348;APL FUNCTIONAL SYMBOL QUAD RIGHTWARDS ARROW;So;0;L;;;;;N;;;;;
+2349;APL FUNCTIONAL SYMBOL CIRCLE BACKSLASH;So;0;L;;;;;N;;;;;
+234A;APL FUNCTIONAL SYMBOL DOWN TACK UNDERBAR;So;0;L;;;;;N;;;;;
+234B;APL FUNCTIONAL SYMBOL DELTA STILE;So;0;L;;;;;N;;;;;
+234C;APL FUNCTIONAL SYMBOL QUAD DOWN CARET;So;0;L;;;;;N;;;;;
+234D;APL FUNCTIONAL SYMBOL QUAD DELTA;So;0;L;;;;;N;;;;;
+234E;APL FUNCTIONAL SYMBOL DOWN TACK JOT;So;0;L;;;;;N;;;;;
+234F;APL FUNCTIONAL SYMBOL UPWARDS VANE;So;0;L;;;;;N;;;;;
+2350;APL FUNCTIONAL SYMBOL QUAD UPWARDS ARROW;So;0;L;;;;;N;;;;;
+2351;APL FUNCTIONAL SYMBOL UP TACK OVERBAR;So;0;L;;;;;N;;;;;
+2352;APL FUNCTIONAL SYMBOL DEL STILE;So;0;L;;;;;N;;;;;
+2353;APL FUNCTIONAL SYMBOL QUAD UP CARET;So;0;L;;;;;N;;;;;
+2354;APL FUNCTIONAL SYMBOL QUAD DEL;So;0;L;;;;;N;;;;;
+2355;APL FUNCTIONAL SYMBOL UP TACK JOT;So;0;L;;;;;N;;;;;
+2356;APL FUNCTIONAL SYMBOL DOWNWARDS VANE;So;0;L;;;;;N;;;;;
+2357;APL FUNCTIONAL SYMBOL QUAD DOWNWARDS ARROW;So;0;L;;;;;N;;;;;
+2358;APL FUNCTIONAL SYMBOL QUOTE UNDERBAR;So;0;L;;;;;N;;;;;
+2359;APL FUNCTIONAL SYMBOL DELTA UNDERBAR;So;0;L;;;;;N;;;;;
+235A;APL FUNCTIONAL SYMBOL DIAMOND UNDERBAR;So;0;L;;;;;N;;;;;
+235B;APL FUNCTIONAL SYMBOL JOT UNDERBAR;So;0;L;;;;;N;;;;;
+235C;APL FUNCTIONAL SYMBOL CIRCLE UNDERBAR;So;0;L;;;;;N;;;;;
+235D;APL FUNCTIONAL SYMBOL UP SHOE JOT;So;0;L;;;;;N;;;;;
+235E;APL FUNCTIONAL SYMBOL QUOTE QUAD;So;0;L;;;;;N;;;;;
+235F;APL FUNCTIONAL SYMBOL CIRCLE STAR;So;0;L;;;;;N;;;;;
+2360;APL FUNCTIONAL SYMBOL QUAD COLON;So;0;L;;;;;N;;;;;
+2361;APL FUNCTIONAL SYMBOL UP TACK DIAERESIS;So;0;L;;;;;N;;;;;
+2362;APL FUNCTIONAL SYMBOL DEL DIAERESIS;So;0;L;;;;;N;;;;;
+2363;APL FUNCTIONAL SYMBOL STAR DIAERESIS;So;0;L;;;;;N;;;;;
+2364;APL FUNCTIONAL SYMBOL JOT DIAERESIS;So;0;L;;;;;N;;;;;
+2365;APL FUNCTIONAL SYMBOL CIRCLE DIAERESIS;So;0;L;;;;;N;;;;;
+2366;APL FUNCTIONAL SYMBOL DOWN SHOE STILE;So;0;L;;;;;N;;;;;
+2367;APL FUNCTIONAL SYMBOL LEFT SHOE STILE;So;0;L;;;;;N;;;;;
+2368;APL FUNCTIONAL SYMBOL TILDE DIAERESIS;So;0;L;;;;;N;;;;;
+2369;APL FUNCTIONAL SYMBOL GREATER-THAN DIAERESIS;So;0;L;;;;;N;;;;;
+236A;APL FUNCTIONAL SYMBOL COMMA BAR;So;0;L;;;;;N;;;;;
+236B;APL FUNCTIONAL SYMBOL DEL TILDE;So;0;L;;;;;N;;;;;
+236C;APL FUNCTIONAL SYMBOL ZILDE;So;0;L;;;;;N;;;;;
+236D;APL FUNCTIONAL SYMBOL STILE TILDE;So;0;L;;;;;N;;;;;
+236E;APL FUNCTIONAL SYMBOL SEMICOLON UNDERBAR;So;0;L;;;;;N;;;;;
+236F;APL FUNCTIONAL SYMBOL QUAD NOT EQUAL;So;0;L;;;;;N;;;;;
+2370;APL FUNCTIONAL SYMBOL QUAD QUESTION;So;0;L;;;;;N;;;;;
+2371;APL FUNCTIONAL SYMBOL DOWN CARET TILDE;So;0;L;;;;;N;;;;;
+2372;APL FUNCTIONAL SYMBOL UP CARET TILDE;So;0;L;;;;;N;;;;;
+2373;APL FUNCTIONAL SYMBOL IOTA;So;0;L;;;;;N;;;;;
+2374;APL FUNCTIONAL SYMBOL RHO;So;0;L;;;;;N;;;;;
+2375;APL FUNCTIONAL SYMBOL OMEGA;So;0;L;;;;;N;;;;;
+2376;APL FUNCTIONAL SYMBOL ALPHA UNDERBAR;So;0;L;;;;;N;;;;;
+2377;APL FUNCTIONAL SYMBOL EPSILON UNDERBAR;So;0;L;;;;;N;;;;;
+2378;APL FUNCTIONAL SYMBOL IOTA UNDERBAR;So;0;L;;;;;N;;;;;
+2379;APL FUNCTIONAL SYMBOL OMEGA UNDERBAR;So;0;L;;;;;N;;;;;
+237A;APL FUNCTIONAL SYMBOL ALPHA;So;0;L;;;;;N;;;;;
+2400;SYMBOL FOR NULL;So;0;ON;;;;;N;GRAPHIC FOR NULL;;;;
+2401;SYMBOL FOR START OF HEADING;So;0;ON;;;;;N;GRAPHIC FOR START OF HEADING;;;;
+2402;SYMBOL FOR START OF TEXT;So;0;ON;;;;;N;GRAPHIC FOR START OF TEXT;;;;
+2403;SYMBOL FOR END OF TEXT;So;0;ON;;;;;N;GRAPHIC FOR END OF TEXT;;;;
+2404;SYMBOL FOR END OF TRANSMISSION;So;0;ON;;;;;N;GRAPHIC FOR END OF TRANSMISSION;;;;
+2405;SYMBOL FOR ENQUIRY;So;0;ON;;;;;N;GRAPHIC FOR ENQUIRY;;;;
+2406;SYMBOL FOR ACKNOWLEDGE;So;0;ON;;;;;N;GRAPHIC FOR ACKNOWLEDGE;;;;
+2407;SYMBOL FOR BELL;So;0;ON;;;;;N;GRAPHIC FOR BELL;;;;
+2408;SYMBOL FOR BACKSPACE;So;0;ON;;;;;N;GRAPHIC FOR BACKSPACE;;;;
+2409;SYMBOL FOR HORIZONTAL TABULATION;So;0;ON;;;;;N;GRAPHIC FOR HORIZONTAL TABULATION;;;;
+240A;SYMBOL FOR LINE FEED;So;0;ON;;;;;N;GRAPHIC FOR LINE FEED;;;;
+240B;SYMBOL FOR VERTICAL TABULATION;So;0;ON;;;;;N;GRAPHIC FOR VERTICAL TABULATION;;;;
+240C;SYMBOL FOR FORM FEED;So;0;ON;;;;;N;GRAPHIC FOR FORM FEED;;;;
+240D;SYMBOL FOR CARRIAGE RETURN;So;0;ON;;;;;N;GRAPHIC FOR CARRIAGE RETURN;;;;
+240E;SYMBOL FOR SHIFT OUT;So;0;ON;;;;;N;GRAPHIC FOR SHIFT OUT;;;;
+240F;SYMBOL FOR SHIFT IN;So;0;ON;;;;;N;GRAPHIC FOR SHIFT IN;;;;
+2410;SYMBOL FOR DATA LINK ESCAPE;So;0;ON;;;;;N;GRAPHIC FOR DATA LINK ESCAPE;;;;
+2411;SYMBOL FOR DEVICE CONTROL ONE;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL ONE;;;;
+2412;SYMBOL FOR DEVICE CONTROL TWO;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL TWO;;;;
+2413;SYMBOL FOR DEVICE CONTROL THREE;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL THREE;;;;
+2414;SYMBOL FOR DEVICE CONTROL FOUR;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL FOUR;;;;
+2415;SYMBOL FOR NEGATIVE ACKNOWLEDGE;So;0;ON;;;;;N;GRAPHIC FOR NEGATIVE ACKNOWLEDGE;;;;
+2416;SYMBOL FOR SYNCHRONOUS IDLE;So;0;ON;;;;;N;GRAPHIC FOR SYNCHRONOUS IDLE;;;;
+2417;SYMBOL FOR END OF TRANSMISSION BLOCK;So;0;ON;;;;;N;GRAPHIC FOR END OF TRANSMISSION BLOCK;;;;
+2418;SYMBOL FOR CANCEL;So;0;ON;;;;;N;GRAPHIC FOR CANCEL;;;;
+2419;SYMBOL FOR END OF MEDIUM;So;0;ON;;;;;N;GRAPHIC FOR END OF MEDIUM;;;;
+241A;SYMBOL FOR SUBSTITUTE;So;0;ON;;;;;N;GRAPHIC FOR SUBSTITUTE;;;;
+241B;SYMBOL FOR ESCAPE;So;0;ON;;;;;N;GRAPHIC FOR ESCAPE;;;;
+241C;SYMBOL FOR FILE SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR FILE SEPARATOR;;;;
+241D;SYMBOL FOR GROUP SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR GROUP SEPARATOR;;;;
+241E;SYMBOL FOR RECORD SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR RECORD SEPARATOR;;;;
+241F;SYMBOL FOR UNIT SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR UNIT SEPARATOR;;;;
+2420;SYMBOL FOR SPACE;So;0;ON;;;;;N;GRAPHIC FOR SPACE;;;;
+2421;SYMBOL FOR DELETE;So;0;ON;;;;;N;GRAPHIC FOR DELETE;;;;
+2422;BLANK SYMBOL;So;0;ON;;;;;N;BLANK;;;;
+2423;OPEN BOX;So;0;ON;;;;;N;;;;;
+2424;SYMBOL FOR NEWLINE;So;0;ON;;;;;N;GRAPHIC FOR NEWLINE;;;;
+2440;OCR HOOK;So;0;ON;;;;;N;;;;;
+2441;OCR CHAIR;So;0;ON;;;;;N;;;;;
+2442;OCR FORK;So;0;ON;;;;;N;;;;;
+2443;OCR INVERTED FORK;So;0;ON;;;;;N;;;;;
+2444;OCR BELT BUCKLE;So;0;ON;;;;;N;;;;;
+2445;OCR BOW TIE;So;0;ON;;;;;N;;;;;
+2446;OCR BRANCH BANK IDENTIFICATION;So;0;ON;;;;;N;;;;;
+2447;OCR AMOUNT OF CHECK;So;0;ON;;;;;N;;;;;
+2448;OCR DASH;So;0;ON;;;;;N;;;;;
+2449;OCR CUSTOMER ACCOUNT NUMBER;So;0;ON;;;;;N;;;;;
+244A;OCR DOUBLE BACKSLASH;So;0;ON;;;;;N;;;;;
+2460;CIRCLED DIGIT ONE;No;0;ON;<circle> 0031;;1;1;N;;;;;
+2461;CIRCLED DIGIT TWO;No;0;ON;<circle> 0032;;2;2;N;;;;;
+2462;CIRCLED DIGIT THREE;No;0;ON;<circle> 0033;;3;3;N;;;;;
+2463;CIRCLED DIGIT FOUR;No;0;ON;<circle> 0034;;4;4;N;;;;;
+2464;CIRCLED DIGIT FIVE;No;0;ON;<circle> 0035;;5;5;N;;;;;
+2465;CIRCLED DIGIT SIX;No;0;ON;<circle> 0036;;6;6;N;;;;;
+2466;CIRCLED DIGIT SEVEN;No;0;ON;<circle> 0037;;7;7;N;;;;;
+2467;CIRCLED DIGIT EIGHT;No;0;ON;<circle> 0038;;8;8;N;;;;;
+2468;CIRCLED DIGIT NINE;No;0;ON;<circle> 0039;;9;9;N;;;;;
+2469;CIRCLED NUMBER TEN;No;0;ON;<circle> 0031;;;10;N;;;;;
+246A;CIRCLED NUMBER ELEVEN;No;0;ON;<circle> 0031 0030;;;11;N;;;;;
+246B;CIRCLED NUMBER TWELVE;No;0;ON;<circle> 0031 0032;;;12;N;;;;;
+246C;CIRCLED NUMBER THIRTEEN;No;0;ON;<circle> 0031 0033;;;13;N;;;;;
+246D;CIRCLED NUMBER FOURTEEN;No;0;ON;<circle> 0031 0034;;;14;N;;;;;
+246E;CIRCLED NUMBER FIFTEEN;No;0;ON;<circle> 0031 0035;;;15;N;;;;;
+246F;CIRCLED NUMBER SIXTEEN;No;0;ON;<circle> 0031 0036;;;16;N;;;;;
+2470;CIRCLED NUMBER SEVENTEEN;No;0;ON;<circle> 0031 0037;;;17;N;;;;;
+2471;CIRCLED NUMBER EIGHTEEN;No;0;ON;<circle> 0031 0038;;;18;N;;;;;
+2472;CIRCLED NUMBER NINETEEN;No;0;ON;<circle> 0031 0039;;;19;N;;;;;
+2473;CIRCLED NUMBER TWENTY;No;0;ON;<circle> 0032 0030;;;20;N;;;;;
+2474;PARENTHESIZED DIGIT ONE;No;0;ON;0028 0031 0029;;1;1;N;;;;;
+2475;PARENTHESIZED DIGIT TWO;No;0;ON;0028 0032 0029;;2;2;N;;;;;
+2476;PARENTHESIZED DIGIT THREE;No;0;ON;0028 0033 0029;;3;3;N;;;;;
+2477;PARENTHESIZED DIGIT FOUR;No;0;ON;0028 0034 0029;;4;4;N;;;;;
+2478;PARENTHESIZED DIGIT FIVE;No;0;ON;0028 0035 0029;;5;5;N;;;;;
+2479;PARENTHESIZED DIGIT SIX;No;0;ON;0028 0036 0029;;6;6;N;;;;;
+247A;PARENTHESIZED DIGIT SEVEN;No;0;ON;0028 0037 0029;;7;7;N;;;;;
+247B;PARENTHESIZED DIGIT EIGHT;No;0;ON;0028 0038 0029;;8;8;N;;;;;
+247C;PARENTHESIZED DIGIT NINE;No;0;ON;0028 0039 0029;;9;9;N;;;;;
+247D;PARENTHESIZED NUMBER TEN;No;0;ON;0028 0031 0030 0029;;;10;N;;;;;
+247E;PARENTHESIZED NUMBER ELEVEN;No;0;ON;0028 0031 0031 0029;;;11;N;;;;;
+247F;PARENTHESIZED NUMBER TWELVE;No;0;ON;0028 0031 0032 0029;;;12;N;;;;;
+2480;PARENTHESIZED NUMBER THIRTEEN;No;0;ON;0028 0031 0033 0029;;;13;N;;;;;
+2481;PARENTHESIZED NUMBER FOURTEEN;No;0;ON;0028 0031 0034 0029;;;14;N;;;;;
+2482;PARENTHESIZED NUMBER FIFTEEN;No;0;ON;0028 0031 0035 0029;;;15;N;;;;;
+2483;PARENTHESIZED NUMBER SIXTEEN;No;0;ON;0028 0031 0036 0029;;;16;N;;;;;
+2484;PARENTHESIZED NUMBER SEVENTEEN;No;0;ON;0028 0031 0037 0029;;;17;N;;;;;
+2485;PARENTHESIZED NUMBER EIGHTEEN;No;0;ON;0028 0031 0038 0029;;;18;N;;;;;
+2486;PARENTHESIZED NUMBER NINETEEN;No;0;ON;0028 0031 0039 0029;;;19;N;;;;;
+2487;PARENTHESIZED NUMBER TWENTY;No;0;ON;0028 0032 0030 0029;;;20;N;;;;;
+2488;DIGIT ONE FULL STOP;No;0;ON;0031 002E;;1;1;N;DIGIT ONE PERIOD;;;;
+2489;DIGIT TWO FULL STOP;No;0;ON;0032 002E;;2;2;N;DIGIT TWO PERIOD;;;;
+248A;DIGIT THREE FULL STOP;No;0;ON;0033 002E;;3;3;N;DIGIT THREE PERIOD;;;;
+248B;DIGIT FOUR FULL STOP;No;0;ON;0034 002E;;4;4;N;DIGIT FOUR PERIOD;;;;
+248C;DIGIT FIVE FULL STOP;No;0;ON;0035 002E;;5;5;N;DIGIT FIVE PERIOD;;;;
+248D;DIGIT SIX FULL STOP;No;0;ON;0036 002E;;6;6;N;DIGIT SIX PERIOD;;;;
+248E;DIGIT SEVEN FULL STOP;No;0;ON;0037 002E;;7;7;N;DIGIT SEVEN PERIOD;;;;
+248F;DIGIT EIGHT FULL STOP;No;0;ON;0038 002E;;8;8;N;DIGIT EIGHT PERIOD;;;;
+2490;DIGIT NINE FULL STOP;No;0;ON;0039 002E;;9;9;N;DIGIT NINE PERIOD;;;;
+2491;NUMBER TEN FULL STOP;No;0;ON;0031 0030 002E;;;10;N;NUMBER TEN PERIOD;;;;
+2492;NUMBER ELEVEN FULL STOP;No;0;ON;0031 0031 002E;;;11;N;NUMBER ELEVEN PERIOD;;;;
+2493;NUMBER TWELVE FULL STOP;No;0;ON;0031 0032 002E;;;12;N;NUMBER TWELVE PERIOD;;;;
+2494;NUMBER THIRTEEN FULL STOP;No;0;ON;0031 0033 002E;;;13;N;NUMBER THIRTEEN PERIOD;;;;
+2495;NUMBER FOURTEEN FULL STOP;No;0;ON;0031 0034 002E;;;14;N;NUMBER FOURTEEN PERIOD;;;;
+2496;NUMBER FIFTEEN FULL STOP;No;0;ON;0031 0035 002E;;;15;N;NUMBER FIFTEEN PERIOD;;;;
+2497;NUMBER SIXTEEN FULL STOP;No;0;ON;0031 0036 002E;;;16;N;NUMBER SIXTEEN PERIOD;;;;
+2498;NUMBER SEVENTEEN FULL STOP;No;0;ON;0031 0037 002E;;;17;N;NUMBER SEVENTEEN PERIOD;;;;
+2499;NUMBER EIGHTEEN FULL STOP;No;0;ON;0031 0038 002E;;;18;N;NUMBER EIGHTEEN PERIOD;;;;
+249A;NUMBER NINETEEN FULL STOP;No;0;ON;0031 0039 002E;;;19;N;NUMBER NINETEEN PERIOD;;;;
+249B;NUMBER TWENTY FULL STOP;No;0;ON;0032 0030 002E;;;20;N;NUMBER TWENTY PERIOD;;;;
+249C;PARENTHESIZED LATIN SMALL LETTER A;So;0;ON;0028 0061 0029;;;;N;;;;;
+249D;PARENTHESIZED LATIN SMALL LETTER B;So;0;ON;0028 0062 0029;;;;N;;;;;
+249E;PARENTHESIZED LATIN SMALL LETTER C;So;0;ON;0028 0063 0029;;;;N;;;;;
+249F;PARENTHESIZED LATIN SMALL LETTER D;So;0;ON;0028 0064 0029;;;;N;;;;;
+24A0;PARENTHESIZED LATIN SMALL LETTER E;So;0;ON;0028 0065 0029;;;;N;;;;;
+24A1;PARENTHESIZED LATIN SMALL LETTER F;So;0;ON;0028 0066 0029;;;;N;;;;;
+24A2;PARENTHESIZED LATIN SMALL LETTER G;So;0;ON;0028 0067 0029;;;;N;;;;;
+24A3;PARENTHESIZED LATIN SMALL LETTER H;So;0;ON;0028 0068 0029;;;;N;;;;;
+24A4;PARENTHESIZED LATIN SMALL LETTER I;So;0;ON;0028 0069 0029;;;;N;;;;;
+24A5;PARENTHESIZED LATIN SMALL LETTER J;So;0;ON;0028 006A 0029;;;;N;;;;;
+24A6;PARENTHESIZED LATIN SMALL LETTER K;So;0;ON;0028 006B 0029;;;;N;;;;;
+24A7;PARENTHESIZED LATIN SMALL LETTER L;So;0;ON;0028 006C 0029;;;;N;;;;;
+24A8;PARENTHESIZED LATIN SMALL LETTER M;So;0;ON;0028 006D 0029;;;;N;;;;;
+24A9;PARENTHESIZED LATIN SMALL LETTER N;So;0;ON;0028 006E 0029;;;;N;;;;;
+24AA;PARENTHESIZED LATIN SMALL LETTER O;So;0;ON;0028 006F 0029;;;;N;;;;;
+24AB;PARENTHESIZED LATIN SMALL LETTER P;So;0;ON;0028 0070 0029;;;;N;;;;;
+24AC;PARENTHESIZED LATIN SMALL LETTER Q;So;0;ON;0028 0071 0029;;;;N;;;;;
+24AD;PARENTHESIZED LATIN SMALL LETTER R;So;0;ON;0028 0072 0029;;;;N;;;;;
+24AE;PARENTHESIZED LATIN SMALL LETTER S;So;0;ON;0028 0073 0029;;;;N;;;;;
+24AF;PARENTHESIZED LATIN SMALL LETTER T;So;0;ON;0028 0074 0029;;;;N;;;;;
+24B0;PARENTHESIZED LATIN SMALL LETTER U;So;0;ON;0028 0075 0029;;;;N;;;;;
+24B1;PARENTHESIZED LATIN SMALL LETTER V;So;0;ON;0028 0076 0029;;;;N;;;;;
+24B2;PARENTHESIZED LATIN SMALL LETTER W;So;0;ON;0028 0077 0029;;;;N;;;;;
+24B3;PARENTHESIZED LATIN SMALL LETTER X;So;0;ON;0028 0078 0029;;;;N;;;;;
+24B4;PARENTHESIZED LATIN SMALL LETTER Y;So;0;ON;0028 0079 0029;;;;N;;;;;
+24B5;PARENTHESIZED LATIN SMALL LETTER Z;So;0;ON;0028 007A 0029;;;;N;;;;;
+24B6;CIRCLED LATIN CAPITAL LETTER A;Lu;0;ON;<circle> 0041;;;;N;;;;24D0;
+24B7;CIRCLED LATIN CAPITAL LETTER B;Lu;0;ON;<circle> 0042;;;;N;;;;24D1;
+24B8;CIRCLED LATIN CAPITAL LETTER C;Lu;0;ON;<circle> 0043;;;;N;;;;24D2;
+24B9;CIRCLED LATIN CAPITAL LETTER D;Lu;0;ON;<circle> 0044;;;;N;;;;24D3;
+24BA;CIRCLED LATIN CAPITAL LETTER E;Lu;0;ON;<circle> 0045;;;;N;;;;24D4;
+24BB;CIRCLED LATIN CAPITAL LETTER F;Lu;0;ON;<circle> 0046;;;;N;;;;24D5;
+24BC;CIRCLED LATIN CAPITAL LETTER G;Lu;0;ON;<circle> 0047;;;;N;;;;24D6;
+24BD;CIRCLED LATIN CAPITAL LETTER H;Lu;0;ON;<circle> 0048;;;;N;;;;24D7;
+24BE;CIRCLED LATIN CAPITAL LETTER I;Lu;0;ON;<circle> 0049;;;;N;;;;24D8;
+24BF;CIRCLED LATIN CAPITAL LETTER J;Lu;0;ON;<circle> 004A;;;;N;;;;24D9;
+24C0;CIRCLED LATIN CAPITAL LETTER K;Lu;0;ON;<circle> 004B;;;;N;;;;24DA;
+24C1;CIRCLED LATIN CAPITAL LETTER L;Lu;0;ON;<circle> 004C;;;;N;;;;24DB;
+24C2;CIRCLED LATIN CAPITAL LETTER M;Lu;0;ON;<circle> 004D;;;;N;;;;24DC;
+24C3;CIRCLED LATIN CAPITAL LETTER N;Lu;0;ON;<circle> 004E;;;;N;;;;24DD;
+24C4;CIRCLED LATIN CAPITAL LETTER O;Lu;0;ON;<circle> 004F;;;;N;;;;24DE;
+24C5;CIRCLED LATIN CAPITAL LETTER P;Lu;0;ON;<circle> 0050;;;;N;;;;24DF;
+24C6;CIRCLED LATIN CAPITAL LETTER Q;Lu;0;ON;<circle> 0051;;;;N;;;;24E0;
+24C7;CIRCLED LATIN CAPITAL LETTER R;Lu;0;ON;<circle> 0052;;;;N;;;;24E1;
+24C8;CIRCLED LATIN CAPITAL LETTER S;Lu;0;ON;<circle> 0053;;;;N;;;;24E2;
+24C9;CIRCLED LATIN CAPITAL LETTER T;Lu;0;ON;<circle> 0054;;;;N;;;;24E3;
+24CA;CIRCLED LATIN CAPITAL LETTER U;Lu;0;ON;<circle> 0055;;;;N;;;;24E4;
+24CB;CIRCLED LATIN CAPITAL LETTER V;Lu;0;ON;<circle> 0056;;;;N;;;;24E5;
+24CC;CIRCLED LATIN CAPITAL LETTER W;Lu;0;ON;<circle> 0057;;;;N;;;;24E6;
+24CD;CIRCLED LATIN CAPITAL LETTER X;Lu;0;ON;<circle> 0058;;;;N;;;;24E7;
+24CE;CIRCLED LATIN CAPITAL LETTER Y;Lu;0;ON;<circle> 0059;;;;N;;;;24E8;
+24CF;CIRCLED LATIN CAPITAL LETTER Z;Lu;0;ON;<circle> 005A;;;;N;;;;24E9;
+24D0;CIRCLED LATIN SMALL LETTER A;Ll;0;ON;<circle> 0061;;;;N;;;24B6;;24B6
+24D1;CIRCLED LATIN SMALL LETTER B;Ll;0;ON;<circle> 0062;;;;N;;;24B7;;24B7
+24D2;CIRCLED LATIN SMALL LETTER C;Ll;0;ON;<circle> 0063;;;;N;;;24B8;;24B8
+24D3;CIRCLED LATIN SMALL LETTER D;Ll;0;ON;<circle> 0064;;;;N;;;24B9;;24B9
+24D4;CIRCLED LATIN SMALL LETTER E;Ll;0;ON;<circle> 0065;;;;N;;;24BA;;24BA
+24D5;CIRCLED LATIN SMALL LETTER F;Ll;0;ON;<circle> 0066;;;;N;;;24BB;;24BB
+24D6;CIRCLED LATIN SMALL LETTER G;Ll;0;ON;<circle> 0067;;;;N;;;24BC;;24BC
+24D7;CIRCLED LATIN SMALL LETTER H;Ll;0;ON;<circle> 0068;;;;N;;;24BD;;24BD
+24D8;CIRCLED LATIN SMALL LETTER I;Ll;0;ON;<circle> 0069;;;;N;;;24BE;;24BE
+24D9;CIRCLED LATIN SMALL LETTER J;Ll;0;ON;<circle> 006A;;;;N;;;24BF;;24BF
+24DA;CIRCLED LATIN SMALL LETTER K;Ll;0;ON;<circle> 006B;;;;N;;;24C0;;24C0
+24DB;CIRCLED LATIN SMALL LETTER L;Ll;0;ON;<circle> 006C;;;;N;;;24C1;;24C1
+24DC;CIRCLED LATIN SMALL LETTER M;Ll;0;ON;<circle> 006D;;;;N;;;24C2;;24C2
+24DD;CIRCLED LATIN SMALL LETTER N;Ll;0;ON;<circle> 006E;;;;N;;;24C3;;24C3
+24DE;CIRCLED LATIN SMALL LETTER O;Ll;0;ON;<circle> 006F;;;;N;;;24C4;;24C4
+24DF;CIRCLED LATIN SMALL LETTER P;Ll;0;ON;<circle> 0070;;;;N;;;24C5;;24C5
+24E0;CIRCLED LATIN SMALL LETTER Q;Ll;0;ON;<circle> 0071;;;;N;;;24C6;;24C6
+24E1;CIRCLED LATIN SMALL LETTER R;Ll;0;ON;<circle> 0072;;;;N;;;24C7;;24C7
+24E2;CIRCLED LATIN SMALL LETTER S;Ll;0;ON;<circle> 0073;;;;N;;;24C8;;24C8
+24E3;CIRCLED LATIN SMALL LETTER T;Ll;0;ON;<circle> 0074;;;;N;;;24C9;;24C9
+24E4;CIRCLED LATIN SMALL LETTER U;Ll;0;ON;<circle> 0075;;;;N;;;24CA;;24CA
+24E5;CIRCLED LATIN SMALL LETTER V;Ll;0;ON;<circle> 0076;;;;N;;;24CB;;24CB
+24E6;CIRCLED LATIN SMALL LETTER W;Ll;0;ON;<circle> 0077;;;;N;;;24CC;;24CC
+24E7;CIRCLED LATIN SMALL LETTER X;Ll;0;ON;<circle> 0078;;;;N;;;24CD;;24CD
+24E8;CIRCLED LATIN SMALL LETTER Y;Ll;0;ON;<circle> 0079;;;;N;;;24CE;;24CE
+24E9;CIRCLED LATIN SMALL LETTER Z;Ll;0;ON;<circle> 007A;;;;N;;;24CF;;24CF
+24EA;CIRCLED DIGIT ZERO;No;0;ON;<circle> 0030;;0;0;N;;;;;
+2500;BOX DRAWINGS LIGHT HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT HORIZONTAL;;;;
+2501;BOX DRAWINGS HEAVY HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY HORIZONTAL;;;;
+2502;BOX DRAWINGS LIGHT VERTICAL;So;0;ON;;;;;N;FORMS LIGHT VERTICAL;;;;
+2503;BOX DRAWINGS HEAVY VERTICAL;So;0;ON;;;;;N;FORMS HEAVY VERTICAL;;;;
+2504;BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT TRIPLE DASH HORIZONTAL;;;;
+2505;BOX DRAWINGS HEAVY TRIPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY TRIPLE DASH HORIZONTAL;;;;
+2506;BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT TRIPLE DASH VERTICAL;;;;
+2507;BOX DRAWINGS HEAVY TRIPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY TRIPLE DASH VERTICAL;;;;
+2508;BOX DRAWINGS LIGHT QUADRUPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT QUADRUPLE DASH HORIZONTAL;;;;
+2509;BOX DRAWINGS HEAVY QUADRUPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY QUADRUPLE DASH HORIZONTAL;;;;
+250A;BOX DRAWINGS LIGHT QUADRUPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT QUADRUPLE DASH VERTICAL;;;;
+250B;BOX DRAWINGS HEAVY QUADRUPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY QUADRUPLE DASH VERTICAL;;;;
+250C;BOX DRAWINGS LIGHT DOWN AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT DOWN AND RIGHT;;;;
+250D;BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND RIGHT HEAVY;;;;
+250E;BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND RIGHT LIGHT;;;;
+250F;BOX DRAWINGS HEAVY DOWN AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY DOWN AND RIGHT;;;;
+2510;BOX DRAWINGS LIGHT DOWN AND LEFT;So;0;ON;;;;;N;FORMS LIGHT DOWN AND LEFT;;;;
+2511;BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND LEFT HEAVY;;;;
+2512;BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND LEFT LIGHT;;;;
+2513;BOX DRAWINGS HEAVY DOWN AND LEFT;So;0;ON;;;;;N;FORMS HEAVY DOWN AND LEFT;;;;
+2514;BOX DRAWINGS LIGHT UP AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT UP AND RIGHT;;;;
+2515;BOX DRAWINGS UP LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND RIGHT HEAVY;;;;
+2516;BOX DRAWINGS UP HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND RIGHT LIGHT;;;;
+2517;BOX DRAWINGS HEAVY UP AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY UP AND RIGHT;;;;
+2518;BOX DRAWINGS LIGHT UP AND LEFT;So;0;ON;;;;;N;FORMS LIGHT UP AND LEFT;;;;
+2519;BOX DRAWINGS UP LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND LEFT HEAVY;;;;
+251A;BOX DRAWINGS UP HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND LEFT LIGHT;;;;
+251B;BOX DRAWINGS HEAVY UP AND LEFT;So;0;ON;;;;;N;FORMS HEAVY UP AND LEFT;;;;
+251C;BOX DRAWINGS LIGHT VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND RIGHT;;;;
+251D;BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND RIGHT HEAVY;;;;
+251E;BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND RIGHT DOWN LIGHT;;;;
+251F;BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND RIGHT UP LIGHT;;;;
+2520;BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND RIGHT LIGHT;;;;
+2521;BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND RIGHT UP HEAVY;;;;
+2522;BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND RIGHT DOWN HEAVY;;;;
+2523;BOX DRAWINGS HEAVY VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND RIGHT;;;;
+2524;BOX DRAWINGS LIGHT VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND LEFT;;;;
+2525;BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND LEFT HEAVY;;;;
+2526;BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND LEFT DOWN LIGHT;;;;
+2527;BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND LEFT UP LIGHT;;;;
+2528;BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND LEFT LIGHT;;;;
+2529;BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND LEFT UP HEAVY;;;;
+252A;BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND LEFT DOWN HEAVY;;;;
+252B;BOX DRAWINGS HEAVY VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND LEFT;;;;
+252C;BOX DRAWINGS LIGHT DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT DOWN AND HORIZONTAL;;;;
+252D;BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT DOWN LIGHT;;;;
+252E;BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT DOWN LIGHT;;;;
+252F;BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND HORIZONTAL HEAVY;;;;
+2530;BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND HORIZONTAL LIGHT;;;;
+2531;BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT DOWN HEAVY;;;;
+2532;BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT DOWN HEAVY;;;;
+2533;BOX DRAWINGS HEAVY DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY DOWN AND HORIZONTAL;;;;
+2534;BOX DRAWINGS LIGHT UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT UP AND HORIZONTAL;;;;
+2535;BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT UP LIGHT;;;;
+2536;BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT UP LIGHT;;;;
+2537;BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND HORIZONTAL HEAVY;;;;
+2538;BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND HORIZONTAL LIGHT;;;;
+2539;BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT UP HEAVY;;;;
+253A;BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT UP HEAVY;;;;
+253B;BOX DRAWINGS HEAVY UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY UP AND HORIZONTAL;;;;
+253C;BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND HORIZONTAL;;;;
+253D;BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT VERTICAL LIGHT;;;;
+253E;BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT VERTICAL LIGHT;;;;
+253F;BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND HORIZONTAL HEAVY;;;;
+2540;BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND DOWN HORIZONTAL LIGHT;;;;
+2541;BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND UP HORIZONTAL LIGHT;;;;
+2542;BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND HORIZONTAL LIGHT;;;;
+2543;BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS LEFT UP HEAVY AND RIGHT DOWN LIGHT;;;;
+2544;BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS RIGHT UP HEAVY AND LEFT DOWN LIGHT;;;;
+2545;BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS LEFT DOWN HEAVY AND RIGHT UP LIGHT;;;;
+2546;BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS RIGHT DOWN HEAVY AND LEFT UP LIGHT;;;;
+2547;BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND UP HORIZONTAL HEAVY;;;;
+2548;BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND DOWN HORIZONTAL HEAVY;;;;
+2549;BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT VERTICAL HEAVY;;;;
+254A;BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT VERTICAL HEAVY;;;;
+254B;BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND HORIZONTAL;;;;
+254C;BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT DOUBLE DASH HORIZONTAL;;;;
+254D;BOX DRAWINGS HEAVY DOUBLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY DOUBLE DASH HORIZONTAL;;;;
+254E;BOX DRAWINGS LIGHT DOUBLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT DOUBLE DASH VERTICAL;;;;
+254F;BOX DRAWINGS HEAVY DOUBLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY DOUBLE DASH VERTICAL;;;;
+2550;BOX DRAWINGS DOUBLE HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE HORIZONTAL;;;;
+2551;BOX DRAWINGS DOUBLE VERTICAL;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL;;;;
+2552;BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND RIGHT DOUBLE;;;;
+2553;BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND RIGHT SINGLE;;;;
+2554;BOX DRAWINGS DOUBLE DOWN AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND RIGHT;;;;
+2555;BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND LEFT DOUBLE;;;;
+2556;BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND LEFT SINGLE;;;;
+2557;BOX DRAWINGS DOUBLE DOWN AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND LEFT;;;;
+2558;BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND RIGHT DOUBLE;;;;
+2559;BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND RIGHT SINGLE;;;;
+255A;BOX DRAWINGS DOUBLE UP AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE UP AND RIGHT;;;;
+255B;BOX DRAWINGS UP SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND LEFT DOUBLE;;;;
+255C;BOX DRAWINGS UP DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND LEFT SINGLE;;;;
+255D;BOX DRAWINGS DOUBLE UP AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE UP AND LEFT;;;;
+255E;BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND RIGHT DOUBLE;;;;
+255F;BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND RIGHT SINGLE;;;;
+2560;BOX DRAWINGS DOUBLE VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND RIGHT;;;;
+2561;BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND LEFT DOUBLE;;;;
+2562;BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND LEFT SINGLE;;;;
+2563;BOX DRAWINGS DOUBLE VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND LEFT;;;;
+2564;BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND HORIZONTAL DOUBLE;;;;
+2565;BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND HORIZONTAL SINGLE;;;;
+2566;BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND HORIZONTAL;;;;
+2567;BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND HORIZONTAL DOUBLE;;;;
+2568;BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND HORIZONTAL SINGLE;;;;
+2569;BOX DRAWINGS DOUBLE UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE UP AND HORIZONTAL;;;;
+256A;BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND HORIZONTAL DOUBLE;;;;
+256B;BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND HORIZONTAL SINGLE;;;;
+256C;BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND HORIZONTAL;;;;
+256D;BOX DRAWINGS LIGHT ARC DOWN AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT ARC DOWN AND RIGHT;;;;
+256E;BOX DRAWINGS LIGHT ARC DOWN AND LEFT;So;0;ON;;;;;N;FORMS LIGHT ARC DOWN AND LEFT;;;;
+256F;BOX DRAWINGS LIGHT ARC UP AND LEFT;So;0;ON;;;;;N;FORMS LIGHT ARC UP AND LEFT;;;;
+2570;BOX DRAWINGS LIGHT ARC UP AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT ARC UP AND RIGHT;;;;
+2571;BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT;;;;
+2572;BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT;;;;
+2573;BOX DRAWINGS LIGHT DIAGONAL CROSS;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL CROSS;;;;
+2574;BOX DRAWINGS LIGHT LEFT;So;0;ON;;;;;N;FORMS LIGHT LEFT;;;;
+2575;BOX DRAWINGS LIGHT UP;So;0;ON;;;;;N;FORMS LIGHT UP;;;;
+2576;BOX DRAWINGS LIGHT RIGHT;So;0;ON;;;;;N;FORMS LIGHT RIGHT;;;;
+2577;BOX DRAWINGS LIGHT DOWN;So;0;ON;;;;;N;FORMS LIGHT DOWN;;;;
+2578;BOX DRAWINGS HEAVY LEFT;So;0;ON;;;;;N;FORMS HEAVY LEFT;;;;
+2579;BOX DRAWINGS HEAVY UP;So;0;ON;;;;;N;FORMS HEAVY UP;;;;
+257A;BOX DRAWINGS HEAVY RIGHT;So;0;ON;;;;;N;FORMS HEAVY RIGHT;;;;
+257B;BOX DRAWINGS HEAVY DOWN;So;0;ON;;;;;N;FORMS HEAVY DOWN;;;;
+257C;BOX DRAWINGS LIGHT LEFT AND HEAVY RIGHT;So;0;ON;;;;;N;FORMS LIGHT LEFT AND HEAVY RIGHT;;;;
+257D;BOX DRAWINGS LIGHT UP AND HEAVY DOWN;So;0;ON;;;;;N;FORMS LIGHT UP AND HEAVY DOWN;;;;
+257E;BOX DRAWINGS HEAVY LEFT AND LIGHT RIGHT;So;0;ON;;;;;N;FORMS HEAVY LEFT AND LIGHT RIGHT;;;;
+257F;BOX DRAWINGS HEAVY UP AND LIGHT DOWN;So;0;ON;;;;;N;FORMS HEAVY UP AND LIGHT DOWN;;;;
+2580;UPPER HALF BLOCK;So;0;ON;;;;;N;;;;;
+2581;LOWER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;;
+2582;LOWER ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;;
+2583;LOWER THREE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;;
+2584;LOWER HALF BLOCK;So;0;ON;;;;;N;;;;;
+2585;LOWER FIVE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;;
+2586;LOWER THREE QUARTERS BLOCK;So;0;ON;;;;;N;LOWER THREE QUARTER BLOCK;;;;
+2587;LOWER SEVEN EIGHTHS BLOCK;So;0;ON;;;;;N;;;;;
+2588;FULL BLOCK;So;0;ON;;;;;N;;;;;
+2589;LEFT SEVEN EIGHTHS BLOCK;So;0;ON;;;;;N;;;;;
+258A;LEFT THREE QUARTERS BLOCK;So;0;ON;;;;;N;LEFT THREE QUARTER BLOCK;;;;
+258B;LEFT FIVE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;;
+258C;LEFT HALF BLOCK;So;0;ON;;;;;N;;;;;
+258D;LEFT THREE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;;
+258E;LEFT ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;;
+258F;LEFT ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;;
+2590;RIGHT HALF BLOCK;So;0;ON;;;;;N;;;;;
+2591;LIGHT SHADE;So;0;ON;;;;;N;;;;;
+2592;MEDIUM SHADE;So;0;ON;;;;;N;;;;;
+2593;DARK SHADE;So;0;ON;;;;;N;;;;;
+2594;UPPER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;;
+2595;RIGHT ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;;
+25A0;BLACK SQUARE;So;0;ON;;;;;N;;;;;
+25A1;WHITE SQUARE;So;0;ON;;;;;N;;;;;
+25A2;WHITE SQUARE WITH ROUNDED CORNERS;So;0;ON;;;;;N;;;;;
+25A3;WHITE SQUARE CONTAINING BLACK SMALL SQUARE;So;0;ON;;;;;N;;;;;
+25A4;SQUARE WITH HORIZONTAL FILL;So;0;ON;;;;;N;;;;;
+25A5;SQUARE WITH VERTICAL FILL;So;0;ON;;;;;N;;;;;
+25A6;SQUARE WITH ORTHOGONAL CROSSHATCH FILL;So;0;ON;;;;;N;;;;;
+25A7;SQUARE WITH UPPER LEFT TO LOWER RIGHT FILL;So;0;ON;;;;;N;;;;;
+25A8;SQUARE WITH UPPER RIGHT TO LOWER LEFT FILL;So;0;ON;;;;;N;;;;;
+25A9;SQUARE WITH DIAGONAL CROSSHATCH FILL;So;0;ON;;;;;N;;;;;
+25AA;BLACK SMALL SQUARE;So;0;ON;;;;;N;;;;;
+25AB;WHITE SMALL SQUARE;So;0;ON;;;;;N;;;;;
+25AC;BLACK RECTANGLE;So;0;ON;;;;;N;;;;;
+25AD;WHITE RECTANGLE;So;0;ON;;;;;N;;;;;
+25AE;BLACK VERTICAL RECTANGLE;So;0;ON;;;;;N;;;;;
+25AF;WHITE VERTICAL RECTANGLE;So;0;ON;;;;;N;;;;;
+25B0;BLACK PARALLELOGRAM;So;0;ON;;;;;N;;;;;
+25B1;WHITE PARALLELOGRAM;So;0;ON;;;;;N;;;;;
+25B2;BLACK UP-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK UP POINTING TRIANGLE;;;;
+25B3;WHITE UP-POINTING TRIANGLE;So;0;ON;;;;;N;WHITE UP POINTING TRIANGLE;;;;
+25B4;BLACK UP-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK UP POINTING SMALL TRIANGLE;;;;
+25B5;WHITE UP-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE UP POINTING SMALL TRIANGLE;;;;
+25B6;BLACK RIGHT-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK RIGHT POINTING TRIANGLE;;;;
+25B7;WHITE RIGHT-POINTING TRIANGLE;So;0;ON;;;;;N;WHITE RIGHT POINTING TRIANGLE;;;;
+25B8;BLACK RIGHT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK RIGHT POINTING SMALL TRIANGLE;;;;
+25B9;WHITE RIGHT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE RIGHT POINTING SMALL TRIANGLE;;;;
+25BA;BLACK RIGHT-POINTING POINTER;So;0;ON;;;;;N;BLACK RIGHT POINTING POINTER;;;;
+25BB;WHITE RIGHT-POINTING POINTER;So;0;ON;;;;;N;WHITE RIGHT POINTING POINTER;;;;
+25BC;BLACK DOWN-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK DOWN POINTING TRIANGLE;;;;
+25BD;WHITE DOWN-POINTING TRIANGLE;So;0;ON;;;;;N;WHITE DOWN POINTING TRIANGLE;;;;
+25BE;BLACK DOWN-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK DOWN POINTING SMALL TRIANGLE;;;;
+25BF;WHITE DOWN-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE DOWN POINTING SMALL TRIANGLE;;;;
+25C0;BLACK LEFT-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK LEFT POINTING TRIANGLE;;;;
+25C1;WHITE LEFT-POINTING TRIANGLE;So;0;ON;;;;;N;WHITE LEFT POINTING TRIANGLE;;;;
+25C2;BLACK LEFT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK LEFT POINTING SMALL TRIANGLE;;;;
+25C3;WHITE LEFT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE LEFT POINTING SMALL TRIANGLE;;;;
+25C4;BLACK LEFT-POINTING POINTER;So;0;ON;;;;;N;BLACK LEFT POINTING POINTER;;;;
+25C5;WHITE LEFT-POINTING POINTER;So;0;ON;;;;;N;WHITE LEFT POINTING POINTER;;;;
+25C6;BLACK DIAMOND;So;0;ON;;;;;N;;;;;
+25C7;WHITE DIAMOND;So;0;ON;;;;;N;;;;;
+25C8;WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND;So;0;ON;;;;;N;;;;;
+25C9;FISHEYE;So;0;ON;;;;;N;;;;;
+25CA;LOZENGE;So;0;ON;;;;;N;;;;;
+25CB;WHITE CIRCLE;So;0;ON;;;;;N;;;;;
+25CC;DOTTED CIRCLE;So;0;ON;;;;;N;;;;;
+25CD;CIRCLE WITH VERTICAL FILL;So;0;ON;;;;;N;;;;;
+25CE;BULLSEYE;So;0;ON;;;;;N;;;;;
+25CF;BLACK CIRCLE;So;0;ON;;;;;N;;;;;
+25D0;CIRCLE WITH LEFT HALF BLACK;So;0;ON;;;;;N;;;;;
+25D1;CIRCLE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;;;;;
+25D2;CIRCLE WITH LOWER HALF BLACK;So;0;ON;;;;;N;;;;;
+25D3;CIRCLE WITH UPPER HALF BLACK;So;0;ON;;;;;N;;;;;
+25D4;CIRCLE WITH UPPER RIGHT QUADRANT BLACK;So;0;ON;;;;;N;;;;;
+25D5;CIRCLE WITH ALL BUT UPPER LEFT QUADRANT BLACK;So;0;ON;;;;;N;;;;;
+25D6;LEFT HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;;
+25D7;RIGHT HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;;
+25D8;INVERSE BULLET;So;0;ON;;;;;N;;;;;
+25D9;INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;;
+25DA;UPPER HALF INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;;
+25DB;LOWER HALF INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;;
+25DC;UPPER LEFT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;;
+25DD;UPPER RIGHT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;;
+25DE;LOWER RIGHT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;;
+25DF;LOWER LEFT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;;
+25E0;UPPER HALF CIRCLE;So;0;ON;;;;;N;;;;;
+25E1;LOWER HALF CIRCLE;So;0;ON;;;;;N;;;;;
+25E2;BLACK LOWER RIGHT TRIANGLE;So;0;ON;;;;;N;;;;;
+25E3;BLACK LOWER LEFT TRIANGLE;So;0;ON;;;;;N;;;;;
+25E4;BLACK UPPER LEFT TRIANGLE;So;0;ON;;;;;N;;;;;
+25E5;BLACK UPPER RIGHT TRIANGLE;So;0;ON;;;;;N;;;;;
+25E6;WHITE BULLET;So;0;ON;;;;;N;;;;;
+25E7;SQUARE WITH LEFT HALF BLACK;So;0;ON;;;;;N;;;;;
+25E8;SQUARE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;;;;;
+25E9;SQUARE WITH UPPER LEFT DIAGONAL HALF BLACK;So;0;ON;;;;;N;;;;;
+25EA;SQUARE WITH LOWER RIGHT DIAGONAL HALF BLACK;So;0;ON;;;;;N;;;;;
+25EB;WHITE SQUARE WITH VERTICAL BISECTING LINE;So;0;ON;;;;;N;;;;;
+25EC;WHITE UP-POINTING TRIANGLE WITH DOT;So;0;ON;;;;;N;WHITE UP POINTING TRIANGLE WITH DOT;;;;
+25ED;UP-POINTING TRIANGLE WITH LEFT HALF BLACK;So;0;ON;;;;;N;UP POINTING TRIANGLE WITH LEFT HALF BLACK;;;;
+25EE;UP-POINTING TRIANGLE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;UP POINTING TRIANGLE WITH RIGHT HALF BLACK;;;;
+25EF;LARGE CIRCLE;So;0;ON;;;;;N;;;;;
+2600;BLACK SUN WITH RAYS;So;0;ON;;;;;N;;;;;
+2601;CLOUD;So;0;ON;;;;;N;;;;;
+2602;UMBRELLA;So;0;ON;;;;;N;;;;;
+2603;SNOWMAN;So;0;ON;;;;;N;;;;;
+2604;COMET;So;0;ON;;;;;N;;;;;
+2605;BLACK STAR;So;0;ON;;;;;N;;;;;
+2606;WHITE STAR;So;0;ON;;;;;N;;;;;
+2607;LIGHTNING;So;0;ON;;;;;N;;;;;
+2608;THUNDERSTORM;So;0;ON;;;;;N;;;;;
+2609;SUN;So;0;ON;;;;;N;;;;;
+260A;ASCENDING NODE;So;0;ON;;;;;N;;;;;
+260B;DESCENDING NODE;So;0;ON;;;;;N;;;;;
+260C;CONJUNCTION;So;0;ON;;;;;N;;;;;
+260D;OPPOSITION;So;0;ON;;;;;N;;;;;
+260E;BLACK TELEPHONE;So;0;ON;;;;;N;;;;;
+260F;WHITE TELEPHONE;So;0;ON;;;;;N;;;;;
+2610;BALLOT BOX;So;0;ON;;;;;N;;;;;
+2611;BALLOT BOX WITH CHECK;So;0;ON;;;;;N;;;;;
+2612;BALLOT BOX WITH X;So;0;ON;;;;;N;;;;;
+2613;SALTIRE;So;0;ON;;;;;N;;;;;
+261A;BLACK LEFT POINTING INDEX;So;0;ON;;;;;N;;;;;
+261B;BLACK RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;;
+261C;WHITE LEFT POINTING INDEX;So;0;ON;;;;;N;;;;;
+261D;WHITE UP POINTING INDEX;So;0;ON;;;;;N;;;;;
+261E;WHITE RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;;
+261F;WHITE DOWN POINTING INDEX;So;0;ON;;;;;N;;;;;
+2620;SKULL AND CROSSBONES;So;0;ON;;;;;N;;;;;
+2621;CAUTION SIGN;So;0;ON;;;;;N;;;;;
+2622;RADIOACTIVE SIGN;So;0;ON;;;;;N;;;;;
+2623;BIOHAZARD SIGN;So;0;ON;;;;;N;;;;;
+2624;CADUCEUS;So;0;ON;;;;;N;;;;;
+2625;ANKH;So;0;ON;;;;;N;;;;;
+2626;ORTHODOX CROSS;So;0;ON;;;;;N;;;;;
+2627;CHI RHO;So;0;ON;;;;;N;;;;;
+2628;CROSS OF LORRAINE;So;0;ON;;;;;N;;;;;
+2629;CROSS OF JERUSALEM;So;0;ON;;;;;N;;;;;
+262A;STAR AND CRESCENT;So;0;ON;;;;;N;;;;;
+262B;FARSI SYMBOL;So;0;ON;;;;;N;SYMBOL OF IRAN;;;;
+262C;ADI SHAKTI;So;0;ON;;;;;N;;;;;
+262D;HAMMER AND SICKLE;So;0;ON;;;;;N;;;;;
+262E;PEACE SYMBOL;So;0;ON;;;;;N;;;;;
+262F;YIN YANG;So;0;ON;;;;;N;;;;;
+2630;TRIGRAM FOR HEAVEN;So;0;ON;;;;;N;;;;;
+2631;TRIGRAM FOR LAKE;So;0;ON;;;;;N;;;;;
+2632;TRIGRAM FOR FIRE;So;0;ON;;;;;N;;;;;
+2633;TRIGRAM FOR THUNDER;So;0;ON;;;;;N;;;;;
+2634;TRIGRAM FOR WIND;So;0;ON;;;;;N;;;;;
+2635;TRIGRAM FOR WATER;So;0;ON;;;;;N;;;;;
+2636;TRIGRAM FOR MOUNTAIN;So;0;ON;;;;;N;;;;;
+2637;TRIGRAM FOR EARTH;So;0;ON;;;;;N;;;;;
+2638;WHEEL OF DHARMA;So;0;ON;;;;;N;;;;;
+2639;WHITE FROWNING FACE;So;0;ON;;;;;N;;;;;
+263A;WHITE SMILING FACE;So;0;ON;;;;;N;;;;;
+263B;BLACK SMILING FACE;So;0;ON;;;;;N;;;;;
+263C;WHITE SUN WITH RAYS;So;0;ON;;;;;N;;;;;
+263D;FIRST QUARTER MOON;So;0;ON;;;;;N;;;;;
+263E;LAST QUARTER MOON;So;0;ON;;;;;N;;;;;
+263F;MERCURY;So;0;ON;;;;;N;;;;;
+2640;FEMALE SIGN;So;0;ON;;;;;N;;;;;
+2641;EARTH;So;0;ON;;;;;N;;;;;
+2642;MALE SIGN;So;0;ON;;;;;N;;;;;
+2643;JUPITER;So;0;ON;;;;;N;;;;;
+2644;SATURN;So;0;ON;;;;;N;;;;;
+2645;URANUS;So;0;ON;;;;;N;;;;;
+2646;NEPTUNE;So;0;ON;;;;;N;;;;;
+2647;PLUTO;So;0;ON;;;;;N;;;;;
+2648;ARIES;So;0;ON;;;;;N;;;;;
+2649;TAURUS;So;0;ON;;;;;N;;;;;
+264A;GEMINI;So;0;ON;;;;;N;;;;;
+264B;CANCER;So;0;ON;;;;;N;;;;;
+264C;LEO;So;0;ON;;;;;N;;;;;
+264D;VIRGO;So;0;ON;;;;;N;;;;;
+264E;LIBRA;So;0;ON;;;;;N;;;;;
+264F;SCORPIUS;So;0;ON;;;;;N;;;;;
+2650;SAGITTARIUS;So;0;ON;;;;;N;;;;;
+2651;CAPRICORN;So;0;ON;;;;;N;;;;;
+2652;AQUARIUS;So;0;ON;;;;;N;;;;;
+2653;PISCES;So;0;ON;;;;;N;;;;;
+2654;WHITE CHESS KING;So;0;ON;;;;;N;;;;;
+2655;WHITE CHESS QUEEN;So;0;ON;;;;;N;;;;;
+2656;WHITE CHESS ROOK;So;0;ON;;;;;N;;;;;
+2657;WHITE CHESS BISHOP;So;0;ON;;;;;N;;;;;
+2658;WHITE CHESS KNIGHT;So;0;ON;;;;;N;;;;;
+2659;WHITE CHESS PAWN;So;0;ON;;;;;N;;;;;
+265A;BLACK CHESS KING;So;0;ON;;;;;N;;;;;
+265B;BLACK CHESS QUEEN;So;0;ON;;;;;N;;;;;
+265C;BLACK CHESS ROOK;So;0;ON;;;;;N;;;;;
+265D;BLACK CHESS BISHOP;So;0;ON;;;;;N;;;;;
+265E;BLACK CHESS KNIGHT;So;0;ON;;;;;N;;;;;
+265F;BLACK CHESS PAWN;So;0;ON;;;;;N;;;;;
+2660;BLACK SPADE SUIT;So;0;ON;;;;;N;;;;;
+2661;WHITE HEART SUIT;So;0;ON;;;;;N;;;;;
+2662;WHITE DIAMOND SUIT;So;0;ON;;;;;N;;;;;
+2663;BLACK CLUB SUIT;So;0;ON;;;;;N;;;;;
+2664;WHITE SPADE SUIT;So;0;ON;;;;;N;;;;;
+2665;BLACK HEART SUIT;So;0;ON;;;;;N;;;;;
+2666;BLACK DIAMOND SUIT;So;0;ON;;;;;N;;;;;
+2667;WHITE CLUB SUIT;So;0;ON;;;;;N;;;;;
+2668;HOT SPRINGS;So;0;ON;;;;;N;;;;;
+2669;QUARTER NOTE;So;0;ON;;;;;N;;;;;
+266A;EIGHTH NOTE;So;0;ON;;;;;N;;;;;
+266B;BEAMED EIGHTH NOTES;So;0;ON;;;;;N;BARRED EIGHTH NOTES;;;;
+266C;BEAMED SIXTEENTH NOTES;So;0;ON;;;;;N;BARRED SIXTEENTH NOTES;;;;
+266D;MUSIC FLAT SIGN;So;0;ON;;;;;N;FLAT;;;;
+266E;MUSIC NATURAL SIGN;So;0;ON;;;;;N;NATURAL;;;;
+266F;MUSIC SHARP SIGN;So;0;ON;;;;;N;SHARP;;;;
+2701;UPPER BLADE SCISSORS;So;0;ON;;;;;N;;;;;
+2702;BLACK SCISSORS;So;0;ON;;;;;N;;;;;
+2703;LOWER BLADE SCISSORS;So;0;ON;;;;;N;;;;;
+2704;WHITE SCISSORS;So;0;ON;;;;;N;;;;;
+2706;TELEPHONE LOCATION SIGN;So;0;ON;;;;;N;;;;;
+2707;TAPE DRIVE;So;0;ON;;;;;N;;;;;
+2708;AIRPLANE;So;0;ON;;;;;N;;;;;
+2709;ENVELOPE;So;0;ON;;;;;N;;;;;
+270C;VICTORY HAND;So;0;ON;;;;;N;;;;;
+270D;WRITING HAND;So;0;ON;;;;;N;;;;;
+270E;LOWER RIGHT PENCIL;So;0;ON;;;;;N;;;;;
+270F;PENCIL;So;0;ON;;;;;N;;;;;
+2710;UPPER RIGHT PENCIL;So;0;ON;;;;;N;;;;;
+2711;WHITE NIB;So;0;ON;;;;;N;;;;;
+2712;BLACK NIB;So;0;ON;;;;;N;;;;;
+2713;CHECK MARK;So;0;ON;;;;;N;;;;;
+2714;HEAVY CHECK MARK;So;0;ON;;;;;N;;;;;
+2715;MULTIPLICATION X;So;0;ON;;;;;N;;;;;
+2716;HEAVY MULTIPLICATION X;So;0;ON;;;;;N;;;;;
+2717;BALLOT X;So;0;ON;;;;;N;;;;;
+2718;HEAVY BALLOT X;So;0;ON;;;;;N;;;;;
+2719;OUTLINED GREEK CROSS;So;0;ON;;;;;N;;;;;
+271A;HEAVY GREEK CROSS;So;0;ON;;;;;N;;;;;
+271B;OPEN CENTRE CROSS;So;0;ON;;;;;N;OPEN CENTER CROSS;;;;
+271C;HEAVY OPEN CENTRE CROSS;So;0;ON;;;;;N;HEAVY OPEN CENTER CROSS;;;;
+271D;LATIN CROSS;So;0;ON;;;;;N;;;;;
+271E;SHADOWED WHITE LATIN CROSS;So;0;ON;;;;;N;;;;;
+271F;OUTLINED LATIN CROSS;So;0;ON;;;;;N;;;;;
+2720;MALTESE CROSS;So;0;ON;;;;;N;;;;;
+2721;STAR OF DAVID;So;0;ON;;;;;N;;;;;
+2722;FOUR TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;;
+2723;FOUR BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;;
+2724;HEAVY FOUR BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;;
+2725;FOUR CLUB-SPOKED ASTERISK;So;0;ON;;;;;N;;;;;
+2726;BLACK FOUR POINTED STAR;So;0;ON;;;;;N;;;;;
+2727;WHITE FOUR POINTED STAR;So;0;ON;;;;;N;;;;;
+2729;STRESS OUTLINED WHITE STAR;So;0;ON;;;;;N;;;;;
+272A;CIRCLED WHITE STAR;So;0;ON;;;;;N;;;;;
+272B;OPEN CENTRE BLACK STAR;So;0;ON;;;;;N;OPEN CENTER BLACK STAR;;;;
+272C;BLACK CENTRE WHITE STAR;So;0;ON;;;;;N;BLACK CENTER WHITE STAR;;;;
+272D;OUTLINED BLACK STAR;So;0;ON;;;;;N;;;;;
+272E;HEAVY OUTLINED BLACK STAR;So;0;ON;;;;;N;;;;;
+272F;PINWHEEL STAR;So;0;ON;;;;;N;;;;;
+2730;SHADOWED WHITE STAR;So;0;ON;;;;;N;;;;;
+2731;HEAVY ASTERISK;So;0;ON;;;;;N;;;;;
+2732;OPEN CENTRE ASTERISK;So;0;ON;;;;;N;OPEN CENTER ASTERISK;;;;
+2733;EIGHT SPOKED ASTERISK;So;0;ON;;;;;N;;;;;
+2734;EIGHT POINTED BLACK STAR;So;0;ON;;;;;N;;;;;
+2735;EIGHT POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;;
+2736;SIX POINTED BLACK STAR;So;0;ON;;;;;N;;;;;
+2737;EIGHT POINTED RECTILINEAR BLACK STAR;So;0;ON;;;;;N;;;;;
+2738;HEAVY EIGHT POINTED RECTILINEAR BLACK STAR;So;0;ON;;;;;N;;;;;
+2739;TWELVE POINTED BLACK STAR;So;0;ON;;;;;N;;;;;
+273A;SIXTEEN POINTED ASTERISK;So;0;ON;;;;;N;;;;;
+273B;TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;;
+273C;OPEN CENTRE TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;OPEN CENTER TEARDROP-SPOKED ASTERISK;;;;
+273D;HEAVY TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;;
+273E;SIX PETALLED BLACK AND WHITE FLORETTE;So;0;ON;;;;;N;;;;;
+273F;BLACK FLORETTE;So;0;ON;;;;;N;;;;;
+2740;WHITE FLORETTE;So;0;ON;;;;;N;;;;;
+2741;EIGHT PETALLED OUTLINED BLACK FLORETTE;So;0;ON;;;;;N;;;;;
+2742;CIRCLED OPEN CENTRE EIGHT POINTED STAR;So;0;ON;;;;;N;CIRCLED OPEN CENTER EIGHT POINTED STAR;;;;
+2743;HEAVY TEARDROP-SPOKED PINWHEEL ASTERISK;So;0;ON;;;;;N;;;;;
+2744;SNOWFLAKE;So;0;ON;;;;;N;;;;;
+2745;TIGHT TRIFOLIATE SNOWFLAKE;So;0;ON;;;;;N;;;;;
+2746;HEAVY CHEVRON SNOWFLAKE;So;0;ON;;;;;N;;;;;
+2747;SPARKLE;So;0;ON;;;;;N;;;;;
+2748;HEAVY SPARKLE;So;0;ON;;;;;N;;;;;
+2749;BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;;
+274A;EIGHT TEARDROP-SPOKED PROPELLER ASTERISK;So;0;ON;;;;;N;;;;;
+274B;HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK;So;0;ON;;;;;N;;;;;
+274D;SHADOWED WHITE CIRCLE;So;0;ON;;;;;N;;;;;
+274F;LOWER RIGHT DROP-SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;;
+2750;UPPER RIGHT DROP-SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;;
+2751;LOWER RIGHT SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;;
+2752;UPPER RIGHT SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;;
+2756;BLACK DIAMOND MINUS WHITE X;So;0;ON;;;;;N;;;;;
+2758;LIGHT VERTICAL BAR;So;0;ON;;;;;N;;;;;
+2759;MEDIUM VERTICAL BAR;So;0;ON;;;;;N;;;;;
+275A;HEAVY VERTICAL BAR;So;0;ON;;;;;N;;;;;
+275B;HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;;
+275C;HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;;
+275D;HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;;
+275E;HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;;
+2761;CURVED STEM PARAGRAPH SIGN ORNAMENT;So;0;ON;;;;;N;;;;;
+2762;HEAVY EXCLAMATION MARK ORNAMENT;So;0;ON;;;;;N;;;;;
+2763;HEAVY HEART EXCLAMATION MARK ORNAMENT;So;0;ON;;;;;N;;;;;
+2764;HEAVY BLACK HEART;So;0;ON;;;;;N;;;;;
+2765;ROTATED HEAVY BLACK HEART BULLET;So;0;ON;;;;;N;;;;;
+2766;FLORAL HEART;So;0;ON;;;;;N;;;;;
+2767;ROTATED FLORAL HEART BULLET;So;0;ON;;;;;N;;;;;
+2776;DINGBAT NEGATIVE CIRCLED DIGIT ONE;No;0;ON;;;1;1;N;INVERSE CIRCLED DIGIT ONE;;;;
+2777;DINGBAT NEGATIVE CIRCLED DIGIT TWO;No;0;ON;;;2;2;N;INVERSE CIRCLED DIGIT TWO;;;;
+2778;DINGBAT NEGATIVE CIRCLED DIGIT THREE;No;0;ON;;;3;3;N;INVERSE CIRCLED DIGIT THREE;;;;
+2779;DINGBAT NEGATIVE CIRCLED DIGIT FOUR;No;0;ON;;;4;4;N;INVERSE CIRCLED DIGIT FOUR;;;;
+277A;DINGBAT NEGATIVE CIRCLED DIGIT FIVE;No;0;ON;;;5;5;N;INVERSE CIRCLED DIGIT FIVE;;;;
+277B;DINGBAT NEGATIVE CIRCLED DIGIT SIX;No;0;ON;;;6;6;N;INVERSE CIRCLED DIGIT SIX;;;;
+277C;DINGBAT NEGATIVE CIRCLED DIGIT SEVEN;No;0;ON;;;7;7;N;INVERSE CIRCLED DIGIT SEVEN;;;;
+277D;DINGBAT NEGATIVE CIRCLED DIGIT EIGHT;No;0;ON;;;8;8;N;INVERSE CIRCLED DIGIT EIGHT;;;;
+277E;DINGBAT NEGATIVE CIRCLED DIGIT NINE;No;0;ON;;;9;9;N;INVERSE CIRCLED DIGIT NINE;;;;
+277F;DINGBAT NEGATIVE CIRCLED NUMBER TEN;No;0;ON;;;;10;N;INVERSE CIRCLED NUMBER TEN;;;;
+2780;DINGBAT CIRCLED SANS-SERIF DIGIT ONE;No;0;ON;;;1;1;N;CIRCLED SANS-SERIF DIGIT ONE;;;;
+2781;DINGBAT CIRCLED SANS-SERIF DIGIT TWO;No;0;ON;;;2;2;N;CIRCLED SANS-SERIF DIGIT TWO;;;;
+2782;DINGBAT CIRCLED SANS-SERIF DIGIT THREE;No;0;ON;;;3;3;N;CIRCLED SANS-SERIF DIGIT THREE;;;;
+2783;DINGBAT CIRCLED SANS-SERIF DIGIT FOUR;No;0;ON;;;4;4;N;CIRCLED SANS-SERIF DIGIT FOUR;;;;
+2784;DINGBAT CIRCLED SANS-SERIF DIGIT FIVE;No;0;ON;;;5;5;N;CIRCLED SANS-SERIF DIGIT FIVE;;;;
+2785;DINGBAT CIRCLED SANS-SERIF DIGIT SIX;No;0;ON;;;6;6;N;CIRCLED SANS-SERIF DIGIT SIX;;;;
+2786;DINGBAT CIRCLED SANS-SERIF DIGIT SEVEN;No;0;ON;;;7;7;N;CIRCLED SANS-SERIF DIGIT SEVEN;;;;
+2787;DINGBAT CIRCLED SANS-SERIF DIGIT EIGHT;No;0;ON;;;8;8;N;CIRCLED SANS-SERIF DIGIT EIGHT;;;;
+2788;DINGBAT CIRCLED SANS-SERIF DIGIT NINE;No;0;ON;;;9;9;N;CIRCLED SANS-SERIF DIGIT NINE;;;;
+2789;DINGBAT CIRCLED SANS-SERIF NUMBER TEN;No;0;ON;;;;10;N;CIRCLED SANS-SERIF NUMBER TEN;;;;
+278A;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE;No;0;ON;;;1;1;N;INVERSE CIRCLED SANS-SERIF DIGIT ONE;;;;
+278B;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT TWO;No;0;ON;;;2;2;N;INVERSE CIRCLED SANS-SERIF DIGIT TWO;;;;
+278C;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT THREE;No;0;ON;;;3;3;N;INVERSE CIRCLED SANS-SERIF DIGIT THREE;;;;
+278D;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FOUR;No;0;ON;;;4;4;N;INVERSE CIRCLED SANS-SERIF DIGIT FOUR;;;;
+278E;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FIVE;No;0;ON;;;5;5;N;INVERSE CIRCLED SANS-SERIF DIGIT FIVE;;;;
+278F;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SIX;No;0;ON;;;6;6;N;INVERSE CIRCLED SANS-SERIF DIGIT SIX;;;;
+2790;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SEVEN;No;0;ON;;;7;7;N;INVERSE CIRCLED SANS-SERIF DIGIT SEVEN;;;;
+2791;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT EIGHT;No;0;ON;;;8;8;N;INVERSE CIRCLED SANS-SERIF DIGIT EIGHT;;;;
+2792;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT NINE;No;0;ON;;;9;9;N;INVERSE CIRCLED SANS-SERIF DIGIT NINE;;;;
+2793;DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN;No;0;ON;;;;10;N;INVERSE CIRCLED SANS-SERIF NUMBER TEN;;;;
+2794;HEAVY WIDE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY WIDE-HEADED RIGHT ARROW;;;;
+2798;HEAVY SOUTH EAST ARROW;So;0;ON;;;;;N;HEAVY LOWER RIGHT ARROW;;;;
+2799;HEAVY RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY RIGHT ARROW;;;;
+279A;HEAVY NORTH EAST ARROW;So;0;ON;;;;;N;HEAVY UPPER RIGHT ARROW;;;;
+279B;DRAFTING POINT RIGHTWARDS ARROW;So;0;ON;;;;;N;DRAFTING POINT RIGHT ARROW;;;;
+279C;HEAVY ROUND-TIPPED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY ROUND-TIPPED RIGHT ARROW;;;;
+279D;TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;TRIANGLE-HEADED RIGHT ARROW;;;;
+279E;HEAVY TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY TRIANGLE-HEADED RIGHT ARROW;;;;
+279F;DASHED TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;DASHED TRIANGLE-HEADED RIGHT ARROW;;;;
+27A0;HEAVY DASHED TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY DASHED TRIANGLE-HEADED RIGHT ARROW;;;;
+27A1;BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;BLACK RIGHT ARROW;;;;
+27A2;THREE-D TOP-LIGHTED RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;THREE-D TOP-LIGHTED RIGHT ARROWHEAD;;;;
+27A3;THREE-D BOTTOM-LIGHTED RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;THREE-D BOTTOM-LIGHTED RIGHT ARROWHEAD;;;;
+27A4;BLACK RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;BLACK RIGHT ARROWHEAD;;;;
+27A5;HEAVY BLACK CURVED DOWNWARDS AND RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK CURVED DOWN AND RIGHT ARROW;;;;
+27A6;HEAVY BLACK CURVED UPWARDS AND RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK CURVED UP AND RIGHT ARROW;;;;
+27A7;SQUAT BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;SQUAT BLACK RIGHT ARROW;;;;
+27A8;HEAVY CONCAVE-POINTED BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY CONCAVE-POINTED BLACK RIGHT ARROW;;;;
+27A9;RIGHT-SHADED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;RIGHT-SHADED WHITE RIGHT ARROW;;;;
+27AA;LEFT-SHADED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;LEFT-SHADED WHITE RIGHT ARROW;;;;
+27AB;BACK-TILTED SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;BACK-TILTED SHADOWED WHITE RIGHT ARROW;;;;
+27AC;FRONT-TILTED SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;FRONT-TILTED SHADOWED WHITE RIGHT ARROW;;;;
+27AD;HEAVY LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY LOWER RIGHT-SHADOWED WHITE RIGHT ARROW;;;;
+27AE;HEAVY UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY UPPER RIGHT-SHADOWED WHITE RIGHT ARROW;;;;
+27AF;NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHT ARROW;;;;
+27B1;NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHT ARROW;;;;
+27B2;CIRCLED HEAVY WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;CIRCLED HEAVY WHITE RIGHT ARROW;;;;
+27B3;WHITE-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;WHITE-FEATHERED RIGHT ARROW;;;;
+27B4;BLACK-FEATHERED SOUTH EAST ARROW;So;0;ON;;;;;N;BLACK-FEATHERED LOWER RIGHT ARROW;;;;
+27B5;BLACK-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;BLACK-FEATHERED RIGHT ARROW;;;;
+27B6;BLACK-FEATHERED NORTH EAST ARROW;So;0;ON;;;;;N;BLACK-FEATHERED UPPER RIGHT ARROW;;;;
+27B7;HEAVY BLACK-FEATHERED SOUTH EAST ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED LOWER RIGHT ARROW;;;;
+27B8;HEAVY BLACK-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED RIGHT ARROW;;;;
+27B9;HEAVY BLACK-FEATHERED NORTH EAST ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED UPPER RIGHT ARROW;;;;
+27BA;TEARDROP-BARBED RIGHTWARDS ARROW;So;0;ON;;;;;N;TEARDROP-BARBED RIGHT ARROW;;;;
+27BB;HEAVY TEARDROP-SHANKED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY TEARDROP-SHANKED RIGHT ARROW;;;;
+27BC;WEDGE-TAILED RIGHTWARDS ARROW;So;0;ON;;;;;N;WEDGE-TAILED RIGHT ARROW;;;;
+27BD;HEAVY WEDGE-TAILED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY WEDGE-TAILED RIGHT ARROW;;;;
+27BE;OPEN-OUTLINED RIGHTWARDS ARROW;So;0;ON;;;;;N;OPEN-OUTLINED RIGHT ARROW;;;;
+3000;IDEOGRAPHIC SPACE;Zs;0;WS;<wide> 0020;;;;N;;;;;
+3001;IDEOGRAPHIC COMMA;Po;0;ON;;;;;N;;;;;
+3002;IDEOGRAPHIC FULL STOP;Po;0;ON;;;;;N;IDEOGRAPHIC PERIOD;;;;
+3003;DITTO MARK;Po;0;ON;;;;;N;;;;;
+3004;JAPANESE INDUSTRIAL STANDARD SYMBOL;So;0;ON;;;;;N;;;;;
+3005;IDEOGRAPHIC ITERATION MARK;Po;0;ON;;;;;N;;;;;
+3006;IDEOGRAPHIC CLOSING MARK;Po;0;ON;;;;;N;;;;;
+3007;IDEOGRAPHIC NUMBER ZERO;No;0;ON;;;;0;N;;;;;
+3008;LEFT ANGLE BRACKET;Ps;0;ON;;;;;Y;OPENING ANGLE BRACKET;;;;
+3009;RIGHT ANGLE BRACKET;Pe;0;ON;;;;;Y;CLOSING ANGLE BRACKET;;;;
+300A;LEFT DOUBLE ANGLE BRACKET;Ps;0;ON;;;;;Y;OPENING DOUBLE ANGLE BRACKET;;;;
+300B;RIGHT DOUBLE ANGLE BRACKET;Pe;0;ON;;;;;Y;CLOSING DOUBLE ANGLE BRACKET;;;;
+300C;LEFT CORNER BRACKET;Ps;0;ON;;;;;Y;OPENING CORNER BRACKET;;;;
+300D;RIGHT CORNER BRACKET;Pe;0;ON;;;;;Y;CLOSING CORNER BRACKET;;;;
+300E;LEFT WHITE CORNER BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE CORNER BRACKET;;;;
+300F;RIGHT WHITE CORNER BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE CORNER BRACKET;;;;
+3010;LEFT BLACK LENTICULAR BRACKET;Ps;0;ON;;;;;Y;OPENING BLACK LENTICULAR BRACKET;;;;
+3011;RIGHT BLACK LENTICULAR BRACKET;Pe;0;ON;;;;;Y;CLOSING BLACK LENTICULAR BRACKET;;;;
+3012;POSTAL MARK;So;0;ON;;;;;N;;;;;
+3013;GETA MARK;So;0;ON;;;;;N;;;;;
+3014;LEFT TORTOISE SHELL BRACKET;Ps;0;ON;;;;;Y;OPENING TORTOISE SHELL BRACKET;;;;
+3015;RIGHT TORTOISE SHELL BRACKET;Pe;0;ON;;;;;Y;CLOSING TORTOISE SHELL BRACKET;;;;
+3016;LEFT WHITE LENTICULAR BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE LENTICULAR BRACKET;;;;
+3017;RIGHT WHITE LENTICULAR BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE LENTICULAR BRACKET;;;;
+3018;LEFT WHITE TORTOISE SHELL BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE TORTOISE SHELL BRACKET;;;;
+3019;RIGHT WHITE TORTOISE SHELL BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE TORTOISE SHELL BRACKET;;;;
+301A;LEFT WHITE SQUARE BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE SQUARE BRACKET;;;;
+301B;RIGHT WHITE SQUARE BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE SQUARE BRACKET;;;;
+301C;WAVE DASH;Pd;0;ON;;;;;N;;;;;
+301D;REVERSED DOUBLE PRIME QUOTATION MARK;So;0;ON;;;;;N;;;;;
+301E;DOUBLE PRIME QUOTATION MARK;So;0;ON;;;;;N;;;;;
+301F;LOW DOUBLE PRIME QUOTATION MARK;So;0;ON;;;;;N;;;;;
+3020;POSTAL MARK FACE;So;0;ON;;;;;N;;;;;
+3021;HANGZHOU NUMERAL ONE;No;0;L;;;;1;N;;;;;
+3022;HANGZHOU NUMERAL TWO;No;0;L;;;;2;N;;;;;
+3023;HANGZHOU NUMERAL THREE;No;0;L;;;;3;N;;;;;
+3024;HANGZHOU NUMERAL FOUR;No;0;L;;;;4;N;;;;;
+3025;HANGZHOU NUMERAL FIVE;No;0;L;;;;5;N;;;;;
+3026;HANGZHOU NUMERAL SIX;No;0;L;;;;6;N;;;;;
+3027;HANGZHOU NUMERAL SEVEN;No;0;L;;;;7;N;;;;;
+3028;HANGZHOU NUMERAL EIGHT;No;0;L;;;;8;N;;;;;
+3029;HANGZHOU NUMERAL NINE;No;0;L;;;;9;N;;;;;
+302A;IDEOGRAPHIC LEVEL TONE MARK;Mn;218;L;;;;;N;;;;;
+302B;IDEOGRAPHIC RISING TONE MARK;Mn;228;L;;;;;N;;;;;
+302C;IDEOGRAPHIC DEPARTING TONE MARK;Mn;232;L;;;;;N;;;;;
+302D;IDEOGRAPHIC ENTERING TONE MARK;Mn;222;L;;;;;N;;;;;
+302E;HANGUL SINGLE DOT TONE MARK;Mn;224;L;;;;;N;;;;;
+302F;HANGUL DOUBLE DOT TONE MARK;Mn;224;L;;;;;N;;;;;
+3030;WAVY DASH;Pd;0;ON;;;;;N;;;;;
+3031;VERTICAL KANA REPEAT MARK;So;0;ON;;;;;N;;;;;
+3032;VERTICAL KANA REPEAT WITH VOICED SOUND MARK;So;0;ON;;;;;N;;;;;
+3033;VERTICAL KANA REPEAT MARK UPPER HALF;So;0;ON;;;;;N;;;;;
+3034;VERTICAL KANA REPEAT WITH VOICED SOUND MARK UPPER HALF;So;0;ON;;;;;N;;;;;
+3035;VERTICAL KANA REPEAT MARK LOWER HALF;So;0;ON;;;;;N;;;;;
+3036;CIRCLED POSTAL MARK;So;0;ON;<compat> 3012;;;;N;;;;;
+3037;IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL;So;0;ON;;;;;N;;;;;
+303F;IDEOGRAPHIC HALF FILL SPACE;So;0;ON;;;;;N;;;;;
+3041;HIRAGANA LETTER SMALL A;Lo;0;L;;;;;N;;;;;
+3042;HIRAGANA LETTER A;Lo;0;L;;;;;N;;;;;
+3043;HIRAGANA LETTER SMALL I;Lo;0;L;;;;;N;;;;;
+3044;HIRAGANA LETTER I;Lo;0;L;;;;;N;;;;;
+3045;HIRAGANA LETTER SMALL U;Lo;0;L;;;;;N;;;;;
+3046;HIRAGANA LETTER U;Lo;0;L;;;;;N;;;;;
+3047;HIRAGANA LETTER SMALL E;Lo;0;L;;;;;N;;;;;
+3048;HIRAGANA LETTER E;Lo;0;L;;;;;N;;;;;
+3049;HIRAGANA LETTER SMALL O;Lo;0;L;;;;;N;;;;;
+304A;HIRAGANA LETTER O;Lo;0;L;;;;;N;;;;;
+304B;HIRAGANA LETTER KA;Lo;0;L;;;;;N;;;;;
+304C;HIRAGANA LETTER GA;Lo;0;L;304B 3099;;;;N;;;;;
+304D;HIRAGANA LETTER KI;Lo;0;L;;;;;N;;;;;
+304E;HIRAGANA LETTER GI;Lo;0;L;304D 3099;;;;N;;;;;
+304F;HIRAGANA LETTER KU;Lo;0;L;;;;;N;;;;;
+3050;HIRAGANA LETTER GU;Lo;0;L;304F 3099;;;;N;;;;;
+3051;HIRAGANA LETTER KE;Lo;0;L;;;;;N;;;;;
+3052;HIRAGANA LETTER GE;Lo;0;L;3051 3099;;;;N;;;;;
+3053;HIRAGANA LETTER KO;Lo;0;L;;;;;N;;;;;
+3054;HIRAGANA LETTER GO;Lo;0;L;3053 3099;;;;N;;;;;
+3055;HIRAGANA LETTER SA;Lo;0;L;;;;;N;;;;;
+3056;HIRAGANA LETTER ZA;Lo;0;L;3055 3099;;;;N;;;;;
+3057;HIRAGANA LETTER SI;Lo;0;L;;;;;N;;;;;
+3058;HIRAGANA LETTER ZI;Lo;0;L;3057 3099;;;;N;;;;;
+3059;HIRAGANA LETTER SU;Lo;0;L;;;;;N;;;;;
+305A;HIRAGANA LETTER ZU;Lo;0;L;3059 3099;;;;N;;;;;
+305B;HIRAGANA LETTER SE;Lo;0;L;;;;;N;;;;;
+305C;HIRAGANA LETTER ZE;Lo;0;L;305B 3099;;;;N;;;;;
+305D;HIRAGANA LETTER SO;Lo;0;L;;;;;N;;;;;
+305E;HIRAGANA LETTER ZO;Lo;0;L;305D 3099;;;;N;;;;;
+305F;HIRAGANA LETTER TA;Lo;0;L;;;;;N;;;;;
+3060;HIRAGANA LETTER DA;Lo;0;L;305F 3099;;;;N;;;;;
+3061;HIRAGANA LETTER TI;Lo;0;L;;;;;N;;;;;
+3062;HIRAGANA LETTER DI;Lo;0;L;3061 3099;;;;N;;;;;
+3063;HIRAGANA LETTER SMALL TU;Lo;0;L;;;;;N;;;;;
+3064;HIRAGANA LETTER TU;Lo;0;L;;;;;N;;;;;
+3065;HIRAGANA LETTER DU;Lo;0;L;3064 3099;;;;N;;;;;
+3066;HIRAGANA LETTER TE;Lo;0;L;;;;;N;;;;;
+3067;HIRAGANA LETTER DE;Lo;0;L;3066 3099;;;;N;;;;;
+3068;HIRAGANA LETTER TO;Lo;0;L;;;;;N;;;;;
+3069;HIRAGANA LETTER DO;Lo;0;L;3068 3099;;;;N;;;;;
+306A;HIRAGANA LETTER NA;Lo;0;L;;;;;N;;;;;
+306B;HIRAGANA LETTER NI;Lo;0;L;;;;;N;;;;;
+306C;HIRAGANA LETTER NU;Lo;0;L;;;;;N;;;;;
+306D;HIRAGANA LETTER NE;Lo;0;L;;;;;N;;;;;
+306E;HIRAGANA LETTER NO;Lo;0;L;;;;;N;;;;;
+306F;HIRAGANA LETTER HA;Lo;0;L;;;;;N;;;;;
+3070;HIRAGANA LETTER BA;Lo;0;L;306F 3099;;;;N;;;;;
+3071;HIRAGANA LETTER PA;Lo;0;L;306F 309A;;;;N;;;;;
+3072;HIRAGANA LETTER HI;Lo;0;L;;;;;N;;;;;
+3073;HIRAGANA LETTER BI;Lo;0;L;3072 3099;;;;N;;;;;
+3074;HIRAGANA LETTER PI;Lo;0;L;3072 309A;;;;N;;;;;
+3075;HIRAGANA LETTER HU;Lo;0;L;;;;;N;;;;;
+3076;HIRAGANA LETTER BU;Lo;0;L;3075 3099;;;;N;;;;;
+3077;HIRAGANA LETTER PU;Lo;0;L;3075 309A;;;;N;;;;;
+3078;HIRAGANA LETTER HE;Lo;0;L;;;;;N;;;;;
+3079;HIRAGANA LETTER BE;Lo;0;L;3078 3099;;;;N;;;;;
+307A;HIRAGANA LETTER PE;Lo;0;L;3078 309A;;;;N;;;;;
+307B;HIRAGANA LETTER HO;Lo;0;L;;;;;N;;;;;
+307C;HIRAGANA LETTER BO;Lo;0;L;307B 3099;;;;N;;;;;
+307D;HIRAGANA LETTER PO;Lo;0;L;307B 309A;;;;N;;;;;
+307E;HIRAGANA LETTER MA;Lo;0;L;;;;;N;;;;;
+307F;HIRAGANA LETTER MI;Lo;0;L;;;;;N;;;;;
+3080;HIRAGANA LETTER MU;Lo;0;L;;;;;N;;;;;
+3081;HIRAGANA LETTER ME;Lo;0;L;;;;;N;;;;;
+3082;HIRAGANA LETTER MO;Lo;0;L;;;;;N;;;;;
+3083;HIRAGANA LETTER SMALL YA;Lo;0;L;;;;;N;;;;;
+3084;HIRAGANA LETTER YA;Lo;0;L;;;;;N;;;;;
+3085;HIRAGANA LETTER SMALL YU;Lo;0;L;;;;;N;;;;;
+3086;HIRAGANA LETTER YU;Lo;0;L;;;;;N;;;;;
+3087;HIRAGANA LETTER SMALL YO;Lo;0;L;;;;;N;;;;;
+3088;HIRAGANA LETTER YO;Lo;0;L;;;;;N;;;;;
+3089;HIRAGANA LETTER RA;Lo;0;L;;;;;N;;;;;
+308A;HIRAGANA LETTER RI;Lo;0;L;;;;;N;;;;;
+308B;HIRAGANA LETTER RU;Lo;0;L;;;;;N;;;;;
+308C;HIRAGANA LETTER RE;Lo;0;L;;;;;N;;;;;
+308D;HIRAGANA LETTER RO;Lo;0;L;;;;;N;;;;;
+308E;HIRAGANA LETTER SMALL WA;Lo;0;L;;;;;N;;;;;
+308F;HIRAGANA LETTER WA;Lo;0;L;;;;;N;;;;;
+3090;HIRAGANA LETTER WI;Lo;0;L;;;;;N;;;;;
+3091;HIRAGANA LETTER WE;Lo;0;L;;;;;N;;;;;
+3092;HIRAGANA LETTER WO;Lo;0;L;;;;;N;;;;;
+3093;HIRAGANA LETTER N;Lo;0;L;;;;;N;;;;;
+3094;HIRAGANA LETTER VU;Lo;0;L;3046 3099;;;;N;;;;;
+3099;COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK;Mn;8;L;;;;;N;NON-SPACING KATAKANA-HIRAGANA VOICED SOUND MARK;;;;
+309A;COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;Mn;8;L;;;;;N;NON-SPACING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;;;;
+309B;KATAKANA-HIRAGANA VOICED SOUND MARK;Lm;0;L;<compat> 0020 3099;;;;N;;;;;
+309C;KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;Lm;0;L;<compat> 0020 309A;;;;N;;;;;
+309D;HIRAGANA ITERATION MARK;Lm;0;L;;;;;N;;;;;
+309E;HIRAGANA VOICED ITERATION MARK;Lm;0;L;309D 3099;;;;N;;;;;
+30A1;KATAKANA LETTER SMALL A;Lo;0;L;;;;;N;;;;;
+30A2;KATAKANA LETTER A;Lo;0;L;;;;;N;;;;;
+30A3;KATAKANA LETTER SMALL I;Lo;0;L;;;;;N;;;;;
+30A4;KATAKANA LETTER I;Lo;0;L;;;;;N;;;;;
+30A5;KATAKANA LETTER SMALL U;Lo;0;L;;;;;N;;;;;
+30A6;KATAKANA LETTER U;Lo;0;L;;;;;N;;;;;
+30A7;KATAKANA LETTER SMALL E;Lo;0;L;;;;;N;;;;;
+30A8;KATAKANA LETTER E;Lo;0;L;;;;;N;;;;;
+30A9;KATAKANA LETTER SMALL O;Lo;0;L;;;;;N;;;;;
+30AA;KATAKANA LETTER O;Lo;0;L;;;;;N;;;;;
+30AB;KATAKANA LETTER KA;Lo;0;L;;;;;N;;;;;
+30AC;KATAKANA LETTER GA;Lo;0;L;30AB 3099;;;;N;;;;;
+30AD;KATAKANA LETTER KI;Lo;0;L;;;;;N;;;;;
+30AE;KATAKANA LETTER GI;Lo;0;L;30AD 3099;;;;N;;;;;
+30AF;KATAKANA LETTER KU;Lo;0;L;;;;;N;;;;;
+30B0;KATAKANA LETTER GU;Lo;0;L;30AF 3099;;;;N;;;;;
+30B1;KATAKANA LETTER KE;Lo;0;L;;;;;N;;;;;
+30B2;KATAKANA LETTER GE;Lo;0;L;30B1 3099;;;;N;;;;;
+30B3;KATAKANA LETTER KO;Lo;0;L;;;;;N;;;;;
+30B4;KATAKANA LETTER GO;Lo;0;L;30B3 3099;;;;N;;;;;
+30B5;KATAKANA LETTER SA;Lo;0;L;;;;;N;;;;;
+30B6;KATAKANA LETTER ZA;Lo;0;L;30B5 3099;;;;N;;;;;
+30B7;KATAKANA LETTER SI;Lo;0;L;;;;;N;;;;;
+30B8;KATAKANA LETTER ZI;Lo;0;L;30B7 3099;;;;N;;;;;
+30B9;KATAKANA LETTER SU;Lo;0;L;;;;;N;;;;;
+30BA;KATAKANA LETTER ZU;Lo;0;L;30B9 3099;;;;N;;;;;
+30BB;KATAKANA LETTER SE;Lo;0;L;;;;;N;;;;;
+30BC;KATAKANA LETTER ZE;Lo;0;L;30BB 3099;;;;N;;;;;
+30BD;KATAKANA LETTER SO;Lo;0;L;;;;;N;;;;;
+30BE;KATAKANA LETTER ZO;Lo;0;L;30BD 3099;;;;N;;;;;
+30BF;KATAKANA LETTER TA;Lo;0;L;;;;;N;;;;;
+30C0;KATAKANA LETTER DA;Lo;0;L;30BF 3099;;;;N;;;;;
+30C1;KATAKANA LETTER TI;Lo;0;L;;;;;N;;;;;
+30C2;KATAKANA LETTER DI;Lo;0;L;30C1 3099;;;;N;;;;;
+30C3;KATAKANA LETTER SMALL TU;Lo;0;L;;;;;N;;;;;
+30C4;KATAKANA LETTER TU;Lo;0;L;;;;;N;;;;;
+30C5;KATAKANA LETTER DU;Lo;0;L;30C4 3099;;;;N;;;;;
+30C6;KATAKANA LETTER TE;Lo;0;L;;;;;N;;;;;
+30C7;KATAKANA LETTER DE;Lo;0;L;30C6 3099;;;;N;;;;;
+30C8;KATAKANA LETTER TO;Lo;0;L;;;;;N;;;;;
+30C9;KATAKANA LETTER DO;Lo;0;L;30C8 3099;;;;N;;;;;
+30CA;KATAKANA LETTER NA;Lo;0;L;;;;;N;;;;;
+30CB;KATAKANA LETTER NI;Lo;0;L;;;;;N;;;;;
+30CC;KATAKANA LETTER NU;Lo;0;L;;;;;N;;;;;
+30CD;KATAKANA LETTER NE;Lo;0;L;;;;;N;;;;;
+30CE;KATAKANA LETTER NO;Lo;0;L;;;;;N;;;;;
+30CF;KATAKANA LETTER HA;Lo;0;L;;;;;N;;;;;
+30D0;KATAKANA LETTER BA;Lo;0;L;30CF 3099;;;;N;;;;;
+30D1;KATAKANA LETTER PA;Lo;0;L;30CF 309A;;;;N;;;;;
+30D2;KATAKANA LETTER HI;Lo;0;L;;;;;N;;;;;
+30D3;KATAKANA LETTER BI;Lo;0;L;30D2 3099;;;;N;;;;;
+30D4;KATAKANA LETTER PI;Lo;0;L;30D2 309A;;;;N;;;;;
+30D5;KATAKANA LETTER HU;Lo;0;L;;;;;N;;;;;
+30D6;KATAKANA LETTER BU;Lo;0;L;30D5 3099;;;;N;;;;;
+30D7;KATAKANA LETTER PU;Lo;0;L;30D5 309A;;;;N;;;;;
+30D8;KATAKANA LETTER HE;Lo;0;L;;;;;N;;;;;
+30D9;KATAKANA LETTER BE;Lo;0;L;30D8 3099;;;;N;;;;;
+30DA;KATAKANA LETTER PE;Lo;0;L;30D8 309A;;;;N;;;;;
+30DB;KATAKANA LETTER HO;Lo;0;L;;;;;N;;;;;
+30DC;KATAKANA LETTER BO;Lo;0;L;30DB 3099;;;;N;;;;;
+30DD;KATAKANA LETTER PO;Lo;0;L;30DB 309A;;;;N;;;;;
+30DE;KATAKANA LETTER MA;Lo;0;L;;;;;N;;;;;
+30DF;KATAKANA LETTER MI;Lo;0;L;;;;;N;;;;;
+30E0;KATAKANA LETTER MU;Lo;0;L;;;;;N;;;;;
+30E1;KATAKANA LETTER ME;Lo;0;L;;;;;N;;;;;
+30E2;KATAKANA LETTER MO;Lo;0;L;;;;;N;;;;;
+30E3;KATAKANA LETTER SMALL YA;Lo;0;L;;;;;N;;;;;
+30E4;KATAKANA LETTER YA;Lo;0;L;;;;;N;;;;;
+30E5;KATAKANA LETTER SMALL YU;Lo;0;L;;;;;N;;;;;
+30E6;KATAKANA LETTER YU;Lo;0;L;;;;;N;;;;;
+30E7;KATAKANA LETTER SMALL YO;Lo;0;L;;;;;N;;;;;
+30E8;KATAKANA LETTER YO;Lo;0;L;;;;;N;;;;;
+30E9;KATAKANA LETTER RA;Lo;0;L;;;;;N;;;;;
+30EA;KATAKANA LETTER RI;Lo;0;L;;;;;N;;;;;
+30EB;KATAKANA LETTER RU;Lo;0;L;;;;;N;;;;;
+30EC;KATAKANA LETTER RE;Lo;0;L;;;;;N;;;;;
+30ED;KATAKANA LETTER RO;Lo;0;L;;;;;N;;;;;
+30EE;KATAKANA LETTER SMALL WA;Lo;0;L;;;;;N;;;;;
+30EF;KATAKANA LETTER WA;Lo;0;L;;;;;N;;;;;
+30F0;KATAKANA LETTER WI;Lo;0;L;;;;;N;;;;;
+30F1;KATAKANA LETTER WE;Lo;0;L;;;;;N;;;;;
+30F2;KATAKANA LETTER WO;Lo;0;L;;;;;N;;;;;
+30F3;KATAKANA LETTER N;Lo;0;L;;;;;N;;;;;
+30F4;KATAKANA LETTER VU;Lo;0;L;30A6 3099;;;;N;;;;;
+30F5;KATAKANA LETTER SMALL KA;Lo;0;L;;;;;N;;;;;
+30F6;KATAKANA LETTER SMALL KE;Lo;0;L;;;;;N;;;;;
+30F7;KATAKANA LETTER VA;Lo;0;L;30EF 3099;;;;N;;;;;
+30F8;KATAKANA LETTER VI;Lo;0;L;30F0 3099;;;;N;;;;;
+30F9;KATAKANA LETTER VE;Lo;0;L;30F1 3099;;;;N;;;;;
+30FA;KATAKANA LETTER VO;Lo;0;L;30F2 3099;;;;N;;;;;
+30FB;KATAKANA MIDDLE DOT;Po;0;L;;;;;N;;;;;
+30FC;KATAKANA-HIRAGANA PROLONGED SOUND MARK;Lm;0;L;;;;;N;;;;;
+30FD;KATAKANA ITERATION MARK;Lm;0;L;;;;;N;;;;;
+30FE;KATAKANA VOICED ITERATION MARK;Lm;0;L;30FD 3099;;;;N;;;;;
+3105;BOPOMOFO LETTER B;Lo;0;L;;;;;N;;;;;
+3106;BOPOMOFO LETTER P;Lo;0;L;;;;;N;;;;;
+3107;BOPOMOFO LETTER M;Lo;0;L;;;;;N;;;;;
+3108;BOPOMOFO LETTER F;Lo;0;L;;;;;N;;;;;
+3109;BOPOMOFO LETTER D;Lo;0;L;;;;;N;;;;;
+310A;BOPOMOFO LETTER T;Lo;0;L;;;;;N;;;;;
+310B;BOPOMOFO LETTER N;Lo;0;L;;;;;N;;;;;
+310C;BOPOMOFO LETTER L;Lo;0;L;;;;;N;;;;;
+310D;BOPOMOFO LETTER G;Lo;0;L;;;;;N;;;;;
+310E;BOPOMOFO LETTER K;Lo;0;L;;;;;N;;;;;
+310F;BOPOMOFO LETTER H;Lo;0;L;;;;;N;;;;;
+3110;BOPOMOFO LETTER J;Lo;0;L;;;;;N;;;;;
+3111;BOPOMOFO LETTER Q;Lo;0;L;;;;;N;;;;;
+3112;BOPOMOFO LETTER X;Lo;0;L;;;;;N;;;;;
+3113;BOPOMOFO LETTER ZH;Lo;0;L;;;;;N;;;;;
+3114;BOPOMOFO LETTER CH;Lo;0;L;;;;;N;;;;;
+3115;BOPOMOFO LETTER SH;Lo;0;L;;;;;N;;;;;
+3116;BOPOMOFO LETTER R;Lo;0;L;;;;;N;;;;;
+3117;BOPOMOFO LETTER Z;Lo;0;L;;;;;N;;;;;
+3118;BOPOMOFO LETTER C;Lo;0;L;;;;;N;;;;;
+3119;BOPOMOFO LETTER S;Lo;0;L;;;;;N;;;;;
+311A;BOPOMOFO LETTER A;Lo;0;L;;;;;N;;;;;
+311B;BOPOMOFO LETTER O;Lo;0;L;;;;;N;;;;;
+311C;BOPOMOFO LETTER E;Lo;0;L;;;;;N;;;;;
+311D;BOPOMOFO LETTER EH;Lo;0;L;;;;;N;;;;;
+311E;BOPOMOFO LETTER AI;Lo;0;L;;;;;N;;;;;
+311F;BOPOMOFO LETTER EI;Lo;0;L;;;;;N;;;;;
+3120;BOPOMOFO LETTER AU;Lo;0;L;;;;;N;;;;;
+3121;BOPOMOFO LETTER OU;Lo;0;L;;;;;N;;;;;
+3122;BOPOMOFO LETTER AN;Lo;0;L;;;;;N;;;;;
+3123;BOPOMOFO LETTER EN;Lo;0;L;;;;;N;;;;;
+3124;BOPOMOFO LETTER ANG;Lo;0;L;;;;;N;;;;;
+3125;BOPOMOFO LETTER ENG;Lo;0;L;;;;;N;;;;;
+3126;BOPOMOFO LETTER ER;Lo;0;L;;;;;N;;;;;
+3127;BOPOMOFO LETTER I;Lo;0;L;;;;;N;;;;;
+3128;BOPOMOFO LETTER U;Lo;0;L;;;;;N;;;;;
+3129;BOPOMOFO LETTER IU;Lo;0;L;;;;;N;;;;;
+312A;BOPOMOFO LETTER V;Lo;0;L;;;;;N;;;;;
+312B;BOPOMOFO LETTER NG;Lo;0;L;;;;;N;;;;;
+312C;BOPOMOFO LETTER GN;Lo;0;L;;;;;N;;;;;
+3131;HANGUL LETTER KIYEOK;Lo;0;L;<compat> 1100;;;;N;HANGUL LETTER GIYEOG;;;;
+3132;HANGUL LETTER SSANGKIYEOK;Lo;0;L;<compat> 1101;;;;N;HANGUL LETTER SSANG GIYEOG;;;;
+3133;HANGUL LETTER KIYEOK-SIOS;Lo;0;L;<compat> 11AA;;;;N;HANGUL LETTER GIYEOG SIOS;;;;
+3134;HANGUL LETTER NIEUN;Lo;0;L;<compat> 1102;;;;N;;;;;
+3135;HANGUL LETTER NIEUN-CIEUC;Lo;0;L;<compat> 11AC;;;;N;HANGUL LETTER NIEUN JIEUJ;;;;
+3136;HANGUL LETTER NIEUN-HIEUH;Lo;0;L;<compat> 11AD;;;;N;HANGUL LETTER NIEUN HIEUH;;;;
+3137;HANGUL LETTER TIKEUT;Lo;0;L;<compat> 1103;;;;N;HANGUL LETTER DIGEUD;;;;
+3138;HANGUL LETTER SSANGTIKEUT;Lo;0;L;<compat> 1104;;;;N;HANGUL LETTER SSANG DIGEUD;;;;
+3139;HANGUL LETTER RIEUL;Lo;0;L;<compat> 1105;;;;N;HANGUL LETTER LIEUL;;;;
+313A;HANGUL LETTER RIEUL-KIYEOK;Lo;0;L;<compat> 11B0;;;;N;HANGUL LETTER LIEUL GIYEOG;;;;
+313B;HANGUL LETTER RIEUL-MIEUM;Lo;0;L;<compat> 11B1;;;;N;HANGUL LETTER LIEUL MIEUM;;;;
+313C;HANGUL LETTER RIEUL-PIEUP;Lo;0;L;<compat> 11B2;;;;N;HANGUL LETTER LIEUL BIEUB;;;;
+313D;HANGUL LETTER RIEUL-SIOS;Lo;0;L;<compat> 11B3;;;;N;HANGUL LETTER LIEUL SIOS;;;;
+313E;HANGUL LETTER RIEUL-THIEUTH;Lo;0;L;<compat> 11B4;;;;N;HANGUL LETTER LIEUL TIEUT;;;;
+313F;HANGUL LETTER RIEUL-PHIEUPH;Lo;0;L;<compat> 11B5;;;;N;HANGUL LETTER LIEUL PIEUP;;;;
+3140;HANGUL LETTER RIEUL-HIEUH;Lo;0;L;<compat> 111A;;;;N;HANGUL LETTER LIEUL HIEUH;;;;
+3141;HANGUL LETTER MIEUM;Lo;0;L;<compat> 1106;;;;N;;;;;
+3142;HANGUL LETTER PIEUP;Lo;0;L;<compat> 1107;;;;N;HANGUL LETTER BIEUB;;;;
+3143;HANGUL LETTER SSANGPIEUP;Lo;0;L;<compat> 1108;;;;N;HANGUL LETTER SSANG BIEUB;;;;
+3144;HANGUL LETTER PIEUP-SIOS;Lo;0;L;<compat> 1121;;;;N;HANGUL LETTER BIEUB SIOS;;;;
+3145;HANGUL LETTER SIOS;Lo;0;L;<compat> 1109;;;;N;;;;;
+3146;HANGUL LETTER SSANGSIOS;Lo;0;L;<compat> 110A;;;;N;HANGUL LETTER SSANG SIOS;;;;
+3147;HANGUL LETTER IEUNG;Lo;0;L;<compat> 110B;;;;N;;;;;
+3148;HANGUL LETTER CIEUC;Lo;0;L;<compat> 110C;;;;N;HANGUL LETTER JIEUJ;;;;
+3149;HANGUL LETTER SSANGCIEUC;Lo;0;L;<compat> 110D;;;;N;HANGUL LETTER SSANG JIEUJ;;;;
+314A;HANGUL LETTER CHIEUCH;Lo;0;L;<compat> 110E;;;;N;HANGUL LETTER CIEUC;;;;
+314B;HANGUL LETTER KHIEUKH;Lo;0;L;<compat> 110F;;;;N;HANGUL LETTER KIYEOK;;;;
+314C;HANGUL LETTER THIEUTH;Lo;0;L;<compat> 1110;;;;N;HANGUL LETTER TIEUT;;;;
+314D;HANGUL LETTER PHIEUPH;Lo;0;L;<compat> 1111;;;;N;HANGUL LETTER PIEUP;;;;
+314E;HANGUL LETTER HIEUH;Lo;0;L;<compat> 1112;;;;N;;;;;
+314F;HANGUL LETTER A;Lo;0;L;<compat> 1161;;;;N;;;;;
+3150;HANGUL LETTER AE;Lo;0;L;<compat> 1162;;;;N;;;;;
+3151;HANGUL LETTER YA;Lo;0;L;<compat> 1163;;;;N;;;;;
+3152;HANGUL LETTER YAE;Lo;0;L;<compat> 1164;;;;N;;;;;
+3153;HANGUL LETTER EO;Lo;0;L;<compat> 1165;;;;N;;;;;
+3154;HANGUL LETTER E;Lo;0;L;<compat> 1166;;;;N;;;;;
+3155;HANGUL LETTER YEO;Lo;0;L;<compat> 1167;;;;N;;;;;
+3156;HANGUL LETTER YE;Lo;0;L;<compat> 1168;;;;N;;;;;
+3157;HANGUL LETTER O;Lo;0;L;<compat> 1169;;;;N;;;;;
+3158;HANGUL LETTER WA;Lo;0;L;<compat> 116A;;;;N;;;;;
+3159;HANGUL LETTER WAE;Lo;0;L;<compat> 116B;;;;N;;;;;
+315A;HANGUL LETTER OE;Lo;0;L;<compat> 116C;;;;N;;;;;
+315B;HANGUL LETTER YO;Lo;0;L;<compat> 116D;;;;N;;;;;
+315C;HANGUL LETTER U;Lo;0;L;<compat> 116E;;;;N;;;;;
+315D;HANGUL LETTER WEO;Lo;0;L;<compat> 116F;;;;N;;;;;
+315E;HANGUL LETTER WE;Lo;0;L;<compat> 1170;;;;N;;;;;
+315F;HANGUL LETTER WI;Lo;0;L;<compat> 1171;;;;N;;;;;
+3160;HANGUL LETTER YU;Lo;0;L;<compat> 1172;;;;N;;;;;
+3161;HANGUL LETTER EU;Lo;0;L;<compat> 1173;;;;N;;;;;
+3162;HANGUL LETTER YI;Lo;0;L;<compat> 1174;;;;N;;;;;
+3163;HANGUL LETTER I;Lo;0;L;<compat> 1175;;;;N;;;;;
+3164;HANGUL FILLER;Lo;0;L;<compat> 1160;;;;N;HANGUL CAE OM;;;;
+3165;HANGUL LETTER SSANGNIEUN;Lo;0;L;<compat> 1114;;;;N;HANGUL LETTER SSANG NIEUN;;;;
+3166;HANGUL LETTER NIEUN-TIKEUT;Lo;0;L;<compat> 1115;;;;N;HANGUL LETTER NIEUN DIGEUD;;;;
+3167;HANGUL LETTER NIEUN-SIOS;Lo;0;L;<compat> 11C7;;;;N;HANGUL LETTER NIEUN SIOS;;;;
+3168;HANGUL LETTER NIEUN-PANSIOS;Lo;0;L;<compat> 11C8;;;;N;HANGUL LETTER NIEUN BAN CHI EUM;;;;
+3169;HANGUL LETTER RIEUL-KIYEOK-SIOS;Lo;0;L;<compat> 11CC;;;;N;HANGUL LETTER LIEUL GIYEOG SIOS;;;;
+316A;HANGUL LETTER RIEUL-TIKEUT;Lo;0;L;<compat> 11CE;;;;N;HANGUL LETTER LIEUL DIGEUD;;;;
+316B;HANGUL LETTER RIEUL-PIEUP-SIOS;Lo;0;L;<compat> 11D3;;;;N;HANGUL LETTER LIEUL BIEUB SIOS;;;;
+316C;HANGUL LETTER RIEUL-PANSIOS;Lo;0;L;<compat> 11D7;;;;N;HANGUL LETTER LIEUL BAN CHI EUM;;;;
+316D;HANGUL LETTER RIEUL-YEORINHIEUH;Lo;0;L;<compat> 11D9;;;;N;HANGUL LETTER LIEUL YEOLIN HIEUH;;;;
+316E;HANGUL LETTER MIEUM-PIEUP;Lo;0;L;<compat> 111C;;;;N;HANGUL LETTER MIEUM BIEUB;;;;
+316F;HANGUL LETTER MIEUM-SIOS;Lo;0;L;<compat> 11DD;;;;N;HANGUL LETTER MIEUM SIOS;;;;
+3170;HANGUL LETTER MIEUM-PANSIOS;Lo;0;L;<compat> 11DF;;;;N;HANGUL LETTER BIEUB BAN CHI EUM;;;;
+3171;HANGUL LETTER KAPYEOUNMIEUM;Lo;0;L;<compat> 111D;;;;N;HANGUL LETTER MIEUM SUN GYEONG EUM;;;;
+3172;HANGUL LETTER PIEUP-KIYEOK;Lo;0;L;<compat> 111E;;;;N;HANGUL LETTER BIEUB GIYEOG;;;;
+3173;HANGUL LETTER PIEUP-TIKEUT;Lo;0;L;<compat> 1120;;;;N;HANGUL LETTER BIEUB DIGEUD;;;;
+3174;HANGUL LETTER PIEUP-SIOS-KIYEOK;Lo;0;L;<compat> 1122;;;;N;HANGUL LETTER BIEUB SIOS GIYEOG;;;;
+3175;HANGUL LETTER PIEUP-SIOS-TIKEUT;Lo;0;L;<compat> 1123;;;;N;HANGUL LETTER BIEUB SIOS DIGEUD;;;;
+3176;HANGUL LETTER PIEUP-CIEUC;Lo;0;L;<compat> 1127;;;;N;HANGUL LETTER BIEUB JIEUJ;;;;
+3177;HANGUL LETTER PIEUP-THIEUTH;Lo;0;L;<compat> 1129;;;;N;HANGUL LETTER BIEUB TIEUT;;;;
+3178;HANGUL LETTER KAPYEOUNPIEUP;Lo;0;L;<compat> 112B;;;;N;HANGUL LETTER BIEUB SUN GYEONG EUM;;;;
+3179;HANGUL LETTER KAPYEOUNSSANGPIEUP;Lo;0;L;<compat> 112C;;;;N;HANGUL LETTER SSANG BIEUB SUN GYEONG EUM;;;;
+317A;HANGUL LETTER SIOS-KIYEOK;Lo;0;L;<compat> 112D;;;;N;HANGUL LETTER SIOS GIYEOG;;;;
+317B;HANGUL LETTER SIOS-NIEUN;Lo;0;L;<compat> 112E;;;;N;HANGUL LETTER SIOS NIEUN;;;;
+317C;HANGUL LETTER SIOS-TIKEUT;Lo;0;L;<compat> 112F;;;;N;HANGUL LETTER SIOS DIGEUD;;;;
+317D;HANGUL LETTER SIOS-PIEUP;Lo;0;L;<compat> 1132;;;;N;HANGUL LETTER SIOS BIEUB;;;;
+317E;HANGUL LETTER SIOS-CIEUC;Lo;0;L;<compat> 1136;;;;N;HANGUL LETTER SIOS JIEUJ;;;;
+317F;HANGUL LETTER PANSIOS;Lo;0;L;<compat> 1140;;;;N;HANGUL LETTER BAN CHI EUM;;;;
+3180;HANGUL LETTER SSANGIEUNG;Lo;0;L;<compat> 1147;;;;N;HANGUL LETTER SSANG IEUNG;;;;
+3181;HANGUL LETTER YESIEUNG;Lo;0;L;<compat> 114C;;;;N;HANGUL LETTER NGIEUNG;;;;
+3182;HANGUL LETTER YESIEUNG-SIOS;Lo;0;L;<compat> 11F1;;;;N;HANGUL LETTER NGIEUNG SIOS;;;;
+3183;HANGUL LETTER YESIEUNG-PANSIOS;Lo;0;L;<compat> 11F2;;;;N;HANGUL LETTER NGIEUNG BAN CHI EUM;;;;
+3184;HANGUL LETTER KAPYEOUNPHIEUPH;Lo;0;L;<compat> 1157;;;;N;HANGUL LETTER PIEUP SUN GYEONG EUM;;;;
+3185;HANGUL LETTER SSANGHIEUH;Lo;0;L;<compat> 1158;;;;N;HANGUL LETTER SSANG HIEUH;;;;
+3186;HANGUL LETTER YEORINHIEUH;Lo;0;L;<compat> 1159;;;;N;HANGUL LETTER YEOLIN HIEUH;;;;
+3187;HANGUL LETTER YO-YA;Lo;0;L;<compat> 1184;;;;N;HANGUL LETTER YOYA;;;;
+3188;HANGUL LETTER YO-YAE;Lo;0;L;<compat> 1185;;;;N;HANGUL LETTER YOYAE;;;;
+3189;HANGUL LETTER YO-I;Lo;0;L;<compat> 1188;;;;N;HANGUL LETTER YOI;;;;
+318A;HANGUL LETTER YU-YEO;Lo;0;L;<compat> 1191;;;;N;HANGUL LETTER YUYEO;;;;
+318B;HANGUL LETTER YU-YE;Lo;0;L;<compat> 1192;;;;N;HANGUL LETTER YUYE;;;;
+318C;HANGUL LETTER YU-I;Lo;0;L;<compat> 1194;;;;N;HANGUL LETTER YUI;;;;
+318D;HANGUL LETTER ARAEA;Lo;0;L;<compat> 119E;;;;N;HANGUL LETTER ALAE A;;;;
+318E;HANGUL LETTER ARAEAE;Lo;0;L;<compat> 11A1;;;;N;HANGUL LETTER ALAE AE;;;;
+3190;IDEOGRAPHIC ANNOTATION LINKING MARK;So;0;L;;;;;N;KANBUN TATETEN;Kanbun Tateten;;;
+3191;IDEOGRAPHIC ANNOTATION REVERSE MARK;So;0;L;;;;;N;KAERITEN RE;Kaeriten;;;
+3192;IDEOGRAPHIC ANNOTATION ONE MARK;Lo;0;L;<super> 4E00;;;;N;KAERITEN ITI;Kaeriten;;;
+3193;IDEOGRAPHIC ANNOTATION TWO MARK;Lo;0;L;<super> 4E8C;;;;N;KAERITEN NI;Kaeriten;;;
+3194;IDEOGRAPHIC ANNOTATION THREE MARK;Lo;0;L;<super> 4E09;;;;N;KAERITEN SAN;Kaeriten;;;
+3195;IDEOGRAPHIC ANNOTATION FOUR MARK;Lo;0;L;<super> 56DB;;;;N;KAERITEN SI;Kaeriten;;;
+3196;IDEOGRAPHIC ANNOTATION TOP MARK;Lo;0;L;<super> 4E0A;;;;N;KAERITEN ZYOU;Kaeriten;;;
+3197;IDEOGRAPHIC ANNOTATION MIDDLE MARK;Lo;0;L;<super> 4E2D;;;;N;KAERITEN TYUU;Kaeriten;;;
+3198;IDEOGRAPHIC ANNOTATION BOTTOM MARK;Lo;0;L;<super> 4E0B;;;;N;KAERITEN GE;Kaeriten;;;
+3199;IDEOGRAPHIC ANNOTATION FIRST MARK;Lo;0;L;<super> 7532;;;;N;KAERITEN KOU;Kaeriten;;;
+319A;IDEOGRAPHIC ANNOTATION SECOND MARK;Lo;0;L;<super> 4E59;;;;N;KAERITEN OTU;Kaeriten;;;
+319B;IDEOGRAPHIC ANNOTATION THIRD MARK;Lo;0;L;<super> 4E19;;;;N;KAERITEN HEI;Kaeriten;;;
+319C;IDEOGRAPHIC ANNOTATION FOURTH MARK;Lo;0;L;<super> 4E01;;;;N;KAERITEN TEI;Kaeriten;;;
+319D;IDEOGRAPHIC ANNOTATION HEAVEN MARK;Lo;0;L;<super> 5929;;;;N;KAERITEN TEN;Kaeriten;;;
+319E;IDEOGRAPHIC ANNOTATION EARTH MARK;Lo;0;L;<super> 5730;;;;N;KAERITEN TI;Kaeriten;;;
+319F;IDEOGRAPHIC ANNOTATION MAN MARK;Lo;0;L;<super> 4EBA;;;;N;KAERITEN ZIN;Kaeriten;;;
+3200;PARENTHESIZED HANGUL KIYEOK;So;0;L;<compat> 0028 1100 0029;;;;N;PARENTHESIZED HANGUL GIYEOG;;;;
+3201;PARENTHESIZED HANGUL NIEUN;So;0;L;<compat> 0028 1102 0029;;;;N;;;;;
+3202;PARENTHESIZED HANGUL TIKEUT;So;0;L;<compat> 0028 1103 0029;;;;N;PARENTHESIZED HANGUL DIGEUD;;;;
+3203;PARENTHESIZED HANGUL RIEUL;So;0;L;<compat> 0028 1105 0029;;;;N;PARENTHESIZED HANGUL LIEUL;;;;
+3204;PARENTHESIZED HANGUL MIEUM;So;0;L;<compat> 0028 1106 0029;;;;N;;;;;
+3205;PARENTHESIZED HANGUL PIEUP;So;0;L;<compat> 0028 1107 0029;;;;N;PARENTHESIZED HANGUL BIEUB;;;;
+3206;PARENTHESIZED HANGUL SIOS;So;0;L;<compat> 0028 1109 0029;;;;N;;;;;
+3207;PARENTHESIZED HANGUL IEUNG;So;0;L;<compat> 0028 110B 0029;;;;N;;;;;
+3208;PARENTHESIZED HANGUL CIEUC;So;0;L;<compat> 0028 110C 0029;;;;N;PARENTHESIZED HANGUL JIEUJ;;;;
+3209;PARENTHESIZED HANGUL CHIEUCH;So;0;L;<compat> 0028 110E 0029;;;;N;PARENTHESIZED HANGUL CIEUC;;;;
+320A;PARENTHESIZED HANGUL KHIEUKH;So;0;L;<compat> 0028 110F 0029;;;;N;PARENTHESIZED HANGUL KIYEOK;;;;
+320B;PARENTHESIZED HANGUL THIEUTH;So;0;L;<compat> 0028 1110 0029;;;;N;PARENTHESIZED HANGUL TIEUT;;;;
+320C;PARENTHESIZED HANGUL PHIEUPH;So;0;L;<compat> 0028 1111 0029;;;;N;PARENTHESIZED HANGUL PIEUP;;;;
+320D;PARENTHESIZED HANGUL HIEUH;So;0;L;<compat> 0028 1112 0029;;;;N;;;;;
+320E;PARENTHESIZED HANGUL KIYEOK A;So;0;L;<compat> 0028 1100 1161 0029;;;;N;PARENTHESIZED HANGUL GA;;;;
+320F;PARENTHESIZED HANGUL NIEUN A;So;0;L;<compat> 0028 1102 1161 0029;;;;N;PARENTHESIZED HANGUL NA;;;;
+3210;PARENTHESIZED HANGUL TIKEUT A;So;0;L;<compat> 0028 1103 1161 0029;;;;N;PARENTHESIZED HANGUL DA;;;;
+3211;PARENTHESIZED HANGUL RIEUL A;So;0;L;<compat> 0028 1105 1161 0029;;;;N;PARENTHESIZED HANGUL LA;;;;
+3212;PARENTHESIZED HANGUL MIEUM A;So;0;L;<compat> 0028 1106 1161 0029;;;;N;PARENTHESIZED HANGUL MA;;;;
+3213;PARENTHESIZED HANGUL PIEUP A;So;0;L;<compat> 0028 1107 1161 0029;;;;N;PARENTHESIZED HANGUL BA;;;;
+3214;PARENTHESIZED HANGUL SIOS A;So;0;L;<compat> 0028 1109 1161 0029;;;;N;PARENTHESIZED HANGUL SA;;;;
+3215;PARENTHESIZED HANGUL IEUNG A;So;0;L;<compat> 0028 110B 1161 0029;;;;N;PARENTHESIZED HANGUL A;;;;
+3216;PARENTHESIZED HANGUL CIEUC A;So;0;L;<compat> 0028 110C 1161 0029;;;;N;PARENTHESIZED HANGUL JA;;;;
+3217;PARENTHESIZED HANGUL CHIEUCH A;So;0;L;<compat> 0028 110E 1161 0029;;;;N;PARENTHESIZED HANGUL CA;;;;
+3218;PARENTHESIZED HANGUL KHIEUKH A;So;0;L;<compat> 0028 110F 1161 0029;;;;N;PARENTHESIZED HANGUL KA;;;;
+3219;PARENTHESIZED HANGUL THIEUTH A;So;0;L;<compat> 0028 1110 1161 0029;;;;N;PARENTHESIZED HANGUL TA;;;;
+321A;PARENTHESIZED HANGUL PHIEUPH A;So;0;L;<compat> 0028 1111 1161 0029;;;;N;PARENTHESIZED HANGUL PA;;;;
+321B;PARENTHESIZED HANGUL HIEUH A;So;0;L;<compat> 0028 1112 1161 0029;;;;N;PARENTHESIZED HANGUL HA;;;;
+321C;PARENTHESIZED HANGUL CIEUC U;So;0;L;<compat> 0028 110C 116E 0029;;;;N;PARENTHESIZED HANGUL JU;;;;
+3220;PARENTHESIZED IDEOGRAPH ONE;So;0;L;<compat> 0028 4E00 0029;;;;N;;;;;
+3221;PARENTHESIZED IDEOGRAPH TWO;So;0;L;<compat> 0028 4E8C 0029;;;;N;;;;;
+3222;PARENTHESIZED IDEOGRAPH THREE;So;0;L;<compat> 0028 4E09 0029;;;;N;;;;;
+3223;PARENTHESIZED IDEOGRAPH FOUR;So;0;L;<compat> 0028 56DB 0029;;;;N;;;;;
+3224;PARENTHESIZED IDEOGRAPH FIVE;So;0;L;<compat> 0028 4E94 0029;;;;N;;;;;
+3225;PARENTHESIZED IDEOGRAPH SIX;So;0;L;<compat> 0028 516D 0029;;;;N;;;;;
+3226;PARENTHESIZED IDEOGRAPH SEVEN;So;0;L;<compat> 0028 4E03 0029;;;;N;;;;;
+3227;PARENTHESIZED IDEOGRAPH EIGHT;So;0;L;<compat> 0028 516B 0029;;;;N;;;;;
+3228;PARENTHESIZED IDEOGRAPH NINE;So;0;L;<compat> 0028 4E5D 0029;;;;N;;;;;
+3229;PARENTHESIZED IDEOGRAPH TEN;So;0;L;<compat> 0028 5341 0029;;;;N;;;;;
+322A;PARENTHESIZED IDEOGRAPH MOON;So;0;L;<compat> 0028 6708 0029;;;;N;;;;;
+322B;PARENTHESIZED IDEOGRAPH FIRE;So;0;L;<compat> 0028 706B 0029;;;;N;;;;;
+322C;PARENTHESIZED IDEOGRAPH WATER;So;0;L;<compat> 0028 6C34 0029;;;;N;;;;;
+322D;PARENTHESIZED IDEOGRAPH WOOD;So;0;L;<compat> 0028 6728 0029;;;;N;;;;;
+322E;PARENTHESIZED IDEOGRAPH METAL;So;0;L;<compat> 0028 91D1 0029;;;;N;;;;;
+322F;PARENTHESIZED IDEOGRAPH EARTH;So;0;L;<compat> 0028 571F 0029;;;;N;;;;;
+3230;PARENTHESIZED IDEOGRAPH SUN;So;0;L;<compat> 0028 65E5 0029;;;;N;;;;;
+3231;PARENTHESIZED IDEOGRAPH STOCK;So;0;L;<compat> 0028 682A 0029;;;;N;;;;;
+3232;PARENTHESIZED IDEOGRAPH HAVE;So;0;L;<compat> 0028 6709 0029;;;;N;;;;;
+3233;PARENTHESIZED IDEOGRAPH SOCIETY;So;0;L;<compat> 0028 793E 0029;;;;N;;;;;
+3234;PARENTHESIZED IDEOGRAPH NAME;So;0;L;<compat> 0028 540D 0029;;;;N;;;;;
+3235;PARENTHESIZED IDEOGRAPH SPECIAL;So;0;L;<compat> 0028 7279 0029;;;;N;;;;;
+3236;PARENTHESIZED IDEOGRAPH FINANCIAL;So;0;L;<compat> 0028 8CA1 0029;;;;N;;;;;
+3237;PARENTHESIZED IDEOGRAPH CONGRATULATION;So;0;L;<compat> 0028 795D 0029;;;;N;;;;;
+3238;PARENTHESIZED IDEOGRAPH LABOR;So;0;L;<compat> 0028 52B4 0029;;;;N;;;;;
+3239;PARENTHESIZED IDEOGRAPH REPRESENT;So;0;L;<compat> 0028 4EE3 0029;;;;N;;;;;
+323A;PARENTHESIZED IDEOGRAPH CALL;So;0;L;<compat> 0028 547C 0029;;;;N;;;;;
+323B;PARENTHESIZED IDEOGRAPH STUDY;So;0;L;<compat> 0028 5B66 0029;;;;N;;;;;
+323C;PARENTHESIZED IDEOGRAPH SUPERVISE;So;0;L;<compat> 0028 76E3 0029;;;;N;;;;;
+323D;PARENTHESIZED IDEOGRAPH ENTERPRISE;So;0;L;<compat> 0028 4F01 0029;;;;N;;;;;
+323E;PARENTHESIZED IDEOGRAPH RESOURCE;So;0;L;<compat> 0028 8CC7 0029;;;;N;;;;;
+323F;PARENTHESIZED IDEOGRAPH ALLIANCE;So;0;L;<compat> 0028 5354 0029;;;;N;;;;;
+3240;PARENTHESIZED IDEOGRAPH FESTIVAL;So;0;L;<compat> 0028 796D 0029;;;;N;;;;;
+3241;PARENTHESIZED IDEOGRAPH REST;So;0;L;<compat> 0028 4F11 0029;;;;N;;;;;
+3242;PARENTHESIZED IDEOGRAPH SELF;So;0;L;<compat> 0028 81EA 0029;;;;N;;;;;
+3243;PARENTHESIZED IDEOGRAPH REACH;So;0;L;<compat> 0028 81F3 0029;;;;N;;;;;
+3260;CIRCLED HANGUL KIYEOK;Lo;0;L;<circle> 1100;;;;N;CIRCLED HANGUL GIYEOG;;;;
+3261;CIRCLED HANGUL NIEUN;Lo;0;L;<circle> 1102;;;;N;;;;;
+3262;CIRCLED HANGUL TIKEUT;Lo;0;L;<circle> 1103;;;;N;CIRCLED HANGUL DIGEUD;;;;
+3263;CIRCLED HANGUL RIEUL;Lo;0;L;<circle> 1105;;;;N;CIRCLED HANGUL LIEUL;;;;
+3264;CIRCLED HANGUL MIEUM;Lo;0;L;<circle> 1106;;;;N;;;;;
+3265;CIRCLED HANGUL PIEUP;Lo;0;L;<circle> 1107;;;;N;CIRCLED HANGUL BIEUB;;;;
+3266;CIRCLED HANGUL SIOS;Lo;0;L;<circle> 1109;;;;N;;;;;
+3267;CIRCLED HANGUL IEUNG;Lo;0;L;<circle> 110B;;;;N;;;;;
+3268;CIRCLED HANGUL CIEUC;Lo;0;L;<circle> 110C;;;;N;CIRCLED HANGUL JIEUJ;;;;
+3269;CIRCLED HANGUL CHIEUCH;Lo;0;L;<circle> 110E;;;;N;CIRCLED HANGUL CIEUC;;;;
+326A;CIRCLED HANGUL KHIEUKH;Lo;0;L;<circle> 110F;;;;N;CIRCLED HANGUL KIYEOK;;;;
+326B;CIRCLED HANGUL THIEUTH;Lo;0;L;<circle> 1110;;;;N;CIRCLED HANGUL TIEUT;;;;
+326C;CIRCLED HANGUL PHIEUPH;Lo;0;L;<circle> 1111;;;;N;CIRCLED HANGUL PIEUP;;;;
+326D;CIRCLED HANGUL HIEUH;Lo;0;L;<circle> 1112;;;;N;;;;;
+326E;CIRCLED HANGUL KIYEOK A;Lo;0;L;<circle> 1100 1161;;;;N;CIRCLED HANGUL GA;;;;
+326F;CIRCLED HANGUL NIEUN A;Lo;0;L;<circle> 1102 1161;;;;N;CIRCLED HANGUL NA;;;;
+3270;CIRCLED HANGUL TIKEUT A;Lo;0;L;<circle> 1103 1161;;;;N;CIRCLED HANGUL DA;;;;
+3271;CIRCLED HANGUL RIEUL A;Lo;0;L;<circle> 1105 1161;;;;N;CIRCLED HANGUL LA;;;;
+3272;CIRCLED HANGUL MIEUM A;Lo;0;L;<circle> 1106 1161;;;;N;CIRCLED HANGUL MA;;;;
+3273;CIRCLED HANGUL PIEUP A;Lo;0;L;<circle> 1107 1161;;;;N;CIRCLED HANGUL BA;;;;
+3274;CIRCLED HANGUL SIOS A;Lo;0;L;<circle> 1109 1161;;;;N;CIRCLED HANGUL SA;;;;
+3275;CIRCLED HANGUL IEUNG A;Lo;0;L;<circle> 110B 1161;;;;N;CIRCLED HANGUL A;;;;
+3276;CIRCLED HANGUL CIEUC A;Lo;0;L;<circle> 110C 1161;;;;N;CIRCLED HANGUL JA;;;;
+3277;CIRCLED HANGUL CHIEUCH A;Lo;0;L;<circle> 110E 1161;;;;N;CIRCLED HANGUL CA;;;;
+3278;CIRCLED HANGUL KHIEUKH A;Lo;0;L;<circle> 110F 1161;;;;N;CIRCLED HANGUL KA;;;;
+3279;CIRCLED HANGUL THIEUTH A;Lo;0;L;<circle> 1110 1161;;;;N;CIRCLED HANGUL TA;;;;
+327A;CIRCLED HANGUL PHIEUPH A;Lo;0;L;<circle> 1111 1161;;;;N;CIRCLED HANGUL PA;;;;
+327B;CIRCLED HANGUL HIEUH A;Lo;0;L;<circle> 1112 1161;;;;N;CIRCLED HANGUL HA;;;;
+327F;KOREAN STANDARD SYMBOL;So;0;L;;;;;N;;;;;
+3280;CIRCLED IDEOGRAPH ONE;No;0;L;<circle> 4E00;;;1;N;;;;;
+3281;CIRCLED IDEOGRAPH TWO;No;0;L;<circle> 4E8C;;;2;N;;;;;
+3282;CIRCLED IDEOGRAPH THREE;No;0;L;<circle> 4E09;;;3;N;;;;;
+3283;CIRCLED IDEOGRAPH FOUR;No;0;L;<circle> 56DB;;;4;N;;;;;
+3284;CIRCLED IDEOGRAPH FIVE;No;0;L;<circle> 4E94;;;5;N;;;;;
+3285;CIRCLED IDEOGRAPH SIX;No;0;L;<circle> 516D;;;6;N;;;;;
+3286;CIRCLED IDEOGRAPH SEVEN;No;0;L;<circle> 4E03;;;7;N;;;;;
+3287;CIRCLED IDEOGRAPH EIGHT;No;0;L;<circle> 516B;;;8;N;;;;;
+3288;CIRCLED IDEOGRAPH NINE;No;0;L;<circle> 4E5D;;;9;N;;;;;
+3289;CIRCLED IDEOGRAPH TEN;No;0;L;<circle> 5341;;;10;N;;;;;
+328A;CIRCLED IDEOGRAPH MOON;Lo;0;L;<circle> 6708;;;;N;;;;;
+328B;CIRCLED IDEOGRAPH FIRE;Lo;0;L;<circle> 706B;;;;N;;;;;
+328C;CIRCLED IDEOGRAPH WATER;Lo;0;L;<circle> 6C34;;;;N;;;;;
+328D;CIRCLED IDEOGRAPH WOOD;Lo;0;L;<circle> 6728;;;;N;;;;;
+328E;CIRCLED IDEOGRAPH METAL;Lo;0;L;<circle> 91D1;;;;N;;;;;
+328F;CIRCLED IDEOGRAPH EARTH;Lo;0;L;<circle> 571F;;;;N;;;;;
+3290;CIRCLED IDEOGRAPH SUN;Lo;0;L;<circle> 65E5;;;;N;;;;;
+3291;CIRCLED IDEOGRAPH STOCK;Lo;0;L;<circle> 682A;;;;N;;;;;
+3292;CIRCLED IDEOGRAPH HAVE;Lo;0;L;<circle> 6709;;;;N;;;;;
+3293;CIRCLED IDEOGRAPH SOCIETY;Lo;0;L;<circle> 793E;;;;N;;;;;
+3294;CIRCLED IDEOGRAPH NAME;Lo;0;L;<circle> 540D;;;;N;;;;;
+3295;CIRCLED IDEOGRAPH SPECIAL;Lo;0;L;<circle> 7279;;;;N;;;;;
+3296;CIRCLED IDEOGRAPH FINANCIAL;Lo;0;L;<circle> 8CA1;;;;N;;;;;
+3297;CIRCLED IDEOGRAPH CONGRATULATION;Lo;0;L;<circle> 795D;;;;N;;;;;
+3298;CIRCLED IDEOGRAPH LABOR;Lo;0;L;<circle> 52B4;;;;N;;;;;
+3299;CIRCLED IDEOGRAPH SECRET;Lo;0;L;<circle> 79D8;;;;N;;;;;
+329A;CIRCLED IDEOGRAPH MALE;Lo;0;L;<circle> 7537;;;;N;;;;;
+329B;CIRCLED IDEOGRAPH FEMALE;Lo;0;L;<circle> 5973;;;;N;;;;;
+329C;CIRCLED IDEOGRAPH SUITABLE;Lo;0;L;<circle> 9069;;;;N;;;;;
+329D;CIRCLED IDEOGRAPH EXCELLENT;Lo;0;L;<circle> 512A;;;;N;;;;;
+329E;CIRCLED IDEOGRAPH PRINT;Lo;0;L;<circle> 5370;;;;N;;;;;
+329F;CIRCLED IDEOGRAPH ATTENTION;Lo;0;L;<circle> 6CE8;;;;N;;;;;
+32A0;CIRCLED IDEOGRAPH ITEM;Lo;0;L;<circle> 9805;;;;N;;;;;
+32A1;CIRCLED IDEOGRAPH REST;Lo;0;L;<circle> 4F11;;;;N;;;;;
+32A2;CIRCLED IDEOGRAPH COPY;Lo;0;L;<circle> 5199;;;;N;;;;;
+32A3;CIRCLED IDEOGRAPH CORRECT;Lo;0;L;<circle> 6B63;;;;N;;;;;
+32A4;CIRCLED IDEOGRAPH HIGH;Lo;0;L;<circle> 4E0A;;;;N;;;;;
+32A5;CIRCLED IDEOGRAPH CENTRE;Lo;0;L;<circle> 4E2D;;;;N;CIRCLED IDEOGRAPH CENTER;;;;
+32A6;CIRCLED IDEOGRAPH LOW;Lo;0;L;<circle> 4E0B;;;;N;;;;;
+32A7;CIRCLED IDEOGRAPH LEFT;Lo;0;L;<circle> 5DE6;;;;N;;;;;
+32A8;CIRCLED IDEOGRAPH RIGHT;Lo;0;L;<circle> 53F3;;;;N;;;;;
+32A9;CIRCLED IDEOGRAPH MEDICINE;Lo;0;L;<circle> 533B;;;;N;;;;;
+32AA;CIRCLED IDEOGRAPH RELIGION;Lo;0;L;<circle> 5B97;;;;N;;;;;
+32AB;CIRCLED IDEOGRAPH STUDY;Lo;0;L;<circle> 5B66;;;;N;;;;;
+32AC;CIRCLED IDEOGRAPH SUPERVISE;Lo;0;L;<circle> 76E3;;;;N;;;;;
+32AD;CIRCLED IDEOGRAPH ENTERPRISE;Lo;0;L;<circle> 4F01;;;;N;;;;;
+32AE;CIRCLED IDEOGRAPH RESOURCE;Lo;0;L;<circle> 8CC7;;;;N;;;;;
+32AF;CIRCLED IDEOGRAPH ALLIANCE;Lo;0;L;<circle> 5354;;;;N;;;;;
+32B0;CIRCLED IDEOGRAPH NIGHT;Lo;0;L;<circle> 591C;;;;N;;;;;
+32C0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY;So;0;L;<compat> 0031 6708;;;;N;;;;;
+32C1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR FEBRUARY;So;0;L;<compat> 0032 6708;;;;N;;;;;
+32C2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR MARCH;So;0;L;<compat> 0033 6708;;;;N;;;;;
+32C3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR APRIL;So;0;L;<compat> 0034 6708;;;;N;;;;;
+32C4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR MAY;So;0;L;<compat> 0035 6708;;;;N;;;;;
+32C5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JUNE;So;0;L;<compat> 0036 6708;;;;N;;;;;
+32C6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JULY;So;0;L;<compat> 0037 6708;;;;N;;;;;
+32C7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR AUGUST;So;0;L;<compat> 0038 6708;;;;N;;;;;
+32C8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR SEPTEMBER;So;0;L;<compat> 0039 6708;;;;N;;;;;
+32C9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR OCTOBER;So;0;L;<compat> 0031 0030 6708;;;;N;;;;;
+32CA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR NOVEMBER;So;0;L;<compat> 0031 0031 6708;;;;N;;;;;
+32CB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DECEMBER;So;0;L;<compat> 0031 0032 6708;;;;N;;;;;
+32D0;CIRCLED KATAKANA A;Lo;0;L;<circle> 30A2;;;;N;;;;;
+32D1;CIRCLED KATAKANA I;Lo;0;L;<circle> 30A4;;;;N;;;;;
+32D2;CIRCLED KATAKANA U;Lo;0;L;<circle> 30A6;;;;N;;;;;
+32D3;CIRCLED KATAKANA E;Lo;0;L;<circle> 30A8;;;;N;;;;;
+32D4;CIRCLED KATAKANA O;Lo;0;L;<circle> 30AA;;;;N;;;;;
+32D5;CIRCLED KATAKANA KA;Lo;0;L;<circle> 30AB;;;;N;;;;;
+32D6;CIRCLED KATAKANA KI;Lo;0;L;<circle> 30AD;;;;N;;;;;
+32D7;CIRCLED KATAKANA KU;Lo;0;L;<circle> 30AF;;;;N;;;;;
+32D8;CIRCLED KATAKANA KE;Lo;0;L;<circle> 30B1;;;;N;;;;;
+32D9;CIRCLED KATAKANA KO;Lo;0;L;<circle> 30B3;;;;N;;;;;
+32DA;CIRCLED KATAKANA SA;Lo;0;L;<circle> 30B5;;;;N;;;;;
+32DB;CIRCLED KATAKANA SI;Lo;0;L;<circle> 30B7;;;;N;;;;;
+32DC;CIRCLED KATAKANA SU;Lo;0;L;<circle> 30B9;;;;N;;;;;
+32DD;CIRCLED KATAKANA SE;Lo;0;L;<circle> 30BB;;;;N;;;;;
+32DE;CIRCLED KATAKANA SO;Lo;0;L;<circle> 30BD;;;;N;;;;;
+32DF;CIRCLED KATAKANA TA;Lo;0;L;<circle> 30BF;;;;N;;;;;
+32E0;CIRCLED KATAKANA TI;Lo;0;L;<circle> 30C1;;;;N;;;;;
+32E1;CIRCLED KATAKANA TU;Lo;0;L;<circle> 30C4;;;;N;;;;;
+32E2;CIRCLED KATAKANA TE;Lo;0;L;<circle> 30C6;;;;N;;;;;
+32E3;CIRCLED KATAKANA TO;Lo;0;L;<circle> 30C8;;;;N;;;;;
+32E4;CIRCLED KATAKANA NA;Lo;0;L;<circle> 30CA;;;;N;;;;;
+32E5;CIRCLED KATAKANA NI;Lo;0;L;<circle> 30CB;;;;N;;;;;
+32E6;CIRCLED KATAKANA NU;Lo;0;L;<circle> 30CC;;;;N;;;;;
+32E7;CIRCLED KATAKANA NE;Lo;0;L;<circle> 30CD;;;;N;;;;;
+32E8;CIRCLED KATAKANA NO;Lo;0;L;<circle> 30CE;;;;N;;;;;
+32E9;CIRCLED KATAKANA HA;Lo;0;L;<circle> 30CF;;;;N;;;;;
+32EA;CIRCLED KATAKANA HI;Lo;0;L;<circle> 30D2;;;;N;;;;;
+32EB;CIRCLED KATAKANA HU;Lo;0;L;<circle> 30D5;;;;N;;;;;
+32EC;CIRCLED KATAKANA HE;Lo;0;L;<circle> 30D8;;;;N;;;;;
+32ED;CIRCLED KATAKANA HO;Lo;0;L;<circle> 30DB;;;;N;;;;;
+32EE;CIRCLED KATAKANA MA;Lo;0;L;<circle> 30DE;;;;N;;;;;
+32EF;CIRCLED KATAKANA MI;Lo;0;L;<circle> 30DF;;;;N;;;;;
+32F0;CIRCLED KATAKANA MU;Lo;0;L;<circle> 30E0;;;;N;;;;;
+32F1;CIRCLED KATAKANA ME;Lo;0;L;<circle> 30E1;;;;N;;;;;
+32F2;CIRCLED KATAKANA MO;Lo;0;L;<circle> 30E2;;;;N;;;;;
+32F3;CIRCLED KATAKANA YA;Lo;0;L;<circle> 30E4;;;;N;;;;;
+32F4;CIRCLED KATAKANA YU;Lo;0;L;<circle> 30E6;;;;N;;;;;
+32F5;CIRCLED KATAKANA YO;Lo;0;L;<circle> 30E8;;;;N;;;;;
+32F6;CIRCLED KATAKANA RA;Lo;0;L;<circle> 30E9;;;;N;;;;;
+32F7;CIRCLED KATAKANA RI;Lo;0;L;<circle> 30EA;;;;N;;;;;
+32F8;CIRCLED KATAKANA RU;Lo;0;L;<circle> 30EB;;;;N;;;;;
+32F9;CIRCLED KATAKANA RE;Lo;0;L;<circle> 30EC;;;;N;;;;;
+32FA;CIRCLED KATAKANA RO;Lo;0;L;<circle> 30ED;;;;N;;;;;
+32FB;CIRCLED KATAKANA WA;Lo;0;L;<circle> 30EF;;;;N;;;;;
+32FC;CIRCLED KATAKANA WI;Lo;0;L;<circle> 30F0;;;;N;;;;;
+32FD;CIRCLED KATAKANA WE;Lo;0;L;<circle> 30F1;;;;N;;;;;
+32FE;CIRCLED KATAKANA WO;Lo;0;L;<circle> 30F2;;;;N;;;;;
+3300;SQUARE APAATO;Lo;0;L;<square> 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;;
+3301;SQUARE ARUHUA;Lo;0;L;<square> 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;;
+3302;SQUARE ANPEA;Lo;0;L;<square> 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;;
+3303;SQUARE AARU;Lo;0;L;<square> 30A2 30FC 30EB;;;;N;SQUARED AARU;;;;
+3304;SQUARE ININGU;Lo;0;L;<square> 30A4 30CB 30F3 30B0;;;;N;SQUARED ININGU;;;;
+3305;SQUARE INTI;Lo;0;L;<square> 30A4 30F3 30C1;;;;N;SQUARED INTI;;;;
+3306;SQUARE UON;Lo;0;L;<square> 30A6 30A9 30F3;;;;N;SQUARED UON;;;;
+3307;SQUARE ESUKUUDO;Lo;0;L;<square> 30A8 30B9 30AF 30FC 30C9;;;;N;SQUARED ESUKUUDO;;;;
+3308;SQUARE EEKAA;Lo;0;L;<square> 30A8 30FC 30AB 30FC;;;;N;SQUARED EEKAA;;;;
+3309;SQUARE ONSU;Lo;0;L;<square> 30AA 30F3 30B9;;;;N;SQUARED ONSU;;;;
+330A;SQUARE OOMU;Lo;0;L;<square> 30AA 30FC 30E0;;;;N;SQUARED OOMU;;;;
+330B;SQUARE KAIRI;Lo;0;L;<square> 30AB 30A4 30EA;;;;N;SQUARED KAIRI;;;;
+330C;SQUARE KARATTO;Lo;0;L;<square> 30AB 30E9 30C3 30C8;;;;N;SQUARED KARATTO;;;;
+330D;SQUARE KARORII;Lo;0;L;<square> 30AB 30ED 30EA 30FC;;;;N;SQUARED KARORII;;;;
+330E;SQUARE GARON;Lo;0;L;<square> 30AC 30ED 30F3;;;;N;SQUARED GARON;;;;
+330F;SQUARE GANMA;Lo;0;L;<square> 30AC 30F3 30DE;;;;N;SQUARED GANMA;;;;
+3310;SQUARE GIGA;Lo;0;L;<square> 30AE 30AC;;;;N;SQUARED GIGA;;;;
+3311;SQUARE GINII;Lo;0;L;<square> 30AE 30CB 30FC;;;;N;SQUARED GINII;;;;
+3312;SQUARE KYURII;Lo;0;L;<square> 30AD 30E5 30EA 30FC;;;;N;SQUARED KYURII;;;;
+3313;SQUARE GIRUDAA;Lo;0;L;<square> 30AE 30EB 30C0 30FC;;;;N;SQUARED GIRUDAA;;;;
+3314;SQUARE KIRO;Lo;0;L;<square> 30AD 30ED;;;;N;SQUARED KIRO;;;;
+3315;SQUARE KIROGURAMU;Lo;0;L;<square> 30AD 30ED 30B0 30E9 30E0;;;;N;SQUARED KIROGURAMU;;;;
+3316;SQUARE KIROMEETORU;Lo;0;L;<square> 30AD 30ED 30E1 30FC 30C8 30EB;;;;N;SQUARED KIROMEETORU;;;;
+3317;SQUARE KIROWATTO;Lo;0;L;<square> 30AD 30ED 30EF 30C3 30C8;;;;N;SQUARED KIROWATTO;;;;
+3318;SQUARE GURAMU;Lo;0;L;<square> 30B0 30E9 30E0;;;;N;SQUARED GURAMU;;;;
+3319;SQUARE GURAMUTON;Lo;0;L;<square> 30B0 30E9 30E0 30C8 30F3;;;;N;SQUARED GURAMUTON;;;;
+331A;SQUARE KURUZEIRO;Lo;0;L;<square> 30AF 30EB 30BC 30A4 30ED;;;;N;SQUARED KURUZEIRO;;;;
+331B;SQUARE KUROONE;Lo;0;L;<square> 30AF 30ED 30FC 30CD;;;;N;SQUARED KUROONE;;;;
+331C;SQUARE KEESU;Lo;0;L;<square> 30B1 30FC 30B9;;;;N;SQUARED KEESU;;;;
+331D;SQUARE KORUNA;Lo;0;L;<square> 30B3 30EB 30CA;;;;N;SQUARED KORUNA;;;;
+331E;SQUARE KOOPO;Lo;0;L;<square> 30B3 30FC 30DD;;;;N;SQUARED KOOPO;;;;
+331F;SQUARE SAIKURU;Lo;0;L;<square> 30B5 30A4 30AF 30EB;;;;N;SQUARED SAIKURU;;;;
+3320;SQUARE SANTIIMU;Lo;0;L;<square> 30B5 30F3 30C1 30FC 30E0;;;;N;SQUARED SANTIIMU;;;;
+3321;SQUARE SIRINGU;Lo;0;L;<square> 30B7 30EA 30F3 30B0;;;;N;SQUARED SIRINGU;;;;
+3322;SQUARE SENTI;Lo;0;L;<square> 30BB 30F3 30C1;;;;N;SQUARED SENTI;;;;
+3323;SQUARE SENTO;Lo;0;L;<square> 30BB 30F3 30C8;;;;N;SQUARED SENTO;;;;
+3324;SQUARE DAASU;Lo;0;L;<square> 30C0 30FC 30B9;;;;N;SQUARED DAASU;;;;
+3325;SQUARE DESI;Lo;0;L;<square> 30C7 30B7;;;;N;SQUARED DESI;;;;
+3326;SQUARE DORU;Lo;0;L;<square> 30C9 30EB;;;;N;SQUARED DORU;;;;
+3327;SQUARE TON;Lo;0;L;<square> 30C8 30F3;;;;N;SQUARED TON;;;;
+3328;SQUARE NANO;Lo;0;L;<square> 30CA 30CE;;;;N;SQUARED NANO;;;;
+3329;SQUARE NOTTO;Lo;0;L;<square> 30CE 30C3 30C8;;;;N;SQUARED NOTTO;;;;
+332A;SQUARE HAITU;Lo;0;L;<square> 30CF 30A4 30C4;;;;N;SQUARED HAITU;;;;
+332B;SQUARE PAASENTO;Lo;0;L;<square> 30D1 30FC 30BB 30F3 30C8;;;;N;SQUARED PAASENTO;;;;
+332C;SQUARE PAATU;Lo;0;L;<square> 30D1 30FC 30C4;;;;N;SQUARED PAATU;;;;
+332D;SQUARE BAARERU;Lo;0;L;<square> 30D0 30FC 30EC 30EB;;;;N;SQUARED BAARERU;;;;
+332E;SQUARE PIASUTORU;Lo;0;L;<square> 30D4 30A2 30B9 30C8 30EB;;;;N;SQUARED PIASUTORU;;;;
+332F;SQUARE PIKURU;Lo;0;L;<square> 30D4 30AF 30EB;;;;N;SQUARED PIKURU;;;;
+3330;SQUARE PIKO;Lo;0;L;<square> 30D4 30B3;;;;N;SQUARED PIKO;;;;
+3331;SQUARE BIRU;Lo;0;L;<square> 30D3 30EB;;;;N;SQUARED BIRU;;;;
+3332;SQUARE HUARADDO;Lo;0;L;<square> 30D5 30A1 30E9 30C3 30C9;;;;N;SQUARED HUARADDO;;;;
+3333;SQUARE HUIITO;Lo;0;L;<square> 30D5 30A3 30FC 30C8;;;;N;SQUARED HUIITO;;;;
+3334;SQUARE BUSSYERU;Lo;0;L;<square> 30D6 30C3 30B7 30A7 30EB;;;;N;SQUARED BUSSYERU;;;;
+3335;SQUARE HURAN;Lo;0;L;<square> 30D5 30E9 30F3;;;;N;SQUARED HURAN;;;;
+3336;SQUARE HEKUTAARU;Lo;0;L;<square> 30D8 30AF 30BF 30FC 30EB;;;;N;SQUARED HEKUTAARU;;;;
+3337;SQUARE PESO;Lo;0;L;<square> 30DA 30BD;;;;N;SQUARED PESO;;;;
+3338;SQUARE PENIHI;Lo;0;L;<square> 30DA 30CB 30D2;;;;N;SQUARED PENIHI;;;;
+3339;SQUARE HERUTU;Lo;0;L;<square> 30D8 30EB 30C4;;;;N;SQUARED HERUTU;;;;
+333A;SQUARE PENSU;Lo;0;L;<square> 30DA 30F3 30B9;;;;N;SQUARED PENSU;;;;
+333B;SQUARE PEEZI;Lo;0;L;<square> 30DA 30FC 30B8;;;;N;SQUARED PEEZI;;;;
+333C;SQUARE BEETA;Lo;0;L;<square> 30D9 30FC 30BF;;;;N;SQUARED BEETA;;;;
+333D;SQUARE POINTO;Lo;0;L;<square> 30DD 30A4 30F3 30C8;;;;N;SQUARED POINTO;;;;
+333E;SQUARE BORUTO;Lo;0;L;<square> 30DC 30EB 30C8;;;;N;SQUARED BORUTO;;;;
+333F;SQUARE HON;Lo;0;L;<square> 30DB 30F3;;;;N;SQUARED HON;;;;
+3340;SQUARE PONDO;Lo;0;L;<square> 30DD 30F3 30C9;;;;N;SQUARED PONDO;;;;
+3341;SQUARE HOORU;Lo;0;L;<square> 30DB 30FC 30EB;;;;N;SQUARED HOORU;;;;
+3342;SQUARE HOON;Lo;0;L;<square> 30DB 30FC 30F3;;;;N;SQUARED HOON;;;;
+3343;SQUARE MAIKURO;Lo;0;L;<square> 30DE 30A4 30AF 30ED;;;;N;SQUARED MAIKURO;;;;
+3344;SQUARE MAIRU;Lo;0;L;<square> 30DE 30A4 30EB;;;;N;SQUARED MAIRU;;;;
+3345;SQUARE MAHHA;Lo;0;L;<square> 30DE 30C3 30CF;;;;N;SQUARED MAHHA;;;;
+3346;SQUARE MARUKU;Lo;0;L;<square> 30DE 30EB 30AF;;;;N;SQUARED MARUKU;;;;
+3347;SQUARE MANSYON;Lo;0;L;<square> 30DE 30F3 30B7 30E7 30F3;;;;N;SQUARED MANSYON;;;;
+3348;SQUARE MIKURON;Lo;0;L;<square> 30DF 30AF 30ED 30F3;;;;N;SQUARED MIKURON;;;;
+3349;SQUARE MIRI;Lo;0;L;<square> 30DF 30EA;;;;N;SQUARED MIRI;;;;
+334A;SQUARE MIRIBAARU;Lo;0;L;<square> 30DF 30EA 30D0 30FC 30EB;;;;N;SQUARED MIRIBAARU;;;;
+334B;SQUARE MEGA;Lo;0;L;<square> 30E1 30AC;;;;N;SQUARED MEGA;;;;
+334C;SQUARE MEGATON;Lo;0;L;<square> 30E1 30AC 30C8 30F3;;;;N;SQUARED MEGATON;;;;
+334D;SQUARE MEETORU;Lo;0;L;<square> 30E1 30FC 30C8 30EB;;;;N;SQUARED MEETORU;;;;
+334E;SQUARE YAADO;Lo;0;L;<square> 30E4 30FC 30C9;;;;N;SQUARED YAADO;;;;
+334F;SQUARE YAARU;Lo;0;L;<square> 30E4 30FC 30EB;;;;N;SQUARED YAARU;;;;
+3350;SQUARE YUAN;Lo;0;L;<square> 30E6 30A2 30F3;;;;N;SQUARED YUAN;;;;
+3351;SQUARE RITTORU;Lo;0;L;<square> 30EA 30C3 30C8 30EB;;;;N;SQUARED RITTORU;;;;
+3352;SQUARE RIRA;Lo;0;L;<square> 30EA 30E9;;;;N;SQUARED RIRA;;;;
+3353;SQUARE RUPII;Lo;0;L;<square> 30EB 30D4 30FC;;;;N;SQUARED RUPII;;;;
+3354;SQUARE RUUBURU;Lo;0;L;<square> 30EB 30FC 30D6 30EB;;;;N;SQUARED RUUBURU;;;;
+3355;SQUARE REMU;Lo;0;L;<square> 30EC 30E0;;;;N;SQUARED REMU;;;;
+3356;SQUARE RENTOGEN;Lo;0;L;<square> 30EC 30F3 30C8 30B2 30F3;;;;N;SQUARED RENTOGEN;;;;
+3357;SQUARE WATTO;Lo;0;L;<square> 30EF 30C3 30C8;;;;N;SQUARED WATTO;;;;
+3358;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ZERO;So;0;L;<square> 0030 70B9;;;;N;;;;;
+3359;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ONE;So;0;L;<compat> 0031 70B9;;;;N;;;;;
+335A;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWO;So;0;L;<compat> 0032 70B9;;;;N;;;;;
+335B;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THREE;So;0;L;<compat> 0033 70B9;;;;N;;;;;
+335C;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOUR;So;0;L;<compat> 0034 70B9;;;;N;;;;;
+335D;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIVE;So;0;L;<compat> 0035 70B9;;;;N;;;;;
+335E;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIX;So;0;L;<compat> 0036 70B9;;;;N;;;;;
+335F;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVEN;So;0;L;<compat> 0037 70B9;;;;N;;;;;
+3360;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHT;So;0;L;<compat> 0038 70B9;;;;N;;;;;
+3361;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINE;So;0;L;<compat> 0039 70B9;;;;N;;;;;
+3362;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TEN;So;0;L;<compat> 0031 0030 70B9;;;;N;;;;;
+3363;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ELEVEN;So;0;L;<compat> 0031 0031 70B9;;;;N;;;;;
+3364;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWELVE;So;0;L;<compat> 0031 0032 70B9;;;;N;;;;;
+3365;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THIRTEEN;So;0;L;<compat> 0031 0033 70B9;;;;N;;;;;
+3366;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOURTEEN;So;0;L;<compat> 0031 0034 70B9;;;;N;;;;;
+3367;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIFTEEN;So;0;L;<compat> 0031 0035 70B9;;;;N;;;;;
+3368;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIXTEEN;So;0;L;<compat> 0031 0036 70B9;;;;N;;;;;
+3369;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVENTEEN;So;0;L;<compat> 0031 0037 70B9;;;;N;;;;;
+336A;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHTEEN;So;0;L;<compat> 0031 0038 70B9;;;;N;;;;;
+336B;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINETEEN;So;0;L;<compat> 0031 0039 70B9;;;;N;;;;;
+336C;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY;So;0;L;<compat> 0032 0030 70B9;;;;N;;;;;
+336D;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-ONE;So;0;L;<compat> 0032 0031 70B9;;;;N;;;;;
+336E;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-TWO;So;0;L;<compat> 0032 0032 70B9;;;;N;;;;;
+336F;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-THREE;So;0;L;<compat> 0032 0033 70B9;;;;N;;;;;
+3370;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-FOUR;So;0;L;<compat> 0032 0034 70B9;;;;N;;;;;
+3371;SQUARE HPA;Lo;0;L;<square> 0068 0050 0061;;;;N;;;;;
+3372;SQUARE DA;Ll;0;L;<square> 0064 0061;;;;N;;;;;
+3373;SQUARE AU;Lu;0;L;<square> 0041 0055;;;;N;;;;;
+3374;SQUARE BAR;Ll;0;L;<square> 0062 0061 0072;;;;N;;;;;
+3375;SQUARE OV;Lo;0;L;<square> 006F 0056;;;;N;;;;;
+3376;SQUARE PC;Ll;0;L;<square> 0070 0063;;;;N;;;;;
+337B;SQUARE ERA NAME HEISEI;Lo;0;L;<square> 5E73 6210;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME HEISEI;;;;
+337C;SQUARE ERA NAME SYOUWA;Lo;0;L;<square> 662D 548C;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME SYOUWA;;;;
+337D;SQUARE ERA NAME TAISYOU;Lo;0;L;<square> 5927 6B63;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME TAISYOU;;;;
+337E;SQUARE ERA NAME MEIZI;Lo;0;L;<square> 660E 6CBB;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME MEIZI;;;;
+337F;SQUARE CORPORATION;Lo;0;L;<square> 682A 5F0F 4F1A 793E;;;;N;SQUARED FOUR IDEOGRAPHS CORPORATION;;;;
+3380;SQUARE PA AMPS;Lo;0;L;<square> 0070 0041;;;;N;SQUARED PA AMPS;;;;
+3381;SQUARE NA;Lo;0;L;<square> 006E 0041;;;;N;SQUARED NA;;;;
+3382;SQUARE MU A;Lo;0;L;<square> 03BC 0041;;;;N;SQUARED MU A;;;;
+3383;SQUARE MA;Lo;0;L;<square> 006D 0041;;;;N;SQUARED MA;;;;
+3384;SQUARE KA;Lo;0;L;<square> 006B 0041;;;;N;SQUARED KA;;;;
+3385;SQUARE KB;Lu;0;L;<square> 004B 0042;;;;N;SQUARED KB;;;;
+3386;SQUARE MB;Lu;0;L;<square> 004D 0042;;;;N;SQUARED MB;;;;
+3387;SQUARE GB;Lu;0;L;<square> 0047 0042;;;;N;SQUARED GB;;;;
+3388;SQUARE CAL;Ll;0;L;<square> 0063 0061 006C;;;;N;SQUARED CAL;;;;
+3389;SQUARE KCAL;Ll;0;L;<square> 006B 0063 0061 006C;;;;N;SQUARED KCAL;;;;
+338A;SQUARE PF;Lo;0;L;<square> 0070 0046;;;;N;SQUARED PF;;;;
+338B;SQUARE NF;Lo;0;L;<square> 006E 0046;;;;N;SQUARED NF;;;;
+338C;SQUARE MU F;Lo;0;L;<square> 03BC 0046;;;;N;SQUARED MU F;;;;
+338D;SQUARE MU G;Ll;0;L;<square> 03BC 0067;;;;N;SQUARED MU G;;;;
+338E;SQUARE MG;Ll;0;L;<square> 006D 0067;;;;N;SQUARED MG;;;;
+338F;SQUARE KG;Ll;0;L;<square> 006B 0067;;;;N;SQUARED KG;;;;
+3390;SQUARE HZ;Lt;0;L;<square> 0048 007A;;;;N;SQUARED HZ;;;;
+3391;SQUARE KHZ;Lo;0;L;<square> 006B 0048 007A;;;;N;SQUARED KHZ;;;;
+3392;SQUARE MHZ;Lo;0;L;<square> 004D 0048 007A;;;;N;SQUARED MHZ;;;;
+3393;SQUARE GHZ;Lo;0;L;<square> 0047 0048 007A;;;;N;SQUARED GHZ;;;;
+3394;SQUARE THZ;Lo;0;L;<square> 0054 0048 007A;;;;N;SQUARED THZ;;;;
+3395;SQUARE MU L;So;0;L;<square> 03BC 2113;;;;N;SQUARED MU L;;;;
+3396;SQUARE ML;So;0;L;<square> 006D 2113;;;;N;SQUARED ML;;;;
+3397;SQUARE DL;So;0;L;<square> 0064 2113;;;;N;SQUARED DL;;;;
+3398;SQUARE KL;So;0;L;<square> 006B 2113;;;;N;SQUARED KL;;;;
+3399;SQUARE FM;Ll;0;L;<square> 0066 006D;;;;N;SQUARED FM;;;;
+339A;SQUARE NM;Ll;0;L;<square> 006E 006D;;;;N;SQUARED NM;;;;
+339B;SQUARE MU M;Ll;0;L;<square> 03BC 006D;;;;N;SQUARED MU M;;;;
+339C;SQUARE MM;Ll;0;L;<square> 006D 006D;;;;N;SQUARED MM;;;;
+339D;SQUARE CM;Ll;0;L;<square> 0063 006D;;;;N;SQUARED CM;;;;
+339E;SQUARE KM;Ll;0;L;<square> 006B 006D;;;;N;SQUARED KM;;;;
+339F;SQUARE MM SQUARED;So;0;L;<square> 006D 006D 00B2;;;;N;SQUARED MM SQUARED;;;;
+33A0;SQUARE CM SQUARED;So;0;L;<square> 0063 006D 00B2;;;;N;SQUARED CM SQUARED;;;;
+33A1;SQUARE M SQUARED;So;0;L;<square> 006D 00B2;;;;N;SQUARED M SQUARED;;;;
+33A2;SQUARE KM SQUARED;So;0;L;<square> 006B 006D 00B2;;;;N;SQUARED KM SQUARED;;;;
+33A3;SQUARE MM CUBED;So;0;L;<square> 006D 006D 00B3;;;;N;SQUARED MM CUBED;;;;
+33A4;SQUARE CM CUBED;So;0;L;<square> 0063 006D 00B3;;;;N;SQUARED CM CUBED;;;;
+33A5;SQUARE M CUBED;So;0;L;<square> 006D 00B3;;;;N;SQUARED M CUBED;;;;
+33A6;SQUARE KM CUBED;So;0;L;<square> 006B 006D 00B3;;;;N;SQUARED KM CUBED;;;;
+33A7;SQUARE M OVER S;So;0;L;<square> 006D 2215 0073;;;;N;SQUARED M OVER S;;;;
+33A8;SQUARE M OVER S SQUARED;So;0;L;<square> 006D 2215 0073 00B2;;;;N;SQUARED M OVER S SQUARED;;;;
+33A9;SQUARE PA;Lt;0;L;<square> 0050 0061;;;;N;SQUARED PA;;;;
+33AA;SQUARE KPA;Lo;0;L;<square> 006B 0050 0061;;;;N;SQUARED KPA;;;;
+33AB;SQUARE MPA;Lo;0;L;<square> 004D 0050 0061;;;;N;SQUARED MPA;;;;
+33AC;SQUARE GPA;Lo;0;L;<square> 0047 0050 0061;;;;N;SQUARED GPA;;;;
+33AD;SQUARE RAD;Ll;0;L;<square> 0072 0061 0064;;;;N;SQUARED RAD;;;;
+33AE;SQUARE RAD OVER S;So;0;L;<square> 0072 0061 0064 2215 0073;;;;N;SQUARED RAD OVER S;;;;
+33AF;SQUARE RAD OVER S SQUARED;So;0;L;<square> 0072 0061 0064 2215 0073 00B2;;;;N;SQUARED RAD OVER S SQUARED;;;;
+33B0;SQUARE PS;Ll;0;L;<square> 0070 0073;;;;N;SQUARED PS;;;;
+33B1;SQUARE NS;Ll;0;L;<square> 006E 0073;;;;N;SQUARED NS;;;;
+33B2;SQUARE MU S;Ll;0;L;<square> 03BC 0073;;;;N;SQUARED MU S;;;;
+33B3;SQUARE MS;Ll;0;L;<square> 006D 0073;;;;N;SQUARED MS;;;;
+33B4;SQUARE PV;Lo;0;L;<square> 0070 0056;;;;N;SQUARED PV;;;;
+33B5;SQUARE NV;Lo;0;L;<square> 006E 0056;;;;N;SQUARED NV;;;;
+33B6;SQUARE MU V;Lo;0;L;<square> 03BC 0056;;;;N;SQUARED MU V;;;;
+33B7;SQUARE MV;Lo;0;L;<square> 006D 0056;;;;N;SQUARED MV;;;;
+33B8;SQUARE KV;Lo;0;L;<square> 006B 0056;;;;N;SQUARED KV;;;;
+33B9;SQUARE MV MEGA;Lu;0;L;<square> 004D 0056;;;;N;SQUARED MV MEGA;;;;
+33BA;SQUARE PW;Lo;0;L;<square> 0070 0057;;;;N;SQUARED PW;;;;
+33BB;SQUARE NW;Lo;0;L;<square> 006E 0057;;;;N;SQUARED NW;;;;
+33BC;SQUARE MU W;Lo;0;L;<square> 03BC 0057;;;;N;SQUARED MU W;;;;
+33BD;SQUARE MW;Lo;0;L;<square> 006D 0057;;;;N;SQUARED MW;;;;
+33BE;SQUARE KW;Lo;0;L;<square> 006B 0057;;;;N;SQUARED KW;;;;
+33BF;SQUARE MW MEGA;Lu;0;L;<square> 004D 0057;;;;N;SQUARED MW MEGA;;;;
+33C0;SQUARE K OHM;Lo;0;L;<square> 006B 03A9;;;;N;SQUARED K OHM;;;;
+33C1;SQUARE M OHM;Lu;0;L;<square> 004D 03A9;;;;N;SQUARED M OHM;;;;
+33C2;SQUARE AM;So;0;L;<square> 0061 002E 006D 002E;;;;N;SQUARED AM;;;;
+33C3;SQUARE BQ;Lt;0;L;<square> 0042 0071;;;;N;SQUARED BQ;;;;
+33C4;SQUARE CC;Ll;0;L;<square> 0063 0063;;;;N;SQUARED CC;;;;
+33C5;SQUARE CD;Ll;0;L;<square> 0063 0064;;;;N;SQUARED CD;;;;
+33C6;SQUARE C OVER KG;So;0;L;<square> 0043 2215 006B 0067;;;;N;SQUARED C OVER KG;;;;
+33C7;SQUARE CO;Lt;0;L;<square> 0043 006F 002E;;;;N;SQUARED CO;;;;
+33C8;SQUARE DB;Lo;0;L;<square> 0064 0042;;;;N;SQUARED DB;;;;
+33C9;SQUARE GY;Lt;0;L;<square> 0047 0079;;;;N;SQUARED GY;;;;
+33CA;SQUARE HA;Ll;0;L;<square> 0068 0061;;;;N;SQUARED HA;;;;
+33CB;SQUARE HP;Lu;0;L;<square> 0048 0050;;;;N;SQUARED HP;;;;
+33CC;SQUARE IN;Ll;0;L;<square> 0069 006E;;;;N;SQUARED IN;;;;
+33CD;SQUARE KK;Lu;0;L;<square> 004B 004B;;;;N;SQUARED KK;;;;
+33CE;SQUARE KM CAPITAL;Lu;0;L;<square> 004B 004D;;;;N;SQUARED KM CAPITAL;;;;
+33CF;SQUARE KT;Ll;0;L;<square> 006B 0074;;;;N;SQUARED KT;;;;
+33D0;SQUARE LM;Ll;0;L;<square> 006C 006D;;;;N;SQUARED LM;;;;
+33D1;SQUARE LN;Ll;0;L;<square> 006C 006E;;;;N;SQUARED LN;;;;
+33D2;SQUARE LOG;Ll;0;L;<square> 006C 006F 0067;;;;N;SQUARED LOG;;;;
+33D3;SQUARE LX;Ll;0;L;<square> 006C 0078;;;;N;SQUARED LX;;;;
+33D4;SQUARE MB SMALL;Ll;0;L;<square> 006D 0062;;;;N;SQUARED MB SMALL;;;;
+33D5;SQUARE MIL;Ll;0;L;<square> 006D 0069 006C;;;;N;SQUARED MIL;;;;
+33D6;SQUARE MOL;Ll;0;L;<square> 006D 006F 006C;;;;N;SQUARED MOL;;;;
+33D7;SQUARE PH;Lu;0;L;<square> 0050 0048;;;;N;SQUARED PH;;;;
+33D8;SQUARE PM;So;0;L;<square> 0070 002E 006D 002E;;;;N;SQUARED PM;;;;
+33D9;SQUARE PPM;Lu;0;L;<square> 0050 0050 004D;;;;N;SQUARED PPM;;;;
+33DA;SQUARE PR;Lu;0;L;<square> 0050 0052;;;;N;SQUARED PR;;;;
+33DB;SQUARE SR;Ll;0;L;<square> 0073 0072;;;;N;SQUARED SR;;;;
+33DC;SQUARE SV;Lt;0;L;<square> 0053 0076;;;;N;SQUARED SV;;;;
+33DD;SQUARE WB;Lt;0;L;<square> 0057 0062;;;;N;SQUARED WB;;;;
+33E0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ONE;So;0;L;<compat> 0031 65E5;;;;N;;;;;
+33E1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWO;So;0;L;<compat> 0032 65E5;;;;N;;;;;
+33E2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THREE;So;0;L;<compat> 0033 65E5;;;;N;;;;;
+33E3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOUR;So;0;L;<compat> 0034 65E5;;;;N;;;;;
+33E4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIVE;So;0;L;<compat> 0035 65E5;;;;N;;;;;
+33E5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIX;So;0;L;<compat> 0036 65E5;;;;N;;;;;
+33E6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVEN;So;0;L;<compat> 0037 65E5;;;;N;;;;;
+33E7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHT;So;0;L;<compat> 0038 65E5;;;;N;;;;;
+33E8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINE;So;0;L;<compat> 0039 65E5;;;;N;;;;;
+33E9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TEN;So;0;L;<compat> 0031 0030 65E5;;;;N;;;;;
+33EA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ELEVEN;So;0;L;<compat> 0031 0031 65E5;;;;N;;;;;
+33EB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWELVE;So;0;L;<compat> 0031 0032 65E5;;;;N;;;;;
+33EC;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTEEN;So;0;L;<compat> 0031 0033 65E5;;;;N;;;;;
+33ED;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOURTEEN;So;0;L;<compat> 0031 0034 65E5;;;;N;;;;;
+33EE;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIFTEEN;So;0;L;<compat> 0031 0035 65E5;;;;N;;;;;
+33EF;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIXTEEN;So;0;L;<compat> 0031 0036 65E5;;;;N;;;;;
+33F0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVENTEEN;So;0;L;<compat> 0031 0037 65E5;;;;N;;;;;
+33F1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHTEEN;So;0;L;<compat> 0031 0038 65E5;;;;N;;;;;
+33F2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINETEEN;So;0;L;<compat> 0031 0039 65E5;;;;N;;;;;
+33F3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY;So;0;L;<compat> 0032 0030 65E5;;;;N;;;;;
+33F4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-ONE;So;0;L;<compat> 0032 0031 65E5;;;;N;;;;;
+33F5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-TWO;So;0;L;<compat> 0032 0032 65E5;;;;N;;;;;
+33F6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-THREE;So;0;L;<compat> 0032 0033 65E5;;;;N;;;;;
+33F7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FOUR;So;0;L;<compat> 0032 0034 65E5;;;;N;;;;;
+33F8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FIVE;So;0;L;<compat> 0032 0035 65E5;;;;N;;;;;
+33F9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SIX;So;0;L;<compat> 0032 0036 65E5;;;;N;;;;;
+33FA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SEVEN;So;0;L;<compat> 0032 0037 65E5;;;;N;;;;;
+33FB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-EIGHT;So;0;L;<compat> 0032 0038 65E5;;;;N;;;;;
+33FC;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-NINE;So;0;L;<compat> 0032 0039 65E5;;;;N;;;;;
+33FD;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY;So;0;L;<compat> 0033 0030 65E5;;;;N;;;;;
+33FE;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY-ONE;So;0;L;<compat> 0033 0031 65E5;;;;N;;;;;
+4E00;<CJK Ideograph, First>;Lo;0;L;;;;;N;;;;;
+9FA5;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;;
+AC00;<Hangul Syllable, First>;Lo;0;L;;;;;N;;;;;
+D7A3;<Hangul Syllable, Last>;Lo;0;L;;;;;N;;;;;
+D800;<Unassigned High Surrogate, First>;Cn;0;L;;;;;N;;;;;
+DB7F;<Unassigned High Surrogate, Last>;Cn;0;L;;;;;N;;;;;
+DB80;<Private Use High Surrogate, First>;Co;0;L;;;;;N;;;;;
+DBFF;<Private Use High Surrogate, Last>;Co;0;L;;;;;N;;;;;
+DC00;<Low Surrogate, First>;Cn;0;L;;;;;N;;;;;
+DFFF;<Low Surrogate, Last>;Cn;0;L;;;;;N;;;;;
+E000;<Private Use, First>;Cn;0;L;;;;;N;;;;;
+F8FF;<Private Use, Last>;Cn;0;L;;;;;N;;;;;
+F900;<CJK Compatibility Ideograph, First>;Lo;0;L;;;;;N;;;;;
+FA2D;<CJK Compatibility Ideograph, Last>;Lo;0;L;;;;;N;;;;;
+FB00;LATIN SMALL LIGATURE FF;Ll;0;L;<compat> 0066 0066;;;;N;;;;;
+FB01;LATIN SMALL LIGATURE FI;Ll;0;L;<compat> 0066 0069;;;;N;;;;;
+FB02;LATIN SMALL LIGATURE FL;Ll;0;L;<compat> 0066 006C;;;;N;;;;;
+FB03;LATIN SMALL LIGATURE FFI;Ll;0;L;<compat> 0066 0066 0069;;;;N;;;;;
+FB04;LATIN SMALL LIGATURE FFL;Ll;0;L;<compat> 0066 0066 006C;;;;N;;;;;
+FB05;LATIN SMALL LIGATURE LONG S T;Ll;0;L;<compat> 017F 0074;;;;N;;;;;
+FB06;LATIN SMALL LIGATURE ST;Ll;0;L;<compat> 0073 0074;;;;N;;;;;
+FB13;ARMENIAN SMALL LIGATURE MEN NOW;Ll;0;L;<compat> 0574 0576;;;;N;;;;;
+FB14;ARMENIAN SMALL LIGATURE MEN ECH;Ll;0;L;<compat> 0574 0565;;;;N;;;;;
+FB15;ARMENIAN SMALL LIGATURE MEN INI;Ll;0;L;<compat> 0574 056B;;;;N;;;;;
+FB16;ARMENIAN SMALL LIGATURE VEW NOW;Ll;0;L;<compat> 057E 0576;;;;N;;;;;
+FB17;ARMENIAN SMALL LIGATURE MEN XEH;Ll;0;L;<compat> 0574 056D;;;;N;;;;;
+FB1E;HEBREW POINT JUDEO-SPANISH VARIKA;Mn;26;R;;;;;N;HEBREW POINT VARIKA;;;;
+FB1F;HEBREW LIGATURE YIDDISH YOD YOD PATAH;Lo;0;R;<compat> 05F2 05B7;;;;N;;;;;
+FB20;HEBREW LETTER ALTERNATIVE AYIN;Lo;0;R;<font> 05E2;;;;N;;;;;
+FB21;HEBREW LETTER WIDE ALEF;Lo;0;R;<font> 05D0;;;;N;;;;;
+FB22;HEBREW LETTER WIDE DALET;Lo;0;R;<font> 05D3;;;;N;;;;;
+FB23;HEBREW LETTER WIDE HE;Lo;0;R;<font> 05D4;;;;N;;;;;
+FB24;HEBREW LETTER WIDE KAF;Lo;0;R;<font> 05DB;;;;N;;;;;
+FB25;HEBREW LETTER WIDE LAMED;Lo;0;R;<font> 05DC;;;;N;;;;;
+FB26;HEBREW LETTER WIDE FINAL MEM;Lo;0;R;<font> 05DD;;;;N;;;;;
+FB27;HEBREW LETTER WIDE RESH;Lo;0;R;<font> 05E8;;;;N;;;;;
+FB28;HEBREW LETTER WIDE TAV;Lo;0;R;<font> 05EA;;;;N;;;;;
+FB29;HEBREW LETTER ALTERNATIVE PLUS SIGN;Sm;0;R;<font> 002B;;;;N;;;;;
+FB2A;HEBREW LETTER SHIN WITH SHIN DOT;Lo;0;R;05E9 05C1;;;;N;;;;;
+FB2B;HEBREW LETTER SHIN WITH SIN DOT;Lo;0;R;05E9 05C2;;;;N;;;;;
+FB2C;HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT;Lo;0;R;05E9 05BC 05C1;;;;N;;;;;
+FB2D;HEBREW LETTER SHIN WITH DAGESH AND SIN DOT;Lo;0;R;05E9 05BC 05C2;;;;N;;;;;
+FB2E;HEBREW LETTER ALEF WITH PATAH;Lo;0;R;05D0 05B7;;;;N;;;;;
+FB2F;HEBREW LETTER ALEF WITH QAMATS;Lo;0;R;05D0 05B8;;;;N;;;;;
+FB30;HEBREW LETTER ALEF WITH MAPIQ;Lo;0;R;05D0 05BC;;;;N;;;;;
+FB31;HEBREW LETTER BET WITH DAGESH;Lo;0;R;05D1 05BC;;;;N;;;;;
+FB32;HEBREW LETTER GIMEL WITH DAGESH;Lo;0;R;05D2 05BC;;;;N;;;;;
+FB33;HEBREW LETTER DALET WITH DAGESH;Lo;0;R;05D3 05BC;;;;N;;;;;
+FB34;HEBREW LETTER HE WITH MAPIQ;Lo;0;R;05D4 05BC;;;;N;;;;;
+FB35;HEBREW LETTER VAV WITH DAGESH;Lo;0;R;05D5 05BC;;;;N;;;;;
+FB36;HEBREW LETTER ZAYIN WITH DAGESH;Lo;0;R;05D6 05BC;;;;N;;;;;
+FB38;HEBREW LETTER TET WITH DAGESH;Lo;0;R;05D8 05BC;;;;N;;;;;
+FB39;HEBREW LETTER YOD WITH DAGESH;Lo;0;R;05D9 05BC;;;;N;;;;;
+FB3A;HEBREW LETTER FINAL KAF WITH DAGESH;Lo;0;R;05DA 05BC;;;;N;;;;;
+FB3B;HEBREW LETTER KAF WITH DAGESH;Lo;0;R;05DB 05BC;;;;N;;;;;
+FB3C;HEBREW LETTER LAMED WITH DAGESH;Lo;0;R;05DC 05BC;;;;N;;;;;
+FB3E;HEBREW LETTER MEM WITH DAGESH;Lo;0;R;05DE 05BC;;;;N;;;;;
+FB40;HEBREW LETTER NUN WITH DAGESH;Lo;0;R;05E0 05BC;;;;N;;;;;
+FB41;HEBREW LETTER SAMEKH WITH DAGESH;Lo;0;R;05E1 05BC;;;;N;;;;;
+FB43;HEBREW LETTER FINAL PE WITH DAGESH;Lo;0;R;05E3 05BC;;;;N;;;;;
+FB44;HEBREW LETTER PE WITH DAGESH;Lo;0;R;05E4 05BC;;;;N;;;;;
+FB46;HEBREW LETTER TSADI WITH DAGESH;Lo;0;R;05E6 05BC;;;;N;;;;;
+FB47;HEBREW LETTER QOF WITH DAGESH;Lo;0;R;05E7 05BC;;;;N;;;;;
+FB48;HEBREW LETTER RESH WITH DAGESH;Lo;0;R;05E8 05BC;;;;N;;;;;
+FB49;HEBREW LETTER SHIN WITH DAGESH;Lo;0;R;05E9 05BC;;;;N;;;;;
+FB4A;HEBREW LETTER TAV WITH DAGESH;Lo;0;R;05EA 05BC;;;;N;;;;;
+FB4B;HEBREW LETTER VAV WITH HOLAM;Lo;0;R;05D5 05B9;;;;N;;;;;
+FB4C;HEBREW LETTER BET WITH RAFE;Lo;0;R;05D1 05BF;;;;N;;;;;
+FB4D;HEBREW LETTER KAF WITH RAFE;Lo;0;R;05DB 05BF;;;;N;;;;;
+FB4E;HEBREW LETTER PE WITH RAFE;Lo;0;R;05E4 05BF;;;;N;;;;;
+FB4F;HEBREW LIGATURE ALEF LAMED;Lo;0;R;<compat> 05D0 05DC;;;;N;;;;;
+FB50;ARABIC LETTER ALEF WASLA ISOLATED FORM;Lo;0;R;<isolated> 0671;;;;N;;;;;
+FB51;ARABIC LETTER ALEF WASLA FINAL FORM;Lo;0;R;<final> 0671;;;;N;;;;;
+FB52;ARABIC LETTER BEEH ISOLATED FORM;Lo;0;R;<isolated> 067B;;;;N;;;;;
+FB53;ARABIC LETTER BEEH FINAL FORM;Lo;0;R;<final> 067B;;;;N;;;;;
+FB54;ARABIC LETTER BEEH INITIAL FORM;Lo;0;R;<initial> 067B;;;;N;;;;;
+FB55;ARABIC LETTER BEEH MEDIAL FORM;Lo;0;R;<medial> 067B;;;;N;;;;;
+FB56;ARABIC LETTER PEH ISOLATED FORM;Lo;0;R;<isolated> 067E;;;;N;;;;;
+FB57;ARABIC LETTER PEH FINAL FORM;Lo;0;R;<final> 067E;;;;N;;;;;
+FB58;ARABIC LETTER PEH INITIAL FORM;Lo;0;R;<initial> 067E;;;;N;;;;;
+FB59;ARABIC LETTER PEH MEDIAL FORM;Lo;0;R;<medial> 067E;;;;N;;;;;
+FB5A;ARABIC LETTER BEHEH ISOLATED FORM;Lo;0;R;<isolated> 0680;;;;N;;;;;
+FB5B;ARABIC LETTER BEHEH FINAL FORM;Lo;0;R;<final> 0680;;;;N;;;;;
+FB5C;ARABIC LETTER BEHEH INITIAL FORM;Lo;0;R;<initial> 0680;;;;N;;;;;
+FB5D;ARABIC LETTER BEHEH MEDIAL FORM;Lo;0;R;<medial> 0680;;;;N;;;;;
+FB5E;ARABIC LETTER TTEHEH ISOLATED FORM;Lo;0;R;<isolated> 067A;;;;N;;;;;
+FB5F;ARABIC LETTER TTEHEH FINAL FORM;Lo;0;R;<final> 067A;;;;N;;;;;
+FB60;ARABIC LETTER TTEHEH INITIAL FORM;Lo;0;R;<initial> 067A;;;;N;;;;;
+FB61;ARABIC LETTER TTEHEH MEDIAL FORM;Lo;0;R;<medial> 067A;;;;N;;;;;
+FB62;ARABIC LETTER TEHEH ISOLATED FORM;Lo;0;R;<isolated> 067F;;;;N;;;;;
+FB63;ARABIC LETTER TEHEH FINAL FORM;Lo;0;R;<final> 067F;;;;N;;;;;
+FB64;ARABIC LETTER TEHEH INITIAL FORM;Lo;0;R;<initial> 067F;;;;N;;;;;
+FB65;ARABIC LETTER TEHEH MEDIAL FORM;Lo;0;R;<medial> 067F;;;;N;;;;;
+FB66;ARABIC LETTER TTEH ISOLATED FORM;Lo;0;R;<isolated> 0679;;;;N;;;;;
+FB67;ARABIC LETTER TTEH FINAL FORM;Lo;0;R;<final> 0679;;;;N;;;;;
+FB68;ARABIC LETTER TTEH INITIAL FORM;Lo;0;R;<initial> 0679;;;;N;;;;;
+FB69;ARABIC LETTER TTEH MEDIAL FORM;Lo;0;R;<medial> 0679;;;;N;;;;;
+FB6A;ARABIC LETTER VEH ISOLATED FORM;Lo;0;R;<isolated> 06A4;;;;N;;;;;
+FB6B;ARABIC LETTER VEH FINAL FORM;Lo;0;R;<final> 06A4;;;;N;;;;;
+FB6C;ARABIC LETTER VEH INITIAL FORM;Lo;0;R;<initial> 06A4;;;;N;;;;;
+FB6D;ARABIC LETTER VEH MEDIAL FORM;Lo;0;R;<medial> 06A4;;;;N;;;;;
+FB6E;ARABIC LETTER PEHEH ISOLATED FORM;Lo;0;R;<isolated> 06A6;;;;N;;;;;
+FB6F;ARABIC LETTER PEHEH FINAL FORM;Lo;0;R;<final> 06A6;;;;N;;;;;
+FB70;ARABIC LETTER PEHEH INITIAL FORM;Lo;0;R;<initial> 06A6;;;;N;;;;;
+FB71;ARABIC LETTER PEHEH MEDIAL FORM;Lo;0;R;<medial> 06A6;;;;N;;;;;
+FB72;ARABIC LETTER DYEH ISOLATED FORM;Lo;0;R;<isolated> 0684;;;;N;;;;;
+FB73;ARABIC LETTER DYEH FINAL FORM;Lo;0;R;<final> 0684;;;;N;;;;;
+FB74;ARABIC LETTER DYEH INITIAL FORM;Lo;0;R;<initial> 0684;;;;N;;;;;
+FB75;ARABIC LETTER DYEH MEDIAL FORM;Lo;0;R;<medial> 0684;;;;N;;;;;
+FB76;ARABIC LETTER NYEH ISOLATED FORM;Lo;0;R;<isolated> 0683;;;;N;;;;;
+FB77;ARABIC LETTER NYEH FINAL FORM;Lo;0;R;<final> 0683;;;;N;;;;;
+FB78;ARABIC LETTER NYEH INITIAL FORM;Lo;0;R;<initial> 0683;;;;N;;;;;
+FB79;ARABIC LETTER NYEH MEDIAL FORM;Lo;0;R;<medial> 0683;;;;N;;;;;
+FB7A;ARABIC LETTER TCHEH ISOLATED FORM;Lo;0;R;<isolated> 0686;;;;N;;;;;
+FB7B;ARABIC LETTER TCHEH FINAL FORM;Lo;0;R;<final> 0686;;;;N;;;;;
+FB7C;ARABIC LETTER TCHEH INITIAL FORM;Lo;0;R;<initial> 0686;;;;N;;;;;
+FB7D;ARABIC LETTER TCHEH MEDIAL FORM;Lo;0;R;<medial> 0686;;;;N;;;;;
+FB7E;ARABIC LETTER TCHEHEH ISOLATED FORM;Lo;0;R;<isolated> 0687;;;;N;;;;;
+FB7F;ARABIC LETTER TCHEHEH FINAL FORM;Lo;0;R;<final> 0687;;;;N;;;;;
+FB80;ARABIC LETTER TCHEHEH INITIAL FORM;Lo;0;R;<initial> 0687;;;;N;;;;;
+FB81;ARABIC LETTER TCHEHEH MEDIAL FORM;Lo;0;R;<medial> 0687;;;;N;;;;;
+FB82;ARABIC LETTER DDAHAL ISOLATED FORM;Lo;0;R;<isolated> 068D;;;;N;;;;;
+FB83;ARABIC LETTER DDAHAL FINAL FORM;Lo;0;R;<final> 068D;;;;N;;;;;
+FB84;ARABIC LETTER DAHAL ISOLATED FORM;Lo;0;R;<isolated> 068C;;;;N;;;;;
+FB85;ARABIC LETTER DAHAL FINAL FORM;Lo;0;R;<final> 068C;;;;N;;;;;
+FB86;ARABIC LETTER DUL ISOLATED FORM;Lo;0;R;<isolated> 068E;;;;N;;;;;
+FB87;ARABIC LETTER DUL FINAL FORM;Lo;0;R;<final> 068E;;;;N;;;;;
+FB88;ARABIC LETTER DDAL ISOLATED FORM;Lo;0;R;<isolated> 0688;;;;N;;;;;
+FB89;ARABIC LETTER DDAL FINAL FORM;Lo;0;R;<final> 0688;;;;N;;;;;
+FB8A;ARABIC LETTER JEH ISOLATED FORM;Lo;0;R;<isolated> 0698;;;;N;;;;;
+FB8B;ARABIC LETTER JEH FINAL FORM;Lo;0;R;<final> 0698;;;;N;;;;;
+FB8C;ARABIC LETTER RREH ISOLATED FORM;Lo;0;R;<isolated> 0691;;;;N;;;;;
+FB8D;ARABIC LETTER RREH FINAL FORM;Lo;0;R;<final> 0691;;;;N;;;;;
+FB8E;ARABIC LETTER KEHEH ISOLATED FORM;Lo;0;R;<isolated> 06A9;;;;N;;;;;
+FB8F;ARABIC LETTER KEHEH FINAL FORM;Lo;0;R;<final> 06A9;;;;N;;;;;
+FB90;ARABIC LETTER KEHEH INITIAL FORM;Lo;0;R;<initial> 06A9;;;;N;;;;;
+FB91;ARABIC LETTER KEHEH MEDIAL FORM;Lo;0;R;<medial> 06A9;;;;N;;;;;
+FB92;ARABIC LETTER GAF ISOLATED FORM;Lo;0;R;<isolated> 06AF;;;;N;;;;;
+FB93;ARABIC LETTER GAF FINAL FORM;Lo;0;R;<final> 06AF;;;;N;;;;;
+FB94;ARABIC LETTER GAF INITIAL FORM;Lo;0;R;<initial> 06AF;;;;N;;;;;
+FB95;ARABIC LETTER GAF MEDIAL FORM;Lo;0;R;<medial> 06AF;;;;N;;;;;
+FB96;ARABIC LETTER GUEH ISOLATED FORM;Lo;0;R;<isolated> 06B3;;;;N;;;;;
+FB97;ARABIC LETTER GUEH FINAL FORM;Lo;0;R;<final> 06B3;;;;N;;;;;
+FB98;ARABIC LETTER GUEH INITIAL FORM;Lo;0;R;<initial> 06B3;;;;N;;;;;
+FB99;ARABIC LETTER GUEH MEDIAL FORM;Lo;0;R;<medial> 06B3;;;;N;;;;;
+FB9A;ARABIC LETTER NGOEH ISOLATED FORM;Lo;0;R;<isolated> 06B1;;;;N;;;;;
+FB9B;ARABIC LETTER NGOEH FINAL FORM;Lo;0;R;<final> 06B1;;;;N;;;;;
+FB9C;ARABIC LETTER NGOEH INITIAL FORM;Lo;0;R;<initial> 06B1;;;;N;;;;;
+FB9D;ARABIC LETTER NGOEH MEDIAL FORM;Lo;0;R;<medial> 06B1;;;;N;;;;;
+FB9E;ARABIC LETTER NOON GHUNNA ISOLATED FORM;Lo;0;R;<isolated> 06BA;;;;N;;;;;
+FB9F;ARABIC LETTER NOON GHUNNA FINAL FORM;Lo;0;R;<final> 06BA;;;;N;;;;;
+FBA0;ARABIC LETTER RNOON ISOLATED FORM;Lo;0;R;<isolated> 06BB;;;;N;;;;;
+FBA1;ARABIC LETTER RNOON FINAL FORM;Lo;0;R;<final> 06BB;;;;N;;;;;
+FBA2;ARABIC LETTER RNOON INITIAL FORM;Lo;0;R;<initial> 06BB;;;;N;;;;;
+FBA3;ARABIC LETTER RNOON MEDIAL FORM;Lo;0;R;<medial> 06BB;;;;N;;;;;
+FBA4;ARABIC LETTER HEH WITH YEH ABOVE ISOLATED FORM;Lo;0;R;<isolated> 06C0;;;;N;;;;;
+FBA5;ARABIC LETTER HEH WITH YEH ABOVE FINAL FORM;Lo;0;R;<final> 06C0;;;;N;;;;;
+FBA6;ARABIC LETTER HEH GOAL ISOLATED FORM;Lo;0;R;<isolated> 06C1;;;;N;;;;;
+FBA7;ARABIC LETTER HEH GOAL FINAL FORM;Lo;0;R;<final> 06C1;;;;N;;;;;
+FBA8;ARABIC LETTER HEH GOAL INITIAL FORM;Lo;0;R;<initial> 06C1;;;;N;;;;;
+FBA9;ARABIC LETTER HEH GOAL MEDIAL FORM;Lo;0;R;<medial> 06C1;;;;N;;;;;
+FBAA;ARABIC LETTER HEH DOACHASHMEE ISOLATED FORM;Lo;0;R;<isolated> 06BE;;;;N;;;;;
+FBAB;ARABIC LETTER HEH DOACHASHMEE FINAL FORM;Lo;0;R;<final> 06BE;;;;N;;;;;
+FBAC;ARABIC LETTER HEH DOACHASHMEE INITIAL FORM;Lo;0;R;<initial> 06BE;;;;N;;;;;
+FBAD;ARABIC LETTER HEH DOACHASHMEE MEDIAL FORM;Lo;0;R;<medial> 06BE;;;;N;;;;;
+FBAE;ARABIC LETTER YEH BARREE ISOLATED FORM;Lo;0;R;<isolated> 06D2;;;;N;;;;;
+FBAF;ARABIC LETTER YEH BARREE FINAL FORM;Lo;0;R;<final> 06D2;;;;N;;;;;
+FBB0;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE ISOLATED FORM;Lo;0;R;<isolated> 06D3;;;;N;;;;;
+FBB1;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM;Lo;0;R;<final> 06D3;;;;N;;;;;
+FBD3;ARABIC LETTER NG ISOLATED FORM;Lo;0;R;<isolated> 06AD;;;;N;;;;;
+FBD4;ARABIC LETTER NG FINAL FORM;Lo;0;R;<final> 06AD;;;;N;;;;;
+FBD5;ARABIC LETTER NG INITIAL FORM;Lo;0;R;<initial> 06AD;;;;N;;;;;
+FBD6;ARABIC LETTER NG MEDIAL FORM;Lo;0;R;<medial> 06AD;;;;N;;;;;
+FBD7;ARABIC LETTER U ISOLATED FORM;Lo;0;R;<isolated> 06C7;;;;N;;;;;
+FBD8;ARABIC LETTER U FINAL FORM;Lo;0;R;<final> 06C7;;;;N;;;;;
+FBD9;ARABIC LETTER OE ISOLATED FORM;Lo;0;R;<isolated> 06C6;;;;N;;;;;
+FBDA;ARABIC LETTER OE FINAL FORM;Lo;0;R;<final> 06C6;;;;N;;;;;
+FBDB;ARABIC LETTER YU ISOLATED FORM;Lo;0;R;<isolated> 06C8;;;;N;;;;;
+FBDC;ARABIC LETTER YU FINAL FORM;Lo;0;R;<final> 06C8;;;;N;;;;;
+FBDD;ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM;Lo;0;R;<isolated> 0677;;;;N;;;;;
+FBDE;ARABIC LETTER VE ISOLATED FORM;Lo;0;R;<isolated> 06CB;;;;N;;;;;
+FBDF;ARABIC LETTER VE FINAL FORM;Lo;0;R;<final> 06CB;;;;N;;;;;
+FBE0;ARABIC LETTER KIRGHIZ OE ISOLATED FORM;Lo;0;R;<isolated> 06C5;;;;N;;;;;
+FBE1;ARABIC LETTER KIRGHIZ OE FINAL FORM;Lo;0;R;<final> 06C5;;;;N;;;;;
+FBE2;ARABIC LETTER KIRGHIZ YU ISOLATED FORM;Lo;0;R;<isolated> 06C9;;;;N;;;;;
+FBE3;ARABIC LETTER KIRGHIZ YU FINAL FORM;Lo;0;R;<final> 06C9;;;;N;;;;;
+FBE4;ARABIC LETTER E ISOLATED FORM;Lo;0;R;<isolated> 06D0;;;;N;;;;;
+FBE5;ARABIC LETTER E FINAL FORM;Lo;0;R;<final> 06D0;;;;N;;;;;
+FBE6;ARABIC LETTER E INITIAL FORM;Lo;0;R;<initial> 06D0;;;;N;;;;;
+FBE7;ARABIC LETTER E MEDIAL FORM;Lo;0;R;<medial> 06D0;;;;N;;;;;
+FBE8;ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA INITIAL FORM;Lo;0;R;;;;;N;;;;;
+FBE9;ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA MEDIAL FORM;Lo;0;R;;;;;N;;;;;
+FBEA;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM;Lo;0;R;<isolated> 0626 0627;;;;N;;;;;
+FBEB;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF FINAL FORM;Lo;0;R;<final> 0626 0627;;;;N;;;;;
+FBEC;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE ISOLATED FORM;Lo;0;R;<isolated> 0626 06D5;;;;N;;;;;
+FBED;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE FINAL FORM;Lo;0;R;<final> 0626 06D5;;;;N;;;;;
+FBEE;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW ISOLATED FORM;Lo;0;R;<isolated> 0626 0648;;;;N;;;;;
+FBEF;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW FINAL FORM;Lo;0;R;<final> 0626 0648;;;;N;;;;;
+FBF0;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U ISOLATED FORM;Lo;0;R;<isolated> 0626 06C7;;;;N;;;;;
+FBF1;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U FINAL FORM;Lo;0;R;<final> 0626 06C7;;;;N;;;;;
+FBF2;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE ISOLATED FORM;Lo;0;R;<isolated> 0626 06C6;;;;N;;;;;
+FBF3;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE FINAL FORM;Lo;0;R;<final> 0626 06C6;;;;N;;;;;
+FBF4;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU ISOLATED FORM;Lo;0;R;<isolated> 0626 06C8;;;;N;;;;;
+FBF5;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU FINAL FORM;Lo;0;R;<final> 0626 06C8;;;;N;;;;;
+FBF6;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E ISOLATED FORM;Lo;0;R;<isolated> 0626 06D0;;;;N;;;;;
+FBF7;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E FINAL FORM;Lo;0;R;<final> 0626 06D0;;;;N;;;;;
+FBF8;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E INITIAL FORM;Lo;0;R;<initial> 0626 06D0;;;;N;;;;;
+FBF9;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;;;;;N;;;;;
+FBFA;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM;Lo;0;R;;;;;N;;;;;
+FBFB;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM;Lo;0;R;;;;;N;;;;;
+FBFC;ARABIC LETTER FARSI YEH ISOLATED FORM;Lo;0;R;<isolated> 06CC;;;;N;;;;;
+FBFD;ARABIC LETTER FARSI YEH FINAL FORM;Lo;0;R;<final> 06CC;;;;N;;;;;
+FBFE;ARABIC LETTER FARSI YEH INITIAL FORM;Lo;0;R;<initial> 06CC;;;;N;;;;;
+FBFF;ARABIC LETTER FARSI YEH MEDIAL FORM;Lo;0;R;<medial> 06CC;;;;N;;;;;
+FC00;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0626 062C;;;;N;;;;;
+FC01;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0626 062D;;;;N;;;;;
+FC02;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0626 0645;;;;N;;;;;
+FC03;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0626 0649;;;;N;;;;;
+FC04;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0626 064A;;;;N;;;;;
+FC05;ARABIC LIGATURE BEH WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0628 062C;;;;N;;;;;
+FC06;ARABIC LIGATURE BEH WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0628 062D;;;;N;;;;;
+FC07;ARABIC LIGATURE BEH WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0628 062E;;;;N;;;;;
+FC08;ARABIC LIGATURE BEH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0628 0645;;;;N;;;;;
+FC09;ARABIC LIGATURE BEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0628 0649;;;;N;;;;;
+FC0A;ARABIC LIGATURE BEH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0628 064A;;;;N;;;;;
+FC0B;ARABIC LIGATURE TEH WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 062A 062C;;;;N;;;;;
+FC0C;ARABIC LIGATURE TEH WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 062A 062D;;;;N;;;;;
+FC0D;ARABIC LIGATURE TEH WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 062A 062E;;;;N;;;;;
+FC0E;ARABIC LIGATURE TEH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 062A 0645;;;;N;;;;;
+FC0F;ARABIC LIGATURE TEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 062A 0649;;;;N;;;;;
+FC10;ARABIC LIGATURE TEH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 062A 064A;;;;N;;;;;
+FC11;ARABIC LIGATURE THEH WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 062B 062C;;;;N;;;;;
+FC12;ARABIC LIGATURE THEH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 062B 0645;;;;N;;;;;
+FC13;ARABIC LIGATURE THEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 062B 0649;;;;N;;;;;
+FC14;ARABIC LIGATURE THEH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 062B 064A;;;;N;;;;;
+FC15;ARABIC LIGATURE JEEM WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 062C 062D;;;;N;;;;;
+FC16;ARABIC LIGATURE JEEM WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 062C 0645;;;;N;;;;;
+FC17;ARABIC LIGATURE HAH WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 062D 062C;;;;N;;;;;
+FC18;ARABIC LIGATURE HAH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 062D 0645;;;;N;;;;;
+FC19;ARABIC LIGATURE KHAH WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 062E 062C;;;;N;;;;;
+FC1A;ARABIC LIGATURE KHAH WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 062E 062D;;;;N;;;;;
+FC1B;ARABIC LIGATURE KHAH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 062E 0645;;;;N;;;;;
+FC1C;ARABIC LIGATURE SEEN WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0633 062C;;;;N;;;;;
+FC1D;ARABIC LIGATURE SEEN WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0633 062D;;;;N;;;;;
+FC1E;ARABIC LIGATURE SEEN WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0633 062E;;;;N;;;;;
+FC1F;ARABIC LIGATURE SEEN WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0633 0645;;;;N;;;;;
+FC20;ARABIC LIGATURE SAD WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0635 062D;;;;N;;;;;
+FC21;ARABIC LIGATURE SAD WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0635 0645;;;;N;;;;;
+FC22;ARABIC LIGATURE DAD WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0636 062C;;;;N;;;;;
+FC23;ARABIC LIGATURE DAD WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0636 062D;;;;N;;;;;
+FC24;ARABIC LIGATURE DAD WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0636 062E;;;;N;;;;;
+FC25;ARABIC LIGATURE DAD WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0636 0645;;;;N;;;;;
+FC26;ARABIC LIGATURE TAH WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0637 062D;;;;N;;;;;
+FC27;ARABIC LIGATURE TAH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0637 0645;;;;N;;;;;
+FC28;ARABIC LIGATURE ZAH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0638 0645;;;;N;;;;;
+FC29;ARABIC LIGATURE AIN WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0639 062C;;;;N;;;;;
+FC2A;ARABIC LIGATURE AIN WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0639 0645;;;;N;;;;;
+FC2B;ARABIC LIGATURE GHAIN WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 063A 062C;;;;N;;;;;
+FC2C;ARABIC LIGATURE GHAIN WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 063A 0645;;;;N;;;;;
+FC2D;ARABIC LIGATURE FEH WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0641 062C;;;;N;;;;;
+FC2E;ARABIC LIGATURE FEH WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0641 062D;;;;N;;;;;
+FC2F;ARABIC LIGATURE FEH WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0641 062E;;;;N;;;;;
+FC30;ARABIC LIGATURE FEH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0641 0645;;;;N;;;;;
+FC31;ARABIC LIGATURE FEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0641 0649;;;;N;;;;;
+FC32;ARABIC LIGATURE FEH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0641 064A;;;;N;;;;;
+FC33;ARABIC LIGATURE QAF WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0642 062D;;;;N;;;;;
+FC34;ARABIC LIGATURE QAF WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0642 0645;;;;N;;;;;
+FC35;ARABIC LIGATURE QAF WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0642 0649;;;;N;;;;;
+FC36;ARABIC LIGATURE QAF WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0642 064A;;;;N;;;;;
+FC37;ARABIC LIGATURE KAF WITH ALEF ISOLATED FORM;Lo;0;R;<isolated> 0643 0627;;;;N;;;;;
+FC38;ARABIC LIGATURE KAF WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0643 062C;;;;N;;;;;
+FC39;ARABIC LIGATURE KAF WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0643 062D;;;;N;;;;;
+FC3A;ARABIC LIGATURE KAF WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0643 062E;;;;N;;;;;
+FC3B;ARABIC LIGATURE KAF WITH LAM ISOLATED FORM;Lo;0;R;<isolated> 0643 0644;;;;N;;;;;
+FC3C;ARABIC LIGATURE KAF WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0643 0645;;;;N;;;;;
+FC3D;ARABIC LIGATURE KAF WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0643 0649;;;;N;;;;;
+FC3E;ARABIC LIGATURE KAF WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0643 064A;;;;N;;;;;
+FC3F;ARABIC LIGATURE LAM WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0644 062C;;;;N;;;;;
+FC40;ARABIC LIGATURE LAM WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0644 062D;;;;N;;;;;
+FC41;ARABIC LIGATURE LAM WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0644 062E;;;;N;;;;;
+FC42;ARABIC LIGATURE LAM WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0644 0645;;;;N;;;;;
+FC43;ARABIC LIGATURE LAM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0644 0649;;;;N;;;;;
+FC44;ARABIC LIGATURE LAM WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0644 064A;;;;N;;;;;
+FC45;ARABIC LIGATURE MEEM WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0645 062C;;;;N;;;;;
+FC46;ARABIC LIGATURE MEEM WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0645 062D;;;;N;;;;;
+FC47;ARABIC LIGATURE MEEM WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0645 062E;;;;N;;;;;
+FC48;ARABIC LIGATURE MEEM WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0645 0645;;;;N;;;;;
+FC49;ARABIC LIGATURE MEEM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0645 0649;;;;N;;;;;
+FC4A;ARABIC LIGATURE MEEM WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0645 064A;;;;N;;;;;
+FC4B;ARABIC LIGATURE NOON WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0646 062C;;;;N;;;;;
+FC4C;ARABIC LIGATURE NOON WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0646 062D;;;;N;;;;;
+FC4D;ARABIC LIGATURE NOON WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0646 062E;;;;N;;;;;
+FC4E;ARABIC LIGATURE NOON WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0646 0645;;;;N;;;;;
+FC4F;ARABIC LIGATURE NOON WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0646 0649;;;;N;;;;;
+FC50;ARABIC LIGATURE NOON WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0646 064A;;;;N;;;;;
+FC51;ARABIC LIGATURE HEH WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0647 062C;;;;N;;;;;
+FC52;ARABIC LIGATURE HEH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0647 0645;;;;N;;;;;
+FC53;ARABIC LIGATURE HEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0647 0649;;;;N;;;;;
+FC54;ARABIC LIGATURE HEH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0647 064A;;;;N;;;;;
+FC55;ARABIC LIGATURE YEH WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 064A 062C;;;;N;;;;;
+FC56;ARABIC LIGATURE YEH WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 064A 062D;;;;N;;;;;
+FC57;ARABIC LIGATURE YEH WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 064A 062E;;;;N;;;;;
+FC58;ARABIC LIGATURE YEH WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 064A 0645;;;;N;;;;;
+FC59;ARABIC LIGATURE YEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 064A 0649;;;;N;;;;;
+FC5A;ARABIC LIGATURE YEH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 064A 064A;;;;N;;;;;
+FC5B;ARABIC LIGATURE THAL WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;R;<isolated> 0630 0670;;;;N;;;;;
+FC5C;ARABIC LIGATURE REH WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;R;<isolated> 0631 0670;;;;N;;;;;
+FC5D;ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;R;<isolated> 0649 0670;;;;N;;;;;
+FC5E;ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM;Lo;0;R;<isolated> 0020 0651 064C;;;;N;;;;;
+FC5F;ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM;Lo;0;R;<isolated> 0020 0651 064D;;;;N;;;;;
+FC60;ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM;Lo;0;R;<isolated> 0020 0651 064E;;;;N;;;;;
+FC61;ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM;Lo;0;R;<isolated> 0020 0651 064F;;;;N;;;;;
+FC62;ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM;Lo;0;R;<isolated> 0020 0651 0650;;;;N;;;;;
+FC63;ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;R;<isolated> 0020 0651 0670;;;;N;;;;;
+FC64;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH REH FINAL FORM;Lo;0;R;<final> 0626 0631;;;;N;;;;;
+FC65;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ZAIN FINAL FORM;Lo;0;R;<final> 0626 0632;;;;N;;;;;
+FC66;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM FINAL FORM;Lo;0;R;<final> 0626 0645;;;;N;;;;;
+FC67;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH NOON FINAL FORM;Lo;0;R;<final> 0626 0646;;;;N;;;;;
+FC68;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0626 0649;;;;N;;;;;
+FC69;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH FINAL FORM;Lo;0;R;<final> 0626 064A;;;;N;;;;;
+FC6A;ARABIC LIGATURE BEH WITH REH FINAL FORM;Lo;0;R;<final> 0628 0631;;;;N;;;;;
+FC6B;ARABIC LIGATURE BEH WITH ZAIN FINAL FORM;Lo;0;R;<final> 0628 0632;;;;N;;;;;
+FC6C;ARABIC LIGATURE BEH WITH MEEM FINAL FORM;Lo;0;R;<final> 0628 0645;;;;N;;;;;
+FC6D;ARABIC LIGATURE BEH WITH NOON FINAL FORM;Lo;0;R;<final> 0628 0646;;;;N;;;;;
+FC6E;ARABIC LIGATURE BEH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0628 0649;;;;N;;;;;
+FC6F;ARABIC LIGATURE BEH WITH YEH FINAL FORM;Lo;0;R;<final> 0628 064A;;;;N;;;;;
+FC70;ARABIC LIGATURE TEH WITH REH FINAL FORM;Lo;0;R;<final> 062A 0631;;;;N;;;;;
+FC71;ARABIC LIGATURE TEH WITH ZAIN FINAL FORM;Lo;0;R;<final> 062A 0632;;;;N;;;;;
+FC72;ARABIC LIGATURE TEH WITH MEEM FINAL FORM;Lo;0;R;<final> 062A 0645;;;;N;;;;;
+FC73;ARABIC LIGATURE TEH WITH NOON FINAL FORM;Lo;0;R;<final> 062A 0646;;;;N;;;;;
+FC74;ARABIC LIGATURE TEH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062A 0649;;;;N;;;;;
+FC75;ARABIC LIGATURE TEH WITH YEH FINAL FORM;Lo;0;R;<final> 062A 064A;;;;N;;;;;
+FC76;ARABIC LIGATURE THEH WITH REH FINAL FORM;Lo;0;R;<final> 062B 0631;;;;N;;;;;
+FC77;ARABIC LIGATURE THEH WITH ZAIN FINAL FORM;Lo;0;R;<final> 062B 0632;;;;N;;;;;
+FC78;ARABIC LIGATURE THEH WITH MEEM FINAL FORM;Lo;0;R;<final> 062B 0645;;;;N;;;;;
+FC79;ARABIC LIGATURE THEH WITH NOON FINAL FORM;Lo;0;R;<final> 062B 0646;;;;N;;;;;
+FC7A;ARABIC LIGATURE THEH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062B 0649;;;;N;;;;;
+FC7B;ARABIC LIGATURE THEH WITH YEH FINAL FORM;Lo;0;R;<final> 062B 064A;;;;N;;;;;
+FC7C;ARABIC LIGATURE FEH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0641 0649;;;;N;;;;;
+FC7D;ARABIC LIGATURE FEH WITH YEH FINAL FORM;Lo;0;R;<final> 0641 064A;;;;N;;;;;
+FC7E;ARABIC LIGATURE QAF WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0642 0649;;;;N;;;;;
+FC7F;ARABIC LIGATURE QAF WITH YEH FINAL FORM;Lo;0;R;<final> 0642 064A;;;;N;;;;;
+FC80;ARABIC LIGATURE KAF WITH ALEF FINAL FORM;Lo;0;R;<final> 0643 0627;;;;N;;;;;
+FC81;ARABIC LIGATURE KAF WITH LAM FINAL FORM;Lo;0;R;<final> 0643 0644;;;;N;;;;;
+FC82;ARABIC LIGATURE KAF WITH MEEM FINAL FORM;Lo;0;R;<final> 0643 0645;;;;N;;;;;
+FC83;ARABIC LIGATURE KAF WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0643 0649;;;;N;;;;;
+FC84;ARABIC LIGATURE KAF WITH YEH FINAL FORM;Lo;0;R;<final> 0643 064A;;;;N;;;;;
+FC85;ARABIC LIGATURE LAM WITH MEEM FINAL FORM;Lo;0;R;<final> 0644 0645;;;;N;;;;;
+FC86;ARABIC LIGATURE LAM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0644 0649;;;;N;;;;;
+FC87;ARABIC LIGATURE LAM WITH YEH FINAL FORM;Lo;0;R;<final> 0644 064A;;;;N;;;;;
+FC88;ARABIC LIGATURE MEEM WITH ALEF FINAL FORM;Lo;0;R;<final> 0645 0627;;;;N;;;;;
+FC89;ARABIC LIGATURE MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0645 0645;;;;N;;;;;
+FC8A;ARABIC LIGATURE NOON WITH REH FINAL FORM;Lo;0;R;<final> 0646 0631;;;;N;;;;;
+FC8B;ARABIC LIGATURE NOON WITH ZAIN FINAL FORM;Lo;0;R;<final> 0646 0632;;;;N;;;;;
+FC8C;ARABIC LIGATURE NOON WITH MEEM FINAL FORM;Lo;0;R;<final> 0646 0645;;;;N;;;;;
+FC8D;ARABIC LIGATURE NOON WITH NOON FINAL FORM;Lo;0;R;<final> 0646 0646;;;;N;;;;;
+FC8E;ARABIC LIGATURE NOON WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0646 0649;;;;N;;;;;
+FC8F;ARABIC LIGATURE NOON WITH YEH FINAL FORM;Lo;0;R;<final> 0646 064A;;;;N;;;;;
+FC90;ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF FINAL FORM;Lo;0;R;<final> 0649 0670;;;;N;;;;;
+FC91;ARABIC LIGATURE YEH WITH REH FINAL FORM;Lo;0;R;<final> 064A 0631;;;;N;;;;;
+FC92;ARABIC LIGATURE YEH WITH ZAIN FINAL FORM;Lo;0;R;<final> 064A 0632;;;;N;;;;;
+FC93;ARABIC LIGATURE YEH WITH MEEM FINAL FORM;Lo;0;R;<final> 064A 0645;;;;N;;;;;
+FC94;ARABIC LIGATURE YEH WITH NOON FINAL FORM;Lo;0;R;<final> 064A 0646;;;;N;;;;;
+FC95;ARABIC LIGATURE YEH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 064A 0649;;;;N;;;;;
+FC96;ARABIC LIGATURE YEH WITH YEH FINAL FORM;Lo;0;R;<final> 064A 064A;;;;N;;;;;
+FC97;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0626 062C;;;;N;;;;;
+FC98;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH INITIAL FORM;Lo;0;R;<initial> 0626 062D;;;;N;;;;;
+FC99;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0626 062E;;;;N;;;;;
+FC9A;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0626 0645;;;;N;;;;;
+FC9B;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH INITIAL FORM;Lo;0;R;<initial> 0626 0647;;;;N;;;;;
+FC9C;ARABIC LIGATURE BEH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0628 062C;;;;N;;;;;
+FC9D;ARABIC LIGATURE BEH WITH HAH INITIAL FORM;Lo;0;R;<initial> 0628 062D;;;;N;;;;;
+FC9E;ARABIC LIGATURE BEH WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0628 062E;;;;N;;;;;
+FC9F;ARABIC LIGATURE BEH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0628 0645;;;;N;;;;;
+FCA0;ARABIC LIGATURE BEH WITH HEH INITIAL FORM;Lo;0;R;<initial> 0628 0647;;;;N;;;;;
+FCA1;ARABIC LIGATURE TEH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 062A 062C;;;;N;;;;;
+FCA2;ARABIC LIGATURE TEH WITH HAH INITIAL FORM;Lo;0;R;<initial> 062A 062D;;;;N;;;;;
+FCA3;ARABIC LIGATURE TEH WITH KHAH INITIAL FORM;Lo;0;R;<initial> 062A 062E;;;;N;;;;;
+FCA4;ARABIC LIGATURE TEH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 062A 0645;;;;N;;;;;
+FCA5;ARABIC LIGATURE TEH WITH HEH INITIAL FORM;Lo;0;R;<initial> 062A 0647;;;;N;;;;;
+FCA6;ARABIC LIGATURE THEH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 062B 0645;;;;N;;;;;
+FCA7;ARABIC LIGATURE JEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 062C 062D;;;;N;;;;;
+FCA8;ARABIC LIGATURE JEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 062C 0645;;;;N;;;;;
+FCA9;ARABIC LIGATURE HAH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 062D 062C;;;;N;;;;;
+FCAA;ARABIC LIGATURE HAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 062D 0645;;;;N;;;;;
+FCAB;ARABIC LIGATURE KHAH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 062E 062C;;;;N;;;;;
+FCAC;ARABIC LIGATURE KHAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 062E 0645;;;;N;;;;;
+FCAD;ARABIC LIGATURE SEEN WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0633 062C;;;;N;;;;;
+FCAE;ARABIC LIGATURE SEEN WITH HAH INITIAL FORM;Lo;0;R;<initial> 0633 062D;;;;N;;;;;
+FCAF;ARABIC LIGATURE SEEN WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0633 062E;;;;N;;;;;
+FCB0;ARABIC LIGATURE SEEN WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0633 0645;;;;N;;;;;
+FCB1;ARABIC LIGATURE SAD WITH HAH INITIAL FORM;Lo;0;R;<initial> 0635 062D;;;;N;;;;;
+FCB2;ARABIC LIGATURE SAD WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0635 062E;;;;N;;;;;
+FCB3;ARABIC LIGATURE SAD WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0635 0645;;;;N;;;;;
+FCB4;ARABIC LIGATURE DAD WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0636 062C;;;;N;;;;;
+FCB5;ARABIC LIGATURE DAD WITH HAH INITIAL FORM;Lo;0;R;<initial> 0636 062D;;;;N;;;;;
+FCB6;ARABIC LIGATURE DAD WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0636 062E;;;;N;;;;;
+FCB7;ARABIC LIGATURE DAD WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0636 0645;;;;N;;;;;
+FCB8;ARABIC LIGATURE TAH WITH HAH INITIAL FORM;Lo;0;R;<initial> 0637 062D;;;;N;;;;;
+FCB9;ARABIC LIGATURE ZAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0638 0645;;;;N;;;;;
+FCBA;ARABIC LIGATURE AIN WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0639 062C;;;;N;;;;;
+FCBB;ARABIC LIGATURE AIN WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0639 0645;;;;N;;;;;
+FCBC;ARABIC LIGATURE GHAIN WITH JEEM INITIAL FORM;Lo;0;R;<initial> 063A 062C;;;;N;;;;;
+FCBD;ARABIC LIGATURE GHAIN WITH MEEM INITIAL FORM;Lo;0;R;<initial> 063A 0645;;;;N;;;;;
+FCBE;ARABIC LIGATURE FEH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0641 062C;;;;N;;;;;
+FCBF;ARABIC LIGATURE FEH WITH HAH INITIAL FORM;Lo;0;R;<initial> 0641 062D;;;;N;;;;;
+FCC0;ARABIC LIGATURE FEH WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0641 062E;;;;N;;;;;
+FCC1;ARABIC LIGATURE FEH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0641 0645;;;;N;;;;;
+FCC2;ARABIC LIGATURE QAF WITH HAH INITIAL FORM;Lo;0;R;<initial> 0642 062D;;;;N;;;;;
+FCC3;ARABIC LIGATURE QAF WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0642 0645;;;;N;;;;;
+FCC4;ARABIC LIGATURE KAF WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0643 062C;;;;N;;;;;
+FCC5;ARABIC LIGATURE KAF WITH HAH INITIAL FORM;Lo;0;R;<initial> 0643 062D;;;;N;;;;;
+FCC6;ARABIC LIGATURE KAF WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0643 062E;;;;N;;;;;
+FCC7;ARABIC LIGATURE KAF WITH LAM INITIAL FORM;Lo;0;R;<initial> 0643 0644;;;;N;;;;;
+FCC8;ARABIC LIGATURE KAF WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0643 0645;;;;N;;;;;
+FCC9;ARABIC LIGATURE LAM WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0644 062C;;;;N;;;;;
+FCCA;ARABIC LIGATURE LAM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0644 062D;;;;N;;;;;
+FCCB;ARABIC LIGATURE LAM WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0644 062E;;;;N;;;;;
+FCCC;ARABIC LIGATURE LAM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0644 0645;;;;N;;;;;
+FCCD;ARABIC LIGATURE LAM WITH HEH INITIAL FORM;Lo;0;R;<initial> 0644 0647;;;;N;;;;;
+FCCE;ARABIC LIGATURE MEEM WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0645 062C;;;;N;;;;;
+FCCF;ARABIC LIGATURE MEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0645 062D;;;;N;;;;;
+FCD0;ARABIC LIGATURE MEEM WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0645 062E;;;;N;;;;;
+FCD1;ARABIC LIGATURE MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0645 0645;;;;N;;;;;
+FCD2;ARABIC LIGATURE NOON WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0646 062C;;;;N;;;;;
+FCD3;ARABIC LIGATURE NOON WITH HAH INITIAL FORM;Lo;0;R;<initial> 0646 062D;;;;N;;;;;
+FCD4;ARABIC LIGATURE NOON WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0646 062E;;;;N;;;;;
+FCD5;ARABIC LIGATURE NOON WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0646 0645;;;;N;;;;;
+FCD6;ARABIC LIGATURE NOON WITH HEH INITIAL FORM;Lo;0;R;<initial> 0646 0647;;;;N;;;;;
+FCD7;ARABIC LIGATURE HEH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0647 062C;;;;N;;;;;
+FCD8;ARABIC LIGATURE HEH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0647 0645;;;;N;;;;;
+FCD9;ARABIC LIGATURE HEH WITH SUPERSCRIPT ALEF INITIAL FORM;Lo;0;R;<initial> 0647 0670;;;;N;;;;;
+FCDA;ARABIC LIGATURE YEH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 064A 062C;;;;N;;;;;
+FCDB;ARABIC LIGATURE YEH WITH HAH INITIAL FORM;Lo;0;R;<initial> 064A 062D;;;;N;;;;;
+FCDC;ARABIC LIGATURE YEH WITH KHAH INITIAL FORM;Lo;0;R;<initial> 064A 062E;;;;N;;;;;
+FCDD;ARABIC LIGATURE YEH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 064A 0645;;;;N;;;;;
+FCDE;ARABIC LIGATURE YEH WITH HEH INITIAL FORM;Lo;0;R;<initial> 064A 0647;;;;N;;;;;
+FCDF;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0626 0645;;;;N;;;;;
+FCE0;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH MEDIAL FORM;Lo;0;R;<medial> 0626 0647;;;;N;;;;;
+FCE1;ARABIC LIGATURE BEH WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0628 0645;;;;N;;;;;
+FCE2;ARABIC LIGATURE BEH WITH HEH MEDIAL FORM;Lo;0;R;<medial> 0628 0647;;;;N;;;;;
+FCE3;ARABIC LIGATURE TEH WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 062A 0645;;;;N;;;;;
+FCE4;ARABIC LIGATURE TEH WITH HEH MEDIAL FORM;Lo;0;R;<medial> 062A 0647;;;;N;;;;;
+FCE5;ARABIC LIGATURE THEH WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 062B 0645;;;;N;;;;;
+FCE6;ARABIC LIGATURE THEH WITH HEH MEDIAL FORM;Lo;0;R;<medial> 062B 0647;;;;N;;;;;
+FCE7;ARABIC LIGATURE SEEN WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0633 0645;;;;N;;;;;
+FCE8;ARABIC LIGATURE SEEN WITH HEH MEDIAL FORM;Lo;0;R;<medial> 0633 0647;;;;N;;;;;
+FCE9;ARABIC LIGATURE SHEEN WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0634 0645;;;;N;;;;;
+FCEA;ARABIC LIGATURE SHEEN WITH HEH MEDIAL FORM;Lo;0;R;<medial> 0634 0647;;;;N;;;;;
+FCEB;ARABIC LIGATURE KAF WITH LAM MEDIAL FORM;Lo;0;R;<medial> 0643 0644;;;;N;;;;;
+FCEC;ARABIC LIGATURE KAF WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0643 0645;;;;N;;;;;
+FCED;ARABIC LIGATURE LAM WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0644 0645;;;;N;;;;;
+FCEE;ARABIC LIGATURE NOON WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0646 0645;;;;N;;;;;
+FCEF;ARABIC LIGATURE NOON WITH HEH MEDIAL FORM;Lo;0;R;<medial> 0646 0647;;;;N;;;;;
+FCF0;ARABIC LIGATURE YEH WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 064A 0645;;;;N;;;;;
+FCF1;ARABIC LIGATURE YEH WITH HEH MEDIAL FORM;Lo;0;R;<medial> 064A 0647;;;;N;;;;;
+FCF2;ARABIC LIGATURE SHADDA WITH FATHA MEDIAL FORM;Lo;0;R;<medial> 0020 0651 064E;;;;N;;;;;
+FCF3;ARABIC LIGATURE SHADDA WITH DAMMA MEDIAL FORM;Lo;0;R;<medial> 0020 0651 064F;;;;N;;;;;
+FCF4;ARABIC LIGATURE SHADDA WITH KASRA MEDIAL FORM;Lo;0;R;<medial> 0020 0651 0650;;;;N;;;;;
+FCF5;ARABIC LIGATURE TAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0637 0649;;;;N;;;;;
+FCF6;ARABIC LIGATURE TAH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0637 064A;;;;N;;;;;
+FCF7;ARABIC LIGATURE AIN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0639 0649;;;;N;;;;;
+FCF8;ARABIC LIGATURE AIN WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0639 064A;;;;N;;;;;
+FCF9;ARABIC LIGATURE GHAIN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 063A 0649;;;;N;;;;;
+FCFA;ARABIC LIGATURE GHAIN WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 063A 064A;;;;N;;;;;
+FCFB;ARABIC LIGATURE SEEN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0633 0649;;;;N;;;;;
+FCFC;ARABIC LIGATURE SEEN WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0633 064A;;;;N;;;;;
+FCFD;ARABIC LIGATURE SHEEN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0634 0649;;;;N;;;;;
+FCFE;ARABIC LIGATURE SHEEN WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0634 064A;;;;N;;;;;
+FCFF;ARABIC LIGATURE HAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 062D 0649;;;;N;;;;;
+FD00;ARABIC LIGATURE HAH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 062D 064A;;;;N;;;;;
+FD01;ARABIC LIGATURE JEEM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 062C 0649;;;;N;;;;;
+FD02;ARABIC LIGATURE JEEM WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 062C 064A;;;;N;;;;;
+FD03;ARABIC LIGATURE KHAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 062E 0649;;;;N;;;;;
+FD04;ARABIC LIGATURE KHAH WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 062E 064A;;;;N;;;;;
+FD05;ARABIC LIGATURE SAD WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0635 0649;;;;N;;;;;
+FD06;ARABIC LIGATURE SAD WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0635 064A;;;;N;;;;;
+FD07;ARABIC LIGATURE DAD WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0636 0649;;;;N;;;;;
+FD08;ARABIC LIGATURE DAD WITH YEH ISOLATED FORM;Lo;0;R;<isolated> 0636 064A;;;;N;;;;;
+FD09;ARABIC LIGATURE SHEEN WITH JEEM ISOLATED FORM;Lo;0;R;<isolated> 0634 062C;;;;N;;;;;
+FD0A;ARABIC LIGATURE SHEEN WITH HAH ISOLATED FORM;Lo;0;R;<isolated> 0634 062D;;;;N;;;;;
+FD0B;ARABIC LIGATURE SHEEN WITH KHAH ISOLATED FORM;Lo;0;R;<isolated> 0634 062E;;;;N;;;;;
+FD0C;ARABIC LIGATURE SHEEN WITH MEEM ISOLATED FORM;Lo;0;R;<isolated> 0634 0645;;;;N;;;;;
+FD0D;ARABIC LIGATURE SHEEN WITH REH ISOLATED FORM;Lo;0;R;<isolated> 0634 0631;;;;N;;;;;
+FD0E;ARABIC LIGATURE SEEN WITH REH ISOLATED FORM;Lo;0;R;<isolated> 0633 0631;;;;N;;;;;
+FD0F;ARABIC LIGATURE SAD WITH REH ISOLATED FORM;Lo;0;R;<isolated> 0635 0631;;;;N;;;;;
+FD10;ARABIC LIGATURE DAD WITH REH ISOLATED FORM;Lo;0;R;<isolated> 0636 0631;;;;N;;;;;
+FD11;ARABIC LIGATURE TAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0637 0649;;;;N;;;;;
+FD12;ARABIC LIGATURE TAH WITH YEH FINAL FORM;Lo;0;R;<final> 0637 064A;;;;N;;;;;
+FD13;ARABIC LIGATURE AIN WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0639 0649;;;;N;;;;;
+FD14;ARABIC LIGATURE AIN WITH YEH FINAL FORM;Lo;0;R;<final> 0639 064A;;;;N;;;;;
+FD15;ARABIC LIGATURE GHAIN WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 063A 0649;;;;N;;;;;
+FD16;ARABIC LIGATURE GHAIN WITH YEH FINAL FORM;Lo;0;R;<final> 063A 064A;;;;N;;;;;
+FD17;ARABIC LIGATURE SEEN WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0633 0649;;;;N;;;;;
+FD18;ARABIC LIGATURE SEEN WITH YEH FINAL FORM;Lo;0;R;<final> 0633 064A;;;;N;;;;;
+FD19;ARABIC LIGATURE SHEEN WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0634 0649;;;;N;;;;;
+FD1A;ARABIC LIGATURE SHEEN WITH YEH FINAL FORM;Lo;0;R;<final> 0634 064A;;;;N;;;;;
+FD1B;ARABIC LIGATURE HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062D 0649;;;;N;;;;;
+FD1C;ARABIC LIGATURE HAH WITH YEH FINAL FORM;Lo;0;R;<final> 062D 064A;;;;N;;;;;
+FD1D;ARABIC LIGATURE JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062C 0649;;;;N;;;;;
+FD1E;ARABIC LIGATURE JEEM WITH YEH FINAL FORM;Lo;0;R;<final> 062C 064A;;;;N;;;;;
+FD1F;ARABIC LIGATURE KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062E 0649;;;;N;;;;;
+FD20;ARABIC LIGATURE KHAH WITH YEH FINAL FORM;Lo;0;R;<final> 062E 064A;;;;N;;;;;
+FD21;ARABIC LIGATURE SAD WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0635 0649;;;;N;;;;;
+FD22;ARABIC LIGATURE SAD WITH YEH FINAL FORM;Lo;0;R;<final> 0635 064A;;;;N;;;;;
+FD23;ARABIC LIGATURE DAD WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0636 0649;;;;N;;;;;
+FD24;ARABIC LIGATURE DAD WITH YEH FINAL FORM;Lo;0;R;<final> 0636 064A;;;;N;;;;;
+FD25;ARABIC LIGATURE SHEEN WITH JEEM FINAL FORM;Lo;0;R;<final> 0634 062C;;;;N;;;;;
+FD26;ARABIC LIGATURE SHEEN WITH HAH FINAL FORM;Lo;0;R;<final> 0634 062D;;;;N;;;;;
+FD27;ARABIC LIGATURE SHEEN WITH KHAH FINAL FORM;Lo;0;R;<final> 0634 062E;;;;N;;;;;
+FD28;ARABIC LIGATURE SHEEN WITH MEEM FINAL FORM;Lo;0;R;<final> 0634 0645;;;;N;;;;;
+FD29;ARABIC LIGATURE SHEEN WITH REH FINAL FORM;Lo;0;R;<final> 0634 0631;;;;N;;;;;
+FD2A;ARABIC LIGATURE SEEN WITH REH FINAL FORM;Lo;0;R;<final> 0633 0631;;;;N;;;;;
+FD2B;ARABIC LIGATURE SAD WITH REH FINAL FORM;Lo;0;R;<final> 0635 0631;;;;N;;;;;
+FD2C;ARABIC LIGATURE DAD WITH REH FINAL FORM;Lo;0;R;<final> 0636 0631;;;;N;;;;;
+FD2D;ARABIC LIGATURE SHEEN WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0634 062C;;;;N;;;;;
+FD2E;ARABIC LIGATURE SHEEN WITH HAH INITIAL FORM;Lo;0;R;<initial> 0634 062D;;;;N;;;;;
+FD2F;ARABIC LIGATURE SHEEN WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0634 062E;;;;N;;;;;
+FD30;ARABIC LIGATURE SHEEN WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0634 0645;;;;N;;;;;
+FD31;ARABIC LIGATURE SEEN WITH HEH INITIAL FORM;Lo;0;R;<initial> 0633 0647;;;;N;;;;;
+FD32;ARABIC LIGATURE SHEEN WITH HEH INITIAL FORM;Lo;0;R;<initial> 0634 0647;;;;N;;;;;
+FD33;ARABIC LIGATURE TAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0637 0645;;;;N;;;;;
+FD34;ARABIC LIGATURE SEEN WITH JEEM MEDIAL FORM;Lo;0;R;<medial> 0633 062C;;;;N;;;;;
+FD35;ARABIC LIGATURE SEEN WITH HAH MEDIAL FORM;Lo;0;R;<medial> 0633 062D;;;;N;;;;;
+FD36;ARABIC LIGATURE SEEN WITH KHAH MEDIAL FORM;Lo;0;R;<medial> 0633 062E;;;;N;;;;;
+FD37;ARABIC LIGATURE SHEEN WITH JEEM MEDIAL FORM;Lo;0;R;<medial> 0634 062C;;;;N;;;;;
+FD38;ARABIC LIGATURE SHEEN WITH HAH MEDIAL FORM;Lo;0;R;<medial> 0634 062D;;;;N;;;;;
+FD39;ARABIC LIGATURE SHEEN WITH KHAH MEDIAL FORM;Lo;0;R;<medial> 0634 062E;;;;N;;;;;
+FD3A;ARABIC LIGATURE TAH WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0637 0645;;;;N;;;;;
+FD3B;ARABIC LIGATURE ZAH WITH MEEM MEDIAL FORM;Lo;0;R;<medial> 0638 0645;;;;N;;;;;
+FD3C;ARABIC LIGATURE ALEF WITH FATHATAN FINAL FORM;Lo;0;R;<final> 0627 064B;;;;N;;;;;
+FD3D;ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM;Lo;0;R;<isolated> 0627 064B;;;;N;;;;;
+FD3E;ORNATE LEFT PARENTHESIS;Ps;0;ON;;;;;N;;;;;
+FD3F;ORNATE RIGHT PARENTHESIS;Pe;0;ON;;;;;N;;;;;
+FD50;ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 062A 062C 0645;;;;N;;;;;
+FD51;ARABIC LIGATURE TEH WITH HAH WITH JEEM FINAL FORM;Lo;0;R;<final> 062A 062D 062C;;;;N;;;;;
+FD52;ARABIC LIGATURE TEH WITH HAH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 062A 062D 062C;;;;N;;;;;
+FD53;ARABIC LIGATURE TEH WITH HAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 062A 062D 0645;;;;N;;;;;
+FD54;ARABIC LIGATURE TEH WITH KHAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 062A 062E 0645;;;;N;;;;;
+FD55;ARABIC LIGATURE TEH WITH MEEM WITH JEEM INITIAL FORM;Lo;0;R;<initial> 062A 0645 062C;;;;N;;;;;
+FD56;ARABIC LIGATURE TEH WITH MEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 062A 0645 062D;;;;N;;;;;
+FD57;ARABIC LIGATURE TEH WITH MEEM WITH KHAH INITIAL FORM;Lo;0;R;<initial> 062A 0645 062E;;;;N;;;;;
+FD58;ARABIC LIGATURE JEEM WITH MEEM WITH HAH FINAL FORM;Lo;0;R;<final> 062C 0645 062D;;;;N;;;;;
+FD59;ARABIC LIGATURE JEEM WITH MEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 062C 0645 062D;;;;N;;;;;
+FD5A;ARABIC LIGATURE HAH WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 062D 0645 064A;;;;N;;;;;
+FD5B;ARABIC LIGATURE HAH WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062D 0645 0649;;;;N;;;;;
+FD5C;ARABIC LIGATURE SEEN WITH HAH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0633 062D 062C;;;;N;;;;;
+FD5D;ARABIC LIGATURE SEEN WITH JEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0633 062C 062D;;;;N;;;;;
+FD5E;ARABIC LIGATURE SEEN WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0633 062C 0649;;;;N;;;;;
+FD5F;ARABIC LIGATURE SEEN WITH MEEM WITH HAH FINAL FORM;Lo;0;R;<final> 0633 0645 062D;;;;N;;;;;
+FD60;ARABIC LIGATURE SEEN WITH MEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0633 0645 062D;;;;N;;;;;
+FD61;ARABIC LIGATURE SEEN WITH MEEM WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0633 0645 062C;;;;N;;;;;
+FD62;ARABIC LIGATURE SEEN WITH MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0633 0645 0645;;;;N;;;;;
+FD63;ARABIC LIGATURE SEEN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0633 0645 0645;;;;N;;;;;
+FD64;ARABIC LIGATURE SAD WITH HAH WITH HAH FINAL FORM;Lo;0;R;<final> 0635 062D 062D;;;;N;;;;;
+FD65;ARABIC LIGATURE SAD WITH HAH WITH HAH INITIAL FORM;Lo;0;R;<initial> 0635 062D 062D;;;;N;;;;;
+FD66;ARABIC LIGATURE SAD WITH MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0635 0645 0645;;;;N;;;;;
+FD67;ARABIC LIGATURE SHEEN WITH HAH WITH MEEM FINAL FORM;Lo;0;R;<final> 0634 062D 0645;;;;N;;;;;
+FD68;ARABIC LIGATURE SHEEN WITH HAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0634 062D 0645;;;;N;;;;;
+FD69;ARABIC LIGATURE SHEEN WITH JEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0634 062C 064A;;;;N;;;;;
+FD6A;ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH FINAL FORM;Lo;0;R;<final> 0634 0645 062E;;;;N;;;;;
+FD6B;ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0634 0645 062E;;;;N;;;;;
+FD6C;ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0634 0645 0645;;;;N;;;;;
+FD6D;ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0634 0645 0645;;;;N;;;;;
+FD6E;ARABIC LIGATURE DAD WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0636 062D 0649;;;;N;;;;;
+FD6F;ARABIC LIGATURE DAD WITH KHAH WITH MEEM FINAL FORM;Lo;0;R;<final> 0636 062E 0645;;;;N;;;;;
+FD70;ARABIC LIGATURE DAD WITH KHAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0636 062E 0645;;;;N;;;;;
+FD71;ARABIC LIGATURE TAH WITH MEEM WITH HAH FINAL FORM;Lo;0;R;<final> 0637 0645 062D;;;;N;;;;;
+FD72;ARABIC LIGATURE TAH WITH MEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0637 0645 062D;;;;N;;;;;
+FD73;ARABIC LIGATURE TAH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0637 0645 0645;;;;N;;;;;
+FD74;ARABIC LIGATURE TAH WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0637 0645 064A;;;;N;;;;;
+FD75;ARABIC LIGATURE AIN WITH JEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0639 062C 0645;;;;N;;;;;
+FD76;ARABIC LIGATURE AIN WITH MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0639 0645 0645;;;;N;;;;;
+FD77;ARABIC LIGATURE AIN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0639 0645 0645;;;;N;;;;;
+FD78;ARABIC LIGATURE AIN WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0639 0645 0649;;;;N;;;;;
+FD79;ARABIC LIGATURE GHAIN WITH MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 063A 0645 0645;;;;N;;;;;
+FD7A;ARABIC LIGATURE GHAIN WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 063A 0645 064A;;;;N;;;;;
+FD7B;ARABIC LIGATURE GHAIN WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 063A 0645 0649;;;;N;;;;;
+FD7C;ARABIC LIGATURE FEH WITH KHAH WITH MEEM FINAL FORM;Lo;0;R;<final> 0641 062E 0645;;;;N;;;;;
+FD7D;ARABIC LIGATURE FEH WITH KHAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0641 062E 0645;;;;N;;;;;
+FD7E;ARABIC LIGATURE QAF WITH MEEM WITH HAH FINAL FORM;Lo;0;R;<final> 0642 0645 062D;;;;N;;;;;
+FD7F;ARABIC LIGATURE QAF WITH MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0642 0645 0645;;;;N;;;;;
+FD80;ARABIC LIGATURE LAM WITH HAH WITH MEEM FINAL FORM;Lo;0;R;<final> 0644 062D 0645;;;;N;;;;;
+FD81;ARABIC LIGATURE LAM WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 0644 062D 064A;;;;N;;;;;
+FD82;ARABIC LIGATURE LAM WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0644 062D 0649;;;;N;;;;;
+FD83;ARABIC LIGATURE LAM WITH JEEM WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0644 062C 062C;;;;N;;;;;
+FD84;ARABIC LIGATURE LAM WITH JEEM WITH JEEM FINAL FORM;Lo;0;R;<final> 0644 062C 062C;;;;N;;;;;
+FD85;ARABIC LIGATURE LAM WITH KHAH WITH MEEM FINAL FORM;Lo;0;R;<final> 0644 062E 0645;;;;N;;;;;
+FD86;ARABIC LIGATURE LAM WITH KHAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0644 062E 0645;;;;N;;;;;
+FD87;ARABIC LIGATURE LAM WITH MEEM WITH HAH FINAL FORM;Lo;0;R;<final> 0644 0645 062D;;;;N;;;;;
+FD88;ARABIC LIGATURE LAM WITH MEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0644 0645 062D;;;;N;;;;;
+FD89;ARABIC LIGATURE MEEM WITH HAH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0645 062D 062C;;;;N;;;;;
+FD8A;ARABIC LIGATURE MEEM WITH HAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0645 062D 0645;;;;N;;;;;
+FD8B;ARABIC LIGATURE MEEM WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 0645 062D 064A;;;;N;;;;;
+FD8C;ARABIC LIGATURE MEEM WITH JEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0645 062C 062D;;;;N;;;;;
+FD8D;ARABIC LIGATURE MEEM WITH JEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0645 062C 0645;;;;N;;;;;
+FD8E;ARABIC LIGATURE MEEM WITH KHAH WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0645 062E 062C;;;;N;;;;;
+FD8F;ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0645 062E 0645;;;;N;;;;;
+FD92;ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM;Lo;0;R;<initial> 0645 062C 062E;;;;N;;;;;
+FD93;ARABIC LIGATURE HEH WITH MEEM WITH JEEM INITIAL FORM;Lo;0;R;<initial> 0647 0645 062C;;;;N;;;;;
+FD94;ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0647 0645 0645;;;;N;;;;;
+FD95;ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0646 062D 0645;;;;N;;;;;
+FD96;ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0646 062D 0649;;;;N;;;;;
+FD97;ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0646 062C 0645;;;;N;;;;;
+FD98;ARABIC LIGATURE NOON WITH JEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0646 062C 0645;;;;N;;;;;
+FD99;ARABIC LIGATURE NOON WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0646 062C 0649;;;;N;;;;;
+FD9A;ARABIC LIGATURE NOON WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0646 0645 064A;;;;N;;;;;
+FD9B;ARABIC LIGATURE NOON WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0646 0645 0649;;;;N;;;;;
+FD9C;ARABIC LIGATURE YEH WITH MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 064A 0645 0645;;;;N;;;;;
+FD9D;ARABIC LIGATURE YEH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 064A 0645 0645;;;;N;;;;;
+FD9E;ARABIC LIGATURE BEH WITH KHAH WITH YEH FINAL FORM;Lo;0;R;<final> 0628 062E 064A;;;;N;;;;;
+FD9F;ARABIC LIGATURE TEH WITH JEEM WITH YEH FINAL FORM;Lo;0;R;<final> 062A 062C 064A;;;;N;;;;;
+FDA0;ARABIC LIGATURE TEH WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062A 062C 0649;;;;N;;;;;
+FDA1;ARABIC LIGATURE TEH WITH KHAH WITH YEH FINAL FORM;Lo;0;R;<final> 062A 062E 064A;;;;N;;;;;
+FDA2;ARABIC LIGATURE TEH WITH KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062A 062E 0649;;;;N;;;;;
+FDA3;ARABIC LIGATURE TEH WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 062A 0645 064A;;;;N;;;;;
+FDA4;ARABIC LIGATURE TEH WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062A 0645 0649;;;;N;;;;;
+FDA5;ARABIC LIGATURE JEEM WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 062C 0645 064A;;;;N;;;;;
+FDA6;ARABIC LIGATURE JEEM WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062C 062D 0649;;;;N;;;;;
+FDA7;ARABIC LIGATURE JEEM WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 062C 0645 0649;;;;N;;;;;
+FDA8;ARABIC LIGATURE SEEN WITH KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0633 062E 0649;;;;N;;;;;
+FDA9;ARABIC LIGATURE SAD WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 0635 062D 064A;;;;N;;;;;
+FDAA;ARABIC LIGATURE SHEEN WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 0634 062D 064A;;;;N;;;;;
+FDAB;ARABIC LIGATURE DAD WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 0636 062D 064A;;;;N;;;;;
+FDAC;ARABIC LIGATURE LAM WITH JEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0644 062C 064A;;;;N;;;;;
+FDAD;ARABIC LIGATURE LAM WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0644 0645 064A;;;;N;;;;;
+FDAE;ARABIC LIGATURE YEH WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 064A 062D 064A;;;;N;;;;;
+FDAF;ARABIC LIGATURE YEH WITH JEEM WITH YEH FINAL FORM;Lo;0;R;<final> 064A 062C 064A;;;;N;;;;;
+FDB0;ARABIC LIGATURE YEH WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 064A 0645 064A;;;;N;;;;;
+FDB1;ARABIC LIGATURE MEEM WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0645 0645 064A;;;;N;;;;;
+FDB2;ARABIC LIGATURE QAF WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0642 0645 064A;;;;N;;;;;
+FDB3;ARABIC LIGATURE NOON WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 0646 062D 064A;;;;N;;;;;
+FDB4;ARABIC LIGATURE QAF WITH MEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0642 0645 062D;;;;N;;;;;
+FDB5;ARABIC LIGATURE LAM WITH HAH WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0644 062D 0645;;;;N;;;;;
+FDB6;ARABIC LIGATURE AIN WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0639 0645 064A;;;;N;;;;;
+FDB7;ARABIC LIGATURE KAF WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0643 0645 064A;;;;N;;;;;
+FDB8;ARABIC LIGATURE NOON WITH JEEM WITH HAH INITIAL FORM;Lo;0;R;<initial> 0646 062C 062D;;;;N;;;;;
+FDB9;ARABIC LIGATURE MEEM WITH KHAH WITH YEH FINAL FORM;Lo;0;R;<final> 0645 062E 064A;;;;N;;;;;
+FDBA;ARABIC LIGATURE LAM WITH JEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0644 062C 0645;;;;N;;;;;
+FDBB;ARABIC LIGATURE KAF WITH MEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0643 0645 0645;;;;N;;;;;
+FDBC;ARABIC LIGATURE LAM WITH JEEM WITH MEEM FINAL FORM;Lo;0;R;<final> 0644 062C 0645;;;;N;;;;;
+FDBD;ARABIC LIGATURE NOON WITH JEEM WITH HAH FINAL FORM;Lo;0;R;<final> 0646 062C 062D;;;;N;;;;;
+FDBE;ARABIC LIGATURE JEEM WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 062C 062D 064A;;;;N;;;;;
+FDBF;ARABIC LIGATURE HAH WITH JEEM WITH YEH FINAL FORM;Lo;0;R;<final> 062D 062C 064A;;;;N;;;;;
+FDC0;ARABIC LIGATURE MEEM WITH JEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0645 062C 064A;;;;N;;;;;
+FDC1;ARABIC LIGATURE FEH WITH MEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0641 0645 064A;;;;N;;;;;
+FDC2;ARABIC LIGATURE BEH WITH HAH WITH YEH FINAL FORM;Lo;0;R;<final> 0628 062D 064A;;;;N;;;;;
+FDC3;ARABIC LIGATURE KAF WITH MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0643 0645 0645;;;;N;;;;;
+FDC4;ARABIC LIGATURE AIN WITH JEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0639 062C 0645;;;;N;;;;;
+FDC5;ARABIC LIGATURE SAD WITH MEEM WITH MEEM INITIAL FORM;Lo;0;R;<initial> 0635 0645 0645;;;;N;;;;;
+FDC6;ARABIC LIGATURE SEEN WITH KHAH WITH YEH FINAL FORM;Lo;0;R;<final> 0633 062E 064A;;;;N;;;;;
+FDC7;ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM;Lo;0;R;<final> 0646 062C 064A;;;;N;;;;;
+FDF0;ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM;Lo;0;R;<isolated> 0635 0644 06D2;;;;N;;;;;
+FDF1;ARABIC LIGATURE QALA USED AS KORANIC STOP SIGN ISOLATED FORM;Lo;0;R;<isolated> 0642 0644 06D2;;;;N;;;;;
+FDF2;ARABIC LIGATURE ALLAH ISOLATED FORM;Lo;0;R;<isolated> 0627 0644 0644 0647;;;;N;;;;;
+FDF3;ARABIC LIGATURE AKBAR ISOLATED FORM;Lo;0;R;<isolated> 0627 0643 0628 0631;;;;N;;;;;
+FDF4;ARABIC LIGATURE MOHAMMAD ISOLATED FORM;Lo;0;R;<isolated> 0645 062D 0645 062F;;;;N;;;;;
+FDF5;ARABIC LIGATURE SALAM ISOLATED FORM;Lo;0;R;<isolated> 0635 0644 0639 0645;;;;N;;;;;
+FDF6;ARABIC LIGATURE RASOUL ISOLATED FORM;Lo;0;R;<isolated> 0631 0633 0648 0644;;;;N;;;;;
+FDF7;ARABIC LIGATURE ALAYHE ISOLATED FORM;Lo;0;R;<isolated> 0639 0644 064A 0647;;;;N;;;;;
+FDF8;ARABIC LIGATURE WASALLAM ISOLATED FORM;Lo;0;R;<isolated> 0648 0633 0644 0645;;;;N;;;;;
+FDF9;ARABIC LIGATURE SALLA ISOLATED FORM;Lo;0;R;<isolated> 0635 0644 0649;;;;N;;;;;
+FDFA;ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM;So;0;R;<isolated> 0635 0644 0649 0020 0627 0644 0644 0647 0020 0639 0644 064A 0647 0020 0648 0633 0644 0645;;;;N;ARABIC LETTER SALLALLAHOU ALAYHE WASALLAM;;;;
+FDFB;ARABIC LIGATURE JALLAJALALOUHOU;So;0;R;<isolated> 062C 0644 0020 062C 0644 0627 0644 0647;;;;N;ARABIC LETTER JALLAJALALOUHOU;;;;
+FE20;COMBINING LIGATURE LEFT HALF;Mn;230;ON;;;;;N;;;;;
+FE21;COMBINING LIGATURE RIGHT HALF;Mn;230;ON;;;;;N;;;;;
+FE22;COMBINING DOUBLE TILDE LEFT HALF;Mn;230;ON;;;;;N;;;;;
+FE23;COMBINING DOUBLE TILDE RIGHT HALF;Mn;230;ON;;;;;N;;;;;
+FE30;PRESENTATION FORM FOR VERTICAL TWO DOT LEADER;Po;0;ON;<vertical> 2025;;;;N;GLYPH FOR VERTICAL TWO DOT LEADER;;;;
+FE31;PRESENTATION FORM FOR VERTICAL EM DASH;Pd;0;ON;<vertical> 2014;;;;N;GLYPH FOR VERTICAL EM DASH;;;;
+FE32;PRESENTATION FORM FOR VERTICAL EN DASH;Pd;0;ON;<vertical> 2013;;;;N;GLYPH FOR VERTICAL EN DASH;;;;
+FE33;PRESENTATION FORM FOR VERTICAL LOW LINE;So;0;ON;<vertical> 005F;;;;N;GLYPH FOR VERTICAL SPACING UNDERSCORE;;;;
+FE34;PRESENTATION FORM FOR VERTICAL WAVY LOW LINE;So;0;ON;<vertical> 005F;;;;N;GLYPH FOR VERTICAL SPACING WAVY UNDERSCORE;;;;
+FE35;PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS;Ps;0;ON;<vertical> 0028;;;;N;GLYPH FOR VERTICAL OPENING PARENTHESIS;;;;
+FE36;PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS;Pe;0;ON;<vertical> 0029;;;;N;GLYPH FOR VERTICAL CLOSING PARENTHESIS;;;;
+FE37;PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET;Ps;0;ON;<vertical> 007B;;;;N;GLYPH FOR VERTICAL OPENING CURLY BRACKET;;;;
+FE38;PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET;Pe;0;ON;<vertical> 007D;;;;N;GLYPH FOR VERTICAL CLOSING CURLY BRACKET;;;;
+FE39;PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET;Ps;0;ON;<vertical> 3014;;;;N;GLYPH FOR VERTICAL OPENING TORTOISE SHELL BRACKET;;;;
+FE3A;PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET;Pe;0;ON;<vertical> 3015;;;;N;GLYPH FOR VERTICAL CLOSING TORTOISE SHELL BRACKET;;;;
+FE3B;PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET;Ps;0;ON;<vertical> 3010;;;;N;GLYPH FOR VERTICAL OPENING BLACK LENTICULAR BRACKET;;;;
+FE3C;PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET;Pe;0;ON;<vertical> 3011;;;;N;GLYPH FOR VERTICAL CLOSING BLACK LENTICULAR BRACKET;;;;
+FE3D;PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET;Ps;0;ON;<vertical> 300A;;;;N;GLYPH FOR VERTICAL OPENING DOUBLE ANGLE BRACKET;;;;
+FE3E;PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET;Pe;0;ON;<vertical> 300B;;;;N;GLYPH FOR VERTICAL CLOSING DOUBLE ANGLE BRACKET;;;;
+FE3F;PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET;Ps;0;ON;<vertical> 3008;;;;N;GLYPH FOR VERTICAL OPENING ANGLE BRACKET;;;;
+FE40;PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET;Pe;0;ON;<vertical> 3009;;;;N;GLYPH FOR VERTICAL CLOSING ANGLE BRACKET;;;;
+FE41;PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET;Ps;0;ON;<vertical> 300C;;;;N;GLYPH FOR VERTICAL OPENING CORNER BRACKET;;;;
+FE42;PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET;Pe;0;ON;<vertical> 300D;;;;N;GLYPH FOR VERTICAL CLOSING CORNER BRACKET;;;;
+FE43;PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET;Ps;0;ON;<vertical> 300E;;;;N;GLYPH FOR VERTICAL OPENING WHITE CORNER BRACKET;;;;
+FE44;PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET;Pe;0;ON;<vertical> 300F;;;;N;GLYPH FOR VERTICAL CLOSING WHITE CORNER BRACKET;;;;
+FE49;DASHED OVERLINE;So;0;ON;<compat> 203E;;;;N;SPACING DASHED OVERSCORE;;;;
+FE4A;CENTRELINE OVERLINE;So;0;ON;<compat> 203E;;;;N;SPACING CENTERLINE OVERSCORE;;;;
+FE4B;WAVY OVERLINE;So;0;ON;<compat> 203E;;;;N;SPACING WAVY OVERSCORE;;;;
+FE4C;DOUBLE WAVY OVERLINE;So;0;ON;<compat> 203E;;;;N;SPACING DOUBLE WAVY OVERSCORE;;;;
+FE4D;DASHED LOW LINE;So;0;ON;<compat> 005F;;;;N;SPACING DASHED UNDERSCORE;;;;
+FE4E;CENTRELINE LOW LINE;So;0;ON;<compat> 005F;;;;N;SPACING CENTERLINE UNDERSCORE;;;;
+FE4F;WAVY LOW LINE;So;0;ON;<compat> 005F;;;;N;SPACING WAVY UNDERSCORE;;;;
+FE50;SMALL COMMA;Po;0;ON;<small> 002C;;;;N;;;;;
+FE51;SMALL IDEOGRAPHIC COMMA;Po;0;ON;<small> 3001;;;;N;;;;;
+FE52;SMALL FULL STOP;Po;0;ON;<small> 002E;;;;N;SMALL PERIOD;;;;
+FE54;SMALL SEMICOLON;Po;0;ON;<small> 003B;;;;N;;;;;
+FE55;SMALL COLON;Po;0;ON;<small> 003A;;;;N;;;;;
+FE56;SMALL QUESTION MARK;Po;0;ON;<small> 003F;;;;N;;;;;
+FE57;SMALL EXCLAMATION MARK;Po;0;ON;<small> 0021;;;;N;;;;;
+FE58;SMALL EM DASH;Pd;0;ON;<small> 2014;;;;N;;;;;
+FE59;SMALL LEFT PARENTHESIS;Ps;0;ON;<small> 0028;;;;N;SMALL OPENING PARENTHESIS;;;;
+FE5A;SMALL RIGHT PARENTHESIS;Pe;0;ON;<small> 0029;;;;N;SMALL CLOSING PARENTHESIS;;;;
+FE5B;SMALL LEFT CURLY BRACKET;Ps;0;ON;<small> 007B;;;;N;SMALL OPENING CURLY BRACKET;;;;
+FE5C;SMALL RIGHT CURLY BRACKET;Pe;0;ON;<small> 007D;;;;N;SMALL CLOSING CURLY BRACKET;;;;
+FE5D;SMALL LEFT TORTOISE SHELL BRACKET;Ps;0;ON;<small> 3014;;;;N;SMALL OPENING TORTOISE SHELL BRACKET;;;;
+FE5E;SMALL RIGHT TORTOISE SHELL BRACKET;Pe;0;ON;<small> 3015;;;;N;SMALL CLOSING TORTOISE SHELL BRACKET;;;;
+FE5F;SMALL NUMBER SIGN;So;0;ON;<small> 0023;;;;N;;;;;
+FE60;SMALL AMPERSAND;So;0;ON;<small> 0026;;;;N;;;;;
+FE61;SMALL ASTERISK;So;0;ON;<small> 002A;;;;N;;;;;
+FE62;SMALL PLUS SIGN;Sm;0;ON;<small> 002B;;;;N;;;;;
+FE63;SMALL HYPHEN-MINUS;Pd;0;ON;<small> 002D;;;;N;;;;;
+FE64;SMALL LESS-THAN SIGN;Sm;0;ON;<small> 003C;;;;N;;;;;
+FE65;SMALL GREATER-THAN SIGN;Sm;0;ON;<small> 003E;;;;N;;;;;
+FE66;SMALL EQUALS SIGN;Sm;0;ON;<small> 003D;;;;N;;;;;
+FE68;SMALL REVERSE SOLIDUS;Po;0;ON;<small> 005C;;;;N;SMALL BACKSLASH;;;;
+FE69;SMALL DOLLAR SIGN;Sc;0;ON;<small> 0024;;;;N;;;;;
+FE6A;SMALL PERCENT SIGN;Po;0;ON;<small> 0025;;;;N;;;;;
+FE6B;SMALL COMMERCIAL AT;So;0;ON;<small> 0040;;;;N;;;;;
+FE70;ARABIC FATHATAN ISOLATED FORM;Lo;0;R;<isolated> 0020 064B;;;;N;ARABIC SPACING FATHATAN;;;;
+FE71;ARABIC TATWEEL WITH FATHATAN ABOVE;Lo;0;R;<medial> 0640 064B;;;;N;ARABIC FATHATAN ON TATWEEL;;;;
+FE72;ARABIC DAMMATAN ISOLATED FORM;Lo;0;R;<isolated> 0020 064C;;;;N;ARABIC SPACING DAMMATAN;;;;
+FE74;ARABIC KASRATAN ISOLATED FORM;Lo;0;R;<isolated> 0020 064D;;;;N;ARABIC SPACING KASRATAN;;;;
+FE76;ARABIC FATHA ISOLATED FORM;Lo;0;R;<isolated> 0020 064E;;;;N;ARABIC SPACING FATHAH;;;;
+FE77;ARABIC FATHA MEDIAL FORM;Lo;0;R;<medial> 0640 064E;;;;N;ARABIC FATHAH ON TATWEEL;;;;
+FE78;ARABIC DAMMA ISOLATED FORM;Lo;0;R;<isolated> 0020 064F;;;;N;ARABIC SPACING DAMMAH;;;;
+FE79;ARABIC DAMMA MEDIAL FORM;Lo;0;R;<medial> 0640 064F;;;;N;ARABIC DAMMAH ON TATWEEL;;;;
+FE7A;ARABIC KASRA ISOLATED FORM;Lo;0;R;<isolated> 0020 0650;;;;N;ARABIC SPACING KASRAH;;;;
+FE7B;ARABIC KASRA MEDIAL FORM;Lo;0;R;<medial> 0640 0650;;;;N;ARABIC KASRAH ON TATWEEL;;;;
+FE7C;ARABIC SHADDA ISOLATED FORM;Lo;0;R;<isolated> 0020 0651;;;;N;ARABIC SPACING SHADDAH;;;;
+FE7D;ARABIC SHADDA MEDIAL FORM;Lo;0;R;<medial> 0640 0651;;;;N;ARABIC SHADDAH ON TATWEEL;;;;
+FE7E;ARABIC SUKUN ISOLATED FORM;Lo;0;R;<isolated> 0020 0652;;;;N;ARABIC SPACING SUKUN;;;;
+FE7F;ARABIC SUKUN MEDIAL FORM;Lo;0;R;<medial> 0640 0652;;;;N;ARABIC SUKUN ON TATWEEL;;;;
+FE80;ARABIC LETTER HAMZA ISOLATED FORM;Lo;0;R;<isolated> 0621;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH;;;;
+FE81;ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM;Lo;0;R;<isolated> 0622;;;;N;GLYPH FOR ISOLATE ARABIC MADDAH ON ALEF;;;;
+FE82;ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM;Lo;0;R;<final> 0622;;;;N;GLYPH FOR FINAL ARABIC MADDAH ON ALEF;;;;
+FE83;ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM;Lo;0;R;<isolated> 0623;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON ALEF;;;;
+FE84;ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM;Lo;0;R;<final> 0623;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON ALEF;;;;
+FE85;ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM;Lo;0;R;<isolated> 0624;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON WAW;;;;
+FE86;ARABIC LETTER WAW WITH HAMZA ABOVE FINAL FORM;Lo;0;R;<final> 0624;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON WAW;;;;
+FE87;ARABIC LETTER ALEF WITH HAMZA BELOW ISOLATED FORM;Lo;0;R;<isolated> 0625;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH UNDER ALEF;;;;
+FE88;ARABIC LETTER ALEF WITH HAMZA BELOW FINAL FORM;Lo;0;R;<final> 0625;;;;N;GLYPH FOR FINAL ARABIC HAMZAH UNDER ALEF;;;;
+FE89;ARABIC LETTER YEH WITH HAMZA ABOVE ISOLATED FORM;Lo;0;R;<isolated> 0626;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON YA;;;;
+FE8A;ARABIC LETTER YEH WITH HAMZA ABOVE FINAL FORM;Lo;0;R;<final> 0626;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON YA;;;;
+FE8B;ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM;Lo;0;R;<initial> 0626;;;;N;GLYPH FOR INITIAL ARABIC HAMZAH ON YA;;;;
+FE8C;ARABIC LETTER YEH WITH HAMZA ABOVE MEDIAL FORM;Lo;0;R;<medial> 0626;;;;N;GLYPH FOR MEDIAL ARABIC HAMZAH ON YA;;;;
+FE8D;ARABIC LETTER ALEF ISOLATED FORM;Lo;0;R;<isolated> 0627;;;;N;GLYPH FOR ISOLATE ARABIC ALEF;;;;
+FE8E;ARABIC LETTER ALEF FINAL FORM;Lo;0;R;<final> 0627;;;;N;GLYPH FOR FINAL ARABIC ALEF;;;;
+FE8F;ARABIC LETTER BEH ISOLATED FORM;Lo;0;R;<isolated> 0628;;;;N;GLYPH FOR ISOLATE ARABIC BAA;;;;
+FE90;ARABIC LETTER BEH FINAL FORM;Lo;0;R;<final> 0628;;;;N;GLYPH FOR FINAL ARABIC BAA;;;;
+FE91;ARABIC LETTER BEH INITIAL FORM;Lo;0;R;<initial> 0628;;;;N;GLYPH FOR INITIAL ARABIC BAA;;;;
+FE92;ARABIC LETTER BEH MEDIAL FORM;Lo;0;R;<medial> 0628;;;;N;GLYPH FOR MEDIAL ARABIC BAA;;;;
+FE93;ARABIC LETTER TEH MARBUTA ISOLATED FORM;Lo;0;R;<isolated> 0629;;;;N;GLYPH FOR ISOLATE ARABIC TAA MARBUTAH;;;;
+FE94;ARABIC LETTER TEH MARBUTA FINAL FORM;Lo;0;R;<final> 0629;;;;N;GLYPH FOR FINAL ARABIC TAA MARBUTAH;;;;
+FE95;ARABIC LETTER TEH ISOLATED FORM;Lo;0;R;<isolated> 062A;;;;N;GLYPH FOR ISOLATE ARABIC TAA;;;;
+FE96;ARABIC LETTER TEH FINAL FORM;Lo;0;R;<final> 062A;;;;N;GLYPH FOR FINAL ARABIC TAA;;;;
+FE97;ARABIC LETTER TEH INITIAL FORM;Lo;0;R;<initial> 062A;;;;N;GLYPH FOR INITIAL ARABIC TAA;;;;
+FE98;ARABIC LETTER TEH MEDIAL FORM;Lo;0;R;<medial> 062A;;;;N;GLYPH FOR MEDIAL ARABIC TAA;;;;
+FE99;ARABIC LETTER THEH ISOLATED FORM;Lo;0;R;<isolated> 062B;;;;N;GLYPH FOR ISOLATE ARABIC THAA;;;;
+FE9A;ARABIC LETTER THEH FINAL FORM;Lo;0;R;<final> 062B;;;;N;GLYPH FOR FINAL ARABIC THAA;;;;
+FE9B;ARABIC LETTER THEH INITIAL FORM;Lo;0;R;<initial> 062B;;;;N;GLYPH FOR INITIAL ARABIC THAA;;;;
+FE9C;ARABIC LETTER THEH MEDIAL FORM;Lo;0;R;<medial> 062B;;;;N;GLYPH FOR MEDIAL ARABIC THAA;;;;
+FE9D;ARABIC LETTER JEEM ISOLATED FORM;Lo;0;R;<isolated> 062C;;;;N;GLYPH FOR ISOLATE ARABIC JEEM;;;;
+FE9E;ARABIC LETTER JEEM FINAL FORM;Lo;0;R;<final> 062C;;;;N;GLYPH FOR FINAL ARABIC JEEM;;;;
+FE9F;ARABIC LETTER JEEM INITIAL FORM;Lo;0;R;<initial> 062C;;;;N;GLYPH FOR INITIAL ARABIC JEEM;;;;
+FEA0;ARABIC LETTER JEEM MEDIAL FORM;Lo;0;R;<medial> 062C;;;;N;GLYPH FOR MEDIAL ARABIC JEEM;;;;
+FEA1;ARABIC LETTER HAH ISOLATED FORM;Lo;0;R;<isolated> 062D;;;;N;GLYPH FOR ISOLATE ARABIC HAA;;;;
+FEA2;ARABIC LETTER HAH FINAL FORM;Lo;0;R;<final> 062D;;;;N;GLYPH FOR FINAL ARABIC HAA;;;;
+FEA3;ARABIC LETTER HAH INITIAL FORM;Lo;0;R;<initial> 062D;;;;N;GLYPH FOR INITIAL ARABIC HAA;;;;
+FEA4;ARABIC LETTER HAH MEDIAL FORM;Lo;0;R;<medial> 062D;;;;N;GLYPH FOR MEDIAL ARABIC HAA;;;;
+FEA5;ARABIC LETTER KHAH ISOLATED FORM;Lo;0;R;<isolated> 062E;;;;N;GLYPH FOR ISOLATE ARABIC KHAA;;;;
+FEA6;ARABIC LETTER KHAH FINAL FORM;Lo;0;R;<final> 062E;;;;N;GLYPH FOR FINAL ARABIC KHAA;;;;
+FEA7;ARABIC LETTER KHAH INITIAL FORM;Lo;0;R;<initial> 062E;;;;N;GLYPH FOR INITIAL ARABIC KHAA;;;;
+FEA8;ARABIC LETTER KHAH MEDIAL FORM;Lo;0;R;<medial> 062E;;;;N;GLYPH FOR MEDIAL ARABIC KHAA;;;;
+FEA9;ARABIC LETTER DAL ISOLATED FORM;Lo;0;R;<isolated> 062F;;;;N;GLYPH FOR ISOLATE ARABIC DAL;;;;
+FEAA;ARABIC LETTER DAL FINAL FORM;Lo;0;R;<final> 062F;;;;N;GLYPH FOR FINAL ARABIC DAL;;;;
+FEAB;ARABIC LETTER THAL ISOLATED FORM;Lo;0;R;<isolated> 0630;;;;N;GLYPH FOR ISOLATE ARABIC THAL;;;;
+FEAC;ARABIC LETTER THAL FINAL FORM;Lo;0;R;<final> 0630;;;;N;GLYPH FOR FINAL ARABIC THAL;;;;
+FEAD;ARABIC LETTER REH ISOLATED FORM;Lo;0;R;<isolated> 0631;;;;N;GLYPH FOR ISOLATE ARABIC RA;;;;
+FEAE;ARABIC LETTER REH FINAL FORM;Lo;0;R;<final> 0631;;;;N;GLYPH FOR FINAL ARABIC RA;;;;
+FEAF;ARABIC LETTER ZAIN ISOLATED FORM;Lo;0;R;<isolated> 0632;;;;N;GLYPH FOR ISOLATE ARABIC ZAIN;;;;
+FEB0;ARABIC LETTER ZAIN FINAL FORM;Lo;0;R;<final> 0632;;;;N;GLYPH FOR FINAL ARABIC ZAIN;;;;
+FEB1;ARABIC LETTER SEEN ISOLATED FORM;Lo;0;R;<isolated> 0633;;;;N;GLYPH FOR ISOLATE ARABIC SEEN;;;;
+FEB2;ARABIC LETTER SEEN FINAL FORM;Lo;0;R;<final> 0633;;;;N;GLYPH FOR FINAL ARABIC SEEN;;;;
+FEB3;ARABIC LETTER SEEN INITIAL FORM;Lo;0;R;<initial> 0633;;;;N;GLYPH FOR INITIAL ARABIC SEEN;;;;
+FEB4;ARABIC LETTER SEEN MEDIAL FORM;Lo;0;R;<medial> 0633;;;;N;GLYPH FOR MEDIAL ARABIC SEEN;;;;
+FEB5;ARABIC LETTER SHEEN ISOLATED FORM;Lo;0;R;<isolated> 0634;;;;N;GLYPH FOR ISOLATE ARABIC SHEEN;;;;
+FEB6;ARABIC LETTER SHEEN FINAL FORM;Lo;0;R;<final> 0634;;;;N;GLYPH FOR FINAL ARABIC SHEEN;;;;
+FEB7;ARABIC LETTER SHEEN INITIAL FORM;Lo;0;R;<initial> 0634;;;;N;GLYPH FOR INITIAL ARABIC SHEEN;;;;
+FEB8;ARABIC LETTER SHEEN MEDIAL FORM;Lo;0;R;<medial> 0634;;;;N;GLYPH FOR MEDIAL ARABIC SHEEN;;;;
+FEB9;ARABIC LETTER SAD ISOLATED FORM;Lo;0;R;<isolated> 0635;;;;N;GLYPH FOR ISOLATE ARABIC SAD;;;;
+FEBA;ARABIC LETTER SAD FINAL FORM;Lo;0;R;<final> 0635;;;;N;GLYPH FOR FINAL ARABIC SAD;;;;
+FEBB;ARABIC LETTER SAD INITIAL FORM;Lo;0;R;<initial> 0635;;;;N;GLYPH FOR INITIAL ARABIC SAD;;;;
+FEBC;ARABIC LETTER SAD MEDIAL FORM;Lo;0;R;<medial> 0635;;;;N;GLYPH FOR MEDIAL ARABIC SAD;;;;
+FEBD;ARABIC LETTER DAD ISOLATED FORM;Lo;0;R;<isolated> 0636;;;;N;GLYPH FOR ISOLATE ARABIC DAD;;;;
+FEBE;ARABIC LETTER DAD FINAL FORM;Lo;0;R;<final> 0636;;;;N;GLYPH FOR FINAL ARABIC DAD;;;;
+FEBF;ARABIC LETTER DAD INITIAL FORM;Lo;0;R;<initial> 0636;;;;N;GLYPH FOR INITIAL ARABIC DAD;;;;
+FEC0;ARABIC LETTER DAD MEDIAL FORM;Lo;0;R;<medial> 0636;;;;N;GLYPH FOR MEDIAL ARABIC DAD;;;;
+FEC1;ARABIC LETTER TAH ISOLATED FORM;Lo;0;R;<isolated> 0637;;;;N;GLYPH FOR ISOLATE ARABIC TAH;;;;
+FEC2;ARABIC LETTER TAH FINAL FORM;Lo;0;R;<final> 0637;;;;N;GLYPH FOR FINAL ARABIC TAH;;;;
+FEC3;ARABIC LETTER TAH INITIAL FORM;Lo;0;R;<initial> 0637;;;;N;GLYPH FOR INITIAL ARABIC TAH;;;;
+FEC4;ARABIC LETTER TAH MEDIAL FORM;Lo;0;R;<medial> 0637;;;;N;GLYPH FOR MEDIAL ARABIC TAH;;;;
+FEC5;ARABIC LETTER ZAH ISOLATED FORM;Lo;0;R;<isolated> 0638;;;;N;GLYPH FOR ISOLATE ARABIC DHAH;;;;
+FEC6;ARABIC LETTER ZAH FINAL FORM;Lo;0;R;<final> 0638;;;;N;GLYPH FOR FINAL ARABIC DHAH;;;;
+FEC7;ARABIC LETTER ZAH INITIAL FORM;Lo;0;R;<initial> 0638;;;;N;GLYPH FOR INITIAL ARABIC DHAH;;;;
+FEC8;ARABIC LETTER ZAH MEDIAL FORM;Lo;0;R;<medial> 0638;;;;N;GLYPH FOR MEDIAL ARABIC DHAH;;;;
+FEC9;ARABIC LETTER AIN ISOLATED FORM;Lo;0;R;<isolated> 0639;;;;N;GLYPH FOR ISOLATE ARABIC AIN;;;;
+FECA;ARABIC LETTER AIN FINAL FORM;Lo;0;R;<final> 0639;;;;N;GLYPH FOR FINAL ARABIC AIN;;;;
+FECB;ARABIC LETTER AIN INITIAL FORM;Lo;0;R;<initial> 0639;;;;N;GLYPH FOR INITIAL ARABIC AIN;;;;
+FECC;ARABIC LETTER AIN MEDIAL FORM;Lo;0;R;<medial> 0639;;;;N;GLYPH FOR MEDIAL ARABIC AIN;;;;
+FECD;ARABIC LETTER GHAIN ISOLATED FORM;Lo;0;R;<isolated> 063A;;;;N;GLYPH FOR ISOLATE ARABIC GHAIN;;;;
+FECE;ARABIC LETTER GHAIN FINAL FORM;Lo;0;R;<final> 063A;;;;N;GLYPH FOR FINAL ARABIC GHAIN;;;;
+FECF;ARABIC LETTER GHAIN INITIAL FORM;Lo;0;R;<initial> 063A;;;;N;GLYPH FOR INITIAL ARABIC GHAIN;;;;
+FED0;ARABIC LETTER GHAIN MEDIAL FORM;Lo;0;R;<medial> 063A;;;;N;GLYPH FOR MEDIAL ARABIC GHAIN;;;;
+FED1;ARABIC LETTER FEH ISOLATED FORM;Lo;0;R;<isolated> 0641;;;;N;GLYPH FOR ISOLATE ARABIC FA;;;;
+FED2;ARABIC LETTER FEH FINAL FORM;Lo;0;R;<final> 0641;;;;N;GLYPH FOR FINAL ARABIC FA;;;;
+FED3;ARABIC LETTER FEH INITIAL FORM;Lo;0;R;<initial> 0641;;;;N;GLYPH FOR INITIAL ARABIC FA;;;;
+FED4;ARABIC LETTER FEH MEDIAL FORM;Lo;0;R;<medial> 0641;;;;N;GLYPH FOR MEDIAL ARABIC FA;;;;
+FED5;ARABIC LETTER QAF ISOLATED FORM;Lo;0;R;<isolated> 0642;;;;N;GLYPH FOR ISOLATE ARABIC QAF;;;;
+FED6;ARABIC LETTER QAF FINAL FORM;Lo;0;R;<final> 0642;;;;N;GLYPH FOR FINAL ARABIC QAF;;;;
+FED7;ARABIC LETTER QAF INITIAL FORM;Lo;0;R;<initial> 0642;;;;N;GLYPH FOR INITIAL ARABIC QAF;;;;
+FED8;ARABIC LETTER QAF MEDIAL FORM;Lo;0;R;<medial> 0642;;;;N;GLYPH FOR MEDIAL ARABIC QAF;;;;
+FED9;ARABIC LETTER KAF ISOLATED FORM;Lo;0;R;<isolated> 0643;;;;N;GLYPH FOR ISOLATE ARABIC CAF;;;;
+FEDA;ARABIC LETTER KAF FINAL FORM;Lo;0;R;<final> 0643;;;;N;GLYPH FOR FINAL ARABIC CAF;;;;
+FEDB;ARABIC LETTER KAF INITIAL FORM;Lo;0;R;<initial> 0643;;;;N;GLYPH FOR INITIAL ARABIC CAF;;;;
+FEDC;ARABIC LETTER KAF MEDIAL FORM;Lo;0;R;<medial> 0643;;;;N;GLYPH FOR MEDIAL ARABIC CAF;;;;
+FEDD;ARABIC LETTER LAM ISOLATED FORM;Lo;0;R;<isolated> 0644;;;;N;GLYPH FOR ISOLATE ARABIC LAM;;;;
+FEDE;ARABIC LETTER LAM FINAL FORM;Lo;0;R;<final> 0644;;;;N;GLYPH FOR FINAL ARABIC LAM;;;;
+FEDF;ARABIC LETTER LAM INITIAL FORM;Lo;0;R;<initial> 0644;;;;N;GLYPH FOR INITIAL ARABIC LAM;;;;
+FEE0;ARABIC LETTER LAM MEDIAL FORM;Lo;0;R;<medial> 0644;;;;N;GLYPH FOR MEDIAL ARABIC LAM;;;;
+FEE1;ARABIC LETTER MEEM ISOLATED FORM;Lo;0;R;<isolated> 0645;;;;N;GLYPH FOR ISOLATE ARABIC MEEM;;;;
+FEE2;ARABIC LETTER MEEM FINAL FORM;Lo;0;R;<final> 0645;;;;N;GLYPH FOR FINAL ARABIC MEEM;;;;
+FEE3;ARABIC LETTER MEEM INITIAL FORM;Lo;0;R;<initial> 0645;;;;N;GLYPH FOR INITIAL ARABIC MEEM;;;;
+FEE4;ARABIC LETTER MEEM MEDIAL FORM;Lo;0;R;<medial> 0645;;;;N;GLYPH FOR MEDIAL ARABIC MEEM;;;;
+FEE5;ARABIC LETTER NOON ISOLATED FORM;Lo;0;R;<isolated> 0646;;;;N;GLYPH FOR ISOLATE ARABIC NOON;;;;
+FEE6;ARABIC LETTER NOON FINAL FORM;Lo;0;R;<final> 0646;;;;N;GLYPH FOR FINAL ARABIC NOON;;;;
+FEE7;ARABIC LETTER NOON INITIAL FORM;Lo;0;R;<initial> 0646;;;;N;GLYPH FOR INITIAL ARABIC NOON;;;;
+FEE8;ARABIC LETTER NOON MEDIAL FORM;Lo;0;R;<medial> 0646;;;;N;GLYPH FOR MEDIAL ARABIC NOON;;;;
+FEE9;ARABIC LETTER HEH ISOLATED FORM;Lo;0;R;<isolated> 0647;;;;N;GLYPH FOR ISOLATE ARABIC HA;;;;
+FEEA;ARABIC LETTER HEH FINAL FORM;Lo;0;R;<final> 0647;;;;N;GLYPH FOR FINAL ARABIC HA;;;;
+FEEB;ARABIC LETTER HEH INITIAL FORM;Lo;0;R;<initial> 0647;;;;N;GLYPH FOR INITIAL ARABIC HA;;;;
+FEEC;ARABIC LETTER HEH MEDIAL FORM;Lo;0;R;<medial> 0647;;;;N;GLYPH FOR MEDIAL ARABIC HA;;;;
+FEED;ARABIC LETTER WAW ISOLATED FORM;Lo;0;R;<isolated> 0648;;;;N;GLYPH FOR ISOLATE ARABIC WAW;;;;
+FEEE;ARABIC LETTER WAW FINAL FORM;Lo;0;R;<final> 0648;;;;N;GLYPH FOR FINAL ARABIC WAW;;;;
+FEEF;ARABIC LETTER ALEF MAKSURA ISOLATED FORM;Lo;0;R;<isolated> 0649;;;;N;GLYPH FOR ISOLATE ARABIC ALEF MAQSURAH;;;;
+FEF0;ARABIC LETTER ALEF MAKSURA FINAL FORM;Lo;0;R;<final> 0649;;;;N;GLYPH FOR FINAL ARABIC ALEF MAQSURAH;;;;
+FEF1;ARABIC LETTER YEH ISOLATED FORM;Lo;0;R;<isolated> 064A;;;;N;GLYPH FOR ISOLATE ARABIC YA;;;;
+FEF2;ARABIC LETTER YEH FINAL FORM;Lo;0;R;<final> 064A;;;;N;GLYPH FOR FINAL ARABIC YA;;;;
+FEF3;ARABIC LETTER YEH INITIAL FORM;Lo;0;R;<initial> 064A;;;;N;GLYPH FOR INITIAL ARABIC YA;;;;
+FEF4;ARABIC LETTER YEH MEDIAL FORM;Lo;0;R;<medial> 064A;;;;N;GLYPH FOR MEDIAL ARABIC YA;;;;
+FEF5;ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM;Lo;0;R;<isolated> 0644 0622;;;;N;GLYPH FOR ISOLATE ARABIC MADDAH ON LIGATURE LAM ALEF;;;;
+FEF6;ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM;Lo;0;R;<final> 0644 0622;;;;N;GLYPH FOR FINAL ARABIC MADDAH ON LIGATURE LAM ALEF;;;;
+FEF7;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM;Lo;0;R;<isolated> 0644 0623;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON LIGATURE LAM ALEF;;;;
+FEF8;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM;Lo;0;R;<final> 0644 0623;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON LIGATURE LAM ALEF;;;;
+FEF9;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM;Lo;0;R;<isolated> 0644 0625;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH UNDER LIGATURE LAM ALEF;;;;
+FEFA;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM;Lo;0;R;<final> 0644 0625;;;;N;GLYPH FOR FINAL ARABIC HAMZAH UNDER LIGATURE LAM ALEF;;;;
+FEFB;ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM;Lo;0;R;<isolated> 0644 0627;;;;N;GLYPH FOR ISOLATE ARABIC LIGATURE LAM ALEF;;;;
+FEFC;ARABIC LIGATURE LAM WITH ALEF FINAL FORM;Lo;0;R;<final> 0644 0627;;;;N;GLYPH FOR FINAL ARABIC LIGATURE LAM ALEF;;;;
+FEFF;ZERO WIDTH NO-BREAK SPACE;Zs;0;ON;;;;;N;BYTE ORDER MARK;;;;
+FF01;FULLWIDTH EXCLAMATION MARK;Po;0;ON;<wide> 0021;;;;N;;;;;
+FF02;FULLWIDTH QUOTATION MARK;Po;0;ON;<wide> 0022;;;;N;;;;;
+FF03;FULLWIDTH NUMBER SIGN;So;0;ON;<wide> 0023;;;;N;;;;;
+FF04;FULLWIDTH DOLLAR SIGN;Sc;0;ON;<wide> 0024;;;;N;;;;;
+FF05;FULLWIDTH PERCENT SIGN;Po;0;ON;<wide> 0025;;;;N;;;;;
+FF06;FULLWIDTH AMPERSAND;So;0;ON;<wide> 0026;;;;N;;;;;
+FF07;FULLWIDTH APOSTROPHE;Po;0;ON;<wide> 0027;;;;N;;;;;
+FF08;FULLWIDTH LEFT PARENTHESIS;Ps;0;ON;<wide> 0028;;;;N;FULLWIDTH OPENING PARENTHESIS;;;;
+FF09;FULLWIDTH RIGHT PARENTHESIS;Pe;0;ON;<wide> 0029;;;;N;FULLWIDTH CLOSING PARENTHESIS;;;;
+FF0A;FULLWIDTH ASTERISK;So;0;ON;<wide> 002A;;;;N;;;;;
+FF0B;FULLWIDTH PLUS SIGN;Sm;0;ON;<wide> 002B;;;;N;;;;;
+FF0C;FULLWIDTH COMMA;Po;0;ON;<wide> 002C;;;;N;;;;;
+FF0D;FULLWIDTH HYPHEN-MINUS;Pd;0;ON;<wide> 002D;;;;N;;;;;
+FF0E;FULLWIDTH FULL STOP;Po;0;ON;<wide> 002E;;;;N;FULLWIDTH PERIOD;;;;
+FF0F;FULLWIDTH SOLIDUS;Po;0;ON;<wide> 002F;;;;N;FULLWIDTH SLASH;;;;
+FF10;FULLWIDTH DIGIT ZERO;Nd;0;EN;<wide> 0030;0;0;0;N;;;;;
+FF11;FULLWIDTH DIGIT ONE;Nd;0;EN;<wide> 0031;1;1;1;N;;;;;
+FF12;FULLWIDTH DIGIT TWO;Nd;0;EN;<wide> 0032;2;2;2;N;;;;;
+FF13;FULLWIDTH DIGIT THREE;Nd;0;EN;<wide> 0033;3;3;3;N;;;;;
+FF14;FULLWIDTH DIGIT FOUR;Nd;0;EN;<wide> 0034;4;4;4;N;;;;;
+FF15;FULLWIDTH DIGIT FIVE;Nd;0;EN;<wide> 0035;5;5;5;N;;;;;
+FF16;FULLWIDTH DIGIT SIX;Nd;0;EN;<wide> 0036;6;6;6;N;;;;;
+FF17;FULLWIDTH DIGIT SEVEN;Nd;0;EN;<wide> 0037;7;7;7;N;;;;;
+FF18;FULLWIDTH DIGIT EIGHT;Nd;0;EN;<wide> 0038;8;8;8;N;;;;;
+FF19;FULLWIDTH DIGIT NINE;Nd;0;EN;<wide> 0039;9;9;9;N;;;;;
+FF1A;FULLWIDTH COLON;Po;0;ON;<wide> 003A;;;;N;;;;;
+FF1B;FULLWIDTH SEMICOLON;Po;0;ON;<wide> 003B;;;;N;;;;;
+FF1C;FULLWIDTH LESS-THAN SIGN;Sm;0;ON;<wide> 003C;;;;N;;;;;
+FF1D;FULLWIDTH EQUALS SIGN;Sm;0;ON;<wide> 003D;;;;N;;;;;
+FF1E;FULLWIDTH GREATER-THAN SIGN;Sm;0;ON;<wide> 003E;;;;N;;;;;
+FF1F;FULLWIDTH QUESTION MARK;Po;0;ON;<wide> 003F;;;;N;;;;;
+FF20;FULLWIDTH COMMERCIAL AT;So;0;ON;<wide> 0040;;;;N;;;;;
+FF21;FULLWIDTH LATIN CAPITAL LETTER A;Lu;0;L;<wide> 0041;;;;N;;;;FF41;
+FF22;FULLWIDTH LATIN CAPITAL LETTER B;Lu;0;L;<wide> 0042;;;;N;;;;FF42;
+FF23;FULLWIDTH LATIN CAPITAL LETTER C;Lu;0;L;<wide> 0043;;;;N;;;;FF43;
+FF24;FULLWIDTH LATIN CAPITAL LETTER D;Lu;0;L;<wide> 0044;;;;N;;;;FF44;
+FF25;FULLWIDTH LATIN CAPITAL LETTER E;Lu;0;L;<wide> 0045;;;;N;;;;FF45;
+FF26;FULLWIDTH LATIN CAPITAL LETTER F;Lu;0;L;<wide> 0046;;;;N;;;;FF46;
+FF27;FULLWIDTH LATIN CAPITAL LETTER G;Lu;0;L;<wide> 0047;;;;N;;;;FF47;
+FF28;FULLWIDTH LATIN CAPITAL LETTER H;Lu;0;L;<wide> 0048;;;;N;;;;FF48;
+FF29;FULLWIDTH LATIN CAPITAL LETTER I;Lu;0;L;<wide> 0049;;;;N;;;;FF49;
+FF2A;FULLWIDTH LATIN CAPITAL LETTER J;Lu;0;L;<wide> 004A;;;;N;;;;FF4A;
+FF2B;FULLWIDTH LATIN CAPITAL LETTER K;Lu;0;L;<wide> 004B;;;;N;;;;FF4B;
+FF2C;FULLWIDTH LATIN CAPITAL LETTER L;Lu;0;L;<wide> 004C;;;;N;;;;FF4C;
+FF2D;FULLWIDTH LATIN CAPITAL LETTER M;Lu;0;L;<wide> 004D;;;;N;;;;FF4D;
+FF2E;FULLWIDTH LATIN CAPITAL LETTER N;Lu;0;L;<wide> 004E;;;;N;;;;FF4E;
+FF2F;FULLWIDTH LATIN CAPITAL LETTER O;Lu;0;L;<wide> 004F;;;;N;;;;FF4F;
+FF30;FULLWIDTH LATIN CAPITAL LETTER P;Lu;0;L;<wide> 0050;;;;N;;;;FF50;
+FF31;FULLWIDTH LATIN CAPITAL LETTER Q;Lu;0;L;<wide> 0051;;;;N;;;;FF51;
+FF32;FULLWIDTH LATIN CAPITAL LETTER R;Lu;0;L;<wide> 0052;;;;N;;;;FF52;
+FF33;FULLWIDTH LATIN CAPITAL LETTER S;Lu;0;L;<wide> 0053;;;;N;;;;FF53;
+FF34;FULLWIDTH LATIN CAPITAL LETTER T;Lu;0;L;<wide> 0054;;;;N;;;;FF54;
+FF35;FULLWIDTH LATIN CAPITAL LETTER U;Lu;0;L;<wide> 0055;;;;N;;;;FF55;
+FF36;FULLWIDTH LATIN CAPITAL LETTER V;Lu;0;L;<wide> 0056;;;;N;;;;FF56;
+FF37;FULLWIDTH LATIN CAPITAL LETTER W;Lu;0;L;<wide> 0057;;;;N;;;;FF57;
+FF38;FULLWIDTH LATIN CAPITAL LETTER X;Lu;0;L;<wide> 0058;;;;N;;;;FF58;
+FF39;FULLWIDTH LATIN CAPITAL LETTER Y;Lu;0;L;<wide> 0059;;;;N;;;;FF59;
+FF3A;FULLWIDTH LATIN CAPITAL LETTER Z;Lu;0;L;<wide> 005A;;;;N;;;;FF5A;
+FF3B;FULLWIDTH LEFT SQUARE BRACKET;Ps;0;ON;<wide> 005B;;;;N;FULLWIDTH OPENING SQUARE BRACKET;;;;
+FF3C;FULLWIDTH REVERSE SOLIDUS;Po;0;ON;<wide> 005C;;;;N;FULLWIDTH BACKSLASH;;;;
+FF3D;FULLWIDTH RIGHT SQUARE BRACKET;Pe;0;ON;<wide> 005D;;;;N;FULLWIDTH CLOSING SQUARE BRACKET;;;;
+FF3E;FULLWIDTH CIRCUMFLEX ACCENT;Lm;0;ON;<wide> 005E;;;;N;FULLWIDTH SPACING CIRCUMFLEX;;;;
+FF3F;FULLWIDTH LOW LINE;So;0;ON;<wide> 005F;;;;N;FULLWIDTH SPACING UNDERSCORE;;;;
+FF40;FULLWIDTH GRAVE ACCENT;Lm;0;ON;<wide> 0060;;;;N;FULLWIDTH SPACING GRAVE;;;;
+FF41;FULLWIDTH LATIN SMALL LETTER A;Ll;0;L;<wide> 0061;;;;N;;;FF21;;FF21
+FF42;FULLWIDTH LATIN SMALL LETTER B;Ll;0;L;<wide> 0062;;;;N;;;FF22;;FF22
+FF43;FULLWIDTH LATIN SMALL LETTER C;Ll;0;L;<wide> 0063;;;;N;;;FF23;;FF23
+FF44;FULLWIDTH LATIN SMALL LETTER D;Ll;0;L;<wide> 0064;;;;N;;;FF24;;FF24
+FF45;FULLWIDTH LATIN SMALL LETTER E;Ll;0;L;<wide> 0065;;;;N;;;FF25;;FF25
+FF46;FULLWIDTH LATIN SMALL LETTER F;Ll;0;L;<wide> 0066;;;;N;;;FF26;;FF26
+FF47;FULLWIDTH LATIN SMALL LETTER G;Ll;0;L;<wide> 0067;;;;N;;;FF27;;FF27
+FF48;FULLWIDTH LATIN SMALL LETTER H;Ll;0;L;<wide> 0068;;;;N;;;FF28;;FF28
+FF49;FULLWIDTH LATIN SMALL LETTER I;Ll;0;L;<wide> 0069;;;;N;;;FF29;;FF29
+FF4A;FULLWIDTH LATIN SMALL LETTER J;Ll;0;L;<wide> 006A;;;;N;;;FF2A;;FF2A
+FF4B;FULLWIDTH LATIN SMALL LETTER K;Ll;0;L;<wide> 006B;;;;N;;;FF2B;;FF2B
+FF4C;FULLWIDTH LATIN SMALL LETTER L;Ll;0;L;<wide> 006C;;;;N;;;FF2C;;FF2C
+FF4D;FULLWIDTH LATIN SMALL LETTER M;Ll;0;L;<wide> 006D;;;;N;;;FF2D;;FF2D
+FF4E;FULLWIDTH LATIN SMALL LETTER N;Ll;0;L;<wide> 006E;;;;N;;;FF2E;;FF2E
+FF4F;FULLWIDTH LATIN SMALL LETTER O;Ll;0;L;<wide> 006F;;;;N;;;FF2F;;FF2F
+FF50;FULLWIDTH LATIN SMALL LETTER P;Ll;0;L;<wide> 0070;;;;N;;;FF30;;FF30
+FF51;FULLWIDTH LATIN SMALL LETTER Q;Ll;0;L;<wide> 0071;;;;N;;;FF31;;FF31
+FF52;FULLWIDTH LATIN SMALL LETTER R;Ll;0;L;<wide> 0072;;;;N;;;FF32;;FF32
+FF53;FULLWIDTH LATIN SMALL LETTER S;Ll;0;L;<wide> 0073;;;;N;;;FF33;;FF33
+FF54;FULLWIDTH LATIN SMALL LETTER T;Ll;0;L;<wide> 0074;;;;N;;;FF34;;FF34
+FF55;FULLWIDTH LATIN SMALL LETTER U;Ll;0;L;<wide> 0075;;;;N;;;FF35;;FF35
+FF56;FULLWIDTH LATIN SMALL LETTER V;Ll;0;L;<wide> 0076;;;;N;;;FF36;;FF36
+FF57;FULLWIDTH LATIN SMALL LETTER W;Ll;0;L;<wide> 0077;;;;N;;;FF37;;FF37
+FF58;FULLWIDTH LATIN SMALL LETTER X;Ll;0;L;<wide> 0078;;;;N;;;FF38;;FF38
+FF59;FULLWIDTH LATIN SMALL LETTER Y;Ll;0;L;<wide> 0079;;;;N;;;FF39;;FF39
+FF5A;FULLWIDTH LATIN SMALL LETTER Z;Ll;0;L;<wide> 007A;;;;N;;;FF3A;;FF3A
+FF5B;FULLWIDTH LEFT CURLY BRACKET;Ps;0;ON;<wide> 007B;;;;N;FULLWIDTH OPENING CURLY BRACKET;;;;
+FF5C;FULLWIDTH VERTICAL LINE;So;0;ON;<wide> 007C;;;;N;FULLWIDTH VERTICAL BAR;;;;
+FF5D;FULLWIDTH RIGHT CURLY BRACKET;Pe;0;ON;<wide> 007D;;;;N;FULLWIDTH CLOSING CURLY BRACKET;;;;
+FF5E;FULLWIDTH TILDE;So;0;ON;<wide> 007E;;;;N;FULLWIDTH SPACING TILDE;;;;
+FF61;HALFWIDTH IDEOGRAPHIC FULL STOP;Po;0;ON;<narrow> 3002;;;;N;HALFWIDTH IDEOGRAPHIC PERIOD;;;;
+FF62;HALFWIDTH LEFT CORNER BRACKET;Ps;0;ON;<narrow> 300C;;;;N;HALFWIDTH OPENING CORNER BRACKET;;;;
+FF63;HALFWIDTH RIGHT CORNER BRACKET;Pe;0;ON;<narrow> 300D;;;;N;HALFWIDTH CLOSING CORNER BRACKET;;;;
+FF64;HALFWIDTH IDEOGRAPHIC COMMA;Po;0;ON;<narrow> 3001;;;;N;;;;;
+FF65;HALFWIDTH KATAKANA MIDDLE DOT;Po;0;L;<narrow> 30FB;;;;N;;;;;
+FF66;HALFWIDTH KATAKANA LETTER WO;Lo;0;L;<narrow> 30F2;;;;N;;;;;
+FF67;HALFWIDTH KATAKANA LETTER SMALL A;Lo;0;L;<narrow> 30A1;;;;N;;;;;
+FF68;HALFWIDTH KATAKANA LETTER SMALL I;Lo;0;L;<narrow> 30A3;;;;N;;;;;
+FF69;HALFWIDTH KATAKANA LETTER SMALL U;Lo;0;L;<narrow> 30A5;;;;N;;;;;
+FF6A;HALFWIDTH KATAKANA LETTER SMALL E;Lo;0;L;<narrow> 30A7;;;;N;;;;;
+FF6B;HALFWIDTH KATAKANA LETTER SMALL O;Lo;0;L;<narrow> 30A9;;;;N;;;;;
+FF6C;HALFWIDTH KATAKANA LETTER SMALL YA;Lo;0;L;<narrow> 30E3;;;;N;;;;;
+FF6D;HALFWIDTH KATAKANA LETTER SMALL YU;Lo;0;L;<narrow> 30E5;;;;N;;;;;
+FF6E;HALFWIDTH KATAKANA LETTER SMALL YO;Lo;0;L;<narrow> 30E7;;;;N;;;;;
+FF6F;HALFWIDTH KATAKANA LETTER SMALL TU;Lo;0;L;<narrow> 30C3;;;;N;;;;;
+FF70;HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK;Lm;0;L;<narrow> 30FC;;;;N;;;;;
+FF71;HALFWIDTH KATAKANA LETTER A;Lo;0;L;<narrow> 30A2;;;;N;;;;;
+FF72;HALFWIDTH KATAKANA LETTER I;Lo;0;L;<narrow> 30A4;;;;N;;;;;
+FF73;HALFWIDTH KATAKANA LETTER U;Lo;0;L;<narrow> 30A6;;;;N;;;;;
+FF74;HALFWIDTH KATAKANA LETTER E;Lo;0;L;<narrow> 30A8;;;;N;;;;;
+FF75;HALFWIDTH KATAKANA LETTER O;Lo;0;L;<narrow> 30AA;;;;N;;;;;
+FF76;HALFWIDTH KATAKANA LETTER KA;Lo;0;L;<narrow> 30AB;;;;N;;;;;
+FF77;HALFWIDTH KATAKANA LETTER KI;Lo;0;L;<narrow> 30AD;;;;N;;;;;
+FF78;HALFWIDTH KATAKANA LETTER KU;Lo;0;L;<narrow> 30AF;;;;N;;;;;
+FF79;HALFWIDTH KATAKANA LETTER KE;Lo;0;L;<narrow> 30B1;;;;N;;;;;
+FF7A;HALFWIDTH KATAKANA LETTER KO;Lo;0;L;<narrow> 30B3;;;;N;;;;;
+FF7B;HALFWIDTH KATAKANA LETTER SA;Lo;0;L;<narrow> 30B5;;;;N;;;;;
+FF7C;HALFWIDTH KATAKANA LETTER SI;Lo;0;L;<narrow> 30B7;;;;N;;;;;
+FF7D;HALFWIDTH KATAKANA LETTER SU;Lo;0;L;<narrow> 30B9;;;;N;;;;;
+FF7E;HALFWIDTH KATAKANA LETTER SE;Lo;0;L;<narrow> 30BB;;;;N;;;;;
+FF7F;HALFWIDTH KATAKANA LETTER SO;Lo;0;L;<narrow> 30BD;;;;N;;;;;
+FF80;HALFWIDTH KATAKANA LETTER TA;Lo;0;L;<narrow> 30BF;;;;N;;;;;
+FF81;HALFWIDTH KATAKANA LETTER TI;Lo;0;L;<narrow> 30C1;;;;N;;;;;
+FF82;HALFWIDTH KATAKANA LETTER TU;Lo;0;L;<narrow> 30C4;;;;N;;;;;
+FF83;HALFWIDTH KATAKANA LETTER TE;Lo;0;L;<narrow> 30C6;;;;N;;;;;
+FF84;HALFWIDTH KATAKANA LETTER TO;Lo;0;L;<narrow> 30C8;;;;N;;;;;
+FF85;HALFWIDTH KATAKANA LETTER NA;Lo;0;L;<narrow> 30CA;;;;N;;;;;
+FF86;HALFWIDTH KATAKANA LETTER NI;Lo;0;L;<narrow> 30CB;;;;N;;;;;
+FF87;HALFWIDTH KATAKANA LETTER NU;Lo;0;L;<narrow> 30CC;;;;N;;;;;
+FF88;HALFWIDTH KATAKANA LETTER NE;Lo;0;L;<narrow> 30CD;;;;N;;;;;
+FF89;HALFWIDTH KATAKANA LETTER NO;Lo;0;L;<narrow> 30CE;;;;N;;;;;
+FF8A;HALFWIDTH KATAKANA LETTER HA;Lo;0;L;<narrow> 30CF;;;;N;;;;;
+FF8B;HALFWIDTH KATAKANA LETTER HI;Lo;0;L;<narrow> 30D2;;;;N;;;;;
+FF8C;HALFWIDTH KATAKANA LETTER HU;Lo;0;L;<narrow> 30D5;;;;N;;;;;
+FF8D;HALFWIDTH KATAKANA LETTER HE;Lo;0;L;<narrow> 30D8;;;;N;;;;;
+FF8E;HALFWIDTH KATAKANA LETTER HO;Lo;0;L;<narrow> 30DB;;;;N;;;;;
+FF8F;HALFWIDTH KATAKANA LETTER MA;Lo;0;L;<narrow> 30DE;;;;N;;;;;
+FF90;HALFWIDTH KATAKANA LETTER MI;Lo;0;L;<narrow> 30DF;;;;N;;;;;
+FF91;HALFWIDTH KATAKANA LETTER MU;Lo;0;L;<narrow> 30E0;;;;N;;;;;
+FF92;HALFWIDTH KATAKANA LETTER ME;Lo;0;L;<narrow> 30E1;;;;N;;;;;
+FF93;HALFWIDTH KATAKANA LETTER MO;Lo;0;L;<narrow> 30E2;;;;N;;;;;
+FF94;HALFWIDTH KATAKANA LETTER YA;Lo;0;L;<narrow> 30E4;;;;N;;;;;
+FF95;HALFWIDTH KATAKANA LETTER YU;Lo;0;L;<narrow> 30E6;;;;N;;;;;
+FF96;HALFWIDTH KATAKANA LETTER YO;Lo;0;L;<narrow> 30E8;;;;N;;;;;
+FF97;HALFWIDTH KATAKANA LETTER RA;Lo;0;L;<narrow> 30E9;;;;N;;;;;
+FF98;HALFWIDTH KATAKANA LETTER RI;Lo;0;L;<narrow> 30EA;;;;N;;;;;
+FF99;HALFWIDTH KATAKANA LETTER RU;Lo;0;L;<narrow> 30EB;;;;N;;;;;
+FF9A;HALFWIDTH KATAKANA LETTER RE;Lo;0;L;<narrow> 30EC;;;;N;;;;;
+FF9B;HALFWIDTH KATAKANA LETTER RO;Lo;0;L;<narrow> 30ED;;;;N;;;;;
+FF9C;HALFWIDTH KATAKANA LETTER WA;Lo;0;L;<narrow> 30EF;;;;N;;;;;
+FF9D;HALFWIDTH KATAKANA LETTER N;Lo;0;L;<narrow> 30F3;;;;N;;;;;
+FF9E;HALFWIDTH KATAKANA VOICED SOUND MARK;Lm;0;L;<narrow> 309B;;;;N;;;;;
+FF9F;HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK;Lm;0;L;<narrow> 309C;;;;N;;;;;
+FFA0;HALFWIDTH HANGUL FILLER;Lo;0;L;<narrow> 3164;;;;N;HALFWIDTH HANGUL CAE OM;;;;
+FFA1;HALFWIDTH HANGUL LETTER KIYEOK;Lo;0;L;<narrow> 3131;;;;N;HALFWIDTH HANGUL LETTER GIYEOG;;;;
+FFA2;HALFWIDTH HANGUL LETTER SSANGKIYEOK;Lo;0;L;<narrow> 3132;;;;N;HALFWIDTH HANGUL LETTER SSANG GIYEOG;;;;
+FFA3;HALFWIDTH HANGUL LETTER KIYEOK-SIOS;Lo;0;L;<narrow> 3133;;;;N;HALFWIDTH HANGUL LETTER GIYEOG SIOS;;;;
+FFA4;HALFWIDTH HANGUL LETTER NIEUN;Lo;0;L;<narrow> 3134;;;;N;;;;;
+FFA5;HALFWIDTH HANGUL LETTER NIEUN-CIEUC;Lo;0;L;<narrow> 3135;;;;N;HALFWIDTH HANGUL LETTER NIEUN JIEUJ;;;;
+FFA6;HALFWIDTH HANGUL LETTER NIEUN-HIEUH;Lo;0;L;<narrow> 3136;;;;N;HALFWIDTH HANGUL LETTER NIEUN HIEUH;;;;
+FFA7;HALFWIDTH HANGUL LETTER TIKEUT;Lo;0;L;<narrow> 3137;;;;N;HALFWIDTH HANGUL LETTER DIGEUD;;;;
+FFA8;HALFWIDTH HANGUL LETTER SSANGTIKEUT;Lo;0;L;<narrow> 3138;;;;N;HALFWIDTH HANGUL LETTER SSANG DIGEUD;;;;
+FFA9;HALFWIDTH HANGUL LETTER RIEUL;Lo;0;L;<narrow> 3139;;;;N;HALFWIDTH HANGUL LETTER LIEUL;;;;
+FFAA;HALFWIDTH HANGUL LETTER RIEUL-KIYEOK;Lo;0;L;<narrow> 313A;;;;N;HALFWIDTH HANGUL LETTER LIEUL GIYEOG;;;;
+FFAB;HALFWIDTH HANGUL LETTER RIEUL-MIEUM;Lo;0;L;<narrow> 313B;;;;N;HALFWIDTH HANGUL LETTER LIEUL MIEUM;;;;
+FFAC;HALFWIDTH HANGUL LETTER RIEUL-PIEUP;Lo;0;L;<narrow> 313C;;;;N;HALFWIDTH HANGUL LETTER LIEUL BIEUB;;;;
+FFAD;HALFWIDTH HANGUL LETTER RIEUL-SIOS;Lo;0;L;<narrow> 313D;;;;N;HALFWIDTH HANGUL LETTER LIEUL SIOS;;;;
+FFAE;HALFWIDTH HANGUL LETTER RIEUL-THIEUTH;Lo;0;L;<narrow> 313E;;;;N;HALFWIDTH HANGUL LETTER LIEUL TIEUT;;;;
+FFAF;HALFWIDTH HANGUL LETTER RIEUL-PHIEUPH;Lo;0;L;<narrow> 313F;;;;N;HALFWIDTH HANGUL LETTER LIEUL PIEUP;;;;
+FFB0;HALFWIDTH HANGUL LETTER RIEUL-HIEUH;Lo;0;L;<narrow> 3140;;;;N;HALFWIDTH HANGUL LETTER LIEUL HIEUH;;;;
+FFB1;HALFWIDTH HANGUL LETTER MIEUM;Lo;0;L;<narrow> 3141;;;;N;;;;;
+FFB2;HALFWIDTH HANGUL LETTER PIEUP;Lo;0;L;<narrow> 3142;;;;N;HALFWIDTH HANGUL LETTER BIEUB;;;;
+FFB3;HALFWIDTH HANGUL LETTER SSANGPIEUP;Lo;0;L;<narrow> 3143;;;;N;HALFWIDTH HANGUL LETTER SSANG BIEUB;;;;
+FFB4;HALFWIDTH HANGUL LETTER PIEUP-SIOS;Lo;0;L;<narrow> 3144;;;;N;HALFWIDTH HANGUL LETTER BIEUB SIOS;;;;
+FFB5;HALFWIDTH HANGUL LETTER SIOS;Lo;0;L;<narrow> 3145;;;;N;;;;;
+FFB6;HALFWIDTH HANGUL LETTER SSANGSIOS;Lo;0;L;<narrow> 3146;;;;N;HALFWIDTH HANGUL LETTER SSANG SIOS;;;;
+FFB7;HALFWIDTH HANGUL LETTER IEUNG;Lo;0;L;<narrow> 3147;;;;N;;;;;
+FFB8;HALFWIDTH HANGUL LETTER CIEUC;Lo;0;L;<narrow> 3148;;;;N;HALFWIDTH HANGUL LETTER JIEUJ;;;;
+FFB9;HALFWIDTH HANGUL LETTER SSANGCIEUC;Lo;0;L;<narrow> 3149;;;;N;HALFWIDTH HANGUL LETTER SSANG JIEUJ;;;;
+FFBA;HALFWIDTH HANGUL LETTER CHIEUCH;Lo;0;L;<narrow> 314A;;;;N;HALFWIDTH HANGUL LETTER CIEUC;;;;
+FFBB;HALFWIDTH HANGUL LETTER KHIEUKH;Lo;0;L;<narrow> 314B;;;;N;HALFWIDTH HANGUL LETTER KIYEOK;;;;
+FFBC;HALFWIDTH HANGUL LETTER THIEUTH;Lo;0;L;<narrow> 314C;;;;N;HALFWIDTH HANGUL LETTER TIEUT;;;;
+FFBD;HALFWIDTH HANGUL LETTER PHIEUPH;Lo;0;L;<narrow> 314D;;;;N;HALFWIDTH HANGUL LETTER PIEUP;;;;
+FFBE;HALFWIDTH HANGUL LETTER HIEUH;Lo;0;L;<narrow> 314E;;;;N;;;;;
+FFC2;HALFWIDTH HANGUL LETTER A;Lo;0;L;<narrow> 314F;;;;N;;;;;
+FFC3;HALFWIDTH HANGUL LETTER AE;Lo;0;L;<narrow> 3150;;;;N;;;;;
+FFC4;HALFWIDTH HANGUL LETTER YA;Lo;0;L;<narrow> 3151;;;;N;;;;;
+FFC5;HALFWIDTH HANGUL LETTER YAE;Lo;0;L;<narrow> 3152;;;;N;;;;;
+FFC6;HALFWIDTH HANGUL LETTER EO;Lo;0;L;<narrow> 3153;;;;N;;;;;
+FFC7;HALFWIDTH HANGUL LETTER E;Lo;0;L;<narrow> 3154;;;;N;;;;;
+FFCA;HALFWIDTH HANGUL LETTER YEO;Lo;0;L;<narrow> 3155;;;;N;;;;;
+FFCB;HALFWIDTH HANGUL LETTER YE;Lo;0;L;<narrow> 3156;;;;N;;;;;
+FFCC;HALFWIDTH HANGUL LETTER O;Lo;0;L;<narrow> 3157;;;;N;;;;;
+FFCD;HALFWIDTH HANGUL LETTER WA;Lo;0;L;<narrow> 3158;;;;N;;;;;
+FFCE;HALFWIDTH HANGUL LETTER WAE;Lo;0;L;<narrow> 3159;;;;N;;;;;
+FFCF;HALFWIDTH HANGUL LETTER OE;Lo;0;L;<narrow> 315A;;;;N;;;;;
+FFD2;HALFWIDTH HANGUL LETTER YO;Lo;0;L;<narrow> 315B;;;;N;;;;;
+FFD3;HALFWIDTH HANGUL LETTER U;Lo;0;L;<narrow> 315C;;;;N;;;;;
+FFD4;HALFWIDTH HANGUL LETTER WEO;Lo;0;L;<narrow> 315D;;;;N;;;;;
+FFD5;HALFWIDTH HANGUL LETTER WE;Lo;0;L;<narrow> 315E;;;;N;;;;;
+FFD6;HALFWIDTH HANGUL LETTER WI;Lo;0;L;<narrow> 315F;;;;N;;;;;
+FFD7;HALFWIDTH HANGUL LETTER YU;Lo;0;L;<narrow> 3160;;;;N;;;;;
+FFDA;HALFWIDTH HANGUL LETTER EU;Lo;0;L;<narrow> 3161;;;;N;;;;;
+FFDB;HALFWIDTH HANGUL LETTER YI;Lo;0;L;<narrow> 3162;;;;N;;;;;
+FFDC;HALFWIDTH HANGUL LETTER I;Lo;0;L;<narrow> 3163;;;;N;;;;;
+FFE0;FULLWIDTH CENT SIGN;Sc;0;ON;<wide> 00A2;;;;N;;;;;
+FFE1;FULLWIDTH POUND SIGN;Sc;0;ON;<wide> 00A3;;;;N;;;;;
+FFE2;FULLWIDTH NOT SIGN;Sm;0;ON;<wide> 00AC;;;;N;;;;;
+FFE3;FULLWIDTH MACRON;Lm;0;ON;<wide> 00AF;;;;N;FULLWIDTH SPACING MACRON;;;;
+FFE4;FULLWIDTH BROKEN BAR;So;0;ON;<wide> 00A6;;;;N;FULLWIDTH BROKEN VERTICAL BAR;;;;
+FFE5;FULLWIDTH YEN SIGN;Sc;0;ON;<wide> 00A5;;;;N;;;;;
+FFE6;FULLWIDTH WON SIGN;Sc;0;ON;<wide> 20A9;;;;N;;;;;
+FFE8;HALFWIDTH FORMS LIGHT VERTICAL;So;0;ON;<narrow> 2502;;;;N;;;;;
+FFE9;HALFWIDTH LEFTWARDS ARROW;So;0;ON;<narrow> 2190;;;;N;;;;;
+FFEA;HALFWIDTH UPWARDS ARROW;So;0;ON;<narrow> 2191;;;;N;;;;;
+FFEB;HALFWIDTH RIGHTWARDS ARROW;So;0;ON;<narrow> 2192;;;;N;;;;;
+FFEC;HALFWIDTH DOWNWARDS ARROW;So;0;ON;<narrow> 2193;;;;N;;;;;
+FFED;HALFWIDTH BLACK SQUARE;So;0;ON;<narrow> 25A0;;;;N;;;;;
+FFEE;HALFWIDTH WHITE CIRCLE;So;0;ON;<narrow> 25CB;;;;N;;;;;
+FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unifix.txt
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unifix.txt?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unifix.txt (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/unifix.txt Sat Aug 26 02:00:13 2006
@@ -1,0 +1,234 @@
+# Modifications to Unicode data for better case-insensitive searching
+
+# unicode char;char name;general category;canonical combining class;
+# bidirectional category; character decomp; decimal digit value;
+# digit value; numeric value; mirrored char; unicode 1.0 name;
+# comment; upper case equiv; lower case equiv
+
+# Make these whitespace, so they're ignored
+0009;<control>;Zs;0;ON;;;;;N;HORIZONTAL TABULATION;;;;
+000A;<control>;Zs;0;ON;;;;;N;LINE FEED;;;;
+000B;<control>;Zs;0;ON;;;;;N;VERTICAL TABULATION;;;;
+000C;<control>;Zs;0;ON;;;;;N;FORM FEED;;;;
+000D;<control>;Zs;0;ON;;;;;N;CARRIAGE RETURN;;;;
+
+# Map s-zet to "ss"
+00DF;LATIN SMALL LETTER SHARP S;Ll;0;L;0073 0073;;;;N;;German;;;
+
+# Map ae to "ae"
+00E6;LATIN SMALL LETTER AE;Ll;0;L;0061 0065;;;;N;LATIN SMALL LETTER A E;;00C6;;00C6
+
+# Map Eth and Thorn to "th"
+00F0;LATIN SMALL LETTER ETH;Ll;0;L;0074 0068;;;;N;;Icelandic;00D0;;00D0
+00FE;LATIN SMALL LETTER THORN;Ll;0;L;0074 0068;;;;N;;Icelandic;00DE;;00DE
+
+# Map oe ligature to "oe"
+0153;LATIN SMALL LIGATURE OE;Ll;0;L;006F 0065;;;;N;LATIN SMALL LETTER O E;;0152;;0152
+
+# Ignore combining diacritical marks
+0300;Combining Diacritical Mark;Zs;
+0301;Combining Diacritical Mark;Zs;
+0302;Combining Diacritical Mark;Zs;
+0303;Combining Diacritical Mark;Zs;
+0304;Combining Diacritical Mark;Zs;
+0305;Combining Diacritical Mark;Zs;
+0306;Combining Diacritical Mark;Zs;
+0307;Combining Diacritical Mark;Zs;
+0308;Combining Diacritical Mark;Zs;
+0309;Combining Diacritical Mark;Zs;
+030a;Combining Diacritical Mark;Zs;
+030b;Combining Diacritical Mark;Zs;
+030c;Combining Diacritical Mark;Zs;
+030d;Combining Diacritical Mark;Zs;
+030e;Combining Diacritical Mark;Zs;
+030f;Combining Diacritical Mark;Zs;
+0310;Combining Diacritical Mark;Zs;
+0311;Combining Diacritical Mark;Zs;
+0312;Combining Diacritical Mark;Zs;
+0313;Combining Diacritical Mark;Zs;
+0314;Combining Diacritical Mark;Zs;
+0315;Combining Diacritical Mark;Zs;
+0316;Combining Diacritical Mark;Zs;
+0317;Combining Diacritical Mark;Zs;
+0318;Combining Diacritical Mark;Zs;
+0319;Combining Diacritical Mark;Zs;
+031a;Combining Diacritical Mark;Zs;
+031b;Combining Diacritical Mark;Zs;
+031c;Combining Diacritical Mark;Zs;
+031d;Combining Diacritical Mark;Zs;
+031e;Combining Diacritical Mark;Zs;
+031f;Combining Diacritical Mark;Zs;
+0320;Combining Diacritical Mark;Zs;
+0321;Combining Diacritical Mark;Zs;
+0322;Combining Diacritical Mark;Zs;
+0323;Combining Diacritical Mark;Zs;
+0324;Combining Diacritical Mark;Zs;
+0325;Combining Diacritical Mark;Zs;
+0326;Combining Diacritical Mark;Zs;
+0327;Combining Diacritical Mark;Zs;
+0328;Combining Diacritical Mark;Zs;
+0329;Combining Diacritical Mark;Zs;
+032a;Combining Diacritical Mark;Zs;
+032b;Combining Diacritical Mark;Zs;
+032c;Combining Diacritical Mark;Zs;
+032d;Combining Diacritical Mark;Zs;
+032e;Combining Diacritical Mark;Zs;
+032f;Combining Diacritical Mark;Zs;
+0330;Combining Diacritical Mark;Zs;
+0331;Combining Diacritical Mark;Zs;
+0332;Combining Diacritical Mark;Zs;
+0333;Combining Diacritical Mark;Zs;
+0334;Combining Diacritical Mark;Zs;
+0335;Combining Diacritical Mark;Zs;
+0336;Combining Diacritical Mark;Zs;
+0337;Combining Diacritical Mark;Zs;
+0338;Combining Diacritical Mark;Zs;
+0339;Combining Diacritical Mark;Zs;
+033a;Combining Diacritical Mark;Zs;
+033b;Combining Diacritical Mark;Zs;
+033c;Combining Diacritical Mark;Zs;
+033d;Combining Diacritical Mark;Zs;
+033e;Combining Diacritical Mark;Zs;
+033f;Combining Diacritical Mark;Zs;
+0340;Combining Diacritical Mark;Zs;
+0341;Combining Diacritical Mark;Zs;
+0342;Combining Diacritical Mark;Zs;
+0343;Combining Diacritical Mark;Zs;
+0344;Combining Diacritical Mark;Zs;
+0345;Combining Diacritical Mark;Zs;
+0346;Combining Diacritical Mark;Zs;
+0347;Combining Diacritical Mark;Zs;
+0348;Combining Diacritical Mark;Zs;
+0349;Combining Diacritical Mark;Zs;
+034a;Combining Diacritical Mark;Zs;
+034b;Combining Diacritical Mark;Zs;
+034c;Combining Diacritical Mark;Zs;
+034d;Combining Diacritical Mark;Zs;
+034e;Combining Diacritical Mark;Zs;
+034f;Combining Diacritical Mark;Zs;
+0350;Combining Diacritical Mark;Zs;
+0351;Combining Diacritical Mark;Zs;
+0352;Combining Diacritical Mark;Zs;
+0353;Combining Diacritical Mark;Zs;
+0354;Combining Diacritical Mark;Zs;
+0355;Combining Diacritical Mark;Zs;
+0356;Combining Diacritical Mark;Zs;
+0357;Combining Diacritical Mark;Zs;
+0358;Combining Diacritical Mark;Zs;
+0359;Combining Diacritical Mark;Zs;
+035a;Combining Diacritical Mark;Zs;
+035b;Combining Diacritical Mark;Zs;
+035c;Combining Diacritical Mark;Zs;
+035d;Combining Diacritical Mark;Zs;
+035e;Combining Diacritical Mark;Zs;
+035f;Combining Diacritical Mark;Zs;
+0360;Combining Diacritical Mark;Zs;
+0361;Combining Diacritical Mark;Zs;
+0362;Combining Diacritical Mark;Zs;
+0363;Combining Diacritical Mark;Zs;
+0364;Combining Diacritical Mark;Zs;
+0365;Combining Diacritical Mark;Zs;
+0366;Combining Diacritical Mark;Zs;
+0367;Combining Diacritical Mark;Zs;
+0368;Combining Diacritical Mark;Zs;
+0369;Combining Diacritical Mark;Zs;
+036a;Combining Diacritical Mark;Zs;
+036b;Combining Diacritical Mark;Zs;
+036c;Combining Diacritical Mark;Zs;
+036d;Combining Diacritical Mark;Zs;
+036e;Combining Diacritical Mark;Zs;
+036f;Combining Diacritical Mark;Zs;
+0370;Combining Diacritical Mark;Zs;
+0371;Combining Diacritical Mark;Zs;
+0372;Combining Diacritical Mark;Zs;
+0373;Combining Diacritical Mark;Zs;
+0374;Combining Diacritical Mark;Zs;
+0375;Combining Diacritical Mark;Zs;
+0376;Combining Diacritical Mark;Zs;
+0377;Combining Diacritical Mark;Zs;
+0378;Combining Diacritical Mark;Zs;
+0379;Combining Diacritical Mark;Zs;
+037a;Combining Diacritical Mark;Zs;
+037b;Combining Diacritical Mark;Zs;
+037c;Combining Diacritical Mark;Zs;
+037d;Combining Diacritical Mark;Zs;
+037e;Combining Diacritical Mark;Zs;
+037f;Combining Diacritical Mark;Zs;
+0380;Combining Diacritical Mark;Zs;
+0381;Combining Diacritical Mark;Zs;
+0382;Combining Diacritical Mark;Zs;
+0383;Combining Diacritical Mark;Zs;
+0384;Combining Diacritical Mark;Zs;
+0385;Combining Diacritical Mark;Zs;
+0387;Combining Diacritical Mark;Zs;
+038b;Combining Diacritical Mark;Zs;
+038d;Combining Diacritical Mark;Zs;
+03a2;Combining Diacritical Mark;Zs;
+03cf;Combining Diacritical Mark;Zs;
+03d0;Combining Diacritical Mark;Zs;
+03d1;Combining Diacritical Mark;Zs;
+03d2;Combining Diacritical Mark;Zs;
+03d3;Combining Diacritical Mark;Zs;
+03d4;Combining Diacritical Mark;Zs;
+03d5;Combining Diacritical Mark;Zs;
+03d6;Combining Diacritical Mark;Zs;
+03d7;Combining Diacritical Mark;Zs;
+03d8;Combining Diacritical Mark;Zs;
+03d9;Combining Diacritical Mark;Zs;
+03da;Combining Diacritical Mark;Zs;
+03db;Combining Diacritical Mark;Zs;
+03dc;Combining Diacritical Mark;Zs;
+03dd;Combining Diacritical Mark;Zs;
+03de;Combining Diacritical Mark;Zs;
+03df;Combining Diacritical Mark;Zs;
+03e0;Combining Diacritical Mark;Zs;
+03e1;Combining Diacritical Mark;Zs;
+03e2;Combining Diacritical Mark;Zs;
+03e3;Combining Diacritical Mark;Zs;
+03e4;Combining Diacritical Mark;Zs;
+03e5;Combining Diacritical Mark;Zs;
+03e6;Combining Diacritical Mark;Zs;
+03e7;Combining Diacritical Mark;Zs;
+03e8;Combining Diacritical Mark;Zs;
+03e9;Combining Diacritical Mark;Zs;
+03ea;Combining Diacritical Mark;Zs;
+03eb;Combining Diacritical Mark;Zs;
+03ec;Combining Diacritical Mark;Zs;
+03ed;Combining Diacritical Mark;Zs;
+03ee;Combining Diacritical Mark;Zs;
+03ef;Combining Diacritical Mark;Zs;
+03f0;Combining Diacritical Mark;Zs;
+03f1;Combining Diacritical Mark;Zs;
+03f2;Combining Diacritical Mark;Zs;
+03f3;Combining Diacritical Mark;Zs;
+03f4;Combining Diacritical Mark;Zs;
+03f5;Combining Diacritical Mark;Zs;
+03f6;Combining Diacritical Mark;Zs;
+03f7;Combining Diacritical Mark;Zs;
+03f8;Combining Diacritical Mark;Zs;
+03f9;Combining Diacritical Mark;Zs;
+03fa;Combining Diacritical Mark;Zs;
+03fb;Combining Diacritical Mark;Zs;
+03fc;Combining Diacritical Mark;Zs;
+03fd;Combining Diacritical Mark;Zs;
+03fe;Combining Diacritical Mark;Zs;
+03ff;Combining Diacritical Mark;Zs;
+
+
+# Map Cyrillic ligatures
+04A5;CYRILLIC SMALL LIGATURE EN GHE;Ll;0;L;041D 0413;;;;N;CYRILLIC SMALL LETTER EN GE;;04A4;;04A4
+04B5;CYRILLIC SMALL LIGATURE TE TSE;Ll;0;L;0422 0426;;;;N;CYRILLIC SMALL LETTER TE TSE;Abkhasian;04B4;;04B4
+
+# Don't bother expanding Hebrew ligatures
+#05F0;HEBREW LIGATURE YIDDISH DOUBLE VAV;Lo;0;R;;;;;N;HEBREW LETTER DOUBLE VAV;;;;
+#05F1;HEBREW LIGATURE YIDDISH VAV YOD;Lo;0;R;;;;;N;HEBREW LETTER VAV YOD;;;;
+#05F2;HEBREW LIGATURE YIDDISH DOUBLE YOD;Lo;0;R;;;;;N;HEBREW LETTER DOUBLE YOD;;;;
+
+# Map fraction slash to "/"
+2044;FRACTION SLASH;Sm;0;ON;002F;;;;N;;;;;
+
+# Don't bother expanding Arabic ligatures
+#FBF9;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM;Lo;0;R;;;;;N;;;;;
+#FBFA;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM;Lo;0;R;;;;;N;;;;;
+#FBFB;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM;Lo;0;R;;;;;N;;;;;
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/us-ascii.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/us-ascii.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/us-ascii.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/us-ascii.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,275 @@
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 ???? EMPTY
+81 ???? EMPTY
+82 ???? EMPTY
+83 ???? EMPTY
+84 ???? EMPTY
+85 ???? EMPTY
+86 ???? EMPTY
+87 ???? EMPTY
+88 ???? EMPTY
+89 ???? EMPTY
+8A ???? EMPTY
+8B ???? EMPTY
+8C ???? EMPTY
+8D ???? EMPTY
+8E ???? EMPTY
+8F ???? EMPTY
+90 ???? EMPTY
+91 ???? EMPTY
+92 ???? EMPTY
+93 ???? EMPTY
+94 ???? EMPTY
+95 ???? EMPTY
+96 ???? EMPTY
+97 ???? EMPTY
+98 ???? EMPTY
+99 ???? EMPTY
+9A ???? EMPTY
+9B ???? EMPTY
+9C ???? EMPTY
+9D ???? EMPTY
+9E ???? EMPTY
+9F ???? EMPTY
+A0 ???? EMPTY
+A1 ???? EMPTY
+A2 ???? EMPTY
+A3 ???? EMPTY
+A4 ???? EMPTY
+A5 ???? EMPTY
+A6 ???? EMPTY
+A7 ???? EMPTY
+A8 ???? EMPTY
+A9 ???? EMPTY
+AA ???? EMPTY
+AB ???? EMPTY
+AC ???? EMPTY
+AD ???? EMPTY
+AE ???? EMPTY
+AF ???? EMPTY
+B0 ???? EMPTY
+B1 ???? EMPTY
+B2 ???? EMPTY
+B3 ???? EMPTY
+B4 ???? EMPTY
+B5 ???? EMPTY
+B6 ???? EMPTY
+B7 ???? EMPTY
+B8 ???? EMPTY
+B9 ???? EMPTY
+BA ???? EMPTY
+BB ???? EMPTY
+BC ???? EMPTY
+BD ???? EMPTY
+BE ???? EMPTY
+BF ???? EMPTY
+C0 ???? EMPTY
+C1 ???? EMPTY
+C2 ???? EMPTY
+C3 ???? EMPTY
+C4 ???? EMPTY
+C5 ???? EMPTY
+C6 ???? EMPTY
+C7 ???? EMPTY
+C8 ???? EMPTY
+C9 ???? EMPTY
+CA ???? EMPTY
+CB ???? EMPTY
+CC ???? EMPTY
+CD ???? EMPTY
+CE ???? EMPTY
+CF ???? EMPTY
+D0 ???? EMPTY
+D1 ???? EMPTY
+D2 ???? EMPTY
+D3 ???? EMPTY
+D4 ???? EMPTY
+D5 ???? EMPTY
+D6 ???? EMPTY
+D7 ???? EMPTY
+D8 ???? EMPTY
+D9 ???? EMPTY
+DA ???? EMPTY
+DB ???? EMPTY
+DC ???? EMPTY
+DD ???? EMPTY
+DE ???? EMPTY
+DF ???? EMPTY
+E0 ???? EMPTY
+E1 ???? EMPTY
+E2 ???? EMPTY
+E3 ???? EMPTY
+E4 ???? EMPTY
+E5 ???? EMPTY
+E6 ???? EMPTY
+E7 ???? EMPTY
+E8 ???? EMPTY
+E9 ???? EMPTY
+EA ???? EMPTY
+EB ???? EMPTY
+EC ???? EMPTY
+ED ???? EMPTY
+EE ???? EMPTY
+EF ???? EMPTY
+F0 ???? EMPTY
+F1 ???? EMPTY
+F2 ???? EMPTY
+F3 ???? EMPTY
+F4 ???? EMPTY
+F5 ???? EMPTY
+F6 ???? EMPTY
+F7 ???? EMPTY
+F8 ???? EMPTY
+F9 ???? EMPTY
+FA ???? EMPTY
+FB ???? EMPTY
+FC ???? EMPTY
+FD ???? EMPTY
+FE ???? EMPTY
+FF ???? EMPTY
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1252.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1252.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1252.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1252.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,278 @@
+# Copyright 2002 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+#
+# Charset put together by Ewald Dieterich <ewald.dieterich at fun.de>
+# Reference: http://www.microsoft.com/globaldev/reference/sbcs/1252.htm
+ 0 0000 NULL (NUL)
+ 1 0001 START OF HEADING (SOH)
+ 2 0002 START OF TEXT (STX)
+ 3 0003 END OF TEXT (ETX)
+ 4 0004 END OF TRANSMISSION (EOT)
+ 5 0005 ENQUIRY (ENQ)
+ 6 0006 ACKNOWLEDGE (ACK)
+ 7 0007 BELL (BEL)
+ 8 0008 BACKSPACE (BS)
+ 9 0009 CHARACTER TABULATION (HT)
+ A 000a LINE FEED (LF)
+ B 000b LINE TABULATION (VT)
+ C 000c FORM FEED (FF)
+ D 000d CARRIAGE RETURN (CR)
+ E 000e SHIFT OUT (SO)
+ F 000f SHIFT IN (SI)
+10 0010 DATALINK ESCAPE (DLE)
+11 0011 DEVICE CONTROL ONE (DC1)
+12 0012 DEVICE CONTROL TWO (DC2)
+13 0013 DEVICE CONTROL THREE (DC3)
+14 0014 DEVICE CONTROL FOUR (DC4)
+15 0015 NEGATIVE ACKNOWLEDGE (NAK)
+16 0016 SYNCRONOUS IDLE (SYN)
+17 0017 END OF TRANSMISSION BLOCK (ETB)
+18 0018 CANCEL (CAN)
+19 0019 END OF MEDIUM (EM)
+1A 001a SUBSTITUTE (SUB)
+1B 001b ESCAPE (ESC)
+1C 001c FILE SEPARATOR (IS4)
+1D 001d GROUP SEPARATOR (IS3)
+1E 001e RECORD SEPARATOR (IS2)
+1F 001f UNIT SEPARATOR (IS1)
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002a ASTERISK
+2B 002b PLUS SIGN
+2C 002c COMMA
+2D 002d HYPHEN-MINUS
+2E 002e FULL STOP
+2F 002f SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003a COLON
+3B 003b SEMICOLON
+3C 003c LESS-THAN SIGN
+3D 003d EQUALS SIGN
+3E 003e GREATER-THAN SIGN
+3F 003f QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004a LATIN CAPITAL LETTER J
+4B 004b LATIN CAPITAL LETTER K
+4C 004c LATIN CAPITAL LETTER L
+4D 004d LATIN CAPITAL LETTER M
+4E 004e LATIN CAPITAL LETTER N
+4F 004f LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005a LATIN CAPITAL LETTER Z
+5B 005b LEFT SQUARE BRACKET
+5C 005c REVERSE SOLIDUS
+5D 005d RIGHT SQUARE BRACKET
+5E 005e CIRCUMFLEX ACCENT
+5F 005f LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006a LATIN SMALL LETTER J
+6B 006b LATIN SMALL LETTER K
+6C 006c LATIN SMALL LETTER L
+6D 006d LATIN SMALL LETTER M
+6E 006e LATIN SMALL LETTER N
+6F 006f LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007a LATIN SMALL LETTER Z
+7B 007b LEFT CURLY BRACKET
+7C 007c VERTICAL LINE
+7D 007d RIGHT CURLY BRACKET
+7E 007e TILDE
+7F 007f DELETE (DEL)
+80 20ac EURO SIGN
+81 ???? EMPTY
+82 201a SINGLE LOW-9 QUOTATION MARK
+83 0192 LATIN SMALL LETTER F WITH HOOK
+84 201e DOUBLE LOW-9 QUOTATION MARK
+85 2026 HORIZONTAL ELLIPSIS
+86 2020 DAGGER
+87 2021 DOUBLE DAGGER
+88 02c6 MODIFIER LETTER CIRCUMFLEX ACCENT
+89 2030 PER MILLE SIGN
+8A 0160 LATIN CAPITAL LETTER S WITH CARON
+8B 2039 SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+8C 0152 LATIN CAPITAL LIGATURE OE
+8D ???? EMPTY
+8E 017d LATIN CAPITAL LETTER Z WITH CARON
+8F ???? EMPTY
+90 ???? EMPTY
+91 2018 LEFT SINGLE QUOTATION MARK
+92 2019 RIGHT SINGLE QUOTATION MARK
+93 201c LEFT DOUBLE QUOTATION MARK
+94 201d RIGHT DOUBLE QUOTATION MARK
+95 2022 BULLET
+96 2013 EN DASH
+97 2014 EM DASH
+98 02dc SMALL TILDE
+99 2122 TRADE MARK SIGN
+9A 0161 LATIN SMALL LETTER S WITH CARON
+9B 203a SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+9C 0153 LATIN SMALL LIGATURE OE
+9D ???? EMPTY
+9E 017e LATIN SMALL LETTER Z WITH CARON
+9F 0178 LATIN CAPITAL LETTER Y WITH DIAERESIS
+A0 00a0 NO-BREAK SPACE
+A1 00a1 INVERTED EXCLAMATION MARK
+A2 00a2 CENT SIGN
+A3 00a3 POUND SIGN
+A4 00a4 CURRENCY SIGN
+A5 00a5 YEN SIGN
+A6 00a6 BROKEN BAR
+A7 00a7 SECTION SIGN
+A8 00a8 DIAERESIS
+A9 00a9 COPYRIGHT SIGN
+AA 00aa FEMININE ORDINAL INDICATOR
+AB 00ab LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+AC 00ac NOT SIGN
+AD 00ad SOFT HYPHEN
+AE 00ae REGISTERED SIGN
+AF 00af MACRON
+B0 00b0 DEGREE SIGN
+B1 00b1 PLUS-MINUS SIGN
+B2 00b2 SUPERSCRIPT TWO
+B3 00b3 SUPERSCRIPT THREE
+B4 00b4 ACUTE ACCENT
+B5 00b5 MICRO SIGN
+B6 00b6 PILCROW SIGN
+B7 00b7 MIDDLE DOT
+B8 00b8 CEDILLA
+B9 00b9 SUPERSCRIPT ONE
+BA 00ba MASCULINE ORDINAL INDICATOR
+BB 00bb RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+BC 00bc VULGAR FRACTION ONE QUARTER
+BD 00bd VULGAR FRACTION ONE HALF
+BE 00be VULGAR FRACTION THREE QUARTERS
+BF 00bf INVERTED QUESTION MARK
+C0 00c0 LATIN CAPITAL LETTER A WITH GRAVE
+C1 00c1 LATIN CAPITAL LETTER A WITH ACUTE
+C2 00c2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+C3 00c3 LATIN CAPITAL LETTER A WITH TILDE
+C4 00c4 LATIN CAPITAL LETTER A WITH DIAERESIS
+C5 00c5 LATIN CAPITAL LETTER A WITH RING ABOVE
+C6 00c6 LATIN CAPITAL LETTER AE
+C7 00c7 LATIN CAPITAL LETTER C WITH CEDILLA
+C8 00c8 LATIN CAPITAL LETTER E WITH GRAVE
+C9 00c9 LATIN CAPITAL LETTER E WITH ACUTE
+CA 00ca LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+CB 00cb LATIN CAPITAL LETTER E WITH DIAERESIS
+CC 00cc LATIN CAPITAL LETTER I WITH GRAVE
+CD 00cd LATIN CAPITAL LETTER I WITH ACUTE
+CE 00ce LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+CF 00cf LATIN CAPITAL LETTER I WITH DIAERESIS
+D0 00d0 LATIN CAPITAL LETTER ETH (Icelandic)
+D1 00d1 LATIN CAPITAL LETTER N WITH TILDE
+D2 00d2 LATIN CAPITAL LETTER O WITH GRAVE
+D3 00d3 LATIN CAPITAL LETTER O WITH ACUTE
+D4 00d4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+D5 00d5 LATIN CAPITAL LETTER O WITH TILDE
+D6 00d6 LATIN CAPITAL LETTER O WITH DIAERESIS
+D7 00d7 MULTIPLICATION SIGN
+D8 00d8 LATIN CAPITAL LETTER O WITH STROKE
+D9 00d9 LATIN CAPITAL LETTER U WITH GRAVE
+DA 00da LATIN CAPITAL LETTER U WITH ACUTE
+DB 00db LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+DC 00dc LATIN CAPITAL LETTER U WITH DIAERESIS
+DD 00dd LATIN CAPITAL LETTER Y WITH ACUTE
+DE 00de LATIN CAPITAL LETTER THORN (Icelandic)
+DF 00df LATIN SMALL LETTER SHARP S (German)
+E0 00e0 LATIN SMALL LETTER A WITH GRAVE
+E1 00e1 LATIN SMALL LETTER A WITH ACUTE
+E2 00e2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+E3 00e3 LATIN SMALL LETTER A WITH TILDE
+E4 00e4 LATIN SMALL LETTER A WITH DIAERESIS
+E5 00e5 LATIN SMALL LETTER A WITH RING ABOVE
+E6 00e6 LATIN SMALL LETTER AE
+E7 00e7 LATIN SMALL LETTER C WITH CEDILLA
+E8 00e8 LATIN SMALL LETTER E WITH GRAVE
+E9 00e9 LATIN SMALL LETTER E WITH ACUTE
+EA 00ea LATIN SMALL LETTER E WITH CIRCUMFLEX
+EB 00eb LATIN SMALL LETTER E WITH DIAERESIS
+EC 00ec LATIN SMALL LETTER I WITH GRAVE
+ED 00ed LATIN SMALL LETTER I WITH ACUTE
+EE 00ee LATIN SMALL LETTER I WITH CIRCUMFLEX
+EF 00ef LATIN SMALL LETTER I WITH DIAERESIS
+F0 00f0 LATIN SMALL LETTER ETH (Icelandic)
+F1 00f1 LATIN SMALL LETTER N WITH TILDE
+F2 00f2 LATIN SMALL LETTER O WITH GRAVE
+F3 00f3 LATIN SMALL LETTER O WITH ACUTE
+F4 00f4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+F5 00f5 LATIN SMALL LETTER O WITH TILDE
+F6 00f6 LATIN SMALL LETTER O WITH DIAERESIS
+F7 00f7 DIVISION SIGN
+F8 00f8 LATIN SMALL LETTER O WITH STROKE
+F9 00f9 LATIN SMALL LETTER U WITH GRAVE
+FA 00fa LATIN SMALL LETTER U WITH ACUTE
+FB 00fb LATIN SMALL LETTER U WITH CIRCUMFLEX
+FC 00fc LATIN SMALL LETTER U WITH DIAERESIS
+FD 00fd LATIN SMALL LETTER Y WITH ACUTE
+FE 00fe LATIN SMALL LETTER THORN (Icelandic)
+FF 00ff LATIN SMALL LETTER Y WITH DIAERESIS
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1256.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1256.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1256.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/charset/windows-1256.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,279 @@
+# Copyright 2003 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+#
+# Charset put together by Rayed Alrashed <rayed at saudi.net.sa>
+# Reference:
+# ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1256.TXT
+00 0000 NULL
+01 0001 START OF HEADING
+02 0002 START OF TEXT
+03 0003 END OF TEXT
+04 0004 END OF TRANSMISSION
+05 0005 ENQUIRY
+06 0006 ACKNOWLEDGE
+07 0007 BELL
+08 0008 BACKSPACE
+09 0009 HORIZONTAL TABULATION
+0A 000A LINE FEED
+0B 000B VERTICAL TABULATION
+0C 000C FORM FEED
+0D 000D CARRIAGE RETURN
+0E 000E SHIFT OUT
+0F 000F SHIFT IN
+10 0010 DATA LINK ESCAPE
+11 0011 DEVICE CONTROL ONE
+12 0012 DEVICE CONTROL TWO
+13 0013 DEVICE CONTROL THREE
+14 0014 DEVICE CONTROL FOUR
+15 0015 NEGATIVE ACKNOWLEDGE
+16 0016 SYNCHRONOUS IDLE
+17 0017 END OF TRANSMISSION BLOCK
+18 0018 CANCEL
+19 0019 END OF MEDIUM
+1A 001A SUBSTITUTE
+1B 001B ESCAPE
+1C 001C FILE SEPARATOR
+1D 001D GROUP SEPARATOR
+1E 001E RECORD SEPARATOR
+1F 001F UNIT SEPARATOR
+20 0020 SPACE
+21 0021 EXCLAMATION MARK
+22 0022 QUOTATION MARK
+23 0023 NUMBER SIGN
+24 0024 DOLLAR SIGN
+25 0025 PERCENT SIGN
+26 0026 AMPERSAND
+27 0027 APOSTROPHE
+28 0028 LEFT PARENTHESIS
+29 0029 RIGHT PARENTHESIS
+2A 002A ASTERISK
+2B 002B PLUS SIGN
+2C 002C COMMA
+2D 002D HYPHEN-MINUS
+2E 002E FULL STOP
+2F 002F SOLIDUS
+30 0030 DIGIT ZERO
+31 0031 DIGIT ONE
+32 0032 DIGIT TWO
+33 0033 DIGIT THREE
+34 0034 DIGIT FOUR
+35 0035 DIGIT FIVE
+36 0036 DIGIT SIX
+37 0037 DIGIT SEVEN
+38 0038 DIGIT EIGHT
+39 0039 DIGIT NINE
+3A 003A COLON
+3B 003B SEMICOLON
+3C 003C LESS-THAN SIGN
+3D 003D EQUALS SIGN
+3E 003E GREATER-THAN SIGN
+3F 003F QUESTION MARK
+40 0040 COMMERCIAL AT
+41 0041 LATIN CAPITAL LETTER A
+42 0042 LATIN CAPITAL LETTER B
+43 0043 LATIN CAPITAL LETTER C
+44 0044 LATIN CAPITAL LETTER D
+45 0045 LATIN CAPITAL LETTER E
+46 0046 LATIN CAPITAL LETTER F
+47 0047 LATIN CAPITAL LETTER G
+48 0048 LATIN CAPITAL LETTER H
+49 0049 LATIN CAPITAL LETTER I
+4A 004A LATIN CAPITAL LETTER J
+4B 004B LATIN CAPITAL LETTER K
+4C 004C LATIN CAPITAL LETTER L
+4D 004D LATIN CAPITAL LETTER M
+4E 004E LATIN CAPITAL LETTER N
+4F 004F LATIN CAPITAL LETTER O
+50 0050 LATIN CAPITAL LETTER P
+51 0051 LATIN CAPITAL LETTER Q
+52 0052 LATIN CAPITAL LETTER R
+53 0053 LATIN CAPITAL LETTER S
+54 0054 LATIN CAPITAL LETTER T
+55 0055 LATIN CAPITAL LETTER U
+56 0056 LATIN CAPITAL LETTER V
+57 0057 LATIN CAPITAL LETTER W
+58 0058 LATIN CAPITAL LETTER X
+59 0059 LATIN CAPITAL LETTER Y
+5A 005A LATIN CAPITAL LETTER Z
+5B 005B LEFT SQUARE BRACKET
+5C 005C REVERSE SOLIDUS
+5D 005D RIGHT SQUARE BRACKET
+5E 005E CIRCUMFLEX ACCENT
+5F 005F LOW LINE
+60 0060 GRAVE ACCENT
+61 0061 LATIN SMALL LETTER A
+62 0062 LATIN SMALL LETTER B
+63 0063 LATIN SMALL LETTER C
+64 0064 LATIN SMALL LETTER D
+65 0065 LATIN SMALL LETTER E
+66 0066 LATIN SMALL LETTER F
+67 0067 LATIN SMALL LETTER G
+68 0068 LATIN SMALL LETTER H
+69 0069 LATIN SMALL LETTER I
+6A 006A LATIN SMALL LETTER J
+6B 006B LATIN SMALL LETTER K
+6C 006C LATIN SMALL LETTER L
+6D 006D LATIN SMALL LETTER M
+6E 006E LATIN SMALL LETTER N
+6F 006F LATIN SMALL LETTER O
+70 0070 LATIN SMALL LETTER P
+71 0071 LATIN SMALL LETTER Q
+72 0072 LATIN SMALL LETTER R
+73 0073 LATIN SMALL LETTER S
+74 0074 LATIN SMALL LETTER T
+75 0075 LATIN SMALL LETTER U
+76 0076 LATIN SMALL LETTER V
+77 0077 LATIN SMALL LETTER W
+78 0078 LATIN SMALL LETTER X
+79 0079 LATIN SMALL LETTER Y
+7A 007A LATIN SMALL LETTER Z
+7B 007B LEFT CURLY BRACKET
+7C 007C VERTICAL LINE
+7D 007D RIGHT CURLY BRACKET
+7E 007E TILDE
+7F 007F DELETE
+80 20AC EURO SIGN
+81 067E ARABIC LETTER PEH
+82 201A SINGLE LOW- 9QUOTATION MARK
+83 0192 LATIN SMALL LETTER F WITH HOOK
+84 201E DOUBLE LOW- 9QUOTATION MARK
+85 2026 HORIZONTAL ELLIPSIS
+86 2020 DAGGER
+87 2021 DOUBLE DAGGER
+88 02C6 MODIFIER LETTER CIRCUMFLEX ACCENT
+89 2030 PER MILLE SIGN
+8A 0679 ARABIC LETTER TTEH
+8B 2039 SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+8C 0152 LATIN CAPITAL LIGATURE OE
+8D 0686 ARABIC LETTER TCHEH
+8E 0698 ARABIC LETTER JEH
+8F 0688 ARABIC LETTER DDAL
+90 06AF ARABIC LETTER GAF
+91 2018 LEFT SINGLE QUOTATION MARK
+92 2019 RIGHT SINGLE QUOTATION MARK
+93 201C LEFT DOUBLE QUOTATION MARK
+94 201D RIGHT DOUBLE QUOTATION MARK
+95 2022 BULLET
+96 2013 EN DASH
+97 2014 EM DASH
+98 06A9 ARABIC LETTER KEHEH
+99 2122 TRADE MARK SIGN
+9A 0691 ARABIC LETTER RREH
+9B 203A SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+9C 0153 LATIN SMALL LIGATURE OE
+9D 200C ZERO WIDTH NON-JOINER
+9E 200D ZERO WIDTH JOINER
+9F 06BA ARABIC LETTER NOON GHUNNA
+A0 00A0 NO-BREAK SPACE
+A1 060C ARABIC COMMA
+A2 00A2 CENT SIGN
+A3 00A3 POUND SIGN
+A4 00A4 CURRENCY SIGN
+A5 00A5 YEN SIGN
+A6 00A6 BROKEN BAR
+A7 00A7 SECTION SIGN
+A8 00A8 DIAERESIS
+A9 00A9 COPYRIGHT SIGN
+AA 06BE ARABIC LETTER HEH DOACHASHMEE
+AB 00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+AC 00AC NOT SIGN
+AD 00AD SOFT HYPHEN
+AE 00AE REGISTERED SIGN
+AF 00AF MACRON
+B0 00B0 DEGREE SIGN
+B1 00B1 PLUS-MINUS SIGN
+B2 00B2 SUPERSCRIPT TWO
+B3 00B3 SUPERSCRIPT THREE
+B4 00B4 ACUTE ACCENT
+B5 00B5 MICRO SIGN
+B6 00B6 PILCROW SIGN
+B7 00B7 MIDDLE DOT
+B8 00B8 CEDILLA
+B9 00B9 SUPERSCRIPT ONE
+BA 061B ARABIC SEMICOLON
+BB 00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+BC 00BC VULGAR FRACTION ONE QUARTER
+BD 00BD VULGAR FRACTION ONE HALF
+BE 00BE VULGAR FRACTION THREE QUARTERS
+BF 061F ARABIC QUESTION MARK
+C0 06C1 ARABIC LETTER HEH GOAL
+C1 0621 ARABIC LETTER HAMZA
+C2 0622 ARABIC LETTER ALEF WITH MADDA ABOVE
+C3 0623 ARABIC LETTER ALEF WITH HAMZA ABOVE
+C4 0624 ARABIC LETTER WAW WITH HAMZA ABOVE
+C5 0625 ARABIC LETTER ALEF WITH HAMZA BELOW
+C6 0626 ARABIC LETTER YEH WITH HAMZA ABOVE
+C7 0627 ARABIC LETTER ALEF
+C8 0628 ARABIC LETTER BEH
+C9 0629 ARABIC LETTER TEH MARBUTA
+CA 062A ARABIC LETTER TEH
+CB 062B ARABIC LETTER THEH
+CC 062C ARABIC LETTER JEEM
+CD 062D ARABIC LETTER HAH
+CE 062E ARABIC LETTER KHAH
+CF 062F ARABIC LETTER DAL
+D0 0630 ARABIC LETTER THAL
+D1 0631 ARABIC LETTER REH
+D2 0632 ARABIC LETTER ZAIN
+D3 0633 ARABIC LETTER SEEN
+D4 0634 ARABIC LETTER SHEEN
+D5 0635 ARABIC LETTER SAD
+D6 0636 ARABIC LETTER DAD
+D7 00D7 MULTIPLICATION SIGN
+D8 0637 ARABIC LETTER TAH
+D9 0638 ARABIC LETTER ZAH
+DA 0639 ARABIC LETTER AIN
+DB 063A ARABIC LETTER GHAIN
+DC 0640 ARABIC TATWEEL
+DD 0641 ARABIC LETTER FEH
+DE 0642 ARABIC LETTER QAF
+DF 0643 ARABIC LETTER KAF
+E0 00E0 LATIN SMALL LETTER A WITH GRAVE
+E1 0644 ARABIC LETTER LAM
+E2 00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX
+E3 0645 ARABIC LETTER MEEM
+E4 0646 ARABIC LETTER NOON
+E5 0647 ARABIC LETTER HEH
+E6 0648 ARABIC LETTER WAW
+E7 00E7 LATIN SMALL LETTER C WITH CEDILLA
+E8 00E8 LATIN SMALL LETTER E WITH GRAVE
+E9 00E9 LATIN SMALL LETTER E WITH ACUTE
+EA 00EA LATIN SMALL LETTER E WITH CIRCUMFLEX
+EB 00EB LATIN SMALL LETTER E WITH DIAERESIS
+EC 0649 ARABIC LETTER ALEF MAKSURA
+ED 064A ARABIC LETTER YEH
+EE 00EE LATIN SMALL LETTER I WITH CIRCUMFLEX
+EF 00EF LATIN SMALL LETTER I WITH DIAERESIS
+F0 064B ARABIC FATHATAN
+F1 064C ARABIC DAMMATAN
+F2 064D ARABIC KASRATAN
+F3 064E ARABIC FATHA
+F4 00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX
+F5 064F ARABIC DAMMA
+F6 0650 ARABIC KASRA
+F7 00F7 DIVISION SIGN
+F8 0651 ARABIC SHADDA
+F9 00F9 LATIN SMALL LETTER U WITH GRAVE
+FA 0652 ARABIC SUKUN
+FB 00FB LATIN SMALL LETTER U WITH CIRCUMFLEX
+FC 00FC LATIN SMALL LETTER U WITH DIAERESIS
+FD 200E LEFT-TO-RIGHT MARK
+FE 200F RIGHT-TO-LEFT MARK
+FF 06D2 ARABIC LETTER YEH BARREE
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/chartable.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/chartable.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/chartable.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/chartable.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+/* Definitions internal to charset.c and chartable.c */
+
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: chartable.h,v 1.5 2003/02/13 20:15:39 rjs3 Exp $ */
+
+/* note that these are all uppercase letters. since the translation
+ tables canonicalize to lower case letters, we never see these bytes
+ in the output UTF-8 and they're safely used as control codes to the
+ character decoder. */
+
+/* note that currently we never return a character that is represented
+ * by more than 3 octets in UTF-8, since we only deal with characters
+ * in UCS-2. this means that 11110xxx, 111110xx, and 1111110x never
+ * appear in our outgoing tables, and could be used instead of the following.
+ */
+
+#define XLT 'N' /* Long translation */
+#define U7F 'O' /* UTF-7 first base64 character */
+#define U7N 'P' /* UTF-7 subsquent base64 character */
+#define U83 'Q' /* UTF-8 3-char sequence */
+#define U83_2 'R' /* second char of same */
+#define U83_3 'S' /* third char of same */
+#define JSR 'T'
+#define JMP 'U'
+#define RET 'V'
+#define END 'W'
+
+struct charset {
+ char *name;
+ const unsigned char (*table)[256][4];
+};
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,186 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: cyrusdb.c,v 1.5.2.8 2006/01/04 02:14:14 murch Exp $ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "libcyr_cfg.h"
+#include "retry.h"
+#include "xmalloc.h"
+
+struct cyrusdb_backend *cyrusdb_backends[] = {
+#ifdef HAVE_BDB
+ &cyrusdb_berkeley,
+ &cyrusdb_berkeley_nosync,
+ &cyrusdb_berkeley_hash,
+ &cyrusdb_berkeley_hash_nosync,
+#endif
+ &cyrusdb_flat,
+ &cyrusdb_skiplist,
+ &cyrusdb_quotalegacy,
+ NULL };
+
+void cyrusdb_init()
+{
+ int i, r;
+ char dbdir[1024];
+ const char *confdir = libcyrus_config_getstring(CYRUSOPT_CONFIG_DIR);
+ int initflags = libcyrus_config_getint(CYRUSOPT_DB_INIT_FLAGS);
+
+ strcpy(dbdir, confdir);
+ strcat(dbdir, FNAME_DBDIR);
+
+ for(i=0; cyrusdb_backends[i]; i++) {
+ r = (cyrusdb_backends[i])->init(dbdir, initflags);
+ if(r) {
+ syslog(LOG_ERR, "DBERROR: init() on %s",
+ cyrusdb_backends[i]->name);
+ }
+ }
+}
+
+void cyrusdb_done()
+{
+ int i;
+
+ for(i=0; cyrusdb_backends[i]; i++) {
+ (cyrusdb_backends[i])->done();
+ }
+}
+
+int cyrusdb_copyfile(const char *srcname, const char *dstname)
+{
+ int srcfd, dstfd;
+ struct stat sbuf;
+ char *buf;
+ int bufsize, n;
+
+ if ((srcfd = open(srcname, O_RDONLY)) < 0) {
+ syslog(LOG_DEBUG, "error opening %s for reading", srcname);
+ return -1;
+ }
+
+ if (fstat(srcfd, &sbuf) < 0) {
+ syslog(LOG_DEBUG, "error fstating %s", srcname);
+ close(srcfd);
+ return -1;
+ }
+
+ if ((dstfd = open(dstname, O_WRONLY | O_CREAT, sbuf.st_mode)) < 0) {
+ syslog(LOG_DEBUG, "error opening %s for writing (%d)",
+ dstname, sbuf.st_mode);
+ close(srcfd);
+ return -1;
+ }
+
+ bufsize = sbuf.st_blksize;
+ if ((buf = (char*) xmalloc(bufsize)) == NULL) {
+ syslog(LOG_DEBUG, "error allocing buf (%d)", bufsize);
+ close(srcfd);
+ close(dstfd);
+ return -1;
+ }
+
+ for (;;) {
+ n = read(srcfd, buf, bufsize);
+
+ if (n < 0) {
+ if (errno == EINTR)
+ continue;
+
+ syslog(LOG_DEBUG, "error reading buf (%d)", bufsize);
+ close(srcfd);
+ close(dstfd);
+ unlink(dstname);
+ return -1;
+ }
+
+ if (n == 0)
+ break;
+
+ if (retry_write(dstfd, buf, n) != n) {
+ syslog(LOG_DEBUG, "error writing buf (%d)", n);
+ close(srcfd);
+ close(dstfd);
+ unlink(dstname);
+ return -1;
+ }
+ }
+
+ close(srcfd);
+ close(dstfd);
+ return 0;
+}
+
+struct cyrusdb_backend *cyrusdb_fromname(const char *name)
+{
+ int i;
+ struct cyrusdb_backend *db = NULL;
+
+ for (i = 0; cyrusdb_backends[i]; i++) {
+ if (!strcmp(cyrusdb_backends[i]->name, name)) {
+ db = cyrusdb_backends[i]; break;
+ }
+ }
+ if (!db) {
+ char errbuf[1024];
+ snprintf(errbuf, sizeof(errbuf),
+ "cyrusdb backend %s not supported", name);
+ fatal(errbuf, EC_CONFIG);
+ }
+
+ return db;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,201 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: cyrusdb.h,v 1.25.2.4 2006/01/04 02:14:14 murch Exp $ */
+
+#ifndef INCLUDED_CYRUSDB_H
+#define INCLUDED_CYRUSDB_H
+
+struct db;
+struct txn;
+
+enum cyrusdb_ret {
+ CYRUSDB_OK = 0,
+ CYRUSDB_DONE = 1,
+ CYRUSDB_IOERROR = -1,
+ CYRUSDB_AGAIN = -2,
+ CYRUSDB_EXISTS = -3,
+ CYRUSDB_INTERNAL = -4,
+ CYRUSDB_NOTFOUND = -5
+};
+
+#define cyrusdb_strerror(c) ("cyrusdb error")
+
+enum cyrusdb_initflags {
+ CYRUSDB_RECOVER = 0x01
+};
+
+enum cyrusdb_dbflags {
+ CYRUSDB_NOSYNC = 0x01 /* durability not a concern */
+};
+
+enum cyrusdb_openflags {
+ CYRUSDB_CREATE = 0x01 /* Create the database if not existant */
+};
+
+typedef int foreach_p(void *rock,
+ const char *key, int keylen,
+ const char *data, int datalen);
+
+typedef int foreach_cb(void *rock,
+ const char *key, int keylen,
+ const char *data, int datalen);
+
+struct cyrusdb_backend {
+ const char *name;
+
+ /* init() should be called once per process; no calls are legal
+ * until init() returns */
+ int (*init)(const char *dbdir, int myflags);
+
+ /* done() should be called once per process; no calls are legal
+ * once done() starts. it is legal to call init() after done() returns
+ * to reset state */
+ int (*done)(void);
+
+ /* checkpoints this database environment */
+ int (*sync)(void);
+
+ /* archives this database environment, and specified databases
+ * into the specified directory */
+ int (*archive)(const char **fnames, const char *dirname);
+
+ /* open the specified database in the global environment */
+ int (*open)(const char *fname, int flags, struct db **ret);
+
+ /* close the specified database */
+ int (*close)(struct db *db);
+
+ /* what are the overall specifications? */
+ /* 'mydb': the database to act on
+ 'key': the key to fetch. cyrusdb currently requires this to not have
+ any of [\t\n\0] in keys
+ 'keylen': length of the key
+ 'data': where to put the data (generally won't have [\n\0])
+ 'datalen': how big is the data?
+ 'mytid': may be NULL, in which case the fetch is not txn protected.
+ if mytid != NULL && *mytid == NULL, begins a new txn
+ if mytid != NULL && *mytid != NULL, continues an old txn
+
+ transactions may lock the entire database on some backends.
+ beware
+
+ fetchlock() is identical to fetch() except gives a hint to the
+ underlying database that the key/data being fetched will be modified
+ soon. it is useless to use fetchlock() without a non-NULL mytid
+ */
+ int (*fetch)(struct db *mydb,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid);
+ int (*fetchlock)(struct db *mydb,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid);
+
+ /* foreach: iterate through entries that start with 'prefix'
+ if 'p' is NULL (always true) or returns true, call 'cb'
+
+ if 'cb' changes the database, these changes will only be visible
+ if they are after the current database cursor. If other processes
+ change the database (i.e. outside of a transaction) these changes
+ may or may not be visible to the foreach()
+
+ 'p' should be fast and should avoid blocking it should be safe
+ to call other db routines inside of 'cb'. however, the "flat"
+ backend is currently are not reentrant in this way
+ unless you're using transactions and pass the same transaction
+ to all db calls during the life of foreach() */
+ int (*foreach)(struct db *mydb,
+ char *prefix, int prefixlen,
+ foreach_p *p,
+ foreach_cb *cb, void *rock,
+ struct txn **tid);
+
+ /* Place entries in database create will not overwrite existing
+ * entries */
+ int (*create)(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid);
+ int (*store)(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid);
+
+ /* Remove entrys from the database */
+ int (*delete)(struct db *db,
+ const char *key, int keylen,
+ struct txn **tid,
+ int force); /* 1 = ignore not found errors */
+
+ /* Commit the transaction. When commit() returns, the tid will no longer
+ * be valid, regardless of if the commit succeeded or failed */
+ int (*commit)(struct db *db, struct txn *tid);
+
+ /* Abort the transaction and invalidate the tid */
+ int (*abort)(struct db *db, struct txn *tid);
+
+ int (*dump)(struct db *db, int detail);
+ int (*consistent)(struct db *db);
+};
+
+extern struct cyrusdb_backend *cyrusdb_backends[];
+
+/* Note that some of these may be undefined symbols
+ * if libcyrus was not built with support for them */
+extern struct cyrusdb_backend cyrusdb_berkeley;
+extern struct cyrusdb_backend cyrusdb_berkeley_nosync;
+extern struct cyrusdb_backend cyrusdb_berkeley_hash;
+extern struct cyrusdb_backend cyrusdb_berkeley_hash_nosync;
+extern struct cyrusdb_backend cyrusdb_flat;
+extern struct cyrusdb_backend cyrusdb_skiplist;
+extern struct cyrusdb_backend cyrusdb_quotalegacy;
+
+extern int cyrusdb_copyfile(const char *srcname, const char *dstname);
+
+/* Start/Stop the backends */
+void cyrusdb_init();
+void cyrusdb_done();
+
+/* Configuration */
+struct cyrusdb_backend *cyrusdb_fromname(const char *name);
+
+#endif /* INCLUDED_CYRUSDB_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_berkeley.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_berkeley.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_berkeley.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_berkeley.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1077 @@
+/* cyrusdb_berkeley: berkeley db backends
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: cyrusdb_berkeley.c,v 1.2.2.12 2006/02/28 12:58:07 murch Exp $ */
+
+#include <config.h>
+
+#include <db.h>
+#include <syslog.h>
+#include <assert.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "libcyr_cfg.h"
+#include "xmalloc.h"
+
+extern void fatal(const char *, int);
+
+/* --- cut here --- */
+/*
+ * what berkeley db algorithm should we use for deadlock detection?
+ *
+ * DB_LOCK_DEFAULT
+ * Use the default policy as specified by db_deadlock.
+ * DB_LOCK_OLDEST
+ * Abort the oldest transaction.
+ * DB_LOCK_RANDOM
+ * Abort a random transaction involved in the deadlock.
+ * DB_LOCK_YOUNGEST
+ * Abort the youngest transaction.
+ */
+
+#define CONFIG_DEADLOCK_DETECTION DB_LOCK_YOUNGEST
+#define MIN_CACHESIZE 20 /* 20KB per Sleepycat docs */
+#define MAX_CACHESIZE 4194303 /* UINT32_MAX / 1024 */
+
+/* --- cut here --- */
+
+#if DB_VERSION_MAJOR >= 4
+#define txn_checkpoint(xx1,xx2,xx3,xx4) (xx1)->txn_checkpoint(xx1,xx2,xx3,xx4)
+#define txn_id(xx1) (xx1)->id(xx1)
+#define log_archive(xx1,xx2,xx3,xx4) (xx1)->log_archive(xx1,xx2,xx3)
+#define txn_begin(xx1,xx2,xx3,xx4) (xx1)->txn_begin(xx1,xx2,xx3,xx4)
+#define txn_commit(xx1,xx2) (xx1)->commit(xx1,xx2)
+#define txn_abort(xx1) (xx1)->abort(xx1)
+#elif DB_VERSION_MINOR == 3
+#define log_archive(xx1,xx2,xx3,xx4) log_archive(xx1,xx2,xx3)
+#endif
+
+static int dbinit = 0;
+static DB_ENV *dbenv;
+
+/* other routines call this one when they fail */
+static int commit_txn(struct db *db, struct txn *tid);
+static int abort_txn(struct db *db, struct txn *tid);
+
+static void db_panic(DB_ENV *dbenv __attribute__((unused)),
+ int errno __attribute__((unused)))
+{
+ syslog(LOG_CRIT, "DBERROR: critical database situation");
+ /* but don't bounce mail */
+ exit(EC_TEMPFAIL);
+}
+
+#if (DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 3)
+static void db_err(const DB_ENV *dbenv __attribute__((unused)),
+ const char *db_prfx, const char *buffer)
+#else
+static void db_err(const char *db_prfx, char *buffer)
+#endif
+{
+ syslog(LOG_WARNING, "DBERROR %s: %s", db_prfx, buffer);
+}
+
+static void db_msg(const DB_ENV *dbenv __attribute__((unused)),
+ const char *msg)
+{
+ syslog(LOG_INFO, "DBMSG: %s", msg);
+}
+
+static int init(const char *dbdir, int myflags)
+{
+ int r, do_retry = 1;
+ int flags = 0;
+ int maj, min, patch;
+ char *vstr;
+ static char errpfx[10]; /* needs to be static; bdb doesn't copy */
+ int opt;
+
+ if (dbinit++) return 0;
+
+ vstr = db_version(&maj, &min, &patch);
+ if (maj != DB_VERSION_MAJOR || min != DB_VERSION_MINOR ||
+ DB_VERSION_PATCH > patch) {
+ syslog(LOG_CRIT, "incorrect version of Berkeley db: "
+ "compiled against %d.%d.%d, linked against %d.%d.%d",
+ DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH,
+ maj, min, patch);
+ fatal("wrong db version", EC_SOFTWARE);
+ }
+
+ if (myflags & CYRUSDB_RECOVER) {
+ flags |= DB_RECOVER | DB_CREATE;
+ }
+
+ if ((r = db_env_create(&dbenv, 0)) != 0) {
+ syslog(LOG_ERR, "DBERROR: db_appinit failed: %s", db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ dbenv->set_paniccall(dbenv, (void (*)(DB_ENV *, int)) &db_panic);
+ if (CONFIG_DB_VERBOSE) {
+ dbenv->set_verbose(dbenv, DB_VERB_DEADLOCK, 1);
+ dbenv->set_verbose(dbenv, DB_VERB_WAITSFOR, 1);
+ }
+ if (CONFIG_DB_VERBOSE > 1) {
+#ifdef DB_VERB_CHKPOINT
+ dbenv->set_verbose(dbenv, DB_VERB_CHKPOINT, 1);
+#endif
+ }
+
+#if (DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 3)
+ dbenv->set_msgcall(dbenv, db_msg);
+#endif
+ dbenv->set_errcall(dbenv, db_err);
+ snprintf(errpfx, sizeof(errpfx), "db%d", DB_VERSION_MAJOR);
+ dbenv->set_errpfx(dbenv, errpfx);
+
+ dbenv->set_lk_detect(dbenv, CONFIG_DEADLOCK_DETECTION);
+
+ if ((opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_LOCKS_MAX)) < 0) {
+ syslog(LOG_WARNING,
+ "DBERROR: invalid berkeley_locks_max value, using internal default");
+ } else {
+ r = dbenv->set_lk_max(dbenv, opt);
+ if (r) {
+ dbenv->err(dbenv, r, "set_lk_max");
+ syslog(LOG_ERR, "DBERROR: set_lk_max(): %s", db_strerror(r));
+ abort();
+ }
+ }
+
+ if ((opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_TXNS_MAX)) < 0) {
+ syslog(LOG_WARNING,
+ "DBERROR: invalid berkeley_txns_max value, using internal default");
+ } else {
+ r = dbenv->set_tx_max(dbenv, opt);
+ if (r) {
+ dbenv->err(dbenv, r, "set_tx_max");
+ syslog(LOG_ERR, "DBERROR: set_tx_max(): %s", db_strerror(r));
+ abort();
+ }
+ }
+
+ opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_CACHESIZE);
+ if (opt < MIN_CACHESIZE || opt > MAX_CACHESIZE) {
+ syslog(LOG_WARNING,
+ "DBERROR: invalid berkeley_cachesize value, using internal default");
+ } else {
+ r = dbenv->set_cachesize(dbenv, 0, opt * 1024, 0);
+ if (r) {
+ dbenv->err(dbenv, r, "set_cachesize");
+ dbenv->close(dbenv, 0);
+ syslog(LOG_ERR, "DBERROR: set_cachesize(): %s", db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ }
+
+ /* what directory are we in? */
+ retry:
+ flags |= DB_INIT_LOCK | DB_INIT_MPOOL |
+ DB_INIT_LOG | DB_INIT_TXN;
+#if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) && (DB_VERSION_MINOR > 0))
+ r = dbenv->open(dbenv, dbdir, flags, 0644);
+#else
+ r = dbenv->open(dbenv, dbdir, NULL, flags, 0644);
+#endif
+ if (r) {
+ if (do_retry && (r == ENOENT)) {
+ /* Per sleepycat Support Request #3838 reporting a performance problem:
+
+ Berkeley DB only transactionally protects the open if you're
+ doing a DB_CREATE. Even if the Cyrus application is opening
+ the file read/write, we don't need a transaction. I see
+ from their source that they are always specifying DB_CREATE.
+ I bet if they changed it to not specifying CREATE and only
+ creating if necessary, the problem would probably go away.
+
+ Given that in general the file should exist, we optimize the most
+ often case: the file exists. So, we add DB_CREATE only if we fail
+ to open the file and thereby avoid doing a stat(2) needlessly. Sure, it
+ should be cached by why waste the cycles anyway?
+ */
+ flags |= DB_CREATE;
+ do_retry = 0;
+ goto retry;
+ }
+
+ syslog(LOG_ERR, "DBERROR: dbenv->open '%s' failed: %s", dbdir,
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+
+ dbinit = 1;
+
+ return 0;
+}
+
+static int done(void)
+{
+ int r;
+
+ if (--dbinit) return 0;
+
+ r = dbenv->close(dbenv, 0);
+ dbinit = 0;
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error exiting application: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+
+ return 0;
+}
+
+static int mysync(void)
+{
+ int r;
+
+ assert(dbinit);
+
+#if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
+ do {
+#endif
+#if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) && (DB_VERSION_MINOR > 0))
+ r = txn_checkpoint(dbenv, 0, 0, 0);
+#else
+ r = txn_checkpoint(dbenv, 0, 0);
+#endif
+#if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
+ } while (r == DB_INCOMPLETE); /* Never returned by BDB 4.1 */
+#endif
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: couldn't checkpoint: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+
+ return 0;
+}
+
+static int myarchive(const char **fnames, const char *dirname)
+{
+ int r;
+ char **begin, **list;
+ const char **fname;
+ char dstname[1024], *dp;
+ int length, rest;
+
+ strlcpy(dstname, dirname, sizeof(dstname));
+ length = strlen(dstname);
+ dp = dstname + length;
+ rest = sizeof(dstname) - length;
+
+ /* Get the list of log files to remove. */
+ r = log_archive(dbenv, &list, DB_ARCH_ABS, NULL);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error listing log files: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ if (list != NULL) {
+ for (begin = list; *list != NULL; ++list) {
+ syslog(LOG_DEBUG, "removing log file: %s", *list);
+ r = unlink(*list);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error removing log file: %s",
+ *list);
+ return CYRUSDB_IOERROR;
+ }
+ }
+ free (begin);
+ }
+
+ /* Get the list of database files to archive. */
+ /* XXX Should we do this, or just use the list given to us? */
+ r = log_archive(dbenv, &list, DB_ARCH_ABS | DB_ARCH_DATA, NULL);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error listing database files: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ if (list != NULL) {
+ for (begin = list; *list != NULL; ++list) {
+ /* only archive those files specified by the app */
+ for (fname = fnames; *fname != NULL; ++fname) {
+ if (!strcmp(*list, *fname)) break;
+ }
+ if (*fname) {
+ syslog(LOG_DEBUG, "archiving database file: %s", *fname);
+ strlcpy(dp, strrchr(*fname, '/'), rest);
+ r = cyrusdb_copyfile(*fname, dstname);
+ if (r) {
+ syslog(LOG_ERR,
+ "DBERROR: error archiving database file: %s",
+ *fname);
+ return CYRUSDB_IOERROR;
+ }
+ }
+ }
+ free (begin);
+ }
+
+ /* Get the list of log files to archive. */
+ r = log_archive(dbenv, &list, DB_ARCH_ABS | DB_ARCH_LOG, NULL);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error listing log files: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ if (list != NULL) {
+ for (begin = list; *list != NULL; ++list) {
+ syslog(LOG_DEBUG, "archiving log file: %s", *list);
+ strcpy(dp, strrchr(*list, '/'));
+ r = cyrusdb_copyfile(*list, dstname);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error archiving log file: %s",
+ *list);
+ return CYRUSDB_IOERROR;
+ }
+ }
+ free (begin);
+ }
+
+ return 0;
+}
+
+static int myopen(const char *fname, DBTYPE type, int flags, struct db **ret)
+{
+ DB *db = NULL;
+ int r;
+ int dbflags = (flags & CYRUSDB_CREATE) ? DB_CREATE : 0;
+
+ assert(dbinit && fname && ret);
+
+ *ret = NULL;
+
+ r = db_create(&db, dbenv, 0);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: opening %s (creating database handle): %s", fname, db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ /* xxx set comparator! */
+
+#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
+ r = db->open(db, NULL, fname, NULL, type, dbflags | DB_AUTO_COMMIT, 0664);
+#else
+ r = db->open(db, fname, NULL, type, dbflags, 0664);
+#endif
+
+ if (r != 0) {
+ int level = (flags & CYRUSDB_CREATE) ? LOG_ERR : LOG_DEBUG;
+ syslog(level, "DBERROR: opening %s: %s", fname, db_strerror(r));
+ r = db->close(db, DB_NOSYNC);
+ if (r != 0) {
+ syslog(level, "DBERROR: closing %s: %s", fname, db_strerror(r));
+ }
+ return CYRUSDB_IOERROR;
+ }
+
+ *ret = (struct db *) db;
+
+ return r;
+}
+
+static int open_btree(const char *fname, int flags, struct db **ret)
+{
+ return myopen(fname, DB_BTREE, flags, ret);
+}
+
+static int open_hash(const char *fname, int flags, struct db **ret)
+{
+ return myopen(fname, DB_HASH, flags, ret);
+}
+
+static int myclose(struct db *db)
+{
+ int r;
+ DB *a = (DB *) db;
+
+ assert(dbinit && db);
+
+ /* since we're using txns, we can supply DB_NOSYNC */
+ r = a->close(a, DB_NOSYNC);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: error closing: %s", db_strerror(r));
+ r = CYRUSDB_IOERROR;
+ }
+
+ return r;
+}
+
+static int gettid(struct txn **mytid, DB_TXN **tid, char *where)
+{
+ int r;
+
+ if (mytid) {
+ if (*mytid) {
+ assert((txn_id((DB_TXN *)*mytid) != 0));
+ *tid = (DB_TXN *) *mytid;
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "%s: reusing txn %lu", where,
+ (unsigned long) txn_id(*tid));
+ } else {
+ r = txn_begin(dbenv, NULL, tid, 0);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: error beginning txn (%s): %s", where,
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "%s: starting txn %lu", where,
+ (unsigned long) txn_id(*tid));
+ }
+ *mytid = (struct txn *) *tid;
+ }
+
+ return 0;
+}
+
+static int myfetch(struct db *mydb,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid, int flags)
+{
+ int r = 0;
+ DBT k, d;
+ DB *db = (DB *) mydb;
+ DB_TXN *tid = NULL;
+
+ assert(dbinit && db);
+
+ if (data) *data = NULL;
+ if (datalen) *datalen = 0;
+
+ r = gettid(mytid, &tid, "myfetch");
+ if (r) return r;
+
+ memset(&k, 0, sizeof(k));
+ memset(&d, 0, sizeof(d));
+
+ k.data = (char *) key;
+ k.size = keylen;
+
+ r = db->get(db, tid, &k, &d, flags);
+ switch (r) {
+ case 0:
+ if (data) *data = d.data;
+ if (datalen) *datalen = d.size;
+ break;
+ case DB_NOTFOUND:
+ r = CYRUSDB_NOTFOUND;
+ break;
+ case DB_LOCK_DEADLOCK:
+ if (mytid) {
+ abort_txn(mydb, *mytid);
+ *mytid = NULL;
+ }
+ r = CYRUSDB_AGAIN;
+ break;
+ default:
+ syslog(LOG_ERR, "DBERROR: error fetching %s: %s", key,
+ db_strerror(r));
+ r = CYRUSDB_IOERROR;
+ break;
+ }
+
+ return r;
+}
+
+static int fetch(struct db *mydb,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid)
+{
+ return myfetch(mydb, key, keylen, data, datalen, mytid, 0);
+}
+
+static int fetchlock(struct db *mydb,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid)
+{
+ return myfetch(mydb, key, keylen, data, datalen, mytid, DB_RMW);
+}
+
+#define OPENCURSOR() do { \
+ r = db->cursor(db, tid, &cursor, 0); \
+ if (r != 0) { \
+ syslog(LOG_ERR, "DBERROR: unable to create cursor: %s", \
+ db_strerror(r)); \
+ cursor = NULL; \
+ goto done; \
+ } \
+ } while (0)
+
+#define CLOSECURSOR() do { \
+ int r = cursor->c_close(cursor); \
+ if (r) { \
+ syslog(LOG_ERR, "DBERROR: error closing cursor: %s", \
+ db_strerror(r)); \
+ cursor = NULL; \
+ goto done; \
+ } \
+ } while (0)
+
+
+/* instead of "DB_DBT_REALLOC", we might want DB_DBT_USERMEM and allocate
+ this to the maximum length at the beginning. */
+static int foreach(struct db *mydb,
+ char *prefix, int prefixlen,
+ foreach_p *goodp,
+ foreach_cb *cb, void *rock,
+ struct txn **mytid)
+{
+ int r = 0;
+ DBT k, d;
+ DBC *cursor = NULL;
+ DB *db = (DB *) mydb;
+ DB_TXN *tid = NULL;
+
+ assert(dbinit && db);
+ assert(cb);
+
+ memset(&k, 0, sizeof(k));
+ memset(&d, 0, sizeof(d));
+
+ /* k.flags |= DB_DBT_REALLOC;
+ d.flags |= DB_DBT_REALLOC;*/
+
+ r = gettid(mytid, &tid, "foreach");
+ if (r) return r;
+
+ if (0) {
+ restart:
+ CLOSECURSOR();
+ }
+
+ /* create cursor */
+ OPENCURSOR();
+
+ /* find first record */
+ if (prefix && *prefix) {
+ /* if (k.data) free(k.data); */
+ k.data = prefix;
+ k.size = prefixlen;
+
+ r = cursor->c_get(cursor, &k, &d, DB_SET_RANGE);
+ } else {
+ r = cursor->c_get(cursor, &k, &d, DB_FIRST);
+ }
+ if (!tid && r == DB_LOCK_DEADLOCK) goto restart;
+
+ /* iterate over all mailboxes matching prefix */
+ while (!r) {
+ /* does this match our prefix? */
+ if (prefixlen && memcmp(k.data, prefix, prefixlen)) break;
+
+ if (!goodp || goodp(rock, k.data, k.size, d.data, d.size)) {
+ /* we have a winner! */
+
+ /* close the cursor, so we're not holding locks
+ during a callback */
+ CLOSECURSOR(); cursor = NULL;
+
+ r = cb(rock, k.data, k.size, d.data, d.size);
+ if (r != 0) {
+ if (r < 0) {
+ syslog(LOG_ERR, "DBERROR: foreach cb() failed");
+ }
+ /* don't mistake this for a db error */
+ r = 0;
+
+ break;
+ }
+
+ /* restore the current location & advance */
+ OPENCURSOR();
+
+ r = cursor->c_get(cursor, &k, &d, DB_SET);
+ switch (r) {
+ case 0:
+ r = cursor->c_get(cursor, &k, &d, DB_NEXT);
+ break;
+
+ case DB_NOTFOUND:
+ /* deleted during callback? */
+ r = cursor->c_get(cursor, &k, &d, DB_SET_RANGE);
+ break;
+
+ default:
+ /* handle other cases below */
+ break;
+ }
+ } else {
+ /* advance the cursor */
+ r = cursor->c_get(cursor, &k, &d, DB_NEXT);
+ }
+
+ while (r == DB_LOCK_DEADLOCK) {
+ if (tid) {
+ break; /* don't autoretry txn-protected */
+ }
+
+ /* if we deadlock, close and reopen the cursor, and
+ reposition it */
+ CLOSECURSOR();
+ OPENCURSOR();
+
+ r = cursor->c_get(cursor, &k, &d, DB_SET);
+ switch (r) {
+ case 0:
+ r = cursor->c_get(cursor, &k, &d, DB_NEXT);
+ break;
+ case DB_LOCK_DEADLOCK:
+ continue;
+ case DB_NOTFOUND: /* deleted? */
+ r = cursor->c_get(cursor, &k, &d, DB_SET_RANGE);
+ break;
+ }
+ }
+ }
+
+ done:
+ if (cursor) {
+ CLOSECURSOR();
+ }
+
+ switch (r) {
+ case 0: /* ok */
+ break;
+ case DB_NOTFOUND: /* also ok */
+ r = 0;
+ break;
+ case DB_LOCK_DEADLOCK: /* erg, we're in a txn! */
+ if (mytid) {
+ abort_txn(mydb, *mytid);
+ *mytid = NULL;
+ }
+ r = CYRUSDB_AGAIN;
+ break;
+ default:
+ if (mytid) {
+ abort_txn(mydb, *mytid);
+ *mytid = NULL;
+ }
+ syslog(LOG_ERR, "DBERROR: error advancing: %s", db_strerror(r));
+ r = CYRUSDB_IOERROR;
+ break;
+ }
+
+/* if (k.data) free(k.data);
+ if (d.data) free(d.data);*/
+
+ return r;
+}
+
+static int mystore(struct db *mydb,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **mytid, int putflags, int txnflags)
+{
+ int r = 0;
+ DBT k, d;
+ DB_TXN *tid;
+ DB *db = (DB *) mydb;
+
+ assert(dbinit && db);
+ assert(key && keylen);
+
+ r = gettid(mytid, &tid, "mystore");
+ if (r) return r;
+
+ memset(&k, 0, sizeof(k));
+ memset(&d, 0, sizeof(d));
+
+ k.data = (char *) key;
+ k.size = keylen;
+ d.data = (char *) data;
+ d.size = datalen;
+
+ if (!mytid) {
+ /* start a transaction for the write */
+ restart:
+ r = txn_begin(dbenv, NULL, &tid, 0);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: mystore: error beginning txn: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "mystore: starting txn %lu",
+ (unsigned long) txn_id(tid));
+ }
+ r = db->put(db, tid, &k, &d, putflags);
+ if (!mytid) {
+ /* finish once-off txn */
+ if (r) {
+ int r2;
+
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "mystore: aborting txn %lu",
+ (unsigned long) txn_id(tid));
+ r2 = txn_abort(tid);
+ if (r2) {
+ syslog(LOG_ERR, "DBERROR: mystore: error aborting txn: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+
+ if (r == DB_LOCK_DEADLOCK) {
+ goto restart;
+ }
+ } else {
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "mystore: committing txn %lu",
+ (unsigned long) txn_id(tid));
+ r = txn_commit(tid, txnflags);
+ }
+ }
+
+ if ( r != 0) {
+ if (mytid) {
+ abort_txn(mydb, *mytid);
+ *mytid = NULL;
+ }
+ if (r == DB_LOCK_DEADLOCK) {
+ r = CYRUSDB_AGAIN;
+ } else {
+ syslog(LOG_ERR, "DBERROR: mystore: error storing %s: %s",
+ key, db_strerror(r));
+ r = CYRUSDB_IOERROR;
+ }
+ }
+
+ return r;
+}
+
+static int create(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, DB_NOOVERWRITE, 0);
+}
+
+static int store(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, 0, 0);
+}
+
+static int create_nosync(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, DB_NOOVERWRITE,
+ DB_TXN_NOSYNC);
+}
+
+static int store_nosync(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, 0, DB_TXN_NOSYNC);
+}
+
+static int mydelete(struct db *mydb,
+ const char *key, int keylen,
+ struct txn **mytid, int txnflags, int force)
+{
+ int r = 0;
+ DBT k;
+ DB_TXN *tid;
+ DB *db = (DB *) mydb;
+
+ assert(dbinit && db);
+ assert(key && keylen);
+
+ r = gettid(mytid, &tid, "delete");
+ if (r) return r;
+
+ memset(&k, 0, sizeof(k));
+
+ k.data = (char *) key;
+ k.size = keylen;
+
+ if (!mytid) {
+ restart:
+ /* start txn for the write */
+ r = txn_begin(dbenv, NULL, &tid, 0);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: mydelete: error beginning txn: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "mydelete: starting txn %lu",
+ (unsigned long) txn_id(tid));
+ }
+ r = db->del(db, tid, &k, 0);
+ if (!mytid) {
+ /* finish txn for the write */
+ if (r) {
+ int r2;
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "mydelete: aborting txn %lu",
+ (unsigned long) txn_id(tid));
+ r2 = txn_abort(tid);
+ if (r2) {
+ syslog(LOG_ERR, "DBERROR: mydelete: error aborting txn: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+
+ if (r == DB_LOCK_DEADLOCK) {
+ goto restart;
+ }
+ } else {
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "mydelete: committing txn %lu",
+ (unsigned long) txn_id(tid));
+ r = txn_commit(tid, txnflags);
+ }
+ }
+
+ if (r != 0) {
+ if (mytid) {
+ abort_txn(mydb, *mytid);
+ *mytid = NULL;
+ }
+ if (r == DB_LOCK_DEADLOCK) {
+ r = CYRUSDB_AGAIN;
+ } else if (force && r == DB_NOTFOUND) {
+ r = CYRUSDB_OK; /* ignore not found errors */
+ } else {
+ syslog(LOG_ERR, "DBERROR: mydelete: error deleting %s: %s",
+ key, db_strerror(r));
+ r = CYRUSDB_IOERROR;
+ }
+ }
+
+ return r;
+}
+
+static int delete(struct db *db,
+ const char *key, int keylen,
+ struct txn **tid, int force)
+{
+ return mydelete(db, key, keylen, tid, 0, force);
+}
+
+static int delete_nosync(struct db *db,
+ const char *key, int keylen,
+ struct txn **tid, int force)
+{
+ return mydelete(db, key, keylen, tid, DB_TXN_NOSYNC, force);
+}
+
+static int mycommit(struct db *db __attribute__((unused)),
+ struct txn *tid, int txnflags)
+{
+ int r;
+ DB_TXN *t = (DB_TXN *) tid;
+
+ assert(dbinit && tid);
+
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "mycommit: committing txn %lu",
+ (unsigned long) txn_id(t));
+ r = txn_commit(t, txnflags);
+ switch (r) {
+ case 0:
+ break;
+ case EINVAL:
+ syslog(LOG_WARNING, "mycommit: tried to commit an already aborted transaction");
+ r = CYRUSDB_IOERROR;
+ break;
+ default:
+ syslog(LOG_ERR, "DBERROR: mycommit failed on commit: %s",
+ db_strerror(r));
+ r = CYRUSDB_IOERROR;
+ break;
+ }
+
+ return r;
+}
+
+static int commit_txn(struct db *db, struct txn *tid)
+{
+ return mycommit(db, tid, 0);
+}
+
+static int commit_nosync(struct db *db, struct txn *tid)
+{
+ return mycommit(db, tid, DB_TXN_NOSYNC);
+}
+
+static int abort_txn(struct db *db __attribute__((unused)),
+ struct txn *tid)
+{
+ int r;
+ DB_TXN *t = (DB_TXN *) tid;
+
+ assert(dbinit && tid);
+
+ if (CONFIG_DB_VERBOSE)
+ syslog(LOG_DEBUG, "abort_txn: aborting txn %lu",
+ (unsigned long) txn_id(t));
+ r = txn_abort(t);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: abort_txn: error aborting txn: %s",
+ db_strerror(r));
+ return CYRUSDB_IOERROR;
+ }
+
+ return 0;
+}
+
+struct cyrusdb_backend cyrusdb_berkeley =
+{
+ "berkeley", /* name */
+
+ &init,
+ &done,
+ &mysync,
+ &myarchive,
+
+ &open_btree,
+ &myclose,
+
+ &fetch,
+ &fetchlock,
+ &foreach,
+ &create,
+ &store,
+ &delete,
+
+ &commit_txn,
+ &abort_txn,
+
+ NULL,
+ NULL
+};
+
+struct cyrusdb_backend cyrusdb_berkeley_nosync =
+{
+ "berkeley-nosync", /* name */
+
+ &init,
+ &done,
+ &mysync,
+ &myarchive,
+
+ &open_btree,
+ &myclose,
+
+ &fetch,
+ &fetchlock,
+ &foreach,
+ &create_nosync,
+ &store_nosync,
+ &delete_nosync,
+
+ &commit_nosync,
+ &abort_txn,
+
+ NULL,
+ NULL
+};
+
+struct cyrusdb_backend cyrusdb_berkeley_hash =
+{
+ "berkeley-hash", /* name */
+
+ &init,
+ &done,
+ &mysync,
+ &myarchive,
+
+ &open_hash,
+ &myclose,
+
+ &fetch,
+ &fetchlock,
+ &foreach,
+ &create,
+ &store,
+ &delete,
+
+ &commit_txn,
+ &abort_txn,
+
+ NULL,
+ NULL
+};
+
+struct cyrusdb_backend cyrusdb_berkeley_hash_nosync =
+{
+ "berkeley-hash-nosync", /* name */
+
+ &init,
+ &done,
+ &mysync,
+ &myarchive,
+
+ &open_hash,
+ &myclose,
+
+ &fetch,
+ &fetchlock,
+ &foreach,
+ &create_nosync,
+ &store_nosync,
+ &delete_nosync,
+
+ &commit_nosync,
+ &abort_txn,
+
+ NULL,
+ NULL
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_flat.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_flat.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_flat.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_flat.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,743 @@
+/* cyrusdb_flat: a sorted flat textfile backend
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: cyrusdb_flat.c,v 1.31.2.3 2004/03/24 19:53:14 ken3 Exp $ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <syslog.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+
+#include "assert.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "map.h"
+#include "bsearch.h"
+#include "lock.h"
+#include "retry.h"
+#include "util.h"
+#include "xmalloc.h"
+
+/* we have the file locked iff we have an outstanding transaction */
+
+struct db {
+ char *fname;
+
+ int fd; /* current file open */
+ ino_t ino;
+
+ const char *base; /* contents of file */
+ unsigned long size; /* actual size */
+ unsigned long len; /* mapped size */
+};
+
+struct txn {
+ char *fnamenew;
+ int fd;
+};
+
+/* other routines call this one when they fail */
+static int abort_txn(struct db *db, struct txn *tid)
+{
+ int r = CYRUSDB_OK;
+ int rw = 0;
+ struct stat sbuf;
+
+ assert(db && tid);
+
+ /* cleanup done while lock is held */
+ if (tid->fnamenew) {
+ unlink(tid->fnamenew);
+ free(tid->fnamenew);
+ rw = 1;
+ }
+
+ /* release lock */
+ r = lock_unlock(db->fd);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: unlocking db %s: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ if (rw) {
+ /* return to our normally scheduled fd */
+ if (!r && fstat(db->fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+ if (!r) {
+ map_free(&db->base, &db->len);
+ map_refresh(db->fd, 0, &db->base, &db->len, sbuf.st_size,
+ db->fname, 0);
+ db->size = sbuf.st_size;
+ }
+ }
+
+ free(tid);
+
+ return 0;
+}
+
+static void free_db(struct db *db)
+{
+ if (db) {
+ if (db->fname) free(db->fname);
+ free(db);
+ }
+}
+
+static struct txn *new_txn(void)
+{
+ struct txn *ret = (struct txn *) xmalloc(sizeof(struct txn));
+ ret->fnamenew = NULL;
+ ret->fd = 0;
+ return ret;
+}
+
+static int init(const char *dbdir __attribute__((unused)),
+ int myflags __attribute__((unused)))
+{
+ return 0;
+}
+
+static int done(void)
+{
+ return 0;
+}
+
+static int mysync(void)
+{
+ return 0;
+}
+
+static int myarchive(const char **fnames, const char *dirname)
+{
+ int r, d_length, d_remain;
+ const char **fname;
+ char dstname[1024], *dp;
+
+ strlcpy(dstname, dirname, sizeof(dstname));
+ d_length = strlen(dstname);
+ dp = dstname + d_length;
+ d_remain = sizeof(dstname)-d_length;
+
+ /* archive those files specified by the app */
+ for (fname = fnames; *fname != NULL; ++fname) {
+ syslog(LOG_DEBUG, "archiving database file: %s", *fname);
+ strlcpy(dp, strrchr(*fname, '/'), d_remain);
+ r = cyrusdb_copyfile(*fname, dstname);
+ if (r) {
+ syslog(LOG_ERR,
+ "DBERROR: error archiving database file: %s", *fname);
+ return CYRUSDB_IOERROR;
+ }
+ }
+
+ return 0;
+}
+
+static int myopen(const char *fname, int flags, struct db **ret)
+{
+ struct db *db = (struct db *) xzmalloc(sizeof(struct db));
+ struct stat sbuf;
+
+ assert(fname && ret);
+
+ db->fd = open(fname, O_RDWR, 0644);
+ if (db->fd == -1 && errno == ENOENT && (flags & CYRUSDB_CREATE)) {
+ if (cyrus_mkdir(fname, 0755) == -1) return CYRUSDB_IOERROR;
+
+ db->fd = open(fname, O_RDWR | O_CREAT, 0644);
+ }
+
+ if (db->fd == -1) {
+ int level = (flags & CYRUSDB_CREATE) ? LOG_ERR : LOG_DEBUG;
+ syslog(level, "IOERROR: opening %s: %m", fname);
+ free_db(db);
+ return CYRUSDB_IOERROR;
+ }
+
+ if (fstat(db->fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat on %s: %m", fname);
+ close(db->fd);
+ free_db(db);
+ return CYRUSDB_IOERROR;
+ }
+ db->ino = sbuf.st_ino;
+
+ map_refresh(db->fd, 0, &db->base, &db->len, sbuf.st_size,
+ fname, 0);
+ db->size = sbuf.st_size;
+
+ db->fname = xstrdup(fname);
+
+ *ret = db;
+ return 0;
+}
+
+static int myclose(struct db *db)
+{
+ assert(db);
+
+ map_free(&db->base, &db->len);
+ close(db->fd);
+ free_db(db);
+
+ return 0;
+}
+
+static int starttxn_or_refetch(struct db *db, struct txn **mytid)
+{
+ int r = 0;
+ struct stat sbuf;
+
+ assert(db);
+
+ if (mytid && !*mytid) {
+ const char *lockfailaction;
+
+ /* start txn; grab lock */
+
+ r = lock_reopen(db->fd, db->fname, &sbuf, &lockfailaction);
+ if (r < 0) {
+ syslog(LOG_ERR, "IOERROR: %s %s: %m", lockfailaction, db->fname);
+ return CYRUSDB_IOERROR;
+ }
+ *mytid = new_txn();
+
+ if (db->ino != sbuf.st_ino) {
+ map_free(&db->base, &db->len);
+ }
+ map_refresh(db->fd, 0, &db->base, &db->len, sbuf.st_size,
+ db->fname, 0);
+
+ /* we now have the latest & greatest open */
+ db->size = sbuf.st_size;
+ db->ino = sbuf.st_ino;
+ }
+
+ if (!mytid) {
+ /* no txn, but let's try to be reasonably up-to-date */
+
+ if (stat(db->fname, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: stating %s: %m", db->fname);
+ return CYRUSDB_IOERROR;
+ }
+
+ if (sbuf.st_ino != db->ino) {
+ /* reopen */
+ int newfd = open(db->fname, O_RDWR);
+
+ if (newfd == -1) {
+ /* fail! */
+ syslog(LOG_ERR, "couldn't reopen %s: %m", db->fname);
+ return CYRUSDB_IOERROR;
+ }
+ dup2(newfd, db->fd);
+ close(newfd);
+ if (stat(db->fname, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: stating %s: %m", db->fname);
+ return CYRUSDB_IOERROR;
+ }
+
+ db->ino = sbuf.st_ino;
+ map_free(&db->base, &db->len);
+ }
+ map_refresh(db->fd, 0, &db->base, &db->len,
+ sbuf.st_size, db->fname, 0);
+ db->size = sbuf.st_size;
+ }
+
+ return 0;
+}
+
+static int myfetch(struct db *db,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid)
+{
+ int r = 0;
+ int offset;
+ unsigned long len;
+
+ assert(db);
+
+ if (data) *data = NULL;
+ if (datalen) *datalen = 0;
+
+ r = starttxn_or_refetch(db, mytid);
+ if (r) return r;
+
+ offset = bsearch_mem(key, 1, db->base, db->size, 0, &len);
+ if (len) {
+ if (data) *data = db->base + offset + keylen + 1;
+ /* subtract one for \t, and one for the \n */
+ if (data) *datalen = len - keylen - 2;
+ } else {
+ r = CYRUSDB_NOTFOUND;
+ }
+
+ return r;
+}
+
+static int fetch(struct db *mydb,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid)
+{
+ return myfetch(mydb, key, keylen, data, datalen, mytid);
+}
+
+static int fetchlock(struct db *db,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid)
+{
+ return myfetch(db, key, keylen, data, datalen, mytid);
+}
+
+#define GETENTRY(p) \
+ key = p; \
+ data = strchr(key, '\t'); \
+ \
+ if (!data) { \
+ /* huh, might be corrupted? */ \
+ r = CYRUSDB_IOERROR; \
+ break; \
+ } \
+ keylen = data - key; \
+ data++; /* skip of the \t */ \
+ \
+ dataend = strchr(data, '\n'); \
+ if (!dataend) { \
+ /* huh, might be corrupted? */ \
+ r = CYRUSDB_IOERROR; \
+ break; \
+ } \
+ datalen = dataend - data;
+
+static int foreach(struct db *db,
+ char *prefix, int prefixlen,
+ foreach_p *goodp,
+ foreach_cb *cb, void *rock,
+ struct txn **mytid)
+{
+ int r = CYRUSDB_OK;
+ int offset;
+ unsigned long len;
+ const char *p, *pend;
+
+ /* for use inside the loop, but we need the values to be retained
+ * from loop to loop */
+ const char *key = NULL;
+ size_t keylen = 0;
+ const char *data = NULL, *dataend = NULL;
+ size_t datalen = 0;
+ int dontmove = 0;
+
+ /* For when we have a transaction running */
+ char *savebuf = NULL;
+ size_t savebuflen = 0;
+ size_t savebufsize = 0;
+
+ /* for the local iteration so that the db can change out from under us */
+ const char *dbbase = NULL;
+ unsigned long dblen = 0;
+ int dbfd = -1;
+
+ r = starttxn_or_refetch(db, mytid);
+ if (r) return r;
+
+ if(!mytid) {
+ /* No transaction, use the fast method to avoid stomping on our
+ * memory map if changes happen */
+ dbfd = dup(db->fd);
+ if(dbfd == -1) return CYRUSDB_IOERROR;
+
+ map_refresh(dbfd, 1, &dbbase, &dblen, db->size, db->fname, 0);
+
+ /* drop our read lock on the file, since we don't really care
+ * if it gets replaced out from under us, our mmap stays on the
+ * old version */
+ lock_unlock(db->fd);
+ } else {
+ /* use the same variables as in the no transaction case, just to
+ * get things set up */
+ dbbase = db->base;
+ dblen = db->len;
+ }
+
+ if (prefix) {
+ char *realprefix;
+ if(prefix[prefixlen] != '\0') {
+ realprefix = xmalloc(prefixlen+1);
+ memcpy(realprefix, prefix, prefixlen);
+ realprefix[prefixlen] = '\0';
+ } else {
+ realprefix = prefix;
+ }
+ offset = bsearch_mem(realprefix, 1, dbbase, db->size, 0, &len);
+
+ if(prefix[prefixlen] != '\0') free(realprefix);
+ } else {
+ offset = 0;
+ }
+
+ p = dbbase + offset;
+ pend = dbbase + db->size;
+
+ while (p < pend) {
+ if(!dontmove) {
+ GETENTRY(p)
+ }
+ else dontmove = 0;
+
+ /* does it still match prefix? */
+ if (keylen < prefixlen) break;
+ if (prefixlen && memcmp(key, prefix, prefixlen)) break;
+
+ if (!goodp || goodp(rock, key, keylen, data, datalen)) {
+ unsigned long ino = db->ino;
+ unsigned long sz = db->size;
+
+ if(mytid) {
+ /* transaction present, this means we do the slow way */
+ if (keylen > savebuflen) {
+ int dblsize = 2 * savebuflen;
+ int addsize = keylen + 32;
+
+ savebuflen = (dblsize > addsize) ? dblsize : addsize;
+ savebuf = xrealloc(savebuf, savebuflen);
+ }
+ memcpy(savebuf, key, keylen);
+ savebuf[keylen] = '\0';
+ savebufsize = keylen;
+ }
+
+ /* make callback */
+ r = cb(rock, key, keylen, data, datalen);
+ if (r) break;
+
+ if(mytid) {
+ /* reposition? (we made a change) */
+ if (!(ino == db->ino && sz == db->size)) {
+ /* something changed in the file; reseek */
+ offset = bsearch_mem(savebuf, 1, db->base, db->size,
+ 0, &len);
+ p = db->base + offset;
+
+ GETENTRY(p);
+
+ /* 'key' might not equal 'savebuf'. if it's different,
+ we want to stay where we are. if it's the same, we
+ should move on to the next one */
+ if (savebufsize == keylen &&
+ !memcmp(savebuf, key, savebufsize)) {
+ p = dataend + 1;
+ } else {
+ /* 'savebuf' got deleted, so we're now pointing at the
+ right thing */
+ dontmove = 1;
+ }
+ }
+ }
+ }
+
+ p = dataend + 1;
+ }
+
+ if(!mytid) {
+ /* cleanup the fast method */
+ map_free(&dbbase, &dblen);
+ close(dbfd);
+ } else if(savebuf) {
+ free(savebuf);
+ }
+
+ return r;
+}
+
+#undef GETENTRY
+
+static int mystore(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **mytid, int overwrite)
+{
+ int r = 0;
+ char fnamebuf[1024];
+ int offset;
+ unsigned long len;
+ const char *lockfailaction;
+ int writefd;
+ struct iovec iov[10];
+ int niov;
+ struct stat sbuf;
+ char *tmpkey = NULL;
+
+ /* lock file, if needed */
+ if (!mytid || !*mytid) {
+ r = lock_reopen(db->fd, db->fname, &sbuf, &lockfailaction);
+ if (r < 0) {
+ syslog(LOG_ERR, "IOERROR: %s %s: %m", lockfailaction, db->fname);
+ return CYRUSDB_IOERROR;
+ }
+
+ if (sbuf.st_ino != db->ino) {
+ db->ino = sbuf.st_ino;
+ map_free(&db->base, &db->len);
+ map_refresh(db->fd, 0, &db->base, &db->len,
+ sbuf.st_size, db->fname, 0);
+ db->size = sbuf.st_size;
+ }
+
+ if (mytid) {
+ *mytid = new_txn();
+ }
+ }
+
+ /* if we need to truncate the key, do so */
+ if(key[keylen] != '\0') {
+ tmpkey = xmalloc(keylen + 1);
+ memcpy(tmpkey, key, keylen);
+ tmpkey[keylen] = '\0';
+ key = tmpkey;
+ }
+
+ /* find entry, if it exists */
+ offset = bsearch_mem(key, 1, db->base, db->size, 0, &len);
+
+ /* overwrite? */
+ if (len && !overwrite) {
+ if (mytid) abort_txn(db, *mytid);
+ if (tmpkey) free(tmpkey);
+ return CYRUSDB_EXISTS;
+ }
+
+ /* write new file */
+ if (mytid && (*mytid)->fnamenew) {
+ strlcpy(fnamebuf, (*mytid)->fnamenew, sizeof(fnamebuf));
+ } else {
+ strlcpy(fnamebuf, db->fname, sizeof(fnamebuf));
+ strlcat(fnamebuf, ".NEW", sizeof(fnamebuf));
+ }
+
+ unlink(fnamebuf);
+ r = writefd = open(fnamebuf, O_RDWR | O_CREAT, 0666);
+ if (r < 0) {
+ syslog(LOG_ERR, "opening %s for writing failed: %m", fnamebuf);
+ if (mytid) abort_txn(db, *mytid);
+ if (tmpkey) free(tmpkey);
+ return CYRUSDB_IOERROR;
+ }
+
+ niov = 0;
+ if (offset) {
+ WRITEV_ADD_TO_IOVEC(iov, niov, (char *) db->base, offset);
+ }
+
+ if (data) {
+ /* new entry */
+ WRITEV_ADD_TO_IOVEC(iov, niov, (char *) key, keylen);
+ WRITEV_ADD_TO_IOVEC(iov, niov, "\t", 1);
+ WRITEV_ADD_TO_IOVEC(iov, niov, (char *) data, datalen);
+ WRITEV_ADD_TO_IOVEC(iov, niov, "\n", 1);
+ }
+
+ if (db->size - (offset + len) > 0) {
+ WRITEV_ADD_TO_IOVEC(iov, niov, (char *) db->base + offset + len,
+ db->size - (offset + len));
+ }
+
+ /* do the write */
+ r = retry_writev(writefd, iov, niov);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
+ close(writefd);
+ if (mytid) abort_txn(db, *mytid);
+ /* xxx return error ? */
+ }
+ r = 0;
+
+ if (mytid) {
+ /* setup so further accesses will be against fname.NEW */
+ if (fstat(writefd, &sbuf) == -1) {
+ /* xxx ? */
+ }
+
+ if (!(*mytid)->fnamenew) (*mytid)->fnamenew = xstrdup(fnamebuf);
+ if ((*mytid)->fd) close((*mytid)->fd);
+ (*mytid)->fd = writefd;
+ map_free(&db->base, &db->len);
+ map_refresh(writefd, 0, &db->base, &db->len, sbuf.st_size,
+ fnamebuf, 0);
+ db->size = sbuf.st_size;
+ } else {
+ /* commit immediately */
+ if (fsync(writefd) ||
+ fstat(writefd, &sbuf) == -1 ||
+ rename(fnamebuf, db->fname) == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
+ close(writefd);
+ if (tmpkey) free(tmpkey);
+ return CYRUSDB_IOERROR;
+ }
+
+ close(db->fd);
+ db->fd = writefd;
+
+ /* release lock */
+ r = lock_unlock(db->fd);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: unlocking db %s: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ db->ino = sbuf.st_ino;
+ map_free(&db->base, &db->len);
+ map_refresh(writefd, 0, &db->base, &db->len, sbuf.st_size,
+ db->fname, 0);
+ db->size = sbuf.st_size;
+ }
+
+ if(tmpkey) free(tmpkey);
+
+ return r;
+}
+
+static int create(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, 0);
+}
+
+static int store(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, 1);
+}
+
+static int delete(struct db *db,
+ const char *key, int keylen,
+ struct txn **mytid, int force __attribute__((unused)))
+{
+ return mystore(db, key, keylen, NULL, 0, mytid, 1);
+}
+
+static int commit_txn(struct db *db, struct txn *tid)
+{
+ int writefd;
+ int r = 0;
+ struct stat sbuf;
+
+ assert(db && tid);
+
+ if (tid->fnamenew) {
+ /* we wrote something */
+
+ writefd = tid->fd;
+ if (fsync(writefd) ||
+ fstat(writefd, &sbuf) == -1 ||
+ rename(tid->fnamenew, db->fname) == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", tid->fnamenew);
+ close(writefd);
+ r = CYRUSDB_IOERROR;
+ } else {
+ /* successful */
+ /* we now deal exclusively with our new fd */
+ close(db->fd);
+ db->fd = writefd;
+ db->ino = sbuf.st_ino;
+ }
+ free(tid->fnamenew);
+ } else {
+ /* read-only txn */
+ /* release lock */
+ r = lock_unlock(db->fd);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: unlocking db %s: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+ }
+
+ free(tid);
+ return r;
+}
+
+struct cyrusdb_backend cyrusdb_flat =
+{
+ "flat", /* name */
+
+ &init,
+ &done,
+ &mysync,
+ &myarchive,
+
+ &myopen,
+ &myclose,
+
+ &fetch,
+ &fetchlock,
+ &foreach,
+ &create,
+ &store,
+ &delete,
+
+ &commit_txn,
+ &abort_txn,
+
+ NULL,
+ NULL
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_quotalegacy.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_quotalegacy.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_quotalegacy.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_quotalegacy.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,786 @@
+/* cyrusdb_quotalegacy: cyrusdb backend for accessing legacy quota files
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: cyrusdb_quotalegacy.c,v 1.1.2.9 2005/04/20 18:47:48 ken3 Exp $ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <syslog.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <glob.h>
+
+#include "assert.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "hash.h"
+#include "map.h"
+#include "libcyr_cfg.h"
+#include "lock.h"
+#include "retry.h"
+#include "util.h"
+#include "xmalloc.h"
+
+#define FNAME_QUOTADIR "/quota/"
+#define MAX_QUOTA_PATH 4096
+
+/* we have the file locked iff we have an outstanding transaction */
+
+struct db {
+ char *path;
+
+ char *data; /* allocated buffer for fetched data */
+
+ hash_table table; /* transaction (hash table of sub-transactions) */
+};
+
+struct subtxn {
+ int fd;
+
+ char *fnamenew;
+ int fdnew;
+
+ int delete;
+};
+
+int abort_txn(struct db *db __attribute__((unused)), struct txn *tid);
+
+/* simple hash so it's easy to find these things in the filesystem;
+ our human time is worth more than efficiency */
+static void hash_quota(char *buf, size_t size, const char *qr, char *path)
+{
+ int config_virtdomains = libcyrus_config_getswitch(CYRUSOPT_VIRTDOMAINS);
+ const char *idx;
+ char c, *p;
+ unsigned len;
+
+ if ((len = snprintf(buf, size, "%s", path)) >= size) {
+ fatal("insufficient buffer size in hash_quota", EC_TEMPFAIL);
+ }
+ buf += len;
+ size -= len;
+
+ if (config_virtdomains && (p = strchr(qr, '!'))) {
+ *p = '\0'; /* split domain!qr */
+ c = (char) dir_hash_c(qr);
+ if ((len = snprintf(buf, size, "%s%c/%s",
+ FNAME_DOMAINDIR, c, qr)) >= size) {
+ fatal("insufficient buffer size in hash_quota", EC_TEMPFAIL);
+ }
+ *p++ = '!'; /* reassemble domain!qr */
+ qr = p;
+ buf += len;
+ size -= len;
+
+ if (!*qr) {
+ /* quota for entire domain */
+ if (snprintf(buf, size, "%sroot", FNAME_QUOTADIR) >= size) {
+ fatal("insufficient buffer size in hash_quota",
+ EC_TEMPFAIL);
+ }
+ return;
+ }
+ }
+
+ idx = strchr(qr, '.'); /* skip past user. */
+ if (idx == NULL) {
+ idx = qr;
+ } else {
+ idx++;
+ }
+ c = (char) dir_hash_c(idx);
+
+ if (snprintf(buf, size, "%s%c/%s", FNAME_QUOTADIR, c, qr) >= size) {
+ fatal("insufficient buffer size in hash_quota", EC_TEMPFAIL);
+ }
+}
+
+/* other routines call this one when they fail */
+static int abort_subtxn(char *fname, struct subtxn *tid)
+{
+ int r = CYRUSDB_OK;
+
+ assert(fname && tid);
+
+ /* cleanup done while lock is held */
+ if (tid->fnamenew) {
+ unlink(tid->fnamenew);
+ free(tid->fnamenew);
+ }
+
+ if (tid->fdnew != -1) {
+ r = close(tid->fdnew);
+ }
+
+ if (tid->fd != -1) {
+ /* release lock */
+ r = lock_unlock(tid->fd);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: unlocking %s: %m", fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ /* close */
+ r = close(tid->fd);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: closing %s: %m", fname);
+ r = CYRUSDB_IOERROR;
+ }
+ }
+
+ free(tid);
+
+ return r;
+}
+
+static int commit_subtxn(char *fname, struct subtxn *tid)
+{
+ int writefd;
+ int r = 0;
+ struct stat sbuf;
+
+ assert(fname && tid);
+
+ if ((writefd = tid->fdnew) != -1) {
+ /* we wrote something */
+
+ if (fsync(writefd) ||
+ fstat(writefd, &sbuf) == -1 ||
+ rename(tid->fnamenew, fname) == -1 ||
+ lock_unlock(writefd) == -1) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", tid->fnamenew);
+ r = CYRUSDB_IOERROR;
+ }
+ close(writefd);
+ free(tid->fnamenew);
+ } else if (tid->delete) {
+ /* delete file */
+ r = unlink(fname);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: unlinking %s: %m", fname);
+ r = CYRUSDB_IOERROR;
+ }
+ } else {
+ /* read-only txn */
+ }
+
+ /* release lock */
+ if (tid->fd != -1) {
+ r = lock_unlock(tid->fd);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: unlocking %s: %m", fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ r = close(tid->fd);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: closing %s: %m", fname);
+ r = CYRUSDB_IOERROR;
+ }
+ }
+
+ free(tid);
+
+ return r;
+}
+
+static void free_db(struct db *db)
+{
+ if (db) {
+ if (db->path) free(db->path);
+ if (db->data) free(db->data);
+ free_hash_table(&db->table, NULL);
+ free(db);
+ }
+}
+
+static struct subtxn *new_subtxn(const char *fname __attribute__((unused)),
+ int fd)
+{
+ struct subtxn *ret = (struct subtxn *) xmalloc(sizeof(struct subtxn));
+
+ ret->fd = fd;
+ ret->fnamenew = NULL;
+ ret->fdnew = -1;
+ ret->delete = 0;
+ return ret;
+}
+
+static int init(const char *dbdir __attribute__((unused)),
+ int myflags __attribute__((unused)))
+{
+ return 0;
+}
+
+static int done(void)
+{
+ return 0;
+}
+
+static int mysync(void)
+{
+ return 0;
+}
+
+static int myarchive(const char **fnames __attribute__((unused)),
+ const char *dirname __attribute__((unused)))
+{
+ return 0;
+}
+
+static int myopen(const char *fname, int flags, struct db **ret)
+{
+ struct db *db = (struct db *) xzmalloc(sizeof(struct db));
+ struct stat sbuf;
+ char *p;
+ int r;
+
+ assert(fname && ret);
+
+ db->path = xstrdup(fname);
+ construct_hash_table(&db->table, 200, 0);
+
+ /* strip any filename from the path */
+ if ((p = strrchr(db->path, '/'))) *p = '\0';
+
+ r = stat(db->path, &sbuf);
+ if (r == -1 && errno == ENOENT && (flags & CYRUSDB_CREATE)) {
+ if (cyrus_mkdir(fname, 0755) != -1) {
+ r = stat(db->path, &sbuf);
+ }
+ }
+
+ if (r == -1) {
+ int level = (flags & CYRUSDB_CREATE) ? LOG_ERR : LOG_DEBUG;
+ syslog(level, "IOERROR: stating %s: %m", db->path);
+ free_db(db);
+ return CYRUSDB_IOERROR;
+ }
+
+ *ret = db;
+ return 0;
+}
+
+static int myclose(struct db *db)
+{
+ assert(db);
+
+ free_db(db);
+
+ return 0;
+}
+
+static int myfetch(struct db *db, char *quota_path,
+ const char **data, int *datalen,
+ struct txn **tid)
+{
+ struct subtxn *mytid = NULL;
+ int quota_fd;
+ const char *quota_base = 0;
+ unsigned long quota_len = 0;
+
+ assert(db);
+
+ if (data) *data = NULL;
+ if (datalen) *datalen = 0;
+
+ if (!data) {
+ /* just check if the key exists */
+ struct stat sbuf;
+
+ if (stat(quota_path, &sbuf) == -1)
+ return CYRUSDB_NOTFOUND;
+
+ return 0;
+ }
+
+ if (tid) {
+ if (!*tid)
+ *tid = (struct txn *) &db->table;
+ else
+ mytid = (struct subtxn *) hash_lookup(quota_path, &db->table);
+ }
+
+ /* open and lock file, if needed */
+ if (!mytid) {
+ quota_fd = open(quota_path, O_RDWR, 0);
+ if (quota_fd == -1) {
+ if (errno == ENOENT) {
+ /* key doesn't exist */
+ return CYRUSDB_NOTFOUND;
+ }
+
+ syslog(LOG_ERR, "IOERROR: opening quota file %s: %m", quota_path);
+ return CYRUSDB_IOERROR;
+ }
+
+ if (tid) {
+ int r;
+ struct stat sbuf;
+ const char *lockfailaction;
+
+ r = lock_reopen(quota_fd, quota_path, &sbuf, &lockfailaction);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: %s quota %s: %m", lockfailaction,
+ quota_path);
+ return CYRUSDB_IOERROR;
+ }
+
+ mytid = new_subtxn(quota_path, quota_fd);
+ hash_insert(quota_path, mytid, &db->table);
+ }
+ }
+ else
+ quota_fd = mytid->fd;
+
+ map_refresh(quota_fd, 1, "a_base, "a_len,
+ MAP_UNKNOWN_LEN, quota_path, 0);
+
+ if (quota_len) {
+ char *p, *eol;
+
+ db->data = xrealloc(db->data, quota_len);
+ memcpy(db->data, quota_base, quota_len);
+
+ p = db->data;
+ eol = memchr(p, '\n', quota_len - (p - db->data));
+ if (!eol) {
+ map_free("a_base, "a_len);
+ return CYRUSDB_IOERROR;
+ }
+ /* convert the separating \n to SP */
+ *eol = ' ';
+
+ p = eol + 1;
+ eol = memchr(p, '\n', quota_len - (p - db->data));
+ if (!eol) {
+ map_free("a_base, "a_len);
+ return CYRUSDB_IOERROR;
+ }
+ /* convert the terminating \n to \0 */
+ *eol = '\0';
+
+ *data = db->data;
+ *datalen = strlen(db->data);
+ }
+
+ map_free("a_base, "a_len);
+ if (!tid) close(quota_fd);
+
+ return 0;
+}
+
+static int fetch(struct db *db,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **tid)
+{
+ char quota_path[MAX_QUOTA_PATH+1], *tmpkey = NULL;
+
+ /* if we need to truncate the key, do so */
+ if (key[keylen] != '\0') {
+ tmpkey = xmalloc(keylen + 1);
+ memcpy(tmpkey, key, keylen);
+ tmpkey[keylen] = '\0';
+ key = tmpkey;
+ }
+
+ hash_quota(quota_path, sizeof(quota_path), key, db->path);
+ if (tmpkey) free(tmpkey);
+
+ return myfetch(db, quota_path, data, datalen, tid);
+}
+
+static const char *path_to_qr(const char *path, char *buf)
+{
+ const char *qr;
+ char *p;
+
+ qr = strrchr(path, '/') + 1;
+ if ((p = strstr(path, FNAME_DOMAINDIR))) {
+ /* use the quota_path as a buffer to construct virtdomain qr */
+ p += strlen(FNAME_DOMAINDIR) + 2; /* +2 for hashdir */
+ sprintf(buf, "%.*s!%s", (int) strcspn(p, "/"), p,
+ strcmp(qr, "root") ? qr : "");
+ qr = buf;
+ }
+
+ return qr;
+}
+
+static int compar_qr(const void *v1, const void *v2)
+{
+ const char *qr1, *qr2;
+ char qrbuf1[MAX_QUOTA_PATH+1], qrbuf2[MAX_QUOTA_PATH+1];
+
+ qr1 = path_to_qr(*((const char **) v1), qrbuf1);
+ qr2 = path_to_qr(*((const char **) v2), qrbuf2);
+
+ return strcmp(qr1, qr2);
+}
+
+static int foreach(struct db *db,
+ char *prefix, int prefixlen,
+ foreach_p *goodp,
+ foreach_cb *cb, void *rock,
+ struct txn **tid)
+{
+ int r = CYRUSDB_OK;
+ int config_virtdomains = libcyrus_config_getswitch(CYRUSOPT_VIRTDOMAINS);
+ char quota_path[MAX_QUOTA_PATH+1];
+ glob_t globbuf;
+ int i;
+ char *tmpprefix = NULL, *p = NULL;
+
+ /* if we need to truncate the prefix, do so */
+ if (prefix[prefixlen] != '\0') {
+ tmpprefix = xmalloc(prefixlen + 1);
+ memcpy(tmpprefix, prefix, prefixlen);
+ tmpprefix[prefixlen] = '\0';
+ prefix = tmpprefix;
+ }
+
+ hash_quota(quota_path, sizeof(quota_path), prefix, db->path);
+ if (config_virtdomains && (p = strchr(prefix, '!')))
+ prefix = p + 1;
+
+ /* strip off the qr specific path and replace with pattern */
+ sprintf(strstr(quota_path, FNAME_QUOTADIR) + strlen(FNAME_QUOTADIR),
+ "?/%s*", prefix);
+
+ /* search for the quotaroots */
+ glob(quota_path, GLOB_NOSORT, NULL, &globbuf);
+
+ if (config_virtdomains) {
+ if (!prefixlen) {
+ /* search for all virtdomain quotaroots */
+ snprintf(quota_path, sizeof(quota_path), "%s%s?/*%s?/*",
+ db->path, FNAME_DOMAINDIR, FNAME_QUOTADIR);
+ glob(quota_path, GLOB_NOSORT | GLOB_APPEND, NULL, &globbuf);
+
+ /* search for all domain quotas */
+ snprintf(quota_path, sizeof(quota_path), "%s%s?/*%sroot",
+ db->path, FNAME_DOMAINDIR, FNAME_QUOTADIR);
+ glob(quota_path, GLOB_NOSORT | GLOB_APPEND, NULL, &globbuf);
+ }
+ else if (!strlen(prefix)) {
+ /* search for the domain quotas */
+ strcpy(strstr(quota_path, FNAME_QUOTADIR) + strlen(FNAME_QUOTADIR),
+ "root");
+ glob(quota_path, GLOB_NOSORT | GLOB_APPEND, NULL, &globbuf);
+ }
+ }
+ if (tmpprefix) free(tmpprefix);
+
+ if (tid && !*tid) *tid = (struct txn *) &db->table;
+
+ /* sort the quotaroots (ignoring paths) */
+ qsort(globbuf.gl_pathv, globbuf.gl_pathc, sizeof(char *), &compar_qr);
+
+ for (i = 0; i < globbuf.gl_pathc; i++) {
+ const char *data, *key;
+ int keylen, datalen;
+
+ r = myfetch(db, globbuf.gl_pathv[i], &data, &datalen, tid);
+ if (r) break;
+
+ key = path_to_qr(globbuf.gl_pathv[i], quota_path);
+ keylen = strlen(key);
+
+ if (!goodp || goodp(rock, key, keylen, data, datalen)) {
+ /* make callback */
+ r = cb(rock, key, keylen, data, datalen);
+ if (r) break;
+ }
+ }
+
+ globfree(&globbuf);
+
+ return r;
+}
+
+static int mystore(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid, int overwrite)
+{
+ char quota_path[MAX_QUOTA_PATH+1], *tmpkey = NULL;
+ struct subtxn *mytid = NULL;
+ int r = 0;
+
+ /* if we need to truncate the key, do so */
+ if (key[keylen] != '\0') {
+ tmpkey = xmalloc(keylen + 1);
+ memcpy(tmpkey, key, keylen);
+ tmpkey[keylen] = '\0';
+ key = tmpkey;
+ }
+
+ hash_quota(quota_path, sizeof(quota_path), key, db->path);
+ if (tmpkey) free(tmpkey);
+
+ if (tid) {
+ if (!*tid)
+ *tid = (struct txn *) &db->table;
+ else
+ mytid = (struct subtxn *) hash_lookup(quota_path, &db->table);
+ }
+
+ /* open and lock file, if needed */
+ if (!mytid) {
+ int fd;
+ struct stat sbuf;
+ const char *lockfailaction;
+
+ fd = open(quota_path, O_RDWR, 0644);
+ if (fd == -1 && errno == ENOENT && data) {
+ if (cyrus_mkdir(quota_path, 0755) != -1) {
+ fd = open(quota_path, O_RDWR | O_CREAT, 0644);
+ }
+ }
+ if (fd == -1 && (errno != ENOENT || data)) {
+ syslog(LOG_ERR, "IOERROR: opening quota file %s: %m", quota_path);
+ return CYRUSDB_IOERROR;
+ }
+
+ if (fd != -1) {
+ r = lock_reopen(fd, quota_path, &sbuf, &lockfailaction);
+ if (r == -1) {
+ syslog(LOG_ERR, "IOERROR: %s quota %s: %m", lockfailaction,
+ quota_path);
+ return CYRUSDB_IOERROR;
+ }
+ }
+
+ mytid = new_subtxn(quota_path, fd);
+
+ if (tid)
+ hash_insert(quota_path, mytid, &db->table);
+ }
+
+ if (!data) {
+ mytid->delete = 1;
+ }
+ else {
+ char new_quota_path[MAX_QUOTA_PATH+1], *buf, *p;
+ int newfd = -1, r1 = 0;
+ ssize_t n;
+
+ if (mytid->fd != -1 && !overwrite) {
+ if (tid)
+ abort_txn(db, *tid);
+ else
+ abort_subtxn(quota_path, mytid);
+ return CYRUSDB_EXISTS;
+ }
+
+ if (mytid->fdnew == -1) {
+ strlcpy(new_quota_path, quota_path, sizeof(new_quota_path));
+ strlcat(new_quota_path, ".NEW", sizeof(new_quota_path));
+
+ unlink(new_quota_path);
+ newfd = open(new_quota_path, O_CREAT | O_TRUNC | O_RDWR, 0666);
+ if (newfd == -1 && errno == ENOENT) {
+ if (cyrus_mkdir(new_quota_path, 0755) != -1)
+ newfd = open(new_quota_path, O_CREAT | O_TRUNC | O_RDWR, 0666);
+ }
+ if (newfd == -1) {
+ syslog(LOG_ERR, "IOERROR: creating quota file %s: %m",
+ new_quota_path);
+ if (tid)
+ abort_txn(db, *tid);
+ else
+ abort_subtxn(quota_path, mytid);
+ return CYRUSDB_IOERROR;
+ }
+
+ mytid->fdnew = newfd;
+ r = lock_blocking(newfd);
+ if (r) {
+ syslog(LOG_ERR, "IOERROR: locking quota file %s: %m",
+ new_quota_path);
+ if (tid)
+ abort_txn(db, *tid);
+ else
+ abort_subtxn(quota_path, mytid);
+ return CYRUSDB_IOERROR;
+ }
+ }
+
+ buf = xmalloc(datalen+1);
+ memcpy(buf, data, datalen);
+ /* convert separating SP to \n */
+ p = memchr(buf, ' ', datalen);
+ *p = '\n';
+ /* add a terminating \n */
+ buf[datalen] = '\n';
+
+ lseek(mytid->fdnew, 0, SEEK_SET);
+ n = write(mytid->fdnew, buf, datalen+1);
+ if (n == datalen+1) r1 = ftruncate(mytid->fdnew, datalen+1);
+ free(buf);
+
+ if (n != datalen+1 || r1 == -1) {
+ if (n == -1 || r1 == -1)
+ syslog(LOG_ERR, "IOERROR: writing quota file %s: %m",
+ new_quota_path);
+ else
+ syslog(LOG_ERR, "IOERROR: writing quota file %s: failed to write %d bytes",
+ new_quota_path, datalen+1);
+ if (tid)
+ abort_txn(db, *tid);
+ else
+ abort_subtxn(quota_path, mytid);
+ return CYRUSDB_IOERROR;
+ }
+
+ if (!mytid->fnamenew)
+ mytid->fnamenew = xstrdup(new_quota_path);
+ }
+
+ if (!tid) {
+ /* commit immediately */
+ r = commit_subtxn(quota_path, mytid);
+ }
+
+ return r;
+}
+
+static int create(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, 0);
+}
+
+static int store(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, 1);
+}
+
+static int delete(struct db *db,
+ const char *key, int keylen,
+ struct txn **mytid, int force __attribute__((unused)))
+{
+ return mystore(db, key, keylen, NULL, 0, mytid, 1);
+}
+
+struct txn_rock {
+ hash_table *table;
+ int (*func)(char *, struct subtxn *);
+ int ret;
+};
+
+static void enum_func(char *fname, void *data, void *rock)
+{
+ struct txn_rock *trock = (struct txn_rock *) rock;
+ int r;
+
+ r = trock->func(fname, (struct subtxn *) data);
+ hash_del(fname, trock->table);
+
+ if (r && !trock->ret) trock->ret = r;
+}
+
+int commit_txn(struct db *db __attribute__((unused)), struct txn *tid)
+{
+ struct txn_rock trock;
+
+ trock.table = (hash_table *) tid;
+ trock.func = commit_subtxn;
+ trock.ret = 0;
+
+ hash_enumerate((hash_table *) tid, enum_func, &trock);
+
+ return trock.ret;
+}
+
+int abort_txn(struct db *db __attribute__((unused)), struct txn *tid)
+{
+ struct txn_rock trock;
+
+ trock.table = (hash_table *) tid;
+ trock.func = abort_subtxn;
+ trock.ret = 0;
+
+ hash_enumerate((hash_table *) tid, enum_func, &trock);
+
+ return trock.ret;
+}
+
+struct cyrusdb_backend cyrusdb_quotalegacy =
+{
+ "quotalegacy", /* name */
+
+ &init,
+ &done,
+ &mysync,
+ &myarchive,
+
+ &myopen,
+ &myclose,
+
+ &fetch,
+ &fetch,
+ &foreach,
+ &create,
+ &store,
+ &delete,
+
+ &commit_txn,
+ &abort_txn,
+
+ NULL,
+ NULL
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_skiplist.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_skiplist.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_skiplist.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/cyrusdb_skiplist.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2206 @@
+/* cyrusdb_skiplist.c -- cyrusdb skiplist implementation
+ * $Id: cyrusdb_skiplist.c,v 1.42.2.3 2004/06/09 19:42:47 ken3 Exp $
+ *
+ * Copyright (c) 1998, 2000, 2002 Carnegie Mellon University.
+ * 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* xxx check retry_xxx for failure */
+
+/* xxx all offsets should be bit32s i think */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <assert.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <netinet/in.h>
+
+#include "cyrusdb.h"
+#include "libcyr_cfg.h"
+#include "lock.h"
+#include "map.h"
+#include "retry.h"
+#include "util.h"
+#include "xmalloc.h"
+
+#define PROB (0.5)
+
+/*
+ *
+ * disk format; all numbers in network byte order
+ *
+ * there's the data file, consisting of the
+ * multiple records of "key", "data", and "skip pointers", where skip
+ * pointers are the record number of the data pointer.
+ *
+ * on startup, recovery is performed. the last known good data file
+ * is taken and the intent log is replayed on it. the index file is
+ * regenerated from scratch.
+ *
+ * during operation ckecpoints will compress the data. the data file
+ * is locked. then a checkpoint rewrites the data file in order,
+ * removing any unused records. this is written and fsync'd to
+ * dfile.NEW and stored for use during recovery.
+ */
+
+/*
+ header "skiplist file\0\0\0"
+ version (4 bytes)
+ version_minor (4 bytes)
+ maxlevel (4 bytes)
+ curlevel (4 bytes)
+ listsize (4 bytes)
+ in active items
+ log start (4 bytes)
+ offset where log records start, used mainly to tell when to compress
+ last recovery (4 bytes)
+ seconds since unix epoch
+
+ 1 or more skipnodes, one of:
+
+ record type (4 bytes) [DUMMY, INORDER, ADD]
+ key size (4 bytes)
+ key string (bit string, rounded to up to 4 byte multiples w/ 0s)
+ data size (4 bytes)
+ data string (bit string, rounded to up to 4 byte multiples w/ 0s)
+ skip pointers (4 bytes each)
+ least to most
+ padding (4 bytes, must be -1)
+
+ record type (4 bytes) [DELETE]
+ record ptr (4 bytes; record to be deleted)
+
+ record type (4 bytes) [COMMIT]
+
+
+ record type is either
+ DUMMY (first node is of this type)
+ INORDER
+ ADD
+ DELETE
+ COMMIT (commit the previous records)
+*/
+
+enum {
+ INORDER = 1,
+ ADD = 2,
+ DELETE = 4,
+ COMMIT = 255,
+ DUMMY = 257
+};
+
+struct db {
+ /* file data */
+ char *fname;
+ int fd;
+
+ const char *map_base;
+ unsigned long map_len; /* mapped size */
+ unsigned long map_size; /* actual size */
+ ino_t map_ino;
+
+ /* header info */
+ int version;
+ int version_minor;
+ int maxlevel;
+ int curlevel;
+ int listsize;
+ int logstart; /* where the log starts from last chkpnt */
+ time_t last_recovery;
+};
+
+struct txn {
+ int ismalloc;
+ int syncfd;
+
+ /* logstart is where we start changes from on commit, where we truncate
+ to on abort */
+ int logstart;
+ int logend; /* where to write to continue this txn */
+};
+
+static time_t global_recovery = 0;
+
+/* Perform an FSYNC/FDATASYNC if we are *not* operating in UNSAFE mode */
+#define DO_FSYNC (!libcyrus_config_getswitch(CYRUSOPT_SKIPLIST_UNSAFE))
+
+enum {
+ be_paranoid = 0,
+ use_osync = 0
+};
+
+static void newtxn(struct db *db, struct txn *t)
+{
+ /* fill in t */
+ t->ismalloc = 0;
+ t->syncfd = -1;
+ t->logstart = db->map_size;
+ assert(t->logstart != -1);
+ t->logend = t->logstart;
+}
+
+static void getsyncfd(struct db *db, struct txn *t)
+{
+ if (!use_osync) {
+ t->syncfd = db->fd;
+ } else if (t->syncfd == -1) {
+ t->syncfd = open(db->fname, O_RDWR | O_DSYNC, 0666);
+ assert(t->syncfd != -1); /* xxx do better error recovery */
+ }
+}
+
+static void closesyncfd(struct db *db __attribute__((unused)),
+ struct txn *t)
+{
+ /* if we're using fsync, then we don't want to close the file */
+ if (use_osync && (t->syncfd != -1)) {
+ close(t->syncfd);
+ }
+ t->syncfd = -1;
+}
+
+static int myinit(const char *dbdir, int myflags)
+{
+ char sfile[1024];
+ int fd, r = 0;
+ time_t a;
+
+ snprintf(sfile, sizeof(sfile), "%s/skipstamp", dbdir);
+
+ if (myflags & CYRUSDB_RECOVER) {
+ /* set the recovery timestamp; all databases earlier than this
+ time need recovery run when opened */
+
+ global_recovery = time(NULL);
+ fd = open(sfile, O_RDWR | O_CREAT, 0644);
+ if (fd == -1) r = -1;
+
+ if (r != -1) r = ftruncate(fd, 0);
+ a = htonl(global_recovery);
+ if (r != -1) r = write(fd, &a, 4);
+ if (r != -1) r = close(fd);
+
+ if (r == -1) {
+ syslog(LOG_ERR, "DBERROR: writing %s: %m", sfile);
+ if (fd != -1) close(fd);
+ return CYRUSDB_IOERROR;
+ }
+ } else {
+ /* read the global recovery timestamp */
+
+ fd = open(sfile, O_RDONLY, 0644);
+ if (fd == -1) r = -1;
+ if (r != -1) r = read(fd, &a, 4);
+ if (r != -1) r = close(fd);
+
+ if (r == -1) {
+ syslog(LOG_ERR, "DBERROR: reading %s, assuming the worst: %m",
+ sfile);
+ global_recovery = 0;
+ } else {
+ global_recovery = ntohl(a);
+ }
+ }
+
+ srand(time(NULL) * getpid());
+
+ return 0;
+}
+
+static int mydone(void)
+{
+ return 0;
+}
+
+static int mysync(void)
+{
+ return 0;
+}
+
+static int myarchive(const char **fnames, const char *dirname)
+{
+ int r;
+ const char **fname;
+ char dstname[1024], *dp;
+ int length, rest;
+
+ strlcpy(dstname, dirname, sizeof(dstname));
+ length = strlen(dstname);
+ dp = dstname + length;
+ rest = sizeof(dstname) - length;
+
+ /* archive those files specified by the app */
+ for (fname = fnames; *fname != NULL; ++fname) {
+ syslog(LOG_DEBUG, "archiving database file: %s", *fname);
+ strlcpy(dp, strrchr(*fname, '/'), rest);
+ r = cyrusdb_copyfile(*fname, dstname);
+ if (r) {
+ syslog(LOG_ERR,
+ "DBERROR: error archiving database file: %s", *fname);
+ return CYRUSDB_IOERROR;
+ }
+ }
+
+ return 0;
+}
+
+enum {
+ SKIPLIST_VERSION = 1,
+ SKIPLIST_VERSION_MINOR = 2,
+ SKIPLIST_MAXLEVEL = 20,
+ SKIPLIST_MINREWRITE = 16834 /* don't rewrite logs smaller than this */
+};
+
+#define BIT32_MAX 4294967295U
+
+#if UINT_MAX == BIT32_MAX
+typedef unsigned int bit32;
+#elif ULONG_MAX == BIT32_MAX
+typedef unsigned long bit32;
+#elif USHRT_MAX == BIT32_MAX
+typedef unsigned short bit32;
+#else
+#error dont know what to use for bit32
+#endif
+
+#define HEADER_MAGIC ("\241\002\213\015skiplist file\0\0\0")
+#define HEADER_MAGIC_SIZE (20)
+
+/* offsets of header files */
+enum {
+ OFFSET_HEADER = 0,
+ OFFSET_VERSION = 20,
+ OFFSET_VERSION_MINOR = 24,
+ OFFSET_MAXLEVEL = 28,
+ OFFSET_CURLEVEL = 32,
+ OFFSET_LISTSIZE = 36,
+ OFFSET_LOGSTART = 40,
+ OFFSET_LASTRECOVERY = 44
+};
+
+enum {
+ HEADER_SIZE = OFFSET_LASTRECOVERY + 4
+};
+
+static int mycommit(struct db *db, struct txn *tid);
+static int myabort(struct db *db, struct txn *tid);
+static int mycheckpoint(struct db *db, int locked);
+static int myconsistent(struct db *db, struct txn *tid, int locked);
+static int recovery(struct db *db, int flags);
+
+enum {
+ /* Force recovery regardless of timestamp on database */
+ RECOVERY_FORCE = 1,
+ /* Caller already has a write lock on the database. In the case
+ * of successful recovery, the database will still be locked on return.
+ *
+ * If the recovery fails, then the database will be unlocked an an
+ * error will be returned */
+ RECOVERY_CALLER_LOCKED = 2
+};
+
+/* file looks like:
+ struct header {
+ ...
+ }
+ struct dummy {
+ bit32 t = htonl(DUMMY);
+ bit32 ks = 0;
+ bit32 ds = 0;
+ bit32 forward[db->maxlevel];
+ bit32 pad = -1;
+ } */
+#define DUMMY_OFFSET(db) (HEADER_SIZE)
+#define DUMMY_PTR(db) ((db)->map_base + HEADER_SIZE)
+#define DUMMY_SIZE(db) (4 * (3 + db->maxlevel + 1))
+
+/* bump to the next multiple of 4 bytes */
+#define ROUNDUP(num) (((num) + 3) & 0xFFFFFFFC)
+
+#define TYPE(ptr) (ntohl(*((bit32 *)(ptr))))
+#define KEY(ptr) ((ptr) + 8)
+#define KEYLEN(ptr) (ntohl(*((bit32 *)((ptr) + 4))))
+#define DATA(ptr) ((ptr) + 8 + ROUNDUP(KEYLEN(ptr)) + 4)
+#define DATALEN(ptr) (ntohl(*((bit32 *)((ptr) + 8 + ROUNDUP(KEYLEN(ptr))))))
+#define FIRSTPTR(ptr) ((ptr) + 8 + ROUNDUP(KEYLEN(ptr)) + 4 + ROUNDUP(DATALEN(ptr)))
+
+/* return a pointer to the pointer */
+#define PTR(ptr, x) (FIRSTPTR(ptr) + 4 * (x))
+
+/* FORWARD(ptr, x)
+ * given a pointer to the start of the record, return the offset
+ * corresponding to the xth pointer
+ */
+#define FORWARD(ptr, x) (ntohl(*((bit32 *)(FIRSTPTR(ptr) + 4 * (x)))))
+
+/* how many levels does this record have? */
+static int LEVEL(const char *ptr)
+{
+ const bit32 *p, *q;
+
+ assert(TYPE(ptr) == DUMMY || TYPE(ptr) == INORDER || TYPE(ptr) == ADD);
+ p = q = (bit32 *) FIRSTPTR(ptr);
+ while (*p != (bit32)-1) p++;
+ return (p - q);
+}
+
+/* how big is this record? */
+static int RECSIZE(const char *ptr)
+{
+ int ret = 0;
+ switch (TYPE(ptr)) {
+ case DUMMY:
+ case INORDER:
+ case ADD:
+ ret += 4; /* tag */
+ ret += 4; /* keylen */
+ ret += ROUNDUP(KEYLEN(ptr)); /* key */
+ ret += 4; /* datalen */
+ ret += ROUNDUP(DATALEN(ptr)); /* data */
+ ret += 4 * LEVEL(ptr); /* pointers */
+ ret += 4; /* padding */
+ break;
+
+ case DELETE:
+ ret += 8;
+ break;
+
+ case COMMIT:
+ ret += 4;
+ break;
+ }
+
+ return ret;
+}
+
+/* Determine if it is safe to append to this skiplist database.
+ * e.g. does it end in 4 bytes of -1 followed by a commit record?
+ * *or* is this the beginning of the log, in which case we only need
+ * the padding from the last INORDER (or DUMMY) record
+ */
+static int SAFE_TO_APPEND(struct db *db)
+{
+ return (db->map_size % 4
+ || (db->map_size == db->logstart &&
+ *((bit32 *)(db->map_base + db->map_size - 4)) != htonl(-1))
+ || (db->map_size != db->logstart &&
+ *((bit32 *)(db->map_base + db->map_size - 8)) != htonl(-1) &&
+ *((bit32 *)(db->map_base + db->map_size - 4)) != htonl(COMMIT)));
+}
+
+
+#define PADDING(ptr) (ntohl(*((bit32 *)((ptr) + RECSIZE(ptr) - 4))))
+
+/* given an open, mapped db, read in the header information */
+static int read_header(struct db *db)
+{
+ const char *dptr;
+ int r;
+
+ assert(db && db->map_len && db->fname && db->map_base);
+ if (db->map_len < HEADER_SIZE) {
+ syslog(LOG_ERR,
+ "skiplist: file not large enough for header: %s", db->fname);
+ }
+
+ if (memcmp(db->map_base, HEADER_MAGIC, HEADER_MAGIC_SIZE)) {
+ syslog(LOG_ERR, "skiplist: invalid magic header: %s", db->fname);
+ return CYRUSDB_IOERROR;
+ }
+
+ db->version = ntohl(*((bit32 *)(db->map_base + OFFSET_VERSION)));
+ db->version_minor =
+ ntohl(*((bit32 *)(db->map_base + OFFSET_VERSION_MINOR)));
+ if (db->version != SKIPLIST_VERSION) {
+ syslog(LOG_ERR, "skiplist: version mismatch: %s has version %d.%d",
+ db->fname, db->version, db->version_minor);
+ return CYRUSDB_IOERROR;
+ }
+
+ db->maxlevel = ntohl(*((bit32 *)(db->map_base + OFFSET_MAXLEVEL)));
+
+ if(db->maxlevel > SKIPLIST_MAXLEVEL) {
+ syslog(LOG_ERR,
+ "skiplist %s: MAXLEVEL %d in database beyond maximum %d\n",
+ db->fname, db->maxlevel, SKIPLIST_MAXLEVEL);
+ return CYRUSDB_IOERROR;
+ }
+
+ db->curlevel = ntohl(*((bit32 *)(db->map_base + OFFSET_CURLEVEL)));
+
+ if(db->curlevel > db->maxlevel) {
+ syslog(LOG_ERR,
+ "skiplist %s: CURLEVEL %d in database beyond maximum %d\n",
+ db->fname, db->curlevel, db->maxlevel);
+ return CYRUSDB_IOERROR;
+ }
+
+ db->listsize = ntohl(*((bit32 *)(db->map_base + OFFSET_LISTSIZE)));
+ db->logstart = ntohl(*((bit32 *)(db->map_base + OFFSET_LOGSTART)));
+ db->last_recovery =
+ ntohl(*((bit32 *)(db->map_base + OFFSET_LASTRECOVERY)));
+
+ /* verify dummy node */
+ dptr = DUMMY_PTR(db);
+ r = 0;
+
+ if (!r && TYPE(dptr) != DUMMY) {
+ syslog(LOG_ERR, "DBERROR: %s: first node not type DUMMY",
+ db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+ if (!r && KEYLEN(dptr) != 0) {
+ syslog(LOG_ERR, "DBERROR: %s: DUMMY has non-zero KEYLEN",
+ db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+ if (!r && DATALEN(dptr) != 0) {
+ syslog(LOG_ERR, "DBERROR: %s: DUMMY has non-zero DATALEN",
+ db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+ if (!r && LEVEL(dptr) != db->maxlevel) {
+ syslog(LOG_ERR, "DBERROR: %s: DUMMY level(%d) != db->maxlevel(%d)",
+ db->fname, LEVEL(dptr), db->maxlevel);
+ r = CYRUSDB_IOERROR;
+ }
+
+ return r;
+}
+
+/* given an open, mapped db, locked db,
+ write the header information */
+static int write_header(struct db *db)
+{
+ char buf[HEADER_SIZE];
+ int n;
+
+ memcpy(buf + 0, HEADER_MAGIC, HEADER_MAGIC_SIZE);
+ *((bit32 *)(buf + OFFSET_VERSION)) = htonl(db->version);
+ *((bit32 *)(buf + OFFSET_VERSION_MINOR)) = htonl(db->version_minor);
+ *((bit32 *)(buf + OFFSET_MAXLEVEL)) = htonl(db->maxlevel);
+ *((bit32 *)(buf + OFFSET_CURLEVEL)) = htonl(db->curlevel);
+ *((bit32 *)(buf + OFFSET_LISTSIZE)) = htonl(db->listsize);
+ *((bit32 *)(buf + OFFSET_LOGSTART)) = htonl(db->logstart);
+ *((bit32 *)(buf + OFFSET_LASTRECOVERY)) = htonl(db->last_recovery);
+
+ /* write it out */
+ lseek(db->fd, 0, SEEK_SET);
+ n = retry_write(db->fd, buf, HEADER_SIZE);
+ if (n != HEADER_SIZE) {
+ syslog(LOG_ERR, "DBERROR: writing skiplist header for %s: %m",
+ db->fname);
+ return CYRUSDB_IOERROR;
+ }
+
+ return 0;
+}
+
+static int dispose_db(struct db *db)
+{
+ if (!db) return 0;
+ if (db->fname) {
+ free(db->fname);
+ }
+ if (db->map_base) {
+ map_free(&db->map_base, &db->map_len);
+ }
+ if (db->fd != -1) {
+ close(db->fd);
+ }
+
+ free(db);
+
+ return 0;
+}
+
+/* make sure our mmap() is big enough */
+static int update_lock(struct db *db, struct txn *txn)
+{
+ /* txn->logend is the current size of the file */
+ map_refresh(db->fd, 0, &db->map_base, &db->map_len, txn->logend,
+ db->fname, 0);
+ db->map_size = txn->logend;
+
+ return 0;
+}
+
+static int write_lock(struct db *db, const char *altname)
+{
+ struct stat sbuf;
+ const char *lockfailaction;
+ const char *fname = altname ? altname : db->fname;
+
+ if (lock_reopen(db->fd, fname, &sbuf, &lockfailaction) < 0) {
+ syslog(LOG_ERR, "IOERROR: %s %s: %m", lockfailaction, fname);
+ return CYRUSDB_IOERROR;
+ }
+ if (db->map_ino != sbuf.st_ino) {
+ map_free(&db->map_base, &db->map_len);
+ }
+ db->map_size = sbuf.st_size;
+ db->map_ino = sbuf.st_ino;
+
+ map_refresh(db->fd, 0, &db->map_base, &db->map_len, sbuf.st_size,
+ fname, 0);
+
+ if (db->curlevel) {
+ /* reread curlevel */
+ db->curlevel = ntohl(*((bit32 *)(db->map_base + OFFSET_CURLEVEL)));
+ }
+
+ /* printf("%d: write lock: %d\n", getpid(), db->map_ino); */
+
+ return 0;
+}
+
+static int read_lock(struct db *db)
+{
+ struct stat sbuf, sbuffile;
+ int newfd = -1;
+
+ for (;;) {
+ if (lock_shared(db->fd) < 0) {
+ syslog(LOG_ERR, "IOERROR: lock_shared %s: %m", db->fname);
+ return CYRUSDB_IOERROR;
+ }
+
+ if (fstat(db->fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat %s: %m", db->fname);
+ lock_unlock(db->fd);
+ return CYRUSDB_IOERROR;
+ }
+
+ if (stat(db->fname, &sbuffile) == -1) {
+ syslog(LOG_ERR, "IOERROR: stat %s: %m", db->fname);
+ lock_unlock(db->fd);
+ return CYRUSDB_IOERROR;
+ }
+ if (sbuf.st_ino == sbuffile.st_ino) break;
+
+ newfd = open(db->fname, O_RDWR, 0644);
+ if (newfd == -1) {
+ syslog(LOG_ERR, "IOERROR: open %s: %m", db->fname);
+ lock_unlock(db->fd);
+ return CYRUSDB_IOERROR;
+ }
+
+ dup2(newfd, db->fd);
+ close(newfd);
+ }
+
+ if (db->map_ino != sbuf.st_ino) {
+ map_free(&db->map_base, &db->map_len);
+ }
+ db->map_size = sbuf.st_size;
+ db->map_ino = sbuf.st_ino;
+
+ /* printf("%d: read lock: %d\n", getpid(), db->map_ino); */
+
+ map_refresh(db->fd, 0, &db->map_base, &db->map_len, sbuf.st_size,
+ db->fname, 0);
+
+ if (db->curlevel) {
+ /* reread curlevel */
+ db->curlevel = ntohl(*((bit32 *)(db->map_base + OFFSET_CURLEVEL)));
+ }
+
+ return 0;
+}
+
+static int unlock(struct db *db)
+{
+ if (lock_unlock(db->fd) < 0) {
+ syslog(LOG_ERR, "IOERROR: lock_unlock %s: %m", db->fname);
+ return CYRUSDB_IOERROR;
+ }
+
+ /* printf("%d: unlock: %d\n", getpid(), db->map_ino); */
+
+ return 0;
+}
+
+static int myopen(const char *fname, int flags, struct db **ret)
+{
+ struct db *db = (struct db *) xzmalloc(sizeof(struct db));
+ int r;
+ int new = 0;
+
+ db->fd = -1;
+ db->fname = xstrdup(fname);
+
+ db->fd = open(fname, O_RDWR, 0644);
+ if (db->fd == -1 && errno == ENOENT && (flags & CYRUSDB_CREATE)) {
+ if (cyrus_mkdir(fname, 0755) == -1) return CYRUSDB_IOERROR;
+
+ db->fd = open(fname, O_RDWR | O_CREAT, 0644);
+ new = 1;
+ }
+
+ if (db->fd == -1) {
+ int level = (flags & CYRUSDB_CREATE) ? LOG_ERR : LOG_DEBUG;
+ syslog(level, "IOERROR: opening %s: %m", fname);
+ dispose_db(db);
+ return CYRUSDB_IOERROR;
+ }
+
+ retry:
+ db->curlevel = 0;
+
+ if (new) {
+ /* lock the db (this normally rereads db->curlevel, but
+ db->curlevel is currently 0) */
+ r = write_lock(db, NULL);
+ if (r < 0) {
+ dispose_db(db);
+ return r;
+ }
+ } else {
+ /* grab a read lock */
+ r = read_lock(db);
+ if (r < 0) {
+ dispose_db(db);
+ return r;
+ }
+ }
+
+ if (new && db->map_size == 0) {
+ /* make sure someone didn't come along and "fix" this db */
+
+ /* initialize in memory structure */
+ db->version = SKIPLIST_VERSION;
+ db->version_minor = SKIPLIST_VERSION_MINOR;
+ db->maxlevel = SKIPLIST_MAXLEVEL;
+ db->curlevel = 1;
+ db->listsize = 0;
+ /* where do we start writing new entries? */
+ db->logstart = DUMMY_OFFSET(db) + DUMMY_SIZE(db);
+ db->last_recovery = time(NULL);
+
+ /* create the header */
+ r = write_header(db);
+
+ if (!r) {
+ int n;
+ int dsize = DUMMY_SIZE(db);
+ bit32 *buf = (bit32 *) xzmalloc(dsize);
+
+ buf[0] = htonl(DUMMY);
+ buf[(dsize / 4) - 1] = htonl(-1);
+
+ lseek(db->fd, DUMMY_OFFSET(db), SEEK_SET);
+ n = retry_write(db->fd, (char *) buf, dsize);
+ if (n != dsize) {
+ syslog(LOG_ERR, "DBERROR: writing dummy node for %s: %m",
+ db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+ free(buf);
+ }
+
+ /* sync the db */
+ if (!r && DO_FSYNC && (fsync(db->fd) < 0)) {
+ syslog(LOG_ERR, "DBERROR: fsync(%s): %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ }
+
+ if (db->map_size == 0) {
+ /* race condition to initialize this guy! */
+ new = 1;
+ unlock(db);
+ goto retry;
+ }
+
+ r = read_header(db);
+ if (r) {
+ dispose_db(db);
+ return r;
+ }
+
+ /* unlock the db */
+ unlock(db);
+
+ if (!global_recovery || db->last_recovery < global_recovery) {
+ /* run recovery; we rebooted since the last time recovery
+ was run */
+ r = recovery(db, 0);
+ if (r) {
+ dispose_db(db);
+ return r;
+ }
+ }
+
+ *ret = db;
+ return 0;
+}
+
+int myclose(struct db *db)
+{
+ return dispose_db(db);
+}
+
+static int compare(const char *s1, int l1, const char *s2, int l2)
+{
+ int min = l1 < l2 ? l1 : l2;
+ int cmp = 0;
+
+ while (min-- > 0 && (cmp = *s1 - *s2) == 0) {
+ s1++;
+ s2++;
+ }
+ if (min >= 0) {
+ return cmp;
+ } else {
+ if (l1 > l2) return 1;
+ else if (l2 > l1) return -1;
+ else return 0;
+ }
+}
+
+/* returns the offset to the node asked for, or the node after it
+ if it doesn't exist.
+ if previous is set, finds the last node < key */
+static const char *find_node(struct db *db,
+ const char *key, int keylen,
+ int *updateoffsets)
+{
+ const char *ptr = db->map_base + DUMMY_OFFSET(db);
+ int i;
+ int offset;
+
+ if (updateoffsets) {
+ for (i = 0; i < db->maxlevel; i++) {
+ updateoffsets[i] = DUMMY_OFFSET(db);
+ }
+ }
+
+ for (i = db->curlevel - 1; i >= 0; i--) {
+ while ((offset = FORWARD(ptr, i)) &&
+ compare(KEY(db->map_base + offset), KEYLEN(db->map_base + offset),
+ key, keylen) < 0) {
+ /* move forward at level 'i' */
+ ptr = db->map_base + offset;
+ }
+ if (updateoffsets) updateoffsets[i] = ptr - db->map_base;
+ }
+
+ ptr = db->map_base + FORWARD(ptr, 0);
+
+ return ptr;
+}
+
+int myfetch(struct db *db,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid)
+{
+ const char *ptr;
+ struct txn t, *tp;
+ int r = 0;
+
+ assert(db != NULL && key != NULL);
+
+ if (data) *data = NULL;
+ if (datalen) *datalen = 0;
+
+ if (!mytid) {
+ /* grab a r lock */
+ if ((r = read_lock(db)) < 0) {
+ return r;
+ }
+
+ tp = NULL;
+ } else if (!*mytid) {
+ /* grab a r/w lock */
+ if ((r = write_lock(db, NULL)) < 0) {
+ return r;
+ }
+
+ /* fill in t */
+ newtxn(db, &t);
+
+ tp = &t;
+ } else {
+ tp = *mytid;
+ update_lock(db, tp);
+ }
+
+ ptr = find_node(db, key, keylen, 0);
+
+ if (ptr == db->map_base || compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
+ /* failed to find key/keylen */
+ r = CYRUSDB_NOTFOUND;
+ } else {
+ if (datalen) *datalen = DATALEN(ptr);
+ if (data) *data = DATA(ptr);
+ }
+
+ if (mytid) {
+ if (!*mytid) {
+ /* return the txn structure */
+
+ *mytid = xmalloc(sizeof(struct txn));
+ memcpy(*mytid, tp, sizeof(struct txn));
+ (*mytid)->ismalloc = 1;
+ }
+ } else {
+ /* release read lock */
+ int r1;
+ if ((r1 = unlock(db)) < 0) {
+ return r1;
+ }
+ }
+
+ return r;
+}
+
+static int fetch(struct db *mydb,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid)
+{
+ return myfetch(mydb, key, keylen, data, datalen, mytid);
+}
+static int fetchlock(struct db *db,
+ const char *key, int keylen,
+ const char **data, int *datalen,
+ struct txn **mytid)
+{
+ return myfetch(db, key, keylen, data, datalen, mytid);
+}
+
+/* foreach allows for subsidary mailbox operations in 'cb'.
+ if there is a txn, 'cb' must make use of it.
+*/
+int myforeach(struct db *db,
+ char *prefix, int prefixlen,
+ foreach_p *goodp,
+ foreach_cb *cb, void *rock,
+ struct txn **tid)
+{
+ const char *ptr;
+ char *savebuf = NULL;
+ size_t savebuflen = 0;
+ size_t savebufsize;
+ struct txn t, *tp;
+ int r = 0, cb_r = 0;
+
+ assert(db != NULL);
+ assert(prefixlen >= 0);
+
+ if (!tid) {
+ /* grab a r lock */
+ if ((r = read_lock(db)) < 0) {
+ return r;
+ }
+
+ tp = NULL;
+ } else if (!*tid) {
+ /* grab a r/w lock */
+ if ((r = write_lock(db, NULL)) < 0) {
+ return r;
+ }
+
+ /* fill in t */
+ newtxn(db, &t);
+
+ tp = &t;
+ } else {
+ tp = *tid;
+ update_lock(db, tp);
+ }
+
+ ptr = find_node(db, prefix, prefixlen, 0);
+
+ while (ptr != db->map_base) {
+ /* does it match prefix? */
+ if (KEYLEN(ptr) < (bit32) prefixlen) break;
+ if (prefixlen && compare(KEY(ptr), prefixlen, prefix, prefixlen)) break;
+
+ if (!goodp ||
+ goodp(rock, KEY(ptr), KEYLEN(ptr), DATA(ptr), DATALEN(ptr))) {
+ ino_t ino = db->map_ino;
+ unsigned long sz = db->map_size;
+
+ if (!tid) {
+ /* release read lock */
+ if ((r = unlock(db)) < 0) {
+ return r;
+ }
+ }
+
+ /* save KEY, KEYLEN */
+ if (KEYLEN(ptr) > savebuflen) {
+ savebuflen = KEYLEN(ptr) + 1024;
+ savebuf = xrealloc(savebuf, savebuflen);
+ }
+ memcpy(savebuf, KEY(ptr), KEYLEN(ptr));
+ savebufsize = KEYLEN(ptr);
+
+ /* make callback */
+ cb_r = cb(rock, KEY(ptr), KEYLEN(ptr), DATA(ptr), DATALEN(ptr));
+ if (cb_r) break;
+
+ if (!tid) {
+ /* grab a r lock */
+ if ((r = read_lock(db)) < 0) {
+ return r;
+ }
+ } else {
+ /* make sure we're up to date */
+ update_lock(db, tp);
+ }
+
+ /* reposition */
+ if (!(ino == db->map_ino && sz == db->map_size)) {
+ /* something changed in the file; reseek */
+ ptr = find_node(db, savebuf, savebufsize, 0);
+
+ /* 'ptr' might not equal 'savebuf'. if it's different,
+ we want to stay where we are. if it's the same, we
+ should move on to the next one */
+ if (savebufsize == KEYLEN(ptr) &&
+ !memcmp(savebuf, KEY(ptr), savebufsize)) {
+ ptr = db->map_base + FORWARD(ptr, 0);
+ } else {
+ /* 'savebuf' got deleted, so we're now pointing at the
+ right thing */
+ }
+ } else {
+ /* move to the next one */
+ ptr = db->map_base + FORWARD(ptr, 0);
+ }
+ } else {
+ /* we didn't make the callback; keep going */
+ ptr = db->map_base + FORWARD(ptr, 0);
+ }
+ }
+
+ if (tid) {
+ if (!*tid) {
+ /* return the txn structure */
+
+ *tid = xmalloc(sizeof(struct txn));
+ memcpy(*tid, tp, sizeof(struct txn));
+ (*tid)->ismalloc = 1;
+ }
+ } else {
+ /* release read lock */
+ if ((r = unlock(db)) < 0) {
+ return r;
+ }
+ }
+
+ if (savebuf) {
+ free(savebuf);
+ }
+
+ return r ? r : cb_r;
+}
+
+unsigned int randlvl(struct db *db)
+{
+ unsigned int lvl = 1;
+
+ while ((((float) rand() / (float) (RAND_MAX)) < PROB)
+ && (lvl < db->maxlevel)) {
+ lvl++;
+ }
+ /* syslog(LOG_DEBUG, "picked level %d", lvl); */
+
+ return lvl;
+}
+
+int mystore(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid, int overwrite)
+{
+ const char *ptr;
+ bit32 klen, dlen;
+ struct iovec iov[50];
+ unsigned int lvl;
+ int num_iov;
+ struct txn t, *tp;
+ bit32 endpadding = htonl(-1);
+ bit32 zeropadding[4] = { 0, 0, 0, 0 };
+ int updateoffsets[SKIPLIST_MAXLEVEL];
+ int newoffsets[SKIPLIST_MAXLEVEL];
+ int addrectype = htonl(ADD);
+ int delrectype = htonl(DELETE);
+ bit32 todelete;
+ bit32 newoffset;
+ int r, i;
+
+ assert(db != NULL);
+ assert(key && keylen);
+
+ if (!tid || !*tid) {
+ /* grab a r/w lock */
+ if ((r = write_lock(db, NULL)) < 0) {
+ return r;
+ }
+
+ /* is this file safe to append to?
+ *
+ * If it isn't, we need to run recovery. */
+ if(SAFE_TO_APPEND(db))
+ {
+ if((r = recovery(db, RECOVERY_FORCE | RECOVERY_CALLER_LOCKED)) < 0)
+ return r;
+ }
+
+ /* fill in t */
+ newtxn(db, &t);
+
+ tp = &t;
+ } else {
+ tp = *tid;
+ update_lock(db, tp);
+ }
+
+ if (be_paranoid) {
+ assert(myconsistent(db, tp, 1) == 0);
+ }
+
+ num_iov = 0;
+
+ newoffset = tp->logend;
+ ptr = find_node(db, key, keylen, updateoffsets);
+ if (ptr != db->map_base &&
+ !compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
+
+ if (!overwrite) {
+ myabort(db, tp); /* releases lock */
+ return CYRUSDB_EXISTS;
+ } else {
+ /* replace with an equal height node */
+ lvl = LEVEL(ptr);
+
+ /* log a removal */
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) &delrectype, 4);
+ todelete = htonl(ptr - db->map_base);
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) &todelete, 4);
+
+ /* now we write at newoffset */
+ newoffset += 8;
+
+ /* our pointers are whatever the old node pointed to */
+ for (i = 0; i < lvl; i++) {
+ newoffsets[i] = htonl(FORWARD(ptr, i));
+ }
+ }
+ } else {
+ /* pick a size for the new node */
+ lvl = randlvl(db);
+
+ /* do we need to update the header ? */
+ if (lvl > db->curlevel) {
+ for (i = db->curlevel; i < lvl; i++) {
+ updateoffsets[i] = DUMMY_OFFSET(db);
+ }
+ db->curlevel = lvl;
+
+ /* write out that change */
+ write_header(db); /* xxx errors? */
+ }
+
+ /* we point to what we're updating used to point to */
+ /* newoffsets is written in the iovec later */
+ for (i = 0; i < lvl; i++) {
+ /* written in the iovec */
+ newoffsets[i] =
+ htonl(FORWARD(db->map_base + updateoffsets[i], i));
+ }
+ }
+
+ klen = htonl(keylen);
+ dlen = htonl(datalen);
+
+ newoffset = htonl(newoffset);
+
+ /* set pointers appropriately */
+ for (i = 0; i < lvl; i++) {
+ /* write pointer updates */
+ /* FORWARD(updates[i], i) = newoffset; */
+ lseek(db->fd,
+ PTR(db->map_base + updateoffsets[i], i) - db->map_base,
+ SEEK_SET);
+ retry_write(db->fd, (char *) &newoffset, 4);
+ }
+
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) &addrectype, 4);
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) &klen, 4);
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) key, keylen);
+ if (ROUNDUP(keylen) - keylen > 0) {
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) zeropadding,
+ ROUNDUP(keylen) - keylen);
+ }
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) &dlen, 4);
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) data, datalen);
+ if (ROUNDUP(datalen) - datalen > 0) {
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) zeropadding,
+ ROUNDUP(datalen) - datalen);
+ }
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) newoffsets, 4 * lvl);
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) &endpadding, 4);
+
+ getsyncfd(db, tp);
+ lseek(tp->syncfd, tp->logend, SEEK_SET);
+ r = retry_writev(tp->syncfd, iov, num_iov);
+ if (r < 0) {
+ syslog(LOG_ERR, "DBERROR: retry_writev(): %m");
+ myabort(db, tp);
+ return CYRUSDB_IOERROR;
+ }
+ tp->logend += r; /* update where to write next */
+
+ if (tid) {
+ if (!*tid) {
+ /* return the txn structure */
+
+ *tid = xmalloc(sizeof(struct txn));
+ memcpy(*tid, tp, sizeof(struct txn));
+ (*tid)->ismalloc = 1;
+ }
+
+ if (be_paranoid) {
+ assert(myconsistent(db, *tid, 1) == 0);
+ }
+ } else {
+ /* commit the store, which releases the write lock */
+ mycommit(db, tp);
+ }
+
+ return 0;
+}
+
+static int create(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, 0);
+}
+
+static int store(struct db *db,
+ const char *key, int keylen,
+ const char *data, int datalen,
+ struct txn **tid)
+{
+ return mystore(db, key, keylen, data, datalen, tid, 1);
+}
+
+int mydelete(struct db *db,
+ const char *key, int keylen,
+ struct txn **tid, int force __attribute__((unused)))
+{
+ const char *ptr;
+ int delrectype = htonl(DELETE);
+ int updateoffsets[SKIPLIST_MAXLEVEL];
+ bit32 offset;
+ bit32 writebuf[2];
+ struct txn t, *tp;
+ int i;
+ int r;
+
+ if (!tid || !*tid) {
+ /* grab a r/w lock */
+ if ((r = write_lock(db, NULL)) < 0) {
+ return r;
+ }
+
+ /* is this file safe to append to?
+ *
+ * If it isn't, we need to run recovery. */
+ if(SAFE_TO_APPEND(db))
+ {
+ if((r = recovery(db, RECOVERY_FORCE | RECOVERY_CALLER_LOCKED)) < 0)
+ return r;
+ }
+
+ /* fill in t */
+ newtxn(db, &t);
+
+ tp = &t;
+ } else {
+ tp = *tid;
+ update_lock(db, tp);
+ }
+
+ if (be_paranoid) {
+ assert(myconsistent(db, tp, 1) == 0);
+ }
+
+ ptr = find_node(db, key, keylen, updateoffsets);
+ if (ptr == db->map_base ||
+ !compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
+ /* gotcha */
+ offset = ptr - db->map_base;
+
+ /* update pointers */
+ for (i = 0; i < db->curlevel; i++) {
+ int newoffset;
+
+ if (FORWARD(db->map_base + updateoffsets[i], i) != offset) {
+ break;
+ }
+ newoffset = htonl(FORWARD(ptr, i));
+ lseek(db->fd,
+ PTR(db->map_base + updateoffsets[i], i) - db->map_base,
+ SEEK_SET);
+ retry_write(db->fd, (char *) &newoffset, 4);
+ }
+
+ /* log the deletion */
+ getsyncfd(db, tp);
+ lseek(tp->syncfd, tp->logend, SEEK_SET);
+ writebuf[0] = delrectype;
+ writebuf[1] = htonl(offset);
+
+ /* update end-of-log */
+ tp->logend += retry_write(tp->syncfd, (char *) writebuf, 8);
+ }
+
+ if (tid) {
+ if (!*tid) {
+ /* return the txn structure */
+
+ *tid = xmalloc(sizeof(struct txn));
+ memcpy(*tid, tp, sizeof(struct txn));
+ (*tid)->ismalloc = 1;
+ }
+
+ if (be_paranoid) {
+ assert(myconsistent(db, *tid, 1) == 0);
+ }
+ } else {
+ /* commit the store, which releases the write lock */
+ mycommit(db, tp);
+ }
+
+ return 0;
+}
+
+int mycommit(struct db *db, struct txn *tid)
+{
+ bit32 commitrectype = htonl(COMMIT);
+ int r = 0;
+
+ assert(db && tid);
+
+ update_lock(db, tid);
+
+ if (be_paranoid) {
+ assert(myconsistent(db, tid, 1) == 0);
+ }
+
+ /* verify that we did something this txn */
+ if (tid->logstart == tid->logend) {
+ /* empty txn, done */
+ r = 0;
+ goto done;
+ }
+
+ /* fsync if we're not using O_SYNC writes */
+ if (!use_osync && DO_FSYNC && (fdatasync(db->fd) < 0)) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ goto done;
+ }
+
+ /* xxx consider unlocking the database here: the transaction isn't
+ yet durable but the file is in a form that is consistent for
+ other transactions to use. releasing the lock here would give
+ ACI properties. */
+
+ /* write a commit record */
+ assert(tid->syncfd != -1);
+ lseek(tid->syncfd, tid->logend, SEEK_SET);
+ retry_write(tid->syncfd, (char *) &commitrectype, 4);
+
+ /* fsync if we're not using O_SYNC writes */
+ if (!use_osync && DO_FSYNC && (fdatasync(db->fd) < 0)) {
+ syslog(LOG_ERR, "IOERROR: writing %s: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ goto done;
+ }
+
+ done:
+ /* consider checkpointing */
+ if (!r && tid->logend > (2 * db->logstart + SKIPLIST_MINREWRITE)) {
+ r = mycheckpoint(db, 1);
+ }
+
+ if (be_paranoid) {
+ assert(myconsistent(db, NULL, 1) == 0);
+ }
+
+ if (r) {
+ int r2;
+
+ /* error during commit; we must abort */
+ r2 = myabort(db, tid);
+ if (r2) {
+ syslog(LOG_ERR, "DBERROR: skiplist %s: commit AND abort failed",
+ db->fname);
+ }
+ } else {
+ /* release the write lock */
+ if ((r = unlock(db)) < 0) {
+ return r;
+ }
+
+ /* must close this after releasing the lock */
+ closesyncfd(db, tid);
+
+ /* free tid if needed */
+ if (tid->ismalloc) {
+ free(tid);
+ }
+ }
+
+ return r;
+}
+
+int myabort(struct db *db, struct txn *tid)
+{
+ const char *ptr;
+ int updateoffsets[SKIPLIST_MAXLEVEL];
+ bit32 offset;
+ int i;
+ int r = 0;
+
+ assert(db && tid);
+
+ /* look at the log entries we've written, and undo their effects */
+ while (tid->logstart != tid->logend) {
+ /* find the last log entry */
+ for (offset = tid->logstart, ptr = db->map_base + offset;
+ offset + RECSIZE(ptr) != (bit32) tid->logend;
+ offset += RECSIZE(ptr), ptr = db->map_base + offset) ;
+
+ offset = ptr - db->map_base;
+
+ assert(TYPE(ptr) == ADD || TYPE(ptr) == DELETE);
+ switch (TYPE(ptr)) {
+ case DUMMY:
+ case INORDER:
+ case COMMIT:
+ abort();
+
+ case ADD:
+ /* remove this record */
+ (void) find_node(db, KEY(ptr), KEYLEN(ptr), updateoffsets);
+ for (i = 0; i < db->curlevel; i++) {
+ int newoffset;
+
+ if (FORWARD(db->map_base + updateoffsets[i], i) != offset) {
+ break;
+ }
+
+ newoffset = htonl(FORWARD(ptr, i));
+ lseek(db->fd,
+ PTR(db->map_base + updateoffsets[i], i) - db->map_base,
+ SEEK_SET);
+ retry_write(db->fd, (char *) &newoffset, 4);
+ }
+ break;
+ case DELETE:
+ {
+ unsigned int lvl;
+ int newoffset;
+ const char *q;
+
+ /* re-add this record. it can't exist right now. */
+ newoffset = *((bit32 *)(ptr + 4));
+ q = db->map_base + ntohl(newoffset);
+ lvl = LEVEL(q);
+ (void) find_node(db, KEY(q), KEYLEN(q), updateoffsets);
+ for (i = 0; i < lvl; i++) {
+ /* the current pointers FROM this node are correct,
+ so we just have to update 'updateoffsets' */
+ lseek(db->fd,
+ PTR(db->map_base + updateoffsets[i], i) - db->map_base,
+ SEEK_SET);
+ retry_write(db->fd, (char *) &newoffset, 4);
+ }
+ break;
+ }
+ }
+
+ /* remove looking at this */
+ tid->logend -= RECSIZE(ptr);
+ }
+
+ /* truncate the file to remove log entries */
+ if (ftruncate(db->fd, tid->logstart) < 0) {
+ syslog(LOG_ERR,
+ "DBERROR: skiplist abort %s: ftruncate: %m",
+ db->fname);
+ r = CYRUSDB_IOERROR;
+ unlock(db);
+ return r;
+ }
+
+ db->map_size = tid->logstart;
+
+ /* release the write lock */
+ if ((r = unlock(db)) < 0) {
+ return r;
+ }
+
+ /* must close this after releasing the lock */
+ closesyncfd(db, tid);
+
+ /* free the tid */
+ if (tid->ismalloc) {
+ free(tid);
+ }
+
+ return 0;
+}
+
+/* compress 'db'. if 'locked != 0', the database is already R/W locked and
+ will be returned as such. */
+static int mycheckpoint(struct db *db, int locked)
+{
+ char fname[1024];
+ int oldfd;
+ struct iovec iov[50];
+ int num_iov;
+ int updateoffsets[SKIPLIST_MAXLEVEL];
+ const char *ptr;
+ bit32 offset;
+ int r = 0;
+ int iorectype = htonl(INORDER);
+ int i;
+ time_t start = time(NULL);
+
+ /* grab write lock (could be read but this prevents multiple checkpoints
+ simultaneously) */
+ if (!locked) {
+ r = write_lock(db, NULL);
+ if (r < 0) return r;
+ } else {
+ /* we need the latest and greatest data */
+ map_refresh(db->fd, 0, &db->map_base, &db->map_len, MAP_UNKNOWN_LEN,
+ db->fname, 0);
+ }
+
+ if ((r = myconsistent(db, NULL, 1)) < 0) {
+ syslog(LOG_ERR, "db %s, inconsistent pre-checkpoint, bailing out",
+ db->fname);
+ return r;
+ }
+
+ /* open fname.NEW */
+ snprintf(fname, sizeof(fname), "%s.NEW", db->fname);
+ oldfd = db->fd;
+ db->fd = open(fname, O_RDWR | O_CREAT, 0644);
+ if (db->fd < 0) {
+ syslog(LOG_ERR, "DBERROR: skiplist checkpoint: open(%s): %m", fname);
+ if (!locked) unlock(db);
+ db->fd = oldfd;
+ return CYRUSDB_IOERROR;
+ }
+
+ /* write dummy record */
+ if (!r) {
+ int dsize = DUMMY_SIZE(db);
+ bit32 *buf = (bit32 *) xzmalloc(dsize);
+
+ buf[0] = htonl(DUMMY);
+ buf[(dsize / 4) - 1] = htonl(-1);
+
+ lseek(db->fd, DUMMY_OFFSET(db), SEEK_SET);
+ r = retry_write(db->fd, (char *) buf, dsize);
+ if (r != dsize) {
+ r = CYRUSDB_IOERROR;
+ } else {
+ r = 0;
+ }
+ free(buf);
+
+ /* initialize the updateoffsets array so when we append records
+ we know where to set the pointers */
+ for (i = 0; i < db->maxlevel; i++) {
+ /* header_size + 4 (rectype) + 4 (ksize) + 4 (dsize)
+ + 4 * i */
+ updateoffsets[i] = DUMMY_OFFSET(db) + 12 + 4 * i;
+ }
+ }
+
+ /* write records to new file */
+ offset = FORWARD(db->map_base + DUMMY_OFFSET(db), 0);
+ db->listsize = 0;
+ while (!r && offset != 0) {
+ unsigned int lvl;
+ bit32 newoffset, newoffsetnet;
+
+ ptr = db->map_base + offset;
+ lvl = LEVEL(ptr);
+ db->listsize++;
+
+ num_iov = 0;
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) &iorectype, 4);
+ /* copy all but the rectype from the record */
+ WRITEV_ADD_TO_IOVEC(iov, num_iov, (char *) ptr + 4, RECSIZE(ptr) - 4);
+
+ newoffset = lseek(db->fd, 0, SEEK_END);
+ newoffsetnet = htonl(newoffset);
+ r = retry_writev(db->fd, iov, num_iov);
+ if (r < 0) {
+ r = CYRUSDB_IOERROR;
+ } else {
+ r = 0;
+ }
+ for (i = 0; !r && i < lvl; i++) {
+ /* update pointers */
+ r = lseek(db->fd, updateoffsets[i], SEEK_SET);
+ if (r < 0) {
+ r = CYRUSDB_IOERROR;
+ break;
+ } else {
+ r = 0;
+ }
+
+ r = retry_write(db->fd, (char *) &newoffsetnet, 4);
+ if (r < 0) {
+ r = CYRUSDB_IOERROR;
+ break;
+ } else {
+ r = 0;
+ }
+
+ /* PTR(ptr, i) - ptr is the offset relative to me
+ to my ith pointer */
+ updateoffsets[i] = newoffset + (PTR(ptr, i) - ptr);
+ }
+
+ offset = FORWARD(ptr, 0);
+ }
+
+ /* set any dangling pointers to zero */
+ for (i = 0; !r && i < db->maxlevel; i++) {
+ bit32 newoffset = htonl(0);
+
+ r = lseek(db->fd, updateoffsets[i], SEEK_SET);
+ if (r < 0) {
+ r = CYRUSDB_IOERROR;
+ break;
+ } else {
+ r = 0;
+ }
+
+ r = retry_write(db->fd, (char *) &newoffset, 4);
+ if (r < 0) {
+ r = CYRUSDB_IOERROR;
+ break;
+ } else {
+ r = 0;
+ }
+ }
+
+ /* create the header */
+ db->logstart = lseek(db->fd, 0, SEEK_END);
+ r = write_header(db);
+
+ /* sync new file */
+ if (!r && DO_FSYNC && (fdatasync(db->fd) < 0)) {
+ syslog(LOG_ERR, "DBERROR: skiplist checkpoint: fdatasync(%s): %m", fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ if (!r) {
+ /* get new lock */
+ r = write_lock(db, fname);
+ }
+
+ /* move new file to original file name */
+ if (!r && (rename(fname, db->fname) < 0)) {
+ syslog(LOG_ERR, "DBERROR: skiplist checkpoint: rename(%s, %s): %m",
+ fname, db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ /* force the new file name to disk */
+ if (!r && DO_FSYNC && (fsync(db->fd) < 0)) {
+ syslog(LOG_ERR, "DBERROR: skiplist checkpoint: fsync(%s): %m", fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ if (r) {
+ /* clean up */
+ close(db->fd);
+ db->fd = oldfd;
+ unlink(fname);
+ }
+
+ /* release old write lock */
+ close(oldfd);
+
+ {
+ struct stat sbuf;
+
+ /* let's make sure we're up to date */
+ map_free(&db->map_base, &db->map_len);
+ if (fstat(db->fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstat %s: %m", db->fname);
+ return CYRUSDB_IOERROR;
+ }
+ db->map_size = sbuf.st_size;
+ db->map_ino = sbuf.st_ino;
+ map_refresh(db->fd, 0, &db->map_base, &db->map_len, sbuf.st_size,
+ db->fname, 0);
+ }
+
+ if ((r = myconsistent(db, NULL, 1)) < 0) {
+ syslog(LOG_ERR, "db %s, inconsistent post-checkpoint, bailing out",
+ db->fname);
+ return r;
+ }
+
+ if (!locked) {
+ /* unlock the new db files */
+ unlock(db);
+ }
+
+ {
+ int diff = time(NULL) - start;
+ syslog(LOG_INFO,
+ "skiplist: checkpointed %s (%d record%s, %d bytes) in %d second%s",
+ db->fname, db->listsize, db->listsize == 1 ? "" : "s",
+ db->logstart, diff, diff == 1 ? "" : "s");
+ }
+
+ return r;
+}
+
+/* dump the database.
+ if detail == 1, dump all records.
+ if detail == 2, also dump pointers for active records.
+ if detail == 3, dump all records/all pointers.
+*/
+static int dump(struct db *db, int detail __attribute__((unused)))
+{
+ const char *ptr, *end;
+ int i;
+
+ read_lock(db);
+
+ ptr = db->map_base + DUMMY_OFFSET(db);
+ end = db->map_base + db->map_size;
+ while (ptr < end) {
+ printf("%04X: ", ptr - db->map_base);
+ switch (TYPE(ptr)) {
+ case DUMMY:
+ printf("DUMMY ");
+ break;
+ case INORDER:
+ printf("INORDER ");
+ break;
+ case ADD:
+ printf("ADD ");
+ break;
+ case DELETE:
+ printf("DELETE ");
+ break;
+ case COMMIT:
+ printf("COMMIT ");
+ break;
+ }
+
+ switch (TYPE(ptr)) {
+ case DUMMY:
+ case INORDER:
+ case ADD:
+ printf("kl=%d dl=%d lvl=%d\n",
+ KEYLEN(ptr), DATALEN(ptr), LEVEL(ptr));
+ printf("\t");
+ for (i = 0; i < LEVEL(ptr); i++) {
+ printf("%04X ", FORWARD(ptr, i));
+ }
+ printf("\n");
+ break;
+
+ case DELETE:
+ printf("offset=%04X\n", ntohl(*((bit32 *)(ptr + 4))));
+ break;
+
+ case COMMIT:
+ printf("\n");
+ break;
+ }
+
+ ptr += RECSIZE(ptr);
+ }
+
+ unlock(db);
+ return 0;
+}
+
+static int consistent(struct db *db)
+{
+ return myconsistent(db, NULL, 0);
+}
+
+/* perform some basic consistency checks */
+static int myconsistent(struct db *db, struct txn *tid, int locked)
+{
+ const char *ptr;
+ bit32 offset;
+
+ if (!locked) read_lock(db);
+ else if (tid) update_lock(db, tid);
+
+ offset = FORWARD(db->map_base + DUMMY_OFFSET(db), 0);
+ while (offset != 0) {
+ int i;
+
+ ptr = db->map_base + offset;
+
+ for (i = 0; i < LEVEL(ptr); i++) {
+ offset = FORWARD(ptr, i);
+
+ if (offset > db->map_size) {
+ fprintf(stdout,
+ "skiplist inconsistent: %04X: ptr %d is %04X; "
+ "eof is %04X\n",
+ ptr - db->map_base,
+ i, offset, (unsigned int) db->map_size);
+ return CYRUSDB_INTERNAL;
+ }
+
+ if (offset != 0) {
+ /* check to see that ptr < ptr -> next */
+ const char *q = db->map_base + offset;
+ int cmp;
+
+ cmp = compare(KEY(ptr), KEYLEN(ptr), KEY(q), KEYLEN(q));
+ if (cmp >= 0) {
+ fprintf(stdout,
+ "skiplist inconsistent: %04X: ptr %d is %04X; "
+ "compare() = %d\n",
+ ptr - db->map_base,
+ i,
+ offset, cmp);
+ return CYRUSDB_INTERNAL;
+ }
+ }
+ }
+
+ offset = FORWARD(ptr, 0);
+ }
+
+ if (!locked) unlock(db);
+
+ return 0;
+}
+
+/* run recovery on this file */
+static int recovery(struct db *db, int flags)
+{
+ const char *ptr, *keyptr;
+ int updateoffsets[SKIPLIST_MAXLEVEL];
+ bit32 offset, offsetnet, myoff = 0;
+ int r = 0;
+ time_t start = time(NULL);
+ int i;
+
+ if (!(flags & RECOVERY_CALLER_LOCKED) && (r = write_lock(db, NULL)) < 0) {
+ return r;
+ }
+
+ if ((r = read_header(db)) < 0) {
+ unlock(db);
+ return r;
+ }
+
+ if (!(flags & RECOVERY_FORCE)
+ && global_recovery
+ && db->last_recovery >= global_recovery) {
+ /* someone beat us to it */
+ unlock(db);
+ return 0;
+ }
+
+ db->listsize = 0;
+
+ ptr = DUMMY_PTR(db);
+ r = 0;
+
+ /* verify this is DUMMY */
+ if (!r && TYPE(ptr) != DUMMY) {
+ r = CYRUSDB_IOERROR;
+ syslog(LOG_ERR, "DBERROR: skiplist recovery %s: no dummy node?",
+ db->fname);
+ }
+
+ /* zero key */
+ if (!r && KEYLEN(ptr) != 0) {
+ r = CYRUSDB_IOERROR;
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: dummy node KEYLEN != 0",
+ db->fname);
+ }
+
+ /* zero data */
+ if (!r && DATALEN(ptr) != 0) {
+ r = CYRUSDB_IOERROR;
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: dummy node DATALEN != 0",
+ db->fname);
+ }
+
+ /* pointers for db->maxlevel */
+ if (!r && LEVEL(ptr) != db->maxlevel) {
+ r = CYRUSDB_IOERROR;
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: dummy node level: %d != %d",
+ db->fname, LEVEL(ptr), db->maxlevel);
+ }
+
+ for (i = 0; i < db->maxlevel; i++) {
+ /* header_size + 4 (rectype) + 4 (ksize) + 4 (dsize)
+ + 4 * i */
+ updateoffsets[i] = DUMMY_OFFSET(db) + 12 + 4 * i;
+ }
+
+ /* reset the data that was written INORDER by the last checkpoint */
+ offset = DUMMY_OFFSET(db) + DUMMY_SIZE(db);
+ while (!r && (offset < (bit32) db->logstart)) {
+ ptr = db->map_base + offset;
+ offsetnet = htonl(offset);
+
+ db->listsize++;
+
+ /* make sure this is INORDER */
+ if (TYPE(ptr) != INORDER) {
+ syslog(LOG_ERR, "DBERROR: skiplist recovery: %04X should be INORDER",
+ offset);
+ r = CYRUSDB_IOERROR;
+ continue;
+ }
+
+ /* xxx check \0 fill on key */
+
+ /* xxx check \0 fill on data */
+
+ /* update previous pointers, record these for updating */
+ for (i = 0; !r && i < LEVEL(ptr); i++) {
+ r = lseek(db->fd, updateoffsets[i], SEEK_SET);
+ if (r < 0) {
+ syslog(LOG_ERR, "DBERROR: lseek %s: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ break;
+ } else {
+ r = 0;
+ }
+
+ r = retry_write(db->fd, (char *) &offsetnet, 4);
+ if (r < 0) {
+ r = CYRUSDB_IOERROR;
+ break;
+ } else {
+ r = 0;
+ }
+
+ /* PTR(ptr, i) - ptr is the offset relative to me
+ to my ith pointer */
+ updateoffsets[i] = offset + (PTR(ptr, i) - ptr);
+ }
+
+ /* check padding */
+ if (!r && PADDING(ptr) != (bit32) -1) {
+ syslog(LOG_ERR, "DBERROR: %s: offset %04X padding not -1",
+ db->fname, offset);
+ r = CYRUSDB_IOERROR;
+ }
+
+ if (!r) {
+ offset += RECSIZE(ptr);
+ }
+ }
+
+ /* zero out the remaining pointers */
+ if (!r) {
+ for (i = 0; !r && i < db->maxlevel; i++) {
+ int zerooffset = 0;
+
+ r = lseek(db->fd, updateoffsets[i], SEEK_SET);
+ if (r < 0) {
+ syslog(LOG_ERR, "DBERROR: lseek %s: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ break;
+ } else {
+ r = 0;
+ }
+
+ r = retry_write(db->fd, (char *) &zerooffset, 4);
+ if (r < 0) {
+ r = CYRUSDB_IOERROR;
+ break;
+ } else {
+ r = 0;
+ }
+ }
+ }
+
+ /* replay the log */
+ while (!r && offset < db->map_size) {
+ const char *p, *q;
+
+ /* refresh map, so we see the writes we've just done */
+ map_refresh(db->fd, 0, &db->map_base, &db->map_len, db->map_size,
+ db->fname, 0);
+
+ ptr = db->map_base + offset;
+ offsetnet = htonl(offset);
+
+ /* if this is a commit, we've processed everything in this txn */
+ if (TYPE(ptr) == COMMIT) {
+ offset += RECSIZE(ptr);
+ continue;
+ }
+
+ /* make sure this is ADD or DELETE */
+ if (TYPE(ptr) != ADD && TYPE(ptr) != DELETE) {
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: %04X should be ADD or DELETE",
+ db->fname, offset);
+ r = CYRUSDB_IOERROR;
+ break;
+ }
+
+ /* look ahead for a commit */
+ q = db->map_base + db->map_size;
+ p = ptr;
+ for (;;) {
+ if (RECSIZE(p) <= 0) {
+ /* hmm, we can't trust this transaction */
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: found a RECSIZE of 0, "
+ "truncating corrupted file instead of looping forever...",
+ db->fname);
+ p = q;
+ break;
+ }
+ p += RECSIZE(p);
+ if (p >= q) break;
+ if (TYPE(p) == COMMIT) break;
+ }
+ if (p >= q) {
+ syslog(LOG_NOTICE,
+ "skiplist recovery %s: found partial txn, not replaying",
+ db->fname);
+
+ /* no commit, we should truncate */
+ if (ftruncate(db->fd, offset) < 0) {
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: ftruncate: %m",
+ db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+ break;
+ }
+
+ keyptr = NULL;
+ /* look for the key */
+ if (TYPE(ptr) == ADD) {
+ keyptr = find_node(db, KEY(ptr), KEYLEN(ptr), updateoffsets);
+ if (keyptr == db->map_base ||
+ compare(KEY(ptr), KEYLEN(ptr), KEY(keyptr), KEYLEN(keyptr))) {
+ /* didn't find exactly this node */
+ keyptr = NULL;
+ }
+ } else { /* type == DELETE */
+ const char *p;
+
+ myoff = ntohl(*((bit32 *)(ptr + 4)));
+ p = db->map_base + myoff;
+ keyptr = find_node(db, KEY(p), KEYLEN(p), updateoffsets);
+ if (keyptr == db->map_base) {
+ keyptr = NULL;
+ }
+ }
+
+ /* if DELETE & found key, skip over it */
+ if (TYPE(ptr) == DELETE && keyptr) {
+ db->listsize--;
+
+ for (i = 0; i < db->curlevel; i++) {
+ int newoffset;
+
+ if (FORWARD(db->map_base + updateoffsets[i], i) != myoff) {
+ break;
+ }
+ newoffset = htonl(FORWARD(db->map_base + myoff, i));
+ lseek(db->fd,
+ PTR(db->map_base + updateoffsets[i], i) - db->map_base,
+ SEEK_SET);
+ retry_write(db->fd, (char *) &newoffset, 4);
+ }
+
+ /* otherwise if DELETE, throw an error */
+ } else if (TYPE(ptr) == DELETE) {
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: DELETE at %04X doesn't exist",
+ db->fname, offset);
+ r = CYRUSDB_IOERROR;
+
+ /* otherwise if ADD & found key, throw an error */
+ } else if (TYPE(ptr) == ADD && keyptr) {
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: ADD at %04X exists",
+ db->fname, offset);
+ r = CYRUSDB_IOERROR;
+
+ /* otherwise insert it */
+ } else if (TYPE(ptr) == ADD) {
+ unsigned int lvl;
+ bit32 newoffsets[SKIPLIST_MAXLEVEL];
+
+ db->listsize++;
+ offsetnet = htonl(offset);
+
+ lvl = LEVEL(ptr);
+ if(lvl > SKIPLIST_MAXLEVEL) {
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: node claims level %d (greater than max %d)",
+ db->fname, lvl, SKIPLIST_MAXLEVEL);
+ r = CYRUSDB_IOERROR;
+ } else {
+ for (i = 0; i < lvl; i++) {
+ /* set our next pointers */
+ newoffsets[i] =
+ htonl(FORWARD(db->map_base + updateoffsets[i], i));
+
+ /* replace 'updateoffsets' to point to me */
+ lseek(db->fd,
+ PTR(db->map_base + updateoffsets[i], i) - db->map_base,
+ SEEK_SET);
+ retry_write(db->fd, (char *) &offsetnet, 4);
+ }
+ /* write out newoffsets */
+ lseek(db->fd, FIRSTPTR(ptr) - db->map_base, SEEK_SET);
+ retry_write(db->fd, (char *) newoffsets, 4 * lvl);
+ }
+ /* can't happen */
+ } else {
+ abort();
+ }
+
+ /* move to next record */
+ offset += RECSIZE(ptr);
+ }
+
+ /* fsync the recovered database */
+ if (!r && DO_FSYNC && (fdatasync(db->fd) < 0)) {
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: fdatasync: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ /* set the last recovery timestamp */
+ if (!r) {
+ db->last_recovery = time(NULL);
+ write_header(db);
+ }
+
+ /* fsync the new header */
+ if (!r && DO_FSYNC && (fdatasync(db->fd) < 0)) {
+ syslog(LOG_ERR,
+ "DBERROR: skiplist recovery %s: fdatasync: %m", db->fname);
+ r = CYRUSDB_IOERROR;
+ }
+
+ if (!r) {
+ int diff = time(NULL) - start;
+
+ syslog(LOG_NOTICE,
+ "skiplist: recovered %s (%d record%s, %ld bytes) in %d second%s",
+ db->fname, db->listsize, db->listsize == 1 ? "" : "s",
+ db->map_size, diff, diff == 1 ? "" : "s");
+ }
+
+ if(r || !(flags & RECOVERY_CALLER_LOCKED)) {
+ unlock(db);
+ }
+
+ return r;
+}
+
+struct cyrusdb_backend cyrusdb_skiplist =
+{
+ "skiplist", /* name */
+
+ &myinit,
+ &mydone,
+ &mysync,
+ &myarchive,
+
+ &myopen,
+ &myclose,
+
+ &fetch,
+ &fetchlock,
+ &myforeach,
+ &create,
+ &store,
+ &mydelete,
+
+ &mycommit,
+ &myabort,
+
+ &dump,
+ &consistent
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/exitcodes.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/exitcodes.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/exitcodes.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/exitcodes.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+/* exitcodes.h -- wrapper around sysextis.h
+ * $Id: exitcodes.h,v 1.5 2003/02/13 20:15:39 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* Sendmail has some weird ideas on what constitutes permenant failure. On
+ more than one occasion, we have gotten burned by this moving users around
+ through various inadvisable means, screwing up the mailboxes file,
+ whatever.
+
+ We don't want to fail out permenantly on things like EX_USAGE, EX_SOFTWARE,
+ etc., because that generally means someone was just screwing with the mail
+ store and we don't want to lose mail.
+
+ Instead, we map these EC_* codes to EX_* codes, thereby lying to Sendmail,
+ since we don't derive any benefit from Sendmail knowing what the error was.
+ We just want it to retry all the time anyway. This way, should sendmail's
+ behavior be different and we start deriving benefit from Sendmail knowing
+ stuff, we can easily change it back.
+
+ So other code uses the EC_* error, then we maybe change it to TEMPFAIL if
+ we don't agree on whether the error should be permenant or not.
+
+ Comments below stolen from sysexits.h. */
+
+#ifndef INCLUDED_EXITCODES_H
+#define INCLUDED_EXITCODES_H
+
+#include <sysexits.h>
+
+#define EC_OK 0 /* successful termination */
+
+#define EC_USAGE EX_TEMPFAIL /* command line usage error */
+#define EC_DATAERR EX_DATAERR /* data format error */
+#define EC_NOINPUT EX_TEMPFAIL /* cannot open input */
+#define EC_NOUSER EX_NOUSER /* addressee unknown */
+#define EC_NOHOST EX_TEMPFAIL /* host name unknown */
+#define EC_UNAVAILABLE EX_TEMPFAIL /* service unavailable */
+#define EC_SOFTWARE EX_TEMPFAIL /* internal software error */
+#define EC_OSERR EX_TEMPFAIL /* system error (e.g., can't fork) */
+#define EC_OSFILE EX_TEMPFAIL /* critical OS file missing */
+#define EC_CANTCREAT EX_TEMPFAIL /* can't create (user) output file */
+#define EC_IOERR EX_TEMPFAIL /* input/output error */
+#define EC_TEMPFAIL EX_TEMPFAIL /* user is invited to retry */
+#define EC_PROTOCOL EX_TEMPFAIL /* remote error in protocol */
+#define EC_NOPERM EX_NOPERM /* permission denied */
+#define EC_CONFIG EX_TEMPFAIL /* configuration error */
+
+#endif /* INCLUDED_EXITCODES_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/ftruncate.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/ftruncate.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/ftruncate.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/ftruncate.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,55 @@
+/* ftruncate -- Replacement ftruncate() function
+ * Does nothing
+ $Id: ftruncate.c,v 1.8 2003/02/13 20:15:39 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+#include <errno.h>
+
+int
+ftruncate(fd, length)
+int fd;
+int length;
+{
+ errno = EINVAL;
+ return -1;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gai.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gai.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gai.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gai.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,104 @@
+/*
+ * Mar 8, 2000 by Hajimu UMEMOTO <ume at mahoroba.org>
+ * $Id: gai.h,v 1.6 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * This module is besed on ssh-1.2.27-IPv6-1.5 written by
+ * KIKUCHI Takahiro <kick at kyoto.wide.ad.jp>
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * fake library for ssh
+ *
+ * This file is included in getaddrinfo.c and getnameinfo.c.
+ * See getaddrinfo.c and getnameinfo.c.
+ */
+
+#ifndef _GAI_H_
+#define _GAI_H_
+
+#ifndef NI_MAXHOST
+#define NI_MAXHOST 1025
+#endif
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
+#endif
+
+/* for old netdb.h */
+#ifndef EAI_SERVICE
+#define EAI_MEMORY 2
+#define EAI_FAMILY 5 /* ai_family not supported */
+#define EAI_NONAME 8 /* hostname nor servname provided, or not known */
+#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
+#endif
+
+/* dummy value for old netdb.h */
+#ifndef AI_PASSIVE
+#define AI_PASSIVE 1
+#define AI_CANONNAME 2
+#define AI_NUMERICHOST 4
+#define NI_NUMERICHOST 2
+#define NI_NAMEREQD 4
+#define NI_NUMERICSERV 8
+struct addrinfo {
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+ size_t ai_addrlen; /* length of ai_addr */
+ char *ai_canonname; /* canonical name for hostname */
+ struct sockaddr *ai_addr; /* binary address */
+ struct addrinfo *ai_next; /* next structure in linked list */
+};
+#endif
+
+#ifndef HAVE_GETNAMEINFO
+int getnameinfo(const struct sockaddr *, socklen_t, char *,
+ size_t, char *, size_t, int);
+#endif
+
+#ifndef HAVE_GETADDRINFO
+int getaddrinfo(const char *, const char *,
+ const struct addrinfo *, struct addrinfo **);
+void freeaddrinfo(struct addrinfo *);
+char *gai_strerror(int);
+#endif
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getaddrinfo.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getaddrinfo.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getaddrinfo.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getaddrinfo.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,225 @@
+/*
+ * Mar 8, 2000 by Hajimu UMEMOTO <ume at mahoroba.org>
+ * $Id: getaddrinfo.c,v 1.6 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * This module is besed on ssh-1.2.27-IPv6-1.5 written by
+ * KIKUCHI Takahiro <kick at kyoto.wide.ad.jp>
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * fake library for ssh
+ *
+ * This file includes getaddrinfo(), freeaddrinfo() and gai_strerror().
+ * These funtions are defined in rfc2133.
+ *
+ * But these functions are not implemented correctly. The minimum subset
+ * is implemented for ssh use only. For exapmle, this routine assumes
+ * that ai_family is AF_INET. Don't use it for another purpose.
+ *
+ * In the case not using 'configure --enable-ipv6', this getaddrinfo.c
+ * will be used if you have broken getaddrinfo or no getaddrinfo.
+ */
+
+#include "config.h"
+#ifndef macintosh
+#include <sys/param.h>
+#include <arpa/inet.h>
+#endif
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+static struct addrinfo *
+malloc_ai(int port, u_long addr, int socktype, int proto)
+{
+ struct addrinfo *ai;
+
+ ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) +
+ sizeof(struct sockaddr_in));
+ if (ai) {
+ memset(ai, 0, sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
+ ai->ai_addr = (struct sockaddr *)(ai + 1);
+ /* XXX -- ssh doesn't use sa_len */
+ ai->ai_addrlen = sizeof(struct sockaddr_in);
+#ifdef HAVE_SOCKADDR_SA_LEN
+ ai->ai_addr->sa_len = sizeof(struct sockaddr_in);
+#endif
+ ai->ai_addr->sa_family = ai->ai_family = AF_INET;
+ ((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
+ ((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
+ ai->ai_socktype = socktype;
+ ai->ai_protocol = proto;
+ return ai;
+ } else {
+ return NULL;
+ }
+}
+
+char *
+gai_strerror(int ecode)
+{
+ switch (ecode) {
+ case EAI_MEMORY:
+ return "memory allocation failure.";
+ case EAI_FAMILY:
+ return "ai_family not supported.";
+ case EAI_NONAME:
+ return "hostname nor servname provided, or not known.";
+ case EAI_SERVICE:
+ return "servname not supported for ai_socktype.";
+ default:
+ return "unknown error.";
+ }
+}
+
+void
+freeaddrinfo(struct addrinfo *ai)
+{
+ struct addrinfo *next;
+
+ if (ai->ai_canonname)
+ free(ai->ai_canonname);
+ do {
+ next = ai->ai_next;
+ free(ai);
+ } while ((ai = next) != NULL);
+}
+
+int
+getaddrinfo(const char *hostname, const char *servname,
+ const struct addrinfo *hints, struct addrinfo **res)
+{
+ struct addrinfo *cur, *prev = NULL;
+ struct hostent *hp;
+ struct in_addr in;
+ int i, port = 0, socktype, proto;
+
+ if (hints && hints->ai_family != PF_INET && hints->ai_family != PF_UNSPEC)
+ return EAI_FAMILY;
+
+ socktype = (hints && hints->ai_socktype) ? hints->ai_socktype
+ : SOCK_STREAM;
+ if (hints && hints->ai_protocol)
+ proto = hints->ai_protocol;
+ else {
+ switch (socktype) {
+ case SOCK_DGRAM:
+ proto = IPPROTO_UDP;
+ break;
+ case SOCK_STREAM:
+ proto = IPPROTO_TCP;
+ break;
+ default:
+ proto = 0;
+ break;
+ }
+ }
+ if (servname) {
+ if (isdigit((int)*servname))
+ port = htons(atoi(servname));
+ else {
+ struct servent *se;
+ char *pe_proto;
+
+ switch (socktype) {
+ case SOCK_DGRAM:
+ pe_proto = "udp";
+ break;
+ case SOCK_STREAM:
+ pe_proto = "tcp";
+ break;
+ default:
+ pe_proto = NULL;
+ break;
+ }
+ if ((se = getservbyname(servname, pe_proto)) == NULL)
+ return EAI_SERVICE;
+ port = se->s_port;
+ }
+ }
+ if (!hostname) {
+ if (hints && hints->ai_flags & AI_PASSIVE)
+ *res = malloc_ai(port, htonl(0x00000000), socktype, proto);
+ else
+ *res = malloc_ai(port, htonl(0x7f000001), socktype, proto);
+ if (*res)
+ return 0;
+ else
+ return EAI_MEMORY;
+ }
+ if (inet_aton(hostname, &in)) {
+ *res = malloc_ai(port, in.s_addr, socktype, proto);
+ if (*res)
+ return 0;
+ else
+ return EAI_MEMORY;
+ }
+ if (hints && hints->ai_flags & AI_NUMERICHOST)
+ return EAI_NONAME;
+#ifndef macintosh
+ if ((hp = gethostbyname(hostname)) &&
+ hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
+ for (i = 0; hp->h_addr_list[i]; i++) {
+ if ((cur = malloc_ai(port,
+ ((struct in_addr *)hp->h_addr_list[i])->s_addr,
+ socktype, proto)) == NULL) {
+ if (*res)
+ freeaddrinfo(*res);
+ return EAI_MEMORY;
+ }
+ if (prev)
+ prev->ai_next = cur;
+ else
+ *res = cur;
+ prev = cur;
+ }
+ if (hints && hints->ai_flags & AI_CANONNAME && *res) {
+ /* NOT sasl_strdup for compatibility */
+ if (((*res)->ai_canonname = strdup(hp->h_name)) == NULL) {
+ freeaddrinfo(*res);
+ return EAI_MEMORY;
+ }
+ }
+ return 0;
+ }
+#endif
+ return EAI_NONAME;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getdtablesize.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getdtablesize.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getdtablesize.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getdtablesize.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,51 @@
+/* getdtablesize.c -- Returns the maximum number of file descriptors allowed.
+ $Id: getdtablesize.c,v 1.7 2003/02/13 20:15:40 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+#include <unistd.h>
+
+int
+getdtablesize ()
+{
+ return(sysconf(_SC_OPEN_MAX));
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getnameinfo.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getnameinfo.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getnameinfo.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/getnameinfo.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,113 @@
+/*
+ * Mar 8, 2000 by Hajimu UMEMOTO <ume at mahoroba.org>
+ * $Id: getnameinfo.c,v 1.6 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * This module is besed on ssh-1.2.27-IPv6-1.5 written by
+ * KIKUCHI Takahiro <kick at kyoto.wide.ad.jp>
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * fake library for ssh
+ *
+ * This file includes getnameinfo().
+ * These funtions are defined in rfc2133.
+ *
+ * But these functions are not implemented correctly. The minimum subset
+ * is implemented for ssh use only. For exapmle, this routine assumes
+ * that ai_family is AF_INET. Don't use it for another purpose.
+ *
+ * In the case not using 'configure --enable-ipv6', this getnameinfo.c
+ * will be used if you have broken getnameinfo or no getnameinfo.
+ */
+
+#include "config.h"
+#include <arpa/inet.h>
+#include <stdio.h>
+#include <string.h>
+
+int
+getnameinfo(const struct sockaddr *sa, socklen_t salen __attribute__((unused)),
+ char *host, size_t hostlen, char *serv, size_t servlen, int flags)
+{
+ struct sockaddr_in *sin = (struct sockaddr_in *)sa;
+ struct hostent *hp;
+ char tmpserv[16];
+
+ if (serv) {
+ snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
+ if (strlen(tmpserv) > servlen)
+ return EAI_MEMORY;
+ else
+ strcpy(serv, tmpserv);
+ }
+ if (host) {
+ if (flags & NI_NUMERICHOST) {
+ if (flags & NI_NAMEREQD)
+ return EAI_NONAME;
+ if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen)
+ return EAI_MEMORY;
+ else {
+ strcpy(host, inet_ntoa(sin->sin_addr));
+ return 0;
+ }
+ } else {
+ hp = gethostbyaddr((char *)&sin->sin_addr,
+ sizeof(struct in_addr), AF_INET);
+ if (hp)
+ if (strlen(hp->h_name) >= hostlen)
+ return EAI_MEMORY;
+ else {
+ strcpy(host, hp->h_name);
+ return 0;
+ }
+ else if (flags & NI_NAMEREQD)
+ return EAI_NONAME;
+ else if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen)
+ return EAI_MEMORY;
+ else {
+ strcpy(host, inet_ntoa(sin->sin_addr));
+ return 0;
+ }
+ }
+ }
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,467 @@
+/* glob.c -- fast globbing routine using '*', '%', and '?'
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Chris Newman
+ * Start Date: 4/5/93
+ */
+/*
+ * $Id: glob.c,v 1.25.4.1 2003/12/19 18:33:42 ken3 Exp $
+ */
+
+#include <config.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include "util.h"
+#include "glob.h"
+#include "xmalloc.h"
+
+#define SEPCHAR '.'
+
+/* name of "INBOX" -- must have no repeated substrings */
+static char inbox[] = "INBOX";
+#define INBOXLEN (sizeof (inbox) - 1)
+
+/* initialize globbing structure
+ * This makes the following changes to the input string:
+ * 1) '*' added to each end if GLOB_SUBSTRING
+ * 2) '%' converted to '?' if no GLOB_HIERARCHIAL
+ * 3) '?'s moved to left of '*'
+ * 4) '*' eats all '*'s and '%'s connected by any wildcard
+ * 5) '%' eats all adjacent '%'s
+ */
+glob *glob_init_suppress (str, flags, suppress)
+ const char *str;
+ int flags;
+ const char *suppress;
+{
+ glob *g;
+ char *dst;
+ int slen = 0, newglob;
+
+ newglob = flags & GLOB_HIERARCHY;
+ if (suppress) slen = strlen(suppress);
+ g = (glob *) xmalloc(sizeof (glob) + slen + strlen(str) + 1);
+ if (g != 0) {
+ strcpy(g->inbox, inbox);
+ g->sep_char = '.';
+ dst = g->str;
+ /* if we're doing a substring match, put a '*' prefix (1) */
+ if (flags & GLOB_SUBSTRING) {
+ /* skip over unneeded glob prefixes (3,4) */
+ if (newglob) {
+ while (*str == '*' || (*str == '%' && str[1])) ++str;
+ } else {
+ while (*str == '%' || *str == '*' || *str == '?') {
+ if (*str++ != '*') *dst++ = '?';
+ }
+ }
+ *dst++ = '*';
+ }
+ if (!newglob) {
+ while (*str) {
+ if (*str == '*') {
+ /* move '?' to left of '*' (3) */
+ while (*str == '*' || *str == '%' || *str == '?') {
+ if (*str++ != '*') *dst++ = '?';
+ }
+ *dst++ = '*';
+ } else {
+ *dst++ = (char)((*str == '%') ? '?' : *str);
+ ++str;
+ }
+ }
+ } else {
+ while (*str) {
+ if (*str == '*' || *str == '%') {
+ /* remove duplicate hierarchy match (5) */
+ while (*str == '%') ++str;
+ /* If we found a '*', treat '%' as '*' (4) */
+ if (*str == '*') {
+ /* remove duplicate wildcards (4) */
+ while (*str == '*' || (*str == '%' && str[1])) ++str;
+ *dst++ = '*';
+ } else {
+ *dst++ = '%';
+ }
+ } else {
+ *dst++ = *str++;
+ }
+ }
+ }
+ /* put a '*' suffix (1) */
+ if (flags & GLOB_SUBSTRING && dst[-1] != '*') {
+ /* remove duplicate wildcards (4) */
+ if (newglob) while (dst[-1] == '%') --dst;
+ *dst++ = '*';
+ }
+ *dst++ = '\0';
+ if (flags & GLOB_ICASE) lcase(g->str);
+ g->flags = flags;
+
+ /* pre-match "INBOX" to the pattern case insensitively and save state
+ * also keep track of the matching case for "INBOX"
+ * NOTE: this only works because "INBOX" has no repeated substrings
+ */
+ if (flags & GLOB_INBOXCASE) {
+ str = g->str;
+ dst = g->inbox;
+ g->gstar = g->ghier = NULL;
+ do {
+ while (*dst && TOLOWER(*str) == TOLOWER(*dst)) {
+ *dst++ = *str++;
+ }
+ if (*str == '*') g->gstar = ++str, g->ghier = 0;
+ else if (*str == '%') g->ghier = ++str;
+ else break;
+ if (*str != '%') {
+ while (*dst && TOLOWER(*str) != TOLOWER(*dst)) ++dst;
+ }
+ } while (*str && *dst);
+ g->gptr = str;
+ if (*dst) g->flags &= ~GLOB_INBOXCASE;
+ }
+
+ /* set suppress string if:
+ * 1) the suppress string isn't a prefix of the glob pattern and
+ * 2) the suppress string prefix matches the glob pattern
+ * or GLOB_INBOXCASE is set
+ */
+ g->suppress = 0;
+ if (suppress) {
+ dst = g->str + strlen(g->str) + 1;
+ strcpy(dst, suppress);
+ str = g->str;
+ if (strncmp(suppress, str, slen) ||
+ (str[slen] != '\0' && str[slen] != g->sep_char
+ && str[slen] != '*' && str[slen] != '%')) {
+ while (*str && *str == *suppress) ++str, ++suppress;
+ if ((g->flags & GLOB_INBOXCASE)
+ || *str == '*' || *str == '%' || *suppress == '\0') {
+ g->suppress = dst;
+ g->slen = slen;
+ }
+ }
+ }
+ }
+
+ return (g);
+}
+
+/* free a glob structure
+ */
+void glob_free (g)
+ glob **g;
+{
+ if (*g) free((void *) *g);
+ *g = NULL;
+}
+
+/* returns -1 if no match, otherwise length of match or partial-match
+ * g pre-processed glob string
+ * ptr string to perform glob on
+ * len length of ptr string
+ * min pointer to minimum length of a valid partial-match
+ * set to return value + 1 on partial match, otherwise -1
+ * if NULL, partial matches not allowed
+ */
+int glob_test (g, ptr, len, min)
+ glob* g;
+ const char* ptr;
+ long int len;
+ long int *min;
+{
+ const char *gptr, *pend; /* glob pointer, end of ptr string */
+ const char *gstar, *pstar; /* pointers for '*' patterns */
+ const char *ghier, *phier; /* pointers for '%' patterns */
+ const char *start; /* start of input string */
+ int newglob;
+ int sepfound; /* Set to 1 when a separator is found
+ * after a '%'. Otherwise 0.
+ */
+
+ /* check for remaining partial matches */
+ if (min && *min < 0) return (-1);
+
+ /* get length */
+ if (!len) len = strlen(ptr);
+
+ /* initialize globbing */
+ gptr = g->str;
+ start = ptr;
+ pend = ptr + len;
+ gstar = ghier = NULL;
+ newglob = g->flags & GLOB_HIERARCHY;
+ phier = pstar = NULL; /* initialize to eliminate warnings */
+
+ /* check for INBOX prefix */
+ if ((g->flags & GLOB_INBOXCASE) && !strncmp(ptr, inbox, INBOXLEN)) {
+ pstar = phier = ptr += INBOXLEN;
+ gstar = g->gstar;
+ ghier = g->ghier;
+ gptr = g->gptr;
+ }
+
+ /* check for suppress string */
+ if (g->suppress && !strncmp(g->suppress, ptr, g->slen) &&
+ (ptr[g->slen] == '\0' || ptr[g->slen] == g->sep_char)) {
+ if (!(g->flags & GLOB_INBOXCASE)) {
+ if (min) *min = -1;
+ return (-1);
+ }
+ pstar = phier = ptr += g->slen;
+ gstar = g->gstar;
+ ghier = g->ghier;
+ gptr = g->gptr;
+ }
+
+ /* main globbing loops */
+ if (!(g->flags & GLOB_ICASE)) {
+ /* case sensitive version */
+
+ /* loop to manage wildcards */
+ do {
+ sepfound = 0;
+ /* see if we match to the next '%' or '*' wildcard */
+ while (*gptr != '*' && *gptr != '%' && ptr != pend
+ && (*gptr == *ptr || (!newglob && *gptr == '?'))) {
+ ++ptr, ++gptr;
+ }
+
+ if (*gptr == '\0' && ptr == pend) {
+ /* End of pattern and end of string -- match! */
+ break;
+ }
+
+ if (*gptr == '*') {
+ ghier = NULL;
+ gstar = ++gptr;
+ pstar = ptr;
+ }
+ if (*gptr == '%') {
+ ghier = ++gptr;
+ phier = ptr;
+ }
+
+ if (ghier) {
+ /* look for a match with first char following '%',
+ * stop at a sep_char unless we're doing "*%"
+ */
+ ptr = phier;
+ while (ptr != pend && *ghier != *ptr
+ && (*ptr != g->sep_char ||
+ (!*ghier && gstar && *gstar == '%' && min
+ && ptr - start < *min))) {
+ ++ptr;
+ }
+ if (ptr == pend) {
+ gptr = ghier;
+ break;
+ }
+ if (*ptr == g->sep_char) {
+ if (!*ghier && min
+ && *min < ptr - start && ptr != pend
+ && *ptr == g->sep_char
+ ) {
+ *min = gstar ? ptr - start + 1 : -1;
+ return (ptr - start);
+ }
+ ghier = NULL;
+ sepfound = 1;
+ } else {
+ phier = ++ptr;
+ gptr = ghier + 1;
+ }
+ }
+ if (gstar && !ghier) {
+ /* was the * at the end of the pattern? */
+ if (!*gstar) {
+ ptr = pend;
+ break;
+ }
+
+ /* look for a match with first char following '*' */
+ while (pstar != pend && *gstar != *pstar) ++pstar;
+ if (pstar == pend) {
+ if (*gptr == '\0' && min && *min < ptr - start && ptr != pend &&
+ *ptr == g->sep_char) {
+ /* The pattern ended on a hierarchy separator
+ * return a partial match */
+ *min = ptr - start + 1;
+ return ptr - start;
+ }
+ gptr = gstar;
+ break;
+ }
+
+ ptr = ++pstar;
+ gptr = gstar + 1;
+ }
+ if (*gptr == '\0' && min && *min < ptr - start && ptr != pend &&
+ *ptr == g->sep_char) {
+ /* The pattern ended on a hierarchy separator
+ * return a partial match */
+ *min = ptr - start + 1;
+ return ptr - start;
+ }
+
+ /* continue if at wildcard or we passed an asterisk */
+ } while (*gptr == '*' || *gptr == '%' ||
+ ((gstar || ghier || sepfound) && (*gptr || ptr != pend)));
+ } else {
+ /* case insensitive version (same as above, but with TOLOWER()) */
+
+ /* loop to manage wildcards */
+ do {
+ sepfound = 0;
+ /* see if we match to the next '%' or '*' wildcard */
+ while (*gptr != '*' && *gptr != '%' && ptr != pend
+ && ((unsigned char) *gptr == TOLOWER(*ptr) ||
+ (!newglob && *gptr == '?'))) {
+ ++ptr, ++gptr;
+ }
+ if (*gptr == '\0' && ptr == pend) {
+ /* End of pattern and end of string -- match! */
+ break;
+ }
+
+ if (*gptr == '*') {
+ ghier = NULL;
+ gstar = ++gptr;
+ pstar = ptr;
+ }
+ if (*gptr == '%') {
+ ghier = ++gptr;
+ phier = ptr;
+ }
+
+ if (ghier) {
+ /* look for a match with first char following '%',
+ * stop at a sep_char unless we're doing "*%"
+ */
+ ptr = phier;
+ while (ptr != pend && (unsigned char) *ghier != TOLOWER(*ptr)
+ && (*ptr != g->sep_char ||
+ (!*ghier && gstar && *gstar == '%' && min
+ && ptr - start < *min))) {
+ ++ptr;
+ }
+ if (ptr == pend) {
+ gptr = ghier;
+ break;
+ }
+ if (*ptr == g->sep_char) {
+ if (!*ghier && min
+ && *min < ptr - start && ptr != pend
+ && *ptr == g->sep_char
+ ) {
+ *min = gstar ? ptr - start + 1 : -1;
+ return (ptr - start);
+ }
+ ghier = NULL;
+ sepfound = 1;
+ } else {
+ phier = ++ptr;
+ gptr = ghier + 1;
+ }
+ }
+ if (gstar && !ghier) {
+ if (!*gstar) {
+ ptr = pend;
+ break;
+ }
+ /* look for a match with first char following '*' */
+ while (pstar != pend &&
+ (unsigned char) *gstar != TOLOWER(*pstar)) ++pstar;
+ if (pstar == pend) {
+ if (*gptr == '\0' && min && *min < ptr - start && ptr != pend &&
+ *ptr == g->sep_char) {
+ /* The pattern ended on a hierarchy separator
+ * return a partial match */
+ *min = ptr - start + 1;
+ return ptr - start;
+ }
+ gptr = gstar;
+ break;
+ }
+ ptr = ++pstar;
+ gptr = gstar + 1;
+ }
+ if (*gptr == '\0' && min && *min < ptr - start && ptr != pend &&
+ *ptr == g->sep_char) {
+ /* The pattern ended on a hierarchy separator
+ * return a partial match */
+ *min = ptr - start + 1;
+ return ptr - start;
+ }
+
+ /* continue if at wildcard or we passed an asterisk */
+ } while (*gptr == '*' || *gptr == '%' ||
+ ((gstar || ghier || sepfound) && (*gptr || ptr != pend)));
+ }
+
+ if (min) *min = -1;
+ return (*gptr == '\0' && ptr == pend ? ptr - start : -1);
+}
+
+#ifdef TEST_GLOB
+int main (argc, argv)
+ int argc;
+ char* argv[];
+{
+ glob *g = glob_init_suppress(argv[1], GLOB_INBOXCASE|GLOB_HIERARCHY,
+ "user.nifty");
+ char text[1024];
+ int len;
+ long min;
+
+ if (g) {
+ printf("%d/%s/%s\n", g->flags, g->inbox, g->str);
+ while (fgets(text, sizeof (text), stdin) != NULL) {
+ len = strlen(text) - 1;
+ text[len] = '\0';
+ min = 0;
+ while (min >= 0) {
+ printf("%d\n", glob_test(g, text, len, &min));
+ }
+ }
+ }
+}
+#endif /* TEST_GLOB */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/glob.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,105 @@
+/* glob.h -- fast globbing routine using '*', '%', and '?'
+ $Id: glob.h,v 1.12 2003/02/13 20:15:40 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * Author: Chris Newman
+ * Start Date: 4/5/93
+ */
+
+#ifndef INCLUDED_GLOB_H
+#define INCLUDED_GLOB_H
+
+#ifndef P
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+#endif
+
+/* "compiled" glob structure: may change
+ */
+typedef struct glob {
+ int flags; /* glob flags, see below */
+ int slen; /* suppress string length */
+ char *suppress; /* suppress string pointer */
+ const char *gstar, *ghier, *gptr; /* INBOX prefix comparison state */
+ char sep_char; /* separator character */
+ char inbox[6]; /* INBOX in the correct case */
+ char str[3]; /* glob string & suppress string */
+} glob;
+
+/* glob_init flags: */
+#define GLOB_ICASE 0x01 /* case insensitive */
+#define GLOB_SUBSTRING 0x02 /* match a substring */
+#define GLOB_HIERARCHY 0x04 /* use '%' as hierarchy matching and no '?' */
+#define GLOB_INBOXCASE 0x08 /* match "inbox" prefix case insensitive */
+
+/* initialize globbing structure
+ * str -- globbing string
+ * flags -- see flag values above
+ * suppress -- prefix to suppress
+ */
+extern glob *glob_init_suppress P((const char *str, int flags,
+ const char *suppress));
+
+/* free a glob structure
+ */
+extern void glob_free P((glob **g));
+
+/* returns -1 if no match, otherwise length of match or partial-match
+ * g pre-processed glob string
+ * ptr string to perform glob on
+ * len length of ptr string (if 0, strlen() is used)
+ * min pointer to minimum length of a valid partial-match.
+ * Set to -1 if no more matches. Set to return value + 1
+ * if another match is possible. If NULL, no partial-matches
+ * are returned.
+ */
+extern int glob_test P((glob *g, const char *str, long len, long *min));
+
+/* macros */
+#define glob_init(str, flags) glob_init_suppress((str), (flags), NULL)
+#define glob_inboxcase(g) ((g)->inbox)
+#define GLOB_TEST(g, str) glob_test((g), (str), 0, NULL)
+#define GLOB_SET_SEPARATOR(g, c) ((g)->sep_char = (c))
+
+#endif /* INCLUDED_GLOB_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+/* gmtoff.h -- Get GMT offset
+ $Id: gmtoff.h,v 1.6 2003/02/13 20:15:40 rjs3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_GMTOFF_H
+#define INCLUDED_GMTOFF_H
+
+#ifndef P
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+#endif
+
+#include <time.h>
+
+extern int gmtoff_of P((struct tm *tm, time_t time));
+
+#endif /* INCLUDED_GMTOFF_H */
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_gmtime.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_gmtime.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_gmtime.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_gmtime.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,79 @@
+/* gmtoff_tm.c - Get offset from GMT by calling gmtime and subtracting
+ $Id: gmtoff_gmtime.c,v 1.11 2003/10/22 18:50:12 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+
+/*
+ * Returns the GMT offset of the struct tm 'tm', obtained from 'time'.
+ */
+int gmtoff_of(tm, time)
+struct tm *tm;
+time_t time;
+{
+ struct tm local, gmt;
+ struct tm *gtm;
+ long offset;
+
+ local = *tm;
+ gtm = gmtime(&time);
+ gmt = *gtm;
+
+ /* Assume we are never more than 24 hours away. */
+ offset = local.tm_yday - gmt.tm_yday;
+ if (offset > 1) {
+ offset = -24;
+ } else if (offset < -1) {
+ offset = 24;
+ } else {
+ offset *= 24;
+ }
+
+ /* Scale in the hours and minutes; ignore seconds. */
+ offset += local.tm_hour - gmt.tm_hour;
+ offset *= 60;
+ offset += local.tm_min - gmt.tm_min;
+
+ /* Restore the data in the struct 'tm' points to */
+ *tm = local;
+ return offset * 60;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_tm.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_tm.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_tm.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/gmtoff_tm.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,54 @@
+/* gmtoff_tm.c - Get offset from GMT from the tm_gmtoff struct member
+ $Id: gmtoff_tm.c,v 1.9.2.1 2004/02/27 21:17:39 ken3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+
+/*
+ * Returns the GMT offset of the struct tm 'tm', obtained from 'time'.
+ */
+int gmtoff_of(tm, time)
+struct tm *tm;
+time_t time __attribute__((unused));
+{
+ return tm->tm_gmtoff;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,391 @@
+/* +++Date last modified: 05-Jul-1997 */
+/* $Id: hash.c,v 1.11.2.1 2004/05/25 01:28:14 ken3 Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "hash.h"
+#include "mpool.h"
+#include "xmalloc.h"
+#include "exitcodes.h"
+
+/*
+** public domain code by Jerry Coffin, with improvements by HenkJan Wolthuis.
+**
+** Tested with Visual C 1.0 and Borland C 3.1.
+** Compiles without warnings, and seems like it should be pretty
+** portable.
+**
+** Modified for use with libcyrus by Ken Murchison.
+** - prefixed functions with 'hash_' to avoid symbol clashing
+** - use xmalloc() and xstrdup()
+** - cleaned up free_hash_table(), doesn't use enumerate anymore
+** - added 'rock' to hash_enumerate()
+**
+** Further modified by Rob Siemborski.
+** - xmalloc can never return NULL, so don't worry about it
+** - sort the buckets for faster searching
+** - actually, we'll just use a memory pool for this sucker
+** (atleast, in the cases where it is advantageous to do so)
+*/
+
+/* Initialize the hash_table to the size asked for. Allocates space
+** for the correct number of pointers and sets them to NULL. If it
+** can't allocate sufficient memory, signals error by setting the size
+** of the table to 0.
+*/
+
+hash_table *construct_hash_table(hash_table *table, size_t size, int use_mpool)
+{
+ if(!table)
+ fatal("construct_hash_table called without a starting table",
+ EC_TEMPFAIL);
+ if(!size)
+ fatal("construct_hash_table called without a size", EC_TEMPFAIL);
+
+ table->size = size;
+
+ /* Allocate the table -- different for using memory pools and not */
+ if(use_mpool) {
+ /* Allocate an initial memory pool for 32 byte keys + the hash table
+ * + the buckets themselves */
+ table->pool =
+ new_mpool(size * (32 + sizeof(bucket*) + sizeof(bucket)));
+ table->table =
+ (bucket **)mpool_malloc(table->pool,sizeof(bucket *) * size);
+ } else {
+ table->pool = NULL;
+ table->table = xmalloc(sizeof(bucket *) * size);
+ }
+
+ /* Allocate the table and initilize it */
+ memset(table->table, 0, sizeof(bucket *) * size);
+
+ return table;
+}
+
+/*
+** Insert 'key' into hash table.
+** Returns pointer to old data associated with the key, if any, or
+** NULL if the key wasn't in the table previously.
+*/
+
+void *hash_insert(const char *key, void *data, hash_table *table)
+{
+ unsigned val = strhash(key) % table->size;
+ bucket *ptr, *newptr;
+ bucket **prev;
+
+ /*
+ ** NULL means this bucket hasn't been used yet. We'll simply
+ ** allocate space for our new bucket and put our data there, with
+ ** the table pointing at it.
+ */
+ if (!((table->table)[val]))
+ {
+ if(table->pool) {
+ (table->table)[val] =
+ (bucket *)mpool_malloc(table->pool, sizeof(bucket));
+ (table->table)[val] -> key = mpool_strdup(table->pool, key);
+ } else {
+ (table->table)[val] = (bucket *)xmalloc(sizeof(bucket));
+ (table->table)[val] -> key = xstrdup(key);
+ }
+ (table->table)[val] -> next = NULL;
+ (table->table)[val] -> data = data;
+ return (table->table)[val] -> data;
+ }
+
+ /*
+ ** This spot in the table is already in use. See if the current string
+ ** has already been inserted, and if so, increment its count.
+ */
+ for (prev = &((table->table)[val]), ptr=(table->table)[val];
+ ptr;
+ prev=&(ptr->next),ptr=ptr->next) {
+ int cmpresult = strcmp(key,ptr->key);
+ if (!cmpresult) {
+ /* Match! Replace this value and return the old */
+ void *old_data;
+
+ old_data = ptr->data;
+ ptr -> data = data;
+ return old_data;
+ } else if (cmpresult < 0) {
+ /* The new key is smaller than the current key--
+ * insert a node and return this data */
+ if(table->pool) {
+ newptr = (bucket *)mpool_malloc(table->pool, sizeof(bucket));
+ newptr->key = mpool_strdup(table->pool, key);
+ } else {
+ newptr = (bucket *)xmalloc(sizeof(bucket));
+ newptr->key = xstrdup(key);
+ }
+ newptr->data = data;
+ newptr->next = ptr;
+ *prev = newptr;
+ return data;
+ }
+ }
+
+ /*
+ ** This key is the largest one so far. Add it to the end
+ ** of the list (*prev should be correct)
+ */
+ if(table->pool) {
+ newptr=(bucket *)mpool_malloc(table->pool,sizeof(bucket));
+ newptr->key = mpool_strdup(table->pool,key);
+ } else {
+ newptr=(bucket *)xmalloc(sizeof(bucket));
+ newptr->key = xstrdup(key);
+ }
+ newptr->data = data;
+ newptr->next = NULL;
+ *prev = newptr;
+ return data;
+}
+
+
+/*
+** Look up a key and return the associated data. Returns NULL if
+** the key is not in the table.
+*/
+
+void *hash_lookup(const char *key, hash_table *table)
+{
+ unsigned val = strhash(key) % table->size;
+ bucket *ptr;
+
+ if (!(table->table)[val])
+ return NULL;
+
+ for ( ptr = (table->table)[val];NULL != ptr; ptr = ptr->next )
+ {
+ int cmpresult = strcmp(key, ptr->key);
+ if (!cmpresult)
+ return ptr->data;
+ else if(cmpresult < 0) /* key < ptr->key -- we passed it */
+ return NULL;
+ }
+ return NULL;
+}
+
+/*
+** Delete a key from the hash table and return associated
+** data, or NULL if not present.
+*/
+/* Warning: use this function judiciously if you are using memory pools,
+ * since it will leak memory until you get rid of the entire hash table */
+void *hash_del(char *key, hash_table *table)
+{
+ unsigned val = strhash(key) % table->size;
+ void *data;
+ bucket *ptr, *last = NULL;
+
+ if (!(table->table)[val])
+ return NULL;
+
+ /*
+ ** Traverse the list, keeping track of the previous node in the list.
+ ** When we find the node to delete, we set the previous node's next
+ ** pointer to point to the node after ourself instead. We then delete
+ ** the key from the present node, and return a pointer to the data it
+ ** contains.
+ */
+
+ for (last = NULL, ptr = (table->table)[val];
+ NULL != ptr;
+ last = ptr, ptr = ptr->next)
+ {
+ int cmpresult = strcmp(key, ptr->key);
+ if (!cmpresult)
+ {
+ if (last != NULL )
+ {
+ data = ptr -> data;
+ last -> next = ptr -> next;
+ if(!table->pool) {
+ free(ptr->key);
+ free(ptr);
+ }
+ return data;
+ }
+
+ /*
+ ** If 'last' still equals NULL, it means that we need to
+ ** delete the first node in the list. This simply consists
+ ** of putting our own 'next' pointer in the array holding
+ ** the head of the list. We then dispose of the current
+ ** node as above.
+ */
+
+ else
+ {
+ data = ptr->data;
+ (table->table)[val] = ptr->next;
+ if(!table->pool) {
+ free(ptr->key);
+ free(ptr);
+ }
+ return data;
+ }
+ } else if (cmpresult < 0) {
+ /* its not here! */
+ return NULL;
+ }
+ }
+
+ /*
+ ** If we get here, it means we didn't find the item in the table.
+ ** Signal this by returning NULL.
+ */
+ return NULL;
+}
+
+/*
+** Frees a complete table by iterating over it and freeing each node.
+** the second parameter is the address of a function it will call with a
+** pointer to the data associated with each node. This function is
+** responsible for freeing the data, or doing whatever is needed with
+** it.
+*/
+
+void free_hash_table(hash_table *table, void (*func)(void *))
+{
+ unsigned i;
+ bucket *ptr, *temp;
+
+ /* If we have a function to free the data, apply it everywhere */
+ /* We also need to traverse this anyway if we aren't using a memory
+ * pool */
+ if(func || !table->pool) {
+ for (i=0;i<table->size; i++)
+ {
+ ptr = (table->table)[i];
+ while (ptr)
+ {
+ temp = ptr;
+ ptr = ptr->next;
+ if (func)
+ func(temp->data);
+ if(!table->pool) {
+ free(temp->key);
+ free(temp);
+ }
+ }
+ }
+ }
+
+ /* Free the main structures */
+ if(table->pool) {
+ free_mpool(table->pool);
+ table->pool = NULL;
+ } else {
+ free(table->table);
+ }
+ table->table = NULL;
+ table->size = 0;
+}
+
+/*
+** Simply invokes the function given as the second parameter for each
+** node in the table, passing it the key, the associated data and 'rock'.
+*/
+
+void hash_enumerate(hash_table *table, void (*func)(char *, void *, void *),
+ void *rock)
+{
+ unsigned i;
+ bucket *temp, *temp_next;
+
+ for (i=0;i<table->size; i++)
+ {
+ if ((table->table)[i] != NULL)
+ {
+ for (temp = (table->table)[i];
+ NULL != temp;
+ temp = temp_next)
+ {
+ temp_next = temp->next;
+ func(temp -> key, temp->data, rock);
+ }
+ }
+ }
+}
+
+
+#ifdef TEST
+
+#include <stdio.h>
+
+void fatal(const char* s, int code)
+{
+ fprintf(stderr, "hash: %s\r\n", s);
+ exit(code);
+}
+
+void printer(char *string, void *data, void *rock)
+{
+ printf("%s: %s\n", string, (char *)data);
+}
+
+int main(void)
+{
+ hash_table table;
+
+ char *strings[] = {
+ "1","2","3","4","5","A decently long string",
+ NULL
+ };
+
+ char *junk[] = {
+ "The first data",
+ "The second data",
+ "The third data",
+ "The fourth data",
+ "The fifth datum",
+ "The sixth piece of data"
+ };
+
+ int i;
+ void *j;
+
+ construct_hash_table(&table,200,1);
+
+ for (i = 0; NULL != strings[i]; i++ )
+ hash_insert(strings[i], junk[i], &table);
+
+ for (i=0;NULL != strings[i];i++)
+ {
+ j = hash_lookup(strings[i], &table);
+ if (!j)
+ printf("\nERROR: %s was not in table.",
+ strings[i]);
+ }
+
+ for (i=0;NULL != strings[i];i++)
+ {
+ printf("\n");
+ hash_enumerate(&table, printer, NULL);
+ if(!hash_del(strings[i],&table))
+ printf("ERROR WITH DELETE of '%s'\n", strings[i]);
+ }
+
+ for (i=0;NULL != strings[i];i++)
+ {
+ j = hash_lookup(strings[i], &table);
+ if (NULL == j)
+ printf("\n'%s' is not in table",strings[i]);
+ else printf("\nERROR: %s was deleted but is still in table.",
+ strings[i]);
+ }
+ printf("\n");
+ free_hash_table(&table, NULL);
+ return 0;
+}
+
+#endif /* TEST */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hash.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,95 @@
+/* +++Date last modified: 05-Jul-1997 */
+/* $Id: hash.h,v 1.9 2003/10/22 18:50:12 rjs3 Exp $ */
+
+#ifndef HASH__H
+#define HASH__H
+
+#include <stddef.h> /* For size_t */
+#include "strhash.h"
+#include "mpool.h"
+
+/*
+** A hash table consists of an array of these buckets. Each bucket
+** holds a copy of the key, a pointer to the data associated with the
+** key, and a pointer to the next bucket that collided with this one,
+** if there was one.
+*/
+
+typedef struct bucket {
+ char *key;
+ void *data;
+ struct bucket *next;
+} bucket;
+
+/*
+** This is what you actually declare an instance of to create a table.
+** You then call 'construct_table' with the address of this structure,
+** and a guess at the size of the table. Note that more nodes than this
+** can be inserted in the table, but performance degrades as this
+** happens. Performance should still be quite adequate until 2 or 3
+** times as many nodes have been inserted as the table was created with.
+*/
+
+typedef struct hash_table {
+ size_t size;
+ bucket **table;
+ struct mpool *pool;
+} hash_table;
+
+/*
+** This is used to construct the table. If it doesn't succeed, it sets
+** the table's size to 0, and the pointer to the table to NULL.
+*/
+
+hash_table *construct_hash_table(hash_table *table, size_t size,
+ int use_mpool);
+
+/*
+** Inserts a pointer to 'data' in the table, with a copy of 'key' as its
+** key. Note that this makes a copy of the key, but NOT of the
+** associated data.
+*/
+
+void *hash_insert(const char *key,void *data,hash_table *table);
+
+/*
+** Returns a pointer to the data associated with a key. If the key has
+** not been inserted in the table, returns NULL.
+*/
+
+void *hash_lookup(const char *key,hash_table *table);
+
+/*
+** Deletes an entry from the table. Returns a pointer to the data that
+** was associated with the key so the calling code can dispose of it
+** properly.
+*/
+/* Warning: use this function judiciously if you are using memory pools,
+ * since it will leak memory until you get rid of the entire hash table */
+void *hash_del(char *key,hash_table *table);
+
+/*
+** Goes through a hash table and calls the function passed to it
+** for each node that has been inserted. The function is passed
+** a pointer to the key, a pointer to the data associated
+** with it and 'rock'.
+*/
+
+void hash_enumerate(hash_table *table,void (*func)(char *,void *,void *),
+ void *rock);
+
+/*
+** Frees a hash table. For each node that was inserted in the table,
+** it calls the function whose address it was passed, with a pointer
+** to the data that was in the table. The function is expected to
+** free the data. Typical usage would be:
+** free_table(&table, free);
+** if the data placed in the table was dynamically allocated, or:
+** free_table(&table, NULL);
+** if not. ( If the parameter passed is NULL, it knows not to call
+** any function with the data. )
+*/
+
+void free_hash_table(hash_table *table, void (*func)(void *));
+
+#endif /* HASH__H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hmac-md5.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hmac-md5.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hmac-md5.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/hmac-md5.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+/* hmac-md5.h -- HMAC_MD5 functions
+ * $Id: hmac-md5.h,v 1.1.2.1 2005/02/21 19:25:52 ken3 Exp $
+ */
+
+#ifndef HMAC_MD5_H
+#define HMAC_MD5_H 1
+
+#define HMAC_MD5_SIZE 16
+
+/* intermediate MD5 context */
+typedef struct HMAC_MD5_CTX_s {
+ MD5_CTX ictx, octx;
+} HMAC_MD5_CTX;
+
+/* intermediate HMAC state
+ * values stored in network byte order (Big Endian)
+ */
+typedef struct HMAC_MD5_STATE_s {
+ UINT4 istate[4];
+ UINT4 ostate[4];
+} HMAC_MD5_STATE;
+
+/* One step hmac computation
+ *
+ * digest may be same as text or key
+ */
+void hmac_md5(const unsigned char *text, int text_len,
+ const unsigned char *key, int key_len,
+ unsigned char digest[HMAC_MD5_SIZE]);
+
+/* create context from key
+ */
+void hmac_md5_init(HMAC_MD5_CTX *hmac,
+ const unsigned char *key, int key_len);
+
+/* precalculate intermediate state from key
+ */
+void hmac_md5_precalc(HMAC_MD5_STATE *hmac,
+ const unsigned char *key, int key_len);
+
+/* initialize context from intermediate state
+ */
+void hmac_md5_import(HMAC_MD5_CTX *hmac, HMAC_MD5_STATE *state);
+
+#define hmac_md5_update(hmac, text, text_len) MD5Update(&(hmac)->ictx, (text), (text_len))
+
+/* finish hmac from intermediate result. Intermediate result is zeroed.
+ */
+void hmac_md5_final(unsigned char digest[HMAC_MD5_SIZE],
+ HMAC_MD5_CTX *hmac);
+
+#endif /* HMAC_MD5_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapoptions
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapoptions?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapoptions (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapoptions Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1016 @@
+# things inside of C comments get copied to the manpage
+# things starting with # are ignored
+
+/* .\" -*- nroff -*-
+.TH IMAPD.CONF 5 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: imapoptions,v 1.2.2.47 2006/06/27 15:58:42 murch Exp $
+.SH NAME
+imapd.conf \- IMAP configuration file
+.SH DESCRIPTION
+\fB/etc/imapd.conf\fR
+is the configuration file for the Cyrus IMAP server. It defines
+local parameters for IMAP.
+.PP
+Each line of the \fB/etc/imapd.conf\fR file has the form
+.IP
+\fIoption\fR: \fIvalue\fR
+.PP
+where \fIoption\fR is the name of the configuration option being set
+and \fIvalue\fR is the value that the configuration option is being
+set to.
+.PP
+Blank lines and lines beginning with ``#'' are ignored.
+.PP
+For boolean and enumerated options, the values ``yes'', ``on'', ``t'',
+``true'' and ``1'' turn the option on, the values ``no'', ``off'',
+``f'', ``false'' and ``0'' turn the option off.
+.SH FIELD DESCRIPTIONS
+.PP
+The sections below detail options that can be placed in the
+\fB/etc/imapd.conf\fR file, and show each option's default value.
+Some options have no default value, these are listed with
+``<no default>''. Some options default to the empty string, these
+are listed with ``<none>''.
+*/
+
+# OPTIONS
+
+{ "admins", "", STRING }
+/* The list of userids with administrative rights. Separate each userid
+ with a space. Sites using Kerberos authentication may use
+ separate "admin" instances.
+.PP
+ Note that accounts used by users should not be administrators.
+ Administrative accounts should not receive mail. That is, if user
+ "jbRo" is a user reading mail, he should not also be in the admins line.
+ Some problems may occur otherwise, most notably the ability of
+ administrators to create top-level mailboxes visible to users,
+ but not writable by users. */
+
+{ "afspts_localrealms", NULL, STRING }
+/* The list of realms which are to be treated as local, and thus stripped
+ during identifier canonicalization (for the AFSPTS ptloader module).
+ This is different from loginrealms in that it occurs later in the
+ authorization process (as the user id is canonified for PTS lookup) */
+
+{ "afspts_mycell", NULL, STRING }
+/* Cell to use for AFS PTS lookups. Defaults to the local cell. */
+
+{ "allowallsubscribe", 0, SWITCH }
+/* Allow subscription to nonexistent mailboxes. This option is
+ typically used on backend servers in a Murder so that users can
+ subscribe to mailboxes that don't reside on their "home" server.
+ This option can also be used as a workaround for IMAP clients which
+ don't play well with nonexistent or unselectable mailboxes (eg.
+ Microsoft Outlook). */
+
+{ "allowanonymouslogin", 0, SWITCH }
+/* Permit logins by the user "anonymous" using any password. Also
+ allows use of the SASL ANONYMOUS mechanism. */
+
+{ "allowapop", 1, SWITCH }
+/* Allow use of the POP3 APOP authentication command.
+.PP
+ Note that this command requires that SASL is compiled with APOP
+ support, that the plaintext passwords are available in a SASL auxprop
+ backend (eg. sasldb), and that the system can provide enough entropy
+ (eg. from /dev/urandom) to create a challenge in the banner. */
+
+{ "allownewnews", 0, SWITCH }
+/* Allow use of the NNTP NEWNEWS command.
+.PP
+ Note that this is a very expensive command and should only be
+ enabled when absolutely necessary. */
+
+{ "allowplaintext", 1, SWITCH }
+/* Allow the use of cleartext passwords on the wire. */
+
+{ "allowusermoves", 0, SWITCH }
+/* Allow moving user accounts (with associated meta-data) via RENAME
+ or XFER.
+.PP
+ Note that measures should be taken to make sure that the user being
+ moved is not logged in, and can not login during the move. Failure
+ to do so may result in the user's meta-data (seen state,
+ subscriptions, etc) being corrupted or out of date. */
+
+{ "altnamespace", 0, SWITCH }
+/* Use the alternate IMAP namespace, where personal folders reside at the
+ same level in the hierarchy as INBOX.
+.PP
+ This option ONLY applies where interaction takes place with the
+ client/user. Currently this is limited to the IMAP protocol (imapd)
+ and Sieve scripts (lmtpd). This option does NOT apply to admin tools
+ such as cyradm (admins ONLY), reconstruct, quota, etc., NOR does it
+ affect LMTP delivery of messages directly to mailboxes via
+ plus-addressing. */
+
+{ "annotation_db", "skiplist", STRINGLIST("berkeley", "berkeley-hash", "skiplist")}
+/* The cyrusdb backend to use for mailbox annotations. */
+
+{ "auth_mech", "unix", STRINGLIST("unix", "pts", "krb", "krb5")}
+/* The authorization mechanism to use. */
+
+{ "autocreatequota", 0, INT }
+/* If nonzero, normal users may create their own IMAP accounts by
+ creating the mailbox INBOX. The user's quota is set to the value
+ if it is positive, otherwise the user has unlimited quota. */
+
+{ "berkeley_cachesize", 512, INT }
+/* Size (in kilobytes) of the shared memory buffer pool (cache) used
+ by the berkeley environment. The minimum allowed value is 20. The
+ maximum allowed value is 4194303 (4GB). */
+
+{ "berkeley_locks_max", 50000, INT }
+/* Maximum number of locks to be held or requested in the berkeley
+ environment. */
+
+{ "berkeley_txns_max", 100, INT }
+/* Maximum number of transactions to be supported in the berkeley
+ environment. */
+
+{ "client_timeout", 10, INT }
+/* Number of seconds to wait before returning a timeout failure when
+ performing a client connection (e.g. in a murder environment) */
+
+{ "configdirectory", NULL, STRING }
+/* The pathname of the IMAP configuration directory. This field is
+ required. */
+
+{ "debug_command", NULL, STRING }
+/* Debug command to be used by processes started with -D option. The string
+ is a C format string that gets 3 options: the first is the name of the
+ executable (without path). The second is the pid (integer) and the third
+ is the service ID. Example: /usr/local/bin/gdb /usr/cyrus/bin/%s %d */
+
+{ "defaultacl", "anyone lrs", STRING }
+/* The Access Control List (ACL) placed on a newly-created (non-user)
+ mailbox that does not have a parent mailbox. */
+
+{ "defaultdomain", NULL, STRING }
+/* The default domain for virtual domain support */
+
+{ "defaultpartition", "default", STRING }
+/* The partition name used by default for new mailboxes. */
+
+{ "deleteright", "c", STRING }
+/* Deprecated - only used for backwards compatibility with existing
+ installations. Lists the old RFC 2086 right which was used to
+ grant the user the ability to delete a mailbox. If a user has this
+ right, they will automatically be given the new 'x' right. */
+
+{ "duplicate_db", "berkeley-nosync", STRINGLIST("berkeley", "berkeley-nosync", "berkeley-hash", "berkeley-hash-nosync", "skiplist")}
+/* The cyrusdb backend to use for the duplicate delivery suppression
+ and sieve. */
+
+{ "duplicatesuppression", 1, SWITCH }
+/* If enabled, lmtpd will suppress delivery of a message to a mailbox if
+ a message with the same message-id (or resent-message-id) is recorded
+ as having already been delivered to the mailbox. Records the mailbox
+ and message-id/resent-message-id of all successful deliveries. */
+
+{ "expunge_mode", "immediate", ENUM("immediate", "delayed") }
+/* The mode in which messages (and their corresponding cache entries)
+ are expunged. "Immediate" mode is the default behavior in which the
+ message files and cache entries are purged at the time of the
+ EXPUNGE. In "delayed" mode, the messages are removed from the
+ mailbox index at the time of the EXPUNGE (hiding them from the
+ client), but the message files and cache entries are left behind,
+ to be purged at a later time by "cyr_expire". This reduces the
+ amount of I/O that takes place at the time of EXPUNGE and should
+ result in greater responsiveness for the client, especially when
+ expunging a large number of messages. */
+
+{ "flushseenstate", 0, SWITCH }
+/* If enabled, changes to the seen state will be flushed to disk
+ immediately, otherwise changes will be cached and flushed when the
+ mailbox is closed. This option may be used to fix the problem of
+ previously read messages being marked as unread in Microsoft
+ Outlook, at the expense of a loss of performance/scalability. */
+
+{ "foolstupidclients", 0, SWITCH }
+/* If enabled, only list the personal namespace when a LIST "*" is performed.
+ (it changes the request to a LIST "INBOX*" */
+
+{ "force_sasl_client_mech", NULL, STRING }
+/* Force preference of a given SASL mechanism for client side operations
+ (e.g. murder environments). This is separate from (and overridden by)
+ the ability to use the <host shortname>_mechs option to set preferred
+ mechanisms for a specific host */
+
+{ "fulldirhash", 0, SWITCH }
+/* If enabled, uses an improved directory hashing scheme which hashes
+ the entire username instead of using just the first letter. This
+ changes hash algorithm used for quota and user directories and if
+ \fIhashimapspool\fR is enabled, the entire mail spool.
+.PP
+ Note that this option can NOT be changed on a live system. The
+ server must be quiesced and then the directories moved with the
+ \fBrehash\fR utility. */
+
+{ "hashimapspool", 0, SWITCH }
+/* If enabled, the partitions will also be hashed, in addition to the
+ hashing done on configuration directories. This is recommended if
+ one partition has a very bushy mailbox tree. */
+
+# Commented out - there's no such thing as "hostname_mechs", but we need
+# this for the man page
+# { "hostname_mechs", NULL, STRING }
+/* Force a particular list of SASL mechanisms to be used when authenticating
+ to the backend server hostname (where hostname is the short hostname of
+ the server in question). If it is not specified it will query the server
+ for available mechanisms and pick one to use. - Cyrus Murder */
+
+# Commented out - there's no such thing as "hostname_password", but we need
+# this for the man page
+# { "hostname_password", NULL, STRING }
+/* The password to use for authentication to the backend server hostname
+ (where hostname is the short hostname of the server) - Cyrus Murder */
+
+{ "idlesocket", "{configdirectory}/socket/idle", STRING }
+/* Unix domain socket that idled listens on. */
+
+{ "ignorereference", 0, SWITCH }
+/* For backwards compatibility with Cyrus 1.5.10 and earlier -- ignore
+ the reference argument in LIST or LSUB commands. */
+
+{ "imapidlepoll", 60, INT }
+/* The interval (in seconds) for polling for mailbox changes and
+ ALERTs while running the IDLE command. This option is used when
+ idled is not enabled or can not be contacted. The minimum value is
+ 1. A value of 0 will disable IDLE. */
+
+{ "imapidresponse", 1, SWITCH }
+/* If enabled, the server responds to an ID command with a parameter
+ list containing: version, vendor, support-url, os, os-version,
+ command, arguments, environment. Otherwise the server returns NIL. */
+
+{ "imapmagicplus", 0, SWITCH }
+/* Only list a restricted set of mailboxes via IMAP by using
+ userid+namespace syntax as the authentication/authorization id.
+ Using userid+ (with an empty namespace) will list only subscribed
+ mailboxes. */
+
+{ "implicit_owner_rights", "lca", STRING }
+/* The implicit Access Control List (ACL) for the owner of a mailbox. */
+
+# Commented out - there's no such thing as "@include", but we need
+# this for the man page
+# { "@include", NULL, STRING }
+/* Directive which includes the specified file as part of the
+ configuration. If the path to the file is not absolute, CYRUS_PATH
+ is prepended. */
+
+{ "ldap_authz", NULL, STRING }
+/* SASL authorization ID for the LDAP server */
+
+{ "ldap_base", "", STRING }
+/* Contains the LDAP base dn for the LDAP ptloader module */
+
+{ "ldap_bind_dn", NULL, STRING }
+/* Bind DN for the connection to the LDAP server (simple bind).
+ Do not use for anonymous simple binds */
+
+{ "ldap_deref", "never", STRINGLIST("search", "find", "always", "never") }
+/* Specify how aliases dereferencing is handled during search. */
+
+{ "ldap_filter", "(uid=%u)", STRING }
+/* Specify a filter that searches user identifiers. The following tokens can be
+ used in the filter string:
+
+ %% = %
+ %u = user
+ %U = user portion of %u (%U = test when %u = test at domain.tld)
+ %d = domain portion of %u if available (%d = domain.tld when %u =
+ %test at domain.tld), otherwise same as %r
+ %D = user dn. (use when ldap_member_method: filter)
+ %1-9 = domain tokens (%1 = tld, %2 = domain when %d = domain.tld)
+
+ ldap_filter is not used when ldap_sasl is enabled. */
+
+{ "ldap_group_base", "", STRING }
+/* LDAP base dn for ldap_group_filter. */
+
+{ "ldap_group_filter", "(cn=%u)", STRING }
+/* Specify a filter that searches for group identifiers.
+ See ldap_filter for more options. */
+
+{ "ldap_group_scope", "sub", STRINGLIST("sub", "one", "base") }
+/* Specify search scope for ldap_group_filter. */
+
+{ "ldap_id", NULL, STRING }
+/* SASL authentication ID for the LDAP server */
+
+{ "ldap_mech", NULL, STRING }
+/* SASL mechanism for LDAP authentication */
+
+{ "ldap_member_attribute", NULL, STRING }
+/* See ldap_member_method. */
+
+{ "ldap_member_base", "", STRING }
+/* LDAP base dn for ldap_member_filter. */
+
+{ "ldap_member_filter", "(member=%D)", STRING }
+/* Specify a filter for "ldap_member_method: filter".
+ See ldap_filter for more options. */
+
+{ "ldap_member_method", "attribute", STRINGLIST("attribute", "filter") }
+/* Specify a group method. The "attribute" method retrieves groups from
+ a multi-valued attribute specified in ldap_member_attribute.
+
+ The "filter" method uses a filter, specified by ldap_member_filter, to find
+ groups; ldap_member_attribute is a single-value attribute group name. */
+
+{ "ldap_member_scope", "sub", STRINGLIST("sub", "one", "base") }
+/* Specify search scope for ldap_member_filter. */
+
+{ "ldap_password", NULL, STRING }
+/* Password for the connection to the LDAP server (SASL and simple bind).
+ Do not use for anonymous simple binds */
+
+{ "ldap_realm", NULL, STRING }
+/* SASL realm for LDAP authentication */
+
+{ "ldap_referrals", 0, SWITCH }
+/* Specify whether or not the client should follow referrals. */
+
+{ "ldap_restart", 1, SWITCH }
+/* Specify whether or not LDAP I/O operations are automatically restarted
+ if they abort prematurely. */
+
+{ "ldap_sasl", 1, SWITCH }
+/* Use SASL for LDAP binds in the LDAP PTS module. */
+
+{ "ldap_sasl_authc", NULL, STRING }
+/* Deprecated. Use ldap_id */
+
+{ "ldap_sasl_authz", NULL, STRING }
+/* Deprecated. Use ldap_authz */
+
+{ "ldap_sasl_mech", NULL, STRING }
+/* Deprecated. Use ldap_mech */
+
+{ "ldap_sasl_password", NULL, STRING }
+/* Deprecated. User ldap_password */
+
+{ "ldap_sasl_realm", NULL, STRING }
+/* Deprecated. Use ldap_realm */
+
+{ "ldap_scope", "sub", STRINGLIST("sub", "one", "base") }
+/* Specify search scope. */
+
+{ "ldap_servers", "ldap://localhost/", STRING }
+/* Deprecated. Use ldap_uri */
+
+{ "ldap_size_limit", 1, INT }
+/* Specify a number of entries for a search request to return. */
+
+{ "ldap_start_tls", 0, SWITCH }
+/* Use StartTLS extended operation. Do not use ldaps: ldap_uri when
+ this option is enabled. */
+
+{ "ldap_time_limit", 5, INT }
+/* Specify a number of seconds for a search request to complete. */
+
+{ "ldap_timeout", 5, INT }
+/* Specify a number of seconds a search can take before timing out. */
+
+{ "ldap_tls_cacert_dir", NULL, STRING }
+/* Path to directory with CA (Certificate Authority) certificates. */
+
+{ "ldap_tls_cacert_file", NULL, STRING }
+/* File containing CA (Certificate Authority) certificate(s). */
+
+{ "ldap_tls_cert", NULL, STRING }
+/* File containing the client certificate. */
+
+{ "ldap_tls_check_peer", 0, SWITCH }
+/* Require and verify server certificate. If this option is yes,
+ you must specify ldap_tls_cacert_file or ldap_tls_cacert_dir. */
+
+{ "ldap_tls_ciphers", NULL, STRING }
+/* List of SSL/TLS ciphers to allow. The format of the string is
+ described in ciphers(1). */
+
+{ "ldap_tls_key", NULL, STRING }
+/* File containing the private client key. */
+
+{ "ldap_uri", NULL, STRING }
+/* Contains a list of the URLs of all the LDAP servers when using the
+ LDAP PTS module. */
+
+{ "ldap_version", 3, INT }
+/* Specify the LDAP protocol version. If ldap_start_tls and/or
+ ldap_use_sasl are enabled, ldap_version will be automatically
+ set to 3. */
+
+{ "lmtp_downcase_rcpt", 0, SWITCH }
+/* If enabled, lmtpd will convert the recipient address to lowercase
+ (up to a '+' character, if present). */
+
+{ "lmtp_fuzzy_mailbox_match", 0, SWITCH }
+/* If enabled, and the mailbox specified in the detail part of the
+ recipient (everything after the '+') does not exist, lmtpd will try
+ to find the closest match (ignoring case, ignoring whitespace,
+ falling back to parent) to the specified mailbox name. */
+
+{ "lmtp_over_quota_perm_failure", 0, SWITCH }
+/* If enabled, lmtpd returns a permanent failure code when a user's
+ mailbox is over quota. By default, the failure is temporary,
+ causing the MTA to queue the message and retry later. */
+
+{ "lmtp_strict_quota", 0, SWITCH }
+/* If enabled, lmtpd returns a failure code when the incoming message
+ will cause the user's mailbox to exceed its quota. By default, the
+ failure won't occur until the mailbox is already over quota. */
+
+{ "lmtpsocket", "{configdirectory}/socket/lmtp", STRING }
+/* Unix domain socket that lmtpd listens on, used by deliver(8). This should
+ match the path specified in cyrus.conf(5). */
+
+# xxx how does this tie into virtual domains?
+{ "loginrealms", "", STRING }
+/* The list of remote realms whose users may authenticate using cross-realm
+ authentication identifiers. Separate each realm name by a space. (A
+ cross-realm identity is considered any identity returned by SASL
+ with an "@" in it.). */
+
+{ "loginuseacl", 0, SWITCH }
+/* If enabled, any authentication identity which has \fBa\fR rights on a
+ user's INBOX may log in as that user. */
+
+{ "logtimestamps", 0, SWITCH }
+/* Include notations in the protocol telemetry logs indicating the number of
+ seconds since the last command or response. */
+
+{ "mailnotifier", NULL, STRING }
+/* Notifyd(8) method to use for "MAIL" notifications. If not set, "MAIL"
+ notifications are disabled. */
+
+{ "maxmessagesize", 0, INT }
+/* Maximum incoming LMTP message size. If non-zero, lmtpd will reject
+ messages larger than \fImaxmessagesize\fR bytes. If set to 0, this
+ will allow messages of any size (the default). */
+
+{ "mboxkey_db", "skiplist", STRINGLIST("berkeley", "skiplist") }
+/* The cyrusdb backend to use for mailbox keys. */
+
+{ "mboxlist_db", "skiplist", STRINGLIST("flat", "berkeley", "berkeley-hash", "skiplist")}
+/* The cyrusdb backend to use for the mailbox list. */
+
+{ "metapartition_files", "", BITFIELD("header", "index", "cache", "expunge", "squat") }
+/* Space-separated list of metadata files to be stored on a
+ \fImetapartition\fR rather than in the mailbox directory on a spool
+ partition. */
+
+# Commented out - there's no such thing as "metapartition-name",
+# but we need this for the man page
+# { "metapartition-name", NULL, STRING }
+/* The pathname of the metadata partition \fIname\fR, corresponding to
+ spool partition \fBpartition-name\fR. For any mailbox residing in
+ a directory on \fBpartition-name\fR, the metadata files listed in
+ \fImetapartition_files\fR will be stored in a corresponding directory on
+ \fBmetapartition-name\fR. Note that not every
+ \fBpartition-name\fR option is required to have a corresponding
+ \fBmetapartition-name\fR option, so that you can selectively choose
+ which spool partitions will have separate metadata partitions. */
+
+{ "mupdate_authname", NULL, STRING }
+/* The SASL username (Authentication Name) to use when authenticating to the
+ mupdate server (if needed). */
+
+{ "mupdate_config", "standard", ENUM("standard", "unified", "replicated") }
+/* The configuration of the mupdate servers in the Cyrus Murder.
+ The "standard" config is one in which there are discreet frontend
+ (proxy) and backend servers. The "unified" config is one in which
+ a server can be both a frontend and backend. The "replicated"
+ config is one in which multiple backend servers all share the same
+ mailspool, but each have their own "replicated" copy of
+ mailboxes.db. */
+
+{ "md5_dir", NULL, STRING }
+/* Top level directory for MD5 store manipulated by make_md5. File
+ structure within this directory is one file for each user on the system,
+ hashed on the first letter of the userid (e.g: /var/imap/md5/d/dpc22). */
+
+{ "md5_user_map", NULL, STRING }
+/* Map file (cdb) to allow partial make_md5 runs. Maps username to UID */
+
+{ "munge8bit", 1, SWITCH }
+/* If enabled, lmtpd munges messages with 8-bit characters in the
+ headers. The 8-bit characters are changed to `X'. If
+ \fBreject8bit\fR is enabled, setting \fBmunge8bit\fR has no effect.
+ (A proper solution to non-ASCII characters in headers is offered by
+ RFC 2047 and its predecessors.) */
+
+# xxx badly worded
+{ "mupdate_connections_max", 128, INT }
+/* The max number of connections that a mupdate process will allow, this
+ is related to the number of file descriptors in the mupdate process.
+ Beyond this number connections will be immediately issued a BYE response. */
+
+{ "mupdate_password", NULL, STRING }
+/* The SASL password (if needed) to use when authenticating to the
+ mupdate server. */
+
+{ "mupdate_port", 3905, INT }
+/* The port of the mupdate server for the Cyrus Murder */
+
+{ "mupdate_realm", NULL, STRING }
+/* The SASL realm (if needed) to use when authenticating to the mupdate
+ server. */
+
+{ "mupdate_retry_delay", 20, INT }
+/* The base time to wait between connection retries to the mupdate server. */
+
+{ "mupdate_server", NULL, STRING }
+/* The mupdate server for the Cyrus Murder */
+
+{ "mupdate_username", "", STRING }
+/* The SASL username (Authorization Name) to use when authenticating to
+ the mupdate server */
+
+{ "mupdate_workers_max", 50, INT }
+/* The maximum number of mupdate worker threads (overall) */
+
+{ "mupdate_workers_maxspare", 10, INT }
+/* The maximum number of idle mupdate worker threads */
+
+{ "mupdate_workers_minspare", 2, INT }
+/* The minimum number of idle mupdate worker threads */
+
+{ "mupdate_workers_start", 5, INT }
+/* The number of mupdate worker threads to start */
+
+{ "netscapeurl", "http://asg.web.cmu.edu/cyrus/imapd/netscape-admin.html", STRING }
+/* If enabled at compile time, this specifies a URL to reply when
+ Netscape asks the server where the mail administration HTTP server
+ is. The default is a site at CMU with a hopefully informative
+ message; administrators should set this to a local resource with
+ some information of greater use. */
+
+{ "newsmaster", "news", STRING }
+/* Userid that is used for checking access controls when executing
+ Usenet control messages. For instance, to allow articles to be
+ automatically deleted by cancel messages, give the "news" user
+ the 'd' right on the desired mailboxes. To allow newsgroups to be
+ automatically created, deleted and renamed by the corresponding
+ control messages, give the "news" user the 'c' right on the desired
+ mailbox hierarchies. */
+
+{ "newspeer", NULL, STRING }
+/* A list of whitespace-separated news server specifications to which
+ articles should be fed. Each server specification is a string of
+ the form [user[:pass]@]host[:port][/wildmat] where 'host' is the fully
+ qualified hostname of the server, 'port' is the port on which the
+ server is listening, 'user' and 'pass' are the authentication
+ credentials and 'wildmat' is a pattern that specifies which groups
+ should be fed. If no 'port' is specified, port 119 is used. If
+ no 'wildmat' is specified, all groups are fed. If 'user' is specified
+ (even if empty), then the NNTP POST command will be used to feed
+ the article to the server, otherwise the IHAVE command will be
+ used.
+.br
+.sp
+ A '@' may be used in place of '!' in the wildmat to prevent feeding
+ articles cross-posted to the given group, otherwise cross-posted
+ articles are fed if any part of the wildmat matches. For example,
+ the string "peer.example.com:*,!control.*, at local.*" would feed all
+ groups except control messages and local groups to
+ peer.example.com. In the case of cross-posting to local groups,
+ these articles would not be fed. */
+
+{ "newspostuser", NULL, STRING }
+/* Userid used to deliver usenet articles to newsgroup folders
+ (usually via lmtp2nntp). For example, if set to "post", email sent
+ to "post+comp.mail.imap" would be delivered to the "comp.mail.imap"
+ folder.
+.br
+.sp
+ When set, the Cyrus NNTP server will add a \fITo:\fR header to each
+ incoming usenet article. This \fITo:\fR header will contain email
+ delivery addresses corresponding to each newsgroup in the
+ \fINewsgroups:\fR header. By default, a \fITo:\fR header is not
+ added to usenet articles. */
+
+{ "newsprefix", NULL, STRING }
+/* Prefix to be prepended to newsgroup names to make the corresponding
+ IMAP mailbox names. */
+
+{ "nntptimeout", 3, INT }
+/* Set the length of the NNTP server's inactivity autologout timer,
+ in minutes. The minimum value is 3, the default. */
+
+{ "notifysocket", "{configdirectory}/socket/notify", STRING }
+/* Unix domain socket that the mail notification daemon listens on. */
+
+# Commented out - there's no such thing as "partition-name", but we need
+# this for the man page
+# { "partition-name", NULL, STRING }
+/* The pathname of the partition \fIname\fR. At least one field, for the
+ partition named in the \fBdefaultpartition\fR option, is required.
+ For example, if the value of the \fBdefaultpartion\fR option is
+ \fBdefault\fR, then the \fBpartition-default\fR field is required. */
+
+{ "plaintextloginpause", 0, INT }
+/* Number of seconds to pause after a successful plaintext login. For
+ systems that support strong authentication, this permits users to
+ perceive a cost of using plaintext passwords. (This does not
+ affect the use of PLAIN in SASL authentications.) */
+
+{ "plaintextloginalert", NULL, STRING }
+/* Message to send to client after a successful plaintext login. */
+
+{ "popexpiretime", -1, INT }
+/* The number of days advertised as being the minimum a message may be
+ left on the POP server before it is deleted (via the CAPA command,
+ defined in the POP3 Extension Mechanism, which some clients may
+ support). "NEVER", the default, may be specified with a negative
+ number. The Cyrus POP3 server never deletes mail, no matter what
+ the value of this parameter is. However, if a site implements a
+ less liberal policy, it needs to change this parameter
+ accordingly. */
+
+{ "popminpoll", 0, INT }
+/* Set the minimum amount of time the server forces users to wait
+ between successive POP logins, in minutes. */
+
+{ "popsubfolders", 0, SWITCH }
+/* Allow access to subfolders of INBOX via POP3 by using
+ userid+subfolder syntax as the authentication/authorization id. */
+
+{ "poppollpadding", 1, INT }
+/* Create a softer minimum poll restriction. Allows \fIpoppollpadding\fR
+ connections before the minpoll restriction is triggered. Additionally,
+ one padding entry is recovered every \fIpopminpoll\fR minutes.
+ This allows for the occasional polling rate faster than popminpoll,
+ (i.e. for clients that require a send/receive to send mail) but still
+ enforces the rate long-term. Default is 1 (disabled).
+.br
+.sp
+ The easiest way to think of it is a queue of past connections, with one
+ slot being filled for every connection, and one slot being cleared
+ every \fIpopminpoll\fR minutes. When the queue is full, the user
+ will not be able to check mail again until a slot is cleared. If the
+ user waits a sufficient amount of time, they will get back many or all
+ of the slots. */
+
+{ "poptimeout", 10, INT }
+/* Set the length of the POP server's inactivity autologout timer,
+ in minutes. The minimum value is 10, the default. */
+
+{ "popuseacl", 0, SWITCH }
+/* Enforce IMAP ACLs in the pop server. Due to the nature of the POP3
+ protocol, the only rights which are used by the pop server are 'r'
+ and 'd' for the owner of the mailbox. The 'r' right allows the
+ user to open the mailbox and list/retrieve messages. The 'd' right
+ allows the user to delete messages. */
+
+{ "postmaster", "postmaster", STRING }
+/* Username that is used as the 'From' address in rejection MDNs produced
+ by sieve. */
+
+{ "postspec", NULL, STRING }
+
+{ "postuser", "", STRING }
+/* Userid used to deliver messages to shared folders. For example, if
+ set to "bb", email sent to "bb+shared.blah" would be delivered to
+ the "shared.blah" folder. By default, an email address of
+ "+shared.blah" would be used. */
+
+{ "proxy_authname", "proxy", STRING }
+/* The authentication name to use when authenticating to a backend server
+ in the Cyrus Murder. */
+
+{ "proxy_password", NULL, STRING }
+/* The default password to use when authenticating to a backend server
+ in the Cyrus Murder. May be overridden on a host-specific basis using
+ the hostname_password option. */
+
+{ "proxy_realm", NULL, STRING }
+/* The authentication realm to use when authenticating to a backend server
+ in the Cyrus Murder */
+
+{ "proxyd_allow_status_referral", 0, SWITCH }
+/* Set to true to allow proxyd to issue referrals to clients that support it
+ when answering the STATUS command. This is disabled by default since
+ some clients issue many STATUS commands in a row, and do not cache the
+ connections that these referrals would cause, thus resulting in a higher
+ authentication load on the respective backend server. */
+
+{ "proxyservers", NULL, STRING }
+/* A list of users and groups that are allowed to proxy for other
+ users, separated by spaces. Any user listed in this will be
+ allowed to login for any other user: use with caution. */
+
+{ "pts_module", "afskrb", STRINGLIST("afskrb", "ldap") }
+/* The PTS module to use. */
+
+{ "ptloader_sock", NULL, STRING }
+/* Unix domain socket that ptloader listens on.
+ (defaults to configdir/ptclient/ptsock) */
+
+{ "ptscache_db", "berkeley", STRINGLIST("berkeley", "berkeley-hash", "skiplist")}
+/* The cyrusdb backend to use for the pts cache. */
+
+{ "ptscache_timeout", 10800, INT }
+/* The timeout (in seconds) for the PTS cache database when using the
+ auth_krb_pts authorization method (default: 3 hours). */
+
+{ "ptskrb5_convert524", 1, SWITCH }
+/* When using the AFSKRB ptloader module with Kerberos 5 canonicalization,
+ do the final 524 conversion to get a n AFS style name (using '.' instead
+ of '/', and using short names */
+
+{ "ptskrb5_strip_default_realm", 1, SWITCH }
+/* When using the AFSKRB ptloader module with Kerberos 5 canonicalization,
+ strip the default realm from the userid (this does not affect the stripping
+ of realms specified by the afspts_localrealms option) */
+
+{ "quota_db", "quotalegacy", STRINGLIST("flat", "berkeley", "berkeley-hash", "skiplist", "quotalegacy")}
+/* The cyrusdb backend to use for quotas. */
+
+{ "quotawarn", 90, INT }
+/* The percent of quota utilization over which the server generates
+ warnings. */
+
+{ "quotawarnkb", 0, INT }
+/* The maximum amount of free space (in kB) in which to give a quota
+ warning (if this value is 0, or if the quota is smaller than this
+ amount, than warnings are always given). */
+
+{ "reject8bit", 0, SWITCH }
+/* If enabled, lmtpd rejects messages with 8-bit characters in the
+ headers. */
+
+{ "rfc2046_strict", 0, SWITCH }
+/* If enabled, imapd will be strict (per RFC 2046) when matching MIME
+ boundary strings. This means that boundaries containing other
+ boundaries as substrings will be treated as identical. Since
+ enabling this option will break some messages created by Eudora 5.1
+ (and earlier), it is recommended that it be left disabled unless
+ there is good reason to do otherwise. */
+
+{ "rfc3028_strict", 1, SWITCH }
+/* If enabled, Sieve will be strict (per RFC 3028) with regards to
+ which headers are allowed to be used in address and envelope tests.
+ This means that only those headers which are defined to contain addresses
+ will be allowed in address tests and only "to" and "from" will be
+ allowed in envelope tests. When disabled, ANY grammatically correct header
+ will be allowed. */
+
+# Commented out - used by libsasl
+# { "sasl_auto_transition", 0, SWITCH }
+/* If enabled, the SASL library will automatically create authentication
+ secrets when given a plaintext password. See the SASL documentation. */
+
+{ "sasl_maximum_layer", 256, INT }
+/* Maximum SSF (security strength factor) that the server will allow a
+ client to negotiate. */
+
+{ "sasl_minimum_layer", 0, INT }
+/* The minimum SSF that the server will allow a client to negotiate.
+ A value of 1 requires integrity protection; any higher value
+ requires some amount of encryption. */
+
+# Commented out - used by libsasl
+# { "sasl_option", 0, STRING }
+/* Any SASL option can be set by preceding it with "sasl_". This
+ file overrides the SASL configuration file. */
+
+# Commented out - used by libsasl
+# { "sasl_pwcheck_method", NULL, STRING }
+/* The mechanism used by the server to verify plaintext passwords.
+ Possible values include "auxprop", "saslauthd", and "pwcheck". */
+
+{ "seenstate_db", "skiplist", STRINGLIST("flat", "berkeley", "berkeley-hash", "skiplist")}
+/* The cyrusdb backend to use for the seen state. */
+
+{ "sendmail", "/usr/lib/sendmail", STRING }
+/* The pathname of the sendmail executable. Sieve invokes sendmail
+ for sending rejections, redirects and vacation responses. */
+
+{ "servername", NULL, STRING }
+/* This is the hostname visible in the greeting messages of the POP,
+ IMAP and LMTP daemons. If it is unset, then the result returned
+ from gethostname(2) is used. */
+
+{ "sharedprefix", "Shared Folders", STRING }
+/* If using the alternate IMAP namespace, the prefix for the shared
+ namespace. The hierarchy delimiter will be automatically appended. */
+
+{ "sieve_allowreferrals", 1, SWITCH }
+/* If enabled, timsieved will issue referrals to clients when the
+ user's scripts reside on a remote server (in a Murder).
+ Otherwise, timsieved will proxy traffic to the remote server. */
+
+{ "sieve_extensions", "fileinto reject vacation imapflags notify envelope relational regex subaddress copy", BITFIELD("fileinto", "reject", "vacation", "imapflags", "notify", "include", "envelope", "body", "relational", "regex", "subaddress", "copy") }
+/* Space-separated list of Sieve extensions allowed to be used in
+ sieve scripts, enforced at submission by timsieved(8). Any
+ previously installed script will be unaffected by this option and
+ will continue to execute regardless of the extensions used. This
+ option has no effect on options that are disabled at compile time
+ (e.g. "regex"). */
+
+{ "sieve_maxscriptsize", 32, INT }
+/* Maximum size (in kilobytes) any sieve script can be, enforced at
+ submission by timsieved(8). */
+
+{ "sieve_maxscripts", 5, INT }
+/* Maximum number of sieve scripts any user may have, enforced at
+ submission by timsieved(8). */
+
+{ "sievedir", "/usr/sieve", STRING }
+/* If sieveusehomedir is false, this directory is searched for Sieve
+ scripts. */
+
+{ "sievenotifier", NULL, STRING }
+/* Notifyd(8) method to use for "SIEVE" notifications. If not set, "SIEVE"
+ notifications are disabled.
+.PP
+ This method is only used when no method is specified in the script. */
+
+{ "sieveusehomedir", 0, SWITCH }
+/* If enabled, lmtpd will look for Sieve scripts in user's home
+ directories: ~user/.sieve. */
+
+{ "singleinstancestore", 1, SWITCH }
+/* If enabled, imapd, lmtpd and nntpd attempt to only write one copy
+ of a message per partition and create hard links, resulting in a
+ potentially large disk savings. */
+
+{ "skiplist_unsafe", 0, SWITCH }
+/* If enabled, this option forces the skiplist cyrusdb backend to
+ not sync writes to the disk. Enabling this option is NOT RECOMMENDED. */
+
+{ "soft_noauth", 1, SWITCH }
+/* If enabled, lmtpd returns temporary failures if the client does not
+ successfully authenticate. Otherwise lmtpd returns permanent failures
+ (causing the mail to bounce immediately). */
+
+{ "srvtab", "", STRING }
+/* The pathname of \fIsrvtab\fR file containing the server's private
+ key. This option is passed to the SASL library and overrides its
+ default setting. */
+
+{ "submitservers", NULL, STRING }
+/* A list of users and groups that are allowed to resolve "urlauth=submit+"
+ IMAP URLs, separated by spaces. Any user listed in this will be
+ allowed to fetch the contents of any valid "urlauth=submit+" IMAP URL:
+ use with caution. */
+
+{ "subscription_db", "flat", STRINGLIST("flat", "berkeley", "berkeley-hash", "skiplist")}
+/* The cyrusdb backend to use for the subscriptions list. */
+
+{ "sync_authname", NULL, STRING }
+/* The authentication name to use when authenticating to a sync server. */
+
+{ "sync_host", NULL, STRING }
+/* Name of the host (replica running sync_server(8)) to which
+ replication actions will be sent by sync_client(8). */
+
+{ "sync_log", 0, SWITCH }
+/* Enable replication action logging by lmtpd(8), imapd(8), pop3d(8),
+ and nntpd(8). The log {configdirectory}/sync/log is used by
+ sync_client(8) for "rolling" replication. */
+
+{ "sync_machineid", -1, INT }
+/* Machine ID of this server which must be unique within a cluster.
+ Any negative number, the default, will disable the use of UUIDs for
+ replication. */
+
+{ "sync_password", NULL, STRING }
+/* The default password to use when authenticating to a sync server. */
+
+{ "sync_realm", NULL, STRING }
+/* The authentication realm to use when authenticating to a sync server. */
+
+{ "sync_repeat_interval", 1, INT }
+/* Minimum interval (in seconds) between replication runs in rolling
+ replication mode. If a replication run takes longer than this
+ time, we repeat immediately. */
+
+{ "sync_shutdown_file", NULL, STRING }
+/* Simple latch used to tell sync_client(8) that it should shut down at the
+ next opportunity. Safer than sending signals to running processes */
+
+{ "syslog_prefix", NULL, STRING }
+/* String to be prepended to the process name in syslog entries. */
+
+{ "temp_path", "/tmp", STRING }
+/* The pathname to store temporary files in */
+
+{ "timeout", 30, INT }
+/* The length of the IMAP server's inactivity autologout timer,
+ in minutes. The minimum value is 30, the default. */
+
+{ "tls_ca_file", NULL, STRING }
+/* File containing one or more Certificate Authority (CA) certificates. */
+
+{ "tls_ca_path", NULL, STRING }
+/* Path to directory with certificates of CAs. This directory must
+ have filenames with the hashed value of the certificate (see
+ openssl(XXX)). */
+
+{ "tlscache_db", "berkeley-nosync", STRINGLIST("berkeley", "berkeley-nosync", "berkeley-hash", "berkeley-hash-nosync", "skiplist")}
+/* The cyrusdb backend to use for the TLS cache. */
+
+{ "tls_cert_file", NULL, STRING }
+/* File containing the certificate presented for server authentication
+ during STARTTLS. A value of "disabled" will disable SSL/TLS. */
+
+{ "tls_cipher_list", "DEFAULT", STRING }
+/* The list of SSL/TLS ciphers to allow. The format of the string is
+ described in ciphers(1). */
+
+{ "tls_key_file", NULL, STRING }
+/* File containing the private key belonging to the server
+ certificate. A value of "disabled" will disable SSL/TLS. */
+
+{ "tls_require_cert", 0, SWITCH }
+/* Require a client certificate for ALL services (imap, pop3, lmtp, sieve). */
+
+{ "tls_session_timeout", 1440, INT }
+/* The length of time (in minutes) that a TLS session will be cached
+ for later reuse. The maximum value is 1440 (24 hours), the
+ default. A value of 0 will disable session caching. */
+
+{ "umask", "077", STRING }
+/* The umask value used by various Cyrus IMAP programs. */
+
+{ "username_tolower", 1, SWITCH }
+/* Convert usernames to all lowercase before login/authenticate. This
+ is useful with authentication backends which ignore case during
+ username lookups (such as LDAP). */
+
+{ "userprefix", "Other Users", STRING }
+/* If using the alternate IMAP namespace, the prefix for the other users
+ namespace. The hierarchy delimiter will be automatically appended. */
+
+# xxx badly worded
+{ "unix_group_enable", 1, SWITCH }
+/* Should we look up groups when using auth_unix (disable this if you are
+ not using groups in ACLs for your IMAP server, and you are using auth_unix
+ with a backend (such as LDAP) that can make getgrent() calls very
+ slow) */
+
+{ "unixhierarchysep", 0, SWITCH }
+/* Use the UNIX separator character '/' for delimiting levels of
+ mailbox hierarchy. The default is to use the netnews separator
+ character '.'. */
+
+{ "virtdomains", "off", ENUM("off", "userid", "on") }
+/* Enable virtual domain support. If enabled, the user's domain will
+ be determined by splitting a fully qualified userid at the last '@'
+ or '%' symbol. If the userid is unqualified, and the virtdomains
+ option is set to "on", then the domain will be determined by doing
+ a reverse lookup on the IP address of the incoming network
+ interface, otherwise the user is assumed to be in the default
+ domain (if set). */
+
+/*
+.SH SEE ALSO
+.PP
+\fBimapd(8)\fR, \fBpop3d(8)\fR, \fBnntpd(8)\fR, \fBlmtpd(8)\fR,
+\fBtimsieved(8)\fR, \fBidled(8)\fR, \fBnotifyd(8)\fR,
+\fBdeliver(8)\fR, \fBmaster(8)\fR, \fBciphers(1)\fR
+*/
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,227 @@
+/* auto-generated by config2header 1.2.2.12 */
+
+/* DO NOT EDIT */
+
+/* THIS FILE AUTOMATICALLY GENERATED BY config2header 1.2.2.12 */
+
+#include <config.h>
+
+#include <sys/types.h>
+
+#ifdef HAVE_UNISTD_H
+
+#include <unistd.h>
+
+#endif
+
+#include <syslog.h>
+
+#include <stdlib.h>
+
+#include <string.h>
+
+#include "imapopts.h"
+
+
+
+struct imapopt_s imapopts[] =
+
+{
+
+ { IMAPOPT_ZERO, "", 0, { NULL }, OPT_NOTOPT, { { NULL, IMAP_ENUM_ZERO } } },
+
+ { IMAPOPT_ADMINS, "admins", 0, {(void *)("")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_AFSPTS_LOCALREALMS, "afspts_localrealms", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_AFSPTS_MYCELL, "afspts_mycell", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_ALLOWALLSUBSCRIBE, "allowallsubscribe", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_ALLOWANONYMOUSLOGIN, "allowanonymouslogin", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_ALLOWAPOP, "allowapop", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_ALLOWNEWNEWS, "allownewnews", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_ALLOWPLAINTEXT, "allowplaintext", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_ALLOWUSERMOVES, "allowusermoves", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_ALTNAMESPACE, "altnamespace", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_ANNOTATION_DB, "annotation_db", 0, {(void*)("skiplist")}, OPT_STRINGLIST, { { "berkeley" , IMAP_ENUM_ZERO }, { "berkeley-hash" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_AUTH_MECH, "auth_mech", 0, {(void*)("unix")}, OPT_STRINGLIST, { { "unix" , IMAP_ENUM_ZERO }, { "pts" , IMAP_ENUM_ZERO }, { "krb" , IMAP_ENUM_ZERO }, { "krb5" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_AUTOCREATEQUOTA, "autocreatequota", 0, {(void*)0}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_BERKELEY_CACHESIZE, "berkeley_cachesize", 0, {(void*)512}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_BERKELEY_LOCKS_MAX, "berkeley_locks_max", 0, {(void*)50000}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_BERKELEY_TXNS_MAX, "berkeley_txns_max", 0, {(void*)100}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_CLIENT_TIMEOUT, "client_timeout", 0, {(void*)10}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_CONFIGDIRECTORY, "configdirectory", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_DEBUG_COMMAND, "debug_command", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_DEFAULTACL, "defaultacl", 0, {(void *)("anyone lrs")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_DEFAULTDOMAIN, "defaultdomain", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_DEFAULTPARTITION, "defaultpartition", 0, {(void *)("default")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_DELETERIGHT, "deleteright", 0, {(void *)("c")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_DUPLICATE_DB, "duplicate_db", 0, {(void*)("berkeley-nosync")}, OPT_STRINGLIST, { { "berkeley" , IMAP_ENUM_ZERO }, { "berkeley-nosync" , IMAP_ENUM_ZERO }, { "berkeley-hash" , IMAP_ENUM_ZERO }, { "berkeley-hash-nosync" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_DUPLICATESUPPRESSION, "duplicatesuppression", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_EXPUNGE_MODE, "expunge_mode", 0, {(void *)(IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE)}, OPT_ENUM, { { "immediate" , IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE }, { "delayed" , IMAP_ENUM_EXPUNGE_MODE_DELAYED }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_FLUSHSEENSTATE, "flushseenstate", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_FOOLSTUPIDCLIENTS, "foolstupidclients", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_FORCE_SASL_CLIENT_MECH, "force_sasl_client_mech", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_FULLDIRHASH, "fulldirhash", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_HASHIMAPSPOOL, "hashimapspool", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_IDLESOCKET, "idlesocket", 0, {(void *)("{configdirectory}/socket/idle")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_IGNOREREFERENCE, "ignorereference", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_IMAPIDLEPOLL, "imapidlepoll", 0, {(void*)60}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_IMAPIDRESPONSE, "imapidresponse", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_IMAPMAGICPLUS, "imapmagicplus", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_IMPLICIT_OWNER_RIGHTS, "implicit_owner_rights", 0, {(void *)("lca")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_AUTHZ, "ldap_authz", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_BASE, "ldap_base", 0, {(void *)("")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_BIND_DN, "ldap_bind_dn", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_DEREF, "ldap_deref", 0, {(void*)("never")}, OPT_STRINGLIST, { { "search" , IMAP_ENUM_ZERO }, { "find" , IMAP_ENUM_ZERO }, { "always" , IMAP_ENUM_ZERO }, { "never" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_FILTER, "ldap_filter", 0, {(void *)("(uid=%u)")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_GROUP_BASE, "ldap_group_base", 0, {(void *)("")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_GROUP_FILTER, "ldap_group_filter", 0, {(void *)("(cn=%u)")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_GROUP_SCOPE, "ldap_group_scope", 0, {(void*)("sub")}, OPT_STRINGLIST, { { "sub" , IMAP_ENUM_ZERO }, { "one" , IMAP_ENUM_ZERO }, { "base" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_ID, "ldap_id", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_MECH, "ldap_mech", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_MEMBER_ATTRIBUTE, "ldap_member_attribute", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_MEMBER_BASE, "ldap_member_base", 0, {(void *)("")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_MEMBER_FILTER, "ldap_member_filter", 0, {(void *)("(member=%D)")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_MEMBER_METHOD, "ldap_member_method", 0, {(void*)("attribute")}, OPT_STRINGLIST, { { "attribute" , IMAP_ENUM_ZERO }, { "filter" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_MEMBER_SCOPE, "ldap_member_scope", 0, {(void*)("sub")}, OPT_STRINGLIST, { { "sub" , IMAP_ENUM_ZERO }, { "one" , IMAP_ENUM_ZERO }, { "base" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_PASSWORD, "ldap_password", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_REALM, "ldap_realm", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_REFERRALS, "ldap_referrals", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_RESTART, "ldap_restart", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SASL, "ldap_sasl", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SASL_AUTHC, "ldap_sasl_authc", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SASL_AUTHZ, "ldap_sasl_authz", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SASL_MECH, "ldap_sasl_mech", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SASL_PASSWORD, "ldap_sasl_password", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SASL_REALM, "ldap_sasl_realm", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SCOPE, "ldap_scope", 0, {(void*)("sub")}, OPT_STRINGLIST, { { "sub" , IMAP_ENUM_ZERO }, { "one" , IMAP_ENUM_ZERO }, { "base" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SERVERS, "ldap_servers", 0, {(void *)("ldap://localhost/")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_SIZE_LIMIT, "ldap_size_limit", 0, {(void*)1}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_START_TLS, "ldap_start_tls", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_TIME_LIMIT, "ldap_time_limit", 0, {(void*)5}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_TIMEOUT, "ldap_timeout", 0, {(void*)5}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_TLS_CACERT_DIR, "ldap_tls_cacert_dir", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_TLS_CACERT_FILE, "ldap_tls_cacert_file", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_TLS_CERT, "ldap_tls_cert", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_TLS_CHECK_PEER, "ldap_tls_check_peer", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_TLS_CIPHERS, "ldap_tls_ciphers", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_TLS_KEY, "ldap_tls_key", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_URI, "ldap_uri", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LDAP_VERSION, "ldap_version", 0, {(void*)3}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LMTP_DOWNCASE_RCPT, "lmtp_downcase_rcpt", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LMTP_FUZZY_MAILBOX_MATCH, "lmtp_fuzzy_mailbox_match", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LMTP_OVER_QUOTA_PERM_FAILURE, "lmtp_over_quota_perm_failure", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LMTP_STRICT_QUOTA, "lmtp_strict_quota", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LMTPSOCKET, "lmtpsocket", 0, {(void *)("{configdirectory}/socket/lmtp")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LOGINREALMS, "loginrealms", 0, {(void *)("")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LOGINUSEACL, "loginuseacl", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_LOGTIMESTAMPS, "logtimestamps", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MAILNOTIFIER, "mailnotifier", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MAXMESSAGESIZE, "maxmessagesize", 0, {(void*)0}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MBOXKEY_DB, "mboxkey_db", 0, {(void*)("skiplist")}, OPT_STRINGLIST, { { "berkeley" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MBOXLIST_DB, "mboxlist_db", 0, {(void*)("skiplist")}, OPT_STRINGLIST, { { "flat" , IMAP_ENUM_ZERO }, { "berkeley" , IMAP_ENUM_ZERO }, { "berkeley-hash" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_METAPARTITION_FILES, "metapartition_files", 0, {(void *)(0)}, OPT_BITFIELD, { { "header" , IMAP_ENUM_METAPARTITION_FILES_HEADER }, { "index" , IMAP_ENUM_METAPARTITION_FILES_INDEX }, { "cache" , IMAP_ENUM_METAPARTITION_FILES_CACHE }, { "expunge" , IMAP_ENUM_METAPARTITION_FILES_EXPUNGE }, { "squat" , IMAP_ENUM_METAPARTITION_FILES_SQUAT }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_AUTHNAME, "mupdate_authname", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_CONFIG, "mupdate_config", 0, {(void *)(IMAP_ENUM_MUPDATE_CONFIG_STANDARD)}, OPT_ENUM, { { "standard" , IMAP_ENUM_MUPDATE_CONFIG_STANDARD }, { "unified" , IMAP_ENUM_MUPDATE_CONFIG_UNIFIED }, { "replicated" , IMAP_ENUM_MUPDATE_CONFIG_REPLICATED }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MD5_DIR, "md5_dir", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MD5_USER_MAP, "md5_user_map", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUNGE8BIT, "munge8bit", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_CONNECTIONS_MAX, "mupdate_connections_max", 0, {(void*)128}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_PASSWORD, "mupdate_password", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_PORT, "mupdate_port", 0, {(void*)3905}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_REALM, "mupdate_realm", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_RETRY_DELAY, "mupdate_retry_delay", 0, {(void*)20}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_SERVER, "mupdate_server", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_USERNAME, "mupdate_username", 0, {(void *)("")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_WORKERS_MAX, "mupdate_workers_max", 0, {(void*)50}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_WORKERS_MAXSPARE, "mupdate_workers_maxspare", 0, {(void*)10}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_WORKERS_MINSPARE, "mupdate_workers_minspare", 0, {(void*)2}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_MUPDATE_WORKERS_START, "mupdate_workers_start", 0, {(void*)5}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_NETSCAPEURL, "netscapeurl", 0, {(void *)("http://asg.web.cmu.edu/cyrus/imapd/netscape-admin.html")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_NEWSMASTER, "newsmaster", 0, {(void *)("news")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_NEWSPEER, "newspeer", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_NEWSPOSTUSER, "newspostuser", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_NEWSPREFIX, "newsprefix", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_NNTPTIMEOUT, "nntptimeout", 0, {(void*)3}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_NOTIFYSOCKET, "notifysocket", 0, {(void *)("{configdirectory}/socket/notify")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PLAINTEXTLOGINPAUSE, "plaintextloginpause", 0, {(void*)0}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PLAINTEXTLOGINALERT, "plaintextloginalert", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POPEXPIRETIME, "popexpiretime", 0, {(void*)-1}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POPMINPOLL, "popminpoll", 0, {(void*)0}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POPSUBFOLDERS, "popsubfolders", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POPPOLLPADDING, "poppollpadding", 0, {(void*)1}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POPTIMEOUT, "poptimeout", 0, {(void*)10}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POPUSEACL, "popuseacl", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POSTMASTER, "postmaster", 0, {(void *)("postmaster")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POSTSPEC, "postspec", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_POSTUSER, "postuser", 0, {(void *)("")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PROXY_AUTHNAME, "proxy_authname", 0, {(void *)("proxy")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PROXY_PASSWORD, "proxy_password", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PROXY_REALM, "proxy_realm", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PROXYD_ALLOW_STATUS_REFERRAL, "proxyd_allow_status_referral", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PROXYSERVERS, "proxyservers", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PTS_MODULE, "pts_module", 0, {(void*)("afskrb")}, OPT_STRINGLIST, { { "afskrb" , IMAP_ENUM_ZERO }, { "ldap" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PTLOADER_SOCK, "ptloader_sock", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PTSCACHE_DB, "ptscache_db", 0, {(void*)("berkeley")}, OPT_STRINGLIST, { { "berkeley" , IMAP_ENUM_ZERO }, { "berkeley-hash" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PTSCACHE_TIMEOUT, "ptscache_timeout", 0, {(void*)10800}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PTSKRB5_CONVERT524, "ptskrb5_convert524", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_PTSKRB5_STRIP_DEFAULT_REALM, "ptskrb5_strip_default_realm", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_QUOTA_DB, "quota_db", 0, {(void*)("quotalegacy")}, OPT_STRINGLIST, { { "flat" , IMAP_ENUM_ZERO }, { "berkeley" , IMAP_ENUM_ZERO }, { "berkeley-hash" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { "quotalegacy" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_QUOTAWARN, "quotawarn", 0, {(void*)90}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_QUOTAWARNKB, "quotawarnkb", 0, {(void*)0}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_REJECT8BIT, "reject8bit", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_RFC2046_STRICT, "rfc2046_strict", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_RFC3028_STRICT, "rfc3028_strict", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SASL_MAXIMUM_LAYER, "sasl_maximum_layer", 0, {(void*)256}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SASL_MINIMUM_LAYER, "sasl_minimum_layer", 0, {(void*)0}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SEENSTATE_DB, "seenstate_db", 0, {(void*)("skiplist")}, OPT_STRINGLIST, { { "flat" , IMAP_ENUM_ZERO }, { "berkeley" , IMAP_ENUM_ZERO }, { "berkeley-hash" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SENDMAIL, "sendmail", 0, {(void *)("/usr/lib/sendmail")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SERVERNAME, "servername", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SHAREDPREFIX, "sharedprefix", 0, {(void *)("Shared Folders")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SIEVE_ALLOWREFERRALS, "sieve_allowreferrals", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SIEVE_EXTENSIONS, "sieve_extensions", 0, {(void *)(IMAP_ENUM_SIEVE_EXTENSIONS_FILEINTO|IMAP_ENUM_SIEVE_EXTENSIONS_REJECT|IMAP_ENUM_SIEVE_EXTENSIONS_VACATION|IMAP_ENUM_SIEVE_EXTENSIONS_IMAPFLAGS|IMAP_ENUM_SIEVE_EXTENSIONS_NOTIFY|IMAP_ENUM_SIEVE_EXTENSIONS_ENVELOPE|IMAP_ENUM_SIEVE_EXTENSIONS_RELATIONAL|IMAP_ENUM_SIEVE_EXTENSIONS_REGEX|IMAP_ENUM_SIEVE_EXTENSIONS_SUBADDRESS|IMAP_ENUM_SIEVE_EXTENSIONS_COPY|0)}, OPT_BITFIELD, { { "fileinto" , IMAP_ENUM_SIEVE_EXTENSIONS_FILEINTO }, { "reject" , IMAP_ENUM_SIEVE_EXTENSIONS_REJECT }, { "vacation" , IMAP_ENUM_SIEVE_EXTENSIONS_VACATION }, { "imapflags" , IMAP_ENUM_SIEVE_EXTENSIONS_IMAPFLAGS }, { "notify" , IMAP_ENUM_SIEVE_EXTENSIONS_NOTIFY }, { "include" , IMAP_ENUM_SIEVE_EXTENSIONS_INCLUDE }, { "envelope" , IMAP_ENUM_SIEVE_EXTENSIONS_ENVELOPE }, { "body" , IMAP_ENUM_SIEVE_EXTENSIONS_BODY }, { "relational" , IMAP_ENUM_SIEVE_EXTENSIONS_RELATIONAL }, { "regex" , IMAP_ENUM_SIEVE_EXTENSIONS_REGEX }, { "subaddress" , IMAP_ENUM_SIEVE_EXTENSIONS_SUBADDRESS }, { "copy" , IMAP_ENUM_SIEVE_EXTENSIONS_COPY }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SIEVE_MAXSCRIPTSIZE, "sieve_maxscriptsize", 0, {(void*)32}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SIEVE_MAXSCRIPTS, "sieve_maxscripts", 0, {(void*)5}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SIEVEDIR, "sievedir", 0, {(void *)("/usr/sieve")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SIEVENOTIFIER, "sievenotifier", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SIEVEUSEHOMEDIR, "sieveusehomedir", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SINGLEINSTANCESTORE, "singleinstancestore", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SKIPLIST_UNSAFE, "skiplist_unsafe", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SOFT_NOAUTH, "soft_noauth", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SRVTAB, "srvtab", 0, {(void *)("")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SUBMITSERVERS, "submitservers", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SUBSCRIPTION_DB, "subscription_db", 0, {(void*)("flat")}, OPT_STRINGLIST, { { "flat" , IMAP_ENUM_ZERO }, { "berkeley" , IMAP_ENUM_ZERO }, { "berkeley-hash" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYNC_AUTHNAME, "sync_authname", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYNC_HOST, "sync_host", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYNC_LOG, "sync_log", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYNC_MACHINEID, "sync_machineid", 0, {(void*)-1}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYNC_PASSWORD, "sync_password", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYNC_REALM, "sync_realm", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYNC_REPEAT_INTERVAL, "sync_repeat_interval", 0, {(void*)1}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYNC_SHUTDOWN_FILE, "sync_shutdown_file", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_SYSLOG_PREFIX, "syslog_prefix", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TEMP_PATH, "temp_path", 0, {(void *)("/tmp")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TIMEOUT, "timeout", 0, {(void*)30}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TLS_CA_FILE, "tls_ca_file", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TLS_CA_PATH, "tls_ca_path", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TLSCACHE_DB, "tlscache_db", 0, {(void*)("berkeley-nosync")}, OPT_STRINGLIST, { { "berkeley" , IMAP_ENUM_ZERO }, { "berkeley-nosync" , IMAP_ENUM_ZERO }, { "berkeley-hash" , IMAP_ENUM_ZERO }, { "berkeley-hash-nosync" , IMAP_ENUM_ZERO }, { "skiplist" , IMAP_ENUM_ZERO }, { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TLS_CERT_FILE, "tls_cert_file", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TLS_CIPHER_LIST, "tls_cipher_list", 0, {(void *)("DEFAULT")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TLS_KEY_FILE, "tls_key_file", 0, {(void *)(NULL)}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TLS_REQUIRE_CERT, "tls_require_cert", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_TLS_SESSION_TIMEOUT, "tls_session_timeout", 0, {(void*)1440}, OPT_INT, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_UMASK, "umask", 0, {(void *)("077")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_USERNAME_TOLOWER, "username_tolower", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_USERPREFIX, "userprefix", 0, {(void *)("Other Users")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_UNIX_GROUP_ENABLE, "unix_group_enable", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_UNIXHIERARCHYSEP, "unixhierarchysep", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_VIRTDOMAINS, "virtdomains", 0, {(void *)(IMAP_ENUM_VIRTDOMAINS_OFF)}, OPT_ENUM, { { "off" , IMAP_ENUM_VIRTDOMAINS_OFF }, { "userid" , IMAP_ENUM_VIRTDOMAINS_USERID }, { "on" , IMAP_ENUM_VIRTDOMAINS_ON }, { NULL, IMAP_ENUM_ZERO } } },
+
+ { IMAPOPT_LAST, NULL, 0, { NULL }, OPT_NOTOPT, { { NULL, IMAP_ENUM_ZERO } } }
+
+};
+
+
+
+/* c code goes here */
+
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapopts.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,298 @@
+/* auto-generated by config2header 1.2.2.12 */
+#ifndef INCLUDED_IMAPOPTS_H
+#define INCLUDED_IMAPOPTS_H
+
+enum opttype {
+ OPT_BITFIELD,
+ OPT_STRINGLIST,
+ OPT_ENUM,
+ OPT_SWITCH,
+ OPT_INT,
+ OPT_STRING,
+ OPT_NOTOPT
+};
+
+
+enum imapopt {
+
+ IMAPOPT_ZERO = 0,
+
+ IMAPOPT_ADMINS,
+ IMAPOPT_AFSPTS_LOCALREALMS,
+ IMAPOPT_AFSPTS_MYCELL,
+ IMAPOPT_ALLOWALLSUBSCRIBE,
+ IMAPOPT_ALLOWANONYMOUSLOGIN,
+ IMAPOPT_ALLOWAPOP,
+ IMAPOPT_ALLOWNEWNEWS,
+ IMAPOPT_ALLOWPLAINTEXT,
+ IMAPOPT_ALLOWUSERMOVES,
+ IMAPOPT_ALTNAMESPACE,
+ IMAPOPT_ANNOTATION_DB,
+ IMAPOPT_AUTH_MECH,
+ IMAPOPT_AUTOCREATEQUOTA,
+ IMAPOPT_BERKELEY_CACHESIZE,
+ IMAPOPT_BERKELEY_LOCKS_MAX,
+ IMAPOPT_BERKELEY_TXNS_MAX,
+ IMAPOPT_CLIENT_TIMEOUT,
+ IMAPOPT_CONFIGDIRECTORY,
+ IMAPOPT_DEBUG_COMMAND,
+ IMAPOPT_DEFAULTACL,
+ IMAPOPT_DEFAULTDOMAIN,
+ IMAPOPT_DEFAULTPARTITION,
+ IMAPOPT_DELETERIGHT,
+ IMAPOPT_DUPLICATE_DB,
+ IMAPOPT_DUPLICATESUPPRESSION,
+ IMAPOPT_EXPUNGE_MODE,
+ IMAPOPT_FLUSHSEENSTATE,
+ IMAPOPT_FOOLSTUPIDCLIENTS,
+ IMAPOPT_FORCE_SASL_CLIENT_MECH,
+ IMAPOPT_FULLDIRHASH,
+ IMAPOPT_HASHIMAPSPOOL,
+ IMAPOPT_IDLESOCKET,
+ IMAPOPT_IGNOREREFERENCE,
+ IMAPOPT_IMAPIDLEPOLL,
+ IMAPOPT_IMAPIDRESPONSE,
+ IMAPOPT_IMAPMAGICPLUS,
+ IMAPOPT_IMPLICIT_OWNER_RIGHTS,
+ IMAPOPT_LDAP_AUTHZ,
+ IMAPOPT_LDAP_BASE,
+ IMAPOPT_LDAP_BIND_DN,
+ IMAPOPT_LDAP_DEREF,
+ IMAPOPT_LDAP_FILTER,
+ IMAPOPT_LDAP_GROUP_BASE,
+ IMAPOPT_LDAP_GROUP_FILTER,
+ IMAPOPT_LDAP_GROUP_SCOPE,
+ IMAPOPT_LDAP_ID,
+ IMAPOPT_LDAP_MECH,
+ IMAPOPT_LDAP_MEMBER_ATTRIBUTE,
+ IMAPOPT_LDAP_MEMBER_BASE,
+ IMAPOPT_LDAP_MEMBER_FILTER,
+ IMAPOPT_LDAP_MEMBER_METHOD,
+ IMAPOPT_LDAP_MEMBER_SCOPE,
+ IMAPOPT_LDAP_PASSWORD,
+ IMAPOPT_LDAP_REALM,
+ IMAPOPT_LDAP_REFERRALS,
+ IMAPOPT_LDAP_RESTART,
+ IMAPOPT_LDAP_SASL,
+ IMAPOPT_LDAP_SASL_AUTHC,
+ IMAPOPT_LDAP_SASL_AUTHZ,
+ IMAPOPT_LDAP_SASL_MECH,
+ IMAPOPT_LDAP_SASL_PASSWORD,
+ IMAPOPT_LDAP_SASL_REALM,
+ IMAPOPT_LDAP_SCOPE,
+ IMAPOPT_LDAP_SERVERS,
+ IMAPOPT_LDAP_SIZE_LIMIT,
+ IMAPOPT_LDAP_START_TLS,
+ IMAPOPT_LDAP_TIME_LIMIT,
+ IMAPOPT_LDAP_TIMEOUT,
+ IMAPOPT_LDAP_TLS_CACERT_DIR,
+ IMAPOPT_LDAP_TLS_CACERT_FILE,
+ IMAPOPT_LDAP_TLS_CERT,
+ IMAPOPT_LDAP_TLS_CHECK_PEER,
+ IMAPOPT_LDAP_TLS_CIPHERS,
+ IMAPOPT_LDAP_TLS_KEY,
+ IMAPOPT_LDAP_URI,
+ IMAPOPT_LDAP_VERSION,
+ IMAPOPT_LMTP_DOWNCASE_RCPT,
+ IMAPOPT_LMTP_FUZZY_MAILBOX_MATCH,
+ IMAPOPT_LMTP_OVER_QUOTA_PERM_FAILURE,
+ IMAPOPT_LMTP_STRICT_QUOTA,
+ IMAPOPT_LMTPSOCKET,
+ IMAPOPT_LOGINREALMS,
+ IMAPOPT_LOGINUSEACL,
+ IMAPOPT_LOGTIMESTAMPS,
+ IMAPOPT_MAILNOTIFIER,
+ IMAPOPT_MAXMESSAGESIZE,
+ IMAPOPT_MBOXKEY_DB,
+ IMAPOPT_MBOXLIST_DB,
+ IMAPOPT_METAPARTITION_FILES,
+ IMAPOPT_MUPDATE_AUTHNAME,
+ IMAPOPT_MUPDATE_CONFIG,
+ IMAPOPT_MD5_DIR,
+ IMAPOPT_MD5_USER_MAP,
+ IMAPOPT_MUNGE8BIT,
+ IMAPOPT_MUPDATE_CONNECTIONS_MAX,
+ IMAPOPT_MUPDATE_PASSWORD,
+ IMAPOPT_MUPDATE_PORT,
+ IMAPOPT_MUPDATE_REALM,
+ IMAPOPT_MUPDATE_RETRY_DELAY,
+ IMAPOPT_MUPDATE_SERVER,
+ IMAPOPT_MUPDATE_USERNAME,
+ IMAPOPT_MUPDATE_WORKERS_MAX,
+ IMAPOPT_MUPDATE_WORKERS_MAXSPARE,
+ IMAPOPT_MUPDATE_WORKERS_MINSPARE,
+ IMAPOPT_MUPDATE_WORKERS_START,
+ IMAPOPT_NETSCAPEURL,
+ IMAPOPT_NEWSMASTER,
+ IMAPOPT_NEWSPEER,
+ IMAPOPT_NEWSPOSTUSER,
+ IMAPOPT_NEWSPREFIX,
+ IMAPOPT_NNTPTIMEOUT,
+ IMAPOPT_NOTIFYSOCKET,
+ IMAPOPT_PLAINTEXTLOGINPAUSE,
+ IMAPOPT_PLAINTEXTLOGINALERT,
+ IMAPOPT_POPEXPIRETIME,
+ IMAPOPT_POPMINPOLL,
+ IMAPOPT_POPSUBFOLDERS,
+ IMAPOPT_POPPOLLPADDING,
+ IMAPOPT_POPTIMEOUT,
+ IMAPOPT_POPUSEACL,
+ IMAPOPT_POSTMASTER,
+ IMAPOPT_POSTSPEC,
+ IMAPOPT_POSTUSER,
+ IMAPOPT_PROXY_AUTHNAME,
+ IMAPOPT_PROXY_PASSWORD,
+ IMAPOPT_PROXY_REALM,
+ IMAPOPT_PROXYD_ALLOW_STATUS_REFERRAL,
+ IMAPOPT_PROXYSERVERS,
+ IMAPOPT_PTS_MODULE,
+ IMAPOPT_PTLOADER_SOCK,
+ IMAPOPT_PTSCACHE_DB,
+ IMAPOPT_PTSCACHE_TIMEOUT,
+ IMAPOPT_PTSKRB5_CONVERT524,
+ IMAPOPT_PTSKRB5_STRIP_DEFAULT_REALM,
+ IMAPOPT_QUOTA_DB,
+ IMAPOPT_QUOTAWARN,
+ IMAPOPT_QUOTAWARNKB,
+ IMAPOPT_REJECT8BIT,
+ IMAPOPT_RFC2046_STRICT,
+ IMAPOPT_RFC3028_STRICT,
+ IMAPOPT_SASL_MAXIMUM_LAYER,
+ IMAPOPT_SASL_MINIMUM_LAYER,
+ IMAPOPT_SEENSTATE_DB,
+ IMAPOPT_SENDMAIL,
+ IMAPOPT_SERVERNAME,
+ IMAPOPT_SHAREDPREFIX,
+ IMAPOPT_SIEVE_ALLOWREFERRALS,
+ IMAPOPT_SIEVE_EXTENSIONS,
+ IMAPOPT_SIEVE_MAXSCRIPTSIZE,
+ IMAPOPT_SIEVE_MAXSCRIPTS,
+ IMAPOPT_SIEVEDIR,
+ IMAPOPT_SIEVENOTIFIER,
+ IMAPOPT_SIEVEUSEHOMEDIR,
+ IMAPOPT_SINGLEINSTANCESTORE,
+ IMAPOPT_SKIPLIST_UNSAFE,
+ IMAPOPT_SOFT_NOAUTH,
+ IMAPOPT_SRVTAB,
+ IMAPOPT_SUBMITSERVERS,
+ IMAPOPT_SUBSCRIPTION_DB,
+ IMAPOPT_SYNC_AUTHNAME,
+ IMAPOPT_SYNC_HOST,
+ IMAPOPT_SYNC_LOG,
+ IMAPOPT_SYNC_MACHINEID,
+ IMAPOPT_SYNC_PASSWORD,
+ IMAPOPT_SYNC_REALM,
+ IMAPOPT_SYNC_REPEAT_INTERVAL,
+ IMAPOPT_SYNC_SHUTDOWN_FILE,
+ IMAPOPT_SYSLOG_PREFIX,
+ IMAPOPT_TEMP_PATH,
+ IMAPOPT_TIMEOUT,
+ IMAPOPT_TLS_CA_FILE,
+ IMAPOPT_TLS_CA_PATH,
+ IMAPOPT_TLSCACHE_DB,
+ IMAPOPT_TLS_CERT_FILE,
+ IMAPOPT_TLS_CIPHER_LIST,
+ IMAPOPT_TLS_KEY_FILE,
+ IMAPOPT_TLS_REQUIRE_CERT,
+ IMAPOPT_TLS_SESSION_TIMEOUT,
+ IMAPOPT_UMASK,
+ IMAPOPT_USERNAME_TOLOWER,
+ IMAPOPT_USERPREFIX,
+ IMAPOPT_UNIX_GROUP_ENABLE,
+ IMAPOPT_UNIXHIERARCHYSEP,
+ IMAPOPT_VIRTDOMAINS,
+
+ IMAPOPT_LAST
+
+};
+
+
+
+enum enum_value {
+
+ IMAP_ENUM_ZERO = 0,
+
+ IMAP_ENUM_VIRTDOMAINS_ON,
+ IMAP_ENUM_VIRTDOMAINS_USERID,
+ IMAP_ENUM_VIRTDOMAINS_OFF = 0,
+ IMAP_ENUM_SIEVE_EXTENSIONS_COPY = (1<<11),
+ IMAP_ENUM_SIEVE_EXTENSIONS_SUBADDRESS = (1<<10),
+ IMAP_ENUM_SIEVE_EXTENSIONS_REGEX = (1<<9),
+ IMAP_ENUM_SIEVE_EXTENSIONS_RELATIONAL = (1<<8),
+ IMAP_ENUM_SIEVE_EXTENSIONS_BODY = (1<<7),
+ IMAP_ENUM_SIEVE_EXTENSIONS_ENVELOPE = (1<<6),
+ IMAP_ENUM_SIEVE_EXTENSIONS_INCLUDE = (1<<5),
+ IMAP_ENUM_SIEVE_EXTENSIONS_NOTIFY = (1<<4),
+ IMAP_ENUM_SIEVE_EXTENSIONS_IMAPFLAGS = (1<<3),
+ IMAP_ENUM_SIEVE_EXTENSIONS_VACATION = (1<<2),
+ IMAP_ENUM_SIEVE_EXTENSIONS_REJECT = (1<<1),
+ IMAP_ENUM_SIEVE_EXTENSIONS_FILEINTO = (1<<0),
+ IMAP_ENUM_MUPDATE_CONFIG_REPLICATED,
+ IMAP_ENUM_MUPDATE_CONFIG_UNIFIED,
+ IMAP_ENUM_MUPDATE_CONFIG_STANDARD = 0,
+ IMAP_ENUM_METAPARTITION_FILES_SQUAT = (1<<4),
+ IMAP_ENUM_METAPARTITION_FILES_EXPUNGE = (1<<3),
+ IMAP_ENUM_METAPARTITION_FILES_CACHE = (1<<2),
+ IMAP_ENUM_METAPARTITION_FILES_INDEX = (1<<1),
+ IMAP_ENUM_METAPARTITION_FILES_HEADER = (1<<0),
+ IMAP_ENUM_EXPUNGE_MODE_DELAYED,
+ IMAP_ENUM_EXPUNGE_MODE_IMMEDIATE = 0
+
+};
+
+
+
+union config_value {
+
+ void *dummy;
+
+ const char *s; /* OPT_STRING, OPT_STRINGLIST */
+
+ long i; /* OPT_INT */
+
+ long b; /* OPT_SWITCH */
+
+ enum enum_value e; /* OPT_ENUM */
+
+ unsigned long x; /* OPT_BITFIELD */
+
+};
+
+
+
+struct enum_option_s {
+
+ const char *name;
+
+ const enum enum_value val;
+
+};
+
+
+
+#define MAX_ENUM_OPTS 12
+
+struct imapopt_s {
+
+ const enum imapopt opt;
+
+ const char *optname;
+
+ int seen;
+
+ union config_value val;
+
+ const enum opttype t;
+
+ const struct enum_option_s enum_options[MAX_ENUM_OPTS+1];
+
+};
+
+
+
+extern struct imapopt_s imapopts[];
+
+
+
+#endif /* INCLUDED_IMAPOPTIONS_H */
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,476 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * derived from chris newman's code */
+
+/* $Id: imapurl.c,v 1.10.4.4 2005/11/17 15:46:30 murch Exp $ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <time.h>
+
+#include "imapurl.h"
+#include "xmalloc.h"
+
+/* hexadecimal lookup table */
+static const char hex[] = "0123456789ABCDEF";
+
+/* URL unsafe printable characters */
+static const char urlunsafe[] = " \"#%&+:;<=>?@[\\]^`{|}";
+
+/* UTF7 modified base64 alphabet */
+static const char base64chars[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,";
+#define UNDEFINED 64
+
+/* UTF16 definitions */
+#define UTF16MASK 0x03FFUL
+#define UTF16SHIFT 10
+#define UTF16BASE 0x10000UL
+#define UTF16HIGHSTART 0xD800UL
+#define UTF16HIGHEND 0xDBFFUL
+#define UTF16LOSTART 0xDC00UL
+#define UTF16LOEND 0xDFFFUL
+
+/* Convert an IMAP mailbox to a URL path
+ * dst needs to have roughly 4 times the storage space of src
+ * Hex encoding can triple the size of the input
+ * UTF-7 can be slightly denser than UTF-8
+ * (worst case: 8 octets UTF-7 becomes 9 octets UTF-8)
+ */
+static void MailboxToURL(char *dst, const char *src)
+{
+ unsigned char c, i, bitcount;
+ unsigned long ucs4, utf16, bitbuf;
+ unsigned char base64[256], utf8[6];
+
+ /* initialize modified base64 decoding table */
+ memset(base64, UNDEFINED, sizeof (base64));
+ for (i = 0; i < sizeof (base64chars); ++i) {
+ base64[(int) base64chars[i]] = i;
+ }
+
+ /* loop until end of string */
+ while (*src != '\0') {
+ c = *src++;
+ /* deal with literal characters and &- */
+ if (c != '&' || *src == '-') {
+ if (c < ' ' || c > '~' || strchr(urlunsafe, c) != NULL) {
+ /* hex encode if necessary */
+ dst[0] = '%';
+ dst[1] = hex[c >> 4];
+ dst[2] = hex[c & 0x0f];
+ dst += 3;
+ } else {
+ /* encode literally */
+ *dst++ = c;
+ }
+ /* skip over the '-' if this is an &- sequence */
+ if (c == '&') ++src;
+ } else {
+ /* convert modified UTF-7 -> UTF-16 -> UCS-4 -> UTF-8 -> HEX */
+ bitbuf = 0;
+ bitcount = 0;
+ ucs4 = 0;
+ while ((c = base64[(unsigned char) *src]) != UNDEFINED) {
+ ++src;
+ bitbuf = (bitbuf << 6) | c;
+ bitcount += 6;
+ /* enough bits for a UTF-16 character? */
+ if (bitcount >= 16) {
+ bitcount -= 16;
+ utf16 = (bitcount ? bitbuf >> bitcount
+ : bitbuf) & 0xffff;
+ /* convert UTF16 to UCS4 */
+ if
+ (utf16 >= UTF16HIGHSTART && utf16 <= UTF16HIGHEND) {
+ ucs4 = (utf16 - UTF16HIGHSTART) << UTF16SHIFT;
+ continue;
+ } else if
+ (utf16 >= UTF16LOSTART && utf16 <= UTF16LOEND) {
+ ucs4 += utf16 - UTF16LOSTART + UTF16BASE;
+ } else {
+ ucs4 = utf16;
+ }
+ /* convert UTF-16 range of UCS4 to UTF-8 */
+ if (ucs4 <= 0x7fUL) {
+ utf8[0] = ucs4;
+ i = 1;
+ } else if (ucs4 <= 0x7ffUL) {
+ utf8[0] = 0xc0 | (ucs4 >> 6);
+ utf8[1] = 0x80 | (ucs4 & 0x3f);
+ i = 2;
+ } else if (ucs4 <= 0xffffUL) {
+ utf8[0] = 0xe0 | (ucs4 >> 12);
+ utf8[1] = 0x80 | ((ucs4 >> 6) & 0x3f);
+ utf8[2] = 0x80 | (ucs4 & 0x3f);
+ i = 3;
+ } else {
+ utf8[0] = 0xf0 | (ucs4 >> 18);
+ utf8[1] = 0x80 | ((ucs4 >> 12) & 0x3f);
+ utf8[2] = 0x80 | ((ucs4 >> 6) & 0x3f);
+ utf8[3] = 0x80 | (ucs4 & 0x3f);
+ i = 4;
+ }
+ /* convert utf8 to hex */
+ for (c = 0; c < i; ++c) {
+ dst[0] = '%';
+ dst[1] = hex[utf8[c] >> 4];
+ dst[2] = hex[utf8[c] & 0x0f];
+ dst += 3;
+ }
+ }
+ }
+ /* skip over trailing '-' in modified UTF-7 encoding */
+ if (*src == '-') ++src;
+ }
+ }
+ /* terminate destination string */
+ *dst = '\0';
+}
+
+/* Convert hex coded UTF-8 URL path to modified UTF-7 IMAP mailbox
+ * dst should be about twice the length of src to deal with non-hex
+ * coded URLs
+ */
+static void URLtoMailbox(char *dst, char *src)
+{
+ unsigned int utf8pos = 0, utf8total, i, c, utf7mode, bitstogo, utf16flag;
+ unsigned long ucs4 = 0, bitbuf = 0;
+ unsigned char hextab[256];
+
+ /* initialize hex lookup table */
+ memset(hextab, 0, sizeof (hextab));
+ for (i = 0; i < sizeof (hex); ++i) {
+ hextab[(int) hex[i]] = i;
+ if (isupper((unsigned char) hex[i])) hextab[tolower(hex[i])] = i;
+ }
+
+ utf7mode = 0; /* is the output UTF7 currently in base64 mode? */
+ utf8total = 0; /* how many octets is the current input UTF-8 char;
+ 0 == between characters */
+ bitstogo = 0; /* bits that need to be encoded into base64; if
+ bitstogo != 0 then utf7mode == 1 */
+ while ((c = (unsigned char)*src) != '\0') {
+ ++src;
+ /* undo hex-encoding */
+ if (c == '%' && src[0] != '\0' && src[1] != '\0') {
+ c = (hextab[(int) src[0]] << 4) | hextab[(int) src[1]];
+ src += 2;
+ }
+
+ /* normal character? */
+ if (c >= ' ' && c <= '~') {
+ /* switch out of UTF-7 mode */
+ if (utf7mode) {
+ if (bitstogo) {
+ *dst++ = base64chars[(bitbuf << (6 - bitstogo)) & 0x3F];
+ }
+ *dst++ = '-';
+ utf7mode = 0;
+ bitstogo = bitbuf = 0;
+ }
+ *dst++ = c;
+ /* encode '&' as '&-' */
+ if (c == '&') {
+ *dst++ = '-';
+ }
+ continue;
+ }
+
+ /* switch to UTF-7 mode */
+ if (!utf7mode) {
+ *dst++ = '&';
+ utf7mode = 1;
+ }
+
+ /* Encode US-ASCII characters as themselves */
+ if (c < 0x80) {
+ ucs4 = c;
+ utf8total = 1;
+ } else if (utf8total) {
+ /* this is a subsequent octet of a multi-octet character */
+
+ /* save UTF8 bits into UCS4 */
+ ucs4 = (ucs4 << 6) | (c & 0x3FUL);
+ if (++utf8pos < utf8total) {
+ continue;
+ }
+ } else {
+ /* this is the first octet of a multi-octet character */
+
+ utf8pos = 1;
+ if (c < 0xE0) {
+ utf8total = 2;
+ ucs4 = c & 0x1F;
+ } else if (c < 0xF0) {
+ utf8total = 3;
+ ucs4 = c & 0x0F;
+ } else {
+ /* NOTE: can't convert UTF8 sequences longer than 4 */
+ utf8total = 4;
+ ucs4 = c & 0x03;
+ }
+ continue;
+ }
+
+ /* finished with UTF-8 character. make sure it isn't an
+ overlong sequence. if it is, drop that character */
+ if ((ucs4 < 0x80 && utf8total > 1) ||
+ (ucs4 < 0x0800 && utf8total > 2) ||
+ (ucs4 < 0x00010000 && utf8total > 3) ||
+ (ucs4 < 0x00200000 && utf8total > 4) ||
+ (ucs4 < 0x04000000 && utf8total > 5) ||
+ (ucs4 < 0x80000000 && utf8total > 6)) {
+ utf8total = 0;
+ continue;
+ }
+ utf8total = 0;
+
+ /* loop to split ucs4 into two utf16 chars if necessary */
+ do {
+ if (ucs4 >= UTF16BASE) {
+ ucs4 -= UTF16BASE;
+ bitbuf = (bitbuf << 16) | ((ucs4 >> UTF16SHIFT)
+ + UTF16HIGHSTART);
+ ucs4 = (ucs4 & UTF16MASK) + UTF16LOSTART;
+ utf16flag = 1;
+ } else {
+ bitbuf = (bitbuf << 16) | ucs4;
+ utf16flag = 0;
+ }
+ bitstogo += 16;
+ /* spew out base64 */
+ while (bitstogo >= 6) {
+ bitstogo -= 6;
+ *dst++ = base64chars[(bitstogo ? (bitbuf >> bitstogo)
+ : bitbuf)
+ & 0x3F];
+ }
+ } while (utf16flag);
+ }
+
+ /* if in UTF-7 mode, finish in ASCII */
+ if (utf7mode) {
+ if (bitstogo) {
+ *dst++ = base64chars[(bitbuf << (6 - bitstogo)) & 0x3F];
+ }
+ *dst++ = '-';
+ }
+
+ /* tie off string */
+ *dst = '\0';
+}
+
+void imapurl_fromURL(struct imapurl *url, const char *s)
+{
+ char *src;
+
+ memset(url, 0, sizeof(struct imapurl));
+ url->freeme = xmalloc(3 * strlen(s) + 3); /* space for copy of URL +
+ decoded mailbox */
+ src = strcpy(url->freeme, s);
+
+ if (src[0] == '{') { /* c-client style */
+ char *se;
+
+ src++;
+ se = strchr(src, '}');
+ if (se == NULL) return;
+ *se = '\0';
+ url->server = src;
+ url->mailbox = se + 1;
+ } else { /* IMAP URL */
+ char *se;
+ char *at;
+ char *mbox = NULL;
+ char *opt;
+
+ if (!strncmp(src, "imap://", 7)) { /* absolute URL */
+ src += 7; /* skip imap:// */
+ se = strchr(src, '/');
+ if (se == NULL) return;
+ at = strchr(src, '@');
+
+ if (at) {
+ *at = '\0';
+ url->user = src;
+ src = at + 1;
+ }
+ *se = '\0';
+ url->server = src;
+ src = mbox = ++se;
+ }
+ else { /* relative URL */
+ if (*src == '/') src++;
+ mbox = src;
+ }
+
+ /* parse options */
+ while (src && (src = strchr(src, ';'))) {
+ unsigned long ul;
+
+ if (src[-1] == '/') src[-1] = '\0'; /* trim mailbox at /; */
+ *src++ = '\0'; /* break url at ; */
+ if (!strncasecmp(src, "uidvalidity=", 12)) {
+ src += 12; /* skip uidvalidity= */
+ errno = 0;
+ ul = strtoul(src, NULL, 10); /* ends at '/' or '\0' */
+ if (ul < ULONG_MAX || !errno) url->uidvalidity = ul;
+ }
+ else if (!strncasecmp(src, "uid=", 4)) {
+ src += 4; /* skip uid= */
+ errno = 0;
+ ul = strtoul(src, NULL, 10); /* ends at '/' or '\0' */
+ if (ul < ULONG_MAX || !errno) url->uid = ul;
+ }
+ else if (!strncasecmp(src, "section=", 8)) {
+ src += 8; /* skip section= */
+ url->section = src; /* ends at ';' (next pass) or '\0' */
+ }
+ else if (!strncasecmp(src, "partial=", 8)) {
+ src += 8; /* skip partial= */
+ errno = 0;
+ ul = strtoul(src, &src, 10); /* ends at '.', '/' or '\0' */
+ if (ul < ULONG_MAX || !errno) url->start_octet = ul;
+ if (*src == '.') {
+ src++; /* skip . */
+ errno = 0;
+ ul = strtoul(src, NULL, 10); /* ends at '/' or '\0' */
+ if (ul < ULONG_MAX || !errno) url->octet_count = ul;
+ }
+ }
+ else if (!strncasecmp(src, "expire=", 7)) {
+ struct tm exp;
+ int tm_off, tm_houroff, tm_minoff;
+
+ src += 7; /* skip expire= */
+
+ /* parse the ISO 8601 date/time */
+ memset(&exp, 0, sizeof(struct tm));
+ sscanf(src, "%4d-%2d-%2dT%2d:%2d:%2d",
+ &exp.tm_year, &exp.tm_mon, &exp.tm_mday,
+ &exp.tm_hour, &exp.tm_min, &exp.tm_sec);
+
+ src += 19;
+ if (*src == '.') {
+ /* skip fractional secs */
+ while (isdigit((int) *(++src)));
+ }
+
+ /* handle offset */
+ switch (*src++) {
+ case 'Z': tm_off = 0; break;
+ case '-': tm_off = -1; break;
+ case '+': tm_off = 1; break;
+ default: fprintf(stderr, "illegal offset\n"); exit(1);
+ }
+ if (tm_off) sscanf(src, "%2d:%2d", &tm_houroff, &tm_minoff);
+ tm_off *= 60 * (60 * tm_houroff + tm_minoff);
+
+ exp.tm_year -= 1900; /* normalize to years since 1900 */
+ exp.tm_mon--; /* normalize to months since January */
+
+ /* normalize to GMT */
+ url->urlauth.expire = mktime(&exp) - tm_off;
+ }
+ else if (!strncasecmp(src, "urlauth=", 8)) {
+ src += 8; /* skip urlauth= */
+ url->urlauth.access = src;
+ if ((src = strchr(src, ':'))) {
+ url->urlauth.rump_len = (src - url->freeme);
+
+ *src++ = '\0'; /* break urlauth at : */
+ url->urlauth.mech = src;
+ if ((src = strchr(src, ':'))) {
+ *src++ = '\0'; /* break urlauth at : */
+ url->urlauth.token = src;
+ }
+ }
+ else {
+ url->urlauth.rump_len = strlen(s);
+ }
+ }
+ }
+
+ if (mbox && *mbox) {
+ url->mailbox = url->freeme + strlen(s) + 1;
+ URLtoMailbox((char *) url->mailbox, mbox);
+ }
+ }
+}
+
+void imapurl_toURL(char *dst, struct imapurl *url)
+{
+ if (url->mailbox) {
+ if (url->server) {
+ dst += sprintf(dst, "imap://");
+ if (url->auth) dst += sprintf(dst, ";AUTH=%s@", url->auth);
+ dst += sprintf(dst, "%s", url->server);
+ }
+ *dst++ = '/';
+ MailboxToURL(dst, url->mailbox);
+ dst += strlen(dst);
+ }
+ if (url->uidvalidity)
+ dst += sprintf(dst, ";UIDVALIDITY=%lu", url->uidvalidity);
+ if (url->uid) {
+ dst += sprintf(dst, "/;UID=%lu", url->uid);
+ if (url->section) dst += sprintf(dst, "/;SECTION=%s", url->section);
+ if (url->start_octet || url->octet_count) {
+ dst += sprintf(dst, "/;PARTIAL=%lu", url->start_octet);
+ if (url->octet_count) dst += sprintf(dst, ".%lu", url->octet_count);
+ }
+ }
+ if (url->urlauth.access) {
+ if (url->urlauth.expire) {
+ struct tm *exp = (struct tm *) gmtime(&url->urlauth.expire);
+ dst += strftime(dst, INT_MAX, ";EXPIRE=%Y-%m-%dT%H:%M:%SZ", exp);
+ }
+ dst += sprintf(dst, ";URLAUTH=%s", url->urlauth.access);
+ if (url->urlauth.mech) {
+ dst += sprintf(dst, ":%s", url->urlauth.mech);
+ if (url->urlauth.token) dst += sprintf(dst, ":%s", url->urlauth.token);
+ }
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imapurl.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,88 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: imapurl.h,v 1.5.4.2 2005/11/17 15:46:30 murch Exp $ */
+
+#ifndef IMAPURL_H
+#define IMAPURL_H
+
+struct imapurl {
+ char *freeme; /* copy of original URL + decoded mailbox;
+ caller must free() */
+
+ /* RFC 2192 */
+ const char *user;
+ const char *auth;
+ const char *server;
+ const char *mailbox;
+ unsigned long uidvalidity;
+ unsigned long uid;
+ const char *section;
+ /* RFC 2192bis */
+ unsigned long start_octet;
+ unsigned long octet_count;
+ /* URLAUTH */
+ struct {
+ const char *access;
+ const char *mech;
+ const char *token;
+ time_t expire;
+ size_t rump_len;
+ } urlauth;
+};
+
+/* Convert hex coded UTF-8 URL path to modified UTF-7 IMAP mailbox
+ * mailbox should be about twice the length of src to deal with non-hex
+ * coded URLs; server should be as large as src.
+ */
+void imapurl_fromURL(struct imapurl *url, const char *src);
+
+/* Convert an IMAP mailbox to a URL path
+ * dst needs to have roughly 4 times the storage space of mailbox
+ * Hex encoding can triple the size of the input
+ * UTF-7 can be slightly denser than UTF-8
+ * (worst case: 8 octets UTF-7 becomes 9 octets UTF-8)
+ *
+ * it is valid for mechname to be NULL (implies anonymous mech)
+ */
+void imapurl_toURL(char *dst, struct imapurl *url);
+
+#endif /* IMAPURL_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2048 @@
+/* imclient.c -- Streaming IMxP client library
+ *
+ * $Id: imclient.c,v 1.84.2.2 2005/10/28 14:51:22 ken3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include <sasl/sasl.h>
+
+#ifdef HAVE_SSL
+#include <openssl/lhash.h>
+#include <openssl/bn.h>
+#include <openssl/err.h>
+#include <openssl/pem.h>
+#include <openssl/x509.h>
+#include <openssl/ssl.h>
+#endif /* HAVE_SSL */
+
+#include "exitcodes.h"
+#include "xmalloc.h"
+#include "imparse.h"
+#include "imclient.h"
+#include "nonblock.h"
+#include "util.h"
+#include "iptostring.h"
+
+/* I/O buffer size */
+#define IMCLIENT_BUFSIZE 4096
+
+/* Command completion callback record */
+struct imclient_cmdcallback {
+ struct imclient_cmdcallback *next;
+ unsigned long tag; /* Command tag # */
+ imclient_proc_t *proc; /* Callback function */
+ void *rock; /* Callback rock */
+};
+
+/* Untagged data callback record */
+struct imclient_callback {
+ int flags; /* Information about untagged data */
+ char *keyword; /* Untagged data protocol keyword */
+ imclient_proc_t *proc; /* Callback function */
+ void *rock; /* Callback rock */
+};
+
+struct stringlist
+{
+ char *str;
+ struct stringlist *next;
+};
+
+/* Connection data */
+struct imclient {
+ /* TCP stream */
+ int fd;
+ char *servername;
+
+ int flags;
+
+ /* Data to be output to server */
+ char outbuf[IMCLIENT_BUFSIZE];
+ char *outptr;
+ size_t outleft;
+ char *outstart;
+
+ /* Replies being received from server */
+ char *replybuf;
+ char *replystart;
+ size_t replyliteralleft;
+ size_t replylen;
+ size_t alloc_replybuf;
+
+ /* Protection mechanism data */
+ /* struct sasl_client *mech;
+ sasl_encodefunc_t *encodefunc;
+ sasl_decodefunc_t *decodefunc;*/
+ void *state;
+ int maxplain;
+
+ unsigned long gensym; /* Tag value for previous command */
+
+ unsigned long readytag; /* Tag of command waiting for ready response */
+ /* 0 if wait over or not pending */
+ char *readytxt; /* Text of ready response, NULL if got
+ tagged reply for command */
+
+ /* Command callbacks */
+ struct imclient_cmdcallback *cmdcallback;
+
+ /* Untagged data callbacks */
+ int callback_num;
+ int callback_alloc;
+ struct imclient_callback *callback;
+
+ struct stringlist *interact_results;
+
+ sasl_conn_t *saslconn;
+ int saslcompleted;
+
+#ifdef HAVE_SSL
+ SSL_CTX *tls_ctx;
+ SSL *tls_conn;
+ int tls_on; /* wheather we are under a layer or not */
+#endif /* HAVE_SSL */
+};
+
+/*
+ * Syntactic class of a character
+ * 0 - literal, 1 - quoted-string, 2 - atom
+ */
+static const char charclass[256] = {
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, /* 00 - 0f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 10 - 1f */
+ 1, 2, 0, 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, /* ' ' - '/' */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* '0' - '?' */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* '@' - 'O' */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, /* 'P' - '_' */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* '`' - 'o' */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, /* 'p' - DEL */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 - 8f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 - 9f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* a0 - af */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* b0 - bf */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* c0 - cf */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* d0 - df */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* e0 - ef */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* f0 - ff */
+};
+
+/* Free list of command callback records */
+static struct imclient_cmdcallback *cmdcallback_freelist;
+
+/* Forward declarations */
+void imclient_write(struct imclient *imclient,
+ const char *s, size_t len);
+static int imclient_writeastring P((struct imclient *imclient,
+ const char *str));
+static void imclient_writebase64 P((struct imclient *imclient,
+ const char *output, size_t len));
+static void imclient_eof P((struct imclient *imclient));
+static int imclient_decodebase64 P((char *input));
+
+/* callbacks we support */
+static const sasl_callback_t callbacks[] = {
+ { SASL_CB_USER, NULL, NULL },
+ { SASL_CB_GETREALM, NULL, NULL },
+ { SASL_CB_AUTHNAME, NULL, NULL },
+ { SASL_CB_PASS, NULL, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+/*
+ * Connect to server on 'host'. Optional 'port' specifies the service
+ * to use. On success, returns zero and fills in the pointer pointed
+ * to by 'imclient' with a newly allocated connection pointer. On
+ * failure, returns errno if a system call failed, -1 if the hostname
+ * was not found, or -2 if the service name was not found.
+ * use sasl callbacks 'cbs'
+ */
+int imclient_connect(struct imclient **imclient,
+ const char *host,
+ const char *port,
+ sasl_callback_t *cbs)
+{
+ int s = -1;
+ struct addrinfo hints, *res0 = NULL, *res;
+ int saslresult;
+ static int didinit;
+
+ assert(imclient);
+ assert(host);
+
+ if (!port)
+ port = "143";
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+ if (getaddrinfo(host, port, &hints, &res0))
+ return -1;
+ for (res = res0; res; res = res->ai_next) {
+ s = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+ if (s < 0)
+ continue;
+ if (connect(s, res->ai_addr, res->ai_addrlen) >= 0)
+ break;
+ close(s);
+ s = -1;
+ }
+ if (s < 0)
+ return errno;
+ /* nonblock(s, 1); */
+ *imclient = (struct imclient *)xzmalloc(sizeof(struct imclient));
+ (*imclient)->fd = s;
+ (*imclient)->saslconn = NULL;
+ (*imclient)->saslcompleted = 0;
+ (*imclient)->servername = xstrdup(res0->ai_canonname ?
+ res0->ai_canonname : host);
+ freeaddrinfo(res0);
+ (*imclient)->outptr = (*imclient)->outstart = (*imclient)->outbuf;
+ (*imclient)->outleft = (*imclient)->maxplain = sizeof((*imclient)->outbuf);
+ (*imclient)->interact_results = NULL;
+ imclient_addcallback(*imclient,
+ "", 0, (imclient_proc_t *) 0, (void *)0,
+ "OK", CALLBACK_NOLITERAL, (imclient_proc_t *)0, (void *)0,
+ "NO", CALLBACK_NOLITERAL, (imclient_proc_t *)0, (void *)0,
+ "BAD", CALLBACK_NOLITERAL, (imclient_proc_t *)0, (void *)0,
+ "BYE", CALLBACK_NOLITERAL, (imclient_proc_t *)0, (void *)0,
+ (char *)0);
+
+#ifdef HAVE_SSL
+ (*imclient)->tls_ctx=NULL;
+ (*imclient)->tls_conn=NULL;
+ (*imclient)->tls_on=0;
+#endif /* HAVE_SSL */
+
+ if (!didinit) {
+ /* attempt to start sasl */
+ saslresult = sasl_client_init(NULL);
+ if (saslresult!=SASL_OK) return 1;
+ didinit = 1;
+ }
+
+ /* client new connection */
+ saslresult=sasl_client_new("imap", /* xxx ideally this should be configurable */
+ (*imclient)->servername,
+ NULL, NULL,
+ cbs ? cbs : callbacks,
+ 0,
+ &((*imclient)->saslconn));
+ if (saslresult!=SASL_OK) return 1;
+
+ return 0;
+}
+
+/*
+ * Close and free the connection 'imclient'
+ */
+void
+imclient_close(struct imclient *imclient)
+{
+ int i;
+ struct stringlist *cur, *cur_next;
+
+ assert(imclient);
+
+ imclient_eof(imclient);
+ close(imclient->fd);
+ free(imclient->servername);
+ if (imclient->replybuf) free(imclient->replybuf);
+ /* if (imclient->state) imclient->mech->free_state(imclient->state);*/
+ sasl_dispose(&(imclient->saslconn));
+ for (i = 0; i < imclient->callback_num; i++) {
+ free(imclient->callback[i].keyword);
+ }
+ if (imclient->callback) free((char *)imclient->callback);
+
+ for(cur=imclient->interact_results; cur; cur=cur_next) {
+ cur_next = cur->next;
+ free(cur->str);
+ free(cur);
+ }
+
+ free((char *)imclient);
+}
+
+void imclient_setflags(struct imclient *imclient, int flags)
+{
+ assert(imclient);
+ imclient->flags |= flags;
+}
+
+void imclient_clearflags(struct imclient *imclient, int flags)
+{
+ assert(imclient);
+ imclient->flags &= ~flags;
+}
+
+char *
+imclient_servername(struct imclient *imclient)
+{
+ assert(imclient);
+ return imclient->servername;
+}
+
+#define CALLBACKGROW 5
+
+/*
+ * Add untagged data callbacks to a connection.
+ * After the first argument 'imclient', there can be zero or more
+ * 4-tuples of 'keyword', 'flags', 'proc', 'rock', each adding or changing
+ * a single callback. The last 4-tuple is terminated by a single null pointer.
+ *
+ * Each 4-tuple adds or changes the callback for 'keyword'. 'flags' specifies
+ * information about the parsing of the untagged data. 'proc' and 'rock'
+ * specify the callback function and rock to invoke when the untagged data
+ * is received. 'proc' may be a null pointer, in which case no function is
+ * invoked.
+ *
+ * The callback function may not call the functions imclient_close(),
+ * imclient_send(), imclient_eof(), imclient_processoneevent(), or
+ * imclient_authenticate() on the connection. The callback function
+ * may scribble on the text of the untagged data.
+ *
+ */
+#ifdef __STDC__
+void imclient_addcallback(struct imclient *imclient, ...)
+#else
+void imclient_addcallback(va_alist)
+va_dcl
+#endif
+{
+ va_list pvar;
+ char *keyword;
+ int flags;
+ imclient_proc_t *proc;
+ void *rock;
+ int i;
+#ifdef __STDC__
+ va_start(pvar, imclient);
+#else
+ struct imclient *imclient;
+
+ va_start(pvar);
+ imclient = va_arg(pvar, struct imclient *);
+#endif
+
+ assert(imclient);
+
+ while ((keyword = va_arg(pvar, char *))) {
+ flags = va_arg(pvar, int);
+ proc = va_arg(pvar, imclient_proc_t *);
+ rock = va_arg(pvar, void *);
+
+ /* Search for existing callback matching keyword and flags */
+ for (i = 0; i < imclient->callback_num; i++) {
+ if (imclient->callback[i].flags == flags &&
+ !strcmp(imclient->callback[i].keyword, keyword)) break;
+ }
+
+ /* If not found, allocate new callback entry */
+ if (i == imclient->callback_num) {
+ if (imclient->callback_num == imclient->callback_alloc) {
+ imclient->callback_alloc += CALLBACKGROW;
+ imclient->callback = (struct imclient_callback *)
+ xrealloc((char *)imclient->callback,
+ imclient->callback_alloc*sizeof (struct imclient_callback));
+ }
+ imclient->callback_num++;
+ imclient->callback[i].keyword = xstrdup(keyword);
+ imclient->callback[i].flags = flags;
+ }
+
+ imclient->callback[i].proc = proc;
+ imclient->callback[i].rock = rock;
+ }
+ va_end(pvar);
+}
+
+/*
+ * Send a new command on the connection 'imclient'.
+ *
+ * 'finishproc' and 'finishrock' are the function and rock called when
+ * the command completes. 'functionproc' may be a null pointer, in
+ * which case no callback is made. The callback function may not call
+ * the functions imclient_close(), imclient_send(), imclient_eof(),
+ * imclient_processoneevent(), or imclient_authenticate() on the
+ * connection. The callback function is guaranteed to be invoked, the
+ * special result type "EOF" is used in the case where the connection
+ * dies before a result is received from the server.
+ *
+ * 'fmt' is a printf-like specification of the command. It must not
+ * include the tag--that is automatically added by imclient_send().
+ * The defined %-sequences are as follows:
+ *
+ * %% -- %
+ * %a -- atom
+ * %s -- astring (will be quoted or literalized as needed)
+ * %d -- decimal
+ * %u -- unsigned decimal
+ * %v -- #astring (arg is an null-terminated array of (char *)
+ * which are written as space separated astrings)
+ * %B -- (internal use only) base64-encoded data at end of command line
+ */
+#ifdef __STDC__
+void
+imclient_send(struct imclient *imclient, void (*finishproc)(),
+ void *finishrock, const char *fmt, ...)
+#else
+void
+imclient_send(va_alist)
+va_dcl
+#endif
+{
+ va_list pvar;
+ struct imclient_cmdcallback *newcmdcallback;
+ char buf[30];
+ char *percent, *str, **v;
+ int num;
+ unsigned unum;
+ int abortcommand = 0;
+#ifdef __STDC__
+ va_start(pvar, fmt);
+#else
+ struct imclient *imclient;
+ imclient_proc_t *finishproc;
+ void *finishrock;
+ char *fmt;
+
+ va_start(pvar);
+ imclient = va_arg(pvar, struct imclient *);
+ finishproc = va_arg(pvar, imclient_proc_t *);
+ finishrock = va_arg(pvar, void *);
+ fmt = va_arg(pvar, char *);
+#endif
+
+ assert(imclient);
+
+ imclient->gensym++;
+ if (imclient->gensym <= 0) imclient->gensym = 1;
+
+ /*
+ * If there is a command completion callback, add it to the
+ * command callback list of the imclient struct.
+ */
+ if (finishproc) {
+ if (cmdcallback_freelist) {
+ newcmdcallback = cmdcallback_freelist;
+ cmdcallback_freelist = newcmdcallback->next;
+ }
+ else {
+ newcmdcallback = (struct imclient_cmdcallback *)
+ xmalloc(sizeof (struct imclient_cmdcallback));
+ }
+ newcmdcallback->next = imclient->cmdcallback;
+ newcmdcallback->tag = imclient->gensym;
+ newcmdcallback->proc = finishproc;
+ newcmdcallback->rock = finishrock;
+ imclient->cmdcallback = newcmdcallback;
+ }
+
+ /* Write the tag */
+ snprintf(buf, sizeof(buf), "%lu ", imclient->gensym);
+ imclient_write(imclient, buf, strlen(buf));
+
+ /* Process the command format */
+ while ((percent = strchr(fmt, '%'))) {
+ imclient_write(imclient, fmt, percent-fmt);
+ switch (*++percent) {
+ case '%':
+ imclient_write(imclient, percent, 1);
+ break;
+
+ case 'a':
+ str = va_arg(pvar, char *);
+ imclient_write(imclient, str, strlen(str));
+ break;
+
+ case 's':
+ str = va_arg(pvar, char *);
+ abortcommand = imclient_writeastring(imclient, str);
+ if (abortcommand) goto fail;
+ break;
+
+ case 'd':
+ num = va_arg(pvar, int);
+ snprintf(buf, sizeof(buf), "%d", num);
+ imclient_write(imclient, buf, strlen(buf));
+ break;
+
+ case 'u':
+ unum = va_arg(pvar, unsigned);
+ snprintf(buf, sizeof(buf), "%lu", (unsigned long)unum);
+ imclient_write(imclient, buf, strlen(buf));
+ break;
+
+ case 'v':
+ v = va_arg(pvar, char **);
+ for (num = 0; v[num]; num++) {
+ if (num) imclient_write(imclient, " ", 1);
+ abortcommand = imclient_writeastring(imclient, v[num]);
+ if (abortcommand) goto fail;
+ }
+ break;
+
+ case 'B':
+ num = va_arg(pvar, int);
+ str = va_arg(pvar, char *);
+ imclient_writebase64(imclient, str, num);
+ /* KLUDGE ALERT: imclientwritebase64() spit out a CRLF
+ * so fake things up to prevent our spitting out a second CRLF.
+ */
+ abortcommand = 1;
+ goto fail;
+
+ default:
+ fatal("internal error: invalid format specifier in imclient_send",
+ EC_SOFTWARE);
+ }
+ fmt = percent + 1;
+ }
+fail:
+ va_end(pvar);
+
+ if (!abortcommand) {
+ imclient_write(imclient, fmt, strlen(fmt));
+ imclient_write(imclient, "\r\n", 2);
+ }
+}
+
+static int imclient_writeastring(struct imclient *imclient, const char *str)
+{
+ const char *p;
+ unsigned len = 0;
+ int class = 2;
+ char buf[30];
+
+ assert(imclient);
+ assert(str);
+
+ for (p = str; *p; p++) {
+ len++;
+ if (class > charclass[(unsigned char)*p]) {
+ class = charclass[(unsigned char)*p];
+ }
+ }
+ if (len >= 1024) class = 0;
+ if (len && class == 2) {
+ /* Atom */
+ imclient_write(imclient, str, len);
+ }
+ else if (class) {
+ /* Quoted-string */
+ imclient_write(imclient, "\"", 1);
+ imclient_write(imclient, str, len);
+ imclient_write(imclient, "\"", 1);
+ }
+ else {
+ /* Literal */
+ if (imclient->flags & IMCLIENT_CONN_NONSYNCLITERAL) {
+ snprintf(buf, sizeof(buf), "{%u+}\r\n", len);
+ imclient_write(imclient, buf, strlen(buf));
+ }
+ else {
+ imclient->readytag = imclient->gensym;
+ snprintf(buf, sizeof(buf), "{%u}\r\n", len);
+ imclient_write(imclient, buf, strlen(buf));
+ while (imclient->readytag) {
+ imclient_processoneevent(imclient);
+ }
+ if (!imclient->readytxt) return 1;
+ }
+ imclient_write(imclient, str, len);
+ }
+ return 0;
+}
+
+/*
+ * Write to the connection 'imclient' the data 's', of length 'len'
+ */
+void imclient_write(struct imclient *imclient, const char *s, size_t len)
+{
+ assert(imclient);
+ assert(s);
+
+ /* If no data pending for output, reset the buffer */
+ if (imclient->outptr == imclient->outstart) {
+ imclient->outstart = imclient->outptr = imclient->outbuf;
+ imclient->outleft = imclient->maxplain;
+ }
+
+ /* While we don't have room to buffer all the output */
+ while (len > imclient->outleft) {
+ /* Copy as much data as will fit in output buffer */
+ memcpy(imclient->outptr, s, imclient->outleft);
+ imclient->outptr += imclient->outleft;
+ s += imclient->outleft;
+ len -= imclient->outleft;
+ imclient->outleft = 0;
+
+ /* Process events until output buffer is flushed */
+ while (imclient->outptr != imclient->outstart) {
+ imclient_processoneevent(imclient);
+ }
+
+ /* Reset the buffer */
+ imclient->outstart = imclient->outptr = imclient->outbuf;
+ imclient->outleft = imclient->maxplain;
+ }
+
+ /* Copy remaining data to output buffer */
+ memcpy(imclient->outptr, s, len);
+ imclient->outptr += len;
+ imclient->outleft -= len;
+}
+
+/*
+ * On the connection 'imclient', handle the input 'buf' of size 'len'
+ * from the server. Invoke callbacks as appropriate.
+ */
+#define REPLYSLACK 80 /* When growing, allocate this extra slack */
+#define REPLYSHRINK (4096+500) /* If more than this free, shrink buffer */
+static void imclient_input(struct imclient *imclient, char *buf, int len)
+{
+ unsigned long replytag;
+ struct imclient_reply reply;
+ char *endreply;
+ char *p;
+ size_t parsed;
+ size_t literallen;
+ size_t keywordlen;
+ int keywordindex;
+ struct imclient_cmdcallback **cmdcb, *cmdcbtemp;
+ const char *plainbuf;
+ unsigned plainlen;
+ int result;
+
+ assert(imclient);
+ assert(buf);
+
+ if (imclient->saslcompleted == 1) {
+ /* decrypt what we have */
+ if ((result = sasl_decode(imclient->saslconn, buf, len,
+ &plainbuf, &plainlen)) != SASL_OK) {
+ (void) shutdown(imclient->fd, 0);
+ }
+
+ if (plainlen == 0) return;
+ } else {
+ plainbuf = buf;
+ plainlen = len;
+ }
+
+ /* Ensure replybuf has enough space to take the input */
+ if (imclient->replylen + plainlen >= imclient->alloc_replybuf) {
+ /* If there is unused space at the front, move the plaintext there */
+ if (imclient->replystart != imclient->replybuf) {
+ imclient->replylen -= imclient->replystart - imclient->replybuf;
+ memmove(imclient->replybuf, imclient->replystart,
+ imclient->replylen);
+ imclient->replystart = imclient->replybuf;
+ }
+
+ /* Shrink the reply buffer if it's too large */
+ if (imclient->replylen + plainlen + REPLYSHRINK <
+ imclient->alloc_replybuf) {
+ imclient->alloc_replybuf = imclient->replylen + plainlen
+ + REPLYSHRINK;
+ imclient->replybuf = xrealloc(imclient->replybuf,
+ imclient->alloc_replybuf);
+ imclient->replystart = imclient->replybuf;
+ }
+
+ /* If there still isn't enough room, grow the buffer */
+ if (imclient->replylen + plainlen >= imclient->alloc_replybuf) {
+ imclient->alloc_replybuf =
+ imclient->replylen + plainlen + REPLYSLACK;
+ imclient->replybuf = xrealloc(imclient->replybuf,
+ imclient->alloc_replybuf);
+ imclient->replystart = imclient->replybuf;
+ }
+ }
+
+ /* Remember where new data starts */
+ parsed = imclient->replylen;
+
+ /* Copy the data to the buffer and NUL-terminate it */
+ memcpy(imclient->replybuf + imclient->replylen, plainbuf, plainlen);
+ imclient->replylen += plainlen;
+ imclient->replybuf[imclient->replylen] = '\0';
+
+ /* Process the new data (of length 'plainlen') */
+ while (parsed < imclient->replylen) {
+ /* If we're reading a literal, skip over it. */
+ if (imclient->replyliteralleft) {
+ size_t avail;
+
+ avail = imclient->replylen - parsed;
+
+ if (avail > imclient->replyliteralleft) {
+ parsed += imclient->replyliteralleft;
+ imclient->replyliteralleft = 0;
+ continue;
+ } else {
+ parsed += avail;
+ imclient->replyliteralleft -= avail;
+ return;
+ }
+ }
+
+ /* Look for the end of the line and skip over to it. */
+ endreply = (char *)memchr(imclient->replybuf + parsed, '\n',
+ imclient->replylen - parsed);
+
+ /* Don't have a complete line */
+ if (!endreply) return;
+
+ parsed = endreply - imclient->replybuf + 1;
+
+ /* parse tag */
+ p = imclient->replystart;
+ if (*p == '+' && p[1] == ' ') {
+ /* Ready response */
+ if (imclient->readytag) {
+ imclient->readytag = 0;
+ imclient->readytxt = p+2;
+ *(endreply-1) = '\0';
+ }
+ else {
+ /* XXX Got junk from the server */
+ }
+ /* Start parsing the next reply */
+ imclient->replystart = endreply + 1;
+ continue;
+ }
+ else if (*p == '*' && p[1] == ' ') {
+ replytag = 0;
+ p += 2;
+ }
+ else {
+ replytag = 0;
+ while (isdigit((unsigned char) *p)) {
+ replytag = replytag * 10 + *p++ - '0';
+ }
+ if (*p++ != ' ') {
+ /* XXX Got junk from the server */
+ /* Start parsing the next reply */
+ imclient->replystart = endreply + 1;
+ continue;
+ }
+ }
+
+ /* parse num, if there */
+ if (replytag == 0 && isdigit((unsigned char) *p)) {
+ reply.msgno = 0;
+ while (isdigit((unsigned char) *p)) {
+ reply.msgno = reply.msgno * 10 + *p++ - '0';
+ }
+ if (*p++ != ' ') {
+ /* XXX Got junk from the server */
+ /* Start parsing the next reply */
+ imclient->replystart = endreply + 1;
+ continue;
+ }
+ }
+ else {
+ reply.msgno = -1;
+ }
+
+ /* parse keyword */
+ reply.keyword = p;
+ while (*p && *p != ' ' && *p != '\n') p++;
+ keywordlen = p - reply.keyword;
+ reply.text = p + 1;
+ if (*p == '\n') {
+ if (keywordlen && p[-1] == '\r') {
+ keywordlen--;
+ reply.text--;
+ }
+ reply.text--;
+ }
+
+ /* Handle tagged replies */
+ if (replytag != 0) {
+ int iscompletion =
+ ((keywordlen == 3 && reply.keyword[0] == 'B' &&
+ reply.keyword[1] == 'A' && reply.keyword[2] == 'D') ||
+ (keywordlen == 2 &&
+ ((reply.keyword[0] == 'O' && reply.keyword[1] == 'K') ||
+ (reply.keyword[0] == 'N' && reply.keyword[1] == 'O'))));
+
+
+ /* Scan back and see if the end of the line introduces a literal */
+ if (!iscompletion && endreply > imclient->replystart+2 &&
+ endreply[-1] == '\r' && endreply[-2] == '}' &&
+ isdigit((unsigned char) endreply[-3])) {
+ p = endreply - 4;
+ while (p > imclient->replystart &&
+ isdigit((unsigned char) *p)) {
+ p--;
+ }
+ if (p > imclient->replystart + 2 && *p == '{' &&
+ charclass[(unsigned char)p[-1]] != 2) {
+
+ /* Parse the size of the literal */
+ literallen = 0;
+ p++;
+ while (isdigit((unsigned char) *p)) {
+ literallen = literallen*10 + *p++ -'0';
+ }
+
+ /* Do a continue to read literal & following line */
+ imclient->replyliteralleft = literallen;
+ continue;
+ }
+ }
+
+ /* Start parsing the next reply */
+ imclient->replystart = endreply + 1;
+
+ if (replytag == imclient->readytag) {
+ imclient->readytag = 0;
+ imclient->readytxt = 0;
+ }
+
+ cmdcb = &imclient->cmdcallback;
+ while (*cmdcb && (*cmdcb)->tag != replytag) {
+ cmdcb = &(*cmdcb)->next;
+ }
+ if ((cmdcbtemp = *cmdcb)) {
+ if (iscompletion) {
+ /* Move callback struct to the freelist */
+ *cmdcb = cmdcbtemp->next;
+ cmdcbtemp->next = cmdcallback_freelist;
+ cmdcallback_freelist = cmdcbtemp;
+ }
+
+ /* Do the callback */
+ endreply[-1] = '\0';
+ reply.keyword[keywordlen] = '\0';
+ (*cmdcbtemp->proc)(imclient, cmdcbtemp->rock, &reply);
+ }
+
+ continue;
+ }
+
+ /* Must be an untagged reply, look up the keyword */
+ for (keywordindex = 1; keywordindex < imclient->callback_num;
+ keywordindex++) {
+ if (imclient->callback[keywordindex].flags & CALLBACK_NUMBERED) {
+ if (reply.msgno == -1) continue;
+ }
+ else {
+ if (reply.msgno != -1) continue;
+ }
+ if (!strncmp(imclient->callback[keywordindex].keyword,
+ reply.keyword, keywordlen) &&
+ imclient->callback[keywordindex].keyword[keywordlen] == '\0'
+ && imclient->callback[keywordindex].proc)
+ break;
+ }
+
+ /* Keyword index 0 is the default callback */
+ if (keywordindex == imclient->callback_num) keywordindex = 0;
+
+ /* Scan back and see if the end of the line introduces a literal */
+ if (!(imclient->callback[keywordindex].flags & CALLBACK_NOLITERAL)) {
+ if (endreply > imclient->replystart+2 &&
+ endreply[-1] == '\r' && endreply[-2] == '}' &&
+ isdigit((unsigned char) endreply[-3])) {
+ p = endreply - 4;
+ while (p > imclient->replystart &&
+ isdigit((unsigned char) *p)) {
+ p--;
+ }
+ if (p > imclient->replystart + 2 && *p == '{' &&
+ charclass[(unsigned char)p[-1]] != 2) {
+
+ /* Parse the size of the literal */
+ literallen = 0;
+ p++;
+ while (isdigit((unsigned char) *p)) {
+ literallen = literallen*10 + *p++ -'0';
+ }
+
+ /* Do a continue to read literal & following line */
+ imclient->replyliteralleft = literallen;
+ continue;
+ }
+ }
+ }
+
+ /* Do the callback, if the proc is non-null */
+ if (imclient->callback[keywordindex].proc) {
+ endreply[-1] = '\0';
+ reply.keyword[keywordlen] = '\0';
+ (imclient->callback[keywordindex].proc)
+ (imclient, imclient->callback[keywordindex].rock, &reply);
+ }
+
+ /* Start parsing the next reply */
+ imclient->replystart = endreply + 1;
+ }
+}
+
+/*
+ * Received an EOF on the connection 'imclient'
+ * Issue appropriate callbacks.
+ */
+static void imclient_eof(struct imclient *imclient)
+{
+ struct imclient_cmdcallback *cmdcb;
+ struct imclient_reply reply;
+
+ assert(imclient);
+
+ imclient->readytag = 0;
+ imclient->readytxt = 0;
+
+ for (cmdcb = imclient->cmdcallback; cmdcb; cmdcb = cmdcb->next) {
+ reply.keyword = "EOF";
+ reply.msgno = -1;
+ reply.text = "";
+ (*cmdcb->proc)(imclient, cmdcb->rock, &reply);
+ if (!cmdcb->next) {
+ cmdcb->next = cmdcallback_freelist;
+ cmdcallback_freelist = imclient->cmdcallback;
+ break;
+ }
+ }
+ imclient->cmdcallback = 0;
+
+ /* XXX make an untagged "EOF" callback? */
+}
+
+/*
+ * Get information for calling select
+ * 'fd' is filled in with file descriptor to select() for read
+ * 'wanttowrite' is filled in with nonzero value iff should
+ * select() for write as well.
+ */
+void imclient_getselectinfo(struct imclient *imclient, int *fd,
+ int *wanttowrite)
+{
+ assert(imclient);
+ assert(fd);
+ assert(wanttowrite);
+
+ *fd = imclient->fd;
+ *wanttowrite = imclient->outptr - imclient->outstart;
+}
+
+/*
+ * Process one input or output event on the connection 'imclient'.
+ */
+void imclient_processoneevent(struct imclient *imclient)
+{
+ char buf[IMCLIENT_BUFSIZE];
+ int n;
+ int writelen;
+ fd_set rfds, wfds;
+ FD_ZERO(&rfds);
+ FD_ZERO(&wfds);
+
+ assert(imclient);
+
+ for (;;) {
+ writelen = imclient->outptr - imclient->outstart;
+
+ if ((imclient->saslcompleted==1) && (writelen>0)) {
+ unsigned int cryptlen=0;
+ const char *cryptptr=NULL;
+
+ if (sasl_encode(imclient->saslconn, imclient->outstart, writelen,
+ &cryptptr,&cryptlen)!=SASL_OK)
+ {
+ /* XXX encoding error */
+ n=0;
+ }
+
+#ifdef HAVE_SSL
+ if (imclient->tls_on==1)
+ {
+ n = SSL_write(imclient->tls_conn, cryptptr, cryptlen);
+ } else {
+ n = write(imclient->fd, cryptptr, cryptlen);
+ }
+#else /* HAVE_SSL */
+ n = write(imclient->fd, cryptptr,
+ cryptlen);
+#endif /* HAVE_SSL */
+
+ if (n > 0) {
+ imclient->outstart += writelen;
+ return;
+ }
+
+ /* XXX Also EPIPE & the like? */
+ /* Make sure we select() for writing */
+
+ }
+ else if (writelen) {
+
+ /* No protection mechanism, just write the plaintext */
+
+#ifdef HAVE_SSL
+ if (imclient->tls_on==1)
+ {
+ n = SSL_write(imclient->tls_conn, imclient->outstart, writelen);
+ } else {
+ n = write(imclient->fd, imclient->outstart, writelen);
+ }
+#else /* HAVE_SSL */
+ n = write(imclient->fd, imclient->outstart, writelen);
+#endif /* HAVE_SSL */
+
+
+ if (n > 0) {
+ imclient->outstart += n;
+ return;
+ }
+ /* XXX Also EPIPE & the like? */
+ }
+
+ if (FD_ISSET(imclient->fd, &rfds))
+ {
+#ifdef HAVE_SSL
+ /* just do a SSL read instead if we're under a tls layer */
+ if (imclient->tls_on==1)
+ {
+ n = SSL_read(imclient->tls_conn, buf, sizeof(buf));
+
+ } else {
+ n = read(imclient->fd, buf, sizeof(buf));
+ }
+
+#else /* HAVE_SSL */
+ n = read(imclient->fd, buf, sizeof(buf));
+#endif /* HAVE_SSL */
+
+ if (n >= 0) {
+ if (n == 0) {
+ imclient_eof(imclient);
+ }
+ else {
+ imclient_input(imclient, buf, n);
+ }
+ return;
+ }
+ }
+
+ FD_ZERO(&rfds);
+ FD_ZERO(&wfds);
+ FD_SET(imclient->fd, &rfds);
+ if (writelen) FD_SET(imclient->fd, &wfds);
+ (void) select(imclient->fd + 1, &rfds, &wfds, (fd_set *)0, 0);
+ }
+}
+
+enum replytype {replytype_inprogress, replytype_ok, replytype_no,
+ replytype_bad, replytype_prematureok};
+
+struct authresult {
+ enum replytype replytype;
+ int r;
+};
+
+/* Command completion callback for imclient_authenticate */
+static void authresult(struct imclient *imclient __attribute__((unused)),
+ void *rock,
+ struct imclient_reply *reply)
+{
+ struct authresult *result = (struct authresult *)rock;
+
+ assert(result);
+ assert(reply);
+
+ if (!strcmp(reply->keyword, "OK")) {
+ result->replytype = replytype_ok;
+ }
+ else if (!strcmp(reply->keyword, "NO")) {
+ result->replytype = replytype_no;
+ }
+ else result->replytype = replytype_bad;
+}
+
+/* Command completion for starttls */
+static void tlsresult(struct imclient *imclient __attribute__((unused)),
+ void *rock,
+ struct imclient_reply *reply)
+{
+ struct authresult *result = (struct authresult *)rock;
+
+ assert(result);
+ assert(reply);
+
+ if (!strcmp(reply->keyword, "OK")) {
+ result->replytype = replytype_ok;
+ }
+ else if (!strcmp(reply->keyword, "NO")) {
+ result->replytype = replytype_no;
+ }
+ else result->replytype = replytype_bad;
+}
+
+
+static sasl_security_properties_t *make_secprops(int min,int max)
+{
+ sasl_security_properties_t *ret=
+ (sasl_security_properties_t *)xzmalloc(sizeof(sasl_security_properties_t));
+
+ ret->maxbufsize = IMCLIENT_BUFSIZE;
+ ret->min_ssf = min;
+ ret->max_ssf = max;
+
+ return ret;
+}
+
+void interaction (struct imclient *context, sasl_interact_t *t, char *user)
+{
+ char result[1024];
+ struct stringlist *cur;
+
+ assert(context);
+ assert(t);
+
+ cur = malloc(sizeof(struct stringlist));
+ if(!cur) {
+ t->len=0;
+ t->result=NULL;
+ return;
+ }
+
+ cur->str = NULL;
+ cur->next = context->interact_results;
+ context->interact_results = cur;
+
+ if ((t->id == SASL_CB_USER || t->id == SASL_CB_AUTHNAME)
+ && user && user[0]) {
+ t->len = strlen(user);
+ cur->str = xstrdup(user);
+ } else {
+ printf("%s: ", t->prompt);
+ if (t->id == SASL_CB_PASS) {
+ char *ptr = getpass("");
+ strlcpy(result, ptr, sizeof(result));
+ } else {
+ fgets(result, sizeof(result)-1, stdin);
+ result[strlen(result) - 1] = '\0';
+ }
+
+ t->len = strlen(result);
+ cur->str = (char *) xmalloc(t->len+1);
+ memset(cur->str, 0, t->len+1);
+ memcpy(cur->str, result, t->len);
+ }
+
+ t->result = cur->str;
+}
+
+void fillin_interactions(struct imclient *context,
+ sasl_interact_t *tlist, char *user)
+{
+ assert(context);
+ assert(tlist);
+
+ while (tlist->id!=SASL_CB_LIST_END)
+ {
+ interaction(context, tlist, user);
+ tlist++;
+ }
+}
+
+/*
+ * Params:
+ * mechlist: list of mechanisms seperated by spaces
+ *
+ * Returns:
+ * 0 - sucess
+ * 1 - failure
+ * 2 - severe failure?
+ */
+static int imclient_authenticate_sub(struct imclient *imclient,
+ char *mechlist,
+ char *user,
+ int minssf,
+ int maxssf,
+ const char **mechusing)
+{
+ int saslresult;
+ sasl_security_properties_t *secprops=NULL;
+ socklen_t addrsize;
+ struct sockaddr_storage saddr_l;
+ struct sockaddr_storage saddr_r;
+ char localip[60], remoteip[60];
+ sasl_interact_t *client_interact=NULL;
+ const char *out;
+ unsigned int outlen;
+ int inlen;
+ struct authresult result;
+
+ assert(imclient);
+ assert(mechlist);
+
+ /*******
+ * Now set the SASL properties
+ *******/
+ secprops=make_secprops(minssf,maxssf);
+ if (secprops==NULL) return 1;
+
+ saslresult=sasl_setprop(imclient->saslconn, SASL_SEC_PROPS, secprops);
+ if (saslresult!=SASL_OK) return 1;
+ free(secprops);
+
+ addrsize=sizeof(struct sockaddr_storage);
+ if (getpeername(imclient->fd,(struct sockaddr *)&saddr_r,&addrsize)!=0)
+ return 1;
+
+ addrsize=sizeof(struct sockaddr_storage);
+ if (getsockname(imclient->fd,(struct sockaddr *)&saddr_l,&addrsize)!=0)
+ return 1;
+
+ if(iptostring((const struct sockaddr *)&saddr_l, addrsize,
+ localip, sizeof(localip)) != 0)
+ return 1;
+
+ if(iptostring((const struct sockaddr *)&saddr_r, addrsize,
+ remoteip, sizeof(remoteip)) != 0)
+ return 1;
+
+ saslresult=sasl_setprop(imclient->saslconn, SASL_IPREMOTEPORT, remoteip);
+ if (saslresult!=SASL_OK) return 1;
+
+ saslresult=sasl_setprop(imclient->saslconn, SASL_IPLOCALPORT, localip);
+ if (saslresult!=SASL_OK) return 1;
+
+ /********
+ * SASL is setup. Now try the actual authentication
+ ********/
+
+ saslresult=SASL_INTERACT;
+
+ /* call sasl client start */
+ while (saslresult==SASL_INTERACT)
+ {
+ saslresult=sasl_client_start(imclient->saslconn, mechlist,
+ &client_interact,
+ &out, &outlen,
+ mechusing);
+ if (saslresult==SASL_INTERACT) {
+ fillin_interactions(imclient,
+ client_interact, user); /* fill in prompts */
+ }
+ }
+
+ if ((saslresult!=SASL_OK) && (saslresult!=SASL_CONTINUE)) return saslresult;
+
+ imclient_send(imclient, authresult, (void *)&result,
+ "AUTHENTICATE %a", *mechusing);
+
+ while (1) {
+ /* Wait for ready response or command completion */
+ imclient->readytag = imclient->gensym;
+ while (imclient->readytag) {
+ imclient_processoneevent(imclient);
+ }
+
+ /* stop looping on command completion */
+ if (!imclient->readytxt) break;
+
+ if (isspace((unsigned char) *imclient->readytxt)) {
+ inlen = 0;
+ } else {
+ inlen = imclient_decodebase64(imclient->readytxt);
+ }
+
+ if (inlen == -1) {
+ /* bad base64 string */
+ return replytype_bad;
+ }
+
+ if (inlen == 0 && outlen > 0) {
+ /* we have something from the initial thing to send */
+ } else {
+ /* perform a step */
+ saslresult = SASL_INTERACT;
+ while (saslresult == SASL_INTERACT) {
+ saslresult=sasl_client_step(imclient->saslconn,
+ imclient->readytxt,
+ inlen,
+ &client_interact,
+ &out,
+ &outlen);
+
+ if (saslresult == SASL_INTERACT) {
+ /* fill in prompts */
+ fillin_interactions(imclient,
+ client_interact, user);
+ }
+ }
+ }
+
+ /* send our reply to the server */
+ if ((saslresult==SASL_OK) || (saslresult==SASL_CONTINUE)) {
+ if (out == NULL || outlen == 0) {
+ imclient_write(imclient, "\r\n", 2);
+ } else {
+ imclient_writebase64(imclient, out, outlen);
+ }
+ } else {
+ imclient_write(imclient,"*\r\n", 3);
+ return saslresult;
+ }
+
+ outlen = 0;
+ }
+
+ if(result.replytype == replytype_ok) imclient->saslcompleted = 1;
+
+ return (result.replytype != replytype_ok);
+}
+
+/* xxx service is not needed here */
+int imclient_authenticate(struct imclient *imclient,
+ char *mechlist,
+ char *service __attribute__((unused)),
+ char *user,
+ int minssf,
+ int maxssf)
+{
+ int r;
+ char *mlist;
+ const char *mtried;
+
+ assert(imclient);
+ assert(mechlist);
+
+ mlist = xstrdup(mechlist);
+ ucase(mlist);
+
+ do {
+ mtried = NULL;
+
+ r = imclient_authenticate_sub(imclient,
+ mlist,
+ user,
+ minssf,
+ maxssf,
+ &mtried);
+
+ /* eliminate mtried (mechanism tried) from mlist */
+ if (r != 0 && mtried) {
+ char *newlist = xmalloc(strlen(mlist)+1);
+ char *mtr = xstrdup(mtried);
+ char *tmp;
+
+ ucase(mtr);
+ tmp = strstr(mlist,mtr);
+ if(!tmp) {
+ free(mtr);
+ free(mlist);
+ break;
+ }
+ *tmp = '\0';
+ strcpy(newlist,mlist);
+
+ /* Use tmp+1 here to skip the \0 we just put in.
+ * this is safe because even if the mechs are one character
+ * long there would still be another trailing \0 */
+ tmp = strchr(tmp+1,' ');
+ if (tmp) {
+ tmp++; /* skip the space */
+ strcat(newlist,tmp);
+ }
+
+ free(mtr);
+ free(mlist);
+ mlist = newlist;
+ }
+ } while ((r != 0) && (mtried));
+
+ if (r == 0) {
+ const int *ptr;
+
+ sasl_getprop(imclient->saslconn, SASL_MAXOUTBUF, (const void **) &ptr);
+ imclient->maxplain = *ptr < IMCLIENT_BUFSIZE ? *ptr : IMCLIENT_BUFSIZE;
+ }
+
+ free(mlist);
+
+ return r;
+}
+
+
+#define XX 127
+/*
+ * Tables for encoding/decoding base64
+ */
+static const char basis_64[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static const char index_64[256] = {
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,62, XX,XX,XX,63,
+ 52,53,54,55, 56,57,58,59, 60,61,XX,XX, XX,XX,XX,XX,
+ XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
+ 15,16,17,18, 19,20,21,22, 23,24,25,XX, XX,XX,XX,XX,
+ XX,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
+ 41,42,43,44, 45,46,47,48, 49,50,51,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+};
+#define CHAR64(c) (index_64[(unsigned char)(c)])
+
+/*
+ * Decode in-place the base64 data in 'input'. Returns the length
+ * of the decoded data, or -1 if there was an error.
+ */
+static int imclient_decodebase64(char *input)
+{
+ int len = 0;
+ unsigned char *output = (unsigned char *)input;
+ int c1, c2, c3, c4;
+
+ assert(input);
+
+ while (*input) {
+ c1 = *input++;
+ if (CHAR64(c1) == XX) return -1;
+ c2 = *input++;
+ if (CHAR64(c2) == XX) return -1;
+ c3 = *input++;
+ if (c3 != '=' && CHAR64(c3) == XX) return -1;
+ c4 = *input++;
+ if (c4 != '=' && CHAR64(c4) == XX) return -1;
+ *output++ = (CHAR64(c1) << 2) | (CHAR64(c2) >> 4);
+ ++len;
+ if (c3 == '=') break;
+ *output++ = ((CHAR64(c2) << 4) & 0xf0) | (CHAR64(c3) >> 2);
+ ++len;
+ if (c4 == '=') break;
+ *output++ = ((CHAR64(c3) << 6) & 0xc0) | CHAR64(c4);
+ ++len;
+ }
+
+ return len;
+}
+
+/*
+ * Write to the connection 'imclient' the base-64 encoded data
+ * 'output', of (unencoded) length 'len'.
+ */
+static void imclient_writebase64(struct imclient *imclient,
+ const char *output,
+ size_t len)
+{
+ char buf[1024];
+ size_t buflen = 0;
+ int c1, c2, c3;
+
+ assert(imclient);
+ assert(output);
+
+ while (len) {
+ if (buflen >= (size_t)(sizeof(buf)-4)) {
+ imclient_write(imclient, buf, buflen);
+ buflen = 0;
+ }
+
+ c1 = (unsigned char)*output++;
+ buf[buflen++] = basis_64[c1>>2];
+
+ if (--len == 0) c2 = 0;
+ else c2 = (unsigned char)*output++;
+ buf[buflen++] = basis_64[((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)];
+
+ if (len == 0) {
+ buf[buflen++] = '=';
+ buf[buflen++] = '=';
+ break;
+ }
+
+ if (--len == 0) c3 = 0;
+ else c3 = (unsigned char)*output++;
+
+ buf[buflen++] = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
+ if (len == 0) {
+ buf[buflen++] = '=';
+ break;
+ }
+
+ --len;
+ buf[buflen++] = basis_64[c3 & 0x3F];
+ }
+
+ if (buflen >= sizeof(buf)-2) {
+ imclient_write(imclient, buf, buflen);
+ buflen = 0;
+ }
+ buf[buflen++] = '\r';
+ buf[buflen++] = '\n';
+ imclient_write(imclient, buf, buflen);
+}
+
+
+/*************** All these functions help do the starttls; these are copied from imtest.c ********/
+#ifdef HAVE_SSL
+
+static int verify_depth;
+static int verify_error = X509_V_OK;
+
+#define CCERT_BUFSIZ 256
+static char peer_CN[CCERT_BUFSIZ];
+static char issuer_CN[CCERT_BUFSIZ];
+
+/*
+ * Set up the cert things on the server side. We do need both the
+ * private key (in key_file) and the cert (in cert_file).
+ * Both files may be identical.
+ *
+ * This function is taken from OpenSSL apps/s_cb.c
+ */
+
+static int set_cert_stuff(SSL_CTX * ctx, char *cert_file, char *key_file)
+{
+ if (cert_file != NULL) {
+ if (SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0) {
+ printf("[ unable to get certificate from '%s' ]\n", cert_file);
+ return (0);
+ }
+ if (key_file == NULL)
+ key_file = cert_file;
+ if (SSL_CTX_use_PrivateKey_file(ctx, key_file,
+ SSL_FILETYPE_PEM) <= 0) {
+ printf("[ unable to get private key from '%s' ]\n", key_file);
+ return (0);
+ }
+ /* Now we know that a key and cert have been set against
+ * the SSL context */
+ if (!SSL_CTX_check_private_key(ctx)) {
+ printf("[ Private key does not match the certificate public key ]\n");
+ return (0);
+ }
+ }
+ return (1);
+}
+
+/* taken from OpenSSL apps/s_cb.c */
+
+static int verify_callback(int ok, X509_STORE_CTX * ctx)
+{
+ char buf[256];
+ X509 *err_cert;
+ int err;
+ int depth;
+
+ err_cert = X509_STORE_CTX_get_current_cert(ctx);
+ err = X509_STORE_CTX_get_error(ctx);
+ depth = X509_STORE_CTX_get_error_depth(ctx);
+
+ X509_NAME_oneline(X509_get_subject_name(err_cert), buf, sizeof(buf));
+
+ /* if (verbose==1)
+ printf("Peer cert verify depth=%d %s\n", depth, buf);*/
+
+ if (!ok) {
+ printf("verify error:num=%d:%s\n", err,
+ X509_verify_cert_error_string(err));
+ if (verify_depth >= depth) {
+ ok = 1;
+ verify_error = X509_V_OK;
+ } else {
+ ok = 0;
+ verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;
+ }
+ }
+ switch (ctx->error) {
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+ X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert),
+ buf, sizeof(buf));
+ printf("issuer= %s\n", buf);
+ break;
+ case X509_V_ERR_CERT_NOT_YET_VALID:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
+ printf("cert not yet valid\n");
+ break;
+ case X509_V_ERR_CERT_HAS_EXPIRED:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
+ printf("cert has expired\n");
+ break;
+ }
+
+ /* if (verbose==1)
+ printf("verify return:%d\n", ok);*/
+
+ return (ok);
+}
+
+
+/* taken from OpenSSL apps/s_cb.c */
+static RSA *tmp_rsa_cb(SSL *s __attribute__((unused)),
+ int export __attribute__((unused)),
+ int keylength)
+{
+ static RSA *rsa_tmp = NULL;
+
+ if (rsa_tmp == NULL) {
+ rsa_tmp = RSA_generate_key(keylength, RSA_F4, NULL, NULL);
+ }
+ return (rsa_tmp);
+}
+
+/*
+ * Seed the random number generator.
+ */
+static int tls_rand_init(void)
+{
+#ifdef EGD_SOCKET
+ return (RAND_egd(EGD_SOCKET));
+#else
+ /* otherwise let OpenSSL do it internally */
+ return 0;
+#endif
+}
+
+ /*
+ * This is the setup routine for the SSL client.
+ *
+ * The skeleton of this function is taken from OpenSSL apps/s_client.c.
+ */
+
+static int tls_init_clientengine(struct imclient *imclient,
+ int verifydepth, char *var_tls_cert_file,
+ char *var_tls_key_file,
+ char *var_tls_CAfile,
+ char *var_tls_CApath)
+{
+ int off = 0;
+ int verify_flags = SSL_VERIFY_NONE;
+ char *CApath;
+ char *CAfile;
+ char *c_cert_file;
+ char *c_key_file;
+
+ assert(imclient);
+
+ SSL_load_error_strings();
+ SSLeay_add_ssl_algorithms();
+ if (tls_rand_init() == -1) {
+ printf("[ TLS engine: cannot seed PRNG ]\n");
+ return -1;
+ }
+
+ imclient->tls_ctx = SSL_CTX_new(TLSv1_client_method());
+ if (imclient->tls_ctx == NULL) {
+ return -1;
+ };
+
+ off |= SSL_OP_ALL; /* Work around all known bugs */
+ SSL_CTX_set_options(imclient->tls_ctx, off);
+
+ /* debugging SSL_CTX_set_info_callback(imclient->tls_ctx, apps_ssl_info_callback); */
+
+ if (var_tls_CAfile == NULL || strlen(var_tls_CAfile) == 0)
+ CAfile = NULL;
+ else
+ CAfile = var_tls_CAfile;
+ if (var_tls_CApath == NULL || strlen(var_tls_CApath) == 0)
+ CApath = NULL;
+ else
+ CApath = var_tls_CApath;
+
+ if (CAfile || CApath)
+ if ((!SSL_CTX_load_verify_locations(imclient->tls_ctx, CAfile, CApath)) ||
+ (!SSL_CTX_set_default_verify_paths(imclient->tls_ctx))) {
+ printf("[ TLS engine: cannot load CA data ]\n");
+ return -1;
+ }
+ if (var_tls_cert_file == NULL || strlen(var_tls_cert_file) == 0)
+ c_cert_file = NULL;
+ else
+ c_cert_file = var_tls_cert_file;
+ if (var_tls_key_file == NULL || strlen(var_tls_key_file) == 0)
+ c_key_file = NULL;
+ else
+ c_key_file = var_tls_key_file;
+
+ if (c_cert_file || c_key_file)
+ if (!set_cert_stuff(imclient->tls_ctx, c_cert_file, c_key_file)) {
+ printf("[ TLS engine: cannot load cert/key data ]\n");
+ return -1;
+ }
+ SSL_CTX_set_tmp_rsa_callback(imclient->tls_ctx, tmp_rsa_cb);
+
+ verify_depth = verifydepth;
+ SSL_CTX_set_verify(imclient->tls_ctx, verify_flags, verify_callback);
+
+ return 0;
+}
+
+#if 0 /* Dead code only for debugging */
+static int do_dump = 1;
+
+/*
+ * taken from OpenSSL crypto/bio/b_dump.c, modified to save a lot of strcpy
+ * and strcat by Matti Aarnio.
+ */
+
+#define TRUNCATE
+#define DUMP_WIDTH 16
+
+static int tls_dump(const char *s, int len)
+{
+ int ret = 0;
+ char buf[160 + 1];
+ char *ss;
+ int i;
+ int j;
+ int rows;
+ int trunc;
+ unsigned char ch;
+
+ trunc = 0;
+
+#ifdef TRUNCATE
+ for (; (len > 0) && ((s[len - 1] == ' ') || (s[len - 1] == '\0')); len--)
+ trunc++;
+#endif
+
+ rows = (len / DUMP_WIDTH);
+ if ((rows * DUMP_WIDTH) < len)
+ rows++;
+
+ for (i = 0; i < rows; i++) {
+ buf[0] = '\0'; /* start with empty string */
+ ss = buf;
+
+ sprintf(ss, "%04x ", i * DUMP_WIDTH);
+ ss += strlen(ss);
+ for (j = 0; j < DUMP_WIDTH; j++) {
+ if (((i * DUMP_WIDTH) + j) >= len) {
+ strcpy(ss, " ");
+ } else {
+ ch = ((unsigned char) *((char *) (s) + i * DUMP_WIDTH + j))
+ & 0xff;
+ sprintf(ss, "%02x[%c]%c", ch, ch, j == 7 ? '|' : ' ');
+ ss += 6;
+ }
+ }
+ ss += strlen(ss);
+ *ss+= ' ';
+ for (j = 0; j < DUMP_WIDTH; j++) {
+ if (((i * DUMP_WIDTH) + j) >= len)
+ break;
+ ch = ((unsigned char) *((char *) (s) + i * DUMP_WIDTH + j)) & 0xff;
+ *ss+= (((ch >= ' ') && (ch <= '~')) ? ch : '.');
+ if (j == 7) *ss+= ' ';
+ }
+ *ss = 0;
+ /*
+ * if this is the last call then update the ddt_dump thing so that
+ * we will move the selection point in the debug window
+ */
+ printf("%s\n", buf);
+ ret += strlen(buf);
+ }
+#ifdef TRUNCATE
+ if (trunc > 0) {
+ sprintf(buf, "%04x - <SPACES/NULS>\n", len+ trunc);
+ printf("%s\n", buf);
+ ret += strlen(buf);
+ }
+#endif
+ return (ret);
+}
+
+/* these next two taken from OpenSSL apps/s_cb.c */
+static long bio_dump_cb(BIO * bio,
+ int cmd,
+ const char *argp,
+ int argi,
+ long argl __attribute__((unused)),
+ long ret)
+{
+ if (!do_dump)
+ return (ret);
+
+ if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) {
+ printf("read from %08X [%08lX] (%d bytes => %ld (0x%X))\n", (unsigned int) bio,
+ (unsigned long) argp,
+ argi, ret, (unsigned int) ret);
+ tls_dump(argp, (int) ret);
+ return (ret);
+ } else if (cmd == (BIO_CB_WRITE | BIO_CB_RETURN)) {
+ printf("write to %08X [%08lX] (%d bytes => %ld (0x%X))\n", (unsigned int) bio,
+ (unsigned long) argp,
+ argi, ret, (unsigned int) ret);
+ tls_dump(argp, (int) ret);
+ }
+ return (ret);
+}
+
+static void apps_ssl_info_callback(SSL * s, int where, int ret)
+{
+ char *str;
+ int w;
+
+ w = where & ~SSL_ST_MASK;
+
+ if (w & SSL_ST_CONNECT)
+ str = "SSL_connect";
+ else if (w & SSL_ST_ACCEPT)
+ str = "SSL_accept";
+ else
+ str = "undefined";
+
+ if (where & SSL_CB_LOOP) {
+ printf("%s:%s\n", str, SSL_state_string_long(s));
+ } else if (where & SSL_CB_ALERT) {
+ str = (where & SSL_CB_READ) ? "read" : "write";
+ if ((ret & 0xff) != SSL3_AD_CLOSE_NOTIFY)
+ printf("SSL3 alert %s:%s:%s\n", str,
+ SSL_alert_type_string_long(ret),
+ SSL_alert_desc_string_long(ret));
+ } else if (where & SSL_CB_EXIT) {
+ if (ret == 0)
+ printf("%s:failed in %s\n",
+ str, SSL_state_string_long(s));
+ else if (ret < 0) {
+ printf("%s:error in %s %i\n",
+ str, SSL_state_string_long(s),ret);
+ }
+ }
+}
+#endif
+
+int tls_start_clienttls(struct imclient *imclient,
+ unsigned *layer, char **authid, int fd)
+{
+ int sts;
+ SSL_SESSION *session;
+ SSL_CIPHER *cipher;
+ X509 *peer;
+ const char *tls_protocol = NULL;
+ const char *tls_cipher_name = NULL;
+ int tls_cipher_usebits = 0;
+ int tls_cipher_algbits = 0;
+ char *tls_peer_CN = "";
+ char *tls_issuer_CN = NULL;
+
+ if (imclient->tls_conn == NULL) {
+ imclient->tls_conn = (SSL *) SSL_new(imclient->tls_ctx);
+ }
+ if (imclient->tls_conn == NULL) {
+ printf("Could not allocate 'con' with SSL_new()\n");
+ return -1;
+ }
+ SSL_clear(imclient->tls_conn);
+
+ if (!SSL_set_fd(imclient->tls_conn, fd)) {
+ printf("SSL_set_fd failed\n");
+ return -1;
+ }
+
+ /*SSL_set_read_ahead(imclient->tls_conn, 1);*/
+
+ /*
+ * This is the actual handshake routine. It will do all the negotiations
+ * and will check the client cert etc.
+ */
+ SSL_set_connect_state(imclient->tls_conn);
+
+
+ /*
+ * We do have an SSL_set_fd() and now suddenly a BIO_ routine is called?
+ * Well there is a BIO below the SSL routines that is automatically
+ * created for us, so we can use it for debugging purposes.
+ */
+ /* if (verbose==1) */
+ /* BIO_set_callback(SSL_get_rbio(imclient->tls_conn), bio_dump_cb);*/
+
+ /* Dump the negotiation for loglevels 3 and 4 */
+
+ if ((sts = SSL_connect(imclient->tls_conn)) <= 0) {
+ printf("[ SSL_connect error %d ]\n", sts); /* xxx get string error? */
+ session = SSL_get_session(imclient->tls_conn);
+ if (session) {
+ SSL_CTX_remove_session(imclient->tls_ctx, session);
+ printf("[ SSL session removed ]\n");
+ }
+ if (imclient->tls_conn!=NULL)
+ SSL_free(imclient->tls_conn);
+ imclient->tls_conn = NULL;
+ return -1;
+ }
+
+ /*
+ * Lets see, whether a peer certificate is availabe and what is
+ * the actual information. We want to save it for later use.
+ */
+ peer = SSL_get_peer_certificate(imclient->tls_conn);
+ if (peer != NULL) {
+ X509_NAME_get_text_by_NID(X509_get_subject_name(peer),
+ NID_commonName, peer_CN, CCERT_BUFSIZ);
+ tls_peer_CN = peer_CN;
+ X509_NAME_get_text_by_NID(X509_get_issuer_name(peer),
+ NID_commonName, issuer_CN, CCERT_BUFSIZ);
+ /* if (verbose==1)
+ printf("subject_CN=%s, issuer_CN=%s\n", peer_CN, issuer_CN);*/
+ tls_issuer_CN = issuer_CN;
+
+ }
+ tls_protocol = SSL_get_version(imclient->tls_conn);
+ cipher = SSL_get_current_cipher(imclient->tls_conn);
+ tls_cipher_name = SSL_CIPHER_get_name(cipher);
+ tls_cipher_usebits = SSL_CIPHER_get_bits(cipher,
+ &tls_cipher_algbits);
+
+ if (layer!=NULL)
+ *layer = tls_cipher_usebits;
+
+ if (authid!=NULL)
+ *authid = tls_peer_CN;
+
+ /* printf("TLS connection established: %s with cipher %s (%d/%d bits)\n",
+ tls_protocol, tls_cipher_name,
+ tls_cipher_usebits, tls_cipher_algbits);*/
+ return 0;
+}
+#endif /* HAVE_SSL */
+
+int imclient_havetls () {
+#ifdef HAVE_SSL
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+int imclient_starttls(struct imclient *imclient,
+ char *cert_file,
+ char *key_file,
+ char *CAfile,
+ char *CApath)
+{
+#ifdef HAVE_SSL
+ int result;
+ struct authresult theresult;
+ unsigned ssf;
+ char *auth_id;
+
+ imclient_send(imclient, tlsresult, (void *)&theresult,
+ "STARTTLS");
+
+ /* Wait for ready response or command completion */
+ imclient->readytag = imclient->gensym;
+ while (imclient->readytag) {
+ imclient_processoneevent(imclient);
+ }
+
+ result=tls_init_clientengine(imclient, 10, cert_file, key_file,
+ CAfile, CApath);
+ if (result!=0)
+ {
+ printf("[ TLS engine failed ]\n");
+ return 1;
+ } else {
+ result=tls_start_clienttls(imclient, &ssf, &auth_id, imclient->fd);
+
+ if (result!=0) {
+ printf("[ TLS negotiation did not succeed ]\n");
+ return 1;
+ }
+ }
+
+ /* turn non-blocking i/o back on */
+
+
+ /* TLS negotiation succeeded */
+
+ imclient->tls_on = 1;
+
+ auth_id=""; /* xxx this really should be peer_CN or
+ issuer_CN but I can't figure out which is
+ which at the moment */
+
+ /* tell SASL about the negotiated layer */
+ result=sasl_setprop(imclient->saslconn,
+ SASL_SSF_EXTERNAL,
+ &ssf);
+ if (result!=SASL_OK) return 1;
+ result=sasl_setprop(imclient->saslconn,
+ SASL_AUTH_EXTERNAL,
+ auth_id);
+ if (result!=SASL_OK) return 1;
+
+ return 0;
+#else
+ printf("[ TLS support not present (imclient_starttls) ]\n");
+ return 1;
+#endif /* HAVE_SSL */
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imclient.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,102 @@
+/* imclient.h -- Streaming IMxP client library
+ * $Id: imclient.h,v 1.26.2.1 2005/04/11 05:48:05 shadow Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#ifndef INCLUDED_IMCLIENT_H
+#define INCLUDED_IMCLIENT_H
+
+#include <sasl/sasl.h>
+
+struct imclient;
+struct sasl_client; /* to avoid having to include sasl sometimes */
+
+struct imclient_reply {
+ char *keyword; /* reply keyword */
+ long msgno; /* message number (-1 = no message number) */
+ char *text; /* subsequent text */
+};
+
+/* Flags for untagged-reply callbacks */
+#define CALLBACK_NUMBERED 1 /* Has a message sequence number */
+#define CALLBACK_NOLITERAL 2 /* Data cannot contain a literal */
+
+/* Connection flags */
+#define IMCLIENT_CONN_NONSYNCLITERAL 1 /* Server supports non-synchronizing literals */
+#define IMCLIENT_CONN_INITIALRESPONSE 1 /* Server supports SASL initial response */
+
+typedef void imclient_proc_t(struct imclient *imclient, void *rock,
+ struct imclient_reply *reply);
+
+extern int imclient_connect(struct imclient **imclient, const char *host,
+ const char *port, sasl_callback_t *cbs);
+extern void imclient_close(struct imclient *imclient);
+extern void imclient_setflags(struct imclient *imclient, int flags);
+extern void imclient_clearflags(struct imclient *imclient, int flags);
+extern char *imclient_servername(struct imclient *imclient);
+extern void imclient_addcallback(struct imclient *imclient, ...);
+extern void imclient_send(struct imclient *imclient,
+ imclient_proc_t *proc, void *rock,
+ const char *fmt, ...);
+extern void imclient_processoneevent(struct imclient *imclient);
+extern void imclient_getselectinfo(struct imclient *imclient,
+ int *fd, int *wanttowrite);
+
+extern int imclient_authenticate(struct imclient *imclient,
+ char *mechlist,
+ char *service,
+ char *user,
+ int minssf,
+ int maxssf);
+
+extern int imclient_have_tls (void);
+
+extern int imclient_starttls(struct imclient *imclient,
+ char *cert_file,
+ char *key_file,
+ char *CAfile,
+ char *CApath);
+
+extern void imclient_write (struct imclient *imclient,
+ const char *s, size_t len);
+
+#endif /* INCLUDED_IMCLIENT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,213 @@
+/* imparse.c -- IMxP client-side parsing routines
+ $Id: imparse.c,v 1.12 2003/02/13 20:15:40 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include "imparse.h"
+
+/*
+ * Parse a word from the string starting at the pointer pointed to by 's'.
+ * Places a pointer to the parsed word in the pointer at 'retval',
+ * returns the character following the word, and modifies the pointer at
+ * 's' to point after the returned character. Modifies the input buffer.
+ */
+int imparse_word(s, retval)
+char **s;
+char **retval;
+{
+ int c;
+
+ *retval = *s;
+ for (;;) {
+ c = *(*s)++;
+ if (!c || isspace(c) || c == '(' || c == ')' || c == '\"') {
+ (*s)[-1] = '\0';
+ return c;
+ }
+ }
+}
+
+/*
+ * Parse an astring from the string starting at the pointer pointed to
+ * by 's'. On success, places a pointer to the parsed word in the
+ * pointer at 'retval', returns the character following the word, and
+ * modifies the pointer at 's' to point after the returned character.
+ * On failure, returns EOF, modifies the pointer at 'retval' to point
+ * at the empty string, and modifies 's' to point around the syntax error.
+ * Modifies the input buffer.
+ */
+int imparse_astring(s, retval)
+char **s;
+char **retval;
+{
+ int c;
+ char *d;
+ int len = 0;
+ int sawdigit = 0;
+
+ switch (**s) {
+ case '\0':
+ case ' ':
+ case '(':
+ case ')':
+ case '\r':
+ case '\n':
+ /* Invalid starting character */
+ *retval = "";
+ return EOF;
+
+ default:
+ /*
+ * Atom -- parser is liberal in accepting specials other
+ * than whitespace, parens, or double quotes
+ */
+ return imparse_word(s, retval);
+
+ case '\"':
+ /*
+ * Quoted-string. Parser is liberal in accepting qspecials
+ * other than double-quote, CR, and LF.
+ */
+ *retval = d = ++(*s);
+ for (;;) {
+ c = *(*s)++;
+ if (c == '\\') {
+ c = *(*s)++;
+ }
+ else if (c == '\"') {
+ *d = '\0';
+ return *(*s)++;
+ }
+ else if (c == '\0' || c == '\r' || c == '\n') {
+ *retval = "";
+ return EOF;
+ }
+ *d++ = c;
+ }
+
+ case '{':
+ /* Literal */
+ (*s)++;
+ while (isdigit(c = *(*s)++)) {
+ sawdigit = 1;
+ len = len*10 + c - '0';
+ }
+ if (!sawdigit || c != '}' || *(*s)++ != '\r' || *(*s)++ != '\n') {
+ *retval = "";
+ return EOF;
+ }
+ *retval = *s;
+ *s += len;
+ c = **s;
+ *(*s)++ = '\0'; /* Note that 0 and '\0' mean the same thing */
+ return c;
+ }
+}
+
+/*
+ * Return nonzero if 's' matches the grammar for an atom
+ */
+int imparse_isatom(s)
+const char *s;
+{
+ int len = 0;
+
+ if (!*s) return 0;
+ for (; *s; s++) {
+ len++;
+ if (*s & 0x80 || *s < 0x1f || *s == 0x7f ||
+ *s == ' ' || *s == '{' || *s == '(' || *s == ')' ||
+ *s == '\"' || *s == '%' || *s == '*' || *s == '\\') return 0;
+ }
+ if (len >= 1024) return 0;
+ return 1;
+}
+
+/*
+ * Return nonzero if 's' matches the grammar for a sequence
+ */
+int imparse_issequence(const char* s)
+{
+ int c;
+ int len = 0;
+ int sawcolon = 0;
+
+ while ((c = *s)) {
+ if (c == ',') {
+ if (!len) return 0;
+ if (!isdigit((int) s[-1]) && s[-1] != '*') return 0;
+ sawcolon = 0;
+ }
+ else if (c == ':') {
+ if (sawcolon || !len) return 0;
+ if (!isdigit((int) s[-1]) && s[-1] != '*') return 0;
+ sawcolon = 1;
+ }
+ else if (c == '*') {
+ if (len && s[-1] != ',' && s[-1] != ':') return 0;
+ if (isdigit((int) s[1])) return 0;
+ }
+ else if (!isdigit(c)) {
+ return 0;
+ }
+ s++;
+ len++;
+ }
+ if (len == 0) return 0;
+ if (!isdigit((int) s[-1]) && s[-1] != '*') return 0;
+ return 1;
+}
+
+/*
+ * Return nonzero if 's' matches the grammar for a number
+ */
+int imparse_isnumber(const char *s)
+{
+ if (!*s) return 0;
+ for (; *s; s++) {
+ if (!isdigit((int) *s)) return 0;
+ }
+ return 1;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/imparse.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+/* imparse.h -- IMxP client-side parsing routines
+ * $Id: imparse.h,v 1.7 2003/02/13 20:15:40 rjs3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_IMPARSE_H
+#define INCLUDED_IMPARSE_H
+
+extern int imparse_word (char **s, char **retval);
+extern int imparse_astring (char **s, char **retval);
+extern int imparse_isatom (const char *s);
+extern int imparse_issequence (const char *s);
+extern int imparse_isnumber (const char *s);
+
+#endif /* INCLUDED_IMPARSE_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,83 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: iptostring.c,v 1.5.4.2 2004/03/24 19:53:15 ken3 Exp $ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include "iptostring.h"
+
+int iptostring(const struct sockaddr *addr, socklen_t addrlen,
+ char *out, unsigned outlen) {
+ char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
+ int niflags;
+
+ if(!addr || !out) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ niflags = NI_NUMERICHOST | NI_NUMERICSERV;
+#ifdef NI_WITHSCOPEID
+ if (addr->sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), pbuf, sizeof(pbuf),
+ niflags) != 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if(outlen < strlen(hbuf) + strlen(pbuf) + 2) {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ snprintf(out, outlen, "%s;%s", hbuf, pbuf);
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/iptostring.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,55 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: iptostring.h,v 1.3 2003/02/13 20:15:40 rjs3 Exp $ */
+
+#ifndef IPTOSTRING_H
+#define IPTOSTRING_H
+
+#include <stdlib.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+int iptostring(const struct sockaddr *addr, socklen_t addrlen,
+ char *out, unsigned outlen);
+
+#endif /* IPTOSTRING_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,568 @@
+/* libconfig.c -- imapd.conf handling
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: libconfig.c,v 1.2.2.15 2005/02/20 05:22:29 shadow Exp $ */
+
+#include <config.h>
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+
+#include "hash.h"
+#include "libconfig.h"
+#include "imapopts.h"
+#include "xmalloc.h"
+
+#define CONFIGHASHSIZE 30 /* relatively small,
+ * because it is for overflow only */
+#define INCLUDEHASHSIZE 5 /* relatively small,
+ * but how many includes are reasonable? */
+static struct hash_table confighash, includehash;
+
+/* cached configuration variables accessible to the external world */
+const char *config_filename= NULL; /* filename of configuration file */
+const char *config_dir = NULL; /* ie /var/imap */
+const char *config_defpartition = NULL; /* /var/spool/imap */
+const char *config_servername= NULL; /* gethostname() */
+const char *config_mupdate_server = NULL;/* NULL */
+const char *config_defdomain = NULL; /* NULL */
+const char *config_ident = NULL; /* the service name */
+int config_hashimapspool; /* f */
+enum enum_value config_virtdomains; /* f */
+enum enum_value config_mupdate_config; /* IMAP_ENUM_MUPDATE_CONFIG_STANDARD */
+
+/* declared in each binary that uses libconfig */
+extern const int config_need_data;
+extern void fatal(const char *fatal_message, int fatal_code)
+ __attribute__ ((noreturn));
+
+/* prototype to allow for sane function ordering */
+void config_read_file(const char *filename);
+
+const char *config_getstring(enum imapopt opt)
+{
+ assert(opt > IMAPOPT_ZERO && opt < IMAPOPT_LAST);
+ assert((imapopts[opt].t == OPT_STRING) ||
+ (imapopts[opt].t == OPT_STRINGLIST));
+
+ return imapopts[opt].val.s;
+}
+
+int config_getint(enum imapopt opt)
+{
+ assert(opt > IMAPOPT_ZERO && opt < IMAPOPT_LAST);
+ assert(imapopts[opt].t == OPT_INT);
+#if (SIZEOF_LONG != 4)
+ if ((imapopts[opt].val.i > 0x7fffffff)||
+ (imapopts[opt].val.i < -0x7fffffff)) {
+ syslog(LOG_ERR, "config_getint: %s: %lld too large for type",
+ imapopts[opt].optname, imapopts[opt].val.i);
+ }
+#endif
+ return imapopts[opt].val.i;
+}
+
+int config_getswitch(enum imapopt opt)
+{
+ assert(opt > IMAPOPT_ZERO && opt < IMAPOPT_LAST);
+ assert(imapopts[opt].t == OPT_SWITCH);
+#if (SIZEOF_LONG != 4)
+ if ((imapopts[opt].val.b > 0x7fffffff)||
+ (imapopts[opt].val.b < -0x7fffffff)) {
+ syslog(LOG_ERR, "config_getswitch: %s: %lld too large for type",
+ imapopts[opt].optname, imapopts[opt].val.b);
+ }
+#endif
+ return imapopts[opt].val.b;
+}
+
+enum enum_value config_getenum(enum imapopt opt)
+{
+ assert(opt > IMAPOPT_ZERO && opt < IMAPOPT_LAST);
+ assert(imapopts[opt].t == OPT_ENUM);
+
+ return imapopts[opt].val.e;
+}
+
+unsigned long config_getbitfield(enum imapopt opt)
+{
+ assert(opt > IMAPOPT_ZERO && opt < IMAPOPT_LAST);
+ assert(imapopts[opt].t == OPT_BITFIELD);
+
+ return imapopts[opt].val.x;
+}
+
+const char *config_getoverflowstring(const char *key, const char *def)
+{
+ char buf[256];
+ char *ret = NULL;
+
+ /* First lookup <ident>_key, to see if we have a service-specific
+ * override */
+
+ if(config_ident) {
+ if(snprintf(buf,sizeof(buf),"%s_%s",config_ident,key) == -1)
+ fatal("key too long in config_getoverflowstring", EC_TEMPFAIL);
+
+ ret = hash_lookup(buf, &confighash);
+ }
+
+ /* No service-specific override, check the actual key */
+ if(!ret)
+ ret = hash_lookup(key, &confighash);
+
+ /* Return what we got or the default */
+ return ret ? ret : def;
+}
+
+const char *config_partitiondir(const char *partition)
+{
+ char buf[80];
+
+ if(strlcpy(buf, "partition-", sizeof(buf)) >= sizeof(buf))
+ return 0;
+ if(strlcat(buf, partition, sizeof(buf)) >= sizeof(buf))
+ return 0;
+
+ return config_getoverflowstring(buf, NULL);
+}
+
+const char *config_metapartitiondir(const char *partition)
+{
+ char buf[80];
+
+ if(strlcpy(buf, "metapartition-", sizeof(buf)) >= sizeof(buf))
+ return 0;
+ if(strlcat(buf, partition, sizeof(buf)) >= sizeof(buf))
+ return 0;
+
+ return config_getoverflowstring(buf, NULL);
+}
+
+void config_read(const char *alt_config)
+{
+ enum opttype opt = IMAPOPT_ZERO;
+ char buf[4096];
+ char *p;
+
+ /* xxx this is leaked, this may be able to be better in 2.2 (cyrus_done) */
+ if(alt_config) config_filename = xstrdup(alt_config);
+ else config_filename = xstrdup(CONFIG_FILENAME);
+
+ if(!construct_hash_table(&confighash, CONFIGHASHSIZE, 1)) {
+ fatal("could not construct configuration hash table", EC_CONFIG);
+ }
+
+ if(!construct_hash_table(&includehash, INCLUDEHASHSIZE, 1)) {
+ fatal("could not construct include file hash table", EC_CONFIG);
+ }
+
+ config_read_file(config_filename);
+
+ free_hash_table(&includehash, NULL);
+
+ /* Check configdirectory config option */
+ if (!config_dir) {
+ fatal("configdirectory option not specified in configuration file",
+ EC_CONFIG);
+ }
+
+ /* Scan options to see if we need to replace {configdirectory} */
+ /* xxx need to scan overflow options as well! */
+ for(opt = IMAPOPT_ZERO; opt < IMAPOPT_LAST; opt++) {
+ if(!imapopts[opt].val.s ||
+ imapopts[opt].t != OPT_STRING ||
+ opt == IMAPOPT_CONFIGDIRECTORY) {
+ /* Skip options that have a NULL value, aren't strings, or
+ * are the configdirectory option */
+ continue;
+ }
+
+ /* We use some magic numbers here,
+ * 17 is the length of "{configdirectory}",
+ * 16 is one less than that length, so that the replacement string
+ * that is malloced has room for the '\0' */
+ if(!strncasecmp(imapopts[opt].val.s,"{configdirectory}",17)) {
+ const char *str = imapopts[opt].val.s;
+ char *newstring =
+ xmalloc(strlen(config_dir) + strlen(str) - 16);
+ char *freeme = NULL;
+
+ /* we need to replace this string, will we need to free
+ * the current value? -- only if we've actually seen it in
+ * the config file. */
+ if(imapopts[opt].seen)
+ freeme = (char *)str;
+
+ /* Build replacement string from configdirectory option */
+ strcpy(newstring, config_dir);
+ strcat(newstring, str + 17);
+
+ imapopts[opt].val.s = newstring;
+
+ if(freeme) free(freeme);
+ }
+ }
+
+ /* Look up default partition */
+ config_defpartition = config_getstring(IMAPOPT_DEFAULTPARTITION);
+ for (p = (char *)config_defpartition; *p; p++) {
+ if (!isalnum((unsigned char) *p))
+ fatal("defaultpartition option contains non-alphanumeric character",
+ EC_CONFIG);
+ if (isupper((unsigned char) *p)) *p = tolower((unsigned char) *p);
+ }
+ if ((config_need_data & CONFIG_NEED_PARTITION_DATA) &&
+ (!config_defpartition || !config_partitiondir(config_defpartition))) {
+ snprintf(buf, sizeof(buf),
+ "partition-%s option not specified in configuration file",
+ config_defpartition);
+ fatal(buf, EC_CONFIG);
+ }
+
+ /* look up mailbox hashing */
+ config_hashimapspool = config_getswitch(IMAPOPT_HASHIMAPSPOOL);
+
+ /* are we supporting virtual domains? */
+ config_virtdomains = config_getenum(IMAPOPT_VIRTDOMAINS);
+ config_defdomain = config_getstring(IMAPOPT_DEFAULTDOMAIN);
+
+ /* look up the hostname we should present to the user */
+ config_servername = config_getstring(IMAPOPT_SERVERNAME);
+ if (!config_servername) {
+ config_servername = xmalloc(sizeof(char) * 256);
+ gethostname((char *) config_servername, 256);
+ }
+
+ config_mupdate_server = config_getstring(IMAPOPT_MUPDATE_SERVER);
+
+ if (config_mupdate_server) {
+ config_mupdate_config = config_getenum(IMAPOPT_MUPDATE_CONFIG);
+ }
+}
+
+void config_read_file(const char *filename)
+{
+ FILE *infile;
+ enum opttype opt = IMAPOPT_ZERO;
+ int lineno = 0;
+ char buf[4096], errbuf[1024];
+ char *p, *q, *key, *fullkey, *srvkey, *val, *newval;
+ int service_specific;
+ int idlen = (config_ident ? strlen(config_ident) : 0);
+
+ /* read in config file */
+ infile = fopen(filename, "r");
+ if (!infile) {
+ strlcpy(buf, CYRUS_PATH, sizeof(buf));
+ strlcat(buf, filename, sizeof(buf));
+ infile = fopen(buf, "r");
+ }
+ if (!infile) {
+ snprintf(buf, sizeof(buf), "can't open configuration file %s: %s",
+ filename, error_message(errno));
+ fatal(buf, EC_CONFIG);
+ }
+
+ /* check to see if we've already read this file */
+ if (hash_lookup(filename, &includehash)) {
+ snprintf(buf, sizeof(buf), "configuration file %s included twice",
+ filename);
+ fatal(buf, EC_CONFIG);
+ return;
+ }
+ else {
+ hash_insert(filename, (void*) 0xDEADBEEF, &includehash);
+ }
+
+ while (fgets(buf, sizeof(buf), infile)) {
+ lineno++;
+
+ service_specific = 0;
+
+ if (buf[0] && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
+ for (p = buf; *p && isspace((int) *p); p++);
+ if (!*p || *p == '#') continue;
+
+ fullkey = key = p;
+ if (*p == '@') p++; /* allow @ as the first char (for directives) */
+ while (*p && (isalnum((int) *p) || *p == '-' || *p == '_')) {
+ if (isupper((unsigned char) *p)) *p = tolower((unsigned char) *p);
+ p++;
+ }
+ if (*p != ':') {
+ snprintf(errbuf, sizeof(errbuf),
+ "invalid option name on line %d of configuration file %s",
+ lineno, filename);
+ fatal(errbuf, EC_CONFIG);
+ }
+ *p++ = '\0';
+
+ while (*p && isspace((int) *p)) p++;
+
+ /* remove trailing whitespace */
+ for (q = p + strlen(p) - 1; q > p && isspace((int) *q); q--) {
+ *q = '\0';
+ }
+
+ if (!*p) {
+ snprintf(errbuf, sizeof(errbuf),
+ "empty option value on line %d of configuration file",
+ lineno);
+ fatal(errbuf, EC_CONFIG);
+ }
+
+ srvkey = NULL;
+
+ /* Look for directives */
+ if (key[0] == '@') {
+ if (!strcasecmp(key, "@include")) {
+ config_read_file(p);
+ continue;
+ }
+ else {
+ snprintf(errbuf, sizeof(errbuf),
+ "invalid directive on line %d of configuration file %s",
+ lineno, filename);
+ fatal(errbuf, EC_CONFIG);
+ }
+ }
+
+ /* Find if there is a <service>_ prefix */
+ if(config_ident && !strncasecmp(key, config_ident, idlen)
+ && key[idlen] == '_') {
+ /* skip service_ prefix */
+ srvkey = key + idlen + 1;
+ }
+
+ /* look for a service_ prefix match in imapopts */
+ if(srvkey) {
+ for (opt = IMAPOPT_ZERO; opt < IMAPOPT_LAST; opt++) {
+ if (!strcasecmp(imapopts[opt].optname, srvkey)) {
+ key = srvkey;
+ service_specific = 1;
+ break;
+ }
+ }
+ }
+
+ /* Did not find a service_ specific match, try looking for an
+ * exact match */
+ if(!service_specific) {
+ for (opt = IMAPOPT_ZERO; opt < IMAPOPT_LAST; opt++) {
+ if (!strcasecmp(imapopts[opt].optname, key)) {
+ break;
+ }
+ }
+ }
+
+ /* If both of those loops failed, it goes verbatim into the
+ * overflow hash table. */
+
+ if (opt < IMAPOPT_LAST) {
+ /* Okay, we know about this configure option.
+ * So first check that we have either
+ * 1. not seen it
+ * 2. seen its generic form, but this is a service specific form
+ *
+ * If we have already seen a service-specific form, and this is
+ * a generic form, just skip it and don't moan.
+ */
+ if((imapopts[opt].seen == 1 && !service_specific)
+ ||(imapopts[opt].seen == 2 && service_specific)) {
+ sprintf(errbuf,
+ "option '%s' was specified twice in config file (second occurance on line %d)",
+ fullkey, lineno);
+ fatal(errbuf, EC_CONFIG);
+ } else if(imapopts[opt].seen == 2 && !service_specific) {
+ continue;
+ }
+
+ /* If we've seen it already, we're replacing it, so we need
+ * to free the current string if there is one */
+ if(imapopts[opt].seen && imapopts[opt].t == OPT_STRING)
+ free((char *)imapopts[opt].val.s);
+
+ if(service_specific)
+ imapopts[opt].seen = 2;
+ else
+ imapopts[opt].seen = 1;
+
+ /* this is a known option */
+ switch (imapopts[opt].t) {
+ case OPT_STRING:
+ {
+ imapopts[opt].val.s = xstrdup(p);
+
+ if(opt == IMAPOPT_CONFIGDIRECTORY)
+ config_dir = imapopts[opt].val.s;
+
+ break;
+ }
+ case OPT_INT:
+ {
+ long val;
+ char *ptr;
+
+ val = strtol(p, &ptr, 0);
+ if (!ptr || *ptr != '\0') {
+ /* error during conversion */
+ sprintf(errbuf, "non-integer value for %s in line %d",
+ imapopts[opt].optname, lineno);
+ fatal(errbuf, EC_CONFIG);
+ }
+
+ imapopts[opt].val.i = val;
+ break;
+ }
+ case OPT_SWITCH:
+ {
+ if (*p == '0' || *p == 'n' ||
+ (*p == 'o' && p[1] == 'f') || *p == 'f') {
+ imapopts[opt].val.b = 0;
+ }
+ else if (*p == '1' || *p == 'y' ||
+ (*p == 'o' && p[1] == 'n') || *p == 't') {
+ imapopts[opt].val.b = 1;
+ }
+ else {
+ /* error during conversion */
+ sprintf(errbuf, "non-switch value for %s in line %d",
+ imapopts[opt].optname, lineno);
+ fatal(errbuf, EC_CONFIG);
+ }
+ break;
+ }
+ case OPT_ENUM:
+ case OPT_STRINGLIST:
+ case OPT_BITFIELD:
+ {
+ const struct enum_option_s *e;
+
+ /* zero the value */
+ memset(&imapopts[opt].val, 0, sizeof(imapopts[opt].val));
+
+ /* q is already at EOS so we'll process entire the string
+ as one value unless told otherwise */
+
+ if (imapopts[opt].t == OPT_ENUM) {
+ /* normalize on/off values */
+ if (!strcmp(p, "1") || !strcmp(p, "yes") ||
+ !strcmp(p, "t") || !strcmp(p, "true")) {
+ p = "on";
+ } else if (!strcmp(p, "0") || !strcmp(p, "no") ||
+ !strcmp(p, "f") || !strcmp(p, "false")) {
+ p = "off";
+ }
+ } else if (imapopts[opt].t == OPT_BITFIELD) {
+ /* split the string into separate values */
+ q = p;
+ }
+
+ while (*p) {
+ /* find the end of the first value */
+ for (; *q && !isspace((int) *q); q++);
+ if (*q) *q++ = '\0';
+
+ /* see if its a legal value */
+ for (e = imapopts[opt].enum_options;
+ e->name && strcmp(e->name, p); e++);
+
+ if (!e->name) {
+ /* error during conversion */
+ sprintf(errbuf, "invalid value '%s' for %s in line %d",
+ p, imapopts[opt].optname, lineno);
+ fatal(errbuf, EC_CONFIG);
+ }
+ else if (imapopts[opt].t == OPT_STRINGLIST)
+ imapopts[opt].val.s = e->name;
+ else if (imapopts[opt].t == OPT_ENUM)
+ imapopts[opt].val.e = e->val;
+ else
+ imapopts[opt].val.x |= e->val;
+
+ /* find the start of the next value */
+ for (p = q; *p && isspace((int) *p); p++);
+ }
+
+ break;
+ }
+ case OPT_NOTOPT:
+ default:
+ abort();
+ }
+ } else {
+ /* check to make sure it's valid for overflow */
+ /* that is, partition names and anything that might be
+ * used by SASL */
+/*
+ xxx this would be nice if it wasn't for other services who might be
+ sharing this config file and whose names we cannot predict
+
+ if(strncasecmp(key,"sasl_",5)
+ && strncasecmp(key,"partition-",10)) {
+ sprintf(errbuf,
+ "option '%s' is unknown on line %d of config file",
+ fullkey, lineno);
+ fatal(errbuf, EC_CONFIG);
+ }
+*/
+
+ /* Put it in the overflow hash table */
+ newval = xstrdup(p);
+ val = hash_insert(key, newval, &confighash);
+ if(val != newval) {
+ snprintf(errbuf, sizeof(errbuf),
+ "option '%s' was specified twice in config file (second occurance on line %d)",
+ fullkey, lineno);
+ fatal(errbuf, EC_CONFIG);
+ }
+ }
+ }
+ fclose(infile);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libconfig.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,80 @@
+/* libconfig.h -- Header for imapd.conf processing
+ * $Id: libconfig.h,v 1.2.2.8 2005/02/20 03:23:45 shadow Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_LIBCONFIG_H
+#define INCLUDED_LIBCONFIG_H
+
+#include "exitcodes.h"
+#include "imapopts.h"
+
+/* these will assert() if they're called on the wrong type of
+ option (imapopts.c) */
+extern void config_read(const char *alt_config);
+extern const char *config_getstring(enum imapopt opt);
+extern int config_getint(enum imapopt opt);
+extern int config_getswitch(enum imapopt opt);
+extern enum enum_value config_getenum(enum imapopt opt);
+extern unsigned long config_getbitfield(enum imapopt opt);
+
+/* these work on additional strings that are not defined in the
+ * imapoptions table */
+extern const char *config_getoverflowstring(const char *key, const char *def);
+extern const char *config_partitiondir(const char *partition);
+extern const char *config_metapartitiondir(const char *partition);
+
+/* cached configuration variables accessable to external world */
+extern const char *config_filename;
+extern const char *config_dir;
+extern const char *config_defpartition;
+extern const char *config_servername;
+extern const char *config_mupdate_server;
+extern const char *config_defdomain;
+extern const char *config_ident;
+extern int config_hashimapspool;
+extern int config_implicitrights;
+extern enum enum_value config_virtdomains;
+extern enum enum_value config_mupdate_config;
+
+/* config requirement flags */
+#define CONFIG_NEED_PARTITION_DATA (1<<0)
+
+#endif /* INCLUDED_LIBCONFIG_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,203 @@
+/* libcyr_cfg.c -- configuration interface to libcyrus
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: libcyr_cfg.c,v 1.2.2.12 2005/12/13 19:36:12 murch Exp $
+ */
+
+#include <config.h>
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <syslog.h>
+
+#include "libcyr_cfg.h"
+#include "cyrusdb.h"
+
+#if defined(__GNUC__) && __GNUC__ > 1
+/* We can use the GCC union constructor extension */
+#define CFGVAL(t,v) (union cyrus_config_value)((t)(v))
+#else
+#define CFGVAL(t,v) {(void *)(v)}
+#endif
+
+struct cyrusopt_s cyrus_options[] = {
+ { CYRUSOPT_ZERO, { NULL }, CYRUS_OPT_NOTOPT },
+
+ { CYRUSOPT_AUTH_UNIX_GROUP_ENABLE,
+ CFGVAL(long, 1),
+ CYRUS_OPT_SWITCH },
+
+ { CYRUSOPT_USERNAME_TOLOWER,
+ CFGVAL(long, 0),
+ CYRUS_OPT_SWITCH },
+
+ { CYRUSOPT_SKIPLIST_UNSAFE,
+ CFGVAL(long, 0),
+ CYRUS_OPT_SWITCH },
+
+ { CYRUSOPT_TEMP_PATH,
+ CFGVAL(const char *, "/tmp"),
+ CYRUS_OPT_STRING },
+
+ { CYRUSOPT_PTS_CACHE_TIMEOUT,
+ CFGVAL(long, 3 * 60 * 60), /* 3 hours */
+ CYRUS_OPT_INT },
+
+ { CYRUSOPT_CONFIG_DIR,
+ CFGVAL(const char *, "/var/imap"),
+ CYRUS_OPT_STRING },
+
+ { CYRUSOPT_DB_INIT_FLAGS,
+ CFGVAL(long, 0),
+ CYRUS_OPT_INT },
+
+ { CYRUSOPT_FULLDIRHASH,
+ CFGVAL(long, 0),
+ CYRUS_OPT_SWITCH },
+
+ { CYRUSOPT_PTSCACHE_DB,
+ CFGVAL(const char *, "berkeley"),
+ CYRUS_OPT_STRING },
+
+ { CYRUSOPT_PTLOADER_SOCK,
+ CFGVAL(const char *, NULL),
+ CYRUS_OPT_STRING },
+
+ { CYRUSOPT_VIRTDOMAINS,
+ CFGVAL(long, 0),
+ CYRUS_OPT_SWITCH },
+
+ { CYRUSOPT_BERKELEY_CACHESIZE,
+ CFGVAL(long, 512 * 1024), /* 512KB */
+ CYRUS_OPT_INT },
+
+ { CYRUSOPT_AUTH_MECH,
+ CFGVAL(const char *, "unix"),
+ CYRUS_OPT_STRING },
+
+ { CYRUSOPT_BERKELEY_LOCKS_MAX,
+ CFGVAL(long, 50000),
+ CYRUS_OPT_INT },
+
+ { CYRUSOPT_BERKELEY_TXNS_MAX,
+ CFGVAL(long, 100),
+ CYRUS_OPT_INT },
+
+ { CYRUSOPT_DELETERIGHT,
+ CFGVAL(const char *, "c"),
+ CYRUS_OPT_STRING },
+
+ { CYRUSOPT_LAST, { NULL }, CYRUS_OPT_NOTOPT }
+};
+
+const char *libcyrus_config_getstring(enum cyrus_opt opt)
+{
+ assert(opt > CYRUSOPT_ZERO && opt < CYRUSOPT_LAST);
+ assert(cyrus_options[opt].opt == opt);
+ assert(cyrus_options[opt].t == CYRUS_OPT_STRING);
+
+ return cyrus_options[opt].val.s;
+}
+
+int libcyrus_config_getint(enum cyrus_opt opt)
+{
+ assert(opt > CYRUSOPT_ZERO && opt < CYRUSOPT_LAST);
+ assert(cyrus_options[opt].opt == opt);
+ assert(cyrus_options[opt].t == CYRUS_OPT_INT);
+#if (SIZEOF_LONG != 4)
+ if ((cyrus_options[opt].val.i > 0x7fffffff)||(cyrus_options[opt].val.i < -0x7fffffff)) {
+ syslog(LOG_ERR, "libcyrus_config_getint: option %d: %lld too large for type", cyrus_options[opt].opt, cyrus_options[opt].val.i);
+ }
+#endif
+ return cyrus_options[opt].val.i;
+}
+
+int libcyrus_config_getswitch(enum cyrus_opt opt)
+{
+ assert(opt > CYRUSOPT_ZERO && opt < CYRUSOPT_LAST);
+ assert(cyrus_options[opt].opt == opt);
+ assert(cyrus_options[opt].t == CYRUS_OPT_SWITCH);
+#if (SIZEOF_LONG != 4)
+ if ((cyrus_options[opt].val.b > 0x7fffffff)||(cyrus_options[opt].val.b < -0x7fffffff)) {
+ syslog(LOG_ERR, "libcyrus_config_getswitch: option %d: %lld too large for type", cyrus_options[opt].opt, cyrus_options[opt].val.b);
+ }
+#endif
+ return cyrus_options[opt].val.b;
+}
+
+void libcyrus_config_setstring(enum cyrus_opt opt, const char *val)
+{
+ assert(opt > CYRUSOPT_ZERO && opt < CYRUSOPT_LAST);
+ assert(cyrus_options[opt].opt == opt);
+ assert(cyrus_options[opt].t == CYRUS_OPT_STRING);
+
+ cyrus_options[opt].val.s = val;
+}
+
+void libcyrus_config_setint(enum cyrus_opt opt, int val)
+{
+ assert(opt > CYRUSOPT_ZERO && opt < CYRUSOPT_LAST);
+ assert(cyrus_options[opt].opt == opt);
+ assert(cyrus_options[opt].t == CYRUS_OPT_INT);
+
+ cyrus_options[opt].val.i = val;
+}
+
+void libcyrus_config_setswitch(enum cyrus_opt opt, int val)
+{
+ assert(opt > CYRUSOPT_ZERO && opt < CYRUSOPT_LAST);
+ assert(cyrus_options[opt].opt == opt);
+ assert(cyrus_options[opt].t == CYRUS_OPT_SWITCH);
+
+ cyrus_options[opt].val.b = val;
+}
+
+void libcyrus_init()
+{
+ cyrusdb_init();
+}
+
+void libcyrus_done()
+{
+ cyrusdb_done();
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/libcyr_cfg.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,136 @@
+/* libcyr_cfg.h -- configuration interface to libcyrus
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: libcyr_cfg.h,v 1.2.2.9 2005/12/13 19:36:12 murch Exp $
+ */
+
+#ifndef INCLUDED_LIBCYR_CFG_H
+#define INCLUDED_LIBCYR_CFG_H
+
+#include <config.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/* This is basically a simplified version of the configuration system
+ * that is used for the application level of Cyrus IMAPd */
+
+enum cyrus_opttype {
+ CYRUS_OPT_NOTOPT,
+ CYRUS_OPT_STRING,
+ CYRUS_OPT_INT,
+ CYRUS_OPT_SWITCH
+};
+
+enum cyrus_opt {
+
+ CYRUSOPT_ZERO = 0,
+
+ /* Use unix groups with auth_unix? (ON) */
+ CYRUSOPT_AUTH_UNIX_GROUP_ENABLE,
+ /* Lowercase usernames? (OFF) */
+ CYRUSOPT_USERNAME_TOLOWER,
+ /* Don't fsync() the skiplist backend (OFF) */
+ CYRUSOPT_SKIPLIST_UNSAFE,
+ /* Temporary Storage Directory ("/tmp") */
+ CYRUSOPT_TEMP_PATH,
+ /* PTS Cache Timeout */
+ CYRUSOPT_PTS_CACHE_TIMEOUT,
+ /* IMAPd config directory */
+ CYRUSOPT_CONFIG_DIR,
+ /* CyrusDB INIT flags */
+ CYRUSOPT_DB_INIT_FLAGS,
+ /* Full directory hashing (OFF) */
+ CYRUSOPT_FULLDIRHASH,
+ /* Database for use by AUTH_PTS */
+ CYRUSOPT_PTSCACHE_DB,
+ /* ptloader socket for use by AUTH_PTS */
+ CYRUSOPT_PTLOADER_SOCK,
+ /* Virtual Domains (OFF) */
+ CYRUSOPT_VIRTDOMAINS,
+ /* BDB cache size (512KB) */
+ CYRUSOPT_BERKELEY_CACHESIZE,
+ /* authorization mechanism (unix) */
+ CYRUSOPT_AUTH_MECH,
+ /* BDB max locks (50000) */
+ CYRUSOPT_BERKELEY_LOCKS_MAX,
+ /* BDB max txns (100) */
+ CYRUSOPT_BERKELEY_TXNS_MAX,
+ /* RFC 2086 right which allows DELETE ("c") */
+ CYRUSOPT_DELETERIGHT,
+
+ CYRUSOPT_LAST
+
+};
+
+union cyrus_config_value {
+ const char *s; /* string */
+ long i; /* int */
+ long b; /* switch */
+};
+
+struct cyrusopt_s {
+ const enum cyrus_opt opt;
+ union cyrus_config_value val;
+ const enum cyrus_opttype t;
+};
+
+/* these will assert() if they're called on the wrong type of
+ option (imapopt.c) */
+extern const char *libcyrus_config_getstring(enum cyrus_opt opt);
+extern int libcyrus_config_getint(enum cyrus_opt opt);
+extern int libcyrus_config_getswitch(enum cyrus_opt opt);
+
+void libcyrus_config_setstring(enum cyrus_opt opt, const char *val);
+void libcyrus_config_setint(enum cyrus_opt opt, int val);
+void libcyrus_config_setswitch(enum cyrus_opt opt, int val);
+
+/* Start/Stop the Library */
+/* Should be done AFTER setting configuration options */
+void libcyrus_init();
+void libcyrus_done();
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,66 @@
+/* lock.h -- file locking primitives
+ $Id: lock.h,v 1.7 2003/02/13 20:15:40 rjs3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_LOCK_H
+#define INCLUDED_LOCK_H
+
+#ifndef P
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+#endif
+
+#include <sys/stat.h>
+
+extern const char *lock_method_desc;
+
+extern int lock_reopen P((int fd, const char *filename,
+ struct stat *sbuf, const char **failaction));
+
+extern int lock_blocking P((int fd));
+extern int lock_shared P((int fd));
+extern int lock_nonblocking P((int fd));
+extern int lock_unlock P((int fd));
+
+#endif /* INCLUDED_LOCK_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_fcntl.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_fcntl.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_fcntl.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_fcntl.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,213 @@
+/* lock_fcntl.c -- Lock files using fcntl()
+ $Id: lock_fcntl.c,v 1.16 2003/02/13 20:15:40 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "lock.h"
+
+const char *lock_method_desc = "fcntl";
+
+/*
+ * Block until we obtain an exclusive lock on the file descriptor 'fd',
+ * opened for reading and writing on the file named 'filename'. If
+ * 'filename' is replaced, will re-open it as 'fd' and acquire a lock
+ * on the new file.
+ *
+ * On success, returns 0. If a pointer to a struct stat is given as
+ * 'sbuf', it is filled in.
+ *
+ * On failure, returns -1 with an error code in errno. If
+ * 'failaction' is provided, it is filled in with a pointer to a fixed
+ * string naming the action that failed.
+ *
+ */
+int lock_reopen(fd, filename, sbuf, failaction)
+int fd;
+const char *filename;
+struct stat *sbuf;
+const char **failaction;
+{
+ int r;
+ struct flock fl;
+ struct stat sbuffile, sbufspare;
+ int newfd;
+
+ if (!sbuf) sbuf = &sbufspare;
+
+ for (;;) {
+ fl.l_type= F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
+ if (r == -1) {
+ if (errno == EINTR) continue;
+ if (failaction) *failaction = "locking";
+ return -1;
+ }
+
+ fstat(fd, sbuf);
+ r = stat(filename, &sbuffile);
+ if (r == -1) {
+ if (failaction) *failaction = "stating";
+ fl.l_type= F_UNLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
+ return -1;
+ }
+
+ if (sbuf->st_ino == sbuffile.st_ino) return 0;
+
+ newfd = open(filename, O_RDWR);
+ if (newfd == -1) {
+ if (failaction) *failaction = "opening";
+ fl.l_type= F_UNLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
+ return -1;
+ }
+ dup2(newfd, fd);
+ close(newfd);
+ }
+}
+
+/*
+ * Obtain an exclusive lock on 'fd'.
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+int lock_blocking(fd)
+int fd;
+{
+ int r;
+ struct flock fl;
+
+ for (;;) {
+ fl.l_type= F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+ return -1;
+ }
+}
+
+/*
+ * Obtain a shared lock on 'fd'.
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+int lock_shared(fd)
+int fd;
+{
+ int r;
+ struct flock fl;
+
+ for (;;) {
+ fl.l_type= F_RDLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLKW, &fl);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+ return -1;
+ }
+}
+
+/*
+ * Attempt to get an exclusive lock on 'fd' without blocking.
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+int lock_nonblocking(fd)
+int fd;
+{
+ int r;
+ struct flock fl;
+
+ for (;;) {
+ fl.l_type= F_WRLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ r = fcntl(fd, F_SETLK, &fl);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+ return -1;
+ }
+}
+
+/*
+ * Release any lock on 'fd'. Always returns success.
+ */
+int lock_unlock(int fd)
+{
+ struct flock fl;
+ int r;
+
+ fl.l_type= F_UNLCK;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+
+ for (;;) {
+ r = fcntl(fd, F_SETLKW, &fl);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+ /* xxx help! */
+ return -1;
+ }
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_flock.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_flock.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_flock.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lock_flock.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,181 @@
+/* lock_flock.c -- Lock files using flock()
+ $Id: lock_flock.c,v 1.15 2003/02/13 20:15:41 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+#include <sys/file.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "lock.h"
+
+const char *lock_method_desc = "flock";
+
+/*
+ * Block until we obtain an exclusive lock on the file descriptor 'fd',
+ * opened for reading and writing on the file named 'filename'. If
+ * 'filename' is replaced, will re-open it as 'fd' and acquire a lock
+ * on the new file.
+ *
+ * On success, returns 0. If a pointer to a struct stat is given as
+ * 'sbuf', it is filled in.
+ *
+ * On failure, returns -1 with an error code in errno. If
+ * 'failaction' is provided, it is filled in with a pointer to a fixed
+ * string naming the action that failed.
+ *
+ */
+int lock_reopen(fd, filename, sbuf, failaction)
+int fd;
+const char *filename;
+struct stat *sbuf;
+const char **failaction;
+{
+ int r;
+ struct stat sbuffile, sbufspare;
+ int newfd;
+
+ if (!sbuf) sbuf = &sbufspare;
+
+ for (;;) {
+ r = flock(fd, LOCK_EX);
+ if (r == -1) {
+ if (errno == EINTR) continue;
+ if (failaction) *failaction = "locking";
+ return -1;
+ }
+
+ fstat(fd, sbuf);
+ r = stat(filename, &sbuffile);
+ if (r == -1) {
+ if (failaction) *failaction = "stating";
+ flock(fd, LOCK_UN);
+ return -1;
+ }
+
+ if (sbuf->st_ino == sbuffile.st_ino) return 0;
+
+ newfd = open(filename, O_RDWR);
+ if (newfd == -1) {
+ if (failaction) *failaction = "opening";
+ flock(fd, LOCK_UN);
+ return -1;
+ }
+ dup2(newfd, fd);
+ close(newfd);
+ }
+}
+
+/*
+ * Obtain an exclusive lock on 'fd'.
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+int lock_blocking(fd)
+int fd;
+{
+ int r;
+
+ for (;;) {
+ r = flock(fd, LOCK_EX);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+ return -1;
+ }
+}
+
+/*
+ * Obtain a shared lock on 'fd'.
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+int lock_shared(fd)
+int fd;
+{
+ int r;
+
+ for (;;) {
+ r = flock(fd, LOCK_SH);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+ return -1;
+ }
+}
+
+/*
+ * Attempt to get an exclusive lock on 'fd' without blocking.
+ * Returns 0 for success, -1 for failure, with errno set to an
+ * appropriate error code.
+ */
+int lock_nonblocking(fd)
+int fd;
+{
+ int r;
+
+ for (;;) {
+ r = flock(fd, LOCK_EX|LOCK_NB);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+ return -1;
+ }
+}
+
+/*
+ * Release any lock on 'fd'. Always returns success.
+ */
+int lock_unlock(int fd)
+{
+ int r;
+
+ for (;;) {
+ r = flock(fd, LOCK_UN);
+ if (r != -1) return 0;
+ if (errno == EINTR) continue;
+ /* xxx help! */
+ return -1;
+ }
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,76 @@
+/* lsort.c -- linked list (merge) sort
+ *
+ * public domain code by Ray Gardner.
+ *
+ * Modified by Ken Murchison to use getnext(), setnext() and call_data
+ * parameters.
+ */
+
+/* $Id: lsort.c,v 1.2 2002/05/25 19:57:47 leg Exp $ */
+
+#include "lsort.h"
+#include <stdlib.h>
+
+/* merge two sorted lists */
+static void *lmerge(void *p, void *q,
+ void *(*getnext)(void *),
+ void (*setnext)(void *, void *),
+ int (*compar)(void *, void *, void *),
+ void *call_data)
+{
+ void *r, *m;
+
+ /* the lowest item in p/q starts the new list */
+ if (compar(p, q, call_data) < 0) {
+ m = r = p;
+ p = getnext(p);
+ }
+ else {
+ m = r = q;
+ q = getnext(q);
+ }
+
+ /* merge the rest of p/q */
+ while (p && q) {
+ if (compar(p, q, call_data) < 0) {
+ setnext(r, p);
+ r = p;
+ p = getnext(p);
+ }
+ else {
+ setnext(r, q);
+ r = q;
+ q = getnext(q);
+ }
+ }
+
+ /* tack remainder of p/q onto the end */
+ setnext(r, p ? p : q);
+
+ return m;
+}
+
+void *lsort(void *p,
+ void *(*getnext)(void *),
+ void (*setnext)(void *, void *),
+ int (*compar)(void *, void *, void *),
+ void *call_data)
+{
+ void *q, *r;
+
+ if (p) {
+ /* split list in half */
+ q = p;
+ for (r = getnext(q); r && (r = getnext(r)) != NULL; r = getnext(r))
+ q = getnext(q);
+ r = getnext(q);
+ setnext(q, NULL);
+
+ /* sort each half recursively and merge the results */
+ if (r)
+ p = lmerge(lsort(p, getnext, setnext, compar, call_data),
+ lsort(r, getnext, setnext, compar, call_data),
+ getnext, setnext, compar, call_data);
+ }
+ return p;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/lsort.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,25 @@
+/* lsort.h -- linked list (merge) sort
+ */
+
+/* $Id: lsort.h,v 1.2 2002/05/25 19:57:47 leg Exp $ */
+
+#ifndef INCLUDED_LSORT_H
+#define INCLUDED_LSORT_H
+
+/*
+ * returns: head of the sorted list
+ *
+ * list: head of the linked list
+ * getnext: function that returns the next node of the given node
+ * setnext: function that sets the next node of the first arg to the second arg
+ * compar: function that compares two nodes (first two args). The third arg
+ * is a pointer to user data that may be used in comparing the nodes
+ * call_data: pointer to user data that is passed to compar()
+ */
+extern void *lsort(void *list,
+ void *(*getnext)(void *),
+ void (*setnext)(void *, void *),
+ int (*compar)(void *, void *, void *),
+ void *call_data);
+
+#endif /* INCLUDED_LSORT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+/* map.h -- memory mapping functions
+ * $Id: map.h,v 1.12 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_MAP_H
+#define INCLUDED_MAP_H
+
+#define MAP_UNKNOWN_LEN ((unsigned long)-1)
+
+extern const char *map_method_desc;
+
+/* Create a memory map
+ *
+ * fd is the file descriptor which is to be mapped
+ * onceonly is set to be nonzero if you do not intend to ever refresh the map
+ * base and len are output parameters that receive the address and length
+ * of the map once it is created. NOTE: *len should be zero the first
+ * time map_refresh() is called to force the initial mapping
+ * newlen is set to the size of the file, or MAP_UNKNOWN_LEN to have the
+ * mapping facility compute it for you.
+ * name and mboxname are used for logging purposes, name is the name
+ * of the file, and shouldn't be NULL, while mboxname is the name
+ * of the applicable mailbox (if any), and may be NULL
+ */
+extern void map_refresh(int fd, int onceonly, const char **base,
+ unsigned long *len, unsigned long newlen,
+ const char *name, const char *mboxname);
+
+/* map_free will free a memory map allocated by map_refresh
+ *
+ * base and len are the same values that were passed to map_refresh */
+extern void map_free(const char **base, unsigned long *len);
+
+#endif /* INCLUDED_MAP_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_nommap.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_nommap.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_nommap.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_nommap.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,130 @@
+/* map_nommap.c -- dummy memory-mapping routines.
+ * $Id: map_nommap.c,v 1.23 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <syslog.h>
+
+#include "xmalloc.h"
+#include "map.h"
+#include "exitcodes.h"
+
+#define SLOP (4*1024)
+
+const char *map_method_desc = "nommap";
+
+/*
+ * Create/refresh mapping of file
+ */
+void
+map_refresh(fd, onceonly, base, len, newlen, name, mboxname)
+int fd;
+int onceonly;
+const char **base;
+unsigned long *len;
+unsigned long newlen;
+const char *name;
+const char *mboxname;
+{
+ char *p;
+ int n, left;
+ struct stat sbuf;
+ char buf[80];
+
+ if (newlen == MAP_UNKNOWN_LEN) {
+ if (fstat(fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating %s file%s%s: %m", name,
+ mboxname ? " for " : "", mboxname ? mboxname : "");
+ snprintf(buf, sizeof(buf), "failed to fstat %s file", name);
+ fatal(buf, EC_IOERR);
+ }
+ newlen = sbuf.st_size;
+ }
+
+ /* Need a larger buffer */
+ if (*len < newlen) {
+ if (*len) free((char *)*base);
+ *len = newlen + (onceonly ? 0 : SLOP);
+ *base = xmalloc(*len);
+ }
+
+ lseek(fd, 0L, 0);
+ left = newlen;
+ p = (char*) *base;
+
+ while (left) {
+ n = read(fd, p, left);
+ if (n <= 0) {
+ if (n == 0) {
+ syslog(LOG_ERR, "IOERROR: reading %s file%s%s: end of file",
+ name,
+ mboxname ? " for " : "", mboxname ? mboxname : "");
+ }
+ else {
+ syslog(LOG_ERR, "IOERROR: reading %s file%s%s: %m",
+ name,
+ mboxname ? " for " : "", mboxname ? mboxname : "");
+ }
+ snprintf(buf, sizeof(buf), "failed to read %s file", name);
+ fatal(buf, EC_IOERR);
+ }
+ p += n;
+ left -= n;
+ }
+}
+
+/*
+ * Destroy mapping of file
+ */
+void
+map_free(base, len)
+const char **base;
+unsigned long *len;
+{
+ if (*len) free((char *)*base);
+ *base = 0;
+ *len = 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_shared.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_shared.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_shared.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_shared.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,121 @@
+/* map_shared.c -- memory-mapping routines.
+ * $Id: map_shared.c,v 1.21 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+#include <config.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <syslog.h>
+
+#include "map.h"
+#include "exitcodes.h"
+#include "xmalloc.h"
+
+#define SLOP (8*1024)
+
+const char *map_method_desc = "shared";
+
+/*
+ * Create/refresh mapping of file
+ */
+void
+map_refresh(fd, onceonly, base, len, newlen, name, mboxname)
+int fd;
+int onceonly;
+const char **base;
+unsigned long *len;
+unsigned long newlen;
+const char *name;
+const char *mboxname;
+{
+ struct stat sbuf;
+ char buf[80];
+
+ if (newlen == MAP_UNKNOWN_LEN) {
+ if (fstat(fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating %s file%s%s: %m", name,
+ mboxname ? " for " : "", mboxname ? mboxname : "");
+ snprintf(buf, sizeof(buf), "failed to fstat %s file", name);
+ fatal(buf, EC_IOERR);
+ }
+ newlen = sbuf.st_size;
+ }
+
+ /* Already mapped in */
+ if (*len >= newlen) return;
+
+ if (*len) munmap((char *)*base, *len);
+
+ if (!onceonly) {
+ newlen = (newlen + 2*SLOP - 1) & ~(SLOP-1);
+ }
+
+ *base = (char *)mmap((caddr_t)0, newlen, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+ , fd, 0L);
+ if (*base == (char *)-1) {
+ syslog(LOG_ERR, "IOERROR: mapping %s file%s%s: %m", name,
+ mboxname ? " for " : "", mboxname ? mboxname : "");
+ snprintf(buf, sizeof(buf), "failed to mmap %s file", name);
+ fatal(buf, EC_IOERR);
+ }
+ *len = newlen;
+}
+
+/*
+ * Destroy mapping of file
+ */
+void
+map_free(base, len)
+const char **base;
+unsigned long *len;
+{
+ if (*len) munmap((char *)*base, *len);
+ *base = 0;
+ *len = 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_stupidshared.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_stupidshared.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_stupidshared.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/map_stupidshared.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,119 @@
+/* map_stupidshared.c -- memory-mapping routines working around DEC stupidity.
+ *
+ * This file is like map_shared.c, but doesn't use any "SLOP", since
+ * "Digital Unix" doesn't permit mapping a region past the end of a file.
+ *
+ * $Id: map_stupidshared.c,v 1.14 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <syslog.h>
+
+#include "map.h"
+#include "exitcodes.h"
+
+const char *map_method_desc = "stupidshared";
+
+/*
+ * Create/refresh mapping of file
+ */
+void
+map_refresh(fd, onceonly, base, len, newlen, name, mboxname)
+int fd;
+int onceonly;
+const char **base;
+unsigned long *len;
+unsigned long newlen;
+const char *name;
+const char *mboxname;
+{
+ struct stat sbuf;
+ char buf[80];
+
+ if (newlen == MAP_UNKNOWN_LEN) {
+ if (fstat(fd, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating %s file%s%s: %m", name,
+ mboxname ? " for " : "", mboxname ? mboxname : "");
+ snprintf(buf, sizeof(buf), "failed to fstat %s file", name);
+ fatal(buf, EC_IOERR);
+ }
+ newlen = sbuf.st_size;
+ }
+
+ /* Already mapped in */
+ if (*len >= newlen) return;
+
+ if (*len) munmap((char *)*base, *len);
+
+ *base = (char *)mmap((caddr_t)0, newlen, PROT_READ, MAP_SHARED
+#ifdef MAP_FILE
+| MAP_FILE
+#endif
+#ifdef MAP_VARIABLE
+| MAP_VARIABLE
+#endif
+ , fd, 0L);
+ if (*base == (char *)-1) {
+ syslog(LOG_ERR, "IOERROR: mapping %s file%s%s: %m", name,
+ mboxname ? " for " : "", mboxname ? mboxname : "");
+ snprintf(buf, sizeof(buf), "failed to mmap %s file", name);
+ fatal(buf, EC_IOERR);
+ }
+ *len = newlen;
+}
+
+/*
+ * Destroy mapping of file
+ */
+void
+map_free(base, len)
+const char **base;
+unsigned long *len;
+{
+ if (*len) munmap((char *)*base, *len);
+ *base = 0;
+ *len = 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,535 @@
+/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
+*/
+
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+rights reserved.
+
+License to copy and use this software is granted provided that it
+is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+Algorithm" in all material mentioning or referencing this software
+or this function.
+
+License is also granted to make and use derivative works provided
+that such works are identified as "derived from the RSA Data
+Security, Inc. MD5 Message-Digest Algorithm" in all material
+mentioning or referencing the derived work.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+*/
+
+/* do i need all of this just for htonl()? damn. */
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#include "md5global.h"
+#include "md5.h"
+#include "hmac-md5.h"
+
+/* Constants for MD5Transform routine.
+*/
+
+#define S11 7
+#define S12 12
+#define S13 17
+#define S14 22
+#define S21 5
+#define S22 9
+#define S23 14
+#define S24 20
+#define S31 4
+#define S32 11
+#define S33 16
+#define S34 23
+#define S41 6
+#define S42 10
+#define S43 15
+#define S44 21
+
+static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
+static void Encode PROTO_LIST
+ ((unsigned char *, UINT4 *, unsigned int));
+static void Decode PROTO_LIST
+ ((UINT4 *, unsigned char *, unsigned int));
+static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
+static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
+
+static unsigned char PADDING[64] = {
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/* F, G, H and I are basic MD5 functions.
+
+ */
+#ifdef I
+/* This might be defined via NANA */
+#undef I
+#endif
+
+#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
+#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+#define I(x, y, z) ((y) ^ ((x) | (~z)))
+
+/* ROTATE_LEFT rotates x left n bits.
+
+ */
+
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+
+/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
+Rotation is separate from addition to prevent recomputation.
+*/
+
+#define FF(a, b, c, d, x, s, ac) { (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
+#define GG(a, b, c, d, x, s, ac) { (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
+#define HH(a, b, c, d, x, s, ac) { (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
+#define II(a, b, c, d, x, s, ac) { (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
+
+/* MD5 initialization. Begins an MD5 operation, writing a new context.
+*/
+
+void MD5Init (context)
+MD5_CTX *context; /* context */
+{
+ context->count[0] = context->count[1] = 0;
+
+ /* Load magic initialization constants.
+
+*/
+ context->state[0] = 0x67452301;
+ context->state[1] = 0xefcdab89;
+ context->state[2] = 0x98badcfe;
+ context->state[3] = 0x10325476;
+}
+
+/* MD5 block update operation. Continues an MD5 message-digest
+ operation, processing another message block, and updating the context.
+*/
+
+void MD5Update (context, input, inputLen)
+MD5_CTX *context; /* context */
+unsigned char *input; /* input block */
+unsigned int inputLen; /* length of input block */
+{
+ unsigned int i, index, partLen;
+
+ /* Compute number of bytes mod 64 */
+ index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+
+ /* Update number of bits */
+ if ((context->count[0] += ((UINT4)inputLen << 3))
+ < ((UINT4)inputLen << 3))
+ context->count[1]++;
+ context->count[1] += ((UINT4)inputLen >> 29);
+
+ partLen = 64 - index;
+
+ /* Transform as many times as possible.
+
+*/
+ if (inputLen >= partLen) {
+ MD5_memcpy
+ ((POINTER)&context->buffer[index], (POINTER)input, partLen); MD5Transform
+ (context->state, context->buffer);
+
+ for (i = partLen; i + 63 < inputLen; i += 64)
+ MD5Transform (context->state, &input[i]);
+
+ index = 0;
+ }
+ else
+ i = 0;
+
+ /* Buffer remaining input */
+ MD5_memcpy
+ ((POINTER)&context->buffer[index], (POINTER)&input[i],
+ inputLen-i);
+
+}
+
+/* MD5 finalization. Ends an MD5 message-digest operation, writing the
+ the message digest and zeroizing the context.
+
+ */
+
+void MD5Final (digest, context)
+unsigned char digest[16]; /* message digest */
+MD5_CTX *context; /* context */
+{
+ unsigned char bits[8];
+ unsigned int index, padLen;
+
+ /* Save number of bits */
+ Encode (bits, context->count, 8);
+
+ /* Pad out to 56 mod 64.
+
+*/
+ index = (unsigned int)((context->count[0] >> 3) & 0x3f);
+ padLen = (index < 56) ? (56 - index) : (120 - index);
+ MD5Update (context, PADDING, padLen);
+
+ /* Append length (before padding) */
+ MD5Update (context, bits, 8);
+
+ /* Store state in digest */
+ Encode (digest, context->state, 16);
+
+ /* Zeroize sensitive information.
+
+*/
+ MD5_memset ((POINTER)context, 0, sizeof (*context));
+}
+
+/* MD5 basic transformation. Transforms state based on block.
+
+ */
+
+static void MD5Transform (state, block)
+UINT4 state[4];
+unsigned char block[64];
+{
+ UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+
+ Decode (x, block, 64);
+
+ /* Round 1 */
+ FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
+ FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
+ FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
+ FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
+ FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
+ FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
+ FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
+ FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
+ FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
+ FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
+ FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
+ FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
+ FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
+ FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
+ FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
+ FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
+
+ /* Round 2 */
+ GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
+ GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
+ GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
+ GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
+ GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
+ GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
+ GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
+ GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
+ GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
+ GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
+ GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
+ GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
+ GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
+ GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
+ GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
+ GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
+
+ /* Round 3 */
+ HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
+ HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
+ HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
+ HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
+ HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
+ HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
+ HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
+ HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
+ HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
+ HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
+ HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
+ HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
+ HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
+ HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
+ HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
+ HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
+
+ /* Round 4 */
+ II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
+ II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
+ II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
+ II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
+ II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
+ II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
+ II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
+ II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
+ II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
+ II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
+ II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
+ II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
+ II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
+ II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
+ II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
+ II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
+
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+
+ /* Zeroize sensitive information.
+ */
+ MD5_memset ((POINTER)x, 0, sizeof (x));
+}
+
+/* Encodes input (UINT4) into output (unsigned char). Assumes len is
+ a multiple of 4.
+
+ */
+
+static void Encode (output, input, len)
+unsigned char *output;
+UINT4 *input;
+unsigned int len;
+{
+ unsigned int i, j;
+
+ for (i = 0, j = 0; j < len; i++, j += 4) {
+ output[j] = (unsigned char)(input[i] & 0xff);
+ output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
+ output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
+ output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
+ }
+}
+
+/* Decodes input (unsigned char) into output (UINT4). Assumes len is
+ a multiple of 4.
+
+ */
+
+static void Decode (output, input, len)
+UINT4 *output;
+unsigned char *input;
+unsigned int len;
+{
+ unsigned int i, j;
+
+ for (i = 0, j = 0; j < len; i++, j += 4)
+ output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | (((UINT4)input[j+2]) << 16)
+ | (((UINT4)input[j+3]) << 24);
+}
+
+/* Note: Replace "for loop" with standard memcpy if possible.
+
+ */
+
+static void MD5_memcpy (output, input, len)
+POINTER output;
+POINTER input;
+unsigned int len;
+{
+ unsigned int i;
+
+ for (i = 0; i < len; i++)
+ output[i] = input[i];
+}
+
+/* Note: Replace "for loop" with standard memset if possible.
+*/
+
+static void MD5_memset (output, value, len)
+POINTER output;
+int value;
+unsigned int len;
+{
+ unsigned int i;
+
+ for (i = 0; i < len; i++)
+ ((char *)output)[i] = (char)value;
+}
+
+void hmac_md5_init(HMAC_MD5_CTX *hmac,
+ const unsigned char *key,
+ int key_len)
+{
+ unsigned char k_ipad[65]; /* inner padding -
+ * key XORd with ipad
+ */
+ unsigned char k_opad[65]; /* outer padding -
+ * key XORd with opad
+ */
+ unsigned char tk[16];
+ int i;
+ /* if key is longer than 64 bytes reset it to key=MD5(key) */
+ if (key_len > 64) {
+
+ MD5_CTX tctx;
+
+ MD5Init(&tctx);
+ MD5Update(&tctx, key, key_len);
+ MD5Final(tk, &tctx);
+
+ key = tk;
+ key_len = 16;
+ }
+
+ /*
+ * the HMAC_MD5 transform looks like:
+ *
+ * MD5(K XOR opad, MD5(K XOR ipad, text))
+ *
+ * where K is an n byte key
+ * ipad is the byte 0x36 repeated 64 times
+ * opad is the byte 0x5c repeated 64 times
+ * and text is the data being protected
+ */
+
+ /* start out by storing key in pads */
+ MD5_memset(k_ipad, '\0', sizeof k_ipad);
+ MD5_memset(k_opad, '\0', sizeof k_opad);
+ MD5_memcpy( k_ipad, key, key_len);
+ MD5_memcpy( k_opad, key, key_len);
+
+ /* XOR key with ipad and opad values */
+ for (i=0; i<64; i++) {
+ k_ipad[i] ^= 0x36;
+ k_opad[i] ^= 0x5c;
+ }
+
+ MD5Init(&hmac->ictx); /* init inner context */
+ MD5Update(&hmac->ictx, k_ipad, 64); /* apply inner pad */
+
+ MD5Init(&hmac->octx); /* init outer context */
+ MD5Update(&hmac->octx, k_opad, 64); /* apply outer pad */
+
+ /* scrub the pads and key context (if used) */
+ MD5_memset(&k_ipad, 0, sizeof(k_ipad));
+ MD5_memset(&k_opad, 0, sizeof(k_opad));
+ MD5_memset(&tk, 0, sizeof(tk));
+
+ /* and we're done. */
+}
+
+/* The precalc and import routines here rely on the fact that we pad
+ * the key out to 64 bytes and use that to initialize the md5
+ * contexts, and that updating an md5 context with 64 bytes of data
+ * leaves nothing left over; all of the interesting state is contained
+ * in the state field, and none of it is left over in the count and
+ * buffer fields. So all we have to do is save the state field; we
+ * can zero the others when we reload it. Which is why the decision
+ * was made to pad the key out to 64 bytes in the first place. */
+void hmac_md5_precalc(HMAC_MD5_STATE *state,
+ const unsigned char *key,
+ int key_len)
+{
+ HMAC_MD5_CTX hmac;
+ unsigned lupe;
+
+ hmac_md5_init(&hmac, key, key_len);
+ for (lupe = 0; lupe < 4; lupe++) {
+ state->istate[lupe] = htonl(hmac.ictx.state[lupe]);
+ state->ostate[lupe] = htonl(hmac.octx.state[lupe]);
+ }
+ MD5_memset(&hmac, 0, sizeof(hmac));
+}
+
+
+void hmac_md5_import(HMAC_MD5_CTX *hmac,
+ HMAC_MD5_STATE *state)
+{
+ unsigned lupe;
+ MD5_memset(hmac, 0, sizeof(HMAC_MD5_CTX));
+ for (lupe = 0; lupe < 4; lupe++) {
+ hmac->ictx.state[lupe] = ntohl(state->istate[lupe]);
+ hmac->octx.state[lupe] = ntohl(state->ostate[lupe]);
+ }
+ /* Init the counts to account for our having applied
+ * 64 bytes of key; this works out to 0x200 (64 << 3; see
+ * MD5Update above...) */
+ hmac->ictx.count[0] = hmac->octx.count[0] = 0x200;
+}
+
+void hmac_md5_final(unsigned char digest[HMAC_MD5_SIZE],
+ HMAC_MD5_CTX *hmac)
+{
+ MD5Final(digest, &hmac->ictx); /* Finalize inner md5 */
+ MD5Update(&hmac->octx, digest, 16); /* Update outer ctx */
+ MD5Final(digest, &hmac->octx); /* Finalize outer md5 */
+}
+
+
+void hmac_md5(text, text_len, key, key_len, digest)
+const unsigned char* text; /* pointer to data stream */
+int text_len; /* length of data stream */
+const unsigned char* key; /* pointer to authentication key */
+int key_len; /* length of authentication key */
+unsigned char *digest; /* caller digest to be filled in */
+{
+ MD5_CTX context;
+
+ unsigned char k_ipad[65]; /* inner padding -
+ * key XORd with ipad
+ */
+ unsigned char k_opad[65]; /* outer padding -
+ * key XORd with opad
+ */
+ unsigned char tk[16];
+ int i;
+ /* if key is longer than 64 bytes reset it to key=MD5(key) */
+ if (key_len > 64) {
+
+ MD5_CTX tctx;
+
+ MD5Init(&tctx);
+ MD5Update(&tctx, key, key_len);
+ MD5Final(tk, &tctx);
+
+ key = tk;
+ key_len = 16;
+ }
+
+ /*
+ * the HMAC_MD5 transform looks like:
+ *
+ * MD5(K XOR opad, MD5(K XOR ipad, text))
+ *
+ * where K is an n byte key
+ * ipad is the byte 0x36 repeated 64 times
+ * opad is the byte 0x5c repeated 64 times
+ * and text is the data being protected
+ */
+
+ /* start out by storing key in pads */
+ MD5_memset(k_ipad, '\0', sizeof k_ipad);
+ MD5_memset(k_opad, '\0', sizeof k_opad);
+ MD5_memcpy( k_ipad, key, key_len);
+ MD5_memcpy( k_opad, key, key_len);
+
+ /* XOR key with ipad and opad values */
+ for (i=0; i<64; i++) {
+ k_ipad[i] ^= 0x36;
+ k_opad[i] ^= 0x5c;
+ }
+ /*
+ * perform inner MD5
+ */
+
+ MD5Init(&context); /* init context for 1st
+ * pass */
+ MD5Update(&context, k_ipad, 64); /* start with inner pad */
+ MD5Update(&context, text, text_len); /* then text of datagram */
+ MD5Final(digest, &context); /* finish up 1st pass */
+
+ /*
+ * perform outer MD5
+ */
+ MD5Init(&context); /* init context for 2nd
+ * pass */
+ MD5Update(&context, k_opad, 64); /* start with outer pad */
+ MD5Update(&context, digest, 16); /* then results of 1st
+ * hash */
+ MD5Final(digest, &context); /* finish up 2nd pass */
+
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,37 @@
+/* MD5.H - header file for MD5C.C
+ */
+
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+rights reserved.
+
+License to copy and use this software is granted provided that it
+is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+Algorithm" in all material mentioning or referencing this software
+or this function.
+
+License is also granted to make and use derivative works provided
+that such works are identified as "derived from the RSA Data
+Security, Inc. MD5 Message-Digest Algorithm" in all material
+mentioning or referencing the derived work.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+ */
+
+/* MD5 context. */
+typedef struct {
+ UINT4 state[4]; /* state (ABCD) */
+ UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ unsigned char buffer[64]; /* input buffer */
+} MD5_CTX;
+
+void MD5Init PROTO_LIST ((MD5_CTX *));
+void MD5Update PROTO_LIST
+ ((MD5_CTX *, unsigned char *, unsigned int));
+void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
+
+void hmac_md5 PROTO_LIST ((unsigned char *, int, unsigned char *, int, caddr_t));
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5global.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5global.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5global.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/md5global.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,31 @@
+/* GLOBAL.H - RSAREF types and constants
+ */
+
+/* PROTOTYPES should be set to one if and only if the compiler supports
+ function argument prototyping.
+The following makes PROTOTYPES default to 0 if it has not already
+ been defined with C compiler flags.
+ */
+#ifndef PROTOTYPES
+#define PROTOTYPES 0
+#endif
+
+/* POINTER defines a generic pointer type */
+typedef unsigned char *POINTER;
+
+/* UINT2 defines a two byte word */
+typedef unsigned short int UINT2;
+
+/* UINT4 defines a four byte word */
+typedef unsigned long int UINT4;
+
+/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
+If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
+ returns an empty list.
+ */
+#if PROTOTYPES
+#define PROTO_LIST(list) list
+#else
+#define PROTO_LIST(list) ()
+#endif
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/memmove.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/memmove.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/memmove.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/memmove.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,66 @@
+/* memmove.c -- replacement memmove() routine
+ * Only handles overlapping strings when moving data upwards
+
+ $Id: memmove.c,v 1.8 2003/02/13 20:15:41 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+void *memmove(s, ct, n)
+void *s;
+const void *ct;
+unsigned int n;
+{
+ char *c_s = s;
+ const char *c_ct = ct;
+
+ if (c_s <= c_ct) {
+ while (n--) {
+ *c_s++ = *c_ct++;
+ }
+ }
+ else {
+ while (n--) {
+ c_s[n] = c_ct[n];
+ }
+ }
+
+ return s;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,528 @@
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <sys/un.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <time.h>
+
+#include "assert.h"
+#include "acl.h"
+#include "map.h"
+#include "retry.h"
+#include "util.h"
+#include "lock.h"
+#include "exitcodes.h"
+#include "message_uuid.h"
+#include "xmalloc.h"
+#if 0
+#include "acappush.h"
+#endif
+
+/* Four possible forms of messageID:
+ *
+ * Private:
+ * Used for internal manipulation. Not visible to clients.
+ *
+ * Public:
+ * Opaque handle to byte sequence that Cyrus can pass around
+ *
+ * Packed:
+ * Byte sequence of known length (MESSAGE_UUID_PACKED_SIZE) which can
+ * be stored on disk. At the moment public and packed essentially
+ * the same thing but makes sense (I think!) to divide into two roles.
+ *
+ * Textual:
+ * Textual represenatation for Message-UUID for passing over the wire
+ * Currently 24 byte hex string + '\0', propose switch to BASE64 alike.
+ *
+ */
+
+/* ====================================================================== */
+
+/* Private interface */
+
+/* 96-bit UUID allocation space divided into 256 possible schemas based
+ * on first byte. Currently two UUID schemas defined:
+ *
+ * Schema 0 => NULL values.
+ * Schema 1 => UUIDs allocated by master process in 2^24 bit chunks.
+ */
+
+static int schema = 0;
+
+/* Schema 1 Byte encoding is:
+ *
+ * Byte Offset Use
+ *
+ * 0 Current UUID schema (following is schema 1)
+ * 1 -> 8 64 bit prefix private to UUID schema.
+ * 9 -> 11 24 bit counter for UUID with child process
+ * (means max 16777216 messages per child process)
+ *
+ * Numbers stored big-endian.
+ */
+
+static struct {
+ unsigned char prefix[8]; /* 8 bytes used */
+ unsigned long count; /* 3 bytes used */
+} schema_1;
+
+/* message_uuid_record() *************************************************
+ *
+ * Decode public UUID into components for manipulation
+ * Returns: Cyrus error code, 0 on sucess
+ *
+ ************************************************************************/
+
+static int
+message_uuid_record(struct message_uuid *uuid)
+{
+ unsigned char *s = &uuid->value[0];
+ int rc = 1;
+
+ switch (s[0]) {
+ case 0:
+ schema = 0;
+ break;
+ case 1:
+ schema = 1;
+ memcpy(&schema_1.prefix[0], &s[1], 8);
+ schema_1.count = 0;
+ break;
+ default:
+ rc = 0;
+ break;
+ }
+
+ return(rc);
+}
+
+/* message_uuid_extract() ************************************************
+ *
+ * Convert message_uuid_structure into public UID
+ * Returns: boolean success
+ *
+ ************************************************************************/
+
+static int
+message_uuid_extract(struct message_uuid *uuid)
+{
+ unsigned char *s = &uuid->value[0];
+ int rc = 1;
+
+ switch (schema) {
+ case 0:
+ message_uuid_set_null(uuid);
+ break;
+ case 1:
+ s[0] = 1;
+
+ memcpy(&s[1], &schema_1.prefix[0], 8);
+ s[9] = ((schema_1.count & 0xff0000) >> 16);
+ s[10] = ((schema_1.count & 0x00ff00) >> 8);
+ s[11] = ((schema_1.count & 0x0000ff));
+ break;
+ default:
+ syslog(LOG_ERR, "UUID: Unknown schema");
+ message_uuid_set_null(uuid);
+ rc = 0;
+ break;
+ }
+
+ return(rc);
+}
+
+/* ====================================================================== */
+
+/* message_uuid_client_init() ********************************************
+ *
+ * Initialise private UUID system
+ * Returns: boolean success
+ ************************************************************************/
+
+int
+message_uuid_client_init(char *uuid_prefix)
+{
+ struct message_uuid tmp;
+ unsigned char *s = &tmp.value[0];
+ unsigned long count, checksum;
+
+ /* Record a NULL value in case of failure */
+ message_uuid_set_null(&tmp);
+ message_uuid_record(&tmp);
+
+ if (uuid_prefix == NULL)
+ return(1);
+
+ if (!message_uuid_from_text(&tmp, uuid_prefix))
+ return(0);
+
+ /* Test and record UUID prefix in different schemas */
+ switch (s[0]) {
+ case 0:
+ /* NOOP, used record NULL value */
+ break;
+ case 1:
+ /* Compute 24 bit checksum from first 9 bytes */
+ count = (s[0] << 16) + (s[1] << 8) + s[2];
+ count += (s[3] << 16) + (s[4] << 8) + s[5];
+ count += (s[6] << 16) + (s[7] << 8) + s[8];
+ count &= 0x00ffffff;
+
+ /* And retrieve checksum from last three bytes */
+ checksum = (s[9] << 16) + (s[10] << 8) + s[11];
+
+ if (checksum != count) {
+ syslog(LOG_ERR, "UUID checksum mismatch for %s", uuid_prefix);
+ return(0);
+ }
+
+ /* Clear checksum bytes */
+ s[9] = 0;
+ s[10] = 0;
+ s[11] = 0;
+
+ if (!message_uuid_record(&tmp))
+ return(0);
+ break;
+ default:
+ syslog(LOG_ERR,
+ "Attempt to initialise invalid UUID prefix: %s", uuid_prefix);
+ return(0);
+ break;
+ }
+
+ return(1);
+}
+
+/* message_uuid_assign() *************************************************
+ *
+ * Assign next UUID to preallocated structure
+ * Returns: Cyrus error code, 0 on sucess
+ *
+ ************************************************************************/
+
+int
+message_uuid_assign(struct message_uuid *uuid)
+{
+ int rc = 1;
+
+ switch (schema) {
+ case 0:
+ message_uuid_set_null(uuid);
+ break;
+ case 1:
+ if (schema_1.count >= (256*256*256)) {
+ /* Allocation space (2^24 nodes) exhausted */
+ message_uuid_set_null(uuid);
+ break;
+ }
+
+ if (!message_uuid_extract(uuid)) {
+ message_uuid_set_null(uuid);
+ rc = 0;
+ break;
+ }
+
+ schema_1.count++;
+
+ break;
+ default:
+ message_uuid_set_null(uuid);
+ rc = 0;
+ break;
+ }
+
+ return(rc);
+}
+
+/* message_uuid_alloc() **************************************************
+ *
+ * Allocate and assign next UUID using xmalloc.
+ * Returns: NULL Message-UUID if allocation exhaused.
+ * NULL => Internal error
+ *
+ ************************************************************************/
+
+struct message_uuid *
+message_uuid_alloc()
+{
+ struct message_uuid *current = xmalloc(sizeof(struct message_uuid));
+
+ if (!message_uuid_assign(current))
+ return(NULL);
+
+ return(current);
+}
+
+/* message_uuid_free() ***************************************************
+ *
+ * Wrapper for free function.
+ *
+ ************************************************************************/
+
+void
+message_uuid_free(struct message_uuid **uuidp)
+{
+ free(*uuidp);
+ *uuidp = NULL;
+}
+
+/* message_uuid_copy() ***************************************************
+ *
+ * Copy UUID
+ *
+ ************************************************************************/
+
+int
+message_uuid_copy(struct message_uuid *dst, struct message_uuid *src)
+{
+ memcpy(dst, src, sizeof(struct message_uuid));
+ return(1);
+}
+
+
+/* message_uuid_compare() ************************************************
+ *
+ * Compare a pair of UUIDs: Returns 1 => match
+ *
+ ************************************************************************/
+
+int
+message_uuid_compare(struct message_uuid *uuid1, struct message_uuid *uuid2)
+{
+ unsigned char *s = &uuid1->value[0];
+ unsigned char *t = &uuid2->value[0];
+ int i;
+
+ for (i = 0; i < MESSAGE_UUID_SIZE; i++) {
+ if (s[i] != t[i]) return(0);
+ }
+ return(1);
+}
+
+/* message_uuid_hash() ***************************************************
+ *
+ * Convert UUID into hash value for hash table lookup
+ * Returns: positive int in range [0, hash_size-1]
+ *
+ ************************************************************************/
+
+unsigned long
+message_uuid_hash(struct message_uuid *uuid, int hash_size)
+{
+ int i;
+ unsigned long result = 0;
+ unsigned char *s = &uuid->value[0];
+
+ assert(hash_size > 1);
+
+ if (hash_size > 1024) {
+ /* Pair up chars to get 16 bit values */
+ for (i = 0; i < MESSAGE_UUID_SIZE; i+=2) {
+ if ((i+1) < MESSAGE_UUID_SIZE)
+ result += (s[i] << 8) + s[i+1];
+ else
+ result += s[i] << 8; /* Should never happen */
+ }
+ } else for (i = 0; i < MESSAGE_UUID_SIZE; i++)
+ result += s[i];
+
+ return(result % hash_size);
+}
+
+/* message_uuid_set_null() ***********************************************
+ *
+ * Create NULL UUID
+ *
+ ************************************************************************/
+
+int
+message_uuid_set_null(struct message_uuid *dst)
+{
+ memset(dst, 0, MESSAGE_UUID_SIZE);
+ return(1);
+}
+
+/* message_uuid_isnull() ************************************************
+ *
+ * Returns: 1 if UUID is NULL value
+ *
+ ************************************************************************/
+
+int
+message_uuid_isnull(struct message_uuid *uuid)
+{
+ unsigned char *p = &uuid->value[0];
+ int i;
+
+ if (*p) return(0);
+
+ for (i = 0 ; i < MESSAGE_UUID_SIZE ; i++) {
+ if (*p) {
+ syslog(LOG_WARNING, "Invalid NULL UUID: not completely zero");
+ break;
+ }
+ p++;
+ }
+ return(1);
+}
+
+/* Routines for manipulating packed values */
+
+/* message_uuid_pack() ***************************************************
+ *
+ * Store Message UID as packed sequence (MESSAGE_UUID_PACKED_SIZE)
+ * (Wrapper for memcpy() with current implementation)
+ *
+ ************************************************************************/
+
+int
+message_uuid_pack(struct message_uuid *uuid, char *packed)
+{
+ assert(MESSAGE_UUID_SIZE == MESSAGE_UUID_PACKED_SIZE);
+
+ memcpy(packed, &uuid->value[0], MESSAGE_UUID_SIZE);
+ return(1);
+}
+ /* Store Message UID as packed sequence (MESSAGE_UUID_PACKED_SIZE)
+ * (Wrapper for memcpy() with current implementation) */
+
+/* message_uuid_unpack() *************************************************
+ *
+ * Fetch Message UID from packed sequence (MESSAGE_UUID_PACKED_SIZE)
+ * (Wrapper for memcpy() with current implementation)
+ *
+ ************************************************************************/
+
+int
+message_uuid_unpack(struct message_uuid *uuid, const char *packed)
+{
+ assert(MESSAGE_UUID_SIZE == MESSAGE_UUID_PACKED_SIZE);
+
+ memcpy(&uuid->value[0], packed, MESSAGE_UUID_SIZE);
+ return(1);
+}
+
+/* Routines for manipulating text value */
+
+/* message_uuid_text() ***************************************************
+ *
+ * Returns ptr to '\0' terminated static char * which can be strdup()ed
+ * NULL => error. Should be impossible as entire range covered
+ *
+ ************************************************************************/
+
+char *
+message_uuid_text(struct message_uuid *uuid)
+{
+ static char buf[MESSAGE_UUID_TEXT_SIZE+1];
+ static char *hex = "0123456789abcdef";
+ unsigned char *value = &uuid->value[0];
+ char *p = buf;
+ int i;
+
+ for (i = 0 ; i < MESSAGE_UUID_SIZE ; i++) {
+ *p++ = hex[(value[i] & 0xf0) >> 4];
+ *p++ = hex[value[i] & 0x0f];
+ }
+ *p = '\0';
+
+ return(buf);
+}
+
+/* message_uuid_from_text() **********************************************
+ *
+ * Sets Message UUID from text form. Returns 1 if valid
+ * Returns: boolean success
+ *
+ ************************************************************************/
+
+int
+message_uuid_from_text(struct message_uuid *uuid, const char *text)
+{
+ const char *p = text;
+ char *buf = &uuid->value[0];
+ int i;
+
+ for (i = 0 ; i < MESSAGE_UUID_SIZE ; i++) {
+ if (!isxdigit(*p)) return(0);
+
+ if ((*p >= 'a') && (*p <= 'f'))
+ buf[i] = 16 * (*p - 'a' + 10);
+ else if ((*p >= 'A') && (*p <= 'F'))
+ buf[i] = 16 * (*p - 'A' + 10);
+ else
+ buf[i] = 16 * (*p - '0');
+
+ p++;
+
+ if (!isxdigit(*p)) return(0);
+
+ if ((*p >= 'a') && (*p <= 'f'))
+ buf[i] += (*p - 'a' + 10);
+ else if ((*p >= 'A') && (*p <= 'F'))
+ buf[i] += (*p - 'A' + 10);
+ else
+ buf[i] += (*p - '0');
+
+ p++;
+ }
+ return((*p == '\0'));
+}
+
+/* message_uuid_text_valid() *********************************************
+ *
+ * Returns 1 if test valid format for Message UUID
+ *
+ ************************************************************************/
+
+int
+message_uuid_text_valid(const char *p)
+{
+ int i;
+
+ for (i = 0 ; i < MESSAGE_UUID_TEXT_SIZE ; i++) {
+ if (!isxdigit(*p)) return(0);
+ p++;
+ }
+ return((*p == '\0') ? 1 : 0);
+}
+
+/* message_uuid_text_isnull() *******************************************
+ *
+ * Returns 1 if Textual UUID is NULL value.
+ *
+ ************************************************************************/
+
+int
+message_uuid_text_isnull(const char *p)
+{
+ int i;
+
+ if ((p[0] != '0') || (p[1] != '0')) return(0);
+
+ for (i = 0; i < MESSAGE_UUID_TEXT_SIZE; i++) {
+ if (p[i] != '0') {
+ syslog(LOG_WARNING, "Invalid NULL message UUID: %s", p);
+ return(1);
+ }
+ }
+ if (p[MESSAGE_UUID_TEXT_SIZE] != '\0')
+ syslog(LOG_WARNING, "Invalid NULL message UUID: incorrect length");
+
+ return(1);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/message_uuid.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,86 @@
+#ifndef MESSAGE_UUID_H
+/* Public interface */
+
+#define MESSAGE_UUID_SIZE (12) /* Size of UUID byte sequence */
+#define MESSAGE_UUID_PACKED_SIZE (12) /* Size on disk */
+#define MESSAGE_UUID_TEXT_SIZE (24) /* UUID as hex */
+
+struct message_uuid {
+ unsigned char value[MESSAGE_UUID_SIZE]; /* Matches packed encoding */
+};
+
+int
+message_uuid_client_init(char *uuid_prefix);
+ /* Initialise private UUID system
+ * (sets fields from message_uuid, clears uuid_suffix) */
+
+int
+message_uuid_assign(struct message_uuid *uuid);
+ /* Assign next UUID to preallocated structure */
+ /* Returns: Cyrus error code, 0 on sucess */
+
+struct message_uuid *
+message_uuid_alloc();
+ /* Allocate and assign next UUID using xmalloc */
+ /* Returns NULL Message-UUID if allocation exhaused */
+ /* NULL => alloc failed */
+
+void
+message_uuid_free(struct message_uuid **uuidp);
+ /* Free Message UUID structure */
+
+int
+message_uuid_compare(struct message_uuid *uuid1, struct message_uuid *uuid2);
+ /* Compare a pair of UUIDs: Returns 1 => match */
+
+int
+message_uuid_copy(struct message_uuid *dst, struct message_uuid *src);
+ /* Copy a UUID */
+
+unsigned long
+message_uuid_hash(struct message_uuid *uuid, int hash_size);
+ /* Convert UUID into hash value for hash table lookup */
+ /* Returns: positive int in range [0, hash_size-1] */
+
+int
+message_uuid_set_null(struct message_uuid *dst);
+ /* Create a NULL UUID */
+
+int
+message_uuid_isnull(struct message_uuid *uuid);
+ /* Returns 1 if UUID is NULL value */
+
+/* Routines for manipulating packed values */
+
+int
+message_uuid_pack(struct message_uuid *uuid, char *packed);
+ /* Store Message UID as packed sequence (MESSAGE_UUID_PACKED_SIZE)
+ * (Wrapper for memcpy() with current implementation) */
+
+int
+message_uuid_unpack(struct message_uuid *uuid, const char *packed);
+ /* Fetch Message UID from packed sequence (MESSAGE_UUID_PACKED_SIZE)
+ * (Wrapper for memcpy() with current implementation) */
+
+/* Routines for manipulating text value */
+
+char *
+message_uuid_text(struct message_uuid *uuid);
+ /* Returns ptr to '\0' terminated static char * which can be strdup()ed */
+ /* NULL => error. Should be impossible as entire range covered */
+
+int
+message_uuid_from_text(struct message_uuid *uuid, const char *text);
+ /* Sets Message UUID from text form. Returns 1 if valid */
+ /* Returns: Cyrus error code, 0 on sucess */
+
+int
+message_uuid_text_valid(const char *text);
+ /* Returns 1 if test valid format for Message UUID */
+
+int
+message_uuid_text_isnull(const char *text);
+ /* Returns 1 if Textual UUID is NULL value */
+
+#define MESSAGE_UUID_H (1)
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkchartable.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkchartable.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkchartable.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkchartable.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,971 @@
+/* mkchartable.c -- Generate character set mapping table
+ *
+ * $Id: mkchartable.c,v 1.25 2003/05/14 18:56:34 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include "xmalloc.h"
+
+#define XX 127
+/*
+ * Table for decoding hexadecimal
+ */
+static const char index_hex[256] = {
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,XX,XX, XX,XX,XX,XX,
+ XX,10,11,12, 13,14,15,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,10,11,12, 13,14,15,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+ XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
+};
+#define HEXCHAR(c) (index_hex[(unsigned char)(c)])
+
+#define MAX_MAPCODE 20
+
+struct cmap {
+ int code;
+ int num_mapcode;
+ int mapcode[MAX_MAPCODE];
+ char *translation;
+ int trans_offset;
+};
+
+struct cmap *map=NULL;
+int map_num=0;
+int map_alloc=0;
+#define MAPGROW 200
+
+struct tablechar {
+ int code;
+ char *translation;
+ int trans_offset;
+ char *action;
+ char *comment;
+};
+#define EMPTYTCHAR(tc) ((tc).code == -1 && !(tc).translation && !(tc).action)
+
+struct table {
+ char *name;
+ char *endaction;
+ struct tablechar ch[256];
+};
+
+struct table *table=NULL;
+int table_num=0;
+int table_alloc=0;
+#define TABLEGROW 200
+
+static void readmapfile(char *name);
+static void mungemappings(void);
+static void readcharfile(char *name);
+static void printtable(char *name);
+static void freetabledata(void);
+static void freetable(void);
+static void freemap(void);
+static void usage(void);
+static int newstate(char *args);
+static int findstate(char *name);
+static void mkunicodetable(void);
+static void mkutf8table(void);
+static void mkutf7table(void);
+
+int
+main(int argc, char **argv)
+{
+ int opt;
+
+ while ((opt = getopt(argc, argv, "m:")) != EOF) {
+ switch (opt) {
+ case 'm':
+ readmapfile(optarg);
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ if (map_num == 0 || argc == optind) usage();
+
+ printf("#include \"charset.h\"\n");
+ printf("#include \"chartable.h\"\n");
+
+ mungemappings();
+
+ fprintf(stderr, "mkchartable: mapping unicode...\n");
+ mkunicodetable();
+ printtable("unicode");
+
+ fprintf(stderr, "mkchartable: mapping UTF-8...\n");
+ mkutf8table();
+ printtable("utf-8");
+
+ fprintf(stderr, "mkchartable: mapping UTF-7...\n");
+ mkutf7table();
+ printtable("utf-7");
+
+ while (argv[optind]) {
+ fprintf(stderr, "mkchartable: mapping %s...\n", argv[optind]);
+ readcharfile(argv[optind]);
+ printtable(argv[optind]);
+ freetabledata();
+ optind++;
+ }
+
+ printf("/*\n");
+ printf(" * Mapping of character sets to tables\n");
+ printf(" */\n");
+ printf("const struct charset chartables_charset_table[] = {\n");
+ printf(" { \"us-ascii\", chartables_us_ascii }, /* US-ASCII must be charset number 0 */\n");
+ printf(" { \"utf-8\", chartables_utf_8 },\n");
+ printf(" { \"utf-7\", chartables_utf_7 },\n");
+ printf(" { \"iso-8859-1\", chartables_iso_8859_1 },\n");
+ printf(" { \"iso-8859-2\", chartables_iso_8859_2 },\n");
+ printf(" { \"iso-8859-3\", chartables_iso_8859_3 },\n");
+ printf(" { \"iso-8859-4\", chartables_iso_8859_4 },\n");
+ printf(" { \"iso-8859-5\", chartables_iso_8859_5 },\n");
+ printf(" { \"iso-8859-6\", chartables_iso_8859_6 },\n");
+ printf(" { \"iso-8859-7\", chartables_iso_8859_7 },\n");
+ printf(" { \"iso-8859-8\", chartables_iso_8859_8 },\n");
+ printf(" { \"iso-8859-9\", chartables_iso_8859_9 },\n");
+ printf(" { \"koi8-r\", chartables_koi8_r },\n");
+ printf(" { \"iso-2022-jp\", chartables_iso_2022_jp },\n");
+ printf(" { \"iso-2022-kr\", chartables_iso_2022_kr },\n");
+ printf(" { \"gb2312\", chartables_gb2312 },\n");
+ printf(" { \"big5\", chartables_big5 },\n");
+ printf(" /* Compatibility names */\n");
+ printf(" { \"unicode-1-1-utf-7\", chartables_utf_7 },\n");
+ printf(" { \"unicode-2-0-utf-7\", chartables_utf_7 },\n");
+ printf(" { \"x-unicode-2-0-utf-7\", chartables_utf_7 },\n");
+ printf(" /* End Compatibility Names */\n");
+ printf(" { \"iso-8859-15\", chartables_iso_8859_15 },\n");
+ printf(" { \"windows-1252\", chartables_windows_1252 },\n");
+ printf(" { \"windows-1256\", chartables_windows_1256 },\n");
+ printf(" /* New character sets should only be added to end so that\n");
+ printf(" * cache files stay with valid information */\n");
+ printf("};\n");
+ printf("const int chartables_num_charsets = (sizeof(chartables_charset_table)/sizeof(*chartables_charset_table));\n");
+
+ freetable();
+ freemap();
+
+ return 0;
+}
+
+static void usage(void)
+{
+ fprintf(stderr, "usage: mkchartable -m mapfile charsetfile...\r\n");
+ exit(1);
+}
+
+/* Read a Unicode table, deriving useful mappings from it */
+static void
+readmapfile(char *name)
+{
+ FILE *mapfile;
+ char buf[1024];
+ char *p;
+ int line = 0;
+ int n, code, i, c;
+ static struct cmap zeromap;
+
+ mapfile = fopen(name, "r");
+ if (!mapfile) {
+ perror(name);
+ exit(1);
+ }
+
+ while (fgets(buf, sizeof(buf), mapfile)) {
+ line++;
+ p = buf;
+ while (*p && isspace(*(unsigned char*)p)) p++;
+ if (!*p || *p == '#') continue;
+
+ /* Unicode character */
+ code = 0;
+ for (i=0; i<4; i++) {
+ c = HEXCHAR(*p);
+ p++;
+ if (c == XX) goto syntaxerr;
+ code = code*16 + c;
+ }
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Character name */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ if (map_num == map_alloc) {
+ map_alloc += MAPGROW;
+ map = (struct cmap *)
+ xrealloc((char *)map, map_alloc * sizeof(struct cmap));
+ }
+ map[map_num] = zeromap;
+ map[map_num].code = code;
+
+ /* General Category */
+ if (*p == 'Z') {
+ /* Is whitespace, map to empty string */
+ map[map_num].num_mapcode = 0;
+ map_num++;
+ continue;
+ }
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Canonical Combining Class */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Bidirectional category */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Character decomposition */
+ n = 0;
+ while (*p && *p != ';') {
+ if (n + 1 == MAX_MAPCODE) goto syntaxerr;
+ if (*p == '<') {
+ /* Compatability mapping, skip over the <type> */
+ p = strchr(p, '>');
+ if (!p || p[1] != ' ') goto syntaxerr;
+ p += 2;
+
+ /* Ignore compat mappings to SP followed by combining char */
+ if (!strncmp(p, "0020 ", 5)) {
+ p = strchr(p, ';');
+ break;
+ }
+ }
+
+ code = 0;
+ for (i=0; i<4; i++) {
+ c = HEXCHAR(*p);
+ p++;
+ if (c == XX) goto syntaxerr;
+ code = code*16 + c;
+ }
+ if (*p == ' ') p++;
+ map[map_num].mapcode[n++] = code;
+ }
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Decimal digit value */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Digit value */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Numeric value */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Mirrored character */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Unicode 1.0 name */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Comment */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Upper case equivalent mapping */
+ while (*p && *p != ';') p++;
+ if (*p++ != ';') goto syntaxerr;
+
+ /* Lower case equivalent mapping */
+ if (*p == ';') {
+ /* No case mapping, use any decomposition we found above */
+ if (n) {
+ map[map_num].num_mapcode = n;
+ map_num++;
+ }
+ continue;
+ }
+ code = 0;
+ for (i=0; i<4; i++) {
+ c = HEXCHAR(*p);
+ p++;
+ if (c == XX) goto syntaxerr;
+ code = code*16 + c;
+ }
+ if (*p != ';') goto syntaxerr;
+ map[map_num].mapcode[0] = code;
+ map[map_num].num_mapcode = 1;
+ map_num++;
+ }
+ fclose(mapfile);
+ return;
+ syntaxerr:
+ fprintf(stderr, "%s: line %d: syntax error\n", name, line);
+ exit(1);
+}
+
+/* Perform the transitive closure on the unicode mapping table
+ * Calculate translations for mappings
+ */
+static void
+mungemappings(void)
+{
+ int didchange;
+ int n, newn, n_mapcode, i;
+ int new_mapcode[MAX_MAPCODE];
+ int num_new_mapcode;
+ int last_translation = 1;
+ int max_len = 3;
+
+ /* Keep scanning the table until no changes are made */
+ do {
+ didchange = 0;
+
+ fprintf(stderr, "mkchartable: expanding unicode mappings...\n");
+
+ for (n = 0; n < map_num; n++) {
+ /* Build new map code sequence by iterating over existing
+ * mapcode sequence
+ */
+ num_new_mapcode = 0;
+ for (n_mapcode = 0; n_mapcode < map[n].num_mapcode; n_mapcode++) {
+
+ /* Search for a translation of this particular code */
+ for (newn = 0; newn < map_num; newn++) {
+ if (map[newn].code == map[n].mapcode[n_mapcode]) break;
+ }
+ if (newn != map_num) {
+ /* We have a translation */
+ didchange++;
+ for (i = 0; i < map[newn].num_mapcode; i++) {
+ new_mapcode[num_new_mapcode++] = map[newn].mapcode[i];
+ }
+ }
+ else {
+ /* Keep the old mapping for this code */
+ new_mapcode[num_new_mapcode++] = map[n].mapcode[n_mapcode];
+ }
+ }
+
+ /* Copy in the new translation */
+ map[n].num_mapcode = num_new_mapcode;
+ memcpy(map[n].mapcode, new_mapcode, sizeof(new_mapcode));
+ }
+ } while (didchange);
+
+ printf("/* The following unicode mapping table is in effect\n");
+ printf("From To\n");
+ for (n = 0; n < map_num; n++) {
+ printf("\n%04x", map[n].code);
+ for (i = 0; i < map[n].num_mapcode; i++) {
+ printf(" %04x", map[n].mapcode[i]);
+ }
+ }
+ printf("\n*/\n");
+
+ fprintf(stderr, "mkchartable: building expansion table...\n");
+
+ printf("/* Table of traslations longer than three octets.\n");
+ printf(" * The XLT code in other tables is followed by an 2-octet\n");
+ printf(" * index into this table.\n");
+ printf(" * The index of 0 is reserved to mean 'no translation'\n");
+ printf(" */\n");
+ printf("const unsigned char chartables_long_translations[] = { 0, \n");
+
+ for (n = 0; n < map_num; n++) {
+ int n_mapcode, code;
+ unsigned char translation[256];
+ int n_t;
+
+ /* Build translation strings for mappings to 0 or multiple codes */
+ if (map[n].num_mapcode == 0) {
+ map[n].translation = xstrdup("");
+ }
+ else if (map[n].num_mapcode > 1) {
+ n_t = 0;
+ for (n_mapcode = 0; n_mapcode < map[n].num_mapcode; n_mapcode++) {
+ code = map[n].mapcode[n_mapcode];
+ /* Convert code to UTF-8 */
+ if (code && code <= 0x7f) {
+ translation[n_t++] = (unsigned char)code;
+ }
+ else if (code <= 0x7FF) {
+ translation[n_t++] = (unsigned char) (0xc0 + (code>>6));
+ translation[n_t++] = (unsigned char) (0x80+(code&0x3f));
+ }
+ else {
+ translation[n_t++] = (unsigned char) (0xe0 + (code>>12));
+ translation[n_t++] = (unsigned char) (0x80+((code>>6)&0x3f));
+ translation[n_t++] = (unsigned char) (0x80+(code&0x3f));
+ }
+ }
+ if (n_t <= 3) {
+ map[n].translation = xmalloc(4);
+ memcpy(map[n].translation, translation, n_t);
+ map[n].translation[n_t] = '\0';
+ }
+ else {
+ if (n_t > max_len) max_len = n_t;
+ for (i = 0; i < n_t; i++) {
+ code = translation[i];
+ if (isprint(code) && code != '\\' && code != '\"' && code != '\'') {
+ printf(" '%c',", code);
+ } else {
+ printf(" %3d,", code);
+ }
+ }
+ printf(" END, /* Translation for %04x (offset %04x) */\n",
+ map[n].code, last_translation);
+ map[n].trans_offset = last_translation;
+
+ /* last_translation points to the offset the next translation will start from */
+ last_translation += n_t + 1;
+ }
+ }
+ }
+ printf("};\n\n const int charset_max_translation = %d;\n\n", max_len);
+}
+
+static void
+setcode(int state, int character, int code)
+{
+ int i = 0;
+
+ for (i = 0; i < map_num; i++) {
+ if (map[i].code == code) break;
+ }
+
+ if (i == map_num) {
+ table[state].ch[character].code = code;
+ } else if (map[i].translation) {
+ table[state].ch[character].translation = map[i].translation;
+ } else if (map[i].trans_offset) {
+ table[state].ch[character].trans_offset = map[i].trans_offset;
+ } else {
+ table[state].ch[character].code = map[i].mapcode[0];
+ }
+
+}
+
+static void
+readcharfile(char *name)
+{
+ FILE *charfile;
+ char buf[1024];
+ char *p;
+ int line = 0;
+ int curstate = -1;
+ int thischar, thisstate;
+ int code, i, c;
+
+ charfile = fopen(name, "r");
+ if (!charfile) {
+ perror(name);
+ exit(1);
+ }
+
+ table_num = 0;
+
+ while (fgets(buf, sizeof(buf), charfile)) {
+ line++;
+ p = buf + strlen(buf);
+ if (p > buf && p[-1] == '\n') p[-1] = '\0';
+ p = buf;
+ while (*p && isspace(*(unsigned char*)p)) p++;
+ if (!*p || *p == '#') continue;
+
+ if (*p == ':') {
+ /* New state */
+ curstate = newstate(p+1);
+ continue;
+ }
+
+ if (curstate == -1) {
+ curstate = newstate("");
+ }
+
+ thisstate = curstate;
+ thischar = i = 0;
+ while (!isspace(*(unsigned char*)p)) {
+ c = HEXCHAR(*p);
+ i++;
+ p++;
+ if (c == XX) goto syntaxerr;
+ thischar = thischar*16 + c;
+ }
+ while (*p && isspace(*(unsigned char*)p)) p++;
+
+ if (i > 4) goto syntaxerr;
+ if (i > 2) {
+ if (EMPTYTCHAR(table[thisstate].ch[thischar>>8])) {
+ /* we create a new state (not in the input file) to
+ deal with multibyte characters that start with the
+ byte 'thischar >> 8'. */
+
+ char action[1024];
+
+ sprintf(action, ">%s_%02x <", table[thisstate].name,
+ thischar>>8);
+ table[thisstate].ch[thischar>>8].action = xstrdup(action);
+ *(strchr(table[thisstate].ch[thischar>>8].action, ' ')) = '\0';
+ table[thisstate].ch[thischar>>8].comment = xstrdup("multi-byte");
+ thisstate = newstate(action+1);
+ }
+ else if (!table[thisstate].ch[thischar>>8].action ||
+ table[thisstate].ch[thischar>>8].action[0] != '>') {
+ /* either we think this byte isn't the start of a
+ multibyte character, or the action associated with this
+ byte isn't a state change. */
+
+ fprintf(stderr,
+ "%s: line %d: multibyte/single-byte conflict\n",
+ name, line);
+ exit(1);
+ }
+ else {
+ /* we find the already created state to deal with multibytes
+ starting with 'thischar >> 8' and move to it so we
+ insert the 2nd byte of this multibyte char in the right
+ state. */
+
+ thisstate =
+ findstate(table[thisstate].ch[thischar>>8].action+1);
+ if (thisstate == -1) {
+ fprintf(stderr,
+ "%s: line %d: can't find multibyte state\n",
+ name, line);
+ exit(1);
+ }
+ }
+ thischar &= 0xff;
+ }
+
+ if (!EMPTYTCHAR(table[thisstate].ch[thischar])) {
+ fprintf(stderr, "%s: line %d: duplicate defs for %x\n",
+ name, line, thischar);
+ exit(1);
+ }
+
+ table[thisstate].ch[thischar].comment = xstrdup(buf);
+
+ if (*p == '?') {
+ continue;
+ }
+
+ if (*p == ':' || *p == '>' || *p == '<') {
+ p = table[thisstate].ch[thischar].action = xstrdup(p);
+ while (*p && !isspace(*(unsigned char*)p)) p++;
+ *p = '\0';
+ continue;
+ }
+
+ code = 0;
+ for (i=0; i<4; i++) {
+ c = HEXCHAR(*p);
+ p++;
+ if (c == XX) goto syntaxerr;
+ code = code*16 + c;
+ }
+ setcode(thisstate, thischar, code);
+ }
+ fclose(charfile);
+ return;
+ syntaxerr:
+ fprintf(stderr, "%s: line %d: syntax error\n", name, line);
+ exit(1);
+}
+
+/* Generate the table used for mapping raw unicode values */
+static void mkunicodetable(void)
+{
+ int i;
+ int thisstate;
+ unsigned char need_block[256];
+ int block;
+ char buf[80];
+
+ /* Record which blocks we need mappings for */
+ for (i = 0; i < 256; i++) {
+ need_block[i] = 0;
+ }
+ for (i = 0; i < map_num; i++) {
+ need_block[map[i].code>>8] = 1;
+ }
+
+ table_num = 0;
+
+ printf("/* The next two tables are used for doing translations on\n");
+ printf(" * 16-bit unicode values. First look up the Unicode block\n");
+ printf(" * (high-order byte) in the chartables_unicode_block table\n");
+ printf(" * to find the index into chartables_unicode for that block.\n");
+ printf(" * If the index is 255, there are no translations for that\n");
+ printf(" * block, so characters can be encoded in UTF-8 algorithmically\n");
+ printf(" * Otherwise, look up the low-order byte in the chartables_unicode\n");
+ printf(" * using the index to select the state.\n");
+ printf(" */\n");
+ printf("const unsigned char chartables_unicode_block[256] = {");
+
+ for (block = 0; block < 256; block++) {
+ if (!(block & 0x7)) printf("\n");
+ if (!need_block[block]) {
+ printf(" 255,");
+ continue;
+ }
+
+ sprintf(buf, "BLOCK-%02x-INDEX-%d", block, table_num);
+ thisstate = newstate(buf);
+ printf(" %3d,", thisstate);
+
+ for (i = 0; i < 256; i++) {
+ setcode(thisstate, i, (block << 8) + i);
+ }
+ }
+
+ printf("\n};\n\n");
+
+ printf("/* NOTE: Unlike other charset translation tables, the \n");
+ printf(" * chartables_unicode table is NOT used to directly parse\n");
+ printf(" * a charset. See the comment on chartables_unicode_block\n");
+ printf(" * for a descripton of how this table is used.\n");
+ printf(" */\n");
+}
+
+static void mkutf8table(void)
+{
+ int start_state, thisstate;
+ int thischar, prefix;
+ char buf[80];
+
+ table_num = 0;
+
+ start_state = newstate("START");
+
+ /* Populate the ascii section */
+ for (thischar = 0; thischar <= 0x7f; thischar++) {
+ setcode(start_state, thischar, thischar);
+ }
+
+ /* 3-char sequence tables must be numbered 1 and 2 */
+ thisstate = newstate("STATE-3-2 <");
+ for (thischar = 0x80; thischar <= 0xbf; thischar++) {
+ table[thisstate].ch[thischar].action = "U83_2";
+ }
+ thisstate = newstate("STATE-3-3 <");
+ for (thischar = 0x80; thischar <= 0xbf; thischar++) {
+ table[thisstate].ch[thischar].action = "U83_3";
+ }
+
+ /* Populate 2-char sequences---the first byte shifts to another
+ * state; the 2nd byte chooses the character, just like any other
+ * 2-byte encoding */
+ for (prefix = 2; prefix <= 0x1f; prefix++) {
+ sprintf(buf, ">STATE-2-%02x", prefix);
+ table[start_state].ch[prefix+0xc0].action = xstrdup(buf);
+ strcat(buf, " <");
+ thisstate = newstate(xstrdup(buf+1));
+ for (thischar = 0; thischar <= 0x3f; thischar++) {
+ setcode(thisstate, thischar+0x80, thischar+(prefix<<6));
+ }
+ }
+
+ /* Populate 3-char sequences, which the decoder handles
+ * magically, outside of the state system. */
+ for (thischar = 0xe0; thischar <= 0xef; thischar++) {
+ table[start_state].ch[thischar].action = "U83";
+ }
+
+}
+
+static char basis_64[] =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+static void mkutf7table(void)
+{
+ int start_state, thisstate;
+ int thischar;
+ char *p;
+
+ table_num = 0;
+
+ start_state = newstate("START");
+
+ /* Populate the ascii section */
+ table[start_state].ch['+'].action = ">GOTSHIFT";
+ for (thischar = 0; thischar <= 0x7f; thischar++) {
+ if (!table[start_state].ch[thischar].action) {
+ setcode(start_state, thischar, thischar);
+ }
+ }
+
+ /* Normal base64 decoding table must be numbered 1 */
+ thisstate = newstate("B64NORMAL <");
+ table[thisstate].ch['-'].action = "<";
+ for (p = basis_64; *p; p++) {
+ table[thisstate].ch[*(unsigned char*)p].action = "U7N";
+ }
+ for (thischar = 0; thischar <= 0x7f; thischar++) {
+ if (!table[thisstate].ch[thischar].action) {
+ setcode(thisstate, thischar, thischar);
+ }
+ }
+
+ /* Populate initial base64 decoding table */
+ thisstate = newstate("GOTSHIFT <");
+ setcode(thisstate, '-', '+');
+ for (p = basis_64; *p; p++) {
+ table[thisstate].ch[*(unsigned char*)p].action = "U7F";
+ }
+}
+
+static int
+newstate(char *args)
+{
+ char *p;
+ int i;
+
+ if (table_num == table_alloc) {
+ table_alloc += TABLEGROW;
+ table = (struct table *)xrealloc((char *)table,
+ table_alloc * sizeof(struct table));
+ }
+
+ table[table_num].name = xstrdup(args);
+ table[table_num].endaction = "END";
+ for (i = 0; i < 256; i++) {
+ table[table_num].ch[i].code = -1;
+ table[table_num].ch[i].translation = 0;
+ table[table_num].ch[i].trans_offset = 0;
+ table[table_num].ch[i].action = 0;
+ table[table_num].ch[i].comment = 0;
+ }
+
+ p = table[table_num].name;
+ while (*p && !isspace(*(unsigned char*)p)) p++;
+ if (*p) *p++ = '\0';
+ while (*p) {
+ if (*p == '<') table[table_num].endaction = "RET";
+ p++;
+ }
+
+ return table_num++;
+}
+
+static int
+findstate(char *name)
+{
+ int i;
+
+ for (i = 0; i < table_num; i++) {
+ if (!strcmp(name, table[i].name)) return i;
+ }
+ return -1;
+}
+
+static void
+printtable(char *name)
+{
+ char buf[1024];
+ char *p;
+ int curstate, thischar;
+ int code;
+ char *end;
+ int i;
+
+ p = strrchr(name, '/');
+ if (!p) p = strrchr(name, '\\');
+ if (p) p++;
+ else p = name;
+ strcpy(buf, p);
+ if ((p = strchr(buf, '.')) != NULL) *p = '\0';
+ while ((p = strchr(buf, '-')) != NULL) *p = '_';
+
+ printf("const unsigned char chartables_%s[%d][256][4] = {\n", buf, table_num);
+
+ for (curstate = 0; curstate < table_num; curstate++) {
+ printf(" {");
+ if (table[curstate].name[0]) {
+ printf(" /* %s */", table[curstate].name);
+ }
+ printf("\n");
+
+ for (thischar = 0; thischar < 256; thischar++) {
+ printf(" {");
+ if ((code = table[curstate].ch[thischar].code) != -1) {
+ if (code && code <= 0x7f) {
+ if (isprint(code) && code != '\\' && code != '\"' &&
+ code != '\'') {
+ printf(" '%c', %s, 0, 0,", code,
+ table[curstate].endaction);
+ }
+ else {
+ printf(" %3d, %s, 0, 0,", code,
+ table[curstate].endaction);
+ }
+ }
+ else if (code <= 0x7FF) {
+ printf(" %3d, %3d, %s, 0,", 0xc0 + (code>>6),
+ 0x80+(code&0x3f), table[curstate].endaction);
+ }
+ else {
+ printf(" %3d, %3d, %3d, %s,", 0xe0 + (code>>12),
+ 0x80+((code>>6)&0x3f), 0x80+(code&0x3f),
+ table[curstate].endaction);
+ }
+ } else if ((code = table[curstate].ch[thischar].trans_offset) != 0) {
+ printf(" XLT, %3d, %3d, %s,", code >> 8, code & 0xff,
+ table[curstate].endaction);
+ } else if ((p = table[curstate].ch[thischar].translation) != 0) {
+ end = table[curstate].endaction;
+ for (i = 0; i < 4; i++) {
+ if (isprint((unsigned char)*p) && *p != '\\' && *p != '\"' && *p != '\'') {
+ printf(" '%c',", *p);
+ }
+ else if (!*p) {
+ printf(" %s,", end);
+ end = " 0";
+ }
+ else {
+ printf(" %3d,", (unsigned char)*p);
+ }
+ if (*p) p++;
+ }
+ }
+ else if ((p = table[curstate].ch[thischar].action) == 0) {
+ printf(" EMPTY, %s, 0, 0,", table[curstate].endaction);
+ }
+ else if (*p == '<') {
+ printf(" RET, 0, 0, 0,");
+ }
+ else if (*p == 'U') {
+ printf(" %s, 0, 0, 0,", p);
+ }
+ else {
+ code = findstate(p+1);
+ if (code == -1) {
+ fprintf(stderr, "%s: unknown state %s\n", name, p+1);
+ }
+ printf(" %s, %3d, %3d, 0,",
+ *p == '>' ? "JSR" : "JMP",
+ (code>>8), (code&0xff));
+ }
+ printf(" },");
+ if (table[curstate].ch[thischar].comment) {
+ printf(" /* %s */", table[curstate].ch[thischar].comment);
+ }
+ printf("\n");
+ }
+ printf(" },\n");
+ }
+ printf("};\n\n");
+}
+
+static void
+freetabledata(void)
+{
+ int curstate, thischar;
+/* char *cp; */
+
+ for (curstate = 0; curstate < table_num; curstate++) {
+ for (thischar = 0; thischar < 256; thischar++) {
+ if (table[curstate].ch[thischar].comment != NULL) {
+ free(table[curstate].ch[thischar].comment);
+ }
+
+ if (table[curstate].ch[thischar].action != NULL) {
+ free(table[curstate].ch[thischar].action);
+ }
+ }
+ if (table[curstate].name != NULL) {
+ free(table[curstate].name);
+ }
+ }
+}
+
+static void
+freetable(void)
+{
+ if (table_alloc) {
+ free(table);
+ table_alloc=0;
+ }
+}
+
+static void
+freemap(void)
+{
+ int n;
+/* int n_mapcode; */
+
+ for (n = 0; n < map_num; n++) {
+ if (map[n].translation != NULL) {
+ free(map[n].translation);
+ }
+ }
+
+ if (map_alloc) {
+ free(map);
+ map_alloc=0;
+ }
+}
+
+void fatal(const char* s, int c)
+{
+ fprintf(stderr, "Error while building charset table: %s\n", s);
+ exit(c);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,163 @@
+/* mkgmtime.c - make time corresponding to a GMT timeval struct
+ $Id: mkgmtime.c,v 1.10 2003/10/22 18:50:12 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+/*
+ * Copyright (c) 1987, 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Arthur David Olson of the National Cancer Institute.
+ *
+ * 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University 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.
+ */
+
+/*
+** Adapted from code provided by Robert Elz, who writes:
+** The "best" way to do mktime I think is based on an idea of Bob
+** Kridle's (so its said...) from a long time ago. (mtxinu!kridle now).
+** It does a binary search of the time_t space. Since time_t's are
+** just 32 bits, its a max of 32 iterations (even at 64 bits it
+** would still be very reasonable).
+*/
+
+#include <config.h>
+
+#ifndef WRONG
+#define WRONG (-1)
+#endif /* !defined WRONG */
+
+static int
+tmcomp(atmp, btmp)
+register const struct tm * const atmp;
+register const struct tm * const btmp;
+{
+ register int result;
+
+ if ((result = (atmp->tm_year - btmp->tm_year)) == 0 &&
+ (result = (atmp->tm_mon - btmp->tm_mon)) == 0 &&
+ (result = (atmp->tm_mday - btmp->tm_mday)) == 0 &&
+ (result = (atmp->tm_hour - btmp->tm_hour)) == 0 &&
+ (result = (atmp->tm_min - btmp->tm_min)) == 0)
+ result = atmp->tm_sec - btmp->tm_sec;
+ return result;
+}
+
+time_t
+mkgmtime(tmp)
+struct tm * const tmp;
+{
+ register int dir;
+ register int bits;
+ register int saved_seconds;
+ time_t t;
+ struct tm yourtm, *mytm;
+
+ yourtm = *tmp;
+ saved_seconds = yourtm.tm_sec;
+ yourtm.tm_sec = 0;
+ /*
+ ** Calculate the number of magnitude bits in a time_t
+ ** (this works regardless of whether time_t is
+ ** signed or unsigned, though lint complains if unsigned).
+ */
+ for (bits = 0, t = 1; t > 0; ++bits, t <<= 1)
+ ;
+ /*
+ ** If time_t is signed, then 0 is the median value,
+ ** if time_t is unsigned, then 1 << bits is median.
+ */
+ t = (t < 0) ? 0 : ((time_t) 1 << bits);
+
+ /* Some gmtime() implementations are broken and will return
+ * NULL for time_ts larger than 40 bits even on 64-bit platforms
+ * so we'll just cap it at 40 bits */
+ if(bits > 40) bits = 40;
+
+ for ( ; ; ) {
+ mytm = gmtime(&t);
+
+ if(!mytm) return WRONG;
+
+ dir = tmcomp(mytm, &yourtm);
+ if (dir != 0) {
+ if (bits-- < 0)
+ return WRONG;
+ if (bits < 0)
+ --t;
+ else if (dir > 0)
+ t -= (time_t) 1 << bits;
+ else t += (time_t) 1 << bits;
+ continue;
+ }
+ break;
+ }
+ t += saved_seconds;
+ return t;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mkgmtime.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+/* mkgmtime.h -- make a time_t from a gmtime struct tm
+ $Id: mkgmtime.h,v 1.5 2003/02/13 20:15:41 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_MKGMTIME_H
+#define INCLUDED_MKGMTIME_H
+
+#ifndef P
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+#endif
+
+#include <time.h>
+
+extern time_t mkgmtime P((struct tm * const tmp));
+
+#endif /* INCLUDED_MKGMTIME_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,195 @@
+/* mpool.c memory pool management
+ *
+ * $Id: mpool.c,v 1.14.2.1 2006/01/16 15:39:09 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <errno.h>
+
+#include "mpool.h"
+#include "xmalloc.h"
+#include "exitcodes.h"
+
+struct mpool
+{
+ struct mpool_blob *blob;
+};
+
+struct mpool_blob
+{
+ size_t size;
+ unsigned char *base; /* Base of allocated section */
+ unsigned char *ptr; /* End of allocated section */
+ struct mpool_blob *next; /* Next Pool */
+};
+
+static struct mpool_blob *new_mpool_blob(size_t size)
+{
+ struct mpool_blob *blob = xmalloc(sizeof(struct mpool_blob));
+
+ if(!size) size = DEFAULT_MPOOL_SIZE;
+
+ blob->base = blob->ptr = xmalloc(size);
+ blob->size = size;
+ blob->next = NULL;
+
+ return blob;
+}
+
+/* Create a new pool */
+struct mpool *new_mpool(size_t size)
+{
+ struct mpool *ret = xmalloc(sizeof(struct mpool));
+
+ ret->blob = new_mpool_blob(size);
+
+ return ret;
+}
+
+/* Free a pool */
+void free_mpool(struct mpool *pool)
+{
+ struct mpool_blob *p, *p_next;
+
+ if (!pool) return;
+ if (!pool->blob) {
+ fatal("memory pool without a blob", EC_TEMPFAIL);
+ return;
+ }
+
+ p = pool->blob;
+
+ while(p) {
+ p_next = p->next;
+ free(p->base);
+ free(p);
+ p = p_next;
+ }
+
+ free(pool);
+}
+
+#ifdef ROUNDUP
+#undef ROUNDUP
+#endif
+
+/* round up to the next multiple of 16 bytes if necessary */
+/* 0xFF...FFF0 = ~0 ^ 0xF */
+#define ROUNDUP(num) (((num) + 15) & (~((unsigned long) 0x0) ^ 0xF))
+
+/* Allocate from a pool */
+void *mpool_malloc(struct mpool *pool, size_t size)
+{
+ void *ret = NULL;
+ struct mpool_blob *p;
+ size_t remain;
+
+ if(!pool || !pool->blob) {
+ fatal("mpool_malloc called without a valid pool", EC_TEMPFAIL);
+ }
+ if(!size) {
+ /* This is legal under ANSI C, so we should allow it too */
+ size = 1;
+ }
+
+ p = pool->blob;
+
+ /* This is a bit tricky, not only do we have to make sure that the current
+ * pool has enough room, we need to be sure that we haven't rounded p->ptr
+ * outside of the current pool anyway */
+
+ remain = p->size - ((char *)p->ptr - (char *)p->base);
+
+ if (remain < size ||
+ (char *) p->ptr > (p->size + (char *) p->base)) {
+ /* Need a new pool */
+ struct mpool_blob *new_pool;
+ size_t new_pool_size = 2 * ((size > p->size) ? size : p->size);
+
+ new_pool = new_mpool_blob(new_pool_size);
+ new_pool->next = p;
+ p = pool->blob = new_pool;
+ }
+
+ ret = p->ptr;
+
+ /* make sure that the next thing we allocate is align on
+ a ROUNDUP boundary */
+ p->ptr = p->base + ROUNDUP(p->ptr - p->base + size);
+
+ return ret;
+}
+
+char *mpool_strndup(struct mpool *pool, const char *str, size_t n)
+{
+ char *ret;
+
+ if(!str) return NULL;
+
+ ret = mpool_malloc(pool, n+1);
+ strncpy(ret, str, n);
+ ret[n] = '\0';
+
+ return ret;
+}
+
+
+char *mpool_strdup(struct mpool *pool, const char *str)
+{
+ size_t len;
+
+ if(!str) return NULL;
+
+ len = strlen(str);
+
+ return mpool_strndup(pool, str, len);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/mpool.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,75 @@
+/* mpool.h memory pool management
+ *
+ * $Id: mpool.h,v 1.10.2.1 2006/01/16 15:39:09 murch Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _MPOOL_H_
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <errno.h>
+
+/* Opaque mpool handle */
+struct mpool;
+
+#define DEFAULT_MPOOL_SIZE 32768
+
+/* Create a new pool -- pass zero for default */
+/* 'size' is the size of the first blob of memory that will be allocated */
+struct mpool *new_mpool(size_t size);
+
+/* Free a pool */
+void free_mpool(struct mpool *pool);
+
+/* Allocate from a pool */
+void *mpool_malloc(struct mpool *pool, size_t size);
+char *mpool_strdup(struct mpool *pool, const char *str);
+char *mpool_strndup(struct mpool *pool, const char *str, size_t n);
+
+#endif /* _MPOOL_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+/* nonblock.h -- Set nonbolocking mode on file descriptor
+ * $Id: nonblock.h,v 1.8 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_NONBLOCK_H
+#define INCLUDED_NONBLOCK_H
+
+#ifndef P
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+#endif
+
+extern const char *nonblock_method_desc;
+
+extern void nonblock P((int fd, int mode));
+
+#endif /* INCLUDED_NONBLOCK_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_fcntl.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_fcntl.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_fcntl.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_fcntl.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,86 @@
+/* nonblock_fcntl.c -- Set nonblocking mode using fcntl()
+ * $Id: nonblock_fcntl.c,v 1.15 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+#include <sys/types.h>
+#include <sys/file.h>
+#include <fcntl.h>
+
+#include "xmalloc.h"
+#include "exitcodes.h"
+#include "nonblock.h"
+
+#ifndef FNDELAY
+#define FNDELAY O_NDELAY
+#endif
+
+#ifdef O_NONBLOCK
+#define NON_BLOCKING_MODE O_NONBLOCK
+#else
+#define NON_BLOCKING_MODE FNDELAY
+#endif
+
+const char *nonblock_method_desc = "fcntl";
+
+/*
+ * Modifies the non-blocking mode on the file descriptor 'fd'. If
+ * 'mode' is nonzero, sets non-blocking mode, if 'mode' is zero
+ * clears non-blocking mode.
+ */
+void
+nonblock(fd, mode)
+int fd;
+int mode;
+{
+ int flags;
+
+ flags = fcntl(fd, F_GETFL, 0);
+ if (flags < 0) fatal("Internal error: fcntl F_GETFL failed", EC_IOERR);
+ if (mode) {
+ flags |= NON_BLOCKING_MODE;
+ }
+ else {
+ flags &= ~NON_BLOCKING_MODE;
+ }
+ fcntl(fd, F_SETFL, flags);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_ioctl.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_ioctl.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_ioctl.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/nonblock_ioctl.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,66 @@
+/* nonblock_fcntl.c -- Set nonblocking mode using ioctl()
+ * $Id: nonblock_ioctl.c,v 1.11 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+#include <config.h>
+#include <sys/ioctl.h>
+
+#include "nonblock.h"
+
+const char *nonblock_method_desc = "ioctl";
+
+/*
+ * Modifies the non-blocking mode on the file descriptor 'fd'. If
+ * 'mode' is nonzero, sets non-blocking mode, if 'mode' is zero
+ * clears non-blocking mode.
+ */
+void
+nonblock(fd, mode)
+int fd;
+int mode;
+{
+ mode = mode ? 1 : 0;
+
+ if (ioctl(fd, FIONBIO, (char *)&mode) < 0) {
+ fatal("Internal error: ioctl FIONBIO failed");
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,368 @@
+/* parseaddr.c -- RFC 822 address parser
+ * $Id: parseaddr.c,v 1.17 2003/02/13 20:15:41 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "parseaddr.h"
+#include "xmalloc.h"
+
+static char parseaddr_unspecified_domain[] = "unspecified-domain";
+
+static void parseaddr_append (struct address ***addrpp, char *name,
+ char *route, char *mailbox, char *domain,
+ char **freemep);
+static int parseaddr_phrase (char **inp, char **phrasep, char *specials);
+static int parseaddr_domain (char **inp, char **domainp, char **commmentp);
+static int parseaddr_route (char **inp, char **routep);
+
+/*
+ * Parse an address list in 's', appending address structures to
+ * the list pointed to by 'addrp'.
+ */
+void
+parseaddr_list(str, addrp)
+const char *str;
+struct address **addrp;
+{
+ char *s;
+ int ingroup = 0;
+ char *freeme;
+ int tok = ' ';
+ char *phrase, *route, *mailbox, *domain, *comment;
+
+ /* Skip down to the tail */
+ while (*addrp) {
+ addrp = &(*addrp)->next;
+ }
+
+ s = freeme = xstrdup(str);
+
+ while (tok) {
+ tok = parseaddr_phrase(&s, &phrase, ingroup ? ",@<;" : ",@<:");
+ switch (tok) {
+ case ',':
+ case '\0':
+ case ';':
+ if (*phrase) {
+ parseaddr_append(&addrp, 0, 0, phrase, "", &freeme);
+ }
+ if (tok == ';') {
+ parseaddr_append(&addrp, 0, 0, 0, 0, &freeme);
+ ingroup = 0;
+ }
+ continue;
+
+ case ':':
+ parseaddr_append(&addrp, 0, 0, phrase, 0, &freeme);
+ ingroup++;
+ continue;
+
+ case '@':
+ tok = parseaddr_domain(&s, &domain, &comment);
+ parseaddr_append(&addrp, comment, 0, phrase, domain, &freeme);
+ continue;
+
+ case '<':
+ tok = parseaddr_phrase(&s, &mailbox, "@>");
+ if (tok == '@') {
+ route = 0;
+ if (!*mailbox) {
+ *--s = '@';
+ tok = parseaddr_route(&s, &route);
+ if (tok != ':') {
+ parseaddr_append(&addrp, phrase, route, "", "", &freeme);
+ while (tok && tok != '>') tok = *s++;
+ continue;
+ }
+ tok = parseaddr_phrase(&s, &mailbox, "@>");
+ if (tok != '@') {
+ parseaddr_append(&addrp, phrase, route, mailbox, "",
+ &freeme);
+ continue;
+ }
+ }
+ tok = parseaddr_domain(&s, &domain, 0);
+ parseaddr_append(&addrp, phrase, route, mailbox, domain,
+ &freeme);
+ while (tok && tok != '>') tok = *s++;
+ continue; /* effectively auto-inserts a comma */
+ }
+ else {
+ parseaddr_append(&addrp, phrase, 0, mailbox, "", &freeme);
+ }
+ }
+ }
+ if (ingroup) parseaddr_append(&addrp, 0, 0, 0, 0, &freeme);
+
+ if (freeme) free(freeme);
+}
+
+/*
+ * Free the address list 'addr'
+ */
+void
+parseaddr_free(addr)
+struct address *addr;
+{
+ struct address *next;
+
+ while (addr) {
+ if (addr->freeme) free(addr->freeme);
+ next = addr->next;
+ free((char *)addr);
+ addr = next;
+ }
+}
+
+/*
+ * Helper function to append a new address structure to and address list.
+ */
+static void
+parseaddr_append(addrpp, name, route, mailbox, domain, freemep)
+struct address ***addrpp;
+char *name;
+char *route;
+char *mailbox;
+char *domain;
+char **freemep;
+{
+ struct address *newaddr;
+
+ newaddr = (struct address *)xmalloc(sizeof(struct address));
+ if (name && *name) {
+ newaddr->name = name;
+ }
+ else {
+ newaddr->name = 0;
+ }
+
+ if (route && *route) {
+ newaddr->route = route;
+ }
+ else {
+ newaddr->route = 0;
+ }
+
+ newaddr->mailbox = mailbox;
+
+ if (domain && !*domain) {
+ domain = parseaddr_unspecified_domain;
+ }
+ newaddr->domain = domain;
+
+ newaddr->next = 0;
+ newaddr->freeme = *freemep;
+ *freemep = 0;
+
+ **addrpp = newaddr;
+ *addrpp = &newaddr->next;
+}
+
+/* Macro to skip white space and rfc822 comments */
+
+#define SKIPWHITESPACE(s) \
+{ \
+ int _c, _comment = 0; \
+ \
+ while ((_c = *(s))) { \
+ if (_c == '(') { \
+ _comment = 1; \
+ (s)++; \
+ while ((_comment && (_c = *(s)))) { \
+ (s)++; \
+ if (_c == '\\' && *(s)) (s)++; \
+ else if (_c == '(') _comment++; \
+ else if (_c == ')') _comment--; \
+ } \
+ (s)--; \
+ } \
+ else if (!isspace(_c)) break; \
+ (s)++; \
+ } \
+}
+
+/*
+ * Parse an RFC 822 "phrase", stopping at 'specials'
+ */
+static int parseaddr_phrase(inp, phrasep, specials)
+char **inp;
+char **phrasep;
+char *specials;
+{
+ int c;
+ char *src = *inp;
+ char *dst;
+
+ SKIPWHITESPACE(src);
+
+ *phrasep = dst = src;
+
+ for (;;) {
+ c = *src++;
+ if (c == '\"') {
+ while ((c = *src)) {
+ src++;
+ if (c == '\"') break;
+ if (c == '\\') {
+ if (!(c = *src)) break;
+ src++;
+ }
+ *dst++ = c;
+ }
+ }
+ else if (isspace(c) || c == '(') {
+ src--;
+ SKIPWHITESPACE(src);
+ *dst++ = ' ';
+ }
+ else if (!c || strchr(specials, c)) {
+ if (dst > *phrasep && dst[-1] == ' ') dst--;
+ *dst = '\0';
+ *inp = src;
+ return c;
+ }
+ else {
+ *dst++ = c;
+ }
+ }
+}
+
+/*
+ * Parse a domain. If 'commentp' is non-nil, parses any trailing comment
+ */
+static int parseaddr_domain(inp, domainp, commentp)
+char **inp;
+char **domainp;
+char **commentp;
+{
+ int c;
+ char *src = *inp;
+ char *dst;
+ char *cdst;
+ int comment;
+
+ if (commentp) *commentp = 0;
+ SKIPWHITESPACE(src);
+
+ *domainp = dst = src;
+
+ for (;;) {
+ c = *src++;
+ if (isalnum(c) || c == '-' || c == '[' || c == ']' || c == ':') {
+ *dst++ = c;
+ if (commentp) *commentp = 0;
+ }
+ else if (c == '.') {
+ if (dst > *domainp && dst[-1] != '.') *dst++ = c;
+ if (commentp) *commentp = 0;
+ }
+ else if (c == '(') {
+ if (commentp) {
+ *commentp = cdst = src;
+ comment = 1;
+ while (comment && (c = *src)) {
+ src++;
+ if (c == '(') comment++;
+ else if (c == ')') comment--;
+ else if (c == '\\' && (c = *src)) src++;
+
+ if (comment) *cdst++ = c;
+ }
+ *cdst = '\0';
+ }
+ else {
+ src--;
+ SKIPWHITESPACE(src);
+ }
+ }
+ else if (!isspace(c)) {
+ if (dst > *domainp && dst[-1] == '.') dst--;
+ *dst = '\0';
+ *inp = src;
+ return c;
+ }
+ }
+}
+
+/*
+ * Parse a source route (at-domain-list)
+ */
+static int parseaddr_route(inp, routep)
+char **inp;
+char **routep;
+{
+ int c;
+ char *src = *inp;
+ char *dst;
+
+ SKIPWHITESPACE(src);
+
+ *routep = dst = src;
+
+ for (;;) {
+ c = *src++;
+ if (isalnum(c) || c == '-' || c == '[' || c == ']' ||
+ c == ',' || c == '@') {
+ *dst++ = c;
+ }
+ else if (c == '.') {
+ if (dst > *routep && dst[-1] != '.') *dst++ = c;
+ }
+ else if (isspace(c) || c == '(') {
+ src--;
+ SKIPWHITESPACE(src);
+ }
+ else {
+ while (dst > *routep &&
+ (dst[-1] == '.' || dst[-1] == ',' || dst[-1] == '@')) dst--;
+ *dst = '\0';
+ *inp = src;
+ return c;
+ }
+ }
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/parseaddr.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,69 @@
+/* parseaddr.h -- RFC 822 address parser
+ $Id: parseaddr.h,v 1.8 2003/02/13 20:15:41 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#ifndef INCLUDED_PARSEADDR_H
+#define INCLUDED_PARSEADDR_H
+
+#ifndef P
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+#endif
+
+struct address {
+ char *name;
+ char *route;
+ char *mailbox;
+ char *domain;
+ struct address *next;
+ char *freeme; /* If non-nil, free */
+};
+
+extern void parseaddr_list P((const char *s, struct address **addrp));
+extern void parseaddr_free P((struct address *addr));
+
+
+#endif /* INCLUDED_PARSEADDR_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1324 @@
+/* prot.c -- stdio-like module that handles SASL protection mechanisms
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+/*
+ * $Id: prot.c,v 1.82.2.13 2006/03/13 20:05:04 murch Exp $
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <syslog.h>
+#include <signal.h>
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <netinet/in.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include "assert.h"
+#include "exitcodes.h"
+#include "map.h"
+#include "nonblock.h"
+#include "prot.h"
+#include "util.h"
+#include "xmalloc.h"
+
+/* Transparant protgroup structure */
+struct protgroup
+{
+ size_t nalloced; /* Number of nodes in the group */
+ size_t next_element; /* Node number of next group member */
+ struct protstream **group;
+};
+
+/*
+ * Create a new protection stream for file descriptor 'fd'. Stream
+ * will be used for writing iff 'write' is nonzero.
+ */
+struct protstream *prot_new(fd, write)
+int fd;
+int write;
+{
+ struct protstream *newstream;
+
+ newstream = (struct protstream *) xzmalloc(sizeof(struct protstream));
+ newstream->buf = (unsigned char *)
+ xmalloc(sizeof(char) * (PROT_BUFSIZE));
+ newstream->buf_size = PROT_BUFSIZE;
+ newstream->ptr = newstream->buf;
+ newstream->maxplain = PROT_BUFSIZE;
+ newstream->fd = fd;
+ newstream->write = write;
+ newstream->logfd = PROT_NO_FD;
+ newstream->big_buffer = PROT_NO_FD;
+ if(write)
+ newstream->cnt = PROT_BUFSIZE;
+
+ return newstream;
+}
+
+/*
+ * Free a protection stream
+ */
+int prot_free(struct protstream *s)
+{
+ if (s->error) free(s->error);
+ free(s->buf);
+
+ if(s->big_buffer != PROT_NO_FD) {
+ map_free(&(s->bigbuf_base), &(s->bigbuf_siz));
+ close(s->big_buffer);
+ }
+
+ free((char*)s);
+
+ return 0;
+}
+
+/*
+ * Set the logging file descriptor for stream 's' to be 'fd'.
+ */
+int prot_setlog(struct protstream *s, int fd)
+{
+ s->logfd = fd;
+ return 0;
+}
+
+#ifdef HAVE_SSL
+
+/*
+ * Turn on TLS for this connection
+ */
+
+int prot_settls(struct protstream *s, SSL *tlsconn)
+{
+ s->tls_conn = tlsconn;
+
+ /* Make nonblocking stuff to work similar to write() */
+ SSL_set_mode(tlsconn,
+ SSL_MODE_ENABLE_PARTIAL_WRITE
+ | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+
+ return 0;
+}
+
+#endif /* HAVE_SSL */
+
+/*
+ * Turn on SASL for this connection
+ */
+
+int prot_setsasl(s, conn)
+struct protstream *s;
+sasl_conn_t *conn;
+{
+ const int *ssfp;
+ int result;
+
+ if (s->write && s->ptr != s->buf) {
+ /* flush any pending output */
+ if(prot_flush_internal(s,0) == EOF)
+ return EOF;
+ }
+
+ s->conn = conn;
+
+ result = sasl_getprop(conn, SASL_SSF, (const void **) &ssfp);
+ if (result != SASL_OK) {
+ return -1;
+ }
+ s->saslssf = *ssfp;
+
+ if (s->write) {
+ int result;
+ const unsigned int *maxp;
+ unsigned int max;
+
+ /* ask SASL for layer max */
+ result = sasl_getprop(conn, SASL_MAXOUTBUF, (const void **) &maxp);
+ max = *maxp;
+ if (result != SASL_OK) {
+ return -1;
+ }
+
+ if (max == 0 || max > PROT_BUFSIZE) {
+ /* max = 0 means unlimited, and we can't go bigger */
+ max = PROT_BUFSIZE;
+ }
+
+ s->maxplain = max;
+ s->cnt = max;
+ }
+ else if (s->cnt) {
+ /* flush any pending input */
+ s->cnt = 0;
+ }
+
+ return 0;
+}
+
+/*
+ * Set the read timeout for the stream 's' to 'timeout' seconds.
+ * 's' must have been created for reading.
+ */
+int prot_settimeout(struct protstream *s, int timeout)
+{
+ assert(!s->write);
+
+ s->read_timeout = timeout;
+ s->timeout_mark = time(NULL) + timeout;
+ return 0;
+}
+
+/*
+ * Reset the read timeout_mark for the stream 's'.
+ * 'S' must have been created for reading.
+ */
+int prot_resettimeout(struct protstream *s)
+{
+ assert(!s->write);
+
+ s->timeout_mark = time(NULL) + s->read_timeout;
+ return 0;
+}
+
+/*
+ * Set the stream 's' to flush the stream 'flushs' before
+ * blocking for reading. 's' must have been created for reading,
+ * 'flushs' for writing.
+ */
+int prot_setflushonread(struct protstream *s, struct protstream *flushs)
+{
+ assert(!s->write);
+ if(flushs) assert(flushs->write);
+
+ s->flushonread = flushs;
+ return 0;
+}
+
+/*
+ * Set on stream 's' the callback 'proc' and 'rock'
+ * to make the next time we have to wait for input.
+ */
+int prot_setreadcallback(struct protstream *s,
+ prot_readcallback_t *proc, void *rock)
+{
+ assert(!s->write);
+
+ s->readcallback_proc = proc;
+ s->readcallback_rock = rock;
+ return 0;
+}
+
+/*
+ * Add an event on stream 's' so that the callback 'proc' taking
+ * argument 'rock' will be called at 'mark' (in seconds) while
+ * waiting for input.
+ */
+struct prot_waitevent *prot_addwaitevent(struct protstream *s, time_t mark,
+ prot_waiteventcallback_t *proc,
+ void *rock)
+{
+ struct prot_waitevent *new, *cur;
+
+ /* if we aren't passed a callback function, don't bother */
+ if (!proc) return s->waitevent;
+
+ /* create new timer struct */
+ new = (struct prot_waitevent *) xmalloc(sizeof(struct prot_waitevent));
+ new->mark = mark;
+ new->proc = proc;
+ new->rock = rock;
+ new->next = NULL;
+
+ /* add the new event to the end of the list */
+ if (!s->waitevent)
+ s->waitevent = new;
+ else {
+ cur = s->waitevent;
+ while (cur && cur->next) cur = cur->next;
+ cur->next = new;
+ }
+
+ return new;
+}
+
+/*
+ * Remove 'event' from stream 's'.
+ */
+void prot_removewaitevent(struct protstream *s, struct prot_waitevent *event)
+{
+ struct prot_waitevent *prev, *cur;
+
+ prev = NULL;
+ cur = s->waitevent;
+
+ while (cur && cur != event) {
+ prev = cur;
+ cur = cur->next;
+ }
+
+ if (!cur) return;
+
+ if (!prev)
+ s->waitevent = cur->next;
+ else
+ prev->next = cur->next;
+
+ free(cur);
+}
+
+/*
+ * Return a pointer to a statically-allocated string describing the
+ * error encountered on 's'. If there is no error condition, return a
+ * null pointer.
+ */
+const char *prot_error(struct protstream *s)
+{
+ if(!s) return "bad protstream passed to prot_error";
+ else if(s->error) return s->error;
+ else if(s->eof) return PROT_EOF_STRING;
+ else return NULL;
+}
+
+/*
+ * Rewind the stream 's'. 's' must have been created for reading.
+ */
+int prot_rewind(struct protstream *s)
+{
+ assert(!s->write);
+
+ if (lseek(s->fd, 0L, 0) == -1) {
+ s->error = xstrdup(strerror(errno));
+ return EOF;
+ }
+ s->cnt = 0;
+ s->error = 0;
+ s->eof = 0;
+ return 0;
+}
+
+/*
+ * Read data into the empty buffer for the stream 's' and return the
+ * first character. Returns EOF on EOF or error.
+ */
+int prot_fill(struct protstream *s)
+{
+ int n;
+ unsigned char *ptr;
+ int left;
+ int r;
+ struct timeval timeout;
+ fd_set rfds;
+ int haveinput;
+ time_t read_timeout;
+ struct prot_waitevent *event, *next;
+
+ assert(!s->write);
+
+ /* Zero errno just in case */
+ errno = 0;
+
+ if (s->eof || s->error) return EOF;
+
+ do {
+ /* wait until get input */
+ haveinput = 0;
+
+#ifdef HAVE_SSL
+ /* maybe there's data stuck in the SSL buffer? */
+ if (s->tls_conn != NULL) {
+ haveinput = SSL_pending(s->tls_conn);
+ }
+#endif
+
+ /* if we've promised to call something before blocking or
+ flush an output stream, check to see if we're going to block */
+ if (s->readcallback_proc ||
+ (s->flushonread && s->flushonread->ptr != s->flushonread->buf)) {
+ timeout.tv_sec = timeout.tv_usec = 0;
+ FD_ZERO(&rfds);
+ FD_SET(s->fd, &rfds);
+
+ if (!haveinput &&
+ (select(s->fd + 1, &rfds, (fd_set *)0, (fd_set *)0,
+ &timeout) <= 0)) {
+ if (s->readcallback_proc) {
+ (*s->readcallback_proc)(s, s->readcallback_rock);
+ s->readcallback_proc = 0;
+ s->readcallback_rock = 0;
+ }
+ /* Request a flush of the buffer. If we are a blocking
+ read stream, force the flush */
+ if (s->flushonread)
+ prot_flush_internal(s->flushonread, !s->dontblock);
+ }
+ else {
+ haveinput = 1;
+ }
+ }
+
+ if (!haveinput && (s->read_timeout || s->dontblock)) {
+ time_t now = time(NULL);
+ time_t sleepfor;
+
+ read_timeout = s->dontblock ? now : s->timeout_mark;
+ do {
+ if (read_timeout < now)
+ sleepfor = 0;
+ else
+ sleepfor = read_timeout - now;
+ /* execute each callback that has timed out */
+ for (event = s->waitevent; event; event = next)
+ {
+ next = event->next;
+ if (now >= event->mark) {
+ event = (*event->proc)(s, event, event->rock);
+ }
+ /* if event == NULL, the callback has removed itself */
+ if (event && sleepfor > (event->mark - now)) {
+ sleepfor = event->mark - now;
+ }
+ }
+
+ /* check for input */
+ timeout.tv_sec = sleepfor;
+ timeout.tv_usec = 0;
+ FD_ZERO(&rfds);
+ FD_SET(s->fd, &rfds);
+ r = select(s->fd + 1, &rfds, (fd_set *)0, (fd_set *)0,
+ &timeout);
+ now = time(NULL);
+ } while ((r == 0 || (r == -1 && errno == EINTR)) &&
+ (now < read_timeout));
+ if ((r == 0) ||
+ /* ignore EINTR if we've timed out */
+ (r == -1 && errno == EINTR && now >= read_timeout)) {
+ if (!s->dontblock) {
+ s->error = xstrdup("idle for too long");
+ return EOF;
+ } else {
+ errno = EAGAIN;
+ return EOF;
+ }
+ }
+ else if (r == -1) {
+ syslog(LOG_ERR, "select() failed: %m");
+ s->error = xstrdup(strerror(errno));
+ return EOF;
+ }
+ }
+
+ /* we have data, reset the timeout_mark */
+ s->timeout_mark = time(NULL) + s->read_timeout;
+
+ do {
+#ifdef HAVE_SSL
+ /* just do a SSL read instead if we're under a tls layer */
+ if (s->tls_conn != NULL) {
+ n = SSL_read(s->tls_conn, (char *) s->buf, PROT_BUFSIZE);
+ } else {
+ n = read(s->fd, s->buf, PROT_BUFSIZE);
+ }
+#else /* HAVE_SSL */
+ n = read(s->fd, s->buf, PROT_BUFSIZE);
+#endif /* HAVE_SSL */
+ } while (n == -1 && errno == EINTR);
+
+ if (n <= 0) {
+ if (n) s->error = xstrdup(strerror(errno));
+ else s->eof = 1;
+ return EOF;
+ }
+
+ if (s->saslssf) { /* decode it */
+ int result;
+ const char *out;
+ unsigned outlen;
+
+ /* Decode the input token */
+ result = sasl_decode(s->conn, (const char *) s->buf, n,
+ &out, &outlen);
+
+ if (result != SASL_OK) {
+ char errbuf[256];
+ const char *ed = sasl_errdetail(s->conn);
+
+ snprintf(errbuf, 256, "decoding error: %s; %s",
+ sasl_errstring(result, NULL, NULL),
+ ed ? ed : "no detail");
+ s->error = xstrdup(errbuf);
+ return EOF;
+ }
+
+ if (outlen > 0) {
+ /* XXX can we just serve data from 'out' without copying
+ it to s->buf ? */
+ if (outlen > s->buf_size) {
+ s->buf = (unsigned char *)
+ xrealloc(s->buf, sizeof(char) * (outlen + 4));
+ s->buf_size = outlen;
+ }
+ memcpy(s->buf, out, outlen);
+ s->ptr = s->buf + 1;
+ s->cnt = outlen;
+ } else { /* didn't decode anything */
+ s->cnt = 0;
+ }
+
+ } else {
+ /* No protection function, just use the raw data */
+ s->ptr = s->buf+1;
+ s->cnt = n;
+ }
+
+ if (s->cnt > 0) {
+ if (s->logfd != -1) {
+ time_t newtime;
+ char timebuf[20];
+
+ time(&newtime);
+ snprintf(timebuf, sizeof(timebuf), "<%ld<", newtime);
+ write(s->logfd, timebuf, strlen(timebuf));
+
+ left = s->cnt;
+ ptr = s->buf;
+ do {
+ n = write(s->logfd, ptr, left);
+ if (n == -1 && errno != EINTR) {
+ break;
+ }
+ if (n > 0) {
+ ptr += n;
+ left -= n;
+ }
+ } while (left);
+ }
+
+ s->cnt--; /* we return the first char */
+ return *s->buf;
+ }
+ } while (1);
+}
+
+/*
+ * Write out any buffered data in the stream 's'
+ */
+int prot_flush(struct protstream *s)
+{
+ return prot_flush_internal(s, 1);
+}
+
+/* Do the logging part of prot_flush */
+static void prot_flush_log(struct protstream *s)
+{
+ if(s->logfd != PROT_NO_FD) {
+ unsigned char *ptr = s->buf;
+ int left = s->ptr - s->buf;
+ int n;
+ time_t newtime;
+ char timebuf[20];
+
+ time(&newtime);
+ snprintf(timebuf, sizeof(timebuf), ">%ld>", newtime);
+ write(s->logfd, timebuf, strlen(timebuf));
+
+ do {
+ n = write(s->logfd, ptr, left);
+ if (n == -1 && errno != EINTR) {
+ break;
+ }
+ if (n > 0) {
+ ptr += n;
+ left -= n;
+ }
+ } while (left);
+ }
+}
+
+/* Do the encoding part of prot_flush */
+static int prot_flush_encode(struct protstream *s,
+ const char **output_buf,
+ unsigned *output_len)
+{
+ unsigned char *ptr = s->buf;
+ int left = s->ptr - s->buf;
+
+ if (s->saslssf != 0) {
+ /* encode the data */
+ int result = sasl_encode(s->conn, (char *) ptr, left,
+ output_buf, output_len);
+ if (result != SASL_OK) {
+ char errbuf[256];
+ const char *ed = sasl_errdetail(s->conn);
+
+ snprintf(errbuf, 256, "encoding error: %s; %s",
+ sasl_errstring(result, NULL, NULL),
+ ed ? ed : "no detail");
+ s->error = xstrdup(errbuf);
+
+ return EOF;
+ }
+ } else {
+ *output_buf = (char *) ptr;
+ *output_len = left;
+ }
+ return 0;
+}
+
+/* A wrapper for write() that handles SSL and EINTR */
+static int prot_flush_writebuffer(struct protstream *s,
+ const char *buf, size_t len)
+{
+ int n;
+
+ do {
+#ifdef HAVE_SSL
+ if (s->tls_conn != NULL) {
+ n = SSL_write(s->tls_conn, (char *)buf, len);
+ } else {
+ n = write(s->fd, buf, len);
+ }
+#else /* HAVE_SSL */
+ n = write(s->fd, buf, len);
+#endif /* HAVE_SSL */
+ } while (n == -1 && errno == EINTR);
+
+ return n;
+}
+
+int prot_flush_internal(struct protstream *s, int force)
+{
+ int n;
+ int save_dontblock = s->dontblock;
+
+ const char *ptr = (char *) s->buf; /* Memory buffer info */
+ unsigned left = s->ptr - s->buf;
+
+ assert(s->write);
+ assert(s->cnt >= 0);
+
+ /* Is this protstream finished? */
+ if (s->eof || s->error) {
+ s->ptr = s->buf;
+ s->cnt = 1;
+ return EOF;
+ }
+
+ /* make sure that the main file descriptor is set up to
+ * be blocking or nonblocking based on the configuration of the
+ * protstream and the force flag */
+ if(force)
+ s->dontblock = 0;
+
+ if(s->dontblock != s->dontblock_isset) {
+ nonblock(s->fd,s->dontblock);
+ s->dontblock_isset = s->dontblock;
+ }
+
+ /* end protstream setup */
+
+ /* If we're doing a blocking write, flush the buffers, bigbuffer first */
+ if(!s->dontblock) {
+ if(s->big_buffer != PROT_NO_FD) {
+ /* Write the bigbuffer */
+ do {
+ n = prot_flush_writebuffer(s, s->bigbuf_base + s->bigbuf_pos,
+ s->bigbuf_len - s->bigbuf_pos);
+ if(n == -1) {
+ s->error = xstrdup(strerror(errno));
+ goto done;
+ } else if (n > 0) {
+ s->bigbuf_pos += n;
+ }
+ } while(s->bigbuf_len != s->bigbuf_pos);
+
+ /* Free the bigbuffer */
+ map_free(&(s->bigbuf_base), &(s->bigbuf_siz));
+ close(s->big_buffer);
+ s->bigbuf_len = s->bigbuf_pos = 0;
+ s->big_buffer = PROT_NO_FD;
+ }
+
+ /* Is there anything in the memory buffer? */
+ if(!left) {
+ goto done;
+ }
+
+ /* Do a regular write of whatever is left */
+
+ /* Log and Encode it */
+ prot_flush_log(s);
+
+ if(prot_flush_encode(s, &ptr, &left) == EOF) {
+ /* s->error set by prot_flush_encode */
+ goto done;
+ }
+
+ /* Write it to descriptor */
+ do {
+ n = prot_flush_writebuffer(s, ptr, left);
+ if(n == -1) {
+ s->error = xstrdup(strerror(errno));
+ goto done;
+ } else if (n > 0) {
+ ptr += n;
+ left -= n;
+ }
+ } while(left);
+ } else { /* Nonblocking */
+ /* If we've been feeding a bigbuffer, write out from the current
+ * position as much as we can */
+ if (s->big_buffer != PROT_NO_FD) {
+ /* Write what we can. */
+ n = prot_flush_writebuffer(s, s->bigbuf_base + s->bigbuf_pos,
+ s->bigbuf_len - s->bigbuf_pos);
+
+ if(n == -1 && errno == EAGAIN) {
+ /* No room in the pipe, but we don't care */
+ n = 0;
+ } else if(n == -1) {
+ s->error = xstrdup(strerror(errno));
+ goto done;
+ }
+
+ if (n > 0) {
+ s->bigbuf_pos += n;
+ }
+ }
+
+ /* If there isn't anything in the memory buffer, we're done now */
+ if(!left) {
+ goto done;
+ }
+
+ /* Prepare the data in the memory buffer */
+ prot_flush_log(s);
+
+ /* Encode it */
+ if(prot_flush_encode(s, &ptr, &left) == EOF) {
+ /* prot_flush_encode set s->error */
+ goto done;
+ }
+
+ if(s->big_buffer == PROT_NO_FD || s->bigbuf_pos == s->bigbuf_len) {
+ /* No bigbuffer currently open (or we've written the current
+ one to its entirety), so write what we can from memory */
+
+ n = prot_flush_writebuffer(s, ptr, left);
+
+ if(n == -1 && errno == EAGAIN) {
+ /* No room in the pipe, but we don't care */
+ n = 0;
+ } else if(n == -1) {
+ s->error = xstrdup(strerror(errno));
+ goto done;
+ }
+
+ if(n > 0) {
+ ptr += n;
+ left -= n;
+ }
+ }
+
+ /* if there is data still to send, it needs to go to the bigbuffer */
+ if(left) {
+ struct stat sbuf;
+
+ if(s->big_buffer == PROT_NO_FD) {
+ /* open new bigbuffer */
+ int fd = create_tempfile();
+ if(fd == -1) {
+ s->error = xstrdup(strerror(errno));
+ goto done;
+ }
+
+ s->big_buffer = fd;
+ }
+
+ do {
+ n = write(s->big_buffer, ptr, left);
+ if (n == -1 && errno != EINTR) {
+ syslog(LOG_ERR, "write to protstream buffer failed: %s",
+ strerror(errno));
+
+ fatal("write to big buffer failed", EC_OSFILE);
+ }
+ if (n > 0) {
+ ptr += n;
+ left -= n;
+ }
+ } while (left);
+
+ /* We did a write to the bigbuffer, refresh the memory map */
+ if (fstat(s->big_buffer, &sbuf) == -1) {
+ syslog(LOG_ERR, "IOERROR: fstating temp protlayer buffer: %m");
+ fatal("failed to fstat protlayer buffer", EC_IOERR);
+ }
+
+ s->bigbuf_len = sbuf.st_size;
+
+ map_refresh(s->big_buffer, 0, &(s->bigbuf_base), &(s->bigbuf_siz),
+ s->bigbuf_len, "temp protlayer buffer", NULL);
+ }
+
+ } /* end of blocking/nonblocking if statment */
+
+ /* Reset the memory buffer -- should be done on EOF or on success. */
+ s->ptr = s->buf;
+ s->cnt = s->maxplain;
+
+ done:
+ /* are we done with the big buffer? If so, free it. This includes
+ * when we exit with error */
+ if(s->big_buffer != PROT_NO_FD &&
+ (s->bigbuf_pos == s->bigbuf_len || s->error)) {
+ map_free(&(s->bigbuf_base), &(s->bigbuf_siz));
+ close(s->big_buffer);
+ s->bigbuf_len = s->bigbuf_pos = 0;
+ s->big_buffer = PROT_NO_FD;
+ }
+
+ if(force) {
+ /* we don't need to call nonblock() again, because it will be
+ * set correctly on the next prot_flush_internal() anyway */
+ s->dontblock = save_dontblock;
+ }
+
+ /* If we are exiting with an error, we should clear our memory buffer
+ * and set our return code */
+ if(s->error) {
+ s->ptr = s->buf;
+ s->cnt = s->maxplain;
+ return EOF;
+ }
+
+ return 0;
+}
+
+/*
+ * Write to the output stream 's' the 'len' bytes of data at 'buf'
+ */
+int prot_write(struct protstream *s, const char *buf, unsigned len)
+{
+ assert(s->write);
+ if(s->error || s->eof) return EOF;
+ if(len == 0) return 0;
+
+ while (len >= s->cnt) {
+ /* XXX can we manage to write data from 'buf' without copying it
+ to s->ptr ? */
+ memcpy(s->ptr, buf, s->cnt);
+ s->ptr += s->cnt;
+ buf += s->cnt;
+ len -= s->cnt;
+ s->cnt = 0;
+ if (prot_flush_internal(s,0) == EOF) return EOF;
+ }
+ memcpy(s->ptr, buf, len);
+ s->ptr += len;
+ s->cnt -= len;
+ if (s->error || s->eof) return EOF;
+
+ assert(s->cnt > 0);
+ return 0;
+}
+
+/*
+ * Stripped-down version of printf() that works on protection streams
+ * Only understands '%lld', '%llu', '%ld', '%lu', '%d', %u', '%s',
+ * '%c', and '%%' in the format string.
+ */
+int prot_printf(struct protstream *s, const char *fmt, ...)
+{
+ va_list pvar;
+ char *percent, *p;
+ long l;
+ unsigned long ul;
+ int i;
+ unsigned u;
+ char buf[30];
+ va_start(pvar, fmt);
+
+ assert(s->write);
+
+ while ((percent = strchr(fmt, '%')) != 0) {
+ prot_write(s, fmt, percent-fmt);
+ switch (*++percent) {
+ case '%':
+ prot_putc('%', s);
+ break;
+
+ case 'l':
+ switch (*++percent) {
+ case 'd':
+ l = va_arg(pvar, long);
+ snprintf(buf, sizeof(buf), "%ld", l);
+ prot_write(s, buf, strlen(buf));
+ break;
+
+ case 'u':
+ ul = va_arg(pvar, long);
+ snprintf(buf, sizeof(buf), "%lu", ul);
+ prot_write(s, buf, strlen(buf));
+ break;
+
+#ifdef HAVE_LONG_LONG_INT
+ case 'l': {
+ long long int ll;
+ unsigned long long int ull;
+
+ switch (*++percent) {
+ case 'd':
+ ll = va_arg(pvar, long long int);
+ snprintf(buf, sizeof(buf), "%lld", ll);
+ prot_write(s, buf, strlen(buf));
+ break;
+
+ case 'u':
+ ull = va_arg(pvar, unsigned long long int);
+ snprintf(buf, sizeof(buf), "%llu", ull);
+ prot_write(s, buf, strlen(buf));
+ break;
+
+ default:
+ abort();
+ }
+ break;
+ }
+#endif
+
+ default:
+ abort();
+ }
+ break;
+
+ case 'd':
+ i = va_arg(pvar, int);
+ snprintf(buf, sizeof(buf), "%d", i);
+ prot_write(s, buf, strlen(buf));
+ break;
+
+ case 'u':
+ u = va_arg(pvar, int);
+ snprintf(buf, sizeof(buf), "%u", u);
+ prot_write(s, buf, strlen(buf));
+ break;
+
+ case 's':
+ p = va_arg(pvar, char *);
+ prot_write(s, p, strlen(p));
+ break;
+
+ case 'c':
+ i = va_arg(pvar, int);
+ prot_putc(i, s);
+ break;
+
+ default:
+ abort();
+ }
+ fmt = percent+1;
+ }
+ prot_write(s, fmt, strlen(fmt));
+ va_end(pvar);
+ if (s->error || s->eof) return EOF;
+ return 0;
+}
+
+/*
+ * Read from the protections stream 's' up to 'size' bytes into the buffer
+ * 'buf'. Returns the number of bytes read, or 0 for some error.
+ */
+int prot_read(struct protstream *s, char *buf, unsigned size)
+{
+ int c;
+
+ assert(!s->write);
+
+ if (!size) return 0;
+
+ if (s->cnt) {
+ /* Some data in the input buffer, return that */
+ if (size > s->cnt) size = s->cnt;
+ memcpy(buf, s->ptr, size);
+ s->ptr += size;
+ s->cnt -= size;
+ return size;
+ }
+
+ c = prot_fill(s);
+ if (c == EOF) return 0;
+ buf[0] = c;
+ if (--size > s->cnt) size = s->cnt;
+ memcpy(buf+1, s->ptr, size);
+ s->ptr += size;
+ s->cnt -= size;
+ return size+1;
+}
+
+/*
+ * select() for protection streams, read only
+ * Also supports selecting on an extra file descriptor
+ *
+ * returns # of protstreams with pending data (including the extra fd)
+ *
+ * Only works for readable protstreams
+ */
+int prot_select(struct protgroup *readstreams, int extra_read_fd,
+ struct protgroup **out, int *extra_read_flag,
+ struct timeval *timeout)
+{
+ struct protstream *s, *timeout_prot = NULL;
+ struct protgroup *retval = NULL;
+ int max_fd, found_fds = 0;
+ int i;
+ fd_set rfds;
+ int have_readtimeout = 0;
+ struct timeval my_timeout;
+ struct prot_waitevent *event;
+ time_t now = time(NULL);
+ time_t read_timeout = 0;
+
+ assert(readstreams || extra_read_fd != PROT_NO_FD);
+ assert(extra_read_fd == PROT_NO_FD || extra_read_flag);
+ assert(out);
+
+ /* Initialize things we might use */
+ errno = 0;
+ found_fds = 0;
+ FD_ZERO(&rfds);
+
+ /* If extra_read_fd is PROT_NO_FD, then the first protstream
+ * will override it */
+ max_fd = extra_read_fd;
+
+ for(i = 0; i<readstreams->next_element; i++) {
+ int have_thistimeout = 0; /* used to compute the minimal timeout for */
+ time_t this_timeout = 0; /* this stream */
+
+ s = readstreams->group[i];
+ if (!s) continue;
+
+ assert(!s->write);
+
+ /* scan for waitevent callbacks */
+ for (event = s->waitevent; event; event = event->next)
+ {
+ if(!have_thistimeout || event->mark - now < this_timeout) {
+ this_timeout = event->mark - now;
+ have_thistimeout = 1;
+ }
+ }
+
+ /* check the idle timeout on this one as well */
+ if(s->read_timeout &&
+ (!have_thistimeout || s->timeout_mark - now < this_timeout)) {
+ this_timeout = s->timeout_mark - now;
+ have_thistimeout = 1;
+ }
+
+ if(!s->dontblock && have_thistimeout &&
+ (!have_readtimeout || now + this_timeout < read_timeout)) {
+ read_timeout = now + this_timeout;
+ have_readtimeout = 1;
+ if(!timeout || this_timeout <= timeout->tv_sec)
+ timeout_prot = s;
+ }
+
+ FD_SET(s->fd, &rfds);
+ if(s->fd > max_fd)
+ max_fd = s->fd;
+
+ /* Is something currently pending in our protstream's buffer? */
+ if(s->cnt > 0) {
+ found_fds++;
+
+ if(!retval)
+ retval = protgroup_new(readstreams->next_element + 1);
+
+ protgroup_insert(retval, s);
+
+ }
+#ifdef HAVE_SSL
+ else if(s->tls_conn != NULL && SSL_pending(s->tls_conn)) {
+ found_fds++;
+
+ if(!retval)
+ retval = protgroup_new(readstreams->next_element + 1);
+
+ protgroup_insert(retval, s);
+ }
+#endif
+ }
+
+ /* xxx we should probably do a nonblocking select on the remaining
+ * protstreams instead of skipping this part entirely */
+ if(!retval) {
+ time_t sleepfor;
+
+ /* do a select */
+ if(extra_read_fd != PROT_NO_FD) {
+ /* max_fd started with atleast extra_read_fd */
+ FD_SET(extra_read_fd, &rfds);
+ }
+
+ if(read_timeout < now)
+ sleepfor = 0;
+ else
+ sleepfor = read_timeout - now;
+
+ /* If we don't have a timeout structure, and we need one, use
+ * a local version. Otherwise, make sure that we are timing out
+ * for the right reason */
+ if(have_readtimeout &&
+ (!timeout || sleepfor < timeout->tv_sec)) {
+ if(!timeout) timeout = &my_timeout;
+ timeout->tv_sec = sleepfor;
+ timeout->tv_usec = 0;
+ }
+
+ if(select(max_fd + 1, &rfds, NULL, NULL, timeout) == -1)
+ return -1;
+
+ /* Reset now */
+ now = time(NULL);
+
+ if(extra_read_fd != PROT_NO_FD && FD_ISSET(extra_read_fd, &rfds)) {
+ *extra_read_flag = 1;
+ found_fds++;
+ } else if(extra_read_flag) {
+ *extra_read_flag = 0;
+ }
+
+ for(i = 0; i<readstreams->next_element; i++) {
+ s = readstreams->group[i];
+ if (!s) continue;
+
+ if(FD_ISSET(s->fd, &rfds)) {
+ found_fds++;
+
+ if(!retval)
+ retval = protgroup_new(readstreams->next_element + 1);
+
+ protgroup_insert(retval, s);
+ } else if(s == timeout_prot && now >= read_timeout) {
+ /* If we timed out, be sure to add the protstream we were
+ * waiting for, even if it didn't show up */
+ found_fds++;
+
+ if(!retval)
+ retval = protgroup_new(readstreams->next_element + 1);
+
+ protgroup_insert(retval, s);
+ }
+ }
+ }
+
+ *out = retval;
+ return found_fds;
+}
+
+/*
+ * Version of fgets() that works with protection streams.
+ */
+char *prot_fgets(char *buf, unsigned size, struct protstream *s)
+{
+ char *p = buf;
+ int c;
+
+ assert(!s->write);
+
+ if (size < 2 || s->eof) return 0;
+ size--;
+
+ while (size && (c = prot_getc(s)) != EOF) {
+ size--;
+ *p++ = c;
+ if (c == '\n') break;
+ }
+ if (p == buf) return 0;
+ *p++ = '\0';
+ return buf;
+}
+
+/* Handle protgroups */
+/* Create a new protgroup of the given size, or 32 if size is 0 */
+struct protgroup *protgroup_new(size_t size)
+{
+ struct protgroup *ret = xmalloc(sizeof(struct protgroup));
+
+ if(!size) size = PROTGROUP_SIZE_DEFAULT;
+
+ ret->nalloced = size;
+ ret->next_element = 0;
+ ret->group = xzmalloc(size * sizeof(struct protstream *));
+
+ return ret;
+}
+
+struct protgroup *protgroup_copy(struct protgroup *src)
+{
+ struct protgroup *dest;
+ assert(src);
+ dest = protgroup_new(src->nalloced);
+ if(src->next_element) {
+ memcpy(dest->group, src->group,
+ src->next_element * sizeof(struct protstream *));
+ }
+ return dest;
+}
+
+void protgroup_reset(struct protgroup *group)
+{
+ if(group) {
+ memset(group->group, 0,
+ group->next_element * sizeof(struct protstream *));
+ group->next_element = 0;
+ }
+}
+
+void protgroup_free(struct protgroup *group)
+{
+ if(group) {
+ assert(group->group);
+ free(group->group);
+ free(group);
+ }
+}
+
+void protgroup_insert(struct protgroup *group, struct protstream *item)
+{
+ int i, empty;
+
+ assert(group);
+ assert(item);
+
+ /* See if we already have this protstream */
+ for (i = 0, empty = group->next_element; i < group->next_element; i++) {
+ if (!group->group[i]) empty = i;
+ else if (group->group[i] == item) return;
+ }
+ /* Double size of the protgroup if we're at our limit */
+ if (empty == group->next_element &&
+ group->next_element++ == group->nalloced) {
+ group->nalloced *= 2;
+ group->group = xrealloc(group->group,
+ group->nalloced * sizeof(struct protstream *));
+ }
+ /* Insert the item at the empty location */
+ group->group[empty] = item;
+}
+
+void protgroup_delete(struct protgroup *group, struct protstream *item)
+{
+ int i;
+
+ assert(group);
+ assert(item);
+
+ /* find the protstream */
+ for (i = 0; i < group->next_element; i++) {
+ if (group->group[i] == item) {
+ group->group[i] = NULL;
+ return;
+ }
+ }
+}
+
+struct protstream *protgroup_getelement(struct protgroup *group,
+ size_t element)
+{
+ assert(group);
+ if(element >= group->next_element) return NULL;
+ else return group->group[element];
+}
+
+/* function versions of the macros */
+#undef prot_getc
+#undef prot_ungetc
+#undef prot_putc
+
+int prot_getc(struct protstream *s)
+{
+ assert(!s->write);
+
+ if (s->cnt-- > 0) {
+ return *(s->ptr)++;
+ } else {
+ return prot_fill(s);
+ }
+}
+
+int prot_ungetc(int c, struct protstream *s)
+{
+ assert(!s->write);
+
+ s->cnt++;
+ *--(s->ptr) = c;
+
+ return c;
+}
+
+int prot_putc(int c, struct protstream *s)
+{
+ assert(s->write);
+ assert(s->cnt > 0);
+
+ *s->ptr++ = c;
+ if (--s->cnt == 0) {
+ return prot_flush_internal(s,0);
+ } else {
+ return 0;
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/prot.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,251 @@
+/* prot.h -- stdio-like module that handles buffering, SASL, and TLS
+ * details for I/O over sockets
+ *
+ * $Id: prot.h,v 1.40.2.5 2006/02/01 19:25:42 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_PROT_H
+#define INCLUDED_PROT_H
+
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <sasl/sasl.h>
+
+#ifdef HAVE_SSL
+#include <openssl/ssl.h>
+#endif /* HAVE_SSL */
+
+#define PROT_BUFSIZE 4096
+/* #define PROT_BUFSIZE 8192 */
+
+#define PROT_NO_FD -1
+
+struct protstream;
+struct prot_waitevent;
+
+typedef void prot_readcallback_t(struct protstream *s, void *rock);
+
+struct protstream {
+ /* The Buffer */
+ unsigned char *buf;
+ int buf_size;
+ unsigned char *ptr; /* The end of data in the buffer */
+ int cnt; /* Space Remaining in buffer */
+
+ /* File Descriptors */
+ int fd; /* The Socket */
+ int logfd; /* The Telemetry Log (or PROT_NO_FD) */
+ int big_buffer; /* The Big Buffer (or PROT_NO_FD) */
+
+ /* SASL / TLS */
+ sasl_conn_t *conn;
+ int saslssf;
+ int maxplain;
+
+#ifdef HAVE_SSL
+ SSL *tls_conn;
+#endif /* HAVE_SSL */
+
+ /* Big Buffer Information */
+ const char *bigbuf_base; /* Base Pointer */
+ unsigned long bigbuf_siz; /* Overall Size of Buffer */
+ unsigned long bigbuf_len; /* Length of mapped file */
+ unsigned long bigbuf_pos; /* Current Position */
+
+ /* Status Flags */
+ int eof;
+ char *error;
+
+ /* Parameters */
+ int write;
+ int dontblock; /* Application requested nonblocking */
+ int dontblock_isset; /* write only, we've fcntl(O_NONBLOCK)'d */
+ int read_timeout;
+ time_t timeout_mark;
+ struct protstream *flushonread;
+
+ /* Events */
+ prot_readcallback_t *readcallback_proc;
+ void *readcallback_rock;
+ struct prot_waitevent *waitevent;
+
+ /* For use by applications */
+ void *userdata;
+};
+
+typedef struct prot_waitevent *prot_waiteventcallback_t(struct protstream *s,
+ struct prot_waitevent *ev,
+ void *rock);
+
+struct prot_waitevent {
+ time_t mark;
+ prot_waiteventcallback_t *proc;
+ void *rock;
+ struct prot_waitevent *next;
+};
+
+/* Not for use by applications directly, but needed by the macros. */
+int prot_flush_internal(struct protstream *s, int force);
+
+#define PROT_EOF_STRING "end of file reached"
+#define PROTGROUP_SIZE_DEFAULT 32
+struct protgroup; /* Opaque protgroup structure */
+
+extern int prot_getc(struct protstream *s);
+extern int prot_ungetc(int c, struct protstream *s);
+extern int prot_putc(int c, struct protstream *s);
+
+#define prot_getc(s) ((s)->cnt-- > 0 ? (int)*(s)->ptr++ : prot_fill(s))
+#define prot_ungetc(c, s) ((s)->cnt++, (*--(s)->ptr = (c)))
+#define prot_putc(c, s) ((*(s)->ptr++ = (c)), --(s)->cnt == 0 ? prot_flush_internal(s,0) : 0)
+
+/* The following two macros control the blocking nature of
+ * the protstream.
+ *
+ * For a read stream, the non-blocking behavior is that for the
+ * reading functions (prot_read, prot_getc, etc) we will return EOF and
+ * set errno = EAGAIN if no data was pending.
+ *
+ * For a write stream, it's a bit more complicated. When a nonblocking
+ * write stream is flushed, a nonblocking write to the network is attempted.
+ * if it cannot write all of its data, the remaining data is flushed to a
+ * "bigbuffer" temporary file. (When the next flush occurs, this temporary
+ * buffer is flushed first, and additional data is appended to it if necessary)
+ * Note that this means that in the telemetry logs, only the time of the
+ * first prot_flush_internal() call is logged, not the call for when the data
+ * actually is flushed to the network successfully.
+ */
+
+#define prot_BLOCK(s) ((s)->dontblock = 0)
+#define prot_NONBLOCK(s) ((s)->dontblock = 1)
+#define prot_IS_BLOCKING(s) ((s)->dontblock == 0)
+
+/* Allocate/free the protstream structure */
+extern struct protstream *prot_new(int fd, int write);
+extern int prot_free(struct protstream *s);
+
+/* Set the telemetry logfile for a given protstream */
+extern int prot_setlog(struct protstream *s, int fd);
+
+/* Set the SASL options for a protstream (requires authentication to
+ * be complete for the given sasl_conn_t */
+extern int prot_setsasl(struct protstream *s, sasl_conn_t *conn);
+
+#ifdef HAVE_SSL
+/* Set TLS options for a given protstream (requires a completed tls
+ * negotiation */
+extern int prot_settls(struct protstream *s, SSL *tlsconn);
+#endif /* HAVE_SSL */
+
+/* Set a timeout for the connection (in seconds) */
+extern int prot_settimeout(struct protstream *s, int timeout);
+
+/* Reset the timeout timer for the connection (in seconds) */
+extern int prot_resettimeout(struct protstream *s);
+
+/* Connect two streams so that when you block on reading s, the layer
+ * will automaticly flush flushs */
+extern int prot_setflushonread(struct protstream *s,
+ struct protstream *flushs);
+
+
+extern int prot_setreadcallback(struct protstream *s,
+ prot_readcallback_t *proc, void *rock);
+extern struct prot_waitevent *prot_addwaitevent(struct protstream *s,
+ time_t mark,
+ prot_waiteventcallback_t *proc,
+ void *rock);
+extern void prot_removewaitevent(struct protstream *s,
+ struct prot_waitevent *event);
+
+extern const char *prot_error(struct protstream *s);
+extern int prot_rewind(struct protstream *s);
+
+/* Fill the buffer for a read stream with waiting data (may block) */
+extern int prot_fill(struct protstream *s);
+
+/* Force a flush of an output stream */
+extern int prot_flush(struct protstream *s);
+
+/* These are protlayer versions of the specified functions */
+extern int prot_write(struct protstream *s, const char *buf, unsigned len);
+extern int prot_printf(struct protstream *, const char *, ...)
+#ifdef __GNUC__
+ __attribute__ ((format (printf, 2, 3)));
+#else
+ ;
+#endif
+extern int prot_read(struct protstream *s, char *buf, unsigned size);
+extern char *prot_fgets(char *buf, unsigned size, struct protstream *s);
+
+/* select() for protstreams */
+extern int prot_select(struct protgroup *readstreams, int extra_read_fd,
+ struct protgroup **out, int *extra_read_flag,
+ struct timeval *timeout);
+
+/* Protgroup manipulations */
+/* Create a new protgroup of a certain size or as a copy of another
+ * protgroup */
+struct protgroup *protgroup_new(size_t size);
+struct protgroup *protgroup_copy(struct protgroup *src);
+
+/* Cleanup a protgroup but don't release the allocated memory (so it can
+ * be reused) */
+void protgroup_reset(struct protgroup *group);
+
+/* Release memory for a protgroup */
+void protgroup_free(struct protgroup *group);
+
+/* Insert an element into a protgroup */
+void protgroup_insert(struct protgroup *group, struct protstream *item);
+
+/* Delete an element from a protgroup */
+void protgroup_delete(struct protgroup *group, struct protstream *item);
+
+/* Returns the protstream at that position in the protgroup, or NULL if
+ * an invalid element is requested */
+struct protstream *protgroup_getelement(struct protgroup *group,
+ size_t element);
+
+#endif /* INCLUDED_PROT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,174 @@
+/* retry.c -- keep trying write system calls
+ * $Id: retry.c,v 1.21.2.1 2004/01/15 20:24:38 ken3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ */
+
+#include <config.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "retry.h"
+
+/*
+ * Keep calling the read() system call with 'fd', 'buf', and 'nbyte'
+ * until all the data is read in or an error occurs.
+ */
+int retry_read(int fd, char *buf, size_t nbyte)
+{
+ int n;
+ int nread = 0;
+
+ if (nbyte == 0) return 0;
+
+ for (;;) {
+ n = read(fd, buf, nbyte);
+ if (n == 0) {
+ /* end of file */
+ return -1;
+ }
+
+ if (n == -1) {
+ if (errno == EINTR || errno == EAGAIN) continue;
+ return -1;
+ }
+
+ nread += n;
+
+ if (((size_t) n) >= nbyte) return nread;
+
+ buf += n;
+ nbyte -= n;
+ }
+}
+
+/*
+ * Keep calling the write() system call with 'fd', 'buf', and 'nbyte'
+ * until all the data is written out or an error occurs.
+ */
+int retry_write(int fd, const char *buf, size_t nbyte)
+{
+ int n;
+ int written = 0;
+
+ if (nbyte == 0) return 0;
+
+ for (;;) {
+ n = write(fd, buf, nbyte);
+ if (n == -1) {
+ if (errno == EINTR) continue;
+ return -1;
+ }
+
+ written += n;
+
+ if (((size_t) n) >= nbyte) return written;
+
+ buf += n;
+ nbyte -= n;
+ }
+}
+
+
+/*
+ * Keep calling the writev() system call with 'fd', 'iov', and 'iovcnt'
+ * until all the data is written out or an error occurs.
+ */
+int
+retry_writev(fd, iov, iovcnt)
+int fd;
+struct iovec *iov;
+int iovcnt;
+{
+ int n;
+ int i;
+ int written = 0;
+ static int iov_max =
+#ifdef MAXIOV
+ MAXIOV
+#else
+#ifdef IOV_MAX
+ IOV_MAX
+#else
+ 8192
+#endif
+#endif
+ ;
+
+ for (;;) {
+ while (iovcnt && iov[0].iov_len == 0) {
+ iov++;
+ iovcnt--;
+ }
+
+ if (!iovcnt) return written;
+
+ n = writev(fd, iov, iovcnt > iov_max ? iov_max : iovcnt);
+ if (n == -1) {
+ if (errno == EINVAL && iov_max > 10) {
+ iov_max /= 2;
+ continue;
+ }
+ if (errno == EINTR) continue;
+ return -1;
+ }
+
+ written += n;
+
+ for (i = 0; i < iovcnt; i++) {
+ if (iov[i].iov_len > (size_t) n) {
+ iov[i].iov_base = (char *)iov[i].iov_base + n;
+ iov[i].iov_len -= n;
+ break;
+ }
+ n -= iov[i].iov_len;
+ iov[i].iov_len = 0;
+ }
+
+ if (i == iovcnt) return written;
+ }
+}
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/retry.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,70 @@
+/* retry.h -- Keep retrying write system calls
+ * $Id: retry.h,v 1.12 2003/10/22 18:50:12 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_RETRY_H
+#define INCLUDED_RETRY_H
+
+#ifndef P
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+#endif
+
+#include <sys/uio.h>
+
+extern int retry_read P((int fd, char *buf, size_t nbyte));
+extern int retry_write P((int fd, const char *buf, size_t nbyte));
+extern int retry_writev P((int fd, struct iovec *iov, int iovcnt));
+
+/* add a buffer 's' of length 'len' to iovec 'iov' */
+#define WRITEV_ADD_TO_IOVEC(iov, num_iov, s, len) \
+ do { (iov)[(num_iov)].iov_base = (s); \
+ (iov)[(num_iov)++].iov_len = (len); } while (0)
+
+/* add a string 's' to iovec 'iov' */
+#define WRITEV_ADDSTR_TO_IOVEC(iov, num_iov, s) WRITEV_ADD_TO_IOVEC(iov, num_iov, s, strlen(s))
+
+
+#endif /* INCLUDED_RETRY_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,77 @@
+/* rfc822date.c -- Generate an 822 date
+ $Id: rfc822date.c,v 1.6 2003/10/22 18:50:12 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <stdio.h>
+
+#include "assert.h"
+#include "rfc822date.h"
+#include "gmtoff.h"
+
+static char *month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+
+static char *wday[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
+
+/* 'buf' must be at least 80 characters */
+void rfc822date_gen(char *buf, size_t len, time_t t)
+{
+ struct tm *tm;
+ long gmtoff;
+ int gmtnegative = 0;
+
+ assert(buf != NULL);
+
+ tm = localtime(&t);
+ gmtoff = gmtoff_of(tm, t);
+ if (gmtoff < 0) {
+ gmtoff = -gmtoff;
+ gmtnegative = 1;
+ }
+ gmtoff /= 60;
+
+ snprintf(buf, len, "%s, %02d %s %4d %02d:%02d:%02d %c%.2lu%.2lu",
+ wday[tm->tm_wday],
+ tm->tm_mday, month[tm->tm_mon], tm->tm_year + 1900,
+ tm->tm_hour, tm->tm_min, tm->tm_sec,
+ gmtnegative ? '-' : '+', gmtoff / 60, gmtoff % 60);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/rfc822date.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+/* rfc822date.h -- Generate an 822 date
+ $Id: rfc822date.h,v 1.3 2003/02/13 20:15:42 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_RFC822DATE_H
+#define INCLUDED_RFC822DATE_H
+
+#include <time.h>
+
+/* 'buf' must be at least 80 characters */
+void rfc822date_gen(char *buf, size_t len, time_t t);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strcasecmp.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strcasecmp.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strcasecmp.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strcasecmp.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,69 @@
+/* strcasecmp.c -- replacement strcasecmp() & strncasecmp() routines
+ $Id: strcasecmp.c,v 1.6 2003/02/13 20:15:42 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * Author: Chris Newman
+ * Start Date: 4/6/93
+ */
+
+#include "util.h"
+
+/* case insensitive string compare
+ */
+int strcasecmp(str1, str2)
+ char *str1, *str2;
+{
+ while (*str1 && TOLOWER(*str1) == TOLOWER(*str2)) ++str1, ++str2;
+
+ return ((int) TOLOWER(*str1) - (int) TOLOWER(*str2));
+}
+
+/* case insensitive string compare with count
+ */
+int strncasecmp(str1, str2, n)
+ char *str1, *str2;
+ int n;
+{
+ while (n && *str1 && TOLOWER(*str1) == TOLOWER(*str2)) ++str1, ++str2, --n;
+
+ return (n ? (int) TOLOWER(*str1) - (int) TOLOWER(*str2) : 0);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strerror.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strerror.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strerror.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strerror.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,53 @@
+/* strerror.c -- replacement strerror() routine
+ $Id: strerror.c,v 1.6 2003/02/13 20:15:42 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+extern int sys_nerr;
+extern char *sys_errlist;
+
+const char *strerror(errnum)
+int errnum;
+{
+ if (errnum < 0 || errnum > sys_nerr) return 0;
+ return sys_errlist[errnum];
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,71 @@
+/* strhash.c string hashing
+ *
+ * $Id: strhash.c,v 1.2 2003/10/22 18:03:05 rjs3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <errno.h>
+
+#include "strhash.h"
+
+unsigned strhash(const char *string)
+{
+ unsigned ret_val = 0;
+ int i;
+
+ while (*string)
+ {
+ i = (int) *string;
+ ret_val ^= i;
+ ret_val <<= 1;
+ string ++;
+ }
+ return ret_val;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/strhash.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,60 @@
+/* strhash.h string hashing
+ *
+ * $Id: strhash.h,v 1.2 2003/10/22 18:03:05 rjs3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _STRHASH_H_
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <errno.h>
+
+unsigned strhash(const char *string);
+
+#endif /* _STRHASH_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,81 @@
+/* +++Date last modified: 05-Jul-1997 */
+/* $Id: stristr.c,v 1.3 2002/05/25 19:57:47 leg Exp $ */
+
+/*
+** Designation: StriStr
+**
+** Call syntax: char *stristr(char *String, char *Pattern)
+**
+** Description: This function is an ANSI version of strstr() with
+** case insensitivity.
+**
+** Return item: char *pointer if Pattern is found in String, else
+** pointer to 0
+**
+** Rev History: 07/04/95 Bob Stout ANSI-fy
+** 02/03/94 Fred Cole Original
+**
+** Hereby donated to public domain.
+**
+** Modified for use with libcyrus by Ken Murchison 06/01/00.
+*/
+
+#include <string.h>
+#include <ctype.h>
+
+#ifndef _AIX
+typedef unsigned int uint;
+#endif
+
+#if defined(__cplusplus) && __cplusplus
+ extern "C" {
+#endif
+
+char *stristr(const char *String, const char *Pattern)
+{
+ char *pptr, *sptr, *start;
+ uint slen, plen;
+
+ for (start = (char *)String,
+ pptr = (char *)Pattern,
+ slen = strlen(String),
+ plen = strlen(Pattern);
+
+ /* while string length not shorter than pattern length */
+
+ slen >= plen;
+
+ start++, slen--)
+ {
+ /* find start of pattern in string */
+ while (toupper(*start) != toupper(*Pattern))
+ {
+ start++;
+ slen--;
+
+ /* if pattern longer than string */
+
+ if (slen < plen)
+ return(NULL);
+ }
+
+ sptr = start;
+ pptr = (char *)Pattern;
+
+ while (toupper(*sptr) == toupper(*pptr))
+ {
+ sptr++;
+ pptr++;
+
+ /* if end of pattern then pattern was found */
+
+ if ('\0' == *pptr)
+ return (start);
+ }
+ }
+ return(NULL);
+}
+
+#if defined(__cplusplus) && __cplusplus
+ }
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/stristr.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+/* stristr.h -- locate a substring case-insensitively
+ */
+
+/* $Id: stristr.h,v 1.2 2002/05/25 19:57:47 leg Exp $ */
+
+#ifndef INCLUDED_STRISTR_H
+#define INCLUDED_STRISTR_H
+
+extern char *stristr(const char *haystack, const char *needle);
+
+#endif /* INCLUDED_STRISTR_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/sysexits.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/sysexits.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/sysexits.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/sysexits.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,161 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: sysexits.h,v 1.4 2003/02/13 20:15:42 rjs3 Exp $ */
+
+/*
+ * Copyright (c) 1987, 1993
+ * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University 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.
+ *
+ * @(#)sysexits.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _SYSEXITS_H_
+#define _SYSEXITS_H_
+
+/*
+ * SYSEXITS.H -- Exit status codes for system programs.
+ *
+ * This include file attempts to categorize possible error
+ * exit statuses for system programs, notably delivermail
+ * and the Berkeley network.
+ *
+ * Error numbers begin at EX__BASE to reduce the possibility of
+ * clashing with other exit statuses that random programs may
+ * already return. The meaning of the codes is approximately
+ * as follows:
+ *
+ * EX_USAGE -- The command was used incorrectly, e.g., with
+ * the wrong number of arguments, a bad flag, a bad
+ * syntax in a parameter, or whatever.
+ * EX_DATAERR -- The input data was incorrect in some way.
+ * This should only be used for user's data & not
+ * system files.
+ * EX_NOINPUT -- An input file (not a system file) did not
+ * exist or was not readable. This could also include
+ * errors like "No message" to a mailer (if it cared
+ * to catch it).
+ * EX_NOUSER -- The user specified did not exist. This might
+ * be used for mail addresses or remote logins.
+ * EX_NOHOST -- The host specified did not exist. This is used
+ * in mail addresses or network requests.
+ * EX_UNAVAILABLE -- A service is unavailable. This can occur
+ * if a support program or file does not exist. This
+ * can also be used as a catchall message when something
+ * you wanted to do doesn't work, but you don't know
+ * why.
+ * EX_SOFTWARE -- An internal software error has been detected.
+ * This should be limited to non-operating system related
+ * errors as possible.
+ * EX_OSERR -- An operating system error has been detected.
+ * This is intended to be used for such things as "cannot
+ * fork", "cannot create pipe", or the like. It includes
+ * things like getuid returning a user that does not
+ * exist in the passwd file.
+ * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
+ * etc.) does not exist, cannot be opened, or has some
+ * sort of error (e.g., syntax error).
+ * EX_CANTCREAT -- A (user specified) output file cannot be
+ * created.
+ * EX_IOERR -- An error occurred while doing I/O on some file.
+ * EX_TEMPFAIL -- temporary failure, indicating something that
+ * is not really an error. In sendmail, this means
+ * that a mailer (e.g.) could not create a connection,
+ * and the request should be reattempted later.
+ * EX_PROTOCOL -- the remote system returned something that
+ * was "not possible" during a protocol exchange.
+ * EX_NOPERM -- You did not have sufficient permission to
+ * perform the operation. This is not intended for
+ * file system problems, which should use NOINPUT or
+ * CANTCREAT, but rather for higher level permissions.
+ */
+
+#define EX_OK 0 /* successful termination */
+
+#define EX__BASE 64 /* base value for error messages */
+
+#define EX_USAGE 64 /* command line usage error */
+#define EX_DATAERR 65 /* data format error */
+#define EX_NOINPUT 66 /* cannot open input */
+#define EX_NOUSER 67 /* addressee unknown */
+#define EX_NOHOST 68 /* host name unknown */
+#define EX_UNAVAILABLE 69 /* service unavailable */
+#define EX_SOFTWARE 70 /* internal software error */
+#define EX_OSERR 71 /* system error (e.g., can't fork) */
+#define EX_OSFILE 72 /* critical OS file missing */
+#define EX_CANTCREAT 73 /* can't create (user) output file */
+#define EX_IOERR 74 /* input/output error */
+#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
+#define EX_PROTOCOL 76 /* remote error in protocol */
+#define EX_NOPERM 77 /* permission denied */
+#define EX_CONFIG 78 /* configuration error */
+
+#define EX__MAX 78 /* maximum listed value */
+
+#endif /* !_SYSEXITS_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+/Makefile/1.1.2.1/Thu May 6 19:38:03 2004//Tcyrus-release-2-3-7
+/cyrusdb.INPUT/1.3/Thu Jan 24 21:55:56 2002//Tcyrus-release-2-3-7
+/cyrusdb.OUTPUT/1.3/Thu Jan 24 21:58:41 2002//Tcyrus-release-2-3-7
+/cyrusdb.c/1.7.8.2/Wed Jun 9 19:42:48 2004//Tcyrus-release-2-3-7
+/cyrusdblong.INPUT/1.1/Wed Feb 20 19:40:28 2002//Tcyrus-release-2-3-7
+/cyrusdblong.OUTPUT/1.1/Wed Feb 20 19:40:28 2002//Tcyrus-release-2-3-7
+/cyrusdbtxn.INPUT/1.1/Thu Jan 24 23:12:35 2002//Tcyrus-release-2-3-7
+/cyrusdbtxn.OUTPUT/1.1/Thu Jan 24 23:12:35 2002//Tcyrus-release-2-3-7
+/imapurl.c/1.1.2.3/Fri May 27 17:40:57 2005//Tcyrus-release-2-3-7
+/pool.c/1.3/Tue Nov 26 18:21:24 2002//Tcyrus-release-2-3-7
+/rnddb.c/1.6.4.1/Fri Dec 19 18:33:45 2003//Tcyrus-release-2-3-7
+/run/1.13/Wed Oct 22 18:03:06 2003//Tcyrus-release-2-3-7
+/testglob.c/1.2.2.1/Fri Dec 19 18:33:45 2003//Tcyrus-release-2-3-7
+/testglob2.c/1.2.2.1/Fri Dec 19 18:33:45 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/lib/test
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/Makefile
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/Makefile?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/Makefile (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/Makefile Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+.c.o:
+ gcc -I.. -c $<
+
+testglob: testglob.o ../libcyrus.a
+ gcc -o testglob testglob.o ../libcyrus.a ../libcyrus_min.a -ldb-4.0
+
+imapurl: imapurl.o ../libcyrus.a
+ gcc -o imapurl imapurl.o ../libcyrus.a ../libcyrus_min.a
+
+all: testglob imapurl
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.INPUT
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.INPUT?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.INPUT (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.INPUT Sat Aug 26 02:00:13 2006
@@ -1,0 +1,21 @@
+file cyrusdb.TEST
+put foo aaaaaa
+get foo
+put foo bbb
+get foo
+put bar 1234
+put baz 2345
+put duck quack
+put cow moo
+put xan scratch
+put zebra neigh
+get xan
+get zebra
+get zebra
+get baz
+get duck
+get frogger
+del duck
+get duck
+list
+close
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.OUTPUT
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.OUTPUT?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.OUTPUT (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.OUTPUT Sat Aug 26 02:00:13 2006
@@ -1,0 +1,21 @@
+ok
+ok
+ok {6} aaaaaa
+ok
+ok {3} bbb
+ok
+ok
+ok
+ok
+ok
+ok
+ok {7} scratch
+ok {5} neigh
+ok {5} neigh
+ok {4} 2345
+ok {5} quack
+ok {0}
+ok
+ok {0}
+ok {25} bar baz cow foo xan zebra
+ok
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdb.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,150 @@
+#include <stdio.h>
+#include <string.h>
+
+#include "../cyrusdb.h"
+#include "../xmalloc.h"
+#include "../exitcodes.h"
+
+#ifdef BACKEND
+struct cyrusdb_backend *DB = &(BACKEND);
+#else
+struct cyrusdb_backend *DB = &cyrusdb_flat;
+#endif
+
+#define TRY(s) { r = s; \
+ if (r && r != CYRUSDB_NOTFOUND) { \
+ printf("%s failed: %d\n", #s, r); exit(1); } }
+
+void fatal(const char *msg, int code)
+{
+ printf("fatal: %s\n", msg);
+ exit(code);
+}
+
+int yes(void *rock,
+ const char *key, int keylen,
+ const char *data, int datalen)
+{
+ return 1;
+}
+
+int appkey(void *rock,
+ const char *key, int keylen,
+ const char *data, int datalen)
+{
+ char *r = *(char **) rock;
+ int newlen;
+
+ if (r) {
+ newlen = strlen(r) + keylen + 2;
+ r = xrealloc(r, newlen);
+ strcat(r, " ");
+ strncpy(r + strlen(r), key, keylen);
+ r[newlen-1] = '\0';
+ } else {
+ r = xmalloc(keylen + 1);
+ strncpy(r, key, keylen);
+ r[keylen] = '\0';
+ }
+
+ *(char **)rock = r;
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ char buf[1024];
+ struct db *db = NULL;
+ struct txn *txn = NULL;
+ int txnp = 0;
+ int r;
+
+ printf("Initing enviornment in '.'...\n");
+ TRY(DB->init(".", 0));
+ printf("Ready!\n");
+
+ for (;;) {
+ if (fgets(buf, sizeof buf, stdin) == NULL) break;
+ buf[strlen(buf)-1] = '\0';
+ if (!strncasecmp(buf, "file ", 5)) {
+ char *fname = buf + 5;
+
+ if (db) { /* close it */
+ TRY(DB->close(db));
+ }
+ TRY(DB->open(fname, 1, &db));
+
+ printf("ok\n");
+ } else if (!db) {
+ TRY(db == NULL);
+ } else if (!strncasecmp(buf, "close", 5)) {
+ TRY(DB->close(db));
+ db = NULL;
+ printf("ok\n");
+ } else if (!strncasecmp(buf, "put ", 4)) {
+ char *key = buf + 4;
+ char *data = strchr(key, ' ');
+ if (!data) goto bad;
+ *data++ = '\0';
+ TRY(DB->store(db, key, strlen(key), data, strlen(data), (txnp ? &txn : NULL)));
+ printf("ok\n");
+ } else if (!strncasecmp(buf, "del ", 4)) {
+ char *key = buf + 4;
+ TRY(DB->delete(db, key, strlen(key), (txnp ? &txn : NULL), 0));
+ printf("ok\n");
+ } else if (!strncasecmp(buf, "get ", 4)) {
+ char *key = buf + 4;
+ const char *data;
+ int datalen;
+ TRY(DB->fetch(db, key, strlen(key), &data, &datalen, (txnp ? &txn : NULL)));
+ printf("ok {%d} ", datalen);
+ while (datalen--) printf("%c", *data++);
+ printf("\n");
+ } else if (!strncasecmp(buf, "list", 4)) {
+ char *keys = NULL;
+
+ TRY(DB->foreach(db, NULL, 0, yes, appkey, &keys, (txnp ? &txn : NULL)));
+ if (keys) {
+ printf("ok {%d} %s", strlen(keys), keys);
+ free(keys);
+ } else {
+ printf("ok {0} ");
+ }
+ printf("\n");
+ } else if (!strncasecmp(buf, "dump", 4)) {
+ if (DB->dump) {
+ TRY(DB->dump(db, 0));
+ printf("ok\n");
+ } else {
+ printf("no\n");
+ }
+ } else if (!strncasecmp(buf, "check", 4)) {
+ if (DB->consistent) {
+ TRY(DB->consistent(db));
+ printf("ok\n");
+ } else {
+ printf("no\n");
+ }
+ } else if (!strncasecmp(buf, "txn", 3)) {
+ if (txnp) {
+ printf("no\n");
+ } else {
+ printf("ok\n");
+ txnp = 1;
+ }
+ } else if (!strncasecmp(buf, "commit", 6)) {
+ TRY(DB->commit(db, txn));
+ txnp = 0;
+ txn = NULL;
+ printf("ok\n");
+ } else if (!strncasecmp(buf, "abort", 5)) {
+ TRY(DB->abort(db, txn));
+ txnp = 0;
+ txn = NULL;
+ printf("ok\n");
+ } else {
+ bad:
+ printf("?syntax error\n");
+ }
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.INPUT
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.INPUT?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.INPUT (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.INPUT Sat Aug 26 02:00:13 2006
@@ -1,0 +1,147 @@
+file cyrusdblong.TEST
+txn
+put aaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb1 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc1 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd1 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb2 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc2 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd2 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb3 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc3 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd3 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb4 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc4 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd4 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb5 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc5 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd5 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa6 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb6 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc6 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd6 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb7 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc7 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd7 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa8 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc8 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd8 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa9 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb9 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc9 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd9 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa0 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc0 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd0 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaaq aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbq bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put cccq cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddq dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaaw aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbw bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put cccw cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddw dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaae aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbe bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccce cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddde dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbr bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put cccr cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddr dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaat aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbt bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccct cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddt dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaay aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbby bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put cccy cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddy dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+commit
+get cccy
+get aaa
+txn
+put aaa notaaaaanopenotaaaaaa
+put bbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb1 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc1 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd1 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb2 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc2 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd2 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb3 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc3 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd3 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb4 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc4 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd4 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb5 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc5 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd5 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa6 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb6 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc6 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd6 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb7 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc7 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd7 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa8 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc8 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd8 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa9 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb9 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc9 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd9 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaa0 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbb0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccc0 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddd0 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaaq aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbq bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put cccq cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddq dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaaw aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbw bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put cccw cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddw dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaae aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbe bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccce cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put ddde dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbr bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put cccr cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddr dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaat aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbbt bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put ccct cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+put dddt dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+put aaay aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+put bbby bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+put cccy thishasnocccccccc
+put dddy dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
+get cccy
+get aaa
+abort
+get cccy
+get aaa
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.OUTPUT
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.OUTPUT?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.OUTPUT (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdblong.OUTPUT Sat Aug 26 02:00:13 2006
@@ -1,0 +1,147 @@
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok {256} cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+ok {256} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok {17} thishasnocccccccc
+ok {21} notaaaaanopenotaaaaaa
+ok
+ok {256} cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+ok {256} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.INPUT
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.INPUT?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.INPUT (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.INPUT Sat Aug 26 02:00:13 2006
@@ -1,0 +1,37 @@
+file cyrusdbtxn.TEST
+put foo aaaaaa
+get foo
+put foo bbb
+put bar ttt
+put toad sssssssssss
+get foo
+txn
+get foo
+put foo ccc
+get foo
+list
+commit
+list
+get foo
+put bar qqqq
+list
+txn
+del foo
+list
+abort
+list
+txn
+del foo
+get foo
+commit
+get foo
+txn
+get foo
+abort
+get foo
+txn
+put wheeee 12345
+list
+abort
+list
+close
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.OUTPUT
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.OUTPUT?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.OUTPUT (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/cyrusdbtxn.OUTPUT Sat Aug 26 02:00:13 2006
@@ -1,0 +1,37 @@
+ok
+ok
+ok {6} aaaaaa
+ok
+ok
+ok
+ok {3} bbb
+ok
+ok {3} bbb
+ok
+ok {3} ccc
+ok {12} bar foo toad
+ok
+ok {12} bar foo toad
+ok {3} ccc
+ok
+ok {12} bar foo toad
+ok
+ok
+ok {8} bar toad
+ok
+ok {12} bar foo toad
+ok
+ok
+ok {0}
+ok
+ok {0}
+ok
+ok {0}
+ok
+ok {0}
+ok
+ok
+ok {15} bar toad wheeee
+ok
+ok {8} bar toad
+ok
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/imapurl.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/imapurl.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/imapurl.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/imapurl.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,31 @@
+#include <stdio.h>
+#include "../imapurl.h"
+
+void fatal(const char* s, int code)
+{
+ fprintf(stderr, "imapurl: %s\r\n", s);
+ exit(code);
+}
+
+int main(void)
+{
+ struct imapurl imapurl;
+ char url[400];
+
+ memset(&imapurl, 0, sizeof(struct imapurl));
+ imapurl.server = "server";
+ imapurl.auth = "*";
+ imapurl.mailbox = "&AOQ- &AMQ-"; /* "ä Ä" */
+ imapurl.uidvalidity = 1234567890;
+
+ puts(imapurl.mailbox);
+ imapurl_toURL(url, &imapurl);
+ puts(url);
+ imapurl_fromURL(&imapurl, url);
+ puts(imapurl.mailbox);
+ printf("%lu\n", imapurl.uidvalidity);
+ free(imapurl.freeme);
+
+ return 0;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/pool.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/pool.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/pool.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/pool.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,26 @@
+/* This is a fairly stupid test of the memory pool stuff */
+
+#include <stdio.h>
+#include <cyrus/mpool.h>
+#include <stdlib.h>
+
+void fatal(char *s, int code)
+{
+ fprintf(stderr, "%d:%s\n", code, s);
+ exit(1);
+}
+
+int main(void) {
+ int i;
+ struct mpool *p;
+ char *s;
+ p = new_mpool(25);
+ for(i=1; i<26; i++) {
+ s = mpool_malloc(p,i);
+ if(s[0]) fatal("error!\n",0);
+
+ memset(s,(char)i + 'a',i);
+ printf("(0x%x)%d: %s\n", s, i, s);
+ }
+ free_mpool(p);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/rnddb.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/rnddb.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/rnddb.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/rnddb.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,299 @@
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include "../cyrusdb.h"
+#include "../xmalloc.h"
+#include "../exitcodes.h"
+#include "../assert.h"
+
+#ifdef BACKEND
+struct cyrusdb_backend *DB = &(BACKEND);
+#else
+struct cyrusdb_backend *DB = &cyrusdb_skiplist;
+#endif
+
+#define TRY(s) { r = s; \
+ if (r && r != CYRUSDB_NOTFOUND) { \
+ printf("%s failed (i=%d): %d\n", #s, i, r); exit(1); } }
+
+char *victim;
+int count;
+int verbose = 0;
+
+struct timeval t_add = { 0, 0 };
+struct timeval t_mod = { 0, 0 };
+struct timeval t_del = { 0, 0 };
+struct timeval t_find = { 0, 0 };
+
+int c_add = 0;
+int c_mod = 0;
+int c_del = 0;
+int c_find = 0;
+
+
+#define ADDDIFF(a, b, c) do { a.tv_sec += (c.tv_sec - b.tv_sec); \
+ a.tv_usec += (c.tv_usec - b.tv_usec); \
+ while (a.tv_usec < 0) \
+ { a.tv_sec--; a.tv_usec += 1000000; } \
+ while (a.tv_usec > 1000000) \
+ { a.tv_sec++; a.tv_usec -= 1000000; } } while (0)
+
+int countem(void *rock,
+ const char *key, int keylen,
+ const char *data, int datalen)
+{
+ count++;
+ return 0;
+}
+
+int findvictim(void *rock,
+ const char *key, int keylen,
+ const char *data, int datalen)
+{
+ if (!victim) {
+ if ((rand() % count) == 0) {
+ victim = xstrdup(key);
+ }
+ }
+ count--;
+ return 0;
+}
+
+char *genrand(int len)
+{
+ char *ret = xmalloc(len + 1);
+ char *p = ret;
+
+ while (len--) {
+ *p++ = 'a' + (rand() % 26);
+ }
+ *p = '\0';
+
+ return ret;
+}
+
+void fatal(const char *msg, int code)
+{
+ printf("fatal: %s\n", msg);
+ exit(code);
+}
+
+void do_report(void)
+{
+ printf("\n");
+ printf("*** add %ld.%ld %d\n", t_add.tv_sec, t_add.tv_usec, c_add);
+ printf("*** mod %ld.%ld %d\n", t_mod.tv_sec, t_mod.tv_usec, c_mod);
+ printf("*** del %ld.%ld %d\n", t_del.tv_sec, t_del.tv_usec, c_del);
+ printf("*** find %ld.%ld %d\n", t_find.tv_sec, t_find.tv_usec, c_find);
+
+ printf("\n");
+ printf("*** add %lf\n", ((double) t_add.tv_sec +
+ ((double) t_add.tv_usec) / 1000000) /
+ (double) c_add);
+ printf("*** mod %lf\n", ((double) t_mod.tv_sec +
+ ((double) t_mod.tv_usec) / 1000000) /
+ (double) c_mod);
+ printf("*** del %lf\n", ((double) t_del.tv_sec +
+ ((double) t_del.tv_usec) / 1000000) /
+ (double) c_del);
+ printf("*** find %lf\n", ((double) t_find.tv_sec +
+ ((double) t_find.tv_usec) / 1000000) /
+ (double) c_find);
+
+
+}
+
+int main(int argc, char *argv[])
+{
+ int iter;
+ int seed;
+ int i;
+ char *key;
+ char *val;
+ struct db *db;
+ int r;
+ struct txn *txn;
+ const char *data;
+ int datalen;
+ struct timeval t1, t2;
+ int initsize;
+
+ if (argc > 1) {
+ iter = atoi(argv[1]);
+ } else {
+ printf("%s [iterations] [rndseed] [initsize]\n", argv[0]);
+ printf("if iterations is negative, run forever and report every -iter\n");
+ exit(1);
+ }
+ TRY(DB->init(".", 0));
+
+ if (argc > 2) {
+ srand(atoi(argv[2]));
+ }
+
+ TRY(DB->open("scratch", &db));
+
+ if (DB->consistent) {
+ TRY(DB->consistent(db));
+ }
+
+ if (argc > 3) {
+ initsize = atoi(argv[3]);
+
+ txn = NULL;
+ for (i = 0; i < initsize; i++) {
+ /* generate a random key */
+ key = genrand(10 + (rand() % 10));
+
+ /* generate a random value */
+ val = genrand(10 + (rand() % 100));
+
+ TRY(DB->store(db, key, strlen(key), val, strlen(val), &txn));
+ }
+
+ TRY(DB->commit(db, txn));
+ if (DB->consistent) {
+ TRY(DB->consistent(db));
+ }
+ }
+
+ printf("starting...\n");
+
+ /* repeat for ever if iter < 0 */
+ for (i = 0; iter > 0 ? (i < iter) : 1; i++) {
+ int oper = rand() % 10;
+
+ if (i > 0 && iter < 0 && ((i % -iter) == 0)) {
+ do_report();
+ }
+
+ switch (oper) {
+ case 0:
+ /* do an ADD */
+
+ if (verbose) printf("A");
+
+ /* insert it */
+ gettimeofday(&t1, NULL);
+
+ /* generate a random key */
+ key = genrand(10 + (rand() % 10));
+
+ /* generate a random value */
+ val = genrand(10 + (rand() % 100));
+
+ txn = NULL;
+ TRY(DB->store(db, key, strlen(key), val, strlen(val), &txn));
+ TRY(DB->commit(db, txn));
+ gettimeofday(&t2, NULL);
+
+ ADDDIFF(t_add, t1, t2);
+ c_add++;
+
+ free(key);
+ free(val);
+
+ break;
+
+ case 1: /* do a modify */
+ if (verbose) printf("M");
+
+ gettimeofday(&t1, NULL);
+
+ /* pick a random victim */
+ count = 0;
+ victim = NULL;
+ txn = NULL;
+ TRY(DB->foreach(db, NULL, 0, &countem, NULL, NULL, &txn));
+
+ if (count == 0) continue;
+
+ TRY(DB->foreach(db, NULL, 0, &findvictim, NULL, NULL, &txn));
+
+ assert(victim != NULL);
+
+ /* generate a random value */
+ val = genrand(10 + (rand() % 100));
+
+ /* do an add */
+ TRY(DB->store(db, victim, strlen(victim), val, strlen(val), &txn));
+ free(val);
+
+ TRY(DB->commit(db, txn));
+ free(victim); victim = NULL;
+
+ gettimeofday(&t2, NULL);
+
+ ADDDIFF(t_mod, t1, t2);
+ c_mod++;
+
+ break;
+
+ case 2: /* do a delete */
+ if (verbose) printf("D");
+
+ gettimeofday(&t1, NULL);
+
+ /* pick a random victim */
+ count = 0;
+ victim = NULL;
+ txn = NULL;
+ TRY(DB->foreach(db, NULL, 0, &countem, NULL, NULL, &txn));
+
+ if (count == 0) continue;
+
+ TRY(DB->foreach(db, NULL, 0, &findvictim, NULL, NULL, &txn));
+ assert(victim != NULL);
+
+ /* delete it */
+ TRY(DB->delete(db, victim, strlen(victim), &txn, 0));
+
+ TRY(DB->commit(db, txn));
+ free(victim); victim = NULL;
+
+ gettimeofday(&t2, NULL);
+
+ ADDDIFF(t_del, t1, t2);
+ c_del++;
+
+ break;
+
+ default:
+ /* do a "read" */
+ if (verbose) printf("R");
+
+ gettimeofday(&t1, NULL);
+
+ /* generate a random key */
+ key = genrand(10 + (rand() % 10));
+
+ txn = NULL;
+ TRY(DB->fetch(db, key, strlen(key), &data, &datalen, &txn));
+ TRY(DB->commit(db, txn));
+
+ gettimeofday(&t2, NULL);
+
+ ADDDIFF(t_find, t1, t2);
+ c_find++;
+
+ free(key);
+ }
+
+ fflush(stdout);
+
+#if 0
+ /* run the consistency function, if any */
+ if (DB->consistent) {
+ TRY(DB->consistent(db));
+ }
+#endif
+ }
+
+ TRY(DB->close(db));
+ TRY(DB->done());
+
+ do_report();
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/run
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/run?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/run (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/run Sat Aug 26 02:00:13 2006
@@ -1,0 +1,78 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+my $verbose = 0;
+my $clean = 0;
+while (defined $ARGV[0] && ("-v" eq $ARGV[0])) {
+ $verbose++;
+ shift @ARGV;
+}
+
+while (defined $ARGV[0] && ("-c" eq $ARGV[0])) {
+ $clean++;
+ shift @ARGV;
+}
+
+my $libs = $ENV{"LIBS"} || "";
+
+sub mysys {
+ my $cmd = shift;
+
+ if ($verbose > 1) {
+ print "$cmd\n";
+ }
+ return system($cmd);
+}
+
+sub runone {
+ my ($t, $p, $d, $tname, $input) = @_;
+ my $res;
+ my $output;
+
+ $p = "" if (!defined $p);
+ $d = "" if (!defined $d);
+ $tname = $t if (!defined $tname);
+ $input = $t if (!defined $input);
+ $output = "$input.OUTPUT";
+ $input = "$input.INPUT";
+
+ if ($clean) {
+ system "rm -rf $tname";
+ }
+
+ mkdir $tname, 0755;
+ chdir $tname;
+ $res = mysys("gcc $d -g -o $t ../$t.c -L../.. -lcyrus -lrt");
+ if (!$res) {
+ $res = mysys("./$t $p < ../$input > $t.TEMP");
+ $res = mysys("cmp -s $t.TEMP ../$output");
+ }
+ if ($res) {
+ print "$tname FAILED\n";
+ } elsif ($verbose) {
+ print "$tname ok\n";
+ }
+ chdir "..";
+}
+
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_flat -ldb ${libs}");
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_skiplist -ldb ${libs}", "cyrusdb_skiplist");
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_berkeley -ldb ${libs}", "cyrusdb_berkeley");
+
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_flat -ldb ${libs}",
+ "cyrusdbtxn_flat", "cyrusdbtxn");
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_skiplist -ldb ${libs}",
+ "cyrusdbtxn_skiplist", "cyrusdbtxn");
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_berkeley -ldb ${libs}",
+ "cyrusdbtxn_berkeley", "cyrusdbtxn");
+
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_flat -ldb ${libs}",
+ "cyrusdblong_flat", "cyrusdblong");
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_skiplist -ldb ${libs}",
+ "cyrusdblong_skiplist", "cyrusdblong");
+runone("cyrusdb", undef, "-DBACKEND=cyrusdb_berkeley -ldb ${libs}",
+ "cyrusdblong_berkeley", "cyrusdblong");
+
+runone("rnddb", undef, "-DBACKEND=cyrusdb_skiplist -ldb ${libs}",
+ "rndskip", "rnddb");
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/run
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,29 @@
+#include "glob.h"
+#include <stdio.h>
+
+int main (argc, argv)
+ int argc;
+ char* argv[];
+{
+ glob *g = glob_init(argv[1], GLOB_INBOXCASE|GLOB_HIERARCHY);
+
+ char text[1024];
+ int len;
+ long min;
+
+ if (g) {
+ printf("%d/%s/%s\n", g->flags, g->inbox, g->str);
+ while (fgets(text, sizeof (text), stdin) != NULL) {
+ len = strlen(text) - 1;
+ text[len] = '\0';
+ min = 0;
+ while (min >= 0) {
+ printf("%d\n", glob_test(g, text, len, &min));
+ }
+ }
+ }
+}
+
+void fatal(char *s) {
+ exit(1);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob2.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob2.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob2.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/test/testglob2.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,89 @@
+#include "../glob.h"
+#include <stdio.h>
+
+struct pattern_test {
+ const char *pattern;
+ int successes; /* How many matches? */
+ int exacts; /* How many EXACT matches? */
+};
+
+struct pattern_test patterns[] = {
+ { "*", 9, 9 }, { "%", 9, 2 }, { "*%", 9, 2 }, { "%*", 9, 9 },
+ { "test", 5, 1 }, { "test.rjs3", 4, 1 }, { "test.*%", 4, 1 },
+ { "test.rjs3*", 4, 4 }, { "test.rjs3.*", 3, 3 },
+ { "test.rjs3%", 4, 1 }, { "test.rjs3.%", 3, 2 },
+ { "test.%.foo", 2, 1 }, { "test.*.foo", 2, 2 },
+ { "test.*%.foo", 2, 2 }, { "test.%*.foo", 2, 2 },
+ { "test.rjs*.foo", 2, 2 }, { "test.rjs%.foo", 2, 1 },
+ { "test.*3.foo", 2, 1 }, { "test.%3.foo", 2, 1 },
+ { "INBOX", 4, 1 },
+ { "INBOX*", 4, 4 }, { "INBOX.foo", 2, 1 }, { "INBOX.%.foo", 1, 1 },
+ { NULL, 0 }
+};
+
+const char *strings[] = {
+ "test",
+ "test.rjs3",
+ "test.rjs3.foo",
+ "test.rjs3.foo.foo",
+ "test.rjs3.bar",
+ "user.rjs3",
+ "user.rjs3.foo",
+ "user.rjs3.foo.foo",
+ "user.rjs3.bar",
+ NULL
+};
+
+int main (argc, argv)
+ int argc;
+ char* argv[];
+{
+ char text[1024];
+ int i, j;
+ int failed = 0;
+ glob *g;
+
+ for(i=0;patterns[i].pattern;i++) {
+ const char *pattern = patterns[i].pattern;
+ int succ = 0;
+ int exact = 0;
+ g = glob_init_suppress(pattern, GLOB_INBOXCASE|GLOB_HIERARCHY, "user.rjs3");
+ printf("%s/%d/%s/%s\n", pattern, g->flags, g->inbox, g->str);
+
+ for(j=0;strings[j];j++) {
+ const char *string = strings[j];
+ int len = strlen(string);
+ long min = 0;
+ int result = glob_test(g, string, len, &min);
+
+ if(result != -1) {
+ printf(" %s: %d\n", string, result);
+ succ++;
+ }
+
+ if(result == len) {
+ exact++;
+ }
+ }
+
+ if(succ == patterns[i].successes && exact == patterns[i].exacts) {
+ printf("PASS! (got %d successes & %d exact)\n", succ, exact);
+ } else {
+ printf("FAIL! (got %d/%d successes & %d/%d exact)\n",
+ succ, patterns[i].successes, exact, patterns[i].exacts);
+ failed++;
+ }
+
+ glob_free(&g);
+ }
+
+ if(!failed) {
+ printf("All tests pass!\n");
+ } else {
+ printf("ERROR: %d tests failed!\n", failed);
+ }
+}
+
+void fatal(char *s) {
+ exit(1);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,364 @@
+/* util.c -- general utility functions
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * $Id: util.c,v 1.27.2.3 2004/09/09 18:47:11 shadow Exp $
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <sys/socket.h>
+#include <errno.h>
+
+#include "exitcodes.h"
+#include "libcyr_cfg.h"
+#include "util.h"
+#include "xmalloc.h"
+
+#define BEAUTYBUFSIZE 4096
+
+const unsigned char convert_to_lowercase[256] = {
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+ 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+ 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
+ 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+ 'x', 'y', 'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
+ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
+ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
+ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
+ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
+ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
+ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
+};
+
+const unsigned char convert_to_uppercase[256] = {
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+ 0x40, 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+ 'X', 'Y', 'Z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
+ 0x60, 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+ 'X', 'Y', 'Z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
+ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
+ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
+ 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
+ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
+ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
+ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
+ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
+ 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
+ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
+ 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
+};
+
+/* convert string to all lower case
+ */
+char *lcase(char* str)
+{
+ char *scan = str;
+
+ while (*scan) {
+ *scan = TOLOWER(*scan);
+ scan++;
+ }
+
+ return (str);
+}
+
+/* convert string to all upper case
+ */
+char *ucase(char* str)
+{
+ char *scan = str;
+
+ while (*scan) {
+ *scan = convert_to_uppercase[(unsigned char)(*scan)];
+ scan++;
+ }
+
+ return (str);
+}
+
+/* clean up control characters in a string while copying it
+ * returns pointer to end of dst string.
+ * dst must have twice the length of source
+ */
+char *beautify_copy(char* dst, const char* src)
+{
+ unsigned char c;
+
+ while (*src) {
+ c = *src++ & 0x7F;
+ if (!isprint(c)) {
+ *dst++ = '^';
+ if (c > ' ') {
+ c = '?';
+ } else {
+ c += '@';
+ }
+ }
+ *dst++ = c;
+ }
+ *dst = '\0';
+
+ return (dst);
+}
+
+
+/* clean up control characters in a string while copying it
+ * returns pointer to a static buffer containing the cleaned-up version
+ * returns NULL on malloc() error
+ */
+char *beautify_string(const char* src)
+{
+ static char *beautybuf = NULL;
+ static int beautysize = 0;
+ int len;
+
+ len = strlen(src) * 2 + 1;
+ if (beautysize < len) {
+ if (!beautysize) {
+ beautysize = len > BEAUTYBUFSIZE ? len : BEAUTYBUFSIZE;
+ beautybuf = xmalloc(beautysize);
+ } else {
+ beautysize *= 2;
+ if (len > beautysize) beautysize = len;
+ beautybuf = xrealloc(beautybuf, beautysize);
+ }
+ if (!beautybuf) {
+ beautysize = 0;
+ return "";
+ }
+ }
+ (void) beautify_copy(beautybuf, src);
+
+ return (beautybuf);
+}
+
+/* do a binary search in a keyvalue array
+ * nelem is the number of keyvalue elements in the kv array
+ * cmpf is the comparison function (strcmp, strcasecmp, etc).
+ * returns NULL if not found, or key/value pair if found.
+ */
+keyvalue *kv_bsearch(const char* key, keyvalue* kv, int nelem,
+ int (*cmpf) (const char *s1, const char *s2))
+{
+ int top, mid = 0, bot, cmp = 0;
+
+ cmp = 1;
+ bot = 0;
+ top = nelem - 1;
+ while (top >= bot && (cmp = (*cmpf)(key, kv[mid = (bot + top) >> 1].key)))
+ if (cmp < 0) {
+ top = mid - 1;
+ } else {
+ bot = mid + 1;
+ }
+
+ return (cmp ? NULL : kv + mid);
+}
+
+/* Examine the name of a file, and return a single character
+ * (as an int) that can be used as the name of a hash
+ * directory. Stop before the first dot. Caller is responsible
+ * for skipping any prefix of the name.
+ */
+int dir_hash_c(const char *name)
+{
+ int c;
+
+ if (libcyrus_config_getswitch(CYRUSOPT_FULLDIRHASH)) {
+ unsigned char *pt;
+ unsigned int n;
+ enum {
+ DIR_X = 3,
+ DIR_Y = 5,
+ DIR_P = 23,
+ DIR_A = 'A'
+ };
+
+ n = 0;
+ pt = (unsigned char *)name;
+ while (*pt && *pt != '.') {
+ n = ((n << DIR_X) ^ (n >> DIR_Y)) ^ *pt;
+ ++pt;
+ }
+ c = DIR_A + (n % DIR_P);
+ }
+ else {
+ c = tolower(*name);
+ if (!isascii(c) || !islower(c)) c = 'q';
+ }
+
+ return c;
+}
+
+int cyrus_close_sock(int fd)
+{
+ shutdown(fd, SHUT_RD);
+ return close(fd);
+}
+
+void cyrus_reset_stdio()
+{
+ int devnull = open("/dev/null", O_RDWR, 0);
+
+ if (devnull == -1) {
+ fatal("open() on /dev/null failed", EC_TEMPFAIL);
+ }
+
+ /* stdin */
+ shutdown(0, SHUT_RD);
+ dup2(devnull, 0);
+
+ /* stdout */
+ shutdown(1, SHUT_RD);
+ dup2(devnull, 1);
+
+ /* stderr */
+ shutdown(2, SHUT_RD);
+ dup2(devnull, 2);
+
+ if (devnull > 2) close(devnull);
+}
+
+/* Given a mkstemp(3) pattern for a filename,
+ * create the file and return the file descriptor.
+ *
+ * This routine also unlinks the file so it won't appear in the
+ * directory listing (but you won't have to worry about cleaning up
+ * after it)
+ */
+int create_tempfile()
+{
+ int fd;
+ char pattern[2048];
+ const char *path = libcyrus_config_getstring(CYRUSOPT_TEMP_PATH);
+
+ if(snprintf(pattern, sizeof(pattern), "%s/cyrus_tmpfile_XXXXXX",
+ path) >= sizeof(pattern)){
+ fatal("temporary file pathname is too long in prot_flush",
+ EC_TEMPFAIL);
+ }
+
+ fd = mkstemp(pattern);
+ if(fd == -1) {
+ return -1;
+ } else if(unlink(pattern) == -1) {
+ close(fd);
+ return -1;
+ }
+
+ return fd;
+}
+
+/* Create all parent directories for the given path,
+ * up to but not including the basename.
+ */
+int cyrus_mkdir(const char *path, mode_t mode __attribute__((unused)))
+{
+ char *p = (char *) path;
+ int save_errno;
+ struct stat sbuf;
+
+ while ((p = strchr(p+1, '/'))) {
+ *p = '\0';
+ if (mkdir(path, 0755) == -1 && errno != EEXIST) {
+ save_errno = errno;
+ if (stat(path, &sbuf) == -1) {
+ errno = save_errno;
+ syslog(LOG_ERR, "IOERROR: creating directory %s: %m", path);
+ return -1;
+ }
+ }
+ *p = '/';
+ }
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/util.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,110 @@
+/* util.h -- general utility functions
+ * $Id: util.h,v 1.17.2.1 2004/09/10 13:51:12 ken3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Chris Newman
+ * Start Date: 4/6/93
+ */
+
+#ifndef INCLUDED_UTIL_H
+#define INCLUDED_UTIL_H
+
+extern const unsigned char convert_to_lowercase[256];
+extern const unsigned char convert_to_uppercase[256];
+
+#define TOUPPER(c) (convert_to_uppercase[(unsigned char)(c)])
+#define TOLOWER(c) (convert_to_lowercase[(unsigned char)(c)])
+
+typedef struct keyvalue {
+ char *key, *value;
+} keyvalue;
+
+/* convert string to all lower case
+ */
+extern char *lcase (char *str);
+
+/* convert string to all upper case
+ */
+extern char *ucase (char *str);
+
+/* clean up control characters in a string while copying it
+ * returns pointer to end of dst string.
+ * dst must have twice the length of source
+ */
+extern char *beautify_copy (char *dst, const char *src);
+
+/* clean up control characters in a string while copying it
+ * returns pointer to a static buffer containing the cleaned-up version
+ * returns NULL on malloc() error
+ */
+extern char *beautify_string (const char *src);
+
+/* do a binary search in a keyvalue array
+ * nelem is the number of keyvalue elements in the kv array
+ * cmpf is the comparison function (strcmp, stricmp, etc).
+ * returns NULL if not found, or key/value pair if found.
+ */
+extern keyvalue *kv_bsearch (const char *key, keyvalue *kv, int nelem,
+ int (*cmpf)(const char *s1, const char *s2));
+
+/* Examine the name of a file, and return a single character
+ * (as an int) that can be used as the name of a hash
+ * directory. Caller is responsible for skipping any prefix
+ * of the name.
+ */
+extern int dir_hash_c(const char *name);
+
+/*
+ * create an [unlinked] temporary file and return the file descriptor.
+ */
+extern int create_tempfile();
+
+/* Close a network filedescriptor the "safe" way */
+extern int cyrus_close_sock(int fd);
+
+/* Reset stdin/stdout/stderr */
+extern void cyrus_reset_stdio();
+
+/* Create all parent directories for the given path,
+ * up to but not including the basename.
+ */
+extern int cyrus_mkdir(const char *path, mode_t mode);
+
+#endif /* INCLUDED_UTIL_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,212 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+
+/* $Revision: 1.2 $
+ * $Id: wildmat.c,v 1.2 2003/10/22 18:03:05 rjs3 Exp $
+**
+** Do shell-style pattern matching for ?, \, [], and * characters.
+** Might not be robust in face of malformed patterns; e.g., "foo[a-"
+** could cause a segmentation violation. It is 8bit clean.
+**
+** Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
+** Rich $alz is now <rsalz at osf.org>.
+** April, 1991: Replaced mutually-recursive calls with in-line code
+** for the star character.
+**
+** Special thanks to Lars Mathiesen <thorinn at diku.dk> for the ABORT code.
+** This can greatly speed up failing wildcard patterns. For example:
+** pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-*
+** text 1: -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
+** text 2: -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
+** Text 1 matches with 51 calls, while text 2 fails with 54 calls. Without
+** the ABORT code, it takes 22310 calls to fail. Ugh. The following
+** explanation is from Lars:
+** The precondition that must be fulfilled is that DoMatch will consume
+** at least one character in text. This is true if *p is neither '*' nor
+** '\0'.) The last return has ABORT instead of FALSE to avoid quadratic
+** behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx". With
+** FALSE, each star-loop has to run to the end of the text; with ABORT
+** only the last one does.
+**
+** Once the control of one instance of DoMatch enters the star-loop, that
+** instance will return either TRUE or ABORT, and any calling instance
+** will therefore return immediately after (without calling recursively
+** again). In effect, only one star-loop is ever active. It would be
+** possible to modify the code to maintain this context explicitly,
+** eliminating all recursive calls at the cost of some complication and
+** loss of clarity (and the ABORT stuff seems to be unclear enough by
+** itself). I think it would be unwise to try to get this into a
+** released version unless you have a good test data base to try it out
+** on.
+*/
+#include <stdio.h>
+#include <sys/types.h>
+
+
+
+#define TRUE 1
+#define FALSE 0
+#define ABORT -1
+
+
+ /* What character marks an inverted character class? */
+#define NEGATE_CLASS '^'
+ /* Is "*" a common pattern? */
+#define OPTIMIZE_JUST_STAR
+ /* Do tar(1) matching rules, which ignore a trailing slash? */
+#undef MATCH_TAR_PATTERN
+
+
+/*
+** Match text and p, return TRUE, FALSE, or ABORT.
+*/
+static int DoMatch(const char *text, const char *p)
+{
+ int last;
+ int matched;
+ int reverse;
+
+ for ( ; *p; text++, p++) {
+ if (*text == '\0' && *p != '*')
+ return ABORT;
+ switch (*p) {
+ case '\\':
+ /* Literal match with following character. */
+ p++;
+ /* FALLTHROUGH */
+ default:
+ if (*text != *p)
+ return FALSE;
+ continue;
+ case '?':
+ /* Match anything. */
+ continue;
+ case '*':
+ while (*++p == '*')
+ /* Consecutive stars act just like one. */
+ continue;
+ if (*p == '\0')
+ /* Trailing star matches everything. */
+ return TRUE;
+ while (*text)
+ if ((matched = DoMatch(text++, p)) != FALSE)
+ return matched;
+ return ABORT;
+ case '[':
+ reverse = p[1] == NEGATE_CLASS ? TRUE : FALSE;
+ if (reverse)
+ /* Inverted character class. */
+ p++;
+ matched = FALSE;
+ if (p[1] == ']' || p[1] == '-')
+ if (*++p == *text)
+ matched = TRUE;
+ for (last = *p; *++p && *p != ']'; last = *p)
+ /* This next line requires a good C compiler. */
+ if (*p == '-' && p[1] != ']'
+ ? *text <= *++p && *text >= last : *text == *p)
+ matched = TRUE;
+ if (matched == reverse)
+ return FALSE;
+ continue;
+ }
+ }
+
+#ifdef MATCH_TAR_PATTERN
+ if (*text == '/')
+ return TRUE;
+#endif /* MATCH_TAR_ATTERN */
+ return *text == '\0';
+}
+
+
+/*
+** User-level routine. Returns TRUE or FALSE.
+*/
+int wildmat(const char *text, const char *p)
+{
+#ifdef OPTIMIZE_JUST_STAR
+ if (p[0] == '*' && p[1] == '\0')
+ return TRUE;
+#endif /* OPTIMIZE_JUST_STAR */
+ return DoMatch(text, p) == TRUE;
+}
+
+
+
+#if defined(TEST)
+
+/* Yes, we use gets not fgets. Sue me. */
+extern char *gets();
+
+
+int
+main()
+{
+ char p[80];
+ char text[80];
+
+ printf("Wildmat tester. Enter pattern, then strings to test.\n");
+ printf("A blank line gets prompts for a new pattern; a blank pattern\n");
+ printf("exits the program.\n");
+
+ for ( ; ; ) {
+ printf("\nEnter pattern: ");
+ (void)fflush(stdout);
+ if (gets(p) == NULL || p[0] == '\0')
+ break;
+ for ( ; ; ) {
+ printf("Enter text: ");
+ (void)fflush(stdout);
+ if (gets(text) == NULL)
+ exit(0);
+ if (text[0] == '\0')
+ /* Blank line; go back and get a new pattern. */
+ break;
+ printf(" %s\n", wildmat(text, p) ? "YES" : "NO");
+ }
+ }
+
+ exit(0);
+ /* NOTREACHED */
+}
+#endif /* defined(TEST) */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/wildmat.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,48 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: wildmat.h,v 1.2 2003/10/22 18:03:05 rjs3 Exp $
+ */
+
+#ifndef INCLUDED_WILDMAT_H
+#define INCLUDED_WILDMAT_H
+
+extern int wildmat(const char *text, const char *p);
+
+#endif /* INCLUDED_WILDMAT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,102 @@
+/* xmalloc.c -- Allocation package that calls fatal() when out of memory
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * $Id: xmalloc.c,v 1.29.4.1 2006/03/17 17:29:41 murch Exp $
+ */
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "xmalloc.h"
+
+#include "exitcodes.h"
+
+void* xmalloc(unsigned size)
+{
+ void *ret;
+
+ ret = malloc(size);
+ if (ret != NULL) return ret;
+
+ fatal("Virtual memory exhausted", EC_TEMPFAIL);
+ return 0; /*NOTREACHED*/
+}
+
+void* xzmalloc(unsigned size)
+{
+ void *ret;
+
+ ret = malloc(size);
+ if (ret != NULL) {
+ memset(ret, 0, size);
+ return ret;
+ }
+
+ fatal("Virtual memory exhausted", EC_TEMPFAIL);
+ return 0; /*NOTREACHED*/
+}
+
+void *xrealloc (void* ptr, unsigned size)
+{
+ void *ret;
+
+ /* xrealloc (NULL, size) behaves like xmalloc (size), as in ANSI C */
+ ret = (!ptr ? malloc (size) : realloc (ptr, size));
+ if (ret != NULL) return ret;
+
+ fatal("Virtual memory exhausted", EC_TEMPFAIL);
+ return 0; /*NOTREACHED*/
+}
+
+char *xstrdup(const char* str)
+{
+ char *p = xmalloc(strlen(str)+1);
+ strcpy(p, str);
+ return p;
+}
+
+char *xstrndup(const char* str, unsigned len)
+{
+ char *p = xmalloc(len+1);
+ strncpy(p, str, len);
+ p[len] = '\0';
+ return p;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xmalloc.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,63 @@
+/* xmalloc.h -- Allocation package that calls fatal() when out of memory
+ * $Id: xmalloc.h,v 1.25.2.1 2006/03/17 17:29:41 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_XMALLOC_H
+#define INCLUDED_XMALLOC_H
+
+/* for size_t */
+#include <stdio.h>
+/* for free() */
+#include <stdlib.h>
+
+extern void *xmalloc (unsigned size);
+extern void *xzmalloc (unsigned size);
+extern void *xrealloc (void *ptr, unsigned size);
+extern char *xstrdup (const char *str);
+extern char *xstrndup (const char *str, unsigned len);
+
+/* Functions using xmalloc.h must provide a function called fatal() conforming
+ to the following: */
+extern void fatal(const char *fatal_message, int fatal_code);
+/* __attribute__ ((noreturn));*/
+
+#endif /* INCLUDED_XMALLOC_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,65 @@
+/* xmalloc.c -- Allocation package that calls fatal() when out of memory
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * $Id: xstrlcat.c,v 1.1.2.2 2006/03/22 21:38:48 murch Exp $
+ */
+#include "xstrlcat.h"
+
+#ifndef HAVE_STRLCAT
+size_t strlcat(char *dst, const char *src, size_t len)
+{
+ size_t i, j, o;
+
+ o = strlen(dst);
+ if (len < o + 1)
+ return o + strlen(src);
+ len -= o + 1;
+ for (i = 0, j = o; i < len; i++, j++) {
+ if ((dst[j] = src[i]) == '\0') break;
+ }
+ dst[j] = '\0';
+ if (src[i] == '\0') {
+ return j;
+ } else {
+ return j + strlen(src + i);
+ }
+}
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcat.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,56 @@
+/* xmalloc.h -- Allocation package that calls fatal() when out of memory
+ * $Id: xstrlcat.h,v 1.1.2.2 2006/03/22 21:38:48 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_XSTRLCAT_H
+#define INCLUDED_XSTRLCAT_H
+
+/* for size_t */
+#include <stdio.h>
+/* for free() */
+#include <stdlib.h>
+
+#ifndef HAVE_STRLCAT
+extern size_t strlcat(char *dst, const char *src, size_t len);
+#endif
+
+#endif /* INCLUDED_XSTRLCAT_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+/* xmalloc.c -- Allocation package that calls fatal() when out of memory
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * $Id: xstrlcpy.c,v 1.1.2.2 2006/03/22 21:38:49 murch Exp $
+ */
+#include "xstrlcpy.h"
+
+#include "exitcodes.h"
+
+#ifndef HAVE_STRLCPY
+/* strlcpy -- copy string smartly.
+ *
+ * i believe/hope this is compatible with the BSD strlcpy().
+ */
+size_t strlcpy(char *dst, const char *src, size_t len)
+{
+ size_t n;
+
+ if (len <= 0) {
+ /* we can't do anything ! */
+ return strlen(src);
+ }
+
+ /* assert(len >= 1); */
+ for (n = 0; n < len-1; n++) {
+ if ((dst[n] = src[n]) == '\0') break;
+ }
+ if (n >= len-1) {
+ /* ran out of space */
+ dst[n] = '\0';
+ while(src[n]) n++;
+ }
+ return n;
+}
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/lib/xstrlcpy.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,57 @@
+/* xmalloc.h -- Allocation package that calls fatal() when out of memory
+ * $Id: xstrlcpy.h,v 1.1.2.2 2006/03/22 21:38:49 murch Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_XSTRLCPY_H
+#define INCLUDED_XSTRLCPY_H
+
+/* for size_t */
+#include <stdio.h>
+/* for free() */
+#include <stdlib.h>
+
+/* handy string manipulation functions */
+#ifndef HAVE_STRLCPY
+extern size_t strlcpy(char *dst, const char *src, size_t len);
+#endif
+
+#endif /* INCLUDED_XSTRLCPY_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+/Makefile.in/1.7/Tue May 23 20:56:21 2000//Tcyrus-release-2-3-7
+/configure/1.2/Tue May 23 20:56:21 2000//Tcyrus-release-2-3-7
+/configure.in/1.1/Wed Jul 5 19:27:31 1995//Tcyrus-release-2-3-7
+/cpp.ed/1.1/Wed Jul 5 18:49:33 1995//Tcyrus-release-2-3-7
+/cppsetup.c/1.3/Thu Feb 13 20:15:43 2003//Tcyrus-release-2-3-7
+/def.h/1.3/Thu Feb 13 20:15:43 2003//Tcyrus-release-2-3-7
+/ifparser.c/1.3/Thu Feb 13 20:15:43 2003//Tcyrus-release-2-3-7
+/ifparser.h/1.3/Thu Feb 13 20:15:43 2003//Tcyrus-release-2-3-7
+/include.c/1.3/Thu Feb 13 20:15:44 2003//Tcyrus-release-2-3-7
+/install-sh/1.2/Tue May 23 20:56:22 2000//Tcyrus-release-2-3-7
+/main.c/1.5/Thu Feb 13 20:15:44 2003//Tcyrus-release-2-3-7
+/mkdepend.man/1.1/Wed Jul 5 18:49:33 1995//Tcyrus-release-2-3-7
+/parse.c/1.3/Thu Feb 13 20:15:44 2003//Tcyrus-release-2-3-7
+/pr.c/1.3/Thu Feb 13 20:15:44 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/makedepend
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,79 @@
+# Makefile for makedepend
+#
+# @configure_input@
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@
+CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@
+LIBS = @LIBS@
+DEPLIBS = @DEPLIBS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+SHELL = /bin/sh
+
+all: makedepend
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
+
+makedepend: cppsetup.o ifparser.o include.o main.o parse.o pr.o
+ $(CC) $(LDFLAGS) -o makedepend cppsetup.o ifparser.o include.o \
+ main.o parse.o pr.o $(DEPLIBS) $(LIBS)
+
+clean:
+ rm -f *.o Makefile.bak makedepend
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ makedepend $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure Sat Aug 26 02:00:13 2006
@@ -1,0 +1,917 @@
+#! /bin/sh
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.3
+# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Initialize some other variables.
+subdirs=
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -build | --build | --buil | --bui | --bu | --b)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=PREFIX install architecture-dependent files in PREFIX
+ [same as prefix]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+--enable and --with options recognized:$ac_help
+EOF
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.3"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=cppsetup.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ if test "${CFLAGS+set}" != set; then
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_gcc_g=yes
+else
+ ac_cv_prog_gcc_g=no
+fi
+rm -f conftest*
+
+fi
+ echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
+ if test $ac_cv_prog_gcc_g = yes; then
+ CFLAGS="-g -O"
+ else
+ CFLAGS="-O"
+ fi
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ for ac_prog in ginstall installbsd scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_ifs"
+ # As a last resort, use the slow shell script.
+ test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
+fi
+ INSTALL="$ac_cv_path_install"
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+set dummy ${MAKE-make}; ac_make=$2
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 615 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 629 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+fi
+CPP="$ac_cv_prog_CPP"
+echo "$ac_t""$CPP" 1>&6
+
+for ac_hdr in stdarg.h
+do
+ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 660 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
+ >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.3"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+$ac_vpsub
+$extrasub
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@CC@%$CC%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@RANLIB@%$RANLIB%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@CPP@%$CPP%g
+s%@DEPLIBS@%$DEPLIBS%g
+
+CEOF
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust relative srcdir, etc. for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+fi; done
+rm -f conftest.subs
+
+
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/configure.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(cppsetup.c)
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+AC_PROG_MAKE_SET
+AC_CHECK_HEADERS(stdarg.h)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(DEPLIBS)
+
+AC_OUTPUT(Makefile)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cpp.ed
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cpp.ed?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cpp.ed (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cpp.ed Sat Aug 26 02:00:13 2006
@@ -1,0 +1,75 @@
+#
+# $XConsortium: cpp.ed,v 1.3 89/12/12 12:44:18 jim Exp $
+#
+# $Locker $
+#
+/struct symtab stab/d
+/struct symtab \*defloc;/d
+/struct symtab \*udfloc;/d
+/struct symtab \*incloc;/d
+/struct symtab \*ifloc;/d
+/struct symtab \*elsloc;/d
+/struct symtab \*eifloc;/d
+/struct symtab \*ifdloc;/d
+/struct symtab \*ifnloc;/d
+/struct symtab \*ysysloc;/d
+/struct symtab \*varloc;/d
+/struct symtab \*lneloc;/d
+/struct symtab \*ulnloc;/d
+/struct symtab \*uflloc;/d
+/^sayline(/s/$/ DELETED/p
+.,/^}/d
+/^unfill(/s/$/ DELETED/p
+.-1,/^}/d
+/^doincl(/s/$/ DELETED/p
+.-1,/^}/d
+/^equfrm(/s/$/ DELETED/p
+.,/^}/d
+/^dodef(/s/$/ DELETED/p
+.-1,/^}/d
+/^control(/s/$/ DELETED/p
+.-1,/^}/d
+/^savestring(/s/$/ DELETED/p
+.-1,/^}/d
+/^stsym(/s/$/ DELETED/p
+.-1,/^}/d
+/^ppsym(/s/$/ DELETED/p
+.-1,/^}/d
+/^yyerror(/s/$/ DELETED/p
+.,/^}/d
+/^ppwarn(/s/$/ DELETED/p
+.,/^}/d
+/^lookup(/s/$/ DELETED/p
+.-1,/^}/d
+/^subst(/s/$/ DELETED/p
+.-1,/^}/d
+/^trmdir(/s/$/ DELETED/p
+.-1,/^}/d
+/^copy(/s/$/ DELETED/p
+.-1,/^}/d
+/^pperror(/s/$/ DELETED/p
+.,/^}/d
+/^main(/s/$/ CHANGED to cpp_varsetup(argc,argv)/p
+.c
+cpp_varsetup(argc,argv)
+.
+/^strdex(/s/$/ DELETED/p
+.-1,/^}/d
+/^ for(i=1; i<argc; i++)/s/$/ To the end DELETED/p
+.,$c
+}
+.
+/^dump(/s/$/ DELETED/p
+.,/^}/c
+dump() { fatal("dump\n"); }
+.
+/^refill(/s/$/ DELETED/p
+.,/^}/c
+refill() { fatal("refill\n"); }
+.
+/^slookup(/s/$/ DELETED/p
+.-1,/^}/c
+static struct symtab *slookup() { fatal("slookup\n"); }
+.
+w
+q
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cppsetup.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cppsetup.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cppsetup.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/cppsetup.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,283 @@
+/* $XConsortium: cppsetup.c,v 1.13 94/04/17 20:10:32 gildea Exp $ */
+
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+
+Copyright (c) 1993, 1994 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include "def.h"
+
+#ifdef CPP
+/*
+ * This file is strictly for the sake of cpy.y and yylex.c (if
+ * you indeed have the source for cpp).
+ */
+#define IB 1
+#define SB 2
+#define NB 4
+#define CB 8
+#define QB 16
+#define WB 32
+#define SALT '#'
+#if pdp11 | vax | ns16000 | mc68000 | ibm032
+#define COFF 128
+#else
+#define COFF 0
+#endif
+/*
+ * These variables used by cpy.y and yylex.c
+ */
+extern char *outp, *inp, *newp, *pend;
+extern char *ptrtab;
+extern char fastab[];
+extern char slotab[];
+
+/*
+ * cppsetup
+ */
+struct filepointer *currentfile;
+struct inclist *currentinc;
+
+cppsetup(line, filep, inc)
+ register char *line;
+ register struct filepointer *filep;
+ register struct inclist *inc;
+{
+ register char *p, savec;
+ static boolean setupdone = FALSE;
+ boolean value;
+
+ if (!setupdone) {
+ cpp_varsetup();
+ setupdone = TRUE;
+ }
+
+ currentfile = filep;
+ currentinc = inc;
+ inp = newp = line;
+ for (p=newp; *p; p++)
+ ;
+
+ /*
+ * put a newline back on the end, and set up pend, etc.
+ */
+ *p++ = '\n';
+ savec = *p;
+ *p = '\0';
+ pend = p;
+
+ ptrtab = slotab+COFF;
+ *--inp = SALT;
+ outp=inp;
+ value = yyparse();
+ *p = savec;
+ return(value);
+}
+
+struct symtab *lookup(symbol)
+ char *symbol;
+{
+ static struct symtab undefined;
+ struct symtab *sp;
+
+ sp = isdefined(symbol, currentinc, NULL);
+ if (sp == NULL) {
+ sp = &undefined;
+ sp->s_value = NULL;
+ }
+ return (sp);
+}
+
+pperror(tag, x0,x1,x2,x3,x4)
+ int tag,x0,x1,x2,x3,x4;
+{
+ warning("\"%s\", line %d: ", currentinc->i_file, currentfile->f_line);
+ warning(x0,x1,x2,x3,x4);
+}
+
+
+yyerror(s)
+ register char *s;
+{
+ fatalerr("Fatal error: %s\n", s);
+}
+#else /* not CPP */
+
+#include "ifparser.h"
+struct _parse_data {
+ struct filepointer *filep;
+ struct inclist *inc;
+ const char *line;
+};
+
+static const char *
+_my_if_errors (ip, cp, expecting)
+ IfParser *ip;
+ const char *cp;
+ const char *expecting;
+{
+ struct _parse_data *pd = (struct _parse_data *) ip->data;
+ int lineno = pd->filep->f_line;
+ char *filename = pd->inc->i_file;
+ char prefix[300];
+ int prefixlen;
+ int i;
+
+ sprintf (prefix, "\"%s\":%d", filename, lineno);
+ prefixlen = strlen(prefix);
+ fprintf (stderr, "%s: %s", prefix, pd->line);
+ i = cp - pd->line;
+ if (i > 0 && pd->line[i-1] != '\n') {
+ putc ('\n', stderr);
+ }
+ for (i += prefixlen + 3; i > 0; i--) {
+ putc (' ', stderr);
+ }
+ fprintf (stderr, "^--- expecting %s\n", expecting);
+ return NULL;
+}
+
+
+#define MAXNAMELEN 256
+
+static struct symtab *
+_lookup_variable (ip, var, len)
+ IfParser *ip;
+ const char *var;
+ int len;
+{
+ char tmpbuf[MAXNAMELEN + 1];
+ struct _parse_data *pd = (struct _parse_data *) ip->data;
+
+ if (len > MAXNAMELEN)
+ return 0;
+
+ strncpy (tmpbuf, var, len);
+ tmpbuf[len] = '\0';
+ return isdefined (tmpbuf, pd->inc, NULL);
+}
+
+
+static int
+_my_eval_defined (ip, var, len)
+ IfParser *ip;
+ const char *var;
+ int len;
+{
+ if (_lookup_variable (ip, var, len))
+ return 1;
+ else
+ return 0;
+}
+
+#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
+
+static int
+_my_eval_variable (ip, var, len)
+ IfParser *ip;
+ const char *var;
+ int len;
+{
+ struct symtab *s;
+
+ s = _lookup_variable (ip, var, len);
+ if (!s)
+ return 0;
+ do {
+ var = s->s_value;
+ if (!isvarfirstletter(*var))
+ break;
+ s = _lookup_variable (ip, var, strlen(var));
+ } while (s);
+
+ return atoi(var);
+}
+
+
+cppsetup(line, filep, inc)
+ register char *line;
+ register struct filepointer *filep;
+ register struct inclist *inc;
+{
+ IfParser ip;
+ struct _parse_data pd;
+ int val = 0;
+
+ pd.filep = filep;
+ pd.inc = inc;
+ pd.line = line;
+ ip.funcs.handle_error = _my_if_errors;
+ ip.funcs.eval_defined = _my_eval_defined;
+ ip.funcs.eval_variable = _my_eval_variable;
+ ip.data = (char *) &pd;
+
+ (void) ParseIfExpression (&ip, line, &val);
+ if (val)
+ return IF;
+ else
+ return IFFALSE;
+}
+#endif /* CPP */
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/def.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/def.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/def.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/def.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,176 @@
+/* $XConsortium: def.h,v 1.25 94/04/17 20:10:33 gildea Exp $ */
+
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+
+Copyright (c) 1993, 1994 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include <stdio.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define MAXDEFINES 512
+#define MAXFILES 512
+#define MAXDIRS 64
+#define SYMTABINC 10 /* must be > 1 for define() to work right */
+#define TRUE 1
+#define FALSE 0
+
+/* the following must match the directives table in main.c */
+#define IF 0
+#define IFDEF 1
+#define IFNDEF 2
+#define ELSE 3
+#define ENDIF 4
+#define DEFINE 5
+#define UNDEF 6
+#define INCLUDE 7
+#define LINE 8
+#define PRAGMA 9
+#define ERROR 10
+#define IDENT 11
+#define SCCS 12
+#define ELIF 13
+#define EJECT 14
+#define IFFALSE 15 /* pseudo value --- never matched */
+#define ELIFFALSE 16 /* pseudo value --- never matched */
+#define INCLUDEDOT 17 /* pseudo value --- never matched */
+#define IFGUESSFALSE 18 /* pseudo value --- never matched */
+#define ELIFGUESSFALSE 19 /* pseudo value --- never matched */
+
+#ifdef DEBUG
+extern int _debugmask;
+/*
+ * debug levels are:
+ *
+ * 0 show ifn*(def)*,endif
+ * 1 trace defined/!defined
+ * 2 show #include
+ * 3 show #include SYMBOL
+ * 4-6 unused
+ */
+#define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; }
+#else
+#define debug(level,arg) /**/
+#endif /* DEBUG */
+
+typedef unsigned char boolean;
+
+struct symtab {
+ char *s_name;
+ char *s_value;
+};
+
+struct inclist {
+ char *i_incstring; /* string from #include line */
+ char *i_file; /* path name of the include file */
+ struct inclist **i_list; /* list of files it itself includes */
+ int i_listlen; /* length of i_list */
+ struct symtab *i_defs; /* symbol table for this file */
+ int i_ndefs; /* current # defines */
+ int i_deflen; /* amount of space in table */
+ boolean i_defchecked; /* whether defines have been checked */
+ boolean i_notified; /* whether we have revealed includes */
+ boolean i_marked; /* whether it's in the makefile */
+ boolean i_searched; /* whether we have read this */
+ boolean i_included_sym; /* whether #include SYMBOL was found */
+ /* Can't use i_list if TRUE */
+};
+
+struct filepointer {
+ char *f_p;
+ char *f_base;
+ char *f_end;
+ long f_len;
+ long f_line;
+};
+
+#ifndef NO_STDLIB_H /* X_NOT_STDC_ENV */
+#include <stdlib.h>
+#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
+char *malloc(), *realloc();
+#endif /* macII */
+#else
+char *malloc();
+char *realloc();
+#endif
+
+char *copy();
+char *base_name();
+char *getline();
+struct symtab *slookup();
+struct symtab *isdefined();
+struct symtab *fdefined();
+struct filepointer *getfile();
+struct inclist *newinclude();
+struct inclist *inc_path();
+
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+extern fatalerr(char *, ...);
+extern warning(char *, ...);
+extern warning1(char *, ...);
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,489 @@
+/*
+ * $XConsortium: ifparser.c,v 1.7 94/01/18 21:30:50 rws Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * Copyright 1992 Network Computing Devices, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Network Computing Devices may not be
+ * used in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. Network Computing Devices makes
+ * no representations about the suitability of this software for any purpose.
+ * It is provided ``as is'' without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Jim Fulton
+ * Network Computing Devices, Inc.
+ *
+ * Simple if statement processor
+ *
+ * This module can be used to evaluate string representations of C language
+ * if constructs. It accepts the following grammar:
+ *
+ * EXPRESSION := VALUE
+ * | VALUE BINOP EXPRESSION
+ *
+ * VALUE := '(' EXPRESSION ')'
+ * | '!' VALUE
+ * | '-' VALUE
+ * | 'defined' '(' variable ')'
+ * | 'defined' variable
+ * | # variable '(' variable-list ')'
+ * | variable
+ * | number
+ *
+ * BINOP := '*' | '/' | '%'
+ * | '+' | '-'
+ * | '<<' | '>>'
+ * | '<' | '>' | '<=' | '>='
+ * | '==' | '!='
+ * | '&' | '|'
+ * | '&&' | '||'
+ *
+ * The normal C order of precidence is supported.
+ *
+ *
+ * External Entry Points:
+ *
+ * ParseIfExpression parse a string for #if
+ */
+
+#include "ifparser.h"
+#include <ctype.h>
+
+/****************************************************************************
+ Internal Macros and Utilities for Parser
+ ****************************************************************************/
+
+#define DO(val) if (!(val)) return NULL
+#define CALLFUNC(ggg,fff) (*((ggg)->funcs.fff))
+#define SKIPSPACE(ccc) while (isspace(*ccc)) ccc++
+#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
+
+
+static const char *
+parse_variable (g, cp, varp)
+ IfParser *g;
+ const char *cp;
+ const char **varp;
+{
+ SKIPSPACE (cp);
+
+ if (!isvarfirstletter (*cp))
+ return CALLFUNC(g, handle_error) (g, cp, "variable name");
+
+ *varp = cp;
+ /* EMPTY */
+ for (cp++; isalnum(*cp) || *cp == '_'; cp++) ;
+ return cp;
+}
+
+
+static const char *
+parse_number (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ SKIPSPACE (cp);
+
+ if (!isdigit(*cp))
+ return CALLFUNC(g, handle_error) (g, cp, "number");
+
+#ifdef WIN32
+ *valp = strtol(cp, &cp, 0);
+#else
+ *valp = atoi (cp);
+ /* EMPTY */
+ for (cp++; isdigit(*cp); cp++) ;
+#endif
+ return cp;
+}
+
+
+static const char *
+parse_value (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ const char *var;
+
+ *valp = 0;
+
+ SKIPSPACE (cp);
+ if (!*cp)
+ return cp;
+
+ switch (*cp) {
+ case '(':
+ DO (cp = ParseIfExpression (g, cp + 1, valp));
+ SKIPSPACE (cp);
+ if (*cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
+
+ return cp + 1; /* skip the right paren */
+
+ case '!':
+ DO (cp = parse_value (g, cp + 1, valp));
+ *valp = !(*valp);
+ return cp;
+
+ case '-':
+ DO (cp = parse_value (g, cp + 1, valp));
+ *valp = -(*valp);
+ return cp;
+
+ case '#':
+ DO (cp = parse_variable (g, cp + 1, &var));
+ SKIPSPACE (cp);
+ if (*cp != '(')
+ return CALLFUNC(g, handle_error) (g, cp, "(");
+ do {
+ DO (cp = parse_variable (g, cp + 1, &var));
+ SKIPSPACE (cp);
+ } while (*cp && *cp != ')');
+ if (*cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
+ *valp = 1; /* XXX */
+ return cp + 1;
+
+ case 'd':
+ if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) {
+ int paren = 0;
+ cp += 7;
+ SKIPSPACE (cp);
+ if (*cp == '(') {
+ paren = 1;
+ cp++;
+ }
+ DO (cp = parse_variable (g, cp, &var));
+ SKIPSPACE (cp);
+ if (paren && *cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
+ *valp = (*(g->funcs.eval_defined)) (g, var, cp - var);
+ return cp + paren; /* skip the right paren */
+ }
+ /* fall out */
+ }
+
+ if (isdigit(*cp)) {
+ DO (cp = parse_number (g, cp, valp));
+ } else if (!isvarfirstletter(*cp))
+ return CALLFUNC(g, handle_error) (g, cp, "variable or number");
+ else {
+ DO (cp = parse_variable (g, cp, &var));
+ *valp = (*(g->funcs.eval_variable)) (g, var, cp - var);
+ }
+
+ return cp;
+}
+
+
+
+static const char *
+parse_product (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_value (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '*':
+ DO (cp = parse_product (g, cp + 1, &rightval));
+ *valp = (*valp * rightval);
+ break;
+
+ case '/':
+ DO (cp = parse_product (g, cp + 1, &rightval));
+ *valp = (*valp / rightval);
+ break;
+
+ case '%':
+ DO (cp = parse_product (g, cp + 1, &rightval));
+ *valp = (*valp % rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_sum (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_product (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '+':
+ DO (cp = parse_sum (g, cp + 1, &rightval));
+ *valp = (*valp + rightval);
+ break;
+
+ case '-':
+ DO (cp = parse_sum (g, cp + 1, &rightval));
+ *valp = (*valp - rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_shift (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_sum (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '<':
+ if (cp[1] == '<') {
+ DO (cp = parse_shift (g, cp + 2, &rightval));
+ *valp = (*valp << rightval);
+ }
+ break;
+
+ case '>':
+ if (cp[1] == '>') {
+ DO (cp = parse_shift (g, cp + 2, &rightval));
+ *valp = (*valp >> rightval);
+ }
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_inequality (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_shift (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '<':
+ if (cp[1] == '=') {
+ DO (cp = parse_inequality (g, cp + 2, &rightval));
+ *valp = (*valp <= rightval);
+ } else {
+ DO (cp = parse_inequality (g, cp + 1, &rightval));
+ *valp = (*valp < rightval);
+ }
+ break;
+
+ case '>':
+ if (cp[1] == '=') {
+ DO (cp = parse_inequality (g, cp + 2, &rightval));
+ *valp = (*valp >= rightval);
+ } else {
+ DO (cp = parse_inequality (g, cp + 1, &rightval));
+ *valp = (*valp > rightval);
+ }
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_equality (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_inequality (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '=':
+ if (cp[1] == '=')
+ cp++;
+ DO (cp = parse_equality (g, cp + 1, &rightval));
+ *valp = (*valp == rightval);
+ break;
+
+ case '!':
+ if (cp[1] != '=')
+ break;
+ DO (cp = parse_equality (g, cp + 2, &rightval));
+ *valp = (*valp != rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_band (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_equality (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '&':
+ if (cp[1] != '&') {
+ DO (cp = parse_band (g, cp + 1, &rightval));
+ *valp = (*valp & rightval);
+ }
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_bor (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_band (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '|':
+ if (cp[1] != '|') {
+ DO (cp = parse_bor (g, cp + 1, &rightval));
+ *valp = (*valp | rightval);
+ }
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_land (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_bor (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '&':
+ if (cp[1] != '&')
+ return CALLFUNC(g, handle_error) (g, cp, "&&");
+ DO (cp = parse_land (g, cp + 2, &rightval));
+ *valp = (*valp && rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_lor (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ int rightval;
+
+ DO (cp = parse_land (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '|':
+ if (cp[1] != '|')
+ return CALLFUNC(g, handle_error) (g, cp, "||");
+ DO (cp = parse_lor (g, cp + 2, &rightval));
+ *valp = (*valp || rightval);
+ break;
+ }
+ return cp;
+}
+
+
+/****************************************************************************
+ External Entry Points
+ ****************************************************************************/
+
+const char *
+ParseIfExpression (g, cp, valp)
+ IfParser *g;
+ const char *cp;
+ int *valp;
+{
+ return parse_lor (g, cp, valp);
+}
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/ifparser.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,114 @@
+/*
+ * $XConsortium: ifparser.h,v 1.1 92/08/22 13:05:39 rws Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * Copyright 1992 Network Computing Devices, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Network Computing Devices may not be
+ * used in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. Network Computing Devices makes
+ * no representations about the suitability of this software for any purpose.
+ * It is provided ``as is'' without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Jim Fulton
+ * Network Computing Devices, Inc.
+ *
+ * Simple if statement processor
+ *
+ * This module can be used to evaluate string representations of C language
+ * if constructs. It accepts the following grammar:
+ *
+ * EXPRESSION := VALUE
+ * | VALUE BINOP EXPRESSION
+ *
+ * VALUE := '(' EXPRESSION ')'
+ * | '!' VALUE
+ * | '-' VALUE
+ * | 'defined' '(' variable ')'
+ * | variable
+ * | number
+ *
+ * BINOP := '*' | '/' | '%'
+ * | '+' | '-'
+ * | '<<' | '>>'
+ * | '<' | '>' | '<=' | '>='
+ * | '==' | '!='
+ * | '&' | '|'
+ * | '&&' | '||'
+ *
+ * The normal C order of precidence is supported.
+ *
+ *
+ * External Entry Points:
+ *
+ * ParseIfExpression parse a string for #if
+ */
+
+#include <stdio.h>
+
+#define const /**/
+typedef int Bool;
+#define False 0
+#define True 1
+
+typedef struct _if_parser {
+ struct { /* functions */
+ char *(*handle_error) (/* struct _if_parser *, const char *,
+ const char * */);
+ int (*eval_variable) (/* struct _if_parser *, const char *, int */);
+ int (*eval_defined) (/* struct _if_parser *, const char *, int */);
+ } funcs;
+ char *data;
+} IfParser;
+
+char *ParseIfExpression (/* IfParser *, const char *, int * */);
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/include.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/include.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/include.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/include.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,336 @@
+/* $XConsortium: include.c,v 1.16 94/04/17 20:10:34 gildea Exp $ */
+
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+
+Copyright (c) 1993, 1994 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+
+#include "def.h"
+
+extern struct inclist inclist[ MAXFILES ],
+ *inclistp;
+extern char *includedirs[ ];
+extern char *notdotdot[ ];
+extern boolean show_where_not;
+extern boolean warn_multiple;
+
+struct inclist *inc_path(file, include, dot)
+ register char *file,
+ *include;
+ boolean dot;
+{
+ static char path[ BUFSIZ ];
+ register char **pp, *p;
+ register struct inclist *ip;
+ struct stat st;
+ boolean found = FALSE;
+
+ /*
+ * Check all previously found include files for a path that
+ * has already been expanded.
+ */
+ for (ip = inclist; ip->i_file; ip++)
+ if ((strcmp(ip->i_incstring, include) == 0) && !ip->i_included_sym)
+ {
+ found = TRUE;
+ break;
+ }
+
+ /*
+ * If the path was surrounded by "" or is an absolute path,
+ * then check the exact path provided.
+ */
+ if (!found && (dot || *include == '/')) {
+ if (stat(include, &st) == 0) {
+ ip = newinclude(include, include);
+ found = TRUE;
+ }
+ else if (show_where_not)
+ warning1("\tnot in %s\n", include);
+ }
+
+ /*
+ * See if this include file is in the directory of the
+ * file being compiled.
+ */
+ if (!found) {
+ for (p=file+strlen(file); p>file; p--)
+ if (*p == '/')
+ break;
+ if (p == file)
+ strcpy(path, include);
+ else {
+ strncpy(path, file, (p-file) + 1);
+ path[ (p-file) + 1 ] = '\0';
+ strcpy(path + (p-file) + 1, include);
+ }
+ remove_dotdot(path);
+ if (stat(path, &st) == 0) {
+ ip = newinclude(path, include);
+ found = TRUE;
+ }
+ else if (show_where_not)
+ warning1("\tnot in %s\n", path);
+ }
+
+ /*
+ * Check the include directories specified. (standard include dir
+ * should be at the end.)
+ */
+ if (!found)
+ for (pp = includedirs; *pp; pp++) {
+ sprintf(path, "%s/%s", *pp, include);
+ remove_dotdot(path);
+ if (stat(path, &st) == 0) {
+ ip = newinclude(path, include);
+ found = TRUE;
+ break;
+ }
+ else if (show_where_not)
+ warning1("\tnot in %s\n", path);
+ }
+
+ if (!found)
+ ip = NULL;
+ return(ip);
+}
+
+/*
+ * Ocaisionally, pathnames are created that look like ../x/../y
+ * Any of the 'x/..' sequences within the name can be eliminated.
+ * (but only if 'x' is not a symbolic link!!)
+ */
+remove_dotdot(path)
+ char *path;
+{
+ register char *end, *from, *to, **cp;
+ char *components[ MAXFILES ],
+ newpath[ BUFSIZ ];
+ boolean component_copied;
+
+ /*
+ * slice path up into components.
+ */
+ to = newpath;
+ if (*path == '/')
+ *to++ = '/';
+ *to = '\0';
+ cp = components;
+ for (from=end=path; *end; end++)
+ if (*end == '/') {
+ while (*end == '/')
+ *end++ = '\0';
+ if (*from)
+ *cp++ = from;
+ from = end;
+ }
+ *cp++ = from;
+ *cp = NULL;
+
+ /*
+ * Now copy the path, removing all 'x/..' components.
+ */
+ cp = components;
+ component_copied = FALSE;
+ while(*cp) {
+ if (!isdot(*cp) && !isdotdot(*cp) && isdotdot(*(cp+1))) {
+ if (issymbolic(newpath, *cp))
+ goto dont_remove;
+ cp++;
+ } else {
+ dont_remove:
+ if (component_copied)
+ *to++ = '/';
+ component_copied = TRUE;
+ for (from = *cp; *from; )
+ *to++ = *from++;
+ *to = '\0';
+ }
+ cp++;
+ }
+ *to++ = '\0';
+
+ /*
+ * copy the reconstituted path back to our pointer.
+ */
+ strcpy(path, newpath);
+}
+
+isdot(p)
+ register char *p;
+{
+ if(p && *p++ == '.' && *p++ == '\0')
+ return(TRUE);
+ return(FALSE);
+}
+
+isdotdot(p)
+ register char *p;
+{
+ if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0')
+ return(TRUE);
+ return(FALSE);
+}
+
+issymbolic(dir, component)
+ register char *dir, *component;
+{
+#ifdef S_IFLNK
+ struct stat st;
+ char buf[ BUFSIZ ], **pp;
+
+ sprintf(buf, "%s%s%s", dir, *dir ? "/" : "", component);
+ for (pp=notdotdot; *pp; pp++)
+ if (strcmp(*pp, buf) == 0)
+ return (TRUE);
+ if (lstat(buf, &st) == 0
+ && (st.st_mode & S_IFMT) == S_IFLNK) {
+ *pp++ = copy(buf);
+ if (pp >= ¬dotdot[ MAXDIRS ])
+ fatalerr("out of .. dirs, increase MAXDIRS\n");
+ return(TRUE);
+ }
+#endif
+ return(FALSE);
+}
+
+/*
+ * Add an include file to the list of those included by 'file'.
+ */
+struct inclist *newinclude(newfile, incstring)
+ register char *newfile, *incstring;
+{
+ register struct inclist *ip;
+
+ /*
+ * First, put this file on the global list of include files.
+ */
+ ip = inclistp++;
+ if (inclistp == inclist + MAXFILES - 1)
+ fatalerr("out of space: increase MAXFILES\n");
+ ip->i_file = copy(newfile);
+ ip->i_included_sym = FALSE;
+ if (incstring == NULL)
+ ip->i_incstring = ip->i_file;
+ else
+ ip->i_incstring = copy(incstring);
+
+ return(ip);
+}
+
+included_by(ip, newfile)
+ register struct inclist *ip, *newfile;
+{
+ register i;
+
+ if (ip == NULL)
+ return;
+ /*
+ * Put this include file (newfile) on the list of files included
+ * by 'file'. If 'file' is NULL, then it is not an include
+ * file itself (i.e. was probably mentioned on the command line).
+ * If it is already on the list, don't stick it on again.
+ */
+ if (ip->i_list == NULL)
+ ip->i_list = (struct inclist **)
+ malloc(sizeof(struct inclist *) * ++ip->i_listlen);
+ else {
+ for (i=0; i<ip->i_listlen; i++)
+ if (ip->i_list[ i ] == newfile) {
+ i = strlen(newfile->i_file);
+ if (!ip->i_included_sym &&
+ !(i > 2 &&
+ newfile->i_file[i-1] == 'c' &&
+ newfile->i_file[i-2] == '.'))
+ {
+ /* only bitch if ip has */
+ /* no #include SYMBOL lines */
+ /* and is not a .c file */
+ if (warn_multiple)
+ {
+ warning("%s includes %s more than once!\n",
+ ip->i_file, newfile->i_file);
+ warning1("Already have\n");
+ for (i=0; i<ip->i_listlen; i++)
+ warning1("\t%s\n", ip->i_list[i]->i_file);
+ }
+ }
+ return;
+ }
+ ip->i_list = (struct inclist **) realloc(ip->i_list,
+ sizeof(struct inclist *) * ++ip->i_listlen);
+ }
+ ip->i_list[ ip->i_listlen-1 ] = newfile;
+}
+
+inc_clean ()
+{
+ register struct inclist *ip;
+
+ for (ip = inclist; ip < inclistp; ip++) {
+ ip->i_marked = FALSE;
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/install-sh
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/install-sh?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/install-sh (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/install-sh Sat Aug 26 02:00:13 2006
@@ -1,0 +1,276 @@
+#!/bin/sh
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# install - install a program, script, or datafile
+# This comes from X11R5.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+tranformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/install-sh
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/main.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/main.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/main.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/main.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,776 @@
+/* $XConsortium: main.c,v 1.83 94/04/17 20:10:36 gildea Exp $ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+
+Copyright (c) 1993, 1994 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include "def.h"
+#ifdef hpux
+#define sigvec sigvector
+#endif /* hpux */
+
+#include <signal.h>
+
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+#include <stdarg.h>
+#endif
+
+#ifdef DEBUG
+int _debugmask;
+#endif
+
+char *ProgramName;
+
+char *directives[] = {
+ "if",
+ "ifdef",
+ "ifndef",
+ "else",
+ "endif",
+ "define",
+ "undef",
+ "include",
+ "line",
+ "pragma",
+ "error",
+ "ident",
+ "sccs",
+ "elif",
+ "eject",
+ NULL
+};
+
+struct symtab predefs[] = {
+#ifdef apollo
+ {"apollo", "1"},
+#endif
+#ifdef ibm032
+ {"ibm032", "1"},
+#endif
+#ifdef sun
+ {"sun", "1"},
+#ifdef sparc
+ {"sparc", "1"},
+#endif
+#endif
+#ifdef solaris20
+ {"solaris20", "1"},
+#endif
+#ifdef __i386
+ {"__i386", "1"},
+#endif
+#ifdef hpux
+ {"hpux", "1"},
+#endif
+#ifdef vax
+ {"vax", "1"},
+#endif
+#ifdef VMS
+ {"VMS", "1"},
+#endif
+#ifdef ultrix
+ {"ultrix", "1"},
+#endif
+#ifdef mips
+ {"mips", "1"},
+#endif
+#ifdef __SCO__
+ {"__SCO__", "1"},
+#endif
+#ifdef __DGUX
+ {"__DGUX", "1"},
+#endif
+#ifdef __DGUX__
+ {"__DGUX__", "1"},
+#endif
+#ifdef __m88k__
+ {"__m88k__", "1"},
+#endif
+ {NULL, NULL}
+};
+#define OBJSUFFIX ".o"
+#define INCLUDEDIR "/usr/include"
+
+struct inclist inclist[ MAXFILES ],
+ *inclistp = inclist,
+ maininclist;
+
+char *filelist[ MAXFILES ];
+char *includedirs[ MAXDIRS + 1 ];
+char *notdotdot[ MAXDIRS ];
+char *objprefix = "";
+char *objsuffix = OBJSUFFIX;
+char *startat = "# DO NOT DELETE";
+int width = 78;
+boolean append = FALSE;
+boolean printed = FALSE;
+boolean verbose = FALSE;
+boolean show_where_not = FALSE;
+boolean warn_multiple = FALSE; /* Warn on multiple includes of same file */
+
+static
+#ifdef SIGNALRETURNSINT
+int
+#else
+void
+#endif
+catch (sig)
+ int sig;
+{
+ fflush (stdout);
+ fatalerr ("got signal %d\n", sig);
+}
+
+#if defined(USG) || (defined(SYSV386) && defined(SYSV)) || defined(WIN32) || defined(__i386)
+#define USGISH
+#endif
+
+#ifndef USGISH
+#ifndef _POSIX_SOURCE
+#define sigaction sigvec
+#define sa_handler sv_handler
+#define sa_mask sv_mask
+#define sa_flags sv_flags
+#endif
+struct sigaction sig_act;
+#endif /* USGISH */
+
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ register char **fp = filelist;
+ register char **incp = includedirs;
+ register char *p;
+ register struct inclist *ip;
+ char *makefile = NULL;
+ struct filepointer *filecontent;
+ struct symtab *psymp = predefs;
+ char *endmarker = NULL;
+ char *defincdir = NULL;
+
+ ProgramName = argv[0];
+
+ while (psymp->s_name)
+ {
+ define2(psymp->s_name, psymp->s_value, &maininclist);
+ psymp++;
+ }
+ if (argc == 2 && argv[1][0] == '@') {
+ struct stat ast;
+ int afd;
+ char *args;
+ char **nargv;
+ int nargc;
+ char quotechar = '\0';
+
+ nargc = 1;
+ if ((afd = open(argv[1]+1, O_RDONLY)) < 0)
+ fatalerr("cannot open \"%s\"\n", argv[1]+1);
+ fstat(afd, &ast);
+ args = (char *)malloc(ast.st_size + 1);
+ if ((ast.st_size = read(afd, args, ast.st_size)) < 0)
+ fatalerr("failed to read %s\n", argv[1]+1);
+ args[ast.st_size] = '\0';
+ close(afd);
+ for (p = args; *p; p++) {
+ if (quotechar) {
+ if (quotechar == '\\' ||
+ (*p == quotechar && p[-1] != '\\'))
+ quotechar = '\0';
+ continue;
+ }
+ switch (*p) {
+ case '\\':
+ case '"':
+ case '\'':
+ quotechar = *p;
+ break;
+ case ' ':
+ case '\n':
+ *p = '\0';
+ if (p > args && p[-1])
+ nargc++;
+ break;
+ }
+ }
+ if (p[-1])
+ nargc++;
+ nargv = (char **)malloc(nargc * sizeof(char *));
+ nargv[0] = argv[0];
+ argc = 1;
+ for (p = args; argc < nargc; p += strlen(p) + 1)
+ if (*p) nargv[argc++] = p;
+ argv = nargv;
+ }
+ for(argc--, argv++; argc; argc--, argv++) {
+ /* if looking for endmarker then check before parsing */
+ if (endmarker && strcmp (endmarker, *argv) == 0) {
+ endmarker = NULL;
+ continue;
+ }
+ if (**argv != '-') {
+ /* treat +thing as an option for C++ */
+ if (endmarker && **argv == '+')
+ continue;
+ *fp++ = argv[0];
+ continue;
+ }
+ switch(argv[0][1]) {
+ case '-':
+ endmarker = &argv[0][2];
+ if (endmarker[0] == '\0') endmarker = "--";
+ break;
+ case 'D':
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ }
+ for (p=argv[0] + 2; *p ; p++)
+ if (*p == '=') {
+ *p = ' ';
+ break;
+ }
+ define(argv[0] + 2, &maininclist);
+ break;
+ case 'I':
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = argv[0]+2;
+ if (**(incp-1) == '\0') {
+ *(incp-1) = *(++argv);
+ argc--;
+ }
+ break;
+ case 'Y':
+ defincdir = argv[0]+2;
+ break;
+ /* do not use if endmarker processing */
+ case 'a':
+ if (endmarker) break;
+ append = TRUE;
+ break;
+ case 'w':
+ if (endmarker) break;
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ width = atoi(argv[0]);
+ } else
+ width = atoi(argv[0]+2);
+ break;
+ case 'o':
+ if (endmarker) break;
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ objsuffix = argv[0];
+ } else
+ objsuffix = argv[0]+2;
+ break;
+ case 'p':
+ if (endmarker) break;
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ objprefix = argv[0];
+ } else
+ objprefix = argv[0]+2;
+ break;
+ case 'v':
+ if (endmarker) break;
+ verbose = TRUE;
+#ifdef DEBUG
+ if (argv[0][2])
+ _debugmask = atoi(argv[0]+2);
+#endif
+ break;
+ case 's':
+ if (endmarker) break;
+ startat = argv[0]+2;
+ if (*startat == '\0') {
+ startat = *(++argv);
+ argc--;
+ }
+ if (*startat != '#')
+ fatalerr("-s flag's value should start %s\n",
+ "with '#'.");
+ break;
+ case 'f':
+ if (endmarker) break;
+ makefile = argv[0]+2;
+ if (*makefile == '\0') {
+ makefile = *(++argv);
+ argc--;
+ }
+ break;
+
+ case 'm':
+ warn_multiple = TRUE;
+ break;
+
+ /* Ignore -O, -g so we can just pass ${CFLAGS} to
+ makedepend
+ */
+ case 'O':
+ case 'g':
+ break;
+ default:
+ if (endmarker) break;
+ /* fatalerr("unknown opt = %s\n", argv[0]); */
+ warning("ignoring option %s\n", argv[0]);
+ }
+ }
+ if (!defincdir) {
+#ifdef PREINCDIR
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = PREINCDIR;
+#endif
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = INCLUDEDIR;
+#ifdef POSTINCDIR
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = POSTINCDIR;
+#endif
+ } else if (*defincdir) {
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = defincdir;
+ }
+
+ redirect(startat, makefile);
+
+ /*
+ * catch signals.
+ */
+#ifdef USGISH
+/* should really reset SIGINT to SIG_IGN if it was. */
+#ifdef SIGHUP
+ signal (SIGHUP, catch);
+#endif
+ signal (SIGINT, catch);
+#ifdef SIGQUIT
+ signal (SIGQUIT, catch);
+#endif
+ signal (SIGILL, catch);
+#ifdef SIGBUS
+ signal (SIGBUS, catch);
+#endif
+ signal (SIGSEGV, catch);
+#ifdef SIGSYS
+ signal (SIGSYS, catch);
+#endif
+#else
+ sig_act.sa_handler = catch;
+#ifdef _POSIX_SOURCE
+ sigemptyset(&sig_act.sa_mask);
+ sigaddset(&sig_act.sa_mask, SIGINT);
+ sigaddset(&sig_act.sa_mask, SIGQUIT);
+#ifdef SIGBUS
+ sigaddset(&sig_act.sa_mask, SIGBUS);
+#endif
+ sigaddset(&sig_act.sa_mask, SIGILL);
+ sigaddset(&sig_act.sa_mask, SIGSEGV);
+ sigaddset(&sig_act.sa_mask, SIGHUP);
+ sigaddset(&sig_act.sa_mask, SIGPIPE);
+#ifdef SIGSYS
+ sigaddset(&sig_act.sa_mask, SIGSYS);
+#endif
+#else
+ sig_act.sa_mask = ((1<<(SIGINT -1))
+ |(1<<(SIGQUIT-1))
+#ifdef SIGBUS
+ |(1<<(SIGBUS-1))
+#endif
+ |(1<<(SIGILL-1))
+ |(1<<(SIGSEGV-1))
+ |(1<<(SIGHUP-1))
+ |(1<<(SIGPIPE-1))
+#ifdef SIGSYS
+ |(1<<(SIGSYS-1))
+#endif
+ );
+#endif /* _POSIX_SOURCE */
+ sig_act.sa_flags = 0;
+ sigaction(SIGHUP, &sig_act, (struct sigaction *)0);
+ sigaction(SIGINT, &sig_act, (struct sigaction *)0);
+ sigaction(SIGQUIT, &sig_act, (struct sigaction *)0);
+ sigaction(SIGILL, &sig_act, (struct sigaction *)0);
+#ifdef SIGBUS
+ sigaction(SIGBUS, &sig_act, (struct sigaction *)0);
+#endif
+ sigaction(SIGSEGV, &sig_act, (struct sigaction *)0);
+#ifdef SIGSYS
+ sigaction(SIGSYS, &sig_act, (struct sigaction *)0);
+#endif
+#endif /* USGISH */
+
+ /*
+ * now peruse through the list of files.
+ */
+ for(fp=filelist; *fp; fp++) {
+ filecontent = getfile(*fp);
+ ip = newinclude(*fp, (char *)NULL);
+
+ find_includes(filecontent, ip, ip, 0, FALSE);
+ freefile(filecontent);
+ recursive_pr_include(ip, ip->i_file, base_name(*fp));
+ inc_clean();
+ }
+ if (printed)
+ printf("\n");
+ exit(0);
+}
+
+struct filepointer *getfile(file)
+ char *file;
+{
+ register int fd;
+ struct filepointer *content;
+ struct stat st;
+
+ content = (struct filepointer *)malloc(sizeof(struct filepointer));
+ if ((fd = open(file, O_RDONLY)) < 0) {
+ warning("cannot open \"%s\"\n", file);
+ content->f_p = content->f_base = content->f_end = (char *)malloc(1);
+ *content->f_p = '\0';
+ return(content);
+ }
+ fstat(fd, &st);
+ content->f_base = (char *)malloc(st.st_size+1);
+ if (content->f_base == NULL)
+ fatalerr("cannot allocate mem\n");
+ if ((st.st_size = read(fd, content->f_base, st.st_size)) < 0)
+ fatalerr("failed to read %s\n", file);
+ close(fd);
+ content->f_len = st.st_size+1;
+ content->f_p = content->f_base;
+ content->f_end = content->f_base + st.st_size;
+ *content->f_end = '\0';
+ content->f_line = 0;
+ return(content);
+}
+
+freefile(fp)
+ struct filepointer *fp;
+{
+ free(fp->f_base);
+ free(fp);
+}
+
+char *copy(str)
+ register char *str;
+{
+ register char *p = (char *)malloc(strlen(str) + 1);
+
+ strcpy(p, str);
+ return(p);
+}
+
+match(str, list)
+ register char *str, **list;
+{
+ register int i;
+
+ for (i=0; *list; i++, list++)
+ if (strcmp(str, *list) == 0)
+ return(i);
+ return(-1);
+}
+
+/*
+ * Get the next line. We only return lines beginning with '#' since that
+ * is all this program is ever interested in.
+ */
+char *getline(filep)
+ register struct filepointer *filep;
+{
+ register char *p, /* walking pointer */
+ *eof, /* end of file pointer */
+ *bol; /* beginning of line pointer */
+ register lineno; /* line number */
+
+ p = filep->f_p;
+ eof = filep->f_end;
+ if (p >= eof)
+ return((char *)NULL);
+ lineno = filep->f_line;
+
+ for(bol = p--; ++p < eof; ) {
+ if (*p == '/' && *(p+1) == '*') { /* consume comments */
+ *p++ = ' ', *p++ = ' ';
+ while (*p) {
+ if (*p == '*' && *(p+1) == '/') {
+ *p++ = ' ', *p = ' ';
+ break;
+ }
+ else if (*p == '\n')
+ lineno++;
+ *p++ = ' ';
+ }
+ continue;
+ }
+#ifdef WIN32
+ else if (*p == '/' && *(p+1) == '/') { /* consume comments */
+ *p++ = ' ', *p++ = ' ';
+ while (*p && *p != '\n')
+ *p++ = ' ';
+ lineno++;
+ continue;
+ }
+#endif
+ else if (*p == '\\') {
+ if (*(p+1) == '\n') {
+ *p = ' ';
+ *(p+1) = ' ';
+ lineno++;
+ }
+ }
+ else if (*p == '\n') {
+ lineno++;
+ if (*bol == '#') {
+ register char *cp;
+
+ *p++ = '\0';
+ /* punt lines with just # (yacc generated) */
+ for (cp = bol+1;
+ *cp && (*cp == ' ' || *cp == '\t'); cp++);
+ if (*cp) goto done;
+ }
+ bol = p+1;
+ }
+ }
+ if (*bol != '#')
+ bol = NULL;
+done:
+ filep->f_p = p;
+ filep->f_line = lineno;
+ return(bol);
+}
+
+/*
+ * Strip the file name down to what we want to see in the Makefile.
+ * It will have objprefix and objsuffix around it.
+ */
+char *base_name(file)
+ register char *file;
+{
+ register char *p;
+
+ file = copy(file);
+ for(p=file+strlen(file); p>file && *p != '.'; p--) ;
+
+ if (*p == '.')
+ *p = '\0';
+ return(file);
+}
+
+#if defined(USG) && !defined(CRAY) && !defined(SVR4)
+int rename (from, to)
+ char *from, *to;
+{
+ (void) unlink (to);
+ if (link (from, to) == 0) {
+ unlink (from);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+#endif /* USGISH */
+
+redirect(line, makefile)
+ char *line,
+ *makefile;
+{
+ struct stat st;
+ FILE *fdin, *fdout;
+ char backup[ BUFSIZ ],
+ buf[ BUFSIZ ];
+ boolean found = FALSE;
+ int len;
+
+ /*
+ * if makefile is "-" then let it pour onto stdout.
+ */
+ if (makefile && *makefile == '-' && *(makefile+1) == '\0')
+ return;
+
+ /*
+ * use a default makefile is not specified.
+ */
+ if (!makefile) {
+ if (stat("Makefile", &st) == 0)
+ makefile = "Makefile";
+ else if (stat("makefile", &st) == 0)
+ makefile = "makefile";
+ else
+ fatalerr("[mM]akefile is not present\n");
+ }
+ else
+ stat(makefile, &st);
+ if ((fdin = fopen(makefile, "r")) == NULL)
+ fatalerr("cannot open \"%s\"\n", makefile);
+ sprintf(backup, "%s.bak", makefile);
+ unlink(backup);
+#ifdef WIN32
+ fclose(fdin);
+#endif
+ if (rename(makefile, backup) < 0)
+ fatalerr("cannot rename %s to %s\n", makefile, backup);
+#ifdef WIN32
+ if ((fdin = fopen(backup, "r")) == NULL)
+ fatalerr("cannot open \"%s\"\n", backup);
+#endif
+ if ((fdout = freopen(makefile, "w", stdout)) == NULL)
+ fatalerr("cannot open \"%s\"\n", backup);
+ len = strlen(line);
+ while (!found && fgets(buf, BUFSIZ, fdin)) {
+ if (*buf == '#' && strncmp(line, buf, len) == 0)
+ found = TRUE;
+ fputs(buf, fdout);
+ }
+ if (!found) {
+ if (verbose)
+ warning("Adding new delimiting line \"%s\" and dependencies...\n",
+ line);
+ puts(line); /* same as fputs(fdout); but with newline */
+ } else if (append) {
+ while (fgets(buf, BUFSIZ, fdin)) {
+ fputs(buf, fdout);
+ }
+ }
+ fflush(fdout);
+#if defined(USGISH) || defined(_SEQUENT_)
+ chmod(makefile, st.st_mode);
+#else
+ fchmod(fileno(fdout), st.st_mode);
+#endif /* USGISH */
+}
+
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+fatalerr(char *msg, ...)
+#else
+/*VARARGS*/
+fatalerr(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
+ char *msg;
+#endif
+{
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+ va_list args;
+#endif
+ fprintf(stderr, "%s: error: ", ProgramName);
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+#else
+ fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
+#endif
+ exit (1);
+}
+
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+warning(char *msg, ...)
+#else
+/*VARARGS0*/
+warning(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
+ char *msg;
+#endif
+{
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+ va_list args;
+#endif
+ fprintf(stderr, "%s: warning: ", ProgramName);
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+#else
+ fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
+#endif
+}
+
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+warning1(char *msg, ...)
+#else
+/*VARARGS0*/
+warning1(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
+ char *msg;
+#endif
+{
+#ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
+ va_list args;
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+#else
+ fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
+#endif
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/mkdepend.man
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/mkdepend.man?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/mkdepend.man (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/mkdepend.man Sat Aug 26 02:00:13 2006
@@ -1,0 +1,368 @@
+.\" $XConsortium: mkdepend.man,v 1.15 94/04/17 20:10:37 gildea Exp $
+.\" Copyright (c) 1993, 1994 X Consortium
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
+.\" and/or sell copies of the Software, and to permit persons to whom the
+.\" Software furnished to do so, subject to the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+.\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+.\" SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall not
+.\" be used in advertising or otherwise to promote the sale, use or other
+.\" dealing in this Software without prior written authorization from the
+.\" X Consortium.
+.TH MAKEDEPEND 1 "Release 6" "X Version 11"
+.UC 4
+.SH NAME
+makedepend \- create dependencies in makefiles
+.SH SYNOPSIS
+.B makedepend
+[
+.B \-Dname=def
+] [
+.B \-Dname
+] [
+.B \-Iincludedir
+] [
+.B \-Yincludedir
+] [
+.B \-a
+] [
+.B \-fmakefile
+] [
+.B \-oobjsuffix
+] [
+.B \-pobjprefix
+] [
+.B \-sstring
+] [
+.B \-wwidth
+] [
+.B \-v
+] [
+.B \-m
+] [
+\-\^\-
+.B otheroptions
+\-\^\-
+]
+sourcefile .\|.\|.
+.br
+.SH DESCRIPTION
+.B Makedepend
+reads each
+.I sourcefile
+in sequence and parses it like a C-preprocessor,
+processing all
+.I #include,
+.I #define,
+.I #undef,
+.I #ifdef,
+.I #ifndef,
+.I #endif,
+.I #if
+and
+.I #else
+directives so that it can correctly tell which
+.I #include,
+directives would be used in a compilation.
+Any
+.I #include,
+directives can reference files having other
+.I #include
+directives, and parsing will occur in these files as well.
+.PP
+Every file that a
+.I sourcefile
+includes,
+directly or indirectly,
+is what
+.B makedepend
+calls a "dependency".
+These dependencies are then written to a
+.I makefile
+in such a way that
+.B make(1)
+will know which object files must be recompiled when a dependency has changed.
+.PP
+By default,
+.B makedepend
+places its output in the file named
+.I makefile
+if it exists, otherwise
+.I Makefile.
+An alternate makefile may be specified with the
+.B \-f
+option.
+It first searches the makefile for
+the line
+.sp
+ # DO NOT DELETE THIS LINE \-\^\- make depend depends on it.
+.sp
+or one provided with the
+.B \-s
+option,
+as a delimiter for the dependency output.
+If it finds it, it will delete everything
+following this to the end of the makefile
+and put the output after this line.
+If it doesn't find it, the program
+will append the string to the end of the makefile
+and place the output following that.
+For each
+.I sourcefile
+appearing on the command line,
+.B makedepend
+puts lines in the makefile of the form
+.sp
+ sourcefile.o:\0dfile .\|.\|.
+.sp
+Where "sourcefile.o" is the name from the command
+line with its suffix replaced with ".o",
+and "dfile" is a dependency discovered in a
+.I #include
+directive while parsing
+.I sourcefile
+or one of the files it included.
+.SH EXAMPLE
+Normally,
+.B makedepend
+will be used in a makefile target so that typing "make depend" will
+bring the dependencies up to date for the makefile.
+For example,
+.nf
+ SRCS\0=\0file1.c\0file2.c\0.\|.\|.
+ CFLAGS\0=\0\-O\0\-DHACK\0\-I\^.\^.\^/foobar\0\-xyz
+ depend:
+ makedepend\0\-\^\-\0$(CFLAGS)\0\-\^\-\0$(SRCS)
+.fi
+.SH OPTIONS
+.B Makedepend
+will ignore any option that it does not understand so that you may use
+the same arguments that you would for
+.B cc(1).
+.TP 5
+.B \-Dname=def or \-Dname
+Define.
+This places a definition for
+.I name
+in
+.B makedepend's
+symbol table.
+Without
+.I =def
+the symbol becomes defined as "1".
+.TP 5
+.B \-Iincludedir
+Include directory.
+This option tells
+.B makedepend
+to prepend
+.I includedir
+to its list of directories to search when it encounters
+a
+.I #include
+directive.
+By default,
+.B makedepend
+only searches the standard include directories (usually /usr/include
+and possibly a compiler-dependent directory).
+.TP 5
+.B \-Yincludedir
+Replace all of the standard include directories with the single specified
+include directory; you can omit the
+.I includedir
+to simply prevent searching the standard include directories.
+.TP 5
+.B \-a
+Append the dependencies to the end of the file instead of replacing them.
+.TP 5
+.B \-fmakefile
+Filename.
+This allows you to specify an alternate makefile in which
+.B makedepend
+can place its output.
+.TP 5
+.B \-oobjsuffix
+Object file suffix.
+Some systems may have object files whose suffix is something other
+than ".o".
+This option allows you to specify another suffix, such as
+".b" with
+.I -o.b
+or ":obj"
+with
+.I -o:obj
+and so forth.
+.TP 5
+.B \-pobjprefix
+Object file prefix.
+The prefix is prepended to the name of the object file. This is
+usually used to designate a different directory for the object file.
+The default is the empty string.
+.TP 5
+.B \-sstring
+Starting string delimiter.
+This option permits you to specify
+a different string for
+.B makedepend
+to look for in the makefile.
+.TP 5
+.B \-wwidth
+Line width.
+Normally,
+.B makedepend
+will ensure that every output line that it writes will be no wider than
+78 characters for the sake of readability.
+This option enables you to change this width.
+.TP 5
+.B \-v
+Verbose operation.
+This option causes
+.B makedepend
+to emit the list of files included by each input file on standard output.
+.TP 5
+.B \-m
+Warn about multiple inclusion.
+This option causes
+.B makedepend
+to produce a warning if any input file includes another file more than
+once. In previous versions of
+.B makedepend
+this was the default behavior; the default has been changed to better
+match the behavior of the C compiler, which does not consider multiple
+inclusion to be an error. This option is provided for backward
+compatibility, and to aid in debugging problems related to multiple
+inclusion.
+.TP 5
+.B "\-\^\- options \-\^\-"
+If
+.B makedepend
+encounters a double hyphen (\-\^\-) in the argument list,
+then any unrecognized argument following it
+will be silently ignored; a second double hyphen terminates this
+special treatment.
+In this way,
+.B makedepend
+can be made to safely ignore esoteric compiler arguments that might
+normally be found in a CFLAGS
+.B make
+macro (see the
+.B EXAMPLE
+section above).
+All options that
+.B makedepend
+recognizes and appear between the pair of double hyphens
+are processed normally.
+.SH ALGORITHM
+The approach used in this program enables it to run an order of magnitude
+faster than any other "dependency generator" I have ever seen.
+Central to this performance are two assumptions:
+that all files compiled by a single
+makefile will be compiled with roughly the same
+.I -I
+and
+.I -D
+options;
+and that most files in a single directory will include largely the
+same files.
+.PP
+Given these assumptions,
+.B makedepend
+expects to be called once for each makefile, with
+all source files that are maintained by the
+makefile appearing on the command line.
+It parses each source and include
+file exactly once, maintaining an internal symbol table
+for each.
+Thus, the first file on the command line will take an amount of time
+proportional to the amount of time that a normal C preprocessor takes.
+But on subsequent files, if it encounter's an include file
+that it has already parsed, it does not parse it again.
+.PP
+For example,
+imagine you are compiling two files,
+.I file1.c
+and
+.I file2.c,
+they each include the header file
+.I header.h,
+and the file
+.I header.h
+in turn includes the files
+.I def1.h
+and
+.I def2.h.
+When you run the command
+.sp
+ makedepend\0file1.c\0file2.c
+.sp
+.B makedepend
+will parse
+.I file1.c
+and consequently,
+.I header.h
+and then
+.I def1.h
+and
+.I def2.h.
+It then decides that the dependencies for this file are
+.sp
+ file1.o:\0header.h\0def1.h\0def2.h
+.sp
+But when the program parses
+.I file2.c
+and discovers that it, too, includes
+.I header.h,
+it does not parse the file,
+but simply adds
+.I header.h,
+.I def1.h
+and
+.I def2.h
+to the list of dependencies for
+.I file2.o.
+.SH "SEE ALSO"
+cc(1), make(1)
+.SH BUGS
+.B makedepend
+parses, but does not currently evaluate, the SVR4
+#predicate(token-list) preprocessor expression;
+such expressions are simply assumed to be true.
+This may cause the wrong
+.I #include
+directives to be evaluated.
+.PP
+Imagine you are parsing two files,
+say
+.I file1.c
+and
+.I file2.c,
+each includes the file
+.I def.h.
+The list of files that
+.I def.h
+includes might truly be different when
+.I def.h
+is included by
+.I file1.c
+than when it is included by
+.I file2.c.
+But once
+.B makedepend
+arrives at a list of dependencies for a file,
+it is cast in concrete.
+.SH AUTHOR
+Todd Brunhoff, Tektronix, Inc. and MIT Project Athena
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/parse.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/parse.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/parse.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/parse.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,608 @@
+/* $XConsortium: parse.c,v 1.30 94/04/17 20:10:38 gildea Exp $ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+
+Copyright (c) 1993, 1994 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include "def.h"
+
+extern char *directives[];
+extern struct inclist maininclist;
+
+find_includes(filep, file, file_red, recursion, failOK)
+ struct filepointer *filep;
+ struct inclist *file, *file_red;
+ int recursion;
+ boolean failOK;
+{
+ register char *line;
+ register int type;
+ boolean recfailOK;
+
+ while (line = getline(filep)) {
+ switch(type = deftype(line, filep, file_red, file, TRUE)) {
+ case IF:
+ doif:
+ type = find_includes(filep, file,
+ file_red, recursion+1, failOK);
+ while ((type == ELIF) || (type == ELIFFALSE) ||
+ (type == ELIFGUESSFALSE))
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ gobble(filep, file, file_red);
+ break;
+ case IFFALSE:
+ case IFGUESSFALSE:
+ doiffalse:
+ if (type == IFGUESSFALSE || type == ELIFGUESSFALSE)
+ recfailOK = TRUE;
+ else
+ recfailOK = failOK;
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ find_includes(filep, file,
+ file_red, recursion+1, recfailOK);
+ else
+ if (type == ELIF)
+ goto doif;
+ else
+ if ((type == ELIFFALSE) || (type == ELIFGUESSFALSE))
+ goto doiffalse;
+ break;
+ case IFDEF:
+ case IFNDEF:
+ if ((type == IFDEF && isdefined(line, file_red, NULL))
+ || (type == IFNDEF && !isdefined(line, file_red, NULL))) {
+ debug(1,(type == IFNDEF ?
+ "line %d: %s !def'd in %s via %s%s\n" : "",
+ filep->f_line, line,
+ file->i_file, file_red->i_file, ": doit"));
+ type = find_includes(filep, file,
+ file_red, recursion+1, failOK);
+ while (type == ELIF || type == ELIFFALSE || type == ELIFGUESSFALSE)
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ gobble(filep, file, file_red);
+ }
+ else {
+ debug(1,(type == IFDEF ?
+ "line %d: %s !def'd in %s via %s%s\n" : "",
+ filep->f_line, line,
+ file->i_file, file_red->i_file, ": gobble"));
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ find_includes(filep, file,
+ file_red, recursion+1, failOK);
+ else if (type == ELIF)
+ goto doif;
+ else if (type == ELIFFALSE || type == ELIFGUESSFALSE)
+ goto doiffalse;
+ }
+ break;
+ case ELSE:
+ case ELIFFALSE:
+ case ELIFGUESSFALSE:
+ case ELIF:
+ if (!recursion)
+ gobble(filep, file, file_red);
+ case ENDIF:
+ if (recursion)
+ return(type);
+ case DEFINE:
+ define(line, file);
+ break;
+ case UNDEF:
+ if (!*line) {
+ warning("%s, line %d: incomplete undef == \"%s\"\n",
+ file_red->i_file, filep->f_line, line);
+ break;
+ }
+ undefine(line, file_red);
+ break;
+ case INCLUDE:
+ add_include(filep, file, file_red, line, FALSE, failOK);
+ break;
+ case INCLUDEDOT:
+ add_include(filep, file, file_red, line, TRUE, failOK);
+ break;
+ case ERROR:
+ warning("%s: %d: %s\n", file_red->i_file,
+ filep->f_line, line);
+ break;
+
+ case PRAGMA:
+ case IDENT:
+ case SCCS:
+ case EJECT:
+ break;
+ case -1:
+ warning("%s", file_red->i_file);
+ if (file_red != file)
+ warning1(" (reading %s)", file->i_file);
+ warning1(", line %d: unknown directive == \"%s\"\n",
+ filep->f_line, line);
+ break;
+ case -2:
+ warning("%s", file_red->i_file);
+ if (file_red != file)
+ warning1(" (reading %s)", file->i_file);
+ warning1(", line %d: incomplete include == \"%s\"\n",
+ filep->f_line, line);
+ break;
+ }
+ }
+ return(-1);
+}
+
+gobble(filep, file, file_red)
+ register struct filepointer *filep;
+ struct inclist *file, *file_red;
+{
+ register char *line;
+ register int type;
+
+ while (line = getline(filep)) {
+ switch(type = deftype(line, filep, file_red, file, FALSE)) {
+ case IF:
+ case IFFALSE:
+ case IFGUESSFALSE:
+ case IFDEF:
+ case IFNDEF:
+ type = gobble(filep, file, file_red);
+ while ((type == ELIF) || (type == ELIFFALSE) ||
+ (type == ELIFGUESSFALSE))
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ (void)gobble(filep, file, file_red);
+ break;
+ case ELSE:
+ case ENDIF:
+ debug(0,("%s, line %d: #%s\n",
+ file->i_file, filep->f_line,
+ directives[type]));
+ return(type);
+ case DEFINE:
+ case UNDEF:
+ case INCLUDE:
+ case INCLUDEDOT:
+ case PRAGMA:
+ case ERROR:
+ case IDENT:
+ case SCCS:
+ case EJECT:
+ break;
+ case ELIF:
+ case ELIFFALSE:
+ case ELIFGUESSFALSE:
+ return(type);
+ case -1:
+ warning("%s, line %d: unknown directive == \"%s\"\n",
+ file_red->i_file, filep->f_line, line);
+ break;
+ }
+ }
+ return(-1);
+}
+
+/*
+ * Decide what type of # directive this line is.
+ */
+int deftype (line, filep, file_red, file, parse_it)
+ register char *line;
+ register struct filepointer *filep;
+ register struct inclist *file_red, *file;
+ int parse_it;
+{
+ register char *p;
+ char *directive, savechar;
+ register int ret;
+
+ /*
+ * Parse the directive...
+ */
+ directive=line+1;
+ while (*directive == ' ' || *directive == '\t')
+ directive++;
+
+ p = directive;
+ while (*p >= 'a' && *p <= 'z')
+ p++;
+ savechar = *p;
+ *p = '\0';
+ ret = match(directive, directives);
+ *p = savechar;
+
+ /* If we don't recognize this compiler directive or we happen to just
+ * be gobbling up text while waiting for an #endif or #elif or #else
+ * in the case of an #elif we must check the zero_value and return an
+ * ELIF or an ELIFFALSE.
+ */
+
+ if (ret == ELIF && !parse_it)
+ {
+ while (*p == ' ' || *p == '\t')
+ p++;
+ /*
+ * parse an expression.
+ */
+ debug(0,("%s, line %d: #elif %s ",
+ file->i_file, filep->f_line, p));
+ ret = zero_value(p, filep, file_red);
+ if (ret != IF)
+ {
+ debug(0,("false...\n"));
+ if (ret == IFFALSE)
+ return(ELIFFALSE);
+ else
+ return(ELIFGUESSFALSE);
+ }
+ else
+ {
+ debug(0,("true...\n"));
+ return(ELIF);
+ }
+ }
+
+ if (ret < 0 || ! parse_it)
+ return(ret);
+
+ /*
+ * now decide how to parse the directive, and do it.
+ */
+ while (*p == ' ' || *p == '\t')
+ p++;
+ switch (ret) {
+ case IF:
+ /*
+ * parse an expression.
+ */
+ ret = zero_value(p, filep, file_red);
+ debug(0,("%s, line %d: %s #if %s\n",
+ file->i_file, filep->f_line, ret?"false":"true", p));
+ break;
+ case IFDEF:
+ case IFNDEF:
+ debug(0,("%s, line %d: #%s %s\n",
+ file->i_file, filep->f_line, directives[ret], p));
+ case UNDEF:
+ /*
+ * separate the name of a single symbol.
+ */
+ while (isalnum(*p) || *p == '_')
+ *line++ = *p++;
+ *line = '\0';
+ break;
+ case INCLUDE:
+ debug(2,("%s, line %d: #include %s\n",
+ file->i_file, filep->f_line, p));
+
+ /* Support ANSI macro substitution */
+ {
+ struct symtab *sym = isdefined(p, file_red, NULL);
+ while (sym) {
+ p = sym->s_value;
+ debug(3,("%s : #includes SYMBOL %s = %s\n",
+ file->i_incstring,
+ sym -> s_name,
+ sym -> s_value));
+ /* mark file as having included a 'soft include' */
+ file->i_included_sym = TRUE;
+ sym = isdefined(p, file_red, NULL);
+ }
+ }
+
+ /*
+ * Separate the name of the include file.
+ */
+ while (*p && *p != '"' && *p != '<')
+ p++;
+ if (! *p)
+ return(-2);
+ if (*p++ == '"') {
+ ret = INCLUDEDOT;
+ while (*p && *p != '"')
+ *line++ = *p++;
+ } else
+ while (*p && *p != '>')
+ *line++ = *p++;
+ *line = '\0';
+ break;
+ case DEFINE:
+ /*
+ * copy the definition back to the beginning of the line.
+ */
+ strcpy (line, p);
+ break;
+ case ELSE:
+ case ENDIF:
+ case ELIF:
+ case PRAGMA:
+ case ERROR:
+ case IDENT:
+ case SCCS:
+ case EJECT:
+ debug(0,("%s, line %d: #%s\n",
+ file->i_file, filep->f_line, directives[ret]));
+ /*
+ * nothing to do.
+ */
+ break;
+ }
+ return(ret);
+}
+
+struct symtab *isdefined(symbol, file, srcfile)
+ register char *symbol;
+ struct inclist *file;
+ struct inclist **srcfile;
+{
+ register struct symtab *val;
+
+ if (val = slookup(symbol, &maininclist)) {
+ debug(1,("%s defined on command line\n", symbol));
+ if (srcfile != NULL) *srcfile = &maininclist;
+ return(val);
+ }
+ if (val = fdefined(symbol, file, srcfile))
+ return(val);
+ debug(1,("%s not defined in %s\n", symbol, file->i_file));
+ return(NULL);
+}
+
+struct symtab *fdefined(symbol, file, srcfile)
+ register char *symbol;
+ struct inclist *file;
+ struct inclist **srcfile;
+{
+ register struct inclist **ip;
+ register struct symtab *val;
+ register int i;
+ static int recurse_lvl = 0;
+
+ if (file->i_defchecked)
+ return(NULL);
+ file->i_defchecked = TRUE;
+ if (val = slookup(symbol, file))
+ debug(1,("%s defined in %s as %s\n", symbol, file->i_file, val->s_value));
+ if (val == NULL && file->i_list)
+ {
+ for (ip = file->i_list, i=0; i < file->i_listlen; i++, ip++)
+ if (val = fdefined(symbol, *ip, srcfile)) {
+ break;
+ }
+ }
+ else if (val != NULL && srcfile != NULL) *srcfile = file;
+ recurse_lvl--;
+ file->i_defchecked = FALSE;
+
+ return(val);
+}
+
+/*
+ * Return type based on if the #if expression evaluates to 0
+ */
+zero_value(exp, filep, file_red)
+ register char *exp;
+ register struct filepointer *filep;
+ register struct inclist *file_red;
+{
+ if (cppsetup(exp, filep, file_red))
+ return(IFFALSE);
+ else
+ return(IF);
+}
+
+define(def, file)
+ char *def;
+ struct inclist *file;
+{
+ char *val;
+
+ /* Separate symbol name and its value */
+ val = def;
+ while (isalnum(*val) || *val == '_')
+ val++;
+ if (*val)
+ *val++ = '\0';
+ while (*val == ' ' || *val == '\t')
+ val++;
+
+ if (!*val)
+ val = "1";
+ define2(def, val, file);
+}
+
+define2(name, val, file)
+ char *name, *val;
+ struct inclist *file;
+{
+ int first, last, below;
+ register struct symtab *sp = NULL, *dest;
+
+ /* Make space if it's needed */
+ if (file->i_defs == NULL)
+ {
+ file->i_defs = (struct symtab *)
+ malloc(sizeof (struct symtab) * SYMTABINC);
+ file->i_deflen = SYMTABINC;
+ file->i_ndefs = 0;
+ }
+ else if (file->i_ndefs == file->i_deflen)
+ file->i_defs = (struct symtab *)
+ realloc(file->i_defs,
+ sizeof(struct symtab)*(file->i_deflen+=SYMTABINC));
+
+ if (file->i_defs == NULL)
+ fatalerr("malloc()/realloc() failure in insert_defn()\n");
+
+ below = first = 0;
+ last = file->i_ndefs - 1;
+ while (last >= first)
+ {
+ /* Fast inline binary search */
+ register char *s1;
+ register char *s2;
+ register int middle = (first + last) / 2;
+
+ /* Fast inline strchr() */
+ s1 = name;
+ s2 = file->i_defs[middle].s_name;
+ while (*s1++ == *s2++)
+ if (s2[-1] == '\0') break;
+
+ /* If exact match, set sp and break */
+ if (*--s1 == *--s2)
+ {
+ sp = file->i_defs + middle;
+ break;
+ }
+
+ /* If name > i_defs[middle] ... */
+ if (*s1 > *s2)
+ {
+ below = first;
+ first = middle + 1;
+ }
+ /* else ... */
+ else
+ {
+ below = last = middle - 1;
+ }
+ }
+
+ /* Search is done. If we found an exact match to the symbol name,
+ just replace its s_value */
+ if (sp != NULL)
+ {
+ free(sp->s_value);
+ sp->s_value = copy(val);
+ return;
+ }
+
+ sp = file->i_defs + file->i_ndefs++;
+ dest = file->i_defs + below + 1;
+ while (sp > dest)
+ {
+ *sp = sp[-1];
+ sp--;
+ }
+ sp->s_name = copy(name);
+ sp->s_value = copy(val);
+}
+
+struct symtab *slookup(symbol, file)
+ register char *symbol;
+ register struct inclist *file;
+{
+ register int first = 0;
+ register int last = file->i_ndefs - 1;
+
+ if (file) while (last >= first)
+ {
+ /* Fast inline binary search */
+ register char *s1;
+ register char *s2;
+ register int middle = (first + last) / 2;
+
+ /* Fast inline strchr() */
+ s1 = symbol;
+ s2 = file->i_defs[middle].s_name;
+ while (*s1++ == *s2++)
+ if (s2[-1] == '\0') break;
+
+ /* If exact match, we're done */
+ if (*--s1 == *--s2)
+ {
+ return file->i_defs + middle;
+ }
+
+ /* If symbol > i_defs[middle] ... */
+ if (*s1 > *s2)
+ {
+ first = middle + 1;
+ }
+ /* else ... */
+ else
+ {
+ last = middle - 1;
+ }
+ }
+ return(NULL);
+}
+
+undefine(symbol, file)
+ char *symbol;
+ register struct inclist *file;
+{
+ register struct symtab *ptr;
+ struct inclist *srcfile;
+ while ((ptr = isdefined(symbol, file, &srcfile)) != NULL)
+ {
+ srcfile->i_ndefs--;
+ for (; ptr < srcfile->i_defs + srcfile->i_ndefs; ptr++)
+ *ptr = ptr[1];
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/pr.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/pr.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/pr.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/makedepend/pr.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,167 @@
+/* $XConsortium: pr.c,v 1.17 94/04/17 20:10:38 gildea Exp $ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+
+Copyright (c) 1993, 1994 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include "def.h"
+
+extern struct inclist inclist[ MAXFILES ],
+ *inclistp;
+extern char *objprefix;
+extern char *objsuffix;
+extern int width;
+extern boolean printed;
+extern boolean verbose;
+extern boolean show_where_not;
+
+add_include(filep, file, file_red, include, dot, failOK)
+ struct filepointer *filep;
+ struct inclist *file, *file_red;
+ char *include;
+ boolean dot;
+{
+ register struct inclist *newfile;
+ register struct filepointer *content;
+
+ /*
+ * First decide what the pathname of this include file really is.
+ */
+ newfile = inc_path(file->i_file, include, dot);
+ if (newfile == NULL) {
+ if (failOK)
+ return;
+ if (file != file_red)
+ warning("%s (reading %s, line %d): ",
+ file_red->i_file, file->i_file, filep->f_line);
+ else
+ warning("%s, line %d: ", file->i_file, filep->f_line);
+ warning1("cannot find include file \"%s\"\n", include);
+ show_where_not = TRUE;
+ newfile = inc_path(file->i_file, include, dot);
+ show_where_not = FALSE;
+ }
+
+ if (newfile) {
+ included_by(file, newfile);
+ if (!newfile->i_searched) {
+ newfile->i_searched = TRUE;
+ content = getfile(newfile->i_file);
+ find_includes(content, newfile, file_red, 0, failOK);
+ freefile(content);
+ }
+ }
+}
+
+recursive_pr_include(head, file, base)
+ register struct inclist *head;
+ register char *file, *base;
+{
+ register int i;
+
+ if (head->i_marked)
+ return;
+ head->i_marked = TRUE;
+ if (head->i_file != file)
+ pr(head, file, base);
+ for (i=0; i<head->i_listlen; i++)
+ recursive_pr_include(head->i_list[ i ], file, base);
+}
+
+pr(ip, file, base)
+ register struct inclist *ip;
+ char *file, *base;
+{
+ static char *lastfile;
+ static int current_len;
+ register int len, i;
+ char buf[ BUFSIZ ];
+
+ printed = TRUE;
+ len = strlen(ip->i_file)+1;
+ if (current_len + len > width || file != lastfile) {
+ lastfile = file;
+ sprintf(buf, "\n%s%s%s: %s", objprefix, base, objsuffix,
+ ip->i_file);
+ len = current_len = strlen(buf);
+ }
+ else {
+ buf[0] = ' ';
+ strcpy(buf+1, ip->i_file);
+ current_len += len;
+ }
+ fwrite(buf, len, 1, stdout);
+
+ /*
+ * If verbose is set, then print out what this file includes.
+ */
+ if (! verbose || ip->i_list == NULL || ip->i_notified)
+ return;
+ ip->i_notified = TRUE;
+ lastfile = NULL;
+ printf("\n# %s includes:", ip->i_file);
+ for (i=0; i<ip->i_listlen; i++)
+ printf("\n#\t%s", ip->i_list[ i ]->i_incstring);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+Makefile
+sieveshell.1
+imapd.conf.5
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,48 @@
+/.cvsignore/1.2/Wed Oct 22 18:03:08 2003//Tcyrus-release-2-3-7
+/Makefile.dist/1.1.2.1/Wed Mar 24 19:53:16 2004//Tcyrus-release-2-3-7
+/Makefile.in/1.29.2.7/Tue Dec 13 15:16:45 2005//Tcyrus-release-2-3-7
+/arbitron.8/1.9.4.1/Mon Jan 16 15:43:08 2006//Tcyrus-release-2-3-7
+/chk_cyrus.8/1.3.4.1/Mon Jun 19 13:05:02 2006//Tcyrus-release-2-3-7
+/ctl_cyrusdb.8/1.6/Sat Aug 9 23:43:14 2003//Tcyrus-release-2-3-7
+/ctl_deliver.8/1.9/Wed Oct 22 18:50:13 2003//Tcyrus-release-2-3-7
+/ctl_mboxlist.8/1.8.4.1/Thu Apr 6 15:42:11 2006//Tcyrus-release-2-3-7
+/cvt_cyrusdb.8/1.3/Sat Aug 9 23:43:14 2003//Tcyrus-release-2-3-7
+/cyr_expire.8/1.2.2.2/Sat Apr 3 18:44:55 2004//Tcyrus-release-2-3-7
+/cyrus.conf.5/1.11.2.2/Sun Apr 24 20:20:26 2005//Tcyrus-release-2-3-7
+/deliver.8/1.17.8.2/Fri May 26 16:27:21 2006//Tcyrus-release-2-3-7
+/fetchnews.8/1.2.2.2/Wed Mar 23 00:32:51 2005//Tcyrus-release-2-3-7
+/fud.8/1.11/Wed Oct 22 18:50:13 2003//Tcyrus-release-2-3-7
+/idled.8/1.4/Sat Aug 9 23:43:14 2003//Tcyrus-release-2-3-7
+/imapd.8/1.15/Thu Oct 3 19:02:41 2002//Tcyrus-release-2-3-7
+/imclient.3/1.10.2.1/Mon Apr 11 05:48:09 2005//Tcyrus-release-2-3-7
+/imtest.1/1.13.2.1/Thu Dec 16 15:49:58 2004//Tcyrus-release-2-3-7
+/installsieve.1/1.5/Sat May 25 19:57:48 2002//Tcyrus-release-2-3-7
+/ipurge.8/1.7.2.1/Fri Dec 19 18:33:46 2003//Tcyrus-release-2-3-7
+/krb.equiv.5/1.10/Wed Oct 22 18:50:13 2003//Tcyrus-release-2-3-7
+/lmtpd.8/1.6/Thu Oct 3 19:02:41 2002//Tcyrus-release-2-3-7
+/lmtptest.1/1.6.2.1/Thu Dec 16 15:49:59 2004//Tcyrus-release-2-3-7
+/make_md5.8/1.1.2.1/Mon Feb 21 19:25:55 2005//Tcyrus-release-2-3-7
+/master.8/1.10.2.3/Fri Dec 17 18:15:18 2004//Tcyrus-release-2-3-7
+/mbexamine.8/1.3/Sat Aug 9 23:43:14 2003//Tcyrus-release-2-3-7
+/mbpath.8/1.5.4.1/Thu Apr 8 21:13:12 2004//Tcyrus-release-2-3-7
+/mupdatetest.1/1.5.2.1/Thu Dec 16 15:49:59 2004//Tcyrus-release-2-3-7
+/nntpd.8/1.2.2.1/Fri May 26 15:50:11 2006//Tcyrus-release-2-3-7
+/nntptest.1/1.2.2.1/Thu Dec 16 15:49:59 2004//Tcyrus-release-2-3-7
+/notifyd.8/1.7/Sat Aug 9 23:43:14 2003//Tcyrus-release-2-3-7
+/pop3d.8/1.13.4.1/Fri May 26 15:50:12 2006//Tcyrus-release-2-3-7
+/pop3test.1/1.9.2.1/Thu Dec 16 15:49:59 2004//Tcyrus-release-2-3-7
+/quota.8/1.11/Wed Oct 22 18:50:13 2003//Tcyrus-release-2-3-7
+/reconstruct.8/1.18.2.2/Mon Jun 19 12:59:37 2006//Tcyrus-release-2-3-7
+/rmnews.8/1.7/Sat Aug 9 23:43:14 2003//Tcyrus-release-2-3-7
+/sivtest.1/1.5.2.1/Thu Dec 16 15:49:59 2004//Tcyrus-release-2-3-7
+/smmapd.8/1.2.2.1/Fri Dec 19 18:33:46 2003//Tcyrus-release-2-3-7
+/smtptest.1/1.5.2.1/Thu Dec 16 15:50:00 2004//Tcyrus-release-2-3-7
+/squatter.8/1.6/Wed Oct 22 18:50:13 2003//Tcyrus-release-2-3-7
+/sync_client.8/1.1.2.5/Thu Mar 31 20:27:53 2005//Tcyrus-release-2-3-7
+/sync_reset.8/1.1.2.2/Sun Mar 13 01:24:13 2005//Tcyrus-release-2-3-7
+/sync_server.8/1.1.2.3/Fri May 26 15:50:12 2006//Tcyrus-release-2-3-7
+/syncnews.8/1.9/Sat Aug 9 23:43:15 2003//Tcyrus-release-2-3-7
+/timsieved.8/1.6.8.1/Fri Jul 16 14:37:41 2004//Tcyrus-release-2-3-7
+/tls_prune.8/1.3/Sat Aug 9 23:43:15 2003//Tcyrus-release-2-3-7
+/unexpunge.8/1.1.2.3/Tue May 3 01:36:59 2005//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/man
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.dist
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.dist?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.dist (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.dist Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+# $Id: Makefile.dist,v 1.1.2.1 2004/03/24 19:53:16 ken3 Exp $
+dist:
+ ../tools/config2man ../lib/imapoptions > imapd.conf.5
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,110 @@
+# Makefile for man pages
+#
+# @configure_input@
+#
+# Copyright (c) 1997-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Makefile.in,v 1.29.2.7 2005/12/13 15:16:45 murch Exp $
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+INSTALL = @INSTALL@
+
+SHELL = /bin/sh
+
+prefix = @prefix@
+
+mandir = @mandir@
+
+MAN1 = $(srcdir)/imtest.1 $(srcdir)/pop3test.1 $(srcdir)/nntptest.1 \
+ $(srcdir)/lmtptest.1 $(srcdir)/smtptest.1 $(srcdir)/sivtest.1 \
+ $(srcdir)/mupdatetest.1 $(srcdir)/installsieve.1 $(srcdir)/sieveshell.1
+MAN3 = $(srcdir)/imclient.3
+MAN5 = $(srcdir)/imapd.conf.5 $(srcdir)/krb.equiv.5 $(srcdir)/cyrus.conf.5
+MAN8 = $(srcdir)/arbitron.8 $(srcdir)/cyr_expire.8 $(srcdir)/deliver.8 \
+ $(srcdir)/fud.8 $(srcdir)/imapd.8 $(srcdir)/pop3d.8 $(srcdir)/quota.8 \
+ $(srcdir)/reconstruct.8 $(srcdir)/rmnews.8 $(srcdir)/syncnews.8 \
+ $(srcdir)/mbpath.8 $(srcdir)/timsieved.8 $(srcdir)/master.8 \
+ $(srcdir)/lmtpd.8 $(srcdir)/idled.8 $(srcdir)/ctl_mboxlist.8 \
+ $(srcdir)/ctl_deliver.8 $(srcdir)/ctl_cyrusdb.8 $(srcdir)/ipurge.8 \
+ $(srcdir)/tls_prune.8 $(srcdir)/squatter.8 $(srcdir)/cvt_cyrusdb.8 \
+ $(srcdir)/notifyd.8 $(srcdir)/chk_cyrus.8 $(srcdir)/mbexamine.8 \
+ $(srcdir)/nntpd.8 $(srcdir)/fetchnews.8 $(srcdir)/smmapd.8 \
+ $(srcdir)/sync_client.8 $(srcdir)/sync_server.8 $(srcdir)/sync_reset.8 \
+ $(srcdir)/unexpunge.8 $(srcdir)/make_md5.8
+
+all: $(MAN1) $(MAN3) $(MAN5) $(MAN8)
+
+$(srcdir)/sieveshell.1: $(srcdir)/../perl/sieve/scripts/sieveshell.pl
+ @echo creating sieveshell.1
+ pod2man $(srcdir)/../perl/sieve/scripts/sieveshell.pl > $(srcdir)/sieveshell.1
+
+$(srcdir)/imapd.conf.5: $(srcdir)/../lib/imapoptions $(srcdir)/../tools/config2man
+ @echo creating imapd.conf.5
+ $(srcdir)/../tools/config2man $(srcdir)/../lib/imapoptions > $(srcdir)/imapd.conf.5
+
+install:
+ for file in $(MAN1); \
+ do \
+ $(INSTALL) -m 644 $$file $(DESTDIR)$(mandir)/man1 || exit 1; \
+ done
+ for file in $(MAN3); \
+ do \
+ $(INSTALL) -m 644 $$file $(DESTDIR)$(mandir)/man3 || exit 1; \
+ done
+ for file in $(MAN5); \
+ do \
+ $(INSTALL) -m 644 $$file $(DESTDIR)$(mandir)/man5 || exit 1; \
+ done
+ for file in $(MAN8); \
+ do \
+ $(INSTALL) -m 644 $$file $(DESTDIR)$(mandir)/man8 || exit 1; \
+ done
+
+clean:
+ rm -f $(srcdir)/imapd.conf.5 $(srcdir)/sieveshell.1 Makefile.bak
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/arbitron.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/arbitron.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/arbitron.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/arbitron.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,133 @@
+.\" -*- nroff -*-
+.TH ARBITRON 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: arbitron.8,v 1.9.4.1 2006/01/16 15:43:08 murch Exp $
+
+.SH NAME
+arbitron \- arbitron mailboxes
+.SH SYNOPSIS
+.B arbitron
+[
+.B \-C
+.I config-file
+] [
+.B \-o
+] [
+.B \-u
+] [
+.B \-l
+] [
+.B \-p
+.I months
+]
+.br
+ [
+.B \-d
+.I days
+|
+.B \-D
+\fImmddyyyy\fR[\fB:\fImmddyyyy\fR]
+]
+\fImailbox\fR...
+.SH DESCRIPTION
+.I Arbitron
+collects and reports readership statistics for mailboxes on the
+server. It also optionally prunes the mailboxes of \\Seen state for
+dormant users.
+.PP
+.I Arbitron
+produces one line of output per mailbox, reporting the mailbox name
+followed by a space, followed by the number of
+readers (and if -u is specified, followed by a colon and a
+comma-separated list of the readers userids), and if -o is not
+specified, another space and the number of subscribers (and if -u is
+specified, followed by a colon and a comma-separated list of the
+subscribers userids).
+\fBIMPORTANT: This format is subject to change in future versions.\fR
+.PP
+Each "reader" is a distinct authentication identity which has
+"s" rights to the mailbox and which has SELECTed the mailbox within
+either the past
+.I days
+days or the specified date range.
+Users are not counted as reading their own personal mailboxes.
+Personal mailboxes are not reported unless there is at least one
+reader other than the mailboxes owner.
+.PP
+.I Arbitron
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-o
+"old way" -- do not report subscribers.
+.TP
+.BI \-u
+Report userids in addition to the count(s).
+.TP
+.BI \-l
+Enable long reporting (comma delimited table consisting of mbox, userid,
+r/s, start time, end time).
+.TP
+.BI "\-d " days
+Count as a reader an authentication identity which has SELECTed the
+mailbox within
+.I days
+days. Default is 30.
+.TP
+\fB\-D\fR \fImmddyyyy\fR[\fB:\fImmddyyyy\fR]
+Count as a reader an authentication identity which has SELECTed the
+mailbox within the given date range. The start date and optional end
+date are specified as 2-digit month of the year, 2-digit day of the
+month, and 4-digit year. If the end date is not specified, then the
+current system time is used as the end time.
+.TP
+.BI "\-p " months
+Prune \\Seen state for users who have not SELECTed the mailbox within
+.I months
+months. Default is infinity.
+.SH FILES
+.TP
+.B /etc/imapd.conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/chk_cyrus.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/chk_cyrus.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/chk_cyrus.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/chk_cyrus.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,86 @@
+.\" -*- nroff -*-
+.TH CHK_CYRUS 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.SH NAME
+chk_cyrus \- perform a consistency check of the cyrus mailstore
+.SH SYNOPSIS
+.B chk_cyrus
+[
+.B \-C
+.I config-file
+]
+[
+.B \-P
+.I partition
+]
+[
+.B \-M
+.I mailbox
+]
+.SH DESCRIPTION
+.I Chk_cyrus
+is used to perform a consistency check on the cyrus datastore, and output
+a list of files/directories that are expected to exist, but do not.
+Status messagess are output to stderr, the list of files/directories is
+output to stdout. This list can be passed to a backup program to aid a
+partial restoral, for instance.
+.PP
+.I Chk_cyrus
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-P " partition"
+Run the consistency check for only the given partition.
+May not be specified with -M.
+.BI \-M " mailbox"
+Run the consistency check for only the given mailbox.
+May not be specified with -P.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_cyrusdb.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_cyrusdb.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_cyrusdb.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_cyrusdb.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,97 @@
+.\" -*- nroff -*-
+.TH CTL_CYRUSDB 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: ctl_cyrusdb.8,v 1.6 2003/08/09 23:43:14 rjs3 Exp $
+.SH NAME
+ctl_cyrusdb \- perform operations common to all Cyrus databases
+.SH SYNOPSIS
+.B ctl_cyrusdb
+[
+.B \-C
+.I config-file
+]
+.B \-r
+[
+.B \-x
+]
+.br
+.B ctl_cyrusdb
+[
+.B \-C
+.I config-file
+]
+.B \-c
+.SH DESCRIPTION
+.I Ctl_cyrusdb
+is used to perform various administrative operations on the Cyrus
+databases.
+.PP
+.I Ctl_cyrusdb
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+The
+.I configdirectory
+option is used to determine the default location of the Cyrus databases.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.B \-r
+Recover the databases after an application or system failure. Also performs
+database cleanup like removing mailbox reservations (and any associated
+mailbox files).
+.TP
+.B \-x
+Used with -r to recover the database only. (Prevents database cleanup).
+.TP
+.B \-c
+Checkpoint and archive the databases. Changes to the database which
+are part of committed transactions are written to disk. Also, a
+\fIhot\fR backup of the databases is made and inactive log files are
+removed.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_deliver.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_deliver.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_deliver.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_deliver.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,81 @@
+.\" -*- nroff -*-
+.TH CTL_DELIVER 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: ctl_deliver.8,v 1.9 2003/10/22 18:50:13 rjs3 Exp $
+.SH NAME
+ctl_deliver \- perform operations on the duplicate delivery database
+.SH SYNOPSIS
+.B ctl_deliver
+[
+.B \-C
+.I config-file
+]
+.B \-d
+[
+\fB\-f \fIfilename\fR
+]
+.SH DESCRIPTION
+.I Ctl_deliver
+is used to perform various administrative operations on the duplicate
+delivery database.
+.PP
+.I Ctl_deliver
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.B \-d
+Dump the contents of the database to standard output in a portable
+flat-text format.
+.TP
+\fB\-f \fIfilename\fR
+Use the database specified by \fIfilename\fR instead of the default
+(\fIconfigdirectory\fB/deliver.db\fR).
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_mboxlist.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_mboxlist.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_mboxlist.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ctl_mboxlist.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,145 @@
+.\" -*- nroff -*-
+.TH CTL_MBOXLIST 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: ctl_mboxlist.8,v 1.8.4.1 2006/04/06 15:42:11 murch Exp $
+.SH NAME
+ctl_mboxlist \- perform operations on the mailbox list database
+.SH SYNOPSIS
+.B ctl_mboxlist
+[
+.B \-C
+.I config-file
+]
+.B \-d
+[
+.B \-x
+]
+[
+\fB\-p \fIpartition\fR
+]
+[
+\fB\-f \fIfilename\fR
+]
+.br
+.B ctl_mboxlist
+[
+.B \-C
+.I config-file
+]
+.B \-u
+[
+\fB\-f \fIfilename\fR
+]
+.br
+.B ctl_mboxlist
+[
+.B \-C
+.I config-file
+]
+.B \-m
+[
+\fB\-a \fR
+]
+[
+\fB\-w \fR
+]
+.br
+ [
+\fB\-f \fIfilename\fR
+]
+.SH DESCRIPTION
+.I Ctl_mboxlist
+is used to perform various administrative operations on the mailbox
+list database.
+.PP
+.I Ctl_mboxlist
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+The
+.I configdirectory
+option is used to determine the default location of the mailbox list database.
+.SH OPTIONS
+.TP
+.BI \-C\ "config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.B \-d
+Dump the contents of the database to standard output in a portable
+flat-text format. NOTE: In Cyrus versions 2.2.13 and earlier, the dump
+format did not include the mailbox type flags, breaking remote
+mailboxes (frontends, mupdate master, unified backends) when undumped.
+.TP
+.B \-x
+When performing a dump, remove the mailboxes dumped from the mailbox list
+(mostly useful when specified with -p)
+.TP
+.BI \-p\ "partition"
+When performing a dump, dump only thise mailboxes that live on \fIpartition\fR
+.TP
+.B \-u
+Load the contents of the database from standard input. The input MUST
+be in the format output using the \fB\-d\fR option. NOTE: Both the
+old and new formats can be loaded, but the old format will break
+remote mailboxes.
+.TP
+.B \-m
+For backend servers in the Cyrus Murder, synchronize the local mailbox list
+file with the MUPDATE server.
+.TP
+.B \-a
+When used with -m, assume the local mailboxes file is authoritiative,
+that is, only change the mupdate server, do not delete any local mailboxes.
+USE THIS OPTION WITH CARE, as it allows namespace collisions into the murder.
+.TP
+.B \-w
+When used with -m, print out what would be done but do not perform the
+operations.
+.TP
+\fB\-f \fIfilename\fR
+Use the database specified by \fIfilename\fR instead of the default
+(\fIconfigdirectory\fB/mailboxes.db\fR).
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cvt_cyrusdb.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cvt_cyrusdb.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cvt_cyrusdb.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cvt_cyrusdb.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,74 @@
+.\" -*- nroff -*-
+.TH CVT_CYRUSDB 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: cvt_cyrusdb.8,v 1.3 2003/08/09 23:43:14 rjs3 Exp $
+.SH NAME
+cvt_cyrusdb \- convert a database file between cyrus database formats
+.SH SYNOPSIS
+.B cvt_cyrusdb
+[
+.B \-C
+.I config-file
+]
+<old-file> <old-fileformat> <new-file> <new-file-format>
+.SH DESCRIPTION
+.I cvt_cyrusdb
+is used to convert a cyrusdb file between different database backends. Note
+that you should not attempt to use the same file for input and output.
+.PP
+Running without any options will list the available database backends.
+.PP
+.I cvt_cyrusdb
+reads any applicable configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+note that the file locations are NOT read out of the configuration file,
+and must be supplied on the command line.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyr_expire.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyr_expire.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyr_expire.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyr_expire.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,104 @@
+.\" -*- nroff -*-
+.TH CYR_EXPIRE 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: cyr_expire.8,v 1.2.2.2 2004/04/03 18:44:55 ken3 Exp $
+.SH NAME
+cyr_expire \- expire messages and duplicate delivery database entries
+.SH SYNOPSIS
+.B cyr_expire
+[
+.B \-C
+.I config-file
+]
+.BI \-E " expire-days"
+[
+.BI \-X " expunge-days"
+]
+[
+.B \-v
+]
+.SH DESCRIPTION
+.I Cyr_expire
+is used to expire messages and duplicate delivery database entries.
+.I Cyr_expire
+also cleanses mailboxes of partially expunged messages
+(when using the "delayed" expunge mode).
+The expiration of messages is controlled by the
+\fB/vendor/cmu/cyrus-imapd/expire\fR mailbox annotation which
+specifies the age (in days) of messages in the given mailbox that
+should be deleted. Any duplicate delivery database entries which
+correspond to the mailbox are also deleted at the same frequency.
+.br
+.sp
+The value of the \fB/vendor/cmu/cyrus-imapd/expire\fR annotation is
+inherited by all children of the given mailbox, so an entire mailbox
+tree can be expired by seting a single annotation on the root of that
+tree. If a mailbox does not have a
+\fB/vendor/cmu/cyrus-imapd/expire\fR annotation set on it (or does not
+inherit one), then no messages are expired from the mailbox.
+.PP
+.I Cyr_expire
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+\fB\-E \fIexpire-days\fR
+Prune the duplicate database of entries older than \fIexpire-days\fR. This
+value is only used for entries which do not have a corresponding
+\fB/vendor/cmu/cyrus-imapd/expire\fR mailbox annotation.
+.TP
+\fB\-X \fIexpunge-days\fR
+Expunge previously deleted messages older than \fIexpunge-days\fR
+(when using the "delayed" expunge mode). The default is 0 (zero)
+days, which will expunge \fBall\fR previously deleted messages.
+.TP
+.B \-v
+Enable verbose output.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyrus.conf.5
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyrus.conf.5?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyrus.conf.5 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/cyrus.conf.5 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,187 @@
+.\" -*- nroff -*-
+.TH CYRUS.CONF 5 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: cyrus.conf.5,v 1.11.2.2 2005/04/24 20:20:26 ken3 Exp $
+.SH NAME
+cyrus.conf \- Cyrus configuration file
+.SH DESCRIPTION
+\fB/etc/cyrus.conf\fR
+is the configuration file for the Cyrus \fBmaster\fR process. It
+defines the startup procedures, services and events to be spawned by
+\fBmaster\fR.
+.PP
+The \fB/etc/cyrus.conf\fR file consists of a series of entries divided
+into sections of the form
+.P
+.RS
+\fIsection\fR {
+.RS
+\fIname arguments
+.br
+ ...
+.br
+ ...
+.br
+ ...
+\fR
+.RE
+}
+.RE
+.PP
+where \fIsection\fR is the name of the section, \fIname\fR is the name
+of the entry and \fIarguments\fR is the whitespace-separated list of
+arguments for the entry.
+.PP
+Blank lines and lines beginning with ``#'' are ignored.
+.SH SECTION DESCRIPTIONS
+The paragraphs below detail the three sections (\fBSTART\fR,
+\fBSERVICES\fR, \fBEVENTS\fR) that can be placed in the
+\fB/etc/cyrus.conf\fR file. The arguments that are available for each
+entry within the section are described, and each argument's default
+value is shown.
+.PP
+Arguments can appear in any order.
+Some arguments have no default value, these are listed with
+``<no default>''. For string arguments, the value MUST be enclosed in
+double quotes.
+.SS START
+This section lists the processes to run before any
+\fBSERVICES\fR are spawned. This section is typically used to
+initialize databases and start long running daemons.
+.IP "\fBcmd=\fR<no default>" 5
+The command (with options) to spawn as a child process. This string argument
+is required.
+.SS SERVICES
+This section is the heart of the \fB/etc/cyrus.conf\fR file. It lists
+the processes that should be spawned to handle client connections made
+on certain Internet/UNIX sockets.
+.IP "\fBcmd=\fR<no default>" 5
+The command (with options) to spawn as a child process. This string
+argument is required.
+.IP "\fBlisten=\fR<no default>" 5
+The UNIX or internet socket to listen on. This
+string field is required and takes one of the following forms:
+
+\fIpath\fR
+.br
+\fR[ \fIhost\fR \fB: \fR] \fIport\fR
+.br
+.sp
+where \fIpath\fR is the explicit path to a UNIX socket, \fIhost\fR is
+either the hostname or bracket-enclosed IP address of a network
+interface, and \fIport\fR is either a port number or service name (as listed
+in \fB/etc/services\fR).
+.IP "\fBproto=\fRtcp" 5
+The protocol used for this service (\fItcp\fR, \fItcp4\fR, \fItcp6\fR,
+\fIudp\fR, \fIudp4\fR, \fIudp6\fR). This string argument is optional.
+
+\fBtcp4\fR, \fBudp4\fR: These arguments are used to bind the service to IPv4
+only.
+.br
+\fBtcp6\fR, \fBudp6\fR: These arguments are used to bind the service to IPv6
+only, if the operating system supports this.
+.br
+\fBtcp\fR, \fBudp\fR: These arguments are used to bind to both IPv4 and IPv6
+if possible.
+.IP "\fBprefork=\fR0" 5
+The number of instances of this service to always have running and
+waiting for a connection (for faster initial response time). This
+integer value is optional.
+.IP "\fBprovide_uuid=\fR0" 5
+Provide the service the required information for constructing
+universally unique identifiers (UUIDs) for messages. This option is
+only used for IMAP, NNTP and LMTP services when replicating the
+mailstore between servers.
+.IP "\fBmaxchild=\fR-1" 5
+The maximum number of instances of this service to spawn. A value of
+-1 means unlimited. This integer value is optional.
+.IP "\fBmaxfds=\fR256" 5
+The maximum number of file descriptors to which to limit this process.
+This integer value is optional.
+.SS EVENTS
+This section lists processes that should be run at specific intervals,
+similar to cron jobs. This section is typically used to perform
+scheduled cleanup/maintenance.
+.IP "\fBcmd=\fR<no default>" 5
+The command (with options) to spawn as a child process. This string
+argument is required.
+.IP "\fBperiod=\fR0" 5
+The interval (in minutes) at which to run the command. This integer value is
+optional, but SHOULD be a positive integer > 10.
+.IP "\fBat=\fR<hhmm>" 5
+The time (24-hour format) at which to run the command each day. If
+set to a valid time (0000-2359), period is automatically set to 1440.
+This string argument is optional.
+.SH EXAMPLE
+# example cyrus.conf
+
+START {
+ recover cmd="ctl_cyrusdb -r"
+.br
+}
+
+SERVICES {
+ imap cmd="imapd" listen="imap" prefork=1
+ imaps cmd="imapd -s" listen="imaps" prefork=0
+ lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp"
+ lmtp cmd="lmtpd" listen="localhost:lmtp"
+.br
+}
+
+EVENTS {
+ checkpoint cmd="ctl_cyrusdb -c" period=30
+ delprune cmd="cyr_expire -E 3" at=0400
+ tlsprune cmd="tls_prune" at=0400
+.br
+}
+.SH ACCESS CONTROL
+When TCP Wrappers is used to control access to Cyrus services, the
+\fIname\fR of the service entry should be used as the process name in
+the \fBhosts_access(5)\fR table. For instance, in the example above,
+"imap", "imaps", "lmtpunix" and "lmtp" would be used as the process
+names. This allows a single daemon such as imapd to be run in
+different modes or configurations (i.e., SSL and non-SSL enabled) yet
+still have separate access control rules.
+.SH SEE ALSO
+.PP
+\fBmaster(8)\fR, \fBimapd(8)\fR, \fBpop3d(8)\fR, \fBlmtpd(8)\fR,
+\fBtimsieved(8)\fR, \fBidled(8)\fR, \fBnotifyd(8)\fR, \fBctl_cyrusdb(8)\fR,
+\fBctl_deliver(8)\fR, \fBtls_prune(8)\fR, \fBhosts_access(5)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/deliver.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/deliver.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/deliver.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/deliver.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,165 @@
+.\" -*- nroff -*-
+.TH DELIVER 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: deliver.8,v 1.17.8.2 2006/05/26 16:27:21 murch Exp $
+.SH NAME
+deliver \- deliver mail to an IMAP mailbox
+.SH SYNOPSIS
+.B deliver
+[
+.B \-C
+.I config-file
+]
+[
+.B \-d
+]
+[
+.B \-r
+.I address
+]
+.br
+ [
+.B \-f
+.I address
+]
+[
+.B \-m
+.I mailbox
+]
+[
+.B \-a
+.I auth-id
+]
+.br
+ [
+.B \-q
+]
+[
+.I userid
+]...
+.br
+.B deliver
+[
+.B \-C
+.I config-file
+]
+.B \-l
+.SH DESCRIPTION
+.I Deliver
+reads a message from the standard input and delivers it to one or more
+IMAP mailboxes.
+.PP
+.I Deliver
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.B \-d
+Ignored for compatability with
+.B /bin/mail.
+.TP
+.BI \-r " address"
+Insert a
+.B Return-Path:
+header containing
+.I address
+.TP
+.BI \-f " address"
+Insert a
+.B Return-Path:
+header containing
+.I address
+.TP
+.BI \-m " mailbox"
+Deliver to
+.IR mailbox .
+If any
+.IR userid s
+are specified, attempts to deliver to
+.RI user. userid . mailbox
+for each
+.IR userid .
+If the ACL on any such mailbox does not grant the sender the "p" right
+or if
+.B \-m
+is not specified,
+then delivers to the INBOX for the
+.IR userid ,
+regardless of the ACL on the INBOX.
+.IP
+If no
+.IR userid s
+are specified, attempts to deliver to
+.IR mailbox .
+If the ACL on
+.I mailbox
+does not grant the sender the "p" right, the delivery fails.
+.TP
+.BI \-a " auth-id"
+Specify the authorization id of the sender. Defaults to "anonymous".
+.TP
+.B \-q
+Deliver message even when receiving mailbox is over quota.
+.TP
+.B \-l
+Accept messages using the LMTP protocol.
+.SH NOTES
+Depending on the setting of \fBreject8bit\fR in \fBimapd.conf(5)\fR, deliver
+either rejects/accepts messages with 8-bit-set characters in the headers.
+If we accept messages with 8-bit-set characters in the headers, then depending
+on the setting of \fBmunge8bit\fR, these characters are either left un-touched
+or changed to `X'.
+This is because such characters can't be interpreted since the
+character set is not known, although some communities not well-served by
+US-ASCII assume that those characters can be used to represent characters not
+present in US-ASCII.
+.PP
+A method for encoding 8-bit-set characters is provided by RFC 2047.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBlmtpd(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fetchnews.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fetchnews.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fetchnews.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fetchnews.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,131 @@
+.\" -*- nroff -*-
+.TH FETCHNEWS 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 2002 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: fetchnews.8,v 1.2.2.2 2005/03/23 00:32:51 shadow Exp $
+.SH NAME
+fetchnews \- retrieve new articles from peer and feed to Cyrus
+.SH SYNOPSIS
+.B fetchnews
+[
+.B \-C
+.I config-file
+]
+[
+.B \-s
+.I servername[:port]
+]
+.br
+ [
+.B \-n
+]
+[
+.B \-y
+]
+[
+.B \-w
+.I wildmat
+]
+[
+.B \-f
+.I tstampfile
+]
+.br
+ [
+.B \-a
+.I authname
+[
+.B \-p
+.I password
+]
+]
+.I peername
+.SH DESCRIPTION
+.I Fetchnews
+retrieves news articles from a peer news server and feeds them to a
+Cyrus server.
+.I Fetchnews
+connects to the peer specified by
+.IR peername ,
+requests new articles since the time stored in
+.I tstampfile
+and feeds them to
+.IR servername .
+.PP
+.I Fetchnews
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-s " servername"
+Hostname of the Cyrus server (with optional port) to which articles
+should be fed. Defaults to "localhost:nntp".
+.TP
+.B \-n
+Don't use the NEWNEWS command.
+.I Fetchnews
+will keep track of the high and low water marks for each group and use
+them to fetch new articles.
+.TP
+.B \-y
+Use 4 instead of 2 digits for year. 2-digits are rfc977- but not y2k-compliant.
+.TP
+.BI \-w " wildmat"
+Wildmat pattern specifying which newsgroups to search for new
+articles. Defaults to "*".
+.TP
+.BI \-f " tstampfile"
+File in which to read/write the timestamp of when articles were last
+retrieved. Defaults to "newsstamp" located in
+.I configdir
+as specified by the configuration options.
+.TP
+.BI \-a " authname"
+Userid to use for authentication.
+.TP
+.BI \-p " password"
+Password to use for authentication.
+.SH FILES
+.TP
+.B /etc/imapd.conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fud.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fud.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fud.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/fud.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,117 @@
+.\" -*- nroff -*-
+.TH FUD 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: fud.8,v 1.11 2003/10/22 18:50:13 rjs3 Exp $
+.SH NAME
+FUD \- provide information about user mailboxes
+.SH SYNOPSIS
+.B fud
+[
+.B \-C
+.I config-file
+]
+[
+.B \-U
+.I uses
+]
+[
+.B \-T
+.I timeout
+]
+[
+.B \-D
+]
+.SH DESCRIPTION
+.B FUD
+is a long lived datagram daemon started from master that provides
+information about when a user last
+read their mail, when mail last arrived in a user's mailbox, and how
+many messages are recent for that user.
+.PP
+Note that for
+.B FUD
+to run properly you must set proto=udp in its cyrus.conf
+services entry. prefork=1 is also recommended.
+.B FUD
+will automatically proxy any and all FUD requests to the appropriate
+backend server if it is runing on a Cyrus Murder frontend machine.
+.PP
+.B FUD
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-U " uses"
+The maximum number of times that the process should be used for new
+connections before shutting down. The default is 250.
+.TP
+.BI \-T " timeout"
+The number of seconds that the process will wait for a new connection
+before shutting down. Note that a value of 0 (zero) will disable the
+timeout. The default is 60.
+.TP
+.BI \-D
+Run external debugger specified in debug_command.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+Default configuration file.
+.TP
+.B /etc/cyrus.conf
+Cyrus Master process configuration file.
+.SH BUGS
+Though not really a bug,
+.B FUD
+will silently ignore any requests that it does not consider valid.
+.PP
+Also not really a bug,
+.B FUD
+requires that the anonymous user has the 0 (zero) right on the mailbox
+in question. This is only a "bug" because 0 is not a standard IMAP ACL bit.
+.PP
+.B FUD
+is an experimental interface meant to provide information to build a
+finger-like service around. Eventually it should be superceded by a
+more standards-based protocol.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/idled.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/idled.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/idled.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/idled.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,78 @@
+.\" -*- nroff -*-
+.TH IDLED 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: idled.8,v 1.4 2003/08/09 23:43:14 rjs3 Exp $
+.SH NAME
+idled \- provide near real-time updates for IMAP IDLE
+.SH SYNOPSIS
+.B idled
+[
+.B \-C
+.I config-file
+]
+.SH DESCRIPTION
+.I Idled
+is a long lived datagram daemon which receives notifications of
+mailbox changes and signals the appropriate
+.IR imapd
+to report the changes to the client.
+.I Idled
+is usually started from
+.I master.
+.PP
+.I Idled
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+The
+.I idlesocket
+option is used to specify the Unix domain socket to listen on for
+notifications.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,151 @@
+.\" -*- nroff -*-
+.TH IMAPD 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: imapd.8,v 1.15 2002/10/03 19:02:41 ken3 Exp $
+.SH NAME
+imapd \- IMAP server process
+.SH SYNOPSIS
+.B imapd
+[
+.B \-C
+.I config-file
+]
+[
+.B \-U
+.I uses
+]
+[
+.B \-T
+.I timeout
+]
+[
+.B \-D
+]
+.br
+ [
+.B \-s
+]
+[
+.B \-p
+.I ssf
+]
+.SH DESCRIPTION
+.I Imapd
+is an IMAP4rev1 server.
+It accepts commands on its standard input and responds on its standard output.
+It MUST be invoked by
+.IR master (8)
+with those descriptors attached to a remote client connection.
+.PP
+.I Imapd
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.PP
+If the file
+msg/shutdown
+is created under the directory specified in the
+.I configdirectory
+configuration option, then
+.I imapd
+will shut down the connection, sending the first line contained in the
+file to the client as the reason. New connections are denied.
+.PP
+If the file
+msg/motd
+is created under the directory specified in the
+.I configdirectory
+configuration option, then
+.I imapd
+will send the first line contained in the file to clients upon connect as
+an ALERT message which IMAP-compliant clients are required to display.
+This option serves to annoy users mostly. Unfortunately clients tend to
+connect far more frequently than is apparent, causing each connection to
+generate a seperate server ALERT for each connection. Many clients do not
+display these properly, if they do anything with them at all.
+.PP
+If the directory
+.RI log/ user
+exists under the directory specified in the
+.I configdirectory
+configuration option, then
+.I imapd
+will create protocol telemetry logs for sessions authenticating as
+.IR user .
+The telemetry logs will be stored in the
+.RI log/ user
+directory with a filename of the
+.I imapd
+process-id.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-U " uses"
+The maximum number of times that the process should be used for new
+connections before shutting down. The default is 250.
+.TP
+.BI \-T " timeout"
+The number of seconds that the process will wait for a new connection
+before shutting down. Note that a value of 0 (zero) will disable the
+timeout. The default is 60.
+.TP
+.BI \-D
+Run external debugger specified in debug_command.
+.TP
+.BI \-s
+Serve IMAP over SSL (imaps). All data to and from
+.I imapd
+is encrypted using the Secure Sockets Layer.
+.TP
+.BI \-p " ssf"
+Tell
+.I imapd
+that an external layer exists. An SSF (security strength factor) of 1
+means an integrity protection layer exists. Any higher SSF implies
+some form of privacy protection.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.conf.5
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.conf.5?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.conf.5 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imapd.conf.5 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,847 @@
+.\" -*- nroff -*-
+.\" auto-generated by config2man 1.2.2.1
+.\" -*- nroff -*-
+.TH IMAPD.CONF 5 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: imapoptions,v 1.2.2.47 2006/06/27 15:58:42 murch Exp $
+.SH NAME
+imapd.conf \- IMAP configuration file
+.SH DESCRIPTION
+\fB/etc/imapd.conf\fR
+is the configuration file for the Cyrus IMAP server. It defines
+local parameters for IMAP.
+.PP
+Each line of the \fB/etc/imapd.conf\fR file has the form
+.IP
+\fIoption\fR: \fIvalue\fR
+.PP
+where \fIoption\fR is the name of the configuration option being set
+and \fIvalue\fR is the value that the configuration option is being
+set to.
+.PP
+Blank lines and lines beginning with ``#'' are ignored.
+.PP
+For boolean and enumerated options, the values ``yes'', ``on'', ``t'',
+``true'' and ``1'' turn the option on, the values ``no'', ``off'',
+``f'', ``false'' and ``0'' turn the option off.
+.SH FIELD DESCRIPTIONS
+.PP
+The sections below detail options that can be placed in the
+\fB/etc/imapd.conf\fR file, and show each option's default value.
+Some options have no default value, these are listed with
+``<no default>''. Some options default to the empty string, these
+are listed with ``<none>''.
+
+.IP "\fBadmins:\fR <empty string>" 5
+The list of userids with administrative rights. Separate each userid
+with a space. Sites using Kerberos authentication may use
+separate "admin" instances.
+.PP
+Note that accounts used by users should not be administrators.
+Administrative accounts should not receive mail. That is, if user
+"jbRo" is a user reading mail, he should not also be in the admins line.
+Some problems may occur otherwise, most notably the ability of
+administrators to create top-level mailboxes visible to users,
+but not writable by users.
+.IP "\fBafspts_localrealms:\fR <none>" 5
+The list of realms which are to be treated as local, and thus stripped
+during identifier canonicalization (for the AFSPTS ptloader module).
+This is different from loginrealms in that it occurs later in the
+authorization process (as the user id is canonified for PTS lookup)
+.IP "\fBafspts_mycell:\fR <none>" 5
+Cell to use for AFS PTS lookups. Defaults to the local cell.
+.IP "\fBallowallsubscribe:\fR 0" 5
+Allow subscription to nonexistent mailboxes. This option is
+typically used on backend servers in a Murder so that users can
+subscribe to mailboxes that don't reside on their "home" server.
+This option can also be used as a workaround for IMAP clients which
+don't play well with nonexistent or unselectable mailboxes (eg.
+Microsoft Outlook).
+.IP "\fBallowanonymouslogin:\fR 0" 5
+Permit logins by the user "anonymous" using any password. Also
+allows use of the SASL ANONYMOUS mechanism.
+.IP "\fBallowapop:\fR 1" 5
+Allow use of the POP3 APOP authentication command.
+.PP
+Note that this command requires that SASL is compiled with APOP
+support, that the plaintext passwords are available in a SASL auxprop
+backend (eg. sasldb), and that the system can provide enough entropy
+(eg. from /dev/urandom) to create a challenge in the banner.
+.IP "\fBallownewnews:\fR 0" 5
+Allow use of the NNTP NEWNEWS command.
+.PP
+Note that this is a very expensive command and should only be
+enabled when absolutely necessary.
+.IP "\fBallowplaintext:\fR 1" 5
+Allow the use of cleartext passwords on the wire.
+.IP "\fBallowusermoves:\fR 0" 5
+Allow moving user accounts (with associated meta-data) via RENAME
+or XFER.
+.PP
+Note that measures should be taken to make sure that the user being
+moved is not logged in, and can not login during the move. Failure
+to do so may result in the user's meta-data (seen state,
+subscriptions, etc) being corrupted or out of date.
+.IP "\fBaltnamespace:\fR 0" 5
+Use the alternate IMAP namespace, where personal folders reside at the
+same level in the hierarchy as INBOX.
+.PP
+This option ONLY applies where interaction takes place with the
+client/user. Currently this is limited to the IMAP protocol (imapd)
+and Sieve scripts (lmtpd). This option does NOT apply to admin tools
+such as cyradm (admins ONLY), reconstruct, quota, etc., NOR does it
+affect LMTP delivery of messages directly to mailboxes via
+plus-addressing.
+.IP "\fBannotation_db:\fR skiplist" 5
+The cyrusdb backend to use for mailbox annotations.
+
+Allowed values: \fIberkeley\fR, \fIberkeley-hash\fR, \fIskiplist\fR
+.IP "\fBauth_mech:\fR unix" 5
+The authorization mechanism to use.
+
+Allowed values: \fIunix\fR, \fIpts\fR, \fIkrb\fR, \fIkrb5\fR
+.IP "\fBautocreatequota:\fR 0" 5
+If nonzero, normal users may create their own IMAP accounts by
+creating the mailbox INBOX. The user's quota is set to the value
+if it is positive, otherwise the user has unlimited quota.
+.IP "\fBberkeley_cachesize:\fR 512" 5
+Size (in kilobytes) of the shared memory buffer pool (cache) used
+by the berkeley environment. The minimum allowed value is 20. The
+maximum allowed value is 4194303 (4GB).
+.IP "\fBberkeley_locks_max:\fR 50000" 5
+Maximum number of locks to be held or requested in the berkeley
+environment.
+.IP "\fBberkeley_txns_max:\fR 100" 5
+Maximum number of transactions to be supported in the berkeley
+environment.
+.IP "\fBclient_timeout:\fR 10" 5
+Number of seconds to wait before returning a timeout failure when
+performing a client connection (e.g. in a murder environment)
+.IP "\fBconfigdirectory:\fR <none>" 5
+The pathname of the IMAP configuration directory. This field is
+required.
+.IP "\fBdebug_command:\fR <none>" 5
+Debug command to be used by processes started with -D option. The string
+is a C format string that gets 3 options: the first is the name of the
+executable (without path). The second is the pid (integer) and the third
+is the service ID. Example: /usr/local/bin/gdb /usr/cyrus/bin/%s %d
+.IP "\fBdefaultacl:\fR anyone lrs" 5
+The Access Control List (ACL) placed on a newly-created (non-user)
+mailbox that does not have a parent mailbox.
+.IP "\fBdefaultdomain:\fR <none>" 5
+The default domain for virtual domain support
+.IP "\fBdefaultpartition:\fR default" 5
+The partition name used by default for new mailboxes.
+.IP "\fBdeleteright:\fR c" 5
+Deprecated - only used for backwards compatibility with existing
+installations. Lists the old RFC 2086 right which was used to
+grant the user the ability to delete a mailbox. If a user has this
+right, they will automatically be given the new 'x' right.
+.IP "\fBduplicate_db:\fR berkeley-nosync" 5
+The cyrusdb backend to use for the duplicate delivery suppression
+and sieve.
+
+Allowed values: \fIberkeley\fR, \fIberkeley-nosync\fR, \fIberkeley-hash\fR, \fIberkeley-hash-nosync\fR, \fIskiplist\fR
+.IP "\fBduplicatesuppression:\fR 1" 5
+If enabled, lmtpd will suppress delivery of a message to a mailbox if
+a message with the same message-id (or resent-message-id) is recorded
+as having already been delivered to the mailbox. Records the mailbox
+and message-id/resent-message-id of all successful deliveries.
+.IP "\fBexpunge_mode:\fR immediate" 5
+The mode in which messages (and their corresponding cache entries)
+are expunged. "Immediate" mode is the default behavior in which the
+message files and cache entries are purged at the time of the
+EXPUNGE. In "delayed" mode, the messages are removed from the
+mailbox index at the time of the EXPUNGE (hiding them from the
+client), but the message files and cache entries are left behind,
+to be purged at a later time by "cyr_expire". This reduces the
+amount of I/O that takes place at the time of EXPUNGE and should
+result in greater responsiveness for the client, especially when
+expunging a large number of messages.
+
+Allowed values: \fIimmediate\fR, \fIdelayed\fR
+.IP "\fBflushseenstate:\fR 0" 5
+If enabled, changes to the seen state will be flushed to disk
+immediately, otherwise changes will be cached and flushed when the
+mailbox is closed. This option may be used to fix the problem of
+previously read messages being marked as unread in Microsoft
+Outlook, at the expense of a loss of performance/scalability.
+.IP "\fBfoolstupidclients:\fR 0" 5
+If enabled, only list the personal namespace when a LIST "*" is performed.
+(it changes the request to a LIST "INBOX*"
+.IP "\fBforce_sasl_client_mech:\fR <none>" 5
+Force preference of a given SASL mechanism for client side operations
+(e.g. murder environments). This is separate from (and overridden by)
+the ability to use the <host shortname>_mechs option to set preferred
+mechanisms for a specific host
+.IP "\fBfulldirhash:\fR 0" 5
+If enabled, uses an improved directory hashing scheme which hashes
+the entire username instead of using just the first letter. This
+changes hash algorithm used for quota and user directories and if
+\fIhashimapspool\fR is enabled, the entire mail spool.
+.PP
+Note that this option can NOT be changed on a live system. The
+server must be quiesced and then the directories moved with the
+\fBrehash\fR utility.
+.IP "\fBhashimapspool:\fR 0" 5
+If enabled, the partitions will also be hashed, in addition to the
+hashing done on configuration directories. This is recommended if
+one partition has a very bushy mailbox tree.
+.IP "\fBhostname_mechs:\fR <none>" 5
+Force a particular list of SASL mechanisms to be used when authenticating
+to the backend server hostname (where hostname is the short hostname of
+the server in question). If it is not specified it will query the server
+for available mechanisms and pick one to use. - Cyrus Murder
+.IP "\fBhostname_password:\fR <none>" 5
+The password to use for authentication to the backend server hostname
+(where hostname is the short hostname of the server) - Cyrus Murder
+.IP "\fBidlesocket:\fR {configdirectory}/socket/idle" 5
+Unix domain socket that idled listens on.
+.IP "\fBignorereference:\fR 0" 5
+For backwards compatibility with Cyrus 1.5.10 and earlier -- ignore
+the reference argument in LIST or LSUB commands.
+.IP "\fBimapidlepoll:\fR 60" 5
+The interval (in seconds) for polling for mailbox changes and
+ALERTs while running the IDLE command. This option is used when
+idled is not enabled or can not be contacted. The minimum value is
+1. A value of 0 will disable IDLE.
+.IP "\fBimapidresponse:\fR 1" 5
+If enabled, the server responds to an ID command with a parameter
+list containing: version, vendor, support-url, os, os-version,
+command, arguments, environment. Otherwise the server returns NIL.
+.IP "\fBimapmagicplus:\fR 0" 5
+Only list a restricted set of mailboxes via IMAP by using
+userid+namespace syntax as the authentication/authorization id.
+Using userid+ (with an empty namespace) will list only subscribed
+mailboxes.
+.IP "\fBimplicit_owner_rights:\fR lca" 5
+The implicit Access Control List (ACL) for the owner of a mailbox.
+.IP "\fB at include:\fR <none>" 5
+Directive which includes the specified file as part of the
+configuration. If the path to the file is not absolute, CYRUS_PATH
+is prepended.
+.IP "\fBldap_authz:\fR <none>" 5
+SASL authorization ID for the LDAP server
+.IP "\fBldap_base:\fR <empty string>" 5
+Contains the LDAP base dn for the LDAP ptloader module
+.IP "\fBldap_bind_dn:\fR <none>" 5
+Bind DN for the connection to the LDAP server (simple bind).
+Do not use for anonymous simple binds
+.IP "\fBldap_deref:\fR never" 5
+Specify how aliases dereferencing is handled during search.
+
+Allowed values: \fIsearch\fR, \fIfind\fR, \fIalways\fR, \fInever\fR
+.IP "\fBldap_filter:\fR (uid=%u)" 5
+Specify a filter that searches user identifiers. The following tokens can be
+used in the filter string:
+
+%% = %
+%u = user
+%U = user portion of %u (%U = test when %u = test at domain.tld)
+%d = domain portion of %u if available (%d = domain.tld when %u =
+%test at domain.tld), otherwise same as %r
+%D = user dn. (use when ldap_member_method: filter)
+%1-9 = domain tokens (%1 = tld, %2 = domain when %d = domain.tld)
+
+ldap_filter is not used when ldap_sasl is enabled.
+.IP "\fBldap_group_base:\fR <empty string>" 5
+LDAP base dn for ldap_group_filter.
+.IP "\fBldap_group_filter:\fR (cn=%u)" 5
+Specify a filter that searches for group identifiers.
+See ldap_filter for more options.
+.IP "\fBldap_group_scope:\fR sub" 5
+Specify search scope for ldap_group_filter.
+
+Allowed values: \fIsub\fR, \fIone\fR, \fIbase\fR
+.IP "\fBldap_id:\fR <none>" 5
+SASL authentication ID for the LDAP server
+.IP "\fBldap_mech:\fR <none>" 5
+SASL mechanism for LDAP authentication
+.IP "\fBldap_member_attribute:\fR <none>" 5
+See ldap_member_method.
+.IP "\fBldap_member_base:\fR <empty string>" 5
+LDAP base dn for ldap_member_filter.
+.IP "\fBldap_member_filter:\fR (member=%D)" 5
+Specify a filter for "ldap_member_method: filter".
+See ldap_filter for more options.
+.IP "\fBldap_member_method:\fR attribute" 5
+Specify a group method. The "attribute" method retrieves groups from
+a multi-valued attribute specified in ldap_member_attribute.
+
+The "filter" method uses a filter, specified by ldap_member_filter, to find
+groups; ldap_member_attribute is a single-value attribute group name.
+
+Allowed values: \fIattribute\fR, \fIfilter\fR
+.IP "\fBldap_member_scope:\fR sub" 5
+Specify search scope for ldap_member_filter.
+
+Allowed values: \fIsub\fR, \fIone\fR, \fIbase\fR
+.IP "\fBldap_password:\fR <none>" 5
+Password for the connection to the LDAP server (SASL and simple bind).
+Do not use for anonymous simple binds
+.IP "\fBldap_realm:\fR <none>" 5
+SASL realm for LDAP authentication
+.IP "\fBldap_referrals:\fR 0" 5
+Specify whether or not the client should follow referrals.
+.IP "\fBldap_restart:\fR 1" 5
+Specify whether or not LDAP I/O operations are automatically restarted
+if they abort prematurely.
+.IP "\fBldap_sasl:\fR 1" 5
+Use SASL for LDAP binds in the LDAP PTS module.
+.IP "\fBldap_sasl_authc:\fR <none>" 5
+Deprecated. Use ldap_id
+.IP "\fBldap_sasl_authz:\fR <none>" 5
+Deprecated. Use ldap_authz
+.IP "\fBldap_sasl_mech:\fR <none>" 5
+Deprecated. Use ldap_mech
+.IP "\fBldap_sasl_password:\fR <none>" 5
+Deprecated. User ldap_password
+.IP "\fBldap_sasl_realm:\fR <none>" 5
+Deprecated. Use ldap_realm
+.IP "\fBldap_scope:\fR sub" 5
+Specify search scope.
+
+Allowed values: \fIsub\fR, \fIone\fR, \fIbase\fR
+.IP "\fBldap_servers:\fR ldap://localhost/" 5
+Deprecated. Use ldap_uri
+.IP "\fBldap_size_limit:\fR 1" 5
+Specify a number of entries for a search request to return.
+.IP "\fBldap_start_tls:\fR 0" 5
+Use StartTLS extended operation. Do not use ldaps: ldap_uri when
+this option is enabled.
+.IP "\fBldap_time_limit:\fR 5" 5
+Specify a number of seconds for a search request to complete.
+.IP "\fBldap_timeout:\fR 5" 5
+Specify a number of seconds a search can take before timing out.
+.IP "\fBldap_tls_cacert_dir:\fR <none>" 5
+Path to directory with CA (Certificate Authority) certificates.
+.IP "\fBldap_tls_cacert_file:\fR <none>" 5
+File containing CA (Certificate Authority) certificate(s).
+.IP "\fBldap_tls_cert:\fR <none>" 5
+File containing the client certificate.
+.IP "\fBldap_tls_check_peer:\fR 0" 5
+Require and verify server certificate. If this option is yes,
+you must specify ldap_tls_cacert_file or ldap_tls_cacert_dir.
+.IP "\fBldap_tls_ciphers:\fR <none>" 5
+List of SSL/TLS ciphers to allow. The format of the string is
+described in ciphers(1).
+.IP "\fBldap_tls_key:\fR <none>" 5
+File containing the private client key.
+.IP "\fBldap_uri:\fR <none>" 5
+Contains a list of the URLs of all the LDAP servers when using the
+LDAP PTS module.
+.IP "\fBldap_version:\fR 3" 5
+Specify the LDAP protocol version. If ldap_start_tls and/or
+ldap_use_sasl are enabled, ldap_version will be automatically
+set to 3.
+.IP "\fBlmtp_downcase_rcpt:\fR 0" 5
+If enabled, lmtpd will convert the recipient address to lowercase
+(up to a '+' character, if present).
+.IP "\fBlmtp_fuzzy_mailbox_match:\fR 0" 5
+If enabled, and the mailbox specified in the detail part of the
+recipient (everything after the '+') does not exist, lmtpd will try
+to find the closest match (ignoring case, ignoring whitespace,
+falling back to parent) to the specified mailbox name.
+.IP "\fBlmtp_over_quota_perm_failure:\fR 0" 5
+If enabled, lmtpd returns a permanent failure code when a user's
+mailbox is over quota. By default, the failure is temporary,
+causing the MTA to queue the message and retry later.
+.IP "\fBlmtp_strict_quota:\fR 0" 5
+If enabled, lmtpd returns a failure code when the incoming message
+will cause the user's mailbox to exceed its quota. By default, the
+failure won't occur until the mailbox is already over quota.
+.IP "\fBlmtpsocket:\fR {configdirectory}/socket/lmtp" 5
+Unix domain socket that lmtpd listens on, used by deliver(8). This should
+match the path specified in cyrus.conf(5).
+.IP "\fBloginrealms:\fR <empty string>" 5
+The list of remote realms whose users may authenticate using cross-realm
+authentication identifiers. Separate each realm name by a space. (A
+cross-realm identity is considered any identity returned by SASL
+with an "@" in it.).
+.IP "\fBloginuseacl:\fR 0" 5
+If enabled, any authentication identity which has \fBa\fR rights on a
+user's INBOX may log in as that user.
+.IP "\fBlogtimestamps:\fR 0" 5
+Include notations in the protocol telemetry logs indicating the number of
+seconds since the last command or response.
+.IP "\fBmailnotifier:\fR <none>" 5
+Notifyd(8) method to use for "MAIL" notifications. If not set, "MAIL"
+notifications are disabled.
+.IP "\fBmaxmessagesize:\fR 0" 5
+Maximum incoming LMTP message size. If non-zero, lmtpd will reject
+messages larger than \fImaxmessagesize\fR bytes. If set to 0, this
+will allow messages of any size (the default).
+.IP "\fBmboxkey_db:\fR skiplist" 5
+The cyrusdb backend to use for mailbox keys.
+
+Allowed values: \fIberkeley\fR, \fIskiplist\fR
+.IP "\fBmboxlist_db:\fR skiplist" 5
+The cyrusdb backend to use for the mailbox list.
+
+Allowed values: \fIflat\fR, \fIberkeley\fR, \fIberkeley-hash\fR, \fIskiplist\fR
+.IP "\fBmetapartition_files:\fR <empty string>" 5
+Space-separated list of metadata files to be stored on a
+\fImetapartition\fR rather than in the mailbox directory on a spool
+partition.
+
+Allowed values: \fIheader\fR, \fIindex\fR, \fIcache\fR, \fIexpunge\fR, \fIsquat\fR
+.IP "\fBmetapartition-name:\fR <none>" 5
+The pathname of the metadata partition \fIname\fR, corresponding to
+spool partition \fBpartition-name\fR. For any mailbox residing in
+a directory on \fBpartition-name\fR, the metadata files listed in
+\fImetapartition_files\fR will be stored in a corresponding directory on
+\fBmetapartition-name\fR. Note that not every
+\fBpartition-name\fR option is required to have a corresponding
+\fBmetapartition-name\fR option, so that you can selectively choose
+which spool partitions will have separate metadata partitions.
+.IP "\fBmupdate_authname:\fR <none>" 5
+The SASL username (Authentication Name) to use when authenticating to the
+mupdate server (if needed).
+.IP "\fBmupdate_config:\fR standard" 5
+The configuration of the mupdate servers in the Cyrus Murder.
+The "standard" config is one in which there are discreet frontend
+(proxy) and backend servers. The "unified" config is one in which
+a server can be both a frontend and backend. The "replicated"
+config is one in which multiple backend servers all share the same
+mailspool, but each have their own "replicated" copy of
+mailboxes.db.
+
+Allowed values: \fIstandard\fR, \fIunified\fR, \fIreplicated\fR
+.IP "\fBmd5_dir:\fR <none>" 5
+Top level directory for MD5 store manipulated by make_md5. File
+structure within this directory is one file for each user on the system,
+hashed on the first letter of the userid (e.g: /var/imap/md5/d/dpc22).
+.IP "\fBmd5_user_map:\fR <none>" 5
+Map file (cdb) to allow partial make_md5 runs. Maps username to UID
+.IP "\fBmunge8bit:\fR 1" 5
+If enabled, lmtpd munges messages with 8-bit characters in the
+headers. The 8-bit characters are changed to `X'. If
+\fBreject8bit\fR is enabled, setting \fBmunge8bit\fR has no effect.
+(A proper solution to non-ASCII characters in headers is offered by
+RFC 2047 and its predecessors.)
+.IP "\fBmupdate_connections_max:\fR 128" 5
+The max number of connections that a mupdate process will allow, this
+is related to the number of file descriptors in the mupdate process.
+Beyond this number connections will be immediately issued a BYE response.
+.IP "\fBmupdate_password:\fR <none>" 5
+The SASL password (if needed) to use when authenticating to the
+mupdate server.
+.IP "\fBmupdate_port:\fR 3905" 5
+The port of the mupdate server for the Cyrus Murder
+.IP "\fBmupdate_realm:\fR <none>" 5
+The SASL realm (if needed) to use when authenticating to the mupdate
+server.
+.IP "\fBmupdate_retry_delay:\fR 20" 5
+The base time to wait between connection retries to the mupdate server.
+.IP "\fBmupdate_server:\fR <none>" 5
+The mupdate server for the Cyrus Murder
+.IP "\fBmupdate_username:\fR <empty string>" 5
+The SASL username (Authorization Name) to use when authenticating to
+the mupdate server
+.IP "\fBmupdate_workers_max:\fR 50" 5
+The maximum number of mupdate worker threads (overall)
+.IP "\fBmupdate_workers_maxspare:\fR 10" 5
+The maximum number of idle mupdate worker threads
+.IP "\fBmupdate_workers_minspare:\fR 2" 5
+The minimum number of idle mupdate worker threads
+.IP "\fBmupdate_workers_start:\fR 5" 5
+The number of mupdate worker threads to start
+.IP "\fBnetscapeurl:\fR http://asg.web.cmu.edu/cyrus/imapd/netscape-admin.html" 5
+If enabled at compile time, this specifies a URL to reply when
+Netscape asks the server where the mail administration HTTP server
+is. The default is a site at CMU with a hopefully informative
+message; administrators should set this to a local resource with
+some information of greater use.
+.IP "\fBnewsmaster:\fR news" 5
+Userid that is used for checking access controls when executing
+Usenet control messages. For instance, to allow articles to be
+automatically deleted by cancel messages, give the "news" user
+the 'd' right on the desired mailboxes. To allow newsgroups to be
+automatically created, deleted and renamed by the corresponding
+control messages, give the "news" user the 'c' right on the desired
+mailbox hierarchies.
+.IP "\fBnewspeer:\fR <none>" 5
+A list of whitespace-separated news server specifications to which
+articles should be fed. Each server specification is a string of
+the form [user[:pass]@]host[:port][/wildmat] where 'host' is the fully
+qualified hostname of the server, 'port' is the port on which the
+server is listening, 'user' and 'pass' are the authentication
+credentials and 'wildmat' is a pattern that specifies which groups
+should be fed. If no 'port' is specified, port 119 is used. If
+no 'wildmat' is specified, all groups are fed. If 'user' is specified
+(even if empty), then the NNTP POST command will be used to feed
+the article to the server, otherwise the IHAVE command will be
+used.
+.br
+.sp
+A '@' may be used in place of '!' in the wildmat to prevent feeding
+articles cross-posted to the given group, otherwise cross-posted
+articles are fed if any part of the wildmat matches. For example,
+the string "peer.example.com:*,!control.*, at local.*" would feed all
+groups except control messages and local groups to
+peer.example.com. In the case of cross-posting to local groups,
+these articles would not be fed.
+.IP "\fBnewspostuser:\fR <none>" 5
+Userid used to deliver usenet articles to newsgroup folders
+(usually via lmtp2nntp). For example, if set to "post", email sent
+to "post+comp.mail.imap" would be delivered to the "comp.mail.imap"
+folder.
+.br
+.sp
+When set, the Cyrus NNTP server will add a \fITo:\fR header to each
+incoming usenet article. This \fITo:\fR header will contain email
+delivery addresses corresponding to each newsgroup in the
+\fINewsgroups:\fR header. By default, a \fITo:\fR header is not
+added to usenet articles.
+.IP "\fBnewsprefix:\fR <none>" 5
+Prefix to be prepended to newsgroup names to make the corresponding
+IMAP mailbox names.
+.IP "\fBnntptimeout:\fR 3" 5
+Set the length of the NNTP server's inactivity autologout timer,
+in minutes. The minimum value is 3, the default.
+.IP "\fBnotifysocket:\fR {configdirectory}/socket/notify" 5
+Unix domain socket that the mail notification daemon listens on.
+.IP "\fBpartition-name:\fR <none>" 5
+The pathname of the partition \fIname\fR. At least one field, for the
+partition named in the \fBdefaultpartition\fR option, is required.
+For example, if the value of the \fBdefaultpartion\fR option is
+\fBdefault\fR, then the \fBpartition-default\fR field is required.
+.IP "\fBplaintextloginpause:\fR 0" 5
+Number of seconds to pause after a successful plaintext login. For
+systems that support strong authentication, this permits users to
+perceive a cost of using plaintext passwords. (This does not
+affect the use of PLAIN in SASL authentications.)
+.IP "\fBplaintextloginalert:\fR <none>" 5
+Message to send to client after a successful plaintext login.
+.IP "\fBpopexpiretime:\fR -1" 5
+The number of days advertised as being the minimum a message may be
+left on the POP server before it is deleted (via the CAPA command,
+defined in the POP3 Extension Mechanism, which some clients may
+support). "NEVER", the default, may be specified with a negative
+number. The Cyrus POP3 server never deletes mail, no matter what
+the value of this parameter is. However, if a site implements a
+less liberal policy, it needs to change this parameter
+accordingly.
+.IP "\fBpopminpoll:\fR 0" 5
+Set the minimum amount of time the server forces users to wait
+between successive POP logins, in minutes.
+.IP "\fBpopsubfolders:\fR 0" 5
+Allow access to subfolders of INBOX via POP3 by using
+userid+subfolder syntax as the authentication/authorization id.
+.IP "\fBpoppollpadding:\fR 1" 5
+Create a softer minimum poll restriction. Allows \fIpoppollpadding\fR
+connections before the minpoll restriction is triggered. Additionally,
+one padding entry is recovered every \fIpopminpoll\fR minutes.
+This allows for the occasional polling rate faster than popminpoll,
+(i.e. for clients that require a send/receive to send mail) but still
+enforces the rate long-term. Default is 1 (disabled).
+.br
+.sp
+The easiest way to think of it is a queue of past connections, with one
+slot being filled for every connection, and one slot being cleared
+every \fIpopminpoll\fR minutes. When the queue is full, the user
+will not be able to check mail again until a slot is cleared. If the
+user waits a sufficient amount of time, they will get back many or all
+of the slots.
+.IP "\fBpoptimeout:\fR 10" 5
+Set the length of the POP server's inactivity autologout timer,
+in minutes. The minimum value is 10, the default.
+.IP "\fBpopuseacl:\fR 0" 5
+Enforce IMAP ACLs in the pop server. Due to the nature of the POP3
+protocol, the only rights which are used by the pop server are 'r'
+and 'd' for the owner of the mailbox. The 'r' right allows the
+user to open the mailbox and list/retrieve messages. The 'd' right
+allows the user to delete messages.
+.IP "\fBpostmaster:\fR postmaster" 5
+Username that is used as the 'From' address in rejection MDNs produced
+by sieve.
+.IP "\fBpostuser:\fR <empty string>" 5
+Userid used to deliver messages to shared folders. For example, if
+set to "bb", email sent to "bb+shared.blah" would be delivered to
+the "shared.blah" folder. By default, an email address of
+"+shared.blah" would be used.
+.IP "\fBproxy_authname:\fR proxy" 5
+The authentication name to use when authenticating to a backend server
+in the Cyrus Murder.
+.IP "\fBproxy_password:\fR <none>" 5
+The default password to use when authenticating to a backend server
+in the Cyrus Murder. May be overridden on a host-specific basis using
+the hostname_password option.
+.IP "\fBproxy_realm:\fR <none>" 5
+The authentication realm to use when authenticating to a backend server
+in the Cyrus Murder
+.IP "\fBproxyd_allow_status_referral:\fR 0" 5
+Set to true to allow proxyd to issue referrals to clients that support it
+when answering the STATUS command. This is disabled by default since
+some clients issue many STATUS commands in a row, and do not cache the
+connections that these referrals would cause, thus resulting in a higher
+authentication load on the respective backend server.
+.IP "\fBproxyservers:\fR <none>" 5
+A list of users and groups that are allowed to proxy for other
+users, separated by spaces. Any user listed in this will be
+allowed to login for any other user: use with caution.
+.IP "\fBpts_module:\fR afskrb" 5
+The PTS module to use.
+
+Allowed values: \fIafskrb\fR, \fIldap\fR
+.IP "\fBptloader_sock:\fR <none>" 5
+Unix domain socket that ptloader listens on.
+(defaults to configdir/ptclient/ptsock)
+.IP "\fBptscache_db:\fR berkeley" 5
+The cyrusdb backend to use for the pts cache.
+
+Allowed values: \fIberkeley\fR, \fIberkeley-hash\fR, \fIskiplist\fR
+.IP "\fBptscache_timeout:\fR 10800" 5
+The timeout (in seconds) for the PTS cache database when using the
+auth_krb_pts authorization method (default: 3 hours).
+.IP "\fBptskrb5_convert524:\fR 1" 5
+When using the AFSKRB ptloader module with Kerberos 5 canonicalization,
+do the final 524 conversion to get a n AFS style name (using '.' instead
+of '/', and using short names
+.IP "\fBptskrb5_strip_default_realm:\fR 1" 5
+When using the AFSKRB ptloader module with Kerberos 5 canonicalization,
+strip the default realm from the userid (this does not affect the stripping
+of realms specified by the afspts_localrealms option)
+.IP "\fBquota_db:\fR quotalegacy" 5
+The cyrusdb backend to use for quotas.
+
+Allowed values: \fIflat\fR, \fIberkeley\fR, \fIberkeley-hash\fR, \fIskiplist\fR, \fIquotalegacy\fR
+.IP "\fBquotawarn:\fR 90" 5
+The percent of quota utilization over which the server generates
+warnings.
+.IP "\fBquotawarnkb:\fR 0" 5
+The maximum amount of free space (in kB) in which to give a quota
+warning (if this value is 0, or if the quota is smaller than this
+amount, than warnings are always given).
+.IP "\fBreject8bit:\fR 0" 5
+If enabled, lmtpd rejects messages with 8-bit characters in the
+headers.
+.IP "\fBrfc2046_strict:\fR 0" 5
+If enabled, imapd will be strict (per RFC 2046) when matching MIME
+boundary strings. This means that boundaries containing other
+boundaries as substrings will be treated as identical. Since
+enabling this option will break some messages created by Eudora 5.1
+(and earlier), it is recommended that it be left disabled unless
+there is good reason to do otherwise.
+.IP "\fBrfc3028_strict:\fR 1" 5
+If enabled, Sieve will be strict (per RFC 3028) with regards to
+which headers are allowed to be used in address and envelope tests.
+This means that only those headers which are defined to contain addresses
+will be allowed in address tests and only "to" and "from" will be
+allowed in envelope tests. When disabled, ANY grammatically correct header
+will be allowed.
+.IP "\fBsasl_auto_transition:\fR 0" 5
+If enabled, the SASL library will automatically create authentication
+secrets when given a plaintext password. See the SASL documentation.
+.IP "\fBsasl_maximum_layer:\fR 256" 5
+Maximum SSF (security strength factor) that the server will allow a
+client to negotiate.
+.IP "\fBsasl_minimum_layer:\fR 0" 5
+The minimum SSF that the server will allow a client to negotiate.
+A value of 1 requires integrity protection; any higher value
+requires some amount of encryption.
+.IP "\fBsasl_option:\fR 0" 5
+Any SASL option can be set by preceding it with "sasl_". This
+file overrides the SASL configuration file.
+.IP "\fBsasl_pwcheck_method:\fR <none>" 5
+The mechanism used by the server to verify plaintext passwords.
+Possible values include "auxprop", "saslauthd", and "pwcheck".
+.IP "\fBseenstate_db:\fR skiplist" 5
+The cyrusdb backend to use for the seen state.
+
+Allowed values: \fIflat\fR, \fIberkeley\fR, \fIberkeley-hash\fR, \fIskiplist\fR
+.IP "\fBsendmail:\fR /usr/lib/sendmail" 5
+The pathname of the sendmail executable. Sieve invokes sendmail
+for sending rejections, redirects and vacation responses.
+.IP "\fBservername:\fR <none>" 5
+This is the hostname visible in the greeting messages of the POP,
+IMAP and LMTP daemons. If it is unset, then the result returned
+from gethostname(2) is used.
+.IP "\fBsharedprefix:\fR Shared Folders" 5
+If using the alternate IMAP namespace, the prefix for the shared
+namespace. The hierarchy delimiter will be automatically appended.
+.IP "\fBsieve_allowreferrals:\fR 1" 5
+If enabled, timsieved will issue referrals to clients when the
+user's scripts reside on a remote server (in a Murder).
+Otherwise, timsieved will proxy traffic to the remote server.
+.IP "\fBsieve_extensions:\fR fileinto reject vacation imapflags notify envelope relational regex subaddress copy" 5
+Space-separated list of Sieve extensions allowed to be used in
+sieve scripts, enforced at submission by timsieved(8). Any
+previously installed script will be unaffected by this option and
+will continue to execute regardless of the extensions used. This
+option has no effect on options that are disabled at compile time
+(e.g. "regex").
+
+Allowed values: \fIfileinto\fR, \fIreject\fR, \fIvacation\fR, \fIimapflags\fR, \fInotify\fR, \fIinclude\fR, \fIenvelope\fR, \fIbody\fR, \fIrelational\fR, \fIregex\fR, \fIsubaddress\fR, \fIcopy\fR
+.IP "\fBsieve_maxscriptsize:\fR 32" 5
+Maximum size (in kilobytes) any sieve script can be, enforced at
+submission by timsieved(8).
+.IP "\fBsieve_maxscripts:\fR 5" 5
+Maximum number of sieve scripts any user may have, enforced at
+submission by timsieved(8).
+.IP "\fBsievedir:\fR /usr/sieve" 5
+If sieveusehomedir is false, this directory is searched for Sieve
+scripts.
+.IP "\fBsievenotifier:\fR <none>" 5
+Notifyd(8) method to use for "SIEVE" notifications. If not set, "SIEVE"
+notifications are disabled.
+.PP
+This method is only used when no method is specified in the script.
+.IP "\fBsieveusehomedir:\fR 0" 5
+If enabled, lmtpd will look for Sieve scripts in user's home
+directories: ~user/.sieve.
+.IP "\fBsingleinstancestore:\fR 1" 5
+If enabled, imapd, lmtpd and nntpd attempt to only write one copy
+of a message per partition and create hard links, resulting in a
+potentially large disk savings.
+.IP "\fBskiplist_unsafe:\fR 0" 5
+If enabled, this option forces the skiplist cyrusdb backend to
+not sync writes to the disk. Enabling this option is NOT RECOMMENDED.
+.IP "\fBsoft_noauth:\fR 1" 5
+If enabled, lmtpd returns temporary failures if the client does not
+successfully authenticate. Otherwise lmtpd returns permanent failures
+(causing the mail to bounce immediately).
+.IP "\fBsrvtab:\fR <empty string>" 5
+The pathname of \fIsrvtab\fR file containing the server's private
+key. This option is passed to the SASL library and overrides its
+default setting.
+.IP "\fBsubmitservers:\fR <none>" 5
+A list of users and groups that are allowed to resolve "urlauth=submit+"
+IMAP URLs, separated by spaces. Any user listed in this will be
+allowed to fetch the contents of any valid "urlauth=submit+" IMAP URL:
+use with caution.
+.IP "\fBsubscription_db:\fR flat" 5
+The cyrusdb backend to use for the subscriptions list.
+
+Allowed values: \fIflat\fR, \fIberkeley\fR, \fIberkeley-hash\fR, \fIskiplist\fR
+.IP "\fBsync_authname:\fR <none>" 5
+The authentication name to use when authenticating to a sync server.
+.IP "\fBsync_host:\fR <none>" 5
+Name of the host (replica running sync_server(8)) to which
+replication actions will be sent by sync_client(8).
+.IP "\fBsync_log:\fR 0" 5
+Enable replication action logging by lmtpd(8), imapd(8), pop3d(8),
+and nntpd(8). The log {configdirectory}/sync/log is used by
+sync_client(8) for "rolling" replication.
+.IP "\fBsync_machineid:\fR -1" 5
+Machine ID of this server which must be unique within a cluster.
+Any negative number, the default, will disable the use of UUIDs for
+replication.
+.IP "\fBsync_password:\fR <none>" 5
+The default password to use when authenticating to a sync server.
+.IP "\fBsync_realm:\fR <none>" 5
+The authentication realm to use when authenticating to a sync server.
+.IP "\fBsync_repeat_interval:\fR 1" 5
+Minimum interval (in seconds) between replication runs in rolling
+replication mode. If a replication run takes longer than this
+time, we repeat immediately.
+.IP "\fBsync_shutdown_file:\fR <none>" 5
+Simple latch used to tell sync_client(8) that it should shut down at the
+next opportunity. Safer than sending signals to running processes
+.IP "\fBsyslog_prefix:\fR <none>" 5
+String to be prepended to the process name in syslog entries.
+.IP "\fBtemp_path:\fR /tmp" 5
+The pathname to store temporary files in
+.IP "\fBtimeout:\fR 30" 5
+The length of the IMAP server's inactivity autologout timer,
+in minutes. The minimum value is 30, the default.
+.IP "\fBtls_ca_file:\fR <none>" 5
+File containing one or more Certificate Authority (CA) certificates.
+.IP "\fBtls_ca_path:\fR <none>" 5
+Path to directory with certificates of CAs. This directory must
+have filenames with the hashed value of the certificate (see
+openssl(XXX)).
+.IP "\fBtlscache_db:\fR berkeley-nosync" 5
+The cyrusdb backend to use for the TLS cache.
+
+Allowed values: \fIberkeley\fR, \fIberkeley-nosync\fR, \fIberkeley-hash\fR, \fIberkeley-hash-nosync\fR, \fIskiplist\fR
+.IP "\fBtls_cert_file:\fR <none>" 5
+File containing the certificate presented for server authentication
+during STARTTLS. A value of "disabled" will disable SSL/TLS.
+.IP "\fBtls_cipher_list:\fR DEFAULT" 5
+The list of SSL/TLS ciphers to allow. The format of the string is
+described in ciphers(1).
+.IP "\fBtls_key_file:\fR <none>" 5
+File containing the private key belonging to the server
+certificate. A value of "disabled" will disable SSL/TLS.
+.IP "\fBtls_require_cert:\fR 0" 5
+Require a client certificate for ALL services (imap, pop3, lmtp, sieve).
+.IP "\fBtls_session_timeout:\fR 1440" 5
+The length of time (in minutes) that a TLS session will be cached
+for later reuse. The maximum value is 1440 (24 hours), the
+default. A value of 0 will disable session caching.
+.IP "\fBumask:\fR 077" 5
+The umask value used by various Cyrus IMAP programs.
+.IP "\fBusername_tolower:\fR 1" 5
+Convert usernames to all lowercase before login/authenticate. This
+is useful with authentication backends which ignore case during
+username lookups (such as LDAP).
+.IP "\fBuserprefix:\fR Other Users" 5
+If using the alternate IMAP namespace, the prefix for the other users
+namespace. The hierarchy delimiter will be automatically appended.
+.IP "\fBunix_group_enable:\fR 1" 5
+Should we look up groups when using auth_unix (disable this if you are
+not using groups in ACLs for your IMAP server, and you are using auth_unix
+with a backend (such as LDAP) that can make getgrent() calls very
+slow)
+.IP "\fBunixhierarchysep:\fR 0" 5
+Use the UNIX separator character '/' for delimiting levels of
+mailbox hierarchy. The default is to use the netnews separator
+character '.'.
+.IP "\fBvirtdomains:\fR off" 5
+Enable virtual domain support. If enabled, the user's domain will
+be determined by splitting a fully qualified userid at the last '@'
+or '%' symbol. If the userid is unqualified, and the virtdomains
+option is set to "on", then the domain will be determined by doing
+a reverse lookup on the IP address of the incoming network
+interface, otherwise the user is assumed to be in the default
+domain (if set).
+
+Allowed values: \fIoff\fR, \fIuserid\fR, \fIon\fR
+
+.SH SEE ALSO
+.PP
+\fBimapd(8)\fR, \fBpop3d(8)\fR, \fBnntpd(8)\fR, \fBlmtpd(8)\fR,
+\fBtimsieved(8)\fR, \fBidled(8)\fR, \fBnotifyd(8)\fR,
+\fBdeliver(8)\fR, \fBmaster(8)\fR, \fBciphers(1)\fR
+
+
+Allowed values: \fIoff\fR, \fIuserid\fR, \fIon\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imclient.3
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imclient.3?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imclient.3 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imclient.3 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,389 @@
+.TH IMCLIENT 3 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1997-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: imclient.3,v 1.10.2.1 2005/04/11 05:48:09 shadow Exp $
+
+.SH NAME
+imclient library - authenticating callback interface to IMAP/IMSP servers
+.SH SYNOPSIS
+.ad l
+.ft B
+#include <cyrus/imclient.h>
+.sp
+.ft
+.if
+.LP
+.ft B
+.BI "int imclient_connect(struct imclient **" imclient ", const char *" host ", const char *" port ");"
+.PP
+.BI "void imclient_close (struct imclient *" imclient ");"
+.sp .025i
+.BI "void imclient_setflags(struct imclient *" imclient ", int" flags ");"
+.sp .025i
+.BI "void imclient_clearflags (struct imclient *" imclient ", int" flags ");"
+.sp .025i
+.BI "char* imclient_servername (struct imclient *" imclient ");"
+.sp .025i
+.B "void imclient_addcallback (struct imclient *" imclient ",...);"
+.sp .025i
+.BI "void imclient_send (struct imclient *" imclient ", void (*" finishproc ")(), void *" finishrock ", const char *" fmt ", ...);"
+.sp .025i
+.BI "void imclient_getselectinfo (struct imclient *" imclient ", int *" fd ", int * " wanttowrite ");"
+.sp .025i
+.BI "void imclient_processoneevent (struct imclient *" imclient ");"
+.sp .025i
+.BI "int imclient_authenticate (struct imclient *" imclient ", struct sasl_client **" availmech ", const char *" service ", const char *" user ", int " protallowed ");"
+.sp .025i
+.BI "int imclient_havetls ();"
+.sp .025i
+.BI "int imclient_starttls (struct imclient *" imclient ", char *" cert_file ", char *" key_file ", char *" CAfile ", char *" CApath ");"
+
+.SH DESCRIPTION
+The imclient library functions are distributed with Cyrus IMAP and IMSP.
+These functions are used for building IMAP/IMSP client software. These
+functions handle Kerberos authentication and can set callbacks based on the
+keyword in untagged replies or based on the command tag at the end of
+command replies.
+
+Users must link with the -lcyrus switch, and must supply a function called
+.I fatal
+to be called in case of any error within
+.I libcyrus.a.
+.PP
+All of the
+.B imclient
+functions begin with the prefix
+.I imclient
+and takes an argument of type
+.B struct imclient *
+as the first argument which is initialized by
+.B imclient_connect
+and freed by
+.B imclient_close.
+
+See below for a description of each function.
+
+.IP \fB\imclient_connect() \fP5
+Connects the client server to the host. If successful, it returns 0
+and sets the imclient argument to a pointer to an
+.B imclient
+struct. The
+.B imclient
+struct represents the current connection, flags, and callbacks. On failure, the current
+.B errno
+is returned if a system call failed, -1 is returned if the host name was not found, and -2 is returned if the service name was not found.
+.IP \fB\imclient_close() \fP5
+Closes and frees the
+.B imclient
+connection.
+.IP \fB\ imclient_setflags() \fP5
+Sets the flags specified by the
+.B flags
+argument on the
+.B imclient
+connection. Currently the only flag allowed is
+.B IMCLIENT_CONN_NONSYNCLITERAL
+(this flag indicates that the server supports non-synchronizing literals described by the LITERAL+ extension).
+.IP \fB\imclient_clearflags() \fP5
+Clears the flags specified by the
+.B flags
+argument on the
+.B imclient
+connection.
+.IP \fB\imclient_servername() \fP5
+Returns a char * pointer to the name of the server connected to by
+.B imclient.
+.IP \fB\imclient_addcallback() \fP5
+Adds an untagged data callback to the
+.B imclient
+connection. The function
+.B imclient_addcallback
+takes callbacks of the type
+.B imclient_proc_t
+which is defined to be:
+.in 1.5i
+typedef void imclient_proc_t (struct imclient *imclient, void *rock, struct imclient_reply *reply);
+.in
+.sp .025i
+and
+.B struct imclient_reply *
+is defined to be:
+.sp .025i
+.in 1.5i
+struct imclient_reply {
+.in
+.in 2i
+ char *keyword;
+ long msgno;
+ char *text;
+.in
+.in 1.5i
+};
+.in
+.sp
+After the first argument
+.B imclient,
+there can be zero or more instances of the set of
+.B keyword,
+.B flags,
+.B proc,
+and
+.B rock,
+each adding or changing a single callback.
+Each instance adds or changes the callback for
+.B keyword.
+The argument,
+.B flags,
+specifies information about the parsing of the untagged data.
+.B proc
+and
+.B rock
+specify the callback function and rock to invoke when the untagged
+data is received.
+.B proc
+may be a null pointer, in which case no function
+is invoked. The callback function may not call the functions
+.B imclient_close(), imclient_send(), imclient_eof(),
+.B imclient_processoneevent(),
+or
+.B imclient_authenticate()
+on the
+connection. The callback function may over write the text of untagged
+data.
+.IP \fB\imclient_send() \fP5
+Sends a new command to the
+.B imclient
+connection.
+.B finishproc
+and
+.B finnishrock
+are the function and rock called when the command completes.
+.B functionproc
+may be a null pointer, in which case no callback is made. The call back function may not call the functions
+.B imclient_close(), imclient_send(), imclient_eof(), imclient_processoneevent(),
+or
+.B imclient_authenticate()
+on the connection.
+The argument,
+.B fmt
+, is a print like specification of the command. It must not include the
+tag as the tag is automatically added by imclient_send().
+The defined %-sequences are:
+.sp .025i
+.in 1.5i
+.B %%
+for %
+.sp .025i
+.B %a
+for an IMAP atom
+.sp .025i
+.B %s
+for an astring (which will be quoted or literalized as needed)
+.sp .025i
+.B %d
+for a decimal
+.sp .025i
+.B %u
+for an unsigned decimal
+.sp .025i
+.B %v
+for #astring (argument is a null-terminated array of
+.B char *
+which are written as space separated astrings)
+.in
+.IP \fB\imclient_getselectinfo() \fP5
+Gets the information for calling
+.B select(2).
+.B fd
+is filled in with the file
+descriptor to
+.B select(2)
+for read.
+.B wanttowrite
+is filled in with a
+nonzero value if select should be used for write as well.
+.IP \fB\imclient_processoneevent() \fP5
+Processes one input or output event on the
+.B imclient
+connection.
+.IP \fB\imclient_authenticate() \fP5
+Authenticates the
+.B imclient
+connection using one of the mechanisms in
+.B availmech.
+The argument,
+.B user,
+if not NULL, specifies the user to
+authenticate as. If the user is NULL, the current user is used. The
+argument
+.B protallowed
+is a bitmask of permissible protection mechanisms.
+.sp .025i
+On success, 0 is returned. On failure (i.e., "BAD" keyboard, or no
+authentication mechanisms worked), 1 is returned. On extreme failure
+(premature "OK"), 2 is returned.
+.IP \fB\imclient_havetls() \fP5
+Returns a Boolean indicating whether the
+.B imclient
+library was compiled with TLS (SSL) support. If so,
+.B imclient_starttls()
+may be used to secure the IMAP connection.
+.IP \fB\imclient_starttls() \fP5
+Issues a STARTTLS command on an existing IMAP connection and
+negotiates the secure link. The
+.B cert_file
+and
+.B key_file
+arguments specify the client certificate and secret key to use to
+authenticate ourselves to the server. If client authentication is not
+needed, set both of these arguments to NULL.
+.sp
+The
+.B CAfile
+and
+.B CApath
+arguments specify a file or directory, respectively, of CA
+certificates for validating server certificates. (See
+.B SSL_CTX_load_verify_locations(3)
+for details.) If both of these are NULL, the client will be unable to
+validate the server's certificate, in which case the connection may
+succeed but a warning will be printed to stdout.
+
+.SH EXAMPLES
+The following code is a possible skeletion of
+.B imclient
+that relies on Kerberos to do authentication. This code preforms an IMAP
+CAPABILITY request and prints out the result.
+.nf
+
+struct sasl_client;
+#include <cyrus/xmalloc.h> /* example uses xstrdup */
+#include <cyrus/sasl.h>
+#include <cyrus/imclient.h>
+#include <stdio.h>
+
+extern struct sasl_client krb_sasl_client;
+
+struct sasl_client *login_sasl_client[] = {
+ &krb_sasl_client,
+ NULL
+};
+struct imclient *imclient;
+char server[] = "cyrus.andrew.cmu.edu" ;
+char port[] = "imap";
+
+void fatal(char* message, int rc) {
+ fprintf(stderr, "fatal error: %s\en", message);
+ exit(rc);
+}
+
+static void callback_capability(struct imclient *imclient,
+ void *rock,
+ struct imclient_reply *reply) {
+ if (reply->text != NULL) {
+ *((char**)rock) = xstrdup( reply->text );
+ }
+}
+
+static void end_command (struct imclient *connection, void*
+ rock, struct imclient_reply *inmsg) {
+ (*(int*)rock)--;
+}
+
+main() {
+ char* capability_string;
+ int nc;
+
+ if (imclient_connect(&imclient, server, port)) {
+ fprintf(stderr,
+ "error: Couldn't connect to %s %s\en",
+ server, port);
+ exit(1);
+ }
+
+ if (imclient_authenticate(imclient, login_sasl_client, "imap"
+ /* service */,
+ NULL /* user */, SASL_PROT_ANY)) {
+ exit(1);
+ }
+
+ imclient_addcallback(imclient, "CAPABILITY",
+ CALLBACK_NOLITERAL,
+ callback_capability,
+ &capability_string,
+ NULL);
+
+ nc = 1;
+
+ imclient_send(imclient, end_command,
+ (void*) &nc, "CAPABILITY");
+
+ while(nc > 0) {
+ imclient_processoneevent(imclient);
+ }
+
+ if (strstr("LITERAL+", capability_string)) {
+ imclient_setflags(imclient, IMCLIENT_CONN_NONSYNCLITERAL);
+ }
+
+ imclient_send(imclient, NULL, NULL, "LOGOUT");
+ imclient_close(imclient);
+
+ printf("capability text is: %s\en", capability_string);
+
+ free(capability_string);
+}
+.fi
+
+.SH BUGS
+No known bugs.
+
+.SH SEE ALSO
+.B cyradm, imapd, imspd,
+RFC2033 (IMAP LITERAL+ extension), RFC2060 (IMAP4rev1 specification), and
+.B select(2)
+
+.SH KEYWORDS
+IMAP, ACAP, IMSP, Kerberos, Authentication
+
+.SH COPYRIGHT
+Copyright 1997-2002, Carnegie Mellon University. All Rights Reserved.
+
+See the source distribution for copying information.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imtest.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imtest.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imtest.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/imtest.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,215 @@
+.\" -*- nroff -*-
+.TH IMTEST 1 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: imtest.1,v 1.13.2.1 2004/12/16 15:49:58 ken3 Exp $
+.SH NAME
+imtest \- interactive IMAP test program
+.SH SYNOPSIS
+.B imtest
+[
+.B \-t
+.I keyfile
+]
+[
+.B \-p
+.I port
+]
+[
+.B \-m
+.I mechanism
+]
+.br
+ [
+.B \-a
+.I userid
+]
+[
+.B \-u
+.I userid
+]
+[
+.B \-k
+.I num
+]
+[
+.B \-l
+.I num
+]
+.br
+ [
+.B \-r
+.I realm
+]
+[
+.B \-f
+.I file
+]
+[
+.B \-n
+.I num
+]
+[
+.B \-s
+]
+[
+.B \-c
+]
+.br
+ [
+.B \-i
+]
+[
+.B \-z
+]
+[
+.B \-v
+]
+[
+.B \-I
+.I file
+]
+[
+.B \-x
+.I file
+]
+.br
+ [
+.B \-X
+.I file
+]
+[
+.B \-o
+\fIoption\fB=\fIvalue\fR
+]
+\fIhostname\fR
+.SH DESCRIPTION
+.I imtest
+is a utility that allows you to authenticate to a IMAP or IMSP server
+and interactively issue commands to it. Once authenticated you may
+issue any IMAP or IMSP command by simply typing it in. It is capable
+of multiple SASL authentication mechanisms and handles encryption
+layers transparently. This utility is often used for testing the
+operation of a imsp or imap server. Also those developing IMAP clients
+find it useful.
+.PP
+.SH OPTIONS
+.TP
+.BI \-t " keyfile"
+Enable TLS. \fIkeyfile\fR contains the TLS public and private keys.
+Specify \fB""\fR to negotiate a TLS encryption layer but not use TLS
+authentication.
+.TP
+.BI \-p " port"
+Port to connect to. If left off this defaults to \fBimap\fR as defined in
+/etc/services.
+.TP
+.BI -m " mechanism"
+Force imtest to use \fImechanism\fR for authentication. If not specified
+the strongest authentication mechanism supported by the server is
+chosen. Specify \fBlogin\fR to use the LOGIN command instead of AUTHENTICATE.
+.TP
+.BI -a " userid"
+Userid to use for authentication; defaults to the current user.
+This is the userid whose password or credentials will be presented to
+the server for verification.
+.TP
+.BI -u " userid"
+Userid to use for authorization; defaults to the current user.
+This is the userid whose identity will be assumed after authentication.
+\fBNOTE:\fR This is only used with SASL mechanisms that allow proxying
+(e.g. PLAIN, DIGEST-MD5).
+.TP
+.BI -k " num"
+Minimum protection layer required.
+.TP
+.BI -l " num"
+Maximum protection layer to use (\fB0\fR=none; \fB1=\fRintegrity;
+etc). For example if you are using the KERBEROS_V4 authentication
+mechanism specifying \fB0\fR will force imtest to not use any layer
+and specifying \fB1\fR will force it to use the integrity layer. By
+default the maximum supported protection layer will be used.
+.TP
+.BI -r " realm"
+Specify the \fIrealm\fR to use. Certain authentication mechanisms
+(e.g. DIGEST-MD5) may require one to specify the realm.
+.TP
+.BI -f " file"
+Pipe \fIfile\fR into connection after authentication.
+.TP
+.BI -n " num"
+Number of authentication attempts; default = 1. The client will
+attempt to do SSL/TLS session reuse and/or fast reauth
+(e.g. DIGEST-MD5), if possible.
+.TP
+.B -s
+Enable IMAP over SSL (imaps).
+.TP
+.B -c
+Enable challenge prompt callbacks. This will cause the OTP mechanism
+to ask for the the one-time password instead of the secret pass-phrase
+(library generates the correct response).
+.TP
+.B -i
+Don't send an initial client response for SASL mechanisms, even if the
+protocol supports it.
+.TP
+.BI -I " file"
+Echo the PID of the running process into
+.I file
+(This can be useful with -X).
+.TP
+.BI -x " file"
+Open the named socket for the interactive portion
+.TP
+.BI -X " file"
+Like -x, only close all file descriptors & daemonize the process.
+.TP
+\fB-o \fIoption\fB=\fIvalue\fR
+Set the SASL \fIoption\fR to \fIvalue\fR.
+.TP
+.B -v
+Verbose. Print out more information than usual.
+.TP
+.B -z
+Timing test.
+.SH SEE ALSO
+.PP
+\fBimapd(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/installsieve.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/installsieve.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/installsieve.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/installsieve.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,91 @@
+.\" -*- nroff -*-
+.TH INSTALLSIEVE 1 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: installsieve.1,v 1.5 2002/05/25 19:57:48 leg Exp $
+.SH NAME
+installsieve \- user utility for managing sieve scripts
+.SH SYNOPSIS
+.B installsieve
+.SH DESCRIPTION
+.I installsieve
+is a utility that allows users to manage their sieve scripts kept on
+the server.
+
+.PP
+.SH OPTIONS
+
+.I -v <name>
+View script with the given name. The script if retrieved sucessfully
+is output to standard output.
+
+.I -l
+List all of the scripts currently on the server. If one of the scripts
+is active a arrow is printed indicating that it is the active script.
+
+.I -p <port>
+Port to connect to. If left off this defaults to "sieve" as defined in
+/etc/services.
+
+.I -i <file>
+Install a file onto the server. If a script with the same name already
+exists on the server it is overwritten. Upon sucessfully putting the
+script on the server the script is set active. If <file> has the
+extension .script it is chopped when put on the server since sieve
+names may not contain a '.'.
+
+.I -a <name>
+Set <name> as the active script. The list of available names can be
+obtained from the '-l' option..
+
+.I -d <name>
+Delete the sieve script on the server with <name>.
+
+.I -m <mechanism>
+Force installsieve to use <mechanism> for authentication. If not
+specified the strongest authentication mechanism is chosen.
+
+.I -g <name>
+Get the sieve script with <name> and save it to disk with a ".script"
+extension. If a file with that name already exists it is
+overwritten.
+
+.I -u <user>
+Userid/Authname to use for authentication; by default, the current user.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ipurge.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ipurge.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ipurge.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/ipurge.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,133 @@
+.\" -*- nroff -*-
+.TH IPURGE 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: ipurge.8,v 1.7.2.1 2003/12/19 18:33:46 ken3 Exp $
+.SH NAME
+ipurge \- delete mail from IMAP mailbox or partition based on age or size
+.SH SYNOPSIS
+.B ipurge
+[
+.B \-f
+]
+[
+.B \-C
+.I config-file
+]
+[
+.B \-x
+]
+[
+.B \-X
+]
+[
+.B \-i
+]
+[
+.B \-s
+]
+.br
+ [
+.BI \-d " days"
+|
+.BI \-b " bytes"
+|
+.BI \-k " Kbytes"
+|
+.BI \-m " Mbytes"
+]
+.br
+ [
+.IR mailbox-pattern ...
+]
+.SH DESCRIPTION
+.I Ipurge
+deletes messages from the mailbox(es) specified by
+\fImailbox-pattern\fR that are older or larger than specified by the
+\fB-d\fR, \fB-b\fR, \fB-k\fR or \fB-m\fR options. If no
+\fImailbox-pattern\fR is given, \fIipurge\fR works on all mailboxes. If the
+\fB-x\fR option is given, the message age and size MUST match exactly
+those specified by \fB-d\fR, \fB-b\fR, \fB-k\fR or \fB-m\fR. The are
+no default values, and at least one of \fB-d\fR, \fB-b\fR, \fB-k\fR or
+\fB-m\fR MUST be specified.
+.PP
+.I Ipurge
+by default only deletes mail below shared folders, which means that mails
+in mailbox(es) below INBOX.* and user.* stay untouched. Use the option
+\fB-f\fR to also delete mail in mailbox(es) below these folders.
+.PP
+.I Ipurge
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-f
+Force deletion of mail in \fIall\fR mailboxes.
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-d " days"
+Age of message in \fIdays\fR.
+.TP
+.BI \-b " bytes"
+Size of message in \fIbytes\fR.
+.TP
+.BI \-k " Kbytes"
+Size of message in \fIKbytes\fR (2^10 bytes).
+.TP
+.BI \-m " Mbytes"
+Size of message in \fIMbytes\fR (2^20 bytes).
+.TP
+.B \-x
+Perform an exact match on age or size (instead of older or larger).
+.TP
+.B \-X
+Use delivery time instead of Date: header for date matches
+.TP
+.B \-i
+Invert match logic: -x means not equal, date is for newer, size is for smaller
+.TP
+.B \-s
+Skip over messages that have the \\Flagged flag set.
+.SH FILES
+.TP
+.B /etc/imapd.conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/krb.equiv.5
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/krb.equiv.5?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/krb.equiv.5 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/krb.equiv.5 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,63 @@
+.\" -*- nroff -*-
+.TH KRB.EQUIV 5 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: krb.equiv.5,v 1.10 2003/10/22 18:50:13 rjs3 Exp $
+.SH NAME
+\fB/etc/krb.equiv\fR \- Kerberos equivalences
+.SH DESCRIPTION
+.I krb.equiv
+contains zero or more lines, each of which describes a mapping of a kerberos
+principal (\fIuserid at host\fR) to a local user (\fIuserid\fR or alias).
+Each line of the file consists of two fields,
+separated by at least one whitespace character; other blanks are
+ignored. The first field is the kerberos principal name to
+remap, and the second is the name of the corresponding local user.
+.SH SAMPLE FILE
+.PP
+.nf
+tyq4 at ANDY.CMU.EDU tyq4
+tyq4 at DEANNA.ORG tyq4
+ty347 at ECE.CMU.EDU tyq4
+jj12 at ANDY.CMU.EDU tick
+tick at DEANNA.ORG tick
+jy9o at ANDY.CMU.EDU jyager
+jyager at CS.CMU.EDU jyager
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtpd.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtpd.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtpd.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtpd.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,104 @@
+.\" -*- nroff -*-
+.TH LMTPD 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: lmtpd.8,v 1.6 2002/10/03 19:02:41 ken3 Exp $
+.SH NAME
+lmtpd \- LMTP server process
+.SH SYNOPSIS
+.B lmtpd
+[
+.B \-C
+.I config-file
+]
+[
+.B \-U
+.I uses
+]
+[
+.B \-T
+.I timeout
+]
+[
+.B \-D
+]
+.br
+ [
+.B \-a
+]
+.SH DESCRIPTION
+.I Lmtpd
+is an LMTP server used to deliver mail to the IMAP mailstore.
+It accepts commands on its standard input and responds on its standard output.
+It MUST be invoked by
+.IR master (8)
+with those descriptors attached to a remote client connection.
+.PP
+.I Lmtpd
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-U " uses"
+The maximum number of times that the process should be used for new
+connections before shutting down. The default is 250.
+.TP
+.BI \-T " timeout"
+The number of seconds that the process will wait for a new connection
+before shutting down. Note that a value of 0 (zero) will disable the
+timeout. The default is 60.
+.TP
+.BI \-D
+Run external debugger specified in debug_command.
+.TP
+.BI \-a
+Preauthorize connections initiated on an internet socket, instead of
+requiring LMTP AUTH. This should only be used for connections coming
+from trusted hosts.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtptest.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtptest.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtptest.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/lmtptest.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,179 @@
+.\" -*- nroff -*-
+.TH LMTPTEST 1 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: lmtptest.1,v 1.6.2.1 2004/12/16 15:49:59 ken3 Exp $
+.SH NAME
+lmtptest \- interactive LMTP test program
+.SH SYNOPSIS
+.B lmtptest
+[
+.B \-t
+.I keyfile
+]
+[
+.B \-p
+.I port
+]
+[
+.B \-m
+.I mechanism
+]
+.br
+ [
+.B \-a
+.I userid
+]
+[
+.B \-u
+.I userid
+]
+[
+.B \-k
+.I num
+]
+[
+.B \-l
+.I num
+]
+.br
+ [
+.B \-r
+.I realm
+]
+[
+.B \-f
+.I file
+]
+[
+.B \-n
+.I num
+]
+[
+.B \-c
+]
+.br
+ [
+.B \-i
+]
+[
+.B \-o
+\fIoption\fB=\fIvalue\fR
+]
+[
+.B \-v
+]
+\fIhostname\fR
+.SH DESCRIPTION
+.I lmtptest
+is a utility that allows you to authenticate to a LMTP server
+and interactively issue commands to it. Once authenticated you may
+issue any LMTP command by simply typing it in. It is capable
+of multiple SASL authentication mechanisms and handles encryption
+layers transparently. This utility is often used for testing the
+operation of a lmtp server. Also those developing LMTP clients
+find it useful.
+.PP
+.SH OPTIONS
+.TP
+.BI \-t " keyfile"
+Enable TLS. \fIkeyfile\fR contains the TLS public and private keys.
+Specify \fB""\fR to negotiate a TLS encryption layer but not use TLS
+authentication.
+.TP
+.BI \-p " port"
+Port to connect to. If left off this defaults to \fBlmtp\fR as defined
+in /etc/services.
+.TP
+.BI -m " mechanism"
+Force lmtptest to use \fImechanism\fR for authentication. If not specified
+the strongest authentication mechanism supported by the server is
+chosen.
+.TP
+.BI -a " userid"
+Userid to use for authentication; defaults to the current user.
+This is the userid whose password or credentials will be presented to
+the server for verification.
+.TP
+.BI -u " userid"
+Userid to use for authorization; defaults to the current user.
+This is the userid whose identity will be assumed after authentication.
+\fBNOTE:\fR This is only used with SASL mechanisms that allow proxying
+(e.g. PLAIN, DIGEST-MD5).
+.TP
+.BI -k " num"
+Minimum protection layer required.
+.TP
+.BI -l " num"
+Maximum protection layer to use (\fB0\fR=none; \fB1=\fRintegrity;
+etc). For example if you are using the KERBEROS_V4 authentication
+mechanism specifying \fB0\fR will force lmtptest to not use any layer
+and specifying \fB1\fR will force it to use the integrity layer. By
+default the maximum supported protection layer will be used.
+.TP
+.BI -r " realm"
+Specify the \fIrealm\fR to use. Certain authentication mechanisms
+(e.g. DIGEST-MD5) may require one to specify the realm.
+.TP
+.BI -f " file"
+Pipe \fIfile\fR into connection after authentication.
+.TP
+.BI -n " num"
+Number of authentication attempts; default = 1. The client will
+attempt to do SSL/TLS session reuse and/or fast reauth
+(e.g. DIGEST-MD5), if possible.
+.TP
+.B -c
+Enable challenge prompt callbacks. This will cause the OTP mechanism
+to ask for the the one-time password instead of the secret pass-phrase
+(library generates the correct response).
+.TP
+.B -i
+Don't send an initial client response for SASL mechanisms, even if the
+protocol supports it.
+.TP
+\fB-o \fIoption\fB=\fIvalue\fR
+Set the SASL \fIoption\fR to \fIvalue\fR.
+.TP
+.B -v
+Verbose. Print out more information than usual.
+.SH SEE ALSO
+.PP
+\fBlmtpd(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/make_md5.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/make_md5.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/make_md5.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/make_md5.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,75 @@
+.\" -*- nroff -*-
+.TH MAKE_MD5 HERMES 8
+.SH NAME
+make_md5 \- Generate MD5 checksums for given set of users.
+.SH SYNOPSIS
+.B make_md5
+[
+.B \-C
+.I config-file
+]
+[
+.B \-D
+.I md5_dir
+]
+[
+.B \-k
+.I count
+]
+[
+.B \-f
+.I input_file
+]
+[
+.B \-m
+.I offset
+]
+[
+.B \-M
+.I modulo
+]
+[
+.B \-v
+]
+[
+.IR userid ...
+]
+.SH DESCRIPTION
+Generate MD5 checksums for messages given set of users. Works as
+incremental update: reads in existing set of md5 checksums from
+\fImd5_dir/u/userid\fR (hashed on first letter of userid) if that file
+exists. Scans account looking for new messages, and then updates record.
+
+The MD5 checksums which are generated are used to test integrity of the
+master, replica and backup systems on Hermes.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-D " md5_dir"
+Read and write md5 checksums from \fImd5_dir\fR, overrides configuration
+file setting of the same name.
+.TP
+.BI \-k " count"
+Concurrency level: run up to
+.I count
+asynchronous child processes.
+.TP
+.BI \-f " input_file"
+List of accounts to process: use in place of command line arguments.
+.TP
+.BI \-m " offset"
+Regenerate given fraction of the user database in combination with \-M below.
+.TP
+.BI \-M " modulo"
+Regenerate MD5 checksums for given fraction of user database. Allows for
+rolling consisency checks.
+.TP
+.BI \-v
+Verbose mode.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH AUTHORS
+David Carter (dpc22 at cam.ac.uk)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/master.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/master.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/master.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/master.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,155 @@
+.\" -*- nroff -*-
+.TH MASTER 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1996-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: master.8,v 1.10.2.3 2004/12/17 18:15:18 ken3 Exp $
+.SH NAME
+master \- master Cyrus process
+.SH SYNOPSIS
+.B master
+[
+.B \-C
+.I alternate imapd.conf
+]
+[
+.B \-M
+.I alternate cyrus.conf
+]
+[
+.B \-l
+.I listen queue
+]
+[
+.B \-p
+.I pidfile
+]
+[
+.B \-P
+.I snmp agentx ping interval
+]
+[
+.B \-j
+.I janitor period
+]
+[
+.B \-d
+]
+[
+.B \-D
+]
+[
+.B \-x
+.I snmp agentx socket
+]
+.SH DESCRIPTION
+.I Master
+is the process that controls all of the Cyrus processes. This process
+is responsible for creating all imapd, pop3d, lmtpd and sieved child
+processes. This process also initializes the Berkeley DB code and
+performs scheduled cleanup/maintenance.
+.PP
+If this process dies, then no new sessions will be started.
+.PP
+It kills itself and all child processes
+when it receives a SIGTERM.
+.SH OPTIONS
+.TP
+.BI \-C " alternate imapd.conf"
+Specifies an alternate imapd.conf for use by master (note that this will
+not affect any sub-processes spawned by master, you should specify those
+specifically in the respective entries in cyrus.conf).
+.TP
+.BI \-M " alternate cyrus.conf"
+Specifies an alternate cyrus.conf for use by master.
+.TP
+.BI \-l " listen queue backlog"
+Increase the listen queue backlog. By default, the listen queue is set
+to 32. On systems with a high connection rate, it may be desirable
+to increase this value. refer to \fBlisten(2)\fR for details.
+.TP
+.BI \-j " janitor full-sweeps per second"
+Sets the amount of times per second the janitor should sweep the entire
+child table. Leave it at the default of 1 unless you have a really high
+fork rate (and you have not increased the child hash table size when you
+compiled Cyrus from its default of 10000 entries).
+.TP
+.BI \-p " pidfile"
+Use
+.I pidfile
+as the pidfile. If not specified, defaults to /var/run/cyrus-master.pid
+.TP
+.BI \-P " snmp agentx ping interval"
+Sets the amount on time in seconds the subagent will try and reconnect to the
+master agent (snmpd) if it ever becomes (or starts) disconnected. Requires
+net-snmp 5.0 or higher.
+.TP
+.BI \-d
+Start in daemon mode (run in background and disconnect from controlling
+terminal).
+.TP
+.BI \-D
+Don't close stdin/stdout/stderr. Primiarly useful for debugging.
+.TP
+.BI \-x " snmp agentx socket"
+Address the master agent (most likely snmpd) listens on.
+Requires net-snmp 5.0 or higher.
+.SH CONFIGURATION
+Upon execution,
+.I master
+reads its configuration information out of the
+.IR cyrus.conf (5)
+file.
+.PP
+.I Master
+rereads its configuration file when it receives a hangup signal,
+SIGHUP. Services and events may be added, deleted or modified when the
+configuration file is reread. Any active services removed from the
+configuration file will be allowed to run until completion.
+.SH NOTES
+The environment variable \fBCYRUS_VERBOSE\fR can be set to log additional
+debugging information. Setting the value to 1 results in base level logging.
+Setting it higher results in more log messages being generated.
+.SH FILES
+.TP
+.B /etc/cyrus.conf, /etc/imapd.conf, /var/run/cyrus-master.pid
+.SH SEE ALSO
+.PP
+\fBcyrus.conf(5)\fR, \fBimapd.conf(5)\fR, \fBimapd(8)\fR,
+\fBpop3d(8)\fR, \fBlmtpd(8)\fR, \fBtimsieved(8)\fR, \fBidled(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbexamine.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbexamine.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbexamine.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbexamine.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+.\" -*- nroff -*-
+.TH MBEXAMINE 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: mbexamine.8,v 1.3 2003/08/09 23:43:14 rjs3 Exp $
+.SH NAME
+mbexamine \- examine a cyrus-format mailbox
+.SH SYNOPSIS
+.B mbexamine
+[
+.B \-C
+.I config-file
+]
+[
+.B \-u uid
+]
+.IR mailbox ...
+.br
+.B mbexamine
+[
+.B \-C
+.I config-file
+]
+[
+.B \-s seqnum
+]
+.IR mailbox ...
+.br
+.SH DESCRIPTION
+.I Mbexamine
+will examine the header, index, and cache files of a cyrus format mailbox
+and dump the information contained therein. It can also limit its output
+to a specific uid or sequence number, through use of the -s and -u switches.
+.I Mbexamine
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR. It uses the mboxlist database
+to locate the mailbox on disk.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.B \-s
+Dump information for the given sequence number only.
+.TP
+.B \-u
+Dump information for the given uid only.
+.SH FILES
+.B /etc/imapd.conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbpath.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbpath.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbpath.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mbpath.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,89 @@
+.\" -*- nroff -*-
+.TH MBPATH 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: mbpath.8,v 1.5.4.1 2004/04/08 21:13:12 ken3 Exp $
+.SH NAME
+mbpath \- translate mailbox names to filesystem paths
+.SH SYNOPSIS
+.B mbpath
+[
+.B \-C
+.I config-file
+]
+[
+.B \-q
+]
+[
+.B \-s
+]
+[
+.B \-m
+]
+[
+.IR mailbox-names ...
+]
+.SH DESCRIPTION
+Given a mailbox name or a space separated list of mailbox names,
+.I mbpath
+outputs the filesystem path to the mailbox.
+.PP
+.I Mbpath
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.PP
+.I \-q
+suppress any error output.
+.PP
+.I \-s
+if any error occurs, stop processing the list of mailboxes and exit.
+.PP
+.I \-m
+output the path to the metadata files (if different from the message files).
+.SH FILES
+.TP
+.B /etc/imapd.conf
+
+.\" $Header: /cvs/src/cyrus/man/mbpath.8,v 1.5.4.1 2004/04/08 21:13:12 ken3 Exp $
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mupdatetest.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mupdatetest.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mupdatetest.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/mupdatetest.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,170 @@
+.\" -*- nroff -*-
+.TH MUPDATETEST 1 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: mupdatetest.1,v 1.5.2.1 2004/12/16 15:49:59 ken3 Exp $
+.\"
+.SH NAME
+mupdatetest \- interactive MUPDATE test program
+.SH SYNOPSIS
+.B mupdatetest
+[
+.B \-p
+.I port
+]
+[
+.B \-m
+.I mechanism
+]
+.br
+ [
+.B \-a
+.I userid
+]
+[
+.B \-u
+.I userid
+]
+[
+.B \-k
+.I num
+]
+[
+.B \-l
+.I num
+]
+.br
+ [
+.B \-r
+.I realm
+]
+[
+.B \-f
+.I file
+]
+[
+.B \-n
+.I num
+]
+[
+.B \-c
+]
+.br
+ [
+.B \-i
+]
+[
+.B \-o
+\fIoption\fB=\fIvalue\fR
+]
+[
+.B \-v
+]
+\fIhostname\fR
+.SH DESCRIPTION
+.I mupdatetest
+is a utility that allows you to authenticate to a MUPDATE server
+and interactively issue commands to it. Once authenticated you may
+issue any MUPDATE command by simply typing it in. It is capable
+of multiple SASL authentication mechanisms and handles encryption
+layers transparently. This utility is often used for testing the
+operation of a mupdate server. Note that you must be an admin in order
+to authenticate to an mupdate server.
+.PP
+.SH OPTIONS
+.TP
+.BI \-p " port"
+Port to connect to. If left off this defaults to \fBmupdate\fR as defined
+in /etc/services.
+.TP
+.BI -m " mechanism"
+Force mupdatetest to use \fImechanism\fR for authentication. If not specified
+the strongest authentication mechanism supported by the server is
+chosen.
+.TP
+.BI -a " userid"
+Userid to use for authentication; defaults to the current user.
+This is the userid whose password or credentials will be presented to
+the server for verification.
+.TP
+.BI -u " userid"
+Userid to use for authorization; defaults to the current user.
+This is the userid whose identity will be assumed after authentication.
+\fBNOTE:\fR This is only used with SASL mechanisms that allow proxying
+(e.g. PLAIN, DIGEST-MD5).
+.TP
+.BI -k " num"
+Minimum protection layer required.
+.TP
+.BI -l " num"
+Maximum protection layer to use (\fB0\fR=none; \fB1=\fRintegrity;
+etc). For example if you are using the KERBEROS_V4 authentication
+mechanism specifying \fB0\fR will force mupdatetest to not use any layer
+and specifying \fB1\fR will force it to use the integrity layer. By
+default the maximum supported protection layer will be used.
+.TP
+.BI -r " realm"
+Specify the \fIrealm\fR to use. Certain authentication mechanisms
+(e.g. DIGEST-MD5) may require one to specify the realm.
+.TP
+.BI -f " file"
+Pipe \fIfile\fR into connection after authentication.
+.TP
+.BI -n " num"
+Number of authentication attempts; default = 1. The client will
+attempt to fast reauth (e.g. DIGEST-MD5), if possible.
+.TP
+.B -c
+Enable challenge prompt callbacks. This will cause the OTP mechanism
+to ask for the the one-time password instead of the secret pass-phrase
+(library generates the correct response).
+.TP
+.B -i
+Don't send an initial client response for SASL mechanisms, even if the
+protocol supports it.
+.TP
+\fB-o \fIoption\fB=\fIvalue\fR
+Set the SASL \fIoption\fR to \fIvalue\fR.
+.TP
+.B -v
+Verbose. Print out more information than usual.
+.SH SEE ALSO
+.PP
+\fBmupdate(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntpd.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntpd.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntpd.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntpd.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,156 @@
+.\" -*- nroff -*-
+.TH NNTPD 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: nntpd.8,v 1.2.2.1 2006/05/26 15:50:11 murch Exp $
+.SH NAME
+nntpd \- NNTP server process
+.SH SYNOPSIS
+.B nntpd
+[
+.B \-C
+.I config-file
+]
+[
+.B \-U
+.I uses
+]
+[
+.B \-T
+.I timeout
+]
+[
+.B \-D
+]
+.br
+ [
+.B \-s
+]
+[
+.B \-r
+]
+[
+.B \-f
+]
+[
+.B \-p
+.I ssf
+]
+.SH DESCRIPTION
+.I Nntpd
+is a NNTP server.
+It accepts commands on its standard input and responds on its standard output.
+It MUST invoked by
+.IR master (8)
+with those descriptors attached to a remote client connection.
+.PP
+.I Nntpd
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR. The optional
+.I newsprefix
+option specifies a prefix to be prepended to newsgroup names to make
+the corresponding IMAP mailbox names. The optional
+.I newspostuser
+option specifies the special userid to be used when contructing the To:
+header address for following up to articles when read via IMAP. The
+optional
+.I newspeer
+option specifies the fully qualified hostname of the upstream news
+server to which articles are fed. The optional
+.I allownewnews
+option enables the NNTP NEWNEWS command. NOTE: For servers with a large
+volume of articles, the NEWNEWS command can be expensive.
+.PP
+If the directory
+.RI log/ user
+exists under the directory specified in the
+.I configdirectory
+configuration option, then
+.I nntpd
+will create protocol telemetry logs for sessions authenticating as
+.IR user .
+The telemetry logs will be stored in the
+.RI log/ user
+directory with a filename of the
+.I nntpd
+process-id.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-U " uses"
+The maximum number of times that the process should be used for new
+connections before shutting down. The default is 250.
+.TP
+.BI \-T " timeout"
+The number of seconds that the process will wait for a new connection
+before shutting down. Note that a value of 0 (zero) will disable the
+timeout. The default is 60.
+.TP
+.BI \-D
+Run external debugger specified in debug_command.
+.TP
+.BI \-s
+Serve NNTP over SSL (nntps). All data to and from
+.I nntpd
+is encrypted using the Secure Sockets Layer.
+.TP
+.BI \-r
+Only allow NNTP reader commands. Permitted clients will only be
+allowed to read/post articles.
+.TP
+.BI \-f
+Only allow NNTP feeder commands. Permitted clients will only be
+allowed to feed articles (no reading).
+.TP
+.BI \-p " ssf"
+Tell
+.I nntpd
+that an external layer exists. An SSF (security strength factor) of 1
+means an integrity protection layer exists. Any higher SSF implies
+some form of privacy protection.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntptest.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntptest.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntptest.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/nntptest.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,186 @@
+.\" -*- nroff -*-
+.TH NNTPTEST 1 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: nntptest.1,v 1.2.2.1 2004/12/16 15:49:59 ken3 Exp $
+.SH NAME
+nntptest \- interactive NNTP test program
+.SH SYNOPSIS
+.B nntptest
+[
+.B \-t
+.I keyfile
+]
+[
+.B \-p
+.I port
+]
+[
+.B \-m
+.I mechanism
+]
+.br
+ [
+.B \-a
+.I userid
+]
+[
+.B \-u
+.I userid
+]
+[
+.B \-k
+.I num
+]
+[
+.B \-l
+.I num
+]
+.br
+ [
+.B \-r
+.I realm
+]
+[
+.B \-f
+.I file
+]
+[
+.B \-n
+.I num
+]
+[
+.B \-s
+]
+[
+.B \-c
+]
+.br
+ [
+.B \-i
+]
+[
+.B \-o
+\fIoption\fB=\fIvalue\fR
+]
+[
+.B \-v
+]
+\fIhostname\fR
+.SH DESCRIPTION
+.I nntptest
+is a utility that allows you to authenticate to a NNTP server
+and interactively issue commands to it. Once authenticated you may
+issue any NNTP command by simply typing it in. It is capable
+of multiple SASL authentication mechanisms and handles encryption
+layers transparently. This utility is often used for testing the
+operation of a nntp server. Also those developing NNTP clients
+find it useful.
+.PP
+.SH OPTIONS
+.TP
+.BI \-t " keyfile"
+Enable TLS. \fIkeyfile\fR contains the TLS public and private keys.
+Specify \fB""\fR to negotiate a TLS encryption layer but not use TLS
+authentication.
+.TP
+.BI \-p " port"
+Port to connect to. If left off this defaults to \fBnntp\fR as defined in
+/etc/services.
+.TP
+.BI -m " mechanism"
+Force nntptest to use \fImechanism\fR for authentication. If not specified
+the strongest authentication mechanism supported by the server is
+chosen. Specify \fBuser\fR to use the AUTHINFO USER/PASS commands
+instead of AUTHINFO SASL.
+.TP
+.BI -a " userid"
+Userid to use for authentication; defaults to the current user.
+This is the userid whose password or credentials will be presented to
+the server for verification.
+.TP
+.BI -u " userid"
+Userid to use for authorization; defaults to the current user.
+This is the userid whose identity will be assumed after authentication.
+\fBNOTE:\fR This is only used with SASL mechanisms that allow proxying
+(e.g. PLAIN, DIGEST-MD5).
+.TP
+.BI -k " num"
+Minimum protection layer required.
+.TP
+.BI -l " num"
+Maximum protection layer to use (\fB0\fR=none; \fB1=\fRintegrity;
+etc). For example if you are using the KERBEROS_V4 authentication
+mechanism specifying \fB0\fR will force nntptest to not use any layer
+and specifying \fB1\fR will force it to use the integrity layer. By
+default the maximum supported protection layer will be used.
+.TP
+.BI -r " realm"
+Specify the \fIrealm\fR to use. Certain authentication mechanisms
+(e.g. DIGEST-MD5) may require one to specify the realm.
+.TP
+.BI -f " file"
+Pipe \fIfile\fR into connection after authentication.
+.TP
+.BI -n " num"
+Number of authentication attempts; default = 1. The client will
+attempt to do SSL/TLS session reuse and/or fast reauth
+(e.g. DIGEST-MD5), if possible.
+.TP
+.B -s
+Enable NNTP over SSL (nntps).
+.TP
+.B -c
+Enable challenge prompt callbacks. This will cause the OTP mechanism
+to ask for the the one-time password instead of the secret pass-phrase
+(library generates the correct response).
+.TP
+.B -i
+Don't send an initial client response for SASL mechanisms, even if the
+protocol supports it.
+.TP
+\fB-o \fIoption\fB=\fIvalue\fR
+Set the SASL \fIoption\fR to \fIvalue\fR.
+.TP
+.B -v
+Verbose. Print out more information than usual.
+.SH SEE ALSO
+.PP
+\fBnntpd(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/notifyd.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/notifyd.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/notifyd.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/notifyd.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,125 @@
+.\" -*- nroff -*-
+.TH NOTIFYD 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: notifyd.8,v 1.7 2003/08/09 23:43:14 rjs3 Exp $
+.SH NAME
+notifyd \- Cyrus notification server
+.SH SYNOPSIS
+.B notifyd
+[
+.B \-C
+.I config-file
+]
+[
+.B \-U
+.I uses
+]
+[
+.B \-T
+.I timeout
+]
+.br
+ [
+.B \-D
+]
+.SH DESCRIPTION
+.B Notifyd
+is a daemon started from master(8) that handles notification requests on
+behalf of lmtpd(8).
+.B Notifyd
+accepts the request and performs the notification using the method
+specified in the request.
+.PP
+Note that for
+.B notifyd
+to run properly you must set proto=udp in its cyrus.conf
+services entry. prefork=1 is also recommended.
+.PP
+.B Notifyd
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+The
+.I notifysocket
+option is used to specify the Unix domain socket to listen on for
+notifications.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-U " uses"
+The maximum number of times that the process should be used for new
+connections before shutting down. The default is 250.
+.TP
+.BI \-T " timeout"
+The number of seconds that the process will wait for a new connection
+before shutting down. Note that a value of 0 (zero) will disable the
+timeout. The default is 60.
+.TP
+.BI \-D
+Run external debugger specified in debug_command.
+.SH NOTIFICATION METHODS
+.TP
+.B null
+Ignore the notification request.
+.TP
+.B log
+Log the notification to syslog (for testing).
+.TP
+.B mailto
+Email the notification. This method can ONLY be used in a
+Sieve 'notify' action as it requires a \fImailto:\fR URL to be
+specified as an \fI:option\fR.
+.TP
+.B zephyr
+Send the notification as a zephyrgram. If used in a Sieve 'notify'
+action, additional recipients can be specified as \fI:options\fR.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+Default configuration file.
+.TP
+.B /etc/cyrus.conf
+Cyrus Master process configuration file.
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBcyrus.conf\fR, \fBmaster(8)\fR, \fBlmtpd(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3d.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3d.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3d.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3d.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,135 @@
+.\" -*- nroff -*-
+.TH POP3D 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: pop3d.8,v 1.13.4.1 2006/05/26 15:50:12 murch Exp $
+.SH NAME
+pop3d \- POP3 server process
+.SH SYNOPSIS
+.B pop3d
+[
+.B \-C
+.I config-file
+]
+[
+.B \-U
+.I uses
+]
+[
+.B \-T
+.I timeout
+]
+[
+.B \-D
+]
+.br
+ [
+.B \-s
+]
+[
+.B \-k
+]
+[
+.B \-p
+.I ssf
+]
+.SH DESCRIPTION
+.I Pop3d
+is a POP3 server.
+It accepts commands on its standard input and responds on its standard output.
+It MUST invoked by
+.IR master (8)
+with those descriptors attached to a remote client connection.
+.PP
+.I Pop3d
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.PP
+If the directory
+.RI log/ user
+exists under the directory specified in the
+.I configdirectory
+configuration option, then
+.I pop3d
+will create protocol telemetry logs for sessions authenticating as
+.IR user .
+The telemetry logs will be stored in the
+.RI log/ user
+directory with a filename of the
+.I pop3d
+process-id.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-U " uses"
+The maximum number of times that the process should be used for new
+connections before shutting down. The default is 250.
+.TP
+.BI \-T " timeout"
+The number of seconds that the process will wait for a new connection
+before shutting down. Note that a value of 0 (zero) will disable the
+timeout. The default is 60.
+.TP
+.BI \-D
+Run external debugger specified in debug_command.
+.TP
+.BI \-s
+Serve POP3 over SSL (pop3s). All data to and from
+.I pop3d
+is encrypted using the Secure Sockets Layer.
+.TP
+.B \-k
+Serve MIT's KPOP (Kerberized POP) protocol instead.
+.TP
+.BI \-p " ssf"
+Tell
+.I pop3d
+that an external layer exists. An SSF (security strength factor) of 1
+means an integrity protection layer exists. Any higher SSF implies
+some form of privacy protection.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3test.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3test.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3test.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/pop3test.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,186 @@
+.\" -*- nroff -*-
+.TH POP3TEST 1 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: pop3test.1,v 1.9.2.1 2004/12/16 15:49:59 ken3 Exp $
+.SH NAME
+pop3test \- interactive POP3 test program
+.SH SYNOPSIS
+.B pop3test
+[
+.B \-t
+.I keyfile
+]
+[
+.B \-p
+.I port
+]
+[
+.B \-m
+.I mechanism
+]
+.br
+ [
+.B \-a
+.I userid
+]
+[
+.B \-u
+.I userid
+]
+[
+.B \-k
+.I num
+]
+[
+.B \-l
+.I num
+]
+.br
+ [
+.B \-r
+.I realm
+]
+[
+.B \-f
+.I file
+]
+[
+.B \-n
+.I num
+]
+[
+.B \-s
+]
+[
+.B \-c
+]
+.br
+ [
+.B \-i
+]
+[
+.B \-o
+\fIoption\fB=\fIvalue\fR
+]
+[
+.B \-v
+]
+\fIhostname\fR
+.SH DESCRIPTION
+.I pop3test
+is a utility that allows you to authenticate to a POP3 server
+and interactively issue commands to it. Once authenticated you may
+issue any POP3 command by simply typing it in. It is capable
+of multiple SASL authentication mechanisms and handles encryption
+layers transparently. This utility is often used for testing the
+operation of a pop3 server. Also those developing POP3 clients
+find it useful.
+.PP
+.SH OPTIONS
+.TP
+.BI \-t " keyfile"
+Enable TLS. \fIkeyfile\fR contains the TLS public and private keys.
+Specify \fB""\fR to negotiate a TLS encryption layer but not use TLS
+authentication.
+.TP
+.BI \-p " port"
+Port to connect to. If left off this defaults to \fBpop3\fR as defined in
+/etc/services.
+.TP
+.BI -m " mechanism"
+Force pop3test to use \fImechanism\fR for authentication. If not specified
+the strongest authentication mechanism supported by the server is
+chosen. Specify \fBuser\fR to use the USER/PASS commands or
+\fBapop\fR to use the APOP command instead of AUTH.
+.TP
+.BI -a " userid"
+Userid to use for authentication; defaults to the current user.
+This is the userid whose password or credentials will be presented to
+the server for verification.
+.TP
+.BI -u " userid"
+Userid to use for authorization; defaults to the current user.
+This is the userid whose identity will be assumed after authentication.
+\fBNOTE:\fR This is only used with SASL mechanisms that allow proxying
+(e.g. PLAIN, DIGEST-MD5).
+.TP
+.BI -k " num"
+Minimum protection layer required.
+.TP
+.BI -l " num"
+Maximum protection layer to use (\fB0\fR=none; \fB1=\fRintegrity;
+etc). For example if you are using the KERBEROS_V4 authentication
+mechanism specifying \fB0\fR will force pop3test to not use any layer
+and specifying \fB1\fR will force it to use the integrity layer. By
+default the maximum supported protection layer will be used.
+.TP
+.BI -r " realm"
+Specify the \fIrealm\fR to use. Certain authentication mechanisms
+(e.g. DIGEST-MD5) may require one to specify the realm.
+.TP
+.BI -f " file"
+Pipe \fIfile\fR into connection after authentication.
+.TP
+.BI -n " num"
+Number of authentication attempts; default = 1. The client will
+attempt to do SSL/TLS session reuse and/or fast reauth
+(e.g. DIGEST-MD5), if possible.
+.TP
+.B -s
+Enable POP3 over SSL (pop3s).
+.TP
+.B -c
+Enable challenge prompt callbacks. This will cause the OTP mechanism
+to ask for the the one-time password instead of the secret pass-phrase
+(library generates the correct response).
+.TP
+.B -i
+Don't send an initial client response for SASL mechanisms, even if the
+protocol supports it.
+.TP
+\fB-o \fIoption\fB=\fIvalue\fR
+Set the SASL \fIoption\fR to \fIvalue\fR.
+.TP
+.B -v
+Verbose. Print out more information than usual.
+.SH SEE ALSO
+.PP
+\fBpop3d(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/quota.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/quota.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/quota.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/quota.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,106 @@
+.\" -*- nroff -*-
+.TH QUOTA 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: quota.8,v 1.11 2003/10/22 18:50:13 rjs3 Exp $
+.SH NAME
+quota \- report and optionally fix quota usage
+.SH SYNOPSIS
+.B quota
+[
+.B \-C
+.I config-file
+]
+[
+.B \-d
+.I domain
+]
+[
+.B \-f
+]
+[
+.IR mailbox-prefix ...
+]
+.SH DESCRIPTION
+.I Quota
+generates a report listing quota roots, giving their limits and usage.
+If the
+.I \-f
+option is given,
+.I quota
+first fixes any inconsistencies in the quota subsystem, such as
+mailboxes with the wrong quota root or quota roots with the wrong
+quota usage reported.
+If an optional
+.I domain
+is given, the quota listing (and inconsistency fixing) is performed in
+that domain rather than the default domain.
+If any optional
+.I mailbox-prefix
+arguments are given, the quota listing (and inconsistency fixing) is
+limited to quota roots with names that start with one of the given
+prefixes.
+.PP
+Running
+.I quota
+with both the
+.I \-f
+option and
+.I mailbox-prefix
+arguments is not recommended.
+.PP
+.I Quota
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-d " domain"
+List/fix quotas in \fIdomain\fR.
+.TP
+.B \-f
+Fix any inconsistencies in the quota subsystem before generating a
+report.
+.SH FILES
+.TP
+.B /etc/imapd.conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/reconstruct.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/reconstruct.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/reconstruct.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/reconstruct.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,161 @@
+.\" -*- nroff -*-
+.TH RECONSTRUCT 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: reconstruct.8,v 1.18.2.2 2006/06/19 12:59:37 murch Exp $
+.SH NAME
+reconstruct \- reconstruct mailboxes
+.SH SYNOPSIS
+.B reconstruct
+[
+.B \-C
+.I config-file
+]
+[
+.B \-p
+.I partition
+]
+[
+.B \-x
+]
+[
+.B \-r
+]
+[
+.B \-f
+]
+.IR mailbox ...
+.br
+.B reconstruct
+[
+.B \-C
+.I config-file
+]
+.B \-m
+.SH DESCRIPTION
+.I Reconstruct
+rebuilds one or more IMAP mailboxes. When invoked with the
+.B \-m
+switch, it rebuilds the master
+mailboxes file. It can be used to recover from
+almost any sort of data corruption.
+.PP
+If
+.I Reconstruct
+can find existing header and index files, it attempts to preserve any
+data in them that is not derivable from the message files themselves.
+The state
+.I reconstruct
+attempts to preserve includes the flag names, flag state, and
+internaldate.
+.I Reconstruct
+derives all other information from the message files.
+.PP
+.I Reconstruct
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR. Any mailbox directory
+underneath the path specified in the
+.I partition-news
+configuration option is assumed to be in news format.
+.PP
+.I Reconstruct
+does not adjust the quota usage recorded in any quota
+root files. After running
+.IR reconstruct ,
+it is advisable to run
+.IR quota (8)
+with the
+.I \-f
+switch in order to fix the quota root files.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-p " partition"
+Search for the listed (non-existant) mailboxes on the indicated partition.
+Create the mailboxes in the database in addition to reconstructing them.
+(not compatible with the use of wildcards)
+.TP
+.B \-x
+When processing a mailbox which is not in the mailbox list (e.g. via
+the -p or -f options), do not import the metadata from the mailbox,
+instead create it anew (this specifically affects at least the mailbox's seen
+state unique identifier, user flags, and ACL).
+.TP
+.B \-r
+Recursively reconstruct all sub-mailboxes of the mailboxes or mailbox
+prefixes given as arguments.
+.TP
+.B \-f
+Examine the filesystem underneath mailbox, adding all directories with
+a cyrus.header found there as new mailboxes. Useful for
+restoring mailboxes from backups.
+.TP
+.B \-m
+.B NOTE: CURRENTLY UNAVAILABLE
+.br
+Rebuild the
+.I
+mailboxes
+file. Use whatever data in the existing
+.I mailboxes
+file it can scavenge, then scans all partitions listed in the
+.IR imapd.conf (5)
+file for additional mailboxes.
+.SH EXAMPLES
+You want to reconstruct the index files for a user, you have recovered a deleted mail file from backup
+and given it a suitable name (eg user/ben-lacy/33.), but it is not visible since it is not indexed:
+
+.nf
+reconstruct -r user.ben-lacy
+.fi
+.PP
+If you have the \fBunixhierarchysep:yes\fR option set in \fB/etc/imapd.conf\fR you would need
+to run:
+
+.nf
+reconstruct -r user/ben.lacy
+.fi
+
+.SH FILES
+.TP
+.B /etc/imapd.conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/rmnews.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/rmnews.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/rmnews.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/rmnews.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+.\" -*- nroff -*-
+.TH RMNEWS 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: rmnews.8,v 1.7 2003/08/09 23:43:14 rjs3 Exp $
+.SH NAME
+rmnews \- expunge and remove news articles
+.SH SYNOPSIS
+.B rmnews
+.SH DESCRIPTION
+.I Rmnews
+reads article data from the standard input.
+It then expunges and removes the listed articles.
+.I Rmnews
+is designed to be used by InterNetNews to remove canceled, superseded,
+and expired news articles.
+.PP
+The input is processed as an INN
+.I expirerm
+file listing or an INN cancel
+stream written as a ``WC'' entry in the
+.IR newsfeeds (5)
+file. This data consists of lines of text, each containing a list of
+relative article pathnames, with a single space between entries. If
+a listed file is contained in an IMAP news mailbox, it is expunged out
+of that mailbox. In any case, each listed file is unlinked.
+.PP
+.I Rmnews
+reads its configuration options out of the
+.IR imapd.conf (5)
+file. The optional
+.I newsprefix
+option specifies a prefix to be prepended to newsgroup names to make
+the corresponding IMAP mailbox names.
+The required
+.I partition-news
+option specifies the pathname prefix to the IMAP news mailboxes. The
+value of
+.I partition-news
+concatenated with the dots-to-slashes-converted value of
+.I newsprefix
+must be the pathname of the news spool directory.
+.SH FILES
+.TP
+.B /etc/imapd.conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sieveshell.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sieveshell.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sieveshell.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sieveshell.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,185 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. | will give a
+.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.\"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "SIEVESHELL 1"
+.TH SIEVESHELL 1 "2004-01-15" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+sieveshell \- remotely manipulate sieve scripts
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+sieveshell [\fB\-\-user\fR=\fIuser\fR] [\fB\-\-authname\fR=\fIauthname\fR]
+[\fB\-\-realm\fR=\fIrealm\fR] [\fB\-\-exec\fR=\fIscript\fR] \fIserver\fR[\fB:\fR\fIport\fR]
+.PP
+sieveshell \fB\-\-help\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBsieveshell\fR allows users to manipulate their scripts on a remote
+server. It works via \s-1MANAGESIEVE\s0, a work in progress.
+.PP
+The following commands are recognized:
+.Sp
+.RS 4
+\&\fBlist\fR list scripts on server.
+.Sp
+\&\fBput\fR <filename> upload script to server.
+.Sp
+\&\fBget\fR <name> [<filename>] get script. if no filename display to stdout
+.Sp
+\&\fBdelete\fR <name> delete script.
+.Sp
+\&\fBactivate\fR <name> activate script.
+.Sp
+\&\fBdeactivate\fR deactivate all scripts.
+.RE
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-u\fR \fIuser\fR, \fB\-\-user\fR=\fIuser\fR" 4
+.IX Item "-u user, --user=user"
+The authorization name to request; by default, derived from the
+authentication credentials.
+.IP "\fB\-a\fR \fIauthname\fR, \fB\-\-authname\fR=\fIauthname\fR" 4
+.IX Item "-a authname, --authname=authname"
+The user to use for authentication (defaults to current user).
+.IP "\fB\-r\fR \fIrealm\fR, \fB\-\-realm\fR=\fIrealm\fR" 4
+.IX Item "-r realm, --realm=realm"
+The realm to attempt authentication in.
+.IP "\fB\-e\fR \fIscript\fR, \fB\-\-exec\fR=\fIscript\fR" 4
+.IX Item "-e script, --exec=script"
+Instead of working interactively, run commands from \fIscript\fR, and
+exit when done.
+.SH "REFERENCES"
+.IX Header "REFERENCES"
+[\s-1MANAGESIEVE\s0] Martin, T.; \*(L"A Protocol for Remotely Managing Sieve
+Scripts\*(R", draft\-ietf\-managesieve\-03.txt, Mirapoint, Inc.; May 2001,
+work in progress.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Tim Martin <tmartin at mirapoint.com>, and the rest of the Cyrus
+team <cyrus\-bugs at andrew.cmu.edu>.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sivtest.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sivtest.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sivtest.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sivtest.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,180 @@
+.\" -*- nroff -*-
+.TH SIVTEST 1 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: sivtest.1,v 1.5.2.1 2004/12/16 15:49:59 ken3 Exp $
+.\"
+.SH NAME
+sivtest \- interactive MANAGESIEVE test program
+.SH SYNOPSIS
+.B sivtest
+[
+.B \-t
+.I keyfile
+]
+[
+.B \-p
+.I port
+]
+[
+.B \-m
+.I mechanism
+]
+.br
+ [
+.B \-a
+.I userid
+]
+[
+.B \-u
+.I userid
+]
+[
+.B \-k
+.I num
+]
+[
+.B \-l
+.I num
+]
+.br
+ [
+.B \-r
+.I realm
+]
+[
+.B \-f
+.I file
+]
+[
+.B \-n
+.I num
+]
+[
+.B \-c
+]
+.br
+ [
+.B \-i
+]
+[
+.B \-o
+\fIoption\fB=\fIvalue\fR
+]
+[
+.B \-v
+]
+\fIhostname\fR
+.SH DESCRIPTION
+.I sivtest
+is a utility that allows you to authenticate to a MANAGESIEVE server
+and interactively issue commands to it. Once authenticated you may
+issue any MANAGESIEVE command by simply typing it in. It is capable
+of multiple SASL authentication mechanisms and handles encryption
+layers transparently. This utility is often used for testing the
+operation of a timsieved server. Also those developing MANAGESIEVE clients
+find it useful.
+.PP
+.SH OPTIONS
+.TP
+.BI \-t " keyfile"
+Enable TLS. \fIkeyfile\fR contains the TLS public and private keys.
+Specify \fB""\fR to negotiate a TLS encryption layer but not use TLS
+authentication.
+.TP
+.BI \-p " port"
+Port to connect to. If left off this defaults to \fBsieve\fR as defined
+in /etc/services.
+.TP
+.BI -m " mechanism"
+Force sivtest to use \fImechanism\fR for authentication. If not specified
+the strongest authentication mechanism supported by the server is
+chosen.
+.TP
+.BI -a " userid"
+Userid to use for authentication; defaults to the current user.
+This is the userid whose password or credentials will be presented to
+the server for verification.
+.TP
+.BI -u " userid"
+Userid to use for authorization; defaults to the current user.
+This is the userid whose identity will be assumed after authentication.
+\fBNOTE:\fR This is only used with SASL mechanisms that allow proxying
+(e.g. PLAIN, DIGEST-MD5).
+.TP
+.BI -k " num"
+Minimum protection layer required.
+.TP
+.BI -l " num"
+Maximum protection layer to use (\fB0\fR=none; \fB1=\fRintegrity;
+etc). For example if you are using the KERBEROS_V4 authentication
+mechanism specifying \fB0\fR will force sivtest to not use any layer
+and specifying \fB1\fR will force it to use the integrity layer. By
+default the maximum supported protection layer will be used.
+.TP
+.BI -r " realm"
+Specify the \fIrealm\fR to use. Certain authentication mechanisms
+(e.g. DIGEST-MD5) may require one to specify the realm.
+.TP
+.BI -f " file"
+Pipe \fIfile\fR into connection after authentication.
+.TP
+.BI -n " num"
+Number of authentication attempts; default = 1. The client will
+attempt to do SSL/TLS session reuse and/or fast reauth
+(e.g. DIGEST-MD5), if possible.
+.TP
+.B -c
+Enable challenge prompt callbacks. This will cause the OTP mechanism
+to ask for the the one-time password instead of the secret pass-phrase
+(library generates the correct response).
+.TP
+.B -i
+Don't send an initial client response for SASL mechanisms, even if the
+protocol supports it.
+.TP
+\fB-o \fIoption\fB=\fIvalue\fR
+Set the SASL \fIoption\fR to \fIvalue\fR.
+.TP
+.B -v
+Verbose. Print out more information than usual.
+.SH SEE ALSO
+.PP
+\fBtimsieved(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smmapd.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smmapd.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smmapd.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smmapd.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,99 @@
+.\" -*- nroff -*-
+.TH SMMAPD 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: smmapd.8,v 1.2.2.1 2003/12/19 18:33:46 ken3 Exp $
+.SH NAME
+SMMAPD \- Sendmail socket map daemon
+.SH SYNOPSIS
+.B smmapd
+[
+.B \-C
+.I config-file
+]
+[
+.B \-U
+.I uses
+]
+[
+.B \-T
+.I timeout
+]
+.br
+ [
+.B \-D
+]
+.SH DESCRIPTION
+.B SMMAPD
+is a Sendmail socket map daemon which is used to verify that a Cyrus
+mailbox exists, that it is postable and it is under quota.
+It accepts commands on its standard input and responds on its standard
+output.
+It MUST be invoked by
+.IR master (8)
+with those descriptors attached to a remote client connection.
+.PP
+.B SMMAPD
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-U " uses"
+The maximum number of times that the process should be used for new
+connections before shutting down. The default is 250.
+.TP
+.BI \-T " timeout"
+The number of seconds that the process will wait for a new connection
+before shutting down. Note that a value of 0 (zero) will disable the
+timeout. The default is 60.
+.TP
+.BI \-D
+Run external debugger specified in debug_command.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+Default configuration file.
+.TP
+.B /etc/cyrus.conf
+Cyrus Master process configuration file.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smtptest.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smtptest.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smtptest.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/smtptest.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,186 @@
+.\" -*- nroff -*-
+.TH SMTPTEST 1 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: smtptest.1,v 1.5.2.1 2004/12/16 15:50:00 ken3 Exp $
+.\"
+.SH NAME
+smtptest \- interactive SMTP test program
+.SH SYNOPSIS
+.B smtptest
+[
+.B \-t
+.I keyfile
+]
+[
+.B \-p
+.I port
+]
+[
+.B \-m
+.I mechanism
+]
+.br
+ [
+.B \-a
+.I userid
+]
+[
+.B \-u
+.I userid
+]
+[
+.B \-k
+.I num
+]
+[
+.B \-l
+.I num
+]
+.br
+ [
+.B \-r
+.I realm
+]
+[
+.B \-f
+.I file
+]
+[
+.B \-n
+.I num
+]
+[
+.B \-s
+]
+[
+.B \-c
+]
+.br
+ [
+.B \-i
+]
+[
+.B \-o
+\fIoption\fB=\fIvalue\fR
+]
+[
+.B \-v
+]
+\fIhostname\fR
+.SH DESCRIPTION
+.I smtptest
+is a utility that allows you to authenticate to a SMTP server
+and interactively issue commands to it. Once authenticated you may
+issue any SMTP command by simply typing it in. It is capable
+of multiple SASL authentication mechanisms and handles encryption
+layers transparently. This utility is often used for testing the
+operation of a smtp server. Also those developing SMTP clients
+find it useful.
+.PP
+.SH OPTIONS
+.TP
+.BI \-t " keyfile"
+Enable TLS. \fIkeyfile\fR contains the TLS public and private keys.
+Specify \fB""\fR to negotiate a TLS encryption layer but not use TLS
+authentication.
+.TP
+.BI \-p " port"
+Port to connect to. If left off this defaults to \fBsmtp\fR as defined
+in /etc/services.
+.TP
+.BI -m " mechanism"
+Force smtptest to use \fImechanism\fR for authentication. If not specified
+the strongest authentication mechanism supported by the server is
+chosen.
+.TP
+.BI -a " userid"
+Userid to use for authentication; defaults to the current user.
+This is the userid whose password or credentials will be presented to
+the server for verification.
+.TP
+.BI -u " userid"
+Userid to use for authorization; defaults to the current user.
+This is the userid whose identity will be assumed after authentication.
+\fBNOTE:\fR This is only used with SASL mechanisms that allow proxying
+(e.g. PLAIN, DIGEST-MD5).
+.TP
+.BI -k " num"
+Minimum protection layer required.
+.TP
+.BI -l " num"
+Maximum protection layer to use (\fB0\fR=none; \fB1=\fRintegrity;
+etc). For example if you are using the KERBEROS_V4 authentication
+mechanism specifying \fB0\fR will force smtptest to not use any layer
+and specifying \fB1\fR will force it to use the integrity layer. By
+default the maximum supported protection layer will be used.
+.TP
+.BI -r " realm"
+Specify the \fIrealm\fR to use. Certain authentication mechanisms
+(e.g. DIGEST-MD5) may require one to specify the realm.
+.TP
+.BI -f " file"
+Pipe \fIfile\fR into connection after authentication.
+.TP
+.BI -n " num"
+Number of authentication attempts; default = 1. The client will
+attempt to do SSL/TLS session reuse and/or fast reauth
+(e.g. DIGEST-MD5), if possible.
+.TP
+.B -s
+Enable SMTP over SSL (smtps).
+.TP
+.B -c
+Enable challenge prompt callbacks. This will cause the OTP mechanism
+to ask for the the one-time password instead of the secret pass-phrase
+(library generates the correct response).
+.TP
+.B -i
+Don't send an initial client response for SASL mechanisms, even if the
+protocol supports it.
+.TP
+\fB-o \fIoption\fB=\fIvalue\fR
+Set the SASL \fIoption\fR to \fIvalue\fR.
+.TP
+.B -v
+Verbose. Print out more information than usual.
+.SH SEE ALSO
+.PP
+\fBsendmail(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/squatter.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/squatter.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/squatter.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/squatter.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,125 @@
+.\" -*- nroff -*-
+.TH SQUATTER 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: squatter.8,v 1.6 2003/10/22 18:50:13 rjs3 Exp $
+.SH NAME
+squatter \- create SQUAT indexes for mailboxes
+.SH SYNOPSIS
+.B squatter
+[
+.B \-C
+.I config-file
+]
+[
+.B \-r
+]
+[
+.B \-s
+]
+[
+.B \-a
+]
+[
+.B \-v
+]
+.IR mailbox ...
+.SH DESCRIPTION
+.I Squatter
+creates a new SQUAT index for one or more IMAP mailboxes. The SQUAT
+index is a unified index of all of the header and body text of each
+message a given mailbox. This index is used to significantly reduce
+IMAP SEARCH times on a mailbox.
+.PP
+.I Squatter
+creates an index of ALL messages in the mailbox, not just those since
+the last time that it was run (i.e., it does NOT do incremental
+updates). Any messages appended to the mailbox after
+.I squatter
+is run, will NOT be included in the index. To include new messages in
+the index,
+.I squatter
+must be run again.
+For large and active mailboxes, it is recommended to run
+.I squatter
+periodically as an EVENT in
+.IR cyrus.conf (5)
+.
+.PP
+.B NOTE:
+Messages and mailboxes that have not been indexed CAN still be
+SEARCHed, just not as quickly as those with a SQUAT index.
+.PP
+.I Squatter
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.B \-r
+Recursively create indexes for all sub-mailboxes of the mailboxes or
+mailbox prefixes given as arguments.
+.TP
+.B \-s
+Skip mailboxes whose index file is older than their current squat file
+(within a small time delta).
+.TP
+.B \-a
+Only create indexes for mailboxes which have the shared
+\fI/vendor/cmu/cyrus-imapd/squat\fR annotation set to "true".
+.br
+.sp
+The value of the \fB/vendor/cmu/cyrus-imapd/squat\fR annotation is
+inherited by all children of the given mailbox, so an entire mailbox
+tree can be indexed (or not indexed) by setting a single annotation on
+the root of that tree with a value of "true" (or "false"). If a
+mailbox does not have a \fB/vendor/cmu/cyrus-imapd/squat\fR annotation
+set on it (or does not inherit one), then the mailbox is not indexed.
+In other words, the implicit value of
+\fB/vendor/cmu/cyrus-imapd/squat\fR is "false".
+.TP
+.B \-v
+Increase the verbosity of progress/status messages.
+.SH FILES
+.TP
+.B /etc/imapd.conf /etc/cyrus.conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_client.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_client.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_client.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_client.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,181 @@
+.\" -*- nroff -*-
+.TH SYNC_CLIENT 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: sync_client.8,v 1.1.2.5 2005/03/31 20:27:53 ken3 Exp $
+.SH NAME
+sync_client \- client side of the synchronization (replication) engine
+.SH SYNOPSIS
+.B sync_client
+[
+.B \-v
+]
+[
+.B \-l
+]
+[
+.B \-C
+.I config-file
+]
+[
+.B \-S
+.I servername
+]
+.br
+ [
+.B \-f
+.I input-file
+]
+[
+.B \-F
+.I shutdown_file
+]
+[
+.B \-w
+.I wait_interval
+]
+.br
+ [
+.B \-t
+.I timeout
+]
+[
+.B \-d
+.I delay
+]
+[
+.B \-r
+]
+[
+.B \-u
+]
+[
+.B \-m
+]
+.br
+ [
+.B \-s
+]
+.IR objects ...
+
+.SH DESCRIPTION
+.I Sync_client
+is the client side of the replication system. It runs on the client
+(master) system and connects to the target (replica) system and
+generates an appropriate sequence of transactions to synchronize the
+replica system with the master system.
+.SH OPTIONS
+.TP
+.BI \-v
+Verbose mode.
+.TP
+.BI \-l
+Verbose logging mode.
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-S " servername"
+Tells
+.B sync_client
+which server to communicate with. Overrides the \fIsync_host\fR
+configuration option.
+.TP
+.BI \-f " input-file"
+In mailbox or user replication mode: provides list of users or mailboxes
+to replicate. In rolling replication mode, specifies an alternate log
+file (sync_client will exit after processing the log file).
+.TP
+.BI \-F " shutdown-file"
+Rolling replication checks for this file at the end of each replication
+cycle and shuts down if it is present. Used to request nice clean shutdown
+at first convenient point. The file in question is removed on shutdown.
+Overrides
+.I sync_shutdown_file
+option in
+.I imapd.conf
+.TP
+.BI \-w " interval"
+Wait this long before starting. Typically used so that we can attach a
+debugger to one end of the replication system or the other.
+.TP
+.BI \-t " timeout"
+Timeout for single replication run in rolling replication.
+.B sync_client
+will negotiate a restart after this many seconds. Default: 600 seconds
+.TP
+.BI \-d " delay"
+Minimum delay between replication runs in rolling replication mode.
+Larger values provide better efficiency as transactions can be merged.
+Smaller values mean that the replica system is more up to date and that
+you don't end up with large blocks of replication transactions as a single
+group. Default: 3 seconds.
+.TP
+.BI \-r
+Rolling (repeat) replication mode. Pick up a list of actions recorded by
+the
+.B lmtpd(8), imapd(8), popd(8) and nntpd(8)
+daemons from the file specified in
+.I sync_log_file.
+Repeat until
+.I sync_shutdwon_file
+appears.
+.TP
+.BI \-u
+User mode.
+Remaining arguments are list of users who should be replicated.
+.TP
+.BI \-m
+Mailbox mode.
+Remaining arguments are list of mailboxes which should be replicated.
+.TP
+.BI \-s
+Sieve mode.
+Remaining arguments are list of users whose Sieve files should be replicated.
+Principally used for debugging purposes: not exposed to
+.B sync_client(8).
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBsync_server(8)\fR
+.SH AUTHORS
+David Carter (dpc22 at cam.ac.uk), Ken Murchison (ken at oceana.com)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_reset.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_reset.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_reset.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_reset.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,81 @@
+.\" -*- nroff -*-
+.TH SYNC_RESET 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: sync_reset.8,v 1.1.2.2 2005/03/13 01:24:13 ken3 Exp $
+.SH NAME
+sync_reset \- Account reset utility. DANGER.
+.SH SYNOPSIS
+.B sync_server
+[
+.B \-C
+.I config-file
+]
+[
+.B \-v
+]
+[
+.B \-f
+]
+.SH DESCRIPTION
+
+.I Sync_reset
+is a small utility program to destroy user accounts on a system. The
+only safeguard which is in place is the obligary force option.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-v
+Verbose mode.
+.TP
+.BI \-f
+Force operation. Without this flag \fIsync_reset\fR just bails out with
+an error. Principally here to try and prevent accidents with command
+autorepeat.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBsync_client(8)\fR
+.SH AUTHORS
+David Carter (dpc22 at cam.ac.uk), Ken Murchison (ken at oceana.com)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_server.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_server.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_server.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/sync_server.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+.\" -*- nroff -*-
+.TH SYNC_SERVER 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: sync_server.8,v 1.1.2.3 2006/05/26 15:50:12 murch Exp $
+.SH NAME
+sync_server \- server side of the synchronization (replication) engine
+.SH SYNOPSIS
+.B sync_server
+[
+.B \-C
+.I config-file
+]
+[
+.B \-p
+.I ssf
+]
+.SH DESCRIPTION
+
+.I Sync_server
+is the server side of the the replication system. It runs on the
+target (replica) system and listens for connections from
+.I sync_client
+which provides instructions for synchronizing the replica system with
+the master system.
+
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.BI \-p " ssf"
+Tell
+.I sync_server
+that an external layer exists. An SSF (security strength factor) of 1
+means an integrity protection layer exists. Any higher SSF implies
+some form of privacy protection.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBsync_client(8)\fR
+.SH AUTHORS
+David Carter (dpc22 at cam.ac.uk), Ken Murchison (ken at oceana.com)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/syncnews.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/syncnews.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/syncnews.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/syncnews.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,81 @@
+.\" -*- nroff -*-
+.TH SYNCNEWS 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: syncnews.8,v 1.9 2003/08/09 23:43:15 rjs3 Exp $
+.SH NAME
+syncnews \- synchronize IMAP news mailboxes with active file
+.SH SYNOPSIS
+.B syncnews
+[
+.B \-C
+.I config-file
+]
+.I active-file
+.SH DESCRIPTION
+.I Syncnews
+compares the list of IMAP news mailboxes with the news active file.
+News mailboxes which are not listed in the active file are removed.
+Newsgroups listed in the active file but not in the IMAP mailboxes
+file have IMAP mailboxes created.
+.PP
+A newsgroup must have a status of ``y'', ``m'', or ``n'' to be
+considered listed in the active file.
+.PP
+.I Syncnews
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH BUGS
+If a newsgroup is listed in the active file, but does not have the
+news spool directories created,
+.I syncnews
+will create those news spool directories in the process of creating
+the IMAP mailbox. The created directories are likely to then have
+ownership and permissions that do not permit the news server to write
+article files.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/timsieved.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/timsieved.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/timsieved.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/timsieved.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,76 @@
+.\" -*- nroff -*-
+.TH TIMSIEVED 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: timsieved.8,v 1.6.8.1 2004/07/16 14:37:41 ken3 Exp $
+.SH NAME
+timsieved \- CMU hack for getting sieve scripts onto the server
+.SH SYNOPSIS
+.B timsieved
+[
+.B \-C
+.I config-file
+]
+.SH DESCRIPTION
+.I timsieved
+is a server that allows users to remotely manage their sieve scripts
+kept on the server. It accepts commands on its standard input and
+responds on its standard output. It MUST be invoked by
+.IR master (8)
+with those descriptors attached to a remote client connection.
+.PP
+Cyrus admins that authenticate and authorize as themselves (e.g. don't
+proxy) manage global scripts.
+.PP
+.I Timsieved
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.PP
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/tls_prune.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/tls_prune.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/tls_prune.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/tls_prune.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,70 @@
+.\" -*- nroff -*-
+.TH TLS_PRUNE 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: tls_prune.8,v 1.3 2003/08/09 23:43:15 rjs3 Exp $
+.SH NAME
+tls_prune \- prune expired sessions from the TLS sessions database
+.SH SYNOPSIS
+.B tls_prune
+[
+.B \-C
+.I config-file
+]
+.SH DESCRIPTION
+.I Tls_prune
+is used to prune expired sessions from the TLS sessions database. The
+lifetime of a TLS session is determined by the
+\fBtls_session_timeout\fR configuration option.
+.PP
+.I Tls_prune
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR, \fBmaster(8)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/unexpunge.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/unexpunge.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/unexpunge.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/man/unexpunge.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,117 @@
+.\" -*- nroff -*-
+.TH UNEXPUNGE 8 "Project Cyrus" CMU
+.\"
+.\" Copyright (c) 1998-2005 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Id: unexpunge.8,v 1.1.2.3 2005/05/03 01:36:59 ken3 Exp $
+.SH NAME
+unexpunge \- restore expunged (but yet unremoved) messages
+.SH SYNOPSIS
+.B unexpunge
+[
+.B \-C
+.I config-file
+]
+.B \-l
+.I mailbox
+.br
+.B unexpunge
+[
+.B \-C
+.I config-file
+]
+.B \-a
+[
+.B \-d
+]
+[
+.B \-v
+]
+.I mailbox
+.br
+.B unexpunge
+[
+.B \-C
+.I config-file
+]
+.B \-u
+[
+.B \-d
+]
+[
+.B \-v
+]
+.IR "mailbox uid" ...
+.SH DESCRIPTION
+.I Unexpunge
+is used to restore expunged messages which have yet to be removed from
+the Cyrus mailspool. This utility is only useful when the server is
+configured to use \fBdelayed\fR expunge.
+.PP
+.I Unexpunge
+reads its configuration options out of the
+.IR imapd.conf (5)
+file unless specified otherwise by \fB-C\fR.
+.SH OPTIONS
+.TP
+.BI \-C " config-file"
+Read configuration options from \fIconfig-file\fR.
+.TP
+.B \-l
+List the expunged messages in the specified mailbox which are available
+for restoration.
+.TP
+.B \-a
+Restore \fBall\fR of the expunged messages in the specified mailbox.
+.TP
+.B \-u
+Restore only those messages having the specified UIDs in the specified
+mailbox.
+.TP
+.B \-d
+Unset the \fI\\Deleted\fR flag on any restored messages.
+.TP
+.B \-v
+Enable verbose output/logging.
+.SH FILES
+.TP
+.B /etc/imapd.conf
+.SH SEE ALSO
+.PP
+\fBimapd.conf(5)\fR
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+Makefile
+makedepend.log
+master
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+/.cvsignore/1.2/Wed Oct 22 18:03:09 2003//Tcyrus-release-2-3-7
+/CYRUS-MASTER.mib/1.4/Tue Aug 14 16:11:26 2001//Tcyrus-release-2-3-7
+/Makefile.in/1.17.2.5/Mon Feb 21 19:25:56 2005//Tcyrus-release-2-3-7
+/README/1.9/Wed Oct 22 18:03:09 2003//Tcyrus-release-2-3-7
+/cyrusMasterMIB.c/1.9.8.2/Tue May 25 01:28:18 2004//Tcyrus-release-2-3-7
+/cyrusMasterMIB.h/1.1/Sun Nov 5 22:11:28 2000//Tcyrus-release-2-3-7
+/master.c/1.85.2.15/Wed Apr 6 20:37:00 2005//Tcyrus-release-2-3-7
+/master.h/1.9.2.6/Wed Apr 6 20:37:01 2005//Tcyrus-release-2-3-7
+/masterconf.c/1.11.2.1/Fri Dec 19 18:33:47 2003//Tcyrus-release-2-3-7
+/masterconf.h/1.6/Wed Oct 22 18:50:14 2003//Tcyrus-release-2-3-7
+/message_uuid_master.c/1.1.2.4/Mon Apr 11 13:37:58 2005//Tcyrus-release-2-3-7
+/message_uuid_master.h/1.1.2.3/Wed Apr 6 20:37:01 2005//Tcyrus-release-2-3-7
+/service-thread.c/1.14.2.5/Thu Dec 1 21:18:11 2005//Tcyrus-release-2-3-7
+/service.c/1.45.2.9/Thu Dec 1 21:18:11 2005//Tcyrus-release-2-3-7
+/service.h/1.16/Wed Oct 22 18:50:14 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+A D/conf////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/master
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CYRUS-MASTER.mib
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CYRUS-MASTER.mib?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CYRUS-MASTER.mib (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/CYRUS-MASTER.mib Sat Aug 26 02:00:13 2006
@@ -1,0 +1,192 @@
+CYRUS-MASTER-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, Counter32
+ FROM SNMPv2-SMI
+ DisplayString
+ FROM SNMPv2-TC
+ cmuCyrus
+ FROM CMU-MIB;
+
+cyrusMasterMIB MODULE-IDENTITY
+ LAST-UPDATED "0010312300Z" -- 2000 Oct 31
+ ORGANIZATION "CMU Project Cyrus"
+ CONTACT-INFO
+ " Email: cyrus-bugs at andrew.cmu.edu
+
+ Project Cyrus
+ Computing Services
+ Carnegie Mellon University
+ Pittsburgh PA. 15213
+ "
+ DESCRIPTION "A simple MIB for application status of the Cyrus
+ master process.
+ "
+ ::= { cmuCyrus 1 }
+ -- cmuCyrus = .1.3.6.1.4.1.3.6
+ -- cyrusMasterMIB = .1.3.6.1.4.1.3.6.1
+
+-- general information
+
+cyrusMasterInfo OBJECT IDENTIFIER ::= { cyrusMasterMIB 1 }
+
+ -- version information
+
+ cyrusMasterInfoDescr OBJECT-TYPE
+
+ SYNTAX DisplayString (SIZE (0..255))
+
+ ACCESS read-only
+
+ STATUS mandatory
+
+ DESCRIPTION "A general textual description
+
+ of the Cyrus server."
+
+ ::= { cyrusMasterInfo 1 }
+
+ cyrusMasterInfoVers OBJECT-TYPE
+
+ SYNTAX DisplayString (SIZE (0..255))
+
+ ACCESS read-only
+
+ STATUS mandatory
+
+ DESCRIPTION "The version of the Cyrus server."
+
+ ::= { cyrusMasterInfo 2 }
+
+ cyrusMasterInfoUptime OBJECT-TYPE
+
+ SYNTAX TimeTicks
+
+ ACCESS read-only
+
+ STATUS current
+
+ DESCRIPTION "The amount of time since the master
+ process was last started."
+
+ ::= { cyrusMasterInfo 3 }
+
+ -- service table
+
+ serviceTable OBJECT-TYPE
+
+ SYNTAX SEQUENCE OF serviceEntry
+
+ ACCESS not-accessible
+
+ STATUS mandatory
+
+ ::= { cyrusMasterMIB 2 }
+
+
+ serviceEntry OBJECT-TYPE
+
+ SYNTAX ServiceEntry
+
+ ACCESS not-accessible
+
+ STATUS mandatory
+
+ INDEX { serviceId }
+
+ ::= { serviceTable 1 }
+
+
+ ServiceEntry ::= SEQUENCE {
+
+ serviceForks Counter32,
+
+ serviceActive Gauge32,
+
+ serviceName DisplayString (SIZE (0..255)),
+
+ serviceId INTEGER,
+
+ serviceConnections Counter32
+
+ }
+
+ -- forks since startup
+ serviceForks OBJECT-TYPE
+
+ SYNTAX Counter32
+
+ ACCESS read-only
+
+ STATUS mandatory
+
+ DESCRIPTION "The total number of forks for this
+ service since initialization."
+
+ ::= { serviceEntry 1 }
+
+
+
+ -- active children
+ serviceActive OBJECT-TYPE
+
+ SYNTAX Gauge32
+
+ ACCESS read-only
+
+ STATUS mandatory
+
+ DESCRIPTION "The total number of children currently
+
+ active."
+
+ ::= { serviceEntry 2 }
+
+
+ serviceName OBJECT-TYPE
+
+ SYNTAX DisplayString (SIZE (0..255))
+
+ ACCESS read-only
+
+ STATUS mandatory
+
+ DESCRIPTION "The name of this service."
+
+ ::= { serviceEntry 3 }
+
+ serviceId OBJECT-TYPE
+
+ SYNTAX INTEGER
+
+ ACCESS not-accessible
+
+ STATUS mandatory
+
+ DESCRIPTION "The id of the service as configured."
+
+ ::= { serviceEntry 4 }
+
+ -- connections since startup
+ serviceConnections OBJECT-TYPE
+
+ SYNTAX Counter32
+
+ ACCESS read-only
+
+ STATUS mandatory
+
+ DESCRIPTION "The total number of connections for this
+ service since initialization."
+
+ ::= { serviceEntry 5 }
+
+-- event table
+
+-- eventTable OBJECT-TYPE
+-- SYNTAX SEQUENCE OF eventEntry
+-- ACCESS not-accessible
+-- STATUS mandatory
+-- ::= { cyrusMasterMIB 3 }
+
+END
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,101 @@
+# Makefile for the Cyrus controlling process
+# $Id: Makefile.in,v 1.17.2.5 2005/02/21 19:25:56 ken3 Exp $
+#
+# @configure_input@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+CYRUS_USER=@cyrus_user@
+CYRUS_GROUP=@cyrus_group@
+
+DEFS = @DEFS@ @LOCALDEFS@
+CPPFLAGS = -I.. -I$(srcdir)/../lib -I$(srcdir)/../imap @CPPFLAGS@ @COM_ERR_CPPFLAGS@
+DEPLIBS = @DEPLIBS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@ @COM_ERR_LDFLAGS@
+LIBS = ../lib/libcyrus_min.a @LIB_UCDSNMP@ @LIBS@ @COM_ERR_LIBS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+service_path = @service_path@
+
+LOBJS=service.o service-thread.o
+
+PROGS=master
+
+all: $(PROGS) $(LOBJS)
+
+install:
+ $(srcdir)/../install-sh -d ${DESTDIR}$(service_path)
+ for file in $(PROGS); \
+ do \
+ $(INSTALL) -m 755 $$file $(DESTDIR)$(service_path) || exit 1; \
+ done
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ $<
+
+master: master.o masterconf.o message_uuid_master.o cyrusMasterMIB.o ../lib/lock_ at WITH_LOCK@.o
+ $(CC) $(LDFLAGS) -o master master.o masterconf.o message_uuid_master.o cyrusMasterMIB.o ../lib/lock_ at WITH_LOCK@.o $(LIBS) $(DEPLIBS)
+
+clean:
+ rm -f *.o *.a Makefile.bak $(PROGS)
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,36 @@
+# standard standalone server implementation
+
+START {
+ # do not delete this entry!
+ recover cmd="ctl_cyrusdb -r"
+
+ # this is only necessary if using idled for IMAP IDLE
+# idled cmd="idled"
+}
+
+# UNIX sockets start with a slash and are absolute paths
+SERVICES {
+ # add or remove based on preferences
+ imap cmd="imapd" listen="imap" prefork=1
+ pop3 cmd="pop3d" listen="pop3" prefork=0
+# nntp cmd="nntpd" listen="nntp" prefork=0
+ sieve cmd="timsieved" listen="sieve" prefork=0
+
+ # at least one LMTP is required for delivery
+ lmtp cmd="lmtpd" listen="lmtp" prefork=0
+# lmtpunix cmd="lmtpd" listen="/lmtp" prefork=0
+
+ # this is only necessary if using notifications
+# notify cmd="notifyd" listen="/notify" proto="udp" prefork=1
+}
+
+EVENTS {
+ # this is required
+ checkpoint cmd="ctl_cyrusdb -c" period=30
+
+ # this is only necessary if using duplicate delivery suppression
+ delprune cmd="ctl_deliver -E 3" at=0400
+
+ # this is only necessary if caching TLS sessions
+ tlsprune cmd="tls_prune" at=0400
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+/cmu-backend.conf/1.3/Wed Oct 22 18:03:10 2003//Tcyrus-release-2-3-7
+/cmu-frontend.conf/1.2/Wed Oct 22 18:03:10 2003//Tcyrus-release-2-3-7
+/normal.conf/1.11.2.1/Thu Mar 30 16:10:05 2006//Tcyrus-release-2-3-7
+/prefork.conf/1.10/Wed Oct 22 18:03:10 2003//Tcyrus-release-2-3-7
+/small.conf/1.9/Tue Oct 1 20:46:01 2002//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/master/conf
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-backend.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-backend.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-backend.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-backend.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,44 @@
+# xxx where is ptloader?
+# xxx is this how we actually are doing auth? afs tokens?
+
+START {
+ auth cmd="/usr/local/bin/ksrvtgt -l 3600 imap @SHORTHOST@ ANDREW.CMU.EDU /imap/conf/srvtab"
+
+ recover cmd="ctl_cyrusdb -r"
+ mupdatepush cmd="ctl_mboxlist -m"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/sockets
+SERVICES {
+ # add or remove based on preferences
+ imap cmd="imapd" listen="imap" prefork=5
+ imaps cmd="imapd -s" listen="imaps" prefork=1
+ pop3 cmd="pop3d" listen="pop3" prefork=0
+ pop3s cmd="pop3d -s" listen="pop3s" prefork=0
+ kpop cmd="pop3d -k" listen="kpop" prefork=0
+ sieve cmd="timsieved" listen="sieve" prefork=0
+
+ # fud
+ fud cmd="fud" listen="fud" prefork=1 proto="udp"
+ notifyd cmd="notifyd" listen="/imap/conf/socket/notifyd" proto="udp" prefork=1
+
+ # at least one LMTP is required for delivery
+ lmtp cmd="lmtpd" listen="lmtp" prefork=2
+ lmtpunix cmd="lmtpd" listen="/imap/conf/socket/lmtp" prefork=0
+
+ # ptloading
+ ptloader cmd="ptloader" listen="/imap/conf/ptclient/ptsock" prefork=1
+}
+
+EVENTS {
+ # this is required
+ checkpoint cmd="ctl_cyrusdb -c" period=5
+
+ # this is only necessary if using duplicate delivery suppression
+ delprune cmd="ctl_deliver -E 3" at=0400
+
+ # this is only necessary if caching TLS sessions
+ tlsprune cmd="tls_prune" at=0400
+
+ reauth cmd="/usr/local/bin/ksrvtgt -l 3600 imap @SHORTHOST@ ANDREW.CMU.EDU /imap/conf/srvtab" period=30
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-frontend.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-frontend.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-frontend.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/cmu-frontend.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,35 @@
+START {
+ auth cmd="/usr/local/bin/ksrvtgt -l 3600 imap @SHORTHOST@ ANDREW.CMU.EDU /imap/conf/srvtab"
+
+ mboxlist cmd="ctl_cyrusdb -r"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/sockets
+SERVICES {
+ # mupdate database service - must prefork atleast 1
+ mupdate cmd="/usr/cyrus/bin/mupdate" listen=2004 prefork=1
+
+ # add or remove based on preferences
+ imap cmd="proxyd" listen="imap" prefork=5
+ imaps cmd="proxyd -s" listen="imaps" prefork=1
+ pop3 cmd="pop3d" listen="pop3" prefork=0
+ pop3s cmd="pop3d -s" listen="pop3s" prefork=0
+ kpop cmd="pop3d -k" listen="kpop" prefork=0
+ sieve cmd="timsieved" listen="sieve" prefork=0
+
+ # fud
+ fud cmd="fud" listen="fud" prefork=1 proto="udp"
+
+ # relay mail correctly
+ lmtpunix cmd="lmtpproxyd" listen="/imap/conf/socket/lmtpproxy" prefork=1
+
+ # ptloading
+ ptloader cmd="ptloader" listen="/imap/conf/ptclient/ptsock" prefork=1
+}
+
+EVENTS {
+ # this is required
+ checkpoint cmd="ctl_cyrusdb -c" period=5
+
+ reauth cmd="/usr/local/bin/ksrvtgt -l 3600 imap @SHORTHOST@ ANDREW.CMU.EDU /imap/conf/srvtab" period=30
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/normal.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/normal.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/normal.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/normal.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,42 @@
+# standard standalone server implementation
+
+START {
+ # do not delete this entry!
+ recover cmd="ctl_cyrusdb -r"
+
+ # this is only necessary if using idled for IMAP IDLE
+# idled cmd="idled"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/socket
+SERVICES {
+ # add or remove based on preferences
+ imap cmd="imapd" listen="imap" prefork=0
+ imaps cmd="imapd -s" listen="imaps" prefork=0
+ pop3 cmd="pop3d" listen="pop3" prefork=0
+ pop3s cmd="pop3d -s" listen="pop3s" prefork=0
+ sieve cmd="timsieved" listen="sieve" prefork=0
+
+ # these are only necessary if receiving/exporting usenet via NNTP
+# nntp cmd="nntpd" listen="nntp" prefork=0
+# nntps cmd="nntpd -s" listen="nntps" prefork=0
+
+ # at least one LMTP is required for delivery
+# lmtp cmd="lmtpd" listen="lmtp" prefork=0
+ lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
+
+ # this is required if using notifications
+# notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
+}
+
+EVENTS {
+ # this is required
+ checkpoint cmd="ctl_cyrusdb -c" period=30
+
+ # this is only necessary if using duplicate delivery suppression,
+ # Sieve or NNTP
+ delprune cmd="cyr_expire -E 3" at=0400
+
+ # this is only necessary if caching TLS sessions
+ tlsprune cmd="tls_prune" at=0400
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/prefork.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/prefork.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/prefork.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/prefork.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,42 @@
+# standard standalone server implementation
+
+START {
+ # do not delete this entry!
+ recover cmd="ctl_cyrusdb -r"
+
+ # this is only necessary if using idled for IMAP IDLE
+# idled cmd="idled"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/sockets
+SERVICES {
+ # add or remove based on preferences
+ imap cmd="imapd" listen="imap" prefork=5
+ imaps cmd="imapd -s" listen="imaps" prefork=1
+ pop3 cmd="pop3d" listen="pop3" prefork=3
+ pop3s cmd="pop3d -s" listen="pop3s" prefork=1
+ sieve cmd="timsieved" listen="sieve" prefork=0
+
+ # these are only necessary if receiving/exporting usenet via NNTP
+# nntp cmd="nntpd" listen="nntp" prefork=3
+# nntps cmd="nntpd -s" listen="nntps" prefork=1
+
+ # at least one LMTP is required for delivery
+# lmtp cmd="lmtpd" listen="lmtp" prefork=0
+ lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=1
+
+ # this is only necessary if using notifications
+# notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
+}
+
+EVENTS {
+ # this is required
+ checkpoint cmd="ctl_cyrusdb -c" period=30
+
+ # this is only necessary if using duplicate delivery suppression,
+ # Sieve or NNTP
+ delprune cmd="cyr_expire -E 3" at=0400
+
+ # this is only necessary if caching TLS sessions
+ tlsprune cmd="tls_prune" at=0400
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/small.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/small.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/small.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/conf/small.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,33 @@
+# standard standalone server implementation
+
+START {
+ # do not delete this entry!
+ recover cmd="ctl_cyrusdb -r"
+
+ # this is only necessary if using idled for IMAP IDLE
+# idled cmd="idled"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/sockets
+SERVICES {
+ # add or remove based on preferences
+ imap cmd="imapd" listen="imap" prefork=0
+ pop3 cmd="pop3d" listen="pop3" prefork=0
+
+ # LMTP is required for delivery
+ lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
+
+ # this is only necessary if using notifications
+# notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
+}
+
+EVENTS {
+ # this is required
+ checkpoint cmd="ctl_cyrusdb -c" period=30
+
+ # this is only necessary if using duplicate delivery suppression
+ delprune cmd="ctl_deliver -E 3" at=0400
+
+ # this is only necessary if caching TLS sessions
+ tlsprune cmd="tls_prune" at=0400
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,240 @@
+#include <config.h>
+
+#if defined(HAVE_UCDSNMP) || defined(HAVE_NETSNMP)
+
+/* This file was generated by mib2c and is intended for use as a mib module
+ for the ucd-snmp snmpd agent. */
+
+
+#ifdef HAVE_NETSNMP
+ #include <net-snmp/net-snmp-config.h>
+ #include <net-snmp/net-snmp-includes.h>
+ #include <net-snmp/agent/net-snmp-agent-includes.h>
+ #include <net-snmp/utilities.h>
+#else
+
+#ifdef IN_UCD_SNMP_SOURCE
+/* If we're compiling this file inside the ucd-snmp source tree */
+
+
+/* This should always be included first before anything else */
+#include <config.h>
+
+
+/* minimal include directives */
+#include "mibincl.h"
+#include "util_funcs.h"
+
+
+#else /* !IN_UCD_SNMP_SOURCE */
+
+
+#include <ucd-snmp/ucd-snmp-config.h>
+#include <ucd-snmp/ucd-snmp-includes.h>
+#include <ucd-snmp/ucd-snmp-agent-includes.h>
+#include <ucd-snmp/util_funcs.h>
+
+
+#endif /* !IN_UCD_SNMP_SOURCE */
+
+#endif /* HAVE_NETSNMP */
+
+#include <time.h>
+#include <string.h>
+
+#include "cyrusMasterMIB.h"
+
+#include "master.h"
+#include "../imap/version.h"
+
+/*
+ * cyrusMasterMIB_variables_oid:
+ * this is the top level oid that we want to register under. This
+ * is essentially a prefix, with the suffix appearing in the
+ * variable below.
+ */
+
+oid cyrusMasterMIB_variables_oid[] = { 1,3,6,1,4,1,3,6,1 };
+
+
+/*
+ * variable4 cyrusMasterMIB_variables:
+ * this variable defines function callbacks and type return information
+ * for the cyrusMasterMIB mib section
+ */
+
+
+struct variable4 cyrusMasterMIB_variables[] = {
+/* magic number , variable type , ro/rw , callback fn , L, oidsuffix */
+#define CYRUSMASTERINFODESCR 1
+ { CYRUSMASTERINFODESCR, ASN_OCTET_STR , RONLY , var_cyrusMasterMIB, 2, { 1,1 } },
+#define CYRUSMASTERINFOVERS 2
+ { CYRUSMASTERINFOVERS , ASN_OCTET_STR , RONLY , var_cyrusMasterMIB, 2, { 1,2 } },
+#define CYRUSMASTERINFOUPTIME 3
+ { CYRUSMASTERINFOUPTIME , ASN_TIMETICKS , RONLY , var_cyrusMasterMIB, 2, { 1,3 } },
+#define SERVICEFORKS 5
+ { SERVICEFORKS , ASN_COUNTER , RONLY , var_serviceTable, 3, { 2,1,1 } },
+#define SERVICEACTIVE 6
+ { SERVICEACTIVE , ASN_GAUGE , RONLY , var_serviceTable, 3, { 2,1,2 } },
+#define SERVICENAME 7
+ { SERVICENAME , ASN_OCTET_STR , RONLY , var_serviceTable, 3, { 2,1,3 } },
+#define SERVICEID 8
+ { SERVICEID , ASN_INTEGER , NOACCESS , var_serviceTable, 3, { 2,1,4 } },
+#define SERVICECONNS 9
+ { SERVICECONNS , ASN_COUNTER , NOACCESS , var_serviceTable, 3, { 2,1,5 } },
+};
+/* (L = length of the oidsuffix) */
+
+
+static time_t startTime = 0;
+
+/*
+ * init_cyrusMasterMIB():
+ * Initialization routine. This is called when the agent starts up.
+ * At a minimum, registration of your variables should take place here.
+ */
+void init_cyrusMasterMIB(void)
+{
+ /* register ourselves with the agent to handle our mib tree */
+ REGISTER_MIB("cyrusMasterMIB", cyrusMasterMIB_variables, variable4,
+ cyrusMasterMIB_variables_oid);
+
+
+ /* place any other initialization junk you need here */
+ if (!startTime) {
+ startTime = time(NULL);
+ }
+}
+
+
+/*
+ * var_cyrusMasterMIB():
+ * This function is called every time the agent gets a request for
+ * a scalar variable that might be found within your mib section
+ * registered above. It is up to you to do the right thing and
+ * return the correct value.
+ * You should also correct the value of "var_len" if necessary.
+ *
+ * Please see the documentation for more information about writing
+ * module extensions, and check out the examples in the examples
+ * and mibII directories.
+ */
+unsigned char *
+var_cyrusMasterMIB(struct variable *vp,
+ oid *name,
+ size_t *length,
+ int exact,
+ size_t *var_len,
+ WriteMethod **write_method)
+{
+ /* variables we may use later */
+ static long long_ret;
+ static unsigned char string[SPRINT_MAX_LEN];
+ /* static oid objid[MAX_OID_LEN]; */
+ /* static struct counter64 c64; */
+
+ if (header_generic(vp,name,length,exact,var_len,write_method)
+ == MATCH_FAILED )
+ return NULL;
+
+ /*
+ * this is where we do the value assignments for the mib results.
+ */
+ switch(vp->magic) {
+ case CYRUSMASTERINFODESCR:
+ strlcpy(string, "Cyrus IMAP server master process", sizeof(string));
+ *var_len = strlen(string);
+ return (unsigned char *) string;
+
+ case CYRUSMASTERINFOVERS:
+ strlcpy(string, CYRUS_VERSION, sizeof(string));
+ *var_len = strlen(string);
+ return (unsigned char *) string;
+
+ case CYRUSMASTERINFOUPTIME:
+ long_ret = 100 * (time(NULL) - startTime);
+ return (unsigned char *) &long_ret;
+
+ default:
+ ERROR_MSG("");
+ }
+ return NULL;
+}
+
+
+/*
+ * var_serviceTable():
+ * Handle this table separately from the scalar value case.
+ * The workings of this are basically the same as for var_cyrusMasterMIB above.
+ */
+unsigned char *
+var_serviceTable(struct variable *vp,
+ oid *name,
+ size_t *length,
+ int exact,
+ size_t *var_len,
+ WriteMethod **write_method)
+{
+ /* variables we may use later */
+ static long long_ret;
+ static unsigned char string[SPRINT_MAX_LEN];
+ /* static oid objid[MAX_OID_LEN]; */
+ /* static struct counter64 c64; */
+ int index;
+
+ /*
+ * This assumes that the table is a 'simple' table.
+ * See the implementation documentation for the meaning of this.
+ * You will need to provide the correct value for the TABLE_SIZE parameter
+ *
+ * If this table does not meet the requirements for a simple table,
+ * you will need to provide the replacement code yourself.
+ * Mib2c is not smart enough to write this for you.
+ * Again, see the implementation documentation for what is required.
+ */
+ if (header_simple_table(vp,name,length,exact,var_len,write_method, nservices)
+ == MATCH_FAILED )
+ return NULL;
+
+
+ index = name[*length - 1];
+
+ /*
+ * this is where we do the value assignments for the mib results.
+ */
+ switch(vp->magic) {
+ case SERVICEFORKS:
+ long_ret = Services[index - 1].nforks;
+ return (unsigned char *) &long_ret;
+
+ case SERVICEACTIVE:
+ long_ret = Services[index - 1].nactive;
+ return (unsigned char *) &long_ret;
+
+ case SERVICENAME:
+ strlcpy(string, Services[index - 1].name, sizeof(string));
+ if(Services[index - 1].family == AF_INET6) {
+ strlcat(string, "[v6]", sizeof(string));
+ }
+ *var_len = strlen(string);
+ return (unsigned char *) string;
+
+ case SERVICEID:
+ long_ret = index;
+ return (unsigned char *) &long_ret;
+
+ case SERVICECONNS:
+ long_ret = Services[index - 1].nconnections;
+ return (unsigned char *) &long_ret;
+
+ default:
+ ERROR_MSG("");
+ }
+ return NULL;
+}
+
+
+
+
+
+#endif /* HAVE_UCDSNMP || HAVE_NETSNMP */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/cyrusMasterMIB.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,26 @@
+/* This file was generated by mib2c and is intended for use as a mib module
+ for the ucd-snmp snmpd agent. */
+
+
+#ifndef _MIBGROUP_CYRUSMASTERMIB_H
+#define _MIBGROUP_CYRUSMASTERMIB_H
+
+
+/* we may use header_generic and header_simple_table from the util_funcs module */
+
+
+config_require(util_funcs)
+
+
+/* function prototypes */
+
+
+void init_cyrusMasterMIB(void);
+FindVarMethod var_cyrusMasterMIB;
+FindVarMethod var_serviceTable;
+
+
+
+
+
+#endif /* _MIBGROUP_CYRUSMASTERMIB_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2130 @@
+/* master.c -- IMAP master process to handle recovery, checkpointing, spawning
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: master.c,v 1.85.2.15 2005/04/06 20:37:00 ken3 Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <sys/time.h>
+#include <grp.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+#include <fcntl.h>
+#include <signal.h>
+#include <pwd.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <netdb.h>
+#include <ctype.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/un.h>
+#include <arpa/inet.h>
+#include <sysexits.h>
+#include <errno.h>
+#include <limits.h>
+
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
+#ifndef INADDR_ANY
+#define INADDR_ANY 0x00000000
+#endif
+
+#if !defined(IPV6_V6ONLY) && defined(IPV6_BINDV6ONLY)
+#define IPV6_V6ONLY IPV6_BINDV6ONLY
+#endif
+
+#if defined(HAVE_NETSNMP)
+ #include <net-snmp/net-snmp-config.h>
+ #include <net-snmp/net-snmp-includes.h>
+ #include <net-snmp/agent/net-snmp-agent-includes.h>
+#elif defined(HAVE_UCDSNMP)
+ #include <ucd-snmp/ucd-snmp-config.h>
+ #include <ucd-snmp/ucd-snmp-includes.h>
+ #include <ucd-snmp/ucd-snmp-agent-includes.h>
+
+ #include "cyrusMasterMIB.h"
+
+ int allow_severity = LOG_DEBUG;
+ int deny_severity = LOG_ERR;
+#endif
+
+#include "masterconf.h"
+
+#include "master.h"
+#include "service.h"
+
+#include "lock.h"
+
+#include "xmalloc.h"
+
+#include "message_uuid_master.h"
+
+enum {
+ become_cyrus_early = 1,
+ child_table_size = 10000,
+ child_table_inc = 100
+};
+
+static int verbose = 0;
+static int listen_queue_backlog = 32;
+static int pidfd = -1;
+static int have_uuid = 0;
+
+const char *MASTER_CONFIG_FILENAME = DEFAULT_MASTER_CONFIG_FILENAME;
+
+#define SERVICE_NONE -1
+#define SERVICE_MAX INT_MAX-10
+#define SERVICENAME(x) ((x) ? x : "unknown")
+
+struct service *Services = NULL;
+int allocservices = 0;
+int nservices = 0;
+
+/* make libcyrus_min happy */
+int config_need_data = 0;
+
+struct event {
+ char *name;
+ time_t mark;
+ time_t period;
+ int periodic;
+ char *const *exec;
+ struct event *next;
+};
+static struct event *schedule = NULL;
+
+enum sstate {
+ SERVICE_STATE_UNKNOWN = 0, /* duh */
+ SERVICE_STATE_INIT = 1, /* Service forked - UNUSED */
+ SERVICE_STATE_READY = 2, /* Service told us it is ready */
+ /* or it just forked and has not
+ * talked to us yet */
+ SERVICE_STATE_BUSY = 3, /* Service told us it is not ready */
+ SERVICE_STATE_DEAD = 4 /* We received a sigchld from this service */
+};
+
+struct centry {
+ pid_t pid;
+ enum sstate service_state; /* SERVICE_STATE_* */
+ time_t janitor_deadline; /* cleanup deadline */
+ int si; /* Services[] index */
+ struct centry *next;
+};
+static struct centry *ctable[child_table_size];
+static struct centry *cfreelist;
+
+static int janitor_frequency = 1; /* Janitor sweeps per second */
+static int janitor_position; /* Entry to begin at in next sweep */
+static struct timeval janitor_mark; /* Last time janitor did a sweep */
+
+void limit_fds(rlim_t);
+void schedule_event(struct event *a);
+
+void fatal(const char *msg, int code)
+{
+ syslog(LOG_CRIT, "%s", msg);
+ syslog(LOG_NOTICE, "exiting");
+ exit(code);
+}
+
+void event_free(struct event *a)
+{
+ if(a->exec) free((char**)a->exec);
+ if(a->name) free((char*)a->name);
+ free(a);
+}
+
+int become_cyrus(void)
+{
+ struct passwd *p;
+ int newuid, newgid;
+ int result;
+ static int uid = 0;
+
+ if (uid) return setuid(uid);
+
+ p = getpwnam(CYRUS_USER);
+ if (p == NULL) {
+ syslog(LOG_ERR, "no entry in /etc/passwd for user %s", CYRUS_USER);
+ return -1;
+ }
+
+ /* Save these in case initgroups does a getpw*() */
+ newuid = p->pw_uid;
+ newgid = p->pw_gid;
+
+ if (initgroups(CYRUS_USER, newgid)) {
+ syslog(LOG_ERR, "unable to initialize groups for user %s: %s",
+ CYRUS_USER, strerror(errno));
+ return -1;
+ }
+
+ if (setgid(newgid)) {
+ syslog(LOG_ERR, "unable to set group id to %d for user %s: %s",
+ newgid, CYRUS_USER, strerror(errno));
+ return -1;
+ }
+
+ result = setuid(newuid);
+
+ /* Only set static uid if successful, else future calls won't reset gid */
+ if (result == 0)
+ uid = newuid;
+ return result;
+}
+
+void get_prog(char *path, unsigned size, char *const *cmd)
+{
+ if (cmd[0][0] == '/') {
+ /* master lacks strlcpy, due to no libcyrus */
+ snprintf(path, size, "%s", cmd[0]);
+ }
+ else snprintf(path, size, "%s/%s", SERVICE_PATH, cmd[0]);
+}
+
+void get_statsock(int filedes[2])
+{
+ int r, fdflags;
+
+ r = pipe(filedes);
+ if (r != 0) {
+ fatal("couldn't create status socket: %m", 1);
+ }
+
+ /* we don't want the master blocking on reads */
+ fdflags = fcntl(filedes[0], F_GETFL, 0);
+ if (fdflags != -1) fdflags = fcntl(filedes[0], F_SETFL,
+ fdflags | O_NONBLOCK);
+ if (fdflags == -1) {
+ fatal("unable to set non-blocking: %m", 1);
+ }
+ /* we don't want the services to be able to read from it */
+ fdflags = fcntl(filedes[0], F_GETFD, 0);
+ if (fdflags != -1) fdflags = fcntl(filedes[0], F_SETFD,
+ fdflags | FD_CLOEXEC);
+ if (fdflags == -1) {
+ fatal("unable to set close-on-exec: %m", 1);
+ }
+}
+
+/* return a new 'centry', either from the freelist or by malloc'ing it */
+static struct centry *get_centry(void)
+{
+ struct centry *t;
+
+ if (!cfreelist) {
+ /* create child_table_inc more and add them to the freelist */
+ struct centry *n;
+ int i;
+
+ n = xmalloc(child_table_inc * sizeof(struct centry));
+ cfreelist = n;
+ for (i = 0; i < child_table_inc - 1; i++) {
+ n[i].next = n + (i + 1);
+ }
+ /* i == child_table_inc - 1, last item in block */
+ n[i].next = NULL;
+ }
+
+ t = cfreelist;
+ cfreelist = cfreelist->next;
+
+ t->janitor_deadline = 0;
+
+ return t;
+}
+
+/* see if 'listen' parameter has both hostname and port, or just port */
+char *parse_listen(char *listen)
+{
+ char *cp;
+ char *port = NULL;
+
+ if ((cp = strrchr(listen,']')) != NULL) {
+ /* ":port" after closing bracket for IP address? */
+ if (*cp++ != '\0' && *cp == ':') {
+ *cp++ = '\0';
+ if (*cp != '\0') {
+ port = cp;
+ }
+ }
+ } else if ((cp = strrchr(listen,':')) != NULL) {
+ /* ":port" after hostname? */
+ *cp++ = '\0';
+ if (*cp != '\0') {
+ port = cp;
+ }
+ }
+ return port;
+}
+
+char *parse_host(char *listen)
+{
+ char *cp;
+
+ /* do we have a hostname, or IP number? */
+ /* XXX are brackets necessary */
+ if (*listen == '[') {
+ listen++; /* skip first bracket */
+ if ((cp = strrchr(listen,']')) != NULL) {
+ *cp = '\0';
+ }
+ }
+ return listen;
+}
+
+int verify_service_file(char *const *filename)
+{
+ char path[PATH_MAX];
+ struct stat statbuf;
+
+ get_prog(path, sizeof(path), filename);
+ if (stat(path, &statbuf)) return 0;
+ if (! S_ISREG(statbuf.st_mode)) return 0;
+ return statbuf.st_mode & S_IXUSR;
+}
+
+void service_create(struct service *s)
+{
+ struct service service0, service;
+ struct addrinfo hints, *res0, *res;
+ int error, nsocket = 0;
+ struct sockaddr_un sunsock;
+ mode_t oldumask;
+ int on = 1;
+ int res0_is_local = 0;
+ int r;
+
+ if (s->associate > 0)
+ return; /* service is already activated */
+
+ if (!s->name)
+ fatal("Serious software bug found: service_create() called on unnamed service!",
+ EX_SOFTWARE);
+
+ if (s->listen[0] == '/') { /* unix socket */
+ res0_is_local = 1;
+ res0 = (struct addrinfo *)malloc(sizeof(struct addrinfo));
+ if (!res0)
+ fatal("out of memory", EX_UNAVAILABLE);
+ memset(res0, 0, sizeof(struct addrinfo));
+ res0->ai_flags = AI_PASSIVE;
+ res0->ai_family = PF_UNIX;
+ if(!strcmp(s->proto, "tcp")) {
+ res0->ai_socktype = SOCK_STREAM;
+ } else {
+ /* udp */
+ res0->ai_socktype = SOCK_DGRAM;
+ }
+ res0->ai_addr = (struct sockaddr *)&sunsock;
+ res0->ai_addrlen = sizeof(sunsock.sun_family) + strlen(s->listen) + 1;
+#ifdef SIN6_LEN
+ res0->ai_addrlen += sizeof(sunsock.sun_len);
+ sunsock.sun_len = res0->ai_addrlen;
+#endif
+ sunsock.sun_family = AF_UNIX;
+ strcpy(sunsock.sun_path, s->listen);
+ unlink(s->listen);
+ } else { /* inet socket */
+ char *listen, *port;
+ char *listen_addr;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_flags = AI_PASSIVE;
+ if (!strcmp(s->proto, "tcp")) {
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ } else if (!strcmp(s->proto, "tcp4")) {
+ hints.ai_family = PF_INET;
+ hints.ai_socktype = SOCK_STREAM;
+#ifdef PF_INET6
+ } else if (!strcmp(s->proto, "tcp6")) {
+ hints.ai_family = PF_INET6;
+ hints.ai_socktype = SOCK_STREAM;
+#endif
+ } else if (!strcmp(s->proto, "udp")) {
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_DGRAM;
+ } else if (!strcmp(s->proto, "udp4")) {
+ hints.ai_family = PF_INET;
+ hints.ai_socktype = SOCK_DGRAM;
+#ifdef PF_INET6
+ } else if (!strcmp(s->proto, "udp6")) {
+ hints.ai_family = PF_INET6;
+ hints.ai_socktype = SOCK_DGRAM;
+#endif
+ } else {
+ syslog(LOG_INFO, "invalid proto '%s', disabling %s",
+ s->proto, s->name);
+ s->exec = NULL;
+ return;
+ }
+
+ /* parse_listen() and resolve_host() are destructive,
+ * so make a work copy of s->listen
+ */
+ listen = xstrdup(s->listen);
+
+ if ((port = parse_listen(listen)) == NULL) {
+ /* listen IS the port */
+ port = listen;
+ listen_addr = NULL;
+ } else {
+ /* s->listen is now just the address */
+ listen_addr = parse_host(listen);
+ if (*listen_addr == '\0')
+ listen_addr = NULL;
+ }
+
+ error = getaddrinfo(listen_addr, port, &hints, &res0);
+
+ free(listen);
+
+ if (error) {
+ syslog(LOG_INFO, "%s, disabling %s", gai_strerror(error), s->name);
+ s->exec = NULL;
+ return;
+ }
+ }
+
+ memcpy(&service0, s, sizeof(struct service));
+
+ for (res = res0; res; res = res->ai_next) {
+ if (s->socket > 0) {
+ memcpy(&service, &service0, sizeof(struct service));
+ s = &service;
+ }
+
+ s->socket = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+ if (s->socket < 0) {
+ s->socket = 0;
+ if (verbose > 2)
+ syslog(LOG_ERR, "unable to open %s socket: %m", s->name);
+ continue;
+ }
+
+ /* allow reuse of address */
+ r = setsockopt(s->socket, SOL_SOCKET, SO_REUSEADDR,
+ (void *) &on, sizeof(on));
+ if (r < 0) {
+ syslog(LOG_ERR, "unable to setsocketopt(SO_REUSEADDR): %m");
+ }
+#if defined(IPV6_V6ONLY) && !(defined(__FreeBSD__) && __FreeBSD__ < 3)
+ if (res->ai_family == AF_INET6) {
+ r = setsockopt(s->socket, IPPROTO_IPV6, IPV6_V6ONLY,
+ (void *) &on, sizeof(on));
+ if (r < 0) {
+ syslog(LOG_ERR, "unable to setsocketopt(IPV6_V6ONLY): %m");
+ }
+ }
+#endif
+
+ oldumask = umask((mode_t) 0); /* for linux */
+ r = bind(s->socket, res->ai_addr, res->ai_addrlen);
+ umask(oldumask);
+ if (r < 0) {
+ close(s->socket);
+ s->socket = 0;
+ if (verbose > 2)
+ syslog(LOG_ERR, "unable to bind to %s socket: %m", s->name);
+ continue;
+ }
+
+ if (s->listen[0] == '/') { /* unix socket */
+ /* for DUX, where this isn't the default.
+ (harmlessly fails on some systems) */
+ chmod(s->listen, (mode_t) 0777);
+ }
+
+ if ((!strcmp(s->proto, "tcp") || !strcmp(s->proto, "tcp4")
+ || !strcmp(s->proto, "tcp6"))
+ && listen(s->socket, listen_queue_backlog) < 0) {
+ syslog(LOG_ERR, "unable to listen to %s socket: %m", s->name);
+ close(s->socket);
+ s->socket = 0;
+ continue;
+ }
+
+ s->ready_workers = 0;
+ s->associate = nsocket;
+ s->family = res->ai_family;
+
+ get_statsock(s->stat);
+
+ if (s == &service) {
+ if (nservices == allocservices) {
+ if (allocservices > SERVICE_MAX - 5)
+ fatal("out of service structures, please restart", EX_UNAVAILABLE);
+ Services = xrealloc(Services,
+ (allocservices+=5) * sizeof(struct service));
+ if (!Services) fatal("out of memory", EX_UNAVAILABLE);
+ }
+ memcpy(&Services[nservices++], s, sizeof(struct service));
+ }
+ nsocket++;
+ }
+ if (res0) {
+ if(res0_is_local)
+ free(res0);
+ else
+ freeaddrinfo(res0);
+ }
+ if (nsocket <= 0) {
+ syslog(LOG_ERR, "unable to create %s listener socket: %m", s->name);
+ s->exec = NULL;
+ return;
+ }
+}
+
+void run_startup(char **cmd)
+{
+ pid_t pid;
+ int status;
+ char path[PATH_MAX];
+
+ switch (pid = fork()) {
+ case -1:
+ syslog(LOG_CRIT, "can't fork process to run startup: %m");
+ fatal("can't run startup", 1);
+ break;
+
+ case 0:
+ /* Child - Release our pidfile lock. */
+ if(pidfd != -1) close(pidfd);
+
+ if (become_cyrus() != 0) {
+ syslog(LOG_ERR, "can't change to the cyrus user: %m");
+ exit(1);
+ }
+
+ limit_fds(256);
+
+ get_prog(path, sizeof(path), cmd);
+ syslog(LOG_DEBUG, "about to exec %s", path);
+ execv(path, cmd);
+ syslog(LOG_ERR, "can't exec %s for startup: %m", path);
+ exit(EX_OSERR);
+
+ default: /* parent */
+ if (waitpid(pid, &status, 0) < 0) {
+ syslog(LOG_ERR, "waitpid(): %m");
+ } else if (status != 0) {
+ if (WIFEXITED(status)) {
+ syslog(LOG_ERR, "process %d exited, status %d\n", pid,
+ WEXITSTATUS(status));
+ }
+ if (WIFSIGNALED(status)) {
+ syslog(LOG_ERR,
+ "process %d exited, signaled to death by %d\n",
+ pid, WTERMSIG(status));
+ }
+ }
+ break;
+ }
+}
+
+void fcntl_unset(int fd, int flag)
+{
+ int fdflags = fcntl(fd, F_GETFD, 0);
+ if (fdflags != -1) fdflags = fcntl(STATUS_FD, F_SETFD,
+ fdflags & ~flag);
+ if (fdflags == -1) {
+ syslog(LOG_ERR, "fcntl(): unable to unset %d: %m", flag);
+ }
+}
+
+void spawn_service(const int si)
+{
+ /* Note that there is logic that depends on this being 2 */
+ const int FORKRATE_INTERVAL = 2;
+
+ pid_t p;
+ int i;
+ char path[PATH_MAX];
+ static char name_env[100], name_env2[100];
+ struct centry *c;
+ struct service * const s = &Services[si];
+ time_t now = time(NULL);
+ struct message_uuid uuid_prefix;
+ char *uuid_prefix_text;
+ static char uuid_env[100];
+
+ if (!s->name) {
+ fatal("Serious software bug found: spawn_service() called on unnamed service!",
+ EX_SOFTWARE);
+ }
+
+ /* update our fork rate */
+ if(now - s->last_interval_start >= FORKRATE_INTERVAL) {
+ int interval;
+
+ s->forkrate = (s->interval_forks/2) + (s->forkrate/2);
+ s->interval_forks = 0;
+ s->last_interval_start += FORKRATE_INTERVAL;
+
+ /* if there is an even wider window, however, we need
+ * to account for a good deal of zeros, we can do this at once */
+ interval = now - s->last_interval_start;
+
+ if(interval > 2) {
+ int skipped_intervals = interval / FORKRATE_INTERVAL;
+ /* avoid a > 30 bit right shift) */
+ if(skipped_intervals > 30) s->forkrate = 0;
+ else {
+ /* divide by 2^(skipped_intervals).
+ * this is the logic mentioned in the comment above */
+ s->forkrate >>= skipped_intervals;
+ s->last_interval_start = now;
+ }
+ }
+ }
+
+ /* If we've been busy lately, we will refuse to fork! */
+ /* (We schedule a wakeup call for sometime soon though to be
+ * sure that we don't wait to do the fork that is required forever! */
+ if(s->maxforkrate && s->forkrate >= s->maxforkrate) {
+ struct event *evt = (struct event *) xmalloc(sizeof(struct event));
+
+ memset(evt, 0, sizeof(struct event));
+
+ evt->name = xstrdup("forkrate wakeup call");
+ evt->mark = time(NULL) + FORKRATE_INTERVAL;
+ schedule_event(evt);
+
+ return;
+ }
+
+ if (s->provide_uuid) {
+ if (!message_uuid_master_next_child(&uuid_prefix)) {
+ syslog(LOG_ERR, "Failed to generate UUID for %s", s->name);
+ message_uuid_set_null(&uuid_prefix);
+ }
+
+ if (!message_uuid_master_checksum(&uuid_prefix)) {
+ syslog(LOG_ERR, "Failed to checksum UUID for %s", s->name);
+ message_uuid_set_null(&uuid_prefix);
+ }
+
+ uuid_prefix_text = message_uuid_text(&uuid_prefix);
+ } else
+ uuid_prefix_text = NULL;
+
+ switch (p = fork()) {
+ case -1:
+ syslog(LOG_ERR, "can't fork process to run service %s: %m", s->name);
+ break;
+
+ case 0:
+ /* Child - Release our pidfile lock. */
+ if(pidfd != -1) close(pidfd);
+
+ if (become_cyrus() != 0) {
+ syslog(LOG_ERR, "can't change to the cyrus user");
+ exit(1);
+ }
+
+ get_prog(path, sizeof(path), s->exec);
+ if (dup2(s->stat[1], STATUS_FD) < 0) {
+ syslog(LOG_ERR, "can't duplicate status fd: %m");
+ exit(1);
+ }
+ if (dup2(s->socket, LISTEN_FD) < 0) {
+ syslog(LOG_ERR, "can't duplicate listener fd: %m");
+ exit(1);
+ }
+
+ fcntl_unset(STATUS_FD, FD_CLOEXEC);
+ fcntl_unset(LISTEN_FD, FD_CLOEXEC);
+
+ /* close all listeners */
+ for (i = 0; i < nservices; i++) {
+ if (Services[i].socket > 0) close(Services[i].socket);
+ if (Services[i].stat[0] > 0) close(Services[i].stat[0]);
+ if (Services[i].stat[1] > 0) close(Services[i].stat[1]);
+ }
+ limit_fds(s->maxfds);
+
+ syslog(LOG_DEBUG, "about to exec %s", path);
+
+ /* add service name to environment */
+ snprintf(name_env, sizeof(name_env), "CYRUS_SERVICE=%s", s->name);
+ putenv(name_env);
+ snprintf(name_env2, sizeof(name_env2), "CYRUS_ID=%d", s->associate);
+ putenv(name_env2);
+
+ /* add UUID prefix to environment */
+ if (s->provide_uuid) {
+ snprintf(uuid_env, sizeof(uuid_env), "CYRUS_UUID_PREFIX=%s",
+ uuid_prefix_text);
+ putenv(uuid_env);
+ }
+
+ execv(path, s->exec);
+ syslog(LOG_ERR, "couldn't exec %s: %m", path);
+ exit(EX_OSERR);
+
+ default: /* parent */
+ s->ready_workers++;
+ s->interval_forks++;
+ s->nforks++;
+ s->nactive++;
+
+ /* add to child table */
+ c = get_centry();
+ c->pid = p;
+ c->service_state = SERVICE_STATE_READY;
+ c->si = si;
+ c->next = ctable[p % child_table_size];
+ ctable[p % child_table_size] = c;
+ break;
+ }
+
+}
+
+void schedule_event(struct event *a)
+{
+ struct event *ptr;
+
+ if (! a->name)
+ fatal("Serious software bug found: schedule_event() called on unnamed event!",
+ EX_SOFTWARE);
+
+ if (!schedule || a->mark < schedule->mark) {
+ a->next = schedule;
+ schedule = a;
+
+ return;
+ }
+ for (ptr = schedule; ptr->next && ptr->next->mark <= a->mark;
+ ptr = ptr->next) ;
+
+ /* insert a */
+ a->next = ptr->next;
+ ptr->next = a;
+}
+
+void spawn_schedule(time_t now)
+{
+ struct event *a, *b;
+ int i;
+ char path[PATH_MAX];
+ pid_t p;
+ struct centry *c;
+
+ a = NULL;
+ /* update schedule accordingly */
+ while (schedule && schedule->mark <= now) {
+ /* delete from schedule, insert into a */
+ struct event *ptr = schedule;
+
+ /* delete */
+ schedule = schedule->next;
+
+ /* insert */
+ ptr->next = a;
+ a = ptr;
+ }
+
+ /* run all events */
+ while (a && a != schedule) {
+ /* if a->exec is NULL, we just used the event to wake up,
+ * so we actually don't need to exec anything at the moment */
+ if(a->exec) {
+ switch (p = fork()) {
+ case -1:
+ syslog(LOG_CRIT,
+ "can't fork process to run event %s", a->name);
+ break;
+
+ case 0:
+ /* Child - Release our pidfile lock. */
+ if(pidfd != -1) close(pidfd);
+
+ if (become_cyrus() != 0) {
+ syslog(LOG_ERR, "can't change to the cyrus user");
+ exit(1);
+ }
+
+ /* close all listeners */
+ for (i = 0; i < nservices; i++) {
+ if (Services[i].socket > 0) close(Services[i].socket);
+ if (Services[i].stat[0] > 0) close(Services[i].stat[0]);
+ if (Services[i].stat[1] > 0) close(Services[i].stat[1]);
+ }
+ limit_fds(256);
+
+ get_prog(path, sizeof(path), a->exec);
+ syslog(LOG_DEBUG, "about to exec %s", path);
+ execv(path, a->exec);
+ syslog(LOG_ERR, "can't exec %s on schedule: %m", path);
+ exit(EX_OSERR);
+ break;
+
+ default:
+ /* we don't wait for it to complete */
+
+ /* add to child table */
+ c = get_centry();
+ c->pid = p;
+ c->service_state = SERVICE_STATE_READY;
+ c->si = SERVICE_NONE;
+ c->next = ctable[p % child_table_size];
+ ctable[p % child_table_size] = c;
+
+ break;
+ }
+ } /* a->exec */
+
+ /* reschedule as needed */
+ b = a->next;
+ if (a->period) {
+ if(a->periodic) {
+ a->mark = now + a->period;
+ } else {
+ /* Daily Event */
+ while(a->mark <= now) {
+ a->mark += a->period;
+ }
+ }
+ /* reschedule a */
+ schedule_event(a);
+ } else {
+ event_free(a);
+ }
+ /* examine next event */
+ a = b;
+ }
+}
+
+void reap_child(void)
+{
+ int status;
+ pid_t pid;
+ struct centry *c;
+ struct service *s;
+
+ while ((pid = waitpid((pid_t) -1, &status, WNOHANG)) > 0) {
+ if (WIFEXITED(status)) {
+ syslog(LOG_DEBUG, "process %d exited, status %d", pid,
+ WEXITSTATUS(status));
+ }
+
+ if (WIFSIGNALED(status)) {
+ syslog(LOG_ERR, "process %d exited, signaled to death by %d",
+ pid, WTERMSIG(status));
+ }
+
+ /* account for the child */
+ c = ctable[pid % child_table_size];
+ while(c && c->pid != pid) c = c->next;
+
+ if (c && c->pid == pid) {
+ s = ((c->si) != SERVICE_NONE) ? &Services[c->si] : NULL;
+
+ /* paranoia */
+ switch (c->service_state) {
+ case SERVICE_STATE_READY:
+ case SERVICE_STATE_BUSY:
+ case SERVICE_STATE_UNKNOWN:
+ case SERVICE_STATE_DEAD:
+ break;
+ default:
+ syslog(LOG_CRIT,
+ "service %s pid %d in ILLEGAL STATE: exited. Serious software bug or memory corruption detected!",
+ SERVICENAME(s->name), pid);
+ syslog(LOG_DEBUG,
+ "service %s pid %d in ILLEGAL state: forced to valid UNKNOWN state",
+ SERVICENAME(s->name), pid);
+ c->service_state = SERVICE_STATE_UNKNOWN;
+ }
+ if (s) {
+ /* update counters for known services */
+ switch (c->service_state) {
+ case SERVICE_STATE_READY:
+ s->nactive--;
+ s->ready_workers--;
+ if (WIFSIGNALED(status) ||
+ (WIFEXITED(status) && WEXITSTATUS(status))) {
+ syslog(LOG_WARNING,
+ "service %s pid %d in READY state: terminated abnormally",
+ SERVICENAME(s->name), pid);
+ }
+ break;
+
+ case SERVICE_STATE_DEAD:
+ /* uh? either we got duplicate signals, or we are now MT */
+ syslog(LOG_WARNING,
+ "service %s pid %d in DEAD state: receiving duplicate signals",
+ SERVICENAME(s->name), pid);
+ break;
+
+ case SERVICE_STATE_BUSY:
+ s->nactive--;
+ if (WIFSIGNALED(status) ||
+ (WIFEXITED(status) && WEXITSTATUS(status))) {
+ syslog(LOG_DEBUG,
+ "service %s pid %d in BUSY state: terminated abnormally",
+ SERVICENAME(s->name), pid);
+ }
+ break;
+
+ case SERVICE_STATE_UNKNOWN:
+ s->nactive--;
+ syslog(LOG_WARNING,
+ "service %s pid %d in UNKNOWN state: exited",
+ SERVICENAME(s->name), pid);
+ break;
+ }
+ } else {
+ /* children from spawn_schedule (events) or
+ * children that messaged us before being registered or
+ * children of services removed by reread_conf() */
+ if (c->service_state != SERVICE_STATE_READY) {
+ syslog(LOG_WARNING,
+ "unknown service pid %d in state %d: exited (maybe using a service as an event,"
+ " or a service was removed by SIGHUP?)",
+ pid, c->service_state);
+ }
+ }
+ c->service_state = SERVICE_STATE_DEAD;
+ c->janitor_deadline = time(NULL) + 2;
+ } else {
+ /* weird. Are we multithreaded now? we don't know this child */
+ syslog(LOG_WARNING,
+ "receiving signals from unregistered child %d. Handling it anyway",
+ pid);
+ c = get_centry();
+ c->pid = pid;
+ c->service_state = SERVICE_STATE_DEAD;
+ c->janitor_deadline = time(NULL) + 2;
+ c->si = SERVICE_NONE;
+ c->next = ctable[pid % child_table_size];
+ ctable[pid % child_table_size] = c;
+ }
+ if (verbose && c && (c->si != SERVICE_NONE))
+ syslog(LOG_DEBUG, "service %s now has %d ready workers\n",
+ SERVICENAME(Services[c->si].name),
+ Services[c->si].ready_workers);
+ }
+}
+
+void init_janitor(void)
+{
+ struct event *evt = (struct event *) malloc(sizeof(struct event));
+
+ if (!evt) fatal("out of memory", EX_UNAVAILABLE);
+ memset(evt, 0, sizeof(struct event));
+
+ gettimeofday(&janitor_mark, NULL);
+ janitor_position = 0;
+
+ evt->name = xstrdup("janitor periodic wakeup call");
+ evt->period = 10;
+ evt->mark = time(NULL) + 2;
+ schedule_event(evt);
+}
+
+void child_janitor(time_t now)
+{
+ int i;
+ struct centry **p;
+ struct centry *c;
+ struct timeval rightnow;
+
+ /* Estimate the number of entries to clean up in this sweep */
+ gettimeofday(&rightnow, NULL);
+ if (rightnow.tv_sec > janitor_mark.tv_sec + 1) {
+ /* overflow protection */
+ i = child_table_size;
+ } else {
+ double n;
+
+ n = child_table_size * janitor_frequency *
+ (double) ((rightnow.tv_sec - janitor_mark.tv_sec) * 1000000 +
+ rightnow.tv_usec - janitor_mark.tv_usec ) / 1000000;
+ if (n < child_table_size) {
+ i = n;
+ } else {
+ i = child_table_size;
+ }
+ }
+
+ while (i-- > 0) {
+ p = &ctable[janitor_position++];
+ janitor_position = janitor_position % child_table_size;
+ while (*p) {
+ c = *p;
+ if (c->service_state == SERVICE_STATE_DEAD) {
+ if (c->janitor_deadline < now) {
+ *p = c->next;
+ c->next = cfreelist;
+ cfreelist = c;
+ } else {
+ p = &((*p)->next);
+ }
+ } else {
+ p = &((*p)->next);
+ }
+ }
+ }
+}
+
+static volatile int gotsigchld = 0;
+
+void sigchld_handler(int sig __attribute__((unused)))
+{
+ gotsigchld = 1;
+}
+
+static volatile int gotsighup = 0;
+
+void sighup_handler(int sig __attribute__((unused)))
+{
+ gotsighup = 1;
+}
+
+void sigterm_handler(int sig __attribute__((unused)))
+{
+ struct sigaction action;
+
+ /* send all the other processes SIGTERM, then exit */
+ sigemptyset(&action.sa_mask);
+ action.sa_flags = 0;
+ action.sa_handler = SIG_IGN;
+ if (sigaction(SIGTERM, &action, (struct sigaction *) 0) < 0) {
+ syslog(LOG_ERR, "sigaction: %m");
+ exit(1);
+ }
+ /* kill my process group */
+ if (kill(0, SIGTERM) < 0) {
+ syslog(LOG_ERR, "sigterm_handler: kill(0, SIGTERM): %m");
+ }
+
+#if defined(HAVE_UCDSNMP) || defined(HAVE_NETSNMP)
+ /* tell master agent we're exiting */
+ snmp_shutdown("cyrusMaster");
+#endif
+
+ syslog(LOG_INFO, "exiting on SIGTERM/SIGINT");
+ exit(0);
+}
+
+void sigalrm_handler(int sig __attribute__((unused)))
+{
+ return;
+}
+
+void sighandler_setup(void)
+{
+ struct sigaction action;
+
+ sigemptyset(&action.sa_mask);
+ action.sa_flags = 0;
+
+ action.sa_handler = sighup_handler;
+#ifdef SA_RESTART
+ action.sa_flags |= SA_RESTART;
+#endif
+ if (sigaction(SIGHUP, &action, NULL) < 0) {
+ fatal("unable to install signal handler for SIGHUP: %m", 1);
+ }
+
+ action.sa_handler = sigalrm_handler;
+ if (sigaction(SIGALRM, &action, NULL) < 0) {
+ fatal("unable to install signal handler for SIGALRM: %m", 1);
+ }
+
+ /* Handle SIGTERM and SIGINT the same way -- kill
+ * off our children! */
+ action.sa_handler = sigterm_handler;
+ if (sigaction(SIGTERM, &action, NULL) < 0) {
+ fatal("unable to install signal handler for SIGTERM: %m", 1);
+ }
+ if (sigaction(SIGINT, &action, NULL) < 0) {
+ fatal("unable to install signal handler for SIGINT: %m", 1);
+ }
+
+ action.sa_flags |= SA_NOCLDSTOP;
+ action.sa_handler = sigchld_handler;
+ if (sigaction(SIGCHLD, &action, NULL) < 0) {
+ fatal("unable to install signal handler for SIGCHLD: %m", 1);
+ }
+}
+
+void process_msg(const int si, struct notify_message *msg)
+{
+ struct centry *c;
+ /* si must NOT point to an invalid service */
+ struct service * const s = &Services[si];;
+
+ /* Search hash table with linked list for pid */
+ c = ctable[msg->service_pid % child_table_size];
+ while (c && c->pid != msg->service_pid) c = c->next;
+
+ /* Did we find it? */
+ if (!c || c->pid != msg->service_pid) {
+ syslog(LOG_WARNING, "service %s pid %d: while trying to process message 0x%x: not registered yet",
+ SERVICENAME(s->name), msg->service_pid, msg->message);
+ /* resilience paranoia. Causes small performance loss when used */
+ c = get_centry();
+ c->si = si;
+ c->pid = msg->service_pid;
+ c->service_state = SERVICE_STATE_UNKNOWN;
+ c->next = ctable[c->pid % child_table_size];
+ ctable[c->pid % child_table_size] = c;
+ }
+
+ /* paranoia */
+ if (si != c->si) {
+ syslog(LOG_ERR,
+ "service %s pid %d: changing from service %s due to received message",
+ SERVICENAME(s->name), c->pid,
+ ((c->si != SERVICE_NONE && Services[c->si].name) ? Services[c->si].name : "unknown"));
+ c->si = si;
+ }
+ switch (c->service_state) {
+ case SERVICE_STATE_UNKNOWN:
+ syslog(LOG_WARNING,
+ "service %s pid %d in UNKNOWN state: processing message 0x%x",
+ SERVICENAME(s->name), c->pid, msg->message);
+ break;
+ case SERVICE_STATE_READY:
+ case SERVICE_STATE_BUSY:
+ case SERVICE_STATE_DEAD:
+ break;
+ default:
+ syslog(LOG_CRIT,
+ "service %s pid %d in ILLEGAL state: detected. Serious software bug or memory corruption uncloaked while processing message 0x%x from child!",
+ SERVICENAME(s->name), c->pid, msg->message);
+ syslog(LOG_DEBUG,
+ "service %s pid %d in ILLEGAL state: forced to valid UNKNOWN state",
+ SERVICENAME(s->name), c->pid);
+ c->service_state = SERVICE_STATE_UNKNOWN;
+ break;
+ }
+
+ /* process message, according to state machine */
+ switch (msg->message) {
+ case MASTER_SERVICE_AVAILABLE:
+ switch (c->service_state) {
+ case SERVICE_STATE_READY:
+ /* duplicate message? */
+ syslog(LOG_WARNING,
+ "service %s pid %d in READY state: sent available message but it is already ready",
+ SERVICENAME(s->name), c->pid);
+ break;
+
+ case SERVICE_STATE_UNKNOWN:
+ /* since state is unknwon, error in non-DoS way, i.e.
+ * we don't increment ready_workers */
+ syslog(LOG_DEBUG,
+ "service %s pid %d in UNKNOWN state: now available and in READY state",
+ SERVICENAME(s->name), c->pid);
+ c->service_state = SERVICE_STATE_READY;
+ break;
+
+ case SERVICE_STATE_BUSY:
+ if (verbose)
+ syslog(LOG_DEBUG,
+ "service %s pid %d in BUSY state: now available and in READY state",
+ SERVICENAME(s->name), c->pid);
+ c->service_state = SERVICE_STATE_READY;
+ s->ready_workers++;
+ break;
+ }
+ break;
+
+ case MASTER_SERVICE_UNAVAILABLE:
+ switch (c->service_state) {
+ case SERVICE_STATE_BUSY:
+ /* duplicate message? */
+ syslog(LOG_WARNING,
+ "service %s pid %d in BUSY state: sent unavailable message but it is already busy",
+ SERVICENAME(s->name), c->pid);
+ break;
+
+ case SERVICE_STATE_UNKNOWN:
+ syslog(LOG_DEBUG,
+ "service %s pid %d in UNKNOWN state: now unavailable and in BUSY state",
+ SERVICENAME(s->name), c->pid);
+ c->service_state = SERVICE_STATE_BUSY;
+ break;
+
+ case SERVICE_STATE_READY:
+ if (verbose)
+ syslog(LOG_DEBUG,
+ "service %s pid %d in READY state: now unavailable and in BUSY state",
+ SERVICENAME(s->name), c->pid);
+ c->service_state = SERVICE_STATE_BUSY;
+ s->ready_workers--;
+ break;
+ }
+ break;
+
+ case MASTER_SERVICE_CONNECTION:
+ switch (c->service_state) {
+ case SERVICE_STATE_BUSY:
+ s->nconnections++;
+ if (verbose)
+ syslog(LOG_DEBUG,
+ "service %s pid %d in BUSY state: now serving connection",
+ SERVICENAME(s->name), c->pid);
+ break;
+
+ case SERVICE_STATE_UNKNOWN:
+ s->nconnections++;
+ c->service_state = SERVICE_STATE_BUSY;
+ syslog(LOG_DEBUG,
+ "service %s pid %d in UNKNOWN state: now in BUSY state and serving connection",
+ SERVICENAME(s->name), c->pid);
+ break;
+
+ case SERVICE_STATE_READY:
+ syslog(LOG_ERR,
+ "service %s pid %d in READY state: reported new connection, forced to BUSY state",
+ SERVICENAME(s->name), c->pid);
+ /* be resilient on face of a bogon source, so lets err to the side
+ * of non-denial-of-service */
+ c->service_state = SERVICE_STATE_BUSY;
+ s->nconnections++;
+ s->ready_workers--;
+ }
+ break;
+
+ case MASTER_SERVICE_CONNECTION_MULTI:
+ switch (c->service_state) {
+ case SERVICE_STATE_READY:
+ s->nconnections++;
+ if (verbose)
+ syslog(LOG_DEBUG,
+ "service %s pid %d in READY state: serving one more multi-threaded connection",
+ SERVICENAME(s->name), c->pid);
+ break;
+
+ case SERVICE_STATE_BUSY:
+ syslog(LOG_ERR,
+ "service %s pid %d in BUSY state: serving one more multi-threaded connection, forced to READY state",
+ SERVICENAME(s->name), c->pid);
+ /* be resilient on face of a bogon source, so lets err to the side
+ * of non-denial-of-service */
+ c->service_state = SERVICE_STATE_READY;
+ s->nconnections++;
+ s->ready_workers++;
+ break;
+
+ case SERVICE_STATE_UNKNOWN:
+ s->nconnections++;
+ c->service_state = SERVICE_STATE_READY;
+ syslog(LOG_ERR,
+ "service %s pid %d in UNKNOWN state: serving one more multi-threaded connection, forced to READY state",
+ SERVICENAME(s->name), c->pid);
+ break;
+ }
+ break;
+
+ default:
+ syslog(LOG_CRIT, "service %s pid %d: Software bug: unrecognized message 0x%x",
+ SERVICENAME(s->name), c->pid, msg->message);
+ break;
+ }
+
+ if (verbose)
+ syslog(LOG_DEBUG, "service %s now has %d ready workers\n",
+ SERVICENAME(s->name), s->ready_workers);
+}
+
+static char **tokenize(char *p)
+{
+ char **tokens = NULL; /* allocated in increments of 10 */
+ int i = 0;
+
+ if (!p || !*p) return NULL; /* sanity check */
+ while (*p) {
+ while (*p && isspace((int) *p)) p++; /* skip whitespace */
+
+ if (!(i % 10)) tokens = xrealloc(tokens, (i+10) * sizeof(char *));
+
+ /* got a token */
+ tokens[i++] = p;
+ while (*p && !isspace((int) *p)) p++;
+
+ /* p is whitespace or end of cmd */
+ if (*p) *p++ = '\0';
+ }
+ /* add a NULL on the end */
+ if (!(i % 10)) tokens = xrealloc(tokens, (i+1) * sizeof(char *));
+ if (!tokens) return NULL;
+ tokens[i] = NULL;
+
+ return tokens;
+}
+
+void add_start(const char *name, struct entry *e,
+ void *rock __attribute__((unused)))
+{
+ char *cmd = xstrdup(masterconf_getstring(e, "cmd", ""));
+ char buf[256];
+ char **tok;
+
+ if (!strcmp(cmd,"")) {
+ snprintf(buf, sizeof(buf), "unable to find command for %s", name);
+ fatal(buf, EX_CONFIG);
+ }
+
+ tok = tokenize(cmd);
+ if (!tok) fatal("out of memory", EX_UNAVAILABLE);
+ run_startup(tok);
+ free(tok);
+ free(cmd);
+}
+
+void add_service(const char *name, struct entry *e, void *rock)
+{
+ int ignore_err = (int) rock;
+ char *cmd = xstrdup(masterconf_getstring(e, "cmd", ""));
+ int prefork = masterconf_getint(e, "prefork", 0);
+ int babysit = masterconf_getswitch(e, "babysit", 0);
+ int maxforkrate = masterconf_getint(e, "maxforkrate", 0);
+ char *listen = xstrdup(masterconf_getstring(e, "listen", ""));
+ char *proto = xstrdup(masterconf_getstring(e, "proto", "tcp"));
+ char *max = xstrdup(masterconf_getstring(e, "maxchild", "-1"));
+ rlim_t maxfds = (rlim_t) masterconf_getint(e, "maxfds", 256);
+ int reconfig = 0;
+ int i, j;
+ int provide_uuid = have_uuid && masterconf_getswitch(e, "provide_uuid", 0);
+
+ if(babysit && prefork == 0) prefork = 1;
+ if(babysit && maxforkrate == 0) maxforkrate = 10; /* reasonable safety */
+
+ if (!strcmp(cmd,"") || !strcmp(listen,"")) {
+ char buf[256];
+ snprintf(buf, sizeof(buf),
+ "unable to find command or port for service '%s'", name);
+
+ if (ignore_err) {
+ syslog(LOG_WARNING, "WARNING: %s -- ignored", buf);
+ return;
+ }
+
+ fatal(buf, EX_CONFIG);
+ }
+
+ /* see if we have an existing entry that can be reused */
+ for (i = 0; i < nservices; i++) {
+ /* skip non-primary instances */
+ if (Services[i].associate > 0)
+ continue;
+ /* must have empty/same service name, listen and proto */
+ if ((!Services[i].name || !strcmp(Services[i].name, name)) &&
+ (!Services[i].listen || !strcmp(Services[i].listen, listen)) &&
+ (!Services[i].proto || !strcmp(Services[i].proto, proto)))
+ break;
+ }
+
+ /* we have duplicate service names in the config file */
+ if ((i < nservices) && Services[i].exec) {
+ char buf[256];
+ snprintf(buf, sizeof(buf), "multiple entries for service '%s'", name);
+
+ if (ignore_err) {
+ syslog(LOG_WARNING, "WARNING: %s -- ignored", buf);
+ return;
+ }
+
+ fatal(buf, EX_CONFIG);
+ }
+
+ if (i == nservices) {
+ /* either we don't have an existing entry or we are changing
+ * the port parameters, so create a new service
+ */
+ if (nservices == allocservices) {
+ if (allocservices > SERVICE_MAX - 5)
+ fatal("out of service structures, please restart", EX_UNAVAILABLE);
+ Services = xrealloc(Services,
+ (allocservices+=5) * sizeof(struct service));
+ }
+ memset(&Services[nservices++], 0, sizeof(struct service));
+
+ Services[i].last_interval_start = time(NULL);
+ }
+ else if (Services[i].listen) reconfig = 1;
+
+ if (!Services[i].name) Services[i].name = xstrdup(name);
+ if (Services[i].listen) free(Services[i].listen);
+ Services[i].listen = listen;
+ if (Services[i].proto) free(Services[i].proto);
+ Services[i].proto = proto;
+
+ Services[i].exec = tokenize(cmd);
+ if (!Services[i].exec) fatal("out of memory", EX_UNAVAILABLE);
+
+ /* is this service actually there? */
+ if (!verify_service_file(Services[i].exec)) {
+ char buf[1024];
+ snprintf(buf, sizeof(buf),
+ "cannot find executable for service '%s'", name);
+
+ /* if it is not, we're misconfigured, die. */
+ fatal(buf, EX_CONFIG);
+ }
+
+ Services[i].maxforkrate = maxforkrate;
+ Services[i].maxfds = maxfds;
+ Services[i].provide_uuid = provide_uuid;
+
+ if (!strcmp(Services[i].proto, "tcp") ||
+ !strcmp(Services[i].proto, "tcp4") ||
+ !strcmp(Services[i].proto, "tcp6")) {
+ Services[i].desired_workers = prefork;
+ Services[i].babysit = babysit;
+ Services[i].max_workers = atoi(max);
+ if (Services[i].max_workers == -1) {
+ Services[i].max_workers = INT_MAX;
+ }
+ } else {
+ /* udp */
+ if (prefork > 1) prefork = 1;
+ Services[i].desired_workers = prefork;
+ Services[i].max_workers = 1;
+ }
+ free(max);
+
+ if (reconfig) {
+ /* reconfiguring an existing service, update any other instances */
+ for (j = 0; j < nservices; j++) {
+ if (Services[j].associate > 0 && Services[j].listen &&
+ Services[j].name && !strcmp(Services[j].name, name)) {
+ Services[j].maxforkrate = Services[i].maxforkrate;
+ Services[j].exec = Services[i].exec;
+ Services[j].desired_workers = Services[i].desired_workers;
+ Services[j].babysit = Services[i].babysit;
+ Services[j].max_workers = Services[i].max_workers;
+ Services[j].provide_uuid = Services[i].provide_uuid;
+ }
+ }
+ }
+
+ if (verbose > 2)
+ syslog(LOG_DEBUG, "%s: service '%s' (%s, %s:%s, %d, %d, %d)",
+ reconfig ? "reconfig" : "add",
+ Services[i].name, cmd,
+ Services[i].proto, Services[i].listen,
+ Services[i].desired_workers,
+ Services[i].max_workers,
+ (int) Services[i].maxfds);
+}
+
+void add_event(const char *name, struct entry *e, void *rock)
+{
+ int ignore_err = (int) rock;
+ char *cmd = xstrdup(masterconf_getstring(e, "cmd", ""));
+ int period = 60 * masterconf_getint(e, "period", 0);
+ int at = masterconf_getint(e, "at", -1), hour, min;
+ time_t now = time(NULL);
+ struct event *evt;
+
+ if (!strcmp(cmd,"")) {
+ char buf[256];
+ snprintf(buf, sizeof(buf),
+ "unable to find command or port for event '%s'", name);
+
+ if (ignore_err) {
+ syslog(LOG_WARNING, "WARNING: %s -- ignored", buf);
+ return;
+ }
+
+ fatal(buf, EX_CONFIG);
+ }
+
+ evt = (struct event *) xmalloc(sizeof(struct event));
+ evt->name = xstrdup(name);
+
+ if (at >= 0 && ((hour = at / 100) <= 23) && ((min = at % 100) <= 59)) {
+ struct tm *tm = localtime(&now);
+
+ period = 86400; /* 24 hours */
+ evt->periodic = 0;
+ tm->tm_hour = hour;
+ tm->tm_min = min;
+ tm->tm_sec = 0;
+ if ((evt->mark = mktime(tm)) < now) {
+ /* already missed it, so schedule for next day */
+ evt->mark += period;
+ }
+ }
+ else {
+ evt->periodic = 1;
+ evt->mark = now;
+ }
+ evt->period = period;
+
+ evt->exec = tokenize(cmd);
+ if (!evt->exec) fatal("out of memory", EX_UNAVAILABLE);
+
+ schedule_event(evt);
+}
+
+#ifdef HAVE_SETRLIMIT
+
+#ifdef RLIMIT_NOFILE
+# define RLIMIT_NUMFDS RLIMIT_NOFILE
+#else
+# ifdef RLIMIT_OFILE
+# define RLIMIT_NUMFDS RLIMIT_OFILE
+# endif
+#endif
+void limit_fds(rlim_t x)
+{
+ struct rlimit rl;
+ int r;
+
+ rl.rlim_cur = x;
+ rl.rlim_max = x;
+ if (setrlimit(RLIMIT_NUMFDS, &rl) < 0) {
+ syslog(LOG_ERR, "setrlimit: Unable to set file descriptors limit to %ld: %m", x);
+
+#ifdef HAVE_GETRLIMIT
+
+ if (!getrlimit(RLIMIT_NUMFDS, &rl)) {
+ syslog(LOG_ERR, "retrying with %ld (current max)", rl.rlim_max);
+ rl.rlim_cur = rl.rlim_max;
+ if (setrlimit(RLIMIT_NUMFDS, &rl) < 0) {
+ syslog(LOG_ERR, "setrlimit: Unable to set file descriptors limit to %ld: %m", x);
+ }
+ }
+ }
+
+
+ if (verbose > 1) {
+ r = getrlimit(RLIMIT_NUMFDS, &rl);
+ syslog(LOG_DEBUG, "set maximum file descriptors to %ld/%ld", rl.rlim_cur,
+ rl.rlim_max);
+ }
+#else
+ }
+#endif /* HAVE_GETRLIMIT */
+}
+#else
+void limit_fds(rlim_t x)
+{
+}
+#endif /* HAVE_SETRLIMIT */
+
+void reread_conf(void)
+{
+ int i,j;
+ struct event *ptr;
+ struct centry *c;
+
+ /* disable all services -
+ they will be re-enabled if they appear in config file */
+ for (i = 0; i < nservices; i++) Services[i].exec = NULL;
+
+ /* read services */
+ masterconf_getsection("SERVICES", &add_service, (void*) 1);
+
+ for (i = 0; i < nservices; i++) {
+ if (!Services[i].exec && Services[i].socket) {
+ /* cleanup newly disabled services */
+
+ if (verbose > 2)
+ syslog(LOG_DEBUG, "disable: service %s socket %d pipe %d %d",
+ Services[i].name, Services[i].socket,
+ Services[i].stat[0], Services[i].stat[1]);
+
+ /* Only free the service info on the primary */
+ if(Services[i].associate == 0) {
+ free(Services[i].listen);
+ free(Services[i].proto);
+ }
+ Services[i].listen = NULL;
+ Services[i].proto = NULL;
+ Services[i].desired_workers = 0;
+
+ /* send SIGHUP to all children */
+ for (j = 0 ; j < child_table_size ; j++ ) {
+ c = ctable[j];
+ while (c != NULL) {
+ if ((c->si == i) &&
+ (c->service_state != SERVICE_STATE_DEAD)) {
+ kill(c->pid, SIGHUP);
+ }
+ c = c->next;
+ }
+ }
+
+ /* close all listeners */
+ if (Services[i].socket > 0) {
+ shutdown(Services[i].socket, SHUT_RDWR);
+ close(Services[i].socket);
+ }
+ Services[i].socket = 0;
+ }
+ else if (Services[i].exec && !Services[i].socket) {
+ /* initialize new services */
+
+ service_create(&Services[i]);
+ if (verbose > 2)
+ syslog(LOG_DEBUG, "init: service %s socket %d pipe %d %d",
+ Services[i].name, Services[i].socket,
+ Services[i].stat[0], Services[i].stat[1]);
+ }
+ }
+
+ /* remove existing events */
+ while (schedule) {
+ ptr = schedule;
+ schedule = schedule->next;
+ event_free(ptr);
+ }
+ schedule = NULL;
+
+ /* read events */
+ masterconf_getsection("EVENTS", &add_event, (void*) 1);
+
+ /* reinit child janitor */
+ init_janitor();
+
+ /* send some feedback to admin */
+ syslog(LOG_NOTICE,
+ "Services reconfigured. %d out of %d (max %d) services structures are now in use",
+ nservices, allocservices, SERVICE_MAX);
+}
+
+int main(int argc, char **argv)
+{
+ const char *default_pidfile = MASTER_PIDFILE;
+ const char *lock_suffix = ".lock";
+
+ const char *pidfile = default_pidfile;
+ char *pidfile_lock = NULL;
+
+ int startup_pipe[2] = { -1, -1 };
+ int pidlock_fd = -1;
+
+ int i, opt, close_std = 1, daemon_mode = 0;
+ extern int optind;
+ extern char *optarg;
+
+ char *alt_config = NULL;
+
+ int fd;
+ fd_set rfds;
+ char *p = NULL;
+
+#ifdef HAVE_NETSNMP
+ char *agentxsocket = NULL;
+ int agentxpinginterval = -1;
+#endif
+
+ time_t now;
+
+ p = getenv("CYRUS_VERBOSE");
+ if (p) verbose = atoi(p) + 1;
+#ifdef HAVE_NETSNMP
+ while ((opt = getopt(argc, argv, "C:M:p:l:Ddj:P:x:")) != EOF) {
+#else
+ while ((opt = getopt(argc, argv, "C:M:p:l:Ddj:")) != EOF) {
+#endif
+ switch (opt) {
+ case 'C': /* alt imapd.conf file */
+ alt_config = optarg;
+ break;
+ case 'M': /* alt cyrus.conf file */
+ MASTER_CONFIG_FILENAME = optarg;
+ break;
+ case 'l':
+ /* user defined listen queue backlog */
+ listen_queue_backlog = atoi(optarg);
+ break;
+ case 'p':
+ /* Set the pidfile name */
+ pidfile = optarg;
+ break;
+ case 'd':
+ /* Daemon Mode */
+ if(!close_std)
+ fatal("Unable to both be debug and daemon mode", EX_CONFIG);
+ daemon_mode = 1;
+ break;
+ case 'D':
+ /* Debug Mode */
+ if(daemon_mode)
+ fatal("Unable to be both debug and daemon mode", EX_CONFIG);
+ close_std = 0;
+ break;
+ case 'j':
+ /* Janitor frequency */
+ janitor_frequency = atoi(optarg);
+ if(janitor_frequency < 1)
+ fatal("The janitor period must be at least 1 second", EX_CONFIG);
+ break;
+#ifdef HAVE_NETSNMP
+ case 'P': /* snmp AgentXPingInterval */
+ agentxpinginterval = atoi(optarg);
+ break;
+ case 'x': /* snmp AgentXSocket */
+ agentxsocket = optarg;
+ break;
+#endif
+ default:
+ break;
+ }
+ }
+
+ masterconf_init("master", alt_config);
+
+ /* zero out the children table */
+ memset(&ctable, 0, sizeof(struct centry *) * child_table_size);
+
+ if (close_std) {
+ /* close stdin/out/err */
+ for (fd = 0; fd < 3; fd++) {
+ close(fd);
+ if (open("/dev/null", O_RDWR, 0) != fd)
+ fatal("couldn't open /dev/null: %m", 2);
+ }
+ }
+
+ /* we reserve fds 3 and 4 for children to communicate with us, so they
+ better be available. */
+ for (fd = 3; fd < 5; fd++) {
+ close(fd);
+ if (dup(0) != fd) fatal("couldn't dup fd 0: %m", 2);
+ }
+
+ /* Pidfile Algorithm in Daemon Mode. This is a little subtle because
+ * we want to ensure that we can report an error to our parent if the
+ * child fails to lock the pidfile.
+ *
+ * [A] Create/lock pidfile.lock. If locked, exit(failure).
+ * [A] Create a pipe
+ * [A] Fork [B]
+ * [A] Block on reading exit code from pipe
+ * [B] Create/lock pidfile. If locked, write failure code to pipe and
+ * exit(failure)
+ * [B] write pid to pidfile
+ * [B] write success code to pipe & finish starting up
+ * [A] unlink pidfile.lock and exit(code read from pipe)
+ *
+ */
+ if(daemon_mode) {
+ /* Daemonize */
+ pid_t pid = -1;
+
+ pidfile_lock = xmalloc(strlen(pidfile) + strlen(lock_suffix) + 1);
+
+ strcpy(pidfile_lock, pidfile);
+ strcat(pidfile_lock, lock_suffix);
+
+ pidlock_fd = open(pidfile_lock, O_CREAT|O_TRUNC|O_RDWR, 0644);
+ if(pidlock_fd == -1) {
+ syslog(LOG_ERR, "can't open pidfile lock: %s (%m)", pidfile_lock);
+ exit(EX_OSERR);
+ } else {
+ if(lock_nonblocking(pidlock_fd)) {
+ syslog(LOG_ERR, "can't get exclusive lock on %s",
+ pidfile_lock);
+ exit(EX_TEMPFAIL);
+ }
+ }
+
+ if(pipe(startup_pipe) == -1) {
+ syslog(LOG_ERR, "can't create startup pipe (%m)");
+ exit(EX_OSERR);
+ }
+
+ do {
+ pid = fork();
+
+ if ((pid == -1) && (errno == EAGAIN)) {
+ syslog(LOG_WARNING, "master fork failed (sleeping): %m");
+ sleep(5);
+ }
+ } while ((pid == -1) && (errno == EAGAIN));
+
+ if (pid == -1) {
+ fatal("fork error", EX_OSERR);
+ } else if (pid != 0) {
+ int exit_code;
+
+ /* Parent, wait for child */
+ if(read(startup_pipe[0], &exit_code, sizeof(exit_code)) == -1) {
+ syslog(LOG_ERR, "could not read from startup_pipe (%m)");
+ unlink(pidfile_lock);
+ exit(EX_OSERR);
+ } else {
+ unlink(pidfile_lock);
+ exit(exit_code);
+ }
+ }
+
+ /* Child! */
+ close(startup_pipe[0]);
+
+ free(pidfile_lock);
+
+ /*
+ * We're now running in the child. Lose our controlling terminal
+ * and obtain a new process group.
+ */
+ if (setsid() == -1) {
+ int exit_result = EX_OSERR;
+
+ /* Tell our parent that we failed. */
+ write(startup_pipe[1], &exit_result, sizeof(exit_result));
+
+ fatal("setsid failure", EX_OSERR);
+ }
+ }
+
+ limit_fds(RLIM_INFINITY);
+
+ /* Write out the pidfile */
+ pidfd = open(pidfile, O_CREAT|O_RDWR, 0644);
+ if(pidfd == -1) {
+ int exit_result = EX_OSERR;
+
+ /* Tell our parent that we failed. */
+ write(startup_pipe[1], &exit_result, sizeof(exit_result));
+
+ syslog(LOG_ERR, "can't open pidfile: %m");
+ exit(EX_OSERR);
+ } else {
+ char buf[100];
+
+ if(lock_nonblocking(pidfd)) {
+ int exit_result = EX_OSERR;
+
+ /* Tell our parent that we failed. */
+ write(startup_pipe[1], &exit_result, sizeof(exit_result));
+
+ fatal("cannot get exclusive lock on pidfile (is another master still running?)", EX_OSERR);
+ } else {
+ int pidfd_flags = fcntl(pidfd, F_GETFD, 0);
+ if (pidfd_flags != -1)
+ pidfd_flags = fcntl(pidfd, F_SETFD,
+ pidfd_flags | FD_CLOEXEC);
+ if (pidfd_flags == -1) {
+ int exit_result = EX_OSERR;
+
+ /* Tell our parent that we failed. */
+ write(startup_pipe[1], &exit_result, sizeof(exit_result));
+
+ fatal("unable to set close-on-exec for pidfile: %m", EX_OSERR);
+ }
+
+ /* Write PID */
+ snprintf(buf, sizeof(buf), "%lu\n", (unsigned long int)getpid());
+ if(lseek(pidfd, 0, SEEK_SET) == -1 ||
+ ftruncate(pidfd, 0) == -1 ||
+ write(pidfd, buf, strlen(buf)) == -1) {
+ int exit_result = EX_OSERR;
+
+ /* Tell our parent that we failed. */
+ write(startup_pipe[1], &exit_result, sizeof(exit_result));
+
+ fatal("unable to write to pidfile: %m", EX_OSERR);
+ }
+ fsync(pidfd);
+ }
+ }
+
+ if(daemon_mode) {
+ int exit_result = 0;
+
+ /* success! */
+ if(write(startup_pipe[1], &exit_result, sizeof(exit_result)) == -1) {
+ syslog(LOG_ERR,
+ "could not write success result to startup pipe (%m)");
+ exit(EX_OSERR);
+ }
+
+ close(startup_pipe[1]);
+ if(pidlock_fd != -1) close(pidlock_fd);
+ }
+
+ syslog(LOG_NOTICE, "process started");
+
+#if defined(HAVE_UCDSNMP) || defined(HAVE_NETSNMP)
+ /* initialize SNMP agent */
+
+ /* make us a agentx client. */
+#ifdef HAVE_NETSNMP
+ netsnmp_enable_subagent();
+
+ netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
+ NETSNMP_DS_LIB_ALARM_DONT_USE_SIG, 1);
+ if (agentxpinginterval >= 0)
+ netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID,
+ NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, agentxpinginterval);
+
+ if (agentxsocket != NULL)
+ netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,
+ NETSNMP_DS_AGENT_X_SOCKET, agentxsocket);
+#else
+ ds_set_boolean(DS_APPLICATION_ID, DS_AGENT_ROLE, 1);
+#endif
+
+ /* initialize the agent library */
+ init_agent("cyrusMaster");
+
+ init_cyrusMasterMIB();
+
+ init_snmp("cyrusMaster");
+#endif
+
+ masterconf_getsection("START", &add_start, NULL);
+ masterconf_getsection("SERVICES", &add_service, NULL);
+ masterconf_getsection("EVENTS", &add_event, NULL);
+
+ /* set signal handlers */
+ sighandler_setup();
+
+ /* initialize services */
+ for (i = 0; i < nservices; i++) {
+ service_create(&Services[i]);
+ if (verbose > 2)
+ syslog(LOG_DEBUG, "init: service %s socket %d pipe %d %d",
+ Services[i].name, Services[i].socket,
+ Services[i].stat[0], Services[i].stat[1]);
+ }
+
+ if (become_cyrus_early) {
+ if (become_cyrus() != 0) {
+ syslog(LOG_ERR, "can't change to the cyrus user: %m");
+ exit(1);
+ }
+ }
+
+ have_uuid = (config_getint(IMAPOPT_SYNC_MACHINEID) >= 0);
+ if (have_uuid && !message_uuid_master_init()) {
+ syslog(LOG_ERR, "Couldn't initialise UUID subsystem");
+ exit(EX_OSERR);
+ }
+
+ /* init ctable janitor */
+ init_janitor();
+
+ /* ok, we're going to start spawning like mad now */
+ syslog(LOG_NOTICE, "ready for work");
+
+ now = time(NULL);
+ for (;;) {
+ int r, i, maxfd;
+ struct timeval tv, *tvptr;
+ struct notify_message msg;
+#if defined(HAVE_UCDSNMP) || defined(HAVE_NETSNMP)
+ int blockp = 0;
+#endif
+
+ /* run any scheduled processes */
+ spawn_schedule(now);
+
+ /* reap first, that way if we need to babysit we will */
+ if (gotsigchld) {
+ /* order matters here */
+ gotsigchld = 0;
+ reap_child();
+ }
+
+ /* do we have any services undermanned? */
+ for (i = 0; i < nservices; i++) {
+ if (Services[i].exec /* enabled */ &&
+ (Services[i].nactive < Services[i].max_workers) &&
+ (Services[i].ready_workers < Services[i].desired_workers)) {
+ spawn_service(i);
+ } else if (Services[i].exec
+ && Services[i].babysit
+ && Services[i].nactive == 0) {
+ syslog(LOG_ERR,
+ "lost all children for service: %s. " \
+ "Applying babysitter.",
+ Services[i].name);
+ spawn_service(i);
+ } else if (!Services[i].exec /* disabled */ &&
+ Services[i].name /* not yet removed */ &&
+ Services[i].nactive == 0) {
+ if (verbose > 2)
+ syslog(LOG_DEBUG, "remove: service %s pipe %d %d",
+ Services[i].name,
+ Services[i].stat[0], Services[i].stat[1]);
+
+ /* Only free the service info on the primary */
+ if (Services[i].associate == 0) {
+ free(Services[i].name);
+ }
+ Services[i].name = NULL;
+ Services[i].nforks = 0;
+ Services[i].nactive = 0;
+ Services[i].nconnections = 0;
+ Services[i].associate = 0;
+ Services[i].provide_uuid = 0;
+
+ if (Services[i].stat[0] > 0) close(Services[i].stat[0]);
+ if (Services[i].stat[1] > 0) close(Services[i].stat[1]);
+ memset(Services[i].stat, 0, sizeof(Services[i].stat));
+ }
+ }
+
+ if (gotsighup) {
+ syslog(LOG_NOTICE, "got SIGHUP");
+ gotsighup = 0;
+ reread_conf();
+ }
+
+ FD_ZERO(&rfds);
+ maxfd = 0;
+ for (i = 0; i < nservices; i++) {
+ int x = Services[i].stat[0];
+
+ int y = Services[i].socket;
+
+ /* messages */
+ if (x > 0) {
+ if (verbose > 2)
+ syslog(LOG_DEBUG, "listening for messages from %s",
+ Services[i].name);
+ FD_SET(x, &rfds);
+ }
+ if (x > maxfd) maxfd = x;
+
+ /* connections */
+ if (y > 0 && Services[i].ready_workers == 0 &&
+ Services[i].nactive < Services[i].max_workers) {
+ if (verbose > 2)
+ syslog(LOG_DEBUG, "listening for connections for %s",
+ Services[i].name);
+ FD_SET(y, &rfds);
+ if (y > maxfd) maxfd = y;
+ }
+
+ /* paranoia */
+ if (Services[i].ready_workers < 0) {
+ syslog(LOG_ERR, "%s has %d workers?!?", Services[i].name,
+ Services[i].ready_workers);
+ }
+ }
+ maxfd++; /* need 1 greater than maxfd */
+
+ /* how long to wait? - do now so that any scheduled wakeup
+ * calls get accounted for*/
+ tvptr = NULL;
+ if (schedule) {
+ if (now < schedule->mark) tv.tv_sec = schedule->mark - now;
+ else tv.tv_sec = 0;
+ tv.tv_usec = 0;
+ tvptr = &tv;
+ }
+
+#if defined(HAVE_UCDSNMP) || defined(HAVE_NETSNMP)
+ if (tvptr == NULL) blockp = 1;
+ snmp_select_info(&maxfd, &rfds, tvptr, &blockp);
+#endif
+ errno = 0;
+ r = select(maxfd, &rfds, NULL, NULL, tvptr);
+ if (r == -1 && errno == EAGAIN) continue;
+ if (r == -1 && errno == EINTR) continue;
+ if (r == -1) {
+ /* uh oh */
+ fatal("select failed: %m", 1);
+ }
+
+#if defined(HAVE_UCDSNMP) || defined(HAVE_NETSNMP)
+ /* check for SNMP queries */
+ snmp_read(&rfds);
+ snmp_timeout();
+#endif
+ for (i = 0; i < nservices; i++) {
+ int x = Services[i].stat[0];
+ int y = Services[i].socket;
+ int j;
+
+ if (FD_ISSET(x, &rfds)) {
+ r = read(x, &msg, sizeof(msg));
+ if (r != sizeof(msg)) {
+ syslog(LOG_ERR, "got incorrectly sized response from child: %x", i);
+ continue;
+ }
+
+ process_msg(i, &msg);
+ }
+
+ if (Services[i].exec &&
+ Services[i].nactive < Services[i].max_workers) {
+ /* bring us up to desired_workers */
+ for (j = Services[i].ready_workers;
+ j < Services[i].desired_workers;
+ j++)
+ {
+ spawn_service(i);
+ }
+
+ if (Services[i].ready_workers == 0 &&
+ FD_ISSET(y, &rfds)) {
+ /* huh, someone wants to talk to us */
+ spawn_service(i);
+ }
+ }
+ }
+ now = time(NULL);
+ child_janitor(now);
+
+#ifdef HAVE_NETSNMP
+ run_alarms();
+#endif
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/master.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+#ifndef HAVE_MASTER_H
+#define HAVE_MASTER_H
+
+/* $Id: master.h,v 1.9.2.6 2005/04/06 20:37:01 ken3 Exp $ */
+
+#include <config.h>
+#include <sys/resource.h> /* for rlim_t */
+
+#include "libconfig.h" /* for config_dir and IMAPOPT_SYNC_MACHINEID */
+
+/* needed for possible SNMP monitoring */
+struct service {
+ char *name; /* name of service */
+ char *listen; /* port/socket to listen to */
+ char *proto; /* protocol to accept */
+ char *const *exec; /* command (with args) to execute */
+ int babysit; /* babysit this service? */
+ int provide_uuid; /* Service assigns UUIDS */
+
+ /* multiple address family support */
+ int associate; /* are we primary or additional instance? */
+ int family; /* address family */
+
+ /* communication info */
+ int socket; /* client/child communication channel */
+ int stat[2]; /* master/child communication channel */
+
+ /* limits */
+ int desired_workers; /* num child processes to have ready */
+ int max_workers; /* max num child processes to spawn */
+ rlim_t maxfds; /* max num file descriptors to use */
+ unsigned int maxforkrate; /* max rate to spawn children */
+
+ /* stats */
+ int ready_workers; /* num child processes ready for service */
+ int nforks; /* num child processes spawned */
+ int nactive; /* num children servicing clients */
+ int nconnections; /* num connections made to children */
+ unsigned int forkrate; /* rate at which we're spawning children */
+
+ /* fork rate computation */
+ time_t last_interval_start;
+ unsigned int interval_forks;
+};
+
+extern struct service *Services;
+extern int allocservices;
+extern int nservices;
+
+/*
+ * Description of multiple address family support from
+ * Hajimu UMEMOTO <ume at mahoroba.org>:
+ *
+ * In service_create(), master tries to listen each address family which
+ * getaddrinfo() returns. With existing implementation of getaddrinfo(),
+ * when a protocol is not specified exactly by proto= in cyrus.conf and a
+ * platform supports an IPv4 and an IPv6, getaddrinfo() returns two
+ * struct addrinfo chain which contain INADDR_ANY (0.0.0.0; IPv4) and
+ * IN6ADDR_ANY (::; IPv6), then master will listen an IPv4 and an IPv6.
+ *
+ * As a result, one SERVICE entry in cyrus.conf may correspond to two
+ * Service memory blocks; one is for an IPv6 and the other is for an
+ * IPv4. The associate field was introduced to intend to distinguish
+ * whether the entry is primary or not. The associate field of primary
+ * block is 0, 2nd is 1, 3rd is 2, ...
+ * The blocks share same memory area of name, listen and proto.
+ *
+ * +----------------+
+ * | Service[i] |
+ * | associate: 0 |
+ * | name | --------------> name
+ * | listen | ----- /- -----> listen
+ * | proto | ---- /- / ----> proto
+ * +----------------+ / / /
+ * | Service[j] | / / /
+ * | associate: 1 | / / /
+ * | name |--/ / /
+ * | listen |----/ /
+ * | proto |-----/
+ * +----------------+
+ *
+ * This field is intended to avoid duplicate free by doing free only when
+ * associate is zero.
+ *
+ */
+
+#endif /* HAVE_MASTER_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,271 @@
+/* masterconfig.c -- Configuration routines for master process
+ * $Id: masterconf.c,v 1.11.2.1 2003/12/19 18:33:47 ken3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sysexits.h>
+
+#include "libconfig.c"
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "masterconf.h"
+
+extern const char *MASTER_CONFIG_FILENAME;
+
+struct configlist {
+ char *key;
+ char *value;
+};
+
+extern void fatal(const char *buf, int code);
+
+int masterconf_init(const char *ident, const char *alt_config)
+{
+ char *buf;
+ const char *prefix;
+
+ /* Open the log file with the appropriate facility so we
+ * correctly log any config errors */
+ openlog(ident, LOG_PID, SYSLOG_FACILITY);
+
+ config_ident = ident;
+ config_read(alt_config);
+
+ prefix = config_getstring(IMAPOPT_SYSLOG_PREFIX);
+
+ if(prefix) {
+ int size = strlen(prefix) + 1 + strlen(ident) + 1;
+ buf = xmalloc(size);
+ strlcpy(buf, prefix, size);
+ strlcat(buf, "/", size);
+ strlcat(buf, ident, size);
+
+ /* Reopen the log with the new prefix */
+ closelog();
+ openlog(buf, LOG_PID, SYSLOG_FACILITY);
+
+ /* don't free the openlog() string! */
+ }
+
+ return 0;
+}
+
+struct entry {
+ char *line;
+ int lineno;
+};
+
+const char *masterconf_getstring(struct entry *e, const char *key,
+ const char *def)
+{
+ char k[256];
+ static char v[256];
+ int i;
+ char *p;
+
+ strcpy(k, key);
+ strcat(k, "=");
+
+ p = strstr(e->line, k);
+ if (p) {
+ p += strlen(k);
+ if (*p == '"') {
+ p++;
+ for (i = 0; i < 255; i++) {
+ if (*p == '"') break;
+ v[i] = *p++;
+ }
+ if (*p != '"') {
+ sprintf(k, "configuration file %s: missing \" on line %d",
+ MASTER_CONFIG_FILENAME, e->lineno);
+ fatal(k, EX_CONFIG);
+ }
+ } else {
+ /* one word */
+ for (i = 0; i < 255; i++) {
+ if (isspace((int) *p)) break;
+ v[i] = *p++;
+ }
+ }
+ v[i] = '\0';
+ return v;
+ } else {
+ return def;
+ }
+}
+
+int masterconf_getint(struct entry *e,
+ const char *key, int def)
+{
+ const char *val = masterconf_getstring(e, key, NULL);
+
+ if (!val) return def;
+ if (!isdigit((int) *val) &&
+ (*val != '-' || !isdigit((int) val[1]))) return def;
+ return atoi(val);
+}
+
+int masterconf_getswitch(struct entry *e, const char *key, int def)
+{
+ const char *val = masterconf_getstring(e, key, NULL);
+
+ if (!val) return def;
+
+ if (val[0] == '0' || val[0] == 'n' ||
+ (val[0] == 'o' && val[1] == 'f') || val[0] == 'f') {
+ return 0;
+ }
+ else if (val[0] == '1' || val[0] == 'y' ||
+ (val[0] == 'o' && val[1] == 'n') || val[0] == 't') {
+ return 1;
+ }
+ return def;
+}
+
+static void process_section(FILE *f, int *lnptr,
+ masterconf_process *func, void *rock)
+{
+ struct entry e;
+ char buf[4096];
+ int lineno = *lnptr;
+
+ while (fgets(buf, sizeof(buf), f)) {
+ char *p, *q;
+
+ lineno++;
+
+ /* remove EOL character */
+ if (buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
+ /* remove starting whitespace */
+ for (p = buf; *p && isspace((int) *p); p++);
+
+ /* remove comments */
+ q = strchr(p, '#');
+ if (q) *q = '\0';
+
+ /* skip empty lines or all comment lines */
+ if (!*p) continue;
+ if (*p == '}') break;
+
+ for (q = p; isalnum((int) *q); q++) ;
+ if (q) { *q = '\0'; q++; }
+
+ if (q - p > 0) {
+ /* there's a value on this line */
+ e.line = q;
+ e.lineno = lineno;
+ func(p, &e, rock);
+ }
+
+ /* end of section? */
+ if (strchr(q, '}')) break;
+ }
+
+ *lnptr = lineno;
+}
+
+void masterconf_getsection(const char *section, masterconf_process *f,
+ void *rock)
+{
+ FILE *infile;
+ int seclen = strlen(section);
+ int level = 0;
+ int lineno = 0;
+ char buf[4096];
+
+ infile = fopen(MASTER_CONFIG_FILENAME, "r");
+ if (!infile) {
+ snprintf(buf, sizeof(buf), "can't open configuration file %s: %s",
+ MASTER_CONFIG_FILENAME, strerror(errno));
+ fatal(buf, EX_CONFIG);
+ }
+
+ while (fgets(buf, sizeof(buf), infile)) {
+ char *p, *q;
+
+ lineno++;
+
+ if (buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
+ for (p = buf; *p && isspace((int) *p); p++);
+
+ /* remove comments */
+ q = strchr(p, '#');
+ if (q) *q = '\0';
+
+ /* skip empty lines or all comment lines */
+ if (!*p) continue;
+
+ if (level == 0 &&
+ *p == *section && !strncasecmp(p, section, seclen) &&
+ !isalnum((int) p[seclen])) {
+ for (p += seclen; *p; p++) {
+ if (*p == '{') level++;
+ if (*p == '}') level--;
+ }
+
+ /* valid opening; process the section */
+ if (level == 1) process_section(infile, &lineno, f, rock);
+
+ continue;
+ }
+
+ for (; *p; p++) {
+ if (*p == '{') level++;
+ if (*p == '}') level--;
+ }
+ }
+
+ fclose(infile);
+}
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/masterconf.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,64 @@
+/* config.h -- Configuration routines
+ $Id: masterconf.h,v 1.6 2003/10/22 18:50:14 rjs3 Exp $
+
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_MASTERCONF_H
+#define INCLUDED_MASTERCONF_H
+
+extern int masterconf_init(const char *ident, const char *alt_config);
+
+struct entry;
+
+extern const char *masterconf_getstring(struct entry *e,
+ const char *key, const char *def);
+extern int masterconf_getint(struct entry *e,
+ const char *key, int def);
+extern int masterconf_getswitch(struct entry *e,
+ const char *key, int def);
+
+/* entry values are good until the next call */
+typedef void masterconf_process(const char *name, struct entry *e, void *rock);
+
+extern void masterconf_getsection(const char *section,
+ masterconf_process *f, void *rock);
+
+#endif /* INCLUDED_MASTERCONF_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,512 @@
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <sys/un.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <time.h>
+
+#include "master.h"
+#include "message_uuid_master.h"
+
+/* Four possible forms of messageID:
+ *
+ * Private:
+ * Used for internal manipulation. Not visible to clients.
+ *
+ * Public:
+ * Opaque handle to byte sequence that Cyrus can pass around
+ *
+ * Packed:
+ * Byte sequence of known length (MESSAGE_UUID_PACKED_SIZE) which can
+ * be stored on disk. At the moment public and packed essentially
+ * the same thing but makes sense (I think!) to divide into two roles.
+ *
+ * Textual:
+ * Textual represenatation for Message-UUID for passing over the wire
+ * Currently 24 byte hex string + '\0', propose switch to BASE64 alike.
+ *
+ */
+
+/* Private interface */
+
+/* master only worries about schema 1 */
+
+struct uuid_info {
+ unsigned short schema; /* 8 bits used */
+ unsigned short machine; /* 8 bits used */
+ unsigned short timestamp_generation; /* 8 bits used */
+ unsigned long master_start_time; /* 32 bits used */
+ unsigned long child_counter; /* 16 bits used */
+ unsigned long count; /* 24 bits used */
+};
+
+static struct uuid_info uuid_private;
+
+/* Couple of small utility functions for struct uuid_info */
+
+static void
+uuid_info_clear(struct uuid_info *uuid_info)
+{
+ memset(uuid_info, 0, sizeof(struct uuid_info));
+}
+
+static int
+uuid_info_compare(struct uuid_info *u1, struct uuid_info *u2)
+{
+ return(((u1->schema == u2->schema) &&
+ (u1->machine == u2->machine) &&
+ (u1->timestamp_generation == u2->timestamp_generation) &&
+ (u1->master_start_time==u2->master_start_time) &&
+ (u1->child_counter == u2->child_counter) &&
+ (u1->count == u2->count)) ? 1 : 0);
+}
+
+/* ====================================================================== */
+
+#define UUID_SCHEMA_MAX (255)
+#define UUID_MACHINE_MAX (255)
+#define UUID_TIMESTAMP_GENERATION_MAX (255)
+#define UUID_CHILD_COUNTER_MAX (65535)
+
+#define UUID_COUNT_MAX ((256*256*256)-1)
+
+/* Routines for manipulating private values. Byte encoding is:
+ *
+ * Byte Offset Use
+ *
+ * 0 Current UUID schema (following is schema 1)
+ * 1 Machine ID within cluster (256 enough for single cluster?)
+ * 2 Timestamp generation number
+ * (to cope with emergency restarts when system time broken).
+ * (also allows for overflow from 32 bit time_t if ever an issue).
+ * 3->6 32 bit counter initialised as time that master starts
+ * 7->8 16 bit process counter for UUID range.
+ * 9-11 24 bit counter for UUID prefix within child process.
+ * (means max 1048576 messages per child process)
+ *
+ * Numbers stored big-endian.
+ */
+
+/* Following was more relative when limit was 256 processes/sec sustained.
+ *
+ * 16 bits for process counter gives us maximum sustained rate from master
+ * as 65536 processes per second. Unlikely to be a problem in practice as:
+ *
+ * 1) master builds up a buffer of available UUIDs after a few seconds
+ * of idle time, and a huge buffer overnight.
+ *
+ * 2) Cyrus Prefork model means that imapd, lmtp process are reused.
+ * 65536 processes isn't maximum transaction rate.
+ *
+ * 3) master has own rate limiting code to avoid resource stavation.
+ * (which could probably be improved to reduce DOS attacks from
+ * single IP address).
+ */
+
+/* message_uuid_extract() ************************************************
+ *
+ * Convert message_uuid_structure into public UID
+ * Returns: boolean success
+ *
+ ************************************************************************/
+
+static int
+message_uuid_extract(struct message_uuid *uuid)
+{
+ unsigned char *s = &uuid->value[0];
+
+ if (uuid_private.schema == 0) {
+ message_uuid_set_null(uuid);
+ return(1);
+ }
+
+ if ((uuid_private.schema != 1) ||
+ (uuid_private.machine > UUID_MACHINE_MAX) ||
+ (uuid_private.timestamp_generation > UUID_TIMESTAMP_GENERATION_MAX) ||
+ (uuid_private.count > UUID_COUNT_MAX)) {
+
+ message_uuid_set_null(uuid);
+ return(0);
+ }
+
+ s[0] = (uuid_private.schema & 0xff);
+ s[1] = (uuid_private.machine & 0xff);
+ s[2] = (uuid_private.timestamp_generation & 0x00ff);
+
+ s[3] = (uuid_private.master_start_time & 0xff000000) >> 24;
+ s[4] = (uuid_private.master_start_time & 0x00ff0000) >> 16;
+ s[5] = (uuid_private.master_start_time & 0x0000ff00) >> 8;
+ s[6] = (uuid_private.master_start_time & 0x000000ff);
+
+ s[7] = (uuid_private.child_counter & 0xff00) >> 8;
+ s[8] = (uuid_private.child_counter & 0x00ff);
+ s[9] = (uuid_private.count & 0xff0000) >> 24;
+ s[10] = (uuid_private.count & 0x00ff00) >> 8;
+ s[11] = (uuid_private.count & 0x0000ff);
+
+ return(1);
+}
+
+/* ====================================================================== */
+
+static int
+master_value_isnumeric(char *s)
+{
+ while (*s) {
+ if (!isdigit((unsigned char)*s)) return(0);
+ s++;
+ }
+ return(1);
+}
+
+static void
+master_chomp(char *s)
+{
+ if (!(s && *s))
+ return;
+
+ while (s[1])
+ s++;
+
+ if (*s == '\n') *s = '\0';
+}
+
+/* ====================================================================== */
+
+/* Utility functions to read/write UUID master file */
+
+#define MASTER_UUID_MAX_LINE (512)
+
+static int
+master_uuid_read_worker(struct uuid_info *uuid_info, char *line)
+{
+ char *s;
+ unsigned long value;
+ int keylen;
+
+ if ((s=strchr(line, '=')) == NULL) return(0);
+ if (!master_value_isnumeric(s+1)) return(0);
+
+ keylen = s-line;
+ value = strtoul(s+1, NULL, 10);
+
+ if (!strncmp(line, "schema", keylen)) {
+ if (value > UUID_SCHEMA_MAX) return(0);
+ uuid_info->schema = (unsigned char)value;
+ return(1);
+ }
+
+ if (!strncmp(line, "machine", keylen)) {
+ if (value > UUID_MACHINE_MAX) return(0);
+ uuid_info->machine = (unsigned char)value;
+ return(1);
+ }
+
+ if (!strncmp(line, "timestamp_generation=", keylen)) {
+ if (value > UUID_TIMESTAMP_GENERATION_MAX) return(0);
+ uuid_info->timestamp_generation = value;
+ return(1);
+ }
+
+ if (!strncmp(line, "master_start_time", keylen)) {
+ uuid_info->master_start_time = value;
+ return(1);
+ }
+ return(0);
+}
+
+static int
+master_uuid_read(struct uuid_info *uuid_info, char *filename)
+{
+ FILE *file;
+ char buf[MASTER_UUID_MAX_LINE];
+ int error=0;
+
+ uuid_info_clear(uuid_info);
+
+ if ((file=fopen(filename, "r")) == NULL) {
+ syslog(LOG_ERR, "Failed to open %s: %m", filename);
+ return(0);
+ }
+
+ while (fgets(buf, MASTER_UUID_MAX_LINE, file)) {
+ master_chomp(buf);
+
+ if (!master_uuid_read_worker(uuid_info, buf)) {
+ error = 1;
+ break;
+ }
+ }
+ fclose(file);
+
+ if (error) {
+ uuid_info_clear(uuid_info);
+ syslog(LOG_ERR, "Invalid line in %s: %s", filename, buf);
+ fclose(file);
+ return(0);
+ }
+
+ if (uuid_info->schema != 1) {
+ uuid_info_clear(uuid_info);
+ syslog(LOG_ERR, "Invalid schema in %s", filename);
+ return(0);
+ }
+
+ uuid_info->child_counter = 0;
+ uuid_info->count = 0;
+ return(1);
+}
+
+static int
+master_uuid_write(struct uuid_info *uuid_info, char *filename)
+{
+ FILE *file;
+
+ if ((file=fopen(filename, "w")) == NULL)
+ return(0);
+
+ fprintf(file, "schema=%lu\n",
+ (unsigned long)uuid_info->schema);
+
+ fprintf(file, "machine=%lu\n",
+ (unsigned long)uuid_info->machine);
+
+ fprintf(file, "timestamp_generation=%lu\n",
+ (unsigned long)uuid_info->timestamp_generation);
+
+ fprintf(file, "master_start_time=%lu\n",
+ (unsigned long)uuid_info->master_start_time);
+
+ if (fflush(file) || fsync(fileno(file))) {
+ fclose(file);
+ return(0);
+ }
+
+ fclose(file);
+ return(1);
+}
+
+static int
+master_uuid_write_and_test(struct uuid_info *uuid_info)
+{
+ struct uuid_info uuid_tmp;
+ int code = 1;
+ char *nfname = (char *)xmalloc(strlen(config_dir) + strlen(MASTER_UUID_FILE)+6);
+ char *fname = (char *)xmalloc(strlen(config_dir) + strlen(MASTER_UUID_FILE)+2);
+
+ sprintf(fname, "%s/%s", config_dir, MASTER_UUID_FILE);
+ sprintf(nfname, "%s/%s.NEW", config_dir, MASTER_UUID_FILE);
+
+ uuid_info_clear(&uuid_tmp);
+
+ if (!master_uuid_write(uuid_info, nfname)) {
+ uuid_info_clear(uuid_info);
+ code = 0;
+ goto uuidout;
+ }
+
+ /* Ultra paranoid: read file back in and test values the same */
+
+ if (!master_uuid_read(&uuid_tmp, nfname)) {
+ syslog(LOG_ERR, "Failed to read in %s: %m",
+ nfname);
+ code = 0;
+ goto uuidout;
+ }
+
+ if (!uuid_info_compare(&uuid_private, &uuid_tmp)) {
+ syslog(LOG_ERR, "Sanity check failed on %s",
+ nfname);
+ code = 0;
+ goto uuidout;
+ }
+
+ if (rename(nfname, fname) < 0) {
+ syslog(LOG_ERR, "Failed to commit: %s -> %s: %m",
+ nfname, fname);
+ code = 0;
+ goto uuidout;
+ }
+
+ uuidout:
+ free(fname);
+ free(nfname);
+ return(code);
+}
+
+/* ====================================================================== */
+
+/* message_uuid_master_init() ********************************************
+ *
+ * Initialise master process.
+ *
+ * Will require time() and current generation number.
+ ************************************************************************/
+
+int
+message_uuid_master_init()
+{
+ unsigned long machine = config_getint(IMAPOPT_SYNC_MACHINEID);
+ char *ufname;
+ struct stat sbuf;
+ int r;
+
+ if (machine < 0) return (0);
+
+ uuid_info_clear(&uuid_private);
+
+ ufname = (char *) xmalloc(strlen(config_dir) + strlen(MASTER_UUID_FILE)+2);
+ sprintf(ufname, "%s/%s", config_dir, MASTER_UUID_FILE);
+
+ r = stat(ufname, &sbuf);
+ if (r == 0) {
+ r = master_uuid_read(&uuid_private, ufname);
+ free(ufname);
+
+ if (r == 0) return(0);
+
+ if (uuid_private.machine != machine) {
+ syslog(LOG_ERR, "Machine mismatch: %lu != %lu",
+ (unsigned long)machine,
+ (unsigned long)uuid_private.machine);
+ return(0);
+ }
+
+ if (uuid_private.master_start_time >= time(NULL))
+ return(0);
+ }
+ else if (errno == ENOENT) {
+ uuid_private.schema = 1;
+ uuid_private.machine = machine;
+ free(ufname);
+ }
+ else {
+ syslog(LOG_ERR, "Failed to stat %s: %m", ufname);
+ free(ufname);
+ return(0);
+ }
+
+ uuid_private.master_start_time = time(NULL);
+ uuid_private.child_counter = 0;
+ uuid_private.count = 0;
+
+ if (!master_uuid_write_and_test(&uuid_private)) {
+ uuid_info_clear(&uuid_private);
+ return(0);
+ }
+
+ return(1);
+}
+
+/* message_uuid_master_next_child() **************************************
+ *
+ * Bump child_counter.
+ *
+ ************************************************************************/
+
+int
+message_uuid_master_next_child(struct message_uuid *uuid)
+{
+ if (uuid_private.schema != 1)
+ return(0);
+
+ uuid_private.child_counter++;
+
+ if (uuid_private.child_counter > UUID_CHILD_COUNTER_MAX) {
+ while (uuid_private.master_start_time >= time(NULL))
+ sleep(1); /* 1/10th second might be safer */
+
+ uuid_private.master_start_time++;
+ uuid_private.child_counter = 0;
+
+ if (!master_uuid_write_and_test(&uuid_private)) {
+ uuid_info_clear(&uuid_private);
+ return(0);
+ }
+ }
+
+ if (!message_uuid_extract(uuid)) {
+ uuid_info_clear(&uuid_private);
+ return(0);
+ }
+
+ return(1);
+}
+
+/* message_uuid_master_checksum() ****************************************
+ *
+ * Bump child_counter.
+ *
+ ************************************************************************/
+
+int
+message_uuid_master_checksum(struct message_uuid *uuid)
+{
+ unsigned char *s = &uuid->value[0];
+ unsigned long count = 0;
+
+ /* Compute 24 bit checksum from first 9 bytes */
+ count += (s[0] << 16) + (s[1] << 8) + s[2];
+ count += (s[3] << 16) + (s[4] << 8) + s[5];
+ count += (s[6] << 16) + (s[7] << 8) + s[8];
+ count &= 0x00ffffff;
+
+ /* Store checksum in last 3 bytes */
+ s[9] = (count & 0xff0000) >> 16;
+ s[10] = (count & 0x00ff00) >> 8;
+ s[11] = (count & 0x0000ff);
+
+ return(1);
+}
+
+/* message_uuid_set_null() ***********************************************
+ *
+ * Create NULL UUID
+ *
+ ************************************************************************/
+
+int
+message_uuid_set_null(struct message_uuid *dst)
+{
+ memset(dst, 0, MESSAGE_UUID_SIZE);
+ return(1);
+}
+
+/* message_uuid_text() ***************************************************
+ *
+ * Returns ptr to '\0' terminated static char * which can be strdup()ed
+ * NULL => error. Should be impossible as entire range covered
+ *
+ ************************************************************************/
+
+char *
+message_uuid_text(struct message_uuid *uuid)
+{
+ static char buf[MESSAGE_UUID_TEXT_SIZE+1];
+ static char *hex = "0123456789abcdef";
+ unsigned char *value = &uuid->value[0];
+ char *p = buf;
+ int i;
+
+ for (i = 0 ; i < MESSAGE_UUID_SIZE ; i++) {
+ *p++ = hex[(value[i] & 0xf0) >> 4];
+ *p++ = hex[value[i] & 0x0f];
+ }
+ *p = '\0';
+
+ return(buf);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/message_uuid_master.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,38 @@
+/* Public interface */
+
+#define MASTER_UUID_FILE "master_uuid"
+
+#define MESSAGE_UUID_SIZE (12) /* Size of UUID byte sequence */
+#define MESSAGE_UUID_PACKED_SIZE (12) /* Size on disk */
+#define MESSAGE_UUID_TEXT_SIZE (24) /* UUID as hex */
+
+struct message_uuid {
+ unsigned char value[MESSAGE_UUID_SIZE]; /* Matches packed encoding */
+};
+
+int
+message_uuid_master_init(/* PARAMETERS? */);
+ /* Initialise master process. Will require time() and current generation
+ * number */
+
+int
+message_uuid_master_next_child(struct message_uuid *uuid);
+ /* Return next UUID prefix for master */
+
+int
+message_uuid_master_checksum(struct message_uuid *uuid);
+
+int
+message_uuid_client_init(char *uuid_prefix);
+ /* Initialise private UUID system
+ * (sets fields from message_uuid, clears uuid_suffix) */
+
+int
+message_uuid_set_null(struct message_uuid *dst);
+ /* Create a NULL UUID */
+
+char *
+message_uuid_text(struct message_uuid *uuid);
+ /* Returns ptr to '\0' terminated static char * which can be strdup()ed */
+ /* NULL => error. Should be impossible as entire range covered */
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service-thread.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service-thread.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service-thread.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service-thread.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,313 @@
+/* service-thread.c -- skeleton for Cyrus service; calls the real main
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: service-thread.c,v 1.14.2.5 2005/12/01 21:18:11 murch Exp $ */
+#include <config.h>
+
+#include <stdio.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <sysexits.h>
+#include <string.h>
+
+#include "service.h"
+#include "libconfig.h"
+#include "xmalloc.h"
+
+extern int optind;
+extern char *optarg;
+
+/* number of times this service has been used */
+static int use_count = 0;
+static int verbose = 0;
+
+void notify_master(int fd, int msg)
+{
+ struct notify_message notifymsg;
+ if (verbose) syslog(LOG_DEBUG, "telling master %x", msg);
+ notifymsg.message = msg;
+ notifymsg.service_pid = getpid();
+ if (write(fd, ¬ifymsg, sizeof(notifymsg)) != sizeof(notifymsg)) {
+ syslog(LOG_ERR, "unable to tell master %x: %m", msg);
+ }
+}
+
+#ifdef HAVE_LIBWRAP
+#include <tcpd.h>
+
+int allow_severity = LOG_DEBUG;
+int deny_severity = LOG_ERR;
+
+static void libwrap_init(struct request_info *r, char *service)
+{
+ request_init(r, RQ_DAEMON, service, 0);
+}
+
+static int libwrap_ask(struct request_info *r, int fd)
+{
+ int a;
+ struct sockaddr_storage sin;
+ socklen_t len = sizeof(sin);
+
+ /* XXX: old FreeBSD didn't fill sockaddr correctly against AF_UNIX */
+ sin.ss_family = AF_UNIX;
+
+ /* is this a connection from the local host? */
+ if (getpeername(fd, (struct sockaddr *) &sin, &len) == 0) {
+ if (((struct sockaddr *)&sin)->sa_family == AF_UNIX) {
+ return 1;
+ }
+ }
+
+ /* i hope using the sock_* functions are legal; it certainly makes
+ this code very easy! */
+ request_set(r, RQ_FILE, fd, 0);
+ sock_host(r);
+
+ a = hosts_access(r);
+ if (!a) {
+ syslog(deny_severity, "refused connection from %s", eval_client(r));
+ }
+
+ return a;
+}
+
+#else
+struct request_info { int x; };
+
+static void libwrap_init(struct request_info *r __attribute__((unused)),
+ char *service __attribute__((unused)))
+{
+
+}
+
+static int libwrap_ask(struct request_info *r __attribute__((unused)),
+ int fd __attribute__((unused)))
+{
+ return 1;
+}
+
+#endif
+
+extern void cyrus_init(const char *, const char *, unsigned);
+
+#define ARGV_GROW 10
+
+int main(int argc, char **argv, char **envp)
+{
+ int fdflags;
+ int fd;
+ char *p = NULL, *service;
+ struct request_info request;
+ int opt;
+ char *alt_config = NULL;
+ int call_debugger = 0;
+ int newargc = 0;
+ char **newargv = (char **) xmalloc(ARGV_GROW * sizeof(char *));
+
+ opterr = 0; /* disable error reporting,
+ since we don't know about service-specific options */
+
+ newargv[newargc++] = argv[0];
+
+ while ((opt = getopt(argc, argv, "C:D")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ case 'D':
+ call_debugger = 1;
+ break;
+ default:
+ if (!((newargc+1) % ARGV_GROW)) { /* time to alloc more */
+ newargv = (char **) xrealloc(newargv, (newargc + ARGV_GROW) *
+ sizeof(char *));
+ }
+ newargv[newargc++] = argv[optind-1];
+
+ /* option has an argument */
+ if (optind < argc && argv[optind][0] != '-')
+ newargv[newargc++] = argv[optind++];
+
+ break;
+ }
+ }
+ /* grab the remaining arguments */
+ for (; optind < argc; optind++) {
+ if (!(newargc % ARGV_GROW)) { /* time to alloc more */
+ newargv = (char **) xrealloc(newargv, (newargc + ARGV_GROW) *
+ sizeof(char *));
+ }
+ newargv[newargc++] = argv[optind];
+ }
+
+ opterr = 1; /* enable error reporting */
+ optind = 1; /* reset the option index for parsing by the service */
+
+ p = getenv("CYRUS_VERBOSE");
+ if (p) verbose = atoi(p) + 1;
+
+ if (verbose > 30) {
+ syslog(LOG_DEBUG, "waiting 15 seconds for debugger");
+ sleep(15);
+ }
+
+ p = getenv("CYRUS_SERVICE");
+ if (p == NULL) {
+ syslog(LOG_ERR, "could not getenv(CYRUS_SERVICE); exiting");
+ exit(EX_SOFTWARE);
+ }
+ service = xstrdup(p);
+
+ cyrus_init(alt_config, service, 0);
+
+ if (call_debugger) {
+ char debugbuf[1024];
+ int ret;
+ const char *debugger = config_getstring(IMAPOPT_DEBUG_COMMAND);
+ if (debugger) {
+ snprintf(debugbuf, sizeof(debugbuf), debugger,
+ argv[0], getpid(), service);
+ syslog(LOG_DEBUG, "running external debugger: %s", debugbuf);
+ ret = system(debugbuf); /* run debugger */
+ syslog(LOG_DEBUG, "debugger returned exit status: %d", ret);
+ }
+ }
+ syslog(LOG_DEBUG, "executed");
+
+ /* set close on exec */
+ fdflags = fcntl(LISTEN_FD, F_GETFD, 0);
+ if (fdflags != -1) fdflags = fcntl(LISTEN_FD, F_SETFD,
+ fdflags | FD_CLOEXEC);
+ if (fdflags == -1) {
+ syslog(LOG_ERR, "unable to set close on exec: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ return 1;
+ }
+ fdflags = fcntl(STATUS_FD, F_GETFD, 0);
+ if (fdflags != -1) fdflags = fcntl(STATUS_FD, F_SETFD,
+ fdflags | FD_CLOEXEC);
+ if (fdflags == -1) {
+ syslog(LOG_ERR, "unable to set close on exec: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ return 1;
+ }
+
+ if (service_init(newargc, newargv, envp) != 0) {
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ return 1;
+ }
+
+ for (;;) {
+ /* ok, listen to this socket until someone talks to us */
+ fd = -1;
+ while (fd < 0) { /* loop until we succeed */
+ fd = accept(LISTEN_FD, NULL, NULL);
+ if (fd < 0) {
+ switch (errno) {
+ case ENETDOWN:
+#ifdef EPROTO
+ case EPROTO:
+#endif
+ case ENOPROTOOPT:
+ case EHOSTDOWN:
+#ifdef ENONET
+ case ENONET:
+#endif
+ case EHOSTUNREACH:
+ case EOPNOTSUPP:
+ case ENETUNREACH:
+ case EAGAIN:
+ case EINTR:
+ case ECONNABORTED:
+ break;
+ default:
+ syslog(LOG_ERR, "accept failed: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(EX_OSERR);
+ }
+ }
+ }
+
+ libwrap_init(&request, getenv("CYRUS_SERVICE"));
+
+ if (!libwrap_ask(&request, fd)) {
+ /* connection denied! */
+ shutdown(fd, SHUT_RDWR);
+ close(fd);
+ continue;
+ }
+
+ syslog(LOG_DEBUG, "accepted connection");
+
+ use_count++;
+ notify_master(STATUS_FD, MASTER_SERVICE_CONNECTION_MULTI);
+ if (service_main_fd(fd, newargc, newargv, envp) < 0) {
+ break;
+ }
+ }
+
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(0);
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,545 @@
+/* service.c -- skeleton for Cyrus service; calls the real main
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: service.c,v 1.45.2.9 2005/12/01 21:18:11 murch Exp $ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <syslog.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <sysexits.h>
+#include <string.h>
+#include <limits.h>
+
+#include "service.h"
+#include "libconfig.h"
+#include "xmalloc.h"
+#include "signals.h"
+
+extern int optind, opterr;
+extern char *optarg;
+
+/* number of times this service has been used */
+static int use_count = 0;
+static int verbose = 0;
+static int lockfd = -1;
+static int newfile = 0;
+
+void notify_master(int fd, int msg)
+{
+ struct notify_message notifymsg;
+ if (verbose) syslog(LOG_DEBUG, "telling master %x", msg);
+ notifymsg.message = msg;
+ notifymsg.service_pid = getpid();
+ if (write(fd, ¬ifymsg, sizeof(notifymsg)) != sizeof(notifymsg)) {
+ syslog(LOG_ERR, "unable to tell master %x: %m", msg);
+ }
+}
+
+#ifdef HAVE_LIBWRAP
+#include <tcpd.h>
+
+int allow_severity = LOG_DEBUG;
+int deny_severity = LOG_ERR;
+
+static void libwrap_init(struct request_info *r, char *service)
+{
+ request_init(r, RQ_DAEMON, service, 0);
+}
+
+static int libwrap_ask(struct request_info *r, int fd)
+{
+ int a;
+ struct sockaddr_storage sin;
+ socklen_t len = sizeof(sin);
+
+ /* XXX: old FreeBSD didn't fill sockaddr correctly against AF_UNIX */
+ sin.ss_family = AF_UNIX;
+
+ /* is this a connection from the local host? */
+ if (getpeername(fd, (struct sockaddr *) &sin, &len) == 0) {
+ if (((struct sockaddr *)&sin)->sa_family == AF_UNIX) {
+ return 1;
+ }
+ }
+
+ /* i hope using the sock_* functions are legal; it certainly makes
+ this code very easy! */
+ request_set(r, RQ_FILE, fd, 0);
+ sock_host(r);
+
+ a = hosts_access(r);
+ if (!a) {
+ syslog(deny_severity, "refused connection from %s", eval_client(r));
+ }
+
+ return a;
+}
+
+#else
+struct request_info { int x; };
+
+static void libwrap_init(struct request_info *r __attribute__((unused)),
+ char *service __attribute__((unused)))
+{
+
+}
+
+static int libwrap_ask(struct request_info *r __attribute__((unused)),
+ int fd __attribute__((unused)))
+{
+ return 1;
+}
+
+#endif
+
+extern void cyrus_init(const char *, const char *, unsigned);
+
+static int getlockfd(char *service, int id)
+{
+ char lockfile[1024];
+ int fd;
+
+ snprintf(lockfile, sizeof(lockfile), "%s/socket/%s-%d.lock",
+ config_dir, service, id);
+ fd = open(lockfile, O_CREAT | O_RDWR, 0600);
+ if (fd < 0) {
+ syslog(LOG_ERR,
+ "locking disabled: couldn't open socket lockfile %s: %m",
+ lockfile);
+ lockfd = -1;
+ return -1;
+ }
+
+ lockfd = fd;
+ return 0;
+}
+
+static int lockaccept(void)
+{
+ struct flock alockinfo;
+ int rc;
+
+ /* setup the alockinfo structure */
+ alockinfo.l_start = 0;
+ alockinfo.l_len = 0;
+ alockinfo.l_whence = SEEK_SET;
+
+ if (lockfd != -1) {
+ alockinfo.l_type = F_WRLCK;
+ while ((rc = fcntl(lockfd, F_SETLKW, &alockinfo)) < 0 &&
+ errno == EINTR &&
+ !signals_poll())
+ /* noop */;
+
+ if (rc < 0 && signals_poll()) {
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(0);
+ return -1;
+ }
+
+ if (rc < 0) {
+ syslog(LOG_ERR, "fcntl: F_SETLKW: error getting accept lock: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(EX_OSERR);
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+static int unlockaccept(void)
+{
+ struct flock alockinfo;
+ int rc;
+
+ /* setup the alockinfo structure */
+ alockinfo.l_start = 0;
+ alockinfo.l_len = 0;
+ alockinfo.l_whence = SEEK_SET;
+
+ if (lockfd != -1) {
+ alockinfo.l_type = F_UNLCK;
+ while ((rc = fcntl(lockfd, F_SETLKW, &alockinfo)) < 0 &&
+ errno == EINTR)
+ /* noop */;
+
+ if (rc < 0) {
+ syslog(LOG_ERR,
+ "fcntl: F_SETLKW: error releasing accept lock: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(EX_OSERR);
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+#define ARGV_GROW 10
+
+int main(int argc, char **argv, char **envp)
+{
+ int fdflags;
+ int fd;
+ char *p = NULL, *service;
+ struct request_info request;
+ int opt;
+ char *alt_config = NULL;
+ int call_debugger = 0;
+ int max_use = MAX_USE;
+ int reuse_timeout = REUSE_TIMEOUT;
+ int soctype;
+ int typelen = sizeof(soctype);
+ int newargc = 0;
+ char **newargv = (char **) xmalloc(ARGV_GROW * sizeof(char *));
+ int id;
+ char path[PATH_MAX];
+ struct stat sbuf;
+ ino_t start_ino;
+ off_t start_size;
+ time_t start_mtime;
+
+ opterr = 0; /* disable error reporting,
+ since we don't know about service-specific options */
+
+ newargv[newargc++] = argv[0];
+
+ while ((opt = getopt(argc, argv, "C:U:T:D")) != EOF) {
+ if (argv[optind-1][0] == '-' && strlen(argv[optind-1]) > 2) {
+ /* we have merged options */
+ syslog(LOG_ERR,
+ "options and arguments MUST be separated by whitespace");
+ exit(EX_USAGE);
+ }
+
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ case 'U': /* maximum uses */
+ max_use = atoi(optarg);
+ if (max_use < 0) max_use = 0;
+ break;
+ case 'T': /* reuse timeout */
+ reuse_timeout = atoi(optarg);
+ if (reuse_timeout < 0) reuse_timeout = 0;
+ break;
+ case 'D':
+ call_debugger = 1;
+ break;
+ default:
+ if (!((newargc+1) % ARGV_GROW)) { /* time to alloc more */
+ newargv = (char **) xrealloc(newargv, (newargc + ARGV_GROW) *
+ sizeof(char *));
+ }
+ newargv[newargc++] = argv[optind-1];
+
+ /* option has an argument */
+ if (optind < argc && argv[optind][0] != '-')
+ newargv[newargc++] = argv[optind++];
+
+ break;
+ }
+ }
+ /* grab the remaining arguments */
+ for (; optind < argc; optind++) {
+ if (!(newargc % ARGV_GROW)) { /* time to alloc more */
+ newargv = (char **) xrealloc(newargv, (newargc + ARGV_GROW) *
+ sizeof(char *));
+ }
+ newargv[newargc++] = argv[optind];
+ }
+
+ opterr = 1; /* enable error reporting */
+ optind = 1; /* reset the option index for parsing by the service */
+
+ p = getenv("CYRUS_VERBOSE");
+ if (p) verbose = atoi(p) + 1;
+
+ if (verbose > 30) {
+ syslog(LOG_DEBUG, "waiting 15 seconds for debugger");
+ sleep(15);
+ }
+
+ p = getenv("CYRUS_SERVICE");
+ if (p == NULL) {
+ syslog(LOG_ERR, "could not getenv(CYRUS_SERVICE); exiting");
+ exit(EX_SOFTWARE);
+ }
+ service = xstrdup(p);
+
+ p = getenv("CYRUS_ID");
+ if (p == NULL) {
+ syslog(LOG_ERR, "could not getenv(CYRUS_ID); exiting");
+ exit(EX_SOFTWARE);
+ }
+ id = atoi(p);
+
+ cyrus_init(alt_config, service, 0);
+
+ if (call_debugger) {
+ char debugbuf[1024];
+ int ret;
+ const char *debugger = config_getstring(IMAPOPT_DEBUG_COMMAND);
+ if (debugger) {
+ snprintf(debugbuf, sizeof(debugbuf), debugger,
+ argv[0], getpid(), service);
+ syslog(LOG_DEBUG, "running external debugger: %s", debugbuf);
+ ret = system(debugbuf); /* run debugger */
+ syslog(LOG_DEBUG, "debugger returned exit status: %d", ret);
+ }
+ }
+ syslog(LOG_DEBUG, "executed");
+
+ /* set close on exec */
+ fdflags = fcntl(LISTEN_FD, F_GETFD, 0);
+ if (fdflags != -1) fdflags = fcntl(LISTEN_FD, F_SETFD,
+ fdflags | FD_CLOEXEC);
+ if (fdflags == -1) {
+ syslog(LOG_ERR, "unable to set close on exec: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ return 1;
+ }
+ fdflags = fcntl(STATUS_FD, F_GETFD, 0);
+ if (fdflags != -1) fdflags = fcntl(STATUS_FD, F_SETFD,
+ fdflags | FD_CLOEXEC);
+ if (fdflags == -1) {
+ syslog(LOG_ERR, "unable to set close on exec: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ return 1;
+ }
+
+ /* figure out what sort of socket this is */
+ if (getsockopt(LISTEN_FD, SOL_SOCKET, SO_TYPE,
+ (char *) &soctype, &typelen) < 0) {
+ syslog(LOG_ERR, "getsockopt: SOL_SOCKET: failed to get type: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ return 1;
+ }
+
+ if (service_init(newargc, newargv, envp) != 0) {
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ return 1;
+ }
+
+ /* determine initial process file inode, size and mtime */
+ if (newargv[0][0] == '/')
+ strlcpy(path, newargv[0], sizeof(path));
+ else
+ snprintf(path, sizeof(path), "%s/%s", SERVICE_PATH, newargv[0]);
+
+ stat(path, &sbuf);
+ start_ino= sbuf.st_ino;
+ start_size = sbuf.st_size;
+ start_mtime = sbuf.st_mtime;
+
+ getlockfd(service, id);
+ for (;;) {
+ /* ok, listen to this socket until someone talks to us */
+
+ /* (re)set signal handlers, including SIGALRM */
+ signals_add_handlers(SIGALRM);
+
+ if (use_count > 0) {
+ /* we want to time out after 60 seconds, set an alarm */
+ alarm(reuse_timeout);
+ }
+
+ /* lock */
+ lockaccept();
+
+ fd = -1;
+ while (fd < 0 && !signals_poll()) { /* loop until we succeed */
+ /* check current process file inode, size and mtime */
+ stat(path, &sbuf);
+ if (sbuf.st_ino != start_ino || sbuf.st_size != start_size ||
+ sbuf.st_mtime != start_mtime) {
+ syslog(LOG_INFO, "process file has changed");
+ newfile = 1;
+ break;
+ }
+
+ if (soctype == SOCK_STREAM) {
+ fd = accept(LISTEN_FD, NULL, NULL);
+ if (fd < 0) {
+ switch (errno) {
+ case ENETDOWN:
+#ifdef EPROTO
+ case EPROTO:
+#endif
+ case ENOPROTOOPT:
+ case EHOSTDOWN:
+#ifdef ENONET
+ case ENONET:
+#endif
+ case EHOSTUNREACH:
+ case EOPNOTSUPP:
+ case ENETUNREACH:
+ case EAGAIN:
+ case EINTR:
+ break;
+
+ case EINVAL:
+ if (signals_poll() == SIGHUP) break;
+
+ default:
+ syslog(LOG_ERR, "accept failed: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(EX_OSERR);
+ }
+ }
+ } else {
+ /* udp */
+ struct sockaddr_storage from;
+ socklen_t fromlen;
+ char ch;
+ int r;
+
+ fromlen = sizeof(from);
+ r = recvfrom(LISTEN_FD, (void *) &ch, 1, MSG_PEEK,
+ (struct sockaddr *) &from, &fromlen);
+ if (r == -1) {
+ syslog(LOG_ERR, "recvfrom failed: %m");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(EX_OSERR);
+ }
+ fd = LISTEN_FD;
+ }
+ }
+
+ /* unlock */
+ unlockaccept();
+
+ if (fd < 0 && (signals_poll() || newfile)) {
+ /* timed out (SIGALRM), SIGHUP, or new process file */
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(0);
+ }
+ if (fd < 0) {
+ /* how did this happen? - we might have caught a signal. */
+ syslog(LOG_ERR, "accept() failed but we didn't catch it?");
+ if (MESSAGE_MASTER_ON_EXIT)
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ service_abort(EX_SOFTWARE);
+ }
+
+ /* cancel the alarm */
+ alarm(0);
+
+ /* tcp only */
+ if(soctype == SOCK_STREAM) {
+ libwrap_init(&request, service);
+
+ if (!libwrap_ask(&request, fd)) {
+ /* connection denied! */
+ shutdown(fd, SHUT_RDWR);
+ close(fd);
+ continue;
+ }
+ }
+
+ notify_master(STATUS_FD, MASTER_SERVICE_UNAVAILABLE);
+ syslog(LOG_DEBUG, "accepted connection");
+
+ if (fd != 0 && dup2(fd, 0) < 0) {
+ syslog(LOG_ERR, "can't duplicate accepted socket: %m");
+ service_abort(EX_OSERR);
+ }
+ if (fd != 1 && dup2(fd, 1) < 0) {
+ syslog(LOG_ERR, "can't duplicate accepted socket: %m");
+ service_abort(EX_OSERR);
+ }
+ if (fd != 2 && dup2(fd, 2) < 0) {
+ syslog(LOG_ERR, "can't duplicate accepted socket: %m");
+ service_abort(EX_OSERR);
+ }
+
+ /* tcp only */
+ if(soctype == SOCK_STREAM) {
+ if (fd > 2) close(fd);
+ }
+
+ notify_master(STATUS_FD, MASTER_SERVICE_CONNECTION);
+ use_count++;
+ service_main(newargc, newargv, envp);
+ /* if we returned, we can service another client with this process */
+
+ if (signals_poll() || use_count >= max_use) {
+ /* caught SIGHUP or exceeded max use count */
+ break;
+ }
+
+ notify_master(STATUS_FD, MASTER_SERVICE_AVAILABLE);
+ }
+
+ service_abort(0);
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/master/service.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,73 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: service.h,v 1.16 2003/10/22 18:50:14 rjs3 Exp $ */
+
+#ifndef SERVICE_H
+#define SERVICE_H
+
+enum {
+ STATUS_FD = 3,
+ LISTEN_FD = 4
+};
+
+enum {
+ MASTER_SERVICE_AVAILABLE = 0x01,
+ MASTER_SERVICE_UNAVAILABLE = 0x02,
+ MASTER_SERVICE_CONNECTION = 0x03,
+ MASTER_SERVICE_CONNECTION_MULTI = 0x04
+};
+
+extern int service_init(int argc, char **argv, char **envp);
+extern int service_main(int argc, char **argv, char **envp);
+extern int service_main_fd(int fd, int argc, char **argv, char **envp);
+extern int service_abort(int error);
+
+enum {
+ MAX_USE = 250,
+ REUSE_TIMEOUT = 60
+};
+
+struct notify_message {
+ int message;
+ pid_t service_pid;
+};
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+Makefile
+makedepend.log
+remotepurge
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,8 @@
+/.cvsignore/1.2/Wed Oct 22 18:03:11 2003//Tcyrus-release-2-3-7
+/Makefile.in/1.8.2.1/Fri Dec 19 18:33:48 2003//Tcyrus-release-2-3-7
+/inn.diffs/1.3/Sat May 25 19:57:49 2002//Tcyrus-release-2-3-7
+/macros.h/1.7/Wed Oct 22 18:50:15 2003//Tcyrus-release-2-3-7
+/readconfig.c/1.8/Wed Oct 22 18:50:15 2003//Tcyrus-release-2-3-7
+/readconfig.h/1.4/Thu Feb 13 20:15:47 2003//Tcyrus-release-2-3-7
+/remotepurge.c/1.18/Thu Feb 13 20:15:47 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/netnews
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,92 @@
+# Makefile for netnews tools useful with cyrus
+#
+# @configure_input@
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Makefile.in,v 1.8.2.1 2003/12/19 18:33:48 ken3 Exp $
+#
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@
+CPPFLAGS = -I.. -I$(srcdir) -I$(srcdir)/../lib -I$(srcdir)/../et @CPPFLAGS@
+LIBS = @IMAP_LIBS@ @LIB_RT@
+DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+service_path = @service_path@
+
+OBJS = remotepurge.o readconfig.o
+
+all: remotepurge
+
+install:
+ $(INSTALL) -s -m 755 remotepurge $(DESTDIR)$(service_path)
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
+
+remotepurge: $(OBJS) $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o remotepurge $(OBJS) \
+ $(DEPLIBS) $(LIBS)
+
+
+clean:
+ rm -f *.o Makefile.bak remotepurge makedepend.log
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/inn.diffs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/inn.diffs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/inn.diffs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/inn.diffs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4634 @@
+$Id: inn.diffs,v 1.3 2002/05/25 19:57:49 leg Exp $
+
+This is a patch against INN 2.2.1 for allowing INN to deliver directly
+to an IMAP server using LMTP and IMAP (to handle control messages)
+
+This patch will hopefully be included in future versions on INN.
+
+
+To configure INN to deliver to an IMAP server put something like the
+following in your newsfeeds file.
+
+imapfeed!:\
+ !*,\
+ :Tc,Wnm*,S30000:/usr/news/bin/startinnfeed imapfeed
+
+# A real-time feed through innfeed.
+myhostname.cmu.edu\
+ :!junk,!control/!foo\
+ :Tm:imapfeed!
+
+
+
+*** Makefile.old Mon Feb 28 00:50:47 2000
+--- Makefile Thu Feb 10 23:39:19 2000
+***************
+*** 19,25 ****
+
+ SRC = article.c \
+ buffer.c \
+- connection.c \
+ endpoint.c \
+ host.c \
+ innlistener.c \
+--- 19,24 ----
+***************
+*** 51,61 ****
+--- 50,62 ----
+ config_l.o config_y.o
+
+ INNFEED_BIN = $D$(PATHBIN)/innfeed
++ IMAPFEED_BIN = $D$(PATHBIN)/imapfeed
+
+ STARTINNFEED = $D$(PATHBIN)/startinnfeed
+
+
+ ALL_INSTALLED = $D$(PATHBIN)/innfeed $D$(PATHBIN)/startinnfeed \
++ $D$(PATHBIN)/imapfeed \
+ $D$(PATHBIN)/procbatch $D$(PATHBIN)/innfeed-convcfg
+
+ MAN_INSTALLED = $D$(MANDIR)/man1/innfeed.1 $D$(MANDIR)/man5/innfeed.conf.5
+***************
+*** 95,101 ****
+ DEPENDFLAGS = -s -c '$(CC) -E'
+
+ .c.o:
+! $(COMPILE.c) $< $(OUTPUT_OPTION)
+
+ .c.E:
+ $(CPP.c) $< $(OUTPUT_OPTION)
+--- 96,102 ----
+ DEPENDFLAGS = -s -c '$(CC) -E'
+
+ .c.o:
+! $(COMPILE.c) $(SASLFLAGS) $< $(OUTPUT_OPTION)
+
+ .c.E:
+ $(CPP.c) $< $(OUTPUT_OPTION)
+***************
+*** 103,114 ****
+ .sh:
+ $(RM) $@ ; $(CP) $< $@ ; $(CHMOD) a-w,a+x $@
+
+! all: innfeed startinnfeed
+
+ install: $(ALL_INSTALLED)
+
+! innfeed: $(OBJS) version.o $(MALLOC) $(LIBNEWS)
+! $(LINK.c) -o $@ $(OBJS) version.o $(LIBNEWS) $(LIBNEWS) $(LIBS)
+
+ $D$(PATHBIN)/innfeed: innfeed
+ $(LIBTOOL) ../installit.sh $(OWNER) -m 550 -b .OLD $? $@
+--- 104,118 ----
+ .sh:
+ $(RM) $@ ; $(CP) $< $@ ; $(CHMOD) a-w,a+x $@
+
+! all: innfeed startinnfeed imapfeed
+
+ install: $(ALL_INSTALLED)
+
+! innfeed: $(OBJS) version.o connection.o $(MALLOC) $(LIBNEWS)
+! $(LINK.c) -o $@ $(OBJS) version.o connection.o $(LIBNEWS) $(LIBNEWS) $(LIBS)
+!
+! imapfeed: $(OBJS) version.o imap_connection.o $(MALLOC) $(LIBNEWS)
+! $(LINK.c) -o $@ $(OBJS) version.o imap_connection.o $(LIBNEWS) $(LIBNEWS) $(LIBS) $(LIB_SASL)
+
+ $D$(PATHBIN)/innfeed: innfeed
+ $(LIBTOOL) ../installit.sh $(OWNER) -m 550 -b .OLD $? $@
+***************
+*** 135,140 ****
+--- 139,145 ----
+ echo "" ; echo "" ;\
+ fi
+
++
+ objs: $(OBJS)
+
+ tags: $(SRC) $(INCS)
+***************
+*** 227,232 ****
+--- 232,239 ----
+ article.o: article.c article.h buffer.h config.h endpoint.h misc.h \
+ msgs.h sysconfig.h
+ buffer.o: buffer.c buffer.h config.h misc.h sysconfig.h
++ imapconnection.o: article.h buffer.h config.h configfile.h imapconnection.c \
++ connection.h endpoint.h host.h misc.h msgs.h sysconfig.h
+ connection.o: article.h buffer.h config.h configfile.h connection.c \
+ connection.h endpoint.h host.h misc.h msgs.h sysconfig.h
+ endpoint.o: buffer.h config.h configfile.h endpoint.c endpoint.h host.h \
+
+
+polarbear:/afs/andrew/system/src/host/inn/013/innfeed> diff -c main.old main.c
+*** main.old Mon Feb 28 00:51:23 2000
+--- main.c Tue Feb 1 00:33:54 2000
+***************
+*** 103,108 ****
+--- 103,113 ----
+ bool useMMap = false ;
+ void (*gPrintInfo) (void) ;
+ char *dflTapeDir;
++ /* these are used by imapfeed */
++ char *deliver_username = NULL;
++ char *deliver_authname = NULL;
++ char *deliver_password = NULL;
++ char *deliver_realm = NULL;
+
+ /* imports */
+ extern char *versionInfo ;
+***************
+*** 162,168 ****
+ struct rlimit rl;
+ bool val;
+
+-
+ strcpy (dateString,ctime(&now)) ;
+ dateString [24] = '\0' ;
+
+--- 167,172 ----
+***************
+*** 842,847 ****
+--- 846,877 ----
+ logFile = buildFilename (innconf->pathlog,p) ;
+ FREE (p) ;
+ }
++
++ /* For imap/lmtp delivering */
++ if (getString (topScope,"deliver-username",&p, NO_INHERIT))
++ {
++ deliver_username = p;
++ /* don't need to free */
++ }
++
++ if (getString (topScope,"deliver-authname",&p, NO_INHERIT))
++ {
++ deliver_authname = p;
++ /* don't need to free */
++ }
++
++ if (getString (topScope,"deliver-password",&p, NO_INHERIT))
++ {
++ deliver_password = p;
++ /* don't need to free */
++ }
++
++ if (getString (topScope,"deliver-realm",&p, NO_INHERIT))
++ {
++ deliver_realm = p;
++ /* don't need to free */
++ }
++
+
+
+ return 1 ;
+
+polarbear:/afs/andrew/system/src/host/inn/013/innfeed> diff -c startinnfeed.old startinnfeed.c
+*** startinnfeed.old Mon Feb 28 00:50:28 2000
+--- startinnfeed.c Mon Feb 28 14:06:28 2000
+***************
+*** 78,86 ****
+ else
+ {
+ char **evp = NULL ;
+
+! innfeed = NEW(char, (strlen(innconf->pathbin)+1+strlen(INNFEED)+1));
+! sprintf(innfeed, "%s/%s", innconf->pathbin, INNFEED);
+ av[0] = (char *) innfeed;
+
+ #if defined (USE_DMALLOC)
+--- 78,98 ----
+ else
+ {
+ char **evp = NULL ;
++ char *execname = INNFEED;
++
++ if (ac == 2)
++ {
++ if (strcmp(av[1], "imapfeed") == 0) {
++ execname = imapfeed;
++ av[1] = NULL;
++ } else {
++ syslog(LOG_ERR, "Only imapfeed is a valid argument to startinnfeed");
++ exit(1);
++ }
++ }
+
+! innfeed = NEW(char, (strlen(innconf->pathbin)+1+strlen(execname)+1));
+! sprintf(innfeed, "%s/%s", innconf->pathbin, execname);
+ av[0] = (char *) innfeed;
+
+ #if defined (USE_DMALLOC)
+
+polarbear:/afs/andrew/system/src/host/inn/013/innfeed> diff -c /dev/null imap_connection.c
+*** /dev/null Mon Dec 31 23:00:00 1979
+--- imap_connection.c Mon Feb 28 00:45:20 2000
+***************
+*** 0 ****
+--- 1,4408 ----
++ /* feed articles to an IMAP server via LMTP and IMAP
++ Tim Martin
++
++ Instead of feeding articles via nntp to another host this feeds the
++ messages via lmtp to a host and the control messages (cancel's
++ etc..) it preforms via IMAP. This means it has 2 active connections
++ at any given time and 2 queues.
++
++ When an article comes in it is immediatly placed in the lmtp
++ queue. When an article is picked off the lmtp queue for processing
++ first check if it's a control message. if so place it in the IMAP
++ queue. If not attempt to deliver via lmtp.
++
++ This attempts to follow the exact same api as connection.c.
++
++ TODO:
++
++ feed to smtp
++ security layers? <--punt on for now
++ authname/password per connection object
++ untagged IMAP messages
++ */
++
++ #ifdef HAVE_SASL
++ #include <sasl.h>
++ #endif /* HAVE_SASL */
++
++ #include <netinet/in.h>
++ #include <netdb.h>
++ #include <sys/socket.h>
++ #include <sys/file.h>
++ #include <netinet/in.h>
++ #include <netdb.h>
++ #include <time.h>
++
++ #include <errno.h>
++
++ #include "buffer.h"
++ #include "connection.h"
++ #include "endpoint.h"
++ #include "host.h"
++ #include "article.h"
++ #include "msgs.h"
++ #include "configfile.h"
++ #include "clibrary.h"
++
++
++
++ #define IMAP_PORT 143
++
++ #ifdef SMTPMODE
++ #define LMTP_PORT 25
++ #else
++ #define LMTP_PORT 2003
++ #endif /* SMTPMODE */
++
++ /* The name to prepend to deliver directly to newsgroup bboards */
++ #define NEWS_USERNAME "bb"
++
++ #define IMAP_TAGLENGTH 6
++
++ #define QUEUE_MAX_SIZE 250
++
++ #define DOSOMETHING_TIMEOUT 60
++
++
++
++ /* external */
++ extern char *deliver_username;
++ extern char *deliver_authname;
++ extern char *deliver_password;
++ extern char *deliver_realm;
++
++
++ char hostname[MAXHOSTNAMELEN];
++ char *mailfrom_name = ""; /* default to no return path */
++
++ /* states the imap connection may be in */
++ typedef enum {
++
++ IMAP_DISCONNECTED = 1,
++ IMAP_WAITING,
++
++ IMAP_CONNECTED_NOTAUTH,
++
++ IMAP_READING_INTRO,
++
++ IMAP_WRITING_CAPABILITY,
++ IMAP_READING_CAPABILITY,
++
++ IMAP_WRITING_STARTAUTH,
++ IMAP_READING_STEPAUTH,
++ IMAP_WRITING_STEPAUTH,
++
++ IMAP_IDLE_AUTHED,
++
++ IMAP_WRITING_CREATE,
++ IMAP_READING_CREATE,
++
++ IMAP_WRITING_DELETE,
++ IMAP_READING_DELETE,
++
++ IMAP_WRITING_SELECT,
++ IMAP_READING_SELECT,
++
++ IMAP_WRITING_SEARCH,
++ IMAP_READING_SEARCH,
++
++ IMAP_WRITING_STORE,
++ IMAP_READING_STORE,
++
++ IMAP_WRITING_CLOSE,
++ IMAP_READING_CLOSE,
++
++ IMAP_WRITING_QUIT,
++ IMAP_READING_QUIT
++
++ } imap_state_t;
++
++ typedef enum {
++ LMTP_DISCONNECTED = 1,
++ LMTP_WAITING,
++
++ LMTP_CONNECTED_NOTAUTH,
++
++ LMTP_READING_INTRO,
++
++ LMTP_WRITING_LHLO,
++ LMTP_READING_LHLO,
++
++ LMTP_WRITING_STARTAUTH,
++ LMTP_READING_STEPAUTH,
++ LMTP_WRITING_STEPAUTH,
++
++ LMTP_AUTHED_IDLE,
++
++ LMTP_READING_MAILFROM,
++ LMTP_READING_RCPTTO,
++ LMTP_READING_DATA,
++ LMTP_READING_CONTENTS,
++
++ LMTP_WRITING_UPTODATA,
++ LMTP_WRITING_CONTENTS,
++
++ LMTP_WRITING_QUIT,
++ LMTP_READING_QUIT
++
++ } lmtp_state_t;
++
++ typedef struct imap_capabilities_s {
++
++ int imap4; /* does server support imap4bis? */
++ int logindisabled; /* does the server allow the login command? */
++
++ char *saslmechs; /* supported SASL mechanisms */
++
++ } imap_capabilities_t;
++
++ typedef struct lmtp_capabilities_s {
++
++ int Eightbitmime;
++ int EnhancedStatusCodes;
++ int pipelining;
++
++ char *saslmechs;
++
++ } lmtp_capabilities_t;
++
++ typedef enum {
++ STAT_CONT = 0,
++ STAT_NO = 1,
++ STAT_OK = 2,
++ STAT_FAIL = 3
++ } imt_stat;
++
++ /* Message types */
++ typedef enum {
++
++ DELIVER,
++ CREATE_FOLDER,
++ CANCEL_MSG,
++ DELETE_FOLDER
++
++ } control_type_t;
++
++ typedef struct control_item_s {
++
++ Article article;
++ char *folder;
++ char *msgid; /* only for cancel's */
++ unsigned long uid; /* only for cancel's */
++
++ } control_item_t;
++
++ typedef struct article_queue_s {
++
++ control_type_t type;
++
++ time_t arrived;
++ time_t nextsend; /* time we should next try to send article */
++
++ int trys;
++
++ int counts_toward_size;
++
++ union {
++ Article article;
++ control_item_t *control;
++ void *generic;
++ } data;
++
++ struct article_queue_s *next;
++
++ } article_queue_t;
++
++ typedef struct Q_s {
++
++ article_queue_t *head;
++
++ article_queue_t *tail;
++
++ int size;
++
++ } Q_t;
++
++ typedef struct connection_s {
++
++ /* common stuff */
++ char *ServerName;
++
++ char *lmtp_respBuffer; /* buffer all responses are read into */
++ Buffer lmtp_rBuffer; /* buffer all responses are read into */
++
++ Host myHost ; /* the host who owns the connection */
++
++ time_t timeCon ; /* the time the connect happened (last auth suceeded) */
++
++ int issue_quit; /* Three states:
++ * 0 - don't do anything
++ * 1 - after issue quit enter wait state
++ * 2 - after issue quit reconnect
++ * 3 - after issue quit delete connection
++ * 4 - nuke cxn
++ */
++
++ /* Statistics */
++ int lmtp_suceeded;
++ int lmtp_failed;
++
++ int cancel_suceeded;
++ int cancel_failed;
++
++ int create_suceeded;
++ int create_failed;
++
++ int remove_suceeded;
++ int remove_failed;
++
++
++ /* LMTP stuff */
++ int lmtp_port;
++ lmtp_state_t lmtp_state;
++ #ifdef HAVE_SASL
++ sasl_conn_t *saslconn_lmtp;
++ #endif /* HAVE_SASL */
++ int sockfd_lmtp;
++
++ time_t lmtp_timeCon ;
++
++ EndPoint lmtp_endpoint;
++ u_int ident ; /* an identifier for syslogging. */
++
++ lmtp_capabilities_t *lmtp_capabilities;
++
++ int lmtp_have_mailfrom;
++ int lmtp_disconnects;
++ char *lmtp_tofree_str;
++
++ article_queue_t *current_article;
++ Buffer *current_bufs;
++ int current_rcpts_issued;
++ int current_rcpts_okayed;
++
++ /* Timer for the max amount of time to wait for a response from the
++ remote */
++ u_int lmtp_readTimeout ;
++ TimeoutId lmtp_readBlockedTimerId ;
++
++ /* Timer for the max amount of time to wait for a any amount of data
++ to be written to the remote */
++ u_int lmtp_writeTimeout ;
++ TimeoutId lmtp_writeBlockedTimerId ;
++
++ /* Timer for the number of seconds to sleep before attempting a
++ reconnect. */
++ u_int lmtp_sleepTimeout ;
++ TimeoutId lmtp_sleepTimerId ;
++
++ /* Timer for max amount between queueing some articles and trying to send them */
++ u_int dosomethingTimeout ;
++ TimeoutId dosomethingTimerId ;
++
++ Q_t lmtp_todeliver_q;
++
++
++
++ /* IMAP stuff */
++ int imap_port;
++ #ifdef HAVE_SASL
++ sasl_conn_t *imap_saslconn;
++ #endif /* HAVE_SASL */
++
++ char *imap_respBuffer;
++ Buffer imap_rBuffer;
++ EndPoint imap_endpoint;
++
++ imap_capabilities_t *imap_capabilities;
++
++ int imap_sockfd;
++
++ time_t imap_timeCon ;
++
++ imap_state_t imap_state;
++ int imap_disconnects;
++ char *imap_tofree_str;
++
++ char imap_currentTag[IMAP_TAGLENGTH];
++ int imap_tag_num;
++
++ /* Timer for the max amount of time to wait for a response from the
++ remote */
++ u_int imap_readTimeout ;
++ TimeoutId imap_readBlockedTimerId ;
++
++ /* Timer for the max amount of time to wait for a any amount of data
++ to be written to the remote */
++ u_int imap_writeTimeout ;
++ TimeoutId imap_writeBlockedTimerId ;
++
++ /* Timer for the number of seconds to sleep before attempting a
++ reconnect. */
++ u_int imap_sleepTimeout ;
++ TimeoutId imap_sleepTimerId ;
++
++ Q_t imap_controlMsg_q;
++
++ article_queue_t *current_control;
++
++ struct connection_s *next;
++
++ } connection_t;
++
++ static Connection gCxnList = NULL ;
++ static u_int gCxnCount= 0 ;
++ static u_int max_reconnect_period = MAX_RECON_PER ;
++ static u_int init_reconnect_period = INIT_RECON_PER;
++
++ typedef enum {
++ RET_OK = 0,
++ RET_FAIL = 1,
++ RET_QUEUE_EMPTY,
++ RET_EXCEEDS_SIZE,
++ RET_NO_FULLLINE,
++ RET_NO,
++ RET_ARTICLE_BAD
++ } conn_ret;
++
++
++ /********** Private Function Declarations *************/
++
++ static void lmtp_readCB (EndPoint e, IoStatus i, Buffer *b, void *d);
++ static void imap_readCB (EndPoint e, IoStatus i, Buffer *b, void *d);
++ static void imap_writeCB (EndPoint e, IoStatus i, Buffer *b, void *d);
++ static void lmtp_writeCB (EndPoint e, IoStatus i, Buffer *b, void *d);
++
++ static conn_ret lmtp_Connect(connection_t *cxn);
++ static conn_ret imap_Connect(connection_t *cxn);
++
++ static void prepareReopenCbk (Connection cxn, int type);
++
++ static void lmtp_readTimeoutCbk (TimeoutId id, void *data);
++ static void imap_readTimeoutCbk (TimeoutId id, void *data);
++
++ static void dosomethingTimeoutCbk (TimeoutId id, void *data);
++
++ static conn_ret WriteToWire_imapstr(connection_t *cxn, char *str, int slen);
++ static conn_ret WriteToWire_lmtpstr(connection_t *cxn, char *str, int slen);
++
++ static conn_ret WriteToWire(connection_t *cxn, EndpRWCB callback,
++ EndPoint endp, Buffer *array);
++ static void lmtp_sendmessage(connection_t *cxn, Article justadded);
++ static conn_ret imap_ProcessQueue(connection_t *cxn);
++
++ static conn_ret FindHeader(Buffer *bufs, char *header, char **start, char **end);
++ static conn_ret PopFromQueue(Q_t *q, article_queue_t **item);
++ static void QueueForgetAbout(connection_t *cxn, article_queue_t *item, int failed);
++
++ static void delConnection (Connection cxn);
++
++ static void DeferAllArticles(connection_t *cxn, Q_t *q);
++
++ static void lmtp_Disconnect(connection_t *cxn);
++ static void imap_Disconnect(connection_t *cxn);
++ static conn_ret imap_listenintro(connection_t *cxn);
++
++ static void imap_writeTimeoutCbk (TimeoutId id, void *data);
++ static void lmtp_writeTimeoutCbk (TimeoutId id, void *data);
++
++ /******************** PRIVATE FUNCTIONS ***************************/
++
++ static char *imap_stateToString(int state)
++ {
++ switch (state)
++ {
++ case IMAP_DISCONNECTED: return "Disconnected";
++ case IMAP_WAITING: return "Waiting";
++ case IMAP_CONNECTED_NOTAUTH: return "Connected but not Authenticated";
++ case IMAP_READING_INTRO: return "Reading Intro line";
++ case IMAP_WRITING_CAPABILITY: return "Writing capability";
++ case IMAP_READING_CAPABILITY: return "Reading capability";
++ case IMAP_WRITING_STARTAUTH: return "Writing Startauth";
++ case IMAP_READING_STEPAUTH: return "Reading Stepauth";
++ case IMAP_WRITING_STEPAUTH: return "Writing Stepauth";
++ case IMAP_IDLE_AUTHED: return "Idle. Authenticated";
++ case IMAP_WRITING_CREATE: return "Writing create";
++ case IMAP_READING_CREATE: return "Reading create response";
++ case IMAP_WRITING_DELETE: return "Writing Delete command";
++ case IMAP_READING_DELETE: return "Reading Delete response";
++ case IMAP_WRITING_SELECT: return "Writing Select";
++ case IMAP_READING_SELECT: return "Reading Select response";
++ case IMAP_WRITING_SEARCH: return "Writing Search";
++ case IMAP_READING_SEARCH: return "Reading Search response";
++ case IMAP_WRITING_STORE: return "Writing Store";
++ case IMAP_READING_STORE: return "Reading Store response";
++ case IMAP_WRITING_CLOSE: return "Writing Close";
++ case IMAP_READING_CLOSE: return "Reading Close response";
++ case IMAP_WRITING_QUIT: return "Writing Quit";
++ case IMAP_READING_QUIT: return "Reading Quit";
++ default: return "Unknown state";
++ }
++ }
++
++ static char *lmtp_stateToString(int state)
++ {
++ switch(state)
++ {
++ case LMTP_DISCONNECTED: return "Disconnected";
++ case LMTP_WAITING: return "Waiting";
++ case LMTP_CONNECTED_NOTAUTH: return "Connected but not authenticated";
++ case LMTP_READING_INTRO: return "Reading intro";
++ case LMTP_WRITING_LHLO: return "Writing LHLO";
++ case LMTP_READING_LHLO: return "Reading LHLO response";
++ case LMTP_WRITING_STARTAUTH: return "Writing Start Auth";
++ case LMTP_READING_STEPAUTH: return "Reading stepauth";
++ case LMTP_WRITING_STEPAUTH: return "writing stepauth";
++ case LMTP_AUTHED_IDLE: return "Idle. Authenticated";
++ case LMTP_READING_MAILFROM: return "Reading mailfrom";
++ case LMTP_READING_RCPTTO: return "Reading RCPTTO response";
++ case LMTP_READING_DATA: return "Reading DATA response";
++ case LMTP_READING_CONTENTS: return "Reading contents response";
++ case LMTP_WRITING_UPTODATA: return "Writing MAIL FROM, RCPTTO, DATA commands";
++ case LMTP_WRITING_CONTENTS: return "Writing contents of message";
++ case LMTP_WRITING_QUIT: return "Writing Quit";
++ case LMTP_READING_QUIT: return "Reading Quit";
++ default: return "Unknown state";
++ }
++ }
++
++ /******************************* Queue functions ***********************************/
++
++ /*
++ * Add a message to a generic queue
++ *
++ * q - the queue adding to
++ * item - the data to add to the queue
++ * type - the type of item it is (i.e. cancel,lmtp,etc..)
++ * addsmsg - weather this should be counted toward the queue size
++ * this is for control msg's that create multiple queue items.
++ * For example a cancel message canceling a message in multiple
++ * newsgroups will create >1 queue item but we only want it to count
++ * once towards the queue
++ * must - wheather we must take it even though it may put us over our max size
++ */
++
++ static conn_ret AddToQueue(Q_t *q, void *item, control_type_t type, int addsmsg, bool must)
++ {
++ article_queue_t *newentry;
++
++ if (must == false)
++ {
++ if (q->size >= QUEUE_MAX_SIZE)
++ {
++ return RET_EXCEEDS_SIZE;
++ }
++ } else {
++ if (q->size >= QUEUE_MAX_SIZE * 10)
++ {
++ d_printf(0,"Queue has grown way too much. Dropping article\n");
++ return RET_FAIL;
++ }
++ }
++
++ /* add to the end of our queue */
++ newentry = (article_queue_t *) malloc(sizeof(article_queue_t));
++
++ newentry->type = type;
++
++ /* send as soon as possible */
++ newentry->nextsend = newentry->arrived = time(NULL);
++
++ newentry->trys = 0;
++
++ newentry->data.generic = item;
++ newentry->next = NULL;
++ newentry->counts_toward_size = addsmsg;
++
++ /* add to end of queue */
++ if (q->tail == NULL)
++ {
++ q->head = newentry;
++ q->tail = newentry;
++ } else {
++
++ q->tail->next = newentry;
++ q->tail = newentry;
++ }
++
++ q->size+=addsmsg;
++
++ return RET_OK;
++ }
++
++ /*
++ * Pop an item from the queue
++ *
++ * q - the queue to pop from
++ * item - where the item shall be placed upon sucess
++ *
++ */
++
++ static conn_ret PopFromQueue(Q_t *q, article_queue_t **item)
++ {
++ article_queue_t *todel;
++
++ /* if queue empty return error */
++ if ( q->head == NULL)
++ {
++ return RET_QUEUE_EMPTY;
++ }
++
++ /* set what we return */
++ *item = q->head;
++
++ q->head = q->head->next;
++ if (q->head == NULL) q->tail = NULL;
++
++ q->size-=(*item)->counts_toward_size;
++
++ return RET_OK;
++ }
++
++ /*
++ * ReQueue an item. Will either put it back in the queue for another try
++ * or forget about it
++ *
++ * cxn - our connection object (needed so forget about things)
++ * q - the queue to requeue to
++ * entry - the item to put back
++ */
++
++ static void ReQueue(connection_t *cxn, Q_t *q, article_queue_t *entry)
++ {
++ /* look at the time it's been here */
++ entry->nextsend = time(NULL) + (entry->trys *30); /* xxx better formula? */
++
++ entry->trys++;
++
++ /* give up after 5 tries xxx configurable??? */
++ if (entry->trys == 5)
++ {
++ QueueForgetAbout(cxn, entry,1);
++ return;
++ }
++
++
++ /* ok let's add back to the end of the queue */
++ entry->next = NULL;
++
++ /* add to end of queue */
++ if (q->tail == NULL)
++ {
++ q->head = entry;
++ q->tail = entry;
++ } else {
++ q->tail->next = entry;
++ q->tail = entry;
++ }
++
++ q->size+=entry->counts_toward_size;
++ }
++
++
++
++ /*
++ * Forget about an item. Tells host object if we suceeded/failed/etc with the message
++ *
++ * cxn - connection object
++ * item - item
++ * failed - type of failure (see below)
++ *
++ * failed:
++ * 0 - suceeded delivering message
++ * 1 - failed delivering message
++ * 2 - Try to give back to host
++ * 3 - Article missing (i.e. can't find on disk)
++ */
++
++ static void QueueForgetAbout(connection_t *cxn, article_queue_t *item, int failed)
++ {
++ Article art = NULL;
++
++ switch (item->type)
++ {
++ case DELIVER:
++ if (failed>0)
++ cxn->lmtp_failed++;
++ art = item->data.article;
++ break;
++
++ case CANCEL_MSG:
++ if (failed>0)
++ cxn->cancel_failed++;
++ free(item->data.control->msgid);
++ free(item->data.control->folder);
++
++ if (item->counts_toward_size == 1)
++ art = item->data.control->article;
++
++ free(item->data.control );
++ break;
++
++ case CREATE_FOLDER:
++ if (failed>0)
++ cxn->create_failed++;
++ free(item->data.control->folder);
++
++ art = item->data.control->article;
++
++ free(item->data.control );
++ break;
++
++ case DELETE_FOLDER:
++ if (failed>0)
++ cxn->remove_failed++;
++ free(item->data.control->folder);
++
++ art = item->data.control->article;
++
++ free(item->data.control );
++ break;
++
++ default:
++ d_printf(0,"Unknown type to forget about\n");
++ break;
++ }
++
++ if (art!=NULL)
++ switch (failed)
++ {
++ case 0:
++ hostArticleAccepted (cxn->myHost, cxn, art);
++ break;
++ case 1:
++ hostArticleRejected (cxn->myHost, cxn, art);
++ break;
++ case 2:
++ hostTakeBackArticle (cxn->myHost, cxn, art);
++ break;
++ case 3:
++ hostArticleIsMissing(cxn->myHost, cxn, art);
++ break;
++ default:
++ d_printf(0,"Not understood\n");
++
++ }
++
++ free(item);
++ }
++
++ /*
++ * How much space is available in the queue
++ */
++
++ static int QueueSpace(Q_t *q)
++ {
++ int ret = QUEUE_MAX_SIZE - q->size;
++ if (ret < 0) ret = 0;
++ return ret;
++ }
++
++ /*
++ * How many items are in the queue
++ */
++
++ static int QueueItems(Q_t *q)
++ {
++ return q->size;
++ }
++
++
++ /***************************** END Queue functions ***********************************/
++
++ /***************************** Generic Parse Functions *******************************/
++
++ /* returns the end of the header */
++
++ static char *GetUntil(char *str)
++ {
++ while (((*str) != '\0') && ( (*str) != '\r') && ( (*str) != '\n'))
++ {
++ str++;
++ }
++
++ return str;
++ }
++
++ /*
++ * Finds the given header in the message
++ * Returns NULL if not found
++ *
++ * returns something malloc'ed
++ */
++ static conn_ret FindHeader(Buffer *bufs, char *header, char **start, char **end)
++ {
++ Buffer b;
++ int size;
++ char *str_base;
++ char *str;
++ int headerlen = strlen(header);
++
++ if (bufs==NULL)
++ {
++ if (start)
++ *start=NULL;
++ return RET_ARTICLE_BAD;
++ }
++
++ b = bufs[0];
++ size = bufferSize(b);
++ str_base = bufferBase(b);
++ str = str_base;
++
++ while ( (((int)str) - ((int)str_base)) < size - headerlen)
++ {
++ if (*str == header[0])
++ {
++ if ((strncasecmp(header, str, headerlen)==0) && ( *(str + headerlen)==':'))
++ {
++ if (start)
++ {
++ *start = str+headerlen+1;
++
++ /* get rid of leading whitespace */
++ while ( isspace((int) **start))
++ (*start)++;
++ }
++
++ if (end)
++ *end = GetUntil(str+headerlen+1);
++
++ return RET_OK;
++ }
++ } /*else if (*str == '\n') { */
++ /* end of headers */
++ /* return RET_NO;
++ }*/
++ /* str = GetUntil(str);
++ if (*str == '\n') str++; */
++ str++;
++ }
++
++ return RET_NO;
++ }
++
++ static conn_ret GetLine(char *buf, char *ret, int retmaxsize)
++ {
++ char *str_base;
++ char *str;
++
++ int size = strlen(buf);
++ str_base = buf;
++ str = str_base;
++
++ while ( (*str) != '\0')
++ {
++ if ((*str) == '\n')
++ {
++ if (str-str_base > retmaxsize)
++ {
++ d_printf(0,"Max size exceeded! %s\n",str_base);
++ return RET_FAIL;
++ }
++
++ /* fill in the return string */
++ memcpy(ret, str_base, str-str_base);
++ ret[ str - str_base -1] = '\0';
++
++ memcpy( str_base, str_base + (str-str_base)+1, size - (str-str_base));
++ str_base[size - (str-str_base)]='\0';
++
++ return RET_OK;
++ }
++
++ str++;
++ }
++
++ /* couldn't find a full line */
++ return RET_NO_FULLLINE;
++ }
++
++
++
++ /************************** END Generic Parse Functions *******************************/
++
++ /************************ Writing to Network functions *****************/
++
++ static conn_ret WriteToWire(connection_t *cxn, EndpRWCB callback,
++ EndPoint endp, Buffer *array)
++ {
++
++ if (array == NULL) return RET_FAIL;
++
++ prepareWrite (endp,
++ array,
++ NULL,
++ callback,
++ cxn);
++
++ return RET_OK;
++ }
++
++ static conn_ret WriteToWire_str(connection_t *cxn, EndpRWCB callback,
++ EndPoint endp, char *str, int slen)
++ {
++ bool res;
++ conn_ret result;
++ Buffer buff;
++ Buffer *writeArr;
++ char *p;
++
++ if (slen==-1) slen = strlen(str);
++
++ buff = newBufferByCharP(str, slen+1, slen);
++ ASSERT (buff != NULL);
++
++ writeArr = makeBufferArray (buff, NULL) ;
++
++ result = WriteToWire(cxn, callback, endp, writeArr);
++
++ return result;
++ }
++
++ static conn_ret WriteToWire_imapstr(connection_t *cxn, char *str, int slen)
++ {
++ /* prepare the timeouts */
++ clearTimer (cxn->imap_readBlockedTimerId) ;
++
++ /* set up the write timer. */
++ clearTimer (cxn->imap_writeBlockedTimerId) ;
++
++ if (cxn->imap_writeTimeout > 0)
++ cxn->imap_writeBlockedTimerId = prepareSleep (imap_writeTimeoutCbk, cxn->imap_writeTimeout,
++ cxn);
++ cxn->imap_tofree_str = str;
++ return WriteToWire_str(cxn, imap_writeCB, cxn->imap_endpoint, str, slen);
++ }
++
++ static conn_ret WriteToWire_lmtpstr(connection_t *cxn, char *str, int slen)
++ {
++ /* prepare the timeouts */
++ clearTimer (cxn->lmtp_readBlockedTimerId) ;
++
++ /* set up the write timer. */
++ clearTimer (cxn->lmtp_writeBlockedTimerId) ;
++
++ if (cxn->lmtp_writeTimeout > 0)
++ cxn->lmtp_writeBlockedTimerId = prepareSleep (lmtp_writeTimeoutCbk, cxn->lmtp_writeTimeout,
++ cxn) ;
++
++
++
++ cxn->lmtp_tofree_str = str;
++ return WriteToWire_str(cxn, lmtp_writeCB, cxn->lmtp_endpoint, str, slen);
++ }
++
++ static conn_ret WriteArticle(connection_t *cxn, Buffer *array)
++ {
++ int array_len = bufferArrayLen (array);
++ int lup=0;
++ int result;
++
++ for (lup=0;lup<array_len;lup++)
++ {
++ int current_size;
++ Buffer current_buf;
++ char *current_start;
++
++ current_buf = array[lup];
++
++ current_size = bufferDataSize( current_buf );
++
++ current_start = bufferBase( current_buf );
++
++ }
++
++ /* just call writetowire since it's easy */
++ result = WriteToWire(cxn, lmtp_writeCB, cxn->lmtp_endpoint, array);
++
++ if (result!=RET_OK)
++ {
++ return result;
++ }
++
++ cxn->lmtp_state = LMTP_WRITING_CONTENTS;
++
++ return RET_OK;
++ }
++
++ /************************ END Writing to Network functions *****************/
++
++
++
++ /*
++ * Adds a cancel item to the control queue
++ * Cancel item to delete message with <msgid> in <folder>
++ *
++ * cxn - connection object
++ * folder - pointer to start of folder string (this is a pointer into the actual message buffer)
++ * folderlen - length of folder string
++ * msgid - pointer to start of msgid string (this is a pointer into the actual message buffer)
++ * msgidlen - length of msgid string
++ * art - the article for this control message (NULL if this cancel object lacks one)
++ * must - if must be accepted into queue
++ */
++
++ static conn_ret addCancelItem(connection_t *cxn, char *folder, int folderlen, char *msgid, int msgidlen,
++ Article art, int must)
++ {
++ control_item_t *item;
++ conn_ret result;
++
++ ASSERT(folder); ASSERT(msgid); ASSERT(cxn);
++
++ /* create the object */
++ item = CALLOC (control_item_t, 1) ;
++ ASSERT (item != NULL) ;
++
++ item->folder = calloc (folderlen+1, 1);
++ ASSERT (item->folder != NULL);
++ memcpy(item->folder, folder, folderlen);
++ item->folder[folderlen] = '\0';
++
++ item->msgid = calloc (msgidlen+1, 1);
++ ASSERT (item->msgid != NULL);
++ memcpy(item->msgid, msgid, msgidlen);
++ item->msgid[msgidlen] = '\0';
++
++ item->article = art;
++
++ /* try to add to the queue (counts if art isn't null) */
++ result = AddToQueue(&(cxn->imap_controlMsg_q), item, CANCEL_MSG, (art != NULL), must);
++ if (result != RET_OK)
++ {
++ d_printf(1,"I thought we had space in queue but apparently not\n");
++
++ /* cleanup */
++ free(item->folder);
++ free(item->msgid);
++ free(item);
++
++ return result;
++ }
++
++ return RET_OK;
++ }
++
++ static conn_ret AddControlMsg(connection_t *cxn, Article art, Buffer *bufs, char *control_header,
++ char *control_header_end, bool must)
++ {
++ char *rcpt_list = NULL, *rcpt_list_end;
++ char *orig_control_header;
++ control_item_t *item;
++ int res;
++ conn_ret result;
++
++
++ /* make sure contents ok; this also should load it into memory */
++ res = artContentsOk (art);
++ if (res==false)
++ {
++ d_printf(0,"Article seems bad\n");
++ hostArticleIsMissing (cxn->myHost, cxn, art);
++ return RET_FAIL;
++ }
++
++ /* now let's look at the control to see what it is */
++
++ orig_control_header = control_header; /* save so we can free later */
++
++ if (strncasecmp(control_header,"newgroup",8)==0)
++ {
++ /* jump past "newgroup" */
++ control_header+=8;
++
++ /* go past all white space */
++ while (( (*control_header)==' ') && ((*control_header)=='\t') && (control_header!=control_header_end))
++ {
++ control_header++;
++ }
++
++ if (control_header == control_header_end)
++ {
++ d_printf(0,"Control header contains newgroup with no group specified\n");
++ res = RET_FAIL;
++ goto cleanup;
++ }
++
++ item = CALLOC (control_item_t, 1);
++ ASSERT (item != NULL) ;
++
++ item->folder = calloc (strlen(control_header)+1, 1);
++ ASSERT (item->folder != NULL);
++ strcpy(item->folder, control_header);
++
++ item->article = art;
++
++ result = AddToQueue(&(cxn->imap_controlMsg_q), item, CREATE_FOLDER,1,must);
++ if (result != RET_OK)
++ {
++ d_printf(1,"I thought we had space in queue but apparently not\n");
++ res = RET_FAIL;
++ goto cleanup;
++ }
++
++ } else if (strncasecmp(control_header,"rmgroup",7)==0)
++ {
++
++ /* jump past "rmgroup" */
++ control_header+=7;
++
++ while (( (*control_header)==' ') && (control_header!=control_header_end))
++ {
++ control_header++;
++ }
++
++ if (control_header == control_header_end)
++ {
++ d_printf(0,"Control header contains rmgroup with no group specified\n");
++ res = RET_FAIL;
++ goto cleanup;
++ }
++
++ item = CALLOC (control_item_t, 1);
++ ASSERT (item != NULL) ;
++
++
++ item->folder = calloc (strlen(control_header)+1, 1);
++ ASSERT (item->folder != NULL);
++ strcpy(item->folder, control_header);
++
++ item->article = art;
++
++ result = AddToQueue(&(cxn->imap_controlMsg_q), item, DELETE_FOLDER,1,must);
++ if (result != RET_OK)
++ {
++ d_printf(1,"I thought we had space in queue but apparently not\n");
++ res = RET_FAIL;
++ goto cleanup;
++ }
++
++ } else if (strncasecmp(control_header,"cancel",6)==0) {
++ char *str, *laststart;
++ int tmplen;
++
++ /* jump past "cancel" */
++ control_header+=6;
++
++ while (( (*control_header)==' ') && (control_header!=control_header_end))
++ {
++ control_header++;
++ }
++
++ if (control_header == control_header_end)
++ {
++ d_printf(0,"Control header contains cancel with no msgid specified\n");
++ res = RET_FAIL;
++ goto cleanup;
++ }
++
++ result = FindHeader(bufs, "Newsgroups", &rcpt_list, &rcpt_list_end);
++ if (result!=RET_OK)
++ {
++ d_printf(0,"Cancel msg contains no newsgroups header\n");
++ res = RET_FAIL;
++ goto cleanup;
++ }
++
++ str = rcpt_list;
++ laststart = rcpt_list;
++
++ while ( str != rcpt_list_end)
++ {
++ if ((*str) == ',')
++ {
++ /* eliminate leading whitespace */
++ while (((*laststart) ==' ') || ((*laststart)=='\t'))
++ {
++ laststart++;
++ }
++
++ res = addCancelItem(cxn, laststart, str - laststart, control_header, control_header_end - control_header,
++ NULL,must);
++ if (res!=RET_OK) goto cleanup;
++
++ laststart = str+1;
++ }
++
++ str++;
++ }
++
++ if (laststart<str)
++ {
++
++ res = addCancelItem(cxn, laststart, str - laststart, control_header,
++ control_header_end - control_header, art, must);
++ if (res!=RET_OK) goto cleanup;
++ }
++
++ } else {
++ d_printf(0,"DOn't understand control header [%s]\n",control_header);
++ res = RET_FAIL;
++ }
++
++ res = RET_OK;
++
++ cleanup:
++
++ return res;
++ }
++
++ /*
++ * Show msg handling statistics
++ */
++
++ void show_stats(connection_t *cxn)
++ {
++ d_printf(1,"host = %s; ident = %d\n",hostPeerName (cxn->myHost), cxn->ident);
++ d_printf(1,"imap queue = %d lmtp queue = %d\n",QueueItems(&(cxn->imap_controlMsg_q)),
++ QueueItems(&(cxn->lmtp_todeliver_q)));
++ d_printf(1,"imap state = %s\n",imap_stateToString(cxn->imap_state));
++ d_printf(1,"lmtp state = %s\n",lmtp_stateToString(cxn->lmtp_state));
++ d_printf(1,"delivered: yes: %d no: %d\n",cxn->lmtp_suceeded, cxn->lmtp_failed);
++ d_printf(1,"control: yes: %d no: %d\n",cxn->cancel_suceeded, cxn->cancel_failed);
++ d_printf(1,"create: yes: %d no: %d\n",cxn->create_suceeded, cxn->create_failed);
++ d_printf(1,"remove: yes: %d no: %d\n",cxn->remove_suceeded, cxn->remove_failed);
++ }
++
++ /**************************** SASL helper functions ******************************/
++
++ #ifdef HAVE_SASL
++ /* callback to get userid or authid */
++ static int getsimple(void *context __attribute__((unused)),
++ int id,
++ const char **result,
++ unsigned *len)
++ {
++ char *username;
++ char *authid;
++
++ if (! result)
++ return SASL_BADPARAM;
++
++ switch (id) {
++ case SASL_CB_GETREALM:
++ *result = deliver_realm;
++ if (len)
++ *len = deliver_realm ? strlen(deliver_realm) : 0;
++ break;
++
++ case SASL_CB_USER:
++ *result = deliver_username;
++ if (len)
++ *len = deliver_username ? strlen(deliver_username) : 0;
++ break;
++ case SASL_CB_AUTHNAME:
++ authid=deliver_authname;
++ *result = authid;
++ if (len)
++ *len = authid ? strlen(authid) : 0;
++ break;
++ case SASL_CB_LANGUAGE:
++ *result = NULL;
++ if (len)
++ *len = 0;
++ break;
++ default:
++ return SASL_BADPARAM;
++ }
++ return SASL_OK;
++ }
++
++ /* callback to get password */
++ static int
++ getsecret(sasl_conn_t *conn,
++ void *context __attribute__((unused)),
++ int id,
++ sasl_secret_t **psecret)
++ {
++ if (! conn || ! psecret || id != SASL_CB_PASS)
++ return SASL_BADPARAM;
++
++ if (deliver_password==NULL)
++ {
++ d_printf(0,"SASL requested a password but I don't have one\n");
++ return SASL_FAIL;
++ }
++
++ *psecret = (sasl_secret_t *) malloc(sizeof(sasl_secret_t)+strlen(deliver_password)+1);
++ if (! *psecret)
++ return SASL_FAIL;
++
++ strcpy((*psecret)->data, deliver_password);
++ (*psecret)->len=strlen(deliver_password);
++
++ return SASL_OK;
++ }
++
++
++ /* callbacks we support */
++ static sasl_callback_t saslcallbacks[] = {
++ {
++ SASL_CB_GETREALM, &getsimple, NULL
++ }, {
++ SASL_CB_USER, &getsimple, NULL
++ }, {
++ SASL_CB_AUTHNAME, &getsimple, NULL
++ }, {
++ SASL_CB_PASS, &getsecret, NULL
++ }, {
++ SASL_CB_LIST_END, NULL, NULL
++ }
++ };
++
++ static sasl_security_properties_t *make_secprops(int min,int max)
++ {
++ sasl_security_properties_t *ret=(sasl_security_properties_t *)
++ malloc(sizeof(sasl_security_properties_t));
++
++ ret->maxbufsize=1024;
++ ret->min_ssf=min;
++ ret->max_ssf=max;
++
++ ret->security_flags=0;
++ ret->property_names=NULL;
++ ret->property_values=NULL;
++
++ return ret;
++ }
++
++ static conn_ret SetSASLProperties(sasl_conn_t *conn, int sock, int minssf, int maxssf)
++ {
++ int saslresult;
++ sasl_security_properties_t *secprops=NULL;
++ int addrsize=sizeof(struct sockaddr_in);
++ struct sockaddr_in saddr_l;
++ struct sockaddr_in saddr_r;
++
++ /* create a security structure and give it to sasl */
++ secprops = make_secprops(minssf, maxssf);
++ if (secprops != NULL)
++ {
++ sasl_setprop(conn, SASL_SEC_PROPS, secprops);
++ free(secprops);
++ }
++
++ if (getpeername(sock,(struct sockaddr *)&saddr_r,&addrsize)!=0)
++ return RET_FAIL;
++
++ if (sasl_setprop(conn, SASL_IP_REMOTE, &saddr_r)!=SASL_OK)
++ return RET_FAIL;
++
++ addrsize=sizeof(struct sockaddr_in);
++ if (getsockname(sock,(struct sockaddr *) &saddr_l,&addrsize)!=0)
++ return RET_FAIL;
++
++ if (sasl_setprop(conn, SASL_IP_LOCAL, &saddr_l)!=SASL_OK)
++ return RET_FAIL;
++
++ return RET_OK;
++ }
++ #endif /* HAVE_SASL */
++
++ /************************** END SASL helper functions ******************************/
++
++ /************************* Startup functions **********************************/
++
++ static conn_ret Initialize(connection_t *cxn, int respTimeout)
++ {
++ conn_ret saslresult;
++
++
++ #ifdef HAVE_SASL
++ /* Initialize SASL */
++ saslresult=sasl_client_init(saslcallbacks);
++
++ if (saslresult!=SASL_OK)
++ {
++ d_printf(0,"Error initializing SASL (%s)",
++ sasl_errstring(saslresult, NULL, NULL));
++ return RET_FAIL;
++ }
++ #endif /* HAVE_SASL */
++
++ d_printf(1,"initializing....\n");
++
++
++
++ cxn->lmtp_rBuffer = newBuffer(4096);
++ if (cxn->lmtp_rBuffer == NULL)
++ {
++ d_printf(0,"Failure allocating buffer\n");
++ return RET_FAIL;
++ }
++ bufferAddNullByte(cxn->lmtp_rBuffer);
++
++
++ cxn->imap_rBuffer = newBuffer(4096);
++ if (cxn->imap_rBuffer == NULL)
++ {
++ d_printf(0,"Failure allocating buffer\n");
++ return RET_FAIL;
++ }
++ bufferAddNullByte(cxn->imap_rBuffer);
++
++ d_printf(1,"Timeout is %d\n",respTimeout);
++ /* Initialize timeouts */
++ cxn->lmtp_writeTimeout = respTimeout;
++ cxn->lmtp_readTimeout = respTimeout;
++ cxn->imap_writeTimeout = respTimeout;
++ cxn->imap_readTimeout = respTimeout;
++ cxn->lmtp_sleepTimerId = 0 ;
++ cxn->lmtp_sleepTimeout = init_reconnect_period ;
++ cxn->imap_sleepTimerId = 0 ;
++ cxn->imap_sleepTimeout = init_reconnect_period ;
++
++ cxn->dosomethingTimeout = DOSOMETHING_TIMEOUT;
++
++ /* set up the write timer. */
++ clearTimer (cxn->dosomethingTimerId) ;
++
++ if (cxn->dosomethingTimeout > 0)
++ cxn->dosomethingTimerId = prepareSleep (dosomethingTimeoutCbk,
++ cxn->dosomethingTimeout, cxn);
++
++
++
++ return RET_OK;
++ }
++
++
++ /* initialize the network */
++ static conn_ret init_net(char *serverFQDN,
++ int port,
++ int *sock)
++ {
++ struct sockaddr_in addr;
++ struct hostent *hp;
++
++ if ((hp = gethostbyname(serverFQDN)) == NULL) {
++ perror("gethostbyname");
++ return RET_FAIL;
++ }
++
++ if (( (*sock) = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
++ perror("socket");
++ return RET_FAIL;
++ }
++
++ addr.sin_family = AF_INET;
++ memcpy(&addr.sin_addr, hp->h_addr, hp->h_length);
++ addr.sin_port = htons(port);
++
++ if (connect( (*sock), (struct sockaddr *) &addr, sizeof (addr)) < 0) {
++ perror("connect");
++ return RET_FAIL;
++ }
++
++ return RET_OK;
++ }
++
++
++
++ static conn_ret SetupLMTPConnection(connection_t *cxn,
++ char *serverName,
++ int port)
++ {
++ int saslresult;
++ conn_ret result;
++
++ cxn->lmtp_port = port;
++
++ if (serverName==NULL)
++ {
++ d_printf(0,"Servername is null");
++ return RET_FAIL;
++ }
++
++ d_printf(1,"lmtp Servername is [%s]",serverName);
++
++ #ifdef HAVE_SASL
++ /* Free the SASL connection if we already had one */
++ if (cxn->saslconn_lmtp!=NULL)
++ {
++ sasl_dispose(&cxn->saslconn_lmtp);
++ }
++
++ /* Start SASL */
++ saslresult=sasl_client_new("lmtp",
++ serverName,
++ NULL,
++ 0,
++ &cxn->saslconn_lmtp);
++
++ if (saslresult != SASL_OK)
++ {
++ d_printf(0,"Error creating a new SASL connection (%s)",
++ sasl_errstring(saslresult,NULL,NULL));
++ return RET_FAIL;
++ }
++ #endif /* HAVE_SASL */
++
++ /* Connect the Socket */
++ result = init_net(serverName,
++ LMTP_PORT, /*port,*/
++ &(cxn->sockfd_lmtp));
++
++ if (result != RET_OK)
++ {
++ d_printf(0,"Unable to start network connection to lmtp host");
++ return RET_FAIL;
++ }
++
++ if (cxn->lmtp_respBuffer) free(cxn->lmtp_respBuffer);
++ cxn->lmtp_respBuffer = (char *) malloc (4096);
++ cxn->lmtp_respBuffer[0]='\0';
++
++ /* Free if we had an existing one */
++ if (cxn->lmtp_endpoint != NULL)
++ {
++ delEndPoint(cxn->lmtp_endpoint);
++ cxn->lmtp_endpoint = NULL;
++ }
++
++ cxn->lmtp_endpoint = newEndPoint(cxn->sockfd_lmtp);
++ if (cxn->lmtp_endpoint == NULL)
++ {
++ d_printf(0,"Failure creating endpoint\n");
++ return RET_FAIL;
++ }
++
++ #ifdef HAVE_SASL
++ /* Set the SASL properties */
++ result = SetSASLProperties(cxn->saslconn_lmtp, cxn->sockfd_lmtp,
++ 0, 0);
++
++ if (result != RET_OK)
++ {
++ d_printf(0,"Error setting sasl properties");
++
++ return RET_FAIL;
++ }
++ #endif /* HAVE_SASL */
++
++
++ return RET_OK;
++ }
++
++ static conn_ret SetupIMAPConnection(connection_t *cxn,
++ char *serverName,
++ int port)
++ {
++ int saslresult;
++ conn_ret result;
++
++ cxn->imap_port = port;
++
++ if (serverName==NULL)
++ {
++ d_printf(0,"Servername is null");
++ return RET_FAIL;
++ }
++
++ d_printf(1,"imap server name is %s\n",serverName);
++
++ #ifdef HAVE_SASL
++ /* Free the SASL connection if we already had one */
++ if (cxn->imap_saslconn!=NULL)
++ {
++ d_printf(1,"Disposing of IMAP connection\n");
++ sasl_dispose(&cxn->imap_saslconn);
++ }
++
++ /* Start SASL */
++ saslresult=sasl_client_new("imap",
++ serverName,
++ NULL,
++ 0,
++ &cxn->imap_saslconn);
++
++ if (saslresult != SASL_OK)
++ {
++ d_printf(0,"Error creating a new SASL connection (%s)",
++ sasl_errstring(saslresult,NULL,NULL));
++ return RET_FAIL;
++ }
++ #endif /* HAVE_SASL */
++
++ /* Connect the Socket */
++ result = init_net(serverName,
++ port,
++ &(cxn->imap_sockfd));
++
++ if (result != RET_OK)
++ {
++ d_printf(0,"Unable to start network connection for IMAP");
++ return RET_FAIL;
++ }
++
++ if (cxn->imap_respBuffer) free(cxn->imap_respBuffer);
++ cxn->imap_respBuffer = (char *) malloc (4096);
++ cxn->imap_respBuffer[0]='\0';
++
++ /* Free if we had an existing one */
++ if (cxn->imap_endpoint != NULL)
++ {
++ delEndPoint(cxn->imap_endpoint);
++ cxn->imap_endpoint = NULL;
++ }
++
++ cxn->imap_endpoint = newEndPoint(cxn->imap_sockfd);
++ if (cxn->imap_endpoint == NULL)
++ {
++ d_printf(0,"Failure creating imap endpoint\n");
++ return RET_FAIL;
++ }
++
++ #ifdef HAVE_SASL
++ /* Set the SASL properties */
++ result = SetSASLProperties(cxn->imap_saslconn, cxn->imap_sockfd,
++ 0, 0);
++ if (result != RET_OK)
++ {
++ d_printf(0,"Error setting sasl properties");
++ return result;
++ }
++ #endif /* HAVE_SASL */
++
++
++ return RET_OK;
++ }
++
++ /************************* END Startup functions **********************************/
++
++ /* Return the response code for this line
++ -1 if it doesn't seem to have one
++ */
++ static int ask_code(char *str)
++ {
++ int ret = 0;
++
++ if (str==NULL) return -1;
++
++ if (strlen(str) < 3) return -1;
++
++ /* check to make sure 0-2 are digits */
++ if ((isdigit((int) str[0])==0) ||
++ (isdigit((int) str[1])==0) ||
++ (isdigit((int) str[2])==0))
++ {
++ d_printf(0,"Response does not begin with a code [%s]\n",str);
++ return -1;
++ }
++
++
++ ret = ((str[0]-'0')*100)+
++ ((str[1]-'0')*10)+
++ (str[2]-'0');
++
++ return ret;
++ }
++
++ /* is this a continuation or not?
++ 220-fdfsd is (1)
++ 220 fdsfs is not (0)
++ */
++
++ static int ask_keepgoing(char *str)
++ {
++ if (str==NULL) return 0;
++ if (strlen(str) < 4) return 0;
++
++ if (str[3]=='-') return 1;
++
++ return 0;
++ }
++
++
++ static conn_ret lmtp_listenintro(connection_t *cxn)
++ {
++ char *str;
++ Buffer *readBuffers;
++
++ /* set up to receive */
++ readBuffers = makeBufferArray (bufferTakeRef (cxn->lmtp_rBuffer), NULL) ;
++ prepareRead(cxn->lmtp_endpoint, readBuffers, lmtp_readCB, cxn, 5);
++
++ cxn->lmtp_state = LMTP_READING_INTRO;
++
++ return RET_OK;
++ }
++
++
++
++ /************************** IMAP functions ***********************/
++
++ static conn_ret imap_Connect(connection_t *cxn)
++ {
++ conn_ret result;
++
++ /* make the IMAP connection */
++ result = SetupIMAPConnection(cxn,
++ cxn->ServerName,
++ IMAP_PORT);
++
++ /* Listen to the intro and start the authenticating process */
++ result = imap_listenintro(cxn);
++
++ return result;
++ }
++
++ /*
++ * This is called when the data write timeout for the remote
++ * goes off. We tear down the connection and notify our host.
++ */
++ static void imap_writeTimeoutCbk (TimeoutId id, void *data)
++ {
++ connection_t *cxn = (Connection) data ;
++ const char *peerName ;
++
++ peerName = hostPeerName (cxn->myHost) ;
++
++ syslog (LOG_WARNING, "timeout for %s", peerName);
++ d_printf (0,"%s: shutting down non-responsive connection (state=%d)\n",
++ hostPeerName (cxn->myHost), cxn->imap_state) ;
++
++ cxnLogStats (cxn,true) ;
++
++ imap_Disconnect(cxn);
++ }
++
++ /*
++ * This is called when the timeout for the reponse from the remote
++ * goes off. We tear down the connection and notify our host.
++ */
++ static void imap_readTimeoutCbk (TimeoutId id, void *data)
++ {
++ Connection cxn = (Connection) data ;
++ const char *peerName ;
++
++ ASSERT (id == cxn->imap_readBlockedTimerId) ;
++
++ peerName = hostPeerName (cxn->myHost) ;
++
++ syslog (LOG_WARNING, RESPONSE_TIMEOUT, peerName, cxn->ident) ;
++ d_printf (0,"%s:%d shutting down non-repsonsive imap connection\n",
++ hostPeerName (cxn->myHost), cxn->ident) ;
++
++ cxnLogStats (cxn,true) ;
++
++ if (cxn->imap_state == IMAP_DISCONNECTED)
++ {
++ imap_Disconnect(cxn);
++ lmtp_Disconnect(cxn);
++ delConnection (cxn) ;
++ }
++ else {
++ imap_Disconnect(cxn);
++ }
++ }
++
++ /*
++ * Called by the EndPoint class when the timer goes off
++ */
++ void imap_reopenTimeoutCbk (TimeoutId id, void *data)
++ {
++ Connection cxn = (Connection) data ;
++
++ ASSERT (id == cxn->imap_sleepTimerId) ;
++
++ cxn->imap_sleepTimerId = 0 ;
++
++ d_printf(1,"[imap] Reopen timeout\n");
++
++ if (cxn->imap_state != IMAP_DISCONNECTED)
++ {
++ syslog (LOG_ERR,CXN_BAD_STATE,hostPeerName (cxn->myHost),
++ cxn->ident,imap_stateToString (cxn->imap_state)) ;
++ }
++ else {
++ if (imap_Connect(cxn) != RET_OK)
++ prepareReopenCbk(cxn, 0);
++ }
++ }
++
++ static void imap_Disconnect(connection_t *cxn)
++ {
++ clearTimer (cxn->imap_sleepTimerId) ;
++ clearTimer (cxn->imap_readBlockedTimerId) ;
++ clearTimer (cxn->imap_writeBlockedTimerId) ;
++
++ DeferAllArticles(cxn, &(cxn->imap_controlMsg_q)) ; /* give any articles back to Host */
++
++ cxn->imap_state = IMAP_DISCONNECTED;
++
++ cxn->imap_disconnects++;
++
++ cxn->imap_respBuffer[0]='\0';
++
++ if (cxn->issue_quit == 0)
++ prepareReopenCbk(cxn,0);
++ }
++
++ /************************** END IMAP functions ***********************/
++
++ /************************ LMTP functions **************************/
++
++ /*
++ * Create a network lmtp connection
++ * and start listening for the intro string
++ *
++ */
++
++ static conn_ret lmtp_Connect(connection_t *cxn)
++ {
++ conn_ret result;
++
++ /* make the LMTP connection */
++ result = SetupLMTPConnection(cxn,
++ cxn->ServerName,
++ LMTP_PORT);
++
++ if (result!=RET_OK) return result;
++
++ /* Listen to the intro */
++ result = lmtp_listenintro(cxn);
++
++ return result;
++ }
++
++
++
++ static void lmtp_Disconnect(connection_t *cxn)
++ {
++ clearTimer (cxn->lmtp_sleepTimerId) ;
++ clearTimer (cxn->lmtp_readBlockedTimerId) ;
++ clearTimer (cxn->lmtp_writeBlockedTimerId) ;
++
++ DeferAllArticles(cxn, &(cxn->lmtp_todeliver_q)) ; /* give any articles back to Host */
++
++ cxn->lmtp_have_mailfrom = 0;
++
++ cxn->lmtp_state = LMTP_DISCONNECTED;
++
++ cxn->lmtp_disconnects++;
++
++ cxn->lmtp_respBuffer[0]='\0';
++
++ if (cxn->issue_quit == 0)
++ prepareReopenCbk(cxn,1);
++ }
++
++
++
++ /*
++ * Called by the EndPoint class when the timer goes off
++ */
++ void lmtp_reopenTimeoutCbk (TimeoutId id, void *data)
++ {
++ Connection cxn = (Connection) data ;
++
++ ASSERT (id == cxn->lmtp_sleepTimerId) ;
++
++ cxn->lmtp_sleepTimerId = 0 ;
++
++ d_printf(1,"[lmtp] Reopen timeout\n");
++
++ if (cxn->lmtp_state != LMTP_DISCONNECTED)
++ {
++ syslog (LOG_ERR,CXN_BAD_STATE,hostPeerName (cxn->myHost),
++ cxn->ident,lmtp_stateToString (cxn->lmtp_state)) ;
++ }
++ else {
++ if (lmtp_Connect(cxn) != RET_OK)
++ prepareReopenCbk(cxn, 1);
++ }
++ }
++
++ /*
++ * Set up the callback used when the Connection is sleeping (i.e. will try
++ * to reopen the connection).
++ *
++ * type (0 = imap, 1 = lmtp)
++ */
++ static void prepareReopenCbk (Connection cxn, int type)
++ {
++ /* xxx check state */
++
++ d_printf (1,"%s:%d Setting up a reopen callback\n",
++ hostPeerName (cxn->myHost), cxn->ident) ;
++
++ if (type == 0)
++ cxn->imap_sleepTimerId = prepareSleep (imap_reopenTimeoutCbk, cxn->imap_sleepTimeout, cxn) ;
++ else
++ cxn->lmtp_sleepTimerId = prepareSleep (lmtp_reopenTimeoutCbk, cxn->lmtp_sleepTimeout, cxn) ;
++
++ /* bump the sleep timer amount each time to wait longer and longer. Gets
++ reset in resetConnection() */
++ if (type == 0) {
++ cxn->imap_sleepTimeout *= 2 ;
++ if (cxn->imap_sleepTimeout > max_reconnect_period)
++ cxn->imap_sleepTimeout = max_reconnect_period ;
++ } else {
++ cxn->lmtp_sleepTimeout *= 2 ;
++ if (cxn->lmtp_sleepTimeout > max_reconnect_period)
++ cxn->lmtp_sleepTimeout = max_reconnect_period ;
++ }
++ }
++
++ /*
++ * This is called when the timeout for the reponse from the remote
++ * goes off. We tear down the connection and notify our host.
++ */
++ static void lmtp_readTimeoutCbk (TimeoutId id, void *data)
++ {
++ Connection cxn = (Connection) data ;
++ const char *peerName ;
++
++ ASSERT (id == cxn->lmtp_readBlockedTimerId) ;
++
++ peerName = hostPeerName (cxn->myHost) ;
++
++ syslog (LOG_WARNING, RESPONSE_TIMEOUT, peerName, cxn->ident) ;
++ d_printf (0,"%s:%d shutting down non-repsonsive lmtp connection\n",
++ hostPeerName (cxn->myHost), cxn->ident) ;
++
++ cxnLogStats (cxn,true) ;
++
++ if (cxn->lmtp_state == LMTP_DISCONNECTED)
++ {
++ imap_Disconnect(cxn);
++ lmtp_Disconnect(cxn);
++ delConnection (cxn) ;
++ }
++ else {
++ lmtp_Disconnect(cxn);
++ }
++ }
++
++
++
++ /*
++ * This is called when the data write timeout for the remote
++ * goes off. We tear down the connection and notify our host.
++ */
++ static void lmtp_writeTimeoutCbk (TimeoutId id, void *data)
++ {
++ connection_t *cxn = (Connection) data ;
++ const char *peerName ;
++
++ peerName = hostPeerName (cxn->myHost) ;
++
++ syslog (LOG_WARNING, "timeout for %s", peerName);
++ d_printf (0,"%s: shutting down non-responsive connection (state = %d)\n",
++ hostPeerName (cxn->myHost), cxn->lmtp_state) ;
++
++ cxnLogStats (cxn,true) ;
++
++ lmtp_Disconnect(cxn);
++ }
++
++ /************************ END LMTP functions **************************/
++
++ /************************** LMTP write functions ********************/
++
++ static conn_ret lmtp_IssueQuit(connection_t *cxn)
++ {
++ int result;
++ char *p;
++
++ /* say hello */
++ p = (char *) malloc(20);
++
++ sprintf (p, "QUIT\r\n", hostname); /* our domain name */
++
++ result = WriteToWire_lmtpstr(cxn, p, strlen(p));
++ if (result!=RET_OK) return result;
++
++ cxn->lmtp_state = LMTP_WRITING_QUIT;
++
++ return RET_OK;
++ }
++
++ static conn_ret lmtp_getcapabilities(connection_t *cxn)
++ {
++ int result;
++ char *p;
++
++ if (cxn->lmtp_capabilities != NULL)
++ {
++ free( cxn->lmtp_capabilities->saslmechs);
++ free( cxn->lmtp_capabilities );
++ cxn->lmtp_capabilities = NULL;
++ }
++
++ cxn->lmtp_capabilities = CALLOC (lmtp_capabilities_t, 1);
++ ASSERT (cxn->lmtp_capabilities != NULL) ;
++
++ /* say hello */
++ p = (char *) malloc(20+strlen(hostname));
++
++ #ifdef SMTPMODE
++ sprintf (p, "EHLO %s\r\n", hostname); /* our domain name */
++ #else
++ sprintf (p, "LHLO %s\r\n", hostname); /* our domain name */
++ #endif /* SMTPMODE */
++
++ result = WriteToWire_lmtpstr(cxn, p, strlen(p));
++ if (result!=RET_OK) return result;
++
++ cxn->lmtp_state = LMTP_WRITING_LHLO;
++
++ return RET_OK;
++ }
++
++ #ifdef HAVE_SASL
++ static conn_ret lmtp_authenticate(connection_t *cxn)
++ {
++ int saslresult;
++
++ const char *mechusing;
++ char *out;
++ unsigned int outlen;
++ char *in;
++ unsigned int inlen;
++ char *inbase64;
++ int inbase64len;
++ int status;
++ int result;
++
++ char *p;
++
++ sasl_interact_t *client_interact=NULL;
++
++
++ cxn->lmtp_have_mailfrom = 0;
++
++ saslresult=sasl_client_start(cxn->saslconn_lmtp,
++ cxn->lmtp_capabilities->saslmechs,
++ NULL, &client_interact,
++ &out, &outlen,
++ &mechusing);
++
++
++
++ if ((saslresult != SASL_OK) &&
++ (saslresult != SASL_CONTINUE)) {
++
++ d_printf(0,"Error calling sasl_client_start (%s)\n",sasl_errstring(saslresult, NULL, NULL));
++ return RET_FAIL;
++ }
++
++ d_printf(1,"Decided to use mech=%s\n",mechusing);
++
++ p = (char *) malloc(strlen(mechusing)+(outlen*2+10)+30);
++
++ if (out!=NULL)
++ {
++
++ /* convert to base64 */
++ inbase64 = (char *) malloc(outlen*2+10);
++
++ saslresult = sasl_encode64(out, outlen,
++ inbase64, outlen*2+10, (unsigned *) &inbase64len);
++ if (saslresult != SASL_OK) return RET_FAIL;
++
++ sprintf (p, "AUTH %s %s\r\n",mechusing,inbase64);
++ } else {
++ sprintf (p, "AUTH %s\r\n",mechusing);
++ }
++
++ result = WriteToWire_lmtpstr(cxn, p, strlen(p));
++
++ cxn->lmtp_state = LMTP_WRITING_STARTAUTH;
++
++ return RET_OK;
++ }
++
++ static imt_stat lmtp_getauthline(char *str, char **line, int *linelen)
++ {
++ char buf[4096];
++ int saslresult;
++ int response_code = -1;
++
++ response_code = ask_code(str);
++
++ if (response_code == 334) {
++
++ /* continue */
++
++ } else if (response_code == 235) {
++
++ /* woohoo! authentication complete */
++ return STAT_OK;
++
++ } else {
++ /* failure of some sort */
++ d_printf(0,"LMTP Authentication failure (%d)\n",response_code);
++ return STAT_NO;
++ }
++
++ str += 4; /* jump past the "334 " */
++
++ *line = (char *) malloc(strlen(str)+30);
++ if ((*line)==NULL) {
++ return STAT_NO;
++ }
++
++ /* decode this line */
++ saslresult = sasl_decode64(str, strlen(str),
++ *line, (unsigned *) linelen);
++ if (saslresult != SASL_OK) {
++ d_printf(0,"LMTP base64 decoding error\n");
++ return STAT_NO;
++ }
++
++ return STAT_CONT;
++ }
++ #endif /* HAVE_SASL */
++
++ static void lmtp_writeCB (EndPoint e, IoStatus i, Buffer *b, void *d)
++ {
++ connection_t *cxn = (connection_t *) d;
++ Buffer *readBuffers;
++
++ clearTimer (cxn->lmtp_writeBlockedTimerId) ;
++
++ /* Free the string that was written */
++ freeBufferArray (b);
++ if (cxn->lmtp_tofree_str!=NULL)
++ {
++ free(cxn->lmtp_tofree_str);
++ cxn->lmtp_tofree_str=NULL;
++ }
++
++ /* set up to receive */
++ readBuffers = makeBufferArray (bufferTakeRef (cxn->lmtp_rBuffer), NULL) ;
++ prepareRead(cxn->lmtp_endpoint, readBuffers, lmtp_readCB, cxn, 5);
++
++ /* set up the response timer. */
++ clearTimer (cxn->lmtp_readBlockedTimerId) ;
++
++ if (cxn->lmtp_readTimeout > 0)
++ cxn->lmtp_readBlockedTimerId = prepareSleep (lmtp_readTimeoutCbk,
++ cxn->lmtp_readTimeout, cxn) ;
++
++
++ switch (cxn->lmtp_state)
++ {
++
++ case LMTP_WRITING_LHLO:
++
++ cxn->lmtp_state = LMTP_READING_LHLO;
++
++ break;
++
++ case LMTP_WRITING_STARTAUTH:
++ case LMTP_WRITING_STEPAUTH:
++
++ cxn->lmtp_state = LMTP_READING_STEPAUTH;
++
++ break;
++
++ case LMTP_WRITING_UPTODATA:
++
++ /* expect result to mail from */
++ if (cxn->lmtp_have_mailfrom==1)
++ {
++ cxn->lmtp_state = LMTP_READING_RCPTTO;
++ } else {
++ cxn->lmtp_state = LMTP_READING_MAILFROM;
++ }
++
++ break;
++
++ case LMTP_WRITING_CONTENTS:
++ /* so we sent the whole DATA command
++ let's see what the server responded */
++
++ cxn->lmtp_state = LMTP_READING_CONTENTS;
++
++ break;
++
++ case LMTP_WRITING_QUIT:
++ cxn->lmtp_state = LMTP_READING_QUIT;
++ break;
++
++ default:
++
++ d_printf(0,"LMTP: Unknown state. Internal error\n");
++
++ break;
++ }
++ }
++
++ /************************** END LMTP write functions ********************/
++
++ /************************** IMAP sending functions ************************/
++
++
++ static void imap_writeCB (EndPoint e, IoStatus i, Buffer *b, void *d)
++ {
++ connection_t *cxn = (connection_t *) d;
++ Buffer *readBuffers;
++
++ clearTimer (cxn->imap_writeBlockedTimerId) ;
++
++ /* free the string we just wrote out */
++ freeBufferArray (b);
++ if (cxn->imap_tofree_str!=NULL)
++ {
++ free(cxn->imap_tofree_str);
++ cxn->imap_tofree_str=NULL;
++ }
++
++ /* set up to receive */
++ readBuffers = makeBufferArray (bufferTakeRef (cxn->imap_rBuffer), NULL) ;
++ prepareRead(cxn->imap_endpoint, readBuffers, imap_readCB, cxn, 5);
++
++ /* set up the response timer. */
++ clearTimer (cxn->imap_readBlockedTimerId) ;
++
++ if (cxn->imap_readTimeout > 0)
++ cxn->imap_readBlockedTimerId = prepareSleep (imap_readTimeoutCbk,
++ cxn->imap_readTimeout, cxn) ;
++
++ switch (cxn->imap_state)
++ {
++
++ case IMAP_WRITING_CAPABILITY:
++
++ cxn->imap_state = IMAP_READING_CAPABILITY;
++ break;
++
++ case IMAP_WRITING_STEPAUTH:
++ case IMAP_WRITING_STARTAUTH:
++
++ cxn->imap_state = IMAP_READING_STEPAUTH;
++
++ break;
++
++ case IMAP_WRITING_CREATE:
++
++ cxn->imap_state = IMAP_READING_CREATE;
++
++ break;
++
++ case IMAP_WRITING_DELETE:
++
++ cxn->imap_state = IMAP_READING_DELETE;
++
++ break;
++
++ case IMAP_WRITING_SELECT:
++
++ cxn->imap_state = IMAP_READING_SELECT;
++
++ break;
++
++ case IMAP_WRITING_SEARCH:
++
++ cxn->imap_state = IMAP_READING_SEARCH;
++
++ break;
++
++ case IMAP_WRITING_STORE:
++
++ cxn->imap_state = IMAP_READING_STORE;
++
++ break;
++
++ case IMAP_WRITING_CLOSE:
++
++ cxn->imap_state = IMAP_READING_CLOSE;
++
++ break;
++
++ case IMAP_WRITING_QUIT:
++
++ cxn->imap_state = IMAP_READING_QUIT;
++
++ break;
++
++ default:
++ d_printf(0,"invalid imap state\n");
++ imap_Disconnect(cxn);
++ break;
++
++ }
++ }
++
++ /*
++ * Tag is already allocated
++ */
++
++ static void imap_GetTag(connection_t *cxn)
++ {
++ sprintf(cxn->imap_currentTag,"%06d",cxn->imap_tag_num);
++ cxn->imap_tag_num++;
++ if (cxn->imap_tag_num >= 999999)
++ {
++ cxn->imap_tag_num = 0;
++ }
++ }
++
++ #ifdef HAVE_SASL
++ static conn_ret imap_sendAuthStep(connection_t *cxn, char *str)
++ {
++ conn_ret result;
++ int saslresult;
++ char in[4096];
++ unsigned int inlen;
++ char *out;
++ unsigned int outlen;
++ char *inbase64;
++ unsigned int inbase64len;
++
++ /* base64 decode it */
++
++ saslresult = sasl_decode64(str, strlen(str),
++ in, &inlen);
++ if (saslresult != SASL_OK) {
++ d_printf(0,"IMAP base64 decoding error\n");
++ return RET_FAIL;
++ }
++
++ saslresult=sasl_client_step(cxn->imap_saslconn,
++ in,
++ inlen,
++ NULL,
++ &out,
++ &outlen);
++
++ /* check if sasl suceeded */
++ if (saslresult != SASL_OK && saslresult != SASL_CONTINUE) {
++
++ d_printf(0,"sasl_client_step failed with %s\n",
++ sasl_errstring(saslresult,NULL,NULL));
++ cxn->imap_state = IMAP_CONNECTED_NOTAUTH;
++ return RET_FAIL;
++ }
++
++ inbase64 = (char *) malloc(outlen*2+10);
++
++ /* convert to base64 */
++ saslresult = sasl_encode64(out, outlen,
++ inbase64, outlen*2, (unsigned *) &inbase64len);
++
++ if (saslresult != SASL_OK) return RET_FAIL;
++
++ /* append endline */
++ strcpy(inbase64 + inbase64len, "\r\n");
++ inbase64len+=2;
++
++ if (out!=NULL) free(out);
++
++ /* send to server */
++ result = WriteToWire_imapstr(cxn,inbase64, inbase64len);
++
++ cxn->imap_state = IMAP_WRITING_STEPAUTH;
++
++ return result;
++ }
++ #endif /* HAVE_SASL */
++
++ static conn_ret imap_sendAuthenticate(connection_t *cxn)
++ {
++ int saslresult;
++
++ const char *mechusing;
++ char *out;
++ unsigned int outlen;
++ char *in;
++ unsigned int inlen;
++ char *inbase64;
++ int inbase64len;
++ int status;
++ int result;
++
++ char *p;
++
++ #ifdef HAVE_SASL
++ sasl_interact_t *client_interact=NULL;
++
++ d_printf(1,"[imap] Mechs = %s\n",cxn->imap_capabilities->saslmechs);
++
++ saslresult=sasl_client_start(cxn->imap_saslconn,
++ cxn->imap_capabilities->saslmechs,
++ NULL, &client_interact,
++ &out, &outlen,
++ &mechusing);
++
++
++
++ /* If no mechs try "login" */
++ if (saslresult == SASL_NOMECH)
++ {
++
++ #else /* HAVE_SASL */
++
++ { /* always do login */
++
++ #endif /* HAVE_SASL */
++ d_printf(1,"No mechanism found. Trying login method\n");
++
++ if (cxn->imap_capabilities->logindisabled==1)
++ {
++ d_printf(0,"Login command w/o security layer not allowed on this server\n");
++ return RET_FAIL;
++ }
++
++ if (deliver_authname==NULL)
++ {
++ d_printf(0,"[imap] Unable to log in b/c authname not specified\n");
++ return RET_FAIL;
++ }
++
++ if (deliver_password==NULL)
++ {
++ d_printf(0,"[imap] Unable to log in b/c password not specified\n");
++ return RET_FAIL;
++ }
++
++ p = (char *) malloc(strlen(cxn->imap_currentTag)+strlen(deliver_authname)+
++ strlen(deliver_password)+30);
++
++ imap_GetTag(cxn);
++
++ sprintf (p, "%s LOGIN %s \"%s\"\r\n",cxn->imap_currentTag, deliver_authname, deliver_password);
++
++ result = WriteToWire_imapstr(cxn, p, strlen(p));
++
++ cxn->imap_state = IMAP_WRITING_STARTAUTH;
++
++ return RET_OK;
++ }
++
++ #ifdef HAVE_SASL
++ if ((saslresult != SASL_OK) &&
++ (saslresult != SASL_CONTINUE)) {
++
++ d_printf(0,"[imap] Error calling sasl_client_start (%s) mechusing = %s\n",
++ sasl_errstring(saslresult, NULL, NULL), mechusing);
++ return RET_FAIL;
++ }
++ #endif /* HAVE_SASL */
++
++ d_printf(1,"[imap] Trying to authenticate to imap with %s mechanism\n",mechusing);
++
++ p = (char *) malloc(strlen(cxn->imap_currentTag)+strlen(mechusing)+40);
++
++ imap_GetTag(cxn);
++
++ sprintf (p, "%s AUTHENTICATE %s\r\n",cxn->imap_currentTag, mechusing);
++
++ result = WriteToWire_imapstr(cxn, p, strlen(p));
++
++ cxn->imap_state = IMAP_WRITING_STARTAUTH;
++
++ return RET_OK;
++ }
++
++ static conn_ret imap_CreateGroup(connection_t *cxn, char *bboard)
++ {
++ conn_ret result;
++ char *tosend;
++ int newlen=strlen(bboard);
++
++ d_printf(1,"Ok creating group [%s]\n",bboard);
++
++ imap_GetTag(cxn);
++
++ tosend = (char *) malloc(30+newlen);
++
++ sprintf(tosend,"%s CREATE %s\r\n",cxn->imap_currentTag,bboard);
++
++ result = WriteToWire_imapstr(cxn, tosend, -1);
++ if (result!=RET_OK) return result;
++
++ cxn->imap_state = IMAP_WRITING_CREATE;
++
++ return RET_OK;
++ }
++
++ static conn_ret imap_DeleteGroup(connection_t *cxn, char *bboard)
++ {
++ conn_ret result;
++ char *tosend;
++ int newlen=strlen(bboard);
++
++ d_printf(1,"Ok removing [%s]\n",bboard);
++
++ imap_GetTag(cxn);
++
++ tosend = (char *) malloc(30+newlen);
++
++ sprintf(tosend,"%s DELETE %s\r\n",cxn->imap_currentTag,bboard);
++
++ result = WriteToWire_imapstr(cxn, tosend, -1);
++ if (result!=RET_OK) return result;
++
++ cxn->imap_state = IMAP_WRITING_DELETE;
++
++ return RET_OK;
++ }
++
++ static conn_ret imap_CancelMsg(connection_t *cxn, char *newsgroup)
++ {
++ conn_ret result;
++ char *tosend;
++
++ ASSERT(newsgroup);
++
++ tosend = (char *) malloc(7+10+strlen(newsgroup)+100);
++
++ imap_GetTag(cxn);
++
++ /* select mbox */
++ sprintf(tosend,"%s SELECT %s\r\n",cxn->imap_currentTag, newsgroup);
++
++ result = WriteToWire_imapstr(cxn, tosend, -1);
++ if (result != RET_OK) return result;
++
++ cxn->imap_state = IMAP_WRITING_SELECT;
++
++ return RET_OK;
++ }
++
++ static conn_ret imap_sendSearch(connection_t *cxn, char *msgid)
++ {
++ conn_ret result;
++ char *tosend;
++
++ ASSERT(msgid);
++
++ tosend = (char *) malloc(7+40+strlen(msgid));
++
++ imap_GetTag(cxn);
++
++ /* preform search */
++ sprintf(tosend,"%s UID SEARCH header \"Message-ID\" \"%s\"\r\n",cxn->imap_currentTag, msgid);
++
++ result = WriteToWire_imapstr(cxn, tosend, -1);
++ if (result != RET_OK) return result;
++
++ cxn->imap_state = IMAP_WRITING_SEARCH;
++
++ return RET_OK;
++ }
++
++ static conn_ret imap_sendKill(connection_t *cxn, unsigned uid)
++ {
++ conn_ret result;
++ char *tosend;
++
++ tosend = (char *) malloc(7+50+20);
++
++ imap_GetTag(cxn);
++
++ sprintf(tosend,"%s UID STORE %d +FLAGS.SILENT (\\Deleted)\r\n",cxn->imap_currentTag, uid);
++
++ result = WriteToWire_imapstr(cxn, tosend, -1);
++ if (result != RET_OK) return result;
++
++ cxn->imap_state = IMAP_WRITING_STORE;
++
++ return RET_OK;
++ }
++
++ static conn_ret imap_sendClose(connection_t *cxn)
++ {
++ char *tosend;
++ conn_ret result;
++
++ tosend = (char *) malloc(7+10);
++
++ imap_GetTag(cxn);
++
++ sprintf(tosend,"%s CLOSE\r\n",cxn->imap_currentTag);
++
++ result = WriteToWire_imapstr(cxn, tosend, -1);
++ if (result != RET_OK) return result;
++
++ cxn->imap_state = IMAP_WRITING_CLOSE;
++
++ return RET_OK;
++ }
++
++ static conn_ret imap_sendQuit(connection_t *cxn)
++ {
++ char *tosend;
++ conn_ret result;
++
++ tosend = (char *) malloc(7+12);
++
++ imap_GetTag(cxn);
++
++ sprintf(tosend,"%s LOGOUT\r\n",cxn->imap_currentTag);
++
++ result = WriteToWire_imapstr(cxn, tosend, -1);
++ if (result != RET_OK) return result;
++
++ cxn->imap_state = IMAP_WRITING_QUIT;
++
++ return RET_OK;
++ }
++
++
++ static conn_ret imap_sendCapability(connection_t *cxn)
++ {
++ conn_ret result;
++ char *tosend;
++
++ imap_GetTag(cxn);
++
++ tosend = (char *) malloc(5+13+5);
++
++ sprintf(tosend,"%s CAPABILITY\r\n",cxn->imap_currentTag);
++
++ result = WriteToWire_imapstr(cxn, tosend, -1);
++ if (result != RET_OK) return result;
++
++ cxn->imap_state = IMAP_WRITING_CAPABILITY;
++
++ return RET_OK;
++ }
++
++ /************************** END IMAP sending functions ************************/
++
++ /************************** IMAP reading functions ***************************/
++
++ static conn_ret imap_listenintro(connection_t *cxn)
++ {
++ char *str;
++ Buffer *readBuffers;
++
++ /* set up to receive */
++ readBuffers = makeBufferArray (bufferTakeRef (cxn->imap_rBuffer), NULL) ;
++ prepareRead(cxn->imap_endpoint, readBuffers, imap_readCB, cxn, 5);
++
++ cxn->imap_state = IMAP_READING_INTRO;
++
++ return RET_OK;
++ }
++
++ static conn_ret imap_ParseCapability(char *string, imap_capabilities_t **caps)
++ {
++ char *str = string;
++ char *start = str;
++
++ /* allocate the caps structure if it doesn't already exist */
++ if ( (*caps) == NULL)
++ {
++ (*caps) = (imap_capabilities_t *) malloc( sizeof(imap_capabilities_t));
++ memset( (*caps), 0, sizeof(imap_capabilities_t));
++ }
++
++ while ( (*str) != '\0')
++ {
++
++ while (((*str) != '\0') && ((*str)!=' '))
++ {
++ str++;
++ }
++
++ if ( (*str) != '\0')
++ {
++ *str = '\0';
++ str++;
++ }
++
++ if ( strcasecmp(start,"IMAP4")==0)
++ {
++ (*caps)->imap4 = 1;
++ } else if (strcasecmp(start,"LOGINDISABLED")==0) {
++ (*caps)->logindisabled = 1;
++ } else if ( strncmp(start, "AUTH=", 5)==0) {
++
++ if ( (*caps)->saslmechs == NULL)
++ {
++ (*caps)->saslmechs = (char *) malloc(strlen(start+5)+1);
++ strcpy( (*caps)->saslmechs, start+5);
++ } else {
++
++ (*caps)->saslmechs = (char *) realloc((*caps)->saslmechs,
++ strlen((*caps)->saslmechs)+1+strlen(start+5)+1);
++
++ strcat( (*caps)->saslmechs, " ");
++ strcat( (*caps)->saslmechs, start+5);
++ }
++ }
++
++ start = str;
++
++ }
++
++ d_printf(1,"[imap] parsed capabilities: saslmechs = %s\n",(*caps)->saslmechs);
++
++ return RET_OK;
++ }
++
++
++ static void imap_readCB (EndPoint e, IoStatus i, Buffer *b, void *d)
++ {
++ connection_t *cxn = (connection_t *) d;
++ Buffer *modeCmdBuffers, *readBuffers ;
++
++ int okno;
++ char *str;
++ char strbuf[4096];
++ char *linestart;
++ conn_ret ret;
++ char *p;
++ int result;
++
++ int oldsize;
++ char *old;
++
++ p = bufferBase(b[0]);
++
++ /* Add what we got to our internal read buffer */
++ bufferAddNullByte (b[0]) ;
++
++ if (i != IoDone)
++ {
++ errno = endPointErrno (e);
++
++ d_printf(0,"IO not done: errno = %s\n",strerror(errno));
++ freeBufferArray (b);
++ imap_Disconnect(cxn);
++ return;
++ }
++
++ if (strchr (p, '\n') == NULL)
++ {
++ /* partial read. expand buffer and retry */
++
++ d_printf(0,"Partial. retry [%s]\n",p);
++ if (expandBuffer (b[0], BUFFER_EXPAND_AMOUNT)==false)
++ {
++ d_printf(0,"expanding buffer returned false\n");
++ imap_Disconnect(cxn);
++ return;
++ }
++ readBuffers = makeBufferArray (bufferTakeRef (b[0]), NULL) ;
++
++ if ( !prepareRead (e, readBuffers, imap_readCB, cxn, 1) )
++ {
++ imap_Disconnect(cxn);
++ }
++
++ freeBufferArray (b);
++ return;
++ }
++
++ clearTimer (cxn->imap_readBlockedTimerId) ;
++
++ /* we got something. add to our buffer and free b */
++
++ strcat(cxn->imap_respBuffer, p);
++
++ bufferSetDataSize( b[0], 0);
++
++ freeBufferArray (b);
++
++
++
++ /* goto here to take another step */
++ reset:
++
++ /* see if we have a full line */
++ ret = GetLine( cxn->imap_respBuffer , strbuf, sizeof(strbuf));
++ str = strbuf;
++ linestart = str;
++
++ /* if we don't have a full line */
++ if ( ret == RET_NO_FULLLINE)
++ {
++
++ readBuffers = makeBufferArray (bufferTakeRef (cxn->imap_rBuffer), NULL) ;
++
++ if ( !prepareRead (e, readBuffers, imap_readCB, cxn, 1) )
++ {
++ imap_Disconnect(cxn);
++ }
++ return;
++
++ } else if (ret!=RET_OK)
++ {
++ return;
++ }
++
++ /* if untagged */
++ if ((str[0]=='*') && (str[1]==' '))
++ {
++ str+=2;
++
++ /* now figure out what kind of untagged it is */
++ if (strncasecmp(str,"CAPABILITY ",11)==0)
++ {
++ str+=11;
++
++ imap_ParseCapability(str,&(cxn->imap_capabilities));
++
++ } else if (strncasecmp(str,"SEARCH",6)==0) {
++
++ str+=6;
++
++ if ( (*str) == ' ')
++ {
++ str++;
++
++ cxn->current_control->data.control->uid = atoi(str);
++
++ d_printf(1,"i think the UID = %d\n",cxn->current_control->data.control->uid);
++ } else {
++ /* it's probably a blank uid (i.e. message doesn't exist) */
++ cxn->current_control->data.control->uid = -1;
++ }
++
++
++ } else if (strncasecmp(str,"OK ",3)==0) {
++
++ if (cxn->imap_state==IMAP_READING_INTRO)
++ {
++ imap_sendCapability(cxn); /* xxx errors */
++ return;
++
++ } else {
++
++ }
++
++
++ } else {
++ /* untagged command not understood */
++ }
++
++ /* always might be more to look at */
++ goto reset;
++
++ } else if ((str[0]=='+') && (str[1]==' ')) {
++
++ str+=2;
++
++ if (cxn->imap_state == IMAP_READING_STEPAUTH)
++ {
++ #ifdef HAVE_SASL
++ if (imap_sendAuthStep(cxn, str)!=RET_OK)
++ {
++ imap_Disconnect(cxn);
++ }
++ #else
++ d_printf(0,"Invalid state\n");
++ imap_Disconnect(cxn);
++ #endif /* HAVE_SASL */
++
++ return;
++ } else {
++ d_printf(0,"+ response unexpected\n");
++ imap_Disconnect(cxn);
++ return;
++ }
++
++
++ } else if (strncmp(str, cxn->imap_currentTag, IMAP_TAGLENGTH)==0) { /* see if it matches our tag */
++ str +=IMAP_TAGLENGTH;
++
++ if (str[0]!=' ')
++ {
++ d_printf(0,"Tag with no space afterward\n");
++ imap_Disconnect(cxn);
++ return;
++ }
++ str++;
++
++ /* should be OK/NO */
++ if (strncmp(str,"OK",2)==0)
++ {
++ okno = 1;
++ } else {
++ okno = 0;
++ }
++
++ switch(cxn->imap_state)
++ {
++ case IMAP_READING_CAPABILITY:
++
++ if (okno==1) {
++ if (imap_sendAuthenticate(cxn)!=RET_OK)
++ {
++ d_printf(0,"IMAP sendauthenticate failed\n");
++ imap_Disconnect(cxn);
++ }
++ return;
++ } else {
++ d_printf(0,"CAPABILITY gave a NO response\n");
++ imap_Disconnect(cxn);
++ }
++ return;
++
++ break;
++ case IMAP_READING_STEPAUTH:
++
++ if (okno == 1) {
++
++ cxn->imap_sleepTimeout = init_reconnect_period ;
++
++ cxn->imap_timeCon = theTime () ;
++ cxn->timeCon = theTime () ;
++
++ d_printf(0,"%s:%d IMAP authentication succeeded!\n",
++ hostPeerName (cxn->myHost), cxn->ident);
++
++ cxn->imap_disconnects=0;
++
++ cxn->imap_state = IMAP_IDLE_AUTHED;
++
++ /* try to send a message if we have one */
++
++ imap_ProcessQueue(cxn);
++ } else {
++ d_printf(0,"IMAP Authentication failed with [%s]\n",str);
++ imap_Disconnect(cxn);
++ }
++
++ return;
++
++ break;
++
++ case IMAP_READING_CREATE:
++
++ if (okno==1) {
++
++ d_printf(1,"Create successful\n");
++ cxn->create_suceeded++;
++
++ /* we can delete article now */
++ QueueForgetAbout(cxn, cxn->current_control,0);
++
++ } else {
++ d_printf(1,"Create failed with [%s] for %s\n",str,
++ cxn->current_control->data.control->folder);
++
++ ReQueue(cxn, &(cxn->imap_controlMsg_q), cxn->current_control);
++ }
++
++ imap_ProcessQueue(cxn);
++
++ break;
++
++ case IMAP_READING_DELETE:
++
++ if (okno==1) {
++
++ d_printf(1,"Delete successful\n");
++ cxn->remove_suceeded++;
++
++ /* we can delete article now */
++ QueueForgetAbout(cxn, cxn->current_control,0);
++
++ } else {
++ d_printf(1,"Delete mailbox failed with [%s] for %s\n",str,
++ cxn->current_control->data.control->folder);
++
++ ReQueue(cxn, &(cxn->imap_controlMsg_q), cxn->current_control);
++
++ }
++
++ imap_ProcessQueue(cxn);
++ return;
++
++ break;
++
++ case IMAP_READING_SELECT:
++
++ if (okno==1) {
++
++ imap_sendSearch(cxn, cxn->current_control->data.control->msgid);
++ return;
++
++ } else {
++ d_printf(1,"Select failed with [%s] for %s\n",str,
++ cxn->current_control->data.control->folder);
++
++ ReQueue(cxn, &(cxn->imap_controlMsg_q), cxn->current_control);
++
++ cxn->imap_state = IMAP_IDLE_AUTHED;
++
++ imap_ProcessQueue(cxn);
++ return;
++ }
++
++ break;
++
++ case IMAP_READING_SEARCH:
++
++ /* if no message let's forget about it */
++ if (cxn->current_control->data.control->uid == -1)
++ {
++ d_printf(1,"Search didn't find the message\n");
++ ReQueue(cxn, &(cxn->imap_controlMsg_q), cxn->current_control);
++ if (imap_sendClose(cxn) != RET_OK)
++ imap_Disconnect(cxn);
++ return;
++ }
++
++ if (okno==1) {
++
++ /* we got a uid. let's delete it */
++ if (imap_sendKill(cxn, cxn->current_control->data.control->uid) != RET_OK)
++ imap_Disconnect(cxn);
++ return;
++
++ } else {
++ d_printf(1,"Received NO response to SEARCH command\n");
++ ReQueue(cxn, &(cxn->imap_controlMsg_q), cxn->current_control);
++
++ if (imap_sendClose(cxn) != RET_OK)
++ imap_Disconnect(cxn);
++ return;
++ }
++
++ break;
++
++ case IMAP_READING_STORE:
++
++ if (okno==1) {
++
++ d_printf(1,"Processed a Cancel fully\n");
++
++ /* we can delete article now */
++ QueueForgetAbout(cxn, cxn->current_control,0);
++
++ cxn->cancel_suceeded++;
++
++ if (imap_sendClose(cxn) != RET_OK)
++ imap_Disconnect(cxn);
++ return;
++
++ } else {
++
++ d_printf(1,"Store failed\n");
++ ReQueue(cxn, &(cxn->imap_controlMsg_q), cxn->current_control);
++
++ if (imap_sendClose(cxn) != RET_OK)
++ imap_Disconnect(cxn);
++ return;
++ }
++
++ break;
++
++ case IMAP_READING_CLOSE:
++
++ if (okno==1) {
++
++ } else {
++ /* we can't do anything about it */
++ d_printf(1,"Close failed\n");
++ }
++
++ cxn->imap_state = IMAP_IDLE_AUTHED;
++
++ imap_ProcessQueue(cxn);
++ return;
++
++
++ break;
++
++ case IMAP_READING_QUIT:
++
++ /* we don't care if the server said OK or NO just
++ that it said something */
++
++ d_printf(1,"Read quit\n");
++
++ cxn->imap_state = IMAP_DISCONNECTED;
++
++ switch (cxn->issue_quit)
++ {
++ case 1:
++ if (cxn->lmtp_state == LMTP_DISCONNECTED)
++ {
++ cxn->lmtp_state = LMTP_WAITING;
++ cxn->imap_state = IMAP_WAITING;
++ cxn->issue_quit = 0;
++ hostCxnWaiting (cxn->myHost,cxn) ; /* tell our Host we're waiting */
++ }
++ break;
++ case 2:
++ if (cxn->lmtp_state == LMTP_DISCONNECTED)
++ {
++ cxn->issue_quit = 0;
++
++ if (imap_Connect(cxn)!=RET_OK) prepareReopenCbk(cxn,0);
++ if (lmtp_Connect(cxn)!=RET_OK) prepareReopenCbk(cxn,1);
++ }
++ break;
++ case 3:
++ if (cxn->lmtp_state == LMTP_DISCONNECTED)
++ {
++ delConnection(cxn);
++ }
++ break;
++
++ }
++
++ break;
++
++
++ default:
++ d_printf(0,"I don't understand state %d [%s]\n",cxn->imap_state,str);
++ imap_Disconnect(cxn);
++ break;
++ }
++
++
++ } else {
++ d_printf(0,"tag doesn't match\n");
++ imap_Disconnect(cxn);
++ }
++
++ }
++
++ /************************** END IMAP reading functions ***************************/
++
++ /*************************** LMTP reading functions ****************************/
++
++ static void lmtp_readCB (EndPoint e, IoStatus i, Buffer *b, void *d)
++ {
++ connection_t *cxn = (connection_t *) d;
++ char str[4096];
++ Buffer *readBuffers;
++ int result;
++ int response_code;
++ int inlen;
++ char *in;
++ int outlen;
++ char *out;
++ char *inbase64;
++ int inbase64len;
++ int saslresult;
++ imt_stat status;
++ conn_ret ret;
++ #ifdef HAVE_SASL
++ sasl_interact_t *client_interact=NULL;
++ #endif /* HAVE_SASL */
++
++ char *p = bufferBase(b[0]);
++
++ bufferAddNullByte (b[0]) ;
++
++ if (i != IoDone)
++ {
++ d_printf(0,"IO not done\n");
++
++ freeBufferArray (b);
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ if (strchr (p, '\n') == NULL)
++ {
++ /* partial read. expand buffer and retry */
++
++ d_printf(0,"Partial. retry\n");
++ expandBuffer (b[0], BUFFER_EXPAND_AMOUNT) ;
++ readBuffers = makeBufferArray (bufferTakeRef (b[0]), NULL) ;
++
++ if ( !prepareRead (e, readBuffers, lmtp_readCB, cxn, 1) )
++ {
++ lmtp_Disconnect(cxn);
++ }
++
++ freeBufferArray (b);
++ return;
++ }
++
++ clearTimer (cxn->lmtp_readBlockedTimerId) ;
++
++ /* Add what we got to our internal read buffer */
++ strcat(cxn->lmtp_respBuffer, p);
++
++ bufferSetDataSize( b[0], 0);
++
++ freeBufferArray (b);
++
++ reset:
++
++ /* see if we have a full line */
++ ret = GetLine( cxn->lmtp_respBuffer, str, sizeof(str));
++
++ /* get a line */
++ if (ret!=RET_OK)
++ {
++ if (ret!=RET_NO_FULLLINE)
++ {
++ /* was a more serious error */
++ d_printf(0,"Internal error getting line from server\n");
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ /* set up to receive some more */
++ readBuffers = makeBufferArray (bufferTakeRef (cxn->lmtp_rBuffer), NULL) ;
++ prepareRead(cxn->lmtp_endpoint, readBuffers, lmtp_readCB, cxn, 5);
++ return;
++ }
++
++ switch (cxn->lmtp_state)
++ {
++
++ case LMTP_READING_INTRO:
++
++ if (ask_code(str)!=220)
++ {
++ d_printf(0,"Initial server msg does not start with 220 (began with %d)\n",
++ ask_code(str));
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ /* the initial intro could have many lines via
++ continuations. see if we need to read more */
++ if (ask_keepgoing(str)==1)
++ {
++ goto reset;
++ }
++
++ result = lmtp_getcapabilities(cxn);
++
++ if (result != RET_OK)
++ {
++ d_printf(0,"lmtp_getcapabilities() failure\n");
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ break;
++
++ case LMTP_READING_LHLO:
++
++ /* recieve the response(s) */
++ response_code = ask_code(str);
++
++ if (response_code != 250) /* was none */
++ {
++ d_printf(0,"Response code unexpected (%d)\n",response_code);
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ /* look for one we know about; ignore all others */
++ if (strncmp(str+4,"8BITMIME",strlen("8BITMIME"))==0)
++ {
++ cxn->lmtp_capabilities->Eightbitmime = 1;
++ } else if (strncmp(str+4, "ENHANCEDSTATUSCODES",
++ strlen("ENHANCEDSTATUSCODES"))==0) {
++ cxn->lmtp_capabilities->EnhancedStatusCodes = 1;
++ } else if (strncmp(str+4, "AUTH",4)==0) {
++
++ cxn->lmtp_capabilities->saslmechs = (char *) malloc(strlen(str+4+5)+5);
++ ASSERT (cxn->lmtp_capabilities->saslmechs != NULL) ;
++
++ /* copy string removing endline */
++ strcpy(cxn->lmtp_capabilities->saslmechs, str+4+5);
++
++ } else if (strncmp(str+4,"PIPELINING",strlen("PIPELINING"))==0) {
++ cxn->lmtp_capabilities->pipelining = 1;
++ } else {
++ /* don't care; ignore */
++ }
++
++ /* see if this is the last line of the capability */
++ if (ask_keepgoing(str)==1)
++ {
++ goto reset;
++ } else {
++
++ /* we require a few capabilities */
++ #ifndef SMTPMODE
++ if (cxn->lmtp_capabilities->pipelining!=1)
++ {
++ d_printf(0,"We require the capability PIPELINING\n");
++
++ lmtp_Disconnect(cxn);
++ return;
++ }
++ #endif /* SMTPMODE */
++ #ifdef HAVE_SASL
++ /* start the authentication */
++ result = lmtp_authenticate(cxn);
++
++ if (result != RET_OK)
++ {
++ d_printf(0,"lmtp_authenticate returned error\n");
++ lmtp_Disconnect(cxn);
++ return;
++ }
++ #else
++ cxn->lmtp_state = LMTP_AUTHED_IDLE;
++ d_printf(0,"Even though we can't authenticate. we're going to try to feed anyway\n");
++ /* We just assume we don't need to authenticate (great assumption huh?) */
++ hostRemoteStreams (cxn->myHost, cxn, true) ;
++
++ cxn->lmtp_timeCon = theTime () ;
++ cxn->timeCon = theTime () ;
++
++
++
++
++ /* try to send a message if we have one */
++ lmtp_sendmessage(cxn,NULL);
++ return;
++ #endif /* HAVE_SASL */
++
++
++ }
++
++
++ break;
++
++ #ifdef HAVE_SASL
++ case LMTP_READING_STEPAUTH:
++
++ inlen = 0;
++ status = lmtp_getauthline(str, &in, &inlen);
++
++ switch (status)
++ {
++
++ case STAT_CONT:
++
++ saslresult=sasl_client_step(cxn->saslconn_lmtp,
++ in,
++ inlen,
++ &client_interact,
++ &out,
++ &outlen);
++
++ free(in);
++
++ /* check if sasl suceeded */
++ if (saslresult != SASL_OK && saslresult != SASL_CONTINUE) {
++
++ d_printf(0,"sasl_client_step returned error (%s)\n",
++ sasl_errstring(saslresult,NULL,NULL));
++
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ /* convert to base64 */
++ inbase64 = (char *) malloc(outlen*2+10);
++
++ saslresult = sasl_encode64(out, outlen,
++ inbase64, outlen*2+10, (unsigned *) &inbase64len);
++
++ free(out);
++
++ if (saslresult != SASL_OK)
++ {
++ d_printf(0,"sasl_encode64 returned error (%s)\n",
++ sasl_errstring(saslresult,NULL,NULL));
++
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ /* add an endline */
++ strcpy(inbase64 + inbase64len, "\r\n");
++
++ /* send to server */
++ result = WriteToWire_lmtpstr(cxn,inbase64, inbase64len+2);
++
++ if (result != RET_OK)
++ {
++ d_printf(0,"WriteToWrite failure\n");
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ cxn->lmtp_state = LMTP_WRITING_STEPAUTH;
++ break;
++
++ case STAT_OK:
++
++ cxn->lmtp_sleepTimeout = init_reconnect_period ;
++
++ d_printf(0,"%s:%d LMTP authenticated succeeded\n",
++ hostPeerName (cxn->myHost), cxn->ident);
++
++ cxn->lmtp_disconnects=0;
++
++ hostRemoteStreams (cxn->myHost, cxn, true) ;
++
++ cxn->lmtp_timeCon = theTime () ;
++ cxn->timeCon = theTime () ;
++
++ cxn->lmtp_state = LMTP_AUTHED_IDLE;
++
++
++ /* try to send a message if we have one */
++ lmtp_sendmessage(cxn,NULL);
++ return;
++
++ break;
++
++ default:
++ d_printf(0,"lmtp failed authentication\n");
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ break;
++ #endif /* HAVE_SASL */
++
++ case LMTP_READING_MAILFROM:
++
++ if (ask_code(str)!=250)
++ {
++ d_printf(0,"MAILFROM failed with (%d)\n",ask_code(str));
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ /* we pipelined so next we recieve the rcpt's */
++ cxn->lmtp_state = LMTP_READING_RCPTTO;
++
++ goto reset;
++
++ break;
++
++ case LMTP_READING_RCPTTO:
++
++ if (ask_code(str)!=250)
++ {
++ d_printf(1,"RCPTTO failed with (%d) %s\n",ask_code(str), str);
++
++ cxn->current_rcpts_issued--;
++
++ } else {
++ cxn->current_rcpts_okayed++;
++ }
++
++ /* if issued equals number okayed then we're done */
++ if ( cxn->current_rcpts_okayed == cxn->current_rcpts_issued)
++ {
++ cxn->lmtp_state = LMTP_READING_DATA;
++ } else {
++ /* stay in same state */
++ }
++
++ goto reset;
++
++ break;
++
++ case LMTP_READING_DATA:
++
++ if (cxn->current_rcpts_issued == 0)
++ {
++ d_printf(1,"None of the rcpts were accepted for this message. Re-queueing\n");
++
++ ReQueue(cxn, &(cxn->lmtp_todeliver_q), cxn->current_article);
++
++ cxn->lmtp_have_mailfrom = 1;
++
++ cxn->lmtp_state = LMTP_AUTHED_IDLE;
++ lmtp_sendmessage(cxn,NULL);
++ } else {
++
++ cxn->lmtp_have_mailfrom = 0;
++
++ if (WriteArticle(cxn, cxn->current_bufs) != RET_OK)
++ {
++ d_printf(0,"Error writing article\n");
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++ cxn->lmtp_state = LMTP_WRITING_CONTENTS;
++ }
++
++ break;
++
++ case LMTP_READING_CONTENTS:
++
++ /* need 1 response from server for every rcpt */
++ cxn->current_rcpts_issued--;
++
++ if (ask_code(str)!=250)
++ {
++ d_printf(1,"DATA failed with %d (%s)\n",ask_code(str), str);
++ cxn->current_rcpts_okayed--;
++ }
++
++
++ if (cxn->current_rcpts_issued>0)
++ {
++ goto reset;
++ }
++
++ /*
++ * current_rcpts_okayed is number that suceeded
++ *
++ */
++
++ if (cxn->current_rcpts_okayed==0)
++ {
++ cxn->lmtp_state = LMTP_AUTHED_IDLE;
++
++ } else {
++
++ cxn->lmtp_state = LMTP_AUTHED_IDLE;
++ cxn->lmtp_suceeded++;
++ d_printf(1,"Woohoo! message accepted\n");
++ }
++
++ /* we can delete article now */
++ QueueForgetAbout(cxn, cxn->current_article,0);
++
++ #ifdef SMTPMODE
++ lmtp_Disconnect(cxn);
++ #else
++ /* try to send another if we have one and we're still idle
++ * forgetting the msg might have made us unidle
++ */
++ if (cxn->lmtp_state == LMTP_AUTHED_IDLE)
++ {
++ lmtp_sendmessage(cxn,NULL);
++ }
++ #endif
++
++ break;
++
++ case LMTP_READING_QUIT:
++
++ d_printf(1,"LMTP read quit\n");
++
++ cxn->lmtp_state = LMTP_DISCONNECTED;
++
++ switch (cxn->issue_quit)
++ {
++ case 1:
++ if (cxn->imap_state == IMAP_DISCONNECTED)
++ {
++ cxn->lmtp_state = LMTP_WAITING;
++ cxn->imap_state = IMAP_WAITING;
++ cxn->issue_quit = 0;
++ hostCxnWaiting (cxn->myHost,cxn) ; /* tell our Host we're waiting */
++ }
++ break;
++ case 2:
++ if (cxn->imap_state == IMAP_DISCONNECTED)
++ {
++ cxn->issue_quit = 0;
++ if (imap_Connect(cxn)!=RET_OK) prepareReopenCbk(cxn,0);
++ if (lmtp_Connect(cxn)!=RET_OK) prepareReopenCbk(cxn,1);
++ }
++ break;
++ case 3:
++ if (cxn->imap_state == IMAP_DISCONNECTED)
++ {
++ delConnection(cxn);
++ }
++ break;
++ }
++
++ break;
++
++ default:
++
++ d_printf(0,"Bad state in lmtp_readCB %d\n",cxn->lmtp_state);
++ lmtp_Disconnect(cxn);
++ return;
++ }
++
++
++ }
++
++ /*
++ * Add a rcpt to:<foo> to the string
++ *
++ */
++
++ static void addrcpt(char *newrcpt, int newrcptlen, char **out, int *outalloc)
++ {
++ int size = strlen(*out);
++ int newsize = size + 9+strlen(NEWS_USERNAME)+1+newrcptlen+3;
++
++ /* see if we need to grow the string */
++ if (newsize > *outalloc)
++ {
++ (*outalloc)+=200;
++ (*out) = realloc(*out, *outalloc);
++ ASSERT(*out);
++ }
++
++ sprintf((*out)+size,"RCPT TO:<%s+",NEWS_USERNAME);
++ size+=9+strlen(NEWS_USERNAME)+1;
++
++ memcpy((*out)+size, newrcpt, newrcptlen);
++ size+=newrcptlen;
++
++ strcpy((*out)+size,">\r\n");
++ }
++
++ /*
++ * Takes the newsgroups header value and makes it into a list of RCPT TO:'s we can send over the wire
++ *
++ * in - newsgroups header start
++ * in_end - end of newsgroups header
++ * num - number of rcpt's we created
++ */
++
++ static char *ConvertRcptList(char *in, char *in_end, int *num)
++ {
++ int retalloc = 400;
++ char *ret = malloc(retalloc);
++ char *str = in;
++ char *laststart = in;
++ int len;
++
++ (*num) = 0;
++
++ /* start it off empty */
++ strcpy(ret,"");
++
++ while ( str != in_end)
++ {
++ if ((*str) == ',')
++ {
++ /* eliminate leading whitespace */
++ while (((*laststart) ==' ') || ((*laststart)=='\t'))
++ {
++ laststart++;
++ }
++
++ #ifndef SMTPMODE
++ addrcpt(laststart, str - laststart, &ret, &retalloc);
++ (*num)++;
++ #endif /* SMTPMODE */
++ laststart = str+1;
++ }
++
++ str++;
++ }
++
++ if (laststart<str)
++ {
++ addrcpt(laststart, str - laststart, &ret, &retalloc);
++ (*num)++;
++ }
++
++ return ret;
++ }
++
++ /*************************** END LMTP reading functions ****************************/
++
++
++
++ /*
++ * Process the control message queue. If we run out ask the host for more.
++ *
++ * cxn - connection object
++ */
++
++ static conn_ret imap_ProcessQueue(connection_t *cxn)
++ {
++ article_queue_t *item;
++ int result;
++ bool res;
++ char *control_header;
++
++ retry:
++
++ /* pull an article off the queue */
++ result = PopFromQueue(&(cxn->imap_controlMsg_q), &item);
++
++ if (result==RET_QUEUE_EMPTY)
++ {
++ if (cxn->issue_quit)
++ {
++ imap_sendQuit(cxn);
++ return;
++ }
++
++ cxn->imap_state = IMAP_IDLE_AUTHED;
++
++ /* now we wait for articles from our Host, or we have some
++ articles already. On infrequently used connections, the
++ network link is torn down and rebuilt as needed. So we may
++ be rebuilding the connection here in which case we have an
++ article to send. */
++
++ /* make sure imap has _lots_ of space too */
++ if ((QueueItems(&(cxn->lmtp_todeliver_q)) == 0) &&
++ (QueueItems(&(cxn->imap_controlMsg_q)) == 0))
++ {
++ if (hostGimmeArticle (cxn->myHost,cxn)==true)
++ goto retry;
++ }
++
++ return RET_OK;
++ }
++
++ cxn->current_control = item;
++
++ switch (item->type)
++ {
++ case CREATE_FOLDER:
++ imap_CreateGroup(cxn, item->data.control->folder);
++ break;
++
++ case CANCEL_MSG:
++
++ imap_CancelMsg(cxn, item->data.control->folder);
++
++ break;
++
++ case DELETE_FOLDER:
++ imap_DeleteGroup(cxn, item->data.control->folder);
++ break;
++ default:
++ break;
++ }
++
++ return RET_OK;
++ }
++
++
++
++ /*
++ *
++ * Pulls a message off the queue and trys to start sending it. If the
++ * message is a control message put it in the control queue and grab
++ * another message. If the message doesn't exist on disk or something
++ * is wrong with it tell the host and try again. If we run out of
++ * messages to get tell the host we want more
++ *
++ * cxn - connection object
++ * justadded - the article that was just added to the queue
++ */
++
++ static void lmtp_sendmessage(connection_t *cxn, Article justadded)
++ {
++ bool res;
++ conn_ret result;
++ FILE *stream;
++ char *str;
++ char *p;
++ Buffer *bufs;
++ char *control_header = NULL;
++ char *control_header_end = NULL;
++
++ article_queue_t *item;
++ char *rcpt_list, *rcpt_list_end;
++
++ /* retry point */
++ retry:
++
++ /* pull an article off the queue */
++ result = PopFromQueue(&(cxn->lmtp_todeliver_q), &item);
++
++ if (result==RET_QUEUE_EMPTY)
++ {
++
++ if (cxn->issue_quit)
++ {
++ lmtp_IssueQuit(cxn);
++ return;
++ }
++ /* now we wait for articles from our Host, or we have some
++ articles already. On infrequently used connections, the
++ network link is torn down and rebuilt as needed. So we may
++ be rebuilding the connection here in which case we have an
++ article to send. */
++
++ /* make sure imap has space too */
++ if ((QueueItems(&(cxn->lmtp_todeliver_q)) == 0) &&
++ (QueueItems(&(cxn->imap_controlMsg_q)) == 0))
++ {
++ if (hostGimmeArticle (cxn->myHost,cxn)==true)
++ goto retry;
++ }
++
++ return;
++ }
++
++ /* make sure contents ok; this also should load it into memory */
++ res = artContentsOk (item->data.article);
++ if (res==false)
++ {
++ if (justadded == item->data.article) {
++ ReQueue(cxn, &(cxn->lmtp_todeliver_q), item);
++ return;
++
++ } else {
++ /* tell to reject taking this message */
++ QueueForgetAbout(cxn,item,3);
++ }
++
++ goto retry;
++ }
++
++ /* Check if it's a control message */
++ bufs = artGetNntpBuffers (item->data.article);
++ if (bufs == NULL)
++ {
++ /* tell to reject taking this message */
++ QueueForgetAbout(cxn,item,3);
++ goto retry;
++ }
++
++ result = FindHeader(bufs, "Control", &control_header, &control_header_end);
++
++ if (result == RET_OK)
++ {
++ result = AddControlMsg(cxn, item->data.article, bufs, control_header,control_header_end, 1);
++
++ if (result != RET_OK)
++ {
++ d_printf(1,"Error adding to control queue\n");
++ ReQueue(cxn, &(cxn->lmtp_todeliver_q), item);
++ return;
++ }
++
++ switch(cxn->imap_state)
++ {
++ case IMAP_IDLE_AUTHED:
++ /* we're idle. let's process the queue */
++ imap_ProcessQueue(cxn);
++ break;
++ case IMAP_DISCONNECTED:
++ case IMAP_WAITING:
++ /* Let's connect. Once we're connected we can worry about the message */
++ if (imap_Connect(cxn) != RET_OK) prepareReopenCbk(cxn,0);
++ break;
++ default:
++ /* we're doing something right now */
++ break;
++
++ }
++
++ /* all we did was add a control message. we still want to get an lmtp message */
++ goto retry;
++ }
++
++ if (cxn->current_bufs!=NULL)
++ {
++ /* freeBufferArray(cxn->current_bufs); */
++ cxn->current_bufs = NULL;
++ }
++ cxn->current_bufs = bufs;
++ cxn->current_article = item;
++
++ /* we make use of pipelining here
++ send:
++ mail from
++ rctp to
++ data
++ */
++
++ /* find out who it's going to */
++ result = FindHeader(cxn->current_bufs, "Newsgroups", &rcpt_list, &rcpt_list_end);
++
++ if ((result != RET_OK) || (rcpt_list == NULL))
++ {
++ d_printf(1,"Didn't find Newsgroups header\n");
++ QueueForgetAbout(cxn, cxn->current_article,1);
++ goto retry;
++ }
++
++ /* free's original rcpt_list */
++ rcpt_list = ConvertRcptList(rcpt_list, rcpt_list_end, &cxn->current_rcpts_issued);
++ cxn->current_rcpts_okayed = 0;
++
++
++
++ if (cxn->lmtp_have_mailfrom==1)
++ {
++ p = (char *) malloc (strlen(rcpt_list)+50);
++ sprintf (p, "%sDATA\r\n", rcpt_list);
++ } else {
++ p = (char *) malloc (strlen(rcpt_list)+strlen(mailfrom_name)+50);
++ sprintf (p, "MAIL FROM:<%s>\r\n%sDATA\r\n", mailfrom_name,rcpt_list);
++ }
++
++ cxn->lmtp_state = LMTP_WRITING_UPTODATA;
++
++ result = WriteToWire_lmtpstr(cxn, p, strlen(p));
++
++ if (result != RET_OK)
++ {
++ d_printf(0,"Failed trying to write\n");
++ lmtp_Disconnect(cxn);
++ return;
++ }
++ }
++
++ /*
++ * Called by the EndPoint class when the timer goes off
++ */
++ static void dosomethingTimeoutCbk (TimeoutId id, void *data)
++ {
++ Connection cxn = (Connection) data ;
++
++ ASSERT (id == cxn->dosomethingTimerId) ;
++
++ show_stats(cxn);
++
++ /* we're disconnected but there are things to send */
++ if ((cxn->lmtp_state == LMTP_DISCONNECTED) &&
++ QueueItems(&(cxn->lmtp_todeliver_q)) > 0)
++ lmtp_Connect(cxn);
++
++ if ((cxn->imap_state == IMAP_DISCONNECTED) &&
++ (QueueItems(&(cxn->imap_controlMsg_q)) > 0))
++ imap_Connect(cxn);
++
++
++ /* if we're idle and there are items to send let's send them */
++ if ((cxn->lmtp_state == LMTP_AUTHED_IDLE) &&
++ QueueItems(&(cxn->lmtp_todeliver_q)) > 0)
++ lmtp_sendmessage(cxn,NULL);
++
++ if ((cxn->imap_state == IMAP_IDLE_AUTHED) &&
++ (QueueItems(&(cxn->imap_controlMsg_q)) > 0))
++ imap_ProcessQueue(cxn);
++
++ /* set up the timer. */
++ clearTimer (cxn->dosomethingTimerId) ;
++
++ cxn->dosomethingTimerId = prepareSleep (dosomethingTimeoutCbk,
++ cxn->dosomethingTimeout, cxn);
++ }
++
++ /* Give all articles in the queue back to the host. We're probably
++ * going to exit soon.
++ * */
++
++ static void DeferAllArticles(connection_t *cxn, Q_t *q)
++ {
++ article_queue_t *cur;
++ conn_ret ret;
++
++ while (1)
++ {
++ ret = PopFromQueue(q, &cur);
++ if (ret == RET_QUEUE_EMPTY) return;
++
++ if (ret == RET_OK)
++ {
++ QueueForgetAbout(cxn, cur,2);
++ } else {
++ d_printf(0,"Error emptying queue\n");
++ return;
++ }
++ }
++ }
++
++ /*
++ * Does the actual deletion of a connection and all its private data.
++ */
++ static void delConnection (Connection cxn)
++ {
++ bool shutDown;
++ Connection c, q;
++
++ if (cxn == NULL)
++ return ;
++
++ d_printf (1,"Deleting connection: %s:%d\n",
++ hostPeerName (cxn->myHost),cxn->ident) ;
++
++ for (c = gCxnList, q = NULL ; c != NULL ; q = c, c = c->next)
++ if (c == cxn)
++ {
++ if (gCxnList == c)
++ gCxnList = gCxnList->next ;
++ else
++ q->next = c->next ;
++ break ;
++ }
++
++ ASSERT (c != NULL) ;
++
++ if (cxn->lmtp_endpoint != NULL)
++ delEndPoint (cxn->lmtp_endpoint) ;
++ if (cxn->imap_endpoint != NULL)
++ delEndPoint (cxn->imap_endpoint) ;
++
++ delBuffer (cxn->imap_rBuffer) ;
++ delBuffer (cxn->lmtp_rBuffer) ;
++
++ /* tell the Host we're outta here. */
++ shutDown = hostCxnGone (cxn->myHost, cxn) ;
++
++ cxn->ident = 0 ;
++ cxn->timeCon = 0 ;
++
++ FREE (cxn->ServerName) ;
++
++ clearTimer (cxn->imap_readBlockedTimerId) ;
++ clearTimer (cxn->imap_writeBlockedTimerId) ;
++ clearTimer (cxn->lmtp_readBlockedTimerId) ;
++ clearTimer (cxn->lmtp_writeBlockedTimerId) ;
++ clearTimer (cxn->imap_sleepTimerId);
++ clearTimer (cxn->lmtp_sleepTimerId);
++ clearTimer (cxn->dosomethingTimerId);
++
++ FREE(cxn->imap_respBuffer);
++ FREE(cxn->lmtp_respBuffer);
++
++ FREE (cxn) ;
++
++ if (shutDown)
++ {
++ /* exit program if that was the last connexion for the last host */
++ /* XXX what about if there are ever multiple listeners?
++ XXX this will be executed if all hosts on only one of the
++ XXX listeners have gone */
++ time_t now = theTime () ;
++ char dateString [30] ;
++
++ strcpy (dateString,ctime (&now)) ;
++ dateString [24] = '\0' ;
++
++ syslog (LOG_NOTICE,STOPPING_PROGRAM,dateString) ;
++
++ exit (0) ;
++ }
++ }
++
++
++ /******************** PUBLIC FUNCTIONS ****************************/
++
++
++
++ /*
++ * Create a new Connection.
++ *
++ * HOST is the host object we're owned by.
++ * IDENT is an identifier to be added to syslog entries so we can tell
++ * what's happening on different connections to the same peer.
++ * IPNAME is the name (or ip address) of the remote)
++ * MAXTOUT is the maximum amount of time to wait for a response before
++ * considering the remote host dead.
++ * PORTNUM is the portnum to contact on the remote end.
++ * RESPTIMEOUT is the amount of time to wait for a response from a remote
++ * before considering the connection dead.
++ * CLOSEPERIOD is the number of seconds after connecting that the
++ * connections should be closed down and reinitialized (due to problems
++ * with old NNTP servers that hold history files open. Value of 0 means
++ * no close down.
++ */
++
++ Connection newConnection (Host host,
++ u_int ident,
++ const char *ipname,
++ u_int artTout,
++ u_int portNum,
++ u_int respTimeout,
++ u_int closePeriod,
++ double lowPassLow,
++ double lowPassHigh,
++ double lowPassFilter)
++ {
++ Connection cxn;
++ /* check arguements */
++
++ /* allocate connection structure */
++ cxn = CALLOC (connection_t, 1) ;
++ ASSERT (cxn != NULL) ;
++
++ cxn->ident = ident ;
++
++ cxn->ServerName = malloc( strlen(ipname)+1);
++ strcpy(cxn->ServerName, ipname);
++
++ cxn->myHost = host ;
++
++ /* setup mailfrom user */
++ if (gethostname(hostname, MAXHOSTNAMELEN)!=0)
++ {
++ d_printf(0,"gethostname failed\n");
++ return NULL;
++ }
++
++ mailfrom_name = (char *) malloc (20+strlen(hostname));
++ ASSERT (mailfrom_name != NULL);
++
++ sprintf(mailfrom_name,"news@%s",hostname);
++
++ cxn->next = gCxnList ;
++ gCxnList = cxn ;
++ gCxnCount++ ;
++
++ /* init stuff */
++ Initialize(cxn, respTimeout);
++
++ return cxn;
++ }
++
++
++ /* Causes the Connection to build the network connection. */
++ bool cxnConnect (Connection cxn)
++ {
++ conn_ret result;
++
++ d_printf(1,"Connecting...\n");
++
++ /* make the lmtp connection */
++ if (lmtp_Connect(cxn) != RET_OK) return false;
++
++ if (imap_Connect(cxn) != RET_OK) return false;
++
++ return true;
++ }
++
++
++ void QuitIfIdle(Connection cxn)
++ {
++ if ((cxn->lmtp_state == LMTP_AUTHED_IDLE) && (QueueItems(&(cxn->lmtp_todeliver_q))<=0))
++ lmtp_IssueQuit(cxn);
++ if ((cxn->imap_state == IMAP_IDLE_AUTHED) && (QueueItems(&(cxn->imap_controlMsg_q))<=0))
++ imap_sendQuit(cxn);
++ }
++
++ /* puts the connection into the wait state (i.e. waits for an article
++ before initiating a connect). Can only be called right after
++ newConnection returns, or while the Connection is in the (internal)
++ Sleeping state. */
++ void cxnWait (Connection cxn)
++ {
++ cxn->issue_quit = 1;
++
++ QuitIfIdle(cxn);
++ }
++
++ /* The Connection will disconnect as if cxnDisconnect were called and then
++ it automatically reconnects to the remote. */
++ void cxnFlush (Connection cxn)
++ {
++ cxn->issue_quit = 2;
++
++ QuitIfIdle(cxn);
++ }
++
++
++
++ /* The Connection sends remaining articles, then issues a QUIT and then
++ deletes itself */
++ void cxnClose (Connection cxn)
++ {
++ d_printf(0,"%s:%d Closing cxn\n",hostPeerName (cxn->myHost), cxn->ident);
++ cxn->issue_quit = 3;
++
++ QuitIfIdle(cxn);
++ }
++
++ /* The Connection drops all queueed articles, then issues a QUIT and then
++ deletes itself */
++ void cxnTerminate (Connection cxn)
++ {
++ d_printf(0,"%s:%d Terminate\n",hostPeerName (cxn->myHost), cxn->ident);
++
++ DeferAllArticles(cxn, &(cxn->lmtp_todeliver_q)) ; /* give any articles back to Host */
++ DeferAllArticles(cxn, &(cxn->imap_controlMsg_q)) ; /* give any articles back to Host */
++
++ cxn->issue_quit = 3;
++
++ QuitIfIdle(cxn);
++ }
++
++ /* Blow away the connection gracelessly and immedately clean up */
++ void cxnNuke (Connection cxn)
++ {
++ d_printf(0,"%s:%d Nuking connection\n",cxn->ServerName, cxn->ident);
++
++ cxn->issue_quit = 4;
++
++ DeferAllArticles(cxn, &(cxn->lmtp_todeliver_q)) ; /* give any articles back to Host */
++ DeferAllArticles(cxn, &(cxn->imap_controlMsg_q)) ; /* give any articles back to Host */
++
++ imap_Disconnect(cxn);
++ lmtp_Disconnect(cxn);
++
++ hostCxnDead (cxn->myHost,cxn);
++ delConnection(cxn);
++ }
++
++ /*
++ * must
++ * true - must queue article. Don't try sending
++ * false - queue of article may fail. Try sending
++ *
++ * Always adds to lmtp queue even if control message
++ *
++ */
++
++ bool ProcessArticle(Connection cxn, Article art, bool must)
++ {
++ conn_ret result;
++
++ /* if it's a regular message let's add it to the queue */
++ result = AddToQueue(&(cxn->lmtp_todeliver_q), art, DELIVER,1,must);
++
++ if (result == RET_EXCEEDS_SIZE) {
++ return false;
++ }
++
++ if (result != RET_OK)
++ {
++ d_printf(0,"Error adding to delivery queue\n");
++ return must;
++ }
++
++ if (must == true) return true;
++
++ switch (cxn->lmtp_state)
++ {
++ case LMTP_WAITING:
++ case LMTP_DISCONNECTED:
++ if (lmtp_Connect(cxn) != RET_OK) prepareReopenCbk(cxn,1);
++ break;
++
++ case LMTP_AUTHED_IDLE:
++ lmtp_sendmessage(cxn,art);
++ break;
++ default:
++ /* currently doing something */
++ break;
++ }
++
++ return true;
++ }
++
++ /* Tells the Connection to take the article and handle its
++ transmission. If it can't (due to queue size or whatever), then the
++ function returns false. The connection assumes ownership of the
++ article if it accepts it (returns true). */
++ bool cxnTakeArticle (Connection cxn, Article art)
++ {
++ /* if we're closing down always refuse */
++ if (cxn->issue_quit == 1) return false;
++
++ return ProcessArticle (cxn,art,false);
++ }
++
++ /* Tell the Connection to take the article (if it can) for later
++ processing. Assumes ownership of it if it takes it. */
++ bool cxnQueueArticle (Connection cxn, Article art)
++ {
++ return ProcessArticle (cxn,art,true);
++ }
++
++ /* generate a syslog message for the connections activity. Called by Host. */
++ void cxnLogStats (Connection cxn, bool final)
++ {
++ const char *peerName ;
++ time_t now = theTime() ;
++
++ ASSERT (cxn != NULL) ;
++
++ peerName = hostPeerName (cxn->myHost) ;
++
++ syslog (LOG_NOTICE,
++ "Host: %s:%d status: %s time: %d Delivered (%d of %d) Cancelled (%d of %d) Created (%d of %d) Deleted (%d of %d)",
++ peerName, cxn->ident,
++ (final ? "final" : "checkpoint"), (long) (now - cxn->timeCon),
++ cxn->lmtp_suceeded, cxn->lmtp_suceeded + cxn->lmtp_failed,
++ cxn->cancel_suceeded, cxn->cancel_suceeded + cxn->cancel_failed,
++ cxn->create_suceeded, cxn->create_suceeded + cxn->create_failed,
++ cxn->remove_suceeded, cxn->remove_suceeded + cxn->remove_failed);
++
++ show_stats(cxn);
++
++ if (final)
++ {
++ cxn->lmtp_suceeded = 0;
++ cxn->lmtp_failed = 0;
++ cxn->cancel_suceeded = 0;
++ cxn->cancel_failed = 0;
++ cxn->create_suceeded = 0;
++ cxn->create_failed = 0;
++ cxn->remove_suceeded = 0;
++ cxn->remove_failed = 0;
++
++ if (cxn->timeCon > 0)
++ cxn->timeCon = theTime() ;
++ }
++
++ }
++
++ /* return the number of articles the connection can be given. This lets
++ the host shovel in as many as possible. May be zero. */
++ size_t cxnQueueSpace (Connection cxn)
++ {
++ int lmtpsize;
++ int imapsize;
++
++ lmtpsize = QueueSpace(&(cxn->lmtp_todeliver_q));
++ imapsize = QueueSpace(&(cxn->imap_controlMsg_q));
++
++ if (lmtpsize >=1) lmtpsize--;
++ if (imapsize >=1) imapsize--;
++
++ d_printf(1,"Q Space lmtp size = %d state = %d\n",lmtpsize,cxn->lmtp_state);
++ d_printf(1,"Q Space imap size = %d state = %d\n",imapsize,cxn->imap_state);
++
++ /* return the smaller of our 2 queues */
++ if (lmtpsize < imapsize)
++ return lmtpsize;
++ else
++ return imapsize;
++ }
++
++ /* adjust the mode no-CHECK filter values */
++ void cxnSetCheckThresholds (Connection cxn,
++ double lowFilter, double highFilter,
++ double lowPassFilter)
++ {
++ d_printf(1,"Threshold change. This means nothing to me\n");
++ }
++
++ /* print some debugging info. */
++ void gPrintCxnInfo (FILE *fp, u_int indentAmt)
++ {
++ char indent [INDENT_BUFFER_SIZE] ;
++ u_int i ;
++ Connection cxn ;
++
++ for (i = 0 ; i < MIN(INDENT_BUFFER_SIZE - 1,indentAmt) ; i++)
++ indent [i] = ' ' ;
++ indent [i] = '\0' ;
++
++ fprintf (fp,"%sGlobal Connection list : (count %d) {\n",
++ indent,gCxnCount) ;
++ for (cxn = gCxnList ; cxn != NULL ; cxn = cxn->next)
++ printCxnInfo (cxn,fp,indentAmt + INDENT_INCR) ;
++ fprintf (fp,"%s}\n",indent) ;
++ }
++
++ void printCxnInfo (Connection cxn, FILE *fp, u_int indentAmt)
++ {
++ char indent [INDENT_BUFFER_SIZE] ;
++ u_int i ;
++ article_queue_t *artH ;
++
++ for (i = 0 ; i < MIN(INDENT_BUFFER_SIZE - 1,indentAmt) ; i++)
++ indent [i] = ' ' ;
++ indent [i] = '\0' ;
++
++ fprintf (fp,"%sConnection : %p {\n",indent,cxn) ;
++ fprintf (fp,"%s host : %p\n",indent, (void *) cxn->myHost) ;
++ fprintf (fp,"%s endpoint (imap): %p\n",indent,cxn->imap_endpoint) ;
++ fprintf (fp,"%s endpoint (lmtp): %p\n",indent,cxn->lmtp_endpoint) ;
++ fprintf (fp,"%s state (imap) : %s\n",indent, imap_stateToString (cxn->imap_state)) ;
++ fprintf (fp,"%s state (lmtp) : %s\n",indent, lmtp_stateToString (cxn->lmtp_state)) ;
++ fprintf (fp,"%s ident : %d\n",indent,cxn->ident) ;
++ fprintf (fp,"%s ip-name (imap): %s\n", indent, cxn->ServerName) ;
++ fprintf (fp,"%s ip-name (lmtp): %s\n", indent, cxn->ServerName) ;
++ fprintf (fp,"%s port-number (imap) : %d\n",indent,cxn->imap_port) ;
++ fprintf (fp,"%s port-number (lmtp) : %d\n",indent,cxn->lmtp_port) ;
++
++ fprintf (fp,"%s Issuing Quit : %d\n",indent, cxn->issue_quit) ;
++
++ fprintf (fp,"%s time-connected (imap) : %ld\n",indent,(long) cxn->imap_timeCon) ;
++ fprintf (fp,"%s time-connected (lmtp) : %ld\n",indent,(long) cxn->lmtp_timeCon) ;
++ fprintf (fp,"%s articles from INN : %d\n",indent,
++ cxn->lmtp_suceeded+
++ cxn->lmtp_failed+
++ cxn->cancel_suceeded+
++ cxn->cancel_failed+
++ cxn->create_suceeded+
++ cxn->create_failed+
++ cxn->remove_suceeded+
++ cxn->remove_failed+
++ QueueSpace(&(cxn->lmtp_todeliver_q))+
++ QueueSpace(&(cxn->imap_controlMsg_q))
++ );
++ fprintf(fp,"%s LMTP STATS: yes: %d no: %d\n",cxn->lmtp_suceeded, cxn->lmtp_failed);
++ fprintf(fp,"%s control: yes: %d no: %d\n",cxn->cancel_suceeded, cxn->cancel_failed);
++ fprintf(fp,"%s create: yes: %d no: %d\n",cxn->create_suceeded, cxn->create_failed);
++ fprintf(fp,"%s remove: yes: %d no: %d\n",cxn->remove_suceeded, cxn->remove_failed);
++
++ fprintf (fp,"%s response-timeout : %d\n",indent,cxn->imap_readTimeout) ;
++ fprintf (fp,"%s response-callback : %d\n",indent,cxn->imap_readBlockedTimerId) ;
++
++ fprintf (fp,"%s write-timeout : %d\n",indent,cxn->imap_writeTimeout) ;
++ fprintf (fp,"%s write-callback : %d\n",indent,cxn->imap_writeBlockedTimerId) ;
++
++ fprintf (fp,"%s reopen wait : %d\n",indent,cxn->imap_sleepTimeout) ;
++ fprintf (fp,"%s reopen id : %d\n",indent,cxn->imap_sleepTimerId) ;
++
++ fprintf (fp,"%s IMAP queue {\n",indent) ;
++ for (artH = cxn->imap_controlMsg_q.head; artH != NULL ; artH = artH->next)
++ printArticleInfo (artH->data.article,fp,indentAmt + INDENT_INCR) ;
++ fprintf (fp,"%s }\n",indent) ;
++
++ fprintf (fp,"%s LMTP queue {\n",indent) ;
++ for (artH = cxn->lmtp_todeliver_q.head ; artH != NULL ; artH = artH->next)
++ printArticleInfo (artH->data.control->article,fp,indentAmt + INDENT_INCR) ;
++ fprintf (fp,"%s }\n",indent) ;
++
++ fprintf (fp,"%s}\n",indent) ;
++ }
++
++ /* config file load callback */
++ int cxnConfigLoadCbk (void *data)
++ {
++ long iv ;
++ char *sv ;
++ int rval = 1 ;
++ FILE *fp = (FILE *) data ;
++
++ (void) data ; /* keep lint happy */
++
++ if (getInteger (topScope,"max-reconnect-time",&iv,NO_INHERIT))
++ {
++ if (iv < 1)
++ {
++ rval = 0 ;
++ logOrPrint (LOG_ERR,fp,LESS_THAN_ONE,"max-reconnect-time",
++ iv,"global scope",(long) MAX_RECON_PER);
++ iv = MAX_RECON_PER ;
++ }
++ }
++ else
++ iv = MAX_RECON_PER ;
++ max_reconnect_period = (u_int) iv ;
++
++ if (getInteger (topScope,"initial-reconnect-time",&iv,NO_INHERIT))
++ {
++ if (iv < 1)
++ {
++ rval = 0 ;
++ logOrPrint (LOG_ERR,fp,LESS_THAN_ONE,"initial-reconnect-time",
++ iv,"global scope",(long)INIT_RECON_PER);
++ iv = INIT_RECON_PER ;
++ }
++ }
++ else
++ iv = INIT_RECON_PER ;
++ init_reconnect_period = (u_int) iv ;
++
++ return rval ;
++ }
++
++ /* check connection state is in cxnWaitingS, cxnConnectingS or cxnIdleS */
++ bool cxnCheckstate (Connection cxn)
++ {
++ d_printf(1,"Being asked to check state\n");
++
++ /* return false if either connection is doing something */
++
++ if (cxn->imap_state > IMAP_IDLE_AUTHED)
++ {
++ return false;
++ }
++
++ if (cxn->lmtp_state > LMTP_AUTHED_IDLE)
++ {
++ return false;
++ }
++
++ return true;
++ }
++
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/inn.diffs
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/macros.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/macros.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/macros.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/macros.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,153 @@
+/* $Revision: 1.7 $
+ * $Id: macros.h,v 1.7 2003/10/22 18:50:15 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+** Here be some useful macros.
+*/
+
+
+/*
+** Memory allocation. Wrappers around wrapper functions.
+** Don't replace any existing definitions, for use with malloc-debug
+** packages, e.g.
+*/
+#if defined(_DEBUG_MALLOC_INC)
+#undef _DEBUG_MALLOC_INC
+#include "malloc.h"
+#else
+#define malloc_enter(func)
+#define malloc_leave(func)
+#define malloc_chain_check()
+#define malloc_dump(fd)
+#define malloc_list(a,b,c)
+#define malloc_size(hist) (*(hist) = 0, 0)
+#endif /* defined(_DEBUG_MALLOC_INC) */
+
+#if !defined(NEW)
+
+#define NEW(T, c) \
+ ((T *)xmalloc((unsigned int)(sizeof (T) * (c))))
+
+#define RENEW(p, T, c) \
+ (p = (T *)xrealloc((char *)(p), (unsigned int)(sizeof (T) * (c)), \
+ __FILE__, __LINE__))
+
+/* =()<#define DISPOSE(p) free((@<POINTER>@ *)p)>()= */
+#define DISPOSE(p) free((void *)p)
+
+ /* This properly belongs in libinn.h. */
+extern int (*xmemfailure)();
+#define ONALLOCFAIL(func) (xmemfailure = (func))
+
+#endif /* !defined(NEW) */
+
+
+/*
+** Copy a string to allocated memory.
+*/
+#define COPY(p) \
+ strcpy(NEW(char, strlen(p) + 1), p)
+
+
+/*
+** Wrappers around str[n]cmp. Don't add the ((a) == (b)) test here; it's
+** already been done in places where it's time-critical.
+*/
+#define EQ(a, b) (strcmp((a), (b)) == 0)
+#define EQn(a, b, n) (strncmp((a), (b), (SIZE_T)(n)) == 0)
+#define caseEQ(a, b) (strcasecmp((a), (b)) == 0)
+#define caseEQn(a, b, n) (strncasecmp((a), (b), (SIZE_T)(n)) == 0)
+
+
+/*
+** Cast a pointer into another point, but keep lint quiet.
+*/
+#if !defined(lint)
+#define CAST(t, p) ((t)(p))
+#else
+#define CAST(t, p) ((p) ? (t)NULL : (t)NULL)
+#endif /* !defined(lint) */
+
+
+/*
+** <ctype.h> usually includes \n, which is not what we want.
+*/
+#define ISWHITE(c) ((c) == ' ' || (c) == '\t')
+
+
+/*
+** Get the number of elements in a fixed-size array, or a pointer just
+** past the end of it.
+*/
+#define SIZEOF(array) ((int)(sizeof array / sizeof array[0]))
+#define ENDOF(array) (&array[SIZEOF(array)])
+
+
+/*
+** Get the length of a string constant.
+*/
+#define STRLEN(string) ((int)(sizeof string - 1))
+
+
+/*
+** Turn a TIMEINFO into a floating point number.
+*/
+#define TIMEINFOasDOUBLE(t) \
+ ((double)(t).time + ((double)(t).usec) / 1000000.0)
+
+
+/*
+** Get the size when binding an AF_UNIX socket.
+*/
+#if defined(DO_BIND_USE_SIZEOF)
+#define AF_UNIX_SOCKSIZE(S) (sizeof S)
+#else
+#define AF_UNIX_SOCKSIZE(S) (sizeof S.sun_family + strlen(S.sun_path) + 1)
+#endif /* defined(DO_BIND_USE_SIZEOF) */
+
+
+/*
+** Use a read or recv call to read a descriptor.
+*/
+#if defined(HAVE_UNIX_DOMAIN_SOCKETS)
+#define RECVorREAD(fd, p, s) recv((fd), (p), (s), 0)
+#else
+#define RECVorREAD(fd, p, s) read((fd), (p), (s))
+#endif /* defined(HAVE_UNIX_DOMAIN_SOCKETS) */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,517 @@
+/*
+ *
+ * The code for reading expire.ctl files (most of this file) was borrowed from innd
+ * Minor modifications to that code were made
+ */
+
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: readconfig.c,v 1.8 2003/10/22 18:50:15 rjs3 Exp $ */
+
+/* Copyright 1991 Rich Salz.
+ * All rights reserved.
+ *
+ * Redistribution and use in any form are permitted provided that the
+ * following restrictions are are met:
+ * 1. Source distributions must retain this entire copyright notice
+ * and comment.
+ * 2. Binary distributions must include the acknowledgement ``This
+ * product includes software developed by Rich Salz'' in the
+ * documentation or other materials provided with the
+ * distribution. This must not be represented as an endorsement
+ * or promotion without specific prior written permission.
+ * 3. The origin of this software must not be misrepresented, either
+ * by explicit claim or by omission. Credits must appear in the
+ * source and documentation.
+ * 4. Altered versions must be plainly marked as such in the source
+ * and documentation and must not be misrepresented as being the
+ * original software.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "macros.h"
+
+#include "xmalloc.h"
+#include "imclient.h"
+#include "imparse.h"
+#include "wildmat.h"
+
+#define NUM_STORAGE_CLASSES 100
+
+#define BOOL int
+#define FALSE (0)
+#define TRUE (1)
+#define STATIC static
+
+
+typedef struct _NEWSGROUP {
+ char *Name;
+ char *Rest;
+ unsigned long Last;
+ unsigned long Lastpurged;
+ /* These fields are new. */
+ time_t Keep;
+ time_t Default;
+ time_t Purge;
+ /* X flag => remove entire article when it expires in this group */
+ BOOL Poison;
+} NEWSGROUP;
+
+typedef struct _EXPIRECLASS {
+ time_t Keep;
+ time_t Default;
+ time_t Purge;
+ BOOL Missing;
+ BOOL ReportedMissing;
+} EXPIRECLASS;
+
+/*
+** Expire-specific stuff.
+*/
+#define MAGIC_TIME 49710.
+
+
+STATIC NEWSGROUP EXPdefault;
+STATIC int nGroups;
+STATIC int nGroups_alloc;
+STATIC time_t EXPremember;
+STATIC time_t Now;
+STATIC EXPIRECLASS EXPclasses[NUM_STORAGE_CLASSES];
+STATIC NEWSGROUP *Groups;
+
+STATIC int EXPverbose;
+/*
+** Split a line at a specified field separator into a vector and return
+** the number of fields found, or -1 on error.
+*/
+STATIC int EXPsplit(char *p, char sep, char **argv, int count)
+{
+ int i;
+
+ if (!p)
+ return 0;
+
+ while (*p == sep)
+ ++p;
+
+ if (!*p)
+ return 0;
+
+ if (!p)
+ return 0;
+
+ while (*p == sep)
+ ++p;
+
+ if (!*p)
+ return 0;
+
+ for (i = 1, *argv++ = p; *p; )
+ if (*p++ == sep) {
+ p[-1] = '\0';
+ for (; *p == sep; p++);
+ if (!*p)
+ return i;
+ if (++i == count)
+ /* Overflow. */
+ return -1;
+ *argv++ = p;
+ }
+ return i;
+}
+
+
+/*
+** Parse a number field converting it into a "when did this start?".
+** This makes the "keep it" tests fast, but inverts the logic of
+** just about everything you expect. Print a message and return FALSE
+** on error.
+*/
+STATIC BOOL EXPgetnum(int line, char *word, time_t *v, char *name)
+{
+ char *p;
+ BOOL SawDot;
+ double d;
+
+ if (caseEQ(word, "never")) {
+ *v = (time_t)0;
+ return TRUE;
+ }
+
+ /* Check the number. We don't have strtod yet. */
+ for (p = word; ISWHITE(*p); p++)
+ continue;
+ if (*p == '+' || *p == '-')
+ p++;
+ for (SawDot = FALSE; *p; p++)
+ if (*p == '.') {
+ if (SawDot)
+ break;
+ SawDot = TRUE;
+ }
+ else if (!isdigit( (int)*p))
+ break;
+ if (*p) {
+ (void)fprintf(stderr, "Line %d, bad `%c' character in %s field\n",
+ line, *p, name);
+ return FALSE;
+ }
+ d = atof(word);
+ if (d > MAGIC_TIME)
+ *v = (time_t)0;
+ else
+ *v = Now - (time_t)(d * 86400.);
+ return TRUE;
+}
+
+
+/*
+** Set the expiration fields for all groups that match this pattern.
+*/
+STATIC void EXPmatch(char *p, NEWSGROUP *v, char mod)
+{
+ NEWSGROUP *ngp;
+ int i;
+ BOOL negate;
+
+ negate = *p == '!';
+ if (negate)
+ p++;
+ for (ngp = Groups, i = nGroups; --i >= 0; ngp++)
+ {
+ if (negate ? !wildmat(ngp->Name, p) : wildmat(ngp->Name, p))
+ if (mod == 'a') {
+ /*|| (mod == 'm' && ngp->Rest[0] == NF_FLAG_MODERATED)
+ || (mod == 'u' && ngp->Rest[0] != NF_FLAG_MODERATED)) { */
+ ngp->Keep = v->Keep;
+ ngp->Default = v->Default;
+ ngp->Purge = v->Purge;
+ ngp->Poison = v->Poison;
+ if (EXPverbose > 4) {
+ (void)printf("%s", ngp->Name);
+ (void)printf(" %13.13s", ctime(&v->Keep) + 3);
+ (void)printf(" %13.13s", ctime(&v->Default) + 3);
+ (void)printf(" %13.13s", ctime(&v->Purge) + 3);
+ (void)printf(" (%s)\n", p);
+ }
+ }
+ }
+}
+
+/*
+** Parse the expiration control file. Return TRUE if okay.
+*/
+BOOL EXPreadfile(FILE *F)
+{
+ char *p;
+ int i;
+ int j;
+ int k;
+ char mod;
+ NEWSGROUP v;
+ BOOL SawDefault;
+ char buff[BUFSIZ];
+ char *fields[7];
+ char **patterns;
+
+ /* Scan all lines. */
+ EXPremember = -1;
+ SawDefault = FALSE;
+ patterns = NEW(char*, nGroups);
+ for (i = 0; i < NUM_STORAGE_CLASSES; i++)
+ EXPclasses[i].ReportedMissing = EXPclasses[i].Missing = TRUE;
+
+ for (i = 1; fgets(buff, sizeof buff, F) != NULL; i++) {
+ if ((p = strchr(buff, '\n')) == NULL) {
+ (void)fprintf(stderr, "Line %d too long\n", i);
+ return FALSE;
+ }
+ *p = '\0';
+ p = strchr(buff, '#');
+ if (p)
+ *p = '\0';
+ else
+ p = buff + strlen(buff);
+ while (--p >= buff) {
+ if (isspace((int)*p))
+ *p = '\0';
+ else
+ break;
+ }
+ if (buff[0] == '\0')
+ continue;
+ if ((j = EXPsplit(buff, ':', fields, SIZEOF(fields))) == -1) {
+ (void)fprintf(stderr, "Line %d too many fields\n", i);
+ return FALSE;
+ }
+
+ /* Expired-article remember line? */
+ if (EQ(fields[0], "/remember/")) {
+ if (j != 2) {
+ (void)fprintf(stderr, "Line %d bad format\n", i);
+ return FALSE;
+ }
+ if (EXPremember != -1) {
+ (void)fprintf(stderr, "Line %d duplicate /remember/\n", i);
+ return FALSE;
+ }
+ if (!EXPgetnum(i, fields[1], &EXPremember, "remember"))
+ return FALSE;
+ continue;
+ }
+
+ /* Storage class line? */
+ if (j == 4) {
+ j = atoi(fields[0]);
+ if ((j < 0) || (j > NUM_STORAGE_CLASSES)) {
+ fprintf(stderr, "Line %d bad storage class %d\n", i, j);
+ }
+
+ if (!EXPgetnum(i, fields[1], &EXPclasses[j].Keep, "keep")
+ || !EXPgetnum(i, fields[2], &EXPclasses[j].Default, "default")
+ || !EXPgetnum(i, fields[3], &EXPclasses[j].Purge, "purge"))
+ return FALSE;
+ /* These were turned into offsets, so the test is the opposite
+ * of what you think it should be. If Purge isn't forever,
+ * make sure it's greater then the other two fields. */
+ if (EXPclasses[j].Purge) {
+ /* Some value not forever; make sure other values are in range. */
+ if (EXPclasses[j].Keep && EXPclasses[j].Keep < EXPclasses[j].Purge) {
+ (void)fprintf(stderr, "Line %d keep>purge\n", i);
+ return FALSE;
+ }
+ if (EXPclasses[j].Default && EXPclasses[j].Default < EXPclasses[j].Purge) {
+ (void)fprintf(stderr, "Line %d default>purge\n", i);
+ return FALSE;
+ }
+ }
+ EXPclasses[j].Missing = FALSE;
+ continue;
+ }
+
+ /* Regular expiration line -- right number of fields? */
+ if (j != 5) {
+ (void)fprintf(stderr, "Line %d bad format\n", i);
+ return FALSE;
+ }
+
+ /* Parse the fields. */
+ if (strchr(fields[1], 'M') != NULL)
+ mod = 'm';
+ else if (strchr(fields[1], 'U') != NULL)
+ mod = 'u';
+ else if (strchr(fields[1], 'A') != NULL)
+ mod = 'a';
+ else {
+ (void)fprintf(stderr, "Line %d bad modflag\n", i);
+ return FALSE;
+ }
+ v.Poison = (strchr(fields[1], 'X') != NULL);
+ if (!EXPgetnum(i, fields[2], &v.Keep, "keep")
+ || !EXPgetnum(i, fields[3], &v.Default, "default")
+ || !EXPgetnum(i, fields[4], &v.Purge, "purge"))
+ return FALSE;
+ /* These were turned into offsets, so the test is the opposite
+ * of what you think it should be. If Purge isn't forever,
+ * make sure it's greater then the other two fields. */
+ if (v.Purge) {
+ /* Some value not forever; make sure other values are in range. */
+ if (v.Keep && v.Keep < v.Purge) {
+ (void)fprintf(stderr, "Line %d keep>purge\n", i);
+ return FALSE;
+ }
+ if (v.Default && v.Default < v.Purge) {
+ (void)fprintf(stderr, "Line %d default>purge\n", i);
+ return FALSE;
+ }
+ }
+
+ /* Is this the default line? */
+ if (fields[0][0] == '*' && fields[0][1] == '\0' && mod == 'a') {
+ if (SawDefault) {
+ (void)fprintf(stderr, "Line %d duplicate default\n", i);
+ return FALSE;
+ }
+ EXPdefault.Keep = v.Keep;
+ EXPdefault.Default = v.Default;
+ EXPdefault.Purge = v.Purge;
+ EXPdefault.Poison = v.Poison;
+ SawDefault = TRUE;
+ }
+
+ /* Assign to all groups that match the pattern and flags. */
+ if ((j = EXPsplit(fields[0], ',', patterns, nGroups)) == -1) {
+ (void)fprintf(stderr, "Line %d too many patterns\n", i);
+ return FALSE;
+ }
+ for (k = 0; k < j; k++)
+ EXPmatch(patterns[k], &v, mod);
+ }
+ DISPOSE(patterns);
+
+ return TRUE;
+}
+
+int ExpireExists(int num)
+{
+ if ((num<0) || (num>=nGroups))
+ return 1;
+
+ return 0;
+}
+
+time_t GetExpireTime(int num)
+{
+ return Groups[num].Default;
+}
+
+char *GetExpireName(int num)
+{
+ return Groups[num].Name;
+}
+
+int readconfig_init(void)
+{
+ Now = time(NULL);
+
+ nGroups = 0;
+ nGroups_alloc = 1000;
+ Groups=(NEWSGROUP *) malloc(sizeof(NEWSGROUP) * 1000);
+ if (Groups==NULL) fatal("Unable to alloc",0);
+
+ return 0;
+}
+
+void artificial_matchall(int days)
+{
+ NEWSGROUP ne;
+
+ ne.Default = Now - (time_t)(days * 86400.);
+ EXPmatch("*", &ne,'a');
+}
+
+#if 0 /* debugginf */
+void show_groups(void)
+{
+ int lup;
+
+ for (lup=0;lup<nGroups;lup++)
+ {
+ printf("name = %s\n",Groups[lup].Name);
+ printf("expires = %uld\n",Groups[lup].Keep);
+ printf("expires = %uld\n",Groups[lup].Default);
+ printf("expires = %uld\n",Groups[lup].Purge);
+
+ }
+
+}
+#endif /* 0 */
+
+/*
+ * Callback to deal with untagged LIST/LSUB data
+ */
+void
+callback_list(struct imclient *imclient,
+ void *rock,
+ struct imclient_reply *reply)
+{
+ char *s, *end;
+ char *mailbox, *attributes, *separator;
+ int c;
+
+ s = reply->text;
+
+ if (*s++ != '(') return;
+ end = strchr(s, ')');
+ if (!end) return;
+ attributes = s;
+ s = end;
+ *s++ = '\0';
+
+ if (*s++ != ' ') return;
+ if (*s == 'N') {
+ if (s[1] != 'I' || s[2] != 'L') return;
+ separator = "";
+ s += 3;
+ }
+ else if (*s == '\"') {
+ s++;
+ if (*s == '\\') s++;
+ separator = s++;
+ if (*s != '\"') return;
+ *s++ = '\0';
+ }
+
+ if (*s++ != ' ') return;
+ c = imparse_astring(&s, &mailbox);
+ if (c != '\0') return;
+
+ if ((strncasecmp(mailbox,"INBOX",5)!=0) && (strncasecmp(mailbox,"user.",5)!=0))
+ {
+
+ Groups[nGroups].Name = malloc( strlen(mailbox)+1);
+ strcpy(Groups[nGroups].Name, mailbox);
+ nGroups++;
+
+ if (nGroups >= nGroups_alloc)
+ {
+ nGroups_alloc +=1000;
+ Groups=(NEWSGROUP *) realloc(Groups, sizeof(NEWSGROUP) * nGroups_alloc);
+ if (Groups==NULL) fatal("Unable to alloc",0);
+ }
+
+ }
+
+ for (s = attributes; (end = strchr(s, ' '))!=NULL; s = end+1) {
+ *s = '\0';
+
+ }
+
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/readconfig.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,66 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: readconfig.h,v 1.4 2003/02/13 20:15:47 rjs3 Exp $ */
+
+#ifndef READCONFIG_H
+#define READCONFIG_H
+
+#include "macros.h"
+
+int EXPreadfile(FILE *F);
+
+int ExpireExists(int num);
+
+time_t GetExpireTime(int num);
+
+char *GetExpireName(int num);
+
+int readconfig_init(void);
+
+void artificial_matchall(int days);
+
+void
+callback_list(struct imclient *imclient,
+ void *rock,
+ struct imclient_reply *reply);
+
+#endif /* READCONFIG_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/remotepurge.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/remotepurge.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/remotepurge.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/netnews/remotepurge.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,760 @@
+/*
+ * Remotely purge old/too big articles
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: remotepurge.c,v 1.18 2003/02/13 20:15:47 rjs3 Exp $ */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <netinet/in.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <syslog.h>
+
+#include <pwd.h>
+
+#include "prot.h"
+
+#include "imparse.h"
+#include "imclient.h"
+#include "xmalloc.h"
+#include "exitcodes.h"
+
+#include "readconfig.h"
+
+#define SECS_IN_DAY (24*60*60)
+
+#define NOTFINISHED 0
+#define IMAP_OK 1
+#define IMAP_NO 2
+#define IMAP_BAD 3
+#define IMAP_EOF 4
+
+/* for statistical purposes */
+typedef struct mbox_stats_s {
+
+ int total; /* total including those deleted */
+ int total_bytes;
+ int deleted;
+ int deleted_bytes;
+
+} mbox_stats_t;
+
+typedef struct uid_list_s {
+
+ unsigned long *list;
+ int allocsize;
+ int size;
+
+} uid_list_t;
+
+/* globals for callback functions */
+int days = -1;
+int size = -1;
+int exact = -1;
+int pattern = -1;
+
+int current_mbox_exists = 0;
+
+int verbose = 0;
+static int noop = 0;
+char *username = NULL;
+char *authname = NULL;
+char *realm = NULL;
+
+struct imclient *imclient_conn;
+
+static int cmd_done;
+static char *cmd_resp = NULL;
+
+FILE *configstream;
+
+void spew(int level, const char *fmt, ...)
+{
+ va_list ap;
+ char buf[1024];
+
+ if (verbose < level) return;
+
+ va_start(ap, fmt);
+ vsnprintf(buf, sizeof buf, fmt, ap);
+ va_end(ap);
+
+ if (verbose) {
+ printf("%s\n", buf);
+ }
+ syslog(LOG_DEBUG, "%s", buf);
+}
+
+/* libcyrus makes us define this */
+void fatal(const char *s, int code)
+{
+ if (cmd_resp) {
+ syslog(LOG_ERR, "fatal error: %s (%s)", s, cmd_resp);
+ fprintf(stderr, "fatal error: %s (%s)\n", s, cmd_resp);
+ } else {
+ syslog(LOG_ERR, "fatal error: %s", s);
+ fprintf(stderr, "fatal error: %s\n", s);
+ }
+ exit(code);
+}
+
+/***********************
+ * Parse a mech list of the form: ... AUTH=foo AUTH=bar ...
+ *
+ * Return: string with mechs seperated by spaces
+ *
+ ***********************/
+
+typedef struct capabilies_s {
+
+ char *mechs;
+
+ /* 0 = false; 1 = true */
+ int starttls;
+ int logindisabled;
+
+} capabilities_t;
+
+
+
+static capabilities_t *parsecapabilitylist(char *str)
+{
+ char *tmp;
+ int num=0;
+ capabilities_t *ret=(capabilities_t *) xmalloc(sizeof(capabilities_t));
+ ret->mechs = (char *)xmalloc(strlen(str)+1);
+ ret->starttls=0;
+ ret->logindisabled=0;
+
+ /* check for stattls */
+ if (strstr(str,"STARTTLS")!=NULL) {
+ ret->starttls=1;
+ }
+
+ /* check for login being disabled */
+ if (strstr(str,"LOGINDISABLED")!=NULL) {
+ ret->logindisabled=1;
+ }
+
+ strcpy(ret->mechs,"");
+
+ while ((tmp=strstr(str,"AUTH="))!=NULL) {
+ char *end=tmp+5;
+ tmp+=5;
+
+ while(((*end)!=' ') && ((*end)!='\0'))
+ end++;
+
+ (*end)='\0';
+
+ /* add entry to list */
+ if (num>0)
+ strcat(ret->mechs," ");
+ strcat(ret->mechs, tmp);
+ num++;
+
+ /* reset the string */
+ str=end+1;
+ }
+
+ return ret;
+}
+
+/*
+ * IMAP command completion callback
+ */
+static void callback_capability(struct imclient *imclient,
+ void *rock,
+ struct imclient_reply *reply)
+
+{
+ char *s;
+ capabilities_t **caps = (capabilities_t **) rock;
+
+ s = reply->text;
+
+ *caps = parsecapabilitylist(s);
+}
+
+/*
+ * IMAP command completion callback
+ */
+static void
+callback_finish(struct imclient *imclient,
+ void *rock,
+ struct imclient_reply *reply)
+{
+ if (!strcmp(reply->keyword, "OK")) {
+ cmd_done = IMAP_OK;
+ } else if (!strcmp(reply->keyword, "NO")) {
+ cmd_resp = reply->text;
+ cmd_done = IMAP_NO;
+ }
+ else if (!strcmp(reply->keyword, "BAD")) {
+ cmd_resp = reply->text;
+ cmd_done = IMAP_BAD;
+ }
+ else if (!strcmp(reply->keyword, "EOF")) {
+ syslog(LOG_ERR, "connection closed prematurely");
+ cmd_done = IMAP_EOF;
+ }
+ else {
+ printf("Huh?\n");
+ cmd_done = IMAP_BAD;
+ }
+}
+
+/*
+ * Callback to deal with untagged LIST/LSUB data
+ */
+extern void
+callback_list(struct imclient *imclient,
+ void *rock,
+ struct imclient_reply *reply);
+
+
+void print_stats(mbox_stats_t *stats)
+{
+ syslog(LOG_INFO, "total messages considered %d deleted %d",
+ stats->total, stats->deleted);
+ printf("total messages \t\t %d\n",stats->total);
+ printf("deleted messages \t\t %d\n",stats->deleted);
+ printf("remaining messages\t\t %d\n\n",stats->total - stats->deleted);
+}
+
+static void
+callback_exists(struct imclient *imclient,
+ void *rock,
+ struct imclient_reply *reply)
+{
+ current_mbox_exists = reply->msgno;
+}
+
+static void
+callback_search(struct imclient *imclient,
+ void *rock,
+ struct imclient_reply *reply)
+{
+ uid_list_t *uids = (uid_list_t *) rock;
+ char *s;
+ unsigned long num;
+
+ s = reply->text;
+
+ while (isdigit((int) *s)) {
+ num = 0;
+
+ while ((*s!='\0') && (*s!=' '))
+ {
+ num = num*10 + (*s-'0');
+ s++;
+ }
+
+ if (uids->size >= uids->allocsize)
+ {
+ if (uids->allocsize) uids->allocsize *= 2;
+ else uids->allocsize = 250;
+
+ uids->list = xrealloc(uids->list,
+ sizeof(unsigned long) * uids->allocsize);
+ }
+
+ uids->list[uids->size] = num;
+ uids->size++;
+
+ if (*s == '\0') break;
+ s++;
+ }
+
+}
+
+static int send_delete(const char *mbox, const char *uidlist)
+{
+ imclient_send(imclient_conn, callback_finish, imclient_conn,
+ "UID STORE %a +FLAGS.SILENT (\\Deleted)", uidlist);
+ cmd_done = NOTFINISHED;
+ while (cmd_done == NOTFINISHED) {
+ imclient_processoneevent(imclient_conn);
+ }
+ if (cmd_done == IMAP_OK) return 0;
+ else if (cmd_done == IMAP_NO) {
+ syslog(LOG_ERR, "%s can't mark messages deleted: %s",
+ mbox, cmd_resp ? cmd_resp : "");
+ return -1;
+ }
+ else fatal("marking message deleted", EC_TEMPFAIL);
+}
+
+void mark_all_deleted(const char *mbox, uid_list_t *list, mbox_stats_t *stats)
+{
+ int i;
+ char buf[1024];
+ int pos;
+ unsigned long run_start;
+ int first_time;
+ unsigned long *A = list->list;
+ int r;
+
+ if (list->size == 0) return;
+
+ /* we send blocks of 500 or so characters */
+ i = 0;
+
+ pos = 0; first_time = 1;
+ run_start = A[i++];
+ r = 0;
+ for (; i < list->size && r == 0; i++) {
+ if (A[i] == A[i-1] + 1)
+ continue; /* continue this run */
+ if (first_time) {
+ first_time = 0;
+ } else {
+ buf[pos++] = ',';
+ }
+ if (run_start != A[i-1]) {
+ /* run contains more than one entry */
+ pos += sprintf(buf + pos, "%lu:%lu", run_start, A[i-1]);
+ } else {
+ /* singleton */
+ pos += sprintf(buf + pos, "%lu", A[i-1]);
+ }
+ if (pos > 500) {
+ r = send_delete(mbox, buf);
+ pos = 0; first_time = 1;
+ }
+ run_start = A[i];
+ }
+
+ if (!r) {
+ /* handle the last entry */
+ if (!first_time) {
+ buf[pos++] = ',';
+ }
+ if (run_start != A[i-1]) {
+ sprintf(buf + pos, "%lu:%lu", run_start, A[i-1]);
+ } else {
+ sprintf(buf + pos, "%lu", A[i-1]);
+ }
+
+ /* send out the last one */
+ send_delete(mbox, buf);
+
+ stats->deleted += list->size;
+ }
+}
+
+static char *month_string(int mon)
+{
+ switch(mon)
+ {
+ case 0: return "Jan";
+ case 1: return "Feb";
+ case 2: return "Mar";
+ case 3: return "Apr";
+ case 4: return "May";
+ case 5: return "Jun";
+ case 6: return "Jul";
+ case 7: return "Aug";
+ case 8: return "Sep";
+ case 9: return "Oct";
+ case 10: return "Nov";
+ case 11: return "Dec";
+ default: return "BAD";
+ }
+}
+
+/* we don't check what comes in on matchlen and maycreate, should we? */
+int purge_me(char *name, time_t when)
+{
+ mbox_stats_t stats;
+ char search_string[200];
+ static uid_list_t uidlist;
+ struct tm *my_tm;
+
+ if (when == 0) return 0;
+
+ my_tm = gmtime(&when);
+
+ snprintf(search_string,sizeof(search_string),
+ "BEFORE %d-%s-%d",
+ my_tm->tm_mday,
+ month_string(my_tm->tm_mon),
+ 1900+my_tm->tm_year);
+
+ if (noop) {
+ printf("%s: %s\n", name, search_string);
+ return 0;
+ }
+
+ memset(&stats, '\0', sizeof(mbox_stats_t));
+
+ spew(2, "%s selecting", name);
+
+ /* select mailbox */
+ imclient_addcallback(imclient_conn,
+ "EXISTS", CALLBACK_NUMBERED, callback_exists,
+ (void *)0, (char *)0);
+ imclient_send(imclient_conn, callback_finish, (void *)imclient_conn,
+ "%a %s", "SELECT", name);
+
+ cmd_done = NOTFINISHED;
+
+ while (cmd_done == NOTFINISHED) {
+ imclient_processoneevent(imclient_conn);
+ }
+
+ spew(2, "%s selecting", name);
+
+ if (cmd_done == IMAP_NO) {
+ syslog(LOG_ERR, "unable to select %s: %s", name, cmd_resp);
+ return 0;
+ } else if (cmd_done != IMAP_OK) {
+ fatal("selecting mailbox", EC_TEMPFAIL);
+ }
+
+ stats.total = current_mbox_exists;
+
+ spew(2, "%s exists %d", name, current_mbox_exists);
+
+ /* Only search if there are actually messages in the mailbox! */
+ if(current_mbox_exists) {
+ /* make out list of uids */
+ uidlist.size = 0; /* reset to 0 */
+
+ spew(3, "%s searching for messages %s", name, search_string);
+
+ imclient_addcallback(imclient_conn,
+ "SEARCH", 0, callback_search,
+ (void *)&uidlist, (char *)0);
+ imclient_send(imclient_conn, callback_finish, (void *)imclient_conn,
+ "UID SEARCH %a", search_string);
+
+
+ cmd_done = NOTFINISHED;
+ while (cmd_done == NOTFINISHED) {
+ imclient_processoneevent(imclient_conn);
+ }
+ if (cmd_done != IMAP_OK) {
+ fatal("UID Search failed", EC_TEMPFAIL);
+ }
+
+ if (uidlist.size > 0) {
+ mark_all_deleted(name, &uidlist, &stats);
+ }
+ }
+
+ after_search:
+ /* close mailbox */
+ imclient_send(imclient_conn, callback_finish, (void *)imclient_conn,
+ "CLOSE");
+
+ cmd_done = NOTFINISHED;
+ while (cmd_done == NOTFINISHED) {
+ imclient_processoneevent(imclient_conn);
+ }
+
+ if (cmd_done != IMAP_OK) {
+ fatal("unable to CLOSE mailbox", EC_TEMPFAIL);
+ }
+
+ if(current_mbox_exists) {
+ spew(1, "%s exists %d deleted %d",
+ name, current_mbox_exists, uidlist.size);
+ } else {
+ spew(1, "%s exists %d (skipped)",
+ name, current_mbox_exists, uidlist.size);
+ }
+
+ return 0;
+}
+
+
+
+int purge_all(void)
+{
+ int num = 0;
+ int ret = 0;
+
+ while (ret == 0) {
+ ret = ExpireExists(num);
+
+ if (ret == 0)
+ purge_me(GetExpireName(num), GetExpireTime(num));
+
+ num++;
+ }
+
+ return 0;
+}
+
+void do_list(char *matchstr)
+{
+ imclient_send(imclient_conn, callback_finish, (void *)imclient_conn,
+ "%a %s %s", "LIST", "*",
+ matchstr);
+
+ cmd_done = NOTFINISHED;
+
+ while (cmd_done == NOTFINISHED) {
+ imclient_processoneevent(imclient_conn);
+ }
+
+ if (cmd_done!=IMAP_OK) fatal("unable to LIST mailboxes", EC_TEMPFAIL);
+}
+
+/*
+ * What we were given on the command line might just be a path or might not have an extension etc...
+ */
+
+static char *parseconfigpath(char *str)
+{
+ char *ret;
+
+ /* if it ends with a '/' add expire.ctl */
+
+ if (str[strlen(str)-1] == '/')
+ {
+ ret = (char *) xmalloc(strlen(str)+strlen("expire.ctl")+1);
+ strcpy(ret,str);
+ strcat(ret,"expire.ctl");
+
+ return ret;
+ }
+
+ return str;
+}
+
+void remote_purge(char *configpath, char **matches)
+{
+ char *name;
+
+ imclient_addcallback(imclient_conn,
+ "LIST", 0, callback_list,
+ (void *)0, (char *)0);
+
+ if (matches[0]==NULL) {
+ syslog(LOG_WARNING, "matching all mailboxes for possible purge");
+ spew(1, "matching all mailboxes");
+
+ do_list("*");
+ } else {
+ while (matches[0]!=NULL) {
+ spew(0, "matching %s", matches[0]);
+ do_list(matches[0]);
+ matches++;
+ }
+ }
+
+ spew(1, "completed list");
+
+ if (configpath!=NULL) {
+ name = parseconfigpath(configpath);
+
+ configstream = fopen(name,"r");
+
+ if (configstream == NULL)
+ fatal("unable to open config file", EC_CONFIG);
+
+ EXPreadfile(configstream);
+ /* ret val */
+ } else {
+ artificial_matchall(days);
+ }
+
+ purge_all();
+}
+
+/* didn't give correct parameters; let's exit */
+void usage(void)
+{
+ printf("Usage: remotepurge [options] hostname [[match1] ... ]\n");
+ printf(" -p port : port to use\n");
+ printf(" -k # : minimum protection layer required\n");
+ printf(" -l # : max protection layer (0=none; 1=integrity; etc)\n");
+ printf(" -u user : authorization name to use\n");
+ printf(" -v : verbose\n");
+ printf(" -n : don't actually purge\n");
+ printf(" -m mech : SASL mechanism to use (\"login\" for LOGIN)\n");
+ printf(" -r realm : realm\n");
+
+ printf(" -e expire.ctl : use expire.ctl file (specify full path)\n");
+
+ printf(" -d days : purge all message <days> old\n");
+
+ exit(EC_USAGE);
+}
+
+int main(int argc, char **argv)
+{
+ char *mechanism=NULL;
+ char servername[1024];
+ char *expirectlfile = NULL;
+
+ int maxssf = 128;
+ int minssf = 0;
+ char c;
+
+ char *tls_keyfile="";
+ char *port = "imap";
+ int dotls=0;
+ int r;
+ capabilities_t *capabilitylist;
+
+ /* look at all the extra args */
+ while ((c = getopt(argc, argv, "d:vne:k:l:p:u:a:m:t:")) != EOF)
+ switch (c) {
+ case 'd':
+ days = atoi(optarg);
+ break;
+ case 'e':
+ expirectlfile = optarg;
+ break;
+ case 'v':
+ verbose++;
+ break;
+ case 'k':
+ minssf=atoi(optarg);
+ break;
+ case 'l':
+ maxssf=atoi(optarg);
+ break;
+ case 'p':
+ port = optarg;
+ break;
+ case 'u':
+ username = optarg;
+ break;
+ case 'm':
+ mechanism=optarg;
+ break;
+ case 'r':
+ realm=optarg;
+ break;
+ case 't':
+ dotls=1;
+ tls_keyfile=optarg;
+ break;
+ case 'n':
+ noop = 1;
+ break;
+ case '?':
+ default:
+ usage();
+ break;
+ }
+
+ if (optind >= argc) usage();
+
+
+ if ((days==-1) && (expirectlfile == NULL))
+ {
+ printf("Must specify expire.ctl file OR days old OR bytes large\n\n");
+ usage();
+ }
+
+ /* next to last arg is server name */
+ strncpy(servername, argv[optind], 1023);
+
+ r = imclient_connect (&imclient_conn, servername, port, NULL);
+
+ if (r!=0) {
+ fatal("imclient_connect()", EC_TEMPFAIL);
+ }
+
+ spew(0, "connected");
+
+ /* get capabilities */
+ imclient_addcallback(imclient_conn, "CAPABILITY", 0,
+ callback_capability, (void *) &capabilitylist,
+ (char *) 0);
+
+ imclient_send(imclient_conn, callback_finish, NULL,
+ "CAPABILITY");
+
+ cmd_done = 0;
+
+ while (cmd_done == 0) {
+ imclient_processoneevent(imclient_conn);
+ }
+
+ r = imclient_authenticate(imclient_conn,
+ capabilitylist->mechs,
+ "imap",
+ username,
+ minssf,
+ maxssf);
+
+ if (r!=0) {
+ fatal("imclient_authenticate()\n", EC_CONFIG);
+ }
+
+ spew(0, "authenticated");
+
+ readconfig_init();
+
+ remote_purge(expirectlfile, argv+(optind+1));
+
+ spew(0, "done");
+
+ exit(0);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+Makefile
+makedepend.log
+notifyd
+notifytest
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+/.cvsignore/1.2/Wed Oct 22 18:03:13 2003//Tcyrus-release-2-3-7
+/Makefile.in/1.7.2.3/Mon May 31 18:22:59 2004//Tcyrus-release-2-3-7
+/exitcodes.h/1.2/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+/notify_log.c/1.7/Wed Oct 22 18:50:16 2003//Tcyrus-release-2-3-7
+/notify_log.h/1.5/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+/notify_mailto.c/1.8.2.3/Thu Mar 30 16:08:56 2006//Tcyrus-release-2-3-7
+/notify_mailto.h/1.5/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+/notify_null.c/1.6/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+/notify_null.h/1.5/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+/notify_zephyr.c/1.4.4.1/Wed Dec 14 13:52:56 2005//Tcyrus-release-2-3-7
+/notify_zephyr.h/1.3/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+/notifyd.c/1.14.2.5/Wed Apr 13 15:43:36 2005//Tcyrus-release-2-3-7
+/notifyd.h/1.2/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+/notifytest.c/1.10/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+/version.h/1.2/Thu Feb 13 20:15:48 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/notifyd
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,113 @@
+# Makefile.in - notifyd makefile
+# $Id: Makefile.in,v 1.7.2.3 2004/05/31 18:22:59 ken3 Exp $
+# @configure_input@
+#
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+RANLIB = @RANLIB@
+
+INSTALL = @INSTALL@
+CYRUS_USER=@cyrus_user@
+CYRUS_GROUP=@cyrus_group@
+
+DEFS = @DEFS@ @LOCALDEFS@
+CPPFLAGS = -I.. -I$(srcdir)/../sieve -I$(srcdir)/../imap -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+service_path = @service_path@
+
+MAKEDEPEND = @MAKEDEPEND@
+
+NOTIFYD_LIBS = @NOTIFYD_LIBS@
+
+SERVICE=../master/service.o
+
+IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@
+IMAP_COM_ERR_LIBS = @IMAP_COM_ERR_LIBS@
+LIB_WRAP = @LIB_WRAP@
+LIBS = @ZEPHYR_LIBS@ @LIBS@ $(IMAP_COM_ERR_LIBS)
+DEPLIBS=../imap/mutex_fake.o ../imap/libimap.a ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+PURIFY=/usr/local/bin/purify
+PUREOPT=-best-effort
+
+all: notifyd
+
+install:
+ $(INSTALL) -m 755 notifyd $(DESTDIR)$(service_path)
+
+OBJS= notifyd.o notify_null.o notify_log.o notify_mailto.o notify_zephyr.o
+
+notifytest: notifytest.o
+ $(CC) $(LDFLAGS) -o notifytest \
+ notifytest.o $(DEPLIBS) $(IMAP_LIBS) $(LIBS) $(LIB_WRAP)
+
+notifyd: $(OBJS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o notifyd \
+ $(SERVICE) $(OBJS) $(DEPLIBS) $(IMAP_LIBS) $(LIBS) $(LIB_WRAP)
+
+notifyd.pure: $(OBJS) $(SERVICE)
+ $(PURIFY) $(PUREOPT) \
+ $(CC) $(LDFLAGS) -o notifyd.pure \
+ $(SERVICE) $(OBJS) $(DEPLIBS) $(IMAP_LIBS) $(LIBS) $(LIB_WRAP)
+
+clean:
+ rm -f notifyd notifytest *.o *.a *~ Makefile.bak makedepend.log
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ $<
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/exitcodes.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/exitcodes.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/exitcodes.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/exitcodes.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,86 @@
+/* exitcodes.h -- wrapper around sysextis.h
+ * $Id: exitcodes.h,v 1.2 2003/02/13 20:15:48 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* Sendmail has some weird ideas on what constitutes permenant failure. On
+ more than one occasion, we have gotten burned by this moving users around
+ through various inadvisable means, screwing up the mailboxes file,
+ whatever.
+
+ We don't want to fail out permenantly on things like EX_USAGE, EX_SOFTWARE,
+ etc., because that generally means someone was just screwing with the mail
+ store and we don't want to lose mail.
+
+ Instead, we map these EC_* codes to EX_* codes, thereby lying to Sendmail,
+ since we don't derive any benefit from Sendmail knowing what the error was.
+ We just want it to retry all the time anyway. This way, should sendmail's
+ behavior be different and we start deriving benefit from Sendmail knowing
+ stuff, we can easily change it back.
+
+ So other code uses the EC_* error, then we maybe change it to TEMPFAIL if
+ we don't agree on whether the error should be permenant or not.
+
+ Comments below stolen from sysexits.h. */
+
+#ifndef INCLUDED_EXITCODES_H
+#define INCLUDED_EXITCODES_H
+
+#include <sysexits.h>
+
+#define EC_OK 0 /* successful termination */
+
+#define EC_USAGE EX_TEMPFAIL /* command line usage error */
+#define EC_DATAERR EX_DATAERR /* data format error */
+#define EC_NOINPUT EX_TEMPFAIL /* cannot open input */
+#define EC_NOUSER EX_NOUSER /* addressee unknown */
+#define EC_NOHOST EX_TEMPFAIL /* host name unknown */
+#define EC_UNAVAILABLE EX_TEMPFAIL /* service unavailable */
+#define EC_SOFTWARE EX_TEMPFAIL /* internal software error */
+#define EC_OSERR EX_TEMPFAIL /* system error (e.g., can't fork) */
+#define EC_OSFILE EX_TEMPFAIL /* critical OS file missing */
+#define EC_CANTCREAT EX_TEMPFAIL /* can't create (user) output file */
+#define EC_IOERR EX_TEMPFAIL /* input/output error */
+#define EC_TEMPFAIL EX_TEMPFAIL /* user is invited to retry */
+#define EC_PROTOCOL EX_TEMPFAIL /* remote error in protocol */
+#define EC_NOPERM EX_TEMPFAIL /* permission denied */
+#define EC_CONFIG EX_TEMPFAIL /* configuration error */
+
+#endif /* INCLUDED_EXITCODES_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,80 @@
+/* notify_log.c -- syslog notification method
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notify_log.c,v 1.7 2003/10/22 18:50:16 rjs3 Exp $
+ */
+
+#include <config.h>
+
+#include "notify_log.h"
+
+#include <syslog.h>
+#include <string.h>
+#include <stdio.h>
+
+char* notify_log(const char *class, const char *priority,
+ const char *user, const char *mailbox,
+ int nopt, char **options,
+ const char *message)
+{
+ char opt_str[1024] = "";
+ char *sep = "";
+ int i;
+
+ if (nopt) {
+ strcpy(opt_str, "(");
+ for (i = 0; i < nopt; i++, sep = ", ") {
+ snprintf(opt_str+strlen(opt_str), sizeof(opt_str) - 2, "%s%s",
+ sep, options[i]);
+ }
+ strcat(opt_str, ")");
+ }
+
+/* Not needed, we opened the log file in cyrus_init */
+/* openlog("notifyd", LOG_PID, SYSLOG_FACILITY); */
+
+ syslog(LOG_INFO, "%s, %s, %s, %s, %s \"%s\"",
+ class, priority, user, mailbox, opt_str, message);
+ closelog();
+
+ return strdup("OK log notification successful");
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_log.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,56 @@
+/* notify_log.h -- syslog notification method
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notify_log.h,v 1.5 2003/02/13 20:15:48 rjs3 Exp $
+ */
+
+#ifndef _NOTIFY_LOG_H_
+#define _NOTIFY_LOG_H_
+
+#include <config.h>
+
+char* notify_log(const char *class, const char *priority,
+ const char *user, const char *mailbox,
+ int nopt, char **options,
+ const char *message);
+
+#endif /* _NOTIFY_LOG_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,160 @@
+/* notify_mailto.c -- email notification method
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notify_mailto.c,v 1.8.2.3 2006/03/30 16:08:56 murch Exp $
+ */
+
+#include <config.h>
+
+#include "notify_mailto.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include "global.h"
+#include "libconfig.h"
+#include "rfc822date.h"
+#include "sieve_interface.h"
+
+static int contains_8bit(const char *msg);
+
+static int global_outgoing_count = 0;
+
+char* notify_mailto(const char *class,
+ const char *priority __attribute__((unused)),
+ const char *user __attribute__((unused)),
+ const char *mailbox __attribute__((unused)),
+ int nopt, char **options,
+ const char *message)
+{
+ FILE *sm;
+ const char *smbuf[10];
+ char outmsgid[8192];
+ int sm_stat;
+ time_t t;
+ char datestr[80];
+ pid_t sm_pid;
+ int fds[2];
+
+ /* XXX check/parse options (mailto URI) */
+ if (nopt < 1)
+ return strdup("NO mailto URI not specified");
+
+ smbuf[0] = "sendmail";
+ smbuf[1] = "-i"; /* ignore dots */
+ smbuf[2] = "-f";
+ smbuf[3] = "<>"; /* XXX do we want a return-path? */
+ smbuf[4] = "--";
+ smbuf[5] = options[0];
+ smbuf[6] = NULL;
+
+ pipe(fds);
+ if ((sm_pid = fork()) == 0) {
+ /* i'm the child! run sendmail! */
+ close(fds[1]);
+ /* make the pipe be stdin */
+ dup2(fds[0], 0);
+ execv(config_getstring(IMAPOPT_SENDMAIL), (char **) smbuf);
+
+ /* if we're here we suck */
+ return strdup("NO mailto couldn't exec");
+ }
+ /* i'm the parent */
+ close(fds[0]);
+ sm = fdopen(fds[1], "w");
+
+ if (!sm)
+ return strdup("NO mailto could not spawn sendmail process");
+
+ t = time(NULL);
+ snprintf(outmsgid, sizeof(outmsgid), "<cmu-sieve-%u-%lu-%d@%s>",
+ sm_pid, t, global_outgoing_count++, config_servername);
+
+ fprintf(sm, "Message-ID: %s\r\n", outmsgid);
+
+ rfc822date_gen(datestr, sizeof(datestr), t);
+ fprintf(sm, "Date: %s\r\n", datestr);
+
+ fprintf(sm, "X-Sieve: %s\r\n", SIEVE_VERSION);
+ fprintf(sm, "From: Mail Sieve Subsystem <%s>\r\n", config_getstring(IMAPOPT_POSTMASTER));
+ fprintf(sm, "To: <%s>\r\n", options[0]);
+ fprintf(sm, "Subject: [%s] New mail notification\r\n", class);
+ if (contains_8bit(message)) {
+ fprintf(sm, "MIME-Version: 1.0\r\n");
+ fprintf(sm, "Content-Type: text/plain; charset=UTF-8\r\n");
+ fprintf(sm, "Content-Transfer-Encoding: 8BIT\r\n");
+ }
+ fprintf(sm, "\r\n");
+
+ fprintf(sm, "%s\r\n", message);
+
+ fclose(sm);
+ while (waitpid(sm_pid, &sm_stat, 0) < 0);
+
+ /* XXX check for sendmail exit code */
+
+ /* XXX add outmsgid to duplicate delivery database to prevent loop */
+
+ return strdup("OK mailto notification successful");
+}
+
+static int contains_8bit(const char * msg)
+{
+ int result = 0;
+
+ if (msg) {
+ const unsigned char *s = (const unsigned char *)msg;
+
+ while (*s) {
+ if (0 != (*s & 0x80)) {
+ result = 1;
+ break ;
+ }
+ s++;
+ }
+ }
+ return result;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_mailto.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+/* notify_mailto.h -- email notification method
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notify_mailto.h,v 1.5 2003/02/13 20:15:48 rjs3 Exp $
+ */
+
+#ifndef _NOTIFY_MAILTO_H_
+#define _NOTIFY_MAILTO_H_
+
+#include <config.h>
+
+/* the only option should be a mailto URI */
+char* notify_mailto(const char *class __attribute__((unused)),
+ const char *priority __attribute__((unused)),
+ const char *user __attribute__((unused)),
+ const char *mailbox __attribute__((unused)),
+ int nopt, char **options,
+ const char *message);
+
+#endif /* _NOTIFY_MAILTO_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,61 @@
+/* notify_null.c -- NULL notification method
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notify_null.c,v 1.6 2003/02/13 20:15:48 rjs3 Exp $
+ */
+
+#include <config.h>
+
+#include "notify_null.h"
+
+#include <string.h>
+
+char* notify_null(const char *class __attribute__((unused)),
+ const char *priority __attribute__((unused)),
+ const char *user __attribute__((unused)),
+ const char *mailbox __attribute__((unused)),
+ int nopt __attribute__((unused)),
+ char **options __attribute__((unused)),
+ const char *message __attribute__((unused)))
+{
+ return strdup("OK null notification successful");
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_null.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+/* notify_null.h -- NULL notification method
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notify_null.h,v 1.5 2003/02/13 20:15:48 rjs3 Exp $
+ */
+
+#ifndef _NOTIFY_NULL_H_
+#define _NOTIFY_NULL_H_
+
+#include <config.h>
+
+char* notify_null(const char *class __attribute__((unused)),
+ const char *priority __attribute__((unused)),
+ const char *user __attribute__((unused)),
+ const char *mailbox __attribute__((unused)),
+ int nopt __attribute__((unused)),
+ char **options __attribute__((unused)),
+ const char *message __attribute__((unused)));
+
+#endif /* _NOTIFY_NULL_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,154 @@
+/* notify_zephyr.c -- zephyr notification method
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notify_zephyr.c,v 1.4.4.1 2005/12/14 13:52:56 murch Exp $
+ */
+
+#include <config.h>
+
+#ifdef HAVE_ZEPHYR
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <netdb.h>
+#include <sys/types.h>
+#ifdef HAVE_KRB
+#include <netinet/in.h>
+#include <krb.h>
+#endif
+#include <zephyr/zephyr.h>
+#include <syslog.h>
+
+#include "xmalloc.h"
+
+#ifndef MAIL_CLASS
+#define MAIL_CLASS "MAIL"
+#endif
+
+#include "notify_zephyr.h"
+
+char* notify_zephyr(const char *class, const char *priority,
+ const char *user, const char *mailbox,
+ int nopt, char **options,
+ const char *message)
+{
+ ZNotice_t notice;
+ int retval;
+ char myhost[256],mysender[BUFSIZ];
+ char *msgbody;
+ char *lines[2];
+ char *mykrbhost = 0;
+
+ if (!*user) return strdup("NO zephyr recipient not specified");
+
+ if ((retval = ZInitialize()) != ZERR_NONE) {
+ syslog(LOG_ERR, "IOERROR: cannot initialize zephyr: %m");
+ return strdup("NO cannot initialize zephyr");
+ }
+
+ if (gethostname(myhost,sizeof(myhost)) == -1) {
+ syslog(LOG_ERR, "IOERROR: cannot get hostname: %m");
+ return strdup("NO zephyr cannot get hostname");
+ }
+ myhost[sizeof(myhost)-1] = '\0';
+
+#ifdef HAVE_KRB
+ mykrbhost = krb_get_phost(myhost);
+#endif
+
+ lines[0] = myhost;
+ msgbody = xmalloc(1000 + strlen(message));
+ lines[1] = msgbody;
+
+ strcpy(msgbody,"");
+
+ if (*mailbox) {
+ snprintf(msgbody,900, "You have new mail in %s.\n\n", mailbox);
+ }
+
+ if (*message) {
+ strcat(msgbody, message);
+ strcat(msgbody, "\n");
+ }
+
+ (void) snprintf(mysender, sizeof(mysender), "imap%s%s@%s",
+ mykrbhost ? "." : "",
+ mykrbhost ? mykrbhost : "",
+ ZGetRealm());
+
+ memset((char *)¬ice, 0, sizeof(notice));
+ notice.z_kind = UNSAFE;
+ notice.z_class = *class ? (char *) class : MAIL_CLASS;
+ notice.z_class_inst = *priority ? (char *) priority :
+ *mailbox ? (char *) mailbox : "INBOX";
+
+ notice.z_opcode = "";
+ notice.z_sender = mysender;
+ notice.z_default_format = "From Post Office $1:\n$2";
+
+ notice.z_recipient = (char *) user;
+
+ retval = ZSendList(¬ice,lines,2,ZNOAUTH);
+
+ /* do any additional users */
+ while (retval == ZERR_NONE && nopt) {
+ notice.z_recipient = (char *) options[--nopt];
+
+ retval = ZSendList(¬ice,lines,2,ZNOAUTH);
+ }
+
+ free(msgbody);
+
+ if (retval != ZERR_NONE) {
+ syslog(LOG_ERR, "IOERROR: cannot send zephyr notice: %m");
+ return strdup("NO cannot send zephyr notice");
+ }
+
+ return strdup("OK zephyr notification successful");
+}
+
+#endif /* HAVE_ZEPHYR */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notify_zephyr.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,57 @@
+/* notify_zephyr.h -- zephyr notification method
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notify_zephyr.h,v 1.3 2003/02/13 20:15:48 rjs3 Exp $
+ */
+
+#ifndef _NOTIFY_ZEPHYR_H_
+#define _NOTIFY_ZEPHYR_H_
+
+#include <config.h>
+
+/* the options should be a list of users to notify in addition to 'user' */
+char* notify_zephyr(const char *class, const char *priority,
+ const char *user, const char *mailbox,
+ int nopt, char **options,
+ const char *message);
+
+#endif /* _NOTIFY_ZEPHYR_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,270 @@
+/* notifyd.c -- main file for notifyd (notify script notification program)
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notifyd.c,v 1.14.2.5 2005/04/13 15:43:36 shadow Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/un.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <signal.h>
+#include <string.h>
+
+#include "notifyd.h"
+
+#include "exitcodes.h"
+#include "global.h"
+#include "libconfig.h"
+#include "xmalloc.h"
+
+
+/* global state */
+const int config_need_data = 0;
+
+static int soc = 0; /* master has handed us the port as stdin */
+
+static notifymethod_t *default_method; /* default method daemon is using */
+
+
+/* Cleanly shut down and exit */
+void shut_down(int code) __attribute__ ((noreturn));
+void shut_down(int code)
+{
+ cyrus_done();
+
+ /* done */
+ exit(code);
+}
+
+char *fetch_arg(char *head, char* tail)
+{
+ char *cp;
+
+ for (cp = head; *cp && cp < tail; cp++);
+ return (cp == tail ? NULL : cp + 1);
+}
+
+#define NOTIFY_MAXSIZE 8192
+
+int do_notify()
+{
+ struct sockaddr_un sun_data;
+ socklen_t sunlen = sizeof(sun_data);
+ char buf[NOTIFY_MAXSIZE+1], *cp, *tail;
+ int r, i;
+ char *method, *class, *priority, *user, *mailbox, *message;
+ char **options = NULL;
+ long nopt;
+ char *reply;
+ notifymethod_t *nmethod;
+
+ while (1) {
+ method = class = priority = user = mailbox = message = reply = NULL;
+ nopt = 0;
+
+ if (signals_poll() == SIGHUP) {
+ /* caught a SIGHUP, return */
+ return 0;
+ }
+ r = recvfrom(soc, buf, NOTIFY_MAXSIZE, 0,
+ (struct sockaddr *) &sun_data, &sunlen);
+ if (r == -1) {
+ return (errno);
+ }
+ buf[r] = '\0';
+
+ tail = buf + r - 1;
+
+ /*
+ * parse request of the form:
+ *
+ * method NUL class NUL priority NUL user NUL mailbox NUL
+ * nopt NUL N(option NUL) message NUL
+ */
+ method = (cp = buf);
+
+ if (cp) class = (cp = fetch_arg(cp, tail));
+ if (cp) priority = (cp = fetch_arg(cp, tail));
+ if (cp) user = (cp = fetch_arg(cp, tail));
+ if (cp) mailbox = (cp = fetch_arg(cp, tail));
+
+ if (cp) cp = fetch_arg(cp, tail); /* skip to nopt */
+ if (cp) nopt = strtol(cp, NULL, 10);
+ if (nopt < 0 || errno == ERANGE) cp = NULL;
+
+ if (cp && nopt &&
+ !(options = (char**) xrealloc(options, nopt * sizeof(char*)))) {
+ fatal("xmalloc(): can't allocate options", EC_OSERR);
+ }
+
+ for (i = 0; cp && i < nopt; i++) {
+ options[i] = (cp = fetch_arg(cp, tail));
+ }
+
+ if (cp) message = (cp = fetch_arg(cp, tail));
+
+ if (!message) {
+ syslog(LOG_ERR, "malformed notify request");
+ return 0;
+ }
+
+ if (!*method)
+ nmethod = default_method;
+ else {
+ nmethod = methods;
+ while (nmethod->name) {
+ if (!strcasecmp(nmethod->name, method)) break;
+ nmethod++;
+ }
+ }
+
+ syslog(LOG_DEBUG, "do_notify using method '%s'",
+ nmethod->name ? nmethod->name: "unknown");
+
+ if (nmethod->name) {
+ reply = nmethod->notify(class, priority, user, mailbox,
+ nopt, options, message);
+ }
+#if 0 /* we don't care about responses right now */
+ else {
+ reply = strdup("NO unknown notification method");
+ if (!reply) {
+ fatal("strdup failed", EC_OSERR);
+ }
+ }
+#endif
+
+ if (reply) free(reply);
+ }
+
+ /* never reached */
+ return 0;
+}
+
+
+void fatal(const char *s, int code)
+{
+ static int recurse_code = 0;
+
+ if (recurse_code) {
+ /* We were called recursively. Just give up */
+ exit(recurse_code);
+ }
+ recurse_code = code;
+
+ syslog(LOG_ERR, "Fatal error: %s", s);
+
+ shut_down(code);
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for notifyd!",
+ EC_SOFTWARE);
+}
+
+void usage(void)
+{
+ syslog(LOG_ERR, "usage: notifyd [-C <alt_config>]");
+ exit(EC_USAGE);
+}
+
+int service_init(int argc, char **argv, char **envp __attribute__((unused)))
+{
+ int opt;
+ char *method = "null";
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ while ((opt = getopt(argc, argv, "m:")) != EOF) {
+ switch(opt) {
+ case 'm':
+ method = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ default_method = methods;
+ while (default_method->name) {
+ if (!strcasecmp(default_method->name, method)) break;
+ default_method++;
+ }
+
+ if (!default_method) fatal("unknown notification method %s", EC_USAGE);
+
+ signals_set_shutdown(&shut_down);
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+int service_main(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ int r = 0;
+
+ r = do_notify();
+
+ shut_down(r);
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifyd.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,71 @@
+/* notifyd.h -- notification method definitions
+ * Ken Murchison
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: notifyd.h,v 1.2 2003/02/13 20:15:48 rjs3 Exp $
+ */
+
+#include <config.h>
+
+#include "notify_null.h"
+#include "notify_log.h"
+#include "notify_mailto.h"
+#include "notify_zephyr.h"
+
+/* Notify method dispatch table definition */
+typedef struct {
+ const char *name; /* name of the method */
+ char *(*notify)(const char *class, const char *priority,
+ const char *user, const char *mailbox,
+ int nopt, char **options,
+ const char *message); /* notification function */
+} notifymethod_t;
+
+/* array of supported notification methods */
+notifymethod_t methods[] = {
+ { "null", notify_null }, /* do nothing */
+ { "log", notify_log }, /* use syslog (for testing) */
+ { "mailto", notify_mailto }, /* send an email */
+#ifdef HAVE_ZEPHYR
+ { "zephyr", notify_zephyr }, /* send a zephyrgram */
+#endif
+ { NULL, NULL }
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifytest.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifytest.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifytest.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/notifytest.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,196 @@
+/* notifytest.c: notifyd test utility
+ * Ken Murchison
+ * Rob Siemborski
+ * $Id: notifytest.c,v 1.10 2003/02/13 20:15:48 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <errno.h>
+#include <pwd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/un.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#define MAX_OPT 10
+#define MAXSIZE 8192
+
+static int add_arg(char *buf, int max_size, const char *arg, int *buflen)
+{
+ const char *myarg = (arg ? arg : "");
+ int len = strlen(myarg) + 1;
+
+ if (*buflen + len > max_size) return -1;
+
+ strcat(buf+*buflen, myarg);
+ *buflen += len;
+
+ return 0;
+}
+
+static int notify(const char *notifyd_path, const char *method,
+ const char *class, const char *priority,
+ const char *user, const char *mailbox,
+ int nopt, char **options,
+ const char *message)
+{
+ int soc;
+ struct sockaddr_un sun;
+ char buf[MAXSIZE] = "", noptstr[20];
+ int buflen = 0;
+ int i, r = 0;
+
+ soc = socket(AF_UNIX, SOCK_DGRAM, 0);
+ if (soc == -1) {
+ perror("socket() ");
+ return -1;
+ }
+
+ memset((char *)&sun, 0, sizeof(sun));
+ sun.sun_family = AF_UNIX;
+ strncpy(sun.sun_path, notifyd_path, sizeof(sun.sun_path));
+
+ /*
+ * build request of the form:
+ *
+ * method NUL class NUL priority NUL user NUL mailbox NUL
+ * nopt NUL N(option NUL) NUL message NUL
+ */
+
+ r = add_arg(buf, MAXSIZE, method, &buflen);
+ if (!r) r = add_arg(buf, MAXSIZE, class, &buflen);
+ if (!r) r = add_arg(buf, MAXSIZE, priority, &buflen);
+ if (!r) r = add_arg(buf, MAXSIZE, user, &buflen);
+ if (!r) r = add_arg(buf, MAXSIZE, mailbox, &buflen);
+
+ snprintf(noptstr, sizeof(noptstr), "%d", nopt);
+ if (!r) r = add_arg(buf, MAXSIZE, noptstr, &buflen);
+
+ for (i = 0; !r && i < nopt; i++) {
+ r = add_arg(buf, MAXSIZE, options[i], &buflen);
+ }
+
+ if (!r) r = add_arg(buf, MAXSIZE, message, &buflen);
+
+ if (r) {
+ perror("dgram too big");
+ return -1;
+ }
+
+ r = sendto(soc, buf, buflen, 0, (struct sockaddr *) &sun, sizeof(sun));
+ if (r < buflen) {
+ perror("sendto() ");
+ return -1;
+ }
+
+ return 0;
+}
+
+int
+main(int argc, char *argv[])
+{
+ const char *method = "", *priority = "normal";
+ const char *class = "MESSAGE", *user = "", *mailbox = NULL;
+ const char *message = NULL, *path = NULL;
+ int c;
+ int flag_error = 0;
+
+ while ((c = getopt(argc, argv, "f:n:c:p:u:m:t:")) != EOF)
+ switch (c) {
+ case 'f':
+ path = optarg;
+ break;
+ case 'n':
+ method = optarg;
+ break;
+ case 'c':
+ class = optarg;
+ break;
+ case 'p':
+ priority = optarg;
+ break;
+ case 'u':
+ user = optarg;
+ break;
+ case 'm':
+ mailbox = optarg;
+ break;
+ case 't':
+ message = optarg;
+ break;
+ default:
+ flag_error = 1;
+ break;
+ }
+
+ if (!path || !message)
+ flag_error = 1;
+
+ if (flag_error) {
+ (void)fprintf(stderr,
+ "%s: usage: %s -f socket_path -t text [-n method]\n"
+ " [-c class] [-p priority]\n"
+ " [-u user] [-m mailbox]\n"
+ " [option ...]\n",
+ argv[0], argv[0]);
+ exit(1);
+ }
+
+ if ((argc - optind) > 10) {
+ fprintf(stderr,"too many options (> %d)\n", MAX_OPT);
+ exit(1);
+ }
+
+ if (!*user) user = getpwuid(getuid())->pw_name;
+
+ return notify(path, method, class, priority, user, mailbox,
+ argc - optind, argv+optind, message);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/version.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/version.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/version.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/notifyd/version.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,52 @@
+/* version.h: the version number
+ *
+ * $Id: version.h,v 1.2 2003/02/13 20:15:48 rjs3 Exp $
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#define _NOTIFYD_VERSION "0.9"
+
+#ifdef EXTRA_IDENT
+#define NOTIFYD_VERSION _NOTIFYD_VERSION "-" EXTRA_IDENT
+#else
+#define NOTIFYD_VERSION _NOTIFYD_VERSION
+#endif
+
+#define NOTIFYD_IDENT "Cyrus notifyd"
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Makefile
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/.cvsignore/1.1/Sun Jan 6 02:03:32 2002//Tcyrus-release-2-3-7
+/Makefile.in/1.14/Wed Oct 22 18:50:17 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+A D/imap////
+A D/sieve////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,145 @@
+# SIEVE Makefile for cyrus software
+# $Id: Makefile.in,v 1.14 2003/10/22 18:50:17 rjs3 Exp $
+#
+# @configure_input@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+SUBDIRS = @PERL_SUBDIRS@
+
+DEPSUBDIRS = @PERL_DEPSUBDIRS@
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+INSTALL = @INSTALL@
+
+# Note that we use the *dynamic* sasl libraries
+SASL_LIB=@LIB_DYN_SASL@
+SASL_INC=@DYNSASLFLAGS@
+OPENSSL_LIB=@OPENSSL_LIB@
+OPENSSL_INC=@OPENSSL_INC@
+BDB_LIB=@BDB_LIB@
+BDB_INC=@BDB_INC@
+
+LIB_RT=@LIB_RT@
+
+PERL=@PERL@
+
+SHELL = /bin/sh
+ at SET_MAKE@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+
+CC = @CC@
+PLMAKE = imap/Makefile
+
+all::
+ @for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" all "in" `pwd`; \
+ if [ -f Makefile.PL ]; then \
+ LIB_RT="$(LIB_RT)" \
+ BDB_LIB="$(BDB_LIB)" BDB_INC="$(BDB_INC)" \
+ OPENSSL_LIB="$(OPENSSL_LIB)" OPENSSL_INC="$(OPENSSL_INC)" \
+ SASL_LIB="$(SASL_LIB)" SASL_INC="$(SASL_INC)" CC="$(CC)" \
+ $(PERL) Makefile.PL PREFIX=$(prefix); \
+ fi; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \
+ done
+
+install::
+ @for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" install "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) install) || exit 1; \
+ done
+
+clean::
+ @-for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" clean "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) clean ; \
+ echo "### Done with" `pwd`); \
+ done
+
+distclean::
+ @-for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" clean "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) distclean ; \
+ echo "### Done with" `pwd`); \
+ done
+ rm -f Makefile Makefile.bak config.status config.log config.cache
+
+depend::
+ @if test "$(DEPSUBDIRS)" != "none"; then \
+ for d in $(DEPSUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" depend "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) depend) || exit 1; \
+ done; \
+ fi
+
+checkdepend::
+
+depend::
+ echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
+ echo 'w' >>eddep
+ cp Makefile Makefile.bak
+ ed -s Makefile < eddep
+ rm eddep
+ echo '' >> Makefile
+ echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
+ echo '# see make depend above' >> Makefile
+
+# DO NOT DELETE THIS LINE -- make depend uses it
+
+# The following rule ensures that "make depend" gets run at least
+# once before a "make all". The "depend" rule above removes
+# this rule from the Makefile the first time the "make depend"
+# has been run after the Makefile is generated by Configure
+
+checkdepend:: depend
+
+# IF YOU PUT STUFF HERE IT WILL GO AWAY
+# see make depend above
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+IMAP.bs
+IMAP.c
+Makefile
+blib
+cyradm
+pm_to_blib
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,12 @@
+/.cvsignore/1.1/Sun Jan 6 02:03:32 2002//Tcyrus-release-2-3-7
+/Changes/1.1/Wed May 3 17:30:54 2000//Tcyrus-release-2-3-7
+/IMAP.pm/1.19.2.4/Tue Feb 7 18:57:19 2006//Tcyrus-release-2-3-7
+/IMAP.xs/1.23.4.3/Tue Feb 7 18:57:20 2006//Tcyrus-release-2-3-7
+/MANIFEST/1.3/Thu Dec 7 22:40:24 2000//Tcyrus-release-2-3-7
+/Makefile.PL/1.17.2.1/Tue Feb 7 18:57:20 2006//Tcyrus-release-2-3-7
+/README/1.2.8.1/Fri Dec 19 18:33:50 2003//Tcyrus-release-2-3-7
+/cyradm.sh/1.13.2.6/Fri Mar 31 19:22:29 2006//Tcyrus-release-2-3-7
+/cyrperl.h/1.7/Thu Feb 13 20:15:49 2003//Tcyrus-release-2-3-7
+/typemap/1.2/Wed May 3 21:37:20 2000//Tcyrus-release-2-3-7
+/xsutil.c/1.5/Thu Feb 13 20:15:49 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+A D/Cyrus////
+A D/IMAP////
+A D/examples////
+A D/t////
+R D/Cyrus////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl/imap
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Changes
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Changes?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Changes (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Changes Sat Aug 26 02:00:13 2006
@@ -1,0 +1,26 @@
+Revision history for Perl extension IMAP::Cyrus.
+
+0.01 Mon Oct 18 11:24:14 1999
+ - original version; created by h2xs 1.19
+
+0.06 Fri Oct 29 13:45:46 1999
+ - imclient part complete, except for Perl wrapper for _send()
+
+0.85 Thu Nov 4 16:24:13 1999
+ - Perl wrapper for _authenticate(), does CAPABILITY call and works
+ around SASL bug
+ - wrapper for _send complete; doesn't handle sync literals, because
+ that requires imclient internals visible from Perl
+ - updated to Cyrus 1.6.19
+ - added &getselectinfo()
+ - tests are more comprehensive, no longer dependent on ECE
+
+0.86 Fri Nov 12 16:22:17 1999
+ - (partially) implemented IMAP::Cyrus::Shell
+ - split IMAP::Cyrus and IMAP::Cyrus::Admin
+
+0.95 Thu Dec 16 14:30:32 1999
+ - rewrite IMAP::Cyrus::Admin error handling to use an error method
+ instead of stealing $@; this also allows checking for errors when
+ routines can legitimately return undef/()
+ - wrapping it up, finalizing documentation, shell wrapper for cyradm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.pm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.pm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.pm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.pm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,429 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: IMAP.pm,v 1.19.2.4 2006/02/07 18:57:19 murch Exp $
+
+package Cyrus::IMAP;
+
+use strict;
+use vars qw($VERSION @ISA);
+
+require DynaLoader;
+
+ at ISA = qw(DynaLoader);
+$VERSION = '1.00';
+
+bootstrap Cyrus::IMAP $VERSION;
+
+use Carp;
+use IO::File;
+
+#
+# Wrapper for imclient__send(). Since the C version is a vargs routine which
+# parses a format string to determine its arguments, and there is no non-
+# varargs variant, we must do the varargs part in Perl (or reimplement
+# imclient_send() in Perl, which would be far more painful).
+#
+# * 'fmt' is a printf-like specification of the command. It must not
+# * include the tag--that is automatically added by imclient_send().
+# * The defined %-sequences are as follows:
+# *
+# * %% -- %
+# * %a -- atom
+# * %s -- astring (will be quoted or literalized as needed)
+# * %d -- decimal
+# * %u -- unsigned decimal
+# * %v -- #astring (arg is an null-terminated array of (char *)
+# * which are written as space separated astrings)
+# * %B -- (internal use only) base64-encoded data at end of command line
+#
+# @@@@@ we don't even try to deal with sync literals; we do the nonsync version
+# instead. fixing this requires access to the internals of the C imclient_send
+# implementation, or a vector-based interface to imclient_send.
+#
+sub send {
+ my ($self, $cb, $rock, $fmt, @rest) = @_;
+ my $res = '';
+ while ($fmt =~ /^([^%]*)%(.)(.*)$/s) {
+ $res .= $1;
+ if ($2 eq 'a') {
+ # atom
+ $res .= scalar shift(@rest);
+ }
+ elsif ($2 eq 'q') {
+ # qstring
+ $res .= $self->_qstringize(shift(@rest));
+ }
+ elsif ($2 eq 's') {
+ # astring
+ $res .= $self->_stringize(shift(@rest));
+ }
+ elsif ($2 eq 'd') {
+ # decimal
+ $res .= (0 + scalar shift(@rest));
+ }
+ elsif ($2 eq 'u') {
+ # unsigned decimal; perl cares not for C lossage...
+ $res .= (0 + scalar shift(@rest));
+ }
+ elsif ($2 eq 'v') {
+ # #astring
+ my $spc = '';
+ if (ref($rest[0]) =~ /(^|=)HASH($|\()/) {
+ my %vals = %{shift(@rest)};
+ foreach (keys %vals) {
+ $res .= $self->_stringize($_) . ' ' .
+ $self->_stringize($vals{$_}) . $spc;
+ $spc = ' ';
+ }
+ } else {
+ foreach (@{shift(@rest)}) {
+ $res .= $self->_stringize($_) . $spc;
+ $spc = ' ';
+ }
+ }
+ }
+ else {
+ # anything else (NB: we respect %B being labeled "internal only")
+ # NB: unlike the C version, we do not fail when handed an unknown escape
+ $res .= $2;
+ }
+ $fmt = $3;
+ }
+ $res .= $fmt;
+ $self->_send($cb, $rock, $res);
+}
+
+sub _cc {
+ my $res = 2;
+ local($^W) = 0;
+ if (length($_[0]) >= 1024) {
+ 0;
+ } else {
+ foreach (map {unpack 'C', $_} split(//, $_[0])) {
+ if ($_==0 || $_==10 || $_==13 || $_==34 || $_==92 || $_>=128) {
+ $res = 0;
+ }
+ elsif ($_<33 || $_==37 || $_==40 || $_==41 || $_==42 || $_==123) {
+ $res = 1 if $res == 2;
+ }
+ }
+ $res;
+ }
+}
+
+sub _qstringize {
+ my ($self, $str) = @_;
+ my $res;
+ my $cc = _cc($str);
+
+ if ($cc) {
+ # would be needed except imclient devolves to a LITERAL in this case.
+ #$str =~ s/([\\\"])/\\$1/g;
+ '"' . $str . '"';
+ }
+ else {
+ # right now we assume LITERAL+ on the part of the server, since
+ # we have no better way of dealing with literals.
+ # sorry!
+ "{" . length($str) . "+}\r\n" . $str;
+ }
+}
+
+sub _stringize {
+ my ($self, $str) = @_;
+ my $res;
+ my $cc = _cc($str);
+ my $nz = ($str ne '');
+
+ if ($nz && $cc == 2) {
+ $str;
+ }
+ elsif ($cc) {
+ # would be needed except imclient devolves to a LITERAL in this case.
+ #$str =~ s/([\\\"])/\\$1/g;
+ '"' . $str . '"';
+ }
+ else {
+ # right now we assume LITERAL+ on the part of the server, since
+ # we have no better way of dealing with literals.
+ # sorry!
+ "{" . length($str) . "+}\r\n" . $str;
+ }
+}
+
+#
+# As with send, authenticate needs a wrapper. This is primarily a workaround
+# for a SASL bug (or so I'm informed) with PLAIN authentication; however, we
+# also take the opportunity to add a hash-based interface.
+#
+sub authenticate {
+ my ($self, $first) = @_;
+ my (%opts, $rc);
+ my ($starttls, $logindisabled, $availmechs) = (0, 0, "");
+
+ if (defined $first &&
+ $first =~ /^-\w+|Mechanism|Service|Authz|User|Minssf|Maxssf|Password|Tlskey|Notls|CAfile|CApath$/) {
+ (undef, %opts) = @_;
+ foreach (qw(mechanism service authz user minssf maxssf password tlskey notls)) {
+ $opts{'-' . $_} = $opts{ucfirst($_)} if !defined($opts{'-' . $_});
+ }
+ } else {
+ (undef, $opts{-mechanism}, $opts{-service}, $opts{-authz}, $opts{-user},
+ $opts{-minssf}, $opts{-maxssf}, $opts{-password},
+ $opts{-tlskey}, $opts{-notls}, $opts{-cafile}, $opts{-capath}) = @_;
+ }
+
+ $opts{-service} = "imap" if !defined($opts{-service});
+ $opts{-minssf} = 0 if !defined($opts{-minssf});
+ $opts{-maxssf} = 10000 if !defined($opts{-maxssf});
+ $opts{-user} = $ENV{USER} || $ENV{LOGNAME} || (getpwuid($<))[0]
+ if !defined($opts{-user});
+ $opts{-authz} = "" if (!defined($opts{-authz}));
+ $rc = 0;
+
+ # Fetch all relevent capabilities
+ $self->addcallback({-trigger => 'CAPABILITY',
+ -callback => sub {my %a = @_;
+ map {
+ $starttls = 1
+ if /^STARTTLS$/i;
+ $logindisabled = 1
+ if /^LOGINDISABLED$/i;
+ $availmechs .= $_ . ' '
+ if s/^AUTH=//;
+ }
+ split(/ /, $a{-text})}});
+ $self->send(undef, undef, 'CAPABILITY');
+
+ $opts{-mechanism} = $availmechs if !defined($opts{-mechanism});
+
+ # Do STARTTLS if given a TLS key, OR
+ # if the specified SASL mech isn't available and LOGINDISABLED
+ if (defined($opts{-tlskey}) ||
+ (!($availmechs =~ /(\b|^)$opts{-mechanism}($|\b)/i) && $logindisabled)) {
+ if (!havetls() || !$starttls) {
+ if ($logindisabled) {
+ warn "Login disabled.\n"
+ } else {
+ warn "TLS disabled.\n";
+ }
+ return undef;
+ }
+
+ if (!defined($opts{-tlskey})) {
+ $opts{-tlskey} = "";
+ }
+ if (!defined($opts{-cafile})) {
+ $opts{-cafile} = "";
+ }
+ if (!defined($opts{-capath})) {
+ $opts{-capath} = "";
+ }
+ if ($opts{-notls}) {
+ $opts{-tlskey} = undef;
+ }
+
+ if (defined($opts{-tlskey})) {
+ $self->_starttls($opts{-tlskey}, $opts{-tlskey}, $opts{-cafile}, $opts{-capath});
+
+ # Refetch all relevent capabilities
+ ($starttls, $logindisabled, $availmechs) = (0, 0, "");
+ $self->send(undef, undef, 'CAPABILITY');
+
+ $opts{-mechanism} = $availmechs if ($opts{-mechanism} eq '');
+ }
+ }
+
+ $self->addcallback({-trigger => 'CAPABILITY'});
+
+ if (lc($opts{-mechanism}) ne 'login') {
+ # This seems to be the only way to avoid a
+ # `Use of uninitialized value in subroutine entry' warning with perl -w
+ # when $opts{-password} is uninitialized (which may well be ok for e.g.
+ # the GSSAPI mechanism).
+ no warnings 'uninitialized';
+ $rc = $self->_authenticate($opts{-mechanism}, $opts{-service},
+ $opts{-authz}, $opts{-user}, $opts{-password},
+ $opts{-minssf}, $opts{-maxssf});
+ }
+
+ if (!$rc && $logindisabled) {
+ warn "Login disabled.\n";
+ return undef;
+ }
+
+ $opts{-mechanism} ||= 'plain';
+ if (!$rc && $opts{-mechanism} =~ /(\b|^)(plain|login)($|\b)/i) {
+ $opts{-user} = getlogin if !defined($opts{-user});
+ $opts{-user} = (getpwuid($<))[0] if !defined($opts{-user});
+ $opts{-user} = "nobody" if !defined($opts{-user});
+ # claimed to be a SASL bug: "AUTHENTICATE PLAIN" fails. in any case, we
+ # also should provide a way to talk to pre-SASL Cyrus or even (shock
+ # horror) non-Cyrus IMAP servers...
+ # suck...
+ if (!defined($opts{-password})) {
+ my $tty = (IO::File->new('/dev/tty', O_RDWR) ||
+ *STDERR || *STDIN || *STDOUT);
+ $tty->autoflush(1);
+ $tty->print("IMAP Password: ");
+ my $ostty;
+ chomp($ostty = `stty -g`);
+ system "stty -echo -icanon min 1 time 0 2>/dev/null || " .
+ "stty -echo cbreak";
+ chomp($opts{-password} = $tty->getline);
+ $tty->print("\013\010");
+ system "stty $ostty";
+ }
+ my ($kw, $text) = $self->send(undef, undef, 'LOGIN %s %s',
+ $opts{-user}, $opts{-password});
+ $opts{-password} = "\0" x length($opts{-password});
+ if ($kw eq 'OK') {
+ $rc = 1;
+ } else {
+ $rc = undef;
+ carp "$text";
+ }
+ }
+ $rc;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Cyrus::IMAP - Interface to Cyrus imclient library
+
+=head1 SYNOPSIS
+
+ use Cyrus::IMAP;
+
+ my $client = Cyrus::IMAP->new('mailhost'[, $flags]);
+ $flags = Cyrus::IMAP::CONN_NONSYNCLITERAL;
+
+ ($server, $mailbox) = Cyrus::IMAP->fromURL($url);
+ $url = Cyrus::IMAP->toURL($server, $mailbox);
+
+ $client->setflags($flags);
+ $client->clearflags(Cyrus::IMAP::CONN_INITIALRESPONSE);
+ $flags = $client->flags;
+ $server = $client->servername;
+ $client->authenticate;
+ $flags = Cyrus::IMAP::CALLBACK_NUMBERED || Cyrus::IMAP::CALLBACK_NOLITERAL;
+ $client->addcallback({-trigger => $str, -flags => $flags,
+ -callback => \&cb, -rock => \$var}, ...);
+ $client->send(\&callback, \&cbdata, $format, ...);
+ $client->processoneevent;
+ ($result, $text) = $client->send(undef, undef, $format, ...);
+ ($fd, $writepending) = $client->getselectinfo;
+
+=head1 DESCRIPTION
+
+The Cyrus::IMAP module provides an interface to the Cyrus B<imclient>
+library. These are primarily useful for implementing B<cyradm> operations
+within a Perl script; there are easier ways to implement general client
+operations, although they may be more limited in terms of authentication
+options when talking to a Cyrus imapd.
+
+In the normal case, one will attach to a Cyrus server and authenticate
+using the best available method:
+
+ my $client = Cyrus::IMAP::new('imap');
+ $client->authenticate;
+ if (!$client->send('', '', 'CREATE %s', 'user.' . $username)) {
+ warn "createmailbox user.$username: $@";
+ }
+
+In simple mode as used above, C<send()> is invoked with C<undef>, C<0>, or
+C<''> for the callback and rock (callback data) arguments; it returns a list
+of C<($result, $text)> from the command. If invoked in scalar context, it
+returns C<$result> and places C<$text> in C<$@>. In this mode, there is no
+need to use C<processoneevent()>. If more control is desired, use the callback
+and rock arguments and invoke C<processoneevent()> regularly to receive
+results from the IMAP server. If still more control is needed, the
+C<getselectinfo()> method returns a list containing a file descriptor (I<not>
+Perl filehandle) which can be passed to select(); if the second element of the
+list is true, you should include it in the write mask as well as the read mask
+because the B<imclient> library needs to perform queued output.
+
+For more information, consult the Cyrus documentation.
+
+=head1 NOTES
+
+C<send()> behaves as if the C<Cyrus::IMAP::CONN_NONSYNCLITERAL> flag is always
+set. This is because it is a wrapper for the C version, which cannot be made
+directly available from Perl, and synchronous literals require interaction
+with the IMAP server while parsing the format string. This is planned to be
+fixed in the future.
+
+The C<'LOGIN'> mechanism can be used to authenticate with a plaintext username
+and password. This is intended as a workaround for a bug in early SASL
+implementations; use of Cyrus::IMAP with non-Cyrus servers is not recommended,
+primarily because there are easier ways to implement IMAP client functionality
+in Perl. (However, if you need SASL support, C<Cyrus::IMAP> is currently the
+only way to get it.)
+
+The file descriptor returned by C<getselectinfo()> should not be used for
+anything other than C<select()>. In particular, I/O on the file descriptor
+will almost certainly cause more problems than whatever problem you think
+you are trying to solve.
+
+The B<toURL> and B<fromURL> routines are to ease conversion between URLs and
+IMAP mailbox and server combinations, and are a simple frontend for the
+libcyrus functions of the same name.
+
+The B<imparse> library routines are not implemented, because they are little
+more than a (failed) attempt to make parsing as simple in C as it is in Perl.
+
+This module exists primarily so we can integrate Cyrus administration into
+our Perl-based account management system, and secondarily so that we can
+rewrite B<cyradm> in a sensible language instead of Tcl. Usability for other
+purposes is not guaranteed.
+
+=head1 AUTHORs
+
+Brandon S. Allbery <allbery at ece.cmu.edu>, Rob Siemborski <rjs3+ at andrew.cmu.edu>
+
+=head1 SEE ALSO
+
+Cyrus::IMAP::Admin
+perl(1), cyradm(1), imclient(3), imapd(8).
+
+=cut
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.xs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.xs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.xs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP.xs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,743 @@
+/*
+ * Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: IMAP.xs,v 1.23.4.3 2006/02/07 18:57:20 murch Exp $ */
+
+/*
+ * Perl interface to the Cyrus imclient routines. This enables the
+ * use of Perl to implement Cyrus utilities, in particular imtest and cyradm.
+ */
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#include <pwd.h>
+#include <unistd.h>
+
+#include "imclient.h"
+#include "imapurl.h"
+#include "xmalloc.h"
+
+#include "cyrperl.h"
+#include "config.h"
+
+typedef struct xscyrus *Cyrus_IMAP;
+
+/* Perl pre-5.6.0 compatibility */
+#ifndef aTHX_
+#define aTHX_
+#endif
+
+/*
+ * This is the code from xsutil.c
+ */
+
+/* hack, since libcyrus apparently expects fatal() to exist */
+void fatal(const char *s, int exit)
+{
+ croak(s);
+}
+
+/*
+ * Decrement the refcounts of the Perl SV's in the passed rock, then free the
+ * rock. This cleans up a callback.
+ */
+
+void imclient_xs_callback_free(struct xsccb *rock)
+{
+ struct xscb *xcb;
+
+ if (rock) {
+ /* find the destructor-cleanup version and nuke its record */
+ for (xcb = rock->client->cb; xcb; xcb = xcb->next) {
+ if (xcb->rock == rock) break;
+ }
+ if (xcb) {
+ if (xcb->prev)
+ xcb->prev->next = xcb->next;
+ else
+ rock->client->cb = xcb->next;
+ if (xcb->next) xcb->next->prev = xcb->prev;
+ if (xcb->name) safefree(xcb->name);
+ safefree(xcb);
+ }
+ /* if (rock->pcb) SvREFCNT_dec(rock->pcb); */
+ /* if (rock->prock) SvREFCNT_dec(rock->prock); */
+ safefree(rock);
+ }
+}
+
+/*
+ * Invoke a Perl callback on behalf of a Cyrus callback. This requires some
+ * silliness to adapt what we're passed to Perl conventions; specifically,
+ * the reply struct becomes a hash (passed as a list).
+ */
+
+void imclient_xs_cb(struct imclient *client, struct xsccb *rock,
+ struct imclient_reply *reply)
+{
+ dSP;
+ dTARG;
+ SV* rv;
+
+ /* push our args onto Perl's stack */
+ ENTER;
+ SAVETMPS;
+ PUSHMARK(SP);
+ XPUSHs(sv_2mortal(newSVpv("-client", 0)));
+ rv = newSVsv(&sv_undef);
+ sv_setref_pv(rv, NULL, (void *) rock->client);
+ XPUSHs(rv);
+ if (rock->prock != &sv_undef) {
+ XPUSHs(sv_2mortal(newSVpv("-rock", 0)));
+ XPUSHs(sv_mortalcopy(rock->prock));
+ }
+ XPUSHs(sv_2mortal(newSVpv("-keyword", 0)));
+ XPUSHs(sv_2mortal(newSVpv(reply->keyword, 0)));
+ XPUSHs(sv_2mortal(newSVpv("-text", 0)));
+ XPUSHs(sv_2mortal(newSVpv(reply->text, 0)));
+ if (reply->msgno != -1) {
+ char tmp[100];
+ XPUSHs(sv_2mortal(newSVpv("-msgno", 0)));
+ sprintf(tmp,"%d",reply->msgno);
+ XPUSHs(sv_2mortal(newSVpv(tmp, 0)));
+ }
+ PUTBACK;
+ /* invoke Perl */
+ perl_call_sv(rock->pcb, G_VOID|G_DISCARD);
+ FREETMPS;
+ SPAGAIN;
+ LEAVE;
+ /* clean up */
+ if (rock->autofree) imclient_xs_callback_free(rock);
+}
+
+/*
+ * Callback used when ::_send is invoked without a callback. The "prock" is an
+ * AV, which is set to the contents of the imclient_reply; this is detected in
+ * ::_send, which is calling imclient_processoneevent() repeatedly. (This
+ * simulates a non-callback-based invocation, for trivial clients.)
+ */
+void imclient_xs_fcmdcb(struct imclient *client, struct xsccb *rock,
+ struct imclient_reply *reply)
+{
+ AV *av;
+
+ /* SvREFCNT_dec(SvRV(rock->prock)); */
+ SvRV(rock->prock) = (SV *) (av = newAV());
+ /* sv_setsv(rock->prock, sv_2mortal(newRV_inc((SV *) (av = newAV())))); */
+ av_push(av, sv_2mortal(newSVpv(reply->keyword, 0)));
+ av_push(av, sv_2mortal(newSVpv(reply->text, 0)));
+ if (reply->msgno != -1) av_push(av, sv_2mortal(newSViv(reply->msgno)));
+ /* clean up */
+ if (rock->autofree) imclient_xs_callback_free(rock);
+}
+
+static int get_username(void *context, int id,
+ const char **result, unsigned *len) {
+ Cyrus_IMAP text = (Cyrus_IMAP)context;
+ if(id == SASL_CB_AUTHNAME) {
+ if(len) *len = strlen(text->authname);
+ *result = text->authname;
+ return SASL_OK;
+ } else if (id == SASL_CB_USER) {
+ if(text->username) {
+ if(len) *len = strlen(text->username);
+ *result = text->username;
+ } else {
+ if(len) *len = 0;
+ *result = "";
+ }
+ return SASL_OK;
+ }
+ return SASL_FAIL;
+}
+
+static int get_password(sasl_conn_t *conn, void *context, int id,
+ sasl_secret_t **psecret) {
+ Cyrus_IMAP text = (Cyrus_IMAP)context;
+ if(id != SASL_CB_PASS) return SASL_FAIL;
+ if(!text->password) {
+ char *ptr;
+ /* Using fprintf because printf won't flush under perl 5.8.0 for some
+ * reason */
+ fprintf(stdout, "Password: ");
+ fflush(stdout);
+ ptr = getpass("");
+ text->password = safemalloc(sizeof(sasl_secret_t) + strlen(ptr));
+ text->password->len = strlen(ptr);
+ strncpy(text->password->data, ptr, text->password->len);
+ }
+ *psecret = text->password;
+ return SASL_OK;
+}
+
+/* callbacks we support */
+static const sasl_callback_t sample_callbacks[NUM_SUPPORTED_CALLBACKS] = {
+ { SASL_CB_USER, get_username, NULL },
+ { SASL_CB_AUTHNAME, get_username, NULL },
+ { SASL_CB_PASS, get_password, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+MODULE = Cyrus::IMAP PACKAGE = Cyrus::IMAP
+PROTOTYPES: ENABLE
+
+int
+CONN_NONSYNCLITERAL()
+CODE:
+ RETVAL = IMCLIENT_CONN_NONSYNCLITERAL;
+OUTPUT:
+ RETVAL
+
+int
+CONN_INITIALRESPONSE()
+CODE:
+ RETVAL = IMCLIENT_CONN_INITIALRESPONSE;
+OUTPUT:
+ RETVAL
+
+int
+CALLBACK_NUMBERED()
+CODE:
+ RETVAL = CALLBACK_NUMBERED;
+OUTPUT:
+ RETVAL
+
+int
+CALLBACK_NOLITERAL()
+CODE:
+ RETVAL = CALLBACK_NOLITERAL;
+OUTPUT:
+ RETVAL
+
+MODULE = Cyrus::IMAP PACKAGE = Cyrus::IMAP PREFIX=imclient_
+PROTOTYPES: ENABLE
+
+SV *
+imclient_new(class, host = "localhost", port = 0, flags = 0)
+ char *class;
+ char *host
+ char *port
+ int flags;
+PREINIT:
+ struct imclient *client;
+ int rc;
+ SV *bang;
+ Cyrus_IMAP rv;
+ int i;
+CODE:
+ /* Allocate and setup the return value */
+ rv = safemalloc(sizeof *rv);
+
+ rv->authenticated = 0;
+
+ memcpy(rv->callbacks, sample_callbacks, sizeof(sample_callbacks));
+
+ /* Setup respective contexts */
+ for(i=0; i < NUM_SUPPORTED_CALLBACKS; i++) {
+ rv->callbacks[i].context = rv;
+ }
+
+ /* Connect */
+ rc = imclient_connect(&client, host, port, rv->callbacks);
+ switch (rc) {
+ case -1:
+ Perl_croak(aTHX_ "imclient_connect: unknown host \"%s\"", host);
+ safefree(rv);
+ break;
+ case -2:
+ Perl_croak(aTHX_ "imclient_connect: unknown service \"%s\"", port);
+ safefree(rv);
+ break;
+ case 0:
+ if (client) {
+ rv->class = safemalloc(strlen(class) + 1);
+ strcpy(rv->class, class);
+ rv->username = rv->authname = NULL;
+ rv->password = NULL;
+ rv->imclient = client;
+ imclient_setflags(client, flags);
+ rv->flags = flags;
+ rv->cb = 0;
+ rv->cnt = 1;
+ break;
+ }
+ /*FALLTHROUGH*/
+ default:
+ bang = perl_get_sv("^E", TRUE);
+ sv_setiv(bang, rc);
+ XSRETURN_UNDEF;
+ }
+ ST(0) = sv_newmortal();
+ /* fprintf(stderr, "!NEW %p %s\n", rv, class); */
+ sv_setref_pv(ST(0), class, (void *) rv);
+
+void
+imclient_DESTROY(client)
+ Cyrus_IMAP client
+PREINIT:
+ struct xscb *nx;
+CODE:
+/* fprintf(stderr, "!DESTROY %p %d\n", client, client->cnt); */
+ if (!--client->cnt) {
+/* printf("closing\n"); */
+ imclient_close(client->imclient);
+ while (client->cb) {
+ nx = client->cb->next;
+ if (client->cb->name) safefree(client->cb->name);
+ /* if (client->cb->rock->pcb) SvREFCNT_dec(client->cb->rock->pcb); */
+ /* if (client->cb->rock->prock) SvREFCNT_dec(client->cb->rock->prock); */
+ safefree(client->cb->rock);
+ client->cb = nx;
+ }
+ safefree(client->password);
+ safefree(client->class);
+ safefree(client);
+ }
+
+void
+imclient_setflags(client, flags)
+ Cyrus_IMAP client
+ int flags
+PPCODE:
+ imclient_setflags(client->imclient, flags);
+ client->flags |= flags;
+
+void
+imclient_clearflags(client, flags)
+ Cyrus_IMAP client
+ int flags
+PPCODE:
+ imclient_clearflags(client->imclient, flags);
+ client->flags &= ~flags;
+
+int
+imclient_flags(client)
+ Cyrus_IMAP client
+PPCODE:
+ /* why is there no way to query this? */
+ RETVAL = client->flags;
+
+char *
+imclient_servername(client)
+ Cyrus_IMAP client
+PREINIT:
+ char *cp;
+CODE:
+ cp = imclient_servername(client->imclient);
+ RETVAL = cp;
+OUTPUT:
+ RETVAL
+
+void
+imclient_processoneevent(client)
+ Cyrus_IMAP client
+PPCODE:
+ imclient_processoneevent(client->imclient);
+
+SV *
+imclient__authenticate(client, mechlist, service, user, auth, password, minssf, maxssf)
+ Cyrus_IMAP client
+ char* mechlist
+ char* service
+ char* user
+ char* auth
+ char* password
+ int minssf
+ int maxssf
+PREINIT:
+ int rc;
+CODE:
+ ST(0) = sv_newmortal();
+
+ if(client->authenticated) {
+ ST(0) = &sv_no;
+ return;
+ }
+
+ /* If the user parameter is undef, set user to be NULL */
+ if(!SvOK(ST(3))) user = NULL;
+ if(!SvOK(ST(5))) password = NULL;
+
+ client->username = user; /* AuthZid */
+ client->authname = auth; /* Authid */
+
+ if(password) {
+ if(client->password) safefree(client->password);
+ client->password =
+ safemalloc(sizeof(sasl_secret_t) + strlen(password));
+ client->password->len = strlen(password);
+ strncpy(client->password->data, password, client->password->len);
+ }
+
+ rc = imclient_authenticate(client->imclient, mechlist, service, user,
+ minssf, maxssf);
+ if (rc)
+ ST(0) = &sv_no;
+ else {
+ client->authenticated = 1;
+ ST(0) = &sv_yes;
+ }
+
+int
+imclient_havetls()
+CODE:
+#ifdef HAVE_SSL
+ RETVAL = 1;
+#else
+ RETVAL = 0;
+#endif /* HAVE_SSL */
+OUTPUT:
+ RETVAL
+
+SV *
+imclient__starttls(client, tls_cert_file, tls_key_file, CAfile, CApath)
+ Cyrus_IMAP client
+ char* tls_cert_file
+ char* tls_key_file
+ char* CAfile
+ char* CApath
+PREINIT:
+ int rc;
+ int tls_layer;
+CODE:
+ ST(0) = sv_newmortal();
+
+ /* If the tls_{cert, key}_file parameters are undef, set to be NULL */
+ if(!SvOK(ST(2))) tls_cert_file = NULL;
+ if(!SvOK(ST(3))) tls_key_file = NULL;
+#ifdef HAVE_SSL
+ rc = imclient_starttls(client->imclient, tls_cert_file, tls_key_file, CAfile, CApath);
+ if (rc)
+ ST(0) = &sv_no;
+ else {
+ ST(0) = &sv_yes;
+ }
+#else
+ ST(0) = &sv_no;
+#endif /* HAVE_SSL */
+
+void
+imclient_addcallback(client, ...)
+ Cyrus_IMAP client
+PREINIT:
+ int arg;
+ HV *cb;
+ char *keyword;
+ STRLEN klen;
+ int flags;
+ SV **val;
+ SV *pcb;
+ SV *prock;
+ struct xsccb *rock;
+ struct xscb *xcb;
+PPCODE:
+ /*
+ * $client->addcallback(\%cb[, ...]);
+ *
+ * where %cb is:
+ *
+ * -trigger => 'OK' (or 'NO', etc.)
+ * -flags => CALLBACK_NOLITERAL|CALLBACK_NUMBERED (optional)
+ * -callback => \&sub or undef (optional)
+ * -rock => SV, reference or undef (optional)
+ *
+ * this is moderately complicated because the callback is a Perl ref...
+ */
+ for (arg = 1; arg < items; arg++) {
+ if (!SvROK(ST(arg)) || SvTYPE(SvRV(ST(arg))) != SVt_PVHV)
+ Perl_croak(aTHX_ "addcallback: arg %d not a hash reference", arg);
+ cb = (HV *) SvRV(ST(arg));
+ /* pull callback crud */
+ if (((val = hv_fetch(cb, "-trigger", 8, 0)) ||
+ (val = hv_fetch(cb, "Trigger", 7, 0))) &&
+ SvTYPE(*val) == SVt_PV)
+ keyword = SvPV(*val, klen);
+ else
+ Perl_croak(aTHX_ "addcallback: arg %d missing trigger", arg);
+ if ((((val = hv_fetch(cb, "-flags", 6, 0)) ||
+ (val = hv_fetch(cb, "Flags", 5, 0)))))
+ {
+ flags = SvIV(*val);
+ } else {
+ flags = 0;
+ }
+
+ if (((val = hv_fetch(cb, "-callback", 9, 0)) ||
+ (val = hv_fetch(cb, "Callback", 8, 0))) &&
+ ((SvROK(*val) && SvTYPE(SvRV(*val)) == SVt_PVCV) ||
+ SvTYPE(*val) == SVt_PV))
+ pcb = *val;
+ else
+ pcb = 0;
+ if ((val = hv_fetch(cb, "-rock", 5, 0)) ||
+ (val = hv_fetch(cb, "Rock", 4, 0)))
+ prock = *val;
+ else
+ prock = &sv_undef;
+ /*
+ * build our internal rock, which is used by our internal
+ * callback handler to invoke the Perl callback
+ */
+ if (!pcb)
+ rock = 0;
+ else {
+ rock = (struct xsccb *) safemalloc(sizeof *rock);
+ /* bump refcounts on these so they don't go away */
+ rock->pcb = SvREFCNT_inc(pcb);
+ if (!prock) prock = &sv_undef;
+ rock->prock = SvREFCNT_inc(prock);
+ rock->client = client;
+ rock->autofree = 0;
+ }
+ /* and add the resulting callback */
+ imclient_addcallback(client->imclient, keyword, flags,
+ (pcb ? imclient_xs_cb : 0), rock, 0);
+ /* update the callback list, possibly freeing old callback info */
+ for (xcb = client->cb; xcb; xcb = xcb->next) {
+ if (xcb->name && strcmp(xcb->name, keyword) == 0 &&
+ xcb->flags == flags)
+ break;
+ }
+ if (xcb) {
+ if (xcb->rock->pcb) SvREFCNT_dec(xcb->rock->pcb);
+ if (xcb->rock->prock) SvREFCNT_dec(xcb->rock->prock);
+ safefree(xcb->rock);
+ }
+ else if (pcb) {
+ xcb = (struct xscb *) safemalloc(sizeof *xcb);
+ xcb->prev = 0;
+ xcb->name = safemalloc(strlen(keyword) + 1);
+ strcpy(xcb->name, keyword);
+ xcb->flags = flags;
+ xcb->next = client->cb;
+ client->cb = xcb;
+ }
+ if (pcb)
+ xcb->rock = rock;
+ else if (xcb) {
+ if (xcb->prev)
+ xcb->prev->next = xcb->next;
+ else
+ client->cb = xcb->next;
+ if (xcb->next) xcb->next->prev = xcb->prev;
+ safefree(xcb->name);
+ safefree(xcb);
+ }
+ }
+
+void
+imclient__send(client, finishproc, finishrock, str)
+ Cyrus_IMAP client
+ SV *finishproc
+ SV *finishrock
+ char *str
+PREINIT:
+ STRLEN arg;
+ SV *pcb;
+ SV *prock;
+ struct xscb *xcb;
+ struct xsccb *rock;
+ char *cp, *dp, *xstr;
+PPCODE:
+ /*
+ * The C version does escapes. It also does varargs, which I would
+ * much rather not have to reimplement in XS code; so that is done in
+ * Perl instead. (The minus being that I have to track any changes
+ * to the C API; but it'll be easier in Perl than in XS.)
+ *
+ * We still have to do the callback, though.
+ *
+ * @@@ the Perl code can't do synchronous literals
+ */
+ if (SvROK(finishproc) && SvTYPE(SvRV(finishproc)) == SVt_PVCV)
+ pcb = SvRV(finishproc);
+ else
+ pcb = 0;
+ if (!pcb)
+ prock = sv_2mortal(newRV_inc(&PL_sv_undef));
+ else if (finishrock)
+ prock = finishrock;
+ else
+ prock = sv_2mortal(newSVsv(&PL_sv_undef));
+ /*
+ * build our internal rock, which is used by our internal
+ * callback handler to invoke the Perl callback
+ */
+ rock = (struct xsccb *) safemalloc(sizeof *rock);
+ /* bump refcounts on these so they don't go away */
+ if (!pcb) pcb = sv_2mortal(newSVsv(&PL_sv_undef));
+ rock->pcb = pcb;
+ if (!prock) prock = sv_2mortal(newSVsv(&PL_sv_undef));
+ rock->prock = prock;
+ rock->client = client;
+ rock->autofree = 1;
+ /* register this callback so it can be gc'ed properly (pointless?) */
+ xcb = (struct xscb *) safemalloc(sizeof *xcb);
+ xcb->prev = 0;
+ xcb->name = 0;
+ xcb->flags = 0;
+ xcb->rock = rock;
+ xcb->next = client->cb;
+ client->cb = xcb;
+ /* protect %'s in the string, since the caller does the dirty work */
+ arg = 0;
+ for (cp = str; *cp; cp++)
+ if (*cp == '%') arg++;
+ xstr = safemalloc(strlen(str) + arg + 1);
+ dp = xstr;
+ for (cp = str; *cp; cp++) {
+ *dp++ = *cp;
+ if (*cp == '%') *dp++ = *cp;
+ }
+ *dp = 0;
+ /* and do it to it */
+ imclient_send(client->imclient,
+ (SvTRUE(pcb) ?
+ (void *) imclient_xs_cb :
+ (void *) imclient_xs_fcmdcb),
+ (void *) rock, xstr);
+ safefree(xstr);
+ /* if there was no Perl callback, spin on events until finished */
+ if (!SvTRUE(pcb)) {
+ AV *av;
+ while (SvTYPE(SvRV(prock)) != SVt_PVAV) {
+ PUTBACK;
+ imclient_processoneevent(client->imclient);
+ SPAGAIN;
+ }
+ /* push the result; if scalar, stuff text in $@ */
+ av = (AV *) SvRV(prock);
+ if (GIMME_V == G_SCALAR) {
+ EXTEND(SP, 1);
+ pcb = av_shift(av);
+ if (strcmp(SvPV(pcb, arg), "OK") == 0)
+ PUSHs(&sv_yes);
+ else
+ PUSHs(&sv_no);
+ pcb = perl_get_sv("@", TRUE);
+ sv_setsv(pcb, av_shift(av));
+ if (av_len(av) != -1) {
+ pcb = perl_get_sv("^E", TRUE);
+ sv_setsv(pcb, av_shift(av));
+ }
+ } else {
+ EXTEND(SP, av_len(av) + 1);
+ PUSHs(av_shift(av));
+ PUSHs(av_shift(av));
+ if (av_len(av) != -1) PUSHs(av_shift(av));
+ }
+ /* and free it */
+ /* SvREFCNT_dec(prock); */
+ }
+
+void
+imclient_getselectinfo(client)
+ Cyrus_IMAP client
+PREINIT:
+ int fd, writep;
+PPCODE:
+ imclient_getselectinfo(client->imclient, &fd, &writep);
+ /*
+ * should this return a glob? (evil, but would solve a nasty issue
+ * in &send()...)
+ *
+ * also, should this check for scalar context and complain?
+ */
+ EXTEND(SP, 2);
+ PUSHs(sv_2mortal(newSViv(fd)));
+ if (writep)
+ PUSHs(&sv_yes);
+ else
+ PUSHs(&sv_no);
+
+void
+imclient_fromURL(client,url)
+ Cyrus_IMAP client
+ char *url
+PREINIT:
+ struct imapurl imapurl;
+PPCODE:
+ imapurl_fromURL(&imapurl, url);
+
+ if(!imapurl.server || !imapurl.mailbox) {
+ safefree(imapurl.freeme);
+ XSRETURN_UNDEF;
+ }
+
+ XPUSHs(sv_2mortal(newSVpv(imapurl.server, 0)));
+ XPUSHs(sv_2mortal(newSVpv(imapurl.mailbox, 0)));
+
+ /* newSVpv copies the above */
+ safefree(imapurl.freeme);
+
+ XSRETURN(2);
+
+void
+imclient_toURL(client,server,box)
+ Cyrus_IMAP client
+ char *server
+ char *box
+PREINIT:
+ char *out_buf;
+ int len;
+ struct imapurl imapurl;
+PPCODE:
+ len = strlen(server)+strlen(box);
+ out_buf = safemalloc(4*len);
+
+ memset(&imapurl, 0, sizeof(struct imapurl));
+ imapurl.server = server;
+ imapurl.mailbox = box;
+ imapurl_toURL(out_buf, &imapurl);
+
+ if(!out_buf[0]) {
+ safefree(out_buf);
+ XSRETURN_UNDEF;
+ }
+
+ XPUSHs(sv_2mortal(newSVpv(out_buf, 0)));
+
+ /* newSVpv copies this */
+ safefree(out_buf);
+
+ XSRETURN(1);
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Admin.pm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Admin.pm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Admin.pm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Admin.pm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1169 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Admin.pm,v 1.39.2.7 2006/03/31 19:22:35 murch Exp $
+
+package Cyrus::IMAP::Admin;
+use strict;
+use Cyrus::IMAP;
+use vars qw($VERSION
+ *create *delete *deleteacl *listacl *list *rename *setacl
+ *subscribed *quota *quotaroot *info *setinfo *xfer
+ *subscribe *unsubscribe);
+
+$VERSION = '1.00';
+
+#
+# NB: there are hooks (which error out in all cases) for IMSP support in Tcl
+# cyradm. I'll add them if I ever see what they're supposed to do... after
+# coming up with perl IMSP/ACAP hooks.
+#
+# ASSUMPTION: the somewhat unwieldy cyradm names are because the interpreter
+# causes collisions, so I can get away with shorter versions here.
+#
+
+# callback when referral stream closes
+sub _cb_ref_eof {
+ my %cb = @_;
+ # indicate that the connection went away
+ print STDERR "\nReferral connection to server lost.\n";
+ ${$cb{-rock}} = undef;
+}
+
+sub new {
+ my $class = shift;
+ my $self = bless {}, $class;
+ $self->{cyrus} = Cyrus::IMAP->new(@_) or $self = undef;
+
+ # Figure out if the remote supports MAILBOX-REFERRALS
+ # This is sort of annoying that authenticate also issues a CAPABILITY
+ # but the API makes it difficult to get at the results of that command.
+ if(defined($self)) {
+ $self->{support_referrals} = 0;
+ $self->{support_annotatatemore} = 0;
+ $self->{authopts} = [];
+ $self->addcallback({-trigger => 'CAPABILITY',
+ -callback => sub {my %a = @_;
+ map { $self->{support_referrals} = 1
+ if /^MAILBOX-REFERRALS$/i;
+ $self->{support_annotatemore} = 1
+ if /^ANNOTATEMORE$/i;
+ }
+ split(/ /, $a{-text})}});
+ $self->send(undef, undef, 'CAPABILITY');
+ $self->addcallback({-trigger => 'CAPABILITY'});
+ }
+
+ $self;
+}
+
+# yuck.
+# I intended this to be a subclass of Cyrus::IMAP, but that's a scalar ref so
+# there's nowhere to hang the error information. Indexing a "private" hash
+# with the scalar sucks fully as much IMHO. So we forward the Cyrus::IMAP
+# methods on demand.
+#
+# yes, this is ugly. but the overhead is minimized this way.
+sub AUTOLOAD {
+ use vars qw($AUTOLOAD);
+ no strict 'refs';
+ $AUTOLOAD =~ s/^.*:://;
+ my $sub = $Cyrus::IMAP::{$AUTOLOAD};
+ *$AUTOLOAD = sub { &$sub($_[0]->{cyrus}, @_[1..$#_]); };
+ goto &$AUTOLOAD;
+}
+
+# Wrap around Cyrus::IMAP's authenticate, so that we are sure to
+# send an rlist command if they support referrals
+sub authenticate {
+ my $self = shift;
+ if(@_) {
+ $self->{authopts} = \@_;
+ }
+ my $rc = $self->{cyrus}->authenticate(@_);
+ if($rc && $self->{support_referrals}) {
+ # Advertise our desire for referrals
+ my $msg;
+ ($rc, $msg) = $self->send('', '', 'RLIST "" ""');
+ if($rc eq "OK") {
+ $rc = 1;
+ } else {
+ $rc = 0;
+ }
+ }
+ return $rc;
+}
+
+# Spit out a reference to the previous authentication options:
+sub _getauthopts {
+ my $self = shift;
+ return $self->{authopts};
+}
+
+sub reconstruct {
+ my ($self, $mailbox, $recurse) = @_;
+ my $rc;
+ my $msg;
+ if($recurse == 1) {
+ ($rc, $msg) = $self->send('', '', 'RECONSTRUCT %s RECURSIVE',
+ $mailbox);
+ } else {
+ ($rc, $msg) = $self->send('', '', 'RECONSTRUCT %s', $mailbox);
+ }
+ $self->{error} = $msg;
+ if($rc eq "OK") {
+ $rc = 1;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->reconstruct($mailbox,$recurse);
+ $self->{error} = $cyradm->{error};
+ $cyradm = undef;
+ return $ret;
+ } else {
+ $rc = 0;
+ }
+ }
+ return $rc;
+}
+
+sub createmailbox {
+ my ($self, $mbx, $partition) = @_;
+ $partition = '' if !defined($partition);
+ my ($rc, $msg) = $self->send('', '', 'CREATE %s%a%a', $mbx,
+ $partition? ' ': '', $partition);
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->createmailbox($box);
+ $cyradm = undef;
+ return $ret;
+ }
+ $self->{error} = $msg;
+ undef;
+ }
+}
+*create = *createmailbox;
+
+sub deletemailbox {
+ my ($self, $mbx) = @_;
+ my ($rc, $msg) = $self->send('', '', 'DELETE %s', $mbx);
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->deletemailbox($box);
+ $self->{error} = $cyradm->error;
+ $cyradm = undef;
+ return $ret;
+ }
+ $self->{error} = $msg;
+ undef;
+ }
+}
+*delete = *deletemailbox;
+
+sub deleteaclmailbox {
+ my ($self, $mbx, @acl) = @_;
+ my $cnt = 0;
+ my $res = '';
+ my ($rc, $msg);
+ foreach my $acl (@acl) {
+ ($rc, $msg) = $self->send('', '', 'DELETEACL %s %s', $mbx, $acl);
+ if ($rc eq 'OK') {
+ $cnt++;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ $cnt += $cyradm->deleteaclmailbox($mbx,$acl);
+
+ $res .= "\n" if $res ne '';
+ $res .= $acl . ': ' . $cyradm->{error};
+
+ $cyradm = undef;
+ } else {
+ $rc = 0;
+ }
+ $res .= "\n" if $res ne '';
+ $res .= $acl . ': ' . $msg;
+ }
+ }
+ if ($res eq '') {
+ $self->{error} = undef;
+ } else {
+ $self->{error} = $res;
+ }
+ $cnt;
+}
+*deleteacl = *deleteaclmailbox;
+
+sub listaclmailbox {
+ my ($self, $mbx) = @_;
+ my %info = ();
+ $self->addcallback({-trigger => 'ACL',
+ -callback => sub {
+ my %d = @_;
+ return unless $d{-text} =~ s/^\"*\Q$mbx\E\"*\s+//;
+ while ($d{-text} =~ s/(\S+)\s+(\S+)\s*//) {
+ $d{-rock}{$1} = $2;
+ }
+ },
+ -rock => \%info});
+ my ($rc, $msg) = $self->send('', '', 'GETACL %s', $mbx);
+ $self->addcallback({-trigger => 'ACL'});
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ %info;
+ } else {
+ $self->{error} = $msg;
+ ();
+ }
+}
+*listacl = *listaclmailbox;
+
+sub listmailbox {
+ my ($self, $pat, $ref) = @_;
+ $ref ||= "";
+ my @info = ();
+ my $list_cmd;
+ if($self->{support_referrals}) {
+ $list_cmd = 'RLIST';
+ } else {
+ $list_cmd = 'LIST';
+ }
+ $self->addcallback({-trigger => 'LIST',
+ -callback => sub {
+ my %d = @_;
+ next unless $d{-text} =~ s/^\(([^\)]*)\) //;
+ my $attrs = $1;
+ my $sep = '';
+ my $mbox;
+ # NIL or (attrs) "sep" "str"
+ if ($d{-text} =~ /^N/) {
+ return if $d{-text} !~ s/^NIL//;
+ }
+ elsif ($d{-text} =~ s/\"\\?(.)\"//) {
+ $sep = $1;
+ }
+ return unless $d{-text} =~ s/^ //;
+ if ($d{-text} =~ /{\d+}(.*)/) {
+ # cope with literals (?)
+ (undef, $mbox) = split(/\n/, $d{-text});
+ } elsif ($d{-text} =~ /\"(([^\\\"]*\\)*[^\\\"]*)\"/) {
+ ($mbox = $1) =~ s/\\(.)/$1/g;
+ } else {
+ $d{-text} =~ /^([]!\#-[^-~]+)/;
+ $mbox = $1;
+ }
+ push @{$d{-rock}}, [$mbox, $attrs, $sep];
+ },
+ -rock => \@info});
+ my ($rc, $msg) = $self->send('', '', "$list_cmd %s %s", $ref, $pat);
+ $self->addcallback({-trigger => $list_cmd});
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ @info;
+ } else {
+ $self->{error} = $msg;
+ ();
+ }
+}
+*list = \&listmailbox;
+
+sub listsubscribed {
+ my ($self, $pat, $ref) = @_;
+ $ref ||= $pat;
+ my @info = ();
+ my $list_cmd;
+ if($self->{support_referrals}) {
+ $list_cmd = 'RLSUB';
+ } else {
+ $list_cmd = 'LSUB';
+ }
+ $self->addcallback({-trigger => 'LSUB',
+ -callback => sub {
+ my %d = @_;
+ next unless $d{-text} =~ s/^\(([^\)]*)\) //;
+ my $attrs = $1;
+ my $sep = '';
+ # NIL or (attrs) "sep" "str"
+ if ($d{-text} =~ /^N/) {
+ return if $d{-text} !~ s/^NIL//;
+ }
+ elsif ($d{-text} =~ s/\"\\?(.)\"//) {
+ $sep = $1;
+ }
+ return unless $d{-text} =~ s/^ //;
+ my $mbox;
+ if ($d{-text} =~ /\"(([^\\\"]*\\.)*[^\\\"]*)\"/) {
+ ($mbox = $1) =~ s/\\(.)/$1/g;
+ } else {
+ $d{-text} =~ /^([]!\#-[^-~]+)/;
+ $mbox = $1;
+ }
+ push @{$d{-rock}}, [$mbox, $attrs, $sep];
+ },
+ -rock => \@info});
+ my ($rc, $msg) = $self->send('', '', "$list_cmd %s %s", $pat, $ref);
+ $self->addcallback({-trigger => $list_cmd});
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ @info;
+ } else {
+ $self->{error} = $msg;
+ ();
+ }
+}
+*subscribed = \&listsubscribed;
+
+sub listquota {
+ my ($self, $root) = @_;
+ my @info = ();
+ $self->addcallback({-trigger => 'QUOTA',
+ -callback => sub {
+ my %d = @_;
+ next unless
+ $d{-text} =~ s/^\S+.* \((\S*) *?(\S*) *?(\S*)\)//;
+ push @{$d{-rock}}, $1, [$2, $3];
+ },
+ -rock => \@info});
+ my ($rc, $msg) = $self->send('', '', 'GETQUOTA %s', $root);
+ $self->addcallback({-trigger => 'QUOTA'});
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ @info;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my @ret = $cyradm->listquota($root);
+ $self->{error} = $cyradm->{error};
+ $cyradm = undef;
+ return @ret;
+ } else {
+ $self->{error} = $msg;
+ ();
+ }
+ }
+}
+*quota = *listquota;
+
+sub listquotaroot {
+ my ($self, $root) = @_;
+ my $qr = '';
+ my @info = ();
+ $self->addcallback({-trigger => 'QUOTAROOT',
+ -callback => sub {
+ my %d = @_;
+ return unless $d{-text} =~ /^\S+ (\S+)/;
+ ${$d{-rock}} = $1;
+ },
+ -rock => \$qr},
+ {-trigger => 'QUOTA',
+ -callback => sub {
+ my %d = @_;
+ return unless
+ $d{-text} =~ s/^\S+ \((\S+) (\S+) (\S+)\)//;
+ push @{$d{-rock}}, $1, [$2, $3];
+ },
+ -rock => \@info});
+ my ($rc, $msg) = $self->send('', '', 'GETQUOTAROOT %s', $root);
+ $self->addcallback({-trigger => 'QUOTA'}, {-trigger => 'QUOTAROOT'});
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ ($qr, @info);
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my @ret = $cyradm->listquotaroot($root);
+ $self->{error} = $cyradm->{error};
+ $cyradm = undef;
+ return @ret;
+ } else {
+ $self->{error} = $msg;
+ ();
+ }
+ }
+}
+*quotaroot = *listquotaroot;
+
+sub renamemailbox {
+ my ($self, $src, $dest, $ptn) = @_;
+
+ $self->addcallback({-trigger => 'NO',
+ -callback => sub {
+ print $_ . "\n";
+ }});
+
+ my ($rc, $msg) = $self->send('', '', 'RENAME %s %s%a%a', $src, $dest,
+ $ptn ? ' ' : $ptn, $ptn);
+
+ $self->addcallback({-trigger => 'NO'});
+
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ if($self->{support_referrals} &&
+ $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\s+([^\]\s]+)\]|) {
+ # We need two referrals for this to be valid
+ my ($refserver, $box) = $self->fromURL($1);
+ my ($refserver2, $nbox) = $self->fromURL($2);
+ my $port = 143;
+
+ if(!($refserver eq $refserver2)) {
+ $self->{error} = "Inter-server referral. Not implemented.";
+ return 1;
+ }
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->renamemailbox($box, $box, $nbox);
+ $cyradm = undef;
+ return $ret;
+ }
+ $self->{error} = $msg;
+ undef;
+ }
+}
+*rename = *renamemailbox;
+
+sub xfermailbox {
+ my ($self, $mbox, $server, $ptn) = @_;
+
+ $self->addcallback({-trigger => 'NO',
+ -callback => sub {
+ print $_ . "\n";
+ }});
+
+ my ($rc, $msg) = $self->send('', '', 'XFER %s %s%a%a', $mbox, $server,
+ $ptn ? ' ' : $ptn, $ptn);
+
+ $self->addcallback({-trigger => 'NO'});
+
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ $self->{error} = $msg;
+ undef;
+ }
+}
+*xfer = *xfermailbox;
+
+# hm. this list can't be confused with valid ACL values as of 1.6.19, except
+# for "all". sigh.
+my %aclalias = (none => '',
+ read => 'lrs',
+ post => 'lrsp',
+ append => 'lrsip',
+ write => 'lrswipkxte',
+ delete => 'lrxte',
+ all => 'lrswipkxtea');
+
+sub setaclmailbox {
+ my ($self, $mbx, %acl) = @_;
+ my $cnt = 0;
+ my $res = '';
+ my ($rc, $msg);
+ foreach my $id (keys %acl) {
+ $acl{$id} = $aclalias{$acl{$id}} if defined $aclalias{$acl{$id}};
+ ($rc, $msg) = $self->send('', '', 'SETACL %s %s %s', $mbx, $id, $acl{$id});
+ if ($rc eq 'OK') {
+ $cnt++;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->setaclmailbox($mbx, %acl);
+ if(defined($ret)) {
+ $cnt++;
+ $rc = 'OK';
+ } else {
+ $res .= "\n" if $res ne '';
+ $res .= $id . ': ' . $acl{$id} . ': ' . $cyradm->{error};
+ }
+ } else {
+ $res .= "\n" if $res ne '';
+ $res .= $id . ': ' . $acl{$id} . ': ' . $msg;
+ }
+ }
+ }
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ $cnt;
+ } else {
+ $self->{error} = $res;
+ undef;
+ }
+}
+*setacl = *setaclmailbox;
+
+sub setquota {
+ my ($self, $mbx, %quota) = @_;
+ foreach my $id (keys %quota) {
+ if ($id !~ /^[]!\#-[^-~]+$/) {
+ $self->{error} = $id . ': not an atom';
+ return undef;
+ }
+ if ($quota{$id} !~ /^\d+$/) {
+ $self->{error} = $id . ': ' . $quota{$id} . ': not a number';
+ return undef;
+ }
+ }
+ my ($rc, $msg) = $self->send('', '', 'SETQUOTA %s (%v)', $mbx, \%quota);
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->setquota($mbx, %quota);
+ $cyradm = undef;
+ return $ret;
+ } else {
+ $self->{error} = $msg;
+ undef;
+ }
+ }
+}
+
+sub getinfo {
+ my $self = shift;
+ my $box = shift;
+ my @entries = @_;
+
+ if(!defined($box)) {
+ $box = "";
+ }
+
+ if(!$self->{support_annotatemore}) {
+ $self->{error} = "Remote does not support ANNOTATEMORE.";
+ return undef;
+ }
+
+ my %info = ();
+ $self->addcallback({-trigger => 'ANNOTATION',
+ -callback => sub {
+ my %d = @_;
+ my $text = $d{-text};
+
+ # There were several draft iterations of this,
+ # but since we send only the latest form command,
+ # this is the only possible response.
+
+ if ($text =~
+ /^\s*\"([^\"]*)\"\s+\"([^\"]*)\"\s+\(\"([^\"]*)\"\s+\"([^\"]*)\"\)/) {
+ # note that we require mailbox and entry to be qstrings
+ # Single annotation, not literal,
+ # but possibly multiple values
+ # however, we are only asking for one value, so...
+ my $key;
+ if($1 ne "") {
+ $key = "/mailbox/{$1}$2";
+ } else {
+ $key = "/server$2";
+ }
+ $d{-rock}{$key} = $4;
+ } elsif ($text =~
+ /^\s*\"([^\"]*)\"\s+\"([^\"]*)\"\s+\(\"([^\"]*)\"\s+\{(.*)\}\r\n/) {
+ my $len = $3;
+ $text =~ s/^\s*\"([^\"]*)\"\s+\"([^\"]*)\"\s+\(\"([^\"]*)\"\s+\{(.*)\}\r\n//s;
+ $text = substr($text, 0, $len);
+ # note that we require mailbox and entry to be qstrings
+ # Single annotation (literal style),
+ # possibly multiple values
+ # however, we are only asking for one value, so...
+ my $key;
+ if($1 ne "") {
+ $key = "/mailbox/{$1}$2";
+ } else {
+ $key = "/server$2";
+ }
+ $d{-rock}{$1} = $text;
+ } else {
+ next;
+ }
+ },
+ -rock => \%info});
+
+ # send getannotation "/mailbox/name/* or /server/*"
+ my($rc, $msg);
+ if(scalar(@entries)) {
+ foreach my $annot (@entries) {
+ ($rc, $msg) = $self->send('', '', "GETANNOTATION %s %q \"value.shared\"",
+ $box, $annot);
+ last if($rc ne 'OK');
+ }
+ } else {
+ ($rc, $msg) = $self->send('', '', "GETANNOTATION %s \"*\" \"value.shared\"",
+ $box);
+ }
+ $self->addcallback({-trigger => 'ANNOTATION'});
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ %info;
+ } else {
+ $self->{error} = $msg;
+ ();
+ }
+}
+*info = *getinfo;
+
+sub mboxconfig {
+ my ($self, $mailbox, $entry, $value) = @_;
+
+ my %values = ( "comment" => "/comment",
+ "condstore" => "/vendor/cmu/cyrus-imapd/condstore",
+ "news2mail" => "/vendor/cmu/cyrus-imapd/news2mail",
+ "expire" => "/vendor/cmu/cyrus-imapd/expire",
+ "sieve" => "/vendor/cmu/cyrus-imapd/sieve",
+ "squat" => "/vendor/cmu/cyrus-imapd/squat" );
+
+ if(!$self->{support_annotatemore}) {
+ $self->{error} = "Remote does not support ANNOTATEMORE.";
+ return undef;
+ }
+
+ if(!exists($values{$entry})) {
+ $self->{error} = "Unknown parameter $entry";
+ }
+
+ $entry = $values{$entry};
+
+ my ($rc, $msg);
+
+ $value = undef if($value eq "none");
+
+ if(defined($value)) {
+ ($rc, $msg) = $self->send('', '',
+ "SETANNOTATION %q %q (\"value.shared\" %q)",
+ $mailbox, $entry, $value);
+ } else {
+ ($rc, $msg) = $self->send('', '',
+ "SETANNOTATION %q %q (\"value.shared\" NIL)",
+ $mailbox, $entry);
+ }
+
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->mboxconfig($mailbox, $entry, $value);
+ $cyradm = undef;
+ return $ret;
+ }
+ $self->{error} = $msg;
+ undef;
+ }
+}
+
+sub setinfoserver {
+ my ($self, $entry, $value) = @_;
+
+ if(!$self->{support_annotatemore}) {
+ $self->{error} = "Remote does not support ANNOTATEMORE.";
+ return undef;
+ }
+
+ my %values = ( "comment" => "/comment",
+ "motd" => "/motd",
+ "admin" => "/admin",
+ "shutdown" => "/vendor/cmu/cyrus-imapd/shutdown",
+ "expire" => "/vendor/cmu/cyrus-imapd/expire",
+ "squat" => "/vendor/cmu/cyrus-imapd/squat" );
+
+ $entry = $values{$entry} if (exists($values{$entry}));
+
+ $value = undef if($value eq "none");
+
+ my ($rc, $msg);
+
+ if(defined($value)) {
+ ($rc, $msg) = $self->send('', '',
+ "SETANNOTATION \"\" %q (\"value.shared\" %q)",
+ $entry, $value);
+ } else {
+ ($rc, $msg) = $self->send('', '',
+ "SETANNOTATION \"\" %q (\"value.shared\" NIL)",
+ $entry);
+ }
+
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ $self->{error} = $msg;
+ undef;
+ }
+}
+*setinfo = *setinfoserver;
+
+sub subscribemailbox {
+ my ($self, $mbx) = @_;
+ my ($rc, $msg) = $self->send('', '', 'SUBSCRIBE %s', $mbx);
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->subscribemailbox($box);
+ $self->{error} = $cyradm->error;
+ $cyradm = undef;
+ return $ret;
+ }
+ $self->{error} = $msg;
+ undef;
+ }
+}
+*subscribe = *subscribemailbox;
+
+sub unsubscribemailbox {
+ my ($self, $mbx) = @_;
+ my ($rc, $msg) = $self->send('', '', 'UNSUBSCRIBE %s', $mbx);
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ if($self->{support_referrals} && $msg =~ m|^\[REFERRAL\s+([^\]\s]+)\]|) {
+ my ($refserver, $box) = $self->fromURL($1);
+ my $port = 143;
+
+ if($refserver =~ /:/) {
+ $refserver =~ /([^:]+):(\d+)/;
+ $refserver = $1; $port = $2;
+ }
+
+ my $cyradm = Cyrus::IMAP::Admin->new($refserver, $port)
+ or die "cyradm: cannot connect to $refserver\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_ref_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(@{$self->_getauthopts()})
+ or die "cyradm: cannot authenticate to $refserver\n";
+
+ my $ret = $cyradm->unsubscribemailbox($box);
+ $self->{error} = $cyradm->error;
+ $cyradm = undef;
+ return $ret;
+ }
+ $self->{error} = $msg;
+ undef;
+ }
+}
+*unsubscribe = *unsubscribemailbox;
+
+sub error {
+ my $self = shift;
+ $self->{error};
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Cyrus::IMAP::Admin - Cyrus administrative interface Perl module
+
+=head1 SYNOPSIS
+
+ use Cyrus::IMAP::Admin;
+
+ my $client = Cyrus::IMAP::Admin->new('mailhost'[, $flags]);
+ $rc = $client->create('user.auser'[, $partition]);
+ $rc = $client->delete('user.auser');
+ $rc = $client->deleteacl('user.buser', 'user1', 'user2');
+ %acls = $client->listacl('user.buser');
+ @mailboxes = $client->list('*');
+ @mailboxes = $client->list('%', 'user.');
+ @mailboxes = $client->subscribed('*');
+ %quota = $client->quota($root);
+ ($root, %quota) = $client->quotaroot($mailbox);
+ $rc = $client->rename($old, $new[, $partition]);
+ $rc = $client->setacl($mailbox, $user =E<gt> $acl[, ...]);
+ $rc = $client->setquota($mailbox, $resource =E<gt> $quota[, ...]);
+ $rc = $client->xfer($mailbox, $server[, $partition]);
+
+=head1 DESCRIPTION
+
+This module is a Perl interface to Cyrus administrative functions. It is used
+to implement Cyrus::IMAP::Admin::Shell (otherwise known as B<cyradm> and also
+available for use in Perl administrative programs.
+
+=head1 METHODS
+
+Many of the methods have a B<cyradm>-compatible name and a shorter name.
+The shorter name is shown in the synopsis when it exists; the
+B<cyradm>-compatible name should be reasonably obvious.
+
+In general, methods return undef or empty lists on error. In some cases
+a method may return an empty list without an error (i.e. C<list> of a
+nonexistent hierarchy), so it may be necessary to check the error state
+explicitly via the C<error> method.
+
+=over 4
+
+=item new($server[, $flags])
+
+Instantiates a B<cyradm> object. This is in fact an Cyrus::IMAP object with
+a few additional methods, so all Cyrus::IMAP methods are available if needed.
+(In particular, you will always want to use the C<authenticate> method.)
+
+=item error
+
+Return the last error that occurred, or undef if the last operation was
+successful. This is in some cases (such as C<list>) the only way to
+distinguish between a successful return of an empty list and an error return.
+
+Calling C<error> does not reset the error state, so it is legal to write:
+
+ @folders = $cyradm->list($spec);
+ print STDERR "Error: ", $cyradm->error if $cyradm->error;
+
+=item createmailbox($mailbox[, $partition])
+
+=item create($mailbox[, $partition])
+
+Create a new mailbox on the specified or default partition.
+
+=item deletemailbox($mailbox)
+
+=item delete($mailbox)
+
+Delete a mailbox. As with B<cyradm>, you will probably need to add the B<c>
+ACL for yourself to the mailbox with C<setaclmailbox> first.
+
+=item deleteaclmailbox($mailbox, $user[, ...])
+
+=item deleteacl($mailbox, $user[, ...])
+
+Delete one or more ACL from a mailbox.
+
+=item listaclmailbox($mailbox)
+
+=item listacl($mailbox)
+
+Returns a hash of mailbox ACLs, with each key being a Cyrus user and the
+corresponding value being the ACL.
+
+=item listmailbox($pattern[, $reference])
+
+=item list($pattern[, $reference])
+
+List mailboxes matching the specified pattern, starting from the specified
+reference. The result is a list; each element is an array containing the
+mailbox name, attributes, and the separator. (This interface may change.)
+
+=item listsubscribed($pattern[, $reference])
+
+=item subscribed($pattern[, $reference])
+
+Like C<listmailbox> but only shows subscribed mailboxes.
+
+=item listquota($root)
+
+=item quota($root)
+
+Returns a hash specifying the quota for the specified quota root. Use
+C<listquotaroot> to find the quota root for a mailbox.
+
+=item listquotaroot($mailbox)
+
+=item quotaroot($mailbox)
+
+Returns a list, the first element is the quota root for the mailbox and
+remaining elements are a hash specifying its quota.
+
+=item renamemailbox($from, $to[, $partition])
+
+=item rename($from, $to[, $partition])
+
+Renames the specified mailbox, optionally moving it to a different partition.
+
+=item setaclmailbox($mailbox, $user =E<gt> $acl[, ...])
+
+=item setacl($mailbox, $user =E<gt> $acl[, ...])
+
+Set ACLs on a mailbox. The ACL may be one of the special strings C<none>,
+C<read> (C<lrs>), C<post> (C<lrsp>), C<append> (C<lrsip>), C<write>
+(C<lrswipkxte>), C<delete> (C<lrxte>), or C<all> (C<lrswipkxte>), or
+any combinations of the ACL codes:
+
+=over 4
+
+=item l
+
+Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox)
+
+=item r
+
+Read (SELECT/EXAMINE the mailbox, perform STATUS)
+
+=item s
+
+Seen (set/clear \SEEN flag via STORE, also set \SEEN flag during
+ APPEND/COPY/FETCH BODY[...])
+
+=item w
+
+Write flags other than \SEEN and \DELETED
+
+=item i
+
+Insert (APPEND, COPY destination)
+
+=item p
+
+Post (send mail to mailbox)
+
+=item k
+
+Create mailbox (CREATE new sub-mailboxes, parent for new mailbox in RENAME)
+
+=item x
+
+Delete mailbox (DELETE mailbox, old mailbox name in RENAME)
+
+=item t
+
+Delete messages (set/clear \DELETED flag via STORE, also set \DELETED
+ flag during APPEND/COPY)
+
+=item e
+
+Perform EXPUNGE and expunge as part of CLOSE
+
+=item a
+
+Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)
+
+=back
+
+=item setquota($mailbox, $resource, $quota[, ...])
+
+Set quotas on a mailbox. Note that Cyrus currently only defines one resource,
+C<STORAGE>. As defined in RFC 2087, the units are groups of 1024 octets
+(i.e. Kilobytes)
+
+=item xfermailbox($mailbox, $server[, $partition])
+
+=item xfer($mailbox, $server[, $partition])
+
+Transfers (relocates) the specified mailbox to a different server.
+
+=back
+
+=head1 AUTHOR
+
+Brandon S. Allbery, allbery at ece.cmu.edu
+
+=head1 SEE ALSO
+
+Cyrus::IMAP
+Cyrus::IMAP::Shell
+perl(1), cyradm(1), imapd(8).
+
+=cut
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+/Admin.pm/1.39.2.7/Fri Mar 31 19:22:35 2006//Tcyrus-release-2-3-7
+/IMSP.pm/1.3/Sat May 25 19:57:49 2002//Tcyrus-release-2-3-7
+/Shell.pm/1.31.2.7/Fri Mar 31 19:22:35 2006//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl/imap/IMAP
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/IMSP.pm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/IMSP.pm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/IMSP.pm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/IMSP.pm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,250 @@
+# $Id: IMSP.pm,v 1.3 2002/05/25 19:57:49 leg Exp $
+
+package Cyrus::IMAP::IMSP;
+use strict;
+use Cyrus::IMAP;
+use vars qw($VERSION
+ *get *set *unset);
+
+$VERSION = '1.00';
+
+#
+# This is a derivative of the Cyrus::IMAP::Admin perl module,
+# adapted to run the IMSP set, unset, and get commands
+# instead of various IMAP administrative commands.
+#
+
+# New is "inherited" from the CYRUS::IMAP class except for one change:
+# If only a server name was provided as an argument,
+# change the default port number argument to the IMSP port (406).
+sub new {
+ my $class = shift;
+ my $self = bless {}, $class;
+ push @_, '406' if ($#_ == 0); # If only one argument
+ $self->{cyrus} = Cyrus::IMAP->new(@_) or $self = undef;
+ $self;
+}
+
+# <Comments supplied by the author of Admin.pm>
+# yuck.
+# I intended this to be a subclass of Cyrus::IMAP, but that's a scalar ref so
+# there's nowhere to hang the error information. Indexing a "private" hash
+# with the scalar sucks fully as much IMHO. So we forward the Cyrus::IMAP
+# methods on demand.
+#
+# yes, this is ugly. but the overhead is minimized this way.
+sub AUTOLOAD {
+ use vars qw($AUTOLOAD);
+ no strict 'refs';
+ $AUTOLOAD =~ s/^.*:://;
+ my $sub = $Cyrus::IMAP::{$AUTOLOAD};
+ *$AUTOLOAD = sub { &$sub($_[0]->{cyrus}, @_[1..$#_]); };
+ goto &$AUTOLOAD;
+}
+
+# Set returns a standard result code.
+sub set {
+ my ($self, $option, $value) = @_;
+ $value = '' if !defined($value);
+ my ($rc, $msg) = $self->send('', '', 'SET %s %s', $option, $value);
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ $self->{error} = $msg;
+ undef;
+ }
+}
+
+# The draft says that UNSET could return an untagged OPTION reply
+# but our server never does that so I'll sweep that case under the rug.
+sub unset {
+ my ($self, $option) = @_;
+ my ($rc, $msg) = $self->send('', '', 'UNSET %s', $option);
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ 1;
+ } else {
+ $self->{error} = $msg;
+ undef;
+ }
+}
+
+#
+# Given a string, returns an array of two elements:
+# the first word of the string
+# the remainder of the string, minus the space separator
+# If a parsing error occurs, only an error message is returned.
+# The rules for what comprises a word are loosely based on the IMSP spec.
+# Atoms: <any characters except space, quote, etc.>*
+# Quoted strings: <quote> <anything but quote>* <quote>
+# Literals: {<byte-count}\n\r<sequence of byte-count characters>
+#
+sub next_word {
+ $_ = pop @_;
+ my($firstword) = '';
+ my($firstchar) = substr($_, $[, 1);
+
+ # Quoted
+ if ($firstchar eq '"') {
+ s/^\"([^\"]*)\"// ||
+ return "Bad format while decoding QUOTED-STRING in reply from GET";
+ $firstword = $1;
+ }
+ # Literal
+ elsif ($firstchar eq '{') {
+ s/^{([0-9]*)}\r\n// ||
+ return "Bad format while decoding LITERAL in reply from GET";
+ # Pull out the specified number of characters
+ $firstword = substr($_, $[, $1);
+ # Now remove those characters from the string
+ substr($_, $[, $1) = '';
+ }
+ # Must be Atom
+ else {
+ s/([^ ]*)// ||
+ return "Bad format while decoding ATOM in reply from GET";
+ $firstword = $1;
+ }
+ # Eat the space following the word (this fails if it was the last word)
+ s/^ //;
+
+ return ($firstword, $_);
+}
+
+#
+# The untagged OPTION reply has one of these two formats:
+# "OPTION" SPACE atom SPACE astring SPACE "[READ-ONLY]"
+# "OPTION" SPACE atom SPACE astring SPACE "[READ-WRITE]"
+# The access flag is not given back to the user.
+#
+sub get {
+ my ($self, $option) = @_;
+ my %info = ();
+ $self->addcallback({-trigger => 'OPTION',
+ -callback => sub {
+ my %d = @_;
+ my $replyline = $d{-text};
+ (my $opt, $replyline) = next_word($replyline);
+ die $opt if (!defined $replyline);
+ (my $val, $replyline) = next_word($replyline);
+ die $val if (!defined $replyline);
+ (my $acc, $replyline) = next_word($replyline);
+ die $acc if (!defined $replyline);
+ $d{-rock}{$opt} = $val;
+ },
+ -rock => \%info});
+ my ($rc, $msg) = $self->send('', '', 'GET %s', $option);
+ $self->addcallback({-trigger => 'OPTION'});
+ if ($rc eq 'OK') {
+ $self->{error} = undef;
+ %info;
+ } else {
+ $self->{error} = $msg;
+ ();
+ }
+}
+
+sub error {
+ my $self = shift;
+ $self->{error};
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Cyrus::IMAP::IMSP - Perl module for Cyrus IMSP user options
+
+=head1 SYNOPSIS
+
+ use Cyrus::IMAP::IMSP;
+
+ my $client = Cyrus::IMAP::IMSP->new('imsphost'[, $port[, $flags]]);
+ $rc = $client->set('mailreader.window.size', '200x300');
+ %options = $client->get('mailreader.*')
+ $rc = $client->unset('mailreader.window.size');
+
+=head1 DESCRIPTION
+
+This module is a Perl interface to the Cyrus IMSP functions that
+relate to user options (preferences). Only three IMSP operations are
+implemented: set, unset, and get.
+
+=head1 METHODS
+
+=over 4
+
+=item new($server[, $port[, $flags]])
+
+Instantiates a B<Cyrus::IMAP::IMSP> object. This is in fact a Cyrus::IMAP
+object with a few additional methods, so all Cyrus::IMAP methods are
+available if needed. (In particular, you will always want to use the
+C<authenticate> method.)
+
+=item error
+
+Return the last error that occurred, or undef if the last operation was
+successful. This is in some cases (such as C<get>) the only way to
+distinguish between a successful return of an empty list and an error return.
+
+Calling C<error> does not reset the error state, so it is legal to write:
+
+ %options = $client->get($option);
+ print STDERR "Error: ", $client->error if $client->error;
+
+=item set($option, $value)
+
+Sets the option named by $option to the value in $value.
+
+There are no restrictions or quoting rules needed to protect special
+characters in the value argument. (The Cyrus::IMAP layer will take care
+those details by adding double quotes or a literal introducer.)
+
+If successful, returns 1. Otherwise, returns undef and makes an error
+message available through the "error" function.
+
+=item unset($option)
+
+Removes the option named by $option. The option is completely removed
+from the user's name space but will revert to a site-wide default if
+one has been set. Note that this is different from assigning an option
+the null value with set($option, '').
+
+If you try to unset an option that does not exist, an error is
+returned saying that the option was already unset.
+
+If successful, returns 1. Otherwise, returns undef and makes an error
+message available through the "error" function.
+
+=item get($option_pattern)
+
+Get takes either an option name or a pattern of names to fetch. The
+pattern can contain either "*" or "%" wildcards anywhere in the
+string. The usual IMAP wildcard semantics apply.
+
+The return value is a hash of options with each key being an option
+name and each value being the option's value string. If an empty hash
+is returned, it's either because there were no matching options or
+because some error happened. Check the "error" function to see which
+was the case.
+
+The IMSP protocol also returns an access flag of "[READ-WRITE]" or
+"[READ-ONLY]" but that information is discarded by this function. A
+more complicated function that returns both the value and the access
+flag could be added later if needed.
+
+=back
+
+=head1 AUTHOR
+
+Brandon S. Allbery, allbery at ece.cmu.edu
+IMSP modifications by Joseph Jackson, jackson at CMU.EDU
+
+=head1 SEE ALSO
+
+Cyrus::IMAP
+perl(1), cyradm(1), imapd(8).
+
+=cut
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Shell.pm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Shell.pm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Shell.pm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/IMAP/Shell.pm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1891 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Shell.pm,v 1.31.2.7 2006/03/31 19:22:35 murch Exp $
+#
+# A shell framework for Cyrus::IMAP::Admin
+#
+# run(*FH|'FH')
+# read commands from the filehandle and pass to exec(); defaults to
+# __DATA__
+# shell
+# = run(*STDIN)
+#
+# This isn't derived from CPAN.pm, first because I need to support the stuff
+# that makes it act at least somewhat like the old cyradm and second because
+# I'm pretty sure this will have to be released under the crappy TTO license
+# instead of the GPL/Artistic License.
+#
+
+package Cyrus::IMAP::Shell;
+use strict;
+
+use IO::File;
+use Cyrus::IMAP::Admin;
+use Getopt::Long;
+use Exporter;
+use POSIX ();
+use Carp qw(confess);
+
+use vars qw(@ISA @EXPORT $VERSION *cyradm);
+$VERSION = "1.00";
+ at ISA = qw(Exporter);
+ at EXPORT = qw(cyradm shell run);
+
+# note aliases
+my %builtins = (exit =>
+ [\&_sc_exit, '[number]', 'exit cyradm'],
+ quit => 'exit',
+ help =>
+ [\&_sc_help, '[command]', 'show commands'],
+ '?' => 'help',
+ lam => 'listacl',
+ listacl =>
+ [\&_sc_listacl, 'mailbox', 'list ACLs on mailbox'],
+ listaclmailbox => 'listacl',
+ lm => 'listmailbox',
+ listmailbox =>
+ [\&_sc_list, '[-subscribed] [pattern [base]]',
+ 'list mailboxes'],
+ server =>
+ [\&_sc_server, '[-noauthenticate] [server]',
+ 'show current server or connect to server'],
+ servername => 'server',
+ connect => 'server',
+ authenticate =>
+ [\&_sc_auth,
+ '[-minssf N] [-maxssf N] [-mechanisms list] [user]',
+ 'authenticate to server'],
+ auth => 'authenticate',
+ login => 'authenticate',
+ listquota =>
+ [\&_sc_quota, 'root', 'list quotas on specified root'],
+ lq => 'listquota',
+ listquotaroot =>
+ [\&_sc_quotaroot, 'mailbox',
+ 'show quota roots and quotas for mailbox'],
+ lqr => 'listquotaroot',
+ lqm => 'listquotaroot',
+ disconnect =>
+ [\&_sc_disconn, '', 'disconnect from current server'],
+ disc => 'disconnect',
+ chdir =>
+ [\&_sc_chdir, 'directory', 'change current directory'],
+ cd => 'chdir',
+ createmailbox =>
+ [\&_sc_create, '[--partition partition] mailbox [partition]',
+ 'create mailbox'],
+ create => 'createmailbox',
+ cm => 'createmailbox',
+ deleteaclmailbox =>
+ [\&_sc_deleteacl, 'mailbox id [id ...]',
+ 'remove ACLs from mailbox'],
+ deleteacl => 'deleteaclmailbox',
+ dam => 'deleteaclmailbox',
+ deletemailbox =>
+ [\&_sc_delete, 'mailbox [host]', 'delete mailbox'],
+ delete => 'deletemailbox',
+ dm => 'deletemailbox',
+ info =>
+ [\&_sc_info, '[mailbox]',
+ 'display mailbox/server metadata'],
+ mboxcfg =>
+ [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat] value',
+ 'configure mailbox'],
+ mboxconfig => 'mboxcfg',
+ reconstruct =>
+ [\&_sc_reconstruct, 'mailbox', 'reconstruct mailbox (if supported)'],
+ renamemailbox =>
+ [\&_sc_rename,
+ '[--partition partition] oldname newname [partition]',
+ 'rename (and optionally relocate) mailbox'],
+ rename => 'renamemailbox',
+ renm => 'renamemailbox',
+ setaclmailbox =>
+ [\&_sc_setacl, 'mailbox id rights [id rights ...]',
+ 'set ACLs on mailbox'],
+ setacl => 'setaclmailbox',
+ sam => 'setaclmailbox',
+ setinfo =>
+ [\&_sc_setinfo, '[motd|comment|admin|shutdown|expire|squat] text',
+ 'set server metadata'],
+ setquota =>
+ [\&_sc_setquota,
+ 'mailbox resource value [resource value ...]',
+ 'set quota on mailbox or resource'],
+ sq => 'setquota',
+ version =>
+ [\&_sc_version, '',
+ 'display version info of current server'],
+ ver => 'version',
+ xfermailbox =>
+ [\&_sc_xfer,
+ '[--partition partition] mailbox server [partition]',
+ 'transfer (relocate) a mailbox to a different server'],
+ xfer => 'xfermailbox',
+ subscribe =>
+ [\&_sc_subscribe, '[mailbox]',
+ 'subscribe to a mailbox'],
+ sub => 'subscribe',
+ unsubscribe =>
+ [\&_sc_unsubscribe, '[mailbox]',
+ 'unsubscribe from a mailbox'],
+ unsub => 'unsubscribe',
+ #? alias
+ #? unalias
+ #? load
+ #? unload
+ );
+
+# ugh. ugh. suck. aieee.
+my $use_rl = 'Cyrus::IMAP::DummyReadline';
+{
+ if (eval { require Term::ReadLine; }) {
+ $use_rl = 'Term::ReadLine';
+ }
+}
+
+# callback when stream closes
+sub _cb_eof {
+ my %cb = @_;
+ # indicate that the connection went away
+ print STDERR "\nConnection to server lost.\n";
+ ${$cb{-rock}} = undef;
+}
+
+# okay, this sucks. the alternatives are worse.
+my $coll_command = '';
+
+# originally I used Text::ParseWords::shellwords; unfortunately, that is a
+# bit inaccurate because it doesn't word-break at shell metacharacters. which
+# I need. (also need to know when a metachar is a metachar on return.
+sub _nexttoken {
+ my $lr = shift;
+ $$lr =~ s/^(\s+)// and $coll_command .= $1;
+ my $quoted = 0;
+ my $q = '';
+
+ my @tok = ('', undef);
+ # this is cute. (shells are funny that way)
+ # we parse "words" which are delimited by whitespace. except that if a
+ # quote appears, we have to gobble to the closing quote and then continue
+ # with what we were doing. and outside quotes, we need to look for special
+ # characters (in this case, /&<>;/) and break "words" there.
+ while ($$lr ne '' && ($quoted || $$lr !~ /^\s/)) {
+ $tok[1] ||= 0;
+ if ($q eq '' && $$lr =~ /^([&<>;])/) {
+ last if $tok[0] ne '';
+ $tok[0] = $1;
+ $coll_command .= $1;
+ $$lr =~ s///;
+ $tok[1] = 1;
+ last;
+ }
+ if ($$lr =~ /^([^&<>;\'\"\$\\\s]+)/) {
+ $tok[0] .= $1;
+ $coll_command .= $1;
+ $$lr =~ s///;
+ next;
+ }
+ if ($$lr =~ /^\\(.)/) {
+ # gack. "consistency? wazzat?"
+ $coll_command .= "\\" . $1;
+ $tok[0] .= "'" if $q eq "'" && $1 ne "'";
+ $tok[0] .= $1;
+ $$lr =~ s///;
+ next;
+ }
+ if ($$lr =~ /^\$(\{(\w+)\}|(\w+))/) {
+ $coll_command .= "\$" . $1;
+ # if someone asks for shell var qualifiers I will kill them
+ $$lr =~ s//$ENV{$+}/;
+ $$lr =~ s/^(\s+)// and $coll_command .= $1 if $q;
+ redo;
+ }
+ if ($$lr =~ /^([\'\"])/ && $q eq 'x') {
+ $q = '';
+ $coll_command .= $1;
+ $$lr =~ s///;
+ $quoted = !$quoted;
+ next;
+ }
+ if ($$lr =~ /^([\'\"])/ && $q eq '') {
+ $q = 'x';
+ $coll_command .= $1;
+ $$lr =~ s///;
+ $quoted = !$quoted;
+ next;
+ }
+ $$lr =~ s/^(.)//;
+ $tok[0] .= $1;
+ $coll_command .= $1;
+ }
+ @tok;
+}
+
+# relatively trivial... except for the shell fallback.
+sub _execvv {
+ my ($cyrref, $cmd, $av0, $fa, $lfa, @argv) = @_;
+ while (defined($builtins{$av0}) && !ref($builtins{$av0})) {
+ $av0 = $builtins{$av0};
+ }
+ if (defined($builtins{$av0})) {
+ &{$builtins{$av0}[0]}($cyrref, $av0, $fa, $lfa, @argv);
+ }
+ else {
+ my $pid = fork;
+ if (!defined($pid)) {
+ die "fork: $!\n";
+ }
+ elsif ($pid) {
+ waitpid($pid, 0);
+ }
+ else {
+ $argv[0] =~ s!^.*/!!;
+ my $fd = 0;
+ # process redirections in $fa
+ # sorted so lower $lfa->[$fh]->fileno consumed before $fh!
+ foreach my $fh (sort {$a->fileno <=> $b->fileno} @$lfa) {
+ if (!defined($fh)) {
+ POSIX::close($fd);
+ } else {
+ POSIX::dup2($fh->fileno, $fd);
+ }
+ $fd++;
+ }
+ foreach my $fh (@$lfa) {
+ POSIX::close($fd) if defined($fh) && $fh->fileno > $fd;
+ }
+ # anything else left open is just lost. sorry.
+ exec $cmd;
+ die "$av0: $!\n";
+ }
+ }
+}
+
+# wrapper to trap errors and report them.
+# (there are two such, one for "program" errors and one for "shell" errors...)
+sub _execv {
+ my ($cyrref, $cmd, $av0, $fa, $lfa, @argv) = @_;
+ my $rc;
+ local($@);
+ if (!defined(eval { $rc = &_execvv; })) {
+ $lfa->[2]->print($@);
+ $lfa->[2]->print("\n") unless substr($@, -1, 1) eq "\n";
+ $rc = -1;
+ }
+}
+
+# ick
+sub _redir {
+ my ($fha, $op, $dst, $src) = @_;
+ my ($rop, $amp);
+ if ($op =~ s/\&$//) {
+ $amp = '&';
+ } else {
+ $amp = '';
+ }
+ if ($op eq '>') {
+ $rop = O_WRONLY|O_CREAT|O_TRUNC;
+ $src = 1 if !defined($src) || $src eq '';
+ }
+ elsif ($op eq '>>') {
+ $rop = O_WRONLY|O_CREAT|O_APPEND;
+ $src = 1 if !defined($src) || $src eq '';
+ }
+ elsif ($op eq '<') {
+ $rop = O_RDONLY;
+ $src = 0 if !defined($src) || $src eq '';
+ }
+ else {
+ die "can't handle \`$op' redirection\n";
+ }
+ if ($amp) {
+ die "invalid file descriptor \`$dst'\n" if $dst ne '-' && $dst != /^\d+$/;
+ if ($dst eq '-') {
+ $fha->[$src] = undef;
+ }
+ elsif (!defined($fha->[$dst])) {
+ die "file descriptor \`$dst' not open\n";
+ }
+ else {
+ $fha->[$src] = IO::File->new("$op&" . $fha->[$dst]->fileno);
+ }
+ } else {
+ $fha->[$src] = IO::File->new($dst, $rop) or die "$dst: $!\n";
+ }
+}
+
+# this was once trivial, then I added parsing for redirection...
+sub _exec {
+ my ($cyrref, $fa, $cmd) = @_;
+ $fa ||= [*STDIN, *STDOUT, *STDERR];
+ # clone it: only "exec" has permanent effects on the fh stack
+ my $lfa = [@$fa];
+ my @argv = ();
+ my $state = '';
+ my ($tok, $type);
+ while (($tok, $type) = _nexttoken(\$cmd) and defined($type)) {
+ if (!$type) {
+ if ($state eq '') {
+ # @@ here is where we should do aliasing, if we do it at all
+ push(@argv, $tok);
+ }
+ else {
+ # at this point, $state is the redirection (/^([<>])\1?\&?$/) and
+ # $arg->[0] is the destination. if $argv[$#argv] matches /^\d+$/,
+ # it is the affected file handle.
+ my $target;
+ $target = pop(@argv) if $argv[-1] =~ /^\d+$/;
+ _redir($lfa, $state, $tok, $target);
+ $state = '';
+ }
+ }
+ elsif ($tok eq ';') {
+ _execv($cyrref, $coll_command, $argv[0], $fa, $lfa, @argv);
+ $coll_command = '';
+ @argv = ();
+ }
+ elsif ($tok eq '&') {
+ if ($state ne '<' && $state ne '>') {
+ die "syntax error: cannot deal with \`&' here\n";
+ }
+ $state .= '&';
+ }
+ elsif ($tok eq '<' || $tok eq '>') {
+ if ($state ne '' && ($state ne $tok || $state eq '<')) {
+ die "syntax error: cannot deal with \`$tok' here\n";
+ }
+ $state .= $tok;
+ }
+ else {
+ die "syntax error: don't understand \`$tok'\n";
+ }
+ }
+ if (@argv) {
+ _execv($cyrref, $coll_command, $argv[0], $fa, $lfa, @argv);
+ $coll_command = '';
+ }
+}
+
+# not too horrible
+sub _run {
+ my $cyradm = shift;
+ my $fstk = shift || [*STDIN, *STDOUT, *STDERR];
+ my $fin = shift || $fstk->[0] || *STDIN;
+ my ($hfh, $line);
+ $hfh = $use_rl->new('cyradm shell', $fin, $fstk->[1]);
+ $hfh->ornaments(0);
+ my $rc;
+ while (defined ($line = $hfh->readline((defined $$cyradm ?
+ $$cyradm->servername :
+ 'cyradm') . '> '))) {
+ local($@);
+ if (!defined(eval { $rc = _exec($cyradm, $fstk, $line); })) {
+ $fstk->[2]->print($@);
+ $fstk->[2]->print("\n") unless substr($@, -1, 1) eq "\n";
+ $rc = -1;
+ }
+ }
+ $rc;
+}
+
+# trivial; wrapper for _run with correct setup
+sub run {
+ my $cyradm;
+ _run(\$cyradm, [*STDIN, *STDOUT, *STDERR], *__DATA__);
+}
+
+# All the real work is done by _run(); this is a convenience wrapper.
+# (It's not as trivial as run() because it does things expected of standalone
+# programs, as opposed to things expected from within a program.)
+sub shell {
+ my ($server, $port, $authz, $auth, $systemrc, $userrc, $dorc, $mech, $pw,
+ $tlskey, $notls) =
+ ('', 143, undef, $ENV{USER} || $ENV{LOGNAME}, '/usr/local/etc/cyradmrc.pl',
+ "$ENV{HOME}/.cyradmrc.pl", 1, undef, undef, undef, undef);
+ GetOptions('user|u=s' => \$auth,
+ 'authz|z=s' => \$authz,
+ 'rc|r!' => \$dorc,
+ 'systemrc|S=s' => \$systemrc,
+ 'userrc=s' => \$userrc,
+ 'server|s=s' => \$server,
+ 'port|p=i' => \$port,
+ 'auth|a=s' => \$mech,
+ 'password|w=s' => \$pw,
+ 'tlskey|t:s' => \$tlskey,
+ 'notls' => \$notls,
+ 'help|h' => sub { cyradm_usage(); exit(0); }
+ );
+ if ($server ne '' && @ARGV) {
+ die "cyradm: may not specify server both with --server and bare arg\n";
+ }
+ if (@ARGV) {
+ $server = shift(@ARGV);
+ $port = shift(@ARGV) if @ARGV;
+ cyradm_usage() if @ARGV;
+ }
+ my $cyradm;
+ if ($server ne '') {
+ $cyradm = Cyrus::IMAP::Admin->new($server, $port)
+ or die "cyradm: cannot connect to server\n";
+ $cyradm->addcallback({-trigger => 'EOF',
+ -callback => \&_cb_eof,
+ -rock => \$cyradm});
+ $cyradm->authenticate(-authz => $authz, -user => $auth,
+ -mechanism => $mech, -password => $pw,
+ -tlskey => $tlskey, -notls => $notls)
+ or die "cyradm: cannot authenticate to server with $mech as $auth\n";
+ }
+ my $fstk = [*STDIN, *STDOUT, *STDERR];
+ if ($dorc && $systemrc ne '' && -f $systemrc) {
+ my $fh = IO::File->new($systemrc, O_RDONLY);
+ _run(\$cyradm, $fstk, *$fh) if $fh;
+ }
+ if ($dorc && $userrc ne '' && -f $userrc) {
+ my $fh = IO::File->new($userrc, O_RDONLY);
+ _run(\$cyradm, $fstk, *$fh) if $fh;
+ }
+ _run(\$cyradm, $fstk, *STDIN);
+}
+*cyradm = \&shell;
+
+###############################################################################
+
+# show cyradm command line arguments
+sub cyradm_usage {
+ print <<'END_OF_HELP';
+Usage: cyradm [args] server
+ --user <user> Connect as <user> (authentication name)
+ --authz <user> Authorize as <user>
+ --[no]rc (Do not) load the configuration files
+ --systemrc <file> Use system-wide configuration <file>
+ --userrc <file> Use user configuration <file>
+ --port <port> Connect to server on <port>
+ --auth <mechanism> Authenticate with <mechanism>
+
+Defaults to interactive mode. Please see man cyradm(1) and the 'help' command
+in the cyradm-shell for details.
+END_OF_HELP
+}
+
+# help display
+sub do_help {
+ my ($fd, $cmd, @list) = @_;
+ if (!@list || grep($_ eq $cmd, @list)) {
+ unless (defined($builtins{$cmd})) {
+ $fd->print("unknown command: $cmd\n");
+ return 0;
+ }
+ if (!ref($builtins{$cmd})) {
+ $fd->print("$cmd, alias for ");
+ do_help($fd, $builtins{$cmd}, $builtins{$cmd}, @list);
+ } else {
+ $fd->print("$cmd $builtins{$cmd}[1]\n\t$builtins{$cmd}[2]\n");
+ }
+ }
+ 1;
+}
+
+sub _sc_help {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt, $rc);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: help [command]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ $rc = 0;
+ if (@nargv) {
+ foreach my $cmd (sort {$a cmp $b} @nargv) {
+ $rc = 1 if !do_help($lfh->[1], $cmd, @nargv);
+ }
+ } else {
+ # compress commands and their aliases, plus one line of help
+ my %cmds;
+ my $cmd;
+ foreach $cmd (keys %builtins) {
+ if (ref($builtins{$cmd})) {
+ $cmds{$cmd} ||= [[], ''];
+ $cmds{$cmd}[1] = $builtins{$cmd}[2];
+ } else {
+ $cmds{$builtins{$cmd}} ||= [[], ''];
+ push(@{$cmds{$builtins{$cmd}}[0]}, $cmd);
+ }
+ }
+ my $nwid = 0;
+ foreach $cmd (keys %cmds) {
+ $cmds{$cmd}[0] = join(', ', $cmd, @{$cmds{$cmd}[0]});
+ $nwid = length($cmds{$cmd}[0]) if $nwid < length($cmds{$cmd}[0]);
+ }
+ foreach $cmd (sort {$a cmp $b} keys %cmds) {
+ $lfh->[1]->printf("%-*s %s\n", $nwid, $cmds{$cmd}[0], $cmds{$cmd}[1]);
+ }
+ }
+ $rc;
+}
+
+sub _sc_exit {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: exit [number]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv > 1) {
+ die "usage: exit [number]\n";
+ }
+ push(@nargv, 0) if !@nargv;
+ exit $nargv[0];
+}
+
+sub _sc_list {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my $cmd = 'listmailbox';
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt ne '' && '-subscribed' =~ /^\Q$opt/ || $opt eq '--subscribed') {
+ $cmd = 'listsubscribed';
+ }
+ elsif ($opt =~ /^-/) {
+ die "usage: listmailbox [-subscribed] [pattern [base]]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv > 2) {
+ die "usage: listmailbox [-subscribed] [pattern [base]]\n";
+ }
+ push(@nargv, '*') if !@nargv;
+ if (!$cyrref || !$$cyrref) {
+ die "listmailbox: no connection to server\n";
+ }
+ my ($l, $w, @l);
+ my @res = $$cyrref->$cmd(@nargv);
+ if (defined $$cyrref->error) {
+ $lfh->[2]->print($$cyrref->error, "\n");
+ return 1;
+ }
+ foreach my $mbx (@res) {
+ $l = $mbx->[0];
+ if ($mbx->[1] ne '') {
+ $l .= ' (' . $mbx->[1] . ')';
+ }
+ if (length($l) + 1 > $w) {
+ $w = length($l) + 1;
+ }
+ push(@l, $l);
+ }
+ return 1 if !@l;
+ @l = sort {$a cmp $b} @l;
+ my $ll = $ENV{COLUMNS} || 79;
+ $w = $ll if $w > $ll;
+ my $n = int($ll / $w);
+ my $c;
+ for ($l = 0; $l < int((@l + $n - 1) / $n); $l++) {
+ for ($c = 0; $c < @l; $c += int((@l + $n - 1) / $n)) {
+ if ($l + $c < @l) {
+ $lfh->[1]->print($l[$l + $c], ' ' x ($w + 1 - length($l[$l + $c])));
+ }
+ }
+ $lfh->[1]->print("\n");
+ }
+ 0;
+}
+
+sub _sc_listacl {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: listaclmailbox mailbox\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv != 1) {
+ die "usage: listaclmailbox mailbox\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "listaclmailbox: no connection to server\n";
+ }
+
+ sub showacl($@) {
+ my $spaces = shift;
+ my @nargv = shift;
+ my %acl = $$cyrref->listaclmailbox(@nargv);
+ if (defined $$cyrref->error) {
+ $lfh->[2]->print($$cyrref->error, "\n");
+ return 1;
+ }
+ foreach my $acl (keys %acl) {
+ for(my $i = 0; $i < $spaces; $i++) {
+ $lfh->[1]->print(" ");
+ }
+ $lfh->[1]->print($acl, " ", $acl{$acl}, "\n");
+ }
+ return 0;
+ }
+
+ if($nargv[0] =~ /(\*|%)/) {
+ # list operation
+ my @res = $$cyrref->listmailbox(($nargv[0]));
+ foreach my $mbx (@res) {
+ my $name = $mbx->[0];
+ my $flags = $mbx->[1];
+ next if($flags =~ /(\\noselect|\\nonexistent|\\placeholder)/i);
+ $lfh->[1]->print($name,":\n");
+ $nargv[0] = $name;
+ if(showacl(2, at nargv) != 0) {
+ return 1;
+ }
+ }
+ } else {
+ return showacl(0, at nargv);
+ }
+ return 0;
+}
+
+sub _sc_server {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt, $auth);
+ shift(@argv);
+ $auth = 1;
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt ne '' && '-noauthenticate' =~ /^\Q$opt/ ||
+ $opt eq '--noauthenticate') {
+ $auth = 0;
+ next;
+ }
+ if ($opt =~ /^-/) {
+ die "usage: server [-noauthenticate] [server]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (!@nargv) {
+ if (!$cyrref || !$$cyrref) {
+ die "server: no connection to server\n";
+ }
+ $lfh->[1]->print($$cyrref->servername, "\n");
+ 0;
+ }
+ elsif (@nargv == 1) {
+ $$cyrref = Cyrus::IMAP::Admin->new($nargv[0])
+ or die "server: $nargv[0]: cannot connect to server\n";
+ if ($auth) {
+ $$cyrref->authenticate or die "server: $nargv[0]: cannot authenticate\n";
+ }
+ 0;
+ }
+ else {
+ die "usage: server [-noauthenticate] [server]\n";
+ }
+}
+
+sub _sc_auth {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt, %opts, $want);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ if (defined $want) {
+ $opts{$want} = $opt;
+ $want = undef;
+ next;
+ }
+ last if $opt eq '--';
+ if ($opt ne '' && '-mechanisms' =~ /^\Q$opt/ || $opt eq '--mechanisms') {
+ $want = '-mechanism';
+ next;
+ }
+ if ($opt ne '' && '-minssf' =~ /^\Q$opt/ || $opt eq '--minssf') {
+ $want = '-minssf';
+ next;
+ }
+ if ($opt ne '' && '-maxssf' =~ /^\Q$opt/ || $opt eq '--maxssf') {
+ $want = '-maxssf';
+ next;
+ }
+ if ($opt ne '' && '-service' =~ /^\Q$opt/ || $opt eq '--service') {
+ $want = '-service';
+ next;
+ }
+ if (Cyrus::IMAP::imclient_havetls()) {
+ if ($opt ne '' && '-tlskey' =~ /^\Q$opt/ || $opt eq '--tlskey') {
+ $want = '-tlskey';
+ next;
+ }
+ if ($opt ne '' && '-notls' =~ /^\Q$opt/ || $opt eq '--notls') {
+ $want = '-notls';
+ next;
+ }
+ if ($opt =~ /^-/) {
+ die "usage: authenticate [-minssf N] [-maxssf N] [-mechanisms STR]\n".
+ " [-service name] [-tlskey keyfile] [-notls] [user]\n";
+ }
+ }
+ if ($opt =~ /^-/) {
+ die "usage: authenticate [-minssf N] [-maxssf N] [-mechanisms STR]\n".
+ " [-service name] [user]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv > 1) {
+ if (Cyrus::IMAP::imclient_havetls()) {
+ die "usage: authenticate [-minssf N] [-maxssf N] [-mechanisms STR]\n".
+ " [-service name] [-tlskey keyfile] [-notls] [user]\n";
+ } else {
+ die "usage: authenticate [-minssf N] [-maxssf N] [-mechanisms STR]\n".
+ " [-service name] [user]\n";
+ }
+ }
+ if (@nargv) {
+ $opts{-user} = shift(@nargv);
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "authenticate: no connection to server\n";
+ }
+ unless ($$cyrref->authenticate(%opts)) {
+ my $sn = $$cyrref->servername;
+ die "authenticate: authentication to server $sn failed\n";
+ }
+ 0;
+}
+
+sub _sc_quota {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: listquota root\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv != 1) {
+ die "usage: listquota root\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "listquota: no connection to server\n";
+ }
+ my %quota = $$cyrref->listquota(@nargv);
+ foreach my $quota (keys %quota) {
+ $lfh->[1]->print(" ", $quota, " ", $quota{$quota}[0], "/",
+ $quota{$quota}[1]);
+ if ($quota{$quota}[1]) {
+ $lfh->[1]->print(" (", $quota{$quota}[0] * 100 / $quota{$quota}[1], "%)");
+ }
+ }
+ $lfh->[1]->print("\n");
+ 0;
+}
+
+sub _sc_quotaroot {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: listquotaroot mailbox\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv != 1) {
+ die "usage: listquotaroot mailbox\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "listquotaroot: no connection to server\n";
+ }
+ my ($root, %quota) = $$cyrref->listquotaroot(@nargv);
+ $lfh->[1]->print($root);
+ my ($used, $tot);
+ foreach my $quota (keys %quota) {
+ ($used, $tot) = split(/ /, $quota{$quota});
+ $lfh->[1]->print(" ", $quota, " ", $quota{$quota}[0], "/",
+ $quota{$quota}[1]);
+ if ($quota{$quota}[1]) {
+ $lfh->[1]->print(" (", $quota{$quota}[0] * 100 / $quota{$quota}[1], "%)");
+ }
+ }
+ $lfh->[1]->print("\n");
+ 0;
+}
+
+sub _sc_disconn {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: disconnect\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv != 0) {
+ die "usage: disconnect\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "disconnect: no connection to server\n";
+ }
+ $$cyrref = undef;
+ 0;
+}
+
+sub _sc_chdir {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: chdir directory\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv != 1) {
+ die "usage: chdir directory\n";
+ }
+ chdir($nargv[0]) or die "chdir: $nargv[0]: $!\n";
+ 0;
+}
+
+sub _sc_create {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt, $part, $want);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ if ($want) {
+ $part = $opt;
+ $want = undef;
+ next;
+ }
+ if ($opt ne '' && '-partition' =~ /^\Q$opt/ || $opt eq '--partition') {
+ $want = 1;
+ next;
+ }
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: createmailbox [--partition partition] mailbox [partition]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (!@nargv || @nargv > 2) {
+ die "usage: createmailbox [--partition partition] mailbox [partition]\n";
+ }
+ if (defined($part)) {
+ push(@nargv, $part)
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "createmailbox: no connection to server\n";
+ }
+ $$cyrref->create(@nargv) || die "createmailbox: " . $$cyrref->error . "\n";
+ 0;
+}
+
+sub _sc_delete {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: deletemailbox mailbox [host]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (!@nargv || @nargv > 2) {
+ die "usage: deletemailbox mailbox [host]\n";
+ }
+ # @@ do I really care?
+ if (@nargv == 2) {
+ die "deletemailbox: host argument only supported in IMSP\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "deletemailbox: no connection to server\n";
+ }
+
+ if($nargv[0] =~ /(\*|%)/) {
+ # list operation
+ my @res = $$cyrref->listmailbox(($nargv[0]));
+ foreach my $mbx (@res) {
+ my $name = $mbx->[0];
+ my $flags = $mbx->[1];
+ next if($flags =~ /(\\noselect|\\nonexistent|\\placeholder)/i);
+ print "Deleting mailbox $name...";
+ $nargv[0] = $name;
+ my $rc = $$cyrref->delete(@nargv);
+ if(!defined($rc)) {
+ print $$cyrref->error . "\n";
+ last;
+ } else {
+ print "OK.\n";
+ }
+ }
+ } else {
+ $$cyrref->delete(@nargv) || die "deletemailbox: " . $$cyrref->error . "\n";
+ }
+ 0;
+}
+
+sub _sc_reconstruct {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ my $recurse = 0;
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ if($opt eq "-r") {
+ $recurse = 1;
+ } else {
+ die "usage: reconstruct [-r] mailbox\n";
+ }
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (!@nargv || @nargv > 1) {
+ die "usage: reconstruct [-r] mailbox\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "reconstruct: no connection to server\n";
+ }
+ $$cyrref->reconstruct(@nargv) || die "reconstruct: " .$$cyrref->error. "\n";
+ 0;
+}
+
+sub _sc_rename {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt, $want, $part);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ if ($want) {
+ $part = $opt;
+ $want = undef;
+ next;
+ }
+ if ($opt ne '' && '-partition' =~ /^\Q$opt/ || $opt eq '--partition') {
+ $want = 1;
+ next;
+ }
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: renamemailbox [--partition name] oldname " .
+ "newname [partition]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ $part = pop(@nargv) if @nargv > 2 && !defined($part);
+ if (@nargv != 2) {
+ die "usage: renamemailbox [--partition name] oldname " .
+ "newname [partition]\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "renamemailbox: no connection to server\n";
+ }
+ $$cyrref->rename($nargv[0], $nargv[1], $part) ||
+ die "renamemailbox: " . $$cyrref->error . "\n";
+ 0;
+}
+
+sub _sc_xfer {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt, $want, $part);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ if ($want) {
+ $part = $opt;
+ $want = undef;
+ next;
+ }
+ if ($opt ne '' && '-partition' =~ /^\Q$opt/ || $opt eq '--partition') {
+ $want = 1;
+ next;
+ }
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: xfermailbox [--partition name] mailbox " .
+ "server [partition]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ $part = pop(@nargv) if @nargv > 2 && !defined($part);
+ if (@nargv != 2) {
+ die "usage: xfermailbox [--partition name] mailbox " .
+ "server [partition]\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "xfermailbox: no connection to server\n";
+ }
+ $$cyrref->xfer($nargv[0], $nargv[1], $part) ||
+ die "xfermailbox: " . $$cyrref->error . "\n";
+ 0;
+}
+
+sub _sc_deleteacl {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: deleteaclmailbox mailbox id [id ...]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv < 2) {
+ die "usage: deleteaclmailbox mailbox id [id ...]\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "deleteaclmailbox: no connection to server\n";
+ }
+
+ if($nargv[0] =~ /(\*|%)/) {
+ # list operation
+ my @res = $$cyrref->listmailbox(($nargv[0]));
+ foreach my $mbx (@res) {
+ my $name = $mbx->[0];
+ my $flags = $mbx->[1];
+ next if($flags =~ /(\\noselect|\\nonexistent|\\placeholder)/i);
+ print "Deleting acl on $name...";
+ $nargv[0] = $name;
+ my $rc = $$cyrref->deleteacl(@nargv);
+ if(!defined($rc)) {
+ print $$cyrref->error . "\n";
+ last;
+ } else {
+ print "OK.\n";
+ }
+ }
+ } else {
+ $$cyrref->deleteacl(@nargv) ||
+ die "deleteaclmailbox: " . $$cyrref->error . "\n";
+ }
+
+ 0;
+}
+
+sub _sc_setacl {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: setaclmailbox mailbox id rights [id rights ...]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv < 3 || (@nargv - 1) % 2) {
+ die "usage: setaclmailbox mailbox id rights [id rights ...]\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "setaclmailbox: no connection to server\n";
+ }
+
+ if($nargv[0] =~ /(\*|%)/) {
+ # list operation
+ my @res = $$cyrref->listmailbox(($nargv[0]));
+ foreach my $mbx (@res) {
+ my $name = $mbx->[0];
+ my $flags = $mbx->[1];
+ next if($flags =~ /(\\noselect|\\nonexistent|\\placeholder)/i);
+ print "Setting ACL on $name...";
+ $nargv[0] = $name;
+ my $rc = $$cyrref->setacl(@nargv);
+ if(!defined($rc)) {
+ print $$cyrref->error . "\n";
+ last;
+ } else {
+ print "OK.\n";
+ }
+ }
+ } else {
+ $$cyrref->setacl(@nargv) || die "setaclmailbox: " . $$cyrref->error . "\n";
+ }
+ 0;
+}
+
+sub _sc_setquota {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die ("usage: setquota mailbox limit num [limit num ...]\n" .
+ " setquota mailbox num\n");
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv == 2) {
+ my ($mbox, $limit) = @nargv;
+ if ($limit eq 'none') {
+ @nargv = ($mbox);
+ print "remove quota\n";
+ } else {
+ @nargv = ($mbox, "STORAGE", $limit);
+ print "quota:", $limit, "\n";
+ }
+ }
+ if ((@nargv - 1) % 2) {
+ die ("usage: setquota mailbox limit num [limit num ...]\n" .
+ " setquota mailbox num\n");
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "setquota: no connection to server\n";
+ }
+ $$cyrref->setquota(@nargv) || die "setquota: " . $$cyrref->error . "\n";
+ 0;
+}
+
+sub _sc_version {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: version\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv != 0) {
+ die "usage: version\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "version: no connection to server\n";
+ }
+
+ my $info;
+ $$cyrref->addcallback({-trigger => 'ID',
+ -callback => sub {
+ my %d = @_;
+ $info = $d{-text};
+ }});
+ my ($rc, $msg) = $$cyrref->send('', '', 'ID NIL');
+ $$cyrref->addcallback({-trigger => 'ID'});
+ if ($rc ne 'OK') {
+ $lfh->[2]->print($msg, "\n");
+ return 1;
+ }
+
+ if ($info eq 'NIL') {
+ $lfh->[1]->print("no version info returned by server\n");
+ return 0;
+ }
+ while ($info =~ s/\"([^\"]+)\"\s+(\"[^\"]+\"|NIL)\s*//) {
+ my $field = $1;
+ my $value = $2;
+ $value =~ s/\"//g; # strip quotes
+ # split environment into multiple lines
+ $value =~ s/;/\n /g if $field eq 'environment';
+ $value = '' if $value eq 'NIL'; # convert NIL to empty string
+ $lfh->[1]->printf("%-11s: %s\n", $field, $value);
+ }
+ 0;
+}
+
+sub _sc_info {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: info [mailbox]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (!$cyrref || !$$cyrref) {
+ die "info: no connection to server\n";
+ }
+ my %info = $$cyrref->getinfo(@nargv);
+ if (defined $$cyrref->error) {
+ $lfh->[2]->print($$cyrref->error, "\n");
+ return 1;
+ }
+
+ # keep track of what mailboxes we've printed a header for already
+ my %section = ();
+ foreach my $attrib (sort keys %info) {
+ $attrib =~ /(\{.*\})/;
+ my $sect = $1;
+ if(!defined($sect)) {
+ $sect = "Server Wide";
+ }
+
+ if(!exists $section{$sect}) {
+ $section{$sect} = 'x';
+ print "$sect:\n";
+ }
+
+ $attrib =~ /([^\/]*)$/;
+ my $attrname = $1;
+
+ $lfh->[1]->print(" ", $attrname, ": ", $info{$attrib}, "\n");
+ }
+ 0;
+}
+
+sub _sc_subscribe {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: subscribe [mailbox]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (!$cyrref || !$$cyrref) {
+ die "subscribe: no connection to server\n";
+ }
+ $$cyrref->subscribe(@nargv);
+ if (defined $$cyrref->error) {
+ $lfh->[2]->print($$cyrref->error, "\n");
+ return 1;
+ }
+ 0;
+}
+
+sub _sc_unsubscribe {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ # gack. bloody tcl.
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: unsubscribe [mailbox]\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (!$cyrref || !$$cyrref) {
+ die "unsubscribe: no connection to server\n";
+ }
+ $$cyrref->unsubscribe(@nargv);
+ if (defined $$cyrref->error) {
+ $lfh->[2]->print($$cyrref->error, "\n");
+ return 1;
+ }
+ 0;
+}
+
+sub _sc_mboxcfg {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat] value\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv < 2) {
+ die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat] value\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "mboxconfig: no connection to server\n";
+ }
+ $$cyrref->mboxconfig(@nargv) || die "mboxconfig: " . $$cyrref->error . "\n";
+ 0;
+}
+
+sub _sc_setinfo {
+ my ($cyrref, $name, $fh, $lfh, @argv) = @_;
+ my (@nargv, $opt);
+ shift(@argv);
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+ die "usage: setinfo [motd|comment|admin|shutdown|expire|squat] text\n";
+ }
+ else {
+ push(@nargv, $opt);
+ last;
+ }
+ }
+ push(@nargv, @argv);
+ if (@nargv < 2) {
+ die "usage: setinfo [motd|comment|admin|shutdown|expire|squat] text\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "setinfo: no connection to server\n";
+ }
+ $$cyrref->setinfoserver(@nargv) || die "setinfo: " . $$cyrref->error . "\n";
+ 0;
+}
+
+###############################################################################
+
+#
+# This exists so I don't have to use a separate interface to read from a file.
+#
+
+package Cyrus::IMAP::DummyReadline;
+use IO::File;
+
+sub new {
+ my ($class, $dummy, $in, $out) = @_;
+ autoflush $out 1;
+ bless {in => $in, out => $out}, $class;
+}
+
+sub ornaments {
+ return;
+}
+
+sub readline {
+ my ($self, $prompt) = @_;
+ my $l;
+ my $fh = $self->{in};
+ my $ofh = $self->{out};
+ print $ofh $prompt;
+ return undef unless defined($l = <$fh>);
+ chomp($l);
+ $l;
+}
+
+1;
+
+=head1 NAME
+
+Cyrus::IMAP::Shell - Perl version of cyradm
+
+=head1 SYNOPSIS
+
+ $ cyradm [--user authid] [--authz authzid] [--[no]rc] [--systemrc file] [--userrc file] \
+ > [--port n] [--auth mechanism] [--server] server
+
+but possibly
+
+ $ perl -MCyrus::IMAP::Shell -e 'run("myscript")'
+
+or even (not recommended)
+
+ use Cyrus::IMAP::Admin::Shell;
+
+ run('myscriptname');
+
+=head1 DESCRIPTION
+
+This module implements B<cyradm> in Perl. It is a shell around
+L<Cyrus::IMAP::Admin>. Commands are provided in both Tcl-compatible
+forms and GNU-style long option forms.
+
+=head1 COMMANDS
+
+=over 4
+
+=item C<authenticate> [C<--minssf> I<N>] [C<--maxssf> I<N>] [C<--mechanisms> I<list>] [I<user>]
+
+=item C<auth> [C<--minssf> I<N>] [C<--maxssf> I<N>] [C<--mechanisms> I<list>] [I<user>]
+
+=item C<login> [C<--minssf> I<N>] [C<--maxssf> I<N>] [C<--mechanisms> I<list>] [I<user>]
+
+Authenticate to server. You must already be connected to a server and
+Cyrus imapd will refuse to allow you to re-authenticate once you have
+authenticated once.
+
+=item C<chdir> I<directory>
+
+=item C<cd> I<directory>
+
+Change directory. A C<pwd> builtin is not provided, but the default command
+action will run C<pwd> from a shell if invoked.
+
+=item C<createmailbox> [C<--partition> I<partition>] I<mailbox>
+
+=item C<createmailbox> I<mailbox> I<partition>
+
+=item C<create> [C<--partition> I<partition>] I<mailbox>
+
+=item C<create> I<mailbox> I<partition>
+
+=item C<cm> [C<--partition> I<partition>] I<mailbox>
+
+=item C<cm> I<mailbox> I<partition>
+
+Create a mailbox on the default or a specified partition. Both old-style
+and getopt-style usages are accepted (combining them will produce an error).
+
+=item C<deleteaclmailbox> I<mailbox> I<id> [...]
+
+=item C<deleteacl> I<mailbox> I<id> [...]
+
+=item C<dam> I<mailbox> I<id> [...]
+
+Remove ACLs from the specified mailbox.
+
+=item C<deletemailbox> I<mailbox>
+
+=item C<delete> I<mailbox>
+
+=item C<dm> I<mailbox>
+
+Delete the specified mailbox.
+
+Administrators do not have implicit delete rights on mailboxes. Use the
+B<setaclmailbox> command to grant the C<k> permission to your
+principal if you need to delete a mailbox you do not own.
+
+Note that the online help admits to an optional host argument. This argument
+is not currently used, and will be rejected with an error if specified; it
+is reserved for IMSP.
+
+=item C<disconnect>
+
+=item C<disc>
+
+Disconnect from the current server. The prompt will revert to C<cyradmE<gt>>.
+
+=item C<exit> [I<number>]
+
+=item C<quit> [I<number>]
+
+Exit B<cyradm>, optionally with a specific exit status; the exit status of the
+last command will be used if one is not specified.
+
+=item help [command]
+
+=item ? [command]
+
+Show help for C<command> or all commands.
+
+=item C<info> [I<mailbox>]
+
+Display the mailbox/server metadata.
+
+=item listaclmailbox I<mailbox>
+
+=item listacl I<mailbox>
+
+=item lam I<mailbox>
+
+List ACLs on the specified mailbox.
+
+=item C<listmailbox> [C<--subscribed>] [I<pattern> [I<reference>]]
+
+=item C<list> [C<--subscribed>] [I<pattern> [I<reference>]]
+
+=item C<lm> [C<--subscribed>] [I<pattern> [I<reference>]]
+
+List all, or all subscribed, mailboxes matching the specified pattern.
+The pattern may have embedded wildcards C<'*'> or C<'%'>, which match
+anything or anything except the separator character, respectively.
+
+Mailboxes returned will be relative to the specified reference if one
+is specified. This allows a mailbox list to be limited to a particular
+hierarchy.
+
+In some cases when the C<'%'> wildcard is used to end a pattern, it may
+match an entry which is not a mailbox but which contains other mailboxes.
+In this case, the entry will be parenthesized to indicate that it is a
+root for other mailboxes, as opposed to a mailbox itself.
+
+=item C<listquota> I<root>
+
+=item C<lq> I<root>
+
+List quotas on specified root. If the specified mailbox path does not have
+a quota assigned, an error will be raised; see L<listquotaroot> for a way to
+find the quota root for a mailbox.
+
+=item C<listquotaroot> I<mailbox>
+
+=item C<lqm> I<mailbox>
+
+=item C<lqr> I<mailbox?>
+
+show quota roots and quotas for mailbox
+
+=item C<mboxconfig> I<mailbox> I<attribute> I<value>
+
+=item C<mboxcfg> I<mailbox> I<attribute> I<value>
+
+Set mailbox metadata. A value of "none" will remove the attribute.
+The currently supported attributes are:
+
+=over 4
+
+=item C<comment>
+
+Sets a comment or description associated with the mailbox.
+
+=item C<condstore>
+
+Enables the IMAP CONDSTORE extension (modification sequences) on the mailbox.
+
+=item C<expire>
+
+Sets the number of days after which messages will be expired from the mailbox.
+
+=item C<sieve>
+
+Indicates the name of the global sieve script that should be run when
+a message is delivered to the shared mailbox (not used for personal
+mailboxes).
+
+=item C<squat>
+
+Indicates that the mailbox should have a squat index created for it.
+
+=item C<news2mail>
+
+Sets an email address to which messages injected into the server via NNTP
+will be sent.
+
+=back
+
+=item C<renamemailbox> [C<--partition> I<partition>] I<oldname> I<newname>
+
+=item C<rename> [C<--partition> I<partition>] I<oldname> I<newname>
+
+=item C<renm> [C<--partition> I<partition>] I<oldname> I<newname>
+
+=item C<renamemailbox> I<oldname> I<newname> [I<partition>]
+
+=item C<rename> I<oldname> I<newname> [I<partition>]
+
+=item C<renm> I<oldname> I<newname> [I<partition>]
+
+Rename the specified mailbox, optionally moving it to a different partition.
+Both old-style and getopt-style usages are accepted; combining them will
+produce an error.
+
+=item server [--noauthenticate] [server]
+
+=item connect [--noauthenticate] [server]
+
+=item servername [--noauthenticate] [server]
+
+With no arguments, show the current server. With an argument, connect to that
+server. It will prompt for automatic login unless the C<--noauthenticate>
+option is specified. (This may change; in particular, either automatic
+authentication will be removed or all C<authenticate> options will be added.)
+
+When connected to a server, B<cyradm>'s prompt changes from C<cyradmE<gt>> to
+C<servernameE<gt>>, where I<servername> is the fully qualified domain name
+of the connected server.
+
+=item C<setaclmailbox> I<mailbox> I<id> I<rights> [I<id> I<rights> ...]
+
+=item C<setacl> I<mailbox> I<id> I<rights> [I<id> I<rights> ...]
+
+=item C<sam> I<mailbox> I<id> I<rights> [I<id> I<rights> ...]
+
+Set ACLs on a mailbox. The ACL may be one of the special strings C<none>,
+C<read> (C<lrs>), C<post> (C<lrsp>), C<append> (C<lrsip>), C<write>
+(C<lrswipkxte>), C<delete> (C<lrxte>), or C<all> (C<lrswipkxte>), or
+any combinations of the ACL codes:
+
+=over 4
+
+=item l
+
+Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox)
+
+=item r
+
+Read (SELECT/EXAMINE the mailbox, perform STATUS)
+
+=item s
+
+Seen (set/clear \SEEN flag via STORE, also set \SEEN flag during
+ APPEND/COPY/FETCH BODY[...])
+
+=item w
+
+Write flags other than \SEEN and \DELETED
+
+=item i
+
+Insert (APPEND, COPY destination)
+
+=item p
+
+Post (send mail to mailbox)
+
+=item k
+
+Create mailbox (CREATE new sub-mailboxes, parent for new mailbox in RENAME)
+
+=item x
+
+Delete mailbox (DELETE mailbox, old mailbox name in RENAME)
+
+=item t
+
+Delete messages (set/clear \DELETED flag via STORE, also set \DELETED
+ flag during APPEND/COPY)
+
+=item e
+
+Perform EXPUNGE and expunge as part of CLOSE
+
+=item a
+
+Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)
+
+=back
+
+=item C<setinfo> I<attribute> I<value>
+
+Set server metadata. A value of "none" will remove the attribute.
+The currently supported attributes are:
+
+=over 4
+
+=item C<motd>
+
+Sets a "message of the day". The message gets displayed as an ALERT after
+authentication.
+
+=item C<comment>
+
+Sets a comment or description associated with the server.
+
+=item C<admin>
+
+Sets the administrator email address for the server.
+
+=item C<shutdown>
+
+Sets a shutdown message. The message gets displayed as an ALERT and
+all users are disconnected from the server (subsequent logins are disallowed).
+
+=item C<expire>
+
+Sets the number of days after which messages will be expired from the
+server (unless overridden by a mailbox annotation).
+
+=item C<squat>
+
+Indicates that all mailboxes should have a squat indexes created for
+them (unless overridden by a mailbox annotation).
+
+=back
+
+=item C<setquota> I<root> I<resource> I<value> [I<resource> I<value> ...]
+
+=item C<sq> I<root> I<resource> I<value> [I<resource> I<value> ...]
+
+Set a quota on the specified root, which may or may not be an actual mailbox.
+The only I<resource> understood by B<Cyrus> is C<STORAGE>. The units
+are as defined in RFC 2087, groups of 1024 octets (i.e. Kilobytes).
+The I<value> may be the special string C<none> which will remove the quota.
+
+=item C<version>
+
+=item C<ver>
+
+Display the version info of the current server.
+
+=item C<xfermailbox> [C<--partition> I<partition>] I<mailbox> I<server>
+
+=item C<xfer> [C<--partition> I<partition>] I<mailbox> I<server>
+
+=item C<xfermailbox> I<mailbox> I<server> [I<partition>]
+
+=item C<xfer> I<mailbox> I<server> [I<partition>]
+
+Transfer (relocate) the specified mailbox to a different server.
+Both old-style and getopt-style usages are accepted; combining them will
+produce an error.
+
+=back
+
+=head1 NOTES
+
+GNU-style long options must be given in their entirety; Tcl-style options
+may be abbreviated.
+
+Tcl-style options are provided as a compatibility feature. They will
+probably go away in the future.
+
+Multiple commands can be given on a line, separated by C<';'> characters.
+
+All commands set an exit status, which at present is not useful.
+
+Unknown commands are passed to a subshell for execution.
+
+The Tcl version of B<cyradm> is used for scripting as well as interactively.
+While this is possible to a limited extent by use of the C<run> method,
+scripting would normally be done with C<Cyrus::IMAP::Admin>, which is far
+more flexible than either interactive C<cyradm> or the Tcl scripting
+mechanism for Cyrus.
+
+B<cyradm> understands B</bin/sh>-style redirection: any command can have
+its standard or error output redirected, with all B<sh>-style redirections
+(except C<E<lt>E<gt>>) supported. It does not currently understand pipes
+or backgrounding.
+
+If the C<Term::Readline::Perl> or C<Term::Readline::GNU> modules are
+available, B<cyradm> will use it.
+
+An alias facility is implemented internally, but no access is currently
+provided to it. This will change, if only to allow some of the predefined
+aliases to be removed if they conflict with useful shell commands.
+
+=head1 AUTHOR
+
+Brandon S. Allbery, allbery at ece.cmu.edu
+
+=head1 SEE ALSO
+
+Cyrus::IMAP::Admin
+Term::ReadLine
+sh(1), perl(1), imapd(8).
+
+=cut
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/MANIFEST
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/MANIFEST?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/MANIFEST (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/MANIFEST Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+README Notes on this mess
+Changes The evolution of this weirdness
+IMAP.pm Cyrus::IMAP: Perl interface to Cyrus imclient library
+IMAP/Admin.pm Cyrus::IMAP::Admin: administrative Cyrus functions
+IMAP/Shell.pm Cyrus::IMAP::Shell: cyradm command shell
+IMAP/IMSP.pm Cyrus::IMAP::IMSP: IMSP support routines
+IMAP.xs Perl interface routines for Cyrus library
+MANIFEST This file
+Makefile.PL Build Makefile for Cyrus::IMAP
+cyrperl.h Declarations shared between Cyrus.xs and xsutil.c
+xsutil.c Callback and utility functions for Cyrus interface
+typemap Typemap defining IMAP_Cyrus Perl "class"
+cyradm.sh Shell script wrapper for Cyrus::IMAP::Shell
+examples/auditmbox.pl (lame) Example of Cyrus::IMAP::Admin
+t/01-imclient.t Test script for Cyrus::IMAP
+t/02-admin.t (lame) Test script for Cyrus::IMAP::Admin
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Makefile.PL
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Makefile.PL?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Makefile.PL (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/Makefile.PL Sat Aug 26 02:00:13 2006
@@ -1,0 +1,71 @@
+#
+#
+# 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Makefile.PL,v 1.17.2.1 2006/02/07 18:57:20 murch Exp $
+
+use ExtUtils::MakeMaker;
+use Config;
+
+my $SASL_INC = $ENV{SASL_INC};
+my $SASL_LIB = $ENV{SASL_LIB} || "-lsasl2";
+
+my $OPENSSL_INC = $ENV{OPENSSL_INC};
+my $OPENSSL_LIB = $ENV{OPENSSL_LIB};
+
+my $BDB_INC = $ENV{BDB_INC};
+my $BDB_LIB = $ENV{BDB_LIB};
+
+my $LIB_RT = $ENV{LIB_RT};
+
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written.
+$libs = "-lcyrus";
+
+WriteMakefile(
+ 'NAME' => 'Cyrus::IMAP',
+ 'ABSTRACT' => 'Cyrus administrative interface',
+ 'VERSION_FROM' => 'IMAP.pm', # finds $VERSION
+ 'macro' => {'IMCLIENT_LIBS' => ''}, # hack
+ 'clean' => {'FILES' => 'libcyrperl.a cyradm'},
+ 'OBJECT' => 'IMAP.o',
+ 'MYEXTLIB' => '../../lib/libcyrus.a ../../lib/libcyrus_min.a',
+ 'LIBS' => ["$BDB_LIB $SASL_LIB $OPENSSL_LIB $LIB_RT -lssl -lcrypto"],
+ 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
+ 'INC' => "-I../../lib -I../.. -I../../et $SASL_INC $OPENSSL_INC",
+ 'EXE_FILES' => [cyradm],
+);
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,35 @@
+$Id: README,v 1.2.8.1 2003/12/19 18:33:50 ken3 Exp $
+
+This is a Perl interface to the Cyrus imclient library, and an administrative
+library, and a replacement for the "cyradm" shell. The imclient library is
+used (instead of using existing IMAP modules) because it supports SASL, which
+appears to be required for administrative connections to Cyrus 1.6.x.
+
+To build:
+
+ [export CYRUS_SRC=/path/to/cyrus-imapd-source-dir]
+ perl Makefile.PL
+ make
+ make test # or see below
+ make install
+
+"make test" is supposed to test the imclient (IMAP::Cyrus) and perform very
+limited testing of Cyrus::IMAP::Admin. Full testing cannot be done because
+it requires a test account on the IMAP server and the tester to have an admin
+credential. (Unfortunately, SASL prompts for input via stdout and the test
+harness eats stdout, so you can only run the tests by hand. Sigh.)
+
+For more complete testing, you may run it in interactive mode:
+
+ perl -Iblib/arch -Iblib/lib -MIMAP::Cyrus::Shell \
+ -e shell [-- --user adminname] [server]
+
+cyradm.sh does this (and will be installed as "cyradm"), but it expects
+IMAP::Cyrus to already be installed.
+
+For more information, perldoc is your friend:
+
+ perldoc Cyrus::IMAP # imclient library
+ perldoc Cyrus::IMAP::Admin # administrative library
+ perldoc Cyrus::IMAP::Shell # cyradm shell
+ man cyradm # the same
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyradm.sh
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyradm.sh?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyradm.sh (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyradm.sh Sat Aug 26 02:00:13 2006
@@ -1,0 +1,439 @@
+#! /bin/sh
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#
+# $Id: cyradm.sh,v 1.13.2.6 2006/03/31 19:22:29 murch Exp $
+case "x$BASH_VERSION" in
+x) exec perl -MCyrus::IMAP::Shell -e shell -- ${1+"$@"} ;;
+*) exec perl -MCyrus::IMAP::Shell -e shell -- "$@" ;;
+esac
+echo "$0: how did I get here?" >&2
+exit 1
+
+=head1 NAME
+
+cyradm - Cyrus administration shell, alter ego of Cyrus::IMAP::Shell
+
+=head1 SYNOPSIS
+
+ $ cyradm [--user user] [--[no]rc] [--systemrc file] [--userrc file] \
+ > [--port n] [--auth mechanism] [--tlskey keyfile] [--notls] \
+ > [--server] server
+
+but possibly
+
+ $ perl -MCyrus::IMAP::Shell -e 'run("myscript")'
+
+or even (not recommended)
+
+ use Cyrus::IMAP::Admin::Shell;
+
+ run('myscriptname');
+
+=head1 DESCRIPTION
+
+This module implements B<cyradm> in Perl. It is a shell around
+L<Cyrus::IMAP::Admin>. Commands are provided in both Tcl-compatible
+forms and GNU-style long option forms.
+
+=head1 COMMANDS
+
+=over 4
+
+=item C<authenticate> [C<--minssf> I<N>] [C<--maxssf> I<N>] [C<--mechanisms> I<list>] [I<user>]
+
+=item C<auth> [C<--minssf> I<N>] [C<--maxssf> I<N>] [C<--mechanisms> I<list>] [I<user>]
+
+=item C<login> [C<--minssf> I<N>] [C<--maxssf> I<N>] [C<--mechanisms> I<list>] [I<user>]
+
+Authenticate to server. You must already be connected to a server and
+Cyrus imapd will refuse to allow you to re-authenticate once you have
+authenticated once.
+
+=item C<chdir> I<directory>
+
+=item C<cd> I<directory>
+
+Change directory. A C<pwd> builtin is not provided, but the default command
+action will run C<pwd> from a shell if invoked.
+
+=item C<createmailbox> [C<--partition> I<partition>] I<mailbox>
+
+=item C<createmailbox> I<mailbox> I<partition>
+
+=item C<create> [C<--partition> I<partition>] I<mailbox>
+
+=item C<create> I<mailbox> I<partition>
+
+=item C<cm> [C<--partition> I<partition>] I<mailbox>
+
+=item C<cm> I<mailbox> I<partition>
+
+Create a mailbox on the default or a specified partition. Both old-style
+and getopt-style usages are accepted (combining them will produce an error).
+
+=item C<deleteaclmailbox> I<mailbox> I<id> [...]
+
+=item C<deleteacl> I<mailbox> I<id> [...]
+
+=item C<dam> I<mailbox> I<id> [...]
+
+Remove ACLs from the specified mailbox.
+
+=item C<deletemailbox> I<mailbox>
+
+=item C<delete> I<mailbox>
+
+=item C<dm> I<mailbox>
+
+Delete the specified mailbox.
+
+Administrators do not have implicit delete rights on mailboxes. Use the
+B<setaclmailbox> command to grant the C<x> permission to your
+principal if you need to delete a mailbox you do not own.
+
+Note that the online help admits to an optional host argument. This argument
+is not currently used, and will be rejected with an error if specified; it
+is reserved for IMSP.
+
+=item C<disconnect>
+
+=item C<disc>
+
+Disconnect from the current server. The prompt will revert to C<cyradmE<gt>>.
+
+=item C<exit> [I<number>]
+
+=item C<quit> [I<number>]
+
+Exit B<cyradm>, optionally with a specific exit status; the exit status of the
+last command will be used if one is not specified.
+
+=item help [command]
+
+=item ? [command]
+
+Show help for C<command> or all commands.
+
+=item C<info> [I<mailbox>]
+
+Display the mailbox/server metadata.
+
+=item C<listaclmailbox> I<mailbox>
+
+=item C<listacl> I<mailbox>
+
+=item C<lam> I<mailbox>
+
+List ACLs on the specified mailbox.
+
+=item C<listmailbox> [C<--subscribed>] [I<pattern> [I<reference>]]
+
+=item C<list> [C<--subscribed>] [I<pattern> [I<reference>]]
+
+=item C<lm> [C<--subscribed>] [I<pattern> [I<reference>]]
+
+List all, or all subscribed, mailboxes matching the specified pattern.
+The pattern may have embedded wildcards C<'*'> or C<'%'>, which match
+anything or anything except the separator character, respectively.
+
+Mailboxes returned will be relative to the specified reference if one
+is specified. This allows a mailbox list to be limited to a particular
+hierarchy.
+
+In some cases when the C<'%'> wildcard is used to end a pattern, it may
+match an entry which is not a mailbox but which contains other mailboxes.
+In this case, the entry will be parenthesized to indicate that it is a
+root for other mailboxes, as opposed to a mailbox itself.
+
+=item C<listquota> I<root>
+
+=item C<lq> I<root>
+
+List quotas on specified root. If the specified mailbox path does not have
+a quota assigned, an error will be raised; see I<listquotaroot> for a way to
+find the quota root for a mailbox.
+
+=item C<listquotaroot> I<mailbox>
+
+=item C<lqm> I<mailbox>
+
+=item C<lqr> I<mailbox?>
+
+show quota roots and quotas for mailbox
+
+=item C<mboxconfig> I<mailbox> I<attribute> I<value>
+
+=item C<mboxcfg> I<mailbox> I<attribute> I<value>
+
+Set mailbox metadata. A value of "none" will remove the attribute.
+The currently supported attributes are:
+
+=over 4
+
+=item C<comment>
+
+Sets a comment or description associated with the mailbox.
+
+=item C<condstore>
+
+Enables the IMAP CONDSTORE extension (modification sequences) on the mailbox.
+
+=item C<expire>
+
+Sets the number of days after which messages will be expired from the mailbox.
+
+=item C<sieve>
+
+Indicates the name of the global sieve script that should be run when
+a message is delivered to the shared mailbox (not used for personal
+mailboxes).
+
+=item C<squat>
+
+Indicates that the mailbox should have a squat index created for it.
+
+=item C<news2mail>
+
+Sets an email address to which messages injected into the server via NNTP
+will be sent.
+
+=back
+
+=item C<renamemailbox> [C<--partition> I<partition>] I<oldname> I<newname>
+
+=item C<rename> [C<--partition> I<partition>] I<oldname> I<newname>
+
+=item C<renm> [C<--partition> I<partition>] I<oldname> I<newname>
+
+=item C<renamemailbox> I<oldname> I<newname> [I<partition>]
+
+=item C<rename> I<oldname> I<newname> [I<partition>]
+
+=item C<renm> I<oldname> I<newname> [I<partition>]
+
+Rename the specified mailbox, optionally moving it to a different partition.
+Both old-style and getopt-style usages are accepted; combining them will
+produce an error.
+
+=item server [--noauthenticate] [server]
+
+=item connect [--noauthenticate] [server]
+
+=item servername [--noauthenticate] [server]
+
+With no arguments, show the current server. With an argument, connect to that
+server. It will prompt for automatic login unless the C<--noauthenticate>
+option is specified. (This may change; in particular, either automatic
+authentication will be removed or all C<authenticate> options will be added.)
+
+When connected to a server, B<cyradm>'s prompt changes from C<cyradmE<gt>> to
+C<servernameE<gt>>, where I<servername> is the fully qualified domain name
+of the connected server.
+
+=item C<setaclmailbox> I<mailbox> I<id> I<rights> [I<id> I<rights> ...]
+
+=item C<setacl> I<mailbox> I<id> I<rights> [I<id> I<rights> ...]
+
+=item C<sam> I<mailbox> I<id> I<rights> [I<id> I<rights> ...]
+
+Set ACLs on a mailbox. The ACL may be one of the special strings C<none>,
+C<read> (C<lrs>), C<post> (C<lrsp>), C<append> (C<lrsip>), C<write>
+(C<lrswipkxte>), C<delete> (C<lrxte>), or C<all> (C<lrswipkxte>), or
+any combinations of the ACL codes:
+
+=over 4
+
+=item l
+
+Lookup (mailbox is visible to LIST/LSUB, SUBSCRIBE mailbox)
+
+=item r
+
+Read (SELECT/EXAMINE the mailbox, perform STATUS)
+
+=item s
+
+Seen (set/clear \SEEN flag via STORE, also set \SEEN flag during
+ APPEND/COPY/FETCH BODY[...])
+
+=item w
+
+Write flags other than \SEEN and \DELETED
+
+=item i
+
+Insert (APPEND, COPY destination)
+
+=item p
+
+Post (send mail to mailbox)
+
+=item k
+
+Create mailbox (CREATE new sub-mailboxes, parent for new mailbox in RENAME)
+
+=item x
+
+Delete mailbox (DELETE mailbox, old mailbox name in RENAME)
+
+=item t
+
+Delete messages (set/clear \DELETED flag via STORE, also set \DELETED
+ flag during APPEND/COPY)
+
+=item e
+
+Perform EXPUNGE and expunge as part of CLOSE
+
+=item a
+
+Administer (SETACL/DELETEACL/GETACL/LISTRIGHTS)
+
+=back
+
+=item C<setinfo> I<attribute> I<value>
+
+Set server metadata. A value of "none" will remove the attribute.
+The currently supported attributes are:
+
+=over 4
+
+=item C<motd>
+
+Sets a "message of the day". The message gets displayed as an ALERT after
+authentication.
+
+=item C<comment>
+
+Sets a comment or description associated with the server.
+
+=item C<admin>
+
+Sets the administrator email address for the server.
+
+=item C<shutdown>
+
+Sets a shutdown message. The message gets displayed as an ALERT and
+all users are disconnected from the server (subsequent logins are disallowed).
+
+=item C<expire>
+
+Sets the number of days after which messages will be expired from the
+server (unless overridden by a mailbox annotation).
+
+=item C<squat>
+
+Indicates that all mailboxes should have a squat indexes created for
+them (unless overridden by a mailbox annotation).
+
+=back
+
+=item C<setquota> I<root> I<resource> I<value> [I<resource> I<value> ...]
+
+=item C<sq> I<root> I<resource> I<value> [I<resource> I<value> ...]
+
+Set a quota on the specified root, which may or may not be an actual mailbox.
+The only I<resource> understood by B<Cyrus> is C<STORAGE>. The I<value> may
+be the special string C<none> which will remove the quota.
+
+=item C<version>
+
+=item C<ver>
+
+Display the version info of the current server.
+
+=item C<xfermailbox> [C<--partition> I<partition>] I<mailbox> I<server>
+
+=item C<xfer> [C<--partition> I<partition>] I<mailbox> I<server>
+
+=item C<xfermailbox> I<mailbox> I<server> [I<partition>]
+
+=item C<xfer> I<mailbox> I<server> [I<partition>]
+
+Transfer (relocate) the specified mailbox to a different server.
+Both old-style and getopt-style usages are accepted; combining them will
+produce an error.
+
+=back
+
+=head1 NOTES
+
+GNU-style long options must be given in their entirety; Tcl-style options
+may be abbreviated.
+
+Tcl-style options are provided as a compatibility feature. They will
+probably go away in the future.
+
+Multiple commands can be given on a line, separated by C<';'> characters.
+
+All commands set an exit status, which at present is not useful.
+
+Unknown commands are passed to a subshell for execution.
+
+The Tcl version of B<cyradm> is used for scripting as well as interactively.
+While this is possible to a limited extent by use of the C<run> method,
+scripting would normally be done with C<Cyrus::IMAP::Admin>, which is far
+more flexible than either interactive C<cyradm> or the Tcl scripting
+mechanism for Cyrus.
+
+B<cyradm> understands B</bin/sh>-style redirection: any command can have
+its standard or error output redirected, with all B<sh>-style redirections
+(except C<E<lt>E<gt>>) supported. It does not currently understand pipes
+or backgrounding.
+
+If the C<Term::Readline::Perl> or C<Term::Readline::GNU> modules are
+available, B<cyradm> will use it.
+
+An alias facility is implemented internally, but no access is currently
+provided to it. This will change, if only to allow some of the predefined
+aliases to be removed if they conflict with useful shell commands.
+
+=head1 AUTHOR
+
+Brandon S. Allbery, allbery at ece.cmu.edu
+
+=head1 SEE ALSO
+
+Cyrus::IMAP::Admin
+Term::ReadLine
+sh(1), perl(1), imapd(8).
+
+=cut
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyrperl.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyrperl.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyrperl.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/cyrperl.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,102 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $Id: cyrperl.h,v 1.7 2003/02/13 20:15:49 rjs3 Exp $ */
+/*
+ * Internal callback rock, used to invoke arbitrary Perl code via a CODE
+ * reference ( \&sub ). Allocate with Perl's New(), free with Safefree().
+ * The Perl callback is a CODE reference; the rock is any Perl value.
+ * autofree is nonzero if the C callback routine should decrement the
+ * refcounts on the Perl objects and free the callback struct (used by the
+ * imclient_send() finish callback).
+ */
+
+struct xsccb {
+ SV *pcb; /* Perl callback PV */
+ SV *prock; /* Perl rock SV */
+ /* gack. but otherwise we're in even more pain */
+ struct xscyrus *client; /* client object, pre-Perlization */
+ int autofree; /* nonzero if callback should free it */
+};
+
+#ifdef CYRPERL_INTERNAL
+#define rock_t struct xsccb *
+#else
+#define rock_t void *
+#endif
+
+/*
+ * our wrapper for the cyrus imclient struct. mainly exists so I can track
+ * callbacks without grotting around inside the struct imclient.
+ */
+
+struct xscb {
+ struct xscb *prev;
+ char *name;
+ int flags;
+ struct xsccb *rock;
+ struct xscb *next;
+};
+
+#define NUM_SUPPORTED_CALLBACKS 4
+
+struct xscyrus {
+ struct imclient *imclient;
+ char *class;
+ struct xscb *cb;
+ int flags;
+ int authenticated;
+ int cnt; /* hack */
+ /* For holding per-connection information during authentication */
+ /* We need to initialize this when we create a new connection */
+ sasl_callback_t callbacks[NUM_SUPPORTED_CALLBACKS];
+ const char *username, *authname;
+ sasl_secret_t *password;
+};
+
+/* C callback to invoke a Perl callback on behalf of imclient */
+/*void imclient_xs_cb(struct imclient *, rock_t, struct imclient_reply *);*/
+
+/* C callback to invoke a Perl callback on behalf of imclient_send()'s cb */
+/*void imclient_xs_fcmdcb(struct imclient *, rock_t,
+ struct imclient_reply *);*/
+
+/* Clean up after a "self-freeing" Perl callback */
+/*void imclient_xs_callback_free(struct xsccb *);*/
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+/auditmbox.pl/1.3.8.1/Fri Dec 19 18:33:52 2003//Tcyrus-release-2-3-7
+/imapcollate.pl/1.5/Sat May 25 19:57:50 2002//Tcyrus-release-2-3-7
+/imapdu.pl/1.8/Fri Nov 30 19:30:45 2001//Tcyrus-release-2-3-7
+/test-imsp.pl/1.2/Sat May 25 19:57:50 2002//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl/imap/examples
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/auditmbox.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/auditmbox.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/auditmbox.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/auditmbox.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,136 @@
+#! /usr/bin/perl -w
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: auditmbox.pl,v 1.3.8.1 2003/12/19 18:33:52 ken3 Exp $
+#
+# This script WON'T work for you. Guaranteed.
+# It checks CMU ECE policy, and your policy *will* be different.
+# Use it only as an example of how to use Cyrus::IMAP::Admin, as it will
+# almost certainly be useless to you as an actual program.
+#
+# This script sanity-checks departmental accounts against both the password
+# file and Cyrus. It makes a LOT of CMU ECE-specific assumptions. It also
+# doesn't do much with Cyrus aside from authenticating and getting a list of
+# top-level mailboxes, but this is currently all I have in the way of Perl
+# that uses IMAP::Cyrus.
+#
+
+use strict;
+use Cyrus::IMAP::Admin;
+use IO::File;
+
+# this sucks, but the current Authen::Krb4 doesn't support any ticket cache
+# operations other than dest_tkt()
+my $ccache;
+chomp($ccache = `klist 2>/dev/null`);
+$ccache =~ s/\r?\n.*\Z//sm;
+$ccache =~ s!^[^/]+!!;
+my $cache = IO::File->new($ccache, O_RDONLY) or die "No tickets.\n";
+my ($user, $instance, $dot);
+{
+ local($/) = "\0";
+ chomp($user = $cache->getline);
+ chomp($instance = $cache->getline);
+ $dot = ($instance eq '' ? '' : '.');
+}
+my $cyradm = Cyrus::IMAP::Admin->new('ece') or die "Can't connect to Cyrus.\n";
+$cyradm->authenticate(-user => "$user$dot$instance")
+ or die "Can't authenticate to Cyrus.\n";
+my (%mailbox, $found);
+$found = 0;
+foreach my $mbx ($cyradm->list('user.', '%')) {
+ $found = 1;
+ $mbx->[0] =~ s/^user\Q$mbx->[2]\E//;
+ $mbx->[0] =~ s/\Q$mbx->[2]\E.*$//;
+ $mailbox{$mbx->[0]}{cyrus} = 1;
+}
+$cyradm = undef;
+die "Cannot access user.*: non-admin credentials, or server horked?\n"
+ unless $found;
+
+my $passwd = IO::File->new('/etc/passwd', O_RDONLY) or die;
+my $ok;
+while (defined ($user = $passwd->getline)) {
+ chomp($user);
+ next unless $user =~ m!:/afs/ece/(usr|class)/[^:]+:[^:]+$!;
+ $ok = ($user !~ /sh$/);
+ $user =~ s/:.*$//;
+ $mailbox{$user}{passwd} = $ok;
+}
+$passwd = undef;
+
+my $wp = IO::File->new('/etc/mail/wp.txt', O_RDONLY) or die;
+while (defined ($user = $wp->getline)) {
+ chomp($user);
+ next unless $user =~ /([^\@:]+):[^:]*:\1\@ece.cmu.edu$/;
+ $mailbox{$1}{wp} = 1;
+}
+
+my $str;
+foreach $user (keys %mailbox) {
+ $str = '';
+ next if defined($mailbox{$user}{passwd}) && !$mailbox{$user}{passwd} &&
+ !$mailbox{$user}{wp} && !$mailbox{$user}{cyrus};
+ if (!defined($mailbox{$user}{cyrus})) {
+ if ($str eq '') {
+ $str = $user . ': ';
+ } else {
+ $str .= ', ';
+ }
+ $str .= 'no cyrus mailbox';
+ }
+ if (!defined($mailbox{$user}{passwd})) {
+ if ($str eq '') {
+ $str = $user . ': ';
+ } else {
+ $str .= ', ';
+ }
+ $str .= 'no/invalid passwd entry';
+ }
+ if (!defined($mailbox{$user}{wp})) {
+ if ($str eq '') {
+ $str = $user . ': ';
+ } else {
+ $str .= ', ';
+ }
+ $str .= 'no/invalid wp.txt entry';
+ }
+ print $str, "\n" if $str ne '';
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapcollate.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapcollate.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapcollate.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapcollate.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,212 @@
+#! /usr/bin/perl -w
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: imapcollate.pl,v 1.5 2002/05/25 19:57:50 leg Exp $
+
+use Getopt::Long;
+use Cyrus::IMAP;
+use Cyrus::IMAP::Admin;
+
+sub usage {
+ print "imapcollate - Summerize messages in folders\n";
+ print " usage:\n";
+ print " imapcollate [-u user] <server> <criteria>\n";
+ print "\n";
+ print "possible <criteria>: from\n";
+ print "\n";
+ print " example: \n";
+ print " imapcollate cyrus.andrew.cmu.edu \"inbox*\" from\n";
+ print "\n";
+ exit 0;
+}
+
+GetOptions("u|user=s" => \$user,
+ "m|min=i" => \$min);
+
+if (@ARGV) {
+ $server = shift(@ARGV);
+} else {
+ usage;
+}
+
+if (@ARGV) {
+ $where = shift(@ARGV);
+} else {
+ usage;
+}
+
+if (@ARGV) {
+ $crit = shift(@ARGV);
+} else {
+ usage;
+}
+
+if ((!defined $server) || (!defined $where)) {
+ usage;
+}
+
+if (!$crit eq "from") {
+ print "Criteria $crit not allowed\n";
+ usage;
+}
+
+my $cyrus = Cyrus::IMAP->new($server);
+$cyrus->authenticate(-user => $user, -maxssf => 0); #xxx hangs when have a security layer
+
+#list mailboxes in inbox.*
+my @info = ();
+$cyrus->addcallback({-trigger => 'LIST',
+ -callback => sub {
+ my %d = @_;
+ next unless $d{-text} =~ s/^\(([^\)]*)\) //;
+ my $attrs = $1;
+ my $sep = '';
+ # NIL or (attrs) "sep" "str"
+ if ($d{-text} =~ /^N/) {
+ return if $d{-text} !~ s/^NIL//;
+ }
+ elsif ($d{-text} =~ s/\"\\?(.)\"//) {
+ $sep = $1;
+ }
+ return unless $d{-text} =~ s/^ //;
+ my $mbox;
+ if ($d{-text} =~ /\"(([^\\\"]*\\)*[^\\\"]*)\"/) {
+ ($mbox = $1) =~ s/\\(.)/$1/g;
+ } else {
+ $d{-text} =~ /^([]!\#-[^-~]+)/;
+ $mbox = $1;
+ }
+ push @{$d{-rock}}, $mbox;
+ },
+ -rock => \@info});
+
+my ($rc, $msg) = $cyrus->send('', '', "LIST * $where");
+$cyrus->addcallback({-trigger => 'LIST'});
+if ($rc eq 'OK') {
+} else {
+ die "IMAP Error: $msg ";
+}
+
+my %fromlis;
+
+foreach $a (@info) {
+
+ my %dat = coll($a);
+
+ foreach $per (sort keys %dat) {
+ if (defined $fromlis{$per}) {
+ $fromlis{$per} += $dat{$per};
+ } else {
+ $fromlis{$per} = $dat{$per};
+ }
+ }
+
+}
+
+ at sorted = sort {
+ $fromlis{$b} <=> $fromlis{$a}
+ ||
+ length($b) <=> length($a)
+ ||
+ $a cmp $b
+ } keys %fromlis;
+
+foreach $a (@sorted) {
+ if ((defined $min) && ($fromlis{$a} < $min)) {
+ next;
+ }
+ printf("%40s %d\n", $a, $fromlis{$a});
+}
+
+
+sub coll {
+ my ($mb) = @_;
+
+ my %dat;
+
+ #select something
+ my ($rc, $msg) = $cyrus->send('', '', "EXAMINE $mb");
+ if ($rc eq 'OK') {
+ } else {
+ die "Select of $mb failed with $msg";
+ }
+
+ #list size of all msgs
+ my $totalsize = 0;
+ $flags = 1;
+
+ print "fetching in $mb...\n";
+
+ $cyrus->addcallback({-trigger => 'FETCH', -flags => $flags,
+ -callback => sub {
+ my %d = @_;
+ my $msgno = 1;
+ $msgno = $d{-msgno};
+
+ my $size = 0;
+ if ( $d{-text} =~ /.*(From:)(.*)\<(.*\@.*)\>/i)
+ {
+ $addr = $3;
+ } elsif ( $d{-text} =~ /.*(From:)\s*\".*\"\s*(.*\@.*)/i) {
+ $addr = $2;
+ } elsif ( $d{-text} =~ /.*(From:)\s*(\S+\@\S+)\s*/i) {
+ $addr = $2;
+ } else {
+ #print "no From header found in msgno $msgno ($d{-text})\n";
+ $addr = "<none>";
+ }
+ $addr =~ tr/[A-Z]/[a-z]/;
+ if ($addr =~ /(.*)\+.*@(.*)/) {
+ $addr = "$1\@$2";
+ }
+ ${$d{-rock}}{$addr}++;
+ },
+ -rock => \%dat});
+
+ ($rc, $msg) = $cyrus->send('', '', 'UID FETCH 1:* (BODY[HEADER.FIELDS (FROM)])');
+ $cyrus->addcallback({-trigger => 'FETCH'});
+ if ($rc eq 'OK') {
+ } else {
+ die "Fetch in $mb failed with $msg";
+ }
+
+ (%dat);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapdu.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapdu.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapdu.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/imapdu.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,216 @@
+#! /usr/local/bin/perl -w
+#
+# $Id: imapdu.pl,v 1.8 2001/11/30 19:30:45 leg Exp $
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+use strict;
+use Getopt::Long;
+use Cyrus::IMAP;
+use Cyrus::IMAP::Admin;
+use Pod::Usage;
+
+my $user;
+my $verbose = 0;
+my $server;
+my $where;
+
+GetOptions("u|user=s" => \$user,
+ "v|verbose!" => \$verbose) or pod2usage(2);
+
+if (@ARGV) {
+ $server = shift(@ARGV);
+} else {
+ pod2usage("$0: too few arguments\n");
+}
+
+if (@ARGV) {
+ $where = shift(@ARGV);
+} else {
+ pod2usage("$0: too few arguments\n");
+}
+
+if ((!defined $server) || (!defined $where)) {
+ pod2usage("$0: too few arguments\n");
+}
+
+my $cyrus = Cyrus::IMAP->new($server);
+$cyrus->authenticate(-user => $user); #to debug -maxsff => 0
+
+#list mailboxes in inbox.*
+my @info = ();
+$cyrus->addcallback({-trigger => 'LIST',
+ -callback => sub {
+ my %d = @_;
+ next unless $d{-text} =~ s/^\(([^\)]*)\) //;
+ my $attrs = $1;
+ my $sep = '';
+ # NIL or (attrs) "sep" "str"
+ if ($d{-text} =~ /^N/) {
+ return if $d{-text} !~ s/^NIL//;
+ }
+ elsif ($d{-text} =~ s/\"\\?(.)\"//) {
+ $sep = $1;
+ }
+ return unless $d{-text} =~ s/^ //;
+ my $mbox;
+ if ($d{-text} =~ /\"(([^\\\"]*\\)*[^\\\"]*)\"/) {
+ ($mbox = $1) =~ s/\\(.)/$1/g;
+ } else {
+ $d{-text} =~ /^([]!\#-[^-~]+)/;
+ $mbox = $1;
+ }
+ push @{$d{-rock}}, $mbox;
+ },
+ -rock => \@info});
+
+my ($rc, $msg) = $cyrus->send('', '', "LIST \"\" $where*");
+$cyrus->addcallback({-trigger => 'LIST'});
+if ($rc eq 'OK') {
+} else {
+ die "IMAP Error: $msg ";
+}
+
+my %mb_size;
+my %mb_msgs;
+
+foreach my $a (@info) {
+ my ($b, $c) = sizeofmailbox($a);
+
+ my @z = split(/\./, $a);
+
+ my $str = "";
+ foreach my $y (@z) {
+ if ($str ne "") {
+ $str=$str.".";
+ }
+ $str=$str.$y;
+ $mb_size{$str} += $b;
+ $mb_msgs{$str} += $c;
+ }
+}
+
+foreach $a (sort keys %mb_size) {
+ if (defined $mb_size{$a}) {
+ showsize($mb_size{$a}, $mb_msgs{$a}, $a);
+ }
+}
+
+
+sub sizeofmailbox {
+ my ($mb) = @_;
+
+ #select something
+ my @info = ();
+ $cyrus->addcallback({-trigger => 'FLAGS',
+ -callback => sub {
+
+ },
+ -rock => \@info});
+ print STDERR "$mb...\n" if $verbose;
+ my ($rc, $msg) = $cyrus->send('', '', "EXAMINE $mb");
+ if ($rc eq 'OK') {
+ } else {
+ print "failed: $mb: $msg\n";
+ }
+
+ #list size of all msgs
+ my $totalsize = 0;
+ my $flags = 1;
+
+ my %info = ();
+ $info{'totalsize'} = 0;
+ $info{'messages'} = 0;
+
+ $cyrus->addcallback({-trigger => 'FETCH', -flags => $flags,
+ -callback => sub {
+ my %d = @_;
+ my $msgno = 1;
+ $msgno = $d{-msgno};
+
+ my $size = 0;
+ if ( $d{-text} =~ /\(RFC822.SIZE (\d+)\)/)
+ {
+ $size = $1;
+ }
+ ${$d{-rock}}{'totalsize'} += $size;
+ ${$d{-rock}}{'messages'}++;
+ },
+ -rock => \%info});
+
+ ($rc, $msg) = $cyrus->send('', '', 'FETCH 1:* RFC822.SIZE');
+ $cyrus->addcallback({-trigger => 'FETCH'});
+
+ ($info{'totalsize'}, $info{'messages'});
+}
+
+sub showsize {
+
+ my ($size,$msgs, $name) = @_;
+
+ if ($size < 1024) {
+ printf "%9.2f bytes\t", $size;
+ } elsif ($size < 1024*1024) {
+ $size = $size/1024;
+ printf "%9.2f KB\t", $size;
+ } else {
+ $size = $size/ (1024 *1024);
+ printf "%9.2f MB\t", $size;
+ }
+
+ printf "%6d msg%s\t", $msgs, $msgs == 1 ? "" : "s";
+
+ print "\t$name\n";
+}
+
+
+__END__
+
+=head1 NAME
+
+imapdu - show mailbox usage stats
+
+=head1 SYNOPSIS
+
+imapdu [B<--user>=I<user>] [B<--verbose>] I<server> I<pattern>
+
+=head1 EXAMPLE
+
+ imapdu cyrus.andrew.cmu.edu inbox
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/test-imsp.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/test-imsp.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/test-imsp.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/test-imsp.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,115 @@
+#!/usr/local/bin/perl -w
+
+# test-imsp.pl
+#
+# Joseph Jackson
+# 09-May-2000
+# $Id: test-imsp.pl,v 1.2 2002/05/25 19:57:50 leg Exp $
+#
+# Quick demonstration and test for the Cyrus IMSP Perl module.
+
+use Cyrus::IMAP::IMSP;
+
+print "Logging in...\n";
+$server = $ARGV[0] || 'imsp.andrew.cmu.edu';
+my $client = Cyrus::IMAP::IMSP->new($server, $ARGV[1] || "imsp");
+die "New command failed" if (!defined $client);
+
+#
+# The maxssf=0 option is required.
+# Taking it away can lead to hangs in the send function.
+#
+#
+# Use this form if you are an IMSP admin who can act on behalf of others
+# $rc = $client->authenticate(-maxssf => 0, -user => 'pcyrus');
+#
+$client->authenticate(-maxssf => 0);
+print "Error from authenticate is: ", $client->error if ($client->error);
+
+print "Getting common.* options\n";
+%options = $client->get('common.*');
+print "Error from get is: ", $client->error, "\n" if ($client->error);
+foreach my $option (sort keys %options) {
+ print " Option: '", $option, "'\n Value: '", $options{$option}, "'\n";
+}
+
+print "Setting testing.* options\n";
+print " testing.one... ";
+if (!$client->set('testing.one', 'string value')) {
+ print "Error from set is: ", $client->error;
+}
+print "\n";
+print " testing.two... ";
+if (!$client->set('testing.two', '2')) {
+ print "Error from set is: ", $client->error;
+}
+print "\n";
+print " testing.empty... ";
+if (!$client->set('testing.empty', '')) {
+ print "Error from set is: ", $client->error;
+}
+print "\n";
+print " testing.deleteme... ";
+if (!$client->set('testing.deleteme', 'delete this one')) {
+ print "Error from set is: ", $client->error;
+}
+print "\n";
+print " testing.complicated... ";
+if (!$client->set('testing.complicated',
+ '(("Cyrus:INBOX" ((1024 768 0 0 300 400)) (true false)))')) {
+ print "Error from set is: ", $client->error;
+}
+print "\n";
+print " testing.embeddedcr... ";
+if (!$client->set('testing.embeddedcr',
+ "There is a CR LF here:\r\nHere's another:\r\nThat was it!")) {
+ print "Error from set is: ", $client->error;
+}
+print "\n";
+
+print "Getting testing options\n";
+%options = $client->get('testing.*');
+print "Error from get is: ", $client->error, "\n" if ($client->error);
+foreach my $option (sort keys %options) {
+ print " Option: '", $option, "'\n Value: '", $options{$option}, "'\n";
+}
+
+print "Unsetting testing.deleteme and testing.not-there\n";
+if (!$client->unset('testing.deleteme')) {
+ print "Error from unset is: ", $client->error, "\n";
+}
+if (!$client->unset('testing.not-there')) {
+ print "EXPECTED Error from unset is: ", $client->error, "\n";
+}
+
+print "Getting testing options\n";
+%options = $client->get('testing.*');
+print "Error from get is: ", $client->error, "\n" if ($client->error);
+foreach my $option (sort keys %options) {
+ print " Option: '", $option, "'\n Value: '", $options{$option}, "'\n";
+}
+
+print "Unsetting remaining testing options\n";
+if (!$client->unset('testing.one')) {
+ print "Error from unset is: ", $client->error, "\n";
+}
+if (!$client->unset('testing.two')) {
+ print "Error from unset is: ", $client->error, "\n";
+}
+if (!$client->unset('testing.empty')) {
+ print "Error from unset is: ", $client->error, "\n";
+}
+if (!$client->unset('testing.complicated')) {
+ print "Error from unset is: ", $client->error, "\n";
+}
+if (!$client->unset('testing.embeddedcr')) {
+ print "Error from unset is: ", $client->error, "\n";
+}
+
+# Should return nothing
+print "Verifying that all the options are gone\n";
+%options = $client->get('testing.*');
+print "Error from get is: ", $client->error, "\n" if ($client->error);
+foreach my $option (sort keys %options) {
+ print " Option: '", $option, "'\n Value: '", $options{$option}, "'\n";
+}
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/examples/test-imsp.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/01-imclient.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/01-imclient.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/01-imclient.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/01-imclient.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,148 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: 01-imclient.t,v 1.4 2002/05/25 19:57:50 leg Exp $
+#
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl test.pl'
+
+######################### We start with some black magic to print on failure.
+
+# Change 1..1 below to 1..last_test_to_print .
+# (It may become useful if the test is moved to ./t subdirectory.)
+
+END {print "not ok 1\n" unless $loaded;}
+use Cyrus::IMAP;
+$loaded = 1;
+print "ok 1\n";
+
+######################### End of black magic.
+
+# find a server
+$old = select(STDERR); $| = 1; select($old);
+$server = $ENV{IMAPSERVER} || $ENV{BATISERVER};
+while (!defined($server) || $server eq '') {
+ print STDERR "enter an IMAP server to use for testing: ";
+ chomp($server = scalar(<STDIN>));
+ # needed so ->servername test will work; imclient does this internally
+ $server = (gethostbyname($server))[0];
+}
+
+# create an imclient object
+$client = Cyrus::IMAP->new($server);
+print "not " if !defined($client);
+print "ok 2\n";
+
+# try authenticating as the current user, plaintext
+# (tests send in simple mode)
+$user = $ENV{USER} || $ENV{LOGNAME} || (getpwuid($<))[0];
+system "stty -echo";
+print STDERR "Password: ";
+chomp($pass = scalar(<STDIN>));
+print STDERR "\n";
+system "stty echo";
+$plen = length($pass);
+print "not " if !$client->_send(undef, undef, "LOGIN $user {$plen}\r\n$pass");
+$pass = "\0" x length($pass);
+$plen = 0;
+print "ok 3\n";
+
+# verify it's pointing at the server
+$aserver = $client->servername;
+print "not " if $aserver ne $server;
+print "ok 4\n";
+
+# reauthenticate with the proper method (ugh)
+$client = Cyrus::IMAP->new($server);
+print "not " if !$client->authenticate('PLAIN');
+print "ok 5\n";
+
+# list the authentication methods available (tests send and callbacks)
+ at caps = ();
+$didcap = 0;
+sub caps_cb {
+ my %cb = @_;
+ $didcap = 1;
+ push(@caps, map {s/^AUTH=// ? ($_) : ()} split(/ /, $cb{-text}));
+}
+$client->addcallback({-trigger => 'CAPABILITY', -callback => \&caps_cb});
+print "ok 6\n";
+$done = 0;
+sub done_cb {
+ my %cb = @_;
+ $ {$cb{-rock}} = 1;
+}
+$client->send(\&done_cb, \$done, 'CAPABILITY');
+$client->processoneevent until $done;
+print "not " unless $didcap;
+print "ok 7\n";
+
+# if we support kerberos 4 or gssapi auth, log in that way.
+foreach $cap (@caps) {
+ $client = Cyrus::IMAP->new($server);
+ # this is not fatal because someone might not have e.g. Krb5 tickets
+ print STDERR "authentication via $cap failed\n"
+ if !$client->authenticate($cap);
+}
+print "ok 8\n";
+
+# more advanced send usage
+$client = Cyrus::IMAP->new($server);
+print STDERR "enter a different user to authenticate (plaintext) as: ";
+chomp($auser = scalar(<STDIN>));
+system "stty -echo";
+print STDERR "Password: ";
+chomp($pass = scalar(<STDIN>));
+print STDERR "\n";
+system "stty echo";
+print "not " if !$client->send(undef, undef, 'LOGIN %a %s', $auser, $pass);
+print "ok 9\n";
+
+# authentication with extra parameters
+$client = Cyrus::IMAP->new($server);
+print "not " if !$client->authenticate(-mechanism => 'PLAIN',
+ -service => 'imap',
+ -user => $auser,
+ -password => $pass,
+ -minssf => 0,
+ -maxssf => 10000);
+$pass = "\0" x length($pass);
+print "ok 10\n";
+
+BEGIN { $| = 1; print "1..10\n"; }
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/02-admin.t
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/02-admin.t?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/02-admin.t (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/02-admin.t Sat Aug 26 02:00:13 2006
@@ -1,0 +1,94 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: 02-admin.t,v 1.4 2002/05/25 19:57:50 leg Exp $
+#
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl test.pl'
+
+######################### We start with some black magic to print on failure.
+
+# Change 1..1 below to 1..last_test_to_print .
+# (It may become useful if the test is moved to ./t subdirectory.)
+
+END {print "not ok 1\n" unless $loaded;}
+use Cyrus::IMAP::Admin;
+$loaded = 1;
+print "ok 1\n";
+
+######################### End of black magic.
+
+# find a server
+$old = select(STDERR); $| = 1; select($old);
+$server = $ENV{IMAPSERVER} || $ENV{BATISERVER};
+while (!defined($server) || $server eq '') {
+ print STDERR "enter an IMAP server to use for testing: ";
+ chomp($server = scalar(<STDIN>));
+ # needed so ->servername test will work; imclient does this internally
+ $server = (gethostbyname($server))[0];
+}
+
+# somewhat lame test of Cyrus::IMAP::Admin; can't really test it without
+# test accounts and maybe even a test server...
+
+print "not " unless defined ($client = Cyrus::IMAP::Admin->new($server));
+print "ok 2\n";
+print "not " unless $client->authenticate;
+print "ok 3\n";
+ at mb = $client->list('INBOX', '*');
+print "not " unless @mb;
+foreach (@mb) {
+ print STDERR "> $_->[0] ($_->[1])\n";
+}
+print "ok 4\n";
+
+# list ACL on INBOX
+print "not " unless %acl = $client->listacl('INBOX');
+foreach (keys %acl) {
+ print STDERR ">> $_: $acl{$_}\n";
+}
+print "ok 5\n";
+
+# quota and quotaroot
+print "not " unless defined ($qroot = $client->quotaroot('INBOX'));
+print "ok 6\n";
+print "not " if !defined (@quota = $client->quota($qroot));
+print "ok 7\n";
+
+BEGIN { $| = 1; print "1..7\n"; }
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/01-imclient.t/1.4/Sat May 25 19:57:50 2002//Tcyrus-release-2-3-7
+/02-admin.t/1.4/Sat May 25 19:57:50 2002//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl/imap/t
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/t/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/typemap
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/typemap?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/typemap (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/typemap Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+TYPEMAP
+Cyrus_IMAP T_PTROBJ_SPECIAL
+
+INPUT
+T_PTROBJ_SPECIAL
+ if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\")) {
+ IV tmp = SvIV((SV*)SvRV($arg));
+ $var = ($type) tmp;
+ } else {
+ croak(\"$var is not of type ${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\");
+ }
+
+OUTPUT
+T_PTROBJ_SPECIAL
+ sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\", (void *) $var);
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/xsutil.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/xsutil.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/xsutil.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/imap/xsutil.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,149 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $Id: xsutil.c,v 1.5 2003/02/13 20:15:49 rjs3 Exp $ */
+/*
+ * Various C functions in support of the Cyrus Perl interface.
+ */
+
+#include "EXTERN.h"
+#include "perl.h"
+#include <imclient.h>
+#define CYRPERL_INTERNAL
+#include "cyrperl.h"
+
+/* hack, since libcyrus apparently expects fatal() to exist */
+void
+fatal(char *s, int exit)
+{
+ croak(s);
+}
+
+/*
+ * Invoke a Perl callback on behalf of a Cyrus callback. This requires some
+ * silliness to adapt what we're passed to Perl conventions; specifically,
+ * the reply struct becomes a hash (passed as a list).
+ */
+
+void imclient_xs_cb(struct imclient *client, struct xsccb *rock,
+ struct imclient_reply *reply)
+{
+ dSP;
+ dTARG;
+ SV* rv;
+
+ /* push our args onto Perl's stack */
+ ENTER;
+ SAVETMPS;
+ PUSHMARK(SP);
+ XPUSHs(sv_2mortal(newSVpv("-client", 0)));
+ rv = newSVsv(&sv_undef);
+ sv_setref_pv(rv, rock->client->class, (void *) rock->client);
+ rock->client->cnt++;
+ XPUSHs(rv);
+ if (rock->prock != &sv_undef) {
+ XPUSHs(sv_2mortal(newSVpv("-rock", 0)));
+ XPUSHs(sv_mortalcopy(rock->prock));
+ }
+ XPUSHs(sv_2mortal(newSVpv("-keyword", 0)));
+ XPUSHs(sv_2mortal(newSVpv(reply->keyword, 0)));
+ XPUSHs(sv_2mortal(newSVpv("-text", 0)));
+ XPUSHs(sv_2mortal(newSVpv(reply->text, 0)));
+ if (reply->msgno != -1) {
+ XPUSHs(sv_2mortal(newSVpv("-msgno", 0)));
+ XPUSHi(reply->msgno);
+ }
+ PUTBACK;
+ /* invoke Perl */
+ perl_call_sv(rock->pcb, G_VOID|G_DISCARD);
+ FREETMPS;
+ LEAVE;
+ /* clean up */
+ if (rock->autofree) imclient_xs_callback_free(rock);
+}
+
+/*
+ * Callback used when ::_send is invoked without a callback. The "prock" is an
+ * AV, which is set to the contents of the imclient_reply; this is detected in
+ * ::_send, which is calling imclient_processoneevent() repeatedly. (This
+ * simulates a non-callback-based invocation, for trivial clients.)
+ */
+void imclient_xs_fcmdcb(struct imclient *client, struct xsccb *rock,
+ struct imclient_reply *reply)
+{
+ AV *av;
+
+ SvREFCNT_dec(SvRV(rock->prock));
+ SvRV(rock->prock) = (SV *) av = newAV();
+ av_push(av, newSVpv(reply->keyword, 0));
+ av_push(av, newSVpv(reply->text, 0));
+ if (reply->msgno != -1) av_push(av, newSViv(reply->msgno));
+ /* clean up */
+ if (rock->autofree) imclient_xs_callback_free(rock);
+}
+
+/*
+ * Decrement the refcounts of the Perl SV's in the passed rock, then free the
+ * rock. This cleans up a callback.
+ */
+
+void imclient_xs_callback_free(struct xsccb *rock)
+{
+ struct xscb *xcb;
+
+ if (rock) {
+ /* find the destructor-cleanup version and nuke its record */
+ for (xcb = rock->client->cb; xcb; xcb = xcb->next) {
+ if (xcb->rock == rock) break;
+ }
+ if (xcb) {
+ if (xcb->prev)
+ xcb->prev->next = xcb->next;
+ else
+ rock->client->cb = xcb->next;
+ if (xcb->next) xcb->next->prev = xcb->prev;
+ if (xcb->name) safefree(xcb->name);
+ safefree(xcb);
+ }
+ if (rock->pcb) SvREFCNT_dec(rock->pcb);
+ if (rock->prock) SvREFCNT_dec(rock->prock);
+ safefree(rock);
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Makefile
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+/.cvsignore/1.1/Sun Jan 6 02:03:32 2002//Tcyrus-release-2-3-7
+/Makefile.in/1.16/Wed Oct 22 18:50:24 2003//Tcyrus-release-2-3-7
+D/lib////
+D/managesieve////
+D/scripts////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl/sieve
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,150 @@
+# SIEVE Makefile for cyrus software
+# $Id: Makefile.in,v 1.16 2003/10/22 18:50:24 rjs3 Exp $
+#
+# @configure_input@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Makefile.in,v 1.16 2003/10/22 18:50:24 rjs3 Exp $
+#
+
+SUBDIRS = lib managesieve
+SCRIPTS = installsieve sieveshell
+
+# Makefile.PL doesn't make a depend rule. just make depend in these dirs
+DEPSUBDIRS = lib
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+INSTALL = @INSTALL@
+
+SHELL = /bin/sh
+ at SET_MAKE@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+
+# Note that we use the *dynamic* sasl libraries
+SASL_LIB=@LIB_DYN_SASL@
+SASL_INC=@DYNSASLFLAGS@
+OPENSSL_LIB=@OPENSSL_LIB@
+OPENSSL_INC=@OPENSSL_INC@
+BDB_LIB=@BDB_LIB@
+BDB_INC=@BDB_INC@
+
+LIB_RT=@LIB_RT@
+
+CC=@CC@
+PERL=@PERL@
+
+all::
+ @for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" all "in" `pwd`; \
+ if [ -f Makefile.PL ]; then \
+ LIB_RT="$(LIB_RT)" \
+ BDB_LIB="$(BDB_LIB)" BDB_INC="$(BDB_INC)" \
+ OPENSSL_LIB="$(OPENSSL_LIB)" OPENSSL_INC="$(OPENSSL_INC)" \
+ SASL_LIB="$(SASL_LIB)" SASL_INC="$(SASL_INC)" CC="$(CC)" \
+ $(PERL) Makefile.PL PREFIX=$(prefix); \
+ fi; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \
+ done
+
+install::
+ for s in $(SCRIPTS); \
+ do \
+ $(INSTALL) -m 755 scripts/$$s.pl $(DESTDIR)$(exec_prefix)/bin/$$s ; \
+ done
+#xxx install scripts/*
+ @for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" install "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) install) || exit 1; \
+ done
+
+clean::
+ @-for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" clean "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) clean ; \
+ echo "### Done with" `pwd`); \
+ done
+
+distclean::
+ @-for d in $(SUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" clean "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) distclean ; \
+ echo "### Done with" `pwd`); \
+ done
+ rm -f Makefile Makefile.bak config.status config.log config.cache
+
+depend::
+ @for d in $(DEPSUBDIRS); \
+ do \
+ (cd $$d; echo "### Making" depend "in" `pwd`; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) depend) || exit 1; \
+ done
+
+checkdepend::
+
+depend::
+ echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
+ echo 'w' >>eddep
+ cp Makefile Makefile.bak
+ ed -s Makefile < eddep
+ rm eddep
+ echo '' >> Makefile
+ echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
+ echo '# see make depend above' >> Makefile
+
+# DO NOT DELETE THIS LINE -- make depend uses it
+
+# The following rule ensures that "make depend" gets run at least
+# once before a "make all". The "depend" rule above removes
+# this rule from the Makefile the first time the "make depend"
+# has been run after the Makefile is generated by Configure
+
+checkdepend:: depend
+
+# IF YOU PUT STUFF HERE IT WILL GO AWAY
+# see make depend above
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+Makefile
+makedepend.log
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,13 @@
+/.cvsignore/1.2/Wed Oct 22 18:03:19 2003//Tcyrus-release-2-3-7
+/Makefile.in/1.9.2.3/Mon May 31 18:23:00 2004//Tcyrus-release-2-3-7
+/codes.h/1.4/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+/exitcodes.h/1.3/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+/isieve.c/1.27.2.2/Thu Apr 21 21:04:50 2005//Tcyrus-release-2-3-7
+/isieve.h/1.10/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+/lex.c/1.7/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+/lex.h/1.7/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+/mystring.c/1.7/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+/mystring.h/1.5/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+/request.c/1.16/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+/request.h/1.7/Thu Feb 13 20:15:53 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl/sieve/lib
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,93 @@
+# Makefile for imtest
+#
+# @configure_input@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Makefile.in,v 1.9.2.3 2004/05/31 18:23:00 ken3 Exp $
+#
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@ @LOCALDEFS@ -Dbool=char -DHAS_BOOL
+CPPFLAGS = -I. -I../../.. -I$(srcdir) -I$(srcdir)/../../../lib @CPPFLAGS@ @DYNSASLFLAGS@ @COM_ERR_CPPFLAGS@
+LIBS = ../../../lib/libcyrus.a ../../../lib/libcyrus_min.a @LIB_DYN_SASL@ @LIBS@
+IMAP_LIBS = @IMAP_LIBS@
+DEPLIBS = ../../../lib/libcyrus.a ../../../lib/libcyrus_min.a @DEPLIBS@
+
+MAKEDEPEND_CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@
+LDFLAGS = @LDFLAGS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+
+OBJS=isieve.o lex.o mystring.o request.o
+
+all: libisieve.a
+
+install:
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
+
+libisieve.a: $(OBJS)
+ rm -f libisieve.a
+ ar cr libisieve.a $(OBJS)
+ $(RANLIB) libisieve.a
+
+clean:
+ rm -f *.o Makefile.bak makedepend.log libisieve.a
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) $(MAKEDEPEND_CFLAGS) *.c $(srcdir)/*.c 1> makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/codes.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/codes.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/codes.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/codes.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: codes.h,v 1.4 2003/02/13 20:15:53 rjs3 Exp $ */
+
+#ifndef _CODES_H_
+#define _CODES_H_
+
+
+
+#define SIEVE_OK 0
+#define SIEVE_FAIL -1
+
+#define SIEVE_BADPORT -5
+#define SIEVE_NOEXIST -6
+
+
+#define TRUE 1
+#define FALSE 0
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/exitcodes.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/exitcodes.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/exitcodes.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/exitcodes.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+/* exitcodes.h -- wrapper around sysextis.h
+ * $Id: exitcodes.h,v 1.3 2003/02/13 20:15:53 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* Sendmail has some weird ideas on what constitutes permenant failure. On
+ more than one occasion, we have gotten burned by this moving users around
+ through various inadvisable means, screwing up the mailboxes file,
+ whatever.
+
+ We don't want to fail out permenantly on things like EX_USAGE, EX_SOFTWARE,
+ etc., because that generally means someone was just screwing with the mail
+ store and we don't want to lose mail.
+
+ Instead, we map these EC_* codes to EX_* codes, thereby lying to Sendmail,
+ since we don't derive any benefit from Sendmail knowing what the error was.
+ We just want it to retry all the time anyway. This way, should sendmail's
+ behavior be different and we start deriving benefit from Sendmail knowing
+ stuff, we can easily change it back.
+
+ So other code uses the EC_* error, then we maybe change it to TEMPFAIL if
+ we don't agree on whether the error should be permenant or not.
+
+ Comments below stolen from sysexits.h. */
+
+#ifndef INCLUDED_EXITCODES_H
+#define INCLUDED_EXITCODES_H
+
+#include <sysexits.h>
+
+#define EC_OK 0 /* successful termination */
+
+#define EC_USAGE EX_TEMPFAIL /* command line usage error */
+#define EC_DATAERR EX_DATAERR /* data format error */
+#define EC_NOINPUT EX_TEMPFAIL /* cannot open input */
+#define EC_NOUSER EX_NOUSER /* addressee unknown */
+#define EC_NOHOST EX_TEMPFAIL /* host name unknown */
+#define EC_UNAVAILABLE EX_TEMPFAIL /* service unavailable */
+#define EC_SOFTWARE EX_TEMPFAIL /* internal software error */
+#define EC_OSERR EX_TEMPFAIL /* system error (e.g., can't fork) */
+#define EC_OSFILE EX_TEMPFAIL /* critical OS file missing */
+#define EC_CANTCREAT EX_TEMPFAIL /* can't create (user) output file */
+#define EC_IOERR EX_TEMPFAIL /* input/output error */
+#define EC_TEMPFAIL EX_TEMPFAIL /* user is invited to retry */
+#define EC_PROTOCOL EX_TEMPFAIL /* remote error in protocol */
+#define EC_NOPERM EX_TEMPFAIL /* permission denied */
+#define EC_CONFIG EX_TEMPFAIL /* configuration error */
+
+#endif /* INCLUDED_EXITCODES_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,753 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: isieve.c,v 1.27.2.2 2005/04/21 21:04:50 shadow Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <string.h>
+
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+#include "isieve.h"
+#include "lex.h"
+#include "request.h"
+#include "iptostring.h"
+#include "xmalloc.h"
+#include "util.h"
+
+#include <prot.h>
+
+struct iseive_s {
+ char *serverFQDN;
+ int port;
+
+ int sock;
+
+ sasl_conn_t *conn;
+ sasl_callback_t *callbacks;
+
+ char *refer_authinfo;
+ sasl_callback_t *refer_callbacks;
+
+ int version;
+
+ struct protstream *pin;
+ struct protstream *pout;
+};
+
+void fillin_interactions(sasl_interact_t *tlist);
+
+/* we need this separate from the free() call so that we can reuse
+ * the same memory for referrals */
+static void sieve_dispose(isieve_t *obj)
+{
+ if(!obj) return;
+ sasl_dispose(&obj->conn);
+ free(obj->serverFQDN);
+
+ if (obj->refer_authinfo) free(obj->refer_authinfo);
+ if (obj->refer_callbacks) free(obj->refer_callbacks);
+
+ prot_free(obj->pin);
+ prot_free(obj->pout);
+}
+
+void sieve_free_net(isieve_t *obj)
+{
+ sieve_dispose(obj);
+ free(obj);
+}
+
+/* initialize the network */
+int init_net(char *serverFQDN, int port, isieve_t **obj)
+{
+ struct addrinfo hints, *res0, *res;
+ int err;
+ char portstr[6];
+ int sock = -1;
+
+ snprintf(portstr, sizeof(portstr), "%d", port);
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ if ((err = getaddrinfo(serverFQDN, portstr, &hints, &res0)) != 0) {
+ fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(err));
+ return -1;
+ }
+
+ for (res = res0; res; res = res->ai_next) {
+ sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+ if (sock < 0)
+ continue;
+ if (connect(sock, res->ai_addr, res->ai_addrlen) >= 0)
+ break;
+ close(sock);
+ sock = -1;
+ }
+
+ freeaddrinfo(res0);
+ if (sock < 0) {
+ perror("connect");
+ return -1;
+ }
+
+ *obj = (isieve_t *) xmalloc(sizeof(isieve_t));
+ if (!*obj) return -1;
+
+ memset(*obj, '\0', sizeof(isieve_t));
+
+ (*obj)->sock = sock;
+ (*obj)->serverFQDN = xstrdup(serverFQDN);
+ (*obj)->port = port;
+
+ /* set up the prot layer */
+ (*obj)->pin = prot_new(sock, 0);
+ (*obj)->pout = prot_new(sock, 1);
+
+ return 0;
+}
+
+static sasl_security_properties_t *make_secprops(int min,int max)
+{
+ sasl_security_properties_t *ret=(sasl_security_properties_t *)
+ xmalloc(sizeof(sasl_security_properties_t));
+
+ ret->maxbufsize=1024;
+ ret->min_ssf=min;
+ ret->max_ssf=max;
+
+ /* should make this configurable */
+ ret->security_flags=SASL_SEC_NOANONYMOUS;
+ ret->property_names=NULL;
+ ret->property_values=NULL;
+
+ return ret;
+}
+
+/*
+ * Initialize SASL and set necessary options
+ */
+int init_sasl(isieve_t *obj,
+ int ssf,
+ sasl_callback_t *callbacks)
+{
+ static int sasl_started = 0;
+ int saslresult = SASL_OK;
+ sasl_security_properties_t *secprops=NULL;
+ socklen_t addrsize=sizeof(struct sockaddr_storage);
+ struct sockaddr_storage saddr_l, saddr_r;
+ char localip[60], remoteip[60];
+
+ /* attempt to start sasl */
+ if(!sasl_started) {
+ saslresult=sasl_client_init(NULL);
+ obj->conn = NULL;
+ sasl_started = 1;
+ }
+
+ /* Save the callbacks array */
+ obj->callbacks = callbacks;
+
+ if (saslresult!=SASL_OK) return -1;
+
+ addrsize=sizeof(struct sockaddr_storage);
+ if (getpeername(obj->sock,(struct sockaddr *)&saddr_r,&addrsize)!=0)
+ return -1;
+
+ addrsize=sizeof(struct sockaddr_storage);
+ if (getsockname(obj->sock,(struct sockaddr *)&saddr_l,&addrsize)!=0)
+ return -1;
+
+ /* set the port manually since getsockname is stupid and doesn't */
+ ((struct sockaddr_in *)&saddr_l)->sin_port = htons(obj->port);
+
+ if (iptostring((struct sockaddr *)&saddr_r, addrsize, remoteip, 60))
+ return -1;
+
+ if (iptostring((struct sockaddr *)&saddr_l, addrsize, localip, 60))
+ return -1;
+
+ if(obj->conn) sasl_dispose(&obj->conn);
+
+ /* client new connection */
+ saslresult=sasl_client_new(SIEVE_SERVICE_NAME,
+ obj->serverFQDN,
+ localip, remoteip,
+ callbacks,
+ SASL_SUCCESS_DATA,
+ &obj->conn);
+
+ if (saslresult!=SASL_OK) return -1;
+
+ /* create a security structure and give it to sasl */
+ secprops = make_secprops(0, ssf);
+ if (secprops != NULL)
+ {
+ sasl_setprop(obj->conn, SASL_SEC_PROPS, secprops);
+ free(secprops);
+ }
+
+ return 0;
+}
+
+char * read_capability(isieve_t *obj)
+{
+ lexstate_t state;
+ char *cap = NULL;
+
+ obj->version = NEW_VERSION;
+
+ while (yylex(&state,obj->pin)==STRING)
+ {
+ char *attr = string_DATAPTR(state.str);
+ char *val;
+
+ val = NULL;
+
+ if (yylex(&state,obj->pin)==' ')
+ {
+ if (yylex(&state,obj->pin)!=STRING)
+ {
+ parseerror("STRING");
+ }
+ val = xstrdup(string_DATAPTR(state.str));
+ if (yylex(&state,obj->pin)!=EOL)
+ {
+ parseerror("EOL1");
+ }
+ }
+
+ if (strcasecmp(attr,"SASL")==0)
+ {
+ if (cap) free(cap);
+ cap = xstrdup(val);
+ } else if (strcasecmp(attr,"SIEVE")==0) {
+
+ } else if (strcasecmp(attr,"IMPLEMENTATION")==0) {
+
+ } else if (strcasecmp(attr,"STARTTLS")==0) {
+ /* TODO */
+ } else if (val && strncmp(val,"SASL=",5)==0) {
+ obj->version = OLD_VERSION;
+ cap = (char *) xmalloc(strlen(val));
+ memset(cap, '\0', strlen(val));
+ memcpy(cap, val+5, strlen(val)-6);
+
+ return cap;
+ } else {
+ /* unknown capability */
+ }
+ if (val) { free(val); val = NULL; }
+ }
+
+ if (yylex(&state,obj->pin)!=EOL)
+ {
+ parseerror("EOL2");
+ }
+
+ return cap;
+}
+
+static int getauthline(isieve_t *obj, char **line, unsigned int *linelen,
+ char **errstrp)
+{
+ lexstate_t state;
+ int res;
+ int ret;
+ size_t len;
+ mystring_t *errstr;
+ char *last_send;
+
+ /* now let's see what the server said */
+ res=yylex(&state, obj->pin);
+ *line = NULL;
+ if (res!=STRING)
+ {
+ ret = handle_response(res,obj->version,
+ obj->pin, &last_send, &errstr);
+
+ if (res==TOKEN_OK) {
+ /* Was there a last send from the server? */
+ if(last_send) {
+ /* it's base64 encoded */
+ int last_send_len = strlen(last_send);
+
+ len = last_send_len*2+1;
+ *line = xmalloc(len);
+
+ sasl_decode64(last_send, last_send_len,
+ *line, len, linelen);
+
+ free(last_send);
+ }
+ return STAT_OK;
+ } else { /* server said no or bye*/
+ /* xxx handle referrals */
+ *errstrp = string_DATAPTR(errstr);
+ return STAT_NO;
+ }
+ }
+
+ len = state.str->len*2+1;
+ *line=(char *) xmalloc(len);
+
+ sasl_decode64(string_DATAPTR(state.str), state.str->len,
+ *line, len, linelen);
+
+ if (yylex(&state, obj->pin)!=EOL)
+ return STAT_NO;
+
+ return STAT_CONT;
+}
+
+
+int auth_sasl(char *mechlist, isieve_t *obj, const char **mechusing,
+ char **errstr)
+{
+ sasl_interact_t *client_interact=NULL;
+ int saslresult=SASL_INTERACT;
+ const char *out;
+ unsigned int outlen;
+ char *in;
+ unsigned int inlen;
+ char inbase64[2048];
+ unsigned int inbase64len;
+
+ imt_stat status = STAT_CONT;
+
+ if(!mechlist || !obj || !mechusing) return -1;
+
+ /* call sasl client start */
+ while (saslresult==SASL_INTERACT)
+ {
+ saslresult=sasl_client_start(obj->conn, mechlist,
+ &client_interact,
+ &out, &outlen,
+ mechusing);
+ if (saslresult==SASL_INTERACT)
+ fillin_interactions(client_interact); /* fill in prompts */
+ }
+
+ if ((saslresult!=SASL_OK) && (saslresult!=SASL_CONTINUE)) return saslresult;
+
+ if (out!=NULL)
+ {
+ prot_printf(obj->pout,"AUTHENTICATE \"%s\" ",*mechusing);
+
+ sasl_encode64(out, outlen,
+ inbase64, sizeof(inbase64), &inbase64len);
+
+ prot_printf(obj->pout, "{%d+}\r\n",inbase64len);
+ prot_write(obj->pout,inbase64,inbase64len);
+ prot_printf(obj->pout,"\r\n");
+ } else {
+ prot_printf(obj->pout,"AUTHENTICATE \"%s\"\r\n",*mechusing);
+ }
+ prot_flush(obj->pout);
+
+ inlen = 0;
+
+ /* get reply */
+ status=getauthline(obj,&in,&inlen, errstr);
+
+ while (status==STAT_CONT)
+ {
+ saslresult=SASL_INTERACT;
+ while (saslresult==SASL_INTERACT)
+ {
+ saslresult=sasl_client_step(obj->conn,
+ in,
+ inlen,
+ &client_interact,
+ &out,&outlen);
+
+ if (saslresult==SASL_INTERACT)
+ fillin_interactions(client_interact); /* fill in prompts */
+ }
+
+ /* check if sasl suceeded */
+ if (saslresult<SASL_OK)
+ {
+ /* send cancel notice */
+ prot_printf(obj->pout, "*\r\n");
+ prot_flush(obj->pout);
+
+ /* eat the auth line that confirms that we canceled */
+ if(getauthline(obj,&in,&inlen,errstr) != STAT_NO) {
+ *errstr = strdup("protocol error");
+ } else {
+ *errstr = strdup(sasl_errstring(saslresult,NULL,NULL));
+ }
+
+ return saslresult;
+ }
+
+ /* send to server */
+
+ sasl_encode64(out, outlen,
+ inbase64, sizeof(inbase64), &inbase64len);
+
+ prot_printf(obj->pout, "{%d+}\r\n",inbase64len);
+ prot_flush(obj->pout);
+ prot_write(obj->pout,inbase64,inbase64len);
+ prot_flush(obj->pout);
+ prot_printf(obj->pout,"\r\n");
+ prot_flush(obj->pout);
+
+ /* get reply */
+ status=getauthline(obj,&in,&inlen, errstr);
+ }
+
+ if(status == STAT_OK) {
+ /* do we have a last send? */
+ if(in) {
+ saslresult=sasl_client_step(obj->conn,
+ in,
+ inlen,
+ &client_interact,
+ &out, &outlen);
+
+ if(saslresult != SASL_OK)
+ return -1;
+ }
+
+ /* turn on layer if need be */
+ prot_setsasl(obj->pin, obj->conn);
+ prot_setsasl(obj->pout, obj->conn);
+
+ /* There wasn't a last send, or we are already OK */
+ return 0;
+ } else {
+ /* Error */
+ return -1;
+ }
+}
+
+static int refer_simple_cb(void *context, int id, const char **result,
+ unsigned int *len)
+{
+ if (!result) {
+ return SASL_BADPARAM;
+ }
+
+ switch (id) {
+ case SASL_CB_USER:
+ *result = (char *) context;
+ break;
+ case SASL_CB_AUTHNAME:
+ *result = (char *) context;
+ break;
+ default:
+ return SASL_BADPARAM;
+ }
+ if (len) {
+ *len = *result ? strlen(*result) : 0;
+ }
+
+ return SASL_OK;
+}
+
+int do_referral(isieve_t *obj, char *refer_to)
+{
+ int ret;
+ struct servent *serv;
+ isieve_t *obj_new;
+ char *mechlist;
+ int port;
+ char *errstr;
+ const char *mtried;
+ const char *scheme = "sieve://";
+ char *host, *p;
+ sasl_callback_t *callbacks;
+
+ /* check scheme */
+ if (strncasecmp(refer_to, scheme, strlen(scheme)))
+ return STAT_NO;
+
+ /* get host */
+ if ((host = strrchr(refer_to, '@'))) {
+ char *authid, *userid;
+ int n;
+
+ *host++ = '\0';
+
+ /* get authid - make a copy so it persists for the callbacks */
+ authid = obj->refer_authinfo = xstrdup(refer_to + strlen(scheme));
+
+ /* get userid */
+ if ((userid = strrchr(authid, ';')))
+ *userid++ = '\0';
+
+ /* count the callbacks */
+ for (n = 0; obj->callbacks[n++].id != SASL_CB_LIST_END;);
+
+ /* copy the callbacks, substituting some of our own */
+ callbacks = obj->refer_callbacks = xmalloc(n*sizeof(sasl_callback_t));
+
+ while (--n >= 0) {
+ callbacks[n].id = obj->callbacks[n].id;
+
+ switch (callbacks[n].id) {
+ case SASL_CB_USER:
+ callbacks[n].proc = &refer_simple_cb;
+ callbacks[n].context = userid ? userid : authid;
+ break;
+ case SASL_CB_AUTHNAME:
+ callbacks[n].proc = &refer_simple_cb;
+ callbacks[n].context = authid;
+ break;
+ default:
+ callbacks[n].proc = obj->callbacks[n].proc;
+ callbacks[n].context = obj->callbacks[n].context;
+ break;
+ }
+ }
+ }
+ else {
+ host = refer_to + strlen(scheme);
+ callbacks = obj->callbacks;
+ }
+
+ /* get port */
+ p = host;
+ if (*host == '[') {
+ if ((p = strrchr(host + 1, ']')) != NULL) {
+ *p++ = '\0';
+ host++; /* skip first bracket */
+ } else
+ p = host;
+ }
+ if ((p = strchr(p, ':'))) {
+ *p++ = '\0';
+ port = atoi(p);
+ } else {
+ serv = getservbyname("sieve", "tcp");
+ if (serv == NULL) {
+ port = 2000;
+ } else {
+ port = ntohs(serv->s_port);
+ }
+ }
+
+ ret = init_net(host, port, &obj_new);
+ if(ret) return STAT_NO;
+
+ /* Start up SASL */
+ ret = init_sasl(obj_new, 128, callbacks);
+ if(ret) return STAT_NO;
+
+ /* Authenticate */
+ mechlist = read_capability(obj_new);
+
+ do {
+ mtried = NULL;
+ ret = auth_sasl(mechlist, obj_new, &mtried, &errstr);
+ if(ret) init_sasl(obj_new, 128, callbacks);
+
+ if(mtried) {
+ char *newlist = (char*) xmalloc(strlen(mechlist)+1);
+ char *mtr = (char*) xstrdup(mtried);
+ char *tmp;
+
+ ucase(mtr);
+ tmp = strstr(mechlist,mtr);
+ *tmp ='\0';
+ strcpy(newlist, mechlist);
+ tmp++;
+
+ tmp = strchr(tmp,' ');
+ if (tmp) {
+ strcat(newlist,tmp);
+ }
+
+ free(mtr);
+ free(mechlist);
+ mechlist = newlist;
+ }
+ } while(ret && mtried);
+
+ /* xxx leak? */
+ if(ret) return STAT_NO;
+
+ /* free old isieve_t */
+ sieve_dispose(obj);
+
+ /* Copy new isieve_t into memory used by old object */
+ memcpy(obj,obj_new,sizeof(isieve_t));
+ free(obj_new);
+
+ /* Destroy the string that was allocated to save the destination server */
+ free(refer_to);
+
+ return STAT_OK;
+}
+
+int isieve_logout(isieve_t **obj)
+{
+ prot_printf((*obj)->pout, "LOGOUT");
+ prot_flush((*obj)->pout);
+
+ close((*obj)->sock);
+
+ sieve_free_net(*obj);
+ *obj = NULL;
+
+ return STAT_OK;
+}
+
+int isieve_put_file(isieve_t *obj, char *filename, char *destname,
+ char **errstr)
+{
+ char *refer_to;
+ int ret = installafile(obj->version,
+ obj->pout, obj->pin,
+ filename, destname,
+ &refer_to, errstr);
+ if(ret == -2 && refer_to) {
+ ret = do_referral(obj, refer_to);
+ if(ret == STAT_OK) {
+ ret = isieve_put_file(obj, filename, destname, errstr);
+ } else {
+ *errstr = "referral failed";
+ }
+ }
+ return ret;
+}
+
+int isieve_put(isieve_t *obj, char *name, char *data, int len, char **errstr)
+{
+ char *refer_to;
+ int ret = installdata(obj->version,
+ obj->pout, obj->pin,
+ name, data, len, &refer_to, errstr);
+ if(ret == -2 && refer_to) {
+ ret = do_referral(obj, refer_to);
+ if(ret == STAT_OK) {
+ ret = isieve_put(obj, name, data, len, errstr);
+ } else {
+ *errstr = "referral failed";
+ }
+ }
+ return ret;
+}
+
+int isieve_delete(isieve_t *obj, char *name, char **errstr)
+{
+ char *refer_to;
+ int ret = deleteascript(obj->version,
+ obj->pout, obj->pin,
+ name, &refer_to, errstr);
+ if(ret == -2 && refer_to) {
+ ret = do_referral(obj, refer_to);
+ if(ret == STAT_OK) {
+ ret = isieve_delete(obj, name, errstr);
+ } else {
+ *errstr = "referral failed";
+ }
+ }
+ return ret;
+}
+
+int isieve_list(isieve_t *obj, isieve_listcb_t *cb,void *rock, char **errstr)
+{
+ char *refer_to;
+ int ret = list_wcb(obj->version, obj->pout, obj->pin, cb, rock, &refer_to);
+ if(ret == -2 && refer_to) {
+ ret = do_referral(obj, refer_to);
+ if(ret == STAT_OK) {
+ ret = isieve_list(obj, cb, rock, errstr);
+ }
+ }
+ return ret;
+}
+
+int isieve_activate(isieve_t *obj, char *name, char **errstr)
+{
+ char *refer_to;
+ int ret = setscriptactive(obj->version,obj->pout, obj->pin, name,
+ &refer_to, errstr);
+ if(ret == -2 && refer_to) {
+ ret = do_referral(obj, refer_to);
+ if(ret == STAT_OK) {
+ ret = isieve_activate(obj, name, errstr);
+ } else {
+ *errstr = "referral failed";
+ }
+ }
+ return ret;
+}
+
+int isieve_get(isieve_t *obj,char *name, char **output, char **errstr)
+{
+ int ret;
+ char *refer_to;
+ mystring_t *mystr = NULL;
+
+ ret = getscriptvalue(obj->version,obj->pout, obj->pin,
+ name, &mystr, &refer_to, errstr);
+
+ if(ret == -2 && *refer_to) {
+ ret = do_referral(obj, refer_to);
+ if(ret == STAT_OK) {
+ ret = isieve_get(obj,name,output,errstr);
+ return ret;
+ } else {
+ *errstr = "referral failed";
+ }
+ }
+
+ *output = string_DATAPTR(mystr);
+
+ return ret;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/isieve.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: isieve.h,v 1.10 2003/02/13 20:15:53 rjs3 Exp $ */
+
+#ifndef ISIEVE_H_
+#define ISIEVE_H_
+
+#include "prot.h"
+#include <sasl/sasl.h>
+
+typedef struct iseive_s isieve_t;
+
+int init_net(char *serverFQDN, int port, isieve_t **obj);
+void sieve_free_net(isieve_t *obj);
+
+/* The callbacks that are passed to init_sasl need to persist until
+ * after sieve_free_net is called on the object, so that referrals can
+ * continue to work */
+int init_sasl(isieve_t *obj,
+ int ssf,
+ sasl_callback_t *callbacks);
+
+char * read_capability(isieve_t *obj);
+
+typedef enum {
+ STAT_CONT = 0,
+ STAT_NO = 1,
+ STAT_OK = 2
+} imt_stat;
+
+int auth_sasl(char *mechlist, isieve_t *obj, const char **mechusing, char **errstr);
+
+int isieve_logout(isieve_t **obj);
+int isieve_put_file(isieve_t *obj, char *filename, char *destname,
+ char **errstr);
+int isieve_put(isieve_t *obj, char *name, char *data, int len, char **errstr);
+int isieve_delete(isieve_t *obj, char *name, char **errstr);
+typedef void *isieve_listcb_t(char *name, int isactive, void *rock);
+int isieve_list(isieve_t *obj, isieve_listcb_t *cb,void *rock, char **errstr);
+int isieve_activate(isieve_t *obj, char *name, char **errstr);
+int isieve_get(isieve_t *obj,char *name, char **output, char **errstr);
+
+#endif /* ISIEVE_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,298 @@
+/* lex.c -- lexers for command line script installer
+ * Tim Martin
+ * $Id: lex.c,v 1.7 2003/02/13 20:15:53 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "prot.h"
+
+#include "lex.h"
+
+#include "codes.h"
+
+/* current state the lexer is in */
+int lexer_state = LEXER_STATE_NORMAL;
+
+#define ACAP_MAX_QSTR_LEN 4096
+
+#define ERR() { \
+ lexer_state=LEXER_STATE_RECOVER; \
+ return SIEVE_FAIL; \
+ }
+
+#define ERR_PUSHBACK() { \
+ prot_ungetc(ch, stream); \
+ ERR(); \
+ }
+
+int token_lookup(char *str, int len)
+{
+ if (strcmp(str,"ok")==0) return TOKEN_OK;
+ if (strcmp(str,"no")==0) return TOKEN_NO;
+ if (strcmp(str,"bye")==0) return TOKEN_BYE;
+ if (strcmp(str,"active")==0) return TOKEN_ACTIVE;
+ if (strcmp(str,"referral")==0) return TOKEN_REFERRAL;
+ if (strcmp(str,"sasl")==0) return TOKEN_SASL;
+
+ return -1;
+}
+
+int yylex(lexstate_t * lvalp, void * client)
+{
+ int ch;
+ char buffer[ACAP_MAX_QSTR_LEN]; /* big enough for everything */
+
+ char *buff_ptr = buffer; /* ptr into the buffer */
+ char *buff_end = buffer + ACAP_MAX_QSTR_LEN -1;
+
+ unsigned long count=0;
+
+ int result = SIEVE_OK;
+
+ int synchronizing; /* wheather we are in the process of reading a
+ synchronizing string or not */
+
+ struct protstream *stream=(struct protstream *) client;
+
+ while (1)
+ {
+
+ /* get a character
+ this may block on a read if there is nothing
+ in the buffer */
+
+ ch = prot_getc(stream);
+
+ if (ch == -1)
+ return SIEVE_FAIL;
+
+ switch (lexer_state)
+ {
+
+
+ case LEXER_STATE_RECOVER:
+ if (ch == '\r')
+ lexer_state=LEXER_STATE_RECOVER_CR;
+ break;
+ case LEXER_STATE_RECOVER_CR:
+ if (ch == '\n')
+ lexer_state=LEXER_STATE_NORMAL;
+ return EOL;
+ case LEXER_STATE_CR:
+ if (ch == '\n') {
+ lexer_state=LEXER_STATE_NORMAL;
+ return EOL;
+ }
+ /* otherwise, life is bad */
+ ERR_PUSHBACK();
+ case LEXER_STATE_QSTR:
+ if (ch == '\"') {
+ /* End of the string */
+ lvalp->str = NULL;
+ result = string_allocate(buff_ptr - buffer, buffer, &lvalp->str);
+ if (result != SIEVE_OK)
+ ERR_PUSHBACK();
+ lexer_state=LEXER_STATE_NORMAL;
+ return STRING;
+ }
+ if (ch == '\0'
+ || 0x7F < ((unsigned char)ch))
+ ERR_PUSHBACK();
+ /* Otherwise, we're appending a character */
+ if (buff_end <= buff_ptr)
+ ERR_PUSHBACK(); /* too long! */
+ if (ch == '\\') {
+ ch=prot_getc(stream);
+
+ if (result != SIEVE_OK)
+ ERR();
+ if (ch != '\"' && ch != '\\')
+ ERR_PUSHBACK();
+ }
+ *buff_ptr++ = ch;
+ break;
+ case LEXER_STATE_LITERAL:
+ if (('0' <= ch) && (ch <= '9')) {
+ unsigned long newcount = count * 10 + (ch - '0');
+
+ if (newcount < count)
+ ERR_PUSHBACK(); /* overflow */
+ /*
+ * XXX This should be fatal if non-synchronizing.
+ */
+ count = newcount;
+ break;
+ }
+ synchronizing = FALSE;
+
+ if (ch != '}')
+ ERR_PUSHBACK();
+ ch=prot_getc(stream);
+ if (ch < 0)
+ ERR();
+ if (ch != '\r')
+ ERR_PUSHBACK();
+ ch=prot_getc(stream);
+ if (ch < 0)
+ ERR();
+ if (ch != '\n')
+ ERR_PUSHBACK();
+
+ lvalp->str = NULL;
+ result = string_allocate(count, NULL, &lvalp->str);
+ if (result != SIEVE_OK)
+ ERR_PUSHBACK();
+
+ /* there is a literal string on the wire. let's read it */
+ {
+ char *it = string_DATAPTR(lvalp->str),
+ *end = it + count;
+
+ while (it < end) {
+ *it=prot_getc(stream);
+ it++;
+ }
+ *it = '\0';
+ }
+ lexer_state=LEXER_STATE_NORMAL;
+ return STRING;
+ case LEXER_STATE_NUMBER:
+ if (('0' <= ch) && (ch <= '9')) {
+ unsigned long newcount = count * 10 + (ch - '0');
+
+ if (newcount < count)
+ ERR_PUSHBACK(); /* overflow */
+ count = newcount;
+ } else {
+ lvalp->number = count;
+ lexer_state=LEXER_STATE_NORMAL;
+ prot_ungetc(ch, stream);
+ return NUMBER;
+ }
+ break;
+ case LEXER_STATE_NORMAL:
+ if (isalpha((unsigned char) ch)) {
+ lexer_state=LEXER_STATE_ATOM;
+ *buff_ptr++ = tolower(ch);
+ break;
+ }
+ switch (ch) {
+ case '(':
+ return '(';
+ case ')':
+ return ')';
+ case ' ':
+ return ' ';
+ case '\"':
+ lexer_state=LEXER_STATE_QSTR;
+ break;
+ case '*':
+ return '*';
+ case '0': /* fall through all numbers */
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ count = ch - '0';
+ lexer_state=LEXER_STATE_NUMBER;
+ break;
+ case '{':
+ count = 0;
+ synchronizing = TRUE;
+ lexer_state=LEXER_STATE_LITERAL;
+ break;
+ case '\r':
+ lexer_state=LEXER_STATE_CR;
+ break;
+ case '\n':
+ lexer_state=LEXER_STATE_NORMAL;
+ return EOL;
+ break;
+ default:
+ ERR_PUSHBACK();
+ }
+ break;
+ case LEXER_STATE_ATOM:
+ if (!isalpha((unsigned char) ch)) {
+ int token;
+
+ buffer[ buff_ptr - buffer] = '\0';
+
+ /* We've got the atom. */
+ token = token_lookup((char *) buffer, (int) (buff_ptr - buffer));
+
+ if (token!=-1) {
+ lexer_state=LEXER_STATE_NORMAL;
+ prot_ungetc(ch, stream);
+
+ return token;
+ } else
+ ERR_PUSHBACK();
+ }
+ if (buff_end <= buff_ptr)
+ ERR_PUSHBACK(); /* atom too long */
+ *buff_ptr++ = tolower(ch);
+ break;
+ }
+
+
+
+ } /* while (1) */
+
+ return 0;
+}
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/lex.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,89 @@
+/* lex.h
+ * Tim Martin
+ * 9/21/99
+ * $Id: lex.h,v 1.7 2003/02/13 20:15:53 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+
+#ifndef _LEX_H_
+#define _LEX_H_
+
+#include "mystring.h"
+
+typedef struct lexstate_s {
+ mystring_t *str;
+ int number;
+
+} lexstate_t;
+
+int yylex(lexstate_t * lvalp, void * client);
+
+enum {
+ TAG = 258,
+ EOL = 259,
+ STRING = 260,
+ NUMBER = 261,
+
+ TOKEN_OK = 280,
+ TOKEN_NO = 281,
+ TOKEN_BYE = 282,
+
+ TOKEN_ACTIVE = 291,
+
+ TOKEN_REFERRAL = 301,
+ TOKEN_SASL = 302
+};
+
+enum {
+ LEXER_STATE_TAG = 60,
+ LEXER_STATE_RECOVER,
+ LEXER_STATE_RECOVER_CR,
+ LEXER_STATE_CR,
+ LEXER_STATE_QSTR,
+ LEXER_STATE_LITERAL,
+ LEXER_STATE_NUMBER,
+ LEXER_STATE_NORMAL,
+ LEXER_STATE_ATOM
+};
+
+#endif /* _LEX_H_ */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,217 @@
+/* mystring.c -- string utility
+ * Tim Martin
+ * 9/21/99
+ * $Id: mystring.c,v 1.7 2003/02/13 20:15:53 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "mystring.h"
+#include "codes.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+int string_allocate(int length,
+ const char *buf, /* NULL => no copy */
+ mystring_t ** str)
+{
+ *str=(mystring_t *) malloc(sizeof(mystring_t)+length+3);
+
+ (*str)->len=length;
+ ((char *) (*str))[sizeof(mystring_t)+length]='\0';
+
+ if (buf==NULL) return SIEVE_OK;
+
+ /* copy the data into the string object */
+ memcpy(((char *)(*str))+sizeof(mystring_t), buf, length);
+ ((char *) (*str))[sizeof(mystring_t)+length]='\0';
+
+ return SIEVE_OK;
+}
+
+
+int string_copy(mystring_t *oldstr,
+ mystring_t **newstr)
+{
+ int result;
+
+
+ result=string_allocate(oldstr->len,
+ string_DATAPTR(oldstr),
+ newstr);
+
+ return result;
+}
+
+
+void string_free(mystring_t **str)
+{
+ free(*str);
+}
+
+
+int string_compare(mystring_t *str1, mystring_t *str2)
+{
+ char *data1;
+ char *data2;
+ int lup;
+
+ if (str1->len!=str2->len) return SIEVE_FAIL;
+
+ data1=string_DATAPTR(str1);
+ data2=string_DATAPTR(str2);
+
+ for (lup=0;lup<str1->len;lup++)
+ if (data1[lup]!=data2[lup])
+ return SIEVE_FAIL;
+
+ return SIEVE_OK;
+}
+
+int string_compare_with(mystring_t *str1, mystring_t *str2, mystring_t *comp)
+{
+ char *data1;
+ char *data2;
+ int lup;
+
+ int len1=str1->len;
+ int len2=str2->len;
+
+ int low=len1;
+ if (len2<len1)
+ low=len2;
+
+ /* printf("comparing %s and %s\n",string_DATAPTR(str1),
+ string_DATAPTR(str2));*/
+
+ data1=string_DATAPTR(str1);
+ data2=string_DATAPTR(str2);
+
+ for (lup=0;lup<low;lup++)
+ if (data1[lup]<data2[lup])
+ {
+ return -1;
+ } else if (data1[lup]>data2[lup]) {
+ return 1;
+ } else {
+ /* continue */
+ }
+
+ if (len1==len2) return 0;
+
+ if (len1<len2)
+ return -1;
+
+ return 1;
+}
+
+int string_comparestr(mystring_t *str1, char *str2)
+{
+ int str2len=strlen(str2);
+ char *data1;
+ char *data2;
+ int lup;
+
+ if (str1->len!=str2len) return SIEVE_FAIL;
+
+ data1=string_DATAPTR(str1);
+ data2=str2;
+
+ for (lup=0;lup<str1->len;lup++)
+ if (data1[lup]!=data2[lup])
+ return SIEVE_FAIL;
+
+ return SIEVE_OK;
+}
+/*
+eq_result_t
+string_equal_cstr(const mystring_t * str, const char *cstr)
+{
+ int len;
+
+ I(str);
+ I(cstr);
+
+ len = strlen(cstr);
+ if (len != str->len)
+ return EQ_NOT_EQUAL;
+
+ if (memcmp(string_DATAPTR(str), cstr, len)==0)
+ return EQ_IS_EQUAL;
+
+
+ return EQ_NOT_EQUAL;
+}
+*/
+
+int safe_to_use_quoted(char *str, int len)
+{
+ char *end=str+len;
+
+ if (len > 4096)
+ return FALSE;
+
+ while (str < end) {
+ if (*str == '\0' /* check illegal chars... */
+ || *str == '\r'
+ || *str == '\n'
+
+#ifdef __CHAR_UNSIGNED__
+ || 0x7F < *str
+#else
+ || *str < 0
+#endif
+
+ )
+ return FALSE;
+ if (*str == '\"' /* check len, with \ escapes... */
+ || *str == '\\')
+ if (4096 < ++len)
+ return FALSE;
+ ++str;
+ }
+ return TRUE;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/mystring.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,82 @@
+/* mystring.h
+ * Tim Martin
+ * 9/21/99
+ * $Id: mystring.h,v 1.5 2003/02/13 20:15:53 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include "codes.h"
+
+
+#ifndef INCLUDED_MYSTRING_H
+#define INCLUDED_MYSTRING_H
+
+typedef struct {
+ int len;
+ /* Data immediately following... */
+} mystring_t;
+
+
+int string_allocate(int length,
+ const char *buf, /* NULL => no copy */
+ mystring_t ** str);
+
+int string_copy(mystring_t *oldstr,
+ mystring_t **newstr);
+
+void string_free(mystring_t **str);
+
+int string_compare(mystring_t *str1, mystring_t *str2);
+
+int string_comparestr(mystring_t *str1, char *str2);
+
+int string_compare_with(mystring_t *str1, mystring_t *str2, mystring_t *comp);
+
+/*eq_result_t
+ string_equal_cstr(const mystring_t * str, const char *cstr);*/
+
+#define string_DATAPTR(s) (s ? (((char *) s)+sizeof(mystring_t)) : 0)
+
+int safe_to_use_quoted(char *str, int len);
+
+
+#endif /* INCLUDED_MYSTRING_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,640 @@
+/* request.c -- request to execute functions on the timsieved server
+ * Tim Martin
+ * 9/21/99
+ * $Id: request.c,v 1.16 2003/02/13 20:15:53 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <sys/file.h>
+#include <errno.h>
+
+#include "request.h"
+
+#include "prot.h"
+#include "lex.h"
+#include "xmalloc.h"
+
+#define BLOCKSIZE 1024
+
+void parseerror(char *str)
+{
+ printf("Bad protocol from MANAGESIEVE server: %s\n", str);
+
+ exit(2);
+}
+
+int handle_response(int res,int version,struct protstream *pin,
+ char **refer_to, mystring_t **errstr)
+{
+ lexstate_t state;
+ int r = 0;
+
+ *refer_to = NULL;
+
+ if (res == -1)
+ parseerror("lost connection");
+
+ if ((res!=TOKEN_OK) && (res!=TOKEN_NO) && (res!=TOKEN_BYE))
+ parseerror("ATOM");
+
+ if(res == TOKEN_BYE) {
+ if (yylex(&state, pin)!=' ')
+ parseerror("expected space");
+
+ res = yylex(&state, pin);
+
+ /* additional error response */
+ if (res == '(') {
+ /* '(' string [SP string] ')' */
+
+ /* we only support the REFERRAL response with BYE */
+ if (yylex(&state, pin)==TOKEN_REFERRAL) {
+ if (yylex(&state, pin)!=' ')
+ parseerror("expected space");
+ if (yylex(&state, pin)!=STRING)
+ parseerror("expected string");
+
+ *refer_to = xstrdup(string_DATAPTR(state.str));
+
+ if (yylex(&state, pin)!=')')
+ parseerror("expected RPAREN");
+ } else {
+ res = 0;
+ while(res != ')' && res != -1) {
+ res = yylex(&state, pin);
+ }
+ if(res != ')') {
+ parseerror("expected RPARAN");
+ }
+ }
+
+ res = yylex(&state, pin);
+ if (res == ' ') res = yylex(&state, pin);
+ }
+
+ if (res != STRING && res != EOL)
+ parseerror("expected string2");
+
+ if (errstr)
+ *errstr = state.str;
+
+ r = -2;
+ } else if (res==TOKEN_NO) {
+ if (yylex(&state, pin)!=' ')
+ parseerror("expected space");
+
+ res = yylex(&state, pin);
+
+ /* additional error response */
+ if (res == '(') {
+ /* '(' string [SP string] ')' */
+
+ res = 0;
+ while(res != ')' && res != -1) {
+ res = yylex(&state, pin);
+ }
+ if(res != ')') {
+ parseerror("expected RPARAN");
+ }
+
+ res = yylex(&state, pin);
+ if (res == ' ') res = yylex(&state, pin);
+ }
+
+ if (res != STRING)
+ parseerror("expected string");
+
+
+ if (errstr)
+ *errstr = state.str;
+
+ r = -1;
+ } else {
+ /* ok */
+ int res;
+
+ /* SASL response */
+ res = yylex(&state, pin);
+ if(res == ' ') {
+ if (yylex(&state, pin) != '(')
+ parseerror("expected LPAREN");
+
+ if (yylex(&state, pin)==TOKEN_SASL) {
+ if (yylex(&state, pin)!=' ')
+ parseerror("expected space");
+ if (yylex(&state, pin)!=STRING)
+ parseerror("expected string");
+
+ *refer_to = xstrdup(string_DATAPTR(state.str));
+
+ if (yylex(&state, pin)!=')')
+ parseerror("expected RPAREN");
+ } else {
+ parseerror("unexpected response code with OK response");
+ }
+ } else if (version != OLD_VERSION && res == EOL) {
+ return r;
+ }
+
+ /* old version of protocol had strings with ok responses too */
+ if (version == OLD_VERSION) {
+ if (res !=' ')
+ parseerror("expected sp");
+
+ if (yylex(&state, pin)!=STRING)
+ parseerror("expected string");
+ }
+ }
+
+ if (yylex(&state, pin)!=EOL)
+ parseerror("expected EOL");
+
+ return r;
+}
+
+int deleteascript(int version, struct protstream *pout,
+ struct protstream *pin, char *name,
+ char **refer_to, char **errstrp)
+{
+ lexstate_t state;
+ int res;
+ int ret;
+ mystring_t *errstr;
+
+ prot_printf(pout,"DELETESCRIPT \"%s\"\r\n",name);
+ prot_flush(pout);
+
+ res=yylex(&state, pin);
+
+ ret = handle_response(res,version,pin,refer_to,&errstr);
+
+ if(ret == -2 && *refer_to) {
+ return -2;
+ } else if (ret!=0) {
+ *errstrp = malloc(128);
+ snprintf(*errstrp, 127,
+ "Deleting script: %s",string_DATAPTR(errstr));
+ return -1;
+ }
+
+ return 0;
+}
+
+int installdata(int version,struct protstream *pout, struct protstream *pin,
+ char *scriptname, char *data, int len,
+ char **refer_to, char **errstrp)
+{
+ int res;
+ int ret;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+
+ prot_printf(pout, "PUTSCRIPT \"%s\" ",scriptname);
+
+ prot_printf(pout, "{%d+}\r\n",len);
+
+ prot_write(pout, data, len);
+
+ prot_printf(pout,"\r\n");
+ prot_flush(pout);
+
+ /* now let's see what the server said */
+ res=yylex(&state,pin);
+
+ ret = handle_response(res,version,pin,refer_to,&errstr);
+
+ /* if command failed */
+ if(ret == -2 && *refer_to) {
+ return -2;
+ } else if (ret!=0) {
+ *errstrp = malloc(128);
+ snprintf(*errstrp, 127,
+ "Putting script: %s",string_DATAPTR(errstr));
+ return -1;
+ }
+
+ return 0;
+}
+
+static char *getsievename(char *filename)
+{
+ char *ret, *ptr;
+
+ ret=(char *) xmalloc( strlen(filename) + 2);
+
+ /* just take the basename of the file */
+ ptr = strrchr(filename, '/');
+ if (ptr == NULL) {
+ ptr = filename;
+ } else {
+ ptr++;
+ }
+
+ strcpy(ret, ptr);
+
+ if ( strcmp( ret + strlen(ret) - 7,".script")==0)
+ {
+ ret[ strlen(ret) - 7] = '\0';
+ }
+
+ return ret;
+}
+
+
+int installafile(int version,struct protstream *pout, struct protstream *pin,
+ char *filename, char *destname,
+ char **refer_to, char **errstrp)
+{
+ FILE *stream;
+ struct stat filestats; /* returned by stat */
+ int size; /* size of the file */
+ int result;
+ int cnt;
+ int res;
+ int ret;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+ char *sievename;
+
+ if(!destname) destname = filename;
+
+ sievename=getsievename(destname);
+
+ result=stat(filename,&filestats);
+
+ if (result!=0) {
+ if (errno == ENOENT) {
+ *errstrp = "no such file";
+ } else {
+ *errstrp = "file i/o error";
+ }
+ return -1;
+ }
+
+ size=filestats.st_size;
+
+ stream=fopen(filename, "r");
+
+ if (stream==NULL)
+ {
+ *errstrp = malloc(128);
+ snprintf(*errstrp, 127,
+ "put script: internal error: couldn't open temporary file");
+ return -1;
+ }
+
+ prot_printf(pout, "PUTSCRIPT \"%s\" ",sievename);
+
+ prot_printf(pout, "{%d+}\r\n",size);
+
+ cnt=0;
+
+ while (cnt < size)
+ {
+ char buf[BLOCKSIZE];
+ int amount=BLOCKSIZE;
+
+ if (size-cnt < BLOCKSIZE)
+ amount=size-cnt;
+
+ fread(buf, 1, BLOCKSIZE, stream);
+
+ prot_write(pout, buf, amount);
+
+ cnt+=amount;
+ }
+
+ prot_printf(pout,"\r\n");
+ prot_flush(pout);
+
+ /* now let's see what the server said */
+ res=yylex(&state,pin);
+
+ ret = handle_response(res,version,pin,refer_to,&errstr);
+
+ /* if command failed */
+ if(ret == -2 && *refer_to) {
+ return -2;
+ } else if (ret!=0) {
+ *errstrp = malloc(128);
+ snprintf(*errstrp, 127,
+ "put script: %s", string_DATAPTR(errstr));
+ return -1;
+ }
+
+ return 0;
+}
+
+
+
+int showlist(int version, struct protstream *pout, struct protstream *pin,
+ char **refer_to)
+{
+ lexstate_t state;
+ int end=0;
+ int res;
+ int ret = 0;
+
+ printf("You have the following scripts on the server:\n");
+
+ prot_printf(pout, "LISTSCRIPTS\r\n");
+ prot_flush(pout);
+
+ do {
+
+ if ((res=yylex(&state, pin))==STRING)
+ {
+ char *str=string_DATAPTR(state.str);
+
+ if (yylex(&state, pin)==' ')
+ {
+ if (yylex(&state, pin)!=TOKEN_ACTIVE)
+ printf("Expected ACTIVE\n");
+ if (yylex(&state, pin)!=EOL)
+ printf("Expected EOL\n");
+
+ printf(" %s <- Active Sieve Script\n",str);
+ } else {
+
+ /* in old version we had that '*' means active script thing */
+ if (version == OLD_VERSION) {
+
+ if (str[strlen(str)-1]=='*') {
+ str[strlen(str)-1]='\0';
+ printf(" %s <- Active Sieve Script\n",str);
+ } else {
+ printf(" %s\n",str);
+ }
+
+ } else { /* NEW_VERSION */
+ /* assume it's a EOL */
+ printf(" %s\n",str);
+ }
+ }
+
+ } else {
+
+ ret = handle_response(res,version,pin,refer_to,NULL);
+
+ end=1;
+ }
+
+
+
+ } while (end==0);
+
+ return ret;
+}
+
+int list_wcb(int version, struct protstream *pout,
+ struct protstream *pin,isieve_listcb_t *cb ,void *rock,
+ char **refer_to)
+{
+ lexstate_t state;
+ int end=0;
+ int res;
+ int ret = 0;
+
+ prot_printf(pout, "LISTSCRIPTS\r\n");
+ prot_flush(pout);
+
+ do {
+
+ if ((res=yylex(&state, pin))==STRING)
+ {
+ char *str=string_DATAPTR(state.str);
+
+ if (yylex(&state, pin)==' ')
+ {
+ if (yylex(&state, pin)!=TOKEN_ACTIVE)
+ printf("Expected ACTIVE\n");
+ if (yylex(&state, pin)!=EOL)
+ printf("Expected EOL\n");
+
+ cb(str, 1, rock);
+ } else {
+
+ /* in old version we had that '*' means active script thing */
+ if (version == OLD_VERSION) {
+
+ if (str[strlen(str)-1]=='*') {
+ str[strlen(str)-1]='\0';
+ cb(str, 1, rock);
+ } else {
+ cb(str, 0, rock);
+ }
+
+ } else { /* NEW_VERSION */
+ /* assume it's a EOL */
+ cb(str, 0, rock);
+ }
+ }
+
+ } else {
+ ret = handle_response(res,version,pin,refer_to,NULL);
+
+ end=1;
+ }
+ } while (end==0);
+
+ return ret;
+}
+
+int setscriptactive(int version, struct protstream *pout,
+ struct protstream *pin,char *name,
+ char **refer_to, char **errstrp)
+{
+ lexstate_t state;
+ int res;
+ int ret;
+ mystring_t *errstr=NULL;
+
+ /* tell server we want "name" to be the active script */
+ prot_printf(pout, "SETACTIVE \"%s\"\r\n",name);
+ prot_flush(pout);
+
+ /* now let's see what the server said */
+ res=yylex(&state, pin);
+
+ ret = handle_response(res, version, pin, refer_to, &errstr);
+
+ /* if command failed */
+ if(ret == -2 && *refer_to) {
+ return -2;
+ } else if (ret != 0) {
+ *errstrp = malloc(128);
+ snprintf(*errstrp, 127,
+ "Setting script active: %s",string_DATAPTR(errstr));
+ return -1;
+ }
+ return 0;
+}
+
+static int viewafile(mystring_t *data, char *name)
+{
+ printf("%s\r\n", string_DATAPTR(data));
+
+ return 0;
+}
+
+static int writefile(mystring_t *data, char *name, char **errstrp)
+{
+ FILE *stream;
+
+ char *scrname;
+
+ scrname=malloc(strlen(name)+10);
+ strcpy(scrname, name);
+ strcat(scrname, ".script");
+
+ stream=fopen(scrname,"w");
+
+ if (stream==NULL) {
+ *errstrp = malloc(128);
+ snprintf(*errstrp, 127,
+ "writefile: unable to open %s for writing", name);
+ return -1;
+ }
+
+ fwrite(string_DATAPTR(data), 1, data->len, stream);
+
+ fclose(stream);
+
+ return 0;
+}
+
+int getscript(int version, struct protstream *pout,
+ struct protstream *pin,char *name, int save,
+ char **refer_to, char **errstrp)
+{
+ int res;
+ mystring_t *str=NULL;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+ int ret = 0;
+
+ prot_printf(pout,"GETSCRIPT \"%s\"\r\n",name);
+ prot_flush(pout);
+
+ res=yylex(&state,pin);
+
+ if (res==STRING)
+ {
+
+ if (save==1)
+ writefile(state.str, name, errstrp);
+ else
+ viewafile(state.str, name);
+
+ if (yylex(&state, pin)!=EOL)
+ parseerror("EOL");
+
+ res=yylex(&state,pin);
+ }
+
+ ret = handle_response(res, version, pin, refer_to, &errstr);
+
+ /* if command failed */
+ if(ret == -2 && *refer_to) {
+ return -2;
+ } else if (ret!=0) {
+ *errstrp = malloc(128);
+ snprintf(*errstrp, 127,
+ "Getting script: %s",string_DATAPTR(errstr));
+ }
+
+ return ret;
+}
+
+
+int getscriptvalue(int version, struct protstream *pout,
+ struct protstream *pin,char *name, mystring_t **data,
+ char **refer_to, char **errstrp)
+{
+ int res;
+ int ret;
+ mystring_t *errstr=NULL;
+ lexstate_t state;
+
+ prot_printf(pout,"GETSCRIPT \"%s\"\r\n",name);
+ prot_flush(pout);
+
+ res=yylex(&state,pin);
+
+ if (res==STRING)
+ {
+ *data=state.str;
+
+ if (yylex(&state, pin)!=EOL)
+ parseerror("EOL");
+
+ res=yylex(&state,pin);
+ }
+
+ ret = handle_response(res,version,pin, refer_to, &errstr);
+
+ /* if command failed */
+ if(ret == -2 && *refer_to) {
+ return -2;
+ } else if (ret!=0) {
+ *errstrp = malloc(128);
+ snprintf(*errstrp, 127,
+ "Getting script: %s",string_DATAPTR(errstr));
+ return -1;
+ }
+
+ return 0;
+
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/lib/request.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,95 @@
+/* request.h -- request to execute functions on the timsieved server
+ * Tim Martin
+ * 9/21/99
+ * $Id: request.h,v 1.7 2003/02/13 20:15:53 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+#ifndef _REQUEST_H_
+#define _REQUEST_H_
+
+#include "mystring.h"
+#include "isieve.h"
+
+/* old and new versions of the protocol */
+#define OLD_VERSION 4
+#define NEW_VERSION 5
+#define ACAP_VERSION 6
+
+int handle_response(int res,int version,struct protstream *pin,
+ char **refer_to, mystring_t **errstr);
+
+int deleteascript(int version,struct protstream *pout, struct protstream *pin,
+ char *name, char **refer_to, char **errstr);
+
+int installafile(int version,struct protstream *pout, struct protstream *pin,
+ char *filename, char *destname,
+ char **refer_to, char **errstr);
+
+int installdata(int version,struct protstream *pout, struct protstream *pin,
+ char *scriptname, char *data, int len,
+ char **refer_to, char **errstr);
+
+int showlist(int version, struct protstream *pout, struct protstream *pin,
+ char **refer_to);
+
+int list_wcb(int version, struct protstream *pout, struct protstream *pin,
+ isieve_listcb_t *cb , void *rock, char **refer_to);
+
+int setscriptactive(int version, struct protstream *pout,
+ struct protstream *pin,
+ char *name, char **refer_to, char **errstr);
+
+/*
+ * Getscript. Save {0,1} wheather to save to disk or display on screen
+ */
+
+int getscript(int version, struct protstream *pout, struct protstream *pin,
+ char *name, int save, char **refer_to, char **errstr);
+
+int getscriptvalue(int version,struct protstream *pout, struct protstream *pin,
+ char *name, mystring_t **data, char **refer_to,
+ char **errstr);
+
+void parseerror(char *str);
+
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+Makefile
+blib
+managesieve.bs
+managesieve.c
+pm_to_blib
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,8 @@
+/.cvsignore/1.1/Sun Jan 6 02:03:32 2002//Tcyrus-release-2-3-7
+/MANIFEST/1.1/Tue May 9 17:22:30 2000//Tcyrus-release-2-3-7
+/Makefile.PL/1.12/Wed Oct 22 18:50:27 2003//Tcyrus-release-2-3-7
+/managesieve.h/1.5/Thu Feb 13 20:15:55 2003//Tcyrus-release-2-3-7
+/managesieve.pm/1.8/Sat May 25 19:57:51 2002//Tcyrus-release-2-3-7
+/managesieve.xs/1.21.2.1/Thu Apr 21 18:38:48 2005//Tcyrus-release-2-3-7
+/typemap/1.1/Wed May 3 17:31:02 2000//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl/sieve/managesieve
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/MANIFEST
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/MANIFEST?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/MANIFEST (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/MANIFEST Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Makefile.PL Build Makefile for Cyrus::sieve::managesieve
+managesieve.h include file
+managesieve.pm Cyrus::sieve::managesieve perl module
+managesieve.xs Perl interface routines for calling C
+typemap Typemap defining Perl "class"
+MANIFEST This file
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/Makefile.PL
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/Makefile.PL?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/Makefile.PL (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/Makefile.PL Sat Aug 26 02:00:13 2006
@@ -1,0 +1,66 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Makefile.PL,v 1.12 2003/10/22 18:50:27 rjs3 Exp $
+#
+use ExtUtils::MakeMaker;
+use Config;
+
+my $SASL_INC = $ENV{SASL_INC};
+my $SASL_LIB = $ENV{SASL_LIB} || "-lsasl2";
+my $OPENSSL_INC = $ENV{OPENSSL_INC};
+my $OPENSSL_LIB = $ENV{OPENSSL_LIB};
+my $BDB_INC = $ENV{BDB_INC};
+my $BDB_LIB = $ENV{BDB_LIB};
+
+my $LIB_RT = $ENV{LIB_RT};
+
+$libs = "-lcyrus";
+
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written.
+WriteMakefile(
+ 'NAME' => 'Cyrus::SIEVE::managesieve',
+ 'ABSTRACT' => 'Cyurs Sieve management interface',
+ 'VERSION_FROM' => 'managesieve.pm', # finds $VERSION
+ 'MYEXTLIB' => '../lib/isieve.o ../lib/lex.o ../lib/mystring.o ../lib/request.o ../../../lib/libcyrus.a ../../../lib/libcyrus_min.a',
+ 'LIBS' => ["$BDB_LIB $SASL_LIB $OPENSSL_LIB $LIB_RT -lssl -lcrypto"],
+ 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
+ 'INC' => "-I../lib/ -I../../../lib/ $SASL_INC $OPENSSL_INC",
+);
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,53 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: managesieve.h,v 1.5 2003/02/13 20:15:55 rjs3 Exp $ */
+
+#include "isieve.h"
+
+
+struct xscyrus {
+ isieve_t *isieve;
+
+ char *errstr; /* last error, if any */
+
+ char *class; /* needed by perl */
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.pm
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.pm?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.pm (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.pm Sat Aug 26 02:00:13 2006
@@ -1,0 +1,125 @@
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: managesieve.pm,v 1.8 2002/05/25 19:57:51 leg Exp $
+#
+package Cyrus::SIEVE::managesieve;
+
+use strict;
+use Carp;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
+
+require Exporter;
+require DynaLoader;
+
+ at ISA = qw(Exporter DynaLoader);
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+ at EXPORT = qw(
+ sieve_get_handle
+ sieve_get_error
+ sieve_get_global_error
+ sieve_put_file
+ sieve_put_file_withdest
+ sieve_put
+ sieve_delete
+ sieve_list
+ sieve_activate
+ sieve_get
+ sieve_logout
+);
+$VERSION = '0.01';
+
+sub AUTOLOAD {
+ # This AUTOLOAD is used to 'autoload' constants from the constant()
+ # XS function. If a constant is not found then control is passed
+ # to the AUTOLOAD in AutoLoader.
+
+ my $constname;
+ ($constname = $AUTOLOAD) =~ s/.*:://;
+ my $val = constant($constname, @_ ? $_[0] : 0);
+ if ($! != 0) {
+ if ($! =~ /Invalid/) {
+ $AutoLoader::AUTOLOAD = $AUTOLOAD;
+ goto &AutoLoader::AUTOLOAD;
+ }
+ else {
+ croak "Your vendor has not defined Cyrus::SIEVE::managesieve macro $constname";
+ }
+ }
+ eval "sub $AUTOLOAD { $val }";
+ goto &$AUTOLOAD;
+}
+
+bootstrap Cyrus::SIEVE::managesieve $VERSION;
+
+# Preloaded methods go here.
+
+# Autoload methods go after =cut, and are processed by the autosplit program.
+
+1;
+__END__
+# Below is the stub of documentation for your module. You better edit it!
+
+=head1 NAME
+
+Cyrus::SIEVE::managesieve - Perl extension for blah blah blah
+
+=head1 SYNOPSIS
+
+ use Cyrus::SIEVE::managesieve;
+ blah blah blah
+
+=head1 DESCRIPTION
+
+Call sieve_get_handle to get a handle for further calls.
+sieve_get_error will return a string representing the last error, if any.
+
+Blah blah blah.
+
+=head1 AUTHOR
+
+T. Martin, tmartin at andrew.cmu.edu
+
+=head1 SEE ALSO
+
+perl(1).
+
+=cut
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.xs
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.xs?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.xs (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/managesieve.xs Sat Aug 26 02:00:13 2006
@@ -1,0 +1,435 @@
+/*
+ * Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: managesieve.xs,v 1.21.2.1 2005/04/21 18:38:48 shadow Exp $ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#ifdef __cplusplus
+}
+#endif
+
+#include "managesieve.h"
+
+#include <netinet/in.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+typedef struct xscyrus *Sieveobj;
+static char *globalerr = NULL;
+
+#include "isieve.h"
+
+#include "xmalloc.h"
+
+static int
+not_here(s)
+char *s;
+{
+ croak("%s not implemented on this architecture", s);
+ return -1;
+}
+
+static double
+constant(name, arg)
+char *name;
+int arg;
+{
+ errno = 0;
+ switch (*name) {
+ }
+ errno = EINVAL;
+ return 0;
+
+not_there:
+ errno = ENOENT;
+ return 0;
+}
+
+void fatal(const char *s, int t)
+{
+ croak("failure: %s", s);
+ exit(-1);
+}
+
+static int
+perlsieve_getpass(conn, context, id, psecret)
+ sasl_conn_t *conn;
+ void *context;
+ int id;
+ sasl_secret_t **psecret;
+{
+ int count;
+ dSP ;
+ char *tmp;
+ SV * func = (SV *) context;
+
+ ENTER ;
+ SAVETMPS;
+ PUSHMARK(sp) ;
+
+ XPUSHs(sv_2mortal(newSVpv("password", 0)));
+ XPUSHs(sv_2mortal(newSVpv("Please enter your password", 0)));
+
+ PUTBACK ;
+ count = perl_call_sv(func, G_SCALAR);
+ SPAGAIN ;
+ if (count != 1)
+ croak("Big trouble\n") ;
+ tmp = POPp;
+
+ /* copy result */
+ *psecret = malloc(sizeof(sasl_secret_t) + strlen(tmp) + 2);
+ if (!*psecret) return SASL_NOMEM;
+ strcpy( (*psecret)->data ,tmp);
+ (*psecret)->len = strlen(tmp);
+
+ PUTBACK ;
+ FREETMPS ;
+ LEAVE ;
+
+ PUTBACK ;
+
+ return SASL_OK;
+}
+
+static int
+perlsieve_simple(context, id, result, len)
+ void *context;
+ int id;
+ unsigned char **result;
+ unsigned *len;
+{
+ int count;
+ dSP ;
+ char *tmp;
+ SV * func = (SV *) context;
+
+ ENTER ;
+ SAVETMPS;
+ PUSHMARK(sp) ;
+ if (id == SASL_CB_USER) {
+ XPUSHs(sv_2mortal(newSVpv("username", 0)));
+ XPUSHs(sv_2mortal(newSVpv("Please enter your username", 0)));
+ } else if (id == SASL_CB_AUTHNAME) {
+ XPUSHs(sv_2mortal(newSVpv("authname", 0)));
+ XPUSHs(sv_2mortal(newSVpv("Please enter your authentication name", 0)));
+ } else if (id == SASL_CB_GETREALM) {
+ XPUSHs(sv_2mortal(newSVpv("realm", 0)));
+ XPUSHs(sv_2mortal(newSVpv("Please enter your realm", 0)));
+ } else {
+ croak("Bad callback\n");
+ return SASL_FAIL;
+ }
+
+ PUTBACK ;
+ count = perl_call_sv(func, G_SCALAR);
+ SPAGAIN ;
+ if (count != 1)
+ croak("Big trouble\n") ;
+ tmp = POPp;
+
+ /* copy result */
+ *result = malloc(strlen(tmp) + 2);
+ if (!*result) return SASL_NOMEM;
+ strcpy(*result,tmp);
+ if (len) *len = strlen(*result);
+
+ PUTBACK ;
+ FREETMPS ;
+ LEAVE ;
+
+ PUTBACK ;
+
+ return SASL_OK;
+}
+
+
+static void *
+call_listcb(unsigned char *name, int isactive, void *rock)
+{
+ dSP ;
+ PUSHMARK(sp) ;
+ XPUSHs(sv_2mortal(newSVpv(name, 0)));
+ XPUSHs(sv_2mortal(newSViv(isactive)));
+ PUTBACK ;
+
+ /* call perl func */
+ perl_call_sv((SV *)rock, G_DISCARD) ;
+ return NULL;
+}
+
+
+MODULE = Cyrus::SIEVE::managesieve PACKAGE = Cyrus::SIEVE::managesieve
+PROTOTYPES: ENABLE
+
+
+
+Sieveobj
+sieve_get_handle(servername, username_cb, authname_cb, password_cb, realm_cb)
+ char *servername
+ SV *username_cb
+ SV *authname_cb
+ SV *password_cb
+ SV *realm_cb
+
+ PREINIT:
+ Sieveobj ret = NULL;
+ sasl_callback_t *callbacks;
+ int sock,port;
+ sasl_conn_t *saslconn;
+ int r;
+ struct servent *serv;
+ char *mechlist=NULL,*mlist=NULL;
+ const char *mtried;
+ isieve_t *obj;
+ char *p;
+
+ CODE:
+
+ /* xxx this gets leaked! */
+ callbacks = safemalloc(5 * sizeof(sasl_callback_t));
+
+ callbacks[0].id = SASL_CB_USER;
+ callbacks[0].proc = &perlsieve_simple;
+ callbacks[0].context = username_cb;
+ callbacks[1].id = SASL_CB_AUTHNAME;
+ callbacks[1].proc = &perlsieve_simple;
+ callbacks[1].context = authname_cb;
+ callbacks[2].id = SASL_CB_GETREALM;
+ callbacks[2].proc = &perlsieve_simple;
+ callbacks[2].context = realm_cb;
+ callbacks[3].id = SASL_CB_PASS;
+ callbacks[3].proc = &perlsieve_getpass;
+ callbacks[3].context = password_cb;
+ callbacks[4].id = SASL_CB_LIST_END;
+
+ /* see if we have server:port (or IPv6, etc)*/
+ p = servername;
+ if (*servername == '[') {
+ if ((p = strrchr(servername + 1, ']')) != NULL) {
+ *p++ = '\0';
+ servername++; /* skip first bracket */
+ } else
+ p = servername;
+ }
+ if ((p = strchr(p, ':'))) {
+ *p++ = '\0';
+ port = atoi(p);
+ } else {
+ /* map port -> num */
+ serv = getservbyname("sieve", "tcp");
+ if (serv == NULL) {
+ port = 2000;
+ } else {
+ port = ntohs(serv->s_port);
+ }
+ }
+
+ if (init_net(servername, port, &obj)) {
+ globalerr = "network initialization failed";
+ XSRETURN_UNDEF;
+ }
+
+ if (init_sasl(obj, 128, callbacks)) {
+ globalerr = "sasl initialization failed";
+ XSRETURN_UNDEF;
+ }
+
+ ret = malloc(sizeof(struct xscyrus));
+ ret->class = safemalloc(20);
+ strcpy(ret->class,"managesieve");
+ ret->isieve = obj;
+ ret->errstr = NULL;
+
+ mechlist=read_capability(obj);
+ if(!mechlist) {
+ globalerr = "sasl mech list empty";
+ XSRETURN_UNDEF;
+ }
+
+ mlist = (char*) xstrdup(mechlist);
+ if(!mlist) {
+ globalerr = "could not allocate memory for mech list";
+ XSRETURN_UNDEF;
+ }
+
+ /* loop through all the mechanisms */
+ do {
+ mtried = NULL;
+ r = auth_sasl(mlist, obj, &mtried, &globalerr);
+
+ if(r) init_sasl(obj, 128, callbacks);
+
+ if(mtried) {
+ char *newlist = (char*) xmalloc(strlen(mlist)+1);
+ char *mtr = (char*) xstrdup(mtried);
+ char *tmp;
+
+ ucase(mtr);
+ tmp = strstr(mlist,mtr);
+ *tmp ='\0';
+ strcpy(newlist, mlist);
+ tmp++;
+
+ tmp = strchr(tmp,' ');
+ if (tmp) {
+ strcat(newlist,tmp);
+ }
+
+ free(mtr);
+ free(mlist);
+ mlist = newlist;
+ }
+ } while (r && mtried);
+
+ if(r) {
+ /* we failed */
+ safefree(ret->class);
+ free(ret);
+ XSRETURN_UNDEF;
+ }
+ ST(0) = sv_newmortal();
+ sv_setref_pv(ST(0), ret->class, (void *) ret);
+
+char *
+sieve_get_error(obj)
+ Sieveobj obj
+ CODE:
+ RETVAL = obj->errstr;
+ OUTPUT:
+ RETVAL
+
+char *
+sieve_get_global_error()
+ CODE:
+ RETVAL = globalerr;
+ OUTPUT:
+ RETVAL
+
+int
+sieve_logout(obj)
+ Sieveobj obj
+ CODE:
+ /* xxx this leaves the object unusable */
+ isieve_logout(&(obj->isieve));
+ XSRETURN_UNDEF;
+
+int
+sieve_put_file(obj, filename)
+ Sieveobj obj
+ char *filename
+ CODE:
+ RETVAL = isieve_put_file(obj->isieve, filename, NULL, &obj->errstr);
+ OUTPUT:
+ RETVAL
+
+int
+sieve_put_file_withdest(obj, filename, destname)
+ Sieveobj obj
+ char *filename
+ char *destname
+ CODE:
+ RETVAL = isieve_put_file(obj->isieve, filename, destname, &obj->errstr);
+ OUTPUT:
+ RETVAL
+
+int
+sieve_put(obj,name,data)
+ Sieveobj obj
+ char *name
+ char *data
+
+ CODE:
+ RETVAL = isieve_put(obj->isieve, name, data, strlen(data), &obj->errstr);
+ OUTPUT:
+ RETVAL
+
+int
+sieve_delete(obj,name)
+ Sieveobj obj
+ char *name
+
+ CODE:
+ RETVAL = isieve_delete(obj->isieve, name, &obj->errstr);
+ OUTPUT:
+ RETVAL
+
+int
+sieve_list(obj,cb)
+ Sieveobj obj
+ SV *cb
+
+ CODE:
+ RETVAL = isieve_list(obj->isieve, (isieve_listcb_t *) &call_listcb,
+ cb, &obj->errstr);
+ OUTPUT:
+ RETVAL
+
+int
+sieve_activate(obj,name)
+ Sieveobj obj
+ char *name
+
+ CODE:
+ RETVAL = isieve_activate(obj->isieve, name, &obj->errstr);
+ OUTPUT:
+ RETVAL
+
+int
+sieve_get(obj,name,output)
+ Sieveobj obj
+ char *name
+ char *output
+
+ CODE:
+ RETVAL = isieve_get(obj->isieve, name, &output, &obj->errstr);
+
+ OUTPUT:
+ RETVAL
+ output
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/typemap
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/typemap?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/typemap (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/managesieve/typemap Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+TYPEMAP
+unsigned * T_PTROBJ
+unsigned char ** T_PTROBJ
+acapsieve_list_cb_t * T_PTROBJ
+
+Sieveobj T_PTROBJ_SPECIAL
+
+INPUT
+T_PTROBJ_SPECIAL
+ IV tmp = SvIV((SV*)SvRV($arg));
+ $var = ($type) tmp;
+
+
+OUTPUT
+T_PTROBJ_SPECIAL
+ sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/_/::/g;\$ntt}\", (void *) $var);
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/installsieve.pl/1.7/Sat May 25 19:57:52 2002//Tcyrus-release-2-3-7
+/sieveshell.pl/1.21.2.1/Thu Jan 15 20:24:44 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/perl/sieve/scripts
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/installsieve.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/installsieve.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/installsieve.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/installsieve.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,168 @@
+#! /bin/sh
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: installsieve.pl,v 1.7 2002/05/25 19:57:52 leg Exp $
+#
+use Cyrus::SIEVE::managesieve;
+use Getopt::Long;
+
+$username = "";
+
+print "NOTE: This program is deprecated. Please use sieveshell\n";
+print "\n";
+
+$ret = GetOptions("v|views:s" => \$views,
+ "l|list" => \$list,
+# "p|port:i" => \$port,
+ "i|installs:s" => \$installs,
+ "a|activates:s" => \$activates,
+ "d|deletes:s" => \$deletes,
+# "m|mechanism:s" => \$mech,
+ "g|gets:s" => \$gets,
+ "u|username:s" => \$username,
+# "w|password:s" => \$pass
+ );
+if (!$ret || $#ARGV != 0) {
+ show_help();
+ exit;
+}
+
+$acapserver = $ARGV[0];
+
+sub list_cb {
+
+ my($name, $isactive) = @_ ;
+
+ print "$name ";
+ if ($isactive == 1) {
+ print " <- active script\n";
+ } else {
+ print "\n";
+ }
+
+}
+
+sub prompt {
+
+ my($type, $prompt) = @_ ;
+
+ if (($type eq "username") && (defined $username)) {
+ return $username;
+ } elsif (($type eq "authname") && (defined $username)) {
+ return $username;
+ } elsif (($type eq "realm") && (defined $realm)) {
+ return $realm;
+ }
+
+ print "$prompt: ";
+
+ $b = <STDIN>;
+ chop($b);
+
+ $b;
+}
+
+sub show_help {
+ print "Usage:\n";
+ print " installsieve [options] <server>\n";
+ print "\n";
+ print " -v <name> view script\n";
+ print " -l list available scripts\n";
+# print " -p <port> port to connect to\n";
+ print " -i <file> filename of script to install\n";
+ print " -a <name> Set <name> as the active script\n";
+ print " -d <name> Delete <name> script from server\n";
+# print " -m <mech> Mechanism to use for authentication\n";
+ print " -g <name> Get script <name> and save to disk\n";
+ print " -u <user> Userid/Authname to use\n";
+# print " -w <passwd> Specify password (Should only be used for automated scripts)\n";
+ print "\n";
+}
+
+#main code
+my $obj = sieve_get_handle($acapserver,"prompt","prompt","prompt","prompt");
+
+if (!defined $obj) {
+ die "Unable to connect to server";
+}
+
+if (defined $installs) {
+ $ret = sieve_put_file($obj, $installs);
+ if ($ret != 0) { print "upload failed\n"; }
+}
+
+if (defined $deletes) {
+ $ret = sieve_delete($obj, $deletes);
+ if ($ret != 0) { print "delete failed\n"; }
+}
+
+if (defined $activates) {
+ $ret = sieve_activate($obj, $activates);
+ if ($ret != 0) { print "activate failed\n"; }
+}
+
+if (defined $gets) {
+ $str = "";
+ $ret = sieve_get($obj, $gets, $str);
+ if ($ret != 0) {
+ print "get failed\n";
+ } else {
+ open (OUTPUT,">$gets") || die "Unable to open $gets";
+ print OUTPUT $str;
+ close(OUTPUT);
+ }
+}
+if (defined $views) {
+ $str = "";
+ $ret = sieve_get($obj, $views, $str);
+ if ($ret != 0) {
+ print "get failed\n";
+ } else {
+ # view
+ print $str;
+ }
+}
+
+if (defined $list) {
+ $ret = sieve_list($obj, "list_cb");
+ if ($ret != 0) { print "List command failed\n"; }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/sieveshell.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/sieveshell.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/sieveshell.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/perl/sieve/scripts/sieveshell.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,348 @@
+#! /bin/sh
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: sieveshell.pl,v 1.21.2.1 2004/01/15 20:24:44 ken3 Exp $
+#
+
+use Cyrus::SIEVE::managesieve;
+use Getopt::Long;
+use strict;
+use File::Temp qw/ tempfile /;
+use Pod::Usage;
+use Term::ReadLine;
+use POSIX qw(:sys_wait_h);
+
+my $puthelp = "put <filename> [<target name>]\n" .
+ " - upload script to server\n";
+my $gethelp = "get <name> [<filename>]\n" .
+ " - get script. if no filename display to stdout\n";
+my $activatehelp = "activate <name> - set a script as the active script\n";
+my $deactivatehelp = "deactivate - deactivate all scripts\n";
+my $deletehelp = "delete <name> - delete script.\n";
+
+my $username = $ENV{USER};
+my $authname = $ENV{USER};
+my $realm = "";
+my $ex = "";
+my $help = 0;
+my $man = 0;
+my $ret;
+
+GetOptions("a|authname:s" => \$authname,
+ "u|username:s" => \$username,
+ "r|realm:s" => \$realm,
+ "e|exec:s" => \$ex,
+ "help|?" => \$help,
+ man => \$man) or pod2usage(2);
+pod2usage(1) if $help;
+pod2usage(-exitstatus => 0, -verbose => 2) if $man;
+
+if ($#ARGV != 0) {
+ pod2usage("$0: need a server\n");
+}
+
+my $acapserver = $ARGV[0];
+
+my $filehandle;
+my $interactive;
+
+if (! $ex eq "") {
+ $filehandle = tempfile();
+
+ if (!$filehandle) { die "unable to open tmp file: $?"; }
+
+ print $filehandle $ex;
+ seek $filehandle, 0, 0; # rewind file
+ $interactive = 0;
+} else {
+ $filehandle = *STDIN;
+ $interactive = 1;
+}
+
+
+
+sub list_cb {
+
+ my($name, $isactive) = @_ ;
+
+ print "$name ";
+ if ($isactive == 1) {
+ print " <- active script\n";
+ } else {
+ print "\n";
+ }
+
+}
+
+sub prompt {
+
+ my($type, $prompt) = @_ ;
+
+ if (($type eq "username") && (defined $username)) {
+ return $username;
+ } elsif (($type eq "authname") && (defined $authname)) {
+ return $authname;
+ } elsif (($type eq "realm") && (defined $realm)) {
+ return $realm;
+ }
+
+ my $ostty;
+ my $str = "";
+ chomp($ostty = `stty -g`);
+
+ if ($type eq "password") {
+ system "stty -echo -icanon min 1 time 0 2>/dev/null || " .
+ "stty -echo cbreak";
+ $str = "\n";
+ }
+
+ print "$prompt: ";
+
+ $b = <STDIN>;
+ chop($b);
+
+ print $str;
+ system "stty $ostty";
+
+ return $b;
+}
+
+sub show_help {
+ print "Usage:\n";
+ print " sieveshell [-u username] [-a authname] [-r realm] <server>\n";
+ print "\n";
+ print "help - this screen\n";
+ print "list - list scripts on server\n";
+ print $puthelp;
+ print $gethelp;
+ print $deletehelp;
+ print $activatehelp;
+ print $deactivatehelp;
+ print "quit - quit\n";
+}
+
+# main code
+
+print "connecting to $acapserver\n";
+
+my $obj = sieve_get_handle($acapserver,
+ "prompt", "prompt", "prompt", "prompt");
+
+if (!defined $obj) {
+ die "unable to connect to server";
+}
+
+my $term = Term::ReadLine->new("sieveshell");
+
+$term->ornaments(0);
+
+while(defined($_ = ($interactive ? $term->readline('> ') : <$filehandle>))){
+
+ $term->addhistory($_);
+
+ my @words = split ' ',$_;
+ my $str;
+ if ($#words < 0) {
+ next;
+ }
+
+ if (($words[0] eq "put") ||
+ ($words[0] eq "p")) {
+ if($#words == 1) {
+ $ret = sieve_put_file($obj, $words[1]);
+ } elsif ($#words == 2) {
+ $ret = sieve_put_file_withdest($obj, $words[1], $words[2]);
+ } else {
+ print $puthelp;
+ next;
+ }
+ if ($ret != 0) {
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "upload failed: $errstr\n";
+ }
+ } elsif (($words[0] eq "list") ||
+ ($words[0] eq "l") ||
+ ($words[0] eq "ls")) {
+ $ret = sieve_list($obj, "list_cb");
+ if ($ret != 0) {
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "list failed: $errstr\n";
+ }
+ } elsif (($words[0] eq "activate") ||
+ ($words[0] eq "a")) {
+ if ($#words != 1) {
+ print $activatehelp;
+ next;
+ }
+ $ret = sieve_activate($obj, $words[1]);
+ if ($ret != 0) {
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "activate failed: $errstr\n";
+ }
+ } elsif (($words[0] eq "deactivate") ||
+ ($words[0] eq "da")) {
+ if ($#words != 0) {
+ print $deactivatehelp;
+ next;
+ }
+ $ret = sieve_activate($obj, "");
+ if ($ret != 0) {
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "deactivate failed: $errstr\n";
+ }
+ } elsif (($words[0] eq "delete") ||
+ ($words[0] eq "d")) {
+ if ($#words != 1) {
+ print $deletehelp;
+ next;
+ }
+ $ret = sieve_delete($obj, $words[1]);
+ if ($ret != 0) {
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "delete failed: $errstr\n";
+ }
+ } elsif (($words[0] eq "get") ||
+ ($words[0] eq "g")) {
+ if ($#words != 1 && $#words != 2) {
+ print $gethelp;
+ next;
+ }
+ $str = "";
+ $ret = sieve_get($obj, $words[1], $str);
+ if ($ret != 0) {
+ my $errstr = sieve_get_error($obj);
+ $errstr = "unknown error" if(!defined($errstr));
+ print "get failed: $errstr\n";
+ } else {
+ if ($words[2]) {
+ open (OUTPUT,">$words[2]") || die "Unable to open $words[2]";
+ print OUTPUT $str;
+ close(OUTPUT);
+ } else {
+ print $str;
+ }
+ }
+ } elsif (($words[0] eq "quit") || ($words[0] eq "q")) {
+ sieve_logout($obj);
+ exit 0;
+ } elsif (($words[0] eq "help") || ($words[0] eq "?")) {
+ show_help();
+ } else {
+ print "Invalid command: $words[0]\n";
+ }
+}
+
+__END__
+
+=head1 NAME
+
+sieveshell - remotely manipulate sieve scripts
+
+=head1 SYNOPSIS
+
+sieveshell [B<--user>=I<user>] [B<--authname>=I<authname>]
+[B<--realm>=I<realm>] [B<--exec>=I<script>] I<server>[B<:>I<port>]
+
+sieveshell B<--help>
+
+=head1 DESCRIPTION
+
+B<sieveshell> allows users to manipulate their scripts on a remote
+server. It works via MANAGESIEVE, a work in progress.
+
+The following commands are recognized:
+
+=over 4
+
+B<list> list scripts on server.
+
+B<put> <filename> upload script to server.
+
+B<get> <name> [<filename>] get script. if no filename display to stdout
+
+B<delete> <name> delete script.
+
+B<activate> <name> activate script.
+
+B<deactivate> deactivate all scripts.
+
+=back
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-u> I<user>, B<--user>=I<user>
+
+The authorization name to request; by default, derived from the
+authentication credentials.
+
+=item B<-a> I<authname>, B<--authname>=I<authname>
+
+The user to use for authentication (defaults to current user).
+
+=item B<-r> I<realm>, B<--realm>=I<realm>
+
+The realm to attempt authentication in.
+
+=item B<-e> I<script>, B<--exec>=I<script>
+
+Instead of working interactively, run commands from I<script>, and
+exit when done.
+
+=back
+
+=head1 REFERENCES
+
+[MANAGESIEVE] Martin, T.; "A Protocol for Remotely Managing Sieve
+Scripts", draft-ietf-managesieve-03.txt, Mirapoint, Inc.; May 2001,
+work in progress.
+
+=head1 AUTHOR
+
+Tim Martin E<lt>tmartin at mirapoint.comE<gt>, and the rest of the Cyrus
+team E<lt>cyrus-bugs at andrew.cmu.eduE<gt>.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,4 @@
+Makefile
+ptexpire
+ptdump
+ptloader
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,13 @@
+/.cvsignore/1.2.10.1/Wed Mar 24 19:53:19 2004//Tcyrus-release-2-3-7
+/Makefile.in/1.23.2.7/Mon Jun 19 16:00:18 2006//Tcyrus-release-2-3-7
+/README/1.5/Wed Oct 22 18:50:29 2003//Tcyrus-release-2-3-7
+/afskrb.c/1.2.2.7/Wed Feb 16 21:07:09 2005//Tcyrus-release-2-3-7
+/ldap.c/1.2.2.7/Thu Apr 13 18:39:44 2006//Tcyrus-release-2-3-7
+/ptdump.c/1.8.2.4/Wed Mar 24 19:53:19 2004//Tcyrus-release-2-3-7
+/ptexpire.c/1.14.2.4/Mon May 31 18:23:01 2004//Tcyrus-release-2-3-7
+/ptextract.c/1.4/Thu Feb 13 20:15:56 2003//Tcyrus-release-2-3-7
+/ptloader.c/1.32.2.9/Fri Feb 25 07:19:06 2005//Tcyrus-release-2-3-7
+/ptloader.h/1.1.2.1/Wed Feb 16 21:07:09 2005//Tcyrus-release-2-3-7
+/test.c/1.6/Wed Oct 22 18:50:29 2003//Tcyrus-release-2-3-7
+/test2.c/1.6/Wed Oct 22 18:50:29 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/ptclient
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,130 @@
+# Makefile for ptclient
+#
+# @configure_input@
+#
+#
+# Copyright (c) 1996-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# $Id: Makefile.in,v 1.23.2.7 2006/06/19 16:00:18 murch Exp $
+#
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+PURIFY = /usr/local/bin/purify
+
+CC = @CC@
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@
+CPPFLAGS = -I.. -I$(srcdir)/../imap -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+AFS_LDFLAGS = @AFS_LDFLAGS@ @COM_ERR_LDFLAGS@
+AFS_LIBS = @AFS_LIBS@
+IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@
+LIBS = $(IMAP_LIBS) @COM_ERR_LIBS@
+LIB_SASL = @LIB_SASL@
+LIB_WRAP = @LIB_WRAP@
+DEPLIBS = ../imap/libimap.a ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+UTIL_LIBS = ../imap/mutex_fake.o ../imap/cli_fatal.o
+
+LDAP_LIBS=@LDAP_LIBS@
+LDAP_CPPFLAGS=@LDAP_CPPFLAGS@
+LDAP_LDFLAGS=@LDAP_LDFLAGS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+service_path = @service_path@
+
+EXTRA_PROGS = # ptextract pttest
+PROGS = ptexpire ptloader ptdump $(EXTRA_PROGS)
+
+LIB_RT = @LIB_RT@
+
+SERVICE=../master/service.o
+SERVICETHREAD=../master/service-thread.o
+
+all: $(PROGS)
+
+install:
+ $(INSTALL) -m 755 ptloader $(DESTDIR)$(service_path)
+ $(INSTALL) -m 755 ptexpire $(DESTDIR)$(service_path)
+ $(INSTALL) -m 755 ptdump $(DESTDIR)$(service_path)
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(LDAP_CPPFLAGS) $(DEFS) $(CFLAGS) $<
+
+ptloader: ptloader.o afskrb.o ldap.o ../imap/mutex_fake.o $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o $@ ptloader.o afskrb.o ldap.o ../imap/mutex_fake.o $(SERVICETHREAD) ${AFS_LDFLAGS} ${LDAP_LDFLAGS} $(AFS_LIBS) ${LDAP_LIBS} $(DEPLIBS) $(LIB_SASL) $(LIBS) $(LIB_WRAP) $(LIB_RT)
+
+ptloader.pure: ptloader.o afskrb.o ldap.o ../imap/mutex_fake.o $(DEPLIBS)
+ $(PURIFY) $(PUREARGS) $(CC) $(LDFLAGS) -o $@ ptloader.o afskrb.o ldap.o ../imap/mutex_fake.o $(SERVICETHREAD) ${AFS_LDFLAGS} ${LDAP_LDFLAGS} $(AFS_LIBS) ${LDAP_LIBS} $(DEPLIBS) $(LIB_SASL) $(LIBS) $(LIB_WRAP) $(LIB_RT)
+
+ptexpire: ptexpire.o $(DEPLIBS) $(UTIL_LIBS)
+ $(CC) $(LDFLAGS) -o $@ ptexpire.o $(UTIL_LIBS) $(DEPLIBS) $(LIB_SASL) $(LIBS) $(LIB_RT)
+
+ptexpire.pure: ptexpire.o $(DEPLIBS) $(UTIL_LIBS)
+ $(PURIFY) $(PUREARGS) $(CC) $(LDFLAGS) -o $@ ptexpire.o $(UTIL_LIBS) $(DEPLIBS) $(LIB_SASL) $(LIBS) $(LIB_WRAP) $(LIB_RT)
+
+ptdump: ptdump.o $(DEPLIBS) $(UTIL_LIBS)
+ $(CC) $(LDFLAGS) -o $@ ptdump.o $(UTIL_LIBS) $(DEPLIBS) $(LIB_SASL) $(LIBS) $(LIB_RT)
+
+ptdump.pure: ptexpire.o $(DEPLIBS) $(UTIL_LIBS)
+ $(PURIFY) $(PUREARGS) $(CC) $(LDFLAGS) -o $@ ptdump.o $(UTIL_LIBS) $(DEPLIBS) $(LIB_SASL) $(LIBS) $(LIB_WRAP) $(LIB_RT)
+
+ptextract: ptextract.o $(DEPLIBS) $(UTIL_LIBS)
+ $(CC) $(LDFLAGS) -o $@ ptextract.o $(UTIL_LIBS) $(DEPLIBS) $(LIBS)
+
+clean:
+ rm -f *.o Makefile.bak $(PROGS) makedepend.log
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ $(MAKEDEPEND) $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c \
+ 1>makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,13 @@
+$Id: README,v 1.5 2003/10/22 18:50:29 rjs3 Exp $
+
+This directory contains support programs for various protection database
+authorization modules (ptloader for AFS PTS groups, and hopefully an ldaploader
+soon).
+
+This code links against the rest of the cyrus libraries.
+
+The files to care about:
+
+ptloader: the AFS pts server loader service
+ptexpire: program to expire pts entries on command
+ptdump: program to dump the current cache
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/afskrb.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/afskrb.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/afskrb.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/afskrb.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,538 @@
+/* afskrb.c - AFS PTS Group (Kerberos Canonicalization) Backend to ptloader */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+static char rcsid[] __attribute__((unused)) =
+ "$Id: afskrb.c,v 1.2.2.7 2005/02/16 21:07:09 shadow Exp $";
+
+#include <config.h>
+#include "ptloader.h"
+#include "exitcodes.h"
+
+#ifdef HAVE_AFSKRB
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+
+#ifdef AFSPTS_USE_KRB5
+#include <krb5.h>
+#else
+#include <krb.h>
+#endif
+
+#include "auth_pts.h"
+#include "libconfig.h"
+#include "strhash.h"
+#include "xmalloc.h"
+
+/* AFS stuff */
+#include <des.h> /* for int32, necessary for the AFS includes below */
+#include <afs/ptserver.h>
+#include <afs/pterror.h>
+#include <afs/cellconfig.h>
+#include <rx/rxkad.h>
+#include <afs/auth.h>
+
+/* blame transarc i've been told */
+#ifndef AFSCONF_CLIENTNAME
+#include <afs/dirpath.h>
+#define AFSCONF_CLIENTNAME AFSDIR_CLIENT_ETC_DIRPATH
+#endif
+
+/* Sanity Check */
+#if PTS_DB_KEYSIZE < PR_MAXNAMELEN
+#error PTS_DB_KEYSIZE is smaller than PR_MAXNAMELEN
+#endif
+
+static const char *localrealms = NULL;
+
+int is_local_realm(const char *realm)
+{
+ const char *val = localrealms;
+
+ if(!val || !realm) return 0;
+
+ while (*val) {
+ char buf[1024];
+ size_t len;
+ char *p;
+
+ for (p = (char *) val; *p && !isspace((int) *p); p++);
+ len = p-val;
+ if(len >= sizeof(buf))
+ len = sizeof(buf) - 1;
+ memcpy(buf, val, len);
+ buf[len] = '\0';
+
+ if (!strcasecmp(realm,buf)) {
+ return 1;
+ }
+ val = p;
+ while (*val && isspace((int) *val)) val++;
+ }
+
+ return 0;
+}
+
+#ifdef AFSPTS_USE_KRB5
+
+/*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+ * or NULL if 'identifier' is invalid.
+ */
+static char *afspts_canonifyid(const char *identifier, size_t len)
+{
+ static char *retbuf = NULL;
+ krb5_context context;
+ krb5_principal princ, princ_dummy;
+ char *realm;
+ char *realmbegin;
+ int striprealm = 0;
+
+ if(retbuf) free(retbuf);
+ retbuf = NULL;
+
+ if(!identifier) return NULL;
+ if(!len) len = strlen(identifier);
+
+ if (strcasecmp(identifier, "anonymous") == 0)
+ return "anonymous";
+
+ if (strcasecmp(identifier, "anyone") == 0)
+ return "anyone";
+
+ if (krb5_init_context(&context))
+ return NULL;
+
+ if (krb5_parse_name(context,identifier,&princ))
+ {
+ krb5_free_context(context);
+ return NULL;
+ }
+
+ if(config_getswitch(IMAPOPT_PTSKRB5_STRIP_DEFAULT_REALM)) {
+ /* get local realm */
+ if (krb5_get_default_realm(context,&realm))
+ {
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ return NULL;
+ }
+
+ /* build dummy princ to compare realms */
+ if (krb5_build_principal(context,&princ_dummy,
+ strlen(realm),realm,"dummy",0))
+ {
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ free(realm);
+ return NULL;
+ }
+
+ /* is this principal local ? */
+ if (krb5_realm_compare(context,princ,princ_dummy))
+ {
+ striprealm = 1;
+ }
+
+ /* done w/ dummy princ free it & realm */
+ krb5_free_principal(context,princ_dummy);
+ free(realm);
+ }
+
+ if (config_getswitch(IMAPOPT_PTSKRB5_CONVERT524)) {
+ char nbuf[64], ibuf[64], rbuf[64];
+
+ if (krb5_524_conv_principal(context, princ, nbuf, ibuf, rbuf)) {
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ return NULL;
+ }
+
+ retbuf = xmalloc(3*64 + 3);
+ sprintf(retbuf, "%s%s%s%s%s", nbuf,
+ ibuf[0] ? "." : "", ibuf,
+ rbuf[0] ? "@" : "", rbuf);
+ } else {
+ /* get the text version of princ */
+ if (krb5_unparse_name(context,princ,&retbuf))
+ {
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ return NULL;
+ }
+ }
+
+ /* we have the canonical name pointed to by p -- strip realm if local */
+ realmbegin = strrchr(retbuf, '@');
+ if(realmbegin) {
+ if(!striprealm) {
+ realm = realmbegin+1;
+ if(is_local_realm(realm))
+ striprealm = 1;
+ }
+
+ if(striprealm) {
+ *realmbegin = '\0';
+ } else {
+ /* Force realm to uppercase */
+ while(*(++realmbegin)) {
+ *realmbegin = toupper(*realmbegin);
+ }
+ }
+ }
+
+ krb5_free_principal(context,princ);
+ krb5_free_context(context);
+ return retbuf;
+}
+
+
+#else /* AFSPTS_USE_KRB5 not defined */
+
+/* Sanity Check */
+# if PTS_DB_KEYSIZE < MAX_K_NAME_SZ
+# error PTS_DB_KEYSIZE is smaller than MAX_K_NAME_SZ
+# endif
+
+/* where is krb.equiv? */
+# ifndef KRB_MAPNAME
+# define KRB_MAPNAME (SYSCONFDIR "/krb.equiv")
+# endif
+
+/*
+ * Parse a line 'src' from an /etc/krb.equiv file.
+ * Sets the buffer pointed to by 'principal' to be the kerberos
+ * identity and sets the buffer pointed to by 'localuser' to
+ * be the local user. Both buffers must be of size one larger than
+ * MAX_K_NAME_SZ. Returns 1 on success, 0 on failure.
+ */
+static int parse_krbequiv_line(const char *src,
+ char *principal,
+ char *localuser)
+{
+ int i;
+
+ while (isspace(*src)) src++;
+ if (!*src) return 0;
+
+ for (i = 0; *src && !isspace(*src); i++) {
+ if (i >= MAX_K_NAME_SZ) return 0;
+ *principal++ = *src++;
+ }
+ *principal = 0;
+
+ if (!isspace(*src)) return 0; /* Need at least one separator */
+ while (isspace(*src)) src++;
+ if (!*src) return 0;
+
+ for (i = 0; *src && !isspace(*src); i++) {
+ if (i >= MAX_K_NAME_SZ) return 0;
+ *localuser++ = *src++;
+ }
+ *localuser = 0;
+ return 1;
+}
+
+/*
+ * Map a remote kerberos principal to a local username. If a mapping
+ * is found, a pointer to the local username is returned. Otherwise,
+ * a NULL pointer is returned.
+ * Eventually, this may be more sophisticated than a simple file scan.
+ */
+static char *auth_map_krbid(const char *real_aname,
+ const char *real_inst,
+ const char *real_realm)
+{
+ static char localuser[MAX_K_NAME_SZ + 1];
+ char principal[MAX_K_NAME_SZ + 1];
+ char aname[ANAME_SZ];
+ char inst[INST_SZ];
+ char realm[REALM_SZ];
+ char lrealm[REALM_SZ];
+ char krbhst[MAX_HSTNM];
+ char *p;
+ char buf[1024];
+ FILE *mapfile;
+
+ if (!(mapfile = fopen(KRB_MAPNAME, "r"))) {
+ /* If the file can't be opened, don't do mappings */
+ return 0;
+ }
+
+ for (;;) {
+ if (!fgets(buf, sizeof(buf), mapfile)) break;
+ if (parse_krbequiv_line(buf, principal, localuser) == 0 ||
+ kname_parse(aname, inst, realm, principal) != 0) {
+ /* Ignore badly formed lines */
+ continue;
+ }
+ if (!strcmp(aname, real_aname) && !strcmp(inst, real_inst) &&
+ !strcmp(realm, real_realm)) {
+ fclose(mapfile);
+
+ aname[0] = inst[0] = realm[0] = '\0';
+ if (kname_parse(aname, inst, realm, localuser) != 0) {
+ return 0;
+ }
+
+ /* Upcase realm name */
+ for (p = realm; *p; p++) {
+ if (islower(*p)) *p = toupper(*p);
+ }
+
+ if (*realm) {
+ if (krb_get_lrealm(lrealm,1) == 0 &&
+ strcmp(lrealm, realm) == 0) {
+ *realm = 0;
+ }
+ else if (krb_get_krbhst(krbhst, realm, 1)) {
+ return 0; /* Unknown realm */
+ }
+ }
+
+ strcpy(localuser, aname);
+ if (*inst) {
+ strcat(localuser, ".");
+ strcat(localuser, inst);
+ }
+ if (*realm) {
+ strcat(localuser, "@");
+ strcat(localuser, realm);
+ }
+
+ return localuser;
+ }
+ }
+
+ fclose(mapfile);
+ return 0;
+}
+
+/*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+ * or NULL if 'identifier' is invalid.
+ */
+static char *afspts_canonifyid(const char *identifier, size_t len)
+{
+ static char retbuf[MAX_K_NAME_SZ+1];
+ char aname[ANAME_SZ];
+ char inst[INST_SZ];
+ char realm[REALM_SZ];
+ char lrealm[REALM_SZ];
+ char krbhst[MAX_HSTNM];
+ char *canon_buf;
+ char *p;
+
+ if(!len) len = strlen(identifier);
+
+ canon_buf = xmalloc(len + 1);
+ memcpy(canon_buf, identifier, len);
+ canon_buf[len] = '\0';
+
+ aname[0] = inst[0] = realm[0] = '\0';
+ if (kname_parse(aname, inst, realm, canon_buf) != 0) {
+ free(canon_buf);
+ return 0;
+ }
+
+ free(canon_buf);
+
+ /* Upcase realm name */
+ for (p = realm; *p; p++) {
+ if (islower(*p)) *p = toupper(*p);
+ }
+
+ if (*realm) {
+ if (krb_get_lrealm(lrealm,1) == 0 &&
+ strcmp(lrealm, realm) == 0) {
+ *realm = 0;
+ }
+ else if (krb_get_krbhst(krbhst, realm, 1)) {
+ return 0; /* Unknown realm */
+ }
+ }
+
+ /* Check for krb.equiv remappings. */
+ p = auth_map_krbid(aname, inst, realm);
+ if (p) {
+ strcpy(retbuf, p);
+ return retbuf;
+ }
+
+ strcpy(retbuf, aname);
+ if (*inst) {
+ strcat(retbuf, ".");
+ strcat(retbuf, inst);
+ }
+ if (*realm && !is_local_realm(realm)) {
+ strcat(retbuf, "@");
+ strcat(retbuf, realm);
+ }
+
+ return retbuf;
+}
+#endif /* AFSPTS_USE_KRB5 */
+
+/* API */
+
+static void myinit(void)
+{
+ int r = pr_Initialize (1L, AFSCONF_CLIENTNAME, config_getstring(IMAPOPT_AFSPTS_MYCELL));
+ if (r) {
+ syslog(LOG_DEBUG, "pr_Initialize failed: %d", r);
+ fatal("pr_initialize failed", EC_TEMPFAIL);
+ }
+
+ localrealms = config_getstring(IMAPOPT_AFSPTS_LOCALREALMS);
+
+ return;
+}
+
+static struct auth_state *myauthstate(const char *identifier,
+ size_t size,
+ const char **reply, int *dsize)
+{
+ const char *canon_id = afspts_canonifyid(identifier, size);
+ char canon_id_tmp[PTS_DB_KEYSIZE+1];
+ namelist groups;
+ int i, rc;
+ struct auth_state *newstate;
+
+ *reply = NULL;
+ size = strlen(canon_id);
+
+ memset(&groups, 0, sizeof(groups));
+ groups.namelist_len = 0;
+ groups.namelist_val = NULL;
+
+ /* canon_id_tmp is used because AFS would otherwise trample
+ * on our nice canonical user id */
+ strlcpy(canon_id_tmp,canon_id,sizeof(canon_id_tmp));
+ if ((rc = pr_ListMembers(canon_id_tmp, &groups))) {
+ /* Failure may indicate that we need new tokens */
+ pr_End();
+ rc = pr_Initialize (1L, AFSCONF_CLIENTNAME, 0);
+ if (rc) {
+ syslog(LOG_DEBUG, "pr_Initialize failed: %d", rc);
+ fatal("pr_Initialize failed", EC_TEMPFAIL);
+ }
+ /* Okay, rerun it now */
+ rc = pr_ListMembers(canon_id_tmp, &groups);
+ }
+
+ /* Don't die because of afs, but log the error */
+ if(rc) {
+ syslog(LOG_ERR, "pr_ListMembers %s: %s", canon_id, error_message(rc));
+ }
+
+ /* fill in our new state structure */
+ *dsize = sizeof(struct auth_state) +
+ (groups.namelist_len * sizeof(struct auth_ident));
+ newstate = (struct auth_state *) xmalloc(*dsize);
+
+ strcpy(newstate->userid.id, canon_id);
+ newstate->userid.hash = strhash(canon_id);
+
+ /* If we get a permission error, assume it may be temporary
+ authentication problem, and cache only for a minute.
+ Should negative cache time be configurable? */
+ if (rc == PRPERM) {
+ newstate->mark = time(0) + 60 -
+ (config_getint(IMAPOPT_PTSCACHE_TIMEOUT) > 60)?
+ config_getint(IMAPOPT_PTSCACHE_TIMEOUT) : 60;
+ } else
+ newstate->mark = time(0);
+
+ newstate->ngroups = groups.namelist_len;
+ /* store group list in contiguous array for easy storage in the database */
+ memset(newstate->groups, 0, newstate->ngroups * sizeof(struct auth_ident));
+ for (i = 0; i < newstate->ngroups; i++) {
+ strlcpy(newstate->groups[i].id, groups.namelist_val[i],
+ sizeof(newstate->groups[i].id));
+ newstate->groups[i].hash = strhash(groups.namelist_val[i]);
+ /* don't free groups.namelist_val[i]. Something else currently
+ * takes care of that data.
+ */
+ }
+ if (groups.namelist_val != NULL) {
+ free(groups.namelist_val);
+ }
+
+ return newstate;
+}
+
+#else /* HAVE_AFSKRB */
+
+static void myinit(void)
+{
+ fatal("PTS module (afskrb) not compiled in", EC_CONFIG);
+}
+
+static struct auth_state *myauthstate(
+ const char *identifier __attribute__((unused)),
+ size_t size __attribute__((unused)),
+ const char **reply __attribute__((unused)),
+ int *dsize __attribute__((unused)))
+{
+ fatal("PTS module (afskrb) not compiled in", EC_CONFIG);
+}
+
+#endif /* HAVE_AFSKRB */
+
+struct pts_module pts_afskrb =
+{
+ "afskrb", /* name */
+
+ &myinit,
+ &myauthstate,
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ldap.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ldap.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ldap.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ldap.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1252 @@
+/* ldap.c - LDAP Backend to ptloader */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+static char rcsid[] __attribute__((unused)) =
+ "$Id: ldap.c,v 1.2.2.7 2006/04/13 18:39:44 murch Exp $";
+
+#include <config.h>
+#include "ptloader.h"
+#include "exitcodes.h"
+
+#ifdef HAVE_LDAP
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+
+#include <ldap.h>
+#include <lber.h>
+
+/* libimap */
+#include "global.h"
+
+/* libconfig */
+#include "libconfig.h"
+
+/* libcyrus */
+#include "auth_pts.h"
+#include "strhash.h"
+#include "xmalloc.h"
+
+/* xxx this just uses the UNIX canonicalization semantics, which is
+ * most likely wrong */
+
+/* Map of which characters are allowed by auth_canonifyid.
+ * Key: 0 -> not allowed (special, ctrl, or would confuse Unix or imapd)
+ * 1 -> allowed, but requires an alpha somewhere else in the string
+ * 2 -> allowed, and is an alpha
+ *
+ * At least one character must be an alpha.
+ *
+ * This may not be restrictive enough.
+ * Here are the reasons for the restrictions:
+ *
+ * & forbidden because of MUTF-7. (This could be fixed.)
+ * : forbidden because it's special in /etc/passwd
+ * / forbidden because it can't be used in a mailbox name
+ * * % forbidden because they're IMAP magic in the LIST/LSUB commands
+ * ? it just scares me
+ * ctrl chars, DEL
+ * can't send them as IMAP characters in plain folder names, I think
+ * 80-FF forbidden because you can't send them in IMAP anyway
+ * (and they're forbidden as folder names). (This could be fixed.)
+ *
+ * + and - are *allowed* although '+' is probably used for userid+detail
+ * subaddressing and qmail users use '-' for subaddressing.
+ *
+ * Identifiers don't require a digit, really, so that should probably be
+ * relaxed, too.
+ */
+static char allowedchars[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00-0F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10-1F */
+ 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, /* 20-2F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, /* 30-3F */
+
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 40-4F */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, /* 50-5F */
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 60-6F */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, /* 70-7F */
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+typedef struct _ptsm {
+ const char *uri;
+ int version;
+ struct timeval timeout;
+ int size_limit;
+ int time_limit;
+ int deref;
+ int referrals;
+ int restart;
+ int scope;
+ const char *base;
+ int sasl;
+ const char *id;
+ const char *bind_dn;
+ const char *password;
+ const char *authz;
+ const char *mech;
+ const char *realm;
+ const char *filter;
+ const char *sasl_secprops;
+ int start_tls;
+ int tls_check_peer;
+ const char *tls_cacert_file;
+ const char *tls_cacert_dir;
+ const char *tls_ciphers;
+ const char *tls_cert;
+ const char *tls_key;
+ int member_method;
+ const char *member_attribute;
+ const char *member_filter;
+ const char *member_base;
+ int member_scope;
+ const char *group_filter;
+ const char *group_base;
+ int group_scope;
+ LDAP *ld;
+} t_ptsm;
+
+#define PTSM_OK 0
+#define PTSM_FAIL -1
+#define PTSM_NOMEM -2
+#define PTSM_RETRY -3
+
+#define PTSM_MEMBER_METHOD_ATTRIBUTE 0
+#define PTSM_MEMBER_METHOD_FILTER 1
+
+#define ISSET(x) ((x != NULL) && (*(x) != '\0'))
+#define EMPTY(x) ((x == NULL) || (*(x) == '\0'))
+
+static t_ptsm *ptsm = NULL;
+
+static int ptsmodule_interact(
+ LDAP *ld,
+ unsigned flags __attribute__((unused)),
+ void *def,
+ void *inter)
+{
+ sasl_interact_t *in = inter;
+ const char *p;
+ t_ptsm *ptsmdef = def;
+
+ for (;in->id != SASL_CB_LIST_END;in++) {
+ p = NULL;
+ switch(in->id) {
+ case SASL_CB_AUTHNAME:
+ if (ISSET(ptsmdef->id))
+ p = ptsmdef->id;
+ break;
+ case SASL_CB_USER:
+ if (ISSET(ptsmdef->authz))
+ p = ptsmdef->authz;
+ break;
+ case SASL_CB_GETREALM:
+ if (ISSET(ptsmdef->realm))
+ p = ptsmdef->realm;
+ break;
+ case SASL_CB_PASS:
+ if (ISSET(ptsmdef->password))
+ p = ptsmdef->password;
+ break;
+ }
+
+ in->result = p ? p : "";
+ in->len = strlen(in->result);
+ }
+
+ return LDAP_SUCCESS;
+}
+
+/*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+ * or NULL if 'identifier' is invalid.
+ *
+ * XXX If any of the characters marked with 0 are valid and are cropping up,
+ * the right thing to do is probably to canonicalize the identifier to two
+ * representations: one for getpwent calls and one for folder names. The
+ * latter canonicalizes to a MUTF7 representation.
+ */
+static char *ptsmodule_canonifyid(const char *identifier, size_t len)
+{
+ static char retbuf[81];
+ char sawalpha;
+ char *p;
+ int username_tolower = 0;
+ int i = 0;
+
+ if(!len) len = strlen(identifier);
+ if(len >= sizeof(retbuf)) return NULL;
+
+ memcpy(retbuf, identifier, len);
+ retbuf[len] = '\0';
+
+ if (!strncmp(retbuf, "group:", 6))
+ i = 6;
+
+ /* Copy the string and look up values in the allowedchars array above.
+ * If we see any we don't like, reject the string.
+ * Lowercase usernames if requested.
+ */
+ username_tolower = config_getswitch(IMAPOPT_USERNAME_TOLOWER);
+ sawalpha = 0;
+ for(p = retbuf+i; *p; p++) {
+ if (username_tolower && isupper((unsigned char)*p))
+ *p = tolower((unsigned char)*p);
+
+ switch (allowedchars[*(unsigned char*) p]) {
+ case 0:
+ return NULL;
+
+ case 2:
+ sawalpha = 1;
+ /* FALL THROUGH */
+
+ default:
+ ;
+ }
+ }
+
+ if (!sawalpha) return NULL; /* has to be one alpha char */
+
+ return retbuf;
+}
+
+
+static int ptsmodule_connect(void)
+{
+ int rc = 0;
+
+ if (ptsm == NULL) // Sanity Check
+ return PTSM_FAIL;
+
+ if (ptsm->ld != NULL)
+ return PTSM_OK;
+
+ if (ISSET(ptsm->tls_cacert_file)) {
+ rc = ldap_set_option (NULL, LDAP_OPT_X_TLS_CACERTFILE, ptsm->tls_cacert_file);
+ if (rc != LDAP_SUCCESS) {
+ syslog (LOG_WARNING, "Unable to set LDAP_OPT_X_TLS_CACERTFILE (%s).", ldap_err2string (rc));
+ }
+ }
+
+ if (ISSET(ptsm->tls_cacert_dir)) {
+ rc = ldap_set_option (NULL, LDAP_OPT_X_TLS_CACERTDIR, ptsm->tls_cacert_dir);
+ if (rc != LDAP_SUCCESS) {
+ syslog (LOG_WARNING, "Unable to set LDAP_OPT_X_TLS_CACERTDIR (%s).", ldap_err2string (rc));
+ }
+ }
+
+ if (ptsm->tls_check_peer != 0) {
+ rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &ptsm->tls_check_peer);
+ if (rc != LDAP_SUCCESS) {
+ syslog (LOG_WARNING, "Unable to set LDAP_OPT_X_TLS_REQUIRE_CERT (%s).", ldap_err2string (rc));
+ }
+ }
+
+ if (ISSET(ptsm->tls_ciphers)) {
+ /* set cipher suite, certificate and private key: */
+ rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_CIPHER_SUITE, ptsm->tls_ciphers);
+ if (rc != LDAP_SUCCESS) {
+ syslog (LOG_WARNING, "Unable to set LDAP_OPT_X_TLS_CIPHER_SUITE (%s).", ldap_err2string (rc));
+ }
+ }
+
+ if (ISSET(ptsm->tls_cert)) {
+ rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_CERTFILE, ptsm->tls_cert);
+ if (rc != LDAP_SUCCESS) {
+ syslog (LOG_WARNING, "Unable to set LDAP_OPT_X_TLS_CERTFILE (%s).", ldap_err2string (rc));
+ }
+ }
+
+ if (ISSET(ptsm->tls_key)) {
+ rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_KEYFILE, ptsm->tls_key);
+ if (rc != LDAP_SUCCESS) {
+ syslog (LOG_WARNING, "Unable to set LDAP_OPT_X_TLS_KEYFILE (%s).", ldap_err2string (rc));
+ }
+ }
+
+ rc = ldap_initialize(&ptsm->ld, ptsm->uri);
+ if (rc != LDAP_SUCCESS) {
+ syslog(LOG_ERR, "ldap_initialize failed (%s)", ptsm->uri);
+ return PTSM_FAIL;
+ }
+
+ rc = ldap_set_option(ptsm->ld, LDAP_OPT_PROTOCOL_VERSION, &(ptsm->version));
+ if (rc != LDAP_OPT_SUCCESS) {
+
+ if (ptsm->sasl ||
+ ptsm->start_tls) {
+ syslog(LOG_ERR, "Failed to set LDAP_OPT_PROTOCOL_VERSION %d, required for ldap_start_tls and ldap_sasl.", ptsm->version);
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ return PTSM_FAIL;
+ } else
+ syslog(LOG_WARNING, "Unable to set LDAP_OPT_PROTOCOL_VERSION %d.", ptsm->version);
+
+ ptsm->version = LDAP_VERSION2;
+ }
+
+ rc = ldap_set_option(ptsm->ld, LDAP_OPT_NETWORK_TIMEOUT, &(ptsm->timeout));
+ if (rc != LDAP_OPT_SUCCESS) {
+ syslog(LOG_WARNING, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %d.%d.", ptsm->timeout.tv_sec, ptsm->timeout.tv_usec);
+ }
+
+ rc = ldap_set_option(ptsm->ld, LDAP_OPT_TIMELIMIT, &(ptsm->time_limit));
+ if (rc != LDAP_OPT_SUCCESS) {
+ syslog(LOG_WARNING, "Unable to set LDAP_OPT_TIMELIMIT %d.", ptsm->time_limit);
+ }
+
+ rc = ldap_set_option(ptsm->ld, LDAP_OPT_DEREF, &(ptsm->deref));
+ if (rc != LDAP_OPT_SUCCESS) {
+ syslog(LOG_WARNING, "Unable to set LDAP_OPT_DEREF %d.", ptsm->deref);
+ }
+
+ rc = ldap_set_option(ptsm->ld, LDAP_OPT_REFERRALS, ptsm->referrals ? LDAP_OPT_ON : LDAP_OPT_OFF);
+ if (rc != LDAP_OPT_SUCCESS) {
+ syslog(LOG_WARNING, "Unable to set LDAP_OPT_REFERRALS.");
+ }
+
+ rc = ldap_set_option(ptsm->ld, LDAP_OPT_SIZELIMIT, &(ptsm->size_limit));
+ if (rc != LDAP_OPT_SUCCESS)
+ syslog(LOG_WARNING, "Unable to set LDAP_OPT_SIZELIMIT %d.", ptsm->size_limit);
+
+ rc = ldap_set_option(ptsm->ld, LDAP_OPT_RESTART, ptsm->restart ? LDAP_OPT_ON : LDAP_OPT_OFF);
+ if (rc != LDAP_OPT_SUCCESS) {
+ syslog(LOG_WARNING, "Unable to set LDAP_OPT_RESTART.");
+ }
+
+ if (ptsm->start_tls) {
+
+ rc = ldap_start_tls_s(ptsm->ld, NULL, NULL);
+ if (rc != LDAP_SUCCESS) {
+ syslog(LOG_ERR, "start tls failed (%s).", ldap_err2string(rc));
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ return PTSM_FAIL;
+ }
+ }
+
+ if (ptsm->sasl) {
+
+ if (EMPTY(ptsm->mech))
+ ldap_get_option(ptsm->ld, LDAP_OPT_X_SASL_MECH, &(ptsm->mech));
+
+ if (EMPTY(ptsm->realm))
+ ldap_get_option(ptsm->ld, LDAP_OPT_X_SASL_REALM, &(ptsm->realm));
+
+ if (ISSET(ptsm->sasl_secprops)) {
+ rc = ldap_set_option(ptsm->ld, LDAP_OPT_X_SASL_SECPROPS, (void *) ptsm->sasl_secprops);
+ if( rc != LDAP_OPT_SUCCESS ) {
+ syslog(LOG_ERR, "Unable to set LDAP_OPT_X_SASL_SECPROPS.");
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ return PTSM_FAIL;
+ }
+ }
+
+ rc = ldap_sasl_interactive_bind_s(
+ ptsm->ld,
+ ptsm->bind_dn,
+ ptsm->mech,
+ NULL,
+ NULL,
+ LDAP_SASL_QUIET,
+ ptsmodule_interact,
+ ptsm);
+ } else
+ rc = ldap_simple_bind_s(ptsm->ld, ptsm->bind_dn, ptsm->password);
+
+ if (rc != LDAP_SUCCESS) {
+ syslog(LOG_ERR,
+ (ptsm->sasl ? "ldap_sasl_interactive_bind() failed %d (%s)." : "ldap_simple_bind() failed %d (%s)."), rc, ldap_err2string(rc));
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ return (rc == LDAP_SERVER_DOWN ? PTSM_RETRY : PTSM_FAIL);
+ }
+
+ return PTSM_OK;
+}
+
+/* API */
+
+static void myinit(void)
+{
+ const char *p = NULL;
+
+ if (ptsm)
+ return; // Already configured
+
+ ptsm = xmalloc(sizeof(t_ptsm));
+ if (ptsm == NULL) {
+ fatal("xmalloc() failed", EC_CONFIG);
+ }
+
+ ptsm->uri = (config_getstring(IMAPOPT_LDAP_URI) ?
+ config_getstring(IMAPOPT_LDAP_URI) : config_getstring(IMAPOPT_LDAP_SERVERS));
+ ptsm->version = (config_getint(IMAPOPT_LDAP_VERSION) == 2 ? LDAP_VERSION2 : LDAP_VERSION3);
+ ptsm->timeout.tv_sec = config_getint(IMAPOPT_LDAP_TIME_LIMIT);
+ ptsm->timeout.tv_usec = 0;
+ ptsm->restart = config_getswitch(IMAPOPT_LDAP_RESTART);
+ p = config_getstring(IMAPOPT_LDAP_DEREF);
+ if (!strcasecmp(p, "search")) {
+ ptsm->deref = LDAP_DEREF_SEARCHING;
+ } else if (!strcasecmp(p, "find")) {
+ ptsm->deref = LDAP_DEREF_FINDING;
+ } else if (!strcasecmp(p, "always")) {
+ ptsm->deref = LDAP_DEREF_ALWAYS;
+ } else {
+ ptsm->deref = LDAP_DEREF_NEVER;
+ }
+ ptsm->referrals = config_getswitch(IMAPOPT_LDAP_REFERRALS);
+ ptsm->size_limit = config_getint(IMAPOPT_LDAP_SIZE_LIMIT);
+ ptsm->time_limit = config_getint(IMAPOPT_LDAP_TIME_LIMIT);
+ p = config_getstring(IMAPOPT_LDAP_SCOPE);
+ if (!strcasecmp(p, "one")) {
+ ptsm->scope = LDAP_SCOPE_ONELEVEL;
+ } else if (!strcasecmp(p, "base")) {
+ ptsm->scope = LDAP_SCOPE_BASE;
+ } else {
+ ptsm->scope = LDAP_SCOPE_SUBTREE;
+ }
+ ptsm->bind_dn = config_getstring(IMAPOPT_LDAP_BIND_DN);
+ ptsm->sasl = config_getswitch(IMAPOPT_LDAP_SASL);
+ ptsm->id = (config_getstring(IMAPOPT_LDAP_ID) ?
+ config_getstring(IMAPOPT_LDAP_ID) : config_getstring(IMAPOPT_LDAP_SASL_AUTHC));
+ ptsm->authz = (config_getstring(IMAPOPT_LDAP_AUTHZ) ?
+ config_getstring(IMAPOPT_LDAP_AUTHZ) : config_getstring(IMAPOPT_LDAP_SASL_AUTHZ));
+ ptsm->mech = (config_getstring(IMAPOPT_LDAP_MECH) ?
+ config_getstring(IMAPOPT_LDAP_MECH) : config_getstring(IMAPOPT_LDAP_SASL_MECH));
+ ptsm->realm = (config_getstring(IMAPOPT_LDAP_REALM) ?
+ config_getstring(IMAPOPT_LDAP_REALM) : config_getstring(IMAPOPT_LDAP_SASL_REALM));
+ ptsm->password = (config_getstring(IMAPOPT_LDAP_PASSWORD) ?
+ config_getstring(IMAPOPT_LDAP_PASSWORD) : config_getstring(IMAPOPT_LDAP_SASL_PASSWORD));
+ ptsm->start_tls = config_getswitch(IMAPOPT_LDAP_START_TLS);
+ ptsm->tls_check_peer = config_getswitch(IMAPOPT_LDAP_TLS_CHECK_PEER);
+ ptsm->tls_cacert_file = config_getstring(IMAPOPT_LDAP_TLS_CACERT_FILE);
+ ptsm->tls_cacert_dir = config_getstring(IMAPOPT_LDAP_TLS_CACERT_DIR);
+ ptsm->tls_ciphers = config_getstring(IMAPOPT_LDAP_TLS_CIPHERS);
+ ptsm->tls_cert = config_getstring(IMAPOPT_LDAP_TLS_CERT);
+ ptsm->tls_key = config_getstring(IMAPOPT_LDAP_TLS_KEY);
+ p = config_getstring(IMAPOPT_LDAP_MEMBER_METHOD);
+ if (!strcasecmp(p, "filter")) {
+ ptsm->member_method = PTSM_MEMBER_METHOD_FILTER;
+ } else {
+ ptsm->member_method = PTSM_MEMBER_METHOD_ATTRIBUTE;
+ }
+ p = config_getstring(IMAPOPT_LDAP_MEMBER_SCOPE);
+ if (!strcasecmp(p, "one")) {
+ ptsm->member_scope = LDAP_SCOPE_ONELEVEL;
+ } else if (!strcasecmp(p, "base")) {
+ ptsm->member_scope = LDAP_SCOPE_BASE;
+ } else {
+ ptsm->member_scope = LDAP_SCOPE_SUBTREE;
+ }
+ ptsm->member_filter = config_getstring(IMAPOPT_LDAP_MEMBER_FILTER);
+ ptsm->member_base = config_getstring(IMAPOPT_LDAP_MEMBER_BASE);
+ ptsm->member_attribute = (config_getstring(IMAPOPT_LDAP_MEMBER_ATTRIBUTE) ?
+ config_getstring(IMAPOPT_LDAP_MEMBER_ATTRIBUTE) : config_getstring(IMAPOPT_LDAP_MEMBER_ATTRIBUTE));
+ p = config_getstring(IMAPOPT_LDAP_GROUP_SCOPE);
+ if (!strcasecmp(p, "one")) {
+ ptsm->group_scope = LDAP_SCOPE_ONELEVEL;
+ } else if (!strcasecmp(p, "base")) {
+ ptsm->group_scope = LDAP_SCOPE_BASE;
+ } else {
+ ptsm->group_scope = LDAP_SCOPE_SUBTREE;
+ }
+ ptsm->group_filter = config_getstring(IMAPOPT_LDAP_GROUP_FILTER);
+ ptsm->group_base = config_getstring(IMAPOPT_LDAP_GROUP_BASE);
+ ptsm->filter = config_getstring(IMAPOPT_LDAP_FILTER);
+ ptsm->base = config_getstring(IMAPOPT_LDAP_BASE);
+
+ if (ptsm->version != LDAP_VERSION3 &&
+ (ptsm->sasl ||
+ ptsm->start_tls))
+ ptsm->version = LDAP_VERSION3;
+
+ ptsm->ld = NULL;
+}
+
+/*
+ * Note: calling function must free memory.
+ */
+static int ptsmodule_escape(
+ const char *s,
+ const unsigned int n,
+ char **result)
+{
+ char *buf;
+ char *end, *ptr, *temp;
+
+ if (n > strlen(s)) // Sanity check, just in case
+ return PTSM_FAIL;
+
+ buf = xmalloc(n * 5 + 1);
+ if (buf == NULL) {
+ return PTSM_NOMEM;
+ }
+
+ buf[0] = '\0';
+ ptr = (char *)s;
+ end = ptr + n;
+
+ while (((temp = strpbrk(ptr, "*()\\\0"))!=NULL) && (temp<end)) {
+
+ if (temp>ptr)
+ strncat(buf, ptr, temp-ptr);
+
+ switch (*temp) {
+ case '*':
+ strcat(buf, "\\2a");
+ break;
+ case '(':
+ strcat(buf, "\\28");
+ break;
+ case ')':
+ strcat(buf, "\\29");
+ break;
+ case '\\':
+ strcat(buf, "\\5c");
+ break;
+ case '\0':
+ strcat(buf, "\\00");
+ break;
+ }
+ ptr=temp+1;
+ }
+ if (ptr<end)
+ strncat(buf, ptr, end-ptr);
+
+ *result = buf;
+
+ return PTSM_OK;
+}
+
+static int ptsmodule_tokenize_domains(
+ const char *d,
+ int n,
+ char **result)
+{
+ char *s, *s1;
+ char *lasts;
+ int nt, i, rc;
+
+ *result = NULL;
+
+ if (d == NULL || n < 1 || n > 9)
+ return PTSM_FAIL;
+
+ s = strdup(d);
+ if (s == NULL)
+ return PTSM_NOMEM;
+
+ for( nt=0, s1=s; *s1; s1++ )
+ if( *s1 == '.' ) nt++;
+ nt++;
+
+ if (n > nt) {
+ free(s);
+ return PTSM_FAIL;
+ }
+
+ i = nt - n;
+ s1 = (char *)strtok_r(s, ".", &lasts);
+ while(s1) {
+ if (i == 0) {
+ rc = ptsmodule_escape(s1, strlen(s1), result);
+ free(s);
+ return rc;
+ }
+ s1 = (char *)strtok_r(NULL, ".", &lasts);
+ i--;
+ }
+
+ free(s);
+ return PTSM_FAIL;
+}
+
+#define PTSM_MAX(a,b) (a>b?a:b)
+
+/*
+ * ptsmodule_expand_tokens
+ * Parts with the strings provided.
+ * %% = %
+ * %u = user
+ * %U = user part of %u
+ * %d = domain part of %u if available, othwise same as %r
+ * %R = prepend '@' to domain
+ * %1-9 = domain tokens (%1 = tld, %2 = domain when %d = domain.tld)
+ * %D = user DN
+ * Note: calling function must free memory.
+ */
+static int ptsmodule_expand_tokens(
+ const char *pattern,
+ const char *username,
+ const char *dn,
+ char **result)
+{
+ char *buf;
+ char *end, *ptr, *temp;
+ char *ebuf, *user;
+ char *domain;
+ int rc;
+
+ /* to permit multiple occurences of username and/or realm in filter */
+ /* and avoid memory overflow in filter build [eg: (|(uid=%u)(userid=%u)) ] */
+ int percents, user_len, dn_len, maxparamlength;
+
+ if (pattern == NULL) {
+ syslog(LOG_ERR, "filter pattern not setup");
+ return PTSM_FAIL;
+ }
+
+ /* find the longest param of username and realm,
+ do not worry about domain because it is always shorter
+ then username */
+ user_len=username ? strlen(username) : 0;
+ dn_len=dn ? strlen(dn) : 0;
+
+ maxparamlength = PTSM_MAX(user_len+1, dn_len); /* +1 for %R when '@' is prepended */
+
+ /* find the number of occurences of percent sign in filter */
+ for( percents=0, buf=(char *)pattern; *buf; buf++ ) {
+ if( *buf == '%' ) percents++;
+ }
+
+ /* percents * 3 * maxparamlength because we need to account for
+ * an entirely-escaped worst-case-length parameter */
+ buf=xmalloc(strlen(pattern) + (percents * 3 * maxparamlength) +1);
+ if(buf == NULL)
+ return PTSM_NOMEM;
+ buf[0] = '\0';
+
+ ptr = (char *)pattern;
+ end = ptr + strlen(ptr);
+
+ while ((temp=strchr(ptr,'%'))!=NULL ) {
+
+ if ((temp-ptr) > 0)
+ strncat(buf, ptr, temp-ptr);
+
+ if ((temp+1) >= end) {
+ syslog(LOG_DEBUG, "Incomplete lookup substitution format");
+ break;
+ }
+
+ switch (*(temp+1)) {
+ case '%':
+ strncat(buf,temp+1,1);
+ break;
+ case 'u':
+ if (ISSET(username)) {
+ rc=ptsmodule_escape(username, strlen(username), &ebuf);
+ if (rc == PTSM_OK) {
+ strcat(buf,ebuf);
+ free(ebuf);
+ }
+ } else
+ syslog(LOG_DEBUG, "Username not available.");
+ break;
+ case 'U':
+ if (ISSET(username)) {
+
+ user = strchr(username, '@');
+ rc=ptsmodule_escape(username, (user ? user - username : strlen(username)), &ebuf);
+ if (rc == PTSM_OK) {
+ strcat(buf,ebuf);
+ free(ebuf);
+ }
+ } else
+ syslog(LOG_DEBUG, "Username not available.");
+ break;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (ISSET(username) && (domain = strchr(username, '@')) && domain[1]!='\0') {
+ rc=ptsmodule_tokenize_domains(domain+1, (int) *(temp+1)-48, &ebuf);
+ if (rc == PTSM_OK) {
+ strcat(buf,ebuf);
+ free(ebuf);
+ }
+ } else
+ syslog(LOG_DEBUG, "Domain tokens not available.");
+ break;
+ case 'R':
+ case 'd':
+ if (ISSET(username) && (domain = strchr(username, '@')) && domain[1]!='\0') {
+ rc=ptsmodule_escape(domain+1, strlen(domain+1), &ebuf);
+ if (rc == PTSM_OK) {
+ if (*(temp+1) == 'R')
+ strcat(buf,"@");
+ strcat(buf,ebuf);
+ free(ebuf);
+ }
+ break;
+ }
+ break;
+ case 'D':
+ if (ISSET(dn)) {
+ rc = ptsmodule_escape(dn, strlen(dn), &ebuf);
+ if (rc == PTSM_OK) {
+ strcat(buf,ebuf);
+ free(ebuf);
+ }
+ } else
+ syslog(LOG_DEBUG, "dn not available.");
+ break;
+ default:
+ break;
+ }
+ ptr=temp+2;
+ }
+ if (temp<end)
+ strcat(buf, ptr);
+
+ *result = buf;
+
+ return PTSM_OK;
+}
+
+
+static int ptsmodule_get_dn(
+ const char *canon_id,
+ size_t size,
+ char **ret)
+{
+ int rc;
+
+#if LDAP_VENDOR_VERSION >= 20125
+ struct berval *dn = NULL;
+ LDAPControl c;
+ LDAPControl *ctrl[2];
+ char *authzid;
+#endif
+ char *base = NULL, *filter = NULL;
+ char *attrs[] = {NULL};
+ LDAPMessage *res;
+ LDAPMessage *entry;
+ char *attr, **vals;
+ BerElement *ber;
+
+ *ret = NULL;
+
+ if (ptsm->ld == NULL)
+ return PTSM_FAIL;
+
+#if LDAP_VENDOR_VERSION >= 20125
+
+ if (ptsm->sasl) {
+
+ authzid = xmalloc(size + sizeof("u:"));
+ if (authzid == NULL)
+ return PTSM_NOMEM;
+
+ strcpy(authzid, "u:");
+ strcpy(authzid+2, canon_id);
+ c.ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
+ c.ldctl_value.bv_val = authzid;
+ c.ldctl_value.bv_len = size + 2;
+ c.ldctl_iscritical = 1;
+
+ ctrl[0] = &c;
+ ctrl[1] = NULL;
+ rc = ldap_whoami_s(ptsm->ld, &dn, ctrl, NULL);
+ free(authzid);
+ if ( rc != LDAP_SUCCESS || !dn ) {
+ if (rc == LDAP_SERVER_DOWN) {
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ return PTSM_RETRY;
+ }
+ return PTSM_FAIL;
+ }
+
+ if ( dn->bv_val &&
+ !strncmp(dn->bv_val, "dn:", 3) )
+ *ret = strdup(dn->bv_val+3);
+ ber_bvfree(dn);
+
+ } else
+
+#endif
+
+ {
+ rc = ptsmodule_expand_tokens(ptsm->filter, canon_id, NULL, &filter);
+ if (rc != PTSM_OK)
+ return rc;
+
+ rc = ptsmodule_expand_tokens(ptsm->base, canon_id, NULL, &base);
+ if (rc != PTSM_OK)
+ return rc;
+
+ rc = ldap_search_st(ptsm->ld, base, ptsm->scope, filter, attrs, 0, &(ptsm->timeout), &res);
+ free(filter);
+ free(base);
+ if (rc != LDAP_SUCCESS) {
+ if (rc == LDAP_SERVER_DOWN) {
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ return PTSM_RETRY;
+ }
+ return PTSM_FAIL;
+ }
+
+ if ( (entry = ldap_first_entry(ptsm->ld, res)) != NULL )
+ *ret = ldap_get_dn(ptsm->ld, entry);
+
+ ldap_msgfree(res);
+ res = NULL;
+ }
+
+ return (*ret ? PTSM_OK : PTSM_FAIL);
+}
+
+
+static int ptsmodule_make_authstate_attribute(
+ const char *canon_id,
+ size_t size,
+ const char **reply,
+ int *dsize,
+ struct auth_state **newstate)
+{
+ char *dn = NULL;
+ LDAPMessage *res = NULL;
+ LDAPMessage *entry = NULL;
+ char *attr = NULL, **vals = NULL;
+ BerElement *ber = NULL;
+ int rc;
+ char *attrs[] = {(char *)ptsm->member_attribute,NULL};
+
+ rc = ptsmodule_connect();
+ if (rc != PTSM_OK) {
+ *reply = "ptsmodule_connect() failed";
+ return rc;
+ }
+
+ rc = ptsmodule_get_dn(canon_id, size, &dn);
+ if (rc != PTSM_OK) {
+ *reply = "identifier not found";
+ goto done;
+ }
+
+ rc = ldap_search_st(ptsm->ld, dn, LDAP_SCOPE_BASE, "(objectclass=*)", attrs, 0, &(ptsm->timeout), &res);
+ if ( rc != LDAP_SUCCESS ) {
+ *reply = "ldap_search(attribute) failed";
+ if ( rc == LDAP_SERVER_DOWN ) {
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ rc = PTSM_RETRY;
+ } else
+ rc = PTSM_FAIL;
+ goto done;
+ }
+
+ if ((entry = ldap_first_entry(ptsm->ld, res)) != NULL) {
+ for (attr = ldap_first_attribute(ptsm->ld, entry, &ber); attr != NULL;
+ attr = ldap_next_attribute(ptsm->ld, entry, ber)) {
+ int i, numvals;
+
+ vals = ldap_get_values(ptsm->ld, entry, attr);
+ if (vals == NULL)
+ continue;
+
+ for (i = 0; vals[i] != NULL; i++)
+ numvals = i;
+ numvals++;
+
+ *dsize = sizeof(struct auth_state) +
+ (numvals * sizeof(struct auth_ident));
+ *newstate = xmalloc(*dsize);
+ if (*newstate == NULL) {
+ *reply = "no memory";
+ rc = PTSM_FAIL;
+ goto done;
+ }
+ (*newstate)->ngroups = numvals;
+
+ for (i = 0; vals[i] != NULL; i++) {
+ int j;
+ strcpy((*newstate)->groups[i].id, "group:");
+ for(j =0; j < strlen(vals[i]); j++) {
+ if(isupper(vals[i][j]))
+ vals[i][j]=tolower(vals[i][j]);
+ }
+ strlcat((*newstate)->groups[i].id, vals[i],
+ sizeof((*newstate)->groups[i].id));
+ (*newstate)->groups[i].hash = strhash((*newstate)->groups[i].id);
+ }
+
+ ldap_value_free(vals);
+ vals = NULL;
+ ldap_memfree(attr);
+ attr = NULL;
+ }
+ }
+
+ if(!*newstate) {
+ *dsize = sizeof(struct auth_state);
+ *newstate = xmalloc(*dsize);
+ if (*newstate == NULL) {
+ *reply = "no memory";
+ rc = PTSM_FAIL;
+ goto done;
+ }
+ (*newstate)->ngroups = 0;
+ }
+
+ /* fill in the rest of our new state structure */
+ strcpy((*newstate)->userid.id, canon_id);
+ (*newstate)->userid.hash = strhash(canon_id);
+ (*newstate)->mark = time(0);
+
+ rc = PTSM_OK;
+
+done:;
+
+ if (res)
+ ldap_msgfree(res);
+ if (vals)
+ ldap_value_free(vals);
+ if (attr)
+ ldap_memfree(attr);
+ if (ber)
+ ber_free(ber, 0);
+ if (dn)
+ free(dn);
+
+ return rc;
+}
+
+static int ptsmodule_make_authstate_filter(
+ const char *canon_id,
+ size_t size,
+ const char **reply,
+ int *dsize,
+ struct auth_state **newstate)
+{
+ char *base = NULL, *filter = NULL;
+ int rc;
+ int i; int n;
+ LDAPMessage *res = NULL;
+ LDAPMessage *entry = NULL;
+ char *attr = NULL, **vals = NULL;
+ BerElement *ber = NULL;
+ char *attrs[] = {(char *)ptsm->member_attribute,NULL};
+ char *dn = NULL;
+
+ rc = ptsmodule_connect();
+ if (rc != PTSM_OK) {
+ *reply = "ptsmodule_connect() failed";
+ return rc;
+ }
+
+ rc = ptsmodule_get_dn(canon_id, size, &dn);
+ if (rc != PTSM_OK) {
+ *reply = "identifier not found";
+ return rc;
+ }
+
+ rc = ptsmodule_expand_tokens(ptsm->member_filter, canon_id, dn, &filter);
+ if (rc != PTSM_OK) {
+ *reply = "ptsmodule_expand_tokens() failed for member filter";
+ goto done;
+ }
+
+ rc = ptsmodule_expand_tokens(ptsm->member_base, canon_id, dn, &base);
+ if (rc != PTSM_OK) {
+ *reply = "ptsmodule_expand_tokens() failed for member search base";
+ goto done;
+ }
+
+ rc = ldap_search_st(ptsm->ld, base, ptsm->member_scope, filter, attrs, 0, &(ptsm->timeout), &res);
+ if (rc != LDAP_SUCCESS) {
+ *reply = "ldap_search(filter) failed";
+ if (rc == LDAP_SERVER_DOWN) {
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ rc = PTSM_RETRY;
+ } else
+ rc = PTSM_FAIL;
+ goto done;
+ }
+
+ n = ldap_count_entries(ptsm->ld, res);
+ if (n < 0) {
+ *reply = "ldap_count_entries() failed";
+ rc = PTSM_FAIL;
+ goto done;
+ }
+
+ *dsize = sizeof(struct auth_state) +
+ (n * sizeof(struct auth_ident));
+ *newstate = xmalloc(*dsize);
+ if (*newstate == NULL) {
+ *reply = "no memory";
+ rc = PTSM_FAIL;
+ goto done;
+ }
+ (*newstate)->ngroups = n;
+ strcpy((*newstate)->userid.id, canon_id);
+ (*newstate)->userid.hash = strhash(canon_id);
+ (*newstate)->mark = time(0);
+
+ for (i = 0, entry = ldap_first_entry(ptsm->ld, res); entry != NULL;
+ i++, entry = ldap_next_entry(ptsm->ld, entry)) {
+ for (attr = ldap_first_attribute(ptsm->ld, entry, &ber); attr != NULL;
+ attr = ldap_next_attribute(ptsm->ld, entry, ber)) {
+
+ vals = ldap_get_values(ptsm->ld, entry, attr);
+ if (vals == NULL)
+ continue;
+
+ strcpy((*newstate)->groups[i].id, "group:");
+ int j;
+ strcpy((*newstate)->groups[i].id, "group:");
+ for(j =0; j < strlen(vals[i]); j++) {
+ if(isupper(vals[i][j]))
+ vals[i][j]=tolower(vals[i][j]);
+ }
+
+ strlcat((*newstate)->groups[i].id, vals[0],
+ sizeof((*newstate)->groups[i].id));
+ (*newstate)->groups[i].hash = strhash((*newstate)->groups[i].id);
+
+ ldap_value_free(vals);
+ vals = NULL;
+ ldap_memfree(attr);
+ attr = NULL;
+ }
+ }
+
+ rc = PTSM_OK;
+
+done:;
+
+ if (res)
+ ldap_msgfree(res);
+ if (ber)
+ ber_free(ber, 0);
+ ber = NULL;
+ if (dn)
+ free(dn);
+ if (filter)
+ free(filter);
+ if (base)
+ free(base);
+
+ return rc;
+}
+
+static int ptsmodule_make_authstate_group(
+ const char *canon_id,
+ size_t size,
+ const char **reply,
+ int *dsize,
+ struct auth_state **newstate)
+{
+ char *base = NULL, *filter = NULL;
+ int rc;
+ int i; int n;
+ LDAPMessage *res = NULL;
+ LDAPMessage *entry = NULL;
+ char *attr = NULL, **vals = NULL;
+ char *attrs[] = {NULL};
+
+ if (strncmp(canon_id, "group:", 6)) { // Sanity check
+ *reply = "not a group identifier";
+ return PTSM_FAIL;
+ }
+
+ rc = ptsmodule_connect();
+ if (rc != PTSM_OK) {
+ *reply = "ptsmodule_connect() failed";
+ return rc;
+ }
+
+ rc = ptsmodule_expand_tokens(ptsm->group_filter, canon_id+6, NULL, &filter);
+ if (rc != PTSM_OK) {
+ *reply = "ptsmodule_expand_tokens() failed for group filter";
+ goto done;
+ }
+
+ rc = ptsmodule_expand_tokens(ptsm->group_base, canon_id+6, NULL, &base);
+ if (rc != PTSM_OK) {
+ *reply = "ptsmodule_expand_tokens() failed for group search base";
+ goto done;
+ }
+
+ rc = ldap_search_st(ptsm->ld, base, ptsm->group_scope, filter, attrs, 0, &(ptsm->timeout), &res);
+ if (rc != LDAP_SUCCESS) {
+ *reply = "ldap_search(group) failed";
+ if (rc == LDAP_SERVER_DOWN) {
+ ldap_unbind(ptsm->ld);
+ ptsm->ld = NULL;
+ rc = PTSM_RETRY;
+ } else
+ rc = PTSM_FAIL;
+ goto done;
+ }
+
+ n = ldap_count_entries(ptsm->ld, res);
+ if (n != 1) {
+ *reply = "group identifier not found";
+ rc = PTSM_FAIL;
+ goto done;
+ }
+
+ *dsize = sizeof(struct auth_state) +
+ (n * sizeof(struct auth_ident));
+ *newstate = xmalloc(*dsize);
+ if (*newstate == NULL) {
+ *reply = "no memory";
+ rc = PTSM_FAIL;
+ goto done;
+ }
+ (*newstate)->ngroups = 0;
+ strcpy((*newstate)->userid.id, canon_id);
+ (*newstate)->userid.hash = strhash(canon_id);
+ (*newstate)->mark = time(0);
+
+ rc = PTSM_OK;
+
+done:;
+
+ if (res)
+ ldap_msgfree(res);
+ if (filter)
+ free(filter);
+ if (base)
+ free(base);
+
+ return rc;
+}
+
+static struct auth_state *myauthstate(
+ const char *identifier,
+ size_t size,
+ const char **reply,
+ int *dsize)
+{
+ const char *canon_id;
+ struct auth_state *newstate = NULL;
+ int rc;
+ int retries = 1;
+
+ canon_id = ptsmodule_canonifyid(identifier, size);
+ if (EMPTY(canon_id)) {
+ *reply = "ptsmodule_canonifyid() failed";
+ return NULL;
+ }
+ size = strlen(canon_id);
+
+retry:;
+
+ *reply = NULL;
+
+ if (!strncmp(canon_id, "group:", 6))
+ rc = ptsmodule_make_authstate_group(canon_id, size, reply, dsize, &newstate);
+ else {
+ if (ptsm->member_method == PTSM_MEMBER_METHOD_ATTRIBUTE)
+ rc = ptsmodule_make_authstate_attribute(canon_id, size, reply, dsize, &newstate);
+ else
+ rc = ptsmodule_make_authstate_filter(canon_id, size, reply, dsize, &newstate);
+ }
+ if (rc == PTSM_RETRY &&
+ retries) {
+ retries--;
+ goto retry;
+ }
+
+ return newstate;
+}
+
+#else /* HAVE_LDAP */
+
+static void myinit(void)
+{
+ fatal("PTS module (ldap) not compiled in", EC_CONFIG);
+}
+
+static struct auth_state *myauthstate(
+ const char *identifier __attribute__((unused)),
+ size_t size __attribute__((unused)),
+ const char **reply __attribute__((unused)),
+ int *dsize __attribute__((unused)))
+{
+ fatal("PTS module (ldap) not compiled in", EC_CONFIG);
+}
+
+#endif /* HAVE_LDAP */
+
+struct pts_module pts_ldap =
+{
+ "ldap", /* name */
+
+ &myinit,
+ &myauthstate,
+};
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptdump.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptdump.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptdump.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptdump.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,118 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+#include <config.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "auth_pts.h"
+#include "cyrusdb.h"
+#include "global.h"
+#include "libconfig.h"
+
+static char rcsid[] = "$Id: ptdump.c,v 1.8.2.4 2004/03/24 19:53:19 ken3 Exp $";
+
+int config_need_data = 0;
+
+static int dump_cb(void *rockp __attribute__((unused)),
+ const char *key, int keylen,
+ const char *data,
+ int datalen __attribute__((unused)))
+{
+ struct auth_state *authstate = (struct auth_state *)data;
+ int i;
+
+ printf("user: ");
+ fwrite(key, keylen, 1, stdout);
+ printf(" time: %d groups: %d\n",
+ (unsigned)authstate->mark, (unsigned)authstate->ngroups);
+
+ for (i=0; i < authstate->ngroups; i++)
+ printf(" %s\n",authstate->groups[i].id);
+
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ struct db *ptdb;
+ char fnamebuf[1024];
+ extern char *optarg;
+ int opt;
+ int r;
+ char *alt_config = NULL;
+
+ while ((opt = getopt(argc, argv, "C:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ default:
+ fprintf(stderr,"usage: [-C filename]"
+ "\n\t-C <filename>\tAlternate Config File"
+ "\n");
+ exit(-1);
+ break;
+ /* just pass through */
+ }
+ }
+
+ cyrus_init(alt_config, "ptdump", 0);
+
+ /* open database */
+ strcpy(fnamebuf, config_dir);
+ strcat(fnamebuf, PTS_DBFIL);
+ r = config_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
+ if(r != CYRUSDB_OK) {
+ fprintf(stderr,"error opening %s (%s)", fnamebuf,
+ cyrusdb_strerror(r));
+ exit(1);
+ }
+
+ /* iterate through db, wiping expired entries */
+ config_ptscache_db->foreach(ptdb, "", 0, NULL, dump_cb, ptdb, NULL);
+
+ config_ptscache_db->close(ptdb);
+
+ cyrus_done();
+
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptexpire.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptexpire.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptexpire.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptexpire.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,165 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* This program purges old entries from the database. It holds an exclusive
+ * lock throughout the process.
+ *
+ * NOTE: by adding the alt_file flag, we let exit() handle the cleanup of
+ * the lock file's fd. That's bad in principal but not in practice. We do
+ * to make the code easier to read.
+ */
+
+#include <config.h>
+
+#include <sys/param.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN MAXPATHNAMELEN
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "auth_pts.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "global.h"
+#include "libconfig.h"
+#include "lock.h"
+#include "xmalloc.h"
+
+static char rcsid[] = "$Id: ptexpire.c,v 1.14.2.4 2004/05/31 18:23:01 ken3 Exp $";
+
+/* global */
+time_t timenow;
+time_t expire_time = (3*60*60); /* 3 Hours */
+
+int config_need_data = 0;
+
+static int expire_p(void *rockp __attribute__((unused)),
+ const char *key __attribute__((unused)),
+ int keylen __attribute__((unused)),
+ const char *data,
+ int datalen __attribute__((unused)))
+{
+ struct auth_state *authstate = (struct auth_state *)data;
+ if (authstate->mark + expire_time < timenow) {
+ return 1;
+ }
+ return 0; /* skip this one */
+}
+
+static int expire_cb(void *rockp,
+ const char *key, int keylen,
+ const char *data __attribute__((unused)),
+ int datalen __attribute__((unused)))
+{
+ /* We only get called when we want to delete it */
+ syslog(LOG_DEBUG, "deleteing entry for %s", key);
+
+ /* xxx maybe we should use transactions for this */
+ config_ptscache_db->delete((struct db *)rockp, key, keylen, NULL, 0);
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ struct db *ptdb;
+ char fnamebuf[1024];
+ extern char *optarg;
+ int opt;
+ int r;
+ char *alt_config = NULL;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+
+ openlog("ptexpire", LOG_PID, SYSLOG_FACILITY);
+
+ while ((opt = getopt(argc, argv, "C:E:")) != EOF) {
+ switch (opt) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ case 'E':
+ expire_time = atoi(optarg);
+ break;
+ default:
+ fprintf(stderr,"usage: [-C filename] [-E time]"
+ "\n\t-C <filename>\tAlternate Config File"
+ "\n\t-E <seconds>\tExpiration time"
+ "\n");
+ syslog(LOG_ERR, "Invalid command line option");
+ exit(-1);
+ break;
+ /* just pass through */
+ }
+ }
+
+ cyrus_init(alt_config, "ptexpire", 0);
+
+ timenow = time(0);
+ syslog(LOG_INFO, "Expiring entries older than %d seconds (currently %d)",
+ expire_time, timenow);
+ syslog(LOG_DEBUG, "%s", rcsid);
+
+ /* open database */
+ strcpy(fnamebuf, config_dir);
+ strcat(fnamebuf, PTS_DBFIL);
+ r = config_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
+ if(r != CYRUSDB_OK) {
+ syslog(LOG_ERR, "error opening %s (%s)", fnamebuf,
+ cyrusdb_strerror(r));
+ exit(1);
+ }
+
+ /* iterate through db, wiping expired entries */
+ config_ptscache_db->foreach(ptdb, "", 0, expire_p, expire_cb, ptdb, NULL);
+
+ config_ptscache_db->close(ptdb);
+
+ cyrus_done();
+
+ syslog(LOG_INFO, "finished");
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptextract.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptextract.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptextract.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptextract.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,92 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: ptextract.c,v 1.4 2003/02/13 20:15:56 rjs3 Exp $ */
+
+#include <sys/types.h>
+#include <krb.h>
+#include <sysexits.h>
+
+#include "auth.h"
+#include "auth_krb_pts.h"
+
+/* from auth_krb_pts.c */
+struct auth_state {
+ char userid[PR_MAXNAMELEN];
+ char name[PR_MAXNAMELEN];
+ char aname[ANAME_SZ];
+ char inst[INST_SZ];
+ char realm[REALM_SZ];
+ int ngroups;
+ char (*groups)[PR_MAXNAMELEN];
+};
+
+int main(int argc, char* argv[]) {
+ struct auth_state* auth_state;
+ char* user = 0, *cacheid = 0;
+ int i;
+
+ if (argv[1] && *argv[1]) {
+ user = argv[1];
+ if (argv[2] && *argv[2]) cacheid = argv[2];
+ }
+
+ if (! user || ! cacheid) {
+ fatal("Not enough arguments.\n", EX_CONFIG);
+ }
+
+ printf("extracting record...\n");
+
+ auth_state = auth_newstate(user, cacheid);
+
+ if (auth_state) {
+ for (i = 0; i < auth_state->ngroups; i++) {
+ printf("group %s\n", auth_state->groups[i]);
+ }
+ } else {
+ printf("Extracting failed.\n");
+ }
+}
+
+void fatal(char* message, int rc) {
+ fprintf(stderr, "fatal error: %s\n", message);
+ exit(rc);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,269 @@
+/* ptloader.c -- group loader daemon
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <config.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/uio.h>
+
+#include "auth_pts.h"
+#include "cyrusdb.h"
+#include "exitcodes.h"
+#include "hash.h"
+#include "global.h"
+#include "libconfig.h"
+#include "lock.h"
+#include "retry.h"
+#include "xmalloc.h"
+#include "ptloader.h"
+
+static char rcsid[] __attribute__((unused)) =
+ "$Id: ptloader.c,v 1.32.2.9 2005/02/25 07:19:06 shadow Exp $";
+
+struct pts_module *pts_modules[] = {
+#ifdef HAVE_LDAP
+ &pts_ldap,
+#endif
+#ifdef HAVE_AFSKRB
+ &pts_afskrb,
+#endif
+ NULL };
+
+extern void setproctitle_init(int argc, char **argv, char **envp);
+
+static struct pts_module *pts_fromname()
+{
+ int i;
+ const char *name = config_getstring(IMAPOPT_PTS_MODULE);
+ static struct pts_module *pts = NULL;
+
+ if (pts)
+ return pts;
+
+ for (i = 0; pts_modules[i]; i++) {
+ if (!strcmp(pts_modules[i]->name, name)) {
+ pts = pts_modules[i]; break;
+ }
+ }
+ if (!pts) {
+ char errbuf[1024];
+ snprintf(errbuf, sizeof(errbuf),
+ "PTS module %s not supported", name);
+ fatal(errbuf, EC_CONFIG);
+ }
+
+ return pts;
+}
+
+void ptsmodule_init(void)
+{
+ struct pts_module *pts = pts_fromname();
+
+ pts->init();
+}
+
+struct auth_state *ptsmodule_make_authstate(const char *identifier,
+ size_t size,
+ const char **reply, int *dsize)
+{
+ struct pts_module *pts = pts_fromname();
+
+ return pts->make_authstate(identifier, size, reply, dsize);
+}
+
+/* config.c info (libimap) */
+const int config_need_data = 0;
+
+/* Globals */
+#define DB (config_ptscache_db)
+
+static char ptclient_debug = 0;
+struct db *ptsdb = NULL;
+
+int service_init(int argc, char *argv[], char **envp __attribute__((unused)))
+{
+ int r;
+ int opt;
+ char fnamebuf[1024];
+ extern char *optarg;
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+ setproctitle_init(argc, argv, envp);
+
+ /* set signal handlers */
+ signal(SIGPIPE, SIG_IGN);
+
+ syslog(LOG_NOTICE, "starting: $Id: ptloader.c,v 1.32.2.9 2005/02/25 07:19:06 shadow Exp $");
+
+ while ((opt = getopt(argc, argv, "d:")) != EOF) {
+ switch (opt) {
+ case 'd':
+ ptclient_debug = atoi(optarg);
+ if (ptclient_debug < 1) {
+ ptclient_debug = 1;
+ }
+ break;
+ default:
+ syslog(LOG_ERR, "invalid command line option specified");
+ break;
+ /* just pass through */
+ }
+ }
+
+ strcpy(fnamebuf, config_dir);
+ strcat(fnamebuf, PTS_DBFIL);
+ r = DB->open(fnamebuf, CYRUSDB_CREATE, &ptsdb);
+ if (r != 0) {
+ syslog(LOG_ERR, "DBERROR: opening %s: %s", fnamebuf,
+ cyrusdb_strerror(ret));
+ fatal("can't read pts database", EC_TEMPFAIL);
+ }
+
+ ptsmodule_init();
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ int r;
+
+ r = DB->close(ptsdb);
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error closing ptsdb: %s",
+ cyrusdb_strerror(r));
+ }
+
+ r = DB->done();
+ if (r) {
+ syslog(LOG_ERR, "DBERROR: error exiting application: %s",
+ cyrusdb_strerror(r));
+ }
+
+ exit(error);
+}
+
+/* we're a 'threaded' service, but since we never fork or create any
+ threads, we're just one-person-at-a-time based */
+int service_main_fd(int c, int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ char keyinhex[512];
+ const char *reply = NULL;
+ char user[PTS_DB_KEYSIZE];
+ int rc, dsize;
+ size_t size;
+ struct auth_state *newstate;
+
+ (void)memset(&size, 0, sizeof(size));
+ if (read(c, &size, sizeof(size_t)) < 0) {
+ syslog(LOG_ERR, "socket (size): %m");
+ reply = "Error reading request (size)";
+ goto sendreply;
+ }
+
+ if (size > PTS_DB_KEYSIZE) {
+ syslog(LOG_ERR, "size sent %d is greater than buffer size %d",
+ size, PTS_DB_KEYSIZE);
+ reply = "Error: invalid request size";
+ goto sendreply;
+ }
+
+ memset(&user, 0, sizeof(user));
+ if (read(c, &user, size) < 0) {
+ syslog(LOG_ERR, "socket(user; size = %d; key = %s): %m",
+ size, keyinhex);
+ reply = "Error reading request (user)";
+ goto sendreply;
+ }
+
+ if (ptclient_debug) {
+ syslog(LOG_DEBUG, "user %s, cacheid %s", user, keyinhex);
+ }
+
+ newstate = ptsmodule_make_authstate(user, size, &reply, &dsize);
+
+ if(newstate) {
+ /* Success! */
+ rc = DB->store(ptsdb, user, size, (void *)newstate, dsize, NULL);
+ free(newstate);
+
+ /* and we're done */
+ reply = "OK";
+ }
+
+ sendreply:
+ if (retry_write(c, reply, strlen(reply)) <0) {
+ syslog(LOG_WARNING, "retry_write: %m");
+ }
+ close(c);
+
+ return 0;
+}
+
+/* we need to have this function here 'cause libcyrus.a
+ * makes calls to this function.
+ */
+void fatal(const char *msg, int exitcode)
+{
+ syslog(LOG_ERR, "%s", msg);
+ exit(exitcode);
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for PTLOADER!",
+ EC_SOFTWARE);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/ptloader.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,70 @@
+/* ptloader.h -- Site authorization module
+ * $Id: ptloader.h,v 1.1.2.1 2005/02/16 21:07:09 shadow Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef INCLUDED_PTLOADER_H
+#define INCLUDED_PTLOADER_H
+
+struct auth_state;
+
+struct pts_module {
+ const char *name;
+
+ void (*init)(void);
+ struct auth_state *(*make_authstate)(const char *identifier,
+ size_t size,
+ const char **reply, int *dsize);
+};
+
+extern struct pts_module *pts_modules[];
+
+/* Note that some of these may be undefined symbols
+ * if libcyrus was not built with support for them */
+extern struct pts_module pts_ldap;
+extern struct pts_module pts_afskrb;
+
+struct auth_state *ptsmodule_make_authstate(const char *identifier,
+ size_t size,
+ const char **reply, int *dsize);
+void ptsmodule_init(void);
+
+#endif /* INCLUDED_PTLOADER_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,74 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: test.c,v 1.6 2003/10/22 18:50:29 rjs3 Exp $ */
+
+#include <stdio.h>
+#include <sys/syslog.h>
+int main(int argc, char **argv) {
+ char *cacheid;
+ char cache[16];
+
+ if (argc < 3 || argc > 4) {
+ printf("Usage: pttset user group [cachearg]\n");
+ exit(1);
+ }
+ if (argc == 4) {
+ memset(cache,0,16);
+ strncpy(cache,argv[3],16);
+ cacheid=cache;
+ } else
+ cacheid=NULL;
+ openlog("pttest", LOG_PID, SYSLOG_FACILITY);
+
+ if (!auth_setid(argv[1],cacheid))
+ printf ("Auth_memberof(%s,%s) is %d\n", argv[1], argv[2],
+ auth_memberof(argv[2]));
+
+ else
+ printf ("Auth_setid(%s) failed\n", argv[1]);
+
+}
+
+int fatal(char *foo) {
+ fprintf(stderr, "Fatal error: %s\n", foo);
+ exit(1);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test2.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test2.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test2.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/ptclient/test2.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,63 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Id: test2.c,v 1.6 2003/10/22 18:50:29 rjs3 Exp $ */
+
+#include <stdio.h>
+#include <sys/syslog.h>
+
+int main(void) {
+ char cacheid[16]="4224423";
+ openlog("testr", LOG_PID, SYSLOG_FACILITY);
+
+ if (!auth_setid("cg2v at club.cc.cmu.edu",cacheid))
+ printf ("Auth_memberof(cg2v,cg2v:me) is %d\n",
+ auth_memberof("cg2v:me"));
+
+ else
+ printf ("Auth_setid(cg2v at club.cc.cmu.edu) failed\n");
+
+}
+
+int fatal(char *foo) {
+ fprintf(stderr, "Fatal error: %s\n", foo);
+ exit(1);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,13 @@
+Makefile
+makedepend.log
+addr-lex.c
+addr.c
+addr.h
+sieve-lex.c
+sieve.c
+sieve.h
+sieve_err.c
+sieve_err.h
+sievec
+sieved
+test
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/AUTHORS
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/AUTHORS?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/AUTHORS (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/AUTHORS Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9 @@
+$Id: AUTHORS,v 1.4.8.1 2004/11/02 12:38:33 ken3 Exp $
+
+Larry Greenfield <leg+sieve at andrew.cmu.edu> wrote the first pass.
+
+Alexy Melnikov <alexey.melnikov at isode.com> submitted some bug fixes and
+improvements.
+
+Ken Murchison <ken at oceana.com> took the ball, added more extensions
+than existed in the known world, and overall improved the code mightily.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/COPYING
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/COPYING?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/COPYING (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/COPYING Sat Aug 26 02:00:13 2006
@@ -1,0 +1,26 @@
+/* cmu-sieve
+ * Larry Greenfield
+ * $Id: COPYING,v 1.1.1.1 1999/07/02 18:55:35 leg Exp $
+ */
+/***********************************************************
+ Copyright 1998 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,33 @@
+/.cvsignore/1.2/Wed Oct 22 18:03:23 2003//Tcyrus-release-2-3-7
+/AUTHORS/1.4.8.1/Tue Nov 2 12:38:33 2004//Tcyrus-release-2-3-7
+/COPYING/1.1.1.1/Fri Jul 2 18:55:35 1999//Tcyrus-release-2-3-7
+/ChangeLog/1.1.1.1/Fri Jul 2 18:55:35 1999//Tcyrus-release-2-3-7
+/Makefile.dist/1.6.8.1/Tue Nov 18 16:22:51 2003//Tcyrus-release-2-3-7
+/Makefile.in/1.30.2.6/Mon Feb 21 19:25:59 2005//Tcyrus-release-2-3-7
+/NEWS/1.5/Tue Feb 19 18:09:46 2002//Tcyrus-release-2-3-7
+/README/1.4.8.1/Wed Nov 24 16:48:35 2004//Tcyrus-release-2-3-7
+/addr-lex.l/1.8/Tue Feb 19 18:09:46 2002//Tcyrus-release-2-3-7
+/addr.y/1.11/Wed Oct 22 18:50:30 2003//Tcyrus-release-2-3-7
+/bc_dump.c/1.2.2.4/Wed Oct 5 15:56:20 2005//Tcyrus-release-2-3-7
+/bc_emit.c/1.2.2.5/Wed Dec 14 13:45:18 2005//Tcyrus-release-2-3-7
+/bc_eval.c/1.2.2.12/Fri Dec 2 00:06:00 2005//Tcyrus-release-2-3-7
+/bc_generate.c/1.2.2.6/Wed Oct 5 15:56:22 2005//Tcyrus-release-2-3-7
+/bytecode.h/1.2.2.6/Wed Oct 5 15:56:22 2005//Tcyrus-release-2-3-7
+/comparator.c/1.15.2.4/Sun May 8 14:31:00 2005//Tcyrus-release-2-3-7
+/comparator.h/1.11.2.1/Wed Jun 23 20:15:18 2004//Tcyrus-release-2-3-7
+/interp.c/1.22.8.5/Sat Mar 12 03:30:11 2005//Tcyrus-release-2-3-7
+/interp.h/1.7.8.2/Fri Jul 16 14:37:43 2004//Tcyrus-release-2-3-7
+/message.c/1.27.2.6/Wed Oct 5 15:56:23 2005//Tcyrus-release-2-3-7
+/message.h/1.16.2.2/Wed Oct 5 15:56:23 2005//Tcyrus-release-2-3-7
+/script.c/1.59.2.11/Wed Oct 5 15:56:23 2005//Tcyrus-release-2-3-7
+/script.h/1.11.2.3/Sat Mar 12 03:30:12 2005//Tcyrus-release-2-3-7
+/sieve-lex.l/1.20.8.5/Wed Oct 5 15:56:24 2005//Tcyrus-release-2-3-7
+/sieve.y/1.23.2.13/Wed Oct 5 15:56:24 2005//Tcyrus-release-2-3-7
+/sieve_err.et/1.2/Sat May 25 19:57:52 2002//Tcyrus-release-2-3-7
+/sieve_interface.h/1.19.2.5/Wed Oct 5 15:56:25 2005//Tcyrus-release-2-3-7
+/sievec.c/1.2.2.6/Fri Jul 16 14:37:45 2004//Tcyrus-release-2-3-7
+/sieved.c/1.2.2.8/Wed Oct 5 15:56:25 2005//Tcyrus-release-2-3-7
+/test.c/1.21.2.6/Wed Oct 5 15:56:25 2005//Tcyrus-release-2-3-7
+/tree.c/1.11.2.3/Sat Mar 12 03:30:13 2005//Tcyrus-release-2-3-7
+/tree.h/1.8.2.5/Wed Oct 5 15:56:26 2005//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+A D/tests////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/ChangeLog
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/ChangeLog?rev=585&root=cyrus22&view=auto
==============================================================================
(empty)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.dist
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.dist?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.dist (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.dist Sat Aug 26 02:00:13 2006
@@ -1,0 +1,23 @@
+# $Id: Makefile.dist,v 1.6.8.1 2003/11/18 16:22:51 ken3 Exp $
+
+YFLAGS = -d
+
+BUILT_SOURCES = addr.c addr.h addr-lex.c \
+ sieve.c sieve.h sieve-lex.c \
+ sieve_err.h sieve_err.c
+
+dist: $(BUILT_SOURCES)
+
+addr.c addr.h: addr.y
+ $(YACC) $(YFLAGS) -p addr addr.y
+ mv -f y.tab.c addr.c
+ mv -f y.tab.h addr.h
+
+sieve.c sieve.h: sieve.y
+ $(YACC) $(YFLAGS) sieve.y
+ mv -f y.tab.c sieve.c
+ mv -f y.tab.h sieve.h
+
+sieve_err.h sieve_err.c: sieve_err.et
+ $(COMPILE_ET) sieve_err.et
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,133 @@
+# Makefile.in - sieve makefile
+# @configure_input@
+# $Id: Makefile.in,v 1.30.2.6 2005/02/21 19:25:59 ken3 Exp $
+################################################################
+# Copyright 1998 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+#Permission to use, copy, modify, and distribute this software and its
+#documentation for any purpose and without fee is hereby granted,
+#provided that the above copyright notice appear in all copies and that
+#both that copyright notice and this permission notice appear in
+#supporting documentation, and that the name of Carnegie Mellon University
+#not be used in advertising or publicity pertaining to distribution of the
+#software without specific, written prior permission.
+#
+#CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+#SOFTWARE, INCLUDING #ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+#IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL,
+#INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+#LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+#OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#PERFORMANCE OF THIS SOFTWARE.
+################################################################
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+cyrus_prefix = @cyrus_prefix@
+service_path = @service_path@
+
+CC = @CC@
+YACC = @YACC@
+YFLAGS = -d
+LEX = @LEX@
+RANLIB = @RANLIB@
+COMPILE_ET = @COMPILE_ET@
+
+DEFS = @DEFS@ @LOCALDEFS@
+CPPFLAGS = -I.. -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+MAKEDEPEND_CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ @PERL_CCCDLFLAGS@
+LDFLAGS = @LDFLAGS@
+
+MAKEDEPEND = @MAKEDEPEND@
+
+IMAP_LIBS = @IMAP_LIBS@
+IMAP_COM_ERR_LIBS = @IMAP_COM_ERR_LIBS@
+IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@
+LIBS = libsieve.a $(IMAP_LIBS) $(IMAP_COM_ERR_LIBS)
+DEPLIBS=../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+BUILT_SOURCES = addr.c addr.h addr-lex.c \
+ sieve.c sieve.h sieve-lex.c \
+ sieve_err.h sieve_err.c
+
+all: libsieve.a sievec sieved
+
+dist: $(BUILT_SOURCES)
+
+install: sievec
+ $(srcdir)/../install-sh -d ${DESTDIR}$(service_path)
+ $(srcdir)/../install-sh -c -m 755 sievec $(DESTDIR)$(service_path) || exit
+
+test: $(DEPLIBS) libsieve.a test.o ../imap/message.o
+ $(CC) $(LDFLAGS) -o test test.o ../imap/message.o \
+ libsieve.a $(DEPLIBS) $(LIBS)
+
+OBJS = sieve_err.o \
+ sieve.o sieve-lex.o comparator.o interp.o message.o \
+ bc_generate.o bc_dump.o bc_emit.o bc_eval.o \
+ script.o tree.o addr.o addr-lex.o
+
+sieve-lex.c: sieve-lex.l sieve.h
+
+sieve.c sieve.h: sieve.y
+ $(YACC) $(YFLAGS) $(srcdir)/sieve.y
+ mv -f y.tab.c sieve.c
+ mv -f y.tab.h sieve.h
+
+
+addr-lex.c: addr-lex.l addr.h
+#taken out by new makefile
+# $(LEX) -t -Paddr $(srcdir)/addr-lex.l > $@
+
+addr.c addr.h: addr.y
+ $(YACC) $(YFLAGS) -p addr $(srcdir)/addr.y
+ mv -f y.tab.c addr.c
+ mv -f y.tab.h addr.h
+
+
+# This is needed because 'makedepend' leaves it out
+#(this is not in newer version, is it still needed?)
+#addr.o: addr.h
+
+
+#libsieve.a: sieve.c sieve.h sieve_err.h sieve_err.c $(OBJS)
+#changed to...
+libsieve.a: $(OBJS)
+ rm -f libsieve.a
+ ar cr libsieve.a $(OBJS)
+ $(RANLIB) libsieve.a
+
+sievec: sievec.o libsieve.a
+ $(CC) $(LDFLAGS) -o sievec sievec.o libsieve.a $(DEPLIBS) $(LIBS)
+
+sieved: sieved.o libsieve.a
+ $(CC) $(LDFLAGS) -o sieved sieved.o libsieve.a $(DEPLIBS) $(LIBS)
+
+
+sieve_interface.h: sieve_err.h
+
+sieve_err.h sieve_err.c: sieve_err.et
+ $(COMPILE_ET) $(srcdir)/sieve_err.et
+
+clean:
+ rm -f test *~ *.o *.a Makefile.bak makedepend.log
+
+distclean: clean
+ rm -f Makefile
+
+clobber:
+ rm -f $(BUILT_SOURCES)
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) -I$(srcdir) $(MAKEDEPEND_CFLAGS) *.c *.y $(srcdir)/*.y $(srcdir)/*.c 1>makedepend.log 2>&1
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ $<
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/NEWS
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/NEWS?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/NEWS (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/NEWS Sat Aug 26 02:00:13 2006
@@ -1,0 +1,84 @@
+$Id: NEWS,v 1.5 2002/02/19 18:09:46 ken3 Exp $
+
+CMU Sieve 2.1
+-------------
+
+- Compliant with RFC 3028. As a result, fileinto and redirect only
+ accept a single string and NOT a string-list.
+
+- Compliant with draft-martin-sieve-notify-01. As a result, notify
+ actions will need to be updated to the new syntax.
+
+CMU Sieve 2.0
+-------------
+
+- Compliant with draft-showalter-sieve-11.txt and
+ draft-showalter-sieve-vacation-03.txt.
+
+- Added support for the regex, imapflags, notify and subaddress extensions.
+ See README for references.
+
+- Verifies email addresses in redirect and vacation actions are syntactically
+ correct (compliant with RFC822).
+
+- Run-time error reporting.
+
+- Changed callback interface to use callback contexts instead of individual
+ parameters. Also added an error string buffer for run-time error reporting.
+
+- Vacation will not reply to any message containing an "auto-submitted"
+ header containing anything other than "no".
+
+CMU Sieve 1.4
+-------------
+
+Now included with imapd distribution (hell, why not?).
+
+Error returning and recovering:
+ added error recovering to the parser (but not much!)
+ added error messages to the parser
+
+Working on error returning and error recovering.
+ run-time errors
+ detect some errors in lexer?
+
+Working on even better parsing:
+ verify addresses could be addresses
+ verify mailboxes could be mailboxes
+ verify outgoing headers can be headers
+
+CMU Sieve 1.3
+-------------
+
+Changed for integration with cyrus deliver.
+
+CMU Sieve 1.2
+-------------
+
+Added additional callbacks (ok, so I want to make my integration with deliver
+easier) and envelope and vacation support.
+
+Made it compile without libcyrus.
+It should compile without libcyrus, but then it does not implement the
+"address" test. That's just too much work to do when I have a neato
+library to do it for me.
+
+Todo:
+- regex matching
+
+CMU Sieve 1.1
+-------------
+
+- Updated to draft-showalter-sieve-07bis.txt
+
+- Simple API (see sieve_interface.h; currently mostly undocumented)
+
+- Implements all of the optional features except "envelope"
+
+- Maintains "if it parses, it probably runs" behavior. (Goal: minimize
+ run-time errors.)
+
+CMU Sieve 1.0
+-------------
+
+- prototype implementation
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+$Id: README,v 1.4.8.1 2004/11/24 16:48:35 shadow Exp $
+
+CMU Sieve 2.1
+-------------
+
+This code is typically distributed as part of Cyrus imapd 1.6 and higher.
+This code will be configured and compiled from the cyrus-imapd directory.
+
+Notes on implementation
+-----------------------
+
+This is an implementation of a simple Sieve API. This API is
+well-suited for incorporating in other programs, but is not
+extensible. (If there is interest, we may implement an extensible API
+in the future.)
+
+If you wish to compile Sieve without compiling all of imapd, you'll
+have to create a Makefile for it. I recommend you use Makefile.in as
+a guide.
+
+It should compile without libcyrus, but then it does not implement the
+"address" test. That's just too much work to do when I have a neato
+library to do it for me.
+
+There's a simple "test" application included, which is not built by
+default (type "make test" to build it). It expects:
+
+test <message> <script>
+
+And prints out the actions taken or errors encountered. (This
+implementation will attempt all the actions or no actions.)
+
+Questions and comments to:
+Derrick Brashear (shadow+sieve at andrew.cmu.edu)
+
+References:
+
+[SIEVE] Showalter, T., "Sieve: A Mail Filtering Language",
+RFC 3028, January, 2001.
+
+[VACATION] Showalter, T., "Sieve: Vacation Extension",
+draft-showalter-sieve-vacation-04.txt, August, 2000.
+
+[IMAPFLAGS] Melnikov, A., "Sieve -- IMAP flag extension",
+draft-melnikov-sieve-imapflags-03.txt, July, 2000.
+
+[NOTIFY] Martin, T., Segmuller, W.,
+"Sieve -- An extension for providing instant notifications",
+draft-martin-sieve-notify-01.txt, June, 2001.
+
+[REGEX] Murchison, K., "Sieve: Regular Expression Extension",
+draft-murchison-sieve-regex-04.txt, August, 2001.
+
+[RELATIONAL] Segmuller, W., "Sieve Extension: Relational Tests",
+RFC 3431, December 2002.
+
+[SUBADDR] Murchison, K., "Sieve Email Filtering -- Subaddress Extension",
+RFC 3598, September 2003.
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1707 @@
+#define yy_create_buffer addr_create_buffer
+#define yy_delete_buffer addr_delete_buffer
+#define yy_scan_buffer addr_scan_buffer
+#define yy_scan_string addr_scan_string
+#define yy_scan_bytes addr_scan_bytes
+#define yy_flex_debug addr_flex_debug
+#define yy_init_buffer addr_init_buffer
+#define yy_flush_buffer addr_flush_buffer
+#define yy_load_buffer_state addr_load_buffer_state
+#define yy_switch_to_buffer addr_switch_to_buffer
+#define yyin addrin
+#define yyleng addrleng
+#define yylex addrlex
+#define yyout addrout
+#define yyrestart addrrestart
+#define yytext addrtext
+
+/* A lexical scanner generated by flex*/
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+#include <unistd.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* Some routines like yy_flex_realloc() are emitted as static but are
+ not called by all lexers. This generates warnings in some compilers,
+ notably GCC. Arrange to suppress these. */
+#ifdef __GNUC__
+#define YY_MAY_BE_UNUSED __attribute__((unused))
+#else
+#define YY_MAY_BE_UNUSED
+#endif
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 15
+#define YY_END_OF_BUFFER 16
+static yyconst short int yy_accept[40] =
+ { 0,
+ 0, 0, 8, 8, 10, 10, 12, 12, 16, 5,
+ 5, 6, 6, 1, 3, 4, 7, 2, 8, 15,
+ 9, 15, 10, 15, 11, 12, 13, 14, 15, 5,
+ 5, 6, 8, 0, 10, 0, 12, 0, 0
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 1, 6, 1, 1, 1, 1, 1, 7,
+ 8, 1, 1, 9, 1, 9, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 9, 9, 9,
+ 1, 9, 1, 9, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 10, 11, 12, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst int yy_meta[14] =
+ { 0,
+ 1, 2, 3, 4, 5, 6, 7, 7, 8, 9,
+ 8, 9, 10
+ } ;
+
+static yyconst short int yy_base[48] =
+ { 0,
+ 0, 0, 11, 20, 29, 39, 49, 60, 27, 0,
+ 73, 0, 0, 182, 182, 182, 182, 182, 14, 182,
+ 182, 83, 10, 86, 182, 9, 182, 182, 92, 0,
+ 0, 0, 8, 102, 7, 0, 5, 0, 182, 108,
+ 118, 128, 138, 147, 152, 162, 172
+ } ;
+
+static yyconst short int yy_def[48] =
+ { 0,
+ 39, 1, 40, 40, 41, 41, 42, 42, 39, 43,
+ 39, 44, 44, 39, 39, 39, 39, 39, 45, 39,
+ 39, 45, 46, 46, 39, 47, 39, 39, 47, 43,
+ 11, 44, 45, 45, 46, 24, 47, 29, 0, 39,
+ 39, 39, 39, 39, 39, 39, 39
+ } ;
+
+static yyconst short int yy_nxt[196] =
+ { 0,
+ 10, 11, 12, 13, 13, 14, 15, 16, 17, 18,
+ 17, 17, 10, 20, 20, 38, 21, 36, 34, 38,
+ 36, 22, 20, 20, 34, 21, 39, 39, 39, 39,
+ 22, 20, 20, 39, 39, 39, 39, 39, 20, 24,
+ 25, 20, 20, 39, 39, 39, 39, 39, 20, 24,
+ 25, 20, 39, 39, 39, 27, 28, 39, 39, 29,
+ 39, 20, 20, 39, 39, 39, 27, 28, 39, 39,
+ 29, 39, 20, 30, 31, 32, 32, 32, 39, 39,
+ 39, 39, 39, 39, 39, 30, 33, 39, 33, 35,
+ 39, 39, 39, 39, 39, 35, 39, 35, 37, 37,
+
+ 39, 39, 39, 39, 37, 33, 39, 33, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 30, 30,
+ 39, 39, 39, 39, 39, 39, 39, 30, 32, 32,
+ 32, 32, 33, 33, 39, 39, 33, 39, 33, 33,
+ 33, 33, 35, 35, 39, 39, 35, 35, 35, 35,
+ 39, 35, 37, 37, 39, 37, 37, 37, 39, 37,
+ 37, 9, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39
+
+ } ;
+
+static yyconst short int yy_chk[196] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 3, 37, 3, 35, 33, 26,
+ 23, 3, 4, 4, 19, 4, 9, 0, 0, 0,
+ 4, 5, 5, 0, 0, 0, 0, 0, 5, 5,
+ 5, 6, 6, 0, 0, 0, 0, 0, 6, 6,
+ 6, 7, 0, 0, 0, 7, 7, 0, 0, 7,
+ 0, 7, 8, 0, 0, 0, 8, 8, 0, 0,
+ 8, 0, 8, 11, 11, 11, 11, 11, 0, 0,
+ 0, 0, 0, 0, 0, 11, 22, 0, 22, 24,
+ 0, 0, 0, 0, 0, 24, 0, 24, 29, 29,
+
+ 0, 0, 0, 0, 29, 34, 0, 34, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 43, 43,
+ 0, 0, 0, 0, 0, 0, 0, 43, 44, 44,
+ 44, 44, 45, 45, 0, 0, 45, 0, 45, 45,
+ 45, 45, 46, 46, 0, 0, 46, 46, 46, 46,
+ 0, 46, 47, 47, 0, 47, 47, 47, 0, 47,
+ 47, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39
+
+ } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "addr-lex.l"
+#define INITIAL 0
+#line 2 "addr-lex.l"
+/*
+ * addr-lex.l -- RFC 822 address lexer
+ * Ken Murchison
+ * $Id: addr-lex.l,v 1.8 2002/02/19 18:09:46 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#include "addr.h"
+#include <string.h>
+
+#undef YY_INPUT
+#define YY_INPUT(b, r, ms) (r = addrinput(b, ms))
+
+int addrinput(char *buf, int max_size);
+void addrerror(const char *);
+
+static int ncom; /* number of open comments */
+#define YY_NO_UNPUT 1
+#define QSTRING 1
+#define DOMAINLIT 2
+#define COMMENT 3
+
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp = NULL, *yy_bp = NULL;
+ register int yy_act;
+
+#line 48 "addr-lex.l"
+
+
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 40 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 182 );
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+ if ( yy_act == 0 )
+ { /* have to back up */
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ yy_act = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = yy_hold_char;
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
+ goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 50 "addr-lex.l"
+{ BEGIN QSTRING; return yytext[0]; }
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 51 "addr-lex.l"
+{ BEGIN DOMAINLIT; return yytext[0]; }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 52 "addr-lex.l"
+{ ncom = 1; BEGIN COMMENT; }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 53 "addr-lex.l"
+{ addrerror("address parse error, "
+ "unexpected `')'' "
+ "(unbalanced comment)");
+ yyterminate(); }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 58 "addr-lex.l"
+return ATOM;
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 60 "addr-lex.l"
+/* ignore whitespace */
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 61 "addr-lex.l"
+return yytext[0];
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 63 "addr-lex.l"
+return QTEXT;
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 64 "addr-lex.l"
+{ BEGIN INITIAL; return yytext[0]; }
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 66 "addr-lex.l"
+return DTEXT;
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 67 "addr-lex.l"
+{ BEGIN INITIAL; return yytext[0]; }
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 69 "addr-lex.l"
+/* ignore comments */
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 70 "addr-lex.l"
+ncom++;
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 71 "addr-lex.l"
+{ ncom--; if (ncom == 0) BEGIN INITIAL; }
+ YY_BREAK
+case YY_STATE_EOF(COMMENT):
+#line 72 "addr-lex.l"
+{ addrerror("address parse error, "
+ "expecting `')'' "
+ "(unterminated comment)");
+ yyterminate(); }
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 77 "addr-lex.l"
+ECHO;
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(QSTRING):
+case YY_STATE_EOF(DOMAINLIT):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 13);
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 40 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+ register char *yy_cp = yy_c_buf_p;
+
+ register YY_CHAR yy_c = 13;
+ if ( yy_accept[yy_current_state] )
+ {
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
+ }
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 40 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 39);
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+
+ return c;
+ }
+#endif /* YY_NO_INPUT */
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+#line 77 "addr-lex.l"
+
+
+/* take input from address string provided by sieve parser */
+int addrinput(char *buf, int max_size)
+{
+ extern char *addrptr; /* current position in address string */
+ size_t n; /* number of characters to read from string */
+
+ n = strlen(addrptr) < max_size ? strlen(addrptr) : max_size;
+ if (n > 0) {
+ memcpy(buf, addrptr, n);
+ addrptr += n;
+ }
+ return n;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.l
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.l?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.l (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr-lex.l Sat Aug 26 02:00:13 2006
@@ -1,0 +1,91 @@
+%{
+/*
+ * addr-lex.l -- RFC 822 address lexer
+ * Ken Murchison
+ * $Id: addr-lex.l,v 1.8 2002/02/19 18:09:46 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#include "addr.h"
+#include <string.h>
+
+#undef YY_INPUT
+#define YY_INPUT(b, r, ms) (r = addrinput(b, ms))
+
+int addrinput(char *buf, int max_size);
+void addrerror(const char *);
+
+static int ncom; /* number of open comments */
+%}
+
+%option noyywrap
+%option nounput
+%option prefix="addr"
+
+%x QSTRING DOMAINLIT COMMENT
+
+%%
+
+\" { BEGIN QSTRING; return yytext[0]; }
+\[ { BEGIN DOMAINLIT; return yytext[0]; }
+\( { ncom = 1; BEGIN COMMENT; }
+\) { addrerror("address parse error, "
+ "unexpected `')'' "
+ "(unbalanced comment)");
+ yyterminate(); }
+
+[^\(\)<>@,;:\\".\[\] \n\r]+ return ATOM;
+
+[\t \n\r]+ /* ignore whitespace */
+. return yytext[0];
+
+<QSTRING>([^\n\r"\\]|\\.)* return QTEXT;
+<QSTRING>\" { BEGIN INITIAL; return yytext[0]; }
+
+<DOMAINLIT>([^\[\]\n\r\\]|\\.)* return DTEXT;
+<DOMAINLIT>\] { BEGIN INITIAL; return yytext[0]; }
+
+<COMMENT>([^\(\)\n\0\\]|\\.)* /* ignore comments */
+<COMMENT>\( ncom++;
+<COMMENT>\) { ncom--; if (ncom == 0) BEGIN INITIAL; }
+<COMMENT><<EOF>> { addrerror("address parse error, "
+ "expecting `')'' "
+ "(unterminated comment)");
+ yyterminate(); }
+
+%%
+
+/* take input from address string provided by sieve parser */
+int addrinput(char *buf, int max_size)
+{
+ extern char *addrptr; /* current position in address string */
+ size_t n; /* number of characters to read from string */
+
+ n = strlen(addrptr) < max_size ? strlen(addrptr) : max_size;
+ if (n > 0) {
+ memcpy(buf, addrptr, n);
+ addrptr += n;
+ }
+ return n;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1434 @@
+/* A Bison parser, made by GNU Bison 2.1. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.1"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names. */
+#define yyparse addrparse
+#define yylex addrlex
+#define yyerror addrerror
+#define yylval addrlval
+#define yychar addrchar
+#define yydebug addrdebug
+#define yynerrs addrnerrs
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ATOM = 258,
+ QTEXT = 259,
+ DTEXT = 260
+ };
+#endif
+/* Tokens. */
+#define ATOM 258
+#define QTEXT 259
+#define DTEXT 260
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 1 "addr.y"
+
+/*
+ * addr.y -- RFC 822 address parser
+ * Ken Murchison
+ * $Id: addr.y,v 1.11 2003/10/22 18:50:30 rjs3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "addr.h"
+#include "script.h"
+#include "xmalloc.h"
+
+int yyerror(char *msg);
+extern int yylex(void);
+
+#define YYERROR_VERBOSE /* i want better error messages! */
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 219 of yacc.c. */
+#line 156 "y.tab.c"
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYINCLUDED_STDLIB_H
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifdef __cplusplus
+}
+# endif
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short int yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short int yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 10
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 26
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 13
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 11
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 17
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 31
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 260
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 12, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 9, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 6, 2, 7, 2, 8, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 10, 2, 11, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned char yyprhs[] =
+{
+ 0, 0, 3, 5, 10, 14, 16, 20, 22, 26,
+ 28, 30, 32, 36, 38, 41, 43, 45
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+ 14, 0, -1, 15, -1, 21, 6, 15, 7, -1,
+ 16, 8, 17, -1, 22, -1, 22, 9, 16, -1,
+ 18, -1, 18, 9, 17, -1, 19, -1, 20, -1,
+ 3, -1, 10, 5, 11, -1, 22, -1, 22, 21,
+ -1, 3, -1, 23, -1, 12, 4, 12, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned char yyrline[] =
+{
+ 0, 46, 46, 47, 50, 53, 54, 57, 58, 61,
+ 62, 65, 68, 71, 72, 75, 76, 79
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "ATOM", "QTEXT", "DTEXT", "'<'", "'>'",
+ "'@'", "'.'", "'['", "']'", "'\"'", "$accept", "sieve_address",
+ "addrspec", "localpart", "domain", "subdomain", "domainref", "domainlit",
+ "phrase", "word", "qstring", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short int yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 60, 62, 64, 46,
+ 91, 93, 34
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 13, 14, 14, 15, 16, 16, 17, 17, 18,
+ 18, 19, 20, 21, 21, 22, 22, 23
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 4, 3, 1, 3, 1, 3, 1,
+ 1, 1, 3, 1, 2, 1, 1, 3
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned char yydefact[] =
+{
+ 0, 15, 0, 0, 2, 0, 0, 5, 16, 0,
+ 1, 0, 0, 0, 14, 13, 17, 11, 0, 4,
+ 7, 9, 10, 0, 5, 6, 0, 0, 3, 12,
+ 8
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yysigned_char yydefgoto[] =
+{
+ -1, 3, 4, 5, 19, 20, 21, 22, 14, 15,
+ 8
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -7
+static const yysigned_char yypact[] =
+{
+ -1, -7, 1, 3, -7, 6, 10, -2, -7, -6,
+ -7, 5, -1, -1, -7, -1, -7, -7, 4, -7,
+ 8, -7, -7, 11, 12, -7, 9, 5, -7, -7,
+ -7
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yysigned_char yypgoto[] =
+{
+ -7, -7, 7, 13, -5, -7, -7, -7, 23, 0,
+ -7
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -14
+static const yysigned_char yytable[] =
+{
+ 7, 1, 1, 10, -13, 9, 16, 13, 17, 26,
+ 2, 2, 24, 24, 11, 18, 12, 27, 28, 23,
+ 29, 13, 30, 6, 0, 0, 25
+};
+
+static const yysigned_char yycheck[] =
+{
+ 0, 3, 3, 0, 6, 4, 12, 9, 3, 5,
+ 12, 12, 12, 13, 8, 10, 6, 9, 7, 12,
+ 11, 9, 27, 0, -1, -1, 13
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 3, 12, 14, 15, 16, 21, 22, 23, 4,
+ 0, 8, 6, 9, 21, 22, 12, 3, 10, 17,
+ 18, 19, 20, 15, 22, 16, 5, 9, 7, 11,
+ 17
+};
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short int *bottom, short int *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short int *bottom;
+ short int *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
+#endif
+{
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol. */
+int yychar;
+
+/* The semantic value of the look-ahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+ ;
+#endif
+#endif
+{
+
+ int yystate;
+ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ short int *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK (yyvsp--, yyssp--)
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short int *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short int *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a look-ahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to look-ahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a look-ahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+
+ default: break;
+ }
+
+/* Line 1126 of yacc.c. */
+#line 1156 "y.tab.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror (YY_("syntax error"));
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse look-ahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding", yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse look-ahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (0)
+ goto yyerrorlab;
+
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ *++yyvsp = yylval;
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
+}
+
+
+#line 82 "addr.y"
+
+
+/* copy address error message into buffer provided by sieve parser */
+int yyerror(char *s)
+{
+ extern char addrerr[ADDRERR_SIZE];
+
+ strlcpy(addrerr, s, sizeof(addrerr));
+ return 0;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,55 @@
+/* A Bison parser, made by GNU Bison 2.1. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ATOM = 258,
+ QTEXT = 259,
+ DTEXT = 260
+ };
+#endif
+/* Tokens. */
+#define ATOM 258
+#define QTEXT 259
+#define DTEXT 260
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+typedef int YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYSTYPE addrlval;
+
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.y
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.y?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.y (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/addr.y Sat Aug 26 02:00:13 2006
@@ -1,0 +1,91 @@
+%{
+/*
+ * addr.y -- RFC 822 address parser
+ * Ken Murchison
+ * $Id: addr.y,v 1.11 2003/10/22 18:50:30 rjs3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "addr.h"
+#include "script.h"
+#include "xmalloc.h"
+
+int yyerror(char *msg);
+extern int yylex(void);
+
+#define YYERROR_VERBOSE /* i want better error messages! */
+%}
+
+%token ATOM QTEXT DTEXT
+
+%%
+sieve_address: addrspec /* simple address */
+ | phrase '<' addrspec '>' /* name & addr-spec */
+ ;
+
+addrspec: localpart '@' domain /* global-address */
+ ;
+
+localpart: word /* uninterpreted, case-preserved */
+ | word '.' localpart
+ ;
+
+domain: subdomain
+ | subdomain '.' domain
+ ;
+
+subdomain: domainref
+ | domainlit
+ ;
+
+domainref: ATOM /* symbolic reference */
+ ;
+
+domainlit: '[' DTEXT ']'
+ ;
+
+phrase: word
+ | word phrase
+ ;
+
+word: ATOM
+ | qstring
+ ;
+
+qstring: '"' QTEXT '"'
+ ;
+
+%%
+
+/* copy address error message into buffer provided by sieve parser */
+int yyerror(char *s)
+{
+ extern char addrerr[ADDRERR_SIZE];
+
+ strlcpy(addrerr, s, sizeof(addrerr));
+ return 0;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_dump.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_dump.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_dump.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_dump.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,338 @@
+/* bc_generate.c -- sieve bytecode- almost flattened bytecode
+ * Rob Siemborski
+ * $Id: bc_dump.c,v 1.2.2.4 2005/10/05 15:56:20 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 2001 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "sieve_interface.h"
+#include "bytecode.h"
+
+
+struct bytecode_info
+{
+ bytecode_t *data;/* pointer to almost-flat bytecode */
+ size_t scriptend; /* used by emit code to know final length of bytecode */
+ size_t reallen; /* allocated length of 'data' */
+};
+
+/*this would work a lot better if we actually could tell how many levels deep in if statements we were. currently it doesn't know*/
+
+void print_spaces(int n)
+{
+ int temp_n=0;
+ while(temp_n++ < (n))
+ putchar(' ');
+}
+
+
+#if DUMPCODE
+
+/* Dump a stringlist. Return the last address used by the list */
+static int dump_sl(bytecode_info_t *d, int ip, int level)
+{
+ int numstr = d->data[ip].listlen;
+ int i;
+
+ for(i=0; i<numstr; i++) {
+ print_spaces(level*4);
+ printf(" {%d}",d->data[++ip].len);
+ printf("%s\n",d->data[++ip].str);
+ }
+
+ return ip;
+}
+
+static int dump_test(bytecode_info_t *d, int ip, int level);
+
+/* Dump a testlist. Return the last address used by the list */
+static int dump_tl(bytecode_info_t *d, int ip, int level)
+{
+ int numtest = d->data[ip].listlen;
+ int i;
+
+ for(i=0; i<numtest; i++) {
+ print_spaces(level*4);
+ printf(" (until %d)\n", d->data[++ip].jump);
+ ip = dump_test(d, ++ip, level);
+ }
+
+ return ip;
+}
+
+/* Dump a test, return the last address used by the test */
+static int dump_test(bytecode_info_t *d, int ip, int level ) {
+
+ print_spaces(level*4);
+ switch(d->data[ip].op) {
+ case BC_TRUE:
+ printf("%d: TRUE\n",ip);
+ break;
+
+ case BC_FALSE:
+ printf("%d: FALSE\n",ip);
+ break;
+
+ case BC_NOT:
+ printf("%d: NOT TEST(\n",ip++);
+ /* printf(" (until %d)\n", d->data[ip++].jump);*/
+ ip = dump_test(d,ip, level);
+ print_spaces(level*4);
+ printf(" )\n");
+ break;
+
+ case BC_SIZE:
+ printf("%d: SIZE TAG(%d) NUM(%d)\n",ip,
+ d->data[ip+1].value, d->data[ip+2].value);
+ ip+=2;
+ break;
+
+ case BC_EXISTS:
+ printf("%d: EXISTS\n",ip++);
+ ip = dump_sl(d,ip,level);
+ break;
+
+ case BC_ALLOF:
+ printf("%d: ALLOF (\n",ip++);
+ ip = dump_tl(d,ip,level);
+ print_spaces(level*4);
+ printf(")\n");
+ break;
+
+ case BC_ANYOF:
+ printf("%d: ANYOF (\n",ip++);
+ ip = dump_tl(d,ip, level);
+ print_spaces(level*4);
+ printf(")\n");
+ break;
+
+ case BC_HEADER:
+ printf("%d: HEADER (\n",ip++);
+ print_spaces(level*4);
+ if (d->data[ip].value == B_COUNT || d->data[ip].value == B_VALUE)
+ {
+ printf(" MATCH:%d RELATION:%d COMP:%d HEADERS:\n",
+ d->data[ip].value, d->data[ip+1].value,d->data[ip+2].value);
+ } else {
+ printf(" MATCH:%d COMP:%d HEADERS:\n",d->data[ip].value, d->data[ip+2].value);
+ }
+ ip+=3;
+ ip = dump_sl(d,ip,level);
+ ip++;
+ print_spaces(level*4);
+ printf(" DATA:\n");
+ ip = dump_sl(d,ip,level);
+ break;
+
+ case BC_ADDRESS:
+ case BC_ENVELOPE:
+ printf("%d: %s (\n",ip++,
+ d->data[ip].op == BC_ADDRESS ? "ADDRESS" : "ENVELOPE");
+ print_spaces(level*4);
+ if (d->data[ip].value == B_COUNT || d->data[ip].value == B_VALUE)
+ {
+ printf(" MATCH:%d RELATION: %d COMP: %d TYPE: %d HEADERS:\n",
+ d->data[ip].value, d->data[ip+1].value, d->data[ip+2].value, d->data[ip+3].value);
+ } else {
+ printf(" MATCH:%d COMP:%d TYPE:%d HEADERS:\n",
+ d->data[ip].value,d->data[ip+1].value,d->data[ip+3].value);
+ }
+ ip+=4;
+ ip = dump_sl(d,ip,level); ip++;
+ print_spaces(level*4);
+ printf(" DATA:\n");
+ ip = dump_sl(d,ip,level);
+ break;
+
+ case BC_BODY:
+ printf("%d: BODY (\n",ip++);
+ print_spaces(level*4);
+ if (d->data[ip].value == B_COUNT || d->data[ip].value == B_VALUE)
+ {
+ printf(" MATCH:%d RELATION: %d COMP: %d TRANSFORM: %d OFFSET: %d CONTENT-TYPES:\n",
+ d->data[ip].value,d->data[ip+1].value,d->data[ip+2].value,
+ d->data[ip+3].value,d->data[ip+4].value);
+ } else {
+ printf(" MATCH:%d COMP:%d TRANSFORM:%d OFFSET: %d CONTENT-TYPES:\n",
+ d->data[ip].value,d->data[ip+1].value,d->data[ip+3].value,
+ d->data[ip+4].value);
+ }
+ ip+=5;
+ ip = dump_sl(d,ip,level); ip++;
+ print_spaces(level*4);
+ printf(" DATA:\n");
+ ip = dump_sl(d,ip,level);
+ break;
+
+ default:
+ printf("%d: TEST(%d)\n",ip,d->data[ip].op);
+ break;
+ }
+
+ return ip;
+}
+
+void dump(bytecode_info_t *d, int level)
+{
+ int i;
+ printf("Dumping almost flattened bytecode\n\n");
+
+ if(!d) return;
+
+ for(i=0; i<d->scriptend; i++) {
+ print_spaces(level*4);
+ switch(d->data[i].op) {
+ case B_REJECT:
+ printf("%d: REJECT {%d}%s\n",i,
+ d->data[i+1].len,d->data[i+2].str);
+ i+=2;
+ break;
+ case B_IF:
+ if (d->data[i+3].jump== -1)
+ {
+ printf("%d: IF THEN(%d) POST(%d) TEST(\n",i,
+ d->data[i+1].jump,d->data[i+2].jump);
+ }
+ else
+ {
+ printf("%d: IF THEN(%d) ELSE(%d) POST(%d) TEST(\n",i,
+ d->data[i+1].jump,d->data[i+2].jump,
+ d->data[i+3].jump);
+ }
+ i = dump_test(d,i+4, level+1);
+ printf(")\n");
+ break;
+
+ case B_STOP:
+ printf("%d: STOP\n",i);
+ break;
+
+ case B_DISCARD:
+ printf("%d: DISCARD\n",i);
+ break;
+
+ case B_KEEP:
+ printf("%d: KEEP\n",i);
+ break;
+
+ case B_MARK:
+ printf("%d: MARK\n",i);
+ break;
+
+ case B_UNMARK:
+ printf("%d: UNMARK\n",i);
+ break;
+
+ case B_FILEINTO:
+ printf("%d: FILEINTO COPY(%d) FOLDER({%d}%s)\n",i,
+ d->data[i+1].value,d->data[i+2].len,d->data[i+3].str);
+ i+=3;
+ break;
+
+ case B_REDIRECT:
+ printf("%d: REDIRECT COPY(%d) ADDRESS({%d}%s)\n",i,
+ d->data[i+1].value,d->data[i+2].len,d->data[i+3].str);
+ i+=3;
+ break;
+
+ case B_SETFLAG:
+ printf("%d: SETFLAG\n",i);
+ i=dump_sl(d,++i, level);
+ break;
+
+ case B_ADDFLAG:
+ printf("%d: ADDFLAG\n",i);
+ i=dump_sl(d,++i,level);
+ break;
+
+ case B_REMOVEFLAG:
+ printf("%d: REMOVEFLAG\n",i);
+ i=dump_sl(d,++i,level);
+ break;
+
+ case B_DENOTIFY:
+ printf("%d: DENOTIFY priority %d,comp %d %d %s\n",
+ i,
+ d->data[i+1].value,
+ d->data[i+2].value,
+ d->data[i+3].value,
+ (d->data[i+4].len == -1 ? "[nil]" : d->data[i+5].str));
+ i+=5;
+ break;
+
+ case B_NOTIFY:
+ printf("%d: NOTIFY\n METHOD(%s),\n ID(%s),\n OPTIONS",
+ i,
+ d->data[i+2].str,
+ (d->data[i+3].len == -1 ? "[nil]" : d->data[i+4].str));
+ i+=5;
+ i=dump_sl(d,i,level);
+ printf(" PRIORITY(%d),\n MESSAGE({%d}%s)\n",
+ d->data[i+1].value, d->data[i+2].len,d->data[i+3].str);
+ i+=3;
+ break;
+
+ case B_VACATION:
+ printf("%d:VACATION\n",i);
+ i++;
+ i=dump_sl(d,i,level);
+ printf("SUBJ({%d}%s) MESG({%d}%s)\n DAYS(%d) MIME(%d)\n"
+ " FROM({%d}%s) HANDLE({%d}%s)\n",
+ d->data[i+1].len, (d->data[i+1].len == -1 ? "[nil]" : d->data[i+2].str),
+ d->data[i+3].len, (d->data[i+3].len == -1 ? "[nil]" : d->data[i+4].str),
+ d->data[i+5].value, d->data[i+6].value,
+ d->data[i+7].len, (d->data[i+7].len == -1 ? "[nil]" : d->data[i+8].str),
+ d->data[i+9].len, (d->data[i+9].len == -1 ? "[nil]" : d->data[i+10].str));
+ i+=10;
+
+ break;
+ case B_JUMP:
+ printf("%d: JUMP HUH? this shouldn't be here>?!",i);
+ break;
+ case B_NULL:
+ printf("%d: NULL\n",i);
+ break;
+
+ case B_INCLUDE:
+ printf("%d: INCLUDE LOCATION:%d {%d}%s\n",i,
+ d->data[i+1].value,d->data[i+2].len,d->data[i+3].str);
+ i+=3;
+ break;
+
+ case B_RETURN:
+ printf("%d: RETURN\n",i);
+ break;
+
+ default:
+ printf("%d: %d\n",i,d->data[i].op);
+ break;
+ }
+ }
+ printf("full len is: %d\n", d->scriptend);
+}
+#endif
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_emit.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_emit.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_emit.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_emit.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,789 @@
+/* bc_emit.c -- sieve bytecode - pass 2 of the compiler
+ * Rob Siemborski
+ * Jen Smith
+ * $Id: bc_emit.c,v 1.2.2.5 2005/12/14 13:45:18 murch Exp $
+ */
+/***********************************************************
+ Copyright 2001 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "xmalloc.h"
+#include "sieve_interface.h"
+
+
+#include "bytecode.h"
+
+#include <syslog.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+
+#if DUMPCODE
+void dump(bytecode_info_t *d);
+#endif
+
+static inline int write_int (int fd, int x)
+{
+ int y=htonl(x);
+ return (write(fd, &y, sizeof(int)));
+}
+
+
+
+struct bytecode_info
+{
+ bytecode_t *data;/* pointer to almost-flat bytecode */
+ size_t scriptend; /* used by emit code to know final length of bytecode */
+ size_t reallen; /* allocated length of 'data' */
+};
+
+/* Pad null bytes onto the end of the string we just wrote */
+/* returns -1 on failure or number of bytes written on success */
+static int align_string(int fd, int string_len)
+{
+ /* Keep in mind that we always want to pad a string with *at least*
+ * one zero, that's why sometimes we have to pad with 4 */
+ int needed = sizeof(int) - (string_len % sizeof(int));
+ if (needed>= 0 && needed <=4)
+ {
+ if(write(fd, "\0\0\0\0", needed) == -1) return -1;
+ }
+ return needed;
+}
+
+/*all functions keep codep up to date as they use it.
+ the amount that has been written to the file is maintained by the
+ filelen variable in bc_action_emit
+ the other bc_xxx_emit funtions keep track of how much they (and any functions they call) have written and return this value
+*/
+
+
+/* Write out a stringlist to a given file descriptor.
+ * return # of bytes written on success and -1 on error */
+
+/* stringlist: <# listitems>
+ <pos of listend (bytes)>
+ <string:(size)(aligned string)>
+*/
+static int bc_stringlist_emit(int fd, int *codep, bytecode_info_t *bc)
+{
+ int len = bc->data[(*codep)++].len;
+ int i;
+ int ret;
+ int wrote = 2*sizeof(int);
+ int begin,end;
+
+ /* Write out number of items in the list */
+ if (write_int(fd, len)== -1) return -1 ;
+
+ /* skip one spot end of list position*/
+ begin=lseek(fd,0,SEEK_CUR);
+ lseek(fd,sizeof(int),SEEK_CUR);
+
+ /* Loop through all the items of the list, writing out length and string
+ * in sequence */
+ for(i=0; i < len; i++)
+ {
+ int datalen = bc->data[(*codep)++].len;
+
+ if(write_int(fd, datalen) == -1) return -1;
+ wrote += sizeof(int);
+
+ if(write(fd, bc->data[(*codep)++].str, datalen) == -1) return -1;
+ wrote += datalen;
+
+ ret = align_string(fd,datalen);
+ if(ret == -1) return -1;
+
+ wrote+=ret;
+ }
+ end=lseek(fd,0,SEEK_CUR);
+
+ /* go back and write end of list position */
+ lseek(fd,begin,SEEK_SET);
+ if(write_int(fd, end) == -1) return -1;
+
+ /* return to the end */
+ lseek(fd,end,SEEK_SET);
+ return wrote;
+}
+
+static int bc_test_emit(int fd, int *codep, bytecode_info_t *bc);
+
+/* Write out a testlist to a given file descriptor.
+ * return # of bytes written on success and -1 on error */
+static int bc_testlist_emit(int fd, int *codep, bytecode_info_t *bc)
+{
+ int len = bc->data[(*codep)++].len;
+ int i;
+ int ret;
+ int begin, end;
+ int wrote = 2*sizeof(int);
+
+ /* Write out number of items in the list */
+ if(write_int(fd, len)== -1) return -1;
+
+ /* skip one spot for end of list position*/
+ begin = lseek(fd, 0, SEEK_CUR);
+ lseek(fd, sizeof(int), SEEK_CUR);
+
+ /* Loop through all the items of the list, writing out each
+ * test as we reach it in sequence. */
+ for(i=0; i < len; i++) {
+ int nextcodep = bc->data[(*codep)++].jump;
+
+ ret = bc_test_emit(fd, codep, bc);
+ if(ret < 0 ) return -1;
+
+ wrote+=ret;
+ *codep = nextcodep;
+ }
+ end = lseek(fd, 0, SEEK_CUR);
+
+ /* go back and write the end of list position */
+ lseek(fd,begin,SEEK_SET);
+ if(write_int(fd, end) == -1) return -1;
+
+ /*return to the end */
+ lseek(fd,end,SEEK_SET);
+
+ return wrote;
+}
+
+/* emit the bytecode for a test. returns -1 on failure or size of
+ * emitted bytecode on success */
+static int bc_test_emit(int fd, int *codep, bytecode_info_t *bc)
+{
+ int wrote=0;/* Relative offset to account for interleaved strings */
+
+
+ int ret; /* Temporary Return Value Variable */
+
+ /* Output this opcode */
+ if(write_int(fd, bc->data[(*codep)].op) == -1)
+ return -1;
+ wrote += sizeof(int);
+
+ switch(bc->data[(*codep)++].op) {
+ case BC_TRUE:
+ case BC_FALSE:
+ /* No parameter opcodes */
+ break;
+
+ case BC_NOT:
+ {
+ /* Single parameter: another test */
+ ret = bc_test_emit(fd, codep, bc);
+ if(ret < 0)
+ return -1;
+ else
+ wrote+=ret;
+ break;
+ }
+
+ case BC_ALLOF:
+ case BC_ANYOF:
+ /*where we jump to?*/
+ /* Just drop a testlist */
+ ret = bc_testlist_emit(fd, codep, bc);
+ if(ret < 0)
+ return -1;
+ else
+ wrote+=ret;
+ break;
+
+ case BC_SIZE:
+ /* Drop tag and number */
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ if(write_int(fd, bc->data[(*codep)+1].value) == -1)
+ return -1;
+
+ wrote += 2 * sizeof(int);
+ (*codep) += 2;
+ break;
+
+ case BC_EXISTS:
+ {
+ int ret;
+ ret = bc_stringlist_emit(fd, codep, bc);
+ if(ret < 0) return -1;
+ wrote += ret;
+ break;
+ }
+
+ case BC_HEADER:
+ {
+ int ret;
+ /* Drop match type */
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*drop comparator */
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*now drop relation*/
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /* Now drop headers */
+ ret = bc_stringlist_emit(fd, codep, bc);
+ if(ret < 0) return -1;
+ wrote+=ret;
+ /* Now drop data */
+ ret = bc_stringlist_emit(fd, codep, bc);
+ if(ret < 0) return -1;
+ wrote+=ret;
+ break;
+ }
+
+ case BC_ADDRESS:
+ case BC_ENVELOPE:
+ {
+ int ret;
+ /* Drop match type */
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*drop comparator */
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*now drop relation*/
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*now drop address part*/
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /* Now drop headers */
+ ret = bc_stringlist_emit(fd, codep, bc);
+ if(ret < 0) return -1;
+ wrote+=ret;
+ /* Now drop data */
+ ret = bc_stringlist_emit(fd, codep, bc);
+ if(ret < 0) return -1;
+ wrote+=ret;
+ break;
+ }
+
+ case BC_BODY:
+ {
+ int ret;
+ /* Drop match type */
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*drop comparator */
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*now drop relation*/
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*now drop transform*/
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*now drop offset*/
+ if(write_int(fd, bc->data[(*codep)].value) == -1)
+ return -1;
+ wrote += sizeof(int);
+ (*codep)++;
+ /*now drop content-types*/
+ ret = bc_stringlist_emit(fd, codep, bc);
+ if(ret < 0) return -1;
+ wrote+=ret;
+ /* Now drop data */
+ ret = bc_stringlist_emit(fd, codep, bc);
+ if(ret < 0) return -1;
+ wrote+=ret;
+ break;
+ }
+
+ default:
+ /* Unknown testcode? */
+ return -1;
+ }
+ return wrote;
+}
+
+/* emit the bytecode to a file descriptor given a flattened parse tree
+ * returns -1 on failure, size of emitted bytecode on success.
+ *
+ * this takes care of everything except the comparisons */
+static int bc_action_emit(int fd, int codep, int stopcodep,
+ bytecode_info_t *bc, int filelen)
+{
+ int len; /* Temporary Length Variable */
+ int ret; /* Temporary Return Value Variable */
+ int start_filelen = filelen;
+ int i;
+
+ /*debugging variable to check filelen*/
+ /*int location;*/
+
+ syslog(LOG_DEBUG, "entered bc_action_emit with filelen: %d", filelen);
+
+ /* All non-string data MUST be sizeof(int)
+ byte alligned so the end of each string may require a pad */
+ /*
+ * Note that for purposes of jumps you must multiply codep by sizeof(int)
+ */
+ while(codep < stopcodep) {
+ /* Output this opcode */
+ if(write_int(fd, bc->data[codep].op) == -1)
+ return -1;
+
+ filelen+=sizeof(int);
+
+ switch(bc->data[codep++].op) {
+
+ case B_IF:
+ {
+ /* IF
+ * test
+ * jump (false condition)
+ * then
+ * (if there is an else) jump(finish)
+ * (if there is an else) else
+ */
+
+ int testEndLoc=-1;
+ int testdist, thendist, elsedist;
+ int c;
+
+ int jumpFalseLoc=-1;/*this is the location that is being reserved
+ for the first jump command
+ we jump to the false condition of the test*/
+
+ int jumpEndLoc=-1; /* this is the location that is being reserved
+ for the optional jump command
+ it jumps over the else statement to the end*/
+ int jumpto=-1;
+ int jumpop= B_JUMP;
+
+ /*leave space to store the location of end of the test*/
+ ret = lseek(fd, sizeof(int), SEEK_CUR);
+ if(ret == -1) return ret;
+
+ testEndLoc=filelen;
+ filelen+=sizeof(int);
+
+ /* spew the test */
+
+ c=codep+3;
+ testdist = bc_test_emit(fd, &c, bc);
+ if(testdist == -1)return -1;
+ filelen +=testdist;
+
+ /*store the location for hte end of the test
+ *this is important for short circuiting of allof/anyof*/
+ jumpto=filelen/4;
+ if(lseek(fd, testEndLoc, SEEK_SET) == -1)
+ return -1;
+ if(write_int(fd,jumpto) == -1)
+ return -1;
+
+ if(lseek(fd,filelen,SEEK_SET) == -1)
+ return -1;
+
+ /* leave space for jump */
+ if(write_int(fd, jumpop) == -1)
+ return -1;
+ ret = lseek(fd, sizeof(int), SEEK_CUR);
+ if(ret == -1)
+ return ret;
+ jumpFalseLoc=filelen+sizeof(int);
+
+ filelen +=2*sizeof(int); /*jumpop + jump*/
+
+ /* spew the then code */
+ thendist = bc_action_emit(fd, bc->data[codep].value,
+ bc->data[codep+1].value, bc,
+ filelen);
+
+ filelen+=thendist;
+
+ /* there is an else case */
+ if(bc->data[codep+2].value != -1)
+ {
+ /* leave space for jump */
+ if(write_int(fd, jumpop) == -1)
+ return -1;
+ ret = lseek(fd, sizeof(int), SEEK_CUR);
+ if(ret == -1)
+ return ret;
+
+ jumpEndLoc=filelen+sizeof(int);
+ filelen+=2*sizeof(int);/*jumpop + jump*/
+ }
+
+ /*put previous jump to the end of the then code,
+ *or the end of the jump if there is an else case */
+ jumpto=filelen/4;
+ if(lseek(fd, jumpFalseLoc, SEEK_SET) == -1)
+ return -1;
+ if(write_int(fd,jumpto) == -1)
+ return -1;
+ if(lseek(fd,filelen,SEEK_SET) == -1)
+ return -1;
+
+ /* there is an else case */
+ if(bc->data[codep+2].value != -1) {
+ /* spew the else code */
+ elsedist = bc_action_emit(fd, bc->data[codep+1].value,
+ bc->data[codep+2].value, bc,
+ filelen);
+
+ filelen+=elsedist;
+
+ /*put jump to the end of the else code*/
+ jumpto=filelen/4;
+ if(lseek(fd, jumpEndLoc, SEEK_SET) == -1)
+ return -1;
+ if(write_int(fd,jumpto) == -1)
+ return -1;
+ if(lseek(fd,filelen,SEEK_SET) == -1)
+ return -1;
+
+ codep = bc->data[codep+2].value;
+ } else {
+ codep = bc->data[codep+1].value;
+ }
+
+ break;
+ }
+
+ case B_FILEINTO:
+ case B_REDIRECT:
+ /* Copy (word), Folder/Address String */
+
+ if(write_int(fd,bc->data[codep++].value) == -1)
+ return -1;
+
+ filelen += sizeof(int);
+
+ len = bc->data[codep++].len;
+ if(write_int(fd,len) == -1)
+ return -1;
+
+ filelen+=sizeof(int);
+
+ if(write(fd,bc->data[codep++].str,len) == -1)
+ return -1;
+
+ ret = align_string(fd, len);
+ if(ret == -1)
+ return -1;
+
+ filelen += len + ret;
+
+ break;
+
+ case B_REJECT:
+ /*just a string*/
+ len = bc->data[codep++].len;
+ if(write_int(fd,len) == -1)
+ return -1;
+
+ filelen+=sizeof(int);
+
+ if(write(fd,bc->data[codep++].str,len) == -1)
+ return -1;
+
+ ret = align_string(fd, len);
+ if(ret == -1)
+ return -1;
+
+ filelen += len + ret;
+
+ break;
+
+ case B_SETFLAG:
+ case B_ADDFLAG:
+ case B_REMOVEFLAG:
+ /* Dump just a stringlist */
+ ret = bc_stringlist_emit(fd, &codep, bc);
+ if(ret < 0)
+ return -1;
+ filelen += ret;
+ break;
+
+ case B_NOTIFY:
+ /* method string, id string, options string list,
+ priotity, Message String */
+ /*method and id*/
+ for(i=0; i<2; i++) {
+ len = bc->data[codep++].len;
+ if(write_int(fd,len) == -1)
+ return -1;
+ filelen += sizeof(int);
+ if(len == -1)
+ {
+ /* this will probably only happen for the id */
+ /* this is a nil string */
+ /* skip the null pointer and make up for it
+ * by adjusting the offset */
+ codep++;
+ }
+ else
+ {
+ if(write(fd,bc->data[codep++].str,len) == -1)
+ return -1;
+
+ ret = align_string(fd, len);
+ if(ret == -1)
+ return -1;
+
+ filelen += len + ret;
+ }
+
+ }
+ /*options */
+ ret = bc_stringlist_emit(fd, &codep, bc);
+ if(ret < 0)
+ return -1;
+ filelen+=ret;
+
+ /*priority*/
+ if(write_int(fd, bc->data[codep].value) == -1)
+ return -1;
+ codep++;
+ filelen += sizeof(int);
+
+ len = bc->data[codep++].len;
+ if(write_int(fd,len) == -1)
+ return -1;
+ filelen += sizeof(int);
+
+ if(write(fd,bc->data[codep++].str,len) == -1)
+ return -1;
+
+ ret = align_string(fd, len);
+ if(ret == -1) return -1;
+
+ filelen += len + ret;
+ break;
+
+
+ case B_DENOTIFY:
+ /* priority num,comptype num,relat num, comp string*/
+
+ /* priority*/
+ if(write_int(fd, bc->data[codep].value) == -1)
+ return -1;
+ filelen += sizeof(int);
+ codep++;
+ /* comptype */
+ if(write_int(fd, bc->data[codep].value) == -1)
+ return -1;
+ filelen += sizeof(int);
+ codep++;
+ /* relational*/
+ if(write_int(fd, bc->data[codep].value) == -1)
+ return -1;
+ filelen += sizeof(int);
+ codep++;
+ /* comp string*/
+
+ len = bc->data[codep++].len;
+ if(write_int(fd,len) == -1)
+ return -1;
+ filelen += sizeof(int);
+
+ if(len == -1)
+ {
+ /* this is a nil string */
+ /* skip the null pointer and make up for it
+ * by adjusting the offset */
+ codep++;
+ }
+ else
+ {
+ if(write(fd,bc->data[codep++].str,len) == -1)
+ return -1;
+
+ ret = align_string(fd, len);
+ if(ret == -1) return -1;
+
+ filelen += len + ret;
+ }
+ break;
+ case B_VACATION:
+ /* Address list, Subject String, Message String,
+ Days (word), Mime (word), From String, Handle String */
+
+ /*new code-this might be broken*/
+ ret = bc_stringlist_emit(fd, &codep, bc);
+ if(ret < 0) return -1;
+ filelen += ret;
+ /*end of new code*/
+
+ for(i=0; i<2; i++) {/*writing strings*/
+
+ /*write length of string*/
+ len = bc->data[codep++].len;
+ if(write_int(fd,len) == -1)
+ return -1;
+ filelen += sizeof(int);
+
+ if(len == -1)
+ {
+ /* this is a nil string */
+ /* skip the null pointer and make up for it
+ * by adjusting the offset */
+ codep++;
+ }
+ else
+ {
+ /*write string*/
+ if(write(fd,bc->data[codep++].str,len) == -1)
+ return -1;
+
+ ret = align_string(fd, len);
+ if(ret == -1) return -1;
+
+ filelen += len + ret;
+ }
+
+ }
+ /* Days*/
+ if(write_int(fd,bc->data[codep].value) == -1)
+ return -1;
+ codep++;
+ filelen += sizeof(int);
+ /*Mime */
+ if(write_int(fd,bc->data[codep].value) == -1)
+ return -1;
+ codep++;
+
+ for(i=0; i<2; i++) {/*writing strings*/
+
+ /*write length of string*/
+ len = bc->data[codep++].len;
+ if(write_int(fd,len) == -1)
+ return -1;
+ filelen += sizeof(int);
+
+ if(len == -1)
+ {
+ /* this is a nil string */
+ /* skip the null pointer and make up for it
+ * by adjusting the offset */
+ codep++;
+ }
+ else
+ {
+ /*write string*/
+ if(write(fd,bc->data[codep++].str,len) == -1)
+ return -1;
+
+ ret = align_string(fd, len);
+ if(ret == -1) return -1;
+
+ filelen += len + ret;
+ }
+
+ }
+ filelen += sizeof(int);
+
+ break;
+ case B_INCLUDE:
+ /* Location (word), Filename String */
+
+ /* Location */
+ if(write_int(fd, bc->data[codep].value) == -1)
+ return -1;
+ filelen += sizeof(int);
+ codep++;
+ /* Filename */
+ len = bc->data[codep++].len;
+ if(write_int(fd,len) == -1)
+ return -1;
+
+ filelen += sizeof(int);
+
+ if(write(fd,bc->data[codep++].str,len) == -1)
+ return -1;
+
+ ret = align_string(fd, len);
+ if(ret == -1) return -1;
+
+ filelen += len + ret;
+ break;
+ case B_NULL:
+ case B_STOP:
+ case B_DISCARD:
+ case B_KEEP:
+ case B_MARK:
+ case B_UNMARK:
+ case B_RETURN:
+ /* No Parameters! */
+ break;
+
+ default:
+ /* Unknown opcode? */
+ return -1;
+ }
+ }
+ return filelen - start_filelen;
+}
+
+/* spew the bytecode to disk */
+int sieve_emit_bytecode(int fd, bytecode_info_t *bc)
+{
+ /* First output version number (4 bytes) */
+ int data = BYTECODE_VERSION;
+
+ /*this is a string, so it is happy*/
+ if(write(fd, BYTECODE_MAGIC, BYTECODE_MAGIC_LEN) == -1)
+ return -1;
+
+ if(write_int(fd, data) == -1) return -1;
+
+#if DUMPCODE
+ dump(bc);
+#endif
+
+ /*the sizeof(int) is to account for the version # at the begining*/
+ return bc_action_emit(fd, 0, bc->scriptend, bc, sizeof(int) + BYTECODE_MAGIC_LEN);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_eval.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_eval.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_eval.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_eval.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1413 @@
+/* bc_eval.c - evaluate the bytecode
+ * $Id: bc_eval.c,v 1.2.2.12 2005/12/02 00:06:00 murch Exp $
+ */
+/***********************************************************
+ Copyright 2001 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "sieve_interface.h"
+#include "interp.h"
+#include "message.h"
+#include "script.h"
+
+#include "bytecode.h"
+
+#include "charset.h"
+#include "hash.h"
+#include "xmalloc.h"
+
+#include <string.h>
+#include <ctype.h>
+
+/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/**************************EXECUTING BYTECODE******************************/
+/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+/**************************************************************************/
+
+/* Given a bytecode_input_t at the beginning of a string (the len block),
+ * return the string, the length, and the bytecode index of the NEXT
+ * item */
+int unwrap_string(bytecode_input_t *bc, int pos, const char **str, int *len)
+{
+ int local_len = ntohl(bc[pos].value);
+
+ pos++;
+
+ if(local_len == -1) {
+ /* -1 length indicates NULL */
+ *str = NULL;
+ } else {
+ /* This cast is ugly, but necessary */
+ *str = (const char *)&bc[pos].str;
+
+ /* Compute the next index */
+ pos += ((ROUNDUP(local_len+1))/sizeof(bytecode_input_t));
+ }
+
+ if(len) *len = local_len;
+
+ return pos;
+}
+
+
+/* this is used by notify to pass the options list to do_notify
+ * do_notify needs null-terminated (char *)[],
+ * we have a stringlist, the beginning of which is pointed at by pos */
+const char ** bc_makeArray(bytecode_input_t *bc, int *pos)
+{
+ int i;
+ const char** array;
+ int len = ntohl(bc[*pos].value);
+
+ (*pos)+=2; /* Skip # Values and Total Byte Length */
+
+ array=(const char **)xmalloc((len+1) * sizeof(char *));
+
+ for (i=0; i<len; i++) {
+ *pos = unwrap_string(bc, *pos, &(array[i]), NULL);
+ }
+
+ array[i] = NULL;
+
+ return array;
+}
+
+/* Compile a regular expression for use during parsing */
+regex_t * bc_compile_regex(const char *s, int ctag,
+ char *errmsg, size_t errsiz)
+{
+ int ret;
+ regex_t *reg = (regex_t *) xmalloc(sizeof(regex_t));
+
+ if ( (ret=regcomp(reg, s, ctag)) != 0)
+ {
+ (void) regerror(ret, reg, errmsg, errsiz);
+ free(reg);
+ return NULL;
+ }
+ return reg;
+}
+
+/* Determine if addr is a system address */
+static int sysaddr(const char *addr)
+{
+ if (!strncasecmp(addr, "MAILER-DAEMON", 13))
+ return 1;
+
+ if (!strncasecmp(addr, "LISTSERV", 8))
+ return 1;
+
+ if (!strncasecmp(addr, "majordomo", 9))
+ return 1;
+
+ if (strstr(addr, "-request@"))
+ return 1;
+
+ if (!strncmp(addr, "owner-", 6))
+ return 1;
+
+ return 0;
+}
+
+/* look for myaddr and myaddrs in the body of a header - return the match */
+static char* look_for_me(char *myaddr, int numaddresses,
+ bytecode_input_t *bc, int i, const char **body)
+{
+ char *found = NULL;
+ int l;
+ int curra,x ;
+
+ /* loop through each TO header */
+ for (l = 0; body[l] != NULL && !found; l++) {
+ void *data = NULL, *marker = NULL;
+ char *addr;
+
+ parse_address(body[l], &data, &marker);
+
+ /* loop through each address in the header */
+ while (!found &&
+ ((addr = get_address(ADDRESS_ALL,&data, &marker, 1))!= NULL)) {
+
+ if (!strcasecmp(addr, myaddr)) {
+ found = xstrdup(myaddr);
+ break;
+ }
+
+ curra=i;
+
+ for(x=0; x<numaddresses; x++)
+ {
+ void *altdata = NULL, *altmarker = NULL;
+ char *altaddr;
+ const char *str;
+
+ curra = unwrap_string(bc, curra, &str, NULL);
+
+ /* is this address one of my addresses? */
+ parse_address(str, &altdata, &altmarker);
+
+ altaddr = get_address(ADDRESS_ALL, &altdata, &altmarker, 1);
+
+ if (!strcasecmp(addr,altaddr)) {
+ found=xstrdup(str);
+ break;
+ }
+
+ free_address(&altdata, &altmarker);
+ }
+
+ }
+ free_address(&data, &marker);
+ }
+
+ return found;
+}
+
+static char *list_fields[] = {
+ "list-id",
+ "list-help",
+ "list-subscribe",
+ "list-unsubscribe",
+ "list-post",
+ "list-owner",
+ "list-archive",
+ NULL
+};
+
+/* Determine if we should respond to a vacation message */
+int shouldRespond(void * m, sieve_interp_t *interp,
+ int numaddresses, bytecode_input_t* bc,
+ int i, char **from, char **to)
+{
+ const char **body;
+ char buf[128];
+ char *myaddr = NULL;
+ int l = SIEVE_OK, j;
+ void *data = NULL, *marker = NULL;
+ char *tmp;
+ int curra, x;
+ char *found=NULL;
+ char *reply_to=NULL;
+
+ /* Implementations SHOULD NOT respond to any message that contains a
+ "List-Id" [RFC2919], "List-Help", "List-Subscribe", "List-
+ Unsubscribe", "List-Post", "List-Owner" or "List-Archive" [RFC2369]
+ header field. */
+ for (j = 0; list_fields[j]; j++) {
+ strcpy(buf, list_fields[j]);
+ if (interp->getheader(m, buf, &body) == SIEVE_OK) {
+ l = SIEVE_DONE;
+ break;
+ }
+ }
+
+ /* Implementations SHOULD NOT respond to any message that has an
+ "Auto-submitted" header field with a value other than "no".
+ This header field is described in [RFC3834]. */
+ strcpy(buf, "auto-submitted");
+ if (interp->getheader(m, buf, &body) == SIEVE_OK) {
+ /* we don't deal with comments, etc. here */
+ /* skip leading white-space */
+ while (*body[0] && isspace((int) *body[0])) body[0]++;
+ if (strcasecmp(body[0], "no")) l = SIEVE_DONE;
+ }
+
+ /* is there a Precedence keyword of "junk | bulk | list"? */
+ /* XXX non-standard header, but worth checking */
+ strcpy(buf, "precedence");
+ if (interp->getheader(m, buf, &body) == SIEVE_OK) {
+ /* we don't deal with comments, etc. here */
+ /* skip leading white-space */
+ while (*body[0] && isspace((int) *body[0])) body[0]++;
+ if (!strcasecmp(body[0], "junk") ||
+ !strcasecmp(body[0], "bulk") ||
+ !strcasecmp(body[0], "list"))
+ l = SIEVE_DONE;
+ }
+
+ /* Note: the domain-part of all addresses are canonicalized */
+ /* grab my address from the envelope */
+ if (l == SIEVE_OK) {
+ strcpy(buf, "to");
+ l = interp->getenvelope(m, buf, &body);
+
+ if (body[0]) {
+ parse_address(body[0], &data, &marker);
+ tmp = get_address(ADDRESS_ALL, &data, &marker, 1);
+ myaddr = (tmp != NULL) ? xstrdup(tmp) : NULL;
+ free_address(&data, &marker);
+ }
+ }
+
+ if (l == SIEVE_OK) {
+ strcpy(buf, "from");
+ l = interp->getenvelope(m, buf, &body);
+ }
+ if (l == SIEVE_OK && body[0]) {
+ /* we have to parse this address & decide whether we
+ want to respond to it */
+ parse_address(body[0], &data, &marker);
+ tmp = get_address(ADDRESS_ALL, &data, &marker, 1);
+ reply_to = (tmp != NULL) ? xstrdup(tmp) : NULL;
+ free_address(&data, &marker);
+
+ /* first, is there a reply-to address? */
+ if (reply_to == NULL) {
+ l = SIEVE_DONE;
+ }
+
+ /* first, is it from me? */
+ if (l == SIEVE_OK && !strcmp(myaddr, reply_to)) {
+ l = SIEVE_DONE;
+ }
+
+ /* ok, is it any of the other addresses i've
+ specified? */
+ if (l == SIEVE_OK)
+ {
+ curra=i;
+ for(x=0; x<numaddresses; x++) {
+ const char *address;
+
+ curra = unwrap_string(bc, curra, &address, NULL);
+
+ if (!strcmp(address, reply_to))
+ l=SIEVE_DONE;
+ }
+ }
+
+ /* ok, is it a system address? */
+ if (l == SIEVE_OK && sysaddr(reply_to)) {
+ l = SIEVE_DONE;
+ }
+ }
+ if (l == SIEVE_OK) {
+ /* ok, we're willing to respond to the sender.
+ but is this message to me? that is, is my address
+ in the [Resent]-To, [Resent]-Cc or [Resent]-Bcc fields? */
+ if (strcpy(buf, "to"),
+ interp->getheader(m, buf, &body) == SIEVE_OK)
+ found = look_for_me(myaddr, numaddresses ,bc, i, body);
+ if (!found && (strcpy(buf, "cc"),
+ (interp->getheader(m, buf, &body) == SIEVE_OK)))
+ found = look_for_me(myaddr, numaddresses, bc, i, body);
+ if (!found && (strcpy(buf, "bcc"),
+ (interp->getheader(m, buf, &body) == SIEVE_OK)))
+ found = look_for_me(myaddr, numaddresses, bc, i, body);
+ if (!found && strcpy(buf, "resent-to"),
+ interp->getheader(m, buf, &body) == SIEVE_OK)
+ found = look_for_me(myaddr, numaddresses ,bc, i, body);
+ if (!found && (strcpy(buf, "resent-cc"),
+ (interp->getheader(m, buf, &body) == SIEVE_OK)))
+ found = look_for_me(myaddr, numaddresses, bc, i, body);
+ if (!found && (strcpy(buf, "resent-bcc"),
+ (interp->getheader(m, buf, &body) == SIEVE_OK)))
+ found = look_for_me(myaddr, numaddresses, bc, i, body);
+ if (!found)
+ l = SIEVE_DONE;
+ }
+ /* ok, ok, if we got here maybe we should reply */
+ if (myaddr) free(myaddr);
+ *from=found;
+ *to=reply_to;
+ return l;
+}
+
+/* Evaluate a bytecode test */
+int eval_bc_test(sieve_interp_t *interp,
+ struct hash_table *body_cache, void* m,
+ bytecode_input_t * bc, int * ip)
+{
+ int res=0;
+ int i=*ip;
+ int x,y,z;/* loop variable */
+ int list_len; /* for allof/anyof/exists */
+ int list_end; /* for allof/anyof/exists */
+ int address=0;/*to differentiate between address and envelope*/
+ comparator_t * comp=NULL;
+ void * comprock=NULL;
+ int op= ntohl(bc[i].op);
+
+ switch(op)
+ {
+ case BC_FALSE:
+ res=0; i++; break;
+
+ case BC_TRUE:
+ res=1; i++; break;
+
+ case BC_NOT:/*2*/
+ i+=1;
+ res = eval_bc_test(interp, body_cache, m, bc, &i);
+ if(res >= 0) res = !res; /* Only invert in non-error case */
+ break;
+
+ case BC_EXISTS:/*3*/
+ {
+ int headersi=i+1;
+ const char** val;
+ int currh;
+
+ res=1;
+
+ list_len=ntohl(bc[headersi].len);
+ list_end=ntohl(bc[headersi+1].value)/4;
+
+ currh=headersi+2;
+
+ for(x=0; x<list_len && res; x++)
+ {
+ const char *str;
+
+ currh = unwrap_string(bc, currh, &str, NULL);
+
+ if(interp->getheader(m,str, &val) != SIEVE_OK)
+ res = 0;
+ }
+
+ i=list_end; /* adjust for short-circuit */
+ break;
+ }
+ case BC_SIZE:/*4*/
+ {
+ int s;
+ int sizevar=ntohl(bc[i+1].value);
+ int x=ntohl(bc[i+2].value);
+
+ if (interp->getsize(m, &s) != SIEVE_OK)
+ break;
+
+ if (sizevar ==B_OVER) {
+ /* over */
+ res= s > x;
+ } else {
+ /* under */
+ res= s < x;
+ }
+ i+=3;
+ break;
+ }
+ case BC_ANYOF:/*5*/
+ res = 0;
+ list_len=ntohl(bc[i+1].len);
+ list_end=ntohl(bc[i+2].len)/4;
+ i+=3;
+
+ /* need to process all of them, to ensure our instruction pointer stays
+ * in the right place */
+ for (x=0; x<list_len && !res; x++) {
+ int tmp;
+ tmp = eval_bc_test(interp,body_cache,m,bc,&i);
+ if(tmp < 0) {
+ res = tmp;
+ break;
+ }
+ res = res || tmp;
+ }
+
+ i = list_end; /* handle short-circuting */
+
+ break;
+ case BC_ALLOF:/*6*/
+ res = 1;
+ list_len=ntohl(bc[i+1].len);
+ list_end=ntohl(bc[i+2].len)/4;
+ i+=3;
+
+ /* return 1 unless you find one that isn't true, then return 0 */
+ for (x=0; x<list_len && res; x++) {
+ int tmp;
+ tmp = eval_bc_test(interp,body_cache,m,bc,&i);
+ if(tmp < 0) {
+ res = tmp;
+ break;
+ }
+ res = res && tmp;
+ }
+
+ i = list_end; /* handle short-circuiting */
+
+ break;
+ case BC_ADDRESS:/*7*/
+ address=1;
+ /* fall through */
+ case BC_ENVELOPE:/*8*/
+ {
+ const char ** val;
+ void * data=NULL;
+ void * marker=NULL;
+ char * addr;
+ int addrpart=ADDRESS_ALL;/* XXX correct default behavior?*/
+
+ int headersi=i+5;/* the i value for the begining of the headers */
+ int datai=(ntohl(bc[headersi+1].value)/4);
+
+ int numheaders=ntohl(bc[headersi].len);
+ int numdata=ntohl(bc[datai].len);
+
+ int currh, currd; /* current header, current data */
+
+ int match=ntohl(bc[i+1].value);
+ int relation=ntohl(bc[i+2].value);
+ int comparator=ntohl(bc[i+3].value);
+ int apart=ntohl(bc[i+4].value);
+ int count=0;
+ char scount[3];
+ int isReg = (match==B_REGEX);
+ int ctag = 0;
+ regex_t *reg;
+ char errbuf[100]; /* Basically unused, as regexps are tested at compile */
+
+ /* set up variables needed for compiling regex */
+ if (isReg)
+ {
+ if (comparator== B_ASCIICASEMAP)
+ {
+ ctag = REG_EXTENDED | REG_NOSUB | REG_ICASE;
+ }
+ else
+ {
+ ctag = REG_EXTENDED | REG_NOSUB;
+ }
+ }
+
+ /*find the correct comparator fcn*/
+ comp = lookup_comp(comparator, match, relation, &comprock);
+
+ if(!comp) {
+ res = SIEVE_RUN_ERROR;
+ break;
+ }
+
+ /*find the part of the address that we want*/
+ switch(apart)
+ {
+ case B_ALL:
+ addrpart = ADDRESS_ALL; break;
+ case B_LOCALPART:
+ addrpart = ADDRESS_LOCALPART; break;
+ case B_DOMAIN:
+ addrpart = ADDRESS_DOMAIN; break;
+ case B_USER:
+ addrpart = ADDRESS_USER; break;
+ case B_DETAIL:
+ addrpart = ADDRESS_DETAIL; break;
+ default:
+ /* this shouldn't happen with correcct bytecode */
+ res = SIEVE_RUN_ERROR;
+ }
+
+ if(res == SIEVE_RUN_ERROR) break;
+
+ /*loop through all the headers*/
+ currh=headersi+2;
+#if VERBOSE
+ printf("about to process %d headers\n", numheaders);
+#endif
+ for (x=0; x<numheaders && !res; x++)
+ {
+ const char *this_header;
+
+ currh = unwrap_string(bc, currh, &this_header, NULL);
+
+ /* Try the next string if we don't have this one */
+ if(address) {
+ /* Header */
+ if(interp->getheader(m, this_header, &val) != SIEVE_OK)
+ continue;
+#if VERBOSE
+ printf(" [%d] header %s is %s\n", x, this_header, val[0]);
+#endif
+ } else {
+ /* Envelope */
+ if(interp->getenvelope(m, this_header, &val) != SIEVE_OK)
+ continue;
+ }
+
+ /*header exists, now to test it*/
+ /*search through all the headers that match*/
+
+ for (y=0; val[y]!=NULL && !res; y++) {
+
+#if VERBOSE
+ printf("about to parse %s\n", val[y]);
+#endif
+
+ if (parse_address(val[y], &data, &marker)!=SIEVE_OK)
+ return 0;
+
+ while (!res &&
+ (addr = get_address(addrpart, &data, &marker, 0))) {
+#if VERBOSE
+ printf("working addr %s\n", (addr ? addr : "[nil]"));
+#endif
+
+ if (match == B_COUNT) {
+ count++;
+ } else {
+ /*search through all the data*/
+ currd=datai+2;
+ for (z=0; z<numdata && !res; z++)
+ {
+ const char *data_val;
+
+ currd = unwrap_string(bc, currd, &data_val, NULL);
+
+ if (isReg) {
+ reg = bc_compile_regex(data_val, ctag,
+ errbuf, sizeof(errbuf));
+ if (!reg) {
+ /* Oops */
+ res=-1;
+ goto alldone;
+ }
+
+ res |= comp(val[y], strlen(val[y]),
+ (const char *)reg, comprock);
+ free(reg);
+ } else {
+#if VERBOSE
+ printf("%s compared to %s(from script)\n",
+ addr, data_val);
+#endif
+ res |= comp(addr, strlen(addr),
+ data_val, comprock);
+ }
+ } /* For each data */
+ }
+ } /* For each address */
+
+ free_address(&data, &marker);
+ }/* For each message header */
+
+#if VERBOSE
+ printf("end of loop, res is %d, x is %d (%d)\n", res, x, numheaders);
+#endif
+ } /* For each script header */
+
+ if (match == B_COUNT)
+ {
+ sprintf(scount, "%u", count);
+ /* search through all the data */
+ currd=datai+2;
+ for (z=0; z<numdata && !res; z++)
+ {
+ const char *data_val;
+
+ currd = unwrap_string(bc, currd, &data_val, NULL);
+
+ res |= comp(scount, strlen(scount), data_val, comprock);
+ }
+ }
+
+ /* Update IP */
+ i=(ntohl(bc[datai+1].value)/4);
+
+ break;
+ }
+ case BC_HEADER:/*9*/
+ {
+ const char** val;
+
+ int headersi=i+4;/*the i value for the begining of hte headers*/
+ int datai=(ntohl(bc[headersi+1].value)/4);
+
+ int numheaders=ntohl(bc[headersi].len);
+ int numdata=ntohl(bc[datai].len);
+
+ int currh, currd; /*current header, current data*/
+
+ int match=ntohl(bc[i+1].value);
+ int relation=ntohl(bc[i+2].value);
+ int comparator=ntohl(bc[i+3].value);
+ int count=0;
+ char scount[3];
+ int isReg = (match==B_REGEX);
+ int ctag = 0;
+ regex_t *reg;
+ char errbuf[100]; /* Basically unused, regexps tested at compile */
+
+ /* set up variables needed for compiling regex */
+ if (isReg)
+ {
+ if (comparator== B_ASCIICASEMAP)
+ {
+ ctag= REG_EXTENDED | REG_NOSUB | REG_ICASE;
+ }
+ else
+ {
+ ctag= REG_EXTENDED | REG_NOSUB;
+ }
+
+ }
+
+ /*find the correct comparator fcn*/
+ comp=lookup_comp(comparator, match, relation, &comprock);
+
+ if(!comp) {
+ res = SIEVE_RUN_ERROR;
+ break;
+ }
+
+ /*search through all the flags for the header*/
+ currh=headersi+2;
+ for(x=0; x<numheaders && !res; x++)
+ {
+ const char *this_header;
+
+ currh = unwrap_string(bc, currh, &this_header, NULL);
+
+ if(interp->getheader(m, this_header, &val) != SIEVE_OK) {
+ continue; /*this header does not exist, search the next*/
+ }
+#if VERBOSE
+ printf ("val %s %s %s\n", val[0], val[1], val[2]);
+#endif
+
+ /* search through all the headers that match */
+
+ for (y=0; val[y]!=NULL && !res; y++)
+ {
+ if (match == B_COUNT) {
+ count++;
+ } else {
+ /*search through all the data*/
+ currd=datai+2;
+ for (z=0; z<numdata && !res; z++)
+ {
+ const char *data_val;
+
+ currd = unwrap_string(bc, currd, &data_val, NULL);
+
+ if (isReg) {
+ reg= bc_compile_regex(data_val, ctag, errbuf,
+ sizeof(errbuf));
+ if (!reg)
+ {
+ /* Oops */
+ res=-1;
+ goto alldone;
+ }
+
+ res |= comp(val[y], strlen(val[y]),
+ (const char *)reg, comprock);
+ free(reg);
+ } else {
+ res |= comp(val[y], strlen(val[y]),
+ data_val, comprock);
+ }
+ }
+ }
+ }
+ }
+
+ if (match == B_COUNT )
+ {
+ sprintf(scount, "%u", count);
+ /*search through all the data*/
+ currd=datai+2;
+ for (z=0; z<numdata && !res; z++)
+ {
+ const char *data_val;
+
+ currd = unwrap_string(bc, currd, &data_val, NULL);
+#if VERBOSE
+ printf("%d, %s \n", count, data_val);
+#endif
+ res |= comp(scount, strlen(scount), data_val, comprock);
+ }
+
+ }
+
+ /* Update IP */
+ i=(ntohl(bc[datai+1].value)/4);
+
+ break;
+ }
+ case BC_BODY:/*10*/
+ {
+ sieve_bodypart_t ** val;
+ const char **content_types = NULL;
+
+ int typesi=i+6;/* the i value for the begining of the content-types */
+ int datai=(ntohl(bc[typesi+1].value)/4);
+
+ int numdata=ntohl(bc[datai].len);
+
+ int currd; /* current data */
+
+ int match=ntohl(bc[i+1].value);
+ int relation=ntohl(bc[i+2].value);
+ int comparator=ntohl(bc[i+3].value);
+ int transform=ntohl(bc[i+4].value);
+ int offset=ntohl(bc[i+5].value);
+ int count=0;
+ char scount[3];
+ int isReg = (match==B_REGEX);
+ int ctag = 0;
+ regex_t *reg;
+ char errbuf[100]; /* Basically unused, as regexps are tested at compile */
+
+ /* set up variables needed for compiling regex */
+ if (isReg)
+ {
+ if (comparator== B_ASCIICASEMAP)
+ {
+ ctag = REG_EXTENDED | REG_NOSUB | REG_ICASE;
+ }
+ else
+ {
+ ctag = REG_EXTENDED | REG_NOSUB;
+ }
+ }
+
+ /*find the correct comparator fcn*/
+ comp = lookup_comp(comparator, match, relation, &comprock);
+
+ if(!comp) {
+ res = SIEVE_RUN_ERROR;
+ break;
+ }
+
+ /*find the part(s) of the body that we want*/
+ content_types = bc_makeArray(bc, &typesi);
+ if(interp->getbody(m, content_types, &val) != SIEVE_OK) {
+ res = SIEVE_RUN_ERROR;
+ break;
+ }
+ free(content_types);
+
+ /* bodypart(s) exist, now to test them */
+
+ for (y=0; val && val[y]!=NULL && !res; y++) {
+
+ if (match == B_COUNT) {
+ count++;
+ } else {
+ const char *content = val[y]->content;
+ int size = val[y]->size;
+
+ if (transform != B_RAW) {
+ int encoding;
+
+ /* XXX currently unknown encodings are processed as raw */
+ if (!val[y]->encoding)
+ encoding = ENCODING_NONE;
+ else if (!strcmp(val[y]->encoding, "BASE64"))
+ encoding = ENCODING_BASE64;
+ else if (!strcmp(val[y]->encoding, "QUOTED-PRINTABLE"))
+ encoding = ENCODING_QP;
+ else
+ encoding = ENCODING_NONE;
+
+ if (encoding != ENCODING_NONE) {
+ content = hash_lookup(val[y]->section, body_cache);
+ if (content) {
+ /* already decoded this part */
+ size = strlen(content);
+ }
+ else {
+ /* decode this part and add it to the cache */
+ char *decbuf = NULL;
+ content = charset_decode_mimebody(val[y]->content,
+ val[y]->size,
+ encoding, &decbuf,
+ 0, &size);
+ hash_insert(val[y]->section, (void *) content,
+ body_cache);
+ }
+ }
+
+ /* XXX convert charset */
+ }
+
+ /* search through all the data */
+ currd=datai+2;
+ for (z=0; z<numdata && !res; z++)
+ {
+ const char *data_val;
+
+ currd = unwrap_string(bc, currd, &data_val, NULL);
+
+ if (isReg) {
+ reg = bc_compile_regex(data_val, ctag,
+ errbuf, sizeof(errbuf));
+ if (!reg) {
+ /* Oops */
+ res=-1;
+ goto alldone;
+ }
+
+ res |= comp(content, size, (const char *)reg, comprock);
+ free(reg);
+ } else {
+ res |= comp(content, size, data_val, comprock);
+ }
+ } /* For each data */
+ }
+
+ /* free the bodypart */
+ free(val[y]);
+
+ } /* For each body part */
+
+ /* free the bodypart array */
+ if (val) free(val);
+
+ if (match == B_COUNT)
+ {
+ sprintf(scount, "%u", count);
+ /* search through all the data */
+ currd=datai+2;
+ for (z=0; z<numdata && !res; z++)
+ {
+ const char *data_val;
+
+ currd = unwrap_string(bc, currd, &data_val, NULL);
+
+ res |= comp(scount, strlen(scount), data_val, comprock);
+ }
+ }
+
+ /* Update IP */
+ i=(ntohl(bc[datai+1].value)/4);
+
+ break;
+ }
+ default:
+#if VERBOSE
+ printf("WERT, can't evaluate if statement. %d is not a valid command",
+ op);
+#endif
+ return SIEVE_RUN_ERROR;
+ }
+
+
+ alldone:
+
+ *ip=i;
+ return res;
+}
+
+/* The entrypoint for bytecode evaluation */
+int sieve_eval_bc(sieve_execute_t *exe, int is_incl, sieve_interp_t *i,
+ struct hash_table *body_cache, void *sc, void *m,
+ sieve_imapflags_t * imapflags, action_list_t *actions,
+ notify_list_t *notify_list, const char **errmsg)
+{
+ const char *data;
+ int res=0;
+ int op;
+ int version;
+
+ sieve_bytecode_t *bc_cur = exe->bc_cur;
+ bytecode_input_t *bc = (bytecode_input_t *) bc_cur->data;
+ unsigned int ip = 0, ip_max = (bc_cur->len/sizeof(bytecode_input_t));
+
+ if (bc_cur->is_executing) {
+ *errmsg = "Recursive Include";
+ return SIEVE_RUN_ERROR;
+ }
+ bc_cur->is_executing = 1;
+
+ /* Check that we
+ * a) have bytecode
+ * b) it is atleast long enough for the magic number, the version
+ * and one opcode */
+ if(!bc) return SIEVE_FAIL;
+ if(bc_cur->len < (BYTECODE_MAGIC_LEN + 2*sizeof(bytecode_input_t)))
+ return SIEVE_FAIL;
+
+ if(memcmp(bc, BYTECODE_MAGIC, BYTECODE_MAGIC_LEN)) {
+ *errmsg = "Not a bytecode file";
+ return SIEVE_FAIL;
+ }
+
+ ip = BYTECODE_MAGIC_LEN / sizeof(bytecode_input_t);
+
+ version= ntohl(bc[ip].op);
+
+ /* this is because there was a time where integers were not network byte
+ order. all the scripts written then would have version 0x01 written
+ in host byte order.*/
+
+ if(version == ntohl(1)) {
+ if(errmsg) {
+ *errmsg =
+ "Incorrect Bytecode Version, please recompile (use sievec)";
+
+ }
+ return SIEVE_FAIL;
+ }
+
+ if((version < BYTECODE_MIN_VERSION) || (version > BYTECODE_VERSION)) {
+ if(errmsg) {
+ *errmsg =
+ "Incorrect Bytecode Version, please recompile (use sievec)";
+ }
+ return SIEVE_FAIL;
+ }
+
+#if VERBOSE
+ printf("version number %d\n",version);
+#endif
+
+ for(ip++; ip<ip_max; ) {
+ int copy = 0;
+
+ op=ntohl(bc[ip].op);
+ switch(op) {
+ case B_STOP:/*0*/
+ res=1;
+ break;
+
+ case B_KEEP:/*1*/
+ res = do_keep(actions, imapflags);
+ if (res == SIEVE_RUN_ERROR)
+ *errmsg = "Keep can not be used with Reject";
+ ip++;
+ break;
+
+ case B_DISCARD:/*2*/
+ res=do_discard(actions);
+ ip++;
+ break;
+
+ case B_REJECT:/*3*/
+ ip = unwrap_string(bc, ip+1, &data, NULL);
+
+ res = do_reject(actions, data);
+
+ if (res == SIEVE_RUN_ERROR)
+ *errmsg = "Reject can not be used with any other action";
+
+ break;
+
+ case B_FILEINTO:/*19*/
+ copy = ntohl(bc[ip+1].value);
+ ip+=1;
+
+ case B_FILEINTO_ORIG:/*4*/
+ {
+ ip = unwrap_string(bc, ip+1, &data, NULL);
+
+ res = do_fileinto(actions, data, !copy, imapflags);
+
+ if (res == SIEVE_RUN_ERROR)
+ *errmsg = "Fileinto can not be used with Reject";
+
+ break;
+ }
+
+ case B_REDIRECT:/*20*/
+ copy = ntohl(bc[ip+1].value);
+ ip+=1;
+
+ case B_REDIRECT_ORIG:/*5*/
+ {
+ ip = unwrap_string(bc, ip+1, &data, NULL);
+
+ res = do_redirect(actions, data, !copy);
+
+ if (res == SIEVE_RUN_ERROR)
+ *errmsg = "Redirect can not be used with Reject";
+
+ break;
+ }
+
+ case B_IF:/*6*/
+ {
+ int testend=ntohl(bc[ip+1].value);
+ int result;
+
+ ip+=2;
+ result=eval_bc_test(i, body_cache, m, bc, &ip);
+
+ if (result<0) {
+ *errmsg = "Invalid test";
+ return SIEVE_FAIL;
+ } else if (result) {
+ /*skip over jump instruction*/
+ testend+=2;
+ }
+ ip=testend;
+
+ break;
+ }
+
+ case B_MARK:/*8*/
+ res = do_mark(actions);
+ ip++;
+ break;
+
+ case B_UNMARK:/*9*/
+ res = do_unmark(actions);
+ ip++;
+ break;
+
+ case B_ADDFLAG:/*10*/
+ {
+ int x;
+ int list_len=ntohl(bc[ip+1].len);
+
+ ip+=3; /* skip opcode, list_len, and list data len */
+
+ for (x=0; x<list_len; x++) {
+ ip = unwrap_string(bc, ip, &data, NULL);
+
+ res = do_addflag(actions, data);
+
+ if (res == SIEVE_RUN_ERROR)
+ *errmsg = "addflag can not be used with Reject";
+ }
+ break;
+ }
+
+ case B_SETFLAG:
+ {
+ int x;
+ int list_len=ntohl(bc[ip+1].len);
+
+ ip+=3; /* skip opcode, list_len, and list data len */
+
+ ip = unwrap_string(bc, ip, &data, NULL);
+
+ res = do_setflag(actions, data);
+
+ if (res == SIEVE_RUN_ERROR) {
+ *errmsg = "setflag can not be used with Reject";
+ } else {
+ for (x=1; x<list_len; x++) {
+ ip = unwrap_string(bc, ip, &data, NULL);
+
+ res = do_addflag(actions, data);
+
+ if (res == SIEVE_RUN_ERROR)
+ *errmsg = "setflag can not be used with Reject";
+ }
+ }
+
+ break;
+ }
+
+ case B_REMOVEFLAG:
+ {
+ int x;
+ int list_len=ntohl(bc[ip+1].len);
+
+ ip+=3; /* skip opcode, list_len, and list data len */
+
+ for (x=0; x<list_len; x++) {
+ ip = unwrap_string(bc, ip, &data, NULL);
+
+ res = do_removeflag(actions, data);
+
+ if (res == SIEVE_RUN_ERROR)
+ *errmsg = "removeflag can not be used with Reject";
+ }
+ break;
+ }
+
+ case B_NOTIFY:
+ {
+ const char * id;
+ const char * method;
+ const char **options = NULL;
+ const char *priority = NULL;
+ const char * message;
+ int pri;
+
+ ip++;
+
+ /* method */
+ ip = unwrap_string(bc, ip, &method, NULL);
+
+ /* id */
+ ip = unwrap_string(bc, ip, &id, NULL);
+
+ /*options*/
+ options=bc_makeArray(bc, &ip);
+
+ /* priority */
+ pri=ntohl(bc[ip].value);
+ ip++;
+
+ switch (pri)
+ {
+ case B_LOW:
+ priority="low";
+ case B_NORMAL:
+ priority="normal";
+ break;
+ case B_HIGH:
+ priority="high";
+ break;
+ case B_ANY:
+ priority="any";
+ break;
+ default:
+ res=SIEVE_RUN_ERROR;
+ }
+
+ /* message */
+ ip = unwrap_string(bc, ip, &message, NULL);
+
+ res = do_notify(notify_list, id, method, options,
+ priority, message);
+
+ break;
+ }
+ case B_DENOTIFY:
+ {
+ /*
+ * i really have no idea what the count matchtype should do here.
+ * the sanest thing would be to use 1.
+ * however that would require passing on the match type to do_notify.
+ * -jsmith2
+ */
+
+ comparator_t *comp = NULL;
+
+ const char *pattern;
+ regex_t *reg;
+
+ const char *priority = NULL;
+ void *comprock = NULL;
+
+ int comparator;
+ int pri;
+
+ ip++;
+ pri=ntohl(bc[ip].value);
+ ip++;
+
+ switch (pri)
+ {
+ case B_LOW:
+ priority="low";
+ case B_NORMAL:
+ priority="normal";
+ break;
+ case B_HIGH:
+ priority="high";
+ break;
+ case B_ANY:
+ priority="any";
+ break;
+ default:
+ res=SIEVE_RUN_ERROR;
+ }
+
+ if(res == SIEVE_RUN_ERROR)
+ break;
+
+ comparator =ntohl( bc[ip].value);
+ ip++;
+
+ if (comparator == B_ANY)
+ {
+ ip++;/* skip placeholder this has no comparator function */
+ comp=NULL;
+ } else {
+ int x= ntohl(bc[ip].value);
+ ip++;
+
+ comp=lookup_comp(B_ASCIICASEMAP,comparator,
+ x, &comprock);
+ }
+
+ ip = unwrap_string(bc, ip, &pattern, NULL);
+
+ if (comparator == B_REGEX)
+ {
+ char errmsg[1024]; /* Basically unused */
+
+ reg=bc_compile_regex(pattern,
+ REG_EXTENDED | REG_NOSUB | REG_ICASE,
+ errmsg, sizeof(errmsg));
+ if (!reg) {
+ res = SIEVE_RUN_ERROR;
+ } else {
+ res = do_denotify(notify_list, comp, reg,
+ comprock, priority);
+ free(reg);
+ }
+ } else {
+ res = do_denotify(notify_list, comp, pattern,
+ comprock, priority);
+ }
+
+ break;
+ }
+ case B_VACATION:
+ {
+ int respond;
+ char *fromaddr = NULL; /* relative to message we send */
+ char *toaddr = NULL; /* relative to message we send */
+ char *handle = NULL;
+ const char *message = NULL;
+ int days, mime;
+ char buf[128];
+ char subject[1024];
+ int x;
+
+ ip++;
+
+ x=ntohl( bc[ip].len);
+
+ respond=shouldRespond(m, i, x, bc, ip+2,
+ &fromaddr, &toaddr);
+
+ ip=(ntohl(bc[ip+1].value)/4);
+ if (respond==SIEVE_OK)
+ {
+ ip = unwrap_string(bc, ip, &data, NULL);
+
+ if (!data)
+ {
+ /* we have to generate a subject */
+ const char **s;
+ strlcpy(buf, "subject", sizeof(buf));
+ if (i->getheader(m, buf, &s) != SIEVE_OK ||
+ s[0] == NULL) {
+ strlcpy(subject, "Automated reply", sizeof(subject));
+ } else {
+ /* s[0] contains the original subject */
+ const char *origsubj = s[0];
+
+ snprintf(subject, sizeof(subject), "Auto: %s", origsubj);
+ }
+ } else {
+ /* user specified subject */
+ strlcpy(subject, data, sizeof(subject));
+ }
+
+ ip = unwrap_string(bc, ip, &message, NULL);
+
+ days = ntohl(bc[ip].value);
+ mime = ntohl(bc[ip+1].value);
+
+ ip+=2;
+
+ if (version >= 0x05) {
+ ip = unwrap_string(bc, ip, &data, NULL);
+
+ if (data) {
+ /* user specified from address */
+ free(fromaddr);
+ fromaddr = xstrdup(data);
+ }
+
+ ip = unwrap_string(bc, ip, &data, NULL);
+
+ if (data) {
+ /* user specified handle */
+ handle = data;
+ }
+ }
+
+ res = do_vacation(actions, toaddr, fromaddr, xstrdup(subject),
+ message, days, mime, handle);
+
+ if (res == SIEVE_RUN_ERROR)
+ *errmsg = "Vacation can not be used with Reject or Vacation";
+ } else if (respond == SIEVE_DONE) {
+ /* skip subject and message */
+
+ ip = unwrap_string(bc, ip, &data, NULL);
+ ip = unwrap_string(bc, ip, &data, NULL);
+
+ ip+=2;/*skip days and mime flag*/
+
+ if (version >= 0x05) {
+ /* skip from and handle */
+ ip = unwrap_string(bc, ip, &data, NULL);
+ ip = unwrap_string(bc, ip, &data, NULL);
+ }
+ } else {
+ res = SIEVE_RUN_ERROR; /* something is bad */
+ }
+
+ break;
+ }
+ case B_NULL:/*15*/
+ ip++;
+ break;
+
+ case B_JUMP:/*16*/
+ ip= ntohl(bc[ip+1].jump);
+ break;
+
+ case B_INCLUDE:/*17*/
+ {
+ int isglobal = (ntohl(bc[ip+1].value) == B_GLOBAL);
+ char fpath[4096];
+
+ ip = unwrap_string(bc, ip+2, &data, NULL);
+
+ res = i->getinclude(sc, data, isglobal, fpath, sizeof(fpath));
+ if (res != SIEVE_OK)
+ *errmsg = "Include can not find script";
+
+ if (!res) {
+ res = sieve_script_load(fpath, &exe);
+ if (res != SIEVE_OK)
+ *errmsg = "Include can not load script";
+ }
+
+ if (!res)
+ res = sieve_eval_bc(exe, 1, i, body_cache,
+ sc, m, imapflags, actions,
+ notify_list, errmsg);
+
+ break;
+ }
+
+ case B_RETURN:/*18*/
+ if (is_incl)
+ goto done;
+ else
+ res=1;
+ break;
+
+ default:
+ if(errmsg) *errmsg = "Invalid sieve bytecode";
+ return SIEVE_FAIL;
+ }
+
+ if (res) /* we've either encountered an error or a stop */
+ break;
+ }
+
+ done:
+ bc_cur->is_executing = 0;
+
+ return res;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_generate.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_generate.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_generate.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bc_generate.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,808 @@
+/* bc_generate.c -- sieve bytecode- almost flattened bytecode
+ * Rob Siemborski
+ * $Id: bc_generate.c,v 1.2.2.6 2005/10/05 15:56:22 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 2001 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "xmalloc.h"
+#include "sieve_interface.h"
+
+#include "script.h"
+#include "tree.h"
+#include "sieve.h"
+
+#include "bytecode.h"
+
+#include <assert.h>
+#include <string.h>
+
+
+
+struct bytecode_info
+{
+ bytecode_t *data;/* pointer to almost-flat bytecode */
+ size_t scriptend; /* used by emit code to know final length of bytecode */
+ size_t reallen; /* allocated length of 'data' */
+};
+
+static int bc_test_generate(int codep, bytecode_info_t *retval, test_t *t);
+
+/* returns false if the request can't be satisfied, true if it can. */
+
+static int atleast(bytecode_info_t *arr, size_t len)
+{
+ if(arr->reallen < len) {
+ /* too small; double if that's big enough, otherwise increase to the
+ requested size. */
+ arr->reallen = (len > arr->reallen * 2 ? len : arr->reallen * 2);
+ arr->data = xrealloc(arr->data, arr->reallen*sizeof(bytecode_t));
+ if(!arr->data)
+ { /* out of memory? */
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+/*
+ * functions of the form bc_XXX_generate have the following properties:
+ * on success they return an int that corresponds to the next empty location
+ * for code, and on failure they return -1.
+ *
+ * they will take a bytecode_info_t as a parameter and modify it by
+ * making it larger and adding more bytecommands in the pass 1 form
+ */
+
+/* given a location and a string list, compile it into almost-flat form.
+ * <list len> <string len><string ptr><string len><string ptr> etc... */
+static int bc_stringlist_generate(int codep, bytecode_info_t *retval,
+ stringlist_t *sl)
+{
+ int len_codep = codep;
+ int strcount = 0;
+ stringlist_t *cur;
+
+ codep++;
+
+ /* Bounds check the string list length */
+ if(!atleast(retval,codep+1))
+ return -1;
+
+ for(cur=sl; cur; cur=cur->next)
+ {
+ strcount++;
+ assert((cur->s)!=NULL);
+
+ /* Bounds check for each string before we allocate it */
+ if(!atleast(retval,codep+2))
+ return -1;
+
+ retval->data[codep++].len = strlen(cur->s);
+ retval->data[codep++].str = cur->s;
+ }
+
+ retval->data[len_codep].listlen = strcount;
+ return codep;
+}
+
+
+/* write a list of tests into almost-flat form, starting at codep.
+ * returns the next code location, -1 on error. */
+
+/* <list len> <next test ptr> <test ...> <next test ptr> <test ...> ... */
+static int bc_testlist_generate(int codep, bytecode_info_t *retval,
+ testlist_t *tl)
+{
+ int len_codep = codep;
+ int testcount = 0;
+ testlist_t *cur;
+
+ codep++;
+
+ /* Bounds check the test list length */
+ if(!atleast(retval,codep+1))
+ return -1;
+
+ for(cur=tl; cur; cur=cur->next) {
+ int oldcodep = codep;
+
+ /* Make room for tail marker */
+ if(!atleast(retval,codep+1))
+ return -1;
+
+ testcount++;
+ codep = bc_test_generate(codep+1, retval, cur->t);
+
+ retval->data[oldcodep].jump = codep;
+ }
+
+ retval->data[len_codep].listlen = testcount;
+
+ return codep;
+}
+/* output a relation into almost-flat form at codep.
+ * returns new codep on success, -1 on failure. */
+static int bc_relation_generate(int codep, bytecode_info_t *retval, int relat)
+{
+ if (!atleast(retval, codep + 1)) return -1;
+ switch (relat)
+ {
+ case GT:
+ retval->data[codep++].value= B_GT;
+ break;
+ case GE:
+ retval->data[codep++].value= B_GE;
+ break;
+ case LT:
+ retval->data[codep++].value= B_LT;
+ break;
+ case LE:
+ retval->data[codep++].value= B_LE;
+ break;
+ case EQ:
+ retval->data[codep++].value= B_EQ;
+ break;
+ case NE:
+ retval->data[codep++].value= B_NE;
+ break;
+ default:
+ /* comparator has no relational field */
+ retval->data[codep++].value= -1;
+ break;
+ }
+ return codep;
+}
+/* writes a single comparator into almost-flat form starting at codep.
+ * will always write out 3 words
+ * returns the next code location or -1 on error. */
+static int bc_comparator_generate(int codep, bytecode_info_t *retval,
+ int comptag, int relat,
+ const char *comparator)
+{
+ assert(retval != NULL);
+
+ /* comptag */
+ if (!atleast(retval, codep + 1)) return -1;
+
+ switch (comptag) {
+ case IS:
+ retval->data[codep++].value = B_IS;
+ break;
+ case CONTAINS:
+ retval->data[codep++].value = B_CONTAINS;
+ break;
+ case MATCHES:
+ retval->data[codep++].value = B_MATCHES;
+ break;
+#ifdef ENABLE_REGEX
+ case REGEX:
+ retval->data[codep++].value = B_REGEX;
+ break;
+#endif
+ case COUNT:
+ retval->data[codep++].value = B_COUNT;
+ break;
+ case VALUE:
+ retval->data[codep++].value = B_VALUE;
+ break;
+
+ default:
+ return -1;
+ }
+
+ /*relation*/
+ codep = bc_relation_generate(codep, retval, relat);
+
+ /* comparator (value specified with :comparator) */
+ if (!atleast(retval, codep + 1)) return -1;
+
+ /* xxx perhaps extend comparator.h to have
+ lookup_comp return an index, and then
+ lookup_by_index return the actual comparator?
+
+ we can then eliminate the comptag above, too. */
+
+ if (!strcmp (comparator, "i;octet"))
+ retval->data[codep++].value = B_OCTET;
+ else if (!strcmp (comparator, "i;ascii-casemap"))
+ retval->data[codep++].value = B_ASCIICASEMAP;
+ else if (!strcmp (comparator, "i;ascii-numeric"))
+ retval->data[codep++].value = B_ASCIINUMERIC;
+
+ return codep;
+}
+
+
+
+/* writes a single test into almost-flat form starting at codep.
+ * returns the next code location or -1 on error. */
+static int bc_test_generate(int codep, bytecode_info_t *retval, test_t *t)
+{
+ if(!retval) return -1;
+ switch(t->type) {
+ case STRUE: /* BC_TRUE */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = BC_TRUE;
+ break;
+ case SFALSE:/* BC_FALSE */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = BC_FALSE;
+ break;
+ case NOT: /* BC_NOT {subtest : test} */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = BC_NOT;
+ codep = bc_test_generate(codep, retval, t->u.t);
+ if (codep == -1) return -1;
+ break;
+ case SIZE: /* BC_SIZE (B_OVER | B_UNDER) {size : int} */
+ if(!atleast(retval,codep+3)) return -1;
+ retval->data[codep++].op = BC_SIZE;
+ retval->data[codep++].value = (t->u.sz.t == OVER
+ ? B_OVER : B_UNDER);
+ retval->data[codep++].value = t->u.sz.n;
+ break;
+ case EXISTS:/* BC_EXISTS { headers : string list } */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = BC_EXISTS;
+ codep= bc_stringlist_generate(codep, retval, t->u.sl);
+ break;
+ case ANYOF:/* BC_ANYOF { tests : test list } */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = BC_ANYOF;
+ codep=bc_testlist_generate(codep, retval, t->u.tl);
+ if (codep == -1) return -1;
+ break;
+ case ALLOF: /* BC_ALLOF { tests : test list } */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = BC_ALLOF;
+ codep= bc_testlist_generate(codep, retval, t->u.tl);
+ if (codep == -1) return -1;
+ break;
+ case HEADER:
+ /* BC_HEADER { c: comparator } { headers : string list }
+ { patterns : string list }
+ */
+
+ if(!atleast(retval,codep + 1)) return -1;
+ retval->data[codep++].op = BC_HEADER;
+
+ /* comparator */
+ codep = bc_comparator_generate(codep, retval,
+ t->u.h.comptag,
+ t->u.h.relation,
+ t->u.h.comparator);
+ if (codep == -1) return -1;
+
+ /* headers */
+ codep = bc_stringlist_generate(codep, retval, t->u.h.sl);
+ if (codep == -1) return -1;
+
+ /* pattern */
+ codep = bc_stringlist_generate(codep, retval, t->u.h.pl);
+ if (codep == -1) return -1;
+ break;
+ case ADDRESS:
+ case ENVELOPE:
+ /* (BC_ADDRESS | BC_ENVELOPE) {c : comparator}
+ (B_ALL | B_LOCALPART | ...) { header : string list }
+ { pattern : string list } */
+
+ if(!atleast(retval,codep+1)) return -1;
+
+ retval->data[codep++].op = (t->type == ADDRESS)
+ ? BC_ADDRESS : BC_ENVELOPE;
+
+ codep = bc_comparator_generate(codep, retval,t->u.ae.comptag,
+ t->u.ae.relation,
+ t->u.ae.comparator);
+ if (codep == -1) return -1;
+
+ if(!atleast(retval,codep+1)) return -1;
+
+ /*address part*/
+ switch(t->u.ae.addrpart) {
+ case ALL:
+ retval->data[codep++].value = B_ALL;
+ break;
+ case LOCALPART:
+ retval->data[codep++].value = B_LOCALPART;
+ break;
+ case DOMAIN:
+ retval->data[codep++].value = B_DOMAIN;
+ break;
+ case USER:
+ retval->data[codep++].value = B_USER;
+ break;
+ case DETAIL:
+ retval->data[codep++].value = B_DETAIL;
+ break;
+ default:
+ return -1;
+ }
+
+ /*headers*/
+ codep = bc_stringlist_generate(codep, retval, t->u.ae.sl);
+ if (codep == -1) return -1;
+
+ /*patterns*/
+ codep = bc_stringlist_generate(codep, retval, t->u.ae.pl);
+ if (codep == -1) return -1;
+
+ break;
+ case BODY:
+ /* BC_BODY {c : comparator} (B_RAW | B_TEXT | ...)
+ { content-types : stringlist }
+ { offset : int }
+ { pattern : string list } */
+
+ if(!atleast(retval,codep+1)) return -1;
+
+ retval->data[codep++].op = BC_BODY;
+
+ codep = bc_comparator_generate(codep, retval,t->u.b.comptag,
+ t->u.b.relation,
+ t->u.b.comparator);
+ if (codep == -1) return -1;
+
+ if(!atleast(retval,codep+2)) return -1;
+
+ /*transform*/
+ switch(t->u.b.transform) {
+ case RAW:
+ retval->data[codep++].value = B_RAW;
+ break;
+ case TEXT:
+ retval->data[codep++].value = B_TEXT;
+ break;
+ case CONTENT:
+ retval->data[codep++].value = B_CONTENT;
+ break;
+ default:
+ return -1;
+ }
+
+ /*offset*/
+ retval->data[codep++].value = t->u.b.offset;
+
+ /*content-types*/
+ codep = bc_stringlist_generate(codep, retval, t->u.b.content_types);
+ if (codep == -1) return -1;
+
+ /*patterns*/
+ codep = bc_stringlist_generate(codep, retval, t->u.b.pl);
+ if (codep == -1) return -1;
+
+ break;
+ default:
+ return -1;
+
+ }
+ return codep;
+}
+
+
+/* generate a not-quite-flattened bytecode */
+/* returns address of next instruction or -1 on error*/
+/* needs current instruction, buffer for the code, and a current parse tree */
+/* sieve is cool because everything is immediate! */
+static int bc_action_generate(int codep, bytecode_info_t *retval,
+ commandlist_t *c)
+{
+ int jumploc,baseloc;
+
+ if(!retval) return -1;
+ if (c==NULL)
+ {
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_NULL;
+ }
+ else
+ {
+ do {
+ switch(c->type) {
+ case STOP:
+ /* STOP (no arguments) */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_STOP;
+ break;
+ case DISCARD:
+ /* DISCARD (no arguments) */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_DISCARD;
+ break;
+ case KEEP:
+ /* KEEP (no arguments) */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_KEEP;
+ break;
+ case MARK:
+ /* MARK (no arguments) */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_MARK;
+ break;
+ case UNMARK:
+ /* UNMARK (no arguments) */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_UNMARK;
+ break;
+
+ case RETURN:
+ /* RETURN (no arguments) */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_RETURN;
+ break;
+
+ case DENOTIFY:
+ /* DENOTIFY */
+ if(!atleast(retval,codep+6)) return -1;
+ retval->data[codep++].op = B_DENOTIFY;
+ switch(c->u.d.priority) {
+ case LOW:
+ retval->data[codep++].value = B_LOW;
+ break;
+ case NORMAL:
+ retval->data[codep++].value = B_NORMAL;
+ break;
+ case HIGH:
+ retval->data[codep++].value = B_HIGH;
+ break;
+ case ANY:
+ retval->data[codep++].value = B_ANY;
+ break;
+ default:
+ return -1;
+ }
+ switch(c->u.d.comptag) {
+ case IS:
+ retval->data[codep++].value = B_IS;
+ break;
+ case CONTAINS:
+ retval->data[codep++].value = B_CONTAINS;
+ break;
+ case MATCHES:
+ retval->data[codep++].value = B_MATCHES;
+ break;
+#ifdef ENABLE_REGEX
+ case REGEX:
+ retval->data[codep++].value = B_REGEX;
+ break;
+#endif
+ case ANY:
+ retval->data[codep++].value = B_ANY;
+ break;
+ default:
+ return -1;
+ }
+ codep = bc_relation_generate(codep, retval, c->u.d.relation);
+
+ if(c->u.d.pattern)
+ {
+ retval->data[codep++].len = strlen(c->u.d.pattern);
+ retval->data[codep++].str = c->u.d.pattern;
+ } else {
+ retval->data[codep++].len = -1;
+ retval->data[codep++].str = NULL;
+ }
+
+ break;
+ case REJCT:
+ /* REJECT (STRING: len + dataptr) */
+ if(!atleast(retval,codep+3)) return -1;
+ retval->data[codep++].op = B_REJECT;
+ retval->data[codep++].len = strlen(c->u.str);
+ retval->data[codep++].str = c->u.str;
+ break;
+ case FILEINTO:
+ /* FILEINTO
+ VALUE copy
+ STRING folder
+ */
+ if(!atleast(retval,codep+4)) return -1;
+ retval->data[codep++].op = B_FILEINTO;
+ retval->data[codep++].value = c->u.f.copy;
+ retval->data[codep++].len = strlen(c->u.f.folder);
+ retval->data[codep++].str = c->u.f.folder;
+ break;
+ case REDIRECT:
+ /* REDIRECT
+ VALUE copy
+ STRING address
+ */
+ if(!atleast(retval,codep+4)) return -1;
+ retval->data[codep++].op = B_REDIRECT;
+ retval->data[codep++].value = c->u.r.copy;
+ retval->data[codep++].len = strlen(c->u.r.address);
+ retval->data[codep++].str = c->u.r.address;
+ break;
+ case ADDFLAG:
+ /* ADDFLAG stringlist */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_ADDFLAG;
+ codep = bc_stringlist_generate(codep,retval,c->u.sl);
+
+ if(codep == -1) return -1;
+ break;
+ case SETFLAG:
+ /* SETFLAG stringlist */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_SETFLAG;
+ codep = bc_stringlist_generate(codep,retval,c->u.sl);
+
+ if(codep == -1) return -1;
+ break;
+ case REMOVEFLAG:
+ /* REMOVEFLAG stringlist */
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_REMOVEFLAG;
+ codep = bc_stringlist_generate(codep,retval,c->u.sl);
+
+ if(codep == -1) return -1;
+ break;
+ case NOTIFY:
+ /* NOTIFY
+ (STRING: len + dataptr)
+ (STRING: len + dataptr)
+ stringlist
+ (STRING: len + dataptr)
+ (STRING: len + dataptr)
+ method/id /options list/priority/message
+ */
+
+ if(!atleast(retval,codep+5)) return -1;
+ retval->data[codep++].op = B_NOTIFY;
+
+ retval->data[codep++].len = strlen(c->u.n.method);
+ retval->data[codep++].str = c->u.n.method;
+
+ if (c->u.n.id)
+ {
+ retval->data[codep++].len = strlen(c->u.n.id);
+ retval->data[codep++].str = c->u.n.id;
+ }
+ else
+ {
+ retval->data[codep++].len = -1;
+ retval->data[codep++].str = NULL;
+ }
+
+ codep = bc_stringlist_generate(codep,retval,c->u.n.options);
+ if(codep == -1) return -1;
+
+ if(!atleast(retval,codep+3)) return -1;
+
+ switch(c->u.n.priority) {
+ case LOW:
+ retval->data[codep++].value = B_LOW;
+ break;
+ case NORMAL:
+ retval->data[codep++].value = B_NORMAL;
+ break;
+ case HIGH:
+ retval->data[codep++].value = B_HIGH;
+ break;
+ case ANY:
+ retval->data[codep++].value = B_ANY;
+ break;
+ default:
+ return -1;
+ }
+
+ retval->data[codep++].len = strlen(c->u.n.message);
+ retval->data[codep++].str = c->u.n.message;
+ break;
+ case VACATION:
+ /* VACATION
+ STRINGLIST addresses
+ STRING subject (if len is -1, then subject was NULL)
+ STRING message (again, len == -1 means message was NULL)
+ VALUE days
+ VALUE mime
+ STRING from (if len is -1, then from was NULL)
+ STRING handle (again, len == -1 means handle was NULL)
+ */
+
+ if(!atleast(retval,codep+1)) return -1;
+ retval->data[codep++].op = B_VACATION;
+
+ codep = bc_stringlist_generate(codep,retval,c->u.v.addresses);
+ if (codep == -1) return -1;
+
+ if (!atleast(retval,codep+2)) return -1;
+ if(c->u.v.subject) {
+ retval->data[codep++].len = strlen(c->u.v.subject);
+ retval->data[codep++].str = c->u.v.subject;
+ } else {
+ retval->data[codep++].len = -1;
+ retval->data[codep++].str = NULL;
+ }
+
+ if (!atleast(retval,codep+2)) return -1;
+ if(c->u.v.message) {
+ retval->data[codep++].len = strlen(c->u.v.message);
+ retval->data[codep++].str = c->u.v.message;
+ } else {
+ retval->data[codep++].len = -1;
+ retval->data[codep++].str = NULL;
+ }
+
+ if (!atleast(retval,codep+2)) return -1;
+ retval->data[codep++].value = c->u.v.days;
+ retval->data[codep++].value = c->u.v.mime;
+
+ if (!atleast(retval,codep+2)) return -1;
+ if(c->u.v.from) {
+ retval->data[codep++].len = strlen(c->u.v.from);
+ retval->data[codep++].str = c->u.v.from;
+ } else {
+ retval->data[codep++].len = -1;
+ retval->data[codep++].str = NULL;
+ }
+
+ if (!atleast(retval,codep+2)) return -1;
+ if(c->u.v.handle) {
+ retval->data[codep++].len = strlen(c->u.v.handle);
+ retval->data[codep++].str = c->u.v.handle;
+ } else {
+ retval->data[codep++].len = -1;
+ retval->data[codep++].str = NULL;
+ }
+
+
+ if(codep == -1) return -1;
+ break;
+ case INCLUDE:
+ /* INCLUDE
+ VALUE location
+ STRING filename */
+ if(!atleast(retval,codep+4)) return -1;
+ retval->data[codep++].op = B_INCLUDE;
+
+ switch(c->u.inc.location) {
+ case PERSONAL:
+ retval->data[codep++].value = B_PERSONAL;
+ break;
+ case GLOBAL:
+ retval->data[codep++].value = B_GLOBAL;
+ break;
+ default:
+ return -1;
+ }
+
+ retval->data[codep++].len = strlen(c->u.inc.script);
+ retval->data[codep++].str = c->u.inc.script;
+ break;
+ case IF:
+ {
+ int jumpVal;
+ /* IF
+ (int: begin then block)
+ (int: end then block/begin else block)
+ (int:end else block) (-1 if no else block)
+ (test)
+ (then block)
+ (else block)(optional)
+ */
+ baseloc = codep;
+
+ /* Allocate operator + jump table offsets */
+ if(!atleast(retval,codep+4)) return -1;
+
+ jumploc = codep+4;
+ retval->data[codep++].op = B_IF;
+
+ /* begining of then code */
+ jumpVal= bc_test_generate(jumploc,retval,c->u.i.t);
+ if(jumpVal == -1)
+ return -1;
+ else {
+ retval->data[codep].jump = jumpVal;
+ codep++;
+ }
+
+ /* find then code and offset to else code,
+ * we want to write this code starting at the offset we
+ * just found */
+
+ jumpVal= bc_action_generate(jumpVal,retval, c->u.i.do_then);
+ if(jumpVal == -1)
+ return -1;
+ else
+ retval->data[codep].jump = jumpVal;
+
+ codep++;
+ /* write else code if its there*/
+ if(c->u.i.do_else) {
+
+ jumpVal= bc_action_generate(jumpVal,retval, c->u.i.do_else);
+ if(jumpVal == -1)
+ {
+ return -1;
+ } else
+ {
+ retval->data[codep].jump = jumpVal;
+ }
+
+ /* Update code pointer to end of else code */
+ codep = retval->data[codep].jump;
+ } else {
+ /*there is no else block, so its -1*/
+ retval->data[codep].jump = -1;
+ /* Update code pointer to end of then code */
+ codep = retval->data[codep-1].jump;
+ }
+
+ break;
+ }
+ default:
+ /* no such action known */
+ return -1;
+ }
+
+ /* generate from next command */
+ c = c->next;
+ } while(c);
+ }
+ /*scriptend may be updated before the end, but it will be updated at the end, which is what matters.*/
+ retval->scriptend=codep;
+ return codep;
+
+}
+
+
+
+/* Entry point to the bytecode emitter module */
+int sieve_generate_bytecode(bytecode_info_t **retval, sieve_script_t *s)
+{
+ commandlist_t *c;
+
+ if(!retval) return -1;
+ if(!s) return -1;
+ c = s->cmds;
+ /* if c is NULL, it is handled in bc_action_generate and a script
+ with only BC_NULL is returned
+ */
+
+
+ *retval = xmalloc(sizeof(bytecode_info_t));
+ if(!(*retval)) return -1;
+
+ memset(*retval, 0, sizeof(bytecode_info_t));
+
+ return bc_action_generate(0, *retval, c);
+}
+
+
+void sieve_free_bytecode(bytecode_info_t **p)
+{
+ if(!p || !*p) return;
+ if((*p)->data) free((*p)->data);
+ free(*p);
+ *p = NULL;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bytecode.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bytecode.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bytecode.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/bytecode.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,225 @@
+/* bytecode.h -- bytecode definition
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*****************************************************************/
+
+#ifndef SIEVE_BYTECODE_H
+#define SIEVE_BYTECODE_H
+
+
+/* for debugging*/
+#define DUMPCODE 0
+#define VERBOSE 0
+
+/*for finding correctly aligned bytes on strings*/
+/* bump to the next multiple of 4 bytes */
+#define ROUNDUP(num) (((num) + 3) & 0xFFFFFFFC)
+
+
+/* yes, lots of these are superfluous, it's for clarity */
+typedef union
+{
+ int op; /* OPTYPE */
+ int value;
+
+ int jump;
+
+ int listlen;
+
+ /* store strings (need 2 consecutive bytecodes) */
+ int len;
+ char *str;
+} bytecode_t;
+
+/* For sanity during input on 64-bit platforms.
+ * str should only be accessed as (char *)&str, but given the use of
+ * unwrap_string, this should be OK */
+typedef union
+{
+ int op; /* OPTYPE */
+ int value;
+
+ int jump;
+
+ int listlen;
+
+ /* store strings (need 2 consecutive bytecodes) */
+ int len;
+ int str;
+} bytecode_input_t;
+
+
+/* version 0x01 scripts were written in host byte order.
+ * we don't want to use this version number again and cause a mess
+ * this isn't a huge concern, since this is version ntohl(1), or 16777216
+ *
+ * version 0x02 scripts started using network byte order (recompile)
+ * version 0x03 scripts implemented short-circuiting of testlists (recompile)
+ * version 0x04 scripts implemented BODY, INCLUDE and COPY extensions
+ * version 0x05 scripts implemented updated VACATION (:from and :handle)
+ */
+#define BYTECODE_VERSION 0x05
+#define BYTECODE_MIN_VERSION 0x03 /* minimum supported version */
+#define BYTECODE_MAGIC "CyrSBytecode"
+#define BYTECODE_MAGIC_LEN 12 /* Should be multiple of 4 */
+
+/* IMPORTANT: To maintain forward compatibility of bytecode, please only add
+ * new instructions to the end of these enums. (The reason these values
+ * are all duplicated here is to avoid silliness if this caveat is forgotten
+ * about in the other tables.) */
+enum bytecode {
+ B_STOP,
+
+ B_KEEP,
+ B_DISCARD,
+ B_REJECT, /* require reject */
+ B_FILEINTO_ORIG, /* legacy fileinto w/o support for :copy */
+ B_REDIRECT_ORIG, /* legacy redirect w/o support for :copy */
+
+ B_IF,
+
+ B_MARK, /* require imapflags */
+ B_UNMARK, /* require imapflags */
+
+ B_ADDFLAG, /* require imapflags */
+ B_SETFLAG, /* require imapflags */
+ B_REMOVEFLAG, /* require imapflags */
+
+ B_NOTIFY, /* require notify */
+ B_DENOTIFY, /* require notify */
+
+ B_VACATION, /* require vacation */
+ B_NULL,
+ B_JUMP,
+
+ B_INCLUDE, /* require include */
+ B_RETURN, /* require include */
+
+ B_FILEINTO, /* require fileinto */
+ B_REDIRECT
+};
+
+enum bytecode_comps {
+ BC_FALSE,
+ BC_TRUE,
+ BC_NOT,
+ BC_EXISTS,
+ BC_SIZE,
+ BC_ANYOF,
+ BC_ALLOF,
+ BC_ADDRESS,
+ BC_ENVELOPE, /* require envelope */
+ BC_HEADER,
+ BC_BODY /* require body */
+};
+
+/* currently one enum so as to help determine where values are being misused.
+ * we have left placeholders incase we need to add more later to the middle */
+enum bytecode_tags {
+ /* Size Tests */
+ B_OVER,
+ B_UNDER,
+
+ B_SIZE_PLACEHOLDER_1,
+ B_SIZE_PLACEHOLDER_2,
+
+ /* Relational Match Types */
+ B_GT, /* require relational */
+ B_GE, /* require relational */
+ B_LT, /* require relational */
+ B_LE, /* require relational */
+ B_EQ, /* require relational */
+ B_NE, /* require relational */
+
+ B_RELATIONAL_PLACEHOLDER_1,
+ B_RELATIONAL_PLACEHOLDER_2,
+
+ /* Priorities */
+ B_LOW, /* require notify */
+ B_NORMAL, /* require notify */
+ B_HIGH, /* require notify */
+ B_ANY, /* require notify */
+
+ B_PRIORITY_PLACEHOLDER_1,
+ B_PRIORITY_PLACEHOLDER_2,
+ B_PRIORITY_PLACEHOLDER_3,
+ B_PRIORITY_PLACEHOLDER_4,
+
+ /* Address Parts */
+ B_ALL,
+ B_LOCALPART,
+ B_DOMAIN,
+ B_USER, /* require subaddress */
+ B_DETAIL, /* require subaddress */
+
+ B_ADDRESS_PLACEHOLDER_1,
+ B_ADDRESS_PLACEHOLDER_2,
+ B_ADDRESS_PLACEHOLDER_3,
+ B_ADDRESS_PLACEHOLDER_4,
+
+ /* Comparators */
+ B_ASCIICASEMAP,
+ B_OCTET,
+ B_ASCIINUMERIC, /* require comparator-i;ascii-numeric */
+
+ B_COMPARATOR_PLACEHOLDER_1,
+ B_COMPARATOR_PLACEHOLDER_2,
+ B_COMPARATOR_PLACEHOLDER_3,
+ B_COMPARATOR_PLACEHOLDER_4,
+
+ /* Match Types */
+ B_IS,
+ B_CONTAINS,
+ B_MATCHES,
+ B_REGEX, /* require regex */
+ B_COUNT, /* require relational */
+ B_VALUE, /* require relational */
+
+ B_MATCH_PLACEHOLDER_1,
+ B_MATCH_PLACEHOLDER_2,
+ B_MATCH_PLACEHOLDER_3,
+ B_MATCH_PLACEHOLDER_4,
+
+ /* Body Transforms */
+ B_RAW, /* require body */
+ B_TEXT, /* require body */
+ B_CONTENT, /* require body */
+
+ B_TRANSFORM_PLACEHOLDER_1,
+ B_TRANSFORM_PLACEHOLDER_2,
+ B_TRANSFORM_PLACEHOLDER_3,
+ B_TRANSFORM_PLACEHOLDER_4,
+ B_TRANSFORM_PLACEHOLDER_5,
+
+ /* Script locations */
+ B_PERSONAL, /* require include */
+ B_GLOBAL, /* require include */
+
+ B_LOCATION_PLACEHOLDER_1,
+ B_LOCATION_PLACEHOLDER_2,
+ B_LOCATION_PLACEHOLDER_3,
+ B_LOCATION_PLACEHOLDER_4
+
+};
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,476 @@
+/* comparator.c -- comparator functions
+ * Larry Greenfield
+ * Ken Murchison (rewritten to handle relational ops and non-terminated text)
+ * $Id: comparator.c,v 1.15.2.4 2005/05/08 14:31:00 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "comparator.h"
+#include "tree.h"
+#include "sieve.h"
+#include "bytecode.h"
+#include "xmalloc.h"
+
+/*!!! uses B_CONTAINS not CONTAINS, etc, only works with bytecode*/
+
+typedef int (*compare_t)(const void *, size_t, const void *);
+
+/* --- relational comparators --- */
+
+/* these are generic wrappers in which 'rock' is the compare function */
+
+static int rel_eq(const char *text, size_t tlen, const char *pat, void *rock)
+{
+ compare_t compar = (compare_t) rock;
+
+ return (compar(text, tlen, pat) == 0);
+}
+
+static int rel_ne(const char *text, size_t tlen, const char *pat, void *rock)
+{
+ compare_t compar = (compare_t) rock;
+
+ return (compar(text, tlen, pat) != 0);
+}
+
+static int rel_gt(const char *text, size_t tlen, const char *pat, void *rock)
+{
+ compare_t compar = (compare_t) rock;
+
+ return (compar(text, tlen, pat) > 0);
+}
+
+static int rel_ge(const char *text, size_t tlen, const char *pat, void *rock)
+{
+ compare_t compar = (compare_t) rock;
+
+ return (compar(text, tlen, pat) >= 0);
+}
+
+static int rel_lt(const char *text, size_t tlen, const char *pat, void *rock)
+{
+ compare_t compar = (compare_t) rock;
+
+ return (compar(text, tlen, pat) < 0);
+}
+
+static int rel_le(const char *text, size_t tlen, const char *pat, void *rock)
+{
+ compare_t compar = (compare_t) rock;
+
+ return (compar(text, tlen, pat) <= 0);
+}
+
+/* --- i;octet comparators --- */
+
+/* just compare the two; pat should be NULL terminated */
+static int octet_cmp_(const char *text, size_t tlen,
+ const char *pat, int casemap)
+{
+ size_t plen, sl, i;
+ int r = 0;
+
+ plen = strlen(pat);
+ sl = tlen < plen ? tlen : plen;
+
+ for (i = 0; !r && i < sl; i++) {
+ r = casemap ? toupper(text[i]) - toupper(pat[i]) : text[i] - pat[i];
+ }
+
+ if (r == 0)
+ return (tlen - plen);
+ else
+ return r;
+}
+
+static int octet_cmp(const char *text, size_t tlen, const char *pat)
+{
+ return octet_cmp_(text, tlen, pat, 0);
+}
+
+/* we implement boyer-moore for hell of it, since this is probably
+ not very useful for sieve */
+#if 0
+int boyer_moore(char *text, char *pat)
+{
+ int i, j; /* indexes */
+ int M = strlen(pat); /* length of pattern */
+ int N = strlen(text); /* length of text */
+ int skip[256]; /* table of how much to skip, based on each character */
+
+ /* initialize skip table */
+ for (i = 0; i < 256; i++)
+ skip[i] = M;
+ for (i = 0; i < M; i++)
+ skip[(int) pat[i]] = M-i-1;
+
+ /* look for pat in text */
+ i = j = M-1;
+ do {
+ if (pat[j] == text[i]) {
+ i--;
+ j--;
+ } else {
+ if (M-j > skip[(int) text[i]]) {
+ i = i + M - j;
+ } else {
+ i = i + skip[(int) text[i]];
+ }
+ j = M-1;
+ }
+ } while (!((j < 0) || (i >= N)));
+ /* i+1 is the position of the match if i < N */
+ return (i < N) ? 1 : 0;
+}
+#endif
+
+/* we do a brute force attack */
+static int octet_contains_(const char *text, size_t tlen,
+ const char *pat, int casemap)
+{
+ int N = tlen;
+ int M = strlen(pat);
+ int i, j;
+
+ i = 0, j = 0;
+ while ((j < M) && (i < N)) {
+ if ((text[i] == pat[j]) ||
+ (casemap && (toupper(text[i]) == toupper(pat[j])))) {
+ i++; j++;
+ } else {
+ i = i - j + 1;
+ j = 0;
+ }
+ }
+
+ return (j == M); /* we found a match! */
+}
+
+static int octet_contains(const char *text, size_t tlen, const char *pat,
+ void *rock __attribute__((unused)))
+{
+ return octet_contains_(text, tlen, pat, 0);
+}
+
+static int octet_matches_(const char *text, size_t tlen,
+ const char *pat, int casemap)
+{
+ const char *p;
+ const char *t;
+ char c;
+
+ t = text;
+ p = pat;
+ for (;;) {
+ if (*p == '\0') {
+ /* ran out of pattern */
+ return (!tlen);
+ }
+ c = *p++;
+ switch (c) {
+ case '?':
+ if (!tlen) {
+ return 0;
+ }
+ t++; tlen--;
+ break;
+ case '*':
+ while (*p == '*' || *p == '?') {
+ if (*p == '?') {
+ /* eat the character now */
+ if (!tlen) {
+ return 0;
+ }
+ t++; tlen--;
+ }
+ /* coalesce into a single wildcard */
+ p++;
+ }
+ if (*p == '\0') {
+ /* wildcard at end of string, any remaining text is ok */
+ return 1;
+ }
+
+ while (tlen) {
+ /* recurse */
+ if (octet_matches_(t, tlen, p, casemap)) return 1;
+ t++; tlen--;
+ }
+ case '\\':
+ p++;
+ /* falls through */
+ default:
+ if ((c == *t) || (casemap && (toupper(c) == toupper(*t)))) {
+ t++; tlen--;
+ } else {
+ /* literal char doesn't match */
+ return 0;
+ }
+ }
+ }
+ /* never reaches */
+ abort();
+}
+
+static int octet_matches(const char *text, size_t tlen, const char *pat,
+ void *rock __attribute__((unused)))
+{
+ return octet_matches_(text, tlen, pat, 0);
+}
+
+
+#ifdef ENABLE_REGEX
+static int octet_regex(const char *text, size_t tlen, const char *pat,
+ void *rock __attribute__((unused)))
+{
+ if (!text[tlen]) {
+ /* NUL-terminated string */
+ return (!regexec((regex_t *) pat, text, 0, NULL, 0));
+ }
+ else {
+ /* regexec() requires a NUL-terminated string */
+ char *buf = (char *) xstrndup(text, tlen);
+ int r = !regexec((regex_t *) pat, buf, 0, NULL, 0);
+ free(buf);
+ return r;
+ }
+}
+#endif
+
+
+/* --- i;ascii-casemap comparators --- */
+
+
+static int ascii_casemap_cmp(const char *text, size_t tlen, const char *pat)
+{
+ return octet_cmp_(text, tlen, pat, 1);
+}
+
+static int ascii_casemap_contains(const char *text, size_t tlen,
+ const char *pat,
+ void *rock __attribute__((unused)))
+{
+ return octet_contains_(text, tlen, pat, 1);
+}
+
+static int ascii_casemap_matches(const char *text, size_t tlen,
+ const char *pat,
+ void *rock __attribute__((unused)))
+{
+ return octet_matches_(text, tlen, pat, 1);
+}
+
+/* i;ascii-numeric; only supports relational tests
+ *
+ * A \ B number not-num
+ * number A ? B A < B
+ * not-num A > B A == B
+ */
+
+/* From RFC 2244:
+ *
+ * The i;ascii-numeric comparator interprets strings as decimal
+ * positive integers represented as US-ASCII digits. All values
+ * which do not begin with a US-ASCII digit are considered equal
+ * with an ordinal value higher than all non-NIL single-valued
+ * attributes. Otherwise, all US-ASCII digits (octet values
+ * 0x30 to 0x39) are interpreted starting from the beginning of
+ * the string to the first non-digit or the end of the string.
+ */
+
+static int ascii_numeric_cmp(const char *text, size_t tlen, const char *pat)
+{
+ unsigned text_digit_len;
+ unsigned pat_digit_len;
+
+ if (isdigit((int) *pat)) {
+ if (isdigit((int) *text)) {
+ /* Count how many digits each string has */
+ for (text_digit_len = 0;
+ tlen-- && isdigit((int) text[text_digit_len]);
+ text_digit_len++);
+ for (pat_digit_len = 0;
+ isdigit((int) pat[pat_digit_len]);
+ pat_digit_len++);
+
+ if (text_digit_len < pat_digit_len) {
+ /* Pad "text" with leading 0s */
+ while (pat_digit_len > text_digit_len) {
+ /* "text" can only be less or equal to "pat" */
+ if ('0' < *pat) {
+ return (-1);
+ }
+ pat++;
+ pat_digit_len--;
+ }
+ } else if (text_digit_len > pat_digit_len) {
+ /* Pad "pad" with leading 0s */
+ while (text_digit_len > pat_digit_len) {
+ /* "pad" can only be greater or equal to "text" */
+ if (*text > '0') {
+ return 1;
+ }
+ text++;
+ text_digit_len--;
+ }
+ }
+
+ /* CLAIM: If we here, we have two non-empty digital suffixes
+ of equal length */
+ while (text_digit_len > 0) {
+ if (*text < *pat) {
+ return -1;
+ } else if (*text > *pat) {
+ return 1;
+ }
+ /* Characters are equal, carry on */
+ text++;
+ pat++;
+ text_digit_len--;
+ }
+
+ return (0);
+ } else {
+ return 1;
+ }
+ } else if (isdigit((int) *text)) {
+ return -1;
+ } else {
+ return 0; /* both not digits */
+ }
+}
+
+static comparator_t *lookup_rel(int relation)
+{
+ comparator_t *ret;
+
+ ret = NULL;
+ switch (relation)
+ {
+ case B_EQ:
+ ret = &rel_eq;
+ break;
+ case B_NE:
+ ret = &rel_ne;
+ break;
+ case B_GT:
+ ret = &rel_gt;
+ break;
+ case B_GE:
+ ret = &rel_ge;
+ break;
+ case B_LT:
+ ret = &rel_lt;
+ break;
+ case B_LE:
+ ret = &rel_le;
+ }
+
+ return ret;
+}
+
+comparator_t *lookup_comp(int comp, int mode, int relation,
+ void **comprock)
+{
+ comparator_t *ret;
+
+ ret = NULL;
+ *comprock = NULL;
+#if VERBOSE
+ printf("comp%d mode%d relat%d \n", comp, mode, relation);
+#endif
+ switch (comp)
+ {
+ case B_OCTET:
+ switch (mode) {
+ case B_IS:
+ ret = &rel_eq;
+ *comprock = (void **) &octet_cmp;
+ break;
+ case B_CONTAINS:
+ ret = &octet_contains;
+ break;
+ case B_MATCHES:
+ ret = &octet_matches;
+ break;
+#ifdef ENABLE_REGEX
+ case B_REGEX:
+ ret = &octet_regex;
+ break;
+#endif
+ case B_VALUE:
+ ret = lookup_rel(relation);
+ *comprock = (void **) &octet_cmp;
+ break;
+ }
+ break; /*end of octet */
+ case B_ASCIICASEMAP:
+ switch (mode) {
+ case B_IS:
+ ret = &rel_eq;
+ *comprock = (void **) &ascii_casemap_cmp;
+ break;
+ case B_CONTAINS:
+ ret = &ascii_casemap_contains;
+ break;
+ case B_MATCHES:
+ ret = &ascii_casemap_matches;
+ break;
+#ifdef ENABLE_REGEX
+ case B_REGEX:
+ /* the ascii-casemap destinction is made during
+ the compilation of the regex in verify_regex() */
+ ret = &octet_regex;
+ break;
+#endif
+ case B_VALUE:
+ ret = lookup_rel(relation);
+ *comprock = &ascii_casemap_cmp;
+ break;
+ }
+ break;/*end of ascii casemap */
+ case B_ASCIINUMERIC:
+ switch (mode) {
+ case B_IS:
+ ret = &rel_eq;
+ *comprock = (void **) &ascii_numeric_cmp;
+ break;
+ case B_COUNT:
+ case B_VALUE:
+ ret = lookup_rel(relation);
+ *comprock = (void **) &ascii_numeric_cmp;
+ break;
+ }
+ break;
+ }
+ return ret;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/comparator.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,48 @@
+/* comparator.h
+ * Larry Greenfield
+ * $Id: comparator.h,v 1.11.2.1 2004/06/23 20:15:18 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifndef COMPARATOR_H
+#define COMPARATOR_H
+
+#ifdef ENABLE_REGEX
+#ifdef HAVE_RX
+#include <rxposix.h>
+#else
+#include <sys/types.h>
+#include <regex.h>
+#endif
+#endif
+
+/* compares pat to text; returns 1 if it's true, 0 otherwise
+ first arg is text, second arg is pat, third arg is rock */
+typedef int comparator_t(const char *, size_t, const char *, void *);
+
+/* returns a pointer to a comparator function given it's name */
+comparator_t *lookup_comp(int comp, int mode,
+ int relation, void **rock);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,262 @@
+/* interp.c -- sieve script interpretor builder
+ * Larry Greenfield
+ * $Id: interp.c,v 1.22.8.5 2005/03/12 03:30:11 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include "xmalloc.h"
+
+#include "sieve_interface.h"
+#include "interp.h"
+#include "libconfig.h"
+
+/* build a sieve interpretor */
+int sieve_interp_alloc(sieve_interp_t **interp, void *interp_context)
+{
+ sieve_interp_t *i;
+ static int initonce;
+
+ if (!initonce) {
+ initialize_siev_error_table();
+ initonce = 1;
+ }
+
+ *interp = NULL;
+ i = (sieve_interp_t *) xmalloc(sizeof(sieve_interp_t));
+ if (i == NULL) {
+ return SIEVE_NOMEM;
+ }
+
+ i->redirect = i->discard = i->reject = i->fileinto = i->keep = NULL;
+ i->getsize = NULL;
+ i->getheader = NULL;
+ i->getenvelope = NULL;
+ i->getbody = NULL;
+ i->getinclude = NULL;
+ i->vacation = NULL;
+ i->notify = NULL;
+
+ i->markflags = NULL;
+
+ i->interp_context = interp_context;
+ i->err = NULL;
+
+ *interp = i;
+ return SIEVE_OK;
+}
+
+const char *sieve_listextensions(sieve_interp_t *i)
+{
+ static int done = 0;
+ static char extensions[4096] = "";
+
+ if (!done++) {
+ unsigned long config_sieve_extensions =
+ config_getbitfield(IMAPOPT_SIEVE_EXTENSIONS);
+
+ /* add comparators */
+ strlcat(extensions, "comparator-i;ascii-numeric", sizeof(extensions));
+
+ /* add actions */
+ if (i->fileinto &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_FILEINTO))
+ strlcat(extensions, " fileinto", sizeof(extensions));
+ if (i->reject &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_REJECT))
+ strlcat(extensions, " reject", sizeof(extensions));
+ if (i->vacation &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_VACATION))
+ strlcat(extensions, " vacation", sizeof(extensions));
+ if (i->markflags &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_IMAPFLAGS))
+ strlcat(extensions, " imapflags", sizeof(extensions));
+ if (i->notify &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_NOTIFY))
+ strlcat(extensions, " notify", sizeof(extensions));
+ if (i->getinclude &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_INCLUDE))
+ strlcat(extensions, " include", sizeof(extensions));
+
+ /* add tests */
+ if (i->getenvelope &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_ENVELOPE))
+ strlcat(extensions, " envelope", sizeof(extensions));
+ if (i->getbody &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_BODY))
+ strlcat(extensions, " body", sizeof(extensions));
+
+ /* add match-types */
+ if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_RELATIONAL)
+ strlcat(extensions, " relational", sizeof(extensions));
+#ifdef ENABLE_REGEX
+ if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_REGEX)
+ strlcat(extensions, " regex", sizeof(extensions));
+#endif
+
+ /* add misc extensions */
+ if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_SUBADDRESS)
+ strlcat(extensions, " subaddress", sizeof(extensions));
+ if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_COPY)
+ strlcat(extensions, " copy", sizeof(extensions));
+ }
+
+ return extensions;
+}
+
+int sieve_interp_free(sieve_interp_t **interp)
+{
+ free(*interp);
+
+ return SIEVE_OK;
+}
+
+/* add the callbacks */
+int sieve_register_redirect(sieve_interp_t *interp, sieve_callback *f)
+{
+ interp->redirect = f;
+
+ return SIEVE_OK;
+}
+
+int sieve_register_discard(sieve_interp_t *interp, sieve_callback *f)
+{
+ interp->discard = f;
+
+ return SIEVE_OK;
+}
+
+int sieve_register_reject(sieve_interp_t *interp, sieve_callback *f)
+{
+ interp->reject = f;
+
+ return SIEVE_OK;
+}
+
+int sieve_register_fileinto(sieve_interp_t *interp, sieve_callback *f)
+{
+ interp->fileinto = f;
+
+ return SIEVE_OK;
+}
+
+int sieve_register_keep(sieve_interp_t *interp, sieve_callback *f)
+{
+ interp->keep = f;
+
+ return SIEVE_OK;
+}
+
+static char *default_markflags[] = { "\\flagged" };
+static sieve_imapflags_t default_mark = { default_markflags, 1 };
+
+int sieve_register_imapflags(sieve_interp_t *interp, sieve_imapflags_t *mark)
+{
+ interp->markflags =
+ (mark && mark->flag && mark->nflags) ? mark : &default_mark;
+
+ return SIEVE_OK;
+}
+
+int sieve_register_notify(sieve_interp_t *interp, sieve_callback *f)
+{
+ interp->notify = f;
+
+ return SIEVE_OK;
+}
+
+/* add the callbacks for messages. again, undefined if used after
+ sieve_script_parse */
+int sieve_register_size(sieve_interp_t *interp, sieve_get_size *f)
+{
+ interp->getsize = f;
+ return SIEVE_OK;
+}
+
+int sieve_register_header(sieve_interp_t *interp, sieve_get_header *f)
+{
+ interp->getheader = f;
+ return SIEVE_OK;
+}
+
+int sieve_register_envelope(sieve_interp_t *interp, sieve_get_envelope *f)
+{
+ interp->getenvelope = f;
+ return SIEVE_OK;
+}
+
+int sieve_register_include(sieve_interp_t *interp, sieve_get_include *f)
+{
+ interp->getinclude = f;
+ return SIEVE_OK;
+}
+
+int sieve_register_body(sieve_interp_t *interp, sieve_get_body *f)
+{
+ interp->getbody = f;
+ return SIEVE_OK;
+}
+
+int sieve_register_vacation(sieve_interp_t *interp, sieve_vacation_t *v)
+{
+ if (!interp->getenvelope) {
+ return SIEVE_NOT_FINALIZED; /* we need envelope for vacation! */
+ }
+
+ if (v->min_response == 0) v->min_response = 3;
+ if (v->max_response == 0) v->max_response = 90;
+ if (v->min_response < 0 || v->max_response < 7 || !v->autorespond
+ || !v->send_response) {
+ return SIEVE_FAIL;
+ }
+
+ interp->vacation = v;
+ return SIEVE_OK;
+}
+
+int sieve_register_parse_error(sieve_interp_t *interp, sieve_parse_error *f)
+{
+ interp->err = f;
+ return SIEVE_OK;
+}
+
+int sieve_register_execute_error(sieve_interp_t *interp, sieve_execute_error *f)
+{
+ interp->execute_err = f;
+ return SIEVE_OK;
+}
+
+int interp_verify(sieve_interp_t *i)
+{
+ if (i->redirect && i->keep && i->getsize && i->getheader) {
+ return SIEVE_OK;
+ } else {
+ return SIEVE_NOT_FINALIZED;
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/interp.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,58 @@
+/* interp.h -- interpretor definition
+ * Larry Greenfield
+ * $Id: interp.h,v 1.7.8.2 2004/07/16 14:37:43 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*****************************************************************/
+
+#ifndef SIEVE_INTERP_H
+#define SIEVE_INTERP_H
+
+#include "sieve_interface.h"
+
+struct sieve_interp {
+ /* standard callbacks for actions */
+ sieve_callback *redirect, *discard, *reject, *fileinto, *keep;
+ sieve_callback *notify;
+ sieve_vacation_t *vacation;
+
+ sieve_get_size *getsize;
+ sieve_get_header *getheader;
+ sieve_get_envelope *getenvelope;
+ sieve_get_body *getbody;
+ sieve_get_include *getinclude;
+
+ sieve_parse_error *err;
+
+ /* site-specific imapflags for mark/unmark */
+ sieve_imapflags_t *markflags;
+
+ sieve_execute_error *execute_err;
+
+ /* context to pass along */
+ void *interp_context;
+};
+
+int interp_verify(sieve_interp_t *interp);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,613 @@
+/* message.c -- message parsing functions
+ * Larry Greenfield
+ * $Id: message.c,v 1.27.2.6 2005/10/05 15:56:23 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+
+#include "md5global.h"
+#include "md5.h"
+#include "sieve_interface.h"
+#include "interp.h"
+#include "message.h"
+#include "parseaddr.h"
+#include "xmalloc.h"
+#include "util.h"
+
+/* reject message m with message msg
+ *
+ * incompatible with: fileinto, redirect
+ */
+int do_reject(action_list_t *a, const char *msg)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_FILEINTO ||
+ a->a == ACTION_KEEP ||
+ a->a == ACTION_REDIRECT ||
+ a->a == ACTION_REJECT ||
+ a->a == ACTION_VACATION ||
+ a->a == ACTION_SETFLAG ||
+ a->a == ACTION_ADDFLAG ||
+ a->a == ACTION_REMOVEFLAG ||
+ a->a == ACTION_MARK ||
+ a->a == ACTION_UNMARK
+ )
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_REJECT;
+ a->cancel_keep = 1;
+ a->u.rej.msg = msg;
+ b->next = a;
+ a->next = NULL;
+ return 0;
+}
+
+/* fileinto message m into mailbox
+ *
+ * incompatible with: reject
+ */
+int do_fileinto(action_list_t *a, const char *mbox, int cancel_keep,
+ sieve_imapflags_t *imapflags)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT)
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_FILEINTO;
+ a->cancel_keep = cancel_keep;
+ a->u.fil.mailbox = mbox;
+ a->u.fil.imapflags = imapflags;
+ b->next = a;
+ a->next = NULL;
+ return 0;
+}
+
+/* redirect message m to to addr
+ *
+ * incompatible with: reject
+ */
+int do_redirect(action_list_t *a, const char *addr, int cancel_keep)
+{
+ action_list_t *b = NULL;
+
+ /* xxx we should validate addr */
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT)
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_REDIRECT;
+ a->cancel_keep = cancel_keep;
+ a->u.red.addr = addr;
+ a->next = NULL;
+ b->next = a;
+ return 0;
+}
+
+/* keep message
+ *
+ * incompatible with: reject
+ */
+int do_keep(action_list_t *a, sieve_imapflags_t *imapflags)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT)
+ return SIEVE_RUN_ERROR;
+ if (a->a == ACTION_KEEP) /* don't bother doing it twice */
+ return 0;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_KEEP;
+ a->cancel_keep = 1;
+ a->u.keep.imapflags = imapflags;
+ a->next = NULL;
+ b->next = a;
+ return 0;
+}
+
+/* discard message m
+ *
+ * incompatible with: nothing---it doesn't cancel any actions
+ */
+int do_discard(action_list_t *a)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_DISCARD) /* don't bother doing twice */
+ return 0;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_DISCARD;
+ a->cancel_keep = 1;
+ a->next = NULL;
+ b->next = a;
+ return 0;
+}
+
+static int makehash(unsigned char hash[],
+ const char *s1, const char *s2, const char *s3)
+{
+ MD5_CTX ctx;
+
+ MD5Init(&ctx);
+ MD5Update(&ctx, s1, strlen(s1));
+ MD5Update(&ctx, s2, strlen(s2));
+ if (s3) MD5Update(&ctx, s3, strlen(s3));
+ MD5Final(hash, &ctx);
+
+ return SIEVE_OK;
+}
+
+int do_vacation(action_list_t *a, char *addr, char *fromaddr,
+ char *subj, const char *msg, int days,
+ int mime, char *handle)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT ||
+ a->a == ACTION_VACATION) /* vacation can't be used twice */
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_VACATION;
+ a->cancel_keep = 0;
+ a->u.vac.send.addr = addr;
+ a->u.vac.send.fromaddr = fromaddr;
+ a->u.vac.send.subj = subj; /* user specified subject */
+ a->u.vac.send.msg = msg;
+ a->u.vac.send.mime = mime;
+ if (handle)
+ makehash(a->u.vac.autoresp.hash, addr, handle, NULL);
+ else
+ makehash(a->u.vac.autoresp.hash, addr, fromaddr, msg);
+ a->u.vac.autoresp.days = days;
+ a->next = NULL;
+ b->next = a;
+ return 0;
+}
+
+/* setflag f on message m
+ *
+ * incompatible with: reject
+ */
+int do_setflag(action_list_t *a, const char *flag)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT)
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_SETFLAG;
+ a->cancel_keep = 0;
+ a->u.fla.flag = flag;
+ b->next = a;
+ a->next = NULL;
+ return 0;
+}
+
+/* addflag f on message m
+ *
+ * incompatible with: reject
+ */
+int do_addflag(action_list_t *a, const char *flag)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT)
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_ADDFLAG;
+ a->cancel_keep = 0;
+ a->u.fla.flag = flag;
+ b->next = a;
+ a->next = NULL;
+ return 0;
+}
+
+/* removeflag f on message m
+ *
+ * incompatible with: reject
+ */
+int do_removeflag(action_list_t *a, const char *flag)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT)
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_REMOVEFLAG;
+ a->cancel_keep = 0;
+ a->u.fla.flag = flag;
+ b->next = a;
+ a->next = NULL;
+ return 0;
+}
+
+
+/* mark message m
+ *
+ * incompatible with: reject
+ */
+int do_mark(action_list_t *a)
+{
+ action_list_t *b = NULL;
+
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT)
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_MARK;
+ a->cancel_keep = 0;
+ b->next = a;
+ a->next = NULL;
+ return 0;
+}
+
+
+/* unmark message m
+ *
+ * incompatible with: reject
+ */
+int do_unmark(action_list_t *a)
+{
+
+ action_list_t *b = NULL;
+ /* see if this conflicts with any previous actions taken on this message */
+ while (a != NULL) {
+ b = a;
+ if (a->a == ACTION_REJECT)
+ return SIEVE_RUN_ERROR;
+ a = a->next;
+ }
+
+ /* add to the action list */
+ a = (action_list_t *) xmalloc(sizeof(action_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+ a->a = ACTION_UNMARK;
+ a->cancel_keep = 0;
+ b->next = a;
+ a->next = NULL;
+ return 0;
+}
+
+/* notify
+ *
+ * incompatible with: none
+ */
+int do_notify(notify_list_t *a, const char *id,
+ const char *method, const char **options,
+ const char *priority, const char *message)
+{
+ notify_list_t *b = NULL;
+
+ /* find the end of the notify list */
+ while (a != NULL) {
+ b = a;
+ a = a->next;
+ }
+
+ /* add to the notify list */
+ a = (notify_list_t *) xmalloc(sizeof(notify_list_t));
+ if (a == NULL)
+ return SIEVE_NOMEM;
+
+ b->next = a;
+ a->isactive = 1;
+ a->id = id;
+ a->method = method;
+ a->options = options;
+ a->priority = priority;
+ a->message = message;
+ a->next = NULL;
+ return 0;
+}
+
+/* denotify
+ *
+ * incomaptible with: none
+ */
+int do_denotify(notify_list_t *n, comparator_t *comp, const void *pat,
+ void *comprock, const char *priority)
+{
+ while (n != NULL) {
+ if (n->isactive &&
+ (!priority || !strcasecmp(n->priority, priority)) &&
+ (!comp || (n->id && comp(n->id, strlen(n->id), pat, comprock)))) {
+ n->isactive = 0;
+ }
+ n = n->next;
+ }
+
+ return 0;
+}
+
+
+
+/* given a header, extract an address out of it. if marker points to NULL,
+ extract the first address. otherwise, it's an index into the header to
+ say where to start extracting */
+struct addr_marker {
+ struct address *where;
+ char *freeme;
+};
+
+int parse_address(const char *header, void **data, void **marker)
+{
+ struct addr_marker *am = (struct addr_marker *) *marker;
+
+ parseaddr_list(header, (struct address **) data);
+ am = (void *) xmalloc(sizeof(struct addr_marker));
+ am->where = *data;
+ am->freeme = NULL;
+ *marker = am;
+ return SIEVE_OK;
+}
+
+char *get_address(address_part_t addrpart,
+ void **data __attribute__((unused)),
+ void **marker,
+ int canon_domain)
+{
+ char *ret = NULL;
+ struct address *a;
+ struct addr_marker *am = *marker;
+
+ a = am->where;
+ if (am->freeme) {
+ free(am->freeme);
+ am->freeme = NULL;
+ }
+
+ if (a == NULL) {
+ ret = NULL;
+ } else {
+ if (canon_domain && a->domain)
+ lcase(a->domain);
+
+ switch (addrpart) {
+ case ADDRESS_ALL:
+#define U_DOMAIN "unspecified-domain"
+#define U_USER "unknown-user"
+ if (a->mailbox || a->domain) {
+ char *m = a->mailbox ? a->mailbox : U_USER;
+ char *d = a->domain ? a->domain : U_DOMAIN;
+ am->freeme = (char *) xmalloc(strlen(m) + strlen(d) + 2);
+
+ sprintf(am->freeme, "%s@%s", m, d);
+ ret = am->freeme;
+ } else {
+ ret = NULL;
+ }
+ break;
+
+ case ADDRESS_LOCALPART:
+ ret = a->mailbox;
+ break;
+
+ case ADDRESS_DOMAIN:
+ ret = a->domain;
+ break;
+
+ case ADDRESS_USER:
+ if (a->mailbox) {
+ char *p = strchr(a->mailbox, '+');
+ int len = p ? p - a->mailbox : strlen(a->mailbox);
+
+ am->freeme = (char *) xmalloc(len + 1);
+ strncpy(am->freeme, a->mailbox, len);
+ am->freeme[len] = '\0';
+ ret = am->freeme;
+ } else {
+ ret = NULL;
+ }
+ break;
+
+ case ADDRESS_DETAIL:
+ if (a->mailbox)
+ {
+ char *p = strchr(a->mailbox, '+');
+ ret = (p ? p + 1 : NULL);
+ }
+ else
+ {
+ ret = NULL;
+ }
+ break;
+ }
+ a = a->next;
+ am->where = a;
+ }
+ *marker = am;
+ return ret;
+}
+
+int free_address(void **data, void **marker)
+{
+ struct addr_marker *am = (struct addr_marker *) *marker;
+
+ if (*data)
+ parseaddr_free((struct address *) *data);
+ *data = NULL;
+ if (am->freeme) free(am->freeme);
+ free(am);
+ *marker = NULL;
+ return SIEVE_OK;
+}
+
+notify_list_t *new_notify_list(void)
+{
+ notify_list_t *ret = xmalloc(sizeof(notify_list_t));
+
+ if (ret != NULL) {
+ ret->isactive = 0;
+ ret->id = NULL;
+ ret->method = NULL;
+ ret->options = NULL;
+ ret->priority = NULL;
+ ret->message = NULL;
+ ret->next = NULL;
+ }
+ return ret;
+}
+
+void free_notify_list(notify_list_t *n)
+{
+ while (n) {
+ notify_list_t *b = n->next;
+ free(n->options); /* strings live in bytecode, only free the array */
+ free(n);
+ n = b;
+ }
+}
+
+action_list_t *new_action_list(void)
+{
+ action_list_t *ret = xmalloc(sizeof(action_list_t));
+
+ if (ret != NULL) {
+ ret->a = ACTION_NONE;
+ ret->param = NULL;
+ ret->next = NULL;
+ ret->cancel_keep = 0;
+ }
+ return ret;
+}
+
+void free_action_list(action_list_t *a)
+{
+ while (a) {
+ action_list_t *b = a->next;
+
+ if(a->a == ACTION_VACATION) {
+ if(a->u.vac.send.subj) free(a->u.vac.send.subj);
+ if(a->u.vac.send.addr) free(a->u.vac.send.addr);
+ if(a->u.vac.send.fromaddr) free(a->u.vac.send.fromaddr);
+ }
+
+ free(a);
+ a = b;
+ }
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/message.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,135 @@
+/* message.h
+ * Larry Greenfield
+ * $Id: message.h,v 1.16.2.2 2005/10/05 15:56:23 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifndef MESSAGE_H
+#define MESSAGE_H
+
+#include "sieve_interface.h" /* for action contexts */
+#include "tree.h" /* for stringlist_t */
+
+typedef struct Action action_list_t;
+
+typedef enum {
+ ACTION_NULL = -1,
+ ACTION_NONE = 0,
+ ACTION_REJECT,
+ ACTION_FILEINTO,
+ ACTION_KEEP,
+ ACTION_REDIRECT,
+ ACTION_DISCARD,
+ ACTION_VACATION,
+ ACTION_SETFLAG,
+ ACTION_ADDFLAG,
+ ACTION_REMOVEFLAG,
+ ACTION_MARK,
+ ACTION_UNMARK,
+ ACTION_NOTIFY,
+ ACTION_DENOTIFY
+} action_t;
+
+/* information */
+action_list_t *new_action_list(void);
+void free_action_list(action_list_t *actions);
+
+/* invariant: always have a dummy element when free_action_list, param
+ and vac_subj are freed. none of the others are automatically freed.
+
+ the do_action() functions should copy param */
+struct Action {
+ action_t a;
+ int cancel_keep;
+ union {
+ sieve_reject_context_t rej;
+ sieve_fileinto_context_t fil;
+ sieve_keep_context_t keep;
+ sieve_redirect_context_t red;
+ struct {
+ /* addr, fromaddr, subj - freed! */
+ sieve_send_response_context_t send;
+ sieve_autorespond_context_t autoresp;
+ } vac;
+ struct {
+ const char *flag;
+ } fla;
+ } u;
+ char *param; /* freed! */
+ struct Action *next;
+ char *vac_subj; /* freed! */
+ char *vac_msg;
+ int vac_days;
+};
+
+typedef struct notify_list_s {
+ int isactive;
+ const char *id;
+ const char *method;
+ const char **options;
+ const char *priority;
+ const char *message;
+ struct notify_list_s *next;
+} notify_list_t;
+
+/* header parsing */
+typedef enum {
+ ADDRESS_ALL,
+ ADDRESS_LOCALPART,
+ ADDRESS_DOMAIN,
+ ADDRESS_USER,
+ ADDRESS_DETAIL
+} address_part_t;
+
+int parse_address(const char *header, void **data, void **marker);
+char *get_address(address_part_t addrpart, void **data, void **marker,
+ int canon_domain);
+int free_address(void **data, void **marker);
+notify_list_t *new_notify_list(void);
+void free_notify_list(notify_list_t *n);
+
+/* actions; return negative on failure.
+ * these don't actually perform the actions, they just add it to the
+ * action list */
+int do_reject(action_list_t *m, const char *msg);
+int do_fileinto(action_list_t *m, const char *mbox, int cancel_keep,
+ sieve_imapflags_t *imapflags);
+int do_redirect(action_list_t *m, const char *addr, int cancel_keep);
+int do_keep(action_list_t *m, sieve_imapflags_t *imapflags);
+int do_discard(action_list_t *m);
+int do_vacation(action_list_t *m, char *addr, char *fromaddr,
+ char *subj, const char *msg, int days, int mime, char *handle);
+int do_setflag(action_list_t *m, const char *flag);
+int do_addflag(action_list_t *m, const char *flag);
+int do_removeflag(action_list_t *m, const char *flag);
+int do_mark(action_list_t *m);
+int do_unmark(action_list_t *m);
+int do_notify(notify_list_t *n, const char *id,
+ const char *method, const char **options,
+ const char *priority, const char *message);
+int do_denotify(notify_list_t *n, comparator_t *comp, const void *pat,
+ void *comprock, const char *priority);
+
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,935 @@
+/* script.c -- sieve script functions
+ * Larry Greenfield
+ * $Id: script.c,v 1.59.2.11 2005/10/05 15:56:23 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <syslog.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+
+#include "charset.h"
+#include "hash.h"
+#include "xmalloc.h"
+
+#include "sieve_interface.h"
+#include "interp.h"
+#include "script.h"
+#include "tree.h"
+#include "map.h"
+#include "sieve.h"
+#include "message.h"
+#include "bytecode.h"
+#include "libconfig.h"
+
+/* does this interpretor support this requirement? */
+int script_require(sieve_script_t *s, char *req)
+{
+ unsigned long config_sieve_extensions =
+ config_getbitfield(IMAPOPT_SIEVE_EXTENSIONS);
+
+ if (!strcmp("fileinto", req)) {
+ if (s->interp.fileinto &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_FILEINTO)) {
+ s->support.fileinto = 1;
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (!strcmp("reject", req)) {
+ if (s->interp.reject &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_REJECT)) {
+ s->support.reject = 1;
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (!strcmp("envelope", req)) {
+ if (s->interp.getenvelope &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_ENVELOPE)) {
+ s->support.envelope = 1;
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (!strcmp("body", req)) {
+ if (s->interp.getbody &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_BODY)) {
+ s->support.body = 1;
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (!strcmp("vacation", req)) {
+ if (s->interp.vacation &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_VACATION)) {
+ s->support.vacation = 1;
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (!strcmp("imapflags", req)) {
+ if (s->interp.markflags->flag &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_IMAPFLAGS)) {
+ s->support.imapflags = 1;
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (!strcmp("notify",req)) {
+ if (s->interp.notify &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_NOTIFY)) {
+ s->support.notify = 1;
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (!strcmp("include", req)) {
+ if (s->interp.getinclude &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_INCLUDE)) {
+ s->support.include = 1;
+ return 1;
+ } else {
+ return 0;
+ }
+#ifdef ENABLE_REGEX
+ } else if (!strcmp("regex", req) &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_REGEX)) {
+ s->support.regex = 1;
+ return 1;
+#endif
+ } else if (!strcmp("subaddress", req) &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_SUBADDRESS)) {
+ s->support.subaddress = 1;
+ return 1;
+ } else if (!strcmp("relational", req) &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_RELATIONAL)) {
+ s->support.relational = 1;
+ return 1;
+ } else if (!strcmp("comparator-i;octet", req)) {
+ return 1;
+ } else if (!strcmp("comparator-i;ascii-casemap", req)) {
+ return 1;
+ } else if (!strcmp("comparator-i;ascii-numeric", req)) {
+ s->support.i_ascii_numeric = 1;
+ return 1;
+ } else if (!strcmp("copy", req) &&
+ (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_COPY)) {
+ s->support.copy = 1;
+ return 1;
+ }
+ return 0;
+}
+
+/* given an interpretor and a script, produce an executable script */
+int sieve_script_parse(sieve_interp_t *interp, FILE *script,
+ void *script_context, sieve_script_t **ret)
+{
+ sieve_script_t *s;
+ int res = SIEVE_OK;
+ extern int yylineno;
+
+ res = interp_verify(interp);
+ if (res != SIEVE_OK) {
+ return res;
+ }
+
+ s = (sieve_script_t *) xmalloc(sizeof(sieve_script_t));
+ s->interp = *interp;
+ s->script_context = script_context;
+ /* clear all support bits */
+ memset(&s->support, 0, sizeof(struct sieve_support));
+
+ s->err = 0;
+
+ yylineno = 1; /* reset line number */
+ s->cmds = sieve_parse(s, script);
+ if (s->err > 0) {
+ if (s->cmds) {
+ free_tree(s->cmds);
+ }
+ s->cmds = NULL;
+ res = SIEVE_PARSE_ERROR;
+ }
+
+ *ret = s;
+ return res;
+}
+
+void free_imapflags(sieve_imapflags_t *imapflags)
+{
+ while (imapflags->nflags)
+ free(imapflags->flag[--imapflags->nflags]);
+ free(imapflags->flag);
+
+ imapflags->flag = NULL;
+}
+
+int sieve_script_free(sieve_script_t **s)
+{
+ if (*s) {
+ if ((*s)->cmds) {
+ free_tree((*s)->cmds);
+ }
+ free(*s);
+ }
+
+ return SIEVE_OK;
+}
+
+#define GROW_AMOUNT 100
+
+static void add_header(sieve_interp_t *i, int isenv, char *header,
+ void *message_context, char **out,
+ int *outlen, int *outalloc)
+{
+ const char **h;
+ int addlen;
+ /* get header value */
+ if (isenv)
+ i->getenvelope(message_context, header, &h);
+ else
+ i->getheader(message_context, header, &h);
+
+ if (!h || !h[0])
+ return;
+
+ addlen = strlen(h[0]) + 1;
+
+ /* realloc if necessary */
+ if ( (*outlen) + addlen >= *outalloc)
+ {
+ *outalloc = (*outlen) + addlen + GROW_AMOUNT;
+ *out = xrealloc(*out, *outalloc);
+ }
+
+ /* add header value */
+ strcat(*out,h[0]);
+
+ *outlen += addlen;
+}
+
+static int build_notify_message(sieve_interp_t *i,
+ struct hash_table *body_cache,
+ const char *msg,
+ void *message_context, char **out, int *outlen)
+{
+ int allocsize = GROW_AMOUNT;
+ const char *c;
+ size_t n;
+
+ *out = xmalloc(GROW_AMOUNT);
+ *outlen = 0;
+ (*out)[0]='\0';
+
+ if (msg == NULL) return SIEVE_OK;
+
+ /* construct the message */
+ c = msg;
+ while (*c) {
+ /* expand variables */
+ if (!strncasecmp(c, "$from$", 6)) {
+ add_header(i, 0 ,"From", message_context, out, outlen, &allocsize);
+ c += 6;
+ }
+ else if (!strncasecmp(c, "$env-from$", 10)) {
+ add_header(i, 1, "From", message_context, out, outlen, &allocsize);
+ c += 10;
+ }
+ else if (!strncasecmp(c, "$subject$", 9)) {
+ add_header(i, 0, "Subject", message_context, out, outlen, &allocsize);
+ c += 9;
+ }
+ else if (i->getbody &&
+ !strncasecmp(c, "$text", 5) && (c[5] == '[' || c[5] == '$')) {
+ const char *content_types[] = { "text", NULL };
+ sieve_bodypart_t **parts = NULL;
+
+ c += 5;
+ n = 0;
+ if (*c++ == '[') {
+ while (*c != ']') n = n * 10 + (*c++ - '0');
+ c += 2; /* skip ]$ */
+ }
+
+ i->getbody(message_context, content_types, &parts);
+
+ /* we only use the first text part */
+ if (parts && parts[0]) {
+ const char *content = parts[0]->content;
+ int size = parts[0]->size;
+ int encoding;
+
+ /* XXX currently unknown encodings are processed as raw */
+ if (!parts[0]->encoding)
+ encoding = ENCODING_NONE;
+ else if (!strcmp(parts[0]->encoding, "BASE64"))
+ encoding = ENCODING_BASE64;
+ else if (!strcmp(parts[0]->encoding, "QUOTED-PRINTABLE"))
+ encoding = ENCODING_QP;
+ else
+ encoding = ENCODING_NONE;
+
+ if (encoding != ENCODING_NONE) {
+ content = hash_lookup(parts[0]->section, body_cache);
+ if (content) {
+ /* already decoded this part */
+ size = strlen(content);
+ }
+ else {
+ /* decode this part and add it to the cache */
+ char *decbuf = NULL;
+ content = charset_decode_mimebody(parts[0]->content,
+ parts[0]->size,
+ encoding, &decbuf,
+ 0, &size);
+ hash_insert(parts[0]->section, (void *) content,
+ body_cache);
+ }
+ }
+
+ if (n == 0 || n > size) n = size;
+
+ /* realloc if necessary */
+ if ( (*outlen) + n+1 >= allocsize) {
+ allocsize = (*outlen) + n+1 + GROW_AMOUNT;
+ *out = xrealloc(*out, allocsize);
+ }
+ /* copy the plaintext */
+ strncat(*out, parts[0]->content, n);
+ (*out)[*outlen+n]='\0';
+ (*outlen) += n;
+ }
+
+ /* free the results */
+ if (parts) {
+ sieve_bodypart_t **p;
+
+ for (p = parts; *p; p++) free(*p);
+ free(parts);
+ }
+ }
+ else {
+ /* find length of plaintext up to next potential variable */
+ n = strcspn(c+1, "$") + 1; /* skip opening '$' */
+ /* realloc if necessary */
+ if ( (*outlen) + n+1 >= allocsize) {
+ allocsize = (*outlen) + n+1 + GROW_AMOUNT;
+ *out = xrealloc(*out, allocsize);
+ }
+ /* copy the plaintext */
+ strncat(*out, c, n);
+ (*out)[*outlen+n]='\0';
+ (*outlen) += n;
+ c += n;
+ }
+ }
+
+ return SIEVE_OK;
+}
+
+static int sieve_addflag(sieve_imapflags_t *imapflags, const char *flag)
+{
+ int n;
+ /* search for flag already in list */
+ for (n = 0; n < imapflags->nflags; n++) {
+ if (!strcmp(imapflags->flag[n], flag))
+ break;
+ }
+
+ /* add flag to list, iff not in list */
+ if (n == imapflags->nflags) {
+ imapflags->nflags++;
+ imapflags->flag =
+ (char **) xrealloc((char *)imapflags->flag,
+ imapflags->nflags*sizeof(char *));
+ imapflags->flag[imapflags->nflags-1] = xstrdup(flag);
+ }
+
+ return SIEVE_OK;
+}
+
+static int sieve_removeflag(sieve_imapflags_t *imapflags, const char *flag)
+{
+ int n;
+ /* search for flag already in list */
+ for (n = 0; n < imapflags->nflags; n++) {
+ if (!strcmp(imapflags->flag[n], flag))
+ break;
+ }
+
+ /* remove flag from list, iff in list */
+ if (n < imapflags->nflags)
+ {
+ free(imapflags->flag[n]);
+ imapflags->nflags--;
+
+ for (; n < imapflags->nflags; n++)
+ imapflags->flag[n] = imapflags->flag[n+1];
+
+ if (imapflags->nflags)
+ {imapflags->flag =
+ (char **) xrealloc((char *)imapflags->flag,
+ imapflags->nflags*sizeof(char *));}
+ else
+ {free(imapflags->flag);
+ imapflags->flag=NULL;}
+ }
+
+ return SIEVE_OK;
+}
+
+static int send_notify_callback(sieve_interp_t *interp,
+ struct hash_table *body_cache,
+ void *message_context,
+ void * script_context, notify_list_t *notify,
+ char *actions_string, const char **errmsg)
+{
+ sieve_notify_context_t nc;
+ char *out_msg, *build_msg;
+ int out_msglen;
+ int ret;
+
+ assert(notify->isactive);
+
+ if (!notify->method || !notify->options ||
+ !notify->priority || !notify->message) {
+ return SIEVE_RUN_ERROR;
+ }
+
+ nc.method = notify->method;
+ nc.options = notify->options ? notify->options : NULL;
+ nc.priority = notify->priority;
+
+ build_notify_message(interp, body_cache, notify->message, message_context,
+ &out_msg, &out_msglen);
+
+ build_msg = xmalloc(out_msglen + strlen(actions_string) + 30);
+
+ strcpy(build_msg, out_msg);
+ strcat(build_msg, "\n\n");
+ strcat(build_msg, actions_string);
+
+ nc.message = build_msg;
+
+ free(out_msg);
+
+ ret = interp->notify(&nc,
+ interp->interp_context,
+ script_context,
+ message_context,
+ errmsg);
+
+ free(build_msg);
+
+ return ret;
+}
+
+static char *action_to_string(action_t action)
+{
+ switch(action)
+ {
+ case ACTION_REJECT: return "Reject";
+ case ACTION_FILEINTO: return "Fileinto";
+ case ACTION_KEEP: return "Keep";
+ case ACTION_REDIRECT: return "Redirect";
+ case ACTION_DISCARD: return "Discard";
+ case ACTION_VACATION: return "Vacation";
+ case ACTION_SETFLAG: return "Setflag";
+ case ACTION_ADDFLAG: return "Addflag";
+ case ACTION_REMOVEFLAG: return "Removeflag";
+ case ACTION_MARK: return "Mark";
+ case ACTION_UNMARK: return "Unmark";
+ case ACTION_NOTIFY: return "Notify";
+ case ACTION_DENOTIFY: return "Denotify";
+ default: return "Unknown";
+ }
+
+ return "Error!";
+}
+
+static char *sieve_errstr(int code)
+{
+ switch (code)
+ {
+ case SIEVE_FAIL: return "Generic Error";
+ case SIEVE_NOT_FINALIZED: return "Sieve not finalized";
+ case SIEVE_PARSE_ERROR: return "Parse error";
+ case SIEVE_RUN_ERROR: return "Run error";
+ case SIEVE_INTERNAL_ERROR: return "Internal Error";
+ case SIEVE_NOMEM: return "No memory";
+ default: return "Unknown error";
+ }
+
+ return "Error!";
+}
+
+
+/******************************bytecode functions*****************************
+ *****************************************************************************/
+
+/* Load a compiled script */
+int sieve_script_load(const char *fname, sieve_execute_t **ret)
+{
+ struct stat sbuf;
+ sieve_execute_t *r;
+ sieve_bytecode_t *bc;
+
+ if (!fname || !ret) return SIEVE_FAIL;
+
+ if (stat(fname, &sbuf) == -1) {
+ syslog(LOG_DEBUG, "IOERROR: fstating sieve script %s: %m", fname);
+ return SIEVE_FAIL;
+ }
+
+ if (!*ret) {
+ /* new sieve_bytecode_t */
+ r = (sieve_execute_t *) xzmalloc(sizeof(sieve_execute_t));
+ } else {
+ /* existing sieve_execute_t (INCLUDE) */
+ r = *ret;
+ }
+
+ /* see if we already have this script loaded */
+ bc = r->bc_list;
+ while (bc) {
+ if (sbuf.st_ino == bc->inode) break;
+ bc = bc->next;
+ }
+
+ if (!bc) {
+ int fd;
+
+ /* new script -- load it */
+ fd = open(fname, O_RDONLY);
+ if (fd == -1) {
+ syslog(LOG_ERR, "IOERROR: can not open sieve script %s: %m", fname);
+ return SIEVE_FAIL;
+ }
+
+ bc = (sieve_bytecode_t *) xzmalloc(sizeof(sieve_bytecode_t));
+
+ bc->fd = fd;
+ bc->inode = sbuf.st_ino;
+
+ map_refresh(fd, 1, &bc->data, &bc->len, sbuf.st_size,
+ fname, "sievescript");
+
+ /* add buffer to list */
+ bc->next = r->bc_list;
+ r->bc_list = bc;
+ }
+
+ r->bc_cur = bc;
+ *ret = r;
+ return SIEVE_OK;
+}
+
+
+
+int sieve_script_unload(sieve_execute_t **s)
+{
+ if(s && *s) {
+ sieve_bytecode_t *bc = (*s)->bc_list;
+
+ /* free each bytecode buffer in the linked list */
+ while (bc) {
+ map_free(&(bc->data), &(bc->len));
+ close(bc->fd);
+ bc = bc->next;
+ }
+ free(*s);
+ *s = NULL;
+ }
+ /*i added this else, i'm not sure why, but this function always returned SIEVE_FAIL*/
+ else
+ return SIEVE_FAIL;
+ return SIEVE_OK;
+}
+
+
+#define ACTIONS_STRING_LEN 4096
+
+static int do_sieve_error(int ret,
+ sieve_interp_t *interp,
+ struct hash_table *body_cache,
+ void *script_context,
+ void *message_context,
+ sieve_imapflags_t * imapflags,
+ action_list_t *actions,
+ notify_list_t *notify_list,
+ /* notify_action_t *notify_action,*/
+ int lastaction,
+ int implicit_keep,
+ char *actions_string,
+ const char *errmsg
+ )
+{
+ if (ret != SIEVE_OK) {
+ if (lastaction == -1) /* we never executed an action */
+ snprintf(actions_string+strlen(actions_string),
+ ACTIONS_STRING_LEN-strlen(actions_string),
+ "script execution failed: %s\n",
+ errmsg ? errmsg : sieve_errstr(ret));
+ else
+ snprintf(actions_string+strlen(actions_string),
+ ACTIONS_STRING_LEN-strlen(actions_string),
+ "%s action failed: %s\n",
+ action_to_string(lastaction),
+ errmsg ? errmsg : sieve_errstr(ret));
+ }
+
+
+ /* Process notify actions */
+ if (interp->notify && notify_list)
+ {
+ notify_list_t *n = notify_list;
+ int notify_ret = SIEVE_OK;
+
+ while (n != NULL)
+ {
+ if (n->isactive)
+ {
+ lastaction = ACTION_NOTIFY;
+ notify_ret = send_notify_callback(interp, body_cache,
+ message_context,
+ script_context,n,
+ actions_string, &errmsg);
+ ret |= notify_ret;
+ }
+ n = n->next;
+ }
+
+ if (notify_list) free_notify_list(notify_list);
+ notify_list = NULL; /* don't try any notifications again */
+
+
+ if (notify_ret != SIEVE_OK)
+ return do_sieve_error(ret, interp, body_cache,
+ script_context, message_context,
+ imapflags, actions, notify_list, lastaction,
+ implicit_keep, actions_string, errmsg);
+
+ }
+
+ if ((ret != SIEVE_OK) && interp->err) {
+ char buf[1024];
+ if (lastaction == -1) /* we never executed an action */
+ sprintf(buf, "%s", errmsg ? errmsg : sieve_errstr(ret));
+ else
+ sprintf(buf, "%s: %s", action_to_string(lastaction),
+ errmsg ? errmsg : sieve_errstr(ret));
+
+ ret |= interp->execute_err(buf, interp->interp_context,
+ script_context, message_context);
+ }
+
+ if (implicit_keep) {
+ sieve_keep_context_t keep_context;
+ int keep_ret;
+ keep_context.imapflags = imapflags;
+
+ lastaction = ACTION_KEEP;
+ keep_ret = interp->keep(&keep_context, interp->interp_context,
+ script_context, message_context, &errmsg);
+ ret |= keep_ret;
+ if (keep_ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+ sizeof(actions_string)-strlen(actions_string),
+ "Kept\n");
+ else {
+ implicit_keep = 0; /* don't try an implicit keep again */
+ return do_sieve_error(ret, interp, body_cache,
+ script_context, message_context,
+ imapflags, actions, notify_list, lastaction,
+ implicit_keep, actions_string, errmsg);
+ }
+ }
+
+ if (actions)
+ free_action_list(actions);
+
+ return ret;
+}
+
+
+static int do_action_list(sieve_interp_t *interp,
+ struct hash_table *body_cache,
+ void *script_context,
+ void *message_context,
+ sieve_imapflags_t *imapflags,
+ action_list_t *actions,
+ notify_list_t *notify_list,
+ /* notify_action_t *notify_action,*/
+ char *actions_string,
+ const char *errmsg)
+{
+ action_list_t *a;
+ action_t lastaction = -1;
+ int ret = 0;
+ int implicit_keep = 1;
+
+ strcpy(actions_string,"Action(s) taken:\n");
+
+ /* now perform actions attached to m */
+ a = actions;
+ while (a != NULL) {
+ lastaction = a->a;
+ errmsg = NULL;
+ implicit_keep = implicit_keep && !a->cancel_keep;
+ switch (a->a) {
+ case ACTION_REJECT:
+ if (!interp->reject)
+ return SIEVE_INTERNAL_ERROR;
+ ret = interp->reject(&a->u.rej,
+ interp->interp_context,
+ script_context,
+ message_context,
+ &errmsg);
+
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+ sizeof(actions_string)-strlen(actions_string),
+ "Rejected with: %s\n", a->u.rej.msg);
+
+ break;
+ case ACTION_FILEINTO:
+ if (!interp->fileinto)
+ return SIEVE_INTERNAL_ERROR;
+ ret = interp->fileinto(&a->u.fil,
+ interp->interp_context,
+ script_context,
+ message_context,
+ &errmsg);
+
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+ sizeof(actions_string)-strlen(actions_string),
+ "Filed into: %s\n",a->u.fil.mailbox);
+ break;
+ case ACTION_KEEP:
+ if (!interp->keep)
+ return SIEVE_INTERNAL_ERROR;
+ ret = interp->keep(&a->u.keep,
+ interp->interp_context,
+ script_context,
+ message_context,
+ &errmsg);
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+ sizeof(actions_string)-strlen(actions_string),
+ "Kept\n");
+ break;
+ case ACTION_REDIRECT:
+ if (!interp->redirect)
+ return SIEVE_INTERNAL_ERROR;
+ ret = interp->redirect(&a->u.red,
+ interp->interp_context,
+ script_context,
+ message_context,
+ &errmsg);
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+ sizeof(actions_string)-strlen(actions_string),
+ "Redirected to %s\n", a->u.red.addr);
+ break;
+ case ACTION_DISCARD:
+ if (interp->discard) /* discard is optional */
+ ret = interp->discard(NULL, interp->interp_context,
+ script_context,
+ message_context,
+ &errmsg);
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+ sizeof(actions_string)-strlen(actions_string),
+ "Discarded\n");
+ break;
+
+ case ACTION_VACATION:
+ {
+ if (!interp->vacation)
+ return SIEVE_INTERNAL_ERROR;
+
+ /* first, let's figure out if we should respond to this */
+ ret = interp->vacation->autorespond(&a->u.vac.autoresp,
+ interp->interp_context,
+ script_context,
+ message_context,
+ &errmsg);
+
+ if (ret == SIEVE_OK) {
+ /* send the response */
+ ret = interp->vacation->send_response(&a->u.vac.send,
+ interp->interp_context,
+ script_context,
+ message_context,
+ &errmsg);
+
+ if (ret == SIEVE_OK)
+ snprintf(actions_string+strlen(actions_string),
+ sizeof(actions_string)-strlen(actions_string),
+ "Sent vacation reply\n");
+
+ } else if (ret == SIEVE_DONE) {
+ snprintf(actions_string+strlen(actions_string),
+ sizeof(actions_string)-strlen(actions_string),
+ "Vacation reply suppressed\n");
+
+ ret = SIEVE_OK;
+ }
+
+ break;
+ }
+
+
+ case ACTION_SETFLAG:
+ free_imapflags(imapflags);
+ ret = sieve_addflag(imapflags, a->u.fla.flag);
+ break;
+ case ACTION_ADDFLAG:
+ ret = sieve_addflag(imapflags, a->u.fla.flag);
+ break;
+ case ACTION_REMOVEFLAG:
+ ret = sieve_removeflag(imapflags, a->u.fla.flag);
+ break;
+ case ACTION_MARK:
+ {
+ int n = interp->markflags->nflags;
+
+ ret = SIEVE_OK;
+ while (n && ret == SIEVE_OK) {
+ ret = sieve_addflag(imapflags,
+ interp->markflags->flag[--n]);
+ }
+ break;
+ }
+ case ACTION_UNMARK:
+ {
+
+ int n = interp->markflags->nflags;
+ ret = SIEVE_OK;
+ while (n && ret == SIEVE_OK) {
+ ret = sieve_removeflag(imapflags,
+ interp->markflags->flag[--n]);
+ }
+ break;
+ }
+
+ case ACTION_NONE:
+ break;
+
+ default:
+ ret = SIEVE_INTERNAL_ERROR;
+ break;
+ }
+ a = a->next;
+
+ if (ret != SIEVE_OK) {
+ /* uh oh! better bail! */
+ break;
+ }
+ }
+
+ return do_sieve_error(ret, interp, body_cache,
+ script_context, message_context,
+ imapflags, actions, notify_list, lastaction,
+ implicit_keep, actions_string, errmsg);
+}
+
+
+/* execute some bytecode */
+int sieve_eval_bc(sieve_execute_t *exe, int is_incl, sieve_interp_t *i,
+ struct hash_table *body_cache, void *sc, void *m,
+ sieve_imapflags_t * imapflags, action_list_t *actions,
+ notify_list_t *notify_list, const char **errmsg);
+
+int sieve_execute_bytecode(sieve_execute_t *exe, sieve_interp_t *interp,
+ void *script_context, void *message_context)
+{
+ action_list_t *actions = NULL;
+ notify_list_t *notify_list = NULL;
+ /* notify_action_t *notify_action;*/
+ action_t lastaction = -1;
+ int ret;
+ char actions_string[ACTIONS_STRING_LEN] = "";
+ const char *errmsg = NULL;
+ sieve_imapflags_t imapflags;
+ struct hash_table body_cache;
+
+ if (!interp) return SIEVE_FAIL;
+
+ imapflags.flag = NULL;
+ imapflags.nflags = 0;
+
+ if (interp->notify) {
+ notify_list = new_notify_list();
+ if (notify_list == NULL) {
+ return do_sieve_error(SIEVE_NOMEM, interp, NULL,
+ script_context, message_context, &imapflags,
+ actions, notify_list, lastaction, 0,
+ actions_string, errmsg);
+ }
+ }
+
+ /* build a hash table to cache decoded body parts */
+ construct_hash_table(&body_cache, 10, 1);
+
+ actions = new_action_list();
+ if (actions == NULL) {
+ ret = do_sieve_error(SIEVE_NOMEM, interp, &body_cache,
+ script_context, message_context, &imapflags,
+ actions, notify_list, lastaction, 0,
+ actions_string, errmsg);
+ }
+ else {
+ ret = sieve_eval_bc(exe, 0, interp, &body_cache,
+ script_context, message_context,
+ &imapflags, actions, notify_list, &errmsg);
+
+ if (ret < 0) {
+ ret = do_sieve_error(SIEVE_RUN_ERROR, interp, &body_cache,
+ script_context, message_context, &imapflags,
+ actions, notify_list, lastaction, 0,
+ actions_string, errmsg);
+ }
+ else {
+ ret = do_action_list(interp, &body_cache,
+ script_context, message_context,
+ &imapflags, actions, notify_list,
+ actions_string, errmsg);
+ }
+ }
+
+ free_hash_table(&body_cache, free);
+ return ret;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/script.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,87 @@
+/* script.h -- script definition
+ * Larry Greenfield
+ * $Id: script.h,v 1.11.2.3 2005/03/12 03:30:12 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifndef SIEVE_SCRIPT_H
+#define SIEVE_SCRIPT_H
+
+#include <sys/types.h>
+
+#include "sieve_interface.h"
+#include "interp.h"
+#include "tree.h"
+
+#define ADDRERR_SIZE 500
+
+struct sieve_script {
+ sieve_interp_t interp;
+
+ /* was a "require" done for these? */
+ struct sieve_support {
+ int fileinto : 1;
+ int reject : 1;
+ int envelope : 1;
+ int body : 1;
+ int vacation : 1;
+ int imapflags : 1;
+ int notify : 1;
+ int regex : 1;
+ int subaddress : 1;
+ int relational : 1;
+ int i_ascii_numeric: 1;
+ int include : 1;
+ int copy : 1;
+ } support;
+
+ void *script_context;
+ commandlist_t *cmds;
+
+ int err;
+};
+
+typedef struct sieve_bytecode sieve_bytecode_t;
+
+struct sieve_bytecode {
+ ino_t inode; /* used to prevent mmapping the same script */
+ const char *data;
+ unsigned long len;
+ int fd;
+
+ int is_executing; /* used to prevent recursive INCLUDEs */
+
+ sieve_bytecode_t *next;
+};
+
+struct sieve_execute {
+ sieve_bytecode_t *bc_list; /* list of loaded bytecode buffers */
+ sieve_bytecode_t *bc_cur; /* currently active bytecode buffer */
+};
+
+/* generated by the yacc script */
+commandlist_t *sieve_parse(sieve_script_t *script, FILE *f);
+int script_require(sieve_script_t *s, char *req);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2215 @@
+/* A lexical scanner generated by flex*/
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+#include <unistd.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* Some routines like yy_flex_realloc() are emitted as static but are
+ not called by all lexers. This generates warnings in some compilers,
+ notably GCC. Arrange to suppress these. */
+#ifdef __GNUC__
+#define YY_MAY_BE_UNUSED __attribute__((unused))
+#else
+#define YY_MAY_BE_UNUSED
+#endif
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define YY_USES_REJECT
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern int yylineno;
+int yylineno = 1;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 78
+#define YY_END_OF_BUFFER 79
+static yyconst short int yy_acclist[149] =
+ { 0,
+ 79, 77, 78, 74, 77, 78, 74, 78, 8, 77,
+ 78, 75, 77, 78, 77, 78, 9, 77, 78, 77,
+ 78, 77, 78, 77, 78, 77, 78, 77, 78, 77,
+ 78, 77, 78, 77, 78, 77, 78, 77, 78, 77,
+ 78, 77, 78, 77, 78, 77, 78, 77, 78, 77,
+ 78, 3, 77, 78, 3, 78, 3, 77, 78, 6,
+ 77, 78, 6, 78, 4, 6, 77, 78, 6, 77,
+ 78, 75, 9, 9, 10, 1, 1, 2, 5, 38,
+ 53, 22, 76, 61, 41, 66, 21, 12, 27, 34,
+ 23, 29, 17, 76, 73, 46, 49, 43, 51, 59,
+
+ 67, 64, 14, 13, 11, 16, 57, 56, 60, 58,
+ 15, 20, 36, 24, 72, 7, 7, 35, 65, 63,
+ 71, 50, 39, 42, 32, 18, 30, 69, 28, 31,
+ 7, 68, 55, 44, 40, 48, 37, 19, 25, 26,
+ 7, 45, 54, 70, 47, 62, 33, 52
+ } ;
+
+static yyconst short int yy_accept[360] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 2, 4, 7,
+ 9, 12, 15, 17, 20, 22, 24, 26, 28, 30,
+ 32, 34, 36, 38, 40, 42, 44, 46, 48, 50,
+ 52, 55, 57, 60, 63, 65, 69, 72, 73, 73,
+ 74, 75, 75, 75, 75, 75, 75, 75, 75, 75,
+ 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
+ 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
+ 75, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 76, 76, 76, 77, 78, 79, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+
+ 81, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 84, 84, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 88, 88, 88, 89, 89, 89, 89, 89, 89,
+ 89, 89, 90, 91, 91, 91, 91, 91, 91, 91,
+
+ 91, 92, 93, 93, 94, 94, 94, 95, 95, 95,
+ 95, 96, 96, 97, 97, 97, 98, 98, 98, 99,
+ 99, 99, 99, 99, 100, 100, 100, 101, 101, 101,
+ 101, 102, 102, 103, 103, 103, 103, 104, 105, 105,
+ 105, 106, 106, 106, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 108, 108, 108, 108, 108, 108, 108, 108,
+ 108, 108, 108, 108, 109, 109, 110, 111, 111, 111,
+ 111, 111, 111, 112, 112, 113, 113, 114, 114, 115,
+ 115, 115, 116, 116, 116, 117, 118, 118, 119, 119,
+
+ 119, 119, 119, 119, 120, 121, 122, 123, 123, 123,
+ 123, 124, 125, 125, 125, 125, 126, 127, 127, 128,
+ 128, 128, 129, 129, 129, 130, 131, 131, 132, 132,
+ 132, 132, 132, 133, 133, 134, 135, 136, 136, 137,
+ 138, 139, 140, 141, 141, 142, 143, 143, 143, 144,
+ 144, 145, 145, 146, 146, 147, 148, 149, 149
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
+ 1, 7, 1, 1, 1, 8, 9, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 11, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 12, 1, 1, 1, 12, 1, 12, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 13, 1, 1, 1, 1, 14, 15, 16, 17,
+
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst int yy_meta[40] =
+ { 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1
+ } ;
+
+static yyconst short int yy_base[365] =
+ { 0,
+ 0, 0, 387, 37, 38, 39, 389, 391, 391, 391,
+ 391, 0, 381, 36, 39, 52, 359, 32, 51, 35,
+ 368, 56, 367, 370, 355, 364, 62, 63, 354, 366,
+ 391, 391, 82, 391, 391, 391, 0, 0, 372, 77,
+ 391, 74, 350, 78, 346, 351, 79, 30, 347, 86,
+ 346, 68, 355, 84, 338, 353, 78, 356, 352, 343,
+ 329, 349, 338, 332, 331, 327, 339, 335, 334, 344,
+ 391, 341, 338, 324, 321, 90, 320, 313, 323, 313,
+ 315, 322, 331, 391, 343, 391, 391, 338, 102, 327,
+ 318, 88, 304, 308, 314, 311, 310, 310, 316, 391,
+
+ 391, 96, 302, 86, 308, 302, 299, 313, 299, 293,
+ 308, 312, 289, 308, 306, 298, 102, 294, 293, 282,
+ 291, 302, 106, 299, 284, 283, 296, 296, 287, 282,
+ 286, 287, 286, 289, 278, 271, 270, 284, 284, 272,
+ 267, 281, 284, 283, 118, 391, 265, 391, 266, 261,
+ 255, 265, 259, 276, 275, 262, 272, 269, 264, 270,
+ 391, 267, 250, 260, 262, 253, 256, 246, 244, 391,
+ 257, 251, 240, 254, 240, 236, 244, 250, 248, 247,
+ 391, 232, 250, 391, 244, 237, 228, 242, 237, 240,
+ 223, 391, 391, 237, 224, 238, 218, 230, 220, 225,
+
+ 391, 391, 238, 391, 217, 214, 239, 227, 230, 112,
+ 391, 210, 391, 220, 219, 391, 226, 214, 391, 213,
+ 216, 222, 207, 391, 220, 205, 391, 204, 194, 212,
+ 391, 198, 391, 210, 213, 194, 391, 391, 203, 193,
+ 391, 195, 190, 391, 194, 189, 202, 180, 199, 183,
+ 197, 183, 186, 198, 132, 187, 188, 177, 177, 185,
+ 179, 391, 180, 177, 178, 184, 172, 182, 179, 181,
+ 172, 169, 168, 391, 178, 391, 391, 173, 160, 172,
+ 173, 160, 391, 155, 391, 169, 391, 170, 391, 166,
+ 166, 391, 163, 137, 391, 179, 141, 391, 153, 148,
+
+ 165, 151, 144, 391, 391, 391, 391, 162, 143, 156,
+ 391, 391, 141, 158, 138, 391, 391, 132, 391, 151,
+ 140, 391, 134, 141, 391, 391, 143, 145, 138, 146,
+ 130, 130, 391, 130, 391, 391, 391, 135, 391, 391,
+ 391, 391, 391, 145, 391, 391, 126, 114, 391, 104,
+ 391, 111, 391, 98, 391, 391, 391, 391, 149, 151,
+ 81, 62, 153, 155
+ } ;
+
+static yyconst short int yy_def[365] =
+ { 0,
+ 358, 1, 359, 359, 360, 360, 358, 358, 358, 358,
+ 358, 361, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 362, 361, 363, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 363, 363, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 363, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+
+ 358, 358, 358, 358, 358, 358, 363, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 364, 358, 358, 358,
+
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 364, 364, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 0, 358, 358,
+ 358, 358, 358, 358
+ } ;
+
+static yyconst short int yy_nxt[431] =
+ { 0,
+ 8, 9, 10, 9, 11, 12, 8, 8, 13, 14,
+ 15, 8, 8, 16, 17, 8, 18, 19, 20, 8,
+ 21, 22, 8, 23, 8, 24, 25, 8, 8, 8,
+ 26, 27, 28, 29, 30, 8, 8, 8, 8, 32,
+ 35, 35, 36, 36, 33, 40, 100, 41, 68, 63,
+ 37, 37, 42, 64, 43, 44, 69, 45, 46, 47,
+ 48, 101, 87, 49, 50, 51, 52, 53, 59, 54,
+ 55, 56, 57, 58, 71, 65, 60, 66, 61, 77,
+ 80, 38, 72, 78, 84, 85, 40, 67, 41, 86,
+ 90, 93, 98, 81, 79, 94, 107, 110, 91, 103,
+
+ 99, 111, 108, 104, 114, 95, 133, 105, 145, 115,
+ 146, 160, 134, 149, 150, 135, 151, 163, 164, 136,
+ 177, 152, 137, 184, 89, 260, 207, 185, 357, 261,
+ 356, 161, 178, 294, 295, 296, 355, 297, 294, 295,
+ 296, 354, 297, 295, 328, 295, 328, 345, 328, 31,
+ 31, 34, 34, 88, 88, 327, 327, 353, 352, 351,
+ 350, 349, 348, 347, 346, 344, 343, 342, 341, 340,
+ 339, 338, 337, 336, 335, 334, 333, 332, 331, 330,
+ 329, 295, 326, 325, 324, 323, 322, 321, 320, 319,
+ 318, 317, 316, 315, 314, 313, 312, 311, 310, 309,
+
+ 308, 307, 306, 305, 304, 303, 302, 301, 300, 299,
+ 298, 293, 292, 291, 290, 289, 288, 287, 286, 285,
+ 284, 283, 282, 281, 280, 279, 278, 277, 276, 275,
+ 274, 273, 272, 271, 270, 269, 268, 267, 266, 265,
+ 264, 263, 262, 259, 258, 89, 257, 256, 255, 254,
+ 253, 252, 251, 250, 249, 248, 247, 246, 245, 244,
+ 243, 242, 241, 240, 239, 238, 237, 236, 235, 234,
+ 233, 232, 231, 230, 229, 228, 227, 226, 225, 224,
+ 223, 222, 221, 220, 219, 218, 217, 216, 215, 214,
+ 213, 212, 211, 210, 209, 208, 206, 205, 204, 203,
+
+ 202, 201, 200, 199, 198, 197, 196, 195, 194, 193,
+ 192, 191, 190, 189, 188, 187, 186, 183, 182, 181,
+ 180, 179, 176, 175, 174, 173, 172, 171, 170, 169,
+ 168, 167, 166, 165, 162, 159, 158, 157, 156, 155,
+ 154, 153, 148, 147, 89, 84, 144, 143, 142, 141,
+ 140, 139, 138, 132, 131, 130, 129, 128, 127, 126,
+ 125, 124, 123, 122, 121, 120, 119, 118, 117, 116,
+ 113, 112, 109, 106, 102, 97, 96, 92, 89, 83,
+ 82, 76, 75, 74, 73, 70, 62, 39, 358, 32,
+ 7, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358
+ } ;
+
+static yyconst short int yy_chk[431] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
+ 5, 6, 5, 6, 4, 14, 48, 14, 20, 18,
+ 5, 6, 15, 18, 15, 15, 20, 15, 15, 15,
+ 15, 48, 362, 15, 15, 15, 15, 15, 16, 15,
+ 15, 15, 15, 15, 22, 19, 16, 19, 16, 27,
+ 28, 361, 22, 27, 33, 33, 40, 19, 40, 33,
+ 42, 44, 47, 28, 27, 44, 52, 54, 42, 50,
+
+ 47, 54, 52, 50, 57, 44, 76, 50, 89, 57,
+ 89, 102, 76, 92, 92, 76, 92, 104, 104, 76,
+ 117, 92, 76, 123, 145, 210, 145, 123, 354, 210,
+ 352, 102, 117, 255, 255, 255, 350, 255, 294, 294,
+ 294, 348, 294, 297, 297, 327, 327, 328, 328, 359,
+ 359, 360, 360, 363, 363, 364, 364, 347, 344, 338,
+ 334, 332, 331, 330, 329, 324, 323, 321, 320, 318,
+ 315, 314, 313, 310, 309, 308, 303, 302, 301, 300,
+ 299, 296, 293, 291, 290, 288, 286, 284, 282, 281,
+ 280, 279, 278, 275, 273, 272, 271, 270, 269, 268,
+
+ 267, 266, 265, 264, 263, 261, 260, 259, 258, 257,
+ 256, 254, 253, 252, 251, 250, 249, 248, 247, 246,
+ 245, 243, 242, 240, 239, 236, 235, 234, 232, 230,
+ 229, 228, 226, 225, 223, 222, 221, 220, 218, 217,
+ 215, 214, 212, 209, 208, 207, 206, 205, 203, 200,
+ 199, 198, 197, 196, 195, 194, 191, 190, 189, 188,
+ 187, 186, 185, 183, 182, 180, 179, 178, 177, 176,
+ 175, 174, 173, 172, 171, 169, 168, 167, 166, 165,
+ 164, 163, 162, 160, 159, 158, 157, 156, 155, 154,
+ 153, 152, 151, 150, 149, 147, 144, 143, 142, 141,
+
+ 140, 139, 138, 137, 136, 135, 134, 133, 132, 131,
+ 130, 129, 128, 127, 126, 125, 124, 122, 121, 120,
+ 119, 118, 116, 115, 114, 113, 112, 111, 110, 109,
+ 108, 107, 106, 105, 103, 99, 98, 97, 96, 95,
+ 94, 93, 91, 90, 88, 85, 83, 82, 81, 80,
+ 79, 78, 77, 75, 74, 73, 72, 70, 69, 68,
+ 67, 66, 65, 64, 63, 62, 61, 60, 59, 58,
+ 56, 55, 53, 51, 49, 46, 45, 43, 39, 30,
+ 29, 26, 25, 24, 23, 21, 17, 13, 7, 3,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358
+ } ;
+
+static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
+static char *yy_full_match;
+static int yy_lp;
+#define REJECT \
+{ \
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
+yy_cp = yy_full_match; /* restore poss. backed-over text */ \
+++yy_lp; \
+goto find_rule; \
+}
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "sieve-lex.l"
+#define INITIAL 0
+#line 2 "sieve-lex.l"
+/* sieve.l -- sieve lexer
+ * Larry Greenfield
+ * $Id: sieve-lex.l,v 1.20.8.5 2005/10/05 15:56:24 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h> /* for strdup */
+#include "xmalloc.h"
+
+#include "tree.h"
+#include "sieve.h"
+
+static int tonum(char *c);
+static char *chkstr(char *);
+static char *mlbuf;
+static int mlbufsz, mlcur;
+extern int yyerror(char *);
+#define YY_NO_UNPUT 1
+#define MULTILINE 1
+
+#define QSTRING 2
+
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ if ( yyleng > 0 ) \
+ yy_current_buffer->yy_at_bol = \
+ (yytext[yyleng - 1] == '\n'); \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp = NULL, *yy_bp = NULL;
+ register int yy_act;
+
+#line 57 "sieve-lex.l"
+
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 359 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 391 );
+
+yy_find_action:
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+ for ( ; ; ) /* until we find what rule we matched */
+ {
+ if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
+ {
+ yy_act = yy_acclist[yy_lp];
+ {
+ yy_full_match = yy_cp;
+ break;
+ }
+ }
+ --yy_cp;
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+ if ( yy_act != YY_END_OF_BUFFER )
+ {
+ int yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
+ if ( yytext[yyl] == '\n' )
+ ++yylineno;
+ }
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+case 1:
+YY_RULE_SETUP
+#line 58 "sieve-lex.l"
+{ BEGIN INITIAL;
+ if (mlbuf) mlbuf[mlcur] = '\0';
+ yylval.sval = chkstr(mlbuf); return STRING; }
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 61 "sieve-lex.l"
+{ /* dot stuffing! we want one . */ yyless(1); }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 62 "sieve-lex.l"
+{ if (mlcur == mlbufsz)
+ mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024));
+ mlbuf[mlcur++] = yytext[0]; }
+ YY_BREAK
+case YY_STATE_EOF(MULTILINE):
+#line 65 "sieve-lex.l"
+{ yyerror("unexpected end of file in string");
+ yyterminate(); }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 67 "sieve-lex.l"
+{ BEGIN INITIAL;
+ if (mlbuf) mlbuf[mlcur] = '\0';
+ yylval.sval = chkstr(mlbuf); return STRING; }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 70 "sieve-lex.l"
+{ if (mlcur == mlbufsz)
+ mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024));
+ mlbuf[mlcur++] = yytext[1]; }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 73 "sieve-lex.l"
+{ if (mlcur == mlbufsz)
+ mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024));
+ mlbuf[mlcur++] = yytext[0]; }
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 76 "sieve-lex.l"
+{ BEGIN MULTILINE;
+ mlcur = 0; mlbufsz = 0; mlbuf = NULL; }
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 78 "sieve-lex.l"
+{ BEGIN QSTRING;
+ mlcur = 0; mlbufsz = 0; mlbuf = NULL; }
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 80 "sieve-lex.l"
+{ yylval.nval = tonum(yytext); return NUMBER; }
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 81 "sieve-lex.l"
+return IF;
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 82 "sieve-lex.l"
+return ELSIF;
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 83 "sieve-lex.l"
+return ELSE;
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 84 "sieve-lex.l"
+return ANYOF;
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 85 "sieve-lex.l"
+return ALLOF;
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 86 "sieve-lex.l"
+return EXISTS;
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 87 "sieve-lex.l"
+return SFALSE;
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 88 "sieve-lex.l"
+return STRUE;
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 89 "sieve-lex.l"
+return ADDRESS;
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 90 "sieve-lex.l"
+return ENVELOPE;
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 91 "sieve-lex.l"
+return HEADER;
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 92 "sieve-lex.l"
+return BODY;
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 93 "sieve-lex.l"
+return NOT;
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 94 "sieve-lex.l"
+return SIZE;
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 95 "sieve-lex.l"
+return REJCT;
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 96 "sieve-lex.l"
+return FILEINTO;
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 97 "sieve-lex.l"
+return REDIRECT;
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 98 "sieve-lex.l"
+return KEEP;
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 99 "sieve-lex.l"
+return REQUIRE;
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 100 "sieve-lex.l"
+return STOP;
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 101 "sieve-lex.l"
+return DISCARD;
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 102 "sieve-lex.l"
+return SETFLAG;
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 103 "sieve-lex.l"
+return ADDFLAG;
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 104 "sieve-lex.l"
+return REMOVEFLAG;
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 105 "sieve-lex.l"
+return MARK;
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 106 "sieve-lex.l"
+return UNMARK;
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 107 "sieve-lex.l"
+return NOTIFY;
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 108 "sieve-lex.l"
+return DENOTIFY;
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 109 "sieve-lex.l"
+return ID;
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 110 "sieve-lex.l"
+return METHOD;
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 111 "sieve-lex.l"
+return OPTIONS;
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 112 "sieve-lex.l"
+return LOW;
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 113 "sieve-lex.l"
+return NORMAL;
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 114 "sieve-lex.l"
+return HIGH;
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 115 "sieve-lex.l"
+return MESSAGE;
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 116 "sieve-lex.l"
+return VACATION;
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 117 "sieve-lex.l"
+return DAYS;
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 118 "sieve-lex.l"
+return ADDRESSES;
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 119 "sieve-lex.l"
+return SUBJECT;
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 120 "sieve-lex.l"
+return FROM;
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 121 "sieve-lex.l"
+return HANDLE;
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 122 "sieve-lex.l"
+return MIME;
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 123 "sieve-lex.l"
+return COMPARATOR;
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 124 "sieve-lex.l"
+return IS;
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 125 "sieve-lex.l"
+return CONTAINS;
+ YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 126 "sieve-lex.l"
+return MATCHES;
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 127 "sieve-lex.l"
+return REGEX;
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 128 "sieve-lex.l"
+return COUNT;
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 129 "sieve-lex.l"
+return VALUE;
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 130 "sieve-lex.l"
+return OVER;
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 131 "sieve-lex.l"
+return UNDER;
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 132 "sieve-lex.l"
+return ALL;
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 133 "sieve-lex.l"
+return LOCALPART;
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 134 "sieve-lex.l"
+return DOMAIN;
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 135 "sieve-lex.l"
+return USER;
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 136 "sieve-lex.l"
+return DETAIL;
+ YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 137 "sieve-lex.l"
+return RAW;
+ YY_BREAK
+case 67:
+YY_RULE_SETUP
+#line 138 "sieve-lex.l"
+return TEXT;
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 139 "sieve-lex.l"
+return CONTENT;
+ YY_BREAK
+case 69:
+YY_RULE_SETUP
+#line 140 "sieve-lex.l"
+return INCLUDE;
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 141 "sieve-lex.l"
+return PERSONAL;
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 142 "sieve-lex.l"
+return GLOBAL;
+ YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 143 "sieve-lex.l"
+return RETURN;
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 144 "sieve-lex.l"
+return COPY;
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 145 "sieve-lex.l"
+; /* ignore whitespace */
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 146 "sieve-lex.l"
+; /* ignore hash comments */
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 147 "sieve-lex.l"
+; /* ignore bracket comments */
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 148 "sieve-lex.l"
+return yytext[0];
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 150 "sieve-lex.l"
+ECHO;
+ YY_BREAK
+ case YY_STATE_EOF(INITIAL):
+ case YY_STATE_EOF(QSTRING):
+ yyterminate();
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
+ * consistency between yy_current_buffer and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * yytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 359 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+
+ register YY_CHAR yy_c = 1;
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 359 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 358);
+ if ( ! yy_is_jam )
+ *yy_state_ptr++ = yy_current_state;
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+ if ( c == '\n' )
+ --yylineno;
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+ yy_current_buffer->yy_at_bol = (c == '\n');
+ if ( yy_current_buffer->yy_at_bol )
+ ++yylineno;
+
+ return c;
+ }
+#endif /* YY_NO_INPUT */
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+#line 150 "sieve-lex.l"
+
+/* */
+static int tonum(char *c)
+{
+ int val = atoi(c);
+ switch (c[strlen(c)-1]) {
+ case 'K': val *= (1 << 10); break;
+ case 'M': val *= (1 << 20); break;
+ case 'G': val *= (1 << 30); break;
+ default: break;
+ }
+ return val;
+}
+
+/* convert NULL strings to "" */
+static char *chkstr(char *str)
+{
+ if (!str) return xstrdup("");
+ else return str;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.l
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.l?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.l (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve-lex.l Sat Aug 26 02:00:13 2006
@@ -1,0 +1,169 @@
+%{
+/* sieve.l -- sieve lexer
+ * Larry Greenfield
+ * $Id: sieve-lex.l,v 1.20.8.5 2005/10/05 15:56:24 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h> /* for strdup */
+#include "xmalloc.h"
+
+#include "tree.h"
+#include "sieve.h"
+
+static int tonum(char *c);
+static char *chkstr(char *);
+static char *mlbuf;
+static int mlbufsz, mlcur;
+extern int yyerror(char *);
+%}
+
+%option yylineno
+%option noyywrap
+%option nounput
+
+ws [ \t]+
+ident [a-zA-Z_][a-zA-Z_0-9]*
+CRLF (\r\n|\r|\n)
+
+%state MULTILINE
+%state QSTRING
+
+%%
+<MULTILINE>^\.{CRLF} { BEGIN INITIAL;
+ if (mlbuf) mlbuf[mlcur] = '\0';
+ yylval.sval = chkstr(mlbuf); return STRING; }
+<MULTILINE>^\.\. { /* dot stuffing! we want one . */ yyless(1); }
+<MULTILINE>(.|\n) { if (mlcur == mlbufsz)
+ mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024));
+ mlbuf[mlcur++] = yytext[0]; }
+<MULTILINE><<EOF>> { yyerror("unexpected end of file in string");
+ yyterminate(); }
+<QSTRING>\" { BEGIN INITIAL;
+ if (mlbuf) mlbuf[mlcur] = '\0';
+ yylval.sval = chkstr(mlbuf); return STRING; }
+<QSTRING>\\. { if (mlcur == mlbufsz)
+ mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024));
+ mlbuf[mlcur++] = yytext[1]; }
+<QSTRING>(.|\n) { if (mlcur == mlbufsz)
+ mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024));
+ mlbuf[mlcur++] = yytext[0]; }
+<INITIAL>text:{ws}?(#.*)?{CRLF} { BEGIN MULTILINE;
+ mlcur = 0; mlbufsz = 0; mlbuf = NULL; }
+<INITIAL>\" { BEGIN QSTRING;
+ mlcur = 0; mlbufsz = 0; mlbuf = NULL; }
+<INITIAL>[0-9]+[KMG]? { yylval.nval = tonum(yytext); return NUMBER; }
+<INITIAL>if return IF;
+<INITIAL>elsif return ELSIF;
+<INITIAL>else return ELSE;
+<INITIAL>anyof return ANYOF;
+<INITIAL>allof return ALLOF;
+<INITIAL>exists return EXISTS;
+<INITIAL>false return SFALSE;
+<INITIAL>true return STRUE;
+<INITIAL>address return ADDRESS;
+<INITIAL>envelope return ENVELOPE;
+<INITIAL>header return HEADER;
+<INITIAL>body return BODY;
+<INITIAL>not return NOT;
+<INITIAL>size return SIZE;
+<INITIAL>reject return REJCT;
+<INITIAL>fileinto return FILEINTO;
+<INITIAL>redirect return REDIRECT;
+<INITIAL>keep return KEEP;
+<INITIAL>require return REQUIRE;
+<INITIAL>stop return STOP;
+<INITIAL>discard return DISCARD;
+<INITIAL>setflag return SETFLAG;
+<INITIAL>addflag return ADDFLAG;
+<INITIAL>removeflag return REMOVEFLAG;
+<INITIAL>mark return MARK;
+<INITIAL>unmark return UNMARK;
+<INITIAL>notify return NOTIFY;
+<INITIAL>denotify return DENOTIFY;
+<INITIAL>:id return ID;
+<INITIAL>:method return METHOD;
+<INITIAL>:options return OPTIONS;
+<INITIAL>:low return LOW;
+<INITIAL>:normal return NORMAL;
+<INITIAL>:high return HIGH;
+<INITIAL>:message return MESSAGE;
+<INITIAL>vacation return VACATION;
+<INITIAL>:days return DAYS;
+<INITIAL>:addresses return ADDRESSES;
+<INITIAL>:subject return SUBJECT;
+<INITIAL>:from return FROM;
+<INITIAL>:handle return HANDLE;
+<INITIAL>:mime return MIME;
+<INITIAL>:comparator return COMPARATOR;
+<INITIAL>:is return IS;
+<INITIAL>:contains return CONTAINS;
+<INITIAL>:matches return MATCHES;
+<INITIAL>:regex return REGEX;
+<INITIAL>:count return COUNT;
+<INITIAL>:value return VALUE;
+<INITIAL>:over return OVER;
+<INITIAL>:under return UNDER;
+<INITIAL>:all return ALL;
+<INITIAL>:localpart return LOCALPART;
+<INITIAL>:domain return DOMAIN;
+<INITIAL>:user return USER;
+<INITIAL>:detail return DETAIL;
+<INITIAL>:raw return RAW;
+<INITIAL>:text return TEXT;
+<INITIAL>:content return CONTENT;
+<INITIAL>include return INCLUDE;
+<INITIAL>:personal return PERSONAL;
+<INITIAL>:global return GLOBAL;
+<INITIAL>return return RETURN;
+<INITIAL>:copy return COPY;
+<INITIAL>[ \t\n\r] ; /* ignore whitespace */
+<INITIAL>#.* ; /* ignore hash comments */
+<INITIAL>"/*"([^\*]|\*[^\/])*\*?"*/" ; /* ignore bracket comments */
+. return yytext[0];
+
+%%
+/* */
+static int tonum(char *c)
+{
+ int val = atoi(c);
+ switch (c[strlen(c)-1]) {
+ case 'K': val *= (1 << 10); break;
+ case 'M': val *= (1 << 20); break;
+ case 'G': val *= (1 << 30); break;
+ default: break;
+ }
+ return val;
+}
+
+/* convert NULL strings to "" */
+static char *chkstr(char *str)
+{
+ if (!str) return xstrdup("");
+ else return str;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3302 @@
+/* A Bison parser, made by GNU Bison 2.1. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.1"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ NUMBER = 258,
+ STRING = 259,
+ IF = 260,
+ ELSIF = 261,
+ ELSE = 262,
+ REJCT = 263,
+ FILEINTO = 264,
+ REDIRECT = 265,
+ KEEP = 266,
+ STOP = 267,
+ DISCARD = 268,
+ VACATION = 269,
+ REQUIRE = 270,
+ SETFLAG = 271,
+ ADDFLAG = 272,
+ REMOVEFLAG = 273,
+ MARK = 274,
+ UNMARK = 275,
+ NOTIFY = 276,
+ DENOTIFY = 277,
+ ANYOF = 278,
+ ALLOF = 279,
+ EXISTS = 280,
+ SFALSE = 281,
+ STRUE = 282,
+ HEADER = 283,
+ NOT = 284,
+ SIZE = 285,
+ ADDRESS = 286,
+ ENVELOPE = 287,
+ BODY = 288,
+ COMPARATOR = 289,
+ IS = 290,
+ CONTAINS = 291,
+ MATCHES = 292,
+ REGEX = 293,
+ COUNT = 294,
+ VALUE = 295,
+ OVER = 296,
+ UNDER = 297,
+ GT = 298,
+ GE = 299,
+ LT = 300,
+ LE = 301,
+ EQ = 302,
+ NE = 303,
+ ALL = 304,
+ LOCALPART = 305,
+ DOMAIN = 306,
+ USER = 307,
+ DETAIL = 308,
+ RAW = 309,
+ TEXT = 310,
+ CONTENT = 311,
+ DAYS = 312,
+ ADDRESSES = 313,
+ SUBJECT = 314,
+ FROM = 315,
+ HANDLE = 316,
+ MIME = 317,
+ METHOD = 318,
+ ID = 319,
+ OPTIONS = 320,
+ LOW = 321,
+ NORMAL = 322,
+ HIGH = 323,
+ ANY = 324,
+ MESSAGE = 325,
+ INCLUDE = 326,
+ PERSONAL = 327,
+ GLOBAL = 328,
+ RETURN = 329,
+ COPY = 330
+ };
+#endif
+/* Tokens. */
+#define NUMBER 258
+#define STRING 259
+#define IF 260
+#define ELSIF 261
+#define ELSE 262
+#define REJCT 263
+#define FILEINTO 264
+#define REDIRECT 265
+#define KEEP 266
+#define STOP 267
+#define DISCARD 268
+#define VACATION 269
+#define REQUIRE 270
+#define SETFLAG 271
+#define ADDFLAG 272
+#define REMOVEFLAG 273
+#define MARK 274
+#define UNMARK 275
+#define NOTIFY 276
+#define DENOTIFY 277
+#define ANYOF 278
+#define ALLOF 279
+#define EXISTS 280
+#define SFALSE 281
+#define STRUE 282
+#define HEADER 283
+#define NOT 284
+#define SIZE 285
+#define ADDRESS 286
+#define ENVELOPE 287
+#define BODY 288
+#define COMPARATOR 289
+#define IS 290
+#define CONTAINS 291
+#define MATCHES 292
+#define REGEX 293
+#define COUNT 294
+#define VALUE 295
+#define OVER 296
+#define UNDER 297
+#define GT 298
+#define GE 299
+#define LT 300
+#define LE 301
+#define EQ 302
+#define NE 303
+#define ALL 304
+#define LOCALPART 305
+#define DOMAIN 306
+#define USER 307
+#define DETAIL 308
+#define RAW 309
+#define TEXT 310
+#define CONTENT 311
+#define DAYS 312
+#define ADDRESSES 313
+#define SUBJECT 314
+#define FROM 315
+#define HANDLE 316
+#define MIME 317
+#define METHOD 318
+#define ID 319
+#define OPTIONS 320
+#define LOW 321
+#define NORMAL 322
+#define HIGH 323
+#define ANY 324
+#define MESSAGE 325
+#define INCLUDE 326
+#define PERSONAL 327
+#define GLOBAL 328
+#define RETURN 329
+#define COPY 330
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 1 "sieve.y"
+
+/* sieve.y -- sieve parser
+ * Larry Greenfield
+ * $Id: sieve.y,v 1.23.2.13 2005/10/05 15:56:24 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include "xmalloc.h"
+#include "comparator.h"
+#include "interp.h"
+#include "script.h"
+#include "tree.h"
+
+#include "../lib/util.h"
+#include "../lib/imparse.h"
+#include "../lib/libconfig.h"
+
+ /* definitions */
+ extern int addrparse(void);
+
+struct vtags {
+ int days;
+ stringlist_t *addresses;
+ char *subject;
+ char *from;
+ char *handle;
+ int mime;
+};
+
+struct htags {
+ char *comparator;
+ int comptag;
+ int relation;
+};
+
+struct aetags {
+ int addrtag;
+ char *comparator;
+ int comptag;
+ int relation;
+};
+
+struct btags {
+ int transform;
+ int offset;
+ stringlist_t *content_types;
+ char *comparator;
+ int comptag;
+ int relation;
+};
+
+struct ntags {
+ char *method;
+ char *id;
+ stringlist_t *options;
+ int priority;
+ char *message;
+};
+
+struct dtags {
+ int comptag;
+ int relation;
+ void *pattern;
+ int priority;
+};
+
+static commandlist_t *ret;
+static sieve_script_t *parse_script;
+static int check_reqs(stringlist_t *sl);
+static test_t *build_address(int t, struct aetags *ae,
+ stringlist_t *sl, stringlist_t *pl);
+static test_t *build_header(int t, struct htags *h,
+ stringlist_t *sl, stringlist_t *pl);
+static test_t *build_body(int t, struct btags *b, stringlist_t *pl);
+static commandlist_t *build_vacation(int t, struct vtags *h, char *s);
+static commandlist_t *build_notify(int t, struct ntags *n);
+static commandlist_t *build_denotify(int t, struct dtags *n);
+static commandlist_t *build_fileinto(int t, int c, char *f);
+static commandlist_t *build_redirect(int t, int c, char *a);
+static struct aetags *new_aetags(void);
+static struct aetags *canon_aetags(struct aetags *ae);
+static void free_aetags(struct aetags *ae);
+static struct htags *new_htags(void);
+static struct htags *canon_htags(struct htags *h);
+static void free_htags(struct htags *h);
+static struct btags *new_btags(void);
+static struct btags *canon_btags(struct btags *b);
+static void free_btags(struct btags *b);
+static struct vtags *new_vtags(void);
+static struct vtags *canon_vtags(struct vtags *v);
+static void free_vtags(struct vtags *v);
+static struct ntags *new_ntags(void);
+static struct ntags *canon_ntags(struct ntags *n);
+static void free_ntags(struct ntags *n);
+static struct dtags *new_dtags(void);
+static struct dtags *canon_dtags(struct dtags *d);
+static void free_dtags(struct dtags *d);
+
+static int verify_stringlist(stringlist_t *sl, int (*verify)(char *));
+static int verify_mailbox(char *s);
+static int verify_address(char *s);
+static int verify_header(char *s);
+static int verify_addrheader(char *s);
+static int verify_envelope(char *s);
+static int verify_flag(char *s);
+static int verify_relat(char *s);
+#ifdef ENABLE_REGEX
+static int verify_regex(char *s, int cflags);
+static int verify_regexs(stringlist_t *sl, char *comp);
+#endif
+static int verify_utf8(char *s);
+
+int yyerror(char *msg);
+extern int yylex(void);
+extern void yyrestart(FILE *f);
+
+#define YYERROR_VERBOSE /* i want better error messages! */
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 149 "sieve.y"
+typedef union YYSTYPE {
+ int nval;
+ char *sval;
+ stringlist_t *sl;
+ test_t *test;
+ testlist_t *testl;
+ commandlist_t *cl;
+ struct vtags *vtag;
+ struct aetags *aetag;
+ struct htags *htag;
+ struct btags *btag;
+ struct ntags *ntag;
+ struct dtags *dtag;
+} YYSTYPE;
+/* Line 196 of yacc.c. */
+#line 398 "y.tab.c"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 219 of yacc.c. */
+#line 410 "y.tab.c"
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYINCLUDED_STDLIB_H
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifdef __cplusplus
+}
+# endif
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short int yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short int yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 8
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 248
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 84
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 28
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 106
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 164
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 330
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 82, 83, 2, 2, 79, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 76,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 77, 2, 78, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 80, 2, 81, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned short int yyprhs[] =
+{
+ 0, 0, 3, 5, 8, 9, 12, 16, 18, 21,
+ 24, 29, 32, 33, 38, 41, 44, 48, 52, 54,
+ 56, 58, 62, 65, 68, 71, 73, 75, 78, 81,
+ 85, 87, 88, 90, 92, 93, 97, 101, 105, 108,
+ 112, 113, 116, 120, 124, 126, 128, 130, 131, 135,
+ 139, 143, 147, 151, 154, 158, 160, 162, 166, 170,
+ 173, 176, 179, 182, 184, 186, 191, 196, 200, 203,
+ 207, 209, 211, 213, 214, 217, 220, 224, 228, 229,
+ 232, 236, 240, 241, 244, 247, 251, 254, 258, 262,
+ 264, 266, 268, 270, 272, 274, 276, 278, 280, 282,
+ 284, 286, 288, 289, 291, 295, 297
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+ 85, 0, -1, 86, -1, 86, 88, -1, -1, 87,
+ 86, -1, 15, 97, 76, -1, 89, -1, 89, 88,
+ -1, 91, 76, -1, 5, 100, 99, 90, -1, 1,
+ 76, -1, -1, 6, 100, 99, 90, -1, 7, 99,
+ -1, 8, 4, -1, 9, 109, 4, -1, 10, 109,
+ 4, -1, 11, -1, 12, -1, 13, -1, 14, 96,
+ 4, -1, 16, 97, -1, 17, 97, -1, 18, 97,
+ -1, 19, -1, 20, -1, 21, 93, -1, 22, 94,
+ -1, 71, 92, 4, -1, 74, -1, -1, 72, -1,
+ 73, -1, -1, 93, 64, 4, -1, 93, 63, 4,
+ -1, 93, 65, 97, -1, 93, 95, -1, 93, 70,
+ 4, -1, -1, 94, 95, -1, 94, 106, 4, -1,
+ 94, 107, 4, -1, 66, -1, 67, -1, 68, -1,
+ -1, 96, 57, 3, -1, 96, 58, 97, -1, 96,
+ 59, 4, -1, 96, 60, 4, -1, 96, 61, 4,
+ -1, 96, 62, -1, 77, 98, 78, -1, 4, -1,
+ 4, -1, 4, 79, 98, -1, 80, 88, 81, -1,
+ 80, 81, -1, 23, 110, -1, 24, 110, -1, 25,
+ 97, -1, 26, -1, 27, -1, 28, 103, 97, 97,
+ -1, 101, 102, 97, 97, -1, 33, 104, 97, -1,
+ 29, 100, -1, 30, 108, 3, -1, 1, -1, 31,
+ -1, 32, -1, -1, 102, 105, -1, 102, 106, -1,
+ 102, 107, 4, -1, 102, 34, 4, -1, -1, 103,
+ 106, -1, 103, 107, 4, -1, 103, 34, 4, -1,
+ -1, 104, 54, -1, 104, 55, -1, 104, 56, 97,
+ -1, 104, 106, -1, 104, 107, 4, -1, 104, 34,
+ 4, -1, 49, -1, 50, -1, 51, -1, 52, -1,
+ 53, -1, 35, -1, 36, -1, 37, -1, 38, -1,
+ 39, -1, 40, -1, 41, -1, 42, -1, -1, 75,
+ -1, 82, 111, 83, -1, 100, -1, 100, 79, 111,
+ -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned short int yyrline[] =
+{
+ 0, 195, 195, 196, 199, 200, 203, 209, 210, 213,
+ 214, 215, 218, 219, 220, 223, 232, 240, 244, 245,
+ 246, 247, 256, 265, 274, 283, 288, 294, 302, 312,
+ 319, 326, 327, 328, 331, 332, 335, 338, 341, 344,
+ 349, 350, 353, 368, 378, 379, 380, 383, 384, 387,
+ 395, 401, 407, 413, 419, 420, 423, 424, 427, 428,
+ 431, 432, 433, 434, 435, 436, 460, 482, 508, 509,
+ 511, 514, 515, 522, 523, 528, 532, 540, 550, 551,
+ 555, 563, 573, 574, 579, 584, 592, 596, 604, 615,
+ 616, 617, 618, 623, 629, 630, 631, 632, 639, 644,
+ 652, 653, 656, 657, 664, 667, 668
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "NUMBER", "STRING", "IF", "ELSIF",
+ "ELSE", "REJCT", "FILEINTO", "REDIRECT", "KEEP", "STOP", "DISCARD",
+ "VACATION", "REQUIRE", "SETFLAG", "ADDFLAG", "REMOVEFLAG", "MARK",
+ "UNMARK", "NOTIFY", "DENOTIFY", "ANYOF", "ALLOF", "EXISTS", "SFALSE",
+ "STRUE", "HEADER", "NOT", "SIZE", "ADDRESS", "ENVELOPE", "BODY",
+ "COMPARATOR", "IS", "CONTAINS", "MATCHES", "REGEX", "COUNT", "VALUE",
+ "OVER", "UNDER", "GT", "GE", "LT", "LE", "EQ", "NE", "ALL", "LOCALPART",
+ "DOMAIN", "USER", "DETAIL", "RAW", "TEXT", "CONTENT", "DAYS",
+ "ADDRESSES", "SUBJECT", "FROM", "HANDLE", "MIME", "METHOD", "ID",
+ "OPTIONS", "LOW", "NORMAL", "HIGH", "ANY", "MESSAGE", "INCLUDE",
+ "PERSONAL", "GLOBAL", "RETURN", "COPY", "';'", "'['", "']'", "','",
+ "'{'", "'}'", "'('", "')'", "$accept", "start", "reqs", "require",
+ "commands", "command", "elsif", "action", "location", "ntags", "dtags",
+ "priority", "vtags", "stringlist", "strings", "block", "test",
+ "addrorenv", "aetags", "htags", "btags", "addrparttag", "comptag",
+ "relcomp", "sizetag", "copy", "testlist", "tests", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short int yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 59, 91, 93, 44,
+ 123, 125, 40, 41
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 84, 85, 85, 86, 86, 87, 88, 88, 89,
+ 89, 89, 90, 90, 90, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 92, 92, 92, 93, 93, 93, 93, 93, 93,
+ 94, 94, 94, 94, 95, 95, 95, 96, 96, 96,
+ 96, 96, 96, 96, 97, 97, 98, 98, 99, 99,
+ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
+ 100, 101, 101, 102, 102, 102, 102, 102, 103, 103,
+ 103, 103, 104, 104, 104, 104, 104, 104, 104, 105,
+ 105, 105, 105, 105, 106, 106, 106, 106, 107, 107,
+ 108, 108, 109, 109, 110, 111, 111
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 2, 0, 2, 3, 1, 2, 2,
+ 4, 2, 0, 4, 2, 2, 3, 3, 1, 1,
+ 1, 3, 2, 2, 2, 1, 1, 2, 2, 3,
+ 1, 0, 1, 1, 0, 3, 3, 3, 2, 3,
+ 0, 2, 3, 3, 1, 1, 1, 0, 3, 3,
+ 3, 3, 3, 2, 3, 1, 1, 3, 3, 2,
+ 2, 2, 2, 1, 1, 4, 4, 3, 2, 3,
+ 1, 1, 1, 0, 2, 2, 3, 3, 0, 2,
+ 3, 3, 0, 2, 2, 3, 2, 3, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 0, 1, 3, 1, 3
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned char yydefact[] =
+{
+ 4, 0, 0, 0, 4, 55, 0, 0, 1, 0,
+ 0, 0, 102, 102, 18, 19, 20, 47, 0, 0,
+ 0, 25, 26, 34, 40, 31, 30, 3, 0, 0,
+ 5, 56, 0, 6, 11, 70, 0, 0, 0, 63,
+ 64, 78, 0, 0, 71, 72, 82, 0, 73, 15,
+ 103, 0, 0, 0, 22, 23, 24, 27, 28, 32,
+ 33, 0, 8, 9, 0, 54, 0, 60, 61, 62,
+ 0, 68, 100, 101, 0, 0, 0, 12, 0, 16,
+ 17, 21, 0, 0, 0, 0, 0, 53, 0, 0,
+ 0, 44, 45, 46, 0, 38, 94, 95, 96, 97,
+ 98, 99, 41, 0, 0, 29, 57, 105, 0, 0,
+ 0, 79, 0, 69, 0, 83, 84, 0, 67, 86,
+ 0, 59, 0, 0, 0, 10, 0, 89, 90, 91,
+ 92, 93, 0, 74, 75, 0, 48, 49, 50, 51,
+ 52, 36, 35, 37, 39, 42, 43, 0, 104, 81,
+ 65, 80, 88, 85, 87, 58, 0, 14, 77, 66,
+ 76, 106, 12, 13
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const short int yydefgoto[] =
+{
+ -1, 2, 3, 4, 27, 28, 125, 29, 61, 57,
+ 58, 95, 53, 7, 32, 77, 107, 48, 78, 70,
+ 75, 133, 103, 104, 74, 51, 67, 108
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -113
+static const short int yypact[] =
+{
+ -4, 0, 54, 112, -4, -113, 25, -20, -113, -12,
+ 215, 55, -1, -1, -113, -113, -113, -113, 0, 0,
+ 0, -113, -113, -113, -113, -64, -113, -113, 5, 2,
+ -113, 1, -3, -113, -113, -113, 6, 6, 0, -113,
+ -113, -113, 215, -10, -113, -113, -113, 4, -113, -113,
+ -113, 77, 78, 85, -113, -113, -113, 3, 135, -113,
+ -113, 79, -113, -113, 25, -113, 215, -113, -113, -113,
+ 160, -113, -113, -113, 82, 153, 29, 56, 101, -113,
+ -113, -113, 84, 0, 86, 87, 89, -113, 90, 91,
+ 0, -113, -113, -113, 92, -113, -113, -113, -113, -113,
+ -113, -113, -113, 93, 94, -113, -113, 22, 19, 100,
+ 0, -113, 102, -113, 103, -113, -113, 0, -113, -113,
+ 104, -113, 28, 215, 4, -113, 107, -113, -113, -113,
+ -113, -113, 0, -113, -113, 111, -113, -113, -113, -113,
+ -113, -113, -113, -113, -113, -113, -113, 215, -113, -113,
+ -113, -113, -113, -113, -113, -113, 4, -113, -113, -113,
+ -113, -113, 56, -113
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const short int yypgoto[] =
+{
+ -113, -113, 114, -113, -21, -113, -43, -113, -113, -113,
+ -113, 69, -113, -18, 95, -112, -7, -113, -113, -113,
+ -113, -113, -42, -17, -113, 136, 118, 9
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -8
+static const short int yytable[] =
+{
+ 54, 55, 56, 47, 5, -7, 9, 62, 59, 60,
+ 10, 1, 157, 11, 12, 13, 14, 15, 16, 17,
+ 69, 18, 19, 20, 21, 22, 23, 24, 111, 31,
+ 9, 72, 73, 119, 10, 71, 134, 11, 12, 13,
+ 14, 15, 16, 17, 162, 18, 19, 20, 21, 22,
+ 23, 24, 110, 112, 8, 122, 33, 118, 120, 49,
+ 132, 135, 123, 124, 34, 137, 88, 89, 90, 91,
+ 92, 93, 143, 94, 50, 65, 25, 6, 63, 26,
+ 64, 79, 80, 105, 76, 113, -7, 136, 66, 81,
+ 138, 139, 150, 140, 141, 142, 144, 145, 146, 153,
+ 25, 147, 148, 26, 149, 5, 151, 152, 154, 155,
+ 121, 158, -2, 9, 159, 160, 156, 10, 30, 163,
+ 11, 12, 13, 14, 15, 16, 17, 102, 18, 19,
+ 20, 21, 22, 23, 24, 126, 96, 97, 98, 99,
+ 100, 101, 82, 83, 84, 85, 86, 87, 0, 52,
+ 127, 128, 129, 130, 131, 68, 161, 5, 0, 106,
+ 0, 0, 0, 0, 5, 0, 0, 0, 0, 0,
+ 96, 97, 98, 99, 100, 101, 0, 0, 6, 0,
+ 0, 0, 0, 25, 0, 0, 26, 114, 96, 97,
+ 98, 99, 100, 101, 109, 96, 97, 98, 99, 100,
+ 101, 91, 92, 93, 0, 0, 0, 115, 116, 117,
+ 0, 0, 0, 0, 0, 0, 35, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6, 0, 0, 0, 0, 0, 0, 6, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46
+};
+
+static const short int yycheck[] =
+{
+ 18, 19, 20, 10, 4, 0, 1, 28, 72, 73,
+ 5, 15, 124, 8, 9, 10, 11, 12, 13, 14,
+ 38, 16, 17, 18, 19, 20, 21, 22, 70, 4,
+ 1, 41, 42, 75, 5, 42, 78, 8, 9, 10,
+ 11, 12, 13, 14, 156, 16, 17, 18, 19, 20,
+ 21, 22, 70, 70, 0, 76, 76, 75, 75, 4,
+ 78, 78, 6, 7, 76, 83, 63, 64, 65, 66,
+ 67, 68, 90, 70, 75, 78, 71, 77, 76, 74,
+ 79, 4, 4, 4, 80, 3, 81, 3, 82, 4,
+ 4, 4, 110, 4, 4, 4, 4, 4, 4, 117,
+ 71, 79, 83, 74, 4, 4, 4, 4, 4, 81,
+ 81, 4, 0, 1, 132, 4, 123, 5, 4, 162,
+ 8, 9, 10, 11, 12, 13, 14, 58, 16, 17,
+ 18, 19, 20, 21, 22, 34, 35, 36, 37, 38,
+ 39, 40, 57, 58, 59, 60, 61, 62, -1, 13,
+ 49, 50, 51, 52, 53, 37, 147, 4, -1, 64,
+ -1, -1, -1, -1, 4, -1, -1, -1, -1, -1,
+ 35, 36, 37, 38, 39, 40, -1, -1, 77, -1,
+ -1, -1, -1, 71, -1, -1, 74, 34, 35, 36,
+ 37, 38, 39, 40, 34, 35, 36, 37, 38, 39,
+ 40, 66, 67, 68, -1, -1, -1, 54, 55, 56,
+ -1, -1, -1, -1, -1, -1, 1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 77, -1, -1, -1, -1, -1, -1, 77, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 15, 85, 86, 87, 4, 77, 97, 0, 1,
+ 5, 8, 9, 10, 11, 12, 13, 14, 16, 17,
+ 18, 19, 20, 21, 22, 71, 74, 88, 89, 91,
+ 86, 4, 98, 76, 76, 1, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 100, 101, 4,
+ 75, 109, 109, 96, 97, 97, 97, 93, 94, 72,
+ 73, 92, 88, 76, 79, 78, 82, 110, 110, 97,
+ 103, 100, 41, 42, 108, 104, 80, 99, 102, 4,
+ 4, 4, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 70, 95, 35, 36, 37, 38,
+ 39, 40, 95, 106, 107, 4, 98, 100, 111, 34,
+ 97, 106, 107, 3, 34, 54, 55, 56, 97, 106,
+ 107, 81, 88, 6, 7, 90, 34, 49, 50, 51,
+ 52, 53, 97, 105, 106, 107, 3, 97, 4, 4,
+ 4, 4, 4, 97, 4, 4, 4, 79, 83, 4,
+ 97, 4, 4, 97, 4, 81, 100, 99, 4, 97,
+ 4, 111, 99, 90
+};
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short int *bottom, short int *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short int *bottom;
+ short int *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
+#endif
+{
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol. */
+int yychar;
+
+/* The semantic value of the look-ahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+ ;
+#endif
+#endif
+{
+
+ int yystate;
+ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ short int *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK (yyvsp--, yyssp--)
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short int *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short int *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a look-ahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to look-ahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a look-ahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 195 "sieve.y"
+ { ret = NULL; }
+ break;
+
+ case 3:
+#line 196 "sieve.y"
+ { ret = (yyvsp[0].cl); }
+ break;
+
+ case 6:
+#line 203 "sieve.y"
+ { if (!check_reqs((yyvsp[-1].sl))) {
+ yyerror("unsupported feature");
+ YYERROR;
+ } }
+ break;
+
+ case 7:
+#line 209 "sieve.y"
+ { (yyval.cl) = (yyvsp[0].cl); }
+ break;
+
+ case 8:
+#line 210 "sieve.y"
+ { (yyvsp[-1].cl)->next = (yyvsp[0].cl); (yyval.cl) = (yyvsp[-1].cl); }
+ break;
+
+ case 9:
+#line 213 "sieve.y"
+ { (yyval.cl) = (yyvsp[-1].cl); }
+ break;
+
+ case 10:
+#line 214 "sieve.y"
+ { (yyval.cl) = new_if((yyvsp[-2].test), (yyvsp[-1].cl), (yyvsp[0].cl)); }
+ break;
+
+ case 11:
+#line 215 "sieve.y"
+ { (yyval.cl) = new_command(STOP); }
+ break;
+
+ case 12:
+#line 218 "sieve.y"
+ { (yyval.cl) = NULL; }
+ break;
+
+ case 13:
+#line 219 "sieve.y"
+ { (yyval.cl) = new_if((yyvsp[-2].test), (yyvsp[-1].cl), (yyvsp[0].cl)); }
+ break;
+
+ case 14:
+#line 220 "sieve.y"
+ { (yyval.cl) = (yyvsp[0].cl); }
+ break;
+
+ case 15:
+#line 223 "sieve.y"
+ { if (!parse_script->support.reject) {
+ yyerror("reject not required");
+ YYERROR;
+ }
+ if (!verify_utf8((yyvsp[0].sval))) {
+ YYERROR; /* vu should call yyerror() */
+ }
+ (yyval.cl) = new_command(REJCT);
+ (yyval.cl)->u.str = (yyvsp[0].sval); }
+ break;
+
+ case 16:
+#line 232 "sieve.y"
+ { if (!parse_script->support.fileinto) {
+ yyerror("fileinto not required");
+ YYERROR;
+ }
+ if (!verify_mailbox((yyvsp[0].sval))) {
+ YYERROR; /* vm should call yyerror() */
+ }
+ (yyval.cl) = build_fileinto(FILEINTO, (yyvsp[-1].nval), (yyvsp[0].sval)); }
+ break;
+
+ case 17:
+#line 240 "sieve.y"
+ { if (!verify_address((yyvsp[0].sval))) {
+ YYERROR; /* va should call yyerror() */
+ }
+ (yyval.cl) = build_redirect(REDIRECT, (yyvsp[-1].nval), (yyvsp[0].sval)); }
+ break;
+
+ case 18:
+#line 244 "sieve.y"
+ { (yyval.cl) = new_command(KEEP); }
+ break;
+
+ case 19:
+#line 245 "sieve.y"
+ { (yyval.cl) = new_command(STOP); }
+ break;
+
+ case 20:
+#line 246 "sieve.y"
+ { (yyval.cl) = new_command(DISCARD); }
+ break;
+
+ case 21:
+#line 247 "sieve.y"
+ { if (!parse_script->support.vacation) {
+ yyerror("vacation not required");
+ YYERROR;
+ }
+ if (((yyvsp[-1].vtag)->mime == -1) && !verify_utf8((yyvsp[0].sval))) {
+ YYERROR; /* vu should call yyerror() */
+ }
+ (yyval.cl) = build_vacation(VACATION,
+ canon_vtags((yyvsp[-1].vtag)), (yyvsp[0].sval)); }
+ break;
+
+ case 22:
+#line 256 "sieve.y"
+ { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ if (!verify_stringlist((yyvsp[0].sl), verify_flag)) {
+ YYERROR; /* vf should call yyerror() */
+ }
+ (yyval.cl) = new_command(SETFLAG);
+ (yyval.cl)->u.sl = (yyvsp[0].sl); }
+ break;
+
+ case 23:
+#line 265 "sieve.y"
+ { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ if (!verify_stringlist((yyvsp[0].sl), verify_flag)) {
+ YYERROR; /* vf should call yyerror() */
+ }
+ (yyval.cl) = new_command(ADDFLAG);
+ (yyval.cl)->u.sl = (yyvsp[0].sl); }
+ break;
+
+ case 24:
+#line 274 "sieve.y"
+ { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ if (!verify_stringlist((yyvsp[0].sl), verify_flag)) {
+ YYERROR; /* vf should call yyerror() */
+ }
+ (yyval.cl) = new_command(REMOVEFLAG);
+ (yyval.cl)->u.sl = (yyvsp[0].sl); }
+ break;
+
+ case 25:
+#line 283 "sieve.y"
+ { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ (yyval.cl) = new_command(MARK); }
+ break;
+
+ case 26:
+#line 288 "sieve.y"
+ { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ (yyval.cl) = new_command(UNMARK); }
+ break;
+
+ case 27:
+#line 294 "sieve.y"
+ { if (!parse_script->support.notify) {
+ yyerror("notify not required");
+ (yyval.cl) = new_command(NOTIFY);
+ YYERROR;
+ } else {
+ (yyval.cl) = build_notify(NOTIFY,
+ canon_ntags((yyvsp[0].ntag)));
+ } }
+ break;
+
+ case 28:
+#line 302 "sieve.y"
+ { if (!parse_script->support.notify) {
+ yyerror("notify not required");
+ (yyval.cl) = new_command(DENOTIFY);
+ YYERROR;
+ } else {
+ (yyval.cl) = build_denotify(DENOTIFY, canon_dtags((yyvsp[0].dtag)));
+ if ((yyval.cl) == NULL) {
+ yyerror("unable to find a compatible comparator");
+ YYERROR; } } }
+ break;
+
+ case 29:
+#line 312 "sieve.y"
+ { if (!parse_script->support.include) {
+ yyerror("include not required");
+ YYERROR;
+ }
+ (yyval.cl) = new_command(INCLUDE);
+ (yyval.cl)->u.inc.location = (yyvsp[-1].nval);
+ (yyval.cl)->u.inc.script = (yyvsp[0].sval); }
+ break;
+
+ case 30:
+#line 319 "sieve.y"
+ { if (!parse_script->support.include) {
+ yyerror("include not required");
+ YYERROR;
+ }
+ (yyval.cl) = new_command(RETURN); }
+ break;
+
+ case 31:
+#line 326 "sieve.y"
+ { (yyval.nval) = PERSONAL; }
+ break;
+
+ case 32:
+#line 327 "sieve.y"
+ { (yyval.nval) = PERSONAL; }
+ break;
+
+ case 33:
+#line 328 "sieve.y"
+ { (yyval.nval) = GLOBAL; }
+ break;
+
+ case 34:
+#line 331 "sieve.y"
+ { (yyval.ntag) = new_ntags(); }
+ break;
+
+ case 35:
+#line 332 "sieve.y"
+ { if ((yyval.ntag)->id != NULL) {
+ yyerror("duplicate :method"); YYERROR; }
+ else { (yyval.ntag)->id = (yyvsp[0].sval); } }
+ break;
+
+ case 36:
+#line 335 "sieve.y"
+ { if ((yyval.ntag)->method != NULL) {
+ yyerror("duplicate :method"); YYERROR; }
+ else { (yyval.ntag)->method = (yyvsp[0].sval); } }
+ break;
+
+ case 37:
+#line 338 "sieve.y"
+ { if ((yyval.ntag)->options != NULL) {
+ yyerror("duplicate :options"); YYERROR; }
+ else { (yyval.ntag)->options = (yyvsp[0].sl); } }
+ break;
+
+ case 38:
+#line 341 "sieve.y"
+ { if ((yyval.ntag)->priority != -1) {
+ yyerror("duplicate :priority"); YYERROR; }
+ else { (yyval.ntag)->priority = (yyvsp[0].nval); } }
+ break;
+
+ case 39:
+#line 344 "sieve.y"
+ { if ((yyval.ntag)->message != NULL) {
+ yyerror("duplicate :message"); YYERROR; }
+ else { (yyval.ntag)->message = (yyvsp[0].sval); } }
+ break;
+
+ case 40:
+#line 349 "sieve.y"
+ { (yyval.dtag) = new_dtags(); }
+ break;
+
+ case 41:
+#line 350 "sieve.y"
+ { if ((yyval.dtag)->priority != -1) {
+ yyerror("duplicate priority level"); YYERROR; }
+ else { (yyval.dtag)->priority = (yyvsp[0].nval); } }
+ break;
+
+ case 42:
+#line 353 "sieve.y"
+ { if ((yyval.dtag)->comptag != -1)
+ {
+ yyerror("duplicate comparator type tag"); YYERROR;
+ }
+ (yyval.dtag)->comptag = (yyvsp[-1].nval);
+#ifdef ENABLE_REGEX
+ if ((yyval.dtag)->comptag == REGEX)
+ {
+ int cflags = REG_EXTENDED |
+ REG_NOSUB | REG_ICASE;
+ if (!verify_regex((yyvsp[0].sval), cflags)) { YYERROR; }
+ }
+#endif
+ (yyval.dtag)->pattern = (yyvsp[0].sval);
+ }
+ break;
+
+ case 43:
+#line 368 "sieve.y"
+ { (yyval.dtag) = (yyvsp[-2].dtag);
+ if ((yyval.dtag)->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { (yyval.dtag)->comptag = (yyvsp[-1].nval);
+ (yyval.dtag)->relation = verify_relat((yyvsp[0].sval));
+ if ((yyval.dtag)->relation==-1)
+ {YYERROR; /*vr called yyerror()*/ }
+ } }
+ break;
+
+ case 44:
+#line 378 "sieve.y"
+ { (yyval.nval) = LOW; }
+ break;
+
+ case 45:
+#line 379 "sieve.y"
+ { (yyval.nval) = NORMAL; }
+ break;
+
+ case 46:
+#line 380 "sieve.y"
+ { (yyval.nval) = HIGH; }
+ break;
+
+ case 47:
+#line 383 "sieve.y"
+ { (yyval.vtag) = new_vtags(); }
+ break;
+
+ case 48:
+#line 384 "sieve.y"
+ { if ((yyval.vtag)->days != -1) {
+ yyerror("duplicate :days"); YYERROR; }
+ else { (yyval.vtag)->days = (yyvsp[0].nval); } }
+ break;
+
+ case 49:
+#line 387 "sieve.y"
+ { if ((yyval.vtag)->addresses != NULL) {
+ yyerror("duplicate :addresses");
+ YYERROR;
+ } else if (!verify_stringlist((yyvsp[0].sl),
+ verify_address)) {
+ YYERROR;
+ } else {
+ (yyval.vtag)->addresses = (yyvsp[0].sl); } }
+ break;
+
+ case 50:
+#line 395 "sieve.y"
+ { if ((yyval.vtag)->subject != NULL) {
+ yyerror("duplicate :subject");
+ YYERROR;
+ } else if (!verify_utf8((yyvsp[0].sval))) {
+ YYERROR; /* vu should call yyerror() */
+ } else { (yyval.vtag)->subject = (yyvsp[0].sval); } }
+ break;
+
+ case 51:
+#line 401 "sieve.y"
+ { if ((yyval.vtag)->from != NULL) {
+ yyerror("duplicate :from");
+ YYERROR;
+ } else if (!verify_address((yyvsp[0].sval))) {
+ YYERROR; /* vu should call yyerror() */
+ } else { (yyval.vtag)->from = (yyvsp[0].sval); } }
+ break;
+
+ case 52:
+#line 407 "sieve.y"
+ { if ((yyval.vtag)->handle != NULL) {
+ yyerror("duplicate :handle");
+ YYERROR;
+ } else if (!verify_utf8((yyvsp[0].sval))) {
+ YYERROR; /* vu should call yyerror() */
+ } else { (yyval.vtag)->handle = (yyvsp[0].sval); } }
+ break;
+
+ case 53:
+#line 413 "sieve.y"
+ { if ((yyval.vtag)->mime != -1) {
+ yyerror("duplicate :mime");
+ YYERROR; }
+ else { (yyval.vtag)->mime = MIME; } }
+ break;
+
+ case 54:
+#line 419 "sieve.y"
+ { (yyval.sl) = (yyvsp[-1].sl); }
+ break;
+
+ case 55:
+#line 420 "sieve.y"
+ { (yyval.sl) = new_sl((yyvsp[0].sval), NULL); }
+ break;
+
+ case 56:
+#line 423 "sieve.y"
+ { (yyval.sl) = new_sl((yyvsp[0].sval), NULL); }
+ break;
+
+ case 57:
+#line 424 "sieve.y"
+ { (yyval.sl) = new_sl((yyvsp[-2].sval), (yyvsp[0].sl)); }
+ break;
+
+ case 58:
+#line 427 "sieve.y"
+ { (yyval.cl) = (yyvsp[-1].cl); }
+ break;
+
+ case 59:
+#line 428 "sieve.y"
+ { (yyval.cl) = NULL; }
+ break;
+
+ case 60:
+#line 431 "sieve.y"
+ { (yyval.test) = new_test(ANYOF); (yyval.test)->u.tl = (yyvsp[0].testl); }
+ break;
+
+ case 61:
+#line 432 "sieve.y"
+ { (yyval.test) = new_test(ALLOF); (yyval.test)->u.tl = (yyvsp[0].testl); }
+ break;
+
+ case 62:
+#line 433 "sieve.y"
+ { (yyval.test) = new_test(EXISTS); (yyval.test)->u.sl = (yyvsp[0].sl); }
+ break;
+
+ case 63:
+#line 434 "sieve.y"
+ { (yyval.test) = new_test(SFALSE); }
+ break;
+
+ case 64:
+#line 435 "sieve.y"
+ { (yyval.test) = new_test(STRUE); }
+ break;
+
+ case 65:
+#line 437 "sieve.y"
+ {
+ if (!verify_stringlist((yyvsp[-1].sl), verify_header)) {
+ YYERROR; /* vh should call yyerror() */
+ }
+ if (!verify_stringlist((yyvsp[0].sl), verify_utf8)) {
+ YYERROR; /* vu should call yyerror() */
+ }
+
+ (yyvsp[-2].htag) = canon_htags((yyvsp[-2].htag));
+#ifdef ENABLE_REGEX
+ if ((yyvsp[-2].htag)->comptag == REGEX)
+ {
+ if (!(verify_regexs((yyvsp[0].sl), (yyvsp[-2].htag)->comparator)))
+ { YYERROR; }
+ }
+#endif
+ (yyval.test) = build_header(HEADER, (yyvsp[-2].htag), (yyvsp[-1].sl), (yyvsp[0].sl));
+ if ((yyval.test) == NULL) {
+ yyerror("unable to find a compatible comparator");
+ YYERROR; }
+ }
+ break;
+
+ case 66:
+#line 461 "sieve.y"
+ {
+ if (((yyvsp[-3].nval) == ADDRESS) &&
+ !verify_stringlist((yyvsp[-1].sl), verify_addrheader))
+ { YYERROR; }
+ else if (((yyvsp[-3].nval) == ENVELOPE) &&
+ !verify_stringlist((yyvsp[-1].sl), verify_envelope))
+ { YYERROR; }
+ (yyvsp[-2].aetag) = canon_aetags((yyvsp[-2].aetag));
+#ifdef ENABLE_REGEX
+ if ((yyvsp[-2].aetag)->comptag == REGEX)
+ {
+ if (!( verify_regexs((yyvsp[0].sl), (yyvsp[-2].aetag)->comparator)))
+ { YYERROR; }
+ }
+#endif
+ (yyval.test) = build_address((yyvsp[-3].nval), (yyvsp[-2].aetag), (yyvsp[-1].sl), (yyvsp[0].sl));
+ if ((yyval.test) == NULL) {
+ yyerror("unable to find a compatible comparator");
+ YYERROR; }
+ }
+ break;
+
+ case 67:
+#line 483 "sieve.y"
+ {
+ if (!parse_script->support.body) {
+ yyerror("body not required");
+ YYERROR;
+ }
+
+ if (!verify_stringlist((yyvsp[0].sl), verify_utf8)) {
+ YYERROR; /* vu should call yyerror() */
+ }
+
+ (yyvsp[-1].btag) = canon_btags((yyvsp[-1].btag));
+#ifdef ENABLE_REGEX
+ if ((yyvsp[-1].btag)->comptag == REGEX)
+ {
+ if (!(verify_regexs((yyvsp[0].sl), (yyvsp[-1].btag)->comparator)))
+ { YYERROR; }
+ }
+#endif
+ (yyval.test) = build_body(BODY, (yyvsp[-1].btag), (yyvsp[0].sl));
+ if ((yyval.test) == NULL) {
+ yyerror("unable to find a compatible comparator");
+ YYERROR; }
+ }
+ break;
+
+ case 68:
+#line 508 "sieve.y"
+ { (yyval.test) = new_test(NOT); (yyval.test)->u.t = (yyvsp[0].test); }
+ break;
+
+ case 69:
+#line 509 "sieve.y"
+ { (yyval.test) = new_test(SIZE); (yyval.test)->u.sz.t = (yyvsp[-1].nval);
+ (yyval.test)->u.sz.n = (yyvsp[0].nval); }
+ break;
+
+ case 70:
+#line 511 "sieve.y"
+ { (yyval.test) = NULL; }
+ break;
+
+ case 71:
+#line 514 "sieve.y"
+ { (yyval.nval) = ADDRESS; }
+ break;
+
+ case 72:
+#line 515 "sieve.y"
+ {if (!parse_script->support.envelope)
+ {yyerror("envelope not required"); YYERROR;}
+ else{(yyval.nval) = ENVELOPE; }
+ }
+ break;
+
+ case 73:
+#line 522 "sieve.y"
+ { (yyval.aetag) = new_aetags(); }
+ break;
+
+ case 74:
+#line 523 "sieve.y"
+ { (yyval.aetag) = (yyvsp[-1].aetag);
+ if ((yyval.aetag)->addrtag != -1) {
+ yyerror("duplicate or conflicting address part tag");
+ YYERROR; }
+ else { (yyval.aetag)->addrtag = (yyvsp[0].nval); } }
+ break;
+
+ case 75:
+#line 528 "sieve.y"
+ { (yyval.aetag) = (yyvsp[-1].aetag);
+ if ((yyval.aetag)->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { (yyval.aetag)->comptag = (yyvsp[0].nval); } }
+ break;
+
+ case 76:
+#line 532 "sieve.y"
+ { (yyval.aetag) = (yyvsp[-2].aetag);
+ if ((yyval.aetag)->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { (yyval.aetag)->comptag = (yyvsp[-1].nval);
+ (yyval.aetag)->relation = verify_relat((yyvsp[0].sval));
+ if ((yyval.aetag)->relation==-1)
+ {YYERROR; /*vr called yyerror()*/ }
+ } }
+ break;
+
+ case 77:
+#line 540 "sieve.y"
+ { (yyval.aetag) = (yyvsp[-2].aetag);
+ if ((yyval.aetag)->comparator != NULL) {
+ yyerror("duplicate comparator tag"); YYERROR; }
+ else if (!strcmp((yyvsp[0].sval), "i;ascii-numeric") &&
+ !parse_script->support.i_ascii_numeric) {
+ yyerror("comparator-i;ascii-numeric not required");
+ YYERROR; }
+ else { (yyval.aetag)->comparator = (yyvsp[0].sval); } }
+ break;
+
+ case 78:
+#line 550 "sieve.y"
+ { (yyval.htag) = new_htags(); }
+ break;
+
+ case 79:
+#line 551 "sieve.y"
+ { (yyval.htag) = (yyvsp[-1].htag);
+ if ((yyval.htag)->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { (yyval.htag)->comptag = (yyvsp[0].nval); } }
+ break;
+
+ case 80:
+#line 555 "sieve.y"
+ { (yyval.htag) = (yyvsp[-2].htag);
+ if ((yyval.htag)->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { (yyval.htag)->comptag = (yyvsp[-1].nval);
+ (yyval.htag)->relation = verify_relat((yyvsp[0].sval));
+ if ((yyval.htag)->relation==-1)
+ {YYERROR; /*vr called yyerror()*/ }
+ } }
+ break;
+
+ case 81:
+#line 563 "sieve.y"
+ { (yyval.htag) = (yyvsp[-2].htag);
+ if ((yyval.htag)->comparator != NULL) {
+ yyerror("duplicate comparator tag"); YYERROR; }
+ else if (!strcmp((yyvsp[0].sval), "i;ascii-numeric") &&
+ !parse_script->support.i_ascii_numeric) {
+ yyerror("comparator-i;ascii-numeric not required"); YYERROR; }
+ else {
+ (yyval.htag)->comparator = (yyvsp[0].sval); } }
+ break;
+
+ case 82:
+#line 573 "sieve.y"
+ { (yyval.btag) = new_btags(); }
+ break;
+
+ case 83:
+#line 574 "sieve.y"
+ { (yyval.btag) = (yyvsp[-1].btag);
+ if ((yyval.btag)->transform != -1) {
+ yyerror("duplicate or conflicting transform tag");
+ YYERROR; }
+ else { (yyval.btag)->transform = RAW; } }
+ break;
+
+ case 84:
+#line 579 "sieve.y"
+ { (yyval.btag) = (yyvsp[-1].btag);
+ if ((yyval.btag)->transform != -1) {
+ yyerror("duplicate or conflicting transform tag");
+ YYERROR; }
+ else { (yyval.btag)->transform = TEXT; } }
+ break;
+
+ case 85:
+#line 584 "sieve.y"
+ { (yyval.btag) = (yyvsp[-2].btag);
+ if ((yyval.btag)->transform != -1) {
+ yyerror("duplicate or conflicting transform tag");
+ YYERROR; }
+ else {
+ (yyval.btag)->transform = CONTENT;
+ (yyval.btag)->content_types = (yyvsp[0].sl);
+ } }
+ break;
+
+ case 86:
+#line 592 "sieve.y"
+ { (yyval.btag) = (yyvsp[-1].btag);
+ if ((yyval.btag)->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { (yyval.btag)->comptag = (yyvsp[0].nval); } }
+ break;
+
+ case 87:
+#line 596 "sieve.y"
+ { (yyval.btag) = (yyvsp[-2].btag);
+ if ((yyval.btag)->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { (yyval.btag)->comptag = (yyvsp[-1].nval);
+ (yyval.btag)->relation = verify_relat((yyvsp[0].sval));
+ if ((yyval.btag)->relation==-1)
+ {YYERROR; /*vr called yyerror()*/ }
+ } }
+ break;
+
+ case 88:
+#line 604 "sieve.y"
+ { (yyval.btag) = (yyvsp[-2].btag);
+ if ((yyval.btag)->comparator != NULL) {
+ yyerror("duplicate comparator tag"); YYERROR; }
+ else if (!strcmp((yyvsp[0].sval), "i;ascii-numeric") &&
+ !parse_script->support.i_ascii_numeric) {
+ yyerror("comparator-i;ascii-numeric not required"); YYERROR; }
+ else {
+ (yyval.btag)->comparator = (yyvsp[0].sval); } }
+ break;
+
+ case 89:
+#line 615 "sieve.y"
+ { (yyval.nval) = ALL; }
+ break;
+
+ case 90:
+#line 616 "sieve.y"
+ { (yyval.nval) = LOCALPART; }
+ break;
+
+ case 91:
+#line 617 "sieve.y"
+ { (yyval.nval) = DOMAIN; }
+ break;
+
+ case 92:
+#line 618 "sieve.y"
+ { if (!parse_script->support.subaddress) {
+ yyerror("subaddress not required");
+ YYERROR;
+ }
+ (yyval.nval) = USER; }
+ break;
+
+ case 93:
+#line 623 "sieve.y"
+ { if (!parse_script->support.subaddress) {
+ yyerror("subaddress not required");
+ YYERROR;
+ }
+ (yyval.nval) = DETAIL; }
+ break;
+
+ case 94:
+#line 629 "sieve.y"
+ { (yyval.nval) = IS; }
+ break;
+
+ case 95:
+#line 630 "sieve.y"
+ { (yyval.nval) = CONTAINS; }
+ break;
+
+ case 96:
+#line 631 "sieve.y"
+ { (yyval.nval) = MATCHES; }
+ break;
+
+ case 97:
+#line 632 "sieve.y"
+ { if (!parse_script->support.regex) {
+ yyerror("regex not required");
+ YYERROR;
+ }
+ (yyval.nval) = REGEX; }
+ break;
+
+ case 98:
+#line 639 "sieve.y"
+ { if (!parse_script->support.relational) {
+ yyerror("relational not required");
+ YYERROR;
+ }
+ (yyval.nval) = COUNT; }
+ break;
+
+ case 99:
+#line 644 "sieve.y"
+ { if (!parse_script->support.relational) {
+ yyerror("relational not required");
+ YYERROR;
+ }
+ (yyval.nval) = VALUE; }
+ break;
+
+ case 100:
+#line 652 "sieve.y"
+ { (yyval.nval) = OVER; }
+ break;
+
+ case 101:
+#line 653 "sieve.y"
+ { (yyval.nval) = UNDER; }
+ break;
+
+ case 102:
+#line 656 "sieve.y"
+ { (yyval.nval) = 0; }
+ break;
+
+ case 103:
+#line 657 "sieve.y"
+ { if (!parse_script->support.copy) {
+ yyerror("copy not required");
+ YYERROR;
+ }
+ (yyval.nval) = COPY; }
+ break;
+
+ case 104:
+#line 664 "sieve.y"
+ { (yyval.testl) = (yyvsp[-1].testl); }
+ break;
+
+ case 105:
+#line 667 "sieve.y"
+ { (yyval.testl) = new_testlist((yyvsp[0].test), NULL); }
+ break;
+
+ case 106:
+#line 668 "sieve.y"
+ { (yyval.testl) = new_testlist((yyvsp[-2].test), (yyvsp[0].testl)); }
+ break;
+
+
+ default: break;
+ }
+
+/* Line 1126 of yacc.c. */
+#line 2403 "y.tab.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror (YY_("syntax error"));
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse look-ahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding", yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse look-ahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (0)
+ goto yyerrorlab;
+
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ *++yyvsp = yylval;
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
+}
+
+
+#line 671 "sieve.y"
+
+commandlist_t *sieve_parse(sieve_script_t *script, FILE *f)
+{
+ commandlist_t *t;
+
+ parse_script = script;
+ yyrestart(f);
+ if (yyparse()) {
+ t = NULL;
+ } else {
+ t = ret;
+ }
+ ret = NULL;
+ return t;
+}
+
+int yyerror(char *msg)
+{
+ extern int yylineno;
+ int ret;
+
+ parse_script->err++;
+ if (parse_script->interp.err) {
+ ret = parse_script->interp.err(yylineno, msg,
+ parse_script->interp.interp_context,
+ parse_script->script_context);
+ }
+
+ return 0;
+}
+
+static int check_reqs(stringlist_t *sl)
+{
+ int i = 1;
+ stringlist_t *s;
+
+ while (sl != NULL) {
+ s = sl;
+ sl = sl->next;
+
+ i &= script_require(parse_script, s->s);
+
+ if (s->s) free(s->s);
+ free(s);
+ }
+ return i;
+}
+
+static test_t *build_address(int t, struct aetags *ae,
+ stringlist_t *sl, stringlist_t *pl)
+{
+ test_t *ret = new_test(t); /* can be either ADDRESS or ENVELOPE */
+
+ assert((t == ADDRESS) || (t == ENVELOPE));
+
+ if (ret) {
+ ret->u.ae.comptag = ae->comptag;
+ ret->u.ae.relation=ae->relation;
+ ret->u.ae.comparator=xstrdup(ae->comparator);
+ ret->u.ae.sl = sl;
+ ret->u.ae.pl = pl;
+ ret->u.ae.addrpart = ae->addrtag;
+ free_aetags(ae);
+
+ }
+ return ret;
+}
+
+static test_t *build_header(int t, struct htags *h,
+ stringlist_t *sl, stringlist_t *pl)
+{
+ test_t *ret = new_test(t); /* can be HEADER */
+
+ assert(t == HEADER);
+
+ if (ret) {
+ ret->u.h.comptag = h->comptag;
+ ret->u.h.relation=h->relation;
+ ret->u.h.comparator=xstrdup(h->comparator);
+ ret->u.h.sl = sl;
+ ret->u.h.pl = pl;
+ free_htags(h);
+ }
+ return ret;
+}
+
+static test_t *build_body(int t, struct btags *b, stringlist_t *pl)
+{
+ test_t *ret = new_test(t); /* can be BODY */
+
+ assert(t == BODY);
+
+ if (ret) {
+ ret->u.b.comptag = b->comptag;
+ ret->u.b.relation = b->relation;
+ ret->u.b.comparator = xstrdup(b->comparator);
+ ret->u.b.transform = b->transform;
+ ret->u.b.offset = b->offset;
+ ret->u.b.content_types = b->content_types; b->content_types = NULL;
+ ret->u.b.pl = pl;
+ free_btags(b);
+ }
+ return ret;
+}
+
+static commandlist_t *build_vacation(int t, struct vtags *v, char *reason)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == VACATION);
+
+ if (ret) {
+ ret->u.v.subject = v->subject; v->subject = NULL;
+ ret->u.v.from = v->from; v->from = NULL;
+ ret->u.v.handle = v->handle; v->handle = NULL;
+ ret->u.v.days = v->days;
+ ret->u.v.mime = v->mime;
+ ret->u.v.addresses = v->addresses; v->addresses = NULL;
+ free_vtags(v);
+ ret->u.v.message = reason;
+ }
+ return ret;
+}
+
+static commandlist_t *build_notify(int t, struct ntags *n)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == NOTIFY);
+ if (ret) {
+ ret->u.n.method = n->method; n->method = NULL;
+ ret->u.n.id = n->id; n->id = NULL;
+ ret->u.n.options = n->options; n->options = NULL;
+ ret->u.n.priority = n->priority;
+ ret->u.n.message = n->message; n->message = NULL;
+ free_ntags(n);
+ }
+ return ret;
+}
+
+static commandlist_t *build_denotify(int t, struct dtags *d)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == DENOTIFY);
+
+ if (ret) {
+ ret->u.d.comptag = d->comptag;
+ ret->u.d.relation=d->relation;
+ ret->u.d.pattern = d->pattern; d->pattern = NULL;
+ ret->u.d.priority = d->priority;
+ free_dtags(d);
+ }
+ return ret;
+}
+
+static commandlist_t *build_fileinto(int t, int copy, char *folder)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == FILEINTO);
+
+ if (ret) {
+ ret->u.f.copy = copy;
+ ret->u.f.folder = folder;
+ }
+ return ret;
+}
+
+static commandlist_t *build_redirect(int t, int copy, char *address)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == REDIRECT);
+
+ if (ret) {
+ ret->u.r.copy = copy;
+ ret->u.r.address = address;
+ }
+ return ret;
+}
+
+static struct aetags *new_aetags(void)
+{
+ struct aetags *r = (struct aetags *) xmalloc(sizeof(struct aetags));
+
+ r->addrtag = r->comptag = r->relation=-1;
+ r->comparator=NULL;
+
+ return r;
+}
+
+static struct aetags *canon_aetags(struct aetags *ae)
+{
+ if (ae->addrtag == -1) { ae->addrtag = ALL; }
+ if (ae->comparator == NULL) {
+ ae->comparator = xstrdup("i;ascii-casemap");
+ }
+ if (ae->comptag == -1) { ae->comptag = IS; }
+ return ae;
+}
+
+static void free_aetags(struct aetags *ae)
+{
+ free(ae->comparator);
+ free(ae);
+}
+
+static struct htags *new_htags(void)
+{
+ struct htags *r = (struct htags *) xmalloc(sizeof(struct htags));
+
+ r->comptag = r->relation= -1;
+
+ r->comparator = NULL;
+
+ return r;
+}
+
+static struct htags *canon_htags(struct htags *h)
+{
+ if (h->comparator == NULL) {
+ h->comparator = xstrdup("i;ascii-casemap");
+ }
+ if (h->comptag == -1) { h->comptag = IS; }
+ return h;
+}
+
+static void free_htags(struct htags *h)
+{
+ free(h->comparator);
+ free(h);
+}
+
+static struct btags *new_btags(void)
+{
+ struct btags *r = (struct btags *) xmalloc(sizeof(struct btags));
+
+ r->transform = r->offset = r->comptag = r->relation = -1;
+ r->content_types = NULL;
+ r->comparator = NULL;
+
+ return r;
+}
+
+static struct btags *canon_btags(struct btags *b)
+{
+ if (b->transform == -1) { b->transform = TEXT; }
+ if (b->content_types == NULL) {
+ if (b->transform == RAW) {
+ b->content_types = new_sl(xstrdup(""), NULL);
+ } else {
+ b->content_types = new_sl(xstrdup("text"), NULL);
+ }
+ }
+ if (b->offset == -1) { b->offset = 0; }
+ if (b->comparator == NULL) { b->comparator = xstrdup("i;ascii-casemap"); }
+ if (b->comptag == -1) { b->comptag = IS; }
+ return b;
+}
+
+static void free_btags(struct btags *b)
+{
+ if (b->content_types) { free_sl(b->content_types); }
+ free(b->comparator);
+ free(b);
+}
+
+static struct vtags *new_vtags(void)
+{
+ struct vtags *r = (struct vtags *) xmalloc(sizeof(struct vtags));
+
+ r->days = -1;
+ r->addresses = NULL;
+ r->subject = NULL;
+ r->from = NULL;
+ r->handle = NULL;
+ r->mime = -1;
+
+ return r;
+}
+
+static struct vtags *canon_vtags(struct vtags *v)
+{
+ assert(parse_script->interp.vacation != NULL);
+
+ if (v->days == -1) { v->days = 7; }
+ if (v->days < parse_script->interp.vacation->min_response)
+ { v->days = parse_script->interp.vacation->min_response; }
+ if (v->days > parse_script->interp.vacation->max_response)
+ { v->days = parse_script->interp.vacation->max_response; }
+ if (v->mime == -1) { v->mime = 0; }
+
+ return v;
+}
+
+static void free_vtags(struct vtags *v)
+{
+ if (v->addresses) { free_sl(v->addresses); }
+ if (v->subject) { free(v->subject); }
+ if (v->from) { free(v->from); }
+ if (v->handle) { free(v->handle); }
+ free(v);
+}
+
+static struct ntags *new_ntags(void)
+{
+ struct ntags *r = (struct ntags *) xmalloc(sizeof(struct ntags));
+
+ r->method = NULL;
+ r->id = NULL;
+ r->options = NULL;
+ r->priority = -1;
+ r->message = NULL;
+
+ return r;
+}
+
+static struct ntags *canon_ntags(struct ntags *n)
+{
+ if (n->priority == -1) { n->priority = NORMAL; }
+ if (n->message == NULL) { n->message = xstrdup("$from$: $subject$"); }
+ if (n->method == NULL) { n->method = xstrdup("default"); }
+ return n;
+}
+static struct dtags *canon_dtags(struct dtags *d)
+{
+ if (d->priority == -1) { d->priority = ANY; }
+ if (d->comptag == -1) { d->comptag = ANY; }
+ return d;
+}
+
+static void free_ntags(struct ntags *n)
+{
+ if (n->method) { free(n->method); }
+ if (n->id) { free(n->id); }
+ if (n->options) { free_sl(n->options); }
+ if (n->message) { free(n->message); }
+ free(n);
+}
+
+static struct dtags *new_dtags(void)
+{
+ struct dtags *r = (struct dtags *) xmalloc(sizeof(struct dtags));
+
+ r->comptag = r->priority= r->relation = -1;
+ r->pattern = NULL;
+
+ return r;
+}
+
+static void free_dtags(struct dtags *d)
+{
+ if (d->pattern) free(d->pattern);
+ free(d);
+}
+
+static int verify_stringlist(stringlist_t *sl, int (*verify)(char *))
+{
+ for (; sl != NULL && verify(sl->s); sl = sl->next) ;
+ return (sl == NULL);
+}
+
+char *addrptr; /* pointer to address string for address lexer */
+char addrerr[500]; /* buffer for address parser error messages */
+
+static int verify_address(char *s)
+{
+ char errbuf[500];
+
+ addrptr = s;
+ addrerr[0] = '\0'; /* paranoia */
+ if (addrparse()) {
+ snprintf(errbuf, sizeof(errbuf), "address '%s': %s", s, addrerr);
+ yyerror(errbuf);
+ return 0;
+ }
+ return 1;
+}
+
+static int verify_mailbox(char *s)
+{
+ if (!verify_utf8(s)) return 0;
+
+ /* xxx if not a mailbox, call yyerror */
+ return 1;
+}
+
+static int verify_header(char *hdr)
+{
+ char *h = hdr;
+ char errbuf[100];
+
+ while (*h) {
+ /* field-name = 1*ftext
+ ftext = %d33-57 / %d59-126
+ ; Any character except
+ ; controls, SP, and
+ ; ":". */
+ if (!((*h >= 33 && *h <= 57) || (*h >= 59 && *h <= 126))) {
+ snprintf(errbuf, sizeof(errbuf),
+ "header '%s': not a valid header", hdr);
+ yyerror(errbuf);
+ return 0;
+ }
+ h++;
+ }
+ return 1;
+}
+
+static int verify_addrheader(char *hdr)
+{
+ const char **h, *hdrs[] = {
+ "from", "sender", "reply-to", /* RFC2822 originator fields */
+ "to", "cc", "bcc", /* RFC2822 destination fields */
+ "resent-from", "resent-sender", /* RFC2822 resent fields */
+ "resent-to", "resent-cc", "resent-bcc",
+ "return-path", /* RFC2822 trace fields */
+ "disposition-notification-to", /* RFC2298 MDN request fields */
+ "delivered-to", /* non-standard (loop detection) */
+ "approved", /* RFC1036 moderator/control fields */
+ NULL
+ };
+ char errbuf[100];
+
+ if (!config_getswitch(IMAPOPT_RFC3028_STRICT))
+ return verify_header(hdr);
+
+ for (lcase(hdr), h = hdrs; *h; h++) {
+ if (!strcmp(*h, hdr)) return 1;
+ }
+
+ snprintf(errbuf, sizeof(errbuf),
+ "header '%s': not a valid header for an address test", hdr);
+ yyerror(errbuf);
+ return 0;
+}
+
+static int verify_envelope(char *env)
+{
+ char errbuf[100];
+
+ lcase(env);
+ if (!config_getswitch(IMAPOPT_RFC3028_STRICT) ||
+ !strcmp(env, "from") || !strcmp(env, "to") || !strcmp(env, "auth")) {
+ return 1;
+ }
+
+ snprintf(errbuf, sizeof(errbuf),
+ "env-part '%s': not a valid part for an envelope test", env);
+ yyerror(errbuf);
+ return 0;
+}
+
+static int verify_relat(char *r)
+{/* this really should have been a token to begin with.*/
+ char errbuf[100];
+ lcase(r);
+ if (!strcmp(r, "gt")) {return GT;}
+ else if (!strcmp(r, "ge")) {return GE;}
+ else if (!strcmp(r, "lt")) {return LT;}
+ else if (!strcmp(r, "le")) {return LE;}
+ else if (!strcmp(r, "ne")) {return NE;}
+ else if (!strcmp(r, "eq")) {return EQ;}
+ else{
+ sprintf(errbuf, "flag '%s': not a valid relational operation", r);
+ yyerror(errbuf);
+ return -1;
+ }
+
+}
+
+
+
+
+static int verify_flag(char *f)
+{
+ char errbuf[100];
+
+ if (f[0] == '\\') {
+ lcase(f);
+ if (strcmp(f, "\\seen") && strcmp(f, "\\answered") &&
+ strcmp(f, "\\flagged") && strcmp(f, "\\draft") &&
+ strcmp(f, "\\deleted")) {
+ snprintf(errbuf, sizeof(errbuf),
+ "flag '%s': not a system flag", f);
+ yyerror(errbuf);
+ return 0;
+ }
+ return 1;
+ }
+ if (!imparse_isatom(f)) {
+ snprintf(errbuf, sizeof(errbuf), "flag '%s': not a valid keyword", f);
+ yyerror(errbuf);
+ return 0;
+ }
+ return 1;
+}
+
+#ifdef ENABLE_REGEX
+static int verify_regex(char *s, int cflags)
+{
+ int ret;
+ char errbuf[100];
+ regex_t *reg = (regex_t *) xmalloc(sizeof(regex_t));
+
+ if ((ret = regcomp(reg, s, cflags)) != 0) {
+ (void) regerror(ret, reg, errbuf, sizeof(errbuf));
+ yyerror(errbuf);
+ free(reg);
+ return 0;
+ }
+ free(reg);
+ return 1;
+}
+
+static int verify_regexs(stringlist_t *sl, char *comp)
+{
+ stringlist_t *sl2;
+ int cflags = REG_EXTENDED | REG_NOSUB;
+
+
+ if (!strcmp(comp, "i;ascii-casemap")) {
+ cflags |= REG_ICASE;
+ }
+
+ for (sl2 = sl; sl2 != NULL; sl2 = sl2->next) {
+ if ((verify_regex(sl2->s, cflags)) == 0) {
+ break;
+ }
+ }
+ if (sl2 == NULL) {
+ return 1;
+ }
+ return 0;
+}
+#endif
+
+/*
+ * Valid UTF-8 check (from RFC 2640 Annex B.1)
+ *
+ * The following routine checks if a byte sequence is valid UTF-8. This
+ * is done by checking for the proper tagging of the first and following
+ * bytes to make sure they conform to the UTF-8 format. It then checks
+ * to assure that the data part of the UTF-8 sequence conforms to the
+ * proper range allowed by the encoding. Note: This routine will not
+ * detect characters that have not been assigned and therefore do not
+ * exist.
+ */
+static int verify_utf8(char *s)
+{
+ const unsigned char *buf = s;
+ const unsigned char *endbuf = s + strlen(s);
+ unsigned char byte2mask = 0x00, c;
+ int trailing = 0; /* trailing (continuation) bytes to follow */
+
+ while (buf != endbuf) {
+ c = *buf++;
+ if (trailing) {
+ if ((c & 0xC0) == 0x80) { /* Does trailing byte
+ follow UTF-8 format? */
+ if (byte2mask) { /* Need to check 2nd byte
+ for proper range? */
+ if (c & byte2mask) /* Are appropriate bits set? */
+ byte2mask = 0x00;
+ else
+ break;
+ }
+ trailing--;
+ }
+ else
+ break;
+ }
+ else {
+ if ((c & 0x80) == 0x00) /* valid 1 byte UTF-8 */
+ continue;
+ else if ((c & 0xE0) == 0xC0) /* valid 2 byte UTF-8 */
+ if (c & 0x1E) { /* Is UTF-8 byte
+ in proper range? */
+ trailing = 1;
+ }
+ else
+ break;
+ else if ((c & 0xF0) == 0xE0) { /* valid 3 byte UTF-8 */
+ if (!(c & 0x0F)) { /* Is UTF-8 byte
+ in proper range? */
+ byte2mask = 0x20; /* If not, set mask
+ to check next byte */
+ }
+ trailing = 2;
+ }
+ else if ((c & 0xF8) == 0xF0) { /* valid 4 byte UTF-8 */
+ if (!(c & 0x07)) { /* Is UTF-8 byte
+ in proper range? */
+ byte2mask = 0x30; /* If not, set mask
+ to check next byte */
+ }
+ trailing = 3;
+ }
+ else if ((c & 0xFC) == 0xF8) { /* valid 5 byte UTF-8 */
+ if (!(c & 0x03)) { /* Is UTF-8 byte
+ in proper range? */
+ byte2mask = 0x38; /* If not, set mask
+ to check next byte */
+ }
+ trailing = 4;
+ }
+ else if ((c & 0xFE) == 0xFC) { /* valid 6 byte UTF-8 */
+ if (!(c & 0x01)) { /* Is UTF-8 byte
+ in proper range? */
+ byte2mask = 0x3C; /* If not, set mask
+ to check next byte */
+ }
+ trailing = 5;
+ }
+ else
+ break;
+ }
+ }
+
+ if ((buf != endbuf) || trailing) {
+ char errbuf[100];
+
+ snprintf(errbuf, sizeof(errbuf),
+ "string '%s': not valid utf8", s);
+ yyerror(errbuf);
+ return 0;
+ }
+
+ return 1;
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,211 @@
+/* A Bison parser, made by GNU Bison 2.1. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ NUMBER = 258,
+ STRING = 259,
+ IF = 260,
+ ELSIF = 261,
+ ELSE = 262,
+ REJCT = 263,
+ FILEINTO = 264,
+ REDIRECT = 265,
+ KEEP = 266,
+ STOP = 267,
+ DISCARD = 268,
+ VACATION = 269,
+ REQUIRE = 270,
+ SETFLAG = 271,
+ ADDFLAG = 272,
+ REMOVEFLAG = 273,
+ MARK = 274,
+ UNMARK = 275,
+ NOTIFY = 276,
+ DENOTIFY = 277,
+ ANYOF = 278,
+ ALLOF = 279,
+ EXISTS = 280,
+ SFALSE = 281,
+ STRUE = 282,
+ HEADER = 283,
+ NOT = 284,
+ SIZE = 285,
+ ADDRESS = 286,
+ ENVELOPE = 287,
+ BODY = 288,
+ COMPARATOR = 289,
+ IS = 290,
+ CONTAINS = 291,
+ MATCHES = 292,
+ REGEX = 293,
+ COUNT = 294,
+ VALUE = 295,
+ OVER = 296,
+ UNDER = 297,
+ GT = 298,
+ GE = 299,
+ LT = 300,
+ LE = 301,
+ EQ = 302,
+ NE = 303,
+ ALL = 304,
+ LOCALPART = 305,
+ DOMAIN = 306,
+ USER = 307,
+ DETAIL = 308,
+ RAW = 309,
+ TEXT = 310,
+ CONTENT = 311,
+ DAYS = 312,
+ ADDRESSES = 313,
+ SUBJECT = 314,
+ FROM = 315,
+ HANDLE = 316,
+ MIME = 317,
+ METHOD = 318,
+ ID = 319,
+ OPTIONS = 320,
+ LOW = 321,
+ NORMAL = 322,
+ HIGH = 323,
+ ANY = 324,
+ MESSAGE = 325,
+ INCLUDE = 326,
+ PERSONAL = 327,
+ GLOBAL = 328,
+ RETURN = 329,
+ COPY = 330
+ };
+#endif
+/* Tokens. */
+#define NUMBER 258
+#define STRING 259
+#define IF 260
+#define ELSIF 261
+#define ELSE 262
+#define REJCT 263
+#define FILEINTO 264
+#define REDIRECT 265
+#define KEEP 266
+#define STOP 267
+#define DISCARD 268
+#define VACATION 269
+#define REQUIRE 270
+#define SETFLAG 271
+#define ADDFLAG 272
+#define REMOVEFLAG 273
+#define MARK 274
+#define UNMARK 275
+#define NOTIFY 276
+#define DENOTIFY 277
+#define ANYOF 278
+#define ALLOF 279
+#define EXISTS 280
+#define SFALSE 281
+#define STRUE 282
+#define HEADER 283
+#define NOT 284
+#define SIZE 285
+#define ADDRESS 286
+#define ENVELOPE 287
+#define BODY 288
+#define COMPARATOR 289
+#define IS 290
+#define CONTAINS 291
+#define MATCHES 292
+#define REGEX 293
+#define COUNT 294
+#define VALUE 295
+#define OVER 296
+#define UNDER 297
+#define GT 298
+#define GE 299
+#define LT 300
+#define LE 301
+#define EQ 302
+#define NE 303
+#define ALL 304
+#define LOCALPART 305
+#define DOMAIN 306
+#define USER 307
+#define DETAIL 308
+#define RAW 309
+#define TEXT 310
+#define CONTENT 311
+#define DAYS 312
+#define ADDRESSES 313
+#define SUBJECT 314
+#define FROM 315
+#define HANDLE 316
+#define MIME 317
+#define METHOD 318
+#define ID 319
+#define OPTIONS 320
+#define LOW 321
+#define NORMAL 322
+#define HIGH 323
+#define ANY 324
+#define MESSAGE 325
+#define INCLUDE 326
+#define PERSONAL 327
+#define GLOBAL 328
+#define RETURN 329
+#define COPY 330
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 149 "sieve.y"
+typedef union YYSTYPE {
+ int nval;
+ char *sval;
+ stringlist_t *sl;
+ test_t *test;
+ testlist_t *testl;
+ commandlist_t *cl;
+ struct vtags *vtag;
+ struct aetags *aetag;
+ struct htags *htag;
+ struct btags *btag;
+ struct ntags *ntag;
+ struct dtags *dtag;
+} YYSTYPE;
+/* Line 1447 of yacc.c. */
+#line 203 "y.tab.h"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYSTYPE yylval;
+
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.y
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.y?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.y (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve.y Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1301 @@
+%{
+/* sieve.y -- sieve parser
+ * Larry Greenfield
+ * $Id: sieve.y,v 1.23.2.13 2005/10/05 15:56:24 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include "xmalloc.h"
+#include "comparator.h"
+#include "interp.h"
+#include "script.h"
+#include "tree.h"
+
+#include "../lib/util.h"
+#include "../lib/imparse.h"
+#include "../lib/libconfig.h"
+
+ /* definitions */
+ extern int addrparse(void);
+
+struct vtags {
+ int days;
+ stringlist_t *addresses;
+ char *subject;
+ char *from;
+ char *handle;
+ int mime;
+};
+
+struct htags {
+ char *comparator;
+ int comptag;
+ int relation;
+};
+
+struct aetags {
+ int addrtag;
+ char *comparator;
+ int comptag;
+ int relation;
+};
+
+struct btags {
+ int transform;
+ int offset;
+ stringlist_t *content_types;
+ char *comparator;
+ int comptag;
+ int relation;
+};
+
+struct ntags {
+ char *method;
+ char *id;
+ stringlist_t *options;
+ int priority;
+ char *message;
+};
+
+struct dtags {
+ int comptag;
+ int relation;
+ void *pattern;
+ int priority;
+};
+
+static commandlist_t *ret;
+static sieve_script_t *parse_script;
+static int check_reqs(stringlist_t *sl);
+static test_t *build_address(int t, struct aetags *ae,
+ stringlist_t *sl, stringlist_t *pl);
+static test_t *build_header(int t, struct htags *h,
+ stringlist_t *sl, stringlist_t *pl);
+static test_t *build_body(int t, struct btags *b, stringlist_t *pl);
+static commandlist_t *build_vacation(int t, struct vtags *h, char *s);
+static commandlist_t *build_notify(int t, struct ntags *n);
+static commandlist_t *build_denotify(int t, struct dtags *n);
+static commandlist_t *build_fileinto(int t, int c, char *f);
+static commandlist_t *build_redirect(int t, int c, char *a);
+static struct aetags *new_aetags(void);
+static struct aetags *canon_aetags(struct aetags *ae);
+static void free_aetags(struct aetags *ae);
+static struct htags *new_htags(void);
+static struct htags *canon_htags(struct htags *h);
+static void free_htags(struct htags *h);
+static struct btags *new_btags(void);
+static struct btags *canon_btags(struct btags *b);
+static void free_btags(struct btags *b);
+static struct vtags *new_vtags(void);
+static struct vtags *canon_vtags(struct vtags *v);
+static void free_vtags(struct vtags *v);
+static struct ntags *new_ntags(void);
+static struct ntags *canon_ntags(struct ntags *n);
+static void free_ntags(struct ntags *n);
+static struct dtags *new_dtags(void);
+static struct dtags *canon_dtags(struct dtags *d);
+static void free_dtags(struct dtags *d);
+
+static int verify_stringlist(stringlist_t *sl, int (*verify)(char *));
+static int verify_mailbox(char *s);
+static int verify_address(char *s);
+static int verify_header(char *s);
+static int verify_addrheader(char *s);
+static int verify_envelope(char *s);
+static int verify_flag(char *s);
+static int verify_relat(char *s);
+#ifdef ENABLE_REGEX
+static int verify_regex(char *s, int cflags);
+static int verify_regexs(stringlist_t *sl, char *comp);
+#endif
+static int verify_utf8(char *s);
+
+int yyerror(char *msg);
+extern int yylex(void);
+extern void yyrestart(FILE *f);
+
+#define YYERROR_VERBOSE /* i want better error messages! */
+%}
+
+%union {
+ int nval;
+ char *sval;
+ stringlist_t *sl;
+ test_t *test;
+ testlist_t *testl;
+ commandlist_t *cl;
+ struct vtags *vtag;
+ struct aetags *aetag;
+ struct htags *htag;
+ struct btags *btag;
+ struct ntags *ntag;
+ struct dtags *dtag;
+}
+
+%token <nval> NUMBER
+%token <sval> STRING
+%token IF ELSIF ELSE
+%token REJCT FILEINTO REDIRECT KEEP STOP DISCARD VACATION REQUIRE
+%token SETFLAG ADDFLAG REMOVEFLAG MARK UNMARK
+%token NOTIFY DENOTIFY
+%token ANYOF ALLOF EXISTS SFALSE STRUE HEADER NOT SIZE ADDRESS ENVELOPE BODY
+%token COMPARATOR IS CONTAINS MATCHES REGEX COUNT VALUE OVER UNDER
+%token GT GE LT LE EQ NE
+%token ALL LOCALPART DOMAIN USER DETAIL
+%token RAW TEXT CONTENT
+%token DAYS ADDRESSES SUBJECT FROM HANDLE MIME
+%token METHOD ID OPTIONS LOW NORMAL HIGH ANY MESSAGE
+%token INCLUDE PERSONAL GLOBAL RETURN
+%token COPY
+
+%type <cl> commands command action elsif block
+%type <sl> stringlist strings
+%type <test> test
+%type <nval> comptag relcomp sizetag addrparttag addrorenv location copy
+%type <testl> testlist tests
+%type <htag> htags
+%type <aetag> aetags
+%type <btag> btags
+%type <vtag> vtags
+%type <ntag> ntags
+%type <dtag> dtags
+%type <nval> priority
+
+%%
+
+start: reqs { ret = NULL; }
+ | reqs commands { ret = $2; }
+ ;
+
+reqs: /* empty */
+ | require reqs
+ ;
+
+require: REQUIRE stringlist ';' { if (!check_reqs($2)) {
+ yyerror("unsupported feature");
+ YYERROR;
+ } }
+ ;
+
+commands: command { $$ = $1; }
+ | command commands { $1->next = $2; $$ = $1; }
+ ;
+
+command: action ';' { $$ = $1; }
+ | IF test block elsif { $$ = new_if($2, $3, $4); }
+ | error ';' { $$ = new_command(STOP); }
+ ;
+
+elsif: /* empty */ { $$ = NULL; }
+ | ELSIF test block elsif { $$ = new_if($2, $3, $4); }
+ | ELSE block { $$ = $2; }
+ ;
+
+action: REJCT STRING { if (!parse_script->support.reject) {
+ yyerror("reject not required");
+ YYERROR;
+ }
+ if (!verify_utf8($2)) {
+ YYERROR; /* vu should call yyerror() */
+ }
+ $$ = new_command(REJCT);
+ $$->u.str = $2; }
+ | FILEINTO copy STRING { if (!parse_script->support.fileinto) {
+ yyerror("fileinto not required");
+ YYERROR;
+ }
+ if (!verify_mailbox($3)) {
+ YYERROR; /* vm should call yyerror() */
+ }
+ $$ = build_fileinto(FILEINTO, $2, $3); }
+ | REDIRECT copy STRING { if (!verify_address($3)) {
+ YYERROR; /* va should call yyerror() */
+ }
+ $$ = build_redirect(REDIRECT, $2, $3); }
+ | KEEP { $$ = new_command(KEEP); }
+ | STOP { $$ = new_command(STOP); }
+ | DISCARD { $$ = new_command(DISCARD); }
+ | VACATION vtags STRING { if (!parse_script->support.vacation) {
+ yyerror("vacation not required");
+ YYERROR;
+ }
+ if (($2->mime == -1) && !verify_utf8($3)) {
+ YYERROR; /* vu should call yyerror() */
+ }
+ $$ = build_vacation(VACATION,
+ canon_vtags($2), $3); }
+ | SETFLAG stringlist { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ if (!verify_stringlist($2, verify_flag)) {
+ YYERROR; /* vf should call yyerror() */
+ }
+ $$ = new_command(SETFLAG);
+ $$->u.sl = $2; }
+ | ADDFLAG stringlist { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ if (!verify_stringlist($2, verify_flag)) {
+ YYERROR; /* vf should call yyerror() */
+ }
+ $$ = new_command(ADDFLAG);
+ $$->u.sl = $2; }
+ | REMOVEFLAG stringlist { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ if (!verify_stringlist($2, verify_flag)) {
+ YYERROR; /* vf should call yyerror() */
+ }
+ $$ = new_command(REMOVEFLAG);
+ $$->u.sl = $2; }
+ | MARK { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ $$ = new_command(MARK); }
+ | UNMARK { if (!parse_script->support.imapflags) {
+ yyerror("imapflags not required");
+ YYERROR;
+ }
+ $$ = new_command(UNMARK); }
+
+ | NOTIFY ntags { if (!parse_script->support.notify) {
+ yyerror("notify not required");
+ $$ = new_command(NOTIFY);
+ YYERROR;
+ } else {
+ $$ = build_notify(NOTIFY,
+ canon_ntags($2));
+ } }
+ | DENOTIFY dtags { if (!parse_script->support.notify) {
+ yyerror("notify not required");
+ $$ = new_command(DENOTIFY);
+ YYERROR;
+ } else {
+ $$ = build_denotify(DENOTIFY, canon_dtags($2));
+ if ($$ == NULL) {
+ yyerror("unable to find a compatible comparator");
+ YYERROR; } } }
+
+ | INCLUDE location STRING { if (!parse_script->support.include) {
+ yyerror("include not required");
+ YYERROR;
+ }
+ $$ = new_command(INCLUDE);
+ $$->u.inc.location = $2;
+ $$->u.inc.script = $3; }
+ | RETURN { if (!parse_script->support.include) {
+ yyerror("include not required");
+ YYERROR;
+ }
+ $$ = new_command(RETURN); }
+ ;
+
+location: /* empty */ { $$ = PERSONAL; }
+ | PERSONAL { $$ = PERSONAL; }
+ | GLOBAL { $$ = GLOBAL; }
+ ;
+
+ntags: /* empty */ { $$ = new_ntags(); }
+ | ntags ID STRING { if ($$->id != NULL) {
+ yyerror("duplicate :method"); YYERROR; }
+ else { $$->id = $3; } }
+ | ntags METHOD STRING { if ($$->method != NULL) {
+ yyerror("duplicate :method"); YYERROR; }
+ else { $$->method = $3; } }
+ | ntags OPTIONS stringlist { if ($$->options != NULL) {
+ yyerror("duplicate :options"); YYERROR; }
+ else { $$->options = $3; } }
+ | ntags priority { if ($$->priority != -1) {
+ yyerror("duplicate :priority"); YYERROR; }
+ else { $$->priority = $2; } }
+ | ntags MESSAGE STRING { if ($$->message != NULL) {
+ yyerror("duplicate :message"); YYERROR; }
+ else { $$->message = $3; } }
+ ;
+
+dtags: /* empty */ { $$ = new_dtags(); }
+ | dtags priority { if ($$->priority != -1) {
+ yyerror("duplicate priority level"); YYERROR; }
+ else { $$->priority = $2; } }
+ | dtags comptag STRING { if ($$->comptag != -1)
+ {
+ yyerror("duplicate comparator type tag"); YYERROR;
+ }
+ $$->comptag = $2;
+#ifdef ENABLE_REGEX
+ if ($$->comptag == REGEX)
+ {
+ int cflags = REG_EXTENDED |
+ REG_NOSUB | REG_ICASE;
+ if (!verify_regex($3, cflags)) { YYERROR; }
+ }
+#endif
+ $$->pattern = $3;
+ }
+ | dtags relcomp STRING { $$ = $1;
+ if ($$->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { $$->comptag = $2;
+ $$->relation = verify_relat($3);
+ if ($$->relation==-1)
+ {YYERROR; /*vr called yyerror()*/ }
+ } }
+ ;
+
+priority: LOW { $$ = LOW; }
+ | NORMAL { $$ = NORMAL; }
+ | HIGH { $$ = HIGH; }
+ ;
+
+vtags: /* empty */ { $$ = new_vtags(); }
+ | vtags DAYS NUMBER { if ($$->days != -1) {
+ yyerror("duplicate :days"); YYERROR; }
+ else { $$->days = $3; } }
+ | vtags ADDRESSES stringlist { if ($$->addresses != NULL) {
+ yyerror("duplicate :addresses");
+ YYERROR;
+ } else if (!verify_stringlist($3,
+ verify_address)) {
+ YYERROR;
+ } else {
+ $$->addresses = $3; } }
+ | vtags SUBJECT STRING { if ($$->subject != NULL) {
+ yyerror("duplicate :subject");
+ YYERROR;
+ } else if (!verify_utf8($3)) {
+ YYERROR; /* vu should call yyerror() */
+ } else { $$->subject = $3; } }
+ | vtags FROM STRING { if ($$->from != NULL) {
+ yyerror("duplicate :from");
+ YYERROR;
+ } else if (!verify_address($3)) {
+ YYERROR; /* vu should call yyerror() */
+ } else { $$->from = $3; } }
+ | vtags HANDLE STRING { if ($$->handle != NULL) {
+ yyerror("duplicate :handle");
+ YYERROR;
+ } else if (!verify_utf8($3)) {
+ YYERROR; /* vu should call yyerror() */
+ } else { $$->handle = $3; } }
+ | vtags MIME { if ($$->mime != -1) {
+ yyerror("duplicate :mime");
+ YYERROR; }
+ else { $$->mime = MIME; } }
+ ;
+
+stringlist: '[' strings ']' { $$ = $2; }
+ | STRING { $$ = new_sl($1, NULL); }
+ ;
+
+strings: STRING { $$ = new_sl($1, NULL); }
+ | STRING ',' strings { $$ = new_sl($1, $3); }
+ ;
+
+block: '{' commands '}' { $$ = $2; }
+ | '{' '}' { $$ = NULL; }
+ ;
+
+test: ANYOF testlist { $$ = new_test(ANYOF); $$->u.tl = $2; }
+ | ALLOF testlist { $$ = new_test(ALLOF); $$->u.tl = $2; }
+ | EXISTS stringlist { $$ = new_test(EXISTS); $$->u.sl = $2; }
+ | SFALSE { $$ = new_test(SFALSE); }
+ | STRUE { $$ = new_test(STRUE); }
+ | HEADER htags stringlist stringlist
+ {
+ if (!verify_stringlist($3, verify_header)) {
+ YYERROR; /* vh should call yyerror() */
+ }
+ if (!verify_stringlist($4, verify_utf8)) {
+ YYERROR; /* vu should call yyerror() */
+ }
+
+ $2 = canon_htags($2);
+#ifdef ENABLE_REGEX
+ if ($2->comptag == REGEX)
+ {
+ if (!(verify_regexs($4, $2->comparator)))
+ { YYERROR; }
+ }
+#endif
+ $$ = build_header(HEADER, $2, $3, $4);
+ if ($$ == NULL) {
+ yyerror("unable to find a compatible comparator");
+ YYERROR; }
+ }
+
+
+ | addrorenv aetags stringlist stringlist
+ {
+ if (($1 == ADDRESS) &&
+ !verify_stringlist($3, verify_addrheader))
+ { YYERROR; }
+ else if (($1 == ENVELOPE) &&
+ !verify_stringlist($3, verify_envelope))
+ { YYERROR; }
+ $2 = canon_aetags($2);
+#ifdef ENABLE_REGEX
+ if ($2->comptag == REGEX)
+ {
+ if (!( verify_regexs($4, $2->comparator)))
+ { YYERROR; }
+ }
+#endif
+ $$ = build_address($1, $2, $3, $4);
+ if ($$ == NULL) {
+ yyerror("unable to find a compatible comparator");
+ YYERROR; }
+ }
+
+ | BODY btags stringlist
+ {
+ if (!parse_script->support.body) {
+ yyerror("body not required");
+ YYERROR;
+ }
+
+ if (!verify_stringlist($3, verify_utf8)) {
+ YYERROR; /* vu should call yyerror() */
+ }
+
+ $2 = canon_btags($2);
+#ifdef ENABLE_REGEX
+ if ($2->comptag == REGEX)
+ {
+ if (!(verify_regexs($3, $2->comparator)))
+ { YYERROR; }
+ }
+#endif
+ $$ = build_body(BODY, $2, $3);
+ if ($$ == NULL) {
+ yyerror("unable to find a compatible comparator");
+ YYERROR; }
+ }
+
+
+ | NOT test { $$ = new_test(NOT); $$->u.t = $2; }
+ | SIZE sizetag NUMBER { $$ = new_test(SIZE); $$->u.sz.t = $2;
+ $$->u.sz.n = $3; }
+ | error { $$ = NULL; }
+ ;
+
+addrorenv: ADDRESS { $$ = ADDRESS; }
+ | ENVELOPE {if (!parse_script->support.envelope)
+ {yyerror("envelope not required"); YYERROR;}
+ else{$$ = ENVELOPE; }
+ }
+
+ ;
+
+aetags: /* empty */ { $$ = new_aetags(); }
+ | aetags addrparttag { $$ = $1;
+ if ($$->addrtag != -1) {
+ yyerror("duplicate or conflicting address part tag");
+ YYERROR; }
+ else { $$->addrtag = $2; } }
+ | aetags comptag { $$ = $1;
+ if ($$->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { $$->comptag = $2; } }
+ | aetags relcomp STRING{ $$ = $1;
+ if ($$->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { $$->comptag = $2;
+ $$->relation = verify_relat($3);
+ if ($$->relation==-1)
+ {YYERROR; /*vr called yyerror()*/ }
+ } }
+ | aetags COMPARATOR STRING { $$ = $1;
+ if ($$->comparator != NULL) {
+ yyerror("duplicate comparator tag"); YYERROR; }
+ else if (!strcmp($3, "i;ascii-numeric") &&
+ !parse_script->support.i_ascii_numeric) {
+ yyerror("comparator-i;ascii-numeric not required");
+ YYERROR; }
+ else { $$->comparator = $3; } }
+ ;
+
+htags: /* empty */ { $$ = new_htags(); }
+ | htags comptag { $$ = $1;
+ if ($$->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { $$->comptag = $2; } }
+ | htags relcomp STRING { $$ = $1;
+ if ($$->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { $$->comptag = $2;
+ $$->relation = verify_relat($3);
+ if ($$->relation==-1)
+ {YYERROR; /*vr called yyerror()*/ }
+ } }
+ | htags COMPARATOR STRING { $$ = $1;
+ if ($$->comparator != NULL) {
+ yyerror("duplicate comparator tag"); YYERROR; }
+ else if (!strcmp($3, "i;ascii-numeric") &&
+ !parse_script->support.i_ascii_numeric) {
+ yyerror("comparator-i;ascii-numeric not required"); YYERROR; }
+ else {
+ $$->comparator = $3; } }
+ ;
+
+btags: /* empty */ { $$ = new_btags(); }
+ | btags RAW { $$ = $1;
+ if ($$->transform != -1) {
+ yyerror("duplicate or conflicting transform tag");
+ YYERROR; }
+ else { $$->transform = RAW; } }
+ | btags TEXT { $$ = $1;
+ if ($$->transform != -1) {
+ yyerror("duplicate or conflicting transform tag");
+ YYERROR; }
+ else { $$->transform = TEXT; } }
+ | btags CONTENT stringlist { $$ = $1;
+ if ($$->transform != -1) {
+ yyerror("duplicate or conflicting transform tag");
+ YYERROR; }
+ else {
+ $$->transform = CONTENT;
+ $$->content_types = $3;
+ } }
+ | btags comptag { $$ = $1;
+ if ($$->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { $$->comptag = $2; } }
+ | btags relcomp STRING { $$ = $1;
+ if ($$->comptag != -1) {
+ yyerror("duplicate comparator type tag"); YYERROR; }
+ else { $$->comptag = $2;
+ $$->relation = verify_relat($3);
+ if ($$->relation==-1)
+ {YYERROR; /*vr called yyerror()*/ }
+ } }
+ | btags COMPARATOR STRING { $$ = $1;
+ if ($$->comparator != NULL) {
+ yyerror("duplicate comparator tag"); YYERROR; }
+ else if (!strcmp($3, "i;ascii-numeric") &&
+ !parse_script->support.i_ascii_numeric) {
+ yyerror("comparator-i;ascii-numeric not required"); YYERROR; }
+ else {
+ $$->comparator = $3; } }
+ ;
+
+
+addrparttag: ALL { $$ = ALL; }
+ | LOCALPART { $$ = LOCALPART; }
+ | DOMAIN { $$ = DOMAIN; }
+ | USER { if (!parse_script->support.subaddress) {
+ yyerror("subaddress not required");
+ YYERROR;
+ }
+ $$ = USER; }
+ | DETAIL { if (!parse_script->support.subaddress) {
+ yyerror("subaddress not required");
+ YYERROR;
+ }
+ $$ = DETAIL; }
+ ;
+comptag: IS { $$ = IS; }
+ | CONTAINS { $$ = CONTAINS; }
+ | MATCHES { $$ = MATCHES; }
+ | REGEX { if (!parse_script->support.regex) {
+ yyerror("regex not required");
+ YYERROR;
+ }
+ $$ = REGEX; }
+ ;
+
+relcomp: COUNT { if (!parse_script->support.relational) {
+ yyerror("relational not required");
+ YYERROR;
+ }
+ $$ = COUNT; }
+ | VALUE { if (!parse_script->support.relational) {
+ yyerror("relational not required");
+ YYERROR;
+ }
+ $$ = VALUE; }
+ ;
+
+
+sizetag: OVER { $$ = OVER; }
+ | UNDER { $$ = UNDER; }
+ ;
+
+copy: /* empty */ { $$ = 0; }
+ | COPY { if (!parse_script->support.copy) {
+ yyerror("copy not required");
+ YYERROR;
+ }
+ $$ = COPY; }
+ ;
+
+testlist: '(' tests ')' { $$ = $2; }
+ ;
+
+tests: test { $$ = new_testlist($1, NULL); }
+ | test ',' tests { $$ = new_testlist($1, $3); }
+ ;
+
+%%
+commandlist_t *sieve_parse(sieve_script_t *script, FILE *f)
+{
+ commandlist_t *t;
+
+ parse_script = script;
+ yyrestart(f);
+ if (yyparse()) {
+ t = NULL;
+ } else {
+ t = ret;
+ }
+ ret = NULL;
+ return t;
+}
+
+int yyerror(char *msg)
+{
+ extern int yylineno;
+ int ret;
+
+ parse_script->err++;
+ if (parse_script->interp.err) {
+ ret = parse_script->interp.err(yylineno, msg,
+ parse_script->interp.interp_context,
+ parse_script->script_context);
+ }
+
+ return 0;
+}
+
+static int check_reqs(stringlist_t *sl)
+{
+ int i = 1;
+ stringlist_t *s;
+
+ while (sl != NULL) {
+ s = sl;
+ sl = sl->next;
+
+ i &= script_require(parse_script, s->s);
+
+ if (s->s) free(s->s);
+ free(s);
+ }
+ return i;
+}
+
+static test_t *build_address(int t, struct aetags *ae,
+ stringlist_t *sl, stringlist_t *pl)
+{
+ test_t *ret = new_test(t); /* can be either ADDRESS or ENVELOPE */
+
+ assert((t == ADDRESS) || (t == ENVELOPE));
+
+ if (ret) {
+ ret->u.ae.comptag = ae->comptag;
+ ret->u.ae.relation=ae->relation;
+ ret->u.ae.comparator=xstrdup(ae->comparator);
+ ret->u.ae.sl = sl;
+ ret->u.ae.pl = pl;
+ ret->u.ae.addrpart = ae->addrtag;
+ free_aetags(ae);
+
+ }
+ return ret;
+}
+
+static test_t *build_header(int t, struct htags *h,
+ stringlist_t *sl, stringlist_t *pl)
+{
+ test_t *ret = new_test(t); /* can be HEADER */
+
+ assert(t == HEADER);
+
+ if (ret) {
+ ret->u.h.comptag = h->comptag;
+ ret->u.h.relation=h->relation;
+ ret->u.h.comparator=xstrdup(h->comparator);
+ ret->u.h.sl = sl;
+ ret->u.h.pl = pl;
+ free_htags(h);
+ }
+ return ret;
+}
+
+static test_t *build_body(int t, struct btags *b, stringlist_t *pl)
+{
+ test_t *ret = new_test(t); /* can be BODY */
+
+ assert(t == BODY);
+
+ if (ret) {
+ ret->u.b.comptag = b->comptag;
+ ret->u.b.relation = b->relation;
+ ret->u.b.comparator = xstrdup(b->comparator);
+ ret->u.b.transform = b->transform;
+ ret->u.b.offset = b->offset;
+ ret->u.b.content_types = b->content_types; b->content_types = NULL;
+ ret->u.b.pl = pl;
+ free_btags(b);
+ }
+ return ret;
+}
+
+static commandlist_t *build_vacation(int t, struct vtags *v, char *reason)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == VACATION);
+
+ if (ret) {
+ ret->u.v.subject = v->subject; v->subject = NULL;
+ ret->u.v.from = v->from; v->from = NULL;
+ ret->u.v.handle = v->handle; v->handle = NULL;
+ ret->u.v.days = v->days;
+ ret->u.v.mime = v->mime;
+ ret->u.v.addresses = v->addresses; v->addresses = NULL;
+ free_vtags(v);
+ ret->u.v.message = reason;
+ }
+ return ret;
+}
+
+static commandlist_t *build_notify(int t, struct ntags *n)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == NOTIFY);
+ if (ret) {
+ ret->u.n.method = n->method; n->method = NULL;
+ ret->u.n.id = n->id; n->id = NULL;
+ ret->u.n.options = n->options; n->options = NULL;
+ ret->u.n.priority = n->priority;
+ ret->u.n.message = n->message; n->message = NULL;
+ free_ntags(n);
+ }
+ return ret;
+}
+
+static commandlist_t *build_denotify(int t, struct dtags *d)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == DENOTIFY);
+
+ if (ret) {
+ ret->u.d.comptag = d->comptag;
+ ret->u.d.relation=d->relation;
+ ret->u.d.pattern = d->pattern; d->pattern = NULL;
+ ret->u.d.priority = d->priority;
+ free_dtags(d);
+ }
+ return ret;
+}
+
+static commandlist_t *build_fileinto(int t, int copy, char *folder)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == FILEINTO);
+
+ if (ret) {
+ ret->u.f.copy = copy;
+ ret->u.f.folder = folder;
+ }
+ return ret;
+}
+
+static commandlist_t *build_redirect(int t, int copy, char *address)
+{
+ commandlist_t *ret = new_command(t);
+
+ assert(t == REDIRECT);
+
+ if (ret) {
+ ret->u.r.copy = copy;
+ ret->u.r.address = address;
+ }
+ return ret;
+}
+
+static struct aetags *new_aetags(void)
+{
+ struct aetags *r = (struct aetags *) xmalloc(sizeof(struct aetags));
+
+ r->addrtag = r->comptag = r->relation=-1;
+ r->comparator=NULL;
+
+ return r;
+}
+
+static struct aetags *canon_aetags(struct aetags *ae)
+{
+ if (ae->addrtag == -1) { ae->addrtag = ALL; }
+ if (ae->comparator == NULL) {
+ ae->comparator = xstrdup("i;ascii-casemap");
+ }
+ if (ae->comptag == -1) { ae->comptag = IS; }
+ return ae;
+}
+
+static void free_aetags(struct aetags *ae)
+{
+ free(ae->comparator);
+ free(ae);
+}
+
+static struct htags *new_htags(void)
+{
+ struct htags *r = (struct htags *) xmalloc(sizeof(struct htags));
+
+ r->comptag = r->relation= -1;
+
+ r->comparator = NULL;
+
+ return r;
+}
+
+static struct htags *canon_htags(struct htags *h)
+{
+ if (h->comparator == NULL) {
+ h->comparator = xstrdup("i;ascii-casemap");
+ }
+ if (h->comptag == -1) { h->comptag = IS; }
+ return h;
+}
+
+static void free_htags(struct htags *h)
+{
+ free(h->comparator);
+ free(h);
+}
+
+static struct btags *new_btags(void)
+{
+ struct btags *r = (struct btags *) xmalloc(sizeof(struct btags));
+
+ r->transform = r->offset = r->comptag = r->relation = -1;
+ r->content_types = NULL;
+ r->comparator = NULL;
+
+ return r;
+}
+
+static struct btags *canon_btags(struct btags *b)
+{
+ if (b->transform == -1) { b->transform = TEXT; }
+ if (b->content_types == NULL) {
+ if (b->transform == RAW) {
+ b->content_types = new_sl(xstrdup(""), NULL);
+ } else {
+ b->content_types = new_sl(xstrdup("text"), NULL);
+ }
+ }
+ if (b->offset == -1) { b->offset = 0; }
+ if (b->comparator == NULL) { b->comparator = xstrdup("i;ascii-casemap"); }
+ if (b->comptag == -1) { b->comptag = IS; }
+ return b;
+}
+
+static void free_btags(struct btags *b)
+{
+ if (b->content_types) { free_sl(b->content_types); }
+ free(b->comparator);
+ free(b);
+}
+
+static struct vtags *new_vtags(void)
+{
+ struct vtags *r = (struct vtags *) xmalloc(sizeof(struct vtags));
+
+ r->days = -1;
+ r->addresses = NULL;
+ r->subject = NULL;
+ r->from = NULL;
+ r->handle = NULL;
+ r->mime = -1;
+
+ return r;
+}
+
+static struct vtags *canon_vtags(struct vtags *v)
+{
+ assert(parse_script->interp.vacation != NULL);
+
+ if (v->days == -1) { v->days = 7; }
+ if (v->days < parse_script->interp.vacation->min_response)
+ { v->days = parse_script->interp.vacation->min_response; }
+ if (v->days > parse_script->interp.vacation->max_response)
+ { v->days = parse_script->interp.vacation->max_response; }
+ if (v->mime == -1) { v->mime = 0; }
+
+ return v;
+}
+
+static void free_vtags(struct vtags *v)
+{
+ if (v->addresses) { free_sl(v->addresses); }
+ if (v->subject) { free(v->subject); }
+ if (v->from) { free(v->from); }
+ if (v->handle) { free(v->handle); }
+ free(v);
+}
+
+static struct ntags *new_ntags(void)
+{
+ struct ntags *r = (struct ntags *) xmalloc(sizeof(struct ntags));
+
+ r->method = NULL;
+ r->id = NULL;
+ r->options = NULL;
+ r->priority = -1;
+ r->message = NULL;
+
+ return r;
+}
+
+static struct ntags *canon_ntags(struct ntags *n)
+{
+ if (n->priority == -1) { n->priority = NORMAL; }
+ if (n->message == NULL) { n->message = xstrdup("$from$: $subject$"); }
+ if (n->method == NULL) { n->method = xstrdup("default"); }
+ return n;
+}
+static struct dtags *canon_dtags(struct dtags *d)
+{
+ if (d->priority == -1) { d->priority = ANY; }
+ if (d->comptag == -1) { d->comptag = ANY; }
+ return d;
+}
+
+static void free_ntags(struct ntags *n)
+{
+ if (n->method) { free(n->method); }
+ if (n->id) { free(n->id); }
+ if (n->options) { free_sl(n->options); }
+ if (n->message) { free(n->message); }
+ free(n);
+}
+
+static struct dtags *new_dtags(void)
+{
+ struct dtags *r = (struct dtags *) xmalloc(sizeof(struct dtags));
+
+ r->comptag = r->priority= r->relation = -1;
+ r->pattern = NULL;
+
+ return r;
+}
+
+static void free_dtags(struct dtags *d)
+{
+ if (d->pattern) free(d->pattern);
+ free(d);
+}
+
+static int verify_stringlist(stringlist_t *sl, int (*verify)(char *))
+{
+ for (; sl != NULL && verify(sl->s); sl = sl->next) ;
+ return (sl == NULL);
+}
+
+char *addrptr; /* pointer to address string for address lexer */
+char addrerr[500]; /* buffer for address parser error messages */
+
+static int verify_address(char *s)
+{
+ char errbuf[500];
+
+ addrptr = s;
+ addrerr[0] = '\0'; /* paranoia */
+ if (addrparse()) {
+ snprintf(errbuf, sizeof(errbuf), "address '%s': %s", s, addrerr);
+ yyerror(errbuf);
+ return 0;
+ }
+ return 1;
+}
+
+static int verify_mailbox(char *s)
+{
+ if (!verify_utf8(s)) return 0;
+
+ /* xxx if not a mailbox, call yyerror */
+ return 1;
+}
+
+static int verify_header(char *hdr)
+{
+ char *h = hdr;
+ char errbuf[100];
+
+ while (*h) {
+ /* field-name = 1*ftext
+ ftext = %d33-57 / %d59-126
+ ; Any character except
+ ; controls, SP, and
+ ; ":". */
+ if (!((*h >= 33 && *h <= 57) || (*h >= 59 && *h <= 126))) {
+ snprintf(errbuf, sizeof(errbuf),
+ "header '%s': not a valid header", hdr);
+ yyerror(errbuf);
+ return 0;
+ }
+ h++;
+ }
+ return 1;
+}
+
+static int verify_addrheader(char *hdr)
+{
+ const char **h, *hdrs[] = {
+ "from", "sender", "reply-to", /* RFC2822 originator fields */
+ "to", "cc", "bcc", /* RFC2822 destination fields */
+ "resent-from", "resent-sender", /* RFC2822 resent fields */
+ "resent-to", "resent-cc", "resent-bcc",
+ "return-path", /* RFC2822 trace fields */
+ "disposition-notification-to", /* RFC2298 MDN request fields */
+ "delivered-to", /* non-standard (loop detection) */
+ "approved", /* RFC1036 moderator/control fields */
+ NULL
+ };
+ char errbuf[100];
+
+ if (!config_getswitch(IMAPOPT_RFC3028_STRICT))
+ return verify_header(hdr);
+
+ for (lcase(hdr), h = hdrs; *h; h++) {
+ if (!strcmp(*h, hdr)) return 1;
+ }
+
+ snprintf(errbuf, sizeof(errbuf),
+ "header '%s': not a valid header for an address test", hdr);
+ yyerror(errbuf);
+ return 0;
+}
+
+static int verify_envelope(char *env)
+{
+ char errbuf[100];
+
+ lcase(env);
+ if (!config_getswitch(IMAPOPT_RFC3028_STRICT) ||
+ !strcmp(env, "from") || !strcmp(env, "to") || !strcmp(env, "auth")) {
+ return 1;
+ }
+
+ snprintf(errbuf, sizeof(errbuf),
+ "env-part '%s': not a valid part for an envelope test", env);
+ yyerror(errbuf);
+ return 0;
+}
+
+static int verify_relat(char *r)
+{/* this really should have been a token to begin with.*/
+ char errbuf[100];
+ lcase(r);
+ if (!strcmp(r, "gt")) {return GT;}
+ else if (!strcmp(r, "ge")) {return GE;}
+ else if (!strcmp(r, "lt")) {return LT;}
+ else if (!strcmp(r, "le")) {return LE;}
+ else if (!strcmp(r, "ne")) {return NE;}
+ else if (!strcmp(r, "eq")) {return EQ;}
+ else{
+ sprintf(errbuf, "flag '%s': not a valid relational operation", r);
+ yyerror(errbuf);
+ return -1;
+ }
+
+}
+
+
+
+
+static int verify_flag(char *f)
+{
+ char errbuf[100];
+
+ if (f[0] == '\\') {
+ lcase(f);
+ if (strcmp(f, "\\seen") && strcmp(f, "\\answered") &&
+ strcmp(f, "\\flagged") && strcmp(f, "\\draft") &&
+ strcmp(f, "\\deleted")) {
+ snprintf(errbuf, sizeof(errbuf),
+ "flag '%s': not a system flag", f);
+ yyerror(errbuf);
+ return 0;
+ }
+ return 1;
+ }
+ if (!imparse_isatom(f)) {
+ snprintf(errbuf, sizeof(errbuf), "flag '%s': not a valid keyword", f);
+ yyerror(errbuf);
+ return 0;
+ }
+ return 1;
+}
+
+#ifdef ENABLE_REGEX
+static int verify_regex(char *s, int cflags)
+{
+ int ret;
+ char errbuf[100];
+ regex_t *reg = (regex_t *) xmalloc(sizeof(regex_t));
+
+ if ((ret = regcomp(reg, s, cflags)) != 0) {
+ (void) regerror(ret, reg, errbuf, sizeof(errbuf));
+ yyerror(errbuf);
+ free(reg);
+ return 0;
+ }
+ free(reg);
+ return 1;
+}
+
+static int verify_regexs(stringlist_t *sl, char *comp)
+{
+ stringlist_t *sl2;
+ int cflags = REG_EXTENDED | REG_NOSUB;
+
+
+ if (!strcmp(comp, "i;ascii-casemap")) {
+ cflags |= REG_ICASE;
+ }
+
+ for (sl2 = sl; sl2 != NULL; sl2 = sl2->next) {
+ if ((verify_regex(sl2->s, cflags)) == 0) {
+ break;
+ }
+ }
+ if (sl2 == NULL) {
+ return 1;
+ }
+ return 0;
+}
+#endif
+
+/*
+ * Valid UTF-8 check (from RFC 2640 Annex B.1)
+ *
+ * The following routine checks if a byte sequence is valid UTF-8. This
+ * is done by checking for the proper tagging of the first and following
+ * bytes to make sure they conform to the UTF-8 format. It then checks
+ * to assure that the data part of the UTF-8 sequence conforms to the
+ * proper range allowed by the encoding. Note: This routine will not
+ * detect characters that have not been assigned and therefore do not
+ * exist.
+ */
+static int verify_utf8(char *s)
+{
+ const unsigned char *buf = s;
+ const unsigned char *endbuf = s + strlen(s);
+ unsigned char byte2mask = 0x00, c;
+ int trailing = 0; /* trailing (continuation) bytes to follow */
+
+ while (buf != endbuf) {
+ c = *buf++;
+ if (trailing) {
+ if ((c & 0xC0) == 0x80) { /* Does trailing byte
+ follow UTF-8 format? */
+ if (byte2mask) { /* Need to check 2nd byte
+ for proper range? */
+ if (c & byte2mask) /* Are appropriate bits set? */
+ byte2mask = 0x00;
+ else
+ break;
+ }
+ trailing--;
+ }
+ else
+ break;
+ }
+ else {
+ if ((c & 0x80) == 0x00) /* valid 1 byte UTF-8 */
+ continue;
+ else if ((c & 0xE0) == 0xC0) /* valid 2 byte UTF-8 */
+ if (c & 0x1E) { /* Is UTF-8 byte
+ in proper range? */
+ trailing = 1;
+ }
+ else
+ break;
+ else if ((c & 0xF0) == 0xE0) { /* valid 3 byte UTF-8 */
+ if (!(c & 0x0F)) { /* Is UTF-8 byte
+ in proper range? */
+ byte2mask = 0x20; /* If not, set mask
+ to check next byte */
+ }
+ trailing = 2;
+ }
+ else if ((c & 0xF8) == 0xF0) { /* valid 4 byte UTF-8 */
+ if (!(c & 0x07)) { /* Is UTF-8 byte
+ in proper range? */
+ byte2mask = 0x30; /* If not, set mask
+ to check next byte */
+ }
+ trailing = 3;
+ }
+ else if ((c & 0xFC) == 0xF8) { /* valid 5 byte UTF-8 */
+ if (!(c & 0x03)) { /* Is UTF-8 byte
+ in proper range? */
+ byte2mask = 0x38; /* If not, set mask
+ to check next byte */
+ }
+ trailing = 4;
+ }
+ else if ((c & 0xFE) == 0xFC) { /* valid 6 byte UTF-8 */
+ if (!(c & 0x01)) { /* Is UTF-8 byte
+ in proper range? */
+ byte2mask = 0x3C; /* If not, set mask
+ to check next byte */
+ }
+ trailing = 5;
+ }
+ else
+ break;
+ }
+ }
+
+ if ((buf != endbuf) || trailing) {
+ char errbuf[100];
+
+ snprintf(errbuf, sizeof(errbuf),
+ "string '%s': not valid utf8", s);
+ yyerror(errbuf);
+ return 0;
+ }
+
+ return 1;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,59 @@
+/*
+ * sieve_err.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+static const char * const text[] = {
+ "Generic Sieve error",
+ "Sieve interpretor not finalized",
+ "Parse error in Sieve script",
+ "Run-time error during Sieve execution",
+ "Internal error in Sieve subsystem",
+ "Memory exhausted in Sieve subsystem",
+ "Sieve action already taken",
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_siev_error_table = { text, -1237848064L, 7 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_siev_error_table_r(struct et_list **list);
+void initialize_siev_error_table(void);
+
+void initialize_siev_error_table(void) {
+ initialize_siev_error_table_r(&_et_list);
+}
+
+/* For Heimdal compatibility */
+void initialize_siev_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0) {
+ if (!link.table)
+ et = &link;
+ else
+ return;
+ }
+ et->table = &et_siev_error_table;
+ et->next = 0;
+ *end = et;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.et
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.et?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.et (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.et Sat Aug 26 02:00:13 2006
@@ -1,0 +1,31 @@
+# sieve_err.et -- Error codes for the Sieve subsystem
+# $Id: sieve_err.et,v 1.2 2002/05/25 19:57:52 leg Exp $
+#
+# Copyright 2000 Carnegie Mellon University
+#
+error_table siev
+
+ec SIEVE_FAIL,
+ "Generic Sieve error"
+
+ec SIEVE_NOT_FINALIZED,
+ "Sieve interpretor not finalized"
+
+ec SIEVE_PARSE_ERROR,
+ "Parse error in Sieve script"
+
+ec SIEVE_RUN_ERROR,
+ "Run-time error during Sieve execution"
+
+ec SIEVE_INTERNAL_ERROR,
+ "Internal error in Sieve subsystem"
+
+ec SIEVE_NOMEM,
+ "Memory exhausted in Sieve subsystem"
+
+ec SIEVE_DONE,
+ "Sieve action already taken"
+
+end
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_err.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,25 @@
+/*
+ * sieve_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define SIEVE_FAIL (-1237848064L)
+#define SIEVE_NOT_FINALIZED (-1237848063L)
+#define SIEVE_PARSE_ERROR (-1237848062L)
+#define SIEVE_RUN_ERROR (-1237848061L)
+#define SIEVE_INTERNAL_ERROR (-1237848060L)
+#define SIEVE_NOMEM (-1237848059L)
+#define SIEVE_DONE (-1237848058L)
+extern const struct error_table et_siev_error_table;
+extern void initialize_siev_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_siev_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_siev (-1237848064L)
+
+/* for compatibility with older versions... */
+#define init_siev_err_tbl initialize_siev_error_table
+#define siev_err_base ERROR_TABLE_BASE_siev
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_interface.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_interface.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_interface.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieve_interface.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,188 @@
+/* sieve_interface.h -- interface for deliver
+ * $Id: sieve_interface.h,v 1.19.2.5 2005/10/05 15:56:25 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifndef SIEVE_H
+#define SIEVE_H
+
+#include <stdio.h>
+
+#define SIEVE_VERSION "CMU Sieve 2.3"
+
+/* error codes */
+#define SIEVE_OK (0)
+
+#include "sieve_err.h"
+
+/* external sieve types */
+typedef struct sieve_interp sieve_interp_t;
+typedef struct sieve_script sieve_script_t;
+typedef struct sieve_execute sieve_execute_t;
+typedef struct bytecode_info bytecode_info_t;
+
+typedef int sieve_callback(void *action_context, void *interp_context,
+ void *script_context,
+ void *message_context, const char **errmsg);
+typedef int sieve_get_size(void *message_context, int *size);
+typedef int sieve_get_header(void *message_context,
+ const char *header,
+ const char ***contents);
+typedef int sieve_get_envelope(void *message_context,
+ const char *field,
+ const char ***contents);
+typedef int sieve_get_include(void *script_context, const char *script,
+ int isglobal, char *fpath, size_t size);
+
+/* MUST keep this struct sync'd with bodypart in imap/message.h */
+typedef struct sieve_bodypart {
+ char section[128];
+ const char *content;
+ const char *encoding;
+ unsigned long size;
+} sieve_bodypart_t;
+
+typedef int sieve_get_body(void *message_context, const char **content_types,
+ sieve_bodypart_t ***parts);
+
+typedef struct sieve_vacation {
+ int min_response; /* 0 -> defaults to 3 */
+ int max_response; /* 0 -> defaults to 90 */
+
+ /* given a hash, say whether we've already responded to it in the last
+ days days. return SIEVE_OK if we SHOULD autorespond (have not already)
+ or SIEVE_DONE if we SHOULD NOT. */
+ sieve_callback *autorespond;
+
+ /* mail the response */
+ sieve_callback *send_response;
+} sieve_vacation_t;
+
+typedef struct sieve_imapflags {
+ char **flag; /* NULL -> defaults to \flagged */
+ int nflags;
+} sieve_imapflags_t;
+
+typedef struct sieve_redirect_context {
+ const char *addr;
+} sieve_redirect_context_t;
+
+typedef struct sieve_reject_context {
+ const char *msg;
+} sieve_reject_context_t;
+
+typedef struct sieve_fileinto_context {
+ const char *mailbox;
+ sieve_imapflags_t *imapflags;
+} sieve_fileinto_context_t;
+
+typedef struct sieve_keep_context {
+ sieve_imapflags_t *imapflags;
+} sieve_keep_context_t;
+
+typedef struct sieve_notify_context {
+ const char *method;
+ const char **options;
+ const char *priority;
+ const char *message;
+} sieve_notify_context_t;
+
+#define SIEVE_HASHLEN 16
+
+typedef struct sieve_autorespond_context {
+ unsigned char hash[SIEVE_HASHLEN];
+ int days;
+} sieve_autorespond_context_t;
+
+typedef struct sieve_send_response_context {
+ char *addr;
+ char *fromaddr;
+ const char *msg;
+ char *subj;
+ int mime;
+} sieve_send_response_context_t;
+
+/* build a sieve interpretor */
+int sieve_interp_alloc(sieve_interp_t **interp, void *interp_context);
+int sieve_interp_free(sieve_interp_t **interp);
+
+/* add the callbacks for actions. undefined behavior results if these
+ are called after sieve_script_parse is called! */
+int sieve_register_redirect(sieve_interp_t *interp, sieve_callback *f);
+int sieve_register_discard(sieve_interp_t *interp, sieve_callback *f);
+int sieve_register_reject(sieve_interp_t *interp, sieve_callback *f);
+int sieve_register_fileinto(sieve_interp_t *interp, sieve_callback *f);
+int sieve_register_keep(sieve_interp_t *interp, sieve_callback *f);
+int sieve_register_vacation(sieve_interp_t *interp, sieve_vacation_t *v);
+int sieve_register_imapflags(sieve_interp_t *interp, sieve_imapflags_t *mark);
+int sieve_register_notify(sieve_interp_t *interp, sieve_callback *f);
+int sieve_register_include(sieve_interp_t *interp, sieve_get_include *f);
+
+/* add the callbacks for messages. again, undefined if used after
+ sieve_script_parse */
+int sieve_register_size(sieve_interp_t *interp, sieve_get_size *f);
+int sieve_register_header(sieve_interp_t *interp, sieve_get_header *f);
+int sieve_register_envelope(sieve_interp_t *interp, sieve_get_envelope *f);
+int sieve_register_body(sieve_interp_t *interp, sieve_get_body *f);
+
+typedef int sieve_parse_error(int lineno, const char *msg,
+ void *interp_context,
+ void *script_context);
+int sieve_register_parse_error(sieve_interp_t *interp, sieve_parse_error *f);
+
+typedef int sieve_execute_error(const char *msg, void *interp_context,
+ void *script_context, void *message_context);
+int sieve_register_execute_error(sieve_interp_t *interp,
+ sieve_execute_error *f);
+
+/* given an interpretor and a script, produce an executable script */
+int sieve_script_parse(sieve_interp_t *interp, FILE *script,
+ void *script_context, sieve_script_t **ret);
+
+/* given a path to a bytecode file, load it into the sieve_execute_t */
+int sieve_script_load(const char *fpath, sieve_execute_t **ret);
+
+/* Unload a sieve_bytecode_t */
+int sieve_script_unload(sieve_execute_t **s);
+
+/* Free a sieve_script_t */
+int sieve_script_free(sieve_script_t **s);
+
+/* execute bytecode on a message */
+int sieve_execute_bytecode(sieve_execute_t *script, sieve_interp_t *interp,
+ void *script_context, void *message_context);
+
+/* Get space separated list of extensions supported by the implementation */
+const char *sieve_listextensions(sieve_interp_t *i);
+
+/* Create a bytecode structure given a parsed commandlist */
+int sieve_generate_bytecode(bytecode_info_t **retval, sieve_script_t *s);
+
+/* Emit bytecode to a file descriptor */
+int sieve_emit_bytecode(int fd, bytecode_info_t *bc);
+
+/* Free a bytecode_info_t */
+void sieve_free_bytecode(bytecode_info_t **p);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sievec.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sievec.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sievec.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sievec.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,303 @@
+/* sievec.c -- compile a sieve script to bytecode manually
+ * Rob Siemborski
+ * $Id: sievec.c,v 1.2.2.6 2004/07/16 14:37:45 ken3 Exp $
+ */
+/*
+ * Copyright (c) 1999-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "sieve_interface.h"
+#include <syslog.h>
+
+#include "libconfig.h"
+#include "xmalloc.h"
+
+#include "script.h"
+#include <string.h>
+#include <stdlib.h>
+#include <sys/file.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/* config.c stuff */
+const int config_need_data = 0;
+
+int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret);
+
+#define TIMSIEVE_FAIL -1
+#define TIMSIEVE_OK 0
+
+int main(int argc, char **argv)
+{
+ FILE *instream;
+ char *err = NULL;
+ sieve_script_t *s;
+ bytecode_info_t *bc;
+ int c, fd, usage_error = 0;
+ char *alt_config = NULL;
+
+ while ((c = getopt(argc, argv, "C:")) != EOF)
+ switch (c) {
+ case 'C': /* alt config file */
+ alt_config = optarg;
+ break;
+ default:
+ usage_error = 1;
+ break;
+ }
+
+ if (usage_error || (argc - optind) < 2) {
+ printf("Syntax: %s [-C <altconfig>] <filename> <outputfile>\n",
+ argv[0]);
+ exit(1);
+ }
+
+ instream = fopen(argv[optind++],"r");
+ if(instream == NULL) {
+ printf("Unable to open %s for reading\n", argv[1]);
+ exit(1);
+ }
+
+ /* Load configuration file. */
+ config_read(alt_config);
+
+ if(is_script_parsable(instream, &err, &s) == TIMSIEVE_FAIL) {
+ if(err) {
+ printf("Unable to parse script: %s\n", err);
+ } else {
+ printf("Unable to parse script.\n");
+ }
+
+ exit(1);
+ }
+
+ /* Now, generate the bytecode */
+ if(sieve_generate_bytecode(&bc, s) == -1) {
+ printf("bytecode generate failed\n");
+ exit(1);
+ }
+
+ /* Now, open the new file */
+ fd = open(argv[optind], O_CREAT | O_TRUNC | O_WRONLY, 0644);
+ if(fd < 0) {
+ printf("couldn't open bytecode output file\n");
+ exit(1);
+ }
+
+ /* Now, emit the bytecode */
+ if(sieve_emit_bytecode(fd, bc) == -1) {
+ printf("bytecode emit failed\n");
+ exit(1);
+ }
+
+ close(fd);
+
+ sieve_free_bytecode(&bc);
+ sieve_script_free(&s);
+
+ return 0;
+}
+
+/* to make larry's stupid functions happy :) */
+void foo(void)
+{
+ fatal("stub function called", 0);
+}
+sieve_vacation_t vacation = {
+ 0, /* min response */
+ 0, /* max response */
+ (sieve_callback *) &foo, /* autorespond() */
+ (sieve_callback *) &foo /* send_response() */
+};
+
+static int sieve_notify(void *ac __attribute__((unused)),
+ void *interp_context __attribute__((unused)),
+ void *script_context __attribute__((unused)),
+ void *message_context __attribute__((unused)),
+ const char **errmsg __attribute__((unused)))
+{
+ fatal("stub function called", 0);
+ return SIEVE_FAIL;
+}
+
+int mysieve_error(int lineno, const char *msg,
+ void *i __attribute__((unused)), void *s)
+{
+ char buf[1024];
+ char **errstr = (char **) s;
+
+ snprintf(buf, 80, "line %d: %s\r\n", lineno, msg);
+ *errstr = xrealloc(*errstr, strlen(*errstr) + strlen(buf) + 30);
+ syslog(LOG_DEBUG, "%s", buf);
+ strcat(*errstr, buf);
+
+ return SIEVE_OK;
+}
+
+void fatal(const char *s, int code)
+{
+ printf("Fatal error: %s (%d)\r\n", s, code);
+
+ exit(1);
+}
+/* end the boilerplate */
+
+/* returns TRUE or FALSE */
+int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret)
+{
+ sieve_interp_t *i;
+ sieve_script_t *s;
+ int res;
+
+ res = sieve_interp_alloc(&i, NULL);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_interp_alloc() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_redirect(i, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_redirect() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+ res = sieve_register_discard(i, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_discard() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+ res = sieve_register_reject(i, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_reject() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+ res = sieve_register_fileinto(i, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_fileinto() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+ res = sieve_register_keep(i, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_keep() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_imapflags(i, NULL);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_imapflags() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_size(i, (sieve_get_size *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_size() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_header(i, (sieve_get_header *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_header() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_envelope(i, (sieve_get_envelope *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_envelope() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_body(i, (sieve_get_body *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_body() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_include(i, (sieve_get_include *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_include() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_vacation(i, &vacation);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_vacation() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_notify(i, &sieve_notify);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_notify() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_parse_error(i, &mysieve_error);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_parse_error() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ rewind(stream);
+
+ *errstr = (char *) xmalloc(20 * sizeof(char));
+ strcpy(*errstr, "script errors:\r\n");
+
+ res = sieve_script_parse(i, stream, errstr, &s);
+
+ if (res == SIEVE_OK) {
+ if(ret) {
+ *ret = s;
+ } else {
+ sieve_script_free(&s);
+ }
+ free(*errstr);
+ *errstr = NULL;
+ }
+
+ /* free interpreter */
+ sieve_interp_free(&i);
+
+ return (res == SIEVE_OK) ? TIMSIEVE_OK : TIMSIEVE_FAIL;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieved.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieved.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieved.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/sieved.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,495 @@
+/* dump.c -- bytecode decompiler
+ * Jen Smith
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*****************************************************************/
+
+
+
+#include "sieve_interface.h"
+
+#include "bytecode.h"
+#include "script.h"
+
+#include "xmalloc.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <netinet/in.h>
+
+#include <string.h>
+
+#include "map.h"
+
+/* config.c stuff */
+const int config_need_data = 0;
+
+void dump2(bytecode_input_t *d, int len);
+int dump2_test(bytecode_input_t * d, int i);
+
+/* from bc_eval.c */
+int unwrap_string(bytecode_input_t *bc, int pos, const char **str, int *len);
+
+/*this is called by xmalloc*/
+void fatal(const char *s, int code)
+{
+ printf("Fatal error: %s (%d)\r\n", s, code);
+
+ exit(1);
+}
+
+int load(int fd, bytecode_input_t ** d)
+{
+ const char * data=NULL;
+ struct stat sbuf;
+ unsigned long len=0;
+
+ if (fstat(fd, &sbuf) == -1) {
+ printf("IOERROR: fstating sieve script: %m");
+ return SIEVE_FAIL;
+ }
+
+ /*this reads in data and length from file*/
+ map_refresh(fd, 1, &(data), &len, sbuf.st_size,
+ "sievescript", "");
+ *d=(bytecode_input_t *)data;
+
+ printf("\n");
+
+ return (len/sizeof(int));
+}
+
+
+int main(int argc, char * argv[])
+{
+ bytecode_input_t * bc;
+ int script_fd;
+
+ unsigned long len;
+
+ if (argc!=2) {
+ fprintf(stderr, "usage:\n %s script\n", argv[0]);
+ exit(1);
+ }
+
+ /*get script*/
+ script_fd = open(argv[1], O_RDONLY);
+ if (script_fd == -1)
+ {
+ printf("can not open script '%s'\n", argv[1]);
+ exit(1);
+ }
+
+ len=load(script_fd,&bc);
+ close(script_fd);
+
+ if (bc) {
+ dump2(bc, len );
+ exit(0);
+ } else {
+ exit(1);
+ }
+}
+
+int write_list(int list_len, int i, bytecode_input_t * d)
+{
+ int x;
+ i++;
+ for (x=0; x<list_len; x++)
+ {
+ const char *data;
+ int len;
+
+ i = unwrap_string(d, i, &data, &len);
+
+ printf("{%d}%s\n", len, data);
+ }
+ return i;
+}
+
+int printComparison(bytecode_input_t *d ,int i)
+{
+ printf("Comparison: ");
+ switch(ntohl(d[i].value))
+ {
+ case B_IS: printf("Is"); break;
+ case B_CONTAINS:printf("Contains"); break;
+ case B_MATCHES: printf("Matches"); break;
+ case B_REGEX: printf("Regex"); break;
+ case B_COUNT:
+ printf("Count");
+
+ switch(ntohl(d[i+1].value))
+ {
+ case B_GT: printf(" greater than "); break;
+ case B_GE: printf(" greater than or equal "); break;
+ case B_LT: printf(" less than "); break;
+ case B_LE: printf(" less than or equal "); break;
+ case B_NE: printf(" not equal "); break;
+ case B_EQ: printf(" equal "); break;
+ }
+
+ break;
+ case B_VALUE:
+ printf("Value");
+
+ switch(ntohl(d[i+1].value))
+ {
+ case B_GT: printf(" greater than "); break;
+ case B_GE: printf(" greater than or equal ");break;
+ case B_LT: printf(" less than "); break;
+ case B_LE: printf(" less than or equal ");break;
+ case B_NE: printf(" not equal "); break;
+ case B_EQ: printf(" equal ");break;
+ }
+
+ break;
+ default:
+ exit(1);
+ }
+
+ switch (ntohl(d[i+2].value))
+ {
+ case B_ASCIICASEMAP: printf(" (ascii-casemap) "); break;
+ case B_OCTET: printf(" (octet) "); break;
+ case B_ASCIINUMERIC: printf(" (ascii-numeric) "); break;
+ default: exit(1);
+ }
+
+ printf("\n");
+ return i+3;
+}
+
+
+int dump2_test(bytecode_input_t * d, int i)
+{
+ int l,x;
+ switch(ntohl(d[i].value)) {
+ case BC_FALSE:
+ printf("false");
+ i++;
+ break;
+ case BC_TRUE:
+ printf("true");
+ i++;
+ break;
+ case BC_NOT:/*2*/
+ /* XXX
+ there is a value being skipped in the second pass...
+ no idea what it does, but it isn't carried to here...
+ see bytecodee.c */
+ printf(" not(");
+ i=dump2_test(d, i+1);
+ printf(")\n");
+ break;
+ case BC_EXISTS:
+ printf("exists");
+ i=write_list(ntohl(d[i+1].len), i+2, d);
+ break;
+ case BC_SIZE:
+ printf("size");
+ if (ntohl(d[i+1].value)==B_OVER) {
+ /* over */
+ printf("over %d", ntohl(d[i+2].value));
+ } else {
+ /* under */
+ printf("under %d", ntohl(d[i+2].value));
+ }
+ i+=3;
+ break;
+ case BC_ANYOF:/*5*/
+ printf("any of \n(");
+ l=ntohl(d[i+1].len);
+ i+=3;
+
+ for (x=0; x<l; x++)
+ {
+ i=dump2_test(d,i);
+ if((x+1)<l)
+ printf(" OR ");
+ }
+
+ printf(")\n");
+ break;
+ case BC_ALLOF:/*6*/
+ printf("all of \n(");
+ l=ntohl(d[i+1].len);
+ i+=3;
+
+ for (x=0; x<l; x++)
+ {
+ i=dump2_test(d,i);
+ if((x+1)<l)
+ printf(" AND ");
+ }
+
+ printf(")\n");
+ break;
+ case BC_ADDRESS:/*7*/
+ printf("Address [");
+ i=printComparison(d, i+1);
+ printf(" type: ");
+ switch(ntohl(d[i++].value))
+ {
+ case B_ALL: printf("all"); break;
+ case B_LOCALPART:printf("localpart"); break;
+ case B_DOMAIN:printf("domain"); break;
+ case B_USER:printf("user"); break;
+ case B_DETAIL:printf("detail"); break;
+ }
+ printf(" Headers:");
+ i=write_list(ntohl(d[i].len), i+1, d);
+ printf(" Data:");
+ i=write_list(ntohl(d[i].len), i+1, d);
+ printf(" ]\n");
+ break;
+ case BC_ENVELOPE:/*8*/
+ printf("Envelope [");
+ i=printComparison(d, i+1);
+ printf(" type: ");
+ switch(ntohl(d[i++].value))
+ {
+ case B_ALL: printf("all"); break;
+ case B_LOCALPART:printf("localpart"); break;
+ case B_DOMAIN:printf("domain"); break;
+ case B_USER:printf("user"); break;
+ case B_DETAIL:printf("detail"); break;
+ }
+ printf(" Headers:");
+ i=write_list(ntohl(d[i].len), i+1, d);
+ printf(" Data:");
+ i=write_list(ntohl(d[i].len), i+1, d);
+ printf(" ]\n");
+ break;
+ case BC_HEADER:/*9*/
+ printf("Header [");
+ i= printComparison(d, i+1);
+ printf(" Headers: ");
+ i=write_list(ntohl(d[i].len), i+1, d);
+ printf(" Data: ");
+ i=write_list(ntohl(d[i].len), i+1, d);
+ printf(" ]\n");
+ break;
+ case BC_BODY:/*10*/
+ printf("Body [");
+ i=printComparison(d, i+1);
+ printf(" Transform: ");
+ switch(ntohl(d[i++].value))
+ {
+ case B_RAW: printf("raw"); break;
+ case B_TEXT:printf("text"); break;
+ case B_CONTENT:printf("content"); break;
+ }
+ printf("\tOffset: %d\n", ntohl(d[i++].value));
+ printf(" Content-Types:");
+ i=write_list(ntohl(d[i].len), i+1, d);
+ printf(" Data:");
+ i=write_list(ntohl(d[i].len), i+1, d);
+ printf(" ]\n");
+ break;
+ default:
+ printf("WERT %d ", ntohl(d[i].value));
+ }
+ return i;
+}
+
+void dump2(bytecode_input_t *d, int bc_len)
+{
+ int i;
+ int version;
+ const char *data;
+ int len;
+
+ if(memcmp(d, BYTECODE_MAGIC, BYTECODE_MAGIC_LEN)) {
+ printf("not a bytecode file [magic number test failed]\n");
+ return;
+ }
+
+ i = BYTECODE_MAGIC_LEN / sizeof(bytecode_input_t);
+
+ version = ntohl(d[i].op);
+ printf("Sievecode version %d\n", version);
+ if(!d) return;
+
+ for(i++; i<bc_len;)
+ {
+ int copy = 0;
+
+ printf("%d: ",i);
+
+ switch(ntohl(d[i++].op)) {
+
+ case B_STOP:/*0*/
+ printf("STOP\n");
+ break;
+
+ case B_KEEP:/*1*/
+ printf("KEEP\n");
+ break;
+
+ case B_DISCARD:/*2*/
+ printf("DISCARD\n");
+ break;
+
+ case B_REJECT:/*3*/
+ i = unwrap_string(d, i, &data, &len);
+ printf("REJECT {%d}%s\n", len, data);
+ break;
+
+ case B_FILEINTO: /*19*/
+ copy = ntohl(d[i++].value);
+ case B_FILEINTO_ORIG: /*4*/
+ i = unwrap_string(d, i, &data, &len);
+ printf("FILEINTO COPY(%d) FOLDER({%d}%s)\n",copy,len,data);
+ break;
+
+ case B_REDIRECT: /*20*/
+ copy = ntohl(d[i++].value);
+ case B_REDIRECT_ORIG: /*5*/
+ i = unwrap_string(d, i, &data, &len);
+ printf("REDIRECT COPY(%d) ADDRESS({%d}%s)\n",copy,len,data);
+ break;
+
+ case B_IF:/*6*/
+ printf("IF (ends at %d)", ntohl(d[i].value));
+
+ /* there is no short circuiting involved here*/
+ i = dump2_test(d,i+1);
+ printf("\n");
+
+ break;
+
+ case B_MARK:/*7*/
+ printf("MARK\n");
+ break;
+
+ case B_UNMARK:/*8*/
+ printf("UNMARK\n");
+ break;
+
+ case B_ADDFLAG: /*9*/
+ printf("ADDFLAG {%d}\n",ntohl(d[i].len));
+ i=write_list(ntohl(d[i].len),i+1,d);
+ break;
+
+ case B_SETFLAG: /*10*/
+ printf("SETFLAG {%d}\n",ntohl(d[i].len));
+ i=write_list(ntohl(d[i].len),i+1,d);
+ break;
+
+ case B_REMOVEFLAG: /*11*/
+ printf("REMOVEFLAG {%d}\n",ntohl(d[i].len));
+ i=write_list(ntohl(d[i].len),i+1,d);
+ break;
+
+ case B_DENOTIFY:/*12*/
+ printf("DENOTIFY\n");
+ printf(" PRIORITY(%d) Comparison type %d (relat %d)\n",
+ ntohl(d[i].value), ntohl(d[i+1].value), ntohl(d[i+2].value));
+ i+=3;
+
+ i = unwrap_string(d, i+1, &data, &len);
+
+ printf(" ({%d}%s)\n", len, (!data ? "[nil]" : data));
+ break;
+
+ case B_NOTIFY: /*13*/
+ i = unwrap_string(d, i, &data, &len);
+
+ printf("NOTIFY METHOD({%d}%s)\n",len,data);
+
+ i = unwrap_string(d, i, &data, &len);
+
+ printf(" ID({%d}%s) OPTIONS ", len,
+ (!data ? "[nil]" : data));
+
+ i=write_list(ntohl(d[i].len),i+1,d);
+
+ printf(" PRIORITY(%d)\n", ntohl(d[i].value));
+ i++;
+
+ i = unwrap_string(d, i, &data, &len);
+
+ printf(" MESSAGE({%d}%s)\n", len, data);
+
+ break;
+
+ case B_VACATION:/*14*/
+ printf("VACATION\n");
+ /*add address list here!*/
+ i=write_list(ntohl(d[i].len),i+1,d);
+
+ i = unwrap_string(d, i, &data, &len);
+
+ printf("%d SUBJ({%d}%s) \n",i, len, (!data ? "[nil]" : data));
+
+ i = unwrap_string(d, i, &data, &len);
+
+ printf("%d MESG({%d}%s) \n", i, len, (!data ? "[nil]" : data));
+
+ printf("DAYS(%d) MIME(%d)\n", ntohl(d[i].value), ntohl(d[i+1].value));
+ i+=2;
+
+ if (version >= 0x05) {
+ i = unwrap_string(d, i, &data, &len);
+
+ printf("%d FROM({%d}%s) \n",i, len, (!data ? "[nil]" : data));
+
+ i = unwrap_string(d, i, &data, &len);
+
+ printf("%d HANDLE({%d}%s) \n",i, len, (!data ? "[nil]" : data));
+ }
+
+ break;
+ case B_NULL:/*15*/
+ printf("NULL\n");
+ break;
+ case B_JUMP:/*16*/
+ printf("JUMP %d\n", ntohl(d[i].jump));
+ i+=1;
+ break;
+
+ case B_INCLUDE:/*17*/
+ printf("INCLUDE ");
+ switch (ntohl(d[i].value)) {
+ case B_PERSONAL: printf("Personal"); break;
+ case B_GLOBAL: printf("Global"); break;
+ }
+ i = unwrap_string(d, i+1, &data, &len);
+ printf(" {%d}%s\n", len, data);
+ break;
+
+ case B_RETURN:/*18*/
+ printf("RETURN\n");
+ break;
+
+ default:
+ printf("%d (NOT AN OP)\n",ntohl(d[i-1].op));
+ exit(1);
+ }
+ }
+ printf("full len is: %d\n", bc_len);
+}
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/test.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/test.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/test.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/test.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,913 @@
+/*NEW
+
+ * test.c -- tester for libsieve
+ * Larry Greenfield
+ * $Id: test.c,v 1.21.2.6 2005/10/05 15:56:25 ken3 Exp $
+ *
+ * usage: "test message script"
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "sieve_interface.h"
+#include "bytecode.h"
+#include "comparator.h"
+#include "tree.h"
+#include "sieve.h"
+#include "imap/message.h"
+
+/* XXX so we can link against imap/message.o */
+int mailbox_cached_header_inline(const char *text) { return BIT32_MAX; }
+
+#define HEADERCACHESIZE 1019
+
+typedef struct Header {
+ char *name;
+ int ncontents;
+ char *contents[1];
+} header_t;
+
+typedef struct message_data {
+ char *name;
+ FILE *data;
+ int size;
+ struct message_content content;
+
+ int cache_full;
+ header_t *cache[HEADERCACHESIZE];
+} message_data_t;
+
+int hashheader(char *header)
+{
+ int x = 0;
+ /* any CHAR except ' ', :, or a ctrl char */
+ for (; !iscntrl(*header) && (*header != ' ') && (*header != ':');
+ header++) {
+ x *= 256;
+ x += *header;
+ x %= HEADERCACHESIZE;
+ }
+ return x;
+}
+
+/* take a list of headers, pull the first one out and return it in
+ name and contents.
+
+ returns 0 on success, negative on failure */
+typedef enum {
+ HDR_NAME_START,
+ HDR_NAME,
+ COLON,
+ HDR_CONTENT_START,
+ HDR_CONTENT
+} state;
+
+int parseheader(FILE *f, char **headname, char **contents) {
+ char c;
+ char name[80], body[1024];
+ int off = 0;
+ state s = HDR_NAME_START;
+
+
+ /* there are two ways out of this loop, both via gotos:
+ either we successfully read a character (got_header)
+ or we hit an error (ph_error) */
+ while ((c = getc(f))) { /* examine each character */
+ switch (s) {
+ case HDR_NAME_START:
+ if (c == '\r' || c == '\n') {
+ /* no header here! */
+ goto ph_error;
+ }
+ if (!isalpha(c))
+ goto ph_error;
+ name[0] = tolower(c);
+ off = 1;
+ s = HDR_NAME;
+ break;
+
+ case HDR_NAME:
+ if (c == ' ' || c == '\t' || c == ':') {
+ name[off] = '\0';
+ s = (c == ':' ? HDR_CONTENT_START : COLON);
+ break;
+ }
+ if (iscntrl(c)) {
+ goto ph_error;
+ }
+ name[off++] = tolower(c);
+ break;
+
+ case COLON:
+ if (c == ':') {
+ s = HDR_CONTENT_START;
+ } else if (c != ' ' && c != '\t') {
+ goto ph_error;
+ }
+ break;
+
+ case HDR_CONTENT_START:
+ if (c == ' ' || c == '\t') /* eat the whitespace */
+ break;
+ off = 0;
+ s = HDR_CONTENT;
+ /* falls through! */
+ case HDR_CONTENT:
+ if (c == '\r' || c == '\n') {
+ int peek = getc(f);
+
+ /* we should peek ahead to see if it's folded whitespace */
+ if (c == '\r' && peek == '\n') {
+ c = getc(f);
+ } else {
+ c = peek; /* single newline seperator */
+ }
+ if (c != ' ' && c != '\t') {
+ /* this is the end of the header */
+ body[off] = '\0';
+ ungetc(c, f);
+ goto got_header;
+ }
+ /* ignore this whitespace, but we'll copy all the rest in */
+ break;
+ } else {
+ /* just an ordinary character */
+ body[off++] = c;
+ }
+ }
+ }
+
+ /* if we fall off the end of the loop, we hit some sort of error
+ condition */
+
+ ph_error:
+ if (headname != NULL) *headname = NULL;
+ if (contents != NULL) *contents = NULL;
+ return -1;
+
+ got_header:
+ if (headname != NULL) *headname = strdup(name);
+ if (contents != NULL) *contents = strdup(body);
+
+ return 0;
+}
+
+void fill_cache(message_data_t *m)
+{
+ rewind(m->data);
+
+ /* let's fill that header cache */
+ for (;;) {
+ char *name, *body;
+ int cl, clinit;
+
+ if (parseheader(m->data, &name, &body) < 0) {
+ break;
+ }
+ /* put it in the hash table */
+ clinit = cl = hashheader(name);
+ while (m->cache[cl] != NULL && strcmp(name, m->cache[cl]->name)) {
+ cl++; /* resolve collisions linearly */
+ cl %= HEADERCACHESIZE;
+ if (cl == clinit) break; /* gone all the way around, so bail */
+ }
+
+ /* found where to put it, so insert it into a list */
+ if (m->cache[cl]) {
+ /* add this body on */
+
+ m->cache[cl]->contents[m->cache[cl]->ncontents++] = body;
+
+ /* whoops, won't have room for the null at the end! */
+ if (!(m->cache[cl]->ncontents % 8)) {
+ /* increase the size */
+ m->cache[cl] = (header_t *)
+ realloc(m->cache[cl],sizeof(header_t) +
+ ((8 + m->cache[cl]->ncontents) * sizeof(char *)));
+ if (m->cache[cl] == NULL) {
+ fprintf(stderr, "realloc() returned NULL\n");
+ exit(1);
+ }
+ }
+
+ } else {
+ /* create a new entry in the hash table */
+ m->cache[cl] = (header_t *) malloc(sizeof(header_t) +
+ 8 * sizeof(char*));
+ if (m->cache[cl] == NULL) {
+ fprintf(stderr, "malloc() returned NULL\n");
+ exit(1);
+ }
+ m->cache[cl]->name = name;
+ m->cache[cl]->contents[0] = body;
+ m->cache[cl]->ncontents = 1;
+ }
+
+ /* we always want a NULL at the end */
+ m->cache[cl]->contents[m->cache[cl]->ncontents] = NULL;
+ }
+
+ m->cache_full = 1;
+}
+
+/* gets the header "head" from msg. */
+int getheader(void *v, const char *phead, const char ***body)
+{
+ message_data_t *m = (message_data_t *) v;
+ int cl, clinit;
+ char *h;
+ char *head;
+
+ *body = NULL;
+
+ if (!m->cache_full) {
+ fill_cache(m);
+ }
+
+ /* copy header parameter so we can mangle it */
+ head = malloc(strlen(phead)+1);
+ if (!head) return SIEVE_FAIL;
+ strcpy(head, phead);
+
+ h = head;
+ while (*h != '\0') {
+ *h = tolower(*h);
+ h++;
+ }
+
+ /* check the cache */
+ clinit = cl = hashheader(head);
+ while (m->cache[cl] != NULL) {
+ if (!strcmp(head, m->cache[cl]->name)) {
+ *body = (const char **) m->cache[cl]->contents;
+ break;
+ }
+ cl++; /* try next hash bin */
+ cl %= HEADERCACHESIZE;
+ if (cl == clinit) break; /* gone all the way around */
+ }
+
+ free(head);
+
+ if (*body) {
+ return SIEVE_OK;
+ } else {
+ return SIEVE_FAIL;
+ }
+}
+
+message_data_t *new_msg(FILE *msg, int size, char *name)
+{
+ int i;
+ message_data_t *m;
+
+ m = (message_data_t *) malloc(sizeof(message_data_t));
+ if (m == NULL) {
+ fprintf(stderr, "malloc() returned NULL\n");
+ exit(1);
+ }
+ m->data = msg;
+ m->size = size;
+ m->name = name;
+ m->content.base = NULL;
+ m->content.len = 0;
+ m->content.body = NULL;
+ for (i = 0; i < HEADERCACHESIZE; i++) {
+ m->cache[i] = NULL;
+ }
+ m->cache_full = 0;
+
+ return m;
+}
+
+int getsize(void *mc, int *size)
+{
+ message_data_t *m = (message_data_t *) mc;
+
+ *size = m->size;
+ return SIEVE_OK;
+}
+
+int getenvelope(void *v, const char *head, const char ***body)
+{
+ static const char *buf[2];
+
+ if (buf[0] == NULL) { buf[0] = malloc(sizeof(char) * 256); buf[1] = NULL; }
+ printf("Envelope body of '%s'? ", head);
+ scanf("%s", (char*) buf[0]);
+ *body = buf;
+
+ return SIEVE_OK;
+}
+
+int getbody(void *mc, const char **content_types, sieve_bodypart_t ***parts)
+{
+ message_data_t *m = (message_data_t *) mc;
+ int r = 0;
+
+ if (!m->content.body) {
+ /* parse the message body if we haven't already */
+ r = message_parse_file(m->data, &m->content.base,
+ &m->content.len, &m->content.body);
+ }
+
+ /* XXX currently struct bodypart as defined in message.h is the same as
+ sieve_bodypart_t as defined in sieve_interface.h, so we can typecast */
+ if (!r) message_fetch_part(&m->content, content_types,
+ (struct bodypart ***) parts);
+ return (!r ? SIEVE_OK : SIEVE_FAIL);
+}
+
+int getinclude(void *sc, const char *script, int isglobal,
+ char *fpath, size_t size)
+{
+ strlcpy(fpath, script, size);
+ strlcat(fpath, ".bc", size);
+
+ return SIEVE_OK;
+}
+
+int redirect(void *ac, void *ic, void *sc, void *mc, const char **errmsg)
+{
+ sieve_redirect_context_t *rc = (sieve_redirect_context_t *) ac;
+ message_data_t *m = (message_data_t *) mc;
+ int *force_fail = (int*) ic;
+
+ printf("redirecting message '%s' to '%s'\n", m->name, rc->addr);
+
+ return (*force_fail ? SIEVE_FAIL : SIEVE_OK);
+}
+
+int discard(void *ac, void *ic, void *sc, void *mc, const char **errmsg)
+{
+ message_data_t *m = (message_data_t *) mc;
+ int *force_fail = (int*) ic;
+
+ printf("discarding message '%s'\n", m->name);
+
+ return (*force_fail ? SIEVE_FAIL : SIEVE_OK);
+}
+
+int reject(void *ac, void *ic, void *sc, void *mc, const char **errmsg)
+{
+ sieve_reject_context_t *rc = (sieve_reject_context_t *) ac;
+ message_data_t *m = (message_data_t *) mc;
+ int *force_fail = (int*) ic;
+
+ printf("rejecting message '%s' with '%s'\n", m->name, rc->msg);
+
+ return (*force_fail ? SIEVE_FAIL : SIEVE_OK);
+}
+
+int fileinto(void *ac, void *ic, void *sc, void *mc, const char **errmsg)
+{
+ sieve_fileinto_context_t *fc = (sieve_fileinto_context_t *) ac;
+ message_data_t *m = (message_data_t *) mc;
+ int *force_fail = (int*) ic;
+
+ printf("filing message '%s' into '%s'\n", m->name, fc->mailbox);
+
+ if (fc->imapflags->flag) {
+ int n;
+ printf("\twith flags");
+ for (n = 0; n < fc->imapflags->nflags; n++)
+ printf(" '%s'", fc->imapflags->flag[n]);
+ printf("\n");
+ }
+
+ return (*force_fail ? SIEVE_FAIL : SIEVE_OK);
+}
+
+int keep(void *ac, void *ic, void *sc, void *mc, const char **errmsg)
+{
+ sieve_keep_context_t *kc = (sieve_keep_context_t *) ac;
+ message_data_t *m = (message_data_t *) mc;
+ int *force_fail = (int*) ic;
+
+ printf("keeping message '%s'\n", m->name);
+ if (kc->imapflags->flag) {
+ int n;
+ printf("\twith flags");
+ for (n = 0; n < kc->imapflags->nflags; n++)
+ printf(" '%s'", kc->imapflags->flag[n]);
+ printf("\n");
+ }
+
+ return (*force_fail ? SIEVE_FAIL : SIEVE_OK);
+}
+
+int notify(void *ac, void *ic, void *sc, void *mc, const char **errmsg)
+{
+ sieve_notify_context_t *nc = (sieve_notify_context_t *) ac;
+ int *force_fail = (int*) ic;
+ int flag = 0;
+
+ printf("notify ");
+ if (nc->method) {
+ const char **opts = nc->options;
+
+ printf("%s(", nc->method);
+ while (opts && *opts) {
+ if (flag) printf(", ");
+ printf("%s", *opts);
+ opts++;
+ flag = 1;
+ }
+ printf("), ");
+ }
+ printf("msg = '%s' with priority = %s\n",nc->message, nc->priority);
+
+ return (*force_fail ? SIEVE_FAIL : SIEVE_OK);
+}
+
+int mysieve_error(int lineno, const char *msg, void *i, void *s)
+{
+ fprintf(stderr, "line %d: %s\r\n", lineno, msg);
+
+ return SIEVE_OK;
+}
+
+int mysieve_execute_error(const char *msg, void *i, void *s, void *m)
+{
+ fprintf(stderr, "%s\r\n", msg);
+
+ return SIEVE_OK;
+}
+
+
+int autorespond(void *ac, void *ic, void *sc, void *mc, const char **errmsg)
+{
+ sieve_autorespond_context_t *arc = (sieve_autorespond_context_t *) ac;
+ char yn;
+ int i;
+
+ printf("Have I already responded to '");
+ for (i = 0; i < SIEVE_HASHLEN; i++) {
+ printf("%x", arc->hash[i]);
+ }
+ printf("' in %d days? ", arc->days);
+ scanf(" %c", &yn);
+
+ if (tolower(yn) == 'y') return SIEVE_DONE;
+ if (tolower(yn) == 'n') return SIEVE_OK;
+
+ return SIEVE_FAIL;
+}
+
+int send_response(void *ac, void *ic, void *sc, void *mc, const char **errmsg)
+{
+ sieve_send_response_context_t *src = (sieve_send_response_context_t *) ac;
+ message_data_t *m = (message_data_t *) mc;
+ int *force_fail = (int*) ic;
+
+ printf("echo '%s' | mail -s '%s' '%s' for message '%s' (from: %s)\n",
+ src->msg, src->subj, src->addr, m->name, src->fromaddr);
+
+ return (*force_fail ? SIEVE_FAIL : SIEVE_OK);
+}
+
+sieve_vacation_t vacation = {
+ 0, /* min response */
+ 0, /* max response */
+ &autorespond, /* autorespond() */
+ &send_response /* send_response() */
+};
+
+char *markflags[] = { "\\flagged" };
+sieve_imapflags_t mark = { markflags, 1 };
+
+struct testcase {
+ int comp;
+ int mode;
+ const char *pat;
+ const char *text;
+ int result;
+};
+
+struct testcase tc[] =
+{ { B_OCTET, B_IS, "", "", 1 },
+ { B_OCTET, B_IS, "a", "", 0 },
+ { B_OCTET, B_IS, "", "a", 0 },
+ { B_OCTET, B_IS, "a", "a", 1 },
+ { B_OCTET, B_IS, "a", "A", 0 },
+
+ { B_ASCIICASEMAP, B_IS, "", "", 1 },
+ { B_ASCIICASEMAP, B_IS, "a", "", 0 },
+ { B_ASCIICASEMAP, B_IS, "", "a", 0 },
+ { B_ASCIICASEMAP, B_IS, "a", "a", 1 },
+ { B_ASCIICASEMAP, B_IS, "a", "A", 1 },
+
+ { B_ASCIINUMERIC, B_IS, "123", "123", 1 },
+ { B_ASCIINUMERIC, B_IS, "123", "-123", 0 },
+ { B_ASCIINUMERIC, B_IS, "abc", "123", 0 },
+ { B_ASCIINUMERIC, B_IS, "abc", "abc", 1 },
+ { B_ASCIINUMERIC, B_IS, "12345678900", "3755744308", 0 }, /* test for 32bit overflow */
+ { B_ASCIINUMERIC, B_IS, "1567", "1567pounds", 1 },
+ { B_ASCIINUMERIC, B_IS, "", "", 1 },
+ { B_ASCIINUMERIC, B_IS, "123456789", "567", 0 },
+ { B_ASCIINUMERIC, B_IS, "567", "123456789", 0 },
+ { B_ASCIINUMERIC, B_IS, "123456789", "00000123456789", 1 },
+ { B_ASCIINUMERIC, B_IS, "102", "1024", 0 },
+ { B_ASCIINUMERIC, B_IS, "1567M", "1567 arg", 1 },
+
+ { B_OCTET, B_CONTAINS, "", "", 1 },
+ { B_OCTET, B_CONTAINS, "", "a", 1 },
+ { B_OCTET, B_CONTAINS, "a", "", 0 },
+ { B_OCTET, B_CONTAINS, "a", "a", 1 },
+ { B_OCTET, B_CONTAINS, "a", "ab", 1 },
+ { B_OCTET, B_CONTAINS, "a", "ba", 1 },
+ { B_OCTET, B_CONTAINS, "a", "aba", 1 },
+ { B_OCTET, B_CONTAINS, "a", "bab", 1 },
+ { B_OCTET, B_CONTAINS, "a", "bb", 0 },
+ { B_OCTET, B_CONTAINS, "a", "bbb", 0 },
+
+ { B_OCTET, B_MATCHES, "", "", 1 },
+ { B_OCTET, B_MATCHES, "", "a", 0 },
+ { B_OCTET, B_MATCHES, "a", "", 0 },
+ { B_OCTET, B_MATCHES, "a", "a", 1 },
+ { B_OCTET, B_MATCHES, "a", "ab", 0 },
+ { B_OCTET, B_MATCHES, "a", "ba", 0 },
+ { B_OCTET, B_MATCHES, "a", "aba", 0 },
+ { B_OCTET, B_MATCHES, "a", "bab", 0 },
+ { B_OCTET, B_MATCHES, "a", "bb", 0 },
+ { B_OCTET, B_MATCHES, "a", "bbb", 0 },
+
+ { B_OCTET, B_MATCHES, "*", "", 1 },
+ { B_OCTET, B_MATCHES, "*", "a", 1 },
+ { B_OCTET, B_MATCHES, "*a*", "", 0 },
+ { B_OCTET, B_MATCHES, "*a*", "a", 1 },
+ { B_OCTET, B_MATCHES, "*a*", "ab", 1 },
+ { B_OCTET, B_MATCHES, "*a*", "ba", 1 },
+ { B_OCTET, B_MATCHES, "*a*", "aba", 1 },
+ { B_OCTET, B_MATCHES, "*a*", "bab", 1 },
+ { B_OCTET, B_MATCHES, "*a*", "bb", 0 },
+ { B_OCTET, B_MATCHES, "*a*", "bbb", 0 },
+
+ { B_OCTET, B_MATCHES, "*a", "", 0 },
+ { B_OCTET, B_MATCHES, "*a", "a", 1 },
+ { B_OCTET, B_MATCHES, "*a", "ab", 0 },
+ { B_OCTET, B_MATCHES, "*a", "ba", 1 },
+ { B_OCTET, B_MATCHES, "*a", "aba", 1 },
+ { B_OCTET, B_MATCHES, "*a", "bab", 0 },
+ { B_OCTET, B_MATCHES, "*a", "bb", 0 },
+ { B_OCTET, B_MATCHES, "*a", "bbb", 0 },
+
+ { B_OCTET, B_MATCHES, "a*", "", 0 },
+ { B_OCTET, B_MATCHES, "a*", "a", 1 },
+ { B_OCTET, B_MATCHES, "a*", "ab", 1 },
+ { B_OCTET, B_MATCHES, "a*", "ba", 0 },
+ { B_OCTET, B_MATCHES, "a*", "aba", 1 },
+ { B_OCTET, B_MATCHES, "a*", "bab", 0 },
+ { B_OCTET, B_MATCHES, "a*", "bb", 0 },
+ { B_OCTET, B_MATCHES, "a*", "bbb", 0 },
+
+ { B_OCTET, B_MATCHES, "a*b", "", 0 },
+ { B_OCTET, B_MATCHES, "a*b", "a", 0 },
+ { B_OCTET, B_MATCHES, "a*b", "ab", 1 },
+ { B_OCTET, B_MATCHES, "a*b", "ba", 0 },
+ { B_OCTET, B_MATCHES, "a*b", "aba", 0 },
+ { B_OCTET, B_MATCHES, "a*b", "bab", 0 },
+ { B_OCTET, B_MATCHES, "a*b", "bb", 0 },
+ { B_OCTET, B_MATCHES, "a*b", "bbb", 0 },
+ { B_OCTET, B_MATCHES, "a*b", "abbb", 1 },
+ { B_OCTET, B_MATCHES, "a*b", "acb", 1 },
+ { B_OCTET, B_MATCHES, "a*b", "acbc", 0 },
+
+ { B_OCTET, B_MATCHES, "a?b", "", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "a", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "ab", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "ba", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "aba", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "bab", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "bb", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "bbb", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "abbb", 0 },
+ { B_OCTET, B_MATCHES, "a?b", "acb", 1 },
+ { B_OCTET, B_MATCHES, "a?b", "acbc", 0 },
+
+ { B_OCTET, B_MATCHES, "a*?b", "", 0 },
+ { B_OCTET, B_MATCHES, "a*?b", "a", 0 },
+ { B_OCTET, B_MATCHES, "a*?b", "ab", 0 },
+ { B_OCTET, B_MATCHES, "a*?b", "ba", 0 },
+ { B_OCTET, B_MATCHES, "a*?b", "aba", 0 },
+ { B_OCTET, B_MATCHES, "a*?b", "bab", 0 },
+ { B_OCTET, B_MATCHES, "a*?b", "bb", 0 },
+ { B_OCTET, B_MATCHES, "a*?b", "bbb", 0 },
+ { B_OCTET, B_MATCHES, "a*?b", "abbb", 1 },
+ { B_OCTET, B_MATCHES, "a*?b", "acb", 1 },
+ { B_OCTET, B_MATCHES, "a*?b", "acbc", 0 },
+
+ { B_OCTET, B_MATCHES, "a?*b", "", 0 },
+ { B_OCTET, B_MATCHES, "a?*b", "a", 0 },
+ { B_OCTET, B_MATCHES, "a?*b", "ab", 0 },
+ { B_OCTET, B_MATCHES, "a?*b", "ba", 0 },
+ { B_OCTET, B_MATCHES, "a?*b", "aba", 0 },
+ { B_OCTET, B_MATCHES, "a?*b", "bab", 0 },
+ { B_OCTET, B_MATCHES, "a?*b", "bb", 0 },
+ { B_OCTET, B_MATCHES, "a?*b", "bbb", 0 },
+ { B_OCTET, B_MATCHES, "a?*b", "abbb", 1 },
+ { B_OCTET, B_MATCHES, "a?*b", "acb", 1 },
+ { B_OCTET, B_MATCHES, "a?*b", "acbc", 0 },
+
+ { B_OCTET, B_MATCHES, "a*?*b", "", 0 },
+ { B_OCTET, B_MATCHES, "a*?*b", "a", 0 },
+ { B_OCTET, B_MATCHES, "a*?*b", "ab", 0 },
+ { B_OCTET, B_MATCHES, "a*?*b", "ba", 0 },
+ { B_OCTET, B_MATCHES, "a*?*b", "aba", 0 },
+ { B_OCTET, B_MATCHES, "a*?*b", "bab", 0 },
+ { B_OCTET, B_MATCHES, "a*?*b", "bb", 0 },
+ { B_OCTET, B_MATCHES, "a*?*b", "bbb", 0 },
+ { B_OCTET, B_MATCHES, "a*?*b", "abbb", 1 },
+ { B_OCTET, B_MATCHES, "a*?*b", "acb", 1 },
+ { B_OCTET, B_MATCHES, "a*?*b?", "acbc", 1 },
+
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "a", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "ab", 1 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "ba", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "aba", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "bab", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "bb", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "bbb", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "abbb", 1 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "acb", 1 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "acbc", 0 },
+
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "A", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "Ab", 1 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "BA", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "ABA", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "BAb", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "BB", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "BBB", 0 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "aBBB", 1 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "ACB", 1 },
+ { B_ASCIICASEMAP, B_MATCHES, "a*b", "ACBC", 0 },
+
+ { 0, 0, NULL, NULL, 0 } };
+
+static int test_comparator(void)
+{
+ struct testcase *t;
+ int didfail = 0;
+
+ for (t = tc; t->comp != 0; t++) {
+ void *comprock = NULL;
+ comparator_t *c = lookup_comp(t->comp, t->mode, -1, &comprock);
+ int res;
+ char *comp, *mode;
+
+ if (t->comp == B_OCTET) comp = "i;octet";
+ else if (t->comp == B_ASCIICASEMAP) comp = "i;ascii-casemap";
+ else if (t->comp == B_ASCIINUMERIC) comp = "i;ascii-numeric";
+ else comp = "<unknown comp>";
+
+ if (t->mode == B_IS) mode = "IS";
+ else if (t->mode == B_CONTAINS) mode = "CONTAINS";
+ else if (t->mode == B_MATCHES) mode = "MATCHES";
+ else if (t->mode == B_REGEX) mode = "REGEX";
+ else mode = "<unknown mode>";
+
+ if (!c) {
+ printf("FAIL: can't find a comparator %s/%s\n",
+ comp, mode);
+ didfail++;
+ continue;
+ }
+ res = c(t->text, strlen(t->text), t->pat, comprock);
+ if (res != t->result) {
+ printf("FAIL: %s/%s(%s, %s) = %d, not %d\n",
+ comp, mode, t->pat, t->text, res, t->result);
+ didfail++;
+ }
+ }
+ if (didfail) {
+ fprintf(stderr, "failed %d tests\n", didfail);
+ exit(1);
+ } else {
+ exit(0);
+ }
+}
+
+int config_need_data = 0;
+
+int main(int argc, char *argv[])
+{
+ sieve_interp_t *i;
+ sieve_execute_t *exe = NULL;
+ message_data_t *m;
+ char *script = NULL, *message = NULL;
+ int c, force_fail = 0, usage_error = 0;
+ /* (crom cvs update) FILE *f;
+ */
+ int fd, res;
+ struct stat sbuf;
+
+ while ((c = getopt(argc, argv, "v:cf")) != EOF)
+ switch (c) {
+ case 'v':
+ script = optarg;
+ break;
+ case 'c':
+ test_comparator();
+ /* test_comparator exits for us */
+ break;
+ case 'f':
+ force_fail = 1;
+ break;
+ default:
+ usage_error = 1;
+ break;
+ }
+
+ if (!script) {
+ if ((argc - optind) < 2)
+ usage_error = 1;
+ else {
+ message = argv[optind];
+ script = argv[optind+1];
+ }
+ }
+
+ if (usage_error) {
+ fprintf(stderr, "usage:\n");
+ fprintf(stderr, "%s message script\n", argv[0]);
+ fprintf(stderr, "%s -v script\n", argv[0]);
+ exit(1);
+ }
+
+ res = sieve_interp_alloc(&i, &force_fail);
+ if (res != SIEVE_OK) {
+ printf("sieve_interp_alloc() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_redirect(i, &redirect);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_redirect() returns %d\n", res);
+ exit(1);
+ }
+ res = sieve_register_discard(i, &discard);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_discard() returns %d\n", res);
+ exit(1);
+ }
+ res = sieve_register_reject(i, &reject);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_reject() returns %d\n", res);
+ exit(1);
+ }
+ res = sieve_register_fileinto(i, &fileinto);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_fileinto() returns %d\n", res);
+ exit(1);
+ }
+ res = sieve_register_keep(i, &keep);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_keep() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_size(i, &getsize);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_size() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_header(i, &getheader);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_header() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_envelope(i, &getenvelope);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_envelope() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_body(i, &getbody);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_body() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_include(i, &getinclude);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_include() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_vacation(i, &vacation);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_vacation() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_imapflags(i, &mark);
+
+ if (res != SIEVE_OK) {
+ printf("sieve_register_imapflags() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_notify(i, ¬ify);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_notify() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_parse_error(i, &mysieve_error);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_parse_error() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_register_execute_error(i, &mysieve_execute_error);
+ if (res != SIEVE_OK) {
+ printf("sieve_register_execute_error() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_script_load(argv[2], &exe);
+ if (res != SIEVE_OK) {
+ printf("sieve_script_load() returns %d\n", res);
+ exit(1);
+ }
+
+ if (message) {
+ fd = open(message, O_RDONLY);
+ res = fstat(fd, &sbuf);
+ if (res != 0) {
+ perror("fstat");
+ }
+
+
+ m = new_msg(fdopen(fd, "r"), sbuf.st_size, message);
+ if (res != SIEVE_OK) {
+ printf("sieve_msg_parse() returns %d\n", res);
+ exit(1);
+ }
+
+ res = sieve_execute_bytecode(exe, i, NULL, m);
+ if (res != SIEVE_OK) {
+ printf("sieve_execute_bytecode() returns %d\n", res);
+ exit(1);
+ }
+
+ close(fd);
+ }
+ /*used to be sieve_script_free*/
+ res = sieve_script_unload(&exe);
+ if (res != SIEVE_OK) {
+ printf("sieve_script_unload() returns %d\n", res);
+ exit(1);
+ }
+ res = sieve_interp_free(&i);
+ if (res != SIEVE_OK) {
+ printf("sieve_interp_free() returns %d\n", res);
+ exit(1);
+ }
+
+ return 0;
+}
+
+void fatal(char* message, int rc) {
+ fprintf(stderr, "fatal error: %s\n", message);
+ exit(rc);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+/README/1.2.4.1/Wed Apr 14 16:57:43 2004//Tcyrus-release-2-3-7
+D/action////
+D/actionExtensions////
+D/test////
+D/testExtension////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+there are four directories
+
+action (sieve actions)
+test (the test cases for if)
+action extension (extensons to sieve that are actions)
+testExtension (extensions to sieve that are tests)
+
+inside these directories is:
+
+XXXXX.s (sieve script)
+XXXXX.key (what this script should do with thest messages
+serverm (dir of messages- for testing the script using lmtp server)
+testm (dir of messages- for testing the script using sieve test program)
+
+the redirected messages are all being sent to me at blah.com. when using a lmpt server, change this to a real address first
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/uberActionScript.key/1.2.4.1/Wed Apr 14 16:57:44 2004//Tcyrus-release-2-3-7
+/uberActionScript.s/1.2.4.1/Wed Apr 14 16:57:44 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+A D/serverm////
+A D/testm////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/action
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+/uamail-discard/1.2.4.1/Wed Apr 14 16:57:45 2004//Tcyrus-release-2-3-7
+/uamail-keep/1.2.4.1/Wed Apr 14 16:57:45 2004//Tcyrus-release-2-3-7
+/uamail-redirect/1.2.4.1/Wed Apr 14 16:57:45 2004//Tcyrus-release-2-3-7
+/uamail-stop/1.2.4.1/Wed Apr 14 16:57:45 2004//Tcyrus-release-2-3-7
+/uamail-stop2/1.2.4.1/Wed Apr 14 16:57:45 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/action/serverm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-discard
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-discard?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-discard (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-discard Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: discard
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-keep
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-keep?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-keep (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-keep Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: keep
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-redirect
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-redirect?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-redirect (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-redirect Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: redirect
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: stop
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/serverm/uamail-stop2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: stop discard
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+/uatest-discard/1.2.4.1/Wed Apr 14 16:57:46 2004//Tcyrus-release-2-3-7
+/uatest-keep/1.2.4.1/Wed Apr 14 16:57:46 2004//Tcyrus-release-2-3-7
+/uatest-redirect/1.2.4.1/Wed Apr 14 16:57:46 2004//Tcyrus-release-2-3-7
+/uatest-stop/1.2.4.1/Wed Apr 14 16:57:46 2004//Tcyrus-release-2-3-7
+/uatest-stop2/1.2.4.1/Wed Apr 14 16:57:47 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/action/testm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-discard
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-discard?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-discard (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-discard Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: discard
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-keep
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-keep?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-keep (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-keep Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: keep
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-redirect
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-redirect?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-redirect (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-redirect Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: redirect
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: stop
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/testm/uatest-stop2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2003 08:51:06 -0500
+From: them
+To: you
+Subject: stop discard
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.key
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.key?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.key (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.key Sat Aug 26 02:00:13 2006
@@ -1,0 +1,12 @@
+
+discarding message
+'uatest-discard'
+
+keeping messages
+
+'uatest-keep'
+'uatest-stop'
+'uatest-stop2'
+
+redirecting message
+'uatest-redirect'
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.s
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.s?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.s (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/action/uberActionScript.s Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+#this test should be run after ubertestscript.
+#this depends on ifs and testing to be working properly
+
+
+if header :contains "subject" "stop"
+{stop;}
+
+if header :contains "subject" "keep"
+{keep;}
+
+if header :contains "subject" "discard"
+{discard;}
+
+#this one is already tested by the ubertest script...
+if header :contains "subject" "redirect"
+{redirect "me+goodredirect at blah.com";}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/uberExtensionActionScript.key/1.2.4.1/Wed Apr 14 16:57:47 2004//Tcyrus-release-2-3-7
+/uberExtensionActionScript.s/1.2.4.1/Wed Apr 14 16:57:48 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+A D/serverm////
+A D/testm////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/actionExtensions
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+/ueamail-denotify/1.2.4.1/Wed Apr 14 16:57:48 2004//Tcyrus-release-2-3-7
+/ueamail-denotify2/1.2.4.1/Wed Apr 14 16:57:48 2004//Tcyrus-release-2-3-7
+/ueamail-fileinto/1.2.4.1/Wed Apr 14 16:57:49 2004//Tcyrus-release-2-3-7
+/ueamail-flag1/1.2.4.1/Wed Apr 14 16:57:49 2004//Tcyrus-release-2-3-7
+/ueamail-flag2/1.2.4.1/Wed Apr 14 16:57:49 2004//Tcyrus-release-2-3-7
+/ueamail-flag3/1.2.4.1/Wed Apr 14 16:57:49 2004//Tcyrus-release-2-3-7
+/ueamail-flag4/1.2.4.1/Wed Apr 14 16:57:49 2004//Tcyrus-release-2-3-7
+/ueamail-flag5/1.2.4.1/Wed Apr 14 16:57:49 2004//Tcyrus-release-2-3-7
+/ueamail-mark/1.2.4.1/Wed Apr 14 16:57:49 2004//Tcyrus-release-2-3-7
+/ueamail-notify/1.2.4.1/Wed Apr 14 16:57:50 2004//Tcyrus-release-2-3-7
+/ueamail-notify2/1.2.4.1/Wed Apr 14 16:57:50 2004//Tcyrus-release-2-3-7
+/ueamail-reject/1.2.4.1/Wed Apr 14 16:57:50 2004//Tcyrus-release-2-3-7
+/ueamail-unmark/1.2.4.1/Wed Apr 14 16:57:50 2004//Tcyrus-release-2-3-7
+/ueamail-vacation/1.2.4.1/Wed Apr 14 16:57:50 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/actionExtensions/serverm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: not notify
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-denotify2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: denotify notify n2
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-fileinto
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-fileinto?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-fileinto (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-fileinto Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: fileinto
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: aflag1
+
+should be seen
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: aflag2 sflag1
+
+should be deleted
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag3
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag3?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag3 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag3 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: sflag1 sflag2
+
+should be draft
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: aflag2 rflag
+
+should be draft and flagged
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag5
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag5?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag5 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-flag5 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: aflag1 aflag2
+
+should be seen, flagged, draft, and answered
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-mark
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-mark?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-mark (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-mark Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: zmark
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: notify
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-notify2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: not notify n2
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-reject
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-reject?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-reject (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-reject Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: reject
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-unmark
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-unmark?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-unmark (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-unmark Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: zmark unmark
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-vacation
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-vacation?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-vacation (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/serverm/ueamail-vacation Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: me at blah.com
+Subject: vacation
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+/ueatest-denotify/1.2.4.1/Wed Apr 14 16:57:51 2004//Tcyrus-release-2-3-7
+/ueatest-denotify2/1.2.4.1/Wed Apr 14 16:57:51 2004//Tcyrus-release-2-3-7
+/ueatest-fileinto/1.2.4.1/Wed Apr 14 16:57:51 2004//Tcyrus-release-2-3-7
+/ueatest-flag1/1.2.4.1/Wed Apr 14 16:57:51 2004//Tcyrus-release-2-3-7
+/ueatest-flag2/1.2.4.1/Wed Apr 14 16:57:51 2004//Tcyrus-release-2-3-7
+/ueatest-flag3/1.2.4.1/Wed Apr 14 16:57:51 2004//Tcyrus-release-2-3-7
+/ueatest-flag4/1.2.4.1/Wed Apr 14 16:57:52 2004//Tcyrus-release-2-3-7
+/ueatest-flag5/1.2.4.1/Wed Apr 14 16:57:52 2004//Tcyrus-release-2-3-7
+/ueatest-mark/1.2.4.1/Wed Apr 14 16:57:52 2004//Tcyrus-release-2-3-7
+/ueatest-notify/1.2.4.1/Wed Apr 14 16:57:52 2004//Tcyrus-release-2-3-7
+/ueatest-notify2/1.2.4.1/Wed Apr 14 16:57:52 2004//Tcyrus-release-2-3-7
+/ueatest-reject/1.2.4.1/Wed Apr 14 16:57:52 2004//Tcyrus-release-2-3-7
+/ueatest-unmark/1.2.4.1/Wed Apr 14 16:57:52 2004//Tcyrus-release-2-3-7
+/ueatest-vacation/1.2.4.1/Wed Apr 14 16:57:53 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/actionExtensions/testm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: not notify
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-denotify2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: denotify notify n2
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-fileinto
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-fileinto?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-fileinto (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-fileinto Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: fileinto
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: aflag1
+
+should be seen
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: aflag2 sflag1
+
+should be deleted
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag3
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag3?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag3 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag3 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: sflag1 sflag2
+
+should be draft
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag4
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag4?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag4 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag4 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: aflag2 rflag
+
+should be draft and flagged
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag5
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag5?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag5 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-flag5 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: aflag1 aflag2
+
+should be seen, flagged, draft, and answered
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-mark
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-mark?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-mark (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-mark Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: zmark
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: notify
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-notify2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: not notify n2
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-reject
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-reject?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-reject (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-reject Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: reject
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-unmark
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-unmark?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-unmark (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-unmark Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: you
+Subject: zmark unmark
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-vacation
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-vacation?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-vacation (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/testm/ueatest-vacation Sat Aug 26 02:00:13 2006
@@ -1,0 +1,7 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: them
+To: me at blah.com
+Subject: vacation
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.key
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.key?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.key (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.key Sat Aug 26 02:00:13 2006
@@ -1,0 +1,44 @@
+'ueatest-denotify'
+
+ keep message
+
+'ueatest-denotify2'
+
+
+ notify default(), msg = 'whee: denotify notify n2
+
+ Action(s) taken:
+ ' with priority = normal
+
+ keep message
+
+'ueatest-fileinto'
+file message into 'INBOX.good'
+
+'ueatest-flag1'
+ keep message with flags '\seen'
+'ueatest-flag2'
+ keep message with flags '\deleted
+'ueatest-flag3'
+ keep message with flags '\draft'
+'ueatest-flag4'
+ keep message with flags '\draft' '\flagged'
+
+'ueatest-flag5'
+ keep message with flags '\seen' '\draft' '\answered' '\flagged
+
+'ueatest-mark'
+ keep message with flags '\flagged'
+
+'ueatest-unmark'
+ keep message
+
+'ueatest-vacation'
+
+Envelope body of 'to'? you
+Envelope body of 'from'? me
+Have I already responded to '373d72afbd3cbfcb7a7922d70d5dd6e' in 5 days? no
+
+echo 'I'll respond in a week or two, when i get back' | mail -s 'i'm at the beach' 'me at unspecified-domain' for message '/afs/andrew/system/src/local/cyrus/046/sieve/tests/actionExtensions/testm/ueatest-vacation'
+
+keep message
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.s
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.s?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.s (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/actionExtensions/uberExtensionActionScript.s Sat Aug 26 02:00:13 2006
@@ -1,0 +1,74 @@
+require ["reject", "fileinto", "imapflags", "vacation", "notify"];
+
+#this is for the extra thigns we have added to sieve
+
+#action extensions
+#reject fileinto imapflags vacation notify
+
+#REJECT
+##############################################
+if header :contains "subject" "reject"
+{reject "rejected";}
+
+#FILEINTO
+##############################################
+if header :contains "subject" "fileinto"
+{fileinto "INBOX.good";}
+
+#IMAPFLAGS
+##############################################
+#mark
+if header :contains "subject" "zmark"
+{mark;}
+
+#unmark
+if header :contains "subject" "unmark"
+{unmark;}
+
+#addflag
+if header :contains "subject" "aflag1"
+{addflag "\\seen";}
+
+#addflag
+if header :contains "subject" "aflag2"
+{addflag ["\\draft", "\\answered", "\\flagged"];}
+
+#setflag
+if header :contains "subject" "sflag1"
+{setflag "\\deleted";}
+
+#setflag
+if header :contains "subject" "sflag2"
+{setflag "\\draft";}
+
+#removeflag
+if header :contains "subject" "rflag"
+{removeflag "\\answered";}
+
+#VACATION
+#############################################
+if header :contains "subject" "vacation"
+{
+
+vacation :days 5
+ :addresses ["me at blah.com" , "me at somewhereelse.com"]
+ :subject "i'm at the beach"
+ "I'll respond in a week or two, when i get back";
+}
+
+#NOTIFY and DENOTIFY
+#############################################
+if header :contains "subject" "notify"
+{notify :high :id "foobar" :message "whee: $subject$";}
+
+if header :contains "subject" "not"
+{denotify :is "foobar" :high;
+
+}
+
+if header :contains "subject" "n2"
+{notify :id "foobar" :message "whee: $subject$";}
+
+
+if header :contains "subject" "denotify"
+{denotify;}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/uberTestScript.key/1.2.4.1/Wed Apr 14 16:57:53 2004//Tcyrus-release-2-3-7
+/uberTestScript.s/1.2.4.1/Wed Apr 14 16:57:53 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+A D/serverm////
+A D/testm////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/test
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/utmail-address/1.2.4.1/Wed Apr 14 16:57:54 2004//Tcyrus-release-2-3-7
+/utmail-header/1.2.4.1/Wed Apr 14 16:57:54 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/test/serverm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-address
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-address?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-address (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-address Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Jan 2003 08:51:06 -0500
+From: zme at true.com
+To: you
+Subject: simple address test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-header
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-header?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-header (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/serverm/utmail-header Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: it
+To: me
+Subject: simple header test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/utest-address/1.2.4.1/Wed Apr 14 16:57:55 2004//Tcyrus-release-2-3-7
+/utest-header/1.2.4.1/Wed Apr 14 16:57:55 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/test/testm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-address
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-address?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-address (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-address Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Jan 2003 08:51:06 -0500
+From: zme at true.com
+To: you
+Subject: simple address test
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-header
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-header?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-header (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/testm/utest-header Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: it
+To: me
+Subject: simple header test
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.key
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.key?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.key (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.key Sat Aug 26 02:00:13 2006
@@ -1,0 +1,41 @@
+utest-address should be redirected to:
+
+ 'me+aallis at blah.com'
+ 'me+aallcontains at blah.com'
+ 'me+aallmatches at blah.com'
+
+ 'me+adomainis at blah.com'
+ 'me+adomaincontains at blah.com'
+ 'me+adomainmatches at blah.com'
+
+ 'me+alocalpartis at blah.com'
+ 'me+alocalpartcontains at blah.com'
+ 'me+alocalpartmatches at blah.com'
+
+utest-header should be redirected to:
+
+'me+headercontains at blah.com'
+'me+headeris at blah.com'
+'me+headermatches at blah.com'
+
+both of those messages should also be redirected to
+ 'me+exists at blah.com'
+ 'me+under1k at blah.com'
+
+any message at all should be redirected to
+
+ 'me+goodtrue at blah.com'
+ 'me+goodnot at good.com'
+ 'me+goodif at good.com'
+ 'me+goodelseif at good.com'
+ 'me+goodelse at good.com'
+ 'me+goodnull at good.com'
+ 'me+goodnesting at good.com'
+ 'me+goodallof at blah.com'
+ 'me+goodallof at blah.com'
+ 'me+goodallof at blah.com'
+ 'me+goodallof at blah.com'
+ 'me+goodanyof at blah.com'
+ 'me+goodanyof at blah.com'
+ 'me+goodanyof at blah.com'
+ 'me+goodanyof at blah.com'
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.s
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.s?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.s (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/test/uberTestScript.s Sat Aug 26 02:00:13 2006
@@ -1,0 +1,171 @@
+/*using redirect to test if, elsif, and else, along with all of the tests
+ that can be inside
+
+ this is still being added to, there are almost certaintly conditions not
+ being tested
+
+
+ */
+
+
+#address all
+
+if address :all :is "from" "zme at true.com"
+{redirect "me+aallis at blah.com";}
+
+if address :all :contains "from" "true.com"
+{redirect "me+aallcontains at blah.com";}
+
+if address :all :matches "from" "*true.com"
+{redirect "me+aallmatches at blah.com";}
+
+
+
+#address domain
+
+if address :domain :is "from" "true.com"
+{redirect "me+adomainis at blah.com";}
+
+if address :domain :contains "from" "true.com"
+{redirect "me+adomaincontains at blah.com";}
+
+if address :domain :matches "from" "*true*"
+{redirect "me+adomainmatches at blah.com";}
+
+
+#address localpart
+
+if address :localpart :is "from" "zme"
+{redirect "me+alocalpartis at blah.com";}
+
+if address :localpart :contains "from" "z"
+{redirect "me+alocalpartcontains at blah.com";}
+
+if address :localpart :matches "from" "z*"
+{redirect "me+alocalpartmatches at blah.com";}
+
+
+
+
+
+
+#add tests/messages that differentiate between header/address.
+#need to write messages and to tweak tests to make sure everyhting works
+#as expected
+
+if header :contains "Date" "Feb"
+{redirect "me+headercontains at blah.com";}
+
+if header :is "Date" "Mon, 25 Feb 2002 08:51:06 -0500"
+{redirect "me+headeris at blah.com";}
+
+if header :matches "Date" "Mon, 25 Feb *"
+{redirect "me+headermatches at blah.com";}
+
+##########################################################################
+#this stuff will be true for a lot of messages #
+##########################################################################
+#stop
+
+if exists "To"
+{redirect "me+toexists at blah.com";}
+
+if exists "flooglewart"
+{redirect "me+badexists at blah.com";}
+
+ if size :over 10K
+{redirect "me+over10k at blah.com";}
+
+if size :over 1M
+{redirect "me+over1m at blah.com";}
+
+if size :under 1K
+{redirect "me+under1k at blah.com";}
+
+#########################################################################
+#this stuff will work for any message. #
+#########################################################################
+#stop
+
+
+if true
+{redirect "me+goodtrue at blah.com";}
+
+if false
+{redirect "me+badfalse at blah.com";}
+
+if not false
+{redirect "me+goodnot at blah.com";}
+
+if true
+{redirect "me+goodif at blah.com";}
+else
+{redirect "me+badif at blah.com";}
+
+if false
+{redirect "me+badelseif at blah.com";}
+elsif true
+{redirect "me+goodelseif at blah.com";}
+else
+{redirect "me+badelseif at blah.com";}
+
+if false
+{redirect "me+badelse at blah.com";}
+elsif false
+{redirect "me+badelse at blah.com";}
+else
+{redirect "me+goodelse at blah.com";}
+
+if false
+{}
+else
+{redirect "me+goodnull at blah.com";}
+
+if true
+ {if true
+ {if true
+ {redirect "me+goodnesting at blah.com";}
+ }
+ }
+
+#ALLOF(and)
+if allof(false, false)
+{redirect "me+badallof(ff)@blah.com";}
+else
+{redirect "me+goodallof at blah.com";}
+
+if allof(false, true)
+{redirect "me+badallof(ft)@blah.com";}
+else
+{redirect "me+goodallof at blah.com";}
+
+if allof(true, false)
+{redirect "me+badallof(tf)@blah.com";}
+else
+{redirect "me+goodallof at blah.com";}
+
+if allof(true, true)
+{redirect "me+goodallof at blah.com";}
+else
+{redirect "me+badallof(tt)@blah.com";}
+
+#ANYOF(or)
+if anyof(false, false)
+{redirect "me+badanyof(ff)@blah.com";}
+else
+{redirect "me+goodanyof at blah.com";}
+
+if anyof(false,true)
+{redirect "me+goodanyof at blah.com";}
+else
+{redirect "me+badanyof(ft)@blah.com";}
+
+if anyof(true, false)
+{redirect "me+goodanyof at blah.com";}
+else
+{redirect "me+badanyof(tf)@blah.com";}
+
+if anyof(true, true)
+{redirect "me+goodanyof at blah.com";}
+else
+{redirect "me+badanyof(tt)@blah.com";}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/uberExtensionTestScript.key/1.2.4.1/Wed Apr 14 16:57:56 2004//Tcyrus-release-2-3-7
+/uberExtensionTestScript.s/1.2.4.1/Wed Apr 14 16:57:56 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries.Log
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries.Log?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries.Log (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Entries.Log Sat Aug 26 02:00:13 2006
@@ -1,0 +1,2 @@
+A D/serverm////
+A D/testm////
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/testExtension
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,9 @@
+/uetmail-areg/1.2.4.1/Wed Apr 14 16:57:57 2004//Tcyrus-release-2-3-7
+/uetmail-asub/1.2.4.1/Wed Apr 14 16:57:57 2004//Tcyrus-release-2-3-7
+/uetmail-count/1.2.4.1/Wed Apr 14 16:57:57 2004//Tcyrus-release-2-3-7
+/uetmail-count2/1.2.4.1/Wed Apr 14 16:57:57 2004//Tcyrus-release-2-3-7
+/uetmail-envelope/1.2.4.1/Wed Apr 14 16:57:57 2004//Tcyrus-release-2-3-7
+/uetmail-hreg/1.2.4.1/Wed Apr 14 16:57:58 2004//Tcyrus-release-2-3-7
+/uetmail-value/1.2.4.1/Wed Apr 14 16:57:58 2004//Tcyrus-release-2-3-7
+/uetmail-value2/1.2.4.1/Wed Apr 14 16:57:58 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/testExtension/serverm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-areg
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-areg?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-areg (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-areg Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: cookyMonster+wheee at cookie.com
+To: you
+Subject: a simple address regex test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-asub
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-asub?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-asub (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-asub Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: mymonster+underbed at x.com
+To: you
+Subject: a simple address subaddress test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count Sat Aug 26 02:00:13 2006
@@ -1,0 +1,15 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: me
+To: you
+X:1
+X:2
+X:3
+X:4
+X:5
+Subject: a simple relational count test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-count2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,12 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: me
+To: you
+X:4
+X:5
+Subject: a simple relational count test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-envelope
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-envelope?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-envelope (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-envelope Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<WERT+erk at true.com>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Jan 2003 08:51:06 -0500
+From: it
+To: you
+Subject: simple envelope test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-hreg
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-hreg?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-hreg (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-hreg Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Tue, 25 Feb 2002 08:51:06 -0500
+From: me
+To: you
+Subject: a simple header regex test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: me
+To: you
+Number:11
+Subject: a simple relational value test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value2
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value2?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value2 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/serverm/uetmail-value2 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+MAIL FROM:<jsmith2+testing at andrew.cmu.edu>
+RCPT TO:<jsmith2>
+DATA
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: me
+To: you
+Number:8
+Subject: a simple relational value test
+
+blah
+.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,7 @@
+/uetest-areg/1.2.4.1/Wed Apr 14 16:57:59 2004//Tcyrus-release-2-3-7
+/uetest-asub/1.2.4.1/Wed Apr 14 16:57:59 2004//Tcyrus-release-2-3-7
+/uetest-count/1.2.4.1/Wed Apr 14 16:57:59 2004//Tcyrus-release-2-3-7
+/uetest-envelope/1.2.4.1/Wed Apr 14 16:57:59 2004//Tcyrus-release-2-3-7
+/uetest-hreg/1.2.4.1/Wed Apr 14 16:57:59 2004//Tcyrus-release-2-3-7
+/uetest-value/1.2.4.1/Wed Apr 14 16:57:59 2004//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/sieve/tests/testExtension/testm
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-areg
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-areg?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-areg (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-areg Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: cookyMonster+wheee at cookie.com
+To: you
+Subject: a simple address regex test
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-asub
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-asub?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-asub (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-asub Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: mymonster+underbed at x.com
+To: you
+Subject: a simple address subaddress test
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-count
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-count?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-count (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-count Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: me
+To: you
+X:1
+X:2
+X:3
+X:4
+X:5
+Subject: a simple relational count test
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-envelope
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-envelope?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-envelope (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-envelope Sat Aug 26 02:00:13 2006
@@ -1,0 +1,6 @@
+Date: Mon, 25 Jan 2003 08:51:06 -0500
+From: it
+To: you
+Subject: simple envelope test
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-hreg
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-hreg?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-hreg (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-hreg Sat Aug 26 02:00:13 2006
@@ -1,0 +1,5 @@
+Date: Tue, 25 Feb 2002 08:51:06 -0500
+From: me
+To: you
+Subject: a simple header regex test
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-value
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-value?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-value (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/testm/uetest-value Sat Aug 26 02:00:13 2006
@@ -1,0 +1,7 @@
+Date: Mon, 25 Feb 2002 08:51:06 -0500
+From: me
+To: you
+Number:11
+Subject: a simple relational value test
+
+blah
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.key
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.key?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.key (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.key Sat Aug 26 02:00:13 2006
@@ -1,0 +1,69 @@
+
+
+
+uetest-value should be redirected to
+'me+numberover10 at blah.com'
+
+uetest-value2 should just be kept
+
+uetest-count should be redirected to
+'me+X at blah.com'
+
+uetest-count2 should just be kept
+
+
+uetest-hreg should be redirected to
+
+'me+goodheaderregex at blah.com'
+
+
+uetest-areg should be redirected to
+
+ 'me+goodaallregex at blah.com'
+ 'me+goodadomainregex at blah.com'
+ 'me+goodalocalpartregex at blah.com'
+ 'me+goodauserregex at blah.com'
+ 'me+goodadetailregex at blah.com'
+
+
+uetest-asub should be redirected to
+
+ 'me+goodauseris at blah.com'
+ 'me+goodausercontains at blah.com'
+ 'me+goodausermatches at blah.com'
+
+ 'me+goodadetailis at blah.com'
+ 'me+goodadetailcontains at blah.com'
+ 'me+goodadetailmatches at blah.com'
+
+
+utest-envelope with an envelope body of from= "WERT+erk at true.com" should be redirected to:
+
+
+ 'me+eallis at blah.com'
+ 'me+eallcontains at blah.com'
+ 'me+eallmatches at blah.com'
+
+ 'me+edomainis at blah.com'
+ 'me+edomaincontains at blah.com'
+ 'me+edomainmatches at blah.com'
+
+ 'me+elocalpartis at blah.com'
+ 'me+elocalpartcontains at blah.com'
+ 'me+elocalpartmatches at blah.com'
+
+ 'me+goodeallregex at blah.com'
+ 'me+goodedomainregex at blah.com'
+ 'me+goodelocalpartregex at blah.com'
+ 'me+goodeuserregex at blah.com'
+ 'me+goodedetailregex at blah.com'
+
+ 'me+goodeuseris at blah.com'
+ 'me+goodeusercontains at blah.com'
+ 'me+goodeusermatches at blah.com'
+
+ 'me+goodedetailis at blah.com'
+ 'me+goodedetailcontains at blah.com'
+ 'me+goodedetailmatches at blah.com'
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.s
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.s?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.s (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tests/testExtension/uberExtensionTestScript.s Sat Aug 26 02:00:13 2006
@@ -1,0 +1,147 @@
+require ["regex", "relational", "comparator-i;ascii-numeric", "subaddress", "envelope"];
+
+#this is for the extra thigns we have added to sieve
+#test extensions
+#envelope regex relational comparators subaddress(user and detail)
+
+
+#need better relational and comparator tests...
+
+if header :value "gt"
+ :comparator "i;ascii-numeric"
+ ["number"] ["10"]
+{redirect "me+numberover10 at blah.com";}
+
+
+if header :count "gt"
+ :comparator "i;ascii-numeric"
+ ["X"] ["3"]
+{redirect "me+X at blah.com";}
+
+#header regex
+
+if header :regex "Date" "Tue,(.*)Feb(.*)"
+{redirect "me+goodheaderregex at blah.com";}
+
+
+
+#address Regex
+
+if address :all :regex "from" "cook(.)Monster(\\+.*)@cookie\\...."
+{redirect "me+goodaallregex at blah.com";}
+
+if address :domain :regex "from" "c..kie\\.com"
+{redirect "me+goodadomainregex at blah.com";}
+
+if address :localpart :regex "from" "c.{2,4}Monster(\\+.*)"
+{redirect "me+goodalocalpartregex at blah.com";}
+
+if address :user :regex "from" "cookyM.....r"
+{redirect "me+goodauserregex at blah.com";}
+
+if address :detail :regex "from" "whe*"
+{redirect "me+goodadetailregex at blah.com";}
+
+
+#address user
+
+if address :user :is "from" "mymonster"
+{redirect "me+goodauseris at blah.com";}
+
+if address :user :contains "from" "mym"
+{redirect "me+goodausercontains at blah.com";}
+
+if address :user :matches "from" "my*r"
+{redirect "me+goodausermatches at blah.com";}
+
+
+#address detail
+
+if address :detail :is "from" "underbed"
+{redirect "me+goodadetailis at blah.com";}
+
+if address :detail :contains "from" "bed"
+{redirect "me+goodadetailcontains at blah.com";}
+
+if address :detail :matches "from" "under*"
+{redirect "me+goodadetailmatches at blah.com";}
+
+######################################################################
+#ENVELOPE
+######################################################################
+
+
+#envelope all
+
+if envelope :all :is "from" "WERT+erk at true.com"
+{redirect "me+eallis at blah.com";}
+
+if envelope :all :contains "from" "true.com"
+{redirect "me+eallcontains at blah.com";}
+
+if envelope :all :matches "from" "WERT*.com"
+{redirect "me+eallmatches at blah.com";}
+
+
+#envelope domain
+
+if envelope :domain :is "from" "true.com"
+{redirect "me+edomainis at blah.com";}
+
+if envelope :domain :contains "from" "true"
+{redirect "me+edomaincontains at blah.com";}
+
+if envelope :domain :matches "from" "*true.com"
+{redirect "me+edomainmatches at blah.com";}
+
+
+#envelope localpart
+
+if envelope :localpart :is "from" "WERT+erk"
+{redirect "me+elocalpartis at blah.com";}
+
+if envelope :localpart :contains "from" "WE"
+{redirect "me+elocalpartcontains at blah.com";}
+
+if envelope :localpart :matches "from" "WE?T*"
+{redirect "me+elocalpartmatches at blah.com";}
+
+#envelope regex
+
+if envelope :all :regex "from" "true.com"
+{redirect "me+goodeallregex at blah.com";}
+
+if envelope :domain :regex "from" "true.com"
+{redirect "me+goodedomainregex at blah.com";}
+
+if envelope :localpart :regex "from" "true.com"
+{redirect "me+goodelocalpartregex at blah.com";}
+
+if envelope :user :regex "from" "true.com"
+{redirect "me+goodeuserregex at blah.com";}
+
+if envelope :detail :regex "from" "true.com"
+{redirect "me+goodedetailregex at blah.com";}
+
+#envelope user
+
+if envelope :user :is "from" "WERT"
+{redirect "me+goodeuseris at blah.com";}
+
+if envelope :user :contains "from" "WE"
+{redirect "me+goodeusercontains at blah.com";}
+
+if envelope :user :matches "from" "*RT"
+{redirect "me+goodeusermatches at blah.com";}
+
+
+#envelope detail
+
+if envelope :detail :is "from" "erk"
+{redirect "me+goodedetailis at blah.com";}
+
+if envelope :detail :contains "from" "k"
+{redirect "me+goodedetailcontains at blah.com";}
+
+if envelope :detail :matches "from" "e*k"
+{redirect "me+goodedetailmatches at blah.com";}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,240 @@
+/* tree.c -- abstract syntax tree handling
+ * Larry Greenfield
+ * $Id: tree.c,v 1.11.2.3 2005/03/12 03:30:13 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include "xmalloc.h"
+
+#include "tree.h"
+#include "sieve.h"
+
+stringlist_t *new_sl(char *s, stringlist_t *n)
+{
+ stringlist_t *p = (stringlist_t *) xmalloc(sizeof(stringlist_t));
+ p->s = s;
+ p->next = n;
+ return p;
+}
+
+
+tag_t *new_tag(int type, char *s)
+{
+ tag_t *p = (tag_t *) xmalloc(sizeof(tag_t));
+ p->type = type;
+ p->arg = s;
+ return p;
+}
+
+taglist_t *new_taglist(tag_t *t, taglist_t *n)
+{
+ taglist_t *p = (taglist_t *) xmalloc(sizeof(taglist_t));
+ p->t = t;
+ p->next = n;
+ return p;
+}
+
+test_t *new_test(int type)
+{
+ test_t *p = (test_t *) xmalloc(sizeof(test_t));
+ p->type = type;
+ return p;
+}
+
+testlist_t *new_testlist(test_t *t, testlist_t *n)
+{
+ testlist_t *p = (testlist_t *) xmalloc(sizeof(testlist_t));
+ p->t = t;
+ p->next = n;
+ return p;
+}
+
+commandlist_t *new_command(int type)
+{
+ commandlist_t *p = (commandlist_t *) xmalloc(sizeof(commandlist_t));
+ p->type = type;
+ p->next = NULL;
+ return p;
+}
+
+commandlist_t *new_if(test_t *t, commandlist_t *y, commandlist_t *n)
+{
+ commandlist_t *p = (commandlist_t *) xmalloc(sizeof(commandlist_t));
+ p->type = IF;
+ p->u.i.t = t;
+ p->u.i.do_then = y;
+ p->u.i.do_else = n;
+ p->next = NULL;
+ return p;
+}
+
+void free_sl(stringlist_t *sl)
+{
+ stringlist_t *sl2;
+
+ while (sl != NULL) {
+ sl2 = sl->next;
+
+ if (sl->s) free(sl->s);
+
+ free(sl);
+ sl = sl2;
+ }
+}
+
+
+void free_test(test_t *t);
+
+void free_tl(testlist_t *tl)
+{
+ testlist_t *tl2;
+
+ while (tl) {
+ tl2 = tl->next;
+
+ if (tl->t) free_test(tl->t);
+
+ free(tl);
+ tl = tl2;
+ }
+}
+
+void free_test(test_t *t)
+{
+ if (t == NULL) return;
+
+ switch (t->type) {
+ case ANYOF:
+ case ALLOF:
+ free_tl(t->u.tl);
+ break;
+
+ case EXISTS:
+ free_sl(t->u.sl);
+ break;
+
+ case SIZE:
+ case SFALSE:
+ case STRUE:
+ break;
+
+ case HEADER:
+ free_sl(t->u.h.sl);
+ free_sl(t->u.h.pl);
+
+ break;
+
+ case ADDRESS:
+ free_sl(t->u.ae.sl);
+ free_sl(t->u.ae.pl);
+ break;
+
+ case BODY:
+ free_sl(t->u.b.content_types);
+ free_sl(t->u.b.pl);
+ break;
+
+ case NOT:
+ free_test(t->u.t);
+ break;
+ }
+
+ free(t);
+}
+
+void free_tree(commandlist_t *cl)
+{
+ commandlist_t *cl2;
+
+ while (cl != NULL) {
+ cl2 = cl->next;
+ switch (cl->type) {
+ case IF:
+ free_test(cl->u.i.t);
+ free_tree(cl->u.i.do_then);
+ free_tree(cl->u.i.do_else);
+ break;
+
+ case INCLUDE:
+ if (cl->u.inc.script) free(cl->u.inc.script);
+ break;
+
+ case FILEINTO:
+ if (cl->u.f.folder) free(cl->u.f.folder);
+ break;
+
+ case REDIRECT:
+ if (cl->u.r.address) free(cl->u.r.address);
+ break;
+
+ case REJCT:
+ if (cl->u.str) free(cl->u.str);
+ break;
+
+ case VACATION:
+ if (cl->u.v.subject) free(cl->u.v.subject);
+ if (cl->u.v.addresses) free_sl(cl->u.v.addresses);
+ if (cl->u.v.message) free(cl->u.v.message);
+ break;
+
+ case SETFLAG:
+ case ADDFLAG:
+ case REMOVEFLAG:
+ free_sl(cl->u.sl);
+ break;
+
+ case KEEP:
+ case STOP:
+ case DISCARD:
+ case RETURN:
+ break;
+
+ case NOTIFY:
+ if (cl->u.n.method) free(cl->u.n.method);
+ if (cl->u.n.id) free(cl->u.n.id);
+ if (cl->u.n.options) free_sl(cl->u.n.options);
+ if (cl->u.n.message) free(cl->u.n.message);
+ break;
+
+ case DENOTIFY:
+ if (cl->u.d.pattern) {
+#ifdef ENABLE_REGEX
+ if (cl->u.d.comptag == REGEX) {
+ regfree((regex_t *) cl->u.d.pattern);
+ }
+#endif
+ free(cl->u.d.pattern);
+ }
+ break;
+ }
+
+ free(cl);
+ cl = cl2;
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/sieve/tree.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,164 @@
+/* tree.h -- abstract syntax tree
+ * Larry Greenfield
+ * $Id: tree.h,v 1.8.2.5 2005/10/05 15:56:26 ken3 Exp $
+ */
+/***********************************************************
+ Copyright 1999 by Carnegie Mellon University
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Carnegie Mellon
+University not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+******************************************************************/
+
+#ifndef TREE_H
+#define TREE_H
+
+#include "comparator.h"
+
+/* abstract syntax tree for sieve */
+typedef struct Stringlist stringlist_t;
+typedef struct Commandlist commandlist_t;
+typedef struct Test test_t;
+typedef struct Testlist testlist_t;
+typedef struct Tag tag_t;
+typedef struct Taglist taglist_t;
+
+struct Stringlist {
+ char *s;
+ stringlist_t *next;
+};
+
+
+struct Tag {
+ int type;
+ char *arg;
+};
+
+struct Taglist {
+ tag_t *t;
+ taglist_t *next;
+};
+
+struct Test {
+ int type;
+ union {
+ testlist_t *tl; /* anyof, allof */
+ stringlist_t *sl; /* exists */
+ struct { /* it's a header test */
+ int comptag;
+ char * comparator;
+ int relation;
+ void *comprock;
+ stringlist_t *sl;
+ stringlist_t *pl;
+ } h;
+ struct { /* it's an address or envelope test */
+ int comptag;
+ char * comparator;
+ int relation;
+ void *comprock;
+ stringlist_t *sl;
+ stringlist_t *pl;
+ int addrpart;
+ } ae;
+ struct { /* it's a body test */
+ int comptag;
+ int relation;
+ char * comparator;
+ void *comprock;
+ int transform;
+ int offset;
+ stringlist_t *content_types;
+ stringlist_t *pl;
+ } b;
+ test_t *t; /* not */
+ struct { /* size */
+ int t; /* tag */
+ int n; /* param */
+ } sz;
+ } u;
+};
+
+struct Testlist {
+ test_t *t;
+ testlist_t *next;
+};
+
+struct Commandlist {
+ int type;
+ union {
+ char *str;
+ stringlist_t *sl; /* the parameters */
+ struct { /* it's an if statement */
+ test_t *t;
+ commandlist_t *do_then;
+ commandlist_t *do_else;
+ } i;
+ struct { /* it's an include action */
+ int location;
+ char *script;
+ } inc;
+ struct { /* it's a fileinto action */
+ char *folder;
+ int copy;
+ /* add stringlist_t for imap4flags */
+ } f;
+ struct { /* it's a redirect action */
+ char *address;
+ int copy;
+ } r;
+ struct { /* it's a vacation action */
+ char *subject;
+ int days;
+ stringlist_t *addresses;
+ char *message;
+ char *from;
+ char *handle;
+ int mime;
+ } v;
+ struct { /* it's a notify action */
+ char *method;
+ char *id;
+ stringlist_t *options;
+ int priority;
+ char *message;
+ } n;
+ struct { /* it's a denotify action */
+ int comptag;
+ int relation;
+ void *comprock;
+ void *pattern;
+ int priority;
+ } d;
+ } u;
+ struct Commandlist *next;
+};
+
+stringlist_t *new_sl(char *s, stringlist_t *n);
+tag_t *new_tag(int type, char *s);
+taglist_t *new_taglist(tag_t *t, taglist_t *n);
+test_t *new_test(int type);
+testlist_t *new_testlist(test_t *t, testlist_t *n);
+commandlist_t *new_command(int type);
+commandlist_t *new_if(test_t *t, commandlist_t *y, commandlist_t *n);
+
+void free_sl(stringlist_t *sl);
+void free_test(test_t *t);
+void free_tree(commandlist_t *cl);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Makefile
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+/.cvsignore/1.1/Sun Jan 6 02:03:33 2002//Tcyrus-release-2-3-7
+/snmpgen/1.15.4.3/Mon Apr 11 06:09:27 2005//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/snmp
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/snmpgen
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/snmpgen?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/snmpgen (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/snmpgen Sat Aug 26 02:00:13 2006
@@ -1,0 +1,596 @@
+#!/bin/sh
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+# $Id: snmpgen,v 1.15.4.3 2005/04/11 06:09:27 shadow Exp $
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-w", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+#Tim Martin
+# 2/10/2000
+
+use Getopt::Long;
+my $opt_extra = undef;
+
+$ret = GetOptions("extra:s");
+if (!$ret || $#ARGV != 0) {
+ print STDERR "snmpgen [--extra=trailer.in] app.snmp\n";
+ exit;
+}
+
+$infile = $ARGV[0];
+
+if ($infile =~ m|.*/(.*)\.snmp|) {
+ $basename = $1;
+} elsif ($infile =~ m|(.*)\.snmp|) {
+ $basename = $1;
+} else {
+ $basename = $infile;
+}
+print "basename $basename\n";
+$outheader = "$basename.h";
+$outprog = "$basename.c";
+
+open (INPUT,"<$infile");
+
+my $linenum = 0;
+my $found = 0;
+my $base = "NOT";
+my $num_cmds = 0;
+
+my %T; # maps names to types
+my %D; # maps names to descs
+my %O; # maps names to oids
+
+push @Varlist, "LISTEND";
+
+#first find the BASE
+while (defined ($line = <INPUT>)) {
+ $linenum++;
+
+ if ($line =~ /^#/) {
+ # comment
+ next;
+ }
+ if ($line =~ /^\s*$/) {
+ # just whitespace. ignore
+ next;
+ }
+
+ if ($line =~ /^define\s+(\w+)\s+((\d|\.|\[\w+\])+)/)
+ {
+ $defname = $1;
+ $defoid = $2;
+
+ #resolve definitions
+ while ($defoid =~ /(\[(\w+)\])/)
+ {
+ my $f = 0;
+ foreach my $a (keys %Definelist)
+ {
+ if ($a eq $2)
+ {
+ $defoid =~ s/\[\w+\]/$Definelist{$a}/;
+ $f = 1;
+ }
+ }
+ if ($f == 0) {
+ die "Unable to resolve definition $2";
+ }
+ }
+
+ $Definelist{$defname} = $defoid;
+ next;
+ }
+
+ if ($line =~ /^var\s+(\w+)/) {
+ push @Varlist, $1;
+ next;
+ }
+
+ if ($line =~ /^BASE\s+((\d+|\.|\{\w+\}|\[\w+\])+)/) {
+ $base = $1;
+
+ #resolve definitions
+ while ($base =~ /(\[(\w+)\])/)
+ {
+ my $f = 0;
+ foreach my $a (keys %Definelist)
+ {
+ if ($a eq $2)
+ {
+ $base =~ s/\[\w+\]/$Definelist{$a}/;
+ $f = 1;
+ }
+ }
+ if ($f == 0) {
+ die "Unable to resolve definition $2";
+ }
+ }
+
+ #add lowest base to register list
+ if ($base =~ /((\d+\.)+\d+)/) {
+ push @Registerlist, $1;
+ }
+
+ undef @baseVlist;
+ #xxx check all vars in varlist
+ while ($base =~ /(\{(\w+)\})/)
+ {
+ push @baseVlist, $2;
+ $base =~ s/\{\w+\}/%d/;
+ }
+
+ $basecount = 0;
+ next;
+ }
+
+ chomp $line;
+ ($type, $name, $desc, $oid, $dummy) = split(/\s*,\s*/, $line, 5);
+
+ if (!(defined $oid) || (defined $dummy)) {
+ die "syntax error on line $linenum\n";
+ }
+
+ if ($oid eq "auto") {
+ $oid = $base . ".$basecount";
+ $basecount++;
+ } else {
+ $oid = $base . "." . $oid;
+ }
+
+ $T{$name} = $type;
+ $D{$name} = $desc;
+ $O{$name} = $oid;
+ $Ovlist{$name} = [ @baseVlist ];
+}
+
+open (OUTPUT_H, ">$outheader");
+
+print OUTPUT_H <<EOF
+/* $outheader -- statistics push interface
+ * generated automatically from $infile by snmpgen
+ *
+ * Copyright 2000 Carnegie Mellon University
+ *
+ * No warranty, yadda yadda
+ */
+
+#ifndef ${basename}_H
+#define ${basename}_H
+
+EOF
+;
+
+foreach my $a (keys %Definelist)
+{
+ print OUTPUT_H "#define SNMPDEFINE_$a \"$Definelist{$a}\"\n";
+}
+
+print OUTPUT_H <<EOF
+
+#ifndef USING_SNMPGEN
+
+#define snmp_connect()
+#define snmp_close()
+#define snmp_increment(a, b)
+#define snmp_increment_args(a, b, c, d, e)
+#define snmp_set(a, b)
+#define snmp_set_str(a, b)
+#define snmp_set_oid(a, b)
+#define snmp_set_time(a, b)
+#define snmp_getdescription(a)
+#define snmp_getoid(a, b, c, d)
+#define snmp_setvariable(a, b)
+
+typedef void ${basename}_t;
+
+#else
+
+typedef enum {
+EOF
+;
+
+# Avoid putting a comma after the last item as not every C compiler
+# accepts it
+my $initialized = 0;
+foreach my $name (keys %T) {
+ print OUTPUT_H ",\n" if $initialized;
+ print OUTPUT_H " $name";
+ $initialized = 1;
+}
+
+print OUTPUT_H <<EOF
+} ${basename}_t;
+
+typedef enum {
+EOF
+;
+
+$initialized = 0;
+foreach my $name (@Varlist) {
+ print OUTPUT_H ",\n" if $initialized;
+ print OUTPUT_H " VARIABLE_$name";
+ $initialized = 1;
+}
+
+
+print OUTPUT_H <<EOF
+
+} ${basename}_variable_t;
+
+int snmp_connect(void);
+
+int snmp_close(void);
+
+/* only valid on counters */
+int snmp_increment(${basename}_t cmd, int);
+int snmp_increment_args(${basename}_t cmd, int incr, ...);
+
+/* only valid on values */
+int snmp_set(${basename}_t cmd, int);
+
+int snmp_set_str(${basename}_t cmd, char *value);
+
+int snmp_set_oid(${basename}_t cmd, char *str);
+
+int snmp_set_time(${basename}_t cmd, time_t t);
+
+const char *snmp_getdescription(${basename}_t cmd);
+
+const char *snmp_getoid(const char *name, ${basename}_t cmd, char* buf, int buflen);
+
+void snmp_setvariable(${basename}_variable_t, int);
+
+#endif /* USING_SNMPGEN */
+
+#endif /* ${basename}_H */
+
+EOF
+;
+
+close OUTPUT_H;
+
+open (OUTPUT_C,">$outprog");
+
+print OUTPUT_C <<EOF
+/* $outprog -- automatically generated from $infile by snmpgen */
+
+#ifdef USING_SNMPGEN
+
+/* We disable this code for now since it doesn't actually work and wastes
+ * resources. At some point in time, we'll make it work again as it would
+ * be useful to gather aggregate statistics on what commands are being used
+ * so we can better tune the server. This change closes bug #1191.
+ * New bug 1267 opened to re-enable the feature.
+ */
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <fcntl.h>
+#include <stdarg.h>
+
+#include "index.h"
+#include "$outheader"
+
+extern int close(int);
+
+int variable_value[$#Varlist+1];
+int variable_tmpvalue[$#Varlist+1];
+
+int varvalue(${basename}_variable_t var)
+{
+ if (variable_tmpvalue[var]!=-1)
+ return variable_tmpvalue[var];
+
+ return variable_value[var];
+}
+
+const char *snmp_getdescription(${basename}_t evt)
+{
+ switch (evt) {
+EOF
+;
+
+foreach my $a (keys %T)
+{
+ print OUTPUT_C " case $a: return $D{$a};\n";
+}
+
+print OUTPUT_C <<EOF
+ }
+ return NULL;
+}
+
+const char *snmp_getoid(const char *name __attribute__((unused)),
+ ${basename}_t evt, char *buf, int buflen)
+{
+ switch (evt) {
+EOF
+;
+
+foreach my $a (keys %T)
+{
+ print OUTPUT_C " case $a: snprintf(buf,buflen,\"$O{$a}\"";
+ foreach my $b (@{ $Ovlist{$a} })
+ {
+ print OUTPUT_C ",varvalue(VARIABLE_$b)";
+ }
+ print OUTPUT_C "); return buf;\n";
+
+}
+
+
+$snmp.= " default: return \"0.0.0\";\n";
+$snmp.= " }\n";
+$snmp.= "}\n";
+
+print OUTPUT_C <<EOF
+ }
+ return NULL;
+}
+
+#define SOCK_PATH "/tmp/.snmp_door"
+
+static int mysock = -1;
+static struct sockaddr_un remote;
+static int sockaddr_len = 0;
+
+static void snmp_send(char *str)
+{
+ if (mysock == -1) return;
+
+ if (sendto(mysock, str, strlen(str), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+ return;
+ }
+
+ return;
+}
+
+int snmp_connect(void)
+{
+ int s;
+ int fdflags;
+ int lup;
+
+ if ((s = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
+ return 1;
+ }
+
+ for (lup=0;lup < $#Varlist+1; lup++)
+ variable_tmpvalue[lup] = -1;
+
+ remote.sun_family = AF_UNIX;
+ strlcpy(remote.sun_path, SOCK_PATH, sizeof(remote.sun_path));
+ sockaddr_len = strlen(remote.sun_path) + sizeof(remote.sun_family);
+
+ /* put us in non-blocking mode */
+ fdflags = fcntl(s, F_GETFD, 0);
+ if (fdflags != -1) fdflags = fcntl(s, F_SETFL, O_NONBLOCK | fdflags);
+ if (fdflags == -1) { close(s); return -1; }
+
+ mysock = s;
+EOF
+;
+
+foreach my $oid (@Registerlist) {
+ print OUTPUT_C " snmp_send(\"R $oid\\n\");\n";
+}
+
+
+print OUTPUT_C <<EOF
+ return 0;
+}
+
+int snmp_close(void)
+{
+ if (mysock > -1)
+ close(mysock);
+
+ return 0;
+}
+
+int snmp_increment_args(${basename}_t cmd, int incr, ...)
+{
+ char tosend[256]; /* xxx UDP max size??? */
+ char buf[256];
+
+ va_list ap; /* varargs thing */
+ ${basename}_variable_t vval;
+ int ival;
+
+ if (mysock == -1) return 1;
+
+ va_start(ap, incr);
+
+ do {
+ vval = va_arg(ap, ${basename}_variable_t); /* get the next arg */
+
+ if (vval!=VARIABLE_LISTEND)
+ {
+ ival = va_arg(ap, int); /* get the next arg */
+ variable_tmpvalue[vval] = ival;
+ }
+
+ } while ( vval != VARIABLE_LISTEND);
+
+ va_end(ap);
+
+ snprintf(tosend, sizeof(tosend),"C %s %d\\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), incr);
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+ return 1;
+ }
+
+ /* set tmp variables back */
+ va_start(ap, incr);
+
+ do {
+ vval = va_arg(ap, ${basename}_variable_t); /* get the next arg */
+
+ if (vval!=VARIABLE_LISTEND)
+ {
+ ival = va_arg(ap, int); /* get the next arg */
+ variable_tmpvalue[vval] = -1;
+ }
+
+ } while ( vval != VARIABLE_LISTEND);
+
+ va_end(ap);
+
+ return 0;
+}
+
+int snmp_increment(${basename}_t cmd, int incr)
+{
+ char tosend[256]; /* xxx UDP max size??? */
+ char buf[256];
+
+ if (mysock == -1) return 1;
+
+ snprintf(tosend, sizeof(tosend),"C %s %d\\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), incr);
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+ return 1;
+ }
+
+ return 0;
+}
+
+int snmp_set(${basename}_t cmd, int value)
+{
+ char tosend[256];
+ char buf[256];
+
+ if (mysock == -1) return 1;
+
+ snprintf(tosend, sizeof(tosend),"I %s %d\\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), value);
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+ return 1;
+ }
+
+ return 1;
+}
+
+int snmp_set_str(${basename}_t cmd, char *value)
+{
+ char tosend[256];
+ char buf[256];
+
+ if (mysock == -1) return 1;
+
+ snprintf(tosend, sizeof(tosend),"S %s %s\\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), value);
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+ return 1;
+ }
+
+ return 1;
+}
+
+int snmp_set_time(${basename}_t cmd, time_t t)
+{
+ char tosend[256];
+ char buf[256];
+
+ if (mysock == -1) return 1;
+
+ snprintf(tosend, sizeof(tosend),"T %s %lu\\n",snmp_getoid(NULL,cmd,buf,sizeof(buf)), t);
+
+ if (sendto(mysock, tosend, strlen(tosend), 0, (struct sockaddr *) &remote, sockaddr_len) == -1) {
+ return 1;
+ }
+
+ return 1;
+}
+
+/* should use SNMPDEFINE's as parameter */
+int snmp_set_oid(${basename}_t cmd, char *str)
+{
+ return snmp_set_str(cmd,str);
+}
+
+void snmp_setvariable(${basename}_variable_t name, int value)
+{
+ variable_value[name] = value;
+}
+
+#endif
+
+
+EOF
+;
+
+if (defined $opt_extra) {
+ open (INPUT_IN,"<$opt_extra");
+ while( <INPUT_IN> )
+ {
+ print OUTPUT_C;
+ }
+ close INPUT_IN;
+}
+
+close OUTPUT_C;
+
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/snmp/snmpgen
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,11 @@
+/Makefile.in/1.10/Tue May 23 20:56:48 2000//Tcyrus-release-2-3-7
+/README/1.1/Tue Mar 15 23:27:25 1994//Tcyrus-release-2-3-7
+/logger.1/1.2/Tue May 23 20:56:48 2000//Tcyrus-release-2-3-7
+/logger.c/1.3/Thu Feb 13 20:15:57 2003//Tcyrus-release-2-3-7
+/syslog.3/1.2/Tue May 23 20:56:48 2000//Tcyrus-release-2-3-7
+/syslog.c/1.4/Wed Jun 4 03:27:56 2003//Tcyrus-release-2-3-7
+/syslog.conf/1.2/Wed Oct 19 15:57:13 1994//Tcyrus-release-2-3-7
+/syslog.h/1.3/Thu Feb 13 20:15:57 2003//Tcyrus-release-2-3-7
+/syslogd.8/1.2/Tue May 23 20:56:49 2000//Tcyrus-release-2-3-7
+/syslogd.c/1.3/Thu Feb 13 20:15:57 2003//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/syslog
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,89 @@
+# Makefile for syslog replacement
+#
+# @configure_input@
+#
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+
+INSTALL = @INSTALL@
+RANLIB = @RANLIB@
+
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+SHELL = /bin/sh
+MAKEDEPEND = @MAKEDEPEND@
+
+all: libsyslog.a syslogd
+
+install:
+ @echo "Install syslogd and syslog.conf as appropriate"
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
+
+libsyslog.a: syslog.o
+ ar cr libsyslog.a syslog.o
+ $(RANLIB) libsyslog.a
+
+syslogd: syslogd.o
+ $(CC) $(LDFLAGS) -o syslogd syslogd.o $(LIBS)
+
+clean:
+ rm -f *.o *.a Makefile.bak
+
+distclean: clean
+ rm -f Makefile
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/README
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/README?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/README (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/README Sat Aug 26 02:00:13 2006
@@ -1,0 +1,41 @@
+$Revision: 1.1 $
+
+InterNetNews uses the "three-arg" version of syslog. That version is
+standard with many systems (4.3BSD, SunOS4.x, etc). Some vendors have
+not yet upgraded, however. The principal difference between the two
+versions is that the current syslog divides reports up into "facilities."
+For example, news reports can be filed separately from mail or login
+report.
+
+If your system is running the older version of syslog, you should complain
+to your vendor. I also encourage you to bring up the syslog that is included
+in this directory and replace what is running on your system. The sources
+are from the freely-redistributable BSD sources, and the syslog.conf file
+matches the old actions pretty closely.
+
+If you can't replace the syslog on your machine, you can run two syslog
+daemons for awhile. Edit syslog.c and syslogd.c so that
+ #define _PATH_LOGNAME "/dev/log"
+points to something like "/dev/newsyslog". In syslogd.c you should also
+do the following
+ #define NO_INET_SOCKET
+this will prevent the new syslog daemon from listening on the Internet
+port (the old syslog daemon is presumably doing that). You should also do
+ #undef _PATH_KLOG
+which will tell the daemon to not try to read Unix kernel log messages.
+Change
+ #define _PATH_LOGCONF "/etc/syslog.conf"
+ #define _PATH_LOGPID "/etc/syslog.pid"
+to something like "/etc/newsyslog.conf" and "/etc/newsyslog.pid"
+
+Finally, install the new syslogd and make sure that it is started at
+system boot time.
+
+Good luck. I haven't tried this -- I replaced the daemon on my machines --
+but it should work without too many problems.
+
+On machines without Unix-domain sockets you can just add this line to
+the top of syslog.c:
+ #define INET_SYSLOG
+and add syslog to the INN library as exlained in the installation manual.
+ /rich $alz
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.1
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.1?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.1 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.1 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,133 @@
+.\"
+.\" Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Revision: 1.2 $
+.\" Modified by Rich $alz <rsalz at osf.org> to be more portable to older
+.\" systems.
+.\" Copyright (c) 1983, 1990 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted provided
+.\" that: (1) source distributions retain this entire copyright notice and
+.\" comment, and (2) distributions including binaries display the following
+.\" acknowledgement: ``This product includes software developed by the
+.\" University of California, Berkeley and its contributors'' in the
+.\" documentation or other materials provided with the distribution and in
+.\" all advertising materials mentioning features or use of this software.
+.\" Neither the name of the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" @(#)logger.1 6.6 (Berkeley) 7/24/90
+.\"
+.TH LOGGER 1 "July 24, 1990"
+.SH NAME
+logger \- make entries in the system log
+.SH SYNOPSIS
+.B logger
+[
+.B \-i
+]
+[
+.B \-s
+]
+[
+.BI \-f file
+]
+[
+.BI \-p pri
+]
+[
+.BI \-t tag
+]
+.I message...
+.SH DESCRIPTION
+.I Logger
+provides a shell command interface to the
+.IR syslog (3)
+system log module.
+.PP
+Options:
+.TP
+.B \-i
+Log the process id of the logger process with each line.
+.TP
+.B \-s
+Log the message to standard error, as well as the system log.
+.TP
+.BI \-f file
+Log the specified file.
+.TP
+.BI \-p pri
+Enter the message with the specified priority.
+The priority may be specified numerically or as a ``facility.level'' pair.
+For example, ``\-p local3.info'' logs the message(s) as
+.IR info rmational
+level in the
+.I local3
+facility.
+The default is ``user.notice.''
+.TP
+.BI \-t tag
+Mark every line in the log with the specified
+.IR tag .
+.TP
+.I message
+Write the message to log; if not specified, and the ``\-f'' flag is not
+provided, standard input is logged.
+.PP
+The
+.I logger
+utility exits 0 on success, and >0 if an error occurs.
+.SH EXAMPLES
+.RS
+.nf
+logger System rebooted
+
+logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc
+.fi
+.DE
+.SH "SEE ALSO"
+.syslog(3),
+syslogd(8)
+.SH STANDARDS
+The logger function is expected to be POSIX 1003.2 compatible.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/logger.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,235 @@
+/* $Revision: 1.3 $
+** Modified by Rich $alz <rsalz at osf.org> to be more portable to older
+** systems.
+*/
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that: (1) source distributions retain this entire copyright
+ * notice and comment, and (2) distributions including binaries display
+ * the following acknowledgement: ``This product includes software
+ * developed by the University of California, Berkeley and its contributors''
+ * in the documentation or other materials provided with the distribution
+ * and in all advertising materials mentioning features or use of this
+ * software. Neither the name of the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1983 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)logger.c 6.14 (Berkeley) 6/1/90";
+#endif /* not lint */
+
+#include <stdio.h>
+#define SYSLOG_NAMES
+#include "syslog.h"
+#include <ctype.h>
+
+/*
+** LOGGER -- read and log utility
+**
+** This routine reads from an input and arranges to write the
+** result on the system log, along with a useful tag.
+*/
+
+/*
+** Return a string representation of errno.
+*/
+static char *
+xstrerror(e)
+ int e;
+{
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+ static char buff[30];
+
+ if (e >= 0 && e < sys_nerr)
+ return sys_errlist[e];
+ (void)sprintf(buff, "Error code %d\n", e);
+ return buff;
+}
+
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ extern char *optarg;
+ extern int errno, optind;
+ int pri = LOG_NOTICE;
+ int ch, logflags = 0;
+ char *tag, buf[1024], *getlogin();
+
+ tag = NULL;
+ while ((ch = getopt(argc, argv, "f:ip:st:")) != EOF)
+ switch((char)ch) {
+ case 'f': /* file to log */
+ if (freopen(optarg, "r", stdin) == NULL) {
+ (void)fprintf(stderr, "logger: %s: %s.\n",
+ optarg, xstrerror(errno));
+ exit(1);
+ }
+ break;
+ case 'i': /* log process id also */
+ logflags |= LOG_PID;
+ break;
+ case 'p': /* priority */
+ pri = pencode(optarg);
+ break;
+ case 's': /* log to standard error */
+ logflags |= LOG_PERROR;
+ break;
+ case 't': /* tag */
+ tag = optarg;
+ break;
+ case '?':
+ default:
+ usage();
+ }
+ argc -= optind;
+ argv += optind;
+
+ /* setup for logging */
+ openlog(tag ? tag : getlogin(), logflags, 0);
+ (void) fclose(stdout);
+
+ /* log input line if appropriate */
+ if (argc > 0) {
+ register char *p, *endp;
+ int len;
+
+ for (p = buf, endp = buf + sizeof(buf) - 2; *argv;) {
+ len = strlen(*argv);
+ if (p + len > endp && p > buf) {
+ syslog(pri, "%s", buf);
+ p = buf;
+ }
+ if (len > sizeof(buf) - 1)
+ syslog(pri, "%s", *argv++);
+ else {
+ if (p != buf)
+ *p++ = ' ';
+ bcopy(*argv++, p, len);
+ *(p += len) = '\0';
+ }
+ }
+ if (p != buf)
+ syslog(pri, "%s", buf);
+ exit(0);
+ }
+
+ /* main loop */
+ while (fgets(buf, sizeof(buf), stdin) != NULL)
+ syslog(pri, "%s", buf);
+
+ exit(0);
+}
+
+
+/*
+ * Decode a symbolic name to a numeric value
+ */
+pencode(s)
+ register char *s;
+{
+ char *save;
+ int fac, lev;
+
+ for (save = s; *s && *s != '.'; ++s);
+ if (*s) {
+ *s = '\0';
+ fac = decode(save, facilitynames);
+ if (fac < 0)
+ bailout("unknown facility name: ", save);
+ *s++ = '.';
+ }
+ else {
+ fac = 0;
+ s = save;
+ }
+ lev = decode(s, prioritynames);
+ if (lev < 0)
+ bailout("unknown priority name: ", save);
+ return ((lev & LOG_PRIMASK) | (fac & LOG_FACMASK));
+}
+
+
+decode(name, codetab)
+ char *name;
+ CODE *codetab;
+{
+ register CODE *c;
+
+ if (isdigit(*name))
+ return (atoi(name));
+
+ for (c = codetab; c->c_name; c++)
+ if (!strcasecmp(name, c->c_name))
+ return (c->c_val);
+
+ return (-1);
+}
+
+bailout(msg, arg)
+ char *msg, *arg;
+{
+ fprintf(stderr, "logger: %s%s\n", msg, arg);
+ exit(1);
+}
+
+usage()
+{
+ fputs("logger: [-i] [-f file] [-p pri] [-t tag] [ message ... ]\n",
+ stderr);
+ exit(1);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.3
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.3?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.3 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.3 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,278 @@
+.\"
+.\" Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Revision: 1.2 $
+.\" Copyright (c) 1985 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted provided
+.\" that: (1) source distributions retain this entire copyright notice and
+.\" comment, and (2) distributions including binaries display the following
+.\" acknowledgement: ``This product includes software developed by the
+.\" University of California, Berkeley and its contributors'' in the
+.\" documentation or other materials provided with the distribution and in
+.\" all advertising materials mentioning features or use of this software.
+.\" Neither the name of the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" @(#)syslog.3 6.13 (Berkeley) 6/23/90
+.\"
+.TH SYSLOG 3 "June 23, 1990"
+.UC 5
+.SH NAME
+syslog, openlog, closelog, setlogmask, vsyslog \- control system log
+.SH SYNOPSIS
+.B "#include <syslog.h>
+.PP
+.B "openlog(ident, logopt, facility)
+.br
+.B "char *ident;
+.PP
+.B "syslog(priority, message, parameters ... )
+.br
+.B "int priority;
+.br
+.B "char *message;
+.PP
+.B "#include <varargs.h>
+.br
+.B "vsyslog(priority, message, args)
+.br
+.B "int priority;
+.br
+.B "char *message;
+.br
+.B "va_list args;
+.PP
+.B "closelog()
+.PP
+.B "setlogmask(maskpri)
+.SH DESCRIPTION
+.I Syslog
+arranges to write
+.I message
+onto the system log maintained by
+.IR syslogd (8).
+The message is tagged with
+.IR priority .
+The message looks like a
+.IR printf (3)
+string except that
+.B %m
+is replaced by the current error message (as referenced by
+.IR errno ).
+A trailing newline is added if needed.
+An alternate form, in which the arguments have already been captured
+using the variable-length argument facilities of
+.IR varargs (3),
+is available under the name
+.IR vsyslog .
+.PP
+This message will be read by
+.IR syslogd (8)
+and written to the system console, log files, or forwarded to
+.I syslogd
+on another host as appropriate.
+.PP
+Priorities are encoded as a
+.I facility
+and a
+.IR level .
+The facility describes the part of the system
+generating the message.
+The level is selected from an ordered list:
+.TP
+LOG_ALERT
+A condition that should be corrected immediately,
+such as a corrupted system database.
+.TP
+LOG_CRIT
+Critical conditions,
+e.g., hard device errors.
+.TP
+LOG_DEBUG
+Messages that contain information
+normally of use only when debugging a program.
+.TP
+LOG_EMERG
+A panic condition.
+This is normally broadcast to all users.
+.TP
+LOG_ERR
+Errors.
+.TP
+LOG_INFO
+Informational messages.
+.TP
+LOG_NOTICE
+Conditions that are not error conditions,
+but should possibly be handled specially.
+.TP
+LOG_WARNING
+Warning messages.
+.PP
+If
+.I syslog
+cannot pass the message to
+.IR syslogd ,
+it will attempt to write the message to the console (``/dev/console'')
+if the LOG_CONS option is set (see below).
+.PP
+If special processing is needed,
+.I openlog
+can be called to initialize the log file.
+The parameter
+.I ident
+is a string that is prepended to every message.
+.I Logopt
+is a bit field indicating logging options.
+Current values for
+.I logopt
+are:
+.TP
+LOG_CONS
+If unable to send the message to
+.IR syslogd ,
+write it to the console.
+.TP
+LOG_NDELAY
+Open the connection to
+.I syslogd
+immediately.
+Normally the open is delayed
+until the first message is logged.
+Useful for programs that need to manage the
+order in which file descriptors are allocated.
+.TP
+LOG_PERROR
+Write the message to stderr as well to the system log.
+.TP
+LOG_PID
+Log the process id with each message:
+useful for identifying instantiations of daemons.
+.PP
+The
+.I facility
+parameter encodes a default facility to be assigned to all messages
+that do not have an explicit facility encoded:
+.TP
+LOG_AUTH
+The authorization system:
+.IR login (1),
+.IR su (1),
+.IR getty (8),
+etc.
+.TP
+LOG_CRON
+The clock daemon.
+.TP
+LOG_DAEMON
+System daemons, such as
+.IR ftpd (8),
+.IR routed (8),
+etc, that are not provided for explicitly by other facilities.
+.TP
+LOG_KERN
+Messages generated by the kernel.
+These cannot be generated by any user processes.
+.TP
+LOG_LPR
+The line printer spooling system:
+.IR lpr (1),
+.IR lpc (8),
+.IR lpd (8),
+etc.
+.TP
+LOG_MAIL
+The mail system.
+.TP
+LOG_NEWS
+The network news system.
+.TP
+LOG_SYSLOG
+Messages generated internally by
+.IR syslogd (8).
+.TP
+LOG_USER
+Messages generated by random user processes.
+This is the default facility identifier if none is specified.
+.TP
+LOG_UUCP
+The uucp system.
+.TP
+LOG_LOCAL0
+Reserved for local use.
+Similarly for LOG_LOCAL1 through LOG_LOCAL7.
+.PP
+.I Closelog
+can be used to close the log file.
+.PP
+.I Setlogmask
+sets the log priority mask to
+.I maskpri
+and returns the previous mask.
+Calls to
+.I syslog
+with a priority not set in
+.I maskpri
+are rejected.
+The mask for an individual priority
+.I pri
+is calculated by the macro LOG_MASK(\fIpri\fP);
+the mask for all priorities up to and including
+.I toppri
+is given by the macro LOG_UPTO(\fItoppri\fP).
+The default allows all priorities to be logged.
+.SH EXAMPLES
+.nf
+syslog(LOG_ALERT, "who: internal error 23");
+
+openlog("ftpd", LOG_PID, LOG_DAEMON);
+setlogmask(LOG_UPTO(LOG_ERR));
+syslog(LOG_INFO, "Connection from host %d", CallingHost);
+
+syslog(LOG_INFO|LOG_LOCAL2, "foobar error: %m");
+.fi
+.SH "SEE ALSO"
+logger(1),
+syslogd(8)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,316 @@
+/*
+ * Copyright (c) 1983, 1988, 1993
+ * The Regents of the University of California. 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University 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.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)syslog.c 8.8 (Berkeley) 8/30/95";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+#include <syslog.h>
+#include <netdb.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#ifdef BSD4_4
+# include <paths.h>
+#else
+# ifndef _PATH_CONSOLE
+# define _PATH_CONSOLE "/dev/console"
+# endif
+# ifndef _PATH_LOG
+# define _PATH_LOG "/dev/log"
+# endif
+#endif
+
+#ifdef HAVE_STDARG_H
+# include <stdarg.h>
+#else
+# include <varargs.h>
+# define const /* */
+#endif
+
+#ifndef USESNPRINTF
+# if defined(BSD4_4)
+# define USESNPRINTF 1 /* has snprintf(3), vsnprintf(3), etc. */
+# else
+# define USESNPRINTF 0 /* cheesy old C library */
+# endif
+#endif
+
+#ifndef LOG_PRI
+# define LOG_PRI(p) ((p) & LOG_PRIMASK)
+#endif
+
+#ifndef LOG_PERROR
+# define LOG_PERROR 0
+#endif
+
+#define BUFSLOP 1024 /* overflow space */
+
+static int LogFile = -1; /* fd for log */
+static int connected; /* have done connect */
+static int LogStat = 0; /* status bits, set by openlog() */
+static const char *LogTag = NULL; /* string to tag the entry with */
+static int LogFacility = LOG_USER; /* default facility code */
+static int LogMask = 0xff; /* mask of priorities to be logged */
+#if defined(BSD4_4)
+extern char *__progname; /* Program name, from crt0. */
+#else
+char *__progname = NULL;
+#endif
+
+/*
+ * syslog, vsyslog --
+ * print message on log file; output is intended for syslogd(8).
+ */
+void
+#if __STDC__
+syslog(int pri, const char *fmt, ...)
+#else
+syslog(pri, fmt, va_alist)
+ int pri;
+ char *fmt;
+ va_dcl
+#endif
+{
+ va_list ap;
+ extern void vsyslog();
+
+#if __STDC__
+ va_start(ap, fmt);
+#else
+ va_start(ap);
+#endif
+ vsyslog(pri, fmt, ap);
+ va_end(ap);
+}
+
+void
+vsyslog(pri, fmt, ap)
+ int pri;
+ register const char *fmt;
+ va_list ap;
+{
+ register int cnt;
+ register char ch, *p, *t;
+ time_t now;
+ int fd, saved_errno;
+ int panic = 0;
+ static int maxsend = BUFSIZ;
+ char *stdp, fmt_cpy[1024], tbuf[BUFSIZ + BUFSLOP];
+ extern void openlog();
+
+#define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
+ /* Check for invalid bits. */
+ if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) {
+ syslog(INTERNALLOG,
+ "syslog: unknown facility/priority: %x", pri);
+ pri &= LOG_PRIMASK|LOG_FACMASK;
+ }
+
+ /* Check priority against setlogmask values. */
+ if (!(LOG_MASK(LOG_PRI(pri)) & LogMask))
+ return;
+
+ saved_errno = errno;
+
+ /* Set default facility if none specified. */
+ if ((pri & LOG_FACMASK) == 0)
+ pri |= LogFacility;
+
+ /* Get connected. */
+ if (!connected)
+ openlog(LogTag, LogStat | LOG_NDELAY, 0);
+
+ /* Build the message. */
+ (void)time(&now);
+ sprintf(tbuf, "<%d>", pri);
+ p = tbuf + strlen(tbuf);
+ strftime(p, sizeof (tbuf) - (p - tbuf), "%h %d %T ", localtime(&now));
+ p += strlen(p);
+ stdp = p;
+ if (LogTag == NULL)
+ LogTag = __progname;
+ if (LogTag != NULL) {
+ sprintf(p, "%s", LogTag);
+ p += strlen(p);
+ }
+ if (LogStat & LOG_PID) {
+ sprintf(p, "[%d]", getpid());
+ p += strlen(p);
+ }
+ if (LogTag != NULL) {
+ *p++ = ':';
+ *p++ = ' ';
+ }
+
+ /* Substitute error message for %m. */
+ for (t = fmt_cpy; ch = *fmt; ++fmt)
+ if (ch == '%' && fmt[1] == 'm') {
+ ++fmt;
+ sprintf(t, "%s", strerror(saved_errno));
+ t += strlen(t);
+ } else
+ *t++ = ch;
+ *t = '\0';
+
+#if USESNPRINTF
+ cnt = maxsend - (p - tbuf) + 1;
+ p += vsnprintf(p, cnt, fmt_cpy, ap);
+ cnt = p - tbuf;
+#else
+ vsprintf(p, fmt_cpy, ap);
+ p += strlen(p);
+ cnt = p - tbuf;
+ if (cnt > sizeof tbuf) {
+ /* Panic condition. */
+ panic = 1;
+ }
+ if (cnt > maxsend)
+ cnt = maxsend;
+#endif
+
+ /* Output to stderr if requested. */
+ if (LogStat & LOG_PERROR) {
+ struct iovec iov[2];
+ register struct iovec *v = iov;
+
+ v->iov_base = stdp;
+ v->iov_len = cnt - (stdp - tbuf);
+ ++v;
+ v->iov_base = "\n";
+ v->iov_len = 1;
+ (void)writev(STDERR_FILENO, iov, 2);
+ }
+
+ /* Output the message to the local logger. */
+ for (;;) {
+ if (send(LogFile, tbuf, cnt, 0) >= 0)
+ goto done;
+ if (errno != EMSGSIZE || maxsend <= 256)
+ break;
+
+ /* Message was too large -- back it off. */
+ do {
+ maxsend -= 128;
+ } while (cnt < maxsend && maxsend > 256);
+ cnt = maxsend;
+ }
+
+ /*
+ * Output the message to the console; don't worry about blocking,
+ * if console blocks everything will. Make sure the error reported
+ * is the one from the syslogd failure.
+ */
+ if (LogStat & LOG_CONS &&
+ (fd = open(_PATH_CONSOLE, O_WRONLY, 0)) >= 0) {
+ (void)strcat(tbuf, "\r\n");
+ cnt += 2;
+ p = strchr(tbuf, '>') + 1;
+ (void)write(fd, p, cnt - (p - tbuf));
+ (void)close(fd);
+ }
+
+ done:
+#if !USESNPRINTF
+ /*
+ * If we had a buffer overrun, log a panic and abort.
+ * We can't return because our stack is probably toast.
+ */
+ if (panic) {
+ syslog(LOG_EMERG, "SYSLOG BUFFER OVERRUN -- EXITING");
+ abort();
+ }
+#endif
+}
+
+static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
+
+void
+openlog(ident, logstat, logfac)
+ const char *ident;
+ int logstat, logfac;
+{
+ if (ident != NULL)
+ LogTag = ident;
+ LogStat = logstat;
+ if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
+ LogFacility = logfac;
+
+ if (LogFile == -1) {
+ SyslogAddr.sa_family = AF_UNIX;
+ (void)strncpy(SyslogAddr.sa_data, _PATH_LOG,
+ sizeof(SyslogAddr.sa_data));
+ if (LogStat & LOG_NDELAY) {
+ if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1)
+ return;
+ (void)fcntl(LogFile, F_SETFD, 1);
+ }
+ }
+ if (LogFile != -1 && !connected)
+ if (connect(LogFile, &SyslogAddr, sizeof(SyslogAddr)) == -1) {
+ (void)close(LogFile);
+ LogFile = -1;
+ } else
+ connected = 1;
+}
+
+void
+closelog()
+{
+ (void)close(LogFile);
+ LogFile = -1;
+ connected = 0;
+}
+
+/* setlogmask -- set the log mask level */
+int
+setlogmask(pmask)
+ int pmask;
+{
+ int omask;
+
+ omask = LogMask;
+ if (pmask != 0)
+ LogMask = pmask;
+ return (omask);
+}
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.conf
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.conf?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.conf (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.conf Sat Aug 26 02:00:13 2006
@@ -1,0 +1,10 @@
+## Sample syslog.conf file for folks not used to the new syslog.
+##
+
+## This matches typical old-style config. Log everything to a
+## file and send warnings or worse to root.
+*.notice;news.err /usr/adm/syslog
+*.alert root
+
+local6.debug /usr/adm/imapd.log
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslog.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,186 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* $Revision: 1.3 $
+ * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution is only permitted until one year after the first shipment
+ * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and
+ * binary forms are permitted provided that: (1) source distributions retain
+ * this entire copyright notice and comment, and (2) distributions including
+ * binaries display the following acknowledgement: This product includes
+ * software developed by the University of California, Berkeley and its
+ * contributors'' in the documentation or other materials provided with the
+ * distribution and in all advertising materials mentioning features or use
+ * of this software. Neither the name of the University 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 AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @(#)syslog.h 7.16 (Berkeley) 6/28/90
+ */
+
+/*
+ * priorities/facilities are encoded into a single 32-bit quantity, where the
+ * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
+ * (0-big number). Both the priorities and the facilities map roughly
+ * one-to-one to strings in the syslogd(8) source code. This mapping is
+ * included in this file.
+ *
+ * priorities (these are ordered)
+ */
+#define LOG_EMERG 0 /* system is unusable */
+#define LOG_ALERT 1 /* action must be taken immediately */
+#define LOG_CRIT 2 /* critical conditions */
+#define LOG_ERR 3 /* error conditions */
+#define LOG_WARNING 4 /* warning conditions */
+#define LOG_NOTICE 5 /* normal but significant condition */
+#define LOG_INFO 6 /* informational */
+#define LOG_DEBUG 7 /* debug-level messages */
+
+#define LOG_PRIMASK 0x007 /* mask to extract priority part (internal) */
+ /* extract priority */
+#define LOG_PRI(p) ((p) & LOG_PRIMASK)
+#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
+
+#ifdef SYSLOG_NAMES
+#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */
+ /* mark "facility" */
+#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0)
+typedef struct _code {
+ char *c_name;
+ int c_val;
+} CODE;
+
+CODE prioritynames[] = {
+ "alert", LOG_ALERT,
+ "crit", LOG_CRIT,
+ "debug", LOG_DEBUG,
+ "emerg", LOG_EMERG,
+ "err", LOG_ERR,
+ "error", LOG_ERR, /* DEPRECATED */
+ "info", LOG_INFO,
+ "none", INTERNAL_NOPRI, /* INTERNAL */
+ "notice", LOG_NOTICE,
+ "panic", LOG_EMERG, /* DEPRECATED */
+ "warn", LOG_WARNING, /* DEPRECATED */
+ "warning", LOG_WARNING,
+ NULL, -1,
+};
+#endif
+
+/* facility codes */
+#define LOG_KERN (0<<3) /* kernel messages */
+#define LOG_USER (1<<3) /* random user-level messages */
+#define LOG_MAIL (2<<3) /* mail system */
+#define LOG_DAEMON (3<<3) /* system daemons */
+#define LOG_AUTH (4<<3) /* security/authorization messages */
+#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
+#define LOG_LPR (6<<3) /* line printer subsystem */
+#define LOG_NEWS (7<<3) /* network news subsystem */
+#define LOG_UUCP (8<<3) /* UUCP subsystem */
+#define LOG_CRON (15<<3) /* clock daemon */
+ /* other codes through 15 reserved for system use */
+#define LOG_LOCAL0 (16<<3) /* reserved for local use */
+#define LOG_LOCAL1 (17<<3) /* reserved for local use */
+#define LOG_LOCAL2 (18<<3) /* reserved for local use */
+#define LOG_LOCAL3 (19<<3) /* reserved for local use */
+#define LOG_LOCAL4 (20<<3) /* reserved for local use */
+#define LOG_LOCAL5 (21<<3) /* reserved for local use */
+#define LOG_LOCAL6 (22<<3) /* reserved for local use */
+#define LOG_LOCAL7 (23<<3) /* reserved for local use */
+
+#define LOG_NFACILITIES 24 /* current number of facilities */
+#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
+ /* facility of pri */
+#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
+
+#ifdef SYSLOG_NAMES
+CODE facilitynames[] = {
+ "auth", LOG_AUTH,
+ "cron", LOG_CRON,
+ "daemon", LOG_DAEMON,
+ "kern", LOG_KERN,
+ "lpr", LOG_LPR,
+ "mail", LOG_MAIL,
+ "mark", INTERNAL_MARK, /* INTERNAL */
+ "news", LOG_NEWS,
+ "security", LOG_AUTH, /* DEPRECATED */
+ "syslog", LOG_SYSLOG,
+ "user", LOG_USER,
+ "uucp", LOG_UUCP,
+ "local0", LOG_LOCAL0,
+ "local1", LOG_LOCAL1,
+ "local2", LOG_LOCAL2,
+ "local3", LOG_LOCAL3,
+ "local4", LOG_LOCAL4,
+ "local5", LOG_LOCAL5,
+ "local6", LOG_LOCAL6,
+ "local7", LOG_LOCAL7,
+ NULL, -1,
+};
+#endif
+
+#ifdef KERNEL
+#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */
+#endif
+
+/*
+ * arguments to setlogmask.
+ */
+#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
+#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
+
+/*
+ * Option flags for openlog.
+ *
+ * LOG_ODELAY no longer does anything.
+ * LOG_NDELAY is the inverse of what it used to be.
+ */
+#define LOG_PID 0x01 /* log the pid with each message */
+#define LOG_CONS 0x02 /* log on the console if errors in sending */
+#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
+#define LOG_NDELAY 0x08 /* don't delay open */
+#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
+#define LOG_PERROR 0x20 /* log to stderr as well */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.8
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.8?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.8 (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.8 Sat Aug 26 02:00:13 2006
@@ -1,0 +1,237 @@
+.\"
+.\" Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+.\" endorse or promote products derived from this software without
+.\" prior written permission. For permission or any other legal
+.\" details, please contact
+.\" Office of Technology Transfer
+.\" Carnegie Mellon University
+.\" 5000 Forbes Avenue
+.\" Pittsburgh, PA 15213-3890
+.\" (412) 268-4387, fax: (412) 268-7395
+.\" tech-transfer at andrew.cmu.edu
+.\"
+.\" 4. Redistributions of any form whatsoever must retain the following
+.\" acknowledgment:
+.\" "This product includes software developed by Computing Services
+.\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+.\"
+.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $Revision: 1.2 $
+.\" Copyright (c) 1983, 1986 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms are permitted provided
+.\" that: (1) source distributions retain this entire copyright notice and
+.\" comment, and (2) distributions including binaries display the following
+.\" acknowledgement: ``This product includes software developed by the
+.\" University of California, Berkeley and its contributors'' in the
+.\" documentation or other materials provided with the distribution and in
+.\" all advertising materials mentioning features or use of this software.
+.\" Neither the name of the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" @(#)syslogd.8 6.8 (Berkeley) 6/27/90
+.\"
+.TH SYSLOGD 8 "June 27, 1990"
+.UC 5
+.SH NAME
+syslogd \- log systems messages
+.SH SYNOPSIS
+.B syslogd
+[
+.BI \-f configfile
+] [
+.BI \-m markinterval
+] [
+.B \-d
+]
+.SH DESCRIPTION
+.I Syslogd
+reads and logs messages into a set of files
+described by the configuration file
+/etc/syslog.conf.
+Each message is one line.
+A message can contain a priority code,
+marked by a number in angle braces
+at the beginning of the line.
+Priorities are defined in
+.RI < sys/syslog.h >.
+.I Syslogd
+reads from the UNIX domain socket
+.IR /dev/log ,
+from an Internet domain socket specified in
+.IR /etc/services ,
+and from the special device
+.I /dev/klog
+(to read kernel messages).
+.PP
+.I Syslogd
+configures when it starts up
+and whenever it receives a hangup signal.
+Lines in the configuration file have a
+.I selector
+to determine the message priorities to which the line applies
+and an
+.IR action .
+The
+.I action
+field are separated from the selector by one or more tabs.
+.PP
+Selectors are semicolon separated lists of priority specifiers.
+Each priority has a
+.I facility
+describing the part of the system that generated the message,
+a dot,
+and a
+.I level
+indicating the severity of the message.
+Symbolic names may be used.
+An asterisk selects all facilities.
+All messages of the specified level or higher (greater severity)
+are selected.
+More than one facility may be selected using commas to separate them.
+For example:
+.PP
+.ti +5
+*.emerg;mail,daemon.crit
+.PP
+Selects all facilities at the
+.I emerg
+level and the
+.I mail
+and
+.I daemon
+facilities at the
+.I crit
+level.
+.PP
+Known facilities and levels
+recognized by
+.I syslogd
+are those listed in
+.IR syslog (3)
+without the leading ``LOG_''.
+The additional facility
+``mark'' has a message at priority LOG_INFO sent to it every
+20 minutes
+(this may be changed with the
+.B \-m
+flag).
+The ``mark'' facility is not enabled by a facility field containing an asterisk.
+The level ``none'' may be used to disable a particular facility.
+For example,
+.PP
+.ti +5
+*.debug;mail.none
+.PP
+Sends all messages
+.I except
+mail messages to the selected file.
+.PP
+The second part of each line describes where the message is to be logged
+if this line is selected.
+There are four forms:
+.IP \(bu 3n
+A filename (beginning with a leading slash).
+The file will be opened in append mode.
+.IP \(bu 3n
+A hostname preceeded by an at sign (``@'').
+Selected messages are forwarded to the
+.I syslogd
+on the named host.
+.IP \(bu 3n
+A comma separated list of users.
+Selected messages are written to those users
+if they are logged in.
+.IP \(bu 3n
+An asterisk.
+Selected messages are written to all logged-in users.
+.PP
+Blank lines and lines beginning with `#' are ignored.
+.PP
+For example, the configuration file:
+.PP
+.nf
+.ta 4m +\w'*.alert,auth.warning'u+3
+ kern,mark.debug /dev/console
+ *.notice;mail.info /var/log/maillog
+ *.crit /var/log/critical
+ kern.err @ucbarpa
+ *.emerg *
+ *.alert eric,kridle
+ *.alert;auth.warning ralph
+.fi
+.PP
+logs all kernel messages
+and 20 minute marks onto the system console,
+all notice (or higher) level messages and all mail system messages
+except debug messages
+into the file /var/log/maillog,
+and all critical messages
+into /var/log/critical;
+kernel messages of error severity or higher are forwarded
+to ucbarpa.
+All users will be informed of any emergency messages,
+the users ``eric'' and ``kridle''
+will be informed of any alert messages,
+and the user ``ralph''
+will be informed of any alert message,
+or any warning message (or higher)
+from the authorization system.
+.PP
+The flags are:
+.TP 0.5i
+.B \-f
+Specify an alternate configuration file.
+.TP
+.B \-m
+Select the number of minutes between mark messages.
+.TP
+.B \-d
+Turn on debugging.
+.PP
+.I Syslogd
+creates the file /var/run/syslog.pid, if possible,
+containing a single line with its process id.
+This can be used to kill or reconfigure
+.I syslogd.
+.PP
+To bring
+.I syslogd
+down,
+it should be sent a terminate signal (e.g. kill \`cat /var/run/syslog.pid\`).
+.SH FILES
+.ta \w'/etc/syslog.conf 'u
+.nf
+/etc/syslog.conf the configuration file
+/var/run/syslog.pid the process id
+/dev/log Name of the UNIX domain datagram log socket
+/dev/klog The kernel log device
+.fi
+.SH SEE ALSO
+logger(1), syslog(3)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/syslog/syslogd.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1428 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $Revision: 1.3 $
+** This file has been modified to get it to compile more easily
+** on pre-4.4BSD (e.g., SysVr4 :-) systems. Rich $alz, June 1991.
+*/
+
+ /* change these three if you must keep running an old syslog. */
+#define _PATH_LOGFILE "/dev/log"
+#define _PATH_LOGCONF "/etc/syslog.conf"
+#define _PATH_LOGPID "/etc/syslog.pid"
+
+ /* #define this to enable verbose debugging of all messages. */
+#undef VERBOSE_DEBUG
+ /* #define this to line to listen on the INET port. */
+#undef DO_INET_SOCKET
+ /* #undef this to not read kernel syslog messages. */
+#define _PATH_KLOG "/dev/klog"
+#undef _PATH_KLOG
+ /* set this depending on what your sighandler is. */
+ /* =()<#define SIGHANDLER @<SIGHANDLER>@>()= */
+#define SIGHANDLER void
+ /* if you need various BSD functions, set this. */
+#define NEED_BZERO_ETC
+
+ /* Use "union wait" instead of int? */
+ /* =()<#define @<USE_UNION_WAIT>@_USE_UNION_WAIT>()= */
+#define DO_USE_UNION_WAIT
+#if defined(DO_USE_UNION_WAIT)
+#define WAITVALUE union wait
+#else
+#define WAITVALUE int
+#endif /* defined(DO_USE_UNION_WAIT) */
+
+/*
+ * Copyright (c) 1983, 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement: ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1983, 1988 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)syslogd.c 5.42 (Berkeley) 6/29/90";
+#endif /* not lint */
+
+/*
+ * syslogd -- log system messages
+ *
+ * This program implements a system log. It takes a series of lines.
+ * Each line may have a priority, signified as "<n>" as
+ * the first characters of the line. If this is
+ * not present, a default priority is used.
+ *
+ * To kill syslogd, send a signal 15 (terminate). A signal 1 (hup) will
+ * cause it to reread its configuration file.
+ *
+ * Defined Constants:
+ *
+ * MAXLINE -- the maximimum line length that can be handled.
+ * DEFUPRI -- the default priority for user messages
+ * DEFSPRI -- the default priority for kernel messages
+ *
+ * Author: Eric Allman
+ * extensive changes by Ralph Campbell
+ * more extensive changes by Eric Allman (again)
+ */
+
+#define MAXLINE 1024 /* maximum line length */
+#define MAXSVLINE 120 /* maximum saved line length */
+#define DEFUPRI (LOG_USER|LOG_NOTICE)
+#define DEFSPRI (LOG_KERN|LOG_CRIT)
+#define TIMERINTVL 30 /* interval for checking flush, mark */
+
+#include <sys/param.h>
+#include <sys/errno.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <sys/file.h>
+#include <sys/uio.h>
+#include <sys/un.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/signal.h>
+
+#ifdef MSG_BSIZE
+#undef MSG_BSIZE
+#endif
+#define MSG_BSIZE 4096
+
+#include <netinet/in.h>
+#include <netdb.h>
+
+#include <utmp.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+#define SYSLOG_NAMES
+#include "syslog.h"
+
+#define UT_NAMESIZE 8
+#define _PATH_UTMP "/etc/utmp"
+#define _PATH_DEV "/dev/"
+#define _PATH_CONSOLE "/dev/console"
+
+#ifndef sigmask
+#define sigmask(m) (1 << ((m)-1))
+#endif
+char *LogName = _PATH_LOGFILE;
+char *ConfFile = _PATH_LOGCONF;
+char *PidFile = _PATH_LOGPID;
+char ctty[] = _PATH_CONSOLE;
+
+#define FDMASK(fd) (1 << (fd))
+
+#define dprintf if (Debug) printf
+
+#define MAXUNAMES 20 /* maximum number of user names */
+
+#ifdef NEED_BZERO_ETC
+#include <fcntl.h>
+bzero(b, length)
+ char *b;
+ int length;
+{
+ while (--length >= 0)
+ *b++ = '\0';
+}
+bcopy(b1, b2, length)
+ char *b1;
+ char *b2;
+ int length;
+{
+ while (--length >= 0)
+ *b2++ = *b1++;
+}
+setlinebuf(f)
+ FILE *f;
+{
+ setbuf(f, (char *)NULL);
+}
+wait3(status, flags, np)
+ WAITVALUE *status;
+ int flags;
+ struct rusage *np;
+{
+ return waitpid(-1, status, WNOHANG);
+}
+
+/* Not a general mask handler -- it know what we call, below. */
+SIGHANDLER (*oldhup)(), (*oldalrm)();
+int
+sigsetmask(omask)
+ int omask;
+{
+ if (omask & sigmask(SIGHUP))
+ (void) signal(SIGHUP, oldhup);
+ if (omask & sigmask(SIGALRM))
+ (void) signal(SIGALRM, oldalrm);
+}
+int
+sigblock(mask)
+ int mask;
+{
+ if (mask & sigmask(SIGHUP))
+ oldhup = signal(SIGHUP, SIG_IGN);
+ if (mask & sigmask(SIGALRM))
+ oldhup = signal(SIGALRM, SIG_IGN);
+}
+#endif
+
+/*
+ * Flags to logmsg().
+ */
+
+#define IGN_CONS 0x001 /* don't print on console */
+#define SYNC_FILE 0x002 /* do fsync on file after printing */
+#define ADDDATE 0x004 /* add a date to the message */
+#define MARK 0x008 /* this message is a mark */
+
+/*
+ * This structure represents the files that will have log
+ * copies printed.
+ */
+
+struct filed {
+ struct filed *f_nextone; /* next in linked list */
+ short f_type; /* entry type, see below */
+ short f_file; /* file descriptor */
+ time_t f_time; /* time this was last written */
+ u_char f_pmask[LOG_NFACILITIES+1]; /* priority mask */
+ union {
+ char f_uname[MAXUNAMES][UT_NAMESIZE+1];
+ struct {
+ char f_hname[MAXHOSTNAMELEN+1];
+ struct sockaddr_in f_addr;
+ } f_forw; /* forwarding address */
+ char f_fname[MAXPATHLEN];
+ } f_un;
+ char f_prevline[MAXSVLINE]; /* last message logged */
+ char f_lasttime[16]; /* time of last occurrence */
+ char f_prevhost[MAXHOSTNAMELEN+1]; /* host from which recd. */
+ int f_prevpri; /* pri of f_prevline */
+ int f_prevlen; /* length of f_prevline */
+ int f_prevcount; /* repetition cnt of prevline */
+ int f_repeatcount; /* number of "repeated" msgs */
+};
+
+/*
+ * Intervals at which we flush out "message repeated" messages,
+ * in seconds after previous message is logged. After each flush,
+ * we move to the next interval until we reach the largest.
+ */
+int repeatinterval[] = { 30, 120, 600 }; /* # of secs before flush */
+#define MAXREPEAT ((sizeof(repeatinterval) / sizeof(repeatinterval[0])) - 1)
+#define REPEATTIME(f) ((f)->f_time + repeatinterval[(f)->f_repeatcount])
+#define BACKOFF(f) { if (++(f)->f_repeatcount > MAXREPEAT) \
+ (f)->f_repeatcount = MAXREPEAT; \
+ }
+
+/* values for f_type */
+#define F_UNUSED 0 /* unused entry */
+#define F_FILE 1 /* regular file */
+#define F_TTY 2 /* terminal */
+#define F_CONSOLE 3 /* console terminal */
+#define F_FORW 4 /* remote machine */
+#define F_USERS 5 /* list of users */
+#define F_WALL 6 /* everyone logged on */
+
+char *TypeNames[7] = {
+ "UNUSED", "FILE", "TTY", "CONSOLE",
+ "FORW", "USERS", "WALL"
+};
+
+struct filed *Files;
+struct filed consfile;
+
+int Debug; /* debug flag */
+char LocalHostName[MAXHOSTNAMELEN+1]; /* our hostname */
+char *LocalDomain; /* our local domain name */
+int InetInuse = 0; /* non-zero if INET sockets are being used */
+int finet; /* Internet datagram socket */
+int LogPort; /* port number for INET connections */
+int Initialized = 0; /* set when we have initialized ourselves */
+int MarkInterval = 20 * 60; /* interval between marks in seconds */
+int MarkSeq = 0; /* mark sequence number */
+
+extern int errno;
+extern char *ctime(), *strchr(), *malloc();
+SIGHANDLER die(), domark(), init(), reapchild();
+
+int
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ register int i;
+ register char *p;
+ int funix, inetm, fklog, klogm, len;
+ struct sockaddr_un sunx, fromunix;
+ struct sockaddr_in sin, frominet;
+ FILE *fp;
+ int ch;
+ char line[MSG_BSIZE + 1];
+ extern int optind;
+ extern char *optarg;
+
+ while ((ch = getopt(argc, argv, "df:m:p:")) != EOF)
+ switch((char)ch) {
+ case 'd': /* debug */
+ Debug++;
+ break;
+ case 'f': /* configuration file */
+ ConfFile = optarg;
+ break;
+ case 'm': /* mark interval */
+ MarkInterval = atoi(optarg) * 60;
+ break;
+ case 'p': /* path */
+ LogName = optarg;
+ break;
+ case '?':
+ default:
+ usage();
+ }
+ if (argc -= optind)
+ usage();
+
+ if (!Debug)
+ daemon(0, 0);
+ else
+ setlinebuf(stdout);
+
+ consfile.f_type = F_CONSOLE;
+ (void) strcpy(consfile.f_un.f_fname, ctty);
+ (void) gethostname(LocalHostName, sizeof LocalHostName);
+ if (p = strchr(LocalHostName, '.')) {
+ *p++ = '\0';
+ LocalDomain = p;
+ }
+ else
+ LocalDomain = "";
+ (void) signal(SIGTERM, die);
+ if (Debug) {
+ (void) signal(SIGINT, die);
+ (void) signal(SIGQUIT, die);
+ }
+ else {
+ (void) signal(SIGINT, SIG_IGN);
+ (void) signal(SIGQUIT, SIG_IGN);
+ }
+ (void) signal(SIGCHLD, reapchild);
+ (void) signal(SIGALRM, domark);
+ (void) alarm(TIMERINTVL);
+ (void) unlink(LogName);
+
+ bzero((char *)&sunx, sizeof(sunx));
+ sunx.sun_family = AF_UNIX;
+ (void) strncpy(sunx.sun_path, LogName, sizeof sunx.sun_path);
+ funix = socket(AF_UNIX, SOCK_DGRAM, 0);
+ if (funix < 0 || bind(funix, (struct sockaddr *) &sunx,
+ sizeof(sunx)) < 0 ||
+ chmod(LogName, 0666) < 0) {
+ (void) sprintf(line, "cannot create %s", LogName);
+ logerror(line);
+ dprintf("cannot create %s (%d)\n", LogName, errno);
+ die(0);
+ }
+#ifdef DO_INET_SOCKET
+ finet = socket(AF_INET, SOCK_DGRAM, 0);
+ if (finet >= 0) {
+ struct servent *sp;
+
+ sp = getservbyname("syslog", "udp");
+ if (sp == NULL) {
+ errno = 0;
+ logerror("syslog/udp: unknown service");
+ die(0);
+ }
+ bzero((char *)&sin, sizeof(sin)); /* added uunet!rbj */
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = INADDR_ANY;
+ sin.sin_port = LogPort = htons(sp->s_port);
+ if (bind(finet, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
+ logerror("bind");
+ if (!Debug)
+ die(0);
+ } else {
+ inetm = FDMASK(finet);
+ InetInuse = 1;
+ }
+ }
+#else
+ finet = -1;
+ inetm = 0;
+#endif /* DO_INET_SOCKET */
+#ifdef _PATH_KLOG
+ if ((fklog = open(_PATH_KLOG, O_RDONLY, 0)) >= 0)
+ klogm = FDMASK(fklog);
+ else {
+ dprintf("can't open %s (%d)\n", _PATH_KLOG, errno);
+ klogm = 0;
+ }
+#else
+ fklog = -1;
+ klogm = 0;
+#endif /* _PATH_KLOG */
+
+ /* tuck my process id away */
+ fp = fopen(PidFile, "w");
+ if (fp != NULL) {
+ fprintf(fp, "%d\n", getpid());
+ (void) fclose(fp);
+ }
+
+ dprintf("off & running....\n");
+
+ init();
+ (void) signal(SIGHUP, init);
+
+ for (;;) {
+ int nfds, readfds = FDMASK(funix) | inetm | klogm;
+
+ errno = 0;
+ dprintf("readfds = %#x\n", readfds);
+ nfds = select(20, (fd_set *) &readfds, (fd_set *) NULL,
+ (fd_set *) NULL, (struct timeval *) NULL);
+ if (nfds == 0)
+ continue;
+ if (nfds < 0) {
+ if (errno != EINTR)
+ logerror("select");
+ continue;
+ }
+ dprintf("got a message (%d, %#x)\n", nfds, readfds);
+ if (readfds & klogm) {
+ i = read(fklog, line, sizeof(line) - 1);
+ if (i > 0) {
+ line[i] = '\0';
+ printsys(line);
+ } else if (i < 0 && errno != EINTR) {
+ logerror("klog");
+ fklog = -1;
+ klogm = 0;
+ }
+ }
+ if (readfds & FDMASK(funix)) {
+ len = sizeof fromunix;
+ i = recvfrom(funix, line, MAXLINE, 0,
+ (struct sockaddr *) &fromunix, &len);
+ if (i > 0) {
+ line[i] = '\0';
+ printline(LocalHostName, line);
+ } else if (i < 0 && errno != EINTR)
+ logerror("recvfrom unix");
+ }
+ if (readfds & inetm) {
+ len = sizeof frominet;
+ i = recvfrom(finet, line, MAXLINE, 0,
+ (struct sockaddr *) &frominet, &len);
+ if (i > 0) {
+ extern char *cvthname();
+
+ line[i] = '\0';
+ printline(cvthname(&frominet), line);
+ } else if (i < 0 && errno != EINTR)
+ logerror("recvfrom inet");
+ }
+ }
+}
+
+usage()
+{
+ (void) fprintf(stderr,
+ "usage: syslogd [-d] [-f conffile] [-m markinterval] [-p path]\n");
+ exit(1);
+}
+
+/*
+ * Take a raw input line, decode the message, and print the message
+ * on the appropriate log files.
+ */
+
+printline(hname, msg)
+ char *hname;
+ char *msg;
+{
+ register char *p, *q;
+ register int c;
+ char line[MAXLINE + 1];
+ int pri;
+
+ /* test for special codes */
+ pri = DEFUPRI;
+ p = msg;
+ if (*p == '<') {
+ pri = 0;
+ while (isdigit(*++p))
+ pri = 10 * pri + (*p - '0');
+ if (*p == '>')
+ ++p;
+ }
+ if (pri &~ (LOG_FACMASK|LOG_PRIMASK))
+ pri = DEFUPRI;
+
+ /* don't allow users to log kernel messages */
+ if (LOG_FAC(pri) == LOG_KERN)
+ pri = LOG_MAKEPRI(LOG_USER, LOG_PRI(pri));
+
+ q = line;
+
+ while ((c = *p++ & 0177) != '\0' &&
+ q < &line[sizeof(line) - 1])
+ if (iscntrl(c))
+ if (c == '\n')
+ *q++ = ' ';
+ else if (c == '\t')
+ *q++ = '\t';
+ else {
+ *q++ = '^';
+ *q++ = c ^ 0100;
+ }
+ else
+ *q++ = c;
+ *q = '\0';
+
+ logmsg(pri, line, hname, 0);
+}
+
+/*
+ * Take a raw input line from /dev/klog, split and format similar to syslog().
+ */
+
+printsys(msg)
+ char *msg;
+{
+ register char *p, *q;
+ register int c;
+ char line[MAXLINE + 1];
+ int pri, flags;
+ char *lp;
+
+ (void) strcpy(line, "vmunix: ");
+ lp = line + strlen(line);
+ for (p = msg; *p != '\0'; ) {
+ flags = SYNC_FILE | ADDDATE; /* fsync file after write */
+ pri = DEFSPRI;
+ if (*p == '<') {
+ pri = 0;
+ while (isdigit(*++p))
+ pri = 10 * pri + (*p - '0');
+ if (*p == '>')
+ ++p;
+ } else {
+ /* kernel printf's come out on console */
+ flags |= IGN_CONS;
+ }
+ if (pri &~ (LOG_FACMASK|LOG_PRIMASK))
+ pri = DEFSPRI;
+ q = lp;
+ while (*p != '\0' && (c = *p++) != '\n' &&
+ q < &line[MAXLINE])
+ *q++ = c;
+ *q = '\0';
+ logmsg(pri, line, LocalHostName, flags);
+ }
+}
+
+
+#ifdef VERBOSE_DEBUG
+/*
+ * Decode a numeric value to a symbolic name
+ */
+char *
+edoced(val, codetab)
+ int val;
+ CODE *codetab;
+{
+ register CODE *c;
+
+ if (val >= 0)
+ for (c = codetab; c->c_val != -1; c++)
+ if (c->c_val == val)
+ return (c->c_name);
+ return ("???");
+}
+#endif
+
+time_t now;
+
+/*
+ * Log a message to the appropriate log files, users, etc. based on
+ * the priority.
+ */
+
+logmsg(pri, msg, from, flags)
+ int pri;
+ char *msg, *from;
+ int flags;
+{
+ register struct filed *f;
+ int fac, prilev;
+ int omask, msglen;
+ char *timestamp;
+ time_t time();
+
+#ifdef VERBOSE_DEBUG
+ if (Debug) {
+ int pfac = (flags & MARK) ? INTERNAL_MARK : (pri & LOG_FACMASK);
+ printf("logmsg: {%s.%s} pri %o, flags %x, from %s, msg %s\n",
+ edoced(pfac, facilitynames),
+ edoced(LOG_PRI(pri), prioritynames),
+ pri, flags, from, msg);
+ }
+#else
+ dprintf("logmsg: pri %o, flags %x, from %s, msg %s\n",
+ pri, flags, from, msg);
+#endif
+
+ omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM));
+
+ /*
+ * Check to see if msg looks non-standard.
+ */
+ msglen = strlen(msg);
+ if (msglen < 16 || msg[3] != ' ' || msg[6] != ' ' ||
+ msg[9] != ':' || msg[12] != ':' || msg[15] != ' ')
+ flags |= ADDDATE;
+
+ (void) time(&now);
+ if (flags & ADDDATE)
+ timestamp = ctime(&now) + 4;
+ else {
+ timestamp = msg;
+ msg += 16;
+ msglen -= 16;
+ }
+
+ /* extract facility and priority level */
+ if (flags & MARK)
+ fac = LOG_NFACILITIES;
+ else
+ fac = LOG_FAC(pri);
+ prilev = LOG_PRI(pri);
+
+ /* log the message to the particular outputs */
+ if (!Initialized) {
+ f = &consfile;
+ f->f_file = open(ctty, O_WRONLY, 0);
+
+ if (f->f_file >= 0) {
+ fprintlog(f, flags, msg);
+ (void) close(f->f_file);
+ }
+ (void) sigsetmask(omask);
+ return;
+ }
+ for (f = Files; f; f = f->f_nextone) {
+ /* skip messages that are incorrect priority */
+ if ((int)f->f_pmask[fac] < prilev ||
+ f->f_pmask[fac] == INTERNAL_NOPRI)
+ continue;
+
+ if (f->f_type == F_CONSOLE && (flags & IGN_CONS))
+ continue;
+
+ /* don't output marks to recently written files */
+ if ((flags & MARK) && (now - f->f_time) < MarkInterval / 2)
+ continue;
+
+ /*
+ * suppress duplicate lines to this file
+ */
+ if ((flags & MARK) == 0 && msglen == f->f_prevlen &&
+ !strcmp(msg, f->f_prevline) &&
+ !strcmp(from, f->f_prevhost)) {
+ (void) strncpy(f->f_lasttime, timestamp, 15);
+ f->f_prevcount++;
+ dprintf("msg repeated %d times, %ld sec of %d\n",
+ f->f_prevcount, now - f->f_time,
+ repeatinterval[f->f_repeatcount]);
+ /*
+ * If domark would have logged this by now,
+ * flush it now (so we don't hold isolated messages),
+ * but back off so we'll flush less often
+ * in the future.
+ */
+ if (now > REPEATTIME(f)) {
+ fprintlog(f, flags, (char *)NULL);
+ BACKOFF(f);
+ }
+ } else {
+ /* new line, save it */
+ if (f->f_prevcount)
+ fprintlog(f, 0, (char *)NULL);
+ f->f_repeatcount = 0;
+ (void) strncpy(f->f_lasttime, timestamp, 15);
+ (void) strncpy(f->f_prevhost, from,
+ sizeof(f->f_prevhost));
+ if (msglen < MAXSVLINE) {
+ f->f_prevlen = msglen;
+ f->f_prevpri = pri;
+ (void) strcpy(f->f_prevline, msg);
+ fprintlog(f, flags, (char *)NULL);
+ } else {
+ f->f_prevline[0] = 0;
+ f->f_prevlen = 0;
+ fprintlog(f, flags, msg);
+ }
+ }
+ }
+ (void) sigsetmask(omask);
+}
+
+fprintlog(f, flags, msg)
+ register struct filed *f;
+ int flags;
+ char *msg;
+{
+ struct iovec iov[6];
+ register struct iovec *v;
+ register int l;
+ char line[MAXLINE + 1], repbuf[80], greetings[200];
+
+ v = iov;
+ if (f->f_type == F_WALL) {
+ v->iov_base = greetings;
+ sprintf(greetings,
+ "\r\n\7Message from syslogd@%s at %.24s ...\r\n",
+ f->f_prevhost, ctime(&now));
+ v->iov_len = strlen(greetings);
+ v++;
+ v->iov_base = "";
+ v->iov_len = 0;
+ v++;
+ } else {
+ v->iov_base = f->f_lasttime;
+ v->iov_len = 15;
+ v++;
+ v->iov_base = " ";
+ v->iov_len = 1;
+ v++;
+ }
+ v->iov_base = f->f_prevhost;
+ v->iov_len = strlen(v->iov_base);
+ v++;
+ v->iov_base = " ";
+ v->iov_len = 1;
+ v++;
+
+ if (msg) {
+ v->iov_base = msg;
+ v->iov_len = strlen(msg);
+ } else if (f->f_prevcount > 1) {
+ v->iov_base = repbuf;
+ sprintf(repbuf, "last message repeated %d times",
+ f->f_prevcount);
+ v->iov_len = strlen(repbuf);
+ } else {
+ v->iov_base = f->f_prevline;
+ v->iov_len = f->f_prevlen;
+ }
+ v++;
+
+ dprintf("Logging to %s", TypeNames[f->f_type]);
+ f->f_time = now;
+
+ switch (f->f_type) {
+ case F_UNUSED:
+ dprintf("\n");
+ break;
+
+ case F_FORW:
+ dprintf(" %s\n", f->f_un.f_forw.f_hname);
+ sprintf(line, "<%d>%.15s %s", f->f_prevpri,
+ iov[0].iov_base, iov[4].iov_base);
+ l = strlen(line);
+ if (l > MAXLINE)
+ l = MAXLINE;
+ if (sendto(finet, line, l, 0, &f->f_un.f_forw.f_addr,
+ sizeof f->f_un.f_forw.f_addr) != l) {
+ int e = errno;
+ (void) close(f->f_file);
+ f->f_type = F_UNUSED;
+ errno = e;
+ logerror("sendto");
+ }
+ break;
+
+ case F_CONSOLE:
+ if (flags & IGN_CONS) {
+ dprintf(" (ignored)\n");
+ break;
+ }
+ /* FALLTHROUGH */
+
+ case F_TTY:
+ case F_FILE:
+ dprintf(" %s\n", f->f_un.f_fname);
+ if (f->f_type != F_FILE) {
+ v->iov_base = "\r\n";
+ v->iov_len = 2;
+ } else {
+ v->iov_base = "\n";
+ v->iov_len = 1;
+ }
+ again:
+ if (writev(f->f_file, iov, 6) < 0) {
+ int e = errno;
+ (void) close(f->f_file);
+ /*
+ * Check for errors on TTY's due to loss of tty
+ */
+ if ((e == EIO || e == EBADF) && f->f_type != F_FILE) {
+ f->f_file = open(f->f_un.f_fname,
+ O_WRONLY|O_APPEND, 0);
+ if (f->f_file < 0) {
+ f->f_type = F_UNUSED;
+ logerror(f->f_un.f_fname);
+ } else
+ goto again;
+ } else {
+ f->f_type = F_UNUSED;
+ errno = e;
+ logerror(f->f_un.f_fname);
+ }
+ } else if (flags & SYNC_FILE)
+ (void) fsync(f->f_file);
+ break;
+
+ case F_USERS:
+ case F_WALL:
+ dprintf("\n");
+ v->iov_base = "\r\n";
+ v->iov_len = 2;
+ wallmsg(f, iov);
+ break;
+ }
+ f->f_prevcount = 0;
+}
+
+/*
+ * WALLMSG -- Write a message to the world at large
+ *
+ * Write the specified message to either the entire
+ * world, or a list of approved users.
+ */
+
+wallmsg(f, iov)
+ register struct filed *f;
+ struct iovec *iov;
+{
+ static int reenter; /* avoid calling ourselves */
+ register FILE *uf;
+ register int i;
+ struct utmp ut;
+ char *p, *ttymsg();
+
+ if (reenter++)
+ return;
+ if ((uf = fopen(_PATH_UTMP, "r")) == NULL) {
+ logerror(_PATH_UTMP);
+ reenter = 0;
+ return;
+ }
+ /* NOSTRICT */
+ while (fread((char *) &ut, sizeof ut, 1, uf) == 1) {
+ if (ut.ut_name[0] == '\0')
+ continue;
+ if (f->f_type == F_WALL) {
+ if (p = ttymsg(iov, 6, ut.ut_line, 1)) {
+ errno = 0; /* already in msg */
+ logerror(p);
+ }
+ continue;
+ }
+ /* should we send the message to this user? */
+ for (i = 0; i < MAXUNAMES; i++) {
+ if (!f->f_un.f_uname[i][0])
+ break;
+ if (!strncmp(f->f_un.f_uname[i], ut.ut_name,
+ UT_NAMESIZE)) {
+ if (p = ttymsg(iov, 6, ut.ut_line, 1)) {
+ errno = 0; /* already in msg */
+ logerror(p);
+ }
+ break;
+ }
+ }
+ }
+ (void) fclose(uf);
+ reenter = 0;
+}
+
+SIGHANDLER
+reapchild()
+{
+ WAITVALUE status;
+
+ while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0)
+ continue;
+}
+
+/*
+ * Return a printable representation of a host address.
+ */
+char *
+cvthname(f)
+ struct sockaddr_in *f;
+{
+ struct hostent *hp;
+ register char *p;
+ extern char *inet_ntoa();
+
+ dprintf("cvthname(%s)\n", inet_ntoa(f->sin_addr));
+
+ if (f->sin_family != AF_INET) {
+ dprintf("Malformed from address\n");
+ return ("???");
+ }
+ hp = gethostbyaddr(&f->sin_addr, sizeof(struct in_addr), f->sin_family);
+ if (hp == 0) {
+ dprintf("Host name for your address (%s) unknown\n",
+ inet_ntoa(f->sin_addr));
+ return (inet_ntoa(f->sin_addr));
+ }
+ if ((p = strchr(hp->h_name, '.')) && strcmp(p + 1, LocalDomain) == 0)
+ *p = '\0';
+ return (hp->h_name);
+}
+
+SIGHANDLER
+domark()
+{
+ register struct filed *f;
+ time_t time();
+
+ now = time((time_t *)NULL);
+ MarkSeq += TIMERINTVL;
+ if (MarkSeq >= MarkInterval) {
+ logmsg(LOG_INFO, "-- MARK --", LocalHostName, ADDDATE|MARK);
+ MarkSeq = 0;
+ }
+
+ for (f = Files; f; f = f->f_nextone) {
+ if (f->f_prevcount && now >= REPEATTIME(f)) {
+ dprintf("flush %s: repeated %d times, %d sec.\n",
+ TypeNames[f->f_type], f->f_prevcount,
+ repeatinterval[f->f_repeatcount]);
+ fprintlog(f, 0, (char *)NULL);
+ BACKOFF(f);
+ }
+ }
+ (void) alarm(TIMERINTVL);
+}
+
+static char *
+xstrerror()
+{
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+ extern int errno;
+ static char buff[30];
+
+ if (errno >= 0 && errno < sys_nerr)
+ return sys_errlist[errno];
+ (void)sprintf(buff, "Error code %d\n", errno);
+ return buff;
+}
+
+/*
+ * Print syslogd errors some place.
+ */
+logerror(type)
+ char *type;
+{
+ char buf[100];
+
+ if (errno)
+ (void) sprintf(buf, "syslogd: %s: %s", type, xstrerror(errno));
+ else
+ (void) sprintf(buf, "syslogd: %s", type);
+ errno = 0;
+ dprintf("%s\n", buf);
+ logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE);
+}
+
+SIGHANDLER
+die(sig)
+{
+ register struct filed *f;
+ char buf[100];
+
+ for (f = Files; f != NULL; f = f->f_nextone) {
+ /* flush any pending output */
+ if (f->f_prevcount)
+ fprintlog(f, 0, (char *)NULL);
+ }
+ if (sig) {
+ dprintf("syslogd: exiting on signal %d\n", sig);
+ (void) sprintf(buf, "exiting on signal %d", sig);
+ errno = 0;
+ logerror(buf);
+ }
+ (void) unlink(LogName);
+ exit(0);
+}
+
+/*
+ * INIT -- Initialize syslogd from configuration table
+ */
+
+SIGHANDLER
+init()
+{
+ register int i;
+ register FILE *cf;
+ register struct filed *f, *next, **nextp;
+ register char *p;
+ char cline[BUFSIZ];
+
+ dprintf("init\n");
+
+ /*
+ * Close all open log files.
+ */
+ Initialized = 0;
+ for (f = Files; f != NULL; f = next) {
+ /* flush any pending output */
+ if (f->f_prevcount)
+ fprintlog(f, 0, (char *)NULL);
+
+ switch (f->f_type) {
+ case F_FILE:
+ case F_TTY:
+ case F_CONSOLE:
+ case F_FORW:
+ (void) close(f->f_file);
+ break;
+ }
+ next = f->f_nextone;
+ free((char *) f);
+ }
+ Files = NULL;
+ nextp = &Files;
+
+ /* open the configuration file */
+ if ((cf = fopen(ConfFile, "r")) == NULL) {
+ dprintf("cannot open %s\n", ConfFile);
+ *nextp = (struct filed *)malloc(sizeof(*f));
+ cfline("*.ERR\t/dev/console", *nextp);
+ (*nextp)->f_nextone = (struct filed *)malloc(sizeof(*f));
+ cfline("*.PANIC\t*", (*nextp)->f_nextone);
+ Initialized = 1;
+ return;
+ }
+
+ /*
+ * Foreach line in the conf table, open that file.
+ */
+ f = NULL;
+ while (fgets(cline, sizeof cline, cf) != NULL) {
+ /*
+ * check for end-of-section, comments, strip off trailing
+ * spaces and newline character.
+ */
+ for (p = cline; isspace(*p); ++p);
+ if (*p == NULL || *p == '#')
+ continue;
+ for (p = strchr(cline, '\0'); isspace(*--p););
+ *++p = '\0';
+ f = (struct filed *)malloc(sizeof(*f));
+ *nextp = f;
+ nextp = &f->f_nextone;
+ cfline(cline, f);
+ }
+
+ /* close the configuration file */
+ (void) fclose(cf);
+
+ Initialized = 1;
+
+ if (Debug) {
+ for (f = Files; f; f = f->f_nextone) {
+ for (i = 0; i <= LOG_NFACILITIES; i++)
+ if (f->f_pmask[i] == INTERNAL_NOPRI)
+ printf("X ");
+ else
+ printf("%d ", f->f_pmask[i]);
+ printf("%s: ", TypeNames[f->f_type]);
+ switch (f->f_type) {
+ case F_FILE:
+ case F_TTY:
+ case F_CONSOLE:
+ printf("%s", f->f_un.f_fname);
+ break;
+
+ case F_FORW:
+ printf("%s", f->f_un.f_forw.f_hname);
+ break;
+
+ case F_USERS:
+ for (i = 0; i < MAXUNAMES && *f->f_un.f_uname[i]; i++)
+ printf("%s, ", f->f_un.f_uname[i]);
+ break;
+ }
+ printf("\n");
+ }
+ }
+
+ logmsg(LOG_SYSLOG|LOG_INFO, "syslogd: restart", LocalHostName, ADDDATE);
+ dprintf("syslogd: restarted\n");
+}
+
+/*
+ * Crack a configuration file line
+ */
+
+cfline(line, f)
+ char *line;
+ register struct filed *f;
+{
+ register char *p;
+ register char *q;
+ register int i;
+ char *bp;
+ int pri;
+ struct hostent *hp;
+ char buf[MAXLINE];
+
+ dprintf("cfline(%s)\n", line);
+
+ errno = 0; /* keep strerror() stuff out of logerror messages */
+
+ /* clear out file entry */
+ bzero((char *) f, sizeof *f);
+ for (i = 0; i <= LOG_NFACILITIES; i++)
+ f->f_pmask[i] = INTERNAL_NOPRI;
+
+ /* scan through the list of selectors */
+ for (p = line; *p && *p != '\t';) {
+
+ /* find the end of this facility name list */
+ for (q = p; *q && *q != '\t' && *q++ != '.'; )
+ continue;
+
+ /* collect priority name */
+ for (bp = buf; *q && !strchr("\t,;", *q); )
+ *bp++ = *q++;
+ *bp = '\0';
+
+ /* skip cruft */
+ while (strchr(", ;", *q))
+ q++;
+
+ /* decode priority name */
+ pri = decode(buf, prioritynames);
+ if (pri < 0) {
+ char xbuf[200];
+
+ (void) sprintf(xbuf, "unknown priority name \"%s\"",
+ buf);
+ logerror(xbuf);
+ return;
+ }
+
+ /* scan facilities */
+ while (*p && !strchr("\t.;", *p)) {
+ for (bp = buf; *p && !strchr("\t,;.", *p); )
+ *bp++ = *p++;
+ *bp = '\0';
+ if (*buf == '*')
+ for (i = 0; i < LOG_NFACILITIES; i++)
+ f->f_pmask[i] = pri;
+ else {
+ i = decode(buf, facilitynames);
+ if (i < 0) {
+ char xbuf[200];
+
+ (void) sprintf(xbuf,
+ "unknown facility name \"%s\"",
+ buf);
+ logerror(xbuf);
+ return;
+ }
+ f->f_pmask[i >> 3] = pri;
+ }
+ while (*p == ',' || *p == ' ')
+ p++;
+ }
+
+ p = q;
+ }
+
+ /* skip to action part */
+ while (*p == '\t')
+ p++;
+
+ switch (*p)
+ {
+ case '@':
+ if (!InetInuse)
+ break;
+ (void) strcpy(f->f_un.f_forw.f_hname, ++p);
+ hp = gethostbyname(p);
+ if (hp == NULL) {
+ logerror("hostname lookup error");
+ break;
+ }
+ bzero((char *) &f->f_un.f_forw.f_addr,
+ sizeof f->f_un.f_forw.f_addr);
+ f->f_un.f_forw.f_addr.sin_family = AF_INET;
+ f->f_un.f_forw.f_addr.sin_port = LogPort;
+ bcopy(hp->h_addr, (char *) &f->f_un.f_forw.f_addr.sin_addr, hp->h_length);
+ f->f_type = F_FORW;
+ break;
+
+ case '/':
+ (void) strcpy(f->f_un.f_fname, p);
+ if ((f->f_file = open(p, O_WRONLY|O_APPEND, 0)) < 0) {
+ f->f_file = F_UNUSED;
+ logerror(p);
+ break;
+ }
+ if (isatty(f->f_file))
+ f->f_type = F_TTY;
+ else
+ f->f_type = F_FILE;
+ if (strcmp(p, ctty) == 0)
+ f->f_type = F_CONSOLE;
+ break;
+
+ case '*':
+ f->f_type = F_WALL;
+ break;
+
+ default:
+ for (i = 0; i < MAXUNAMES && *p; i++) {
+ for (q = p; *q && *q != ','; )
+ q++;
+ (void) strncpy(f->f_un.f_uname[i], p, UT_NAMESIZE);
+ if ((q - p) > UT_NAMESIZE)
+ f->f_un.f_uname[i][UT_NAMESIZE] = '\0';
+ else
+ f->f_un.f_uname[i][q - p] = '\0';
+ while (*q == ',' || *q == ' ')
+ q++;
+ p = q;
+ }
+ f->f_type = F_USERS;
+ break;
+ }
+}
+
+
+/*
+ * Decode a symbolic name to a numeric value
+ */
+
+decode(name, codetab)
+ char *name;
+ CODE *codetab;
+{
+ register CODE *c;
+ register char *p;
+ char buf[40];
+
+ if (isdigit(*name))
+ return (atoi(name));
+
+ (void) strcpy(buf, name);
+ for (p = buf; *p; p++)
+ if (isupper(*p))
+ *p = tolower(*p);
+ for (c = codetab; c->c_name; c++)
+ if (!strcmp(buf, c->c_name))
+ return (c->c_val);
+
+ return (-1);
+}
+
+daemon(nochdir, noclose)
+ int nochdir, noclose;
+{
+ int cpid;
+
+ if ((cpid = fork()) == -1)
+ return (-1);
+ if (cpid)
+ exit(0);
+ (void) setsid();
+ if (!nochdir)
+ (void) chdir("/");
+ if (!noclose) {
+ int devnull = open("/dev/null", O_RDWR, 0);
+
+ if (devnull != -1) {
+ (void) dup2(devnull, 0);
+ (void) dup2(devnull, 1);
+ (void) dup2(devnull, 2);
+ if (devnull > 2)
+ (void) close(devnull);
+ }
+ }
+}
+
+
+/*
+ * Display the contents of a uio structure on a terminal. Used by wall(1)
+ * and syslogd(8). Forks and finishes in child if write would block, waiting
+ * at most five minutes. Returns pointer to error string on unexpected error;
+ * string is not newline-terminated. Various "normal" errors are ignored
+ * (exclusive-use, lack of permission, etc.).
+ */
+char *
+ttymsg(iov, iovcnt, line)
+ struct iovec *iov;
+ int iovcnt;
+ char *line;
+{
+ static char device[64] = _PATH_DEV;
+ static char errbuf[1024];
+ register int cnt, fd, left, wret;
+ struct iovec localiov[6];
+ int forked = 0;
+
+ if (iovcnt > 6)
+ return ("too many iov's");
+ /*
+ * open will fail on slip lines or exclusive-use lines
+ * if not running as root; not an error.
+ */
+ (void) strcpy(device + sizeof(_PATH_DEV) - 1, line);
+ if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) {
+ if (errno == EBUSY || errno == EACCES)
+ return (NULL);
+ (void) sprintf(errbuf, "%s: error %d", device, errno);
+ return (errbuf);
+ }
+
+ for (cnt = left = 0; cnt < iovcnt; ++cnt)
+ left += iov[cnt].iov_len;
+
+ for (;;) {
+ wret = writev(fd, iov, iovcnt);
+ if (wret >= left)
+ break;
+ if (wret >= 0) {
+ left -= wret;
+ if (iov != localiov) {
+ bcopy(iov, localiov,
+ iovcnt * sizeof(struct iovec));
+ iov = localiov;
+ }
+ for (cnt = 0; wret >= iov->iov_len; ++cnt) {
+ wret -= iov->iov_len;
+ ++iov;
+ --iovcnt;
+ }
+ if (wret) {
+ iov->iov_base += wret;
+ iov->iov_len -= wret;
+ }
+ continue;
+ }
+ if (errno == EWOULDBLOCK) {
+ int cpid, off = 0;
+
+ if (forked) {
+ (void) close(fd);
+ _exit(1);
+ }
+ cpid = fork();
+ if (cpid < 0) {
+ (void) sprintf(errbuf,
+ "fork: error %d", errno);
+ (void) close(fd);
+ return (errbuf);
+ }
+ if (cpid) { /* parent */
+ (void) close(fd);
+ return (NULL);
+ }
+ forked++;
+ /* wait at most 5 minutes */
+ (void) signal(SIGALRM, SIG_DFL);
+ (void) signal(SIGTERM, SIG_DFL); /* XXX */
+ (void) sigsetmask(0);
+ (void) alarm((u_int)(60 * 5));
+ (void) fcntl(fd, FNDELAY, &off);
+ continue;
+ }
+ /*
+ * We get ENODEV on a slip line if we're running as root,
+ * and EIO if the line just went away.
+ */
+ if (errno == ENODEV || errno == EIO)
+ break;
+ (void) close(fd);
+ if (forked)
+ _exit(1);
+ (void) sprintf(errbuf, "%s: error %d", errno);
+ return (errbuf);
+ }
+
+ (void) close(fd);
+ if (forked)
+ _exit(0);
+ return (NULL);
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/.cvsignore
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/.cvsignore?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/.cvsignore (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/.cvsignore Sat Aug 26 02:00:13 2006
@@ -1,0 +1,3 @@
+Makefile
+makedepend.log
+timsieved
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,17 @@
+/.cvsignore/1.2/Wed Oct 22 18:03:46 2003//Tcyrus-release-2-3-7
+/Makefile.in/1.20.2.4/Tue Jun 27 15:58:43 2006//Tcyrus-release-2-3-7
+/TODO/1.5/Fri Aug 1 13:22:25 2003//Tcyrus-release-2-3-7
+/actions.c/1.36.2.6/Tue Jun 27 15:58:43 2006//Tcyrus-release-2-3-7
+/actions.h/1.11/Tue Jun 24 15:34:00 2003//Tcyrus-release-2-3-7
+/codes.h/1.6/Thu Feb 13 20:15:58 2003//Tcyrus-release-2-3-7
+/exitcodes.h/1.4/Thu Feb 13 20:15:59 2003//Tcyrus-release-2-3-7
+/lex.c/1.24/Wed Oct 22 18:50:31 2003//Tcyrus-release-2-3-7
+/lex.h/1.11/Thu Feb 13 20:15:59 2003//Tcyrus-release-2-3-7
+/mystring.c/1.6.8.1/Fri Feb 27 21:17:48 2004//Tcyrus-release-2-3-7
+/mystring.h/1.6/Thu Feb 13 20:15:59 2003//Tcyrus-release-2-3-7
+/parser.c/1.33.2.8/Tue Jun 27 15:58:43 2006//Tcyrus-release-2-3-7
+/parser.h/1.4/Thu Feb 13 20:15:59 2003//Tcyrus-release-2-3-7
+/scripttest.c/1.21.2.5/Thu Aug 5 16:23:52 2004//Tcyrus-release-2-3-7
+/scripttest.h/1.9.2.1/Wed Jun 23 20:15:20 2004//Tcyrus-release-2-3-7
+/timsieved.c/1.48.2.12/Tue Jun 27 15:58:43 2006//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/timsieved
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/Makefile.in
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/Makefile.in?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/Makefile.in (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/Makefile.in Sat Aug 26 02:00:13 2006
@@ -1,0 +1,110 @@
+# Makefile.in - timsieved makefile
+# $Id: Makefile.in,v 1.20.2.4 2006/06/27 15:58:43 murch Exp $
+# @configure_input@
+#
+# Copyright (c) 1998-2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+RANLIB = @RANLIB@
+
+INSTALL = @INSTALL@
+CYRUS_USER=@cyrus_user@
+CYRUS_GROUP=@cyrus_group@
+
+DEFS = @DEFS@ @LOCALDEFS@
+CPPFLAGS = -I.. -I$(srcdir)/../sieve -I$(srcdir)/../imap -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+cyrus_prefix = @cyrus_prefix@
+service_path = @service_path@
+
+MAKEDEPEND = @MAKEDEPEND@
+
+TIMSIEVED_LIBS = @TIMSIEVED_LIBS@
+
+SERVICE=../master/service.o
+
+IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@
+IMAP_COM_ERR_LIBS = @IMAP_COM_ERR_LIBS@
+LIB_WRAP = @LIB_WRAP@
+LIBS = $(IMAP_COM_ERR_LIBS)
+DEPLIBS=../sieve/libsieve.a ../imap/mutex_fake.o ../imap/libimap.a ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+PURIFY=/usr/local/bin/purify
+PUREOPT=-best-effort
+
+all: timsieved
+
+install:
+ $(INSTALL) -m 755 timsieved $(DESTDIR)$(service_path)
+
+OBJS= actions.o lex.o mystring.o scripttest.o timsieved.o parser.o \
+ ../imap/proxy.o
+
+timsieved: $(OBJS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o timsieved \
+ $(SERVICE) $(OBJS) $(DEPLIBS) $(IMAP_LIBS) $(LIBS) $(LIB_WRAP)
+
+timsieved.pure: $(OBJS) $(SERVICE)
+ $(PURIFY) $(PUREOPT) \
+ $(CC) $(LDFLAGS) -o timsieved.pure \
+ $(SERVICE) $(OBJS) $(DEPLIBS) $(IMAP_LIBS) $(LIBS) $(LIB_WRAP)
+
+clean:
+ rm -f *.o *.a Makefile.bak makedepend.log
+
+distclean: clean
+ rm -f Makefile timsieved
+
+depend:
+ ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ $<
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/TODO
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/TODO?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/TODO (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/TODO Sat Aug 26 02:00:13 2006
@@ -1,0 +1,8 @@
+$Id: TODO,v 1.5 2003/08/01 13:22:25 rjs3 Exp $
+
+does authenticating leak memory? (mechanism name parameter in yacc
+not freed?)
+ - leg 9/29/99
+
+document the sieve quotas in:
+ sieve.html (yet to be written)
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,681 @@
+/* actions.c -- executes the commands for timsieved
+ * Tim Martin
+ * $Id: actions.c,v 1.36.2.6 2006/06/27 15:58:43 murch Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <syslog.h>
+#include <dirent.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <string.h>
+#include <retry.h>
+
+#include "prot.h"
+#include "tls.h"
+#include "util.h"
+#include "global.h"
+#include "libconfig.h"
+#include "xmalloc.h"
+#include "sieve_interface.h"
+
+#include "codes.h"
+#include "actions.h"
+#include "scripttest.h"
+
+#include "sync_log.h"
+
+/* after a user has authentication, our current directory is their Sieve
+ directory! */
+
+extern int sieved_userisadmin;
+char *sieve_dir = NULL;
+
+const static char *sieved_userid = NULL;
+
+int actions_init(void)
+{
+ int sieve_usehomedir = 0;
+
+ sieve_usehomedir = config_getswitch(IMAPOPT_SIEVEUSEHOMEDIR);
+
+ if (!sieve_usehomedir) {
+ sieve_dir = (char *) config_getstring(IMAPOPT_SIEVEDIR);
+ } else {
+ /* can't use home directories with timsieved */
+ syslog(LOG_ERR, "can't use home directories");
+
+ return TIMSIEVE_FAIL;
+ }
+
+ return TIMSIEVE_OK;
+}
+
+int actions_setuser(const char *userid)
+{
+ char userbuf[1024], *user, *domain = NULL;
+ char *foo = sieve_dir;
+ size_t size = 1024, len;
+ int result;
+
+ sieve_dir = (char *) xzmalloc(size+1);
+
+ sieved_userid = xstrdup(userid);
+ user = (char *) userid;
+ if (config_virtdomains && strchr(user, '@')) {
+ /* split the user and domain */
+ strlcpy(userbuf, userid, sizeof(userbuf));
+ user = userbuf;
+ if ((domain = strrchr(user, '@'))) *domain++ = '\0';
+ }
+
+ len = strlcpy(sieve_dir, foo, size);
+
+ if (domain) {
+ char dhash = (char) dir_hash_c(domain);
+ len += snprintf(sieve_dir+len, size-len, "%s%c/%s",
+ FNAME_DOMAINDIR, dhash, domain);
+ }
+
+ if (sieved_userisadmin) {
+ strlcat(sieve_dir, "/global", size);
+ }
+ else {
+ char hash = (char) dir_hash_c(user);
+ snprintf(sieve_dir+len, size-len, "/%c/%s", hash, user);
+ }
+
+ result = chdir(sieve_dir);
+ if (result != 0) {
+ result = cyrus_mkdir(sieve_dir, 0755);
+ if (!result) result = mkdir(sieve_dir, 0755);
+ if (!result) result = chdir(sieve_dir);
+ if (result) {
+ syslog(LOG_ERR, "mkdir %s: %m", sieve_dir);
+ return TIMSIEVE_FAIL;
+ }
+ }
+
+ return TIMSIEVE_OK;
+}
+
+/*
+ *
+ * Everything but '/' and '\0' are valid.
+ *
+ */
+
+int scriptname_valid(mystring_t *name)
+{
+ int lup;
+ char *ptr;
+
+ /* must be at least one character long */
+ if (name->len < 1) return TIMSIEVE_FAIL;
+
+ ptr=string_DATAPTR(name);
+
+ for (lup=0;lup<name->len;lup++)
+ {
+ if ((ptr[lup]=='/') || (ptr[lup]=='\0'))
+ return TIMSIEVE_FAIL;
+ }
+
+ return TIMSIEVE_OK;
+}
+
+int capabilities(struct protstream *conn, sasl_conn_t *saslconn,
+ int starttls_done, int authenticated)
+{
+ const char *sasllist;
+ int mechcount;
+
+ /* implementation */
+ prot_printf(conn,
+ "\"IMPLEMENTATION\" \"Cyrus timsieved%s %s\"\r\n",
+ config_mupdate_server ? " (Murder)" : "", CYRUS_VERSION);
+
+ /* SASL */
+ if (!authenticated &&
+ sasl_listmech(saslconn, NULL,
+ "\"SASL\" \"", " ", "\"\r\n",
+ &sasllist,
+ NULL, &mechcount) == SASL_OK && mechcount > 0)
+ {
+ prot_printf(conn,"%s",sasllist);
+ }
+
+ /* Sieve capabilities */
+ prot_printf(conn,"\"SIEVE\" \"%s\"\r\n",sieve_listextensions(interp));
+
+ if (tls_enabled() && !starttls_done && !authenticated) {
+ prot_printf(conn, "\"STARTTLS\"\r\n");
+ }
+
+ prot_printf(conn,"OK\r\n");
+
+ return TIMSIEVE_OK;
+}
+
+int getscript(struct protstream *conn, mystring_t *name)
+{
+ FILE *stream;
+ struct stat filestats; /* returned by stat */
+ int size; /* size of the file */
+ int result;
+ int cnt;
+
+ char path[1024];
+
+ result = scriptname_valid(name);
+ if (result!=TIMSIEVE_OK)
+ {
+ prot_printf(conn,"NO \"Invalid script name\"\r\n");
+ return result;
+ }
+
+
+ snprintf(path, 1023, "%s.script", string_DATAPTR(name));
+
+ result = stat(path, &filestats);
+ if (result != 0) {
+ prot_printf(conn,"NO \"Script doesn't exist\"\r\n");
+ return TIMSIEVE_NOEXIST;
+ }
+ size = filestats.st_size;
+
+ stream = fopen(path, "r");
+
+ if (stream == NULL) {
+ prot_printf(conn,"NO \"fopen failed\"\r\n");
+ return TIMSIEVE_NOEXIST;
+ }
+
+ prot_printf(conn, "{%d}\r\n", size);
+
+ cnt = 0;
+ while (cnt < size) {
+ char buf[BLOCKSIZE];
+ int amount=BLOCKSIZE;
+
+ if (size-cnt < BLOCKSIZE)
+ amount=size-cnt;
+
+ if (fread(buf, 1, BLOCKSIZE, stream) == 0) {
+ if (ferror(stream)) {
+ fatal("fatal error (fread)", 0);
+ }
+ }
+
+ prot_write(conn, buf, amount);
+
+ cnt += amount;
+ }
+
+ prot_printf(conn,"\r\n");
+
+ prot_printf(conn, "OK\r\n");
+
+ return TIMSIEVE_OK;
+}
+
+/* counts the number of scripts user has that are DIFFERENT from name.
+ used for enforcing quotas */
+static int countscripts(char *name)
+{
+ DIR *dp;
+ struct dirent *dir;
+ int length;
+ int number=0;
+ char myname[1024];
+
+ snprintf(myname, 1023, "%s.script", name);
+
+ if ((dp = opendir(".")) == NULL) {
+ return -1;
+ }
+
+ while ((dir=readdir(dp)) != NULL) {
+ length=strlen(dir->d_name);
+ if (length >= strlen(".script") &&
+ (strcmp(dir->d_name + (length - 7), ".script") == 0)) {
+ /* this is a sieve script */
+ if (strcmp(myname, dir->d_name) != 0) {
+ /* and it's different from me */
+ number++;
+ }
+ }
+ }
+
+ return number;
+}
+
+
+/* save name as a sieve script */
+int putscript(struct protstream *conn, mystring_t *name, mystring_t *data,
+ int verify_only)
+{
+ FILE *stream;
+ char *dataptr;
+ char *errstr;
+ int lup;
+ int result;
+ char path[1024], p2[1024];
+ char bc_path[1024], bc_p2[1024];
+ int maxscripts;
+ sieve_script_t *s;
+
+ result = scriptname_valid(name);
+ if (result!=TIMSIEVE_OK)
+ {
+ prot_printf(conn,"NO \"Invalid script name\"\r\n");
+ return result;
+ }
+
+ if (verify_only)
+ stream = tmpfile();
+
+ else {
+ /* see if this would put the user over quota */
+ maxscripts = config_getint(IMAPOPT_SIEVE_MAXSCRIPTS);
+
+ if (countscripts(string_DATAPTR(name))+1 > maxscripts)
+ {
+ prot_printf(conn,
+ "NO (\"QUOTA\") \"You are only allowed %d scripts on this server\"\r\n",
+ maxscripts);
+ return TIMSIEVE_FAIL;
+ }
+
+ snprintf(path, 1023, "%s.script.NEW", string_DATAPTR(name));
+
+ stream = fopen(path, "w+");
+ }
+
+
+ if (stream == NULL) {
+ prot_printf(conn, "NO \"Unable to open script for writing (%s)\"\r\n",
+ path);
+ return TIMSIEVE_NOEXIST;
+ }
+
+ dataptr = string_DATAPTR(data);
+
+ for (lup=0;lup<= data->len / BLOCKSIZE; lup++) {
+ int amount = BLOCKSIZE;
+
+ if (lup*BLOCKSIZE+BLOCKSIZE > data->len)
+ amount=data->len % BLOCKSIZE;
+
+ fwrite(dataptr, 1, amount, stream);
+
+ dataptr += amount;
+ }
+
+ /* let's make sure this is a valid script
+ (no parse errors)
+ */
+ result = is_script_parsable(stream, &errstr, &s);
+
+ if (result != TIMSIEVE_OK) {
+ if (errstr && *errstr) {
+ prot_printf(conn, "NO {%d}\r\n%s\r\n", strlen(errstr), errstr);
+ free(errstr);
+ } else {
+ if (errstr) free(errstr);
+ prot_printf(conn, "NO \"parse failed\"\r\n");
+ }
+ fclose(stream);
+ unlink(path);
+ return result;
+ }
+
+ fflush(stream);
+ fclose(stream);
+
+ if (!verify_only) {
+ int fd;
+ bytecode_info_t *bc;
+
+ /* Now, generate the bytecode */
+ if(sieve_generate_bytecode(&bc, s) == -1) {
+ unlink(path);
+ sieve_script_free(&s);
+ prot_printf(conn, "NO \"bytecode generate failed\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+
+ /* Now, open the new file */
+ snprintf(bc_path, 1023, "%s.bc.NEW", string_DATAPTR(name));
+ fd = open(bc_path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
+ if(fd < 0) {
+ unlink(path);
+ sieve_free_bytecode(&bc);
+ sieve_script_free(&s);
+ prot_printf(conn, "NO \"couldn't open bytecode file\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+
+ /* Now, emit the bytecode */
+ if(sieve_emit_bytecode(fd, bc) == -1) {
+ close(fd);
+ unlink(path);
+ unlink(bc_path);
+ sieve_free_bytecode(&bc);
+ sieve_script_free(&s);
+ prot_printf(conn, "NO \"bytecode emit failed\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+
+ sieve_free_bytecode(&bc);
+ sieve_script_free(&s);
+
+ close(fd);
+
+ /* Now, rename! */
+ snprintf(p2, 1023, "%s.script", string_DATAPTR(name));
+ snprintf(bc_p2, 1023, "%s.bc", string_DATAPTR(name));
+ rename(path, p2);
+ rename(bc_path, bc_p2);
+
+ }
+
+ prot_printf(conn, "OK\r\n");
+ sync_log_sieve(sieved_userid);
+
+ return TIMSIEVE_OK;
+}
+
+/* delete the active script */
+
+static int deleteactive(struct protstream *conn)
+{
+ if (unlink("defaultbc") != 0) {
+ prot_printf(conn,"NO \"Unable to unlink active script\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+ sync_log_sieve(sieved_userid);
+
+ return TIMSIEVE_OK;
+}
+
+
+/* is this the active script? */
+static int isactive(char *name)
+{
+ char filename[1024];
+ char activelink[1024];
+
+ snprintf(filename, 1023, "%s.bc", name);
+ memset(activelink, 0, sizeof(activelink));
+ if ((readlink("defaultbc", activelink, sizeof(activelink)-1) < 0) &&
+ (errno != ENOENT))
+ {
+ syslog(LOG_ERR, "readlink(defaultbc): %m");
+ return FALSE;
+ }
+
+ if (!strcmp(filename, activelink)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+/* delete a sieve script */
+int deletescript(struct protstream *conn, mystring_t *name)
+{
+ int result;
+ char path[1024];
+
+ result = scriptname_valid(name);
+ if (result!=TIMSIEVE_OK)
+ {
+ prot_printf(conn,"NO \"Invalid script name\"\r\n");
+ return result;
+ }
+
+ snprintf(path, 1023, "%s.script", string_DATAPTR(name));
+
+ if (isactive(string_DATAPTR(name)) && (deleteactive(conn)!=TIMSIEVE_OK)) {
+ return TIMSIEVE_FAIL;
+ }
+
+ result = unlink(path);
+
+ if (result != 0) {
+ prot_printf(conn,"NO \"Error deleting script\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+
+ snprintf(path, 1023, "%s.bc", string_DATAPTR(name));
+
+ result = unlink(path);
+
+ if (result != 0) {
+ prot_printf(conn,"NO \"Error deleting bytecode\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+ sync_log_sieve(sieved_userid);
+
+ prot_printf(conn,"OK\r\n");
+ return TIMSIEVE_OK;
+}
+
+/* list the scripts user has available */
+int listscripts(struct protstream *conn)
+{
+ DIR *dp;
+ struct dirent *dir;
+ int length;
+
+ /* open the directory */
+ dp=opendir(".");
+
+ if (dp==NULL)
+ {
+ prot_printf(conn,"NO \"Error opening directory\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+
+ while ((dir=readdir(dp)) != NULL) /* while there are files here */
+ {
+ length=strlen(dir->d_name);
+ if (length >= strlen(".script")) /* if ends in .script */
+ {
+ if (strcmp(dir->d_name + (length - 7), ".script")==0)
+ {
+ char *namewo=(char *) xmalloc(length-6);
+
+ memcpy(namewo, dir->d_name, length-7);
+ namewo[length-7]='\0';
+
+ if (isactive(namewo)==TRUE)
+ prot_printf(conn,"\"%s\" ACTIVE\r\n", namewo);
+ else
+ prot_printf(conn,"\"%s\"\r\n", namewo);
+
+ free(namewo);
+ }
+ }
+ }
+
+ prot_printf(conn,"OK\r\n");
+
+ return TIMSIEVE_OK;
+}
+
+/* does the script 'str' exist
+ return TRUE | FALSE */
+static int exists(char *str)
+{
+ char filename[1024];
+ struct stat filestats; /* returned by stat */
+ int result;
+
+ snprintf(filename, 1023, "%s.script", str);
+
+ result = stat(filename,&filestats);
+
+ if (result != 0) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/* set the sieve script 'name' to be the active script */
+
+int setactive(struct protstream *conn, mystring_t *name)
+{
+ int result;
+ char filename[1024];
+
+ /* if string name is empty, disable active script */
+ if (!strlen(string_DATAPTR(name))) {
+ if (deleteactive(conn) != TIMSIEVE_OK)
+ return TIMSIEVE_FAIL;
+
+ prot_printf(conn,"OK\r\n");
+ return TIMSIEVE_OK;
+ }
+
+ result = scriptname_valid(name);
+ if (result!=TIMSIEVE_OK)
+ {
+ prot_printf(conn,"NO \"Invalid script name\"\r\n");
+ return result;
+ }
+
+ if (exists(string_DATAPTR(name))==FALSE)
+ {
+ prot_printf(conn,"NO \"Script does not exist\"\r\n");
+ return TIMSIEVE_NOEXIST;
+ }
+
+ /* if script already is the active one just say ok */
+ if (isactive(string_DATAPTR(name))==TRUE) {
+ prot_printf(conn,"OK\r\n");
+ return TIMSIEVE_OK;
+ }
+
+ /* get the name of the active sieve script */
+ snprintf(filename, sizeof(filename), "%s.bc", string_DATAPTR(name));
+
+ /* ok we want to do this atomically so let's
+ - make <activesieve>.NEW as a hard link
+ - rename it to <activesieve>
+ */
+ result = symlink(filename, "defaultbc.NEW");
+ if (result) {
+ syslog(LOG_ERR, "symlink(%s, defaultbc.NEW): %m", filename);
+ prot_printf(conn, "NO \"Can't make link\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+
+ result = rename("defaultbc.NEW", "defaultbc");
+ if (result) {
+ unlink("defaultbc.NEW");
+ syslog(LOG_ERR, "rename(defaultbc.NEW, defaultbc): %m");
+ prot_printf(conn,"NO \"Error renaming\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+ sync_log_sieve(sieved_userid);
+
+ prot_printf(conn,"OK\r\n");
+ return TIMSIEVE_OK;
+}
+
+int cmd_havespace(struct protstream *conn, mystring_t *sieve_name, unsigned long num)
+{
+ int result;
+ int maxscripts;
+ unsigned long maxscriptsize;
+
+ result = scriptname_valid(sieve_name);
+ if (result!=TIMSIEVE_OK)
+ {
+ prot_printf(conn,"NO \"Invalid script name\"\r\n");
+ return result;
+ }
+
+ /* see if the size of the script is too big */
+ maxscriptsize = config_getint(IMAPOPT_SIEVE_MAXSCRIPTSIZE);
+ maxscriptsize *= 1024;
+
+ if (num > maxscriptsize)
+ {
+ prot_printf(conn,
+ "NO (\"QUOTA\") \"Script size is too large. "
+ "Max script size is %ld bytes\"\r\n",
+ maxscriptsize);
+ return TIMSIEVE_FAIL;
+ }
+
+ /* see if this would put the user over quota */
+ maxscripts = config_getint(IMAPOPT_SIEVE_MAXSCRIPTS);
+
+ if (countscripts(string_DATAPTR(sieve_name))+1 > maxscripts)
+ {
+ prot_printf(conn,
+ "NO (\"QUOTA\") \"You are only allowed %d scripts on this server\"\r\n",
+ maxscripts);
+ return TIMSIEVE_FAIL;
+ }
+
+
+ prot_printf(conn,"OK\r\n");
+ return TIMSIEVE_OK;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/actions.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,129 @@
+/* actions.h -- executes the commands (creating, deleting scripts etc..) for timsieved
+ * Tim Martin
+ * 9/21/99
+ * $Id: actions.h,v 1.11 2003/06/24 15:34:00 ken3 Exp $
+*/
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef _ACTIONS_H_
+#define _ACTIONS_H_
+
+
+#include "prot.h"
+#include "mystring.h"
+
+/*
+ * Get the list of capabilities
+ *
+ */
+
+int capabilities(struct protstream *conn, sasl_conn_t *saslconn,
+ int starttls_done, int authenticated);
+
+/*
+ * Get a sieve scripe with name "name" and output it's contents
+ *
+ */
+
+int getscript(struct protstream *conn, mystring_t *name);
+
+/*
+ * Put a scripts in the server with 'name' whose contents should be 'data'
+ *
+ */
+
+int putscript(struct protstream *conn, mystring_t *name, mystring_t *data,
+ int verify_only);
+
+/*
+ * Delete the script with name 'name'
+ *
+ */
+
+int deletescript(struct protstream *conn, mystring_t *name);
+
+/*
+ * ?
+ *
+ */
+
+int verifyscriptname(mystring_t *name);
+
+/*
+ * Is there space for this script?
+ *
+ */
+
+int cmd_havespace(struct protstream *sieved_out, mystring_t *sieve_name, unsigned long num);
+
+/*
+ * List all the scripts for the user. place a '*' next to the active one
+ * if there is one
+ *
+ */
+
+int listscripts(struct protstream *conn);
+
+/*
+ * Set 'name' as the active sieve script
+ *
+ */
+
+int setactive(struct protstream *conn, mystring_t *name);
+
+/*
+ * Initialize
+ *
+ */
+
+int actions_init(void);
+
+/*
+ * Set user after sucessful authentication
+ *
+ */
+
+int actions_setuser(const char *userid);
+
+
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/codes.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/codes.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/codes.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/codes.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,66 @@
+/* codes.h -- error codes functions in timsieved may return
+ * Tim Martin
+ * 9/21/99
+ * $Id: codes.h,v 1.6 2003/02/13 20:15:58 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef _CODES_H_
+#define _CODES_H_
+
+#include "version.h"
+
+#define TIMSIEVE_OK 0
+#define TIMSIEVE_FAIL -1
+
+#define TIMSIEVE_NOMEM -2
+#define TIMSIEVE_BADPORT -5
+#define TIMSIEVE_NOEXIST -6
+
+
+#define TRUE 1
+#define FALSE 0
+
+
+#define BLOCKSIZE 1024
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/exitcodes.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/exitcodes.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/exitcodes.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/exitcodes.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,86 @@
+/* exitcodes.h -- wrapper around sysextis.h
+ * $Id: exitcodes.h,v 1.4 2003/02/13 20:15:59 rjs3 Exp $
+ *
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* Sendmail has some weird ideas on what constitutes permenant failure. On
+ more than one occasion, we have gotten burned by this moving users around
+ through various inadvisable means, screwing up the mailboxes file,
+ whatever.
+
+ We don't want to fail out permenantly on things like EX_USAGE, EX_SOFTWARE,
+ etc., because that generally means someone was just screwing with the mail
+ store and we don't want to lose mail.
+
+ Instead, we map these EC_* codes to EX_* codes, thereby lying to Sendmail,
+ since we don't derive any benefit from Sendmail knowing what the error was.
+ We just want it to retry all the time anyway. This way, should sendmail's
+ behavior be different and we start deriving benefit from Sendmail knowing
+ stuff, we can easily change it back.
+
+ So other code uses the EC_* error, then we maybe change it to TEMPFAIL if
+ we don't agree on whether the error should be permenant or not.
+
+ Comments below stolen from sysexits.h. */
+
+#ifndef INCLUDED_EXITCODES_H
+#define INCLUDED_EXITCODES_H
+
+#include <sysexits.h>
+
+#define EC_OK 0 /* successful termination */
+
+#define EC_USAGE EX_TEMPFAIL /* command line usage error */
+#define EC_DATAERR EX_DATAERR /* data format error */
+#define EC_NOINPUT EX_TEMPFAIL /* cannot open input */
+#define EC_NOUSER EX_NOUSER /* addressee unknown */
+#define EC_NOHOST EX_TEMPFAIL /* host name unknown */
+#define EC_UNAVAILABLE EX_TEMPFAIL /* service unavailable */
+#define EC_SOFTWARE EX_TEMPFAIL /* internal software error */
+#define EC_OSERR EX_TEMPFAIL /* system error (e.g., can't fork) */
+#define EC_OSFILE EX_TEMPFAIL /* critical OS file missing */
+#define EC_CANTCREAT EX_TEMPFAIL /* can't create (user) output file */
+#define EC_IOERR EX_TEMPFAIL /* input/output error */
+#define EC_TEMPFAIL EX_TEMPFAIL /* user is invited to retry */
+#define EC_PROTOCOL EX_TEMPFAIL /* remote error in protocol */
+#define EC_NOPERM EX_TEMPFAIL /* permission denied */
+#define EC_CONFIG EX_TEMPFAIL /* configuration error */
+
+#endif /* INCLUDED_EXITCODES_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,391 @@
+/* lex.c -- lexer for timsieved
+ * Tim Martin
+ * 9/21/99
+ * $Id: lex.c,v 1.24 2003/10/22 18:50:31 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "prot.h"
+#include "tls.h"
+#include "lex.h"
+#include "codes.h"
+#include "mystring.h"
+#include "actions.h"
+#include "libconfig.h"
+#include "global.h"
+#include "xmalloc.h"
+
+int token_lookup (char *str, int len __attribute__((unused)))
+{
+ switch (*str) {
+ case 'a':
+ if (strcmp(str, "authenticate")==0) return AUTHENTICATE;
+ break;
+
+ case 'c':
+ if (strcmp(str, "capability")==0) return CAPABILITY;
+ break;
+
+ case 'd':
+ if (strcmp(str, "deletescript")==0) return DELETESCRIPT;
+ break;
+
+ case 'g':
+ if (strcmp(str, "getscript")==0) return GETSCRIPT;
+ break;
+ case 'h':
+ if (strcmp(str, "havespace")==0) return HAVESPACE;
+ break;
+
+ case 'l':
+ if (strcmp(str, "listscripts")==0) return LISTSCRIPTS;
+ if (strcmp(str, "logout")==0) return LOGOUT;
+ break;
+
+ case 'p':
+ if (strcmp(str, "putscript")==0) return PUTSCRIPT;
+ break;
+
+ case 's':
+ if (strcmp(str, "setactive")==0) return SETACTIVE;
+ if (strcmp(str, "starttls")==0 && tls_enabled())
+ return STARTTLS;
+ break;
+ }
+
+ /* error, nothing matched */
+ return -1;
+}
+
+/* current state the lexer is in */
+int lexer_state = LEXER_STATE_NORMAL;
+
+extern struct protstream *sieved_out;
+
+#define ERR() { \
+ lexer_state=LEXER_STATE_RECOVER; \
+ return TIMSIEVE_FAIL; \
+ }
+
+#define ERR_PUSHBACK() { \
+ prot_ungetc(ch, stream); \
+ ERR(); \
+ }
+
+int lex_reset(void)
+{
+ lexer_state = LEXER_STATE_NORMAL;
+
+ return 0;
+}
+
+void lex_setrecovering(void)
+{
+ lexer_state = LEXER_STATE_RECOVER;
+}
+
+int maxscriptsize=0;
+char *buffer;
+
+int lex_init(void)
+{
+ maxscriptsize = config_getint(IMAPOPT_SIEVE_MAXSCRIPTSIZE);
+ maxscriptsize *= 1024;
+
+ buffer = (char *) xmalloc(maxscriptsize);
+
+ return 0;
+}
+
+/**
+ * if outstr is NULL it isn't filled in
+ */
+
+int timlex(mystring_t **outstr, unsigned long *outnum, struct protstream *stream)
+{
+
+ int ch;
+
+ char *buff_ptr;
+ char *buff_end;
+ unsigned long tmpnum = 0;
+ unsigned long count=0;
+
+ int result = TIMSIEVE_OK;
+
+
+ buff_ptr = buffer; /* ptr into the buffer */
+ buff_end = buffer + maxscriptsize - 10; /* ptr to end of buffer */
+
+
+ while (1)
+ {
+
+ /* get a character
+ this may block on a read if there is nothing
+ in the buffer */
+
+ ch=prot_getc(stream);
+
+ if (ch==EOF) {
+ /* Lost conenction -- treat like a logout */
+ return LOGOUT;
+ }
+
+ switch (lexer_state)
+ {
+
+
+ case LEXER_STATE_RECOVER:
+ if (ch == '\n') {
+ lexer_state=LEXER_STATE_NORMAL;
+ }
+ if (ch == '\r')
+ lexer_state=LEXER_STATE_RECOVER_CR;
+ break;
+ case LEXER_STATE_RECOVER_CR:
+ if (ch == '\n')
+ lexer_state=LEXER_STATE_NORMAL;
+ break;
+ case LEXER_STATE_CR:
+ if (ch == '\n') {
+ lexer_state=LEXER_STATE_NORMAL;
+ return EOL;
+ }
+ /* otherwise, life is bad */
+ ERR_PUSHBACK();
+ case LEXER_STATE_QSTR:
+ if (ch == '\"') {
+ /* End of the string */
+ if (outstr!=NULL)
+ {
+ *outstr = NULL;
+ result = string_allocate(buff_ptr - buffer, buffer, outstr);
+ if (result != TIMSIEVE_OK)
+ ERR_PUSHBACK();
+ }
+ /*} */
+ lexer_state=LEXER_STATE_NORMAL;
+ return STRING;
+ }
+ /* illegal character */
+ if (ch == '\0'
+ || ch == '\r'
+ || ch == '\n'
+ || 0x7F < ((unsigned char)ch))
+ {
+ ERR_PUSHBACK();
+ }
+
+ /* Otherwise, we're appending a character */
+ if (buff_end <= buff_ptr)
+ ERR_PUSHBACK(); /* too long! */
+ if (ch == '\\') {
+ ch=prot_getc(stream);
+
+ if (result != TIMSIEVE_OK)
+ ERR();
+ if (ch != '\"' && ch != '\\')
+ ERR_PUSHBACK();
+ }
+ *buff_ptr++ = ch;
+ break;
+ case LEXER_STATE_LITERAL:
+ if (('0' <= ch) && (ch <= '9')) {
+ unsigned long newcount = count * 10 + (ch - '0');
+
+ if (newcount < count)
+ ERR_PUSHBACK(); /* overflow */
+ /*
+ * XXX This should be fatal if non-synchronizing.
+ */
+ count = newcount;
+ break;
+ }
+ if (ch != '+')
+ ERR_PUSHBACK();
+ ch=prot_getc(stream);
+ if (ch != '}')
+ ERR_PUSHBACK();
+ ch=prot_getc(stream);
+ if (ch < 0)
+ ERR();
+ if (ch != '\r')
+ ERR_PUSHBACK();
+ ch=prot_getc(stream);
+ if (ch < 0)
+ ERR();
+ if (ch != '\n')
+ ERR_PUSHBACK();
+
+ if (count > maxscriptsize) {
+ /* too big, eat the input */
+ for(;count > 0;count--) {
+ if(prot_getc(stream)==EOF)
+ break;
+ }
+
+ ERR();
+ }
+
+ if (outstr!=NULL)
+ {
+ *outstr = NULL;
+ result = string_allocate(count, NULL, outstr);
+ if (result != TIMSIEVE_OK)
+ ERR_PUSHBACK();
+ }
+
+ /* there is a literal string on the wire. let's read it */
+ if (outstr!=NULL) {
+ char *it = string_DATAPTR(*outstr),
+ *end = it + count;
+
+ while (it < end) {
+ *it=prot_getc(stream);
+ it++;
+ }
+ } else {
+ /* just read the chars and throw them away */
+ int lup;
+
+ for (lup=0;lup<count;lup++)
+ prot_getc(stream);
+ }
+ lexer_state=LEXER_STATE_NORMAL;
+ return STRING;
+ case LEXER_STATE_NUMBER:
+
+ if (isdigit((unsigned char) ch)) {
+ unsigned long newcount = tmpnum * 10 + (ch - '0');
+
+ if (newcount < tmpnum)
+ ERR_PUSHBACK(); /* overflow */
+ tmpnum = newcount;
+ } else {
+ lexer_state=LEXER_STATE_NORMAL;
+ prot_ungetc(ch, stream);
+
+ if (outnum) *outnum = tmpnum;
+
+ return NUMBER;
+ }
+
+ break;
+ case LEXER_STATE_NORMAL:
+ if (isalpha((unsigned char) ch)) {
+ lexer_state=LEXER_STATE_ATOM;
+ *buff_ptr++ = tolower(ch);
+ break;
+ }
+ if (isdigit((unsigned char) ch)) {
+ lexer_state=LEXER_STATE_NUMBER;
+ tmpnum = ch -'0';
+ break;
+ }
+ switch (ch) {
+ case '(':
+ return '(';
+ case ')':
+ return ')';
+ case ' ':
+ return ' ';
+ case '\"':
+ lexer_state=LEXER_STATE_QSTR;
+ break;
+ case '*':
+ return '*';
+ case '{':
+ count = 0;
+ lexer_state=LEXER_STATE_LITERAL;
+ break;
+ case '\r':
+ lexer_state=LEXER_STATE_CR;
+ break;
+ case '\n':
+ lexer_state=LEXER_STATE_NORMAL;
+ return EOL;
+ break;
+ default:
+ return ch;
+ }
+ break;
+ case LEXER_STATE_ATOM:
+ if (!isalpha((unsigned char) ch)) {
+ int token;
+
+ buffer[ buff_ptr - buffer] = '\0';
+
+ /* We've got the atom. */
+ token = token_lookup((char *) buffer, (int) (buff_ptr - buffer));
+
+ if (token!=-1) {
+ lexer_state=LEXER_STATE_NORMAL;
+ prot_ungetc(ch, stream);
+
+ return token;
+ } else
+ ERR_PUSHBACK();
+ }
+ if (buff_end <= buff_ptr)
+ ERR_PUSHBACK(); /* atom too long */
+ *buff_ptr++ = tolower(ch);
+ break;
+ }
+
+
+
+ } /* while (1) */
+
+ return 0;
+}
+
+
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/lex.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,92 @@
+/* lex.h -- lexer for timsieved
+ * Tim Martin
+ * 9/21/99
+ * $Id: lex.h,v 1.11 2003/02/13 20:15:59 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+
+#ifndef _LEX_H_
+#define _LEX_H_
+
+#include "prot.h"
+#include "mystring.h"
+
+#define LEXER_STATE_TAG 60
+#define LEXER_STATE_RECOVER 61
+#define LEXER_STATE_RECOVER_CR 62
+#define LEXER_STATE_CR 63
+#define LEXER_STATE_QSTR 64
+#define LEXER_STATE_LITERAL 65
+#define LEXER_STATE_NUMBER 66
+#define LEXER_STATE_NORMAL 67
+#define LEXER_STATE_ATOM 68
+
+
+/* possible tokens */
+
+#define SPACE 32
+
+/* these must be above 255 */
+#define EOL 300
+#define STRING 301
+#define NUMBER 302
+
+#define AUTHENTICATE 400
+#define LOGOUT 401
+#define GETSCRIPT 402
+#define PUTSCRIPT 403
+#define SETACTIVE 404
+#define LISTSCRIPTS 405
+#define DELETESCRIPT 406
+#define CAPABILITY 407
+#define HAVESPACE 408
+#define STARTTLS 409
+
+
+int lex_init(void);
+
+int timlex(mystring_t **outstr, unsigned long *outnum, struct protstream *stream);
+
+void lex_setrecovering(void);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,154 @@
+/* $Id: mystring.c,v 1.6.8.1 2004/02/27 21:17:48 ken3 Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "mystring.h"
+
+#include "codes.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+int string_allocate(int length,
+ const char *buf, /* NULL => no copy */
+ mystring_t ** str)
+{
+ *str=(mystring_t *) malloc(sizeof(mystring_t)+length+1);
+
+ (*str)->len=length;
+
+ if (buf==NULL) return TIMSIEVE_OK;
+
+ /* copy the data into the string object */
+ memcpy(((char *)(*str))+sizeof(mystring_t), buf, length);
+ ((char *) (*str))[sizeof(mystring_t)+length]='\0';
+
+ return TIMSIEVE_OK;
+}
+
+
+int string_copy(mystring_t *oldstr,
+ mystring_t **newstr)
+{
+ int result;
+
+
+ result=string_allocate(oldstr->len,
+ string_DATAPTR(oldstr),
+ newstr);
+
+ return result;
+}
+
+
+void string_free(mystring_t **str)
+{
+ free(*str);
+}
+
+
+int string_compare(mystring_t *str1, mystring_t *str2)
+{
+ char *data1;
+ char *data2;
+ int lup;
+
+ if (str1->len!=str2->len) return TIMSIEVE_FAIL;
+
+ data1=string_DATAPTR(str1);
+ data2=string_DATAPTR(str2);
+
+ for (lup=0;lup<str1->len;lup++)
+ if (data1[lup]!=data2[lup])
+ return TIMSIEVE_FAIL;
+
+ return TIMSIEVE_OK;
+}
+
+int string_compare_with(mystring_t *str1, mystring_t *str2,
+ mystring_t *comp __attribute__((unused)))
+{
+ char *data1;
+ char *data2;
+ int lup;
+
+ int len1=str1->len;
+ int len2=str2->len;
+
+ int low=len1;
+ if (len2<len1)
+ low=len2;
+
+ /* printf("comparing %s and %s\n",string_DATAPTR(str1),
+ string_DATAPTR(str2));*/
+
+ data1=string_DATAPTR(str1);
+ data2=string_DATAPTR(str2);
+
+ for (lup=0;lup<low;lup++)
+ if (data1[lup]<data2[lup])
+ {
+ return -1;
+ } else if (data1[lup]>data2[lup]) {
+ return 1;
+ } else {
+ /* continue */
+ }
+
+ if (len1==len2) return 0;
+
+ if (len1<len2)
+ return -1;
+
+ return 1;
+}
+
+int string_comparestr(mystring_t *str1, char *str2)
+{
+ int str2len=strlen(str2);
+ char *data1;
+ char *data2;
+ int lup;
+
+ if (str1->len!=str2len) return TIMSIEVE_FAIL;
+
+ data1=string_DATAPTR(str1);
+ data2=str2;
+
+ for (lup=0;lup<str1->len;lup++)
+ if (data1[lup]!=data2[lup])
+ return TIMSIEVE_FAIL;
+
+ return TIMSIEVE_OK;
+}
+
+int safe_to_use_quoted(char *str, int len)
+{
+ char *end=str+len;
+
+ if (len > 4096)
+ return FALSE;
+
+ while (str < end) {
+ if (*str == '\0' /* check illegal chars... */
+ || *str == '\r'
+ || *str == '\n'
+
+#ifdef __CHAR_UNSIGNED__
+ || 0x7F < *str
+#else
+ || *str < 0
+#endif
+
+ )
+ return FALSE;
+ if (*str == '\"' /* check len, with \ escapes... */
+ || *str == '\\')
+ if (4096 < ++len)
+ return FALSE;
+ ++str;
+ }
+ return TRUE;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/mystring.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,83 @@
+/* mystring.h -- base datatype used by timsieved
+ * Tim Martin
+ * 9/21/99
+ * $Id: mystring.h,v 1.6 2003/02/13 20:15:59 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+
+#include "codes.h"
+
+
+#ifndef INCLUDED_MYSTRING_H
+#define INCLUDED_MYSTRING_H
+
+typedef struct {
+ int len;
+ /* Data immediately following... */
+} mystring_t;
+
+
+int string_allocate(int length,
+ const char *buf, /* NULL => no copy */
+ mystring_t ** str);
+
+int string_copy(mystring_t *oldstr,
+ mystring_t **newstr);
+
+void string_free(mystring_t **str);
+
+int string_compare(mystring_t *str1, mystring_t *str2);
+
+int string_comparestr(mystring_t *str1, char *str2);
+
+int string_compare_with(mystring_t *str1, mystring_t *str2, mystring_t *comp);
+
+/*eq_result_t
+ string_equal_cstr(const mystring_t * str, const char *cstr);*/
+
+#define string_DATAPTR(s) (((char *) s)+sizeof(mystring_t))
+
+int safe_to_use_quoted(char *str, int len);
+
+
+#endif /* INCLUDED_MYSTRING_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,869 @@
+/* parser.c -- parser used by timsieved
+ * Tim Martin
+ * 9/21/99
+ * $Id: parser.c,v 1.33.2.8 2006/06/27 15:58:43 murch Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <syslog.h>
+
+#include <string.h>
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+
+
+#include "libconfig.h"
+#include "global.h"
+#include "auth.h"
+#include "backend.h"
+#include "mboxname.h"
+#include "mboxlist.h"
+#include "xmalloc.h"
+#include "prot.h"
+#include "tls.h"
+#include "lex.h"
+#include "actions.h"
+#include "exitcodes.h"
+#include "telemetry.h"
+
+extern char sieved_clienthost[250];
+extern int sieved_domainfromip;
+extern int sieved_userisadmin;
+
+/* xxx these are both leaked, but we only handle one connection at a
+ * time... */
+extern sasl_conn_t *sieved_saslconn; /* the sasl connection context */
+const char *referral_host = NULL;
+
+int authenticated = 0;
+int verify_only = 0;
+int starttls_done = 0;
+#ifdef HAVE_SSL
+/* our tls connection, if any */
+static SSL *tls_conn = NULL;
+#endif /* HAVE_SSL */
+
+/* from elsewhere */
+void fatal(const char *s, int code);
+extern int sieved_logfd;
+extern struct backend *backend;
+
+/* forward declarations */
+static void cmd_logout(struct protstream *sieved_out,
+ struct protstream *sieved_in);
+static int cmd_authenticate(struct protstream *sieved_out, struct protstream *sieved_in,
+ mystring_t *mechanism_name, mystring_t *initial_challenge, const char **errmsg);
+static int cmd_starttls(struct protstream *sieved_out, struct protstream *sieved_in);
+
+/* Returns TRUE if we are done */
+int parser(struct protstream *sieved_out, struct protstream *sieved_in)
+{
+ int token = EOL;
+ const char *error_msg = "Generic Error";
+
+ mystring_t *mechanism_name = NULL;
+ mystring_t *initial_challenge = NULL;
+ mystring_t *sieve_name = NULL;
+ mystring_t *sieve_data = NULL;
+ unsigned long num;
+ int ret = FALSE;
+
+ /* get one token from the lexer */
+ while(token == EOL)
+ token = timlex(NULL, NULL, sieved_in);
+
+ if (!authenticated && (token > 255) && (token!=AUTHENTICATE) &&
+ (token!=LOGOUT) && (token!=CAPABILITY) &&
+ (!tls_enabled() || (token!=STARTTLS)))
+ {
+ error_msg = "Authenticate first";
+ if (token!=EOL)
+ lex_setrecovering();
+
+ goto error;
+ }
+
+ if (verify_only && (token > 255) && (token!=PUTSCRIPT) && (token!=LOGOUT))
+ {
+ error_msg = "Script verification only";
+ if (token!=EOL)
+ lex_setrecovering();
+
+ goto error;
+ }
+
+ switch (token)
+ {
+ case AUTHENTICATE:
+ if (timlex(NULL, NULL, sieved_in)!=SPACE)
+ {
+ error_msg = "SPACE must occur after AUTHENTICATE";
+ goto error;
+ }
+
+ if (timlex(&mechanism_name, NULL, sieved_in)!=STRING)
+ {
+ error_msg = "Did not specify mechanism name";
+ goto error;
+ }
+
+ token = timlex(NULL, NULL, sieved_in);
+
+ if (token != EOL)
+ {
+ /* optional client first challenge */
+ if (token!=SPACE)
+ {
+ error_msg = "Expected SPACE";
+ goto error;
+ }
+
+ if (timlex(&initial_challenge, NULL, sieved_in)!=STRING)
+ {
+ error_msg = "Expected string";
+ goto error;
+ }
+
+ token = timlex(NULL, NULL, sieved_in);
+ }
+
+ if (token != EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if (authenticated)
+ prot_printf(sieved_out, "NO \"Already authenticated\"\r\n");
+ else if (cmd_authenticate(sieved_out, sieved_in, mechanism_name,
+ initial_challenge, &error_msg)==FALSE)
+ {
+ error_msg = "Authentication Error";
+ goto error;
+ }
+
+#if 0 /* XXX - not implemented in sieveshell*/
+ /* referral_host is non-null only once we are authenticated */
+ if(referral_host)
+ goto do_referral;
+#endif
+ break;
+
+ case CAPABILITY:
+ if (timlex(NULL, NULL, sieved_in)!=EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if(referral_host)
+ goto do_referral;
+
+ capabilities(sieved_out, sieved_saslconn, starttls_done, authenticated);
+ break;
+
+ case HAVESPACE:
+ if (timlex(NULL, NULL, sieved_in)!=SPACE)
+ {
+ error_msg = "SPACE must occur after HAVESPACE";
+ goto error;
+ }
+
+ if (timlex(&sieve_name, NULL, sieved_in)!=STRING)
+ {
+ error_msg = "Did not specify script name";
+ goto error;
+ }
+
+ if (timlex(NULL, NULL, sieved_in)!=SPACE)
+ {
+ error_msg = "Expected SPACE";
+ goto error;
+ }
+
+ if (timlex(NULL, &num, sieved_in)!=NUMBER)
+ {
+ error_msg = "Expected Number";
+ goto error;
+ }
+
+ if (timlex(NULL, NULL, sieved_in)!=EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if(referral_host)
+ goto do_referral;
+
+ cmd_havespace(sieved_out, sieve_name, num);
+
+ break;
+
+ case LOGOUT:
+ token = timlex(NULL, NULL, sieved_in);
+
+ /* timlex() will return LOGOUT when the remote disconnects badly */
+ if (token!=EOL && token!=EOF && token!=LOGOUT)
+ {
+ error_msg = "Garbage after logout command";
+ goto error;
+ }
+
+ /* no referral for logout */
+
+ cmd_logout(sieved_out, sieved_in);
+
+ ret = TRUE;
+ goto done;
+ break;
+
+ case GETSCRIPT:
+ if (timlex(NULL, NULL, sieved_in)!=SPACE)
+ {
+ error_msg = "SPACE must occur after GETSCRIPT";
+ goto error;
+ }
+
+ if (timlex(&sieve_name, NULL, sieved_in)!=STRING)
+ {
+ error_msg = "Did not specify script name";
+ goto error;
+ }
+
+ if (timlex(NULL, NULL, sieved_in)!=EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if(referral_host)
+ goto do_referral;
+
+ getscript(sieved_out, sieve_name);
+
+ break;
+
+
+ case PUTSCRIPT:
+ if (timlex(NULL, NULL, sieved_in)!=SPACE)
+ {
+ error_msg = "SPACE must occur after PUTSCRIPT";
+ goto error;
+ }
+
+ if (timlex(&sieve_name, NULL, sieved_in)!=STRING)
+ {
+ error_msg = "Did not specify script name";
+ goto error;
+ }
+
+ if (timlex(NULL, NULL, sieved_in)!=SPACE)
+ {
+ error_msg = "Expected SPACE";
+ goto error;
+ }
+
+ if (timlex(&sieve_data, NULL, sieved_in)!=STRING)
+ {
+ error_msg = "Did not specify legal script data length";
+ goto error;
+ }
+
+ if (timlex(NULL, NULL, sieved_in)!=EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if(referral_host)
+ goto do_referral;
+
+ putscript(sieved_out, sieve_name, sieve_data, verify_only);
+
+ break;
+
+ case SETACTIVE:
+ if (timlex(NULL, NULL, sieved_in)!=SPACE)
+ {
+ error_msg = "SPACE must occur after SETACTIVE";
+ goto error;
+ }
+
+ if (timlex(&sieve_name, NULL, sieved_in)!=STRING)
+ {
+ error_msg = "Did not specify script name";
+ goto error;
+ }
+
+ if (timlex(NULL, NULL, sieved_in)!=EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if(referral_host)
+ goto do_referral;
+
+ setactive(sieved_out, sieve_name);
+
+ break;
+
+ case DELETESCRIPT:
+ if (timlex(NULL, NULL, sieved_in)!=SPACE)
+ {
+ error_msg = "SPACE must occur after DELETESCRIPT";
+ goto error;
+ }
+
+ if (timlex(&sieve_name, NULL, sieved_in)!=STRING)
+ {
+ error_msg = "Did not specify script name";
+ goto error;
+ }
+
+ if (timlex(NULL, NULL, sieved_in)!=EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if(referral_host)
+ goto do_referral;
+
+ deletescript(sieved_out, sieve_name);
+
+ break;
+
+ case LISTSCRIPTS:
+
+ if (timlex(NULL, NULL, sieved_in)!=EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if(referral_host)
+ goto do_referral;
+
+ listscripts(sieved_out);
+
+ break;
+
+ case STARTTLS:
+
+ if (timlex(NULL, NULL, sieved_in)!=EOL)
+ {
+ error_msg = "Expected EOL";
+ goto error;
+ }
+
+ if(referral_host)
+ goto do_referral;
+
+ cmd_starttls(sieved_out, sieved_in);
+
+ break;
+
+ default:
+ error_msg="Expected a command. Got something else.";
+ goto error;
+ break;
+
+ }
+
+ done:
+ /* free memory */
+ free(mechanism_name);
+ free(initial_challenge);
+ free(sieve_name);
+ free(sieve_data);
+
+ prot_flush(sieved_out);
+
+ return ret;
+
+ error:
+
+ /* free memory */
+ free(mechanism_name);
+ free(initial_challenge);
+ free(sieve_name);
+ free(sieve_data);
+
+ prot_printf(sieved_out, "NO \"%s\"\r\n",error_msg);
+ prot_flush(sieved_out);
+
+ return FALSE;
+
+ do_referral:
+ {
+ char buf[4096];
+ char *c;
+
+ /* Truncate the hostname if necessary */
+ strlcpy(buf, referral_host, sizeof(buf));
+ c = strchr(buf, '!');
+ if(c) *c = '\0';
+
+ prot_printf(sieved_out, "BYE (REFERRAL \"sieve://%s\") \"Try Remote.\"\r\n",
+ buf);
+ ret = TRUE;
+ goto done;
+ }
+
+}
+
+
+void cmd_logout(struct protstream *sieved_out,
+ struct protstream *sieved_in __attribute__((unused)))
+{
+ prot_printf(sieved_out, "OK \"Logout Complete\"\r\n");
+ prot_flush(sieved_out);
+}
+
+static sasl_ssf_t ssf = 0;
+static char *authid = NULL;
+
+extern int reset_saslconn(sasl_conn_t **conn, sasl_ssf_t ssf, char *authid);
+
+static int cmd_authenticate(struct protstream *sieved_out,
+ struct protstream *sieved_in,
+ mystring_t *mechanism_name,
+ mystring_t *initial_challenge,
+ const char **errmsg)
+{
+
+ int sasl_result;
+
+ char *mech = string_DATAPTR(mechanism_name);
+
+ mystring_t *clientinstr=NULL;
+ char *clientin = NULL;
+ unsigned int clientinlen = 0;
+
+ const char *serverout=NULL;
+ unsigned int serveroutlen;
+ const char *errstr=NULL;
+ const char *canon_user;
+ char *username;
+ int ret = TRUE;
+
+ clientinstr = initial_challenge;
+ if (clientinstr!=NULL)
+ {
+ clientin=(char *) malloc(clientinstr->len*2);
+
+ if (clientinstr->len) {
+ sasl_result=sasl_decode64(string_DATAPTR(clientinstr),
+ clientinstr->len,
+ clientin, clientinstr->len*2,
+ &clientinlen);
+ } else {
+ clientinlen = 0;
+ sasl_result = SASL_OK;
+ }
+
+ if (sasl_result!=SASL_OK)
+ {
+ *errmsg="error base64 decoding string";
+ syslog(LOG_NOTICE, "badlogin: %s %s %s",
+ sieved_clienthost, mech, "error base64 decoding string");
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ return FALSE;
+ }
+ }
+
+ sasl_result = sasl_server_start(sieved_saslconn, mech,
+ clientin, clientinlen,
+ &serverout, &serveroutlen);
+
+ while (sasl_result==SASL_CONTINUE)
+ {
+ int token1;
+ int token2;
+ mystring_t *str, *blahstr;
+ char *inbase64;
+ unsigned int inbase64len;
+
+ /* convert to base64 */
+ inbase64 = xmalloc(serveroutlen*2+1);
+ sasl_encode64(serverout, serveroutlen,
+ inbase64, serveroutlen*2+1, &inbase64len);
+
+ /* send out the string always as a literal */
+ prot_printf(sieved_out, "{%d}\r\n",inbase64len);
+ prot_write(sieved_out,inbase64,inbase64len);
+ prot_printf(sieved_out,"\r\n");
+
+ token1 = timlex(&str, NULL, sieved_in);
+
+ if (token1==STRING)
+ {
+ clientin=(char *) malloc(str->len*2);
+
+ if (str->len) {
+ sasl_result=sasl_decode64(string_DATAPTR(str), str->len,
+ clientin, str->len*2, &clientinlen);
+ } else {
+ clientinlen = 0;
+ sasl_result = SASL_OK;
+ }
+
+ if (sasl_result!=SASL_OK)
+ {
+ *errmsg="error base64 decoding string";
+ syslog(LOG_NOTICE, "badlogin: %s %s %s",
+ sieved_clienthost, mech, "error base64 decoding string");
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ return FALSE;
+ }
+
+ } else {
+ *errmsg="Expected STRING-xxx1";
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ return FALSE;
+ }
+
+ token2 = timlex(&blahstr, NULL, sieved_in);
+
+ /* we want to see a STRING followed by EOL */
+ if ((token1==STRING) && (token2==EOL))
+ {
+ sasl_result = sasl_server_step(sieved_saslconn,
+ clientin,
+ clientinlen,
+ &serverout, &serveroutlen);
+ } else {
+ *errmsg = "expected a STRING followed by an EOL";
+ syslog(LOG_NOTICE, "badlogin: %s %s %s",
+ sieved_clienthost, mech, "expected string");
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ return FALSE;
+ }
+
+ }
+
+ if (sasl_result!=SASL_OK)
+ {
+ /* convert to user error code */
+ if(sasl_result == SASL_NOUSER)
+ sasl_result = SASL_BADAUTH;
+ *errmsg = (const char *) sasl_errstring(sasl_result,NULL,NULL);
+ if (errstr!=NULL) {
+ syslog(LOG_NOTICE, "badlogin: %s %s %d %s",
+ sieved_clienthost, mech, sasl_result, errstr);
+ } else {
+ syslog(LOG_NOTICE, "badlogin: %s %s %s",
+ sieved_clienthost, mech,
+ sasl_errstring(sasl_result, NULL, NULL));
+ }
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ return FALSE;
+ }
+
+ /* get the userid from SASL */
+ sasl_result=sasl_getprop(sieved_saslconn, SASL_USERNAME,
+ (const void **) &canon_user);
+ if (sasl_result!=SASL_OK)
+ {
+ *errmsg = "Internal SASL error";
+ syslog(LOG_ERR, "SASL: sasl_getprop SASL_USERNAME: %s",
+ sasl_errstring(sasl_result, NULL, NULL));
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ return FALSE;
+ }
+ username = xstrdup(canon_user);
+
+ verify_only = !strcmp(username, "anonymous");
+
+ if (!verify_only) {
+ /* Check for a remote mailbox (should we setup a redirect?) */
+ struct namespace sieved_namespace;
+ char inboxname[MAX_MAILBOX_NAME];
+ char *server;
+ int type = 0, r;
+
+ /* Set namespace */
+ if ((r = mboxname_init_namespace(&sieved_namespace, 0)) != 0) {
+ syslog(LOG_ERR, error_message(r));
+ fatal(error_message(r), EC_CONFIG);
+ }
+
+ /* Translate any separators in userid */
+ mboxname_hiersep_tointernal(&sieved_namespace, username,
+ config_virtdomains ?
+ strcspn(username, "@") : 0);
+
+ (*sieved_namespace.mboxname_tointernal)(&sieved_namespace, "INBOX",
+ username, inboxname);
+
+ r = mboxlist_detail(inboxname, &type, &server, NULL, NULL, NULL, NULL);
+
+ if(r && !sieved_userisadmin) {
+ /* mboxlist_detail error */
+ syslog(LOG_ERR, error_message(r));
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ ret = FALSE;
+ goto cleanup;
+ }
+
+ if(type & MBTYPE_REMOTE) {
+ /* It's a remote mailbox */
+ if (config_getswitch(IMAPOPT_SIEVE_ALLOWREFERRALS)) {
+ /* We want to set up a referral */
+ if (sieved_domainfromip) {
+ char *authname, *p;
+
+ /* get a new copy of the userid */
+ free(username);
+ username = xstrdup(canon_user);
+
+ /* get the authid from SASL */
+ sasl_result=sasl_getprop(sieved_saslconn, SASL_AUTHUSER,
+ (const void **) &canon_user);
+ if (sasl_result!=SASL_OK) {
+ *errmsg = "Internal SASL error";
+ syslog(LOG_ERR, "SASL: sasl_getprop SASL_AUTHUSER: %s",
+ sasl_errstring(sasl_result, NULL, NULL));
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ ret = FALSE;
+ goto cleanup;
+ }
+ authname = xstrdup(canon_user);
+
+ if ((p = strchr(authname, '@'))) *p = '%';
+ if ((p = strchr(username, '@'))) *p = '%';
+
+ referral_host =
+ (char*) xmalloc(strlen(authname)+1+strlen(username)+1+
+ strlen(server)+1);
+ sprintf((char*) referral_host, "%s;%s@%s",
+ authname, username, server);
+
+ free(authname);
+ }
+ else
+ referral_host = xstrdup(server);
+ }
+ else {
+ /* We want to set up a connection to the backend for proxying */
+ const char *statusline = NULL;
+
+ /* xxx hide the fact that we are storing partitions */
+ if (server) {
+ char *c;
+ c = strchr(server, '!');
+ if(c) *c = '\0';
+ }
+
+ backend = backend_connect(NULL, server, &protocol[PROTOCOL_SIEVE],
+ username, NULL, &statusline);
+
+ if (!backend) {
+ syslog(LOG_ERR, "couldn't authenticate to backend server");
+ prot_printf(sieved_out, "NO \"%s\"\r\n",
+ statusline ? statusline :
+ "Authentication to backend server failed");
+ prot_flush(sieved_out);
+
+ goto cleanup;
+ }
+ }
+ } else if (actions_setuser(username) != TIMSIEVE_OK) {
+ *errmsg = "internal error";
+ syslog(LOG_ERR, "error in actions_setuser()");
+
+ if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK)
+ fatal("could not reset the sasl_conn_t after failure",
+ EC_TEMPFAIL);
+
+ ret = FALSE;
+ goto cleanup;
+ }
+ }
+
+ /* Yay! authenticated */
+ if(serverout) {
+ char *inbase64;
+ unsigned int inbase64len;
+
+ /* convert to base64 */
+ inbase64 = xmalloc(serveroutlen*2+1);
+ sasl_encode64(serverout, serveroutlen,
+ inbase64, serveroutlen*2+1, &inbase64len);
+
+ prot_printf(sieved_out, "OK (SASL \"%s\")\r\n", inbase64);
+ free(inbase64);
+ } else {
+ prot_printf(sieved_out, "OK\r\n");
+ }
+
+ syslog(LOG_NOTICE, "login: %s %s %s%s %s", sieved_clienthost, username,
+ mech, starttls_done ? "+TLS" : "", "User logged in");
+
+ authenticated = 1;
+
+ prot_setsasl(sieved_in, sieved_saslconn);
+ prot_setsasl(sieved_out, sieved_saslconn);
+
+ /* Create telemetry log */
+ sieved_logfd = telemetry_log(username, sieved_in, sieved_out, 0);
+
+ cleanup:
+ /* free memory */
+ free(username);
+
+ return ret;
+}
+
+#ifdef HAVE_SSL
+static int cmd_starttls(struct protstream *sieved_out, struct protstream *sieved_in)
+{
+ int result;
+ int *layerp;
+
+ /* SASL and openssl have different ideas about whether ssf is signed */
+ layerp = (int *) &ssf;
+
+ if (starttls_done == 1)
+ {
+ prot_printf(sieved_out, "NO \"TLS already active\"\r\n");
+ return TIMSIEVE_FAIL;
+ }
+
+ result=tls_init_serverengine("sieve",
+ 5, /* depth to verify */
+ 1, /* can client auth? */
+ 1); /* TLS only? */
+
+ if (result == -1) {
+
+ syslog(LOG_ERR, "error initializing TLS");
+
+ prot_printf(sieved_out, "NO \"Error initializing TLS\"\r\n");
+
+ return TIMSIEVE_FAIL;
+ }
+
+ prot_printf(sieved_out, "OK \"Begin TLS negotiation now\"\r\n");
+ /* must flush our buffers before starting tls */
+ prot_flush(sieved_out);
+
+ result=tls_start_servertls(0, /* read */
+ 1, /* write */
+ layerp,
+ &authid,
+ &tls_conn);
+
+ /* if error */
+ if (result==-1) {
+ prot_printf(sieved_out, "NO \"Starttls failed\"\r\n");
+ syslog(LOG_NOTICE, "STARTTLS failed: %s", sieved_clienthost);
+ return TIMSIEVE_FAIL;
+ }
+
+ /* tell SASL about the negotiated layer */
+ result = sasl_setprop(sieved_saslconn, SASL_SSF_EXTERNAL, &ssf);
+
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+
+ result = sasl_setprop(sieved_saslconn, SASL_AUTH_EXTERNAL, authid);
+
+ if (result != SASL_OK) {
+ fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL);
+ }
+
+ /* tell the prot layer about our new layers */
+ prot_settls(sieved_in, tls_conn);
+ prot_settls(sieved_out, tls_conn);
+
+ starttls_done = 1;
+
+ return result;
+}
+#else
+static int cmd_starttls(struct protstream *sieved_out, struct protstream *sieved_in)
+{
+ fatal("cmd_starttls() called, but no OpenSSL", EC_SOFTWARE);
+}
+#endif /* HAVE_SSL */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/parser.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,56 @@
+/* parser.h
+ * Tim Martin
+ * 9/21/99
+ * $Id: parser.h,v 1.4 2003/02/13 20:15:59 rjs3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifndef PARSER_H
+#define PARSER_H
+
+#include "prot.h"
+
+int parser(struct protstream *sieved_out,
+ struct protstream *sieved_in);
+
+
+#endif /* PARSER_H */
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,218 @@
+/* scripttest.c -- test wheather the sieve script is valid
+ * Tim Martin
+ * $Id: scripttest.c,v 1.21.2.5 2004/08/05 16:23:52 ken3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "sieve_interface.h"
+#include "scripttest.h"
+#include <syslog.h>
+
+#include "codes.h"
+
+#include "mystring.h"
+
+#include "xmalloc.h"
+#include <string.h>
+#include <stdlib.h>
+
+/* to make larry's stupid functions happy :) */
+void foo(void)
+{
+ fatal("stub function called", 0);
+}
+
+
+sieve_vacation_t vacation = {
+ 0, /* min response */
+ 0, /* max response */
+ (sieve_callback *) &foo, /* autorespond() */
+ (sieve_callback *) &foo /* send_response() */
+};
+
+static int sieve_notify(void *ac __attribute__((unused)),
+ void *interp_context __attribute__((unused)),
+ void *script_context __attribute__((unused)),
+ void *message_context __attribute__((unused)),
+ const char **errmsg __attribute__((unused)))
+{
+ fatal("stub function called", 0);
+ return SIEVE_FAIL;
+}
+
+int mysieve_error(int lineno, const char *msg,
+ void *i __attribute__((unused)), void *s)
+{
+ char buf[1024];
+ char **errstr = (char **) s;
+
+ snprintf(buf, 80, "line %d: %s\r\n", lineno, msg);
+ *errstr = xrealloc(*errstr, strlen(*errstr) + strlen(buf) + 30);
+ syslog(LOG_DEBUG, "%s", buf);
+ strcat(*errstr, buf);
+
+ return SIEVE_OK;
+}
+
+/* returns TRUE or FALSE */
+int build_sieve_interp(void)
+{
+ int res;
+
+ res = sieve_interp_alloc(&interp, NULL);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_interp_alloc() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_redirect(interp, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_redirect() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+ res = sieve_register_discard(interp, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_discard() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+ res = sieve_register_reject(interp, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_reject() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+ res = sieve_register_fileinto(interp, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_fileinto() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+ res = sieve_register_keep(interp, (sieve_callback *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_keep() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_imapflags(interp, NULL);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_imapflags() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_size(interp, (sieve_get_size *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_size() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_header(interp, (sieve_get_header *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_header() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_envelope(interp, (sieve_get_envelope *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_envelope() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_body(interp, (sieve_get_body *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_body() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_include(interp, (sieve_get_include *) &foo);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_include() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_vacation(interp, &vacation);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_vacation() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_notify(interp, &sieve_notify);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_notify() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ res = sieve_register_parse_error(interp, &mysieve_error);
+ if (res != SIEVE_OK) {
+ syslog(LOG_ERR, "sieve_register_parse_error() returns %d\n", res);
+ return TIMSIEVE_FAIL;
+ }
+
+ return TIMSIEVE_OK;
+}
+
+/* returns TRUE or FALSE */
+int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret)
+{
+ sieve_script_t *s;
+ int res;
+
+ rewind(stream);
+
+ *errstr = (char *) xmalloc(20 * sizeof(char));
+ strcpy(*errstr, "script errors:\r\n");
+
+ res = sieve_script_parse(interp, stream, errstr, &s);
+
+ if (res == SIEVE_OK) {
+ if(ret) {
+ *ret = s;
+ } else {
+ sieve_script_free(&s);
+ }
+ free(*errstr);
+ *errstr = NULL;
+ }
+
+ return (res == SIEVE_OK) ? TIMSIEVE_OK : TIMSIEVE_FAIL;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.h
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.h?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.h (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/scripttest.h Sat Aug 26 02:00:13 2006
@@ -1,0 +1,55 @@
+/* scripttest.h -- test whether the sieve script is valid
+ * Tim Martin
+ * $Id: scripttest.h,v 1.9.2.1 2004/06/23 20:15:20 ken3 Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+
+#ifndef INCLUDE_SCRIPTTEST_H_
+#define INCLUDE_SCRIPTTEST_H_
+
+extern sieve_interp_t *interp;
+
+int build_sieve_interp(void);
+int is_script_parsable(FILE *f, char **errstr, sieve_script_t **ret);
+
+#endif
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/timsieved.c
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/timsieved.c?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/timsieved.c (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/timsieved/timsieved.c Sat Aug 26 02:00:13 2006
@@ -1,0 +1,422 @@
+/* timsieved.c -- main file for timsieved (sieve script accepting program)
+ * Tim Martin
+ * 9/21/99
+ * $Id: timsieved.c,v 1.48.2.12 2006/06/27 15:58:43 murch Exp $
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sasl/sasl.h> /* yay! sasl */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <sys/param.h>
+#include <syslog.h>
+#include <dirent.h>
+#include <ctype.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include <signal.h>
+#include <string.h>
+
+#include "sieve_interface.h"
+
+#include "prot.h"
+#include "libconfig.h"
+#include "xmalloc.h"
+#include "exitcodes.h"
+#include "iptostring.h"
+#include "global.h"
+#include "codes.h"
+#include "actions.h"
+#include "parser.h"
+#include "lex.h"
+#include "mystring.h"
+
+#include "auth.h"
+#include "acl.h"
+#include "backend.h"
+#include "mboxlist.h"
+#include "util.h"
+
+#include "scripttest.h"
+
+#include "sync_log.h"
+
+/* global state */
+const int config_need_data = 0;
+
+sieve_interp_t *interp = NULL;
+
+static struct
+{
+ char *ipremoteport;
+ char *iplocalport;
+} saslprops = {NULL,NULL};
+
+sasl_conn_t *sieved_saslconn; /* the sasl connection context */
+
+struct auth_state *sieved_authstate = 0;
+
+struct sockaddr_storage sieved_localaddr;
+struct sockaddr_storage sieved_remoteaddr;
+
+struct protstream *sieved_out;
+struct protstream *sieved_in;
+
+int sieved_logfd = -1;
+
+int sieved_haveaddr = 0;
+char sieved_clienthost[NI_MAXHOST*2+1] = "[local]";
+
+int sieved_userisadmin;
+int sieved_domainfromip = 0;
+
+/* the sasl proxy policy context */
+static struct proxy_context sieved_proxyctx = {
+ 1, 1, &sieved_authstate, &sieved_userisadmin, NULL
+};
+
+/* PROXY stuff */
+struct backend *backend = NULL;
+
+static void bitpipe(void);
+/* end PROXY stuff */
+
+/*
+ * Cleanly shut down and exit
+ */
+void shut_down(int code) __attribute__ ((noreturn));
+void shut_down(int code)
+{
+ /* free interpreter */
+ if (interp) sieve_interp_free(&interp);
+
+ /* close backend connection */
+ if (backend) {
+ backend_disconnect(backend);
+ free(backend);
+ }
+
+ /* close mailboxes */
+ mboxlist_close();
+ mboxlist_done();
+
+ /* cleanup */
+ if (sieved_out) {
+ prot_flush(sieved_out);
+ prot_free(sieved_out);
+ }
+ if (sieved_in) prot_free(sieved_in);
+
+ if (sieved_logfd != -1) close(sieved_logfd);
+
+#ifdef HAVE_SSL
+ tls_shutdown_serverengine();
+#endif
+
+ cyrus_done();
+
+ cyrus_reset_stdio();
+
+ /* done */
+ exit(code);
+}
+
+void cmdloop()
+{
+ int ret = FALSE;
+
+ chdir("/tmp/");
+
+ capabilities(sieved_out, sieved_saslconn, 0, 0);
+
+ /* initialize lexer */
+ lex_init();
+
+ while (ret != TRUE)
+ {
+ if (backend) {
+ /* create a pipe from client to backend */
+ bitpipe();
+
+ /* pipe has been closed */
+ return;
+ }
+
+ ret = parser(sieved_out, sieved_in);
+ }
+
+ /* done */
+ shut_down(0);
+}
+
+void printstring(const char *s __attribute__((unused)))
+{
+ /* needed to link against annotate.o */
+ fatal("printstring() executed, but its not used for timsieved!",
+ EC_SOFTWARE);
+}
+
+void fatal(const char *s, int code)
+{
+ static int recurse_code = 0;
+
+ if (recurse_code) {
+ /* We were called recursively. Just give up */
+ exit(recurse_code);
+ }
+ recurse_code = code;
+
+ prot_printf(sieved_out, "NO Fatal error: %s\r\n", s);
+ prot_flush(sieved_out);
+
+ shut_down(EC_TEMPFAIL);
+}
+
+static struct sasl_callback mysasl_cb[] = {
+ { SASL_CB_GETOPT, &mysasl_config, NULL },
+ { SASL_CB_PROXY_POLICY, &mysasl_proxy_policy, (void*) &sieved_proxyctx },
+ { SASL_CB_CANON_USER, &mysasl_canon_user, (void*) &sieved_domainfromip },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
+
+int service_init(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ global_sasl_init(1, 1, mysasl_cb);
+
+ /* open mailboxes */
+ mboxlist_init(0);
+ mboxlist_open(NULL);
+
+ if (build_sieve_interp() != TIMSIEVE_OK) shut_down(EX_SOFTWARE);
+
+ return 0;
+}
+
+/* Called by service API to shut down the service */
+void service_abort(int error)
+{
+ shut_down(error);
+}
+
+int service_main(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ char **envp __attribute__((unused)))
+{
+ socklen_t salen;
+ int timeout;
+ int secflags = 0;
+ char remoteip[60], localip[60];
+ sasl_security_properties_t *secprops = NULL;
+ char hbuf[NI_MAXHOST];
+ int niflags;
+
+ sync_log_init();
+
+ /* set up the prot streams */
+ sieved_in = prot_new(0, 0);
+ sieved_out = prot_new(1, 1);
+
+ timeout = config_getint(IMAPOPT_TIMEOUT);
+ if (timeout < 10) timeout = 10;
+ prot_settimeout(sieved_in, timeout * 60);
+ prot_setflushonread(sieved_in, sieved_out);
+
+ signal(SIGPIPE, SIG_IGN);
+
+ if (geteuid() == 0) fatal("must run as the Cyrus user", -6);
+
+ /* Find out name of client host */
+ salen = sizeof(sieved_remoteaddr);
+ if (getpeername(0, (struct sockaddr *)&sieved_remoteaddr, &salen) == 0 &&
+ (sieved_remoteaddr.ss_family == AF_INET ||
+ sieved_remoteaddr.ss_family == AF_INET6)) {
+ if (getnameinfo((struct sockaddr *)&sieved_remoteaddr, salen,
+ hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD) == 0) {
+ strncpy(sieved_clienthost, hbuf, sizeof(hbuf));
+ } else {
+ sieved_clienthost[0] = '\0';
+ }
+ niflags = NI_NUMERICHOST;
+#ifdef NI_WITHSCOPEID
+ if (((struct sockaddr *)&sieved_remoteaddr)->sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+#endif
+ if (getnameinfo((struct sockaddr *)&sieved_remoteaddr, salen, hbuf,
+ sizeof(hbuf), NULL, 0, niflags) != 0)
+ strlcpy(hbuf, "unknown", sizeof(hbuf));
+ strlcat(sieved_clienthost, "[", sizeof(sieved_clienthost));
+ strlcat(sieved_clienthost, hbuf, sizeof(sieved_clienthost));
+ strlcat(sieved_clienthost, "]", sizeof(sieved_clienthost));
+ salen = sizeof(sieved_localaddr);
+ if(getsockname(0, (struct sockaddr *)&sieved_localaddr, &salen) == 0) {
+ sieved_haveaddr = 1;
+ }
+ }
+
+ /* other params should be filled in */
+ if (sasl_server_new(SIEVE_SERVICE_NAME, config_servername, NULL,
+ NULL, NULL, NULL, SASL_SUCCESS_DATA,
+ &sieved_saslconn) != SASL_OK)
+ fatal("SASL failed initializing: sasl_server_new()", -1);
+
+ if(iptostring((struct sockaddr *)&sieved_remoteaddr,
+ salen, remoteip, 60) == 0) {
+ sasl_setprop(sieved_saslconn, SASL_IPREMOTEPORT, remoteip);
+ saslprops.ipremoteport = xstrdup(remoteip);
+ }
+ if(iptostring((struct sockaddr *)&sieved_localaddr,
+ salen, localip, 60) == 0) {
+ sasl_setprop(sieved_saslconn, SASL_IPLOCALPORT, localip);
+ saslprops.iplocalport = xstrdup(localip);
+ }
+
+ /* will always return something valid */
+ /* should be configurable! */
+ if (!config_getswitch(IMAPOPT_ALLOWPLAINTEXT)) {
+ secflags |= SASL_SEC_NOPLAINTEXT;
+ }
+ secprops = mysasl_secprops(secflags);
+ sasl_setprop(sieved_saslconn, SASL_SEC_PROPS, secprops);
+
+ if (actions_init() != TIMSIEVE_OK)
+ fatal("Error initializing actions",-1);
+
+ cmdloop();
+
+ /* never reaches */
+ exit(EC_SOFTWARE);
+}
+
+/* Reset the given sasl_conn_t to a sane state */
+int reset_saslconn(sasl_conn_t **conn, sasl_ssf_t ssf, char *authid)
+{
+ int ret = 0;
+ int secflags = 0;
+ sasl_security_properties_t *secprops = NULL;
+
+ sasl_dispose(conn);
+ /* do initialization typical of service_main */
+ ret = sasl_server_new(SIEVE_SERVICE_NAME, config_servername,
+ NULL, NULL, NULL,
+ NULL, SASL_SUCCESS_DATA, conn);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.ipremoteport)
+ ret = sasl_setprop(*conn, SASL_IPREMOTEPORT,
+ saslprops.ipremoteport);
+ if(ret != SASL_OK) return ret;
+
+ if(saslprops.iplocalport)
+ ret = sasl_setprop(*conn, SASL_IPLOCALPORT,
+ saslprops.iplocalport);
+ if(ret != SASL_OK) return ret;
+
+ if (!config_getswitch(IMAPOPT_ALLOWPLAINTEXT)) {
+ secflags |= SASL_SEC_NOPLAINTEXT;
+ }
+ secprops = mysasl_secprops(secflags);
+ ret = sasl_setprop(*conn, SASL_SEC_PROPS, secprops);
+ if(ret != SASL_OK) return ret;
+
+ /* end of service_main initialization excepting SSF */
+
+ /* If we have TLS/SSL info, set it */
+ if(ssf) {
+ ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &ssf);
+ if(ret != SASL_OK) return ret;
+ }
+
+ if(authid) {
+ ret = sasl_setprop(*conn, SASL_AUTH_EXTERNAL, authid);
+ if(ret != SASL_OK) return ret;
+ }
+ /* End TLS/SSL Info */
+
+ return SASL_OK;
+}
+
+/* we've authenticated the client, we've connected to the backend.
+ now it's all up to them */
+static void bitpipe(void)
+{
+ struct protgroup *protin = protgroup_new(2);
+ int shutdown = 0;
+ char buf[4096];
+
+ protgroup_insert(protin, sieved_in);
+ protgroup_insert(protin, backend->in);
+
+ do {
+ /* Flush any buffered output */
+ prot_flush(sieved_out);
+ prot_flush(backend->out);
+
+ /* check for shutdown file */
+ if (shutdown_file(buf, sizeof(buf))) {
+ shutdown = 1;
+ goto done;
+ }
+ } while (!proxy_check_input(protin, sieved_in, sieved_out,
+ backend->in, backend->out, 0));
+
+ done:
+ /* ok, we're done. */
+ protgroup_free(protin);
+
+ if (shutdown) prot_printf(sieved_out, "NO \"%s\"\r\n", buf);
+
+ return;
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Entries
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Entries?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Entries (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Entries Sat Aug 26 02:00:13 2006
@@ -1,0 +1,16 @@
+/arbitronsort.pl/1.2/Mon Aug 4 17:13:24 2003//Tcyrus-release-2-3-7
+/config2header/1.2.2.12/Wed Apr 13 15:43:33 2005//Tcyrus-release-2-3-7
+/config2man/1.2.2.1/Fri Dec 19 18:33:58 2003//Tcyrus-release-2-3-7
+/convert-sieve.pl/1.2/Wed Oct 22 18:03:47 2003//Tcyrus-release-2-3-7
+/dohash/1.10.18.1/Thu Dec 1 22:30:21 2005//Tcyrus-release-2-3-7
+/masssievec/1.2.2.3/Thu Dec 1 22:30:21 2005//Tcyrus-release-2-3-7
+/migrate-metadata/1.1.2.3/Thu Dec 1 22:30:22 2005//Tcyrus-release-2-3-7
+/mkimap/1.15.2.4/Thu Dec 1 22:30:22 2005//Tcyrus-release-2-3-7
+/mknewsgroups/1.2/Wed Oct 22 18:03:47 2003//Tcyrus-release-2-3-7
+/mupdate-loadgen.pl/1.2/Wed Oct 22 18:03:47 2003//Tcyrus-release-2-3-7
+/not-mkdep/1.3/Tue May 23 20:56:53 2000//Tcyrus-release-2-3-7
+/rehash/1.7.2.1/Thu Dec 1 22:30:22 2005//Tcyrus-release-2-3-7
+/translatesieve/1.6.8.1/Thu Dec 1 22:30:22 2005//Tcyrus-release-2-3-7
+/undohash/1.7.8.1/Thu Dec 1 22:30:23 2005//Tcyrus-release-2-3-7
+/upgradesieve/1.6.18.1/Thu Dec 1 22:30:23 2005//Tcyrus-release-2-3-7
+D
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Repository
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Repository?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Repository (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Repository Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+src/cyrus/tools
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Root
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Root?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Root (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Root Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+:pserver:anoncvs at cvs.andrew.cmu.edu:/cvs
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Tag
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Tag?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Tag (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/CVS/Tag Sat Aug 26 02:00:13 2006
@@ -1,0 +1,1 @@
+Ncyrus-release-2-3-7
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/arbitronsort.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/arbitronsort.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/arbitronsort.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/arbitronsort.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,32 @@
+#!/usr/local/bin/perl
+
+#
+# This script takes the output of arbitron (run without the -o option)
+# and prints out first
+# a ranking of mailboxes by # of people who selected the mailbox
+# and then a ranking of mailbox by # of subscribers.
+#
+
+%data = ();
+%subs = ();
+
+while(<>) {
+ /^(.*) (\d+) (\d+)$/;
+ $data{$1} = $2;
+ $subs{$1} = $3;
+}
+
+$rank = 1;
+
+foreach $key (sort { $data{$b} <=> $data{$a} } (sort keys %data)) {
+ print $rank++ . ": $key - $data{$key}\n";
+}
+
+print "\n\n";
+
+$rank = 1;
+
+foreach $key (sort { $subs{$b} <=> $subs{$a} } (sort keys %subs)) {
+ print $rank++ . ": $key - $subs{$key}\n";
+}
+
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/arbitronsort.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2header
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2header?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2header (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2header Sat Aug 26 02:00:13 2006
@@ -1,0 +1,315 @@
+#!/bin/sh
+# $Id: config2header,v 1.2.2.12 2005/04/13 15:43:33 shadow Exp $
+#
+# Copyright (c) 2001 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+use strict;
+
+my $enum_size = 0;
+my @enum_values = ();
+
+my $CC;
+#
+# Look for CC=xxx "assigments" in the argument list.
+#
+while ($#ARGV >= 0) {
+ last unless ($ARGV[0] =~ m/^(\S+)=(\S+)$/);
+ eval "\$$1='$2';";
+ die "$@" if ($@);
+ shift @ARGV;
+}
+
+my $use_gcc_extension = ($CC and $CC eq 'gcc');
+
+die "wrong number of arguments" if ($#ARGV != 1);
+my ($cfile, $hfile) = @ARGV;
+
+open CFILE, ">$cfile";
+open HFILE, ">$hfile";
+
+my $blank = "";
+my $version = "\$Revision: 1.2.2.12 $blank";
+$version =~ s/.Revision: (.*) /$1/;
+print HFILE "/* auto-generated by config2header $version */\n";
+print CFILE "/* auto-generated by config2header $version */\n";
+
+print HFILE "#ifndef INCLUDED_IMAPOPTS_H\n";
+print HFILE "#define INCLUDED_IMAPOPTS_H\n";
+print HFILE "\n";
+
+# prototypes
+my @opttype = ("OPT_NOTOPT","OPT_STRING","OPT_INT","OPT_SWITCH","OPT_ENUM","OPT_STRINGLIST","OPT_BITFIELD");
+print HFILE "enum opttype {\n";
+while (my $opt = pop (@opttype)) {
+ if ($#opttype == -1) {
+ print HFILE " $opt\n";
+ } else {
+ print HFILE " $opt,\n";
+ }
+}
+print HFILE "};\n\n";
+
+print HFILE <<EOF
+enum imapopt {
+ IMAPOPT_ZERO = 0,
+EOF
+ ;
+
+print CFILE <<EOF
+/* DO NOT EDIT */
+/* THIS FILE AUTOMATICALLY GENERATED BY config2header $version */
+#include <config.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <syslog.h>
+#include <stdlib.h>
+#include <string.h>
+#include "imapopts.h"
+
+struct imapopt_s imapopts[] =
+{
+ { IMAPOPT_ZERO, "", 0, { NULL }, OPT_NOTOPT, { { NULL, IMAP_ENUM_ZERO } } },
+EOF
+ ;
+
+# output enumeration
+
+while (<STDIN>) {
+ next if (/^\#/);
+ # look for { option, default, type [enums] }
+
+ # Note that the code we output has to play interesting games to get
+ # the union to initialize itself in a syntacticly valid manner.
+ # Namely, we need to initialize the union itself, not the members of
+ # the union, and we need to ensure we are initilizing the union with
+ # something of a type that is in the union.
+ if (m|{\s*\"(.*?)\"\s*,\s*(\"?.*?\"?)\s*,\s*(.*?)\s*(\(.*\))?\s*}|) {
+ my $opt = $1;
+ my $def;
+ my $enums = "";
+
+ print HFILE " IMAPOPT_", uc($opt), ",\n";
+
+ if ($3 eq "STRING") {
+ $def = $use_gcc_extension
+ ? "(union config_value)((const char *) $2)"
+ : "{(void *)($2)}";
+ } elsif ($3 eq "ENUM") {
+ my @values = eval $4;
+ my $e;
+ my $v;
+ my $count = 0;
+
+ # strip quotes from default value
+ $def = substr($2, 1, -1);
+ $e = "IMAP_ENUM_" . uc($opt) . "_" . uc($def);
+ $def = $use_gcc_extension
+ ? "(union config_value)((enum enum_value) $e)"
+ : "{(void *)($e)}";
+
+ # output the enum_options
+ foreach $v (@values) {
+ $e = "IMAP_ENUM_" . uc($opt) . "_" . uc($v);
+ $enums .= "{ \"$v\" , $e }, ";
+
+ # if this is the first enum value, normalize to zero
+ if (!$count) { $e .= " = 0"; }
+
+ # add this enum to enum_values
+ push(@enum_values, $e);
+
+ $count += 1; # count the number of values
+ }
+
+ # [re]set the size of the enum_options array
+ if ($count > $enum_size) { $enum_size = $count; }
+ } elsif ($3 eq "STRINGLIST") {
+ my @values = eval $4;
+ my $v;
+ my $count = 0;
+
+ $def = $use_gcc_extension
+ ? "(union config_value)((const char *) $2)"
+ : "{(void*)($2)}";
+
+ # output the enum_options
+ foreach $v (@values) {
+ $enums .= "{ \"$v\" , IMAP_ENUM_ZERO }, ";
+ $count += 1; # count the number of values
+ }
+
+ # [re]set the size of the enum_options array
+ if ($count > $enum_size) { $enum_size = $count; }
+ } elsif ($3 eq "BITFIELD") {
+ my @values;
+ my $e;
+ my $v;
+ my $count = 0;
+
+ # strip quotes from default value
+ $def = substr($2, 1, -1);
+
+ # build the bitwise-or of the defaults
+ @values = split(' ', $def);
+ $e = "";
+ foreach $v (@values) {
+ $e .= "IMAP_ENUM_" . uc($opt) . "_" . uc($v) . "|";
+ }
+ $e .= "0";
+ $def = $use_gcc_extension
+ ? "(union config_value)((unsigned long) $e)"
+ : "{(void *)($e)}";
+
+ # output the enum_options
+ @values = eval $4;
+ foreach $v (@values) {
+ $e = "IMAP_ENUM_" . uc($opt) . "_" . uc($v);
+ $enums .= "{ \"$v\" , $e }, ";
+
+ # add the corresponding bit value
+ $e .= " = (1<<$count)";
+
+ # add this enum to enum_values
+ push(@enum_values, $e);
+
+ $count += 1; # count the number of values
+ }
+
+ # [re]set the size of the enum_options array
+ if ($count > $enum_size) { $enum_size = $count; }
+ } else {
+ $def = $use_gcc_extension
+ ? "(union config_value)((long) $2)"
+ : "{(void*)$2}";
+ }
+
+ print CFILE " { IMAPOPT_", uc($opt), ", \"$1\", 0, $def, OPT_$3, { $enums { NULL, IMAP_ENUM_ZERO } } },\n";
+ } else {
+ #chomp;
+ #print "rejected '$_'\n";
+ }
+}
+
+print HFILE <<EOF
+ IMAPOPT_LAST
+};
+
+enum enum_value {
+ IMAP_ENUM_ZERO = 0,
+EOF
+;
+
+# add the enum_values
+while (my $e = pop (@enum_values)) {
+ if ($#enum_values == -1) {
+ print HFILE " $e\n";
+ } else {
+ print HFILE " $e,\n";
+ }
+}
+
+my $dummy_field = $use_gcc_extension ? '' : 'void *dummy;';
+print HFILE <<EOF
+};
+
+union config_value {
+ $dummy_field
+ const char *s; /* OPT_STRING, OPT_STRINGLIST */
+ long i; /* OPT_INT */
+ long b; /* OPT_SWITCH */
+ enum enum_value e; /* OPT_ENUM */
+ unsigned long x; /* OPT_BITFIELD */
+};
+
+struct enum_option_s {
+ const char *name;
+ const enum enum_value val;
+};
+
+#define MAX_ENUM_OPTS $enum_size
+struct imapopt_s {
+ const enum imapopt opt;
+ const char *optname;
+ int seen;
+ union config_value val;
+ const enum opttype t;
+EOF
+;
+
+print HFILE " const struct enum_option_s enum_options[MAX_ENUM_OPTS+1];\n";
+
+print HFILE <<EOF
+};
+
+extern struct imapopt_s imapopts[];
+
+#endif /* INCLUDED_IMAPOPTIONS_H */
+EOF
+ ;
+
+print CFILE <<EOF
+ { IMAPOPT_LAST, NULL, 0, { NULL }, OPT_NOTOPT, { { NULL, IMAP_ENUM_ZERO } } }
+};
+
+/* c code goes here */
+
+EOF
+;
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2header
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2man
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2man?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2man (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2man Sat Aug 26 02:00:13 2006
@@ -1,0 +1,129 @@
+#!/bin/sh
+# $Id: config2man,v 1.2.2.1 2003/12/19 18:33:58 ken3 Exp $
+#
+# Copyright (c) 2001 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+use strict;
+
+sub print_values {
+ my @values = eval $_[0];
+ my $v;
+ my $sep = " ";
+
+ print "\nAllowed values:";
+ foreach $v (@values) {
+ print "$sep\\fI$v\\fR";
+ $sep = ", ";
+ }
+ print "\n";
+}
+
+my $mode = 0;
+my $save = "";
+my $enums = "";
+
+my $blank = "";
+my $version = "\$Revision: 1.2.2.1 $blank";
+$version =~ s/.Revision: (.*) /$1/;
+print ".\\\" -*- nroff -*-\n";
+print ".\\\" auto-generated by config2man $version\n";
+
+while (<>) {
+ if ($mode == 0) {
+ # look for { option, default, type [enums] }; don't output until we
+ # hit a comment
+ if (m|{\s*\"(.*?)\"\s*,\s*\"?(.*?)\"?\s*,\s*(.*?)\s*(\(.*\))?\s*}|) {
+ my $opt = $1;
+ my $def = $2 eq "NULL" ? "<none>" : $2;
+ if ($def eq "") { $def = "<empty string>" }
+ $save = ".IP \"\\fB$1:\\fR $def\" 5\n";
+ $enums = $4;
+ }
+
+ # look for single-line comment
+ elsif (m|/\*\s*(.*)\s*\*/|) {
+ print $save; $save = "";
+ print "$1\n";
+ if ($enums) { print_values($enums); }
+ }
+
+ # look for /* to shift into passthrough mode; print current
+ # cached option header if any
+ elsif (m|/\*\s*(.*)|) {
+ print $save; $save = "";
+ print $1;
+ print "\n"; # add LF so lines don't run together
+ $mode = 1;
+ }
+ else {
+ chomp;
+ #print "ignoring '$_'\n";
+ }
+ } elsif ($mode == 1) {
+ # passthru; look for */ to end
+ if (m|\s*(.*)\*/|) {
+ print $1;
+ print "\n";
+ if ($enums) { print_values($enums); }
+ $mode = 0; # back to search mode
+ } elsif (m|\s*(.*)\s*|) {
+ print "$1\n";
+ }
+ }
+}
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/config2man
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/convert-sieve.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/convert-sieve.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/convert-sieve.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/convert-sieve.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,23 @@
+#!/usr/bin/perl
+
+#
+# Run this script in your sievedir to fix the names of people's sieve
+# directories to conform with the altnamespace format.
+#
+
+$|++;
+
+foreach $file (glob "?/*.*") {
+ print "Converting $file...";
+
+ $oldfile = $file;
+ $file =~ s/\./^/g;
+
+ print "to $file...";
+
+ if (rename $oldfile, $file) {
+ print "Done.\n";
+ } else {
+ print "Error: $!\n";
+ }
+}
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/dohash
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/dohash?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/dohash (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/dohash Sat Aug 26 02:00:13 2006
@@ -1,0 +1,286 @@
+#!/bin/sh
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+# script to upgrade from versions of imapd previous to 1.6.2
+# make sure you run it as the cyrus user
+# $Id: dohash,v 1.10.18.1 2005/12/01 22:30:21 murch Exp $
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+$| = 1;
+
+if ("-i" eq $ARGV[0]) {
+ $interactive = 1;
+ shift @ARGV;
+}
+if ("-f" eq $ARGV[0]) {
+ $force = 1;
+ shift @ARGV;
+}
+if ("-h" eq $ARGV[0] || $#ARGV > 0) {
+ print "usage: dohash [-i] [-f] [imapd.conf]\n";
+ print " -i interactive\n";
+ print " -f keep going on errors\n";
+ exit;
+}
+
+sub ouch {
+ my $msg = shift;
+
+ if ($force) {
+ print "fatal error: $msg\n";
+ } else {
+ print "error: $msg\n";
+ exit 1;
+ }
+}
+
+sub read_conf {
+ my $file = shift;
+
+ open CONF, $file or die "can't open $file";
+ while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/\@include:\s+(.*)$/) {
+ push @configs, $1;
+ }
+ if (/^configdirectory:\s+(.*)$/) {
+ $confdir = $1;
+ }
+ if (/^(?:meta)?partition-.*:\s+(.*)$/) {
+ if (grep /$1/, @parts) {
+ next;
+ }
+ push @parts, $1;
+ }
+ if (/^hashimapspool:\s*(1|t|yes|on)/) {
+ $hashispool = 1;
+ print "i will also hash partitions.\n";
+ }
+ }
+ close CONF;
+}
+
+$imapdconf = shift || "/etc/imapd.conf";
+
+$yn = "y";
+$hashispool = 0;
+
+push @configs, $imapdconf;
+
+while ($conf = shift @configs) {
+ read_conf($conf);
+}
+
+if (! $confdir) { $confdir = "/var/imap"; }
+
+if ($interactive) {
+ print "upgrade $confdir? ";
+ $yn = <STDIN>;
+}
+if ($yn =~ /^y/) {
+ print "upgrading configuration directory $confdir...";
+ chdir $confdir or die "couldn't change to $confdir";
+
+ # *** user subdirectory; holds subscription files
+ print "user ";
+ chdir "user" or die "couldn't change to user subdir";
+ foreach $i ("a".."z") {
+ mkdir ("$i", 0755) or ouch "couldn't create $i";
+ }
+ # any remaining sub's go into 'q'
+ opendir (USER, ".");
+ while ($f = readdir USER) {
+ print;
+ if ($f =~ /(.).*\.sub/s) {
+ print;
+ $h = lc($1);
+ if (!($h =~ /[a-z]/)) { $h = 'q'; }
+ rename ($f, "$h/$f") or ouch "couldn't move $f into $h";
+ }
+ }
+ closedir USER;
+ chdir "..";
+
+ # *** quota subdirectory; holds quota files for each quotaroot
+ print "quota ";
+ chdir "quota" or die "couldn't change to quota subdir";
+
+ # first, create directories we know can't conflict with existing files
+ foreach $i ("a".."z") {
+ mkdir (".$i", 0755) or ouch "couldn't create .$i";
+ }
+
+ # now for each file, move it into the appropriate directory
+ opendir QUOTA, ".";
+ while ($mbox = readdir QUOTA) {
+ if ($mbox =~ /^\./s) { next; }
+
+ if ($mbox =~ /^.*\.(.).*$/s) {
+ # hash is $1
+ $h = lc($1);
+ if ($h =~ /[a-z]/) {
+ rename($mbox, ".$h/$mbox")
+ or ouch "couldn't move $mbox into $h";
+ } else {
+ rename($mbox, ".q/$mbox")
+ or ouch "couldn't move $mbox into q";
+ }
+ next;
+ }
+
+ # we should try to hash on the first letter
+ if ($mbox =~ /(.).*/) {
+ $h = lc($1);
+ if ($h =~ /[a-z]/) {
+ rename($mbox, ".$h/$mbox")
+ or ouch "couldn't move $mbox into $h";
+ } else {
+ rename($mbox, ".q/$mbox")
+ or ouch "couldn't move $mbox into q";
+ }
+ next;
+ }
+
+ print "weird mailbox '$mbox'?\n";
+ }
+ closedir QUOTA;
+
+ # now move each temporary directory to the right place
+ foreach $i ("a".."z") {
+ rename (".$i", $i) or ouch "couldn't rename $i into place";
+ }
+
+ print "done\n";
+}
+
+# *** now for each data partition
+while ($part = shift @parts) {
+ if ($interactive) {
+ print "upgrade $part? ";
+ $yn = <STDIN>;
+ }
+ if ($yn =~ /^y/) {
+ print "upgrading data partition $part...";
+ chdir $part or die "couldn't chdir to $part";
+
+ if ($hashispool) {
+ foreach $i ("a".."z") {
+ mkdir (".$i", 0755) or ouch "couldn't create .$i";
+ }
+
+ opendir PART, ".";
+ while ($dir = readdir PART) {
+ if ($dir =~ /^\./s) { next; }
+ if ($dir eq "lost+found") { next; }
+
+ # process $dir
+ print "$dir ";
+ opendir DIR, $dir;
+ $ismbox = 0;
+ while ($sub = readdir DIR) {
+ if ($sub =~ /^\./s) { next; }
+ # if there's a dot in this, we're a mbox and
+ # this isn't a child
+ if ($sub =~ /(.*)\.(.*)/) { $ismbox = 1; next; }
+
+ if ($sub =~ /^(.).*$/s) {
+ $h = lc($1);
+ if (!($h =~ /[a-z]/)) {
+ $h = 'q';
+ }
+ mkdir (".$h/$dir", 0755); # might already be there
+ rename("$dir/$sub", ".$h/$dir/$sub") or
+ ouch "couldn't move $dir/$sub into $h";
+ } else {
+ print "weird mailbox '$dir/$sub'?\n";
+ }
+ }
+ closedir DIR;
+ # if $ismbox is set, then $dir is a mailbox of it's own right
+ if ($ismbox && $dir =~ /^(.).*/s) {
+ $h = lc($1);
+ if (!($h =~ /[a-z]/)) {
+ $h = 'q';
+ }
+ mkdir (".$h/$dir", 0755); # might already be there
+ opendir DIR, $dir;
+ while ($sub = readdir DIR) {
+ if ($sub =~ /^\./s) { next; }
+ rename("$dir/$sub", ".$h/$dir/$sub") or
+ ouch "couldn't move $dir into $h";
+ }
+ closedir DIR;
+ }
+
+ rmdir $dir or print "\ncouldn't remove '$dir'??\n";
+ }
+ closedir PART;
+
+ foreach $i ("a".."z") {
+ rename (".$i", $i) or ouch "couldn't rename .$i to $i";
+ }
+ }
+
+ chdir $part or die "couldn't chdir to $part";
+ mkdir "stage.", 0755;
+
+ print "done\n";
+ }
+}
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/dohash
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/masssievec
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/masssievec?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/masssievec (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/masssievec Sat Aug 26 02:00:13 2006
@@ -1,0 +1,184 @@
+#!/bin/sh
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+#
+# Script for mass compilation of sieve scripts.
+#
+# $Id: masssievec,v 1.2.2.3 2005/12/01 22:30:21 murch Exp $
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+$| = 1;
+
+die "must not run as root" if ($< == 0);
+
+if(@ARGV < 1) {
+ print "usage: masssievec <path to sievec> [imapd.conf]\n";
+ exit;
+}
+
+$SIEVEC = shift @ARGV;
+$imapdconf = shift @ARGV;
+if(!defined($imapdconf)) {
+ $imapdconf = "/etc/imapd.conf";
+}
+
+$sievedir = "/usr/sieve";
+
+if(! -x $SIEVEC) {
+ print "$SIEVEC is not executable\n";
+ exit;
+}
+
+if($SIEVEC !~ /^\//) {
+ print "$SIEVEC is not an absolute path\n";
+ exit;
+}
+
+sub read_conf {
+ my $file = shift;
+
+ open CONF, $file or die "can't open $file";
+ while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/\@include:\s+(.*)$/) {
+ push @configs, $1;
+ }
+ if (/^sieveusehomedir:\s+(1|t|yes|on)/) {
+ $nosievedir = 1;
+ print "you are storing sieve scripts in user's home directories, this script cannot deal with that\n";
+ exit;
+ }
+ if (/^sievedir:\s+(.*)$/) {
+ $sievedir = $1;
+ }
+ }
+ close CONF;
+}
+
+push @configs, $imapdconf;
+
+while ($conf = shift @configs) {
+ read_conf($conf);
+}
+
+print "you are using $sievedir as your sieve directory.\n";
+
+opendir TOP, $sievedir;
+while (defined($s = readdir TOP)) {
+ next if ($s eq "." || $s eq "..");
+ chdir $sievedir . "/$s";
+ opendir THISONE, ".";
+
+ while(defined($t = readdir THISONE)) {
+ next if ($t eq "." || $t eq "..");
+ print "processing user $t\n";
+ chdir $t;
+
+ opendir USER, ".";
+ while(defined($u = readdir USER)) {
+ next if ($u eq "." || $u eq "..");
+ if($u eq "default" && -l $u) {
+ # special case
+ $dest = readlink $u;
+ next unless($dest =~ m/\.script$/);
+ $dest =~ s/\.script$//;
+ symlink "$dest.bc", "defaultbc" || warn "can't symlink $dest.bc to defaultbc: $!";
+ unlink ("default");
+ } elsif ($u eq "default.bc" && -l $u) {
+ # slightly different upgrade foramt
+ $dest = readlink $u;
+ next unless($dest =~ m/\.bc$/ && $dest ne "default.bc");
+ symlink "$dest", "defaultbc" || warn "can't symlink $dest to defaultbc: $!";
+ unlink ("default.bc");
+ } elsif ($u eq "default" || $u eq "default.bc") {
+ warn "$u is not a symlink";
+ } else {
+ next unless($u =~ m/\.script$/);
+ $out = $u;
+ $out =~ s/\.script$//;
+
+ FORK: {
+ if($pid = fork()) {
+ #parent, do nothing
+ waitpid $pid, 0;
+ } elsif (defined $pid) {
+ # child
+ exec $SIEVEC, $u, "$out.bc";
+ die "souldn't be here";
+ } elsif ($! =~ /No more process/) {
+ # EAGAIN
+ sleep 5; redo FORK;
+ } else {
+ die "cant fork: $!";
+ }
+ }
+
+ $rc = $? & 0xff00;
+ $rc >>= 8;
+ if($rc) {
+ print "got error compiling $u.\n";
+ }
+ }
+ }
+ chdir $sievedir . "/$s";
+ }
+ closedir THISONE;
+}
+closedir TOP
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/masssievec
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/migrate-metadata
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/migrate-metadata?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/migrate-metadata (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/migrate-metadata Sat Aug 26 02:00:13 2006
@@ -1,0 +1,189 @@
+#!/bin/sh
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+# script to upgrade from versions of imapd previous to 1.6.2
+# make sure you run it as the cyrus user
+# $Id: migrate-metadata,v 1.1.2.3 2005/12/01 22:30:22 murch Exp $
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+use File::Copy
+
+$| = 1;
+
+if ($#ARGV > -1 && "-i" eq $ARGV[0]) {
+ $interactive = 1;
+ shift @ARGV;
+}
+if ($#ARGV > -1 && "-f" eq $ARGV[0]) {
+ $force = 1;
+ shift @ARGV;
+}
+if (($#ARGV > -1 && "-h" eq $ARGV[0]) || $#ARGV > 0) {
+ print "usage: migrate-metadata [-i] [-f] [imapd.conf]\n";
+ print " -i interactive\n";
+ print " -f keep going on errors\n";
+ exit;
+}
+
+sub ouch {
+ my $msg = shift;
+
+ if ($force) {
+ print "fatal error: $msg\n";
+ } else {
+ print "error: $msg\n";
+ exit 1;
+ }
+}
+
+sub read_conf {
+ my $file = shift;
+
+ open CONF, $file or die "can't open $file";
+ print "reading configure file $file...\n";
+ while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/\@include:\s+(.*)$/) {
+ push @configs, $1;
+ }
+ if (/^partition-(.*):\s*(.*)$/) {
+ $parts{$1} = $2;
+ }
+ if (/^metapartition-(.*):\s*(.*)$/) {
+ $mparts{$1} = $2;
+ }
+ if (/^metapartition_files:\s*(.*)$/) {
+ # split the list of files and make a hash
+ @metafiles = split(/\s+/, $1);
+ foreach $file (@metafiles) {
+ $mfiles{$file} = 1;
+ }
+ }
+ }
+ print "done\n";
+ close CONF;
+}
+
+$imapdconf = shift || "/etc/imapd.conf";
+
+$yn = "y";
+%parts = (); # start with empty partition hash
+%mparts = (); # start with empty metapartition hash
+%mfiles = (); # start with empty metapartition_files hash
+
+
+push @configs, $imapdconf;
+
+while ($conf = shift @configs) {
+ read_conf($conf);
+}
+
+if (!keys(%mfiles)) {
+ print "no metapartition_files option in $imapdconf\n";
+ exit 1;
+}
+
+# process each subdir, recursing if necessary
+sub migrate {
+ my $part = shift;
+ my $mpart = shift;
+ my $path = shift;
+ local *DIR;
+
+ opendir DIR, $part . $path;
+ while ($subdir = readdir DIR) {
+ my $subpath = $path . "/" . $subdir;
+
+ if ($subdir =~ /^cyrus\.(.+)/s) {
+ # cyrus.* file, see if we should migrate it
+ if (defined($mfiles{$1})) {
+ copy($part . $subpath, $mpart . $subpath) ||
+ ouch "couldn't copy $part$subpath to $mpart$subpath";
+ unlink($part . $subpath) ||
+ ouch "couldn't delete $part$subpath";
+ }
+ }
+ elsif ($subdir =~ /^[^\.]+$/s) {
+ # no dot in name, so this is a subdir, process it
+ mkdir($mpart . $subpath, 0700) ||
+ ouch "couldn't create $mpart$subpath";
+ migrate($part, $mpart, $subpath);
+ }
+ }
+ closedir DIR;
+}
+
+# *** now for each data partition
+while (($name,$part) = each(%parts)) {
+ my $mpart = $mparts{$name};
+ if (!defined($mpart)) { next; } # no corresponding metapartition, skip it
+
+ if ($interactive) {
+ print "upgrade $part? ";
+ $yn = <STDIN>;
+ }
+ if ($yn =~ /^y/) {
+ print "upgrading data partition $part...";
+
+ migrate($part, $mpart, "");
+ }
+
+ print "done\n";
+}
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/migrate-metadata
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mkimap
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mkimap?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mkimap (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mkimap Sat Aug 26 02:00:13 2006
@@ -1,0 +1,121 @@
+#!/bin/sh
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+# $Id: mkimap,v 1.15.2.4 2005/12/01 22:30:22 murch Exp $
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+sub read_conf {
+ my $file = shift;
+
+ open CONF, $file or die "can't open $file";
+ print "reading configure file $file...\n";
+ while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/\@include:\s+(.*)$/) {
+ print "i will include configure file $1.\n";
+ push @configs, $1;
+ }
+ if (/^configdirectory:\s+(.*)$/) {
+ $confdir = $1;
+ print "i will configure directory $confdir.\n";
+ }
+ if (/^(?:meta)?partition-.*:\s+(.*)$/) {
+ if (grep /$1/, @parts) {
+ next;
+ }
+ print "i saw partition $1.\n";
+ push @parts, $1;
+ }
+ }
+ print "done\n";
+ close CONF;
+}
+
+$imapdconf = shift || "/etc/imapd.conf";
+
+push @configs, $imapdconf;
+
+while ($conf = shift @configs) {
+ read_conf($conf);
+}
+
+$d = $confdir;
+
+print "configuring $d...\n";
+
+chdir $d or die "couldn't change to $d";
+
+mkdir "proc", 0755 || warn "can't create $d/proc: $!";
+mkdir "db", 0755 || warn "can't create $d/db: $!";
+mkdir "socket", 0755 || warn "can't create $d/socket: $!";
+mkdir "log", 0755 || warn "can't create $d/log: $!";
+mkdir "msg", 0755 || warn "can't create $d/msg: $!";
+mkdir "ptclient", 0755 || warn "can't create $d/ptclient: $!";
+mkdir "sync", 0755 || warn "can't create $d/sync: $!";
+
+while ($part = shift @parts) {
+ print "creating $part...\n";
+ mkdir $part, 0755 || warn "can't create $part: $!";
+ chdir $part or die "couldn't change to partition $part";
+ mkdir "stage.", 0755 || warn "can't create $part/stage.: $!";
+ mkdir "sync.", 0755 || warn "can't create $part/sync.: $!";
+}
+
+print "done\n";
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mkimap
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mknewsgroups
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mknewsgroups?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mknewsgroups (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mknewsgroups Sat Aug 26 02:00:13 2006
@@ -1,0 +1,193 @@
+#!/bin/sh
+#
+# Copyright (c) 2003 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+#
+# Create newsgroups on imap server
+# Based on the make_fromactive.pl script by Tim Martin
+#
+# $Id: mknewsgroups,v 1.2 2003/10/22 18:03:47 rjs3 Exp $
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+use Getopt::Long;
+use Cyrus::IMAP;
+use Cyrus::IMAP::Admin;
+
+$| = 1;
+
+my ($help, $noop, $config, $active, $user, $wild, $part, $acl, $pause) =
+ (0, 0, "/etc/imapd.conf", "./active", $ENV{USER}, "*", undef, "", 0);
+
+GetOptions("h|help!" => \$help,
+ "n|noop!" => \$noop,
+ "C|config=s" => \$config,
+ "f|active=s" => \$active,
+ "u|user=s" => \$user,
+ "w|wild=s" => \$wild,
+ "p|part=s" => \$part,
+ "a|acl=s" => \$acl,
+ "pause=s" => \$pause);
+
+if ($help || !($server = shift)) {
+ print "\n";
+ print "mknewsgroups [-h] [-n] [-C <config-file>] [-f <active-file>] [-u <user>]\n";
+ print " [-w <wildmats>] [-p <part>] [-a <acls>] <server>\n";
+ print "\n";
+ print "\t-h print this help message\n";
+ print "\t-n print the IMAP commands, but don't execute them\n";
+ print "\t-C use the config in <config-file> instead of /etc/imapd.conf\n";
+ print "\t-f use the newsgroups in <active-file> instead of ./active\n";
+ print "\t (get current file from ftp://ftp.isc.org/usenet/CONFIG/active)\n";
+ print "\t-u authenticate as <user> instead of the current shell user\n";
+ print "\t-w only create the newsgroups specified by <wildmats>. <wildmats>\n";
+ print "\t is a comma-separated list of wildmat pattern (eg, \"*,!alt.*\")\n";
+ print "\t-p create the newsgroup mailboxes on partition <part>\n";
+ print "\t-a set <acls> on the newsgroup. <acls> is a whitespace-separated list\n";
+ print "\t of cyradm-style userid/rights pairs (eg, \"anyone +p news write\")\n";
+ print "\n";
+ exit;
+}
+
+# convert wildmat to regex
+$wild =~ s/\./\\./g;
+$wild =~ s/\?/\./g;
+$wild =~ s/\*/\.\*/g;
+
+# split acl into a hash of ids and rights
+while ($acl =~ /^\s*([^\s]+)\s+([^\s]+)/) {
+ $aclhash{$1} = $2;
+ $acl =~ s/^\s*([^\s]+)\s+([^\s]+)//; # skip this id/rights pair
+}
+
+my ($newsprefix, $unixhiersep) = (undef, 0);
+
+open CONF, $config or die "can't open $config";
+print "reading configure file...\n";
+while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/^newsprefix:\s+(.*)$/) {
+ $newsprefix = $1;
+ print "you are using \"$newsprefix\" as your news prefix.\n";
+ }
+ if (/^unixhierarchysep:\s+(1|t|yes|on)/) {
+ $unixhiersep = 1;
+ print "i will deal with unix hierarchy separator.\n";
+ }
+}
+print "done\n";
+close CONF;
+
+my $client;
+
+if (!$noop) {
+ print "connecting... ";
+ $client = Cyrus::IMAP::Admin->new($server);
+ print "authenticating... ";
+ $client->authenticate(-user => $user);
+ print "done\n";
+}
+
+open (INPUT,"<$active");
+while( <INPUT> )
+{
+ chop;
+ my $g;
+
+ if (/((\w|\.|\-|\+)+)\s+(.*)/) {
+ $mbox = $1;
+
+ # compare group to each part of wildmat
+ my $match = 0;
+ foreach my $w (split(/,/, $wild)) {
+ my $not = substr($w, 0, 1) eq "!";
+ $w = substr($w, 1) if ($not);
+ $match = !$not if ($mbox =~ /^$w$/);
+ }
+
+ if ($match) {
+ # add newsprefix if necessary
+ $mbox = $newsprefix . "." . $mbox if (defined($newsprefix));
+
+ # switch to unixhiersep if necessary
+ $mbox =~ s^\.^/^g if ($unixhiersep);
+
+ if ($noop) {
+ $part = "" if (!defined($part));
+ print "C01 CREATE \"$mbox\" $part\n";
+ my $n = 1;
+ while (($id,$rights) = each(%aclhash)) {
+ printf "S%02d SETACL \"$mbox\" $id $rights\n", $n++;
+ }
+ } else {
+ $g = 0;
+ print "creating $mbox... ";
+ if ($client->create($mbox, $part)) {
+ while (($id,$rights) = each(%aclhash)) {
+ $client->setacl($mbox, $id => $rights);
+ }
+ $g = 1;
+ }
+ print "done\n";
+ sleep($pause) if ($g);
+ }
+ }
+ }
+}
+
+close(INPUT);
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mknewsgroups
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mupdate-loadgen.pl
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mupdate-loadgen.pl?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mupdate-loadgen.pl (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mupdate-loadgen.pl Sat Aug 26 02:00:13 2006
@@ -1,0 +1,27 @@
+#!/usr/bin/perl
+
+$prefix = "test.mupdate-load.";
+$lups = 150;
+$lookups = 10;
+
+srand(time());
+ at thelist = ();
+
+for($i=0; $i<=$lups; $i++) {
+ push @thelist, $prefix . $$ . ".$i";
+}
+
+$tag = 0;
+
+foreach $item (@thelist) {
+ print $tag++ . " RESERVE \"" . $item . "\" \"borked.andrew.cmu.edu\"\r\n";
+ $todo = int(rand $lookups) + 1;
+ for($i=1; $i<$todo; $i++) {
+ print $tag++ . " FIND \"" . $thelist[int(rand scalar @thelist)] . "\"\r\n";
+ }
+}
+
+foreach $item (@thelist) {
+ print $tag++ . " DELETE \"" . $item . "\"\r\n";
+}
+
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/mupdate-loadgen.pl
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/not-mkdep
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/not-mkdep?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/not-mkdep (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/not-mkdep Sat Aug 26 02:00:13 2006
@@ -1,0 +1,54 @@
+#!/bin/sh
+#
+# not-mkdep for those systems without it
+# $Id: not-mkdep,v 1.3 2000/05/23 20:56:53 robeson Exp $
+#
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+cat <<EOF
+
+ WARNING: MAKEDEPEND COULD NOT BE FOUND
+
+Makedepend did not run because the configure script did not find it when it
+was run. You can fix this by compiling and installing the version from the
+makedepend subdirectory in the distribution.
+
+You're probably seeing this warning message a lot, but that's okay.
+EOF
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/not-mkdep
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/rehash
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/rehash?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/rehash (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/rehash Sat Aug 26 02:00:13 2006
@@ -1,0 +1,674 @@
+#!/bin/sh
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+# script to upgrade from simple hashing scheme to full hashing scheme
+# make sure you run it as the cyrus user
+#
+# Written by Gary Mills <mills at cc.UManitoba.CA>
+#
+# $Id: rehash,v 1.7.2.1 2005/12/01 22:30:22 murch Exp $
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+$| = 1;
+
+die "must not run as root" if ($< == 0);
+
+if ("-i" eq $ARGV[0]) {
+ $interactive = 1;
+ shift @ARGV;
+}
+if ("-f" eq $ARGV[0]) {
+ $force = 1;
+ shift @ARGV;
+}
+if ("-h" eq $ARGV[0] || @ARGV < 1) {
+ print "usage: rehash [-i] [-f] none|basic|full [imapd.conf]\n";
+ print " -i interactive\n";
+ print " -f keep going on errors\n";
+ exit;
+}
+
+$MOVE_DOMAIN_CONF = 1;
+$MOVE_DOMAIN_SIEVE = 2;
+$MOVE_DOMAIN_PART = 3;
+
+$tonone = 1 if ("none" eq $ARGV[0]);
+$tobasic = 1 if ("basic" eq $ARGV[0]);
+$tofull = 1 if ("full" eq $ARGV[0]);
+unless ($tonone || $tobasic || $tofull) {
+ print "rehash: one of none/basic/full required\n";
+ exit;
+}
+shift @ARGV;
+
+my @bdirs = ("a".."z");
+my @fdirs = ("A".."W");
+my $dirs = [@bdirs, at fdirs] if $tonone;
+
+if ($tobasic) {
+ $dirs = \@bdirs;
+ $old = \@fdirs;
+}
+
+if ($tofull) {
+ $dirs = \@fdirs;
+ $old = \@bdirs;
+}
+
+sub ouch {
+ my $msg = shift;
+
+ if ($force) {
+ print "fatal error: $msg\n";
+ } else {
+ print "error: $msg\n";
+ exit 1;
+ }
+}
+
+sub dir_hash_c {
+ my $name = shift;
+ my ($h, $n);
+
+ if ($tofull) {
+ $n = 0;
+ foreach my $b (split(/ */, $name)) {
+ $n = (($n << 3) ^ ($n >> 5)) ^ ord($b);
+ }
+ $h = chr(ord('A') + ($n % 23));
+ return $h;
+ }
+ elsif ($tobasic) {
+ $h = lc(substr($name, 0, 1));
+ if (!($h =~ /[a-z]/)) { $h = 'q'; }
+ return $h;
+ }
+}
+
+sub read_conf {
+ my $file = shift;
+
+ open CONF, $file or die "can't open $file";
+ while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/\@include:\s+(.*)$/) {
+ push @configs, $1;
+ }
+ if (/^configdirectory:\s+(.*)$/) {
+ $confdir = $1;
+ }
+ if (/^(?:meta)?partition-.*:\s+(.*)$/) {
+ if (grep /$1/, @parts) {
+ next;
+ }
+ push @parts, $1;
+ }
+ if (/^hashimapspool:\s*(1|t|yes|on)/) {
+ $hashispool = 1;
+ print "i will also hash partitions.\n";
+ }
+ if (/^sieveusehomedir:\s+(1|t|yes|on)/) {
+ $nosievedir = 1;
+ print "you are storing sieve scripts in user's home directories.\n";
+ }
+ if (/^sievedir:\s+(.*)$/) {
+ $sievedir = $1;
+ print "you are using $sievedir as your sieve directory.\n";
+ }
+ if (/^virtdomains:\s+(1|t|yes|on)/) {
+ $virtdomains = 1;
+ print "i will deal with virtual domains.\n";
+ }
+ }
+ close CONF;
+}
+
+$imapdconf = shift || "/etc/imapd.conf";
+
+$yn = "y";
+$sievedir = "/usr/sieve";
+$nosievedir = 0;
+$hashispool = 0;
+$virtdomains = 0;
+
+push @configs, $imapdconf;
+
+while ($conf = shift @configs) {
+ read_conf($conf);
+}
+
+if (! $confdir) { $confdir = "/var/imap"; }
+
+if ($interactive) {
+ print "upgrade $confdir? ";
+ $yn = <STDIN>;
+}
+if ($yn =~ /^y/) {
+ unless (-d $confdir) { print "creating $confdir...\n";
+ mkdir $confdir, 0755;
+ }
+ print "converting configuration directory $confdir...";
+ chdir $confdir or die "couldn't change to $confdir";
+
+ foreach $i ("user", "proc", "db", "socket", "log", "msg", "quota") {
+ unless (-d $i) {
+ print "creating $i...\n";
+ mkdir $i, 0755;
+ }
+ }
+
+ # *** rehash the domain subdirectory to the new format,
+ # don't worry about internal format yet
+ if($virtdomains) {
+ print "domain ";
+ chdir "domain" or die "couldn't change to domain subdir";
+ &move_domains($MOVE_DOMAIN_CONF);
+ chdir "..";
+ }
+
+ # *** user subdirectory; holds subscription files
+ print "user ";
+ chdir "user" or die "couldn't change to user subdir";
+ &move_users;
+ chdir "..";
+
+ # *** quota subdirectory; holds quota files for each quotaroot
+ print "quota ";
+ chdir "quota" or die "couldn't change to quota subdir";
+ &move_quotas;
+ print "done\n";
+}
+
+# create the sieve stuff
+unless ($nosievedir) {
+ print "converting $sievedir...\n";
+
+ mkdir $sievedir, 0755;
+ if (chdir $sievedir) {
+ &move_sieve;
+ }
+}
+
+# *** now for each data partition
+my $i;
+my $f;
+
+while ($part = shift @parts) {
+ if ($interactive) {
+ print "upgrade $part? ";
+ $yn = <STDIN>;
+ }
+ if ($yn =~ /^y/) {
+ unless (-d $part) {
+ print "creating $part...\n";
+ mkdir $part, 0755;
+ }
+ print "converting data partition $part...";
+ chdir $part or die "couldn't chdir to $part";
+
+ if ($hashispool) {
+ &move_part;
+
+ chdir $part or die "couldn't chdir to $part";
+ mkdir "stage.", 0755;
+ }
+
+ print "done\n";
+ }
+}
+
+sub do_subdomain_conf {
+ if(-d "quota") {
+ chdir "quota";
+ &move_quotas;
+ chdir "..";
+ }
+ if(-d "user") {
+ chdir "user";
+ &move_users;
+ chdir "..";
+ }
+}
+
+sub move_domains {
+ my $type_of_move = shift;
+
+ if(!defined($type_of_move) || !$type_of_move) {
+ die "move_domains called badly";
+ }
+
+ my $i;
+ my $s;
+ my $h;
+ my $mbox;
+
+ foreach $i (@{$dirs}) {
+ if ($tonone) {
+ if (opendir SUB, $i) {
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+ chdir "$i/$s";
+ &do_subdomain;
+ chdir "../..";
+ rename("$i/$s", "$s") or die "couldn't move $s back!";
+ }
+ closedir SUB;
+ rmdir "$i" or die "couldn't remove $i";
+ }
+ }
+ else {
+ unless (-d $i) {
+ mkdir ("$i", 0755) or ouch "couldn't create $i";
+ }
+ }
+ }
+ unless ($tonone) {
+ foreach $i (@{$old}) {
+ if (opendir SUB, $i) {
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+
+ chdir "$i/$s";
+
+ if($type_of_move == $MOVE_DOMAIN_CONF) {
+ &do_subdomain_conf;
+ } elsif ($type_of_move == $MOVE_DOMAIN_SIEVE) {
+ &move_sieve;
+ } elsif ($type_of_move == $MOVE_DOMAIN_PART) {
+ &move_part;
+ } else {
+ die "bad domain move mode: $type_of_move";
+ }
+
+ chdir "../..";
+
+ $h = dir_hash_c($s);
+ print "moving $i/$s to $h/$s\n";
+ rename("$i/$s", "$h/$s") or ouch "couldn't move $s back!";
+ }
+ closedir SUB;
+ rmdir "$i" or die "couldn't remove $i";
+ }
+ }
+ opendir (USER, ".");
+ while ($f = readdir USER) {
+ if ($f =~ /^\./s) { next; }
+
+ # don't move the hashed directories themselves
+ my $flag = 0;
+ foreach $item (@{$dirs}) {
+ if($item eq $f) {
+ $flag = 1;
+ $break;
+ }
+ }
+ next if($flag);
+
+ # hash on name before '.sub' suffix
+ print "$f\n";
+ $h = dir_hash_c($f);
+ rename ($f, "$h/$f") or ouch "couldn't move $f into $h";
+ }
+ closedir USER;
+ }
+}
+
+sub move_users {
+ my $i;
+ my $s;
+ my $h;
+ my $f;
+ my $mbox;
+
+ foreach $i (@{$dirs}) {
+ if ($tonone) {
+ if (opendir SUB, $i) {
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+ rename("$i/$s", "$s") or die "couldn't move $s back!";
+ }
+ closedir SUB;
+ rmdir "$i" or die "couldn't remove $i";
+ }
+ } else {
+ unless (-d $i) {
+ mkdir ("$i", 0755) or ouch "couldn't create $i";
+ }
+ }
+ }
+ unless ($tonone) {
+ foreach $i (@{$old}) {
+ if (opendir SUB, $i) {
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+ # hash on name before '.sub' suffix
+ if ($s =~ /^(.+)\./) {
+ $h = dir_hash_c($1);
+ rename("$i/$s", "$h/$s") or ouch "couldn't move $s back!";
+ }
+ }
+ closedir SUB;
+ rmdir "$i" or die "couldn't remove $i";
+ }
+ }
+ opendir (USER, ".");
+ while ($f = readdir USER) {
+ if ($f =~ /^\./s) { next; }
+ # hash on name before '.sub' suffix
+ if ($f =~ /^(.+)\./) {
+ print "$f\n";
+ $h = dir_hash_c($1);
+ rename ($f, "$h/$f") or ouch "couldn't move $f into $h";
+ }
+ }
+ closedir USER;
+ }
+}
+
+sub move_quotas {
+ my $i;
+ my $s;
+ my $h;
+ my $mbox;
+
+ # first, create directories we know can't conflict with existing files
+ foreach $i (@{$dirs}) {
+ if ($tonone) {
+ if (-d $i) {
+ rename ($i, ".$i") or die "couldn't rename $i to .$i";
+ opendir SUB, ".$i";
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+ rename(".$i/$s", $s) or die "couldn't move $s back!";
+ }
+ closedir SUB;
+ rmdir ".$i" or die "couldn't remove .$i";
+ }
+ }
+ else {
+ if (-d $i) {
+ rename ($i, ".$i") or die "couldn't rename $i to .$i";
+ }
+ else {
+ mkdir (".$i", 0755);
+ }
+ }
+ }
+
+ # now for each file, move it into the appropriate directory
+ unless ($tonone) {
+ foreach $i (@{$old}) {
+ if (opendir SUB, $i) {
+ while ($s = readdir SUB) {
+ # hash on name after 'user.'
+ if ($s =~ /^.+\.(.+)$/) {
+ $h = dir_hash_c($1);
+ rename("$i/$s", ".$h/$s")
+ or ouch "couldn't move $s back!";
+ }
+ }
+ closedir SUB;
+ rmdir "$i" or die "couldn't remove $i";
+ }
+ }
+ opendir QUOTA, ".";
+ while ($mbox = readdir QUOTA) {
+ if ($mbox =~ /^\./s) { next; }
+
+ # hash on name after 'user.'
+ if ($mbox =~ /^.*\.(.*)$/) {
+ $h = dir_hash_c($1);
+ rename($mbox, ".$h/$mbox")
+ or ouch "couldn't move $mbox into $h";
+ next;
+ }
+
+ # we should try to hash the entire file
+ $h = dir_hash_c($mbox);
+ rename($mbox, ".$h/$mbox")
+ or ouch "couldn't move $mbox into $h";
+ next;
+
+ }
+ closedir QUOTA;
+
+ # now move each temporary directory to the right place
+ foreach $i (@{$dirs}) {
+ rename (".$i", $i) or ouch "couldn't rename $i into place";
+ }
+ }
+}
+
+sub move_sieve {
+ my $i;
+ my $s;
+ my $h;
+ my $mbox;
+
+ foreach $i (@{$dirs}) {
+ unless ($tonone) {
+ if (-d $i) {
+ rename ($i, ".$i") or die "couldn't rename $i to .$i";
+ }
+ else {
+ mkdir (".$i", 0755);
+ }
+ }
+ else {
+ rmdir "$i";
+ }
+ }
+ unless ($tonone) {
+ foreach $i (@{$old}) {
+ if (opendir SUB, $i) {
+ while ($s = readdir SUB) {
+ unless ($s =~ /^\./) {
+ $h = dir_hash_c($s);
+ rename("$i/$s", ".$h/$s")
+ or ouch "couldn't move $s back!";
+ }
+ }
+ closedir SUB;
+ rmdir "$i" or die "couldn't remove $i";
+ }
+ }
+ # now move each temporary directory to the right place
+ foreach $i (@{$dirs}) {
+ rename (".$i", $i) or ouch "couldn't rename $i into place";
+ }
+ }
+
+ if($virtdomains && chdir "domain") {
+ &move_domains($MOVE_DOMAIN_SIEVE);
+ chdir "..";
+ }
+}
+
+sub move_part {
+ my $i;
+ my $s;
+ my $t;
+ my $h;
+ my $dir;
+ my $sub;
+ my $ismbox;
+
+ foreach $i (@{$dirs}) {
+ if ($tonone) {
+ if (-d $i) {
+ rename ($i, ".$i") or die "couldn't rename $i to .$i";
+ print "$i ";
+
+ opendir SUB, ".$i";
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+ mkdir $s, 0755; # ignore errors as it might already exist
+
+ opendir MV, ".$i/$s";
+ while ($t = readdir MV) {
+ if ($t =~ /^\./s) { next; }
+ rename (".$i/$s/$t", "$s/$t")
+ or die "couldn't rename .$i/$s/$t to $s/$t";
+ }
+ closedir MV;
+ }
+ closedir SUB;
+ rmdir ".$i" or die "could not remove .$i";
+ }
+ print "done\n";
+ }
+ else {
+ mkdir (".$i", 0755) or ouch "couldn't create .$i";
+ }
+ }
+
+ unless ($tonone) {
+ foreach $i (@{$old}) {
+ if (opendir SUB, $i) {
+ while ($dir = readdir SUB) {
+ if ($dir =~ /^\./s) { next; }
+ # process $dir
+ print "$i/$dir ";
+ opendir DIR, "$i/$dir";
+ $ismbox = 0;
+ while ($sub = readdir DIR) {
+ if ($sub =~ /^\./s) { next; }
+ # if there's a dot in this, we're a mbox and
+ # this isn't a child
+ if ($sub =~ /(.*)\.(.*)/) { $ismbox = 1; next; }
+
+ print "/$sub ";
+ $h = dir_hash_c($sub);
+ mkdir (".$h/$dir", 0755); # might already be there
+ rename("$i/$dir/$sub", ".$h/$dir/$sub") or
+ ouch "couldn't move $dir/$sub into $h";
+ }
+ closedir DIR;
+ # if $ismbox is set, then $dir is a mailbox of it's own right
+ if ($ismbox) {
+ $h = dir_hash_c($dir);
+ mkdir (".$h/$dir", 0755); # might already be there
+ opendir DIR, "$i/$dir";
+ while ($sub = readdir DIR) {
+ if ($sub =~ /^\./s) { next; }
+ print "/$sub ";
+ rename("$i/$dir/$sub", ".$h/$dir/$sub") or
+ ouch "couldn't move $dir into $h";
+ }
+ closedir DIR;
+ }
+
+ rmdir "$i/$dir" or print "\ncouldn't remove '$dir'??\n";
+ }
+ closedir SUB;
+ rmdir "$i" or die "couldn't remove $i";
+ }
+ }
+ opendir PART, ".";
+ while ($dir = readdir PART) {
+ if ($dir =~ /^\./s) { next; }
+ if ($dir eq "lost+found") { next; }
+ if ($dir eq "stage.") { next; }
+ if ($dir eq "domain") {
+ if(chdir "domain") {
+ &move_domains($MOVE_DOMAIN_PART);
+ chdir "..";
+ }
+ next;
+ }
+
+ # process $dir
+ print "$dir ";
+ opendir DIR, $dir;
+ $ismbox = 0;
+ while ($sub = readdir DIR) {
+ if ($sub =~ /^\./s) { next; }
+ # if there's a dot in this, we're a mbox and
+ # this isn't a child
+ if ($sub =~ /(.*)\.(.*)/) { $ismbox = 1; next; }
+
+ $h = dir_hash_c($sub);
+ mkdir (".$h/$dir", 0755); # might already be there
+ rename("$dir/$sub", ".$h/$dir/$sub") or
+ ouch "couldn't move $dir/$sub into $h";
+ }
+ closedir DIR;
+ # if $ismbox is set, then $dir is a mailbox of it's own right
+ if ($ismbox) {
+ $h = dir_hash_c($dir);
+ mkdir (".$h/$dir", 0755); # might already be there
+ opendir DIR, $dir;
+ while ($sub = readdir DIR) {
+ if ($sub =~ /^\./s) { next; }
+ rename("$dir/$sub", ".$h/$dir/$sub") or
+ ouch "couldn't move $dir into $h";
+ }
+ closedir DIR;
+ }
+
+ rmdir $dir or print "\ncouldn't remove '$dir'??\n";
+ }
+ closedir PART;
+
+ foreach $i (@{$dirs}) {
+ rename (".$i", $i) or ouch "couldn't rename .$i to $i";
+ }
+ }
+}
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/rehash
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/translatesieve
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/translatesieve?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/translatesieve (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/translatesieve Sat Aug 26 02:00:13 2006
@@ -1,0 +1,226 @@
+#!/bin/sh
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+# script to translate sieve scripts to use unixhierarchysep and/or altnamespace
+# make sure you run it as the cyrus user
+#!/usr/bin/perl
+# $Id: translatesieve,v 1.6.8.1 2005/12/01 22:30:22 murch Exp $
+#
+# Copyright (c) 2001 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+$| = 1;
+
+if (($#ARGV > -1) && ("-f" eq $ARGV[0])) {
+ $force = 1;
+ shift @ARGV;
+}
+if ((($#ARGV > -1) && ($ARGV[0] eq "-h")) || ($#ARGV > 0)) {
+ print "usage: translatesieve [-f] [imapd.conf]\n";
+ print " -f keep going on errors\n";
+ exit;
+}
+
+sub ouch {
+ my $msg = shift;
+
+ if ($force) {
+ print "error: $msg\n";
+ } else {
+ print "fatal error: $msg\n";
+ exit 1;
+ }
+}
+
+sub read_conf {
+ my $file = shift;
+
+ open CONF, $file or die "can't open $file";
+ while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/\@include:\s+(.*)$/) {
+ push @configs, $1;
+ }
+ if (/^sievedir:\s+(.*)$/) {
+ $sievedir = $1;
+ print "you are using $sievedir as your sieve directory.\n";
+ }
+ if (/^unixhierarchysep:\s*(1|t|yes|on)/) {
+ $unixhierarchysep = 1;
+ }
+ if (/^altnamespace:\s*(1|t|yes|on)/) {
+ $altnamespace = 1;
+ }
+ if (/^userprefix:\s*(.*)$/) {
+ $userprefix = $1;
+ print "you are using $userprefix as your other users prefix.\n";
+ }
+ if (/^sharedprefix:\s*(.*)$/) {
+ $sharedprefix = $1;
+ print "you are using $sharedprefix as your shared prefix.\n";
+ }
+ }
+ close CONF;
+}
+
+$imapdconf = shift || "/etc/imapd.conf";
+
+$sievedir = "/usr/sieve";
+$unixhierarchysep = 0;
+$altnamespace = 0;
+$userprefix = "Other Users";
+$sharedprefix = "Shared Folders";
+
+push @configs, $imapdconf;
+
+while ($conf = shift @configs) {
+ read_conf($conf);
+}
+
+unless ($unixhierarchysep || $altnamespace) {
+ ouch "you are not using the Unix hierarchy separator or the alternate namespace";
+ exit;
+}
+
+print "translating sievedir $sievedir... ";
+chdir $sievedir or die "couldn't change to $sievedir";
+foreach $i ("a".."z") {
+ print "$i ";
+ if (! chdir $i) {
+ ouch "couldn't chdir to $i";
+ next;
+ }
+
+ # translate the scripts user by user
+ opendir (D, ".");
+ while ($d = readdir D) {
+ next if ($d =~ /^\./s);
+ if (! -d $d) {
+ ouch "expected $d to be a directory";
+ next;
+ }
+
+ if (! chdir $d) {
+ ouch "couldn't chdir to $d";
+ next;
+ }
+
+ # translate all of the user's scripts
+ opendir DIR, ".";
+ while ($file = readdir DIR) {
+ next if (!($file =~ /\.script$/));
+
+ # print "translating $file... ";
+ if (!open(IN, $file)) {
+ ouch "cannot open $file for reading: $!";
+ next;
+ }
+ if (!open(OUT, ">.$file")) {
+ close(IN);
+ ouch "cannot create /.$file: $!";
+ next;
+ }
+
+ $inbox = "[Ii][Nn][Bb][Oo][Xx]";
+ while (<IN>) {
+ # Alternate namespace
+ if ($altnamespace) {
+ # INBOX
+ if (/\s+fileinto\s+"$inbox"\s*;/) {
+ # do nothing
+ }
+ # Personal namespace
+ elsif (/\s+fileinto\s+"($inbox\.[^"]*)"\s*;/) {
+ substr($_, index($_, $1), 6) = "";
+ }
+ # Other Users namespace
+ elsif (/\s+fileinto\s+"(user\.[^"]*)"\s*;/) {
+ substr($_, index($_, $1), 4) = $userprefix;
+ }
+ # Shared namespace
+ elsif (/\s+fileinto\s+"([^"]*)"\s*;/) {
+ substr($_, index($_, $1), 0) = $sharedprefix . ".";
+ }
+ }
+ # Hierarchy separator
+ if ($unixhierarchysep) {
+ if (/\s+fileinto\s+"([^"]*)"\s*;/) {
+ substr($_, index($_, $1)) =~ s~\.~/~g;
+ }
+ }
+ print OUT $_;
+ }
+ close(IN);
+ close(OUT);
+
+ rename(".$file", "$file")
+ or ouch "couldn't move .$file to $file";
+
+ # print "\n";
+ }
+
+ closedir DIR;
+ chdir "..";
+ }
+ closedir D;
+
+ # back to "/usr/sieve"
+ chdir "..";
+}
+
+print "done\n";
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/translatesieve
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/undohash
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/undohash?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/undohash (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/undohash Sat Aug 26 02:00:13 2006
@@ -1,0 +1,152 @@
+#!/usr/bin/perl
+# script to downgrade from cyrus imapd 1.6.2+ to earlier.
+# do NOT run this script while imapd's are running
+# $Id: undohash,v 1.7.8.1 2005/12/01 22:30:23 murch Exp $
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+require 5;
+
+$| = 1;
+
+sub read_conf {
+ my $file = shift;
+
+ open CONF, $file or die "can't open $file";
+ while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/\@include:\s+(.*)$/) {
+ push @configs, $1;
+ }
+ if (/^configdirectory:\s+(.*)$/) {
+ $confdir = $1;
+ }
+ if (/^(?:meta)?partition-.*:\s+(.*)$/) {
+ if (grep /$1/, @parts) {
+ next;
+ }
+ push @parts, $1;
+ }
+ if (/^hashimapspool:\s*(1|t|yes|on)/) {
+ $hashispool = 1;
+ print "i will also hash partitions.\n";
+ }
+ }
+ close CONF;
+}
+
+$imapdconf = shift || "/etc/imapd.conf";
+$hashispool = 0;
+
+push @configs, $imapdconf;
+
+while ($conf = shift @configs) {
+ read_conf($conf);
+}
+
+print "downgrading configuration directory $confdir...";
+chdir $confdir or die "couldn't change to $confdir";
+
+# *** user subdirectory; holds subscription files
+print "user ";
+chdir "user" or die "couldn't change to user subdir";
+foreach $i ("a".."z") {
+ opendir SUB, $i;
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+ rename("$i/$s", "$s") or die "couldn't move $s back!";
+ }
+ closedir SUB;
+ rmdir "$i" or die "couldn't remove $i";
+}
+chdir "..";
+
+# *** quota subdirectory; holds quota files for each quotaroot
+print "quota ";
+chdir "quota" or die "couldn't change to quota subdir";
+
+# first, create directories we know can't conflict with existing files
+foreach $i ("a".."z") {
+ rename ($i, ".$i") or die "couldn't rename $i to .$i";
+ opendir SUB, ".$i";
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+ rename(".$i/$s", $s) or die "couldn't move $s back!";
+ }
+ closedir SUB;
+ rmdir ".$i" or die "couldn't remove .$i";
+}
+chdir "..";
+
+print "done\n";
+
+# *** now for each data partition
+while ($hashispool && ($part = shift @parts)) {
+ print "downgrading data partition $part...";
+ chdir $part or die "couldn't chdir to $part";
+
+ foreach $i ("a".."z") {
+ rename ("$i", ".$i") or die "couldn't rename $i to .$i";
+ }
+
+ # process each subdir
+ foreach $i ("a".."z") {
+ print "$i ";
+
+ opendir SUB, ".$i";
+ while ($s = readdir SUB) {
+ if ($s =~ /^\./s) { next; }
+ mkdir $s, 0755; # ignore errors as it might already exist
+
+ opendir MV, ".$i/$s";
+ while ($t = readdir MV) {
+ if ($t =~ /^\./s) { next; }
+ rename (".$i/$s/$t", "$s/$t") or
+ die "couldn't rename .$i/$s/$t to $s/$t";
+ }
+ closedir MV;
+ }
+ closedir SUB;
+ rmdir ".$i";
+ }
+
+ print "done\n";
+}
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/undohash
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/upgradesieve
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/upgradesieve?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/upgradesieve (added)
+++ branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/upgradesieve Sat Aug 26 02:00:13 2006
@@ -1,0 +1,183 @@
+#!/bin/sh
+exec perl -x -S $0 ${1+"$@"} # -*-perl-*-
+#!perl -w
+# script to upgrade sievedir from imapd 1.6.13
+# make sure you run it as the cyrus user
+#!/usr/bin/perl
+# $Id: upgradesieve,v 1.6.18.1 2005/12/01 22:30:23 murch Exp $
+#
+# Copyright (c) 2000 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+# endorse or promote products derived from this software without
+# prior written permission. For permission or any other legal
+# details, please contact
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer at andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+# acknowledgment:
+# "This product includes software developed by Computing Services
+# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+if ($] !~ /^5\..*/) {
+ # uh-oh. this isn't perl 5.
+ foreach (split(/:/, $ENV{PATH})) { # try to find "perl5".
+ exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5");
+ }
+ # we failed. bail.
+ die "Your perl is too old; I need perl 5.\n";
+}
+
+# load the real script. this is isolated in an 'eval' so perl4 won't
+# choke on the perl5-isms.
+eval join("\n", <DATA>);
+if ($@) { die "$@"; }
+
+__END__
+require 5;
+
+$| = 1;
+
+if (($#ARGV > -1) && ("-f" eq $ARGV[0])) {
+ $force = 1;
+ shift @ARGV;
+}
+if ((($#ARGV > -1) && ($ARGV[0] eq "-h")) || ($#ARGV > 0)) {
+ print "usage: upgradesieve [-f] [imapd.conf]\n";
+ print " -f keep going on errors\n";
+ exit;
+}
+
+sub ouch {
+ my $msg = shift;
+
+ if ($force) {
+ print "error: $msg\n";
+ } else {
+ print "fatal error: $msg\n";
+ exit 1;
+ }
+}
+
+sub read_conf {
+ my $file = shift;
+
+ open CONF, $file or die "can't open $file";
+ while (<CONF>) {
+ if (/^#/) {
+ next;
+ }
+ if (/\@include:\s+(.*)$/) {
+ push @configs, $1;
+ }
+ if (/^sievedir:\s+(.*)$/) {
+ $sievedir = $1;
+ print "you are using $sievedir as your sieve directory.\n";
+ }
+ }
+ close CONF;
+}
+
+$imapdconf = shift || "/etc/imapd.conf";
+
+$sievedir = "/usr/sieve";
+
+push @configs, $imapdconf;
+
+while ($conf = shift @configs) {
+ read_conf($conf);
+}
+
+print "upgrading sievedir $sievedir...";
+chdir $sievedir or die "couldn't change to $sievedir";
+foreach $i ("a".."z") {
+ print "$i ";
+ if (! chdir $i) {
+ ouch "couldn't chdir to $i";
+ next;
+ }
+
+ # upgrade single file to directory
+ opendir (D, ".");
+ while ($f = readdir D) {
+ next if ($f =~ /^\./s);
+ next if (-d $f);
+
+ rename($f, ".$f")
+ or ouch "couldn't move $f to .$f";
+
+ mkdir ($f, 0755)
+ or ouch "couldn't mkdir $f";
+
+ rename(".$f", "$f/$f.script")
+ or ouch "couldn't move .$f to $f/$f.script";
+
+ link("$f/$f.script", "$f/default")
+ or ouch "couldn't link $f.script to default";
+ }
+ closedir D;
+
+ # upgrade hard links to symlinks
+ opendir (D, ".");
+ while ($d = readdir D) {
+ next if ($d =~ /^\./s);
+ if (! -d $d) {
+ ouch "expected $d to be a directory";
+ next;
+ }
+
+ if (! chdir $d) {
+ ouch "couldn't chdir to $d";
+ next;
+ }
+
+ opendir DIR, ".";
+ while ($file = readdir DIR) {
+ next if (!($file =~ /\.script$/));
+
+ # print "considering $file... ";
+ ($dev, $ino, $mode, $nlink, @rest) = stat $file;
+ if ($nlink == 2) {
+ # print "making active... ";
+ symlink $file, "default.NEW";
+ rename "default.NEW", "default";
+ }
+ # print "\n";
+ }
+
+ closedir DIR;
+ chdir "..";
+ }
+ closedir D;
+
+ # back to "/usr/sieve"
+ chdir "..";
+}
+
+print "done\n";
Propchange: branches/cyrus23/cyrus-imapd-2.3-2.3.7/tools/upgradesieve
------------------------------------------------------------------------------
svn:executable =
Added: branches/cyrus23/cyrus-imapd-2.3_2.3.7-1~pr1.diff.gz
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3_2.3.7-1%7Epr1.diff.gz?rev=585&root=cyrus22&view=auto
==============================================================================
Binary file - no diff available.
Propchange: branches/cyrus23/cyrus-imapd-2.3_2.3.7-1~pr1.diff.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: branches/cyrus23/cyrus-imapd-2.3_2.3.7-1~pr1.dsc
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3_2.3.7-1%7Epr1.dsc?rev=585&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3_2.3.7-1~pr1.dsc (added)
+++ branches/cyrus23/cyrus-imapd-2.3_2.3.7-1~pr1.dsc Sat Aug 26 02:00:13 2006
@@ -1,0 +1,12 @@
+Format: 1.0
+Source: cyrus-imapd-2.3
+Version: 2.3.7-1~pr1
+Binary: cyrus-replication-2.3, cyrus-common-2.3, cyrus-pop3d-2.3, cyrus-nntpd-2.3, cyrus-dev-2.3, cyrus-murder-2.3, cyrus-imapd-2.3, cyrus-admin-2.3, libcyrus-imap-perl23, cyrus-doc-2.3, cyrus-clients-2.3
+Maintainer: Debian Cyrus Team <pkg-cyrus-imapd-debian-devel at lists.alioth.debian.org>
+Architecture: any
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 4.1.68), tcl8.3-dev, libwrap0-dev, libpam0g-dev, libdb4.2-dev (>= 4.2.52), libssl-dev, libzephyr-dev, libsasl2-dev (>= 2.1.9), comerr-dev, drac-dev (>= 1.11-7), libsnmp9-dev | libsnmp5-dev, perl (>= 5.6.0-16), xutils, flex, bison, autotools-dev, po-debconf, dpatch, transfig, gs, groff, libkvm-dev [kfreebsd-i386], libkvm-dev [kfreebsd-amd64]
+Uploaders: Henrique de Moraes Holschuh <hmh at debian.org>, Sven Mueller <sven at debian.org>, Benjamin Seidenberg <astronut at dlgeek.net>, OndÅej Surý <ondrej at debian.org>
+Files:
+ 07990f3a78a3a9d728cae627e31a9caf 2254961 cyrus-imapd-2.3_2.3.7.orig.tar.gz
+ ddea7b6ee5ebd340fef28309ab8c5a10 408315 cyrus-imapd-2.3_2.3.7-1~pr1.diff.gz
Added: branches/cyrus23/cyrus-imapd-2.3_2.3.7.orig.tar.gz
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3_2.3.7.orig.tar.gz?rev=585&root=cyrus22&view=auto
==============================================================================
Binary file - no diff available.
Propchange: branches/cyrus23/cyrus-imapd-2.3_2.3.7.orig.tar.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
More information about the Pkg-Cyrus-imapd-Debian-devel
mailing list